UNPKG

react-native-react-query-devtools

Version:
2 lines (1 loc) 48 kB
"use strict";var Mt=Object.create;var ye=Object.defineProperty;var Ft=Object.getOwnPropertyDescriptor;var Dt=Object.getOwnPropertyNames;var Bt=Object.getPrototypeOf,Et=Object.prototype.hasOwnProperty;var At=(e,n)=>{for(var r in n)ye(e,r,{get:n[r],enumerable:!0})},Ze=(e,n,r,i)=>{if(n&&typeof n=="object"||typeof n=="function")for(let s of Dt(n))!Et.call(e,s)&&s!==r&&ye(e,s,{get:()=>n[s],enumerable:!(i=Ft(n,s))||i.enumerable});return e};var ge=(e,n,r)=>(r=e!=null?Mt(Bt(e)):{},Ze(n||!e||!e.__esModule?ye(r,"default",{value:e,enumerable:!0}):r,e)),Vt=e=>Ze(ye({},"__esModule",{value:!0}),e);var $t={};At($t,{DevToolsBubble:()=>Tt});module.exports=Vt($t);var St=require("react"),U=require("react-native");var wt=require("react"),g=require("react-native");var fe=require("react"),O=require("react-native");function $(e){return e.state.fetchStatus==="fetching"?"fetching":e.getObserversCount()?e.state.fetchStatus==="paused"?"paused":e.isStale()?"stale":"fresh":"inactive"}var Qt={fresh:{backgroundColor:"#A6F4C5"},stale:{backgroundColor:"#FEDF89"},fetching:{backgroundColor:"#B2DDFF"},paused:{backgroundColor:"#D9D6FE"},noObserver:{backgroundColor:"#EAECF0"},inactive:{backgroundColor:"#FEDF89"}};function $e(e){let n={backgroundColor:"#EAECF0"};return Qt[e]||n}var z=require("react-native");var L=(e,n=!1)=>JSON.stringify(e,(()=>{let i=new WeakSet;return(s,d)=>{if(typeof d=="object"&&d!==null){if(i.has(d))return"[Circular]";i.add(d)}return d}})(),n?2:void 0);var ee=require("react/jsx-runtime");function Se({query:e,setSelected:n,selected:r}){return(0,ee.jsxs)(z.TouchableOpacity,{onPress:()=>{n(e===r?void 0:e)},style:[le.touchableOpacityBase,r?.queryKey===e.queryKey&&le.touchableOpacitySelected],children:[(0,ee.jsx)(z.Text,{style:[le.textBase,$e($(e))],children:`${e.getObserversCount()}`}),(0,ee.jsx)(z.Text,{style:le.queryKeyText,children:`${L(e.queryKey,!1)}`}),e.isDisabled()&&(0,ee.jsx)(z.Text,{style:le.disabledText,children:"disabled"})]})}var le=z.StyleSheet.create({touchableOpacityBase:{flexDirection:"row",alignItems:"center",justifyContent:"center",backgroundColor:"white",borderBottomWidth:1,borderBottomColor:"#d0d5dd"},touchableOpacitySelected:{backgroundColor:"#eaecf0"},textBase:{textAlign:"center",minWidth:30,maxWidth:30,paddingVertical:6,fontSize:12},queryKeyText:{flex:1,flexDirection:"row",paddingVertical:1,paddingHorizontal:2,fontSize:12,paddingLeft:5},disabledText:{fontSize:12,paddingVertical:6,paddingHorizontal:2,color:"#1d2939",backgroundColor:"#d0d5dd",borderBottomWidth:1,borderBottomColor:"#d0d5dd"}});var he=require("react"),_e=require("@tanstack/react-query");function Rt(){let e=(0,_e.useQueryClient)(),[n,r]=(0,he.useState)([]);return(0,he.useEffect)(()=>{let i=()=>{let d=e.getQueryCache().findAll();setTimeout(()=>{r(d)},1)};i();let s=e.getQueryCache().subscribe(i);return()=>s()},[e]),n}var Je=Rt;var te=require("react-native"),Te=require("react/jsx-runtime"),Wt={fresh:"#D1FADF",stale:"#FEF0C7",fetching:"#D1E9FF",paused:"#EBE9FE",noObserver:"#F2F4F7"},Ot={fresh:"#32D583",stale:"#FDB022",fetching:"#53B1FD",paused:"#9B8AFB",noObserver:"#344054"},Pt={fresh:"#027A48",stale:"#B54708",fetching:"#175CD3",paused:"#5925DC",noObserver:"#344054"};function Le({query:e}){let n=$(e),r=Wt[n],i=Ot[n],s=Pt[n];return(0,Te.jsx)(te.View,{style:[Xe.container,{backgroundColor:r,borderColor:i}],children:(0,Te.jsx)(te.Text,{style:[Xe.text,{color:s}],children:n})})}var Xe=te.StyleSheet.create({container:{padding:8,borderWidth:1,borderRadius:4,margin:4},text:{fontSize:12}});var C=require("react-native");var b=require("react/jsx-runtime");function ve({query:e}){if(e===void 0)return null;let n=new Date(e.state.dataUpdatedAt).toLocaleTimeString();return(0,b.jsxs)(C.View,{style:_.minWidth,children:[(0,b.jsx)(C.Text,{style:_.headerText,children:"Query Details"}),(0,b.jsxs)(C.View,{style:_.row,children:[(0,b.jsx)(C.ScrollView,{horizontal:!0,style:_.flexOne,children:(0,b.jsx)(C.Text,{style:_.queryKeyText,children:L(e.queryKey,!0)})}),(0,b.jsx)(Le,{query:e})]}),(0,b.jsxs)(C.View,{style:_.row,children:[(0,b.jsx)(C.Text,{children:" Observers:"}),(0,b.jsx)(C.Text,{children:`${e.getObserversCount()}`})]}),(0,b.jsxs)(C.View,{style:_.row,children:[(0,b.jsx)(C.Text,{children:" Last Updated:"}),(0,b.jsx)(C.Text,{children:`${n}`})]})]})}var _=C.StyleSheet.create({minWidth:{minWidth:200,fontSize:12},headerText:{textAlign:"left",backgroundColor:"#EAECF0",padding:4},row:{flexDirection:"row",justifyContent:"space-between",padding:4},flexOne:{flex:1},queryKeyText:{flexWrap:"wrap",alignItems:"center"}});var et=require("@tanstack/react-query");var G=require("react-native"),de=require("react/jsx-runtime"),It={btnRefetch:"#1570EF",btnInvalidate:"#DC6803",btnReset:"#475467",btnRemove:"#db2777",btnTriggerLoading:"#0891b2",btnTriggerLoadiError:"#ef4444"},Ut={btnRefetch:"#1570EF",btnInvalidate:"#DC6803",btnReset:"#475467",btnRemove:"#db2777",btnTriggerLoading:"#0891b2",btnTriggerLoadiError:"#ef4444"};function j({onClick:e,text:n,textColorClass:r,bgColorClass:i,disabled:s}){let d=It[i],h=Ut[r]||"#FFFFFF";return(0,de.jsxs)(G.TouchableOpacity,{disabled:s,onPress:e,style:[Me.button,{opacity:s?.6:1}],children:[(0,de.jsx)(G.View,{style:[Me.dot,{backgroundColor:h}]}),(0,de.jsx)(G.Text,{style:[Me.text,{color:h,opacity:s?.6:1}],children:n})]})}var Me=G.StyleSheet.create({button:{flexDirection:"row",alignItems:"center",justifyContent:"center",borderRadius:4,borderWidth:1,borderColor:"#d0d5dd",backgroundColor:"#f2f4f7",height:30,margin:4,paddingHorizontal:8,paddingVertical:4},dot:{width:6,height:6,borderRadius:999,marginRight:4},text:{fontSize:12,fontWeight:"400"}});function Fe({query:e}){if(e.state.data===void 0){let n=e.state.fetchMeta.__previousQueryOptions;n&&e.fetch(n,{cancelRefetch:!0})}else{let n=e.options;e.fetch({...n,queryFn:()=>new Promise(()=>{}),gcTime:-1}),e.setState({data:void 0,status:"pending",fetchMeta:{...e.state.fetchMeta,__previousQueryOptions:n}})}}function De({query:e}){e.fetch()}function Be({query:e,queryClient:n}){n.resetQueries({queryKey:e.queryKey,exact:!0})}function Ee({query:e,queryClient:n}){n.removeQueries(e)}function Ae({query:e}){e.invalidate()}function Ve({query:e,queryClient:n}){let r=()=>{if(!e)return;let s=[{name:"Network Error",initializer:()=>new Error("Network error occurred")}][0]?.initializer(e)??new Error("Unknown error from devtools"),d=e.options;e.setState({...e.state,status:"error",error:s,fetchMeta:{...e.state.fetchMeta,__previousQueryOptions:d}})};e.state.status!=="error"?r():n.resetQueries(e)}var oe=require("react-native"),E=require("react/jsx-runtime");function Qe({query:e,setSelectedQuery:n}){let r=(0,et.useQueryClient)();if(e===void 0)return null;let i=e.state.status;return(0,E.jsxs)(oe.View,{style:Ye.container,children:[(0,E.jsx)(oe.Text,{style:Ye.headerText,children:"Actions"}),(0,E.jsx)(j,{disabled:$(e)==="fetching",onClick:()=>{De({query:e})},bgColorClass:"btnRefetch",text:"Refetch",textColorClass:"btnRefetch"}),(0,E.jsx)(j,{disabled:i==="pending",onClick:()=>{Ae({query:e})},bgColorClass:"btnInvalidate",text:"Invalidate",textColorClass:"btnInvalidate"}),(0,E.jsx)(j,{disabled:i==="pending",onClick:()=>{Be({queryClient:r,query:e})},bgColorClass:"btnReset",text:"Reset",textColorClass:"btnReset"}),(0,E.jsx)(j,{disabled:$(e)==="fetching",onClick:()=>{Ee({queryClient:r,query:e}),n(void 0)},bgColorClass:"btnRemove",text:"Remove",textColorClass:"btnRemove"}),(0,E.jsx)(j,{disabled:!1,onClick:()=>{Fe({query:e})},bgColorClass:"btnTriggerLoading",text:e.state.data===void 0?"Restore Loading":"Trigger Loading",textColorClass:"btnTriggerLoading"}),(0,E.jsx)(j,{disabled:i==="pending",onClick:()=>{Ve({query:e,queryClient:r})},bgColorClass:"btnTriggerLoadiError",text:i==="error"?"Restore":"Trigger Error",textColorClass:"btnTriggerLoadiError"})]})}var Ye=oe.StyleSheet.create({container:{minWidth:50,fontSize:12,flexDirection:"row",flexWrap:"wrap"},headerText:{textAlign:"left",backgroundColor:"#EAECF0",padding:4,width:"100%"}});var K=require("react"),ue=require("@tanstack/react-query");var t=ge(require("react-native-svg")),o=require("react/jsx-runtime");function tt(){return(0,o.jsx)(t.default,{width:16,height:16,viewBox:"0 0 24 24",fill:"none",children:(0,o.jsx)(t.Path,{d:"M9 3h6M3 6h18m-2 0l-.701 10.52c-.105 1.578-.158 2.367-.499 2.965a3 3 0 01-1.298 1.215c-.62.3-1.41.3-2.993.3h-3.018c-1.582 0-2.373 0-2.993-.3A3 3 0 016.2 19.485c-.34-.598-.394-1.387-.499-2.966L5 6m5 4.5v5m4-5v5",stroke:"#667085"})})}function ot(){return(0,o.jsx)(t.default,{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",children:(0,o.jsx)(t.Path,{d:"M8 8V5.2C8 4.0799 8 3.51984 8.21799 3.09202C8.40973 2.71569 8.71569 2.40973 9.09202 2.21799C9.51984 2 10.0799 2 11.2 2H18.8C19.9201 2 20.4802 2 20.908 2.21799C21.2843 2.40973 21.5903 2.71569 21.782 3.09202C22 3.51984 22 4.0799 22 5.2V12.8C22 13.9201 22 14.4802 21.782 14.908C21.5903 15.2843 21.2843 15.5903 20.908 15.782C20.4802 16 19.9201 16 18.8 16H16M5.2 22H12.8C13.9201 22 14.4802 22 14.908 21.782C15.2843 21.5903 15.5903 21.2843 15.782 20.908C16 20.4802 16 19.9201 16 18.8V11.2C16 10.0799 16 9.51984 15.782 9.09202C15.5903 8.71569 15.2843 8.40973 14.908 8.21799C14.4802 8 13.9201 8 12.8 8H5.2C4.0799 8 3.51984 8 3.09202 8.21799C2.71569 8.40973 2.40973 8.71569 2.21799 9.09202C2 9.51984 2 10.0799 2 11.2V18.8C2 19.9201 2 20.4802 2.21799 20.908C2.40973 21.2843 2.71569 21.5903 3.09202 21.782C3.51984 22 4.07989 22 5.2 22Z",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",stroke:"#667085"})})}function rt(e){return(0,o.jsx)(t.default,{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",children:(0,o.jsx)(t.Path,{d:"M7.5 12L10.5 15L16.5 9M7.8 21H16.2C17.8802 21 18.7202 21 19.362 20.673C19.9265 20.3854 20.3854 19.9265 20.673 19.362C21 18.7202 21 17.8802 21 16.2V7.8C21 6.11984 21 5.27976 20.673 4.63803C20.3854 4.07354 19.9265 3.6146 19.362 3.32698C18.7202 3 17.8802 3 16.2 3H7.8C6.11984 3 5.27976 3 4.63803 3.32698C4.07354 3.6146 3.6146 4.07354 3.32698 4.63803C3 5.27976 3 6.11984 3 7.8V16.2C3 17.8802 3 18.7202 3.32698 19.362C3.6146 19.9265 4.07354 20.3854 4.63803 20.673C5.27976 21 6.11984 21 7.8 21Z",stroke:e.theme==="dark"?"#12B76A":"#027A48",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})})}function nt(){return(0,o.jsx)(t.default,{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",children:(0,o.jsx)(t.Path,{d:"M9 9L15 15M15 9L9 15M7.8 21H16.2C17.8802 21 18.7202 21 19.362 20.673C19.9265 20.3854 20.3854 19.9265 20.673 19.362C21 18.7202 21 17.8802 21 16.2V7.8C21 6.11984 21 5.27976 20.673 4.63803C20.3854 4.07354 19.9265 3.6146 19.362 3.32698C18.7202 3 17.8802 3 16.2 3H7.8C6.11984 3 5.27976 3 4.63803 3.32698C4.07354 3.6146 3.6146 4.07354 3.32698 4.63803C3 5.27976 3 6.11984 3 7.8V16.2C3 17.8802 3 18.7202 3.32698 19.362C3.6146 19.9265 4.07354 20.3854 4.63803 20.673C5.27976 21 6.11984 21 7.8 21Z",stroke:"#F04438",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})})}function it(){return(0,o.jsxs)(t.default,{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"#667085",strokeWidth:"2",children:[(0,o.jsx)(t.Rect,{width:"20",height:"20",y:"2",x:"2",rx:"2"}),(0,o.jsx)(t.Line,{y1:"7",y2:"7",x1:"6",x2:"18"}),(0,o.jsx)(t.Line,{y2:"12",y1:"12",x1:"6",x2:"18"}),(0,o.jsx)(t.Line,{y1:"17",y2:"17",x1:"6",x2:"18"})]})}function st(e){return(0,o.jsx)(o.Fragment,{children:e.checked?(0,o.jsx)(t.default,{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",children:(0,o.jsx)(t.Path,{d:"M7.5 12L10.5 15L16.5 9M7.8 21H16.2C17.8802 21 18.7202 21 19.362 20.673C19.9265 20.3854 20.3854 19.9265 20.673 19.362C21 18.7202 21 17.8802 21 16.2V7.8C21 6.11984 21 5.27976 20.673 4.63803C20.3854 4.07354 19.9265 3.6146 19.362 3.32698C18.7202 3 17.8802 3 16.2 3H7.8C6.11984 3 5.27976 3 4.63803 3.32698C4.07354 3.6146 3.6146 4.07354 3.32698 4.63803C3 5.27976 3 6.11984 3 7.8V16.2C3 17.8802 3 18.7202 3.32698 19.362C3.6146 19.9265 4.07354 20.3854 4.63803 20.673C5.27976 21 6.11984 21 7.8 21Z",stroke:e.theme==="dark"?"#9B8AFB":"#6938EF",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})}):(0,o.jsx)(t.default,{viewBox:"0 0 24 24",height:"20",width:"20",fill:"none",children:(0,o.jsx)(t.Path,{d:"M3 7.8c0-1.68 0-2.52.327-3.162a3 3 0 0 1 1.311-1.311C5.28 3 6.12 3 7.8 3h8.4c1.68 0 2.52 0 3.162.327a3 3 0 0 1 1.311 1.311C21 5.28 21 6.12 21 7.8v8.4c0 1.68 0 2.52-.327 3.162a3 3 0 0 1-1.311 1.311C18.72 21 17.88 21 16.2 21H7.8c-1.68 0-2.52 0-3.162-.327a3 3 0 0 1-1.311-1.311C3 18.72 3 17.88 3 16.2V7.8Z",stroke:e.theme==="dark"?"#9B8AFB":"#6938EF",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})})})}function at(){return(0,o.jsx)(t.default,{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",children:(0,o.jsx)(t.Path,{d:"M7.5 12L10.5 15L16.5 9M22 12C22 17.5228 17.5228 22 12 22C6.47715 22 2 17.5228 2 12C2 6.47715 6.47715 2 12 2C17.5228 2 22 6.47715 22 12Z",stroke:"#027A48",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})})}function lt(){return(0,o.jsx)(t.default,{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",children:(0,o.jsx)(t.Path,{d:"M12 2V6M12 18V22M6 12H2M22 12H18M19.0784 19.0784L16.25 16.25M19.0784 4.99994L16.25 7.82837M4.92157 19.0784L7.75 16.25M4.92157 4.99994L7.75 7.82837",stroke:"#B54708",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})})}function dt(){return(0,o.jsx)(t.default,{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",children:(0,o.jsx)(t.Path,{d:"M15 9L9 15M9 9L15 15M22 12C22 17.5228 17.5228 22 12 22C6.47715 22 2 17.5228 2 12C2 6.47715 6.47715 2 12 2C17.5228 2 22 6.47715 22 12Z",stroke:"#b91c1c",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})})}function ut(){return(0,o.jsx)(t.default,{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",children:(0,o.jsx)(t.Path,{d:"M9.5 15V9M14.5 15V9M22 12C22 17.5228 17.5228 22 12 22C6.47715 22 2 17.5228 2 12C2 6.47715 6.47715 2 12 2C17.5228 2 22 6.47715 22 12Z",stroke:"#5925DC",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})})}function ct(){return(0,o.jsxs)(t.default,{height:"100%",width:"100%",style:{position:"absolute"},viewBox:"0 0 633 633",children:[(0,o.jsxs)(t.LinearGradient,{x1:-666.45,x2:-666.45,y1:163.28,y2:163.99,gradientTransform:"matrix(633 0 0 633 422177 -103358)",gradientUnits:"userSpaceOnUse",id:"a",children:[(0,o.jsx)(t.Stop,{stopColor:"#6BDAFF",offset:0}),(0,o.jsx)(t.Stop,{stopColor:"#F9FFB5",offset:.32}),(0,o.jsx)(t.Stop,{stopColor:"#FFA770",offset:.71}),(0,o.jsx)(t.Stop,{stopColor:"#FF7373",offset:1})]}),(0,o.jsx)(t.Circle,{cx:316.5,cy:316.5,r:316.5,fill:"url(#a)"}),(0,o.jsx)(t.Defs,{}),(0,o.jsx)(t.Mask,{x:-137.5,y:412,width:454,height:396.9,maskUnits:"userSpaceOnUse",id:"c",children:(0,o.jsx)(t.G,{filter:"url(#b)",children:(0,o.jsx)(t.Circle,{cx:316.5,cy:316.5,r:316.5,fill:"#fff"})})}),(0,o.jsx)(t.G,{mask:"url(#c)",children:(0,o.jsx)(t.Ellipse,{cx:89.5,cy:610.5,rx:214.5,ry:186,fill:"#015064",stroke:"#00CFE2",strokeWidth:25})}),(0,o.jsx)(t.Defs,{}),(0,o.jsx)(t.Mask,{x:316.5,y:412,width:454,height:396.9,maskUnits:"userSpaceOnUse",id:"e",children:(0,o.jsx)(t.G,{filter:"url(#d)",children:(0,o.jsx)(t.Circle,{cx:316.5,cy:316.5,r:316.5,fill:"#fff"})})}),(0,o.jsx)(t.G,{mask:"url(#e)",children:(0,o.jsx)(t.Ellipse,{cx:543.5,cy:610.5,rx:214.5,ry:186,fill:"#015064",stroke:"#00CFE2",strokeWidth:25})}),(0,o.jsx)(t.Defs,{}),(0,o.jsx)(t.Mask,{x:-137.5,y:450,width:454,height:396.9,maskUnits:"userSpaceOnUse",id:"g",children:(0,o.jsx)(t.G,{filter:"url(#f)",children:(0,o.jsx)(t.Circle,{cx:316.5,cy:316.5,r:316.5,fill:"#fff"})})}),(0,o.jsx)(t.G,{mask:"url(#g)",children:(0,o.jsx)(t.Ellipse,{cx:89.5,cy:648.5,rx:214.5,ry:186,fill:"#015064",stroke:"#00A8B8",strokeWidth:25})}),(0,o.jsx)(t.Defs,{}),(0,o.jsx)(t.Mask,{x:316.5,y:450,width:454,height:396.9,maskUnits:"userSpaceOnUse",id:"i",children:(0,o.jsx)(t.G,{filter:"url(#h)",children:(0,o.jsx)(t.Circle,{cx:316.5,cy:316.5,r:316.5,fill:"#fff"})})}),(0,o.jsx)(t.G,{mask:"url(#i)",children:(0,o.jsx)(t.Ellipse,{cx:543.5,cy:648.5,rx:214.5,ry:186,fill:"#015064",stroke:"#00A8B8",strokeWidth:25})}),(0,o.jsx)(t.Defs,{}),(0,o.jsx)(t.Mask,{x:-137.5,y:486,width:454,height:396.9,maskUnits:"userSpaceOnUse",id:"k",children:(0,o.jsx)(t.G,{filter:"url(#j)",children:(0,o.jsx)(t.Circle,{cx:316.5,cy:316.5,r:316.5,fill:"#fff"})})}),(0,o.jsx)(t.G,{mask:"url(#k)",children:(0,o.jsx)(t.Ellipse,{cx:89.5,cy:684.5,rx:214.5,ry:186,fill:"#015064",stroke:"#007782",strokeWidth:25})}),(0,o.jsx)(t.Defs,{}),(0,o.jsx)(t.Mask,{x:316.5,y:486,width:454,height:396.9,maskUnits:"userSpaceOnUse",id:"m",children:(0,o.jsx)(t.G,{filter:"url(#l)",children:(0,o.jsx)(t.Circle,{cx:316.5,cy:316.5,r:316.5,fill:"#fff"})})}),(0,o.jsx)(t.G,{mask:"url(#m)",children:(0,o.jsx)(t.Ellipse,{cx:543.5,cy:684.5,rx:214.5,ry:186,fill:"#015064",stroke:"#007782",strokeWidth:25})}),(0,o.jsx)(t.Defs,{}),(0,o.jsx)(t.Mask,{x:272.2,y:308,width:176.9,height:129.3,maskUnits:"userSpaceOnUse",id:"o",children:(0,o.jsx)(t.G,{filter:"url(#n)",children:(0,o.jsx)(t.Circle,{cx:316.5,cy:316.5,r:316.5,fill:"#fff"})})}),(0,o.jsxs)(t.G,{mask:"url(#o)",children:[(0,o.jsx)(t.Path,{fill:"none",stroke:"#000",strokeLinecap:"round",strokeLinejoin:"bevel",strokeWidth:11,d:"M436 403.2L431 431.8"}),(0,o.jsx)(t.Path,{fill:"none",stroke:"#000",strokeLinecap:"round",strokeLinejoin:"bevel",strokeWidth:11,d:"M291 341.5L280 403.5"}),(0,o.jsx)(t.Path,{fill:"none",stroke:"#000",strokeLinecap:"round",strokeLinejoin:"bevel",strokeWidth:11,d:"M332.9 384.1L328.6 411.2"}),(0,o.jsxs)(t.LinearGradient,{x1:-670.75,x2:-671.59,y1:164.4,y2:164.49,gradientTransform:"matrix(-184.16 -32.472 -11.461 64.997 -121359 -32126)",gradientUnits:"userSpaceOnUse",id:"p",children:[(0,o.jsx)(t.Stop,{stopColor:"#EE2700",offset:0}),(0,o.jsx)(t.Stop,{stopColor:"#FF008E",offset:1})]}),(0,o.jsx)(t.Path,{d:"M344.1 363l97.7 17.2c5.8 2.1 8.2 6.1 7.1 12.1s-4.7 9.2-11 9.9l-106-18.7-57.5-59.2c-3.2-4.8-2.9-9.1.8-12.8s8.3-4.4 13.7-2.1l55.2 53.6z",clipRule:"evenodd",fillRule:"evenodd",fill:"url(#p)"}),(0,o.jsx)(t.Path,{fill:"none",stroke:"#fff",strokeLinecap:"round",strokeLinejoin:"bevel",strokeWidth:7,d:"M428.2 384.5L429.1 378"}),(0,o.jsx)(t.Path,{fill:"none",stroke:"#fff",strokeLinecap:"round",strokeLinejoin:"bevel",strokeWidth:7,d:"M395.2 379.5L396.1 373"}),(0,o.jsx)(t.Path,{fill:"none",stroke:"#fff",strokeLinecap:"round",strokeLinejoin:"bevel",strokeWidth:7,d:"M362.2 373.5L363.1 367.4"}),(0,o.jsx)(t.Path,{fill:"none",stroke:"#fff",strokeLinecap:"round",strokeLinejoin:"bevel",strokeWidth:7,d:"M324.2 351.3L328.4 347.4"}),(0,o.jsx)(t.Path,{fill:"none",stroke:"#fff",strokeLinecap:"round",strokeLinejoin:"bevel",strokeWidth:7,d:"M303.2 331.3L307.4 327.4"})]}),(0,o.jsx)(t.Defs,{}),(0,o.jsx)(t.Mask,{x:73.2,y:113.8,width:280.6,height:317.4,maskUnits:"userSpaceOnUse",id:"r",children:(0,o.jsx)(t.G,{filter:"url(#q)",children:(0,o.jsx)(t.Circle,{cx:316.5,cy:316.5,r:316.5,fill:"#fff"})})}),(0,o.jsxs)(t.G,{mask:"url(#r)",children:[(0,o.jsxs)(t.LinearGradient,{x1:-672.16,x2:-672.16,y1:165.03,y2:166.03,gradientTransform:"matrix(-100.18 48.861 97.976 200.88 -83342 -93.059)",gradientUnits:"userSpaceOnUse",id:"s",children:[(0,o.jsx)(t.Stop,{stopColor:"#A17500",offset:0}),(0,o.jsx)(t.Stop,{stopColor:"#5D2100",offset:1})]}),(0,o.jsx)(t.Path,{d:"M192.3 203c8.1 37.3 14 73.6 17.8 109.1 3.8 35.4 2.8 75.1-3 119.2l61.2-16.7c-15.6-59-25.2-97.9-28.6-116.6s-10.8-51.9-22.1-99.6l-25.3 4.6",clipRule:"evenodd",fillRule:"evenodd",fill:"url(#s)"}),(0,o.jsxs)(t.G,{stroke:"#2F8A00",children:[(0,o.jsxs)(t.LinearGradient,{x1:-660.23,x2:-660.23,y1:166.72,y2:167.72,gradientTransform:"matrix(92.683 4.8573 -2.0259 38.657 61680 -3088.6)",gradientUnits:"userSpaceOnUse",id:"t",children:[(0,o.jsx)(t.Stop,{stopColor:"#2F8A00",offset:0}),(0,o.jsx)(t.Stop,{stopColor:"#90FF57",offset:1})]}),(0,o.jsx)(t.Path,{d:"M195 183.9s-12.6-22.1-36.5-29.9c-15.9-5.2-34.4-1.5-55.5 11.1 15.9 14.3 29.5 22.6 40.7 24.9 16.8 3.6 51.3-6.1 51.3-6.1z",clipRule:"evenodd",fillRule:"evenodd",strokeWidth:13,fill:"url(#t)"}),(0,o.jsxs)(t.LinearGradient,{x1:-661.36,x2:-661.36,y1:164.18,y2:165.18,gradientTransform:"matrix(110 5.7648 -6.3599 121.35 73933 -15933)",gradientUnits:"userSpaceOnUse",id:"u",children:[(0,o.jsx)(t.Stop,{stopColor:"#2F8A00",offset:0}),(0,o.jsx)(t.Stop,{stopColor:"#90FF57",offset:1})]}),(0,o.jsx)(t.Path,{d:"M194.9 184.5s-47.5-8.5-83.2 15.7c-23.8 16.2-34.3 49.3-31.6 99.4 30.3-27.8 52.1-48.5 65.2-61.9 19.8-20.2 49.6-53.2 49.6-53.2z",clipRule:"evenodd",fillRule:"evenodd",strokeWidth:13,fill:"url(#u)"}),(0,o.jsxs)(t.LinearGradient,{x1:-656.79,x2:-656.79,y1:165.15,y2:166.15,gradientTransform:"matrix(62.954 3.2993 -3.5023 66.828 42156 -8754.1)",gradientUnits:"userSpaceOnUse",id:"v",children:[(0,o.jsx)(t.Stop,{stopColor:"#2F8A00",offset:0}),(0,o.jsx)(t.Stop,{stopColor:"#90FF57",offset:1})]}),(0,o.jsx)(t.Path,{d:"M195 183.9c-.8-21.9 6-38 20.6-48.2s29.8-15.4 45.5-15.3c-6.1 21.4-14.5 35.8-25.2 43.4S211.5 178 195 183.9z",clipRule:"evenodd",fillRule:"evenodd",strokeWidth:13,fill:"url(#v)"}),(0,o.jsxs)(t.LinearGradient,{x1:-663.07,x2:-663.07,y1:165.44,y2:166.44,gradientTransform:"matrix(152.47 7.9907 -3.0936 59.029 101884 -4318.7)",gradientUnits:"userSpaceOnUse",id:"w",children:[(0,o.jsx)(t.Stop,{stopColor:"#2F8A00",offset:0}),(0,o.jsx)(t.Stop,{stopColor:"#90FF57",offset:1})]}),(0,o.jsx)(t.Path,{d:"M194.9 184.5c31.9-30 64.1-39.7 96.7-29s50.8 30.4 54.6 59.1c-35.2-5.5-60.4-9.6-75.8-12.1-15.3-2.6-40.5-8.6-75.5-18z",clipRule:"evenodd",fillRule:"evenodd",strokeWidth:13,fill:"url(#w)"}),(0,o.jsxs)(t.LinearGradient,{x1:-662.57,x2:-662.57,y1:164.44,y2:165.44,gradientTransform:"matrix(136.46 7.1517 -5.2163 99.533 91536 -11442)",gradientUnits:"userSpaceOnUse",id:"x",children:[(0,o.jsx)(t.Stop,{stopColor:"#2F8A00",offset:0}),(0,o.jsx)(t.Stop,{stopColor:"#90FF57",offset:1})]}),(0,o.jsx)(t.Path,{d:"M194.9 184.5c35.8-7.6 65.6-.2 89.2 22s37.7 49 42.3 80.3c-39.8-9.7-68.3-23.8-85.5-42.4s-32.5-38.5-46-59.9z",clipRule:"evenodd",fillRule:"evenodd",strokeWidth:13,fill:"url(#x)"}),(0,o.jsxs)(t.LinearGradient,{x1:-656.43,x2:-656.43,y1:163.86,y2:164.86,gradientTransform:"matrix(60.866 3.1899 -8.7773 167.48 41560 -25168)",gradientUnits:"userSpaceOnUse",id:"y",children:[(0,o.jsx)(t.Stop,{stopColor:"#2F8A00",offset:0}),(0,o.jsx)(t.Stop,{stopColor:"#90FF57",offset:1})]}),(0,o.jsx)(t.Path,{d:"M194.9 184.5c-33.6 13.8-53.6 35.7-60.1 65.6s-3.6 63.1 8.7 99.6c27.4-40.3 43.2-69.6 47.4-88s5.6-44.1 4-77.2z",clipRule:"evenodd",fillRule:"evenodd",strokeWidth:13,fill:"url(#y)"}),(0,o.jsx)(t.Path,{d:"M196.5 182.3c-14.8 21.6-25.1 41.4-30.8 59.4s-9.5 33-11.1 45.1",fill:"none",strokeLinecap:"round",strokeWidth:8}),(0,o.jsx)(t.Path,{d:"M194.9 185.7c-24.4 1.7-43.8 9-58.1 21.8s-24.7 25.4-31.3 37.8M204.5 176.4c29.7-6.7 52-8.4 67-5.1s26.9 8.6 35.8 15.9M196.5 181.4c20.3 9.9 38.2 20.5 53.9 31.9s27.4 22.1 35.1 32",fill:"none",strokeLinecap:"round",strokeWidth:8})]})]}),(0,o.jsx)(t.Defs,{}),(0,o.jsx)(t.Mask,{x:50.5,y:399,width:532,height:633,maskUnits:"userSpaceOnUse",id:"A",children:(0,o.jsx)(t.G,{filter:"url(#z)",children:(0,o.jsx)(t.Circle,{cx:316.5,cy:316.5,r:316.5,fill:"#fff"})})}),(0,o.jsxs)(t.G,{mask:"url(#A)",children:[(0,o.jsxs)(t.LinearGradient,{x1:-666.06,x2:-666.23,y1:163.36,y2:163.75,gradientTransform:"matrix(532 0 0 633 354760 -102959)",gradientUnits:"userSpaceOnUse",id:"B",children:[(0,o.jsx)(t.Stop,{stopColor:"#FFF400",offset:0}),(0,o.jsx)(t.Stop,{stopColor:"#3C8700",offset:1})]}),(0,o.jsx)(t.Ellipse,{cx:316.5,cy:715.5,rx:266,ry:316.5,fill:"url(#B)"})]}),(0,o.jsx)(t.Defs,{}),(0,o.jsx)(t.Mask,{x:391,y:-24,width:288,height:283,maskUnits:"userSpaceOnUse",id:"D",children:(0,o.jsx)(t.G,{filter:"url(#C)",children:(0,o.jsx)(t.Circle,{cx:316.5,cy:316.5,r:316.5,fill:"#fff"})})}),(0,o.jsxs)(t.G,{mask:"url(#D)",children:[(0,o.jsxs)(t.LinearGradient,{x1:-664.56,x2:-664.56,y1:163.79,y2:164.79,gradientTransform:"matrix(227 0 0 227 151421 -37204)",gradientUnits:"userSpaceOnUse",id:"E",children:[(0,o.jsx)(t.Stop,{stopColor:"#FFDF00",offset:0}),(0,o.jsx)(t.Stop,{stopColor:"#FF9D00",offset:1})]}),(0,o.jsx)(t.Circle,{cx:565.5,cy:89.5,r:113.5,fill:"url(#E)"}),(0,o.jsxs)(t.LinearGradient,{x1:-644.5,x2:-645.77,y1:342,y2:342,gradientTransform:"matrix(30 0 0 1 19770 -253)",gradientUnits:"userSpaceOnUse",id:"F",children:[(0,o.jsx)(t.Stop,{stopColor:"#FFA400",offset:0}),(0,o.jsx)(t.Stop,{stopColor:"#FF5E00",offset:1})]}),(0,o.jsx)(t.Path,{fill:"none",strokeLinecap:"round",strokeLinejoin:"bevel",strokeWidth:12,stroke:"url(#F)",d:"M427 89L397 89"}),(0,o.jsxs)(t.LinearGradient,{x1:-641.56,x2:-642.83,y1:196.02,y2:196.07,gradientTransform:"matrix(26.5 0 0 5.5 17439 -1025.5)",gradientUnits:"userSpaceOnUse",id:"G",children:[(0,o.jsx)(t.Stop,{stopColor:"#FFA400",offset:0}),(0,o.jsx)(t.Stop,{stopColor:"#FF5E00",offset:1})]}),(0,o.jsx)(t.Path,{fill:"none",strokeLinecap:"round",strokeLinejoin:"bevel",strokeWidth:12,stroke:"url(#G)",d:"M430.5 55.5L404 50"}),(0,o.jsxs)(t.LinearGradient,{x1:-643.73,x2:-645,y1:185.83,y2:185.9,gradientTransform:"matrix(29 0 0 8 19107 -1361)",gradientUnits:"userSpaceOnUse",id:"H",children:[(0,o.jsx)(t.Stop,{stopColor:"#FFA400",offset:0}),(0,o.jsx)(t.Stop,{stopColor:"#FF5E00",offset:1})]}),(0,o.jsx)(t.Path,{fill:"none",strokeLinecap:"round",strokeLinejoin:"bevel",strokeWidth:12,stroke:"url(#H)",d:"M431 122L402 130"}),(0,o.jsxs)(t.LinearGradient,{x1:-638.94,x2:-640.22,y1:177.09,y2:177.39,gradientTransform:"matrix(24 0 0 13 15783 -2145)",gradientUnits:"userSpaceOnUse",id:"I",children:[(0,o.jsx)(t.Stop,{stopColor:"#FFA400",offset:0}),(0,o.jsx)(t.Stop,{stopColor:"#FF5E00",offset:1})]}),(0,o.jsx)(t.Path,{fill:"none",strokeLinecap:"round",strokeLinejoin:"bevel",strokeWidth:12,stroke:"url(#I)",d:"M442 153L418 166"}),(0,o.jsxs)(t.LinearGradient,{x1:-633.42,x2:-634.7,y1:172.41,y2:173.31,gradientTransform:"matrix(20 0 0 19 13137 -3096)",gradientUnits:"userSpaceOnUse",id:"J",children:[(0,o.jsx)(t.Stop,{stopColor:"#FFA400",offset:0}),(0,o.jsx)(t.Stop,{stopColor:"#FF5E00",offset:1})]}),(0,o.jsx)(t.Path,{fill:"none",strokeLinecap:"round",strokeLinejoin:"bevel",strokeWidth:12,stroke:"url(#J)",d:"M464 180L444 199"}),(0,o.jsxs)(t.LinearGradient,{x1:-619.05,x2:-619.52,y1:170.82,y2:171.82,gradientTransform:"matrix(13.83 0 0 22.85 9050 -3703.4)",gradientUnits:"userSpaceOnUse",id:"K",children:[(0,o.jsx)(t.Stop,{stopColor:"#FFA400",offset:0}),(0,o.jsx)(t.Stop,{stopColor:"#FF5E00",offset:1})]}),(0,o.jsx)(t.Path,{fill:"none",strokeLinecap:"round",strokeLinejoin:"bevel",strokeWidth:12,stroke:"url(#K)",d:"M491.4 203L477.5 225.9"}),(0,o.jsxs)(t.LinearGradient,{x1:-578.5,x2:-578.63,y1:170.31,y2:171.31,gradientTransform:"matrix(7.5 0 0 24.5 4860 -3953)",gradientUnits:"userSpaceOnUse",id:"L",children:[(0,o.jsx)(t.Stop,{stopColor:"#FFA400",offset:0}),(0,o.jsx)(t.Stop,{stopColor:"#FF5E00",offset:1})]}),(0,o.jsx)(t.Path,{fill:"none",strokeLinecap:"round",strokeLinejoin:"bevel",strokeWidth:12,stroke:"url(#L)",d:"M524.5 219.5L517 244"}),(0,o.jsxs)(t.LinearGradient,{x1:666.5,x2:666.5,y1:170.31,y2:171.31,gradientTransform:"matrix(.5 0 0 24.5 231.5 -3944)",gradientUnits:"userSpaceOnUse",id:"M",children:[(0,o.jsx)(t.Stop,{stopColor:"#FFA400",offset:0}),(0,o.jsx)(t.Stop,{stopColor:"#FF5E00",offset:1})]}),(0,o.jsx)(t.Path,{fill:"none",strokeLinecap:"round",strokeLinejoin:"bevel",strokeWidth:12,stroke:"url(#M)",d:"M564.5 228.5L565 253"})]})]})}var A=(e,n,r)=>{if(n.length===0)return r;if(e instanceof Map){let i=new Map(e);if(n.length===1)return i.set(n[0],r),i;let[s,...d]=n;return i.set(s,A(i.get(s),d,r)),i}if(e instanceof Set){let i=A(Array.from(e),n,r);return new Set(i)}if(Array.isArray(e)){let i=[...e];if(n.length===1)return i[n[0]]=r,i;let[s,...d]=n;return i[s]=A(i[s],d,r),i}if(e instanceof Object){let i={...e};if(n.length===1)return i[n[0]]=r,i;let[s,...d]=n;return i[s]=A(i[s],d,r),i}return e};var re=(e,n)=>{if(e instanceof Map){let r=new Map(e);if(n.length===1)return r.delete(n[0]),r;let[i,...s]=n;return r.set(i,re(r.get(i),s)),r}if(e instanceof Set){let r=re(Array.from(e),n);return new Set(r)}if(Array.isArray(e)){let r=[...e];if(n.length===1)return r.filter((d,h)=>h.toString()!==n[0]);let[i,...s]=n;return r[i]=re(r[i],s),r}if(e instanceof Object){let r={...e};if(n.length===1)return delete r[n[0]],r;let[i,...s]=n;return r[i]=re(r[i],s),r}return e};function Re({activeQuery:e,dataPath:n,queryClient:r}){if(!n){console.error("delete item data path is missing!");return}let i=e.state.data,s=re(i,n);r.setQueryData(e.queryKey,s)}var H=ge(require("react-native-svg")),l=require("react-native");var me=require("react"),We=(0,me.createContext)({}),ft=()=>(0,me.useContext)(We);var a=require("react/jsx-runtime");function pt(e){return Symbol.iterator in e}function zt(e,n){if(n<1)return[];let r=0,i=[];for(;r<e.length;)i.push(e.slice(r,r+n)),r=r+n;return i}var yt=({expanded:e})=>(0,a.jsx)(l.View,{style:[e?u.expanded:u.collapsed],children:(0,a.jsx)(H.default,{width:16,height:16,viewBox:"0 0 16 16",fill:"#98A2B3",children:(0,a.jsx)(H.Path,{d:"M6 12l4-4-4-4"})})}),Gt=({value:e})=>{let[n,r]=(0,K.useState)("NoCopy"),{onCopy:i}=ft(),s=async()=>{if(!i){l.Alert.alert("Warning","Copy functionality is not configured. Please add a copy function to DevToolsBubble. See documentation for setup instructions.");return}try{await i(JSON.stringify(e))?(r("SuccessCopy"),setTimeout(()=>r("NoCopy"),1500)):(r("ErrorCopy"),setTimeout(()=>r("NoCopy"),1500))}catch(d){console.error("Copy failed:",d),r("ErrorCopy"),setTimeout(()=>r("NoCopy"),1500)}};return(0,a.jsxs)(l.TouchableOpacity,{style:u.buttonStyle,"aria-label":n==="NoCopy"?"Copy object to clipboard":n==="SuccessCopy"?"Object copied to clipboard":"Error copying object to clipboard",onPress:n==="NoCopy"?s:void 0,children:[n==="NoCopy"&&(0,a.jsx)(ot,{}),n==="SuccessCopy"&&(0,a.jsx)(rt,{theme:"light"}),n==="ErrorCopy"&&(0,a.jsx)(nt,{})]})},gt=({dataPath:e,activeQuery:n})=>{let r=(0,ue.useQueryClient)();return n?(0,a.jsx)(l.TouchableOpacity,{onPress:()=>{Re({queryClient:r,activeQuery:n,dataPath:e})},style:u.buttonStyle1,accessibilityLabel:"Delete item",children:(0,a.jsx)(tt,{})}):null},jt=({dataPath:e,activeQuery:n})=>{let r=(0,ue.useQueryClient)();if(!n)return null;let i=()=>{let s=n.state.data,d=A(s,e,[]);r.setQueryData(n.queryKey,d)};return(0,a.jsx)(l.TouchableOpacity,{style:u.buttonStyle2,"aria-label":"Remove all items",onPress:i,children:(0,a.jsx)(it,{})})},Kt=({dataPath:e,activeQuery:n,value:r})=>{let i=(0,ue.useQueryClient)();if(!n)return null;let s=()=>{let d=n.state.data,h=A(d,e,!r);i.setQueryData(n.queryKey,h)};return(0,a.jsx)(l.TouchableOpacity,{style:u.buttonStyle3,"aria-label":"Toggle value",onPress:s,children:(0,a.jsx)(st,{checked:r,theme:"light"})})};function v({editable:e,label:n,value:r,defaultExpanded:i,activeQuery:s,dataPath:d,itemsDeletable:h}){let R=(0,ue.useQueryClient)(),[S,D]=(0,K.useState)((i||[]).includes(n)),Z=()=>D(f=>!f),[pe,ke]=(0,K.useState)([]),se=(0,K.useMemo)(()=>Array.isArray(r)?r.map((f,c)=>({label:c.toString(),value:f})):r!==null&&typeof r=="object"&&pt(r)?r instanceof Map?Array.from(r,([f,c])=>({label:f.toString(),value:c})):Array.from(r,(f,c)=>({label:c.toString(),value:f})):typeof r=="object"&&r!==null?Object.entries(r).map(([f,c])=>({label:f,value:c})):[],[r]),m=(0,K.useMemo)(()=>Array.isArray(r)?"array":r!==null&&typeof r=="object"&&pt(r)&&typeof r[Symbol.iterator]=="function"?"Iterable":typeof r=="object"&&r!==null?"object":typeof r,[r]),ae=(0,K.useMemo)(()=>zt(se,100),[se]),W=d??[],Lt=(f,c)=>{if(!s)return null;let B=s.state.data;if(f&&isNaN(Number(c)))return;let we=m==="number"?Number(c):c,vt=A(B,W,we);R.setQueryData(s.queryKey,vt)};return(0,a.jsx)(l.View,{style:u.minWidthWrapper,children:(0,a.jsxs)(l.View,{style:u.fullWidthMarginRight,children:[ae.length>0&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)(l.View,{style:u.flexRowItemsCenterGap,children:[(0,a.jsxs)(l.TouchableOpacity,{style:u.expanderButton,onPress:()=>Z(),children:[(0,a.jsx)(yt,{expanded:S}),(0,a.jsx)(l.Text,{children:n}),(0,a.jsx)(l.Text,{style:u.textGray500,children:`${String(m).toLowerCase()==="iterable"?"(Iterable) ":""}${se.length} ${se.length>1?"items":"item"}`})]}),e&&(0,a.jsxs)(l.View,{style:u.flexRowGapItemsCenter,children:[(0,a.jsx)(Gt,{value:r}),h&&s!==void 0&&(0,a.jsx)(gt,{activeQuery:s,dataPath:W}),m==="array"&&s!==void 0&&(0,a.jsx)(jt,{activeQuery:s,dataPath:W})]})]}),S&&(0,a.jsxs)(a.Fragment,{children:[ae.length===1&&(0,a.jsx)(l.View,{style:u.singleEntryContainer,children:se.map((f,c)=>(0,a.jsx)(v,{defaultExpanded:i,label:f.label,value:f.value,editable:e,dataPath:[...W,f.label],activeQuery:s,itemsDeletable:m==="array"||m==="Iterable"||m==="object"},f.label+c))}),ae.length>1&&(0,a.jsx)(l.View,{style:u.multiEntryContainer,children:ae.map((f,c)=>(0,a.jsx)(l.View,{children:(0,a.jsxs)(l.View,{style:u.relativeOutlineNone,children:[(0,a.jsxs)(l.TouchableOpacity,{onPress:()=>ke(B=>B.includes(c)?B.filter(we=>we!==c):[...B,c]),style:u.pageExpanderButton,children:[(0,a.jsx)(yt,{expanded:pe.includes(c)}),(0,a.jsxs)(l.Text,{children:["[",c*100,"...",c*100+99,"]"]})]}),pe.includes(c)&&(0,a.jsx)(l.View,{style:u.entriesContainer,children:f.map(B=>(0,a.jsx)(v,{defaultExpanded:i,label:B.label,value:B.value,editable:e,dataPath:[...W,B.label],activeQuery:s},B.label))})]})},c))})]})]}),ae.length===0&&(0,a.jsxs)(l.View,{style:u.flexRowGapFullWidth,children:[(0,a.jsxs)(l.Text,{style:u.text344054,children:[n,":"]}),e&&s!==void 0&&(m==="string"||m==="number"||m==="boolean")?(0,a.jsxs)(a.Fragment,{children:[e&&s&&(m==="string"||m==="number")&&(0,a.jsxs)(l.View,{style:u.inputContainer,children:[(0,a.jsx)(l.TextInput,{style:[u.textInput,m==="number"?u.textNumber:u.textString],keyboardType:m==="number"?"numeric":"default",value:r.toString(),onChangeText:f=>Lt(m==="number",f)}),m==="number"&&(0,a.jsxs)(l.View,{style:u.numberInputButtons,children:[(0,a.jsx)(l.TouchableOpacity,{style:u.touchableButton,onPressIn:()=>{let f=s.state.data,c=A(f,W,r+1);R.setQueryData(s.queryKey,c)},children:(0,a.jsx)(H.default,{fill:"none",viewBox:"0 0 24 24",stroke:"#6938EF",children:(0,a.jsx)(H.Path,{d:"M4.5 15.75l7.5-7.5 7.5 7.5"})})}),(0,a.jsx)(l.TouchableOpacity,{style:u.touchableButton,onPressIn:()=>{let f=s.state.data,c=A(f,W,r-1);R.setQueryData(s.queryKey,c)},children:(0,a.jsx)(H.default,{fill:"none",viewBox:"0 0 24 24",stroke:"#6938EF",children:(0,a.jsx)(H.Path,{strokeLinecap:"round",strokeLinejoin:"round",d:"M19.5 8.25l-7.5 7.5-7.5-7.5"})})})]})]}),m==="boolean"&&(0,a.jsxs)(l.View,{style:u.booleanContainer,children:[(0,a.jsx)(Kt,{activeQuery:s,dataPath:W,value:r}),(0,a.jsx)(l.Text,{style:u.booleanText,children:L(r)})]})]}):(0,a.jsx)(l.Text,{style:u.displayValueText,children:L(r)}),e&&h&&s!==void 0&&(0,a.jsx)(gt,{activeQuery:s,dataPath:W})]})]})})}var u=l.StyleSheet.create({buttonStyle3:{backgroundColor:"transparent",flexDirection:"row",alignItems:"center",justifyContent:"center",width:16,height:16,position:"relative",zIndex:10},buttonStyle2:{backgroundColor:"transparent",flexDirection:"row",padding:0,alignItems:"center",justifyContent:"center",width:12,height:12,position:"relative",zIndex:10},buttonStyle1:{backgroundColor:"transparent",borderColor:"none",borderWidth:0,padding:0,alignItems:"center",justifyContent:"center",width:24,height:24,position:"relative"},buttonStyle:{backgroundColor:"transparent",color:"#6B7280",borderWidth:0,flexDirection:"row",alignItems:"center",justifyContent:"center",width:12,height:12,position:"relative"},expanded:{transform:[{rotate:"90deg"}]},collapsed:{transform:[{rotate:"0deg"}]},minWidthWrapper:{minWidth:200,fontSize:12,flexDirection:"row",flexWrap:"wrap",width:"100%"},fullWidthMarginRight:{position:"relative",width:"100%",marginRight:1},flexRowItemsCenterGap:{flexDirection:"row",alignItems:"center",justifyContent:"space-between",padding:1},expanderButton:{flexDirection:"row",alignItems:"center",height:20,backgroundColor:"transparent",borderWidth:0,padding:0},textGray500:{color:"#6B7280",fontSize:12,marginLeft:1},flexRowGapItemsCenter:{flexDirection:"row",alignItems:"center",justifyContent:"space-between",padding:1},singleEntryContainer:{marginLeft:8,paddingLeft:12,borderLeftWidth:2,borderColor:"#D1D5DB"},multiEntryContainer:{marginLeft:8,paddingLeft:12,borderLeftWidth:2,borderColor:"#D1D5DB"},relativeOutlineNone:{position:"relative"},pageExpanderButton:{flexDirection:"row",alignItems:"center",backgroundColor:"transparent",borderWidth:0,padding:0},entriesContainer:{marginLeft:8,paddingLeft:12,borderLeftWidth:2,borderColor:"#D1D5DB"},flexRowGapFullWidth:{flexDirection:"row",width:"100%",alignItems:"center",marginVertical:4,lineHeight:44},text344054:{color:"#344054",height:"100%",marginRight:1},inputContainer:{flexDirection:"row",justifyContent:"space-between",borderWidth:0,height:22,margin:1,paddingVertical:2,paddingLeft:6,paddingRight:4,borderRadius:4,backgroundColor:"#EAECF0",flex:1},textNumber:{color:"#6938EF"},textInput:{flex:1,marginRight:8,paddingBottom:2,paddingTop:2},textString:{},numberInputButtons:{flexDirection:"row"},touchableButton:{width:24},booleanContainer:{flexDirection:"row",alignItems:"center",padding:4,borderRadius:4,backgroundColor:"#F3F4F6",flex:1},booleanText:{marginLeft:8,color:"#6938EF"},displayValueText:{flex:1,color:"#6938EF",height:"100%"}});var V=require("react-native"),M=require("react/jsx-runtime");function Oe({selectedQuery:e,setSelectedQuery:n}){return(0,M.jsxs)(V.ScrollView,{style:ce.flexOne,children:[(0,M.jsx)(ve,{query:e}),(0,M.jsx)(Qe,{query:e,setSelectedQuery:n}),(0,M.jsx)(V.Text,{style:ce.headerText,children:"Data Explorer"}),(0,M.jsx)(V.View,{style:ce.contentView,children:(0,M.jsx)(v,{editable:!0,label:"Data",value:e?.state.data,defaultExpanded:["Data"],activeQuery:e})}),(0,M.jsx)(V.Text,{style:ce.headerText,children:"Query Explorer"}),(0,M.jsx)(V.View,{style:ce.contentView,children:(0,M.jsx)(v,{label:"Query",value:e,defaultExpanded:["Query","queryKey"],activeQuery:e})})]})}var ce=V.StyleSheet.create({flexOne:{flex:1},headerText:{textAlign:"left",backgroundColor:"#EAECF0",padding:6,width:"100%",fontSize:12},contentView:{padding:2}});var N=require("react/jsx-runtime");function Ie(){let[e,n]=(0,fe.useState)(void 0),[r,i]=(0,fe.useState)({}),s=Je(),d=(0,fe.useRef)(null),h=(S,D)=>{let{y:Z,height:pe}=S.nativeEvent.layout;i(ke=>({...ke,[D]:{y:Z,height:pe}}))},R=(S,D)=>{if(S===e){n(void 0);return}if(n(S),d.current&&r[D]){let Z=r[D].y;d.current.scrollTo({y:Z,animated:!0})}};return(0,N.jsxs)(O.SafeAreaView,{style:Pe.container,children:[(0,N.jsx)(O.ScrollView,{style:Pe.scrollView,ref:d,children:s.map((S,D)=>(0,N.jsx)(O.View,{onLayout:Z=>h(Z,D),children:(0,N.jsx)(Se,{selected:e,setSelected:()=>R(S,D),query:S})},D))}),e&&(0,N.jsx)(O.View,{style:Pe.queryInformation,children:(0,N.jsx)(Oe,{selectedQuery:e,setSelectedQuery:n})})]})}var Pe=O.StyleSheet.create({container:{flex:1,width:"100%"},scrollView:{flex:1,flexDirection:"column",width:"100%",height:"25%"},queryInformation:{height:"75%"}});var xe=ge(require("react-native-svg"));var kt=require("react"),X=require("react-native");var q=require("react-native");var Q={purpleMutation:"#D9D6FE",purpleMutationText:"#5925DC",redMutation:"#fecaca",redMutationText:"#b91c1c",yellowMutation:"#FEDF89",yellowMutationText:"#B54708",greenMutation:"#A6F4C5",greenMutationText:"#027A48",grayMutation:"#eaecf0",grayMutationText:"#344054"},ht=({status:e,isPaused:n})=>{let r,i;return n?(r=Q.purpleMutation,i=Q.purpleMutationText):e==="error"?(r=Q.redMutation,i=Q.redMutationText):e==="pending"?(r=Q.yellowMutation,i=Q.yellowMutationText):e==="success"?(r=Q.greenMutation,i=Q.greenMutationText):(r=Q.grayMutation,i=Q.grayMutationText),{backgroundColor:r,textColor:i}};var P=require("react/jsx-runtime");function Ue({mutation:e,setSelected:n,selected:r}){let i=e.options.mutationKey?JSON.stringify(L(e.options.mutationKey,!1))+" - ":"",s=new Date(e.state.submittedAt).toLocaleString(),d=`${i}${s}`,{backgroundColor:h,textColor:R}=ht({isPaused:e.state.isPaused,status:e.state.status});return(0,P.jsxs)(q.TouchableOpacity,{onPress:()=>n(e===r?void 0:e),style:[Ce.button,r?.mutationId===e.mutationId&&Ce.selected],children:[(0,P.jsxs)(q.View,{style:[Ce.iconContainer,{backgroundColor:h}],children:[e.state.isPaused&&(0,P.jsx)(ut,{}),e.state.status==="success"&&(0,P.jsx)(at,{}),e.state.status==="error"&&(0,P.jsx)(dt,{}),e.state.status==="pending"&&(0,P.jsx)(lt,{})]}),(0,P.jsx)(q.Text,{style:[Ce.text],children:d})]})}var Ce=q.StyleSheet.create({button:{flexDirection:"row",alignItems:"center",justifyContent:"flex-start",borderBottomWidth:1,borderBottomColor:"#d0d5dd",backgroundColor:"white"},selected:{backgroundColor:"#eaecf0"},iconContainer:{padding:8,paddingVertical:6},text:{marginLeft:8,fontSize:12,minWidth:18}});var k=require("react-native");var w=require("react-native");var ne=require("react-native"),ze=require("react/jsx-runtime"),Ht={fresh:"#D1FADF",stale:"#FEF0C7",fetching:"#D1E9FF",paused:"#EBE9FE",inactive:"#F2F4F7"},Nt={fresh:"#32D583",stale:"#FDB022",fetching:"#53B1FD",paused:"#9B8AFB",inactive:"#344054"},qt={fresh:"#027A48",stale:"#B54708",fetching:"#175CD3",paused:"#5925DC",inactive:"#344054"};function Ge({status:e}){let n=e==="pending"?"fetching":e==="idle"?"inactive":e==="error"?"stale":"fresh",r=Ht[n],i=Nt[n],s=qt[n];return(0,ze.jsx)(ne.View,{style:[mt.container,{backgroundColor:r,borderColor:i}],children:(0,ze.jsx)(ne.Text,{style:[mt.text,{color:s}],children:e})})}var mt=ne.StyleSheet.create({container:{padding:8,borderWidth:1,borderRadius:4,margin:4},text:{fontSize:12}});var F=require("react/jsx-runtime");function je({selectedMutation:e}){if(e===void 0)return null;let n=new Date(e.state.submittedAt).toLocaleTimeString();return(0,F.jsxs)(w.View,{style:T.container,children:[(0,F.jsx)(w.Text,{style:[T.mutationDetailsText,T.bgEAECF0,T.p1],children:"Mutation Details"}),(0,F.jsxs)(w.View,{style:[T.flexRow,T.justifyBetween,T.p1],children:[(0,F.jsx)(w.ScrollView,{horizontal:!0,style:T.flex1,children:(0,F.jsx)(w.Text,{style:T.flexWrap,children:`${e.options.mutationKey?L(e.options.mutationKey,!0):"No mutationKey found"}`})}),(0,F.jsx)(Ge,{status:e.state.status})]}),(0,F.jsxs)(w.View,{style:[T.flexRow,T.justifyBetween,T.p1],children:[(0,F.jsx)(w.Text,{children:"Submitted At:"}),(0,F.jsx)(w.Text,{children:n})]})]})}var T=w.StyleSheet.create({container:{minWidth:200,fontSize:12},mutationDetailsText:{textAlign:"left",backgroundColor:"#EAECF0",padding:4},flexRow:{flexDirection:"row",justifyContent:"space-between",padding:4},justifyBetween:{justifyContent:"space-between"},p1:{padding:4},flex1:{flex:1},flexWrap:{flexWrap:"wrap",alignItems:"center"},bgEAECF0:{backgroundColor:"#EAECF0"}});var x=require("react/jsx-runtime");function Ke({selectedMutation:e}){return(0,x.jsxs)(k.ScrollView,{style:I.flex1,children:[(0,x.jsx)(je,{selectedMutation:e}),(0,x.jsx)(k.Text,{style:I.textHeader,children:"Variables Details"}),(0,x.jsx)(k.View,{style:I.padding,children:(0,x.jsx)(v,{label:"Variables",value:e?.state.variables,defaultExpanded:["Variables"]})}),(0,x.jsx)(k.Text,{style:I.textHeader,children:"Context Details"}),(0,x.jsx)(k.View,{style:I.padding,children:(0,x.jsx)(v,{label:"Context",value:e?.state.context,defaultExpanded:["Context"]})}),(0,x.jsx)(k.Text,{style:I.textHeader,children:"Data Explorer"}),(0,x.jsx)(k.View,{style:I.padding,children:(0,x.jsx)(v,{label:"Data",defaultExpanded:["Data"],value:e?.state.data})}),(0,x.jsx)(k.Text,{style:I.textHeader,children:"Mutations Explorer"}),(0,x.jsx)(k.View,{style:I.padding,children:(0,x.jsx)(v,{label:"Mutation",defaultExpanded:["Mutation"],value:e})})]})}var I=k.StyleSheet.create({flex1:{flex:1},textHeader:{textAlign:"left",backgroundColor:"#EAECF0",padding:4,width:"100%",fontSize:12},padding:{padding:8}});var ie=require("react"),Ct=require("@tanstack/react-query"),xt=ge(require("fast-deep-equal"));function Zt(){let e=(0,Ct.useQueryClient)(),[n,r]=(0,ie.useState)([]),i=(0,ie.useRef)([]);return(0,ie.useEffect)(()=>{let s=()=>{setTimeout(()=>{let h=[...e.getMutationCache().getAll()],R=h.map(S=>S.state);(0,xt.default)(i.current,R)||(i.current=R,r(h))},1)};s();let d=e.getMutationCache().subscribe(s);return()=>d()},[e]),{mutations:n}}var bt=Zt;var J=require("react/jsx-runtime");function Ne(){let[e,n]=(0,kt.useState)(),{mutations:r}=bt();return(0,J.jsxs)(X.View,{style:He.container,children:[(0,J.jsx)(X.ScrollView,{style:He.scrollView,children:r.map((i,s)=>(0,J.jsx)(Ue,{selected:e,setSelected:n,mutation:i},s))}),e&&(0,J.jsx)(X.View,{style:He.mutationInfo,children:(0,J.jsx)(Ke,{selectedMutation:e})})]})}var He=X.StyleSheet.create({container:{flex:1,flexDirection:"column",width:"100%"},scrollView:{flex:1,flexDirection:"column",height:"25%"},mutationInfo:{height:"75%"}});var y=require("react/jsx-runtime");function qe({setShowDevTools:e}){let[n,r]=(0,wt.useState)(!0);return(0,y.jsxs)(g.View,{style:p.container,children:[(0,y.jsx)(g.TouchableOpacity,{onPress:()=>{e(!1)},style:p.closeButton,children:(0,y.jsx)(xe.default,{width:8,height:8,viewBox:"0 0 10 6",fill:"none",children:(0,y.jsx)(xe.Path,{d:"M1 1l4 4 4-4",stroke:"#475467",strokeWidth:1.66667,strokeLinecap:"round",strokeLinejoin:"round"})})}),(0,y.jsxs)(g.View,{style:p.devToolsPanel,children:[(0,y.jsxs)(g.View,{style:p.devToolsHeader,children:[(0,y.jsxs)(g.View,{style:p.tanstackHeader,children:[(0,y.jsx)(g.Text,{style:p.tanstackText,children:"TANSTACK"}),(0,y.jsx)(g.View,{style:p.reactQueryVersion,children:(0,y.jsx)(g.Text,{style:p.reactQueryVersionText,children:"React Query v5"})})]}),(0,y.jsxs)(g.View,{style:p.toggleButtonsContainer,children:[(0,y.jsx)(g.TouchableOpacity,{onPress:()=>{r(!0)},style:[p.toggleButton,n===!0?p.toggleButtonActive:p.toggleButtonInactive,{borderTopRightRadius:0,borderBottomRightRadius:0}],children:(0,y.jsx)(g.Text,{style:[p.toggleButtonText,n===!0?p.toggleButtonTextActive:p.toggleButtonTextInactive],children:"Queries"})}),(0,y.jsx)(g.TouchableOpacity,{onPress:()=>{r(!1)},style:[p.toggleButton,n===!1?p.toggleButtonActive:p.toggleButtonInactive,{borderTopLeftRadius:0,borderBottomLeftRadius:0}],children:(0,y.jsx)(g.Text,{style:[p.toggleButtonText,n===!1?p.toggleButtonTextActive:p.toggleButtonTextInactive],children:"Mutations"})})]})]}),n?(0,y.jsx)(Ie,{}):(0,y.jsx)(Ne,{})]})]})}var p=g.StyleSheet.create({container:{flex:1,flexDirection:"column"},closeButton:{position:"absolute",right:-2,top:-17,zIndex:50,width:22,height:15,borderTopLeftRadius:4,borderTopRightRadius:4,backgroundColor:"white",padding:3,margin:3,borderColor:"#98a2b3",borderWidth:1,borderBottomWidth:0,alignItems:"center",justifyContent:"center"},devToolsPanel:{backgroundColor:"white",minWidth:300,flex:1,borderTopColor:"#98a2b3",borderTopWidth:1},devToolsHeader:{padding:8,paddingBottom:6,paddingTop:6,borderColor:"#d0d5dd",borderBottomWidth:2,paddingVertical:1,flexDirection:"row"},tanstackHeader:{marginHorizontal:2,paddingRight:8},tanstackText:{color:"#475467",fontWeight:"bold"},reactQueryVersion:{},reactQueryVersionText:{marginTop:-4,color:"#F97F1E"},toggleButtonsContainer:{flexDirection:"row",marginLeft:1,alignItems:"center"},toggleButton:{borderTopLeftRadius:4,borderBottomLeftRadius:4,padding:4,borderWidth:1,borderColor:"#d0d5dd",paddingHorizontal:2,maxWidth:100,borderRadius:4},toggleButtonActive:{backgroundColor:"#F2F4F7"},toggleButtonInactive:{backgroundColor:"#EAECF0"},toggleButtonText:{paddingRight:4,paddingLeft:4,fontSize:12},toggleButtonTextActive:{color:"#344054"},toggleButtonTextInactive:{color:"#909193"},comingSoonText:{margin:3}});var Y=require("react/jsx-runtime");function Tt({bubbleStyle:e,onCopy:n}){let[r,i]=(0,St.useState)(!1);return(0,Y.jsx)(We.Provider,{value:{onCopy:n},children:(0,Y.jsx)(U.View,{children:r?(0,Y.jsx)(U.View,{style:be.devTools,children:(0,Y.jsx)(qe,{setShowDevTools:i})}):(0,Y.jsx)(U.TouchableOpacity,{onPress:()=>{i(!0)},style:[be.touchableOpacityBase,U.Platform.OS==="ios"?be.touchableOpacityIOS:be.touchableOpacityAndroid,e],children:(0,Y.jsx)(ct,{})})})})}var be=U.StyleSheet.create({devTools:{position:"absolute",right:0,bottom:0,zIndex:50,width:"100%",height:350},touchableOpacityBase:{position:"absolute",right:1,zIndex:50,width:48,height:48,borderRadius:24,borderWidth:4,borderColor:"#A4C200"},touchableOpacityIOS:{bottom:96},touchableOpacityAndroid:{bottom:64},text:{zIndex:10,color:"white",fontSize:40,padding:24}});