@powerhousedao/connect 3.2.0-dev.7 → 3.2.0-dev.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (67) hide show
  1. package/dist/assets/{AddDriveModal.Bbr2l8pg.js → AddDriveModal.BpOWh1uv.js} +2 -2
  2. package/dist/assets/{AddDriveModal.Bbr2l8pg.js.map → AddDriveModal.BpOWh1uv.js.map} +1 -1
  3. package/dist/assets/{CreateDocumentModal.AlJtbTUg.js → CreateDocumentModal.DPKtZZxI.js} +2 -2
  4. package/dist/assets/{CreateDocumentModal.AlJtbTUg.js.map → CreateDocumentModal.DPKtZZxI.js.map} +1 -1
  5. package/dist/assets/{DebugSettingsModal.lE-1mdeL.js → DebugSettingsModal.B7BoepXJ.js} +2 -2
  6. package/dist/assets/{DebugSettingsModal.lE-1mdeL.js.map → DebugSettingsModal.B7BoepXJ.js.map} +1 -1
  7. package/dist/assets/{SettingsModal.LqJ3I2dY.js → SettingsModal.BfuRBO12.js} +2 -2
  8. package/dist/assets/{SettingsModal.LqJ3I2dY.js.map → SettingsModal.BfuRBO12.js.map} +1 -1
  9. package/dist/assets/{app.VTqbl4SN.js → app.B-s2KBit.js} +5 -5
  10. package/dist/assets/{app.VTqbl4SN.js.map → app.B-s2KBit.js.map} +1 -1
  11. package/dist/assets/{atlas-import.pzDvlOkg.js → atlas-import.0hInciR-.js} +2 -2
  12. package/dist/assets/{atlas-import.pzDvlOkg.js.map → atlas-import.0hInciR-.js.map} +1 -1
  13. package/dist/assets/{connect.config.BKrPqpZJ.js → connect.config.vrIC-ElT.js} +2 -2
  14. package/dist/assets/{connect.config.BKrPqpZJ.js.map → connect.config.vrIC-ElT.js.map} +1 -1
  15. package/dist/assets/{content.CzKe5qrX.js → content.DD4sJdma.js} +2 -2
  16. package/dist/assets/{content.CzKe5qrX.js.map → content.DD4sJdma.js.map} +1 -1
  17. package/dist/assets/{cookie-banner.C1g7edoI.js → cookie-banner.DFU4VzF0.js} +2 -2
  18. package/dist/assets/{cookie-banner.C1g7edoI.js.map → cookie-banner.DFU4VzF0.js.map} +1 -1
  19. package/dist/assets/{home.Dejd811h.js → home.bOTATKAa.js} +2 -2
  20. package/dist/assets/{home.Dejd811h.js.map → home.bOTATKAa.js.map} +1 -1
  21. package/dist/assets/{index.CL997WGg.js → index.BRbhEpw9.js} +2 -2
  22. package/dist/assets/{index.CL997WGg.js.map → index.BRbhEpw9.js.map} +1 -1
  23. package/dist/assets/{index.CqiHvHEI.js → index.BaR3V0zh.js} +2 -2
  24. package/dist/assets/{index.CqiHvHEI.js.map → index.BaR3V0zh.js.map} +1 -1
  25. package/dist/assets/{index.LL4eJTNs.js → index.CYLzaQFn.js} +3 -3
  26. package/dist/assets/{index.LL4eJTNs.js.map → index.CYLzaQFn.js.map} +1 -1
  27. package/dist/assets/{index.B-cqc0my.js → index.D0SCSRci.js} +2 -2
  28. package/dist/assets/{index.B-cqc0my.js.map → index.D0SCSRci.js.map} +1 -1
  29. package/dist/assets/{index.BkVjnlyo.js → index.D9TUzq2N.js} +2 -2
  30. package/dist/assets/{index.BkVjnlyo.js.map → index.D9TUzq2N.js.map} +1 -1
  31. package/dist/assets/index.Dikcr4Ud.js +2 -0
  32. package/dist/assets/index.Dikcr4Ud.js.map +1 -0
  33. package/dist/assets/{index.Da64h2vQ.js → index.yvd2GW6v.js} +2 -2
  34. package/dist/assets/{index.Da64h2vQ.js.map → index.yvd2GW6v.js.map} +1 -1
  35. package/dist/assets/{main.CWRd9TZM.js → main.CFNeNS2j.js} +3 -3
  36. package/dist/assets/{main.CWRd9TZM.js.map → main.CFNeNS2j.js.map} +1 -1
  37. package/dist/assets/{modal.7v7DsqvJ.js → modal.9LGoAjVo.js} +3 -3
  38. package/dist/assets/{modal.7v7DsqvJ.js.map → modal.9LGoAjVo.js.map} +1 -1
  39. package/dist/assets/{modals.BjVYHxEq.js → modals.BYfjK3zU.js} +2 -2
  40. package/dist/assets/{modals.BjVYHxEq.js.map → modals.BYfjK3zU.js.map} +1 -1
  41. package/dist/assets/nodefs.CuKikx4h.js +2 -0
  42. package/dist/assets/{nodefs.CUutxwwQ.js.map → nodefs.CuKikx4h.js.map} +1 -1
  43. package/dist/assets/{opfs-ahp.UxTr_8_N.js → opfs-ahp.B6h3rCNj.js} +2 -2
  44. package/dist/assets/{opfs-ahp.UxTr_8_N.js.map → opfs-ahp.B6h3rCNj.js.map} +1 -1
  45. package/dist/assets/{registerServiceWorker.bovghwDf.js → registerServiceWorker.BhgDwFqE.js} +2 -2
  46. package/dist/assets/{registerServiceWorker.bovghwDf.js.map → registerServiceWorker.BhgDwFqE.js.map} +1 -1
  47. package/dist/assets/{root.BBZ1eJu-.js → root.BKKhlzrO.js} +2 -2
  48. package/dist/assets/{root.BBZ1eJu-.js.map → root.BKKhlzrO.js.map} +1 -1
  49. package/dist/assets/{useAcceptedCookies.BRFP8YQO.js → useAcceptedCookies.Dw8zTATh.js} +2 -2
  50. package/dist/assets/{useAcceptedCookies.BRFP8YQO.js.map → useAcceptedCookies.Dw8zTATh.js.map} +1 -1
  51. package/dist/assets/useConnectConfig.I_FFm8lE.js +2 -0
  52. package/dist/assets/{useConnectConfig.CKApLiWr.js.map → useConnectConfig.I_FFm8lE.js.map} +1 -1
  53. package/dist/assets/{useDefaultDocumentModelEditor.BE9dVkYi.js → useDefaultDocumentModelEditor.B3aNl1JI.js} +2 -2
  54. package/dist/assets/{useDefaultDocumentModelEditor.BE9dVkYi.js.map → useDefaultDocumentModelEditor.B3aNl1JI.js.map} +1 -1
  55. package/dist/assets/{useDocumentDriveServer.D3p_qwnp.js → useDocumentDriveServer.CfQX8731.js} +2 -2
  56. package/dist/assets/{useDocumentDriveServer.D3p_qwnp.js.map → useDocumentDriveServer.CfQX8731.js.map} +1 -1
  57. package/dist/assets/{useFeatureFlags.DGb_90uZ.js → useFeatureFlags.CJKNBSez.js} +2 -2
  58. package/dist/assets/{useFeatureFlags.DGb_90uZ.js.map → useFeatureFlags.CJKNBSez.js.map} +1 -1
  59. package/dist/assets/{user.Dq07wtiY.js → user.Ca59JWI8.js} +4 -4
  60. package/dist/assets/{user.Dq07wtiY.js.map → user.Ca59JWI8.js.map} +1 -1
  61. package/dist/index.html +1 -1
  62. package/dist/vite-envs.sh +1 -1
  63. package/package.json +9 -9
  64. package/dist/assets/index.CgW9MrEd.js +0 -2
  65. package/dist/assets/index.CgW9MrEd.js.map +0 -1
  66. package/dist/assets/nodefs.CUutxwwQ.js +0 -2
  67. package/dist/assets/useConnectConfig.CKApLiWr.js +0 -2
