@buoy-gg/core 7.0.73 → 7.0.75

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 (50) hide show
  1. package/bin/buoy.js +5 -5
  2. package/bundlers/vite.d.ts +11 -4
  3. package/bundlers/vite.mjs +4 -4
  4. package/lib/commonjs/floatingMenu/AppHost.web.js +1 -1
  5. package/lib/commonjs/floatingMenu/DevToolsSettingsModal.shared.js +1 -1
  6. package/lib/commonjs/floatingMenu/FloatingDevTools.js +1 -1
  7. package/lib/commonjs/floatingMenu/FloatingDevTools.web.js +1 -1
  8. package/lib/commonjs/floatingMenu/FloatingMenu.js +1 -1
  9. package/lib/commonjs/floatingMenu/TeamToolCloser.js +1 -0
  10. package/lib/commonjs/floatingMenu/dial/DialDevTools.js +1 -1
  11. package/lib/commonjs/floatingMenu/dial/DialDevTools.web.js +1 -1
  12. package/lib/commonjs/floatingMenu/teamToolsNote.js +1 -0
  13. package/lib/commonjs/telemetry/installPing.js +1 -1
  14. package/lib/commonjs/version.js +1 -1
  15. package/lib/module/floatingMenu/AppHost.web.js +1 -1
  16. package/lib/module/floatingMenu/DevToolsSettingsModal.shared.js +1 -1
  17. package/lib/module/floatingMenu/FloatingDevTools.js +1 -1
  18. package/lib/module/floatingMenu/FloatingDevTools.web.js +1 -1
  19. package/lib/module/floatingMenu/FloatingMenu.js +1 -1
  20. package/lib/module/floatingMenu/TeamToolCloser.js +1 -0
  21. package/lib/module/floatingMenu/dial/DialDevTools.js +1 -1
  22. package/lib/module/floatingMenu/dial/DialDevTools.web.js +1 -1
  23. package/lib/module/floatingMenu/teamToolsNote.js +1 -0
  24. package/lib/module/telemetry/installPing.js +1 -1
  25. package/lib/module/version.js +1 -1
  26. package/lib/typescript/commonjs/Buoy.d.ts +2 -0
  27. package/lib/typescript/commonjs/floatingMenu/FloatingMenu.d.ts +2 -0
  28. package/lib/typescript/commonjs/floatingMenu/TeamToolCloser.d.ts +13 -0
  29. package/lib/typescript/commonjs/floatingMenu/dial/DialDevTools.d.ts +2 -0
  30. package/lib/typescript/commonjs/floatingMenu/dial/DialDevTools.web.d.ts +3 -1
  31. package/lib/typescript/commonjs/floatingMenu/teamToolsNote.d.ts +6 -0
  32. package/lib/typescript/commonjs/version.d.ts +1 -1
  33. package/lib/typescript/module/Buoy.d.ts +2 -0
  34. package/lib/typescript/module/floatingMenu/FloatingMenu.d.ts +2 -0
  35. package/lib/typescript/module/floatingMenu/TeamToolCloser.d.ts +13 -0
  36. package/lib/typescript/module/floatingMenu/dial/DialDevTools.d.ts +2 -0
  37. package/lib/typescript/module/floatingMenu/dial/DialDevTools.web.d.ts +3 -1
  38. package/lib/typescript/module/floatingMenu/teamToolsNote.d.ts +6 -0
  39. package/lib/typescript/module/version.d.ts +1 -1
  40. package/lib/web/auto.mjs +1 -1
  41. package/lib/web/chunks/FloatingDevTools.web-NMBTDON7.mjs +1 -0
  42. package/lib/web/chunks/chunk-2N5IPIMV.mjs +10 -0
  43. package/lib/web/chunks/chunk-C6HZO5XT.mjs +1 -0
  44. package/lib/web/chunks/chunk-LU4GPZ5L.mjs +2 -2
  45. package/lib/web/chunks/chunk-RBPDZUHO.mjs +1 -1
  46. package/lib/web/chunks/chunk-V4BVRDHL.mjs +1 -0
  47. package/lib/web/chunks/chunk-Z6I7ZD34.mjs +1 -1
  48. package/lib/web/index.mjs +1 -1
  49. package/lib/web/toolkit.mjs +1 -1
  50. package/package.json +5 -5
