"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[312],{5312:function(e,t,n){n.d(t,{O4:function(){return l}});var r=n(3915);let o=Symbol("RESET"),i=e=>"function"==typeof(null==e?void 0:e.then),u=function(e=()=>{try{return window.localStorage}catch(e){"undefined"!=typeof window&&console.warn(e);return}},t){var n;let r,o,u;let l={getItem:(t,n)=>{var u,l;let s=e=>{if(r!==(e=e||"")){try{o=JSON.parse(e,void 0)}catch(e){return n}r=e}return o},a=null!=(l=null==(u=e())?void 0:u.getItem(t))?l:null;return i(a)?a.then(s):s(a)},setItem:(t,n)=>{var r;return null==(r=e())?void 0:r.setItem(t,JSON.stringify(n,void 0))},removeItem:t=>{var n;return null==(n=e())?void 0:n.removeItem(t)}};try{u=null==(n=e())?void 0:n.subscribe}catch(e){}if(!u&&"undefined"!=typeof window&&"function"==typeof window.addEventListener&&window.Storage&&(u=(t,n)=>{if(!(e() instanceof window.Storage))return()=>{};let r=r=>{r.storageArea===e()&&r.key===t&&n(r.newValue)};return window.addEventListener("storage",r),()=>{window.removeEventListener("storage",r)}}),u){let e;l.subscribe=(e=u,(t,n,r)=>e(t,e=>{let t;try{t=JSON.parse(e||"")}catch(e){t=r}n(t)}))}return l}();function l(e,t,n=u,i){let l=null==i?void 0:i.getOnInit,s=(0,r.cn)(l?n.getItem(e,t):t);return s.debugPrivate=!0,s.onMount=r=>{let o;return r(n.getItem(e,t)),n.subscribe&&(o=n.subscribe(e,r,t)),o},(0,r.cn)(e=>e(s),(r,i,u)=>{let l="function"==typeof u?u(r(s)):u;return l===o?(i(s,t),n.removeItem(e)):l instanceof Promise?l.then(t=>(i(s,t),n.setItem(e,t))):(i(s,l),n.setItem(e,l))})}}}]);