Repository: Jeffreyrn/vue-simple-flowchart
Branch: master
Commit: 88f60164f0f2
Files: 19
Total size: 123.5 KB
Directory structure:
gitextract_syknygiv/
├── .gitignore
├── .npmrc
├── LICENSE
├── README.md
├── babel.config.js
├── demo/
│ ├── css/
│ │ └── app.34b94fa0.css
│ ├── index.html
│ └── js/
│ ├── app.ea39b09e.js
│ └── chunk-vendors.063ae98f.js
├── package.json
├── public/
│ └── index.html
├── src/
│ ├── App.vue
│ ├── assets/
│ │ └── utilty/
│ │ └── position.js
│ ├── components/
│ │ ├── FlowchartLink.vue
│ │ ├── FlowchartNode.vue
│ │ └── SimpleFlowchart.vue
│ ├── index.js
│ └── main.js
└── vue.config.js
================================================
FILE CONTENTS
================================================
================================================
FILE: .gitignore
================================================
.DS_Store
node_modules
dist
# local env files
.env.local
.env.*.local
# Log files
npm-debug.log*
yarn-debug.log*
yarn-error.log*
# Editor directories and files
.idea
.vscode
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw*
================================================
FILE: .npmrc
================================================
sass_binary_site=https://npm.taobao.org/mirrors/node-sass/
phantomjs_cdnurl=https://npm.taobao.org/mirrors/phantomjs/
electron_mirror=https://npm.taobao.org/mirrors/electron/
================================================
FILE: LICENSE
================================================
MIT License
Copyright (c) 2019 jeffrey
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
================================================
FILE: README.md
================================================
# vue-simple-flowchart
## Introduction
a lightweight flowchart editor for Vue.js, code with vanillaJS,
### Note
This repository is not being actively maintained due to lack of time and interest.
My sincerest apologies to the open source community for allowing this project to stagnate. I hope it was useful for some of you as a jumping-off point.
## Demo
[https://jeffreyrn.github.io/vue-simple-flowchart/demo/](https://jeffreyrn.github.io/vue-simple-flowchart/demo/)
### Feature
- drag to connent two node, click to delete link
- support add, delete, save node
- reactive flowchart data
### Usage
install via npm/yarn
```
yarn add vue-simple-flowchart
```
import in script
```js
import SimpleFlowchart from 'vue-simple-flowchart';
import 'vue-simple-flowchart/dist/vue-flowchart.css';
```
register the component, and add below to html:
```html
```
then set data for flowchart component, for example:
```js
data() {
return {
data: {
centerX: 1024,
centerY: 140,
scale: 1,
nodes: [
{
id: 2,
x: -700,
y: -69,
type: 'Action',
label: 'test1',
},
{
id: 4,
x: -357,
y: 80,
type: 'Script',
label: 'test2',
},
{
id: 6,
x: -557,
y: 80,
type: 'Rule',
label: 'test3',
}
],
links: [
{
id: 3,
from: 2, // node id the link start
to: 4, // node id the link end
}
]
},
};
}
```
### Component
#### Attributes
- height, type: Number, default: 400
#### Events
- nodeClick, emit when node click, event = nodeID
- nodeDelete: emit when node deleted, event = nodeID
- linkBreak: emit when the selected link deleted, event = {id, from, to} (deleted link Object)
- linkAdded: emit when new link added, event = {id, from, to} (new link Object)
- canvasClick: emit when canvas click, event = { (Event Object) }
## Project setup
```
yarn install
```
### Compiles and hot-reloads for development
```
yarn run serve
```
### Compiles and minifies for production
```
yarn run build
```
### Lints and fixes files
```
yarn run lint
```
## TODO
- Add horizontal mode
- Optimizition for large node array
- Theme color configurable
- Remove Console.log in build mode
================================================
FILE: babel.config.js
================================================
module.exports = {
presets: [
'@vue/app'
]
}
================================================
FILE: demo/css/app.34b94fa0.css
================================================
g[data-v-295297bd]{cursor:pointer}.flowchart-node[data-v-67208d28]{-webkit-box-sizing:border-box;-webkit-transform-origin:top left;background:#fff;border:none;box-sizing:border-box;cursor:move;height:80px;margin:0;opacity:.9;position:absolute;transform-origin:top left;width:80px;z-index:1}.flowchart-node .node-main[data-v-67208d28]{text-align:center}.flowchart-node .node-main .node-type[data-v-67208d28]{background:#f85;color:#fff;font-size:13px;padding:6px}.flowchart-node .node-main .node-label[data-v-67208d28]{font-size:13px}.flowchart-node .node-port[data-v-67208d28]{-webkit-transform:translate(-50%);background:#fff;border:1px solid #ccc;border-radius:100px;height:12px;left:50%;position:absolute;transform:translate(-50%);width:12px}.flowchart-node .node-port[data-v-67208d28]:hover{background:#f85;border:1px solid #f85}.flowchart-node .node-input[data-v-67208d28]{top:-8px}.flowchart-node .node-output[data-v-67208d28]{bottom:-8px}.flowchart-node .node-delete[data-v-67208d28]{background:#fff;border:1px solid #f85;border-radius:100px;color:#f85;cursor:pointer;font-size:12px;height:12px;position:absolute;right:-6px;text-align:center;top:-6px;width:12px}.flowchart-node .node-delete[data-v-67208d28]:hover{background:#f85;color:#fff}.selected[data-v-67208d28]{-webkit-box-shadow:0 0 0 2px #f85;box-shadow:0 0 0 2px #f85}.flowchart-container[data-v-8730bea4]{background:#ddd;margin:0;overflow:hidden;position:relative}.flowchart-container svg[data-v-8730bea4]{cursor:-webkit-grab;cursor:grab}#app{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;color:#2c3e50;font-family:Avenir,Helvetica,Arial,sans-serif;height:800px;margin:0;overflow:hidden;text-align:center}#app .tool-wrapper{position:relative}
================================================
FILE: demo/index.html
================================================
vue-simple-flowchart We're sorry but vue-simple-flowchart doesn't work properly without JavaScript enabled. Please enable it to continue.
================================================
FILE: demo/js/app.ea39b09e.js
================================================
(function(e){function t(t){for(var o,r,a=t[0],c=t[1],l=t[2],d=0,h=[];d-1&&this.nodeDelete(this.action.dragging)),this.action.linking=!1,this.action.dragging=null,this.action.scrolling=!1},handleDown:function(e){var t=e.target||e.srcElement;if((t===this.$el||t.matches("svg, svg *"))&&1===e.which){this.action.scrolling=!0;var n=L(this.$el,e),o=Object(l["a"])(n,2);this.mouse.lastX=o[0],this.mouse.lastY=o[1],this.action.selected=null}this.$emit("canvasClick",e)},moveSelectedNode:function(e,t){var n=this,o=this.scene.nodes.findIndex(function(e){return e.id===n.action.dragging}),i=this.scene.nodes[o].x+e/this.scene.scale,s=this.scene.nodes[o].y+t/this.scene.scale;this.$set(this.scene.nodes,o,Object.assign(this.scene.nodes[o],{x:i,y:s}))},nodeDelete:function(e){this.scene.nodes=this.scene.nodes.filter(function(t){return t.id!==e}),this.scene.links=this.scene.links.filter(function(t){return t.from!==e&&t.to!==e}),this.$emit("nodeDelete",e)}}},_=N,M=(n("50b0"),Object(p["a"])(_,a,c,!1,null,"8730bea4",null));M.options.__file="SimpleFlowchart.vue";var D=M.exports,S={name:"app",components:{SimpleFlowchart:D},data:function(){return{scene:{centerX:1024,centerY:140,scale:1,nodes:[{id:2,x:-700,y:-69,type:"Action",label:"test1"},{id:4,x:-357,y:80,type:"Script",label:"test2"},{id:6,x:-557,y:80,type:"Rule",label:"test3"}],links:[{id:3,from:2,to:4}]},newNodeType:0,newNodeLabel:"",nodeCategory:["rule","action","script","decision","fork","join"]}},methods:{canvasClick:function(e){console.log("canvas Click, event:",e)},addNode:function(){var e=Math.max.apply(Math,[0].concat(Object(r["a"])(this.scene.nodes.map(function(e){return e.id}))));this.scene.nodes.push({id:e+1,x:-400,y:50,type:this.nodeCategory[this.newNodeType],label:this.newNodeLabel?this.newNodeLabel:"test".concat(e+1)})},nodeClick:function(e){console.log("node click",e)},nodeDelete:function(e){console.log("node delete",e)},linkBreak:function(e){console.log("link break",e)},linkAdded:function(e){console.log("new link added:",e)}}},C=S,j=(n("5c0b"),Object(p["a"])(C,i,s,!1,null,null,null));j.options.__file="App.vue";var X=j.exports;o["a"].config.productionTip=!1,new o["a"]({render:function(e){return e(X)}}).$mount("#app")},"5c0b":function(e,t,n){"use strict";var o=n("2856"),i=n.n(o);i.a},"6dc7":function(e,t,n){"use strict";var o=n("ec2e"),i=n.n(o);i.a},a617:function(e,t,n){},ba3f:function(e,t,n){"use strict";var o=n("524d"),i=n.n(o);i.a},ec2e:function(e,t,n){}});
//# sourceMappingURL=app.ea39b09e.js.map
================================================
FILE: demo/js/chunk-vendors.063ae98f.js
================================================
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-vendors"],{"01f9":function(t,e,n){"use strict";var r=n("2d00"),o=n("5ca1"),i=n("2aba"),a=n("32e9"),s=n("84f2"),c=n("41a0"),u=n("7f20"),f=n("38fd"),l=n("2b4c")("iterator"),p=!([].keys&&"next"in[].keys()),d="@@iterator",v="keys",h="values",y=function(){return this};t.exports=function(t,e,n,m,_,g,b){c(n,e,m);var w,x,A,C=function(t){if(!p&&t in S)return S[t];switch(t){case v:return function(){return new n(this,t)};case h:return function(){return new n(this,t)}}return function(){return new n(this,t)}},O=e+" Iterator",$=_==h,k=!1,S=t.prototype,E=S[l]||S[d]||_&&S[_],j=E||C(_),I=_?$?C("entries"):j:void 0,T="Array"==e&&S.entries||E;if(T&&(A=f(T.call(new t)),A!==Object.prototype&&A.next&&(u(A,O,!0),r||"function"==typeof A[l]||a(A,l,y))),$&&E&&E.name!==h&&(k=!0,j=function(){return E.call(this)}),r&&!b||!p&&!k&&S[l]||a(S,l,j),s[e]=j,s[O]=y,_)if(w={values:$?j:C(h),keys:g?j:C(v),entries:I},b)for(x in w)x in S||i(S,x,w[x]);else o(o.P+o.F*(p||k),e,w);return w}},"097d":function(t,e,n){"use strict";var r=n("5ca1"),o=n("8378"),i=n("7726"),a=n("ebd6"),s=n("bcaa");r(r.P+r.R,"Promise",{finally:function(t){var e=a(this,o.Promise||i.Promise),n="function"==typeof t;return this.then(n?function(n){return s(e,t()).then(function(){return n})}:t,n?function(n){return s(e,t()).then(function(){throw n})}:t)}})},"0a49":function(t,e,n){var r=n("9b43"),o=n("626a"),i=n("4bf8"),a=n("9def"),s=n("cd1c");t.exports=function(t,e){var n=1==t,c=2==t,u=3==t,f=4==t,l=6==t,p=5==t||l,d=e||s;return function(e,s,v){for(var h,y,m=i(e),_=o(m),g=r(s,v,3),b=a(_.length),w=0,x=n?d(e,b):c?d(e,0):void 0;b>w;w++)if((p||w in _)&&(h=_[w],y=g(h,w,m),t))if(n)x[w]=y;else if(y)switch(t){case 3:return!0;case 5:return h;case 6:return w;case 2:x.push(h)}else if(f)return!1;return l?-1:u||f?f:x}}},"0d58":function(t,e,n){var r=n("ce10"),o=n("e11e");t.exports=Object.keys||function(t){return r(t,o)}},1169:function(t,e,n){var r=n("2d95");t.exports=Array.isArray||function(t){return"Array"==r(t)}},"11e9":function(t,e,n){var r=n("52a7"),o=n("4630"),i=n("6821"),a=n("6a99"),s=n("69a8"),c=n("c69a"),u=Object.getOwnPropertyDescriptor;e.f=n("9e1e")?u:function(t,e){if(t=i(t),e=a(e,!0),c)try{return u(t,e)}catch(t){}if(s(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,a=i(e),s=a.length,c=0;while(s>c)r.f(t,n=a[c++],e[n]);return t}},1991:function(t,e,n){var r,o,i,a=n("9b43"),s=n("31f4"),c=n("fab2"),u=n("230e"),f=n("7726"),l=f.process,p=f.setImmediate,d=f.clearImmediate,v=f.MessageChannel,h=f.Dispatch,y=0,m={},_="onreadystatechange",g=function(){var t=+this;if(m.hasOwnProperty(t)){var e=m[t];delete m[t],e()}},b=function(t){g.call(t.data)};p&&d||(p=function(t){var e=[],n=1;while(arguments.length>n)e.push(arguments[n++]);return m[++y]=function(){s("function"==typeof t?t:Function(t),e)},r(y),y},d=function(t){delete m[t]},"process"==n("2d95")(l)?r=function(t){l.nextTick(a(g,t,1))}:h&&h.now?r=function(t){h.now(a(g,t,1))}:v?(o=new v,i=o.port2,o.port1.onmessage=b,r=a(i.postMessage,i,1)):f.addEventListener&&"function"==typeof postMessage&&!f.importScripts?(r=function(t){f.postMessage(t+"","*")},f.addEventListener("message",b,!1)):r=_ in u("script")?function(t){c.appendChild(u("script"))[_]=function(){c.removeChild(this),g.call(t)}}:function(t){setTimeout(a(g,t,1),0)}),t.exports={set:p,clear:d}},"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(e){var i=t["return"];throw void 0!==i&&r(i.call(t)),e}}},"20d6":function(t,e,n){"use strict";var r=n("5ca1"),o=n("0a49")(6),i="findIndex",a=!0;i in[]&&Array(1)[i](function(){a=!1}),r(r.P+r.F*a,"Array",{findIndex:function(t){return o(this,t,arguments.length>1?arguments[1]:void 0)}}),n("9c6c")(i)},"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):{}}},"23c6":function(t,e,n){var r=n("2d95"),o=n("2b4c")("toStringTag"),i="Arguments"==r(function(){return arguments}()),a=function(t,e){try{return t[e]}catch(t){}};t.exports=function(t){var e,n,s;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(n=a(e=Object(t),o))?n:i?r(e):"Object"==(s=r(e))&&"function"==typeof e.callee?"Arguments":s}},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)]}},2877:function(t,e,n){"use strict";function r(t,e,n,r,o,i,a,s){var c,u="function"===typeof t?t.options:t;if(e&&(u.render=e,u.staticRenderFns=n,u._compiled=!0),r&&(u.functional=!0),i&&(u._scopeId="data-v-"+i),a?(c=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(a)},u._ssrRegister=c):o&&(c=s?function(){o.call(this,this.$root.$options.shadowRoot)}:o),c)if(u.functional){u._injectStyles=c;var f=u.render;u.render=function(t,e){return c.call(e),f(t,e)}}else{var l=u.beforeCreate;u.beforeCreate=l?[].concat(l,c):[c]}return{exports:t,options:u}}n.d(e,"a",function(){return r})},"2aba":function(t,e,n){var r=n("7726"),o=n("32e9"),i=n("69a8"),a=n("ca5a")("src"),s="toString",c=Function[s],u=(""+c).split(s);n("8378").inspectSource=function(t){return c.call(t)},(t.exports=function(t,e,n,s){var c="function"==typeof n;c&&(i(n,"name")||o(n,"name",e)),t[e]!==n&&(c&&(i(n,a)||o(n,a,t[e]?""+t[e]:u.join(String(e)))),t===r?t[e]=n:s?t[e]?t[e]=n:o(t,e,n):(delete t[e],o(t,e,n)))})(Function.prototype,s,function(){return"function"==typeof this&&this[a]||c.call(this)})},"2aeb":function(t,e,n){var r=n("cb7c"),o=n("1495"),i=n("e11e"),a=n("613b")("IE_PROTO"),s=function(){},c="prototype",u=function(){var t,e=n("230e")("iframe"),r=i.length,o="<",a=">";e.style.display="none",n("fab2").appendChild(e),e.src="javascript:",t=e.contentWindow.document,t.open(),t.write(o+"script"+a+"document.F=Object"+o+"/script"+a),t.close(),u=t.F;while(r--)delete u[c][i[r]];return u()};t.exports=Object.create||function(t,e){var n;return null!==t?(s[c]=r(t),n=new s,s[c]=null,n[a]=t):n=u(),void 0===e?n:o(n,e)}},"2b0e":function(t,e,n){"use strict";(function(t){
/*!
* Vue.js v2.5.17
* (c) 2014-2018 Evan You
* Released under the MIT License.
*/
var n=Object.freeze({});function r(t){return void 0===t||null===t}function o(t){return void 0!==t&&null!==t}function i(t){return!0===t}function a(t){return!1===t}function s(t){return"string"===typeof t||"number"===typeof t||"symbol"===typeof t||"boolean"===typeof t}function c(t){return null!==t&&"object"===typeof t}var u=Object.prototype.toString;function f(t){return"[object Object]"===u.call(t)}function l(t){return"[object RegExp]"===u.call(t)}function p(t){var e=parseFloat(String(t));return e>=0&&Math.floor(e)===e&&isFinite(t)}function d(t){return null==t?"":"object"===typeof t?JSON.stringify(t,null,2):String(t)}function v(t){var e=parseFloat(t);return isNaN(e)?t:e}function h(t,e){for(var n=Object.create(null),r=t.split(","),o=0;o-1)return t.splice(n,1)}}var _=Object.prototype.hasOwnProperty;function g(t,e){return _.call(t,e)}function b(t){var e=Object.create(null);return function(n){var r=e[n];return r||(e[n]=t(n))}}var w=/-(\w)/g,x=b(function(t){return t.replace(w,function(t,e){return e?e.toUpperCase():""})}),A=b(function(t){return t.charAt(0).toUpperCase()+t.slice(1)}),C=/\B([A-Z])/g,O=b(function(t){return t.replace(C,"-$1").toLowerCase()});function $(t,e){function n(n){var r=arguments.length;return r?r>1?t.apply(e,arguments):t.call(e,n):t.call(e)}return n._length=t.length,n}function k(t,e){return t.bind(e)}var S=Function.prototype.bind?k:$;function E(t,e){e=e||0;var n=t.length-e,r=new Array(n);while(n--)r[n]=t[n+e];return r}function j(t,e){for(var n in e)t[n]=e[n];return t}function I(t){for(var e={},n=0;n0,tt=Y&&Y.indexOf("edge/")>0,et=(Y&&Y.indexOf("android"),Y&&/iphone|ipad|ipod|ios/.test(Y)||"ios"===J),nt=(Y&&/chrome\/\d+/.test(Y),{}.watch),rt=!1;if(K)try{var ot={};Object.defineProperty(ot,"passive",{get:function(){rt=!0}}),window.addEventListener("test-passive",null,ot)}catch(t){}var it=function(){return void 0===q&&(q=!K&&!X&&"undefined"!==typeof t&&"server"===t["process"].env.VUE_ENV),q},at=K&&window.__VUE_DEVTOOLS_GLOBAL_HOOK__;function st(t){return"function"===typeof t&&/native code/.test(t.toString())}var ct,ut="undefined"!==typeof Symbol&&st(Symbol)&&"undefined"!==typeof Reflect&&st(Reflect.ownKeys);ct="undefined"!==typeof Set&&st(Set)?Set:function(){function t(){this.set=Object.create(null)}return t.prototype.has=function(t){return!0===this.set[t]},t.prototype.add=function(t){this.set[t]=!0},t.prototype.clear=function(){this.set=Object.create(null)},t}();var ft=T,lt=0,pt=function(){this.id=lt++,this.subs=[]};pt.prototype.addSub=function(t){this.subs.push(t)},pt.prototype.removeSub=function(t){m(this.subs,t)},pt.prototype.depend=function(){pt.target&&pt.target.addDep(this)},pt.prototype.notify=function(){for(var t=this.subs.slice(),e=0,n=t.length;e-1)if(i&&!g(o,"default"))a=!1;else if(""===a||a===O(t)){var c=Jt(String,o.type);(c<0||s0&&(a=Ce(a,(e||"")+"_"+n),Ae(a[0])&&Ae(u)&&(f[c]=gt(u.text+a[0].text),a.shift()),f.push.apply(f,a)):s(a)?Ae(u)?f[c]=gt(u.text+a):""!==a&&f.push(gt(a)):Ae(a)&&Ae(u)?f[c]=gt(u.text+a.text):(i(t._isVList)&&o(a.tag)&&r(a.key)&&o(e)&&(a.key="__vlist"+e+"_"+n+"__"),f.push(a)));return f}function Oe(t,e){return(t.__esModule||ut&&"Module"===t[Symbol.toStringTag])&&(t=t.default),c(t)?e.extend(t):t}function $e(t,e,n,r,o){var i=_t();return i.asyncFactory=t,i.asyncMeta={data:e,context:n,children:r,tag:o},i}function ke(t,e,n){if(i(t.error)&&o(t.errorComp))return t.errorComp;if(o(t.resolved))return t.resolved;if(i(t.loading)&&o(t.loadingComp))return t.loadingComp;if(!o(t.contexts)){var a=t.contexts=[n],s=!0,u=function(){for(var t=0,e=a.length;t1?E(n):n;for(var r=E(arguments,1),o=0,i=n.length;oZe&&Ge[n].id>t.id)n--;Ge.splice(n+1,0,t)}else Ge.push(t);Je||(Je=!0,fe(tn))}}var an=0,sn=function(t,e,n,r,o){this.vm=t,o&&(t._watcher=this),t._watchers.push(this),r?(this.deep=!!r.deep,this.user=!!r.user,this.lazy=!!r.lazy,this.sync=!!r.sync):this.deep=this.user=this.lazy=this.sync=!1,this.cb=n,this.id=++an,this.active=!0,this.dirty=this.lazy,this.deps=[],this.newDeps=[],this.depIds=new ct,this.newDepIds=new ct,this.expression="","function"===typeof e?this.getter=e:(this.getter=W(e),this.getter||(this.getter=function(){})),this.value=this.lazy?void 0:this.get()};sn.prototype.get=function(){var t;vt(this);var e=this.vm;try{t=this.getter.call(e,e)}catch(t){if(!this.user)throw t;Yt(t,e,'getter for watcher "'+this.expression+'"')}finally{this.deep&&pe(t),ht(),this.cleanupDeps()}return t},sn.prototype.addDep=function(t){var e=t.id;this.newDepIds.has(e)||(this.newDepIds.add(e),this.newDeps.push(t),this.depIds.has(e)||t.addSub(this))},sn.prototype.cleanupDeps=function(){var t=this,e=this.deps.length;while(e--){var n=t.deps[e];t.newDepIds.has(n.id)||n.removeSub(t)}var r=this.depIds;this.depIds=this.newDepIds,this.newDepIds=r,this.newDepIds.clear(),r=this.deps,this.deps=this.newDeps,this.newDeps=r,this.newDeps.length=0},sn.prototype.update=function(){this.lazy?this.dirty=!0:this.sync?this.run():on(this)},sn.prototype.run=function(){if(this.active){var t=this.get();if(t!==this.value||c(t)||this.deep){var e=this.value;if(this.value=t,this.user)try{this.cb.call(this.vm,t,e)}catch(t){Yt(t,this.vm,'callback for watcher "'+this.expression+'"')}else this.cb.call(this.vm,t,e)}}},sn.prototype.evaluate=function(){this.value=this.get(),this.dirty=!1},sn.prototype.depend=function(){var t=this,e=this.deps.length;while(e--)t.deps[e].depend()},sn.prototype.teardown=function(){var t=this;if(this.active){this.vm._isBeingDestroyed||m(this.vm._watchers,this);var e=this.deps.length;while(e--)t.deps[e].removeSub(t);this.active=!1}};var cn={enumerable:!0,configurable:!0,get:T,set:T};function un(t,e,n){cn.get=function(){return this[e][n]},cn.set=function(t){this[e][n]=t},Object.defineProperty(t,n,cn)}function fn(t){t._watchers=[];var e=t.$options;e.props&&ln(t,e.props),e.methods&&_n(t,e.methods),e.data?pn(t):jt(t._data={},!0),e.computed&&hn(t,e.computed),e.watch&&e.watch!==nt&&gn(t,e.watch)}function ln(t,e){var n=t.$options.propsData||{},r=t._props={},o=t.$options._propKeys=[],i=!t.$parent;i||$t(!1);var a=function(i){o.push(i);var a=qt(i,e,n,t);It(r,i,a),i in t||un(t,"_props",i)};for(var s in e)a(s);$t(!0)}function pn(t){var e=t.$options.data;e=t._data="function"===typeof e?dn(e,t):e||{},f(e)||(e={});var n=Object.keys(e),r=t.$options.props,o=(t.$options.methods,n.length);while(o--){var i=n[o];0,r&&g(r,i)||B(i)||un(t,"_data",i)}jt(e,!0)}function dn(t,e){vt();try{return t.call(e,e)}catch(t){return Yt(t,e,"data()"),{}}finally{ht()}}var vn={lazy:!0};function hn(t,e){var n=t._computedWatchers=Object.create(null),r=it();for(var o in e){var i=e[o],a="function"===typeof i?i:i.get;0,r||(n[o]=new sn(t,a||T,T,vn)),o in t||yn(t,o,i)}}function yn(t,e,n){var r=!it();"function"===typeof n?(cn.get=r?mn(e):n,cn.set=T):(cn.get=n.get?r&&!1!==n.cache?mn(e):n.get:T,cn.set=n.set?n.set:T),Object.defineProperty(t,e,cn)}function mn(t){return function(){var e=this._computedWatchers&&this._computedWatchers[t];if(e)return e.dirty&&e.evaluate(),pt.target&&e.depend(),e.value}}function _n(t,e){t.$options.props;for(var n in e)t[n]=null==e[n]?T:S(e[n],t)}function gn(t,e){for(var n in e){var r=e[n];if(Array.isArray(r))for(var o=0;o=0||n.indexOf(t[o])<0)&&r.push(t[o]);return r}return t}function sr(t){this._init(t)}function cr(t){t.use=function(t){var e=this._installedPlugins||(this._installedPlugins=[]);if(e.indexOf(t)>-1)return this;var n=E(arguments,1);return n.unshift(this),"function"===typeof t.install?t.install.apply(t,n):"function"===typeof t&&t.apply(null,n),e.push(t),this}}function ur(t){t.mixin=function(t){return this.options=zt(this.options,t),this}}function fr(t){t.cid=0;var e=1;t.extend=function(t){t=t||{};var n=this,r=n.cid,o=t._Ctor||(t._Ctor={});if(o[r])return o[r];var i=t.name||n.options.name;var a=function(t){this._init(t)};return a.prototype=Object.create(n.prototype),a.prototype.constructor=a,a.cid=e++,a.options=zt(n.options,t),a["super"]=n,a.options.props&&lr(a),a.options.computed&&pr(a),a.extend=n.extend,a.mixin=n.mixin,a.use=n.use,R.forEach(function(t){a[t]=n[t]}),i&&(a.options.components[i]=a),a.superOptions=n.options,a.extendOptions=t,a.sealedOptions=j({},a.options),o[r]=a,a}}function lr(t){var e=t.options.props;for(var n in e)un(t.prototype,"_props",n)}function pr(t){var e=t.options.computed;for(var n in e)yn(t.prototype,n,e[n])}function dr(t){R.forEach(function(e){t[e]=function(t,n){return n?("component"===e&&f(n)&&(n.name=n.name||t,n=this.options._base.extend(n)),"directive"===e&&"function"===typeof n&&(n={bind:n,update:n}),this.options[e+"s"][t]=n,n):this.options[e+"s"][t]}})}function vr(t){return t&&(t.Ctor.options.name||t.tag)}function hr(t,e){return Array.isArray(t)?t.indexOf(e)>-1:"string"===typeof t?t.split(",").indexOf(e)>-1:!!l(t)&&t.test(e)}function yr(t,e){var n=t.cache,r=t.keys,o=t._vnode;for(var i in n){var a=n[i];if(a){var s=vr(a.componentOptions);s&&!e(s)&&mr(n,i,r,o)}}}function mr(t,e,n,r){var o=t[e];!o||r&&o.tag===r.tag||o.componentInstance.$destroy(),t[e]=null,m(n,e)}nr(sr),wn(sr),Ne(sr),Ue(sr),tr(sr);var _r=[String,RegExp,Array],gr={name:"keep-alive",abstract:!0,props:{include:_r,exclude:_r,max:[String,Number]},created:function(){this.cache=Object.create(null),this.keys=[]},destroyed:function(){var t=this;for(var e in t.cache)mr(t.cache,e,t.keys)},mounted:function(){var t=this;this.$watch("include",function(e){yr(t,function(t){return hr(e,t)})}),this.$watch("exclude",function(e){yr(t,function(t){return!hr(e,t)})})},render:function(){var t=this.$slots.default,e=Ee(t),n=e&&e.componentOptions;if(n){var r=vr(n),o=this,i=o.include,a=o.exclude;if(i&&(!r||!hr(i,r))||a&&r&&hr(a,r))return e;var s=this,c=s.cache,u=s.keys,f=null==e.key?n.Ctor.cid+(n.tag?"::"+n.tag:""):e.key;c[f]?(e.componentInstance=c[f].componentInstance,m(u,f),u.push(f)):(c[f]=e,u.push(f),this.max&&u.length>parseInt(this.max)&&mr(c,u[0],u,this._vnode)),e.data.keepAlive=!0}return e||t&&t[0]}},br={KeepAlive:gr};function wr(t){var e={get:function(){return V}};Object.defineProperty(t,"config",e),t.util={warn:ft,extend:j,mergeOptions:zt,defineReactive:It},t.set=Tt,t.delete=Pt,t.nextTick=fe,t.options=Object.create(null),R.forEach(function(e){t.options[e+"s"]=Object.create(null)}),t.options._base=t,j(t.options.components,br),cr(t),ur(t),fr(t),dr(t)}wr(sr),Object.defineProperty(sr.prototype,"$isServer",{get:it}),Object.defineProperty(sr.prototype,"$ssrContext",{get:function(){return this.$vnode&&this.$vnode.ssrContext}}),Object.defineProperty(sr,"FunctionalRenderContext",{value:Dn}),sr.version="2.5.17";var xr=h("style,class"),Ar=h("input,textarea,option,select,progress"),Cr=function(t,e,n){return"value"===n&&Ar(t)&&"button"!==e||"selected"===n&&"option"===t||"checked"===n&&"input"===t||"muted"===n&&"video"===t},Or=h("contenteditable,draggable,spellcheck"),$r=h("allowfullscreen,async,autofocus,autoplay,checked,compact,controls,declare,default,defaultchecked,defaultmuted,defaultselected,defer,disabled,enabled,formnovalidate,hidden,indeterminate,inert,ismap,itemscope,loop,multiple,muted,nohref,noresize,noshade,novalidate,nowrap,open,pauseonexit,readonly,required,reversed,scoped,seamless,selected,sortable,translate,truespeed,typemustmatch,visible"),kr="http://www.w3.org/1999/xlink",Sr=function(t){return":"===t.charAt(5)&&"xlink"===t.slice(0,5)},Er=function(t){return Sr(t)?t.slice(6,t.length):""},jr=function(t){return null==t||!1===t};function Ir(t){var e=t.data,n=t,r=t;while(o(r.componentInstance))r=r.componentInstance._vnode,r&&r.data&&(e=Tr(r.data,e));while(o(n=n.parent))n&&n.data&&(e=Tr(e,n.data));return Pr(e.staticClass,e.class)}function Tr(t,e){return{staticClass:Nr(t.staticClass,e.staticClass),class:o(t.class)?[t.class,e.class]:e.class}}function Pr(t,e){return o(t)||o(e)?Nr(t,Mr(e)):""}function Nr(t,e){return t?e?t+" "+e:t:e||""}function Mr(t){return Array.isArray(t)?Lr(t):c(t)?Dr(t):"string"===typeof t?t:""}function Lr(t){for(var e,n="",r=0,i=t.length;r-1?Hr[t]=e.constructor===window.HTMLUnknownElement||e.constructor===window.HTMLElement:Hr[t]=/HTMLUnknownElement/.test(e.toString())}var Wr=h("text,number,password,search,email,tel,url");function qr(t){if("string"===typeof t){var e=document.querySelector(t);return e||document.createElement("div")}return t}function Gr(t,e){var n=document.createElement(t);return"select"!==t?n:(e.data&&e.data.attrs&&void 0!==e.data.attrs.multiple&&n.setAttribute("multiple","multiple"),n)}function Kr(t,e){return document.createElementNS(Fr[t],e)}function Xr(t){return document.createTextNode(t)}function Jr(t){return document.createComment(t)}function Yr(t,e,n){t.insertBefore(e,n)}function Zr(t,e){t.removeChild(e)}function Qr(t,e){t.appendChild(e)}function to(t){return t.parentNode}function eo(t){return t.nextSibling}function no(t){return t.tagName}function ro(t,e){t.textContent=e}function oo(t,e){t.setAttribute(e,"")}var io=Object.freeze({createElement:Gr,createElementNS:Kr,createTextNode:Xr,createComment:Jr,insertBefore:Yr,removeChild:Zr,appendChild:Qr,parentNode:to,nextSibling:eo,tagName:no,setTextContent:ro,setStyleScope:oo}),ao={create:function(t,e){so(e)},update:function(t,e){t.data.ref!==e.data.ref&&(so(t,!0),so(e))},destroy:function(t){so(t,!0)}};function so(t,e){var n=t.data.ref;if(o(n)){var r=t.context,i=t.componentInstance||t.elm,a=r.$refs;e?Array.isArray(a[n])?m(a[n],i):a[n]===i&&(a[n]=void 0):t.data.refInFor?Array.isArray(a[n])?a[n].indexOf(i)<0&&a[n].push(i):a[n]=[i]:a[n]=i}}var co=new yt("",{},[]),uo=["create","activate","update","remove","destroy"];function fo(t,e){return t.key===e.key&&(t.tag===e.tag&&t.isComment===e.isComment&&o(t.data)===o(e.data)&&lo(t,e)||i(t.isAsyncPlaceholder)&&t.asyncFactory===e.asyncFactory&&r(e.asyncFactory.error))}function lo(t,e){if("input"!==t.tag)return!0;var n,r=o(n=t.data)&&o(n=n.attrs)&&n.type,i=o(n=e.data)&&o(n=n.attrs)&&n.type;return r===i||Wr(r)&&Wr(i)}function po(t,e,n){var r,i,a={};for(r=e;r<=n;++r)i=t[r].key,o(i)&&(a[i]=r);return a}function vo(t){var e,n,a={},c=t.modules,u=t.nodeOps;for(e=0;eh?(l=r(n[_+1])?null:n[_+1].elm,A(t,l,n,v,_,i)):v>_&&O(t,e,p,h)}function S(t,e,n,r){for(var i=n;i-1?Oo(t,e,n):$r(e)?jr(n)?t.removeAttribute(e):(n="allowfullscreen"===e&&"EMBED"===t.tagName?"true":e,t.setAttribute(e,n)):Or(e)?t.setAttribute(e,jr(n)||"false"===n?"false":"true"):Sr(e)?jr(n)?t.removeAttributeNS(kr,Er(e)):t.setAttributeNS(kr,e,n):Oo(t,e,n)}function Oo(t,e,n){if(jr(n))t.removeAttribute(e);else{if(Z&&!Q&&"TEXTAREA"===t.tagName&&"placeholder"===e&&!t.__ieph){var r=function(e){e.stopImmediatePropagation(),t.removeEventListener("input",r)};t.addEventListener("input",r),t.__ieph=!0}t.setAttribute(e,n)}}var $o={create:Ao,update:Ao};function ko(t,e){var n=e.elm,i=e.data,a=t.data;if(!(r(i.staticClass)&&r(i.class)&&(r(a)||r(a.staticClass)&&r(a.class)))){var s=Ir(e),c=n._transitionClasses;o(c)&&(s=Nr(s,Mr(c))),s!==n._prevClass&&(n.setAttribute("class",s),n._prevClass=s)}}var So,Eo={create:ko,update:ko},jo="__r",Io="__c";function To(t){if(o(t[jo])){var e=Z?"change":"input";t[e]=[].concat(t[jo],t[e]||[]),delete t[jo]}o(t[Io])&&(t.change=[].concat(t[Io],t.change||[]),delete t[Io])}function Po(t,e,n){var r=So;return function o(){var i=t.apply(null,arguments);null!==i&&Mo(e,o,n,r)}}function No(t,e,n,r,o){e=ue(e),n&&(e=Po(e,t,r)),So.addEventListener(t,e,rt?{capture:r,passive:o}:r)}function Mo(t,e,n,r){(r||So).removeEventListener(t,e._withTask||e,n)}function Lo(t,e){if(!r(t.data.on)||!r(e.data.on)){var n=e.data.on||{},o=t.data.on||{};So=e.elm,To(n),me(n,o,No,Mo,e.context),So=void 0}}var Do={create:Lo,update:Lo};function Fo(t,e){if(!r(t.data.domProps)||!r(e.data.domProps)){var n,i,a=e.elm,s=t.data.domProps||{},c=e.data.domProps||{};for(n in o(c.__ob__)&&(c=e.data.domProps=j({},c)),s)r(c[n])&&(a[n]="");for(n in c){if(i=c[n],"textContent"===n||"innerHTML"===n){if(e.children&&(e.children.length=0),i===s[n])continue;1===a.childNodes.length&&a.removeChild(a.childNodes[0])}if("value"===n){a._value=i;var u=r(i)?"":String(i);Ro(a,u)&&(a.value=u)}else a[n]=i}}}function Ro(t,e){return!t.composing&&("OPTION"===t.tagName||Uo(t,e)||Vo(t,e))}function Uo(t,e){var n=!0;try{n=document.activeElement!==t}catch(t){}return n&&t.value!==e}function Vo(t,e){var n=t.value,r=t._vModifiers;if(o(r)){if(r.lazy)return!1;if(r.number)return v(n)!==v(e);if(r.trim)return n.trim()!==e.trim()}return n!==e}var Bo={create:Fo,update:Fo},Ho=b(function(t){var e={},n=/;(?![^(]*\))/g,r=/:(.+)/;return t.split(n).forEach(function(t){if(t){var n=t.split(r);n.length>1&&(e[n[0].trim()]=n[1].trim())}}),e});function zo(t){var e=Wo(t.style);return t.staticStyle?j(t.staticStyle,e):e}function Wo(t){return Array.isArray(t)?I(t):"string"===typeof t?Ho(t):t}function qo(t,e){var n,r={};if(e){var o=t;while(o.componentInstance)o=o.componentInstance._vnode,o&&o.data&&(n=zo(o.data))&&j(r,n)}(n=zo(t.data))&&j(r,n);var i=t;while(i=i.parent)i.data&&(n=zo(i.data))&&j(r,n);return r}var Go,Ko=/^--/,Xo=/\s*!important$/,Jo=function(t,e,n){if(Ko.test(e))t.style.setProperty(e,n);else if(Xo.test(n))t.style.setProperty(e,n.replace(Xo,""),"important");else{var r=Zo(e);if(Array.isArray(n))for(var o=0,i=n.length;o-1?e.split(/\s+/).forEach(function(e){return t.classList.add(e)}):t.classList.add(e);else{var n=" "+(t.getAttribute("class")||"")+" ";n.indexOf(" "+e+" ")<0&&t.setAttribute("class",(n+e).trim())}}function ni(t,e){if(e&&(e=e.trim()))if(t.classList)e.indexOf(" ")>-1?e.split(/\s+/).forEach(function(e){return t.classList.remove(e)}):t.classList.remove(e),t.classList.length||t.removeAttribute("class");else{var n=" "+(t.getAttribute("class")||"")+" ",r=" "+e+" ";while(n.indexOf(r)>=0)n=n.replace(r," ");n=n.trim(),n?t.setAttribute("class",n):t.removeAttribute("class")}}function ri(t){if(t){if("object"===typeof t){var e={};return!1!==t.css&&j(e,oi(t.name||"v")),j(e,t),e}return"string"===typeof t?oi(t):void 0}}var oi=b(function(t){return{enterClass:t+"-enter",enterToClass:t+"-enter-to",enterActiveClass:t+"-enter-active",leaveClass:t+"-leave",leaveToClass:t+"-leave-to",leaveActiveClass:t+"-leave-active"}}),ii=K&&!Q,ai="transition",si="animation",ci="transition",ui="transitionend",fi="animation",li="animationend";ii&&(void 0===window.ontransitionend&&void 0!==window.onwebkittransitionend&&(ci="WebkitTransition",ui="webkitTransitionEnd"),void 0===window.onanimationend&&void 0!==window.onwebkitanimationend&&(fi="WebkitAnimation",li="webkitAnimationEnd"));var pi=K?window.requestAnimationFrame?window.requestAnimationFrame.bind(window):setTimeout:function(t){return t()};function di(t){pi(function(){pi(t)})}function vi(t,e){var n=t._transitionClasses||(t._transitionClasses=[]);n.indexOf(e)<0&&(n.push(e),ei(t,e))}function hi(t,e){t._transitionClasses&&m(t._transitionClasses,e),ni(t,e)}function yi(t,e,n){var r=_i(t,e),o=r.type,i=r.timeout,a=r.propCount;if(!o)return n();var s=o===ai?ui:li,c=0,u=function(){t.removeEventListener(s,f),n()},f=function(e){e.target===t&&++c>=a&&u()};setTimeout(function(){c0&&(n=ai,f=a,l=i.length):e===si?u>0&&(n=si,f=u,l=c.length):(f=Math.max(a,u),n=f>0?a>u?ai:si:null,l=n?n===ai?i.length:c.length:0);var p=n===ai&&mi.test(r[ci+"Property"]);return{type:n,timeout:f,propCount:l,hasTransform:p}}function gi(t,e){while(t.length1}function Oi(t,e){!0!==e.data.show&&wi(e)}var $i=K?{create:Oi,activate:Oi,remove:function(t,e){!0!==t.data.show?xi(t,e):e()}}:{},ki=[$o,Eo,Do,Bo,ti,$i],Si=ki.concat(xo),Ei=vo({nodeOps:io,modules:Si});Q&&document.addEventListener("selectionchange",function(){var t=document.activeElement;t&&t.vmodel&&Di(t,"input")});var ji={inserted:function(t,e,n,r){"select"===n.tag?(r.elm&&!r.elm._vOptions?_e(n,"postpatch",function(){ji.componentUpdated(t,e,n)}):Ii(t,e,n.context),t._vOptions=[].map.call(t.options,Ni)):("textarea"===n.tag||Wr(t.type))&&(t._vModifiers=e.modifiers,e.modifiers.lazy||(t.addEventListener("compositionstart",Mi),t.addEventListener("compositionend",Li),t.addEventListener("change",Li),Q&&(t.vmodel=!0)))},componentUpdated:function(t,e,n){if("select"===n.tag){Ii(t,e,n.context);var r=t._vOptions,o=t._vOptions=[].map.call(t.options,Ni);if(o.some(function(t,e){return!M(t,r[e])})){var i=t.multiple?e.value.some(function(t){return Pi(t,o)}):e.value!==e.oldValue&&Pi(e.value,o);i&&Di(t,"change")}}}};function Ii(t,e,n){Ti(t,e,n),(Z||tt)&&setTimeout(function(){Ti(t,e,n)},0)}function Ti(t,e,n){var r=e.value,o=t.multiple;if(!o||Array.isArray(r)){for(var i,a,s=0,c=t.options.length;s-1,a.selected!==i&&(a.selected=i);else if(M(Ni(a),r))return void(t.selectedIndex!==s&&(t.selectedIndex=s));o||(t.selectedIndex=-1)}}function Pi(t,e){return e.every(function(e){return!M(e,t)})}function Ni(t){return"_value"in t?t._value:t.value}function Mi(t){t.target.composing=!0}function Li(t){t.target.composing&&(t.target.composing=!1,Di(t.target,"input"))}function Di(t,e){var n=document.createEvent("HTMLEvents");n.initEvent(e,!0,!0),t.dispatchEvent(n)}function Fi(t){return!t.componentInstance||t.data&&t.data.transition?t:Fi(t.componentInstance._vnode)}var Ri={bind:function(t,e,n){var r=e.value;n=Fi(n);var o=n.data&&n.data.transition,i=t.__vOriginalDisplay="none"===t.style.display?"":t.style.display;r&&o?(n.data.show=!0,wi(n,function(){t.style.display=i})):t.style.display=r?i:"none"},update:function(t,e,n){var r=e.value,o=e.oldValue;if(!r!==!o){n=Fi(n);var i=n.data&&n.data.transition;i?(n.data.show=!0,r?wi(n,function(){t.style.display=t.__vOriginalDisplay}):xi(n,function(){t.style.display="none"})):t.style.display=r?t.__vOriginalDisplay:"none"}},unbind:function(t,e,n,r,o){o||(t.style.display=t.__vOriginalDisplay)}},Ui={model:ji,show:Ri},Vi={name:String,appear:Boolean,css:Boolean,mode:String,type:String,enterClass:String,leaveClass:String,enterToClass:String,leaveToClass:String,enterActiveClass:String,leaveActiveClass:String,appearClass:String,appearActiveClass:String,appearToClass:String,duration:[Number,String,Object]};function Bi(t){var e=t&&t.componentOptions;return e&&e.Ctor.options.abstract?Bi(Ee(e.children)):t}function Hi(t){var e={},n=t.$options;for(var r in n.propsData)e[r]=t[r];var o=n._parentListeners;for(var i in o)e[x(i)]=o[i];return e}function zi(t,e){if(/\d-keep-alive$/.test(e.tag))return t("keep-alive",{props:e.componentOptions.propsData})}function Wi(t){while(t=t.parent)if(t.data.transition)return!0}function qi(t,e){return e.key===t.key&&e.tag===t.tag}var Gi={name:"transition",props:Vi,abstract:!0,render:function(t){var e=this,n=this.$slots.default;if(n&&(n=n.filter(function(t){return t.tag||Se(t)}),n.length)){0;var r=this.mode;0;var o=n[0];if(Wi(this.$vnode))return o;var i=Bi(o);if(!i)return o;if(this._leaving)return zi(t,o);var a="__transition-"+this._uid+"-";i.key=null==i.key?i.isComment?a+"comment":a+i.tag:s(i.key)?0===String(i.key).indexOf(a)?i.key:a+i.key:i.key;var c=(i.data||(i.data={})).transition=Hi(this),u=this._vnode,f=Bi(u);if(i.data.directives&&i.data.directives.some(function(t){return"show"===t.name})&&(i.data.show=!0),f&&f.data&&!qi(i,f)&&!Se(f)&&(!f.componentInstance||!f.componentInstance._vnode.isComment)){var l=f.data.transition=j({},c);if("out-in"===r)return this._leaving=!0,_e(l,"afterLeave",function(){e._leaving=!1,e.$forceUpdate()}),zi(t,o);if("in-out"===r){if(Se(i))return u;var p,d=function(){p()};_e(c,"afterEnter",d),_e(c,"enterCancelled",d),_e(l,"delayLeave",function(t){p=t})}}return o}}},Ki=j({tag:String,moveClass:String},Vi);delete Ki.mode;var Xi={props:Ki,render:function(t){for(var e=this.tag||this.$vnode.data.tag||"span",n=Object.create(null),r=this.prevChildren=this.children,o=this.$slots.default||[],i=this.children=[],a=Hi(this),s=0;s0?r:n)(t)}},4630:function(t,e){t.exports=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}}},"4a59":function(t,e,n){var r=n("9b43"),o=n("1fa8"),i=n("33a4"),a=n("cb7c"),s=n("9def"),c=n("27ee"),u={},f={};e=t.exports=function(t,e,n,l,p){var d,v,h,y,m=p?function(){return t}:c(t),_=r(n,l,e?2:1),g=0;if("function"!=typeof m)throw TypeError(t+" is not iterable!");if(i(m)){for(d=s(t.length);d>g;g++)if(y=e?_(a(v=t[g])[0],v[1]):_(t[g]),y===u||y===f)return y}else for(h=m.call(t);!(v=h.next()).done;)if(y=o(h,_,v.value,e),y===u||y===f)return y};e.BREAK=u,e.RETURN=f},"4bf8":function(t,e,n){var r=n("be13");t.exports=function(t){return Object(r(t))}},"52a7":function(t,e){e.f={}.propertyIsEnumerable},"551c":function(t,e,n){"use strict";var r,o,i,a,s=n("2d00"),c=n("7726"),u=n("9b43"),f=n("23c6"),l=n("5ca1"),p=n("d3f4"),d=n("d8e8"),v=n("f605"),h=n("4a59"),y=n("ebd6"),m=n("1991").set,_=n("8079")(),g=n("a5b8"),b=n("9c80"),w=n("a25f"),x=n("bcaa"),A="Promise",C=c.TypeError,O=c.process,$=O&&O.versions,k=$&&$.v8||"",S=c[A],E="process"==f(O),j=function(){},I=o=g.f,T=!!function(){try{var t=S.resolve(1),e=(t.constructor={})[n("2b4c")("species")]=function(t){t(j,j)};return(E||"function"==typeof PromiseRejectionEvent)&&t.then(j)instanceof e&&0!==k.indexOf("6.6")&&-1===w.indexOf("Chrome/66")}catch(t){}}(),P=function(t){var e;return!(!p(t)||"function"!=typeof(e=t.then))&&e},N=function(t,e){if(!t._n){t._n=!0;var n=t._c;_(function(){var r=t._v,o=1==t._s,i=0,a=function(e){var n,i,a,s=o?e.ok:e.fail,c=e.resolve,u=e.reject,f=e.domain;try{s?(o||(2==t._h&&D(t),t._h=1),!0===s?n=r:(f&&f.enter(),n=s(r),f&&(f.exit(),a=!0)),n===e.promise?u(C("Promise-chain cycle")):(i=P(n))?i.call(n,c,u):c(n)):u(r)}catch(t){f&&!a&&f.exit(),u(t)}};while(n.length>i)a(n[i++]);t._c=[],t._n=!1,e&&!t._h&&M(t)})}},M=function(t){m.call(c,function(){var e,n,r,o=t._v,i=L(t);if(i&&(e=b(function(){E?O.emit("unhandledRejection",o,t):(n=c.onunhandledrejection)?n({promise:t,reason:o}):(r=c.console)&&r.error&&r.error("Unhandled promise rejection",o)}),t._h=E||L(t)?2:1),t._a=void 0,i&&e.e)throw e.v})},L=function(t){return 1!==t._h&&0===(t._a||t._c).length},D=function(t){m.call(c,function(){var e;E?O.emit("rejectionHandled",t):(e=c.onrejectionhandled)&&e({promise:t,reason:t._v})})},F=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()),N(e,!0))},R=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=P(t))?_(function(){var r={_w:n,_d:!1};try{e.call(t,u(R,r,1),u(F,r,1))}catch(t){F.call(r,t)}}):(n._v=t,n._s=1,N(n,!1))}catch(t){F.call({_w:n,_d:!1},t)}}};T||(S=function(t){v(this,S,A,"_h"),d(t),r.call(this);try{t(u(R,this,1),u(F,this,1))}catch(t){F.call(this,t)}},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")(S.prototype,{then:function(t,e){var n=I(y(this,S));return n.ok="function"!=typeof t||t,n.fail="function"==typeof e&&e,n.domain=E?O.domain:void 0,this._c.push(n),this._a&&this._a.push(n),this._s&&N(this,!1),n.promise},catch:function(t){return this.then(void 0,t)}}),i=function(){var t=new r;this.promise=t,this.resolve=u(R,t,1),this.reject=u(F,t,1)},g.f=I=function(t){return t===S||t===a?new i(t):o(t)}),l(l.G+l.W+l.F*!T,{Promise:S}),n("7f20")(S,A),n("7a56")(A),a=n("8378")[A],l(l.S+l.F*!T,A,{reject:function(t){var e=I(this),n=e.reject;return n(t),e.promise}}),l(l.S+l.F*(s||!T),A,{resolve:function(t){return x(s&&this===a?S:this,t)}}),l(l.S+l.F*!(T&&n("5cc5")(function(t){S.all(t)["catch"](j)})),A,{all:function(t){var e=this,n=I(e),r=n.resolve,o=n.reject,i=b(function(){var n=[],i=0,a=1;h(t,!1,function(t){var s=i++,c=!1;n.push(void 0),a++,e.resolve(t).then(function(t){c||(c=!0,n[s]=t,--a||r(n))},o)}),--a||r(n)});return i.e&&o(i.v),n.promise},race:function(t){var e=this,n=I(e),r=n.reject,o=b(function(){h(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__",a=o[i]||(o[i]={});(t.exports=function(t,e){return a[t]||(a[t]=void 0!==e?e:{})})("versions",[]).push({version:r.version,mode:n("2d00")?"pure":"global",copyright:"© 2018 Denis Pushkarev (zloirock.ru)"})},"5ca1":function(t,e,n){var r=n("7726"),o=n("8378"),i=n("32e9"),a=n("2aba"),s=n("9b43"),c="prototype",u=function(t,e,n){var f,l,p,d,v=t&u.F,h=t&u.G,y=t&u.S,m=t&u.P,_=t&u.B,g=h?r:y?r[e]||(r[e]={}):(r[e]||{})[c],b=h?o:o[e]||(o[e]={}),w=b[c]||(b[c]={});for(f in h&&(n=e),n)l=!v&&g&&void 0!==g[f],p=(l?g:n)[f],d=_&&l?s(p,r):m&&"function"==typeof p?s(Function.call,p):p,g&&a(g,f,p,t&u.U),b[f]!=p&&i(b,f,d),m&&w[f]!=p&&(w[f]=p)};r.core=o,u.F=1,u.G=2,u.S=4,u.P=8,u.B=16,u.W=32,u.U=64,u.R=128,t.exports=u},"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(t){}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(t){}return n}},"5dbc":function(t,e,n){var r=n("d3f4"),o=n("8b97").set;t.exports=function(t,e,n){var i,a=e.constructor;return a!==n&&"function"==typeof a&&(i=a.prototype)!==n.prototype&&r(i)&&o&&o(t,i),t}},"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)}},6821:function(t,e,n){var r=n("626a"),o=n("be13");t.exports=function(t){return r(o(t))}},"69a8":function(t,e){var n={}.hasOwnProperty;t.exports=function(t,e){return n.call(t,e)}},"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")}},7333:function(t,e,n){"use strict";var r=n("0d58"),o=n("2621"),i=n("52a7"),a=n("4bf8"),s=n("626a"),c=Object.assign;t.exports=!c||n("79e5")(function(){var t={},e={},n=Symbol(),r="abcdefghijklmnopqrst";return t[n]=7,r.split("").forEach(function(t){e[t]=t}),7!=c({},t)[n]||Object.keys(c({},e)).join("")!=r})?function(t,e){var n=a(t),c=arguments.length,u=1,f=o.f,l=i.f;while(c>u){var p,d=s(arguments[u++]),v=f?r(d).concat(f(d)):r(d),h=v.length,y=0;while(h>y)l.call(d,p=v[y++])&&(n[p]=d[p])}return n}:c},7514:function(t,e,n){"use strict";var r=n("5ca1"),o=n("0a49")(5),i="find",a=!0;i in[]&&Array(1)[i](function(){a=!1}),r(r.P+r.F*a,"Array",{find:function(t){return o(this,t,arguments.length>1?arguments[1]:void 0)}}),n("9c6c")(i)},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)},"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)}},"79e5":function(t,e){t.exports=function(t){try{return!!t()}catch(t){return!0}}},"7a56":function(t,e,n){"use strict";var r=n("7726"),o=n("86cc"),i=n("9e1e"),a=n("2b4c")("species");t.exports=function(t){var e=r[t];i&&e&&!e[a]&&o.f(e,a,{configurable:!0,get:function(){return this}})}},"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})}},8079:function(t,e,n){var r=n("7726"),o=n("1991").set,i=r.MutationObserver||r.WebKitMutationObserver,a=r.process,s=r.Promise,c="process"==n("2d95")(a);t.exports=function(){var t,e,n,u=function(){var r,o;c&&(r=a.domain)&&r.exit();while(t){o=t.fn,t=t.next;try{o()}catch(r){throw t?n():e=void 0,r}}e=void 0,r&&r.enter()};if(c)n=function(){a.nextTick(u)};else if(!i||r.navigator&&r.navigator.standalone)if(s&&s.resolve){var f=s.resolve(void 0);n=function(){f.then(u)}}else n=function(){o.call(r,u)};else{var l=!0,p=document.createTextNode("");new i(u).observe(p,{characterData:!0}),n=function(){p.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.5.7"};"number"==typeof __e&&(__e=n)},"84f2":function(t,e){t.exports={}},"86cc":function(t,e,n){var r=n("cb7c"),o=n("c69a"),i=n("6a99"),a=Object.defineProperty;e.f=n("9e1e")?Object.defineProperty:function(t,e,n){if(r(t),e=i(e,!0),r(n),o)try{return a(t,e,n)}catch(t){}if("get"in n||"set"in n)throw TypeError("Accessors not supported!");return"value"in n&&(t[e]=n.value),t}},"8afe":function(t,e,n){"use strict";function r(t){if(Array.isArray(t)){for(var e=0,n=new Array(t.length);e0?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})},a25f:function(t,e,n){var r=n("7726"),o=r.navigator;t.exports=o&&o.userAgent||""},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)}},aa77:function(t,e,n){var r=n("5ca1"),o=n("be13"),i=n("79e5"),a=n("fdef"),s="["+a+"]",c="
",u=RegExp("^"+s+s+"*"),f=RegExp(s+s+"*$"),l=function(t,e,n){var o={},s=i(function(){return!!a[t]()||c[t]()!=c}),u=o[t]=s?e(p):a[t];n&&(o[n]=u),r(r.P+r.F*s,"String",o)},p=l.trim=function(t,e){return t=String(o(t)),1&e&&(t=t.replace(u,"")),2&e&&(t=t.replace(f,"")),t};t.exports=l},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),a=n.resolve;return a(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}},c366:function(t,e,n){var r=n("6821"),o=n("9def"),i=n("77f1");t.exports=function(t){return function(e,n,a){var s,c=r(e),u=o(c.length),f=i(a,u);if(t&&n!=n){while(u>f)if(s=c[f++],s!=s)return!0}else for(;u>f;f++)if((t||f in c)&&c[f]===n)return t||f||0;return!t&&-1}}},c5f6:function(t,e,n){"use strict";var r=n("7726"),o=n("69a8"),i=n("2d95"),a=n("5dbc"),s=n("6a99"),c=n("79e5"),u=n("9093").f,f=n("11e9").f,l=n("86cc").f,p=n("aa77").trim,d="Number",v=r[d],h=v,y=v.prototype,m=i(n("2aeb")(y))==d,_="trim"in String.prototype,g=function(t){var e=s(t,!1);if("string"==typeof e&&e.length>2){e=_?e.trim():p(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 a,c=e.slice(2),u=0,f=c.length;uo)return NaN;return parseInt(c,r)}}return+e};if(!v(" 0o1")||!v("0b1")||v("+0x1")){v=function(t){var e=arguments.length<1?0:t,n=this;return n instanceof v&&(m?c(function(){y.valueOf.call(n)}):i(n)!=d)?a(new h(g(e)),n,v):g(e)};for(var b,w=n("9e1e")?u(h):"MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,isFinite,isInteger,isNaN,isSafeInteger,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,parseFloat,parseInt,isInteger".split(","),x=0;w.length>x;x++)o(h,b=w[x])&&!o(v,b)&&l(v,b,f(h,b));v.prototype=y,y.constructor=v,n("2aba")(r,d,v)}},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})},c8ba:function(t,e){var n;n=function(){return this}();try{n=n||Function("return this")()||(0,eval)("this")}catch(t){"object"===typeof window&&(n=window)}t.exports=n},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"),a=n("6821");t.exports=n("01f9")(Array,"Array",function(t,e){this._t=a(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}},cd1c:function(t,e,n){var r=n("e853");t.exports=function(t,e){return new(r(t))(e)}},ce10:function(t,e,n){var r=n("69a8"),o=n("6821"),i=n("c366")(!1),a=n("613b")("IE_PROTO");t.exports=function(t,e){var n,s=o(t),c=0,u=[];for(n in s)n!=a&&r(s,n)&&u.push(n);while(e.length>c)r(s,n=e[c++])&&(~i(u,n)||u.push(n));return u}},d3f4:function(t,e){t.exports=function(t){return"object"===typeof t?null!==t:"function"===typeof t}},d53b:function(t,e){t.exports=function(t,e){return{value:e,done:!!t}}},d8e8:function(t,e){t.exports=function(t){if("function"!=typeof t)throw TypeError(t+" is not a function!");return t}},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(",")},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,a=r(t).constructor;return void 0===a||void 0==(n=r(a)[i])?e:o(n)}},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}},f751:function(t,e,n){var r=n("5ca1");r(r.S+r.F,"Object",{assign:n("7333")})},fab2:function(t,e,n){var r=n("7726").document;t.exports=r&&r.documentElement},fdef:function(t,e){t.exports="\t\n\v\f\r \u2028\u2029\ufeff"}}]);
//# sourceMappingURL=chunk-vendors.063ae98f.js.map
================================================
FILE: package.json
================================================
{
"name": "vue-simple-flowchart",
"version": "0.1.8",
"private": false,
"main": "./dist/vue-flowchart.common.js",
"files": [
"dist"
],
"scripts": {
"serve": "vue-cli-service serve",
"build": "vue-cli-service build --dest demo",
"lint": "vue-cli-service lint",
"build:bundle": "vue-cli-service build --target lib --name vue-flowchart ./src/index.js"
},
"license": "MIT",
"dependencies": {
"vue": "^2.5.17"
},
"devDependencies": {
"@vue/cli-plugin-babel": "^3.0.0",
"@vue/cli-plugin-eslint": "^3.0.0",
"@vue/cli-service": "^3.0.0",
"node-sass": "^4.9.3",
"sass-loader": "^7.1.0",
"vue-template-compiler": "^2.5.17"
},
"eslintConfig": {
"root": true,
"env": {
"node": true
},
"extends": [
"plugin:vue/essential",
"eslint:recommended"
],
"rules": {},
"parserOptions": {
"parser": "babel-eslint"
}
},
"postcss": {
"plugins": {
"autoprefixer": {}
}
},
"browserslist": [
"> 1%",
"last 2 versions",
"not ie <= 8"
],
"repository": {
"type": "git",
"url": "https://github.com/Jeffreyrn/vue-simple-flowchart"
}
}
================================================
FILE: public/index.html
================================================
vue-simple-flowchart
We're sorry but vue-simple-flowchart doesn't work properly without JavaScript enabled. Please enable it to continue.
================================================
FILE: src/App.vue
================================================
================================================
FILE: src/assets/utilty/position.js
================================================
/**
* @param element {HTMLElement}
* @return {{top: number, left: number}}
*/
function getOffsetRect (element) {
let box = element.getBoundingClientRect()
let scrollTop = window.pageYOffset
let scrollLeft = window.pageXOffset
let top = box.top + scrollTop
let left = box.left + scrollLeft
return {top: Math.round(top), left: Math.round(left)}
}
/**
* @param event {MouseEvent}
* @param element {HTMLElement}
* @return {{x: number, y: number}}
*/
function getMousePosition (element, event) {
let mouseX = event.pageX || event.clientX + document.documentElement.scrollLeft
let mouseY = event.pageY || event.clientY + document.documentElement.scrollTop
let offset = getOffsetRect(element)
let x = mouseX - offset.left
let y = mouseY - offset.top
return [x, y];
}
export {
getMousePosition, getOffsetRect
}
================================================
FILE: src/components/FlowchartLink.vue
================================================
×
================================================
FILE: src/components/FlowchartNode.vue
================================================
================================================
FILE: src/components/SimpleFlowchart.vue
================================================
================================================
FILE: src/index.js
================================================
import SimpleFlowchart from './components/SimpleFlowchart.vue'
export default SimpleFlowchart;
================================================
FILE: src/main.js
================================================
import Vue from 'vue'
import App from './App.vue'
Vue.config.productionTip = false
new Vue({
render: h => h(App)
}).$mount('#app')
================================================
FILE: vue.config.js
================================================
module.exports = {
baseUrl: './'
// options...
}