%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /proc/self/root/home/bitrix/www/bitrix/js/ui/vue/vuex/
Upload File :
Create Path :
Current File : //proc/self/root/home/bitrix/www/bitrix/js/ui/vue/vuex/vuex.min.js

(function(t,e){typeof exports==="object"&&typeof module!=="undefined"?module.exports=e():typeof define==="function"&&define.amd?define(e):t.Vuex=e()})(this,function(){"use strict";var t=function(t){var e=Number(t.version.split(".")[0]);if(e>=2){t.mixin({beforeCreate:r})}else{var n=t.prototype._init;t.prototype._init=function(t){if(t===void 0)t={};t.init=t.init?[r].concat(t.init):r;n.call(this,t)}}function r(){var t=this.$options;if(t.store){this.$store=typeof t.store==="function"?t.store():t.store}else if(t.parent&&t.parent.$store){this.$store=t.parent.$store}}};var e=typeof window!=="undefined"&&window.__VUE_DEVTOOLS_GLOBAL_HOOK__;function n(t){if(!e){return}t._devtoolHook=e;e.emit("vuex:init",t);e.on("vuex:travel-to-state",function(e){t.replaceState(e)});t.subscribe(function(t,n){e.emit("vuex:mutation",t,n)})}function r(t,e){Object.keys(t).forEach(function(n){return e(t[n],n)})}function o(t){return t!==null&&typeof t==="object"}function i(t){return t&&typeof t.then==="function"}function a(t,e){if(!t){throw new Error("[vuex] "+e)}}var s=function t(e,n){this.runtime=n;this._children=Object.create(null);this._rawModule=e;var r=e.state;this.state=(typeof r==="function"?r():r)||{}};var u={namespaced:{configurable:true}};u.namespaced.get=function(){return!!this._rawModule.namespaced};s.prototype.addChild=function t(e,n){this._children[e]=n};s.prototype.removeChild=function t(e){delete this._children[e]};s.prototype.getChild=function t(e){return this._children[e]};s.prototype.update=function t(e){this._rawModule.namespaced=e.namespaced;if(e.actions){this._rawModule.actions=e.actions}if(e.mutations){this._rawModule.mutations=e.mutations}if(e.getters){this._rawModule.getters=e.getters}};s.prototype.forEachChild=function t(e){r(this._children,e)};s.prototype.forEachGetter=function t(e){if(this._rawModule.getters){r(this._rawModule.getters,e)}};s.prototype.forEachAction=function t(e){if(this._rawModule.actions){r(this._rawModule.actions,e)}};s.prototype.forEachMutation=function t(e){if(this._rawModule.mutations){r(this._rawModule.mutations,e)}};Object.defineProperties(s.prototype,u);var c=function t(e){this.register([],e,false)};c.prototype.get=function t(e){return e.reduce(function(t,e){return t.getChild(e)},this.root)};c.prototype.getNamespace=function t(e){var n=this.root;return e.reduce(function(t,e){n=n.getChild(e);return t+(n.namespaced?e+"/":"")},"")};c.prototype.update=function t(e){f([],this.root,e)};c.prototype.register=function t(e,n,o){var i=this;if(o===void 0)o=true;{d(e,n)}var a=new s(n,o);if(e.length===0){this.root=a}else{var u=this.get(e.slice(0,-1));u.addChild(e[e.length-1],a)}if(n.modules){r(n.modules,function(t,n){i.register(e.concat(n),t,o)})}};c.prototype.unregister=function t(e){var n=this.get(e.slice(0,-1));var r=e[e.length-1];if(!n.getChild(r).runtime){return}n.removeChild(r)};function f(t,e,n){{d(t,n)}e.update(n);if(n.modules){for(var r in n.modules){if(!e.getChild(r)){{console.warn("[vuex] trying to add a new module '"+r+"' on hot reloading, "+"manual reload is needed")}return}f(t.concat(r),e.getChild(r),n.modules[r])}}}var l={assert:function(t){return typeof t==="function"},expected:"function"};var p={assert:function(t){return typeof t==="function"||typeof t==="object"&&typeof t.handler==="function"},expected:'function or object with "handler" function'};var h={getters:l,mutations:l,actions:p};function d(t,e){Object.keys(h).forEach(function(n){if(!e[n]){return}var o=h[n];r(e[n],function(e,r){a(o.assert(e),v(t,n,r,e,o.expected))})})}function v(t,e,n,r,o){var i=e+" should be "+o+' but "'+e+"."+n+'"';if(t.length>0){i+=' in module "'+t.join(".")+'"'}i+=" is "+JSON.stringify(r)+".";return i}var m;var y=function t(e){var r=this;if(e===void 0)e={};if(!m&&typeof window!=="undefined"&&window.Vue){S(window.Vue)}{a(m,"must call Vue.use(Vuex) before creating a store instance.");a(typeof Promise!=="undefined","vuex requires a Promise polyfill in this browser.");a(this instanceof t,"Store must be called with the new operator.")}var o=e.plugins;if(o===void 0)o=[];var i=e.strict;if(i===void 0)i=false;var s=e.state;if(s===void 0)s={};if(typeof s==="function"){s=s()||{}}this._committing=false;this._actions=Object.create(null);this._actionSubscribers=[];this._mutations=Object.create(null);this._wrappedGetters=Object.create(null);this._modules=new c(e);this._modulesNamespaceMap=Object.create(null);this._subscribers=[];this._watcherVM=new m;var u=this;var f=this;var l=f.dispatch;var p=f.commit;this.dispatch=function t(e,n){return l.call(u,e,n)};this.commit=function t(e,n,r){return p.call(u,e,n,r)};this.strict=i;x(this,s,[],this._modules.root);w(this,s);o.forEach(function(t){return t(r)});if(m.config.devtools){n(this)}};var g={state:{configurable:true}};g.state.get=function(){return this._vm._data.$$state};g.state.set=function(t){{a(false,"Use store.replaceState() to explicit replace store state.")}};y.prototype.commit=function t(e,n,r){var o=this;var i=A(e,n,r);var a=i.type;var s=i.payload;var u=i.options;var c={type:a,payload:s};var f=this._mutations[a];if(!f){{console.error("[vuex] unknown mutation type: "+a)}return}this._withCommit(function(){f.forEach(function t(e){e(s)})});this._subscribers.forEach(function(t){return t(c,o.state)});if("development"!=="production"&&u&&u.silent){console.warn("[vuex] mutation type: "+a+". Silent option has been removed. "+"Use the filter functionality in the vue-devtools")}};y.prototype.dispatch=function t(e,n){var r=this;var o=A(e,n);var i=o.type;var a=o.payload;var s={type:i,payload:a};var u=this._actions[i];if(!u){{console.error("[vuex] unknown action type: "+i)}return}this._actionSubscribers.forEach(function(t){return t(s,r.state)});return u.length>1?Promise.all(u.map(function(t){return t(a)})):u[0](a)};y.prototype.subscribe=function t(e){return _(e,this._subscribers)};y.prototype.subscribeAction=function t(e){return _(e,this._actionSubscribers)};y.prototype.watch=function t(e,n,r){var o=this;{a(typeof e==="function","store.watch only accepts a function.")}return this._watcherVM.$watch(function(){return e(o.state,o.getters)},n,r)};y.prototype.replaceState=function t(e){var n=this;this._withCommit(function(){n._vm._data.$$state=e})};y.prototype.registerModule=function t(e,n,r){if(r===void 0)r={};if(typeof e==="string"){e=[e]}{a(Array.isArray(e),"module path must be a string or an Array.");a(e.length>0,"cannot register the root module by using registerModule.")}this._modules.register(e,n);x(this,this.state,e,this._modules.get(e),r.preserveState);w(this,this.state)};y.prototype.unregisterModule=function t(e){var n=this;if(typeof e==="string"){e=[e]}{a(Array.isArray(e),"module path must be a string or an Array.")}this._modules.unregister(e);this._withCommit(function(){var t=C(n.state,e.slice(0,-1));m.delete(t,e[e.length-1])});b(this)};y.prototype.hotUpdate=function t(e){this._modules.update(e);b(this,true)};y.prototype._withCommit=function t(e){var n=this._committing;this._committing=true;e();this._committing=n};Object.defineProperties(y.prototype,g);function _(t,e){if(e.indexOf(t)<0){e.push(t)}return function(){var n=e.indexOf(t);if(n>-1){e.splice(n,1)}}}function b(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;x(t,n,[],t._modules.root,true);w(t,n,e)}function w(t,e,n){var o=t._vm;t.getters={};var i=t._wrappedGetters;var a={};r(i,function(e,n){a[n]=function(){return e(t)};Object.defineProperty(t.getters,n,{get:function(){return t._vm[n]},enumerable:true})});var s=m.config.silent;m.config.silent=true;t._vm=new m({data:{$$state:e},computed:a});m.config.silent=s;if(t.strict){k(t)}if(o){if(n){t._withCommit(function(){o._data.$$state=null})}m.nextTick(function(){return o.$destroy()})}}function x(t,e,n,r,o){var i=!n.length;var a=t._modules.getNamespace(n);if(r.namespaced){t._modulesNamespaceMap[a]=r}if(!i&&!o){var s=C(e,n.slice(0,-1));var u=n[n.length-1];t._withCommit(function(){m.set(s,u,r.state)})}var c=r.context=$(t,a,n);r.forEachMutation(function(e,n){var r=a+n;O(t,r,e,c)});r.forEachAction(function(e,n){var r=e.root?n:a+n;var o=e.handler||e;j(t,r,o,c)});r.forEachGetter(function(e,n){var r=a+n;E(t,r,e,c)});r.forEachChild(function(r,i){x(t,e,n.concat(i),r,o)})}function $(t,e,n){var r=e==="";var o={dispatch:r?t.dispatch:function(n,r,o){var i=A(n,r,o);var a=i.payload;var s=i.options;var u=i.type;if(!s||!s.root){u=e+u;if("development"!=="production"&&!t._actions[u]){console.error("[vuex] unknown local action type: "+i.type+", global type: "+u);return}}return t.dispatch(u,a)},commit:r?t.commit:function(n,r,o){var i=A(n,r,o);var a=i.payload;var s=i.options;var u=i.type;if(!s||!s.root){u=e+u;if("development"!=="production"&&!t._mutations[u]){console.error("[vuex] unknown local mutation type: "+i.type+", global type: "+u);return}}t.commit(u,a,s)}};Object.defineProperties(o,{getters:{get:r?function(){return t.getters}:function(){return M(t,e)}},state:{get:function(){return C(t.state,n)}}});return o}function M(t,e){var n={};var r=e.length;Object.keys(t.getters).forEach(function(o){if(o.slice(0,r)!==e){return}var i=o.slice(r);Object.defineProperty(n,i,{get:function(){return t.getters[o]},enumerable:true})});return n}function O(t,e,n,r){var o=t._mutations[e]||(t._mutations[e]=[]);o.push(function e(o){n.call(t,r.state,o)})}function j(t,e,n,r){var o=t._actions[e]||(t._actions[e]=[]);o.push(function e(o,a){var s=n.call(t,{dispatch:r.dispatch,commit:r.commit,getters:r.getters,state:r.state,rootGetters:t.getters,rootState:t.state},o,a);if(!i(s)){s=Promise.resolve(s)}if(t._devtoolHook){return s.catch(function(e){t._devtoolHook.emit("vuex:error",e);throw e})}else{return s}})}function E(t,e,n,r){if(t._wrappedGetters[e]){{console.error("[vuex] duplicate getter key: "+e)}return}t._wrappedGetters[e]=function t(e){return n(r.state,r.getters,e.state,e.getters)}}function k(t){t._vm.$watch(function(){return this._data.$$state},function(){{a(t._committing,"Do not mutate vuex store state outside mutation handlers.")}},{deep:true,sync:true})}function C(t,e){return e.length?e.reduce(function(t,e){return t[e]},t):t}function A(t,e,n){if(o(t)&&t.type){n=e;e=t;t=t.type}{a(typeof t==="string","Expects string as the type, but found "+typeof t+".")}return{type:t,payload:e,options:n}}function S(e){if(m&&e===m){{console.error("[vuex] already installed. Vue.use(Vuex) should be called only once.")}return}m=e;t(m)}var G=L(function(t,e){var n={};U(e).forEach(function(e){var r=e.key;var o=e.val;n[r]=function e(){var n=this.$store.state;var r=this.$store.getters;if(t){var i=D(this.$store,"mapState",t);if(!i){return}n=i.context.state;r=i.context.getters}return typeof o==="function"?o.call(this,n,r):n[o]};n[r].vuex=true});return n});var V=L(function(t,e){var n={};U(e).forEach(function(e){var r=e.key;var o=e.val;n[r]=function e(){var n=[],r=arguments.length;while(r--)n[r]=arguments[r];var i=this.$store.commit;if(t){var a=D(this.$store,"mapMutations",t);if(!a){return}i=a.context.commit}return typeof o==="function"?o.apply(this,[i].concat(n)):i.apply(this.$store,[o].concat(n))}});return n});var N=L(function(t,e){var n={};U(e).forEach(function(e){var r=e.key;var o=e.val;o=t+o;n[r]=function e(){if(t&&!D(this.$store,"mapGetters",t)){return}if("development"!=="production"&&!(o in this.$store.getters)){console.error("[vuex] unknown getter: "+o);return}return this.$store.getters[o]};n[r].vuex=true});return n});var P=L(function(t,e){var n={};U(e).forEach(function(e){var r=e.key;var o=e.val;n[r]=function e(){var n=[],r=arguments.length;while(r--)n[r]=arguments[r];var i=this.$store.dispatch;if(t){var a=D(this.$store,"mapActions",t);if(!a){return}i=a.context.dispatch}return typeof o==="function"?o.apply(this,[i].concat(n)):i.apply(this.$store,[o].concat(n))}});return n});var H=function(t){return{mapState:G.bind(null,t),mapGetters:N.bind(null,t),mapMutations:V.bind(null,t),mapActions:P.bind(null,t)}};function U(t){return 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 L(t){return function(e,n){if(typeof e!=="string"){n=e;e=""}else if(e.charAt(e.length-1)!=="/"){e+="/"}return t(e,n)}}function D(t,e,n){var r=t._modulesNamespaceMap[n];if("development"!=="production"&&!r){console.error("[vuex] module namespace not found in "+e+"(): "+n)}return r}var T={Store:y,install:S,version:"3.0.1",mapState:G,mapMutations:V,mapGetters:N,mapActions:P,createNamespacedHelpers:H};return T});

Zerion Mini Shell 1.0