System.register(["proxy-compare"],function(D){"use strict";var W,K;return{setters:[function(O){W=O.markToTrack,K=O.getUntracked}],execute:function(){D({getVersion:_,proxy:U,ref:L,snapshot:B,subscribe:q});const O=c=>typeof c=="object"&&c!==null,f=new WeakMap,E=new WeakSet,T=(c=Object.is,l=(t,w)=>new Proxy(t,w),v=t=>O(t)&&!E.has(t)&&(Array.isArray(t)||!(Symbol.iterator in t))&&!(t instanceof WeakMap)&&!(t instanceof WeakSet)&&!(t instanceof Error)&&!(t instanceof Number)&&!(t instanceof Date)&&!(t instanceof String)&&!(t instanceof RegExp)&&!(t instanceof ArrayBuffer),P=t=>{switch(t.status){case"fulfilled":return t.value;case"rejected":throw t.reason;default:throw t}},u=new WeakMap,d=(t,w,g=P)=>{const s=u.get(t);if((s==null?void 0:s[0])===w)return s[1];const a=Array.isArray(t)?[]:Object.create(Object.getPrototypeOf(t));return W(a,!0),u.set(t,[w,a]),Reflect.ownKeys(t).forEach(k=>{if(Object.getOwnPropertyDescriptor(a,k))return;const y=Reflect.get(t,k),j={value:y,enumerable:!0,configurable:!0};if(E.has(y))W(y,!1);else if(y instanceof Promise)delete j.value,j.get=()=>g(y);else if(f.has(y)){const[i,m]=f.get(y);j.value=d(i,m(),g)}Object.defineProperty(a,k,j)}),Object.preventExtensions(a)},p=new WeakMap,b=[1,1],x=t=>{if(!O(t))throw new Error("object required");const w=p.get(t);if(w)return w;let g=b[0];const s=new Set,a=(n,e=++b[0])=>{g!==e&&(g=e,s.forEach(r=>r(n,e)))};let k=b[1];const y=(n=++b[1])=>(k!==n&&!s.size&&(k=n,i.forEach(([e])=>{const r=e[1](n);r>g&&(g=r)})),g),j=n=>(e,r)=>{const o=[...e];o[1]=[n,...o[1]],a(o,r)},i=new Map,m=(n,e)=>{if(s.size){const r=e[3](j(n));i.set(n,[e,r])}else i.set(n,[e])},V=n=>{var e;const r=i.get(n);r&&(i.delete(n),(e=r[1])==null||e.call(r))},N=n=>(s.add(n),s.size===1&&i.forEach(([e,r],o)=>{const M=e[3](j(o));i.set(o,[e,M])}),()=>{s.delete(n),s.size===0&&i.forEach(([e,r],o)=>{r&&(r(),i.set(o,[e]))})}),z=Array.isArray(t)?[]:Object.create(Object.getPrototypeOf(t)),R=l(z,{deleteProperty(n,e){const r=Reflect.get(n,e);V(e);const o=Reflect.deleteProperty(n,e);return o&&a(["delete",[e],r]),o},set(n,e,r,o){const M=Reflect.has(n,e),S=Reflect.get(n,e,o);if(M&&(c(S,r)||p.has(r)&&c(S,p.get(r))))return!0;V(e),O(r)&&(r=K(r)||r);let A=r;if(r instanceof Promise)r.then(h=>{r.status="fulfilled",r.value=h,a(["resolve",[e],h])}).catch(h=>{r.status="rejected",r.reason=h,a(["reject",[e],h])});else{!f.has(r)&&v(r)&&(A=x(r));const h=!E.has(A)&&f.get(A);h&&m(e,h)}return Reflect.set(n,e,A,o),a(["set",[e],r,S]),!0}});p.set(t,R);const C=[z,y,d,N];return f.set(R,C),Reflect.ownKeys(t).forEach(n=>{const e=Object.getOwnPropertyDescriptor(t,n);"value"in e&&(R[n]=t[n],delete e.value,delete e.writable),Object.defineProperty(z,n,e)}),R})=>[x,f,E,c,l,v,P,u,d,p,b],[F]=T();function U(c={}){return F(c)}function _(c){const l=f.get(c);return l==null?void 0:l[1]()}function q(c,l,v){const P=f.get(c);let u;const d=[],p=P[3];let b=!1;const x=p(t=>{if(d.push(t),v){l(d.splice(0));return}u||(u=Promise.resolve().then(()=>{u=void 0,b&&l(d.splice(0))}))});return b=!0,()=>{b=!1,x()}}function B(c,l){const v=f.get(c),[P,u,d]=v;return d(P,u(),l)}function L(c){return E.add(c),c}const G=D("unstable_buildProxyFunction",T)}}});
