import{S as e,a as t}from"./p-7e860896.js";import{c as n,a as r}from"./p-814af281.js";var o=n((function(e){e.exports=function(){function e(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)e[r]=n[r]}return e}return function t(n,r){function o(t,o,i){if("undefined"!=typeof document){"number"==typeof(i=e({},r,i)).expires&&(i.expires=new Date(Date.now()+864e5*i.expires)),i.expires&&(i.expires=i.expires.toUTCString()),t=encodeURIComponent(t).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape);var u="";for(var c in i)i[c]&&(u+="; "+c,!0!==i[c]&&(u+="="+i[c].split(";")[0]));return document.cookie=t+"="+n.write(o,t)+u}}return Object.create({set:o,get:function(e){if("undefined"!=typeof document&&(!arguments.length||e)){for(var t=document.cookie?document.cookie.split("; "):[],r={},o=0;o<t.length;o++){var i=t[o].split("="),u=i.slice(1).join("=");try{var c=decodeURIComponent(i[0]);if(r[c]=n.read(u,c),e===c)break}catch(e){}}return e?r[e]:r}},remove:function(t,n){o(t,"",e({},n,{expires:-1}))},withAttributes:function(n){return t(this.converter,e({},this.attributes,n))},withConverter:function(n){return t(e({},this.converter,n),this.attributes)}},{attributes:{value:Object.freeze(r)},converter:{value:Object.freeze(n)}})}({read:function(e){return'"'===e[0]&&(e=e.slice(1,-1)),e.replace(/(%[\dA-F]{2})+/gi,decodeURIComponent)},write:function(e){return encodeURIComponent(e).replace(/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,decodeURIComponent)}},{path:"/"})}()}));class i{constructor(){this.cookie=o}static getExpires(e=i.COOKIE_EXPIRATION_DAY_COUNT){const t=new Date;return t.setTime(t.getTime()+24*e*60*60*1e3),t}save(e,t){this.cookie.set(e,t,{path:i.COOKIE_PATH,expires:i.getExpires()})}get(e){return this.cookie.get(e)}remove(e){this.cookie.remove(e,{path:i.COOKIE_PATH})}clear(){this.remove(e),this.remove(t)}getAll(){return{jwt:this.get(e),userId:this.get(t)}}}i.COOKIE_PATH="/",i.COOKIE_EXPIRATION_DAY_COUNT=7;export{i as C}