@tanstack/query-devtools 5.105.3 → 5.106.0

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 (44) hide show
  1. package/build/Devtools-C6d4y1zP.js +1270 -0
  2. package/build/Devtools-C6d4y1zP.js.map +1 -0
  3. package/build/{Devtools-DICxXjAp.js → Devtools-DN7p-sdp.js} +2866 -524
  4. package/build/{Devtools-2V_Pd-w1.cjs → Devtools-DwGQtvng.cjs} +2844 -502
  5. package/build/Devtools-he_mAvFk.cjs +1269 -0
  6. package/build/{DevtoolsComponent-CLOdqERu.js → DevtoolsComponent-CJQXyYNJ.js} +3 -2
  7. package/build/DevtoolsComponent-D4pZpbHT.cjs +2 -0
  8. package/build/{DevtoolsComponent-BAslf3AU.cjs → DevtoolsComponent-D8sLZqb7.cjs} +3 -2
  9. package/build/{DevtoolsComponent-D1MmpObN.js → DevtoolsComponent-DQLY23gz.js} +3 -2
  10. package/build/{DevtoolsComponent-D1MmpObN.js.map → DevtoolsComponent-DQLY23gz.js.map} +1 -1
  11. package/build/DevtoolsPanelComponent-BLDfq2ww.cjs +2 -0
  12. package/build/{DevtoolsPanelComponent-BZiLbaMl.js → DevtoolsPanelComponent-CXpcIZT1.js} +3 -2
  13. package/build/{DevtoolsPanelComponent-CRFy_L77.js → DevtoolsPanelComponent-CmWcNhgP.js} +3 -2
  14. package/build/{DevtoolsPanelComponent-CRFy_L77.js.map → DevtoolsPanelComponent-CmWcNhgP.js.map} +1 -1
  15. package/build/{DevtoolsPanelComponent-BIzP-MqF.cjs → DevtoolsPanelComponent-Dpyndu31.cjs} +3 -2
  16. package/build/dev.cjs +4 -3
  17. package/build/dev.js +4 -3
  18. package/build/index.cjs +2 -1
  19. package/build/index.d.cts +1 -0
  20. package/build/index.d.cts.map +1 -1
  21. package/build/index.d.ts +1 -0
  22. package/build/index.d.ts.map +1 -1
  23. package/build/index.js +2 -1
  24. package/build/index.js.map +1 -1
  25. package/build/{utils-CiEaQT28.cjs → utils-CzP8C7c0.cjs} +170 -51
  26. package/build/{utils-CsIEjnKb.js → utils-D7iZi04l.js} +147 -52
  27. package/build/utils-DC2pN79q.js +3 -0
  28. package/build/utils-DC2pN79q.js.map +1 -0
  29. package/build/utils-DJl-N7L2.cjs +2 -0
  30. package/package.json +4 -3
  31. package/src/Devtools.tsx +75 -165
  32. package/src/Explorer.tsx +349 -28
  33. package/src/VirtualList.tsx +105 -0
  34. package/src/explorerSearch.ts +159 -0
  35. package/src/nativeObjectType.ts +70 -0
  36. package/src/utils.tsx +74 -34
  37. package/build/Devtools-CD2ZvU1I.js +0 -1238
  38. package/build/Devtools-CD2ZvU1I.js.map +0 -1
  39. package/build/Devtools-DDcV5oIp.cjs +0 -1237
  40. package/build/DevtoolsComponent-zpIDe7Wu.cjs +0 -1
  41. package/build/DevtoolsPanelComponent-DJuL4CDS.cjs +0 -1
  42. package/build/utils-CpoIvKO8.cjs +0 -1
  43. package/build/utils-LNrmpo6y.js +0 -2
  44. package/build/utils-LNrmpo6y.js.map +0 -1
