/home/arranoyd/magicraft/wp-content/plugins/ninja-popups/assets/js/cookie.min.js
/*!
 * JavaScript Cookie v2.2.0
 * https://github.com/js-cookie/js-cookie
 *
 * Copyright 2006, 2015 Klaus Hartl & Fagner Brack
 * Released under the MIT license
 */
;(function(b){var d;if(typeof define==="function"&&define.amd){define(b);d=true}if(typeof exports==="object"){module.exports=b();d=true}if(!d){var a=window.Cookies;var c=window.Cookies=b();c.noConflict=function(){window.Cookies=a;return c}}}(function(){function b(){var f=0;var c={};for(;f<arguments.length;f++){var d=arguments[f];for(var e in d){c[e]=d[e]}}return c}function a(d){function c(r,q,m){if(typeof document==="undefined"){return}if(arguments.length>1){m=b({path:"/"},c.defaults,m);if(typeof m.expires==="number"){m.expires=new Date(new Date()*1+m.expires*86400000)}m.expires=m.expires?m.expires.toUTCString():"";try{var t=JSON.stringify(q);if(/^[\{\[]/.test(t)){q=t}}catch(o){}q=d.write?d.write(q,r):encodeURIComponent(String(q)).replace(/%(23|24|26|2B|3A|3C|3E|3D|2F|3F|40|5B|5D|5E|60|7B|7D|7C)/g,decodeURIComponent);r=encodeURIComponent(String(r)).replace(/%(23|24|26|2B|5E|60|7C)/g,decodeURIComponent).replace(/[\(\)]/g,escape);var l="";for(var p in m){if(!m[p]){continue}l+="; "+p;if(m[p]===true){continue}l+="="+m[p].split(";")[0]}return(document.cookie=r+"="+q+l)}var j={};var f=function(e){return e.replace(/(%[0-9A-Z]{2})+/g,decodeURIComponent)};var s=document.cookie?document.cookie.split("; "):[];var n=0;for(;n<s.length;n++){var k=s[n].split("=");var h=k.slice(1).join("=");if(!this.json&&h.charAt(0)==='"'){h=h.slice(1,-1)}try{var g=f(k[0]);h=(d.read||d)(h,g)||f(h);if(this.json){try{h=JSON.parse(h)}catch(o){}}0;j[g]=h;if(r===g){break}}catch(o){}}return r?j[r]:j}c.set=c;c.get=function(e){return c.call(c,e)};c.getJSON=function(){return c.apply({json:true},arguments)};c.remove=function(f,e){c(f,"",b(e,{expires:-1}))};c.defaults={};c.withConverter=a;return c}return a(function(){})}));