微信公众号前端模版
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

1 line
14 KiB

var Vuex=function(l){"use strict";var n="store";function o(){return"undefined"!=typeof navigator?window:"undefined"!=typeof global?global:{}}function f(e,n){if(void 0===n&&(n=[]),null===e||"object"!=typeof e)return e;var t=n.filter(function(t){return t.original===e})[0];if(t)return t.copy;var o=Array.isArray(e)?[]:{};return n.push({original:e,copy:o}),Object.keys(e).forEach(function(t){o[t]=f(e[t],n)}),o}function p(e,n){Object.keys(e).forEach(function(t){return n(e[t],t)})}function r(t){return null!==t&&"object"==typeof t}function i(e,n,t){return n.indexOf(e)<0&&(t&&t.prepend?n.unshift(e):n.push(e)),function(){var t=n.indexOf(e);-1<t&&n.splice(t,1)}}function a(t,e){t._actions=Object.create(null),t._mutations=Object.create(null),t._wrappedGetters=Object.create(null),t._modulesNamespaceMap=Object.create(null);var n=t.state;h(t,n,[],t._modules.root,!0),s(t,n,e)}function s(r,t,e){var n,o=r._state,i=r._scope,a=(r.getters={},r._makeLocalGettersCache=Object.create(null),r._wrappedGetters),c={},s={},u=l.effectScope(!0);u.run(function(){p(a,function(t,e){var n,o;c[e]=(n=t,o=r,function(){return n(o)}),s[e]=l.computed(function(){return c[e]()}),Object.defineProperty(r.getters,e,{get:function(){return s[e].value},enumerable:!0})})}),r._state=l.reactive({data:t}),r._scope=u,r.strict&&(n=r,l.watch(function(){return n._state.data},function(){},{deep:!0,flush:"sync"})),o&&e&&r._withCommit(function(){o.data=null}),i&&i.stop()}function h(i,n,o,t,r){var e,a,c,s,u,l,f=!o.length,p=i._modules.getNamespace(o),d=(t.namespaced&&(i._modulesNamespaceMap[p],i._modulesNamespaceMap[p]=t),f||r||(e=g(n,o.slice(0,-1)),a=o[o.length-1],i._withCommit(function(){e[a]=t.state})),t.context=(c=i,u=o,l={dispatch:(f=""===(s=p))?c.dispatch:function(t,e,n){t=v(t,e,n),e=t.payload,n=t.options,t=t.type;return n&&n.root||(t=s+t),c.dispatch(t,e)},commit:f?c.commit:function(t,e,n){t=v(t,e,n),e=t.payload,n=t.options,t=t.type;n&&n.root||(t=s+t),c.commit(t,e,n)}},Object.defineProperties(l,{getters:{get:f?function(){return c.getters}:function(){return m(c,s)}},state:{get:function(){return g(c.state,u)}}}),l));t.forEachMutation(function(t,e){var n,o,r;e=p+e,o=t,r=d,((n=i)._mutations[e]||(n._mutations[e]=[])).push(function(t){o.call(n,r.state,t)})}),t.forEachAction(function(t,e){var n,o,r,e=t.root?e:p+e,t=t.handler||t;o=t,r=d,((n=i)._actions[e]||(n._actions[e]=[])).push(function(t){t=o.call(n,{dispatch:r.dispatch,commit:r.commit,getters:r.getters,state:r.state,rootGetters:n.getters,rootState:n.state},t);return t&&"function"==typeof t.then||(t=Promise.resolve(t)),n._devtoolHook?t.catch(function(t){throw n._devtoolHook.emit("vuex:error",t),t}):t})}),t.forEachGetter(function(t,e){var n,o;e=p+e,n=t,o=d,(t=i)._wrappedGetters[e]||(t._wrappedGetters[e]=function(t){return n(o.state,o.getters,t.state,t.getters)})}),t.forEachChild(function(t,e){h(i,n,o.concat(e),t,r)})}function m(n,o){var r,i;return n._makeLocalGettersCache[o]||(r={},i=o.length,Object.keys(n.getters).forEach(function(t){var e;t.slice(0,i)===o&&(e=t.slice(i),Object.defineProperty(r,e,{get:function(){return n.getters[t]},enumerable:!0}))}),n._makeLocalGettersCache[o]=r),n._makeLocalGettersCache[o]}function g(t,e){return e.reduce(function(t,e){return t[e]},t)}function v(t,e,n){return r(t)&&t.type&&(n=e,t=(e=t).type),{type:t,payload:e,options:n}}var c="vuex:mutations",d="vuex:actions",y="vuex",_=0;function P(u,l){var t,e,n;t={id:"org.vuejs.vuex",app:u,label:"Vuex",homepage:"https://next.vuex.vuejs.org/",logo:"https://vuejs.org/images/icons/favicon-96x96.png",packageName:"vuex",componentStateTypes:["vuex bindings"]},e=function(r){r.addTimelineLayer({id:c,label:"Vuex Mutations",color:b}),r.addTimelineLayer({id:d,label:"Vuex Actions",color:b}),r.addInspector({id:y,label:"Vuex",icon:"storage",treeFilterPlaceholder:"Filter stores..."}),r.on.getInspectorTree(function(t){var e;t.app===u&&t.inspectorId===y&&(t.filter?(function e(n,o,r,i){i.includes(r)&&n.push({id:i||"root",label:i.endsWith("/")?i.slice(0,i.length-1):i||"Root",tags:o.namespaced?[w]:[]}),Object.keys(o._children).forEach(function(t){e(n,o._children[t],r,i+t+"/")})}(