@@ -0,0 +1,2 @@
1
+ /* @refresh skip */
2
+ const e={context:void 0,registry:void 0,effects:void 0,done:!1,getContextId(){return t(this.context.count)},getNextContextId(){return t(this.context.count++)}};function t(t){let n=String(t),r=n.length-1;return e.context.id+(r?String.fromCharCode(96+r):``)+n}function n(t){e.context=t}const r=(e,t)=>e===t,i=Symbol(`solid-proxy`),a=typeof Proxy==`function`,o=Symbol(`solid-track`),s={equals:r};let c=ge;const l={owned:null,cleanups:null,context:null,owner:null},u={};var d=null;let f=null,p=null,m=null,h=null,g=0;function _(e,t){let n=p,r=d,i=e.length===0,a=t===void 0?r:t,o=i?l:{owned:null,cleanups:null,context:a?a.context:null,owner:a},s=i?e:()=>e(v(o));d=o,p=null;try{return N(s,!0)}finally{p=n,d=r}}function v(e){return()=>w(()=>F(e))}function y(e,t){t=t?Object.assign({},s,t):s;let n={value:e,observers:null,observerSlots:null,comparator:t.equals||void 0};return[fe.bind(n),e=>(typeof e==`function`&&(e=f&&f.running&&f.sources.has(n)?e(n.tValue):e(n.value)),pe(n,e))]}function b(e,t,n){A(j(e,t,!0,1))}function x(e,t,n){A(j(e,t,!1,1))}function S(e,t,n){c=_e;let r=j(e,t,!1,1),i=k&&ue(k);i&&(r.suspense=i),n&&n.render||(r.user=!0),h?h.push(r):A(r)}function C(e,t,n){n=n?Object.assign({},s,n):s;let r=j(e,t,!0,0);return r.observers=null,r.observerSlots=null,r.comparator=n.equals||void 0,A(r),fe.bind(r)}function ee(e){return e&&typeof e==`object`&&`then`in e}function te(t,n,r){let i,a,o;typeof n==`function`?(i=t,a=n,o=r||{}):(i=!0,a=t,o=n||{});let s=null,c=u,l=null,m=!1,h=!1,g=`initialValue`in o,_=typeof i==`function`&&C(i),v=/* @__PURE__ */ new Set,[x,S]=(o.storage||y)(o.initialValue),[te,ne]=y(void 0),[re,ie]=y(void 0,{equals:!1}),[ae,E]=y(g?`ready`:`unresolved`);d&&T(()=>{for(let e of v.keys())e.decrement();v.clear(),f&&s&&f.promises.delete(s),s=null}),e.context&&(l=e.getNextContextId(),o.ssrLoadFrom===`initial`?c=o.initialValue:e.load&&e.has(l)&&(c=e.load(l)));function D(e,t,n,r){return s===e&&(s=null,r!==void 0&&(g=!0),(e===c||t===c)&&o.onHydrated&&queueMicrotask(()=>o.onHydrated(r,{value:t})),c=u,f&&e&&m?(f.promises.delete(e),m=!1,N(()=>{f.running=!0,se(t,n)},!1)):se(t,n)),t}function se(e,t){N(()=>{t===void 0&&S(()=>e),E(t===void 0?g?`ready`:`unresolved`:`errored`),ne(t);for(let e of v.keys())e.decrement();v.clear()},!1)}function O(){let e=k&&ue(k),t=x(),n=te();if(n!==void 0&&!s)throw n;return p&&!p.user&&e&&b(()=>{re(),s&&(e.resolved&&f&&m?f.promises.add(s):v.has(e)||(e.increment(),v.add(e)))}),t}function ce(e=!0){if(e!==!1&&h)return;h=!1;let t=_?_():i;if(m=f&&f.running,t==null||t===!1){D(s,w(x));return}f&&s&&f.promises.delete(s);let n,r=c===u?w(()=>{try{return a(t,{value:x(),refetching:e})}catch(e){n=e}}):c;if(n!==void 0)D(s,void 0,be(n),t);else return ee(r)?(s=r,`v`in r?(r.s===1?D(s,r.v,void 0,t):D(s,void 0,be(r.v),t),r):(h=!0,queueMicrotask(()=>h=!1),N(()=>{E(g?`refreshing`:`pending`),ie()},!1),r.then(e=>D(r,e,void 0,t),e=>D(r,void 0,be(e),t)))):(D(s,r,void 0,t),r)}Object.defineProperties(O,{state:{get:()=>ae()},error:{get:()=>te()},loading:{get(){let e=ae();return e===`pending`||e===`refreshing`}},latest:{get(){if(!g)return O();let e=te();if(e&&!s)throw e;return x()}}});let le=d;return _?b(()=>(le=d,ce(!1))):ce(!1),[O,{refetch:e=>oe(le,()=>ce(e)),mutate:S}]}function ne(e){return N(e,!1)}function w(e){if(p===null)return e();let t=p;p=null;try{return e()}finally{p=t}}function re(e,t,n){let r=Array.isArray(e),i,a=n&&n.defer;return n=>{let o;if(r){o=Array(e.length);for(let t=0;t<e.length;t++)o[t]=e[t]()}else o=e();if(a)return a=!1,n;let s=w(()=>t(o,i,n));return i=o,s}}function ie(e){S(()=>w(e))}function T(e){return d===null||(d.cleanups===null?d.cleanups=[e]:d.cleanups.push(e)),e}function ae(){return p}function E(){return d}function oe(e,t){let n=d,r=p;d=e,p=null;try{return N(t,!0)}catch(e){xe(e)}finally{d=n,p=r}}function D(e){if(f&&f.running)return e(),f.done;let t=p,n=d;return Promise.resolve().then(()=>{p=t,d=n;let r;return k&&(r=f||={sources:/* @__PURE__ */ new Set,effects:[],promises:/* @__PURE__ */ new Set,disposed:/* @__PURE__ */ new Set,queue:/* @__PURE__ */ new Set,running:!0},r.done||(r.done=new Promise(e=>r.resolve=e)),r.running=!0),N(e,!1),p=d=null,r?r.done:void 0})}const[se,O]=/*@__PURE__*/ y(!1);function ce(){return[se,D]}function le(e,t){let n=Symbol(`context`);return{id:n,Provider:Ce(n),defaultValue:e}}function ue(e){let t;return d&&d.context&&(t=d.context[e.id])!==void 0?t:e.defaultValue}function de(e){let t=C(e),n=C(()=>Se(t()));return n.toArray=()=>{let e=n();return Array.isArray(e)?e:e==null?[]:[e]},n}let k;function fe(){let e=f&&f.running;if(this.sources&&(e?this.tState:this.state)){if((e?this.tState:this.state)===1)A(this);else{let e=m;m=null,N(()=>P(this),!1),m=e}}if(p){let e=this.observers;if(!e||e[e.length-1]!==p){let t=e?e.length:0;p.sources?(p.sources.push(this),p.sourceSlots.push(t)):(p.sources=[this],p.sourceSlots=[t]),e?(e.push(p),this.observerSlots.push(p.sources.length-1)):(this.observers=[p],this.observerSlots=[p.sources.length-1])}}return e&&f.sources.has(this)?this.tValue:this.value}function pe(e,t,n){let r=f&&f.running&&f.sources.has(e)?e.tValue:e.value;if(!e.comparator||!e.comparator(r,t)){if(f){let r=f.running;(r||!n&&f.sources.has(e))&&(f.sources.add(e),e.tValue=t),r||(e.value=t)}else e.value=t;e.observers&&e.observers.length&&N(()=>{for(let t=0;t<e.observers.length;t+=1){let n=e.observers[t],r=f&&f.running;r&&f.disposed.has(n)||((r?!n.tState:!n.state)&&(n.pure?m.push(n):h.push(n),n.observers&&ve(n)),r?n.tState=1:n.state=1)}if(m.length>1e6)throw m=[],Error()},!1)}return t}function A(e){if(!e.fn)return;F(e);let t=g;me(e,f&&f.running&&f.sources.has(e)?e.tValue:e.value,t),f&&!f.running&&f.sources.has(e)&&queueMicrotask(()=>{N(()=>{f&&(f.running=!0),p=d=e,me(e,e.tValue,t),p=d=null},!1)})}function me(e,t,n){let r,i=d,a=p;p=d=e;try{r=e.fn(t)}catch(t){return e.pure&&(f&&f.running?(e.tState=1,e.tOwned&&e.tOwned.forEach(F),e.tOwned=void 0):(e.state=1,e.owned&&e.owned.forEach(F),e.owned=null)),e.updatedAt=n+1,xe(t)}finally{p=a,d=i}(!e.updatedAt||e.updatedAt<=n)&&(e.updatedAt!=null&&`observers`in e?pe(e,r,!0):f&&f.running&&e.pure?(f.sources.has(e)||(e.value=r),f.sources.add(e),e.tValue=r):e.value=r,e.updatedAt=n)}function j(e,t,n,r=1,i){let a={fn:e,state:r,updatedAt:null,owned:null,sources:null,sourceSlots:null,cleanups:null,value:t,owner:d,context:d?d.context:null,pure:n};return f&&f.running&&(a.state=0,a.tState=r),d===null||d!==l&&(f&&f.running&&d.pure?d.tOwned?d.tOwned.push(a):d.tOwned=[a]:d.owned?d.owned.push(a):d.owned=[a]),a}function M(e){let t=f&&f.running;if((t?e.tState:e.state)===0)return;if((t?e.tState:e.state)===2)return P(e);if(e.suspense&&w(e.suspense.inFallback))return e.suspense.effects.push(e);let n=[e];for(;(e=e.owner)&&(!e.updatedAt||e.updatedAt<g);){if(t&&f.disposed.has(e))return;(t?e.tState:e.state)&&n.push(e)}for(let r=n.length-1;r>=0;r--){if(e=n[r],t){let t=e,i=n[r+1];for(;(t=t.owner)&&t!==i;)if(f.disposed.has(t))return}if((t?e.tState:e.state)===1)A(e);else if((t?e.tState:e.state)===2){let t=m;m=null,N(()=>P(e,n[0]),!1),m=t}}}function N(e,t){if(m)return e();let n=!1;t||(m=[]),h?n=!0:h=[],g++;try{let t=e();return he(n),t}catch(e){n||(h=null),m=null,xe(e)}}function he(e){if(m&&=(ge(m),null),e)return;let t;if(f){if(!f.promises.size&&!f.queue.size){let e=f.sources,n=f.disposed;h.push.apply(h,f.effects),t=f.resolve;for(let e of h)`tState`in e&&(e.state=e.tState),delete e.tState;f=null,N(()=>{for(let e of n)F(e);for(let t of e){if(t.value=t.tValue,t.owned)for(let e=0,n=t.owned.length;e<n;e++)F(t.owned[e]);t.tOwned&&(t.owned=t.tOwned),delete t.tValue,delete t.tOwned,t.tState=0}O(!1)},!1)}else if(f.running){f.running=!1,f.effects.push.apply(f.effects,h),h=null,O(!0);return}}let n=h;h=null,n.length&&N(()=>c(n),!1),t&&t()}function ge(e){for(let t=0;t<e.length;t++)M(e[t])}function _e(t){let r,i=0;for(r=0;r<t.length;r++){let e=t[r];e.user?t[i++]=e:M(e)}if(e.context){if(e.count){e.effects||=[],e.effects.push(...t.slice(0,i));return}n()}for(e.effects&&(e.done||!e.count)&&(t=[...e.effects,...t],i+=e.effects.length,delete e.effects),r=0;r<i;r++)M(t[r])}function P(e,t){let n=f&&f.running;n?e.tState=0:e.state=0;for(let r=0;r<e.sources.length;r+=1){let i=e.sources[r];if(i.sources){let e=n?i.tState:i.state;e===1?i!==t&&(!i.updatedAt||i.updatedAt<g)&&M(i):e===2&&P(i,t)}}}function ve(e){let t=f&&f.running;for(let n=0;n<e.observers.length;n+=1){let r=e.observers[n];(t?!r.tState:!r.state)&&(t?r.tState=2:r.state=2,r.pure?m.push(r):h.push(r),r.observers&&ve(r))}}function F(e){let t;if(e.sources)for(;e.sources.length;){let t=e.sources.pop(),n=e.sourceSlots.pop(),r=t.observers;if(r&&r.length){let e=r.pop(),i=t.observerSlots.pop();n<r.length&&(e.sourceSlots[i]=n,r[n]=e,t.observerSlots[n]=i)}}if(e.tOwned){for(t=e.tOwned.length-1;t>=0;t--)F(e.tOwned[t]);delete e.tOwned}if(f&&f.running&&e.pure)ye(e,!0);else if(e.owned){for(t=e.owned.length-1;t>=0;t--)F(e.owned[t]);e.owned=null}if(e.cleanups){for(t=e.cleanups.length-1;t>=0;t--)e.cleanups[t]();e.cleanups=null}f&&f.running?e.tState=0:e.state=0}function ye(e,t){if(t||(e.tState=0,f.disposed.add(e)),e.owned)for(let t=0;t<e.owned.length;t++)ye(e.owned[t])}function be(e){return e instanceof Error?e:Error(typeof e==`string`?e:`Unknown error`,{cause:e})}function xe(e,t=d){throw be(e)}function Se(e){if(typeof e==`function`&&!e.length)return Se(e());if(Array.isArray(e)){let t=[];for(let n=0;n<e.length;n++){let r=Se(e[n]);if(Array.isArray(r)){if(r.length<32768)t.push.apply(t,r);else for(let e=0;e<r.length;e++)t.push(r[e])}else t.push(r)}return t}return e}function Ce(e,t){return function(t){let n;return x(()=>n=w(()=>(d.context={...d.context,[e]:t.value},de(()=>t.children))),void 0),n}}const we=Symbol(`fallback`);function Te(e){for(let t=0;t<e.length;t++)e[t]()}function Ee(e,t,n={}){let r=[],i=[],a=[],s=0,c=t.length>1?[]:null;return T(()=>Te(a)),()=>{let l=e()||[],u=l.length,d,f;return l[o],w(()=>{let e,t,o,m,h,g,v,y,b;if(u===0)s!==0&&(Te(a),a=[],r=[],i=[],s=0,c&&=[]),n.fallback&&(r=[we],i[0]=_(e=>(a[0]=e,n.fallback())),s=1);else if(s===0){for(i=Array(u),f=0;f<u;f++)r[f]=l[f],i[f]=_(p);s=u}else{for(o=Array(u),m=Array(u),c&&(h=Array(u)),g=0,v=Math.min(s,u);g<v&&r[g]===l[g];g++);for(v=s-1,y=u-1;v>=g&&y>=g&&r[v]===l[y];v--,y--)o[y]=i[v],m[y]=a[v],c&&(h[y]=c[v]);for(e=/* @__PURE__ */ new Map,t=Array(y+1),f=y;f>=g;f--)b=l[f],d=e.get(b),t[f]=d===void 0?-1:d,e.set(b,f);for(d=g;d<=v;d++)b=r[d],f=e.get(b),f!==void 0&&f!==-1?(o[f]=i[d],m[f]=a[d],c&&(h[f]=c[d]),f=t[f],e.set(b,f)):a[d]();for(f=g;f<u;f++)f in o?(i[f]=o[f],a[f]=m[f],c&&(c[f]=h[f],c[f](f))):i[f]=_(p);i=i.slice(0,s=u),r=l.slice(0)}return i});function p(e){if(a[f]=e,c){let[e,n]=y(f);return c[f]=n,t(l[f],e)}return t(l[f])}}}function De(e,t,n={}){let r=[],i=[],a=[],s=[],c=0,l;return T(()=>Te(a)),()=>{let u=e()||[],d=u.length;return u[o],w(()=>{if(d===0)return c!==0&&(Te(a),a=[],r=[],i=[],c=0,s=[]),n.fallback&&(r=[we],i[0]=_(e=>(a[0]=e,n.fallback())),c=1),i;for(r[0]===we&&(a[0](),a=[],r=[],i=[],c=0),l=0;l<d;l++)l<r.length&&r[l]!==u[l]?s[l](()=>u[l]):l>=r.length&&(i[l]=_(f));for(;l<r.length;l++)a[l]();return c=s.length=a.length=d,r=u.slice(0),i=i.slice(0,c)});function f(e){a[l]=e;let[n,r]=y(u[l]);return s[l]=r,t(n,l)}}}function Oe(e,t){return w(()=>e(t||{}))}function ke(){return!0}const Ae={get(e,t,n){return t===i?n:e.get(t)},has(e,t){return t===i||e.has(t)},set:ke,deleteProperty:ke,getOwnPropertyDescriptor(e,t){return{configurable:!0,enumerable:!0,get(){return e.get(t)},set:ke,deleteProperty:ke}},ownKeys(e){return e.keys()}};function je(e){return(e=typeof e==`function`?e():e)?e:{}}function Me(){for(let e=0,t=this.length;e<t;++e){let t=this[e]();if(t!==void 0)return t}}function Ne(...e){let t=!1;for(let n=0;n<e.length;n++){let r=e[n];t||=!!r&&i in r,e[n]=typeof r==`function`?(t=!0,C(r)):r}if(a&&t)return new Proxy({get(t){for(let n=e.length-1;n>=0;n--){let r=je(e[n])[t];if(r!==void 0)return r}},has(t){for(let n=e.length-1;n>=0;n--)if(t in je(e[n]))return!0;return!1},keys(){let t=[];for(let n=0;n<e.length;n++)t.push(...Object.keys(je(e[n])));return[...new Set(t)]}},Ae);let n={},r=Object.create(null);for(let t=e.length-1;t>=0;t--){let i=e[t];if(!i)continue;let a=Object.getOwnPropertyNames(i);for(let e=a.length-1;e>=0;e--){let t=a[e];if(t===`__proto__`||t===`constructor`)continue;let o=Object.getOwnPropertyDescriptor(i,t);if(!r[t])r[t]=o.get?{enumerable:!0,configurable:!0,get:Me.bind(n[t]=[o.get.bind(i)])}:o.value===void 0?void 0:o;else{let e=n[t];e&&(o.get?e.push(o.get.bind(i)):o.value!==void 0&&e.push(()=>o.value))}}}let o={},s=Object.keys(r);for(let e=s.length-1;e>=0;e--){let t=s[e],n=r[t];n&&n.get?Object.defineProperty(o,t,n):o[t]=n?n.value:void 0}return o}function Pe(e,...t){let n=t.length;if(a&&i in e){let r=n>1?t.flat():t[0],i=/* @__PURE__ */ new Set,a=t.map(t=>{let n=t.filter(e=>!i.has(e)&&(i.add(e),!0));return new Proxy({get(t){return n.includes(t)?e[t]:void 0},has(t){return n.includes(t)&&t in e},keys(){return n.filter(t=>t in e)}},Ae)});return a.push(new Proxy({get(t){return r.includes(t)?void 0:e[t]},has(t){return!r.includes(t)&&t in e},keys(){return Object.keys(e).filter(e=>!r.includes(e))}},Ae)),a}let r=[];for(let e=0;e<=n;e++)r[e]={};for(let i of Object.getOwnPropertyNames(e)){let a=n;for(let e=0;e<t.length;e++)if(t[e].includes(i)){a=e;break}let o=Object.getOwnPropertyDescriptor(e,i);!o.get&&!o.set&&o.enumerable&&o.writable&&o.configurable?r[a][i]=o.value:Object.defineProperty(r[a],i,o)}return r}function Fe(t){let r,i,a=()=>{if(!i){let e=i=t();e.then(e=>{r=()=>e.default},()=>{i===e&&(i=void 0)})}return i},o=t=>{let i=e.context;if(i){let[t,o]=y();e.count||=0,e.count++,a().then(t=>{!e.done&&n(i),e.count--,o(()=>t.default),n()},t=>{!e.done&&n(i),e.count--,o(()=>()=>{throw t}),n()}),r=t}else if(!r){let[e]=te(()=>a().then(e=>e.default));r=e,T(()=>{r===e&&(r=void 0)})}let o;return C(()=>(o=r?.())?w(()=>{if(!i||e.done)return o(t);let r=e.context;n(i);let a=o(t);return n(r),a}):``)};return o.preload=()=>a(),o}let Ie=0;function Le(){return e.context?e.getNextContextId():`cl-${Ie++}`}const Re=e=>`Stale read from <${e}>.`;function ze(e){let t=`fallback`in e&&{fallback:()=>e.fallback};return C(Ee(()=>e.each,e.children,t||void 0))}function Be(e){let t=`fallback`in e&&{fallback:()=>e.fallback};return C(De(()=>e.each,e.children,t||void 0))}function Ve(e){let t=e.keyed,n=C(()=>e.when,void 0,void 0),r=t?n:C(n,void 0,{equals:(e,t)=>!e==!t});return C(()=>{let i=r();if(i){let a=e.children;return typeof a==`function`&&a.length>0?w(()=>a(t?i:()=>{if(!w(r))throw Re(`Show`);return n()})):a}return e.fallback},void 0,void 0)}function He(e){let t=de(()=>e.children),n=C(()=>{let e=t(),n=Array.isArray(e)?e:[e],r=()=>void 0;for(let e=0;e<n.length;e++){let t=e,i=n[e],a=r,o=C(()=>a()?void 0:i.when,void 0,void 0),s=i.keyed?o:C(o,void 0,{equals:(e,t)=>!e==!t});r=()=>a()||(s()?[t,o,i]:void 0)}return r});return C(()=>{let t=n()();if(!t)return e.fallback;let[r,i,a]=t,o=a.children;return typeof o==`function`&&o.length>0?w(()=>o(a.keyed?i():()=>{if(w(n)()?.[0]!==r)throw Re(`Match`);return i()})):o},void 0,void 0)}function Ue(e){return e}const We=/*#__PURE__*/ new Set([`className`,`value`,`readOnly`,`noValidate`,`formNoValidate`,`isMap`,`noModule`,`playsInline`,`adAuctionHeaders`,`allowFullscreen`,`browsingTopics`,`defaultChecked`,`defaultMuted`,`defaultSelected`,`disablePictureInPicture`,`disableRemotePlayback`,`preservesPitch`,`shadowRootClonable`,`shadowRootCustomElementRegistry`,`shadowRootDelegatesFocus`,`shadowRootSerializable`,`sharedStorageWritable`,.../* @__PURE__ */ `allowfullscreen.async.alpha.autofocus.autoplay.checked.controls.default.disabled.formnovalidate.hidden.indeterminate.inert.ismap.loop.multiple.muted.nomodule.novalidate.open.playsinline.readonly.required.reversed.seamless.selected.adauctionheaders.browsingtopics.credentialless.defaultchecked.defaultmuted.defaultselected.defer.disablepictureinpicture.disableremoteplayback.preservespitch.shadowrootclonable.shadowrootcustomelementregistry.shadowrootdelegatesfocus.shadowrootserializable.sharedstoragewritable`.split(`.`)]),Ge=/*#__PURE__*/ new Set([`innerHTML`,`textContent`,`innerText`,`children`]),Ke=/*#__PURE__*/ Object.assign(Object.create(null),{className:`class`,htmlFor:`for`}),qe=/*#__PURE__*/ Object.assign(Object.create(null),{class:`className`,novalidate:{$:`noValidate`,FORM:1},formnovalidate:{$:`formNoValidate`,BUTTON:1,INPUT:1},ismap:{$:`isMap`,IMG:1},nomodule:{$:`noModule`,SCRIPT:1},playsinline:{$:`playsInline`,VIDEO:1},readonly:{$:`readOnly`,INPUT:1,TEXTAREA:1},adauctionheaders:{$:`adAuctionHeaders`,IFRAME:1},allowfullscreen:{$:`allowFullscreen`,IFRAME:1},browsingtopics:{$:`browsingTopics`,IMG:1},defaultchecked:{$:`defaultChecked`,INPUT:1},defaultmuted:{$:`defaultMuted`,AUDIO:1,VIDEO:1},defaultselected:{$:`defaultSelected`,OPTION:1},disablepictureinpicture:{$:`disablePictureInPicture`,VIDEO:1},disableremoteplayback:{$:`disableRemotePlayback`,AUDIO:1,VIDEO:1},preservespitch:{$:`preservesPitch`,AUDIO:1,VIDEO:1},shadowrootclonable:{$:`shadowRootClonable`,TEMPLATE:1},shadowrootdelegatesfocus:{$:`shadowRootDelegatesFocus`,TEMPLATE:1},shadowrootserializable:{$:`shadowRootSerializable`,TEMPLATE:1},sharedstoragewritable:{$:`sharedStorageWritable`,IFRAME:1,IMG:1}});function Je(e,t){let n=qe[e];return typeof n==`object`?n[t]?n.$:void 0:n}const Ye=/*#__PURE__*/ new Set([`beforeinput`,`click`,`dblclick`,`contextmenu`,`focusin`,`focusout`,`input`,`keydown`,`keyup`,`mousedown`,`mousemove`,`mouseout`,`mouseover`,`mouseup`,`pointerdown`,`pointermove`,`pointerout`,`pointerover`,`pointerup`,`touchend`,`touchmove`,`touchstart`]),Xe=/*#__PURE__*/ new Set(/* @__PURE__ */ `altGlyph.altGlyphDef.altGlyphItem.animate.animateColor.animateMotion.animateTransform.circle.clipPath.color-profile.cursor.defs.desc.ellipse.feBlend.feColorMatrix.feComponentTransfer.feComposite.feConvolveMatrix.feDiffuseLighting.feDisplacementMap.feDistantLight.feDropShadow.feFlood.feFuncA.feFuncB.feFuncG.feFuncR.feGaussianBlur.feImage.feMerge.feMergeNode.feMorphology.feOffset.fePointLight.feSpecularLighting.feSpotLight.feTile.feTurbulence.filter.font.font-face.font-face-format.font-face-name.font-face-src.font-face-uri.foreignObject.g.glyph.glyphRef.hkern.image.line.linearGradient.marker.mask.metadata.missing-glyph.mpath.path.pattern.polygon.polyline.radialGradient.rect.set.stop.svg.switch.symbol.text.textPath.tref.tspan.use.view.vkern`.split(`.`)),Ze={xlink:`http://www.w3.org/1999/xlink`,xml:`http://www.w3.org/XML/1998/namespace`},Qe=e=>C(()=>e());function $e(e,t,n){let r=n.length,i=t.length,a=r,o=0,s=0,c=t[i-1].nextSibling,l=null;for(;o<i||s<a;)if(t[o]===n[s])o++,s++;else{for(;t[i-1]===n[a-1];)i--,a--;if(i===o){let t=a<r?s?n[s-1].nextSibling:n[a-s]:c;for(;s<a;)e.insertBefore(n[s++],t)}else if(a===s)for(;o<i;)l&&l.has(t[o])||t[o].remove(),o++;else if(t[o]===n[a-1]&&n[s]===t[i-1]){let r=t[--i].nextSibling;e.insertBefore(n[s++],t[o++].nextSibling),e.insertBefore(n[--a],r),t[i]=n[a]}else{if(!l){l=/* @__PURE__ */ new Map;let e=s;for(;e<a;)l.set(n[e],e++)}let r=l.get(t[o]);if(r!=null){if(s<r&&r<a){let c=o,u=1,d;for(;++c<i&&c<a&&(d=l.get(t[c]))!=null&&d===r+u;)u++;if(u>r-s){let i=t[o];for(;s<r;)e.insertBefore(n[s++],i)}else e.replaceChild(n[s++],t[o++])}else o++}else t[o++].remove()}}}const I=`_$DX_DELEGATE`;function et(e,t,n,r={}){let i;return _(r=>{i=r,t===document?e():R(t,e(),!n&&t.firstChild?null:void 0,n)},r.owner),()=>{i(),t.textContent=``}}function tt(e,t,n,r){let i,a=()=>{let t=r?document.createElementNS(`http://www.w3.org/1998/Math/MathML`,`template`):document.createElement(`template`);return t.innerHTML=e,n?t.content.firstChild.firstChild:r?t.firstChild:t.content.firstChild},o=t?()=>w(()=>document.importNode(i||=a(),!0)):()=>(i||=a()).cloneNode(!0);return o.cloneNode=o,o}function nt(e,t=window.document){let n=t[I]||(t[I]=/* @__PURE__ */ new Set);for(let r=0,i=e.length;r<i;r++){let i=e[r];n.has(i)||(n.add(i),t.addEventListener(i,vt))}}function rt(e=window.document){if(e[I]){for(let t of e[I].keys())e.removeEventListener(t,vt);delete e[I]}}function L(e,t,n){z(e)||(n==null?e.removeAttribute(t):e.setAttribute(t,n))}function it(e,t,n,r){z(e)||(r==null?e.removeAttributeNS(t,n):e.setAttributeNS(t,n,r))}function at(e,t,n){z(e)||(n?e.setAttribute(t,``):e.removeAttribute(t))}function ot(e,t){z(e)||(t==null?e.removeAttribute(`class`):e.className=t)}function st(e,t,n,r){if(r)Array.isArray(n)?(e[`$$${t}`]=n[0],e[`$$${t}Data`]=n[1]):e[`$$${t}`]=n;else if(Array.isArray(n)){let r=n[0];e.addEventListener(t,n[0]=t=>r.call(e,n[1],t))}else e.addEventListener(t,n,typeof n!=`function`&&n)}function ct(e,t,n={}){let r=Object.keys(t||{}),i=Object.keys(n),a,o;for(a=0,o=i.length;a<o;a++){let r=i[a];r&&r!==`undefined`&&!t[r]&&(gt(e,r,!1),delete n[r])}for(a=0,o=r.length;a<o;a++){let i=r[a],o=!!t[i];i&&i!==`undefined`&&n[i]!==o&&o&&(gt(e,i,!0),n[i]=o)}return n}function lt(e,t,n){if(!t)return n?L(e,`style`):t;let r=e.style;if(typeof t==`string`)return r.cssText=t;typeof n==`string`&&(r.cssText=n=void 0),n||={},t||={};let i,a;for(a in n)t[a]??r.removeProperty(a),delete n[a];for(a in t)i=t[a],i!==n[a]&&(r.setProperty(a,i),n[a]=i);return n}function ut(e,t,n){n==null?e.style.removeProperty(t):e.style.setProperty(t,n)}function dt(e,t={},n,r){let i={};return r||x(()=>i.children=B(e,t.children,i.children)),x(()=>typeof t.ref==`function`&&ft(t.ref,e)),x(()=>pt(e,t,n,!0,i,!0)),i}function ft(e,t,n){return w(()=>e(t,n))}function R(e,t,n,r){if(n!==void 0&&!r&&(r=[]),typeof t!=`function`)return B(e,t,r,n);x(r=>B(e,t(),r,n),r)}function pt(e,t,n,r,i={},a=!1){t||={};for(let r in i)if(!(r in t)){if(r===`children`)continue;i[r]=_t(e,r,null,i[r],n,a,t)}for(let o in t){if(o===`children`){r||B(e,t.children);continue}let s=t[o];i[o]=_t(e,o,s,i[o],n,a,t)}}function mt(t){let n,r;return!z()||!(n=e.registry.get(r=xt()))?t():(e.completed&&e.completed.add(n),e.registry.delete(r),n)}function z(t){return!!e.context&&!e.done&&(!t||t.isConnected)}function ht(e){return e.toLowerCase().replace(/-([a-z])/g,(e,t)=>t.toUpperCase())}function gt(e,t,n){let r=t.trim().split(/\s+/);for(let t=0,i=r.length;t<i;t++)e.classList.toggle(r[t],n)}function _t(e,t,n,r,i,a,o){let s,c,l,u,d;if(t===`style`)return lt(e,n,r);if(t===`classList`)return ct(e,n,r);if(n===r)return r;if(t===`ref`)a||n(e);else if(t.slice(0,3)===`on:`){let i=t.slice(3);r&&e.removeEventListener(i,r,typeof r!=`function`&&r),n&&e.addEventListener(i,n,typeof n!=`function`&&n)}else if(t.slice(0,10)===`oncapture:`){let i=t.slice(10);r&&e.removeEventListener(i,r,!0),n&&e.addEventListener(i,n,!0)}else if(t.slice(0,2)===`on`){let i=t.slice(2).toLowerCase(),a=Ye.has(i);if(!a&&r){let t=Array.isArray(r)?r[0]:r;e.removeEventListener(i,t)}(a||n)&&(st(e,i,n,a),a&&nt([i]))}else if(t.slice(0,5)===`attr:`)L(e,t.slice(5),n);else if(t.slice(0,5)===`bool:`)at(e,t.slice(5),n);else if((d=t.slice(0,5)===`prop:`)||(l=Ge.has(t))||!i&&((u=Je(t,e.tagName))||(c=We.has(t)))||(s=e.nodeName.includes(`-`)||`is`in o)){if(d)t=t.slice(5),c=!0;else if(z(e))return n;t===`class`||t===`className`?ot(e,n):s&&!c&&!l?e[ht(t)]=n:(t===`value`||t===`defaultValue`)&&(e.nodeName===`INPUT`||e.nodeName===`TEXTAREA`)?e[u||t]=n??``:e[u||t]=n}else{let r=i&&t.indexOf(`:`)>-1&&Ze[t.split(`:`)[0]];r?it(e,r,t,n):L(e,Ke[t]||t,n)}return n}function vt(t){if(e.registry&&e.events&&e.events.find(([e,n])=>n===t))return;let n=t.target,r=`$$${t.type}`,i=t.target,a=t.currentTarget,o=e=>Object.defineProperty(t,"target",{configurable:!0,value:e}),s=()=>{let e=n[r];if(e&&!n.disabled){let i=n[`${r}Data`];if(i===void 0?e.call(n,t):e.call(n,i,t),t.cancelBubble)return}return n.host&&typeof n.host!=`string`&&!n.host._$host&&n.contains(t.target)&&o(n.host),!0},c=()=>{for(;s()&&(n=n._$host||n.parentNode||n.host););};Object.defineProperty(t,"currentTarget",{configurable:!0,get(){return n||document}}),e.registry&&!e.done&&(e.done=_$HY.done=!0);try{if(t.composedPath){let e=t.composedPath();o(e[0]);for(let t=0;t<e.length-2&&(n=e[t],s());t++){if(n._$host){n=n._$host,c();break}if(n.parentNode===a)break}}else c();o(i)}finally{t=n=null}}function B(e,t,n,r,i){let a=z(e);if(a){!n&&(n=[...e.childNodes]);let t=[];for(let e=0;e<n.length;e++){let r=n[e];r.nodeType===8&&r.data.slice(0,2)===`!$`?r.remove():t.push(r)}n=t}for(;typeof n==`function`;)n=n();if(t===n)return n;let o=typeof t,s=r!==void 0;if(e=s&&n[0]&&n[0].parentNode||e,o===`string`||o===`number`){if(a||o===`number`&&(t=t.toString(),t===n))return n;if(s){let i=n[0];i&&i.nodeType===3?i.data!==t&&(i.data=t):i=document.createTextNode(t),n=V(e,n,r,i)}else n=n!==``&&typeof n==`string`?e.firstChild.data=t:e.textContent=t}else if(t==null||o===`boolean`){if(a)return n;n=V(e,n,r)}else if(o===`function`)return x(()=>{let i=t();for(;typeof i==`function`;)i=i();n=B(e,i,n,r)}),()=>n;else if(Array.isArray(t)){let o=[],c=n&&Array.isArray(n);if(yt(o,t,n,i))return x(()=>n=B(e,o,n,r,!0)),()=>n;if(a){if(!o.length)return n;if(r===void 0)return n=[...e.childNodes];let t=o[0];if(t.parentNode!==e)return n;let i=[t];for(;(t=t.nextSibling)!==r;)i.push(t);return n=i}if(o.length===0){if(n=V(e,n,r),s)return n}else c?n.length===0?bt(e,o,r):$e(e,n,o):(n&&V(e),bt(e,o));n=o}else if(t.nodeType){if(a&&t.parentNode)return n=s?[t]:t;if(Array.isArray(n)){if(s)return n=V(e,n,r,t);V(e,n,null,t)}else n==null||n===``||!e.firstChild?e.appendChild(t):e.replaceChild(t,e.firstChild);n=t}return n}function yt(e,t,n,r){let i=!1;for(let a=0,o=t.length;a<o;a++){let o=t[a],s=n&&n[e.length],c;if(o!=null&&o!==!0&&o!==!1){if((c=typeof o)==`object`&&o.nodeType)e.push(o);else if(Array.isArray(o))i=yt(e,o,s)||i;else if(c===`function`){if(r){for(;typeof o==`function`;)o=o();i=yt(e,Array.isArray(o)?o:[o],Array.isArray(s)?s:[s])||i}else e.push(o),i=!0}else{let t=String(o);s&&s.nodeType===3&&s.data===t?e.push(s):e.push(document.createTextNode(t))}}}return i}function bt(e,t,n=null){for(let r=0,i=t.length;r<i;r++)e.insertBefore(t[r],n)}function V(e,t,n,r){if(n===void 0)return e.textContent=``;let i=r||document.createTextNode(``);if(t.length){let r=!1;for(let a=t.length-1;a>=0;a--){let o=t[a];if(i!==o){let t=o.parentNode===e;!r&&!a?t?e.replaceChild(i,o):e.insertBefore(i,n):t&&o.remove()}else r=!0}}else e.insertBefore(i,n);return[i]}function xt(){return e.getNextContextId()}function St(e,t=!1,n=void 0){return t?document.createElementNS(`http://www.w3.org/2000/svg`,e):document.createElement(e,{is:n})}function Ct(t){let{useShadow:n}=t,r=document.createTextNode(``),i=()=>t.mount||document.body,a=E(),o,s=!!e.context;return S(()=>{s&&(E().user=s=!1),o||=oe(a,()=>C(()=>t.children));let e=i();if(e instanceof HTMLHeadElement){let[t,n]=y(!1);_(n=>R(e,()=>t()?n():o(),null)),T(()=>n(!0))}else{let i=St(t.isSVG?`g`:`div`,t.isSVG),a=n&&i.attachShadow?i.attachShadow({mode:`open`}):i;Object.defineProperty(i,"_$host",{get(){return r.parentNode},configurable:!0}),R(a,o),e.appendChild(i),t.ref&&t.ref(i),T(()=>e.contains(i)&&e.removeChild(i))}},void 0,{render:!s}),r}function wt(t,n){let r=C(t);return C(()=>{let t=r();switch(typeof t){case`function`:return w(()=>t(n));case`string`:let r=Xe.has(t),i=e.context?mt():St(t,r,w(()=>n.is));return dt(i,n,r),i}})}function Tt(e){let[,t]=Pe(e,[`component`]);return wt(()=>e.component,t)}var Et=class{constructor(){this.keyToValue=/* @__PURE__ */ new Map,this.valueToKey=/* @__PURE__ */ new Map}set(e,t){this.keyToValue.set(e,t),this.valueToKey.set(t,e)}getByKey(e){return this.keyToValue.get(e)}getByValue(e){return this.valueToKey.get(e)}clear(){this.keyToValue.clear(),this.valueToKey.clear()}},Dt=class{constructor(e){this.generateIdentifier=e,this.kv=new Et}register(e,t){this.kv.getByValue(e)||(t||=this.generateIdentifier(e),this.kv.set(t,e))}clear(){this.kv.clear()}getIdentifier(e){return this.kv.getByValue(e)}getValue(e){return this.kv.getByKey(e)}},Ot=class extends Dt{constructor(){super(e=>e.name),this.classToAllowedProps=/* @__PURE__ */ new Map}register(e,t){typeof t==`object`?(t.allowProps&&this.classToAllowedProps.set(e,t.allowProps),super.register(e,t.identifier)):super.register(e,t)}getAllowedProps(e){return this.classToAllowedProps.get(e)}};function kt(e){if(`values`in Object)return Object.values(e);let t=[];for(let n in e)e.hasOwnProperty(n)&&t.push(e[n]);return t}function At(e,t){let n=kt(e);if(`find`in n)return n.find(t);let r=n;for(let e=0;e<r.length;e++){let n=r[e];if(t(n))return n}}function H(e,t){Object.entries(e).forEach(([e,n])=>t(n,e))}function jt(e,t){return e.indexOf(t)!==-1}function Mt(e,t){for(let n=0;n<e.length;n++){let r=e[n];if(t(r))return r}}var Nt=class{constructor(){this.transfomers={}}register(e){this.transfomers[e.name]=e}findApplicable(e){return At(this.transfomers,t=>t.isApplicable(e))}findByName(e){return this.transfomers[e]}};const Pt=e=>Object.prototype.toString.call(e).slice(8,-1),Ft=e=>e===void 0,It=e=>e===null,U=e=>typeof e!=`object`||!e||e===Object.prototype?!1:Object.getPrototypeOf(e)===null||Object.getPrototypeOf(e)===Object.prototype,Lt=e=>U(e)&&Object.keys(e).length===0,W=e=>Array.isArray(e),Rt=e=>typeof e==`string`,zt=e=>typeof e==`number`&&!isNaN(e),Bt=e=>typeof e==`boolean`,Vt=e=>e instanceof RegExp,G=e=>e instanceof Map,K=e=>e instanceof Set,Ht=e=>Pt(e)===`Symbol`,Ut=e=>e instanceof Date&&!isNaN(e.valueOf()),Wt=e=>e instanceof Error,Gt=e=>typeof e==`number`&&isNaN(e),Kt=e=>Bt(e)||It(e)||Ft(e)||zt(e)||Rt(e)||Ht(e),qt=e=>typeof e==`bigint`,Jt=e=>e===1/0||e===-1/0,Yt=e=>ArrayBuffer.isView(e)&&!(e instanceof DataView),Xt=e=>e instanceof URL,Zt=e=>e.replace(/\\/g,`\\\\`).replace(/\./g,`\\.`),Qt=e=>e.map(String).map(Zt).join(`.`),q=(e,t)=>{let n=[],r=``;for(let i=0;i<e.length;i++){let a=e.charAt(i);if(!t&&a===`\\`){let t=e.charAt(i+1);if(t===`\\`){r+=`\\`,i++;continue}if(t!==`.`)throw Error(`invalid path`)}a===`\\`&&e.charAt(i+1)===`.`?(r+=`.`,i++):a===`.`?(n.push(r),r=``):r+=a}let i=r;return n.push(i),n};function J(e,t,n,r){return{isApplicable:e,annotation:t,transform:n,untransform:r}}const $t=[J(Ft,`undefined`,()=>null,()=>void 0),J(qt,`bigint`,e=>e.toString(),e=>typeof BigInt<`u`?BigInt(e):e),J(Ut,`Date`,e=>e.toISOString(),e=>new Date(e)),J(Wt,`Error`,(e,t)=>{let n={name:e.name,message:e.message};return`cause`in e&&(n.cause=e.cause),t.allowedErrorProps.forEach(t=>{n[t]=e[t]}),n},(e,t)=>{let n=Error(e.message,{cause:e.cause});return n.name=e.name,n.stack=e.stack,t.allowedErrorProps.forEach(t=>{n[t]=e[t]}),n}),J(Vt,`regexp`,e=>``+e,e=>{let t=e.slice(1,e.lastIndexOf(`/`)),n=e.slice(e.lastIndexOf(`/`)+1);return new RegExp(t,n)}),J(K,`set`,e=>[...e.values()],e=>new Set(e)),J(G,`map`,e=>[...e.entries()],e=>new Map(e)),J(e=>Gt(e)||Jt(e),`number`,e=>Gt(e)?`NaN`:e>0?`Infinity`:`-Infinity`,Number),J(e=>e===0&&1/e==-1/0,`number`,()=>`-0`,Number),J(Xt,`URL`,e=>e.toString(),e=>new URL(e))];function en(e,t,n,r){return{isApplicable:e,annotation:t,transform:n,untransform:r}}const tn=en((e,t)=>Ht(e)?!!t.symbolRegistry.getIdentifier(e):!1,(e,t)=>[`symbol`,t.symbolRegistry.getIdentifier(e)],e=>e.description,(e,t,n)=>{let r=n.symbolRegistry.getValue(t[1]);if(!r)throw Error(`Trying to deserialize unknown symbol`);return r}),nn=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array,Uint8ClampedArray].reduce((e,t)=>(e[t.name]=t,e),{}),rn=en(Yt,e=>[`typed-array`,e.constructor.name],e=>[...e],(e,t)=>{let n=nn[t[1]];if(!n)throw Error(`Trying to deserialize unknown typed array`);return new n(e)});function an(e,t){return e?.constructor?!!t.classRegistry.getIdentifier(e.constructor):!1}const on=en(an,(e,t)=>[`class`,t.classRegistry.getIdentifier(e.constructor)],(e,t)=>{let n=t.classRegistry.getAllowedProps(e.constructor);if(!n)return{...e};let r={};return n.forEach(t=>{r[t]=e[t]}),r},(e,t,n)=>{let r=n.classRegistry.getValue(t[1]);if(!r)throw Error(`Trying to deserialize unknown class '${t[1]}' - check https://github.com/blitz-js/superjson/issues/116#issuecomment-773996564`);return Object.assign(Object.create(r.prototype),e)}),sn=en((e,t)=>!!t.customTransformerRegistry.findApplicable(e),(e,t)=>[`custom`,t.customTransformerRegistry.findApplicable(e).name],(e,t)=>t.customTransformerRegistry.findApplicable(e).serialize(e),(e,t,n)=>{let r=n.customTransformerRegistry.findByName(t[1]);if(!r)throw Error(`Trying to deserialize unknown custom value`);return r.deserialize(e)}),cn=[on,tn,sn,rn],ln=(e,t)=>{let n=Mt(cn,n=>n.isApplicable(e,t));if(n)return{value:n.transform(e,t),type:n.annotation(e,t)};let r=Mt($t,n=>n.isApplicable(e,t));if(r)return{value:r.transform(e,t),type:r.annotation}},un={};$t.forEach(e=>{un[e.annotation]=e});const dn=(e,t,n)=>{if(W(t))switch(t[0]){case`symbol`:return tn.untransform(e,t,n);case`class`:return on.untransform(e,t,n);case`custom`:return sn.untransform(e,t,n);case`typed-array`:return rn.untransform(e,t,n);default:throw Error(`Unknown transformation: `+t)}else{let r=un[t];if(!r)throw Error(`Unknown transformation: `+t);return r.untransform(e,n)}},Y=(e,t)=>{if(t>e.size)throw Error(`index out of bounds`);let n=e.keys();for(;t>0;)n.next(),t--;return n.next().value};function fn(e){if(jt(e,`__proto__`))throw Error(`__proto__ is not allowed as a property`);if(jt(e,`prototype`))throw Error(`prototype is not allowed as a property`);if(jt(e,`constructor`))throw Error(`constructor is not allowed as a property`)}const pn=(e,t)=>{fn(t);for(let n=0;n<t.length;n++){let r=t[n];if(K(e))e=Y(e,+r);else if(G(e)){let i=+r,a=+t[++n]==0?`key`:`value`,o=Y(e,i);switch(a){case`key`:e=o;break;case`value`:e=e.get(o)}}else e=e[r]}return e},mn=(e,t,n)=>{if(fn(t),t.length===0)return n(e);let r=e;for(let e=0;e<t.length-1;e++){let n=t[e];if(W(r)){let e=+n;r=r[e]}else if(U(r))r=r[n];else if(K(r)){let e=+n;r=Y(r,e)}else if(G(r)){if(e===t.length-2)break;let i=+n,a=+t[++e]==0?`key`:`value`,o=Y(r,i);switch(a){case`key`:r=o;break;case`value`:r=r.get(o)}}}let i=t[t.length-1];if(W(r)?r[+i]=n(r[+i]):U(r)&&(r[i]=n(r[i])),K(r)){let e=Y(r,+i),t=n(e);e!==t&&(r.delete(e),r.add(t))}if(G(r)){let e=+t[t.length-2],a=Y(r,e);switch(+i==0?`key`:`value`){case`key`:{let e=n(a);r.set(e,r.get(a)),e!==a&&r.delete(a);break}case`value`:r.set(a,n(r.get(a)))}}return e},hn=e=>e<1;function gn(e,t,n,r=[]){if(!e)return;let i=hn(n);if(!W(e)){H(e,(e,a)=>gn(e,t,n,[...r,...q(a,i)]));return}let[a,o]=e;o&&H(o,(e,a)=>{gn(e,t,n,[...r,...q(a,i)])}),t(a,r)}function _n(e,t,n,r){return gn(t,(t,n)=>{e=mn(e,n,e=>dn(e,t,r))},n),e}function vn(e,t,n){let r=hn(n);function i(t,n){let i=pn(e,q(n,r));t.map(e=>q(e,r)).forEach(t=>{e=mn(e,t,()=>i)})}if(W(t)){let[n,a]=t;n.forEach(t=>{e=mn(e,q(t,r),()=>e)}),a&&H(a,i)}else H(t,i);return e}const yn=(e,t)=>U(e)||W(e)||G(e)||K(e)||Wt(e)||an(e,t);function bn(e,t,n){let r=n.get(e);r?r.push(t):n.set(e,[t])}function xn(e,t){let n={},r;return e.forEach(e=>{if(e.length<=1)return;t||(e=e.map(e=>e.map(String)).sort((e,t)=>e.length-t.length));let[i,...a]=e;i.length===0?r=a.map(Qt):n[Qt(i)]=a.map(Qt)}),r?Lt(n)?[r]:[r,n]:Lt(n)?void 0:n}const Sn=(e,t,n,r,i=[],a=[],o=/* @__PURE__ */ new Map)=>{let s=Kt(e);if(!s){bn(e,i,t);let n=o.get(e);if(n)return r?{transformedValue:null}:n}if(!yn(e,n)){let t=ln(e,n),r=t?{transformedValue:t.value,annotations:[t.type]}:{transformedValue:e};return s||o.set(e,r),r}if(jt(a,e))return{transformedValue:null};let c=ln(e,n),l=c?.value??e,u=W(l)?[]:{},d={};H(l,(s,c)=>{if(c===`__proto__`||c===`constructor`||c===`prototype`)throw Error(`Detected property ${c}. This is a prototype pollution risk, please remove it from your object.`);let l=Sn(s,t,n,r,[...i,c],[...a,e],o);u[c]=l.transformedValue,W(l.annotations)?d[Zt(c)]=l.annotations:U(l.annotations)&&H(l.annotations,(e,t)=>{d[Zt(c)+`.`+t]=e})});let f=Lt(d)?{transformedValue:u,annotations:c?[c.type]:void 0}:{transformedValue:u,annotations:c?[c.type,d]:d};return s||o.set(e,f),f};function Cn(e){return Object.prototype.toString.call(e).slice(8,-1)}function wn(e){return Cn(e)===`Array`}function Tn(e){if(Cn(e)!==`Object`)return!1;let t=Object.getPrototypeOf(e);return!!t&&t.constructor===Object&&t===Object.prototype}function En(e,t,n,r,i){let a={}.propertyIsEnumerable.call(r,t)?`enumerable`:`nonenumerable`;a===`enumerable`&&(e[t]=n),i&&a===`nonenumerable`&&Object.defineProperty(e,t,{value:n,enumerable:!1,writable:!0,configurable:!0})}function Dn(e,t={}){if(wn(e))return e.map(e=>Dn(e,t));if(!Tn(e))return e;let n=Object.getOwnPropertyNames(e),r=Object.getOwnPropertySymbols(e);return[...n,...r].reduce((n,r)=>{if(r===`__proto__`||wn(t.props)&&!t.props.includes(r))return n;let i=e[r];return En(n,r,Dn(i,t),e,t.nonenumerable),n},{})}var X=class{constructor({dedupe:e=!1}={}){this.classRegistry=new Ot,this.symbolRegistry=new Dt(e=>e.description??``),this.customTransformerRegistry=new Nt,this.allowedErrorProps=[],this.dedupe=e}serialize(e){let t=/* @__PURE__ */ new Map,n=Sn(e,t,this,this.dedupe),r={json:n.transformedValue};n.annotations&&(r.meta={...r.meta,values:n.annotations});let i=xn(t,this.dedupe);return i&&(r.meta={...r.meta,referentialEqualities:i}),r.meta&&(r.meta.v=1),r}deserialize(e,t){let{json:n,meta:r}=e,i=t?.inPlace?n:Dn(n);return r?.values&&(i=_n(i,r.values,r.v??0,this)),r?.referentialEqualities&&(i=vn(i,r.referentialEqualities,r.v??0)),i}stringify(e){return JSON.stringify(this.serialize(e))}parse(e){return this.deserialize(JSON.parse(e),{inPlace:!0})}registerClass(e,t){this.classRegistry.register(e,t)}registerSymbol(e,t){this.symbolRegistry.register(e,t)}registerCustom(e,t){this.customTransformerRegistry.register({name:t,...e})}allowErrorProps(...e){this.allowedErrorProps.push(...e)}};X.defaultInstance=new X,X.serialize=X.defaultInstance.serialize.bind(X.defaultInstance),X.deserialize=X.defaultInstance.deserialize.bind(X.defaultInstance),X.stringify=X.defaultInstance.stringify.bind(X.defaultInstance),X.parse=X.defaultInstance.parse.bind(X.defaultInstance),X.registerClass=X.defaultInstance.registerClass.bind(X.defaultInstance),X.registerSymbol=X.defaultInstance.registerSymbol.bind(X.defaultInstance),X.registerCustom=X.defaultInstance.registerCustom.bind(X.defaultInstance),X.allowErrorProps=X.defaultInstance.allowErrorProps.bind(X.defaultInstance);const On=X.serialize;X.deserialize;const kn=X.stringify;X.parse,X.registerClass,X.registerCustom,X.registerSymbol,X.allowErrorProps;function Z(e,t){try{switch(t){case`Map`:return Map.prototype.has.call(e,void 0),!0;case`Set`:return Set.prototype.has.call(e,void 0),!0;case`String`:return String.prototype.valueOf.call(e),!0}}catch{return!1}}function An(e){if(typeof e==`object`&&e)try{if(Array.isArray(e)||ArrayBuffer.isView(e))return;let t=Object.getOwnPropertyDescriptor(e,`length`);if(typeof t?.value==`number`&&!t.enumerable&&!t.writable&&!t.configurable&&Z(e,`String`))return`String`;let n=Object.getPrototypeOf(e);if(n===null)return Z(e,`Map`)?`Map`:Z(e,`Set`)?`Set`:void 0;if(n===Object.prototype)return;let r=e;for(let t=0;r&&t<=500;t++){let t=Object.getOwnPropertyDescriptor(r,Symbol.toStringTag)?.value;if((t===`Map`||t===`Set`)&&Z(e,t))return t;r=Object.getPrototypeOf(r)}return}catch{return}}function jn(e){return e.state.fetchStatus===`fetching`?`fetching`:e.getObserversCount()?e.state.fetchStatus===`paused`?`paused`:e.isStale()?`stale`:`fresh`:`inactive`}function Mn(e,t){return`${e}${t.charAt(0).toUpperCase()+t.slice(1)}`}function Nn({queryState:e,observerCount:t,isStale:n}){return e?.fetchStatus===`fetching`?`blue`:t?e?.fetchStatus===`paused`?`purple`:n?`yellow`:`green`:`gray`}function Pn({status:e,isPaused:t}){return t?`purple`:e===`error`?`red`:e===`pending`?`yellow`:e===`success`?`green`:`gray`}function Fn(e){return e===`fresh`?`green`:e===`stale`?`yellow`:e===`paused`?`purple`:e===`inactive`?`gray`:`blue`}const In=(e,t=!1)=>{let{json:n}=On(e);return JSON.stringify(n,null,t?2:void 0)},Ln=e=>e.state.fetchStatus===`idle`?e.getObserversCount()?e.isStale()?2:1:3:0,Rn=(e,t)=>e.queryHash.localeCompare(t.queryHash),zn=(e,t)=>{let n=t.state.dataUpdatedAt-e.state.dataUpdatedAt;return n<0?-1:+(n>0)},Bn={status:(e,t)=>Ln(e)===Ln(t)?zn(e,t):Ln(e)>Ln(t)?1:-1,"query hash":Rn,"last updated":zn},Vn=e=>e.state.isPaused?0:e.state.status===`error`?2:e.state.status===`pending`?1:3,Hn=(e,t)=>e.state.submittedAt<t.state.submittedAt?1:-1,Un={status:(e,t)=>Vn(e)===Vn(t)?Hn(e,t):Vn(e)>Vn(t)?1:-1,"last updated":Hn},Wn=e=>e*parseFloat(getComputedStyle(document.documentElement).fontSize),Gn=()=>{let[e,t]=y(`dark`);return ie(()=>{let e=window.matchMedia(`(prefers-color-scheme: dark)`);t(e.matches?`dark`:`light`);let n=e=>{t(e.matches?`dark`:`light`)};e.addEventListener(`change`,n),T(()=>e.removeEventListener(`change`,n))}),e};function Kn(e){if(typeof e!=`object`||!e)return!1;try{let t=Object.getPrototypeOf(e);if(t===null)return!0;let n=Object.getOwnPropertyDescriptor(t,`constructor`)?.value;return typeof n==`function`&&Object.getOwnPropertyDescriptor(n,`prototype`)?.value===t&&Function.prototype.toString.call(n)===Function.prototype.toString.call(Object)}catch{return!1}}const Q=(e,t,n)=>{if(t.length===0)return n;let r=An(e);if(r===`Map`){let r=new Map(Map.prototype.entries.call(e));if(t.length===1)return r.set(t[0],n),r;let[i,...a]=t;return r.set(i,Q(r.get(i),a,n)),r}if(r===`Set`){let r=Q(Array.from(Set.prototype.values.call(e)),t,n);return new Set(r)}if(Array.isArray(e)){let r=[...e];if(t.length===1)return r[t[0]]=n,r;let[i,...a]=t;return r[i]=Q(r[i],a,n),r}if(Kn(e)){let r=Object.getOwnPropertyDescriptors(e),[i,...a]=t;if(i===void 0)return e;let o=Object.getOwnPropertyDescriptor(e,i);return a.length&&(!o||!(`value`in o))?e:Object.create(Object.getPrototypeOf(e),{...r,[i]:{value:a.length?Q(o?.value,a,n):n,enumerable:o?.enumerable??!0,configurable:!0,writable:!0}})}return e},$=(e,t)=>{let n=An(e);if(n===`Map`){let n=new Map(Map.prototype.entries.call(e));if(t.length===1)return n.delete(t[0]),n;let[r,...i]=t;return n.set(r,$(n.get(r),i)),n}if(n===`Set`){let n=$(Array.from(Set.prototype.values.call(e)),t);return new Set(n)}if(Array.isArray(e)){let n=[...e];if(t.length===1)return n.filter((e,n)=>n.toString()!==t[0]);let[r,...i]=t;return n[r]=$(n[r],i),n}if(Kn(e)){let n=Object.getOwnPropertyDescriptors(e),[r,...i]=t;if(r===void 0)return e;if(i.length===0)delete n[r];else{let t=Object.getOwnPropertyDescriptor(e,r);if(!t||!(`value`in t))return e;n[r]={...t,value:$(t.value,i)}}return Object.create(Object.getPrototypeOf(e),n)}return e},qn=(e,t)=>{if(!e)return;window.__nonce__=e;let n=t??document.head;if(n.querySelector(`#_goober`))return;let r=document.createElement(`style`),i=document.createTextNode(``);r.appendChild(i),r.id=`_goober`,r.setAttribute(`nonce`,e),n.appendChild(r)};Object.defineProperty(exports,"$",{enumerable:!0,get:function(){return re}}),Object.defineProperty(exports,"A",{enumerable:!0,get:function(){return tt}}),Object.defineProperty(exports,"B",{enumerable:!0,get:function(){return Oe}}),Object.defineProperty(exports,"C",{enumerable:!0,get:function(){return nt}}),Object.defineProperty(exports,"D",{enumerable:!0,get:function(){return L}}),Object.defineProperty(exports,"E",{enumerable:!0,get:function(){return et}}),Object.defineProperty(exports,"F",{enumerable:!0,get:function(){return Be}}),Object.defineProperty(exports,"G",{enumerable:!0,get:function(){return x}}),Object.defineProperty(exports,"H",{enumerable:!0,get:function(){return le}}),Object.defineProperty(exports,"I",{enumerable:!0,get:function(){return Ue}}),Object.defineProperty(exports,"J",{enumerable:!0,get:function(){return Le}}),Object.defineProperty(exports,"K",{enumerable:!0,get:function(){return _}}),Object.defineProperty(exports,"L",{enumerable:!0,get:function(){return Ve}}),Object.defineProperty(exports,"M",{enumerable:!0,get:function(){return i}}),Object.defineProperty(exports,"N",{enumerable:!0,get:function(){return o}}),Object.defineProperty(exports,"O",{enumerable:!0,get:function(){return ut}}),Object.defineProperty(exports,"P",{enumerable:!0,get:function(){return ze}}),Object.defineProperty(exports,"Q",{enumerable:!0,get:function(){return Ne}}),Object.defineProperty(exports,"R",{enumerable:!0,get:function(){return He}}),Object.defineProperty(exports,"S",{enumerable:!0,get:function(){return rt}}),Object.defineProperty(exports,"T",{enumerable:!0,get:function(){return Qe}}),Object.defineProperty(exports,"U",{enumerable:!0,get:function(){return S}}),Object.defineProperty(exports,"V",{enumerable:!0,get:function(){return b}}),Object.defineProperty(exports,"W",{enumerable:!0,get:function(){return C}}),Object.defineProperty(exports,"X",{enumerable:!0,get:function(){return E}}),Object.defineProperty(exports,"Y",{enumerable:!0,get:function(){return ae}}),Object.defineProperty(exports,"Z",{enumerable:!0,get:function(){return Fe}}),Object.defineProperty(exports,"_",{enumerable:!0,get:function(){return kn}}),Object.defineProperty(exports,"a",{enumerable:!0,get:function(){return Gn}}),Object.defineProperty(exports,"at",{enumerable:!0,get:function(){return ce}}),Object.defineProperty(exports,"b",{enumerable:!0,get:function(){return st}}),Object.defineProperty(exports,"c",{enumerable:!0,get:function(){return jn}}),Object.defineProperty(exports,"d",{enumerable:!0,get:function(){return Un}}),Object.defineProperty(exports,"et",{enumerable:!0,get:function(){return T}}),Object.defineProperty(exports,"f",{enumerable:!0,get:function(){return qn}}),Object.defineProperty(exports,"g",{enumerable:!0,get:function(){return On}}),Object.defineProperty(exports,"h",{enumerable:!0,get:function(){return An}}),Object.defineProperty(exports,"i",{enumerable:!0,get:function(){return Pn}}),Object.defineProperty(exports,"it",{enumerable:!0,get:function(){return ue}}),Object.defineProperty(exports,"j",{enumerable:!0,get:function(){return ft}}),Object.defineProperty(exports,"k",{enumerable:!0,get:function(){return dt}}),Object.defineProperty(exports,"l",{enumerable:!0,get:function(){return Mn}}),Object.defineProperty(exports,"m",{enumerable:!0,get:function(){return Q}}),Object.defineProperty(exports,"n",{enumerable:!0,get:function(){return $}}),Object.defineProperty(exports,"nt",{enumerable:!0,get:function(){return Pe}}),Object.defineProperty(exports,"o",{enumerable:!0,get:function(){return Nn}}),Object.defineProperty(exports,"p",{enumerable:!0,get:function(){return Bn}}),Object.defineProperty(exports,"q",{enumerable:!0,get:function(){return y}}),Object.defineProperty(exports,"r",{enumerable:!0,get:function(){return In}}),Object.defineProperty(exports,"rt",{enumerable:!0,get:function(){return w}}),Object.defineProperty(exports,"s",{enumerable:!0,get:function(){return Fn}}),Object.defineProperty(exports,"t",{enumerable:!0,get:function(){return Wn}}),Object.defineProperty(exports,"tt",{enumerable:!0,get:function(){return ie}}),Object.defineProperty(exports,"u",{enumerable:!0,get:function(){return Kn}}),Object.defineProperty(exports,"v",{enumerable:!0,get:function(){return Tt}}),Object.defineProperty(exports,"w",{enumerable:!0,get:function(){return R}}),Object.defineProperty(exports,"x",{enumerable:!0,get:function(){return ot}}),Object.defineProperty(exports,"y",{enumerable:!0,get:function(){return Ct}}),Object.defineProperty(exports,"z",{enumerable:!0,get:function(){return ne}});
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tanstack/query-devtools",
3
- "version": "5.105.3",
3
+ "version": "5.106.0",
4
4
  "description": "Developer tools to interact with and visualize the TanStack Query cache",
