CrazySquirrel/EverCookie

View on GitHub
lib/EverCookie.min.js

Summary

Maintainability
A
0 mins
Test Coverage
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define("EverCookie",[],e):"object"==typeof exports?exports.EverCookie=e():t.EverCookie=e()}(this,function(){return function(t){function e(o){if(r[o])return r[o].exports;var n=r[o]={exports:{},id:o,loaded:!1};return t[o].call(n.exports,n,n.exports,e),n.loaded=!0,n.exports}var r={};return e.m=t,e.c=r,e.p="",e(0)}([function(t,e,r){t.exports=r(5)},,,,,function(t,e,r){"use strict";function o(t){return t&&t.__esModule?t:{default:t}}function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}e.__esModule=!0;var i=r(6),s=o(i),a=r(7),h=o(a),u=r(14),f=o(u),l=r(15),p=o(l),c=r(16),y=o(c),d=r(17),m=o(d),g=function(){function t(e){n(this,t),this.regValidKey=new RegExp("([a-zA-Z0-9_-]{0,})","i"),this.hash=e||location.hostname,this.stores=[],"undefined"!=typeof h.default&&this.stores.push(new h.default(this.hash)),"undefined"!=typeof p.default&&this.stores.push(new p.default(this.hash)),"undefined"!=typeof y.default&&this.stores.push(new y.default(this.hash)),"undefined"!=typeof m.default&&this.stores.push(new m.default(this.hash)),"undefined"!=typeof f.default&&this.stores.push(new f.default(this.hash));for(var r=0;r<this.stores.length;r++)this.stores[r].isSupported()||this.stores.splice(r,1);this.stopRefresh=!1,this.isSupported()&&(this.refreshID=s.default.subscribe(this,this.refresh,[]))}return t.prototype.isSupported=function(){return this.stores&&this.stores.length>0},t.prototype.setItem=function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],e=arguments[1],r=arguments[2],o=!0;this.stopRefresh=!0;try{if("boolean"==typeof t&&"string"==typeof e&&this.regValidKey.test(e)&&"string"==typeof r&&(""===r||this.regValidKey.test(r)))if(!t||this.isSupported()){for(var n=[],i=this.stores,s=Array.isArray(i),a=0,i=s?i:i[Symbol.iterator]();;){var h;if(s){if(a>=i.length)break;h=i[a++]}else{if(a=i.next(),a.done)break;h=a.value}var u=h;n.push(u.setItem(!1,e,r))}o=n.length>0&&n.indexOf(!0)!==-1}else o=!1;else o=!1}catch(t){o=!1}return this.stopRefresh=!1,o},t.prototype.getItem=function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],e=arguments[1],r=!1;this.stopRefresh=!0;try{if("boolean"==typeof t&&"string"==typeof e&&this.regValidKey.test(e))if(!t||this.isSupported()){for(var o=[],n=this.stores,i=Array.isArray(n),s=0,n=i?n:n[Symbol.iterator]();;){var a;if(i){if(s>=n.length)break;a=n[s++]}else{if(s=n.next(),s.done)break;a=s.value}var h=a,u=h.getItem(!1,e);u&&o.push(u)}for(var f={},l=0,p=o,c=Array.isArray(p),y=0,p=c?p:p[Symbol.iterator]();;){var d;if(c){if(y>=p.length)break;d=p[y++]}else{if(y=p.next(),y.done)break;d=y.value}var m=d;f[m]||(f[m]=0),f[m]++,f[m]>l&&(l=f[m],r=m)}}else r=!1;else r=!1}catch(t){r=!1}return this.stopRefresh=!1,r},t.prototype.removeItem=function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],e=arguments[1],r=!0;this.stopRefresh=!0;try{if("boolean"==typeof t&&"string"==typeof e&&this.regValidKey.test(e))if(!t||this.isSupported()){for(var o=0,n=this.stores,i=Array.isArray(n),s=0,n=i?n:n[Symbol.iterator]();;){var a;if(i){if(s>=n.length)break;a=n[s++]}else{if(s=n.next(),s.done)break;a=s.value}var h=a;o+=1*h.removeItem(!1,e)}r=o===this.stores.length}else r=!1;else r=!1}catch(t){r=!1}return this.stopRefresh=!1,r},t.prototype.getKeys=function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],e={};this.stopRefresh=!0;try{if("boolean"==typeof t)if(!t||this.isSupported())for(var r=this.stores,o=Array.isArray(r),n=0,r=o?r:r[Symbol.iterator]();;){var i;if(o){if(n>=r.length)break;i=r[n++]}else{if(n=r.next(),n.done)break;i=n.value}var s=i,a=s.getKeys(!1);if(a.length>0)for(var h=a,u=Array.isArray(h),f=0,h=u?h:h[Symbol.iterator]();;){var l;if(u){if(f>=h.length)break;l=h[f++]}else{if(f=h.next(),f.done)break;l=f.value}var p=l;e[p]=!0}}else e={};else e={}}catch(t){e={}}return this.stopRefresh=!1,Object.keys(e)},t.prototype.clear=function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],e=!0;this.stopRefresh=!0;try{if("boolean"==typeof t)if(!t||this.isSupported()){for(var r=0,o=this.stores,n=Array.isArray(o),i=0,o=n?o:o[Symbol.iterator]();;){var s;if(n){if(i>=o.length)break;s=o[i++]}else{if(i=o.next(),i.done)break;s=i.value}var a=s;r+=1*a.clear(!1)}e=r===this.stores.length}else e=!1;else e=!1}catch(t){e=!1}return this.stopRefresh=!1,e},t.prototype.refresh=function(){if(!this.stopRefresh)for(var t=this.getKeys(!1),e=t,r=Array.isArray(e),o=0,e=r?e:e[Symbol.iterator]();;){var n;if(r){if(o>=e.length)break;n=e[o++]}else{if(o=e.next(),o.done)break;n=o.value}for(var i=n,s=this.getItem(!1,i),a=this.stores,h=Array.isArray(a),u=0,a=h?a:a[Symbol.iterator]();;){var f;if(h){if(u>=a.length)break;f=a[u++]}else{if(u=a.next(),u.done)break;f=u.value}var l=f;s!==l.getItem(!1,i)&&l.setItem(!1,i,s.toString())}}},t.prototype.destroy=function(){return s.default.unsubscribe(this.refreshID),this.stopRefresh=!0,this.refresh=function(){return null},this.stores=[],!0},t}();e.default=g,t.exports=g},function(t,e){(function(r){"use strict";function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function n(t){function e(){}function r(){return i.apply(this instanceof e?this:t||a,n.concat(o.call(arguments)))}if("function"!=typeof this)throw new TypeError("Function.prototype.bind - what is trying to be bound is not callable");var o=Array.prototype.slice,n=o.call(arguments,1),i=this;return e.prototype=this.prototype,r.prototype=new e,r}function i(){var t=!{toString:null}.propertyIsEnumerable("toString"),e=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],r=e.length;return function(o){if("object"!==("undefined"==typeof o?"undefined":s(o))&&("function"!=typeof o||null===o))throw new TypeError("Object.keys called on non-object");var n=[];for(var i in o)Object.prototype.hasOwnProperty.call(o,i)&&n.push(i);if(t)for(var a=0;a<r;a++)Object.prototype.hasOwnProperty.call(o,e[a])&&n.push(e[a]);return n}}e.__esModule=!0;var s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},a=void 0;a="undefined"==typeof window?"undefined"!=typeof r?r:{}:window,a.requestAnimationFrame=function(){return"undefined"!=typeof a&&(a.requestAnimationFrame||a.webkitRequestAnimationFrame||a.mozRequestAnimationFrame||a.oRequestAnimationFrame||a.msRequestAnimationFrame)||function(t){a.setTimeout(t,1e3/60)}}(),Function.prototype.bind=Function.prototype.bind||n,Object.keys=Object.keys||i();var h=function(){function t(){o(this,t),this.stack={},this.watch()}return t.prototype.subscribe=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:a,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(){return null},r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],o=arguments[3];if("object"!==("undefined"==typeof t?"undefined":s(t))||"function"!=typeof e||"object"!==("undefined"==typeof r?"undefined":s(r))||!Array.isArray(r)||void 0!==o&&"string"!=typeof o)return!1;var n=new Date,i=o||"x-"+n.getTime()+"-"+Math.round(1e6*Math.random());return this.stack[i]={context:t,callback:e,params:r},i},t.prototype.unsubscribe=function(t){"string"==typeof t&&this.stack[t]&&(this.stack[t]=!1,delete this.stack[t])},t.prototype.watch=function(){try{if(this.stack&&"object"===s(this.stack)&&Object.keys(this.stack).length>0)for(var t in this.stack)if(this.stack.hasOwnProperty(t))try{if(t&&"string"==typeof t){var e=this.stack[t];e&&"object"===("undefined"==typeof e?"undefined":s(e))&&e.context&&e.callback&&e.params&&"object"===s(e.context)&&"function"==typeof e.callback&&Array.isArray(e.params)&&e.callback.apply(e.context,e.params)}}catch(t){}}catch(t){}a.requestAnimationFrame(this.watch.bind(this))},t}();a.AnimationFrame=a.AnimationFrame||new h;var u=a.AnimationFrame;e.default=u,t.exports=u}).call(e,function(){return this}())},function(t,e,r){"use strict";function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}e.__esModule=!0;var n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},i=r(8),s=function(){function t(e){o(this,t),this.regValidKey=new RegExp("([a-zA-Z0-9_-]{0,})","i"),this.hash=e||location.hostname}return t.prototype.isSupported=function(){return"object"===("undefined"==typeof document?"undefined":n(document))&&"string"==typeof document.cookie},t.prototype.setItem=function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],e=arguments[1],r=arguments[2],o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:30,n=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"/",s=arguments.length>5&&void 0!==arguments[5]?arguments[5]:location.hostname,a=arguments.length>6&&void 0!==arguments[6]?arguments[6]:"https:"===location.protocol;try{if("boolean"==typeof t&&"string"==typeof e&&this.regValidKey.test(e)&&"string"==typeof r&&(""===r||this.regValidKey.test(r))&&"number"==typeof o&&o<365&&"string"==typeof n&&"string"==typeof s&&s.indexOf(location.hostname)!==-1&&"boolean"==typeof a&&a===("https:"===location.protocol)){var h=i.parse("http://"+s+n);if(h.hostname===s||h.path===n){if(!t||this.isSupported()){var u=this.hash+"_"+e,f=new Date;f.setTime(f.getTime()+24*o*60*60*1e3);var l=f.toUTCString();return r=encodeURIComponent(r),document.cookie=u+"="+r+(l?"; expires="+l:"")+(n?"; path="+n:"")+(s?"; domain="+s:"")+(a?"; secure":""),this.getItem(t,e)===decodeURIComponent(r)}return!1}return!1}return!1}catch(t){return!1}},t.prototype.getItem=function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],e=arguments[1];try{if("boolean"==typeof t&&"string"==typeof e&&this.regValidKey.test(e)){if(!t||this.isSupported()){e=this.hash+"_"+e;for(var r=document.cookie.split(";"),o=r,n=Array.isArray(o),i=0,o=n?o:o[Symbol.iterator]();;){var s;if(n){if(i>=o.length)break;s=o[i++]}else{if(i=o.next(),i.done)break;s=i.value}var a=s,h=a.trim().split("=",2);if(h[0]===e)return decodeURIComponent(h[1])}return!1}return!1}return!1}catch(t){return!1}},t.prototype.removeItem=function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],e=arguments[1];try{return!("boolean"!=typeof t||"string"!=typeof e||!this.regValidKey.test(e))&&(!(t&&!this.isSupported())&&(this.setItem(t,e,"",-86400),this.getItem(t,e)===!1))}catch(t){return!1}},t.prototype.getKeys=function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];try{if("boolean"==typeof t){if(!t||this.isSupported()){for(var e=[],r=document.cookie.split(";"),o=r,n=Array.isArray(o),i=0,o=n?o:o[Symbol.iterator]();;){var s;if(n){if(i>=o.length)break;s=o[i++]}else{if(i=o.next(),i.done)break;s=i.value}var a=s,h=a.trim().split("=",2);0===h[0].indexOf(this.hash)&&e.push(h[0].substr(this.hash.length+1))}return e}return[]}return[]}catch(t){return[]}},t.prototype.clear=function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];try{if("boolean"==typeof t){if(!t||this.isSupported()){var e=this.getKeys(t);if(e)for(var r=e,o=Array.isArray(r),n=0,r=o?r:r[Symbol.iterator]();;){var i;if(o){if(n>=r.length)break;i=r[n++]}else{if(n=r.next(),n.done)break;i=n.value}var s=i;this.removeItem(t,s)}return 0===this.getKeys(t).length}return!0}return!1}catch(t){return!1}},t}();e.default=s},function(t,e,r){function o(){this.protocol=null,this.slashes=null,this.auth=null,this.host=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.query=null,this.pathname=null,this.path=null,this.href=null}function n(t,e,r){if(t&&u(t)&&t instanceof o)return t;var n=new o;return n.parse(t,e,r),n}function i(t){return h(t)&&(t=n(t)),t instanceof o?t.format():o.prototype.format.call(t)}function s(t,e){return n(t,!1,!0).resolve(e)}function a(t,e){return t?n(t,!1,!0).resolveObject(e):e}function h(t){return"string"==typeof t}function u(t){return"object"==typeof t&&null!==t}function f(t){return null===t}function l(t){return null==t}var p=r(9);e.parse=n,e.resolve=s,e.resolveObject=a,e.format=i,e.Url=o;var c=/^([a-z0-9.+-]+:)/i,y=/:[0-9]*$/,d=["<",">",'"',"`"," ","\r","\n","\t"],m=["{","}","|","\\","^","`"].concat(d),g=["'"].concat(m),v=["%","/","?",";","#"].concat(g),b=["/","?","#"],S=255,w=/^[a-z0-9A-Z_-]{0,63}$/,A=/^([a-z0-9A-Z_-]{0,63})(.*)$/,k={javascript:!0,"javascript:":!0},x={javascript:!0,"javascript:":!0},I={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},j=r(11);o.prototype.parse=function(t,e,r){if(!h(t))throw new TypeError("Parameter 'url' must be a string, not "+typeof t);var o=t;o=o.trim();var n=c.exec(o);if(n){n=n[0];var i=n.toLowerCase();this.protocol=i,o=o.substr(n.length)}if(r||n||o.match(/^\/\/[^@\/]+@[^@\/]+/)){var s="//"===o.substr(0,2);!s||n&&x[n]||(o=o.substr(2),this.slashes=!0)}if(!x[n]&&(s||n&&!I[n])){for(var a=-1,u=0;u<b.length;u++){var f=o.indexOf(b[u]);f!==-1&&(a===-1||f<a)&&(a=f)}var l,y;y=a===-1?o.lastIndexOf("@"):o.lastIndexOf("@",a),y!==-1&&(l=o.slice(0,y),o=o.slice(y+1),this.auth=decodeURIComponent(l)),a=-1;for(var u=0;u<v.length;u++){var f=o.indexOf(v[u]);f!==-1&&(a===-1||f<a)&&(a=f)}a===-1&&(a=o.length),this.host=o.slice(0,a),o=o.slice(a),this.parseHost(),this.hostname=this.hostname||"";var d="["===this.hostname[0]&&"]"===this.hostname[this.hostname.length-1];if(!d)for(var m=this.hostname.split(/\./),u=0,K=m.length;u<K;u++){var O=m[u];if(O&&!O.match(w)){for(var _="",C=0,R=O.length;C<R;C++)_+=O.charCodeAt(C)>127?"x":O[C];if(!_.match(w)){var E=m.slice(0,u),V=m.slice(u+1),q=O.match(A);q&&(E.push(q[1]),V.unshift(q[2])),V.length&&(o="/"+V.join(".")+o),this.hostname=E.join(".");break}}}if(this.hostname.length>S?this.hostname="":this.hostname=this.hostname.toLowerCase(),!d){for(var F=this.hostname.split("."),T=[],u=0;u<F.length;++u){var U=F[u];T.push(U.match(/[^A-Za-z0-9_-]/)?"xn--"+p.encode(U):U)}this.hostname=T.join(".")}var M=this.port?":"+this.port:"",z=this.hostname||"";this.host=z+M,this.href+=this.host,d&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),"/"!==o[0]&&(o="/"+o))}if(!k[i])for(var u=0,K=g.length;u<K;u++){var P=g[u],Z=encodeURIComponent(P);Z===P&&(Z=escape(P)),o=o.split(P).join(Z)}var D=o.indexOf("#");D!==-1&&(this.hash=o.substr(D),o=o.slice(0,D));var L=o.indexOf("?");if(L!==-1?(this.search=o.substr(L),this.query=o.substr(L+1),e&&(this.query=j.parse(this.query)),o=o.slice(0,L)):e&&(this.search="",this.query={}),o&&(this.pathname=o),I[i]&&this.hostname&&!this.pathname&&(this.pathname="/"),this.pathname||this.search){var M=this.pathname||"",U=this.search||"";this.path=M+U}return this.href=this.format(),this},o.prototype.format=function(){var t=this.auth||"";t&&(t=encodeURIComponent(t),t=t.replace(/%3A/i,":"),t+="@");var e=this.protocol||"",r=this.pathname||"",o=this.hash||"",n=!1,i="";this.host?n=t+this.host:this.hostname&&(n=t+(this.hostname.indexOf(":")===-1?this.hostname:"["+this.hostname+"]"),this.port&&(n+=":"+this.port)),this.query&&u(this.query)&&Object.keys(this.query).length&&(i=j.stringify(this.query));var s=this.search||i&&"?"+i||"";return e&&":"!==e.substr(-1)&&(e+=":"),this.slashes||(!e||I[e])&&n!==!1?(n="//"+(n||""),r&&"/"!==r.charAt(0)&&(r="/"+r)):n||(n=""),o&&"#"!==o.charAt(0)&&(o="#"+o),s&&"?"!==s.charAt(0)&&(s="?"+s),r=r.replace(/[?#]/g,function(t){return encodeURIComponent(t)}),s=s.replace("#","%23"),e+n+r+s+o},o.prototype.resolve=function(t){return this.resolveObject(n(t,!1,!0)).format()},o.prototype.resolveObject=function(t){if(h(t)){var e=new o;e.parse(t,!1,!0),t=e}var r=new o;if(Object.keys(this).forEach(function(t){r[t]=this[t]},this),r.hash=t.hash,""===t.href)return r.href=r.format(),r;if(t.slashes&&!t.protocol)return Object.keys(t).forEach(function(e){"protocol"!==e&&(r[e]=t[e])}),I[r.protocol]&&r.hostname&&!r.pathname&&(r.path=r.pathname="/"),r.href=r.format(),r;if(t.protocol&&t.protocol!==r.protocol){if(!I[t.protocol])return Object.keys(t).forEach(function(e){r[e]=t[e]}),r.href=r.format(),r;if(r.protocol=t.protocol,t.host||x[t.protocol])r.pathname=t.pathname;else{for(var n=(t.pathname||"").split("/");n.length&&!(t.host=n.shift()););t.host||(t.host=""),t.hostname||(t.hostname=""),""!==n[0]&&n.unshift(""),n.length<2&&n.unshift(""),r.pathname=n.join("/")}if(r.search=t.search,r.query=t.query,r.host=t.host||"",r.auth=t.auth,r.hostname=t.hostname||t.host,r.port=t.port,r.pathname||r.search){var i=r.pathname||"",s=r.search||"";r.path=i+s}return r.slashes=r.slashes||t.slashes,r.href=r.format(),r}var a=r.pathname&&"/"===r.pathname.charAt(0),u=t.host||t.pathname&&"/"===t.pathname.charAt(0),p=u||a||r.host&&t.pathname,c=p,y=r.pathname&&r.pathname.split("/")||[],n=t.pathname&&t.pathname.split("/")||[],d=r.protocol&&!I[r.protocol];if(d&&(r.hostname="",r.port=null,r.host&&(""===y[0]?y[0]=r.host:y.unshift(r.host)),r.host="",t.protocol&&(t.hostname=null,t.port=null,t.host&&(""===n[0]?n[0]=t.host:n.unshift(t.host)),t.host=null),p=p&&(""===n[0]||""===y[0])),u)r.host=t.host||""===t.host?t.host:r.host,r.hostname=t.hostname||""===t.hostname?t.hostname:r.hostname,r.search=t.search,r.query=t.query,y=n;else if(n.length)y||(y=[]),y.pop(),y=y.concat(n),r.search=t.search,r.query=t.query;else if(!l(t.search)){if(d){r.hostname=r.host=y.shift();var m=!!(r.host&&r.host.indexOf("@")>0)&&r.host.split("@");m&&(r.auth=m.shift(),r.host=r.hostname=m.shift())}return r.search=t.search,r.query=t.query,f(r.pathname)&&f(r.search)||(r.path=(r.pathname?r.pathname:"")+(r.search?r.search:"")),r.href=r.format(),r}if(!y.length)return r.pathname=null,r.search?r.path="/"+r.search:r.path=null,r.href=r.format(),r;for(var g=y.slice(-1)[0],v=(r.host||t.host)&&("."===g||".."===g)||""===g,b=0,S=y.length;S>=0;S--)g=y[S],"."==g?y.splice(S,1):".."===g?(y.splice(S,1),b++):b&&(y.splice(S,1),b--);if(!p&&!c)for(;b--;b)y.unshift("..");!p||""===y[0]||y[0]&&"/"===y[0].charAt(0)||y.unshift(""),v&&"/"!==y.join("/").substr(-1)&&y.push("");var w=""===y[0]||y[0]&&"/"===y[0].charAt(0);if(d){r.hostname=r.host=w?"":y.length?y.shift():"";var m=!!(r.host&&r.host.indexOf("@")>0)&&r.host.split("@");m&&(r.auth=m.shift(),r.host=r.hostname=m.shift())}return p=p||r.host&&y.length,p&&!w&&y.unshift(""),y.length?r.pathname=y.join("/"):(r.pathname=null,r.path=null),f(r.pathname)&&f(r.search)||(r.path=(r.pathname?r.pathname:"")+(r.search?r.search:"")),r.auth=t.auth||r.auth,r.slashes=r.slashes||t.slashes,r.href=r.format(),r},o.prototype.parseHost=function(){var t=this.host,e=y.exec(t);e&&(e=e[0],":"!==e&&(this.port=e.substr(1)),t=t.substr(0,t.length-e.length)),t&&(this.hostname=t)}},function(t,e,r){var o;(function(t,n){!function(i){function s(t){throw RangeError(E[t])}function a(t,e){for(var r=t.length,o=[];r--;)o[r]=e(t[r]);return o}function h(t,e){var r=t.split("@"),o="";r.length>1&&(o=r[0]+"@",t=r[1]),t=t.replace(R,".");var n=t.split("."),i=a(n,e).join(".");return o+i}function u(t){for(var e,r,o=[],n=0,i=t.length;n<i;)e=t.charCodeAt(n++),e>=55296&&e<=56319&&n<i?(r=t.charCodeAt(n++),56320==(64512&r)?o.push(((1023&e)<<10)+(1023&r)+65536):(o.push(e),n--)):o.push(e);return o}function f(t){return a(t,function(t){var e="";return t>65535&&(t-=65536,e+=F(t>>>10&1023|55296),t=56320|1023&t),e+=F(t)}).join("")}function l(t){return t-48<10?t-22:t-65<26?t-65:t-97<26?t-97:w}function p(t,e){return t+22+75*(t<26)-((0!=e)<<5)}function c(t,e,r){var o=0;for(t=r?q(t/I):t>>1,t+=q(t/e);t>V*k>>1;o+=w)t=q(t/V);return q(o+(V+1)*t/(t+x))}function y(t){var e,r,o,n,i,a,h,u,p,y,d=[],m=t.length,g=0,v=K,b=j;for(r=t.lastIndexOf(O),r<0&&(r=0),o=0;o<r;++o)t.charCodeAt(o)>=128&&s("not-basic"),d.push(t.charCodeAt(o));for(n=r>0?r+1:0;n<m;){for(i=g,a=1,h=w;n>=m&&s("invalid-input"),u=l(t.charCodeAt(n++)),(u>=w||u>q((S-g)/a))&&s("overflow"),g+=u*a,p=h<=b?A:h>=b+k?k:h-b,!(u<p);h+=w)y=w-p,a>q(S/y)&&s("overflow"),a*=y;e=d.length+1,b=c(g-i,e,0==i),q(g/e)>S-v&&s("overflow"),v+=q(g/e),g%=e,d.splice(g++,0,v)}return f(d)}function d(t){var e,r,o,n,i,a,h,f,l,y,d,m,g,v,b,x=[];for(t=u(t),m=t.length,e=K,r=0,i=j,a=0;a<m;++a)d=t[a],d<128&&x.push(F(d));for(o=n=x.length,n&&x.push(O);o<m;){for(h=S,a=0;a<m;++a)d=t[a],d>=e&&d<h&&(h=d);for(g=o+1,h-e>q((S-r)/g)&&s("overflow"),r+=(h-e)*g,e=h,a=0;a<m;++a)if(d=t[a],d<e&&++r>S&&s("overflow"),d==e){for(f=r,l=w;y=l<=i?A:l>=i+k?k:l-i,!(f<y);l+=w)b=f-y,v=w-y,x.push(F(p(y+b%v,0))),f=q(b/v);x.push(F(p(f,0))),i=c(r,g,o==n),r=0,++o}++r,++e}return x.join("")}function m(t){return h(t,function(t){return _.test(t)?y(t.slice(4).toLowerCase()):t})}function g(t){return h(t,function(t){return C.test(t)?"xn--"+d(t):t})}var v=("object"==typeof e&&e&&!e.nodeType&&e,"object"==typeof t&&t&&!t.nodeType&&t,"object"==typeof n&&n);v.global!==v&&v.window!==v&&v.self!==v||(i=v);var b,S=2147483647,w=36,A=1,k=26,x=38,I=700,j=72,K=128,O="-",_=/^xn--/,C=/[^\x20-\x7E]/,R=/[\x2E\u3002\uFF0E\uFF61]/g,E={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},V=w-A,q=Math.floor,F=String.fromCharCode;b={version:"1.3.2",ucs2:{decode:u,encode:f},decode:y,encode:d,toASCII:g,toUnicode:m},o=function(){return b}.call(e,r,e,t),!(void 0!==o&&(t.exports=o))}(this)}).call(e,r(10)(t),function(){return this}())},function(t,e){t.exports=function(t){return t.webpackPolyfill||(t.deprecate=function(){},t.paths=[],t.children=[],t.webpackPolyfill=1),t}},function(t,e,r){"use strict";e.decode=e.parse=r(12),e.encode=e.stringify=r(13)},function(t,e){"use strict";function r(t,e){return Object.prototype.hasOwnProperty.call(t,e)}t.exports=function(t,e,o,n){e=e||"&",o=o||"=";var i={};if("string"!=typeof t||0===t.length)return i;var s=/\+/g;t=t.split(e);var a=1e3;n&&"number"==typeof n.maxKeys&&(a=n.maxKeys);var h=t.length;a>0&&h>a&&(h=a);for(var u=0;u<h;++u){var f,l,p,c,y=t[u].replace(s,"%20"),d=y.indexOf(o);d>=0?(f=y.substr(0,d),l=y.substr(d+1)):(f=y,l=""),p=decodeURIComponent(f),c=decodeURIComponent(l),r(i,p)?Array.isArray(i[p])?i[p].push(c):i[p]=[i[p],c]:i[p]=c}return i}},function(t,e){"use strict";var r=function(t){switch(typeof t){case"string":return t;case"boolean":return t?"true":"false";case"number":return isFinite(t)?t:"";default:return""}};t.exports=function(t,e,o,n){return e=e||"&",o=o||"=",null===t&&(t=void 0),"object"==typeof t?Object.keys(t).map(function(n){var i=encodeURIComponent(r(n))+o;return Array.isArray(t[n])?t[n].map(function(t){return i+encodeURIComponent(r(t))}).join(e):i+encodeURIComponent(r(t[n]))}).join(e):n?encodeURIComponent(r(n))+o+encodeURIComponent(r(t)):""}},function(t,e){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}e.__esModule=!0;var o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},n=function(){function t(e){r(this,t),this.regValidKey=new RegExp("([a-zA-Z0-9_-]{0,})","i"),this.hash=e||location.hostname,this.domStorage=document.getElementById(this.hash),this.domStorage||(this.domStorage=document.createElement("div"),this.domStorage.id=this.hash),document.body&&(document.body.appendChild(this.domStorage),this.domStorage=document.getElementById(this.hash),this.isSupported()&&(this.domStorage.style.behavior="url(#default#userData)"))}return t.prototype.isSupported=function(){return"object"===o(this.domStorage)&&"object"===o(this.domStorage.parentNode)&&"undefined"!=typeof this.domStorage.addBehavior},t.prototype.setItem=function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],e=arguments[1],r=arguments[2];try{if("boolean"==typeof t&&"string"==typeof e&&this.regValidKey.test(e)&&"string"==typeof r&&(""===r||this.regValidKey.test(r))){if(!t||this.isSupported()){var o=this.hash+"_"+e;return this.domStorage.setAttribute(o,r),this.domStorage.save(this.hash),this.getItem(t,e)===r}return!1}return!1}catch(t){return!1}},t.prototype.getItem=function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],e=arguments[1];try{if("boolean"==typeof t&&"string"==typeof e&&this.regValidKey.test(e)){if(!t||this.isSupported()){var r=this.hash+"_"+e;this.domStorage.load(this.hash);var o=this.domStorage.getAttribute(r);return!!o&&o}return!1}return!1}catch(t){return!1}},t.prototype.removeItem=function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],e=arguments[1];try{if("boolean"==typeof t&&"string"==typeof e&&this.regValidKey.test(e)){if(!t||this.isSupported()){var r=this.hash+"_"+e;return this.domStorage.removeAttribute(r),this.domStorage.save(this.hash),this.getItem(t,e)===!1}return!1}return!1}catch(t){return!1}},t.prototype.getKeys=function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];try{if("boolean"==typeof t){if(!t||this.isSupported()){for(var e=[],r=this.domStorage.XMLDocument.documentElement.attributes,o=0;o<r.length;o++){var n=r[o].name;0===n.indexOf(this.hash)&&e.push(n.substr(this.hash.length+1))}return e}return[]}return[]}catch(t){return[]}},t.prototype.clear=function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];try{if("boolean"==typeof t){if(!t||this.isSupported()){var e=this.getKeys(t);if(e)for(var r=e,o=Array.isArray(r),n=0,r=o?r:r[Symbol.iterator]();;){var i;if(o){if(n>=r.length)break;i=r[n++]}else{if(n=r.next(),n.done)break;i=n.value}var s=i;this.removeItem(t,s)}return 0===this.getKeys(t).length}return!0}return!1}catch(t){return!1}},t}();e.default=n},function(t,e){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}e.__esModule=!0;var o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},n=function(){function t(e){r(this,t),this.regValidKey=new RegExp("([a-zA-Z0-9_-]{0,})","i"),this.hash=e||location.hostname,window.globalStorage||(window.globalStorage={}),window.globalStorage[document.domain]||(window.globalStorage[document.domain]={}),this.globalStorage=window.globalStorage[document.domain]}return t.prototype.isSupported=function(){return"object"===o(this.globalStorage)},t.prototype.setItem=function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],e=arguments[1],r=arguments[2];try{if("boolean"==typeof t&&"string"==typeof e&&this.regValidKey.test(e)&&"string"==typeof r&&(""===r||this.regValidKey.test(r))){if(!t||this.isSupported()){var o=this.hash+"_"+e;return this.globalStorage[o]=r,this.getItem(t,e)===r}return!1}return!1}catch(t){return!1}},t.prototype.getItem=function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],e=arguments[1];try{if("boolean"==typeof t&&"string"==typeof e&&this.regValidKey.test(e)){if(!t||this.isSupported()){var r=this.hash+"_"+e,o=this.globalStorage[r];return!!o&&o}return!1}return!1}catch(t){return!1}},t.prototype.removeItem=function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],e=arguments[1];try{if("boolean"==typeof t&&"string"==typeof e&&this.regValidKey.test(e)){if(!t||this.isSupported()){var r=this.hash+"_"+e;return this.globalStorage[r]=!1,delete this.globalStorage[r],this.getItem(t,e)===!1}return!1}return!1}catch(t){return!1}},t.prototype.getKeys=function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];try{if("boolean"==typeof t){if(!t||this.isSupported()){for(var e=[],r=Object.keys(this.globalStorage),o=r,n=Array.isArray(o),i=0,o=n?o:o[Symbol.iterator]();;){var s;if(n){if(i>=o.length)break;s=o[i++]}else{if(i=o.next(),i.done)break;s=i.value}var a=s;0===a.indexOf(this.hash)&&e.push(a.substr(this.hash.length+1))}return e}return[]}return[]}catch(t){return[]}},t.prototype.clear=function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];try{if("boolean"==typeof t){if(!t||this.isSupported()){var e=this.getKeys(t);if(e)for(var r=e,o=Array.isArray(r),n=0,r=o?r:r[Symbol.iterator]();;){var i;if(o){if(n>=r.length)break;i=r[n++]}else{if(n=r.next(),n.done)break;i=n.value}var s=i;this.removeItem(t,s)}return 0===this.getKeys(t).length}return!0}return!1}catch(t){return!1}},t}();e.default=n},function(t,e){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}e.__esModule=!0;var o=function(){function t(e){r(this,t),this.regValidKey=new RegExp("([a-zA-Z0-9_-]{0,})","i"),this.hash=e||location.hostname}return t.prototype.isSupported=function(){return"undefined"!=typeof window.localStorage},t.prototype.setItem=function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],e=arguments[1],r=arguments[2];try{if("boolean"==typeof t&&"string"==typeof e&&this.regValidKey.test(e)&&"string"==typeof r&&(""===r||this.regValidKey.test(r))){if(!t||this.isSupported()){var o=this.hash+"_"+e;return window.localStorage.setItem(o,r),this.getItem(t,e)===r}return!1}return!1}catch(t){return!1}},t.prototype.getItem=function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],e=arguments[1];try{if("boolean"==typeof t&&"string"==typeof e&&this.regValidKey.test(e)){if(!t||this.isSupported()){var r=this.hash+"_"+e,o=window.localStorage.getItem(r);return!!o&&o}return!1}return!1}catch(t){return!1}},t.prototype.removeItem=function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],e=arguments[1];try{if("boolean"==typeof t&&"string"==typeof e&&this.regValidKey.test(e)){if(!t||this.isSupported()){var r=this.hash+"_"+e;return window.localStorage.removeItem(r),this.getItem(t,e)===!1}return!1}return!1}catch(t){return!1}},t.prototype.getKeys=function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];try{if("boolean"==typeof t){if(!t||this.isSupported()){for(var e=[],r=0;r<window.localStorage.length;r++)0===window.localStorage.key(r).indexOf(this.hash)&&e.push(window.localStorage.key(r).substr(this.hash.length+1));return e}return[]}return[]}catch(t){return[]}},t.prototype.clear=function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];try{if("boolean"==typeof t){if(!t||this.isSupported()){var e=this.getKeys(t);if(e)for(var r=e,o=Array.isArray(r),n=0,r=o?r:r[Symbol.iterator]();;){var i;if(o){if(n>=r.length)break;i=r[n++]}else{if(n=r.next(),n.done)break;i=n.value}var s=i;this.removeItem(t,s)}return 0===this.getKeys(t).length}return!0}return!1}catch(t){return!1}},t}();e.default=o},function(t,e){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}e.__esModule=!0;var o=function(){function t(e){r(this,t),this.regValidKey=new RegExp("([a-zA-Z0-9_-]{0,})","i"),this.hash=e||location.hostname}return t.prototype.isSupported=function(){return"undefined"!=typeof window.sessionStorage},t.prototype.setItem=function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],e=arguments[1],r=arguments[2];try{if("boolean"==typeof t&&"string"==typeof e&&this.regValidKey.test(e)&&"string"==typeof r&&(""===r||this.regValidKey.test(r))){if(!t||this.isSupported()){var o=this.hash+"_"+e;return window.sessionStorage.setItem(o,r),this.getItem(t,e)===r}return!1}return!1}catch(t){return!1}},t.prototype.getItem=function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],e=arguments[1];try{if("boolean"==typeof t&&"string"==typeof e&&this.regValidKey.test(e)){if(!t||this.isSupported()){var r=this.hash+"_"+e,o=window.sessionStorage.getItem(r);return!!o&&o}return!1}return!1}catch(t){return!1}},t.prototype.removeItem=function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],e=arguments[1];try{if("boolean"==typeof t&&"string"==typeof e&&this.regValidKey.test(e)){if(!t||this.isSupported()){var r=this.hash+"_"+e;return window.sessionStorage.removeItem(r),this.getItem(t,e)===!1}return!1}return!1}catch(t){return!1}},t.prototype.getKeys=function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];
try{if("boolean"==typeof t){if(!t||this.isSupported()){for(var e=[],r=0;r<window.sessionStorage.length;r++)0===window.sessionStorage.key(r).indexOf(this.hash)&&e.push(window.sessionStorage.key(r).substr(this.hash.length+1));return e}return[]}return[]}catch(t){return[]}},t.prototype.clear=function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];try{if("boolean"==typeof t){if(!t||this.isSupported()){var e=this.getKeys(t);if(e)for(var r=e,o=Array.isArray(r),n=0,r=o?r:r[Symbol.iterator]();;){var i;if(o){if(n>=r.length)break;i=r[n++]}else{if(n=r.next(),n.done)break;i=n.value}var s=i;this.removeItem(t,s)}return 0===this.getKeys(t).length}return!0}return!1}catch(t){return!1}},t}();e.default=o}])});