import{S as STORAGE_KEY_KIMLIK_TOKEN,a as STORAGE_KEY_KIMLIK_USER_ID}from"./kimlik-api-fddeac81.js";import{c as createCommonjsModule,a as commonjsGlobal}from"./_commonjsHelpers-27f122dd.js";var js_cookie=createCommonjsModule((function(e,t){(function(t,o){e.exports=o()})(commonjsGlobal,(function(){function e(e){for(var t=1;t<arguments.length;t++){var o=arguments[t];for(var r in o){e[r]=o[r]}}return e}var t={read:function(e){if(e[0]==='"'){e=e.slice(1,-1)}return 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)}};function o(t,r){function n(o,n,i){if(typeof document==="undefined"){return}i=e({},r,i);if(typeof i.expires==="number"){i.expires=new Date(Date.now()+i.expires*864e5)}if(i.expires){i.expires=i.expires.toUTCString()}o=encodeURIComponent(o).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape);var c="";for(var a in i){if(!i[a]){continue}c+="; "+a;if(i[a]===true){continue}c+="="+i[a].split(";")[0]}return document.cookie=o+"="+t.write(n,o)+c}function i(e){if(typeof document==="undefined"||arguments.length&&!e){return}var o=document.cookie?document.cookie.split("; "):[];var r={};for(var n=0;n<o.length;n++){var i=o[n].split("=");var c=i.slice(1).join("=");try{var a=decodeURIComponent(i[0]);r[a]=t.read(c,a);if(e===a){break}}catch(e){}}return e?r[e]:r}return Object.create({set:n,get:i,remove:function(t,o){n(t,"",e({},o,{expires:-1}))},withAttributes:function(t){return o(this.converter,e({},this.attributes,t))},withConverter:function(t){return o(e({},this.converter,t),this.attributes)}},{attributes:{value:Object.freeze(r)},converter:{value:Object.freeze(t)}})}var r=o(t,{path:"/"});return r}))}));var CookieStorage=function(){function e(){this.cookie=js_cookie}e.getExpires=function(t){if(t===void 0){t=e.COOKIE_EXPIRATION_DAY_COUNT}var o=new Date;o.setTime(o.getTime()+t*24*60*60*1e3);return o};e.prototype.save=function(t,o){this.cookie.set(t,o,{path:e.COOKIE_PATH,expires:e.getExpires()})};e.prototype.get=function(e){return this.cookie.get(e)};e.prototype.remove=function(t){this.cookie.remove(t,{path:e.COOKIE_PATH})};e.prototype.clear=function(){this.remove(STORAGE_KEY_KIMLIK_TOKEN);this.remove(STORAGE_KEY_KIMLIK_USER_ID)};e.prototype.getAll=function(){return{jwt:this.get(STORAGE_KEY_KIMLIK_TOKEN),userId:this.get(STORAGE_KEY_KIMLIK_USER_ID)}};return e}();CookieStorage.COOKIE_PATH="/";CookieStorage.COOKIE_EXPIRATION_DAY_COUNT=7;export{CookieStorage as C};