@@ -1,3 +1,3 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./app.VTqbl4SN.js","./index.CP03D3n8.js","./connect.config.BKrPqpZJ.js","./browser.BkwNmV2Z.js","./useFeatureFlags.DGb_90uZ.js","./user.Dq07wtiY.js","./useAcceptedCookies.BRFP8YQO.js","./useConnectConfig.CKApLiWr.js","./index.CAUjMUXb.js","./registerServiceWorker.bovghwDf.js","./cookie-banner.C1g7edoI.js","./i18next.CqOP20KE.js","./useTranslation.BpVv6XIW.js","./modal.7v7DsqvJ.js","./Trans.C1fPcAun.js"])))=>i.map(i=>d[i]);
2
- import{createRoot as ie}from"react-dom/client";import{_ as K}from"./index.CP03D3n8.js";import{jsxs as H,jsx as A}from"react/jsx-runtime";import{useRef as se,createElement as ce,createContext as le,StrictMode as de,Suspense as J,lazy as $}from"react";import{A as ae}from"./app-skeleton.js";const R={},Q=(e,n)=>e.unstable_is?e.unstable_is(n):n===e,X=e=>"init"in e,B=e=>!!e.write,Y=e=>"v"in e||"e"in e,T=e=>{if("e"in e)throw e.e;if((R?"production":void 0)!=="production"&&!("v"in e))throw new Error("[Bug] atom state is not initialized");return e.v},V=new WeakMap,Z=e=>{var n;return x(e)&&!!((n=V.get(e))!=null&&n[0])},fe=e=>{const n=V.get(e);n!=null&&n[0]&&(n[0]=!1,n[1].forEach(o=>o()))},ue=(e,n)=>{let o=V.get(e);if(!o){o=[!0,new Set],V.set(e,o);const d=()=>{o[0]=!1};e.then(d,d)}o[1].add(n)},x=e=>typeof(e==null?void 0:e.then)=="function",ee=(e,n,o)=>{o.p.has(e)||(o.p.add(e),n.then(()=>{o.p.delete(e)},()=>{o.p.delete(e)}))},C=(e,n,o)=>{const d=o(e),p="v"in d,a=d.v;if(x(n))for(const u of d.d.keys())ee(e,n,o(u));d.v=n,delete d.e,(!p||!Object.is(a,d.v))&&(++d.n,x(a)&&fe(a))},k=(e,n,o)=>{var d;const p=new Set;for(const a of((d=o.get(e))==null?void 0:d.t)||[])o.has(a)&&p.add(a);for(const a of n.p)p.add(a);return p},ve=()=>{const e=new Set,n=()=>{e.forEach(o=>o())};return n.add=o=>(e.add(o),()=>{e.delete(o)}),n},G=()=>{const e={},n=new WeakMap,o=d=>{var p,a;(p=n.get(e))==null||p.forEach(u=>u(d)),(a=n.get(d))==null||a.forEach(u=>u())};return o.add=(d,p)=>{const a=d||e,u=(n.has(a)?n:n.set(a,new Set)).get(a);return u.add(p),()=>{u==null||u.delete(p),u.size||n.delete(a)}},o},pe=e=>(e.c||(e.c=G()),e.m||(e.m=G()),e.u||(e.u=G()),e.f||(e.f=ve()),e),_e=Symbol(),Se=(e=new WeakMap,n=new WeakMap,o=new WeakMap,d=new Set,p=new Set,a=new Set,u={},w=(f,...S)=>f.read(...S),E=(f,...S)=>f.write(...S),P=(f,S)=>{var y;return(y=f.unstable_onInit)==null?void 0:y.call(f,S)},b=(f,S)=>{var y;return(y=f.onMount)==null?void 0:y.call(f,S)},...g)=>{const f=g[0]||(t=>{if((R?"production":void 0)!=="production"&&!t)throw new Error("Atom is undefined or null");let l=e.get(t);return l||(l={d:new Map,p:new Set,n:0},e.set(t,l),P==null||P(t,U)),l}),S=g[1]||(()=>{const t=[],l=c=>{try{c()}catch(i){t.push(i)}};do{u.f&&l(u.f);const c=new Set,i=c.add.bind(c);d.forEach(r=>{var s;return(s=n.get(r))==null?void 0:s.l.forEach(i)}),d.clear(),a.forEach(i),a.clear(),p.forEach(i),p.clear(),c.forEach(l),d.size&&y()}while(d.size||a.size||p.size);if(t.length)throw new AggregateError(t)}),y=g[2]||(()=>{const t=[],l=new WeakSet,c=new WeakSet,i=Array.from(d);for(;i.length;){const r=i[i.length-1],s=f(r);if(c.has(r)){i.pop();continue}if(l.has(r)){if(o.get(r)===s.n)t.push([r,s]);else if((R?"production":void 0)!=="production"&&o.has(r))throw new Error("[Bug] invalidated atom exists");c.add(r),i.pop();continue}l.add(r);for(const _ of k(r,s,n))l.has(_)||i.push(_)}for(let r=t.length-1;r>=0;--r){const[s,_]=t[r];let h=!1;for(const z of _.d.keys())if(z!==s&&d.has(z)){h=!0;break}h&&(D(s),L(s)),o.delete(s)}}),D=g[3]||(t=>{var l;const c=f(t);if(Y(c)&&(n.has(t)&&o.get(t)!==c.n||Array.from(c.d).every(([v,O])=>D(v).n===O)))return c;c.d.clear();let i=!0;const r=()=>{n.has(t)&&(L(t),y(),S())},s=v=>{var O;if(Q(t,v)){const q=f(v);if(!Y(q))if(X(v))C(v,v.init,f);else throw new Error("no atom init");return T(q)}const m=D(v);try{return T(m)}finally{c.d.set(v,m.n),Z(c.v)&&ee(t,c.v,m),(O=n.get(v))==null||O.t.add(t),i||r()}};let _,h;const z={get signal(){return _||(_=new AbortController),_.signal},get setSelf(){return(R?"production":void 0)!=="production"&&!B(t)&&console.warn("setSelf function cannot be used with read-only atom"),!h&&B(t)&&(h=(...v)=>{if((R?"production":void 0)!=="production"&&i&&console.warn("setSelf function cannot be called in sync"),!i)try{return I(t,...v)}finally{y(),S()}}),h}},j=c.n;try{const v=w(t,s,z);return C(t,v,f),x(v)&&(ue(v,()=>_==null?void 0:_.abort()),v.then(r,r)),c}catch(v){return delete c.v,c.e=v,++c.n,c}finally{i=!1,j!==c.n&&o.get(t)===j&&(o.set(t,c.n),d.add(t),(l=u.c)==null||l.call(u,t))}}),N=g[4]||(t=>{const l=[t];for(;l.length;){const c=l.pop(),i=f(c);for(const r of k(c,i,n)){const s=f(r);o.set(r,s.n),l.push(r)}}}),I=g[5]||((t,...l)=>{let c=!0;const i=s=>T(D(s)),r=(s,..._)=>{var h;const z=f(s);try{if(Q(t,s)){if(!X(s))throw new Error("atom not writable");const j=z.n,v=_[0];C(s,v,f),L(s),j!==z.n&&(d.add(s),(h=u.c)==null||h.call(u,s),N(s));return}else return I(s,..._)}finally{c||(y(),S())}};try{return E(t,i,r,...l)}finally{c=!1}}),L=g[6]||(t=>{var l;const c=f(t),i=n.get(t);if(i&&!Z(c.v)){for(const[r,s]of c.d)if(!i.d.has(r)){const _=f(r);M(r).t.add(t),i.d.add(r),s!==_.n&&(d.add(r),(l=u.c)==null||l.call(u,r),N(r))}for(const r of i.d||[])if(!c.d.has(r)){i.d.delete(r);const s=W(r);s==null||s.t.delete(t)}}}),M=g[7]||(t=>{var l;const c=f(t);let i=n.get(t);if(!i){D(t);for(const r of c.d.keys())M(r).t.add(t);if(i={l:new Set,d:new Set(c.d.keys()),t:new Set},n.set(t,i),(l=u.m)==null||l.call(u,t),B(t)){const r=()=>{let s=!0;const _=(...h)=>{try{return I(t,...h)}finally{s||(y(),S())}};try{const h=b(t,_);h&&(i.u=()=>{s=!0;try{h()}finally{s=!1}})}finally{s=!1}};p.add(r)}}return i}),W=g[8]||(t=>{var l;const c=f(t);let i=n.get(t);if(i&&!i.l.size&&!Array.from(i.t).some(r=>{var s;return(s=n.get(r))==null?void 0:s.d.has(t)})){i.u&&a.add(i.u),i=void 0,n.delete(t),(l=u.u)==null||l.call(u,t);for(const r of c.d.keys()){const s=W(r);s==null||s.t.delete(t)}return}return i}),oe=[e,n,o,d,p,a,u,w,E,P,b,f,S,y,D,N,I,L,M,W],U={get:t=>T(D(t)),set:(t,...l)=>{try{return I(t,...l)}finally{y(),S()}},sub:(t,l)=>{const i=M(t).l;return i.add(l),S(),()=>{i.delete(l),W(t),S()}}};return Object.defineProperty(U,_e,{value:oe}),U},te=Se,he=pe,we={},ye=()=>{let e=0;const n=he({}),o=new WeakMap,d=new WeakMap,p=te(o,d,void 0,void 0,void 0,void 0,n,void 0,(w,E,P,...b)=>e?P(w,...b):w.write(E,P,...b)),a=new Set;return n.m.add(void 0,w=>{a.add(w);const E=o.get(w);E.m=d.get(w)}),n.u.add(void 0,w=>{a.delete(w);const E=o.get(w);delete E.m}),Object.assign(p,{dev4_get_internal_weak_map:()=>(console.log("Deprecated: Use devstore from the devtools library"),o),dev4_get_mounted_atoms:()=>a,dev4_restore_atoms:w=>{const E={read:()=>null,write:(P,b)=>{++e;try{for(const[g,f]of w)"init"in g&&b(g,f)}finally{--e}}};p.set(E)}})};function ne(){return(we?"production":void 0)!=="production"?ye():te()}const ge=le(void 0);function Ee({children:e,store:n}){const o=se(void 0);return!n&&!o.current&&(o.current=ne()),ce(ge.Provider,{value:n||o.current},e)}var Ae=()=>null;const F=ne();function Pe({children:e}){return H(Ee,{store:F,children:[A(Ae,{store:F}),e]})}const be=$(()=>K(()=>import("./app.VTqbl4SN.js").then(e=>e.j),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9]),import.meta.url)),De=$(()=>K(()=>import("./cookie-banner.C1g7edoI.js"),__vite__mapDeps([10,6,2,1,3,11,12,13,14]),import.meta.url).then(e=>({default:e.CookieBanner}))),ze=$(()=>K(()=>import("./modal.7v7DsqvJ.js"),__vite__mapDeps([13,1]),import.meta.url).then(e=>({default:e.ModalManager}))),Ie=A(de,{children:H(Pe,{children:[A(J,{fallback:A(ae,{}),name:"AppLoader",children:A(be,{})}),A(J,{name:"CookieBanner",children:A(ze,{children:A(De,{})})})]})});function Re(e){ie(e).render(Ie)}const re=document.getElementById("app");if(!re)throw new Error("#app element not found!");Re(re);const Te=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"}));export{F as a,Te as i};
3
- //# sourceMappingURL=index.LL4eJTNs.js.map
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./app.B-s2KBit.js","./index.CP03D3n8.js","./connect.config.vrIC-ElT.js","./browser.BkwNmV2Z.js","./useFeatureFlags.CJKNBSez.js","./user.Ca59JWI8.js","./useAcceptedCookies.Dw8zTATh.js","./useConnectConfig.I_FFm8lE.js","./index.CAUjMUXb.js","./registerServiceWorker.BhgDwFqE.js","./cookie-banner.DFU4VzF0.js","./i18next.CqOP20KE.js","./useTranslation.BpVv6XIW.js","./modal.9LGoAjVo.js","./Trans.C1fPcAun.js"])))=>i.map(i=>d[i]);
2
+ import{createRoot as ie}from"react-dom/client";import{_ as K}from"./index.CP03D3n8.js";import{jsxs as H,jsx as A}from"react/jsx-runtime";import{useRef as se,createElement as ce,createContext as le,StrictMode as de,Suspense as J,lazy as $}from"react";import{A as ae}from"./app-skeleton.js";const R={},Q=(e,n)=>e.unstable_is?e.unstable_is(n):n===e,X=e=>"init"in e,B=e=>!!e.write,Y=e=>"v"in e||"e"in e,T=e=>{if("e"in e)throw e.e;if((R?"production":void 0)!=="production"&&!("v"in e))throw new Error("[Bug] atom state is not initialized");return e.v},V=new WeakMap,Z=e=>{var n;return x(e)&&!!((n=V.get(e))!=null&&n[0])},fe=e=>{const n=V.get(e);n!=null&&n[0]&&(n[0]=!1,n[1].forEach(o=>o()))},ue=(e,n)=>{let o=V.get(e);if(!o){o=[!0,new Set],V.set(e,o);const d=()=>{o[0]=!1};e.then(d,d)}o[1].add(n)},x=e=>typeof(e==null?void 0:e.then)=="function",ee=(e,n,o)=>{o.p.has(e)||(o.p.add(e),n.then(()=>{o.p.delete(e)},()=>{o.p.delete(e)}))},C=(e,n,o)=>{const d=o(e),p="v"in d,a=d.v;if(x(n))for(const u of d.d.keys())ee(e,n,o(u));d.v=n,delete d.e,(!p||!Object.is(a,d.v))&&(++d.n,x(a)&&fe(a))},k=(e,n,o)=>{var d;const p=new Set;for(const a of((d=o.get(e))==null?void 0:d.t)||[])o.has(a)&&p.add(a);for(const a of n.p)p.add(a);return p},ve=()=>{const e=new Set,n=()=>{e.forEach(o=>o())};return n.add=o=>(e.add(o),()=>{e.delete(o)}),n},G=()=>{const e={},n=new WeakMap,o=d=>{var p,a;(p=n.get(e))==null||p.forEach(u=>u(d)),(a=n.get(d))==null||a.forEach(u=>u())};return o.add=(d,p)=>{const a=d||e,u=(n.has(a)?n:n.set(a,new Set)).get(a);return u.add(p),()=>{u==null||u.delete(p),u.size||n.delete(a)}},o},pe=e=>(e.c||(e.c=G()),e.m||(e.m=G()),e.u||(e.u=G()),e.f||(e.f=ve()),e),_e=Symbol(),Se=(e=new WeakMap,n=new WeakMap,o=new WeakMap,d=new Set,p=new Set,a=new Set,u={},w=(f,...S)=>f.read(...S),E=(f,...S)=>f.write(...S),P=(f,S)=>{var y;return(y=f.unstable_onInit)==null?void 0:y.call(f,S)},b=(f,S)=>{var y;return(y=f.onMount)==null?void 0:y.call(f,S)},...g)=>{const f=g[0]||(t=>{if((R?"production":void 0)!=="production"&&!t)throw new Error("Atom is undefined or null");let l=e.get(t);return l||(l={d:new Map,p:new Set,n:0},e.set(t,l),P==null||P(t,U)),l}),S=g[1]||(()=>{const t=[],l=c=>{try{c()}catch(i){t.push(i)}};do{u.f&&l(u.f);const c=new Set,i=c.add.bind(c);d.forEach(r=>{var s;return(s=n.get(r))==null?void 0:s.l.forEach(i)}),d.clear(),a.forEach(i),a.clear(),p.forEach(i),p.clear(),c.forEach(l),d.size&&y()}while(d.size||a.size||p.size);if(t.length)throw new AggregateError(t)}),y=g[2]||(()=>{const t=[],l=new WeakSet,c=new WeakSet,i=Array.from(d);for(;i.length;){const r=i[i.length-1],s=f(r);if(c.has(r)){i.pop();continue}if(l.has(r)){if(o.get(r)===s.n)t.push([r,s]);else if((R?"production":void 0)!=="production"&&o.has(r))throw new Error("[Bug] invalidated atom exists");c.add(r),i.pop();continue}l.add(r);for(const _ of k(r,s,n))l.has(_)||i.push(_)}for(let r=t.length-1;r>=0;--r){const[s,_]=t[r];let h=!1;for(const z of _.d.keys())if(z!==s&&d.has(z)){h=!0;break}h&&(D(s),L(s)),o.delete(s)}}),D=g[3]||(t=>{var l;const c=f(t);if(Y(c)&&(n.has(t)&&o.get(t)!==c.n||Array.from(c.d).every(([v,O])=>D(v).n===O)))return c;c.d.clear();let i=!0;const r=()=>{n.has(t)&&(L(t),y(),S())},s=v=>{var O;if(Q(t,v)){const q=f(v);if(!Y(q))if(X(v))C(v,v.init,f);else throw new Error("no atom init");return T(q)}const m=D(v);try{return T(m)}finally{c.d.set(v,m.n),Z(c.v)&&ee(t,c.v,m),(O=n.get(v))==null||O.t.add(t),i||r()}};let _,h;const z={get signal(){return _||(_=new AbortController),_.signal},get setSelf(){return(R?"production":void 0)!=="production"&&!B(t)&&console.warn("setSelf function cannot be used with read-only atom"),!h&&B(t)&&(h=(...v)=>{if((R?"production":void 0)!=="production"&&i&&console.warn("setSelf function cannot be called in sync"),!i)try{return I(t,...v)}finally{y(),S()}}),h}},j=c.n;try{const v=w(t,s,z);return C(t,v,f),x(v)&&(ue(v,()=>_==null?void 0:_.abort()),v.then(r,r)),c}catch(v){return delete c.v,c.e=v,++c.n,c}finally{i=!1,j!==c.n&&o.get(t)===j&&(o.set(t,c.n),d.add(t),(l=u.c)==null||l.call(u,t))}}),N=g[4]||(t=>{const l=[t];for(;l.length;){const c=l.pop(),i=f(c);for(const r of k(c,i,n)){const s=f(r);o.set(r,s.n),l.push(r)}}}),I=g[5]||((t,...l)=>{let c=!0;const i=s=>T(D(s)),r=(s,..._)=>{var h;const z=f(s);try{if(Q(t,s)){if(!X(s))throw new Error("atom not writable");const j=z.n,v=_[0];C(s,v,f),L(s),j!==z.n&&(d.add(s),(h=u.c)==null||h.call(u,s),N(s));return}else return I(s,..._)}finally{c||(y(),S())}};try{return E(t,i,r,...l)}finally{c=!1}}),L=g[6]||(t=>{var l;const c=f(t),i=n.get(t);if(i&&!Z(c.v)){for(const[r,s]of c.d)if(!i.d.has(r)){const _=f(r);M(r).t.add(t),i.d.add(r),s!==_.n&&(d.add(r),(l=u.c)==null||l.call(u,r),N(r))}for(const r of i.d||[])if(!c.d.has(r)){i.d.delete(r);const s=W(r);s==null||s.t.delete(t)}}}),M=g[7]||(t=>{var l;const c=f(t);let i=n.get(t);if(!i){D(t);for(const r of c.d.keys())M(r).t.add(t);if(i={l:new Set,d:new Set(c.d.keys()),t:new Set},n.set(t,i),(l=u.m)==null||l.call(u,t),B(t)){const r=()=>{let s=!0;const _=(...h)=>{try{return I(t,...h)}finally{s||(y(),S())}};try{const h=b(t,_);h&&(i.u=()=>{s=!0;try{h()}finally{s=!1}})}finally{s=!1}};p.add(r)}}return i}),W=g[8]||(t=>{var l;const c=f(t);let i=n.get(t);if(i&&!i.l.size&&!Array.from(i.t).some(r=>{var s;return(s=n.get(r))==null?void 0:s.d.has(t)})){i.u&&a.add(i.u),i=void 0,n.delete(t),(l=u.u)==null||l.call(u,t);for(const r of c.d.keys()){const s=W(r);s==null||s.t.delete(t)}return}return i}),oe=[e,n,o,d,p,a,u,w,E,P,b,f,S,y,D,N,I,L,M,W],U={get:t=>T(D(t)),set:(t,...l)=>{try{return I(t,...l)}finally{y(),S()}},sub:(t,l)=>{const i=M(t).l;return i.add(l),S(),()=>{i.delete(l),W(t),S()}}};return Object.defineProperty(U,_e,{value:oe}),U},te=Se,he=pe,we={},ye=()=>{let e=0;const n=he({}),o=new WeakMap,d=new WeakMap,p=te(o,d,void 0,void 0,void 0,void 0,n,void 0,(w,E,P,...b)=>e?P(w,...b):w.write(E,P,...b)),a=new Set;return n.m.add(void 0,w=>{a.add(w);const E=o.get(w);E.m=d.get(w)}),n.u.add(void 0,w=>{a.delete(w);const E=o.get(w);delete E.m}),Object.assign(p,{dev4_get_internal_weak_map:()=>(console.log("Deprecated: Use devstore from the devtools library"),o),dev4_get_mounted_atoms:()=>a,dev4_restore_atoms:w=>{const E={read:()=>null,write:(P,b)=>{++e;try{for(const[g,f]of w)"init"in g&&b(g,f)}finally{--e}}};p.set(E)}})};function ne(){return(we?"production":void 0)!=="production"?ye():te()}const ge=le(void 0);function Ee({children:e,store:n}){const o=se(void 0);return!n&&!o.current&&(o.current=ne()),ce(ge.Provider,{value:n||o.current},e)}var Ae=()=>null;const F=ne();function Pe({children:e}){return H(Ee,{store:F,children:[A(Ae,{store:F}),e]})}const be=$(()=>K(()=>import("./app.B-s2KBit.js").then(e=>e.j),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9]),import.meta.url)),De=$(()=>K(()=>import("./cookie-banner.DFU4VzF0.js"),__vite__mapDeps([10,6,2,1,3,11,12,13,14]),import.meta.url).then(e=>({default:e.CookieBanner}))),ze=$(()=>K(()=>import("./modal.9LGoAjVo.js"),__vite__mapDeps([13,1]),import.meta.url).then(e=>({default:e.ModalManager}))),Ie=A(de,{children:H(Pe,{children:[A(J,{fallback:A(ae,{}),name:"AppLoader",children:A(be,{})}),A(J,{name:"CookieBanner",children:A(ze,{children:A(De,{})})})]})});function Re(e){ie(e).render(Ie)}const re=document.getElementById("app");if(!re)throw new Error("#app element not found!");Re(re);const Te=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"}));export{F as a,Te as i};
3
+ //# sourceMappingURL=index.CYLzaQFn.js.map
@@ -1 +1 @@
1
- {"version":3,"mappings":";4SAAMA,EAAa,CAACC,EAAMC,IAAMD,EAAK,YAAcA,EAAK,YAAYC,CAAC,EAAIA,IAAMD,EACzEE,EAAmBF,GAAS,SAAUA,EACtCG,EAA0BH,GAAS,CAAC,CAACA,EAAK,MAC1CI,EAA0BC,GAAc,MAAOA,GAAa,MAAOA,EACnEC,EAAmBD,GAAc,CACrC,GAAI,MAAOA,EACT,MAAMA,EAAU,EAElB,IAAKE,EAAkB,aAAuB,UAAY,cAAgB,EAAE,MAAOF,GAC3E,UAAI,MAAM,qCAAqC,EAEvD,OAAOA,EAAU,CACnB,EACMG,MAAsC,QACtCC,EAAoBC,GAAU,CAC9B,IAAAC,EACJ,OAAOC,EAAcF,CAAK,GAAK,CAAC,GAAGC,EAAKH,EAAgB,IAAIE,CAAK,IAAM,MAAgBC,EAAG,CAAC,EAC7F,EACME,GAA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a","hasInitialValue","isActuallyWritableAtom","isAtomStateInitialized","atomState","returnAtomValue","__vite_import_meta_env__","promiseStateMap","isPendingPromise","value","_a","isPromiseLike","abortPromise","promise","promiseState","fn","registerAbortHandler","abortHandler","settle","p","addPendingPromiseToDependency","dependencyAtomState","setAtomStateValueOrPromise","valueOrPromise","ensureAtomState","hasPrevValue","prevValue","getMountedOrPendingDependents","mountedMap","dependents","atomWithPendingPromise","createStoreHook","callbacks","notify","createStoreHookForAtoms","all","_b","key","fns","initializeStoreHooks","storeHooks","BUILDING_BLOCKS","buildStore","atomStateMap","invalidatedAtoms","changedAtoms","mountCallbacks","unmountCallbacks","atomRead","params","atomWrite","atomOnInit","store","atomOnMount","setAtom","buildingBlockFunctions","flushCallbacks","errors","call","e","add","recomputeInvalidatedAtoms","topSortedReversed","visiting","visited","stack","aState","d","i","hasChangedDeps","dep","readAtomState","mountDependencies","n","isSync","mountDependenciesIfAsync","getter","_a2","aState2","controller","setSelf","options","args","writeAtomState","prevEpochNumber","error","invalidateDependents","dState","setter","args2","mounted","mountAtom","aMounted","unmountAtom","processOnMount","onUnmount","buildingBlocks","listener","listeners","INTERNAL_buildStoreRev1","INTERNAL_initializeStoreHooks","createDevStoreRev4","inRestoreAtom","mountedAtoms","get","set","debugMountedAtoms","values","restoreAtom","_get","createStore","StoreContext","createContext","Provider","children","storeRef","useRef","createElement","DevTools","atomStore","AtomStoreProvider","_jsxs","_jsx","App","lazy","__vitePreload","CookieBanner","m","ModalManager","AppLoader","jsx","StrictMode","jsxs","Suspense","AppSkeleton","renderApp","element","createRoot","AppElement"],"ignoreList":[0,1,2,3],"sources":["../../../../node_modules/.pnpm/jotai@2.12.5_@types+react@18.3.22_react@18.3.1/node_modules/jotai/esm/vanilla/internals.mjs","../../../../node_modules/.pnpm/jotai@2.12.5_@types+react@18.3.22_react@18.3.1/node_modules/jotai/esm/vanilla.mjs","../../../../node_modules/.pnpm/jotai@2.12.5_@types+react@18.3.22_react@18.3.1/node_modules/jotai/esm/react.mjs","../../../../node_modules/.pnpm/jotai-devtools@0.12.0_@types+react@18.3.22_react-dom@18.3.1_react@18.3.1__react@18.3.1__11a9993a008134554007bd080a0f1724/node_modules/jotai-devtools/dist/index.esm.mjs","../../../../packages/common/dist/state/store.js","../../../../packages/common/dist/state/store-provider.js","../../src/components/app-loader.tsx","../../src/index.ts"],"sourcesContent":["const isSelfAtom = (atom, a) => atom.unstable_is ? atom.unstable_is(a) : a === atom;\nconst hasInitialValue = (atom) => \"init\" in atom;\nconst isActuallyWritableAtom = (atom) => !!atom.write;\nconst isAtomStateInitialized = (atomState) => \"v\" in atomState || \"e\" in atomState;\nconst returnAtomValue = (atomState) => {\n if (\"e\" in atomState) {\n throw atomState.e;\n }\n if ((import.meta.env ? import.meta.env.MODE : void 0) !== \"production\" && !(\"v\" in atomState)) {\n throw new Error(\"[Bug] atom state is not initialized\");\n }\n return atomState.v;\n};\nconst promiseStateMap = /* @__PURE__ */ new WeakMap();\nconst isPendingPromise = (value) => {\n var _a;\n return isPromiseLike(value) && !!((_a = promiseStateMap.get(value)) == null ? void 0 : _a[0]);\n};\nconst abortPromise = (promise) => {\n const promiseState = promiseStateMap.get(promise);\n if (promiseState == null ? void 0 : promiseState[0]) {\n promiseState[0] = false;\n promiseState[1].forEach((fn) => fn());\n }\n};\nconst registerAbortHandler = (promise, abortHandler) => {\n let promiseState = promiseStateMap.get(promise);\n if (!promiseState) {\n promiseState = [true, /* @__PURE__ */ new Set()];\n promiseStateMap.set(promise, promiseState);\n const settle = () => {\n promiseState[0] = false;\n };\n promise.then(settle, settle);\n }\n promiseState[1].add(abortHandler);\n};\nconst isPromiseLike = (p) => typeof (p == null ? void 0 : p.then) === \"function\";\nconst addPendingPromiseToDependency = (atom, promise, dependencyAtomState) => {\n if (!dependencyAtomState.p.has(atom)) {\n dependencyAtomState.p.add(atom);\n promise.then(\n () => {\n dependencyAtomState.p.delete(atom);\n },\n () => {\n dependencyAtomState.p.delete(atom);\n }\n );\n }\n};\nconst setAtomStateValueOrPromise = (atom, valueOrPromise, ensureAtomState) => {\n const atomState = ensureAtomState(atom);\n const hasPrevValue = \"v\" in atomState;\n const prevValue = atomState.v;\n if (isPromiseLike(valueOrPromise)) {\n for (const a of atomState.d.keys()) {\n addPendingPromiseToDependency(atom, valueOrPromise, ensureAtomState(a));\n }\n }\n atomState.v = valueOrPromise;\n delete atomState.e;\n if (!hasPrevValue || !Object.is(prevValue, atomState.v)) {\n ++atomState.n;\n if (isPromiseLike(prevValue)) {\n abortPromise(prevValue);\n }\n }\n};\nconst getMountedOrPendingDependents = (atom, atomState, mountedMap) => {\n var _a;\n const dependents = /* @__PURE__ */ new Set();\n for (const a of ((_a = mountedMap.get(atom)) == null ? void 0 : _a.t) || []) {\n if (mountedMap.has(a)) {\n dependents.add(a);\n }\n }\n for (const atomWithPendingPromise of atomState.p) {\n dependents.add(atomWithPendingPromise);\n }\n return dependents;\n};\nconst createStoreHook = () => {\n const callbacks = /* @__PURE__ */ new Set();\n const notify = () => {\n callbacks.forEach((fn) => fn());\n };\n notify.add = (fn) => {\n callbacks.add(fn);\n return () => {\n callbacks.delete(fn);\n };\n };\n return notify;\n};\nconst createStoreHookForAtoms = () => {\n const all = {};\n const callbacks = /* @__PURE__ */ new WeakMap();\n const notify = (atom) => {\n var _a, _b;\n (_a = callbacks.get(all)) == null ? void 0 : _a.forEach((fn) => fn(atom));\n (_b = callbacks.get(atom)) == null ? void 0 : _b.forEach((fn) => fn());\n };\n notify.add = (atom, fn) => {\n const key = atom || all;\n const fns = (callbacks.has(key) ? callbacks : callbacks.set(key, /* @__PURE__ */ new Set())).get(key);\n fns.add(fn);\n return () => {\n fns == null ? void 0 : fns.delete(fn);\n if (!fns.size) {\n callbacks.delete(key);\n }\n };\n };\n return notify;\n};\nconst initializeStoreHooks = (storeHooks) => {\n storeHooks.c || (storeHooks.c = createStoreHookForAtoms());\n storeHooks.m || (storeHooks.m = createStoreHookForAtoms());\n storeHooks.u || (storeHooks.u = createStoreHookForAtoms());\n storeHooks.f || (storeHooks.f = createStoreHook());\n return storeHooks;\n};\nconst BUILDING_BLOCKS = Symbol();\nconst getBuildingBlocks = (store) => store[BUILDING_BLOCKS];\nconst buildStore = (atomStateMap = /* @__PURE__ */ new WeakMap(), mountedMap = /* @__PURE__ */ new WeakMap(), invalidatedAtoms = /* @__PURE__ */ new WeakMap(), changedAtoms = /* @__PURE__ */ new Set(), mountCallbacks = /* @__PURE__ */ new Set(), unmountCallbacks = /* @__PURE__ */ new Set(), storeHooks = {}, atomRead = (atom, ...params) => atom.read(...params), atomWrite = (atom, ...params) => atom.write(...params), atomOnInit = (atom, store) => {\n var _a;\n return (_a = atom.unstable_onInit) == null ? void 0 : _a.call(atom, store);\n}, atomOnMount = (atom, setAtom) => {\n var _a;\n return (_a = atom.onMount) == null ? void 0 : _a.call(atom, setAtom);\n}, ...buildingBlockFunctions) => {\n const ensureAtomState = buildingBlockFunctions[0] || ((atom) => {\n if ((import.meta.env ? import.meta.env.MODE : void 0) !== \"production\" && !atom) {\n throw new Error(\"Atom is undefined or null\");\n }\n let atomState = atomStateMap.get(atom);\n if (!atomState) {\n atomState = { d: /* @__PURE__ */ new Map(), p: /* @__PURE__ */ new Set(), n: 0 };\n atomStateMap.set(atom, atomState);\n atomOnInit == null ? void 0 : atomOnInit(atom, store);\n }\n return atomState;\n });\n const flushCallbacks = buildingBlockFunctions[1] || (() => {\n const errors = [];\n const call = (fn) => {\n try {\n fn();\n } catch (e) {\n errors.push(e);\n }\n };\n do {\n if (storeHooks.f) {\n call(storeHooks.f);\n }\n const callbacks = /* @__PURE__ */ new Set();\n const add = callbacks.add.bind(callbacks);\n changedAtoms.forEach((atom) => {\n var _a;\n return (_a = mountedMap.get(atom)) == null ? void 0 : _a.l.forEach(add);\n });\n changedAtoms.clear();\n unmountCallbacks.forEach(add);\n unmountCallbacks.clear();\n mountCallbacks.forEach(add);\n mountCallbacks.clear();\n callbacks.forEach(call);\n if (changedAtoms.size) {\n recomputeInvalidatedAtoms();\n }\n } while (changedAtoms.size || unmountCallbacks.size || mountCallbacks.size);\n if (errors.length) {\n throw new AggregateError(errors);\n }\n });\n const recomputeInvalidatedAtoms = buildingBlockFunctions[2] || (() => {\n const topSortedReversed = [];\n const visiting = /* @__PURE__ */ new WeakSet();\n const visited = /* @__PURE__ */ new WeakSet();\n const stack = Array.from(changedAtoms);\n while (stack.length) {\n const a = stack[stack.length - 1];\n const aState = ensureAtomState(a);\n if (visited.has(a)) {\n stack.pop();\n continue;\n }\n if (visiting.has(a)) {\n if (invalidatedAtoms.get(a) === aState.n) {\n topSortedReversed.push([a, aState]);\n } else if ((import.meta.env ? import.meta.env.MODE : void 0) !== \"production\" && invalidatedAtoms.has(a)) {\n throw new Error(\"[Bug] invalidated atom exists\");\n }\n visited.add(a);\n stack.pop();\n continue;\n }\n visiting.add(a);\n for (const d of getMountedOrPendingDependents(a, aState, mountedMap)) {\n if (!visiting.has(d)) {\n stack.push(d);\n }\n }\n }\n for (let i = topSortedReversed.length - 1; i >= 0; --i) {\n const [a, aState] = topSortedReversed[i];\n let hasChangedDeps = false;\n for (const dep of aState.d.keys()) {\n if (dep !== a && changedAtoms.has(dep)) {\n hasChangedDeps = true;\n break;\n }\n }\n if (hasChangedDeps) {\n readAtomState(a);\n mountDependencies(a);\n }\n invalidatedAtoms.delete(a);\n }\n });\n const readAtomState = buildingBlockFunctions[3] || ((atom) => {\n var _a;\n const atomState = ensureAtomState(atom);\n if (isAtomStateInitialized(atomState)) {\n if (mountedMap.has(atom) && invalidatedAtoms.get(atom) !== atomState.n) {\n return atomState;\n }\n if (Array.from(atomState.d).every(\n ([a, n]) => (\n // Recursively, read the atom state of the dependency, and\n // check if the atom epoch number is unchanged\n readAtomState(a).n === n\n )\n )) {\n return atomState;\n }\n }\n atomState.d.clear();\n let isSync = true;\n const mountDependenciesIfAsync = () => {\n if (mountedMap.has(atom)) {\n mountDependencies(atom);\n recomputeInvalidatedAtoms();\n flushCallbacks();\n }\n };\n const getter = (a) => {\n var _a2;\n if (isSelfAtom(atom, a)) {\n const aState2 = ensureAtomState(a);\n if (!isAtomStateInitialized(aState2)) {\n if (hasInitialValue(a)) {\n setAtomStateValueOrPromise(a, a.init, ensureAtomState);\n } else {\n throw new Error(\"no atom init\");\n }\n }\n return returnAtomValue(aState2);\n }\n const aState = readAtomState(a);\n try {\n return returnAtomValue(aState);\n } finally {\n atomState.d.set(a, aState.n);\n if (isPendingPromise(atomState.v)) {\n addPendingPromiseToDependency(atom, atomState.v, aState);\n }\n (_a2 = mountedMap.get(a)) == null ? void 0 : _a2.t.add(atom);\n if (!isSync) {\n mountDependenciesIfAsync();\n }\n }\n };\n let controller;\n let setSelf;\n const options = {\n get signal() {\n if (!controller) {\n controller = new AbortController();\n }\n return controller.signal;\n },\n get setSelf() {\n if ((import.meta.env ? import.meta.env.MODE : void 0) !== \"production\" && !isActuallyWritableAtom(atom)) {\n console.warn(\"setSelf function cannot be used with read-only atom\");\n }\n if (!setSelf && isActuallyWritableAtom(atom)) {\n setSelf = (...args) => {\n if ((import.meta.env ? import.meta.env.MODE : void 0) !== \"production\" && isSync) {\n console.warn(\"setSelf function cannot be called in sync\");\n }\n if (!isSync) {\n try {\n return writeAtomState(atom, ...args);\n } finally {\n recomputeInvalidatedAtoms();\n flushCallbacks();\n }\n }\n };\n }\n return setSelf;\n }\n };\n const prevEpochNumber = atomState.n;\n try {\n const valueOrPromise = atomRead(atom, getter, options);\n setAtomStateValueOrPromise(atom, valueOrPromise, ensureAtomState);\n if (isPromiseLike(valueOrPromise)) {\n registerAbortHandler(valueOrPromise, () => controller == null ? void 0 : controller.abort());\n valueOrPromise.then(\n mountDependenciesIfAsync,\n mountDependenciesIfAsync\n );\n }\n return atomState;\n } catch (error) {\n delete atomState.v;\n atomState.e = error;\n ++atomState.n;\n return atomState;\n } finally {\n isSync = false;\n if (prevEpochNumber !== atomState.n && invalidatedAtoms.get(atom) === prevEpochNumber) {\n invalidatedAtoms.set(atom, atomState.n);\n changedAtoms.add(atom);\n (_a = storeHooks.c) == null ? void 0 : _a.call(storeHooks, atom);\n }\n }\n });\n const invalidateDependents = buildingBlockFunctions[4] || ((atom) => {\n const stack = [atom];\n while (stack.length) {\n const a = stack.pop();\n const aState = ensureAtomState(a);\n for (const d of getMountedOrPendingDependents(a, aState, mountedMap)) {\n const dState = ensureAtomState(d);\n invalidatedAtoms.set(d, dState.n);\n stack.push(d);\n }\n }\n });\n const writeAtomState = buildingBlockFunctions[5] || ((atom, ...args) => {\n let isSync = true;\n const getter = (a) => returnAtomValue(readAtomState(a));\n const setter = (a, ...args2) => {\n var _a;\n const aState = ensureAtomState(a);\n try {\n if (isSelfAtom(atom, a)) {\n if (!hasInitialValue(a)) {\n throw new Error(\"atom not writable\");\n }\n const prevEpochNumber = aState.n;\n const v = args2[0];\n setAtomStateValueOrPromise(a, v, ensureAtomState);\n mountDependencies(a);\n if (prevEpochNumber !== aState.n) {\n changedAtoms.add(a);\n (_a = storeHooks.c) == null ? void 0 : _a.call(storeHooks, a);\n invalidateDependents(a);\n }\n return void 0;\n } else {\n return writeAtomState(a, ...args2);\n }\n } finally {\n if (!isSync) {\n recomputeInvalidatedAtoms();\n flushCallbacks();\n }\n }\n };\n try {\n return atomWrite(atom, getter, setter, ...args);\n } finally {\n isSync = false;\n }\n });\n const mountDependencies = buildingBlockFunctions[6] || ((atom) => {\n var _a;\n const atomState = ensureAtomState(atom);\n const mounted = mountedMap.get(atom);\n if (mounted && !isPendingPromise(atomState.v)) {\n for (const [a, n] of atomState.d) {\n if (!mounted.d.has(a)) {\n const aState = ensureAtomState(a);\n const aMounted = mountAtom(a);\n aMounted.t.add(atom);\n mounted.d.add(a);\n if (n !== aState.n) {\n changedAtoms.add(a);\n (_a = storeHooks.c) == null ? void 0 : _a.call(storeHooks, a);\n invalidateDependents(a);\n }\n }\n }\n for (const a of mounted.d || []) {\n if (!atomState.d.has(a)) {\n mounted.d.delete(a);\n const aMounted = unmountAtom(a);\n aMounted == null ? void 0 : aMounted.t.delete(atom);\n }\n }\n }\n });\n const mountAtom = buildingBlockFunctions[7] || ((atom) => {\n var _a;\n const atomState = ensureAtomState(atom);\n let mounted = mountedMap.get(atom);\n if (!mounted) {\n readAtomState(atom);\n for (const a of atomState.d.keys()) {\n const aMounted = mountAtom(a);\n aMounted.t.add(atom);\n }\n mounted = {\n l: /* @__PURE__ */ new Set(),\n d: new Set(atomState.d.keys()),\n t: /* @__PURE__ */ new Set()\n };\n mountedMap.set(atom, mounted);\n (_a = storeHooks.m) == null ? void 0 : _a.call(storeHooks, atom);\n if (isActuallyWritableAtom(atom)) {\n const processOnMount = () => {\n let isSync = true;\n const setAtom = (...args) => {\n try {\n return writeAtomState(atom, ...args);\n } finally {\n if (!isSync) {\n recomputeInvalidatedAtoms();\n flushCallbacks();\n }\n }\n };\n try {\n const onUnmount = atomOnMount(atom, setAtom);\n if (onUnmount) {\n mounted.u = () => {\n isSync = true;\n try {\n onUnmount();\n } finally {\n isSync = false;\n }\n };\n }\n } finally {\n isSync = false;\n }\n };\n mountCallbacks.add(processOnMount);\n }\n }\n return mounted;\n });\n const unmountAtom = buildingBlockFunctions[8] || ((atom) => {\n var _a;\n const atomState = ensureAtomState(atom);\n let mounted = mountedMap.get(atom);\n if (mounted && !mounted.l.size && !Array.from(mounted.t).some((a) => {\n var _a2;\n return (_a2 = mountedMap.get(a)) == null ? void 0 : _a2.d.has(atom);\n })) {\n if (mounted.u) {\n unmountCallbacks.add(mounted.u);\n }\n mounted = void 0;\n mountedMap.delete(atom);\n (_a = storeHooks.u) == null ? void 0 : _a.call(storeHooks, atom);\n for (const a of atomState.d.keys()) {\n const aMounted = unmountAtom(a);\n aMounted == null ? void 0 : aMounted.t.delete(atom);\n }\n return void 0;\n }\n return mounted;\n });\n const buildingBlocks = [\n // store state\n atomStateMap,\n mountedMap,\n invalidatedAtoms,\n changedAtoms,\n mountCallbacks,\n unmountCallbacks,\n storeHooks,\n // atom interceptors\n atomRead,\n atomWrite,\n atomOnInit,\n atomOnMount,\n // building-block functions\n ensureAtomState,\n flushCallbacks,\n recomputeInvalidatedAtoms,\n readAtomState,\n invalidateDependents,\n writeAtomState,\n mountDependencies,\n mountAtom,\n unmountAtom\n ];\n const store = {\n get: (atom) => returnAtomValue(readAtomState(atom)),\n set: (atom, ...args) => {\n try {\n return writeAtomState(atom, ...args);\n } finally {\n recomputeInvalidatedAtoms();\n flushCallbacks();\n }\n },\n sub: (atom, listener) => {\n const mounted = mountAtom(atom);\n const listeners = mounted.l;\n listeners.add(listener);\n flushCallbacks();\n return () => {\n listeners.delete(listener);\n unmountAtom(atom);\n flushCallbacks();\n };\n }\n };\n Object.defineProperty(store, BUILDING_BLOCKS, { value: buildingBlocks });\n return store;\n};\nconst INTERNAL_buildStoreRev1 = buildStore;\nconst INTERNAL_getBuildingBlocksRev1 = getBuildingBlocks;\nconst INTERNAL_initializeStoreHooks = initializeStoreHooks;\nconst INTERNAL_isSelfAtom = isSelfAtom;\nconst INTERNAL_hasInitialValue = hasInitialValue;\nconst INTERNAL_isActuallyWritableAtom = isActuallyWritableAtom;\nconst INTERNAL_isAtomStateInitialized = isAtomStateInitialized;\nconst INTERNAL_returnAtomValue = returnAtomValue;\nconst INTERNAL_promiseStateMap = promiseStateMap;\nconst INTERNAL_isPendingPromise = isPendingPromise;\nconst INTERNAL_abortPromise = abortPromise;\nconst INTERNAL_registerAbortHandler = registerAbortHandler;\nconst INTERNAL_isPromiseLike = isPromiseLike;\nconst INTERNAL_addPendingPromiseToDependency = addPendingPromiseToDependency;\nconst INTERNAL_setAtomStateValueOrPromise = setAtomStateValueOrPromise;\nconst INTERNAL_getMountedOrPendingDependents = getMountedOrPendingDependents;\n\nexport { INTERNAL_abortPromise, INTERNAL_addPendingPromiseToDependency, INTERNAL_buildStoreRev1, INTERNAL_getBuildingBlocksRev1, INTERNAL_getMountedOrPendingDependents, INTERNAL_hasInitialValue, INTERNAL_initializeStoreHooks, INTERNAL_isActuallyWritableAtom, INTERNAL_isAtomStateInitialized, INTERNAL_isPendingPromise, INTERNAL_isPromiseLike, INTERNAL_isSelfAtom, INTERNAL_promiseStateMap, INTERNAL_registerAbortHandler, INTERNAL_returnAtomValue, INTERNAL_setAtomStateValueOrPromise };\n","import { INTERNAL_buildStoreRev1, INTERNAL_initializeStoreHooks } from 'jotai/vanilla/internals';\n\nlet keyCount = 0;\nfunction atom(read, write) {\n const key = `atom${++keyCount}`;\n const config = {\n toString() {\n return (import.meta.env ? import.meta.env.MODE : void 0) !== \"production\" && this.debugLabel ? key + \":\" + this.debugLabel : key;\n }\n };\n if (typeof read === \"function\") {\n config.read = read;\n } else {\n config.init = read;\n config.read = defaultRead;\n config.write = defaultWrite;\n }\n if (write) {\n config.write = write;\n }\n return config;\n}\nfunction defaultRead(get) {\n return get(this);\n}\nfunction defaultWrite(get, set, arg) {\n return set(\n this,\n typeof arg === \"function\" ? arg(get(this)) : arg\n );\n}\n\nconst createDevStoreRev4 = () => {\n let inRestoreAtom = 0;\n const storeHooks = INTERNAL_initializeStoreHooks({});\n const atomStateMap = /* @__PURE__ */ new WeakMap();\n const mountedAtoms = /* @__PURE__ */ new WeakMap();\n const store = INTERNAL_buildStoreRev1(\n atomStateMap,\n mountedAtoms,\n void 0,\n void 0,\n void 0,\n void 0,\n storeHooks,\n void 0,\n (atom, get, set, ...args) => {\n if (inRestoreAtom) {\n return set(atom, ...args);\n }\n return atom.write(get, set, ...args);\n }\n );\n const debugMountedAtoms = /* @__PURE__ */ new Set();\n storeHooks.m.add(void 0, (atom) => {\n debugMountedAtoms.add(atom);\n const atomState = atomStateMap.get(atom);\n atomState.m = mountedAtoms.get(atom);\n });\n storeHooks.u.add(void 0, (atom) => {\n debugMountedAtoms.delete(atom);\n const atomState = atomStateMap.get(atom);\n delete atomState.m;\n });\n const devStore = {\n // store dev methods (these are tentative and subject to change without notice)\n dev4_get_internal_weak_map: () => {\n console.log(\"Deprecated: Use devstore from the devtools library\");\n return atomStateMap;\n },\n dev4_get_mounted_atoms: () => debugMountedAtoms,\n dev4_restore_atoms: (values) => {\n const restoreAtom = {\n read: () => null,\n write: (_get, set) => {\n ++inRestoreAtom;\n try {\n for (const [atom, value] of values) {\n if (\"init\" in atom) {\n set(atom, value);\n }\n }\n } finally {\n --inRestoreAtom;\n }\n }\n };\n store.set(restoreAtom);\n }\n };\n return Object.assign(store, devStore);\n};\nlet overiddenCreateStore;\nfunction INTERNAL_overrideCreateStore(fn) {\n overiddenCreateStore = fn(overiddenCreateStore);\n}\nfunction createStore() {\n if (overiddenCreateStore) {\n return overiddenCreateStore();\n }\n if ((import.meta.env ? import.meta.env.MODE : void 0) !== \"production\") {\n return createDevStoreRev4();\n }\n return INTERNAL_buildStoreRev1();\n}\nlet defaultStore;\nfunction getDefaultStore() {\n if (!defaultStore) {\n defaultStore = createStore();\n if ((import.meta.env ? import.meta.env.MODE : void 0) !== \"production\") {\n globalThis.__JOTAI_DEFAULT_STORE__ || (globalThis.__JOTAI_DEFAULT_STORE__ = defaultStore);\n if (globalThis.__JOTAI_DEFAULT_STORE__ !== defaultStore) {\n console.warn(\n \"Detected multiple Jotai instances. It may cause unexpected behavior with the default store. https://github.com/pmndrs/jotai/discussions/2044\"\n );\n }\n }\n }\n return defaultStore;\n}\n\nexport { INTERNAL_overrideCreateStore, atom, createStore, getDefaultStore };\n","'use client';\nimport React, { createContext, useContext, useRef, createElement, useReducer, useEffect, useDebugValue, useCallback } from 'react';\nimport { getDefaultStore, createStore } from 'jotai/vanilla';\nimport { INTERNAL_registerAbortHandler } from 'jotai/vanilla/internals';\n\nconst StoreContext = createContext(\n void 0\n);\nfunction useStore(options) {\n const store = useContext(StoreContext);\n return (options == null ? void 0 : options.store) || store || getDefaultStore();\n}\nfunction Provider({\n children,\n store\n}) {\n const storeRef = useRef(void 0);\n if (!store && !storeRef.current) {\n storeRef.current = createStore();\n }\n return createElement(\n StoreContext.Provider,\n {\n value: store || storeRef.current\n },\n children\n );\n}\n\nconst isPromiseLike = (x) => typeof (x == null ? void 0 : x.then) === \"function\";\nconst attachPromiseStatus = (promise) => {\n if (!promise.status) {\n promise.status = \"pending\";\n promise.then(\n (v) => {\n promise.status = \"fulfilled\";\n promise.value = v;\n },\n (e) => {\n promise.status = \"rejected\";\n promise.reason = e;\n }\n );\n }\n};\nconst use = React.use || // A shim for older React versions\n((promise) => {\n if (promise.status === \"pending\") {\n throw promise;\n } else if (promise.status === \"fulfilled\") {\n return promise.value;\n } else if (promise.status === \"rejected\") {\n throw promise.reason;\n } else {\n attachPromiseStatus(promise);\n throw promise;\n }\n});\nconst continuablePromiseMap = /* @__PURE__ */ new WeakMap();\nconst createContinuablePromise = (promise, getValue) => {\n let continuablePromise = continuablePromiseMap.get(promise);\n if (!continuablePromise) {\n continuablePromise = new Promise((resolve, reject) => {\n let curr = promise;\n const onFulfilled = (me) => (v) => {\n if (curr === me) {\n resolve(v);\n }\n };\n const onRejected = (me) => (e) => {\n if (curr === me) {\n reject(e);\n }\n };\n const onAbort = () => {\n try {\n const nextValue = getValue();\n if (isPromiseLike(nextValue)) {\n continuablePromiseMap.set(nextValue, continuablePromise);\n curr = nextValue;\n nextValue.then(onFulfilled(nextValue), onRejected(nextValue));\n INTERNAL_registerAbortHandler(nextValue, onAbort);\n } else {\n resolve(nextValue);\n }\n } catch (e) {\n reject(e);\n }\n };\n promise.then(onFulfilled(promise), onRejected(promise));\n INTERNAL_registerAbortHandler(promise, onAbort);\n });\n continuablePromiseMap.set(promise, continuablePromise);\n }\n return continuablePromise;\n};\nfunction useAtomValue(atom, options) {\n const { delay, unstable_promiseStatus: promiseStatus = !React.use } = options || {};\n const store = useStore(options);\n const [[valueFromReducer, storeFromReducer, atomFromReducer], rerender] = useReducer(\n (prev) => {\n const nextValue = store.get(atom);\n if (Object.is(prev[0], nextValue) && prev[1] === store && prev[2] === atom) {\n return prev;\n }\n return [nextValue, store, atom];\n },\n void 0,\n () => [store.get(atom), store, atom]\n );\n let value = valueFromReducer;\n if (storeFromReducer !== store || atomFromReducer !== atom) {\n rerender();\n value = store.get(atom);\n }\n useEffect(() => {\n const unsub = store.sub(atom, () => {\n if (promiseStatus) {\n try {\n const value2 = store.get(atom);\n if (isPromiseLike(value2)) {\n attachPromiseStatus(\n createContinuablePromise(value2, () => store.get(atom))\n );\n }\n } catch (e) {\n }\n }\n if (typeof delay === \"number\") {\n setTimeout(rerender, delay);\n return;\n }\n rerender();\n });\n rerender();\n return unsub;\n }, [store, atom, delay, promiseStatus]);\n useDebugValue(value);\n if (isPromiseLike(value)) {\n const promise = createContinuablePromise(value, () => store.get(atom));\n if (promiseStatus) {\n attachPromiseStatus(promise);\n }\n return use(promise);\n }\n return value;\n}\n\nfunction useSetAtom(atom, options) {\n const store = useStore(options);\n const setAtom = useCallback(\n (...args) => {\n if ((import.meta.env ? import.meta.env.MODE : void 0) !== \"production\" && !(\"write\" in atom)) {\n throw new Error(\"not writable atom\");\n }\n return store.set(atom, ...args);\n },\n [store, atom]\n );\n return setAtom;\n}\n\nfunction useAtom(atom, options) {\n return [\n useAtomValue(atom, options),\n // We do wrong type assertion here, which results in throwing an error.\n useSetAtom(atom, options)\n ];\n}\n\nexport { Provider, useAtom, useAtomValue, useSetAtom, useStore };\n","import {\n InternalDevTools\n} from \"./chunk-HLGSGNDX.esm.mjs\";\nimport {\n useAtomDevtools,\n useAtomsDebugValue,\n useAtomsDevtools,\n useAtomsSnapshot,\n useGotoAtomsSnapshot\n} from \"./chunk-K3M223F4.esm.mjs\";\n\n// src/index.ts\nvar DevTools = process.env.NODE_ENV !== \"production\" ? InternalDevTools : () => null;\nexport {\n DevTools,\n useAtomDevtools,\n useAtomsDebugValue,\n useAtomsDevtools,\n useAtomsSnapshot,\n useGotoAtomsSnapshot\n};\n","import { createStore } from \"jotai\";\n/** The atom store for the app.\n *\n * All derived hooks should use this store.\n */\nexport const atomStore = createStore();\n//# sourceMappingURL=store.js.map","import { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nimport { Provider } from \"jotai\";\nimport { DevTools } from \"jotai-devtools\";\nimport \"jotai-devtools/styles.css\";\nimport { atomStore } from \"./store.js\";\n/** Provides the atom store to the app.\n *\n * This is the top-level provider for the atom store.\n *\n * It is used to provide the atom store to the app.\n *\n * It should only be used once in the app and must appear before any `<Suspense>` boundaries.\n *\n * Includes the Jotai DevTools for debugging.\n */\nexport function AtomStoreProvider({ children }) {\n return (_jsxs(Provider, { store: atomStore, children: [_jsx(DevTools, { store: atomStore }), children] }));\n}\n//# sourceMappingURL=store-provider.js.map","import { lazy, StrictMode, Suspense } from 'react';\nimport '../i18n';\n\nimport { AtomStoreProvider } from '@powerhousedao/common';\nimport { AppSkeleton } from './app-skeleton.js';\n\nconst App = lazy(() => import('./app.js'));\nconst CookieBanner = lazy(() =>\n import('./cookie-banner.js').then(m => ({ default: m.CookieBanner })),\n);\n\nconst ModalManager = lazy(() =>\n import('./modal/modal.js').then(m => ({ default: m.ModalManager })),\n);\n\nexport const AppLoader = (\n <StrictMode>\n <AtomStoreProvider>\n <Suspense fallback={<AppSkeleton />} name=\"AppLoader\">\n <App />\n </Suspense>\n <Suspense name=\"CookieBanner\">\n <ModalManager>\n <CookieBanner />\n </ModalManager>\n </Suspense>\n </AtomStoreProvider>\n </StrictMode>\n);\n","import { createRoot } from 'react-dom/client';\nimport { AppLoader } from './components/app-loader.js';\n\nfunction renderApp(element: HTMLElement) {\n createRoot(element).render(AppLoader);\n}\n\nconst AppElement = document.getElementById('app');\nif (!AppElement) {\n throw new Error('#app element not found!');\n}\n\nrenderApp(AppElement);\n"],"file":"assets/index.LL4eJTNs.js"}
1
+ {"version":3,"mappings":";4SAAMA,EAAa,CAACC,EAAMC,IAAMD,EAAK,YAAcA,EAAK,YAAYC,CAAC,EAAIA,IAAMD,EACzEE,EAAmBF,GAAS,SAAUA,EACtCG,EAA0BH,GAAS,CAAC,CAACA,EAAK,MAC1CI,EAA0BC,GAAc,MAAOA,GAAa,MAAOA,EACnEC,EAAmBD,GAAc,CACrC,GAAI,MAAOA,EACT,MAAMA,EAAU,EAElB,IAAKE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KAAK,eACX,WAACL,GACG,UAAAE,EAACJ,GAAa,GAClB,EACJ,IACJ,CACJ,GCxBJ,SAASS,GAAUC,EAAsB,CAC1BC,GAAAD,CAAO,EAAE,OAAOP,EAAS,CACxC,CAEA,MAAMS,GAAa,SAAS,eAAe,KAAK,EAChD,GAAI,CAACA,GACK,UAAI,MAAM,yBAAyB,EAG7CH,GAAUG,EAAU","names":["isSelfAtom","atom","a","hasInitialValue","isActuallyWritableAtom","isAtomStateInitialized","atomState","returnAtomValue","__vite_import_meta_env__","promiseStateMap","isPendingPromise","value","_a","isPromiseLike","abortPromise","promise","promiseState","fn","registerAbortHandler","abortHandler","settle","p","addPendingPromiseToDependency","dependencyAtomState","setAtomStateValueOrPromise","valueOrPromise","ensureAtomState","hasPrevValue","prevValue","getMountedOrPendingDependents","mountedMap","dependents","atomWithPendingPromise","createStoreHook","callbacks","notify","createStoreHookForAtoms","all","_b","key","fns","initializeStoreHooks","storeHooks","BUILDING_BLOCKS","buildStore","atomStateMap","invalidatedAtoms","changedAtoms","mountCallbacks","unmountCallbacks","atomRead","params","atomWrite","atomOnInit","store","atomOnMount","setAtom","buildingBlockFunctions","flushCallbacks","errors","call","e","add","recomputeInvalidatedAtoms","topSortedReversed","visiting","visited","stack","aState","d","i","hasChangedDeps","dep","readAtomState","mountDependencies","n","isSync","mountDependenciesIfAsync","getter","_a2","aState2","controller","setSelf","options","args","writeAtomState","prevEpochNumber","error","invalidateDependents","dState","setter","args2","mounted","mountAtom","aMounted","unmountAtom","processOnMount","onUnmount","buildingBlocks","listener","listeners","INTERNAL_buildStoreRev1","INTERNAL_initializeStoreHooks","createDevStoreRev4","inRestoreAtom","mountedAtoms","get","set","debugMountedAtoms","values","restoreAtom","_get","createStore","StoreContext","createContext","Provider","children","storeRef","useRef","createElement","DevTools","atomStore","AtomStoreProvider","_jsxs","_jsx","App","lazy","__vitePreload","CookieBanner","m","ModalManager","AppLoader","jsx","StrictMode","jsxs","Suspense","AppSkeleton","renderApp","element","createRoot","AppElement"],"ignoreList":[0,1,2,3],"sources":["../../../../node_modules/.pnpm/jotai@2.12.5_@types+react@18.3.22_react@18.3.1/node_modules/jotai/esm/vanilla/internals.mjs","../../../../node_modules/.pnpm/jotai@2.12.5_@types+react@18.3.22_react@18.3.1/node_modules/jotai/esm/vanilla.mjs","../../../../node_modules/.pnpm/jotai@2.12.5_@types+react@18.3.22_react@18.3.1/node_modules/jotai/esm/react.mjs","../../../../node_modules/.pnpm/jotai-devtools@0.12.0_@types+react@18.3.22_react-dom@18.3.1_react@18.3.1__react@18.3.1__11a9993a008134554007bd080a0f1724/node_modules/jotai-devtools/dist/index.esm.mjs","../../../../packages/common/dist/state/store.js","../../../../packages/common/dist/state/store-provider.js","../../src/components/app-loader.tsx","../../src/index.ts"],"sourcesContent":["const isSelfAtom = (atom, a) => atom.unstable_is ? atom.unstable_is(a) : a === atom;\nconst hasInitialValue = (atom) => \"init\" in atom;\nconst isActuallyWritableAtom = (atom) => !!atom.write;\nconst isAtomStateInitialized = (atomState) => \"v\" in atomState || \"e\" in atomState;\nconst returnAtomValue = (atomState) => {\n if (\"e\" in atomState) {\n throw atomState.e;\n }\n if ((import.meta.env ? import.meta.env.MODE : void 0) !== \"production\" && !(\"v\" in atomState)) {\n throw new Error(\"[Bug] atom state is not initialized\");\n }\n return atomState.v;\n};\nconst promiseStateMap = /* @__PURE__ */ new WeakMap();\nconst isPendingPromise = (value) => {\n var _a;\n return isPromiseLike(value) && !!((_a = promiseStateMap.get(value)) == null ? void 0 : _a[0]);\n};\nconst abortPromise = (promise) => {\n const promiseState = promiseStateMap.get(promise);\n if (promiseState == null ? void 0 : promiseState[0]) {\n promiseState[0] = false;\n promiseState[1].forEach((fn) => fn());\n }\n};\nconst registerAbortHandler = (promise, abortHandler) => {\n let promiseState = promiseStateMap.get(promise);\n if (!promiseState) {\n promiseState = [true, /* @__PURE__ */ new Set()];\n promiseStateMap.set(promise, promiseState);\n const settle = () => {\n promiseState[0] = false;\n };\n promise.then(settle, settle);\n }\n promiseState[1].add(abortHandler);\n};\nconst isPromiseLike = (p) => typeof (p == null ? void 0 : p.then) === \"function\";\nconst addPendingPromiseToDependency = (atom, promise, dependencyAtomState) => {\n if (!dependencyAtomState.p.has(atom)) {\n dependencyAtomState.p.add(atom);\n promise.then(\n () => {\n dependencyAtomState.p.delete(atom);\n },\n () => {\n dependencyAtomState.p.delete(atom);\n }\n );\n }\n};\nconst setAtomStateValueOrPromise = (atom, valueOrPromise, ensureAtomState) => {\n const atomState = ensureAtomState(atom);\n const hasPrevValue = \"v\" in atomState;\n const prevValue = atomState.v;\n if (isPromiseLike(valueOrPromise)) {\n for (const a of atomState.d.keys()) {\n addPendingPromiseToDependency(atom, valueOrPromise, ensureAtomState(a));\n }\n }\n atomState.v = valueOrPromise;\n delete atomState.e;\n if (!hasPrevValue || !Object.is(prevValue, atomState.v)) {\n ++atomState.n;\n if (isPromiseLike(prevValue)) {\n abortPromise(prevValue);\n }\n }\n};\nconst getMountedOrPendingDependents = (atom, atomState, mountedMap) => {\n var _a;\n const dependents = /* @__PURE__ */ new Set();\n for (const a of ((_a = mountedMap.get(atom)) == null ? void 0 : _a.t) || []) {\n if (mountedMap.has(a)) {\n dependents.add(a);\n }\n }\n for (const atomWithPendingPromise of atomState.p) {\n dependents.add(atomWithPendingPromise);\n }\n return dependents;\n};\nconst createStoreHook = () => {\n const callbacks = /* @__PURE__ */ new Set();\n const notify = () => {\n callbacks.forEach((fn) => fn());\n };\n notify.add = (fn) => {\n callbacks.add(fn);\n return () => {\n callbacks.delete(fn);\n };\n };\n return notify;\n};\nconst createStoreHookForAtoms = () => {\n const all = {};\n const callbacks = /* @__PURE__ */ new WeakMap();\n const notify = (atom) => {\n var _a, _b;\n (_a = callbacks.get(all)) == null ? void 0 : _a.forEach((fn) => fn(atom));\n (_b = callbacks.get(atom)) == null ? void 0 : _b.forEach((fn) => fn());\n };\n notify.add = (atom, fn) => {\n const key = atom || all;\n const fns = (callbacks.has(key) ? callbacks : callbacks.set(key, /* @__PURE__ */ new Set())).get(key);\n fns.add(fn);\n return () => {\n fns == null ? void 0 : fns.delete(fn);\n if (!fns.size) {\n callbacks.delete(key);\n }\n };\n };\n return notify;\n};\nconst initializeStoreHooks = (storeHooks) => {\n storeHooks.c || (storeHooks.c = createStoreHookForAtoms());\n storeHooks.m || (storeHooks.m = createStoreHookForAtoms());\n storeHooks.u || (storeHooks.u = createStoreHookForAtoms());\n storeHooks.f || (storeHooks.f = createStoreHook());\n return storeHooks;\n};\nconst BUILDING_BLOCKS = Symbol();\nconst getBuildingBlocks = (store) => store[BUILDING_BLOCKS];\nconst buildStore = (atomStateMap = /* @__PURE__ */ new WeakMap(), mountedMap = /* @__PURE__ */ new WeakMap(), invalidatedAtoms = /* @__PURE__ */ new WeakMap(), changedAtoms = /* @__PURE__ */ new Set(), mountCallbacks = /* @__PURE__ */ new Set(), unmountCallbacks = /* @__PURE__ */ new Set(), storeHooks = {}, atomRead = (atom, ...params) => atom.read(...params), atomWrite = (atom, ...params) => atom.write(...params), atomOnInit = (atom, store) => {\n var _a;\n return (_a = atom.unstable_onInit) == null ? void 0 : _a.call(atom, store);\n}, atomOnMount = (atom, setAtom) => {\n var _a;\n return (_a = atom.onMount) == null ? void 0 : _a.call(atom, setAtom);\n}, ...buildingBlockFunctions) => {\n const ensureAtomState = buildingBlockFunctions[0] || ((atom) => {\n if ((import.meta.env ? import.meta.env.MODE : void 0) !== \"production\" && !atom) {\n throw new Error(\"Atom is undefined or null\");\n }\n let atomState = atomStateMap.get(atom);\n if (!atomState) {\n atomState = { d: /* @__PURE__ */ new Map(), p: /* @__PURE__ */ new Set(), n: 0 };\n atomStateMap.set(atom, atomState);\n atomOnInit == null ? void 0 : atomOnInit(atom, store);\n }\n return atomState;\n });\n const flushCallbacks = buildingBlockFunctions[1] || (() => {\n const errors = [];\n const call = (fn) => {\n try {\n fn();\n } catch (e) {\n errors.push(e);\n }\n };\n do {\n if (storeHooks.f) {\n call(storeHooks.f);\n }\n const callbacks = /* @__PURE__ */ new Set();\n const add = callbacks.add.bind(callbacks);\n changedAtoms.forEach((atom) => {\n var _a;\n return (_a = mountedMap.get(atom)) == null ? void 0 : _a.l.forEach(add);\n });\n changedAtoms.clear();\n unmountCallbacks.forEach(add);\n unmountCallbacks.clear();\n mountCallbacks.forEach(add);\n mountCallbacks.clear();\n callbacks.forEach(call);\n if (changedAtoms.size) {\n recomputeInvalidatedAtoms();\n }\n } while (changedAtoms.size || unmountCallbacks.size || mountCallbacks.size);\n if (errors.length) {\n throw new AggregateError(errors);\n }\n });\n const recomputeInvalidatedAtoms = buildingBlockFunctions[2] || (() => {\n const topSortedReversed = [];\n const visiting = /* @__PURE__ */ new WeakSet();\n const visited = /* @__PURE__ */ new WeakSet();\n const stack = Array.from(changedAtoms);\n while (stack.length) {\n const a = stack[stack.length - 1];\n const aState = ensureAtomState(a);\n if (visited.has(a)) {\n stack.pop();\n continue;\n }\n if (visiting.has(a)) {\n if (invalidatedAtoms.get(a) === aState.n) {\n topSortedReversed.push([a, aState]);\n } else if ((import.meta.env ? import.meta.env.MODE : void 0) !== \"production\" && invalidatedAtoms.has(a)) {\n throw new Error(\"[Bug] invalidated atom exists\");\n }\n visited.add(a);\n stack.pop();\n continue;\n }\n visiting.add(a);\n for (const d of getMountedOrPendingDependents(a, aState, mountedMap)) {\n if (!visiting.has(d)) {\n stack.push(d);\n }\n }\n }\n for (let i = topSortedReversed.length - 1; i >= 0; --i) {\n const [a, aState] = topSortedReversed[i];\n let hasChangedDeps = false;\n for (const dep of aState.d.keys()) {\n if (dep !== a && changedAtoms.has(dep)) {\n hasChangedDeps = true;\n break;\n }\n }\n if (hasChangedDeps) {\n readAtomState(a);\n mountDependencies(a);\n }\n invalidatedAtoms.delete(a);\n }\n });\n const readAtomState = buildingBlockFunctions[3] || ((atom) => {\n var _a;\n const atomState = ensureAtomState(atom);\n if (isAtomStateInitialized(atomState)) {\n if (mountedMap.has(atom) && invalidatedAtoms.get(atom) !== atomState.n) {\n return atomState;\n }\n if (Array.from(atomState.d).every(\n ([a, n]) => (\n // Recursively, read the atom state of the dependency, and\n // check if the atom epoch number is unchanged\n readAtomState(a).n === n\n )\n )) {\n return atomState;\n }\n }\n atomState.d.clear();\n let isSync = true;\n const mountDependenciesIfAsync = () => {\n if (mountedMap.has(atom)) {\n mountDependencies(atom);\n recomputeInvalidatedAtoms();\n flushCallbacks();\n }\n };\n const getter = (a) => {\n var _a2;\n if (isSelfAtom(atom, a)) {\n const aState2 = ensureAtomState(a);\n if (!isAtomStateInitialized(aState2)) {\n if (hasInitialValue(a)) {\n setAtomStateValueOrPromise(a, a.init, ensureAtomState);\n } else {\n throw new Error(\"no atom init\");\n }\n }\n return returnAtomValue(aState2);\n }\n const aState = readAtomState(a);\n try {\n return returnAtomValue(aState);\n } finally {\n atomState.d.set(a, aState.n);\n if (isPendingPromise(atomState.v)) {\n addPendingPromiseToDependency(atom, atomState.v, aState);\n }\n (_a2 = mountedMap.get(a)) == null ? void 0 : _a2.t.add(atom);\n if (!isSync) {\n mountDependenciesIfAsync();\n }\n }\n };\n let controller;\n let setSelf;\n const options = {\n get signal() {\n if (!controller) {\n controller = new AbortController();\n }\n return controller.signal;\n },\n get setSelf() {\n if ((import.meta.env ? import.meta.env.MODE : void 0) !== \"production\" && !isActuallyWritableAtom(atom)) {\n console.warn(\"setSelf function cannot be used with read-only atom\");\n }\n if (!setSelf && isActuallyWritableAtom(atom)) {\n setSelf = (...args) => {\n if ((import.meta.env ? import.meta.env.MODE : void 0) !== \"production\" && isSync) {\n console.warn(\"setSelf function cannot be called in sync\");\n }\n if (!isSync) {\n try {\n return writeAtomState(atom, ...args);\n } finally {\n recomputeInvalidatedAtoms();\n flushCallbacks();\n }\n }\n };\n }\n return setSelf;\n }\n };\n const prevEpochNumber = atomState.n;\n try {\n const valueOrPromise = atomRead(atom, getter, options);\n setAtomStateValueOrPromise(atom, valueOrPromise, ensureAtomState);\n if (isPromiseLike(valueOrPromise)) {\n registerAbortHandler(valueOrPromise, () => controller == null ? void 0 : controller.abort());\n valueOrPromise.then(\n mountDependenciesIfAsync,\n mountDependenciesIfAsync\n );\n }\n return atomState;\n } catch (error) {\n delete atomState.v;\n atomState.e = error;\n ++atomState.n;\n return atomState;\n } finally {\n isSync = false;\n if (prevEpochNumber !== atomState.n && invalidatedAtoms.get(atom) === prevEpochNumber) {\n invalidatedAtoms.set(atom, atomState.n);\n changedAtoms.add(atom);\n (_a = storeHooks.c) == null ? void 0 : _a.call(storeHooks, atom);\n }\n }\n });\n const invalidateDependents = buildingBlockFunctions[4] || ((atom) => {\n const stack = [atom];\n while (stack.length) {\n const a = stack.pop();\n const aState = ensureAtomState(a);\n for (const d of getMountedOrPendingDependents(a, aState, mountedMap)) {\n const dState = ensureAtomState(d);\n invalidatedAtoms.set(d, dState.n);\n stack.push(d);\n }\n }\n });\n const writeAtomState = buildingBlockFunctions[5] || ((atom, ...args) => {\n let isSync = true;\n const getter = (a) => returnAtomValue(readAtomState(a));\n const setter = (a, ...args2) => {\n var _a;\n const aState = ensureAtomState(a);\n try {\n if (isSelfAtom(atom, a)) {\n if (!hasInitialValue(a)) {\n throw new Error(\"atom not writable\");\n }\n const prevEpochNumber = aState.n;\n const v = args2[0];\n setAtomStateValueOrPromise(a, v, ensureAtomState);\n mountDependencies(a);\n if (prevEpochNumber !== aState.n) {\n changedAtoms.add(a);\n (_a = storeHooks.c) == null ? void 0 : _a.call(storeHooks, a);\n invalidateDependents(a);\n }\n return void 0;\n } else {\n return writeAtomState(a, ...args2);\n }\n } finally {\n if (!isSync) {\n recomputeInvalidatedAtoms();\n flushCallbacks();\n }\n }\n };\n try {\n return atomWrite(atom, getter, setter, ...args);\n } finally {\n isSync = false;\n }\n });\n const mountDependencies = buildingBlockFunctions[6] || ((atom) => {\n var _a;\n const atomState = ensureAtomState(atom);\n const mounted = mountedMap.get(atom);\n if (mounted && !isPendingPromise(atomState.v)) {\n for (const [a, n] of atomState.d) {\n if (!mounted.d.has(a)) {\n const aState = ensureAtomState(a);\n const aMounted = mountAtom(a);\n aMounted.t.add(atom);\n mounted.d.add(a);\n if (n !== aState.n) {\n changedAtoms.add(a);\n (_a = storeHooks.c) == null ? void 0 : _a.call(storeHooks, a);\n invalidateDependents(a);\n }\n }\n }\n for (const a of mounted.d || []) {\n if (!atomState.d.has(a)) {\n mounted.d.delete(a);\n const aMounted = unmountAtom(a);\n aMounted == null ? void 0 : aMounted.t.delete(atom);\n }\n }\n }\n });\n const mountAtom = buildingBlockFunctions[7] || ((atom) => {\n var _a;\n const atomState = ensureAtomState(atom);\n let mounted = mountedMap.get(atom);\n if (!mounted) {\n readAtomState(atom);\n for (const a of atomState.d.keys()) {\n const aMounted = mountAtom(a);\n aMounted.t.add(atom);\n }\n mounted = {\n l: /* @__PURE__ */ new Set(),\n d: new Set(atomState.d.keys()),\n t: /* @__PURE__ */ new Set()\n };\n mountedMap.set(atom, mounted);\n (_a = storeHooks.m) == null ? void 0 : _a.call(storeHooks, atom);\n if (isActuallyWritableAtom(atom)) {\n const processOnMount = () => {\n let isSync = true;\n const setAtom = (...args) => {\n try {\n return writeAtomState(atom, ...args);\n } finally {\n if (!isSync) {\n recomputeInvalidatedAtoms();\n flushCallbacks();\n }\n }\n };\n try {\n const onUnmount = atomOnMount(atom, setAtom);\n if (onUnmount) {\n mounted.u = () => {\n isSync = true;\n try {\n onUnmount();\n } finally {\n isSync = false;\n }\n };\n }\n } finally {\n isSync = false;\n }\n };\n mountCallbacks.add(processOnMount);\n }\n }\n return mounted;\n });\n const unmountAtom = buildingBlockFunctions[8] || ((atom) => {\n var _a;\n const atomState = ensureAtomState(atom);\n let mounted = mountedMap.get(atom);\n if (mounted && !mounted.l.size && !Array.from(mounted.t).some((a) => {\n var _a2;\n return (_a2 = mountedMap.get(a)) == null ? void 0 : _a2.d.has(atom);\n })) {\n if (mounted.u) {\n unmountCallbacks.add(mounted.u);\n }\n mounted = void 0;\n mountedMap.delete(atom);\n (_a = storeHooks.u) == null ? void 0 : _a.call(storeHooks, atom);\n for (const a of atomState.d.keys()) {\n const aMounted = unmountAtom(a);\n aMounted == null ? void 0 : aMounted.t.delete(atom);\n }\n return void 0;\n }\n return mounted;\n });\n const buildingBlocks = [\n // store state\n atomStateMap,\n mountedMap,\n invalidatedAtoms,\n changedAtoms,\n mountCallbacks,\n unmountCallbacks,\n storeHooks,\n // atom interceptors\n atomRead,\n atomWrite,\n atomOnInit,\n atomOnMount,\n // building-block functions\n ensureAtomState,\n flushCallbacks,\n recomputeInvalidatedAtoms,\n readAtomState,\n invalidateDependents,\n writeAtomState,\n mountDependencies,\n mountAtom,\n unmountAtom\n ];\n const store = {\n get: (atom) => returnAtomValue(readAtomState(atom)),\n set: (atom, ...args) => {\n try {\n return writeAtomState(atom, ...args);\n } finally {\n recomputeInvalidatedAtoms();\n flushCallbacks();\n }\n },\n sub: (atom, listener) => {\n const mounted = mountAtom(atom);\n const listeners = mounted.l;\n listeners.add(listener);\n flushCallbacks();\n return () => {\n listeners.delete(listener);\n unmountAtom(atom);\n flushCallbacks();\n };\n }\n };\n Object.defineProperty(store, BUILDING_BLOCKS, { value: buildingBlocks });\n return store;\n};\nconst INTERNAL_buildStoreRev1 = buildStore;\nconst INTERNAL_getBuildingBlocksRev1 = getBuildingBlocks;\nconst INTERNAL_initializeStoreHooks = initializeStoreHooks;\nconst INTERNAL_isSelfAtom = isSelfAtom;\nconst INTERNAL_hasInitialValue = hasInitialValue;\nconst INTERNAL_isActuallyWritableAtom = isActuallyWritableAtom;\nconst INTERNAL_isAtomStateInitialized = isAtomStateInitialized;\nconst INTERNAL_returnAtomValue = returnAtomValue;\nconst INTERNAL_promiseStateMap = promiseStateMap;\nconst INTERNAL_isPendingPromise = isPendingPromise;\nconst INTERNAL_abortPromise = abortPromise;\nconst INTERNAL_registerAbortHandler = registerAbortHandler;\nconst INTERNAL_isPromiseLike = isPromiseLike;\nconst INTERNAL_addPendingPromiseToDependency = addPendingPromiseToDependency;\nconst INTERNAL_setAtomStateValueOrPromise = setAtomStateValueOrPromise;\nconst INTERNAL_getMountedOrPendingDependents = getMountedOrPendingDependents;\n\nexport { INTERNAL_abortPromise, INTERNAL_addPendingPromiseToDependency, INTERNAL_buildStoreRev1, INTERNAL_getBuildingBlocksRev1, INTERNAL_getMountedOrPendingDependents, INTERNAL_hasInitialValue, INTERNAL_initializeStoreHooks, INTERNAL_isActuallyWritableAtom, INTERNAL_isAtomStateInitialized, INTERNAL_isPendingPromise, INTERNAL_isPromiseLike, INTERNAL_isSelfAtom, INTERNAL_promiseStateMap, INTERNAL_registerAbortHandler, INTERNAL_returnAtomValue, INTERNAL_setAtomStateValueOrPromise };\n","import { INTERNAL_buildStoreRev1, INTERNAL_initializeStoreHooks } from 'jotai/vanilla/internals';\n\nlet keyCount = 0;\nfunction atom(read, write) {\n const key = `atom${++keyCount}`;\n const config = {\n toString() {\n return (import.meta.env ? import.meta.env.MODE : void 0) !== \"production\" && this.debugLabel ? key + \":\" + this.debugLabel : key;\n }\n };\n if (typeof read === \"function\") {\n config.read = read;\n } else {\n config.init = read;\n config.read = defaultRead;\n config.write = defaultWrite;\n }\n if (write) {\n config.write = write;\n }\n return config;\n}\nfunction defaultRead(get) {\n return get(this);\n}\nfunction defaultWrite(get, set, arg) {\n return set(\n this,\n typeof arg === \"function\" ? arg(get(this)) : arg\n );\n}\n\nconst createDevStoreRev4 = () => {\n let inRestoreAtom = 0;\n const storeHooks = INTERNAL_initializeStoreHooks({});\n const atomStateMap = /* @__PURE__ */ new WeakMap();\n const mountedAtoms = /* @__PURE__ */ new WeakMap();\n const store = INTERNAL_buildStoreRev1(\n atomStateMap,\n mountedAtoms,\n void 0,\n void 0,\n void 0,\n void 0,\n storeHooks,\n void 0,\n (atom, get, set, ...args) => {\n if (inRestoreAtom) {\n return set(atom, ...args);\n }\n return atom.write(get, set, ...args);\n }\n );\n const debugMountedAtoms = /* @__PURE__ */ new Set();\n storeHooks.m.add(void 0, (atom) => {\n debugMountedAtoms.add(atom);\n const atomState = atomStateMap.get(atom);\n atomState.m = mountedAtoms.get(atom);\n });\n storeHooks.u.add(void 0, (atom) => {\n debugMountedAtoms.delete(atom);\n const atomState = atomStateMap.get(atom);\n delete atomState.m;\n });\n const devStore = {\n // store dev methods (these are tentative and subject to change without notice)\n dev4_get_internal_weak_map: () => {\n console.log(\"Deprecated: Use devstore from the devtools library\");\n return atomStateMap;\n },\n dev4_get_mounted_atoms: () => debugMountedAtoms,\n dev4_restore_atoms: (values) => {\n const restoreAtom = {\n read: () => null,\n write: (_get, set) => {\n ++inRestoreAtom;\n try {\n for (const [atom, value] of values) {\n if (\"init\" in atom) {\n set(atom, value);\n }\n }\n } finally {\n --inRestoreAtom;\n }\n }\n };\n store.set(restoreAtom);\n }\n };\n return Object.assign(store, devStore);\n};\nlet overiddenCreateStore;\nfunction INTERNAL_overrideCreateStore(fn) {\n overiddenCreateStore = fn(overiddenCreateStore);\n}\nfunction createStore() {\n if (overiddenCreateStore) {\n return overiddenCreateStore();\n }\n if ((import.meta.env ? import.meta.env.MODE : void 0) !== \"production\") {\n return createDevStoreRev4();\n }\n return INTERNAL_buildStoreRev1();\n}\nlet defaultStore;\nfunction getDefaultStore() {\n if (!defaultStore) {\n defaultStore = createStore();\n if ((import.meta.env ? import.meta.env.MODE : void 0) !== \"production\") {\n globalThis.__JOTAI_DEFAULT_STORE__ || (globalThis.__JOTAI_DEFAULT_STORE__ = defaultStore);\n if (globalThis.__JOTAI_DEFAULT_STORE__ !== defaultStore) {\n console.warn(\n \"Detected multiple Jotai instances. It may cause unexpected behavior with the default store. https://github.com/pmndrs/jotai/discussions/2044\"\n );\n }\n }\n }\n return defaultStore;\n}\n\nexport { INTERNAL_overrideCreateStore, atom, createStore, getDefaultStore };\n","'use client';\nimport React, { createContext, useContext, useRef, createElement, useReducer, useEffect, useDebugValue, useCallback } from 'react';\nimport { getDefaultStore, createStore } from 'jotai/vanilla';\nimport { INTERNAL_registerAbortHandler } from 'jotai/vanilla/internals';\n\nconst StoreContext = createContext(\n void 0\n);\nfunction useStore(options) {\n const store = useContext(StoreContext);\n return (options == null ? void 0 : options.store) || store || getDefaultStore();\n}\nfunction Provider({\n children,\n store\n}) {\n const storeRef = useRef(void 0);\n if (!store && !storeRef.current) {\n storeRef.current = createStore();\n }\n return createElement(\n StoreContext.Provider,\n {\n value: store || storeRef.current\n },\n children\n );\n}\n\nconst isPromiseLike = (x) => typeof (x == null ? void 0 : x.then) === \"function\";\nconst attachPromiseStatus = (promise) => {\n if (!promise.status) {\n promise.status = \"pending\";\n promise.then(\n (v) => {\n promise.status = \"fulfilled\";\n promise.value = v;\n },\n (e) => {\n promise.status = \"rejected\";\n promise.reason = e;\n }\n );\n }\n};\nconst use = React.use || // A shim for older React versions\n((promise) => {\n if (promise.status === \"pending\") {\n throw promise;\n } else if (promise.status === \"fulfilled\") {\n return promise.value;\n } else if (promise.status === \"rejected\") {\n throw promise.reason;\n } else {\n attachPromiseStatus(promise);\n throw promise;\n }\n});\nconst continuablePromiseMap = /* @__PURE__ */ new WeakMap();\nconst createContinuablePromise = (promise, getValue) => {\n let continuablePromise = continuablePromiseMap.get(promise);\n if (!continuablePromise) {\n continuablePromise = new Promise((resolve, reject) => {\n let curr = promise;\n const onFulfilled = (me) => (v) => {\n if (curr === me) {\n resolve(v);\n }\n };\n const onRejected = (me) => (e) => {\n if (curr === me) {\n reject(e);\n }\n };\n const onAbort = () => {\n try {\n const nextValue = getValue();\n if (isPromiseLike(nextValue)) {\n continuablePromiseMap.set(nextValue, continuablePromise);\n curr = nextValue;\n nextValue.then(onFulfilled(nextValue), onRejected(nextValue));\n INTERNAL_registerAbortHandler(nextValue, onAbort);\n } else {\n resolve(nextValue);\n }\n } catch (e) {\n reject(e);\n }\n };\n promise.then(onFulfilled(promise), onRejected(promise));\n INTERNAL_registerAbortHandler(promise, onAbort);\n });\n continuablePromiseMap.set(promise, continuablePromise);\n }\n return continuablePromise;\n};\nfunction useAtomValue(atom, options) {\n const { delay, unstable_promiseStatus: promiseStatus = !React.use } = options || {};\n const store = useStore(options);\n const [[valueFromReducer, storeFromReducer, atomFromReducer], rerender] = useReducer(\n (prev) => {\n const nextValue = store.get(atom);\n if (Object.is(prev[0], nextValue) && prev[1] === store && prev[2] === atom) {\n return prev;\n }\n return [nextValue, store, atom];\n },\n void 0,\n () => [store.get(atom), store, atom]\n );\n let value = valueFromReducer;\n if (storeFromReducer !== store || atomFromReducer !== atom) {\n rerender();\n value = store.get(atom);\n }\n useEffect(() => {\n const unsub = store.sub(atom, () => {\n if (promiseStatus) {\n try {\n const value2 = store.get(atom);\n if (isPromiseLike(value2)) {\n attachPromiseStatus(\n createContinuablePromise(value2, () => store.get(atom))\n );\n }\n } catch (e) {\n }\n }\n if (typeof delay === \"number\") {\n setTimeout(rerender, delay);\n return;\n }\n rerender();\n });\n rerender();\n return unsub;\n }, [store, atom, delay, promiseStatus]);\n useDebugValue(value);\n if (isPromiseLike(value)) {\n const promise = createContinuablePromise(value, () => store.get(atom));\n if (promiseStatus) {\n attachPromiseStatus(promise);\n }\n return use(promise);\n }\n return value;\n}\n\nfunction useSetAtom(atom, options) {\n const store = useStore(options);\n const setAtom = useCallback(\n (...args) => {\n if ((import.meta.env ? import.meta.env.MODE : void 0) !== \"production\" && !(\"write\" in atom)) {\n throw new Error(\"not writable atom\");\n }\n return store.set(atom, ...args);\n },\n [store, atom]\n );\n return setAtom;\n}\n\nfunction useAtom(atom, options) {\n return [\n useAtomValue(atom, options),\n // We do wrong type assertion here, which results in throwing an error.\n useSetAtom(atom, options)\n ];\n}\n\nexport { Provider, useAtom, useAtomValue, useSetAtom, useStore };\n","import {\n InternalDevTools\n} from \"./chunk-HLGSGNDX.esm.mjs\";\nimport {\n useAtomDevtools,\n useAtomsDebugValue,\n useAtomsDevtools,\n useAtomsSnapshot,\n useGotoAtomsSnapshot\n} from \"./chunk-K3M223F4.esm.mjs\";\n\n// src/index.ts\nvar DevTools = process.env.NODE_ENV !== \"production\" ? InternalDevTools : () => null;\nexport {\n DevTools,\n useAtomDevtools,\n useAtomsDebugValue,\n useAtomsDevtools,\n useAtomsSnapshot,\n useGotoAtomsSnapshot\n};\n","import { createStore } from \"jotai\";\n/** The atom store for the app.\n *\n * All derived hooks should use this store.\n */\nexport const atomStore = createStore();\n//# sourceMappingURL=store.js.map","import { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nimport { Provider } from \"jotai\";\nimport { DevTools } from \"jotai-devtools\";\nimport \"jotai-devtools/styles.css\";\nimport { atomStore } from \"./store.js\";\n/** Provides the atom store to the app.\n *\n * This is the top-level provider for the atom store.\n *\n * It is used to provide the atom store to the app.\n *\n * It should only be used once in the app and must appear before any `<Suspense>` boundaries.\n *\n * Includes the Jotai DevTools for debugging.\n */\nexport function AtomStoreProvider({ children }) {\n return (_jsxs(Provider, { store: atomStore, children: [_jsx(DevTools, { store: atomStore }), children] }));\n}\n//# sourceMappingURL=store-provider.js.map","import { lazy, StrictMode, Suspense } from 'react';\nimport '../i18n';\n\nimport { AtomStoreProvider } from '@powerhousedao/common';\nimport { AppSkeleton } from './app-skeleton.js';\n\nconst App = lazy(() => import('./app.js'));\nconst CookieBanner = lazy(() =>\n import('./cookie-banner.js').then(m => ({ default: m.CookieBanner })),\n);\n\nconst ModalManager = lazy(() =>\n import('./modal/modal.js').then(m => ({ default: m.ModalManager })),\n);\n\nexport const AppLoader = (\n <StrictMode>\n <AtomStoreProvider>\n <Suspense fallback={<AppSkeleton />} name=\"AppLoader\">\n <App />\n </Suspense>\n <Suspense name=\"CookieBanner\">\n <ModalManager>\n <CookieBanner />\n </ModalManager>\n </Suspense>\n </AtomStoreProvider>\n </StrictMode>\n);\n","import { createRoot } from 'react-dom/client';\nimport { AppLoader } from './components/app-loader.js';\n\nfunction renderApp(element: HTMLElement) {\n createRoot(element).render(AppLoader);\n}\n\nconst AppElement = document.getElementById('app');\nif (!AppElement) {\n throw new Error('#app element not found!');\n}\n\nrenderApp(AppElement);\n"],"file":"assets/index.CYLzaQFn.js"}
@@ -1,4 +1,4 @@
1
- var dr=Object.defineProperty;var Xe=t=>{throw TypeError(t)};var fr=(t,e,r)=>e in t?dr(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r;var v=(t,e,r)=>fr(t,typeof e!="symbol"?e+"":e,r),xe=(t,e,r)=>e.has(t)||Xe("Cannot "+r);var D=(t,e,r)=>(xe(t,e,"read from private field"),r?r.call(t):e.get(t)),$=(t,e,r)=>e.has(t)?Xe("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,r),F=(t,e,r,n)=>(xe(t,e,"write to private field"),n?n.call(t,r):e.set(t,r),r),P=(t,e,r)=>(xe(t,e,"access private method"),r);import{ak as fe,g as jt,_ as lr,e as Dr}from"./index.CP03D3n8.js";import{k as ws,j as ks,r as ms,s as Es}from"./user.Dq07wtiY.js";import{B as vs,R as Ss,g as As,a as _s,i as $s,p as Os}from"./index.BkVjnlyo.js";import{k as js,j as Ts,R as Ns}from"./useFeatureFlags.DGb_90uZ.js";import"react";import"react/jsx-runtime";import"react-dom";import"./connect.config.BKrPqpZJ.js";import"./browser.BkwNmV2Z.js";import"./index.LL4eJTNs.js";import"react-dom/client";import"./app-skeleton.js";var pe,Qe;function hr(){if(Qe)return pe;Qe=1;function t(e,r){for(let n=0;n<e.byteLength;n++){if(e[n]<r[n])return-1;if(e[n]>r[n])return 1}return e.byteLength>r.byteLength?1:e.byteLength<r.byteLength?-1:0}return pe=t,pe}var ye,Ye;function xr(){if(Ye)return ye;Ye=1;function t(e,r){r||(r=e.reduce((i,s)=>i+s.length,0));const n=new Uint8Array(r);let o=0;for(const i of e)n.set(i,o),o+=i.length;return n}return ye=t,ye}var ge,Ze;function pr(){if(Ze)return ge;Ze=1;function t(e,r){if(e===r)return!0;if(e.byteLength!==r.byteLength)return!1;for(let n=0;n<e.byteLength;n++)if(e[n]!==r[n])return!1;return!0}return ge=t,ge}function yr(t,e){if(t.length>=255)throw new TypeError("Alphabet too long");for(var r=new Uint8Array(256),n=0;n<r.length;n++)r[n]=255;for(var o=0;o<t.length;o++){var i=t.charAt(o),s=i.charCodeAt(0);if(r[s]!==255)throw new TypeError(i+" is ambiguous");r[s]=o}var a=t.length,c=t.charAt(0),d=Math.log(a)/Math.log(256),x=Math.log(256)/Math.log(a);function g(b){if(b instanceof Uint8Array||(ArrayBuffer.isView(b)?b=new Uint8Array(b.buffer,b.byteOffset,b.byteLength):Array.isArray(b)&&(b=Uint8Array.from(b))),!(b instanceof Uint8Array))throw new TypeError("Expected Uint8Array");if(b.length===0)return"";for(var f=0,C=0,y=0,w=b.length;y!==w&&b[y]===0;)y++,f++;for(var k=(w-y)*x+1>>>0,p=new Uint8Array(k);y!==w;){for(var u=b[y],h=0,l=k-1;(u!==0||h<C)&&l!==-1;l--,h++)u+=256*p[l]>>>0,p[l]=u%a>>>0,u=u/a>>>0;if(u!==0)throw new Error("Non-zero carry");C=h,y++}for(var m=k-C;m!==k&&p[m]===0;)m++;for(var z=c.repeat(f);m<k;++m)z+=t.charAt(p[m]);return z}function N(b){if(typeof b!="string")throw new TypeError("Expected String");if(b.length===0)return new Uint8Array;var f=0;if(b[f]!==" "){for(var C=0,y=0;b[f]===c;)C++,f++;for(var w=(b.length-f)*d+1>>>0,k=new Uint8Array(w);b[f];){var p=r[b.charCodeAt(f)];if(p===255)return;for(var u=0,h=w-1;(p!==0||u<y)&&h!==-1;h--,u++)p+=a*k[h]>>>0,k[h]=p%256>>>0,p=p/256>>>0;if(p!==0)throw new Error("Non-zero carry");y=u,f++}if(b[f]!==" "){for(var l=w-y;l!==w&&k[l]===0;)l++;for(var m=new Uint8Array(C+(w-l)),z=C;l!==w;)m[z++]=k[l++];return m}}}function V(b){var f=N(b);if(f)return f;throw new Error(`Non-${e} character`)}return{encode:g,decodeUnsafe:N,decode:V}}var gr=yr,wr=gr;const Tt=new Uint8Array(0),kr=t=>t.reduce((e,r)=>e+r.toString(16).padStart(2,"0"),""),mr=t=>{const e=t.match(/../g);return e?new Uint8Array(e.map(r=>parseInt(r,16))):Tt},Nt=(t,e)=>{if(t===e)return!0;if(t.byteLength!==e.byteLength)return!1;for(let r=0;r<t.byteLength;r++)if(t[r]!==e[r])return!1;return!0},K=t=>{if(t instanceof Uint8Array&&t.constructor.name==="Uint8Array")return t;if(t instanceof ArrayBuffer)return new Uint8Array(t);if(ArrayBuffer.isView(t))return new Uint8Array(t.buffer,t.byteOffset,t.byteLength);throw new Error("Unknown type, must be binary type")},Er=t=>t instanceof ArrayBuffer||ArrayBuffer.isView(t),Ut=t=>new TextEncoder().encode(t),Mt=t=>new TextDecoder().decode(t),Cr=Object.freeze(Object.defineProperty({__proto__:null,coerce:K,empty:Tt,equals:Nt,fromHex:mr,fromString:Ut,isBinary:Er,toHex:kr,toString:Mt},Symbol.toStringTag,{value:"Module"}));let vr=class{constructor(e,r,n){this.name=e,this.prefix=r,this.baseEncode=n}encode(e){if(e instanceof Uint8Array)return`${this.prefix}${this.baseEncode(e)}`;throw Error("Unknown type, must be binary type")}},Sr=class{constructor(e,r,n){if(this.name=e,this.prefix=r,r.codePointAt(0)===void 0)throw new Error("Invalid prefix character");this.prefixCodePoint=r.codePointAt(0),this.baseDecode=n}decode(e){if(typeof e=="string"){if(e.codePointAt(0)!==this.prefixCodePoint)throw Error(`Unable to decode multibase string ${JSON.stringify(e)}, ${this.name} decoder only supports inputs prefixed with ${this.prefix}`);return this.baseDecode(e.slice(this.prefix.length))}else throw Error("Can only multibase decode strings")}or(e){return zt(this,e)}},Ar=class{constructor(e){this.decoders=e}or(e){return zt(this,e)}decode(e){const r=e[0],n=this.decoders[r];if(n)return n.decode(e);throw RangeError(`Unable to decode multibase string ${JSON.stringify(e)}, only inputs prefixed with ${Object.keys(this.decoders)} are supported`)}};const zt=(t,e)=>new Ar({...t.decoders||{[t.prefix]:t},...e.decoders||{[e.prefix]:e}});let _r=class{constructor(e,r,n,o){this.name=e,this.prefix=r,this.baseEncode=n,this.baseDecode=o,this.encoder=new vr(e,r,n),this.decoder=new Sr(e,r,o)}encode(e){return this.encoder.encode(e)}decode(e){return this.decoder.decode(e)}};const le=({name:t,prefix:e,encode:r,decode:n})=>new _r(t,e,r,n),re=({prefix:t,name:e,alphabet:r})=>{const{encode:n,decode:o}=wr(r,e);return le({prefix:t,name:e,encode:n,decode:i=>K(o(i))})},$r=(t,e,r,n)=>{const o={};for(let x=0;x<e.length;++x)o[e[x]]=x;let i=t.length;for(;t[i-1]==="=";)--i;const s=new Uint8Array(i*r/8|0);let a=0,c=0,d=0;for(let x=0;x<i;++x){const g=o[t[x]];if(g===void 0)throw new SyntaxError(`Non-${n} character`);c=c<<r|g,a+=r,a>=8&&(a-=8,s[d++]=255&c>>a)}if(a>=r||255&c<<8-a)throw new SyntaxError("Unexpected end of data");return s},Or=(t,e,r)=>{const n=e[e.length-1]==="=",o=(1<<r)-1;let i="",s=0,a=0;for(let c=0;c<t.length;++c)for(a=a<<8|t[c],s+=8;s>r;)s-=r,i+=e[o&a>>s];if(s&&(i+=e[o&a<<r-s]),n)for(;i.length*r&7;)i+="=";return i},S=({name:t,prefix:e,bitsPerChar:r,alphabet:n})=>le({prefix:e,name:t,encode(o){return Or(o,n,r)},decode(o){return $r(o,n,r,t)}}),Pr=le({prefix:"\0",name:"identity",encode:t=>Mt(t),decode:t=>Ut(t)}),jr=Object.freeze(Object.defineProperty({__proto__:null,identity:Pr},Symbol.toStringTag,{value:"Module"})),Tr=S({prefix:"0",name:"base2",alphabet:"01",bitsPerChar:1}),Nr=Object.freeze(Object.defineProperty({__proto__:null,base2:Tr},Symbol.toStringTag,{value:"Module"})),Ur=S({prefix:"7",name:"base8",alphabet:"01234567",bitsPerChar:3}),Mr=Object.freeze(Object.defineProperty({__proto__:null,base8:Ur},Symbol.toStringTag,{value:"Module"})),zr=re({prefix:"9",name:"base10",alphabet:"0123456789"}),Fr=Object.freeze(Object.defineProperty({__proto__:null,base10:zr},Symbol.toStringTag,{value:"Module"})),Br=S({prefix:"f",name:"base16",alphabet:"0123456789abcdef",bitsPerChar:4}),Rr=S({prefix:"F",name:"base16upper",alphabet:"0123456789ABCDEF",bitsPerChar:4}),qr=Object.freeze(Object.defineProperty({__proto__:null,base16:Br,base16upper:Rr},Symbol.toStringTag,{value:"Module"})),G=S({prefix:"b",name:"base32",alphabet:"abcdefghijklmnopqrstuvwxyz234567",bitsPerChar:5}),Ir=S({prefix:"B",name:"base32upper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567",bitsPerChar:5}),Kr=S({prefix:"c",name:"base32pad",alphabet:"abcdefghijklmnopqrstuvwxyz234567=",bitsPerChar:5}),Vr=S({prefix:"C",name:"base32padupper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567=",bitsPerChar:5}),Lr=S({prefix:"v",name:"base32hex",alphabet:"0123456789abcdefghijklmnopqrstuv",bitsPerChar:5}),Jr=S({prefix:"V",name:"base32hexupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV",bitsPerChar:5}),Wr=S({prefix:"t",name:"base32hexpad",alphabet:"0123456789abcdefghijklmnopqrstuv=",bitsPerChar:5}),Hr=S({prefix:"T",name:"base32hexpadupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV=",bitsPerChar:5}),Gr=S({prefix:"h",name:"base32z",alphabet:"ybndrfg8ejkmcpqxot1uwisza345h769",bitsPerChar:5}),Xr=Object.freeze(Object.defineProperty({__proto__:null,base32:G,base32hex:Lr,base32hexpad:Wr,base32hexpadupper:Hr,base32hexupper:Jr,base32pad:Kr,base32padupper:Vr,base32upper:Ir,base32z:Gr},Symbol.toStringTag,{value:"Module"})),Qr=re({prefix:"k",name:"base36",alphabet:"0123456789abcdefghijklmnopqrstuvwxyz"}),Yr=re({prefix:"K",name:"base36upper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"}),Zr=Object.freeze(Object.defineProperty({__proto__:null,base36:Qr,base36upper:Yr},Symbol.toStringTag,{value:"Module"})),M=re({name:"base58btc",prefix:"z",alphabet:"123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"}),en=re({name:"base58flickr",prefix:"Z",alphabet:"123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ"}),tn=Object.freeze(Object.defineProperty({__proto__:null,base58btc:M,base58flickr:en},Symbol.toStringTag,{value:"Module"})),rn=S({prefix:"m",name:"base64",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",bitsPerChar:6}),nn=S({prefix:"M",name:"base64pad",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",bitsPerChar:6}),on=S({prefix:"u",name:"base64url",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_",bitsPerChar:6}),sn=S({prefix:"U",name:"base64urlpad",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_=",bitsPerChar:6}),an=Object.freeze(Object.defineProperty({__proto__:null,base64:rn,base64pad:nn,base64url:on,base64urlpad:sn},Symbol.toStringTag,{value:"Module"})),Ft=Array.from("🚀🪐☄🛰🌌🌑🌒🌓🌔🌕🌖🌗🌘🌍🌏🌎🐉☀💻🖥💾💿😂❤😍🤣😊🙏💕😭😘👍😅👏😁🔥🥰💔💖💙😢🤔😆🙄💪😉☺👌🤗💜😔😎😇🌹🤦🎉💞✌✨🤷😱😌🌸🙌😋💗💚😏💛🙂💓🤩😄😀🖤😃💯🙈👇🎶😒🤭❣😜💋👀😪😑💥🙋😞😩😡🤪👊🥳😥🤤👉💃😳✋😚😝😴🌟😬🙃🍀🌷😻😓⭐✅🥺🌈😈🤘💦✔😣🏃💐☹🎊💘😠☝😕🌺🎂🌻😐🖕💝🙊😹🗣💫💀👑🎵🤞😛🔴😤🌼😫⚽🤙☕🏆🤫👈😮🙆🍻🍃🐶💁😲🌿🧡🎁⚡🌞🎈❌✊👋😰🤨😶🤝🚶💰🍓💢🤟🙁🚨💨🤬✈🎀🍺🤓😙💟🌱😖👶🥴▶➡❓💎💸⬇😨🌚🦋😷🕺⚠🙅😟😵👎🤲🤠🤧📌🔵💅🧐🐾🍒😗🤑🌊🤯🐷☎💧😯💆👆🎤🙇🍑❄🌴💣🐸💌📍🥀🤢👅💡💩👐📸👻🤐🤮🎼🥵🚩🍎🍊👼💍📣🥂"),cn=Ft.reduce((t,e,r)=>(t[r]=e,t),[]),un=Ft.reduce((t,e,r)=>(t[e.codePointAt(0)]=r,t),[]);function bn(t){return t.reduce((e,r)=>(e+=cn[r],e),"")}function dn(t){const e=[];for(const r of t){const n=un[r.codePointAt(0)];if(n===void 0)throw new Error(`Non-base256emoji character: ${r}`);e.push(n)}return new Uint8Array(e)}const fn=le({prefix:"🚀",name:"base256emoji",encode:bn,decode:dn}),ln=Object.freeze(Object.defineProperty({__proto__:null,base256emoji:fn},Symbol.toStringTag,{value:"Module"}));var Dn=Bt,et=128,hn=-128,xn=Math.pow(2,31);function Bt(t,e,r){e=e||[],r=r||0;for(var n=r;t>=xn;)e[r++]=t&255|et,t/=128;for(;t&hn;)e[r++]=t&255|et,t>>>=7;return e[r]=t|0,Bt.bytes=r-n+1,e}var pn=ze,yn=128,tt=127;function ze(t,n){var r=0,n=n||0,o=0,i=n,s,a=t.length;do{if(i>=a)throw ze.bytes=0,new RangeError("Could not decode varint");s=t[i++],r+=o<28?(s&tt)<<o:(s&tt)*Math.pow(2,o),o+=7}while(s>=yn);return ze.bytes=i-n,r}var gn=Math.pow(2,7),wn=Math.pow(2,14),kn=Math.pow(2,21),mn=Math.pow(2,28),En=Math.pow(2,35),Cn=Math.pow(2,42),vn=Math.pow(2,49),Sn=Math.pow(2,56),An=Math.pow(2,63),_n=function(t){return t<gn?1:t<wn?2:t<kn?3:t<mn?4:t<En?5:t<Cn?6:t<vn?7:t<Sn?8:t<An?9:10},$n={encode:Dn,decode:pn,encodingLength:_n},ae=$n;const ce=(t,e=0)=>[ae.decode(t,e),ae.decode.bytes],X=(t,e,r=0)=>(ae.encode(t,e,r),e),Q=t=>ae.encodingLength(t),On=Object.freeze(Object.defineProperty({__proto__:null,decode:ce,encodeTo:X,encodingLength:Q},Symbol.toStringTag,{value:"Module"})),Y=(t,e)=>{const r=e.byteLength,n=Q(t),o=n+Q(r),i=new Uint8Array(o+r);return X(t,i,0),X(r,i,n),i.set(e,o),new De(t,r,e,i)},Rt=t=>{const e=K(t),[r,n]=ce(e),[o,i]=ce(e.subarray(n)),s=e.subarray(n+i);if(s.byteLength!==o)throw new Error("Incorrect length");return new De(r,o,s,e)},qt=(t,e)=>t===e?!0:t.code===e.code&&t.size===e.size&&Nt(t.bytes,e.bytes);class De{constructor(e,r,n,o){this.code=e,this.size=r,this.digest=n,this.bytes=o}}const Pn=Object.freeze(Object.defineProperty({__proto__:null,Digest:De,create:Y,decode:Rt,equals:qt},Symbol.toStringTag,{value:"Module"})),Je=({name:t,code:e,encode:r})=>new It(t,e,r);class It{constructor(e,r,n){this.name=e,this.code=r,this.encode=n}digest(e){if(e instanceof Uint8Array){const r=this.encode(e);return r instanceof Uint8Array?Y(this.code,r):r.then(n=>Y(this.code,n))}else throw Error("Unknown type, must be binary type")}}const jn=Object.freeze(Object.defineProperty({__proto__:null,Hasher:It,from:Je},Symbol.toStringTag,{value:"Module"})),Kt=t=>async e=>new Uint8Array(await crypto.subtle.digest(t,e)),Tn=Je({name:"sha2-256",code:18,encode:Kt("SHA-256")}),Nn=Je({name:"sha2-512",code:19,encode:Kt("SHA-512")}),Un=Object.freeze(Object.defineProperty({__proto__:null,sha256:Tn,sha512:Nn},Symbol.toStringTag,{value:"Module"})),Vt=0,Mn="identity",Lt=K,zn=t=>Y(Vt,Lt(t)),Fn={code:Vt,name:Mn,encode:Lt,digest:zn},Bn=Object.freeze(Object.defineProperty({__proto__:null,identity:Fn},Symbol.toStringTag,{value:"Module"})),Rn="raw",qn=85,In=t=>K(t),Kn=t=>K(t),Vn=Object.freeze(Object.defineProperty({__proto__:null,code:qn,decode:Kn,encode:In,name:Rn},Symbol.toStringTag,{value:"Module"})),Ln=new TextEncoder,Jn=new TextDecoder,Wn="json",Hn=512,Gn=t=>Ln.encode(JSON.stringify(t)),Xn=t=>JSON.parse(Jn.decode(t)),Qn=Object.freeze(Object.defineProperty({__proto__:null,code:Hn,decode:Xn,encode:Gn,name:Wn},Symbol.toStringTag,{value:"Module"}));class _{constructor(e,r,n,o){this.code=r,this.version=e,this.multihash=n,this.bytes=o,this.byteOffset=o.byteOffset,this.byteLength=o.byteLength,this.asCID=this,this._baseCache=new Map,Object.defineProperties(this,{byteOffset:ie,byteLength:ie,code:oe,version:oe,multihash:oe,bytes:oe,_baseCache:ie,asCID:ie})}toV0(){switch(this.version){case 0:return this;default:{const{code:e,multihash:r}=this;if(e!==H)throw new Error("Cannot convert a non dag-pb CID to CIDv0");if(r.code!==to)throw new Error("Cannot convert non sha2-256 multihash CID to CIDv0");return _.createV0(r)}}}toV1(){switch(this.version){case 0:{const{code:e,digest:r}=this.multihash,n=Y(e,r);return _.createV1(this.code,n)}case 1:return this;default:throw Error(`Can not convert CID version ${this.version} to version 0. This is a bug please report`)}}equals(e){return e&&this.code===e.code&&this.version===e.version&&qt(this.multihash,e.multihash)}toString(e){const{bytes:r,version:n,_baseCache:o}=this;switch(n){case 0:return Zn(r,o,e||M.encoder);default:return eo(r,o,e||G.encoder)}}toJSON(){return{code:this.code,version:this.version,hash:this.multihash.bytes}}get[Symbol.toStringTag](){return"CID"}[Symbol.for("nodejs.util.inspect.custom")](){return"CID("+this.toString()+")"}static isCID(e){return no(/^0\.0/,oo),!!(e&&(e[nt]||e.asCID===e))}get toBaseEncodedString(){throw new Error("Deprecated, use .toString()")}get codec(){throw new Error('"codec" property is deprecated, use integer "code" property instead')}get buffer(){throw new Error("Deprecated .buffer property, use .bytes to get Uint8Array instead")}get multibaseName(){throw new Error('"multibaseName" property is deprecated')}get prefix(){throw new Error('"prefix" property is deprecated')}static asCID(e){if(e instanceof _)return e;if(e!=null&&e.asCID===e){const{version:r,code:n,multihash:o,bytes:i}=e;return new _(r,n,o,i||rt(r,n,o.bytes))}else if(e!=null&&e[nt]===!0){const{version:r,multihash:n,code:o}=e,i=Rt(n);return _.create(r,o,i)}else return null}static create(e,r,n){if(typeof r!="number")throw new Error("String codecs are no longer supported");switch(e){case 0:{if(r!==H)throw new Error(`Version 0 CID must use dag-pb (code: ${H}) block encoding`);return new _(e,r,n,n.bytes)}case 1:{const o=rt(e,r,n.bytes);return new _(e,r,n,o)}default:throw new Error("Invalid version")}}static createV0(e){return _.create(0,H,e)}static createV1(e,r){return _.create(1,e,r)}static decode(e){const[r,n]=_.decodeFirst(e);if(n.length)throw new Error("Incorrect length");return r}static decodeFirst(e){const r=_.inspectBytes(e),n=r.size-r.multihashSize,o=K(e.subarray(n,n+r.multihashSize));if(o.byteLength!==r.multihashSize)throw new Error("Incorrect length");const i=o.subarray(r.multihashSize-r.digestSize),s=new De(r.multihashCode,r.digestSize,i,o);return[r.version===0?_.createV0(s):_.createV1(r.codec,s),e.subarray(r.size)]}static inspectBytes(e){let r=0;const n=()=>{const[g,N]=ce(e.subarray(r));return r+=N,g};let o=n(),i=H;if(o===18?(o=0,r=0):o===1&&(i=n()),o!==0&&o!==1)throw new RangeError(`Invalid CID version ${o}`);const s=r,a=n(),c=n(),d=r+c,x=d-s;return{version:o,codec:i,multihashCode:a,digestSize:c,multihashSize:x,size:d}}static parse(e,r){const[n,o]=Yn(e,r),i=_.decode(o);return i._baseCache.set(n,e),i}}const Yn=(t,e)=>{switch(t[0]){case"Q":{const r=e||M;return[M.prefix,r.decode(`${M.prefix}${t}`)]}case M.prefix:{const r=e||M;return[M.prefix,r.decode(t)]}case G.prefix:{const r=e||G;return[G.prefix,r.decode(t)]}default:{if(e==null)throw Error("To parse non base32 or base58btc encoded CID multibase decoder must be provided");return[t[0],e.decode(t)]}}},Zn=(t,e,r)=>{const{prefix:n}=r;if(n!==M.prefix)throw Error(`Cannot string encode V0 in ${r.name} encoding`);const o=e.get(n);if(o==null){const i=r.encode(t).slice(1);return e.set(n,i),i}else return o},eo=(t,e,r)=>{const{prefix:n}=r,o=e.get(n);if(o==null){const i=r.encode(t);return e.set(n,i),i}else return o},H=112,to=18,rt=(t,e,r)=>{const n=Q(t),o=n+Q(e),i=new Uint8Array(o+r.byteLength);return X(t,i,0),X(e,i,n),i.set(r,o),i},nt=Symbol.for("@ipld/js-cid/CID"),oe={writable:!1,configurable:!1,enumerable:!0},ie={writable:!1,enumerable:!1,configurable:!1},ro="0.0.0-dev",no=(t,e)=>{if(t.test(ro))console.warn(e);else throw new Error(e)},oo=`CID.isCID(v) is deprecated and will be removed in the next major release.
1
+ var dr=Object.defineProperty;var Xe=t=>{throw TypeError(t)};var fr=(t,e,r)=>e in t?dr(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r;var v=(t,e,r)=>fr(t,typeof e!="symbol"?e+"":e,r),xe=(t,e,r)=>e.has(t)||Xe("Cannot "+r);var D=(t,e,r)=>(xe(t,e,"read from private field"),r?r.call(t):e.get(t)),$=(t,e,r)=>e.has(t)?Xe("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,r),F=(t,e,r,n)=>(xe(t,e,"write to private field"),n?n.call(t,r):e.set(t,r),r),P=(t,e,r)=>(xe(t,e,"access private method"),r);import{ak as fe,g as jt,_ as lr,e as Dr}from"./index.CP03D3n8.js";import{k as ws,j as ks,r as ms,s as Es}from"./user.Ca59JWI8.js";import{B as vs,R as Ss,g as As,a as _s,i as $s,p as Os}from"./index.D9TUzq2N.js";import{k as js,j as Ts,R as Ns}from"./useFeatureFlags.CJKNBSez.js";import"react";import"react/jsx-runtime";import"react-dom";import"./connect.config.vrIC-ElT.js";import"./browser.BkwNmV2Z.js";import"./index.CYLzaQFn.js";import"react-dom/client";import"./app-skeleton.js";var pe,Qe;function hr(){if(Qe)return pe;Qe=1;function t(e,r){for(let n=0;n<e.byteLength;n++){if(e[n]<r[n])return-1;if(e[n]>r[n])return 1}return e.byteLength>r.byteLength?1:e.byteLength<r.byteLength?-1:0}return pe=t,pe}var ye,Ye;function xr(){if(Ye)return ye;Ye=1;function t(e,r){r||(r=e.reduce((i,s)=>i+s.length,0));const n=new Uint8Array(r);let o=0;for(const i of e)n.set(i,o),o+=i.length;return n}return ye=t,ye}var ge,Ze;function pr(){if(Ze)return ge;Ze=1;function t(e,r){if(e===r)return!0;if(e.byteLength!==r.byteLength)return!1;for(let n=0;n<e.byteLength;n++)if(e[n]!==r[n])return!1;return!0}return ge=t,ge}function yr(t,e){if(t.length>=255)throw new TypeError("Alphabet too long");for(var r=new Uint8Array(256),n=0;n<r.length;n++)r[n]=255;for(var o=0;o<t.length;o++){var i=t.charAt(o),s=i.charCodeAt(0);if(r[s]!==255)throw new TypeError(i+" is ambiguous");r[s]=o}var a=t.length,c=t.charAt(0),d=Math.log(a)/Math.log(256),x=Math.log(256)/Math.log(a);function g(b){if(b instanceof Uint8Array||(ArrayBuffer.isView(b)?b=new Uint8Array(b.buffer,b.byteOffset,b.byteLength):Array.isArray(b)&&(b=Uint8Array.from(b))),!(b instanceof Uint8Array))throw new TypeError("Expected Uint8Array");if(b.length===0)return"";for(var f=0,C=0,y=0,w=b.length;y!==w&&b[y]===0;)y++,f++;for(var k=(w-y)*x+1>>>0,p=new Uint8Array(k);y!==w;){for(var u=b[y],h=0,l=k-1;(u!==0||h<C)&&l!==-1;l--,h++)u+=256*p[l]>>>0,p[l]=u%a>>>0,u=u/a>>>0;if(u!==0)throw new Error("Non-zero carry");C=h,y++}for(var m=k-C;m!==k&&p[m]===0;)m++;for(var z=c.repeat(f);m<k;++m)z+=t.charAt(p[m]);return z}function N(b){if(typeof b!="string")throw new TypeError("Expected String");if(b.length===0)return new Uint8Array;var f=0;if(b[f]!==" "){for(var C=0,y=0;b[f]===c;)C++,f++;for(var w=(b.length-f)*d+1>>>0,k=new Uint8Array(w);b[f];){var p=r[b.charCodeAt(f)];if(p===255)return;for(var u=0,h=w-1;(p!==0||u<y)&&h!==-1;h--,u++)p+=a*k[h]>>>0,k[h]=p%256>>>0,p=p/256>>>0;if(p!==0)throw new Error("Non-zero carry");y=u,f++}if(b[f]!==" "){for(var l=w-y;l!==w&&k[l]===0;)l++;for(var m=new Uint8Array(C+(w-l)),z=C;l!==w;)m[z++]=k[l++];return m}}}function V(b){var f=N(b);if(f)return f;throw new Error(`Non-${e} character`)}return{encode:g,decodeUnsafe:N,decode:V}}var gr=yr,wr=gr;const Tt=new Uint8Array(0),kr=t=>t.reduce((e,r)=>e+r.toString(16).padStart(2,"0"),""),mr=t=>{const e=t.match(/../g);return e?new Uint8Array(e.map(r=>parseInt(r,16))):Tt},Nt=(t,e)=>{if(t===e)return!0;if(t.byteLength!==e.byteLength)return!1;for(let r=0;r<t.byteLength;r++)if(t[r]!==e[r])return!1;return!0},K=t=>{if(t instanceof Uint8Array&&t.constructor.name==="Uint8Array")return t;if(t instanceof ArrayBuffer)return new Uint8Array(t);if(ArrayBuffer.isView(t))return new Uint8Array(t.buffer,t.byteOffset,t.byteLength);throw new Error("Unknown type, must be binary type")},Er=t=>t instanceof ArrayBuffer||ArrayBuffer.isView(t),Ut=t=>new TextEncoder().encode(t),Mt=t=>new TextDecoder().decode(t),Cr=Object.freeze(Object.defineProperty({__proto__:null,coerce:K,empty:Tt,equals:Nt,fromHex:mr,fromString:Ut,isBinary:Er,toHex:kr,toString:Mt},Symbol.toStringTag,{value:"Module"}));let vr=class{constructor(e,r,n){this.name=e,this.prefix=r,this.baseEncode=n}encode(e){if(e instanceof Uint8Array)return`${this.prefix}${this.baseEncode(e)}`;throw Error("Unknown type, must be binary type")}},Sr=class{constructor(e,r,n){if(this.name=e,this.prefix=r,r.codePointAt(0)===void 0)throw new Error("Invalid prefix character");this.prefixCodePoint=r.codePointAt(0),this.baseDecode=n}decode(e){if(typeof e=="string"){if(e.codePointAt(0)!==this.prefixCodePoint)throw Error(`Unable to decode multibase string ${JSON.stringify(e)}, ${this.name} decoder only supports inputs prefixed with ${this.prefix}`);return this.baseDecode(e.slice(this.prefix.length))}else throw Error("Can only multibase decode strings")}or(e){return zt(this,e)}},Ar=class{constructor(e){this.decoders=e}or(e){return zt(this,e)}decode(e){const r=e[0],n=this.decoders[r];if(n)return n.decode(e);throw RangeError(`Unable to decode multibase string ${JSON.stringify(e)}, only inputs prefixed with ${Object.keys(this.decoders)} are supported`)}};const zt=(t,e)=>new Ar({...t.decoders||{[t.prefix]:t},...e.decoders||{[e.prefix]:e}});let _r=class{constructor(e,r,n,o){this.name=e,this.prefix=r,this.baseEncode=n,this.baseDecode=o,this.encoder=new vr(e,r,n),this.decoder=new Sr(e,r,o)}encode(e){return this.encoder.encode(e)}decode(e){return this.decoder.decode(e)}};const le=({name:t,prefix:e,encode:r,decode:n})=>new _r(t,e,r,n),re=({prefix:t,name:e,alphabet:r})=>{const{encode:n,decode:o}=wr(r,e);return le({prefix:t,name:e,encode:n,decode:i=>K(o(i))})},$r=(t,e,r,n)=>{const o={};for(let x=0;x<e.length;++x)o[e[x]]=x;let i=t.length;for(;t[i-1]==="=";)--i;const s=new Uint8Array(i*r/8|0);let a=0,c=0,d=0;for(let x=0;x<i;++x){const g=o[t[x]];if(g===void 0)throw new SyntaxError(`Non-${n} character`);c=c<<r|g,a+=r,a>=8&&(a-=8,s[d++]=255&c>>a)}if(a>=r||255&c<<8-a)throw new SyntaxError("Unexpected end of data");return s},Or=(t,e,r)=>{const n=e[e.length-1]==="=",o=(1<<r)-1;let i="",s=0,a=0;for(let c=0;c<t.length;++c)for(a=a<<8|t[c],s+=8;s>r;)s-=r,i+=e[o&a>>s];if(s&&(i+=e[o&a<<r-s]),n)for(;i.length*r&7;)i+="=";return i},S=({name:t,prefix:e,bitsPerChar:r,alphabet:n})=>le({prefix:e,name:t,encode(o){return Or(o,n,r)},decode(o){return $r(o,n,r,t)}}),Pr=le({prefix:"\0",name:"identity",encode:t=>Mt(t),decode:t=>Ut(t)}),jr=Object.freeze(Object.defineProperty({__proto__:null,identity:Pr},Symbol.toStringTag,{value:"Module"})),Tr=S({prefix:"0",name:"base2",alphabet:"01",bitsPerChar:1}),Nr=Object.freeze(Object.defineProperty({__proto__:null,base2:Tr},Symbol.toStringTag,{value:"Module"})),Ur=S({prefix:"7",name:"base8",alphabet:"01234567",bitsPerChar:3}),Mr=Object.freeze(Object.defineProperty({__proto__:null,base8:Ur},Symbol.toStringTag,{value:"Module"})),zr=re({prefix:"9",name:"base10",alphabet:"0123456789"}),Fr=Object.freeze(Object.defineProperty({__proto__:null,base10:zr},Symbol.toStringTag,{value:"Module"})),Br=S({prefix:"f",name:"base16",alphabet:"0123456789abcdef",bitsPerChar:4}),Rr=S({prefix:"F",name:"base16upper",alphabet:"0123456789ABCDEF",bitsPerChar:4}),qr=Object.freeze(Object.defineProperty({__proto__:null,base16:Br,base16upper:Rr},Symbol.toStringTag,{value:"Module"})),G=S({prefix:"b",name:"base32",alphabet:"abcdefghijklmnopqrstuvwxyz234567",bitsPerChar:5}),Ir=S({prefix:"B",name:"base32upper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567",bitsPerChar:5}),Kr=S({prefix:"c",name:"base32pad",alphabet:"abcdefghijklmnopqrstuvwxyz234567=",bitsPerChar:5}),Vr=S({prefix:"C",name:"base32padupper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567=",bitsPerChar:5}),Lr=S({prefix:"v",name:"base32hex",alphabet:"0123456789abcdefghijklmnopqrstuv",bitsPerChar:5}),Jr=S({prefix:"V",name:"base32hexupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV",bitsPerChar:5}),Wr=S({prefix:"t",name:"base32hexpad",alphabet:"0123456789abcdefghijklmnopqrstuv=",bitsPerChar:5}),Hr=S({prefix:"T",name:"base32hexpadupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV=",bitsPerChar:5}),Gr=S({prefix:"h",name:"base32z",alphabet:"ybndrfg8ejkmcpqxot1uwisza345h769",bitsPerChar:5}),Xr=Object.freeze(Object.defineProperty({__proto__:null,base32:G,base32hex:Lr,base32hexpad:Wr,base32hexpadupper:Hr,base32hexupper:Jr,base32pad:Kr,base32padupper:Vr,base32upper:Ir,base32z:Gr},Symbol.toStringTag,{value:"Module"})),Qr=re({prefix:"k",name:"base36",alphabet:"0123456789abcdefghijklmnopqrstuvwxyz"}),Yr=re({prefix:"K",name:"base36upper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"}),Zr=Object.freeze(Object.defineProperty({__proto__:null,base36:Qr,base36upper:Yr},Symbol.toStringTag,{value:"Module"})),M=re({name:"base58btc",prefix:"z",alphabet:"123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"}),en=re({name:"base58flickr",prefix:"Z",alphabet:"123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ"}),tn=Object.freeze(Object.defineProperty({__proto__:null,base58btc:M,base58flickr:en},Symbol.toStringTag,{value:"Module"})),rn=S({prefix:"m",name:"base64",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",bitsPerChar:6}),nn=S({prefix:"M",name:"base64pad",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",bitsPerChar:6}),on=S({prefix:"u",name:"base64url",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_",bitsPerChar:6}),sn=S({prefix:"U",name:"base64urlpad",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_=",bitsPerChar:6}),an=Object.freeze(Object.defineProperty({__proto__:null,base64:rn,base64pad:nn,base64url:on,base64urlpad:sn},Symbol.toStringTag,{value:"Module"})),Ft=Array.from("🚀🪐☄🛰🌌🌑🌒🌓🌔🌕🌖🌗🌘🌍🌏🌎🐉☀💻🖥💾💿😂❤😍🤣😊🙏💕😭😘👍😅👏😁🔥🥰💔💖💙😢🤔😆🙄💪😉☺👌🤗💜😔😎😇🌹🤦🎉💞✌✨🤷😱😌🌸🙌😋💗💚😏💛🙂💓🤩😄😀🖤😃💯🙈👇🎶😒🤭❣😜💋👀😪😑💥🙋😞😩😡🤪👊🥳😥🤤👉💃😳✋😚😝😴🌟😬🙃🍀🌷😻😓⭐✅🥺🌈😈🤘💦✔😣🏃💐☹🎊💘😠☝😕🌺🎂🌻😐🖕💝🙊😹🗣💫💀👑🎵🤞😛🔴😤🌼😫⚽🤙☕🏆🤫👈😮🙆🍻🍃🐶💁😲🌿🧡🎁⚡🌞🎈❌✊👋😰🤨😶🤝🚶💰🍓💢🤟🙁🚨💨🤬✈🎀🍺🤓😙💟🌱😖👶🥴▶➡❓💎💸⬇😨🌚🦋😷🕺⚠🙅😟😵👎🤲🤠🤧📌🔵💅🧐🐾🍒😗🤑🌊🤯🐷☎💧😯💆👆🎤🙇🍑❄🌴💣🐸💌📍🥀🤢👅💡💩👐📸👻🤐🤮🎼🥵🚩🍎🍊👼💍📣🥂"),cn=Ft.reduce((t,e,r)=>(t[r]=e,t),[]),un=Ft.reduce((t,e,r)=>(t[e.codePointAt(0)]=r,t),[]);function bn(t){return t.reduce((e,r)=>(e+=cn[r],e),"")}function dn(t){const e=[];for(const r of t){const n=un[r.codePointAt(0)];if(n===void 0)throw new Error(`Non-base256emoji character: ${r}`);e.push(n)}return new Uint8Array(e)}const fn=le({prefix:"🚀",name:"base256emoji",encode:bn,decode:dn}),ln=Object.freeze(Object.defineProperty({__proto__:null,base256emoji:fn},Symbol.toStringTag,{value:"Module"}));var Dn=Bt,et=128,hn=-128,xn=Math.pow(2,31);function Bt(t,e,r){e=e||[],r=r||0;for(var n=r;t>=xn;)e[r++]=t&255|et,t/=128;for(;t&hn;)e[r++]=t&255|et,t>>>=7;return e[r]=t|0,Bt.bytes=r-n+1,e}var pn=ze,yn=128,tt=127;function ze(t,n){var r=0,n=n||0,o=0,i=n,s,a=t.length;do{if(i>=a)throw ze.bytes=0,new RangeError("Could not decode varint");s=t[i++],r+=o<28?(s&tt)<<o:(s&tt)*Math.pow(2,o),o+=7}while(s>=yn);return ze.bytes=i-n,r}var gn=Math.pow(2,7),wn=Math.pow(2,14),kn=Math.pow(2,21),mn=Math.pow(2,28),En=Math.pow(2,35),Cn=Math.pow(2,42),vn=Math.pow(2,49),Sn=Math.pow(2,56),An=Math.pow(2,63),_n=function(t){return t<gn?1:t<wn?2:t<kn?3:t<mn?4:t<En?5:t<Cn?6:t<vn?7:t<Sn?8:t<An?9:10},$n={encode:Dn,decode:pn,encodingLength:_n},ae=$n;const ce=(t,e=0)=>[ae.decode(t,e),ae.decode.bytes],X=(t,e,r=0)=>(ae.encode(t,e,r),e),Q=t=>ae.encodingLength(t),On=Object.freeze(Object.defineProperty({__proto__:null,decode:ce,encodeTo:X,encodingLength:Q},Symbol.toStringTag,{value:"Module"})),Y=(t,e)=>{const r=e.byteLength,n=Q(t),o=n+Q(r),i=new Uint8Array(o+r);return X(t,i,0),X(r,i,n),i.set(e,o),new De(t,r,e,i)},Rt=t=>{const e=K(t),[r,n]=ce(e),[o,i]=ce(e.subarray(n)),s=e.subarray(n+i);if(s.byteLength!==o)throw new Error("Incorrect length");return new De(r,o,s,e)},qt=(t,e)=>t===e?!0:t.code===e.code&&t.size===e.size&&Nt(t.bytes,e.bytes);class De{constructor(e,r,n,o){this.code=e,this.size=r,this.digest=n,this.bytes=o}}const Pn=Object.freeze(Object.defineProperty({__proto__:null,Digest:De,create:Y,decode:Rt,equals:qt},Symbol.toStringTag,{value:"Module"})),Je=({name:t,code:e,encode:r})=>new It(t,e,r);class It{constructor(e,r,n){this.name=e,this.code=r,this.encode=n}digest(e){if(e instanceof Uint8Array){const r=this.encode(e);return r instanceof Uint8Array?Y(this.code,r):r.then(n=>Y(this.code,n))}else throw Error("Unknown type, must be binary type")}}const jn=Object.freeze(Object.defineProperty({__proto__:null,Hasher:It,from:Je},Symbol.toStringTag,{value:"Module"})),Kt=t=>async e=>new Uint8Array(await crypto.subtle.digest(t,e)),Tn=Je({name:"sha2-256",code:18,encode:Kt("SHA-256")}),Nn=Je({name:"sha2-512",code:19,encode:Kt("SHA-512")}),Un=Object.freeze(Object.defineProperty({__proto__:null,sha256:Tn,sha512:Nn},Symbol.toStringTag,{value:"Module"})),Vt=0,Mn="identity",Lt=K,zn=t=>Y(Vt,Lt(t)),Fn={code:Vt,name:Mn,encode:Lt,digest:zn},Bn=Object.freeze(Object.defineProperty({__proto__:null,identity:Fn},Symbol.toStringTag,{value:"Module"})),Rn="raw",qn=85,In=t=>K(t),Kn=t=>K(t),Vn=Object.freeze(Object.defineProperty({__proto__:null,code:qn,decode:Kn,encode:In,name:Rn},Symbol.toStringTag,{value:"Module"})),Ln=new TextEncoder,Jn=new TextDecoder,Wn="json",Hn=512,Gn=t=>Ln.encode(JSON.stringify(t)),Xn=t=>JSON.parse(Jn.decode(t)),Qn=Object.freeze(Object.defineProperty({__proto__:null,code:Hn,decode:Xn,encode:Gn,name:Wn},Symbol.toStringTag,{value:"Module"}));class _{constructor(e,r,n,o){this.code=r,this.version=e,this.multihash=n,this.bytes=o,this.byteOffset=o.byteOffset,this.byteLength=o.byteLength,this.asCID=this,this._baseCache=new Map,Object.defineProperties(this,{byteOffset:ie,byteLength:ie,code:oe,version:oe,multihash:oe,bytes:oe,_baseCache:ie,asCID:ie})}toV0(){switch(this.version){case 0:return this;default:{const{code:e,multihash:r}=this;if(e!==H)throw new Error("Cannot convert a non dag-pb CID to CIDv0");if(r.code!==to)throw new Error("Cannot convert non sha2-256 multihash CID to CIDv0");return _.createV0(r)}}}toV1(){switch(this.version){case 0:{const{code:e,digest:r}=this.multihash,n=Y(e,r);return _.createV1(this.code,n)}case 1:return this;default:throw Error(`Can not convert CID version ${this.version} to version 0. This is a bug please report`)}}equals(e){return e&&this.code===e.code&&this.version===e.version&&qt(this.multihash,e.multihash)}toString(e){const{bytes:r,version:n,_baseCache:o}=this;switch(n){case 0:return Zn(r,o,e||M.encoder);default:return eo(r,o,e||G.encoder)}}toJSON(){return{code:this.code,version:this.version,hash:this.multihash.bytes}}get[Symbol.toStringTag](){return"CID"}[Symbol.for("nodejs.util.inspect.custom")](){return"CID("+this.toString()+")"}static isCID(e){return no(/^0\.0/,oo),!!(e&&(e[nt]||e.asCID===e))}get toBaseEncodedString(){throw new Error("Deprecated, use .toString()")}get codec(){throw new Error('"codec" property is deprecated, use integer "code" property instead')}get buffer(){throw new Error("Deprecated .buffer property, use .bytes to get Uint8Array instead")}get multibaseName(){throw new Error('"multibaseName" property is deprecated')}get prefix(){throw new Error('"prefix" property is deprecated')}static asCID(e){if(e instanceof _)return e;if(e!=null&&e.asCID===e){const{version:r,code:n,multihash:o,bytes:i}=e;return new _(r,n,o,i||rt(r,n,o.bytes))}else if(e!=null&&e[nt]===!0){const{version:r,multihash:n,code:o}=e,i=Rt(n);return _.create(r,o,i)}else return null}static create(e,r,n){if(typeof r!="number")throw new Error("String codecs are no longer supported");switch(e){case 0:{if(r!==H)throw new Error(`Version 0 CID must use dag-pb (code: ${H}) block encoding`);return new _(e,r,n,n.bytes)}case 1:{const o=rt(e,r,n.bytes);return new _(e,r,n,o)}default:throw new Error("Invalid version")}}static createV0(e){return _.create(0,H,e)}static createV1(e,r){return _.create(1,e,r)}static decode(e){const[r,n]=_.decodeFirst(e);if(n.length)throw new Error("Incorrect length");return r}static decodeFirst(e){const r=_.inspectBytes(e),n=r.size-r.multihashSize,o=K(e.subarray(n,n+r.multihashSize));if(o.byteLength!==r.multihashSize)throw new Error("Incorrect length");const i=o.subarray(r.multihashSize-r.digestSize),s=new De(r.multihashCode,r.digestSize,i,o);return[r.version===0?_.createV0(s):_.createV1(r.codec,s),e.subarray(r.size)]}static inspectBytes(e){let r=0;const n=()=>{const[g,N]=ce(e.subarray(r));return r+=N,g};let o=n(),i=H;if(o===18?(o=0,r=0):o===1&&(i=n()),o!==0&&o!==1)throw new RangeError(`Invalid CID version ${o}`);const s=r,a=n(),c=n(),d=r+c,x=d-s;return{version:o,codec:i,multihashCode:a,digestSize:c,multihashSize:x,size:d}}static parse(e,r){const[n,o]=Yn(e,r),i=_.decode(o);return i._baseCache.set(n,e),i}}const Yn=(t,e)=>{switch(t[0]){case"Q":{const r=e||M;return[M.prefix,r.decode(`${M.prefix}${t}`)]}case M.prefix:{const r=e||M;return[M.prefix,r.decode(t)]}case G.prefix:{const r=e||G;return[G.prefix,r.decode(t)]}default:{if(e==null)throw Error("To parse non base32 or base58btc encoded CID multibase decoder must be provided");return[t[0],e.decode(t)]}}},Zn=(t,e,r)=>{const{prefix:n}=r;if(n!==M.prefix)throw Error(`Cannot string encode V0 in ${r.name} encoding`);const o=e.get(n);if(o==null){const i=r.encode(t).slice(1);return e.set(n,i),i}else return o},eo=(t,e,r)=>{const{prefix:n}=r,o=e.get(n);if(o==null){const i=r.encode(t);return e.set(n,i),i}else return o},H=112,to=18,rt=(t,e,r)=>{const n=Q(t),o=n+Q(e),i=new Uint8Array(o+r.byteLength);return X(t,i,0),X(e,i,n),i.set(r,o),i},nt=Symbol.for("@ipld/js-cid/CID"),oe={writable:!1,configurable:!1,enumerable:!0},ie={writable:!1,enumerable:!1,configurable:!1},ro="0.0.0-dev",no=(t,e)=>{if(t.test(ro))console.warn(e);else throw new Error(e)},oo=`CID.isCID(v) is deprecated and will be removed in the next major release.
2
2
  Following code pattern:
3
3
 
4
4
  if (CID.isCID(value)) {
@@ -13,4 +13,4 @@ if (cid) {
13
13
  doSomethingWithCID(cid)
14
14
  }
15
15
  `,Fe={...jr,...Nr,...Mr,...Fr,...qr,...Xr,...Zr,...tn,...an,...ln},io={...Un,...Bn},so={raw:Vn,json:Qn},ao=Object.freeze(Object.defineProperty({__proto__:null,CID:_,bases:Fe,bytes:Cr,codecs:so,digest:Pn,hasher:jn,hashes:io,varint:On},Symbol.toStringTag,{value:"Module"})),co=fe(ao);var we,ot;function Jt(){if(ot)return we;ot=1;const{bases:t}=co;function e(i,s,a,c){return{name:i,prefix:s,encoder:{name:i,prefix:s,encode:a},decoder:{decode:c}}}const r=e("utf8","u",i=>"u"+new TextDecoder("utf8").decode(i),i=>new TextEncoder().encode(i.substring(1))),n=e("ascii","a",i=>{let s="a";for(let a=0;a<i.length;a++)s+=String.fromCharCode(i[a]);return s},i=>{i=i.substring(1);const s=new Uint8Array(i.length);for(let a=0;a<i.length;a++)s[a]=i.charCodeAt(a);return s});return we={utf8:r,"utf-8":r,hex:t.base16,latin1:n,ascii:n,binary:n,...t},we}var ke,it;function uo(){if(it)return ke;it=1;const t=Jt();function e(r,n="utf8"){const o=t[n];if(!o)throw new Error(`Unsupported encoding "${n}"`);return o.decoder.decode(`${o.prefix}${r}`)}return ke=e,ke}var me,st;function bo(){if(st)return me;st=1;const t=Jt();function e(r,n="utf8"){const o=t[n];if(!o)throw new Error(`Unsupported encoding "${n}"`);return o.encoder.encode(r).substring(1)}return me=e,me}var Ee,at;function fo(){if(at)return Ee;at=1;function t(e,r){if(e.length!==r.length)throw new Error("Inputs should have the same length");const n=new Uint8Array(e.length);for(let o=0;o<e.length;o++)n[o]=e[o]^r[o];return n}return Ee=t,Ee}var Ce,ct;function lo(){return ct||(ct=1,Ce={compare:hr(),concat:xr(),equals:pr(),fromString:uo(),toString:bo(),xor:fo()}),Ce}var se=lo(),ve,ut;function Do(){if(ut)return ve;ut=1,ve=n;var t=128,e=-128,r=Math.pow(2,31);function n(o,i,s){if(Number.MAX_SAFE_INTEGER&&o>Number.MAX_SAFE_INTEGER)throw n.bytes=0,new RangeError("Could not encode varint");i=i||[],s=s||0;for(var a=s;o>=r;)i[s++]=o&255|t,o/=128;for(;o&e;)i[s++]=o&255|t,o>>>=7;return i[s]=o|0,n.bytes=s-a+1,i}return ve}var Se,bt;function ho(){if(bt)return Se;bt=1,Se=r;var t=128,e=127;function r(n,s){var i=0,s=s||0,a=0,c=s,d,x=n.length;do{if(c>=x||a>49)throw r.bytes=0,new RangeError("Could not decode varint");d=n[c++],i+=a<28?(d&e)<<a:(d&e)*Math.pow(2,a),a+=7}while(d>=t);return r.bytes=c-s,i}return Se}var Ae,dt;function xo(){if(dt)return Ae;dt=1;var t=Math.pow(2,7),e=Math.pow(2,14),r=Math.pow(2,21),n=Math.pow(2,28),o=Math.pow(2,35),i=Math.pow(2,42),s=Math.pow(2,49),a=Math.pow(2,56),c=Math.pow(2,63);return Ae=function(d){return d<t?1:d<e?2:d<r?3:d<n?4:d<o?5:d<i?6:d<s?7:d<a?8:d<c?9:10},Ae}var _e,ft;function Wt(){return ft||(ft=1,_e={encode:Do(),decode:ho(),encodingLength:xo()}),_e}function We(t){return globalThis.Buffer!=null?new Uint8Array(t.buffer,t.byteOffset,t.byteLength):t}function Ht(t=0){return globalThis.Buffer!=null&&globalThis.Buffer.allocUnsafe!=null?We(globalThis.Buffer.allocUnsafe(t)):new Uint8Array(t)}function Gt(t,e){e||(e=t.reduce((o,i)=>o+i.length,0));const r=Ht(e);let n=0;for(const o of t)r.set(o,n),n+=o.length;return We(r)}const po=Object.freeze(Object.defineProperty({__proto__:null,concat:Gt},Symbol.toStringTag,{value:"Module"})),yo=fe(po);function Xt(t,e,r,n){return{name:t,prefix:e,encoder:{name:t,prefix:e,encode:r},decoder:{decode:n}}}const lt=Xt("utf8","u",t=>"u"+new TextDecoder("utf8").decode(t),t=>new TextEncoder().encode(t.substring(1))),$e=Xt("ascii","a",t=>{let e="a";for(let r=0;r<t.length;r++)e+=String.fromCharCode(t[r]);return e},t=>{t=t.substring(1);const e=Ht(t.length);for(let r=0;r<t.length;r++)e[r]=t.charCodeAt(r);return e}),Qt={utf8:lt,"utf-8":lt,hex:Fe.base16,latin1:$e,ascii:$e,binary:$e,...Fe};function Yt(t,e="utf8"){const r=Qt[e];if(!r)throw new Error(`Unsupported encoding "${e}"`);return(e==="utf8"||e==="utf-8")&&globalThis.Buffer!=null&&globalThis.Buffer.from!=null?globalThis.Buffer.from(t.buffer,t.byteOffset,t.byteLength).toString("utf8"):r.encoder.encode(t).substring(1)}const go=Object.freeze(Object.defineProperty({__proto__:null,toString:Yt},Symbol.toStringTag,{value:"Module"})),wo=fe(go);function Zt(t,e="utf8"){const r=Qt[e];if(!r)throw new Error(`Unsupported encoding "${e}"`);return(e==="utf8"||e==="utf-8")&&globalThis.Buffer!=null&&globalThis.Buffer.from!=null?We(globalThis.Buffer.from(t,"utf-8")):r.decoder.decode(`${r.prefix}${t}`)}const ko=Object.freeze(Object.defineProperty({__proto__:null,fromString:Zt},Symbol.toStringTag,{value:"Module"})),mo=fe(ko);var Oe,Dt;function er(){if(Dt)return Oe;Dt=1;const t=Wt(),{toString:e}=wo,{fromString:r}=mo;Oe={numberToUint8Array:o,uint8ArrayToNumber:n,varintUint8ArrayEncode:i,varintEncode:s};function n(a){return parseInt(e(a,"base16"),16)}function o(a){let c=a.toString(16);return c.length%2===1&&(c="0"+c),r(c,"base16")}function i(a){return Uint8Array.from(t.encode(n(a)))}function s(a){return Uint8Array.from(t.encode(a))}return Oe}var Pe,ht;function Eo(){return ht||(ht=1,Pe={baseTable:Object.freeze({identity:0,cidv1:1,cidv2:2,cidv3:3,ip4:4,tcp:6,sha1:17,"sha2-256":18,"sha2-512":19,"sha3-512":20,"sha3-384":21,"sha3-256":22,"sha3-224":23,"shake-128":24,"shake-256":25,"keccak-224":26,"keccak-256":27,"keccak-384":28,"keccak-512":29,blake3:30,dccp:33,"murmur3-128":34,"murmur3-32":35,ip6:41,ip6zone:42,path:47,multicodec:48,multihash:49,multiaddr:50,multibase:51,dns:53,dns4:54,dns6:55,dnsaddr:56,protobuf:80,cbor:81,raw:85,"dbl-sha2-256":86,rlp:96,bencode:99,"dag-pb":112,"dag-cbor":113,"libp2p-key":114,"git-raw":120,"torrent-info":123,"torrent-file":124,"leofcoin-block":129,"leofcoin-tx":130,"leofcoin-pr":131,sctp:132,"dag-jose":133,"dag-cose":134,"eth-block":144,"eth-block-list":145,"eth-tx-trie":146,"eth-tx":147,"eth-tx-receipt-trie":148,"eth-tx-receipt":149,"eth-state-trie":150,"eth-account-snapshot":151,"eth-storage-trie":152,"eth-receipt-log-trie":153,"eth-reciept-log":154,"bitcoin-block":176,"bitcoin-tx":177,"bitcoin-witness-commitment":178,"zcash-block":192,"zcash-tx":193,"caip-50":202,streamid:206,"stellar-block":208,"stellar-tx":209,md4:212,md5:213,bmt:214,"decred-block":224,"decred-tx":225,"ipld-ns":226,"ipfs-ns":227,"swarm-ns":228,"ipns-ns":229,zeronet:230,"secp256k1-pub":231,"bls12_381-g1-pub":234,"bls12_381-g2-pub":235,"x25519-pub":236,"ed25519-pub":237,"bls12_381-g1g2-pub":238,"dash-block":240,"dash-tx":241,"swarm-manifest":250,"swarm-feed":251,udp:273,"p2p-webrtc-star":275,"p2p-webrtc-direct":276,"p2p-stardust":277,"p2p-circuit":290,"dag-json":297,udt:301,utp:302,unix:400,thread:406,p2p:421,ipfs:421,https:443,onion:444,onion3:445,garlic64:446,garlic32:447,tls:448,noise:454,quic:460,ws:477,wss:478,"p2p-websocket-star":479,http:480,"swhid-1-snp":496,json:512,messagepack:513,"libp2p-peer-record":769,"libp2p-relay-rsvp":770,"car-index-sorted":1024,"sha2-256-trunc254-padded":4114,"ripemd-128":4178,"ripemd-160":4179,"ripemd-256":4180,"ripemd-320":4181,x11:4352,"p256-pub":4608,"p384-pub":4609,"p521-pub":4610,"ed448-pub":4611,"x448-pub":4612,"ed25519-priv":4864,"secp256k1-priv":4865,"x25519-priv":4866,kangarootwelve:7425,"sm3-256":21325,"blake2b-8":45569,"blake2b-16":45570,"blake2b-24":45571,"blake2b-32":45572,"blake2b-40":45573,"blake2b-48":45574,"blake2b-56":45575,"blake2b-64":45576,"blake2b-72":45577,"blake2b-80":45578,"blake2b-88":45579,"blake2b-96":45580,"blake2b-104":45581,"blake2b-112":45582,"blake2b-120":45583,"blake2b-128":45584,"blake2b-136":45585,"blake2b-144":45586,"blake2b-152":45587,"blake2b-160":45588,"blake2b-168":45589,"blake2b-176":45590,"blake2b-184":45591,"blake2b-192":45592,"blake2b-200":45593,"blake2b-208":45594,"blake2b-216":45595,"blake2b-224":45596,"blake2b-232":45597,"blake2b-240":45598,"blake2b-248":45599,"blake2b-256":45600,"blake2b-264":45601,"blake2b-272":45602,"blake2b-280":45603,"blake2b-288":45604,"blake2b-296":45605,"blake2b-304":45606,"blake2b-312":45607,"blake2b-320":45608,"blake2b-328":45609,"blake2b-336":45610,"blake2b-344":45611,"blake2b-352":45612,"blake2b-360":45613,"blake2b-368":45614,"blake2b-376":45615,"blake2b-384":45616,"blake2b-392":45617,"blake2b-400":45618,"blake2b-408":45619,"blake2b-416":45620,"blake2b-424":45621,"blake2b-432":45622,"blake2b-440":45623,"blake2b-448":45624,"blake2b-456":45625,"blake2b-464":45626,"blake2b-472":45627,"blake2b-480":45628,"blake2b-488":45629,"blake2b-496":45630,"blake2b-504":45631,"blake2b-512":45632,"blake2s-8":45633,"blake2s-16":45634,"blake2s-24":45635,"blake2s-32":45636,"blake2s-40":45637,"blake2s-48":45638,"blake2s-56":45639,"blake2s-64":45640,"blake2s-72":45641,"blake2s-80":45642,"blake2s-88":45643,"blake2s-96":45644,"blake2s-104":45645,"blake2s-112":45646,"blake2s-120":45647,"blake2s-128":45648,"blake2s-136":45649,"blake2s-144":45650,"blake2s-152":45651,"blake2s-160":45652,"blake2s-168":45653,"blake2s-176":45654,"blake2s-184":45655,"blake2s-192":45656,"blake2s-200":45657,"blake2s-208":45658,"blake2s-216":45659,"blake2s-224":45660,"blake2s-232":45661,"blake2s-240":45662,"blake2s-248":45663,"blake2s-256":45664,"skein256-8":45825,"skein256-16":45826,"skein256-24":45827,"skein256-32":45828,"skein256-40":45829,"skein256-48":45830,"skein256-56":45831,"skein256-64":45832,"skein256-72":45833,"skein256-80":45834,"skein256-88":45835,"skein256-96":45836,"skein256-104":45837,"skein256-112":45838,"skein256-120":45839,"skein256-128":45840,"skein256-136":45841,"skein256-144":45842,"skein256-152":45843,"skein256-160":45844,"skein256-168":45845,"skein256-176":45846,"skein256-184":45847,"skein256-192":45848,"skein256-200":45849,"skein256-208":45850,"skein256-216":45851,"skein256-224":45852,"skein256-232":45853,"skein256-240":45854,"skein256-248":45855,"skein256-256":45856,"skein512-8":45857,"skein512-16":45858,"skein512-24":45859,"skein512-32":45860,"skein512-40":45861,"skein512-48":45862,"skein512-56":45863,"skein512-64":45864,"skein512-72":45865,"skein512-80":45866,"skein512-88":45867,"skein512-96":45868,"skein512-104":45869,"skein512-112":45870,"skein512-120":45871,"skein512-128":45872,"skein512-136":45873,"skein512-144":45874,"skein512-152":45875,"skein512-160":45876,"skein512-168":45877,"skein512-176":45878,"skein512-184":45879,"skein512-192":45880,"skein512-200":45881,"skein512-208":45882,"skein512-216":45883,"skein512-224":45884,"skein512-232":45885,"skein512-240":45886,"skein512-248":45887,"skein512-256":45888,"skein512-264":45889,"skein512-272":45890,"skein512-280":45891,"skein512-288":45892,"skein512-296":45893,"skein512-304":45894,"skein512-312":45895,"skein512-320":45896,"skein512-328":45897,"skein512-336":45898,"skein512-344":45899,"skein512-352":45900,"skein512-360":45901,"skein512-368":45902,"skein512-376":45903,"skein512-384":45904,"skein512-392":45905,"skein512-400":45906,"skein512-408":45907,"skein512-416":45908,"skein512-424":45909,"skein512-432":45910,"skein512-440":45911,"skein512-448":45912,"skein512-456":45913,"skein512-464":45914,"skein512-472":45915,"skein512-480":45916,"skein512-488":45917,"skein512-496":45918,"skein512-504":45919,"skein512-512":45920,"skein1024-8":45921,"skein1024-16":45922,"skein1024-24":45923,"skein1024-32":45924,"skein1024-40":45925,"skein1024-48":45926,"skein1024-56":45927,"skein1024-64":45928,"skein1024-72":45929,"skein1024-80":45930,"skein1024-88":45931,"skein1024-96":45932,"skein1024-104":45933,"skein1024-112":45934,"skein1024-120":45935,"skein1024-128":45936,"skein1024-136":45937,"skein1024-144":45938,"skein1024-152":45939,"skein1024-160":45940,"skein1024-168":45941,"skein1024-176":45942,"skein1024-184":45943,"skein1024-192":45944,"skein1024-200":45945,"skein1024-208":45946,"skein1024-216":45947,"skein1024-224":45948,"skein1024-232":45949,"skein1024-240":45950,"skein1024-248":45951,"skein1024-256":45952,"skein1024-264":45953,"skein1024-272":45954,"skein1024-280":45955,"skein1024-288":45956,"skein1024-296":45957,"skein1024-304":45958,"skein1024-312":45959,"skein1024-320":45960,"skein1024-328":45961,"skein1024-336":45962,"skein1024-344":45963,"skein1024-352":45964,"skein1024-360":45965,"skein1024-368":45966,"skein1024-376":45967,"skein1024-384":45968,"skein1024-392":45969,"skein1024-400":45970,"skein1024-408":45971,"skein1024-416":45972,"skein1024-424":45973,"skein1024-432":45974,"skein1024-440":45975,"skein1024-448":45976,"skein1024-456":45977,"skein1024-464":45978,"skein1024-472":45979,"skein1024-480":45980,"skein1024-488":45981,"skein1024-496":45982,"skein1024-504":45983,"skein1024-512":45984,"skein1024-520":45985,"skein1024-528":45986,"skein1024-536":45987,"skein1024-544":45988,"skein1024-552":45989,"skein1024-560":45990,"skein1024-568":45991,"skein1024-576":45992,"skein1024-584":45993,"skein1024-592":45994,"skein1024-600":45995,"skein1024-608":45996,"skein1024-616":45997,"skein1024-624":45998,"skein1024-632":45999,"skein1024-640":46e3,"skein1024-648":46001,"skein1024-656":46002,"skein1024-664":46003,"skein1024-672":46004,"skein1024-680":46005,"skein1024-688":46006,"skein1024-696":46007,"skein1024-704":46008,"skein1024-712":46009,"skein1024-720":46010,"skein1024-728":46011,"skein1024-736":46012,"skein1024-744":46013,"skein1024-752":46014,"skein1024-760":46015,"skein1024-768":46016,"skein1024-776":46017,"skein1024-784":46018,"skein1024-792":46019,"skein1024-800":46020,"skein1024-808":46021,"skein1024-816":46022,"skein1024-824":46023,"skein1024-832":46024,"skein1024-840":46025,"skein1024-848":46026,"skein1024-856":46027,"skein1024-864":46028,"skein1024-872":46029,"skein1024-880":46030,"skein1024-888":46031,"skein1024-896":46032,"skein1024-904":46033,"skein1024-912":46034,"skein1024-920":46035,"skein1024-928":46036,"skein1024-936":46037,"skein1024-944":46038,"skein1024-952":46039,"skein1024-960":46040,"skein1024-968":46041,"skein1024-976":46042,"skein1024-984":46043,"skein1024-992":46044,"skein1024-1000":46045,"skein1024-1008":46046,"skein1024-1016":46047,"skein1024-1024":46048,"poseidon-bls12_381-a2-fc1":46081,"poseidon-bls12_381-a2-fc1-sc":46082,"zeroxcert-imprint-256":52753,"fil-commitment-unsealed":61697,"fil-commitment-sealed":61698,"holochain-adr-v0":8417572,"holochain-adr-v1":8483108,"holochain-key-v0":9728292,"holochain-key-v1":9793828,"holochain-sig-v0":10645796,"holochain-sig-v1":10711332,"skynet-ns":11639056,"arweave-ns":11704592})}),Pe}var je,xt;function Co(){if(xt)return je;xt=1;const{baseTable:t}=Eo(),e=er().varintEncode,r={},n={},o={};for(const s in t){const a=s,c=t[a];r[a]=e(c);const d=a.toUpperCase().replace(/-/g,"_");n[d]=c,o[c]||(o[c]=a)}Object.freeze(r),Object.freeze(n),Object.freeze(o);const i=Object.freeze(t);return je={nameToVarint:r,constantToCode:n,nameToCode:i,codeToName:o},je}var Te,pt;function vo(){if(pt)return Te;pt=1;const t=Wt(),{concat:e}=yo,r=er(),{nameToVarint:n,constantToCode:o,nameToCode:i,codeToName:s}=Co();function a(u,h){let l;if(u instanceof Uint8Array)l=r.varintUint8ArrayEncode(u);else if(n[u])l=n[u];else throw new Error("multicodec not recognized");return e([l,h],l.length+h.length)}function c(u){return t.decode(u),u.slice(t.decode.bytes)}function d(u){const h=t.decode(u),l=s[h];if(l===void 0)throw new Error(`Code "${h}" not found`);return l}function x(u){return s[u]}function g(u){const h=i[u];if(h===void 0)throw new Error(`Codec "${u}" not found`);return h}function N(u){return t.decode(u)}function V(u){const h=n[u];if(h===void 0)throw new Error(`Codec "${u}" not found`);return h}function b(u){return r.varintEncode(u)}function f(u){return d(u)}function C(u){return x(u)}function y(u){return g(u)}function w(u){return N(u)}function k(u){return V(u)}function p(u){return Array.from(b(u))}return Te={addPrefix:a,rmPrefix:c,getNameFromData:d,getNameFromCode:x,getCodeFromName:g,getCodeFromData:N,getVarintFromName:V,getVarintFromCode:b,getCodec:f,getName:C,getNumber:y,getCode:w,getCodeVarint:k,getVarint:p,...o,nameToVarint:n,nameToCode:i,codeToName:s},Te}var So=vo();const Ao=jt(So);function _o(t,e){const r=new Uint8Array(t.length+1);return r[0]=2+(e[e.length-1]&1),r.set(t,1),r}function $o(t){const e=t.slice(0,t.length/2),r=t.slice(t.length/2,t.length),n=se.fromString(e,"base16"),o=se.fromString(r,"base16"),i=_o(n,o);return se.toString(i,"base16")}function Oo(t){return t.slice(2)}function Po(t,e){const r=se.fromString(e,"base16");return jo(t,r)}function jo(t,e){const r=Ao.addPrefix(t,e);return`did:key:${M.encode(r)}`}const To="eip155",No="1";var Ne,yt;function Uo(){return yt||(yt=1,Ne=function t(e){if(typeof e=="number"&&isNaN(e))throw new Error("NaN is not allowed");if(typeof e=="number"&&!isFinite(e))throw new Error("Infinity is not allowed");return e===null||typeof e!="object"?JSON.stringify(e):e.toJSON instanceof Function?t(e.toJSON()):Array.isArray(e)?`[${e.reduce((o,i,s)=>`${o}${s===0?"":","}${t(i===void 0||typeof i=="symbol"?null:i)}`,"")}]`:`{${Object.keys(e).sort().reduce((n,o)=>{if(e[o]===void 0||typeof e[o]=="symbol")return n;const i=n.length===0?"":",";return`${n}${i}${t(o)}:${t(e[o])}`},"")}}`}),Ne}var Mo=Uo();const zo=jt(Mo);function Fo(t){if(t instanceof Uint8Array&&t.constructor.name==="Uint8Array")return t;if(t instanceof ArrayBuffer)return new Uint8Array(t);if(ArrayBuffer.isView(t))return new Uint8Array(t.buffer,t.byteOffset,t.byteLength);throw new Error("Unknown type, must be binary type")}function Bo(t){return new TextEncoder().encode(t)}function Ro(t){return new TextDecoder().decode(t)}function qo(t,e){if(t.length>=255)throw new TypeError("Alphabet too long");for(var r=new Uint8Array(256),n=0;n<r.length;n++)r[n]=255;for(var o=0;o<t.length;o++){var i=t.charAt(o),s=i.charCodeAt(0);if(r[s]!==255)throw new TypeError(i+" is ambiguous");r[s]=o}var a=t.length,c=t.charAt(0),d=Math.log(a)/Math.log(256),x=Math.log(256)/Math.log(a);function g(b){if(b instanceof Uint8Array||(ArrayBuffer.isView(b)?b=new Uint8Array(b.buffer,b.byteOffset,b.byteLength):Array.isArray(b)&&(b=Uint8Array.from(b))),!(b instanceof Uint8Array))throw new TypeError("Expected Uint8Array");if(b.length===0)return"";for(var f=0,C=0,y=0,w=b.length;y!==w&&b[y]===0;)y++,f++;for(var k=(w-y)*x+1>>>0,p=new Uint8Array(k);y!==w;){for(var u=b[y],h=0,l=k-1;(u!==0||h<C)&&l!==-1;l--,h++)u+=256*p[l]>>>0,p[l]=u%a>>>0,u=u/a>>>0;if(u!==0)throw new Error("Non-zero carry");C=h,y++}for(var m=k-C;m!==k&&p[m]===0;)m++;for(var z=c.repeat(f);m<k;++m)z+=t.charAt(p[m]);return z}function N(b){if(typeof b!="string")throw new TypeError("Expected String");if(b.length===0)return new Uint8Array;var f=0;if(b[f]!==" "){for(var C=0,y=0;b[f]===c;)C++,f++;for(var w=(b.length-f)*d+1>>>0,k=new Uint8Array(w);b[f];){var p=r[b.charCodeAt(f)];if(p===255)return;for(var u=0,h=w-1;(p!==0||u<y)&&h!==-1;h--,u++)p+=a*k[h]>>>0,k[h]=p%256>>>0,p=p/256>>>0;if(p!==0)throw new Error("Non-zero carry");y=u,f++}if(b[f]!==" "){for(var l=w-y;l!==w&&k[l]===0;)l++;for(var m=new Uint8Array(C+(w-l)),z=C;l!==w;)m[z++]=k[l++];return m}}}function V(b){var f=N(b);if(f)return f;throw new Error(`Non-${e} character`)}return{encode:g,decodeUnsafe:N,decode:V}}var Io=qo,Ko=Io;class Vo{constructor(e,r,n){v(this,"name");v(this,"prefix");v(this,"baseEncode");this.name=e,this.prefix=r,this.baseEncode=n}encode(e){if(e instanceof Uint8Array)return`${this.prefix}${this.baseEncode(e)}`;throw Error("Unknown type, must be binary type")}}class Lo{constructor(e,r,n){v(this,"name");v(this,"prefix");v(this,"baseDecode");v(this,"prefixCodePoint");this.name=e,this.prefix=r;const o=r.codePointAt(0);if(o===void 0)throw new Error("Invalid prefix character");this.prefixCodePoint=o,this.baseDecode=n}decode(e){if(typeof e=="string"){if(e.codePointAt(0)!==this.prefixCodePoint)throw Error(`Unable to decode multibase string ${JSON.stringify(e)}, ${this.name} decoder only supports inputs prefixed with ${this.prefix}`);return this.baseDecode(e.slice(this.prefix.length))}else throw Error("Can only multibase decode strings")}or(e){return tr(this,e)}}class Jo{constructor(e){v(this,"decoders");this.decoders=e}or(e){return tr(this,e)}decode(e){const r=e[0],n=this.decoders[r];if(n!=null)return n.decode(e);throw RangeError(`Unable to decode multibase string ${JSON.stringify(e)}, only inputs prefixed with ${Object.keys(this.decoders)} are supported`)}}function tr(t,e){return new Jo({...t.decoders??{[t.prefix]:t},...e.decoders??{[e.prefix]:e}})}class Wo{constructor(e,r,n,o){v(this,"name");v(this,"prefix");v(this,"baseEncode");v(this,"baseDecode");v(this,"encoder");v(this,"decoder");this.name=e,this.prefix=r,this.baseEncode=n,this.baseDecode=o,this.encoder=new Vo(e,r,n),this.decoder=new Lo(e,r,o)}encode(e){return this.encoder.encode(e)}decode(e){return this.decoder.decode(e)}}function he({name:t,prefix:e,encode:r,decode:n}){return new Wo(t,e,r,n)}function ne({name:t,prefix:e,alphabet:r}){const{encode:n,decode:o}=Ko(r,t);return he({prefix:e,name:t,encode:n,decode:i=>Fo(o(i))})}function Ho(t,e,r,n){let o=t.length;for(;t[o-1]==="=";)--o;const i=new Uint8Array(o*r/8|0);let s=0,a=0,c=0;for(let d=0;d<o;++d){const x=e[t[d]];if(x===void 0)throw new SyntaxError(`Non-${n} character`);a=a<<r|x,s+=r,s>=8&&(s-=8,i[c++]=255&a>>s)}if(s>=r||(255&a<<8-s)!==0)throw new SyntaxError("Unexpected end of data");return i}function Go(t,e,r){const n=e[e.length-1]==="=",o=(1<<r)-1;let i="",s=0,a=0;for(let c=0;c<t.length;++c)for(a=a<<8|t[c],s+=8;s>r;)s-=r,i+=e[o&a>>s];if(s!==0&&(i+=e[o&a<<r-s]),n)for(;(i.length*r&7)!==0;)i+="=";return i}function Xo(t){const e={};for(let r=0;r<t.length;++r)e[t[r]]=r;return e}function A({name:t,prefix:e,bitsPerChar:r,alphabet:n}){const o=Xo(n);return he({prefix:e,name:t,encode(i){return Go(i,n,r)},decode(i){return Ho(i,o,r,t)}})}const Qo=A({prefix:"b",name:"base32",alphabet:"abcdefghijklmnopqrstuvwxyz234567",bitsPerChar:5}),Yo=A({prefix:"B",name:"base32upper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567",bitsPerChar:5}),Zo=A({prefix:"c",name:"base32pad",alphabet:"abcdefghijklmnopqrstuvwxyz234567=",bitsPerChar:5}),ei=A({prefix:"C",name:"base32padupper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567=",bitsPerChar:5}),ti=A({prefix:"v",name:"base32hex",alphabet:"0123456789abcdefghijklmnopqrstuv",bitsPerChar:5}),ri=A({prefix:"V",name:"base32hexupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV",bitsPerChar:5}),ni=A({prefix:"t",name:"base32hexpad",alphabet:"0123456789abcdefghijklmnopqrstuv=",bitsPerChar:5}),oi=A({prefix:"T",name:"base32hexpadupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV=",bitsPerChar:5}),ii=A({prefix:"h",name:"base32z",alphabet:"ybndrfg8ejkmcpqxot1uwisza345h769",bitsPerChar:5}),si=Object.freeze(Object.defineProperty({__proto__:null,base32:Qo,base32hex:ti,base32hexpad:ni,base32hexpadupper:oi,base32hexupper:ri,base32pad:Zo,base32padupper:ei,base32upper:Yo,base32z:ii},Symbol.toStringTag,{value:"Module"})),ai=ne({prefix:"k",name:"base36",alphabet:"0123456789abcdefghijklmnopqrstuvwxyz"}),ci=ne({prefix:"K",name:"base36upper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"}),ui=Object.freeze(Object.defineProperty({__proto__:null,base36:ai,base36upper:ci},Symbol.toStringTag,{value:"Module"})),bi=ne({name:"base58btc",prefix:"z",alphabet:"123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"}),di=ne({name:"base58flickr",prefix:"Z",alphabet:"123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ"}),fi=Object.freeze(Object.defineProperty({__proto__:null,base58btc:bi,base58flickr:di},Symbol.toStringTag,{value:"Module"})),li=A({prefix:"m",name:"base64",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",bitsPerChar:6}),Di=A({prefix:"M",name:"base64pad",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",bitsPerChar:6}),hi=A({prefix:"u",name:"base64url",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_",bitsPerChar:6}),xi=A({prefix:"U",name:"base64urlpad",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_=",bitsPerChar:6}),pi=Object.freeze(Object.defineProperty({__proto__:null,base64:li,base64pad:Di,base64url:hi,base64urlpad:xi},Symbol.toStringTag,{value:"Module"}));function yi(t=0){return new Uint8Array(t)}const gi=ne({prefix:"9",name:"base10",alphabet:"0123456789"}),wi=Object.freeze(Object.defineProperty({__proto__:null,base10:gi},Symbol.toStringTag,{value:"Module"})),ki=A({prefix:"f",name:"base16",alphabet:"0123456789abcdef",bitsPerChar:4}),mi=A({prefix:"F",name:"base16upper",alphabet:"0123456789ABCDEF",bitsPerChar:4}),Ei=Object.freeze(Object.defineProperty({__proto__:null,base16:ki,base16upper:mi},Symbol.toStringTag,{value:"Module"})),Ci=A({prefix:"0",name:"base2",alphabet:"01",bitsPerChar:1}),vi=Object.freeze(Object.defineProperty({__proto__:null,base2:Ci},Symbol.toStringTag,{value:"Module"})),rr=Array.from("🚀🪐☄🛰🌌🌑🌒🌓🌔🌕🌖🌗🌘🌍🌏🌎🐉☀💻🖥💾💿😂❤😍🤣😊🙏💕😭😘👍😅👏😁🔥🥰💔💖💙😢🤔😆🙄💪😉☺👌🤗💜😔😎😇🌹🤦🎉💞✌✨🤷😱😌🌸🙌😋💗💚😏💛🙂💓🤩😄😀🖤😃💯🙈👇🎶😒🤭❣😜💋👀😪😑💥🙋😞😩😡🤪👊🥳😥🤤👉💃😳✋😚😝😴🌟😬🙃🍀🌷😻😓⭐✅🥺🌈😈🤘💦✔😣🏃💐☹🎊💘😠☝😕🌺🎂🌻😐🖕💝🙊😹🗣💫💀👑🎵🤞😛🔴😤🌼😫⚽🤙☕🏆🤫👈😮🙆🍻🍃🐶💁😲🌿🧡🎁⚡🌞🎈❌✊👋😰🤨😶🤝🚶💰🍓💢🤟🙁🚨💨🤬✈🎀🍺🤓😙💟🌱😖👶🥴▶➡❓💎💸⬇😨🌚🦋😷🕺⚠🙅😟😵👎🤲🤠🤧📌🔵💅🧐🐾🍒😗🤑🌊🤯🐷☎💧😯💆👆🎤🙇🍑❄🌴💣🐸💌📍🥀🤢👅💡💩👐📸👻🤐🤮🎼🥵🚩🍎🍊👼💍📣🥂"),Si=rr.reduce((t,e,r)=>(t[r]=e,t),[]),Ai=rr.reduce((t,e,r)=>{const n=e.codePointAt(0);if(n==null)throw new Error(`Invalid character: ${e}`);return t[n]=r,t},[]);function _i(t){return t.reduce((e,r)=>(e+=Si[r],e),"")}function $i(t){const e=[];for(const r of t){const n=r.codePointAt(0);if(n==null)throw new Error(`Invalid character: ${r}`);const o=Ai[n];if(o==null)throw new Error(`Non-base256emoji character: ${r}`);e.push(o)}return new Uint8Array(e)}const Oi=he({prefix:"🚀",name:"base256emoji",encode:_i,decode:$i}),Pi=Object.freeze(Object.defineProperty({__proto__:null,base256emoji:Oi},Symbol.toStringTag,{value:"Module"})),ji=A({prefix:"7",name:"base8",alphabet:"01234567",bitsPerChar:3}),Ti=Object.freeze(Object.defineProperty({__proto__:null,base8:ji},Symbol.toStringTag,{value:"Module"})),Ni=he({prefix:"\0",name:"identity",encode:t=>Ro(t),decode:t=>Bo(t)}),Ui=Object.freeze(Object.defineProperty({__proto__:null,identity:Ni},Symbol.toStringTag,{value:"Module"})),gt={...Ui,...vi,...Ti,...wi,...Ei,...si,...ui,...fi,...pi,...Pi};function nr(t,e,r,n){return{name:t,prefix:e,encoder:{name:t,prefix:e,encode:r},decoder:{decode:n}}}const wt=nr("utf8","u",t=>"u"+new TextDecoder("utf8").decode(t),t=>new TextEncoder().encode(t.substring(1))),Ue=nr("ascii","a",t=>{let e="a";for(let r=0;r<t.length;r++)e+=String.fromCharCode(t[r]);return e},t=>{t=t.substring(1);const e=yi(t.length);for(let r=0;r<t.length;r++)e[r]=t.charCodeAt(r);return e}),Mi={utf8:wt,"utf-8":wt,hex:gt.base16,latin1:Ue,ascii:Ue,binary:Ue,...gt};function zi(t,e="utf8"){const r=Mi[e];if(r==null)throw new Error(`Unsupported encoding "${e}"`);return r.decoder.decode(`${r.prefix}${t}`)}const W={toString:Yt,fromString:Zt,concat:Gt};function He(t){return W.toString(t,"base64url")}function Fi(t){const e=t.replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"");return W.fromString(e,"base64url")}function kt(t){return He(W.fromString(t))}function mt(t){return W.toString(t,"base16")}function or({r:t,s:e,recoveryParam:r},n){const o=new Uint8Array(n?65:64);if(o.set(W.fromString(t,"base16"),0),o.set(W.fromString(e,"base16"),32),n){if(typeof r>"u")throw new Error("Signer did not return a recoveryParam");o[64]=r}return He(o)}function Bi(t){const e=Fi(t);if(e.length<64||e.length>65)throw new TypeError(`Wrong size for signature. Expected 64 or 65 bytes, but got ${e.length}`);const r=mt(e.slice(0,32)),n=mt(e.slice(32,64)),o=e.length===65?e[64]:void 0;return{r,s:n,recoveryParam:o}}function Ge(t){return typeof t=="object"&&"r"in t&&"s"in t}function Ri(){return function(e,r){try{return Promise.resolve(r(e)).then(function(n){return Ge(n)?or(n):n})}catch(n){return Promise.reject(n)}}}function Et(t){return function(r,n){try{return Promise.resolve(n(r)).then(function(o){if(Ge(o))return or(o,t);if(t&&typeof Bi(o).recoveryParam>"u")throw new Error("not_supported: ES256K-R not supported when signer doesn't provide a recovery param");return o})}catch(o){return Promise.reject(o)}}}function Ct(){return function(e,r){try{return Promise.resolve(r(e)).then(function(n){if(Ge(n))throw new Error("invalid_config: expected a signer function that returns a string instead of signature object");return n})}catch(n){return Promise.reject(n)}}}const qi={ES256:Ri(),ES256K:Et(),"ES256K-R":Et(!0),Ed25519:Ct(),EdDSA:Ct()};function Ii(t){const e=qi[t];if(!e)throw new Error(`not_supported: Unsupported algorithm ${t}`);return e}typeof Symbol<"u"&&(Symbol.iterator||(Symbol.iterator=Symbol("Symbol.iterator")));function j(t,e,r){if(!t.s){if(r instanceof ue)if(r.s)e&1&&(e=r.s),r=r.v;else{r.o=j.bind(null,t,e);return}if(r&&r.then){r.then(j.bind(null,t,e),j.bind(null,t,2));return}t.s=e,t.v=r;const n=t.o;n&&n(t)}}const ue=function(){function t(){}return t.prototype.then=function(e,r){const n=new t,o=this.s;if(o){const i=o&1?e:r;if(i){try{j(n,1,i(this.v))}catch(s){j(n,2,s)}return n}else return this}return this.o=function(i){try{const s=i.v;i.s&1?j(n,1,e?e(s):s):r?j(n,1,r(s)):j(n,2,s)}catch(s){j(n,2,s)}},n},t}();function Ki(t){return t instanceof ue&&t.s&1}function Vi(t,e,r){var n=-1,o,i;function s(a){try{for(;++n<t.length;)if(a=e(n),a&&a.then)if(Ki(a))a=a.v;else{a.then(s,i||(i=j.bind(null,o=new ue,2)));return}o?j(o,1,a):o=a}catch(c){j(o||(o=new ue),2,c)}}return s(),o}const Li=function(t,{expiresIn:e,canonicalize:r},n){try{if(n.length===0)throw new Error("invalid_argument: must provide one or more issuers");let o=t,i="";const s=Vi(n,function(a){const c=n[a],d={typ:"JWT",alg:c.alg};return a!==0&&(d.cty="JWT"),Promise.resolve(ir(o,{...c,canonicalize:r,expiresIn:e},d)).then(function(x){i=x,o={jwt:i}})});return Promise.resolve(s&&s.then?s.then(function(){return i}):i)}catch(o){return Promise.reject(o)}},ir=function(t,{issuer:e,signer:r,alg:n,expiresIn:o,canonicalize:i},s={}){try{if(!r)throw new Error("missing_signer: No Signer functionality has been configured");if(!e)throw new Error("missing_issuer: No issuing DID has been configured");s.typ||(s.typ="JWT"),s.alg||(s.alg=n);const a={iat:Math.floor(Date.now()/1e3),exp:void 0};if(o)if(typeof o=="number")a.exp=(t.nbf||a.iat)+Math.floor(o);else throw new Error("invalid_argument: JWT expiresIn is not a number");const c={...a,...t,iss:e};return Ji(c,r,s,{canonicalize:i})}catch(a){return Promise.reject(a)}},Ji=function(t,e,r={},n={}){try{r.alg||(r.alg=Wi);const o=typeof t=="string"?t:vt(t,n.canonicalize),i=[vt(r,n.canonicalize),o].join("."),s=Ii(r.alg);return Promise.resolve(s(i,e)).then(function(a){return[i,a].join(".")})}catch(o){return Promise.reject(o)}},Wi="ES256K";function vt(t,e=!1){return kt(e?zo(t):JSON.stringify(t))}typeof Symbol<"u"&&(Symbol.iterator||(Symbol.iterator=Symbol("Symbol.iterator")));const St="ES256K",At="https://www.w3.org/2018/credentials/v1",_t="VerifiableCredential",Hi=["evidence","termsOfUse","refreshService","credentialSchema","credentialStatus"];function R(t){return Array.isArray(t)?t:[t]}function Be(t){return Array.isArray(t)?t.map(e=>Be(e)):t instanceof Date?new Date(t.getTime()):t&&typeof t=="object"?Object.getOwnPropertyNames(t).reduce((e,r)=>(Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r)),e[r]=Be(t[r]),e),Object.create(Object.getPrototypeOf(t))):t}function $t(t){return t!=null}function Gi(t,e=!0){var s,a,c,d,x;if(Array.isArray(t.credentialSubject))throw Error("credentialSubject of type array not supported");const r=Be({vc:{...t.vc},...t});r.vc=r.vc;const n={...t.credentialSubject,...(s=t.vc)==null?void 0:s.credentialSubject};t.sub||(r.sub=(a=t.credentialSubject)==null?void 0:a.id,e&&delete n.id);const o=[...R(t.context),...R(t["@context"]),...R((c=t.vc)==null?void 0:c["@context"])].filter($t);r.vc["@context"]=[...new Set(o)],e&&(delete r.context,delete r["@context"]);const i=[...R(t.type),...R((d=t.vc)==null?void 0:d.type)].filter($t);if(r.vc.type=[...new Set(i)],e&&delete r.type,t.id&&Object.getOwnPropertyNames(t).indexOf("jti")===-1&&(r.jti=t.id,e&&delete r.id),t.issuanceDate&&Object.getOwnPropertyNames(t).indexOf("nbf")===-1){const g=Date.parse(t.issuanceDate);isNaN(g)||(r.nbf=Math.floor(g/1e3),e&&delete r.issuanceDate)}if(t.expirationDate&&Object.getOwnPropertyNames(t).indexOf("exp")===-1){const g=Date.parse(t.expirationDate);isNaN(g)||(r.exp=Math.floor(g/1e3),e&&delete r.expirationDate)}t.issuer&&Object.getOwnPropertyNames(t).indexOf("iss")===-1&&(typeof t.issuer=="object"?(r.iss=(x=t.issuer)==null?void 0:x.id,e&&(delete r.issuer.id,Object.keys(r.issuer).length===0&&delete r.issuer)):typeof t.issuer=="string"&&(r.iss=t.iss||""+t.issuer,e&&delete r.issuer)),r.vc.credentialSubject=n,e&&delete r.credentialSubject;for(const g of Hi)t[g]&&(r.vc[g]||(r.vc[g]=t[g]),e&&delete r[g]);return r}const Z={SCHEMA_ERROR:"schema_error"};function Xi(t){return t&&!isNaN(t)&&Object.prototype.toString.call(t)==="[object Date]"}function Re(t){if(typeof t=="number"){if(!(Number.isInteger(t)&&t<1e11))throw new TypeError(`${Z.SCHEMA_ERROR}: "${t}" is not a unix timestamp in seconds`)}else if(typeof t=="string")Re(Math.floor(new Date(t).valueOf()/1e3));else if(!Xi(t))throw new TypeError(`${Z.SCHEMA_ERROR}: "${t}" is not a valid time`)}function Qi(t){const e=R(t);if(e.length<1||e.indexOf(At)===-1)throw new TypeError(`${Z.SCHEMA_ERROR}: @context is missing default context "${At}"`)}function Yi(t){const e=R(t);if(e.length<1||e.indexOf(_t)===-1)throw new TypeError(`${Z.SCHEMA_ERROR}: type is missing default "${_t}"`)}function Zi(t){if(Object.keys(t).length===0)throw new TypeError(`${Z.SCHEMA_ERROR}: credentialSubject must not be empty`)}const es=function(t,e,r={}){var n,o;try{const i={iat:void 0,...Gi(t,r.removeOriginalFields)};if(ts(i),Array.isArray(e)){const s=e[0].did,a=[];for(const c of e){if(c.did!==s)throw new Error("All issuers must be the same did to comply with the Verifiable Conditions spec");a.push({issuer:c.did||i.iss||"",signer:c.signer,alg:c.alg||((o=r.header)==null?void 0:o.alg)||St})}return Promise.resolve(Li(i,{...r},a))}else return Promise.resolve(ir(i,{...r,issuer:e.did||i.iss||"",signer:e.signer},{...r.header,alg:e.alg||((n=r.header)==null?void 0:n.alg)||St}))}catch(i){return Promise.reject(i)}};function ts(t){Qi(t.vc["@context"]),Yi(t.vc.type),Zi(t.vc.credentialSubject),t.nbf&&Re(t.nbf),t.exp&&Re(t.exp)}async function rs(t,e,r,n){const o={sub:n.did,vc:{"@context":["https://www.w3.org/2018/credentials/v1"],type:["VerifiableCredential"],credentialSubject:{chainId:t,networkId:e,address:r}}};return await es(o,n)}var be,L,de,ee,te,qe;const U=class U{constructor(){$(this,te);$(this,ee);F(this,ee,new Promise((e,r)=>{const n=indexedDB.open(D(U,be),1);n.onupgradeneeded=()=>{n.result.createObjectStore(D(U,L))},n.onsuccess=()=>e(n.result),n.onerror=()=>r(n.error)}))}async saveKeyPair(e){const n=(await P(this,te,qe).call(this)).put(e,D(U,de));return new Promise((o,i)=>{n.onsuccess=()=>{o()},n.onerror=()=>{i(new Error("Failed to save key pair"))}})}async loadKeyPair(){const r=(await P(this,te,qe).call(this,"readonly")).getAll();return new Promise((n,o)=>{r.onsuccess=()=>{const i=r.result.length?r.result[0]:void 0;n(i)},r.onerror=()=>{o(new Error("Failed to load key pair"))}})}};be=new WeakMap,L=new WeakMap,de=new WeakMap,ee=new WeakMap,te=new WeakSet,qe=async function(e="readwrite"){return(await D(this,ee)).transaction(D(U,L),e).objectStore(D(U,L))},$(U,be,"browserKeyDB"),$(U,L,"keyPairs"),$(U,de,"keyPair");let Ot=U;const Me=Dr(["connect","crypto"]);function ns(t){return Array.prototype.map.call(new Uint8Array(t),e=>("00"+e.toString(16)).slice(-2)).join("")}var T,O,q,I,J,E,sr,ar,cr,Ie,Ke,ur,Ve,Le,br;const B=class B{constructor(e){$(this,E);$(this,T);$(this,O);$(this,q);$(this,I);$(this,J);$(this,Ve,async(...e)=>(await D(this,T)).sign(...e));$(this,Le,async(...e)=>(await D(this,T)).verify(...e));F(this,q,e),F(this,T,P(this,E,sr).call(this)),F(this,I,P(this,E,ar).call(this))}async getBearerToken(e,r,n=!1){const o=await this.getIssuer();return(n||!D(this,J))&&F(this,J,await rs(Number(No),To,r||await D(this,I),o)),D(this,J)}did(){return D(this,I)}async regenerateDid(){F(this,O,await P(this,E,Ie).call(this)),await D(this,q).saveKeyPair(await P(this,E,Ke).call(this))}async sign(e){var r;if((r=D(this,O))!=null&&r.privateKey){const n=typeof e=="string"?P(this,E,br).call(this,e):e,i=await(await D(this,T)).sign(B.signAlgorithm,D(this,O).privateKey,n.buffer);return new Uint8Array(i)}else throw new Error("No private key available")}async getIssuer(){var e;if(!((e=D(this,O))!=null&&e.privateKey))throw new Error("No private key available");return{did:await D(this,I),signer:async r=>{const n=await this.sign(typeof r=="string"?new TextEncoder().encode(r):r);return He(n)},alg:"ES256"}}};T=new WeakMap,O=new WeakMap,q=new WeakMap,I=new WeakMap,J=new WeakMap,E=new WeakSet,sr=function(){return new Promise((e,r)=>{var n;typeof window>"u"?lr(()=>import("node:crypto"),[],import.meta.url).then(o=>{e(o.webcrypto.subtle)}).catch(r):((n=window.crypto)!=null&&n.subtle||r(new Error("Crypto module not available")),e(window.crypto.subtle))})},ar=async function(){const e=await D(this,q).loadKeyPair();e?(F(this,O,await P(this,E,ur).call(this,e)),Me.debug("Found key pair")):(F(this,O,await P(this,E,Ie).call(this)),Me.debug("Created key pair"),await D(this,q).saveKeyPair(await P(this,E,Ke).call(this)));const r=await P(this,E,cr).call(this);return Me.debug("Connect DID:",r),r},cr=async function(){if(!D(this,O))throw new Error("No key pair available");const r=await(await D(this,T)).exportKey("raw",D(this,O).publicKey),n="p256-pub",o=Oo(ns(r)),i=$o(o);return Po(n,i)},Ie=async function(){return await(await D(this,T)).generateKey(B.algorithm,!0,["sign","verify"])},Ke=async function(){if(!D(this,O))throw new Error("No key pair available");const e=await D(this,T);return{publicKey:await e.exportKey("jwk",D(this,O).publicKey),privateKey:await e.exportKey("jwk",D(this,O).privateKey)}},ur=async function(e){const r=await D(this,T);return{publicKey:await r.importKey("jwk",e.publicKey,B.algorithm,!0,["verify"]),privateKey:await r.importKey("jwk",e.privateKey,B.algorithm,!0,["sign"])}},Ve=new WeakMap,Le=new WeakMap,br=function(e){return zi(e,"utf-8")},v(B,"algorithm",{name:"ECDSA",namedCurve:"P-256"}),v(B,"signAlgorithm",{name:"ECDSA",namedCurve:"P-256",hash:"SHA-256"});let Pt=B;export{vs as BaseStorage,Ot as BrowserKeyStorage,Pt as ConnectCrypto,js as RENOWN_CHAIN_ID,Ts as RENOWN_NETWORK_ID,Ns as RENOWN_URL,Ss as Renown,ws as addExternalPackage,As as getChain,_s as getEnsInfo,ks as getHMRModule,$s as initRenownBrowser,Os as parsePkhDid,ms as removeExternalPackage,Es as subscribeExternalPackages};
16
- //# sourceMappingURL=index.B-cqc0my.js.map
16
+ //# sourceMappingURL=index.D0SCSRci.js.map