@@ -1,4 +1,4 @@
1
- "use client";import{a as H,b as K,c as ct,d as rr,e as wo,f as ar,g as xl,h as Re,i as xo,j as We,k as dt}from"./chunk-Z6I7ZD34.mjs";import{b as sr,c as lr}from"./chunk-D2FYORGY.mjs";import{a as r,b as To,e as _e}from"./chunk-LOPXJLVB.mjs";import{BuoyPortal as cr,FloatingToolHost as dr}from"@buoy-gg/shared-ui/web/floating";import*as ur from"@buoy-gg/license/web";import{LicenseManager as pr,useLicense as mr,sameLicenseKey as gr,resolveDevBuild as fr,capacitorDebug as hr,isCapacitorNative as yr,loadCapacitorAppHost as br}from"@buoy-gg/license/web";import{AccountSetup as vr,HintsProvider as Sr,normalizeEnvironment as wr,registerToolOpener as Io,startSettingsSync as xr}from"@buoy-gg/shared-ui/web";import{useState as Et,useMemo as ye,useCallback as Ue,useEffect as Z,useRef as Co}from"react";import{useSettings as Tr,getToolLabel as ut,getToolDescription as Ir,getToolColor as ko}from"@buoy-gg/floating-tools-react/web";import{persistentStorage as Me,devToolsStorageKeys as pt,EnvironmentIndicator as Cr,EnvironmentSelectorInline as kr}from"@buoy-gg/shared-ui/web";var zr=[];function zo(){return[]}r(zo,"autoDiscoverWebPresets");function Ot(e=[]){return[...new Map(e.map(t=>[t.id,t])).values()]}r(Ot,"autoDiscoverWithCustom");function mt(e,t){return e.filter(o=>{let i=o.slot||"both";return i==="both"||i===t})}r(mt,"getToolsBySlot");function Ao(e,t){let o=t instanceof Set?t:new Set(t);return e.filter(i=>o.has(i.id))}r(Ao,"getEnabledTools");import{FloatingTool as Bo,FloatingToolDivider as Ar,FloatingToolUserStatus as Do,getBubbleAnchorPosition as Br}from"@buoy-gg/shared-ui/web/floating";import{useState as Q,useEffect as Ee,useMemo as gt,useRef as ft,useCallback as ht}from"react";var Ro={network:"Network",images:"Images","image-overlay":"Image Overlay",assets:"Assets",query:"React Query",storage:"Storage",env:"Env",console:"Console",events:"Events",redux:"Redux",zustand:"Zustand",jotai:"Jotai","route-events":"Routes","time-machine":"Time Machine",clock:"Clock",permissions:"Permissions","highlight-updates":"Highlight Updates","debug-borders":"Debug Borders","perf-monitor":"Bench HUD","js-top":"JS Top","js-top-modal":"JS Top",impersonate:"Impersonate","perf-monitor-modal":"Bench"};function Mo(e,t){return e&&Ro[e]?Ro[e]:t}r(Mo,"dialAccessibilityLabel");import{getDialLayout as Dr,getAllIconPositions as Rr,getGridLineRotations as Mr,getIconStaggerInputRange as Er,MAX_DIAL_SLOTS as Xe,DIAL_ICON_SIZE as Or,dialAnimationConfig as Eo,getDialCSSKeyframesString as Pr,getDialCSSAnimationStyles as Lr,dialColors as $,dialStyles as x,withAlpha as Oo,floatingToolsColors as Fr}from"@buoy-gg/floating-tools-react/web";import{persistentStorage as Po,monoFont as Lo,ToolBackground as $r,useToolBackground as jr}from"@buoy-gg/shared-ui/web";import{memo as Hr}from"react";import{RasterLayer as Nr,scatter as Wr,useLoop as _r,withBgAlpha as Ur}from"@buoy-gg/shared-ui/web";import{Fragment as Kr,jsx as Ze}from"react/jsx-runtime";var Vr=.94,qr=6,Gr=2400,yt=3,Fo=16,Jr=Array.from({length:yt},(e,t)=>Wr(22343^t*40503,Fo*4)),$o=["#FFFFFF","#B3D9FF","#8CB3FF"],jo=Math.PI/3,Ho=14*Math.PI/180;function No(e){let t=Math.min(5,Math.floor(e*6)),o=e*6-t;return t*jo+Ho/2+o*(jo-Ho)}r(No,"spokeClearAngle");function Wo(e){return Math.min(qr,1/(1-e*Vr))}r(Wo,"scaleAt");function _o(e){let t=.15+.85*e*e;return e<.06?t*=e/.06:e>.94&&(t*=(1-e)/.06),Math.min(.7,t)}r(_o,"opacityAt");function Uo(e){let t=e/yt,o=[],i=12;for(let d=0;d<=i;d++)o.push(d/i);let n=(1-t)%1;n>.001&&n<1-.001&&o.push(n-1e-4,n+1e-4),o.sort((d,p)=>d-p);let a=[],s=[],u=[];for(let d of o){let p=t===0&&d===1?1:(d+t)%1;a.push(d),s.push(Wo(p)),u.push(_o(p))}return{input:a,scale:s,opacity:u}}r(Uo,"shellStops");var Yr=Array.from({length:yt},(e,t)=>Uo(t)),Xr=Hr(r(function({size:e}){let t=_r(Gr),o=e/2,i=[];for(let n=0;n<yt;n++){let a=Jr[n],s=Yr[n],u=[];for(let d=0;d<Fo;d++){let p=No(a[d*4]),g=(.15+.85*Math.sqrt(a[d*4+1]))*.5*o,I=$o[Math.floor(a[d*4+3]*$o.length)%3],f=o+Math.cos(p)*g,z=o+Math.sin(p)*g,T=.6,M=T*2.4;u.push(Ze(H,{style:{position:"absolute",left:f-M/2,top:z-M/2,width:M,height:M,borderRadius:M/2,backgroundColor:Ur(I,.3)}},`${d}-h`),Ze(H,{style:{position:"absolute",left:f-T/2,top:z-T/2,width:T,height:T,borderRadius:T/2,backgroundColor:I}},d))}i.push(Ze(Re.View,{style:{position:"absolute",left:0,top:0,width:e,height:e,opacity:t.interpolate({inputRange:s.input,outputRange:s.opacity}),transform:[{scale:t.interpolate({inputRange:s.input,outputRange:s.scale})}]},pointerEvents:"none",children:Ze(Nr,{style:{width:e,height:e},raster:false,children:u})},n))}return Ze(Kr,{children:i})},"DialHyperspace"));import{useEffect as Zr,useState as Ko}from"react";import{dialColors as Ke,withAlpha as Vo}from"@buoy-gg/floating-tools-react/web";import{ARROW_BOTTOM_OFFSET as Qr,ARROW_HEIGHT as ea,SPACING_GAP as Nl,getScreenCenterY as Wl,calculateTooltipPosition as ta,calculateTargetPosition as _l}from"@buoy-gg/shared-ui/web/floating";import{monoFont as qo}from"@buoy-gg/shared-ui/web";import{jsx as Ve,jsxs as Go}from"react/jsx-runtime";var Jo=false;function Yo(){if(Jo||typeof document>"u")return;let e=document.createElement("style");e.textContent=`
1
+ "use client";import{a as N,b as K,c as ct,d as ii,e as wo,f as ai,g as xl,h as Re,i as xo,j as We,k as dt}from"./chunk-Z6I7ZD34.mjs";import{b as si,c as li}from"./chunk-D2FYORGY.mjs";import{a as i,b as To,e as _e}from"./chunk-LOPXJLVB.mjs";import{BuoyPortal as ci,FloatingToolHost as di}from"@buoy-gg/shared-ui/web/floating";import*as ui from"@buoy-gg/license/web";import{LicenseManager as pi,useLicense as fi,sameLicenseKey as mi,resolveDevBuild as gi,capacitorDebug as hi,isCapacitorNative as yi,loadCapacitorAppHost as bi}from"@buoy-gg/license/web";import{AccountSetup as vi,HintsProvider as Si,normalizeEnvironment as wi,registerToolOpener as Io,startSettingsSync as xi}from"@buoy-gg/shared-ui/web";import{useState as Et,useMemo as ye,useCallback as Ue,useEffect as Q,useRef as Co}from"react";import{useSettings as Ti,getToolLabel as ut,getToolDescription as Ii,getToolColor as ko}from"@buoy-gg/floating-tools-react/web";import{persistentStorage as Me,devToolsStorageKeys as pt,EnvironmentIndicator as Ci,EnvironmentSelectorInline as ki}from"@buoy-gg/shared-ui/web";var zi=[];function zo(){return[]}i(zo,"autoDiscoverWebPresets");function Pt(e=[]){return[...new Map(e.map(t=>[t.id,t])).values()]}i(Pt,"autoDiscoverWithCustom");function ft(e,t){return e.filter(o=>{let r=o.slot||"both";return r==="both"||r===t})}i(ft,"getToolsBySlot");function Ao(e,t){let o=t instanceof Set?t:new Set(t);return e.filter(r=>o.has(r.id))}i(Ao,"getEnabledTools");import{FloatingTool as Bo,FloatingToolDivider as Ai,FloatingToolUserStatus as Do,getBubbleAnchorPosition as Bi}from"@buoy-gg/shared-ui/web/floating";import{useState as Z,useEffect as Ee,useMemo as mt,useRef as gt,useCallback as ht}from"react";var Ro={network:"Network",images:"Images","image-overlay":"Image Overlay",assets:"Assets",query:"React Query",storage:"Storage",env:"Env",console:"Console",events:"Events",redux:"Redux",zustand:"Zustand",jotai:"Jotai","route-events":"Routes","time-machine":"Time Machine",clock:"Clock",permissions:"Permissions","highlight-updates":"Highlight Updates","debug-borders":"Debug Borders","perf-monitor":"Bench HUD","js-top":"JS Top","js-top-modal":"JS Top",impersonate:"Impersonate","perf-monitor-modal":"Bench"};function Mo(e,t){return e&&Ro[e]?Ro[e]:t}i(Mo,"dialAccessibilityLabel");import{getDialLayout as Di,getAllIconPositions as Ri,getGridLineRotations as Mi,getIconStaggerInputRange as Ei,MAX_DIAL_SLOTS as Xe,DIAL_ICON_SIZE as Pi,dialAnimationConfig as Eo,getDialCSSKeyframesString as Oi,getDialCSSAnimationStyles as Fi,dialColors as $,dialStyles as x,withAlpha as Po,floatingToolsColors as Li}from"@buoy-gg/floating-tools-react/web";import{persistentStorage as Oo,monoFont as Fo,ToolBackground as $i,useToolBackground as ji}from"@buoy-gg/shared-ui/web";import{memo as Ni}from"react";import{RasterLayer as Hi,scatter as Wi,useLoop as _i,withBgAlpha as Ui}from"@buoy-gg/shared-ui/web";import{Fragment as Ki,jsx as Qe}from"react/jsx-runtime";var Vi=.94,qi=6,Gi=2400,yt=3,Lo=16,Ji=Array.from({length:yt},(e,t)=>Wi(22343^t*40503,Lo*4)),$o=["#FFFFFF","#B3D9FF","#8CB3FF"],jo=Math.PI/3,No=14*Math.PI/180;function Ho(e){let t=Math.min(5,Math.floor(e*6)),o=e*6-t;return t*jo+No/2+o*(jo-No)}i(Ho,"spokeClearAngle");function Wo(e){return Math.min(qi,1/(1-e*Vi))}i(Wo,"scaleAt");function _o(e){let t=.15+.85*e*e;return e<.06?t*=e/.06:e>.94&&(t*=(1-e)/.06),Math.min(.7,t)}i(_o,"opacityAt");function Uo(e){let t=e/yt,o=[],r=12;for(let d=0;d<=r;d++)o.push(d/r);let n=(1-t)%1;n>.001&&n<1-.001&&o.push(n-1e-4,n+1e-4),o.sort((d,p)=>d-p);let a=[],s=[],u=[];for(let d of o){let p=t===0&&d===1?1:(d+t)%1;a.push(d),s.push(Wo(p)),u.push(_o(p))}return{input:a,scale:s,opacity:u}}i(Uo,"shellStops");var Yi=Array.from({length:yt},(e,t)=>Uo(t)),Xi=Ni(i(function({size:e}){let t=_i(Gi),o=e/2,r=[];for(let n=0;n<yt;n++){let a=Ji[n],s=Yi[n],u=[];for(let d=0;d<Lo;d++){let p=Ho(a[d*4]),m=(.15+.85*Math.sqrt(a[d*4+1]))*.5*o,I=$o[Math.floor(a[d*4+3]*$o.length)%3],g=o+Math.cos(p)*m,z=o+Math.sin(p)*m,T=.6,M=T*2.4;u.push(Qe(N,{style:{position:"absolute",left:g-M/2,top:z-M/2,width:M,height:M,borderRadius:M/2,backgroundColor:Ui(I,.3)}},`${d}-h`),Qe(N,{style:{position:"absolute",left:g-T/2,top:z-T/2,width:T,height:T,borderRadius:T/2,backgroundColor:I}},d))}r.push(Qe(Re.View,{style:{position:"absolute",left:0,top:0,width:e,height:e,opacity:t.interpolate({inputRange:s.input,outputRange:s.opacity}),transform:[{scale:t.interpolate({inputRange:s.input,outputRange:s.scale})}]},pointerEvents:"none",children:Qe(Hi,{style:{width:e,height:e},raster:false,children:u})},n))}return Qe(Ki,{children:r})},"DialHyperspace"));import{useEffect as Qi,useState as Ko}from"react";import{dialColors as Ke,withAlpha as Vo}from"@buoy-gg/floating-tools-react/web";import{ARROW_BOTTOM_OFFSET as Zi,ARROW_HEIGHT as ea,SPACING_GAP as Hl,getScreenCenterY as Wl,calculateTooltipPosition as ta,calculateTargetPosition as _l}from"@buoy-gg/shared-ui/web/floating";import{monoFont as qo}from"@buoy-gg/shared-ui/web";import{jsx as Ve,jsxs as Go}from"react/jsx-runtime";var Jo=false;function Yo(){if(Jo||typeof document>"u")return;let e=document.createElement("style");e.textContent=`
2
2
  @keyframes buoyOnboardPulse {
3
3
  0%, 100% { transform: scale(1); }
4
4
  50% { transform: scale(1.02); }
@@ -7,4 +7,4 @@
7
7
  0%, 100% { transform: translateY(0); }
8
8
  50% { transform: translateY(-8px); }
9
9
  }
10
- `,document.head.appendChild(e),Jo=true}r(Yo,"injectOnboardingKeyframes");var Pt=Ke.accent;function Lt({title:e,message:t,onDismiss:o,showArrow:i=true}){let[n,a]=Ko(false),[s,u]=Ko(false);Zr(()=>{Yo();let p=requestAnimationFrame(()=>a(true));return()=>cancelAnimationFrame(p)},[]);let d={fontFamily:qo,textTransform:"uppercase"};return Ve("div",{style:{position:"fixed",left:"50%",bottom:ta(),transform:`translateX(-50%) scale(${n?1:.8})`,opacity:n?1:0,transition:"transform 300ms cubic-bezier(0.34, 1.3, 0.64, 1), opacity 300ms ease",zIndex:10002,pointerEvents:"auto"},children:Go("div",{style:{position:"relative",animation:n?"buoyOnboardPulse 3s ease-in-out infinite":"none"},children:[Ve("div",{style:{position:"absolute",inset:-4,borderRadius:18,backgroundColor:"#FFFFFF",opacity:.06}}),Go("div",{style:{position:"relative",maxWidth:280,backgroundColor:Ke.dialBackground,borderRadius:16,border:`1px solid ${Ke.dialBorder}`,padding:20,boxShadow:`0 0 20px ${Vo(Ke.dialShadow,.6)}`,display:"flex",flexDirection:"column",alignItems:"center",gap:8},children:[Ve("span",{style:{...d,fontSize:16,fontWeight:900,letterSpacing:1,color:Pt,textAlign:"center"},children:e}),Ve("span",{style:{fontFamily:qo,fontSize:13,lineHeight:"20px",color:Ke.centerText,textAlign:"center"},children:t}),Ve("button",{onClick:o,onPointerDown:()=>u(true),onPointerUp:()=>u(false),onPointerLeave:()=>u(false),onPointerCancel:()=>u(false),style:{...d,marginTop:8,borderRadius:8,border:"none",backgroundColor:Pt,padding:"10px 24px",fontSize:14,fontWeight:900,letterSpacing:1.5,color:"#000000",cursor:"pointer",opacity:s?.7:1,transform:s?"scale(0.96)":"scale(1)",transition:"transform 100ms ease, opacity 100ms ease"},children:"Got it!"})]}),i&&Ve("div",{style:{position:"absolute",left:"50%",bottom:Qr,marginLeft:-12,width:0,height:0,borderLeft:"12px solid transparent",borderRight:"12px solid transparent",borderTop:`${ea}px solid ${Pt}`,filter:`drop-shadow(0 0 10px ${Vo(Ke.dialShadow,.5)})`,animation:n?"buoyOnboardArrowBounce 1.6s ease-in-out infinite":"none"}})]})})}r(Lt,"OnboardingTooltip");import{Fragment as oa,jsx as P,jsxs as ve}from"react/jsx-runtime";var na={x:.5,y:.5},Xo="@react_buoy_settings_tooltip_shown",Zo=false;function Qo(){if(Zo||typeof document>"u")return;let e=document.createElement("style");e.textContent=Pr(),document.head.appendChild(e),Zo=true}r(Qo,"injectKeyframes");var qe=r(e=>1-Math.pow(1-e,3),"easeOutCubic"),Ft=r(e=>e*e*e,"easeInCubic");function en({icon:e,index:t,totalIcons:o,position:i,progress:n,onPress:a}){let[s,u]=Q(false),[d,p]=Q(false),g=!e.icon&&e.id.startsWith("empty-"),I=!g&&e.unavailable===true,f=!g&&!I,{icons:z}=Eo,T=Er(t,o),M=0;n<=T[1]?M=0:n<=T[2]?M=(n-T[1])/(T[2]-T[1]):M=1,M=Math.max(0,Math.min(1,M));let D=Or,E=z.pressIn.scale,R=M*(d?E:s?1.1:1),k=0;M<=0?k=0:M<=.3?k=M:k=.3+(M-.3)*(.7/.7);let w=i.x*M,C=i.y*M;return P("button",{role:"menuitem","aria-label":g?"Empty slot":Mo(e.id,e.name),"data-testid":e.id?`buoy-dial-${e.id}`:void 0,"aria-disabled":!f,tabIndex:f?0:-1,onClick:f?a:void 0,onPointerEnter:F=>f&&F.pointerType==="mouse"&&u(true),onPointerLeave:()=>{u(false),p(false)},onPointerDown:()=>f&&p(true),onPointerUp:()=>p(false),onPointerCancel:()=>p(false),style:{position:"absolute",left:"50%",top:"50%",width:D,height:D,marginLeft:-D/2,marginTop:-D/2,display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",cursor:f?"pointer":"default",transform:`translate(${w}px, ${C}px) scale(${R})`,opacity:k,transition:s||d?"transform 100ms ease":"none",background:"none",border:"none",padding:0},children:g?P("div",{style:{width:x.emptySlot.dotSize,height:x.emptySlot.dotSize,borderRadius:x.emptySlot.dotSize/2,backgroundColor:$.emptyDotBackground,border:`${x.emptySlot.borderWidth}px solid ${$.emptyDotBorder}`}}):ve(oa,{children:[P("div",{style:{position:"absolute",width:`${x.icon.gradientBgSizePercent}%`,height:`${x.icon.gradientBgSizePercent}%`,borderRadius:x.icon.gradientBgBorderRadius,backgroundColor:"rgba(0, 0, 0, 0.2)",opacity:x.icon.gradientBgOpacity}}),P("div",{style:{position:"absolute",width:`${x.icon.innerGlowSizePercent}%`,height:`${x.icon.innerGlowSizePercent}%`,borderRadius:x.icon.innerGlowBorderRadius,backgroundColor:"rgba(255, 255, 255, 0.02)",opacity:x.icon.innerGlowOpacity}}),P("div",{style:{marginBottom:x.icon.wrapperMarginBottom,display:"flex",alignItems:"center",justifyContent:"center",fontSize:32,filter:s?"brightness(1.2)":"none"},children:e.icon}),P("span",{style:{fontSize:e.name.length>8?Math.max(x.icon.label.fontSize*.7,x.icon.label.fontSize*8/e.name.length):x.icon.label.fontSize,fontWeight:x.icon.label.fontWeight,fontFamily:x.icon.label.fontFamily,color:$.iconLabel,letterSpacing:x.icon.label.letterSpacing,marginTop:x.icon.label.marginTop,textTransform:"uppercase",whiteSpace:"nowrap"},children:e.name}),I&&P("span",{style:{fontSize:x.icon.label.fontSize-1,fontWeight:x.icon.label.fontWeight,fontFamily:x.icon.label.fontFamily,letterSpacing:x.icon.label.letterSpacing,color:Fr.muted,textTransform:"uppercase",whiteSpace:"nowrap"},children:"Unavailable"})]})})}r(en,"DialIconItem");function $t({side:e,color:t}){return P("svg",{width:18,height:18,viewBox:"0 0 24 24","aria-hidden":"true",focusable:"false",children:(e==="prev"?[[15,18,9,12],[9,12,15,6]]:[[9,18,15,12],[15,12,9,6]]).map(([o,i,n,a],s)=>P("line",{x1:o,y1:i,x2:n,y2:a,stroke:t,strokeWidth:2},s))})}r($t,"PagerChevron");function jt({side:e,disabled:t,onClick:o}){let[i,n]=Q(false),a=t?$.emptyDotBorder:$.accent;return ve("button",{type:"button","aria-label":`${e==="prev"?"Previous":"Next"} dial page`,"data-testid":`buoy-dial-${e}`,disabled:t,onClick:o,onPointerDown:()=>!t&&n(true),onPointerUp:()=>n(false),onPointerLeave:()=>n(false),onPointerCancel:()=>n(false),style:{display:"flex",alignItems:"center",gap:4,padding:"10px 16px",borderRadius:10,border:`1px solid ${$.dialBorder}`,backgroundColor:$.dialBackground,color:t?$.iconLabelMuted:$.centerText,fontSize:12,fontWeight:900,fontFamily:Lo,letterSpacing:1.5,textTransform:"uppercase",cursor:t?"default":"pointer",opacity:t?.4:1,boxShadow:t?"none":`0 0 8px ${Oo($.dialShadow,.4)}`,transform:i?"scale(0.92)":"scale(1)",transition:"transform 100ms ease"},children:[e==="prev"&&P($t,{side:"prev",color:a}),e==="prev"?"PREV":"NEXT",e==="next"&&P($t,{side:"next",color:a})]})}r(jt,"PagerButton");function Ht({icons:e,onClose:t,centerLabel:o="MENU",onCenterPress:i,settingsOpen:n=false,hintsDisabled:a=false}){let{id:s}=jr(),[u,d]=Q(0),[p,g]=Q(0),[I,f]=Q(0),[z,T]=Q(0),[M,D]=Q(0),[E,R]=Q(1),[k,w]=Q(false),[C,F]=Q(false),[A,B]=Q(false),ee=ft(null),_=ft(null),G=ft(null),te=ft(false),{entrance:V,exit:ae,interaction:oe}=Eo,me=Lr(),[ge,fe]=Q(()=>({width:window.innerWidth,height:window.innerHeight}));Ee(()=>{let y=r(()=>fe({width:window.innerWidth,height:window.innerHeight}),"resize");return window.addEventListener("resize",y),()=>window.removeEventListener("resize",y)},[]);let N=gt(()=>Dr({screenWidth:ge.width,maxCircleSize:Math.max(120,Math.min(320,ge.height-96))}),[ge]),Ce=gt(()=>Mr(),[]),ke=gt(()=>Rr(Xe,N.iconRadius),[N.iconRadius]),[Fe,$e]=Q(0),se=Math.max(1,Math.ceil(e.length/Xe)),Y=Math.min(Fe,se-1),le=gt(()=>{let y=Y*Xe,h=[...e.slice(y,y+Xe)];for(;h.length<Xe;)h.push({id:`empty-${h.length}`,name:"",icon:null,onPress:r(()=>{},"onPress")});return h},[e,Y]);Ee(()=>{Qo()},[]),Ee(()=>{let y=V.backdrop.duration,h=V.dial.rotation.duration,J=V.centerButton.delay,W=V.icons.delay,U=V.icons.duration,q=performance.now(),ie=r(he=>{let c=he-q;d(Math.min(1,c/y));let b=Math.min(1,c/400),O=qe(b)*1.1;b>.7&&(O-=(b-.7)*.33),b>=1&&(O=1),g(Math.max(0,Math.min(1.05,O)));let X=Math.min(1,c/h);if(f(qe(X)*360),c>=J){let xe=Math.min(1,(c-J)/300),Ne=qe(xe)*1.15;xe>.6&&(Ne-=(xe-.6)*.375),xe>=1&&(Ne=1),T(Math.max(0,Math.min(1.05,Ne)))}if(c>=W){let xe=Math.min(1,(c-W)/U);D(qe(xe))}let we=W+U;c<we?G.current=requestAnimationFrame(ie):(d(1),g(1),f(360),T(1),D(1),B(true))},"animate");return G.current=requestAnimationFrame(ie),()=>{G.current&&cancelAnimationFrame(G.current)}},[]);let pe=ht(()=>{if(te.current)return;te.current=true,F(true),G.current&&cancelAnimationFrame(G.current);let y=performance.now(),h=ae.icons.duration,J=ae.centerButton.duration,W=ae.dialScale.duration,U=Math.max(J,W),q=ae.backdrop.duration,ie=r(he=>{let c=he-y;if(c<h){let X=Ft(c/h);D(1-X),G.current=requestAnimationFrame(ie);return}let b=h;if(c<b+U){D(0);let X=Math.min(1,(c-b)/J),we=Math.min(1,(c-b)/W);T(1-Ft(X)),g(1-Ft(we)),G.current=requestAnimationFrame(ie);return}let O=b+U;if(c<O+q){g(0),T(0);let X=(c-O)/q;d(1-X),G.current=requestAnimationFrame(ie);return}d(0),t()},"animate");G.current=requestAnimationFrame(ie)},[ae,t]);Ee(()=>{let y=document.activeElement,h=ee.current;return()=>{y?.isConnected&&(document.activeElement===document.body||h?.contains(document.activeElement))&&y.focus()}},[]),Ee(()=>{if(n)return;_.current?.focus();let y=r(h=>{let J=ee.current;if(J){if(h.key==="Escape")h.preventDefault(),pe();else if(h.key==="Tab"){let W=Array.from(J.querySelectorAll('button:not(:disabled):not([aria-disabled="true"]), [tabindex="0"]')).filter(ie=>ie.getClientRects().length>0),U=W[0],q=W[W.length-1];(!J.contains(document.activeElement)||(h.shiftKey?document.activeElement===U:document.activeElement===q))&&(h.preventDefault(),(h.shiftKey?q:U)?.focus())}else if(["ArrowRight","ArrowDown","ArrowLeft","ArrowUp","Home","End"].includes(h.key)){let W=Array.from(J.querySelectorAll('[role="menuitem"]:not([aria-disabled="true"])')),U=W.indexOf(document.activeElement);if(U<0||!W.length)return;h.preventDefault();let q=h.key==="Home"?0:h.key==="End"?W.length-1:(U+(h.key==="ArrowRight"||h.key==="ArrowDown"?1:-1)+W.length)%W.length;W[q].focus()}}},"handleKeyDown");return document.addEventListener("keydown",y),()=>document.removeEventListener("keydown",y)},[pe,n]);let[ze,je]=Q(false);Ee(()=>{if(a)return;let y=false,h=setTimeout(async()=>{let J=await Po.getItem(Xo);!y&&!J&&je(true)},1200);return()=>{y=true,clearTimeout(h)}},[a]);let Se=ht(()=>{je(false),Po.setItem(Xo,"true")},[]);Ee(()=>{n&&ze&&Se()},[n,ze,Se]);let Ae=ht(y=>{if(y.id.startsWith("empty-")||te.current)return;let[h,J]=oe.iconSelect.pulse,W=performance.now(),U=150,q=r(ie=>{let he=ie-W;if(he<U){let c=qe(he/U);R(1-(1-h.scale)*c),requestAnimationFrame(q)}else if(he<U*2){let c=qe((he-U)/U);R(h.scale+(J.scale-h.scale)*c),requestAnimationFrame(q)}else R(1)},"animatePulse");requestAnimationFrame(q),setTimeout(()=>{y.onPress(),pe()},oe.iconSelect.actionDelay)},[oe.iconSelect,pe]),Be=ht(y=>{if(te.current)return;let h=Math.max(0,Math.min(y,se-1));h!==Y&&$e(h)},[se,Y]),ne=N.buttonSize*x.centerButton.containerRatio,De=N.buttonSize*x.centerButton.borderRatio,He=N.buttonSize*x.centerButton.containerRatio/2+6,l=A&&!C;return ve("div",{ref:ee,role:"dialog","aria-label":"Dial Menu","aria-modal":"true",style:{position:"fixed",inset:0,zIndex:1e4},children:[P("button",{type:"button","aria-label":"Close dial menu",tabIndex:0,onClick:pe,style:{position:"absolute",inset:0,border:0,padding:0,backgroundColor:$.dialBackdrop,opacity:u}}),ve("div",{style:{position:"absolute",left:"50%",marginLeft:-N.circleSize/2,bottom:80,width:N.circleSize,height:N.circleSize,borderRadius:"50%",backgroundColor:$.dialBackground,border:`${x.circle.borderWidth}px solid ${$.dialBorder}`,boxShadow:`0 0 ${x.circle.shadowRadius}px ${Oo($.dialShadow,x.circle.shadowOpacity)}`,transform:`scale(${p}) rotate(${I}deg)`,opacity:p>.01?1:0,overflow:"hidden"},children:[P("div",{style:{position:"absolute",inset:0,borderRadius:"50%",backgroundColor:$.dialGradient1,opacity:x.gradientLayers[0].opacity}}),P("div",{style:{position:"absolute",inset:0,top:"30%",left:"30%",borderRadius:"50%",backgroundColor:$.dialGradient2,opacity:x.gradientLayers[1].opacity}}),P("div",{style:{position:"absolute",inset:0,top:"50%",left:"50%",borderRadius:"50%",backgroundColor:$.dialGradient3,opacity:x.gradientLayers[2].opacity}}),Ce.map(y=>P("div",{style:{position:"absolute",top:"50%",left:0,right:0,height:x.grid.lineHeight,transform:`rotate(${y}deg)`,transformOrigin:"center"},children:["left","right"].map(h=>P("div",{style:{position:"absolute",top:0,[h]:0,width:`calc(50% - ${He}px)`,height:x.grid.lineHeight,backgroundColor:$.dialGridLine}},h))},y)),P("div",{"data-testid":"dial-background","data-background":s,style:{position:"absolute",inset:0,pointerEvents:"none"},children:s==="hyperspace"?P(Xr,{size:N.circleSize}):P($r,{focus:na})}),le.map((y,h)=>P(en,{icon:y,index:h,totalIcons:le.length,position:ke[h],progress:M,onPress:()=>Ae(y)},h)),ve("div",{style:{position:"absolute",left:"50%",top:"50%",width:ne,height:ne,marginLeft:-ne/2,marginTop:-ne/2,display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:$.hubHalo,borderRadius:N.buttonSize,overflow:"hidden",transform:`scale(${z*E})`,opacity:z>.01?1:0},children:[P("div",{style:{position:"absolute",inset:0,backgroundColor:$.dialGradient1,opacity:.5,borderRadius:N.buttonSize}}),P("div",{style:{position:"absolute",inset:0,top:"20%",left:"20%",backgroundColor:$.dialGradient2,opacity:.3,borderRadius:N.buttonSize}}),P("div",{style:{position:"absolute",inset:0,top:"40%",left:"40%",backgroundColor:$.dialGradient3,opacity:.2,borderRadius:N.buttonSize}}),P("div",{style:{width:De,height:De,borderRadius:N.buttonSize*x.centerButton.borderRadiusRatio,backgroundColor:$.hubFill,display:"flex",alignItems:"center",justifyContent:"center"},children:P("button",{ref:_,type:"button","aria-label":n?"Close Settings":"Open Dev Tools Settings",disabled:!i,onClick:i,onPointerEnter:y=>y.pointerType==="mouse"&&w(true),onPointerLeave:()=>w(false),style:{border:0,padding:0,background:"transparent",width:N.buttonSize,height:N.buttonSize,borderRadius:N.buttonSize/2,display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",cursor:i?"pointer":"default",transform:k?`scale(${oe.centerHover.scale})`:"scale(1)",transition:`transform ${oe.centerHover.duration}ms ease`,animation:l&&!k?me.pulse:"none"},children:n?ve("span",{style:{display:"flex",flexDirection:"column",alignItems:"center",fontSize:x.centerButton.text.fontSize-2,fontWeight:x.centerButton.text.fontWeight,fontFamily:x.centerButton.text.fontFamily,color:$.centerText,letterSpacing:x.centerButton.text.letterSpacing,textAlign:"center",textShadow:`0 0 4px ${$.centerTextGlow}`,textTransform:"uppercase",lineHeight:1.2},children:[P("span",{style:{marginBottom:-2},children:"CLOSE"}),P("span",{style:{marginTop:-2},children:"SETTINGS"})]}):P("span",{style:{fontSize:x.centerButton.text.fontSize,fontWeight:x.centerButton.text.fontWeight,fontFamily:x.centerButton.text.fontFamily,color:$.centerText,letterSpacing:x.centerButton.text.letterSpacing,textAlign:"center",textShadow:`0 0 4px ${$.centerTextGlow}`,textTransform:"uppercase"},children:o})})})]})]}),se>1&&ve("div",{style:{position:"absolute",left:"50%",marginLeft:-N.circleSize/2,top:"calc(100% - 64px)",width:N.circleSize,display:"flex",alignItems:"center",justifyContent:"space-between",opacity:Math.min(1,p),transform:`scale(${Math.min(1,p)})`},children:[P(jt,{side:"prev",disabled:Y<=0,onClick:()=>Be(Y-1)}),ve("span",{"data-testid":"buoy-dial-page",style:{padding:"6px 12px",fontSize:13,fontWeight:900,fontFamily:Lo,letterSpacing:2,color:$.centerText,textShadow:`0 0 6px ${$.centerTextGlow}`},children:[String(Y+1).padStart(2,"0"),ve("span",{style:{color:$.iconLabelMuted,textShadow:"none"},children:[" / ",String(se).padStart(2,"0")]})]}),P(jt,{side:"next",disabled:Y>=se-1,onClick:()=>Be(Y+1)})]}),ze&&!n&&P(Lt,{title:"Welcome to Buoy!",message:"Tap the center button to configure and add tools to your dial menu.",onDismiss:Se,showArrow:false})]})}r(Ht,"DialMenu");import{persistentStorage as tn,devToolsStorageKeys as ia}from"@buoy-gg/shared-ui/web";import{recordUsage as ra,pruneUsage as aa}from"@buoy-gg/floating-tools-core/web";var on=ia.dial.usage(),Ge={},nn=false,Nt=null;function Wt(){return Nt||(Nt=(async()=>{try{let e=await tn.getItem(on);if(e){let t=JSON.parse(e);t&&typeof t=="object"&&(Ge=t)}}catch{}finally{nn=true}})(),Nt)}r(Wt,"loadDialUsage");Wt();function rn(e){return e.map((t,o)=>({id:t,index:o,lastUsed:Ge[t]?.lastUsed??0})).sort((t,o)=>o.lastUsed-t.lastUsed||t.index-o.index).map(({id:t})=>t)}r(rn,"getRankedToolIds");async function an(e){if(!e)return;nn||await Wt();let t=Math.max(Date.now(),...Object.values(Ge).map(o=>o.lastUsed+1));Ge=aa(ra(Ge,e,t),t);try{await tn.setItem(on,JSON.stringify(Ge))}catch{}}r(an,"recordToolUsage");import{useCallback as sa,useMemo as sn}from"react";import{persistentStorage as la}from"@buoy-gg/shared-ui/web";import{useState as re,useEffect as Te,useCallback as bt,useMemo as vt}from"react";import{settingsEventBus as St}from"@buoy-gg/floating-tools-core/web";import{useSyncExternalStore as ca}from"react";import{getRegisteredToolModule as da}from"@buoy-gg/shared-ui/web";var ua=r(()=>()=>{},"noopSubscribe"),pa=r(()=>null,"serverSnapshot");function ln(){let e=da("@buoy-gg/external-sync");return ca(e?.subscribeSyncStatus??ua,()=>e?.getSyncStatus?.()??null,pa)}r(ln,"useDesktopSyncStatus");import{SentryIcon as ma,WifiCircuitIcon as ga,ImageOverlayIcon as fa,RenderCountIcon as ha,Info as _t,Layers as ya,ChevronRightIcon as cn,ChevronDown as dn,getStorageBackendType as ba,getUseLicense as va,signOutOfBuoy as Sa,persistentStorage as Oe,Trash2 as wa,CheckCircle2 as un,BuoyUpgradeSheet as xa,BackgroundSwitcher as Ta,night as v,NightCard as Pe,NightRows as Ut,NightSectionLabel as Ia,NightFootnote as pn,NightSwitch as mn,NightButton as Kt,NightSegmented as Ca,NightBadge as be,NightSeparator as ka,monoFont as gn}from"@buoy-gg/shared-ui/web";import{EnvIcon as fn,StorageIcon as za,RoutesIcon as Aa,NetworkIcon as Ba,QueryIcon as Da,HighlighterIcon as Ra,ReduxIcon as Ma,EventsIcon as Ea}from"@buoy-gg/floating-tools-core/web";import Oa,{createContext as Pa,useContext as La}from"react";import{jsx as Fa}from"react/jsx-runtime";var hn=Pa({});function Vt({children:e,defaultFloatingTools:t,defaultDialTools:o}){let i=Oa.useMemo(()=>({defaultFloatingTools:t,defaultDialTools:o}),[t,o]);return Fa(hn.Provider,{value:i,children:e})}r(Vt,"DefaultConfigProvider");function qt(){return La(hn)}r(qt,"useDefaultConfig");import $a from"react";import{toolTheme as ja}from"@buoy-gg/shared-ui/web";import{jsx as yn}from"react/jsx-runtime";function bn({label:e,size:t,color:o=ja.colors.text}){let i=Math.max(Array.from(e.replace(/[\uFE00-\uFE0F\u200D]/g,"")).length,1),n=i<=2?t:t*1.6,a=Math.max(7,Math.min(t*(i===1?.7:.62),n/(.62*i)));return yn("span",{style:{display:"inline-flex",minWidth:t,maxWidth:n,height:t,alignItems:"center",justifyContent:"center",color:o,fontSize:a,fontWeight:800,letterSpacing:.5,whiteSpace:"nowrap",overflow:"hidden"},children:e})}r(bn,"AppTextIcon");function Gt(e,t){return e==null?e:typeof e=="function"?$a.createElement(e,{slot:t.slot,size:t.size,state:t.state,actions:t.actions}):typeof e=="string"||typeof e=="number"?yn(bn,{label:String(e),size:t.size,color:t.color}):e}r(Gt,"renderAppIcon");import{JsModal as Ha,devToolsStorageKeys as Jt,onSettingsApplied as Na,expandableWindowControlsSupported as Wa}from"@buoy-gg/shared-ui/web";import{useSafeAreaInsets as _a}from"@buoy-gg/shared-ui/web";import{Fragment as Qe,jsx as m,jsxs as j}from"react/jsx-runtime";var et="@react_buoy_dev_tools_settings",Ua=6,wt=r(e=>{let t=Ua,o={};for(let[i,n]of Object.entries(e))n&&t>0?(o[i]=true,t-=1):o[i]=false;return o},"enforceDialLimit"),Ka=r((e,t)=>{let{userStatus:o,environment:i,...n}=e,a=t?Object.entries(n).filter(([s])=>t.includes(s)):Object.entries(n);return{...Object.fromEntries(a),environment:i??false}},"sanitizeFloating"),vn=r((e,t,o)=>{if(!t)return e;let i={...e.dialTools,...t.dialTools??{}},n=o?.allowedDialKeys?Object.entries(i).filter(([a])=>o.allowedDialKeys?.includes(a)):Object.entries(i);return{dialTools:wt(Object.fromEntries(n)),floatingTools:Ka({...e.floatingTools,...t.floatingTools??{}},o?.allowedFloatingKeys),globalSettings:{enableSharedModalDimensions:false,expandableWindowControls:true,...t.globalSettings??{}}}},"mergeWithDefaults"),Va=r((e=[],t,o)=>{let i={},n={},a=new Set(t??[]),s=new Set(o??[]),u=!o||o.length===0;for(let d of e){let{id:p,slot:g="both"}=d;(g==="dial"||g==="both")&&(i[p]=u?true:s.has(p)),(g==="row"||g==="both")&&(n[p]=a.has(p))}return{dialTools:wt(i),floatingTools:{...n,environment:a.has("environment")},globalSettings:{enableSharedModalDimensions:false,expandableWindowControls:true}}},"generateDefaultSettings"),qa=r(({visible:e,onClose:t,onSettingsChange:o,initialSettings:i,availableApps:n=[],storage:a=Oe,zIndex:s})=>{let{defaultFloatingTools:u,defaultDialTools:d}=qt(),p=vt(()=>Va(n,u,d),[n,u,d]),g=vt(()=>Object.keys(p.dialTools),[p]),I=vt(()=>Object.keys(p.floatingTools).filter(c=>c!=="environment"),[p]),[f,z]=re(i||tt||p),[T,M]=re(Yt??"floating"),[D,E]=re(Yt!==null),[R,k]=re(new Set),[w,C]=re(false),[F,A]=re(false);Te(()=>{let c=requestAnimationFrame(()=>A(true));return()=>cancelAnimationFrame(c)},[]);let B=ln();Te(()=>{r(async()=>{try{let c=await Oe.getItem(Jt.settings.activeTab());if(c&&["floating","settings","pro"].includes(c)){let b=c;Yt=b,M(O=>O===b?O:b)}}catch{}finally{E(true)}},"loadActiveTab")()},[]),Te(()=>{D&&Oe.setItem(Jt.settings.activeTab(),T).catch(c=>{console.warn("[Buoy]","Failed to save settings active tab:",c)})},[T,D]);let ee=va()?.(),_=ee?.isPro??false,G=!_&&ee?.licenseKey?ee.error:null,te=ee?.errorKind==="transport",[V,ae]=re(Sn),[oe,me]=re(false),[ge,fe]=re(false),[N,Ce]=re(false),[ke,Fe]=re([]),[$e,se]=re(false),Y=_a(),le=xo.get("window").height,pe=xo.get("window").width,ze=Math.floor(le*.33),je=Math.min(pe-32,400),Se=bt(async()=>{try{let c=await a.getItem(et);if(c){let b=JSON.parse(c),O=vn(p,b,{allowedDialKeys:g,allowedFloatingKeys:I});tt=O,z(X=>wn(X,O)?X:O);return}tt=p,z(b=>wn(b,p)?b:p)}catch(c){console.error("[Buoy]","Failed to load dev tools settings:",c),z(p)}},[p,g,I,a]);Te(()=>{Se()},[Se]),Te(()=>{ba().then(c=>{Sn=c,ae(b=>b===c?b:c)})},[]),Te(()=>{N&&(se(true),Oe.getAllKeys().then(c=>{Fe(c.sort())}).catch(()=>{Fe([])}).finally(()=>{se(false)}))},[N]);let Ae=r(async c=>{try{let b={...c,dialTools:wt(c.dialTools)};await a.setItem(et,JSON.stringify(b)),tt=b,z(b),o?.(b),St.emit(b)}catch(b){console.error("[Buoy]","Failed to save dev tools settings:",b)}},"saveSettings"),Be=r(c=>{let b={...f,floatingTools:{...f.floatingTools,[c]:!f.floatingTools[c]}};Ae(b)},"toggleFloatingTool"),ne=r(c=>{let b={...f,globalSettings:{...f.globalSettings,[c]:!f.globalSettings?.[c]}};Ae(b)},"toggleGlobalSetting"),De=r(async()=>{me(true),fe(false);try{await Oe.clear(),fe(true),z(p),a!==Oe&&await a.setItem(et,JSON.stringify(p)),o?.(p),St.emit(p),setTimeout(()=>fe(false),2e3)}catch(c){console.error("[Buoy]","Failed to clear storage:",c)}finally{me(false)}},"handleClearStorage"),He=bt(c=>{},[]),l=r(c=>{let b=n.find(O=>O.id===c);return b?.description?b.description:c==="environment"?"Environment badge.":""},"getToolDescription"),y=r(c=>c==="environment"?"Env Badge":n.find(b=>b.id===c)?.name??c.toUpperCase().replace(/_/g," "),"getToolLabel"),h=r(c=>{if(!F)return null;switch(c){case"query":return m(Da,{size:18});case"env":return m(fn,{size:18});case"sentry":return m(ma,{size:18,color:"#9945FF"});case"storage":return m(za,{size:18,bgColor:v.color.surface});case"wifi":case"query-wifi-toggle":return m(ga,{size:18,colorPreset:"green",strength:4,noBackground:true});case"route-events":return m(Aa,{size:18,bgColor:v.color.surface});case"network":return m(Ba,{size:18});case"environment":return m(fn,{size:18});case"debug-borders":return m(ya,{size:18,color:v.color.accent});case"highlight-updates":return m(ha,{size:18,color:v.color.accent});case"highlight-updates-modal":return m(Ra,{size:18});case"redux":return m(Ma,{size:18});case"image-overlay":return m(fa,{size:18});case"events":return m(Ea,{size:18});case"zustand":try{let{ZustandIcon:b}=To("@buoy-gg/zustand/web");return m(b,{size:18})}catch{return m(_t,{size:18,color:v.color.textSecondary})}case"jotai":try{let{JotaiIcon:b}=To("@buoy-gg/jotai/web");return m(b,{size:18})}catch{return m(_t,{size:18,color:v.color.textSecondary})}default:{let b=n.find(O=>O.id===c);return b?.icon!=null?Gt(b.icon,{slot:"row",size:18,color:b.color}):m(_t,{size:18,color:v.color.textSecondary})}}},"getToolIcon"),J=r((c,b,O,X)=>{let we=l(c);return j(ct,{activeOpacity:O?1:.7,onPress:()=>!O&&X(),accessibilityLabel:y(c),accessibilityRole:"button",style:[S.toolRow,O&&S.rowDisabled],children:[m(H,{style:S.toolIconSlot,children:h(c)}),j(H,{style:S.rowInfo,children:[j(K,{style:S.rowLabel,children:[y(c),O?" \xB7 max 6":""]}),we?m(K,{style:S.rowCaption,numberOfLines:1,children:we}):null]}),m(mn,{value:b,disabled:O,onValueChange:()=>X()})]},c)},"renderToolRow"),W=r(c=>{k(b=>{let O=new Set(b);return O.has(c)?O.delete(c):O.add(c),O})},"toggleSettingExpanded"),U=r((c,b,O,X,we)=>{let xe=f.globalSettings?.[c]??false,Ne=R.has(c);return j(H,{children:[j(ct,{activeOpacity:.7,onPress:()=>W(c),accessibilityLabel:b,style:S.settingRow,children:[j(H,{style:S.rowInfo,children:[m(K,{style:S.rowLabel,children:b}),m(K,{style:S.rowCaption,numberOfLines:Ne?0:1,children:O})]}),m(mn,{value:xe,onValueChange:()=>ne(c)})]}),Ne&&j(H,{style:S.settingRowBody,children:[m(K,{style:S.settingRowBodyText,children:X}),m(K,{style:S.settingRowBodyHint,children:we})]})]},c)},"renderGlobalSettingRow"),q=r((c,b,O)=>j(H,{children:[m(Ia,{children:c}),b,O]}),"renderSection"),ie=V==="filesystem"?m(be,{label:"File System",tone:"accent"}):V==="asyncstorage"?m(be,{label:"Async Storage",tone:"warning"}):V==="localstorage"?m(be,{label:"Local Storage",tone:"accent"}):V==="memory"?m(be,{label:"Memory",tone:"danger"}):m(be,{label:"Loading\u2026",tone:"neutral"}),he=r(()=>j(H,{style:S.container,children:[j(wo,{style:S.scrollContent,showsVerticalScrollIndicator:false,contentContainerStyle:S.scrollContainer,children:[T==="floating"&&m(Qe,{children:q("Floating Tools",m(Pe,{glass:true,children:m(Ut,{children:Object.entries(f.floatingTools).map(([c,b])=>J(c,b,false,()=>Be(c)))})}),m(pn,{children:"Tools switched on here appear in the floating bubble row."}))}),T==="settings"&&j(Qe,{children:[q("Background",m(Pe,{glass:true,padded:true,children:m(Ta,{embedded:true})})),q("Storage",j(Pe,{glass:true,children:[j(ct,{activeOpacity:.7,onPress:()=>Ce(!N),accessibilityLabel:"Storage Type",style:S.settingRow,children:[m(H,{style:S.rowInfo,children:m(K,{style:S.rowLabel,children:"Storage Type"})}),ie,N?m(dn,{size:16,color:v.color.textTertiary}):m(cn,{size:16,color:v.color.textTertiary})]}),N&&j(Qe,{children:[j(H,{style:S.settingRowBody,children:[m(K,{style:S.settingRowBodyText,children:V==="filesystem"?"Settings persist independently and survive AsyncStorage.clear() calls during logout.":V==="asyncstorage"?"Settings may be lost if AsyncStorage is cleared during logout.":V==="localstorage"?"Settings are saved in this browser. Clearing site data removes them.":V==="memory"?"Settings are stored in memory only and will be lost on app restart.":"Checking storage backend\u2026"}),V==="asyncstorage"&&m(K,{style:[S.settingRowBodyText,S.bodyWarning],children:"Install expo-file-system to persist settings through logout flows."}),V==="memory"&&m(K,{style:[S.settingRowBodyText,S.bodyDanger],children:"No persistent storage available \u2014 install expo-file-system (best) or @react-native-async-storage/async-storage."})]}),m(ka,{}),j(H,{style:S.storageExpanded,children:[j(H,{style:S.storageExpandedHeader,children:[m(K,{style:S.storageExpandedTitle,children:"SAVED SETTINGS"}),m(K,{style:S.storageExpandedCount,children:$e?"\u2026":`${ke.length} keys`})]}),$e?m(K,{style:S.storageKeyEmpty,children:"Loading\u2026"}):ke.length===0?m(K,{style:S.storageKeyEmpty,children:"No settings saved yet"}):m(wo,{style:S.storageKeysList,nestedScrollEnabled:true,showsVerticalScrollIndicator:true,children:ke.map(c=>m(H,{style:S.storageKeyItem,children:m(K,{style:S.storageKeyText,numberOfLines:1,children:c.replace("@react_buoy_","")})},c))})]}),m(H,{style:S.cardButtonWrap,children:m(Kt,{label:ge?"Cleared":oe?"Clearing\u2026":"Clear All Settings",variant:ge?"secondary":"destructive",size:"md",disabled:oe,onPress:De,icon:ge?m(un,{size:15,color:v.color.accent}):m(wa,{size:15,color:oe?v.color.textTertiary:v.color.danger})})})]})]})),B&&B.state!=="idle"&&q("Desktop Sync",j(Pe,{glass:true,children:[j(ct,{activeOpacity:.7,onPress:()=>W("desktopSync"),accessibilityLabel:"Buoy Desktop",style:S.settingRow,children:[m(H,{style:S.rowInfo,children:m(K,{style:S.rowLabel,children:"Buoy Desktop"})}),B.state==="connected"?m(be,{label:"Connected",tone:"accent"}):B.state==="connecting"?m(be,{label:"Connecting\u2026",tone:"neutral"}):m(be,{label:"Retrying",tone:"warning"}),R.has("desktopSync")?m(dn,{size:16,color:v.color.textTertiary}):m(cn,{size:16,color:v.color.textTertiary})]}),R.has("desktopSync")&&j(H,{style:S.settingRowBody,children:[j(K,{style:S.settingRowBodyText,children:[B.state==="connected"?"Streaming tool data to Buoy Desktop at ":"Trying to reach Buoy Desktop at ",m(K,{style:S.footnoteMono,children:B.targetURL??"(unknown URL)"}),B.state!=="connected"&&" \u2014 is the desktop app running? Override with the externalSync socketURL option if it runs elsewhere."]}),B.state==="retrying"&&B.lastError&&j(K,{style:[S.settingRowBodyText,S.bodyWarning],children:["Last error: ",B.lastError]})]})]})),q("Modal Behavior",m(Pe,{glass:true,children:j(Ut,{children:[U("enableSharedModalDimensions","Shared Modal Size","Sync dimensions across all tools","When enabled, all tool modals will share the same size and position. Resizing one modal will affect all others. When disabled, each tool remembers its own size and position independently.","Keep OFF for the best experience. This allows you to customize each tool's modal size separately."),Wa(We.OS==="web")?U("expandableWindowControls","Expand Controls","iPad-style expandable window buttons","When enabled, the window control buttons (minimize, toggle mode, close) start as small dots and expand into larger, easy-to-tap buttons when pressed. When disabled, buttons are directly tappable at their small size.","Keep ON for touch devices where the small buttons are hard to press. Turn OFF if you prefer direct single-tap access."):null]})}))]}),T==="pro"&&j(Qe,{children:[q("License",j(Pe,{glass:true,children:[j(H,{style:S.settingRow,children:[m(H,{style:S.rowInfo,children:m(K,{style:S.rowLabel,children:"License Status"})}),m(H,{testID:"buoy-settings-license-status",accessibilityLabel:_?"License: Active":"License: Free",children:_?m(be,{label:"Active",tone:"accent"}):m(be,{label:"Free",tone:"neutral"})})]}),ee?.tierSource==="session"?j(H,{style:S.settingRow,children:[m(H,{style:S.rowInfo,children:m(K,{style:S.rowLabel,children:"Signed in with Buoy"})}),m(Kt,{label:"Sign out",variant:"secondary",size:"md",onPress:()=>void Sa(),testID:"buoy-settings-signout"})]}):null]}),m(pn,{children:_?"You have full access to all Buoy DevTools features.":G?te?`Couldn't reach the license server (${G}). A VPN or corporate proxy can block buoy.gg \u2014 turn it off and reload. Your key hasn't been rejected.`:`License check failed: ${G}.`:"Upgrade to Pro to unlock all features and support development."})),!_&&j(Qe,{children:[q("Pro Features",m(Pe,{glass:true,children:m(Ut,{children:["Advanced Settings","Priority Support"].map(c=>j(H,{style:S.featureRow,children:[m(un,{size:16,color:v.color.accent}),m(K,{style:S.rowLabel,children:c})]},c))})})),m(Kt,{label:"Upgrade to Pro",variant:"primary",size:"lg",onPress:()=>C(true)})]})]})]}),m(xa,{visible:w,onClose:()=>C(false)})]}),"renderContent");return m(Ha,{visible:e,onClose:t,zIndex:s,variant:"night",header:{showToggleButton:false,customContent:m(H,{style:S.headerRow,children:m(Ca,{glass:true,tabs:[{key:"floating",label:"Floating"},{key:"settings",label:"Settings"},{key:"pro",label:"Pro"}],activeKey:T,onChange:c=>M(c)})})},initialMode:"bottomSheet",onModeChange:He,persistenceKey:Jt.settings.root(),enablePersistence:true,maxHeight:le-Y.top,initialHeight:ze,initialFloatingPosition:{x:(pe-je)/2,y:Y.top+20},enableGlitchEffects:true,children:he()})},"DevToolsSettingsModal"),Ga={dialTools:{},floatingTools:{environment:false},globalSettings:{enableSharedModalDimensions:false}},Ja=r((e,t)=>{let o=new Set(e??[]),i=new Set(t??[]),n={};for(let s of i)n[s]=true;let a={environment:o.has("environment")};for(let s of o)s!=="environment"&&(a[s]=true);return{dialTools:wt(n),floatingTools:a,globalSettings:{enableSharedModalDimensions:false}}},"createDefaultsFromConfig"),tt=null,Yt=null,Sn=null,wn=r((e,t)=>JSON.stringify(e)===JSON.stringify(t),"sameSettings");St.addListener(e=>{e&&(tt=e)});var xn=r(()=>{let{defaultFloatingTools:e,defaultDialTools:t}=qt(),o=vt(()=>!e&&!t?Ga:Ja(e,t),[e,t]),[i,n]=re(o),a=bt(async()=>{try{let u=await Oe.getItem(et);if(u){let d=JSON.parse(u),p=vn(o,d);n(p);return}n(o)}catch(u){console.error("[Buoy]","Failed to load dev tools settings:",u),n(o)}},[o]);Te(()=>Na(u=>{u.includes(et)&&a()}),[a]),Te(()=>{a();let u=St.addListener(d=>{try{d&&n(d)}catch{}});return()=>{u()}},[a]);let s=bt(()=>{a()},[a]);return{settings:i,refreshSettings:s}},"useDevToolsSettings"),S=dt.create({container:{flex:1,backgroundColor:"transparent"},headerRow:{flexDirection:"row",alignItems:"center",paddingLeft:v.gutter,paddingRight:v.gutter,paddingBottom:8},scrollContent:{flex:1},scrollContainer:{paddingHorizontal:v.gutter,paddingTop:8,paddingBottom:24,gap:v.groupGap},toolRow:{flexDirection:"row",alignItems:"center",gap:12,paddingHorizontal:v.rowPadH,paddingVertical:12},settingRow:{flexDirection:"row",alignItems:"center",gap:10,paddingHorizontal:v.rowPadH,paddingVertical:v.rowPadV,minHeight:52},featureRow:{flexDirection:"row",alignItems:"center",gap:10,paddingHorizontal:v.rowPadH,paddingVertical:12},rowDisabled:{opacity:.4},toolIconSlot:{width:24,alignItems:"center"},rowInfo:{flex:1,gap:2},rowLabel:{color:v.color.text,fontSize:v.font.row,fontWeight:"500"},rowCaption:{color:v.color.textTertiary,fontSize:v.font.label},settingRowBody:{paddingHorizontal:v.rowPadH,paddingBottom:v.rowPadV,gap:6},settingRowBodyText:{color:v.color.textSecondary,fontSize:v.font.caption,lineHeight:v.font.caption*1.45},settingRowBodyHint:{color:v.color.textTertiary,fontSize:v.font.caption,lineHeight:v.font.caption*1.45},bodyWarning:{color:v.color.warning},bodyDanger:{color:v.color.danger},cardButtonWrap:{paddingHorizontal:v.cardPad,paddingTop:10,paddingBottom:v.cardPad},storageExpanded:{paddingHorizontal:v.rowPadH,paddingVertical:12,gap:8},storageExpandedHeader:{flexDirection:"row",alignItems:"center"},storageExpandedTitle:{flex:1,color:v.color.textSecondary,fontSize:v.font.micro,fontWeight:"600",letterSpacing:.5},storageExpandedCount:{color:v.color.textTertiary,fontSize:v.font.micro},storageKeysList:{maxHeight:150},storageKeyItem:{backgroundColor:v.color.glassElevated,borderRadius:v.radius.segment,paddingHorizontal:10,paddingVertical:7,marginBottom:4},storageKeyText:{color:v.color.textSecondary,fontSize:v.font.micro,fontFamily:gn},storageKeyEmpty:{color:v.color.textTertiary,fontSize:v.font.caption,fontStyle:"italic"},footnoteMono:{fontFamily:gn,fontSize:v.font.label,color:v.color.textSecondary}});import{jsx as Tn}from"react/jsx-runtime";var Ya=[];function Xt({visible:e,onClose:t,availableTools:o=Ya,defaultFloatingTools:i,defaultDialTools:n,storage:a=la,onSettingsChange:s}){let u=sn(()=>({getItem:r(async g=>a.getItem(g),"getItem"),setItem:r(async(g,I)=>a.setItem(g,I),"setItem")}),[a]),d=sn(()=>o.map(g=>({...g,name:g.name??g.id,icon:typeof g.icon=="function"?I=>g.icon(I.size):g.icon})),[o]),p=sa(g=>{s?.(g)},[s]);return Tn(Vt,{defaultFloatingTools:i,defaultDialTools:n,children:Tn(qa,{visible:e,onClose:t,zIndex:11e3,availableApps:d,storage:u,onSettingsChange:p})})}r(Xt,"SettingsModal");import{listenBuoyKeydown as Xa}from"@buoy-gg/shared-ui/web/floating";import{persistentStorage as In,setExpandableWindowControls as Za}from"@buoy-gg/shared-ui/web";import{createContext as Qa,useCallback as Ie,useContext as es,useEffect as xt,useMemo as ts,useRef as ot,useState as Cn}from"react";var os=r((e,t,o)=>{if(t.singleton){let n=e.find(a=>a.id===t.id);if(n){let a=n.minimized??false;return{instanceId:n.instanceId,wasMinimized:a,apps:[...e.filter(s=>s.instanceId!==n.instanceId),{...n,minimized:false}]}}}let i=o();return{instanceId:i,wasMinimized:false,apps:[...e,{...t,instanceId:i}]}},"resolveOpenAppsState");import{createContext as ns,useCallback as kn,useContext as is,useEffect as Tt,useMemo as rs,useRef as zn,useState as It}from"react";import{JsModal as as,ModalHeader as nt,HeaderSearchButton as ss,TickProvider as ls,ToolScreenHeaderContext as cs,devToolsStorageKeys as An,buoyColors as Bn,gameUIColors as Zt}from"@buoy-gg/shared-ui/web";import{jsx as ce,jsxs as Ct}from"react/jsx-runtime";var it=r(()=>{},"noop"),ds={search:"",isSearchActive:false,clearSearch:it,close:it,minimize:it,showToast:it,setHeaderOverride:it},Dn=ns(null);function Qt(){return is(Dn)??ds}r(Qt,"useToolHost");function Rn(e,t){let{setHeaderOverride:o}=Qt();Tt(()=>(o(e),()=>o(null)),t)}r(Rn,"useToolHeader");var Mn=2200,us={success:Zt.success,error:Zt.error,info:Zt.info};function En({message:e,type:t,nonce:o}){let i=zn(new Re.Value(0)).current;Tt(()=>{i.setValue(0),Re.sequence([Re.timing(i,{toValue:1,duration:150,useNativeDriver:true}),Re.delay(Mn-450),Re.timing(i,{toValue:0,duration:300,useNativeDriver:true})]).start()},[o,i]);let n=us[t];return Ct(Re.View,{pointerEvents:"none",style:[kt.toast,{opacity:i,borderColor:n+"60"}],children:[ce(H,{style:[kt.toastDot,{backgroundColor:n}]}),ce(K,{style:kt.toastText,numberOfLines:2,children:e})]})}r(En,"ToastView");function On({app:e,config:t,visible:o,zIndex:i,onClose:n,onMinimize:a,initialModalState:s,enableSharedModalDimensions:u,bodyProps:d}){let p=e.component,[g,I]=It(false),[f,z]=It(""),[T,M]=It(null),[D,E]=It(null),R=zn(null),k=kn(()=>{I(false),z("")},[]),w=kn((V,ae="info")=>{R.current&&clearTimeout(R.current),E(oe=>({message:V,type:ae,nonce:(oe?.nonce??0)+1})),R.current=setTimeout(()=>E(null),Mn)},[]);Tt(()=>()=>{R.current&&clearTimeout(R.current)},[]);let C=rs(()=>({search:g?f:"",isSearchActive:g,clearSearch:k,close:n,minimize:r(()=>a(),"minimize"),showToast:w,setHeaderOverride:M,instanceId:e.instanceId}),[f,g,k,n,a,w,e.instanceId]),F=T?.title??t.title??e.title??e.id,A=T?.subtitle??t.subtitle,B=T?.onBack,ee=T?.actions??t.headerActions,_=T?.searchable??t.searchable;Tt(()=>{!_&&g&&k()},[_,g,k]);let G=u?An.modal.root():An.custom(e.id).modal(),te=Ct(nt,{children:[B&&!g&&ce(nt.Navigation,{onBack:B}),g?ce(nt.Search,{value:f,onChangeText:z,onCancel:k,placeholder:t.searchPlaceholder,testID:`tool-search-field-${e.id}`}):ce(nt.Content,{title:F,subtitle:A}),Ct(nt.Actions,{children:[!g&&ee,_&&!g&&ce(ss,{variant:"chip",testID:`tool-search-${e.id}`,onPress:()=>I(true)})]})]});return ce(Dn.Provider,{value:C,children:ce(as,{visible:o,onClose:n,onBack:B,onMinimize:a,initialModalState:s,zIndex:i,persistenceKey:G,enablePersistence:true,initialMode:t.initialMode??"bottomSheet",header:{customContent:te,showToggleButton:true},disableScrollWrapper:true,styles:{},children:Ct(H,{style:kt.bodyRoot,children:[ce(ls,{children:ce(cs.Provider,{value:M,children:ce(p,{...d})})}),D&&ce(En,{message:D.message,type:D.type,nonce:D.nonce})]})})})}r(On,"ToolModalShell");var kt=dt.create({bodyRoot:{flex:1,minHeight:0,backgroundColor:"transparent"},toast:{position:"absolute",bottom:16,alignSelf:"center",flexDirection:"row",alignItems:"center",gap:8,maxWidth:"86%",backgroundColor:Bn.card,borderWidth:1,borderRadius:8,paddingHorizontal:12,paddingVertical:8,shadowColor:"#000",shadowOpacity:.4,shadowRadius:8,shadowOffset:{width:0,height:2},elevation:6},toastDot:{width:6,height:6,borderRadius:3},toastText:{flex:1,fontSize:12,color:Bn.text}});import{useEffect as ps,useRef as ms}from"react";import{capacitorPlatform as gs,capacitorPlugin as fs}from"@buoy-gg/license/web";function Pn(){return globalThis.__BUOY_HOLDS_BACK__===true}r(Pn,"isBuoyHoldingBackButton");var hs=99.5;function Ln(){if(typeof document>"u")return false;let e=globalThis.Ionic;if(!e&&!document.querySelector("ion-app"))return false;try{return e?.config?.get?.("hardwareBackButton",true)!==false}catch{return true}}r(Ln,"ionicHandlesBack");function Fn(e,t){let o=ms(t);o.current=t,ps(()=>{if(!e||gs()!=="android")return;let i=globalThis;i.__BUOY_HOLDS_BACK__=true;let n;if(Ln()){let a=r(s=>{s.detail?.register?.(hs,()=>{o.current()})},"listener");document.addEventListener("ionBackButton",a),n=r(()=>document.removeEventListener("ionBackButton",a),"cleanup")}else{let a=fs("App");if(!a?.addListener){i.__BUOY_HOLDS_BACK__=false;return}let s=false,u=null;Promise.resolve(a.addListener("backButton",()=>o.current())).then(d=>{s?d.remove():u=d}).catch(()=>{}),n=r(()=>{s=true,u&&u.remove()},"cleanup")}return()=>{n(),i.__BUOY_HOLDS_BACK__=false}},[e])}r(Fn,"useCapacitorBackButton");import{Fragment as ys,jsx as de}from"react/jsx-runtime";var $n=Qa(null),jn="@react_buoy_open_apps",eo=44,bs=12,vs=100,Ss=16,ws=r(e=>({x:window.innerWidth-eo-Ss,y:window.innerHeight-vs-eo-e*(eo+bs)}),"dockIconPosition"),Hn=r(({children:e})=>{let[t,o]=Cn([]),[i,n]=Cn(false),a=ot([]),s=ot(null),u=ot(false),d=ot(false),p=ot(false),g=Ie(w=>{let C="";return o(F=>{let{apps:A,instanceId:B}=os(F,w,()=>`${w.id}-${Date.now()}-${Math.random().toString(36).slice(2)}`);return C=B,A}),C},[]),I=Ie(()=>{if(u.current||!d.current||!p.current)return;u.current=true;let w=s.current;if(!w||w.length===0){n(true);return}s.current=null,w.forEach(({id:C,minimized:F})=>{let A=a.current.find(B=>B.id===C);if(A&&A.component){let B=Gt(A.icon,{slot:"dial",size:20,color:A.color});g({id:A.id,title:A.name,component:A.component,props:A.props,modal:A.modal,launchMode:A.launchMode||"self-modal",singleton:A.singleton??true,icon:B,color:A.color,minimized:F})}}),n(true)},[g]);xt(()=>{let w=false;return r(async()=>{try{let C=await In.getItem(jn);if(w)return;if(C){let F=JSON.parse(C),A;Array.isArray(F)&&F.length>0&&(typeof F[0]=="string"?A=F.map(B=>({id:B,minimized:false})):A=F.filter(B=>typeof B=="object"&&B!==null&&typeof B.id=="string"),A.length&&(s.current=A))}}catch{}w||(d.current=true,I())},"restoreOpenApps")(),()=>{w=true}},[I]),xt(()=>{if(!i)return;let w=t.map(C=>({id:C.id,minimized:C.minimized??false}));In.setItem(jn,JSON.stringify(w))},[t,i]);let f=Ie(w=>{a.current=w,p.current=true,I()},[I]),z=Ie(w=>{o(C=>C.length?w?C.filter(F=>F.instanceId!==w):C.slice(0,-1):C)},[]),T=Ie(()=>o([]),[]),M=Ie((w,C)=>{o(F=>F.map(A=>A.instanceId===w?{...A,minimized:true,restoreState:C}:A))},[]),D=Ie((w,C)=>{o(F=>F.map(A=>A.instanceId===w?{...A,minimized:false,restoreState:C??A.restoreState}:A))},[]),E=Ie(w=>t.find(C=>C.instanceId===w)?.minimized??false,[t]),R=t.some(w=>w.launchMode!=="toggle-only"&&!w.minimized);xt(()=>R?Xa(r(w=>{if(w.key!=="Escape"||w.defaultPrevented)return;let C=[...t].reverse().find(F=>F.launchMode!=="toggle-only"&&!F.minimized);C&&z(C.instanceId)},"handler")):void 0,[R,z,t]),Fn(t.length>0,()=>z());let k=ts(()=>({openApps:t,isAnyOpen:R,open:g,close:z,closeAll:T,registerApps:f,minimize:M,restore:D,isMinimized:E}),[t,R,g,z,T,f,M,D,E]);return de($n.Provider,{value:k,children:e})},"AppHostProvider"),rt=r(()=>{let e=es($n);return e||{openApps:[],isAnyOpen:false,open:r(()=>"","open"),close:r(()=>{},"close"),closeAll:r(()=>{},"closeAll"),registerApps:r(()=>{},"registerApps"),minimize:r(()=>{},"minimize"),restore:r(()=>{},"restore"),isMinimized:r(()=>false,"isMinimized")}},"useAppHost"),xs=9e3,Ts={position:"fixed",inset:0,backgroundColor:"rgba(0,0,0,0.28)",display:"flex",alignItems:"center",justifyContent:"center"},Is={maxHeight:"90%",width:"94%",borderRadius:12,backgroundColor:"white",overflow:"hidden"},Cs=r(({app:e,zIndex:t,onClose:o,onMinimize:i,minimizeTargetPosition:n,enableSharedModalDimensions:a})=>{let s=e.component,u=!e.minimized,d={...e.props??{},...a?{enableSharedModalDimensions:true}:{}};return e.modal&&(!e.launchMode||e.launchMode==="self-modal")?de("div",{"data-testid":`buoy-tool-instance-${e.id}`,style:{position:"fixed",inset:0,zIndex:t,pointerEvents:"none"},children:de(On,{app:e,config:e.modal,visible:u,zIndex:t,onClose:o,onMinimize:i,initialModalState:e.restoreState,enableSharedModalDimensions:a,bodyProps:d})}):e.launchMode==="self-modal"?de("div",{"data-testid":`buoy-tool-instance-${e.id}`,style:{position:"fixed",inset:0,zIndex:t,pointerEvents:"none"},children:de(s,{...d,visible:u,onClose:o,onRequestClose:o,onMinimize:i,minimizeTargetPosition:n,instanceId:e.instanceId,zIndex:t,initialModalState:e.restoreState})}):e.launchMode==="inline"?u?de("div",{"data-testid":`buoy-tool-instance-${e.id}`,style:{position:"fixed",inset:0,zIndex:t,pointerEvents:"none"},children:de(s,{...d,onClose:o,onMinimize:i,minimizeTargetPosition:n,initialModalState:e.restoreState,instanceId:e.instanceId})}):null:de("div",{"data-testid":`buoy-tool-instance-${e.id}`,style:{...Ts,zIndex:t,display:u?"flex":"none"},children:de("div",{style:Is,children:de(s,{...d,onClose:o,onMinimize:i,minimizeTargetPosition:n,initialModalState:e.restoreState,instanceId:e.instanceId})})})},"AppRenderer"),Nn=r(()=>{let{openApps:e,close:t,minimize:o}=rt(),{settings:i}=xn();xt(()=>{Za(i.globalSettings?.expandableWindowControls!==false)},[i.globalSettings?.expandableWindowControls]);let n=e.filter(u=>u.launchMode!=="toggle-only");if(n.length===0)return null;let a=n.filter(u=>u.minimized).length,s=Br()??ws(a);return de(ys,{children:n.map((u,d)=>de(Cs,{app:u,zIndex:xs+d,onClose:()=>t(u.instanceId),onMinimize:p=>o(u.instanceId,p),enableSharedModalDimensions:i.globalSettings?.enableSharedModalDimensions===true,minimizeTargetPosition:s},u.instanceId))})},"AppOverlay");import{useCallback as ks,useEffect as to,useRef as zs,useState as Wn,useSyncExternalStore as _n}from"react";import{persistentStorage as Un,getToolAttention as oo,subscribeToolAttention as Kn}from"@buoy-gg/shared-ui/web";import{jsx as ue,jsxs as zt}from"react/jsx-runtime";function Vn(e){return _n(Kn,()=>oo(e),()=>oo(e))}r(Vn,"useToolAttention");var qn={needsInput:"#FF8329",done:"#20C997",failed:"#FF3B30"},Gn={needsInput:3,failed:2,done:1},Jn=new Map;function no(e){let t=null;for(let i of e?e.split("|"):[]){let n=oo(i);n&&(!t||Gn[n.kind]>Gn[t.kind])&&(t=n)}let o=Jn.get(e);return o&&t&&o.kind===t.kind&&o.label===t.label?o:!o&&!t?null:(Jn.set(e,t),t)}r(no,"strongest");function Yn(e){let t=e.join("|");return _n(Kn,()=>no(t),()=>no(t))}r(Yn,"useStrongestAttention");var Xn=28,io=32,ro=6,Zn=8,Qn=24,ei="@react_buoy_minimized_stack_expanded",As=80,ti=2e3,Bs=6e3,Ds="#1A1A1A",at="#888888";function ao({down:e=false}){return ue("svg",{width:12,height:12,viewBox:"0 0 24 24","aria-hidden":"true",style:{transform:e?"rotate(180deg)":void 0},children:ue("path",{d:"M18 15l-6-6-6 6",fill:"none",stroke:at,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})})}r(ao,"ChevronGlyph");function oi({id:e,title:t,icon:o,index:i,onPress:n}){let a=Vn(e),s=zs(null);return to(()=>{let u=true,d,p=r(()=>{s.current?.animate([{transform:"translateX(0) scale(1)",opacity:1,offset:0},{transform:"translateX(3px) scale(1.05)",opacity:.4,offset:.2},{transform:"translateX(-3px) scale(1.1)",opacity:1,offset:.4},{transform:"translateX(2px) scale(1.0)",opacity:.6,offset:.6},{transform:"translateX(-1px) scale(0.95)",opacity:1,offset:.8},{transform:"translateX(0) scale(1)",opacity:1,offset:1}],{duration:As,easing:"linear"})},"runGlitch"),g=r(I=>{let f=I?500+Math.random()*1500+i*200:ti+Math.random()*(Bs-ti)+i*300;d=setTimeout(()=>{u&&(p(),g(false))},f)},"schedule");return g(true),()=>{u=false,clearTimeout(d)}},[i]),zt("button",{type:"button","aria-label":a?`${t} \u2014 ${a.label}. Restore`:`Restore ${t}`,"data-testid":`buoy-dock-restore-${e}`,onClick:n,style:{width:io,height:io,display:"flex",alignItems:"center",justifyContent:"center",background:"none",border:"none",padding:0,cursor:"pointer",position:"relative"},children:[ue("div",{ref:s,style:{display:"flex",alignItems:"center",justifyContent:"center"},children:o}),a?ue("span",{"aria-hidden":true,"data-testid":`buoy-dock-badge-${e}-${a.kind}`,style:{position:"absolute",top:0,right:0,minWidth:12,height:12,borderRadius:6,padding:"0 2px",boxSizing:"border-box",background:qn[a.kind],border:"1.5px solid #0C0C0C",color:"#000",fontSize:8,fontWeight:800,lineHeight:"9px",display:"flex",alignItems:"center",justifyContent:"center"},children:a.kind==="needsInput"?"!":""}):null]})}r(oi,"GlitchToolButton");function ni({containerWidth:e=32}){let{openApps:t,restore:o}=rt(),i=t.filter(f=>f.minimized&&f.launchMode!=="toggle-only"),[n,a]=Wn(false),[s,u]=Wn(false),d=Yn(i.map(f=>f.id));to(()=>{let f=false;return r(async()=>{let z=await Un.getItem(ei);!f&&z==="true"&&a(true),f||u(true)},"load")(),()=>{f=true}},[]),to(()=>{s&&Un.setItem(ei,n?"true":"false")},[n,s]);let p=ks(f=>{o(f)},[o]);if(i.length===0)return null;let g=Zn+i.length*io+(i.length-1)*ro+ro+Qn+4,I={backgroundColor:Ds,borderTopLeftRadius:6,borderTopRightRadius:6,borderTop:`1px solid ${at}66`,borderLeft:`1px solid ${at}66`,borderRight:`1px solid ${at}66`,borderBottom:"none",boxSizing:"border-box"};return zt("div",{style:{height:Xn,overflow:"visible",position:"relative"},children:[ue("div",{style:{position:"absolute",bottom:"var(--buoy-stack-bottom, 0px)",top:"var(--buoy-stack-top, auto)",left:0,width:e,maxHeight:"var(--buoy-stack-space, calc(100vh - 48px))",visibility:n?"visible":"hidden",height:n?g:0,opacity:n?1:0,overflowY:"auto",overflowX:"hidden",transition:"height 200ms ease, opacity 200ms ease",pointerEvents:n?"auto":"none",...I},children:zt("div",{style:{height:g,display:"flex",flexDirection:"column",alignItems:"center",paddingTop:Zn,gap:ro,boxSizing:"border-box"},children:[n&&[...i].reverse().map((f,z)=>ue(oi,{id:f.id,title:f.title||f.id,icon:f.icon??ue("span",{style:{color:"#fff",fontSize:13},children:(f.title||f.id).slice(0,1).toUpperCase()}),index:z,onPress:()=>p(f.instanceId)},f.instanceId)),ue("button",{type:"button","aria-label":"Collapse","data-testid":"buoy-dock-collapse",onClick:()=>a(false),style:{width:"100%",height:Qn,marginTop:3,display:"flex",alignItems:"center",justifyContent:"center",background:"none",border:"none",cursor:"pointer",padding:0},children:ue(ao,{down:true})})]})}),zt("button",{type:"button","aria-label":`Show ${i.length} minimized tools`,"data-testid":"buoy-dock-peek",tabIndex:n?-1:0,"aria-hidden":n,onClick:()=>a(true),style:{position:"absolute",bottom:0,left:0,width:e,height:Xn,display:"flex",flexDirection:"row",alignItems:"center",justifyContent:"center",gap:2,cursor:"pointer",padding:0,opacity:n?0:1,transform:n?"scale(0.9)":"scale(1)",transition:"opacity 200ms ease, transform 200ms ease",pointerEvents:n?"none":"auto",...I},children:[ue(ao,{}),d?ue("span",{"aria-hidden":true,"data-testid":"buoy-dock-peek-attention",style:{position:"absolute",top:2,right:2,minWidth:11,height:11,borderRadius:6,padding:"0 2px",boxSizing:"border-box",background:qn[d.kind],border:"1.5px solid #0C0C0C",color:"#000",fontSize:8,fontWeight:800,lineHeight:"9px",display:"flex",alignItems:"center",justifyContent:"center"},children:d.kind==="needsInput"?"!":""}):null,i.length>1&&ue("span",{style:{fontSize:9,fontWeight:600,color:at,marginLeft:1},children:i.length})]})]})}r(ni,"MinimizedToolsStack");import{registerToolModules as Rs}from"@buoy-gg/shared-ui/web";import{createElement as Ms}from"react";function Je(e){let t=e.icon;return{...e,icon:typeof t=="function"?o=>Ms(t,{size:o,slot:e.slot??"both",color:e.color}):()=>t}}r(Je,"createWebTool");import{createContext as Es,useContext as Os,useState as ii,useMemo as ri}from"react";import{jsx as Ps}from"react/jsx-runtime";var ai=Es(null);function so({children:e}){let[t,o]=ii(false),[i,n]=ii(false),a=ri(()=>t||i,[t,i]),s=ri(()=>({isDialOpen:t,isToolOpen:i,isDevToolsActive:a,setDialOpen:o,setToolOpen:n}),[t,i,a]);return Ps(ai.Provider,{value:s,children:e})}r(so,"DevToolsVisibilityProvider");function At(){let e=Os(ai);return e||{isDialOpen:false,isToolOpen:false,isDevToolsActive:false,setDialOpen:r(()=>{},"setDialOpen"),setToolOpen:r(()=>{},"setToolOpen")}}r(At,"useDevToolsVisibility");import*as Ls from"@buoy-gg/license/web";import*as Fs from"@buoy-gg/shared-ui/web";import*as $s from"@buoy-gg/shared-ui/web/dataViewer";function lo(e){Rs({core:{useDevToolsVisibility:At},license:Ls,"shared-ui":Fs,"shared-ui/dataViewer":$s,...e});let t=new Set;return Object.values(e).flatMap(o=>Object.entries(o).flatMap(([i,n])=>!i.endsWith("Preset")||!n||typeof n.id!="string"||!n.component||t.has(n.id)?[]:(t.add(n.id),[Je(n)])))}r(lo,"createWebTools");import{useEffect as Bt,useMemo as Dt,useRef as js}from"react";import{LicenseManager as si,installCapacitorBridge as Hs,resolveDevBuild as li,useLicense as Ns}from"@buoy-gg/license/web";import{registerToolAdapters as Ws}from"@buoy-gg/shared-ui/web";function co(e){return typeof e=="object"&&e!==null?e:void 0}r(co,"externalSyncOptions");function ci({isDevelopment:e,isLicensed:t,externalSync:o,isAvailable:i}){if(o===false||!i)return false;if(e)return true;let n=co(o);return t&&n?.enableInRelease===true&&uo(n.socketURL,n)===null}r(ci,"shouldMountExternalSync");var di="http://localhost:42831";function ui(e){return e==="localhost"||e.endsWith(".localhost")||/^127\.\d+\.\d+\.\d+$/.test(e)||e==="[::1]"||e==="::1"||e==="10.0.2.2"}r(ui,"isLoopbackHost");function uo(e,t){let o=e??di;if(t?.allowInsecureNetwork===true)return null;let i;try{i=new URL(o)}catch{return`[Buoy] externalSync.socketURL "${o}" isn't a valid URL, so this release build won't connect to Buoy Desktop.`}return i.protocol==="https:"||i.protocol==="wss:"||ui(i.hostname)?null:`[Buoy] This release build won't connect to ${o}: release sync carries real user data, and plain http to another machine is readable by anyone on the same network. Use a simulator, an emulator or adb reverse (localhost), an https:// broker, or set externalSync.allowInsecureNetwork: true for a network you trust.`}r(uo,"releaseTransportProblem");var _s={impersonate:["searchUsers","startImpersonation","resumeImpersonation","updateSettings","removeFromHistory","clearHistory"]};function pi(e,t,o){if(t)return e;let i=null;for(let[n,a]of Object.entries(_s)){if(o?.includes(n))continue;let s=e[n];if(!s?.actions)continue;let u={...s.actions};for(let d of a)d in u&&(u[d]=()=>{throw new Error(`${n}.${d} is off in release builds. To allow it from Buoy Desktop and the MCP, pass externalSync={{ enableInRelease: true, releaseActions: ["${n}"] }}.`)});i??(i={...e}),i[n]={...s,actions:u}}return i??e}r(pi,"applyReleaseActionPolicy");import{useEffect as Us,useMemo as Ks,useState as Vs}from"react";import{devToolsStorageKeys as qs,persistentStorage as Gs}from"@buoy-gg/shared-ui/web";import{isCapacitorNative as Js}from"@buoy-gg/license/web";var Ys=8;function mi(){let e="";for(;e.length<Ys;)e+=(Math.random()*16|0).toString(16);return e}r(mi,"generateInstallId");function gi(e){return e.toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/(^-|-$)/g,"")}r(gi,"slugify");function fi({appName:e,hardwareName:t,platform:o,installId:i,deviceId:n}){let a=gi(e??"buoy")||"buoy",s=e??"Buoy Device",u=t?.trim()||o;return n?{deviceId:n,deviceName:`${s} (${u})`}:{deviceId:`${a}-${o}-${i}`,deviceName:`${s} (${u} \xB7 ${i.slice(-4)})`}}r(fi,"buildDeviceIdentity");function hi(){let e=globalThis;try{return e.sessionStorage??null}catch{return null}}r(hi,"sessionStore");function yi(){let e=globalThis;try{return e.localStorage??null}catch{return null}}r(yi,"localStore");async function bi({platform:e=We.OS,store:t,mint:o=mi}={}){let i=qs.sync.deviceId(),n=t===void 0?Js()?yi():e==="web"?hi():Gs:t;if(!n)return o();try{let a=await n.getItem(i);if(a&&a.length>0)return a;let s=o();return await n.setItem(i,s),s}catch{return o()}}r(bi,"loadInstallId");var po=null;function vi(){return po||(po=bi()),po}r(vi,"getInstallId");function Si(e,t){let o=e?.deviceId,i=e?.deviceName,n=t.loadId??vi,a=t.platform??We.OS,[s,u]=Vs(null);return Us(()=>{if(o)return;let d=false;return n().then(p=>{d||u(p)}),()=>{d=true}},[o,n]),Ks(()=>{if(!o&&!s)return null;let d=fi({appName:t.appName,hardwareName:t.hardwareName,platform:a,installId:s??"",deviceId:o});return i?{...d,deviceName:i}:d},[o,i,s,t.appName,t.hardwareName,a])}r(Si,"useDeviceIdentity");import{useEffect as Xs,useState as Zs}from"react";import{capacitorPlatform as Qs,capacitorPlugin as Rt,isCapacitorNative as el}from"@buoy-gg/license/web";function wi(e,t){if(t==="ios")return/iPad/.test(e)?"iPad":/iPhone/.test(e)?"iPhone":null;let o=/Android [\d.]+;\s*([^;)]+?)(?:\s+Build\/|\))/.exec(e)?.[1]?.trim();return!o||o==="K"?null:o}r(wi,"hardwareFromUserAgent");function xi(e){return/sdk_gphone|Android SDK built for|Android ATD built for|google_sdk|Emulator|generic_/i.test(e)}r(xi,"isAndroidEmulatorUserAgent");function mo(){return typeof navigator>"u"?"":navigator.userAgent??""}r(mo,"userAgent");function Mt(){return typeof document>"u"?null:document.title||(typeof location>"u"?null:location.hostname)||null}r(Mt,"firstPageTitle");var Ti="@react_buoy_capacitor_app_name";function Ii(e){try{let t=globalThis.localStorage;if(!t)return e;let o=t.getItem(Ti);if(o)return o;e&&t.setItem(Ti,e)}catch{}return e}r(Ii,"persistedAppName");function Ci(){let e=Qs();if(!e)return{platform:"web",appName:Mt(),hardwareName:"Browser",ready:true};let t=!!Rt("App");return{platform:e,appName:t?Mt():Ii(Mt()),hardwareName:wi(mo(),e)??e,extraDeviceInfo:{runtime:"capacitor"},ready:!t&&!Rt("Device")}}r(Ci,"initialHostInfo");function ki(){let[e,t]=Zs(Ci);return Xs(()=>{if(!el())return;let o=false,i=Rt("App"),n=Rt("Device");return Promise.all([i?.getInfo?.().catch(()=>null)??null,n?.getInfo?.().catch(()=>null)??null]).then(([a,s])=>{if(o)return;let u=a?.name?.trim(),d=s?.name?.trim()||s?.model?.trim();t(p=>({...p,appName:u||p.appName,hardwareName:d||p.hardwareName,ready:true}))}),()=>{o=true}},[]),e}r(ki,"useHostInfo");function go(){if(typeof location>"u")return null;let e=globalThis.WEBVIEW_SERVER_URL;return{protocol:location.protocol,hostname:location.hostname,origin:`${location.protocol}//${location.host}`,userAgent:mo(),serverUrl:typeof e=="string"?e:null}}r(go,"pageInfo");function fo(e){if(!e)return null;try{let t=new URL(e);return`${t.protocol}//${t.host}`}catch{return null}}r(fo,"schemeHost");function zi(e,t){if(e==="ios"){let o=fo(t.serverUrl);return o?o===fo(t.origin):t.protocol==="capacitor:"}return Ai.has(t.hostname)}r(zi,"isBundledPage");var Ai=new Set(["localhost","127.0.0.1","[::1]","::1"]);function Bi(e,t,o,i=go()){if(o==="web"||!i)return e;let n;try{n=new URL(e)}catch{return e}let a=zi(o,i);return!t&&a&&n.hostname===i.hostname&&(n.hostname="localhost"),o==="android"&&Ai.has(n.hostname)&&xi(i.userAgent)&&(n.hostname="10.0.2.2"),n.toString().replace(/\/$/,"")}r(Bi,"capacitorBrokerURL");function Di(e,t,o=go()){return t!=="android"||!o||o.protocol!=="https:"||!/^(http|ws):/i.test(e)?null:`[Buoy] Can't reach Buoy Desktop at ${e}. This Android WebView serves the app from https://${o.hostname} and blocks plain http/ws by default. For debug builds, set android.allowMixedContent: true and server.cleartext: true in capacitor.config, then run cap sync.`}r(Di,"capacitorTransportProblem");import{getDevServerOrigin as tl,resolveReloadStrategy as ol,scheduleReloadApp as nl}from"@buoy-gg/shared-ui/web";var Ri=Date.now(),Mi=tl(),il={platform:We.OS,isTV:We.isTV===true,isTVOS:We.isTVOS===true},Ei={version:3,getSnapshot:r(()=>{let e=ol("auto");return{startedAt:Ri,devServerOrigin:Mi,device:il,reload:{available:e!==null,strategy:e}}},"getSnapshot"),subscribe:r(e=>()=>{},"subscribe"),actions:{ping:r(()=>({ok:true,startedAt:Ri,devServerOrigin:Mi}),"ping"),reloadApp:r(e=>{let t=e??{},{strategy:o,delayMs:i}=nl({strategy:t.strategy,delayMs:t.delayMs});return{scheduled:true,strategy:o,delayMs:i}},"reloadApp")}};import{Fragment as rl,jsx as Le,jsxs as al}from"react/jsx-runtime";var sl=["ConsoleRoot","RouteTracker","ReactQueryTracker","ReduxAutoInstrument","PerfMonitorRoot","AutomationResumer","ImagesRoot"],ll=["DebugBordersStandaloneOverlay","HighlightUpdatesOverlay","ImageOverlayStandalone","PerfMonitorOverlay","JsTopHudOverlay","ImpersonateOverlay","ScenariosOverlay"];function Oi(e){let t=Dt(()=>Object.fromEntries(Object.entries(e.modules).map(([i,n])=>[i.replace(/^@buoy-gg\//,"").replace(/\/web$/,""),n])),[e.modules]),o=t["react-query"];return o?.useReactQuerySyncAdapter?Le(Pi,{...e,modules:t,query:o}):Le(ho,{...e,modules:t})}r(Oi,"BrowserToolRuntime");function Pi(e){let t=e.query.useReactQuerySyncAdapter();return Le(ho,{...e,queryAdapter:t})}r(Pi,"QueryRuntime");function ho({modules:e,apps:t,requiredEnvVars:o,externalSync:i,headless:n,sentryGetClient:a,queryAdapter:s}){let{isPro:u,tier:d}=Ns(),p=Dt(()=>{let D={app:Ei};for(let[E,R]of Object.entries(e))for(let[k,w]of Object.entries(R))k.endsWith("SyncAdapter")&&w&&typeof w=="object"&&(D[E]=w);s&&(D.query=s),e.env?.createEnvSyncAdapter&&(D.env=e.env.createEnvSyncAdapter(o??[]));for(let E of t??[])E.sync&&(D[`custom:${E.id}`]=E.sync);return D},[e,t,o,s]),g=js(p);g.current=p,Bt(()=>Ws(()=>g.current),[]),Bt(()=>{let D=[],E=r(R=>{let k=R?.();typeof k=="function"&&D.push(k)},"start");return E(e.network?.startNetworkCapture),E(e.storage?.startBrowserStorageCapture),E(e.assets?.startBrowserAssetCapture),E(e.three?.startThreeCapture),li(typeof _e<"u"?_e:process.env.NODE_ENV!=="production")&&E(e["time-machine"]?.startTimeMachineFloatingToolPersistence),e.storage?.storageSyncAdapter?.subscribe&&E(()=>e.storage.storageSyncAdapter.subscribe(()=>{})),e["focus-inspector"]?.focusInspectorSyncAdapter?.subscribe&&E(()=>e["focus-inspector"].focusInspectorSyncAdapter.subscribe(()=>{})),()=>{for(let R of D.reverse())R()}},[e]);let I=e["external-sync"],f=li(typeof _e<"u"?_e:process.env.NODE_ENV!=="production"),z=ci({isDevelopment:f,isLicensed:u,externalSync:i,isAvailable:!!I}),T=co(i);Hs({release:!f&&!!T?.enableInRelease}),!f&&T?.enableInRelease&&yo(uo(T.socketURL,T));let M=e.sentry?.SentryRoot;return al(rl,{children:[Object.entries(e).flatMap(([D,E])=>sl.map(R=>{let k=E[R];return k?Le(k,{},`${D}:${R}`):null})),M&&Le(M,{getClient:a}),Object.entries(e).flatMap(([D,E])=>ll.map(R=>{let k=E[R];return k&&(!n||R==="ScenariosOverlay"||R==="ImpersonateOverlay")?Le(k,{},`${D}:${R}`):null})),z&&Le(Fi,{module:I,tools:p,options:T,isPro:u,tier:d,dev:f})]})}r(ho,"ToolRuntime");var Li=null;function yo(e){!e||e===Li||(Li=e,console.warn("[Buoy]",e))}r(yo,"warnOnce");function Fi({module:e,tools:t,options:o,isPro:i,tier:n,dev:a}){let s=ki(),u=Si(o,{appName:s.appName,hardwareName:s.hardwareName,platform:s.platform}),d=Dt(()=>Bi(o?.socketURL??(a?e.getDefaultSocketURL():di),!!o?.socketURL,s.platform),[o?.socketURL,a,e,s.platform]),{socket:p}=e.useExternalSyncSocket({deviceName:u?.deviceName??"Buoy Browser",socketURL:d,persistentDeviceId:s.ready?u?.deviceId??null:null,platform:s.platform,extraDeviceInfo:s.extraDeviceInfo,enableLogs:o?.enableLogs});Bt(()=>{let f=Di(d,s.platform);if(!p||!f)return;let z=r(()=>yo(f),"onError");return p.on("connect_error",z),()=>{p.off("connect_error",z)}},[p,d,s.platform]),Bt(()=>{if(!p)return;let f=r(()=>{if(!p.connected||!si.hasAccountAccess())return;let z=si.getState();!i&&(z.isInitialized===false||z.isValidating===true)||p.emit("device-license",{isPro:i?"1":"0",tier:n})},"emit");return f(),p.on("connect",f),()=>{p.off("connect",f)}},[p,i,n]);let g=o?.releaseActions?.join(",")??"",I=Dt(()=>pi(t,a,g?g.split(","):void 0),[t,a,g]);return e.useExternalSync({tools:I,socket:p,deviceId:s.ready?u?.deviceId??null:null,enableLogs:o?.enableLogs}),null}r(Fi,"BrowserExternalSync");import{useState as $i}from"react";import{BuoyPortal as cl}from"@buoy-gg/shared-ui/web/floating";import{useBuoySession as dl}from"@buoy-gg/license/web";import{Fragment as ji,jsx as Ye,jsxs as Hi}from"react/jsx-runtime";var Ni="#20C997";function Wi(){let{status:e,signIn:t,signOut:o}=dl(),[i,n]=$i(false),[a,s]=$i(null);if(typeof document>"u")return null;let u=r(()=>{s(null),n(true),t().catch(p=>s(p instanceof Error?p.message:"Sign-in did not work. Try again.")).finally(()=>n(false))},"start"),d=e.state==="active";return Ye(cl,{children:Ye("div",{"data-buoy-signin":"",style:{position:"fixed",right:"max(16px, env(safe-area-inset-right))",bottom:"max(20px, env(safe-area-inset-bottom))",zIndex:99999,maxWidth:"min(320px, calc(100vw - 32px))",padding:d||a?"12px 14px":0,borderRadius:16,background:d||a?"#0f1419":"transparent",color:"#e6edf3",boxShadow:d||a?"0 10px 30px rgba(0,0,0,.35)":"none",fontFamily:"system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif",fontSize:14,lineHeight:1.45},children:d?Hi(ji,{children:[Ye("div",{"data-testid":"buoy-signin-needs-plan",children:"Buoy on a live site needs a Pro or Business plan."}),Ye("button",{type:"button",onClick:()=>void o(),style:ul,"data-testid":"buoy-signout",children:"Sign out"})]}):Hi(ji,{children:[a?Ye("div",{role:"alert",style:{marginBottom:10},"data-testid":"buoy-signin-error",children:a}):null,Ye("button",{type:"button",onClick:u,disabled:i,"data-testid":"buoy-signin",style:{display:"inline-flex",alignItems:"center",gap:8,padding:"10px 16px",border:"none",borderRadius:999,background:Ni,color:"#04130d",fontWeight:600,fontSize:14,cursor:i?"wait":"pointer",boxShadow:"0 8px 24px rgba(0,0,0,.3)"},children:i?"Signing in\u2026":"Sign in to Buoy"})]})})})}r(Wi,"BuoySignIn");var ul={marginTop:8,padding:0,border:"none",background:"none",color:Ni,fontSize:14,cursor:"pointer",textDecoration:"underline"};import{useState as pl}from"react";import{AccountSetupButton as ml,BuoyNeedsPlanCard as gl,BuoySignInCard as fl,useSignInState as hl}from"@buoy-gg/shared-ui/web";import{jsx as st,jsxs as _i}from"react/jsx-runtime";function bo({needsPlan:e=false}){let[t,o]=pl(false),i=hl();return _i(H,{pointerEvents:"box-none",style:Ui.root,children:[st(ml,{expanded:t,onPress:()=>o(true)}),t?st(ar,{visible:true,transparent:true,animationType:"fade",onRequestClose:()=>o(false),children:_i(H,{style:Ui.overlay,accessibilityViewIsModal:true,children:[st(rr,{style:dt.absoluteFill,onPress:()=>o(false),accessible:false}),e&&i==="active"?st(gl,{onClose:()=>o(false)}):st(fl,{onClose:()=>o(false)})]})}):null]})}r(bo,"BuoySignIn");var Ui=dt.create({root:{position:"absolute",bottom:30,right:16,zIndex:99999},overlay:{flex:1,backgroundColor:"rgba(0, 0, 0, 0.65)",alignItems:"center",justifyContent:"center",padding:20}});function vo(e){if(e.length>6){let t=e.map(o=>`"${o}"`).join(", ");return e.slice(0,6)}return e}r(vo,"validateDialConfig");import{installedTools as yl,installedToolsFound as bl}from"@buoy-gg/core/web/installed-tools";import{Fragment as So,jsx as L,jsxs as lt}from"react/jsx-runtime";var Ki={},Vi="@react_buoy_floating_menu_tooltip_shown",vl=Me;function qi({size:e=14,color:t="#20C997"}){let o=Math.max(2,e/4),i=Math.max(1,e/16);return L("div",{style:{display:"grid",gridTemplateColumns:`repeat(3, ${o}px)`,gap:i,width:e,height:e,alignContent:"center",justifyContent:"center"},children:Array.from({length:9}).map((n,a)=>L("div",{style:{width:o,height:o,borderRadius:o/2,backgroundColor:t}},a))})}r(qi,"MenuLauncherIcon");function Gi(e){let{defaultFloatingTools:t,defaultDialTools:o,disableHints:i=false,children:n}=e,a=ye(()=>o&&vo(o),[o]);return L(Vt,{defaultFloatingTools:t,defaultDialTools:a,children:L(Sr,{disableHints:i,children:lt(so,{children:[L(Hn,{children:L(Qi,{...e})}),n]})})})}r(Gi,"AdmittedFloatingDevTools");var Sl=["ReduxAutoInstrument","ConsoleRoot","RouteTracker","ReactQueryTracker"];function Ji({modules:e=Ki}){return L(So,{children:Object.entries(e).flatMap(([t,o])=>Sl.map(i=>{let n=o[i];return n?L(n,{},`${t}:${i}`):null}))})}r(Ji,"StartupCapture");function Yi(){let{openApps:e,restore:t}=rt();return Z(()=>Io(o=>{let i=e.find(n=>n.id===o);return i?(t(i.instanceId),true):false}),[e,t]),null}r(Yi,"WebToolOpenerBridge");function Xi(){let e=hr();return wr((e===null?process.env.NODE_ENV:e?"development":"production")??"dev")}r(Xi,"defaultEnvironment");function Zi(e,t,o,i){let n=r(g=>Object.entries(e).find(([I])=>I.replace(/^@buoy-gg\//,"").replace(/\/web$/,"")===g)?.[1],"find"),a=[],s=n("env");t?.length&&s?.createEnvTool&&s.createEnvVarConfig&&a.push(Je(s.createEnvTool({requiredEnvVars:s.createEnvVarConfig(t)})));let u=n("storage");o?.length&&u?.createStorageTool&&a.push(Je(u.createStorageTool({requiredStorageKeys:o})));let d=n("ask-buoy"),p=i==="hosted"?d?.hostedAskBuoy?.():i;return p&&d?.createAskBuoyTool&&a.push(Je(d.createAskBuoyTool(p))),a}r(Zi,"configOverrides");function Qi({environment:e,userRole:t="admin",availableEnvironments:o,onEnvironmentSwitch:i,apps:n,modules:a=Ki,externalSync:s,requiredEnvVars:u,sentryGetClient:d,disableHints:p=false,headless:g=false,hidden:I=false,defaultFloatingTools:f,defaultDialTools:z,zustandStores:T,requiredStorageKeys:M,askBuoy:D}){let E=e??Xi(),R=ye(()=>z?vo(z):void 0,[z]),[k,w]=Et(false),[C,F]=Et(false),A=Co(false),B=rt(),ee=ye(()=>Zi(a,u,M,D),[a,u,M,D]),_=ye(()=>Ot([...lo(a),...n??[],...ee]),[n,a,ee]),G=ye(()=>Object.entries(a).find(([l])=>l.replace(/^@buoy-gg\//,"").replace(/\/web$/,"")==="zustand")?.[1],[a]);Z(()=>{if(!T||typeof G?.watchStores!="function")return;let l=G.watchStores(T);return typeof l=="function"?l:void 0},[T,G]);let te=At(),V=B.openApps.some(l=>!l.minimized);Z(()=>{te.setDialOpen(k)},[k,te.setDialOpen]),Z(()=>{te.setToolOpen(V||C)},[V,C,te.setToolOpen]);let{registerApps:ae}=B;Z(()=>{ae(_.map(l=>{let y=l.icon;return{...l,icon:typeof y=="function"?({size:h})=>y(h):y}}))},[ae,_]);let oe=ye(()=>_.map(l=>({id:l.id,name:l.name,description:l.description,slot:l.slot})),[_]);Tr({availableTools:oe,storage:vl}),Z(()=>{let l=false;return r(async()=>{let[y,h]=await Promise.all([Me.getItem(pt.dial.isOpen()),Me.getItem(pt.settings.modalOpen())]);l||(y==="true"&&w(true),h==="true"&&(w(true),F(true)),A.current=true)},"restore")(),()=>{l=true}},[]),Z(()=>{A.current&&Me.setItem(pt.dial.isOpen(),k?"true":"false")},[k]),Z(()=>{A.current&&Me.setItem(pt.settings.modalOpen(),C?"true":"false")},[C]);let me=Ue(l=>{if(an(l.id),l.launchMode==="toggle-only"){l.onPress?.();return}if(l.component){let y=typeof l.icon=="function"?l.icon(20):l.icon;B.open({id:l.id,title:l.name||ut(l.id),component:l.component,props:l.props,modal:l.modal,launchMode:l.launchMode||"self-modal",singleton:l.singleton??true,icon:y,color:l.color||ko(l.id)})}else l.onPress?.()},[B]),ge=Co({tools:_,openApps:B.openApps,openTool:me});ge.current={tools:_,openApps:B.openApps,openTool:me},Z(()=>Io(l=>{let{tools:y,openApps:h,openTool:J}=ge.current;if(h.some(U=>U.id===l))return false;let W=y.find(U=>U.id===l);return!W||W.launchMode==="toggle-only"?false:(J(W),true)}),[]);let fe=ye(()=>mt(_,"dial").map(l=>{let y=l.color||ko(l.id),h;return typeof l.icon=="string"?h=l.icon:typeof l.icon=="function"?h=l.icon(32):h=null,{id:l.id,name:l.name||ut(l.id),icon:h,unavailable:!l.component&&!l.onPress,color:y,onPress:r(()=>{me(l),w(false)},"onPress")}}),[_,me]),N=ye(()=>{if(!k)return fe;let l=new Map(fe.map(y=>[y.id,y]));return rn(fe.map(y=>y.id)).map(y=>l.get(y)).filter(y=>!!y)},[k,fe]),{settings:Ce}=xn(),ke=ye(()=>mt(_,"row").filter(l=>(Ce.floatingTools[l.id]??false)===true&&(l.component||l.onPress)),[_,Ce.floatingTools]),Fe=ye(()=>_.map(l=>({id:l.id,name:l.name||ut(l.id),description:l.description||Ir(l.id),slot:l.slot,icon:l.icon,color:l.color})),[_]),[$e,se]=Et(false),Y=B.openApps.some(l=>!l.minimized);Z(()=>{if(p)return;let l=false,y=setTimeout(async()=>{let h=await Me.getItem(Vi);!l&&!h&&se(true)},1e3);return()=>{l=true,clearTimeout(y)}},[p]);let le=Ue(()=>{se(false),Me.setItem(Vi,"true")},[]),pe=Ue(()=>{le(),w(true)},[le]),ze=Ue(()=>{w(false),F(false)},[]),je=Ue(()=>{F(l=>!l)},[]),Se=Ue(()=>F(false),[]),Ae=!!(o?.length&&i),Be=Ce.floatingTools.environment!==false,ne=$e&&!k&&!Y&&!I;Z(()=>{if(!ne)return;let l=r(h=>{(!(h.target instanceof Element)||!h.target.closest("[data-buoy-root]"))&&le()},"onPointerDown"),y=r(h=>{h.key==="Escape"&&le()},"onKeyDown");return document.addEventListener("pointerdown",l,true),document.addEventListener("keydown",y),()=>{document.removeEventListener("pointerdown",l,true),document.removeEventListener("keydown",y)}},[ne,le]);let De=B.openApps.some(l=>l.minimized&&l.launchMode!=="toggle-only"),He=L(Oi,{modules:a,apps:n,requiredEnvVars:u,externalSync:s,headless:g,sentryGetClient:d});return g?He:lt("div",{"data-buoy-root":"",style:{display:"contents"},children:[He,L(Yi,{}),ne&&L("div",{style:{position:"fixed",inset:0,backgroundColor:"rgba(0,0,0,0.85)",zIndex:1e4,pointerEvents:"none"}}),L("div",{style:I?{visibility:"hidden"}:{display:"contents"},"aria-hidden":I||void 0,children:lt(Bo,{enablePositionPersistence:!ne,pushToSide:k||Y,suspendPointerEvents:k,centerOnboarding:ne,minimizedStack:De?L(ni,{}):void 0,hasMinimizedStack:De,children:[E&&Be&&!Ae&&L(Cr,{environment:E}),Ae&&Be&&L(kr,{currentEnvironment:E??"local",availableEnvironments:o,onSelect:i}),t?L(Do,{userRole:t,onPress:pe}):L("button",{"aria-label":"Open dev tools",onClick:pe,style:{display:"flex",alignItems:"center",justifyContent:"center",padding:"6px 8px",background:"none",border:"none",cursor:"pointer"},children:L(qi,{})}),ke.map(l=>L("button",{"aria-label":l.name||ut(l.id),title:l.description,onClick:()=>me(l),style:{display:"flex",alignItems:"center",justifyContent:"center",padding:"4px 6px",borderRadius:6,background:"none",border:"none",cursor:"pointer"},children:typeof l.icon=="function"?l.icon(16):l.icon},l.id))]})}),ne&&L(Lt,{title:"Welcome to Buoy!",message:"Grab and position this menu wherever you want, then tap the icon to open your tools.",onDismiss:le}),k&&!I&&L(Ht,{icons:N,onClose:ze,centerLabel:"BUOY",onCenterPress:je,settingsOpen:C,hintsDisabled:p}),C&&!I&&L(Xt,{visible:true,onClose:Se,availableTools:Fe,defaultFloatingTools:f,defaultDialTools:R,onSettingsChange:l=>{}}),!I&&lt(So,{children:[L(Nn,{}),L(dr,{})]})]})}r(Qi,"FloatingDevToolsInner");function er(e){let t=e&&typeof e=="object"?e.appId:void 0,o=!!e;Z(()=>{if(!o)return;let i=false,n=ur.SessionManager;if(!n)return;let a=r(s=>{i||!s||(n.configure({audience:`app:${s}`}),n.load().catch(()=>{}))},"apply");return t?a(t):br().then(s=>a(s?.bundleId)).catch(()=>{}),()=>{i=true}},[o,t])}r(er,"useCapacitorSignInAudience");var tr=false;function or(e){return e.modules?e:(!bl&&!tr&&typeof console<"u"&&(tr=true,console.info("[Buoy] No tools loaded. Add buoy() from '@buoy-gg/core/vite' to your Vite plugins, or pass modules to FloatingDevTools.")),{...e,modules:yl})}r(or,"withInstalledTools");function nr(e){return L(cr,{children:L(ir,{...or(e)})})}r(nr,"FloatingDevTools");function ir(e){let{access:t,isPro:o,licenseKey:i}=mr();Z(()=>{pr.configure(e.licenseKey)},[e.licenseKey]);let n=e.licenseKey===void 0||gr(e.licenseKey,i),a=fr(typeof _e<"u"?_e:process.env.NODE_ENV!=="production"),s=n&&t.status==="admitted";Z(()=>{s&&xr()},[s]),Z(()=>{a||t.status==="initializing"||(o&&s?sr():lr())},[a,o,s,t.status]);let u=yr();return er(u?e.signIn:void 0),!a&&!o?!e.signIn||e.headless?null:u?L(bo,{needsPlan:true}):L(Wi,{}):s?L(Gi,{...e}):lt(So,{children:[t.status==="initializing"&&L(Ji,{modules:e.modules}),e.headless?null:e.signIn&&u?L(bo,{}):L(vr,{})]})}r(ir,"FloatingDevToolsContent");export{zr as a,zo as b,Ot as c,mt as d,Ao as e,Bo as f,Ar as g,Do as h,Ht as i,Xt as j,Qt as k,Rn as l,Pn as m,Hn as n,rt as o,Nn as p,Je as q,so as r,At as s,lo as t,Ei as u,nr as v};
10
+ `,document.head.appendChild(e),Jo=true}i(Yo,"injectOnboardingKeyframes");var Ot=Ke.accent;function Ft({title:e,message:t,onDismiss:o,showArrow:r=true}){let[n,a]=Ko(false),[s,u]=Ko(false);Qi(()=>{Yo();let p=requestAnimationFrame(()=>a(true));return()=>cancelAnimationFrame(p)},[]);let d={fontFamily:qo,textTransform:"uppercase"};return Ve("div",{style:{position:"fixed",left:"50%",bottom:ta(),transform:`translateX(-50%) scale(${n?1:.8})`,opacity:n?1:0,transition:"transform 300ms cubic-bezier(0.34, 1.3, 0.64, 1), opacity 300ms ease",zIndex:10002,pointerEvents:"auto"},children:Go("div",{style:{position:"relative",animation:n?"buoyOnboardPulse 3s ease-in-out infinite":"none"},children:[Ve("div",{style:{position:"absolute",inset:-4,borderRadius:18,backgroundColor:"#FFFFFF",opacity:.06}}),Go("div",{style:{position:"relative",maxWidth:280,backgroundColor:Ke.dialBackground,borderRadius:16,border:`1px solid ${Ke.dialBorder}`,padding:20,boxShadow:`0 0 20px ${Vo(Ke.dialShadow,.6)}`,display:"flex",flexDirection:"column",alignItems:"center",gap:8},children:[Ve("span",{style:{...d,fontSize:16,fontWeight:900,letterSpacing:1,color:Ot,textAlign:"center"},children:e}),Ve("span",{style:{fontFamily:qo,fontSize:13,lineHeight:"20px",color:Ke.centerText,textAlign:"center"},children:t}),Ve("button",{onClick:o,onPointerDown:()=>u(true),onPointerUp:()=>u(false),onPointerLeave:()=>u(false),onPointerCancel:()=>u(false),style:{...d,marginTop:8,borderRadius:8,border:"none",backgroundColor:Ot,padding:"10px 24px",fontSize:14,fontWeight:900,letterSpacing:1.5,color:"#000000",cursor:"pointer",opacity:s?.7:1,transform:s?"scale(0.96)":"scale(1)",transition:"transform 100ms ease, opacity 100ms ease"},children:"Got it!"})]}),r&&Ve("div",{style:{position:"absolute",left:"50%",bottom:Zi,marginLeft:-12,width:0,height:0,borderLeft:"12px solid transparent",borderRight:"12px solid transparent",borderTop:`${ea}px solid ${Ot}`,filter:`drop-shadow(0 0 10px ${Vo(Ke.dialShadow,.5)})`,animation:n?"buoyOnboardArrowBounce 1.6s ease-in-out infinite":"none"}})]})})}i(Ft,"OnboardingTooltip");import{Fragment as oa,jsx as O,jsxs as ve}from"react/jsx-runtime";var na={x:.5,y:.5},Xo="@react_buoy_settings_tooltip_shown",Qo=false;function Zo(){if(Qo||typeof document>"u")return;let e=document.createElement("style");e.textContent=Oi(),document.head.appendChild(e),Qo=true}i(Zo,"injectKeyframes");var qe=i(e=>1-Math.pow(1-e,3),"easeOutCubic"),Lt=i(e=>e*e*e,"easeInCubic");function en({icon:e,index:t,totalIcons:o,position:r,progress:n,onPress:a}){let[s,u]=Z(false),[d,p]=Z(false),m=!e.icon&&e.id.startsWith("empty-"),I=!m&&e.unavailable===true,g=!m&&!I,{icons:z}=Eo,T=Ei(t,o),M=0;n<=T[1]?M=0:n<=T[2]?M=(n-T[1])/(T[2]-T[1]):M=1,M=Math.max(0,Math.min(1,M));let D=Pi,E=z.pressIn.scale,R=M*(d?E:s?1.1:1),k=0;M<=0?k=0:M<=.3?k=M:k=.3+(M-.3)*(.7/.7);let w=r.x*M,C=r.y*M;return O("button",{role:"menuitem","aria-label":m?"Empty slot":Mo(e.id,e.name),"data-testid":e.id?`buoy-dial-${e.id}`:void 0,"aria-disabled":!g,tabIndex:g?0:-1,onClick:g?a:void 0,onPointerEnter:L=>g&&L.pointerType==="mouse"&&u(true),onPointerLeave:()=>{u(false),p(false)},onPointerDown:()=>g&&p(true),onPointerUp:()=>p(false),onPointerCancel:()=>p(false),style:{position:"absolute",left:"50%",top:"50%",width:D,height:D,marginLeft:-D/2,marginTop:-D/2,display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",cursor:g?"pointer":"default",transform:`translate(${w}px, ${C}px) scale(${R})`,opacity:k,transition:s||d?"transform 100ms ease":"none",background:"none",border:"none",padding:0},children:m?O("div",{style:{width:x.emptySlot.dotSize,height:x.emptySlot.dotSize,borderRadius:x.emptySlot.dotSize/2,backgroundColor:$.emptyDotBackground,border:`${x.emptySlot.borderWidth}px solid ${$.emptyDotBorder}`}}):ve(oa,{children:[O("div",{style:{position:"absolute",width:`${x.icon.gradientBgSizePercent}%`,height:`${x.icon.gradientBgSizePercent}%`,borderRadius:x.icon.gradientBgBorderRadius,backgroundColor:"rgba(0, 0, 0, 0.2)",opacity:x.icon.gradientBgOpacity}}),O("div",{style:{position:"absolute",width:`${x.icon.innerGlowSizePercent}%`,height:`${x.icon.innerGlowSizePercent}%`,borderRadius:x.icon.innerGlowBorderRadius,backgroundColor:"rgba(255, 255, 255, 0.02)",opacity:x.icon.innerGlowOpacity}}),O("div",{style:{marginBottom:x.icon.wrapperMarginBottom,display:"flex",alignItems:"center",justifyContent:"center",fontSize:32,filter:s?"brightness(1.2)":"none"},children:e.icon}),O("span",{style:{fontSize:e.name.length>8?Math.max(x.icon.label.fontSize*.7,x.icon.label.fontSize*8/e.name.length):x.icon.label.fontSize,fontWeight:x.icon.label.fontWeight,fontFamily:x.icon.label.fontFamily,color:$.iconLabel,letterSpacing:x.icon.label.letterSpacing,marginTop:x.icon.label.marginTop,textTransform:"uppercase",whiteSpace:"nowrap"},children:e.name}),I&&O("span",{style:{fontSize:x.icon.label.fontSize-1,fontWeight:x.icon.label.fontWeight,fontFamily:x.icon.label.fontFamily,letterSpacing:x.icon.label.letterSpacing,color:Li.muted,textTransform:"uppercase",whiteSpace:"nowrap"},children:"Unavailable"})]})})}i(en,"DialIconItem");function $t({side:e,color:t}){return O("svg",{width:18,height:18,viewBox:"0 0 24 24","aria-hidden":"true",focusable:"false",children:(e==="prev"?[[15,18,9,12],[9,12,15,6]]:[[9,18,15,12],[15,12,9,6]]).map(([o,r,n,a],s)=>O("line",{x1:o,y1:r,x2:n,y2:a,stroke:t,strokeWidth:2},s))})}i($t,"PagerChevron");function jt({side:e,disabled:t,onClick:o}){let[r,n]=Z(false),a=t?$.emptyDotBorder:$.accent;return ve("button",{type:"button","aria-label":`${e==="prev"?"Previous":"Next"} dial page`,"data-testid":`buoy-dial-${e}`,disabled:t,onClick:o,onPointerDown:()=>!t&&n(true),onPointerUp:()=>n(false),onPointerLeave:()=>n(false),onPointerCancel:()=>n(false),style:{display:"flex",alignItems:"center",gap:4,padding:"10px 16px",borderRadius:10,border:`1px solid ${$.dialBorder}`,backgroundColor:$.dialBackground,color:t?$.iconLabelMuted:$.centerText,fontSize:12,fontWeight:900,fontFamily:Fo,letterSpacing:1.5,textTransform:"uppercase",cursor:t?"default":"pointer",opacity:t?.4:1,boxShadow:t?"none":`0 0 8px ${Po($.dialShadow,.4)}`,transform:r?"scale(0.92)":"scale(1)",transition:"transform 100ms ease"},children:[e==="prev"&&O($t,{side:"prev",color:a}),e==="prev"?"PREV":"NEXT",e==="next"&&O($t,{side:"next",color:a})]})}i(jt,"PagerButton");function Nt({icons:e,onClose:t,centerLabel:o="MENU",onCenterPress:r,settingsOpen:n=false,hintsDisabled:a=false}){let{id:s}=ji(),[u,d]=Z(0),[p,m]=Z(0),[I,g]=Z(0),[z,T]=Z(0),[M,D]=Z(0),[E,R]=Z(1),[k,w]=Z(false),[C,L]=Z(false),[A,B]=Z(false),ee=gt(null),_=gt(null),G=gt(null),te=gt(false),{entrance:V,exit:ae,interaction:oe}=Eo,fe=Fi(),[me,ge]=Z(()=>({width:window.innerWidth,height:window.innerHeight}));Ee(()=>{let y=i(()=>ge({width:window.innerWidth,height:window.innerHeight}),"resize");return window.addEventListener("resize",y),()=>window.removeEventListener("resize",y)},[]);let H=mt(()=>Di({screenWidth:me.width,maxCircleSize:Math.max(120,Math.min(320,me.height-96))}),[me]),Ce=mt(()=>Mi(),[]),ke=mt(()=>Ri(Xe,H.iconRadius),[H.iconRadius]),[Le,$e]=Z(0),se=Math.max(1,Math.ceil(e.length/Xe)),Y=Math.min(Le,se-1),le=mt(()=>{let y=Y*Xe,h=[...e.slice(y,y+Xe)];for(;h.length<Xe;)h.push({id:`empty-${h.length}`,name:"",icon:null,onPress:i(()=>{},"onPress")});return h},[e,Y]);Ee(()=>{Zo()},[]),Ee(()=>{let y=V.backdrop.duration,h=V.dial.rotation.duration,J=V.centerButton.delay,W=V.icons.delay,U=V.icons.duration,q=performance.now(),re=i(he=>{let c=he-q;d(Math.min(1,c/y));let b=Math.min(1,c/400),P=qe(b)*1.1;b>.7&&(P-=(b-.7)*.33),b>=1&&(P=1),m(Math.max(0,Math.min(1.05,P)));let X=Math.min(1,c/h);if(g(qe(X)*360),c>=J){let xe=Math.min(1,(c-J)/300),He=qe(xe)*1.15;xe>.6&&(He-=(xe-.6)*.375),xe>=1&&(He=1),T(Math.max(0,Math.min(1.05,He)))}if(c>=W){let xe=Math.min(1,(c-W)/U);D(qe(xe))}let we=W+U;c<we?G.current=requestAnimationFrame(re):(d(1),m(1),g(360),T(1),D(1),B(true))},"animate");return G.current=requestAnimationFrame(re),()=>{G.current&&cancelAnimationFrame(G.current)}},[]);let pe=ht(()=>{if(te.current)return;te.current=true,L(true),G.current&&cancelAnimationFrame(G.current);let y=performance.now(),h=ae.icons.duration,J=ae.centerButton.duration,W=ae.dialScale.duration,U=Math.max(J,W),q=ae.backdrop.duration,re=i(he=>{let c=he-y;if(c<h){let X=Lt(c/h);D(1-X),G.current=requestAnimationFrame(re);return}let b=h;if(c<b+U){D(0);let X=Math.min(1,(c-b)/J),we=Math.min(1,(c-b)/W);T(1-Lt(X)),m(1-Lt(we)),G.current=requestAnimationFrame(re);return}let P=b+U;if(c<P+q){m(0),T(0);let X=(c-P)/q;d(1-X),G.current=requestAnimationFrame(re);return}d(0),t()},"animate");G.current=requestAnimationFrame(re)},[ae,t]);Ee(()=>{let y=document.activeElement,h=ee.current;return()=>{y?.isConnected&&(document.activeElement===document.body||h?.contains(document.activeElement))&&y.focus()}},[]),Ee(()=>{if(n)return;_.current?.focus();let y=i(h=>{let J=ee.current;if(J){if(h.key==="Escape")h.preventDefault(),pe();else if(h.key==="Tab"){let W=Array.from(J.querySelectorAll('button:not(:disabled):not([aria-disabled="true"]), [tabindex="0"]')).filter(re=>re.getClientRects().length>0),U=W[0],q=W[W.length-1];(!J.contains(document.activeElement)||(h.shiftKey?document.activeElement===U:document.activeElement===q))&&(h.preventDefault(),(h.shiftKey?q:U)?.focus())}else if(["ArrowRight","ArrowDown","ArrowLeft","ArrowUp","Home","End"].includes(h.key)){let W=Array.from(J.querySelectorAll('[role="menuitem"]:not([aria-disabled="true"])')),U=W.indexOf(document.activeElement);if(U<0||!W.length)return;h.preventDefault();let q=h.key==="Home"?0:h.key==="End"?W.length-1:(U+(h.key==="ArrowRight"||h.key==="ArrowDown"?1:-1)+W.length)%W.length;W[q].focus()}}},"handleKeyDown");return document.addEventListener("keydown",y),()=>document.removeEventListener("keydown",y)},[pe,n]);let[ze,je]=Z(false);Ee(()=>{if(a)return;let y=false,h=setTimeout(async()=>{let J=await Oo.getItem(Xo);!y&&!J&&je(true)},1200);return()=>{y=true,clearTimeout(h)}},[a]);let Se=ht(()=>{je(false),Oo.setItem(Xo,"true")},[]);Ee(()=>{n&&ze&&Se()},[n,ze,Se]);let Ae=ht(y=>{if(y.id.startsWith("empty-")||te.current)return;let[h,J]=oe.iconSelect.pulse,W=performance.now(),U=150,q=i(re=>{let he=re-W;if(he<U){let c=qe(he/U);R(1-(1-h.scale)*c),requestAnimationFrame(q)}else if(he<U*2){let c=qe((he-U)/U);R(h.scale+(J.scale-h.scale)*c),requestAnimationFrame(q)}else R(1)},"animatePulse");requestAnimationFrame(q),setTimeout(()=>{y.onPress(),pe()},oe.iconSelect.actionDelay)},[oe.iconSelect,pe]),Be=ht(y=>{if(te.current)return;let h=Math.max(0,Math.min(y,se-1));h!==Y&&$e(h)},[se,Y]),ne=H.buttonSize*x.centerButton.containerRatio,De=H.buttonSize*x.centerButton.borderRatio,Ne=H.buttonSize*x.centerButton.containerRatio/2+6,l=A&&!C;return ve("div",{ref:ee,role:"dialog","aria-label":"Dial Menu","aria-modal":"true",style:{position:"fixed",inset:0,zIndex:1e4},children:[O("button",{type:"button","aria-label":"Close dial menu",tabIndex:0,onClick:pe,style:{position:"absolute",inset:0,border:0,padding:0,backgroundColor:$.dialBackdrop,opacity:u}}),ve("div",{style:{position:"absolute",left:"50%",marginLeft:-H.circleSize/2,bottom:80,width:H.circleSize,height:H.circleSize,borderRadius:"50%",backgroundColor:$.dialBackground,border:`${x.circle.borderWidth}px solid ${$.dialBorder}`,boxShadow:`0 0 ${x.circle.shadowRadius}px ${Po($.dialShadow,x.circle.shadowOpacity)}`,transform:`scale(${p}) rotate(${I}deg)`,opacity:p>.01?1:0,overflow:"hidden"},children:[O("div",{style:{position:"absolute",inset:0,borderRadius:"50%",backgroundColor:$.dialGradient1,opacity:x.gradientLayers[0].opacity}}),O("div",{style:{position:"absolute",inset:0,top:"30%",left:"30%",borderRadius:"50%",backgroundColor:$.dialGradient2,opacity:x.gradientLayers[1].opacity}}),O("div",{style:{position:"absolute",inset:0,top:"50%",left:"50%",borderRadius:"50%",backgroundColor:$.dialGradient3,opacity:x.gradientLayers[2].opacity}}),Ce.map(y=>O("div",{style:{position:"absolute",top:"50%",left:0,right:0,height:x.grid.lineHeight,transform:`rotate(${y}deg)`,transformOrigin:"center"},children:["left","right"].map(h=>O("div",{style:{position:"absolute",top:0,[h]:0,width:`calc(50% - ${Ne}px)`,height:x.grid.lineHeight,backgroundColor:$.dialGridLine}},h))},y)),O("div",{"data-testid":"dial-background","data-background":s,style:{position:"absolute",inset:0,pointerEvents:"none"},children:s==="hyperspace"?O(Xi,{size:H.circleSize}):O($i,{focus:na})}),le.map((y,h)=>O(en,{icon:y,index:h,totalIcons:le.length,position:ke[h],progress:M,onPress:()=>Ae(y)},h)),ve("div",{style:{position:"absolute",left:"50%",top:"50%",width:ne,height:ne,marginLeft:-ne/2,marginTop:-ne/2,display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:$.hubHalo,borderRadius:H.buttonSize,overflow:"hidden",transform:`scale(${z*E})`,opacity:z>.01?1:0},children:[O("div",{style:{position:"absolute",inset:0,backgroundColor:$.dialGradient1,opacity:.5,borderRadius:H.buttonSize}}),O("div",{style:{position:"absolute",inset:0,top:"20%",left:"20%",backgroundColor:$.dialGradient2,opacity:.3,borderRadius:H.buttonSize}}),O("div",{style:{position:"absolute",inset:0,top:"40%",left:"40%",backgroundColor:$.dialGradient3,opacity:.2,borderRadius:H.buttonSize}}),O("div",{style:{width:De,height:De,borderRadius:H.buttonSize*x.centerButton.borderRadiusRatio,backgroundColor:$.hubFill,display:"flex",alignItems:"center",justifyContent:"center"},children:O("button",{ref:_,type:"button","aria-label":n?"Close Settings":"Open Dev Tools Settings",disabled:!r,onClick:r,onPointerEnter:y=>y.pointerType==="mouse"&&w(true),onPointerLeave:()=>w(false),style:{border:0,padding:0,background:"transparent",width:H.buttonSize,height:H.buttonSize,borderRadius:H.buttonSize/2,display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",cursor:r?"pointer":"default",transform:k?`scale(${oe.centerHover.scale})`:"scale(1)",transition:`transform ${oe.centerHover.duration}ms ease`,animation:l&&!k?fe.pulse:"none"},children:n?ve("span",{style:{display:"flex",flexDirection:"column",alignItems:"center",fontSize:x.centerButton.text.fontSize-2,fontWeight:x.centerButton.text.fontWeight,fontFamily:x.centerButton.text.fontFamily,color:$.centerText,letterSpacing:x.centerButton.text.letterSpacing,textAlign:"center",textShadow:`0 0 4px ${$.centerTextGlow}`,textTransform:"uppercase",lineHeight:1.2},children:[O("span",{style:{marginBottom:-2},children:"CLOSE"}),O("span",{style:{marginTop:-2},children:"SETTINGS"})]}):O("span",{style:{fontSize:x.centerButton.text.fontSize,fontWeight:x.centerButton.text.fontWeight,fontFamily:x.centerButton.text.fontFamily,color:$.centerText,letterSpacing:x.centerButton.text.letterSpacing,textAlign:"center",textShadow:`0 0 4px ${$.centerTextGlow}`,textTransform:"uppercase"},children:o})})})]})]}),se>1&&ve("div",{style:{position:"absolute",left:"50%",marginLeft:-H.circleSize/2,top:"calc(100% - 64px)",width:H.circleSize,display:"flex",alignItems:"center",justifyContent:"space-between",opacity:Math.min(1,p),transform:`scale(${Math.min(1,p)})`},children:[O(jt,{side:"prev",disabled:Y<=0,onClick:()=>Be(Y-1)}),ve("span",{"data-testid":"buoy-dial-page",style:{padding:"6px 12px",fontSize:13,fontWeight:900,fontFamily:Fo,letterSpacing:2,color:$.centerText,textShadow:`0 0 6px ${$.centerTextGlow}`},children:[String(Y+1).padStart(2,"0"),ve("span",{style:{color:$.iconLabelMuted,textShadow:"none"},children:[" / ",String(se).padStart(2,"0")]})]}),O(jt,{side:"next",disabled:Y>=se-1,onClick:()=>Be(Y+1)})]}),ze&&!n&&O(Ft,{title:"Welcome to Buoy!",message:"Tap the center button to configure and add tools to your dial menu.",onDismiss:Se,showArrow:false})]})}i(Nt,"DialMenu");import{persistentStorage as tn,devToolsStorageKeys as ra}from"@buoy-gg/shared-ui/web";import{recordUsage as ia,pruneUsage as aa}from"@buoy-gg/floating-tools-core/web";var on=ra.dial.usage(),Ge={},nn=false,Ht=null;function Wt(){return Ht||(Ht=(async()=>{try{let e=await tn.getItem(on);if(e){let t=JSON.parse(e);t&&typeof t=="object"&&(Ge=t)}}catch{}finally{nn=true}})(),Ht)}i(Wt,"loadDialUsage");Wt();function rn(e){return e.map((t,o)=>({id:t,index:o,lastUsed:Ge[t]?.lastUsed??0})).sort((t,o)=>o.lastUsed-t.lastUsed||t.index-o.index).map(({id:t})=>t)}i(rn,"getRankedToolIds");async function an(e){if(!e)return;nn||await Wt();let t=Math.max(Date.now(),...Object.values(Ge).map(o=>o.lastUsed+1));Ge=aa(ia(Ge,e,t),t);try{await tn.setItem(on,JSON.stringify(Ge))}catch{}}i(an,"recordToolUsage");import{useCallback as sa,useMemo as sn}from"react";import{persistentStorage as la}from"@buoy-gg/shared-ui/web";import{useState as ie,useEffect as Te,useCallback as bt,useMemo as vt}from"react";import{settingsEventBus as St}from"@buoy-gg/floating-tools-core/web";import{useSyncExternalStore as ca}from"react";import{getRegisteredToolModule as da}from"@buoy-gg/shared-ui/web";var ua=i(()=>()=>{},"noopSubscribe"),pa=i(()=>null,"serverSnapshot");function ln(){let e=da("@buoy-gg/external-sync");return ca(e?.subscribeSyncStatus??ua,()=>e?.getSyncStatus?.()??null,pa)}i(ln,"useDesktopSyncStatus");import{SentryIcon as fa,WifiCircuitIcon as ma,ImageOverlayIcon as ga,RenderCountIcon as ha,Info as _t,Layers as ya,ChevronRightIcon as cn,ChevronDown as dn,getStorageBackendType as ba,getUseLicense as va,signOutOfBuoy as Sa,persistentStorage as Pe,Trash2 as wa,CheckCircle2 as un,BuoyUpgradeSheet as xa,BackgroundSwitcher as Ta,night as v,NightCard as Oe,NightRows as Ut,NightSectionLabel as Ia,NightFootnote as pn,NightSwitch as fn,NightButton as Kt,NightSegmented as Ca,NightBadge as be,NightSeparator as ka,monoFont as mn}from"@buoy-gg/shared-ui/web";import{EnvIcon as gn,StorageIcon as za,RoutesIcon as Aa,NetworkIcon as Ba,QueryIcon as Da,HighlighterIcon as Ra,ReduxIcon as Ma,EventsIcon as Ea}from"@buoy-gg/floating-tools-core/web";import Pa,{createContext as Oa,useContext as Fa}from"react";import{jsx as La}from"react/jsx-runtime";var hn=Oa({});function Vt({children:e,defaultFloatingTools:t,defaultDialTools:o}){let r=Pa.useMemo(()=>({defaultFloatingTools:t,defaultDialTools:o}),[t,o]);return La(hn.Provider,{value:r,children:e})}i(Vt,"DefaultConfigProvider");function qt(){return Fa(hn)}i(qt,"useDefaultConfig");import $a from"react";import{toolTheme as ja}from"@buoy-gg/shared-ui/web";import{jsx as yn}from"react/jsx-runtime";function bn({label:e,size:t,color:o=ja.colors.text}){let r=Math.max(Array.from(e.replace(/[\uFE00-\uFE0F\u200D]/g,"")).length,1),n=r<=2?t:t*1.6,a=Math.max(7,Math.min(t*(r===1?.7:.62),n/(.62*r)));return yn("span",{style:{display:"inline-flex",minWidth:t,maxWidth:n,height:t,alignItems:"center",justifyContent:"center",color:o,fontSize:a,fontWeight:800,letterSpacing:.5,whiteSpace:"nowrap",overflow:"hidden"},children:e})}i(bn,"AppTextIcon");function Gt(e,t){return e==null?e:typeof e=="function"?$a.createElement(e,{slot:t.slot,size:t.size,state:t.state,actions:t.actions}):typeof e=="string"||typeof e=="number"?yn(bn,{label:String(e),size:t.size,color:t.color}):e}i(Gt,"renderAppIcon");import{JsModal as Na,devToolsStorageKeys as Jt,onSettingsApplied as Ha,expandableWindowControlsSupported as Wa}from"@buoy-gg/shared-ui/web";import{useSafeAreaInsets as _a}from"@buoy-gg/shared-ui/web";import{Fragment as Ze,jsx as f,jsxs as j}from"react/jsx-runtime";var et="@react_buoy_dev_tools_settings",Ua=6,wt=i(e=>{let t=Ua,o={};for(let[r,n]of Object.entries(e))n&&t>0?(o[r]=true,t-=1):o[r]=false;return o},"enforceDialLimit"),Ka=i((e,t)=>{let{userStatus:o,environment:r,...n}=e,a=t?Object.entries(n).filter(([s])=>t.includes(s)):Object.entries(n);return{...Object.fromEntries(a),environment:r??false}},"sanitizeFloating"),vn=i((e,t,o)=>{if(!t)return e;let r={...e.dialTools,...t.dialTools??{}},n=o?.allowedDialKeys?Object.entries(r).filter(([a])=>o.allowedDialKeys?.includes(a)):Object.entries(r);return{dialTools:wt(Object.fromEntries(n)),floatingTools:Ka({...e.floatingTools,...t.floatingTools??{}},o?.allowedFloatingKeys),globalSettings:{enableSharedModalDimensions:false,expandableWindowControls:true,...t.globalSettings??{}}}},"mergeWithDefaults"),Va=i((e=[],t,o)=>{let r={},n={},a=new Set(t??[]),s=new Set(o??[]),u=!o||o.length===0;for(let d of e){let{id:p,slot:m="both"}=d;(m==="dial"||m==="both")&&(r[p]=u?true:s.has(p)),(m==="row"||m==="both")&&(n[p]=a.has(p))}return{dialTools:wt(r),floatingTools:{...n,environment:a.has("environment")},globalSettings:{enableSharedModalDimensions:false,expandableWindowControls:true}}},"generateDefaultSettings"),qa=i(({visible:e,onClose:t,onSettingsChange:o,initialSettings:r,availableApps:n=[],storage:a=Pe,zIndex:s})=>{let{defaultFloatingTools:u,defaultDialTools:d}=qt(),p=vt(()=>Va(n,u,d),[n,u,d]),m=vt(()=>Object.keys(p.dialTools),[p]),I=vt(()=>Object.keys(p.floatingTools).filter(c=>c!=="environment"),[p]),[g,z]=ie(r||tt||p),[T,M]=ie(Yt??"floating"),[D,E]=ie(Yt!==null),[R,k]=ie(new Set),[w,C]=ie(false),[L,A]=ie(false);Te(()=>{let c=requestAnimationFrame(()=>A(true));return()=>cancelAnimationFrame(c)},[]);let B=ln();Te(()=>{i(async()=>{try{let c=await Pe.getItem(Jt.settings.activeTab());if(c&&["floating","settings","pro"].includes(c)){let b=c;Yt=b,M(P=>P===b?P:b)}}catch{}finally{E(true)}},"loadActiveTab")()},[]),Te(()=>{D&&Pe.setItem(Jt.settings.activeTab(),T).catch(c=>{console.warn("[Buoy]","Failed to save settings active tab:",c)})},[T,D]);let ee=va()?.(),_=ee?.isPro??false,G=!_&&ee?.licenseKey?ee.error:null,te=ee?.errorKind==="transport",[V,ae]=ie(Sn),[oe,fe]=ie(false),[me,ge]=ie(false),[H,Ce]=ie(false),[ke,Le]=ie([]),[$e,se]=ie(false),Y=_a(),le=xo.get("window").height,pe=xo.get("window").width,ze=Math.floor(le*.33),je=Math.min(pe-32,400),Se=bt(async()=>{try{let c=await a.getItem(et);if(c){let b=JSON.parse(c),P=vn(p,b,{allowedDialKeys:m,allowedFloatingKeys:I});tt=P,z(X=>wn(X,P)?X:P);return}tt=p,z(b=>wn(b,p)?b:p)}catch(c){console.error("[Buoy]","Failed to load dev tools settings:",c),z(p)}},[p,m,I,a]);Te(()=>{Se()},[Se]),Te(()=>{ba().then(c=>{Sn=c,ae(b=>b===c?b:c)})},[]),Te(()=>{H&&(se(true),Pe.getAllKeys().then(c=>{Le(c.sort())}).catch(()=>{Le([])}).finally(()=>{se(false)}))},[H]);let Ae=i(async c=>{try{let b={...c,dialTools:wt(c.dialTools)};await a.setItem(et,JSON.stringify(b)),tt=b,z(b),o?.(b),St.emit(b)}catch(b){console.error("[Buoy]","Failed to save dev tools settings:",b)}},"saveSettings"),Be=i(c=>{let b={...g,floatingTools:{...g.floatingTools,[c]:!g.floatingTools[c]}};Ae(b)},"toggleFloatingTool"),ne=i(c=>{let b={...g,globalSettings:{...g.globalSettings,[c]:!g.globalSettings?.[c]}};Ae(b)},"toggleGlobalSetting"),De=i(async()=>{fe(true),ge(false);try{await Pe.clear(),ge(true),z(p),a!==Pe&&await a.setItem(et,JSON.stringify(p)),o?.(p),St.emit(p),setTimeout(()=>ge(false),2e3)}catch(c){console.error("[Buoy]","Failed to clear storage:",c)}finally{fe(false)}},"handleClearStorage"),Ne=bt(c=>{},[]),l=i(c=>{let b=n.find(P=>P.id===c);return b?.description?b.description:c==="environment"?"Environment badge.":""},"getToolDescription"),y=i(c=>c==="environment"?"Env Badge":n.find(b=>b.id===c)?.name??c.toUpperCase().replace(/_/g," "),"getToolLabel"),h=i(c=>{if(!L)return null;switch(c){case"query":return f(Da,{size:18});case"env":return f(gn,{size:18});case"sentry":return f(fa,{size:18,color:"#9945FF"});case"storage":return f(za,{size:18,bgColor:v.color.surface});case"wifi":case"query-wifi-toggle":return f(ma,{size:18,colorPreset:"green",strength:4,noBackground:true});case"route-events":return f(Aa,{size:18,bgColor:v.color.surface});case"network":return f(Ba,{size:18});case"environment":return f(gn,{size:18});case"debug-borders":return f(ya,{size:18,color:v.color.accent});case"highlight-updates":return f(ha,{size:18,color:v.color.accent});case"highlight-updates-modal":return f(Ra,{size:18});case"redux":return f(Ma,{size:18});case"image-overlay":return f(ga,{size:18});case"events":return f(Ea,{size:18});case"zustand":try{let{ZustandIcon:b}=To("@buoy-gg/zustand/web");return f(b,{size:18})}catch{return f(_t,{size:18,color:v.color.textSecondary})}case"jotai":try{let{JotaiIcon:b}=To("@buoy-gg/jotai/web");return f(b,{size:18})}catch{return f(_t,{size:18,color:v.color.textSecondary})}default:{let b=n.find(P=>P.id===c);return b?.icon!=null?Gt(b.icon,{slot:"row",size:18,color:b.color}):f(_t,{size:18,color:v.color.textSecondary})}}},"getToolIcon"),J=i((c,b,P,X)=>{let we=l(c);return j(ct,{activeOpacity:P?1:.7,onPress:()=>!P&&X(),accessibilityLabel:y(c),accessibilityRole:"button",style:[S.toolRow,P&&S.rowDisabled],children:[f(N,{style:S.toolIconSlot,children:h(c)}),j(N,{style:S.rowInfo,children:[j(K,{style:S.rowLabel,children:[y(c),P?" \xB7 max 6":""]}),we?f(K,{style:S.rowCaption,numberOfLines:1,children:we}):null]}),f(fn,{value:b,disabled:P,onValueChange:()=>X()})]},c)},"renderToolRow"),W=i(c=>{k(b=>{let P=new Set(b);return P.has(c)?P.delete(c):P.add(c),P})},"toggleSettingExpanded"),U=i((c,b,P,X,we)=>{let xe=g.globalSettings?.[c]??false,He=R.has(c);return j(N,{children:[j(ct,{activeOpacity:.7,onPress:()=>W(c),accessibilityLabel:b,style:S.settingRow,children:[j(N,{style:S.rowInfo,children:[f(K,{style:S.rowLabel,children:b}),f(K,{style:S.rowCaption,numberOfLines:He?0:1,children:P})]}),f(fn,{value:xe,onValueChange:()=>ne(c)})]}),He&&j(N,{style:S.settingRowBody,children:[f(K,{style:S.settingRowBodyText,children:X}),f(K,{style:S.settingRowBodyHint,children:we})]})]},c)},"renderGlobalSettingRow"),q=i((c,b,P)=>j(N,{children:[f(Ia,{children:c}),b,P]}),"renderSection"),re=V==="filesystem"?f(be,{label:"File System",tone:"accent"}):V==="asyncstorage"?f(be,{label:"Async Storage",tone:"warning"}):V==="localstorage"?f(be,{label:"Local Storage",tone:"accent"}):V==="memory"?f(be,{label:"Memory",tone:"danger"}):f(be,{label:"Loading\u2026",tone:"neutral"}),he=i(()=>j(N,{style:S.container,children:[j(wo,{style:S.scrollContent,showsVerticalScrollIndicator:false,contentContainerStyle:S.scrollContainer,children:[T==="floating"&&f(Ze,{children:q("Floating Tools",f(Oe,{glass:true,children:f(Ut,{children:Object.entries(g.floatingTools).map(([c,b])=>J(c,b,false,()=>Be(c)))})}),f(pn,{children:"Tools switched on here appear in the floating bubble row."}))}),T==="settings"&&j(Ze,{children:[q("Background",f(Oe,{glass:true,padded:true,children:f(Ta,{embedded:true})})),q("Storage",j(Oe,{glass:true,children:[j(ct,{activeOpacity:.7,onPress:()=>Ce(!H),accessibilityLabel:"Storage Type",style:S.settingRow,children:[f(N,{style:S.rowInfo,children:f(K,{style:S.rowLabel,children:"Storage Type"})}),re,H?f(dn,{size:16,color:v.color.textTertiary}):f(cn,{size:16,color:v.color.textTertiary})]}),H&&j(Ze,{children:[j(N,{style:S.settingRowBody,children:[f(K,{style:S.settingRowBodyText,children:V==="filesystem"?"Settings persist independently and survive AsyncStorage.clear() calls during logout.":V==="asyncstorage"?"Settings may be lost if AsyncStorage is cleared during logout.":V==="localstorage"?"Settings are saved in this browser. Clearing site data removes them.":V==="memory"?"Settings are stored in memory only and will be lost on app restart.":"Checking storage backend\u2026"}),V==="asyncstorage"&&f(K,{style:[S.settingRowBodyText,S.bodyWarning],children:"Install expo-file-system to persist settings through logout flows."}),V==="memory"&&f(K,{style:[S.settingRowBodyText,S.bodyDanger],children:"No persistent storage available \u2014 install expo-file-system (best) or @react-native-async-storage/async-storage."})]}),f(ka,{}),j(N,{style:S.storageExpanded,children:[j(N,{style:S.storageExpandedHeader,children:[f(K,{style:S.storageExpandedTitle,children:"SAVED SETTINGS"}),f(K,{style:S.storageExpandedCount,children:$e?"\u2026":`${ke.length} keys`})]}),$e?f(K,{style:S.storageKeyEmpty,children:"Loading\u2026"}):ke.length===0?f(K,{style:S.storageKeyEmpty,children:"No settings saved yet"}):f(wo,{style:S.storageKeysList,nestedScrollEnabled:true,showsVerticalScrollIndicator:true,children:ke.map(c=>f(N,{style:S.storageKeyItem,children:f(K,{style:S.storageKeyText,numberOfLines:1,children:c.replace("@react_buoy_","")})},c))})]}),f(N,{style:S.cardButtonWrap,children:f(Kt,{label:me?"Cleared":oe?"Clearing\u2026":"Clear All Settings",variant:me?"secondary":"destructive",size:"md",disabled:oe,onPress:De,icon:me?f(un,{size:15,color:v.color.accent}):f(wa,{size:15,color:oe?v.color.textTertiary:v.color.danger})})})]})]})),B&&B.state!=="idle"&&q("Desktop Sync",j(Oe,{glass:true,children:[j(ct,{activeOpacity:.7,onPress:()=>W("desktopSync"),accessibilityLabel:"Buoy Desktop",style:S.settingRow,children:[f(N,{style:S.rowInfo,children:f(K,{style:S.rowLabel,children:"Buoy Desktop"})}),B.state==="connected"?f(be,{label:"Connected",tone:"accent"}):B.state==="connecting"?f(be,{label:"Connecting\u2026",tone:"neutral"}):f(be,{label:"Retrying",tone:"warning"}),R.has("desktopSync")?f(dn,{size:16,color:v.color.textTertiary}):f(cn,{size:16,color:v.color.textTertiary})]}),R.has("desktopSync")&&j(N,{style:S.settingRowBody,children:[j(K,{style:S.settingRowBodyText,children:[B.state==="connected"?"Streaming tool data to Buoy Desktop at ":"Trying to reach Buoy Desktop at ",f(K,{style:S.footnoteMono,children:B.targetURL??"(unknown URL)"}),B.state!=="connected"&&" \u2014 is the desktop app running? Override with the externalSync socketURL option if it runs elsewhere."]}),B.state==="retrying"&&B.lastError&&j(K,{style:[S.settingRowBodyText,S.bodyWarning],children:["Last error: ",B.lastError]})]})]})),q("Modal Behavior",f(Oe,{glass:true,children:j(Ut,{children:[U("enableSharedModalDimensions","Shared Modal Size","Sync dimensions across all tools","When enabled, all tool modals will share the same size and position. Resizing one modal will affect all others. When disabled, each tool remembers its own size and position independently.","Keep OFF for the best experience. This allows you to customize each tool's modal size separately."),Wa(We.OS==="web")?U("expandableWindowControls","Expand Controls","iPad-style expandable window buttons","When enabled, the window control buttons (minimize, toggle mode, close) start as small dots and expand into larger, easy-to-tap buttons when pressed. When disabled, buttons are directly tappable at their small size.","Keep ON for touch devices where the small buttons are hard to press. Turn OFF if you prefer direct single-tap access."):null]})}))]}),T==="pro"&&j(Ze,{children:[q("License",j(Oe,{glass:true,children:[j(N,{style:S.settingRow,children:[f(N,{style:S.rowInfo,children:f(K,{style:S.rowLabel,children:"License Status"})}),f(N,{testID:"buoy-settings-license-status",accessibilityLabel:_?"License: Active":"License: Free",children:_?f(be,{label:"Active",tone:"accent"}):f(be,{label:"Free",tone:"neutral"})})]}),ee?.tierSource==="session"?j(N,{style:S.settingRow,children:[f(N,{style:S.rowInfo,children:f(K,{style:S.rowLabel,children:"Signed in with Buoy"})}),f(Kt,{label:"Sign out",variant:"secondary",size:"md",onPress:()=>void Sa(),testID:"buoy-settings-signout"})]}):null]}),f(pn,{children:_?"You have full access to all Buoy DevTools features.":G?te?`Couldn't reach the license server (${G}). A VPN or corporate proxy can block buoy.gg \u2014 turn it off and reload. Your key hasn't been rejected.`:`License check failed: ${G}.`:"Upgrade to Pro to unlock all features and support development."})),!_&&j(Ze,{children:[q("Pro Features",f(Oe,{glass:true,children:f(Ut,{children:["Advanced Settings","Priority Support"].map(c=>j(N,{style:S.featureRow,children:[f(un,{size:16,color:v.color.accent}),f(K,{style:S.rowLabel,children:c})]},c))})})),f(Kt,{label:"Upgrade to Pro",variant:"primary",size:"lg",onPress:()=>C(true)})]})]})]}),f(xa,{visible:w,onClose:()=>C(false)})]}),"renderContent");return f(Na,{visible:e,onClose:t,zIndex:s,variant:"night",header:{showToggleButton:false,customContent:f(N,{style:S.headerRow,children:f(Ca,{glass:true,tabs:[{key:"floating",label:"Floating"},{key:"settings",label:"Settings"},{key:"pro",label:"Pro"}],activeKey:T,onChange:c=>M(c)})})},initialMode:"bottomSheet",onModeChange:Ne,persistenceKey:Jt.settings.root(),enablePersistence:true,maxHeight:le-Y.top,initialHeight:ze,initialFloatingPosition:{x:(pe-je)/2,y:Y.top+20},enableGlitchEffects:true,children:he()})},"DevToolsSettingsModal"),Ga={dialTools:{},floatingTools:{environment:false},globalSettings:{enableSharedModalDimensions:false}},Ja=i((e,t)=>{let o=new Set(e??[]),r=new Set(t??[]),n={};for(let s of r)n[s]=true;let a={environment:o.has("environment")};for(let s of o)s!=="environment"&&(a[s]=true);return{dialTools:wt(n),floatingTools:a,globalSettings:{enableSharedModalDimensions:false}}},"createDefaultsFromConfig"),tt=null,Yt=null,Sn=null,wn=i((e,t)=>JSON.stringify(e)===JSON.stringify(t),"sameSettings");St.addListener(e=>{e&&(tt=e)});var xn=i(()=>{let{defaultFloatingTools:e,defaultDialTools:t}=qt(),o=vt(()=>!e&&!t?Ga:Ja(e,t),[e,t]),[r,n]=ie(o),a=bt(async()=>{try{let u=await Pe.getItem(et);if(u){let d=JSON.parse(u),p=vn(o,d);n(p);return}n(o)}catch(u){console.error("[Buoy]","Failed to load dev tools settings:",u),n(o)}},[o]);Te(()=>Ha(u=>{u.includes(et)&&a()}),[a]),Te(()=>{a();let u=St.addListener(d=>{try{d&&n(d)}catch{}});return()=>{u()}},[a]);let s=bt(()=>{a()},[a]);return{settings:r,refreshSettings:s}},"useDevToolsSettings"),S=dt.create({container:{flex:1,backgroundColor:"transparent"},headerRow:{flexDirection:"row",alignItems:"center",paddingLeft:v.gutter,paddingRight:v.gutter,paddingBottom:8},scrollContent:{flex:1},scrollContainer:{paddingHorizontal:v.gutter,paddingTop:8,paddingBottom:24,gap:v.groupGap},toolRow:{flexDirection:"row",alignItems:"center",gap:12,paddingHorizontal:v.rowPadH,paddingVertical:12},settingRow:{flexDirection:"row",alignItems:"center",gap:10,paddingHorizontal:v.rowPadH,paddingVertical:v.rowPadV,minHeight:52},featureRow:{flexDirection:"row",alignItems:"center",gap:10,paddingHorizontal:v.rowPadH,paddingVertical:12},rowDisabled:{opacity:.4},toolIconSlot:{width:24,alignItems:"center"},rowInfo:{flex:1,gap:2},rowLabel:{color:v.color.text,fontSize:v.font.row,fontWeight:"500"},rowCaption:{color:v.color.textTertiary,fontSize:v.font.label},settingRowBody:{paddingHorizontal:v.rowPadH,paddingBottom:v.rowPadV,gap:6},settingRowBodyText:{color:v.color.textSecondary,fontSize:v.font.caption,lineHeight:v.font.caption*1.45},settingRowBodyHint:{color:v.color.textTertiary,fontSize:v.font.caption,lineHeight:v.font.caption*1.45},bodyWarning:{color:v.color.warning},bodyDanger:{color:v.color.danger},cardButtonWrap:{paddingHorizontal:v.cardPad,paddingTop:10,paddingBottom:v.cardPad},storageExpanded:{paddingHorizontal:v.rowPadH,paddingVertical:12,gap:8},storageExpandedHeader:{flexDirection:"row",alignItems:"center"},storageExpandedTitle:{flex:1,color:v.color.textSecondary,fontSize:v.font.micro,fontWeight:"600",letterSpacing:.5},storageExpandedCount:{color:v.color.textTertiary,fontSize:v.font.micro},storageKeysList:{maxHeight:150},storageKeyItem:{backgroundColor:v.color.glassElevated,borderRadius:v.radius.segment,paddingHorizontal:10,paddingVertical:7,marginBottom:4},storageKeyText:{color:v.color.textSecondary,fontSize:v.font.micro,fontFamily:mn},storageKeyEmpty:{color:v.color.textTertiary,fontSize:v.font.caption,fontStyle:"italic"},footnoteMono:{fontFamily:mn,fontSize:v.font.label,color:v.color.textSecondary}});import{jsx as Tn}from"react/jsx-runtime";var Ya=[];function Xt({visible:e,onClose:t,availableTools:o=Ya,defaultFloatingTools:r,defaultDialTools:n,storage:a=la,onSettingsChange:s}){let u=sn(()=>({getItem:i(async m=>a.getItem(m),"getItem"),setItem:i(async(m,I)=>a.setItem(m,I),"setItem")}),[a]),d=sn(()=>o.map(m=>({...m,name:m.name??m.id,icon:typeof m.icon=="function"?I=>m.icon(I.size):m.icon})),[o]),p=sa(m=>{s?.(m)},[s]);return Tn(Vt,{defaultFloatingTools:r,defaultDialTools:n,children:Tn(qa,{visible:e,onClose:t,zIndex:11e3,availableApps:d,storage:u,onSettingsChange:p})})}i(Xt,"SettingsModal");import{listenBuoyKeydown as Xa}from"@buoy-gg/shared-ui/web/floating";import{persistentStorage as In,setExpandableWindowControls as Qa}from"@buoy-gg/shared-ui/web";import{createContext as Za,useCallback as Ie,useContext as es,useEffect as xt,useMemo as ts,useRef as ot,useState as Cn}from"react";var os=i((e,t,o)=>{if(t.singleton){let n=e.find(a=>a.id===t.id);if(n){let a=n.minimized??false;return{instanceId:n.instanceId,wasMinimized:a,apps:[...e.filter(s=>s.instanceId!==n.instanceId),{...n,minimized:false}]}}}let r=o();return{instanceId:r,wasMinimized:false,apps:[...e,{...t,instanceId:r}]}},"resolveOpenAppsState");import{createContext as ns,useCallback as kn,useContext as rs,useEffect as Tt,useMemo as is,useRef as zn,useState as It}from"react";import{JsModal as as,ModalHeader as nt,HeaderSearchButton as ss,TickProvider as ls,ToolScreenHeaderContext as cs,devToolsStorageKeys as An,buoyColors as Bn,gameUIColors as Qt}from"@buoy-gg/shared-ui/web";import{jsx as ce,jsxs as Ct}from"react/jsx-runtime";var rt=i(()=>{},"noop"),ds={search:"",isSearchActive:false,clearSearch:rt,close:rt,minimize:rt,showToast:rt,setHeaderOverride:rt},Dn=ns(null);function Zt(){return rs(Dn)??ds}i(Zt,"useToolHost");function Rn(e,t){let{setHeaderOverride:o}=Zt();Tt(()=>(o(e),()=>o(null)),t)}i(Rn,"useToolHeader");var Mn=2200,us={success:Qt.success,error:Qt.error,info:Qt.info};function En({message:e,type:t,nonce:o}){let r=zn(new Re.Value(0)).current;Tt(()=>{r.setValue(0),Re.sequence([Re.timing(r,{toValue:1,duration:150,useNativeDriver:true}),Re.delay(Mn-450),Re.timing(r,{toValue:0,duration:300,useNativeDriver:true})]).start()},[o,r]);let n=us[t];return Ct(Re.View,{pointerEvents:"none",style:[kt.toast,{opacity:r,borderColor:n+"60"}],children:[ce(N,{style:[kt.toastDot,{backgroundColor:n}]}),ce(K,{style:kt.toastText,numberOfLines:2,children:e})]})}i(En,"ToastView");function Pn({app:e,config:t,visible:o,zIndex:r,onClose:n,onMinimize:a,initialModalState:s,enableSharedModalDimensions:u,bodyProps:d}){let p=e.component,[m,I]=It(false),[g,z]=It(""),[T,M]=It(null),[D,E]=It(null),R=zn(null),k=kn(()=>{I(false),z("")},[]),w=kn((V,ae="info")=>{R.current&&clearTimeout(R.current),E(oe=>({message:V,type:ae,nonce:(oe?.nonce??0)+1})),R.current=setTimeout(()=>E(null),Mn)},[]);Tt(()=>()=>{R.current&&clearTimeout(R.current)},[]);let C=is(()=>({search:m?g:"",isSearchActive:m,clearSearch:k,close:n,minimize:i(()=>a(),"minimize"),showToast:w,setHeaderOverride:M,instanceId:e.instanceId}),[g,m,k,n,a,w,e.instanceId]),L=T?.title??t.title??e.title??e.id,A=T?.subtitle??t.subtitle,B=T?.onBack,ee=T?.actions??t.headerActions,_=T?.searchable??t.searchable;Tt(()=>{!_&&m&&k()},[_,m,k]);let G=u?An.modal.root():An.custom(e.id).modal(),te=Ct(nt,{children:[B&&!m&&ce(nt.Navigation,{onBack:B}),m?ce(nt.Search,{value:g,onChangeText:z,onCancel:k,placeholder:t.searchPlaceholder,testID:`tool-search-field-${e.id}`}):ce(nt.Content,{title:L,subtitle:A}),Ct(nt.Actions,{children:[!m&&ee,_&&!m&&ce(ss,{variant:"chip",testID:`tool-search-${e.id}`,onPress:()=>I(true)})]})]});return ce(Dn.Provider,{value:C,children:ce(as,{visible:o,onClose:n,onBack:B,onMinimize:a,initialModalState:s,zIndex:r,persistenceKey:G,enablePersistence:true,initialMode:t.initialMode??"bottomSheet",header:{customContent:te,showToggleButton:true},disableScrollWrapper:true,styles:{},children:Ct(N,{style:kt.bodyRoot,children:[ce(ls,{children:ce(cs.Provider,{value:M,children:ce(p,{...d})})}),D&&ce(En,{message:D.message,type:D.type,nonce:D.nonce})]})})})}i(Pn,"ToolModalShell");var kt=dt.create({bodyRoot:{flex:1,minHeight:0,backgroundColor:"transparent"},toast:{position:"absolute",bottom:16,alignSelf:"center",flexDirection:"row",alignItems:"center",gap:8,maxWidth:"86%",backgroundColor:Bn.card,borderWidth:1,borderRadius:8,paddingHorizontal:12,paddingVertical:8,shadowColor:"#000",shadowOpacity:.4,shadowRadius:8,shadowOffset:{width:0,height:2},elevation:6},toastDot:{width:6,height:6,borderRadius:3},toastText:{flex:1,fontSize:12,color:Bn.text}});import{useEffect as ps,useRef as fs}from"react";import{capacitorPlatform as ms,capacitorPlugin as gs}from"@buoy-gg/license/web";function On(){return globalThis.__BUOY_HOLDS_BACK__===true}i(On,"isBuoyHoldingBackButton");var hs=99.5;function Fn(){if(typeof document>"u")return false;let e=globalThis.Ionic;if(!e&&!document.querySelector("ion-app"))return false;try{return e?.config?.get?.("hardwareBackButton",true)!==false}catch{return true}}i(Fn,"ionicHandlesBack");function Ln(e,t){let o=fs(t);o.current=t,ps(()=>{if(!e||ms()!=="android")return;let r=globalThis;r.__BUOY_HOLDS_BACK__=true;let n;if(Fn()){let a=i(s=>{s.detail?.register?.(hs,()=>{o.current()})},"listener");document.addEventListener("ionBackButton",a),n=i(()=>document.removeEventListener("ionBackButton",a),"cleanup")}else{let a=gs("App");if(!a?.addListener){r.__BUOY_HOLDS_BACK__=false;return}let s=false,u=null;Promise.resolve(a.addListener("backButton",()=>o.current())).then(d=>{s?d.remove():u=d}).catch(()=>{}),n=i(()=>{s=true,u&&u.remove()},"cleanup")}return()=>{n(),r.__BUOY_HOLDS_BACK__=false}},[e])}i(Ln,"useCapacitorBackButton");import{Fragment as ys,jsx as de}from"react/jsx-runtime";var $n=Za(null),jn="@react_buoy_open_apps",eo=44,bs=12,vs=100,Ss=16,ws=i(e=>({x:window.innerWidth-eo-Ss,y:window.innerHeight-vs-eo-e*(eo+bs)}),"dockIconPosition"),Nn=i(({children:e})=>{let[t,o]=Cn([]),[r,n]=Cn(false),a=ot([]),s=ot(null),u=ot(false),d=ot(false),p=ot(false),m=Ie(w=>{let C="";return o(L=>{let{apps:A,instanceId:B}=os(L,w,()=>`${w.id}-${Date.now()}-${Math.random().toString(36).slice(2)}`);return C=B,A}),C},[]),I=Ie(()=>{if(u.current||!d.current||!p.current)return;u.current=true;let w=s.current;if(!w||w.length===0){n(true);return}s.current=null,w.forEach(({id:C,minimized:L})=>{let A=a.current.find(B=>B.id===C);if(A&&A.component){let B=Gt(A.icon,{slot:"dial",size:20,color:A.color});m({id:A.id,title:A.name,component:A.component,props:A.props,modal:A.modal,launchMode:A.launchMode||"self-modal",singleton:A.singleton??true,icon:B,color:A.color,minimized:L})}}),n(true)},[m]);xt(()=>{let w=false;return i(async()=>{try{let C=await In.getItem(jn);if(w)return;if(C){let L=JSON.parse(C),A;Array.isArray(L)&&L.length>0&&(typeof L[0]=="string"?A=L.map(B=>({id:B,minimized:false})):A=L.filter(B=>typeof B=="object"&&B!==null&&typeof B.id=="string"),A.length&&(s.current=A))}}catch{}w||(d.current=true,I())},"restoreOpenApps")(),()=>{w=true}},[I]),xt(()=>{if(!r)return;let w=t.map(C=>({id:C.id,minimized:C.minimized??false}));In.setItem(jn,JSON.stringify(w))},[t,r]);let g=Ie(w=>{a.current=w,p.current=true,I()},[I]),z=Ie(w=>{o(C=>C.length?w?C.filter(L=>L.instanceId!==w):C.slice(0,-1):C)},[]),T=Ie(()=>o([]),[]),M=Ie((w,C)=>{o(L=>L.map(A=>A.instanceId===w?{...A,minimized:true,restoreState:C}:A))},[]),D=Ie((w,C)=>{o(L=>L.map(A=>A.instanceId===w?{...A,minimized:false,restoreState:C??A.restoreState}:A))},[]),E=Ie(w=>t.find(C=>C.instanceId===w)?.minimized??false,[t]),R=t.some(w=>w.launchMode!=="toggle-only"&&!w.minimized);xt(()=>R?Xa(i(w=>{if(w.key!=="Escape"||w.defaultPrevented)return;let C=[...t].reverse().find(L=>L.launchMode!=="toggle-only"&&!L.minimized);C&&z(C.instanceId)},"handler")):void 0,[R,z,t]),Ln(t.length>0,()=>z());let k=ts(()=>({openApps:t,isAnyOpen:R,open:m,close:z,closeAll:T,registerApps:g,minimize:M,restore:D,isMinimized:E}),[t,R,m,z,T,g,M,D,E]);return de($n.Provider,{value:k,children:e})},"AppHostProvider"),it=i(()=>{let e=es($n);return e||{openApps:[],isAnyOpen:false,open:i(()=>"","open"),close:i(()=>{},"close"),closeAll:i(()=>{},"closeAll"),registerApps:i(()=>{},"registerApps"),minimize:i(()=>{},"minimize"),restore:i(()=>{},"restore"),isMinimized:i(()=>false,"isMinimized")}},"useAppHost"),xs=9e3,Ts={position:"fixed",inset:0,backgroundColor:"rgba(0,0,0,0.28)",display:"flex",alignItems:"center",justifyContent:"center"},Is={maxHeight:"90%",width:"94%",borderRadius:12,backgroundColor:"white",overflow:"hidden"},Cs=i(({app:e,zIndex:t,onClose:o,onMinimize:r,minimizeTargetPosition:n,enableSharedModalDimensions:a})=>{let s=e.component,u=!e.minimized,d={...e.props??{},...a?{enableSharedModalDimensions:true}:{}};return e.modal&&(!e.launchMode||e.launchMode==="self-modal")?de("div",{"data-testid":`buoy-tool-instance-${e.id}`,style:{position:"fixed",inset:0,zIndex:t,pointerEvents:"none"},children:de(Pn,{app:e,config:e.modal,visible:u,zIndex:t,onClose:o,onMinimize:r,initialModalState:e.restoreState,enableSharedModalDimensions:a,bodyProps:d})}):e.launchMode==="self-modal"?de("div",{"data-testid":`buoy-tool-instance-${e.id}`,style:{position:"fixed",inset:0,zIndex:t,pointerEvents:"none"},children:de(s,{...d,visible:u,onClose:o,onRequestClose:o,onMinimize:r,minimizeTargetPosition:n,instanceId:e.instanceId,zIndex:t,initialModalState:e.restoreState})}):e.launchMode==="inline"?u?de("div",{"data-testid":`buoy-tool-instance-${e.id}`,style:{position:"fixed",inset:0,zIndex:t,pointerEvents:"none"},children:de(s,{...d,onClose:o,onMinimize:r,minimizeTargetPosition:n,initialModalState:e.restoreState,instanceId:e.instanceId})}):null:de("div",{"data-testid":`buoy-tool-instance-${e.id}`,style:{...Ts,zIndex:t,display:u?"flex":"none"},children:de("div",{style:Is,children:de(s,{...d,onClose:o,onMinimize:r,minimizeTargetPosition:n,initialModalState:e.restoreState,instanceId:e.instanceId})})})},"AppRenderer"),Hn=i(()=>{let{openApps:e,close:t,minimize:o}=it(),{settings:r}=xn();xt(()=>{Qa(r.globalSettings?.expandableWindowControls!==false)},[r.globalSettings?.expandableWindowControls]);let n=e.filter(u=>u.launchMode!=="toggle-only");if(n.length===0)return null;let a=n.filter(u=>u.minimized).length,s=Bi()??ws(a);return de(ys,{children:n.map((u,d)=>de(Cs,{app:u,zIndex:xs+d,onClose:()=>t(u.instanceId),onMinimize:p=>o(u.instanceId,p),enableSharedModalDimensions:r.globalSettings?.enableSharedModalDimensions===true,minimizeTargetPosition:s},u.instanceId))})},"AppOverlay");import{useCallback as ks,useEffect as to,useRef as zs,useState as Wn,useSyncExternalStore as _n}from"react";import{persistentStorage as Un,getToolAttention as oo,subscribeToolAttention as Kn}from"@buoy-gg/shared-ui/web";import{jsx as ue,jsxs as zt}from"react/jsx-runtime";function Vn(e){return _n(Kn,()=>oo(e),()=>oo(e))}i(Vn,"useToolAttention");var qn={needsInput:"#FF8329",done:"#20C997",failed:"#FF3B30"},Gn={needsInput:3,failed:2,done:1},Jn=new Map;function no(e){let t=null;for(let r of e?e.split("|"):[]){let n=oo(r);n&&(!t||Gn[n.kind]>Gn[t.kind])&&(t=n)}let o=Jn.get(e);return o&&t&&o.kind===t.kind&&o.label===t.label?o:!o&&!t?null:(Jn.set(e,t),t)}i(no,"strongest");function Yn(e){let t=e.join("|");return _n(Kn,()=>no(t),()=>no(t))}i(Yn,"useStrongestAttention");var Xn=28,ro=32,io=6,Qn=8,Zn=24,er="@react_buoy_minimized_stack_expanded",As=80,tr=2e3,Bs=6e3,Ds="#1A1A1A",at="#888888";function ao({down:e=false}){return ue("svg",{width:12,height:12,viewBox:"0 0 24 24","aria-hidden":"true",style:{transform:e?"rotate(180deg)":void 0},children:ue("path",{d:"M18 15l-6-6-6 6",fill:"none",stroke:at,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})})}i(ao,"ChevronGlyph");function or({id:e,title:t,icon:o,index:r,onPress:n}){let a=Vn(e),s=zs(null);return to(()=>{let u=true,d,p=i(()=>{s.current?.animate([{transform:"translateX(0) scale(1)",opacity:1,offset:0},{transform:"translateX(3px) scale(1.05)",opacity:.4,offset:.2},{transform:"translateX(-3px) scale(1.1)",opacity:1,offset:.4},{transform:"translateX(2px) scale(1.0)",opacity:.6,offset:.6},{transform:"translateX(-1px) scale(0.95)",opacity:1,offset:.8},{transform:"translateX(0) scale(1)",opacity:1,offset:1}],{duration:As,easing:"linear"})},"runGlitch"),m=i(I=>{let g=I?500+Math.random()*1500+r*200:tr+Math.random()*(Bs-tr)+r*300;d=setTimeout(()=>{u&&(p(),m(false))},g)},"schedule");return m(true),()=>{u=false,clearTimeout(d)}},[r]),zt("button",{type:"button","aria-label":a?`${t} \u2014 ${a.label}. Restore`:`Restore ${t}`,"data-testid":`buoy-dock-restore-${e}`,onClick:n,style:{width:ro,height:ro,display:"flex",alignItems:"center",justifyContent:"center",background:"none",border:"none",padding:0,cursor:"pointer",position:"relative"},children:[ue("div",{ref:s,style:{display:"flex",alignItems:"center",justifyContent:"center"},children:o}),a?ue("span",{"aria-hidden":true,"data-testid":`buoy-dock-badge-${e}-${a.kind}`,style:{position:"absolute",top:0,right:0,minWidth:12,height:12,borderRadius:6,padding:"0 2px",boxSizing:"border-box",background:qn[a.kind],border:"1.5px solid #0C0C0C",color:"#000",fontSize:8,fontWeight:800,lineHeight:"9px",display:"flex",alignItems:"center",justifyContent:"center"},children:a.kind==="needsInput"?"!":""}):null]})}i(or,"GlitchToolButton");function nr({containerWidth:e=32}){let{openApps:t,restore:o}=it(),r=t.filter(g=>g.minimized&&g.launchMode!=="toggle-only"),[n,a]=Wn(false),[s,u]=Wn(false),d=Yn(r.map(g=>g.id));to(()=>{let g=false;return i(async()=>{let z=await Un.getItem(er);!g&&z==="true"&&a(true),g||u(true)},"load")(),()=>{g=true}},[]),to(()=>{s&&Un.setItem(er,n?"true":"false")},[n,s]);let p=ks(g=>{o(g)},[o]);if(r.length===0)return null;let m=Qn+r.length*ro+(r.length-1)*io+io+Zn+4,I={backgroundColor:Ds,borderTopLeftRadius:6,borderTopRightRadius:6,borderTop:`1px solid ${at}66`,borderLeft:`1px solid ${at}66`,borderRight:`1px solid ${at}66`,borderBottom:"none",boxSizing:"border-box"};return zt("div",{style:{height:Xn,overflow:"visible",position:"relative"},children:[ue("div",{style:{position:"absolute",bottom:"var(--buoy-stack-bottom, 0px)",top:"var(--buoy-stack-top, auto)",left:0,width:e,maxHeight:"var(--buoy-stack-space, calc(100vh - 48px))",visibility:n?"visible":"hidden",height:n?m:0,opacity:n?1:0,overflowY:"auto",overflowX:"hidden",transition:"height 200ms ease, opacity 200ms ease",pointerEvents:n?"auto":"none",...I},children:zt("div",{style:{height:m,display:"flex",flexDirection:"column",alignItems:"center",paddingTop:Qn,gap:io,boxSizing:"border-box"},children:[n&&[...r].reverse().map((g,z)=>ue(or,{id:g.id,title:g.title||g.id,icon:g.icon??ue("span",{style:{color:"#fff",fontSize:13},children:(g.title||g.id).slice(0,1).toUpperCase()}),index:z,onPress:()=>p(g.instanceId)},g.instanceId)),ue("button",{type:"button","aria-label":"Collapse","data-testid":"buoy-dock-collapse",onClick:()=>a(false),style:{width:"100%",height:Zn,marginTop:3,display:"flex",alignItems:"center",justifyContent:"center",background:"none",border:"none",cursor:"pointer",padding:0},children:ue(ao,{down:true})})]})}),zt("button",{type:"button","aria-label":`Show ${r.length} minimized tools`,"data-testid":"buoy-dock-peek",tabIndex:n?-1:0,"aria-hidden":n,onClick:()=>a(true),style:{position:"absolute",bottom:0,left:0,width:e,height:Xn,display:"flex",flexDirection:"row",alignItems:"center",justifyContent:"center",gap:2,cursor:"pointer",padding:0,opacity:n?0:1,transform:n?"scale(0.9)":"scale(1)",transition:"opacity 200ms ease, transform 200ms ease",pointerEvents:n?"none":"auto",...I},children:[ue(ao,{}),d?ue("span",{"aria-hidden":true,"data-testid":"buoy-dock-peek-attention",style:{position:"absolute",top:2,right:2,minWidth:11,height:11,borderRadius:6,padding:"0 2px",boxSizing:"border-box",background:qn[d.kind],border:"1.5px solid #0C0C0C",color:"#000",fontSize:8,fontWeight:800,lineHeight:"9px",display:"flex",alignItems:"center",justifyContent:"center"},children:d.kind==="needsInput"?"!":""}):null,r.length>1&&ue("span",{style:{fontSize:9,fontWeight:600,color:at,marginLeft:1},children:r.length})]})]})}i(nr,"MinimizedToolsStack");import{registerToolModules as Rs}from"@buoy-gg/shared-ui/web";import{createElement as Ms}from"react";function Je(e){let t=e.icon;return{...e,icon:typeof t=="function"?o=>Ms(t,{size:o,slot:e.slot??"both",color:e.color}):()=>t}}i(Je,"createWebTool");import{createContext as Es,useContext as Ps,useState as rr,useMemo as ir}from"react";import{jsx as Os}from"react/jsx-runtime";var ar=Es(null);function so({children:e}){let[t,o]=rr(false),[r,n]=rr(false),a=ir(()=>t||r,[t,r]),s=ir(()=>({isDialOpen:t,isToolOpen:r,isDevToolsActive:a,setDialOpen:o,setToolOpen:n}),[t,r,a]);return Os(ar.Provider,{value:s,children:e})}i(so,"DevToolsVisibilityProvider");function At(){let e=Ps(ar);return e||{isDialOpen:false,isToolOpen:false,isDevToolsActive:false,setDialOpen:i(()=>{},"setDialOpen"),setToolOpen:i(()=>{},"setToolOpen")}}i(At,"useDevToolsVisibility");import*as Fs from"@buoy-gg/license/web";import*as Ls from"@buoy-gg/shared-ui/web";import*as $s from"@buoy-gg/shared-ui/web/dataViewer";function lo(e){Rs({core:{useDevToolsVisibility:At},license:Fs,"shared-ui":Ls,"shared-ui/dataViewer":$s,...e});let t=new Set;return Object.values(e).flatMap(o=>Object.entries(o).flatMap(([r,n])=>!r.endsWith("Preset")||!n||typeof n.id!="string"||!n.component||t.has(n.id)?[]:(t.add(n.id),[Je(n)])))}i(lo,"createWebTools");import{useEffect as Bt,useMemo as Dt,useRef as js}from"react";import{LicenseManager as sr,installCapacitorBridge as Ns,resolveDevBuild as lr,useLicense as Hs}from"@buoy-gg/license/web";import{registerToolAdapters as Ws}from"@buoy-gg/shared-ui/web";function co(e){return typeof e=="object"&&e!==null?e:void 0}i(co,"externalSyncOptions");function cr({isDevelopment:e,isLicensed:t,externalSync:o,isAvailable:r}){if(o===false||!r)return false;if(e)return true;let n=co(o);return t&&n?.enableInRelease===true&&uo(n.socketURL,n)===null}i(cr,"shouldMountExternalSync");var dr="http://localhost:42831";function ur(e){return e==="localhost"||e.endsWith(".localhost")||/^127\.\d+\.\d+\.\d+$/.test(e)||e==="[::1]"||e==="::1"||e==="10.0.2.2"}i(ur,"isLoopbackHost");function uo(e,t){let o=e??dr;if(t?.allowInsecureNetwork===true)return null;let r;try{r=new URL(o)}catch{return`[Buoy] externalSync.socketURL "${o}" isn't a valid URL, so this release build won't connect to Buoy Desktop.`}return r.protocol==="https:"||r.protocol==="wss:"||ur(r.hostname)?null:`[Buoy] This release build won't connect to ${o}: release sync carries real user data, and plain http to another machine is readable by anyone on the same network. Use a simulator, an emulator or adb reverse (localhost), an https:// broker, or set externalSync.allowInsecureNetwork: true for a network you trust.`}i(uo,"releaseTransportProblem");var _s={impersonate:["searchUsers","startImpersonation","resumeImpersonation","updateSettings","removeFromHistory","clearHistory"]};function pr(e,t,o){if(t)return e;let r=null;for(let[n,a]of Object.entries(_s)){if(o?.includes(n))continue;let s=e[n];if(!s?.actions)continue;let u={...s.actions};for(let d of a)d in u&&(u[d]=()=>{throw new Error(`${n}.${d} is off in release builds. To allow it from Buoy Desktop and the MCP, pass externalSync={{ enableInRelease: true, releaseActions: ["${n}"] }}.`)});r??(r={...e}),r[n]={...s,actions:u}}return r??e}i(pr,"applyReleaseActionPolicy");import{useEffect as Us,useMemo as Ks,useState as Vs}from"react";import{devToolsStorageKeys as qs,persistentStorage as Gs}from"@buoy-gg/shared-ui/web";import{isCapacitorNative as Js}from"@buoy-gg/license/web";var Ys=8;function fr(){let e="";for(;e.length<Ys;)e+=(Math.random()*16|0).toString(16);return e}i(fr,"generateInstallId");function mr(e){return e.toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/(^-|-$)/g,"")}i(mr,"slugify");function gr({appName:e,hardwareName:t,platform:o,installId:r,deviceId:n}){let a=mr(e??"buoy")||"buoy",s=e??"Buoy Device",u=t?.trim()||o;return n?{deviceId:n,deviceName:`${s} (${u})`}:{deviceId:`${a}-${o}-${r}`,deviceName:`${s} (${u} \xB7 ${r.slice(-4)})`}}i(gr,"buildDeviceIdentity");function hr(){let e=globalThis;try{return e.sessionStorage??null}catch{return null}}i(hr,"sessionStore");function yr(){let e=globalThis;try{return e.localStorage??null}catch{return null}}i(yr,"localStore");async function br({platform:e=We.OS,store:t,mint:o=fr}={}){let r=qs.sync.deviceId(),n=t===void 0?Js()?yr():e==="web"?hr():Gs:t;if(!n)return o();try{let a=await n.getItem(r);if(a&&a.length>0)return a;let s=o();return await n.setItem(r,s),s}catch{return o()}}i(br,"loadInstallId");var po=null;function vr(){return po||(po=br()),po}i(vr,"getInstallId");function Sr(e,t){let o=e?.deviceId,r=e?.deviceName,n=t.loadId??vr,a=t.platform??We.OS,[s,u]=Vs(null);return Us(()=>{if(o)return;let d=false;return n().then(p=>{d||u(p)}),()=>{d=true}},[o,n]),Ks(()=>{if(!o&&!s)return null;let d=gr({appName:t.appName,hardwareName:t.hardwareName,platform:a,installId:s??"",deviceId:o});return r?{...d,deviceName:r}:d},[o,r,s,t.appName,t.hardwareName,a])}i(Sr,"useDeviceIdentity");import{useEffect as Xs,useState as Qs}from"react";import{capacitorPlatform as Zs,capacitorPlugin as Rt,isCapacitorNative as el}from"@buoy-gg/license/web";function wr(e,t){if(t==="ios")return/iPad/.test(e)?"iPad":/iPhone/.test(e)?"iPhone":null;let o=/Android [\d.]+;\s*([^;)]+?)(?:\s+Build\/|\))/.exec(e)?.[1]?.trim();return!o||o==="K"?null:o}i(wr,"hardwareFromUserAgent");function xr(e){return/sdk_gphone|Android SDK built for|Android ATD built for|google_sdk|Emulator|generic_/i.test(e)}i(xr,"isAndroidEmulatorUserAgent");function fo(){return typeof navigator>"u"?"":navigator.userAgent??""}i(fo,"userAgent");function Mt(){return typeof document>"u"?null:document.title||(typeof location>"u"?null:location.hostname)||null}i(Mt,"firstPageTitle");var Tr="@react_buoy_capacitor_app_name";function Ir(e){try{let t=globalThis.localStorage;if(!t)return e;let o=t.getItem(Tr);if(o)return o;e&&t.setItem(Tr,e)}catch{}return e}i(Ir,"persistedAppName");function Cr(){let e=Zs();if(!e)return{platform:"web",appName:Mt(),hardwareName:"Browser",ready:true};let t=!!Rt("App");return{platform:e,appName:t?Mt():Ir(Mt()),hardwareName:wr(fo(),e)??e,extraDeviceInfo:{runtime:"capacitor"},ready:!t&&!Rt("Device")}}i(Cr,"initialHostInfo");function kr(){let[e,t]=Qs(Cr);return Xs(()=>{if(!el())return;let o=false,r=Rt("App"),n=Rt("Device");return Promise.all([r?.getInfo?.().catch(()=>null)??null,n?.getInfo?.().catch(()=>null)??null]).then(([a,s])=>{if(o)return;let u=a?.name?.trim(),d=s?.name?.trim()||s?.model?.trim();t(p=>({...p,appName:u||p.appName,hardwareName:d||p.hardwareName,ready:true}))}),()=>{o=true}},[]),e}i(kr,"useHostInfo");function mo(){if(typeof location>"u")return null;let e=globalThis.WEBVIEW_SERVER_URL;return{protocol:location.protocol,hostname:location.hostname,origin:`${location.protocol}//${location.host}`,userAgent:fo(),serverUrl:typeof e=="string"?e:null}}i(mo,"pageInfo");function go(e){if(!e)return null;try{let t=new URL(e);return`${t.protocol}//${t.host}`}catch{return null}}i(go,"schemeHost");function zr(e,t){if(e==="ios"){let o=go(t.serverUrl);return o?o===go(t.origin):t.protocol==="capacitor:"}return Ar.has(t.hostname)}i(zr,"isBundledPage");var Ar=new Set(["localhost","127.0.0.1","[::1]","::1"]);function Br(e,t,o,r=mo()){if(o==="web"||!r)return e;let n;try{n=new URL(e)}catch{return e}let a=zr(o,r);return!t&&a&&n.hostname===r.hostname&&(n.hostname="localhost"),o==="android"&&Ar.has(n.hostname)&&xr(r.userAgent)&&(n.hostname="10.0.2.2"),n.toString().replace(/\/$/,"")}i(Br,"capacitorBrokerURL");function Dr(e,t,o=mo()){return t!=="android"||!o||o.protocol!=="https:"||!/^(http|ws):/i.test(e)?null:`[Buoy] Can't reach Buoy Desktop at ${e}. This Android WebView serves the app from https://${o.hostname} and blocks plain http/ws by default. For debug builds, set android.allowMixedContent: true and server.cleartext: true in capacitor.config, then run cap sync.`}i(Dr,"capacitorTransportProblem");import{getDevServerOrigin as tl,resolveReloadStrategy as ol,scheduleReloadApp as nl}from"@buoy-gg/shared-ui/web";var Rr=Date.now(),Mr=tl(),rl={platform:We.OS,isTV:We.isTV===true,isTVOS:We.isTVOS===true},Er={version:3,getSnapshot:i(()=>{let e=ol("auto");return{startedAt:Rr,devServerOrigin:Mr,device:rl,reload:{available:e!==null,strategy:e}}},"getSnapshot"),subscribe:i(e=>()=>{},"subscribe"),actions:{ping:i(()=>({ok:true,startedAt:Rr,devServerOrigin:Mr}),"ping"),reloadApp:i(e=>{let t=e??{},{strategy:o,delayMs:r}=nl({strategy:t.strategy,delayMs:t.delayMs});return{scheduled:true,strategy:o,delayMs:r}},"reloadApp")}};import{Fragment as il,jsx as Fe,jsxs as al}from"react/jsx-runtime";var sl=["ConsoleRoot","RouteTracker","ReactQueryTracker","ReduxAutoInstrument","PerfMonitorRoot","AutomationResumer","ImagesRoot"],ll=["DebugBordersStandaloneOverlay","HighlightUpdatesOverlay","ImageOverlayStandalone","PerfMonitorOverlay","JsTopHudOverlay","ImpersonateOverlay","ScenariosOverlay"];function Pr(e){let t=Dt(()=>Object.fromEntries(Object.entries(e.modules).map(([r,n])=>[r.replace(/^@buoy-gg\//,"").replace(/\/web$/,""),n])),[e.modules]),o=t["react-query"];return o?.useReactQuerySyncAdapter?Fe(Or,{...e,modules:t,query:o}):Fe(ho,{...e,modules:t})}i(Pr,"BrowserToolRuntime");function Or(e){let t=e.query.useReactQuerySyncAdapter();return Fe(ho,{...e,queryAdapter:t})}i(Or,"QueryRuntime");function ho({modules:e,apps:t,requiredEnvVars:o,externalSync:r,headless:n,sentryGetClient:a,queryAdapter:s}){let{isPro:u,tier:d}=Hs(),p=Dt(()=>{let D={app:Er};for(let[E,R]of Object.entries(e))for(let[k,w]of Object.entries(R))k.endsWith("SyncAdapter")&&w&&typeof w=="object"&&(D[E]=w);s&&(D.query=s),e.env?.createEnvSyncAdapter&&(D.env=e.env.createEnvSyncAdapter(o??[]));for(let E of t??[])E.sync&&(D[`custom:${E.id}`]=E.sync);return D},[e,t,o,s]),m=js(p);m.current=p,Bt(()=>Ws(()=>m.current),[]),Bt(()=>{let D=[],E=i(R=>{let k=R?.();typeof k=="function"&&D.push(k)},"start");return E(e.network?.startNetworkCapture),E(e.storage?.startBrowserStorageCapture),E(e.assets?.startBrowserAssetCapture),E(e.three?.startThreeCapture),lr(typeof _e<"u"?_e:process.env.NODE_ENV!=="production")&&E(e["time-machine"]?.startTimeMachineFloatingToolPersistence),e.storage?.storageSyncAdapter?.subscribe&&E(()=>e.storage.storageSyncAdapter.subscribe(()=>{})),e["focus-inspector"]?.focusInspectorSyncAdapter?.subscribe&&E(()=>e["focus-inspector"].focusInspectorSyncAdapter.subscribe(()=>{})),()=>{for(let R of D.reverse())R()}},[e]);let I=e["external-sync"],g=lr(typeof _e<"u"?_e:process.env.NODE_ENV!=="production"),z=cr({isDevelopment:g,isLicensed:u,externalSync:r,isAvailable:!!I}),T=co(r);Ns({release:!g&&!!T?.enableInRelease}),!g&&T?.enableInRelease&&yo(uo(T.socketURL,T));let M=e.sentry?.SentryRoot;return al(il,{children:[Object.entries(e).flatMap(([D,E])=>sl.map(R=>{let k=E[R];return k?Fe(k,{},`${D}:${R}`):null})),M&&Fe(M,{getClient:a}),Object.entries(e).flatMap(([D,E])=>ll.map(R=>{let k=E[R];return k&&(!n||R==="ScenariosOverlay"||R==="ImpersonateOverlay")?Fe(k,{},`${D}:${R}`):null})),z&&Fe(Lr,{module:I,tools:p,options:T,isPro:u,tier:d,dev:g})]})}i(ho,"ToolRuntime");var Fr=null;function yo(e){!e||e===Fr||(Fr=e,console.warn("[Buoy]",e))}i(yo,"warnOnce");function Lr({module:e,tools:t,options:o,isPro:r,tier:n,dev:a}){let s=kr(),u=Sr(o,{appName:s.appName,hardwareName:s.hardwareName,platform:s.platform}),d=Dt(()=>Br(o?.socketURL??(a?e.getDefaultSocketURL():dr),!!o?.socketURL,s.platform),[o?.socketURL,a,e,s.platform]),{socket:p}=e.useExternalSyncSocket({deviceName:u?.deviceName??"Buoy Browser",socketURL:d,persistentDeviceId:s.ready?u?.deviceId??null:null,platform:s.platform,extraDeviceInfo:s.extraDeviceInfo,enableLogs:o?.enableLogs});Bt(()=>{let g=Dr(d,s.platform);if(!p||!g)return;let z=i(()=>yo(g),"onError");return p.on("connect_error",z),()=>{p.off("connect_error",z)}},[p,d,s.platform]),Bt(()=>{if(!p)return;let g=i(()=>{if(!p.connected||!sr.hasAccountAccess())return;let z=sr.getState();!r&&(z.isInitialized===false||z.isValidating===true)||p.emit("device-license",{isPro:r?"1":"0",tier:n})},"emit");return g(),p.on("connect",g),()=>{p.off("connect",g)}},[p,r,n]);let m=o?.releaseActions?.join(",")??"",I=Dt(()=>pr(t,a,m?m.split(","):void 0),[t,a,m]);return e.useExternalSync({tools:I,socket:p,deviceId:s.ready?u?.deviceId??null:null,enableLogs:o?.enableLogs}),null}i(Lr,"BrowserExternalSync");import{useState as $r}from"react";import{BuoyPortal as cl}from"@buoy-gg/shared-ui/web/floating";import{useBuoySession as dl}from"@buoy-gg/license/web";import{Fragment as jr,jsx as Ye,jsxs as Nr}from"react/jsx-runtime";var Hr="#20C997";function Wr(){let{status:e,signIn:t,signOut:o}=dl(),[r,n]=$r(false),[a,s]=$r(null);if(typeof document>"u")return null;let u=i(()=>{s(null),n(true),t().catch(p=>s(p instanceof Error?p.message:"Sign-in did not work. Try again.")).finally(()=>n(false))},"start"),d=e.state==="active";return Ye(cl,{children:Ye("div",{"data-buoy-signin":"",style:{position:"fixed",right:"max(16px, env(safe-area-inset-right))",bottom:"max(20px, env(safe-area-inset-bottom))",zIndex:99999,maxWidth:"min(320px, calc(100vw - 32px))",padding:d||a?"12px 14px":0,borderRadius:16,background:d||a?"#0f1419":"transparent",color:"#e6edf3",boxShadow:d||a?"0 10px 30px rgba(0,0,0,.35)":"none",fontFamily:"system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif",fontSize:14,lineHeight:1.45},children:d?Nr(jr,{children:[Ye("div",{"data-testid":"buoy-signin-needs-plan",children:"Buoy on a live site needs a Pro or Business plan."}),Ye("button",{type:"button",onClick:()=>void o(),style:ul,"data-testid":"buoy-signout",children:"Sign out"})]}):Nr(jr,{children:[a?Ye("div",{role:"alert",style:{marginBottom:10},"data-testid":"buoy-signin-error",children:a}):null,Ye("button",{type:"button",onClick:u,disabled:r,"data-testid":"buoy-signin",style:{display:"inline-flex",alignItems:"center",gap:8,padding:"10px 16px",border:"none",borderRadius:999,background:Hr,color:"#04130d",fontWeight:600,fontSize:14,cursor:r?"wait":"pointer",boxShadow:"0 8px 24px rgba(0,0,0,.3)"},children:r?"Signing in\u2026":"Sign in to Buoy"})]})})})}i(Wr,"BuoySignIn");var ul={marginTop:8,padding:0,border:"none",background:"none",color:Hr,fontSize:14,cursor:"pointer",textDecoration:"underline"};import{useState as pl}from"react";import{AccountSetupButton as fl,BuoyNeedsPlanCard as ml,BuoySignInCard as gl,useSignInState as hl}from"@buoy-gg/shared-ui/web";import{jsx as st,jsxs as _r}from"react/jsx-runtime";function bo({needsPlan:e=false}){let[t,o]=pl(false),r=hl();return _r(N,{pointerEvents:"box-none",style:Ur.root,children:[st(fl,{expanded:t,onPress:()=>o(true)}),t?st(ai,{visible:true,transparent:true,animationType:"fade",onRequestClose:()=>o(false),children:_r(N,{style:Ur.overlay,accessibilityViewIsModal:true,children:[st(ii,{style:dt.absoluteFill,onPress:()=>o(false),accessible:false}),e&&r==="active"?st(ml,{onClose:()=>o(false)}):st(gl,{onClose:()=>o(false)})]})}):null]})}i(bo,"BuoySignIn");var Ur=dt.create({root:{position:"absolute",bottom:30,right:16,zIndex:99999},overlay:{flex:1,backgroundColor:"rgba(0, 0, 0, 0.65)",alignItems:"center",justifyContent:"center",padding:20}});function vo(e){if(e.length>6){let t=e.map(o=>`"${o}"`).join(", ");return e.slice(0,6)}return e}i(vo,"validateDialConfig");import{installedTools as yl,installedToolsFound as bl}from"@buoy-gg/core/web/installed-tools";import{Fragment as So,jsx as F,jsxs as lt}from"react/jsx-runtime";var Kr={},Vr="@react_buoy_floating_menu_tooltip_shown",vl=Me;function qr({size:e=14,color:t="#20C997"}){let o=Math.max(2,e/4),r=Math.max(1,e/16);return F("div",{style:{display:"grid",gridTemplateColumns:`repeat(3, ${o}px)`,gap:r,width:e,height:e,alignContent:"center",justifyContent:"center"},children:Array.from({length:9}).map((n,a)=>F("div",{style:{width:o,height:o,borderRadius:o/2,backgroundColor:t}},a))})}i(qr,"MenuLauncherIcon");function Gr(e){let{defaultFloatingTools:t,defaultDialTools:o,disableHints:r=false,children:n}=e,a=ye(()=>o&&vo(o),[o]);return F(Vt,{defaultFloatingTools:t,defaultDialTools:a,children:F(Si,{disableHints:r,children:lt(so,{children:[F(Nn,{children:F(Zr,{...e})}),n]})})})}i(Gr,"AdmittedFloatingDevTools");var Sl=["ReduxAutoInstrument","ConsoleRoot","RouteTracker","ReactQueryTracker"];function Jr({modules:e=Kr}){return F(So,{children:Object.entries(e).flatMap(([t,o])=>Sl.map(r=>{let n=o[r];return n?F(n,{},`${t}:${r}`):null}))})}i(Jr,"StartupCapture");function Yr(){let{openApps:e,restore:t}=it();return Q(()=>Io(o=>{let r=e.find(n=>n.id===o);return r?(t(r.instanceId),true):false}),[e,t]),null}i(Yr,"WebToolOpenerBridge");function Xr(){let e=hi();return wi((e===null?process.env.NODE_ENV:e?"development":"production")??"dev")}i(Xr,"defaultEnvironment");function Qr(e,t,o,r){let n=i(m=>Object.entries(e).find(([I])=>I.replace(/^@buoy-gg\//,"").replace(/\/web$/,"")===m)?.[1],"find"),a=[],s=n("env");t?.length&&s?.createEnvTool&&s.createEnvVarConfig&&a.push(Je(s.createEnvTool({requiredEnvVars:s.createEnvVarConfig(t)})));let u=n("storage");o?.length&&u?.createStorageTool&&a.push(Je(u.createStorageTool({requiredStorageKeys:o})));let d=n("ask-buoy"),p=r==="hosted"?d?.hostedAskBuoy?.():r;return p&&d?.createAskBuoyTool&&a.push(Je(d.createAskBuoyTool(p))),a}i(Qr,"configOverrides");function Zr({environment:e,userRole:t="admin",availableEnvironments:o,onEnvironmentSwitch:r,apps:n,modules:a=Kr,externalSync:s,requiredEnvVars:u,sentryGetClient:d,disableHints:p=false,headless:m=false,hidden:I=false,defaultFloatingTools:g,defaultDialTools:z,zustandStores:T,requiredStorageKeys:M,askBuoy:D}){let E=e??Xr(),R=ye(()=>z?vo(z):void 0,[z]),[k,w]=Et(false),[C,L]=Et(false),A=Co(false),B=it(),ee=ye(()=>Qr(a,u,M,D),[a,u,M,D]),_=ye(()=>Pt([...lo(a),...n??[],...ee]),[n,a,ee]),G=ye(()=>Object.entries(a).find(([l])=>l.replace(/^@buoy-gg\//,"").replace(/\/web$/,"")==="zustand")?.[1],[a]);Q(()=>{if(!T||typeof G?.watchStores!="function")return;let l=G.watchStores(T);return typeof l=="function"?l:void 0},[T,G]);let te=At(),V=B.openApps.some(l=>!l.minimized);Q(()=>{te.setDialOpen(k)},[k,te.setDialOpen]),Q(()=>{te.setToolOpen(V||C)},[V,C,te.setToolOpen]);let{registerApps:ae}=B;Q(()=>{ae(_.map(l=>{let y=l.icon;return{...l,icon:typeof y=="function"?({size:h})=>y(h):y}}))},[ae,_]);let oe=ye(()=>_.map(l=>({id:l.id,name:l.name,description:l.description,slot:l.slot})),[_]);Ti({availableTools:oe,storage:vl}),Q(()=>{let l=false;return i(async()=>{let[y,h]=await Promise.all([Me.getItem(pt.dial.isOpen()),Me.getItem(pt.settings.modalOpen())]);l||(y==="true"&&w(true),h==="true"&&(w(true),L(true)),A.current=true)},"restore")(),()=>{l=true}},[]),Q(()=>{A.current&&Me.setItem(pt.dial.isOpen(),k?"true":"false")},[k]),Q(()=>{A.current&&Me.setItem(pt.settings.modalOpen(),C?"true":"false")},[C]);let fe=Ue(l=>{if(an(l.id),l.launchMode==="toggle-only"){l.onPress?.();return}if(l.component){let y=typeof l.icon=="function"?l.icon(20):l.icon;B.open({id:l.id,title:l.name||ut(l.id),component:l.component,props:l.props,modal:l.modal,launchMode:l.launchMode||"self-modal",singleton:l.singleton??true,icon:y,color:l.color||ko(l.id)})}else l.onPress?.()},[B]),me=Co({tools:_,openApps:B.openApps,openTool:fe});me.current={tools:_,openApps:B.openApps,openTool:fe},Q(()=>Io(l=>{let{tools:y,openApps:h,openTool:J}=me.current;if(h.some(U=>U.id===l))return false;let W=y.find(U=>U.id===l);return!W||W.launchMode==="toggle-only"?false:(J(W),true)}),[]);let ge=ye(()=>ft(_,"dial").map(l=>{let y=l.color||ko(l.id),h;return typeof l.icon=="string"?h=l.icon:typeof l.icon=="function"?h=l.icon(32):h=null,{id:l.id,name:l.name||ut(l.id),icon:h,unavailable:!l.component&&!l.onPress,color:y,onPress:i(()=>{fe(l),w(false)},"onPress")}}),[_,fe]),H=ye(()=>{if(!k)return ge;let l=new Map(ge.map(y=>[y.id,y]));return rn(ge.map(y=>y.id)).map(y=>l.get(y)).filter(y=>!!y)},[k,ge]),{settings:Ce}=xn(),ke=ye(()=>ft(_,"row").filter(l=>(Ce.floatingTools[l.id]??false)===true&&(l.component||l.onPress)),[_,Ce.floatingTools]),Le=ye(()=>_.map(l=>({id:l.id,name:l.name||ut(l.id),description:l.description||Ii(l.id),slot:l.slot,icon:l.icon,color:l.color})),[_]),[$e,se]=Et(false),Y=B.openApps.some(l=>!l.minimized);Q(()=>{if(p)return;let l=false,y=setTimeout(async()=>{let h=await Me.getItem(Vr);!l&&!h&&se(true)},1e3);return()=>{l=true,clearTimeout(y)}},[p]);let le=Ue(()=>{se(false),Me.setItem(Vr,"true")},[]),pe=Ue(()=>{le(),w(true)},[le]),ze=Ue(()=>{w(false),L(false)},[]),je=Ue(()=>{L(l=>!l)},[]),Se=Ue(()=>L(false),[]),Ae=!!(o?.length&&r),Be=Ce.floatingTools.environment!==false,ne=$e&&!k&&!Y&&!I;Q(()=>{if(!ne)return;let l=i(h=>{(!(h.target instanceof Element)||!h.target.closest("[data-buoy-root]"))&&le()},"onPointerDown"),y=i(h=>{h.key==="Escape"&&le()},"onKeyDown");return document.addEventListener("pointerdown",l,true),document.addEventListener("keydown",y),()=>{document.removeEventListener("pointerdown",l,true),document.removeEventListener("keydown",y)}},[ne,le]);let De=B.openApps.some(l=>l.minimized&&l.launchMode!=="toggle-only"),Ne=F(Pr,{modules:a,apps:n,requiredEnvVars:u,externalSync:s,headless:m,sentryGetClient:d});return m?Ne:lt("div",{"data-buoy-root":"",style:{display:"contents"},children:[Ne,F(Yr,{}),ne&&F("div",{style:{position:"fixed",inset:0,backgroundColor:"rgba(0,0,0,0.85)",zIndex:1e4,pointerEvents:"none"}}),F("div",{style:I?{visibility:"hidden"}:{display:"contents"},"aria-hidden":I||void 0,children:lt(Bo,{enablePositionPersistence:!ne,pushToSide:k||Y,suspendPointerEvents:k,centerOnboarding:ne,minimizedStack:De?F(nr,{}):void 0,hasMinimizedStack:De,children:[E&&Be&&!Ae&&F(Ci,{environment:E}),Ae&&Be&&F(ki,{currentEnvironment:E??"local",availableEnvironments:o,onSelect:r}),t?F(Do,{userRole:t,onPress:pe}):F("button",{"aria-label":"Open dev tools",onClick:pe,style:{display:"flex",alignItems:"center",justifyContent:"center",padding:"6px 8px",background:"none",border:"none",cursor:"pointer"},children:F(qr,{})}),ke.map(l=>F("button",{"aria-label":l.name||ut(l.id),title:l.description,onClick:()=>fe(l),style:{display:"flex",alignItems:"center",justifyContent:"center",padding:"4px 6px",borderRadius:6,background:"none",border:"none",cursor:"pointer"},children:typeof l.icon=="function"?l.icon(16):l.icon},l.id))]})}),ne&&F(Ft,{title:"Welcome to Buoy!",message:"Grab and position this menu wherever you want, then tap the icon to open your tools.",onDismiss:le}),k&&!I&&F(Nt,{icons:H,onClose:ze,centerLabel:"BUOY",onCenterPress:je,settingsOpen:C,hintsDisabled:p}),C&&!I&&F(Xt,{visible:true,onClose:Se,availableTools:Le,defaultFloatingTools:g,defaultDialTools:R,onSettingsChange:l=>{}}),!I&&lt(So,{children:[F(Hn,{}),F(di,{})]})]})}i(Zr,"FloatingDevToolsInner");function ei(e){let t=e&&typeof e=="object"?e.appId:void 0,o=!!e;Q(()=>{if(!o)return;let r=false,n=ui.SessionManager;if(!n)return;let a=i(s=>{r||!s||(n.configure({audience:`app:${s}`}),n.load().catch(()=>{}))},"apply");return t?a(t):bi().then(s=>a(s?.bundleId)).catch(()=>{}),()=>{r=true}},[o,t])}i(ei,"useCapacitorSignInAudience");var ti=false;function oi(e){return e.modules?e:(!bl&&!ti&&typeof console<"u"&&(ti=true,console.info("[Buoy] No tools loaded. Add buoy() from '@buoy-gg/core/vite' to your Vite plugins, or pass modules to FloatingDevTools.")),{...e,modules:yl})}i(oi,"withInstalledTools");function ni(e){return F(ci,{children:F(ri,{...oi(e)})})}i(ni,"FloatingDevTools");function ri(e){let{access:t,isPro:o,licenseKey:r}=fi();Q(()=>{pi.configure(e.licenseKey)},[e.licenseKey]);let n=e.licenseKey===void 0||mi(e.licenseKey,r),a=gi(typeof _e<"u"?_e:process.env.NODE_ENV!=="production"),s=n&&t.status==="admitted";Q(()=>{s&&xi()},[s]),Q(()=>{a||t.status==="initializing"||(o&&s?si():li())},[a,o,s,t.status]);let u=yi();return ei(u?e.signIn:void 0),!a&&!o?!e.signIn||e.headless?null:u?F(bo,{needsPlan:true}):F(Wr,{}):s?F(Gr,{...e}):lt(So,{children:[t.status==="initializing"&&F(Jr,{modules:e.modules}),e.headless?null:e.signIn&&u?F(bo,{}):F(vi,{})]})}i(ri,"FloatingDevToolsContent");export{zi as a,zo as b,Pt as c,ft as d,Ao as e,Bo as f,Ai as g,Do as h,Nt as i,Xt as j,Zt as k,Rn as l,On as m,Nn as n,it as o,Hn as p,Je as q,so as r,At as s,lo as t,Er as u,ni as v};
@@ -1 +1 @@
1
- "use client";import{a as c,b as d,g as de,k as p}from"./chunk-Z6I7ZD34.mjs";import{a as i}from"./chunk-LOPXJLVB.mjs";import{toolTheme as T}from"@buoy-gg/shared-ui/web";import{CopyButton as D,toolTheme as a}from"@buoy-gg/shared-ui/web";import{TreeDiffViewer as M,SplitDiffViewer as k}from"@buoy-gg/shared-ui/web/dataViewer";import{jsx as t,jsxs as g}from"react/jsx-runtime";var B={success:a.colors.success,active:a.colors.success,connected:a.colors.success,error:a.colors.error,failed:a.colors.error,warning:a.colors.warning,stale:a.colors.warning,pending:a.colors.info,loading:a.colors.info,fetching:a.colors.info,info:a.colors.info,inactive:a.colors.textMuted,idle:a.colors.textMuted};function f(e){return B[e.toLowerCase()]??a.colors.textMuted}i(f,"statusColor");var E={GET:a.colors.info,POST:a.colors.success,PUT:a.colors.warning,PATCH:a.colors.warning,DELETE:a.colors.error};function h(e){return E[e.toUpperCase()]??a.colors.textSecondary}i(h,"methodColor");var V={string:a.colors.success,number:a.colors.info,boolean:a.colors.warning,object:a.colors.accent,array:a.colors.accent,function:a.colors.error,null:a.colors.textMuted,undefined:a.colors.textMuted};function y(e){return V[e.toLowerCase()]??a.colors.textSecondary}i(y,"typeColor");function C({children:e,color:s=a.colors.textSecondary,icon:o,size:r="small",pill:l=false,mono:m=false,style:S}){let v=typeof e=="string"||typeof e=="number";return g(c,{style:[n.base,r==="medium"&&n.medium,l&&n.pill,{backgroundColor:s+"1A",borderColor:s+"40"},S],children:[o,v?t(d,{style:[n.text,r==="medium"&&n.textMedium,m&&n.textMono,{color:s}],numberOfLines:1,children:e}):e]})}i(C,"Badge");var n=p.create({base:{flexDirection:"row",alignItems:"center",alignSelf:"flex-start",gap:4,borderWidth:1,borderRadius:a.radius.sm,paddingHorizontal:6,paddingVertical:2},medium:{paddingHorizontal:8,paddingVertical:3},pill:{borderRadius:a.radius.pill,minWidth:20,justifyContent:"center"},text:{fontSize:10,fontWeight:"600",letterSpacing:.3},textMedium:{fontSize:12},textMono:{fontFamily:a.text.mono.fontFamily}});function x({status:e,color:s,size:o=8,style:r}){let l=s??(e?f(e):a.colors.textMuted);return t(c,{style:[{width:o,height:o,borderRadius:o/2,backgroundColor:l},r]})}i(x,"StatusDot");function b({label:e,value:s,copyable:o=false,style:r}){let l=typeof s=="string"||typeof s=="number";return g(c,{style:[u.row,r],children:[t(d,{style:u.label,numberOfLines:1,children:e}),t(c,{style:u.value,children:l?t(d,{style:u.valueText,numberOfLines:2,children:String(s)}):s}),o&&s!=null&&t(D,{value:s,size:12})]})}i(b,"InfoRow");var u=p.create({row:{flexDirection:"row",alignItems:"center",gap:a.spacing.sm,paddingVertical:3},label:{...a.text.label,color:a.colors.textMuted,minWidth:72},value:{flex:1,flexDirection:"row",alignItems:"center"},valueText:{...a.text.mono,color:a.colors.text}});function w({oldValue:e,newValue:s,mode:o="tree",showUnchanged:r=true,scrollEnabled:l=false,height:m=220}){return o==="text"?t(k,{oldValue:e,newValue:s,height:m}):t(M,{oldValue:e,newValue:s,showUnchanged:r,scrollEnabled:l})}i(w,"DiffViewer");import{ToolButton as P,CopyButton as L,PowerToggleButton as H}from"@buoy-gg/shared-ui/web";import{CompactRow as R,DevToolsCard as U}from"@buoy-gg/shared-ui/web";import{SectionHeader as z,CollapsibleSection as I,TabSelector as F,EmptyState as A,SearchBar as O,EventStepperFooter as j}from"@buoy-gg/shared-ui/web";import{DataViewer as W}from"@buoy-gg/shared-ui/web/dataViewer";import{BaseEventStore as q}from"@buoy-gg/shared-ui/web";import{RelativeTime as G}from"@buoy-gg/shared-ui/web";import{formatBytes as K,formatDuration as J,formatNumber as N,truncateMiddle as X,safeStringify as Y}from"@buoy-gg/shared-ui/web";import{usePersistedState as Z,persistentStorage as _,devToolsStorageKeys as $}from"@buoy-gg/shared-ui/web";import{useSafeAreaInsets as Q,copyToClipboard as aa}from"@buoy-gg/shared-ui/web";import{JsModal as ea}from"@buoy-gg/shared-ui/web";import{Activity as sa,AlertTriangle as oa,Bug as ra,Check as ta,CheckCircle as la,ChevronDown as ia,ChevronLeft as na,ChevronRight as ca,ChevronUp as ua,Clock as ma,Copy as da,Database as fa,Eye as pa,EyeOff as ga,FileJson as ha,FileText as ya,Filter as Ca,FlaskConical as xa,Globe as ba,Hash as wa,Info as Sa,Key as va,Layers as Ta,Lock as Da,Pause as Ma,Play as ka,Plus as Ba,Power as Ea,RefreshCw as Va,Search as Pa,Settings as La,Shield as Ha,Trash2 as Ra,User as Ua,Wifi as za,X as Ia,Zap as Fa,AlertCircle as Aa,BarChart3 as Oa,Bookmark as ja,Cloud as Wa,Download as qa,Edit3 as Ga,GitBranch as Ka,HardDrive as Ja,HelpCircle as Na,Home as Xa,Image as Ya,Link as Za,Maximize2 as _a,Minus as $a,Palette as Qa,Pin as ae,Route as ee,Server as se,Smartphone as oe,Square as re,CheckSquare as te,Timer as le,Unlock as ie,Upload as ne,Users as ce,XCircle as ue}from"@buoy-gg/shared-ui/web";export{f as a,h as b,y as c,C as d,x as e,b as f,w as g,T as h,P as i,L as j,H as k,R as l,U as m,z as n,I as o,F as p,A as q,O as r,j as s,W as t,q as u,G as v,K as w,J as x,N as y,X as z,Y as A,Z as B,_ as C,$ as D,Q as E,aa as F,ea as G,sa as H,oa as I,ra as J,ta as K,la as L,ia as M,na as N,ca as O,ua as P,ma as Q,da as R,fa as S,pa as T,ga as U,ha as V,ya as W,Ca as X,xa as Y,ba as Z,wa as _,Sa as $,va as aa,Ta as ba,Da as ca,Ma as da,ka as ea,Ba as fa,Ea as ga,Va as ha,Pa as ia,La as ja,Ha as ka,Ra as la,Ua as ma,za as na,Ia as oa,Fa as pa,Aa as qa,Oa as ra,ja as sa,Wa as ta,qa as ua,Ga as va,Ka as wa,Ja as xa,Na as ya,Xa as za,Ya as Aa,Za as Ba,_a as Ca,$a as Da,Qa as Ea,ae as Fa,ee as Ga,se as Ha,oe as Ia,re as Ja,te as Ka,le as La,ie as Ma,ne as Na,ce as Oa,ue as Pa};
1
+ "use client";import{a as c,b as m,g as ms,k as p}from"./chunk-Z6I7ZD34.mjs";import{a as i}from"./chunk-LOPXJLVB.mjs";import{toolTheme as T}from"@buoy-gg/shared-ui/web";import{CopyButton as D,toolTheme as a}from"@buoy-gg/shared-ui/web";import{TreeDiffViewer as M,SplitDiffViewer as k}from"@buoy-gg/shared-ui/web/dataViewer";import{jsx as t,jsxs as g}from"react/jsx-runtime";var B={success:a.colors.success,active:a.colors.success,connected:a.colors.success,error:a.colors.error,failed:a.colors.error,warning:a.colors.warning,stale:a.colors.warning,pending:a.colors.info,loading:a.colors.info,fetching:a.colors.info,info:a.colors.info,inactive:a.colors.textMuted,idle:a.colors.textMuted};function f(s){return B[s.toLowerCase()]??a.colors.textMuted}i(f,"statusColor");var E={GET:a.colors.info,POST:a.colors.success,PUT:a.colors.warning,PATCH:a.colors.warning,DELETE:a.colors.error};function h(s){return E[s.toUpperCase()]??a.colors.textSecondary}i(h,"methodColor");var V={string:a.colors.success,number:a.colors.info,boolean:a.colors.warning,object:a.colors.accent,array:a.colors.accent,function:a.colors.error,null:a.colors.textMuted,undefined:a.colors.textMuted};function y(s){return V[s.toLowerCase()]??a.colors.textSecondary}i(y,"typeColor");function C({children:s,color:e=a.colors.textSecondary,icon:o,size:r="small",pill:l=false,mono:d=false,style:S}){let v=typeof s=="string"||typeof s=="number";return g(c,{style:[n.base,r==="medium"&&n.medium,l&&n.pill,{backgroundColor:e+"1A",borderColor:e+"40"},S],children:[o,v?t(m,{style:[n.text,r==="medium"&&n.textMedium,d&&n.textMono,{color:e}],numberOfLines:1,children:s}):s]})}i(C,"Badge");var n=p.create({base:{flexDirection:"row",alignItems:"center",alignSelf:"flex-start",gap:4,borderWidth:1,borderRadius:a.radius.sm,paddingHorizontal:6,paddingVertical:2},medium:{paddingHorizontal:8,paddingVertical:3},pill:{borderRadius:a.radius.pill,minWidth:20,justifyContent:"center"},text:{fontSize:10,fontWeight:"600",letterSpacing:.3},textMedium:{fontSize:12},textMono:{fontFamily:a.text.mono.fontFamily}});function x({status:s,color:e,size:o=8,style:r}){let l=e??(s?f(s):a.colors.textMuted);return t(c,{style:[{width:o,height:o,borderRadius:o/2,backgroundColor:l},r]})}i(x,"StatusDot");function b({label:s,value:e,copyable:o=false,style:r}){let l=typeof e=="string"||typeof e=="number";return g(c,{style:[u.row,r],children:[t(m,{style:u.label,numberOfLines:1,children:s}),t(c,{style:u.value,children:l?t(m,{style:u.valueText,numberOfLines:2,children:String(e)}):e}),o&&e!=null&&t(D,{value:e,size:12})]})}i(b,"InfoRow");var u=p.create({row:{flexDirection:"row",alignItems:"center",gap:a.spacing.sm,paddingVertical:3},label:{...a.text.label,color:a.colors.textMuted,minWidth:72},value:{flex:1,flexDirection:"row",alignItems:"center"},valueText:{...a.text.mono,color:a.colors.text}});function w({oldValue:s,newValue:e,mode:o="tree",showUnchanged:r=true,scrollEnabled:l=false,height:d=220}){return o==="text"?t(k,{oldValue:s,newValue:e,height:d}):t(M,{oldValue:s,newValue:e,showUnchanged:r,scrollEnabled:l})}i(w,"DiffViewer");import{ToolButton as P,CopyButton as L,PowerToggleButton as z}from"@buoy-gg/shared-ui/web";import{CompactRow as H,DevToolsCard as R}from"@buoy-gg/shared-ui/web";import{SectionHeader as U,CollapsibleSection as F,TabSelector as I,EmptyState as A,SearchBar as O,EventStepperFooter as j}from"@buoy-gg/shared-ui/web";import{DataViewer as W}from"@buoy-gg/shared-ui/web/dataViewer";import{BaseEventStore as G}from"@buoy-gg/shared-ui/web";import{RelativeTime as q}from"@buoy-gg/shared-ui/web";import{formatBytes as J,formatDuration as K,formatNumber as N,truncateMiddle as X,safeStringify as Z}from"@buoy-gg/shared-ui/web";import{usePersistedState as Q,persistentStorage as Y,devToolsStorageKeys as _}from"@buoy-gg/shared-ui/web";import{useSafeAreaInsets as $,copyToClipboard as aa}from"@buoy-gg/shared-ui/web";import{JsModal as sa}from"@buoy-gg/shared-ui/web";import{Activity as ea,AlertTriangle as oa,Bug as ra,Check as ta,CheckCircle as la,ChevronDown as ia,ChevronLeft as na,ChevronRight as ca,ChevronUp as ua,Clock as da,Copy as ma,Database as fa,Eye as pa,EyeOff as ga,FileJson as ha,FileText as ya,Filter as Ca,FlaskConical as xa,Globe as ba,Hash as wa,Info as Sa,Key as va,Layers as Ta,Lock as Da,Pause as Ma,Play as ka,Plus as Ba,Power as Ea,RefreshCw as Va,Search as Pa,Settings as La,Shield as za,Trash2 as Ha,User as Ra,Wifi as Ua,X as Fa,Zap as Ia,AlertCircle as Aa,BarChart3 as Oa,Bookmark as ja,Cloud as Wa,Download as Ga,Edit3 as qa,GitBranch as Ja,HardDrive as Ka,HelpCircle as Na,Home as Xa,Image as Za,Link as Qa,Maximize2 as Ya,Minus as _a,Palette as $a,Pin as as,Route as ss,Server as es,Smartphone as os,Square as rs,CheckSquare as ts,Timer as ls,Unlock as is,Upload as ns,Users as cs,XCircle as us}from"@buoy-gg/shared-ui/web";export{f as a,h as b,y as c,C as d,x as e,b as f,w as g,T as h,P as i,L as j,z as k,H as l,R as m,U as n,F as o,I as p,A as q,O as r,j as s,W as t,G as u,q as v,J as w,K as x,N as y,X as z,Z as A,Q as B,Y as C,_ as D,$ as E,aa as F,sa as G,ea as H,oa as I,ra as J,ta as K,la as L,ia as M,na as N,ca as O,ua as P,da as Q,ma as R,fa as S,pa as T,ga as U,ha as V,ya as W,Ca as X,xa as Y,ba as Z,wa as _,Sa as $,va as aa,Ta as ba,Da as ca,Ma as da,ka as ea,Ba as fa,Ea as ga,Va as ha,Pa as ia,La as ja,za as ka,Ha as la,Ra as ma,Ua as na,Fa as oa,Ia as pa,Aa as qa,Oa as ra,ja as sa,Wa as ta,Ga as ua,qa as va,Ja as wa,Ka as xa,Na as ya,Xa as za,Za as Aa,Qa as Ba,Ya as Ca,_a as Da,$a as Ea,as as Fa,ss as Ga,es as Ha,os as Ia,rs as Ja,ts as Ka,ls as La,is as Ma,ns as Na,cs as Oa,us as Pa};
@@ -0,0 +1 @@
1
+ "use client";import{a as p,b as c,c as d,i as de}from"./chunk-C6HZO5XT.mjs";import{a as i}from"./chunk-LOPXJLVB.mjs";import{toolTheme as T}from"@buoy-gg/shared-ui/web";import{CopyButton as D,toolTheme as a}from"@buoy-gg/shared-ui/web";import{TreeDiffViewer as M,SplitDiffViewer as B}from"@buoy-gg/shared-ui/web/dataViewer";import{jsx as t,jsxs as g}from"react/jsx-runtime";var E={success:a.colors.success,active:a.colors.success,connected:a.colors.success,error:a.colors.error,failed:a.colors.error,warning:a.colors.warning,stale:a.colors.warning,pending:a.colors.info,loading:a.colors.info,fetching:a.colors.info,info:a.colors.info,inactive:a.colors.textMuted,idle:a.colors.textMuted};function f(e){return E[e.toLowerCase()]??a.colors.textMuted}i(f,"statusColor");var k={GET:a.colors.info,POST:a.colors.success,PUT:a.colors.warning,PATCH:a.colors.warning,DELETE:a.colors.error};function h(e){return k[e.toUpperCase()]??a.colors.textSecondary}i(h,"methodColor");var V={string:a.colors.success,number:a.colors.info,boolean:a.colors.warning,object:a.colors.accent,array:a.colors.accent,function:a.colors.error,null:a.colors.textMuted,undefined:a.colors.textMuted};function y(e){return V[e.toLowerCase()]??a.colors.textSecondary}i(y,"typeColor");function C({children:e,color:s=a.colors.textSecondary,icon:o,size:r="small",pill:l=false,mono:m=false,style:S}){let v=typeof e=="string"||typeof e=="number";return g(c,{style:[n.base,r==="medium"&&n.medium,l&&n.pill,{backgroundColor:s+"1A",borderColor:s+"40"},S],children:[o,v?t(d,{style:[n.text,r==="medium"&&n.textMedium,m&&n.textMono,{color:s}],numberOfLines:1,children:e}):e]})}i(C,"Badge");var n=p.create({base:{flexDirection:"row",alignItems:"center",alignSelf:"flex-start",gap:4,borderWidth:1,borderRadius:a.radius.sm,paddingHorizontal:6,paddingVertical:2},medium:{paddingHorizontal:8,paddingVertical:3},pill:{borderRadius:a.radius.pill,minWidth:20,justifyContent:"center"},text:{fontSize:10,fontWeight:"600",letterSpacing:.3},textMedium:{fontSize:12},textMono:{fontFamily:a.text.mono.fontFamily}});function x({status:e,color:s,size:o=8,style:r}){let l=s??(e?f(e):a.colors.textMuted);return t(c,{style:[{width:o,height:o,borderRadius:o/2,backgroundColor:l},r]})}i(x,"StatusDot");function b({label:e,value:s,copyable:o=false,style:r}){let l=typeof s=="string"||typeof s=="number";return g(c,{style:[u.row,r],children:[t(d,{style:u.label,numberOfLines:1,children:e}),t(c,{style:u.value,children:l?t(d,{style:u.valueText,numberOfLines:2,children:String(s)}):s}),o&&s!=null&&t(D,{value:s,size:12})]})}i(b,"InfoRow");var u=p.create({row:{flexDirection:"row",alignItems:"center",gap:a.spacing.sm,paddingVertical:3},label:{...a.text.label,color:a.colors.textMuted,minWidth:72},value:{flex:1,flexDirection:"row",alignItems:"center"},valueText:{...a.text.mono,color:a.colors.text}});function w({oldValue:e,newValue:s,mode:o="tree",showUnchanged:r=true,scrollEnabled:l=false,height:m=220}){return o==="text"?t(B,{oldValue:e,newValue:s,height:m}):t(M,{oldValue:e,newValue:s,showUnchanged:r,scrollEnabled:l})}i(w,"DiffViewer");import{ToolButton as P,CopyButton as L,PowerToggleButton as H}from"@buoy-gg/shared-ui/web";import{CompactRow as R,DevToolsCard as U}from"@buoy-gg/shared-ui/web";import{SectionHeader as z,CollapsibleSection as I,TabSelector as F,EmptyState as A,SearchBar as O,EventStepperFooter as j}from"@buoy-gg/shared-ui/web";import{DataViewer as W}from"@buoy-gg/shared-ui/web/dataViewer";import{BaseEventStore as q}from"@buoy-gg/shared-ui/web";import{RelativeTime as G}from"@buoy-gg/shared-ui/web";import{formatBytes as K,formatDuration as J,formatNumber as N,truncateMiddle as X,safeStringify as Y}from"@buoy-gg/shared-ui/web";import{usePersistedState as Z,persistentStorage as _,devToolsStorageKeys as $}from"@buoy-gg/shared-ui/web";import{useSafeAreaInsets as Q,copyToClipboard as aa}from"@buoy-gg/shared-ui/web";import{JsModal as ea}from"@buoy-gg/shared-ui/web";import{Activity as sa,AlertTriangle as oa,Bug as ra,Check as ta,CheckCircle as la,ChevronDown as ia,ChevronLeft as na,ChevronRight as ca,ChevronUp as ua,Clock as ma,Copy as da,Database as fa,Eye as pa,EyeOff as ga,FileJson as ha,FileText as ya,Filter as Ca,FlaskConical as xa,Globe as ba,Hash as wa,Info as Sa,Key as va,Layers as Ta,Lock as Da,Pause as Ma,Play as Ba,Plus as Ea,Power as ka,RefreshCw as Va,Search as Pa,Settings as La,Shield as Ha,Trash2 as Ra,User as Ua,Wifi as za,X as Ia,Zap as Fa,AlertCircle as Aa,BarChart3 as Oa,Bookmark as ja,Cloud as Wa,Download as qa,Edit3 as Ga,GitBranch as Ka,HardDrive as Ja,HelpCircle as Na,Home as Xa,Image as Ya,Link as Za,Maximize2 as _a,Minus as $a,Palette as Qa,Pin as ae,Route as ee,Server as se,Smartphone as oe,Square as re,CheckSquare as te,Timer as le,Unlock as ie,Upload as ne,Users as ce,XCircle as ue}from"@buoy-gg/shared-ui/web";export{f as a,h as b,y as c,C as d,x as e,b as f,w as g,T as h,P as i,L as j,H as k,R as l,U as m,z as n,I as o,F as p,A as q,O as r,j as s,W as t,q as u,G as v,K as w,J as x,N as y,X as z,Y as A,Z as B,_ as C,$ as D,Q as E,aa as F,ea as G,sa as H,oa as I,ra as J,ta as K,la as L,ia as M,na as N,ca as O,ua as P,ma as Q,da as R,fa as S,pa as T,ga as U,ha as V,ya as W,Ca as X,xa as Y,ba as Z,wa as _,Sa as $,va as aa,Ta as ba,Da as ca,Ma as da,Ba as ea,Ea as fa,ka as ga,Va as ha,Pa as ia,La as ja,Ha as ka,Ra as la,Ua as ma,za as na,Ia as oa,Fa as pa,Aa as qa,Oa as ra,ja as sa,Wa as ta,qa as ua,Ga as va,Ka as wa,Ja as xa,Na as ya,Xa as za,Ya as Aa,Za as Ba,_a as Ca,$a as Da,Qa as Ea,ae as Fa,ee as Ga,se as Ha,oe as Ia,re as Ja,te as Ka,le as La,ie as Ma,ne as Na,ce as Oa,ue as Pa};
@@ -1 +1 @@
1
- "use client";import{a as d,c as M,d as N}from"./chunk-LOPXJLVB.mjs";var f={};M(f,{AccessibilityInfo:()=>F,ActivityIndicator:()=>Me,Alert:()=>Re,Animated:()=>x,AppRegistry:()=>O,AppState:()=>j,Appearance:()=>D,BackHandler:()=>z,Button:()=>Ne,CheckBox:()=>ae,Clipboard:()=>W,DeviceEventEmitter:()=>he,Dimensions:()=>g,Easing:()=>$,FlatList:()=>ne,I18nManager:()=>U,Image:()=>oe,ImageBackground:()=>se,InteractionManager:()=>_,Keyboard:()=>Y,KeyboardAvoidingView:()=>ie,LayoutAnimation:()=>G,Linking:()=>q,LogBox:()=>ve,Modal:()=>K,NativeEventEmitter:()=>J,NativeModules:()=>H,PanResponder:()=>Q,Picker:()=>re,PixelRatio:()=>X,Platform:()=>E,Pressable:()=>B,ProgressBar:()=>le,RefreshControl:()=>de,SafeAreaView:()=>ce,ScrollView:()=>I,SectionList:()=>ue,Share:()=>Z,StatusBar:()=>pe,StyleSheet:()=>w,Switch:()=>Ke,Text:()=>C,TextInput:()=>Be,Touchable:()=>me,TouchableHighlight:()=>Ie,TouchableNativeFeedback:()=>ye,TouchableOpacity:()=>T,TouchableWithoutFeedback:()=>Pe,UIManager:()=>ee,Vibration:()=>te,View:()=>A,VirtualizedList:()=>be,YellowBox:()=>fe,findNodeHandle:()=>Ve,unstable_createElement:()=>R,useColorScheme:()=>xe,useLocaleContext:()=>ge,useWindowDimensions:()=>Ee});N(f,V);import*as V from"react-native-web";import{unstable_createElement as R,NativeModules as H,AccessibilityInfo as F,Animated as x,Appearance as D,AppRegistry as O,AppState as j,BackHandler as z,Clipboard as W,Dimensions as g,Easing as $,I18nManager as U,Keyboard as Y,InteractionManager as _,LayoutAnimation as G,Linking as q,NativeEventEmitter as J,PanResponder as Q,PixelRatio as X,Platform as E,Share as Z,StyleSheet as w,UIManager as ee,Vibration as te,CheckBox as ae,FlatList as ne,Image as oe,ImageBackground as se,KeyboardAvoidingView as ie,Picker as re,ProgressBar as le,RefreshControl as de,SafeAreaView as ce,SectionList as ue,StatusBar as pe,Touchable as me,TouchableNativeFeedback as ye,VirtualizedList as be,YellowBox as fe,LogBox as ve,DeviceEventEmitter as he,useColorScheme as xe,useLocaleContext as ge,useWindowDimensions as Ee}from"react-native-web";import*as c from"react-native-web";import{createElement as v,forwardRef as k,useCallback as we,useRef as ke}from"react";import{useEffect as Le,useState as Se}from"react";import{createPortal as Ae}from"react-dom";var Ce='-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif';import{jsx as Te}from"react/jsx-runtime";var y=Symbol.for("@buoy-gg/portal-host"),L=d(n=>{if(!(n instanceof Element))return false;if(n.closest("input, textarea, select"))return true;let e=n.closest("[contenteditable]")?.getAttribute("contenteditable")?.toLowerCase();return e===""||e==="true"||e==="plaintext-only"},"isTextField");function h(){let n=document;if(n[y])return n[y].host;let e=document.createElement("div");e.dataset.buoyPortalHost="",Object.assign(e.style,{position:"fixed",inset:"0",zIndex:"2147483647",pointerEvents:"none",fontFamily:Ce});let s=d(()=>{let t=document.fullscreenElement,b=t&&t.tagName!=="CANVAS"?t:document.body;e.parentElement!==b&&b.appendChild(e)},"move"),i=new Map,a=d(t=>{(!e.contains(t.target)||!L(t.target))&&i.set(t.code||t.key,{key:t.key,code:t.code,location:t.location,keyCode:t.keyCode,which:t.which,altKey:t.altKey,ctrlKey:t.ctrlKey,metaKey:t.metaKey,shiftKey:t.shiftKey})},"down"),o=d(t=>{i.delete(t.code||t.key)},"up"),p=d(()=>i.clear(),"clear"),m=d(()=>{let t=[...i.values()];i.clear();for(let b of t)document.dispatchEvent(new KeyboardEvent("keyup",{...b,bubbles:true}))},"focus"),r=d(t=>{L(t.target)&&t.stopPropagation()},"key"),l=d(t=>t.stopPropagation(),"wheel");return s(),document.addEventListener("fullscreenchange",s),document.addEventListener("keydown",a,true),document.addEventListener("keyup",o,true),window.addEventListener("blur",p),e.addEventListener("focusin",m),e.addEventListener("keydown",r),e.addEventListener("keyup",r),e.addEventListener("keypress",r),e.addEventListener("wheel",l,{passive:true}),n[y]={host:e,users:0,dispose:d(()=>{document.removeEventListener("fullscreenchange",s),document.removeEventListener("keydown",a,true),document.removeEventListener("keyup",o,true),window.removeEventListener("blur",p),e.remove(),delete n[y]},"dispose")},e}d(h,"getBuoyPortalHost");function S({children:n}){let[e,s]=Se(null);return Le(()=>{let i=h(),a=document[y];return a.users++,s(i),()=>{--a.users===0&&a.dispose()}},[]),e?Ae(Te("div",{"data-buoy-root":"",style:{display:"contents",pointerEvents:"auto"},children:n}),e):null}d(S,"BuoyPortal");function u(n){let e=k((i,a)=>{let{accessibilityState:o,accessibilityValue:p,...m}=i;for(let r of["busy","checked","disabled","expanded","selected"])o?.[r]!==void 0&&m[`aria-${r}`]===void 0&&(m[`aria-${r}`]=o[r]);for(let[r,l]of Object.entries({min:"valuemin",max:"valuemax",now:"valuenow",text:"valuetext"}))p?.[r]!==void 0&&m[`aria-${l}`]===void 0&&(m[`aria-${l}`]=p[r]);return v(n,{...m,ref:a})}),s=n.State;return s&&Object.assign(e,{State:s}),e.displayName=n.displayName??n.name??"NativeWebView",e}d(u,"withAccessibility");var A=u(c.View),C=u(c.Text),Be=u(c.TextInput),T=u(c.TouchableOpacity),Ie=u(c.TouchableHighlight),Pe=u(c.TouchableWithoutFeedback),B=u(c.Pressable),I=u(c.ScrollView),P=k((n,e)=>{let s=ke(null),i=we(a=>{if(a){let o=a;for(;o.parentElement&&o.parentElement!==document.body;)o=o.parentElement;o.parentElement===document.body&&(s.current=o,Object.assign(o.style,{position:"relative",zIndex:"2147483647",pointerEvents:"auto"}),h().appendChild(o))}else s.current&&(document.body.appendChild(s.current),s.current=null);typeof e=="function"?e(a):e&&(e.current=a)},[e]);return v(S,null,v(c.Modal,{...n,ref:i}))});P.displayName="Modal";var K=u(P),Ke=u(c.Switch),Me=u(c.ActivityIndicator),Ne=u(c.Button),Ve=c.findNodeHandle,Re={alert(n,e,s,i){if(typeof document>"u")return;let a=document.createElement("dialog");a.dataset.buoyRoot="",a.setAttribute("aria-label",n),a.style.cssText="position:fixed;inset:0;margin:auto;width:min(440px,90vw);padding:24px;border:1px solid #475569;border-radius:14px;background:#17212e;color:#f1f5f9;font:14px system-ui;box-shadow:0 20px 80px #0008;z-index:2147483647";let o=document.createElement("h2");if(o.textContent=n,o.style.cssText="font-size:18px;margin:0 0 12px",a.appendChild(o),e){let l=document.createElement("p");l.textContent=e,l.style.cssText="line-height:1.5;white-space:pre-wrap;margin:0 0 20px",a.appendChild(l)}let p=document.createElement("div");p.style.cssText="display:flex;justify-content:flex-end;flex-wrap:wrap;gap:8px";let m=s?.length?s:[{text:"OK"}],r=d(()=>{a.close?.(),a.remove()},"close");for(let l of m){let t=document.createElement("button");t.type="button",t.textContent=l.text??"OK",t.style.cssText=`padding:9px 14px;border:1px solid #64748b;border-radius:7px;color:white;background:${l.style==="destructive"?"#a52b38":"#283a4d"};cursor:pointer;font:inherit`,t.onclick=()=>{r(),l.onPress?.()},p.appendChild(t)}a.addEventListener("cancel",l=>{l.preventDefault(),i?.cancelable!==false&&(r(),i?.onDismiss?.())}),a.appendChild(p),document.body.appendChild(a),a.showModal?a.showModal():a.setAttribute("open","")}};export{A as a,C as b,T as c,B as d,I as e,K as f,f as g,x as h,g as i,E as j,w as k};
1
+ "use client";import{a as d,c as M,d as N}from"./chunk-LOPXJLVB.mjs";var f={};M(f,{AccessibilityInfo:()=>H,ActivityIndicator:()=>Me,Alert:()=>Re,Animated:()=>x,AppRegistry:()=>O,AppState:()=>j,Appearance:()=>D,BackHandler:()=>z,Button:()=>Ne,CheckBox:()=>ae,Clipboard:()=>W,DeviceEventEmitter:()=>ve,Dimensions:()=>g,Easing:()=>$,FlatList:()=>oe,I18nManager:()=>U,Image:()=>ne,ImageBackground:()=>se,InteractionManager:()=>_,Keyboard:()=>Y,KeyboardAvoidingView:()=>ie,LayoutAnimation:()=>q,Linking:()=>G,LogBox:()=>he,Modal:()=>K,NativeEventEmitter:()=>J,NativeModules:()=>F,PanResponder:()=>Q,Picker:()=>re,PixelRatio:()=>X,Platform:()=>E,Pressable:()=>B,ProgressBar:()=>le,RefreshControl:()=>de,SafeAreaView:()=>ce,ScrollView:()=>I,SectionList:()=>ue,Share:()=>Z,StatusBar:()=>pe,StyleSheet:()=>w,Switch:()=>Ke,Text:()=>C,TextInput:()=>Be,Touchable:()=>me,TouchableHighlight:()=>Ie,TouchableNativeFeedback:()=>ye,TouchableOpacity:()=>T,TouchableWithoutFeedback:()=>Pe,UIManager:()=>ee,Vibration:()=>te,View:()=>A,VirtualizedList:()=>be,YellowBox:()=>fe,findNodeHandle:()=>Ve,unstable_createElement:()=>R,useColorScheme:()=>xe,useLocaleContext:()=>ge,useWindowDimensions:()=>Ee});N(f,V);import*as V from"react-native-web";import{unstable_createElement as R,NativeModules as F,AccessibilityInfo as H,Animated as x,Appearance as D,AppRegistry as O,AppState as j,BackHandler as z,Clipboard as W,Dimensions as g,Easing as $,I18nManager as U,Keyboard as Y,InteractionManager as _,LayoutAnimation as q,Linking as G,NativeEventEmitter as J,PanResponder as Q,PixelRatio as X,Platform as E,Share as Z,StyleSheet as w,UIManager as ee,Vibration as te,CheckBox as ae,FlatList as oe,Image as ne,ImageBackground as se,KeyboardAvoidingView as ie,Picker as re,ProgressBar as le,RefreshControl as de,SafeAreaView as ce,SectionList as ue,StatusBar as pe,Touchable as me,TouchableNativeFeedback as ye,VirtualizedList as be,YellowBox as fe,LogBox as he,DeviceEventEmitter as ve,useColorScheme as xe,useLocaleContext as ge,useWindowDimensions as Ee}from"react-native-web";import*as c from"react-native-web";import{createElement as h,forwardRef as k,useCallback as we,useRef as ke}from"react";import{useEffect as Le,useState as Se}from"react";import{createPortal as Ae}from"react-dom";var Ce='-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif';import{jsx as Te}from"react/jsx-runtime";var y=Symbol.for("@buoy-gg/portal-host"),L=d(o=>{if(!(o instanceof Element))return false;if(o.closest("input, textarea, select"))return true;let e=o.closest("[contenteditable]")?.getAttribute("contenteditable")?.toLowerCase();return e===""||e==="true"||e==="plaintext-only"},"isTextField");function v(){let o=document;if(o[y])return o[y].host;let e=document.createElement("div");e.dataset.buoyPortalHost="",Object.assign(e.style,{position:"fixed",inset:"0",zIndex:"2147483647",pointerEvents:"none",fontFamily:Ce});let s=d(()=>{let t=document.fullscreenElement,b=t&&t.tagName!=="CANVAS"?t:document.body;e.parentElement!==b&&b.appendChild(e)},"move"),i=new Map,a=d(t=>{(!e.contains(t.target)||!L(t.target))&&i.set(t.code||t.key,{key:t.key,code:t.code,location:t.location,keyCode:t.keyCode,which:t.which,altKey:t.altKey,ctrlKey:t.ctrlKey,metaKey:t.metaKey,shiftKey:t.shiftKey})},"down"),n=d(t=>{i.delete(t.code||t.key)},"up"),p=d(()=>i.clear(),"clear"),m=d(()=>{let t=[...i.values()];i.clear();for(let b of t)document.dispatchEvent(new KeyboardEvent("keyup",{...b,bubbles:true}))},"focus"),r=d(t=>{L(t.target)&&t.stopPropagation()},"key"),l=d(t=>t.stopPropagation(),"wheel");return s(),document.addEventListener("fullscreenchange",s),document.addEventListener("keydown",a,true),document.addEventListener("keyup",n,true),window.addEventListener("blur",p),e.addEventListener("focusin",m),e.addEventListener("keydown",r),e.addEventListener("keyup",r),e.addEventListener("keypress",r),e.addEventListener("wheel",l,{passive:true}),o[y]={host:e,users:0,dispose:d(()=>{document.removeEventListener("fullscreenchange",s),document.removeEventListener("keydown",a,true),document.removeEventListener("keyup",n,true),window.removeEventListener("blur",p),e.remove(),delete o[y]},"dispose")},e}d(v,"getBuoyPortalHost");function S({children:o}){let[e,s]=Se(null);return Le(()=>{let i=v(),a=document[y];return a.users++,s(i),()=>{--a.users===0&&a.dispose()}},[]),e?Ae(Te("div",{"data-buoy-root":"",style:{display:"contents",pointerEvents:"auto"},children:o}),e):null}d(S,"BuoyPortal");function u(o){let e=k((i,a)=>{let{accessibilityState:n,accessibilityValue:p,...m}=i;for(let r of["busy","checked","disabled","expanded","selected"])n?.[r]!==void 0&&m[`aria-${r}`]===void 0&&(m[`aria-${r}`]=n[r]);for(let[r,l]of Object.entries({min:"valuemin",max:"valuemax",now:"valuenow",text:"valuetext"}))p?.[r]!==void 0&&m[`aria-${l}`]===void 0&&(m[`aria-${l}`]=p[r]);return h(o,{...m,ref:a})}),s=o.State;return s&&Object.assign(e,{State:s}),e.displayName=o.displayName??o.name??"NativeWebView",e}d(u,"withAccessibility");var A=u(c.View),C=u(c.Text),Be=u(c.TextInput),T=u(c.TouchableOpacity),Ie=u(c.TouchableHighlight),Pe=u(c.TouchableWithoutFeedback),B=u(c.Pressable),I=u(c.ScrollView),P=k((o,e)=>{let s=ke(null),i=we(a=>{if(a){let n=a;for(;n.parentElement&&n.parentElement!==document.body;)n=n.parentElement;n.parentElement===document.body&&(s.current=n,Object.assign(n.style,{position:"relative",zIndex:"2147483647",pointerEvents:"auto"}),v().appendChild(n))}else s.current&&(document.body.appendChild(s.current),s.current=null);typeof e=="function"?e(a):e&&(e.current=a)},[e]);return h(S,null,h(c.Modal,{...o,ref:i}))});P.displayName="Modal";var K=u(P),Ke=u(c.Switch),Me=u(c.ActivityIndicator),Ne=u(c.Button),Ve=c.findNodeHandle,Re={alert(o,e,s,i){if(typeof document>"u")return;let a=document.createElement("dialog");a.dataset.buoyRoot="",a.setAttribute("aria-label",o),a.style.cssText="position:fixed;inset:0;margin:auto;width:min(440px,90vw);padding:24px;border:1px solid #475569;border-radius:14px;background:#17212e;color:#f1f5f9;font:14px system-ui;box-shadow:0 20px 80px #0008;z-index:2147483647";let n=document.createElement("h2");if(n.textContent=o,n.style.cssText="font-size:18px;margin:0 0 12px",a.appendChild(n),e){let l=document.createElement("p");l.textContent=e,l.style.cssText="line-height:1.5;white-space:pre-wrap;margin:0 0 20px",a.appendChild(l)}let p=document.createElement("div");p.style.cssText="display:flex;justify-content:flex-end;flex-wrap:wrap;gap:8px";let m=s?.length?s:[{text:"OK"}],r=d(()=>{a.close?.(),a.remove()},"close");for(let l of m){let t=document.createElement("button");t.type="button",t.textContent=l.text??"OK",t.style.cssText=`padding:9px 14px;border:1px solid #64748b;border-radius:7px;color:white;background:${l.style==="destructive"?"#a52b38":"#283a4d"};cursor:pointer;font:inherit`,t.onclick=()=>{r(),l.onPress?.()},p.appendChild(t)}a.addEventListener("cancel",l=>{l.preventDefault(),i?.cancelable!==false&&(r(),i?.onDismiss?.())}),a.appendChild(p),document.body.appendChild(a),a.showModal?a.showModal():a.setAttribute("open","")}};export{A as a,C as b,T as c,B as d,I as e,K as f,f as g,x as h,g as i,E as j,w as k};
package/lib/web/index.mjs CHANGED
@@ -1 +1 @@
1
- "use client";import{a as m,b as d,c,d as p,e as C,f as g,g as y,h as f,i as S,j as T,k as v,l as h,m as b,n as D,o as B,p as P,q as k,r as w,s as E,t as H,u as M,v as i}from"./chunks/chunk-LU4GPZ5L.mjs";import{$ as A,A as F,Aa as L,B as R,Ba as q,C as x,Ca as I,D as U,Da as W,E as j,Ea as J,F as K,Fa as O,G as V,Ga as G,H as X,Ha as z,I as N,Ia as Q,J as Z,Ja as Y,K as _,Ka as $,L as aa,La as sa,M as ea,Ma as oa,N as ta,Na as ra,O as la,Oa as ia,P as na,Pa as ua,Q as ma,R as da,S as ca,T as pa,U as Ca,V as ga,W as ya,X as fa,Y as Sa,Z as Ta,_ as va,a as ha,aa as ba,b as Da,ba as Ba,c as Pa,ca as ka,d as wa,da as Ea,e as Ha,ea as Ma,f as Aa,fa as Fa,g as La,ga as Ra,h as qa,ha as xa,i as Ia,ia as Ua,j as Wa,ja,k as Ja,ka as Ka,l as Oa,la as Va,m as Ga,ma as Xa,n as za,na as Na,o as Qa,oa as Za,p as Ya,pa as _a,q as $a,qa as as,r as ss,ra as es,s as os,sa as ts,t as rs,ta as ls,u as is,ua as ns,v as us,va as ms,w as ds,wa as cs,x as ps,xa as Cs,y as gs,ya as ys,z as fs,za as Ss}from"./chunks/chunk-RBPDZUHO.mjs";import"./chunks/chunk-Z6I7ZD34.mjs";import{c as Ts}from"./chunks/chunk-D2FYORGY.mjs";import{a as vs}from"./chunks/chunk-LOPXJLVB.mjs";import{useSettings as hs,useFloatingTools as bs,getToolLabel as Ds,getToolDescription as Bs,getToolColor as Ps,settingsColors as ks,settingsStyles as ws,dialColors as Es,dialStyles as Hs}from"@buoy-gg/floating-tools-react/web";import{LicenseManager as Ms}from"@buoy-gg/license/web";import{createRoot as As}from"react-dom/client";import{createElement as Fs}from"react";import{installedTools as Ls}from"@buoy-gg/core/web/installed-tools";import{jsx as Rs}from"react/jsx-runtime";function n({queryClient:s,...e}={}){let o=Object.values(e.modules??Ls).find(u=>u.QueryClientProvider)?.QueryClientProvider;if(s&&!o)throw new Error("Add the react-query tool to modules to use queryClient.");let a=document.createElement("div");a.dataset.buoyMount="",document.body.appendChild(a);let t=As(a),r=Rs(i,{...e});t.render(s?Fs(o,{client:s},r):r);let l=true;return()=>{l&&(l=false,t.unmount(),a.remove())}}vs(n,"mountBuoy");export{X as Activity,as as AlertCircle,N as AlertTriangle,D as AppHostProvider,P as AppOverlay,wa as Badge,es as BarChart3,is as BaseEventStore,ts as Bookmark,Z as Bug,Ia as Button,Ga as Card,_ as Check,aa as CheckCircle,$ as CheckSquare,ea as ChevronDown,ta as ChevronLeft,la as ChevronRight,na as ChevronUp,ma as Clock,ls as Cloud,Qa as CollapsibleSection,da as Copy,Wa as CopyButton,rs as DataViewer,ca as Database,w as DevToolsVisibilityProvider,S as DialMenu,La as DiffViewer,y as Divider,ns as Download,ms as Edit3,$a as EmptyState,os as EventStepperFooter,pa as Eye,Ca as EyeOff,ga as FileJson,ya as FileText,fa as Filter,Sa as FlaskConical,i as FloatingDevTools,g as FloatingTools,cs as GitBranch,Ta as Globe,Cs as HardDrive,va as Hash,ys as HelpCircle,Ss as Home,L as Image,A as Info,Aa as InfoRow,V as JsModal,ba as Key,Ba as Layers,Ms as LicenseManager,q as Link,ka as Lock,I as Maximize2,W as Minus,J as Palette,Ea as Pause,O as Pin,Ma as Play,Fa as Plus,Ra as Power,Ja as PowerToggle,xa as RefreshCw,us as RelativeTime,G as Route,Oa as Row,Ua as Search,ss as SearchBar,za as SectionHeader,z as Server,ja as Settings,T as SettingsModal,Ka as Shield,Q as Smartphone,Y as Square,Ha as StatusDot,Ya as TabSelector,sa as Timer,Va as Trash2,oa as Unlock,ra as Upload,Xa as User,f as UserStatus,ia as Users,Na as Wifi,Za as X,ua as XCircle,_a as Zap,M as appSyncAdapter,d as autoDiscoverWebPresets,c as autoDiscoverWithCustom,Ts as clearReleaseOptIn,K as copyToClipboard,k as createWebTool,H as createWebTools,m as defaultToolPresets,U as devToolsStorageKeys,Es as dialColors,Hs as dialStyles,ds as formatBytes,ps as formatDuration,gs as formatNumber,C as getEnabledTools,Ps as getToolColor,Bs as getToolDescription,Ds as getToolLabel,p as getToolsBySlot,b as isBuoyHoldingBackButton,Da as methodColor,n as mountBuoy,x as persistentStorage,F as safeStringify,ks as settingsColors,ws as settingsStyles,ha as statusColor,qa as toolTheme,fs as truncateMiddle,Pa as typeColor,B as useAppHost,E as useDevToolsVisibility,bs as useFloatingTools,R as usePersistedState,j as useSafeAreaInsets,hs as useSettings,h as useToolHeader,v as useToolHost};
1
+ "use client";import{a as m,b as d,c,d as p,e as C,f as g,g as y,h as f,i as S,j as T,k as v,l as h,m as b,n as D,o as B,p as P,q as k,r as w,s as E,t as H,u as M,v as i}from"./chunks/chunk-2N5IPIMV.mjs";import{$ as A,A as F,Aa as L,B as R,Ba as q,C as x,Ca as I,D as U,Da as W,E as j,Ea as J,F as K,Fa as O,G as V,Ga as G,H as X,Ha as z,I as N,Ia as Q,J as Z,Ja as Y,K as _,Ka as $,L as aa,La as sa,M as ea,Ma as oa,N as ta,Na as ra,O as la,Oa as ia,P as na,Pa as ua,Q as ma,R as da,S as ca,T as pa,U as Ca,V as ga,W as ya,X as fa,Y as Sa,Z as Ta,_ as va,a as ha,aa as ba,b as Da,ba as Ba,c as Pa,ca as ka,d as wa,da as Ea,e as Ha,ea as Ma,f as Aa,fa as Fa,g as La,ga as Ra,h as qa,ha as xa,i as Ia,ia as Ua,j as Wa,ja,k as Ja,ka as Ka,l as Oa,la as Va,m as Ga,ma as Xa,n as za,na as Na,o as Qa,oa as Za,p as Ya,pa as _a,q as $a,qa as as,r as ss,ra as es,s as os,sa as ts,t as rs,ta as ls,u as is,ua as ns,v as us,va as ms,w as ds,wa as cs,x as ps,xa as Cs,y as gs,ya as ys,z as fs,za as Ss}from"./chunks/chunk-V4BVRDHL.mjs";import"./chunks/chunk-C6HZO5XT.mjs";import{c as Ts}from"./chunks/chunk-D2FYORGY.mjs";import{a as vs}from"./chunks/chunk-LOPXJLVB.mjs";import{useSettings as hs,useFloatingTools as bs,getToolLabel as Ds,getToolDescription as Bs,getToolColor as Ps,settingsColors as ks,settingsStyles as ws,dialColors as Es,dialStyles as Hs}from"@buoy-gg/floating-tools-react/web";import{LicenseManager as Ms}from"@buoy-gg/license/web";import{createRoot as As}from"react-dom/client";import{createElement as Fs}from"react";import{installedTools as Ls}from"@buoy-gg/core/web/installed-tools";import{jsx as Rs}from"react/jsx-runtime";function n({queryClient:s,...e}={}){let o=Object.values(e.modules??Ls).find(u=>u.QueryClientProvider)?.QueryClientProvider;if(s&&!o)throw new Error("Add the react-query tool to modules to use queryClient.");let a=document.createElement("div");a.dataset.buoyMount="",document.body.appendChild(a);let t=As(a),r=Rs(i,{...e});t.render(s?Fs(o,{client:s},r):r);let l=true;return()=>{l&&(l=false,t.unmount(),a.remove())}}vs(n,"mountBuoy");export{X as Activity,as as AlertCircle,N as AlertTriangle,D as AppHostProvider,P as AppOverlay,wa as Badge,es as BarChart3,is as BaseEventStore,ts as Bookmark,Z as Bug,Ia as Button,Ga as Card,_ as Check,aa as CheckCircle,$ as CheckSquare,ea as ChevronDown,ta as ChevronLeft,la as ChevronRight,na as ChevronUp,ma as Clock,ls as Cloud,Qa as CollapsibleSection,da as Copy,Wa as CopyButton,rs as DataViewer,ca as Database,w as DevToolsVisibilityProvider,S as DialMenu,La as DiffViewer,y as Divider,ns as Download,ms as Edit3,$a as EmptyState,os as EventStepperFooter,pa as Eye,Ca as EyeOff,ga as FileJson,ya as FileText,fa as Filter,Sa as FlaskConical,i as FloatingDevTools,g as FloatingTools,cs as GitBranch,Ta as Globe,Cs as HardDrive,va as Hash,ys as HelpCircle,Ss as Home,L as Image,A as Info,Aa as InfoRow,V as JsModal,ba as Key,Ba as Layers,Ms as LicenseManager,q as Link,ka as Lock,I as Maximize2,W as Minus,J as Palette,Ea as Pause,O as Pin,Ma as Play,Fa as Plus,Ra as Power,Ja as PowerToggle,xa as RefreshCw,us as RelativeTime,G as Route,Oa as Row,Ua as Search,ss as SearchBar,za as SectionHeader,z as Server,ja as Settings,T as SettingsModal,Ka as Shield,Q as Smartphone,Y as Square,Ha as StatusDot,Ya as TabSelector,sa as Timer,Va as Trash2,oa as Unlock,ra as Upload,Xa as User,f as UserStatus,ia as Users,Na as Wifi,Za as X,ua as XCircle,_a as Zap,M as appSyncAdapter,d as autoDiscoverWebPresets,c as autoDiscoverWithCustom,Ts as clearReleaseOptIn,K as copyToClipboard,k as createWebTool,H as createWebTools,m as defaultToolPresets,U as devToolsStorageKeys,Es as dialColors,Hs as dialStyles,ds as formatBytes,ps as formatDuration,gs as formatNumber,C as getEnabledTools,Ps as getToolColor,Bs as getToolDescription,Ds as getToolLabel,p as getToolsBySlot,b as isBuoyHoldingBackButton,Da as methodColor,n as mountBuoy,x as persistentStorage,F as safeStringify,ks as settingsColors,ws as settingsStyles,ha as statusColor,qa as toolTheme,fs as truncateMiddle,Pa as typeColor,B as useAppHost,E as useDevToolsVisibility,bs as useFloatingTools,R as usePersistedState,j as useSafeAreaInsets,hs as useSettings,h as useToolHeader,v as useToolHost};
@@ -1 +1 @@
1
- "use client";import{$ as a,A as s,Aa as e,B as o,Ba as t,C as r,Ca as i,D as l,Da as n,E as C,Ea as c,F as h,Fa as p,G as S,Ga as m,H as u,Ha as d,I as f,Ia as y,J as g,Ja as v,K as k,Ka as B,L as w,La as T,M as D,Ma as P,N as b,Na as E,O as F,Oa as H,P as R,Pa as A,Q as I,R as L,S as M,T as U,U as x,V as q,W as G,X as J,Y as K,Z as z,_ as N,a as O,aa as V,b as X,ba as j,c as W,ca as Z,d as Q,da as Y,e as _,ea as $,f as aa,fa as sa,g as ea,ga as oa,h as ta,ha as ra,i as ia,ia as la,j as na,ja as Ca,k as ca,ka as ha,l as pa,la as Sa,m as ma,ma as ua,n as da,na as fa,o as ya,oa as ga,p as va,pa as ka,q as Ba,qa as wa,r as Ta,ra as Da,s as Pa,sa as ba,t as Ea,ta as Fa,u as Ha,ua as Ra,v as Aa,va as Ia,w as La,wa as Ma,x as Ua,xa,y as qa,ya as Ga,z as Ja,za as Ka}from"./chunks/chunk-RBPDZUHO.mjs";import"./chunks/chunk-Z6I7ZD34.mjs";import"./chunks/chunk-LOPXJLVB.mjs";export{u as Activity,wa as AlertCircle,f as AlertTriangle,Q as Badge,Da as BarChart3,Ha as BaseEventStore,ba as Bookmark,g as Bug,ia as Button,ma as Card,k as Check,w as CheckCircle,B as CheckSquare,D as ChevronDown,b as ChevronLeft,F as ChevronRight,R as ChevronUp,I as Clock,Fa as Cloud,ya as CollapsibleSection,L as Copy,na as CopyButton,Ea as DataViewer,M as Database,ea as DiffViewer,Ra as Download,Ia as Edit3,Ba as EmptyState,Pa as EventStepperFooter,U as Eye,x as EyeOff,q as FileJson,G as FileText,J as Filter,K as FlaskConical,Ma as GitBranch,z as Globe,xa as HardDrive,N as Hash,Ga as HelpCircle,Ka as Home,e as Image,a as Info,aa as InfoRow,S as JsModal,V as Key,j as Layers,t as Link,Z as Lock,i as Maximize2,n as Minus,c as Palette,Y as Pause,p as Pin,$ as Play,sa as Plus,oa as Power,ca as PowerToggle,ra as RefreshCw,Aa as RelativeTime,m as Route,pa as Row,la as Search,Ta as SearchBar,da as SectionHeader,d as Server,Ca as Settings,ha as Shield,y as Smartphone,v as Square,_ as StatusDot,va as TabSelector,T as Timer,Sa as Trash2,P as Unlock,E as Upload,ua as User,H as Users,fa as Wifi,ga as X,A as XCircle,ka as Zap,h as copyToClipboard,l as devToolsStorageKeys,La as formatBytes,Ua as formatDuration,qa as formatNumber,X as methodColor,r as persistentStorage,s as safeStringify,O as statusColor,ta as toolTheme,Ja as truncateMiddle,W as typeColor,o as usePersistedState,C as useSafeAreaInsets};
1
+ "use client";import{$ as a,A as s,Aa as e,B as o,Ba as t,C as r,Ca as i,D as l,Da as n,E as C,Ea as c,F as h,Fa as p,G as S,Ga as m,H as u,Ha as d,I as f,Ia as y,J as g,Ja as v,K as k,Ka as B,L as w,La as T,M as D,Ma as P,N as b,Na as E,O as F,Oa as H,P as R,Pa as A,Q as I,R as L,S as M,T as U,U as x,V as q,W as G,X as J,Y as K,Z as z,_ as N,a as O,aa as V,b as X,ba as j,c as W,ca as Z,d as Q,da as Y,e as _,ea as $,f as aa,fa as sa,g as ea,ga as oa,h as ta,ha as ra,i as ia,ia as la,j as na,ja as Ca,k as ca,ka as ha,l as pa,la as Sa,m as ma,ma as ua,n as da,na as fa,o as ya,oa as ga,p as va,pa as ka,q as Ba,qa as wa,r as Ta,ra as Da,s as Pa,sa as ba,t as Ea,ta as Fa,u as Ha,ua as Ra,v as Aa,va as Ia,w as La,wa as Ma,x as Ua,xa,y as qa,ya as Ga,z as Ja,za as Ka}from"./chunks/chunk-V4BVRDHL.mjs";import"./chunks/chunk-C6HZO5XT.mjs";import"./chunks/chunk-LOPXJLVB.mjs";export{u as Activity,wa as AlertCircle,f as AlertTriangle,Q as Badge,Da as BarChart3,Ha as BaseEventStore,ba as Bookmark,g as Bug,ia as Button,ma as Card,k as Check,w as CheckCircle,B as CheckSquare,D as ChevronDown,b as ChevronLeft,F as ChevronRight,R as ChevronUp,I as Clock,Fa as Cloud,ya as CollapsibleSection,L as Copy,na as CopyButton,Ea as DataViewer,M as Database,ea as DiffViewer,Ra as Download,Ia as Edit3,Ba as EmptyState,Pa as EventStepperFooter,U as Eye,x as EyeOff,q as FileJson,G as FileText,J as Filter,K as FlaskConical,Ma as GitBranch,z as Globe,xa as HardDrive,N as Hash,Ga as HelpCircle,Ka as Home,e as Image,a as Info,aa as InfoRow,S as JsModal,V as Key,j as Layers,t as Link,Z as Lock,i as Maximize2,n as Minus,c as Palette,Y as Pause,p as Pin,$ as Play,sa as Plus,oa as Power,ca as PowerToggle,ra as RefreshCw,Aa as RelativeTime,m as Route,pa as Row,la as Search,Ta as SearchBar,da as SectionHeader,d as Server,Ca as Settings,ha as Shield,y as Smartphone,v as Square,_ as StatusDot,va as TabSelector,T as Timer,Sa as Trash2,P as Unlock,E as Upload,ua as User,H as Users,fa as Wifi,ga as X,A as XCircle,ka as Zap,h as copyToClipboard,l as devToolsStorageKeys,La as formatBytes,Ua as formatDuration,qa as formatNumber,X as methodColor,r as persistentStorage,s as safeStringify,O as statusColor,ta as toolTheme,Ja as truncateMiddle,W as typeColor,o as usePersistedState,C as useSafeAreaInsets};