5
5
  "author": "tannerlinsley",
6
6
  "license": "MIT",
@@ -49,7 +49,8 @@
49
49
  "@solid-primitives/resize-observer": "^2.2.0",
50
50
  "@solid-primitives/storage": "^1.3.11",
51
51
  "@tanstack/match-sorter-utils": "^9.1.2",
52
- "@tanstack/query-core": "5.105.3",
52
+ "@tanstack/query-core": "5.106.0",
53
+ "@tanstack/solid-virtual": "^3.13.52",
53
54
  "clsx": "^2.1.1",
54
55
  "goober": "^2.1.19",
55
56
  "solid-js": "^1.9.15",
@@ -60,7 +61,7 @@
60
61
  "@solidjs/testing-library": "^0.8.10",
61
62
  "typescript": "6.0.3",
62
63
  "unplugin-solid": "^2.0.0",
63
- "vite-plugin-solid": "^2.11.14"
64
+ "vite-plugin-solid": "^2.11.15"
64
65
  },
65
66
  "scripts": {
66
67
  "clean": "premove ./build ./coverage ./dist-ts ./.cache/test-types",
package/src/Devtools.tsx CHANGED
@@ -13,7 +13,6 @@ import { rankItem } from '@tanstack/match-sorter-utils'
13
13
  import * as goober from 'goober'
14
14
  import { clsx as cx } from 'clsx'
15
15
  import { TransitionGroup } from 'solid-transition-group'
16
- import { Key } from '@solid-primitives/keyed'
17
16
  import { createResizeObserver } from '@solid-primitives/resize-observer'
18
17
  import { DropdownMenu, RadioGroup } from '@kobalte/core'
19
18
  import { Portal } from 'solid-js/web'
@@ -53,7 +52,8 @@ import {
53
52
  Wifi,
54
53
  XCircle,
55
54
  } from './icons'
56
- import Explorer from './Explorer'
55
+ import Explorer, { SearchableExplorer } from './Explorer'
56
+ import { VirtualList } from './VirtualList'
57
57
  import { usePiPWindow, useQueryDevtoolsContext, useTheme } from './contexts'
58
58
  import {
59
59
  BUTTON_POSITION,
@@ -1352,32 +1352,38 @@ export const ContentView: Component<ContentViewProps> = (props) => {
1352
1352
  </div>
1353
1353
  </div>
1354
1354
  <Show when={selectedView() === 'queries'}>
1355
- <div
1356
- class={cx(
1357
- styles().overflowQueryContainer,
1358
- 'tsqd-queries-overflow-container',
1359
- )}
1360
- >
1361
- <div class="tsqd-queries-container">
1362
- <Key by={(q) => q.queryHash} each={queries()}>
1355
+ <Show when={query_cache()} keyed>
1356
+ {(_cache) => (
1357
+ <VirtualList
1358
+ each={queries()}
1359
+ getKey={(query) => query.queryHash}
1360
+ class={cx(
1361
+ styles().overflowQueryContainer,
1362
+ 'tsqd-queries-overflow-container',
1363
+ )}
1364
+ contentClass="tsqd-queries-container"
1365
+ >
1363
1366
  {(query) => <QueryRow query={query()} />}
1364
- </Key>
1365
- </div>
1366
- </div>
1367
+ </VirtualList>
1368
+ )}
1369
+ </Show>
1367
1370
  </Show>
1368
1371
  <Show when={selectedView() === 'mutations'}>
1369
- <div
1370
- class={cx(
1371
- styles().overflowQueryContainer,
1372
- 'tsqd-mutations-overflow-container',
1373
- )}
1374
- >
1375
- <div class="tsqd-mutations-container">
1376
- <Key by={(m) => m.mutationId} each={mutations()}>
1372
+ <Show when={mutation_cache()} keyed>
1373
+ {(_cache) => (
1374
+ <VirtualList
1375
+ each={mutations()}
1376
+ getKey={(mutation) => mutation.mutationId}
1377
+ class={cx(
1378
+ styles().overflowQueryContainer,
1379
+ 'tsqd-mutations-overflow-container',
1380
+ )}
1381
+ contentClass="tsqd-mutations-container"
1382
+ >
1377
1383
  {(mutation) => <MutationRow mutation={mutation()} />}
1378
- </Key>
1379
- </div>
1380
- </div>
1384
+ </VirtualList>
1385
+ )}
1386
+ </Show>
1381
1387
  </Show>
1382
1388
  </div>
1383
1389
  <Show when={selectedView() === 'queries' && selectedQueryHash()}>
@@ -1517,32 +1523,16 @@ const MutationRow: Component<{ mutation: Mutation }> = (props) => {
1517
1523
  const t = (light: string, dark: string) => (theme() === 'dark' ? dark : light)
1518
1524
 
1519
1525
  const mutationState = createSubscribeToMutationCacheBatcher(
1520
- (mutationCache) => {
1521
- const mutations = mutationCache().getAll()
1522
- const mutation = mutations.find(
1523
- (m) => m.mutationId === props.mutation.mutationId,
1524
- )
1525
- return mutation?.state
1526
- },
1526
+ () => props.mutation.state,
1527
1527
  )
1528
1528
 
1529
- const isPaused = createSubscribeToMutationCacheBatcher((mutationCache) => {
1530
- const mutations = mutationCache().getAll()
1531
- const mutation = mutations.find(
1532
- (m) => m.mutationId === props.mutation.mutationId,
1533
- )
1534
- if (!mutation) return false
1535
- return mutation.state.isPaused
1536
- })
1529
+ const isPaused = createSubscribeToMutationCacheBatcher(
1530
+ () => props.mutation.state.isPaused,
1531
+ )
1537
1532
 
1538
- const status = createSubscribeToMutationCacheBatcher((mutationCache) => {
1539
- const mutations = mutationCache().getAll()
1540
- const mutation = mutations.find(
1541
- (m) => m.mutationId === props.mutation.mutationId,
1542
- )
1543
- if (!mutation) return 'idle'
1544
- return mutation.state.status
1545
- })
1533
+ const status = createSubscribeToMutationCacheBatcher(
1534
+ () => props.mutation.state.status,
1535
+ )
1546
1536
 
1547
1537
  const color = createMemo(() =>
1548
1538
  getMutationStatusColor({
@@ -1616,40 +1606,13 @@ const MutationRow: Component<{ mutation: Mutation }> = (props) => {
1616
1606
  }
1617
1607
 
1618
1608
  const QueryStatusCount: Component = () => {
1619
- const stale = createSubscribeToQueryCacheBatcher(
1620
- (queryCache) =>
1621
- queryCache()
1622
- .getAll()
1623
- .filter((q) => getQueryStatusLabel(q) === 'stale').length,
1624
- )
1625
-
1626
- const fresh = createSubscribeToQueryCacheBatcher(
1627
- (queryCache) =>
1628
- queryCache()
1629
- .getAll()
1630
- .filter((q) => getQueryStatusLabel(q) === 'fresh').length,
1631
- )
1632
-
1633
- const fetching = createSubscribeToQueryCacheBatcher(
1634
- (queryCache) =>
1635
- queryCache()
1636
- .getAll()
1637
- .filter((q) => getQueryStatusLabel(q) === 'fetching').length,
1638
- )
1639
-
1640
- const paused = createSubscribeToQueryCacheBatcher(
1641
- (queryCache) =>
1642
- queryCache()
1643
- .getAll()
1644
- .filter((q) => getQueryStatusLabel(q) === 'paused').length,
1645
- )
1646
-
1647
- const inactive = createSubscribeToQueryCacheBatcher(
1648
- (queryCache) =>
1649
- queryCache()
1650
- .getAll()
1651
- .filter((q) => getQueryStatusLabel(q) === 'inactive').length,
1652
- )
1609
+ const counts = createSubscribeToQueryCacheBatcher((queryCache) => {
1610
+ const tally = { fresh: 0, fetching: 0, paused: 0, stale: 0, inactive: 0 }
1611
+ for (const query of queryCache().getAll()) {
1612
+ tally[getQueryStatusLabel(query)]++
1613
+ }
1614
+ return tally
1615
+ })
1653
1616
 
1654
1617
  const theme = useTheme()
1655
1618
  const css = useQueryDevtoolsContext().shadowDOMTarget
@@ -1663,67 +1626,23 @@ const QueryStatusCount: Component = () => {
1663
1626
  <div
1664
1627
  class={cx(styles().queryStatusContainer, 'tsqd-query-status-container')}
1665
1628
  >
1666
- <QueryStatus label="Fresh" color="green" count={fresh()} />
1667
- <QueryStatus label="Fetching" color="blue" count={fetching()} />
1668
- <QueryStatus label="Paused" color="purple" count={paused()} />
1669
- <QueryStatus label="Stale" color="yellow" count={stale()} />
1670
- <QueryStatus label="Inactive" color="gray" count={inactive()} />
1629
+ <QueryStatus label="Fresh" color="green" count={counts().fresh} />
1630
+ <QueryStatus label="Fetching" color="blue" count={counts().fetching} />
1631
+ <QueryStatus label="Paused" color="purple" count={counts().paused} />
1632
+ <QueryStatus label="Stale" color="yellow" count={counts().stale} />
1633
+ <QueryStatus label="Inactive" color="gray" count={counts().inactive} />
1671
1634
  </div>
1672
1635
  )
1673
1636
  }
1674
1637
 
1675
1638
  const MutationStatusCount: Component = () => {
1676
- const success = createSubscribeToMutationCacheBatcher(
1677
- (mutationCache) =>
1678
- mutationCache()
1679
- .getAll()
1680
- .filter(
1681
- (m) =>
1682
- getMutationStatusColor({
1683
- isPaused: m.state.isPaused,
1684
- status: m.state.status,
1685
- }) === 'green',
1686
- ).length,
1687
- )
1688
-
1689
- const pending = createSubscribeToMutationCacheBatcher(
1690
- (mutationCache) =>
1691
- mutationCache()
1692
- .getAll()
1693
- .filter(
1694
- (m) =>
1695
- getMutationStatusColor({
1696
- isPaused: m.state.isPaused,
1697
- status: m.state.status,
1698
- }) === 'yellow',
1699
- ).length,
1700
- )
1701
-
1702
- const paused = createSubscribeToMutationCacheBatcher(
1703
- (mutationCache) =>
1704
- mutationCache()
1705
- .getAll()
1706
- .filter(
1707
- (m) =>
1708
- getMutationStatusColor({
1709
- isPaused: m.state.isPaused,
1710
- status: m.state.status,
1711
- }) === 'purple',
1712
- ).length,
1713
- )
1714
-
1715
- const error = createSubscribeToMutationCacheBatcher(
1716
- (mutationCache) =>
1717
- mutationCache()
1718
- .getAll()
1719
- .filter(
1720
- (m) =>
1721
- getMutationStatusColor({
1722
- isPaused: m.state.isPaused,
1723
- status: m.state.status,
1724
- }) === 'red',
1725
- ).length,
1726
- )
1639
+ const counts = createSubscribeToMutationCacheBatcher((mutationCache) => {
1640
+ const tally = { green: 0, yellow: 0, purple: 0, red: 0, gray: 0 }
1641
+ for (const mutation of mutationCache().getAll()) {
1642
+ tally[getMutationStatusColor(mutation.state)]++
1643
+ }
1644
+ return tally
1645
+ })
1727
1646
 
1728
1647
  const theme = useTheme()
1729
1648
  const css = useQueryDevtoolsContext().shadowDOMTarget
@@ -1737,10 +1656,10 @@ const MutationStatusCount: Component = () => {
1737
1656
  <div
1738
1657
  class={cx(styles().queryStatusContainer, 'tsqd-query-status-container')}
1739
1658
  >
1740
- <QueryStatus label="Paused" color="purple" count={paused()} />
1741
- <QueryStatus label="Pending" color="yellow" count={pending()} />
1742
- <QueryStatus label="Success" color="green" count={success()} />
1743
- <QueryStatus label="Error" color="red" count={error()} />
1659
+ <QueryStatus label="Paused" color="purple" count={counts().purple} />
1660
+ <QueryStatus label="Pending" color="yellow" count={counts().yellow} />
1661
+ <QueryStatus label="Success" color="green" count={counts().green} />
1662
+ <QueryStatus label="Error" color="red" count={counts().red} />
1744
1663
  </div>
1745
1664
  )
1746
1665
  }
@@ -1887,48 +1806,34 @@ const QueryDetails = () => {
1887
1806
  })
1888
1807
 
1889
1808
  const activeQuery = createSubscribeToQueryCacheBatcher(
1890
- (queryCache) =>
1891
- queryCache()
1892
- .getAll()
1893
- .find((query) => query.queryHash === selectedQueryHash()),
1809
+ (queryCache) => queryCache().get(selectedQueryHash() ?? ''),
1894
1810
  false,
1895
1811
  )
1896
1812
 
1897
1813
  const activeQueryFresh = createSubscribeToQueryCacheBatcher((queryCache) => {
1898
- return queryCache()
1899
- .getAll()
1900
- .find((query) => query.queryHash === selectedQueryHash())
1814
+ return queryCache().get(selectedQueryHash() ?? '')
1901
1815
  }, false)
1902
1816
 
1903
1817
  const activeQueryState = createSubscribeToQueryCacheBatcher(
1904
- (queryCache) =>
1905
- queryCache()
1906
- .getAll()
1907
- .find((query) => query.queryHash === selectedQueryHash())?.state,
1818
+ (queryCache) => queryCache().get(selectedQueryHash() ?? '')?.state,
1908
1819
  false,
1909
1820
  )
1910
1821
 
1911
1822
  const activeQueryStateData = createSubscribeToQueryCacheBatcher(
1912
1823
  (queryCache) => {
1913
- return queryCache()
1914
- .getAll()
1915
- .find((query) => query.queryHash === selectedQueryHash())?.state.data
1824
+ return queryCache().get(selectedQueryHash() ?? '')?.state.data
1916
1825
  },
1917
1826
  false,
1918
1827
  )
1919
1828
 
1920
1829
  const statusLabel = createSubscribeToQueryCacheBatcher((queryCache) => {
1921
- const query = queryCache()
1922
- .getAll()
1923
- .find((q) => q.queryHash === selectedQueryHash())
1830
+ const query = queryCache().get(selectedQueryHash() ?? '')
1924
1831
  if (!query) return 'inactive'
1925
1832
  return getQueryStatusLabel(query)
1926
1833
  })
1927
1834
 
1928
1835
  const queryStatus = createSubscribeToQueryCacheBatcher((queryCache) => {
1929
- const query = queryCache()
1930
- .getAll()
1931
- .find((q) => q.queryHash === selectedQueryHash())
1836
+ const query = queryCache().get(selectedQueryHash() ?? '')
1932
1837
  if (!query) return 'pending'
1933
1838
  return query.state.status
1934
1839
  })
@@ -1936,8 +1841,7 @@ const QueryDetails = () => {
1936
1841
  const observerCount = createSubscribeToQueryCacheBatcher(
1937
1842
  (queryCache) =>
1938
1843
  queryCache()
1939
- .getAll()
1940
- .find((query) => query.queryHash === selectedQueryHash())
1844
+ .get(selectedQueryHash() ?? '')
1941
1845
  ?.getObserversCount() ?? 0,
1942
1846
  )
1943
1847
 
@@ -2314,7 +2218,8 @@ const QueryDetails = () => {
2314
2218
  }}
2315
2219
  class="tsqd-query-details-explorer-container tsqd-query-details-data-explorer"
2316
2220
  >
2317
- <Explorer
2221
+ <SearchableExplorer
2222
+ searchKey={activeQuery()}
2318
2223
  label="Data"
2319
2224
  defaultExpanded={['Data']}
2320
2225
  value={activeQueryStateData()}
@@ -2569,7 +2474,8 @@ const MutationDetails = () => {
2569
2474
  }}
2570
2475
  class="tsqd-query-details-explorer-container tsqd-query-details-query-explorer"
2571
2476
  >
2572
- <Explorer
2477
+ <SearchableExplorer
2478
+ searchKey={activeMutation()}
2573
2479
  label="Data"
2574
2480
  defaultExpanded={['Data']}
2575
2481
  value={activeMutation()!.state.data}
@@ -2820,6 +2726,8 @@ const stylesFactory = (
2820
2726
  z-index: 9999;
2821
2727
  display: flex;
2822
2728
  height: 100%;
2729
+ flex: 1 1 500px;
2730
+ min-height: 0;
2823
2731
  gap: ${tokens.size[0.5]};
2824
2732
  & * {
2825
2733
  box-sizing: border-box;
@@ -3333,6 +3241,7 @@ const stylesFactory = (
3333
3241
  `,
3334
3242
  overflowQueryContainer: css`
3335
3243
  flex: 1;
3244
+ min-height: 0;
3336
3245
  overflow-y: auto;
3337
3246
  & > div {
3338
3247
  display: flex;
@@ -3341,6 +3250,7 @@ const stylesFactory = (
3341
3250
  `,
3342
3251
  queryRow: css`
3343
3252
  display: flex;
3253
+ width: 100%;
3344
3254
  align-items: center;
3345
3255
  padding: 0;
3346
3256
  border: none;