├── static
└── .gitkeep
├── .eslintignore
├── src
├── store
│ ├── actions.js
│ ├── mutations.js
│ ├── index.js
│ └── modules
│ │ └── loading.js
├── assets
│ └── logo.png
├── components
│ ├── x-button.vue
│ ├── loading.vue
│ ├── loadingWithOutVuex.vue
│ └── loadingWithVuex.vue
├── main.js
└── App.vue
├── config
├── prod.env.js
├── dev.env.js
└── index.js
├── .gitignore
├── .editorconfig
├── docs
├── static
│ ├── css
│ │ └── app.dfca11727ccf9e74f393b0c223db19ce.css
│ └── js
│ │ ├── manifest.5245d5fb1d3f319cf350.js
│ │ ├── app.2c5afad0c2e462d97152.js
│ │ └── vendor.37265a6f0fb0a24ab606.js
└── index.html
├── .postcssrc.js
├── .babelrc
├── index.html
├── README.md
├── .eslintrc.js
├── LICENSE
└── package.json
/static/.gitkeep:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/.eslintignore:
--------------------------------------------------------------------------------
1 | build/*.js
2 | config/*.js
3 |
--------------------------------------------------------------------------------
/src/store/actions.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | }
3 |
--------------------------------------------------------------------------------
/src/store/mutations.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | }
3 |
--------------------------------------------------------------------------------
/config/prod.env.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | NODE_ENV: '"production"'
3 | }
4 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | .DS_Store
2 | node_modules/
3 | npm-debug.log*
4 | yarn-debug.log*
5 | yarn-error.log*
6 |
--------------------------------------------------------------------------------
/src/assets/logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/deboyblog/vue-vuex-loading/HEAD/src/assets/logo.png
--------------------------------------------------------------------------------
/config/dev.env.js:
--------------------------------------------------------------------------------
1 | var merge = require('webpack-merge')
2 | var prodEnv = require('./prod.env')
3 |
4 | module.exports = merge(prodEnv, {
5 | NODE_ENV: '"development"'
6 | })
7 |
--------------------------------------------------------------------------------
/.editorconfig:
--------------------------------------------------------------------------------
1 | root = true
2 |
3 | [*]
4 | charset = utf-8
5 | indent_style = space
6 | indent_size = 2
7 | end_of_line = lf
8 | insert_final_newline = true
9 | trim_trailing_whitespace = true
10 |
--------------------------------------------------------------------------------
/docs/static/css/app.dfca11727ccf9e74f393b0c223db19ce.css:
--------------------------------------------------------------------------------
1 | #app{font-family:Avenir,Helvetica,Arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-align:center;color:#2c3e50;margin-top:60px}
--------------------------------------------------------------------------------
/.postcssrc.js:
--------------------------------------------------------------------------------
1 | // https://github.com/michael-ciniawsky/postcss-load-config
2 |
3 | module.exports = {
4 | "plugins": {
5 | // to edit target browsers: use "browserlist" field in package.json
6 | "autoprefixer": {}
7 | }
8 | }
9 |
--------------------------------------------------------------------------------
/.babelrc:
--------------------------------------------------------------------------------
1 | {
2 | "presets": [
3 | ["env", { "modules": false }],
4 | "stage-2"
5 | ],
6 | "plugins": ["transform-runtime"],
7 | "comments": false,
8 | "env": {
9 | "test": {
10 | "presets": ["env", "stage-2"],
11 | "plugins": [ "istanbul" ]
12 | }
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | vue-vuex-loading
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/src/components/x-button.vue:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
20 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # vue-vuex-loading
2 |
3 | > 使用vuex达到最合理的控制loading
4 | [demo](https://deboyblog.github.io/vue-vuex-loading/)
5 | ## Build Setup
6 |
7 | ``` bash
8 | # install dependencies
9 | npm install
10 |
11 | # serve with hot reload at localhost:8080
12 | npm run dev
13 |
14 | # build for production with minification
15 | npm run build
16 |
17 | # build for production and view the bundle analyzer report
18 | npm run build --report
19 | ```
20 |
--------------------------------------------------------------------------------
/src/store/index.js:
--------------------------------------------------------------------------------
1 | /**
2 | * Created by Deboy on 2016/10/12.
3 | */
4 | import Vue from 'vue'
5 | import Vuex from 'vuex'
6 | // modules
7 | import loading from './modules/loading'
8 | // global actions
9 | import actions from './actions'
10 | // global mutations
11 | import mutations from './mutations'
12 | Vue.use(Vuex)
13 | export default new Vuex.Store({
14 | actions,
15 | mutations,
16 | modules: {
17 | loading
18 | }
19 | })
20 |
--------------------------------------------------------------------------------
/src/components/loading.vue:
--------------------------------------------------------------------------------
1 |
2 |
11 |
12 |
17 |
--------------------------------------------------------------------------------
/docs/index.html:
--------------------------------------------------------------------------------
1 | vue-vuex-loading
--------------------------------------------------------------------------------
/src/main.js:
--------------------------------------------------------------------------------
1 | // The Vue build version to load with the `import` command
2 | // (runtime-only or standalone) has been set in webpack.base.conf with an alias.
3 | import Vue from 'vue'
4 | import App from './App'
5 | import store from './store'
6 |
7 | import Loading from './components/loading.vue'
8 | import XButton from './components/x-button.vue'
9 |
10 | Vue.component('Loading', Loading)
11 | Vue.component('XButton', XButton)
12 |
13 | Vue.config.productionTip = false
14 |
15 | /* eslint-disable no-new */
16 | new Vue({
17 | el: '#app',
18 | store,
19 | template: ' ',
20 | components: { App }
21 | })
22 |
--------------------------------------------------------------------------------
/.eslintrc.js:
--------------------------------------------------------------------------------
1 | // http://eslint.org/docs/user-guide/configuring
2 |
3 | module.exports = {
4 | root: true,
5 | parser: 'babel-eslint',
6 | parserOptions: {
7 | sourceType: 'module'
8 | },
9 | env: {
10 | browser: true,
11 | },
12 | // https://github.com/feross/standard/blob/master/RULES.md#javascript-standard-style
13 | extends: 'standard',
14 | // required to lint *.vue files
15 | plugins: [
16 | 'html'
17 | ],
18 | // add your custom rules here
19 | 'rules': {
20 | // allow paren-less arrow functions
21 | 'arrow-parens': 0,
22 | // allow async-await
23 | 'generator-star-spacing': 0,
24 | // allow debugger during development
25 | 'no-debugger': process.env.NODE_ENV === 'production' ? 2 : 0
26 | }
27 | }
28 |
--------------------------------------------------------------------------------
/src/App.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
19 |
20 |
30 |
--------------------------------------------------------------------------------
/src/store/modules/loading.js:
--------------------------------------------------------------------------------
1 | /**
2 | * Created by hy on 2017/3/10.
3 | */
4 | const state = {
5 | loadingList: []
6 | }
7 |
8 | const mutations = {
9 | PUSH_LOADING (state, playload) {
10 | state.loadingList.push({text: playload || '玩命加载中...'})
11 | },
12 | SHIFT_LOADING (state) {
13 | state.loadingList.shift()
14 | }
15 | }
16 | const getters = {
17 | isLoading (state) {
18 | return state.loadingList.length > 0
19 | },
20 | loadingText (state) {
21 | return state.loadingList.length > 0 ? state.loadingList[0].text : null
22 | }
23 | }
24 | const actions = {
25 | openLoading (contaxt, playload) {
26 | contaxt.commit('PUSH_LOADING', playload)
27 | },
28 | closeLoading (contaxt) {
29 | contaxt.commit('SHIFT_LOADING')
30 | }
31 | }
32 | module.exports = {
33 | state,
34 | mutations,
35 | getters,
36 | actions
37 | }
38 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2017 Deboy
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 |
--------------------------------------------------------------------------------
/docs/static/js/manifest.5245d5fb1d3f319cf350.js:
--------------------------------------------------------------------------------
1 | !function(e){function r(n){if(t[n])return t[n].exports;var o=t[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}var n=window.webpackJsonp;window.webpackJsonp=function(t,a,c){for(var i,u,f,s=0,l=[];s
2 |
3 |
4 | 普通loading
5 |
6 |
7 |
PushLoading
8 |
9 | count: {{count}}
10 |
11 |
12 | 这种是没有用vuex来控制的 在5秒内点击多次(计数器数到 2 3 4都可以点一下) 内容是最新的 但是结束时间却不是以最后一次为准 这是一般toast/loading的缺陷
13 | 比如在发送 HTTP 请求的时候 一个请求 一次 loading
14 | 那么 假如同一时段内发送了 两次或者两次以上的请求 那么就会在最先完成http请求之后关闭了 导致后来发起的请求 loading 状态也被改变了 并且这时候的toast/loading已经被关闭了
15 |
16 |
17 |
18 |
57 |
--------------------------------------------------------------------------------
/config/index.js:
--------------------------------------------------------------------------------
1 | // see http://vuejs-templates.github.io/webpack for documentation.
2 | var path = require('path')
3 |
4 | module.exports = {
5 | build: {
6 | env: require('./prod.env'),
7 | index: path.resolve(__dirname, '../docs/index.html'),
8 | assetsRoot: path.resolve(__dirname, '../docs'),
9 | assetsSubDirectory: 'static',
10 | assetsPublicPath: './',
11 | productionSourceMap: false,
12 | // Gzip off by default as many popular static hosts such as
13 | // Surge or Netlify already gzip all static assets for you.
14 | // Before setting to `true`, make sure to:
15 | // npm install --save-dev compression-webpack-plugin
16 | productionGzip: false,
17 | productionGzipExtensions: ['js', 'css'],
18 | // Run the build command with an extra argument to
19 | // View the bundle analyzer report after build finishes:
20 | // `npm run build --report`
21 | // Set to `true` or `false` to always turn it on or off
22 | bundleAnalyzerReport: process.env.npm_config_report
23 | },
24 | dev: {
25 | env: require('./dev.env'),
26 | port: 8080,
27 | autoOpenBrowser: true,
28 | assetsSubDirectory: 'static',
29 | assetsPublicPath: '/',
30 | proxyTable: {},
31 | // CSS Sourcemaps off by default because relative paths are "buggy"
32 | // with this option, according to the CSS-Loader README
33 | // (https://github.com/webpack/css-loader#sourcemaps)
34 | // In our experience, they generally work as expected,
35 | // just be aware of this issue when enabling this option.
36 | cssSourceMap: false
37 | }
38 | }
39 |
--------------------------------------------------------------------------------
/src/components/loadingWithVuex.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | 使用vuex控制的loading
5 |
6 |
7 |
PushLoading
8 |
9 | count: {{count}}
10 |
11 |
12 | 使用相同方法测试这个loading会发现是以最后一次点击 + 5s 结束的 因为是以队列的形式来记录loading的
13 | 这个demo只是以一个简单的list来记录loading 进一步思考
14 | 我如果返回了uuid 那岂不是 可以关闭指定的队列中的loading项 达到精准控制? 更好玩等待你们挖掘
15 |
16 |
17 |
18 |
58 |
--------------------------------------------------------------------------------
/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "vue-vuex-loading",
3 | "version": "1.0.0",
4 | "description": "A Vue.js project",
5 | "author": "Deboy <55631825@qq.com>",
6 | "private": true,
7 | "scripts": {
8 | "dev": "node build/dev-server.js",
9 | "build": "node build/build.js",
10 | "lint": "eslint --ext .js,.vue src"
11 | },
12 | "dependencies": {
13 | "vue": "^2.2.2",
14 | "vuex": "^2.2.1"
15 | },
16 | "devDependencies": {
17 | "autoprefixer": "^6.7.2",
18 | "babel-core": "^6.22.1",
19 | "babel-eslint": "^7.1.1",
20 | "babel-loader": "^6.2.10",
21 | "babel-plugin-transform-runtime": "^6.22.0",
22 | "babel-preset-env": "^1.2.1",
23 | "babel-preset-stage-2": "^6.22.0",
24 | "babel-register": "^6.22.0",
25 | "chalk": "^1.1.3",
26 | "connect-history-api-fallback": "^1.3.0",
27 | "copy-webpack-plugin": "^4.0.1",
28 | "css-loader": "^0.26.1",
29 | "eslint": "^3.14.1",
30 | "eslint-config-standard": "^6.2.1",
31 | "eslint-friendly-formatter": "^2.0.7",
32 | "eslint-loader": "^1.6.1",
33 | "eslint-plugin-html": "^2.0.0",
34 | "eslint-plugin-promise": "^3.4.0",
35 | "eslint-plugin-standard": "^2.0.1",
36 | "eventsource-polyfill": "^0.9.6",
37 | "express": "^4.14.1",
38 | "extract-text-webpack-plugin": "^2.0.0",
39 | "file-loader": "^0.10.0",
40 | "friendly-errors-webpack-plugin": "^1.1.3",
41 | "function-bind": "^1.1.0",
42 | "html-webpack-plugin": "^2.28.0",
43 | "http-proxy-middleware": "^0.17.3",
44 | "opn": "^4.0.2",
45 | "optimize-css-assets-webpack-plugin": "^1.3.0",
46 | "ora": "^1.1.0",
47 | "rimraf": "^2.6.0",
48 | "semver": "^5.3.0",
49 | "url-loader": "^0.5.7",
50 | "vue-loader": "^11.1.4",
51 | "vue-style-loader": "^2.0.0",
52 | "vue-template-compiler": "^2.2.4",
53 | "webpack": "^2.2.1",
54 | "webpack-bundle-analyzer": "^2.2.1",
55 | "webpack-dev-middleware": "^1.10.0",
56 | "webpack-hot-middleware": "^2.16.1",
57 | "webpack-merge": "^2.6.1"
58 | },
59 | "engines": {
60 | "node": ">= 4.0.0",
61 | "npm": ">= 3.0.0"
62 | },
63 | "browserslist": [
64 | "> 1%",
65 | "last 2 versions",
66 | "not ie <= 8"
67 | ]
68 | }
69 |
--------------------------------------------------------------------------------
/docs/static/js/app.2c5afad0c2e462d97152.js:
--------------------------------------------------------------------------------
1 | webpackJsonp([0],[,,function(t,n,e){"use strict";var o=e(1),i=e(24),s=e(8),a=e.n(s),u=e(7),r=e.n(u),c=e(9),l=e.n(c);o.a.use(i.a),n.a=new i.a.Store({actions:r.a,mutations:l.a,modules:{loading:a.a}})},function(t,n,e){e(15);var o=e(0)(e(10),e(22),null,null);t.exports=o.exports},function(t,n,e){var o=e(0)(e(11),e(20),null,null);t.exports=o.exports},function(t,n,e){var o=e(0)(e(14),e(19),null,null);t.exports=o.exports},function(t,n,e){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var o=e(1),i=e(3),s=e.n(i),a=e(2),u=e(4),r=e.n(u),c=e(5),l=e.n(c);o.a.component("Loading",r.a),o.a.component("XButton",l.a),o.a.config.productionTip=!1,new o.a({el:"#app",store:a.a,template:" ",components:{App:s.a}})},function(t,n){t.exports={}},function(t,n){var e={loadingList:[]},o={PUSH_LOADING:function(t,n){t.loadingList.push({text:n||"玩命加载中..."})},SHIFT_LOADING:function(t){t.loadingList.shift()}},i={isLoading:function(t){return t.loadingList.length>0},loadingText:function(t){return t.loadingList.length>0?t.loadingList[0].text:null}},s={openLoading:function(t,n){t.commit("PUSH_LOADING",n)},closeLoading:function(t){t.commit("SHIFT_LOADING")}};t.exports={state:e,mutations:o,getters:i,actions:s}},function(t,n){t.exports={}},function(t,n,e){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var o=e(16),i=e.n(o),s=e(17),a=e.n(s);n.default={name:"app",components:{loadingWithOutVuex:i.a,loadingWithVuex:a.a}}},function(t,n,e){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.default={props:["show","text"]}},function(t,n,e){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.default={components:{},data:function(){return{loading:{show:!1,text:"加载中..."},count:0,countUp:null}},watch:{"loading.show":function(t){var n=this;t?(this.count=1,this.countUp=setInterval(function(){n.count+=1},1e3)):clearInterval(this.countUp)}},methods:{pushLoading:function(){var t=this;this.loading={show:!0,text:"加载中..."+Math.random().toFixed(4)},setTimeout(function(){t.loading.show=!1},5e3)}}}},function(t,n,e){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.default={components:{},data:function(){return{count:0,countUp:null}},computed:{loading:function(){return{show:this.$store.getters.isLoading,text:this.$store.getters.loadingText}}},watch:{"loading.show":function(t){var n=this;t?(this.count=1,this.countUp=setInterval(function(){n.count+=1},1e3)):clearInterval(this.countUp)}},methods:{pushLoading:function(){var t=this;this.$store.dispatch("openLoading","加载中..."+Math.random().toFixed(4)),setTimeout(function(){t.$store.dispatch("closeLoading")},5e3)}}}},function(t,n,e){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.default={props:{type:{type:String,default:function(){return"primary"}}}}},function(t,n){},function(t,n,e){var o=e(0)(e(12),e(18),null,null);t.exports=o.exports},function(t,n,e){var o=e(0)(e(13),e(21),null,null);t.exports=o.exports},function(t,n){t.exports={render:function(){var t=this,n=t.$createElement,e=t._self._c||n;return e("div",[e("p",[t._v("\n 普通loading\n ")]),t._v(" "),e("loading",{attrs:{show:t.loading.show,text:t.loading.text}}),t._v(" "),e("x-button",{attrs:{type:"primary"},nativeOn:{click:function(n){t.pushLoading(n)}}},[t._v("PushLoading")]),t._v(" "),e("p",[t._v("\n count: "+t._s(t.count)+"\n ")]),t._v(" "),t._m(0)],1)},staticRenderFns:[function(){var t=this,n=t.$createElement,e=t._self._c||n;return e("div",{staticClass:"tips"},[t._v("\n 这种是没有用vuex来控制的 在5秒内点击多次(计数器数到 2 3 4都可以点一下) 内容是最新的 但是结束时间却不是以最后一次为准 这是一般toast/loading的缺陷 "),e("br"),t._v("\n 比如在发送 HTTP 请求的时候 一个请求 一次 loading "),e("br"),t._v("\n 那么 假如同一时段内发送了 两次或者两次以上的请求 那么就会在最先完成http请求之后关闭了 导致后来发起的请求 loading 状态也被改变了 并且这时候的toast/loading已经被关闭了\n ")])}]}},function(t,n){t.exports={render:function(){var t=this,n=t.$createElement,e=t._self._c||n;return e("div",[e("a",{staticClass:"weui-btn",class:["weui-btn_"+t.type],attrs:{href:"javascript:;"}},[t._t("default")],2)])},staticRenderFns:[]}},function(t,n){t.exports={render:function(){var t=this,n=t.$createElement,e=t._self._c||n;return e("div",[e("div",{directives:[{name:"show",rawName:"v-show",value:t.show,expression:"show"}],attrs:{id:"loadingToast"}},[e("div",{staticClass:"weui-toast"},[e("i",{staticClass:"weui-loading weui-icon_toast"}),t._v(" "),e("p",{staticClass:"weui-toast__content"},[t._v(t._s(t.text))])])])])},staticRenderFns:[]}},function(t,n){t.exports={render:function(){var t=this,n=t.$createElement,e=t._self._c||n;return e("div",{staticStyle:{"margin-top":"20px"}},[e("p",[t._v("\n 使用vuex控制的loading\n ")]),t._v(" "),e("loading",{attrs:{show:t.loading.show,text:t.loading.text}}),t._v(" "),e("x-button",{attrs:{type:"primary"},nativeOn:{click:function(n){t.pushLoading(n)}}},[t._v("PushLoading")]),t._v(" "),e("p",[t._v("\n count: "+t._s(t.count)+"\n ")]),t._v(" "),t._m(0)],1)},staticRenderFns:[function(){var t=this,n=t.$createElement,e=t._self._c||n;return e("div",{staticClass:"tips"},[t._v("\n 使用相同方法测试这个loading会发现是以最后一次点击 + 5s 结束的 因为是以队列的形式来记录loading的 "),e("br"),t._v("\n 这个demo只是以一个简单的list来记录loading 进一步思考 "),e("br"),t._v("\n 我如果返回了uuid 那岂不是 可以关闭指定的队列中的loading项 达到精准控制? 更好玩等待你们挖掘\n ")])}]}},function(t,n){t.exports={render:function(){var t=this,n=t.$createElement,e=t._self._c||n;return e("div",{attrs:{id:"app"}},[e("loading-with-out-vuex"),t._v(" "),e("loading-with-vuex")],1)},staticRenderFns:[]}}],[6]);
--------------------------------------------------------------------------------
/docs/static/js/vendor.37265a6f0fb0a24ab606.js:
--------------------------------------------------------------------------------
1 | webpackJsonp([1],{0:function(t,e){t.exports=function(t,e,n,r){var i,o=t=t||{},a=typeof t.default;"object"!==a&&"function"!==a||(i=t,o=t.default);var s="function"==typeof o?o.options:o;if(e&&(s.render=e.render,s.staticRenderFns=e.staticRenderFns),n&&(s._scopeId=n),r){var c=Object.create(s.computed||null);Object.keys(r).forEach(function(t){var e=r[t];c[t]=function(){return e}}),s.computed=c}return{esModule:i,exports:o,options:s}}},1:function(t,e,n){"use strict";(function(t){/*!
2 | * Vue.js v2.2.6
3 | * (c) 2014-2017 Evan You
4 | * Released under the MIT License.
5 | */
6 | function n(t){return null==t?"":"object"==typeof t?JSON.stringify(t,null,2):String(t)}function r(t){var e=parseFloat(t);return isNaN(e)?t:e}function i(t,e){for(var n=Object.create(null),r=t.split(","),i=0;i-1)return t.splice(n,1)}}function a(t,e){return xi.call(t,e)}function s(t){return"string"==typeof t||"number"==typeof t}function c(t){var e=Object.create(null);return function(n){return e[n]||(e[n]=t(n))}}function u(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 l(t,e){e=e||0;for(var n=t.length-e,r=new Array(n);n--;)r[n]=t[n+e];return r}function f(t,e){for(var n in e)t[n]=e[n];return t}function p(t){return null!==t&&"object"==typeof t}function d(t){return Oi.call(t)===Si}function v(t){for(var e={},n=0;n=0&&lo[n].id>t.id;)n--;lo.splice(Math.max(n,ho)+1,0,t)}else lo.push(t);po||(po=!0,qi(ht))}}function gt(t){yo.clear(),yt(t,yo)}function yt(t,e){var n,r,i=Array.isArray(t);if((i||p(t))&&Object.isExtensible(t)){if(t.__ob__){var o=t.__ob__.dep.id;if(e.has(o))return;e.add(o)}if(i)for(n=t.length;n--;)yt(t[n],e);else for(r=Object.keys(t),n=r.length;n--;)yt(t[r[n]],e)}}function _t(t,e,n){_o.get=function(){return this[e][n]},_o.set=function(t){this[e][n]=t},Object.defineProperty(t,n,_o)}function bt(t){t._watchers=[];var e=t.$options;e.props&&$t(t,e.props),e.methods&&Ot(t,e.methods),e.data?wt(t):O(t._data={},!0),e.computed&&Ct(t,e.computed),e.watch&&St(t,e.watch)}function $t(t,e){var n=t.$options.propsData||{},r=t._props={},i=t.$options._propKeys=[],o=!t.$parent;to.shouldConvert=o;for(var a in e)!function(o){i.push(o);var a=U(o,e,n,t);S(r,o,a),o in t||_t(t,"_props",o)}(a);to.shouldConvert=!0}function wt(t){var e=t.$options.data;e=t._data="function"==typeof e?xt(e,t):e||{},d(e)||(e={});for(var n=Object.keys(e),r=t.$options.props,i=n.length;i--;)r&&a(r,n[i])||_(n[i])||_t(t,"_data",n[i]);O(e,!0)}function xt(t,e){try{return t.call(e)}catch(t){return V(t,e,"data()"),{}}}function Ct(t,e){var n=t._computedWatchers=Object.create(null);for(var r in e){var i=e[r],o="function"==typeof i?i:i.get;n[r]=new go(t,o,h,bo),r in t||kt(t,r,i)}}function kt(t,e,n){"function"==typeof n?(_o.get=At(e),_o.set=h):(_o.get=n.get?n.cache!==!1?At(e):n.get:h,_o.set=n.set?n.set:h),Object.defineProperty(t,e,_o)}function At(t){return function(){var e=this._computedWatchers&&this._computedWatchers[t];if(e)return e.dirty&&e.evaluate(),Wi.target&&e.depend(),e.value}}function Ot(t,e){t.$options.props;for(var n in e)t[n]=null==e[n]?h:u(e[n],t)}function St(t,e){for(var n in e){var r=e[n];if(Array.isArray(r))for(var i=0;i-1:t instanceof RegExp&&t.test(e)}function de(t,e){for(var n in t){var r=t[n];if(r){var i=fe(r.componentOptions);i&&!e(i)&&(ve(r),t[n]=null)}}}function ve(t){t&&(t.componentInstance._inactive||dt(t.componentInstance,"deactivated"),t.componentInstance.$destroy())}function he(t){for(var e=t.data,n=t,r=t;r.componentInstance;)r=r.componentInstance._vnode,r.data&&(e=me(r.data,e));for(;n=n.parent;)n.data&&(e=me(e,n.data));return ge(e)}function me(t,e){return{staticClass:ye(t.staticClass,e.staticClass),class:t.class?[t.class,e.class]:e.class}}function ge(t){var e=t.class,n=t.staticClass;return n||e?ye(n,_e(e)):""}function ye(t,e){return t?e?t+" "+e:t:e||""}function _e(t){var e="";if(!t)return e;if("string"==typeof t)return t;if(Array.isArray(t)){for(var n,r=0,i=t.length;r-1?Yo[t]=e.constructor===window.HTMLUnknownElement||e.constructor===window.HTMLElement:Yo[t]=/HTMLUnknownElement/.test(e.toString())}function we(t){if("string"==typeof t){var e=document.querySelector(t);return e?e:document.createElement("div")}return t}function xe(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 Ce(t,e){return document.createElementNS(qo[t],e)}function ke(t){return document.createTextNode(t)}function Ae(t){return document.createComment(t)}function Oe(t,e,n){t.insertBefore(e,n)}function Se(t,e){t.removeChild(e)}function Te(t,e){t.appendChild(e)}function Ee(t){return t.parentNode}function je(t){return t.nextSibling}function Me(t){return t.tagName}function Ne(t,e){t.textContent=e}function Ie(t,e,n){t.setAttribute(e,n)}function Le(t,e){var n=t.data.ref;if(n){var r=t.context,i=t.componentInstance||t.elm,a=r.$refs;e?Array.isArray(a[n])?o(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}}function De(t){return void 0===t||null===t}function Pe(t){return void 0!==t&&null!==t}function Re(t){return t===!0}function Ue(t,e){return t.key===e.key&&t.tag===e.tag&&t.isComment===e.isComment&&Pe(t.data)===Pe(e.data)&&Be(t,e)}function Be(t,e){if("input"!==t.tag)return!0;var n;return(Pe(n=t.data)&&Pe(n=n.attrs)&&n.type)===(Pe(n=e.data)&&Pe(n=n.attrs)&&n.type)}function He(t,e,n){var r,i,o={};for(r=e;r<=n;++r)i=t[r].key,Pe(i)&&(o[i]=r);return o}function Fe(t,e){(t.data.directives||e.data.directives)&&Ve(t,e)}function Ve(t,e){var n,r,i,o=t===ta,a=e===ta,s=ze(t.data.directives,t.context),c=ze(e.data.directives,e.context),u=[],l=[];for(n in c)r=s[n],i=c[n],r?(i.oldValue=r.value,qe(i,"update",e,t),i.def&&i.def.componentUpdated&&l.push(i)):(qe(i,"bind",e,t),i.def&&i.def.inserted&&u.push(i));if(u.length){var f=function(){for(var n=0;n=0&&" "===(m=t.charAt(h));h--);m&&sa.test(m)||(l=!0)}}else void 0===o?(v=i+1,o=t.slice(0,i).trim()):e();if(void 0===o?o=t.slice(0,i).trim():0!==v&&e(),a)for(i=0;i=To}function pn(t){return 34===t||39===t}function dn(t){var e=1;for(No=Mo;!fn();)if(t=ln(),pn(t))vn(t);else if(91===t&&e++,93===t&&e--,0===e){Io=Mo;break}}function vn(t){for(var e=t;!fn()&&(t=ln())!==e;);}function hn(t,e,n){Lo=n;var r=e.value,i=e.modifiers,o=t.tag,a=t.attrsMap.type;if("select"===o)yn(t,r,i);else if("input"===o&&"checkbox"===a)mn(t,r,i);else if("input"===o&&"radio"===a)gn(t,r,i);else if("input"===o||"textarea"===o)_n(t,r,i);else if(!ji.isReservedTag(o))return sn(t,r,i),!1;return!0}function mn(t,e,n){var r=n&&n.number,i=on(t,"value")||"null",o=on(t,"true-value")||"true",a=on(t,"false-value")||"false";tn(t,"checked","Array.isArray("+e+")?_i("+e+","+i+")>-1"+("true"===o?":("+e+")":":_q("+e+","+o+")")),rn(t,ua,"var $$a="+e+",$$el=$event.target,$$c=$$el.checked?("+o+"):("+a+");if(Array.isArray($$a)){var $$v="+(r?"_n("+i+")":i)+",$$i=_i($$a,$$v);if($$c){$$i<0&&("+e+"=$$a.concat($$v))}else{$$i>-1&&("+e+"=$$a.slice(0,$$i).concat($$a.slice($$i+1)))}}else{"+e+"=$$c}",null,!0)}function gn(t,e,n){var r=n&&n.number,i=on(t,"value")||"null";i=r?"_n("+i+")":i,tn(t,"checked","_q("+e+","+i+")"),rn(t,ua,cn(e,i),null,!0)}function yn(t,e,n){var r=n&&n.number,i='Array.prototype.filter.call($event.target.options,function(o){return o.selected}).map(function(o){var val = "_value" in o ? o._value : o.value;return '+(r?"_n(val)":"val")+"})",o="var $$selectedVal = "+i+";";o=o+" "+cn(e,"$event.target.multiple ? $$selectedVal : $$selectedVal[0]"),rn(t,"change",o,null,!0)}function _n(t,e,n){var r=t.attrsMap.type,i=n||{},o=i.lazy,a=i.number,s=i.trim,c=!o&&"range"!==r,u=o?"change":"range"===r?ca:"input",l="$event.target.value";s&&(l="$event.target.value.trim()"),a&&(l="_n("+l+")");var f=cn(e,l);c&&(f="if($event.target.composing)return;"+f),tn(t,"value","("+e+")"),rn(t,u,f,null,!0),(s||a||"number"===r)&&rn(t,"blur","$forceUpdate()")}function bn(t){var e;t[ca]&&(e=Pi?"change":"input",t[e]=[].concat(t[ca],t[e]||[]),delete t[ca]),t[ua]&&(e=Fi?"click":"change",t[e]=[].concat(t[ua],t[e]||[]),delete t[ua])}function $n(t,e,n,r){if(n){var i=e,o=Do;e=function(n){null!==(1===arguments.length?i(n):i.apply(null,arguments))&&wn(t,e,r,o)}}Do.addEventListener(t,e,r)}function wn(t,e,n,r){(r||Do).removeEventListener(t,e,n)}function xn(t,e){if(t.data.on||e.data.on){var n=e.data.on||{},r=t.data.on||{};Do=e.elm,bn(n),G(n,r,$n,wn,e.context)}}function Cn(t,e){if(t.data.domProps||e.data.domProps){var n,r,i=e.elm,o=t.data.domProps||{},a=e.data.domProps||{};a.__ob__&&(a=e.data.domProps=f({},a));for(n in o)null==a[n]&&(i[n]="");for(n in a)if(r=a[n],"textContent"!==n&&"innerHTML"!==n||(e.children&&(e.children.length=0),r!==o[n]))if("value"===n){i._value=r;var s=null==r?"":String(r);kn(i,e,s)&&(i.value=s)}else i[n]=r}}function kn(t,e,n){return!t.composing&&("option"===e.tag||An(t,n)||On(t,n))}function An(t,e){return document.activeElement!==t&&t.value!==e}function On(t,e){var n=t.value,i=t._vModifiers;return i&&i.number||"number"===t.type?r(n)!==r(e):i&&i.trim?n.trim()!==e.trim():n!==e}function Sn(t){var e=Tn(t.style);return t.staticStyle?f(t.staticStyle,e):e}function Tn(t){return Array.isArray(t)?v(t):"string"==typeof t?pa(t):t}function En(t,e){var n,r={};if(e)for(var i=t;i.componentInstance;)i=i.componentInstance._vnode,i.data&&(n=Sn(i.data))&&f(r,n);(n=Sn(t.data))&&f(r,n);for(var o=t;o=o.parent;)o.data&&(n=Sn(o.data))&&f(r,n);return r}function jn(t,e){var n=e.data,r=t.data;if(n.staticStyle||n.style||r.staticStyle||r.style){var i,o,a=e.elm,s=t.data.staticStyle,c=t.data.style||{},u=s||c,l=Tn(e.data.style)||{};e.data.style=l.__ob__?f({},l):l;var p=En(e,!0);for(o in u)null==p[o]&&ha(a,o,"");for(o in p)(i=p[o])!==u[o]&&ha(a,o,null==i?"":i)}}function Mn(t,e){if(e&&(e=e.trim()))if(t.classList)e.indexOf(" ")>-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 Nn(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);else{for(var n=" "+(t.getAttribute("class")||"")+" ",r=" "+e+" ";n.indexOf(r)>=0;)n=n.replace(r," ");t.setAttribute("class",n.trim())}}function In(t){if(t){if("object"==typeof t){var e={};return t.css!==!1&&f(e,_a(t.name||"v")),f(e,t),e}return"string"==typeof t?_a(t):void 0}}function Ln(t){Oa(function(){Oa(t)})}function Dn(t,e){(t._transitionClasses||(t._transitionClasses=[])).push(e),Mn(t,e)}function Pn(t,e){t._transitionClasses&&o(t._transitionClasses,e),Nn(t,e)}function Rn(t,e,n){var r=Un(t,e),i=r.type,o=r.timeout,a=r.propCount;if(!i)return n();var s=i===$a?Ca:Aa,c=0,u=function(){t.removeEventListener(s,l),n()},l=function(e){e.target===t&&++c>=a&&u()};setTimeout(function(){c0&&(n=$a,l=a,f=o.length):e===wa?u>0&&(n=wa,l=u,f=c.length):(l=Math.max(a,u),n=l>0?a>u?$a:wa:null,f=n?n===$a?o.length:c.length:0),{type:n,timeout:l,propCount:f,hasTransform:n===$a&&Sa.test(r[xa+"Property"])}}function Bn(t,e){for(;t.length1}function qn(t,e){e.data.show||Fn(e)}function Kn(t,e,n){var r=e.value,i=t.multiple;if(!i||Array.isArray(r)){for(var o,a,s=0,c=t.options.length;s-1,a.selected!==o&&(a.selected=o);else if(m(Wn(a),r))return void(t.selectedIndex!==s&&(t.selectedIndex=s));i||(t.selectedIndex=-1)}}function Gn(t,e){for(var n=0,r=e.length;n=0&&a[i].lowerCasedTag!==s;i--);else i=0;if(i>=0){for(var c=a.length-1;c>=i;c--)e.end&&e.end(a[c].tag,n,r);a.length=i,o=i&&a[i-1].tag}else"br"===s?e.start&&e.start(t,[],!0,n,r):"p"===s&&(e.start&&e.start(t,[],!1,n,r),e.end&&e.end(t,n,r))}for(var i,o,a=[],s=e.expectHTML,c=e.isUnaryTag||Ti,u=e.canBeLeftOpenTag||Ti,l=0;t;){if(i=t,o&&bs(o)){var f=o.toLowerCase(),p=$s[f]||($s[f]=new RegExp("([\\s\\S]*?)("+f+"[^>]*>)","i")),d=0,v=t.replace(p,function(t,n,r){return d=r.length,bs(f)||"noscript"===f||(n=n.replace(//g,"$1").replace(//g,"$1")),e.chars&&e.chars(n),""});l+=t.length-v.length,t=v,r(f,l-d,l)}else{var h=t.indexOf("<");if(0===h){if(Xa.test(t)){var m=t.indexOf("-->");if(m>=0){n(m+3);continue}}if(ts.test(t)){var g=t.indexOf("]>");if(g>=0){n(g+2);continue}}var y=t.match(Qa);if(y){n(y[0].length);continue}var _=t.match(Ya);if(_){var b=l;n(_[0].length),r(_[1],b,l);continue}var $=function(){var e=t.match(Wa);if(e){var r={tagName:e[1],attrs:[],start:l};n(e[0].length);for(var i,o;!(i=t.match(Za))&&(o=t.match(Ka));)n(o[0].length),r.attrs.push(o);if(i)return r.unarySlash=i[1],n(i[0].length),r.end=l,r}}();if($){!function(t){var n=t.tagName,i=t.unarySlash;s&&("p"===o&&Ja(n)&&r(o),u(n)&&o===n&&r(n));for(var l=c(n)||"html"===n&&"head"===o||!!i,f=t.attrs.length,p=new Array(f),d=0;d=0){for(x=t.slice(h);!(Ya.test(x)||Wa.test(x)||Xa.test(x)||ts.test(x)||(C=x.indexOf("<",1))<0);)h+=C,x=t.slice(h);w=t.substring(0,h),n(h)}h<0&&(w=t,t=""),e.chars&&w&&e.chars(w)}if(t===i){e.chars&&e.chars(t);break}}r()}function fr(t,e){var n=e?As(e):ks;if(n.test(t)){for(var r,i,o=[],a=n.lastIndex=0;r=n.exec(t);){i=r.index,i>a&&o.push(JSON.stringify(t.slice(a,i)));var s=Ze(r[1].trim());o.push("_s("+s+")"),a=i+r[0].length}return a0,Ui=Di&&Di.indexOf("edge/")>0,Bi=Di&&Di.indexOf("android")>0,Hi=Di&&/iphone|ipad|ipod|ios/.test(Di),Fi=Di&&/chrome\/\d+/.test(Di)&&!Ui,Vi=function(){return void 0===bi&&(bi=!Li&&void 0!==t&&"server"===t.process.env.VUE_ENV),bi},zi=Li&&window.__VUE_DEVTOOLS_GLOBAL_HOOK__,Ji="undefined"!=typeof Symbol&&w(Symbol)&&"undefined"!=typeof Reflect&&w(Reflect.ownKeys),qi=function(){function t(){r=!1;var t=n.slice(0);n.length=0;for(var e=0;e1?l(n):n;for(var r=l(arguments,1),i=0,o=n.length;i1&&(e[n[0].trim()]=n[1].trim())}}),e}),da=/^--/,va=/\s*!important$/,ha=function(t,e,n){da.test(e)?t.style.setProperty(e,n):va.test(n)?t.style.setProperty(e,n.replace(va,""),"important"):t.style[ga(e)]=n},ma=["Webkit","Moz","ms"],ga=c(function(t){if(Po=Po||document.createElement("div"),"filter"!==(t=Ci(t))&&t in Po.style)return t;for(var e=t.charAt(0).toUpperCase()+t.slice(1),n=0;np?(u=De(n[m+1])?null:n[m+1].elm,h(t,u,n,f,m,r)):f>m&&g(t,e,l,p)}function b(t,e,n,r){if(t!==e){if(Re(e.isStatic)&&Re(t.isStatic)&&e.key===t.key&&(Re(e.isCloned)||Re(e.isOnce)))return e.elm=t.elm,void(e.componentInstance=t.componentInstance);var i,o=e.data;Pe(o)&&Pe(i=o.hook)&&Pe(i=i.prepatch)&&i(t,e);var a=e.elm=t.elm,s=t.children,c=e.children;if(Pe(o)&&p(e)){for(i=0;i',n.innerHTML.indexOf(e)>0}("\n","
"),Va=i("area,base,br,col,embed,frame,hr,img,input,isindex,keygen,link,meta,param,source,track,wbr"),za=i("colgroup,dd,dt,li,options,p,td,tfoot,th,thead,tr,source"),Ja=i("address,article,aside,base,blockquote,body,caption,col,colgroup,dd,details,dialog,div,dl,dt,fieldset,figcaption,figure,footer,form,h1,h2,h3,h4,h5,h6,head,header,hgroup,hr,html,legend,li,menuitem,meta,optgroup,option,param,rp,rt,source,style,summary,tbody,td,tfoot,th,thead,title,tr,track"),qa=[/"([^"]*)"+/.source,/'([^']*)'+/.source,/([^\s"'=<>`]+)/.source],Ka=new RegExp("^\\s*"+/([^\s"'<>\/=]+)/.source+"(?:\\s*("+/(?:=)/.source+")\\s*(?:"+qa.join("|")+"))?"),Ga="[a-zA-Z_][\\w\\-\\.]*",Wa=new RegExp("^<((?:"+Ga+"\\:)?"+Ga+")"),Za=/^\s*(\/?)>/,Ya=new RegExp("^<\\/((?:"+Ga+"\\:)?"+Ga+")[^>]*>"),Qa=/^]+>/i,Xa=/^