text: var webStorageModule=angular.module("webStorageModule",[]);webStorageModule.constant("defaultSettings",{prefix:"",order:["local","session","memory"],errorName:"webStorage.notification.error"});webStorageModule.factory("webStorage",["$rootScope","defaultSettings",function(e,t){"use strict";function f(e,t){if(r){try{localStorage.setItem(o+e,JSON.stringify(t))}catch(n){return x(n)}return true}return false}function l(e,t){if(i){try{sessionStorage.setItem(o+e,JSON.stringify(t))}catch(n){return x(n)}return true}return false}function c(e,t){u[e]=t;return true}function h(e){if(r){try{var t=localStorage.getItem(o+e);return t&&JSON.parse(t)}catch(n){x(n);return null}}return null}function p(e){if(i){try{var t=sessionStorage.getItem(o+e);return t&&JSON.parse(t)}catch(n){x(n);return null}}return null}function d(e){return e in u?u[e]:null}function v(e){if(r){try{localStorage.removeItem(o+e)}catch(t){return x(t)}return true}return false}function m(e){if(i){try{sessionStorage.removeItem(o+e)}catch(t){return x(t)}return true}return false}function g(e){delete u[e];return true}function y(){if(!r)return false;if(!!o){var e=o.length;try{for(var t in localStorage)if(t.substr(0,e)===o)localStorage.removeItem(t)}catch(n){return x(n)}return true}try{localStorage.clear()}catch(n){return x(n)}return true}function b(){if(!i)return false;if(!!o){var e=o.length;try{for(var t in sessionStorage)if(t.substr(0,e)===o)sessionStorage.removeItem(t)}catch(n){return x(n)}return true}try{sessionStorage.clear()}catch(n){return x(n)}return true}function w(){u={};return true}function E(){try{localStorage.setItem(o+"angular.webStorage.test",true);localStorage.removeItem(o+"angular.webStorage.test");return true}catch(e){return false}}function S(){try{sessionStorage.setItem(o+"angular.webStorage.test",true);sessionStorage.removeItem(o+"angular.webStorage.test");return true}catch(e){return false}}function x(t){e.$broadcast(n,t.title+": "+t.message);return false}var n=t.errorName;var r=E();var i=S();var s=t.order;var o=t.prefix;var u={};var a={isSupported:r||i,local:{isSupported:r,add:f,get:h,remove:v,clear:y},session:{isSupported:i,add:l,get:p,remove:m,clear:b},memory:{isSupported:true,add:c,get:d,remove:g,clear:w}};a.add=function(e,t,n){n=typeof n!=="undefined"?!!n:false;var r=false;var i=s.length;for(var o=0;o<i;++o){var u=a[s[o]];if(u.isSupported){r=u.add(e,t)||r;if(!n)return r}}return r};a.get=function(e,t){t=typeof t!=="undefined"?!!t:true;var n=s.length;for(var r=0;r<n;++r){var i=a[s[r]];if(i.isSupported){var o=i.get(e);if(!t||o!==null)return o}}return null};a.remove=function(e,t){t=typeof t!=="undefined"?!!t:true;var n=false;var r=s.length;for(var i=0;i<r;++i){var o=a[s[i]];if(o.isSupported){n=o.remove(e)||n;if(!t)return n}}return n};a.clear=function(e){e=typeof e!=="undefined"?!!e:true;var t=false;var n=s.length;for(var r=0;r<n;++r){var i=a[s[r]];if(i.isSupported){t=i.clear()||t;if(!e)return t}}return t};a.errorName=function(e){var t=n;if(typeof e!=="undefined"){if(typeof e!=="string")return false;n=e}return t};a.order=function(e){var t=angular.copy(s);if(typeof e!=="undefined"){s=[];for(var n in e)if(/^(local|session|memory)$/.test(e[n]))s.push(e[n])}return t};a.prefix=function(e){var t=o;if(typeof e!=="undefined"){if(typeof e!=="string")return false;o=e}return t};return a}]);try{if(!window.localStorage){window.localStorage={getItem:function(e){if(!e||!this.hasOwnProperty(e)){return null}return unescape(document.cookie.replace(new RegExp("(?:^|.*;\\s*)"+escape(e).replace(/[\-\.\+\*]/g,"\\$&")+"\\s*\\=\\s*((?:[^;](?!;))*[^;]?).*"),"$1"))},key:function(e){return unescape(document.cookie.replace(/\s*\=(?:.(?!;))*$/,"").split(/\s*\=(?:[^;](?!;))*[^;]?;\s*/)[e])},setItem:function(e,t){if(!e){return}document.cookie=escape(e)+"="+escape(t)+"; expires=Tue, 19 Jan 2038 03:14:07 GMT; path=/";this.length=document.cookie.match(/\=/g).length},length:0,removeItem:function(e){if(!e||!this.hasOwnProperty(e)){return}document.cookie=escape(e)+"=; expires=Thu, 01 Jan 1970 00:00:00 GMT; path=/";this.length--},hasOwnProperty:function(e){return(new RegExp("(?:^|;\\s*)"+escape(e).replace(/[\-\.\+\*]/g,"\\$&")+"\\s*\\=")).test(document.cookie)}};window.localStorage.length=(document.cookie.match(/\=/g)||window.localStorage).length}if(!window.sessionStorage){window.sessionStorage={getItem:function(e){if(!e||!this.hasOwnProperty(e)){return null}return unescape(document.cookie.replace(new RegExp("(?:^|.*;\\s*)"+escape(e).replace(/[\-\.\+\*]/g,"\\$&")+"\\s*\\=\\s*((?:[^;](?!;))*[^;]?).*"),"$1"))},key:function(e){return unescape(document.cookie.replace(/\s*\=(?:.(?!;))*$/,"").split(/\s*\=(?:[^;](?!;))*[^;]?;\s*/)[e])},setItem:function(e,t){if(!e){return}document.cookie=escape(e)+"="+escape(t)+"; path=/";this.length=document.cookie.match(/\=/g).length},length:0,removeItem:function(e){if(!e||!this.hasOwnProperty(e)){return}document.cookie=escape(e)+"=; expires=Thu, 01 Jan 1970 00:00:00 GMT; path=/";this.length--},hasOwnProperty:function(e){return(new RegExp("(?:^|;\\s*)"+escape(e).replace(/[\-\.\+\*]/g,"\\$&")+"\\s*\\=")).test(document.cookie)}};window.sessionStorage.length=(document.cookie.match(/\=/g)||window.sessionStorage).length}}catch(e){}