diff options
Diffstat (limited to 'settings/js/vue-0.js')
-rw-r--r-- | settings/js/vue-0.js | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/settings/js/vue-0.js b/settings/js/vue-0.js index 1450bf193fd..87e94a3d1d5 100644 --- a/settings/js/vue-0.js +++ b/settings/js/vue-0.js @@ -763,4 +763,4 @@ Object(o.a)(p),n.default=p},function(t,e,n){"use strict";var i=n(38);n.n(i).a},f * @license MIT */ t.exports=function(){"use strict";var t=function(){this._properties={},this._namespace="",this._isSupported=!0},n={namespace:{}};n.namespace.get=function(){return this._namespace},n.namespace.set=function(t){this._namespace=t?t+".":""},t.prototype._getLsKey=function(t){return""+this._namespace+t},t.prototype._lsSet=function(t,e,n){var i=this._getLsKey(t),o=n&&[Array,Object].includes(n)?JSON.stringify(e):e;window.localStorage.setItem(i,o)},t.prototype._lsGet=function(t){var e=this._getLsKey(t);return window.localStorage[e]},t.prototype.get=function(t,e,n){if(void 0===e&&(e=null),void 0===n&&(n=String),!this._isSupported)return null;if(this._lsGet(t)){var i=n;for(var o in this._properties)if(o===t){i=this._properties[o].type;break}return this._process(i,this._lsGet(t))}return null!==e?e:null},t.prototype.set=function(t,e){if(!this._isSupported)return null;for(var n in this._properties){var i=this._properties[n].type;if(n===t)return this._lsSet(t,e,i),e}return this._lsSet(t,e),e},t.prototype.remove=function(t){return this._isSupported?window.localStorage.removeItem(t):null},t.prototype.addProperty=function(t,e,n){void 0===n&&(n=void 0),e=e||String,this._properties[t]={type:e},this._lsGet(t)||null===n||this._lsSet(t,n,e)},t.prototype._process=function(t,e){switch(t){case Boolean:return"true"===e;case Number:return parseFloat(e);case Array:try{var n=JSON.parse(e);return Array.isArray(n)?n:[]}catch(t){return[]}case Object:try{return JSON.parse(e)}catch(t){return{}}default:return e}},Object.defineProperties(t.prototype,n);var i=new t;return{install:function(t,n){if(void 0===n&&(n={}),void 0===e||!(e.server||e.SERVER_BUILD||e.env&&"server"===e.env.VUE_ENV)){var o=!0;try{var r="__vue-localstorage-test__";window.localStorage.setItem(r,r),window.localStorage.removeItem(r)}catch(t){o=!1,i._isSupported=!1,console.error("Local storage is not supported")}var a=n.name||"localStorage",s=n.bind;n.namespace&&(i.namespace=n.namespace),t.mixin({beforeCreate:function(){var e=this;o&&this.$options[a]&&Object.keys(this.$options[a]).forEach(function(n){var o=e.$options[a][n],r=[o.type,o.default],c=r[0],l=r[1];i.addProperty(n,c,l);var u=Object.getOwnPropertyDescriptor(i,n);if(u)t.config.silent||console.log(n+": is already defined and will be reused");else{var d={get:function(){return t.localStorage.get(n,l)},set:function(e){return t.localStorage.set(n,e)},configurable:!0};Object.defineProperty(i,n,d),t.util.defineReactive(i,n,l)}(s||o.bind)&&!1!==o.bind&&(e.$options.computed=e.$options.computed||{},e.$options.computed[n]||(e.$options.computed[n]={get:function(){return t.localStorage[n]},set:function(e){t.localStorage[n]=e}}))})}}),t[a]=i,t.prototype["$"+a]=i}}}}()}).call(this,n(6))}}]); -//# sourceMappingURL=vue-0.js.map
\ No newline at end of file +//# sourceMappingURL=vue-0.js.map?v=06a700b174e7c80b3dc0
\ No newline at end of file |