Файловый менеджер - Редактировать - /var/www/html/vuex.zip
Ðазад
PK ! I۷� � README.mdnu �Iw�� # Vuex [](https://npmjs.com/package/vuex) [](https://circleci.com/gh/vuejs/vuex) --- :fire: **HEADS UP!** You're currently looking at Vuex 4 branch. If you're looking for Vuex 3, [please check out `dev` branch](https://github.com/vuejs/vuex). --- Vuex is a state management pattern + library for Vue.js applications. It serves as a centralized store for all the components in an application, with rules ensuring that the state can only be mutated in a predictable fashion. It also integrates with Vue's official [devtools extension](https://github.com/vuejs/vue-devtools) to provide advanced features such as zero-config time-travel debugging and state snapshot export / import. Learn more about Vuex at "[What is Vuex?](https://next.vuex.vuejs.org/)", or get started by looking into [full documentation](http://next.vuex.vuejs.org/). ## Documentation To check out docs, visit [vuex.vuejs.org](https://next.vuex.vuejs.org/). ## Examples You may find example applications built with Vuex under the `examples` directory. Running the examples: ```bash $ npm install $ npm run dev # serve examples at localhost:8080 ``` ## Questions For questions and support please use the [Discord chat server](https://chat.vuejs.org) or [the official forum](http://forum.vuejs.org). The issue list of this repo is **exclusively** for bug reports and feature requests. ## Issues Please make sure to read the [Issue Reporting Checklist](https://github.com/vuejs/vuex/blob/dev/.github/contributing.md#issue-reporting-guidelines) before opening an issue. Issues not conforming to the guidelines may be closed immediately. ## Changelog Detailed changes for each release are documented in the [release notes](https://github.com/vuejs/vuex/releases). ## Stay In Touch For latest releases and announcements, follow on Twitter: [@vuejs](https://twitter.com/vuejs). ## Contribution Please make sure to read the [Contributing Guide](https://github.com/vuejs/vuex/blob/dev/.github/contributing.md) before making a pull request. ## License [MIT](http://opensource.org/licenses/MIT) Copyright (c) 2015-present Evan You PK ! �!�z`� `� vuex.global.jsnu �Iw�� /*! * vuex v4.0.2 * (c) 2021 Evan You * @license MIT */ var Vuex = (function (vue) { 'use strict'; var storeKey = 'store'; function useStore (key) { if ( key === void 0 ) key = null; return vue.inject(key !== null ? key : storeKey) } function getDevtoolsGlobalHook() { return getTarget().__VUE_DEVTOOLS_GLOBAL_HOOK__; } function getTarget() { // @ts-ignore return typeof navigator !== 'undefined' ? window : typeof global !== 'undefined' ? global : {}; } var HOOK_SETUP = 'devtools-plugin:setup'; function setupDevtoolsPlugin(pluginDescriptor, setupFn) { var hook = getDevtoolsGlobalHook(); if (hook) { hook.emit(HOOK_SETUP, pluginDescriptor, setupFn); } else { var target = getTarget(); var list = target.__VUE_DEVTOOLS_PLUGINS__ = target.__VUE_DEVTOOLS_PLUGINS__ || []; list.push({ pluginDescriptor: pluginDescriptor, setupFn: setupFn }); } } /** * Get the first item that pass the test * by second argument function * * @param {Array} list * @param {Function} f * @return {*} */ function find (list, f) { return list.filter(f)[0] } /** * Deep copy the given object considering circular structure. * This function caches all nested objects and its copies. * If it detects circular structure, use cached copy to avoid infinite loop. * * @param {*} obj * @param {Array<Object>} cache * @return {*} */ function deepCopy (obj, cache) { if ( cache === void 0 ) cache = []; // just return if obj is immutable value if (obj === null || typeof obj !== 'object') { return obj } // if obj is hit, it is in circular structure var hit = find(cache, function (c) { return c.original === obj; }); if (hit) { return hit.copy } var copy = Array.isArray(obj) ? [] : {}; // put the copy into cache at first // because we want to refer it in recursive deepCopy cache.push({ original: obj, copy: copy }); Object.keys(obj).forEach(function (key) { copy[key] = deepCopy(obj[key], cache); }); return copy } /** * forEach for object */ function forEachValue (obj, fn) { Object.keys(obj).forEach(function (key) { return fn(obj[key], key); }); } function isObject (obj) { return obj !== null && typeof obj === 'object' } function isPromise (val) { return val && typeof val.then === 'function' } function assert (condition, msg) { if (!condition) { throw new Error(("[vuex] " + msg)) } } function partial (fn, arg) { return function () { return fn(arg) } } function genericSubscribe (fn, subs, options) { if (subs.indexOf(fn) < 0) { options && options.prepend ? subs.unshift(fn) : subs.push(fn); } return function () { var i = subs.indexOf(fn); if (i > -1) { subs.splice(i, 1); } } } function resetStore (store, hot) { store._actions = Object.create(null); store._mutations = Object.create(null); store._wrappedGetters = Object.create(null); store._modulesNamespaceMap = Object.create(null); var state = store.state; // init all modules installModule(store, state, [], store._modules.root, true); // reset state resetStoreState(store, state, hot); } function resetStoreState (store, state, hot) { var oldState = store._state; // bind store public getters store.getters = {}; // reset local getters cache store._makeLocalGettersCache = Object.create(null); var wrappedGetters = store._wrappedGetters; var computedObj = {}; forEachValue(wrappedGetters, function (fn, key) { // use computed to leverage its lazy-caching mechanism // direct inline function use will lead to closure preserving oldState. // using partial to return function with only arguments preserved in closure environment. computedObj[key] = partial(fn, store); Object.defineProperty(store.getters, key, { // TODO: use `computed` when it's possible. at the moment we can't due to // https://github.com/vuejs/vuex/pull/1883 get: function () { return computedObj[key](); }, enumerable: true // for local getters }); }); store._state = vue.reactive({ data: state }); // enable strict mode for new state if (store.strict) { enableStrictMode(store); } if (oldState) { if (hot) { // dispatch changes in all subscribed watchers // to force getter re-evaluation for hot reloading. store._withCommit(function () { oldState.data = null; }); } } } function installModule (store, rootState, path, module, hot) { var isRoot = !path.length; var namespace = store._modules.getNamespace(path); // register in namespace map if (module.namespaced) { if (store._modulesNamespaceMap[namespace] && true) { console.error(("[vuex] duplicate namespace " + namespace + " for the namespaced module " + (path.join('/')))); } store._modulesNamespaceMap[namespace] = module; } // set state if (!isRoot && !hot) { var parentState = getNestedState(rootState, path.slice(0, -1)); var moduleName = path[path.length - 1]; store._withCommit(function () { { if (moduleName in parentState) { console.warn( ("[vuex] state field \"" + moduleName + "\" was overridden by a module with the same name at \"" + (path.join('.')) + "\"") ); } } parentState[moduleName] = module.state; }); } var local = module.context = makeLocalContext(store, namespace, path); module.forEachMutation(function (mutation, key) { var namespacedType = namespace + key; registerMutation(store, namespacedType, mutation, local); }); module.forEachAction(function (action, key) { var type = action.root ? key : namespace + key; var handler = action.handler || action; registerAction(store, type, handler, local); }); module.forEachGetter(function (getter, key) { var namespacedType = namespace + key; registerGetter(store, namespacedType, getter, local); }); module.forEachChild(function (child, key) { installModule(store, rootState, path.concat(key), child, hot); }); } /** * make localized dispatch, commit, getters and state * if there is no namespace, just use root ones */ function makeLocalContext (store, namespace, path) { var noNamespace = namespace === ''; var local = { dispatch: noNamespace ? store.dispatch : function (_type, _payload, _options) { var args = unifyObjectStyle(_type, _payload, _options); var payload = args.payload; var options = args.options; var type = args.type; if (!options || !options.root) { type = namespace + type; if (!store._actions[type]) { console.error(("[vuex] unknown local action type: " + (args.type) + ", global type: " + type)); return } } return store.dispatch(type, payload) }, commit: noNamespace ? store.commit : function (_type, _payload, _options) { var args = unifyObjectStyle(_type, _payload, _options); var payload = args.payload; var options = args.options; var type = args.type; if (!options || !options.root) { type = namespace + type; if (!store._mutations[type]) { console.error(("[vuex] unknown local mutation type: " + (args.type) + ", global type: " + type)); return } } store.commit(type, payload, options); } }; // getters and state object must be gotten lazily // because they will be changed by state update Object.defineProperties(local, { getters: { get: noNamespace ? function () { return store.getters; } : function () { return makeLocalGetters(store, namespace); } }, state: { get: function () { return getNestedState(store.state, path); } } }); return local } function makeLocalGetters (store, namespace) { if (!store._makeLocalGettersCache[namespace]) { var gettersProxy = {}; var splitPos = namespace.length; Object.keys(store.getters).forEach(function (type) { // skip if the target getter is not match this namespace if (type.slice(0, splitPos) !== namespace) { return } // extract local getter type var localType = type.slice(splitPos); // Add a port to the getters proxy. // Define as getter property because // we do not want to evaluate the getters in this time. Object.defineProperty(gettersProxy, localType, { get: function () { return store.getters[type]; }, enumerable: true }); }); store._makeLocalGettersCache[namespace] = gettersProxy; } return store._makeLocalGettersCache[namespace] } function registerMutation (store, type, handler, local) { var entry = store._mutations[type] || (store._mutations[type] = []); entry.push(function wrappedMutationHandler (payload) { handler.call(store, local.state, payload); }); } function registerAction (store, type, handler, local) { var entry = store._actions[type] || (store._actions[type] = []); entry.push(function wrappedActionHandler (payload) { var res = handler.call(store, { dispatch: local.dispatch, commit: local.commit, getters: local.getters, state: local.state, rootGetters: store.getters, rootState: store.state }, payload); if (!isPromise(res)) { res = Promise.resolve(res); } if (store._devtoolHook) { return res.catch(function (err) { store._devtoolHook.emit('vuex:error', err); throw err }) } else { return res } }); } function registerGetter (store, type, rawGetter, local) { if (store._wrappedGetters[type]) { { console.error(("[vuex] duplicate getter key: " + type)); } return } store._wrappedGetters[type] = function wrappedGetter (store) { return rawGetter( local.state, // local state local.getters, // local getters store.state, // root state store.getters // root getters ) }; } function enableStrictMode (store) { vue.watch(function () { return store._state.data; }, function () { { assert(store._committing, "do not mutate vuex store state outside mutation handlers."); } }, { deep: true, flush: 'sync' }); } function getNestedState (state, path) { return path.reduce(function (state, key) { return state[key]; }, state) } function unifyObjectStyle (type, payload, options) { if (isObject(type) && type.type) { options = payload; payload = type; type = type.type; } { assert(typeof type === 'string', ("expects string as the type, but found " + (typeof type) + ".")); } return { type: type, payload: payload, options: options } } var LABEL_VUEX_BINDINGS = 'vuex bindings'; var MUTATIONS_LAYER_ID = 'vuex:mutations'; var ACTIONS_LAYER_ID = 'vuex:actions'; var INSPECTOR_ID = 'vuex'; var actionId = 0; function addDevtools (app, store) { setupDevtoolsPlugin( { id: 'org.vuejs.vuex', app: app, label: 'Vuex', homepage: 'https://next.vuex.vuejs.org/', logo: 'https://vuejs.org/images/icons/favicon-96x96.png', packageName: 'vuex', componentStateTypes: [LABEL_VUEX_BINDINGS] }, function (api) { api.addTimelineLayer({ id: MUTATIONS_LAYER_ID, label: 'Vuex Mutations', color: COLOR_LIME_500 }); api.addTimelineLayer({ id: ACTIONS_LAYER_ID, label: 'Vuex Actions', color: COLOR_LIME_500 }); api.addInspector({ id: INSPECTOR_ID, label: 'Vuex', icon: 'storage', treeFilterPlaceholder: 'Filter stores...' }); api.on.getInspectorTree(function (payload) { if (payload.app === app && payload.inspectorId === INSPECTOR_ID) { if (payload.filter) { var nodes = []; flattenStoreForInspectorTree(nodes, store._modules.root, payload.filter, ''); payload.rootNodes = nodes; } else { payload.rootNodes = [ formatStoreForInspectorTree(store._modules.root, '') ]; } } }); api.on.getInspectorState(function (payload) { if (payload.app === app && payload.inspectorId === INSPECTOR_ID) { var modulePath = payload.nodeId; makeLocalGetters(store, modulePath); payload.state = formatStoreForInspectorState( getStoreModule(store._modules, modulePath), modulePath === 'root' ? store.getters : store._makeLocalGettersCache, modulePath ); } }); api.on.editInspectorState(function (payload) { if (payload.app === app && payload.inspectorId === INSPECTOR_ID) { var modulePath = payload.nodeId; var path = payload.path; if (modulePath !== 'root') { path = modulePath.split('/').filter(Boolean).concat( path); } store._withCommit(function () { payload.set(store._state.data, path, payload.state.value); }); } }); store.subscribe(function (mutation, state) { var data = {}; if (mutation.payload) { data.payload = mutation.payload; } data.state = state; api.notifyComponentUpdate(); api.sendInspectorTree(INSPECTOR_ID); api.sendInspectorState(INSPECTOR_ID); api.addTimelineEvent({ layerId: MUTATIONS_LAYER_ID, event: { time: Date.now(), title: mutation.type, data: data } }); }); store.subscribeAction({ before: function (action, state) { var data = {}; if (action.payload) { data.payload = action.payload; } action._id = actionId++; action._time = Date.now(); data.state = state; api.addTimelineEvent({ layerId: ACTIONS_LAYER_ID, event: { time: action._time, title: action.type, groupId: action._id, subtitle: 'start', data: data } }); }, after: function (action, state) { var data = {}; var duration = Date.now() - action._time; data.duration = { _custom: { type: 'duration', display: (duration + "ms"), tooltip: 'Action duration', value: duration } }; if (action.payload) { data.payload = action.payload; } data.state = state; api.addTimelineEvent({ layerId: ACTIONS_LAYER_ID, event: { time: Date.now(), title: action.type, groupId: action._id, subtitle: 'end', data: data } }); } }); } ); } // extracted from tailwind palette var COLOR_LIME_500 = 0x84cc16; var COLOR_DARK = 0x666666; var COLOR_WHITE = 0xffffff; var TAG_NAMESPACED = { label: 'namespaced', textColor: COLOR_WHITE, backgroundColor: COLOR_DARK }; /** * @param {string} path */ function extractNameFromPath (path) { return path && path !== 'root' ? path.split('/').slice(-2, -1)[0] : 'Root' } /** * @param {*} module * @return {import('@vue/devtools-api').CustomInspectorNode} */ function formatStoreForInspectorTree (module, path) { return { id: path || 'root', // all modules end with a `/`, we want the last segment only // cart/ -> cart // nested/cart/ -> cart label: extractNameFromPath(path), tags: module.namespaced ? [TAG_NAMESPACED] : [], children: Object.keys(module._children).map(function (moduleName) { return formatStoreForInspectorTree( module._children[moduleName], path + moduleName + '/' ); } ) } } /** * @param {import('@vue/devtools-api').CustomInspectorNode[]} result * @param {*} module * @param {string} filter * @param {string} path */ function flattenStoreForInspectorTree (result, module, filter, path) { if (path.includes(filter)) { result.push({ id: path || 'root', label: path.endsWith('/') ? path.slice(0, path.length - 1) : path || 'Root', tags: module.namespaced ? [TAG_NAMESPACED] : [] }); } Object.keys(module._children).forEach(function (moduleName) { flattenStoreForInspectorTree(result, module._children[moduleName], filter, path + moduleName + '/'); }); } /** * @param {*} module * @return {import('@vue/devtools-api').CustomInspectorState} */ function formatStoreForInspectorState (module, getters, path) { getters = path === 'root' ? getters : getters[path]; var gettersKeys = Object.keys(getters); var storeState = { state: Object.keys(module.state).map(function (key) { return ({ key: key, editable: true, value: module.state[key] }); }) }; if (gettersKeys.length) { var tree = transformPathsToObjectTree(getters); storeState.getters = Object.keys(tree).map(function (key) { return ({ key: key.endsWith('/') ? extractNameFromPath(key) : key, editable: false, value: canThrow(function () { return tree[key]; }) }); }); } return storeState } function transformPathsToObjectTree (getters) { var result = {}; Object.keys(getters).forEach(function (key) { var path = key.split('/'); if (path.length > 1) { var target = result; var leafKey = path.pop(); path.forEach(function (p) { if (!target[p]) { target[p] = { _custom: { value: {}, display: p, tooltip: 'Module', abstract: true } }; } target = target[p]._custom.value; }); target[leafKey] = canThrow(function () { return getters[key]; }); } else { result[key] = canThrow(function () { return getters[key]; }); } }); return result } function getStoreModule (moduleMap, path) { var names = path.split('/').filter(function (n) { return n; }); return names.reduce( function (module, moduleName, i) { var child = module[moduleName]; if (!child) { throw new Error(("Missing module \"" + moduleName + "\" for path \"" + path + "\".")) } return i === names.length - 1 ? child : child._children }, path === 'root' ? moduleMap : moduleMap.root._children ) } function canThrow (cb) { try { return cb() } catch (e) { return e } } // Base data struct for store's module, package with some attribute and method var Module = function Module (rawModule, runtime) { this.runtime = runtime; // Store some children item this._children = Object.create(null); // Store the origin module object which passed by programmer this._rawModule = rawModule; var rawState = rawModule.state; // Store the origin module's state this.state = (typeof rawState === 'function' ? rawState() : rawState) || {}; }; var prototypeAccessors$1 = { namespaced: { configurable: true } }; prototypeAccessors$1.namespaced.get = function () { return !!this._rawModule.namespaced }; Module.prototype.addChild = function addChild (key, module) { this._children[key] = module; }; Module.prototype.removeChild = function removeChild (key) { delete this._children[key]; }; Module.prototype.getChild = function getChild (key) { return this._children[key] }; Module.prototype.hasChild = function hasChild (key) { return key in this._children }; Module.prototype.update = function update (rawModule) { this._rawModule.namespaced = rawModule.namespaced; if (rawModule.actions) { this._rawModule.actions = rawModule.actions; } if (rawModule.mutations) { this._rawModule.mutations = rawModule.mutations; } if (rawModule.getters) { this._rawModule.getters = rawModule.getters; } }; Module.prototype.forEachChild = function forEachChild (fn) { forEachValue(this._children, fn); }; Module.prototype.forEachGetter = function forEachGetter (fn) { if (this._rawModule.getters) { forEachValue(this._rawModule.getters, fn); } }; Module.prototype.forEachAction = function forEachAction (fn) { if (this._rawModule.actions) { forEachValue(this._rawModule.actions, fn); } }; Module.prototype.forEachMutation = function forEachMutation (fn) { if (this._rawModule.mutations) { forEachValue(this._rawModule.mutations, fn); } }; Object.defineProperties( Module.prototype, prototypeAccessors$1 ); var ModuleCollection = function ModuleCollection (rawRootModule) { // register root module (Vuex.Store options) this.register([], rawRootModule, false); }; ModuleCollection.prototype.get = function get (path) { return path.reduce(function (module, key) { return module.getChild(key) }, this.root) }; ModuleCollection.prototype.getNamespace = function getNamespace (path) { var module = this.root; return path.reduce(function (namespace, key) { module = module.getChild(key); return namespace + (module.namespaced ? key + '/' : '') }, '') }; ModuleCollection.prototype.update = function update$1 (rawRootModule) { update([], this.root, rawRootModule); }; ModuleCollection.prototype.register = function register (path, rawModule, runtime) { var this$1$1 = this; if ( runtime === void 0 ) runtime = true; { assertRawModule(path, rawModule); } var newModule = new Module(rawModule, runtime); if (path.length === 0) { this.root = newModule; } else { var parent = this.get(path.slice(0, -1)); parent.addChild(path[path.length - 1], newModule); } // register nested modules if (rawModule.modules) { forEachValue(rawModule.modules, function (rawChildModule, key) { this$1$1.register(path.concat(key), rawChildModule, runtime); }); } }; ModuleCollection.prototype.unregister = function unregister (path) { var parent = this.get(path.slice(0, -1)); var key = path[path.length - 1]; var child = parent.getChild(key); if (!child) { { console.warn( "[vuex] trying to unregister module '" + key + "', which is " + "not registered" ); } return } if (!child.runtime) { return } parent.removeChild(key); }; ModuleCollection.prototype.isRegistered = function isRegistered (path) { var parent = this.get(path.slice(0, -1)); var key = path[path.length - 1]; if (parent) { return parent.hasChild(key) } return false }; function update (path, targetModule, newModule) { { assertRawModule(path, newModule); } // update target module targetModule.update(newModule); // update nested modules if (newModule.modules) { for (var key in newModule.modules) { if (!targetModule.getChild(key)) { { console.warn( "[vuex] trying to add a new module '" + key + "' on hot reloading, " + 'manual reload is needed' ); } return } update( path.concat(key), targetModule.getChild(key), newModule.modules[key] ); } } } var functionAssert = { assert: function (value) { return typeof value === 'function'; }, expected: 'function' }; var objectAssert = { assert: function (value) { return typeof value === 'function' || (typeof value === 'object' && typeof value.handler === 'function'); }, expected: 'function or object with "handler" function' }; var assertTypes = { getters: functionAssert, mutations: functionAssert, actions: objectAssert }; function assertRawModule (path, rawModule) { Object.keys(assertTypes).forEach(function (key) { if (!rawModule[key]) { return } var assertOptions = assertTypes[key]; forEachValue(rawModule[key], function (value, type) { assert( assertOptions.assert(value), makeAssertionMessage(path, key, type, value, assertOptions.expected) ); }); }); } function makeAssertionMessage (path, key, type, value, expected) { var buf = key + " should be " + expected + " but \"" + key + "." + type + "\""; if (path.length > 0) { buf += " in module \"" + (path.join('.')) + "\""; } buf += " is " + (JSON.stringify(value)) + "."; return buf } function createStore (options) { return new Store(options) } var Store = function Store (options) { var this$1$1 = this; if ( options === void 0 ) options = {}; { assert(typeof Promise !== 'undefined', "vuex requires a Promise polyfill in this browser."); assert(this instanceof Store, "store must be called with the new operator."); } var plugins = options.plugins; if ( plugins === void 0 ) plugins = []; var strict = options.strict; if ( strict === void 0 ) strict = false; var devtools = options.devtools; // store internal state this._committing = false; this._actions = Object.create(null); this._actionSubscribers = []; this._mutations = Object.create(null); this._wrappedGetters = Object.create(null); this._modules = new ModuleCollection(options); this._modulesNamespaceMap = Object.create(null); this._subscribers = []; this._makeLocalGettersCache = Object.create(null); this._devtools = devtools; // bind commit and dispatch to self var store = this; var ref = this; var dispatch = ref.dispatch; var commit = ref.commit; this.dispatch = function boundDispatch (type, payload) { return dispatch.call(store, type, payload) }; this.commit = function boundCommit (type, payload, options) { return commit.call(store, type, payload, options) }; // strict mode this.strict = strict; var state = this._modules.root.state; // init root module. // this also recursively registers all sub-modules // and collects all module getters inside this._wrappedGetters installModule(this, state, [], this._modules.root); // initialize the store state, which is responsible for the reactivity // (also registers _wrappedGetters as computed properties) resetStoreState(this, state); // apply plugins plugins.forEach(function (plugin) { return plugin(this$1$1); }); }; var prototypeAccessors = { state: { configurable: true } }; Store.prototype.install = function install (app, injectKey) { app.provide(injectKey || storeKey, this); app.config.globalProperties.$store = this; var useDevtools = this._devtools !== undefined ? this._devtools : true ; if (useDevtools) { addDevtools(app, this); } }; prototypeAccessors.state.get = function () { return this._state.data }; prototypeAccessors.state.set = function (v) { { assert(false, "use store.replaceState() to explicit replace store state."); } }; Store.prototype.commit = function commit (_type, _payload, _options) { var this$1$1 = this; // check object-style commit var ref = unifyObjectStyle(_type, _payload, _options); var type = ref.type; var payload = ref.payload; var options = ref.options; var mutation = { type: type, payload: payload }; var entry = this._mutations[type]; if (!entry) { { console.error(("[vuex] unknown mutation type: " + type)); } return } this._withCommit(function () { entry.forEach(function commitIterator (handler) { handler(payload); }); }); this._subscribers .slice() // shallow copy to prevent iterator invalidation if subscriber synchronously calls unsubscribe .forEach(function (sub) { return sub(mutation, this$1$1.state); }); if ( options && options.silent ) { console.warn( "[vuex] mutation type: " + type + ". Silent option has been removed. " + 'Use the filter functionality in the vue-devtools' ); } }; Store.prototype.dispatch = function dispatch (_type, _payload) { var this$1$1 = this; // check object-style dispatch var ref = unifyObjectStyle(_type, _payload); var type = ref.type; var payload = ref.payload; var action = { type: type, payload: payload }; var entry = this._actions[type]; if (!entry) { { console.error(("[vuex] unknown action type: " + type)); } return } try { this._actionSubscribers .slice() // shallow copy to prevent iterator invalidation if subscriber synchronously calls unsubscribe .filter(function (sub) { return sub.before; }) .forEach(function (sub) { return sub.before(action, this$1$1.state); }); } catch (e) { { console.warn("[vuex] error in before action subscribers: "); console.error(e); } } var result = entry.length > 1 ? Promise.all(entry.map(function (handler) { return handler(payload); })) : entry[0](payload); return new Promise(function (resolve, reject) { result.then(function (res) { try { this$1$1._actionSubscribers .filter(function (sub) { return sub.after; }) .forEach(function (sub) { return sub.after(action, this$1$1.state); }); } catch (e) { { console.warn("[vuex] error in after action subscribers: "); console.error(e); } } resolve(res); }, function (error) { try { this$1$1._actionSubscribers .filter(function (sub) { return sub.error; }) .forEach(function (sub) { return sub.error(action, this$1$1.state, error); }); } catch (e) { { console.warn("[vuex] error in error action subscribers: "); console.error(e); } } reject(error); }); }) }; Store.prototype.subscribe = function subscribe (fn, options) { return genericSubscribe(fn, this._subscribers, options) }; Store.prototype.subscribeAction = function subscribeAction (fn, options) { var subs = typeof fn === 'function' ? { before: fn } : fn; return genericSubscribe(subs, this._actionSubscribers, options) }; Store.prototype.watch = function watch$1 (getter, cb, options) { var this$1$1 = this; { assert(typeof getter === 'function', "store.watch only accepts a function."); } return vue.watch(function () { return getter(this$1$1.state, this$1$1.getters); }, cb, Object.assign({}, options)) }; Store.prototype.replaceState = function replaceState (state) { var this$1$1 = this; this._withCommit(function () { this$1$1._state.data = state; }); }; Store.prototype.registerModule = function registerModule (path, rawModule, options) { if ( options === void 0 ) options = {}; if (typeof path === 'string') { path = [path]; } { assert(Array.isArray(path), "module path must be a string or an Array."); assert(path.length > 0, 'cannot register the root module by using registerModule.'); } this._modules.register(path, rawModule); installModule(this, this.state, path, this._modules.get(path), options.preserveState); // reset store to update getters... resetStoreState(this, this.state); }; Store.prototype.unregisterModule = function unregisterModule (path) { var this$1$1 = this; if (typeof path === 'string') { path = [path]; } { assert(Array.isArray(path), "module path must be a string or an Array."); } this._modules.unregister(path); this._withCommit(function () { var parentState = getNestedState(this$1$1.state, path.slice(0, -1)); delete parentState[path[path.length - 1]]; }); resetStore(this); }; Store.prototype.hasModule = function hasModule (path) { if (typeof path === 'string') { path = [path]; } { assert(Array.isArray(path), "module path must be a string or an Array."); } return this._modules.isRegistered(path) }; Store.prototype.hotUpdate = function hotUpdate (newOptions) { this._modules.update(newOptions); resetStore(this, true); }; Store.prototype._withCommit = function _withCommit (fn) { var committing = this._committing; this._committing = true; fn(); this._committing = committing; }; Object.defineProperties( Store.prototype, prototypeAccessors ); /** * Reduce the code which written in Vue.js for getting the state. * @param {String} [namespace] - Module's namespace * @param {Object|Array} states # Object's item can be a function which accept state and getters for param, you can do something for state and getters in it. * @param {Object} */ var mapState = normalizeNamespace(function (namespace, states) { var res = {}; if (!isValidMap(states)) { console.error('[vuex] mapState: mapper parameter must be either an Array or an Object'); } normalizeMap(states).forEach(function (ref) { var key = ref.key; var val = ref.val; res[key] = function mappedState () { var state = this.$store.state; var getters = this.$store.getters; if (namespace) { var module = getModuleByNamespace(this.$store, 'mapState', namespace); if (!module) { return } state = module.context.state; getters = module.context.getters; } return typeof val === 'function' ? val.call(this, state, getters) : state[val] }; // mark vuex getter for devtools res[key].vuex = true; }); return res }); /** * Reduce the code which written in Vue.js for committing the mutation * @param {String} [namespace] - Module's namespace * @param {Object|Array} mutations # Object's item can be a function which accept `commit` function as the first param, it can accept another params. You can commit mutation and do any other things in this function. specially, You need to pass anthor params from the mapped function. * @return {Object} */ var mapMutations = normalizeNamespace(function (namespace, mutations) { var res = {}; if (!isValidMap(mutations)) { console.error('[vuex] mapMutations: mapper parameter must be either an Array or an Object'); } normalizeMap(mutations).forEach(function (ref) { var key = ref.key; var val = ref.val; res[key] = function mappedMutation () { var args = [], len = arguments.length; while ( len-- ) args[ len ] = arguments[ len ]; // Get the commit method from store var commit = this.$store.commit; if (namespace) { var module = getModuleByNamespace(this.$store, 'mapMutations', namespace); if (!module) { return } commit = module.context.commit; } return typeof val === 'function' ? val.apply(this, [commit].concat(args)) : commit.apply(this.$store, [val].concat(args)) }; }); return res }); /** * Reduce the code which written in Vue.js for getting the getters * @param {String} [namespace] - Module's namespace * @param {Object|Array} getters * @return {Object} */ var mapGetters = normalizeNamespace(function (namespace, getters) { var res = {}; if (!isValidMap(getters)) { console.error('[vuex] mapGetters: mapper parameter must be either an Array or an Object'); } normalizeMap(getters).forEach(function (ref) { var key = ref.key; var val = ref.val; // The namespace has been mutated by normalizeNamespace val = namespace + val; res[key] = function mappedGetter () { if (namespace && !getModuleByNamespace(this.$store, 'mapGetters', namespace)) { return } if (!(val in this.$store.getters)) { console.error(("[vuex] unknown getter: " + val)); return } return this.$store.getters[val] }; // mark vuex getter for devtools res[key].vuex = true; }); return res }); /** * Reduce the code which written in Vue.js for dispatch the action * @param {String} [namespace] - Module's namespace * @param {Object|Array} actions # Object's item can be a function which accept `dispatch` function as the first param, it can accept anthor params. You can dispatch action and do any other things in this function. specially, You need to pass anthor params from the mapped function. * @return {Object} */ var mapActions = normalizeNamespace(function (namespace, actions) { var res = {}; if (!isValidMap(actions)) { console.error('[vuex] mapActions: mapper parameter must be either an Array or an Object'); } normalizeMap(actions).forEach(function (ref) { var key = ref.key; var val = ref.val; res[key] = function mappedAction () { var args = [], len = arguments.length; while ( len-- ) args[ len ] = arguments[ len ]; // get dispatch function from store var dispatch = this.$store.dispatch; if (namespace) { var module = getModuleByNamespace(this.$store, 'mapActions', namespace); if (!module) { return } dispatch = module.context.dispatch; } return typeof val === 'function' ? val.apply(this, [dispatch].concat(args)) : dispatch.apply(this.$store, [val].concat(args)) }; }); return res }); /** * Rebinding namespace param for mapXXX function in special scoped, and return them by simple object * @param {String} namespace * @return {Object} */ var createNamespacedHelpers = function (namespace) { return ({ mapState: mapState.bind(null, namespace), mapGetters: mapGetters.bind(null, namespace), mapMutations: mapMutations.bind(null, namespace), mapActions: mapActions.bind(null, namespace) }); }; /** * Normalize the map * normalizeMap([1, 2, 3]) => [ { key: 1, val: 1 }, { key: 2, val: 2 }, { key: 3, val: 3 } ] * normalizeMap({a: 1, b: 2, c: 3}) => [ { key: 'a', val: 1 }, { key: 'b', val: 2 }, { key: 'c', val: 3 } ] * @param {Array|Object} map * @return {Object} */ function normalizeMap (map) { if (!isValidMap(map)) { return [] } return Array.isArray(map) ? map.map(function (key) { return ({ key: key, val: key }); }) : Object.keys(map).map(function (key) { return ({ key: key, val: map[key] }); }) } /** * Validate whether given map is valid or not * @param {*} map * @return {Boolean} */ function isValidMap (map) { return Array.isArray(map) || isObject(map) } /** * Return a function expect two param contains namespace and map. it will normalize the namespace and then the param's function will handle the new namespace and the map. * @param {Function} fn * @return {Function} */ function normalizeNamespace (fn) { return function (namespace, map) { if (typeof namespace !== 'string') { map = namespace; namespace = ''; } else if (namespace.charAt(namespace.length - 1) !== '/') { namespace += '/'; } return fn(namespace, map) } } /** * Search a special module from store by namespace. if module not exist, print error message. * @param {Object} store * @param {String} helper * @param {String} namespace * @return {Object} */ function getModuleByNamespace (store, helper, namespace) { var module = store._modulesNamespaceMap[namespace]; if (!module) { console.error(("[vuex] module namespace not found in " + helper + "(): " + namespace)); } return module } // Credits: borrowed code from fcomb/redux-logger function createLogger (ref) { if ( ref === void 0 ) ref = {}; var collapsed = ref.collapsed; if ( collapsed === void 0 ) collapsed = true; var filter = ref.filter; if ( filter === void 0 ) filter = function (mutation, stateBefore, stateAfter) { return true; }; var transformer = ref.transformer; if ( transformer === void 0 ) transformer = function (state) { return state; }; var mutationTransformer = ref.mutationTransformer; if ( mutationTransformer === void 0 ) mutationTransformer = function (mut) { return mut; }; var actionFilter = ref.actionFilter; if ( actionFilter === void 0 ) actionFilter = function (action, state) { return true; }; var actionTransformer = ref.actionTransformer; if ( actionTransformer === void 0 ) actionTransformer = function (act) { return act; }; var logMutations = ref.logMutations; if ( logMutations === void 0 ) logMutations = true; var logActions = ref.logActions; if ( logActions === void 0 ) logActions = true; var logger = ref.logger; if ( logger === void 0 ) logger = console; return function (store) { var prevState = deepCopy(store.state); if (typeof logger === 'undefined') { return } if (logMutations) { store.subscribe(function (mutation, state) { var nextState = deepCopy(state); if (filter(mutation, prevState, nextState)) { var formattedTime = getFormattedTime(); var formattedMutation = mutationTransformer(mutation); var message = "mutation " + (mutation.type) + formattedTime; startMessage(logger, message, collapsed); logger.log('%c prev state', 'color: #9E9E9E; font-weight: bold', transformer(prevState)); logger.log('%c mutation', 'color: #03A9F4; font-weight: bold', formattedMutation); logger.log('%c next state', 'color: #4CAF50; font-weight: bold', transformer(nextState)); endMessage(logger); } prevState = nextState; }); } if (logActions) { store.subscribeAction(function (action, state) { if (actionFilter(action, state)) { var formattedTime = getFormattedTime(); var formattedAction = actionTransformer(action); var message = "action " + (action.type) + formattedTime; startMessage(logger, message, collapsed); logger.log('%c action', 'color: #03A9F4; font-weight: bold', formattedAction); endMessage(logger); } }); } } } function startMessage (logger, message, collapsed) { var startMessage = collapsed ? logger.groupCollapsed : logger.group; // render try { startMessage.call(logger, message); } catch (e) { logger.log(message); } } function endMessage (logger) { try { logger.groupEnd(); } catch (e) { logger.log('—— log end ——'); } } function getFormattedTime () { var time = new Date(); return (" @ " + (pad(time.getHours(), 2)) + ":" + (pad(time.getMinutes(), 2)) + ":" + (pad(time.getSeconds(), 2)) + "." + (pad(time.getMilliseconds(), 3))) } function repeat (str, times) { return (new Array(times + 1)).join(str) } function pad (num, maxLength) { return repeat('0', maxLength - num.toString().length) + num } var index_cjs = { version: '4.0.2', Store: Store, storeKey: storeKey, createStore: createStore, useStore: useStore, mapState: mapState, mapMutations: mapMutations, mapGetters: mapGetters, mapActions: mapActions, createNamespacedHelpers: createNamespacedHelpers, createLogger: createLogger }; return index_cjs; }(Vue)); PK ! ���; ; LICENSEnu �Iw�� The MIT License (MIT) Copyright (c) 2015-present Evan You 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. PK ! �Ξo; ; vuex.global.prod.jsnu �Iw�� /*! * vuex v4.0.2 * (c) 2021 Evan You * @license MIT */ var Vuex=function(t){"use strict";var e="store";function n(){return"undefined"!=typeof navigator?window:"undefined"!=typeof global?global:{}}function o(t,e){var o=n().__VUE_DEVTOOLS_GLOBAL_HOOK__;if(o)o.emit("devtools-plugin:setup",t,e);else{var r=n();(r.__VUE_DEVTOOLS_PLUGINS__=r.__VUE_DEVTOOLS_PLUGINS__||[]).push({pluginDescriptor:t,setupFn:e})}}function r(t,e){if(void 0===e&&(e=[]),null===t||"object"!=typeof t)return t;var n,o=(n=function(e){return e.original===t},e.filter(n)[0]);if(o)return o.copy;var i=Array.isArray(t)?[]:{};return e.push({original:t,copy:i}),Object.keys(t).forEach((function(n){i[n]=r(t[n],e)})),i}function i(t,e){Object.keys(t).forEach((function(n){return e(t[n],n)}))}function a(t){return null!==t&&"object"==typeof t}function c(t,e,n){return e.indexOf(t)<0&&(n&&n.prepend?e.unshift(t):e.push(t)),function(){var n=e.indexOf(t);n>-1&&e.splice(n,1)}}function s(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;l(t,n,[],t._modules.root,!0),u(t,n,e)}function u(e,n,o){var r=e._state;e.getters={},e._makeLocalGettersCache=Object.create(null);var a=e._wrappedGetters,c={};i(a,(function(t,n){c[n]=function(t,e){return function(){return t(e)}}(t,e),Object.defineProperty(e.getters,n,{get:function(){return c[n]()},enumerable:!0})})),e._state=t.reactive({data:n}),e.strict&&function(e){t.watch((function(){return e._state.data}),(function(){}),{deep:!0,flush:"sync"})}(e),r&&o&&e._withCommit((function(){r.data=null}))}function l(t,e,n,o,r){var i=!n.length,a=t._modules.getNamespace(n);if(o.namespaced&&(t._modulesNamespaceMap[a],t._modulesNamespaceMap[a]=o),!i&&!r){var c=p(e,n.slice(0,-1)),s=n[n.length-1];t._withCommit((function(){c[s]=o.state}))}var u=o.context=function(t,e,n){var o=""===e,r={dispatch:o?t.dispatch:function(n,o,r){var i=d(n,o,r),a=i.payload,c=i.options,s=i.type;return c&&c.root||(s=e+s),t.dispatch(s,a)},commit:o?t.commit:function(n,o,r){var i=d(n,o,r),a=i.payload,c=i.options,s=i.type;c&&c.root||(s=e+s),t.commit(s,a,c)}};return Object.defineProperties(r,{getters:{get:o?function(){return t.getters}:function(){return f(t,e)}},state:{get:function(){return p(t.state,n)}}}),r}(t,a,n);o.forEachMutation((function(e,n){!function(t,e,n,o){(t._mutations[e]||(t._mutations[e]=[])).push((function(e){n.call(t,o.state,e)}))}(t,a+n,e,u)})),o.forEachAction((function(e,n){var o=e.root?n:a+n,r=e.handler||e;!function(t,e,n,o){(t._actions[e]||(t._actions[e]=[])).push((function(e){var r,i=n.call(t,{dispatch:o.dispatch,commit:o.commit,getters:o.getters,state:o.state,rootGetters:t.getters,rootState:t.state},e);return(r=i)&&"function"==typeof r.then||(i=Promise.resolve(i)),t._devtoolHook?i.catch((function(e){throw t._devtoolHook.emit("vuex:error",e),e})):i}))}(t,o,r,u)})),o.forEachGetter((function(e,n){!function(t,e,n,o){if(t._wrappedGetters[e])return;t._wrappedGetters[e]=function(t){return n(o.state,o.getters,t.state,t.getters)}}(t,a+n,e,u)})),o.forEachChild((function(o,i){l(t,e,n.concat(i),o,r)}))}function f(t,e){if(!t._makeLocalGettersCache[e]){var n={},o=e.length;Object.keys(t.getters).forEach((function(r){if(r.slice(0,o)===e){var i=r.slice(o);Object.defineProperty(n,i,{get:function(){return t.getters[r]},enumerable:!0})}})),t._makeLocalGettersCache[e]=n}return t._makeLocalGettersCache[e]}function p(t,e){return e.reduce((function(t,e){return t[e]}),t)}function d(t,e,n){return a(t)&&t.type&&(n=e,e=t,t=t.type),{type:t,payload:e,options:n}}var h="vuex:mutations",v="vuex:actions",m="vuex",g=0;function y(t,e){o({id:"org.vuejs.vuex",app:t,label:"Vuex",homepage:"https://next.vuex.vuejs.org/",logo:"https://vuejs.org/images/icons/favicon-96x96.png",packageName:"vuex",componentStateTypes:["vuex bindings"]},(function(n){n.addTimelineLayer({id:h,label:"Vuex Mutations",color:_}),n.addTimelineLayer({id:v,label:"Vuex Actions",color:_}),n.addInspector({id:m,label:"Vuex",icon:"storage",treeFilterPlaceholder:"Filter stores..."}),n.on.getInspectorTree((function(n){if(n.app===t&&n.inspectorId===m)if(n.filter){var o=[];O(o,e._modules.root,n.filter,""),n.rootNodes=o}else n.rootNodes=[E(e._modules.root,"")]})),n.on.getInspectorState((function(n){if(n.app===t&&n.inspectorId===m){var o=n.nodeId;f(e,o),n.state=function(t,e,n){e="root"===n?e:e[n];var o=Object.keys(e),r={state:Object.keys(t.state).map((function(e){return{key:e,editable:!0,value:t.state[e]}}))};if(o.length){var i=function(t){var e={};return Object.keys(t).forEach((function(n){var o=n.split("/");if(o.length>1){var r=e,i=o.pop();o.forEach((function(t){r[t]||(r[t]={_custom:{value:{},display:t,tooltip:"Module",abstract:!0}}),r=r[t]._custom.value})),r[i]=j((function(){return t[n]}))}else e[n]=j((function(){return t[n]}))})),e}(e);r.getters=Object.keys(i).map((function(t){return{key:t.endsWith("/")?w(t):t,editable:!1,value:j((function(){return i[t]}))}}))}return r}((r=e._modules,(a=(i=o).split("/").filter((function(t){return t}))).reduce((function(t,e,n){var o=t[e];if(!o)throw new Error('Missing module "'+e+'" for path "'+i+'".');return n===a.length-1?o:o._children}),"root"===i?r:r.root._children)),"root"===o?e.getters:e._makeLocalGettersCache,o)}var r,i,a})),n.on.editInspectorState((function(n){if(n.app===t&&n.inspectorId===m){var o=n.nodeId,r=n.path;"root"!==o&&(r=o.split("/").filter(Boolean).concat(r)),e._withCommit((function(){n.set(e._state.data,r,n.state.value)}))}})),e.subscribe((function(t,e){var o={};t.payload&&(o.payload=t.payload),o.state=e,n.notifyComponentUpdate(),n.sendInspectorTree(m),n.sendInspectorState(m),n.addTimelineEvent({layerId:h,event:{time:Date.now(),title:t.type,data:o}})})),e.subscribeAction({before:function(t,e){var o={};t.payload&&(o.payload=t.payload),t._id=g++,t._time=Date.now(),o.state=e,n.addTimelineEvent({layerId:v,event:{time:t._time,title:t.type,groupId:t._id,subtitle:"start",data:o}})},after:function(t,e){var o={},r=Date.now()-t._time;o.duration={_custom:{type:"duration",display:r+"ms",tooltip:"Action duration",value:r}},t.payload&&(o.payload=t.payload),o.state=e,n.addTimelineEvent({layerId:v,event:{time:Date.now(),title:t.type,groupId:t._id,subtitle:"end",data:o}})}})}))}var _=8702998,b={label:"namespaced",textColor:16777215,backgroundColor:6710886};function w(t){return t&&"root"!==t?t.split("/").slice(-2,-1)[0]:"Root"}function E(t,e){return{id:e||"root",label:w(e),tags:t.namespaced?[b]:[],children:Object.keys(t._children).map((function(n){return E(t._children[n],e+n+"/")}))}}function O(t,e,n,o){o.includes(n)&&t.push({id:o||"root",label:o.endsWith("/")?o.slice(0,o.length-1):o||"Root",tags:e.namespaced?[b]:[]}),Object.keys(e._children).forEach((function(r){O(t,e._children[r],n,o+r+"/")}))}function j(t){try{return t()}catch(t){return t}}var C=function(t,e){this.runtime=e,this._children=Object.create(null),this._rawModule=t;var n=t.state;this.state=("function"==typeof n?n():n)||{}},M={namespaced:{configurable:!0}};M.namespaced.get=function(){return!!this._rawModule.namespaced},C.prototype.addChild=function(t,e){this._children[t]=e},C.prototype.removeChild=function(t){delete this._children[t]},C.prototype.getChild=function(t){return this._children[t]},C.prototype.hasChild=function(t){return t in this._children},C.prototype.update=function(t){this._rawModule.namespaced=t.namespaced,t.actions&&(this._rawModule.actions=t.actions),t.mutations&&(this._rawModule.mutations=t.mutations),t.getters&&(this._rawModule.getters=t.getters)},C.prototype.forEachChild=function(t){i(this._children,t)},C.prototype.forEachGetter=function(t){this._rawModule.getters&&i(this._rawModule.getters,t)},C.prototype.forEachAction=function(t){this._rawModule.actions&&i(this._rawModule.actions,t)},C.prototype.forEachMutation=function(t){this._rawModule.mutations&&i(this._rawModule.mutations,t)},Object.defineProperties(C.prototype,M);var k=function(t){this.register([],t,!1)};function x(t,e,n){if(e.update(n),n.modules)for(var o in n.modules){if(!e.getChild(o))return;x(t.concat(o),e.getChild(o),n.modules[o])}}k.prototype.get=function(t){return t.reduce((function(t,e){return t.getChild(e)}),this.root)},k.prototype.getNamespace=function(t){var e=this.root;return t.reduce((function(t,n){return t+((e=e.getChild(n)).namespaced?n+"/":"")}),"")},k.prototype.update=function(t){x([],this.root,t)},k.prototype.register=function(t,e,n){var o=this;void 0===n&&(n=!0);var r=new C(e,n);0===t.length?this.root=r:this.get(t.slice(0,-1)).addChild(t[t.length-1],r);e.modules&&i(e.modules,(function(e,r){o.register(t.concat(r),e,n)}))},k.prototype.unregister=function(t){var e=this.get(t.slice(0,-1)),n=t[t.length-1],o=e.getChild(n);o&&o.runtime&&e.removeChild(n)},k.prototype.isRegistered=function(t){var e=this.get(t.slice(0,-1)),n=t[t.length-1];return!!e&&e.hasChild(n)};var S=function(t){var e=this;void 0===t&&(t={});var n=t.plugins;void 0===n&&(n=[]);var o=t.strict;void 0===o&&(o=!1);var r=t.devtools;this._committing=!1,this._actions=Object.create(null),this._actionSubscribers=[],this._mutations=Object.create(null),this._wrappedGetters=Object.create(null),this._modules=new k(t),this._modulesNamespaceMap=Object.create(null),this._subscribers=[],this._makeLocalGettersCache=Object.create(null),this._devtools=r;var i=this,a=this.dispatch,c=this.commit;this.dispatch=function(t,e){return a.call(i,t,e)},this.commit=function(t,e,n){return c.call(i,t,e,n)},this.strict=o;var s=this._modules.root.state;l(this,s,[],this._modules.root),u(this,s),n.forEach((function(t){return t(e)}))},A={state:{configurable:!0}};S.prototype.install=function(t,n){t.provide(n||e,this),t.config.globalProperties.$store=this,void 0!==this._devtools&&this._devtools&&y(t,this)},A.state.get=function(){return this._state.data},A.state.set=function(t){},S.prototype.commit=function(t,e,n){var o=this,r=d(t,e,n),i=r.type,a=r.payload,c={type:i,payload:a},s=this._mutations[i];s&&(this._withCommit((function(){s.forEach((function(t){t(a)}))})),this._subscribers.slice().forEach((function(t){return t(c,o.state)})))},S.prototype.dispatch=function(t,e){var n=this,o=d(t,e),r=o.type,i=o.payload,a={type:r,payload:i},c=this._actions[r];if(c){try{this._actionSubscribers.slice().filter((function(t){return t.before})).forEach((function(t){return t.before(a,n.state)}))}catch(t){}var s=c.length>1?Promise.all(c.map((function(t){return t(i)}))):c[0](i);return new Promise((function(t,e){s.then((function(e){try{n._actionSubscribers.filter((function(t){return t.after})).forEach((function(t){return t.after(a,n.state)}))}catch(t){}t(e)}),(function(t){try{n._actionSubscribers.filter((function(t){return t.error})).forEach((function(e){return e.error(a,n.state,t)}))}catch(t){}e(t)}))}))}},S.prototype.subscribe=function(t,e){return c(t,this._subscribers,e)},S.prototype.subscribeAction=function(t,e){return c("function"==typeof t?{before:t}:t,this._actionSubscribers,e)},S.prototype.watch=function(e,n,o){var r=this;return t.watch((function(){return e(r.state,r.getters)}),n,Object.assign({},o))},S.prototype.replaceState=function(t){var e=this;this._withCommit((function(){e._state.data=t}))},S.prototype.registerModule=function(t,e,n){void 0===n&&(n={}),"string"==typeof t&&(t=[t]),this._modules.register(t,e),l(this,this.state,t,this._modules.get(t),n.preserveState),u(this,this.state)},S.prototype.unregisterModule=function(t){var e=this;"string"==typeof t&&(t=[t]),this._modules.unregister(t),this._withCommit((function(){delete p(e.state,t.slice(0,-1))[t[t.length-1]]})),s(this)},S.prototype.hasModule=function(t){return"string"==typeof t&&(t=[t]),this._modules.isRegistered(t)},S.prototype.hotUpdate=function(t){this._modules.update(t),s(this,!0)},S.prototype._withCommit=function(t){var e=this._committing;this._committing=!0,t(),this._committing=e},Object.defineProperties(S.prototype,A);var G=P((function(t,e){var n={};return T(e).forEach((function(e){var o=e.key,r=e.val;n[o]=function(){var e=this.$store.state,n=this.$store.getters;if(t){var o=V(this.$store,"mapState",t);if(!o)return;e=o.context.state,n=o.context.getters}return"function"==typeof r?r.call(this,e,n):e[r]},n[o].vuex=!0})),n})),I=P((function(t,e){var n={};return T(e).forEach((function(e){var o=e.key,r=e.val;n[o]=function(){for(var e=[],n=arguments.length;n--;)e[n]=arguments[n];var o=this.$store.commit;if(t){var i=V(this.$store,"mapMutations",t);if(!i)return;o=i.context.commit}return"function"==typeof r?r.apply(this,[o].concat(e)):o.apply(this.$store,[r].concat(e))}})),n})),L=P((function(t,e){var n={};return T(e).forEach((function(e){var o=e.key,r=e.val;r=t+r,n[o]=function(){if(!t||V(this.$store,"mapGetters",t))return this.$store.getters[r]},n[o].vuex=!0})),n})),N=P((function(t,e){var n={};return T(e).forEach((function(e){var o=e.key,r=e.val;n[o]=function(){for(var e=[],n=arguments.length;n--;)e[n]=arguments[n];var o=this.$store.dispatch;if(t){var i=V(this.$store,"mapActions",t);if(!i)return;o=i.context.dispatch}return"function"==typeof r?r.apply(this,[o].concat(e)):o.apply(this.$store,[r].concat(e))}})),n}));function T(t){return function(t){return Array.isArray(t)||a(t)}(t)?Array.isArray(t)?t.map((function(t){return{key:t,val:t}})):Object.keys(t).map((function(e){return{key:e,val:t[e]}})):[]}function P(t){return function(e,n){return"string"!=typeof e?(n=e,e=""):"/"!==e.charAt(e.length-1)&&(e+="/"),t(e,n)}}function V(t,e,n){return t._modulesNamespaceMap[n]}function $(t,e,n){var o=n?t.groupCollapsed:t.group;try{o.call(t,e)}catch(n){t.log(e)}}function D(t){try{t.groupEnd()}catch(e){t.log("—— log end ——")}}function F(){var t=new Date;return" @ "+U(t.getHours(),2)+":"+U(t.getMinutes(),2)+":"+U(t.getSeconds(),2)+"."+U(t.getMilliseconds(),3)}function U(t,e){return n="0",o=e-t.toString().length,new Array(o+1).join(n)+t;var n,o}return{version:"4.0.2",Store:S,storeKey:e,createStore:function(t){return new S(t)},useStore:function(n){return void 0===n&&(n=null),t.inject(null!==n?n:e)},mapState:G,mapMutations:I,mapGetters:L,mapActions:N,createNamespacedHelpers:function(t){return{mapState:G.bind(null,t),mapGetters:L.bind(null,t),mapMutations:I.bind(null,t),mapActions:N.bind(null,t)}},createLogger:function(t){void 0===t&&(t={});var e=t.collapsed;void 0===e&&(e=!0);var n=t.filter;void 0===n&&(n=function(t,e,n){return!0});var o=t.transformer;void 0===o&&(o=function(t){return t});var i=t.mutationTransformer;void 0===i&&(i=function(t){return t});var a=t.actionFilter;void 0===a&&(a=function(t,e){return!0});var c=t.actionTransformer;void 0===c&&(c=function(t){return t});var s=t.logMutations;void 0===s&&(s=!0);var u=t.logActions;void 0===u&&(u=!0);var l=t.logger;return void 0===l&&(l=console),function(t){var f=r(t.state);void 0!==l&&(s&&t.subscribe((function(t,a){var c=r(a);if(n(t,f,c)){var s=F(),u=i(t),p="mutation "+t.type+s;$(l,p,e),l.log("%c prev state","color: #9E9E9E; font-weight: bold",o(f)),l.log("%c mutation","color: #03A9F4; font-weight: bold",u),l.log("%c next state","color: #4CAF50; font-weight: bold",o(c)),D(l)}f=c})),u&&t.subscribeAction((function(t,n){if(a(t,n)){var o=F(),r=c(t),i="action "+t.type+o;$(l,i,e),l.log("%c action","color: #03A9F4; font-weight: bold",r),D(l)}})))}}}}(Vue); PK ! I۷� � README.mdnu �Iw�� PK ! �!�z`� `� � vuex.global.jsnu �Iw�� PK ! ���; ; �� LICENSEnu �Iw�� PK ! �Ξo; ; � vuex.global.prod.jsnu �Iw�� PK 1 ^�
| ver. 1.1 | |
.
| PHP 8.4.18 | Ð“ÐµÐ½ÐµÑ€Ð°Ñ†Ð¸Ñ Ñтраницы: 0 |
proxy
|
phpinfo
|
ÐаÑтройка