diff options
Diffstat (limited to 'ecomp-portal-FE/client/bower_components/angular-cache/dist/angular-cache.min.js')
-rw-r--r-- | ecomp-portal-FE/client/bower_components/angular-cache/dist/angular-cache.min.js | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/ecomp-portal-FE/client/bower_components/angular-cache/dist/angular-cache.min.js b/ecomp-portal-FE/client/bower_components/angular-cache/dist/angular-cache.min.js new file mode 100644 index 00000000..ae78ddcb --- /dev/null +++ b/ecomp-portal-FE/client/bower_components/angular-cache/dist/angular-cache.min.js @@ -0,0 +1,2 @@ +!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t("undefined"==typeof angular?require("angular"):angular):"function"==typeof define&&define.amd?define("angular-cache",["angular"],t):e.angularCacheModuleName=t(e.angular)}(this,function(e){"use strict";function t(e,t){if(e||(e=function(e){return e}),t||(t=function(e,t){return e===t}),"function"!=typeof e)throw new Error('BinaryHeap([weightFunc][, compareFunc]): "weightFunc" must be a function!');if("function"!=typeof t)throw new Error('BinaryHeap([weightFunc][, compareFunc]): "compareFunc" must be a function!');this.weightFunc=e,this.compareFunc=t,this.heap=[]}function r(e){var t=[],r=void 0;if(!d.isObject(e))return t;for(r in e)e.hasOwnProperty(r)&&t.push(r);return t}function i(e){return e&&"function"==typeof e.then}function s(e){return d.isNumber(e)?e.toString():e}function n(e){var t={},r=void 0;if(!d.isObject(e))return t;for(r in e)e.hasOwnProperty(r)&&(t[r]=r);return t}function o(e,o){if(e in g)throw new Error(e+" already exists!");if(!d.isString(e))throw new Error("cacheId must be a string!");var a={},c={},l=null,h=new t(function(e){return e.expires},d.equals),f=new t(function(e){return e.accessed},d.equals),p=g[e]={$$id:e,destroy:function(){clearInterval(this.$$cacheFlushIntervalId),clearInterval(this.$$recycleFreqId),this.removeAll(),l&&(l().removeItem(this.$$prefix+".keys"),l().removeItem(this.$$prefix)),l=null,a=null,f=null,h=null,this.$$prefix=null,delete g[this.$$id]},disable:function(){this.$$disabled=!0},enable:function(){delete this.$$disabled},get:function(e,t){var r=this;if(Array.isArray(e)){var i=function(){var i=e,s=[];return i.forEach(function(e){var i=r.get(e,t);null!==i&&void 0!==i&&s.push(i)}),{v:s}}();if("object"===("undefined"==typeof i?"undefined":u["typeof"](i)))return i.v}else if(e=s(e),this.$$disabled)return;if(t=t||{},!d.isString(e))throw new Error("key must be a string!");if(t&&!d.isObject(t))throw new Error("options must be an object!");if(t.onExpire&&!d.isFunction(t.onExpire))throw new Error("options.onExpire must be a function!");var n=void 0;if(l){if(c[e])return c[e];var o=l().getItem(this.$$prefix+".data."+e);if(!o)return;n=d.fromJson(o)}else if(d.isObject(a)){if(!(e in a))return;n=a[e]}var h=n.value,p=(new Date).getTime();return l?(f.remove({key:e,accessed:n.accessed}),n.accessed=p,f.push({key:e,accessed:p})):(f.remove(n),n.accessed=p,f.push(n)),"passive"===this.$$deleteOnExpire&&"expires"in n&&n.expires<p?(this.remove(e),this.$$onExpire?this.$$onExpire(e,n.value,t.onExpire):t.onExpire&&t.onExpire.call(this,e,n.value),h=void 0):l&&l().setItem(this.$$prefix+".data."+e,JSON.stringify(n)),h},info:function(e){if(e){var t=void 0;if(l){var r=l().getItem(this.$$prefix+".data."+e);return r?(t=d.fromJson(r),{created:t.created,accessed:t.accessed,expires:t.expires,isExpired:(new Date).getTime()-t.created>(t.maxAge||this.$$maxAge)}):void 0}return d.isObject(a)&&e in a?(t=a[e],{created:t.created,accessed:t.accessed,expires:t.expires,isExpired:(new Date).getTime()-t.created>(t.maxAge||this.$$maxAge)}):void 0}return{id:this.$$id,capacity:this.$$capacity,maxAge:this.$$maxAge,deleteOnExpire:this.$$deleteOnExpire,onExpire:this.$$onExpire,cacheFlushInterval:this.$$cacheFlushInterval,recycleFreq:this.$$recycleFreq,storageMode:this.$$storageMode,storageImpl:l?l():void 0,disabled:!!this.$$disabled,size:f&&f.size()||0}},keys:function(){if(l){var e=l().getItem(this.$$prefix+".keys");return e?d.fromJson(e):[]}return r(a)},keySet:function(){if(l){var e=l().getItem(this.$$prefix+".keys"),t={};if(e)for(var r=d.fromJson(e),i=0;i<r.length;i++)t[r[i]]=r[i];return t}return n(a)},put:function(e,t,r){var n=this;r||(r={});var o="storeOnResolve"in r?!!r.storeOnResolve:this.$$storeOnResolve,u="storeOnReject"in r?!!r.storeOnReject:this.$$storeOnReject,p=function(t,r){return function(i){if(t&&(delete c[e],d.isObject(i)&&"status"in i&&"data"in i?(i=[i.status,i.data,i.headers(),i.statusText],n.put(e,i)):n.put(e,i)),r){if(d.Promise)return d.Promise.reject(i);throw i}return i}};if(!this.$$disabled&&d.isObject(a)&&null!==t&&void 0!==t){if(e=s(e),!d.isString(e))throw new Error("key must be a string!");var m=(new Date).getTime(),$={key:e,value:i(t)?t.then(p(o,!1),p(u,!0)):t,created:void 0===r.created?m:r.created,accessed:void 0===r.accessed?m:r.accessed};if(r.maxAge&&($.maxAge=r.maxAge),void 0===r.expires?$.expires=$.created+($.maxAge||this.$$maxAge):$.expires=r.expires,l){if(i($.value))return c[e]=$.value,c[e];var v=l().getItem(this.$$prefix+".keys"),g=v?d.fromJson(v):[],y=l().getItem(this.$$prefix+".data."+e);y&&this.remove(e),h.push({key:e,expires:$.expires}),f.push({key:e,accessed:$.accessed}),l().setItem(this.$$prefix+".data."+e,JSON.stringify($));for(var x=!1,b=0;b<g.length;b++)if(g[b]===e){x=!0;break}x||g.push(e),l().setItem(this.$$prefix+".keys",JSON.stringify(g))}else a[e]&&this.remove(e),h.push($),f.push($),a[e]=$,delete c[e];return f.size()>this.$$capacity&&this.remove(f.peek().key),t}},remove:function(e){if(e+="",delete c[e],l){var t=l().getItem(this.$$prefix+".data."+e);if(t){var r=d.fromJson(t);f.remove({key:e,accessed:r.accessed}),h.remove({key:e,expires:r.expires}),l().removeItem(this.$$prefix+".data."+e);var i=l().getItem(this.$$prefix+".keys"),s=i?d.fromJson(i):[],n=s.indexOf(e);return n>=0&&s.splice(n,1),l().setItem(this.$$prefix+".keys",JSON.stringify(s)),r.value}}else if(d.isObject(a)){var o=a[e]?a[e].value:void 0;return f.remove(a[e]),h.remove(a[e]),a[e]=null,delete a[e],o}},removeAll:function(){if(l){f.removeAll(),h.removeAll();var e=l().getItem(this.$$prefix+".keys");if(e)for(var t=d.fromJson(e),r=0;r<t.length;r++)this.remove(t[r]);l().setItem(this.$$prefix+".keys",JSON.stringify([]))}else if(d.isObject(a)){f.removeAll(),h.removeAll();for(var i in a)a[i]=null;a={}}else f.removeAll(),h.removeAll(),a={};c={}},removeExpired:function(){for(var e=(new Date).getTime(),t={},r=void 0,i=void 0;(i=h.peek())&&i.expires<=e;)t[i.key]=i.value?i.value:null,h.pop();if(l)for(r in t){var s=l().getItem(this.$$prefix+".data."+r);s&&(t[r]=d.fromJson(s).value,this.remove(r))}else for(r in t)this.remove(r);if(this.$$onExpire)for(r in t)this.$$onExpire(r,t[r]);return t},setCacheFlushInterval:function(e){var t=this;if(null===e)delete t.$$cacheFlushInterval;else{if(!d.isNumber(e))throw new Error("cacheFlushInterval must be a number!");if(0>e)throw new Error("cacheFlushInterval must be greater than zero!");e!==t.$$cacheFlushInterval&&(t.$$cacheFlushInterval=e,clearInterval(t.$$cacheFlushIntervalId),t.$$cacheFlushIntervalId=setInterval(function(){t.removeAll()},t.$$cacheFlushInterval))}},setCapacity:function(e){if(null===e)delete this.$$capacity;else{if(!d.isNumber(e))throw new Error("capacity must be a number!");if(0>e)throw new Error("capacity must be greater than zero!");this.$$capacity=e}for(var t={};f.size()>this.$$capacity;)t[f.peek().key]=this.remove(f.peek().key);return t},setDeleteOnExpire:function(e,t){if(null===e)delete this.$$deleteOnExpire;else{if(!d.isString(e))throw new Error("deleteOnExpire must be a string!");if("none"!==e&&"passive"!==e&&"aggressive"!==e)throw new Error('deleteOnExpire must be "none", "passive" or "aggressive"!');this.$$deleteOnExpire=e}t!==!1&&this.setRecycleFreq(this.$$recycleFreq)},setMaxAge:function(e){if(null===e)this.$$maxAge=Number.MAX_VALUE;else{if(!d.isNumber(e))throw new Error("maxAge must be a number!");if(0>e)throw new Error("maxAge must be greater than zero!");this.$$maxAge=e}var t=void 0,i=void 0,s=void 0;if(h.removeAll(),l){var n=l().getItem(this.$$prefix+".keys");for(i=n?d.fromJson(n):[],t=0;t<i.length;t++){s=i[t];var o=l().getItem(this.$$prefix+".data."+s);if(o){var c=d.fromJson(o);this.$$maxAge===Number.MAX_VALUE?c.expires=Number.MAX_VALUE:c.expires=c.created+(c.maxAge||this.$$maxAge),h.push({key:s,expires:c.expires})}}}else for(i=r(a),t=0;t<i.length;t++)s=i[t],this.$$maxAge===Number.MAX_VALUE?a[s].expires=Number.MAX_VALUE:a[s].expires=a[s].created+(a[s].maxAge||this.$$maxAge),h.push(a[s]);return"aggressive"===this.$$deleteOnExpire?this.removeExpired():{}},setOnExpire:function(e){if(null===e)delete this.$$onExpire;else{if(!d.isFunction(e))throw new Error("onExpire must be a function!");this.$$onExpire=e}},setOptions:function(e,t){if(e=e||{},t=!!t,!d.isObject(e))throw new Error("cacheOptions must be an object!");"storagePrefix"in e?this.$$storagePrefix=e.storagePrefix:t&&(this.$$storagePrefix=v.storagePrefix),this.$$prefix=this.$$storagePrefix+this.$$id,"disabled"in e?this.$$disabled=!!e.disabled:t&&(this.$$disabled=v.disabled),"deleteOnExpire"in e?this.setDeleteOnExpire(e.deleteOnExpire,!1):t&&this.setDeleteOnExpire(v.deleteOnExpire,!1),"recycleFreq"in e?this.setRecycleFreq(e.recycleFreq):t&&this.setRecycleFreq(v.recycleFreq),"maxAge"in e?this.setMaxAge(e.maxAge):t&&this.setMaxAge(v.maxAge),"storeOnResolve"in e?this.$$storeOnResolve=!!e.storeOnResolve:t&&(this.$$storeOnResolve=v.storeOnResolve),"storeOnReject"in e?this.$$storeOnReject=!!e.storeOnReject:t&&(this.$$storeOnReject=v.storeOnReject),"capacity"in e?this.setCapacity(e.capacity):t&&this.setCapacity(v.capacity),"cacheFlushInterval"in e?this.setCacheFlushInterval(e.cacheFlushInterval):t&&this.setCacheFlushInterval(v.cacheFlushInterval),"onExpire"in e?this.setOnExpire(e.onExpire):t&&this.setOnExpire(v.onExpire),"storageMode"in e||"storageImpl"in e?this.setStorageMode(e.storageMode||v.storageMode,e.storageImpl||v.storageImpl):t&&this.setStorageMode(v.storageMode,v.storageImpl)},setRecycleFreq:function(e){if(null===e)delete this.$$recycleFreq;else{if(!d.isNumber(e))throw new Error("recycleFreq must be a number!");if(0>e)throw new Error("recycleFreq must be greater than zero!");this.$$recycleFreq=e}clearInterval(this.$$recycleFreqId),"aggressive"===this.$$deleteOnExpire?!function(e){e.$$recycleFreqId=setInterval(function(){e.removeExpired()},e.$$recycleFreq)}(this):delete this.$$recycleFreqId},setStorageMode:function(e,t){function r(e,t){var r=this.keys(),i=r.length;if(i){for(var s=void 0,a=d.isObject(t),c=0;i>c;c++){if(s=r[c],e){var l=e().getItem(this.$$prefix+".data."+s);l&&(o[s]=d.fromJson(l))}else a&&(o[s]=t[s]);this.remove(s)}n=!0}}if(!d.isString(e))throw new Error("storageMode must be a string!");if("memory"!==e&&"localStorage"!==e&&"sessionStorage"!==e)throw new Error('storageMode must be "memory", "localStorage" or "sessionStorage"!');var i=l,s=a,n=!1,o={};if(this.$$initializing||r.call(this,i,s),this.$$storageMode=e,t){if(!d.isObject(t))throw new Error("storageImpl must be an object!");if(!("setItem"in t&&"function"==typeof t.setItem))throw new Error('storageImpl must implement "setItem(key, value)"!');if(!("getItem"in t&&"function"==typeof t.getItem))throw new Error('storageImpl must implement "getItem(key)"!');if(!("removeItem"in t)||"function"!=typeof t.removeItem)throw new Error('storageImpl must implement "removeItem(key)"!');l=function(){return t}}else if("localStorage"===this.$$storageMode)try{localStorage.setItem("cachefactory","cachefactory"),localStorage.removeItem("cachefactory"),l=function(){return localStorage}}catch(c){l=null,this.$$storageMode="memory"}else if("sessionStorage"===this.$$storageMode)try{sessionStorage.setItem("cachefactory","cachefactory"),sessionStorage.removeItem("cachefactory"),l=function(){return sessionStorage}}catch(c){l=null,this.$$storageMode="memory"}else l=null,this.$$storageMode="memory";if(this.$$initializing&&r.call(this,l,a),n){var u=void 0;for(var h in o)u=o[h],this.put(h,u.value,{created:u.created,accessed:u.accessed,expires:u.expires})}},touch:function(e,t){var r=this;if(e){var i=this.get(e,{onExpire:function(e,t){return r.put(e,t)}});i&&this.put(e,i,t)}else for(var s=this.keys(),n=0;n<s.length;n++)this.touch(s[n],t)},values:function(){for(var e=this.keys(),t=[],r=0;r<e.length;r++)t.push(this.get(e[r]));return t}};return p.$$initializing=!0,p.setOptions(o,!0),p.$$initializing=!1,p}function a(e,t){return o(e,t)}function c(){this.$get=function(){return a.BinaryHeap}}function l(){this.defaults=a.defaults,this.defaults.storagePrefix="angular-cache.caches.",this.$get=["$q",function(e){return a.utils.Promise=e,a}]}e="default"in e?e["default"]:e;var u={};u["typeof"]="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol?"symbol":typeof e};var h=function(e,t,r){for(var i=e[r],s=t(i);r>0;){var n=Math.floor((r+1)/2)-1,o=e[n];if(s>=t(o))break;e[n]=i,e[r]=o,r=n}},f=function(e,t,r){for(var i=e.length,s=e[r],n=t(s);;){var o=2*(r+1),a=o-1,c=null;if(i>a){var l=e[a],u=t(l);n>u&&(c=a)}if(i>o){var h=e[o],f=t(h);f<(null===c?n:t(e[a]))&&(c=o)}if(null===c)break;e[r]=e[c],e[c]=s,r=c}},p=t.prototype;p.push=function(e){this.heap.push(e),h(this.heap,this.weightFunc,this.heap.length-1)},p.peek=function(){return this.heap[0]},p.pop=function(){var e=this.heap[0],t=this.heap.pop();return this.heap.length>0&&(this.heap[0]=t,f(this.heap,this.weightFunc,0)),e},p.remove=function(e){for(var t=this.heap.length,r=0;t>r;r++)if(this.compareFunc(this.heap[r],e)){var i=this.heap[r],s=this.heap.pop();return r!==t-1&&(this.heap[r]=s,h(this.heap,this.weightFunc,r),f(this.heap,this.weightFunc,r)),i}return null},p.removeAll=function(){this.heap=[]},p.size=function(){return this.heap.length};var m=null;try{m=window.Promise}catch($){}var d={isNumber:function(e){return"number"==typeof e},isString:function(e){return"string"==typeof e},isObject:function(e){return null!==e&&"object"===("undefined"==typeof e?"undefined":u["typeof"](e))},isFunction:function(e){return"function"==typeof e},fromJson:function(e){return JSON.parse(e)},equals:function(e,t){return e===t},Promise:m},v={capacity:Number.MAX_VALUE,maxAge:Number.MAX_VALUE,deleteOnExpire:"none",onExpire:null,cacheFlushInterval:null,recycleFreq:1e3,storageMode:"memory",storageImpl:null,disabled:!1,storagePrefix:"cachefactory.caches.",storeOnResolve:!1,storeOnReject:!1},g={};a.createCache=o,a.defaults=v,a.info=function(){var e=r(g),t={size:e.length,caches:{}};for(var i in v)v.hasOwnProperty(i)&&(t[i]=v[i]);for(var s=0;s<e.length;s++){var n=e[s];t.caches[n]=g[n].info()}return t},a.get=function(e){return g[e]},a.keySet=function(){return n(g)},a.keys=function(){return r(g)},a.destroy=function(e){g[e]&&(g[e].destroy(),delete g[e])},a.destroyAll=function(){for(var e in g)g[e].destroy();g={}},a.clearAll=function(){for(var e in g)g[e].removeAll()},a.removeExpiredFromAll=function(){var e={};for(var t in g)e[t]=g[t].removeExpired();return e},a.enableAll=function(){for(var e in g)g[e].$$disabled=!1},a.disableAll=function(){for(var e in g)g[e].$$disabled=!0},a.touchAll=function(){for(var e in g)g[e].touch()},a.utils=d,a.BinaryHeap=t,a.utils.equals=e.equals,a.utils.isObject=e.isObject,a.utils.fromJson=e.fromJson,e.module("angular-cache",[]).provider("BinaryHeap",c).provider("CacheFactory",l);var y="angular-cache";return y}); +//# sourceMappingURL=angular-cache.min.map
\ No newline at end of file |