export function setCookie(e,o,n={path:"/"}){if("undefined"==typeof document)return;"number"==typeof n.expires&&(n.expires=new Date(Date.now()+864e5*n.expires)),n.expires&&(n.expires=n.expires instanceof Date?n.expires.toUTCString():n.expires),e=encodeURIComponent(e).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape);let t="";for(const e in n)n[e]&&(t+="; "+e,!0!==n[e]&&(t+="="+String(n[e]).split(";")[0]));return document.cookie=e+"="+encode(o)+t}export function getCookie(e,o){const n="undefined"!=typeof document?document.cookie:o,t=n?n.split("; "):[],i={};for(let o=0;o<t.length;o++){const n=t[o].split("="),c=n.slice(1).join("=");try{const o=decodeURIComponent(n[0]);if(o in i||(i[o]=decode(c)),e===o)break}catch(e){}}return e?i[e]:i}export function removeCookie(e,o={path:"/"}){setCookie(e,"",Object.assign(Object.assign({},o),{expires:-1}))}function decode(e){return'"'===e[0]&&(e=e.slice(1,-1)),e.replace(/(%[\dA-F]{2})+/gi,decodeURIComponent)}function encode(e){return encodeURIComponent(e).replace(/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,decodeURIComponent)}
//# sourceMappingURL=cookies.js.map