import{c as t}from"./p-25c0eb4f.js";import{S as n,a as e}from"./p-6279360b.js";var r=t((function(t){t.exports=function(){function t(){for(var t=0,n={};t<arguments.length;t++){var e=arguments[t];for(var r in e)n[r]=e[r]}return n}function n(t){return t.replace(/(%[0-9A-Z]{2})+/g,decodeURIComponent)}return function e(r){function o(){}function c(n,e,c){if("undefined"!=typeof document){"number"==typeof(c=t({path:"/"},o.defaults,c)).expires&&(c.expires=new Date(1*new Date+864e5*c.expires)),c.expires=c.expires?c.expires.toUTCString():"";try{var i=JSON.stringify(e);/^[\{\[]/.test(i)&&(e=i)}catch(t){}e=r.write?r.write(e,n):encodeURIComponent(String(e)).replace(/%(23|24|26|2B|3A|3C|3E|3D|2F|3F|40|5B|5D|5E|60|7B|7D|7C)/g,decodeURIComponent),n=encodeURIComponent(String(n)).replace(/%(23|24|26|2B|5E|60|7C)/g,decodeURIComponent).replace(/[\(\)]/g,escape);var u="";for(var a in c)c[a]&&(u+="; "+a,!0!==c[a]&&(u+="="+c[a].split(";")[0]));return document.cookie=n+"="+e+u}}function i(t,e){if("undefined"!=typeof document){for(var o={},c=document.cookie?document.cookie.split("; "):[],i=0;i<c.length;i++){var u=c[i].split("="),a=u.slice(1).join("=");e||'"'!==a.charAt(0)||(a=a.slice(1,-1));try{var f=n(u[0]);if(a=(r.read||r)(a,f)||n(a),e)try{a=JSON.parse(a)}catch(t){}if(o[f]=a,t===f)break}catch(t){}}return t?o[t]:o}}return o.set=c,o.get=function(t){return i(t,!1)},o.getJSON=function(t){return i(t,!0)},o.remove=function(n,e){c(n,"",t(e,{expires:-1}))},o.defaults={},o.withConverter=e,o}((function(){}))}()}));class o{constructor(){this.cookie=r}static getExpires(t=o.COOKIE_EXPIRATION_DAY_COUNT){const n=new Date;return n.setTime(n.getTime()+24*t*60*60*1e3),n}save(t,n){this.cookie.set(t,n,{path:o.COOKIE_PATH,expires:o.getExpires()})}get(t){return this.cookie.get(t)}remove(t){this.cookie.remove(t,{path:o.COOKIE_PATH})}clear(){this.remove(n),this.remove(e)}getAll(){return{jwt:this.get(n),userId:this.get(e)}}}o.COOKIE_PATH="/",o.COOKIE_EXPIRATION_DAY_COUNT=7;export{o as C}