try{let e=typeof window<`u`?window:typeof global<`u`?global:typeof globalThis<`u`?globalThis:typeof self<`u`?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]=`28ff92b6-6085-413d-856e-79a440143046`,e._sentryDebugIdIdentifier=`sentry-dbid-28ff92b6-6085-413d-856e-79a440143046`)}catch{}import"./rolldown-runtime-eb2nym32.js";import{Fa as e,Ia as t}from"./entry.client-dr7r6s9a.js";var n=`native-platform-storage:`,r=class{async readValue(t){let n=i();try{let r=n.getItem(a(t));if(r===null)throw new e(`not-found`,t);return JSON.parse(r)}catch(n){throw n instanceof e?n:o(n,t)}}async writeValue(e,t){let n=i();try{n.setItem(a(e),JSON.stringify(t))}catch(t){throw o(t,e)}}};function i(){if(typeof window>`u`||!window.localStorage)throw new t;return window.localStorage}function a(e){return`${n}${e}`}function o(t,n){if(t instanceof DOMException){if(t.name===`NotFoundError`)return new e(`not-found`,n,t);if(t.name===`NotAllowedError`||t.name===`SecurityError`)return new e(`permission-denied`,n,t)}return new e(`unknown`,n,t instanceof Error?t:Error(String(t)))}export{r as WebFallbackNativePlatformStorageAdaptor};