@buoy-gg/shared-ui 7.0.67 → 7.0.69
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/clipboard/clipboard-impl.web.js +1 -1
- package/lib/commonjs/ui/components/ToolFooter.js +1 -1
- package/lib/commonjs/utils/realAppState.js +1 -1
- package/lib/module/clipboard/clipboard-impl.web.js +1 -1
- package/lib/module/ui/components/ToolFooter.js +1 -1
- package/lib/module/utils/realAppState.js +1 -1
- package/lib/typescript/commonjs/hooks/safe-area-impl.d.ts +1 -1
- package/lib/typescript/commonjs/ui/components/ToolFooter.d.ts +2 -1
- package/lib/typescript/module/hooks/safe-area-impl.d.ts +1 -1
- package/lib/typescript/module/ui/components/ToolFooter.d.ts +2 -1
- package/lib/web/chunks/{chunk-HPZXETRA.mjs → chunk-7CBB7NEY.mjs} +1 -1
- package/lib/web/chunks/{chunk-GER55P4B.mjs → chunk-G27JNYZ3.mjs} +1 -1
- package/lib/web/chunks/chunk-RMLVR5LI.mjs +1 -0
- package/lib/web/chunks/chunk-UQRRKDKX.mjs +6 -0
- package/lib/web/dataViewer.mjs +1 -1
- package/lib/web/hooks.mjs +1 -1
- package/lib/web/index.mjs +1 -1
- package/lib/web/ui.mjs +1 -1
- package/lib/web/utils.mjs +1 -1
- package/package.json +5 -5
- package/lib/web/chunks/chunk-P32XO2YS.mjs +0 -1
- package/lib/web/chunks/chunk-ZTIJC3VV.mjs +0 -6
package/lib/web/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
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:`
|
|
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-G27JNYZ3.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-UQRRKDKX.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-7CBB7NEY.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-RMLVR5LI.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; }
|
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-UQRRKDKX.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-7CBB7NEY.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-RMLVR5LI.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};
|
package/lib/web/utils.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import{$ as a,A as s,B as e,C as r,D as t,E as o,F as i,G as l,H as u,I as n,J as g,K as p,L as S,M as d,N as b,O as m,P as c,Q as f,R,S as M,T as v,U as C,V as P,W as T,X as h,Y as O,Z as D,_ as y,a as E,aa as A,b as B,c as w,d as V,e as N,f as _,g as z,h as J,i as L,j as x,k as H,m as I,n as U,o as Y,p as j,q as k,r as F,s as G,t as K,u as q,v as Q,w as W,x as X,y as Z,z as $}from"./chunks/chunk-GMM6TGFO.mjs";import{a as aa,b as sa}from"./chunks/chunk-VAR5UK6J.mjs";import{a as ea,b as ra,c as ta,d as oa,e as ia,g as la}from"./chunks/chunk-4HIK66DZ.mjs";import"./chunks/chunk-CJTGUGMQ.mjs";import"./chunks/chunk-AHVO74UQ.mjs";import{a as ua,b as na,c as ga,d as pa,e as Sa}from"./chunks/chunk-
|
|
1
|
+
"use client";import{$ as a,A as s,B as e,C as r,D as t,E as o,F as i,G as l,H as u,I as n,J as g,K as p,L as S,M as d,N as b,O as m,P as c,Q as f,R,S as M,T as v,U as C,V as P,W as T,X as h,Y as O,Z as D,_ as y,a as E,aa as A,b as B,c as w,d as V,e as N,f as _,g as z,h as J,i as L,j as x,k as H,m as I,n as U,o as Y,p as j,q as k,r as F,s as G,t as K,u as q,v as Q,w as W,x as X,y as Z,z as $}from"./chunks/chunk-GMM6TGFO.mjs";import{a as aa,b as sa}from"./chunks/chunk-VAR5UK6J.mjs";import{a as ea,b as ra,c as ta,d as oa,e as ia,g as la}from"./chunks/chunk-4HIK66DZ.mjs";import"./chunks/chunk-CJTGUGMQ.mjs";import"./chunks/chunk-AHVO74UQ.mjs";import{a as ua,b as na,c as ga,d as pa,e as Sa}from"./chunks/chunk-RMLVR5LI.mjs";import{d as da,e as ba,f as ma}from"./chunks/chunk-2STKTXD3.mjs";import"./chunks/chunk-5G6RSRP4.mjs";import"./chunks/chunk-SBYYOE2T.mjs";import"./chunks/chunk-T6T3FEMU.mjs";export{na as BUOY_SYNTHETIC_MARK,t as REMOTE_RELOAD_DELAY_MS,E as Subscribable,la as absoluteFill,p as browserRouter,ga as countBuoyListener,oa as displayValue,F as flattenObject,G as formatPath,Y as formatValue,u as getBrowserHref,n as getBrowserRouteURL,aa as getBrowserStorage,q as getCachedOptionalModule,L as getConstructorName,T as getDOMControlProps,P as getDOMFiber,C as getDOMNodeHandle,h as getDOMPublicInstance,i as getDevServerOrigin,pa as getRealAppState,y as getRegisteredToolModule,W as getRenderCaptureProvider,ua as getSafeAreaInsets,f as getSafeCurrentPathname,R as getSafeCurrentRoute,c as getSafeRouter,$ as getStateSnapshotProvider,Z as getStateSnapshotProviders,ma as getStorageBackendType,a as getToolModuleVersion,j as getTypeColor,H as getValueSize,N as getValueType,v as isDOMElement,x as isEmpty,M as isExpoRouterAvailable,z as isJsonSerializable,_ as isPrimitive,ba as isUsingPersistentStorage,J as isValidJson,K as loadOptionalModule,A as loadToolModule,V as notifySubscriberCountChange,ia as parseDisplayValue,U as parseValue,da as persistentStorage,I as realNow,l as registerBrowserRouter,X as registerStateSnapshotProvider,D as registerToolModules,r as reloadApp,O as resolveDOMEventEmitter,e as resolveReloadStrategy,ea as safeStringify,o as scheduleReloadApp,Q as setRenderCaptureProvider,g as subscribeBrowserNavigation,Sa as subscribeRealAppState,sa as subscribeToBrowserStorage,s as subscribeToStateSnapshotProviders,w as subscribeToSubscriberCountChanges,B as subscriberCountNotifier,ta as superJsonDeserialize,ra as superJsonSerialize,k as truncateText,m as useSafeGlobalSearchParams,d as useSafePathname,S as useSafeRouter,b as useSafeSegments};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@buoy-gg/shared-ui",
|
|
3
|
-
"version": "7.0.
|
|
3
|
+
"version": "7.0.69",
|
|
4
4
|
"description": "Shared UI components, hooks, and utilities",
|
|
5
5
|
"main": "lib/commonjs/index.js",
|
|
6
6
|
"module": "lib/module/index.js",
|
|
@@ -225,11 +225,11 @@
|
|
|
225
225
|
],
|
|
226
226
|
"sideEffects": false,
|
|
227
227
|
"dependencies": {
|
|
228
|
-
"@buoy-gg/floating-tools-core": "^7.0.
|
|
229
|
-
"@buoy-gg/floating-tools-react": "^7.0.
|
|
228
|
+
"@buoy-gg/floating-tools-core": "^7.0.69",
|
|
229
|
+
"@buoy-gg/floating-tools-react": "^7.0.69"
|
|
230
230
|
},
|
|
231
231
|
"peerDependencies": {
|
|
232
|
-
"@buoy-gg/license": "7.0.
|
|
232
|
+
"@buoy-gg/license": "7.0.69",
|
|
233
233
|
"react": "*"
|
|
234
234
|
},
|
|
235
235
|
"peerDependenciesMeta": {
|
|
@@ -262,7 +262,7 @@
|
|
|
262
262
|
"expo-clipboard": "~7.1.5",
|
|
263
263
|
"react-native-safe-area-context": "^5.6.2",
|
|
264
264
|
"typescript": "~5.8.3",
|
|
265
|
-
"@buoy-gg/license": "^7.0.
|
|
265
|
+
"@buoy-gg/license": "^7.0.69"
|
|
266
266
|
},
|
|
267
267
|
"react-native-builder-bob": {
|
|
268
268
|
"source": "src",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use client";import{H as m,aa as _,u as y}from"./chunk-5G6RSRP4.mjs";import{a}from"./chunk-T6T3FEMU.mjs";function v(){let e={top:0,bottom:0,left:0,right:0,hasNotch:false};if(typeof document>"u"||!document.body)return e;let t=document.createElement("div");t.style.cssText="position:fixed;visibility:hidden;pointer-events:none;padding-top:env(safe-area-inset-top);padding-bottom:env(safe-area-inset-bottom);padding-left:env(safe-area-inset-left);padding-right:env(safe-area-inset-right)",document.body.appendChild(t);try{let n=getComputedStyle(t),r=parseFloat(n.paddingTop)||0,g=parseFloat(n.paddingBottom)||0,b=parseFloat(n.paddingLeft)||0,h=parseFloat(n.paddingRight)||0;return{top:r,bottom:g,left:b,right:h,hasNotch:r>0||g>0||b>0||h>0}}finally{t.remove()}}a(v,"getSafeAreaInsets");var u="__buoySynthetic";function l(e,t){let n=globalThis,r=n.__buoyOwnDeviceListeners??(n.__buoyOwnDeviceListeners={});r[e]=Math.max(0,(r[e]??0)+t)}a(l,"countBuoyListener");var d=new Set,i="unknown",S=false;function c(){let e=globalThis.document;return e&&typeof e.addEventListener=="function"?e:null}a(c,"webDocument");function o(){try{let e=c(),t=globalThis.Document?.prototype,n=t&&Object.getOwnPropertyDescriptor(t,"visibilityState")?.get;return!e||!n?null:n.call(e)==="visible"?"active":"background"}catch{return null}}a(o,"realWebState");function p(){if(m.OS==="web"){let e=o();if(e)return e}try{return y?.currentState??"unknown"}catch{return"unknown"}}a(p,"readInitial");function s(e){if(e!==i){i=e;for(let t of Array.from(d))try{t(e)}catch{}}}a(s,"set");function f(){if(!S){S=true,i=p();try{if(m.OS==="web"){let e=c();if(e&&o()){e.addEventListener("visibilitychange",t=>{if(t?.[u])return;let n=o();n&&s(n)});return}y.addEventListener("change",t=>s(t));return}l("appStateDidChange",1),_.addListener("appStateDidChange",e=>{!e||e[u]||e.app_state&&s(e.app_state)})}catch{}}}a(f,"start");function w(){return f(),i==="unknown"&&(i=p()),i}a(w,"getRealAppState");function L(e){return f(),d.add(e),{remove:a(()=>d.delete(e),"remove")}}a(L,"subscribeRealAppState");export{v as a,u as b,l as c,w as d,L as e};
|