@buoy-gg/shared-ui 7.0.65 → 7.0.67
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.
- package/lib/commonjs/index.js +1 -1
- package/lib/commonjs/storage/devToolsStorageKeys.js +1 -1
- package/lib/commonjs/sync/settingsSync.js +1 -1
- package/lib/module/index.js +1 -1
- package/lib/module/storage/devToolsStorageKeys.js +1 -1
- package/lib/module/sync/settingsSync.js +1 -1
- package/lib/typescript/commonjs/hooks/safe-area-impl.d.ts +1 -1
- package/lib/typescript/commonjs/index.d.ts +1 -0
- package/lib/typescript/commonjs/storage/devToolsStorageKeys.d.ts +9 -0
- package/lib/typescript/module/hooks/safe-area-impl.d.ts +1 -1
- package/lib/typescript/module/index.d.ts +1 -0
- package/lib/typescript/module/storage/devToolsStorageKeys.d.ts +9 -0
- package/lib/web/chunks/chunk-2STKTXD3.mjs +1 -0
- package/lib/web/chunks/{chunk-OGAHL36T.mjs → chunk-GER55P4B.mjs} +1 -1
- package/lib/web/chunks/{chunk-FA6WAQUA.mjs → chunk-ZTIJC3VV.mjs} +2 -2
- package/lib/web/chunks/{persistentStorage.web-NOUYFUMM.mjs → persistentStorage.web-24PEE4I7.mjs} +1 -1
- package/lib/web/dataViewer.mjs +1 -1
- package/lib/web/hooks.mjs +1 -1
- package/lib/web/index.mjs +2 -2
- package/lib/web/ui.mjs +1 -1
- package/lib/web/utils.mjs +1 -1
- package/package.json +5 -5
- package/lib/web/chunks/chunk-7JJHWSTD.mjs +0 -1
package/lib/web/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use client";import{a as Yo,b as qo,c as Ko,d as Jo,e as Xo,f as Qo,g as Zo,h as en,i as tn}from"./chunks/chunk-3HELV44Y.mjs";import{a as an,b as sn,c as rn,d as on,e as nn,f as ln,g as cn,h as un}from"./chunks/chunk-OGAHL36T.mjs";import{$ as dn,A as hn,B as gn,C as pn,D as fn,E as bn,F as yn,G as mn,J as Sn,K as vn,L as Cn,M as Tn,N as wn,O as xn,P as kn,Q as In,R as _n,S as An,Z as On,_ as En,a as Ja,b as Pn,c as Rn,d as ze,e as Ln,f as $n,g as Xa,h as Bn,i as Mn,j as Nn,k as Dn,l as zn,m as Ft,n as Fn,o as Wn,p as jn,q as Hn,r as Un,s as Gn,t as Vn,u as Yn,v as qn,w as Kn,x as Jn,y as Xn,z as Qn}from"./chunks/chunk-GMM6TGFO.mjs";import"./chunks/chunk-VAR5UK6J.mjs";import{a as Zn,d as ei,f as Wt}from"./chunks/chunk-NOSWH3E2.mjs";import{$ as ti,$a as ai,$b as si,A as ri,Aa as oi,Ab as ni,Ac as ii,B as li,Ba as ci,Bb as ui,Bc as di,C as hi,Ca as gi,Cb as Qa,Cc as pi,D as fi,Da as bi,Db as yi,Dc as Za,E as mi,Ea as Si,Eb as vi,Ec as Ci,F as Ti,Fa as wi,Fb as xi,Fc as ki,G as Ii,Ga as _i,Gb as Ai,Gc as Oi,H as Ei,Ha as Pi,Hb as Ri,I as Li,Ia as $i,Ib as Bi,J as es,Ja as Mi,Jb as Ni,K as Di,Ka as zi,Kb as Fi,L as Wi,La as ji,Lb as Hi,M as Ui,Ma as Gi,Mb as Vi,N as Yi,Na as qi,Nb as Ki,O as Ji,Oa as Xi,Ob as Qi,P as Zi,Pa as el,Pb as tl,Q as al,Qa as sl,Qb as rl,R as ol,Ra as nl,Rb as il,S as ll,Sa as cl,Sb as ul,T as dl,Ta as hl,Tb as gl,U as pl,Ua as fl,Ub as bl,V as yl,Va as ml,Vb as Sl,W as vl,Wa as Cl,Wb as Tl,X as wl,Xa as xl,Xb as kl,Y as Il,Ya as _l,Yb as Al,Z as Ol,Za as El,Zb as Pl,_ as Rl,_a as Ll,_b as $l,a as Bl,aa as Ml,ab as Nl,ac as Dl,b as zl,ba as Fl,bb as Wl,bc as jl,c as Hl,ca as Ul,cb as Gl,cc as Vl,d as Yl,da as ql,db as Kl,dc as Jl,e as Xl,ea as Ql,eb as Zl,ec,f as tc,fa as ac,fb as sc,fc as rc,g as oc,ga as nc,gb as ic,gc as lc,h as cc,ha as uc,hb as dc,hc,i as ts,ia as gc,ib as pc,ic as fc,j as bc,ja as yc,jb as mc,jc as Sc,k as vc,ka as Cc,kb as Tc,kc as wc,l as xc,la as kc,lb as Ic,lc as _c,m as Ac,ma as Oc,mb as Ec,mc as Pc,n as Rc,na as Lc,nb as $c,nc as Bc,o as Mc,oa as Nc,ob as Dc,oc as zc,p as le,pa as Fc,pb as Wc,pc as jc,q,qa as Hc,qb as Uc,qc as Gc,r as xe,ra as Vc,rb as Yc,rc as qc,s as Fe,sa as Kc,sb as Jc,sc as Xc,t as as,ta as Qc,tb as Zc,tc as eu,u as tu,ua as au,ub as su,uc as ru,v as ou,va as nu,vb as iu,vc as lu,w as cu,wa as uu,wb as du,wc as hu,x as gu,xa as pu,xb as fu,xc as bu,y as yu,ya as mu,yb as Su,yc as jt,z as vu,za as Cu,zb as ss,zc as Tu}from"./chunks/chunk-FA6WAQUA.mjs";import{a as wu}from"./chunks/chunk-HIAN3HBD.mjs";import{a as xu,b as ku,c as Iu,d as _u,e as Au,f as Ou,g as Eu,h as Pu,i as Ru,j as Lu,k as $u,l as Bu,m as Mu,n as Nu,o as Du,p as zu}from"./chunks/chunk-4YLP5MMN.mjs";import{a as d,b as rs}from"./chunks/chunk-GF5C5DVX.mjs";import{a as Fu,b as Wu}from"./chunks/chunk-HPZXETRA.mjs";import{a as ju,b as Hu,c as Uu,d as Gu,e as Vu,f as Yu,g as qu,h as Ku,i as Ju,j as Xu,k as Qu,l as Zu}from"./chunks/chunk-4HIK66DZ.mjs";import{$ as ed,$a as td,$b as os,$c as ad,Aa as sd,Ab as rd,Ac as od,B as nd,Ba as id,Bb as ld,Bc as cd,C as ud,Ca as dd,Cb as hd,Cc as gd,D as pd,Da as fd,Db as bd,Dc as yd,E as md,Ea as Sd,Eb as vd,Ec as Cd,Fa as Td,Fb as wd,Fc as xd,Ga as kd,Gb as Id,Gc as Ht,H as _d,Ha as Ad,Hb as Od,Hc as Ed,Ia as Pd,Ib as Rd,Ic as Ld,J as $d,Ja as Bd,Jb as Md,Jc as Nd,Ka as Dd,Kb as zd,Kc as Fd,La as Wd,Lb as jd,Lc as Hd,Ma as Ud,Mb as Gd,Mc as Vd,N as Yd,Na as qd,Nb as Kd,Nc as Jd,O as Xd,Oa as Qd,Ob as Zd,Oc as eh,P as th,Pa as ah,Pb as sh,Pc as rh,Q as oh,Qa as nh,Qb as ih,Qc as lh,R as ch,Ra as uh,Rb as dh,Rc as hh,S as gh,Sa as ph,Sb as fh,Sc as bh,T as yh,Ta as mh,Tb as Sh,Tc as vh,U as Ch,Ua as Th,Ub as ns,Uc as wh,V as xh,Va as kh,Vb as Ih,Vc as _h,W as Ah,Wa as Oh,Wb as Eh,Wc as Ph,X as Rh,Xa as Lh,Xb as $h,Xc as Bh,Y as Mh,Ya as Nh,Yb as Dh,Yc as zh,Z as Fh,Za as Wh,Zb as jh,Zc as Hh,_ as Uh,_a as Gh,_b as Vh,_c as Yh,a as qh,aa as Kh,ab as Jh,ac as Xh,ad as Qh,b as Zh,ba as eg,bb as tg,bc as ag,bd as sg,c as rg,ca as og,cb as ng,cc as ig,cd as lg,d as cg,da as ug,db as dg,dc as is,dd as hg,e as gg,ea as pg,eb as fg,ec as bg,ed as yg,f as mg,fa as Sg,fb as vg,fc as Cg,fd as Tg,g as wg,ga as xg,gb as kg,gc as Ig,gd as _g,h as Ag,ha as Og,hb as Eg,hc as Pg,hd as Rg,i as Lg,ia as $g,ib as Bg,ic as Mg,id as Ng,j as Dg,ja as zg,jb as Fg,jc as Wg,jd as jg,k as Hg,ka as Ug,kb as Gg,kc as Vg,kd as Yg,l as qg,la as Kg,lb as Jg,lc as Xg,ld as Qg,m as Zg,ma as ep,mb as tp,mc as ap,md as sp,n as rp,na as op,nb as np,nc as ip,nd as lp,o as cp,oa as up,ob as dp,oc as hp,od as gp,p as pp,pa as fp,pb as bp,pc as yp,pd as mp,q as Sp,qa as vp,qb as Cp,qc as Tp,qd as wp,r as xp,ra as kp,rb as Ip,rc as _p,rd as Ap,s as Op,sa as Ep,sb as Pp,sc as Rp,sd as Lp,t as $p,ta as Bp,tb as Mp,tc as Np,u as Dp,ua as zp,ub as Fp,uc as Wp,va as jp,vb as Hp,vc as Up,wa as Gp,wb as Vp,wc as Yp,xa as qp,xb as Kp,xc as Jp,ya as Xp,yb as Qp,yc as Zp,za as ef,zb as tf,zc as af}from"./chunks/chunk-CJTGUGMQ.mjs";import{a as st,d as w,e as sf,f as Y,g as rf}from"./chunks/chunk-AHVO74UQ.mjs";import{a as of,b as nf,c as lf,d as cf,e as uf}from"./chunks/chunk-P32XO2YS.mjs";import{a as Se,b as rt,c as df,d as j,e as hf,f as gf}from"./chunks/chunk-7JJHWSTD.mjs";import{H as pf,J as We,a as k,b as F,d as ot,g as ff,h as bf,j as yf,r as Ut}from"./chunks/chunk-5G6RSRP4.mjs";import{a as Gt,c as mf}from"./chunks/chunk-SBYYOE2T.mjs";import{a as n}from"./chunks/chunk-T6T3FEMU.mjs";var ls=class Mb extends Ja{constructor(t){super();this.events=[];this.arrayListeners=new Set;this.captureSuppressed=false;this.clearListeners=new Set;this.maxEvents=t.maxEvents??500,this.storeName=t.storeName,Promise.resolve().then(()=>{let a=n(()=>{le().status==="locked"?(this.stopCapturing(),this.events=[],this.notifyArrayListeners()):this.getTotalSubscriberCount()>0&&!this.captureSuppressed&&!this.isCapturing()&&this.startCapturing()},"reconcile");Fe(a),a()})}onSubscribe(){this.getTotalSubscriberCount()===1&&!this.captureSuppressed&&le().status!=="locked"&&this.startCapturing(),ze(this.storeName)}onUnsubscribe(){this.getTotalSubscriberCount()===0&&this.stopCapturing(),ze(this.storeName)}getTotalSubscriberCount(){return this.listeners.size+this.arrayListeners.size}subscribeToEvents(t){let a=this.getTotalSubscriberCount()===0;return this.arrayListeners.add(t),a&&!this.captureSuppressed&&le().status!=="locked"&&this.startCapturing(),ze(this.storeName),t(this.getEvents()),()=>{this.arrayListeners.delete(t),this.getTotalSubscriberCount()===0&&this.stopCapturing(),ze(this.storeName)}}onEvent(t){return this.subscribe(t)}addEvent(t){le().status!=="locked"&&(this.events=[t,...this.events].slice(0,this.maxEvents),q()&&this.notify(t),this.notifyArrayListeners())}notifyArrayListeners(){let t=this.getEvents();this.arrayListeners.forEach(a=>{try{a(t)}catch{}})}getEvents(){return q()?this.events:[]}getEventCount(){return q()?this.events.length:0}clearEvents(){this.events=[],this.notifyArrayListeners(),this.clearListeners.forEach(t=>{try{t()}catch{}})}onClear(t){return this.clearListeners.add(t),()=>{this.clearListeners.delete(t)}}disableCapture(){this.captureSuppressed=true,this.isCapturing()&&this.stopCapturing()}replaceEvents(t){this.events=this.dedupeById(t).slice(0,this.maxEvents),this.notifyArrayListeners()}dedupeById(t){let a=new Set,s=[];for(let r of t){let o=r?.id;if(o==null){s.push(r);continue}a.has(o)||(a.add(o),s.push(r))}return s}setMaxEvents(t){this.maxEvents=t,this.events.length>t&&(this.events=this.events.slice(0,t),this.notifyArrayListeners())}getSubscriberCounts(){return{eventCallbacks:this.listeners.size,arrayListeners:this.arrayListeners.size,total:this.getTotalSubscriberCount()}}};n(ls,"BaseEventStore");var Sf=ls;import{useEffect as vf,useMemo as Cf,useState as Tf}from"react";var wf=[{value:"buoy.gg/api/license",mode:"contains"},{value:"api.keygen.sh",mode:"contains"}];function Vt(e,t){let a=e.toLowerCase(),s=t.value.toLowerCase();if(t.mode==="contains")return a.includes(s);try{let r=new URL(e);return s.startsWith("/")?r.pathname.toLowerCase()===s:s.startsWith("http://")||s.startsWith("https://")?`${r.origin}${r.pathname}`.toLowerCase()===s:r.host.toLowerCase()===s}catch{return a===s}}n(Vt,"urlMatchesIgnoredPattern");function cs(e,t){return!e||t.length===0?false:t.some(a=>Vt(e,a))}n(cs,"isUrlIgnored");var us=wf;function Yt(e){if(!Array.isArray(e))return[];let t=[];for(let a of e)if(typeof a=="string"&&a.trim())t.push({value:a,mode:"contains"});else if(a&&typeof a=="object"&&typeof a.value=="string"){let s=a;t.push({value:s.value,mode:s.mode==="exact"?"exact":"contains"})}return t}n(Yt,"migratePatterns");function qt(e){let t=[...e];for(let a of us)t.some(s=>s.value===a.value)||t.push({...a});return t}n(qt,"ensureDefaults");var ds=class Db{constructor(){this.patterns=qt(us.map(t=>({...t})));this.teamPatterns=[];this.merged=this.patterns;this.listeners=new Set;this.loaded=false;this.loadPromise=null;this.dirty=false}getPatterns(){return this.merged}isTeamOnly(t){return!this.patterns.some(a=>a.value===t)&&this.teamPatterns.some(a=>a.value===t)}setTeamPatterns(t){this.teamPatterns=Yt(t),this.remerge(),this.emit()}reload(){return this.loaded=false,this.loadPromise=null,this.dirty=false,this.ensureLoaded()}remerge(){let t=this.teamPatterns.filter(a=>!this.patterns.some(s=>s.value===a.value));this.merged=t.length>0?[...this.patterns,...t]:this.patterns}subscribe(t){return this.listeners.add(t),this.ensureLoaded(),()=>{this.listeners.delete(t)}}emit(){this.listeners.forEach(t=>t())}ensureLoaded(){return this.loaded?Promise.resolve():this.loadPromise?this.loadPromise:(this.loadPromise=(async()=>{try{let t=await j.getItem(Se.network.ignoredDomains());if(t&&!this.dirty){let a=qt(Yt(JSON.parse(t)));this.patterns=a,this.remerge()}}catch{}finally{this.loaded=true,this.emit()}})(),this.loadPromise)}persist(){j.setItem(Se.network.ignoredDomains(),JSON.stringify(this.patterns)).catch(()=>{})}commit(t){this.dirty=true,this.patterns=t,this.remerge(),this.emit(),this.persist()}add(t){let a=t.value.trim();a&&(this.patterns.some(s=>s.value===a)||this.commit([...this.patterns,{value:a,mode:t.mode}]))}remove(t){this.patterns.some(a=>a.value===t)&&this.commit(this.patterns.filter(a=>a.value!==t))}toggle(t){let a=t.trim();a&&this.commit(this.patterns.some(s=>s.value===a)?this.patterns.filter(s=>s.value!==a):[...this.patterns,{value:a,mode:"contains"}])}toggleMode(t){this.patterns.some(a=>a.value===t)&&this.commit(this.patterns.map(a=>a.value===t?{...a,mode:a.mode==="contains"?"exact":"contains"}:a))}};n(ds,"IgnoredPatternsStore");var xf=ds,X=new xf,kf=n(e=>X.add(e),"addPattern"),If=n(e=>X.remove(e),"removePattern"),_f=n(e=>X.toggle(e),"togglePattern"),Af=n(e=>X.toggleMode(e),"togglePatternMode"),Of=n(e=>X.isTeamOnly(e),"isTeamOnlyPattern");function hs(){let[e,t]=Tf(()=>X.getPatterns());vf(()=>X.subscribe(()=>{t(X.getPatterns())}),[]);let a=Cf(()=>new Set(e.map(s=>s.value)),[e]);return{patterns:e,values:a,add:kf,remove:If,toggle:_f,toggleMode:Af,isTeamOnly:Of}}n(hs,"useIgnoredPatterns");import{useSyncExternalStore as Ef}from"react";var nt={},Kt=new Map,Jt=new Set,je=[];function gs(e){if(!e)return je;try{let t=JSON.parse(e);if(!Array.isArray(t))return je;let a=t.map(s=>typeof s=="string"?s:s&&typeof s.value=="string"?s.value:"").map(s=>s.trim()).filter(Boolean);return a.length?[...new Set(a)]:je}catch{return je}}n(gs,"parseList");var it={set(e){Object.keys({...nt,...e}).some(t=>nt[t]!==e[t])&&(nt=e,Kt.clear(),Jt.forEach(t=>t()))},getList(e){let t=Kt.get(e);return t||(t=gs(nt[e]),Kt.set(e,t)),t},subscribe(e){return Jt.add(e),()=>Jt.delete(e)}};function ps(e){return Ef(it.subscribe,()=>it.getList(e),()=>je)}n(ps,"useTeamList");function fs(e){typeof requestAnimationFrame=="function"?requestAnimationFrame(()=>e()):setTimeout(e,0)}n(fs,"scheduleFrame");function bs(e){let t=e.id,a=e.order??"append",s=e.coalesce??"sync",r=e.flushMinIntervalMs??150,o=e.max,i=[],l=false,c=e.firstId??1,u=0,y=false,S=[],f=false;function m(){f||(f=true,Fe(()=>{le().status==="locked"&&(i=[]),V()}))}n(m,"observe");let C=new Set,A=new Set;function W(){for(let v of C)try{v()}catch{}}n(W,"fire");function V(){if(s==="sync"){W();return}y||(y=true,fs(()=>{y=false,W()}))}n(V,"emit");function M(v){return v.length<=o?v:a==="append"?v.slice(v.length-o):v.slice(0,o)}return n(M,"trim"),{id:t,subscribe(v){return m(),C.add(v),()=>{C.delete(v)}},getSnapshot(){return m(),q()?i:S},size(){return q()?i.length:0},add(v){m(),!(l||le().status==="locked")&&(a==="append"?i=i.length>=o?[...i.slice(i.length-o+1),v]:[...i,v]:i=i.length>=o?[v,...i.slice(0,o-1)]:[v,...i],V())},set(v){m(),q()&&(i=M(v),V())},update(v){m(),le().status!=="locked"&&(i=M(v(i)),V())},clear(){for(let v of A)try{v()}catch{}i.length!==0&&(i=[],V())},onClear(v){return A.add(v),()=>{A.delete(v)}},notify(){V()},flushSync(v=false){let se=Date.now();if(!(!v&&se-u<r)){u=se;try{let $=globalThis.__buoyFlushToolSync;if(!$)return;for(let Ye of $)Ye(t)}catch{}}},setPaused(v){l=v},isPaused(){return l},setMax(v){o=v;let se=M(i);se!==i&&(i=se,V())},getMax(){return o},allocId(){return c++},bumpIdAbove(v){v+1>c&&(c=v+1)},listenerCount(){return C.size}}}n(bs,"createToolStore");var ys=class Fb{constructor(t={}){this.items=[];this.itemListeners=new Set;this.clearListeners=new Set;this.idCounter=0;this.enabled=true;this.captureSuppressed=false;this.max=t.max??200}canRecord(){return this.enabled&&!this.captureSuppressed}nextId(){return`${Date.now()}-${++this.idCounter}`}push(t){this.items=[t,...this.items].slice(0,this.max)}record(t){this.push(t),this.notifyListeners()}setItems(t){this.items=t.slice(0,this.max),this.notifyListeners()}getAll(){return[...this.items]}getById(t){return this.items.find(a=>a.id===t)}get size(){return this.items.length}clear(){this.items=[],this.notifyListeners(),this.clearListeners.forEach(t=>{try{t()}catch{}})}onClear(t){return this.clearListeners.add(t),()=>{this.clearListeners.delete(t)}}disableCapture(){this.captureSuppressed=true}isCaptureSuppressed(){return this.captureSuppressed}replaceAll(t){return this.enabled?(this.setItems(t),true):false}hydrateById(t,a){let s=this.items.findIndex(r=>r.id===t);s!==-1&&(this.items=[...this.items.slice(0,s),{...this.items[s],...a},...this.items.slice(s+1)],this.notifyListeners())}setEnabled(t){this.enabled=t}getEnabled(){return this.enabled}setMax(t){this.max=t,this.items.length>t&&(this.items=this.items.slice(0,t),this.notifyListeners())}getMax(){return this.max}subscribe(t){return this.itemListeners.add(t),()=>{this.itemListeners.delete(t)}}notifyListeners(){let t=this.getAll();this.itemListeners.forEach(a=>a(t))}get listenerCount(){return this.itemListeners.size}};n(ys,"ChangeLog");var Pf=ys;var ve=n(e=>typeof e=="object"&&e!==null&&!Array.isArray(e),"isPlainObject"),Rf=["id","lineId","key","uuid","_id","slug","name"];function lt(e){if(!e.length||!e.every(ve))return;let t=e[0];for(let a of Rf){if(!(a in t))continue;let s=e.map(r=>r[a]);if(s.every(r=>typeof r=="string"||typeof r=="number")&&new Set(s.map(String)).size===s.length)return a}}n(lt,"identityField");function ms(e,t,a,s){let r=s[t];return typeof r=="string"||typeof r=="number"?String(r)!==a?{ok:false,error:`The new item is addressed as \`${a}\` but carries \`${t}\`: ${JSON.stringify(r)}. Use the same value for both \u2014 address it by the id it carries.`}:{ok:true,value:r}:e.every(o=>typeof o[t]=="number")&&a.trim()!==""&&String(Number(a))===a?{ok:true,value:Number(a)}:{ok:true,value:a}}n(ms,"identityForAdd");function ct(e,t,a="",s=[]){if(Array.isArray(e)&&ve(t)){let r=lt(e);if(!r)return{patch:t,notes:s};let o=new Map(e.map(y=>[String(y[r]),y])),i=e.slice(),l=0,c=0,u=0;for(let[y,S]of Object.entries(t)){let f=i.findIndex(m=>String(m[r])===y);if(S===null){if(f===-1)return{patch:t,notes:s};i.splice(f,1),l++}else if(f===-1){if(!ve(S))return{patch:t,notes:s};let m=ms(e,r,y,S);if(!m.ok)return{patch:t,notes:s,error:m.error};i.push({...S,[r]:m.value}),u++}else{let m=ct(o.get(y),S,`${a}[${y}]`,s);if(m.error)return{patch:t,notes:s,error:m.error};let C=i[f];i[f]=ve(C)&&ve(m.patch)?{...C,...m.patch}:m.patch,c++}}return s.push(`${a||"(root)"}: addressed by \`${r}\` \u2014 ${c} changed, ${u} added, ${l} removed, ${i.length} item(s) remain`),{patch:i,notes:s}}if(ve(e)&&ve(t)){let r={};for(let[o,i]of Object.entries(t)){let l=a?`${a}.${o}`:o;if(!(o in e)){r[o]=i;continue}let c=ct(e[o],i,l,s);if(c.error)return{patch:t,notes:s,error:c.error};r[o]=c.patch}return{patch:r,notes:s}}return{patch:t,notes:s}}n(ct,"expandKeyedArrays");var ut=n(e=>typeof e=="object"&&e!==null&&!Array.isArray(e),"isPlainObject"),Xt=3,Lf=24,Ss=40,dt=600;function ke(e,t=0){if(e===null)return"null";if(Array.isArray(e)){if(!e.length)return"unknown[]";if(t>=Xt)return"\u2026[]";let s=ke(e[0],t+1);return s.includes(" ")||s.endsWith("]")?`(${s})[]`:`${s}[]`}if(ut(e)){if(t>=Xt)return"{\u2026}";let s=Object.keys(e),r=s.slice(0,Lf),o=r.map(l=>`${l}: ${ke(e[l],t+1)}`).join(", "),i=s.length>r.length?`, +${s.length-r.length} more`:"";return`{${o}${i}}`}let a=typeof e;return a==="undefined"?"undefined":a==="function"?"function":a}n(ke,"shapeOf");function Ce(e,t="",a=[],s=0,r={visited:0}){if(s>Xt||a.length>=Ss||r.visited>=dt)return a;if(Array.isArray(e)){let o=e[0];if(a.push({path:t||"(root)",length:e.length,...e.length?{item:ke(o)}:{}}),e.length&&ut(o))for(let[i,l]of Object.entries(o)){if(++r.visited>=dt)break;Ce(l,t?`${t}[].${i}`:`[].${i}`,a,s+1,r)}return a}if(ut(e))for(let[o,i]of Object.entries(e)){if(++r.visited>=dt)break;Ce(i,t?`${t}.${o}`:o,a,s+1,r)}return a}n(Ce,"listShapes");function vs(e){let t={visited:0};return Ce(e,"",[],0,t).length>=Ss||t.visited>=dt}n(vs,"shapesWereTruncated");function Cs(e){return Ce(e).filter(t=>t.item===void 0).map(t=>t.path)}n(Cs,"unshapedLists");function Ts(e){if(e===void 0)return;let t=Ce(e),a=ke(e);if(!(!t.length&&!ut(e)&&!Array.isArray(e)))return t.length?{shape:a,lists:t}:{shape:a}}n(Ts,"shapeSummary");var te=n(e=>typeof e=="object"&&e!==null&&!Array.isArray(e),"isPlainObject");function ws(e,t,a=2e3){let s=[{node:e,path:""}],r=0;for(;s.length&&r<a;){let{node:o,path:i}=s.shift();if(r++,Array.isArray(o))o.slice(0,20).forEach((l,c)=>s.push({node:l,path:`${i}[${c}]`}));else if(te(o))for(let[l,c]of Object.entries(o)){let u=i?`${i}.${l}`:l;if(l===t)return u;(te(c)||Array.isArray(c))&&s.push({node:c,path:u})}}}n(ws,"findFieldPath");function Qt(e,t,a,s,r){let o=ws(e,r??a),i=s.slice(0,12).join(", ")||"(no fields)";return o?`No field "${a}" at "${t}" \u2014 did you mean path "${o}"? "${t}" has: ${i}.`:`No field "${a}" at "${t}". It has: ${i}.`}n(Qt,"missingFieldError");function Zt(e,t){let a=e;for(let s of t.split(".")){if(!te(a))return;a=a[s]}return a}n(Zt,"fieldOf");function ht(e){if(!e.trim())return;let t=[],a=0;for(;a<e.length;){if(e[a]==="."){a++;continue}if(e[a]==="["){let o=e.indexOf("]",a);if(o===-1)return;let i=e.slice(a+1,o);if(/^\d+$/.test(i))t.push({kind:"index",index:Number(i)});else{let l=i.indexOf("=");if(l<=0)return;t.push({kind:"match",field:i.slice(0,l).trim(),value:i.slice(l+1).trim()})}a=o+1;continue}let s=a;for(;s<e.length&&e[s]!=="."&&e[s]!=="[";)s++;let r=e.slice(a,s);if(!r)return;t.push({kind:"key",key:r}),a=s}return t.length?t:void 0}n(ht,"parsePath");function xs(e,t){let a=ht(t);if(!a)return{ok:false,error:`Could not read the path "${t}". Use dotted keys with optional [0] or [field=value], like "item.name" or "lines[lineId=seed-1].qty".`};let s=e,r=[];for(let o of a){if(s==null)return{ok:false,error:`"${r.join(".")||"(root)"}" is ${s===null?"null":"not set"}, so there is nothing at "${t}".`};if(o.kind==="key"){if(!te(s))return{ok:false,error:`"${r.join(".")||"(root)"}" is not an object, so it has no field "${o.key}".`};if(!(o.key in s)){let i=a[a.length-1];return{ok:false,error:Qt(e,r.join(".")||"(root)",o.key,Object.keys(s),i?.kind==="key"?i.key:void 0)}}s=s[o.key],r.push(o.key)}else if(o.kind==="index"){if(!Array.isArray(s))return{ok:false,error:`"${r.join(".")||"(root)"}" is not a list, so [${o.index}] means nothing.`};s=s[o.index],r.push(`[${o.index}]`)}else{if(!Array.isArray(s))return{ok:false,error:`"${r.join(".")||"(root)"}" is not a list, so [${o.field}=${o.value}] means nothing.`};let i=s.find(l=>te(l)&&String(Zt(l,o.field))===o.value);if(i===void 0)return{ok:false,error:`No item with ${o.field}="${o.value}" in "${r.join(".")||"(root)"}".`};s=i,r.push(`[${o.field}=${o.value}]`)}}return{ok:true,value:s}}n(xs,"readPath");function ks(e,t,a){let s=ht(t);if(!s)return{ok:false,error:`Could not read the path "${t}". Use dotted keys with optional [0] or [field=value], like "item.name" or "lines[lineId=seed-1].qty".`};if(s[0]?.kind!=="key")return{ok:false,error:`A path must start with a field name, not a list index \u2014 "${t}" does not say which list.`};let r=n((i,l)=>{if(l>=s.length)return{ok:true,patch:a};let c=s[l];if(c.kind==="key"){if(te(i)&&!(c.key in i)&&l+1<s.length){let W=s[s.length-1];return{ok:false,error:Qt(e,Ie(s,l),c.key,Object.keys(i),W?.kind==="key"?W.key:void 0)}}let C=te(i)?i[c.key]:void 0,A=r(C,l+1);return A.ok?{ok:true,patch:{[c.key]:A.patch}}:A}if(!Array.isArray(i))return{ok:false,error:`"${Ie(s,l)}" is not a list, so "${t}" cannot be resolved. Read it first \u2014 \`shape\` on the read says what each field holds.`};let u=c.kind==="index"?c.index:i.findIndex(C=>te(C)&&String(Zt(C,c.field))===c.value),y=u>=0?i[u]:void 0;if(c.kind==="index"?u<0||u>=i.length:u<0)return{ok:false,error:c.kind==="index"?`"${Ie(s,l)}" has ${i.length} item(s), so there is nothing at [${c.index}].`:`No item with ${c.field}="${c.value}" in "${Ie(s,l)}".`};if(!te(y)){if(l<s.length-1)return{ok:false,error:`"${Ie(s,l)}[${c.kind==="index"?c.index:`${c.field}=${c.value}`}]" holds ${y===null?"null":typeof y}, not an object, so "${t}" cannot go any deeper. Set the item itself.`};let C=i.slice();return C[u]=a,{ok:true,patch:C}}let S=r(y,l+1);if(!S.ok)return S;let f=lt(i);if(f)return{ok:true,patch:{[String(y[f])]:S.patch}};let m=i.slice();return m[u]=te(S.patch)?{...y,...S.patch}:S.patch,{ok:true,patch:m}},"build"),o=r(e,0);return o.ok?{ok:true,patch:o.patch}:o}n(ks,"patchFromPath");function Ie(e,t){return e.slice(0,t).map(a=>a.kind==="key"?a.key:a.kind==="index"?`[${a.index}]`:`[${a.field}=${a.value}]`).join(".").replace(/\.\[/g,"[")||"(root)"}n(Ie,"pathUpTo");var ce=n(e=>!!e&&typeof e=="object"&&!Array.isArray(e),"isPlainObject");function _e(e){return Array.isArray(e)?"array":e===null?"null":typeof e=="object"?"object":typeof e}n(_e,"shapeKind");var Is=["string","number","boolean"];function ea(e,t,a=2e3){let s=[{node:e,path:""}],r=0;for(;s.length&&r<a;){let{node:o,path:i}=s.shift();if(r++,Array.isArray(o))o.slice(0,20).forEach((l,c)=>s.push({node:l,path:`${i}[${c}]`}));else if(ce(o))for(let[l,c]of Object.entries(o)){let u=i?`${i}.${l}`:l;if(l===t&&i)return u;(ce(c)||Array.isArray(c))&&s.push({node:c,path:u})}}}n(ea,"findKeyPath");function gt(e,t,a={},s=e,r="",o=[]){let i=a.noun??"data",l=r||"(root)";if(Array.isArray(t)){if(!Array.isArray(e))return o.push({path:l,kind:"type-change",detail:`${_e(e)} \u2192 array`}),o;let f=e.length?e[0]:void 0;return f!==void 0&&(ce(f)||Array.isArray(f))&&t.forEach((m,C)=>{let A=`${r}[${C}]`;if(ce(f)&&ce(m))for(let W of Object.keys(f))W in m||o.push({path:`${A}.${W}`,kind:"missing-key",detail:`list items need \`${W}\` \u2014 the items already in the list have it`});gt(f,m,a,s,A,o)}),o}if(ce(t)){if(!ce(e))return o.push({path:l,kind:"type-change",detail:`${_e(e)} \u2192 object`}),o;for(let[f,m]of Object.entries(t)){let C=r?`${r}.${f}`:f;if(f in e)gt(e[f],m,a,s,C,o);else{let A=ea(s,f);o.push({path:C,kind:"add-key",detail:A?`no such field here \u2014 did you mean \`${A}\`?`:`no field named \`${f}\` exists in this ${i}`,...A?{movedTo:A}:{}})}}return o}let c=_e(e),u=_e(t),y=c==="null"&&Is.includes(u),S=u==="null"&&Is.includes(c);return c!==u&&!y&&!S&&o.push({path:l,kind:"type-change",detail:`${c} \u2192 ${u}`}),o}n(gt,"typedEditViolations");function _s(e,t){if(!t.length||!t.every(s=>s.kind==="add-key"&&s.movedTo))return;let a={};for(let s of t){let r=As(e,s.path);if(r===void 0||s.movedTo.includes("["))return;let o=a,i=s.movedTo.split(".");i.slice(0,-1).forEach(l=>{o[l]??(o[l]={}),o=o[l]}),o[i[i.length-1]]=r}return a}n(_s,"suggestedPatch");function As(e,t){let a=e;for(let s of t.split(".")){if(!ce(a))return;a=a[s]}return a}n(As,"getAtDotted");function Os(e,t,a){let s=e.slice(0,6).map(o=>`\`${o.path}\`: ${o.detail}`).join("; "),r=e.length>6?`; +${e.length-6} more`:"";return`Refused: this isn't a same-type edit of existing fields (the rule the React Query devtools enforces). ${s}${r}. You can only change the VALUE of a field that already exists, to the same type \u2014 you can't add fields, change a field's type, or null a list/object the screen renders. Clearing a scalar to null is fine. Send just the field(s) you're changing, nested to match the current shape of this ${t}. Use force:true only to deliberately break that.`+(a?` This is the same edit at the right depth \u2014 send it as the patch: ${JSON.stringify(a)}`:"")}n(Os,"refusalText");function He(e,t){let a=0,s=false,r=false,o=[e],i=new Set;for(;o.length>0;){if(a>t)return{bytes:a,sawRepeat:s,sawBigInt:r};let l=o.pop();if(l==null)a+=4;else if(typeof l=="string")a+=l.length+2;else if(typeof l=="number")a+=8;else if(typeof l=="boolean")a+=5;else if(typeof l=="object"){if(i.has(l)){s=true;continue}if(i.add(l),Array.isArray(l)){a+=2+l.length;for(let c=0;c<l.length;c++)o.push(l[c])}else{a+=2;for(let c in l)a+=c.length+4,o.push(l[c])}}else typeof l=="bigint"&&(r=true),a+=4}return{bytes:a,sawRepeat:s,sawBigInt:r}}n(He,"approxJsonSize");function pt(e,t){let a=He(e,t);return a.bytes>t?true:!a.sawRepeat&&!a.sawBigInt?false:!Xa(e)}n(pt,"isOverWireBudget");var Es=16*1024,ft=8*1024*1024;function Ps(e,t){return Object.freeze({[`__buoy${e}OnDevice`]:true,note:t})}n(Ps,"onDeviceMarker");function Rs(e,t){return typeof e=="object"&&e!==null&&e[`__buoy${t}OnDevice`]===true}n(Rs,"isOnDeviceMarker");function ta(e=ft){return{__buoyTruncated:true,note:`Exceeds the ${e/1048576}MB detail limit \u2014 inspect it on-device.`}}n(ta,"truncatedNote");function Ls(e,t,a=Es){return e===void 0?e:pt(e,a)?t:e}n(Ls,"toWire");function aa(e,t=ft){return pt(e,t)?ta(t):e}n(aa,"capDetail");function $s(e){let t=new WeakMap;return a=>{let s=t.get(a);if(s!==void 0)return s;let r=e(a);return t.set(a,r),r}}n($s,"memoByIdentity");function Bs(e,t){let a=[],s=t.baseBytes??16;for(let r=e.length-1;r>=0;r--){let o=t.toWire(e[r]);if(s+o.bytes>t.budget&&a.length>0)break;a.push(o.value),s+=o.bytes}return a.reverse(),a}n(Bs,"newestFitting");function Ms(e,t,a){let s=He(e,t);if(s.bytes<=t)return{value:e,bytes:s.bytes};let r=a();return{value:r,bytes:He(r,t).bytes}}n(Ms,"sizeOrStub");function sa(e){return e??{}}n(sa,"readParams");function Ns(e,t,a=ft){let s=n(r=>aa(r,a),"cap");return r=>{let{id:o}=sa(r);if(!o)return{found:false,reason:"missing id"};let i=e(o);return i?{found:true,id:o,...t(i,s)}:{found:false,reason:"unknown id"}}}n(Ns,"detailByIdAction");function ra(e){return e.length===1?e[0]:t=>{let a=e.map(s=>s(t));return()=>{for(let s of a)s()}}}n(ra,"mergeChangeSources");function Ds(e){let t=Array.isArray(e.subscribe)?ra(e.subscribe):e.subscribe;return{version:e.version,getSnapshot:e.getSnapshot,subscribe:t,...e.actions?{actions:e.actions}:{}}}n(Ds,"createSyncAdapter");var bt=new Set(["@react_buoy_settings_theme","@react_buoy_settings_preferences","@react_buoy_settings_global","@react_buoy_dev_tools_settings","@react_buoy_settings_tooltip_shown","@react_buoy_modal_hint_acknowledged","@react_buoy_clipboard_hint_acknowledged","@react_buoy_network_filters","@react_buoy_network_preferences","@react_buoy_network_copy_options","@react_buoy_storage_filters","@react_buoy_storage_event_filters","@react_buoy_storage_key_filters","@react_buoy_storage_pinned_keys","@react_buoy_storage_preferences","@react_buoy_storage_diff_viewer_mode","@react_buoy_rq_filters","@react_buoy_rq_preferences","@react_buoy_route_events_event_filters","@react_buoy_route_events_detail_view","@react_buoy_route_events_diff_viewer_mode","@react_buoy_sentry_filters","@react_buoy_sentry_preferences","@react_buoy_highlight_updates_filters","@react_buoy_highlight_updates_settings","@react_buoy_highlight_updates_copy_settings","@react_buoy_events_enabled_sources","@react_buoy_events_copy_settings","@react_buoy_time_machine_diff_viewer_mode","@react_buoy_network_ignored_domains","@react_buoy_network_ignored_urls","@react_buoy_rq_ignored_patterns","@react_buoy_rq_included_patterns"]),zs=new Set(["@react_buoy_network_ignored_domains","@react_buoy_network_ignored_urls","@react_buoy_rq_ignored_patterns","@react_buoy_rq_included_patterns"]),Fs="@react_buoy_settings_sync_meta",Ws="@react_buoy_network_ignored_domains",js=2e3,ue=3e4,oa=15*6e4,$f=15e3,na=new Set;function Hs(e){return na.add(e),()=>na.delete(e)}n(Hs,"onSettingsApplied");function Us(e){e.includes(Ws)&&X.reload(),na.forEach(t=>{try{t(e)}catch{}})}n(Us,"applyPulledSettings");function Gs(){return{storage:j,credential:cu,fetch:n((e,t)=>fetch(e,t),"fetch"),subscribeWrites:df,setTimer:n((e,t)=>setTimeout(e,t),"setTimer"),clearTimer:n(e=>clearTimeout(e),"clearTimer"),onTeam:n(e=>{X.setTeamPatterns(Vs(e[Ws])),it.set(e)},"onTeam"),onApplied:Us}}n(Gs,"defaultDeps");function Vs(e){if(!e)return[];try{return JSON.parse(e)}catch{return[]}}n(Vs,"parseList");var Ys=class Wb{constructor(t={}){this.started=false;this.pending=new Map;this.applying=new Set;this.pushTimer=null;this.pullTimer=null;this.unsubscribe=null;this.refusedToken=null;this.deps={...Gs(),...t}}start(){this.started||(this.started=true,this.unsubscribe=this.deps.subscribeWrites((t,a)=>this.onWrite(t,a)),this.pull())}stop(){this.started=false,this.unsubscribe?.(),this.unsubscribe=null,this.pushTimer!==null&&this.deps.clearTimer(this.pushTimer),this.pullTimer!==null&&this.deps.clearTimer(this.pullTimer),this.pushTimer=this.pullTimer=null}credential(){let t=this.deps.credential();return t&&t.token!==this.refusedToken?t:null}call(t,a,s){return new Promise((r,o)=>{let i=this.deps.setTimer(()=>o(new Error("timeout")),$f);this.deps.fetch(`${a.origin.replace(/\/$/,"")}${t}`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({access_token:a.token,...s})}).then(l=>{this.deps.clearTimer(i),r(l)},l=>{this.deps.clearTimer(i),o(l)})})}schedulePull(t){this.started&&(this.pullTimer!==null&&this.deps.clearTimer(this.pullTimer),this.pullTimer=this.deps.setTimer(()=>{this.pullTimer=null,this.pull()},t))}async readMeta(){try{let t=await this.deps.storage.getItem(Fs),a=t?JSON.parse(t):{};return a&&typeof a=="object"?a:{}}catch{return{}}}async writeMeta(t){await this.deps.storage.setItem(Fs,JSON.stringify(t)).catch(()=>{})}async pull(){let t=this.credential();if(!t)return this.schedulePull(ue);let a,s;try{let c=await this.call("/api/settings/pull",t,{});a=c.status,s=await c.json().catch(()=>null)}catch{return this.schedulePull(ue)}if(a===401||a===403)return this.refusedToken=t.token,this.schedulePull(ue);if(a===404)return this.schedulePull(oa);if(a!==200||!s)return this.schedulePull(ue);let r=s.personal??{},o=await this.readMeta(),i=[];for(let[c,u]of Object.entries(r))if(!(!bt.has(c)||this.pending.has(c))&&!(typeof u?.value!="string"||!(u.updatedAt>(o[c]??0)))){this.applying.add(c);try{await this.deps.storage.setItem(c,u.value)}finally{this.applying.delete(c)}o[c]=u.updatedAt,i.push(c)}for(let c of bt){if(c in r||c in o||this.pending.has(c))continue;let u=await this.deps.storage.getItem(c).catch(()=>null);u!==null&&this.pending.set(c,u)}await this.writeMeta(o),i.length>0&&this.deps.onApplied(i);let l={};for(let[c,u]of Object.entries(s.team??{}))zs.has(c)&&typeof u?.value=="string"&&(l[c]=u.value);this.deps.onTeam(l),this.pending.size>0&&this.schedulePush(0),this.schedulePull(oa)}onWrite(t,a){!this.started||this.applying.has(t)||!bt.has(t)||(this.pending.set(t,a),this.schedulePush(js))}schedulePush(t){this.pushTimer!==null&&this.deps.clearTimer(this.pushTimer),this.pushTimer=this.deps.setTimer(()=>{this.pushTimer=null,this.push()},t)}async push(){if(this.pending.size===0)return;let t=this.credential();if(!t)return this.schedulePush(ue);let a=new Map(this.pending),s,r;try{let i=await this.call("/api/settings/push",t,{changes:Object.fromEntries(a)});s=i.status,r=await i.json().catch(()=>null)}catch{return this.schedulePush(ue)}if(s===401||s===403)return this.refusedToken=t.token,this.schedulePush(ue);if(s===404)return this.schedulePush(oa);if(s!==200||!r||typeof r.updatedAt!="number")return this.schedulePush(ue);let o=await this.readMeta();for(let[i,l]of a)this.pending.get(i)===l&&this.pending.delete(i),o[i]=r.updatedAt;await this.writeMeta(o),this.pending.size>0&&this.schedulePush(js)}};n(Ys,"SettingsSync");var qs=Ys,Ue=null;function Ks(e={}){Ue??(Ue=new qs(e)),Ue.start()}n(Ks,"startSettingsSync");function Js(){Ue&&Ue.pull()}n(Js,"syncSettingsNow");function Xs(e){return e}n(Xs,"defineToolPreset");function Qs(e,t,a){return s=>{let r=s??{},o=e.props===void 0&&!t?void 0:{...e.props??{},...t?t(r):{}};return{...e,id:r.id||e.id,name:r.name||e.name,description:r.description||e.description,...o!==void 0?{props:o}:{},...a?a(r,e):{}}}}n(Qs,"createToolFactory");var ia="__buoyToolActionRegistry";function yt(){let e=globalThis;return e[ia]||(e[ia]=new Set),e[ia]}n(yt,"sources");function Zs(e){let t=yt();t.add(e);let a=false,s=n(()=>{if(a)return;a=true;let o=e(),i=n(async(l,c,u)=>{if(!(l==="network"&&c==="deleteOverrideRule"||l==="impersonate"&&c==="stopImpersonation"))throw new Error("Unsupported account-lock cleanup operation");if(l==="impersonate")return o[l]?.dispose?.(i);let y=o[l]?.actions?.[c];if(!y)throw new Error(`Cleanup unavailable for ${l}`);return y(u)},"cleanup");for(let l of Object.values(o))try{Promise.resolve(l.dispose?.(i)).catch(c=>console.warn("[Buoy] Tool cleanup failed",c))}catch(c){console.warn("[Buoy] Tool cleanup failed",c)}},"dispose"),r=Fe(()=>{q()?a=false:s()});return()=>{r(),t.delete(e),Promise.resolve().then(()=>{t.size===0&&s()})}}n(Zs,"registerToolAdapters");function Te(){if(!q())return{};let e={};for(let t of yt())try{Object.assign(e,t())}catch{}return Object.fromEntries(Object.entries(e).map(([t,a])=>[t,la(a)]))}n(Te,"getToolAdapters");function er(){return Object.keys(Te())}n(er,"listToolIds");function tr(){let e={};for(let[t,a]of Object.entries(Te()))e[t]=Object.keys(a.actions??{});return e}n(tr,"listToolActions");function ar(){return Object.entries(Te()).filter(([,e])=>typeof e.getSnapshot=="function").map(([e])=>e)}n(ar,"listSnapshotToolIds");async function sr(e){xe();let t=Te()[e];if(!t)throw new Error(`Unknown tool "${e}"`);if(typeof t.getSnapshot!="function")throw new Error(`Tool "${e}" has no snapshot to read`);return await t.getSnapshot()}n(sr,"readToolSnapshot");function mt(){return q()&&yt().size>0}n(mt,"isToolRegistryReady");async function rr(e,t,a){xe();let s=Te()[e],r=s?.actions?.[t];if(!r)throw new Error(s?`Unknown action "${t}" on tool "${e}"`:`Unknown tool "${e}"`);return await r(a)}n(rr,"dispatchToolAction");async function or(e=2e3){if(mt())return true;let t=Ft()+e;for(;Ft()<t;)if(await new Promise(a=>setTimeout(a,50)),mt())return true;return false}n(or,"waitForToolRegistry");function la(e){let t=n(a=>(...s)=>{xe();let r=false,o=Fe(()=>{q()||(r=true)}),i=n(()=>{if(r)throw new Error("Buoy account access ended while the operation was pending.");xe()},"check");try{let l=a.apply(e,s);return l&&typeof l.then=="function"?Promise.resolve(l).then(c=>(i(),c)).finally(o):(i(),o(),l)}catch(l){throw o(),l}},"guard");return{...e,...e.getSnapshot?{getSnapshot:t(e.getSnapshot)}:{},...e.actions?{actions:Object.fromEntries(Object.entries(e.actions).map(([a,s])=>[a,t(s)]))}:{},...e.subscribe?{subscribe:n(a=>(xe(),e.subscribe(()=>{q()&&a()})),"subscribe")}:{}}}n(la,"guardToolAdapter");var ca="__buoyToolUiBridge";function St(){let e=globalThis;return e[ca]||(e[ca]=new Set),e[ca]}n(St,"openers");function nr(e){let t=St();return t.add(e),()=>{t.delete(e)}}n(nr,"registerToolOpener");function ir(e){for(let t of St())try{if(t(e))return true}catch{}return false}n(ir,"openBuoyTool");function lr(){return St().size>0}n(lr,"canOpenBuoyTools");var ua="__buoyToolAttention";function vt(){let e=globalThis;return e[ua]||(e[ua]={byTool:new Map,listeners:new Set}),e[ua]}n(vt,"attention");function cr(e,t){let a=vt(),s=a.byTool.get(e)??null;if(!(s===t||s&&t&&s.kind===t.kind&&s.label===t.label)){t?a.byTool.set(e,t):a.byTool.delete(e);for(let r of a.listeners)try{r()}catch{}}}n(cr,"setToolAttention");function ur(e){return vt().byTool.get(e)??null}n(ur,"getToolAttention");function dr(e){let t=vt();return t.listeners.add(e),()=>{t.listeners.delete(e)}}n(dr,"subscribeToolAttention");import{createContext as Bf,useContext as Mf,useEffect as Nf}from"react";var hr=Bf(null);function gr(e,t){let a=Mf(hr);return Nf(()=>{if(a)return a(e),()=>a(null)},[a,...t]),a!==null}n(gr,"useToolScreenHeader");var pr=256*1024;function fr(e){let t=new Set(e?.excludeKeys??[]),a=e?.includeKeys?new Set(e.includeKeys):null,s=0,r=n(o=>!t.has(o)&&(!a||a.has(o)),"touch");return{touch:r,allows(o){return r(o)?true:(s+=1,false)},countExcluded(o){s+=o},get excludedHits(){return s},excludedWarning(o){return s>0?`${s} ${o} excluded by you`:null}}}n(fr,"createRestoreScope");function br(){return{ok:true,applied:0,skipped:[],warnings:[]}}n(br,"emptyRestoreResult");function yr(e){return{ok:false,applied:0,skipped:[],warnings:[e]}}n(yr,"failedRestore");function mr(e,t){return{ok:false,applied:0,skipped:[{id:e,reason:t}],warnings:[]}}n(mr,"skippedRestore");function Sr(e,t={}){let{key:a,label:s,oldValue:r,newValue:o,inOld:i,inNew:l}=e;if(!l)return{key:a,label:s,verdict:"removed",oldValue:r};if(!i)return{key:a,label:s,verdict:"added",newValue:o};if((t.equal??Zn)(r,o))return{key:a,label:s,verdict:"unchanged"};let c=t.tooLarge??(u=>ei(u,pr));return c(r)||c(o)?{key:a,label:s,verdict:"too-large",reason:t.tooLargeReason??"value too large to render a diff \u2014 restore still applies it"}:{key:a,label:s,verdict:"changed",oldValue:r,newValue:o}}n(Sr,"classifyPreviewItem");function vr(e,t){return e.verdict==="unchanged"?e:{...e,verdict:"wont-apply",reason:t}}n(vr,"wontApply");function Cr(e,t){let a=n(s=>s===void 0?[]:s instanceof Map?Array.from(s.keys()):Object.keys(s),"keysOf");return new Set([...a(e),...a(t)])}n(Cr,"unionKeys");function Tr(e,t={}){let a=e.toLowerCase();if(t[a])return t[a];for(let[m,C]of Object.entries(t))if(a.includes(m))return C;let s=e.split("").reduce((m,C)=>m+C.charCodeAt(0),0)*137%360,r=.7,o=.6,i=(1-Math.abs(2*o-1))*r,l=i*(1-Math.abs(s/60%2-1)),c=o-i/2,u=0,y=0,S=0;s<60?(u=i,y=l):s<120?(u=l,y=i):s<180?(y=i,S=l):s<240?(y=l,S=i):s<300?(u=l,S=i):(u=i,S=l);let f=n(m=>Math.round((m+c)*255).toString(16).padStart(2,"0"),"toHex");return`#${f(u)}${f(y)}${f(S)}`}n(Tr,"entityColor");function wr(e,t={}){let a=t.maxLength??40;if(e===void 0)return t.undefinedLabel??"undefined";if(e===null)return"null";try{if(typeof e=="function")return t.functionLabel??"(fn)";if(typeof e=="string")return e.length>a?`"${e.slice(0,a-3)}..."`:`"${e}"`;if(typeof e=="number"||typeof e=="boolean")return String(e);if(Array.isArray(e)){if(e.length===0)return"[]";let s=JSON.stringify(e);return s.length>a?`[${e.length} items]`:s}if(typeof e=="object"){let s=Object.keys(e);if(s.length===0)return"{}";let r=JSON.stringify(e);return r.length<=a?r:`{ ${s.length} keys }`}return String(e).slice(0,a)}catch{return"[complex]"}}n(wr,"formatValuePreview");function xr(e,t){if(e===t)return{summary:"no change",changedKeys:[],changedCount:0};if(typeof e!="object"||typeof t!="object"||e===null||t===null)return{summary:"changed",changedKeys:[],changedCount:0};let a=e,s=t,r=Object.keys(a),o=Object.keys(s),i=o.filter(f=>!r.includes(f)),l=r.filter(f=>!o.includes(f)),c=[];for(let f of r)o.includes(f)&&a[f]!==s[f]&&c.push(f);let u=[...i,...l,...c],y=[];if(i.length>0&&y.push(`+${i.length}`),l.length>0&&y.push(`-${l.length}`),c.length>0&&y.push(`~${c.length}`),y.length===0)return{summary:"nested change",changedKeys:[],changedCount:0};let S=u.length;return{summary:`${y.join(" ")} ${S===1?"key":"keys"}`,changedKeys:u,changedCount:S}}n(xr,"shallowDiffSummary");function da(e){if(e==null)return"N/A";if(e===0)return"0 B";let t=1024,a=["B","KB","MB","GB","TB"],s=Math.floor(Math.log(e)/Math.log(t));return`${(e/Math.pow(t,s)).toFixed(1)} ${a[s]}`}n(da,"formatBytes");function kr(e){if(e==null)return"N/A";if(e<1e3)return`${e}ms`;if(e<6e4)return`${(e/1e3).toFixed(1)}s`;if(e<36e5){let s=Math.floor(e/6e4),r=Math.floor(e%6e4/1e3);return r>0?`${s}m ${r}s`:`${s}m`}let t=Math.floor(e/36e5),a=Math.floor(e%36e5/6e4);return a>0?`${t}h ${a}m`:`${t}h`}n(kr,"formatDuration");function Ir(e){return e.toLocaleString()}n(Ir,"formatNumber");var _r=5e4;function Ar(e,t=_r){try{let a=JSON.stringify(e);return a.length>t?`[omitted: ${da(a.length)} \u2014 too large to copy]`:e}catch{return"[omitted: could not serialize]"}}n(Ar,"truncatePayload");function Or(e,t=50,a=20,s=20){if(e.length<=t)return e;let r=e.slice(0,a),o=e.slice(-s);return`${r}...${o}`}n(Or,"truncateMiddle");function Er(e){if(e>=100&&e<200)return{text:String(e),color:w.info,meaning:"Informational"};if(e>=200&&e<300){let t={200:"OK",201:"Created",202:"Accepted",204:"No Content",206:"Partial Content"};return{text:String(e),color:w.success,meaning:t[e]||"Success"}}if(e>=300&&e<400){let t={301:"Moved Permanently",302:"Found",303:"See Other",304:"Not Modified",307:"Temporary Redirect",308:"Permanent Redirect"};return{text:String(e),color:w.warning,meaning:t[e]||"Redirect"}}if(e>=400&&e<500){let t={400:"Bad Request",401:"Unauthorized",402:"Payment Required",403:"Forbidden",404:"Not Found",405:"Method Not Allowed",408:"Request Timeout",409:"Conflict",410:"Gone",422:"Unprocessable Entity",429:"Too Many Requests"};return{text:String(e),color:w.error,meaning:t[e]||"Client Error"}}if(e>=500){let t={500:"Internal Server Error",501:"Not Implemented",502:"Bad Gateway",503:"Service Unavailable",504:"Gateway Timeout",505:"HTTP Version Not Supported"};return{text:String(e),color:w.error,meaning:t[e]||"Server Error"}}return{text:String(e),color:w.muted,meaning:"Unknown"}}n(Er,"formatHttpStatus");function Pr(e){return{GET:w.success,POST:w.info,PUT:w.warning,DELETE:w.error,PATCH:w.network,HEAD:w.muted,OPTIONS:w.secondary,CONNECT:w.critical,TRACE:w.env}[e.toUpperCase()]||w.muted}n(Pr,"getMethodColor");function Rr(e){try{let t=new URL(e);return{protocol:t.protocol.replace(":",""),host:t.hostname,port:t.port||void 0,pathname:t.pathname,search:t.search||void 0,hash:t.hash||void 0}}catch{return null}}n(Rr,"parseUrl");var Ge=[];function ha(e){Ge.unshift(e),Ge=Ge.slice(0,500)}n(ha,"add");function Lr(){return Ge}n(Lr,"getEntries");function $r(){Ge=[]}n($r,"clearEntries");var ga=(e=>(e.Debug="debug",e.Info="info",e.Log="log",e.Warn="warn",e.Error="error",e))(ga||{}),pa=(e=>(e.Auth="Auth",e.Custom="Custom",e.Debug="Debug",e.Error="Error",e.Generic="Generic",e.HTTPRequest="HTTP Request",e.Navigation="Navigation",e.Replay="Replay",e.State="State",e.System="System",e.Touch="Touch",e.UserAction="User Action",e))(pa||{});var Df=n(()=>`${Date.now()}-${Math.random().toString(36).substr(2,9)}`,"generateId"),Br=class Hb{constructor(){this.captureTransaction=n(t=>(this.logSentryEvent("transaction",t),t),"captureTransaction");this.captureSpan=n(t=>(this.logSentryEvent("span",t),t),"captureSpan");this.captureEvent=n(t=>(this.logSentryEvent("event",t),t),"captureEvent");this.captureLog=n(t=>(this.logSentryEvent("console",{message:t.message||"Log entry",level:t.level,category:"console",timestamp:t.timestamp,...t.attributes}),t),"captureLog");this.captureBreadcrumb=n(t=>{let a="unknown";try{let r=globalThis.getCurrentPathname;r&&(a=r())}catch{}let s=t.category;if(t.message?.toLowerCase().includes("ignore"))return null;if(t.message?.includes("Touch event within element:")&&(t.message=t.message.replace("Touch event within element:","")),s==="navigation"&&t.data?.from&&t.data?.to&&(t.message=`From ${t.data.from} To ${t.data.to}`),s==="touch"&&t.data?.path){t.message&&(t.message=t.message.trim());let r={...t.data,category:s,message:t.message,route:a,timestamp:new Date().toISOString(),path:t.message?[{label:t.message}]:t.data?.path};t.data=r}return this.logSentryEvent("breadcrumb",t),t},"captureBreadcrumb")}logSentryEvent(t,a){let s="Generic",r=a.category;if(r)switch(r){case"touch":s="Touch";break;case"xhr":case"fetch":case"http":s="HTTP Request";break;case"navigation":s="Navigation";break;case"auth":s="Auth";break;case"console":s="System";break;case"debug":s="Debug";break;default:r.startsWith("ui.")?s="User Action":r.startsWith("replay.")?s="Replay":r.includes("redux")||r.includes("state")?s="State":s="Custom"}let o={id:Df(),timestamp:Date.now(),level:this.getSentryLevel(a),message:this.getSentryMessage(a),metadata:this.getSentryMetadata(a),type:s};ha(o)}getSentryLevel(t){switch(t.level){case"fatal":case"error":return"error";case"warning":return"warn";case"info":return"info";case"debug":return"debug";default:return"log"}}getSentryMessage(t){let a=t.message;return typeof a=="string"?a:`${t.type||"Unknown"} Event`}getSentryMetadata(t){let{message:a,level:s,type:r,...o}=t;return o}};n(Br,"SentryLogger");var Mr=Br,zf=new Mr;import{useState as fa,useEffect as Nr}from"react";import{jsx as P,jsxs as Ae}from"react/jsx-runtime";var Ct=Se.bubble.settings(),Dr=Se.bubble.userPreferences(),ba={showEnvironment:true,showQueryButton:true,showWifiToggle:true,showEnvButton:false,showSentryButton:false,showStorageButton:false};function zr({onPress:e}){let[t,a]=fa(ba);Nr(()=>{s()},[]);let s=n(async()=>{try{let r=await j.getItem(Ct);r&&a(JSON.parse(r))}catch(r){console.error("[Buoy]","Failed to load bubble settings:",r)}},"loadSettings");return P(Za,{id:"bubble-settings",title:"SETTINGS",subtitle:`${n(()=>Object.values(t).filter(Boolean).length,"getVisibleCount")()}/6 visible`,icon:Ht,iconColor:"#10B981",iconBackgroundColor:"rgba(16, 185, 129, 0.1)",onPress:e||(()=>{}),index:5})}n(zr,"BubbleSettingsSection");function Fr({onSettingsChange:e}){let[t,a]=fa(ba),[s,r]=fa(true);Nr(()=>{o()},[]);let o=n(async()=>{try{let u=await j.getItem(Ct);u&&a(JSON.parse(u))}catch(u){console.error("[Buoy]","Failed to load bubble settings:",u)}finally{r(false)}},"loadSettings"),i=n(async u=>{try{await j.setItem(Ct,JSON.stringify(u)),a(u),e?.(u)}catch(y){console.error("[Buoy]","Failed to save bubble settings:",y)}},"saveSettings"),l=n(async u=>{let y={...t,[u]:!t[u]};try{let S=await j.getItem(Dr),f=S?JSON.parse(S):{},m=u.replace("show","hasSet"),C={...f,[m]:true};await j.setItem(Dr,JSON.stringify(C))}catch(S){console.error("[Buoy]","Failed to save user preference marker:",S)}i(y)},"handleToggle");if(s)return P(k,{style:_.detailContainer,children:P(F,{style:_.loadingText,children:"Loading settings..."})});let c=[{key:"showEnvironment",label:"Environment Indicator",description:"Shows current environment (dev, staging, prod)",icon:P(k,{style:[_.indicator,{backgroundColor:"#10B981"}]})},{key:"showQueryButton",label:"React Query Button",description:"Opens React Query dev tools",icon:P(k,{style:[_.indicator,{backgroundColor:"#F59E0B"}]})},{key:"showWifiToggle",label:"WiFi",description:"Toggle WiFi for testing offline scenarios",icon:P(k,{style:[_.indicator,{backgroundColor:"#8B5CF6"}]})},{key:"showEnvButton",label:"Environment Variables",description:"View and check environment variables",icon:P(Ht,{size:16,color:"#10B981"})},{key:"showSentryButton",label:"Sentry Events",description:"View captured Sentry events and errors",icon:P(k,{style:[_.indicator,{backgroundColor:"#a855f7"}]})},{key:"showStorageButton",label:"Storage Browser",description:"Browse and inspect AsyncStorage data",icon:P(os,{size:16,color:"#3B82F6"})}];return P(k,{style:_.detailContainer,children:Ae(bf,{showsVerticalScrollIndicator:false,contentContainerStyle:_.scrollContent,"sentry-label":"ignore bubble settings scroll",children:[Ae(k,{style:_.header,children:[P(F,{style:_.headerTitle,children:"Developer Tools Settings"}),P(F,{style:_.headerDescription,children:"Configure bubble button visibility"})]}),P(k,{style:_.sectionDivider,children:P(F,{style:_.sectionTitle,children:"Bubble Button Visibility"})}),P(k,{style:_.settingsList,children:c.map(u=>Ae(k,{style:_.settingItem,children:[P(k,{style:_.settingIconContainer,children:u.icon}),Ae(k,{style:_.settingContent,children:[P(F,{style:_.settingLabel,children:u.label}),P(F,{style:_.settingDescription,children:u.description})]}),P(yf,{"sentry-label":"ignore bubble settings section",value:t[u.key],onValueChange:()=>l(u.key),trackColor:{false:"#4B5563",true:"#10B981"},thumbColor:t[u.key]?"#fff":Y.textSecondary})]},u.key))}),Ae(k,{style:_.footer,children:[Ae(k,{style:_.noteContainer,children:[P(is,{size:16,color:Y.textSecondary}),P(F,{style:_.noteText,children:"User status indicator is always visible and cannot be disabled"})]}),P(F,{style:_.restartNote,children:"Changes are saved automatically and will persist across app restarts"})]})]})})}n(Fr,"BubbleSettingsDetail");async function Wr(){try{let e=await j.getItem(Ct);if(e)return JSON.parse(e)}catch(e){console.error("[Buoy]","Failed to load bubble settings:",e)}return ba}n(Wr,"getBubbleVisibilitySettings");var _=We.create({scrollContent:{flexGrow:1},sectionCard:{backgroundColor:Y.input,borderRadius:8,padding:16,flexDirection:"row",alignItems:"center",marginBottom:12},iconContainer:{width:36,height:36,borderRadius:8,backgroundColor:"rgba(16, 185, 129, 0.1)",justifyContent:"center",alignItems:"center",marginRight:12},textContainer:{flex:1},title:{color:Y.text,fontSize:14,fontWeight:"600",marginBottom:2},subtitle:{color:Y.textSecondary,fontSize:12},chevron:{color:st.text.icon,fontSize:20},detailContainer:{flex:1,backgroundColor:Y.card},loadingText:{color:Y.textSecondary,fontSize:14,textAlign:"center",marginTop:20},header:{padding:16,borderBottomWidth:1,borderBottomColor:"rgba(128, 128, 128, 0.2)"},headerTitle:{color:Y.text,fontSize:16,fontWeight:"600",marginBottom:4},headerDescription:{color:Y.textSecondary,fontSize:12},settingsList:{padding:16},settingItem:{flexDirection:"row",alignItems:"center",paddingVertical:12,borderBottomWidth:1,borderBottomColor:"rgba(128, 128, 128, 0.1)"},settingIconContainer:{width:32,height:32,justifyContent:"center",alignItems:"center",marginRight:12},settingContent:{flex:1,marginRight:12},settingLabel:{color:Y.text,fontSize:14,fontWeight:"500",marginBottom:2},settingDescription:{color:st.text.icon,fontSize:11},indicator:{width:8,height:8,borderRadius:4},footer:{padding:16,borderTopWidth:1,borderTopColor:"rgba(128, 128, 128, 0.2)"},noteContainer:{flexDirection:"row",alignItems:"center",gap:8,marginBottom:8},noteText:{color:Y.textSecondary,fontSize:12,flex:1},restartNote:{color:st.text.icon,fontSize:11,fontStyle:"italic"},sectionDivider:{paddingHorizontal:16,paddingVertical:8,marginTop:8,borderTopWidth:1,borderTopColor:"rgba(128, 128, 128, 0.12)"},sectionTitle:{color:Y.textSecondary,fontSize:12,fontWeight:"600",letterSpacing:.5,textTransform:"uppercase"}});function ya(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}n(ya,"isPlainObject");function jr(e,t,a={}){let s=a.storage??j,r=a.parse??(c=>JSON.parse(c)),o=a.serialize??(c=>JSON.stringify(c));function i(c){let u=ya(t)&&ya(c)?{...t,...c}:c;return a.sanitize?a.sanitize(u,c):u}n(i,"resolve");async function l(){try{let c=await s.getItem(e);return c==null||c===""?null:i(r(c))}catch{return null}}return n(l,"loadOrNull"),{key:e,defaults:t,loadOrNull:l,async load(){return await l()??t},async save(c){try{await s.setItem(e,o(c))}catch{}},async clear(){try{await s.removeItem(e)}catch{}}}}n(jr,"definePersistedSetting");import{callCapacitorNative as Hr,hasCapacitorPlugin as Ff,isCapacitorNative as Wf}from"@buoy-gg/license/web";function Ur(){return!Wf()||!Ff("Preferences")?null:{async getAllKeys(){let{keys:e}=await Hr("Preferences","keys");return Array.isArray(e)?e:[]},async multiRemove(e){await Promise.all(e.map(t=>Hr("Preferences","remove",{key:t})))}}}n(Ur,"getCapacitorAppStorage");import{callCapacitorNative as jf,hasCapacitorPlugin as Hf,isCapacitorNative as Uf}from"@buoy-gg/license/web";function Gr(e){if(e.instanceId&&rt(e.instanceId))return null;let t=e.data;if(!t)return e;if(typeof t.key=="string"&&rt(t.key))return null;let a={...t},s=false,r=false,o=false;for(let i of["keys","pairs","prevPairs"])Array.isArray(t[i])&&(r||(r=t[i].length>0),a[i]=t[i].filter(l=>!rt(i==="keys"?l:l[0])),o||(o=a[i].length>0),s||(s=a[i].length!==t[i].length));return r&&!o?null:s?{...e,data:a}:e}n(Gr,"appStorageEvent");function ma(e){try{let t=new URL(e,typeof location>"u"?"http://localhost":location.href),a=t.hostname.toLowerCase();if(["api.buoy.gg","ai.buoy.gg","gateway.buoy.gg"].includes(a)||a==="keygen.sh"||a.endsWith(".keygen.sh")||["buoy.gg","www.buoy.gg"].includes(a)&&/^\/api\/(license|settings|auth|session|install|t)(?:\/|$)/.test(t.pathname)||t.pathname==="/buoy-assets.json")return true;let s=globalThis.__BUOY_INTERNAL_HOSTS__;return s instanceof Set&&[...s].some(r=>typeof r=="string"&&r.toLowerCase()===t.host.toLowerCase())}catch{return false}}n(ma,"isBuoyRequest");function Vr(e,t){return fetch(e,{...t,__buoyInternal:true})}n(Vr,"buoyFetch");function Yr(e){return typeof e[0]=="string"&&/^\[(?:buoy(?:[^\]]*)?|@buoy-gg\/[^\]]+|RnBetterDevTools|React ?Buoy|RN-BUOY DEBUG|js-top|perf-monitor|impersonate|RenderCause|HighlightUpdates|RenderTracker|ProfilerInterceptor|HighlightPerf|DebugBorders|optional-module|route-events|RouteObserver)\]/i.test(e[0])}n(Yr,"isBuoyLog");function qr(e){if(!e)return false;if(ma(e))return true;let t=e;try{t=decodeURIComponent(t)}catch{}return t=t.replace(/\\/g,"/"),/(?:^|\/)node_modules\/@buoy-gg\/[^/]+(?:\/|$)/.test(t)||/(?:^|\/)buoy-packages\/packages\/[^/]+(?:\/|$)/.test(t)||/(?:^|\/)packages\/floating-tools-core\/(?:src|lib\/(?:module|commonjs))\/icons\/assets(?:\/|$)/.test(t)}n(qr,"isBuoyAssetPath");function Kr(e){let t=e;for(;t;){if(t.closest("[data-buoy-root], [data-buoy-portal-host]"))return true;let a=t.getRootNode?.();t=a&&"host"in a?a.host:null}return false}n(Kr,"isBuoyElement");import{useEffect as Gf,useId as Vf,useRef as Jr,useState as Yf}from"react";import{jsx as Oe,jsxs as qf}from"react/jsx-runtime";function Sa(){let[e,t]=Yf(false),a=Jr(null),s=Jr(null),r=Vf(),o=n((i=true)=>{t(false),i&&a.current?.querySelector('[data-account-launcher] [role="button"]')?.focus({preventScroll:true})},"close");return Gf(()=>{if(!e)return;s.current?.focus({preventScroll:true});let i=n(c=>{c.target instanceof Node&&!a.current?.contains(c.target)&&t(false)},"onPointerDown"),l=n(c=>{c.key==="Escape"&&(c.preventDefault(),c.stopPropagation(),t(false),a.current?.querySelector('[data-account-launcher] [role="button"]')?.focus({preventScroll:true}))},"onKeyDown");return document.addEventListener("pointerdown",i),document.addEventListener("keydown",l),()=>{document.removeEventListener("pointerdown",i),document.removeEventListener("keydown",l)}},[e]),typeof document>"u"?null:Oe(mf,{children:qf("div",{ref:a,"data-buoy-account":"",style:{position:"fixed",right:"max(16px, env(safe-area-inset-right))",bottom:"max(20px, env(safe-area-inset-bottom))",zIndex:99999,colorScheme:"dark",fontFamily:"system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"},children:[Oe("style",{children:`
|
|
1
|
+
"use client";import{a as Ko,b as qo,c as Jo,d as Xo,e as Qo,f as Zo,g as en,h as tn,i as an}from"./chunks/chunk-3HELV44Y.mjs";import{a as sn,b as rn,c as on,d as nn,e as ln,f as cn,g as un,h as dn}from"./chunks/chunk-GER55P4B.mjs";import{$ as hn,A as gn,B as pn,C as fn,D as bn,E as yn,F as mn,G as Sn,J as vn,K as Cn,L as Tn,M as wn,N as xn,O as kn,P as In,Q as _n,R as An,S as On,Z as En,_ as Pn,a as Ja,b as Rn,c as Ln,d as ze,e as $n,f as Bn,g as Xa,h as Mn,i as Nn,j as Dn,k as zn,l as Fn,m as Ft,n as Wn,o as jn,p as Hn,q as Un,r as Gn,s as Vn,t as Yn,u as Kn,v as qn,w as Jn,x as Xn,y as Qn,z as Zn}from"./chunks/chunk-GMM6TGFO.mjs";import"./chunks/chunk-VAR5UK6J.mjs";import{a as ei,d as ti,f as Wt}from"./chunks/chunk-NOSWH3E2.mjs";import{$ as ai,$a as si,$b as ri,A as oi,Aa as ni,Ab as ii,Ac as li,B as ci,Ba as ui,Bb as di,Bc as hi,C as gi,Ca as pi,Cb as Qa,Cc as fi,D as bi,Da as yi,Db as mi,Dc as Za,E as Si,Ea as vi,Eb as Ci,Ec as Ti,F as wi,Fa as xi,Fb as ki,Fc as Ii,G as _i,Ga as Ai,Gb as Oi,Gc as Ei,H as Pi,Ha as Ri,Hb as Li,I as $i,Ia as Bi,Ib as Mi,J as es,Ja as Ni,Jb as Di,K as zi,Ka as Fi,Kb as Wi,L as ji,La as Hi,Lb as Ui,M as Gi,Ma as Vi,Mb as Yi,N as Ki,Na as qi,Nb as Ji,O as Xi,Oa as Qi,Ob as Zi,P as el,Pa as tl,Pb as al,Q as sl,Qa as rl,Qb as ol,R as nl,Ra as il,Rb as ll,S as cl,Sa as ul,Sb as dl,T as hl,Ta as gl,Tb as pl,U as fl,Ua as bl,Ub as yl,V as ml,Va as Sl,Vb as vl,W as Cl,Wa as Tl,Wb as wl,X as xl,Xa as kl,Xb as Il,Y as _l,Ya as Al,Yb as Ol,Z as El,Za as Pl,Zb as Rl,_ as Ll,_a as $l,_b as Bl,a as Ml,aa as Nl,ab as Dl,ac as zl,b as Fl,ba as Wl,bb as jl,bc as Hl,c as Ul,ca as Gl,cb as Vl,cc as Yl,d as Kl,da as ql,db as Jl,dc as Xl,e as Ql,ea as Zl,eb as ec,ec as tc,f as ac,fa as sc,fb as rc,fc as oc,g as nc,ga as ic,gb as lc,gc as cc,h as uc,ha as dc,hb as hc,hc as gc,i as ts,ia as pc,ib as fc,ic as bc,j as yc,ja as mc,jb as Sc,jc as vc,k as Cc,ka as Tc,kb as wc,kc as xc,l as kc,la as Ic,lb as _c,lc as Ac,m as Oc,ma as Ec,mb as Pc,mc as Rc,n as Lc,na as $c,nb as Bc,nc as Mc,o as Nc,oa as Dc,ob as zc,oc as Fc,p as le,pa as Wc,pb as jc,pc as Hc,q as K,qa as Uc,qb as Gc,qc as Vc,r as xe,ra as Yc,rb as Kc,rc as qc,s as Fe,sa as Jc,sb as Xc,sc as Qc,t as as,ta as Zc,tb as eu,tc as tu,u as au,ua as su,ub as ru,uc as ou,v as nu,va as iu,vb as lu,vc as cu,w as uu,wa as du,wb as hu,wc as gu,x as pu,xa as fu,xb as bu,xc as yu,y as mu,ya as Su,yb as vu,yc as jt,z as Cu,za as Tu,zb as ss,zc as wu}from"./chunks/chunk-ZTIJC3VV.mjs";import{a as xu}from"./chunks/chunk-HIAN3HBD.mjs";import{a as ku,b as Iu,c as _u,d as Au,e as Ou,f as Eu,g as Pu,h as Ru,i as Lu,j as $u,k as Bu,l as Mu,m as Nu,n as Du,o as zu,p as Fu}from"./chunks/chunk-4YLP5MMN.mjs";import{a as d,b as rs}from"./chunks/chunk-GF5C5DVX.mjs";import{a as Wu,b as ju}from"./chunks/chunk-HPZXETRA.mjs";import{a as Hu,b as Uu,c as Gu,d as Vu,e as Yu,f as Ku,g as qu,h as Ju,i as Xu,j as Qu,k as Zu,l as ed}from"./chunks/chunk-4HIK66DZ.mjs";import{$ as td,$a as ad,$b as os,$c as sd,Aa as rd,Ab as od,Ac as nd,B as id,Ba as ld,Bb as cd,Bc as ud,C as dd,Ca as hd,Cb as gd,Cc as pd,D as fd,Da as bd,Db as yd,Dc as md,E as Sd,Ea as vd,Eb as Cd,Ec as Td,Fa as wd,Fb as xd,Fc as kd,Ga as Id,Gb as _d,Gc as Ht,H as Ad,Ha as Od,Hb as Ed,Hc as Pd,Ia as Rd,Ib as Ld,Ic as $d,J as Bd,Ja as Md,Jb as Nd,Jc as Dd,Ka as zd,Kb as Fd,Kc as Wd,La as jd,Lb as Hd,Lc as Ud,Ma as Gd,Mb as Vd,Mc as Yd,N as Kd,Na as qd,Nb as Jd,Nc as Xd,O as Qd,Oa as Zd,Ob as eh,Oc as th,P as ah,Pa as sh,Pb as rh,Pc as oh,Q as nh,Qa as ih,Qb as lh,Qc as ch,R as uh,Ra as dh,Rb as hh,Rc as gh,S as ph,Sa as fh,Sb as bh,Sc as yh,T as mh,Ta as Sh,Tb as vh,Tc as Ch,U as Th,Ua as wh,Ub as ns,Uc as xh,V as kh,Va as Ih,Vb as _h,Vc as Ah,W as Oh,Wa as Eh,Wb as Ph,Wc as Rh,X as Lh,Xa as $h,Xb as Bh,Xc as Mh,Y as Nh,Ya as Dh,Yb as zh,Yc as Fh,Z as Wh,Za as jh,Zb as Hh,Zc as Uh,_ as Gh,_a as Vh,_b as Yh,_c as Kh,a as qh,aa as Jh,ab as Xh,ac as Qh,ad as Zh,b as eg,ba as tg,bb as ag,bc as sg,bd as rg,c as og,ca as ng,cb as ig,cc as lg,cd as cg,d as ug,da as dg,db as hg,dc as is,dd as gg,e as pg,ea as fg,eb as bg,ec as yg,ed as mg,f as Sg,fa as vg,fb as Cg,fc as Tg,fd as wg,g as xg,ga as kg,gb as Ig,gc as _g,gd as Ag,h as Og,ha as Eg,hb as Pg,hc as Rg,hd as Lg,i as $g,ia as Bg,ib as Mg,ic as Ng,id as Dg,j as zg,ja as Fg,jb as Wg,jc as jg,jd as Hg,k as Ug,ka as Gg,kb as Vg,kc as Yg,kd as Kg,l as qg,la as Jg,lb as Xg,lc as Qg,ld as Zg,m as ep,ma as tp,mb as ap,mc as sp,md as rp,n as op,na as np,nb as ip,nc as lp,nd as cp,o as up,oa as dp,ob as hp,oc as gp,od as pp,p as fp,pa as bp,pb as yp,pc as mp,pd as Sp,q as vp,qa as Cp,qb as Tp,qc as wp,qd as xp,r as kp,ra as Ip,rb as _p,rc as Ap,rd as Op,s as Ep,sa as Pp,sb as Rp,sc as Lp,sd as $p,t as Bp,ta as Mp,tb as Np,tc as Dp,u as zp,ua as Fp,ub as Wp,uc as jp,va as Hp,vb as Up,vc as Gp,wa as Vp,wb as Yp,wc as Kp,xa as qp,xb as Jp,xc as Xp,ya as Qp,yb as Zp,yc as ef,za as tf,zb as af,zc as sf}from"./chunks/chunk-CJTGUGMQ.mjs";import{a as st,d as w,e as rf,f as Y,g as of}from"./chunks/chunk-AHVO74UQ.mjs";import{a as nf,b as lf,c as cf,d as uf,e as df}from"./chunks/chunk-P32XO2YS.mjs";import{a as Se,b as rt,c as ls,d as j,e as hf,f as gf}from"./chunks/chunk-2STKTXD3.mjs";import{H as pf,J as We,a as k,b as F,d as ot,g as ff,h as bf,j as yf,r as Ut}from"./chunks/chunk-5G6RSRP4.mjs";import{a as Gt,c as mf}from"./chunks/chunk-SBYYOE2T.mjs";import{a as n}from"./chunks/chunk-T6T3FEMU.mjs";var cs=class Mb extends Ja{constructor(t){super();this.events=[];this.arrayListeners=new Set;this.captureSuppressed=false;this.clearListeners=new Set;this.maxEvents=t.maxEvents??500,this.storeName=t.storeName,Promise.resolve().then(()=>{let a=n(()=>{le().status==="locked"?(this.stopCapturing(),this.events=[],this.notifyArrayListeners()):this.getTotalSubscriberCount()>0&&!this.captureSuppressed&&!this.isCapturing()&&this.startCapturing()},"reconcile");Fe(a),a()})}onSubscribe(){this.getTotalSubscriberCount()===1&&!this.captureSuppressed&&le().status!=="locked"&&this.startCapturing(),ze(this.storeName)}onUnsubscribe(){this.getTotalSubscriberCount()===0&&this.stopCapturing(),ze(this.storeName)}getTotalSubscriberCount(){return this.listeners.size+this.arrayListeners.size}subscribeToEvents(t){let a=this.getTotalSubscriberCount()===0;return this.arrayListeners.add(t),a&&!this.captureSuppressed&&le().status!=="locked"&&this.startCapturing(),ze(this.storeName),t(this.getEvents()),()=>{this.arrayListeners.delete(t),this.getTotalSubscriberCount()===0&&this.stopCapturing(),ze(this.storeName)}}onEvent(t){return this.subscribe(t)}addEvent(t){le().status!=="locked"&&(this.events=[t,...this.events].slice(0,this.maxEvents),K()&&this.notify(t),this.notifyArrayListeners())}notifyArrayListeners(){let t=this.getEvents();this.arrayListeners.forEach(a=>{try{a(t)}catch{}})}getEvents(){return K()?this.events:[]}getEventCount(){return K()?this.events.length:0}clearEvents(){this.events=[],this.notifyArrayListeners(),this.clearListeners.forEach(t=>{try{t()}catch{}})}onClear(t){return this.clearListeners.add(t),()=>{this.clearListeners.delete(t)}}disableCapture(){this.captureSuppressed=true,this.isCapturing()&&this.stopCapturing()}replaceEvents(t){this.events=this.dedupeById(t).slice(0,this.maxEvents),this.notifyArrayListeners()}dedupeById(t){let a=new Set,s=[];for(let r of t){let o=r?.id;if(o==null){s.push(r);continue}a.has(o)||(a.add(o),s.push(r))}return s}setMaxEvents(t){this.maxEvents=t,this.events.length>t&&(this.events=this.events.slice(0,t),this.notifyArrayListeners())}getSubscriberCounts(){return{eventCallbacks:this.listeners.size,arrayListeners:this.arrayListeners.size,total:this.getTotalSubscriberCount()}}};n(cs,"BaseEventStore");var Sf=cs;import{useEffect as vf,useMemo as Cf,useState as Tf}from"react";var wf=[{value:"buoy.gg/api/license",mode:"contains"},{value:"api.keygen.sh",mode:"contains"}];function Vt(e,t){let a=e.toLowerCase(),s=t.value.toLowerCase();if(t.mode==="contains")return a.includes(s);try{let r=new URL(e);return s.startsWith("/")?r.pathname.toLowerCase()===s:s.startsWith("http://")||s.startsWith("https://")?`${r.origin}${r.pathname}`.toLowerCase()===s:r.host.toLowerCase()===s}catch{return a===s}}n(Vt,"urlMatchesIgnoredPattern");function us(e,t){return!e||t.length===0?false:t.some(a=>Vt(e,a))}n(us,"isUrlIgnored");var ds=wf;function Yt(e){if(!Array.isArray(e))return[];let t=[];for(let a of e)if(typeof a=="string"&&a.trim())t.push({value:a,mode:"contains"});else if(a&&typeof a=="object"&&typeof a.value=="string"){let s=a;t.push({value:s.value,mode:s.mode==="exact"?"exact":"contains"})}return t}n(Yt,"migratePatterns");function Kt(e){let t=[...e];for(let a of ds)t.some(s=>s.value===a.value)||t.push({...a});return t}n(Kt,"ensureDefaults");var hs=class Db{constructor(){this.patterns=Kt(ds.map(t=>({...t})));this.teamPatterns=[];this.merged=this.patterns;this.listeners=new Set;this.loaded=false;this.loadPromise=null;this.dirty=false}getPatterns(){return this.merged}isTeamOnly(t){return!this.patterns.some(a=>a.value===t)&&this.teamPatterns.some(a=>a.value===t)}setTeamPatterns(t){this.teamPatterns=Yt(t),this.remerge(),this.emit()}reload(){return this.loaded=false,this.loadPromise=null,this.dirty=false,this.ensureLoaded()}remerge(){let t=this.teamPatterns.filter(a=>!this.patterns.some(s=>s.value===a.value));this.merged=t.length>0?[...this.patterns,...t]:this.patterns}subscribe(t){return this.listeners.add(t),this.ensureLoaded(),()=>{this.listeners.delete(t)}}emit(){this.listeners.forEach(t=>t())}ensureLoaded(){return this.loaded?Promise.resolve():this.loadPromise?this.loadPromise:(this.loadPromise=(async()=>{try{let t=await j.getItem(Se.network.ignoredDomains());if(t&&!this.dirty){let a=Kt(Yt(JSON.parse(t)));this.patterns=a,this.remerge()}}catch{}finally{this.loaded=true,this.emit()}})(),this.loadPromise)}persist(){j.setItem(Se.network.ignoredDomains(),JSON.stringify(this.patterns)).catch(()=>{})}commit(t){this.dirty=true,this.patterns=t,this.remerge(),this.emit(),this.persist()}add(t){let a=t.value.trim();a&&(this.patterns.some(s=>s.value===a)||this.commit([...this.patterns,{value:a,mode:t.mode}]))}remove(t){this.patterns.some(a=>a.value===t)&&this.commit(this.patterns.filter(a=>a.value!==t))}toggle(t){let a=t.trim();a&&this.commit(this.patterns.some(s=>s.value===a)?this.patterns.filter(s=>s.value!==a):[...this.patterns,{value:a,mode:"contains"}])}toggleMode(t){this.patterns.some(a=>a.value===t)&&this.commit(this.patterns.map(a=>a.value===t?{...a,mode:a.mode==="contains"?"exact":"contains"}:a))}};n(hs,"IgnoredPatternsStore");var xf=hs,X=new xf,kf=n(e=>X.add(e),"addPattern"),If=n(e=>X.remove(e),"removePattern"),_f=n(e=>X.toggle(e),"togglePattern"),Af=n(e=>X.toggleMode(e),"togglePatternMode"),Of=n(e=>X.isTeamOnly(e),"isTeamOnlyPattern");function gs(){let[e,t]=Tf(()=>X.getPatterns());vf(()=>X.subscribe(()=>{t(X.getPatterns())}),[]);let a=Cf(()=>new Set(e.map(s=>s.value)),[e]);return{patterns:e,values:a,add:kf,remove:If,toggle:_f,toggleMode:Af,isTeamOnly:Of}}n(gs,"useIgnoredPatterns");import{useSyncExternalStore as Ef}from"react";var nt={},qt=new Map,Jt=new Set,je=[];function ps(e){if(!e)return je;try{let t=JSON.parse(e);if(!Array.isArray(t))return je;let a=t.map(s=>typeof s=="string"?s:s&&typeof s.value=="string"?s.value:"").map(s=>s.trim()).filter(Boolean);return a.length?[...new Set(a)]:je}catch{return je}}n(ps,"parseList");var it={set(e){Object.keys({...nt,...e}).some(t=>nt[t]!==e[t])&&(nt=e,qt.clear(),Jt.forEach(t=>t()))},getList(e){let t=qt.get(e);return t||(t=ps(nt[e]),qt.set(e,t)),t},subscribe(e){return Jt.add(e),()=>Jt.delete(e)}};function fs(e){return Ef(it.subscribe,()=>it.getList(e),()=>je)}n(fs,"useTeamList");function bs(e){typeof requestAnimationFrame=="function"?requestAnimationFrame(()=>e()):setTimeout(e,0)}n(bs,"scheduleFrame");function ys(e){let t=e.id,a=e.order??"append",s=e.coalesce??"sync",r=e.flushMinIntervalMs??150,o=e.max,i=[],l=false,c=e.firstId??1,u=0,y=false,S=[],f=false;function m(){f||(f=true,Fe(()=>{le().status==="locked"&&(i=[]),V()}))}n(m,"observe");let C=new Set,A=new Set;function W(){for(let v of C)try{v()}catch{}}n(W,"fire");function V(){if(s==="sync"){W();return}y||(y=true,bs(()=>{y=false,W()}))}n(V,"emit");function M(v){return v.length<=o?v:a==="append"?v.slice(v.length-o):v.slice(0,o)}return n(M,"trim"),{id:t,subscribe(v){return m(),C.add(v),()=>{C.delete(v)}},getSnapshot(){return m(),K()?i:S},size(){return K()?i.length:0},add(v){m(),!(l||le().status==="locked")&&(a==="append"?i=i.length>=o?[...i.slice(i.length-o+1),v]:[...i,v]:i=i.length>=o?[v,...i.slice(0,o-1)]:[v,...i],V())},set(v){m(),K()&&(i=M(v),V())},update(v){m(),le().status!=="locked"&&(i=M(v(i)),V())},clear(){for(let v of A)try{v()}catch{}i.length!==0&&(i=[],V())},onClear(v){return A.add(v),()=>{A.delete(v)}},notify(){V()},flushSync(v=false){let se=Date.now();if(!(!v&&se-u<r)){u=se;try{let $=globalThis.__buoyFlushToolSync;if(!$)return;for(let Ye of $)Ye(t)}catch{}}},setPaused(v){l=v},isPaused(){return l},setMax(v){o=v;let se=M(i);se!==i&&(i=se,V())},getMax(){return o},allocId(){return c++},bumpIdAbove(v){v+1>c&&(c=v+1)},listenerCount(){return C.size}}}n(ys,"createToolStore");var ms=class Fb{constructor(t={}){this.items=[];this.itemListeners=new Set;this.clearListeners=new Set;this.idCounter=0;this.enabled=true;this.captureSuppressed=false;this.max=t.max??200}canRecord(){return this.enabled&&!this.captureSuppressed}nextId(){return`${Date.now()}-${++this.idCounter}`}push(t){this.items=[t,...this.items].slice(0,this.max)}record(t){this.push(t),this.notifyListeners()}setItems(t){this.items=t.slice(0,this.max),this.notifyListeners()}getAll(){return[...this.items]}getById(t){return this.items.find(a=>a.id===t)}get size(){return this.items.length}clear(){this.items=[],this.notifyListeners(),this.clearListeners.forEach(t=>{try{t()}catch{}})}onClear(t){return this.clearListeners.add(t),()=>{this.clearListeners.delete(t)}}disableCapture(){this.captureSuppressed=true}isCaptureSuppressed(){return this.captureSuppressed}replaceAll(t){return this.enabled?(this.setItems(t),true):false}hydrateById(t,a){let s=this.items.findIndex(r=>r.id===t);s!==-1&&(this.items=[...this.items.slice(0,s),{...this.items[s],...a},...this.items.slice(s+1)],this.notifyListeners())}setEnabled(t){this.enabled=t}getEnabled(){return this.enabled}setMax(t){this.max=t,this.items.length>t&&(this.items=this.items.slice(0,t),this.notifyListeners())}getMax(){return this.max}subscribe(t){return this.itemListeners.add(t),()=>{this.itemListeners.delete(t)}}notifyListeners(){let t=this.getAll();this.itemListeners.forEach(a=>a(t))}get listenerCount(){return this.itemListeners.size}};n(ms,"ChangeLog");var Pf=ms;var ve=n(e=>typeof e=="object"&&e!==null&&!Array.isArray(e),"isPlainObject"),Rf=["id","lineId","key","uuid","_id","slug","name"];function lt(e){if(!e.length||!e.every(ve))return;let t=e[0];for(let a of Rf){if(!(a in t))continue;let s=e.map(r=>r[a]);if(s.every(r=>typeof r=="string"||typeof r=="number")&&new Set(s.map(String)).size===s.length)return a}}n(lt,"identityField");function Ss(e,t,a,s){let r=s[t];return typeof r=="string"||typeof r=="number"?String(r)!==a?{ok:false,error:`The new item is addressed as \`${a}\` but carries \`${t}\`: ${JSON.stringify(r)}. Use the same value for both \u2014 address it by the id it carries.`}:{ok:true,value:r}:e.every(o=>typeof o[t]=="number")&&a.trim()!==""&&String(Number(a))===a?{ok:true,value:Number(a)}:{ok:true,value:a}}n(Ss,"identityForAdd");function ct(e,t,a="",s=[]){if(Array.isArray(e)&&ve(t)){let r=lt(e);if(!r)return{patch:t,notes:s};let o=new Map(e.map(y=>[String(y[r]),y])),i=e.slice(),l=0,c=0,u=0;for(let[y,S]of Object.entries(t)){let f=i.findIndex(m=>String(m[r])===y);if(S===null){if(f===-1)return{patch:t,notes:s};i.splice(f,1),l++}else if(f===-1){if(!ve(S))return{patch:t,notes:s};let m=Ss(e,r,y,S);if(!m.ok)return{patch:t,notes:s,error:m.error};i.push({...S,[r]:m.value}),u++}else{let m=ct(o.get(y),S,`${a}[${y}]`,s);if(m.error)return{patch:t,notes:s,error:m.error};let C=i[f];i[f]=ve(C)&&ve(m.patch)?{...C,...m.patch}:m.patch,c++}}return s.push(`${a||"(root)"}: addressed by \`${r}\` \u2014 ${c} changed, ${u} added, ${l} removed, ${i.length} item(s) remain`),{patch:i,notes:s}}if(ve(e)&&ve(t)){let r={};for(let[o,i]of Object.entries(t)){let l=a?`${a}.${o}`:o;if(!(o in e)){r[o]=i;continue}let c=ct(e[o],i,l,s);if(c.error)return{patch:t,notes:s,error:c.error};r[o]=c.patch}return{patch:r,notes:s}}return{patch:t,notes:s}}n(ct,"expandKeyedArrays");var ut=n(e=>typeof e=="object"&&e!==null&&!Array.isArray(e),"isPlainObject"),Xt=3,Lf=24,vs=40,dt=600;function ke(e,t=0){if(e===null)return"null";if(Array.isArray(e)){if(!e.length)return"unknown[]";if(t>=Xt)return"\u2026[]";let s=ke(e[0],t+1);return s.includes(" ")||s.endsWith("]")?`(${s})[]`:`${s}[]`}if(ut(e)){if(t>=Xt)return"{\u2026}";let s=Object.keys(e),r=s.slice(0,Lf),o=r.map(l=>`${l}: ${ke(e[l],t+1)}`).join(", "),i=s.length>r.length?`, +${s.length-r.length} more`:"";return`{${o}${i}}`}let a=typeof e;return a==="undefined"?"undefined":a==="function"?"function":a}n(ke,"shapeOf");function Ce(e,t="",a=[],s=0,r={visited:0}){if(s>Xt||a.length>=vs||r.visited>=dt)return a;if(Array.isArray(e)){let o=e[0];if(a.push({path:t||"(root)",length:e.length,...e.length?{item:ke(o)}:{}}),e.length&&ut(o))for(let[i,l]of Object.entries(o)){if(++r.visited>=dt)break;Ce(l,t?`${t}[].${i}`:`[].${i}`,a,s+1,r)}return a}if(ut(e))for(let[o,i]of Object.entries(e)){if(++r.visited>=dt)break;Ce(i,t?`${t}.${o}`:o,a,s+1,r)}return a}n(Ce,"listShapes");function Cs(e){let t={visited:0};return Ce(e,"",[],0,t).length>=vs||t.visited>=dt}n(Cs,"shapesWereTruncated");function Ts(e){return Ce(e).filter(t=>t.item===void 0).map(t=>t.path)}n(Ts,"unshapedLists");function ws(e){if(e===void 0)return;let t=Ce(e),a=ke(e);if(!(!t.length&&!ut(e)&&!Array.isArray(e)))return t.length?{shape:a,lists:t}:{shape:a}}n(ws,"shapeSummary");var te=n(e=>typeof e=="object"&&e!==null&&!Array.isArray(e),"isPlainObject");function xs(e,t,a=2e3){let s=[{node:e,path:""}],r=0;for(;s.length&&r<a;){let{node:o,path:i}=s.shift();if(r++,Array.isArray(o))o.slice(0,20).forEach((l,c)=>s.push({node:l,path:`${i}[${c}]`}));else if(te(o))for(let[l,c]of Object.entries(o)){let u=i?`${i}.${l}`:l;if(l===t)return u;(te(c)||Array.isArray(c))&&s.push({node:c,path:u})}}}n(xs,"findFieldPath");function Qt(e,t,a,s,r){let o=xs(e,r??a),i=s.slice(0,12).join(", ")||"(no fields)";return o?`No field "${a}" at "${t}" \u2014 did you mean path "${o}"? "${t}" has: ${i}.`:`No field "${a}" at "${t}". It has: ${i}.`}n(Qt,"missingFieldError");function Zt(e,t){let a=e;for(let s of t.split(".")){if(!te(a))return;a=a[s]}return a}n(Zt,"fieldOf");function ht(e){if(!e.trim())return;let t=[],a=0;for(;a<e.length;){if(e[a]==="."){a++;continue}if(e[a]==="["){let o=e.indexOf("]",a);if(o===-1)return;let i=e.slice(a+1,o);if(/^\d+$/.test(i))t.push({kind:"index",index:Number(i)});else{let l=i.indexOf("=");if(l<=0)return;t.push({kind:"match",field:i.slice(0,l).trim(),value:i.slice(l+1).trim()})}a=o+1;continue}let s=a;for(;s<e.length&&e[s]!=="."&&e[s]!=="[";)s++;let r=e.slice(a,s);if(!r)return;t.push({kind:"key",key:r}),a=s}return t.length?t:void 0}n(ht,"parsePath");function ks(e,t){let a=ht(t);if(!a)return{ok:false,error:`Could not read the path "${t}". Use dotted keys with optional [0] or [field=value], like "item.name" or "lines[lineId=seed-1].qty".`};let s=e,r=[];for(let o of a){if(s==null)return{ok:false,error:`"${r.join(".")||"(root)"}" is ${s===null?"null":"not set"}, so there is nothing at "${t}".`};if(o.kind==="key"){if(!te(s))return{ok:false,error:`"${r.join(".")||"(root)"}" is not an object, so it has no field "${o.key}".`};if(!(o.key in s)){let i=a[a.length-1];return{ok:false,error:Qt(e,r.join(".")||"(root)",o.key,Object.keys(s),i?.kind==="key"?i.key:void 0)}}s=s[o.key],r.push(o.key)}else if(o.kind==="index"){if(!Array.isArray(s))return{ok:false,error:`"${r.join(".")||"(root)"}" is not a list, so [${o.index}] means nothing.`};s=s[o.index],r.push(`[${o.index}]`)}else{if(!Array.isArray(s))return{ok:false,error:`"${r.join(".")||"(root)"}" is not a list, so [${o.field}=${o.value}] means nothing.`};let i=s.find(l=>te(l)&&String(Zt(l,o.field))===o.value);if(i===void 0)return{ok:false,error:`No item with ${o.field}="${o.value}" in "${r.join(".")||"(root)"}".`};s=i,r.push(`[${o.field}=${o.value}]`)}}return{ok:true,value:s}}n(ks,"readPath");function Is(e,t,a){let s=ht(t);if(!s)return{ok:false,error:`Could not read the path "${t}". Use dotted keys with optional [0] or [field=value], like "item.name" or "lines[lineId=seed-1].qty".`};if(s[0]?.kind!=="key")return{ok:false,error:`A path must start with a field name, not a list index \u2014 "${t}" does not say which list.`};let r=n((i,l)=>{if(l>=s.length)return{ok:true,patch:a};let c=s[l];if(c.kind==="key"){if(te(i)&&!(c.key in i)&&l+1<s.length){let W=s[s.length-1];return{ok:false,error:Qt(e,Ie(s,l),c.key,Object.keys(i),W?.kind==="key"?W.key:void 0)}}let C=te(i)?i[c.key]:void 0,A=r(C,l+1);return A.ok?{ok:true,patch:{[c.key]:A.patch}}:A}if(!Array.isArray(i))return{ok:false,error:`"${Ie(s,l)}" is not a list, so "${t}" cannot be resolved. Read it first \u2014 \`shape\` on the read says what each field holds.`};let u=c.kind==="index"?c.index:i.findIndex(C=>te(C)&&String(Zt(C,c.field))===c.value),y=u>=0?i[u]:void 0;if(c.kind==="index"?u<0||u>=i.length:u<0)return{ok:false,error:c.kind==="index"?`"${Ie(s,l)}" has ${i.length} item(s), so there is nothing at [${c.index}].`:`No item with ${c.field}="${c.value}" in "${Ie(s,l)}".`};if(!te(y)){if(l<s.length-1)return{ok:false,error:`"${Ie(s,l)}[${c.kind==="index"?c.index:`${c.field}=${c.value}`}]" holds ${y===null?"null":typeof y}, not an object, so "${t}" cannot go any deeper. Set the item itself.`};let C=i.slice();return C[u]=a,{ok:true,patch:C}}let S=r(y,l+1);if(!S.ok)return S;let f=lt(i);if(f)return{ok:true,patch:{[String(y[f])]:S.patch}};let m=i.slice();return m[u]=te(S.patch)?{...y,...S.patch}:S.patch,{ok:true,patch:m}},"build"),o=r(e,0);return o.ok?{ok:true,patch:o.patch}:o}n(Is,"patchFromPath");function Ie(e,t){return e.slice(0,t).map(a=>a.kind==="key"?a.key:a.kind==="index"?`[${a.index}]`:`[${a.field}=${a.value}]`).join(".").replace(/\.\[/g,"[")||"(root)"}n(Ie,"pathUpTo");var ce=n(e=>!!e&&typeof e=="object"&&!Array.isArray(e),"isPlainObject");function _e(e){return Array.isArray(e)?"array":e===null?"null":typeof e=="object"?"object":typeof e}n(_e,"shapeKind");var _s=["string","number","boolean"];function ea(e,t,a=2e3){let s=[{node:e,path:""}],r=0;for(;s.length&&r<a;){let{node:o,path:i}=s.shift();if(r++,Array.isArray(o))o.slice(0,20).forEach((l,c)=>s.push({node:l,path:`${i}[${c}]`}));else if(ce(o))for(let[l,c]of Object.entries(o)){let u=i?`${i}.${l}`:l;if(l===t&&i)return u;(ce(c)||Array.isArray(c))&&s.push({node:c,path:u})}}}n(ea,"findKeyPath");function gt(e,t,a={},s=e,r="",o=[]){let i=a.noun??"data",l=r||"(root)";if(Array.isArray(t)){if(!Array.isArray(e))return o.push({path:l,kind:"type-change",detail:`${_e(e)} \u2192 array`}),o;let f=e.length?e[0]:void 0;return f!==void 0&&(ce(f)||Array.isArray(f))&&t.forEach((m,C)=>{let A=`${r}[${C}]`;if(ce(f)&&ce(m))for(let W of Object.keys(f))W in m||o.push({path:`${A}.${W}`,kind:"missing-key",detail:`list items need \`${W}\` \u2014 the items already in the list have it`});gt(f,m,a,s,A,o)}),o}if(ce(t)){if(!ce(e))return o.push({path:l,kind:"type-change",detail:`${_e(e)} \u2192 object`}),o;for(let[f,m]of Object.entries(t)){let C=r?`${r}.${f}`:f;if(f in e)gt(e[f],m,a,s,C,o);else{let A=ea(s,f);o.push({path:C,kind:"add-key",detail:A?`no such field here \u2014 did you mean \`${A}\`?`:`no field named \`${f}\` exists in this ${i}`,...A?{movedTo:A}:{}})}}return o}let c=_e(e),u=_e(t),y=c==="null"&&_s.includes(u),S=u==="null"&&_s.includes(c);return c!==u&&!y&&!S&&o.push({path:l,kind:"type-change",detail:`${c} \u2192 ${u}`}),o}n(gt,"typedEditViolations");function As(e,t){if(!t.length||!t.every(s=>s.kind==="add-key"&&s.movedTo))return;let a={};for(let s of t){let r=Os(e,s.path);if(r===void 0||s.movedTo.includes("["))return;let o=a,i=s.movedTo.split(".");i.slice(0,-1).forEach(l=>{o[l]??(o[l]={}),o=o[l]}),o[i[i.length-1]]=r}return a}n(As,"suggestedPatch");function Os(e,t){let a=e;for(let s of t.split(".")){if(!ce(a))return;a=a[s]}return a}n(Os,"getAtDotted");function Es(e,t,a){let s=e.slice(0,6).map(o=>`\`${o.path}\`: ${o.detail}`).join("; "),r=e.length>6?`; +${e.length-6} more`:"";return`Refused: this isn't a same-type edit of existing fields (the rule the React Query devtools enforces). ${s}${r}. You can only change the VALUE of a field that already exists, to the same type \u2014 you can't add fields, change a field's type, or null a list/object the screen renders. Clearing a scalar to null is fine. Send just the field(s) you're changing, nested to match the current shape of this ${t}. Use force:true only to deliberately break that.`+(a?` This is the same edit at the right depth \u2014 send it as the patch: ${JSON.stringify(a)}`:"")}n(Es,"refusalText");function He(e,t){let a=0,s=false,r=false,o=[e],i=new Set;for(;o.length>0;){if(a>t)return{bytes:a,sawRepeat:s,sawBigInt:r};let l=o.pop();if(l==null)a+=4;else if(typeof l=="string")a+=l.length+2;else if(typeof l=="number")a+=8;else if(typeof l=="boolean")a+=5;else if(typeof l=="object"){if(i.has(l)){s=true;continue}if(i.add(l),Array.isArray(l)){a+=2+l.length;for(let c=0;c<l.length;c++)o.push(l[c])}else{a+=2;for(let c in l)a+=c.length+4,o.push(l[c])}}else typeof l=="bigint"&&(r=true),a+=4}return{bytes:a,sawRepeat:s,sawBigInt:r}}n(He,"approxJsonSize");function pt(e,t){let a=He(e,t);return a.bytes>t?true:!a.sawRepeat&&!a.sawBigInt?false:!Xa(e)}n(pt,"isOverWireBudget");var Ps=16*1024,ft=8*1024*1024;function Rs(e,t){return Object.freeze({[`__buoy${e}OnDevice`]:true,note:t})}n(Rs,"onDeviceMarker");function Ls(e,t){return typeof e=="object"&&e!==null&&e[`__buoy${t}OnDevice`]===true}n(Ls,"isOnDeviceMarker");function ta(e=ft){return{__buoyTruncated:true,note:`Exceeds the ${e/1048576}MB detail limit \u2014 inspect it on-device.`}}n(ta,"truncatedNote");function $s(e,t,a=Ps){return e===void 0?e:pt(e,a)?t:e}n($s,"toWire");function aa(e,t=ft){return pt(e,t)?ta(t):e}n(aa,"capDetail");function Bs(e){let t=new WeakMap;return a=>{let s=t.get(a);if(s!==void 0)return s;let r=e(a);return t.set(a,r),r}}n(Bs,"memoByIdentity");function Ms(e,t){let a=[],s=t.baseBytes??16;for(let r=e.length-1;r>=0;r--){let o=t.toWire(e[r]);if(s+o.bytes>t.budget&&a.length>0)break;a.push(o.value),s+=o.bytes}return a.reverse(),a}n(Ms,"newestFitting");function Ns(e,t,a){let s=He(e,t);if(s.bytes<=t)return{value:e,bytes:s.bytes};let r=a();return{value:r,bytes:He(r,t).bytes}}n(Ns,"sizeOrStub");function sa(e){return e??{}}n(sa,"readParams");function Ds(e,t,a=ft){let s=n(r=>aa(r,a),"cap");return r=>{let{id:o}=sa(r);if(!o)return{found:false,reason:"missing id"};let i=e(o);return i?{found:true,id:o,...t(i,s)}:{found:false,reason:"unknown id"}}}n(Ds,"detailByIdAction");function ra(e){return e.length===1?e[0]:t=>{let a=e.map(s=>s(t));return()=>{for(let s of a)s()}}}n(ra,"mergeChangeSources");function zs(e){let t=Array.isArray(e.subscribe)?ra(e.subscribe):e.subscribe;return{version:e.version,getSnapshot:e.getSnapshot,subscribe:t,...e.actions?{actions:e.actions}:{}}}n(zs,"createSyncAdapter");var bt=new Set(["@react_buoy_settings_theme","@react_buoy_settings_preferences","@react_buoy_settings_global","@react_buoy_dev_tools_settings","@react_buoy_settings_tooltip_shown","@react_buoy_modal_hint_acknowledged","@react_buoy_clipboard_hint_acknowledged","@react_buoy_network_filters","@react_buoy_network_preferences","@react_buoy_network_copy_options","@react_buoy_storage_filters","@react_buoy_storage_event_filters","@react_buoy_storage_key_filters","@react_buoy_storage_pinned_keys","@react_buoy_storage_preferences","@react_buoy_storage_diff_viewer_mode","@react_buoy_rq_filters","@react_buoy_rq_preferences","@react_buoy_route_events_event_filters","@react_buoy_route_events_detail_view","@react_buoy_route_events_diff_viewer_mode","@react_buoy_sentry_filters","@react_buoy_sentry_preferences","@react_buoy_highlight_updates_filters","@react_buoy_highlight_updates_settings","@react_buoy_highlight_updates_copy_settings","@react_buoy_events_enabled_sources","@react_buoy_events_copy_settings","@react_buoy_time_machine_diff_viewer_mode","@react_buoy_ask_buoy_model","@react_buoy_network_ignored_domains","@react_buoy_network_ignored_urls","@react_buoy_rq_ignored_patterns","@react_buoy_rq_included_patterns"]),Fs=new Set(["@react_buoy_network_ignored_domains","@react_buoy_network_ignored_urls","@react_buoy_rq_ignored_patterns","@react_buoy_rq_included_patterns"]),Ws="@react_buoy_settings_sync_meta",js="@react_buoy_network_ignored_domains",Hs=2e3,ue=3e4,oa=15*6e4,$f=15e3,na=new Set;function Us(e){return na.add(e),()=>na.delete(e)}n(Us,"onSettingsApplied");function Gs(e){e.includes(js)&&X.reload(),na.forEach(t=>{try{t(e)}catch{}})}n(Gs,"applyPulledSettings");function Vs(){return{storage:j,credential:uu,fetch:n((e,t)=>fetch(e,t),"fetch"),subscribeWrites:ls,setTimer:n((e,t)=>setTimeout(e,t),"setTimer"),clearTimer:n(e=>clearTimeout(e),"clearTimer"),onTeam:n(e=>{X.setTeamPatterns(Ys(e[js])),it.set(e)},"onTeam"),onApplied:Gs}}n(Vs,"defaultDeps");function Ys(e){if(!e)return[];try{return JSON.parse(e)}catch{return[]}}n(Ys,"parseList");var Ks=class Wb{constructor(t={}){this.started=false;this.pending=new Map;this.applying=new Set;this.pushTimer=null;this.pullTimer=null;this.unsubscribe=null;this.refusedToken=null;this.deps={...Vs(),...t}}start(){this.started||(this.started=true,this.unsubscribe=this.deps.subscribeWrites((t,a)=>this.onWrite(t,a)),this.pull())}stop(){this.started=false,this.unsubscribe?.(),this.unsubscribe=null,this.pushTimer!==null&&this.deps.clearTimer(this.pushTimer),this.pullTimer!==null&&this.deps.clearTimer(this.pullTimer),this.pushTimer=this.pullTimer=null}credential(){let t=this.deps.credential();return t&&t.token!==this.refusedToken?t:null}call(t,a,s){return new Promise((r,o)=>{let i=this.deps.setTimer(()=>o(new Error("timeout")),$f);this.deps.fetch(`${a.origin.replace(/\/$/,"")}${t}`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({access_token:a.token,...s})}).then(l=>{this.deps.clearTimer(i),r(l)},l=>{this.deps.clearTimer(i),o(l)})})}schedulePull(t){this.started&&(this.pullTimer!==null&&this.deps.clearTimer(this.pullTimer),this.pullTimer=this.deps.setTimer(()=>{this.pullTimer=null,this.pull()},t))}async readMeta(){try{let t=await this.deps.storage.getItem(Ws),a=t?JSON.parse(t):{};return a&&typeof a=="object"?a:{}}catch{return{}}}async writeMeta(t){await this.deps.storage.setItem(Ws,JSON.stringify(t)).catch(()=>{})}async pull(){let t=this.credential();if(!t)return this.schedulePull(ue);let a,s;try{let c=await this.call("/api/settings/pull",t,{});a=c.status,s=await c.json().catch(()=>null)}catch{return this.schedulePull(ue)}if(a===401||a===403)return this.refusedToken=t.token,this.schedulePull(ue);if(a===404)return this.schedulePull(oa);if(a!==200||!s)return this.schedulePull(ue);let r=s.personal??{},o=await this.readMeta(),i=[];for(let[c,u]of Object.entries(r))if(!(!bt.has(c)||this.pending.has(c))&&!(typeof u?.value!="string"||!(u.updatedAt>(o[c]??0)))){this.applying.add(c);try{await this.deps.storage.setItem(c,u.value)}finally{this.applying.delete(c)}o[c]=u.updatedAt,i.push(c)}for(let c of bt){if(c in r||c in o||this.pending.has(c))continue;let u=await this.deps.storage.getItem(c).catch(()=>null);u!==null&&this.pending.set(c,u)}await this.writeMeta(o),i.length>0&&this.deps.onApplied(i);let l={};for(let[c,u]of Object.entries(s.team??{}))Fs.has(c)&&typeof u?.value=="string"&&(l[c]=u.value);this.deps.onTeam(l),this.pending.size>0&&this.schedulePush(0),this.schedulePull(oa)}onWrite(t,a){!this.started||this.applying.has(t)||!bt.has(t)||(this.pending.set(t,a),this.schedulePush(Hs))}schedulePush(t){this.pushTimer!==null&&this.deps.clearTimer(this.pushTimer),this.pushTimer=this.deps.setTimer(()=>{this.pushTimer=null,this.push()},t)}async push(){if(this.pending.size===0)return;let t=this.credential();if(!t)return this.schedulePush(ue);let a=new Map(this.pending),s,r;try{let i=await this.call("/api/settings/push",t,{changes:Object.fromEntries(a)});s=i.status,r=await i.json().catch(()=>null)}catch{return this.schedulePush(ue)}if(s===401||s===403)return this.refusedToken=t.token,this.schedulePush(ue);if(s===404)return this.schedulePush(oa);if(s!==200||!r||typeof r.updatedAt!="number")return this.schedulePush(ue);let o=await this.readMeta();for(let[i,l]of a)this.pending.get(i)===l&&this.pending.delete(i),o[i]=r.updatedAt;await this.writeMeta(o),this.pending.size>0&&this.schedulePush(Hs)}};n(Ks,"SettingsSync");var qs=Ks,Ue=null;function Js(e={}){Ue??(Ue=new qs(e)),Ue.start()}n(Js,"startSettingsSync");function Xs(){Ue&&Ue.pull()}n(Xs,"syncSettingsNow");function Qs(e){return e}n(Qs,"defineToolPreset");function Zs(e,t,a){return s=>{let r=s??{},o=e.props===void 0&&!t?void 0:{...e.props??{},...t?t(r):{}};return{...e,id:r.id||e.id,name:r.name||e.name,description:r.description||e.description,...o!==void 0?{props:o}:{},...a?a(r,e):{}}}}n(Zs,"createToolFactory");var ia="__buoyToolActionRegistry";function yt(){let e=globalThis;return e[ia]||(e[ia]=new Set),e[ia]}n(yt,"sources");function er(e){let t=yt();t.add(e);let a=false,s=n(()=>{if(a)return;a=true;let o=e(),i=n(async(l,c,u)=>{if(!(l==="network"&&c==="deleteOverrideRule"||l==="impersonate"&&c==="stopImpersonation"))throw new Error("Unsupported account-lock cleanup operation");if(l==="impersonate")return o[l]?.dispose?.(i);let y=o[l]?.actions?.[c];if(!y)throw new Error(`Cleanup unavailable for ${l}`);return y(u)},"cleanup");for(let l of Object.values(o))try{Promise.resolve(l.dispose?.(i)).catch(c=>console.warn("[Buoy] Tool cleanup failed",c))}catch(c){console.warn("[Buoy] Tool cleanup failed",c)}},"dispose"),r=Fe(()=>{K()?a=false:s()});return()=>{r(),t.delete(e),Promise.resolve().then(()=>{t.size===0&&s()})}}n(er,"registerToolAdapters");function Te(){if(!K())return{};let e={};for(let t of yt())try{Object.assign(e,t())}catch{}return Object.fromEntries(Object.entries(e).map(([t,a])=>[t,la(a)]))}n(Te,"getToolAdapters");function tr(){return Object.keys(Te())}n(tr,"listToolIds");function ar(){let e={};for(let[t,a]of Object.entries(Te()))e[t]=Object.keys(a.actions??{});return e}n(ar,"listToolActions");function sr(){return Object.entries(Te()).filter(([,e])=>typeof e.getSnapshot=="function").map(([e])=>e)}n(sr,"listSnapshotToolIds");async function rr(e){xe();let t=Te()[e];if(!t)throw new Error(`Unknown tool "${e}"`);if(typeof t.getSnapshot!="function")throw new Error(`Tool "${e}" has no snapshot to read`);return await t.getSnapshot()}n(rr,"readToolSnapshot");function mt(){return K()&&yt().size>0}n(mt,"isToolRegistryReady");async function or(e,t,a){xe();let s=Te()[e],r=s?.actions?.[t];if(!r)throw new Error(s?`Unknown action "${t}" on tool "${e}"`:`Unknown tool "${e}"`);return await r(a)}n(or,"dispatchToolAction");async function nr(e=2e3){if(mt())return true;let t=Ft()+e;for(;Ft()<t;)if(await new Promise(a=>setTimeout(a,50)),mt())return true;return false}n(nr,"waitForToolRegistry");function la(e){let t=n(a=>(...s)=>{xe();let r=false,o=Fe(()=>{K()||(r=true)}),i=n(()=>{if(r)throw new Error("Buoy account access ended while the operation was pending.");xe()},"check");try{let l=a.apply(e,s);return l&&typeof l.then=="function"?Promise.resolve(l).then(c=>(i(),c)).finally(o):(i(),o(),l)}catch(l){throw o(),l}},"guard");return{...e,...e.getSnapshot?{getSnapshot:t(e.getSnapshot)}:{},...e.actions?{actions:Object.fromEntries(Object.entries(e.actions).map(([a,s])=>[a,t(s)]))}:{},...e.subscribe?{subscribe:n(a=>(xe(),e.subscribe(()=>{K()&&a()})),"subscribe")}:{}}}n(la,"guardToolAdapter");var ca="__buoyToolUiBridge";function St(){let e=globalThis;return e[ca]||(e[ca]=new Set),e[ca]}n(St,"openers");function ir(e){let t=St();return t.add(e),()=>{t.delete(e)}}n(ir,"registerToolOpener");function lr(e){for(let t of St())try{if(t(e))return true}catch{}return false}n(lr,"openBuoyTool");function cr(){return St().size>0}n(cr,"canOpenBuoyTools");var ua="__buoyToolAttention";function vt(){let e=globalThis;return e[ua]||(e[ua]={byTool:new Map,listeners:new Set}),e[ua]}n(vt,"attention");function ur(e,t){let a=vt(),s=a.byTool.get(e)??null;if(!(s===t||s&&t&&s.kind===t.kind&&s.label===t.label)){t?a.byTool.set(e,t):a.byTool.delete(e);for(let r of a.listeners)try{r()}catch{}}}n(ur,"setToolAttention");function dr(e){return vt().byTool.get(e)??null}n(dr,"getToolAttention");function hr(e){let t=vt();return t.listeners.add(e),()=>{t.listeners.delete(e)}}n(hr,"subscribeToolAttention");import{createContext as Bf,useContext as Mf,useEffect as Nf}from"react";var gr=Bf(null);function pr(e,t){let a=Mf(gr);return Nf(()=>{if(a)return a(e),()=>a(null)},[a,...t]),a!==null}n(pr,"useToolScreenHeader");var fr=256*1024;function br(e){let t=new Set(e?.excludeKeys??[]),a=e?.includeKeys?new Set(e.includeKeys):null,s=0,r=n(o=>!t.has(o)&&(!a||a.has(o)),"touch");return{touch:r,allows(o){return r(o)?true:(s+=1,false)},countExcluded(o){s+=o},get excludedHits(){return s},excludedWarning(o){return s>0?`${s} ${o} excluded by you`:null}}}n(br,"createRestoreScope");function yr(){return{ok:true,applied:0,skipped:[],warnings:[]}}n(yr,"emptyRestoreResult");function mr(e){return{ok:false,applied:0,skipped:[],warnings:[e]}}n(mr,"failedRestore");function Sr(e,t){return{ok:false,applied:0,skipped:[{id:e,reason:t}],warnings:[]}}n(Sr,"skippedRestore");function vr(e,t={}){let{key:a,label:s,oldValue:r,newValue:o,inOld:i,inNew:l}=e;if(!l)return{key:a,label:s,verdict:"removed",oldValue:r};if(!i)return{key:a,label:s,verdict:"added",newValue:o};if((t.equal??ei)(r,o))return{key:a,label:s,verdict:"unchanged"};let c=t.tooLarge??(u=>ti(u,fr));return c(r)||c(o)?{key:a,label:s,verdict:"too-large",reason:t.tooLargeReason??"value too large to render a diff \u2014 restore still applies it"}:{key:a,label:s,verdict:"changed",oldValue:r,newValue:o}}n(vr,"classifyPreviewItem");function Cr(e,t){return e.verdict==="unchanged"?e:{...e,verdict:"wont-apply",reason:t}}n(Cr,"wontApply");function Tr(e,t){let a=n(s=>s===void 0?[]:s instanceof Map?Array.from(s.keys()):Object.keys(s),"keysOf");return new Set([...a(e),...a(t)])}n(Tr,"unionKeys");function wr(e,t={}){let a=e.toLowerCase();if(t[a])return t[a];for(let[m,C]of Object.entries(t))if(a.includes(m))return C;let s=e.split("").reduce((m,C)=>m+C.charCodeAt(0),0)*137%360,r=.7,o=.6,i=(1-Math.abs(2*o-1))*r,l=i*(1-Math.abs(s/60%2-1)),c=o-i/2,u=0,y=0,S=0;s<60?(u=i,y=l):s<120?(u=l,y=i):s<180?(y=i,S=l):s<240?(y=l,S=i):s<300?(u=l,S=i):(u=i,S=l);let f=n(m=>Math.round((m+c)*255).toString(16).padStart(2,"0"),"toHex");return`#${f(u)}${f(y)}${f(S)}`}n(wr,"entityColor");function xr(e,t={}){let a=t.maxLength??40;if(e===void 0)return t.undefinedLabel??"undefined";if(e===null)return"null";try{if(typeof e=="function")return t.functionLabel??"(fn)";if(typeof e=="string")return e.length>a?`"${e.slice(0,a-3)}..."`:`"${e}"`;if(typeof e=="number"||typeof e=="boolean")return String(e);if(Array.isArray(e)){if(e.length===0)return"[]";let s=JSON.stringify(e);return s.length>a?`[${e.length} items]`:s}if(typeof e=="object"){let s=Object.keys(e);if(s.length===0)return"{}";let r=JSON.stringify(e);return r.length<=a?r:`{ ${s.length} keys }`}return String(e).slice(0,a)}catch{return"[complex]"}}n(xr,"formatValuePreview");function kr(e,t){if(e===t)return{summary:"no change",changedKeys:[],changedCount:0};if(typeof e!="object"||typeof t!="object"||e===null||t===null)return{summary:"changed",changedKeys:[],changedCount:0};let a=e,s=t,r=Object.keys(a),o=Object.keys(s),i=o.filter(f=>!r.includes(f)),l=r.filter(f=>!o.includes(f)),c=[];for(let f of r)o.includes(f)&&a[f]!==s[f]&&c.push(f);let u=[...i,...l,...c],y=[];if(i.length>0&&y.push(`+${i.length}`),l.length>0&&y.push(`-${l.length}`),c.length>0&&y.push(`~${c.length}`),y.length===0)return{summary:"nested change",changedKeys:[],changedCount:0};let S=u.length;return{summary:`${y.join(" ")} ${S===1?"key":"keys"}`,changedKeys:u,changedCount:S}}n(kr,"shallowDiffSummary");function da(e){if(e==null)return"N/A";if(e===0)return"0 B";let t=1024,a=["B","KB","MB","GB","TB"],s=Math.floor(Math.log(e)/Math.log(t));return`${(e/Math.pow(t,s)).toFixed(1)} ${a[s]}`}n(da,"formatBytes");function Ir(e){if(e==null)return"N/A";if(e<1e3)return`${e}ms`;if(e<6e4)return`${(e/1e3).toFixed(1)}s`;if(e<36e5){let s=Math.floor(e/6e4),r=Math.floor(e%6e4/1e3);return r>0?`${s}m ${r}s`:`${s}m`}let t=Math.floor(e/36e5),a=Math.floor(e%36e5/6e4);return a>0?`${t}h ${a}m`:`${t}h`}n(Ir,"formatDuration");function _r(e){return e.toLocaleString()}n(_r,"formatNumber");var Ar=5e4;function Or(e,t=Ar){try{let a=JSON.stringify(e);return a.length>t?`[omitted: ${da(a.length)} \u2014 too large to copy]`:e}catch{return"[omitted: could not serialize]"}}n(Or,"truncatePayload");function Er(e,t=50,a=20,s=20){if(e.length<=t)return e;let r=e.slice(0,a),o=e.slice(-s);return`${r}...${o}`}n(Er,"truncateMiddle");function Pr(e){if(e>=100&&e<200)return{text:String(e),color:w.info,meaning:"Informational"};if(e>=200&&e<300){let t={200:"OK",201:"Created",202:"Accepted",204:"No Content",206:"Partial Content"};return{text:String(e),color:w.success,meaning:t[e]||"Success"}}if(e>=300&&e<400){let t={301:"Moved Permanently",302:"Found",303:"See Other",304:"Not Modified",307:"Temporary Redirect",308:"Permanent Redirect"};return{text:String(e),color:w.warning,meaning:t[e]||"Redirect"}}if(e>=400&&e<500){let t={400:"Bad Request",401:"Unauthorized",402:"Payment Required",403:"Forbidden",404:"Not Found",405:"Method Not Allowed",408:"Request Timeout",409:"Conflict",410:"Gone",422:"Unprocessable Entity",429:"Too Many Requests"};return{text:String(e),color:w.error,meaning:t[e]||"Client Error"}}if(e>=500){let t={500:"Internal Server Error",501:"Not Implemented",502:"Bad Gateway",503:"Service Unavailable",504:"Gateway Timeout",505:"HTTP Version Not Supported"};return{text:String(e),color:w.error,meaning:t[e]||"Server Error"}}return{text:String(e),color:w.muted,meaning:"Unknown"}}n(Pr,"formatHttpStatus");function Rr(e){return{GET:w.success,POST:w.info,PUT:w.warning,DELETE:w.error,PATCH:w.network,HEAD:w.muted,OPTIONS:w.secondary,CONNECT:w.critical,TRACE:w.env}[e.toUpperCase()]||w.muted}n(Rr,"getMethodColor");function Lr(e){try{let t=new URL(e);return{protocol:t.protocol.replace(":",""),host:t.hostname,port:t.port||void 0,pathname:t.pathname,search:t.search||void 0,hash:t.hash||void 0}}catch{return null}}n(Lr,"parseUrl");var Ge=[];function ha(e){Ge.unshift(e),Ge=Ge.slice(0,500)}n(ha,"add");function $r(){return Ge}n($r,"getEntries");function Br(){Ge=[]}n(Br,"clearEntries");var ga=(e=>(e.Debug="debug",e.Info="info",e.Log="log",e.Warn="warn",e.Error="error",e))(ga||{}),pa=(e=>(e.Auth="Auth",e.Custom="Custom",e.Debug="Debug",e.Error="Error",e.Generic="Generic",e.HTTPRequest="HTTP Request",e.Navigation="Navigation",e.Replay="Replay",e.State="State",e.System="System",e.Touch="Touch",e.UserAction="User Action",e))(pa||{});var Df=n(()=>`${Date.now()}-${Math.random().toString(36).substr(2,9)}`,"generateId"),Mr=class Hb{constructor(){this.captureTransaction=n(t=>(this.logSentryEvent("transaction",t),t),"captureTransaction");this.captureSpan=n(t=>(this.logSentryEvent("span",t),t),"captureSpan");this.captureEvent=n(t=>(this.logSentryEvent("event",t),t),"captureEvent");this.captureLog=n(t=>(this.logSentryEvent("console",{message:t.message||"Log entry",level:t.level,category:"console",timestamp:t.timestamp,...t.attributes}),t),"captureLog");this.captureBreadcrumb=n(t=>{let a="unknown";try{let r=globalThis.getCurrentPathname;r&&(a=r())}catch{}let s=t.category;if(t.message?.toLowerCase().includes("ignore"))return null;if(t.message?.includes("Touch event within element:")&&(t.message=t.message.replace("Touch event within element:","")),s==="navigation"&&t.data?.from&&t.data?.to&&(t.message=`From ${t.data.from} To ${t.data.to}`),s==="touch"&&t.data?.path){t.message&&(t.message=t.message.trim());let r={...t.data,category:s,message:t.message,route:a,timestamp:new Date().toISOString(),path:t.message?[{label:t.message}]:t.data?.path};t.data=r}return this.logSentryEvent("breadcrumb",t),t},"captureBreadcrumb")}logSentryEvent(t,a){let s="Generic",r=a.category;if(r)switch(r){case"touch":s="Touch";break;case"xhr":case"fetch":case"http":s="HTTP Request";break;case"navigation":s="Navigation";break;case"auth":s="Auth";break;case"console":s="System";break;case"debug":s="Debug";break;default:r.startsWith("ui.")?s="User Action":r.startsWith("replay.")?s="Replay":r.includes("redux")||r.includes("state")?s="State":s="Custom"}let o={id:Df(),timestamp:Date.now(),level:this.getSentryLevel(a),message:this.getSentryMessage(a),metadata:this.getSentryMetadata(a),type:s};ha(o)}getSentryLevel(t){switch(t.level){case"fatal":case"error":return"error";case"warning":return"warn";case"info":return"info";case"debug":return"debug";default:return"log"}}getSentryMessage(t){let a=t.message;return typeof a=="string"?a:`${t.type||"Unknown"} Event`}getSentryMetadata(t){let{message:a,level:s,type:r,...o}=t;return o}};n(Mr,"SentryLogger");var Nr=Mr,zf=new Nr;import{useState as fa,useEffect as Dr}from"react";import{jsx as P,jsxs as Ae}from"react/jsx-runtime";var Ct=Se.bubble.settings(),zr=Se.bubble.userPreferences(),ba={showEnvironment:true,showQueryButton:true,showWifiToggle:true,showEnvButton:false,showSentryButton:false,showStorageButton:false};function Fr({onPress:e}){let[t,a]=fa(ba);Dr(()=>{s()},[]);let s=n(async()=>{try{let r=await j.getItem(Ct);r&&a(JSON.parse(r))}catch(r){console.error("[Buoy]","Failed to load bubble settings:",r)}},"loadSettings");return P(Za,{id:"bubble-settings",title:"SETTINGS",subtitle:`${n(()=>Object.values(t).filter(Boolean).length,"getVisibleCount")()}/6 visible`,icon:Ht,iconColor:"#10B981",iconBackgroundColor:"rgba(16, 185, 129, 0.1)",onPress:e||(()=>{}),index:5})}n(Fr,"BubbleSettingsSection");function Wr({onSettingsChange:e}){let[t,a]=fa(ba),[s,r]=fa(true);Dr(()=>{o()},[]);let o=n(async()=>{try{let u=await j.getItem(Ct);u&&a(JSON.parse(u))}catch(u){console.error("[Buoy]","Failed to load bubble settings:",u)}finally{r(false)}},"loadSettings"),i=n(async u=>{try{await j.setItem(Ct,JSON.stringify(u)),a(u),e?.(u)}catch(y){console.error("[Buoy]","Failed to save bubble settings:",y)}},"saveSettings"),l=n(async u=>{let y={...t,[u]:!t[u]};try{let S=await j.getItem(zr),f=S?JSON.parse(S):{},m=u.replace("show","hasSet"),C={...f,[m]:true};await j.setItem(zr,JSON.stringify(C))}catch(S){console.error("[Buoy]","Failed to save user preference marker:",S)}i(y)},"handleToggle");if(s)return P(k,{style:_.detailContainer,children:P(F,{style:_.loadingText,children:"Loading settings..."})});let c=[{key:"showEnvironment",label:"Environment Indicator",description:"Shows current environment (dev, staging, prod)",icon:P(k,{style:[_.indicator,{backgroundColor:"#10B981"}]})},{key:"showQueryButton",label:"React Query Button",description:"Opens React Query dev tools",icon:P(k,{style:[_.indicator,{backgroundColor:"#F59E0B"}]})},{key:"showWifiToggle",label:"WiFi",description:"Toggle WiFi for testing offline scenarios",icon:P(k,{style:[_.indicator,{backgroundColor:"#8B5CF6"}]})},{key:"showEnvButton",label:"Environment Variables",description:"View and check environment variables",icon:P(Ht,{size:16,color:"#10B981"})},{key:"showSentryButton",label:"Sentry Events",description:"View captured Sentry events and errors",icon:P(k,{style:[_.indicator,{backgroundColor:"#a855f7"}]})},{key:"showStorageButton",label:"Storage Browser",description:"Browse and inspect AsyncStorage data",icon:P(os,{size:16,color:"#3B82F6"})}];return P(k,{style:_.detailContainer,children:Ae(bf,{showsVerticalScrollIndicator:false,contentContainerStyle:_.scrollContent,"sentry-label":"ignore bubble settings scroll",children:[Ae(k,{style:_.header,children:[P(F,{style:_.headerTitle,children:"Developer Tools Settings"}),P(F,{style:_.headerDescription,children:"Configure bubble button visibility"})]}),P(k,{style:_.sectionDivider,children:P(F,{style:_.sectionTitle,children:"Bubble Button Visibility"})}),P(k,{style:_.settingsList,children:c.map(u=>Ae(k,{style:_.settingItem,children:[P(k,{style:_.settingIconContainer,children:u.icon}),Ae(k,{style:_.settingContent,children:[P(F,{style:_.settingLabel,children:u.label}),P(F,{style:_.settingDescription,children:u.description})]}),P(yf,{"sentry-label":"ignore bubble settings section",value:t[u.key],onValueChange:()=>l(u.key),trackColor:{false:"#4B5563",true:"#10B981"},thumbColor:t[u.key]?"#fff":Y.textSecondary})]},u.key))}),Ae(k,{style:_.footer,children:[Ae(k,{style:_.noteContainer,children:[P(is,{size:16,color:Y.textSecondary}),P(F,{style:_.noteText,children:"User status indicator is always visible and cannot be disabled"})]}),P(F,{style:_.restartNote,children:"Changes are saved automatically and will persist across app restarts"})]})]})})}n(Wr,"BubbleSettingsDetail");async function jr(){try{let e=await j.getItem(Ct);if(e)return JSON.parse(e)}catch(e){console.error("[Buoy]","Failed to load bubble settings:",e)}return ba}n(jr,"getBubbleVisibilitySettings");var _=We.create({scrollContent:{flexGrow:1},sectionCard:{backgroundColor:Y.input,borderRadius:8,padding:16,flexDirection:"row",alignItems:"center",marginBottom:12},iconContainer:{width:36,height:36,borderRadius:8,backgroundColor:"rgba(16, 185, 129, 0.1)",justifyContent:"center",alignItems:"center",marginRight:12},textContainer:{flex:1},title:{color:Y.text,fontSize:14,fontWeight:"600",marginBottom:2},subtitle:{color:Y.textSecondary,fontSize:12},chevron:{color:st.text.icon,fontSize:20},detailContainer:{flex:1,backgroundColor:Y.card},loadingText:{color:Y.textSecondary,fontSize:14,textAlign:"center",marginTop:20},header:{padding:16,borderBottomWidth:1,borderBottomColor:"rgba(128, 128, 128, 0.2)"},headerTitle:{color:Y.text,fontSize:16,fontWeight:"600",marginBottom:4},headerDescription:{color:Y.textSecondary,fontSize:12},settingsList:{padding:16},settingItem:{flexDirection:"row",alignItems:"center",paddingVertical:12,borderBottomWidth:1,borderBottomColor:"rgba(128, 128, 128, 0.1)"},settingIconContainer:{width:32,height:32,justifyContent:"center",alignItems:"center",marginRight:12},settingContent:{flex:1,marginRight:12},settingLabel:{color:Y.text,fontSize:14,fontWeight:"500",marginBottom:2},settingDescription:{color:st.text.icon,fontSize:11},indicator:{width:8,height:8,borderRadius:4},footer:{padding:16,borderTopWidth:1,borderTopColor:"rgba(128, 128, 128, 0.2)"},noteContainer:{flexDirection:"row",alignItems:"center",gap:8,marginBottom:8},noteText:{color:Y.textSecondary,fontSize:12,flex:1},restartNote:{color:st.text.icon,fontSize:11,fontStyle:"italic"},sectionDivider:{paddingHorizontal:16,paddingVertical:8,marginTop:8,borderTopWidth:1,borderTopColor:"rgba(128, 128, 128, 0.12)"},sectionTitle:{color:Y.textSecondary,fontSize:12,fontWeight:"600",letterSpacing:.5,textTransform:"uppercase"}});function ya(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}n(ya,"isPlainObject");function Hr(e,t,a={}){let s=a.storage??j,r=a.parse??(c=>JSON.parse(c)),o=a.serialize??(c=>JSON.stringify(c));function i(c){let u=ya(t)&&ya(c)?{...t,...c}:c;return a.sanitize?a.sanitize(u,c):u}n(i,"resolve");async function l(){try{let c=await s.getItem(e);return c==null||c===""?null:i(r(c))}catch{return null}}return n(l,"loadOrNull"),{key:e,defaults:t,loadOrNull:l,async load(){return await l()??t},async save(c){try{await s.setItem(e,o(c))}catch{}},async clear(){try{await s.removeItem(e)}catch{}}}}n(Hr,"definePersistedSetting");import{callCapacitorNative as Ur,hasCapacitorPlugin as Ff,isCapacitorNative as Wf}from"@buoy-gg/license/web";function Gr(){return!Wf()||!Ff("Preferences")?null:{async getAllKeys(){let{keys:e}=await Ur("Preferences","keys");return Array.isArray(e)?e:[]},async multiRemove(e){await Promise.all(e.map(t=>Ur("Preferences","remove",{key:t})))}}}n(Gr,"getCapacitorAppStorage");import{callCapacitorNative as jf,hasCapacitorPlugin as Hf,isCapacitorNative as Uf}from"@buoy-gg/license/web";function Vr(e){if(e.instanceId&&rt(e.instanceId))return null;let t=e.data;if(!t)return e;if(typeof t.key=="string"&&rt(t.key))return null;let a={...t},s=false,r=false,o=false;for(let i of["keys","pairs","prevPairs"])Array.isArray(t[i])&&(r||(r=t[i].length>0),a[i]=t[i].filter(l=>!rt(i==="keys"?l:l[0])),o||(o=a[i].length>0),s||(s=a[i].length!==t[i].length));return r&&!o?null:s?{...e,data:a}:e}n(Vr,"appStorageEvent");function ma(e){try{let t=new URL(e,typeof location>"u"?"http://localhost":location.href),a=t.hostname.toLowerCase();if(["api.buoy.gg","ai.buoy.gg","gateway.buoy.gg"].includes(a)||a==="keygen.sh"||a.endsWith(".keygen.sh")||["buoy.gg","www.buoy.gg"].includes(a)&&/^\/api\/(license|settings|auth|session|install|t)(?:\/|$)/.test(t.pathname)||t.pathname==="/buoy-assets.json")return true;let s=globalThis.__BUOY_INTERNAL_HOSTS__;return s instanceof Set&&[...s].some(r=>typeof r=="string"&&r.toLowerCase()===t.host.toLowerCase())}catch{return false}}n(ma,"isBuoyRequest");function Yr(e,t){return fetch(e,{...t,__buoyInternal:true})}n(Yr,"buoyFetch");function Kr(e){return typeof e[0]=="string"&&/^\[(?:buoy(?:[^\]]*)?|@buoy-gg\/[^\]]+|RnBetterDevTools|React ?Buoy|RN-BUOY DEBUG|js-top|perf-monitor|impersonate|RenderCause|HighlightUpdates|RenderTracker|ProfilerInterceptor|HighlightPerf|DebugBorders|optional-module|route-events|RouteObserver)\]/i.test(e[0])}n(Kr,"isBuoyLog");function qr(e){if(!e)return false;if(ma(e))return true;let t=e;try{t=decodeURIComponent(t)}catch{}return t=t.replace(/\\/g,"/"),/(?:^|\/)node_modules\/@buoy-gg\/[^/]+(?:\/|$)/.test(t)||/(?:^|\/)buoy-packages\/packages\/[^/]+(?:\/|$)/.test(t)||/(?:^|\/)packages\/floating-tools-core\/(?:src|lib\/(?:module|commonjs))\/icons\/assets(?:\/|$)/.test(t)}n(qr,"isBuoyAssetPath");function Jr(e){let t=e;for(;t;){if(t.closest("[data-buoy-root], [data-buoy-portal-host]"))return true;let a=t.getRootNode?.();t=a&&"host"in a?a.host:null}return false}n(Jr,"isBuoyElement");import{useEffect as Gf,useId as Vf,useRef as Xr,useState as Yf}from"react";import{jsx as Oe,jsxs as Kf}from"react/jsx-runtime";function Sa(){let[e,t]=Yf(false),a=Xr(null),s=Xr(null),r=Vf(),o=n((i=true)=>{t(false),i&&a.current?.querySelector('[data-account-launcher] [role="button"]')?.focus({preventScroll:true})},"close");return Gf(()=>{if(!e)return;s.current?.focus({preventScroll:true});let i=n(c=>{c.target instanceof Node&&!a.current?.contains(c.target)&&t(false)},"onPointerDown"),l=n(c=>{c.key==="Escape"&&(c.preventDefault(),c.stopPropagation(),t(false),a.current?.querySelector('[data-account-launcher] [role="button"]')?.focus({preventScroll:true}))},"onKeyDown");return document.addEventListener("pointerdown",i),document.addEventListener("keydown",l),()=>{document.removeEventListener("pointerdown",i),document.removeEventListener("keydown",l)}},[e]),typeof document>"u"?null:Oe(mf,{children:Kf("div",{ref:a,"data-buoy-account":"",style:{position:"fixed",right:"max(16px, env(safe-area-inset-right))",bottom:"max(20px, env(safe-area-inset-bottom))",zIndex:99999,colorScheme:"dark",fontFamily:"system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"},children:[Oe("style",{children:`
|
|
2
2
|
[data-buoy-account] { font-size: 14px; line-height: 1.5; text-align: left; }
|
|
3
3
|
[data-buoy-account] [role="button"], [data-buoy-account] [role="link"] { cursor: pointer; }
|
|
4
4
|
[data-buoy-account] [role="button"]:focus-visible, [data-buoy-account] [role="link"]:focus-visible { outline: 2px solid ${d.color.accent}; outline-offset: 3px; }
|
|
@@ -11,4 +11,4 @@
|
|
|
11
11
|
box-shadow: 0 18px 60px rgba(0,0,0,.4), 0 4px 16px rgba(0,0,0,.2);
|
|
12
12
|
outline: none;
|
|
13
13
|
}
|
|
14
|
-
`}),Oe("div",{"data-account-launcher":"",children:Oe(es,{expanded:e,onPress:()=>t(i=>!i)})}),e&&Oe("section",{ref:s,className:"buoy-account-panel",role:"dialog","aria-labelledby":r,tabIndex:-1,onBlur:i=>{i.relatedTarget instanceof Node&&!a.current?.contains(i.relatedTarget)&&o(false)},children:Oe(Di,{titleId:r,onClose:()=>o()})})]})})}n(Sa,"AccountSetup");import{useState as Q,useRef as N,useEffect as ae,useLayoutEffect as Kf,useCallback as B,memo as va,isValidElement as Jf,cloneElement as Xf}from"react";var Ca=class Xb{static async save(t,a){this.cache.set(t,a);try{await j.setItem(t,JSON.stringify(a))}catch{}}static async load(t){if(this.cache.has(t))return this.cache.get(t);try{let a=await j.getItem(t);if(a){let s=JSON.parse(a);return this.cache.set(t,s),s}}catch{}return null}static saveMinimized(t,a){return this.save(t,{mode:a.mode,panelHeight:a.panelHeight,dimensions:a.floatingDimensions&&a.floatingPosition?{...a.floatingDimensions,top:a.floatingPosition.y,left:a.floatingPosition.x}:void 0,isVisible:false})}};n(Ca,"ModalStorage"),Ca.cache=new Map;var Ta=Ca;import{Fragment as Qf,jsx as p,jsxs as D}from"react/jsx-runtime";var L={base:"#121212",card:"#1A1A1A",border:"#333333",textMuted:"#888888",primary:"#20C997"},z={primary:"#F5F5F7",primaryLight:"#F5F5F7",secondary:"#A1A1A6",muted:"#8E8E93",success:"#34C759",info:"#00B8E6"},Zf=100,eb=400,Xr=500,Ee=80,Tt=n(()=>typeof window<"u"?window.innerWidth:0,"screenW"),de=n(()=>typeof window<"u"?window.innerHeight:0,"screenH"),Qr=n(e=>1-Math.pow(1-e,3),"easeOutCubic"),Ve=n(e=>e<.5?2*e*e:1-Math.pow(-2*e+2,2)/2,"easeInOut");function he(e,t,a,s){let r=0,o=false,i=performance.now(),l=n(c=>{if(o)return;let u=Math.min((c-i)/e,1);a(t(u)),u<1?r=requestAnimationFrame(l):s?.()},"tick");return r=requestAnimationFrame(l),()=>{o=true,cancelAnimationFrame(r)}}n(he,"runAnim");function Zr(){if(typeof document>"u")return{top:0,left:0,right:0,bottom:0};let e=document.createElement("div");e.style.cssText="position:fixed;top:env(safe-area-inset-top);left:env(safe-area-inset-left);right:env(safe-area-inset-right);bottom:env(safe-area-inset-bottom);visibility:hidden;pointer-events:none",document.body.appendChild(e);let t=e.getBoundingClientRect();return document.body.removeChild(e),{top:Math.max(0,t.top),left:Math.max(0,t.left),right:Math.max(0,window.innerWidth-t.right),bottom:Math.max(0,window.innerHeight-t.bottom)}}n(Zr,"readSafeAreaInsets");function wt(e,t,a=false){let s=Math.max(Ee,window.innerWidth-t.left-t.right),r=Math.max(Ee,window.innerHeight-t.top-t.bottom),o=Math.min(e.width,s),i=Math.min(e.height,r);return{width:o,height:i,left:Math.max(t.left,Math.min(e.left,window.innerWidth-t.right-o)),top:Math.max(t.top,Math.min(e.top,window.innerHeight-t.bottom-(a?Ee:i)))}}n(wt,"clampRectToSafeArea");var wa=n(({size:e=24,color:t="currentColor",strokeWidth:a=2})=>D("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",children:[p("line",{x1:18,y1:6,x2:6,y2:18,stroke:t,strokeWidth:a,strokeLinecap:"round"}),p("line",{x1:6,y1:6,x2:18,y2:18,stroke:t,strokeWidth:a,strokeLinecap:"round"})]}),"XIcon"),xa=n(({size:e=24,color:t="currentColor",strokeWidth:a=2})=>p("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",children:p("line",{x1:5,y1:12,x2:19,y2:12,stroke:t,strokeWidth:a,strokeLinecap:"round"})}),"MinusIcon"),eo=n(({size:e=24,color:t="currentColor",strokeWidth:a=2})=>D("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",children:[p("rect",{x:3,y:3,width:18,height:18,rx:2,stroke:t,strokeWidth:a}),p("rect",{x:3,y:14,width:18,height:7,fill:t})]}),"DockBottomIcon"),to=n(({size:e=24,color:t="currentColor",strokeWidth:a=2})=>D("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",children:[p("rect",{x:3,y:3,width:14,height:14,rx:2,stroke:t,strokeWidth:a}),p("line",{x1:7,y1:17,x2:7,y2:21,stroke:t,strokeWidth:a}),p("line",{x1:7,y1:21,x2:21,y2:21,stroke:t,strokeWidth:a}),p("line",{x1:21,y1:21,x2:21,y2:7,stroke:t,strokeWidth:a}),p("line",{x1:17,y1:7,x2:21,y2:7,stroke:t,strokeWidth:a})]}),"FloatWindowIcon"),ne={close:"#FF5F57",minimize:"#FEBC2E",toggleMode:"#28C840"},ka=24,tb=2,Pe=8,Ia=n(e=>({width:ka,height:ka,borderRadius:ka/2,display:"flex",alignItems:"center",justifyContent:"center",background:`radial-gradient(circle, ${e} 6px, transparent 6px)`,border:"none",padding:0,cursor:"pointer",flexShrink:0}),"wcDotStyle");function ao(e){return Su()&&ss(true)?p(ro,{...e}):p(so,{...e})}n(ao,"WindowControls");function so({onClose:e,onMinimize:t,onToggleMode:a,mode:s}){let r=s==="floating"?eo:to,o=s==="floating"?"Dock to bottom sheet":"Make floating window";return D("div",{style:{display:"flex",flexDirection:"row",alignItems:"center",gap:tb},children:[t&&p("button",{type:"button",onClick:t,style:Ia(ne.minimize),"aria-label":"Minimize modal",children:p(xa,{size:Pe,color:"#7A5A00",strokeWidth:1.5})}),a&&p("button",{type:"button",onClick:a,style:Ia(ne.toggleMode),"aria-label":o,children:p(r,{size:Pe,color:"#004A1A",strokeWidth:1.5})}),p("button",{type:"button",onClick:e,style:Ia(ne.close),"aria-label":"Close modal",children:p(wa,{size:Pe,color:"#4A0000",strokeWidth:1.5})})]})}n(so,"PlainWindowControls");var _a=12,ab=8,xt=36,sb=12,Aa=16,kt=8,rb=3e3,Oa=150,Ea=n(e=>({width:_a,height:_a,borderRadius:_a/2,backgroundColor:e,display:"flex",alignItems:"center",justifyContent:"center"}),"wcCollapsedDot"),Pa=n((e,t,a,s)=>({width:xt,height:xt,borderRadius:xt/2,display:"flex",alignItems:"center",justifyContent:"center",padding:0,cursor:"pointer",flexShrink:0,backgroundColor:e?a:t,border:e?`1px solid ${s}`:"none"}),"wcExpandedButton");function ro({onClose:e,onMinimize:t,onToggleMode:a,mode:s,variant:r="night"}){let o=r==="night",[i,l]=Q(false),[c,u]=Q(false),y=N(null),S=N(null),f=s==="floating"?eo:to,m=s==="floating"?"Dock to bottom sheet":"Make floating window",C=B(()=>{y.current&&clearTimeout(y.current),S.current&&clearTimeout(S.current),y.current=null,S.current=null},[]),A=B(()=>{C(),u(false),S.current=setTimeout(()=>l(false),Oa)},[C]),W=B(()=>{C(),l(true),requestAnimationFrame(()=>requestAnimationFrame(()=>u(true))),y.current=setTimeout(A,rb)},[C,A]);ae(()=>C,[C]);let V=n(M=>{A(),M()},"handleAction");return D(Qf,{children:[D("button",{type:"button",onClick:W,"aria-label":"Open window controls","data-testid":"tool-window-controls",style:{padding:10,margin:-8,border:"none",background:"transparent",cursor:"pointer",display:"flex",flexDirection:"row",alignItems:"center",gap:ab},children:[t&&p("span",{style:Ea(ne.minimize),children:p(xa,{size:Pe,color:"#7A5A00",strokeWidth:1.5})}),a&&p("span",{style:Ea(ne.toggleMode),children:p(f,{size:Pe,color:"#004A1A",strokeWidth:1.5})}),p("span",{style:Ea(ne.close),children:p(wa,{size:Pe,color:"#4A0000",strokeWidth:1.5})})]}),i&&p("div",{style:{position:"absolute",top:-kt,right:-kt,zIndex:9999,transform:`scale(${c?1:.3})`,opacity:c?1:0,transition:`transform ${Oa}ms ease-out, opacity ${Oa}ms ease-out`},children:D("div",{style:{display:"flex",flexDirection:"row",alignItems:"center",gap:sb,padding:kt,borderRadius:(xt+kt*2)/2,backgroundColor:o?d.color.surface:L.card,border:`1px solid ${o?d.color.border:L.border}`,boxShadow:"0 4px 12px rgba(0,0,0,0.4)"},children:[t&&p("button",{type:"button",onClick:()=>V(t),"aria-label":"Minimize modal","data-testid":"tool-window-minimize",style:Pa(o,ne.minimize,d.color.warningSoft,d.color.warning+"59"),children:p(xa,{size:Aa,color:o?d.color.warning:"#7A5A00",strokeWidth:2})}),a&&p("button",{type:"button",onClick:()=>V(a),"aria-label":m,"data-testid":"tool-window-mode",style:Pa(o,ne.toggleMode,d.color.accentSoft,d.color.accentBorderStrong),children:p(f,{size:Aa,color:o?d.color.accent:"#004A1A",strokeWidth:2})}),p("button",{type:"button",onClick:()=>V(e),"aria-label":"Close modal","data-testid":"tool-window-close",style:Pa(o,ne.close,d.color.dangerSoft,d.color.danger+"59"),children:p(wa,{size:Aa,color:o?d.color.danger:"#4A0000",strokeWidth:2})})]})})]})}n(ro,"ExpandableWindowControls");var oo=va(n(function({isResizing:e,mode:t,hasCustomContent:a=false,variant:s="default"}){let r=t==="floating",o=s==="night";return D("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",position:"relative",justifyContent:a?"center":void 0,minHeight:a?32:void 0,paddingTop:a?0:8,paddingBottom:a?0:8,backgroundColor:"transparent"},children:[p("div",{style:{width:o?36:e?40:r?50:40,height:o||r?5:3,backgroundColor:o?d.color.placeholder:e?L.primary:r?L.textMuted:L.primary,borderRadius:o?2.5:2,boxShadow:o?"none":`0 0 4px ${L.primary}99`}}),e&&t==="bottomSheet"&&p("div",{style:{position:"absolute",display:"flex",flexDirection:"row",gap:2,marginTop:12},children:[0,1,2].map(i=>p("div",{style:{width:12,height:1,backgroundColor:z.success,opacity:.6}},i))})]})},"DragIndicator")),ob=va(n(function({onAcknowledge:e}){return p("div",{style:{backgroundColor:`${z.info}15`,borderLeft:`3px solid ${z.info}`,borderRadius:8,margin:"8px 12px 4px",overflow:"hidden",boxShadow:`0 0 8px ${z.info}4D`,flexShrink:0},children:D("div",{style:{display:"flex",flexDirection:"row",alignItems:"center",padding:12,gap:12},children:[D("div",{style:{width:32,height:32,position:"relative",display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0},children:[p("div",{style:{position:"absolute",width:20,height:20,borderRadius:10,border:`2px solid ${z.info}`,opacity:.6,transform:"scale(0.8)",boxSizing:"border-box"}}),p("div",{style:{position:"absolute",width:20,height:20,borderRadius:10,border:`2px solid ${z.info}`,boxSizing:"border-box"}})]}),D("div",{style:{flex:1,display:"flex",flexDirection:"column",gap:2},children:[p("span",{style:{fontSize:13,fontWeight:600,color:z.info,letterSpacing:.3},children:"\u{1F4A1} Pro Tip"}),p("span",{style:{fontSize:12,color:z.primaryLight,lineHeight:"16px"},children:"Double-tap the header to transform this into a floating modal"})]}),p("button",{type:"button",onClick:e,style:{backgroundColor:`${z.info}30`,padding:"6px 12px",borderRadius:6,border:`1px solid ${z.info}50`,fontSize:12,fontWeight:600,color:z.info,cursor:"pointer",fontFamily:"inherit",flexShrink:0},children:"Got it!"})]})})},"ModalHintBanner"));function Ra({header:e,isResizing:t,mode:a,onMinimize:s,variant:r="default"}){if(e?.customContent){let o=e.customContent;return Jf(e.customContent)&&s&&(o=Xf(e.customContent,{onMinimize:s})),D("div",{style:{flex:1,display:"flex",flexDirection:"column",justifyContent:"center",minWidth:0},children:[p(oo,{isResizing:t,mode:a,hasCustomContent:true,variant:r}),o]})}return D("div",{style:{flex:1,display:"flex",flexDirection:"column",justifyContent:"center",position:"relative",minWidth:0},children:[p(oo,{isResizing:t,mode:a,variant:r}),D("div",{style:{padding:"0 16px",display:"flex",flexDirection:"column",alignItems:"center"},children:[e?.title&&p("span",{style:{fontSize:16,fontWeight:600,color:z.primary},children:e.title}),e?.subtitle&&p("span",{style:{fontSize:12,color:z.secondary,paddingTop:4},children:e.subtitle})]}),p("div",{style:{position:"absolute",inset:0,display:"flex",alignItems:"center",justifyContent:"center",pointerEvents:"none"},children:p("span",{style:{fontSize:10,color:z.muted,fontStyle:"italic"},children:"Double tap: Toggle \u2022 Triple tap: Close"})})]})}n(Ra,"ModalHeaderContent");var nb=n(({visible:e,onClose:t,children:a,header:s,styles:r={},minHeight:o=Zf,maxHeight:i,initialHeight:l=eb,animatedHeight:c,benchMotion:u,initialMode:y="bottomSheet",onModeChange:S,persistenceKey:f,enablePersistence:m=true,initialFloatingPosition:C,footer:A,footerHeight:W=0,onBack:V,onMinimize:M,minimizeRequest:v=0,minimizeTargetPosition:se,initialModalState:$,zIndex:Ye,disableScrollWrapper:Oo=false,background:Ba=true,variant:qe="night"})=>{let[K]=Q(Zr),[Ma,Na]=Q(!m),[R,Pt]=Q(y),Ke=N(S);Ke.current=S;let[Le,ge]=Q(false),[Rt,$e]=Q(false),[Eo,Lt]=Q(l),[re,Be]=Q(()=>wt({width:Tt(),height:Xr,top:C?.y??(de()-Xr)/2,left:C?.x??0},K)),[Po,Je]=Q(false),[Ro,Da]=Q(false),Lo=ts(),pe=N(l),J=N(re),U=N({x:re.left,y:re.top}),Xe=N(null),$t=N(null),oe=N(null),fe=N([]),ee=B(()=>{fe.current.forEach(h=>h()),fe.current=[]},[]);ae(()=>{J.current=re},[re]),ae(()=>ee,[ee]);let za=i||de()-K.top;ae(()=>{if(!m||!f){Na(true);return}let h=true;return n(async()=>{let g=await Ta.load(f);if(h&&g&&(g.mode&&(Pt(g.mode),Ke.current?.(g.mode)),g.panelHeight&&(Lt(g.panelHeight),pe.current=g.panelHeight),g.dimensions)){let T=wt(g.dimensions,K,true);Be(T),U.current={x:T.left,y:T.top}}h&&Na(true)},"loadState")(),()=>{h=false}},[f,m]),ae(()=>{if(!m||!f||!Ma)return;let h=setTimeout(()=>{Ta.save(f,{mode:R,panelHeight:pe.current,dimensions:re,isVisible:e})},500);return()=>clearTimeout(h)},[R,Eo,re,e,f,m,Ma]),ae(()=>{let h=true;return n(async()=>{try{let g=Se.modal.hintAcknowledged(),T=await j.getItem(g);h&&(Je(T!=="true"),Da(true))}catch{h&&(Je(true),Da(true))}},"loadHintStatus")(),()=>{h=false}},[]);let $o=B(async()=>{try{let h=Se.modal.hintAcknowledged();await j.setItem(h,"true"),Je(false)}catch{Je(false)}},[]),Bt=B(()=>{$e(false),ge(false);let h=R==="bottomSheet"?"floating":"bottomSheet";Pt(h),Ke.current?.(h)},[R]);ae(()=>{$e(false),ge(false)},[R]);let be=B(()=>{if(!M)return;let h={mode:R,panelHeight:pe.current,floatingPosition:{x:J.current.left,y:J.current.top},floatingDimensions:{width:J.current.width,height:J.current.height}};m&&f&&Ta.saveMinimized(f,h);let g=se?.x??Tt()-50,T=se?.y??de()-150;if(ee(),R==="bottomSheet"){let I=Xe.current;if(!I){M(h);return}let x=de();fe.current.push(he(300,Ve,E=>{I.style.opacity=String(1-E),I.style.transform=`translateY(${E*x}px)`},()=>M(h)))}else{let I=oe.current;if(!I){M(h);return}let x={...U.current};fe.current.push(he(300,Ve,E=>{I.style.opacity=String(1-E);let ye=x.x+(g-x.x)*E,me=x.y+(T-x.y)*E;I.style.transform=`translate(${ye}px, ${me}px)`},()=>M(h)))}},[R,M,se,ee,m,f]),Fa=N(v);ae(()=>{Fa.current!==v&&(Fa.current=v,be())},[v,be]),ae(()=>{if($&&($.mode&&(Pt($.mode),Ke.current?.($.mode)),$.panelHeight&&(Lt($.panelHeight),pe.current=$.panelHeight),$.floatingDimensions&&$.floatingPosition)){let h={width:$.floatingDimensions.width,height:$.floatingDimensions.height,top:$.floatingPosition.y,left:$.floatingPosition.x};Be(h),U.current={x:$.floatingPosition.x,y:$.floatingPosition.y}}},[$]),Kf(()=>{if(e)if(ee(),R==="bottomSheet"){let h=Xe.current;if(!h)return;let g=de();h.style.transform=`translateY(${g}px)`,h.style.opacity="0",fe.current.push(he(300,Qr,T=>{h.style.transform=`translateY(${(1-T)*g}px)`}),he(200,Ve,T=>{h.style.opacity=String(T)}))}else{let h=oe.current;if(!h)return;U.current={x:J.current.left,y:J.current.top},h.style.transform=`translate(${U.current.x}px, ${U.current.y}px)`,h.style.opacity="0",fe.current.push(he(200,Ve,g=>{h.style.opacity=String(g)}))}},[e,R,ee]);let Wa=N(0),Me=N(0),Ne=N(null),Qe=B(()=>{let h=Date.now();h-Wa.current>500&&(Me.current=0),Me.current++,Wa.current=h,Ne.current&&clearTimeout(Ne.current),Ne.current=setTimeout(()=>{Me.current===2?Bt():Me.current>=3&&M&&be(),Me.current=0},300)},[Bt,M,be]);ae(()=>()=>{Ne.current&&clearTimeout(Ne.current)},[]);let Ze=N({active:false,resizing:false,startY:0,headerOffsetY:0,samples:[]}),Bo=B(h=>{if(R!=="bottomSheet"||h.button!==0||h.target.closest('button, a, input, textarea, select, [role="button"], [role="tab"], [role="switch"], [contenteditable="true"], [tabindex]'))return;let g=Ze.current;g.active=true,g.resizing=false,g.startY=h.clientY;let T=h.currentTarget.getBoundingClientRect();g.headerOffsetY=h.clientY-T.top,g.samples=[{t:performance.now(),y:h.clientY}],h.currentTarget.setPointerCapture(h.pointerId)},[R]),Mo=B(h=>{let g=Ze.current;if(!g.active)return;let T=h.clientY-g.startY;if(!g.resizing&&Math.abs(T)>3&&(g.resizing=true,ee(),ge(true)),!g.resizing)return;let I=h.clientY-g.headerOffsetY,x=de()-I;x=Math.max(o,Math.min(x,za)),pe.current=x,$t.current&&($t.current.style.height=`${x}px`);let E=performance.now();for(g.samples.push({t:E,y:h.clientY});g.samples.length>2&&E-g.samples[0].t>100;)g.samples.shift()},[o,za,ee]),No=B(h=>{let g=Ze.current;if(!g.active)return;if(g.active=false,!g.resizing){Qe();return}ge(false);let T=pe.current,I=h.clientY-g.startY,x=g.samples[0],E=g.samples[g.samples.length-1];if((E&&x&&E.t>x.t?(E.y-x.y)/(E.t-x.t):0)>.8&&I>50||I>150&&T<=o){let ye=Xe.current;if(ee(),ye){let me=de();fe.current.push(he(200,Ve,G=>{ye.style.opacity=String(1-G)}),he(300,Qr,G=>{ye.style.transform=`translateY(${G*me}px)`},()=>t()))}else t();return}Lt(T)},[o,t,Qe,ee]),Do=B(()=>{let h=Ze.current;h.active&&(h.active=false,h.resizing=false,ge(false))},[]),et=N({active:false,dragging:false,startX:0,startY:0,startPos:{x:0,y:0}}),zo=B(h=>{if(R!=="floating"||Le||h.button!==0||h.target.closest('button, a, input, textarea, select, [role="button"], [role="tab"], [role="switch"], [contenteditable="true"], [tabindex]'))return;let g=et.current;g.active=true,g.dragging=false,g.startX=h.clientX,g.startY=h.clientY,g.startPos={...U.current},h.currentTarget.setPointerCapture(h.pointerId)},[R,Le]),Fo=B(h=>{let g=et.current;if(!g.active)return;let T=h.clientX-g.startX,I=h.clientY-g.startY;if(!g.dragging&&Math.abs(T)+Math.abs(I)>5&&(g.dragging=true,$e(true)),!g.dragging)return;let x=g.startPos.x+T,E=g.startPos.y+I;U.current={x,y:E},oe.current&&(oe.current.style.transform=`translate(${x}px, ${E}px)`)},[]),Wo=B(()=>{let h=et.current;if(!h.active)return;if(h.active=false,!h.dragging){Qe();return}$e(false);let g=J.current,T=wt({...g,left:U.current.x,top:U.current.y},K),I=T.left,x=T.top;U.current={x:I,y:x},oe.current&&(oe.current.style.transform=`translate(${I}px, ${x}px)`),Be(E=>({...E,left:I,top:x}))},[K,Qe]),jo=B(()=>{let h=et.current;h.active&&(h.active=false,h.dragging=false,$e(false))},[]),Mt=N({active:false,corner:"bottomRight",startX:0,startY:0,start:{width:0,height:0,top:0,left:0}}),Ho=B(h=>g=>{if(R!=="floating")return;g.stopPropagation();let T=Mt.current;T.active=true,T.corner=h,T.startX=g.clientX,T.startY=g.clientY,T.start={...J.current},ge(true),g.currentTarget.setPointerCapture(g.pointerId)},[R]),Uo=B(h=>{let g=Mt.current;if(!g.active)return;let T=h.clientX-g.startX,I=h.clientY-g.startY;if(Math.abs(T)<.5&&Math.abs(I)<.5)return;let x=Math.max(0,K.left),E=de()-Math.max(0,K.bottom),ye=Tt()-Math.max(0,K.right),me=Tt()*.25,G=g.start,Nt=G.left+G.width,Dt=G.top+G.height,De=G.left,at=G.top,qa=Nt,zt=Dt;g.corner==="bottomLeft"?(De=Math.max(x,Math.min(G.left+T,Nt-me)),zt=Math.min(E,Math.max(Dt+I,G.top+Ee))):(qa=Math.min(ye,Math.max(Nt+T,G.left+me)),zt=Math.min(E,Math.max(Dt+I,G.top+Ee)));let Go=Math.max(me,qa-De),Vo=Math.max(Ee,zt-at),Ka={width:Go,height:Vo,left:De,top:at};J.current=Ka,U.current={x:De,y:at},Be(Ka),oe.current&&(oe.current.style.transform=`translate(${De}px, ${at}px)`)},[K.left,K.right,K.bottom]),ja=B(()=>{let h=Mt.current;h.active&&(h.active=false,ge(false),Be(J.current))},[]),tt=!e,Ha=tt?{left:-9999,top:-9999,opacity:0,visibility:"hidden",pointerEvents:"none"}:{},Ua=s?.title||"Dev tool panel",O=qe==="night",Ga=Ba&&O?p("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},"aria-hidden":true,children:p(jt,{})}):null,Va=D("div",{style:{flex:1,minHeight:0,position:"relative",display:"flex",flexDirection:"column",backgroundColor:O?"transparent":L.base,borderBottomLeftRadius:16,borderBottomRightRadius:16,overflow:"hidden",...r.content},children:[Ba&&!O?p(jt,{}):null,Oo?p("div",{style:{flex:1,minHeight:0,display:"flex",flexDirection:"column",paddingBottom:W},children:a}):p("div",{style:{flex:1,minHeight:0,overflowY:"auto",paddingBottom:W},children:a}),A?p("div",{style:{position:"absolute",left:0,right:0,bottom:0,backgroundColor:L.base,borderBottomLeftRadius:16,borderBottomRightRadius:16},children:A}):null]}),Ya=p("div",{style:{position:"absolute",top:4,right:4,zIndex:10},children:p(ao,{onClose:t,onMinimize:M?be:void 0,onToggleMode:Bt,mode:R,variant:qe})});if(R==="floating"){let h=Rt||Le;return D("div",{ref:oe,role:"dialog","aria-label":Ua,"aria-hidden":tt||void 0,style:{fontFamily:Gt,position:"fixed",pointerEvents:"auto",left:0,top:0,width:re.width,height:re.height,transform:`translate(${U.current.x}px, ${U.current.y}px)`,display:"flex",flexDirection:"column",backgroundColor:O?d.color.bg:L.card,borderRadius:O?d.radius.sheet:6,border:O?`1px solid ${d.color.accent}55`:h?`2px solid ${L.primary}`:`1px solid ${L.border}`,boxShadow:O?`0 0 14px ${d.color.accent}38`:h?`0 0 12px ${L.primary}7A`:`0 0 20px ${L.primary}4D`,...O?{overflow:"hidden"}:null,boxSizing:"border-box",zIndex:Ye??1e3,...r.container,...Ha},children:[Ga,p("div",{onPointerDown:zo,onPointerMove:Fo,onPointerUp:Wo,onPointerCancel:jo,style:{borderTopLeftRadius:O?d.radius.sheet:6,borderTopRightRadius:O?d.radius.sheet:6,backgroundColor:O?"transparent":L.card,minHeight:56,border:O?"none":`1px solid ${L.border}`,boxSizing:"border-box",display:"flex",flexDirection:"column",justifyContent:"center",flexShrink:0,touchAction:"none",userSelect:"none",cursor:Rt?"grabbing":"grab",position:"relative"},children:p(Ra,{header:s,isResizing:Rt||Le,mode:R,onMinimize:M?be:void 0,variant:qe})}),Ya,Va,["bottomLeft","bottomRight"].map(g=>p("div",{onPointerDown:Ho(g),onPointerMove:Uo,onPointerUp:ja,onPointerCancel:ja,style:{position:"absolute",width:30,height:30,bottom:4,...g==="bottomLeft"?{left:4}:{right:4},zIndex:1e3,touchAction:"none",cursor:g==="bottomLeft"?"nesw-resize":"nwse-resize"},children:p("div",{style:{width:20,height:20,borderRadius:10,boxSizing:"border-box",backgroundColor:h?`${z.success}1A`:"transparent",border:h?`2px solid ${z.success}`:"none",boxShadow:h?`0 0 8px ${z.success}99`:"none"}})},g))]},"floating")}return p("div",{"aria-hidden":tt||void 0,style:{fontFamily:Gt,position:"fixed",inset:0,zIndex:Ye??1e3,pointerEvents:"none",...tt?{...Ha,inset:"auto",width:"100vw",height:"100vh"}:null},children:p("div",{ref:Xe,style:{position:"absolute",bottom:0,left:0,right:0,pointerEvents:"auto"},children:D("div",{ref:$t,role:"dialog","aria-label":Ua,style:{height:pe.current,display:"flex",flexDirection:"column",backgroundColor:O?d.color.bg:L.card,borderTopLeftRadius:O?d.radius.sheet:6,borderTopRightRadius:O?d.radius.sheet:6,border:O?`1px solid ${d.color.accent}55`:`1px solid ${L.border}`,boxShadow:O?`0 -4px 10px ${d.color.accent}38`:`0 -4px 12px ${L.primary}33`,...O?{overflow:"hidden"}:null,boxSizing:"border-box",position:"relative",...r.container},children:[Ga,p("div",{onPointerDown:Bo,onPointerMove:Mo,onPointerUp:No,onPointerCancel:Do,style:{borderTopLeftRadius:O?d.radius.sheet:6,borderTopRightRadius:O?d.radius.sheet:6,backgroundColor:O?"transparent":L.card,minHeight:56,border:O?"none":`1px solid ${L.border}`,boxSizing:"border-box",display:"flex",flexDirection:"column",justifyContent:"center",flexShrink:0,touchAction:"none",userSelect:"none",cursor:"ns-resize",position:"relative"},children:p(Ra,{header:s,isResizing:Le,mode:R,onMinimize:M?be:void 0,variant:qe})}),Ya,Ro&&Po&&!Lo&&p(ob,{onAcknowledge:$o}),Va]})})},"bottomSheet")},"JsModalComponent"),ib=va(e=>as()().status!=="admitted"?e.visible?p(Sa,{}):null:p(nb,{...e}));import{Children as lb,useEffect as cb,useRef as ub}from"react";import{Fragment as db,jsx as H,jsxs as It}from"react/jsx-runtime";function no({children:e,style:t}){return H(F,{style:[b.sectionLabel,t],children:e})}n(no,"NightSectionLabel");function io({children:e,centered:t,tone:a="tertiary",style:s}){let r=We.flatten(s),o=!!r&&(r.marginHorizontal!=null||r.margin!=null);return H(F,{style:[b.footnote,o?null:b.footnoteInset,a==="secondary"?b.footnoteSecondary:null,a==="warning"?b.footnoteWarning:null,a==="danger"?b.footnoteDanger:null,t?b.footnoteCentered:null,s],children:e})}n(io,"NightFootnote");function lo({children:e,padded:t,glass:a,style:s}){return H(k,{style:[b.card,a?b.cardGlass:null,t?b.cardPadded:null,s],children:e})}n(lo,"NightCard");function La({inset:e=d.rowPadH}){return H(k,{style:[b.separator,{marginLeft:e}]})}n(La,"NightSeparator");function co({children:e,inset:t=d.rowPadH}){let a=lb.toArray(e);return H(db,{children:a.map((s,r)=>It(k,{children:[r>0?H(La,{inset:t}):null,s]},s.key??r))})}n(co,"NightRows");var uo=56,ho=32,_t=22,go=5,hb=uo-_t-go*2;function po({value:e,onValueChange:t,disabled:a,testID:s,accessibilityLabel:r}){let o=ub(new Ut.Value(e?1:0)).current;return cb(()=>{Ut.timing(o,{toValue:e?1:0,duration:200,useNativeDriver:pf.OS!=="web"}).start()},[e,o]),H(ot,{activeOpacity:.8,disabled:a,onPress:()=>t(!e),testID:s,accessibilityLabel:r,accessibilityRole:"switch",accessibilityState:{checked:e,disabled:a},hitSlop:{top:8,bottom:8,left:8,right:8},style:[b.switchTrack,e?b.switchTrackOn:null,a?b.switchDisabled:null],children:H(Ut.View,{style:[b.switchThumb,e?b.switchThumbOn:null,{transform:[{translateX:o.interpolate({inputRange:[0,1],outputRange:[0,hb]})}]}]})})}n(po,"NightSwitch");function fo({label:e,selected:t,onPress:a,disabled:s,icon:r,testID:o}){return It(ot,{activeOpacity:.7,disabled:s||!a,onPress:a,testID:o,style:[b.chip,t?b.chipSelected:null,s?b.chipDisabled:null],children:[r,H(F,{style:[b.chipText,t?b.chipTextSelected:null],children:e})]})}n(fo,"NightChip");function bo({label:e,onPress:t,variant:a="secondary",size:s="lg",icon:r,disabled:o,fullWidth:i=true,testID:l,accessibilityLabel:c}){let u=a==="primary"?d.color.onAccent:a==="tertiary"?d.color.text:a==="destructive"?d.color.danger:d.color.accent;return It(ot,{activeOpacity:.7,disabled:o,onPress:t,testID:l,accessibilityRole:"button",accessibilityLabel:c??e,accessibilityState:{disabled:!!o},style:[b.button,s==="md"?b.buttonMd:b.buttonLg,a==="primary"?b.buttonPrimary:a==="ghost"?b.buttonGhost:b.buttonPlate,i?b.buttonFullWidth:null,o?b.buttonDisabled:null],children:[r,H(F,{style:[s==="md"?b.buttonTextMd:b.buttonTextLg,{color:u}],children:e})]})}n(bo,"NightButton");function yo({tabs:e,activeKey:t,onChange:a,size:s="md",glass:r,testIDPrefix:o}){let i=s==="sm";return H(k,{style:[b.segmentTrack,r?b.segmentTrackGlass:null],children:e.map(l=>{let c=l.key===t;return It(ot,{activeOpacity:.7,testID:o?`${o}-${l.key}`:void 0,accessibilityRole:"tab",accessibilityState:{selected:c},accessibilityLabel:l.label,onPress:()=>a(l.key),style:[b.segment,i?b.segmentSm:null,c?r?b.segmentActiveGlass:b.segmentActive:null],children:[H(F,{style:[b.segmentText,i?b.segmentTextSm:null,c?b.segmentTextActive:null],children:l.label}),c?H(k,{style:[b.segmentUnderline,i?b.segmentUnderlineSm:null]}):null]},l.key)})})}n(yo,"NightSegmented");function mo({label:e,tone:t="neutral"}){let a=t==="accent"?b.badgeAccent:t==="warning"?b.badgeWarning:t==="danger"?b.badgeDanger:t==="info"?b.badgeInfo:b.badgeNeutral,s=t==="accent"?b.badgeTextAccent:t==="warning"?b.badgeTextWarning:t==="danger"?b.badgeTextDanger:t==="info"?b.badgeTextInfo:b.badgeTextNeutral;return H(k,{style:[b.badge,a],children:H(F,{style:[b.badgeText,s],children:e})})}n(mo,"NightBadge");var b=We.create({sectionLabel:{color:d.color.textSecondary,fontSize:d.font.label,fontWeight:"600",letterSpacing:rs,textTransform:"uppercase",marginBottom:8,marginLeft:d.labelInset},footnote:{color:d.color.textTertiary,fontSize:d.font.caption,fontWeight:"500",lineHeight:d.font.caption*1.4,marginTop:8},footnoteInset:{marginLeft:d.labelInset},footnoteSecondary:{color:d.color.textSecondary},footnoteWarning:{color:d.color.warning},footnoteDanger:{color:d.color.danger},footnoteCentered:{textAlign:"center",marginLeft:0},card:{backgroundColor:d.color.surface,borderRadius:d.radius.card,borderWidth:1,borderColor:d.color.border,overflow:"hidden"},cardGlass:{backgroundColor:d.color.glass,borderColor:d.color.glassBorder},cardPadded:{padding:d.cardPad,gap:10},separator:{height:We.hairlineWidth,backgroundColor:d.color.separator},switchTrack:{width:uo,height:ho,borderRadius:ho/2,borderWidth:1,borderColor:d.color.fillTertiary,backgroundColor:d.color.surfaceElevated,paddingHorizontal:go,justifyContent:"center",overflow:"hidden"},switchTrackOn:{backgroundColor:d.color.accentFill,borderColor:d.color.accentBorderStrong},switchDisabled:{opacity:.4},switchThumb:{width:_t,height:_t,borderRadius:_t/2,backgroundColor:d.color.knob},switchThumbOn:{backgroundColor:d.color.accent},chip:{flexDirection:"row",alignItems:"center",gap:6,paddingHorizontal:14,paddingVertical:9,borderRadius:d.radius.chip,borderWidth:1.5,backgroundColor:d.color.buttonSurface,borderColor:d.color.fillTertiary},chipSelected:{borderColor:d.color.accentBorderStrong},chipDisabled:{opacity:.4},chipText:{fontSize:d.font.body,fontWeight:"500",color:d.color.textSecondary},chipTextSelected:{color:d.color.accent},button:{flexDirection:"row",alignItems:"center",justifyContent:"center",gap:8},buttonMd:{height:34,paddingHorizontal:16,borderRadius:17},buttonLg:{height:50,paddingHorizontal:20,borderRadius:25},buttonPrimary:{backgroundColor:d.color.accent},buttonPlate:{backgroundColor:d.color.button},buttonGhost:{backgroundColor:"transparent"},buttonFullWidth:{alignSelf:"stretch"},buttonDisabled:{opacity:.4},buttonTextMd:{fontSize:15,fontWeight:"600"},buttonTextLg:{fontSize:17,fontWeight:"600"},segmentTrack:{flex:1,flexDirection:"row",backgroundColor:d.color.bg,borderRadius:d.radius.row,borderWidth:1,borderColor:d.color.border,padding:3},segment:{flex:1,paddingVertical:8,alignItems:"center",justifyContent:"center",borderRadius:d.radius.segment},segmentTrackGlass:{backgroundColor:d.color.glass,borderColor:d.color.glassBorder},segmentActive:{backgroundColor:d.color.surfaceElevated},segmentActiveGlass:{backgroundColor:d.color.glassElevated},segmentText:{fontSize:d.font.caption,fontWeight:"500",color:d.color.textSecondary},segmentTextActive:{fontWeight:"600",color:d.color.text},segmentUnderline:{position:"absolute",bottom:2,width:24,height:2.5,borderRadius:1.25,backgroundColor:d.color.accent,shadowColor:d.color.accent,shadowOffset:{width:0,height:0},shadowOpacity:.6,shadowRadius:6},segmentSm:{paddingVertical:5},segmentTextSm:{fontSize:12},segmentUnderlineSm:{bottom:1.5,width:20,height:2,borderRadius:1},badge:{paddingHorizontal:8,paddingVertical:4,borderRadius:d.radius.badge,alignSelf:"flex-start"},badgeText:{fontSize:d.font.micro,fontWeight:"600",letterSpacing:.5,textTransform:"uppercase"},badgeAccent:{backgroundColor:d.color.accentSoft},badgeTextAccent:{color:d.color.accent},badgeWarning:{backgroundColor:d.color.warningSoft},badgeTextWarning:{color:d.color.warning},badgeDanger:{backgroundColor:d.color.dangerSoft},badgeTextDanger:{color:d.color.danger},badgeInfo:{backgroundColor:d.color.infoSoft},badgeTextInfo:{color:d.color.info},badgeNeutral:{backgroundColor:d.color.fillSecondary},badgeTextNeutral:{color:d.color.textSecondary}});import{jsx as Re,jsxs as gb}from"react/jsx-runtime";function At(e){switch(Wt(String(e))){case"dev":return{label:"DEV",backgroundColor:w.warning};case"qa":return{label:"QA",backgroundColor:w.optional};case"staging":return{label:"STAGING",backgroundColor:w.success};case"prod":return{label:"PROD",backgroundColor:w.error};case"local":default:return{label:"LOCAL",backgroundColor:w.info}}}n(At,"getEnvironmentConfig");function So({color:e}){return Re("svg",{width:12,height:12,viewBox:"0 0 24 24","aria-hidden":"true",children:Re("path",{d:"M6 9l6 6 6-6",fill:"none",stroke:e,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})})}n(So,"ChevronDownGlyph");function vo({environment:e,interactive:t=false,onPress:a}){let s=At(e);return gb("button",{onClick:t?a:void 0,"aria-label":`Environment: ${s.label}`,style:{display:"flex",flexDirection:"row",alignItems:"center",padding:`6px ${t?4:8}px 6px 8px`,flexShrink:0,background:"none",border:"none",cursor:t?"pointer":"default"},children:[Re("div",{style:{width:8,height:8,borderRadius:4,backgroundColor:s.backgroundColor,marginRight:6,boxShadow:`0 0 4px ${s.backgroundColor}99`}}),Re("span",{style:{fontSize:11,fontWeight:600,color:w.primaryLight,letterSpacing:.5},children:s.label}),t&&Re("span",{style:{marginLeft:2,display:"flex"},children:Re(So,{color:"#7A8599"})})]})}n(vo,"EnvironmentIndicator");import{jsx as we,jsxs as $a}from"react/jsx-runtime";var pb=140,fb=28,Co=44,bb=8,yb=24;function Ot(e){switch(Wt(e)){case"local":return{label:"LOCAL",backgroundColor:w.info};case"dev":return{label:"DEV",backgroundColor:w.warning};case"qa":return{label:"QA",backgroundColor:w.optional};case"staging":return{label:"STAGING",backgroundColor:w.success};case"prod":return{label:"PROD",backgroundColor:w.error};default:return{label:"LOCAL",backgroundColor:w.info}}}n(Ot,"getEnvironmentConfig");function To({environment:e,isSelected:t,onPress:a}){let s=Ot(e);return $a(ff,{onPress:a,style:({pressed:r})=>[ie.optionContainer,t&&ie.optionContainerSelected,r&&ie.optionContainerPressed],children:[$a(k,{style:ie.optionLeft,children:[we(k,{style:[ie.optionDot,{backgroundColor:s.backgroundColor},{shadowColor:s.backgroundColor,shadowOffset:{width:0,height:0},shadowOpacity:.6,shadowRadius:4,elevation:2}]}),we(F,{style:ie.optionLabel,children:s.label})]}),t&&we(ns,{size:14,color:w.success,strokeWidth:3})]})}n(To,"EnvironmentOption");function wo({hasItems:e,currentEnvironment:t,availableEnvironments:a,onSelect:s,width:r=pb,collapsedContent:o}){let i=bb+a.length*Co+yb+4,l=$a(k,{style:ie.collapsedEnvBadge,children:[we(k,{style:[ie.collapsedDot,{backgroundColor:Ot(t).backgroundColor}]}),we(F,{style:ie.collapsedLabel,children:Ot(t).label})]});return we(Qa,{hasItems:e,width:r,expandedHeight:i,peekHeight:fb,showCount:false,collapsedContent:o||l,collapsedLabel:`Switch environment from ${t}`,children:a.map(c=>we(To,{environment:c,isSelected:c===t,onPress:()=>s(c)},c))})}n(wo,"EnvironmentSelector");var ie=We.create({collapsedEnvBadge:{flexDirection:"row",alignItems:"center",gap:6},collapsedDot:{width:8,height:8,borderRadius:4},collapsedLabel:{fontSize:11,fontWeight:"600",color:w.primaryLight,letterSpacing:.5},optionContainer:{flexDirection:"row",alignItems:"center",justifyContent:"space-between",paddingHorizontal:12,height:Co,width:"100%"},optionContainerSelected:{backgroundColor:"rgba(128, 128, 128, 0.1)"},optionContainerPressed:{backgroundColor:"rgba(128, 128, 128, 0.2)"},optionLeft:{flexDirection:"row",alignItems:"center",flex:1},optionDot:{width:8,height:8,borderRadius:4,marginRight:10},optionLabel:{fontSize:12,fontWeight:"600",color:w.primaryLight,letterSpacing:.5}});import{useState as xo}from"react";import{jsx as Z,jsxs as Et}from"react/jsx-runtime";var ko=36;function Io({color:e,flipped:t}){return Z("svg",{width:10,height:10,viewBox:"0 0 24 24","aria-hidden":"true",style:{transform:t?"rotate(180deg)":"rotate(0deg)",transition:"transform 200ms ease"},children:Z("path",{d:"M18 15l-6-6-6 6",fill:"none",stroke:e,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})})}n(Io,"ChevronUpGlyph");function _o(){return Z("svg",{width:12,height:12,viewBox:"0 0 24 24","aria-hidden":"true",children:Z("path",{d:"M20 6L9 17l-5-5",fill:"none",stroke:"#4AFF9F",strokeWidth:"3",strokeLinecap:"round",strokeLinejoin:"round"})})}n(_o,"CheckGlyph");function Ao({currentEnvironment:e,availableEnvironments:t,onSelect:a}){let[s,r]=xo(false),[o,i]=xo(null),l=At(e),c=t.length*ko;return Et("div",{style:{position:"relative",zIndex:1e3,flexShrink:0},children:[Z("div",{style:{position:"absolute",bottom:"100%",left:0,right:0,height:s?c:0,opacity:s?1:0,overflow:"hidden",transition:"height 200ms ease, opacity 200ms ease",backgroundColor:"rgba(8,12,21,0.95)",border:"1px solid #00B8E666",borderBottomWidth:0,borderTopLeftRadius:6,borderTopRightRadius:6,boxShadow:"0 -4px 8px rgba(0,0,0,0.3)"},children:t.map(u=>{let y=At(u),S=String(u).toLowerCase()===String(e).toLowerCase();return Et("button",{onClick:()=>{r(false),a(u)},onPointerEnter:f=>f.pointerType==="mouse"&&i(String(u)),onPointerLeave:()=>i(null),style:{display:"flex",alignItems:"center",justifyContent:"space-between",width:"100%",height:ko,padding:"0 10px",background:S?"rgba(128,128,128,0.1)":o===String(u)?"rgba(128,128,128,0.2)":"none",border:"none",cursor:"pointer"},children:[Et("span",{style:{display:"flex",alignItems:"center"},children:[Z("span",{style:{width:6,height:6,borderRadius:3,backgroundColor:y.backgroundColor,marginRight:8}}),Z("span",{style:{fontSize:10,fontWeight:600,color:w.primaryLight,letterSpacing:.5},children:y.label})]}),S&&Z(_o,{})]},String(u))})}),Et("button",{onClick:()=>r(u=>!u),"aria-expanded":s,"aria-label":`Environment: ${l.label}. Click to switch.`,style:{display:"flex",alignItems:"center",gap:6,padding:"6px 6px 6px 8px",borderRadius:6,borderTopLeftRadius:s?0:6,borderTopRightRadius:s?0:6,backgroundColor:s?"rgba(8,12,21,0.95)":"transparent",border:"none",cursor:"pointer"},children:[Z("span",{style:{width:8,height:8,borderRadius:4,backgroundColor:l.backgroundColor,boxShadow:`0 0 4px ${l.backgroundColor}99`}}),Z("span",{style:{fontSize:11,fontWeight:600,color:w.primaryLight,letterSpacing:.5},children:l.label}),Z(Io,{color:"#7A8599",flipped:s})]})]})}n(Ao,"EnvironmentSelectorInline");export{xu as ARROW_BOTTOM_OFFSET,ku as ARROW_HEIGHT,vd as ASSETS_ICON_COLOR,Sa as AccountSetup,es as AccountSetupButton,ll as ActionCopyButton,Kd as Activity,gh as ActivityIcon,Fl as AddFilterButton,Ml as AddFilterInput,Zd as AlertCircle,vg as AlertCircleIcon,oh as AlertOctagon,sh as AlertTriangle,yh as AlertTriangleIcon,sg as AskBuoyIcon,bd as AssetsIcon,Gc as BACKGROUND_PRESETS,lu as BACKGROUND_STORAGE_KEY,Rg as BENCHMARK_ICON_COLOR,nf as BUOY_SYNTHETIC_MARK,Bl as BackButton,Tu as BackgroundSwitcher,Ql as Badge,Dd as BarChart3,Wd as BarChart3Icon,Sf as BaseEventStore,_g as BenchmarkIcon,Dp as BenchmarkLegacyIcon,ih as Bookmark,dh as Box,Ch as BoxIcon,Fr as BubbleSettingsDetail,zr as BubbleSettingsSection,fh as Bug,tg as BugIcon,vu as BuoyNeedsPlanCard,yu as BuoySignInCard,ri as BuoyUpgradeSheet,Si as CELLS,Ci as CLIP_OFFSCREEN_CELLS,Qg as CLOCK_TOOL_ICON_COLOR,Qp as CONSOLE_ICON_COLOR,_r as COPY_PAYLOAD_MAX_BYTES,Hh as CameraIcon,Pf as ChangeLog,ul as ChangeRow,ns as Check,Sh as CheckCircle,kd as CheckCircle2,kg as CheckCircle2Icon,Ah as CheckCircleIcon,xh as CheckIcon,Xd as CheckSquare,Sd as CheckSquareIcon,Ih as ChevronDown,Rh as ChevronDownIcon,Eh as ChevronLeft,Mh as ChevronLeftIcon,$h as ChevronRight,Fh as ChevronRightIcon,Dh as ChevronUp,Uh as ChevronUpIcon,Dl as ChipStrip,oc as ClipboardHintBanner,jh as Clock,ed as ClockIcon,Yg as ClockToolIcon,Ud as Cloud,qd as CloudIcon,Zc as CollapsibleSection,ql as CompactFilterChips,wu as CompactRow,Bi as CompareBar,Kp as ConsoleIcon,Vh as Copy,Zi as CopyButton,Kh as CopyIcon,nc as CountBadge,Za as CyberpunkSectionButton,qc as DEFAULT_BACKGROUND,Lc as DEVTOOLS_CARD_CONSTANTS,su as DataInspector,os as Database,ng as DatabaseIcon,di as DaylightTunable,wc as DeepFieldTunable,Uc as DetailView,Vi as DetailViewToggle,Nc as DevToolsCard,Ri as DiffModeTabs,Xh as DockBottom,ag as Download,Gg as DownloadIcon,Yc as DraggableHeader,du as DynamicFilterView,Vp as ENV_ICON_COLOR,ki as EVENT_LIST_PRESET,ig as Edit3,eg as Edit3Icon,pc as EmptyState,Pl as EntityFilterView,Hp as EnvIcon,Ag as EnvLaptopIcon,vo as EnvironmentIndicator,wo as EnvironmentSelector,Ao as EnvironmentSelectorInline,Ni as EventHistoryViewer,kc as EventListItem,Fi as EventPickerModal,ui as EventStepperFooter,vh as EventsIcon,Qa as ExpandablePopover,vi as ExpandedInfoRow,Vl as ExportPreview,bg as Eye,og as EyeIcon,is as EyeOff,ug as EyeOffIcon,mi as FeatureGate,ud as FileCode,pg as FileCodeIcon,Cg as FileJson,np as FileJsonIcon,Ig as FileText,Sg as FileTextIcon,Pg as Film,Qd as FilmIcon,Mg as Filter,ti as FilterBadge,xg as FilterIcon,Ul as FilterList,Rl as FilterSection,Wg as FlaskConical,Og as FlaskConicalIcon,Vg as FloatWindow,Lu as FloatingTool,Eu as FloatingToolDivider,zu as FloatingToolHost,Pu as FloatingToolUserStatus,Al as FooterButton,Tl as FooterCaption,kl as FooterMessage,Sl as FooterRow,Wi as FreeAccountPrompt,Qu as GAME_UI_ALERT_STATES,Yu as GameUICollapsibleSection,Ju as GameUICompactStats,Xu as GameUIIssuesList,Ku as GameUIStatusHeader,Xg as GitBranch,$g as GitBranchIcon,ap as Globe,dg as GlobeIcon,Jc as GripVerticalIcon,Ad as Hand,bp as HandIcon,pd as HardDrive,zg as HardDriveIcon,ip as Hash,Ug as HashIcon,Fc as HeaderSearchButton,ch as HelpCircle,Yh as HighlightIcon,Op as HighlightUpdatesIcon,lg as HighlighterIcon,cc as HintsProvider,Zo as HistoryEntryRow,en as HistoryList,Yo as HistoryProvider,hp as Home,_d as HomeIcon,hd as IMAGES_ICON_COLOR,Rd as IMAGE_OVERLAY_ICON_COLOR,Id as IMPERSONATE_ICON_COLOR,wg as IconBackground,Zh as IconCircle,qh as IconContainer,cg as IconLine,rg as IconRect,yp as Image,ah as ImageIcon,Od as ImageOverlayIcon,ld as ImagesIcon,wd as ImpersonateIcon,Tp as Info,Kg as InfoIcon,Hi as InfoRow,al as InlineCopyButton,Gd as JOTAI_ICON_COLOR,jd as JotaiIcon,ib as JsModal,_p as Key,ep as KeyIcon,mp as LIFECYCLE_TOOL_ICON_COLOR,Ap as LOCATION_TOOL_ICON_COLOR,Li as LOGIN_COMMAND,Oi as LOG_LIST_PRESET,Lg as LaptopIcon,Rp as Layers,op as LayersIcon,gp as LifecycleToolIcon,Sc as LinearFade,Np as Link,dp as LinkIcon,Ol as ListItem,jc as LiveSkyTunable,wp as LocationToolIcon,Wp as Lock,Jg as LockIcon,ga as LogLevel,ga as LogLevelEnum,pa as LogType,pa as LogTypeEnum,zi as MAX_PERIOD,md as Maximize2,up as Maximize2Icon,gc as MethodBadge,Up as Minus,fp as MinusIcon,vl as ModalHeader,wl as ModalHintBanner,ii as MoonlightTunable,Yp as Music,nh as MusicIcon,Fp as NETWORK_ICON_COLOR,rs as NIGHT_LABEL_TRACKING,jg as NOTIFICATIONS_ICON_COLOR,Jp as Navigation,pp as NavigationIcon,mg as NetworkGlobeIcon,Mp as NetworkIcon,mo as NightBadge,bo as NightButton,lo as NightCard,fo as NightChip,io as NightFootnote,co as NightRows,no as NightSectionLabel,yo as NightSegmented,La as NightSeparator,po as NightSwitch,mc as NoDataEmptyState,Tc as NoResultsEmptyState,Ic as NoSearchResultsEmptyState,Ng as NotificationsIcon,au as OTTO_ANCHORS,nu as OTTO_ANCHOR_SIZE,Hc as OTTO_GRID,mu as OTTO_GROUPS,uu as OTTO_NOTES,Vc as OTTO_PALETTE,oi as OTTO_REEL,Kl as OTTO_SCENES,Zl as OTTO_SCENE_BY_ID,sc as OTTO_SCENE_CROP_H,Ll as OTTO_SCENE_H,ai as OTTO_SCENE_OTTO,_l as OTTO_SCENE_PALETTE,El as OTTO_SCENE_W,Qc as OTTO_STATES,pu as OTTO_STATE_NAMES,Cu as OTTO_USES,xl as Otto,ml as OttoMotionView,cl as OttoPixels,ic as OttoSceneFrame,dc as OttoSceneStill,hl as OttoStill,lp as PERMISSIONS_ICON_COLOR,bt as PERSONAL_SETTING_KEYS,pr as PREVIEW_ITEM_RENDER_BYTE_LIMIT,Zp as Palette,vp as PaletteIcon,af as Pause,kp as PauseIcon,sp as PermissionsIcon,uh as Phone,ph as PhoneIcon,gl as Pill,xi as PillBadge,nd as Pin,od as Play,Ep as PlayIcon,cd as Plus,Bp as PlusIcon,gd as Power,Bg as PowerIcon,yi as PowerToggleButton,gg as PrimitiveGlobeIcon,li as ProBadge,Ii as ProFeatureBanner,hi as ProUpgradeModal,vc as QrCodeView,hg as QueryIcon,fn as REMOTE_RELOAD_DELAY_MS,fc as RadialGlow,hc as RasterLayer,Dg as ReactQueryIcon,ad as ReduxIcon,yd as RefreshCw,zp as RefreshCwIcon,il as RelativeTime,$p as RenderCountIcon,xp as RenderPulseIcon,Pd as Route,Bh as RouteDotIcon,cp as RouteIcon,rp as RouteMapIcon,Ph as RoutePathIcon,_h as RoutePinIcon,zh as RouteTwoPinsIcon,wh as RoutesIcon,Iu as SPACING_GAP,yg as ScenariosIcon,Cd as Search,iu as SearchBar,jp as SearchIcon,Il as SectionHeader,Hg as SentryBugIcon,bh as SentryIcon,Mr as SentryLogger,xd as Server,Eg as ServerIcon,Ht as Settings,Gp as SettingsIcon,Ed as SettingsSolid,qs as SettingsSync,Ld as Shield,qp as ShieldIcon,mh as Smartphone,Th as SmartphoneIcon,Yd as Square,th as SquareDashed,Td as SquareDashedIcon,fd as SquareIcon,Sp as StackPulseIcon,tn as StandaloneHistoryList,Oc as StatsCard,ac as StatusBadge,Dc as StatusIndicator,Qh as StorageIcon,qg as StorageStackIcon,Hl as StorageTypeBadge,Ja as Subscribable,zs as TEAM_SETTING_KEYS,Ui as TIER_LIMITS,rd as TIME_MACHINE_ICON_COLOR,Mi as TRANSPARENT,yc as TabSelector,$d as TestTube2,Xp as TestTube2Icon,Qi as TickProvider,Wc as TimeDisplay,tf as TimeMachineIcon,kh as Timer,Oh as TimerIcon,$l as ToggleRow,jt as ToolBackground,Cc as ToolButton,Ec as ToolEmptyState,bl as ToolFooter,hr as ToolScreenHeaderContext,dl as ToolbarClearButton,ol as ToolbarCopyButton,Lh as Touchpad,Nh as TouchpadIcon,Fd as Trash,Nd as Trash2,ef as Trash2Icon,Cp as TrashIcon,Bd as TriangleAlert,Ip as TriangleAlertIcon,uc as TypeBadge,Hd as Unlock,tp as UnlockIcon,Ei as UpgradeModal,fi as UpgradePrompt,Vd as Upload,Fg as UploadIcon,Jd as User,Pp as UserIcon,Wh as Users,Gh as UsersIcon,zl as ValueTypeBadge,Ai as ViewToggleCards,td as Volume,Jh as VolumeIcon,Pi as WATER_CELLS,$i as WATER_FRAMES,wi as WATER_ROW0,_i as WATER_ROWS,ft as WIRE_DETAIL_LIMIT_BYTES,Es as WIRE_INLINE_LIMIT_BYTES,eh as Wifi,Tg as WifiBifIcon,Zg as WifiCircuitIcon,fg as WifiIcon,ni as WindowControls,_c as Wormhole,lh as X,rh as XCircle,id as XCircleIcon,sd as XIcon,zd as ZUSTAND_ICON_COLOR,hh as Zap,dd as ZapIcon,Md as ZustandIcon,qu as absoluteFill,ha as add,Gr as appStorageEvent,He as approxJsonSize,xe as assertAccountAccess,hu as backgroundStore,vn as browserRouter,Y as buoyColors,Vr as buoyFetch,Ou as calculateTargetPosition,Au as calculateTooltipPosition,jf as callCapacitorNative,lr as canOpenBuoyTools,aa as capDetail,Sr as classifyPreviewItem,$r as clearEntries,tc as copyToClipboard,lf as countBuoyListener,Yl as createAutoDetectedClipboard,fr as createRestoreScope,Ds as createSyncAdapter,Qs as createToolFactory,bs as createToolStore,Xi as cycleIndexes,jr as definePersistedSetting,Xs as defineToolPreset,Ns as detailByIdAction,Se as devToolsStorageKeys,rf as dialColors,Nu as dismissFloatingTool,rr as dispatchToolAction,Gu as displayValue,br as emptyRestoreResult,Tr as entityColor,ct as expandKeyedArrays,ss as expandableWindowControlsSupported,yr as failedRestore,ea as findKeyPath,Gi as flatColors,Un as flattenObject,da as formatBytes,kr as formatDuration,Er as formatHttpStatus,Ir as formatNumber,Gn as formatPath,Ki as formatRelativeTime,Wn as formatValue,wr as formatValuePreview,w as gameUIColors,le as getAccountAccess,Xl as getAutoDetectedClipboard,Ru as getBubbleAnchorPosition,Wr as getBubbleVisibilitySettings,Yn as getCachedOptionalModule,Ur as getCapacitorAppStorage,Mn as getConstructorName,yn as getDevServerOrigin,cn as getDeviceInfo,Lr as getEntries,$u as getFloatingTools,Pr as getMethodColor,ru as getPreset,cf as getRealAppState,En as getRegisteredToolModule,Kn as getRenderCaptureProvider,of as getSafeAreaInsets,In as getSafeCurrentPathname,_n as getSafeCurrentRoute,kn as getSafeRouter,_u as getScreenCenterY,Pc as getSkyScrub,Qn as getStateSnapshotProvider,Xn as getStateSnapshotProviders,gf as getStorageBackendType,Te as getToolAdapters,ur as getToolAttention,dn as getToolModuleVersion,jn as getTypeColor,as as getUseAccountAccess,xc as getUseIsPro,Ac as getUseLicense,Rc as getUseTier,Dn as getValueSize,Ln as getValueType,ji as gridKey,la as guardToolAdapter,q as hasAccountAccess,Hf as hasCapacitorPlugin,lt as identityField,X as ignoredPatternsStore,qr as isBuoyAssetPath,Kr as isBuoyElement,Yr as isBuoyLog,ma as isBuoyRequest,Uf as isCapacitorNative,rt as isDevToolsStorageKey,Nn as isEmpty,An as isExpoRouterAvailable,Xa as isJsonSerializable,Rs as isOnDeviceMarker,pt as isOverWireBudget,zn as isPlainObjectUtil,$n as isPrimitive,Mc as isProNow,mt as isToolRegistryReady,cs as isUrlIgnored,hf as isUsingPersistentStorage,Bn as isValidJson,Ce as listShapes,ar as listSnapshotToolIds,tr as listToolActions,er as listToolIds,Vn as loadOptionalModule,un as logDeviceInfo,st as macOSColors,$s as memoByIdentity,ra as mergeChangeSources,Lp as monoFont,nl as motionUnits,Bs as newestFitting,d as night,yl as noWindowDragProps,Wt as normalizeEnvironment,ze as notifySubscriberCountChange,Ps as onDeviceMarker,Hs as onSettingsApplied,ir as openBuoyTool,Mu as openFloatingTool,qi as ottoCycle,ci as ottoReel,bi as ottoRuns,Gl as ottoSceneBounds,Wl as ottoSceneRuns,sl as ottoSheets,Kc as ottoWaterRows,Vu as parseDisplayValue,ht as parsePath,Rr as parseUrl,Fn as parseValue,ks as patchFromPath,j as persistentStorage,eu as presetAt,Xc as presetIndex,sa as readParams,xs as readPath,sr as readToolSnapshot,Ft as realNow,el as rectsOf,sf as refreshGameUIColors,Os as refusalText,mn as registerBrowserRouter,Du as registerPersistentFloatingTool,Jn as registerStateSnapshotProvider,Zs as registerToolAdapters,On as registerToolModules,nr as registerToolOpener,pn as reloadApp,gi as renderOttoFrame,Nl as renderOttoScene,sn as resetPersistedStateCache,Yi as resolveEffectiveTier,$c as resolveListEmptyState,gn as resolveReloadStrategy,tu as retryAccountAccess,ju as safeStringify,Jl as scatter,bn as scheduleReloadApp,zf as sentryLogger,fu as setExpandableWindowControls,qn as setRenderCaptureProvider,Bc as setSkyScrub,cr as setToolAttention,xr as shallowDiffSummary,_e as shapeKind,ke as shapeOf,Ts as shapeSummary,vs as shapesWereTruncated,ou as signOutOfBuoy,Ms as sizeOrStub,jl as sizeWarningLevel,mr as skippedRestore,Ks as startSettingsSync,Fe as subscribeAccountAccess,Sn as subscribeBrowserNavigation,Bu as subscribeFloatingTools,uf as subscribeRealAppState,hn as subscribeToStateSnapshotProviders,Rn as subscribeToSubscriberCountChanges,dr as subscribeToolAttention,Pn as subscriberCountNotifier,_s as suggestedPatch,Uu as superJsonDeserialize,Hu as superJsonSerialize,Js as syncSettingsNow,Gt as systemFont,it as teamSettingsStore,Ls as toWire,pi as toolTheme,Or as truncateMiddle,Ar as truncatePayload,Hn as truncateText,ta as truncatedNote,gt as typedEditViolations,Cr as unionKeys,Cs as unshapedLists,Vt as urlMatchesIgnoredPattern,Xo as useAllHistoryEntries,rn as useChangeLog,si as useChipTap,ln as useDeviceInfo,nn as useEventStoreEvents,Ti as useFeatureGate,Fu as useFilterManager,Zu as useGameUIAlertState,bc as useHintsContext,ts as useHintsDisabled,Jo as useHistoryAdapter,Ko as useHistoryAdapters,qo as useHistoryContext,Qo as useHistoryEntryCounts,hs as useIgnoredPatterns,Ji as useLimit,rc as useLoop,Cl as useOttoAnchorMotion,fl as useOttoReel,an as usePersistedState,lc as usePulse,rl as useRelativeTime,Wu as useSafeAreaInsets,xn as useSafeGlobalSearchParams,Tn as useSafePathname,Cn as useSafeRouter,wn as useSafeSegments,gu as useSignInState,zc as useSkyScrub,on as useSubscribedValue,ps as useTeamList,tl as useTick,bu as useToolBackground,gr as useToolScreenHeader,or as waitForToolRegistry,pl as windowDragProps,ec as withBgAlpha,vr as wontApply};
|
|
14
|
+
`}),Oe("div",{"data-account-launcher":"",children:Oe(es,{expanded:e,onPress:()=>t(i=>!i)})}),e&&Oe("section",{ref:s,className:"buoy-account-panel",role:"dialog","aria-labelledby":r,tabIndex:-1,onBlur:i=>{i.relatedTarget instanceof Node&&!a.current?.contains(i.relatedTarget)&&o(false)},children:Oe(zi,{titleId:r,onClose:()=>o()})})]})})}n(Sa,"AccountSetup");import{useState as Q,useRef as N,useEffect as ae,useLayoutEffect as qf,useCallback as B,memo as va,isValidElement as Jf,cloneElement as Xf}from"react";var Ca=class Xb{static async save(t,a){this.cache.set(t,a);try{await j.setItem(t,JSON.stringify(a))}catch{}}static async load(t){if(this.cache.has(t))return this.cache.get(t);try{let a=await j.getItem(t);if(a){let s=JSON.parse(a);return this.cache.set(t,s),s}}catch{}return null}static saveMinimized(t,a){return this.save(t,{mode:a.mode,panelHeight:a.panelHeight,dimensions:a.floatingDimensions&&a.floatingPosition?{...a.floatingDimensions,top:a.floatingPosition.y,left:a.floatingPosition.x}:void 0,isVisible:false})}};n(Ca,"ModalStorage"),Ca.cache=new Map;var Ta=Ca;import{Fragment as Qf,jsx as p,jsxs as D}from"react/jsx-runtime";var L={base:"#121212",card:"#1A1A1A",border:"#333333",textMuted:"#888888",primary:"#20C997"},z={primary:"#F5F5F7",primaryLight:"#F5F5F7",secondary:"#A1A1A6",muted:"#8E8E93",success:"#34C759",info:"#00B8E6"},Zf=100,eb=400,Qr=500,Ee=80,Tt=n(()=>typeof window<"u"?window.innerWidth:0,"screenW"),de=n(()=>typeof window<"u"?window.innerHeight:0,"screenH"),Zr=n(e=>1-Math.pow(1-e,3),"easeOutCubic"),Ve=n(e=>e<.5?2*e*e:1-Math.pow(-2*e+2,2)/2,"easeInOut");function he(e,t,a,s){let r=0,o=false,i=performance.now(),l=n(c=>{if(o)return;let u=Math.min((c-i)/e,1);a(t(u)),u<1?r=requestAnimationFrame(l):s?.()},"tick");return r=requestAnimationFrame(l),()=>{o=true,cancelAnimationFrame(r)}}n(he,"runAnim");function eo(){if(typeof document>"u")return{top:0,left:0,right:0,bottom:0};let e=document.createElement("div");e.style.cssText="position:fixed;top:env(safe-area-inset-top);left:env(safe-area-inset-left);right:env(safe-area-inset-right);bottom:env(safe-area-inset-bottom);visibility:hidden;pointer-events:none",document.body.appendChild(e);let t=e.getBoundingClientRect();return document.body.removeChild(e),{top:Math.max(0,t.top),left:Math.max(0,t.left),right:Math.max(0,window.innerWidth-t.right),bottom:Math.max(0,window.innerHeight-t.bottom)}}n(eo,"readSafeAreaInsets");function wt(e,t,a=false){let s=Math.max(Ee,window.innerWidth-t.left-t.right),r=Math.max(Ee,window.innerHeight-t.top-t.bottom),o=Math.min(e.width,s),i=Math.min(e.height,r);return{width:o,height:i,left:Math.max(t.left,Math.min(e.left,window.innerWidth-t.right-o)),top:Math.max(t.top,Math.min(e.top,window.innerHeight-t.bottom-(a?Ee:i)))}}n(wt,"clampRectToSafeArea");var wa=n(({size:e=24,color:t="currentColor",strokeWidth:a=2})=>D("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",children:[p("line",{x1:18,y1:6,x2:6,y2:18,stroke:t,strokeWidth:a,strokeLinecap:"round"}),p("line",{x1:6,y1:6,x2:18,y2:18,stroke:t,strokeWidth:a,strokeLinecap:"round"})]}),"XIcon"),xa=n(({size:e=24,color:t="currentColor",strokeWidth:a=2})=>p("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",children:p("line",{x1:5,y1:12,x2:19,y2:12,stroke:t,strokeWidth:a,strokeLinecap:"round"})}),"MinusIcon"),to=n(({size:e=24,color:t="currentColor",strokeWidth:a=2})=>D("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",children:[p("rect",{x:3,y:3,width:18,height:18,rx:2,stroke:t,strokeWidth:a}),p("rect",{x:3,y:14,width:18,height:7,fill:t})]}),"DockBottomIcon"),ao=n(({size:e=24,color:t="currentColor",strokeWidth:a=2})=>D("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",children:[p("rect",{x:3,y:3,width:14,height:14,rx:2,stroke:t,strokeWidth:a}),p("line",{x1:7,y1:17,x2:7,y2:21,stroke:t,strokeWidth:a}),p("line",{x1:7,y1:21,x2:21,y2:21,stroke:t,strokeWidth:a}),p("line",{x1:21,y1:21,x2:21,y2:7,stroke:t,strokeWidth:a}),p("line",{x1:17,y1:7,x2:21,y2:7,stroke:t,strokeWidth:a})]}),"FloatWindowIcon"),ne={close:"#FF5F57",minimize:"#FEBC2E",toggleMode:"#28C840"},ka=24,tb=2,Pe=8,Ia=n(e=>({width:ka,height:ka,borderRadius:ka/2,display:"flex",alignItems:"center",justifyContent:"center",background:`radial-gradient(circle, ${e} 6px, transparent 6px)`,border:"none",padding:0,cursor:"pointer",flexShrink:0}),"wcDotStyle");function so(e){return vu()&&ss(true)?p(oo,{...e}):p(ro,{...e})}n(so,"WindowControls");function ro({onClose:e,onMinimize:t,onToggleMode:a,mode:s}){let r=s==="floating"?to:ao,o=s==="floating"?"Dock to bottom sheet":"Make floating window";return D("div",{style:{display:"flex",flexDirection:"row",alignItems:"center",gap:tb},children:[t&&p("button",{type:"button",onClick:t,style:Ia(ne.minimize),"aria-label":"Minimize modal",children:p(xa,{size:Pe,color:"#7A5A00",strokeWidth:1.5})}),a&&p("button",{type:"button",onClick:a,style:Ia(ne.toggleMode),"aria-label":o,children:p(r,{size:Pe,color:"#004A1A",strokeWidth:1.5})}),p("button",{type:"button",onClick:e,style:Ia(ne.close),"aria-label":"Close modal",children:p(wa,{size:Pe,color:"#4A0000",strokeWidth:1.5})})]})}n(ro,"PlainWindowControls");var _a=12,ab=8,xt=36,sb=12,Aa=16,kt=8,rb=3e3,Oa=150,Ea=n(e=>({width:_a,height:_a,borderRadius:_a/2,backgroundColor:e,display:"flex",alignItems:"center",justifyContent:"center"}),"wcCollapsedDot"),Pa=n((e,t,a,s)=>({width:xt,height:xt,borderRadius:xt/2,display:"flex",alignItems:"center",justifyContent:"center",padding:0,cursor:"pointer",flexShrink:0,backgroundColor:e?a:t,border:e?`1px solid ${s}`:"none"}),"wcExpandedButton");function oo({onClose:e,onMinimize:t,onToggleMode:a,mode:s,variant:r="night"}){let o=r==="night",[i,l]=Q(false),[c,u]=Q(false),y=N(null),S=N(null),f=s==="floating"?to:ao,m=s==="floating"?"Dock to bottom sheet":"Make floating window",C=B(()=>{y.current&&clearTimeout(y.current),S.current&&clearTimeout(S.current),y.current=null,S.current=null},[]),A=B(()=>{C(),u(false),S.current=setTimeout(()=>l(false),Oa)},[C]),W=B(()=>{C(),l(true),requestAnimationFrame(()=>requestAnimationFrame(()=>u(true))),y.current=setTimeout(A,rb)},[C,A]);ae(()=>C,[C]);let V=n(M=>{A(),M()},"handleAction");return D(Qf,{children:[D("button",{type:"button",onClick:W,"aria-label":"Open window controls","data-testid":"tool-window-controls",style:{padding:10,margin:-8,border:"none",background:"transparent",cursor:"pointer",display:"flex",flexDirection:"row",alignItems:"center",gap:ab},children:[t&&p("span",{style:Ea(ne.minimize),children:p(xa,{size:Pe,color:"#7A5A00",strokeWidth:1.5})}),a&&p("span",{style:Ea(ne.toggleMode),children:p(f,{size:Pe,color:"#004A1A",strokeWidth:1.5})}),p("span",{style:Ea(ne.close),children:p(wa,{size:Pe,color:"#4A0000",strokeWidth:1.5})})]}),i&&p("div",{style:{position:"absolute",top:-kt,right:-kt,zIndex:9999,transform:`scale(${c?1:.3})`,opacity:c?1:0,transition:`transform ${Oa}ms ease-out, opacity ${Oa}ms ease-out`},children:D("div",{style:{display:"flex",flexDirection:"row",alignItems:"center",gap:sb,padding:kt,borderRadius:(xt+kt*2)/2,backgroundColor:o?d.color.surface:L.card,border:`1px solid ${o?d.color.border:L.border}`,boxShadow:"0 4px 12px rgba(0,0,0,0.4)"},children:[t&&p("button",{type:"button",onClick:()=>V(t),"aria-label":"Minimize modal","data-testid":"tool-window-minimize",style:Pa(o,ne.minimize,d.color.warningSoft,d.color.warning+"59"),children:p(xa,{size:Aa,color:o?d.color.warning:"#7A5A00",strokeWidth:2})}),a&&p("button",{type:"button",onClick:()=>V(a),"aria-label":m,"data-testid":"tool-window-mode",style:Pa(o,ne.toggleMode,d.color.accentSoft,d.color.accentBorderStrong),children:p(f,{size:Aa,color:o?d.color.accent:"#004A1A",strokeWidth:2})}),p("button",{type:"button",onClick:()=>V(e),"aria-label":"Close modal","data-testid":"tool-window-close",style:Pa(o,ne.close,d.color.dangerSoft,d.color.danger+"59"),children:p(wa,{size:Aa,color:o?d.color.danger:"#4A0000",strokeWidth:2})})]})})]})}n(oo,"ExpandableWindowControls");var no=va(n(function({isResizing:e,mode:t,hasCustomContent:a=false,variant:s="default"}){let r=t==="floating",o=s==="night";return D("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",position:"relative",justifyContent:a?"center":void 0,minHeight:a?32:void 0,paddingTop:a?0:8,paddingBottom:a?0:8,backgroundColor:"transparent"},children:[p("div",{style:{width:o?36:e?40:r?50:40,height:o||r?5:3,backgroundColor:o?d.color.placeholder:e?L.primary:r?L.textMuted:L.primary,borderRadius:o?2.5:2,boxShadow:o?"none":`0 0 4px ${L.primary}99`}}),e&&t==="bottomSheet"&&p("div",{style:{position:"absolute",display:"flex",flexDirection:"row",gap:2,marginTop:12},children:[0,1,2].map(i=>p("div",{style:{width:12,height:1,backgroundColor:z.success,opacity:.6}},i))})]})},"DragIndicator")),ob=va(n(function({onAcknowledge:e}){return p("div",{style:{backgroundColor:`${z.info}15`,borderLeft:`3px solid ${z.info}`,borderRadius:8,margin:"8px 12px 4px",overflow:"hidden",boxShadow:`0 0 8px ${z.info}4D`,flexShrink:0},children:D("div",{style:{display:"flex",flexDirection:"row",alignItems:"center",padding:12,gap:12},children:[D("div",{style:{width:32,height:32,position:"relative",display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0},children:[p("div",{style:{position:"absolute",width:20,height:20,borderRadius:10,border:`2px solid ${z.info}`,opacity:.6,transform:"scale(0.8)",boxSizing:"border-box"}}),p("div",{style:{position:"absolute",width:20,height:20,borderRadius:10,border:`2px solid ${z.info}`,boxSizing:"border-box"}})]}),D("div",{style:{flex:1,display:"flex",flexDirection:"column",gap:2},children:[p("span",{style:{fontSize:13,fontWeight:600,color:z.info,letterSpacing:.3},children:"\u{1F4A1} Pro Tip"}),p("span",{style:{fontSize:12,color:z.primaryLight,lineHeight:"16px"},children:"Double-tap the header to transform this into a floating modal"})]}),p("button",{type:"button",onClick:e,style:{backgroundColor:`${z.info}30`,padding:"6px 12px",borderRadius:6,border:`1px solid ${z.info}50`,fontSize:12,fontWeight:600,color:z.info,cursor:"pointer",fontFamily:"inherit",flexShrink:0},children:"Got it!"})]})})},"ModalHintBanner"));function Ra({header:e,isResizing:t,mode:a,onMinimize:s,variant:r="default"}){if(e?.customContent){let o=e.customContent;return Jf(e.customContent)&&s&&(o=Xf(e.customContent,{onMinimize:s})),D("div",{style:{flex:1,display:"flex",flexDirection:"column",justifyContent:"center",minWidth:0},children:[p(no,{isResizing:t,mode:a,hasCustomContent:true,variant:r}),o]})}return D("div",{style:{flex:1,display:"flex",flexDirection:"column",justifyContent:"center",position:"relative",minWidth:0},children:[p(no,{isResizing:t,mode:a,variant:r}),D("div",{style:{padding:"0 16px",display:"flex",flexDirection:"column",alignItems:"center"},children:[e?.title&&p("span",{style:{fontSize:16,fontWeight:600,color:z.primary},children:e.title}),e?.subtitle&&p("span",{style:{fontSize:12,color:z.secondary,paddingTop:4},children:e.subtitle})]}),p("div",{style:{position:"absolute",inset:0,display:"flex",alignItems:"center",justifyContent:"center",pointerEvents:"none"},children:p("span",{style:{fontSize:10,color:z.muted,fontStyle:"italic"},children:"Double tap: Toggle \u2022 Triple tap: Close"})})]})}n(Ra,"ModalHeaderContent");var nb=n(({visible:e,onClose:t,children:a,header:s,styles:r={},minHeight:o=Zf,maxHeight:i,initialHeight:l=eb,animatedHeight:c,benchMotion:u,initialMode:y="bottomSheet",onModeChange:S,persistenceKey:f,enablePersistence:m=true,initialFloatingPosition:C,footer:A,footerHeight:W=0,onBack:V,onMinimize:M,minimizeRequest:v=0,minimizeTargetPosition:se,initialModalState:$,zIndex:Ye,disableScrollWrapper:Eo=false,background:Ba=true,variant:Ke="night"})=>{let[q]=Q(eo),[Ma,Na]=Q(!m),[R,Pt]=Q(y),qe=N(S);qe.current=S;let[Le,ge]=Q(false),[Rt,$e]=Q(false),[Po,Lt]=Q(l),[re,Be]=Q(()=>wt({width:Tt(),height:Qr,top:C?.y??(de()-Qr)/2,left:C?.x??0},q)),[Ro,Je]=Q(false),[Lo,Da]=Q(false),$o=ts(),pe=N(l),J=N(re),U=N({x:re.left,y:re.top}),Xe=N(null),$t=N(null),oe=N(null),fe=N([]),ee=B(()=>{fe.current.forEach(h=>h()),fe.current=[]},[]);ae(()=>{J.current=re},[re]),ae(()=>ee,[ee]);let za=i||de()-q.top;ae(()=>{if(!m||!f){Na(true);return}let h=true;return n(async()=>{let g=await Ta.load(f);if(h&&g&&(g.mode&&(Pt(g.mode),qe.current?.(g.mode)),g.panelHeight&&(Lt(g.panelHeight),pe.current=g.panelHeight),g.dimensions)){let T=wt(g.dimensions,q,true);Be(T),U.current={x:T.left,y:T.top}}h&&Na(true)},"loadState")(),()=>{h=false}},[f,m]),ae(()=>{if(!m||!f||!Ma)return;let h=setTimeout(()=>{Ta.save(f,{mode:R,panelHeight:pe.current,dimensions:re,isVisible:e})},500);return()=>clearTimeout(h)},[R,Po,re,e,f,m,Ma]),ae(()=>{let h=true;return n(async()=>{try{let g=Se.modal.hintAcknowledged(),T=await j.getItem(g);h&&(Je(T!=="true"),Da(true))}catch{h&&(Je(true),Da(true))}},"loadHintStatus")(),()=>{h=false}},[]);let Bo=B(async()=>{try{let h=Se.modal.hintAcknowledged();await j.setItem(h,"true"),Je(false)}catch{Je(false)}},[]),Bt=B(()=>{$e(false),ge(false);let h=R==="bottomSheet"?"floating":"bottomSheet";Pt(h),qe.current?.(h)},[R]);ae(()=>{$e(false),ge(false)},[R]);let be=B(()=>{if(!M)return;let h={mode:R,panelHeight:pe.current,floatingPosition:{x:J.current.left,y:J.current.top},floatingDimensions:{width:J.current.width,height:J.current.height}};m&&f&&Ta.saveMinimized(f,h);let g=se?.x??Tt()-50,T=se?.y??de()-150;if(ee(),R==="bottomSheet"){let I=Xe.current;if(!I){M(h);return}let x=de();fe.current.push(he(300,Ve,E=>{I.style.opacity=String(1-E),I.style.transform=`translateY(${E*x}px)`},()=>M(h)))}else{let I=oe.current;if(!I){M(h);return}let x={...U.current};fe.current.push(he(300,Ve,E=>{I.style.opacity=String(1-E);let ye=x.x+(g-x.x)*E,me=x.y+(T-x.y)*E;I.style.transform=`translate(${ye}px, ${me}px)`},()=>M(h)))}},[R,M,se,ee,m,f]),Fa=N(v);ae(()=>{Fa.current!==v&&(Fa.current=v,be())},[v,be]),ae(()=>{if($&&($.mode&&(Pt($.mode),qe.current?.($.mode)),$.panelHeight&&(Lt($.panelHeight),pe.current=$.panelHeight),$.floatingDimensions&&$.floatingPosition)){let h={width:$.floatingDimensions.width,height:$.floatingDimensions.height,top:$.floatingPosition.y,left:$.floatingPosition.x};Be(h),U.current={x:$.floatingPosition.x,y:$.floatingPosition.y}}},[$]),qf(()=>{if(e)if(ee(),R==="bottomSheet"){let h=Xe.current;if(!h)return;let g=de();h.style.transform=`translateY(${g}px)`,h.style.opacity="0",fe.current.push(he(300,Zr,T=>{h.style.transform=`translateY(${(1-T)*g}px)`}),he(200,Ve,T=>{h.style.opacity=String(T)}))}else{let h=oe.current;if(!h)return;U.current={x:J.current.left,y:J.current.top},h.style.transform=`translate(${U.current.x}px, ${U.current.y}px)`,h.style.opacity="0",fe.current.push(he(200,Ve,g=>{h.style.opacity=String(g)}))}},[e,R,ee]);let Wa=N(0),Me=N(0),Ne=N(null),Qe=B(()=>{let h=Date.now();h-Wa.current>500&&(Me.current=0),Me.current++,Wa.current=h,Ne.current&&clearTimeout(Ne.current),Ne.current=setTimeout(()=>{Me.current===2?Bt():Me.current>=3&&M&&be(),Me.current=0},300)},[Bt,M,be]);ae(()=>()=>{Ne.current&&clearTimeout(Ne.current)},[]);let Ze=N({active:false,resizing:false,startY:0,headerOffsetY:0,samples:[]}),Mo=B(h=>{if(R!=="bottomSheet"||h.button!==0||h.target.closest('button, a, input, textarea, select, [role="button"], [role="tab"], [role="switch"], [contenteditable="true"], [tabindex]'))return;let g=Ze.current;g.active=true,g.resizing=false,g.startY=h.clientY;let T=h.currentTarget.getBoundingClientRect();g.headerOffsetY=h.clientY-T.top,g.samples=[{t:performance.now(),y:h.clientY}],h.currentTarget.setPointerCapture(h.pointerId)},[R]),No=B(h=>{let g=Ze.current;if(!g.active)return;let T=h.clientY-g.startY;if(!g.resizing&&Math.abs(T)>3&&(g.resizing=true,ee(),ge(true)),!g.resizing)return;let I=h.clientY-g.headerOffsetY,x=de()-I;x=Math.max(o,Math.min(x,za)),pe.current=x,$t.current&&($t.current.style.height=`${x}px`);let E=performance.now();for(g.samples.push({t:E,y:h.clientY});g.samples.length>2&&E-g.samples[0].t>100;)g.samples.shift()},[o,za,ee]),Do=B(h=>{let g=Ze.current;if(!g.active)return;if(g.active=false,!g.resizing){Qe();return}ge(false);let T=pe.current,I=h.clientY-g.startY,x=g.samples[0],E=g.samples[g.samples.length-1];if((E&&x&&E.t>x.t?(E.y-x.y)/(E.t-x.t):0)>.8&&I>50||I>150&&T<=o){let ye=Xe.current;if(ee(),ye){let me=de();fe.current.push(he(200,Ve,G=>{ye.style.opacity=String(1-G)}),he(300,Zr,G=>{ye.style.transform=`translateY(${G*me}px)`},()=>t()))}else t();return}Lt(T)},[o,t,Qe,ee]),zo=B(()=>{let h=Ze.current;h.active&&(h.active=false,h.resizing=false,ge(false))},[]),et=N({active:false,dragging:false,startX:0,startY:0,startPos:{x:0,y:0}}),Fo=B(h=>{if(R!=="floating"||Le||h.button!==0||h.target.closest('button, a, input, textarea, select, [role="button"], [role="tab"], [role="switch"], [contenteditable="true"], [tabindex]'))return;let g=et.current;g.active=true,g.dragging=false,g.startX=h.clientX,g.startY=h.clientY,g.startPos={...U.current},h.currentTarget.setPointerCapture(h.pointerId)},[R,Le]),Wo=B(h=>{let g=et.current;if(!g.active)return;let T=h.clientX-g.startX,I=h.clientY-g.startY;if(!g.dragging&&Math.abs(T)+Math.abs(I)>5&&(g.dragging=true,$e(true)),!g.dragging)return;let x=g.startPos.x+T,E=g.startPos.y+I;U.current={x,y:E},oe.current&&(oe.current.style.transform=`translate(${x}px, ${E}px)`)},[]),jo=B(()=>{let h=et.current;if(!h.active)return;if(h.active=false,!h.dragging){Qe();return}$e(false);let g=J.current,T=wt({...g,left:U.current.x,top:U.current.y},q),I=T.left,x=T.top;U.current={x:I,y:x},oe.current&&(oe.current.style.transform=`translate(${I}px, ${x}px)`),Be(E=>({...E,left:I,top:x}))},[q,Qe]),Ho=B(()=>{let h=et.current;h.active&&(h.active=false,h.dragging=false,$e(false))},[]),Mt=N({active:false,corner:"bottomRight",startX:0,startY:0,start:{width:0,height:0,top:0,left:0}}),Uo=B(h=>g=>{if(R!=="floating")return;g.stopPropagation();let T=Mt.current;T.active=true,T.corner=h,T.startX=g.clientX,T.startY=g.clientY,T.start={...J.current},ge(true),g.currentTarget.setPointerCapture(g.pointerId)},[R]),Go=B(h=>{let g=Mt.current;if(!g.active)return;let T=h.clientX-g.startX,I=h.clientY-g.startY;if(Math.abs(T)<.5&&Math.abs(I)<.5)return;let x=Math.max(0,q.left),E=de()-Math.max(0,q.bottom),ye=Tt()-Math.max(0,q.right),me=Tt()*.25,G=g.start,Nt=G.left+G.width,Dt=G.top+G.height,De=G.left,at=G.top,Ka=Nt,zt=Dt;g.corner==="bottomLeft"?(De=Math.max(x,Math.min(G.left+T,Nt-me)),zt=Math.min(E,Math.max(Dt+I,G.top+Ee))):(Ka=Math.min(ye,Math.max(Nt+T,G.left+me)),zt=Math.min(E,Math.max(Dt+I,G.top+Ee)));let Vo=Math.max(me,Ka-De),Yo=Math.max(Ee,zt-at),qa={width:Vo,height:Yo,left:De,top:at};J.current=qa,U.current={x:De,y:at},Be(qa),oe.current&&(oe.current.style.transform=`translate(${De}px, ${at}px)`)},[q.left,q.right,q.bottom]),ja=B(()=>{let h=Mt.current;h.active&&(h.active=false,ge(false),Be(J.current))},[]),tt=!e,Ha=tt?{left:-9999,top:-9999,opacity:0,visibility:"hidden",pointerEvents:"none"}:{},Ua=s?.title||"Dev tool panel",O=Ke==="night",Ga=Ba&&O?p("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},"aria-hidden":true,children:p(jt,{})}):null,Va=D("div",{style:{flex:1,minHeight:0,position:"relative",display:"flex",flexDirection:"column",backgroundColor:O?"transparent":L.base,borderBottomLeftRadius:16,borderBottomRightRadius:16,overflow:"hidden",...r.content},children:[Ba&&!O?p(jt,{}):null,Eo?p("div",{style:{flex:1,minHeight:0,display:"flex",flexDirection:"column",paddingBottom:W},children:a}):p("div",{style:{flex:1,minHeight:0,overflowY:"auto",paddingBottom:W},children:a}),A?p("div",{style:{position:"absolute",left:0,right:0,bottom:0,backgroundColor:L.base,borderBottomLeftRadius:16,borderBottomRightRadius:16},children:A}):null]}),Ya=p("div",{style:{position:"absolute",top:4,right:4,zIndex:10},children:p(so,{onClose:t,onMinimize:M?be:void 0,onToggleMode:Bt,mode:R,variant:Ke})});if(R==="floating"){let h=Rt||Le;return D("div",{ref:oe,role:"dialog","aria-label":Ua,"aria-hidden":tt||void 0,style:{fontFamily:Gt,position:"fixed",pointerEvents:"auto",left:0,top:0,width:re.width,height:re.height,transform:`translate(${U.current.x}px, ${U.current.y}px)`,display:"flex",flexDirection:"column",backgroundColor:O?d.color.bg:L.card,borderRadius:O?d.radius.sheet:6,border:O?`1px solid ${d.color.accent}55`:h?`2px solid ${L.primary}`:`1px solid ${L.border}`,boxShadow:O?`0 0 14px ${d.color.accent}38`:h?`0 0 12px ${L.primary}7A`:`0 0 20px ${L.primary}4D`,...O?{overflow:"hidden"}:null,boxSizing:"border-box",zIndex:Ye??1e3,...r.container,...Ha},children:[Ga,p("div",{onPointerDown:Fo,onPointerMove:Wo,onPointerUp:jo,onPointerCancel:Ho,style:{borderTopLeftRadius:O?d.radius.sheet:6,borderTopRightRadius:O?d.radius.sheet:6,backgroundColor:O?"transparent":L.card,minHeight:56,border:O?"none":`1px solid ${L.border}`,boxSizing:"border-box",display:"flex",flexDirection:"column",justifyContent:"center",flexShrink:0,touchAction:"none",userSelect:"none",cursor:Rt?"grabbing":"grab",position:"relative"},children:p(Ra,{header:s,isResizing:Rt||Le,mode:R,onMinimize:M?be:void 0,variant:Ke})}),Ya,Va,["bottomLeft","bottomRight"].map(g=>p("div",{onPointerDown:Uo(g),onPointerMove:Go,onPointerUp:ja,onPointerCancel:ja,style:{position:"absolute",width:30,height:30,bottom:4,...g==="bottomLeft"?{left:4}:{right:4},zIndex:1e3,touchAction:"none",cursor:g==="bottomLeft"?"nesw-resize":"nwse-resize"},children:p("div",{style:{width:20,height:20,borderRadius:10,boxSizing:"border-box",backgroundColor:h?`${z.success}1A`:"transparent",border:h?`2px solid ${z.success}`:"none",boxShadow:h?`0 0 8px ${z.success}99`:"none"}})},g))]},"floating")}return p("div",{"aria-hidden":tt||void 0,style:{fontFamily:Gt,position:"fixed",inset:0,zIndex:Ye??1e3,pointerEvents:"none",...tt?{...Ha,inset:"auto",width:"100vw",height:"100vh"}:null},children:p("div",{ref:Xe,style:{position:"absolute",bottom:0,left:0,right:0,pointerEvents:"auto"},children:D("div",{ref:$t,role:"dialog","aria-label":Ua,style:{height:pe.current,display:"flex",flexDirection:"column",backgroundColor:O?d.color.bg:L.card,borderTopLeftRadius:O?d.radius.sheet:6,borderTopRightRadius:O?d.radius.sheet:6,border:O?`1px solid ${d.color.accent}55`:`1px solid ${L.border}`,boxShadow:O?`0 -4px 10px ${d.color.accent}38`:`0 -4px 12px ${L.primary}33`,...O?{overflow:"hidden"}:null,boxSizing:"border-box",position:"relative",...r.container},children:[Ga,p("div",{onPointerDown:Mo,onPointerMove:No,onPointerUp:Do,onPointerCancel:zo,style:{borderTopLeftRadius:O?d.radius.sheet:6,borderTopRightRadius:O?d.radius.sheet:6,backgroundColor:O?"transparent":L.card,minHeight:56,border:O?"none":`1px solid ${L.border}`,boxSizing:"border-box",display:"flex",flexDirection:"column",justifyContent:"center",flexShrink:0,touchAction:"none",userSelect:"none",cursor:"ns-resize",position:"relative"},children:p(Ra,{header:s,isResizing:Le,mode:R,onMinimize:M?be:void 0,variant:Ke})}),Ya,Lo&&Ro&&!$o&&p(ob,{onAcknowledge:Bo}),Va]})})},"bottomSheet")},"JsModalComponent"),ib=va(e=>as()().status!=="admitted"?e.visible?p(Sa,{}):null:p(nb,{...e}));import{Children as lb,useEffect as cb,useRef as ub}from"react";import{Fragment as db,jsx as H,jsxs as It}from"react/jsx-runtime";function io({children:e,style:t}){return H(F,{style:[b.sectionLabel,t],children:e})}n(io,"NightSectionLabel");function lo({children:e,centered:t,tone:a="tertiary",style:s}){let r=We.flatten(s),o=!!r&&(r.marginHorizontal!=null||r.margin!=null);return H(F,{style:[b.footnote,o?null:b.footnoteInset,a==="secondary"?b.footnoteSecondary:null,a==="warning"?b.footnoteWarning:null,a==="danger"?b.footnoteDanger:null,t?b.footnoteCentered:null,s],children:e})}n(lo,"NightFootnote");function co({children:e,padded:t,glass:a,style:s}){return H(k,{style:[b.card,a?b.cardGlass:null,t?b.cardPadded:null,s],children:e})}n(co,"NightCard");function La({inset:e=d.rowPadH}){return H(k,{style:[b.separator,{marginLeft:e}]})}n(La,"NightSeparator");function uo({children:e,inset:t=d.rowPadH}){let a=lb.toArray(e);return H(db,{children:a.map((s,r)=>It(k,{children:[r>0?H(La,{inset:t}):null,s]},s.key??r))})}n(uo,"NightRows");var ho=56,go=32,_t=22,po=5,hb=ho-_t-po*2;function fo({value:e,onValueChange:t,disabled:a,testID:s,accessibilityLabel:r}){let o=ub(new Ut.Value(e?1:0)).current;return cb(()=>{Ut.timing(o,{toValue:e?1:0,duration:200,useNativeDriver:pf.OS!=="web"}).start()},[e,o]),H(ot,{activeOpacity:.8,disabled:a,onPress:()=>t(!e),testID:s,accessibilityLabel:r,accessibilityRole:"switch",accessibilityState:{checked:e,disabled:a},hitSlop:{top:8,bottom:8,left:8,right:8},style:[b.switchTrack,e?b.switchTrackOn:null,a?b.switchDisabled:null],children:H(Ut.View,{style:[b.switchThumb,e?b.switchThumbOn:null,{transform:[{translateX:o.interpolate({inputRange:[0,1],outputRange:[0,hb]})}]}]})})}n(fo,"NightSwitch");function bo({label:e,selected:t,onPress:a,disabled:s,icon:r,testID:o}){return It(ot,{activeOpacity:.7,disabled:s||!a,onPress:a,testID:o,style:[b.chip,t?b.chipSelected:null,s?b.chipDisabled:null],children:[r,H(F,{style:[b.chipText,t?b.chipTextSelected:null],children:e})]})}n(bo,"NightChip");function yo({label:e,onPress:t,variant:a="secondary",size:s="lg",icon:r,disabled:o,fullWidth:i=true,testID:l,accessibilityLabel:c}){let u=a==="primary"?d.color.onAccent:a==="tertiary"?d.color.text:a==="destructive"?d.color.danger:d.color.accent;return It(ot,{activeOpacity:.7,disabled:o,onPress:t,testID:l,accessibilityRole:"button",accessibilityLabel:c??e,accessibilityState:{disabled:!!o},style:[b.button,s==="md"?b.buttonMd:b.buttonLg,a==="primary"?b.buttonPrimary:a==="ghost"?b.buttonGhost:b.buttonPlate,i?b.buttonFullWidth:null,o?b.buttonDisabled:null],children:[r,H(F,{style:[s==="md"?b.buttonTextMd:b.buttonTextLg,{color:u}],children:e})]})}n(yo,"NightButton");function mo({tabs:e,activeKey:t,onChange:a,size:s="md",glass:r,testIDPrefix:o}){let i=s==="sm";return H(k,{style:[b.segmentTrack,r?b.segmentTrackGlass:null],children:e.map(l=>{let c=l.key===t;return It(ot,{activeOpacity:.7,testID:o?`${o}-${l.key}`:void 0,accessibilityRole:"tab",accessibilityState:{selected:c},accessibilityLabel:l.label,onPress:()=>a(l.key),style:[b.segment,i?b.segmentSm:null,c?r?b.segmentActiveGlass:b.segmentActive:null],children:[H(F,{style:[b.segmentText,i?b.segmentTextSm:null,c?b.segmentTextActive:null],children:l.label}),c?H(k,{style:[b.segmentUnderline,i?b.segmentUnderlineSm:null]}):null]},l.key)})})}n(mo,"NightSegmented");function So({label:e,tone:t="neutral"}){let a=t==="accent"?b.badgeAccent:t==="warning"?b.badgeWarning:t==="danger"?b.badgeDanger:t==="info"?b.badgeInfo:b.badgeNeutral,s=t==="accent"?b.badgeTextAccent:t==="warning"?b.badgeTextWarning:t==="danger"?b.badgeTextDanger:t==="info"?b.badgeTextInfo:b.badgeTextNeutral;return H(k,{style:[b.badge,a],children:H(F,{style:[b.badgeText,s],children:e})})}n(So,"NightBadge");var b=We.create({sectionLabel:{color:d.color.textSecondary,fontSize:d.font.label,fontWeight:"600",letterSpacing:rs,textTransform:"uppercase",marginBottom:8,marginLeft:d.labelInset},footnote:{color:d.color.textTertiary,fontSize:d.font.caption,fontWeight:"500",lineHeight:d.font.caption*1.4,marginTop:8},footnoteInset:{marginLeft:d.labelInset},footnoteSecondary:{color:d.color.textSecondary},footnoteWarning:{color:d.color.warning},footnoteDanger:{color:d.color.danger},footnoteCentered:{textAlign:"center",marginLeft:0},card:{backgroundColor:d.color.surface,borderRadius:d.radius.card,borderWidth:1,borderColor:d.color.border,overflow:"hidden"},cardGlass:{backgroundColor:d.color.glass,borderColor:d.color.glassBorder},cardPadded:{padding:d.cardPad,gap:10},separator:{height:We.hairlineWidth,backgroundColor:d.color.separator},switchTrack:{width:ho,height:go,borderRadius:go/2,borderWidth:1,borderColor:d.color.fillTertiary,backgroundColor:d.color.surfaceElevated,paddingHorizontal:po,justifyContent:"center",overflow:"hidden"},switchTrackOn:{backgroundColor:d.color.accentFill,borderColor:d.color.accentBorderStrong},switchDisabled:{opacity:.4},switchThumb:{width:_t,height:_t,borderRadius:_t/2,backgroundColor:d.color.knob},switchThumbOn:{backgroundColor:d.color.accent},chip:{flexDirection:"row",alignItems:"center",gap:6,paddingHorizontal:14,paddingVertical:9,borderRadius:d.radius.chip,borderWidth:1.5,backgroundColor:d.color.buttonSurface,borderColor:d.color.fillTertiary},chipSelected:{borderColor:d.color.accentBorderStrong},chipDisabled:{opacity:.4},chipText:{fontSize:d.font.body,fontWeight:"500",color:d.color.textSecondary},chipTextSelected:{color:d.color.accent},button:{flexDirection:"row",alignItems:"center",justifyContent:"center",gap:8},buttonMd:{height:34,paddingHorizontal:16,borderRadius:17},buttonLg:{height:50,paddingHorizontal:20,borderRadius:25},buttonPrimary:{backgroundColor:d.color.accent},buttonPlate:{backgroundColor:d.color.button},buttonGhost:{backgroundColor:"transparent"},buttonFullWidth:{alignSelf:"stretch"},buttonDisabled:{opacity:.4},buttonTextMd:{fontSize:15,fontWeight:"600"},buttonTextLg:{fontSize:17,fontWeight:"600"},segmentTrack:{flex:1,flexDirection:"row",backgroundColor:d.color.bg,borderRadius:d.radius.row,borderWidth:1,borderColor:d.color.border,padding:3},segment:{flex:1,paddingVertical:8,alignItems:"center",justifyContent:"center",borderRadius:d.radius.segment},segmentTrackGlass:{backgroundColor:d.color.glass,borderColor:d.color.glassBorder},segmentActive:{backgroundColor:d.color.surfaceElevated},segmentActiveGlass:{backgroundColor:d.color.glassElevated},segmentText:{fontSize:d.font.caption,fontWeight:"500",color:d.color.textSecondary},segmentTextActive:{fontWeight:"600",color:d.color.text},segmentUnderline:{position:"absolute",bottom:2,width:24,height:2.5,borderRadius:1.25,backgroundColor:d.color.accent,shadowColor:d.color.accent,shadowOffset:{width:0,height:0},shadowOpacity:.6,shadowRadius:6},segmentSm:{paddingVertical:5},segmentTextSm:{fontSize:12},segmentUnderlineSm:{bottom:1.5,width:20,height:2,borderRadius:1},badge:{paddingHorizontal:8,paddingVertical:4,borderRadius:d.radius.badge,alignSelf:"flex-start"},badgeText:{fontSize:d.font.micro,fontWeight:"600",letterSpacing:.5,textTransform:"uppercase"},badgeAccent:{backgroundColor:d.color.accentSoft},badgeTextAccent:{color:d.color.accent},badgeWarning:{backgroundColor:d.color.warningSoft},badgeTextWarning:{color:d.color.warning},badgeDanger:{backgroundColor:d.color.dangerSoft},badgeTextDanger:{color:d.color.danger},badgeInfo:{backgroundColor:d.color.infoSoft},badgeTextInfo:{color:d.color.info},badgeNeutral:{backgroundColor:d.color.fillSecondary},badgeTextNeutral:{color:d.color.textSecondary}});import{jsx as Re,jsxs as gb}from"react/jsx-runtime";function At(e){switch(Wt(String(e))){case"dev":return{label:"DEV",backgroundColor:w.warning};case"qa":return{label:"QA",backgroundColor:w.optional};case"staging":return{label:"STAGING",backgroundColor:w.success};case"prod":return{label:"PROD",backgroundColor:w.error};case"local":default:return{label:"LOCAL",backgroundColor:w.info}}}n(At,"getEnvironmentConfig");function vo({color:e}){return Re("svg",{width:12,height:12,viewBox:"0 0 24 24","aria-hidden":"true",children:Re("path",{d:"M6 9l6 6 6-6",fill:"none",stroke:e,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})})}n(vo,"ChevronDownGlyph");function Co({environment:e,interactive:t=false,onPress:a}){let s=At(e);return gb("button",{onClick:t?a:void 0,"aria-label":`Environment: ${s.label}`,style:{display:"flex",flexDirection:"row",alignItems:"center",padding:`6px ${t?4:8}px 6px 8px`,flexShrink:0,background:"none",border:"none",cursor:t?"pointer":"default"},children:[Re("div",{style:{width:8,height:8,borderRadius:4,backgroundColor:s.backgroundColor,marginRight:6,boxShadow:`0 0 4px ${s.backgroundColor}99`}}),Re("span",{style:{fontSize:11,fontWeight:600,color:w.primaryLight,letterSpacing:.5},children:s.label}),t&&Re("span",{style:{marginLeft:2,display:"flex"},children:Re(vo,{color:"#7A8599"})})]})}n(Co,"EnvironmentIndicator");import{jsx as we,jsxs as $a}from"react/jsx-runtime";var pb=140,fb=28,To=44,bb=8,yb=24;function Ot(e){switch(Wt(e)){case"local":return{label:"LOCAL",backgroundColor:w.info};case"dev":return{label:"DEV",backgroundColor:w.warning};case"qa":return{label:"QA",backgroundColor:w.optional};case"staging":return{label:"STAGING",backgroundColor:w.success};case"prod":return{label:"PROD",backgroundColor:w.error};default:return{label:"LOCAL",backgroundColor:w.info}}}n(Ot,"getEnvironmentConfig");function wo({environment:e,isSelected:t,onPress:a}){let s=Ot(e);return $a(ff,{onPress:a,style:({pressed:r})=>[ie.optionContainer,t&&ie.optionContainerSelected,r&&ie.optionContainerPressed],children:[$a(k,{style:ie.optionLeft,children:[we(k,{style:[ie.optionDot,{backgroundColor:s.backgroundColor},{shadowColor:s.backgroundColor,shadowOffset:{width:0,height:0},shadowOpacity:.6,shadowRadius:4,elevation:2}]}),we(F,{style:ie.optionLabel,children:s.label})]}),t&&we(ns,{size:14,color:w.success,strokeWidth:3})]})}n(wo,"EnvironmentOption");function xo({hasItems:e,currentEnvironment:t,availableEnvironments:a,onSelect:s,width:r=pb,collapsedContent:o}){let i=bb+a.length*To+yb+4,l=$a(k,{style:ie.collapsedEnvBadge,children:[we(k,{style:[ie.collapsedDot,{backgroundColor:Ot(t).backgroundColor}]}),we(F,{style:ie.collapsedLabel,children:Ot(t).label})]});return we(Qa,{hasItems:e,width:r,expandedHeight:i,peekHeight:fb,showCount:false,collapsedContent:o||l,collapsedLabel:`Switch environment from ${t}`,children:a.map(c=>we(wo,{environment:c,isSelected:c===t,onPress:()=>s(c)},c))})}n(xo,"EnvironmentSelector");var ie=We.create({collapsedEnvBadge:{flexDirection:"row",alignItems:"center",gap:6},collapsedDot:{width:8,height:8,borderRadius:4},collapsedLabel:{fontSize:11,fontWeight:"600",color:w.primaryLight,letterSpacing:.5},optionContainer:{flexDirection:"row",alignItems:"center",justifyContent:"space-between",paddingHorizontal:12,height:To,width:"100%"},optionContainerSelected:{backgroundColor:"rgba(128, 128, 128, 0.1)"},optionContainerPressed:{backgroundColor:"rgba(128, 128, 128, 0.2)"},optionLeft:{flexDirection:"row",alignItems:"center",flex:1},optionDot:{width:8,height:8,borderRadius:4,marginRight:10},optionLabel:{fontSize:12,fontWeight:"600",color:w.primaryLight,letterSpacing:.5}});import{useState as ko}from"react";import{jsx as Z,jsxs as Et}from"react/jsx-runtime";var Io=36;function _o({color:e,flipped:t}){return Z("svg",{width:10,height:10,viewBox:"0 0 24 24","aria-hidden":"true",style:{transform:t?"rotate(180deg)":"rotate(0deg)",transition:"transform 200ms ease"},children:Z("path",{d:"M18 15l-6-6-6 6",fill:"none",stroke:e,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})})}n(_o,"ChevronUpGlyph");function Ao(){return Z("svg",{width:12,height:12,viewBox:"0 0 24 24","aria-hidden":"true",children:Z("path",{d:"M20 6L9 17l-5-5",fill:"none",stroke:"#4AFF9F",strokeWidth:"3",strokeLinecap:"round",strokeLinejoin:"round"})})}n(Ao,"CheckGlyph");function Oo({currentEnvironment:e,availableEnvironments:t,onSelect:a}){let[s,r]=ko(false),[o,i]=ko(null),l=At(e),c=t.length*Io;return Et("div",{style:{position:"relative",zIndex:1e3,flexShrink:0},children:[Z("div",{style:{position:"absolute",bottom:"100%",left:0,right:0,height:s?c:0,opacity:s?1:0,overflow:"hidden",transition:"height 200ms ease, opacity 200ms ease",backgroundColor:"rgba(8,12,21,0.95)",border:"1px solid #00B8E666",borderBottomWidth:0,borderTopLeftRadius:6,borderTopRightRadius:6,boxShadow:"0 -4px 8px rgba(0,0,0,0.3)"},children:t.map(u=>{let y=At(u),S=String(u).toLowerCase()===String(e).toLowerCase();return Et("button",{onClick:()=>{r(false),a(u)},onPointerEnter:f=>f.pointerType==="mouse"&&i(String(u)),onPointerLeave:()=>i(null),style:{display:"flex",alignItems:"center",justifyContent:"space-between",width:"100%",height:Io,padding:"0 10px",background:S?"rgba(128,128,128,0.1)":o===String(u)?"rgba(128,128,128,0.2)":"none",border:"none",cursor:"pointer"},children:[Et("span",{style:{display:"flex",alignItems:"center"},children:[Z("span",{style:{width:6,height:6,borderRadius:3,backgroundColor:y.backgroundColor,marginRight:8}}),Z("span",{style:{fontSize:10,fontWeight:600,color:w.primaryLight,letterSpacing:.5},children:y.label})]}),S&&Z(Ao,{})]},String(u))})}),Et("button",{onClick:()=>r(u=>!u),"aria-expanded":s,"aria-label":`Environment: ${l.label}. Click to switch.`,style:{display:"flex",alignItems:"center",gap:6,padding:"6px 6px 6px 8px",borderRadius:6,borderTopLeftRadius:s?0:6,borderTopRightRadius:s?0:6,backgroundColor:s?"rgba(8,12,21,0.95)":"transparent",border:"none",cursor:"pointer"},children:[Z("span",{style:{width:8,height:8,borderRadius:4,backgroundColor:l.backgroundColor,boxShadow:`0 0 4px ${l.backgroundColor}99`}}),Z("span",{style:{fontSize:11,fontWeight:600,color:w.primaryLight,letterSpacing:.5},children:l.label}),Z(_o,{color:"#7A8599",flipped:s})]})]})}n(Oo,"EnvironmentSelectorInline");export{ku as ARROW_BOTTOM_OFFSET,Iu as ARROW_HEIGHT,Cd as ASSETS_ICON_COLOR,Sa as AccountSetup,es as AccountSetupButton,cl as ActionCopyButton,Jd as Activity,ph as ActivityIcon,Wl as AddFilterButton,Nl as AddFilterInput,eh as AlertCircle,Cg as AlertCircleIcon,nh as AlertOctagon,rh as AlertTriangle,mh as AlertTriangleIcon,rg as AskBuoyIcon,yd as AssetsIcon,Vc as BACKGROUND_PRESETS,cu as BACKGROUND_STORAGE_KEY,Lg as BENCHMARK_ICON_COLOR,lf as BUOY_SYNTHETIC_MARK,Ml as BackButton,wu as BackgroundSwitcher,Zl as Badge,zd as BarChart3,jd as BarChart3Icon,Sf as BaseEventStore,Ag as BenchmarkIcon,zp as BenchmarkLegacyIcon,lh as Bookmark,hh as Box,Th as BoxIcon,Wr as BubbleSettingsDetail,Fr as BubbleSettingsSection,bh as Bug,ag as BugIcon,Cu as BuoyNeedsPlanCard,mu as BuoySignInCard,oi as BuoyUpgradeSheet,vi as CELLS,Ti as CLIP_OFFSCREEN_CELLS,Zg as CLOCK_TOOL_ICON_COLOR,Zp as CONSOLE_ICON_COLOR,Ar as COPY_PAYLOAD_MAX_BYTES,Uh as CameraIcon,Pf as ChangeLog,dl as ChangeRow,ns as Check,vh as CheckCircle,Id as CheckCircle2,Ig as CheckCircle2Icon,Oh as CheckCircleIcon,kh as CheckIcon,Qd as CheckSquare,vd as CheckSquareIcon,_h as ChevronDown,Lh as ChevronDownIcon,Ph as ChevronLeft,Nh as ChevronLeftIcon,Bh as ChevronRight,Wh as ChevronRightIcon,zh as ChevronUp,Gh as ChevronUpIcon,zl as ChipStrip,nc as ClipboardHintBanner,Hh as Clock,td as ClockIcon,Kg as ClockToolIcon,Gd as Cloud,qd as CloudIcon,eu as CollapsibleSection,ql as CompactFilterChips,xu as CompactRow,Mi as CompareBar,Jp as ConsoleIcon,Yh as Copy,el as CopyButton,Jh as CopyIcon,ic as CountBadge,Za as CyberpunkSectionButton,qc as DEFAULT_BACKGROUND,$c as DEVTOOLS_CARD_CONSTANTS,ru as DataInspector,os as Database,ig as DatabaseIcon,hi as DaylightTunable,xc as DeepFieldTunable,Gc as DetailView,Yi as DetailViewToggle,Dc as DevToolsCard,Li as DiffModeTabs,Qh as DockBottom,sg as Download,Vg as DownloadIcon,Kc as DraggableHeader,hu as DynamicFilterView,Yp as ENV_ICON_COLOR,Ii as EVENT_LIST_PRESET,lg as Edit3,tg as Edit3Icon,fc as EmptyState,Rl as EntityFilterView,Up as EnvIcon,Og as EnvLaptopIcon,Co as EnvironmentIndicator,xo as EnvironmentSelector,Oo as EnvironmentSelectorInline,Di as EventHistoryViewer,Ic as EventListItem,Wi as EventPickerModal,di as EventStepperFooter,Ch as EventsIcon,Qa as ExpandablePopover,Ci as ExpandedInfoRow,Yl as ExportPreview,yg as Eye,ng as EyeIcon,is as EyeOff,dg as EyeOffIcon,Si as FeatureGate,dd as FileCode,fg as FileCodeIcon,Tg as FileJson,ip as FileJsonIcon,_g as FileText,vg as FileTextIcon,Rg as Film,Zd as FilmIcon,Ng as Filter,ai as FilterBadge,kg as FilterIcon,Gl as FilterList,Ll as FilterSection,jg as FlaskConical,Eg as FlaskConicalIcon,Yg as FloatWindow,$u as FloatingTool,Pu as FloatingToolDivider,Fu as FloatingToolHost,Ru as FloatingToolUserStatus,Ol as FooterButton,wl as FooterCaption,Il as FooterMessage,vl as FooterRow,ji as FreeAccountPrompt,Zu as GAME_UI_ALERT_STATES,Ku as GameUICollapsibleSection,Xu as GameUICompactStats,Qu as GameUIIssuesList,Ju as GameUIStatusHeader,Qg as GitBranch,Bg as GitBranchIcon,sp as Globe,hg as GlobeIcon,Xc as GripVerticalIcon,Od as Hand,yp as HandIcon,fd as HardDrive,Fg as HardDriveIcon,lp as Hash,Gg as HashIcon,Wc as HeaderSearchButton,uh as HelpCircle,Kh as HighlightIcon,Ep as HighlightUpdatesIcon,cg as HighlighterIcon,uc as HintsProvider,en as HistoryEntryRow,tn as HistoryList,Ko as HistoryProvider,gp as Home,Ad as HomeIcon,gd as IMAGES_ICON_COLOR,Ld as IMAGE_OVERLAY_ICON_COLOR,_d as IMPERSONATE_ICON_COLOR,xg as IconBackground,eg as IconCircle,qh as IconContainer,ug as IconLine,og as IconRect,mp as Image,sh as ImageIcon,Ed as ImageOverlayIcon,cd as ImagesIcon,xd as ImpersonateIcon,wp as Info,Jg as InfoIcon,Ui as InfoRow,sl as InlineCopyButton,Vd as JOTAI_ICON_COLOR,Hd as JotaiIcon,ib as JsModal,Ap as Key,tp as KeyIcon,Sp as LIFECYCLE_TOOL_ICON_COLOR,Op as LOCATION_TOOL_ICON_COLOR,$i as LOGIN_COMMAND,Ei as LOG_LIST_PRESET,$g as LaptopIcon,Lp as Layers,np as LayersIcon,pp as LifecycleToolIcon,vc as LinearFade,Dp as Link,hp as LinkIcon,El as ListItem,Hc as LiveSkyTunable,xp as LocationToolIcon,jp as Lock,Xg as LockIcon,ga as LogLevel,ga as LogLevelEnum,pa as LogType,pa as LogTypeEnum,Fi as MAX_PERIOD,Sd as Maximize2,dp as Maximize2Icon,pc as MethodBadge,Gp as Minus,bp as MinusIcon,Cl as ModalHeader,xl as ModalHintBanner,li as MoonlightTunable,Kp as Music,ih as MusicIcon,Wp as NETWORK_ICON_COLOR,rs as NIGHT_LABEL_TRACKING,Hg as NOTIFICATIONS_ICON_COLOR,Xp as Navigation,fp as NavigationIcon,Sg as NetworkGlobeIcon,Np as NetworkIcon,So as NightBadge,yo as NightButton,co as NightCard,bo as NightChip,lo as NightFootnote,uo as NightRows,io as NightSectionLabel,mo as NightSegmented,La as NightSeparator,fo as NightSwitch,Sc as NoDataEmptyState,wc as NoResultsEmptyState,_c as NoSearchResultsEmptyState,Dg as NotificationsIcon,su as OTTO_ANCHORS,iu as OTTO_ANCHOR_SIZE,Uc as OTTO_GRID,Su as OTTO_GROUPS,du as OTTO_NOTES,Yc as OTTO_PALETTE,ni as OTTO_REEL,Jl as OTTO_SCENES,ec as OTTO_SCENE_BY_ID,rc as OTTO_SCENE_CROP_H,$l as OTTO_SCENE_H,si as OTTO_SCENE_OTTO,Al as OTTO_SCENE_PALETTE,Pl as OTTO_SCENE_W,Zc as OTTO_STATES,fu as OTTO_STATE_NAMES,Tu as OTTO_USES,kl as Otto,Sl as OttoMotionView,ul as OttoPixels,lc as OttoSceneFrame,hc as OttoSceneStill,gl as OttoStill,cp as PERMISSIONS_ICON_COLOR,bt as PERSONAL_SETTING_KEYS,fr as PREVIEW_ITEM_RENDER_BYTE_LIMIT,ef as Palette,Cp as PaletteIcon,sf as Pause,Ip as PauseIcon,rp as PermissionsIcon,dh as Phone,fh as PhoneIcon,pl as Pill,ki as PillBadge,id as Pin,nd as Play,Pp as PlayIcon,ud as Plus,Mp as PlusIcon,pd as Power,Mg as PowerIcon,mi as PowerToggleButton,pg as PrimitiveGlobeIcon,ci as ProBadge,_i as ProFeatureBanner,gi as ProUpgradeModal,Cc as QrCodeView,gg as QueryIcon,bn as REMOTE_RELOAD_DELAY_MS,bc as RadialGlow,gc as RasterLayer,zg as ReactQueryIcon,sd as ReduxIcon,md as RefreshCw,Fp as RefreshCwIcon,ll as RelativeTime,Bp as RenderCountIcon,kp as RenderPulseIcon,Rd as Route,Mh as RouteDotIcon,up as RouteIcon,op as RouteMapIcon,Rh as RoutePathIcon,Ah as RoutePinIcon,Fh as RouteTwoPinsIcon,xh as RoutesIcon,_u as SPACING_GAP,mg as ScenariosIcon,Td as Search,lu as SearchBar,Hp as SearchIcon,_l as SectionHeader,Ug as SentryBugIcon,yh as SentryIcon,Nr as SentryLogger,kd as Server,Pg as ServerIcon,Ht as Settings,Vp as SettingsIcon,Pd as SettingsSolid,qs as SettingsSync,$d as Shield,qp as ShieldIcon,Sh as Smartphone,wh as SmartphoneIcon,Kd as Square,ah as SquareDashed,wd as SquareDashedIcon,bd as SquareIcon,vp as StackPulseIcon,an as StandaloneHistoryList,Ec as StatsCard,sc as StatusBadge,zc as StatusIndicator,Zh as StorageIcon,qg as StorageStackIcon,Ul as StorageTypeBadge,Ja as Subscribable,Fs as TEAM_SETTING_KEYS,Gi as TIER_LIMITS,od as TIME_MACHINE_ICON_COLOR,Ni as TRANSPARENT,mc as TabSelector,Bd as TestTube2,Qp as TestTube2Icon,Zi as TickProvider,jc as TimeDisplay,af as TimeMachineIcon,Ih as Timer,Eh as TimerIcon,Bl as ToggleRow,jt as ToolBackground,Tc as ToolButton,Pc as ToolEmptyState,yl as ToolFooter,gr as ToolScreenHeaderContext,hl as ToolbarClearButton,nl as ToolbarCopyButton,$h as Touchpad,Dh as TouchpadIcon,Wd as Trash,Dd as Trash2,tf as Trash2Icon,Tp as TrashIcon,Md as TriangleAlert,_p as TriangleAlertIcon,dc as TypeBadge,Ud as Unlock,ap as UnlockIcon,Pi as UpgradeModal,bi as UpgradePrompt,Yd as Upload,Wg as UploadIcon,Xd as User,Rp as UserIcon,jh as Users,Vh as UsersIcon,Fl as ValueTypeBadge,Oi as ViewToggleCards,ad as Volume,Xh as VolumeIcon,Ri as WATER_CELLS,Bi as WATER_FRAMES,xi as WATER_ROW0,Ai as WATER_ROWS,ft as WIRE_DETAIL_LIMIT_BYTES,Ps as WIRE_INLINE_LIMIT_BYTES,th as Wifi,wg as WifiBifIcon,ep as WifiCircuitIcon,bg as WifiIcon,ii as WindowControls,Ac as Wormhole,ch as X,oh as XCircle,ld as XCircleIcon,rd as XIcon,Fd as ZUSTAND_ICON_COLOR,gh as Zap,hd as ZapIcon,Nd as ZustandIcon,qu as absoluteFill,ha as add,Vr as appStorageEvent,He as approxJsonSize,xe as assertAccountAccess,gu as backgroundStore,Cn as browserRouter,Y as buoyColors,Yr as buoyFetch,Eu as calculateTargetPosition,Ou as calculateTooltipPosition,jf as callCapacitorNative,cr as canOpenBuoyTools,aa as capDetail,vr as classifyPreviewItem,Br as clearEntries,ac as copyToClipboard,cf as countBuoyListener,Kl as createAutoDetectedClipboard,br as createRestoreScope,zs as createSyncAdapter,Zs as createToolFactory,ys as createToolStore,Qi as cycleIndexes,Hr as definePersistedSetting,Qs as defineToolPreset,Ds as detailByIdAction,Se as devToolsStorageKeys,of as dialColors,Du as dismissFloatingTool,or as dispatchToolAction,Vu as displayValue,yr as emptyRestoreResult,wr as entityColor,ct as expandKeyedArrays,ss as expandableWindowControlsSupported,mr as failedRestore,ea as findKeyPath,Vi as flatColors,Gn as flattenObject,da as formatBytes,Ir as formatDuration,Pr as formatHttpStatus,_r as formatNumber,Vn as formatPath,Ji as formatRelativeTime,jn as formatValue,xr as formatValuePreview,w as gameUIColors,le as getAccountAccess,Ql as getAutoDetectedClipboard,Lu as getBubbleAnchorPosition,jr as getBubbleVisibilitySettings,Kn as getCachedOptionalModule,Gr as getCapacitorAppStorage,Nn as getConstructorName,mn as getDevServerOrigin,un as getDeviceInfo,$r as getEntries,Bu as getFloatingTools,Rr as getMethodColor,ou as getPreset,uf as getRealAppState,Pn as getRegisteredToolModule,Jn as getRenderCaptureProvider,nf as getSafeAreaInsets,_n as getSafeCurrentPathname,An as getSafeCurrentRoute,In as getSafeRouter,Au as getScreenCenterY,Rc as getSkyScrub,Zn as getStateSnapshotProvider,Qn as getStateSnapshotProviders,gf as getStorageBackendType,Te as getToolAdapters,dr as getToolAttention,hn as getToolModuleVersion,Hn as getTypeColor,as as getUseAccountAccess,kc as getUseIsPro,Oc as getUseLicense,Lc as getUseTier,zn as getValueSize,$n as getValueType,Hi as gridKey,la as guardToolAdapter,K as hasAccountAccess,Hf as hasCapacitorPlugin,lt as identityField,X as ignoredPatternsStore,qr as isBuoyAssetPath,Jr as isBuoyElement,Kr as isBuoyLog,ma as isBuoyRequest,Uf as isCapacitorNative,rt as isDevToolsStorageKey,Dn as isEmpty,On as isExpoRouterAvailable,Xa as isJsonSerializable,Ls as isOnDeviceMarker,pt as isOverWireBudget,Fn as isPlainObjectUtil,Bn as isPrimitive,Nc as isProNow,mt as isToolRegistryReady,us as isUrlIgnored,hf as isUsingPersistentStorage,Mn as isValidJson,Ce as listShapes,sr as listSnapshotToolIds,ar as listToolActions,tr as listToolIds,Yn as loadOptionalModule,dn as logDeviceInfo,st as macOSColors,Bs as memoByIdentity,ra as mergeChangeSources,$p as monoFont,il as motionUnits,Ms as newestFitting,d as night,ml as noWindowDragProps,Wt as normalizeEnvironment,ze as notifySubscriberCountChange,Rs as onDeviceMarker,Us as onSettingsApplied,lr as openBuoyTool,Nu as openFloatingTool,qi as ottoCycle,ui as ottoReel,yi as ottoRuns,Vl as ottoSceneBounds,jl as ottoSceneRuns,rl as ottoSheets,Jc as ottoWaterRows,Yu as parseDisplayValue,ht as parsePath,Lr as parseUrl,Wn as parseValue,Is as patchFromPath,j as persistentStorage,tu as presetAt,Qc as presetIndex,sa as readParams,ks as readPath,rr as readToolSnapshot,Ft as realNow,tl as rectsOf,rf as refreshGameUIColors,Es as refusalText,Sn as registerBrowserRouter,zu as registerPersistentFloatingTool,Xn as registerStateSnapshotProvider,er as registerToolAdapters,En as registerToolModules,ir as registerToolOpener,fn as reloadApp,pi as renderOttoFrame,Dl as renderOttoScene,rn as resetPersistedStateCache,Ki as resolveEffectiveTier,Bc as resolveListEmptyState,pn as resolveReloadStrategy,au as retryAccountAccess,Hu as safeStringify,Xl as scatter,yn as scheduleReloadApp,zf as sentryLogger,bu as setExpandableWindowControls,qn as setRenderCaptureProvider,Mc as setSkyScrub,ur as setToolAttention,kr as shallowDiffSummary,_e as shapeKind,ke as shapeOf,ws as shapeSummary,Cs as shapesWereTruncated,nu as signOutOfBuoy,Ns as sizeOrStub,Hl as sizeWarningLevel,Sr as skippedRestore,Js as startSettingsSync,Fe as subscribeAccountAccess,vn as subscribeBrowserNavigation,Mu as subscribeFloatingTools,df as subscribeRealAppState,ls as subscribeStorageWrites,gn as subscribeToStateSnapshotProviders,Ln as subscribeToSubscriberCountChanges,hr as subscribeToolAttention,Rn as subscriberCountNotifier,As as suggestedPatch,Gu as superJsonDeserialize,Uu as superJsonSerialize,Xs as syncSettingsNow,Gt as systemFont,it as teamSettingsStore,$s as toWire,fi as toolTheme,Er as truncateMiddle,Or as truncatePayload,Un as truncateText,ta as truncatedNote,gt as typedEditViolations,Tr as unionKeys,Ts as unshapedLists,Vt as urlMatchesIgnoredPattern,Qo as useAllHistoryEntries,on as useChangeLog,ri as useChipTap,cn as useDeviceInfo,ln as useEventStoreEvents,wi as useFeatureGate,Wu as useFilterManager,ed as useGameUIAlertState,yc as useHintsContext,ts as useHintsDisabled,Xo as useHistoryAdapter,Jo as useHistoryAdapters,qo as useHistoryContext,Zo as useHistoryEntryCounts,gs as useIgnoredPatterns,Xi as useLimit,oc as useLoop,Tl as useOttoAnchorMotion,bl as useOttoReel,sn as usePersistedState,cc as usePulse,ol as useRelativeTime,ju as useSafeAreaInsets,kn as useSafeGlobalSearchParams,wn as useSafePathname,Tn as useSafeRouter,xn as useSafeSegments,pu as useSignInState,Fc as useSkyScrub,nn as useSubscribedValue,fs as useTeamList,al as useTick,yu as useToolBackground,pr as useToolScreenHeader,nr as waitForToolRegistry,fl as windowDragProps,tc as withBgAlpha,Cr as wontApply};
|
package/lib/web/ui.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import{$ as a,$a as s,$b as o,Aa as t,Ab as e,Ac as b,Ba as r,Bb as i,Bc as l,Ca as n,Cb as T,Cc as c,Da as S,Db as E,Dc as O,Ea as p,Eb as d,Ec as g,Fa as u,Fb as C,Fc as m,Ga as _,Gb as R,Gc as A,Ha as B,Hb as F,Ia as y,Ib as I,Ja as P,Jb as w,Ka as L,Kb as D,La as N,Lb as h,Ma as G,Mb as f,Na as W,Oa as U,P as k,Pa as H,Q as M,Qa as v,R as V,Ra as x,S as K,Sa as j,Sb as Y,T as q,Ta as z,Tb as X,U as Z,Ua as $,Ub as J,V as Q,Va as aa,Vb as sa,W as oa,Wa as ta,Wb as ea,X as ba,Xa as ra,Xb as ia,Y as la,Ya as na,Yb as Ta,Z as ca,Za as Sa,Zb as Ea,_ as Oa,_a as pa,_b as da,a as ga,aa as ua,ab as Ca,ac as ma,b as _a,ba as Ra,bb as Aa,bc as Ba,c as Fa,ca as ya,cb as Ia,cc as Pa,da as wa,db as La,dc as Da,ea as Na,eb as ha,ec as Ga,fa,fb as Wa,fc as Ua,g as ka,ga as Ha,gb as Ma,gc as va,ha as Va,hb as xa,hc as Ka,ia as ja,ib as Ya,ic as qa,ja as za,jb as Xa,jc as Za,ka as $a,kb as Ja,kc as Qa,la as as,lb as ss,lc as os,ma as ts,mb as es,mc as bs,na as rs,nb as is,nc as ls,oa as ns,ob as Ts,oc as cs,pa as Ss,pb as Es,pc as Os,qa as ps,qb as ds,qc as gs,ra as us,rb as Cs,rc as ms,sa as _s,sb as Rs,sc as As,ta as Bs,tb as Fs,tc as ys,ua as Is,ub as Ps,uc as ws,va as Ls,vb as Ds,vc as Ns,wa as hs,wb as Gs,wc as fs,xa as Ws,xb as Us,xc as ks,ya as Hs,yc as Ms,za as vs,zb as Vs,zc as xs}from"./chunks/chunk-
|
|
1
|
+
"use client";import{$ as a,$a as s,$b as o,Aa as t,Ab as e,Ac as b,Ba as r,Bb as i,Bc as l,Ca as n,Cb as T,Cc as c,Da as S,Db as E,Dc as O,Ea as p,Eb as d,Ec as g,Fa as u,Fb as C,Fc as m,Ga as _,Gb as R,Gc as A,Ha as B,Hb as F,Ia as y,Ib as I,Ja as P,Jb as w,Ka as L,Kb as D,La as N,Lb as h,Ma as G,Mb as f,Na as W,Oa as U,P as k,Pa as H,Q as M,Qa as v,R as V,Ra as x,S as K,Sa as j,Sb as Y,T as q,Ta as z,Tb as X,U as Z,Ua as $,Ub as J,V as Q,Va as aa,Vb as sa,W as oa,Wa as ta,Wb as ea,X as ba,Xa as ra,Xb as ia,Y as la,Ya as na,Yb as Ta,Z as ca,Za as Sa,Zb as Ea,_ as Oa,_a as pa,_b as da,a as ga,aa as ua,ab as Ca,ac as ma,b as _a,ba as Ra,bb as Aa,bc as Ba,c as Fa,ca as ya,cb as Ia,cc as Pa,da as wa,db as La,dc as Da,ea as Na,eb as ha,ec as Ga,fa,fb as Wa,fc as Ua,g as ka,ga as Ha,gb as Ma,gc as va,ha as Va,hb as xa,hc as Ka,ia as ja,ib as Ya,ic as qa,ja as za,jb as Xa,jc as Za,ka as $a,kb as Ja,kc as Qa,la as as,lb as ss,lc as os,ma as ts,mb as es,mc as bs,na as rs,nb as is,nc as ls,oa as ns,ob as Ts,oc as cs,pa as Ss,pb as Es,pc as Os,qa as ps,qb as ds,qc as gs,ra as us,rb as Cs,rc as ms,sa as _s,sb as Rs,sc as As,ta as Bs,tb as Fs,tc as ys,ua as Is,ub as Ps,uc as ws,va as Ls,vb as Ds,vc as Ns,wa as hs,wb as Gs,wc as fs,xa as Ws,xb as Us,xc as ks,ya as Hs,yc as Ms,za as vs,zb as Vs,zc as xs}from"./chunks/chunk-ZTIJC3VV.mjs";import{a as Ks}from"./chunks/chunk-HIAN3HBD.mjs";import{a as js,b as Ys,c as qs,d as zs,e as Xs,f as Zs,g as $s,h as Js,i as Qs,j as ao,k as so,l as oo,m as to,n as eo,o as bo,p as ro}from"./chunks/chunk-4YLP5MMN.mjs";import"./chunks/chunk-GF5C5DVX.mjs";import"./chunks/chunk-HPZXETRA.mjs";import{f as io,h as lo,i as no,j as To,k as co,l as So}from"./chunks/chunk-4HIK66DZ.mjs";import{sd as Eo}from"./chunks/chunk-CJTGUGMQ.mjs";import{a as Oo,d as po,f as go,g as uo}from"./chunks/chunk-AHVO74UQ.mjs";import"./chunks/chunk-P32XO2YS.mjs";import"./chunks/chunk-2STKTXD3.mjs";import"./chunks/chunk-5G6RSRP4.mjs";import{a as Co}from"./chunks/chunk-SBYYOE2T.mjs";import"./chunks/chunk-T6T3FEMU.mjs";export{js as ARROW_BOTTOM_OFFSET,Ys as ARROW_HEIGHT,K as ActionCopyButton,Ra as AddFilterButton,ua as AddFilterInput,gs as BACKGROUND_PRESETS,Ns as BACKGROUND_STORAGE_KEY,ga as BackButton,xs as BackgroundSwitcher,Na as Badge,p as CELLS,g as CLIP_OFFSCREEN_CELLS,Y as ChangeRow,ma as ChipStrip,ka as ClipboardHintBanner,Fs as CollapsibleSection,wa as CompactFilterChips,Ks as CompactRow,I as CompareBar,k as CopyButton,Ha as CountBadge,O as CyberpunkSectionButton,ms as DEFAULT_BACKGROUND,rs as DEVTOOLS_CARD_CONSTANTS,Ps as DataInspector,l as DaylightTunable,Qa as DeepFieldTunable,ds as DetailView,f as DetailViewToggle,ns as DevToolsCard,F as DiffModeTabs,Cs as DraggableHeader,Gs as DynamicFilterView,m as EVENT_LIST_PRESET,Ya as EmptyState,Ea as EntityFilterView,w as EventHistoryViewer,as as EventListItem,D as EventPickerModal,i as EventStepperFooter,T as ExpandablePopover,d as ExpandedInfoRow,Pa as ExportPreview,a as FilterBadge,ya as FilterList,Oa as FilterSection,ao as FloatingTool,$s as FloatingToolDivider,ro as FloatingToolHost,Js as FloatingToolUserStatus,Ta as FooterButton,ea as FooterCaption,ia as FooterMessage,sa as FooterRow,co as GAME_UI_ALERT_STATES,io as GameUICollapsibleSection,no as GameUICompactStats,To as GameUIIssuesList,lo as GameUIStatusHeader,Rs as GripVerticalIcon,Ss as HeaderSearchButton,h as InfoRow,M as InlineCopyButton,A as LOG_LIST_PRESET,Za as LinearFade,ca as ListItem,Os as LiveSkyTunable,L as MAX_PERIOD,ja as MethodBadge,oa as ModalHeader,ba as ModalHintBanner,b as MoonlightTunable,Xa as NoDataEmptyState,Ja as NoResultsEmptyState,ss as NoSearchResultsEmptyState,Is as OTTO_ANCHORS,Ls as OTTO_ANCHOR_SIZE,ps as OTTO_GRID,Hs as OTTO_GROUPS,hs as OTTO_NOTES,us as OTTO_PALETTE,t as OTTO_REEL,La as OTTO_SCENES,ha as OTTO_SCENE_BY_ID,Wa as OTTO_SCENE_CROP_H,pa as OTTO_SCENE_H,s as OTTO_SCENE_OTTO,na as OTTO_SCENE_PALETTE,Sa as OTTO_SCENE_W,Bs as OTTO_STATES,Ws as OTTO_STATE_NAMES,vs as OTTO_USES,ra as Otto,aa as OttoMotionView,j as OttoPixels,Ma as OttoSceneFrame,xa as OttoSceneStill,z as OttoStill,X as Pill,C as PillBadge,E as PowerToggleButton,qa as RadialGlow,Ka as RasterLayer,qs as SPACING_GAP,Ds as SearchBar,la as SectionHeader,ts as StatsCard,fa as StatusBadge,Ts as StatusIndicator,Fa as StorageTypeBadge,P as TRANSPARENT,za as TabSelector,Es as TimeDisplay,da as ToggleRow,Ms as ToolBackground,$a as ToolButton,es as ToolEmptyState,J as ToolFooter,q as ToolbarClearButton,V as ToolbarCopyButton,Va as TypeBadge,_a as ValueTypeBadge,R as ViewToggleCards,B as WATER_CELLS,y as WATER_FRAMES,u as WATER_ROW0,_ as WATER_ROWS,e as WindowControls,os as Wormhole,fs as backgroundStore,go as buoyColors,Zs as calculateTargetPosition,Xs as calculateTooltipPosition,U as cycleIndexes,uo as dialColors,eo as dismissFloatingTool,Vs as expandableWindowControlsSupported,G as flatColors,po as gameUIColors,Qs as getBubbleAnchorPosition,so as getFloatingTools,ws as getPreset,zs as getScreenCenterY,bs as getSkyScrub,N as gridKey,Oo as macOSColors,Eo as monoFont,x as motionUnits,Q as noWindowDragProps,to as openFloatingTool,W as ottoCycle,r as ottoReel,S as ottoRuns,Ia as ottoSceneBounds,Aa as ottoSceneRuns,v as ottoSheets,_s as ottoWaterRows,ys as presetAt,As as presetIndex,H as rectsOf,bo as registerPersistentFloatingTool,n as renderOttoFrame,Ca as renderOttoScene,is as resolveListEmptyState,Da as scatter,Us as setExpandableWindowControls,ls as setSkyScrub,Ba as sizeWarningLevel,oo as subscribeFloatingTools,Co as systemFont,c as toolTheme,o as useChipTap,So as useGameUIAlertState,Ua as useLoop,ta as useOttoAnchorMotion,$ as useOttoReel,va as usePulse,cs as useSkyScrub,ks as useToolBackground,Z as windowDragProps,Ga as withBgAlpha};
|