!function(e,n){"object"==typeofexports&&"undefined"!=typeofmodule?n(exports):"function"==typeofdefine&&define.amd?define(["exports"],n):n((e=e||self).haven={})}(this,(function(e){"use strict";functionn(e){return(n="function"==typeofSymbol&&"symbol"==typeofSymbol.iterator?function(e){returntypeofe}:function(e){returne&&"function"==typeofSymbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeofe})(e)}functiono(e,n){if(!(einstanceofn))thrownewTypeError("Cannot call a class as a function")}functiont(e,n){for(varo=0;o<n.length;o++){vart=n[o];t.enumerable=t.enumerable||!1,t.configurable=!0,"value"int&&(t.writable=!0),Object.defineProperty(e,t.key,t)}}functioni(e,n,o){returnn&&t(e.prototype,n),o&&t(e,o),e}functiona(e,n,o){returnnine?Object.defineProperty(e,n,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[n]=o,e}functionr(e,n){varo=Object.keys(e);if(Object.getOwnPropertySymbols){vart=Object.getOwnPropertySymbols(e);n&&(t=t.filter((function(n){returnObject.getOwnPropertyDescriptor(e,n).enumerable}))),o.push.apply(o,t)}returno}functionc(e){for(varn=1;n<arguments.length;n++){varo=null!=arguments[n]?arguments[n]:{};n%2?r(Object(o),!0).forEach((function(n){a(e,n,o[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):r(Object(o)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(o,n))}))}returne}functions(e){returnfunction(e){if(Array.isArray(e))returnu(e)}(e)||function(e){if("undefined"!=typeofSymbol&&Symbol.iteratorinObject(e))returnArray.from(e)}(e)||l(e)||function(){thrownewTypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}functionl(e,n){if(e){if("string"==typeofe)returnu(e,n);varo=Object.prototype.toString.call(e).slice(8,-1);return"Object"===o&&e.constructor&&(o=e.constructor.name),"Map"===o||"Set"===o?Array.from(e):"Arguments"===o||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(o)?u(e,n):void0}}functionu(e,n){(null==n||n>e.length)&&(n=e.length);for(varo=0,t=newArray(n);o<n;o++)t[o]=e[o];returnt}functionf(e,n){varo;if("undefined"==typeofSymbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(o=l(e))||n&&e&&"number"==typeofe.length){o&&(e=o);vart=0,i=function(){};return{s:i,n:function(){returnt>=e.length?{done:!0}:{done:!1,value:e[t++]}},e:function(e){throwe},f:i}}thrownewTypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}vara,r=!0,c=!1;return{s:function(){o=e[Symbol.iterator]()},n:function(){vare=o.next();returnr=e.done,e},e:function(e){c=!0,a=e},f:function(){try{r||null==o.return||o.return()}finally{if(c)throwa}}}}functiond(e){returne.replace(/(%[\dA-F]{2})+/gi,decodeURIComponent)}varv=function(){functione(){o(this,e)}returni(e,null,[{key:"set",value:function(e,n,o){vart=this.resolveOptions(o),i=encodeURIComponent(String(n)).replace(/%(23|24|26|2B|3A|3C|3E|3D|2F|3F|40|5B|5D|5E|60|7B|7D|7C)/g,decodeURIComponent),a=encodeURIComponent(String(e)).replace(/%(23|24|26|2B|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape),r=this.encodeAttributes(t);document.cookie="".concat(a,"=").concat(i).concat(r)}},{key:"get",value:function(e){varn,o=f(document.cookie?document.cookie.split("; "):[]);try{for(o.s();!(n=o.n()).done;){vart=n.value.split("=");if(e===d(t[0])){vari=t.slice(1).join("=");return'"'===i.charAt(0)&&(i=i.slice(1,-1)),i=d(i)}}}catch(e){o.e(e)}finally{o.f()}}},{key:"getAll",value:function(){vare,n={},o=f(document.cookie?document.cookie.split("; "):[]);try{for(o.s();!(e=o.n()).done;){vart=e.value.split("="),i=d(t[0]),a=t.slice(1).join("=");'"'===a.charAt(0)&&(a=a.slice(1,-1)),a=d(a),n[i]=a}}catch(e){o.e(e)}finally{o.f()}returnn}},{key:"remove",value:function(e){varn=arguments.length>1&&void0!==arguments[1]?arguments[1]:{},o=this.resolveOptions(Object.assign(n,{expires:-1}));if(einstanceofRegExp)returnthis.removeByRegex(e,o);vart=this.encodeAttributes(o)