Make pagination requests abortable

This commit is contained in:
Jack Kingsman committed 2026-03-16 15:18:38 -07:00
1 parent 4277e0c924
commit 58b34a6a2f
34 files changed
+476 -322

No files matched your search

@@ -1,4 +1,4 @@
import{r as be,j as vr}from"./index-BUPp0i0i.js";function wr(){return wr=Object.assign?Object.assign.bind():function(n){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var i in t)({}).hasOwnProperty.call(t,i)&&(n[i]=t[i])}return n},wr.apply(null,arguments)}function Tu(n,e){if(n==null)return{};var t={};for(var i in n)if({}.hasOwnProperty.call(n,i)){if(e.indexOf(i)!==-1)continue;t[i]=n[i]}return t}let Tr=[],ph=[];(()=>{let n="lc,34,7n,7,7b,19,,,,2,,2,,,20,b,1c,l,g,,2t,7,2,6,2,2,,4,z,,u,r,2j,b,1m,9,9,,o,4,,9,,3,,5,17,3,3b,f,,w,1j,,,,4,8,4,,3,7,a,2,t,,1m,,,,2,4,8,,9,,a,2,q,,2,2,1l,,4,2,4,2,2,3,3,,u,2,3,,b,2,1l,,4,5,,2,4,,k,2,m,6,,,1m,,,2,,4,8,,7,3,a,2,u,,1n,,,,c,,9,,14,,3,,1l,3,5,3,,4,7,2,b,2,t,,1m,,2,,2,,3,,5,2,7,2,b,2,s,2,1l,2,,,2,4,8,,9,,a,2,t,,20,,4,,2,3,,,8,,29,,2,7,c,8,2q,,2,9,b,6,22,2,r,,,,,,1j,e,,5,,2,5,b,,10,9,,2u,4,,6,,2,2,2,p,2,4,3,g,4,d,,2,2,6,,f,,jj,3,qa,3,t,3,t,2,u,2,1s,2,,7,8,,2,b,9,,19,3,3b,2,y,,3a,3,4,2,9,,6,3,63,2,2,,1m,,,7,,,,,2,8,6,a,2,,1c,h,1r,4,1c,7,,,5,,14,9,c,2,w,4,2,2,,3,1k,,,2,3,,,3,1m,8,2,2,48,3,,d,,7,4,,6,,3,2,5i,1m,,5,ek,,5f,x,2da,3,3x,,2o,w,fe,6,2x,2,n9w,4,,a,w,2,28,2,7k,,3,,4,,p,2,5,,47,2,q,i,d,,12,8,p,b,1a,3,1c,,2,4,2,2,13,,1v,6,2,2,2,2,c,,8,,1b,,1f,,,3,2,2,5,2,,,16,2,8,,6m,,2,,4,,fn4,,kh,g,g,g,a6,2,gt,,6a,,45,5,1ae,3,,2,5,4,14,3,4,,4l,2,fx,4,ar,2,49,b,4w,,1i,f,1k,3,1d,4,2,2,1x,3,10,5,,8,1q,,c,2,1g,9,a,4,2,,2n,3,2,,,2,6,,4g,,3,8,l,2,1l,2,,,,,m,,e,7,3,5,5f,8,2,3,,,n,,29,,2,6,,,2,,,2,,2,6j,,2,4,6,2,,2,r,2,2d,8,2,,,2,2y,,,,2,6,,,2t,3,2,4,,5,77,9,,2,6t,,a,2,,,4,,40,4,2,2,4,,w,a,14,6,2,4,8,,9,6,2,3,1a,d,,2,ba,7,,6,,,2a,m,2,7,,2,,2,3e,6,3,,,2,,7,,,20,2,3,,,,9n,2,f0b,5,1n,7,t4,,1r,4,29,,f5k,2,43q,,,3,4,5,8,8,2,7,u,4,44,3,1iz,1j,4,1e,8,,e,,m,5,,f,11s,7,,h,2,7,,2,,5,79,7,c5,4,15s,7,31,7,240,5,gx7k,2o,3k,6o".split(",").map(e=>e?parseInt(e,36):1);for(let e=0,t=0;e<n.length;e++)(e%2?ph:Tr).push(t=t+n[e])})();function Cu(n){if(n<768)return!1;for(let e=0,t=Tr.length;;){let i=e+t>>1;if(n<Tr[i])t=i;else if(n>=ph[i])e=i+1;else return!0;if(e==t)return!1}}function cl(n){return n>=127462&&n<=127487}const fl=8205;function Qu(n,e,t=!0,i=!0){return(t?mh:Au)(n,e,i)}function mh(n,e,t){if(e==n.length)return e;e&&gh(n.charCodeAt(e))&&Oh(n.charCodeAt(e-1))&&e--;let i=Ls(n,e);for(e+=ul(i);e<n.length;){let s=Ls(n,e);if(i==fl||s==fl||t&&Cu(s))e+=ul(s),i=s;else if(cl(s)){let r=0,o=e-2;for(;o>=0&&cl(Ls(n,o));)r++,o-=2;if(r%2==0)break;e+=2}else break}return e}function Au(n,e,t){for(;e>0;){let i=mh(n,e-2,t);if(i<e)return i;e--}return 0}function Ls(n,e){let t=n.charCodeAt(e);if(!Oh(t)||e+1==n.length)return t;let i=n.charCodeAt(e+1);return gh(i)?(t-55296<<10)+(i-56320)+65536:t}function gh(n){return n>=56320&&n<57344}function Oh(n){return n>=55296&&n<56320}function ul(n){return n<65536?1:2}class V{lineAt(e){if(e<0||e>this.length)throw new RangeError(`Invalid position ${e} in document of length ${this.length}`);return this.lineInner(e,!1,1,0)}line(e){if(e<1||e>this.lines)throw new RangeError(`Invalid line number ${e} in ${this.lines}-line document`);return this.lineInner(e,!0,1,0)}replace(e,t,i){[e,t]=ai(this,e,t);let s=[];return this.decompose(0,e,s,2),i.length&&i.decompose(0,i.length,s,3),this.decompose(t,this.length,s,1),Ye.from(s,this.length-(t-e)+i.length)}append(e){return this.replace(this.length,this.length,e)}slice(e,t=this.length){[e,t]=ai(this,e,t);let i=[];return this.decompose(e,t,i,0),Ye.from(i,t-e)}eq(e){if(e==this)return!0;if(e.length!=this.length||e.lines!=this.lines)return!1;let t=this.scanIdentical(e,1),i=this.length-this.scanIdentical(e,-1),s=new Ci(this),r=new Ci(e);for(let o=t,l=t;;){if(s.next(o),r.next(o),o=0,s.lineBreak!=r.lineBreak||s.done!=r.done||s.value!=r.value)return!1;if(l+=s.value.length,s.done||l>=i)return!0}}iter(e=1){return new Ci(this,e)}iterRange(e,t=this.length){return new yh(this,e,t)}iterLines(e,t){let i;if(e==null)i=this.iter();else{t==null&&(t=this.lines+1);let s=this.line(e).from;i=this.iterRange(s,Math.max(s,t==this.lines+1?this.length:t<=1?0:this.line(t-1).to))}return new bh(i)}toString(){return this.sliceString(0)}toJSON(){let e=[];return this.flatten(e),e}constructor(){}static of(e){if(e.length==0)throw new RangeError("A document must have at least one line");return e.length==1&&!e[0]?V.empty:e.length<=32?new J(e):Ye.from(J.split(e,[]))}}class J extends V{constructor(e,t=Pu(e)){super(),this.text=e,this.length=t}get lines(){return this.text.length}get children(){return null}lineInner(e,t,i,s){for(let r=0;;r++){let o=this.text[r],l=s+o.length;if((t?i:l)>=e)return new Mu(s,l,i,o);s=l+1,i++}}decompose(e,t,i,s){let r=e<=0&&t>=this.length?this:new J(dl(this.text,e,t),Math.min(t,this.length)-Math.max(0,e));if(s&1){let o=i.pop(),l=$n(r.text,o.text.slice(),0,r.length);if(l.length<=32)i.push(new J(l,o.length+r.length));else{let a=l.length>>1;i.push(new J(l.slice(0,a)),new J(l.slice(a)))}}else i.push(r)}replace(e,t,i){if(!(i instanceof J))return super.replace(e,t,i);[e,t]=ai(this,e,t);let s=$n(this.text,$n(i.text,dl(this.text,0,e)),t),r=this.length+i.length-(t-e);return sLine truncated
import{r as be,j as vr}from"./index-C_33NHxn.js";function wr(){return wr=Object.assign?Object.assign.bind():function(n){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var i in t)({}).hasOwnProperty.call(t,i)&&(n[i]=t[i])}return n},wr.apply(null,arguments)}function Tu(n,e){if(n==null)return{};var t={};for(var i in n)if({}.hasOwnProperty.call(n,i)){if(e.indexOf(i)!==-1)continue;t[i]=n[i]}return t}let Tr=[],ph=[];(()=>{let n="lc,34,7n,7,7b,19,,,,2,,2,,,20,b,1c,l,g,,2t,7,2,6,2,2,,4,z,,u,r,2j,b,1m,9,9,,o,4,,9,,3,,5,17,3,3b,f,,w,1j,,,,4,8,4,,3,7,a,2,t,,1m,,,,2,4,8,,9,,a,2,q,,2,2,1l,,4,2,4,2,2,3,3,,u,2,3,,b,2,1l,,4,5,,2,4,,k,2,m,6,,,1m,,,2,,4,8,,7,3,a,2,u,,1n,,,,c,,9,,14,,3,,1l,3,5,3,,4,7,2,b,2,t,,1m,,2,,2,,3,,5,2,7,2,b,2,s,2,1l,2,,,2,4,8,,9,,a,2,t,,20,,4,,2,3,,,8,,29,,2,7,c,8,2q,,2,9,b,6,22,2,r,,,,,,1j,e,,5,,2,5,b,,10,9,,2u,4,,6,,2,2,2,p,2,4,3,g,4,d,,2,2,6,,f,,jj,3,qa,3,t,3,t,2,u,2,1s,2,,7,8,,2,b,9,,19,3,3b,2,y,,3a,3,4,2,9,,6,3,63,2,2,,1m,,,7,,,,,2,8,6,a,2,,1c,h,1r,4,1c,7,,,5,,14,9,c,2,w,4,2,2,,3,1k,,,2,3,,,3,1m,8,2,2,48,3,,d,,7,4,,6,,3,2,5i,1m,,5,ek,,5f,x,2da,3,3x,,2o,w,fe,6,2x,2,n9w,4,,a,w,2,28,2,7k,,3,,4,,p,2,5,,47,2,q,i,d,,12,8,p,b,1a,3,1c,,2,4,2,2,13,,1v,6,2,2,2,2,c,,8,,1b,,1f,,,3,2,2,5,2,,,16,2,8,,6m,,2,,4,,fn4,,kh,g,g,g,a6,2,gt,,6a,,45,5,1ae,3,,2,5,4,14,3,4,,4l,2,fx,4,ar,2,49,b,4w,,1i,f,1k,3,1d,4,2,2,1x,3,10,5,,8,1q,,c,2,1g,9,a,4,2,,2n,3,2,,,2,6,,4g,,3,8,l,2,1l,2,,,,,m,,e,7,3,5,5f,8,2,3,,,n,,29,,2,6,,,2,,,2,,2,6j,,2,4,6,2,,2,r,2,2d,8,2,,,2,2y,,,,2,6,,,2t,3,2,4,,5,77,9,,2,6t,,a,2,,,4,,40,4,2,2,4,,w,a,14,6,2,4,8,,9,6,2,3,1a,d,,2,ba,7,,6,,,2a,m,2,7,,2,,2,3e,6,3,,,2,,7,,,20,2,3,,,,9n,2,f0b,5,1n,7,t4,,1r,4,29,,f5k,2,43q,,,3,4,5,8,8,2,7,u,4,44,3,1iz,1j,4,1e,8,,e,,m,5,,f,11s,7,,h,2,7,,2,,5,79,7,c5,4,15s,7,31,7,240,5,gx7k,2o,3k,6o".split(",").map(e=>e?parseInt(e,36):1);for(let e=0,t=0;e<n.length;e++)(e%2?ph:Tr).push(t=t+n[e])})();function Cu(n){if(n<768)return!1;for(let e=0,t=Tr.length;;){let i=e+t>>1;if(n<Tr[i])t=i;else if(n>=ph[i])e=i+1;else return!0;if(e==t)return!1}}function cl(n){return n>=127462&&n<=127487}const fl=8205;function Qu(n,e,t=!0,i=!0){return(t?mh:Au)(n,e,i)}function mh(n,e,t){if(e==n.length)return e;e&&gh(n.charCodeAt(e))&&Oh(n.charCodeAt(e-1))&&e--;let i=Ls(n,e);for(e+=ul(i);e<n.length;){let s=Ls(n,e);if(i==fl||s==fl||t&&Cu(s))e+=ul(s),i=s;else if(cl(s)){let r=0,o=e-2;for(;o>=0&&cl(Ls(n,o));)r++,o-=2;if(r%2==0)break;e+=2}else break}return e}function Au(n,e,t){for(;e>0;){let i=mh(n,e-2,t);if(i<e)return i;e--}return 0}function Ls(n,e){let t=n.charCodeAt(e);if(!Oh(t)||e+1==n.length)return t;let i=n.charCodeAt(e+1);return gh(i)?(t-55296<<10)+(i-56320)+65536:t}function gh(n){return n>=56320&&n<57344}function Oh(n){return n>=55296&&n<56320}function ul(n){return n<65536?1:2}class V{lineAt(e){if(e<0||e>this.length)throw new RangeError(`Invalid position ${e} in document of length ${this.length}`);return this.lineInner(e,!1,1,0)}line(e){if(e<1||e>this.lines)throw new RangeError(`Invalid line number ${e} in ${this.lines}-line document`);return this.lineInner(e,!0,1,0)}replace(e,t,i){[e,t]=ai(this,e,t);let s=[];return this.decompose(0,e,s,2),i.length&&i.decompose(0,i.length,s,3),this.decompose(t,this.length,s,1),Ye.from(s,this.length-(t-e)+i.length)}append(e){return this.replace(this.length,this.length,e)}slice(e,t=this.length){[e,t]=ai(this,e,t);let i=[];return this.decompose(e,t,i,0),Ye.from(i,t-e)}eq(e){if(e==this)return!0;if(e.length!=this.length||e.lines!=this.lines)return!1;let t=this.scanIdentical(e,1),i=this.length-this.scanIdentical(e,-1),s=new Ci(this),r=new Ci(e);for(let o=t,l=t;;){if(s.next(o),r.next(o),o=0,s.lineBreak!=r.lineBreak||s.done!=r.done||s.value!=r.value)return!1;if(l+=s.value.length,s.done||l>=i)return!0}}iter(e=1){return new Ci(this,e)}iterRange(e,t=this.length){return new yh(this,e,t)}iterLines(e,t){let i;if(e==null)i=this.iter();else{t==null&&(t=this.lines+1);let s=this.line(e).from;i=this.iterRange(s,Math.max(s,t==this.lines+1?this.length:t<=1?0:this.line(t-1).to))}return new bh(i)}toString(){return this.sliceString(0)}toJSON(){let e=[];return this.flatten(e),e}constructor(){}static of(e){if(e.length==0)throw new RangeError("A document must have at least one line");return e.length==1&&!e[0]?V.empty:e.length<=32?new J(e):Ye.from(J.split(e,[]))}}class J extends V{constructor(e,t=Pu(e)){super(),this.text=e,this.length=t}get lines(){return this.text.length}get children(){return null}lineInner(e,t,i,s){for(let r=0;;r++){let o=this.text[r],l=s+o.length;if((t?i:l)>=e)return new Mu(s,l,i,o);s=l+1,i++}}decompose(e,t,i,s){let r=e<=0&&t>=this.length?this:new J(dl(this.text,e,t),Math.min(t,this.length)-Math.max(0,e));if(s&1){let o=i.pop(),l=$n(r.text,o.text.slice(),0,r.length);if(l.length<=32)i.push(new J(l,o.length+r.length));else{let a=l.length>>1;i.push(new J(l.slice(0,a)),new J(l.slice(a)))}}else i.push(r)}replace(e,t,i){if(!(i instanceof J))return super.replace(e,t,i);[e,t]=ai(this,e,t);let s=$n(this.text,$n(i.text,dl(this.text,0,e)),t),r=this.length+i.length-(t-e);return sLine truncated
`){[e,t]=ai(this,e,t);let s="";for(let r=0,o=0;r<=t&&o<this.text.length;o++){let l=this.text[o],a=r+l.length;r>e&&o&&(s+=i),e<a&&t>r&&(s+=l.slice(Math.max(0,e-r),t-r)),r=a+1}return s}flatten(e){for(let t of this.text)e.push(t)}scanIdentical(){return 0}static split(e,t){let i=[],s=-1;for(let r of e)i.push(r),s+=r.length+1,i.length==32&&(t.push(new J(i,s)),i=[],s=-1);return s>-1&&t.push(new J(i,s)),t}}class Ye extends V{constructor(e,t){super(),this.children=e,this.length=t,this.lines=0;for(let i of e)this.lines+=i.lines}lineInner(e,t,i,s){for(let r=0;;r++){let o=this.children[r],l=s+o.length,a=i+o.lines-1;if((t?a:l)>=e)return o.lineInner(e,t,i,s);s=l+1,i=a+1}}decompose(e,t,i,s){for(let r=0,o=0;o<=t&&r<this.children.length;r++){let l=this.children[r],a=o+l.length;if(e<=a&&t>=o){let h=s&((o<=e?1:0)|(a>=t?2:0));o>=e&&a<=t&&!h?i.push(l):l.decompose(e-o,t-o,i,h)}o=a+1}}replace(e,t,i){if([e,t]=ai(this,e,t),i.lines<this.lines)for(let s=0,r=0;s<this.children.length;s++){let o=this.children[s],l=r+o.length;if(e>=r&&t<=l){let a=o.replace(e-r,t-r,i),h=this.lines-o.lines+a.lines;if(a.lines<h>>4&&a.lines>h>>6){let c=this.children.slice();return c[s]=a,new Ye(c,this.length-(t-e)+i.length)}return super.replace(r,l,a)}r=l+1}return super.replace(e,t,i)}sliceString(e,t=this.length,i=`
`){[e,t]=ai(this,e,t);let s="";for(let r=0,o=0;r<this.children.length&&o<=t;r++){let l=this.children[r],a=o+l.length;o>e&&r&&(s+=i),e<a&&t>o&&(s+=l.sliceString(e-o,t-o,i)),o=a+1}return s}flatten(e){for(let t of this.children)t.flatten(e)}scanIdentical(e,t){if(!(e instanceof Ye))return 0;let i=0,[s,r,o,l]=t>0?[0,0,this.children.length,e.children.length]:[this.children.length-1,e.children.length-1,-1,-1];for(;;s+=t,r+=t){if(s==o||r==l)return i;let a=this.children[s],h=e.children[r];if(a!=h)return i+a.scanIdentical(h,t);i+=a.length+1}}static from(e,t=e.reduce((i,s)=>i+s.length+1,-1)){let i=0;for(let d of e)i+=d.lines;if(i<32){let d=[];for(let p of e)p.flatten(d);return new J(d,t)}let s=Math.max(32,i>>5),r=s<<1,o=s>>1,l=[],a=0,h=-1,c=[];function f(d){let p;if(d.lines>r&&d instanceof Ye)for(let m of d.children)f(m);else d.lines>o&&(a>o||!a)?(u(),l.push(d)):d instanceof J&&a&&(p=c[c.length-1])instanceof J&&d.lines+p.lines<=32?(a+=d.lines,h+=d.length+1,c[c.length-1]=new J(p.text.concat(d.text),p.length+1+d.length)):(a+d.lines>s&&u(),a+=d.lines,h+=d.length+1,c.push(d))}function u(){a!=0&&(l.push(c.length==1?c[0]:Ye.from(c,h)),h=-1,a=c.length=0)}for(let d of e)f(d);return u(),l.length==1?l[0]:new Ye(l,t)}}V.empty=new J([""],0);function Pu(n){let e=-1;for(let t of n)e+=t.length+1;return e}function $n(n,e,t=0,i=1e9){for(let s=0,r=0,o=!0;r<n.length&&s<=i;r++){let l=n[r],a=s+l.length;a>=t&&(a>i&&(l=l.slice(0,i-s)),s<t&&(l=l.slice(t-s)),o?(e[e.length-1]+=l,o=!1):e.push(l)),s=a+1}return e}function dl(n,e,t){return $n(n,[""],e,t)}class Ci{constructor(e,t=1){this.dir=t,this.done=!1,this.lineBreak=!1,this.value="",this.nodes=[e],this.offsets=[t>0?1:(e instanceof J?e.text.length:e.children.length)<<1]}nextInner(e,t){for(this.done=this.lineBreak=!1;;){let i=this.nodes.length-1,s=this.nodes[i],r=this.offsets[i],o=r>>1,l=s instanceof J?s.text.length:s.children.length;if(o==(t>0?l:0)){if(i==0)return this.done=!0,this.value="",this;t>0&&this.offsets[i-1]++,this.nodes.pop(),this.offsets.pop()}else if((r&1)==(t>0?0:1)){if(this.offsets[i]+=t,e==0)return this.lineBreak=!0,this.value=`
`,this;e--}else if(s instanceof J){let a=s.text[o+(t<0?-1:0)];if(this.offsets[i]+=t,a.length>Math.max(0,e))return this.value=e==0?a:t>0?a.slice(e):a.slice(0,a.length-e),this;e-=a.length}else{let a=s.children[o+(t<0?-1:0)];e>a.length?(e-=a.length,this.offsets[i]+=t):(t<0&&this.offsets[i]--,this.nodes.push(a),this.offsets.push(t>0?1:(a instanceof J?a.text.length:a.children.length)<<1))}}}next(e=0){return e<0&&(this.nextInner(-e,-this.dir),e=this.value.length),this.nextInner(e,this.dir)}}class yh{constructor(e,t,i){this.value="",this.done=!1,this.cursor=new Ci(e,t>i?-1:1),this.pos=t>i?e.length:0,this.from=Math.min(t,i),this.to=Math.max(t,i)}nextInner(e,t){if(t<0?this.pos<=this.from:this.pos>=this.to)return this.value="",this.done=!0,this;e+=Math.max(0,t<0?this.pos-this.to:this.from-this.pos);let i=t<0?this.pos-this.from:this.to-this.pos;e>i&&(e=i),i-=e;let{value:s}=this.cursor.next(e);return this.pos+=(s.length+e)*t,this.value=s.length<=i?s:t<0?s.slice(s.length-i):s.slice(0,i),this.done=!this.value,this}next(e=0){return e<0?e=Math.max(e,this.from-this.pos):e>0&&(e=Math.min(e,this.to-this.pos)),this.nextInner(e,this.cursor.dir)}get lineBreak(){return this.cursor.lineBreak&&this.value!=""}}class bh{constructor(e){this.inner=e,this.afterBreak=!0,this.value="",this.done=!1}next(e=0){let{done:t,lineBreak:i,value:s}=this.inner.next(e);return t&&this.afterBreak?(this.value="",this.afterBreak=!1):t?(this.done=!0,this.value=""):i?this.afterBreak?this.value="":(this.afterBreak=!0,this.next()):(this.value=s,this.afterBreak=!1),this}get lineBreak(){return!1}}typeof Symbol<"u"&&(V.prototype[Symbol.iterator]=function(){return this.iter()},Ci.prototype[Symbol.iterator]=yh.prototype[Symbol.iterator]=bh.prototype[Symbol.iterator]=function(){return this});class Mu{constructor(e,t,i,s){this.from=e,this.to=t,this.number=i,this.text=s}get length(){return this.to-this.from}}function ai(n,e,t){return e=Math.max(0,Math.min(n.length,e)),[e,Math.max(e,Math.min(n.length,t))]}function le(n,e,t=!0,i=!0){return Qu(n,e,t,i)}function Ru(n){return n>=56320&&n<57344}function Du(n){return n>=55296&&n<56320}function ke(n,e){let t=n.charCodeAt(e);if(!Du(t)||e+1==n.length)return t;let i=n.charCodeAt(e+1);return Ru(i)?(t-55296<<10)+(i-56320)+65536:t}function xo(n){return n<=65535?String.fromCharCode(n):(n-=65536,String.fromCharCode((n>>10)+55296,(n&1023)+56320))}function Ke(n){return n<65536?1:2}const Cr=/\r\n?|\n/;var ue=(function(n){return n[n.Simple=0]="Simple",n[n.TrackDel=1]="TrackDel",n[n.TrackBefore=2]="TrackBefore",n[n.TrackAfter=3]="TrackAfter",n})(ue||(ue={}));class st{constructor(e){this.sections=e}get length(){let e=0;for(let t=0;t<this.sections.length;t+=2)e+=this.sections[t];return e}get newLength(){let e=0;for(let t=0;t<this.sections.length;t+=2){let i=this.sections[t+1];e+=i<0?this.sections[t]:i}return e}get empty(){return this.sections.length==0||this.sections.length==2&&this.sections[1]<0}iterGaps(e){for(let t=0,i=0,s=0;t<this.sections.length;){let r=this.sections[t++],o=this.sections[t++];o<0?(e(i,s,r),s+=r):s+=o,i+=r}}iterChangedRanges(e,t=!1){Qr(this,e,t)}get invertedDesc(){let e=[];for(let t=0;t<this.sections.length;){let i=this.sections[t++],s=this.sections[t++];s<0?e.push(i,s):e.push(s,i)}return new st(e)}composeDesc(e){return this.empty?e:e.empty?this:xh(this,e)}mapDesc(e,t=!1){return e.empty?this:Ar(this,e,t)}mapPos(e,t=-1,i=ue.Simple){let s=0,r=0;for(let o=0;o<this.sections.length;){let l=this.sections[o++],a=this.sections[o++],h=s+l;if(a<0){if(h>e)return r+(e-s);r+=l}else{if(i!=ue.Simple&&h>=e&&(i==ue.TrackDel&&s<e&&h>e||i==ue.TrackBefore&&s<e||i==ue.TrackAfter&&h>e))return null;if(h>e||h==e&&t<0&&!l)return e==s||t<0?r:r+a;r+=a}s=h}if(e>s)throw new RangeError(`Position ${e} is out of range for changeset of length ${s}`);return r}touchesRange(e,t=e){for(let i=0,s=0;i<this.sections.length&&s<=t;){let r=this.sections[i++],o=this.sections[i++],l=s+r;if(o>=0&&s<=t&&l>=e)return s<e&&l>t?"cover":!0;s=l}return!1}toString(){let e="";for(let t=0;t<this.sections.length;){let i=this.sections[t++],s=this.sections[t++];e+=(e?" ":"")+i+(s>=0?":"+s:"")}return e}toJSON(){return this.sections}static fromJSON(e){if(!Array.isArray(e)||e.length%2||e.some(t=>typeof t!="number"))throw new RangeError("Invalid JSON representation of ChangeDesc");return new st(e)}static create(e){return new st(e)}}class se extends st{constructor(e,t){super(e),this.inserted=t}apply(e){if(this.length!=e.length)throw new RangeError("Applying change set to a document with the wrong length");return Qr(this,(t,i,s,r,o)=>e=e.replace(s,s+(i-t),o),!1),e}mapDesc(e,t=!1){return Ar(this,e,t,!0)}invert(e){let t=this.sections.slice(),i=[];for(let s=0,r=0;s<t.length;s+=2){let o=t[s],l=t[s+1];if(l>=0){t[s]=l,t[s+1]=o;let a=s>>1;for(;i.length<a;)i.push(V.empty);i.push(o?e.slice(r,r+o):V.empty)}r+=o}return new se(t,i)}compose(e){return this.empty?e:e.empty?this:xh(this,e,!0)}map(e,t=!1){return e.empty?this:Ar(this,e,t,!0)}iterChanges(e,t=!1){Qr(this,e,t)}get desc(){return st.crea Line truncated
@@ -12,4 +12,4 @@ import{r as be,j as vr}from"./index-BUPp0i0i.js";function wr(){return wr=Object.
`:i=="r"?"\r":i=="t"?" ":"\\")}eq(e){return this.search==e.search&&this.replace==e.replace&&this.caseSensitive==e.caseSensitive&&this.regexp==e.regexp&&this.wholeWord==e.wholeWord&&this.test==e.test}create(){return this.regexp?new S0(this):new y0(this)}getCursor(e,t=0,i){let s=e.doc?e:N.create({doc:e});return i==null&&(i=s.doc.length),this.regexp?Zt(this,s,t,i):Gt(this,s,t,i)}}class Hf{constructor(e){this.spec=e}}function g0(n,e,t){return(i,s,r,o)=>{if(t&&!t(i,s,r,o))return!1;let l=i>=o&&s<=o+r.length?r.slice(i-o,s-o):e.doc.sliceString(i,s);return n(l,e,i,s)}}function Gt(n,e,t,i){let s;return n.wholeWord&&(s=O0(e.doc,e.charCategorizer(e.selection.main.head))),n.test&&(s=g0(n.test,e,s)),new di(e.doc,n.unquoted,t,i,n.caseSensitive?void 0:r=>r.toLowerCase(),s)}function O0(n,e){return(t,i,s,r)=>((r>t||r+s.length<i)&&(r=Math.max(0,t-2),s=n.sliceString(r,Math.min(n.length,i+2))),(e(ds(s,t-r))!=G.Word||e(ps(s,t-r))!=G.Word)&&(e(ps(s,i-r))!=G.Word||e(ds(s,i-r))!=G.Word))}class y0 extends Hf{constructor(e){super(e)}nextMatch(e,t,i){let s=Gt(this.spec,e,i,e.doc.length).nextOverlapping();if(s.done){let r=Math.min(e.doc.length,t+this.spec.unquoted.length);s=Gt(this.spec,e,0,r).nextOverlapping()}return s.done||s.value.from==t&&s.value.to==i?null:s.value}prevMatchInRange(e,t,i){for(let s=i;;){let r=Math.max(t,s-1e4-this.spec.unquoted.length),o=Gt(this.spec,e,r,s),l=null;for(;!o.nextOverlapping().done;)l=o.value;if(l)return l;if(r==t)return null;s-=1e4}}prevMatch(e,t,i){let s=this.prevMatchInRange(e,0,t);return s||(s=this.prevMatchInRange(e,Math.max(0,i-this.spec.unquoted.length),e.doc.length)),s&&(s.from!=t||s.to!=i)?s:null}getReplacement(e){return this.spec.unquote(this.spec.replace)}matchAll(e,t){let i=Gt(this.spec,e,0,e.doc.length),s=[];for(;!i.next().done;){if(s.length>=t)return null;s.push(i.value)}return s}highlight(e,t,i,s){let r=Gt(this.spec,e,Math.max(0,t-this.spec.unquoted.length),Math.min(i+this.spec.unquoted.length,e.doc.length));for(;!r.next().done;)s(r.value.from,r.value.to)}}function b0(n,e,t){return(i,s,r)=>(!t||t(i,s,r))&&n(r[0],e,i,s)}function Zt(n,e,t,i){let s;return n.wholeWord&&(s=x0(e.charCategorizer(e.selection.main.head))),n.test&&(s=b0(n.test,e,s)),new Ff(e.doc,n.search,{ignoreCase:!n.caseSensitive,test:s},t,i)}function ds(n,e){return n.slice(le(n,e,!1),e)}function ps(n,e){return n.slice(e,le(n,e))}function x0(n){return(e,t,i)=>!i[0].length||(n(ds(i.input,i.index))!=G.Word||n(ps(i.input,i.index))!=G.Word)&&(n(ps(i.input,i.index+i[0].length))!=G.Word||n(ds(i.input,i.index+i[0].length))!=G.Word)}class S0 extends Hf{nextMatch(e,t,i){let s=Zt(this.spec,e,i,e.doc.length).next();return s.done&&(s=Zt(this.spec,e,0,t).next()),s.done?null:s.value}prevMatchInRange(e,t,i){for(let s=1;;s++){let r=Math.max(t,i-s*1e4),o=Zt(this.spec,e,r,i),l=null;for(;!o.next().done;)l=o.value;if(l&&(r==t||l.from>r+10))return l;if(r==t)return null}}prevMatch(e,t,i){return this.prevMatchInRange(e,0,t)||this.prevMatchInRange(e,i,e.doc.length)}getReplacement(e){return this.spec.unquote(this.spec.replace).replace(/\$([$&]|\d+)/g,(t,i)=>{if(i=="&")return e.match[0];if(i=="$")return"$";for(let s=i.length;s>0;s--){let r=+i.slice(0,s);if(r>0&&r<e.match.length)return e.match[r]+i.slice(s)}return t})}matchAll(e,t){let i=Zt(this.spec,e,0,e.doc.length),s=[];for(;!i.next().done;){if(s.length>=t)return null;s.push(i.value)}return s}highlight(e,t,i,s){let r=Zt(this.spec,e,Math.max(0,t-250),Math.min(i+250,e.doc.length));for(;!r.next().done;)s(r.value.from,r.value.to)}}const Ui=W.define(),Go=W.define(),kt=pe.define({create(n){return new cr(Oo(n).create(),null)},update(n,e){for(let t of e.effects)t.is(Ui)?n=new cr(t.value.create(),n.panel):t.is(Go)&&(n=new cr(n.query,t.value?Zo:null));return n},provide:n=>Vi.from(n,e=>e.panel)});class cr{constructor(e,t){this.query=e,this.panel=t}}const k0=R.mark({class:"cm-searchMatch"}),v0=R.mark({class:"cm-searchMatch cm-searchMatch-selected"}),w0=K.fromClass(class{constructor(n){this.view=n,this.decorations=this.highlight(n.state.field(kt))}update(n){let e=n.state.field(kt);(e!=n.startState.field(kt)||n.docChanged||n.selectionSet||n.viewportChanged)&&(this.decorations=this.highlight(e))}highlight({query:n,panel:e}){if(!e||!n.spec.valid)return R.none;let{view:t}=this,i=new mt;for(let s=0,r=t.visibleRanges,o=r.length;s<o;s++){let{from:l,to:a}=r[s];for(;s<o-1&&a>r[s+1].from-500;)a=r[++s].to;n.highlight(t.state,l,a,(h,c)=>{let f=t.state.selection.ranges.some(u=>u.from==h&&u.to==c);i.add(h,c,f?v0:k0)})}return i.finish()}},{decorations:n=>n.decorations});function hn(n){return e=>{let t=e.state.field(kt,!1);return t&&t.query.spec.valid?n(e,t):Zf(e)}}const ms=hn((n,{query:e})=>{let{to:t}=n.state.selection.main,i=e.nextMatch(n.state,t,t);if(!i)return!1;let s=b.single(i.from,i.to),r=n.state.facet(gi);return n.dispatch({selection:s,effects:[Yo(n,i),r.scrollToMatch(s.main,n)],userEvent:"select.search"}),Gf(n),!0}),gs=hn((n,{query:e})=>{let{state:t}=n,{from:i}=t.selection.main,s=e.prevMatch(t,i,i);if(!s)return!1;let r= Line truncated
`,{label:"if",detail:"block",type:"keyword"}),lt("if ${}:\n ${}\nelse:\n ${}",{label:"if",detail:"/ else block",type:"keyword"}),lt("class ${name}:\n def __init__(self, ${params}):\n ${}",{label:"class",detail:"definition",type:"keyword"}),lt("import ${module}",{label:"import",detail:"statement",type:"keyword"}),lt("from ${module} import ${names}",{label:"from",detail:"import",type:"keyword"})],Rb=E0(wu,Jf(Pb.concat(Mb)));function xr(n){let{node:e,pos:t}=n,i=n.lineIndent(t,-1),s=null;for(;;){let r=e.childBefore(t);if(r)if(r.name=="Comment")t=r.from;else if(r.name=="Body"||r.name=="MatchBody")n.baseIndentFor(r)+n.unit<=i&&(s=r),e=r;else if(r.name=="MatchClause")e=r;else if(r.type.is("Statement"))e=r;else break;else break}return s}function Sr(n,e){let t=n.baseIndentFor(e),i=n.lineAt(n.pos,-1),s=i.from+i.text.length;return/^\s*($|#)/.test(i.text)&&n.node.to<s+100&&!/\S/.test(n.state.sliceDoc(s,n.node.to))&&n.lineIndent(n.pos,-1)<=t||/^\s*(else:|elif |except |finally:|case\s+[^=:]+:)/.test(n.textAfter)&&n.lineIndent(n.pos,-1)>t?null:t+n.unit}const kr=os.define({name:"python",parser:Cb.configure({props:[Hc.add({Body:n=>{var e;let t=/^\s*(#|$)/.test(n.textAfter)&&xr(n)||n.node;return(e=Sr(n,t))!==null&&e!==void 0?e:n.continue()},MatchBody:n=>{var e;let t=xr(n);return(e=Sr(n,t||n.node))!==null&&e!==void 0?e:n.continue()},IfStatement:n=>/^\s*(else:|elif )/.test(n.textAfter)?n.baseIndent:n.continue(),"ForStatement WhileStatement":n=>/^\s*else:/.test(n.textAfter)?n.baseIndent:n.continue(),TryStatement:n=>/^\s*(except[ :]|finally:|else:)/.test(n.textAfter)?n.baseIndent:n.continue(),MatchStatement:n=>/^\s*case /.test(n.textAfter)?n.baseIndent+n.unit:n.continue(),"TupleExpression ComprehensionExpression ParamList ArgList ParenthesizedExpression":sr({closing:")"}),"DictionaryExpression DictionaryComprehensionExpression SetExpression SetComprehensionExpression":sr({closing:"}"}),"ArrayExpression ArrayComprehensionExpression":sr({closing:"]"}),MemberExpression:n=>n.baseIndent+n.unit,"String FormatString":()=>null,Script:n=>{var e;let t=xr(n);return(e=t&&Sr(n,t))!==null&&e!==void 0?e:n.continue()}}),Zc.add({"ArrayExpression DictionaryExpression SetExpression TupleExpression":pg,Body:(n,e)=>({from:n.from+1,to:n.to-(n.to==e.doc.length?0:1)}),"String FormatString":(n,e)=>({from:e.doc.lineAt(n.from).to,to:n.to})})]}),languageData:{closeBrackets:{brackets:["(","[","{","'",'"',"'''",'"""'],stringPrefixes:["f","fr","rf","r","u","b","br","rb","F","FR","RF","R","U","B","BR","RB"]},commentTokens:{line:"#"},indentOnInput:/^\s*([\}\]\)]|else:|elif |except |finally:|case\s+[^:]*:?)$/}});function Db(){return new ng(kr,[kr.data.of({autocomplete:Ab}),kr.data.of({autocomplete:Rb})])}function Bb({value:n,onChange:e,id:t,height:i="256px"}){return vr.jsx("div",{className:"w-full overflow-hidden rounded-md border border-input",children:vr.jsx(pu,{value:n,onChange:e,extensions:[Db()],theme:du,height:i,basicSetup:{lineNumbers:!0,foldGutter:!1,highlightActiveLine:!0},className:"text-sm",id:t,"aria-label":"Bot code editor"})})}export{Bb as BotCodeEditor};
//# sourceMappingURL=BotCodeEditor-3AsJnjQI.js.map
//# sourceMappingURL=BotCodeEditor-BiRWyRIv.js.map
@@ -1 +1 @@
{"version":3,"file":"BotCodeEditor-3AsJnjQI.js","sources":["../../node_modules/@babel/runtime/helpers/esm/extends.js","../../node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js","../../node_modules/@marijn/find-cluster-break/src/index.js","../../node_modules/@codemirror/state/dist/index.js","../../node_modules/style-mod/src/style-mod.js","../../node_modules/w3c-keyname/index.js","../../node_modules/crelt/index.js","../../node_modules/@codemirror/view/dist/index.js","../../node_modules/@lezer/common/dist/index.js","../../node_modules/@lezer/highlight/dist/index.js","../../node_modules/@codemirror/language/dist/index.js","../../node_modules/@codemirror/commands/dist/index.js","../../node_modules/@codemirror/search/dist/index.js","../../node_modules/@codemirror/autocomplete/dist/index.js","../../node_modules/@codemirror/lint/dist/index.js","../../node_modules/@uiw/codemirror-extensions-basic-setup/esm/index.js","../../node_modules/@codemirror/theme-one-dark/dist/index.js","../../node_modules/@uiw/react-codemirror/esm/theme/light.js","../../node_modules/@uiw/react-codemirror/esm/getDefaultExtensions.js","../../node_modules/@uiw/react-codemirror/esm/utils.js","../../node_modules/@uiw/react-codemirror/esm/timeoutLatch.js","../../node_modules/@uiw/react-codemirror/esm/useCodeMirror.js","../../node_modules/@uiw/react-codemirror/esm/index.js","../../node_modules/@lezer/lr/dist/index.js","../../node_modules/@lezer/python/dist/index.js","../../node_modules/@codemirror/lang-python/dist/index.js","../../src/components/BotCodeEditor.tsx"],"sourcesContent":["function _extends() {\n return _extends = Object.assign ? Object.assign.bind() : function (n) {\n for (var e = 1; e < arguments.length; e++) {\n var t = arguments[e];\n for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]);\n }\n return n;\n }, _extends.apply(null, arguments);\n}\nexport { _extends as default };","function _objectWithoutPropertiesLoose(r, e) {\n if (null == r) return {};\n var t = {};\n for (var n in r) if ({}.hasOwnProperty.call(r, n)) {\n if (-1 !== e.indexOf(n)) continue;\n t[n] = r[n];\n }\n return t;\n}\nexport { _objectWithoutPropertiesLoose as default };","// These are filled with ranges (rangeFrom[i] up to but not including\n// rangeTo[i]) of code points that count as extending characters.\nlet rangeFrom = [], rangeTo = []\n\n;(() => {\n // Compressed representation of the Grapheme_Cluster_Break=Extend\n // information from\n // http://www.unicode.org/Public/16.0.0/ucd/auxiliary/GraphemeBreakProperty.txt.\n // Each pair of elements represents a range, as an offet from the\n // previous range and a length. Numbers are in base-36, with the empty\n // string being a shorthand for 1.\n let numbers = \"lc,34,7n,7,7b,19,,,,2,,2,,,20,b,1c,l,g,,2t,7,2,6,2,2,,4,z,,u,r,2j,b,1m,9,9,,o,4,,9,,3,,5,17,3,3b,f,,w,1j,,,,4,8,4,,3,7,a,2,t,,1m,,,,2,4,8,,9,,a,2,q,,2,2,1l,,4,2,4,2,2,3,3,,u,2,3,,b,2,1l,,4,5,,2,4,,k,2,m,6,,,1m,,,2,,4,8,,7,3,a,2,u,,1n,,,,c,,9,,14,,3,,1l,3,5,3,,4,7,2,b,2,t,,1m,,2,,2,,3,,5,2,7,2,b,2,s,2,1l,2,,,2,4,8,,9,,a,2,t,,20,,4,,2,3,,,8,,29,,2,7,c,8,2q,,2,9,b,6,22,2,r,,,,,,1j,e,,5,,2,5,b,,10,9,,2u,4,,6,,2,2,2,p,2,4,3,g,4,d,,2,2,6,,f,,jj,3,qa,3,t,3,t,2,u,2,1s,2,,7,8,,2,b,9,,19,3,3b,2,y,,3a,3,4,2,9,,6,3,63,2,2,,1m,,,7,,,,,2,8,6,a,2,,1c,h,1r,4,1c,7,,,5,,14,9,c,2,w,4,2,2,,3,1k,,,2,3,,,3,1m,8,2,2,48,3,,d,,7,4,,6,,3,2,5i,1m,,5,ek,,5f,x,2da,3,3x,,2o,w,fe,6,2x,2,n9w,4,,a,w,2,28,2,7k,,3,,4,,p,2,5,,47,2,q,i,d,,12,8,p,b,1a,3,1c,,2,4,2,2,13,,1v,6,2,2,2,2,c,,8,,1b,,1f,,,3,2,2,5,2,,,16,2,8,,6m,,2,,4,,fn4,,kh,g,g,g,a6,2,gt,,6a,,45,5,1ae,3,,2,5,4,14,3,4,,4l,2,fx,4,ar,2,49,b,4w,,1i,f,1k,3,1d,4,2,2,1x,3,10,5,,8,1q,,c,2,1g,9,a,4,2,,2n,3,2,,,2,6,,4g,,3,8,l,2,1l,2,,,,,m,,e,7,3,5,5f,8,2,3,,,n,,29,,2,6,,,2,,,2,,2,6j,,2,4,6,2,,2,r,2,2d,8,2,,,2,2y,,,,2,6,,,2t,3,2,4,,5,77,9,,2,6t,,a,2,,,4,,40,4,2,2,4,,w,a,14,6,2,4,8,,9,6,2,3,1a,d,,2,ba,7,,6,,,2a,m,2,7,,2,,2,3e,6,3,,,2,,7,,,20,2,3,,,,9n,2,f0b,5,1n,7,t4,,1r,4,29,,f5k,2,43q,,,3,4,5,8,8,2,7,u,4,44,3,1iz,1j,4,1e,8,,e,,m,5,,f,11s,7,,h,2,7,,2,,5,79,7,c5,4,15s,7,31,7,240,5,gx7k,2o,3k,6o\".split(\",\").map(s => s ? parseInt(s, 36) : 1)\n for (let i = 0, n = 0; i < numbers.length; i++)\n (i % 2 ? rangeTo : rangeFrom).push(n = n + numbers[i])\n})()\n\nexport function isExtendingChar(code) {\n if (code < 768) return false\n for (let from = 0, to = rangeFrom.length;;) {\n let mid = (from + to) >> 1\n if (code < rangeFrom[mid]) to = mid\n else if (code >= rangeTo[mid]) from = mid + 1\n else return true\n if (from == to) return false\n }\n}\n\nfunction isRegionalIndicator(code) {\n return code >= 0x1F1E6 && code <= 0x1F1FF\n}\n\nfunction check(code) {\n for (let i = 0; i < rangeFrom.length; i++) {\n if (rangeTo[i] > code) return rangeFrom[i] <= code\n }\n return false\n}\n\nconst ZWJ = 0x200d\n\nexport function findClusterBreak(str, pos, forward = true, includeExtending = true) {\n return (forward ? nextClusterBreak : prevClusterBreak)(strLine truncated
{"version":3,"file":"BotCodeEditor-BiRWyRIv.js","sources":["../../node_modules/@babel/runtime/helpers/esm/extends.js","../../node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js","../../node_modules/@marijn/find-cluster-break/src/index.js","../../node_modules/@codemirror/state/dist/index.js","../../node_modules/style-mod/src/style-mod.js","../../node_modules/w3c-keyname/index.js","../../node_modules/crelt/index.js","../../node_modules/@codemirror/view/dist/index.js","../../node_modules/@lezer/common/dist/index.js","../../node_modules/@lezer/highlight/dist/index.js","../../node_modules/@codemirror/language/dist/index.js","../../node_modules/@codemirror/commands/dist/index.js","../../node_modules/@codemirror/search/dist/index.js","../../node_modules/@codemirror/autocomplete/dist/index.js","../../node_modules/@codemirror/lint/dist/index.js","../../node_modules/@uiw/codemirror-extensions-basic-setup/esm/index.js","../../node_modules/@codemirror/theme-one-dark/dist/index.js","../../node_modules/@uiw/react-codemirror/esm/theme/light.js","../../node_modules/@uiw/react-codemirror/esm/getDefaultExtensions.js","../../node_modules/@uiw/react-codemirror/esm/utils.js","../../node_modules/@uiw/react-codemirror/esm/timeoutLatch.js","../../node_modules/@uiw/react-codemirror/esm/useCodeMirror.js","../../node_modules/@uiw/react-codemirror/esm/index.js","../../node_modules/@lezer/lr/dist/index.js","../../node_modules/@lezer/python/dist/index.js","../../node_modules/@codemirror/lang-python/dist/index.js","../../src/components/BotCodeEditor.tsx"],"sourcesContent":["function _extends() {\n return _extends = Object.assign ? Object.assign.bind() : function (n) {\n for (var e = 1; e < arguments.length; e++) {\n var t = arguments[e];\n for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]);\n }\n return n;\n }, _extends.apply(null, arguments);\n}\nexport { _extends as default };","function _objectWithoutPropertiesLoose(r, e) {\n if (null == r) return {};\n var t = {};\n for (var n in r) if ({}.hasOwnProperty.call(r, n)) {\n if (-1 !== e.indexOf(n)) continue;\n t[n] = r[n];\n }\n return t;\n}\nexport { _objectWithoutPropertiesLoose as default };","// These are filled with ranges (rangeFrom[i] up to but not including\n// rangeTo[i]) of code points that count as extending characters.\nlet rangeFrom = [], rangeTo = []\n\n;(() => {\n // Compressed representation of the Grapheme_Cluster_Break=Extend\n // information from\n // http://www.unicode.org/Public/16.0.0/ucd/auxiliary/GraphemeBreakProperty.txt.\n // Each pair of elements represents a range, as an offet from the\n // previous range and a length. Numbers are in base-36, with the empty\n // string being a shorthand for 1.\n let num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,2,6,,,2t,3,2,4,,5,77,9,,2,6t,,a,2,,,4,,40,4,2,2,4,,w,a,14,6,2,4,8,,9,6,2,3,1a,d,,2,ba,7,,6,,,2a,m,2,7,,2,,2,3e,6,3,,,2,,7,,,20,2,3,,,,9n,2,f0b,5,1n,7,t4,,1r,4,29,,f5k,2,43q,,,3,4,5,8,8,2,7,u,4,44,3,1iz,1j,4,1e,8,,e,,m,5,,f,11s,7,,h,2,7,,2,,5,79,7,c5,4,15s,7,31,7,240,5,gx7k,2o,3k,6o\".split(\",\").map(s => s ? parseInt(s, 36) : 1)\n for (let i = 0, n = 0; i < numbers.length; i++)\n (i % 2 ? rangeTo : rangeFrom).push(n = n + numbers[i])\n})()\n\nexport function isExtendingChar(code) {\n if (code < 768) return false\n for (let from = 0, to = rangeFrom.length;;) {\n let mid = (from + to) >> 1\n if (code < rangeFrom[mid]) to = mid\n else if (code >= rangeTo[mid]) from = mid + 1\n else return true\n if (from == to) return false\n }\n}\n\nfunction isRegionalIndicator(code) {\n return code >= 0x1F1E6 && code <= 0x1F1FF\n}\n\nfunction check(code) {\n for (let i = 0; i < rangeFrom.length; i++) {\n if (rangeTo[i] > code) return rangeFrom[i] <= code\n }\n return false\n}\n\nconst ZWJ = 0x200d\n\nexport function findClusterBreak(str, pos, forward = true, includeExtending = true) {\n return (forward ? nextClusterBreak : prevClusterBreak)(strLine truncated
@@ -1,4 +1,4 @@
import{o as tr,p as yt,q as lr,u as wt,v as nt,w as rr,x as ar,y as hr,r as H,_ as fr,t as dt,z as gr,k as Ct,j as M,l as mr}from"./index-BUPp0i0i.js";var Se={},Fe={},ie={},St;function ve(){if(St)return ie;St=1,Object.defineProperty(ie,"__esModule",{value:!0}),ie.RequestType=ie.AdvertFlags=ie.DeviceRole=ie.PayloadVersion=ie.ControlSubType=ie.PayloadType=ie.RouteType=void 0;var t;(function(e){e[e.TransportFlood=0]="TransportFlood",e[e.Flood=1]="Flood",e[e.Direct=2]="Direct",e[e.TransportDirect=3]="TransportDirect"})(t||(ie.RouteType=t={}));var o;(function(e){e[e.Request=0]="Request",e[e.Response=1]="Response",e[e.TextMessage=2]="TextMessage",e[e.Ack=3]="Ack",e[e.Advert=4]="Advert",e[e.GroupText=5]="GroupText",e[e.GroupData=6]="GroupData",e[e.AnonRequest=7]="AnonRequest",e[e.Path=8]="Path",e[e.Trace=9]="Trace",e[e.Multipart=10]="Multipart",e[e.Control=11]="Control",e[e.RawCustom=15]="RawCustom"})(o||(ie.PayloadType=o={}));var c;(function(e){e[e.NodeDiscoverReq=128]="NodeDiscoverReq",e[e.NodeDiscoverResp=144]="NodeDiscoverResp"})(c||(ie.ControlSubType=c={}));var l;(function(e){e[e.Version1=0]="Version1",e[e.Version2=1]="Version2",e[e.Version3=2]="Version3",e[e.Version4=3]="Version4"})(l||(ie.PayloadVersion=l={}));var n;(function(e){e[e.Unknown=0]="Unknown",e[e.ChatNode=1]="ChatNode",e[e.Repeater=2]="Repeater",e[e.RoomServer=3]="RoomServer",e[e.Sensor=4]="Sensor"})(n||(ie.DeviceRole=n={}));var r;(function(e){e[e.HasLocation=16]="HasLocation",e[e.HasFeature1=32]="HasFeature1",e[e.HasFeature2=64]="HasFeature2",e[e.HasName=128]="HasName"})(r||(ie.AdvertFlags=r={}));var a;return(function(e){e[e.GetStats=1]="GetStats",e[e.Keepalive=2]="Keepalive",e[e.GetTelemetryData=3]="GetTelemetryData",e[e.GetMinMaxAvgData=4]="GetMinMaxAvgData",e[e.GetAccessList=5]="GetAccessList"})(a||(ie.RequestType=a={})),ie}var Ie={},kt;function oe(){if(kt)return Ie;kt=1,Object.defineProperty(Ie,"__esModule",{value:!0}),Ie.byteToHex=t,Ie.bytesToHex=o,Ie.numberToHex=c,Ie.hexToBytes=l;function t(n){return n.toString(16).padStart(2,"0").toUpperCase()}function o(n){return Array.from(n).map(t).join("")}function c(n,r=8){return(n>>>0).toString(16).padStart(r,"0").toUpperCase()}function l(n){const r=n.replace(/\s/g,"").toUpperCase();if(!/^[0-9A-F]*$/.test(r))throw new Error("Invalid hex string: invalid characters at position 0");if(r.length%2!==0)throw new Error("Invalid hex string: odd length");const a=new Uint8Array(r.length/2);for(let e=0;e<r.length;e+=2)a[e/2]=parseInt(r.substr(e,2),16);return a}return Ie}var ke={},Tt;function $e(){if(Tt)return ke;Tt=1,Object.defineProperty(ke,"__esModule",{value:!0}),ke.getRouteTypeName=o,ke.getPayloadTypeName=c,ke.getPayloadVersionName=l,ke.getDeviceRoleName=n,ke.getRequestTypeName=r,ke.getControlSubTypeName=a;const t=ve();function o(e){switch(e){case t.RouteType.Flood:return"Flood";case t.RouteType.Direct:return"Direct";case t.RouteType.TransportFlood:return"TransportFlood";case t.RouteType.TransportDirect:return"TransportDirect";default:return`Unknown (${e})`}}function c(e){switch(e){case t.PayloadType.RawCustom:return"RawCustom";case t.PayloadType.Trace:return"Trace";case t.PayloadType.Advert:return"Advert";case t.PayloadType.GroupText:return"GroupText";case t.PayloadType.GroupData:return"GroupData";case t.PayloadType.Request:return"Request";case t.PayloadType.Response:return"Response";case t.PayloadType.TextMessage:return"TextMessage";case t.PayloadType.AnonRequest:return"AnonRequest";case t.PayloadType.Ack:return"Ack";case t.PayloadType.Path:return"Path";case t.PayloadType.Multipart:return"Multipart";case t.PayloadType.Control:return"Control";default:return`Unknown (0x${e.toString(16)})`}}function l(e){switch(e){case t.PayloadVersion.Version1:return"Version 1";case t.PayloadVersion.Version2:return"Version 2";case t.PayloadVersion.Version3:return"Version 3";case t.PayloadVersion.Version4:return"Version 4";default:return`Unknown (${e})`}}function n(e){switch(e){case t.DeviceRole.Unknown:return"Unknown";case t.DeviceRole.ChatNode:return"Chat Node";case t.DeviceRole.Repeater:return"Repeater";case t.DeviceRole.RoomServer:return"Room Server";case t.DeviceRole.Sensor:return"Sensor";default:return`Unknown (${e})`}}function r(e){switch(e){case t.RequestType.GetStats:return"Get Stats";case t.RequestType.Keepalive:return"Keepalive (deprecated)";case t.RequestType.GetTelemetryData:return"Get Telemetry Data";case t.RequestType.GetMinMaxAvgData:return"Get Min/Max/Avg Data";case t.RequestType.GetAccessList:return"Get Access List";default:return`Unknown (${e})`}}function a(e){switch(e){case t.ControlSubType.NodeDiscoverReq:return"Node Discover Request";case t.ControlSubType.NodeDiscoverResp:return"Node Discover Response";default:return`Unknown (0x${e.toString(16)})`}}return ke}var Ue={},Ge={},Pt;function xt(){if(Pt)return Ge;Pt=1,Object.defineProperty(Ge,"__esModule",{value:!0}),Ge.ChannelCrypto=void 0;const t=tr(),o=oe();class c{static decryptGroupTextMessage(n,r,a){try{const e=(0,o.hexToBytes)(a),A=(0,o.hexToBytes)(r)Line truncated
import{o as tr,p as yt,q as lr,u as wt,v as nt,w as rr,x as ar,y as hr,r as H,_ as fr,t as dt,z as gr,k as Ct,j as M,l as mr}from"./index-C_33NHxn.js";var Se={},Fe={},ie={},St;function ve(){if(St)return ie;St=1,Object.defineProperty(ie,"__esModule",{value:!0}),ie.RequestType=ie.AdvertFlags=ie.DeviceRole=ie.PayloadVersion=ie.ControlSubType=ie.PayloadType=ie.RouteType=void 0;var t;(function(e){e[e.TransportFlood=0]="TransportFlood",e[e.Flood=1]="Flood",e[e.Direct=2]="Direct",e[e.TransportDirect=3]="TransportDirect"})(t||(ie.RouteType=t={}));var o;(function(e){e[e.Request=0]="Request",e[e.Response=1]="Response",e[e.TextMessage=2]="TextMessage",e[e.Ack=3]="Ack",e[e.Advert=4]="Advert",e[e.GroupText=5]="GroupText",e[e.GroupData=6]="GroupData",e[e.AnonRequest=7]="AnonRequest",e[e.Path=8]="Path",e[e.Trace=9]="Trace",e[e.Multipart=10]="Multipart",e[e.Control=11]="Control",e[e.RawCustom=15]="RawCustom"})(o||(ie.PayloadType=o={}));var c;(function(e){e[e.NodeDiscoverReq=128]="NodeDiscoverReq",e[e.NodeDiscoverResp=144]="NodeDiscoverResp"})(c||(ie.ControlSubType=c={}));var l;(function(e){e[e.Version1=0]="Version1",e[e.Version2=1]="Version2",e[e.Version3=2]="Version3",e[e.Version4=3]="Version4"})(l||(ie.PayloadVersion=l={}));var n;(function(e){e[e.Unknown=0]="Unknown",e[e.ChatNode=1]="ChatNode",e[e.Repeater=2]="Repeater",e[e.RoomServer=3]="RoomServer",e[e.Sensor=4]="Sensor"})(n||(ie.DeviceRole=n={}));var r;(function(e){e[e.HasLocation=16]="HasLocation",e[e.HasFeature1=32]="HasFeature1",e[e.HasFeature2=64]="HasFeature2",e[e.HasName=128]="HasName"})(r||(ie.AdvertFlags=r={}));var a;return(function(e){e[e.GetStats=1]="GetStats",e[e.Keepalive=2]="Keepalive",e[e.GetTelemetryData=3]="GetTelemetryData",e[e.GetMinMaxAvgData=4]="GetMinMaxAvgData",e[e.GetAccessList=5]="GetAccessList"})(a||(ie.RequestType=a={})),ie}var Ie={},kt;function oe(){if(kt)return Ie;kt=1,Object.defineProperty(Ie,"__esModule",{value:!0}),Ie.byteToHex=t,Ie.bytesToHex=o,Ie.numberToHex=c,Ie.hexToBytes=l;function t(n){return n.toString(16).padStart(2,"0").toUpperCase()}function o(n){return Array.from(n).map(t).join("")}function c(n,r=8){return(n>>>0).toString(16).padStart(r,"0").toUpperCase()}function l(n){const r=n.replace(/\s/g,"").toUpperCase();if(!/^[0-9A-F]*$/.test(r))throw new Error("Invalid hex string: invalid characters at position 0");if(r.length%2!==0)throw new Error("Invalid hex string: odd length");const a=new Uint8Array(r.length/2);for(let e=0;e<r.length;e+=2)a[e/2]=parseInt(r.substr(e,2),16);return a}return Ie}var ke={},Tt;function $e(){if(Tt)return ke;Tt=1,Object.defineProperty(ke,"__esModule",{value:!0}),ke.getRouteTypeName=o,ke.getPayloadTypeName=c,ke.getPayloadVersionName=l,ke.getDeviceRoleName=n,ke.getRequestTypeName=r,ke.getControlSubTypeName=a;const t=ve();function o(e){switch(e){case t.RouteType.Flood:return"Flood";case t.RouteType.Direct:return"Direct";case t.RouteType.TransportFlood:return"TransportFlood";case t.RouteType.TransportDirect:return"TransportDirect";default:return`Unknown (${e})`}}function c(e){switch(e){case t.PayloadType.RawCustom:return"RawCustom";case t.PayloadType.Trace:return"Trace";case t.PayloadType.Advert:return"Advert";case t.PayloadType.GroupText:return"GroupText";case t.PayloadType.GroupData:return"GroupData";case t.PayloadType.Request:return"Request";case t.PayloadType.Response:return"Response";case t.PayloadType.TextMessage:return"TextMessage";case t.PayloadType.AnonRequest:return"AnonRequest";case t.PayloadType.Ack:return"Ack";case t.PayloadType.Path:return"Path";case t.PayloadType.Multipart:return"Multipart";case t.PayloadType.Control:return"Control";default:return`Unknown (0x${e.toString(16)})`}}function l(e){switch(e){case t.PayloadVersion.Version1:return"Version 1";case t.PayloadVersion.Version2:return"Version 2";case t.PayloadVersion.Version3:return"Version 3";case t.PayloadVersion.Version4:return"Version 4";default:return`Unknown (${e})`}}function n(e){switch(e){case t.DeviceRole.Unknown:return"Unknown";case t.DeviceRole.ChatNode:return"Chat Node";case t.DeviceRole.Repeater:return"Repeater";case t.DeviceRole.RoomServer:return"Room Server";case t.DeviceRole.Sensor:return"Sensor";default:return`Unknown (${e})`}}function r(e){switch(e){case t.RequestType.GetStats:return"Get Stats";case t.RequestType.Keepalive:return"Keepalive (deprecated)";case t.RequestType.GetTelemetryData:return"Get Telemetry Data";case t.RequestType.GetMinMaxAvgData:return"Get Min/Max/Avg Data";case t.RequestType.GetAccessList:return"Get Access List";default:return`Unknown (${e})`}}function a(e){switch(e){case t.ControlSubType.NodeDiscoverReq:return"Node Discover Request";case t.ControlSubType.NodeDiscoverResp:return"Node Discover Response";default:return`Unknown (0x${e.toString(16)})`}}return ke}var Ue={},Ge={},Pt;function xt(){if(Pt)return Ge;Pt=1,Object.defineProperty(Ge,"__esModule",{value:!0}),Ge.ChannelCrypto=void 0;const t=tr(),o=oe();class c{static decryptGroupTextMessage(n,r,a){try{const e=(0,o.hexToBytes)(a),A=(0,o.hexToBytes)(r)Line truncated
• Timestamp (4 bytes) - send time as unix timestamp
• Request Type (1 byte) - type of request (GetStats, GetTelemetryData, etc.)
• Request Data (remaining bytes) - additional request-specific data`,startByte:e+A,endByte:e+n.length-1,value:f});const y={type:t.PayloadType.Request,version:t.PayloadVersion.Version1,isValid:!0,timestamp:0,requestType:t.RequestType.GetStats,requestData:"",destinationHash:s,sourceHash:i,cipherMac:u,ciphertext:f};return r!=null&&r.includeSegments&&(y.segments=a),y}catch(a){return{type:t.PayloadType.Request,version:t.PayloadVersion.Version1,isValid:!1,errors:[a instanceof Error?a.message:"Failed to decode request payload"],timestamp:0,requestType:t.RequestType.GetStats,requestData:"",destinationHash:"",sourceHash:"",cipherMac:"",ciphertext:""}}}}return Le.RequestPayloadDecoder=c,Le}var je={},Ft;function Br(){if(Ft)return je;Ft=1,Object.defineProperty(je,"__esModule",{value:!0}),je.ResponsePayloadDecoder=void 0;const t=ve(),o=oe();class c{static decode(n,r){try{if(n.length<4){const b={type:t.PayloadType.Response,version:t.PayloadVersion.Version1,isValid:!1,errors:["Response payload too short (minimum 4 bytes: dest + source + MAC)"],destinationHash:"",sourceHash:"",cipherMac:"",ciphertext:"",ciphertextLength:0};return r!=null&&r.includeSegments&&(b.segments=[{name:"Invalid Response Data",description:"Response payload too short (minimum 4 bytes required)",startByte:r.segmentOffset||0,endByte:(r.segmentOffset||0)+n.length-1,value:(0,o.bytesToHex)(n)}]),b}const a=[],e=(r==null?void 0:r.segmentOffset)||0;let A=0;const s=(0,o.byteToHex)(n[A]);r!=null&&r.includeSegments&&a.push({name:"Destination Hash",description:"First byte of destination node public key",startByte:e+A,endByte:e+A,value:s}),A+=1;const i=(0,o.byteToHex)(n[A]);r!=null&&r.includeSegments&&a.push({name:"Source Hash",description:"First byte of source node public key",startByte:e+A,endByte:e+A,value:i}),A+=1;const u=(0,o.bytesToHex)(n.subarray(A,A+2));r!=null&&r.includeSegments&&a.push({name:"Cipher MAC",description:"MAC for encrypted data in next field",startByte:e+A,endByte:e+A+1,value:u}),A+=2;const f=(0,o.bytesToHex)(n.subarray(A));r!=null&&r.includeSegments&&n.length>A&&a.push({name:"Ciphertext",description:"Encrypted response data (tag + content)",startByte:e+A,endByte:e+n.length-1,value:f});const y={type:t.PayloadType.Response,version:t.PayloadVersion.Version1,isValid:!0,destinationHash:s,sourceHash:i,cipherMac:u,ciphertext:f,ciphertextLength:n.length-4};return r!=null&&r.includeSegments&&(y.segments=a),y}catch(a){return{type:t.PayloadType.Response,version:t.PayloadVersion.Version1,isValid:!1,errors:[a instanceof Error?a.message:"Failed to decode response payload"],destinationHash:"",sourceHash:"",cipherMac:"",ciphertext:"",ciphertextLength:0}}}}return je.ResponsePayloadDecoder=c,je}var We={},Ut;function _r(){if(Ut)return We;Ut=1,Object.defineProperty(We,"__esModule",{value:!0}),We.AnonRequestPayloadDecoder=void 0;const t=ve(),o=oe();class c{static decode(n,r){try{if(n.length<35){const b={type:t.PayloadType.AnonRequest,version:t.PayloadVersion.Version1,isValid:!1,errors:["AnonRequest payload too short (minimum 35 bytes: dest + public key + MAC)"],destinationHash:"",senderPublicKey:"",cipherMac:"",ciphertext:"",ciphertextLength:0};return r!=null&&r.includeSegments&&(b.segments=[{name:"Invalid AnonRequest Data",description:"AnonRequest payload too short (minimum 35 bytes required: 1 for dest hash + 32 for public key + 2 for MAC)",startByte:r.segmentOffset||0,endByte:(r.segmentOffset||0)+n.length-1,value:(0,o.bytesToHex)(n)}]),b}const a=[],e=(r==null?void 0:r.segmentOffset)||0;let A=0;const s=(0,o.byteToHex)(n[0]);r!=null&&r.includeSegments&&a.push({name:"Destination Hash",description:`First byte of destination node public key: 0x${s}`,startByte:e+A,endByte:e+A,value:s}),A+=1;const i=(0,o.bytesToHex)(n.subarray(1,33));r!=null&&r.includeSegments&&a.push({name:"Sender Public Key",description:"Ed25519 public key of the sender (32 bytes)",startByte:e+A,endByte:e+A+31,value:i}),A+=32;const u=(0,o.bytesToHex)(n.subarray(33,35));r!=null&&r.includeSegments&&a.push({name:"Cipher MAC",description:"MAC for encrypted data verification (2 bytes)",startByte:e+A,endByte:e+A+1,value:u}),A+=2;const f=(0,o.bytesToHex)(n.subarray(35));r!=null&&r.includeSegments&&n.length>35&&a.push({name:"Ciphertext",description:`Encrypted message data (${n.length-35} bytes). Contains encrypted plaintext with this structure:
@@ -709,4 +709,4 @@ fn main(@builtin(global_invocation_id) global_id: vec3<u32>) {
`),this.noSleepTimer=window.setInterval(()=>{document.hidden||(window.location.href=window.location.href.split("#")[0],window.setTimeout(window.stop,0))},15e3),this.enabled=!0,Promise.resolve()):this.noSleepVideo.play().then(e=>(this.enabled=!0,e)).catch(e=>{throw this.enabled=!1,e})}disable(){l()?(this._wakeLock&&this._wakeLock.release(),this._wakeLock=null):c()?this.noSleepTimer&&(console.warn(`
NoSleep now disabled for older iOS devices.
`),window.clearInterval(this.noSleepTimer),this.noSleepTimer=null):this.noSleepVideo.pause(),this.enabled=!1}}return mt=n,mt}var Kr=Zr();const Xr=nt(Kr);function Jr({packets:t,channels:o,onChannelCreate:c,onRunningChange:l,visible:n=!1}){const[r,a]=H.useState(!1),[e,A]=H.useState(6),[s,i]=H.useState(!1),[u,f]=H.useState(!0),[y,b]=H.useState(!1),[S,h]=H.useState(!1),[d,x]=H.useState(null),[g,w]=H.useState(new Map),[m,E]=H.useState([]),[T,C]=H.useState(!1),[I,F]=H.useState(null),[ce,D]=H.useState(null),[$,J]=H.useState(0),ae=H.useRef(null),le=H.useRef(null),Q=H.useRef(!1),he=H.useRef(!1),L=H.useRef(!1),Z=H.useRef(new Map),ye=H.useRef(!1),Be=H.useRef(6),Te=H.useRef(!0),v=H.useRef(!1),ee=H.useRef(!1),ge=H.useRef(new Set),R=H.useRef(new Set),P=H.useRef(new Set);H.useEffect(()=>{const _=new jr;ae.current=_,F(_.isGpuAvailable());const V=new Xr;return le.current=V,()=>{_.destroy(),ae.current=null,V.disable(),le.current=null}},[]),H.useEffect(()=>{!n||T||fr(async()=>{const{ENGLISH_WORDLIST:_}=await import("./wordlist-BtmChKSf.js");return{ENGLISH_WORDLIST:_}},[]).then(({ENGLISH_WORDLIST:_})=>{ae.current&&(ae.current.setWordlist(_),C(!0))}).catch(_=>{console.error("Failed to load wordlist:",_),dt.error("Failed to load wordlist",{description:"Cracking will not be available"})})},[n,T]),H.useEffect(()=>{const _=()=>{Ct.getUndecryptedPacketCount().then(({count:U})=>D(U)).catch(()=>D(null))};_();const V=setInterval(_,36e5);return()=>clearInterval(V)},[]);const O=H.useMemo(()=>new Set(o.map(_=>_.key.toUpperCase())),[o]);H.useEffect(()=>{P.current=O},[O]);const G=t.filter(_=>_.payload_type==="GROUP_TEXT"&&!_.decrypted);H.useEffect(()=>{let _=0;w(V=>{const U=new Map(V);let me=!1;for(const de of G)if(!U.has(de.id)){const se=gr(de.data);if(se&&R.current.has(se)){_++;continue}se&&R.current.add(se),U.set(de.id,{packet:de,attempts:0,lastAttemptLength:0,status:"pending"}),me=!0}return me?(Z.current=U,U):V}),_>0&&J(V=>V+_)},[G.length]),H.useEffect(()=>{Z.current=g},[g]),H.useEffect(()=>{ye.current=s},[s]),H.useEffect(()=>{Be.current=e},[e]),H.useEffect(()=>{Te.current=u},[u]),H.useEffect(()=>{v.current=y},[y]),H.useEffect(()=>{ee.current=S},[S]),H.useEffect(()=>{ge.current=new Set(G.map(_=>_.id))},[G]),H.useEffect(()=>{l==null||l(r)},[r,l]);const re=Array.from(g.values()).filter(_=>_.status==="pending").length,X=Array.from(g.values()).filter(_=>_.status==="cracked").length,pe=Array.from(g.values()).filter(_=>_.status==="failed").length,ue=H.useCallback(async()=>{if(L.current||!ae.current||!Q.current)return;const _=Z.current;let V=null,U=null;for(const[Y,j]of _.entries())if(j.status==="pending"){V=j,U=Y;break}if(!V&&ye.current){const Y=Array.from(_.entries()).filter(([,j])=>j.status==="failed"&&j.lastAttemptLength<10);Y.length>0&&(Y.sort((j,ne)=>j[1].lastAttemptLength-ne[1].lastAttemptLength),[U,V]=Y[0])}if(!V||U===null){Q.current&&setTimeout(()=>ue(),1e3);return}if(!ge.current.has(U)){w(Y=>{const j=new Map(Y);return j.delete(U),j}),Q.current&&setTimeout(()=>ue(),10);return}L.current=!0;const me=Be.current,de=V.lastAttemptLength>0,se=de?V.lastAttemptLength+1:me;try{const Y=await ae.current.crack(V.packet.data,{maxLength:se,useSenderFilter:!0,useTimestampFilter:!0,useUtf8Filter:!0,useTwoWordCombinations:ee.current,...v.current&&{gpuDispatchMs:1e4},...de&&{useDictionary:!1,useTwoWordCombinations:!1,startingLength:se}},j=>{x(j)});if(he.current){he.current=!1,L.current=!1,x(null);return}if(Y.found&&Y.roomName&&Y.key){w(q=>{const we=new Map(q),Ce=we.get(U);return Ce&&we.set(U,{...Ce,status:"cracked",attempts:Ce.attempts+1,lastAttemptLength:se}),we});const j={roomName:Y.roomName,key:Y.key,packetId:U,message:Y.decryptedMessage||"",crackedAt:Date.now()};E(q=>[...q,j]);const ne=Y.key.toUpperCase();if(!P.current.has(ne))try{const q="#"+Y.roomName;await c(q,Y.key),Te.current&&await Ct.decryptHistoricalPackets({key_type:"channel",channel_name:q})}catch(q){console.error("Failed to create channel or decrypt historical:",q),dt.error("Failed to save cracked channel",{description:q instanceof Error?q.message:"Channel discovered but could not be saved"})}}else w(j=>{const ne=new Map(j),q=ne.get(U);return q&&ne.set(U,{...q,status:"failed",attempts:q.attempts+1,lastAttemptLength:se}),ne})}catch(Y){console.error("Cracking error:",Y),w(j=>{const ne=new Map(j),q=ne.get(U);return q&&ne.set(U,{...q,status:"failed",attempts:q.attempts+1,lastAttemptLength:se}),ne})}L.current=!1,x(null),Q.current&&setTimeout(()=>ue(),100)},[c]),Ae=()=>{var _;if(!I){dt.error("WebGPU not available",{description:"Cracking requires Chrome 113+ or Edge 113+ with WebGPU support."});return}a(!0),Q.current=!0,he.current=!1,(_=le.current)==null||_.enable(),ue()},fe=()=>{var _,V;a(!1),Q.current=!1,he.current=!0,(_=ae.current)==null||_.abort(),(V=le.current)==null||V.disable()};return M.jsxs("div",{className:"flex flex-col h-full p-3 gap-3 bg-background border-t border-border overflow-auto",children:[M.jsxs("div",{className:"flex items-center gap-3 flex-wrap",children:[M.jsxs("d Line truncated
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OAAQA,EAAO,CACX,KAAKP,EAAQ,eAAe,gBAAiB,MAAO,wBACpD,KAAKA,EAAQ,eAAe,iBAAkB,MAAO,yBACrD,QAAS,MAAO,cAAcO,EAAQ,SAAS,EAAE,CAAC,GAC1D,CACA,iECxFA,OAAO,eAAeC,GAAS,aAAc,CAAE,MAAO,GAAM,EAC5DA,GAAA,cAAwB,OACxB,MAAMC,EAAcR,GAAA,EACdS,EAAQC,GAAA,EACd,MAAMC,CAAc,CAMhB,OAAO,wBAAwBC,EAAYC,EAAWC,EAAY,CAC9D,GAAI,CAEA,MAAMC,KAAmBN,EAAM,YAAYK,CAAU,EAC/CE,KAAeP,EAAM,YAAYI,CAAS,EAE1CI,EAAgB,IAAI,WAAW,EAAE,EACvCA,EAAc,IAAIF,EAAc,CAAC,EAEjC,MAAMG,KAAoBV,EAAY,YAAYA,EAAY,IAAI,IAAI,MAAMI,CAAU,EAAGJ,EAAY,IAAI,IAAI,SAAUC,EAAM,YAAYQ,CAAa,CAAC,CAAC,EAElJE,KADyBV,EAAM,YAAYS,EAAc,SAASV,EAAY,IAAI,GAAG,CAAC,EAC7C,MAAM,EAAG,CAAC,EACzD,GAAIW,EAAoB,CAAC,IAAMH,EAAS,CAAC,GAAKG,EAAoB,CAAC,IAAMH,EAAS,CAAC,EAC/E,MAAO,CAAE,QAAS,GAAO,MAAO,yBAAyB,EAG7D,MAAMI,EAAWZ,EAAY,IALine truncated
@@ -1,2 +1,2 @@
import{r as u,D as j,j as e,U as y,m as N}from"./index-BUPp0i0i.js";import{M as w,T as _}from"./leaflet-Nkpzzebg.js";import{C as k,P as C}from"./Popup-_4Won2BS.js";import{u as M}from"./hooks-fCOseuFw.js";const i={recent:"#06b6d4",today:"#2563eb",stale:"#f59e0b",old:"#64748b"},R="#0f172a",p="#f8fafc";function E(a){if(a==null)return i.old;const l=Date.now()/1e3-a,n=3600,t=86400;return l<n?i.recent:l<t?i.today:l<3*t?i.stale:i.old}function v({contacts:a,focusedContact:r}){const l=M(),[n,t]=u.useState(!1);return u.useEffect(()=>{if(r&&r.lat!=null&&r.lon!=null){l.setView([r.lat,r.lon],12),t(!0);return}if(n)return;const c=()=>{if(a.length===0){l.setView([20,0],2),t(!0);return}if(a.length===1){l.setView([a[0].lat,a[0].lon],10),t(!0);return}const d=a.map(m=>[m.lat,m.lon]);l.fitBounds(d,{padding:[50,50],maxZoom:12}),t(!0)};"geolocation"in navigator?navigator.geolocation.getCurrentPosition(d=>{l.setView([d.coords.latitude,d.coords.longitude],8),t(!0)},()=>{c()},{timeout:5e3,maximumAge:3e5}):c()},[l,a,n,r]),null}function V({contacts:a,focusedKey:r}){const[l]=u.useState(()=>Date.now()/1e3-604800),n=u.useMemo(()=>a.filter(s=>j(s.lat,s.lon)&&(s.public_key===r||s.last_seen!=null&&s.last_seen>l)),[a,r,l]),t=u.useMemo(()=>r&&n.find(s=>s.public_key===r)||null,[r,n]),c=t!=null&&(t.last_seen==null||t.last_seen<=l),d=u.useRef({}),m=u.useCallback((s,o)=>{d.current[s]=o},[]);return u.useEffect(()=>{if(t&&d.current[t.public_key]){const s=setTimeout(()=>{var o;(o=d.current[t.public_key])==null||o.openPopup()},100);return()=>clearTimeout(s)}},[t]),e.jsxs("div",{className:"flex flex-col h-full",children:[e.jsxs("div",{className:"px-4 py-2 bg-muted/50 text-xs text-muted-foreground flex items-center justify-between",children:[e.jsxs("span",{children:["Showing ",n.length," contact",n.length!==1?"s":""," heard in the last 7 days",c?" plus the focused contact":""]}),e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsxs("span",{className:"flex items-center gap-1",children:[e.jsx("span",{className:"w-3 h-3 rounded-full",style:{backgroundColor:i.recent},"aria-hidden":"true"})," ","<1h"]}),e.jsxs("span",{className:"flex items-center gap-1",children:[e.jsx("span",{className:"w-3 h-3 rounded-full",style:{backgroundColor:i.today},"aria-hidden":"true"})," ","<1d"]}),e.jsxs("span",{className:"flex items-center gap-1",children:[e.jsx("span",{className:"w-3 h-3 rounded-full",style:{backgroundColor:i.stale},"aria-hidden":"true"})," ","<3d"]}),e.jsxs("span",{className:"flex items-center gap-1",children:[e.jsx("span",{className:"w-3 h-3 rounded-full",style:{backgroundColor:i.old},"aria-hidden":"true"})," ","older"]}),e.jsxs("span",{className:"flex items-center gap-1",children:[e.jsx("span",{className:"w-3 h-3 rounded-full border-2",style:{borderColor:p,backgroundColor:i.today},"aria-hidden":"true"})," ","repeater"]})]})]}),e.jsx("div",{className:"flex-1 relative",style:{zIndex:0},role:"img","aria-label":"Map showing mesh node locations",children:e.jsxs(w,{center:[20,0],zoom:2,className:"h-full w-full",style:{background:"#1a1a2e"},children:[e.jsx(_,{attribution:'© <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a>',url:"https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png"}),e.jsx(v,{contacts:n,focusedContact:t}),n.map(s=>{const o=s.type===y,x=E(s.last_seen),f=s.name||s.public_key.slice(0,12),h=s.last_seen!=null?N(s.last_seen):"Never heard by this server",g=o?10:7;return e.jsx(u.Fragment,{children:e.jsx(k,{ref:b=>m(s.public_key,b),center:[s.lat,s.lon],radius:g,pathOptions:{color:o?p:R,fillColor:x,fillOpacity:.9,weight:o?3:2},children:e.jsx(C,{children:e.jsxs("div",{className:"text-sm",children:[e.jsxs("div",{className:"font-medium flex items-center gap-1",children:[o&&e.jsx("span",{title:"Repeater","aria-hidden":"true",children:"🛜"}),f]}),e.jsxs("div",{className:"text-xs text-gray-500 mt-1",children:["Last heard: ",h]}),e.jsxs("div",{className:"text-xs text-gray-400 mt-1 font-mono",children:[s.lat.toFixed(5),", ",s.lon.toFixed(5)]})]})})},s.public_key)},s.public_key)})]})})]})}export{V as MapView};
//# sourceMappingURL=MapView-8l-XCyfo.js.map
import{r as u,D as j,j as e,U as y,m as N}from"./index-C_33NHxn.js";import{M as w,T as _}from"./leaflet-DNHXPpW7.js";import{C as k,P as C}from"./Popup-BcLg2SsA.js";import{u as M}from"./hooks-BmAJqTPK.js";const i={recent:"#06b6d4",today:"#2563eb",stale:"#f59e0b",old:"#64748b"},R="#0f172a",p="#f8fafc";function E(a){if(a==null)return i.old;const l=Date.now()/1e3-a,n=3600,t=86400;return l<n?i.recent:l<t?i.today:l<3*t?i.stale:i.old}function v({contacts:a,focusedContact:r}){const l=M(),[n,t]=u.useState(!1);return u.useEffect(()=>{if(r&&r.lat!=null&&r.lon!=null){l.setView([r.lat,r.lon],12),t(!0);return}if(n)return;const c=()=>{if(a.length===0){l.setView([20,0],2),t(!0);return}if(a.length===1){l.setView([a[0].lat,a[0].lon],10),t(!0);return}const d=a.map(m=>[m.lat,m.lon]);l.fitBounds(d,{padding:[50,50],maxZoom:12}),t(!0)};"geolocation"in navigator?navigator.geolocation.getCurrentPosition(d=>{l.setView([d.coords.latitude,d.coords.longitude],8),t(!0)},()=>{c()},{timeout:5e3,maximumAge:3e5}):c()},[l,a,n,r]),null}function V({contacts:a,focusedKey:r}){const[l]=u.useState(()=>Date.now()/1e3-604800),n=u.useMemo(()=>a.filter(s=>j(s.lat,s.lon)&&(s.public_key===r||s.last_seen!=null&&s.last_seen>l)),[a,r,l]),t=u.useMemo(()=>r&&n.find(s=>s.public_key===r)||null,[r,n]),c=t!=null&&(t.last_seen==null||t.last_seen<=l),d=u.useRef({}),m=u.useCallback((s,o)=>{d.current[s]=o},[]);return u.useEffect(()=>{if(t&&d.current[t.public_key]){const s=setTimeout(()=>{var o;(o=d.current[t.public_key])==null||o.openPopup()},100);return()=>clearTimeout(s)}},[t]),e.jsxs("div",{className:"flex flex-col h-full",children:[e.jsxs("div",{className:"px-4 py-2 bg-muted/50 text-xs text-muted-foreground flex items-center justify-between",children:[e.jsxs("span",{children:["Showing ",n.length," contact",n.length!==1?"s":""," heard in the last 7 days",c?" plus the focused contact":""]}),e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsxs("span",{className:"flex items-center gap-1",children:[e.jsx("span",{className:"w-3 h-3 rounded-full",style:{backgroundColor:i.recent},"aria-hidden":"true"})," ","<1h"]}),e.jsxs("span",{className:"flex items-center gap-1",children:[e.jsx("span",{className:"w-3 h-3 rounded-full",style:{backgroundColor:i.today},"aria-hidden":"true"})," ","<1d"]}),e.jsxs("span",{className:"flex items-center gap-1",children:[e.jsx("span",{className:"w-3 h-3 rounded-full",style:{backgroundColor:i.stale},"aria-hidden":"true"})," ","<3d"]}),e.jsxs("span",{className:"flex items-center gap-1",children:[e.jsx("span",{className:"w-3 h-3 rounded-full",style:{backgroundColor:i.old},"aria-hidden":"true"})," ","older"]}),e.jsxs("span",{className:"flex items-center gap-1",children:[e.jsx("span",{className:"w-3 h-3 rounded-full border-2",style:{borderColor:p,backgroundColor:i.today},"aria-hidden":"true"})," ","repeater"]})]})]}),e.jsx("div",{className:"flex-1 relative",style:{zIndex:0},role:"img","aria-label":"Map showing mesh node locations",children:e.jsxs(w,{center:[20,0],zoom:2,className:"h-full w-full",style:{background:"#1a1a2e"},children:[e.jsx(_,{attribution:'© <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a>',url:"https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png"}),e.jsx(v,{contacts:n,focusedContact:t}),n.map(s=>{const o=s.type===y,x=E(s.last_seen),f=s.name||s.public_key.slice(0,12),h=s.last_seen!=null?N(s.last_seen):"Never heard by this server",g=o?10:7;return e.jsx(u.Fragment,{children:e.jsx(k,{ref:b=>m(s.public_key,b),center:[s.lat,s.lon],radius:g,pathOptions:{color:o?p:R,fillColor:x,fillOpacity:.9,weight:o?3:2},children:e.jsx(C,{children:e.jsxs("div",{className:"text-sm",children:[e.jsxs("div",{className:"font-medium flex items-center gap-1",children:[o&&e.jsx("span",{title:"Repeater","aria-hidden":"true",children:"🛜"}),f]}),e.jsxs("div",{className:"text-xs text-gray-500 mt-1",children:["Last heard: ",h]}),e.jsxs("div",{className:"text-xs text-gray-400 mt-1 font-mono",children:[s.lat.toFixed(5),", ",s.lon.toFixed(5)]})]})})},s.public_key)},s.public_key)})]})})]})}export{V as MapView};
//# sourceMappingURL=MapView-B_EeV5Ur.js.map
@@ -1 +1 @@
{"version":3,"file":"MapView-8l-XCyfo.js","sources":["../../src/components/MapView.tsx"],"sourcesContent":["import { Fragment, useEffect, useState, useMemo, useRef, useCallback } from 'react';\nimport { MapContainer, TileLayer, CircleMarker, Popup, useMap } from 'react-leaflet';\nimport type { LatLngBoundsExpression, CircleMarker as LeafletCircleMarker } from 'leaflet';\nimport 'leaflet/dist/leaflet.css';\nimport type { Contact } from '../types';\nimport { formatTime } from '../utils/messageParser';\nimport { isValidLocation } from '../utils/pathUtils';\nimport { CONTACT_TYPE_REPEATER } from '../types';\n\ninterface MapViewProps {\n contacts: Contact[];\n /** Public key of contact to focus on and open popup */\n focusedKey?: string | null;\n}\n\nconst MAP_RECENCY_COLORS = {\n recent: '#06b6d4',\n today: '#2563eb',\n stale: '#f59e0b',\n old: '#64748b',\n} as const;\nconst MAP_MARKER_STROKE = '#0f172a';\nconst MAP_REPEATER_RING = '#f8fafc';\n\n// Calculate marker color based on how recently the contact was heard\nfunction getMarkerColor(lastSeen: number | null | undefined): string {\n if (lastSeen == null) return MAP_RECENCY_COLORS.old;\n const now = Date.now() / 1000;\n const age = now - lastSeen;\n const hour = 3600;\n const day = 86400;\n\n if (age < hour) return MAP_RECENCY_COLORS.recent;\n if (age < day) return MAP_RECENCY_COLORS.today;\n if (age < 3 * day) return MAP_RECENCY_COLORS.stale;\n return MAP_RECENCY_COLORS.old;\n}\n\n// Component to handle map bounds fitting\nfunction MapBoundsHandler({\n contacts,\n focusedContact,\n}: {\n contacts: Contact[];\n focusedContact: Contact | null;\n}) {\n const map = useMap();\n const [hasInitialized, setHasInitialized] = useState(false);\n\n useEffect(() => {\n // If we have a focused contact, center on it immediately (even if already initialized)\n if (focusedContact && focusedContact.lat != null && focusedContact.lon != null) {\n map.setView([focusedContact.lat, focusedContact.lon], 12);\n setHasInitialized(true);\n return;\n }\n\n if (hasInitialized) return;\n\n const fitToContacts = () => {\n if (contacts.length === 0) {\n // No contacts with location - show world view\n map.setView([20, 0], 2);\n setHasInitialized(true);\n return;\n }\n\n if (contacts.length === 1) {\n // Single contact - center on it\n map.setView([contacts[0].lat!, contacts[0].lon!], 10);\n setHasInitialized(true);\n return;\n }\n\n // Multiple contacts - fit bounds\n const bounds: LatLngBoundsExpression = contacts.map(\n (c) => [c.lat!, c.lon!] as [number, number]\n );\n map.fitBounds(bounds, { padding: [50, 50], maxZoom: 12 });\n setHasInitialized(true);\n };\n\n // Try geolocation first\n if ('geolocation' in navigator) {\n navigator.geolocation.getCurrentPosition(\n (position) => {\n // Success - center on user location with reasonable zoom\n map.setView([position.coords.latitude, position.coords.longitude], 8);\n setHasInitialized(true);\n },\n () => {\n // Geolocation denied/failed - fit to contacts\n fitToContacts();\n },\n { timeout: 5000, maximumAge: 300000 }\n );\n } else {\n // No geolocation support - fit to contacts\n fitToContacts();\n }\n }, [map, contacts, hasInitialized, focusedContact]);\n\n return null;\n}\n\nexport function MapView({ contacts, focusedKey }: MapViewProps) {\n const [sevenDaysAgo] = useState(() => Date.now() / 1000 - 7 * 24 * 60 * 60);\n\n // Filter to contacts with GPS coordinates, heard within the last 7 days.\n // Always include the focused contact so \"view on map\" links work for older nodes.\n const mappableContacts = useMemo(() => {\n return contacts.filter(\n (c) =>\n isValidLocation(c.lat, c.lon) &&\n (c.public_key === focusedKey || (c.last_seen != null && c.last_seen > sevenDaysAgo))\n );\n }, [contacts, focusedKey, sevenDaysAgo]);\n\n // Find the focused contact by key\n const focusedContact = useMemo(() => {\n if (!focusedKey) return null;\n return mappableContacts.find((c) => c.public_key === focusedKey) || null;\n }, [focusedKey, mappableContacts]);\n\n const includesFocusedOutsideWindow =\n focusedContact != null &&\n (focusedContact.last_seen == null || focusedContact.last_seen <= sevenDaysAgo);\n\n // Track marker refs to open popup programmatically\n const markerRefs = useRef<Record<string, LeafletCircleMarker | null>>({});\n\n // Store ref for a marker\n const setMarkerRef = useCallback((key: string, ref: LeafletCircleMarker | null) => {\n markerRefs.current[key] = ref;\n }, []);\n\n // Open popup for focused contact after map is ready\n useEffect(() => {\n if (focusedContact && markerRefs.current[focusedContact.public_key]) {\n // Small delay to ensure map has finished rendering\n const timer Line truncated
{"version":3,"file":"MapView-B_EeV5Ur.js","sources":["../../src/components/MapView.tsx"],"sourcesContent":["import { Fragment, useEffect, useState, useMemo, useRef, useCallback } from 'react';\nimport { MapContainer, TileLayer, CircleMarker, Popup, useMap } from 'react-leaflet';\nimport type { LatLngBoundsExpression, CircleMarker as LeafletCircleMarker } from 'leaflet';\nimport 'leaflet/dist/leaflet.css';\nimport type { Contact } from '../types';\nimport { formatTime } from '../utils/messageParser';\nimport { isValidLocation } from '../utils/pathUtils';\nimport { CONTACT_TYPE_REPEATER } from '../types';\n\ninterface MapViewProps {\n contacts: Contact[];\n /** Public key of contact to focus on and open popup */\n focusedKey?: string | null;\n}\n\nconst MAP_RECENCY_COLORS = {\n recent: '#06b6d4',\n today: '#2563eb',\n stale: '#f59e0b',\n old: '#64748b',\n} as const;\nconst MAP_MARKER_STROKE = '#0f172a';\nconst MAP_REPEATER_RING = '#f8fafc';\n\n// Calculate marker color based on how recently the contact was heard\nfunction getMarkerColor(lastSeen: number | null | undefined): string {\n if (lastSeen == null) return MAP_RECENCY_COLORS.old;\n const now = Date.now() / 1000;\n const age = now - lastSeen;\n const hour = 3600;\n const day = 86400;\n\n if (age < hour) return MAP_RECENCY_COLORS.recent;\n if (age < day) return MAP_RECENCY_COLORS.today;\n if (age < 3 * day) return MAP_RECENCY_COLORS.stale;\n return MAP_RECENCY_COLORS.old;\n}\n\n// Component to handle map bounds fitting\nfunction MapBoundsHandler({\n contacts,\n focusedContact,\n}: {\n contacts: Contact[];\n focusedContact: Contact | null;\n}) {\n const map = useMap();\n const [hasInitialized, setHasInitialized] = useState(false);\n\n useEffect(() => {\n // If we have a focused contact, center on it immediately (even if already initialized)\n if (focusedContact && focusedContact.lat != null && focusedContact.lon != null) {\n map.setView([focusedContact.lat, focusedContact.lon], 12);\n setHasInitialized(true);\n return;\n }\n\n if (hasInitialized) return;\n\n const fitToContacts = () => {\n if (contacts.length === 0) {\n // No contacts with location - show world view\n map.setView([20, 0], 2);\n setHasInitialized(true);\n return;\n }\n\n if (contacts.length === 1) {\n // Single contact - center on it\n map.setView([contacts[0].lat!, contacts[0].lon!], 10);\n setHasInitialized(true);\n return;\n }\n\n // Multiple contacts - fit bounds\n const bounds: LatLngBoundsExpression = contacts.map(\n (c) => [c.lat!, c.lon!] as [number, number]\n );\n map.fitBounds(bounds, { padding: [50, 50], maxZoom: 12 });\n setHasInitialized(true);\n };\n\n // Try geolocation first\n if ('geolocation' in navigator) {\n navigator.geolocation.getCurrentPosition(\n (position) => {\n // Success - center on user location with reasonable zoom\n map.setView([position.coords.latitude, position.coords.longitude], 8);\n setHasInitialized(true);\n },\n () => {\n // Geolocation denied/failed - fit to contacts\n fitToContacts();\n },\n { timeout: 5000, maximumAge: 300000 }\n );\n } else {\n // No geolocation support - fit to contacts\n fitToContacts();\n }\n }, [map, contacts, hasInitialized, focusedContact]);\n\n return null;\n}\n\nexport function MapView({ contacts, focusedKey }: MapViewProps) {\n const [sevenDaysAgo] = useState(() => Date.now() / 1000 - 7 * 24 * 60 * 60);\n\n // Filter to contacts with GPS coordinates, heard within the last 7 days.\n // Always include the focused contact so \"view on map\" links work for older nodes.\n const mappableContacts = useMemo(() => {\n return contacts.filter(\n (c) =>\n isValidLocation(c.lat, c.lon) &&\n (c.public_key === focusedKey || (c.last_seen != null && c.last_seen > sevenDaysAgo))\n );\n }, [contacts, focusedKey, sevenDaysAgo]);\n\n // Find the focused contact by key\n const focusedContact = useMemo(() => {\n if (!focusedKey) return null;\n return mappableContacts.find((c) => c.public_key === focusedKey) || null;\n }, [focusedKey, mappableContacts]);\n\n const includesFocusedOutsideWindow =\n focusedContact != null &&\n (focusedContact.last_seen == null || focusedContact.last_seen <= sevenDaysAgo);\n\n // Track marker refs to open popup programmatically\n const markerRefs = useRef<Record<string, LeafletCircleMarker | null>>({});\n\n // Store ref for a marker\n const setMarkerRef = useCallback((key: string, ref: LeafletCircleMarker | null) => {\n markerRefs.current[key] = ref;\n }, []);\n\n // Open popup for focused contact after map is ready\n useEffect(() => {\n if (focusedContact && markerRefs.current[focusedContact.public_key]) {\n // Small delay to ensure map has finished rendering\n const timer Line truncated
@@ -1,2 +1,2 @@
import{j as l}from"./index-BUPp0i0i.js";import{d as m,l as u,a as f,e as d,M as x,T as y}from"./leaflet-Nkpzzebg.js";import{C as p,P as c}from"./Popup-_4Won2BS.js";const g=m(function({positions:n,...t},o){const s=new u.Polyline(n,t);return f(s,d(o,{overlayContainer:s}))},function(n,t,o){t.positions!==o.positions&&n.setLatLngs(t.positions)});function C({neighbors:i,radioLat:n,radioLon:t,radioName:o}){const s=i.filter(e=>e.lat!=null&&e.lon!=null),r=n!=null&&t!=null&&!(n===0&&t===0);if(s.length===0&&!r)return null;const h=r?[n,t]:[s[0].lat,s[0].lon];return l.jsx("div",{className:"min-h-48 flex-1 rounded border border-border overflow-hidden",role:"img","aria-label":"Map showing repeater neighbor locations",children:l.jsxs(x,{center:h,zoom:10,className:"h-full w-full",style:{background:"#1a1a2e"},children:[l.jsx(y,{attribution:'© <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a>',url:"https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png"}),r&&s.map((e,a)=>l.jsx(g,{positions:[[n,t],[e.lat,e.lon]],pathOptions:{color:"#3b82f6",weight:1.5,opacity:.5,dashArray:"6 4"}},`line-${a}`)),r&&l.jsx(p,{center:[n,t],radius:8,pathOptions:{color:"#1d4ed8",fillColor:"#3b82f6",fillOpacity:1,weight:2},children:l.jsx(c,{children:l.jsx("span",{className:"text-sm font-medium",children:o||"Our Radio"})})}),s.map((e,a)=>l.jsx(p,{center:[e.lat,e.lon],radius:6,pathOptions:{color:"#000",fillColor:e.snr>=6?"#22c55e":e.snr>=0?"#eab308":"#ef4444",fillOpacity:.8,weight:1},children:l.jsx(c,{children:l.jsx("span",{className:"text-sm",children:e.name||e.pubkey_prefix})})},a))]})})}export{C as NeighborsMiniMap};
//# sourceMappingURL=NeighborsMiniMap-CI9vDONH.js.map
import{j as l}from"./index-C_33NHxn.js";import{d as m,l as u,a as f,e as d,M as x,T as y}from"./leaflet-DNHXPpW7.js";import{C as p,P as c}from"./Popup-BcLg2SsA.js";const g=m(function({positions:n,...t},o){const s=new u.Polyline(n,t);return f(s,d(o,{overlayContainer:s}))},function(n,t,o){t.positions!==o.positions&&n.setLatLngs(t.positions)});function C({neighbors:i,radioLat:n,radioLon:t,radioName:o}){const s=i.filter(e=>e.lat!=null&&e.lon!=null),r=n!=null&&t!=null&&!(n===0&&t===0);if(s.length===0&&!r)return null;const h=r?[n,t]:[s[0].lat,s[0].lon];return l.jsx("div",{className:"min-h-48 flex-1 rounded border border-border overflow-hidden",role:"img","aria-label":"Map showing repeater neighbor locations",children:l.jsxs(x,{center:h,zoom:10,className:"h-full w-full",style:{background:"#1a1a2e"},children:[l.jsx(y,{attribution:'© <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a>',url:"https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png"}),r&&s.map((e,a)=>l.jsx(g,{positions:[[n,t],[e.lat,e.lon]],pathOptions:{color:"#3b82f6",weight:1.5,opacity:.5,dashArray:"6 4"}},`line-${a}`)),r&&l.jsx(p,{center:[n,t],radius:8,pathOptions:{color:"#1d4ed8",fillColor:"#3b82f6",fillOpacity:1,weight:2},children:l.jsx(c,{children:l.jsx("span",{className:"text-sm font-medium",children:o||"Our Radio"})})}),s.map((e,a)=>l.jsx(p,{center:[e.lat,e.lon],radius:6,pathOptions:{color:"#000",fillColor:e.snr>=6?"#22c55e":e.snr>=0?"#eab308":"#ef4444",fillOpacity:.8,weight:1},children:l.jsx(c,{children:l.jsx("span",{className:"text-sm",children:e.name||e.pubkey_prefix})})},a))]})})}export{C as NeighborsMiniMap};
//# sourceMappingURL=NeighborsMiniMap-CsH85D0E.js.map
@@ -1 +1 @@
{"version":3,"file":"NeighborsMiniMap-CI9vDONH.js","sources":["../../node_modules/react-leaflet/lib/Polyline.js","../../src/components/NeighborsMiniMap.tsx"],"sourcesContent":["import { createElementObject, createPathComponent, extendContext } from '@react-leaflet/core';\nimport { Polyline as LeafletPolyline } from 'leaflet';\nexport const Polyline = createPathComponent(function createPolyline({ positions , ...options }, ctx) {\n const polyline = new LeafletPolyline(positions, options);\n return createElementObject(polyline, extendContext(ctx, {\n overlayContainer: polyline\n }));\n}, function updatePolyline(layer, props, prevProps) {\n if (props.positions !== prevProps.positions) {\n layer.setLatLngs(props.positions);\n }\n});\n","import { MapContainer, TileLayer, CircleMarker, Popup, Polyline } from 'react-leaflet';\nimport 'leaflet/dist/leaflet.css';\n\ninterface Neighbor {\n lat: number | null;\n lon: number | null;\n name: string | null;\n pubkey_prefix: string;\n snr: number;\n}\n\ninterface Props {\n neighbors: Neighbor[];\n radioLat?: number | null;\n radioLon?: number | null;\n radioName?: string | null;\n}\n\nexport function NeighborsMiniMap({ neighbors, radioLat, radioLon, radioName }: Props) {\n const valid = neighbors.filter(\n (n): n is Neighbor & { lat: number; lon: number } => n.lat != null && n.lon != null\n );\n\n const hasRadio = radioLat != null && radioLon != null && !(radioLat === 0 && radioLon === 0);\n\n if (valid.length === 0 && !hasRadio) return null;\n\n // Center on radio if available, otherwise first neighbor\n const center: [number, number] = hasRadio ? [radioLat!, radioLon!] : [valid[0].lat, valid[0].lon];\n\n return (\n <div\n className=\"min-h-48 flex-1 rounded border border-border overflow-hidden\"\n role=\"img\"\n aria-label=\"Map showing repeater neighbor locations\"\n >\n <MapContainer\n center={center}\n zoom={10}\n className=\"h-full w-full\"\n style={{ background: '#1a1a2e' }}\n >\n <TileLayer\n attribution='&copy; <a href=\"https://www.openstreetmap.org/copyright\">OpenStreetMap</a>'\n url=\"https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png\"\n />\n {/* Dotted lines from radio to each neighbor */}\n {hasRadio &&\n valid.map((n, i) => (\n <Polyline\n key={`line-${i}`}\n positions={[\n [radioLat!, radioLon!],\n [n.lat, n.lon],\n ]}\n pathOptions={{\n color: '#3b82f6',\n weight: 1.5,\n opacity: 0.5,\n dashArray: '6 4',\n }}\n />\n ))}\n {/* Radio node (bright blue) */}\n {hasRadio && (\n <CircleMarker\n center={[radioLat!, radioLon!]}\n radius={8}\n pathOptions={{\n color: '#1d4ed8',\n fillColor: '#3b82f6',\n fillOpacity: 1,\n weight: 2,\n }}\n >\n <Popup>\n <span className=\"text-sm font-medium\">{radioName || 'Our Radio'}</span>\n </Popup>\n </CircleMarker>\n )}\n {/* Neighbor nodes (SNR-colored) */}\n {valid.map((n, i) => (\n <CircleMarker\n key={i}\n center={[n.lat, n.lon]}\n radius={6}\n pathOptions={{\n color: '#000',\n fillColor: n.snr >= 6 ? '#22c55e' : n.snr >= 0 ? '#eab308' : '#ef4444',\n fillOpacity: 0.8,\n weight: 1,\n }}\n >\n <Popup>\n <span className=\"text-sm\">{n.name || n.pubkey_prefix}</span>\n </Popup>\n </CircleMarker>\n ))}\n </MapContainer>\n </div>\n );\n}\n"],"names":["Polyline","createPathComponent","positions","options","ctx","polyline","LeafletPolyline","createElementObject","extendContext","layer","props","prevProps","NeighborsMiniMap","neighbors","radioLat","radioLon","radioName","valid","n","hasRadio","center","jsx","jsxs","MapContainer","TileLayer","i","CircleMarker","Popup"],"mappings":"oKAEO,MAAMA,EAAWC,EAAoB,SAAwB,CAAE,UAAAC,EAAY,GAAGC,CAAO,EAAIC,EAAK,CACjG,MAAMC,EAAW,IAAIC,WAAgBJ,EAAWC,CAAO,EACvD,OAAOI,EAAoBF,EAAUG,EAAcJ,EAAK,CACpD,iBAAkBC,CAC1B,CAAK,CAAC,CACN,EAAG,SAAwBI,EAAOC,EAAOC,EAAW,CAC5CD,EAAM,YAAcC,EAAU,WAC9BF,EAAM,WAAWC,EAAM,SAAS,CAExC,CAAC,ECOM,SAASE,EAAiB,CAAE,UAAAC,EAAW,SAAAC,EAAU,SAAAC,EAAU,UAAAC,GAAoB,CACpF,MAAMC,EAAQJ,EAAU,OACrBK,GAAoDA,EAAE,KAAO,MAAQA,EAAE,KAAO,IAAA,EAG3EC,EAAWL,GAAY,MAAQC,GAAY,MAAQ,EAAED,IAAa,GAAKC,IAAa,GAE1F,GAAIE,EAAM,SAAW,GAAK,CAACE,EAAU,OAAO,KAG5C,MAAMC,EAA2BD,EAAW,CAACL,EAAWC,CAAS,EAAI,CAACE,EAAM,CAAC,EAAE,IAAKA,EAAM,CAAC,EAAE,GAAG,EAEhG,OACEI,EAAAA,IAAC,MAAA,CACC,UAAU,+DACV,KAAK,MACL,aAAW,0CAEX,SAAAC,EAAAA,KAACC,EAAA,CACC,OAAAH,EACA,KAAM,GACN,UAAU,gBACV,MAAO,CAAE,WAAY,SAAA,EAErB,SALine truncated
{"version":3,"file":"NeighborsMiniMap-CsH85D0E.js","sources":["../../node_modules/react-leaflet/lib/Polyline.js","../../src/components/NeighborsMiniMap.tsx"],"sourcesContent":["import { createElementObject, createPathComponent, extendContext } from '@react-leaflet/core';\nimport { Polyline as LeafletPolyline } from 'leaflet';\nexport const Polyline = createPathComponent(function createPolyline({ positions , ...options }, ctx) {\n const polyline = new LeafletPolyline(positions, options);\n return createElementObject(polyline, extendContext(ctx, {\n overlayContainer: polyline\n }));\n}, function updatePolyline(layer, props, prevProps) {\n if (props.positions !== prevProps.positions) {\n layer.setLatLngs(props.positions);\n }\n});\n","import { MapContainer, TileLayer, CircleMarker, Popup, Polyline } from 'react-leaflet';\nimport 'leaflet/dist/leaflet.css';\n\ninterface Neighbor {\n lat: number | null;\n lon: number | null;\n name: string | null;\n pubkey_prefix: string;\n snr: number;\n}\n\ninterface Props {\n neighbors: Neighbor[];\n radioLat?: number | null;\n radioLon?: number | null;\n radioName?: string | null;\n}\n\nexport function NeighborsMiniMap({ neighbors, radioLat, radioLon, radioName }: Props) {\n const valid = neighbors.filter(\n (n): n is Neighbor & { lat: number; lon: number } => n.lat != null && n.lon != null\n );\n\n const hasRadio = radioLat != null && radioLon != null && !(radioLat === 0 && radioLon === 0);\n\n if (valid.length === 0 && !hasRadio) return null;\n\n // Center on radio if available, otherwise first neighbor\n const center: [number, number] = hasRadio ? [radioLat!, radioLon!] : [valid[0].lat, valid[0].lon];\n\n return (\n <div\n className=\"min-h-48 flex-1 rounded border border-border overflow-hidden\"\n role=\"img\"\n aria-label=\"Map showing repeater neighbor locations\"\n >\n <MapContainer\n center={center}\n zoom={10}\n className=\"h-full w-full\"\n style={{ background: '#1a1a2e' }}\n >\n <TileLayer\n attribution='&copy; <a href=\"https://www.openstreetmap.org/copyright\">OpenStreetMap</a>'\n url=\"https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png\"\n />\n {/* Dotted lines from radio to each neighbor */}\n {hasRadio &&\n valid.map((n, i) => (\n <Polyline\n key={`line-${i}`}\n positions={[\n [radioLat!, radioLon!],\n [n.lat, n.lon],\n ]}\n pathOptions={{\n color: '#3b82f6',\n weight: 1.5,\n opacity: 0.5,\n dashArray: '6 4',\n }}\n />\n ))}\n {/* Radio node (bright blue) */}\n {hasRadio && (\n <CircleMarker\n center={[radioLat!, radioLon!]}\n radius={8}\n pathOptions={{\n color: '#1d4ed8',\n fillColor: '#3b82f6',\n fillOpacity: 1,\n weight: 2,\n }}\n >\n <Popup>\n <span className=\"text-sm font-medium\">{radioName || 'Our Radio'}</span>\n </Popup>\n </CircleMarker>\n )}\n {/* Neighbor nodes (SNR-colored) */}\n {valid.map((n, i) => (\n <CircleMarker\n key={i}\n center={[n.lat, n.lon]}\n radius={6}\n pathOptions={{\n color: '#000',\n fillColor: n.snr >= 6 ? '#22c55e' : n.snr >= 0 ? '#eab308' : '#ef4444',\n fillOpacity: 0.8,\n weight: 1,\n }}\n >\n <Popup>\n <span className=\"text-sm\">{n.name || n.pubkey_prefix}</span>\n </Popup>\n </CircleMarker>\n ))}\n </MapContainer>\n </div>\n );\n}\n"],"names":["Polyline","createPathComponent","positions","options","ctx","polyline","LeafletPolyline","createElementObject","extendContext","layer","props","prevProps","NeighborsMiniMap","neighbors","radioLat","radioLon","radioName","valid","n","hasRadio","center","jsx","jsxs","MapContainer","TileLayer","i","CircleMarker","Popup"],"mappings":"oKAEO,MAAMA,EAAWC,EAAoB,SAAwB,CAAE,UAAAC,EAAY,GAAGC,CAAO,EAAIC,EAAK,CACjG,MAAMC,EAAW,IAAIC,WAAgBJ,EAAWC,CAAO,EACvD,OAAOI,EAAoBF,EAAUG,EAAcJ,EAAK,CACpD,iBAAkBC,CAC1B,CAAK,CAAC,CACN,EAAG,SAAwBI,EAAOC,EAAOC,EAAW,CAC5CD,EAAM,YAAcC,EAAU,WAC9BF,EAAM,WAAWC,EAAM,SAAS,CAExC,CAAC,ECOM,SAASE,EAAiB,CAAE,UAAAC,EAAW,SAAAC,EAAU,SAAAC,EAAU,UAAAC,GAAoB,CACpF,MAAMC,EAAQJ,EAAU,OACrBK,GAAoDA,EAAE,KAAO,MAAQA,EAAE,KAAO,IAAA,EAG3EC,EAAWL,GAAY,MAAQC,GAAY,MAAQ,EAAED,IAAa,GAAKC,IAAa,GAE1F,GAAIE,EAAM,SAAW,GAAK,CAACE,EAAU,OAAO,KAG5C,MAAMC,EAA2BD,EAAW,CAACL,EAAWC,CAAS,EAAI,CAACE,EAAM,CAAC,EAAE,IAAKA,EAAM,CAAC,EAAE,GAAG,EAEhG,OACEI,EAAAA,IAAC,MAAA,CACC,UAAU,+DACV,KAAK,MACL,aAAW,0CAEX,SAAAC,EAAAA,KAACC,EAAA,CACC,OAAAH,EACA,KAAM,GACN,UAAU,gBACV,MAAO,CAAE,WAAY,SAAA,EAErB,SALine truncated
@@ -1,4 +1,4 @@
import{r as x,D as l,j as i}from"./index-BUPp0i0i.js";import{c as O,l as b,a as y,e as w,b as C,M as L,T as M,L as R}from"./leaflet-Nkpzzebg.js";import{u as T}from"./hooks-fCOseuFw.js";const h=O(function({position:n,...t},o){const r=new b.Marker(n,t);return y(r,w(o,{overlayContainer:r}))},function(n,t,o){t.position!==o.position&&n.setLatLng(t.position),t.icon!=null&&t.icon!==o.icon&&n.setIcon(t.icon),t.zIndexOffset!=null&&t.zIndexOffset!==o.zIndexOffset&&n.setZIndexOffset(t.zIndexOffset),t.opacity!=null&&t.opacity!==o.opacity&&n.setOpacity(t.opacity),n.dragging!=null&&t.draggable!==o.draggable&&(t.draggable===!0?n.dragging.enable():n.dragging.disable())}),p=C(function(n,t){const o=new b.Tooltip(n,t.overlayContainer);return y(o,t)},function(n,t,{position:o},r){x.useEffect(function(){const s=t.overlayContainer;if(s==null)return;const{instance:u}=n,f=a=>{a.tooltip===u&&(o!=null&&u.setLatLng(o),u.update(),r(!0))},c=a=>{a.tooltip===u&&r(!1)};return s.on({tooltipopen:f,tooltipclose:c}),s.bindTooltip(u),function(){s.off({tooltipopen:f,tooltipclose:c}),s._map!=null&&s.unbindTooltip()}},[n,t,r,o])}),m=["#f97316","#eab308","#22c55e","#06b6d4","#ec4899","#f43f5e","#a855f7","#64748b"],E="#3b82f6",S="#8b5cf6";function g(e,n){return R.divIcon({className:"",iconSize:[24,24],iconAnchor:[12,12],html:`<div style="
import{r as x,D as l,j as i}from"./index-C_33NHxn.js";import{c as O,l as b,a as y,e as w,b as C,M as L,T as M,L as R}from"./leaflet-DNHXPpW7.js";import{u as T}from"./hooks-BmAJqTPK.js";const h=O(function({position:n,...t},o){const r=new b.Marker(n,t);return y(r,w(o,{overlayContainer:r}))},function(n,t,o){t.position!==o.position&&n.setLatLng(t.position),t.icon!=null&&t.icon!==o.icon&&n.setIcon(t.icon),t.zIndexOffset!=null&&t.zIndexOffset!==o.zIndexOffset&&n.setZIndexOffset(t.zIndexOffset),t.opacity!=null&&t.opacity!==o.opacity&&n.setOpacity(t.opacity),n.dragging!=null&&t.draggable!==o.draggable&&(t.draggable===!0?n.dragging.enable():n.dragging.disable())}),p=C(function(n,t){const o=new b.Tooltip(n,t.overlayContainer);return y(o,t)},function(n,t,{position:o},r){x.useEffect(function(){const s=t.overlayContainer;if(s==null)return;const{instance:u}=n,f=a=>{a.tooltip===u&&(o!=null&&u.setLatLng(o),u.update(),r(!0))},c=a=>{a.tooltip===u&&r(!1)};return s.on({tooltipopen:f,tooltipclose:c}),s.bindTooltip(u),function(){s.off({tooltipopen:f,tooltipclose:c}),s._map!=null&&s.unbindTooltip()}},[n,t,r,o])}),m=["#f97316","#eab308","#22c55e","#06b6d4","#ec4899","#f43f5e","#a855f7","#64748b"],E="#3b82f6",S="#8b5cf6";function g(e,n){return R.divIcon({className:"",iconSize:[24,24],iconAnchor:[12,12],html:`<div style="
width:24px;height:24px;border-radius:50%;
background:${n};color:#fff;
display:flex;align-items:center;justify-content:center;
@@ -6,4 +6,4 @@ import{r as x,D as l,j as i}from"./index-BUPp0i0i.js";import{c as O,l as b,a as
border:2px solid rgba(255,255,255,0.8);
box-shadow:0 1px 4px rgba(0,0,0,0.4);
">${e}</div>`})}function z(e){return m[e%m.length]}function N(e){const n=[];l(e.sender.lat,e.sender.lon)&&n.push([e.sender.lat,e.sender.lon]);for(const t of e.hops)for(const o of t.matches)l(o.lat,o.lon)&&n.push([o.lat,o.lon]);return l(e.receiver.lat,e.receiver.lon)&&n.push([e.receiver.lat,e.receiver.lon]),n}function I({points:e}){const n=T(),t=x.useRef(!1);return x.useEffect(()=>{t.current||e.length===0||(t.current=!0,e.length===1?n.setView(e[0],12):n.fitBounds(e,{padding:[30,30],maxZoom:14}))},[n,e]),null}function k({resolved:e,senderInfo:n}){const t=N(e),o=t.length>0;let r=2,d=0;l(e.sender.lat,e.sender.lon)&&d++,l(e.receiver.lat,e.receiver.lon)&&d++;for(const f of e.hops)f.matches.length===0?r++:(r+=f.matches.length,d+=f.matches.filter(c=>l(c.lat,c.lon)).length);const s=o&&d<r;if(!o)return i.jsx("div",{className:"h-14 rounded border border-border bg-muted/30 flex items-center justify-center text-sm text-muted-foreground",children:"No nodes in this route have GPS coordinates"});const u=t[0];return i.jsxs("div",{children:[i.jsx("div",{className:"rounded border border-border overflow-hidden",role:"img","aria-label":"Map showing message route between nodes",style:{height:220},children:i.jsxs(L,{center:u,zoom:10,className:"h-full w-full",style:{background:"#1a1a2e"},children:[i.jsx(M,{attribution:'© <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a>',url:"https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png"}),i.jsx(I,{points:t}),l(e.sender.lat,e.sender.lon)&&i.jsx(h,{position:[e.sender.lat,e.sender.lon],icon:g("S",E),children:i.jsx(p,{direction:"top",offset:[0,-14],children:n.name||"Sender"})}),e.hops.map((f,c)=>f.matches.filter(a=>l(a.lat,a.lon)).map((a,j)=>i.jsx(h,{position:[a.lat,a.lon],icon:g(String(c+1),z(c)),children:i.jsx(p,{direction:"top",offset:[0,-14],children:a.name||a.public_key.slice(0,12)})},`hop-${c}-${j}`))),l(e.receiver.lat,e.receiver.lon)&&i.jsx(h,{position:[e.receiver.lat,e.receiver.lon],icon:g("R",S),children:i.jsx(p,{direction:"top",offset:[0,-14],children:e.receiver.name||"Receiver"})})]})}),s&&i.jsx("p",{className:"text-xs text-muted-foreground mt-1",children:"Some nodes in this route have no GPS and are not shown"})]})}export{k as PathRouteMap};
//# sourceMappingURL=PathRouteMap--4_fo75Z.js.map
//# sourceMappingURL=PathRouteMap-DbzDNGyG.js.map
@@ -1 +1 @@
{"version":3,"file":"PathRouteMap--4_fo75Z.js","sources":["../../node_modules/react-leaflet/lib/Marker.js","../../node_modules/react-leaflet/lib/Tooltip.js","../../src/components/PathRouteMap.tsx"],"sourcesContent":["import { createElementObject, createLayerComponent, extendContext } from '@react-leaflet/core';\nimport { Marker as LeafletMarker } from 'leaflet';\nexport const Marker = createLayerComponent(function createMarker({ position , ...options }, ctx) {\n const marker = new LeafletMarker(position, options);\n return createElementObject(marker, extendContext(ctx, {\n overlayContainer: marker\n }));\n}, function updateMarker(marker, props, prevProps) {\n if (props.position !== prevProps.position) {\n marker.setLatLng(props.position);\n }\n if (props.icon != null && props.icon !== prevProps.icon) {\n marker.setIcon(props.icon);\n }\n if (props.zIndexOffset != null && props.zIndexOffset !== prevProps.zIndexOffset) {\n marker.setZIndexOffset(props.zIndexOffset);\n }\n if (props.opacity != null && props.opacity !== prevProps.opacity) {\n marker.setOpacity(props.opacity);\n }\n if (marker.dragging != null && props.draggable !== prevProps.draggable) {\n if (props.draggable === true) {\n marker.dragging.enable();\n } else {\n marker.dragging.disable();\n }\n }\n});\n","import { createElementObject, createOverlayComponent } from '@react-leaflet/core';\nimport { Tooltip as LeafletTooltip } from 'leaflet';\nimport { useEffect } from 'react';\nexport const Tooltip = createOverlayComponent(function createTooltip(props, context) {\n const tooltip = new LeafletTooltip(props, context.overlayContainer);\n return createElementObject(tooltip, context);\n}, function useTooltipLifecycle(element, context, { position }, setOpen) {\n useEffect(function addTooltip() {\n const container = context.overlayContainer;\n if (container == null) {\n return;\n }\n const { instance } = element;\n const onTooltipOpen = (event)=>{\n if (event.tooltip === instance) {\n if (position != null) {\n instance.setLatLng(position);\n }\n instance.update();\n setOpen(true);\n }\n };\n const onTooltipClose = (event)=>{\n if (event.tooltip === instance) {\n setOpen(false);\n }\n };\n container.on({\n tooltipopen: onTooltipOpen,\n tooltipclose: onTooltipClose\n });\n container.bindTooltip(instance);\n return function removeTooltip() {\n container.off({\n tooltipopen: onTooltipOpen,\n tooltipclose: onTooltipClose\n });\n // @ts-ignore protected property\n if (container._map != null) {\n container.unbindTooltip();\n }\n };\n }, [\n element,\n context,\n setOpen,\n position\n ]);\n});\n","import { useEffect, useRef } from 'react';\nimport { MapContainer, TileLayer, Marker, Tooltip, useMap } from 'react-leaflet';\nimport L from 'leaflet';\nimport 'leaflet/dist/leaflet.css';\nimport { isValidLocation } from '../utils/pathUtils';\nimport type { ResolvedPath, SenderInfo } from '../utils/pathUtils';\n\ninterface PathRouteMapProps {\n resolved: ResolvedPath;\n senderInfo: SenderInfo;\n}\n\n// Colors for hop markers (indexed by hop number - 1)\nconst HOP_COLORS = [\n '#f97316', // Hop 1: orange\n '#eab308', // Hop 2: yellow\n '#22c55e', // Hop 3: green\n '#06b6d4', // Hop 4: cyan\n '#ec4899', // Hop 5: pink\n '#f43f5e', // Hop 6: rose\n '#a855f7', // Hop 7: purple\n '#64748b', // Hop 8: slate\n];\n\nconst SENDER_COLOR = '#3b82f6'; // blue\nconst RECEIVER_COLOR = '#8b5cf6'; // violet\n\nfunction makeIcon(label: string, color: string): L.DivIcon {\n return L.divIcon({\n className: '',\n iconSize: [24, 24],\n iconAnchor: [12, 12],\n html: `<div style=\"\n width:24px;height:24px;border-radius:50%;\n background:${color};color:#fff;\n display:flex;align-items:center;justify-content:center;\n font-size:11px;font-weight:700;\n border:2px solid rgba(255,255,255,0.8);\n box-shadow:0 1px 4px rgba(0,0,0,0.4);\n \">${label}</div>`,\n });\n}\n\nfunction getHopColor(hopIndex: number): string {\n return HOP_COLORS[hopIndex % HOP_COLORS.length];\n}\n\n/** Collect all valid [lat, lon] points for bounds fitting */\nfunction collectPoints(resolved: ResolvedPath): [number, number][] {\n const pts: [number, number][] = [];\n if (isValidLocation(resolved.sender.lat, resolved.sender.lon)) {\n pts.push([resolved.sender.lat!, resolved.sender.lon!]);\n }\n for (const hop of resolved.hops) {\n for (const m of hop.matches) {\n if (isValidLocation(m.lat, m.lon)) {\n pts.push([m.lat!, m.lon!]);\n Line truncated
{"version":3,"file":"PathRouteMap-DbzDNGyG.js","sources":["../../node_modules/react-leaflet/lib/Marker.js","../../node_modules/react-leaflet/lib/Tooltip.js","../../src/components/PathRouteMap.tsx"],"sourcesContent":["import { createElementObject, createLayerComponent, extendContext } from '@react-leaflet/core';\nimport { Marker as LeafletMarker } from 'leaflet';\nexport const Marker = createLayerComponent(function createMarker({ position , ...options }, ctx) {\n const marker = new LeafletMarker(position, options);\n return createElementObject(marker, extendContext(ctx, {\n overlayContainer: marker\n }));\n}, function updateMarker(marker, props, prevProps) {\n if (props.position !== prevProps.position) {\n marker.setLatLng(props.position);\n }\n if (props.icon != null && props.icon !== prevProps.icon) {\n marker.setIcon(props.icon);\n }\n if (props.zIndexOffset != null && props.zIndexOffset !== prevProps.zIndexOffset) {\n marker.setZIndexOffset(props.zIndexOffset);\n }\n if (props.opacity != null && props.opacity !== prevProps.opacity) {\n marker.setOpacity(props.opacity);\n }\n if (marker.dragging != null && props.draggable !== prevProps.draggable) {\n if (props.draggable === true) {\n marker.dragging.enable();\n } else {\n marker.dragging.disable();\n }\n }\n});\n","import { createElementObject, createOverlayComponent } from '@react-leaflet/core';\nimport { Tooltip as LeafletTooltip } from 'leaflet';\nimport { useEffect } from 'react';\nexport const Tooltip = createOverlayComponent(function createTooltip(props, context) {\n const tooltip = new LeafletTooltip(props, context.overlayContainer);\n return createElementObject(tooltip, context);\n}, function useTooltipLifecycle(element, context, { position }, setOpen) {\n useEffect(function addTooltip() {\n const container = context.overlayContainer;\n if (container == null) {\n return;\n }\n const { instance } = element;\n const onTooltipOpen = (event)=>{\n if (event.tooltip === instance) {\n if (position != null) {\n instance.setLatLng(position);\n }\n instance.update();\n setOpen(true);\n }\n };\n const onTooltipClose = (event)=>{\n if (event.tooltip === instance) {\n setOpen(false);\n }\n };\n container.on({\n tooltipopen: onTooltipOpen,\n tooltipclose: onTooltipClose\n });\n container.bindTooltip(instance);\n return function removeTooltip() {\n container.off({\n tooltipopen: onTooltipOpen,\n tooltipclose: onTooltipClose\n });\n // @ts-ignore protected property\n if (container._map != null) {\n container.unbindTooltip();\n }\n };\n }, [\n element,\n context,\n setOpen,\n position\n ]);\n});\n","import { useEffect, useRef } from 'react';\nimport { MapContainer, TileLayer, Marker, Tooltip, useMap } from 'react-leaflet';\nimport L from 'leaflet';\nimport 'leaflet/dist/leaflet.css';\nimport { isValidLocation } from '../utils/pathUtils';\nimport type { ResolvedPath, SenderInfo } from '../utils/pathUtils';\n\ninterface PathRouteMapProps {\n resolved: ResolvedPath;\n senderInfo: SenderInfo;\n}\n\n// Colors for hop markers (indexed by hop number - 1)\nconst HOP_COLORS = [\n '#f97316', // Hop 1: orange\n '#eab308', // Hop 2: yellow\n '#22c55e', // Hop 3: green\n '#06b6d4', // Hop 4: cyan\n '#ec4899', // Hop 5: pink\n '#f43f5e', // Hop 6: rose\n '#a855f7', // Hop 7: purple\n '#64748b', // Hop 8: slate\n];\n\nconst SENDER_COLOR = '#3b82f6'; // blue\nconst RECEIVER_COLOR = '#8b5cf6'; // violet\n\nfunction makeIcon(label: string, color: string): L.DivIcon {\n return L.divIcon({\n className: '',\n iconSize: [24, 24],\n iconAnchor: [12, 12],\n html: `<div style=\"\n width:24px;height:24px;border-radius:50%;\n background:${color};color:#fff;\n display:flex;align-items:center;justify-content:center;\n font-size:11px;font-weight:700;\n border:2px solid rgba(255,255,255,0.8);\n box-shadow:0 1px 4px rgba(0,0,0,0.4);\n \">${label}</div>`,\n });\n}\n\nfunction getHopColor(hopIndex: number): string {\n return HOP_COLORS[hopIndex % HOP_COLORS.length];\n}\n\n/** Collect all valid [lat, lon] points for bounds fitting */\nfunction collectPoints(resolved: ResolvedPath): [number, number][] {\n const pts: [number, number][] = [];\n if (isValidLocation(resolved.sender.lat, resolved.sender.lon)) {\n pts.push([resolved.sender.lat!, resolved.sender.lon!]);\n }\n for (const hop of resolved.hops) {\n for (const m of hop.matches) {\n if (isValidLocation(m.lat, m.lon)) {\n pts.push([m.lat!, m.lon!]);\n Line truncated
@@ -1,2 +1,2 @@
import{d,l as f,a as s,e as C,b as m}from"./leaflet-Nkpzzebg.js";import{r as P}from"./index-BUPp0i0i.js";function v(o,n,e){n.center!==e.center&&o.setLatLng(n.center),n.radius!=null&&n.radius!==e.radius&&o.setRadius(n.radius)}const b=d(function({center:n,children:e,...r},p){const t=new f.CircleMarker(n,r);return s(t,C(p,{overlayContainer:t}))},v),k=m(function(n,e){const r=new f.Popup(n,e.overlayContainer);return s(r,e)},function(n,e,{position:r},p){P.useEffect(function(){const{instance:a}=n;function i(u){u.popup===a&&(a.update(),p(!0))}function c(u){u.popup===a&&p(!1)}return e.map.on({popupopen:i,popupclose:c}),e.overlayContainer==null?(r!=null&&a.setLatLng(r),a.openOn(e.map)):e.overlayContainer.bindPopup(a),function(){var l;e.map.off({popupopen:i,popupclose:c}),(l=e.overlayContainer)==null||l.unbindPopup(),e.map.removeLayer(a)}},[n,e,p,r])});export{b as C,k as P};
//# sourceMappingURL=Popup-_4Won2BS.js.map
import{d,l as f,a as s,e as C,b as m}from"./leaflet-DNHXPpW7.js";import{r as P}from"./index-C_33NHxn.js";function v(o,n,e){n.center!==e.center&&o.setLatLng(n.center),n.radius!=null&&n.radius!==e.radius&&o.setRadius(n.radius)}const b=d(function({center:n,children:e,...r},p){const t=new f.CircleMarker(n,r);return s(t,C(p,{overlayContainer:t}))},v),k=m(function(n,e){const r=new f.Popup(n,e.overlayContainer);return s(r,e)},function(n,e,{position:r},p){P.useEffect(function(){const{instance:a}=n;function i(u){u.popup===a&&(a.update(),p(!0))}function c(u){u.popup===a&&p(!1)}return e.map.on({popupopen:i,popupclose:c}),e.overlayContainer==null?(r!=null&&a.setLatLng(r),a.openOn(e.map)):e.overlayContainer.bindPopup(a),function(){var l;e.map.off({popupopen:i,popupclose:c}),(l=e.overlayContainer)==null||l.unbindPopup(),e.map.removeLayer(a)}},[n,e,p,r])});export{b as C,k as P};
//# sourceMappingURL=Popup-BcLg2SsA.js.map
@@ -1 +1 @@
{"version":3,"file":"Popup-_4Won2BS.js","sources":["../../node_modules/@react-leaflet/core/lib/circle.js","../../node_modules/react-leaflet/lib/CircleMarker.js","../../node_modules/react-leaflet/lib/Popup.js"],"sourcesContent":["export function updateCircle(layer, props, prevProps) {\n if (props.center !== prevProps.center) {\n layer.setLatLng(props.center);\n }\n if (props.radius != null && props.radius !== prevProps.radius) {\n layer.setRadius(props.radius);\n }\n}\n","import { createElementObject, createPathComponent, extendContext, updateCircle } from '@react-leaflet/core';\nimport { CircleMarker as LeafletCircleMarker } from 'leaflet';\nexport const CircleMarker = createPathComponent(function createCircleMarker({ center , children: _c , ...options }, ctx) {\n const marker = new LeafletCircleMarker(center, options);\n return createElementObject(marker, extendContext(ctx, {\n overlayContainer: marker\n }));\n}, updateCircle);\n","import { createElementObject, createOverlayComponent } from '@react-leaflet/core';\nimport { Popup as LeafletPopup } from 'leaflet';\nimport { useEffect } from 'react';\nexport const Popup = createOverlayComponent(function createPopup(props, context) {\n const popup = new LeafletPopup(props, context.overlayContainer);\n return createElementObject(popup, context);\n}, function usePopupLifecycle(element, context, { position }, setOpen) {\n useEffect(function addPopup() {\n const { instance } = element;\n function onPopupOpen(event) {\n if (event.popup === instance) {\n instance.update();\n setOpen(true);\n }\n }\n function onPopupClose(event) {\n if (event.popup === instance) {\n setOpen(false);\n }\n }\n context.map.on({\n popupopen: onPopupOpen,\n popupclose: onPopupClose\n });\n if (context.overlayContainer == null) {\n // Attach to a Map\n if (position != null) {\n instance.setLatLng(position);\n }\n instance.openOn(context.map);\n } else {\n // Attach to container component\n context.overlayContainer.bindPopup(instance);\n }\n return function removePopup() {\n context.map.off({\n popupopen: onPopupOpen,\n popupclose: onPopupClose\n });\n context.overlayContainer?.unbindPopup();\n context.map.removeLayer(instance);\n };\n }, [\n element,\n context,\n setOpen,\n position\n ]);\n});\n"],"names":["updateCircle","layer","props","prevProps","CircleMarker","createPathComponent","center","_c","options","ctx","marker","LeafletCircleMarker","createElementObject","extendContext","Popup","createOverlayComponent","context","popup","LeafletPopup","element","position","setOpen","useEffect","instance","onPopupOpen","event","onPopupClose","_a"],"mappings":"yGAAO,SAASA,EAAaC,EAAOC,EAAOC,EAAW,CAC9CD,EAAM,SAAWC,EAAU,QAC3BF,EAAM,UAAUC,EAAM,MAAM,EAE5BA,EAAM,QAAU,MAAQA,EAAM,SAAWC,EAAU,QACnDF,EAAM,UAAUC,EAAM,MAAM,CAEpC,CCLY,MAACE,EAAeC,EAAoB,SAA4B,CAAE,OAAAC,EAAS,SAAUC,EAAK,GAAGC,CAAO,EAAIC,EAAK,CACrH,MAAMC,EAAS,IAAIC,eAAoBL,EAAQE,CAAO,EACtD,OAAOI,EAAoBF,EAAQG,EAAcJ,EAAK,CAClD,iBAAkBC,CAC1B,CAAK,CAAC,CACN,EAAGV,CAAY,ECJFc,EAAQC,EAAuB,SAAqBb,EAAOc,EAAS,CAC7E,MAAMC,EAAQ,IAAIC,EAAAA,MAAahB,EAAOc,EAAQ,gBAAgB,EAC9D,OAAOJ,EAAoBK,EAAOD,CAAO,CAC7C,EAAG,SAA2BG,EAASH,EAAS,CAAE,SAAAI,CAAQ,EAAKC,EAAS,CACpEC,EAAAA,UAAU,UAAoB,CAC1B,KAAM,CAAE,SAAAC,CAAQ,EAAMJ,EACtB,SAASK,EAAYC,EAAO,CACpBA,EAAM,QAAUF,IAChBA,EAAS,OAAM,EACfF,EAAQ,EAAI,EAEpB,CACA,SAASK,EAAaD,EAAO,CACrBA,EAAM,QAAUF,GAChBF,EAAQ,EAAK,CAErB,CACA,OAAAL,EAAQ,IAAI,GAAG,CACX,UAAWQ,EACX,WAAYE,CACxB,CAAS,EACGV,EAAQ,kBAAoB,MAExBI,GAAY,MACZG,EAAS,UAAUH,CAAQ,EAE/BG,EAAS,OAAOP,EAAQ,GAAG,GAG3BA,EAAQ,iBAAiB,UAAUO,CAAQ,EAExC,UAAuB,OAC1BP,EAAQ,IAAI,IAAI,CACZ,UAAWQ,EACX,WAAYE,CAC5B,CAAa,GACDC,EAAAX,EAAQ,mBAAR,MAAAW,EAA0B,cAC1BX,EAAQ,IAAI,YAAYO,CAAQ,CACpC,CACJ,EAAG,CACCJ,EACAH,EACAK,EACAD,CACR,CAAK,CACL,CAAC","x_google_ignoreList":[0,1,2]}
{"version":3,"file":"Popup-BcLg2SsA.js","sources":["../../node_modules/@react-leaflet/core/lib/circle.js","../../node_modules/react-leaflet/lib/CircleMarker.js","../../node_modules/react-leaflet/lib/Popup.js"],"sourcesContent":["export function updateCircle(layer, props, prevProps) {\n if (props.center !== prevProps.center) {\n layer.setLatLng(props.center);\n }\n if (props.radius != null && props.radius !== prevProps.radius) {\n layer.setRadius(props.radius);\n }\n}\n","import { createElementObject, createPathComponent, extendContext, updateCircle } from '@react-leaflet/core';\nimport { CircleMarker as LeafletCircleMarker } from 'leaflet';\nexport const CircleMarker = createPathComponent(function createCircleMarker({ center , children: _c , ...options }, ctx) {\n const marker = new LeafletCircleMarker(center, options);\n return createElementObject(marker, extendContext(ctx, {\n overlayContainer: marker\n }));\n}, updateCircle);\n","import { createElementObject, createOverlayComponent } from '@react-leaflet/core';\nimport { Popup as LeafletPopup } from 'leaflet';\nimport { useEffect } from 'react';\nexport const Popup = createOverlayComponent(function createPopup(props, context) {\n const popup = new LeafletPopup(props, context.overlayContainer);\n return createElementObject(popup, context);\n}, function usePopupLifecycle(element, context, { position }, setOpen) {\n useEffect(function addPopup() {\n const { instance } = element;\n function onPopupOpen(event) {\n if (event.popup === instance) {\n instance.update();\n setOpen(true);\n }\n }\n function onPopupClose(event) {\n if (event.popup === instance) {\n setOpen(false);\n }\n }\n context.map.on({\n popupopen: onPopupOpen,\n popupclose: onPopupClose\n });\n if (context.overlayContainer == null) {\n // Attach to a Map\n if (position != null) {\n instance.setLatLng(position);\n }\n instance.openOn(context.map);\n } else {\n // Attach to container component\n context.overlayContainer.bindPopup(instance);\n }\n return function removePopup() {\n context.map.off({\n popupopen: onPopupOpen,\n popupclose: onPopupClose\n });\n context.overlayContainer?.unbindPopup();\n context.map.removeLayer(instance);\n };\n }, [\n element,\n context,\n setOpen,\n position\n ]);\n});\n"],"names":["updateCircle","layer","props","prevProps","CircleMarker","createPathComponent","center","_c","options","ctx","marker","LeafletCircleMarker","createElementObject","extendContext","Popup","createOverlayComponent","context","popup","LeafletPopup","element","position","setOpen","useEffect","instance","onPopupOpen","event","onPopupClose","_a"],"mappings":"yGAAO,SAASA,EAAaC,EAAOC,EAAOC,EAAW,CAC9CD,EAAM,SAAWC,EAAU,QAC3BF,EAAM,UAAUC,EAAM,MAAM,EAE5BA,EAAM,QAAU,MAAQA,EAAM,SAAWC,EAAU,QACnDF,EAAM,UAAUC,EAAM,MAAM,CAEpC,CCLY,MAACE,EAAeC,EAA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cx5ENk0V.css","assets/leaflet-Nkpzzebg.js","assets/leaflet-Dgihpmma.css","assets/Popup-_4Won2BS.js"])))=>i.map(i=>d[i]);
import{r as a,k as $,t as Z,j as e,I as oe,B,l as P,D as X,E as ue,F as me,_ as fe,G as xe,H as he,J as pe,R as ge,K as be,M as ve,N as ee,O as je,P as Ne}from"./index-BUPp0i0i.js";import{S as V}from"./separator-C7ZN2sFh.js";const te=3,ye=2e3,we=20,H={loading:!1,attempt:0,error:null,fetched_at:null};function se(){return{status:{...H},nodeInfo:{...H},neighbors:{...H},acl:{...H},radioSettings:{...H},advertIntervals:{...H},ownerInfo:{...H},lppTelemetry:{...H}}}function re(){return{status:null,nodeInfo:null,neighbors:null,acl:null,radioSettings:null,advertIntervals:null,ownerInfo:null,lppTelemetry:null}}const z=new Map;function _e(t){switch(t){case"timeout":return"Login confirmation not heard";case"error":return"Login not confirmed";default:return"Repeater login not confirmed"}}function le(t){return{...t}}function ae(t){return{status:{...t.status,loading:!1},nodeInfo:{...t.nodeInfo,loading:!1},neighbors:{...t.neighbors,loading:!1},acl:{...t.acl,loading:!1},radioSettings:{...t.radioSettings,loading:!1},advertIntervals:{...t.advertIntervals,loading:!1},ownerInfo:{...t.ownerInfo,loading:!1},lppTelemetry:{...t.lppTelemetry,loading:!1}}}function ie(t){return t.map(s=>({...s}))}function Le(t){if(!t)return null;const s=z.get(t);return s?(z.delete(t),z.set(t,s),{loggedIn:s.loggedIn,loginError:s.loginError,paneData:le(s.paneData),paneStates:ae(s.paneStates),consoleHistory:ie(s.consoleHistory)}):null}function Re(t,s){if(z.delete(t),z.set(t,{loggedIn:s.loggedIn,loginError:s.loginError,paneData:le(s.paneData),paneStates:ae(s.paneStates),consoleHistory:ie(s.consoleHistory)}),z.size>we){const n=z.keys().next().value;n&&z.delete(n)}}function Se(t,s){switch(s){case"status":return $.repeaterStatus(t);case"nodeInfo":return $.repeaterNodeInfo(t);case"neighbors":return $.repeaterNeighbors(t);case"acl":return $.repeaterAcl(t);case"radioSettings":return $.repeaterRadioSettings(t);case"advertIntervals":return $.repeaterAdvertIntervals(t);case"ownerInfo":return $.repeaterOwnerInfo(t);case"lppTelemetry":return $.repeaterLppTelemetry(t)}}function ke(t,s={}){const n=t&&t.type==="contact"?t.id:null,r=Le(n),[o,l]=a.useState((r==null?void 0:r.loggedIn)??!1),[i,u]=a.useState(!1),[m,y]=a.useState((r==null?void 0:r.loginError)??null),[w,D]=a.useState((r==null?void 0:r.paneData)??re),[L,j]=a.useState((r==null?void 0:r.paneStates)??se),A=a.useRef((r==null?void 0:r.paneData)??re()),v=a.useRef((r==null?void 0:r.paneStates)??se()),[N,T]=a.useState((r==null?void 0:r.consoleHistory)??[]),[W,G]=a.useState(!1),c=a.useRef((t==null?void 0:t.id)??null),h=a.useRef(!0);a.useEffect(()=>{c.current=n},[n]),a.useEffect(()=>(h.current=!0,()=>{h.current=!1}),[]),a.useEffect(()=>{n&&Re(n,{loggedIn:o,loginError:m,paneData:w,paneStates:L,consoleHistory:N})},[N,n,o,m,w,L]),a.useEffect(()=>{A.current=w},[w]),a.useEffect(()=>{v.current=L},[L]);const p=a.useCallback(()=>!t||t.type!=="contact"?null:t.id,[t]),k=a.useCallback(async x=>{const S=p();if(!S)return;const _=S;u(!0),y(null);try{const d=await $.repeaterLogin(S,x);if(c.current!==_)return;if(l(!0),!d.authenticated){const g=d.message??"Repeater login was not confirmed";y(g),Z.error(_e(d.status),{description:g})}}catch(d){if(c.current!==_)return;const g=d instanceof Error?d.message:"Login failed";l(!0),y(g),Z.error("Login request failed",{description:`${g}. The dashboard is still available, but repeater operations may fail until a login succeeds.`})}finally{c.current===_&&u(!1)}},[p]),R=a.useCallback(async()=>{await k("")},[k]),I=a.useCallback(async x=>{const S=p();if(!S)return;const _=S;if(x==="neighbors"&&!s.hasAdvertLocation){const d=v.current.nodeInfo,g=A.current.nodeInfo;if((d.error!==null||d.fetched_at==null&&g==null)&&(await I("nodeInfo"),!h.current||c.current!==_))return}for(let d=1;d<=te;d++){if(!h.current||c.current!==_)return;const g={loading:!0,attempt:d,error:null,fetched_at:v.current[x].fetched_at??null};v.current={...v.current,[x]:g},j(C=>({...C,[x]:g}));try{const C=await Se(S,x);if(!h.current||c.current!==_)return;A.current={...A.current,[x]:C};const q={loading:!1,attempt:d,error:null,fetched_at:Date.now()};v.current={...v.current,[x]:q},D(E=>({...E,[x]:C})),j(E=>({...E,[x]:q}));return}catch(C){if(!h.current||c.current!==_)return;const q=C instanceof Error?C.message:"Request failed";if(d===te){const E={loading:!1,attempt:d,error:q,fetched_at:v.current[x].fetched_at??null};v.current={...v.current,[x]:E},j(de=>({...de,[x]:E})),Z.error(`Failed to fetch ${x}`,{description:q})}else await new Promise(E=>setTimeout(E,ye))}}},[p,s.hasAdvertLocation]),F=a.useCallback(async()=>{const x=["status","nodeInfo","neighbors","radioSettings","acl","advertIntervals","ownerInfo","lppTelemetry"];for(const S of x)await I(S)},[I]),b=a.useCallback(async x=>{const S=p();if(!S)return;const _=S,d=Math.floor(Date.now()/1e3);T(g=>[...g,{command:x,response:"",timestamp:d,outgoing:!0}]),G(!0);try{const g=await $.sendRepeaterCommand(S,x);if(c.current!==_)return;T(C=>[...C,{command:x,response:g.response,timestamp:g.sender_timestamp??Line truncated
//# sourceMappingURL=RepeaterDashboard-BmKo2O_g.js.map
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/NeighborsMiniMap-CsH85D0E.js","assets/index-C_33NHxn.js","assets/index-Cx5ENk0V.css","assets/leaflet-DNHXPpW7.js","assets/leaflet-Dgihpmma.css","assets/Popup-BcLg2SsA.js"])))=>i.map(i=>d[i]);
import{r as a,k as $,t as Z,j as e,I as oe,B,l as P,D as X,E as ue,F as me,_ as fe,G as xe,H as he,J as pe,R as ge,K as be,M as ve,N as ee,O as je,P as Ne}from"./index-C_33NHxn.js";import{S as V}from"./separator-BtL4plOj.js";const te=3,ye=2e3,we=20,H={loading:!1,attempt:0,error:null,fetched_at:null};function se(){return{status:{...H},nodeInfo:{...H},neighbors:{...H},acl:{...H},radioSettings:{...H},advertIntervals:{...H},ownerInfo:{...H},lppTelemetry:{...H}}}function re(){return{status:null,nodeInfo:null,neighbors:null,acl:null,radioSettings:null,advertIntervals:null,ownerInfo:null,lppTelemetry:null}}const z=new Map;function _e(t){switch(t){case"timeout":return"Login confirmation not heard";case"error":return"Login not confirmed";default:return"Repeater login not confirmed"}}function le(t){return{...t}}function ae(t){return{status:{...t.status,loading:!1},nodeInfo:{...t.nodeInfo,loading:!1},neighbors:{...t.neighbors,loading:!1},acl:{...t.acl,loading:!1},radioSettings:{...t.radioSettings,loading:!1},advertIntervals:{...t.advertIntervals,loading:!1},ownerInfo:{...t.ownerInfo,loading:!1},lppTelemetry:{...t.lppTelemetry,loading:!1}}}function ie(t){return t.map(s=>({...s}))}function Le(t){if(!t)return null;const s=z.get(t);return s?(z.delete(t),z.set(t,s),{loggedIn:s.loggedIn,loginError:s.loginError,paneData:le(s.paneData),paneStates:ae(s.paneStates),consoleHistory:ie(s.consoleHistory)}):null}function Re(t,s){if(z.delete(t),z.set(t,{loggedIn:s.loggedIn,loginError:s.loginError,paneData:le(s.paneData),paneStates:ae(s.paneStates),consoleHistory:ie(s.consoleHistory)}),z.size>we){const n=z.keys().next().value;n&&z.delete(n)}}function Se(t,s){switch(s){case"status":return $.repeaterStatus(t);case"nodeInfo":return $.repeaterNodeInfo(t);case"neighbors":return $.repeaterNeighbors(t);case"acl":return $.repeaterAcl(t);case"radioSettings":return $.repeaterRadioSettings(t);case"advertIntervals":return $.repeaterAdvertIntervals(t);case"ownerInfo":return $.repeaterOwnerInfo(t);case"lppTelemetry":return $.repeaterLppTelemetry(t)}}function ke(t,s={}){const n=t&&t.type==="contact"?t.id:null,r=Le(n),[o,l]=a.useState((r==null?void 0:r.loggedIn)??!1),[i,u]=a.useState(!1),[m,y]=a.useState((r==null?void 0:r.loginError)??null),[w,D]=a.useState((r==null?void 0:r.paneData)??re),[L,j]=a.useState((r==null?void 0:r.paneStates)??se),A=a.useRef((r==null?void 0:r.paneData)??re()),v=a.useRef((r==null?void 0:r.paneStates)??se()),[N,T]=a.useState((r==null?void 0:r.consoleHistory)??[]),[W,G]=a.useState(!1),c=a.useRef((t==null?void 0:t.id)??null),h=a.useRef(!0);a.useEffect(()=>{c.current=n},[n]),a.useEffect(()=>(h.current=!0,()=>{h.current=!1}),[]),a.useEffect(()=>{n&&Re(n,{loggedIn:o,loginError:m,paneData:w,paneStates:L,consoleHistory:N})},[N,n,o,m,w,L]),a.useEffect(()=>{A.current=w},[w]),a.useEffect(()=>{v.current=L},[L]);const p=a.useCallback(()=>!t||t.type!=="contact"?null:t.id,[t]),k=a.useCallback(async x=>{const S=p();if(!S)return;const _=S;u(!0),y(null);try{const d=await $.repeaterLogin(S,x);if(c.current!==_)return;if(l(!0),!d.authenticated){const g=d.message??"Repeater login was not confirmed";y(g),Z.error(_e(d.status),{description:g})}}catch(d){if(c.current!==_)return;const g=d instanceof Error?d.message:"Login failed";l(!0),y(g),Z.error("Login request failed",{description:`${g}. The dashboard is still available, but repeater operations may fail until a login succeeds.`})}finally{c.current===_&&u(!1)}},[p]),R=a.useCallback(async()=>{await k("")},[k]),I=a.useCallback(async x=>{const S=p();if(!S)return;const _=S;if(x==="neighbors"&&!s.hasAdvertLocation){const d=v.current.nodeInfo,g=A.current.nodeInfo;if((d.error!==null||d.fetched_at==null&&g==null)&&(await I("nodeInfo"),!h.current||c.current!==_))return}for(let d=1;d<=te;d++){if(!h.current||c.current!==_)return;const g={loading:!0,attempt:d,error:null,fetched_at:v.current[x].fetched_at??null};v.current={...v.current,[x]:g},j(C=>({...C,[x]:g}));try{const C=await Se(S,x);if(!h.current||c.current!==_)return;A.current={...A.current,[x]:C};const q={loading:!1,attempt:d,error:null,fetched_at:Date.now()};v.current={...v.current,[x]:q},D(E=>({...E,[x]:C})),j(E=>({...E,[x]:q}));return}catch(C){if(!h.current||c.current!==_)return;const q=C instanceof Error?C.message:"Request failed";if(d===te){const E={loading:!1,attempt:d,error:q,fetched_at:v.current[x].fetched_at??null};v.current={...v.current,[x]:E},j(de=>({...de,[x]:E})),Z.error(`Failed to fetch ${x}`,{description:q})}else await new Promise(E=>setTimeout(E,ye))}}},[p,s.hasAdvertLocation]),F=a.useCallback(async()=>{const x=["status","nodeInfo","neighbors","radioSettings","acl","advertIntervals","ownerInfo","lppTelemetry"];for(const S of x)await I(S)},[I]),b=a.useCallback(async x=>{const S=p();if(!S)return;const _=S,d=Math.floor(Date.now()/1e3);T(g=>[...g,{command:x,response:"",timestamp:d,outgoing:!0}]),G(!0);try{const g=await $.sendRepeaterCommand(S,x);if(c.current!==_)return;T(C=>[...C,{command:x,response:g.response,timestamp:g.sender_timestamp??Line truncated
//# sourceMappingURL=RepeaterDashboard-DX2bA1gX.js.map
@@ -1 +1 @@
{"version":3,"mappings":";iOAkBA,MAAMA,GAAc,EACdC,GAAiB,IACjBC,GAAuB,GA4BvBC,EAAgC,CAAE,QAAS,GAAO,QAAS,EAAG,MAAO,KAAM,WAAY,MAE7F,SAASC,IAAuD,CAC9D,MAAO,CACL,OAAQ,CAAE,GAAGD,CAAA,EACb,SAAU,CAAE,GAAGA,CAAA,EACf,UAAW,CAAE,GAAGA,CAAA,EAChB,IAAK,CAAE,GAAGA,CAAA,EACV,cAAe,CAAE,GAAGA,CAAA,EACpB,gBAAiB,CAAE,GAAGA,CAAA,EACtB,UAAW,CAAE,GAAGA,CAAA,EAChB,aAAc,CAAE,GAAGA,CAAA,CAAmB,CAE1C,CAEA,SAASE,IAAkC,CACzC,MAAO,CACL,OAAQ,KACR,SAAU,KACV,UAAW,KACX,IAAK,KACL,cAAe,KACf,gBAAiB,KACjB,UAAW,KACX,aAAc,KAElB,CAEA,MAAMC,MAA6B,IAEnC,SAASC,GAAmBC,EAAwB,CAClD,OAAQA,EAAA,CACN,IAAK,UACH,MAAO,+BACT,IAAK,QACH,MAAO,sBACT,QACE,MAAO,+BAEb,CAEA,SAASC,GAAcC,EAA0B,CAC/C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AAQ,SAKzC,IAHEmB,EAAc,QAAU,MACvBA,EAAc,YAAc,MAAQC,GAAgB,QAGrD,MAAMF,EAAY,UAAU,EACxB,CAACX,EAAW,SAAWD,EAAY,UAAYlB,GAAgB,MAEvE,CAEA,QAASiC,EAAU,EAAGA,GAAW5D,GAAa4D,IAAW,CACvD,GAAI,CAACd,EAAW,SAAWD,EAAY,UAAYlB,EAAgB,OAEnE,MAAMkC,EAAe,CACnB,QAAS,GACT,QAAAD,EACA,MAAO,KACP,WAAYnB,EAAc,QAAQnB,CAAI,EAAE,YAAc,MAExDmB,EAAc,QAAU,CACtB,GAAGA,EAAc,QACjB,CAACnB,CAAI,EAAGuC,CAAA,EAEVvB,EAAewB,IAAU,CACvB,GAAGA,EACH,CAACxC,CAAI,EAAGuC,CAAA,EACR,EAEF,GAAI,CACF,MAAMnD,EAAO,MAAMW,GAAcJ,EAAWK,CAAI,EAChD,GAAI,CAACwB,EAAW,SAAWD,EAAY,UAAYlB,EAAgB,OAEnEY,EAAY,QAAU,CACpB,GAAGA,EAAY,QACf,CAACjB,CAAI,EAAGZ,CAAA,EAEV,MAAMqD,EAAe,CACnB,QAAS,GACT,QAAAH,EACA,MAAO,KACP,WAAY,KAAK,KAAI,EAEvBnB,EAAc,QAAU,CACtB,GAAGA,EAAc,QACjB,CAACnB,CAAI,EAAGyC,CAAA,EAGV1B,EAAayB,IAAU,CAAE,GAAGA,EAAM,CAACxC,CAAI,EAAGZ,CAAA,EAAO,EACjD4B,EAAewB,IAAU,CACvB,GAAGA,EACH,CAACxC,CAAI,EAAGyC,CAAA,EACLine truncated
@@ -1,2 +1,2 @@
import{r as n,k as _,A as w,j as t,I as H,l as I,m as Q,B}from"./index-BUPp0i0i.js";const b=50,D=300,O=new RegExp('(?<!\\S)(user|channel):(?:"((?:[^"\\\\]|\\\\.)*)"|(\\S+))',"gi");function T(c,d){if(!d)return[c];const i=[],m=new RegExp(`(${d.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")})`,"gi"),r=c.split(m);for(let l=0;l<r.length;l++)m.test(r[l])?i.push(t.jsx("mark",{className:"bg-primary/30 text-foreground rounded-sm px-0.5",children:r[l]},l)):i.push(r[l]),m.lastIndex=0;return i}function L(c){const d=[];let i=0,m=!1;for(const r of c.matchAll(O))m=!0,d.push(c.slice(i,r.index)),i=(r.index??0)+r[0].length;return m?(d.push(c.slice(i)),d.map(r=>r.trim()).filter(Boolean).join(" ")):c}function $({contacts:c,channels:d,visibilityVersion:i=0,onNavigateToMessage:m,prefillRequest:r=null}){const[l,v]=n.useState(""),[a,k]=n.useState(""),[C,h]=n.useState([]),[f,p]=n.useState(!1),[A,g]=n.useState(!1),[E,y]=n.useState(0),x=n.useRef(null),j=n.useRef(null),R=L(a);n.useEffect(()=>{const e=setTimeout(()=>{k(l.trim())},D);return()=>clearTimeout(e)},[l]),n.useEffect(()=>{h([]),y(0),g(!1)},[a,i]),n.useEffect(()=>{var o;if(!r)return;const e=r.query.trim();v(e),k(e),(o=j.current)==null||o.focus()},[r]),n.useEffect(()=>()=>{var e;(e=x.current)==null||e.abort()},[]),n.useEffect(()=>{var o;if(!a){h([]),g(!1);return}(o=x.current)==null||o.abort();const e=new AbortController;return x.current=e,p(!0),_.getMessages({q:a,limit:b,offset:0},e.signal).then(s=>{h(s),g(s.length>=b),y(s.length)}).catch(s=>{w(s)||console.error("Search failed:",s)}).finally(()=>{p(!1)}),()=>e.abort()},[a,i]);const M=n.useCallback(()=>{var o;if(!a||f)return;(o=x.current)==null||o.abort();const e=new AbortController;x.current=e,p(!0),_.getMessages({q:a,limit:b,offset:E},e.signal).then(s=>{h(u=>[...u,...s]),g(s.length>=b),y(u=>u+s.length)}).catch(s=>{w(s)||console.error("Search load more failed:",s)}).finally(()=>{p(!1)})},[a,f,E]),N=n.useCallback(e=>{if(e.type==="CHAN"){const s=d.find(u=>u.key.toUpperCase()===e.conversation_key.toUpperCase());return(s==null?void 0:s.name)||e.conversation_key.slice(0,8)}const o=c.find(s=>s.public_key.toLowerCase()===e.conversation_key.toLowerCase());return(o==null?void 0:o.name)||e.conversation_key.slice(0,12)},[c,d]),S=n.useCallback(e=>{m({id:e.id,type:e.type,conversation_key:e.conversation_key,conversation_name:N(e)})},[m,N]);return n.useEffect(()=>{var e;(e=j.current)==null||e.focus()},[]),t.jsxs("div",{className:"flex flex-col h-full",children:[t.jsx("h2",{className:"flex justify-between items-center px-4 py-2.5 border-b border-border font-semibold text-base",children:"Message Search"}),t.jsx("div",{className:"px-4 py-3 border-b border-border",children:t.jsx(H,{ref:j,type:"text",placeholder:"Search all messages...",value:l,onChange:e=>v(e.target.value),className:"h-9 text-sm","aria-label":"Search messages"})}),t.jsxs("div",{className:"flex-1 overflow-y-auto",children:[!a&&t.jsxs("div",{className:"p-8 text-center text-muted-foreground text-sm",children:[t.jsx("p",{children:"Type to search across all messages"}),t.jsxs("p",{className:"mt-2 text-xs",children:["Tip: use ",t.jsx("code",{children:"user:"})," or ",t.jsx("code",{children:"channel:"})," for keys or names, and wrap names with spaces in them in quotes."]}),t.jsx("p",{className:"mt-2 text-xs",children:"Warning: User-key linkage for group messages is best-effort and based on correlation at advertise time. It does not account for multiple users with the same name, and should be considered unreliable."})]}),a&&C.length===0&&!f&&t.jsxs("div",{className:"p-8 text-center text-muted-foreground text-sm",children:["No messages found for “",a,"”"]}),C.map(e=>{const o=N(e),s=e.type==="CHAN"?"Channel":"DM";return t.jsxs("div",{className:"px-4 py-3 border-b border-border/50 cursor-pointer hover:bg-accent/50 transition-colors",role:"button",tabIndex:0,onClick:()=>S(e),onKeyDown:u=>{(u.key==="Enter"||u.key===" ")&&(u.preventDefault(),S(e))},children:[t.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[t.jsx("span",{className:I("text-[10px] font-medium px-1.5 py-0.5 rounded",e.type==="CHAN"?"bg-primary/20 text-primary":"bg-secondary text-secondary-foreground"),children:s}),t.jsx("span",{className:"text-[12px] font-medium text-foreground truncate",children:o}),t.jsx("span",{className:"text-[11px] text-muted-foreground ml-auto flex-shrink-0",children:Q(e.received_at)})]}),t.jsxs("div",{className:"text-[13px] text-foreground/80 line-clamp-2 break-words",children:[e.sender_name&&!e.outgoing&&t.jsxs("span",{className:"text-muted-foreground",children:[e.sender_name,": "]}),e.outgoing&&t.jsx("span",{className:"text-muted-foreground",children:"You: "}),T(e.sender_name&&e.text.startsWith(`${e.sender_name}: `)?e.text.slice(e.sender_name.length+2):e.text,R)]})]},e.id)}),f&&t.jsx("div",{className:"p-4 text-center text-muted-foreground text-sm",role:"status",children:"Searching..."}),A&&!f&&t.jsx("div",{className:"p-4 text-center",children:t.jsx(B,{variant:"outline",size:"sm",onClick:M,childLine truncated
//# sourceMappingURL=SearchView-CvQIQlHy.js.map
import{r as n,k as _,A as w,j as t,I as H,l as I,m as Q,B}from"./index-C_33NHxn.js";const b=50,D=300,O=new RegExp('(?<!\\S)(user|channel):(?:"((?:[^"\\\\]|\\\\.)*)"|(\\S+))',"gi");function T(c,d){if(!d)return[c];const i=[],m=new RegExp(`(${d.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")})`,"gi"),r=c.split(m);for(let l=0;l<r.length;l++)m.test(r[l])?i.push(t.jsx("mark",{className:"bg-primary/30 text-foreground rounded-sm px-0.5",children:r[l]},l)):i.push(r[l]),m.lastIndex=0;return i}function L(c){const d=[];let i=0,m=!1;for(const r of c.matchAll(O))m=!0,d.push(c.slice(i,r.index)),i=(r.index??0)+r[0].length;return m?(d.push(c.slice(i)),d.map(r=>r.trim()).filter(Boolean).join(" ")):c}function $({contacts:c,channels:d,visibilityVersion:i=0,onNavigateToMessage:m,prefillRequest:r=null}){const[l,v]=n.useState(""),[a,k]=n.useState(""),[C,h]=n.useState([]),[f,p]=n.useState(!1),[A,g]=n.useState(!1),[E,y]=n.useState(0),x=n.useRef(null),j=n.useRef(null),R=L(a);n.useEffect(()=>{const e=setTimeout(()=>{k(l.trim())},D);return()=>clearTimeout(e)},[l]),n.useEffect(()=>{h([]),y(0),g(!1)},[a,i]),n.useEffect(()=>{var o;if(!r)return;const e=r.query.trim();v(e),k(e),(o=j.current)==null||o.focus()},[r]),n.useEffect(()=>()=>{var e;(e=x.current)==null||e.abort()},[]),n.useEffect(()=>{var o;if(!a){h([]),g(!1);return}(o=x.current)==null||o.abort();const e=new AbortController;return x.current=e,p(!0),_.getMessages({q:a,limit:b,offset:0},e.signal).then(s=>{h(s),g(s.length>=b),y(s.length)}).catch(s=>{w(s)||console.error("Search failed:",s)}).finally(()=>{p(!1)}),()=>e.abort()},[a,i]);const M=n.useCallback(()=>{var o;if(!a||f)return;(o=x.current)==null||o.abort();const e=new AbortController;x.current=e,p(!0),_.getMessages({q:a,limit:b,offset:E},e.signal).then(s=>{h(u=>[...u,...s]),g(s.length>=b),y(u=>u+s.length)}).catch(s=>{w(s)||console.error("Search load more failed:",s)}).finally(()=>{p(!1)})},[a,f,E]),N=n.useCallback(e=>{if(e.type==="CHAN"){const s=d.find(u=>u.key.toUpperCase()===e.conversation_key.toUpperCase());return(s==null?void 0:s.name)||e.conversation_key.slice(0,8)}const o=c.find(s=>s.public_key.toLowerCase()===e.conversation_key.toLowerCase());return(o==null?void 0:o.name)||e.conversation_key.slice(0,12)},[c,d]),S=n.useCallback(e=>{m({id:e.id,type:e.type,conversation_key:e.conversation_key,conversation_name:N(e)})},[m,N]);return n.useEffect(()=>{var e;(e=j.current)==null||e.focus()},[]),t.jsxs("div",{className:"flex flex-col h-full",children:[t.jsx("h2",{className:"flex justify-between items-center px-4 py-2.5 border-b border-border font-semibold text-base",children:"Message Search"}),t.jsx("div",{className:"px-4 py-3 border-b border-border",children:t.jsx(H,{ref:j,type:"text",placeholder:"Search all messages...",value:l,onChange:e=>v(e.target.value),className:"h-9 text-sm","aria-label":"Search messages"})}),t.jsxs("div",{className:"flex-1 overflow-y-auto",children:[!a&&t.jsxs("div",{className:"p-8 text-center text-muted-foreground text-sm",children:[t.jsx("p",{children:"Type to search across all messages"}),t.jsxs("p",{className:"mt-2 text-xs",children:["Tip: use ",t.jsx("code",{children:"user:"})," or ",t.jsx("code",{children:"channel:"})," for keys or names, and wrap names with spaces in them in quotes."]}),t.jsx("p",{className:"mt-2 text-xs",children:"Warning: User-key linkage for group messages is best-effort and based on correlation at advertise time. It does not account for multiple users with the same name, and should be considered unreliable."})]}),a&&C.length===0&&!f&&t.jsxs("div",{className:"p-8 text-center text-muted-foreground text-sm",children:["No messages found for “",a,"”"]}),C.map(e=>{const o=N(e),s=e.type==="CHAN"?"Channel":"DM";return t.jsxs("div",{className:"px-4 py-3 border-b border-border/50 cursor-pointer hover:bg-accent/50 transition-colors",role:"button",tabIndex:0,onClick:()=>S(e),onKeyDown:u=>{(u.key==="Enter"||u.key===" ")&&(u.preventDefault(),S(e))},children:[t.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[t.jsx("span",{className:I("text-[10px] font-medium px-1.5 py-0.5 rounded",e.type==="CHAN"?"bg-primary/20 text-primary":"bg-secondary text-secondary-foreground"),children:s}),t.jsx("span",{className:"text-[12px] font-medium text-foreground truncate",children:o}),t.jsx("span",{className:"text-[11px] text-muted-foreground ml-auto flex-shrink-0",children:Q(e.received_at)})]}),t.jsxs("div",{className:"text-[13px] text-foreground/80 line-clamp-2 break-words",children:[e.sender_name&&!e.outgoing&&t.jsxs("span",{className:"text-muted-foreground",children:[e.sender_name,": "]}),e.outgoing&&t.jsx("span",{className:"text-muted-foreground",children:"You: "}),T(e.sender_name&&e.text.startsWith(`${e.sender_name}: `)?e.text.slice(e.sender_name.length+2):e.text,R)]})]},e.id)}),f&&t.jsx("div",{className:"p-4 text-center text-muted-foreground text-sm",role:"status",children:"Searching..."}),A&&!f&&t.jsx("div",{className:"p-4 text-center",children:t.jsx(B,{variant:"outline",size:"sm",onClick:M,childLine truncated
//# sourceMappingURL=SearchView-RhP_4yQI.js.map
@@ -1 +1 @@
{"version":3,"file":"SearchView-CvQIQlHy.js","sources":["../../src/components/SearchView.tsx"],"sourcesContent":["import { useState, useEffect, useRef, useCallback } from 'react';\nimport { api, isAbortError } from '../api';\nimport type { Contact, Channel } from '../types';\nimport { formatTime } from '../utils/messageParser';\nimport { Input } from './ui/input';\nimport { Button } from './ui/button';\nimport { cn } from '@/lib/utils';\n\nconst SEARCH_PAGE_SIZE = 50;\nconst DEBOUNCE_MS = 300;\n\ninterface SearchResult {\n id: number;\n type: 'PRIV' | 'CHAN';\n conversation_key: string;\n text: string;\n received_at: number;\n outgoing: boolean;\n sender_name: string | null;\n}\n\nconst SEARCH_OPERATOR_RE = /(?<!\\S)(user|channel):(?:\"((?:[^\"\\\\]|\\\\.)*)\"|(\\S+))/gi;\n\nexport interface SearchNavigateTarget {\n id: number;\n type: 'PRIV' | 'CHAN';\n conversation_key: string;\n conversation_name: string;\n}\n\nexport interface SearchViewProps {\n contacts: Contact[];\n channels: Channel[];\n visibilityVersion?: number;\n onNavigateToMessage: (target: SearchNavigateTarget) => void;\n prefillRequest?: {\n query: string;\n nonce: number;\n } | null;\n}\n\nfunction highlightMatch(text: string, query: string): React.ReactNode[] {\n if (!query) return [text];\n const parts: React.ReactNode[] = [];\n const regex = new RegExp(`(${query.replace(/[.*+?^${}()|[\\]\\\\]/g, '\\\\$&')})`, 'gi');\n const segments = text.split(regex);\n for (let i = 0; i < segments.length; i++) {\n if (regex.test(segments[i])) {\n parts.push(\n <mark key={i} className=\"bg-primary/30 text-foreground rounded-sm px-0.5\">\n {segments[i]}\n </mark>\n );\n } else {\n parts.push(segments[i]);\n }\n // Reset lastIndex since we're using test() in a loop\n regex.lastIndex = 0;\n }\n return parts;\n}\n\nfunction getHighlightQuery(query: string): string {\n const fragments: string[] = [];\n let lastIndex = 0;\n let foundOperator = false;\n\n for (const match of query.matchAll(SEARCH_OPERATOR_RE)) {\n foundOperator = true;\n fragments.push(query.slice(lastIndex, match.index));\n lastIndex = (match.index ?? 0) + match[0].length;\n }\n\n if (!foundOperator) {\n return query;\n }\n\n fragments.push(query.slice(lastIndex));\n return fragments\n .map((fragment) => fragment.trim())\n .filter(Boolean)\n .join(' ');\n}\n\nexport function SearchView({\n contacts,\n channels,\n visibilityVersion = 0,\n onNavigateToMessage,\n prefillRequest = null,\n}: SearchViewProps) {\n const [query, setQuery] = useState('');\n const [debouncedQuery, setDebouncedQuery] = useState('');\n const [results, setResults] = useState<SearchResult[]>([]);\n const [loading, setLoading] = useState(false);\n const [hasMore, setHasMore] = useState(false);\n const [offset, setOffset] = useState(0);\n const abortRef = useRef<AbortController | null>(null);\n const inputRef = useRef<HTMLInputElement>(null);\n const highlightQuery = getHighlightQuery(debouncedQuery);\n\n // Debounce query\n useEffect(() => {\n const timer = setTimeout(() => {\n setDebouncedQuery(query.trim());\n }, DEBOUNCE_MS);\n return () => clearTimeout(timer);\n }, [query]);\n\n // Reset results when query changes\n useEffect(() => {\n setResults([]);\n setOffset(0);\n setHasMore(false);\n }, [debouncedQuery, visibilityVersion]);\n\n useEffect(() => {\n if (!prefillRequest) {\n return;\n }\n\n const nextQuery = prefillRequest.query.trim();\n setQuery(nextQuery);\n setDebouncedQuery(nextQuery);\n inputRef.current?.focus();\n }, [prefillRequest]);\n\n useEffect(() => {\n return () => {\n abortRef.current?.abort();\n };\n }, []);\n\n // Fetch search results\n useEffect(() => {\n if (!debouncedQuery) {\n setResults([]);\n setHasMore(false);\n return;\n }\n\n abortRef.current?.abort();\n const controller = new AbortController();\n abortRef.current = controller;\n\n setLoading(true);\n api\n .getMessages({ q: debouncedQuery, limit: SEARCH_PAGE_SIZE, offset: 0 }, controller.signal)\n .then((data) => {\n setResults(data as SearchResult[]);\n setHasMore(data.length >= SEARCH_PAGE_SIZE);\n setOffset(data.length);\n })\n .catch((err) => {\n if (!isAbortError(err)) {\n console.error('Search failed:', err);\n }\n })\n .finally(() => {\n setLoading(false);\n });\n\n return () => controller.abort();\n }, [debouncedQuery, visibilityVersion]);\n\n const loadMore = useCallback(() => {\n if (!debouncedQuery || loading) return;\n\n abortRef.current?.abort();\n const controller = new AbortController();\n abortRef.current = controller;\n\n setLoading(true);\n api\n .getMessages({ q: debouncedQuery, limit: SEARCH_PAGE_SIZE, offset }, controller.signal)\n .then((data) => {\n setResults((preLine truncated
{"version":3,"file":"SearchView-RhP_4yQI.js","sources":["../../src/components/SearchView.tsx"],"sourcesContent":["import { useState, useEffect, useRef, useCallback } from 'react';\nimport { api, isAbortError } from '../api';\nimport type { Contact, Channel } from '../types';\nimport { formatTime } from '../utils/messageParser';\nimport { Input } from './ui/input';\nimport { Button } from './ui/button';\nimport { cn } from '@/lib/utils';\n\nconst SEARCH_PAGE_SIZE = 50;\nconst DEBOUNCE_MS = 300;\n\ninterface SearchResult {\n id: number;\n type: 'PRIV' | 'CHAN';\n conversation_key: string;\n text: string;\n received_at: number;\n outgoing: boolean;\n sender_name: string | null;\n}\n\nconst SEARCH_OPERATOR_RE = /(?<!\\S)(user|channel):(?:\"((?:[^\"\\\\]|\\\\.)*)\"|(\\S+))/gi;\n\nexport interface SearchNavigateTarget {\n id: number;\n type: 'PRIV' | 'CHAN';\n conversation_key: string;\n conversation_name: string;\n}\n\nexport interface SearchViewProps {\n contacts: Contact[];\n channels: Channel[];\n visibilityVersion?: number;\n onNavigateToMessage: (target: SearchNavigateTarget) => void;\n prefillRequest?: {\n query: string;\n nonce: number;\n } | null;\n}\n\nfunction highlightMatch(text: string, query: string): React.ReactNode[] {\n if (!query) return [text];\n const parts: React.ReactNode[] = [];\n const regex = new RegExp(`(${query.replace(/[.*+?^${}()|[\\]\\\\]/g, '\\\\$&')})`, 'gi');\n const segments = text.split(regex);\n for (let i = 0; i < segments.length; i++) {\n if (regex.test(segments[i])) {\n parts.push(\n <mark key={i} className=\"bg-primary/30 text-foreground rounded-sm px-0.5\">\n {segments[i]}\n </mark>\n );\n } else {\n parts.push(segments[i]);\n }\n // Reset lastIndex since we're using test() in a loop\n regex.lastIndex = 0;\n }\n return parts;\n}\n\nfunction getHighlightQuery(query: string): string {\n const fragments: string[] = [];\n let lastIndex = 0;\n let foundOperator = false;\n\n for (const match of query.matchAll(SEARCH_OPERATOR_RE)) {\n foundOperator = true;\n fragments.push(query.slice(lastIndex, match.index));\n lastIndex = (match.index ?? 0) + match[0].length;\n }\n\n if (!foundOperator) {\n return query;\n }\n\n fragments.push(query.slice(lastIndex));\n return fragments\n .map((fragment) => fragment.trim())\n .filter(Boolean)\n .join(' ');\n}\n\nexport function SearchView({\n contacts,\n channels,\n visibilityVersion = 0,\n onNavigateToMessage,\n prefillRequest = null,\n}: SearchViewProps) {\n const [query, setQuery] = useState('');\n const [debouncedQuery, setDebouncedQuery] = useState('');\n const [results, setResults] = useState<SearchResult[]>([]);\n const [loading, setLoading] = useState(false);\n const [hasMore, setHasMore] = useState(false);\n const [offset, setOffset] = useState(0);\n const abortRef = useRef<AbortController | null>(null);\n const inputRef = useRef<HTMLInputElement>(null);\n const highlightQuery = getHighlightQuery(debouncedQuery);\n\n // Debounce query\n useEffect(() => {\n const timer = setTimeout(() => {\n setDebouncedQuery(query.trim());\n }, DEBOUNCE_MS);\n return () => clearTimeout(timer);\n }, [query]);\n\n // Reset results when query changes\n useEffect(() => {\n setResults([]);\n setOffset(0);\n setHasMore(false);\n }, [debouncedQuery, visibilityVersion]);\n\n useEffect(() => {\n if (!prefillRequest) {\n return;\n }\n\n const nextQuery = prefillRequest.query.trim();\n setQuery(nextQuery);\n setDebouncedQuery(nextQuery);\n inputRef.current?.focus();\n }, [prefillRequest]);\n\n useEffect(() => {\n return () => {\n abortRef.current?.abort();\n };\n }, []);\n\n // Fetch search results\n useEffect(() => {\n if (!debouncedQuery) {\n setResults([]);\n setHasMore(false);\n return;\n }\n\n abortRef.current?.abort();\n const controller = new AbortController();\n abortRef.current = controller;\n\n setLoading(true);\n api\n .getMessages({ q: debouncedQuery, limit: SEARCH_PAGE_SIZE, offset: 0 }, controller.signal)\n .then((data) => {\n setResults(data as SearchResult[]);\n setHasMore(data.length >= SEARCH_PAGE_SIZE);\n setOffset(data.length);\n })\n .catch((err) => {\n if (!isAbortError(err)) {\n console.error('Search failed:', err);\n }\n })\n .finally(() => {\n setLoading(false);\n });\n\n return () => controller.abort();\n }, [debouncedQuery, visibilityVersion]);\n\n const loadMore = useCallback(() => {\n if (!debouncedQuery || loading) return;\n\n abortRef.current?.abort();\n const controller = new AbortController();\n abortRef.current = controller;\n\n setLoading(true);\n api\n .getMessages({ q: debouncedQuery, limit: SEARCH_PAGE_SIZE, offset }, controller.signal)\n .then((data) => {\n setResults((preLine truncated
@@ -1,5 +1,5 @@
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/BotCodeEditor-3AsJnjQI.js","assets/index-BUPp0i0i.js","assets/index-Cx5ENk0V.css"])))=>i.map(i=>d[i]);
import{c as Xe,r as o,s as ze,j as e,L as c,B as F,I as x,t as N,g as hs,T as gs,a as fs,b as js,d as $e,e as Ke,f as bs,C as We,h as vs,i as ys,k as V,l as xe,_ as Ns,m as ws,S as _s,n as ks}from"./index-BUPp0i0i.js";import{S as b}from"./separator-C7ZN2sFh.js";/**
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/BotCodeEditor-BiRWyRIv.js","assets/index-C_33NHxn.js","assets/index-Cx5ENk0V.css"])))=>i.map(i=>d[i]);
import{c as Xe,r as o,s as ze,j as e,L as c,B as F,I as x,t as N,g as hs,T as gs,a as fs,b as js,d as $e,e as Ke,f as bs,C as We,h as vs,i as ys,k as V,l as xe,_ as Ns,m as ws,S as _s,n as ks}from"./index-C_33NHxn.js";import{S as b}from"./separator-BtL4plOj.js";/**
* @license lucide-react v0.562.0 - ISC
*
* This source code is licensed under the ISC license.
@@ -9,7 +9,7 @@ import{c as Xe,r as o,s as ze,j as e,L as c,B as F,I as x,t as N,g as hs,T as gs
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Ts=[["path",{d:"M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z",key:"18887p"}]],Es=Xe("message-square",Ts),pe=[{name:"USA/Canada",freq:910.525,bw:62.5,sf:7,cr:5},{name:"Australia",freq:915.8,bw:250,sf:10,cr:5},{name:"Australia (narrow)",freq:916.575,bw:62.5,sf:7,cr:8},{name:"Australia SA, WA",freq:923.125,bw:62.5,sf:8,cr:8},{name:"Australia QLD",freq:923.125,bw:62.5,sf:8,cr:5},{name:"New Zealand",freq:917.375,bw:250,sf:11,cr:5},{name:"New Zealand (narrow)",freq:917.375,bw:62.5,sf:7,cr:5},{name:"EU/UK/Switzerland Long Range",freq:869.525,bw:250,sf:11,cr:5},{name:"EU/UK/Switzerland Medium Range",freq:869.525,bw:250,sf:10,cr:5},{name:"EU/UK/Switzerland Narrow",freq:869.618,bw:62.5,sf:8,cr:8},{name:"Czech Republic (Narrow)",freq:869.432,bw:62.5,sf:7,cr:5},{name:"EU 433MHz Long Range",freq:433.65,bw:250,sf:11,cr:5},{name:"Portugal 433MHz",freq:433.375,bw:62.5,sf:9,cr:6},{name:"Portugal 868MHz",freq:869.618,bw:62.5,sf:7,cr:6},{name:"Vietnam",freq:920.25,bw:250,sf:11,cr:5}];function Fs({config:s,health:t,appSettings:n,pageMode:a,onSave:d,onSaveAppSettings:w,onSetPrivateKey:S,onReboot:j,onDisconnect:_,onReconnect:h,onAdvertise:p,meshDiscovery:v,meshDiscoveryLoadingTarget:C,onDiscoverMesh:M,onClose:I,className:K}){const[U,L]=o.useState(""),[R,q]=o.useState(""),[B,O]=o.useState(""),[W,G]=o.useState(""),[m,A]=o.useState(""),[X,u]=o.useState(""),[y,T]=o.useState(""),[H,se]=o.useState(""),[re,Y]=o.useState("0"),[Q,E]=o.useState("current"),[J,z]=o.useState(!1),[i,l]=o.useState(!1),[f,g]=o.useState(!1),[D,Z]=o.useState(null),[P,je]=o.useState(""),[be,ve]=o.useState(!1),[ye,Ne]=o.useState(!1),[we,le]=o.useState(null),[_e,ke]=o.useState("0"),[ue,Se]=o.useState(""),[Ce,Te]=o.useState(""),[Ee,Fe]=o.useState(!1),[Ae,Me]=o.useState(null),[Le,qe]=o.useState(!1),[Pe,Re]=o.useState(null),[De,Ie]=o.useState(!1);o.useEffect(()=>{L(s.name),q(String(s.lat)),O(String(s.lon)),G(String(s.tx_power)),A(String(s.radio.freq)),u(String(s.radio.bw)),T(String(s.radio.sf)),se(String(s.radio.cr)),Y(String(s.path_hash_mode)),E(s.advert_location_source??"current")},[s]),o.useEffect(()=>{ke(String(Math.round(n.advert_interval/3600))),Se(ze(n.flood_scope)),Te(String(n.max_radio_contacts))},[n]);const as=o.useMemo(()=>{const r=parseFloat(m),k=parseFloat(X),ee=parseInt(y,10),te=parseInt(H,10);for(const ae of pe)if(ae.freq===r&&ae.bw===k&&ae.sf===ee&&ae.cr===te)return ae.name;return"custom"},[m,X,y,H]),rs=r=>{if(r==="custom")return;const k=pe.find(ee=>ee.name===r);k&&(A(String(k.freq)),u(String(k.bw)),T(String(k.sf)),se(String(k.cr)))},ns=()=>{if(!navigator.geolocation){N.error("Geolocation not supported",{description:"Your browser does not support geolocation"});return}z(!0),navigator.geolocation.getCurrentPosition(r=>{q(r.coords.latitude.toFixed(6)),O(r.coords.longitude.toFixed(6)),z(!1),N.success("Location updated")},r=>{z(!1),N.error("Failed to get location",{description:r.message})},{enableHighAccuracy:!0,timeout:1e4})},Be=()=>{const r=parseFloat(R),k=parseFloat(B),ee=parseInt(W,10),te=parseFloat(m),ae=parseFloat(X),Ue=parseInt(y,10),He=parseInt(H,10);if([r,k,ee,te,ae,Ue,He].some(ps=>isNaN(ps)))return Z("All numeric fields must have valid values"),null;const me=parseInt(re,10);return{name:U,lat:r,lon:k,tx_power:ee,...Q!==(s.advert_location_source??"current")?{advert_location_source:Q}:{},radio:{freq:te,bw:ae,sf:Ue,cr:He},...s.path_hash_mode_supported&&!isNaN(me)&&me!==s.path_hash_mode?{path_hash_mode:me}:{}}},os=async()=>{Z(null);const r=Be();if(r){l(!0);try{await d(r),N.success("Radio config saved")}catch(k){Z(k instanceof Error?k.message:"Failed to save")}finally{l(!1)}}},is=async()=>{Z(null);const r=Be();if(r){l(!0);try{await d(r),N.success("Radio config saved, rebooting..."),g(!0),await j(),a||I()}catch(k){Z(k instanceof Error?k.message:"Failed to save")}finally{g(!1),l(!1)}}},cs=async()=>{if(!P.trim()){le("Private key is required");return}le(null),ve(!0);try{await S(P.trim()),je(""),N.success("Private key set, rebooting..."),Ne(!0),await j(),a||I()}catch(r){le(r instanceof Error?r.message:"Failed to set private key")}finally{Ne(!1),ve(!1)}},ds=async()=>{Me(null),Fe(!0);try{const r={},k=parseInt(_e,10),ee=isNaN(k)?0:k*3600;ee!==n.advert_interval&&(r.advert_interval=ee),ue!==ze(n.flood_scope)&&(r.flood_scope=ue);const te=parseInt(Ce,10);!isNaN(te)&&te!==n.max_radio_contacts&&(r.max_radio_contacts=te),Object.keys(r).length>0&&await w(r),N.success("Settings saved")}catch(r){Me(r instanceof Error?r.message:"Failed to save")}finally{Fe(!1)}},ls=async()=>{qe(!0);try{await p()}finally{qe(!1)}},us=async r=>{Re(null);try{await M(r)}catch(k){Re(k instanceof Error?k.message:"Failed to run mesh discovery")}},$=(t==null?void 0:t.radio_state)??(t!=null&&t.radio_initializing?"initializing":"disconnected"),Oe=$==="paused"?"Reconnect":$==="connected"||$==="initializing"?"Disconnect":"Stop Trying",ms=$==="connected"?(t==null?void 0:t.connection_info)||"Connected":$==="initializing"?`ILine truncated
*/const Ts=[["path",{d:"M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z",key:"18887p"}]],Es=Xe("message-square",Ts),pe=[{name:"USA/Canada",freq:910.525,bw:62.5,sf:7,cr:5},{name:"Australia",freq:915.8,bw:250,sf:10,cr:5},{name:"Australia (narrow)",freq:916.575,bw:62.5,sf:7,cr:8},{name:"Australia SA, WA",freq:923.125,bw:62.5,sf:8,cr:8},{name:"Australia QLD",freq:923.125,bw:62.5,sf:8,cr:5},{name:"New Zealand",freq:917.375,bw:250,sf:11,cr:5},{name:"New Zealand (narrow)",freq:917.375,bw:62.5,sf:7,cr:5},{name:"EU/UK/Switzerland Long Range",freq:869.525,bw:250,sf:11,cr:5},{name:"EU/UK/Switzerland Medium Range",freq:869.525,bw:250,sf:10,cr:5},{name:"EU/UK/Switzerland Narrow",freq:869.618,bw:62.5,sf:8,cr:8},{name:"Czech Republic (Narrow)",freq:869.432,bw:62.5,sf:7,cr:5},{name:"EU 433MHz Long Range",freq:433.65,bw:250,sf:11,cr:5},{name:"Portugal 433MHz",freq:433.375,bw:62.5,sf:9,cr:6},{name:"Portugal 868MHz",freq:869.618,bw:62.5,sf:7,cr:6},{name:"Vietnam",freq:920.25,bw:250,sf:11,cr:5}];function Fs({config:s,health:t,appSettings:n,pageMode:a,onSave:d,onSaveAppSettings:w,onSetPrivateKey:S,onReboot:j,onDisconnect:_,onReconnect:h,onAdvertise:p,meshDiscovery:v,meshDiscoveryLoadingTarget:C,onDiscoverMesh:M,onClose:I,className:K}){const[U,L]=o.useState(""),[R,q]=o.useState(""),[B,O]=o.useState(""),[W,G]=o.useState(""),[m,A]=o.useState(""),[X,u]=o.useState(""),[y,T]=o.useState(""),[H,se]=o.useState(""),[re,Y]=o.useState("0"),[Q,E]=o.useState("current"),[J,z]=o.useState(!1),[i,l]=o.useState(!1),[f,g]=o.useState(!1),[D,Z]=o.useState(null),[P,je]=o.useState(""),[be,ve]=o.useState(!1),[ye,Ne]=o.useState(!1),[we,le]=o.useState(null),[_e,ke]=o.useState("0"),[ue,Se]=o.useState(""),[Ce,Te]=o.useState(""),[Ee,Fe]=o.useState(!1),[Ae,Me]=o.useState(null),[Le,qe]=o.useState(!1),[Pe,Re]=o.useState(null),[De,Ie]=o.useState(!1);o.useEffect(()=>{L(s.name),q(String(s.lat)),O(String(s.lon)),G(String(s.tx_power)),A(String(s.radio.freq)),u(String(s.radio.bw)),T(String(s.radio.sf)),se(String(s.radio.cr)),Y(String(s.path_hash_mode)),E(s.advert_location_source??"current")},[s]),o.useEffect(()=>{ke(String(Math.round(n.advert_interval/3600))),Se(ze(n.flood_scope)),Te(String(n.max_radio_contacts))},[n]);const as=o.useMemo(()=>{const r=parseFloat(m),k=parseFloat(X),ee=parseInt(y,10),te=parseInt(H,10);for(const ae of pe)if(ae.freq===r&&ae.bw===k&&ae.sf===ee&&ae.cr===te)return ae.name;return"custom"},[m,X,y,H]),rs=r=>{if(r==="custom")return;const k=pe.find(ee=>ee.name===r);k&&(A(String(k.freq)),u(String(k.bw)),T(String(k.sf)),se(String(k.cr)))},ns=()=>{if(!navigator.geolocation){N.error("Geolocation not supported",{description:"Your browser does not support geolocation"});return}z(!0),navigator.geolocation.getCurrentPosition(r=>{q(r.coords.latitude.toFixed(6)),O(r.coords.longitude.toFixed(6)),z(!1),N.success("Location updated")},r=>{z(!1),N.error("Failed to get location",{description:r.message})},{enableHighAccuracy:!0,timeout:1e4})},Be=()=>{const r=parseFloat(R),k=parseFloat(B),ee=parseInt(W,10),te=parseFloat(m),ae=parseFloat(X),Ue=parseInt(y,10),He=parseInt(H,10);if([r,k,ee,te,ae,Ue,He].some(ps=>isNaN(ps)))return Z("All numeric fields must have valid values"),null;const me=parseInt(re,10);return{name:U,lat:r,lon:k,tx_power:ee,...Q!==(s.advert_location_source??"current")?{advert_location_source:Q}:{},radio:{freq:te,bw:ae,sf:Ue,cr:He},...s.path_hash_mode_supported&&!isNaN(me)&&me!==s.path_hash_mode?{path_hash_mode:me}:{}}},os=async()=>{Z(null);const r=Be();if(r){l(!0);try{await d(r),N.success("Radio config saved")}catch(k){Z(k instanceof Error?k.message:"Failed to save")}finally{l(!1)}}},is=async()=>{Z(null);const r=Be();if(r){l(!0);try{await d(r),N.success("Radio config saved, rebooting..."),g(!0),await j(),a||I()}catch(k){Z(k instanceof Error?k.message:"Failed to save")}finally{g(!1),l(!1)}}},cs=async()=>{if(!P.trim()){le("Private key is required");return}le(null),ve(!0);try{await S(P.trim()),je(""),N.success("Private key set, rebooting..."),Ne(!0),await j(),a||I()}catch(r){le(r instanceof Error?r.message:"Failed to set private key")}finally{Ne(!1),ve(!1)}},ds=async()=>{Me(null),Fe(!0);try{const r={},k=parseInt(_e,10),ee=isNaN(k)?0:k*3600;ee!==n.advert_interval&&(r.advert_interval=ee),ue!==ze(n.flood_scope)&&(r.flood_scope=ue);const te=parseInt(Ce,10);!isNaN(te)&&te!==n.max_radio_contacts&&(r.max_radio_contacts=te),Object.keys(r).length>0&&await w(r),N.success("Settings saved")}catch(r){Me(r instanceof Error?r.message:"Failed to save")}finally{Fe(!1)}},ls=async()=>{qe(!0);try{await p()}finally{qe(!1)}},us=async r=>{Re(null);try{await M(r)}catch(k){Re(k instanceof Error?k.message:"Failed to run mesh discovery")}},$=(t==null?void 0:t.radio_state)??(t!=null&&t.radio_initializing?"initializing":"disconnected"),Oe=$==="paused"?"Reconnect":$==="connected"||$==="initializing"?"Disconnect":"Stop Trying",ms=$==="connected"?(t==null?void 0:t.connection_info)||"Connected":$==="initializing"?`ILine truncated
`).map(d=>d.trim()).filter(Boolean);if(n.length===0)return"No targets configured";const a=n.join(", ");return a.length<=t?a:`${a.slice(0,t-3)}...`}function Is(s){const t=(s.queue_url||"").trim();return t||"No queue configured"}function Bs(s,t){const n=Ze[s]||s,a=t.filter(d=>d.type===s).length+1;return`${n} #${a}`}const ts=`def bot(**kwargs) -> str | list[str] | None:
"""
Process messages and optionally return a reply.
@@ -46,5 +46,5 @@ import{c as Xe,r as o,s as ze,j as e,L as c,B as F,I as x,t as N,g as hs,T as gs
return "[BOT] Plong!"
return None`;function Je(s,t){return s==="connected"?t==="bot"||t==="webhook"||t==="apprise"?"Active":"Connected":s==="error"?"Error":s==="disconnected"?"Disconnected":"Inactive"}function Os(s,t){return t===!1?"bg-muted-foreground":s==="connected"?"bg-status-connected shadow-[0_0_6px_hsl(var(--status-connected)/0.5)]":s==="error"||s==="disconnected"?"bg-destructive shadow-[0_0_6px_hsl(var(--destructive)/0.5)]":"bg-muted-foreground"}function Us({config:s,scope:t,onChange:n,onScopeChange:a}){return e.jsxs("div",{className:"space-y-3",children:[e.jsx("p",{className:"text-xs text-muted-foreground",children:"Forward mesh data to your own MQTT broker for home automation, logging, or alerting."}),e.jsx("div",{className:"rounded-md border border-warning/50 bg-warning/10 px-3 py-2 text-xs text-warning",children:"Outgoing messages (DMs and group messages) will be reported to private MQTT brokers in decrypted/plaintext form."}),e.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-4",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx(c,{htmlFor:"fanout-mqtt-host",children:"Broker Host"}),e.jsx(x,{id:"fanout-mqtt-host",type:"text",placeholder:"e.g. 192.168.1.100",value:s.broker_host||"",onChange:d=>n({...s,broker_host:d.target.value})})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(c,{htmlFor:"fanout-mqtt-port",children:"Broker Port"}),e.jsx(x,{id:"fanout-mqtt-port",type:"number",min:"1",max:"65535",value:s.broker_port||1883,onChange:d=>n({...s,broker_port:parseInt(d.target.value,10)||1883})})]})]}),e.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-4",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx(c,{htmlFor:"fanout-mqtt-user",children:"Username"}),e.jsx(x,{id:"fanout-mqtt-user",type:"text",placeholder:"Optional",value:s.username||"",onChange:d=>n({...s,username:d.target.value})})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(c,{htmlFor:"fanout-mqtt-pass",children:"Password"}),e.jsx(x,{id:"fanout-mqtt-pass",type:"password",placeholder:"Optional",value:s.password||"",onChange:d=>n({...s,password:d.target.value})})]})]}),e.jsxs("label",{className:"flex items-center gap-3 cursor-pointer",children:[e.jsx("input",{type:"checkbox",checked:!!s.use_tls,onChange:d=>n({...s,use_tls:d.target.checked}),className:"h-4 w-4 rounded border-border"}),e.jsx("span",{className:"text-sm",children:"Use TLS"})]}),!!s.use_tls&&e.jsxs("label",{className:"flex items-center gap-3 cursor-pointer ml-7",children:[e.jsx("input",{type:"checkbox",checked:!!s.tls_insecure,onChange:d=>n({...s,tls_insecure:d.target.checked}),className:"h-4 w-4 rounded border-border"}),e.jsx("span",{className:"text-sm",children:"Skip certificate verification"})]}),e.jsx(b,{}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(c,{htmlFor:"fanout-mqtt-prefix",children:"Topic Prefix"}),e.jsx(x,{id:"fanout-mqtt-prefix",type:"text",value:s.topic_prefix||"meshcore",onChange:d=>n({...s,topic_prefix:d.target.value})})]}),e.jsx(b,{}),e.jsx(de,{scope:t,onChange:a,showRawPackets:!0})]})}function Hs({config:s,onChange:t}){const n=s.auth_mode||ss;return e.jsxs("div",{className:"space-y-3",children:[e.jsx("p",{className:"text-xs text-muted-foreground",children:"Share raw packet data with the MeshCore community for coverage mapping and network analysis. Only raw RF packets are shared — never decrypted messages."}),e.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-4",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx(c,{htmlFor:"fanout-comm-host",children:"Broker Host"}),e.jsx(x,{id:"fanout-comm-host",type:"text",placeholder:oe,value:s.broker_host||oe,onChange:a=>t({...s,broker_host:a.target.value})})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(c,{htmlFor:"fanout-comm-port",children:"Broker Port"}),e.jsx(x,{id:"fanout-comm-port",type:"number",min:"1",max:"65535",value:s.broker_port||ce,onChange:a=>t({...s,broker_port:parseInt(a.target.value,10)||ce})})]})]}),e.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-4",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx(c,{htmlFor:"fanout-comm-transport",children:"Transport"}),e.jsxs("select",{id:"fanout-comm-transport",value:s.transport||es,onChange:a=>t({...s,transport:a.target.value}),className:"w-full rounded-md border border-input bg-background px-3 py-2 text-sm",children:[e.jsx("option",{value:"websockets",children:"WebSockets"}),e.jsx("option",{value:"tcp",children:"TCP"})]})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(c,{htmlFor:"fanout-comm-auth-mode",children:"Authentication"}),e.jsxs("select",{id:"fanout-comm-auth-mode",value:n,onChange:a=>t({...s,auth_mode:a.target.value}),className:"w-full rounded-md border border-input bg-background px-3 py-2 text-sm",children:[e.jsx("option",{value:"token",children:"Token"}),e.jsx("option",{value:"none",children:"None"}),e.jsx("option",{value:"password",children:"Username / Password"})]})]})]}),e.jsxs("p",{className:"text-xs text-muted-foreground",children:["LetsMes Line truncated
slack://token_a/token_b/token_c
tgram://bot_token/chat_id`,value:s.urls||"",onChange:d=>n({...s,urls:d.target.value}),rows:4}),e.jsx("p",{className:"text-xs text-muted-foreground",children:"One URL per line. All URLs receive every matched notification."})]}),e.jsxs("label",{className:"flex items-center gap-3 cursor-pointer",children:[e.jsx("input",{type:"checkbox",checked:s.preserve_identity!==!1,onChange:d=>n({...s,preserve_identity:d.target.checked}),className:"h-4 w-4 rounded border-border"}),e.jsxs("div",{children:[e.jsx("span",{className:"text-sm",children:"Preserve identity on Discord"}),e.jsx("p",{className:"text-xs text-muted-foreground",children:"When enabled, Discord webhooks will use their configured name/avatar instead of overriding with MeshCore sender info."})]})]}),e.jsxs("label",{className:"flex items-center gap-3 cursor-pointer",children:[e.jsx("input",{type:"checkbox",checked:s.include_path!==!1,onChange:d=>n({...s,include_path:d.target.checked}),className:"h-4 w-4 rounded border-border"}),e.jsx("span",{className:"text-sm",children:"Include routing path in notifications"})]}),e.jsx(b,{}),e.jsx(de,{scope:t,onChange:a})]})}function Ws({config:s,scope:t,onChange:n,onScopeChange:a}){const d=JSON.stringify(s.headers??{},null,2),[w,S]=o.useState(d),[j,_]=o.useState(null),h=p=>{S(p);try{const v=JSON.parse(p);if(typeof v!="object"||Array.isArray(v)){_("Must be a JSON object");return}_(null),n({...s,headers:v})}catch{_("Invalid JSON")}};return e.jsxs("div",{className:"space-y-3",children:[e.jsx("p",{className:"text-xs text-muted-foreground",children:"Send message data as JSON to an HTTP endpoint when messages are received."}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(c,{htmlFor:"fanout-webhook-url",children:"URL"}),e.jsx(x,{id:"fanout-webhook-url",type:"url",placeholder:"https://example.com/webhook",value:s.url||"",onChange:p=>n({...s,url:p.target.value})})]}),e.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-4",children:e.jsxs("div",{className:"space-y-2",children:[e.jsx(c,{htmlFor:"fanout-webhook-method",children:"HTTP Method"}),e.jsxs("select",{id:"fanout-webhook-method",value:s.method||"POST",onChange:p=>n({...s,method:p.target.value}),className:"w-full rounded-md border border-input bg-background px-3 py-2 text-sm",children:[e.jsx("option",{value:"POST",children:"POST"}),e.jsx("option",{value:"PUT",children:"PUT"}),e.jsx("option",{value:"PATCH",children:"PATCH"})]})]})}),e.jsx(b,{}),e.jsxs("div",{className:"space-y-3",children:[e.jsx(c,{children:"HMAC Signing"}),e.jsxs("p",{className:"text-xs text-muted-foreground",children:["When a secret is set, each request includes an HMAC-SHA256 signature of the JSON body in the specified header (e.g. ",e.jsx("code",{className:"bg-muted px-1 rounded",children:"sha256=ab12cd..."}),")."]}),e.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-4",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx(c,{htmlFor:"fanout-webhook-hmac-secret",children:"HMAC Secret"}),e.jsx(x,{id:"fanout-webhook-hmac-secret",type:"password",placeholder:"Leave empty to disable signing",value:s.hmac_secret||"",onChange:p=>n({...s,hmac_secret:p.target.value})})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(c,{htmlFor:"fanout-webhook-hmac-header",children:"Signature Header Name"}),e.jsx(x,{id:"fanout-webhook-hmac-header",type:"text",placeholder:"X-Webhook-Signature",value:s.hmac_header||"",onChange:p=>n({...s,hmac_header:p.target.value})})]})]})]}),e.jsx(b,{}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(c,{htmlFor:"fanout-webhook-headers",children:"Extra Headers (JSON)"}),e.jsx("textarea",{id:"fanout-webhook-headers",className:"w-full rounded-md border border-input bg-background px-3 py-2 text-sm font-mono min-h-[60px]",value:w,onChange:p=>h(p.target.value),placeholder:'{"Authorization": "Bearer ..."}'}),j&&e.jsx("p",{className:"text-xs text-destructive",children:j})]}),e.jsx(b,{}),e.jsx(de,{scope:t,onChange:a})]})}function Gs({config:s,scope:t,onChange:n,onScopeChange:a}){return e.jsxs("div",{className:"space-y-3",children:[e.jsx("p",{className:"text-xs text-muted-foreground",children:"Send matched mesh events to an Amazon SQS queue for durable processing by workers, Lambdas, or downstream automation."}),e.jsx("div",{className:"rounded-md border border-warning/50 bg-warning/10 px-3 py-2 text-xs text-warning",children:"Outgoing messages and any selected raw packets will be delivered exactly as forwarded by the fanout scope, including decrypted/plaintext message content."}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(c,{htmlFor:"fanout-sqs-queue-url",children:"Queue URL"}),e.jsx(x,{id:"fanout-sqs-queue-url",type:"url",placeholder:"https://sqs.us-east-1.amazonaws.com/123456789012/mesh-events",value:s.queue_url||"",onChange:d=>n({...s,queue_url:d.target.value})})]}),e.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-4",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx(c,{htmlFor:"fanout-sqs-region",children:"Region (optional)"}),e.jsx(x Line truncated
//# sourceMappingURL=SettingsModal-CgS3G4ZT.js.map
tgram://bot_token/chat_id`,value:s.urls||"",onChange:d=>n({...s,urls:d.target.value}),rows:4}),e.jsx("p",{className:"text-xs text-muted-foreground",children:"One URL per line. All URLs receive every matched notification."})]}),e.jsxs("label",{className:"flex items-center gap-3 cursor-pointer",children:[e.jsx("input",{type:"checkbox",checked:s.preserve_identity!==!1,onChange:d=>n({...s,preserve_identity:d.target.checked}),className:"h-4 w-4 rounded border-border"}),e.jsxs("div",{children:[e.jsx("span",{className:"text-sm",children:"Preserve identity on Discord"}),e.jsx("p",{className:"text-xs text-muted-foreground",children:"When enabled, Discord webhooks will use their configured name/avatar instead of overriding with MeshCore sender info."})]})]}),e.jsxs("label",{className:"flex items-center gap-3 cursor-pointer",children:[e.jsx("input",{type:"checkbox",checked:s.include_path!==!1,onChange:d=>n({...s,include_path:d.target.checked}),className:"h-4 w-4 rounded border-border"}),e.jsx("span",{className:"text-sm",children:"Include routing path in notifications"})]}),e.jsx(b,{}),e.jsx(de,{scope:t,onChange:a})]})}function Ws({config:s,scope:t,onChange:n,onScopeChange:a}){const d=JSON.stringify(s.headers??{},null,2),[w,S]=o.useState(d),[j,_]=o.useState(null),h=p=>{S(p);try{const v=JSON.parse(p);if(typeof v!="object"||Array.isArray(v)){_("Must be a JSON object");return}_(null),n({...s,headers:v})}catch{_("Invalid JSON")}};return e.jsxs("div",{className:"space-y-3",children:[e.jsx("p",{className:"text-xs text-muted-foreground",children:"Send message data as JSON to an HTTP endpoint when messages are received."}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(c,{htmlFor:"fanout-webhook-url",children:"URL"}),e.jsx(x,{id:"fanout-webhook-url",type:"url",placeholder:"https://example.com/webhook",value:s.url||"",onChange:p=>n({...s,url:p.target.value})})]}),e.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-4",children:e.jsxs("div",{className:"space-y-2",children:[e.jsx(c,{htmlFor:"fanout-webhook-method",children:"HTTP Method"}),e.jsxs("select",{id:"fanout-webhook-method",value:s.method||"POST",onChange:p=>n({...s,method:p.target.value}),className:"w-full rounded-md border border-input bg-background px-3 py-2 text-sm",children:[e.jsx("option",{value:"POST",children:"POST"}),e.jsx("option",{value:"PUT",children:"PUT"}),e.jsx("option",{value:"PATCH",children:"PATCH"})]})]})}),e.jsx(b,{}),e.jsxs("div",{className:"space-y-3",children:[e.jsx(c,{children:"HMAC Signing"}),e.jsxs("p",{className:"text-xs text-muted-foreground",children:["When a secret is set, each request includes an HMAC-SHA256 signature of the JSON body in the specified header (e.g. ",e.jsx("code",{className:"bg-muted px-1 rounded",children:"sha256=ab12cd..."}),")."]}),e.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-4",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx(c,{htmlFor:"fanout-webhook-hmac-secret",children:"HMAC Secret"}),e.jsx(x,{id:"fanout-webhook-hmac-secret",type:"password",placeholder:"Leave empty to disable signing",value:s.hmac_secret||"",onChange:p=>n({...s,hmac_secret:p.target.value})})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(c,{htmlFor:"fanout-webhook-hmac-header",children:"Signature Header Name"}),e.jsx(x,{id:"fanout-webhook-hmac-header",type:"text",placeholder:"X-Webhook-Signature",value:s.hmac_header||"",onChange:p=>n({...s,hmac_header:p.target.value})})]})]})]}),e.jsx(b,{}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(c,{htmlFor:"fanout-webhook-headers",children:"Extra Headers (JSON)"}),e.jsx("textarea",{id:"fanout-webhook-headers",className:"w-full rounded-md border border-input bg-background px-3 py-2 text-sm font-mono min-h-[60px]",value:w,onChange:p=>h(p.target.value),placeholder:'{"Authorization": "Bearer ..."}'}),j&&e.jsx("p",{className:"text-xs text-destructive",children:j})]}),e.jsx(b,{}),e.jsx(de,{scope:t,onChange:a})]})}function Gs({config:s,scope:t,onChange:n,onScopeChange:a}){return e.jsxs("div",{className:"space-y-3",children:[e.jsx("p",{className:"text-xs text-muted-foreground",children:"Send matched mesh events to an Amazon SQS queue for durable processing by workers, Lambdas, or downstream automation."}),e.jsx("div",{className:"rounded-md border border-warning/50 bg-warning/10 px-3 py-2 text-xs text-warning",children:"Outgoing messages and any selected raw packets will be delivered exactly as forwarded by the fanout scope, including decrypted/plaintext message content."}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(c,{htmlFor:"fanout-sqs-queue-url",children:"Queue URL"}),e.jsx(x,{id:"fanout-sqs-queue-url",type:"url",placeholder:"https://sqs.us-east-1.amazonaws.com/123456789012/mesh-events",value:s.queue_url||"",onChange:d=>n({...s,queue_url:d.target.value})})]}),e.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-4",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx(c,{htmlFor:"fanout-sqs-region",children:"Region (optional)"}),e.jsx(x Line truncated
//# sourceMappingURL=SettingsModal-BMRZWaZh.js.map
@@ -1 +1 @@
{"version":3,"mappings":";sQAAA;AAAA;AAAA;AAAA;AAAA;AAAA,GASA,MAAMA,GAAa,CACjB,CACE,OACA,CACE,EAAG,kGACH,IAAK,QACX,CACA,EACE,CAAC,SAAU,CAAE,GAAI,KAAM,GAAI,IAAK,EAAG,IAAK,IAAK,SAAU,EACvD,CACE,OACA,CACE,EAAG,qHACH,IAAK,QACX,CACA,CACA,EACMC,GAAYC,GAAiB,aAAcF,EAAU,EC1B3D;AAAA;AAAA;AAAA;AAAA;AAAA,GASA,MAAMA,GAAa,CACjB,CACE,OACA,CACE,EAAG,sHACH,IAAK,QACX,CACA,CACA,EACMG,GAAgBD,GAAiB,iBAAkBF,EAAU,ECTtDI,GAA+B,CAC1C,CAAE,KAAM,aAAc,KAAM,QAAS,GAAI,KAAM,GAAI,EAAG,GAAI,GAC1D,CAAE,KAAM,YAAa,KAAM,MAAO,GAAI,IAAK,GAAI,GAAI,GAAI,GACvD,CAAE,KAAM,qBAAsB,KAAM,QAAS,GAAI,KAAM,GAAI,EAAG,GAAI,GAClE,CAAE,KAAM,mBAAoB,KAAM,QAAS,GAAI,KAAM,GAAI,EAAG,GAAI,GAChE,CAAE,KAAM,gBAAiB,KAAM,QAAS,GAAI,KAAM,GAAI,EAAG,GAAI,GAC7D,CAAE,KAAM,cAAe,KAAM,QAAS,GAAI,IAAK,GAAI,GAAI,GAAI,GAC3D,CAAE,KAAM,uBAAwB,KAAM,QAAS,GAAI,KAAM,GAAI,EAAG,GAAI,GACpE,CAAE,KAAM,+BAAgC,KAAM,QAAS,GAAI,IAAK,GAAI,GAAI,GAAI,GAC5E,CAAE,KAAM,iCAAkC,KAAM,QAAS,GAAI,IAAK,GAAI,GAAI,GAAI,GAC9E,CAAE,KAAM,2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ACpF,MAAMA,EAAC,GAGT,OAAAjD,EAAS,2CAA2C,EAC7C,KAGT,MAAMkD,GAAqB,SAAS7D,GAAc,EAAE,EAEpD,MAAO,CACL,KAAAjB,EACA,IAAKsE,EACL,IAAKC,EACL,SAAUC,GACV,GAAIrD,KAA0BnC,EAAO,wBAA0B,WAC3D,CAAE,uBAAwBmC,CAAA,EAC1B,GACJ,MAAO,CACL,KAAMsD,GACN,GAAIC,GACJ,GAAIC,GACJ,GAAIC,EAAA,EAEN,GAAI5F,EAAO,0BACX,CAAC,MAAM8F,EAAkB,GACzBA,KAAuB9F,EAAO,eAC1B,CAAE,eAAgB8F,EAAA,EAClB,EAAC,CAET,EAEMC,GAAa,SAAY,CAC7BnD,EAAS,IAAI,EACb,MAAMoD,EAASX,GAAA,EACf,GAAKW,EAEL,CAAAxD,EAAQ,EAAI,EACZ,GAAI,CACF,MAAMpC,EAAO4F,CAAM,EACnBd,EAAM,QAAQ,oBAAoB,CACpC,OAASE,EAAK,CACZxC,EAASwC,aAAe,MAAQA,EAAI,QAAU,gBAAgB,CAChE,SACE5C,EAAQ,EAAK,CACf,EACF,EAEMyD,GAAsB,SAAY,CACtLine truncated
@@ -1,4 +1,4 @@
import{c as ql,V as Qc,W as ft,U as Xs,j as J,X as an,r as he,Y as eu,k as tu,Z as nu,$ as iu,a0 as _o,a1 as xo,a2 as vo,l as Mo}from"./index-BUPp0i0i.js";/**
import{c as ql,V as Qc,W as ft,U as Xs,j as J,X as an,r as he,Y as eu,k as tu,Z as nu,$ as iu,a0 as _o,a1 as xo,a2 as vo,l as Mo}from"./index-C_33NHxn.js";/**
* @license lucide-react v0.562.0 - ISC
*
* This source code is licensed under the ISC license.
@@ -4027,4 +4027,4 @@ void main() {
}
}`;class f0{constructor(){this.texture=null,this.mesh=null,this.depthNear=0,this.depthFar=0}init(e,t){if(this.texture===null){const i=new Oc(e.texture);(e.depthNear!==t.depthNear||e.depthFar!==t.depthFar)&&(this.depthNear=e.depthNear,this.depthFar=e.depthFar),this.texture=i}}getMesh(e){if(this.texture!==null&&this.mesh===null){const t=e.cameras[0].viewport,i=new mn({vertexShader:u0,fragmentShader:h0,uniforms:{depthColor:{value:this.texture},depthWidth:{value:t.z},depthHeight:{value:t.w}}});this.mesh=new pn(new rs(20,20),i)}return this.mesh}reset(){this.texture=null,this.mesh=null}getDepthTexture(){return this.texture}}class d0 extends ni{constructor(e,t){super();const i=this;let r=null,s=1,a=null,o="local-floor",l=1,c=null,h=null,f=null,d=null,m=null,g=null;const x=typeof XRWebGLBinding<"u",p=new f0,u={},y=t.getContextAttributes();let v=null,M=null;const b=[],w=[],R=new Ge;let I=null;const S=new Zt;S.viewport=new mt;const T=new Zt;T.viewport=new mt;const P=[S,T],B=new Sd;let z=null,j=null;this.cameraAutoUpdate=!0,this.enabled=!1,this.isPresenting=!1,this.getController=function(Y){let Q=b[Y];return Q===void 0&&(Q=new Is,b[Y]=Q),Q.getTargetRaySpace()},this.getControllerGrip=function(Y){let Q=b[Y];return Q===void 0&&(Q=new Is,b[Y]=Q),Q.getGripSpace()},this.getHand=function(Y){let Q=b[Y];return Q===void 0&&(Q=new Is,b[Y]=Q),Q.getHandSpace()};function K(Y){const Q=w.indexOf(Y.inputSource);if(Q===-1)return;const ge=b[Q];ge!==void 0&&(ge.update(Y.inputSource,Y.frame,c||a),ge.dispatchEvent({type:Y.type,data:Y.inputSource}))}function L(){r.removeEventListener("select",K),r.removeEventListener("selectstart",K),r.removeEventListener("selectend",K),r.removeEventListener("squeeze",K),r.removeEventListener("squeezestart",K),r.removeEventListener("squeezeend",K),r.removeEventListener("end",L),r.removeEventListener("inputsourceschange",k);for(let Y=0;Y<b.length;Y++){const Q=w[Y];Q!==null&&(w[Y]=null,b[Y].disconnect(Q))}z=null,j=null,p.reset();for(const Y in u)delete u[Y];e.setRenderTarget(v),m=null,d=null,f=null,r=null,M=null,Se.stop(),i.isPresenting=!1,e.setPixelRatio(I),e.setSize(R.width,R.height,!1),i.dispatchEvent({type:"sessionend"})}this.setFramebufferScaleFactor=function(Y){s=Y,i.isPresenting===!0&&Be("WebXRManager: Cannot change framebuffer scale while presenting.")},this.setReferenceSpaceType=function(Y){o=Y,i.isPresenting===!0&&Be("WebXRManager: Cannot change reference space type while presenting.")},this.getReferenceSpace=function(){return c||a},this.setReferenceSpace=function(Y){c=Y},this.getBaseLayer=function(){return d!==null?d:m},this.getBinding=function(){return f===null&&x&&(f=new XRWebGLBinding(r,t)),f},this.getFrame=function(){return g},this.getSession=function(){return r},this.setSession=async function(Y){if(r=Y,r!==null){if(v=e.getRenderTarget(),r.addEventListener("select",K),r.addEventListener("selectstart",K),r.addEventListener("selectend",K),r.addEventListener("squeeze",K),r.addEventListener("squeezestart",K),r.addEventListener("squeezeend",K),r.addEventListener("end",L),r.addEventListener("inputsourceschange",k),y.xrCompatible!==!0&&await t.makeXRCompatible(),I=e.getPixelRatio(),e.getSize(R),x&&"createProjectionLayer"in XRWebGLBinding.prototype){let ge=null,Ce=null,le=null;y.depth&&(le=y.stencil?t.DEPTH24_STENCIL8:t.DEPTH_COMPONENT24,ge=y.stencil?Jn:Cn,Ce=y.stencil?Ji:dn);const De={colorFormat:t.RGBA8,depthFormat:le,scaleFactor:s};f=this.getBinding(),d=f.createProjectionLayer(De),r.updateRenderState({layers:[d]}),e.setPixelRatio(1),e.setSize(d.textureWidth,d.textureHeight,!1),M=new fn(d.textureWidth,d.textureHeight,{format:rn,type:Jt,depthTexture:new er(d.textureWidth,d.textureHeight,Ce,void 0,void 0,void 0,void 0,void 0,void 0,ge),stencilBuffer:y.stencil,colorSpace:e.outputColorSpace,samples:y.antialias?4:0,resolveDepthBuffer:d.ignoreDepthValues===!1,resolveStencilBuffer:d.ignoreDepthValues===!1})}else{const ge={antialias:y.antialias,alpha:!0,depth:y.depth,stencil:y.stencil,framebufferScaleFactor:s};m=new XRWebGLLayer(r,t,ge),r.updateRenderState({baseLayer:m}),e.setPixelRatio(1),e.setSize(m.framebufferWidth,m.framebufferHeight,!1),M=new fn(m.framebufferWidth,m.framebufferHeight,{format:rn,type:Jt,colorSpace:e.outputColorSpace,stencilBuffer:y.stencil,resolveDepthBuffer:m.ignoreDepthValues===!1,resolveStencilBuffer:m.ignoreDepthValues===!1})}M.isXRRenderTarget=!0,this.setFoveation(l),c=null,a=await r.requestReferenceSpace(o),Se.setContext(r),Se.start(),i.isPresenting=!0,i.dispatchEvent({type:"sessionstart"})}},this.getEnvironmentBlendMode=function(){if(r!==null)return r.environmentBlendMode},this.getDepthTexture=function(){return p.getDepthTexture()};function k(Y){for(let Q=0;Q<Y.removed.length;Q++){const ge=Y.removed[Q],Ce=w.indexOf(ge);Ce>=0&&(w[Ce]=null,b[Ce].disconnect(ge))}for(let Q=0;Q<Y.added.length;Q++){const ge=Y.added[Q];let Ce=w.indexOf(ge);if(Ce===-1){for(let De=0;De<b.length;De++)if(De>=w.length){w.push(ge),Ce=De;break}else if(w[De]===null){w[De]=ge,Ce=De;break}if(Ce===-1)break}const l Line truncated
//# sourceMappingURL=VisualizerView-CPkw7P96.js.map
//# sourceMappingURL=VisualizerView-BqTF9y_L.js.map
@@ -1 +1 @@
{"version":3,"file":"VisualizerView-CPkw7P96.js","sources":["../../node_modules/lucide-react/dist/esm/icons/maximize-2.js","../../node_modules/lucide-react/dist/esm/icons/minimize-2.js","../../src/utils/visualizerSettings.ts","../../src/utils/visualizerUtils.ts","../../src/components/visualizer/shared.ts","../../src/components/visualizer/VisualizerControls.tsx","../../src/components/visualizer/VisualizerTooltip.tsx","../../node_modules/d3-force-3d/src/center.js","../../node_modules/d3-binarytree/src/add.js","../../node_modules/d3-binarytree/src/cover.js","../../node_modules/d3-binarytree/src/data.js","../../node_modules/d3-binarytree/src/extent.js","../../node_modules/d3-binarytree/src/half.js","../../node_modules/d3-binarytree/src/find.js","../../node_modules/d3-binarytree/src/remove.js","../../node_modules/d3-binarytree/src/root.js","../../node_modules/d3-binarytree/src/size.js","../../node_modules/d3-binarytree/src/visit.js","../../node_modules/d3-binarytree/src/visitAfter.js","../../node_modules/d3-binarytree/src/x.js","../../node_modules/d3-binarytree/src/binarytree.js","../../node_modules/d3-quadtree/src/add.js","../../node_modules/d3-quadtree/src/cover.js","../../node_modules/d3-quadtree/src/data.js","../../node_modules/d3-quadtree/src/extent.js","../../node_modules/d3-quadtree/src/quad.js","../../node_modules/d3-quadtree/src/find.js","../../node_modules/d3-quadtree/src/remove.js","../../node_modules/d3-quadtree/src/root.js","../../node_modules/d3-quadtree/src/size.js","../../node_modules/d3-quadtree/src/visit.js","../../node_modules/d3-quadtree/src/visitAfter.js","../../node_modules/d3-quadtree/src/x.js","../../node_modules/d3-quadtree/src/y.js","../../node_modules/d3-quadtree/src/quadtree.js","../../node_modules/d3-octree/src/add.js","../../node_modules/d3-octree/src/cover.js","../../node_modules/d3-octree/src/data.js","../../node_modules/d3-octree/src/extent.js","../../node_modules/d3-octree/src/octant.js","../../node_modules/d3-octree/src/find.js","../../node_modules/d3-octree/src/findAll.js","../../node_modules/d3-octree/src/remove.js","../../node_modules/d3-octree/src/root.js","../../node_modules/d3-octree/src/size.js","../../node_modules/d3-octree/src/visit.js","../../node_modules/d3-octree/src/visitAfter.js","../../node_modules/d3-octree/src/x.js","../../node_modules/d3-octree/src/y.js","../../node_modules/d3-octree/src/z.js","../../node_modules/d3-octree/src/octree.js","../../node_modules/d3-force-3d/src/constant.js","../../node_modules/d3-force-3d/src/jiggle.js","../../node_modules/d3-force-3d/src/link.js","../../node_modules/d3-dispatch/src/dispatch.js","../../node_modules/d3-timer/src/timer.js","../../node_modules/d3-force-3d/src/lcg.js","../../node_modules/d3-force-3d/src/simulation.js","../../node_modules/d3-force-3d/src/manyBody.js","../../node_modules/d3-force-3d/src/x.js","../../node_modules/d3-force-3d/src/y.js","../../node_modules/d3-force-3d/src/z.js","../../src/networkGraph/packetNetworkGraph.ts","../../src/components/visualizer/useVisualizerData3D.ts","../../node_modules/three/build/three.core.js","../../node_modules/three/build/three.module.js","../../node_modules/three/examples/jsm/controls/OrbitControls.js","../../node_modules/three/examples/jsm/renderers/CSS2DRenderer.js","../../src/components/visualizer/useVisualizer3DScene.ts","../../src/components/PacketVisualizer3D.tsx","../../src/components/VisualizerView.tsx"],"sourcesContent":["/**\n * @license lucide-react v0.562.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport createLucideIcon from '../createLucideIcon.js';\n\nconst __iconNode = [\n [\"path\", { d: \"M15 3h6v6\", key: \"1q9fwt\" }],\n [\"path\", { d: \"m21 3-7 7\", key: \"1l2asr\" }],\n [\"path\", { d: \"m3 21 7-7\", key: \"tjx5ai\" }],\n [\"path\", { d: \"M9 21H3v-6\", key: \"wtvkvv\" }]\n];\nconst Maximize2 = createLucideIcon(\"maximize-2\", __iconNode);\n\nexport { __iconNode, Maximize2 as default };\n//# sourceMappingURL=maximize-2.js.map\n","/**\n * @license lucide-react v0.562.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport createLucideIcon from '../createLucideIcon.js';\n\nconst __iconNode = [\n [\"path\", { d: \"m14 10 7-7\", key: \"oa77jy\" }],\n [\"path\", { d: \"M20 10h-6V4\", key: \"mjg0md\" }],\n [\"path\", { d: \"m3 21 7-7\", key: \"tjx5ai\" }],\n [\"path\", { d: \"M4 14h6v6\", key: \"rmj7iw\" }]\n];\nconst Minimize2 = createLucideIcon(\"minimize-2\", __iconNode);\n\nexport { __iconNode, Minimize2 as default };\n//# sourceMappingURL=minimize-2.js.map\n","const VISUALIZER_SETTINGS_KEY = 'remoteterm-visualizer-settings';\n\nexport interface VisualizerSettings {\n showAmbiguousPaths: boolean;\n showAmbiguousNodes: boolean;\n useAdvertPathHints: boolean;\n collapseLikelyKnownSiblingRepeaters: boolean;\n splitAmbiguousByTraffic: boolean;\n cLine truncated
{"version":3,"file":"VisualizerView-BqTF9y_L.js","sources":["../../node_modules/lucide-react/dist/esm/icons/maximize-2.js","../../node_modules/lucide-react/dist/esm/icons/minimize-2.js","../../src/utils/visualizerSettings.ts","../../src/utils/visualizerUtils.ts","../../src/components/visualizer/shared.ts","../../src/components/visualizer/VisualizerControls.tsx","../../src/components/visualizer/VisualizerTooltip.tsx","../../node_modules/d3-force-3d/src/center.js","../../node_modules/d3-binarytree/src/add.js","../../node_modules/d3-binarytree/src/cover.js","../../node_modules/d3-binarytree/src/data.js","../../node_modules/d3-binarytree/src/extent.js","../../node_modules/d3-binarytree/src/half.js","../../node_modules/d3-binarytree/src/find.js","../../node_modules/d3-binarytree/src/remove.js","../../node_modules/d3-binarytree/src/root.js","../../node_modules/d3-binarytree/src/size.js","../../node_modules/d3-binarytree/src/visit.js","../../node_modules/d3-binarytree/src/visitAfter.js","../../node_modules/d3-binarytree/src/x.js","../../node_modules/d3-binarytree/src/binarytree.js","../../node_modules/d3-quadtree/src/add.js","../../node_modules/d3-quadtree/src/cover.js","../../node_modules/d3-quadtree/src/data.js","../../node_modules/d3-quadtree/src/extent.js","../../node_modules/d3-quadtree/src/quad.js","../../node_modules/d3-quadtree/src/find.js","../../node_modules/d3-quadtree/src/remove.js","../../node_modules/d3-quadtree/src/root.js","../../node_modules/d3-quadtree/src/size.js","../../node_modules/d3-quadtree/src/visit.js","../../node_modules/d3-quadtree/src/visitAfter.js","../../node_modules/d3-quadtree/src/x.js","../../node_modules/d3-quadtree/src/y.js","../../node_modules/d3-quadtree/src/quadtree.js","../../node_modules/d3-octree/src/add.js","../../node_modules/d3-octree/src/cover.js","../../node_modules/d3-octree/src/data.js","../../node_modules/d3-octree/src/extent.js","../../node_modules/d3-octree/src/octant.js","../../node_modules/d3-octree/src/find.js","../../node_modules/d3-octree/src/findAll.js","../../node_modules/d3-octree/src/remove.js","../../node_modules/d3-octree/src/root.js","../../node_modules/d3-octree/src/size.js","../../node_modules/d3-octree/src/visit.js","../../node_modules/d3-octree/src/visitAfter.js","../../node_modules/d3-octree/src/x.js","../../node_modules/d3-octree/src/y.js","../../node_modules/d3-octree/src/z.js","../../node_modules/d3-octree/src/octree.js","../../node_modules/d3-force-3d/src/constant.js","../../node_modules/d3-force-3d/src/jiggle.js","../../node_modules/d3-force-3d/src/link.js","../../node_modules/d3-dispatch/src/dispatch.js","../../node_modules/d3-timer/src/timer.js","../../node_modules/d3-force-3d/src/lcg.js","../../node_modules/d3-force-3d/src/simulation.js","../../node_modules/d3-force-3d/src/manyBody.js","../../node_modules/d3-force-3d/src/x.js","../../node_modules/d3-force-3d/src/y.js","../../node_modules/d3-force-3d/src/z.js","../../src/networkGraph/packetNetworkGraph.ts","../../src/components/visualizer/useVisualizerData3D.ts","../../node_modules/three/build/three.core.js","../../node_modules/three/build/three.module.js","../../node_modules/three/examples/jsm/controls/OrbitControls.js","../../node_modules/three/examples/jsm/renderers/CSS2DRenderer.js","../../src/components/visualizer/useVisualizer3DScene.ts","../../src/components/PacketVisualizer3D.tsx","../../src/components/VisualizerView.tsx"],"sourcesContent":["/**\n * @license lucide-react v0.562.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport createLucideIcon from '../createLucideIcon.js';\n\nconst __iconNode = [\n [\"path\", { d: \"M15 3h6v6\", key: \"1q9fwt\" }],\n [\"path\", { d: \"m21 3-7 7\", key: \"1l2asr\" }],\n [\"path\", { d: \"m3 21 7-7\", key: \"tjx5ai\" }],\n [\"path\", { d: \"M9 21H3v-6\", key: \"wtvkvv\" }]\n];\nconst Maximize2 = createLucideIcon(\"maximize-2\", __iconNode);\n\nexport { __iconNode, Maximize2 as default };\n//# sourceMappingURL=maximize-2.js.map\n","/**\n * @license lucide-react v0.562.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport createLucideIcon from '../createLucideIcon.js';\n\nconst __iconNode = [\n [\"path\", { d: \"m14 10 7-7\", key: \"oa77jy\" }],\n [\"path\", { d: \"M20 10h-6V4\", key: \"mjg0md\" }],\n [\"path\", { d: \"m3 21 7-7\", key: \"tjx5ai\" }],\n [\"path\", { d: \"M4 14h6v6\", key: \"rmj7iw\" }]\n];\nconst Minimize2 = createLucideIcon(\"minimize-2\", __iconNode);\n\nexport { __iconNode, Minimize2 as default };\n//# sourceMappingURL=minimize-2.js.map\n","const VISUALIZER_SETTINGS_KEY = 'remoteterm-visualizer-settings';\n\nexport interface VisualizerSettings {\n showAmbiguousPaths: boolean;\n showAmbiguousNodes: boolean;\n useAdvertPathHints: boolean;\n collapseLikelyKnownSiblingRepeaters: boolean;\n splitAmbiguousByTraffic: boolean;\n cLine truncated
@@ -0,0 +1,2 @@
import"./index-C_33NHxn.js";import{u as t}from"./leaflet-DNHXPpW7.js";function r(){return t().map}export{r as u};
//# sourceMappingURL=hooks-BmAJqTPK.js.map
@@ -1 +1 @@
{"version":3,"file":"hooks-fCOseuFw.js","sources":["../../node_modules/react-leaflet/lib/hooks.js"],"sourcesContent":["import { useLeafletContext } from '@react-leaflet/core';\nimport { useEffect } from 'react';\nexport function useMap() {\n return useLeafletContext().map;\n}\nexport function useMapEvent(type, handler) {\n const map = useMap();\n useEffect(function addMapEventHandler() {\n // @ts-ignore event type\n map.on(type, handler);\n return function removeMapEventHandler() {\n // @ts-ignore event type\n map.off(type, handler);\n };\n }, [\n map,\n type,\n handler\n ]);\n return map;\n}\nexport function useMapEvents(handlers) {\n const map = useMap();\n useEffect(function addMapEventHandlers() {\n map.on(handlers);\n return function removeMapEventHandlers() {\n map.off(handlers);\n };\n }, [\n map,\n handlers\n ]);\n return map;\n}\n"],"names":["useMap","useLeafletContext"],"mappings":"sEAEO,SAASA,GAAS,CACrB,OAAOC,EAAiB,EAAG,GAC/B","x_google_ignoreList":[0]}
{"version":3,"file":"hooks-BmAJqTPK.js","sources":["../../node_modules/react-leaflet/lib/hooks.js"],"sourcesContent":["import { useLeafletContext } from '@react-leaflet/core';\nimport { useEffect } from 'react';\nexport function useMap() {\n return useLeafletContext().map;\n}\nexport function useMapEvent(type, handler) {\n const map = useMap();\n useEffect(function addMapEventHandler() {\n // @ts-ignore event type\n map.on(type, handler);\n return function removeMapEventHandler() {\n // @ts-ignore event type\n map.off(type, handler);\n };\n }, [\n map,\n type,\n handler\n ]);\n return map;\n}\nexport function useMapEvents(handlers) {\n const map = useMap();\n useEffect(function addMapEventHandlers() {\n map.on(handlers);\n return function removeMapEventHandlers() {\n map.off(handlers);\n };\n }, [\n map,\n handlers\n ]);\n return map;\n}\n"],"names":["useMap","useLeafletContext"],"mappings":"sEAEO,SAASA,GAAS,CACrB,OAAOC,EAAiB,EAAG,GAC/B","x_google_ignoreList":[0]}
@@ -1,2 +0,0 @@
import"./index-BUPp0i0i.js";import{u as t}from"./leaflet-Nkpzzebg.js";function r(){return t().map}export{r as u};
//# sourceMappingURL=hooks-fCOseuFw.js.map
-261
View File
@@ -1,261 +0,0 @@
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/PathRouteMap--4_fo75Z.js","assets/leaflet-Nkpzzebg.js","assets/leaflet-Dgihpmma.css","assets/hooks-fCOseuFw.js","assets/RepeaterDashboard-BmKo2O_g.js","assets/separator-C7ZN2sFh.js","assets/MapView-8l-XCyfo.js","assets/Popup-_4Won2BS.js","assets/SettingsModal-CgS3G4ZT.js"])))=>i.map(i=>d[i]);
var og=Object.defineProperty;var sg=(t,r,s)=>r in t?og(t,r,{enumerable:!0,configurable:!0,writable:!0,value:s}):t[r]=s;var ho=(t,r,s)=>sg(t,typeof r!="symbol"?r+"":r,s);function ag(t,r){for(var s=0;s<r.length;s++){const a=r[s];if(typeof a!="string"&&!Array.isArray(a)){for(const i in a)if(i!=="default"&&!(i in t)){const l=Object.getOwnPropertyDescriptor(a,i);l&&Object.defineProperty(t,i,l.get?l:{enumerable:!0,get:()=>a[i]})}}}return Object.freeze(Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}))}(function(){const r=document.createElement("link").relList;if(r&&r.supports&&r.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))a(i);new MutationObserver(i=>{for(const l of i)if(l.type==="childList")for(const d of l.addedNodes)d.tagName==="LINK"&&d.rel==="modulepreload"&&a(d)}).observe(document,{childList:!0,subtree:!0});function s(i){const l={};return i.integrity&&(l.integrity=i.integrity),i.referrerPolicy&&(l.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?l.credentials="include":i.crossOrigin==="anonymous"?l.credentials="omit":l.credentials="same-origin",l}function a(i){if(i.ep)return;i.ep=!0;const l=s(i);fetch(i.href,l)}})();var Zu=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function fx(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function hx(t){if(Object.prototype.hasOwnProperty.call(t,"__esModule"))return t;var r=t.default;if(typeof r=="function"){var s=function a(){return this instanceof a?Reflect.construct(r,arguments,this.constructor):r.apply(this,arguments)};s.prototype=r.prototype}else s={};return Object.defineProperty(s,"__esModule",{value:!0}),Object.keys(t).forEach(function(a){var i=Object.getOwnPropertyDescriptor(t,a);Object.defineProperty(s,a,i.get?i:{enumerable:!0,get:function(){return t[a]}})}),s}var Ju={exports:{}},la={},e0={exports:{}},Ge={};/**
* @license React
* react.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/var $h;function ig(){if($h)return Ge;$h=1;var t=Symbol.for("react.element"),r=Symbol.for("react.portal"),s=Symbol.for("react.fragment"),a=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),l=Symbol.for("react.provider"),d=Symbol.for("react.context"),u=Symbol.for("react.forward_ref"),p=Symbol.for("react.suspense"),f=Symbol.for("react.memo"),v=Symbol.for("react.lazy"),m=Symbol.iterator;function y(P){return P===null||typeof P!="object"?null:(P=m&&P[m]||P["@@iterator"],typeof P=="function"?P:null)}var w={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},C=Object.assign,_={};function b(P,z,I){this.props=P,this.context=z,this.refs=_,this.updater=I||w}b.prototype.isReactComponent={},b.prototype.setState=function(P,z){if(typeof P!="object"&&typeof P!="function"&&P!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,P,z,"setState")},b.prototype.forceUpdate=function(P){this.updater.enqueueForceUpdate(this,P,"forceUpdate")};function N(){}N.prototype=b.prototype;function A(P,z,I){this.props=P,this.context=z,this.refs=_,this.updater=I||w}var k=A.prototype=new N;k.constructor=A,C(k,b.prototype),k.isPureReactComponent=!0;var B=Array.isArray,S=Object.prototype.hasOwnProperty,R={current:null},T={key:!0,ref:!0,__self:!0,__source:!0};function D(P,z,I){var j,G={},J=null,ce=null;if(z!=null)for(j in z.ref!==void 0&&(ce=z.ref),z.key!==void 0&&(J=""+z.key),z)S.call(z,j)&&!T.hasOwnProperty(j)&&(G[j]=z[j]);var ne=arguments.length-2;if(ne===1)G.children=I;else if(1<ne){for(var ue=Array(ne),Se=0;Se<ne;Se++)ue[Se]=arguments[Se+2];G.children=ue}if(P&&P.defaultProps)for(j in ne=P.defaultProps,ne)G[j]===void 0&&(G[j]=ne[j]);return{$$typeof:t,type:P,key:J,ref:ce,props:G,_owner:R.current}}function L(P,z){return{$$typeof:t,type:P.type,key:z,ref:P.ref,props:P.props,_owner:P._owner}}function M(P){return typeof P=="object"&&P!==null&&P.$$typeof===t}function $(P){var z={"=":"=0",":":"=2"};return"$"+P.replace(/[=:]/g,function(I){return z[I]})}var U=/\/+/g;function q(P,z){return typeof P=="object"&&P!==null&&P.key!=null?$(""+P.key):z.toString(36)}function Y(P,z,I,j,G){var J=typeof P;(J==="undefined"||J==="boolean")&&(P=null);var ce=!1;if(P===null)ce=!0;else switch(J){case"string":case"number":ce=!0;break;case"object":switch(P.$$typeof){case t:case r:ce=!0}}if(ce)return ce=P,G=G(ce),P=j===""?"."+q(ce,0):j,B(G)?(I="",P!=null&&(I=P.replace(U,"$&/")+"/"),Y(G,z,I,"",function(Se){return Se})):G!=null&&(M(G)&&(G=L(G,I+(!G.key||ce&&ce.key===G.key?"":(""+G.key).replace(U,"$&/")+"/")+P)),z.push(G)),1;if(ce=0,j=j===""?".":j+":",B(P))for(var ne=0;ne<P.length;ne++){J=P[ne];var ue=j+q(J,ne);ce+=Y(J,z,I,ue,G)}else if(ue=y(P),typeof ue=="function")for(P=ue.call(P),ne=0;!(J=P.next()).done;)J=J.value,ue=j+q(J,ne++),ce+=Y(J,z,I,ue,G);else if(J==="object")throw z=String(P),Error("Objects are not valid as a React child (found: "+(z==="[object Object]"?"object with keys {"+Object.keys(P).join(", ")+"}":z)+"). If you meant to render a collection of children, use an array instead.");return ce}function ie(P,z,I){if(P==null)return P;var j=[],G=0;return Y(P,j,"","",function(J){return z.call(I,J,G++)}),j}function re(P){if(P._status===-1){var z=P._result;z=z(),z.then(function(I){(P._status===0||P._status===-1)&&(P._status=1,P._result=I)},function(I){(P._status===0||P._status===-1)&&(P._status=2,P._result=I)}),P._status===-1&&(P._status=0,P._result=z)}if(P._status===1)return P._result.default;throw P._result}var le={current:null},oe={transition:null},se={ReactCurrentDispatcher:le,ReactCurrentBatchConfig:oe,ReactCurrentOwner:R};function K(){throw Error("act(...) is not supported in production builds of React.")}return Ge.Children={map:ie,forEach:function(P,z,I){ie(P,function(){z.apply(this,arguments)},I)},count:function(P){var z=0;return ie(P,function(){z++}),z},toArray:function(P){return ie(P,function(z){return z})||[]},only:function(P){if(!M(P))throw Error("React.Children.only expected to receive a single React element child.");return P}},Ge.Component=b,Ge.Fragment=s,Ge.Profiler=i,Ge.PureComponent=A,Ge.StrictMode=a,Ge.Suspense=p,Ge.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=se,Ge.act=K,Ge.cloneElement=function(P,z,I){if(P==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+P+".");var j=C({},P.props),G=P.key,J=P.ref,ce=P._owner;if(z!=null){if(z.ref!==void 0&&(J=z.ref,ce=R.current),z.key!==void 0&&(G=""+z.key),P.type&&P.type.defaultProps)var ne=P.type.defaultProps;for(ue in z)S.call(z,ue)&&!T.hasOwnProperty(ue)&&(j[ue]=z[ue]===void 0&&ne!==void 0?ne[ue]:z[ue])}var ue=arguments.length-2;if(ue===1)j.children=I;else if(1<ue){ne=Array(ue);for(var Se=0;Se<ue;Se++)ne[Se]=arguments[Se+2];j.children=ne}return{$$typeof:t,type:P.type,key:G,ref:J,props:j,_owner:ce}},Ge.createContext=function(P){return P={$$typeof:d,_currentVaLine truncated
* @license React
* react-jsx-runtime.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/var Uh;function lg(){if(Uh)return la;Uh=1;var t=U0(),r=Symbol.for("react.element"),s=Symbol.for("react.fragment"),a=Object.prototype.hasOwnProperty,i=t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,l={key:!0,ref:!0,__self:!0,__source:!0};function d(u,p,f){var v,m={},y=null,w=null;f!==void 0&&(y=""+f),p.key!==void 0&&(y=""+p.key),p.ref!==void 0&&(w=p.ref);for(v in p)a.call(p,v)&&!l.hasOwnProperty(v)&&(m[v]=p[v]);if(u&&u.defaultProps)for(v in p=u.defaultProps,p)m[v]===void 0&&(m[v]=p[v]);return{$$typeof:r,type:u,key:y,ref:w,props:m,_owner:i.current}}return la.Fragment=s,la.jsx=d,la.jsxs=d,la}var Wh;function cg(){return Wh||(Wh=1,Ju.exports=lg()),Ju.exports}var h=cg(),E=U0();const me=fx(E),W0=ag({__proto__:null,default:me},[E]);var Ki={},t0={exports:{}},mn={},n0={exports:{}},r0={};/**
* @license React
* scheduler.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/var qh;function ug(){return qh||(qh=1,(function(t){function r(oe,se){var K=oe.length;oe.push(se);e:for(;0<K;){var P=K-1>>>1,z=oe[P];if(0<i(z,se))oe[P]=se,oe[K]=z,K=P;else break e}}function s(oe){return oe.length===0?null:oe[0]}function a(oe){if(oe.length===0)return null;var se=oe[0],K=oe.pop();if(K!==se){oe[0]=K;e:for(var P=0,z=oe.length,I=z>>>1;P<I;){var j=2*(P+1)-1,G=oe[j],J=j+1,ce=oe[J];if(0>i(G,K))J<z&&0>i(ce,G)?(oe[P]=ce,oe[J]=K,P=J):(oe[P]=G,oe[j]=K,P=j);else if(J<z&&0>i(ce,K))oe[P]=ce,oe[J]=K,P=J;else break e}}return se}function i(oe,se){var K=oe.sortIndex-se.sortIndex;return K!==0?K:oe.id-se.id}if(typeof performance=="object"&&typeof performance.now=="function"){var l=performance;t.unstable_now=function(){return l.now()}}else{var d=Date,u=d.now();t.unstable_now=function(){return d.now()-u}}var p=[],f=[],v=1,m=null,y=3,w=!1,C=!1,_=!1,b=typeof setTimeout=="function"?setTimeout:null,N=typeof clearTimeout=="function"?clearTimeout:null,A=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function k(oe){for(var se=s(f);se!==null;){if(se.callback===null)a(f);else if(se.startTime<=oe)a(f),se.sortIndex=se.expirationTime,r(p,se);else break;se=s(f)}}function B(oe){if(_=!1,k(oe),!C)if(s(p)!==null)C=!0,re(S);else{var se=s(f);se!==null&&le(B,se.startTime-oe)}}function S(oe,se){C=!1,_&&(_=!1,N(D),D=-1),w=!0;var K=y;try{for(k(se),m=s(p);m!==null&&(!(m.expirationTime>se)||oe&&!$());){var P=m.callback;if(typeof P=="function"){m.callback=null,y=m.priorityLevel;var z=P(m.expirationTime<=se);se=t.unstable_now(),typeof z=="function"?m.callback=z:m===s(p)&&a(p),k(se)}else a(p);m=s(p)}if(m!==null)var I=!0;else{var j=s(f);j!==null&&le(B,j.startTime-se),I=!1}return I}finally{m=null,y=K,w=!1}}var R=!1,T=null,D=-1,L=5,M=-1;function $(){return!(t.unstable_now()-M<L)}function U(){if(T!==null){var oe=t.unstable_now();M=oe;var se=!0;try{se=T(!0,oe)}finally{se?q():(R=!1,T=null)}}else R=!1}var q;if(typeof A=="function")q=function(){A(U)};else if(typeof MessageChannel<"u"){var Y=new MessageChannel,ie=Y.port2;Y.port1.onmessage=U,q=function(){ie.postMessage(null)}}else q=function(){b(U,0)};function re(oe){T=oe,R||(R=!0,q())}function le(oe,se){D=b(function(){oe(t.unstable_now())},se)}t.unstable_IdlePriority=5,t.unstable_ImmediatePriority=1,t.unstable_LowPriority=4,t.unstable_NormalPriority=3,t.unstable_Profiling=null,t.unstable_UserBlockingPriority=2,t.unstable_cancelCallback=function(oe){oe.callback=null},t.unstable_continueExecution=function(){C||w||(C=!0,re(S))},t.unstable_forceFrameRate=function(oe){0>oe||125<oe?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):L=0<oe?Math.floor(1e3/oe):5},t.unstable_getCurrentPriorityLevel=function(){return y},t.unstable_getFirstCallbackNode=function(){return s(p)},t.unstable_next=function(oe){switch(y){case 1:case 2:case 3:var se=3;break;default:se=y}var K=y;y=se;try{return oe()}finally{y=K}},t.unstable_pauseExecution=function(){},t.unstable_requestPaint=function(){},t.unstable_runWithPriority=function(oe,se){switch(oe){case 1:case 2:case 3:case 4:case 5:break;default:oe=3}var K=y;y=oe;try{return se()}finally{y=K}},t.unstable_scheduleCallback=function(oe,se,K){var P=t.unstable_now();switch(typeof K=="object"&&K!==null?(K=K.delay,K=typeof K=="number"&&0<K?P+K:P):K=P,oe){case 1:var z=-1;break;case 2:z=250;break;case 5:z=1073741823;break;case 4:z=1e4;break;default:z=5e3}return z=K+z,oe={id:v++,callback:se,priorityLevel:oe,startTime:K,expirationTime:z,sortIndex:-1},K>P?(oe.sortIndex=K,r(f,oe),s(p)===null&&oe===s(f)&&(_?(N(D),D=-1):_=!0,le(B,K-P))):(oe.sortIndex=z,r(p,oe),C||w||(C=!0,re(S))),oe},t.unstable_shouldYield=$,t.unstable_wrapCallback=function(oe){var se=y;return function(){var K=y;y=se;try{return oe.apply(this,arguments)}finally{y=K}}}})(r0)),r0}var Kh;function dg(){return Kh||(Kh=1,n0.exports=ug()),n0.exports}/**
* @license React
* react-dom.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/var Gh;function fg(){if(Gh)return mn;Gh=1;var t=U0(),r=dg();function s(e){for(var n="https://reactjs.org/docs/error-decoder.html?invariant="+e,o=1;o<arguments.length;o++)n+="&args[]="+encodeURIComponent(arguments[o]);return"Minified React error #"+e+"; visit "+n+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var a=new Set,i={};function l(e,n){d(e,n),d(e+"Capture",n)}function d(e,n){for(i[e]=n,e=0;e<n.length;e++)a.add(n[e])}var u=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),p=Object.prototype.hasOwnProperty,f=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,v={},m={};function y(e){return p.call(m,e)?!0:p.call(v,e)?!1:f.test(e)?m[e]=!0:(v[e]=!0,!1)}function w(e,n,o,c){if(o!==null&&o.type===0)return!1;switch(typeof n){case"function":case"symbol":return!0;case"boolean":return c?!1:o!==null?!o.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function C(e,n,o,c){if(n===null||typeof n>"u"||w(e,n,o,c))return!0;if(c)return!1;if(o!==null)switch(o.type){case 3:return!n;case 4:return n===!1;case 5:return isNaN(n);case 6:return isNaN(n)||1>n}return!1}function _(e,n,o,c,x,g,F){this.acceptsBooleans=n===2||n===3||n===4,this.attributeName=c,this.attributeNamespace=x,this.mustUseProperty=o,this.propertyName=e,this.type=n,this.sanitizeURL=g,this.removeEmptyString=F}var b={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){b[e]=new _(e,0,!1,e,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var n=e[0];b[n]=new _(n,1,!1,e[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(e){b[e]=new _(e,2,!1,e.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){b[e]=new _(e,2,!1,e,null,!1,!1)}),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){b[e]=new _(e,3,!1,e.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(e){b[e]=new _(e,3,!0,e,null,!1,!1)}),["capture","download"].forEach(function(e){b[e]=new _(e,4,!1,e,null,!1,!1)}),["cols","rows","size","span"].forEach(function(e){b[e]=new _(e,6,!1,e,null,!1,!1)}),["rowSpan","start"].forEach(function(e){b[e]=new _(e,5,!1,e.toLowerCase(),null,!1,!1)});var N=/[\-:]([a-z])/g;function A(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var n=e.replace(N,A);b[n]=new _(n,1,!1,e,null,!1,!1)}),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var n=e.replace(N,A);b[n]=new _(n,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(e){var n=e.replace(N,A);b[n]=new _(n,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(e){b[e]=new _(e,1,!1,e.toLowerCase(),null,!1,!1)}),b.xlinkHref=new _("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(e){b[e]=new _(e,1,!1,e.toLowerCase(),null,!0,!0)});function k(e,n,o,c){var x=b.hasOwnProperty(n)?b[n]:null;(x!==null?x.type!==0:c||!(2<n.length)||n[0]!=="o"&&n[0]!=="O"||n[1]!=="n"&&n[1]!= Line truncated
`+P+e}var I=!1;function j(e,n){if(!e||I)return"";I=!0;var o=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(n)if(n=function(){throw Error()},Object.defineProperty(n.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(n,[])}catch(te){var c=te}Reflect.construct(e,[],n)}else{try{n.call()}catch(te){c=te}e.call(n.prototype)}else{try{throw Error()}catch(te){c=te}e()}}catch(te){if(te&&c&&typeof te.stack=="string"){for(var x=te.stack.split(`
`),g=c.stack.split(`
`),F=x.length-1,O=g.length-1;1<=F&&0<=O&&x[F]!==g[O];)O--;for(;1<=F&&0<=O;F--,O--)if(x[F]!==g[O]){if(F!==1||O!==1)do if(F--,O--,0>O||x[F]!==g[O]){var V=`
`+x[F].replace(" at new "," at ");return e.displayName&&V.includes("<anonymous>")&&(V=V.replace("<anonymous>",e.displayName)),V}while(1<=F&&0<=O);break}}}finally{I=!1,Error.prepareStackTrace=o}return(e=e?e.displayName||e.name:"")?z(e):""}function G(e){switch(e.tag){case 5:return z(e.type);case 16:return z("Lazy");case 13:return z("Suspense");case 19:return z("SuspenseList");case 0:case 2:case 15:return e=j(e.type,!1),e;case 11:return e=j(e.type.render,!1),e;case 1:return e=j(e.type,!0),e;default:return""}}function J(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case T:return"Fragment";case R:return"Portal";case L:return"Profiler";case D:return"StrictMode";case q:return"Suspense";case Y:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case $:return(e.displayName||"Context")+".Consumer";case M:return(e._context.displayName||"Context")+".Provider";case U:var n=e.render;return e=e.displayName,e||(e=n.displayName||n.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case ie:return n=e.displayName||null,n!==null?n:J(e.type)||"Memo";case re:n=e._payload,e=e._init;try{return J(e(n))}catch{}}return null}function ce(e){var n=e.type;switch(e.tag){case 24:return"Cache";case 9:return(n.displayName||"Context")+".Consumer";case 10:return(n._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=n.render,e=e.displayName||e.name||"",n.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return n;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return J(n);case 8:return n===D?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof n=="function")return n.displayName||n.name||null;if(typeof n=="string")return n}return null}function ne(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function ue(e){var n=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(n==="checkbox"||n==="radio")}function Se(e){var n=ue(e)?"checked":"value",o=Object.getOwnPropertyDescriptor(e.constructor.prototype,n),c=""+e[n];if(!e.hasOwnProperty(n)&&typeof o<"u"&&typeof o.get=="function"&&typeof o.set=="function"){var x=o.get,g=o.set;return Object.defineProperty(e,n,{configurable:!0,get:function(){return x.call(this)},set:function(F){c=""+F,g.call(this,F)}}),Object.defineProperty(e,n,{enumerable:o.enumerable}),{getValue:function(){return c},setValue:function(F){c=""+F},stopTracking:function(){e._valueTracker=null,delete e[n]}}}}function Ze(e){e._valueTracker||(e._valueTracker=Se(e))}function Fe(e){if(!e)return!1;var n=e._valueTracker;if(!n)return!0;var o=n.getValue(),c="";return e&&(c=ue(e)?e.checked?"true":"false":e.value),e=c,e!==o?(n.setValue(e),!0):!1}function Ke(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function Ue(e,n){var o=n.checked;return K({},n,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:o??e._wrapperState.initialChecked})}function Rt(e,n){var o=n.defaultValue==null?"":n.defaultValue,c=n.checked!=null?n.checked:n.defaultChecked;o=ne(n.value!=null?n.value:o),e._wrapperState={initialChecked:c,initialValue:o,controlled:n.type==="checkbox"||n.type==="radio"?n.checked!=null:n.value!=null}}function Et(e,n){n=n.checked,n!=null&&k(e,"checked",n,!1)}function vt(e,n){Et(e,n);var o=ne(n.value),c=n.type;if(o!=null)c==="number"?(o===0&&e.value===""||e.value!=o)&&(e.value=""+o):e.value!==""+o&&(e.value=""+o);else if(c==="submit"||c==="reset"){e.removeAttribute("value");return}n.hasOwnProperty("value")?at(e,n.type,o):n.hasOwnProperty("defaultValue")&&at(e,n.type,ne(n.defaultValue)),n.checked==null&&n.defaultChecked!=null&&(e.defaultChecked=!!n.defaultChecked)}function _t(e,n,o){if(n.hasOwnProperty("value")||n.hasOwnProperty("defaultValue")){var c=n.type;if(!(c!=="submit"&&c!=="reset"||n.value!==void 0&&n.value!==null))return;n=""+e._wrapperState.initialValue,o||n===e.value||(e.value=n),e.defaultValue=n}o=e.name,o!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,o!==""&&(e.name=o)}function at(e,n,o){(n!=="number"||Ke(e.ownerDocument)!==e)&&(o==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+o&&(e.defaultValue=""+o))}var pt=Array.isArray;function Xe(e,n,o,c){if(e=e.options,n){n={};for(var x=0;x<o.length;x++)n["$"+o[x]]=!0;for(o=0;o<e.length;o++)x=n.hasOwnProperty("$"+e[o].value),e[o].selected!==x&&(e[o].selected=x),x&&c&&(e[o].defaultSelected=!0)}else{for(o=""+ne(o),n=null,x=0;x<e.length;x++){if(e[x].value===o){e[x].selected=!0,c&&(e[x].defaultSelected=!0);return}n!==null||e[x].disabled||(n=e[x])}n!==null&&(n.selected=!0)}}function Q(e,n){if(n.dangerouslySetInnerHTML!=null) Line truncated
`).replace(vy,"")}function ai(e,n,o){if(n=af(n),af(e)!==n&&o)throw Error(s(425))}function ii(){}var Vc=null,Uc=null;function Wc(e,n){return e==="textarea"||e==="noscript"||typeof n.children=="string"||typeof n.children=="number"||typeof n.dangerouslySetInnerHTML=="object"&&n.dangerouslySetInnerHTML!==null&&n.dangerouslySetInnerHTML.__html!=null}var qc=typeof setTimeout=="function"?setTimeout:void 0,yy=typeof clearTimeout=="function"?clearTimeout:void 0,lf=typeof Promise=="function"?Promise:void 0,gy=typeof queueMicrotask=="function"?queueMicrotask:typeof lf<"u"?function(e){return lf.resolve(null).then(e).catch(by)}:qc;function by(e){setTimeout(function(){throw e})}function Kc(e,n){var o=n,c=0;do{var x=o.nextSibling;if(e.removeChild(o),x&&x.nodeType===8)if(o=x.data,o==="/$"){if(c===0){e.removeChild(x),js(n);return}c--}else o!=="$"&&o!=="$?"&&o!=="$!"||c++;o=x}while(o);js(n)}function Ar(e){for(;e!=null;e=e.nextSibling){var n=e.nodeType;if(n===1||n===3)break;if(n===8){if(n=e.data,n==="$"||n==="$!"||n==="$?")break;if(n==="/$")return null}}return e}function cf(e){e=e.previousSibling;for(var n=0;e;){if(e.nodeType===8){var o=e.data;if(o==="$"||o==="$!"||o==="$?"){if(n===0)return e;n--}else o==="/$"&&n++}e=e.previousSibling}return null}var Io=Math.random().toString(36).slice(2),qn="__reactFiber$"+Io,qs="__reactProps$"+Io,ar="__reactContainer$"+Io,Gc="__reactEvents$"+Io,wy="__reactListeners$"+Io,Cy="__reactHandles$"+Io;function eo(e){var n=e[qn];if(n)return n;for(var o=e.parentNode;o;){if(n=o[ar]||o[qn]){if(o=n.alternate,n.child!==null||o!==null&&o.child!==null)for(e=cf(e);e!==null;){if(o=e[qn])return o;e=cf(e)}return n}e=o,o=e.parentNode}return null}function Ks(e){return e=e[qn]||e[ar],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function $o(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(s(33))}function li(e){return e[qs]||null}var Yc=[],Vo=-1;function Nr(e){return{current:e}}function gt(e){0>Vo||(e.current=Yc[Vo],Yc[Vo]=null,Vo--)}function xt(e,n){Vo++,Yc[Vo]=e.current,e.current=n}var Br={},Yt=Nr(Br),un=Nr(!1),to=Br;function Uo(e,n){var o=e.type.contextTypes;if(!o)return Br;var c=e.stateNode;if(c&&c.__reactInternalMemoizedUnmaskedChildContext===n)return c.__reactInternalMemoizedMaskedChildContext;var x={},g;for(g in o)x[g]=n[g];return c&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=n,e.__reactInternalMemoizedMaskedChildContext=x),x}function dn(e){return e=e.childContextTypes,e!=null}function ci(){gt(un),gt(Yt)}function uf(e,n,o){if(Yt.current!==Br)throw Error(s(168));xt(Yt,n),xt(un,o)}function df(e,n,o){var c=e.stateNode;if(n=n.childContextTypes,typeof c.getChildContext!="function")return o;c=c.getChildContext();for(var x in c)if(!(x in n))throw Error(s(108,ce(e)||"Unknown",x));return K({},o,c)}function ui(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Br,to=Yt.current,xt(Yt,e),xt(un,un.current),!0}function ff(e,n,o){var c=e.stateNode;if(!c)throw Error(s(169));o?(e=df(e,n,to),c.__reactInternalMemoizedMergedChildContext=e,gt(un),gt(Yt),xt(Yt,e)):gt(un),xt(un,o)}var ir=null,di=!1,Xc=!1;function hf(e){ir===null?ir=[e]:ir.push(e)}function ky(e){di=!0,hf(e)}function Dr(){if(!Xc&&ir!==null){Xc=!0;var e=0,n=st;try{var o=ir;for(st=1;e<o.length;e++){var c=o[e];do c=c(!0);while(c!==null)}ir=null,di=!1}catch(x){throw ir!==null&&(ir=ir.slice(e+1)),Ha(As,Dr),x}finally{st=n,Xc=!1}}return null}var Wo=[],qo=0,fi=null,hi=0,_n=[],Sn=0,no=null,lr=1,cr="";function ro(e,n){Wo[qo++]=hi,Wo[qo++]=fi,fi=e,hi=n}function pf(e,n,o){_n[Sn++]=lr,_n[Sn++]=cr,_n[Sn++]=no,no=e;var c=lr;e=cr;var x=32-cn(c)-1;c&=~(1<<x),o+=1;var g=32-cn(n)+x;if(30<g){var F=x-x%5;g=(c&(1<<F)-1).toString(32),c>>=F,x-=F,lr=1<<32-cn(n)+x|o<<x|c,cr=g+e}else lr=1<<g|o<<x|c,cr=e}function Qc(e){e.return!==null&&(ro(e,1),pf(e,1,0))}function Zc(e){for(;e===fi;)fi=Wo[--qo],Wo[qo]=null,hi=Wo[--qo],Wo[qo]=null;for(;e===no;)no=_n[--Sn],_n[Sn]=null,cr=_n[--Sn],_n[Sn]=null,lr=_n[--Sn],_n[Sn]=null}var gn=null,bn=null,Ct=!1,jn=null;function mf(e,n){var o=Dn(5,null,null,0);o.elementType="DELETED",o.stateNode=n,o.return=e,n=e.deletions,n===null?(e.deletions=[o],e.flags|=16):n.push(o)}function xf(e,n){switch(e.tag){case 5:var o=e.type;return n=n.nodeType!==1||o.toLowerCase()!==n.nodeName.toLowerCase()?null:n,n!==null?(e.stateNode=n,gn=e,bn=Ar(n.firstChild),!0):!1;case 6:return n=e.pendingProps===""||n.nodeType!==3?null:n,n!==null?(e.stateNode=n,gn=e,bn=null,!0):!1;case 13:return n=n.nodeType!==8?null:n,n!==null?(o=no!==null?{id:lr,overflow:cr}:null,e.memoizedState={dehydrated:n,treeContext:o,retryLane:1073741824},o=Dn(18,null,null,0),o.stateNode=n,o.return=e,e.child=o,gn=e,bn=null,!0):!1;default:return!1}}function Jc(e){return(e.mode&1)!==0&&(e.flags&128)===0}function eu(e){if(Ct){var n=bn;if(n){var o=n;if(!xf(e,n)){if(Jc(e))throw Error(s(418));n=Ar(o.nextSibling);var c=gn;n&&xf(e,n)?mf(c,o):(e.flags=e.flags&-4097|2,Ct=!1,gn=e)}}else{if(Jc(e))throw Error(s(418));e.flags=e.flags&-4097|2,Ct=!1,gn=e}}}function vf(e){for(e=e. Line truncated
Error generating stack: `+g.message+`
`+g.stack}return{value:e,source:n,stack:x,digest:null}}function Cu(e,n,o){return{value:e,source:null,stack:o??null,digest:n??null}}function ku(e,n){try{console.error(n.value)}catch(o){setTimeout(function(){throw o})}}var Ry=typeof WeakMap=="function"?WeakMap:Map;function Qf(e,n,o){o=dr(-1,o),o.tag=3,o.payload={element:null};var c=n.value;return o.callback=function(){Ti||(Ti=!0,Ou=c),ku(e,n)},o}function Zf(e,n,o){o=dr(-1,o),o.tag=3;var c=e.type.getDerivedStateFromError;if(typeof c=="function"){var x=n.value;o.payload=function(){return c(x)},o.callback=function(){ku(e,n)}}var g=e.stateNode;return g!==null&&typeof g.componentDidCatch=="function"&&(o.callback=function(){ku(e,n),typeof c!="function"&&(Pr===null?Pr=new Set([this]):Pr.add(this));var F=n.stack;this.componentDidCatch(n.value,{componentStack:F!==null?F:""})}),o}function Jf(e,n,o){var c=e.pingCache;if(c===null){c=e.pingCache=new Ry;var x=new Set;c.set(n,x)}else x=c.get(n),x===void 0&&(x=new Set,c.set(n,x));x.has(o)||(x.add(o),e=qy.bind(null,e,n,o),n.then(e,e))}function eh(e){do{var n;if((n=e.tag===13)&&(n=e.memoizedState,n=n!==null?n.dehydrated!==null:!0),n)return e;e=e.return}while(e!==null);return null}function th(e,n,o,c,x){return(e.mode&1)===0?(e===n?e.flags|=65536:(e.flags|=128,o.flags|=131072,o.flags&=-52805,o.tag===1&&(o.alternate===null?o.tag=17:(n=dr(-1,1),n.tag=2,Rr(o,n,1))),o.lanes|=1),e):(e.flags|=65536,e.lanes=x,e)}var Ty=B.ReactCurrentOwner,fn=!1;function tn(e,n,o,c){n.child=e===null?wf(n,null,o,c):Go(n,e.child,o,c)}function nh(e,n,o,c,x){o=o.render;var g=n.ref;return Xo(n,x),c=pu(e,n,o,c,g,x),o=mu(),e!==null&&!fn?(n.updateQueue=e.updateQueue,n.flags&=-2053,e.lanes&=~x,fr(e,n,x)):(Ct&&o&&Qc(n),n.flags|=1,tn(e,n,c,x),n.child)}function rh(e,n,o,c,x){if(e===null){var g=o.type;return typeof g=="function"&&!Wu(g)&&g.defaultProps===void 0&&o.compare===null&&o.defaultProps===void 0?(n.tag=15,n.type=g,oh(e,n,g,c,x)):(e=Hi(o.type,null,c,n,n.mode,x),e.ref=n.ref,e.return=n,n.child=e)}if(g=e.child,(e.lanes&x)===0){var F=g.memoizedProps;if(o=o.compare,o=o!==null?o:Is,o(F,c)&&e.ref===n.ref)return fr(e,n,x)}return n.flags|=1,e=Or(g,c),e.ref=n.ref,e.return=n,n.child=e}function oh(e,n,o,c,x){if(e!==null){var g=e.memoizedProps;if(Is(g,c)&&e.ref===n.ref)if(fn=!1,n.pendingProps=c=g,(e.lanes&x)!==0)(e.flags&131072)!==0&&(fn=!0);else return n.lanes=e.lanes,fr(e,n,x)}return Eu(e,n,o,c,x)}function sh(e,n,o){var c=n.pendingProps,x=c.children,g=e!==null?e.memoizedState:null;if(c.mode==="hidden")if((n.mode&1)===0)n.memoizedState={baseLanes:0,cachePool:null,transitions:null},xt(es,wn),wn|=o;else{if((o&1073741824)===0)return e=g!==null?g.baseLanes|o:o,n.lanes=n.childLanes=1073741824,n.memoizedState={baseLanes:e,cachePool:null,transitions:null},n.updateQueue=null,xt(es,wn),wn|=e,null;n.memoizedState={baseLanes:0,cachePool:null,transitions:null},c=g!==null?g.baseLanes:o,xt(es,wn),wn|=c}else g!==null?(c=g.baseLanes|o,n.memoizedState=null):c=o,xt(es,wn),wn|=c;return tn(e,n,x,o),n.child}function ah(e,n){var o=n.ref;(e===null&&o!==null||e!==null&&e.ref!==o)&&(n.flags|=512,n.flags|=2097152)}function Eu(e,n,o,c,x){var g=dn(o)?to:Yt.current;return g=Uo(n,g),Xo(n,x),o=pu(e,n,o,c,g,x),c=mu(),e!==null&&!fn?(n.updateQueue=e.updateQueue,n.flags&=-2053,e.lanes&=~x,fr(e,n,x)):(Ct&&c&&Qc(n),n.flags|=1,tn(e,n,o,x),n.child)}function ih(e,n,o,c,x){if(dn(o)){var g=!0;ui(n)}else g=!1;if(Xo(n,x),n.stateNode===null)Ni(e,n),Yf(n,o,c),wu(n,o,c,x),c=!0;else if(e===null){var F=n.stateNode,O=n.memoizedProps;F.props=O;var V=F.context,te=o.contextType;typeof te=="object"&&te!==null?te=An(te):(te=dn(o)?to:Yt.current,te=Uo(n,te));var fe=o.getDerivedStateFromProps,he=typeof fe=="function"||typeof F.getSnapshotBeforeUpdate=="function";he||typeof F.UNSAFE_componentWillReceiveProps!="function"&&typeof F.componentWillReceiveProps!="function"||(O!==c||V!==te)&&Xf(n,F,c,te),Fr=!1;var de=n.memoizedState;F.state=de,gi(n,c,F,x),V=n.memoizedState,O!==c||de!==V||un.current||Fr?(typeof fe=="function"&&(bu(n,o,fe,c),V=n.memoizedState),(O=Fr||Gf(n,o,O,c,de,V,te))?(he||typeof F.UNSAFE_componentWillMount!="function"&&typeof F.componentWillMount!="function"||(typeof F.componentWillMount=="function"&&F.componentWillMount(),typeof F.UNSAFE_componentWillMount=="function"&&F.UNSAFE_componentWillMount()),typeof F.componentDidMount=="function"&&(n.flags|=4194308)):(typeof F.componentDidMount=="function"&&(n.flags|=4194308),n.memoizedProps=c,n.memoizedState=V),F.props=c,F.state=V,F.context=te,c=O):(typeof F.componentDidMount=="function"&&(n.flags|=4194308),c=!1)}else{F=n.stateNode,kf(e,n),O=n.memoizedProps,te=n.type===n.elementType?O:Mn(n.type,O),F.props=te,he=n.pendingProps,de=F.context,V=o.contextType,typeof V=="object"&&V!==null?V=An(V):(V=dn(o)?to:Yt.current,V=Uo(n,V));var ge=o.getDerivedStateFromProps;(fe=typeof ge=="function"||typeof F.getSnapshotBeforeUpdate=="function")||typeof F.UNSAFE_componentWillReceiveProps!="function"&&typeof F.componentWillReceiveProps!="function"||(O!==he||de!==V)&&Xf(n,F,c,V),Fr=!1,de=n.m Line truncated
* @license lucide-react v0.562.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const H2=t=>t.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),L2=t=>t.replace(/^([A-Z])|[\s-_]+(\w)/g,(r,s,a)=>a?a.toUpperCase():s.toLowerCase()),hp=t=>{const r=L2(t);return r.charAt(0).toUpperCase()+r.slice(1)},kx=(...t)=>t.filter((r,s,a)=>!!r&&r.trim()!==""&&a.indexOf(r)===s).join(" ").trim(),I2=t=>{for(const r in t)if(r.startsWith("aria-")||r==="role"||r==="title")return!0};/**
* @license lucide-react v0.562.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/var $2={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/**
* @license lucide-react v0.562.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const V2=E.forwardRef(({color:t="currentColor",size:r=24,strokeWidth:s=2,absoluteStrokeWidth:a,className:i="",children:l,iconNode:d,...u},p)=>E.createElement("svg",{ref:p,...$2,width:r,height:r,stroke:t,strokeWidth:a?Number(s)*24/Number(r):s,className:kx("lucide",i),...!l&&!I2(u)&&{"aria-hidden":"true"},...u},[...d.map(([f,v])=>E.createElement(f,v)),...Array.isArray(l)?l:[l]]));/**
* @license lucide-react v0.562.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const ht=(t,r)=>{const s=E.forwardRef(({className:a,...i},l)=>E.createElement(V2,{ref:l,iconNode:r,className:kx(`lucide-${H2(hp(t))}`,`lucide-${t}`,a),...i}));return s.displayName=hp(t),s};/**
* @license lucide-react v0.562.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const U2=[["path",{d:"M4.929 4.929 19.07 19.071",key:"196cmz"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],os=ht("ban",U2);/**
* @license lucide-react v0.562.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const W2=[["path",{d:"M10.268 21a2 2 0 0 0 3.464 0",key:"vwvbt9"}],["path",{d:"M3.262 15.326A1 1 0 0 0 4 17h16a1 1 0 0 0 .74-1.673C19.41 13.956 18 12.499 18 8A6 6 0 0 0 6 8c0 4.499-1.411 5.956-2.738 7.326",key:"11g9vi"}]],Ex=ht("bell",W2);/**
* @license lucide-react v0.562.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const q2=[["path",{d:"M3 3v16a2 2 0 0 0 2 2h16",key:"c24i48"}],["path",{d:"M18 17V9",key:"2bz60n"}],["path",{d:"M13 17V5",key:"1frdt8"}],["path",{d:"M8 17v-3",key:"17ska0"}]],K2=ht("chart-column",q2);/**
* @license lucide-react v0.562.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const G2=[["path",{d:"M18 6 7 17l-5-5",key:"116fxf"}],["path",{d:"m22 10-7.5 7.5L13 16",key:"ke71qq"}]],Y2=ht("check-check",G2);/**
* @license lucide-react v0.562.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const X2=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],Q2=ht("check",X2);/**
* @license lucide-react v0.562.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Z2=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],J2=ht("chevron-down",Z2);/**
* @license lucide-react v0.562.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const eb=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],tb=ht("chevron-right",eb);/**
* @license lucide-react v0.562.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const nb=[["ellipse",{cx:"12",cy:"5",rx:"9",ry:"3",key:"msslwz"}],["path",{d:"M3 5V19A9 3 0 0 0 21 19V5",key:"1wlel7"}],["path",{d:"M3 12A9 3 0 0 0 21 12",key:"mv7ke4"}]],rb=ht("database",nb);/**
* @license lucide-react v0.562.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const ob=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}],["path",{d:"M16 8h.01",key:"cr5u4v"}],["path",{d:"M8 8h.01",key:"1e4136"}],["path",{d:"M8 16h.01",key:"18s6g9"}],["path",{d:"M16 16h.01",key:"1f9h7w"}],["path",{d:"M12 12h.01",key:"1mp3jc"}]],sb=ht("dice-5",ob);/**
* @license lucide-react v0.562.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const ab=[["path",{d:"M21.54 15H17a2 2 0 0 0-2 2v4.54",key:"1djwo0"}],["path",{d:"M7 3.34V5a3 3 0 0 0 3 3a2 2 0 0 1 2 2c0 1.1.9 2 2 2a2 2 0 0 0 2-2c0-1.1.9-2 2-2h3.17",key:"1tzkfa"}],["path",{d:"M11 21.95V18a2 2 0 0 0-2-2a2 2 0 0 1-2-2v-1a2 2 0 0 0-2-2H2.05",key:"14pb5j"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],pp=ht("earth",ab);/**
* @license lucide-react v0.562.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const ib=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]],_x=ht("info",ib);/**
* @license lucide-react v0.562.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const lb=[["rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2",key:"1w4ew1"}],["path",{d:"M7 11V7a5 5 0 0 1 9.9-1",key:"1mm8w8"}]],cb=ht("lock-open",lb);/**
* @license lucide-react v0.562.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const ub=[["path",{d:"M3 5h1",key:"1mv5vm"}],["path",{d:"M3 12h1",key:"lp3yf2"}],["path",{d:"M3 19h1",key:"w6f3n9"}],["path",{d:"M8 5h1",key:"1nxr5w"}],["path",{d:"M8 12h1",key:"1con00"}],["path",{d:"M8 19h1",key:"k7p10e"}],["path",{d:"M13 5h8",key:"a7qcls"}],["path",{d:"M13 12h8",key:"h98zly"}],["path",{d:"M13 19h8",key:"c3s6r1"}]],db=ht("logs",ub);/**
* @license lucide-react v0.562.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const fb=[["path",{d:"M14.106 5.553a2 2 0 0 0 1.788 0l3.659-1.83A1 1 0 0 1 21 4.619v12.764a1 1 0 0 1-.553.894l-4.553 2.277a2 2 0 0 1-1.788 0l-4.212-2.106a2 2 0 0 0-1.788 0l-3.659 1.83A1 1 0 0 1 3 19.381V6.618a1 1 0 0 1 .553-.894l4.553-2.277a2 2 0 0 1 1.788 0z",key:"169xi5"}],["path",{d:"M15 5.764v15",key:"1pn4in"}],["path",{d:"M9 3.236v15",key:"1uimfh"}]],hb=ht("map",fb);/**
* @license lucide-react v0.562.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const pb=[["path",{d:"M4 5h16",key:"1tepv9"}],["path",{d:"M4 12h16",key:"1lakjw"}],["path",{d:"M4 19h16",key:"1djgab"}]],mb=ht("menu",pb);/**
* @license lucide-react v0.562.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const xb=[["path",{d:"M12 17v4",key:"1riwvh"}],["path",{d:"m14.305 7.53.923-.382",key:"1mlnsw"}],["path",{d:"m15.228 4.852-.923-.383",key:"82mpwg"}],["path",{d:"m16.852 3.228-.383-.924",key:"ln4sir"}],["path",{d:"m16.852 8.772-.383.923",key:"1dejw0"}],["path",{d:"m19.148 3.228.383-.924",key:"192kgf"}],["path",{d:"m19.53 9.696-.382-.924",key:"fiavlr"}],["path",{d:"m20.772 4.852.924-.383",key:"1j8mgp"}],["path",{d:"m20.772 7.148.924.383",key:"zix9be"}],["path",{d:"M22 13v2a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h7",key:"1tnzv8"}],["path",{d:"M8 21h8",key:"1ev6f3"}],["circle",{cx:"18",cy:"6",r:"3",key:"1h7g24"}]],vb=ht("monitor-cog",xb);/**
* @license lucide-react v0.562.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const yb=[["path",{d:"M20.985 12.486a9 9 0 1 1-9.473-9.472c.405-.022.617.46.402.803a6 6 0 0 0 8.268 8.268c.344-.215.825-.004.803.401",key:"kfwtm"}]],gb=ht("moon",yb);/**
* @license lucide-react v0.562.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const bb=[["path",{d:"M4.9 16.1C1 12.2 1 5.8 4.9 1.9",key:"s0qx1y"}],["path",{d:"M7.8 4.7a6.14 6.14 0 0 0-.8 7.5",key:"1idnkw"}],["circle",{cx:"12",cy:"9",r:"2",key:"1092wv"}],["path",{d:"M16.2 4.8c2 2 2.26 5.11.8 7.47",key:"ojru2q"}],["path",{d:"M19.1 1.9a9.96 9.96 0 0 1 0 14.1",key:"rhi7fg"}],["path",{d:"M9.5 18h5",key:"mfy3pd"}],["path",{d:"m8 22 4-11 4 11",key:"25yftu"}]],wb=ht("radio-tower",bb);/**
* @license lucide-react v0.562.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Cb=[["circle",{cx:"6",cy:"19",r:"3",key:"1kj8tv"}],["path",{d:"M9 19h8.5a3.5 3.5 0 0 0 0-7h-11a3.5 3.5 0 0 1 0-7H15",key:"1d8sl"}],["circle",{cx:"18",cy:"5",r:"3",key:"gq8acd"}]],kb=ht("route",Cb);/**
* @license lucide-react v0.562.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Eb=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],F0=ht("search",Eb);/**
* @license lucide-react v0.562.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const _b=[["circle",{cx:"18",cy:"5",r:"3",key:"gq8acd"}],["circle",{cx:"6",cy:"12",r:"3",key:"w7nqdw"}],["circle",{cx:"18",cy:"19",r:"3",key:"1xt0gg"}],["line",{x1:"8.59",x2:"15.42",y1:"13.51",y2:"17.49",key:"47mynk"}],["line",{x1:"15.41",x2:"8.59",y1:"6.51",y2:"10.49",key:"1n3mei"}]],Sb=ht("share-2",_b);/**
* @license lucide-react v0.562.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Ab=[["path",{d:"M12 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7",key:"1m0v6g"}],["path",{d:"M18.375 2.625a1 1 0 0 1 3 3l-9.013 9.014a2 2 0 0 1-.853.505l-2.873.84a.5.5 0 0 1-.62-.62l.84-2.873a2 2 0 0 1 .506-.852z",key:"ohrbg2"}]],Nb=ht("square-pen",Ab);/**
* @license lucide-react v0.562.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Bb=[["path",{d:"M11.525 2.295a.53.53 0 0 1 .95 0l2.31 4.679a2.123 2.123 0 0 0 1.595 1.16l5.166.756a.53.53 0 0 1 .294.904l-3.736 3.638a2.123 2.123 0 0 0-.611 1.878l.882 5.14a.53.53 0 0 1-.771.56l-4.618-2.428a2.122 2.122 0 0 0-1.973 0L6.396 21.01a.53.53 0 0 1-.77-.56l.881-5.139a2.122 2.122 0 0 0-.611-1.879L2.16 9.795a.53.53 0 0 1 .294-.906l5.165-.755a2.122 2.122 0 0 0 1.597-1.16z",key:"r04s7s"}]],hs=ht("star",Bb);/**
* @license lucide-react v0.562.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Db=[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"m4.93 4.93 1.41 1.41",key:"149t6j"}],["path",{d:"m17.66 17.66 1.41 1.41",key:"ptbguv"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"m6.34 17.66-1.41 1.41",key:"1m8zz5"}],["path",{d:"m19.07 4.93-1.41 1.41",key:"1shlcs"}]],Fb=ht("sun",Db);/**
* @license lucide-react v0.562.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Rb=[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]],Tb=ht("trash-2",Rb);/**
* @license lucide-react v0.562.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Pb=[["circle",{cx:"12",cy:"4.5",r:"2.5",key:"r5ysbb"}],["path",{d:"m10.2 6.3-3.9 3.9",key:"1nzqf6"}],["circle",{cx:"4.5",cy:"12",r:"2.5",key:"jydg6v"}],["path",{d:"M7 12h10",key:"b7w52i"}],["circle",{cx:"19.5",cy:"12",r:"2.5",key:"1piiel"}],["path",{d:"m13.8 17.7 3.9-3.9",key:"1wyg1y"}],["circle",{cx:"12",cy:"19.5",r:"2.5",key:"13o1pw"}]],jb=ht("waypoints",Pb);/**
* @license lucide-react v0.562.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Mb=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],Q0=ht("x",Mb);function rn(t){(t.key==="Enter"||t.key===" ")&&(t.preventDefault(),t.currentTarget.click())}const R0="remoteterm-theme-change",zb=[{id:"original",name:"Original",swatches:["#111419","#181b21","#27a05c","#282c33","#f59e0b","#3b82f6"],metaThemeColor:"#111419"},{id:"light",name:"Light",swatches:["#F8F7F4","#FFFFFF","#1B7D4E","#EDEBE7","#D97706","#3B82F6"],metaThemeColor:"#F8F7F4"},{id:"ios",name:"iPhone",swatches:["#F2F2F7","#FFFFFF","#007AFF","#E5E5EA","#FF9F0A","#34C759"],metaThemeColor:"#F2F2F7"},{id:"paper-grove",name:"Paper Grove",swatches:["#F7F1E4","#FFF9EE","#2F9E74","#E7DEC8","#E76F51","#5C7CFA"],metaThemeColor:"#F7F1E4"},{id:"cyberpunk",name:"Cyberpunk",swatches:["#07080A","#0D1112","#00FF41","#141E17","#FAFF00","#FF2E6C"],metaThemeColor:"#07080A"},{id:"obsidian-glass",name:"Obsidian Glass",swatches:["#0C0E12","#151821","#D4A070","#1E2230","#D4924A","#5B82B4"],metaThemeColor:"#0C0E12"},{id:"solar-flare",name:"Solar Flare",swatches:["#0D0607","#151012","#FF0066","#2D1D22","#FF8C1A","#30ACD4"],metaThemeColor:"#0D0607"},{id:"lagoon-pop",name:"Lagoon Pop",swatches:["#081A22","#0F2630","#23D7C6","#173844","#FF7A66","#7C83FF"],metaThemeColor:"#081A22"},{id:"candy-dusk",name:"Candy Dusk",swatches:["#140F24","#201736","#FF79C9","#2A2144","#FFC857","#8BE9FD"],metaThemeColor:"#140F24"},{id:"high-contrast",name:"High Contrast",swatches:["#000000","#141414","#3B9EFF","#1E1E1E","#FFB800","#FF4757"],metaThemeColor:"#000000"},{id:"monochrome",name:"Monochrome",swatches:["#FAFAFA","#FFFFFF","#111111","#EAEAEA","#8A8A8A","#4A4A4A"],metaThemeColor:"#FAFAFA"},{id:"windows-95",name:"Windows 95",swatches:["#008080","#C0C0C0","#000080","#DFDFDF","#FFDE59","#000000"],metaThemeColor:"#008080"}],Sx="remoteterm-theme";function T0(){try{return localStorage.getItem(Sx)??"original"}catch{return"original"}}function Ax(t){try{localStorage.setItem(Sx,t)}catch{}t==="original"?delete document.documentElement.dataset.theme:document.documentElement.dataset.theme=t;const r=zb.find(s=>s.id===t);if(r){const s=document.querySelector('meta[name="theme-color"]');s&&s.setAttribute("content",r.metaThemeColor)}typeof window<"u"&&window.dispatchEvent(new CustomEvent(R0,{detail:t}))}function Nx(t){var r,s,a="";if(typeof t=="string"||typeof t=="number")a+=t;else if(typeof t=="object")if(Array.isArray(t)){var i=t.length;for(r=0;r<i;r++)t[r]&&(s=Nx(t[r]))&&(a&&(a+=" "),a+=s)}else for(s in t)t[s]&&(a&&(a+=" "),a+=s);return a}function Bx(){for(var t,r,s=0,a="",i=arguments.length;s<i;s++)(t=arguments[s])&&(r=Nx(t))&&(a&&(a+=" "),a+=r);return a}const Ob=(t,r)=>{const s=new Array(t.length+r.length);for(let a=0;a<t.length;a++)s[a]=t[a];for(let a=0;a<r.length;a++)s[t.length+a]=r[a];return s},Hb=(t,r)=>({classGroupId:t,validator:r}),Dx=(t=new Map,r=null,s)=>({nextPart:t,validators:r,classGroupId:s}),Ul="-",mp=[],Lb="arbitrary..",Ib=t=>{const r=Vb(t),{conflictingClassGroups:s,conflictingClassGroupModifiers:a}=t;return{getClassGroupId:d=>{if(d.startsWith("[")&&d.endsWith("]"))return $b(d);const u=d.split(Ul),p=u[0]===""&&u.length>1?1:0;return Fx(u,p,r)},getConflictingClassGroupIds:(d,u)=>{if(u){const p=a[d],f=s[d];return p?f?Ob(f,p):p:f||mp}return s[d]||mp}}},Fx=(t,r,s)=>{if(t.length-r===0)return s.classGroupId;const i=t[r],l=s.nextPart.get(i);if(l){const f=Fx(t,r+1,l);if(f)return f}const d=s.validators;if(d===null)return;const u=r===0?t.join(Ul):t.slice(r).join(Ul),p=d.length;for(let f=0;f<p;f++){const v=d[f];if(v.validator(u))return v.classGroupId}},$b=t=>t.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const r=t.slice(1,-1),s=r.indexOf(":"),a=r.slice(0,s);return a?Lb+a:void 0})(),Vb=t=>{const{theme:r,classGroups:s}=t;return Ub(s,r)},Ub=(t,r)=>{const s=Dx();for(const a in t){const i=t[a];Z0(i,s,a,r)}return s},Z0=(t,r,s,a)=>{const i=t.length;for(let l=0;l<i;l++){const d=t[l];Wb(d,r,s,a)}},Wb=(t,r,s,a)=>{if(typeof t=="string"){qb(t,r,s);return}if(typeof t=="function"){Kb(t,r,s,a);return}Gb(t,r,s,a)},qb=(t,r,s)=>{const a=t===""?r:Rx(r,t);a.classGroupId=s},Kb=(t,r,s,a)=>{if(Yb(t)){Z0(t(a),r,s,a);return}r.validators===null&&(r.validators=[]),r.validators.push(Hb(s,t))},Gb=(t,r,s,a)=>{const i=Object.entries(t),l=i.length;for(let d=0;d<l;d++){const[u,p]=i[d];Z0(p,Rx(r,u),s,a)}},Rx=(t,r)=>{let s=t;const a=r.split(Ul),i=a.length;for(let l=0;l<i;l++){const d=a[l];let u=s.nextPart.get(d);u||(u=Dx(),s.nextPart.set(d,u)),s=u}return s},Yb=t=>"isThemeGetter"in t&&t.isThemeGetter===!0,Xb=t=>{if(t<1)return{get:()=>{},set:()=>{}};let r=0,s=Object.create(null),a=Object.create(null);const i=(l,d)=>{s[l]=d,r++,r>t&&(r=0,a=s,s=Object.create(null))};return{get(l){let d=s[l];if(d!==void 0)return d;if((d=a[l])!==void 0)return i(l,d),d},set(l,d){l in s?s[l]=d:i(l,d)}}},P0="!",xp=":",Qb=[],vp=(t,r,s,a,i)=>({modifiers:t,hasImportantModifier:r,baseClassName:s,maybePostfixModifierPosition:a,isExternal:i}),Zb=t=>{const{prefix:r,experimentalParseClassName:s}=t;let a=i=>{const l=[];let d=Line truncated
.`.concat(z4,` {
overflow: hidden `).concat(a,`;
padding-right: `).concat(u,"px ").concat(a,`;
}
body[`).concat(us,`] {
overflow: hidden `).concat(a,`;
overscroll-behavior: contain;
`).concat([r&&"position: relative ".concat(a,";"),s==="margin"&&`
padding-left: `.concat(i,`px;
padding-top: `).concat(l,`px;
padding-right: `).concat(d,`px;
margin-left:0;
margin-top:0;
margin-right: `).concat(u,"px ").concat(a,`;
`),s==="padding"&&"padding-right: ".concat(u,"px ").concat(a,";")].filter(Boolean).join(""),`
}
.`).concat(rl,` {
right: `).concat(u,"px ").concat(a,`;
}
.`).concat(ol,` {
margin-right: `).concat(u,"px ").concat(a,`;
}
.`).concat(rl," .").concat(rl,` {
right: 0 `).concat(a,`;
}
.`).concat(ol," .").concat(ol,` {
margin-right: 0 `).concat(a,`;
}
body[`).concat(us,`] {
`).concat(O4,": ").concat(u,`px;
}
`)},Tp=function(){var t=parseInt(document.body.getAttribute(us)||"0",10);return isFinite(t)?t:0},rC=function(){E.useEffect(function(){return document.body.setAttribute(us,(Tp()+1).toString()),function(){var t=Tp()-1;t<=0?document.body.removeAttribute(us):document.body.setAttribute(us,t.toString())}},[])},oC=function(t){var r=t.noRelative,s=t.noImportant,a=t.gapMode,i=a===void 0?"margin":a;rC();var l=E.useMemo(function(){return eC(i)},[i]);return E.createElement(tC,{styles:nC(l,!r,i,s?"":"!important")})},z0=!1;if(typeof window<"u")try{var Ji=Object.defineProperty({},"passive",{get:function(){return z0=!0,!0}});window.addEventListener("test",Ji,Ji),window.removeEventListener("test",Ji,Ji)}catch{z0=!1}var ss=z0?{passive:!1}:!1,sC=function(t){return t.tagName==="TEXTAREA"},s1=function(t,r){if(!(t instanceof Element))return!1;var s=window.getComputedStyle(t);return s[r]!=="hidden"&&!(s.overflowY===s.overflowX&&!sC(t)&&s[r]==="visible")},aC=function(t){return s1(t,"overflowY")},iC=function(t){return s1(t,"overflowX")},Pp=function(t,r){var s=r.ownerDocument,a=r;do{typeof ShadowRoot<"u"&&a instanceof ShadowRoot&&(a=a.host);var i=a1(t,a);if(i){var l=i1(t,a),d=l[1],u=l[2];if(d>u)return!0}a=a.parentNode}while(a&&a!==s.body);return!1},lC=function(t){var r=t.scrollTop,s=t.scrollHeight,a=t.clientHeight;return[r,s,a]},cC=function(t){var r=t.scrollLeft,s=t.scrollWidth,a=t.clientWidth;return[r,s,a]},a1=function(t,r){return t==="v"?aC(r):iC(r)},i1=function(t,r){return t==="v"?lC(r):cC(r)},uC=function(t,r){return t==="h"&&r==="rtl"?-1:1},dC=function(t,r,s,a,i){var l=uC(t,window.getComputedStyle(r).direction),d=l*a,u=s.target,p=r.contains(u),f=!1,v=d>0,m=0,y=0;do{if(!u)break;var w=i1(t,u),C=w[0],_=w[1],b=w[2],N=_-b-l*C;(C||N)&&a1(t,u)&&(m+=N,y+=C);var A=u.parentNode;u=A&&A.nodeType===Node.DOCUMENT_FRAGMENT_NODE?A.host:A}while(!p&&u!==document.body||p&&(r.contains(u)||r===u));return(v&&Math.abs(m)<1||!v&&Math.abs(y)<1)&&(f=!0),f},el=function(t){return"changedTouches"in t?[t.changedTouches[0].clientX,t.changedTouches[0].clientY]:[0,0]},jp=function(t){return[t.deltaX,t.deltaY]},Mp=function(t){return t&&"current"in t?t.current:t},fC=function(t,r){return t[0]===r[0]&&t[1]===r[1]},hC=function(t){return`
.block-interactivity-`.concat(t,` {pointer-events: none;}
.allow-interactivity-`).concat(t,` {pointer-events: all;}
`)},pC=0,as=[];function mC(t){var r=E.useRef([]),s=E.useRef([0,0]),a=E.useRef(),i=E.useState(pC++)[0],l=E.useState(o1)[0],d=E.useRef(t);E.useEffect(function(){d.current=t},[t]),E.useEffect(function(){if(t.inert){document.body.classList.add("block-interactivity-".concat(i));var _=M4([t.lockRef.current],(t.shards||[]).map(Mp),!0).filter(Boolean);return _.forEach(function(b){return b.classList.add("allow-interactivity-".concat(i))}),function(){document.body.classList.remove("block-interactivity-".concat(i)),_.forEach(function(b){return b.classList.remove("allow-interactivity-".concat(i))})}}},[t.inert,t.lockRef.current,t.shards]);var u=E.useCallback(function(_,b){if("touches"in _&&_.touches.length===2||_.type==="wheel"&&_.ctrlKey)return!d.current.allowPinchZoom;var N=el(_),A=s.current,k="deltaX"in _?_.deltaX:A[0]-N[0],B="deltaY"in _?_.deltaY:A[1]-N[1],S,R=_.target,T=Math.abs(k)>Math.abs(B)?"h":"v";if("touches"in _&&T==="h"&&R.type==="range")return!1;var D=window.getSelection(),L=D&&D.anchorNode,M=L?L===R||L.contains(R):!1;if(M)return!1;var $=Pp(T,R);if(!$)return!0;if($?S=T:(S=T==="v"?"h":"v",$=Pp(T,R)),!$)return!1;if(!a.current&&"changedTouches"in _&&(k||B)&&(a.current=S),!S)return!0;var U=a.current||S;return dC(U,b,_,U==="h"?k:B)},[]),p=E.useCallback(function(_){var b=_;if(!(!as.length||as[as.length-1]!==l)){var N="deltaY"in b?jp(b):el(b),A=r.current.filter(function(S){return S.name===b.type&&(S.target===b.target||b.target===S.shadowParent)&&fC(S.delta,N)})[0];if(A&&A.should){b.cancelable&&b.preventDefault();return}if(!A){var k=(d.current.shards||[]).map(Mp).filter(Boolean).filter(function(S){return S.contains(b.target)}),B=k.length>0?u(b,k[0]):!d.current.noIsolation;B&&b.cancelable&&b.preventDefault()}}},[]),f=E.useCallback(function(_,b,N,A){var k={name:_,delta:b,target:N,should:A,shadowParent:xC(N)};r.current.push(k),setTimeout(function(){r.current=r.current.filter(function(B){return B!==k})},1)},[]),v=E.useCallback(function(_){s.current=el(_),a.current=void 0},[]),m=E.useCallback(function(_){f(_.type,jp(_),_.target,u(_,t.lockRef.current))},[]),y=E.useCallback(function(_){f(_.type,el(_),_.target,u(_,t.lockRef.current))},[]);E.useEffect(function(){return as.push(l),t.setCallbacks({onScrollCapture:m,onWheelCapture:m,onTouchMoveCapture:y}),document.addEventListener("wheel",p,ss),document.addEventListener("touchmove",p,ss),document.addEventListener("touchstart",v,ss),function(){as=as.filter(function(_){return _!==l}),document.removeEventListener("wheel",p,ss),document.removeEventListener("touchmove",p,ss),document.removeEventListener("touchstart",v,ss)}},[]);var w=t.removeScrollBar,C=t.inert;return E.createElement(E.Fragment,null,C?E.createElement(l,{styles:hC(i)}):null,w?E.createElement(oC,{noRelative:t.noRelative,gapMode:t.gapMode}):null)}function xC(t){for(var r=null;t!==null;)t instanceof ShadowRoot&&(r=t.host,t=t.host),t=t.parentNode;return r}const vC=W4(r1,mC);var l1=E.forwardRef(function(t,r){return E.createElement(Zl,nr({},t,{ref:r,sideCar:vC}))});l1.classNames=Zl.classNames;var yC=function(t){if(typeof document>"u")return null;var r=Array.isArray(t)?t[0]:t;return r.ownerDocument.body},is=new WeakMap,tl=new WeakMap,nl={},m0=0,c1=function(t){return t&&(t.host||c1(t.parentNode))},gC=function(t,r){return r.map(function(s){if(t.contains(s))return s;var a=c1(s);return a&&t.contains(a)?a:(console.error("aria-hidden",s,"in not contained inside",t,". Doing nothing"),null)}).filter(function(s){return!!s})},bC=function(t,r,s,a){var i=gC(r,Array.isArray(t)?t:[t]);nl[s]||(nl[s]=new WeakMap);var l=nl[s],d=[],u=new Set,p=new Set(i),f=function(m){!m||u.has(m)||(u.add(m),f(m.parentNode))};i.forEach(f);var v=function(m){!m||p.has(m)||Array.prototype.forEach.call(m.children,function(y){if(u.has(y))v(y);else try{var w=y.getAttribute(a),C=w!==null&&w!=="false",_=(is.get(y)||0)+1,b=(l.get(y)||0)+1;is.set(y,_),l.set(y,b),d.push(y),_===1&&C&&tl.set(y,!0),b===1&&y.setAttribute(s,"true"),C||y.setAttribute(a,"true")}catch(N){console.error("aria-hidden: cannot operate on ",y,N)}})};return v(r),u.clear(),m0++,function(){d.forEach(function(m){var y=is.get(m)-1,w=l.get(m)-1;is.set(m,y),l.set(m,w),y||(tl.has(m)||m.removeAttribute(a),tl.delete(m)),w||m.removeAttribute(s)}),m0--,m0||(is=new WeakMap,is=new WeakMap,tl=new WeakMap,nl={})}},wC=function(t,r,s){s===void 0&&(s="data-aria-hidden");var a=Array.from(Array.isArray(t)?t:[t]),i=yC(t);return i?(a.push.apply(a,Array.from(i.querySelectorAll("[aria-live], script"))),bC(a,i,s,"aria-hidden")):function(){return null}};function CC(t){const r=kC(t),s=E.forwardRef((a,i)=>{const{children:l,...d}=a,u=E.Children.toArray(l),p=u.find(_C);if(p){const f=p.props.children,v=u.map(m=>m===p?E.Children.count(f)>1?E.Children.only(null):E.isValidElement(f)?f.props.children:null:m);return h.jsx(r,{...d,ref:i,children:E.isValidElement(f)?E.cloneElement(f,void 0,v):null})}return h.jsx(r,{...d,ref:i,children:l})});return s.displayName=`${t}.Slot`,s}function kC(t){const r=E.forwardRef((s,a)=>{const{children:i Line truncated
If you want to hide the \`${r.titleName}\`, you can wrap it with our VisuallyHidden component.
For more information, see https://radix-ui.com/primitives/docs/components/${r.docsSlug}`;return E.useEffect(()=>{t&&(document.getElementById(t)||console.error(s))},[s,t]),null},MC="DialogDescriptionWarning",zC=({contentRef:t,descriptionId:r})=>{const a=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${E1(MC).contentName}}.`;return E.useEffect(()=>{var l;const i=(l=t.current)==null?void 0:l.getAttribute("aria-describedby");r&&i&&(document.getElementById(r)||console.warn(a))},[a,t,r]),null},_1=d1,S1=p1,ec=m1,tc=x1,nc=y1,rc=b1,A1=C1;const ja=_1,OC=S1,N1=E.forwardRef(({className:t,...r},s)=>h.jsx(ec,{ref:s,className:Ve("fixed inset-0 z-50 bg-overlay/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",t),...r}));N1.displayName=ec.displayName;const gs=E.forwardRef(({className:t,children:r,...s},a)=>h.jsxs(OC,{children:[h.jsx(N1,{}),h.jsxs(tc,{ref:a,className:Ve("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",t),...s,children:[r,h.jsxs(A1,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground",children:[h.jsx(Q0,{className:"h-4 w-4"}),h.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));gs.displayName=tc.displayName;const bs=({className:t,...r})=>h.jsx("div",{className:Ve("flex flex-col space-y-1.5 text-center sm:text-left",t),...r});bs.displayName="DialogHeader";const Ma=({className:t,...r})=>h.jsx("div",{className:Ve("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",t),...r});Ma.displayName="DialogFooter";const ws=E.forwardRef(({className:t,...r},s)=>h.jsx(nc,{ref:s,className:Ve("text-lg font-semibold leading-none tracking-tight",t),...r}));ws.displayName=nc.displayName;const Cs=E.forwardRef(({className:t,...r},s)=>h.jsx(rc,{ref:s,className:Ve("text-sm text-muted-foreground",t),...r}));Cs.displayName=rc.displayName;function HC(t){return t===0?"1-byte hops":t===1?"2-byte hops":t===2?"3-byte hops":"Unknown hop width"}function zp(t,r,s,a){if(t.path_len<=0||!t.path)return`${r} -> ${s}`;const i=Gr(t.path,t.path_len).map(l=>{const d=Gx(l,a,!0);return d.length===1?d[0].name||`${d[0].public_key.slice(0,l.length)}…`:d.length>1?`${l}…?`:`${l}…`});return[r,...i,s].join(" -> ")}function Op({label:t,route:r,chain:s}){const a=Gr(r.path,r.path_len).join(" -> ")||"direct";return h.jsxs("div",{className:"rounded-md border border-border bg-muted/20 p-3",children:[h.jsxs("div",{className:"flex items-center justify-between gap-3",children:[h.jsx("h4",{className:"text-sm font-semibold",children:t}),h.jsx("span",{className:"text-[11px] text-muted-foreground",children:In(r.path_len,!0)})]}),h.jsx("p",{className:"mt-2 text-sm",children:s}),h.jsxs("div",{className:"mt-2 flex flex-wrap gap-x-3 gap-y-1 text-[11px] text-muted-foreground",children:[h.jsxs("span",{children:["Raw: ",a]}),h.jsx("span",{children:HC(r.path_hash_mode)})]})]})}function LC({open:t,onClose:r,contact:s,contacts:a,radioName:i,onDiscover:l}){const[d,u]=E.useState(!1),[p,f]=E.useState(null),[v,m]=E.useState(null),y=E.useMemo(()=>td(s),[s]),w=Ta(s),C=E.useMemo(()=>{if(s.last_path_len===-1)return"Flood";const k=Gr(s.last_path,s.last_path_len);return k.length>0?`${In(s.last_path_len,!0)} (${k.join(" -> ")})`:In(s.last_path_len,!0)},[s.last_path,s.last_path_len]),_=E.useMemo(()=>{if(!w)return null;if(y.pathLen===-1)return"Flood";const k=Gr(y.path,y.pathLen);return k.length>0?`${In(y.pathLen,!0)} (${k.join(" -> ")})`:In(y.pathLen,!0)},[y,w]),b=v?zp(v.forward_path,i||"Local radio",s.name||s.public_key.slice(0,12),a):null,N=v?zp(v.return_path,s.name||s.public_key.slice(0,12),i||"Local radio",a):null,A=async()=>{u(!0),f(null);try{const k=await l(s.public_key);m(k)}catch(k){f(k instanceof Error?k.message:"Unknown error")}finally{u(!1)}};return h.jsx(ja,{open:t,onOpenChange:k=>!k&&r(),children:h.jsxs(gs,{className:"sm:max-w-[560px]",children:[h.jsxs(bs,{children:[h.jsx(ws,{children:"Path Discovery"}),h.jsx(Cs,{children:"Send a routed probe to this contact and wait for the round-trip path response. The learned forward route will be saved back onto the contact if a response comes back."})]}),h.jsxs("div",{className:"space-y-4",children:[h.jsxs("div",{className:"rounded-md border border-border bg-muted/20 p-3 text-sm",children:[h.jsx("div",{className:"font-medium",children:s.name Line truncated
`).map((Ie,rt,ut)=>h.jsxs("span",{children:[ck(Ie,v),rt<ut.length-1&&h.jsx("br",{})]},rt)),!ve&&h.jsxs(h.Fragment,{children:[h.jsx("span",{className:"text-[10px] text-muted-foreground ml-2",children:Fn(Q.sender_timestamp||Q.received_at)}),!Q.outgoing&&Q.paths&&Q.paths.length>0&&h.jsx(qp,{paths:Q.paths,variant:"inline",onClick:()=>L({paths:Q.paths,senderInfo:pt(Q,Te,$e)})})]}),Q.outgoing&&(Q.acked>0?Q.paths&&Q.paths.length>0?h.jsx("span",{className:"text-muted-foreground cursor-pointer hover:text-primary",role:"button",tabIndex:0,onKeyDown:rn,onClick:Ie=>{Ie.stopPropagation(),L({paths:Q.paths,senderInfo:Rt,messageId:Q.id,isOutgoingChan:Q.type==="CHAN"&&!!f})},title:"View echo paths","aria-label":`Acknowledged, ${Q.acked} echo${Q.acked!==1?"s":""} — view paths`,children:` ✓${Q.acked>1?Q.acked:""}`}):h.jsx("span",{className:"text-muted-foreground",children:` ✓${Q.acked>1?Q.acked:""}`}):f&&Q.type==="CHAN"?h.jsxs("span",{className:"text-muted-foreground cursor-pointer hover:text-primary",role:"button",tabIndex:0,onKeyDown:rn,onClick:Ie=>{Ie.stopPropagation(),L({paths:[],senderInfo:Rt,messageId:Q.id,isOutgoingChan:!0})},title:"Message status","aria-label":"No echoes yet — view message status",children:[" ","?"]}):h.jsxs("span",{className:"text-muted-foreground",title:"No repeats heard yet",children:[" ","?"]}))]})]})]})]},Q.id)}),b&&h.jsx("div",{className:"text-center py-2 text-muted-foreground text-sm",role:"status",children:"Loading newer messages..."}),!b&&_&&h.jsx("div",{className:"text-center py-2 text-muted-foreground text-xs",children:"Scroll down for newer messages"})]}),ie&&h.jsx("div",{className:"pointer-events-none absolute bottom-4 left-1/2 -translate-x-1/2",children:h.jsxs("div",{className:"pointer-events-auto flex h-9 items-center overflow-hidden rounded-full border border-border bg-card shadow-lg transition-all hover:scale-105",children:[h.jsx("button",{type:"button",onClick:()=>{var Q,xe;(xe=(Q=K.current)==null?void 0:Q.scrollIntoView)==null||xe.call(Q,{block:"center"}),oe(!0),re(!1)},className:"h-full px-3 text-sm font-medium hover:bg-accent focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",children:"Jump to unread"}),h.jsx("button",{type:"button",onClick:()=>{oe(!0),re(!1)},className:"flex h-full w-9 items-center justify-center border-l border-border text-muted-foreground hover:bg-accent hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring","aria-label":"Dismiss jump to unread",title:"Dismiss jump to unread",children:"×"})]})}),R&&h.jsx("button",{onClick:Ue,className:"absolute bottom-4 right-4 w-9 h-9 rounded-full bg-card hover:bg-accent border border-border flex items-center justify-center shadow-lg transition-all hover:scale-105 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",title:"Scroll to bottom","aria-label":"Scroll to bottom",children:h.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"text-muted-foreground",children:h.jsx("polyline",{points:"6 9 12 15 18 9"})})}),D&&h.jsx(sk,{open:!0,onClose:()=>L(null),paths:D.paths,senderInfo:D.senderInfo,contacts:r,config:m??null,messageId:D.messageId,isOutgoingChan:D.isOutgoingChan,isResendable:Et,onResend:f})]})}var mr={},ua={},Kt={},Kp;function En(){if(Kp)return Kt;Kp=1,Object.defineProperty(Kt,"__esModule",{value:!0}),Kt.RequestType=Kt.AdvertFlags=Kt.DeviceRole=Kt.PayloadVersion=Kt.ControlSubType=Kt.PayloadType=Kt.RouteType=void 0;var t;(function(u){u[u.TransportFlood=0]="TransportFlood",u[u.Flood=1]="Flood",u[u.Direct=2]="Direct",u[u.TransportDirect=3]="TransportDirect"})(t||(Kt.RouteType=t={}));var r;(function(u){u[u.Request=0]="Request",u[u.Response=1]="Response",u[u.TextMessage=2]="TextMessage",u[u.Ack=3]="Ack",u[u.Advert=4]="Advert",u[u.GroupText=5]="GroupText",u[u.GroupData=6]="GroupData",u[u.AnonRequest=7]="AnonRequest",u[u.Path=8]="Path",u[u.Trace=9]="Trace",u[u.Multipart=10]="Multipart",u[u.Control=11]="Control",u[u.RawCustom=15]="RawCustom"})(r||(Kt.PayloadType=r={}));var s;(function(u){u[u.NodeDiscoverReq=128]="NodeDiscoverReq",u[u.NodeDiscoverResp=144]="NodeDiscoverResp"})(s||(Kt.ControlSubType=s={}));var a;(function(u){u[u.Version1=0]="Version1",u[u.Version2=1]="Version2",u[u.Version3=2]="Version3",u[u.Version4=3]="Version4"})(a||(Kt.PayloadVersion=a={}));var i;(function(u){u[u.Unknown=0]="Unknown",u[u.ChatNode=1]="ChatNode",u[u.Repeater=2]="Repeater",u[u.RoomServer=3]="RoomServer",u[u.Sensor=4]="Sensor"})(i||(Kt.DeviceRole=i={}));var l;(function(u){u[u.HasLocation=16]="HasLocation",u[u.HasFeature1=32]="HasFeature1",u[u.HasFeature2=64]="HasFeature2",u[u.HasName=128]="HasName"})(l||(Kt.AdvertFlags=l={}));var d;return(function(u){u[u.GetStats=1]="GetStats",u[u.Keepalive=2]="Keepalive",u[u.GetTelemetryData=3]="GetTelemetryData",u[u.GetMinMaxAvgData=4]="GetMinMaxAvgData",u[u.GetAccessList=5]="GetAc Line truncated
(c) 2012 by Cédric Mesnil. All rights reserved.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
- Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
- Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/return(function(a){var i=s,l=i.lib,d=l.WordArray,u=l.Hasher,p=i.algo,f=d.create([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13]),v=d.create([5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11]),m=d.create([11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6]),y=d.create([8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11]),w=d.create([0,1518500249,1859775393,2400959708,2840853838]),C=d.create([1352829926,1548603684,1836072691,2053994217,0]),_=p.RIPEMD160=u.extend({_doReset:function(){this._hash=d.create([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(R,T){for(var D=0;D<16;D++){var L=T+D,M=R[L];R[L]=(M<<8|M>>>24)&16711935|(M<<24|M>>>8)&4278255360}var $=this._hash.words,U=w.words,q=C.words,Y=f.words,ie=v.words,re=m.words,le=y.words,oe,se,K,P,z,I,j,G,J,ce;I=oe=$[0],j=se=$[1],G=K=$[2],J=P=$[3],ce=z=$[4];for(var ne,D=0;D<80;D+=1)ne=oe+R[T+Y[D]]|0,D<16?ne+=b(se,K,P)+U[0]:D<32?ne+=N(se,K,P)+U[1]:D<48?ne+=A(se,K,P)+U[2]:D<64?ne+=k(se,K,P)+U[3]:ne+=B(se,K,P)+U[4],ne=ne|0,ne=S(ne,re[D]),ne=ne+z|0,oe=z,z=P,P=S(K,10),K=se,se=ne,ne=I+R[T+ie[D]]|0,D<16?ne+=B(j,G,J)+q[0]:D<32?ne+=k(j,G,J)+q[1]:D<48?ne+=A(j,G,J)+q[2]:D<64?ne+=N(j,G,J)+q[3]:ne+=b(j,G,J)+q[4],ne=ne|0,ne=S(ne,le[D]),ne=ne+ce|0,I=ce,ce=J,J=S(G,10),G=j,j=ne;ne=$[1]+K+J|0,$[1]=$[2]+P+ce|0,$[2]=$[3]+z+I|0,$[3]=$[4]+oe+j|0,$[4]=$[0]+se+G|0,$[0]=ne},_doFinalize:function(){var R=this._data,T=R.words,D=this._nDataBytes*8,L=R.sigBytes*8;T[L>>>5]|=128<<24-L%32,T[(L+64>>>9<<4)+14]=(D<<8|D>>>24)&16711935|(D<<24|D>>>8)&4278255360,R.sigBytes=(T.length+1)*4,this._process();for(var M=this._hash,$=M.words,U=0;U<5;U++){var q=$[U];$[U]=(q<<8|q>>>24)&16711935|(q<<24|q>>>8)&4278255360}return M},clone:function(){var R=u.clone.call(this);return R._hash=this._hash.clone(),R}});function b(R,T,D){return R^T^D}function N(R,T,D){return R&T|~R&D}function A(R,T,D){return(R|~T)^D}function k(R,T,D){return R&D|T&~D}function B(R,T,D){return R^(T|~D)}function S(R,T){return R<<T|R>>>32-T}i.RIPEMD160=u._createHelper(_),i.HmacRIPEMD160=u._createHmacHelper(_)})(),s.RIPEMD160})})(gl)),gl.exports}var bl={exports:{}},Mk=bl.exports,um;function ad(){return um||(um=1,(function(t,r){(function(s,a){t.exports=a(Qe())})(Mk,function(s){(function(){var a=s,i=a.lib,l=i.Base,d=a.enc,u=d.Utf8,p=a.algo;p.HMAC=l.extend({init:function(f,v){f=this._hasher=new f.init,typeof v=="string"&&(v=u.parse(v));var m=f.blockSize,y=m*4;v.sigBytes>y&&(v=f.finalize(v)),v.clamp();for(var w=this._oKey=v.clone(),C=this._iKey=v.clone(),_=w.words,b=C.words,N=0;N<m;N++)_[N]^=1549556828,b[N]^=909522486;w.sigBytes=C.sigBytes=y,this.reset()},reset:function(){var f=this._hasher;f.reset(),f.update(this._iKey)},update:function(f){return this._hasher.update(f),this},finalize:function(f){var v=this._hasher,m=v.finalize(f);v.reset();var y=v.finalize(this._oKey.clone().concat(m));return y}})})()})})(bl)),bl.exports}var wl={exports:{}},zk=wl.exports,dm;function Ok(){return dm||(dm=1,(function(t,r){(function(s,a,i){t.exports=a(Qe(),sd(),ad())})(zk,function(s){return(function(){var a=s,i=a.lib,l=i.Base,d=i.WordArray,u=a.algo,p=u.SHA256,f=u.HMAC,v=u.PBKDF2=l.extend({cfg:l.extend({keySize:128/32,hasher:p,iterations:25e4}),init:function(m){this.cfg=this.cfg.extend(m)},compute:function(m,y){for(var w=this.cfg,C=f.create(w.hasher,m),_=d.create(),b=d.create([1]),N=_.words,A=b.words,k=w.keySize,B=w.iterations;N.length<k;){var S=C.update(y).finalize(b);C.reset();for(var R=S.words,T=R.length,D=S,L=1;L<B;L++){D=C.finalize(D),C.reset();for(var M=D.words,$=0;$<T;$++)R[$]^=M[$]}_.concat(S),A[0]++}return _.sigBytes=k*4,_}});a.PBKDF2=function(m,y,w){return v.create(w).compute(m,y)}})(),s.PBKDF2})})(wl)),wl.exports}var Cl={exports:{}},Hk=Cl.exports,fm;function Xr(){return fm||(fm=1,(function(t,r){(function(s,a,i){t.exports=a(Qe(),F1(),ad())})(Hk,function(s){return(function(){var a=s,i=a.lib,l=i.Base,d=i.WordArray,u=a.algo,p=u.MD5,f=u.EvpKDF=l.extend({cfg:l.extend({keySize:128/32,hasher:p,iterations:1}),init:function(v){this.cfg=this.cfg.extend(v)},compute:function(v,m){for(var y,w=this.cfg,C=w.hasher.create(),_=d.create(),b=_.words,N=w.keySize,A=w.iterations;b.length<N;){y&&C.update(y),y=C.update(v).finalize(m),C.reset();for(var k=1;k<A;k++)y=C.finalize(y),C.reset();_.concat(y)}return _.sigBytes=N*4,_}});a.EvpKDF=function(v,m,y){return f.create(y).compute(v,m)}})(),s.EvpKDF})})(Cl)),Cl.exports}var kl={exports:{}},Lk=kl.exports,hm;function Ut(){return hm||Line truncated
* Counter block mode compatible with Dr Brian Gladman fileenc.c
* derived from CryptoJS.mode.CTR
* Jan Hruby jhruby.web@gmail.com
*/return s.mode.CTRGladman=(function(){var a=s.lib.BlockCipherMode.extend();function i(u){if((u>>24&255)===255){var p=u>>16&255,f=u>>8&255,v=u&255;p===255?(p=0,f===255?(f=0,v===255?v=0:++v):++f):++p,u=0,u+=p<<16,u+=f<<8,u+=v}else u+=1<<24;return u}function l(u){return(u[0]=i(u[0]))===0&&(u[1]=i(u[1])),u}var d=a.Encryptor=a.extend({processBlock:function(u,p){var f=this._cipher,v=f.blockSize,m=this._iv,y=this._counter;m&&(y=this._counter=m.slice(0),this._iv=void 0),l(y);var w=y.slice(0);f.encryptBlock(w,0);for(var C=0;C<v;C++)u[p+C]^=w[C]}});return a.Decryptor=d,a})(),s.mode.CTRGladman})})(Sl)),Sl.exports}var Al={exports:{}},Kk=Al.exports,vm;function Gk(){return vm||(vm=1,(function(t,r){(function(s,a,i){t.exports=a(Qe(),Ut())})(Kk,function(s){return s.mode.OFB=(function(){var a=s.lib.BlockCipherMode.extend(),i=a.Encryptor=a.extend({processBlock:function(l,d){var u=this._cipher,p=u.blockSize,f=this._iv,v=this._keystream;f&&(v=this._keystream=f.slice(0),this._iv=void 0),u.encryptBlock(v,0);for(var m=0;m<p;m++)l[d+m]^=v[m]}});return a.Decryptor=i,a})(),s.mode.OFB})})(Al)),Al.exports}var Nl={exports:{}},Yk=Nl.exports,ym;function Xk(){return ym||(ym=1,(function(t,r){(function(s,a,i){t.exports=a(Qe(),Ut())})(Yk,function(s){return s.mode.ECB=(function(){var a=s.lib.BlockCipherMode.extend();return a.Encryptor=a.extend({processBlock:function(i,l){this._cipher.encryptBlock(i,l)}}),a.Decryptor=a.extend({processBlock:function(i,l){this._cipher.decryptBlock(i,l)}}),a})(),s.mode.ECB})})(Nl)),Nl.exports}var Bl={exports:{}},Qk=Bl.exports,gm;function Zk(){return gm||(gm=1,(function(t,r){(function(s,a,i){t.exports=a(Qe(),Ut())})(Qk,function(s){return s.pad.AnsiX923={pad:function(a,i){var l=a.sigBytes,d=i*4,u=d-l%d,p=l+u-1;a.clamp(),a.words[p>>>2]|=u<<24-p%4*8,a.sigBytes+=u},unpad:function(a){var i=a.words[a.sigBytes-1>>>2]&255;a.sigBytes-=i}},s.pad.Ansix923})})(Bl)),Bl.exports}var Dl={exports:{}},Jk=Dl.exports,bm;function e8(){return bm||(bm=1,(function(t,r){(function(s,a,i){t.exports=a(Qe(),Ut())})(Jk,function(s){return s.pad.Iso10126={pad:function(a,i){var l=i*4,d=l-a.sigBytes%l;a.concat(s.lib.WordArray.random(d-1)).concat(s.lib.WordArray.create([d<<24],1))},unpad:function(a){var i=a.words[a.sigBytes-1>>>2]&255;a.sigBytes-=i}},s.pad.Iso10126})})(Dl)),Dl.exports}var Fl={exports:{}},t8=Fl.exports,wm;function n8(){return wm||(wm=1,(function(t,r){(function(s,a,i){t.exports=a(Qe(),Ut())})(t8,function(s){return s.pad.Iso97971={pad:function(a,i){a.concat(s.lib.WordArray.create([2147483648],1)),s.pad.ZeroPadding.pad(a,i)},unpad:function(a){s.pad.ZeroPadding.unpad(a),a.sigBytes--}},s.pad.Iso97971})})(Fl)),Fl.exports}var Rl={exports:{}},r8=Rl.exports,Cm;function o8(){return Cm||(Cm=1,(function(t,r){(function(s,a,i){t.exports=a(Qe(),Ut())})(r8,function(s){return s.pad.ZeroPadding={pad:function(a,i){var l=i*4;a.clamp(),a.sigBytes+=l-(a.sigBytes%l||l)},unpad:function(a){for(var i=a.words,l=a.sigBytes-1,l=a.sigBytes-1;l>=0;l--)if(i[l>>>2]>>>24-l%4*8&255){a.sigBytes=l+1;break}}},s.pad.ZeroPadding})})(Rl)),Rl.exports}var Tl={exports:{}},s8=Tl.exports,km;function a8(){return km||(km=1,(function(t,r){(function(s,a,i){t.exports=a(Qe(),Ut())})(s8,function(s){return s.pad.NoPadding={pad:function(){},unpad:function(){}},s.pad.NoPadding})})(Tl)),Tl.exports}var Pl={exports:{}},i8=Pl.exports,Em;function l8(){return Em||(Em=1,(function(t,r){(function(s,a,i){t.exports=a(Qe(),Ut())})(i8,function(s){return(function(a){var i=s,l=i.lib,d=l.CipherParams,u=i.enc,p=u.Hex,f=i.format;f.Hex={stringify:function(v){return v.ciphertext.toString(p)},parse:function(v){var m=p.parse(v);return d.create({ciphertext:m})}}})(),s.format.Hex})})(Pl)),Pl.exports}var jl={exports:{}},c8=jl.exports,_m;function u8(){return _m||(_m=1,(function(t,r){(function(s,a,i){t.exports=a(Qe(),_o(),So(),Xr(),Ut())})(c8,function(s){return(function(){var a=s,i=a.lib,l=i.BlockCipher,d=a.algo,u=[],p=[],f=[],v=[],m=[],y=[],w=[],C=[],_=[],b=[];(function(){for(var k=[],B=0;B<256;B++)B<128?k[B]=B<<1:k[B]=B<<1^283;for(var S=0,R=0,B=0;B<256;B++){var T=R^R<<1^R<<2^R<<3^R<<4;T=T>>>8^T&255^99,u[S]=T,p[T]=S;var D=k[S],L=k[D],M=k[L],$=k[T]*257^T*16843008;f[S]=$<<24|$>>>8,v[S]=$<<16|$>>>16,m[S]=$<<8|$>>>24,y[S]=$;var $=M*16843009^L*65537^D*257^S*16843008;w[T]=$<<24|$>>>8,C[T]=$<<16|$>>>16,_[T]=$<<8|$>>>24,b[T]=$,S?(S=D^k[k[k[M^D]]],R^=k[k[R]]):S=R=1}})();var N=[0,1,2,4,8,16,32,64,128,27,54],A=d.AES=l.extend({_doReset:function(){var k;if(!(this._nRounds&&this._keyPriorReset===this._key)){for(var B=this._keyPriorReset=this._key,S=B.words,R=B.sigBytes/4,T=this._nRounds=R+6,D=(T+1)*4,L=this._keySchedule=[],M=0;M<D;M++)M<R?L[M]=S[M]:(k=L[M-1],M%R?R>6&&M%R==4&&(k=u[k>>>24]<<24|u[k>>>16&255]<<16|u[k>>>8&255]<<8|u[k&255]):(k=k<<8|k>>>24,k=u[k>>>24]<<24|u[k>>>16&255]<<16|u[k>>>8&255]<<8|u[k&255],k^=N[M/R|0]<<24),L[M]=L[M-R]^k);for(var $=this._invKeySchedule=[],U=0;U<D;U++){var M=D-U;if(U%4)var k=L[M];else var k=L[M-4];U<4||M<=4?$[U]=k:$[U]=w[u[k>>>24]]^C[u[k>>>16&255]]^_[u[k>>>8&255]]^b[u[k&255]]}}},encryptBlock:Line truncated
• Timestamp (4 bytes) - send time as unix timestamp
• Request Type (1 byte) - type of request (GetStats, GetTelemetryData, etc.)
• Request Data (remaining bytes) - additional request-specific data`,startByte:u+p,endByte:u+i.length-1,value:y});const w={type:t.PayloadType.Request,version:t.PayloadVersion.Version1,isValid:!0,timestamp:0,requestType:t.RequestType.GetStats,requestData:"",destinationHash:f,sourceHash:v,cipherMac:m,ciphertext:y};return l!=null&&l.includeSegments&&(w.segments=d),w}catch(d){return{type:t.PayloadType.Request,version:t.PayloadVersion.Version1,isValid:!1,errors:[d instanceof Error?d.message:"Failed to decode request payload"],timestamp:0,requestType:t.RequestType.GetStats,requestData:"",destinationHash:"",sourceHash:"",cipherMac:"",ciphertext:""}}}}return xa.RequestPayloadDecoder=s,xa}var va={},Gm;function q8(){if(Gm)return va;Gm=1,Object.defineProperty(va,"__esModule",{value:!0}),va.ResponsePayloadDecoder=void 0;const t=En(),r=Gt();class s{static decode(i,l){try{if(i.length<4){const C={type:t.PayloadType.Response,version:t.PayloadVersion.Version1,isValid:!1,errors:["Response payload too short (minimum 4 bytes: dest + source + MAC)"],destinationHash:"",sourceHash:"",cipherMac:"",ciphertext:"",ciphertextLength:0};return l!=null&&l.includeSegments&&(C.segments=[{name:"Invalid Response Data",description:"Response payload too short (minimum 4 bytes required)",startByte:l.segmentOffset||0,endByte:(l.segmentOffset||0)+i.length-1,value:(0,r.bytesToHex)(i)}]),C}const d=[],u=(l==null?void 0:l.segmentOffset)||0;let p=0;const f=(0,r.byteToHex)(i[p]);l!=null&&l.includeSegments&&d.push({name:"Destination Hash",description:"First byte of destination node public key",startByte:u+p,endByte:u+p,value:f}),p+=1;const v=(0,r.byteToHex)(i[p]);l!=null&&l.includeSegments&&d.push({name:"Source Hash",description:"First byte of source node public key",startByte:u+p,endByte:u+p,value:v}),p+=1;const m=(0,r.bytesToHex)(i.subarray(p,p+2));l!=null&&l.includeSegments&&d.push({name:"Cipher MAC",description:"MAC for encrypted data in next field",startByte:u+p,endByte:u+p+1,value:m}),p+=2;const y=(0,r.bytesToHex)(i.subarray(p));l!=null&&l.includeSegments&&i.length>p&&d.push({name:"Ciphertext",description:"Encrypted response data (tag + content)",startByte:u+p,endByte:u+i.length-1,value:y});const w={type:t.PayloadType.Response,version:t.PayloadVersion.Version1,isValid:!0,destinationHash:f,sourceHash:v,cipherMac:m,ciphertext:y,ciphertextLength:i.length-4};return l!=null&&l.includeSegments&&(w.segments=d),w}catch(d){return{type:t.PayloadType.Response,version:t.PayloadVersion.Version1,isValid:!1,errors:[d instanceof Error?d.message:"Failed to decode response payload"],destinationHash:"",sourceHash:"",cipherMac:"",ciphertext:"",ciphertextLength:0}}}}return va.ResponsePayloadDecoder=s,va}var ya={},Ym;function K8(){if(Ym)return ya;Ym=1,Object.defineProperty(ya,"__esModule",{value:!0}),ya.AnonRequestPayloadDecoder=void 0;const t=En(),r=Gt();class s{static decode(i,l){try{if(i.length<35){const C={type:t.PayloadType.AnonRequest,version:t.PayloadVersion.Version1,isValid:!1,errors:["AnonRequest payload too short (minimum 35 bytes: dest + public key + MAC)"],destinationHash:"",senderPublicKey:"",cipherMac:"",ciphertext:"",ciphertextLength:0};return l!=null&&l.includeSegments&&(C.segments=[{name:"Invalid AnonRequest Data",description:"AnonRequest payload too short (minimum 35 bytes required: 1 for dest hash + 32 for public key + 2 for MAC)",startByte:l.segmentOffset||0,endByte:(l.segmentOffset||0)+i.length-1,value:(0,r.bytesToHex)(i)}]),C}const d=[],u=(l==null?void 0:l.segmentOffset)||0;let p=0;const f=(0,r.byteToHex)(i[0]);l!=null&&l.includeSegments&&d.push({name:"Destination Hash",description:`First byte of destination node public key: 0x${f}`,startByte:u+p,endByte:u+p,value:f}),p+=1;const v=(0,r.bytesToHex)(i.subarray(1,33));l!=null&&l.includeSegments&&d.push({name:"Sender Public Key",description:"Ed25519 public key of the sender (32 bytes)",startByte:u+p,endByte:u+p+31,value:v}),p+=32;const m=(0,r.bytesToHex)(i.subarray(33,35));l!=null&&l.includeSegments&&d.push({name:"Cipher MAC",description:"MAC for encrypted data verification (2 bytes)",startByte:u+p,endByte:u+p+1,value:m}),p+=2;const y=(0,r.bytesToHex)(i.subarray(35));l!=null&&l.includeSegments&&i.length>35&&d.push({name:"Ciphertext",description:`Encrypted message data (${i.length-35} bytes). Contains encrypted plaintext with this structure:
• Timestamp (4 bytes) - send time as unix timestamp
• Sync Timestamp (4 bytes) - room server only, sender's "sync messages SINCE x" timestamp
• Password (remaining bytes) - password for repeater/room`,startByte:u+p,endByte:u+i.length-1,value:y});const w={type:t.PayloadType.AnonRequest,version:t.PayloadVersion.Version1,isValid:!0,destinationHash:f,senderPublicKey:v,cipherMac:m,ciphertext:y,ciphertextLength:i.length-35};return l!=null&&l.includeSegments&&(w.segments=d),w}catch(d){return{type:t.PayloadType.AnonRequest,version:t.PayloadVersion.Version1,isValid:!1,errors:[d instanceof Error?d.message:"Failed to decode AnonRequest payload"],destinationHash:"",senderPublicKey:"",cipherMac:"",ciphertext:"",ciphertextLength:0}}}}return ya.AnonRequestPayloadDecoder=s,ya}var ga={},Xm;function G8(){if(Xm)return ga;Xm=1,Object.defineProperty(ga,"__esModule",{value:!0}),ga.AckPayloadDecoder=void 0;const t=En(),r=Gt();class s{static decode(i,l){try{if(i.length<4){const v={type:t.PayloadType.Ack,version:t.PayloadVersion.Version1,isValid:!1,errors:["Ack payload too short (minimum 4 bytes for checksum)"],checksum:""};return l!=null&&l.includeSegments&&(v.segments=[{name:"Invalid Ack Data",description:"Ack payload too short (minimum 4 bytes required for checksum)",startByte:l.segmentOffset||0,endByte:(l.segmentOffset||0)+i.length-1,value:(0,r.bytesToHex)(i)}]),v}const d=[],u=(l==null?void 0:l.segmentOffset)||0,p=(0,r.bytesToHex)(i.subarray(0,4));l!=null&&l.includeSegments&&d.push({name:"Checksum",description:`CRC checksum of message timestamp, text, and sender pubkey: 0x${p}`,startByte:u,endByte:u+3,value:p}),l!=null&&l.includeSegments&&i.length>4&&d.push({name:"Additional Data",description:"Extra data in Ack payload",startByte:u+4,endByte:u+i.length-1,value:(0,r.bytesToHex)(i.subarray(4))});const f={type:t.PayloadType.Ack,version:t.PayloadVersion.Version1,isValid:!0,checksum:p};return l!=null&&l.includeSegments&&(f.segments=d),f}catch(d){return{type:t.PayloadType.Ack,version:t.PayloadVersion.Version1,isValid:!1,errors:[d instanceof Error?d.message:"Failed to decode Ack payload"],checksum:""}}}}return ga.AckPayloadDecoder=s,ga}var ba={},Qm;function Y8(){if(Qm)return ba;Qm=1,Object.defineProperty(ba,"__esModule",{value:!0}),ba.PathPayloadDecoder=void 0;const t=En(),r=Gt();class s{static decode(i){try{if(i.length<2)return{type:t.PayloadType.Path,version:t.PayloadVersion.Version1,isValid:!1,errors:["Path payload too short (minimum 2 bytes: path length + extra type)"],pathLength:0,pathHashes:[],extraType:0,extraData:""};const l=i[0],d=(l>>6)+1,u=l&63,p=u*d;if(d===4)return{type:t.PayloadType.Path,version:t.PayloadVersion.Version1,isValid:!1,errors:["Invalid path length byte: reserved hash size (bits 7:6 = 11)"],pathLength:0,pathHashes:[],extraType:0,extraData:""};if(i.length<1+p+1)return{type:t.PayloadType.Path,version:t.PayloadVersion.Version1,isValid:!1,errors:[`Path payload too short (need ${1+p+1} bytes for path length + path + extra type)`],pathLength:u,...d>1?{pathHashSize:d}:{},pathHashes:[],extraType:0,extraData:""};const f=[];for(let y=0;y<u;y++){const w=1+y*d,C=i.subarray(w,w+d);f.push((0,r.bytesToHex)(C))}const v=i[1+p];let m="";return i.length>1+p+1&&(m=(0,r.bytesToHex)(i.subarray(1+p+1))),{type:t.PayloadType.Path,version:t.PayloadVersion.Version1,isValid:!0,pathLength:u,...d>1?{pathHashSize:d}:{},pathHashes:f,extraType:v,extraData:m}}catch(l){return{type:t.PayloadType.Path,version:t.PayloadVersion.Version1,isValid:!1,errors:[l instanceof Error?l.message:"Failed to decode Path payload"],pathLength:0,pathHashes:[],extraType:0,extraData:""}}}}return ba.PathPayloadDecoder=s,ba}var wa={},Zm;function X8(){if(Zm)return wa;Zm=1,Object.defineProperty(wa,"__esModule",{value:!0}),wa.TextMessagePayloadDecoder=void 0;const t=En(),r=Gt();class s{static decode(i,l){try{if(i.length<4){const C={type:t.PayloadType.TextMessage,version:t.PayloadVersion.Version1,isValid:!1,errors:["TextMessage payload too short (minimum 4 bytes: dest + source + MAC)"],destinationHash:"",sourceHash:"",cipherMac:"",ciphertext:"",ciphertextLength:0};return l!=null&&l.includeSegments&&(C.segments=[{name:"Invalid TextMessage Data",description:"TextMessage payload too short (minimum 4 bytes required)",startByte:l.segmentOffset||0,endByte:(l.segmentOffset||0)+i.length-1,value:(0,r.bytesToHex)(i)}]),C}const d=[],u=(l==null?void 0:l.segmentOffset)||0;let p=0;const f=(0,r.byteToHex)(i[p]);l!=null&&l.includeSegments&&d.push({name:"Destination Hash",description:"First byte of destination node public key",startByte:u+p,endByte:u+p,value:f}),p+=1;const v=(0,r.byteToHex)(i[p]);l!=null&&l.includeSegments&&d.push({name:"Source Hash",description:"First byte of source node public key",startByte:u+p,endByte:u+p,value:v}),p+=1;const m=(0,r.bytesToHex)(i.subarray(p,p+2));l!=null&&l.includeSegments&&d.push({name:"Cipher MAC",description:"MAC for encrypted data in next field",startByte:u+p,endByte:u+p+1,value:m}),p+=2;const y=(0,r.bytesToHex)(i.subarray(p));l!=null&&l.includeSegments&&i.length>p&&d.push({name:"Ciphertext",description:"Encrypted message data (timestamp + message text)",startByte:u+p,endByte:u+i.leng Line truncated
//# sourceMappingURL=index-BUPp0i0i.js.map
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DX2bA1gX.js","assets/separator-BtL4plOj.js","assets/MapView-B_EeV5Ur.js","assets/Popup-BcLg2SsA.js","assets/SettingsModal-BMRZWaZh.js"])))=>i.map(i=>d[i]);
var og=Object.defineProperty;var sg=(t,r,s)=>r in t?og(t,r,{enumerable:!0,configurable:!0,writable:!0,value:s}):t[r]=s;var ho=(t,r,s)=>sg(t,typeof r!="symbol"?r+"":r,s);function ag(t,r){for(var s=0;s<r.length;s++){const a=r[s];if(typeof a!="string"&&!Array.isArray(a)){for(const i in a)if(i!=="default"&&!(i in t)){const l=Object.getOwnPropertyDescriptor(a,i);l&&Object.defineProperty(t,i,l.get?l:{enumerable:!0,get:()=>a[i]})}}}return Object.freeze(Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}))}(function(){const r=document.createElement("link").relList;if(r&&r.supports&&r.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))a(i);new MutationObserver(i=>{for(const l of i)if(l.type==="childList")for(const d of l.addedNodes)d.tagName==="LINK"&&d.rel==="modulepreload"&&a(d)}).observe(document,{childList:!0,subtree:!0});function s(i){const l={};return i.integrity&&(l.integrity=i.integrity),i.referrerPolicy&&(l.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?l.credentials="include":i.crossOrigin==="anonymous"?l.credentials="omit":l.credentials="same-origin",l}function a(i){if(i.ep)return;i.ep=!0;const l=s(i);fetch(i.href,l)}})();var Ju=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function fx(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function hx(t){if(Object.prototype.hasOwnProperty.call(t,"__esModule"))return t;var r=t.default;if(typeof r=="function"){var s=function a(){return this instanceof a?Reflect.construct(r,arguments,this.constructor):r.apply(this,arguments)};s.prototype=r.prototype}else s={};return Object.defineProperty(s,"__esModule",{value:!0}),Object.keys(t).forEach(function(a){var i=Object.getOwnPropertyDescriptor(t,a);Object.defineProperty(s,a,i.get?i:{enumerable:!0,get:function(){return t[a]}})}),s}var e0={exports:{}},la={},t0={exports:{}},Ye={};/**
* @license React
* react.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/var $h;function ig(){if($h)return Ye;$h=1;var t=Symbol.for("react.element"),r=Symbol.for("react.portal"),s=Symbol.for("react.fragment"),a=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),l=Symbol.for("react.provider"),d=Symbol.for("react.context"),u=Symbol.for("react.forward_ref"),p=Symbol.for("react.suspense"),f=Symbol.for("react.memo"),v=Symbol.for("react.lazy"),m=Symbol.iterator;function y(P){return P===null||typeof P!="object"?null:(P=m&&P[m]||P["@@iterator"],typeof P=="function"?P:null)}var w={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},C=Object.assign,_={};function b(P,z,W){this.props=P,this.context=z,this.refs=_,this.updater=W||w}b.prototype.isReactComponent={},b.prototype.setState=function(P,z){if(typeof P!="object"&&typeof P!="function"&&P!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,P,z,"setState")},b.prototype.forceUpdate=function(P){this.updater.enqueueForceUpdate(this,P,"forceUpdate")};function N(){}N.prototype=b.prototype;function A(P,z,W){this.props=P,this.context=z,this.refs=_,this.updater=W||w}var k=A.prototype=new N;k.constructor=A,C(k,b.prototype),k.isPureReactComponent=!0;var B=Array.isArray,S=Object.prototype.hasOwnProperty,R={current:null},T={key:!0,ref:!0,__self:!0,__source:!0};function D(P,z,W){var j,Y={},te=null,fe=null;if(z!=null)for(j in z.ref!==void 0&&(fe=z.ref),z.key!==void 0&&(te=""+z.key),z)S.call(z,j)&&!T.hasOwnProperty(j)&&(Y[j]=z[j]);var Z=arguments.length-2;if(Z===1)Y.children=W;else if(1<Z){for(var ae=Array(Z),xe=0;xe<Z;xe++)ae[xe]=arguments[xe+2];Y.children=ae}if(P&&P.defaultProps)for(j in Z=P.defaultProps,Z)Y[j]===void 0&&(Y[j]=Z[j]);return{$$typeof:t,type:P,key:te,ref:fe,props:Y,_owner:R.current}}function L(P,z){return{$$typeof:t,type:P.type,key:z,ref:P.ref,props:P.props,_owner:P._owner}}function M(P){return typeof P=="object"&&P!==null&&P.$$typeof===t}function I(P){var z={"=":"=0",":":"=2"};return"$"+P.replace(/[=:]/g,function(W){return z[W]})}var V=/\/+/g;function q(P,z){return typeof P=="object"&&P!==null&&P.key!=null?I(""+P.key):z.toString(36)}function G(P,z,W,j,Y){var te=typeof P;(te==="undefined"||te==="boolean")&&(P=null);var fe=!1;if(P===null)fe=!0;else switch(te){case"string":case"number":fe=!0;break;case"object":switch(P.$$typeof){case t:case r:fe=!0}}if(fe)return fe=P,Y=Y(fe),P=j===""?"."+q(fe,0):j,B(Y)?(W="",P!=null&&(W=P.replace(V,"$&/")+"/"),G(Y,z,W,"",function(xe){return xe})):Y!=null&&(M(Y)&&(Y=L(Y,W+(!Y.key||fe&&fe.key===Y.key?"":(""+Y.key).replace(V,"$&/")+"/")+P)),z.push(Y)),1;if(fe=0,j=j===""?".":j+":",B(P))for(var Z=0;Z<P.length;Z++){te=P[Z];var ae=j+q(te,Z);fe+=G(te,z,W,ae,Y)}else if(ae=y(P),typeof ae=="function")for(P=ae.call(P),Z=0;!(te=P.next()).done;)te=te.value,ae=j+q(te,Z++),fe+=G(te,z,W,ae,Y);else if(te==="object")throw z=String(P),Error("Objects are not valid as a React child (found: "+(z==="[object Object]"?"object with keys {"+Object.keys(P).join(", ")+"}":z)+"). If you meant to render a collection of children, use an array instead.");return fe}function ie(P,z,W){if(P==null)return P;var j=[],Y=0;return G(P,j,"","",function(te){return z.call(W,te,Y++)}),j}function re(P){if(P._status===-1){var z=P._result;z=z(),z.then(function(W){(P._status===0||P._status===-1)&&(P._status=1,P._result=W)},function(W){(P._status===0||P._status===-1)&&(P._status=2,P._result=W)}),P._status===-1&&(P._status=0,P._result=z)}if(P._status===1)return P._result.default;throw P._result}var ce={current:null},oe={transition:null},se={ReactCurrentDispatcher:ce,ReactCurrentBatchConfig:oe,ReactCurrentOwner:R};function K(){throw Error("act(...) is not supported in production builds of React.")}return Ye.Children={map:ie,forEach:function(P,z,W){ie(P,function(){z.apply(this,arguments)},W)},count:function(P){var z=0;return ie(P,function(){z++}),z},toArray:function(P){return ie(P,function(z){return z})||[]},only:function(P){if(!M(P))throw Error("React.Children.only expected to receive a single React element child.");return P}},Ye.Component=b,Ye.Fragment=s,Ye.Profiler=i,Ye.PureComponent=A,Ye.StrictMode=a,Ye.Suspense=p,Ye.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=se,Ye.act=K,Ye.cloneElement=function(P,z,W){if(P==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+P+".");var j=C({},P.props),Y=P.key,te=P.ref,fe=P._owner;if(z!=null){if(z.ref!==void 0&&(te=z.ref,fe=R.current),z.key!==void 0&&(Y=""+z.key),P.type&&P.type.defaultProps)var Z=P.type.defaultProps;for(ae in z)S.call(z,ae)&&!T.hasOwnProperty(ae)&&(j[ae]=z[ae]===void 0&&Z!==void 0?Z[ae]:z[ae])}var ae=arguments.length-2;if(ae===1)j.children=W;else if(1<ae){Z=Array(ae);for(var xe=0;xe<ae;xe++)Z[xe]=arguments[xe+2];j.children=Z}return{$$typeof:t,type:P.type,key:Y,ref:te,props:j,_owner:fe}},Ye.createContext=function(P){return P={$$typeof:d,_currentVaLine truncated
* @license React
* react-jsx-runtime.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/var Uh;function lg(){if(Uh)return la;Uh=1;var t=U0(),r=Symbol.for("react.element"),s=Symbol.for("react.fragment"),a=Object.prototype.hasOwnProperty,i=t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,l={key:!0,ref:!0,__self:!0,__source:!0};function d(u,p,f){var v,m={},y=null,w=null;f!==void 0&&(y=""+f),p.key!==void 0&&(y=""+p.key),p.ref!==void 0&&(w=p.ref);for(v in p)a.call(p,v)&&!l.hasOwnProperty(v)&&(m[v]=p[v]);if(u&&u.defaultProps)for(v in p=u.defaultProps,p)m[v]===void 0&&(m[v]=p[v]);return{$$typeof:r,type:u,key:y,ref:w,props:m,_owner:i.current}}return la.Fragment=s,la.jsx=d,la.jsxs=d,la}var Wh;function cg(){return Wh||(Wh=1,e0.exports=lg()),e0.exports}var h=cg(),E=U0();const me=fx(E),W0=ag({__proto__:null,default:me},[E]);var Gi={},n0={exports:{}},mn={},r0={exports:{}},o0={};/**
* @license React
* scheduler.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/var qh;function ug(){return qh||(qh=1,(function(t){function r(oe,se){var K=oe.length;oe.push(se);e:for(;0<K;){var P=K-1>>>1,z=oe[P];if(0<i(z,se))oe[P]=se,oe[K]=z,K=P;else break e}}function s(oe){return oe.length===0?null:oe[0]}function a(oe){if(oe.length===0)return null;var se=oe[0],K=oe.pop();if(K!==se){oe[0]=K;e:for(var P=0,z=oe.length,W=z>>>1;P<W;){var j=2*(P+1)-1,Y=oe[j],te=j+1,fe=oe[te];if(0>i(Y,K))te<z&&0>i(fe,Y)?(oe[P]=fe,oe[te]=K,P=te):(oe[P]=Y,oe[j]=K,P=j);else if(te<z&&0>i(fe,K))oe[P]=fe,oe[te]=K,P=te;else break e}}return se}function i(oe,se){var K=oe.sortIndex-se.sortIndex;return K!==0?K:oe.id-se.id}if(typeof performance=="object"&&typeof performance.now=="function"){var l=performance;t.unstable_now=function(){return l.now()}}else{var d=Date,u=d.now();t.unstable_now=function(){return d.now()-u}}var p=[],f=[],v=1,m=null,y=3,w=!1,C=!1,_=!1,b=typeof setTimeout=="function"?setTimeout:null,N=typeof clearTimeout=="function"?clearTimeout:null,A=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function k(oe){for(var se=s(f);se!==null;){if(se.callback===null)a(f);else if(se.startTime<=oe)a(f),se.sortIndex=se.expirationTime,r(p,se);else break;se=s(f)}}function B(oe){if(_=!1,k(oe),!C)if(s(p)!==null)C=!0,re(S);else{var se=s(f);se!==null&&ce(B,se.startTime-oe)}}function S(oe,se){C=!1,_&&(_=!1,N(D),D=-1),w=!0;var K=y;try{for(k(se),m=s(p);m!==null&&(!(m.expirationTime>se)||oe&&!I());){var P=m.callback;if(typeof P=="function"){m.callback=null,y=m.priorityLevel;var z=P(m.expirationTime<=se);se=t.unstable_now(),typeof z=="function"?m.callback=z:m===s(p)&&a(p),k(se)}else a(p);m=s(p)}if(m!==null)var W=!0;else{var j=s(f);j!==null&&ce(B,j.startTime-se),W=!1}return W}finally{m=null,y=K,w=!1}}var R=!1,T=null,D=-1,L=5,M=-1;function I(){return!(t.unstable_now()-M<L)}function V(){if(T!==null){var oe=t.unstable_now();M=oe;var se=!0;try{se=T(!0,oe)}finally{se?q():(R=!1,T=null)}}else R=!1}var q;if(typeof A=="function")q=function(){A(V)};else if(typeof MessageChannel<"u"){var G=new MessageChannel,ie=G.port2;G.port1.onmessage=V,q=function(){ie.postMessage(null)}}else q=function(){b(V,0)};function re(oe){T=oe,R||(R=!0,q())}function ce(oe,se){D=b(function(){oe(t.unstable_now())},se)}t.unstable_IdlePriority=5,t.unstable_ImmediatePriority=1,t.unstable_LowPriority=4,t.unstable_NormalPriority=3,t.unstable_Profiling=null,t.unstable_UserBlockingPriority=2,t.unstable_cancelCallback=function(oe){oe.callback=null},t.unstable_continueExecution=function(){C||w||(C=!0,re(S))},t.unstable_forceFrameRate=function(oe){0>oe||125<oe?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):L=0<oe?Math.floor(1e3/oe):5},t.unstable_getCurrentPriorityLevel=function(){return y},t.unstable_getFirstCallbackNode=function(){return s(p)},t.unstable_next=function(oe){switch(y){case 1:case 2:case 3:var se=3;break;default:se=y}var K=y;y=se;try{return oe()}finally{y=K}},t.unstable_pauseExecution=function(){},t.unstable_requestPaint=function(){},t.unstable_runWithPriority=function(oe,se){switch(oe){case 1:case 2:case 3:case 4:case 5:break;default:oe=3}var K=y;y=oe;try{return se()}finally{y=K}},t.unstable_scheduleCallback=function(oe,se,K){var P=t.unstable_now();switch(typeof K=="object"&&K!==null?(K=K.delay,K=typeof K=="number"&&0<K?P+K:P):K=P,oe){case 1:var z=-1;break;case 2:z=250;break;case 5:z=1073741823;break;case 4:z=1e4;break;default:z=5e3}return z=K+z,oe={id:v++,callback:se,priorityLevel:oe,startTime:K,expirationTime:z,sortIndex:-1},K>P?(oe.sortIndex=K,r(f,oe),s(p)===null&&oe===s(f)&&(_?(N(D),D=-1):_=!0,ce(B,K-P))):(oe.sortIndex=z,r(p,oe),C||w||(C=!0,re(S))),oe},t.unstable_shouldYield=I,t.unstable_wrapCallback=function(oe){var se=y;return function(){var K=y;y=se;try{return oe.apply(this,arguments)}finally{y=K}}}})(o0)),o0}var Kh;function dg(){return Kh||(Kh=1,r0.exports=ug()),r0.exports}/**
* @license React
* react-dom.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/var Gh;function fg(){if(Gh)return mn;Gh=1;var t=U0(),r=dg();function s(e){for(var n="https://reactjs.org/docs/error-decoder.html?invariant="+e,o=1;o<arguments.length;o++)n+="&args[]="+encodeURIComponent(arguments[o]);return"Minified React error #"+e+"; visit "+n+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var a=new Set,i={};function l(e,n){d(e,n),d(e+"Capture",n)}function d(e,n){for(i[e]=n,e=0;e<n.length;e++)a.add(n[e])}var u=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),p=Object.prototype.hasOwnProperty,f=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,v={},m={};function y(e){return p.call(m,e)?!0:p.call(v,e)?!1:f.test(e)?m[e]=!0:(v[e]=!0,!1)}function w(e,n,o,c){if(o!==null&&o.type===0)return!1;switch(typeof n){case"function":case"symbol":return!0;case"boolean":return c?!1:o!==null?!o.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function C(e,n,o,c){if(n===null||typeof n>"u"||w(e,n,o,c))return!0;if(c)return!1;if(o!==null)switch(o.type){case 3:return!n;case 4:return n===!1;case 5:return isNaN(n);case 6:return isNaN(n)||1>n}return!1}function _(e,n,o,c,x,g,F){this.acceptsBooleans=n===2||n===3||n===4,this.attributeName=c,this.attributeNamespace=x,this.mustUseProperty=o,this.propertyName=e,this.type=n,this.sanitizeURL=g,this.removeEmptyString=F}var b={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){b[e]=new _(e,0,!1,e,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var n=e[0];b[n]=new _(n,1,!1,e[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(e){b[e]=new _(e,2,!1,e.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){b[e]=new _(e,2,!1,e,null,!1,!1)}),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){b[e]=new _(e,3,!1,e.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(e){b[e]=new _(e,3,!0,e,null,!1,!1)}),["capture","download"].forEach(function(e){b[e]=new _(e,4,!1,e,null,!1,!1)}),["cols","rows","size","span"].forEach(function(e){b[e]=new _(e,6,!1,e,null,!1,!1)}),["rowSpan","start"].forEach(function(e){b[e]=new _(e,5,!1,e.toLowerCase(),null,!1,!1)});var N=/[\-:]([a-z])/g;function A(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var n=e.replace(N,A);b[n]=new _(n,1,!1,e,null,!1,!1)}),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var n=e.replace(N,A);b[n]=new _(n,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(e){var n=e.replace(N,A);b[n]=new _(n,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(e){b[e]=new _(e,1,!1,e.toLowerCase(),null,!1,!1)}),b.xlinkHref=new _("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(e){b[e]=new _(e,1,!1,e.toLowerCase(),null,!0,!0)});function k(e,n,o,c){var x=b.hasOwnProperty(n)?b[n]:null;(x!==null?x.type!==0:c||!(2<n.length)||n[0]!=="o"&&n[0]!=="O"||n[1]!=="n"&&n[1]!= Line truncated
`+P+e}var W=!1;function j(e,n){if(!e||W)return"";W=!0;var o=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(n)if(n=function(){throw Error()},Object.defineProperty(n.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(n,[])}catch(ne){var c=ne}Reflect.construct(e,[],n)}else{try{n.call()}catch(ne){c=ne}e.call(n.prototype)}else{try{throw Error()}catch(ne){c=ne}e()}}catch(ne){if(ne&&c&&typeof ne.stack=="string"){for(var x=ne.stack.split(`
`),g=c.stack.split(`
`),F=x.length-1,O=g.length-1;1<=F&&0<=O&&x[F]!==g[O];)O--;for(;1<=F&&0<=O;F--,O--)if(x[F]!==g[O]){if(F!==1||O!==1)do if(F--,O--,0>O||x[F]!==g[O]){var $=`
`+x[F].replace(" at new "," at ");return e.displayName&&$.includes("<anonymous>")&&($=$.replace("<anonymous>",e.displayName)),$}while(1<=F&&0<=O);break}}}finally{W=!1,Error.prepareStackTrace=o}return(e=e?e.displayName||e.name:"")?z(e):""}function Y(e){switch(e.tag){case 5:return z(e.type);case 16:return z("Lazy");case 13:return z("Suspense");case 19:return z("SuspenseList");case 0:case 2:case 15:return e=j(e.type,!1),e;case 11:return e=j(e.type.render,!1),e;case 1:return e=j(e.type,!0),e;default:return""}}function te(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case T:return"Fragment";case R:return"Portal";case L:return"Profiler";case D:return"StrictMode";case q:return"Suspense";case G:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case I:return(e.displayName||"Context")+".Consumer";case M:return(e._context.displayName||"Context")+".Provider";case V:var n=e.render;return e=e.displayName,e||(e=n.displayName||n.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case ie:return n=e.displayName||null,n!==null?n:te(e.type)||"Memo";case re:n=e._payload,e=e._init;try{return te(e(n))}catch{}}return null}function fe(e){var n=e.type;switch(e.tag){case 24:return"Cache";case 9:return(n.displayName||"Context")+".Consumer";case 10:return(n._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=n.render,e=e.displayName||e.name||"",n.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return n;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return te(n);case 8:return n===D?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof n=="function")return n.displayName||n.name||null;if(typeof n=="string")return n}return null}function Z(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function ae(e){var n=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(n==="checkbox"||n==="radio")}function xe(e){var n=ae(e)?"checked":"value",o=Object.getOwnPropertyDescriptor(e.constructor.prototype,n),c=""+e[n];if(!e.hasOwnProperty(n)&&typeof o<"u"&&typeof o.get=="function"&&typeof o.set=="function"){var x=o.get,g=o.set;return Object.defineProperty(e,n,{configurable:!0,get:function(){return x.call(this)},set:function(F){c=""+F,g.call(this,F)}}),Object.defineProperty(e,n,{enumerable:o.enumerable}),{getValue:function(){return c},setValue:function(F){c=""+F},stopTracking:function(){e._valueTracker=null,delete e[n]}}}}function Re(e){e._valueTracker||(e._valueTracker=xe(e))}function ve(e){if(!e)return!1;var n=e._valueTracker;if(!n)return!0;var o=n.getValue(),c="";return e&&(c=ae(e)?e.checked?"true":"false":e.value),e=c,e!==o?(n.setValue(e),!0):!1}function qe(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function Ue(e,n){var o=n.checked;return K({},n,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:o??e._wrapperState.initialChecked})}function Et(e,n){var o=n.defaultValue==null?"":n.defaultValue,c=n.checked!=null?n.checked:n.defaultChecked;o=Z(n.value!=null?n.value:o),e._wrapperState={initialChecked:c,initialValue:o,controlled:n.type==="checkbox"||n.type==="radio"?n.checked!=null:n.value!=null}}function _t(e,n){n=n.checked,n!=null&&k(e,"checked",n,!1)}function vt(e,n){_t(e,n);var o=Z(n.value),c=n.type;if(o!=null)c==="number"?(o===0&&e.value===""||e.value!=o)&&(e.value=""+o):e.value!==""+o&&(e.value=""+o);else if(c==="submit"||c==="reset"){e.removeAttribute("value");return}n.hasOwnProperty("value")?at(e,n.type,o):n.hasOwnProperty("defaultValue")&&at(e,n.type,Z(n.defaultValue)),n.checked==null&&n.defaultChecked!=null&&(e.defaultChecked=!!n.defaultChecked)}function St(e,n,o){if(n.hasOwnProperty("value")||n.hasOwnProperty("defaultValue")){var c=n.type;if(!(c!=="submit"&&c!=="reset"||n.value!==void 0&&n.value!==null))return;n=""+e._wrapperState.initialValue,o||n===e.value||(e.value=n),e.defaultValue=n}o=e.name,o!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,o!==""&&(e.name=o)}function at(e,n,o){(n!=="number"||qe(e.ownerDocument)!==e)&&(o==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+o&&(e.defaultValue=""+o))}var pt=Array.isArray;function Qe(e,n,o,c){if(e=e.options,n){n={};for(var x=0;x<o.length;x++)n["$"+o[x]]=!0;for(o=0;o<e.length;o++)x=n.hasOwnProperty("$"+e[o].value),e[o].selected!==x&&(e[o].selected=x),x&&c&&(e[o].defaultSelected=!0)}else{for(o=""+Z(o),n=null,x=0;x<e.length;x++){if(e[x].value===o){e[x].selected=!0,c&&(e[x].defaultSelected=!0);return}n!==null||e[x].disabled||(n=e[x])}n!==null&&(n.selected=!0)}}function Q(e,n){if(n.dangerouslySetInnerHTML!=null)t Line truncated
`).replace(vy,"")}function ii(e,n,o){if(n=af(n),af(e)!==n&&o)throw Error(s(425))}function li(){}var Uc=null,Wc=null;function qc(e,n){return e==="textarea"||e==="noscript"||typeof n.children=="string"||typeof n.children=="number"||typeof n.dangerouslySetInnerHTML=="object"&&n.dangerouslySetInnerHTML!==null&&n.dangerouslySetInnerHTML.__html!=null}var Kc=typeof setTimeout=="function"?setTimeout:void 0,yy=typeof clearTimeout=="function"?clearTimeout:void 0,lf=typeof Promise=="function"?Promise:void 0,gy=typeof queueMicrotask=="function"?queueMicrotask:typeof lf<"u"?function(e){return lf.resolve(null).then(e).catch(by)}:Kc;function by(e){setTimeout(function(){throw e})}function Gc(e,n){var o=n,c=0;do{var x=o.nextSibling;if(e.removeChild(o),x&&x.nodeType===8)if(o=x.data,o==="/$"){if(c===0){e.removeChild(x),js(n);return}c--}else o!=="$"&&o!=="$?"&&o!=="$!"||c++;o=x}while(o);js(n)}function Ar(e){for(;e!=null;e=e.nextSibling){var n=e.nodeType;if(n===1||n===3)break;if(n===8){if(n=e.data,n==="$"||n==="$!"||n==="$?")break;if(n==="/$")return null}}return e}function cf(e){e=e.previousSibling;for(var n=0;e;){if(e.nodeType===8){var o=e.data;if(o==="$"||o==="$!"||o==="$?"){if(n===0)return e;n--}else o==="/$"&&n++}e=e.previousSibling}return null}var Io=Math.random().toString(36).slice(2),qn="__reactFiber$"+Io,qs="__reactProps$"+Io,ar="__reactContainer$"+Io,Yc="__reactEvents$"+Io,wy="__reactListeners$"+Io,Cy="__reactHandles$"+Io;function eo(e){var n=e[qn];if(n)return n;for(var o=e.parentNode;o;){if(n=o[ar]||o[qn]){if(o=n.alternate,n.child!==null||o!==null&&o.child!==null)for(e=cf(e);e!==null;){if(o=e[qn])return o;e=cf(e)}return n}e=o,o=e.parentNode}return null}function Ks(e){return e=e[qn]||e[ar],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function $o(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(s(33))}function ci(e){return e[qs]||null}var Xc=[],Vo=-1;function Nr(e){return{current:e}}function gt(e){0>Vo||(e.current=Xc[Vo],Xc[Vo]=null,Vo--)}function xt(e,n){Vo++,Xc[Vo]=e.current,e.current=n}var Br={},Yt=Nr(Br),un=Nr(!1),to=Br;function Uo(e,n){var o=e.type.contextTypes;if(!o)return Br;var c=e.stateNode;if(c&&c.__reactInternalMemoizedUnmaskedChildContext===n)return c.__reactInternalMemoizedMaskedChildContext;var x={},g;for(g in o)x[g]=n[g];return c&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=n,e.__reactInternalMemoizedMaskedChildContext=x),x}function dn(e){return e=e.childContextTypes,e!=null}function ui(){gt(un),gt(Yt)}function uf(e,n,o){if(Yt.current!==Br)throw Error(s(168));xt(Yt,n),xt(un,o)}function df(e,n,o){var c=e.stateNode;if(n=n.childContextTypes,typeof c.getChildContext!="function")return o;c=c.getChildContext();for(var x in c)if(!(x in n))throw Error(s(108,fe(e)||"Unknown",x));return K({},o,c)}function di(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Br,to=Yt.current,xt(Yt,e),xt(un,un.current),!0}function ff(e,n,o){var c=e.stateNode;if(!c)throw Error(s(169));o?(e=df(e,n,to),c.__reactInternalMemoizedMergedChildContext=e,gt(un),gt(Yt),xt(Yt,e)):gt(un),xt(un,o)}var ir=null,fi=!1,Qc=!1;function hf(e){ir===null?ir=[e]:ir.push(e)}function ky(e){fi=!0,hf(e)}function Dr(){if(!Qc&&ir!==null){Qc=!0;var e=0,n=st;try{var o=ir;for(st=1;e<o.length;e++){var c=o[e];do c=c(!0);while(c!==null)}ir=null,fi=!1}catch(x){throw ir!==null&&(ir=ir.slice(e+1)),La(As,Dr),x}finally{st=n,Qc=!1}}return null}var Wo=[],qo=0,hi=null,pi=0,_n=[],Sn=0,no=null,lr=1,cr="";function ro(e,n){Wo[qo++]=pi,Wo[qo++]=hi,hi=e,pi=n}function pf(e,n,o){_n[Sn++]=lr,_n[Sn++]=cr,_n[Sn++]=no,no=e;var c=lr;e=cr;var x=32-cn(c)-1;c&=~(1<<x),o+=1;var g=32-cn(n)+x;if(30<g){var F=x-x%5;g=(c&(1<<F)-1).toString(32),c>>=F,x-=F,lr=1<<32-cn(n)+x|o<<x|c,cr=g+e}else lr=1<<g|o<<x|c,cr=e}function Zc(e){e.return!==null&&(ro(e,1),pf(e,1,0))}function Jc(e){for(;e===hi;)hi=Wo[--qo],Wo[qo]=null,pi=Wo[--qo],Wo[qo]=null;for(;e===no;)no=_n[--Sn],_n[Sn]=null,cr=_n[--Sn],_n[Sn]=null,lr=_n[--Sn],_n[Sn]=null}var gn=null,bn=null,Ct=!1,jn=null;function mf(e,n){var o=Dn(5,null,null,0);o.elementType="DELETED",o.stateNode=n,o.return=e,n=e.deletions,n===null?(e.deletions=[o],e.flags|=16):n.push(o)}function xf(e,n){switch(e.tag){case 5:var o=e.type;return n=n.nodeType!==1||o.toLowerCase()!==n.nodeName.toLowerCase()?null:n,n!==null?(e.stateNode=n,gn=e,bn=Ar(n.firstChild),!0):!1;case 6:return n=e.pendingProps===""||n.nodeType!==3?null:n,n!==null?(e.stateNode=n,gn=e,bn=null,!0):!1;case 13:return n=n.nodeType!==8?null:n,n!==null?(o=no!==null?{id:lr,overflow:cr}:null,e.memoizedState={dehydrated:n,treeContext:o,retryLane:1073741824},o=Dn(18,null,null,0),o.stateNode=n,o.return=e,e.child=o,gn=e,bn=null,!0):!1;default:return!1}}function eu(e){return(e.mode&1)!==0&&(e.flags&128)===0}function tu(e){if(Ct){var n=bn;if(n){var o=n;if(!xf(e,n)){if(eu(e))throw Error(s(418));n=Ar(o.nextSibling);var c=gn;n&&xf(e,n)?mf(c,o):(e.flags=e.flags&-4097|2,Ct=!1,gn=e)}}else{if(eu(e))throw Error(s(418));e.flags=e.flags&-4097|2,Ct=!1,gn=e}}}function vf(e){for(e=e. Line truncated
Error generating stack: `+g.message+`
`+g.stack}return{value:e,source:n,stack:x,digest:null}}function ku(e,n,o){return{value:e,source:null,stack:o??null,digest:n??null}}function Eu(e,n){try{console.error(n.value)}catch(o){setTimeout(function(){throw o})}}var Ry=typeof WeakMap=="function"?WeakMap:Map;function Qf(e,n,o){o=dr(-1,o),o.tag=3,o.payload={element:null};var c=n.value;return o.callback=function(){Pi||(Pi=!0,Hu=c),Eu(e,n)},o}function Zf(e,n,o){o=dr(-1,o),o.tag=3;var c=e.type.getDerivedStateFromError;if(typeof c=="function"){var x=n.value;o.payload=function(){return c(x)},o.callback=function(){Eu(e,n)}}var g=e.stateNode;return g!==null&&typeof g.componentDidCatch=="function"&&(o.callback=function(){Eu(e,n),typeof c!="function"&&(Pr===null?Pr=new Set([this]):Pr.add(this));var F=n.stack;this.componentDidCatch(n.value,{componentStack:F!==null?F:""})}),o}function Jf(e,n,o){var c=e.pingCache;if(c===null){c=e.pingCache=new Ry;var x=new Set;c.set(n,x)}else x=c.get(n),x===void 0&&(x=new Set,c.set(n,x));x.has(o)||(x.add(o),e=qy.bind(null,e,n,o),n.then(e,e))}function eh(e){do{var n;if((n=e.tag===13)&&(n=e.memoizedState,n=n!==null?n.dehydrated!==null:!0),n)return e;e=e.return}while(e!==null);return null}function th(e,n,o,c,x){return(e.mode&1)===0?(e===n?e.flags|=65536:(e.flags|=128,o.flags|=131072,o.flags&=-52805,o.tag===1&&(o.alternate===null?o.tag=17:(n=dr(-1,1),n.tag=2,Rr(o,n,1))),o.lanes|=1),e):(e.flags|=65536,e.lanes=x,e)}var Ty=B.ReactCurrentOwner,fn=!1;function tn(e,n,o,c){n.child=e===null?wf(n,null,o,c):Go(n,e.child,o,c)}function nh(e,n,o,c,x){o=o.render;var g=n.ref;return Xo(n,x),c=mu(e,n,o,c,g,x),o=xu(),e!==null&&!fn?(n.updateQueue=e.updateQueue,n.flags&=-2053,e.lanes&=~x,fr(e,n,x)):(Ct&&o&&Zc(n),n.flags|=1,tn(e,n,c,x),n.child)}function rh(e,n,o,c,x){if(e===null){var g=o.type;return typeof g=="function"&&!qu(g)&&g.defaultProps===void 0&&o.compare===null&&o.defaultProps===void 0?(n.tag=15,n.type=g,oh(e,n,g,c,x)):(e=Li(o.type,null,c,n,n.mode,x),e.ref=n.ref,e.return=n,n.child=e)}if(g=e.child,(e.lanes&x)===0){var F=g.memoizedProps;if(o=o.compare,o=o!==null?o:Is,o(F,c)&&e.ref===n.ref)return fr(e,n,x)}return n.flags|=1,e=Or(g,c),e.ref=n.ref,e.return=n,n.child=e}function oh(e,n,o,c,x){if(e!==null){var g=e.memoizedProps;if(Is(g,c)&&e.ref===n.ref)if(fn=!1,n.pendingProps=c=g,(e.lanes&x)!==0)(e.flags&131072)!==0&&(fn=!0);else return n.lanes=e.lanes,fr(e,n,x)}return _u(e,n,o,c,x)}function sh(e,n,o){var c=n.pendingProps,x=c.children,g=e!==null?e.memoizedState:null;if(c.mode==="hidden")if((n.mode&1)===0)n.memoizedState={baseLanes:0,cachePool:null,transitions:null},xt(es,wn),wn|=o;else{if((o&1073741824)===0)return e=g!==null?g.baseLanes|o:o,n.lanes=n.childLanes=1073741824,n.memoizedState={baseLanes:e,cachePool:null,transitions:null},n.updateQueue=null,xt(es,wn),wn|=e,null;n.memoizedState={baseLanes:0,cachePool:null,transitions:null},c=g!==null?g.baseLanes:o,xt(es,wn),wn|=c}else g!==null?(c=g.baseLanes|o,n.memoizedState=null):c=o,xt(es,wn),wn|=c;return tn(e,n,x,o),n.child}function ah(e,n){var o=n.ref;(e===null&&o!==null||e!==null&&e.ref!==o)&&(n.flags|=512,n.flags|=2097152)}function _u(e,n,o,c,x){var g=dn(o)?to:Yt.current;return g=Uo(n,g),Xo(n,x),o=mu(e,n,o,c,g,x),c=xu(),e!==null&&!fn?(n.updateQueue=e.updateQueue,n.flags&=-2053,e.lanes&=~x,fr(e,n,x)):(Ct&&c&&Zc(n),n.flags|=1,tn(e,n,o,x),n.child)}function ih(e,n,o,c,x){if(dn(o)){var g=!0;di(n)}else g=!1;if(Xo(n,x),n.stateNode===null)Bi(e,n),Yf(n,o,c),Cu(n,o,c,x),c=!0;else if(e===null){var F=n.stateNode,O=n.memoizedProps;F.props=O;var $=F.context,ne=o.contextType;typeof ne=="object"&&ne!==null?ne=An(ne):(ne=dn(o)?to:Yt.current,ne=Uo(n,ne));var de=o.getDerivedStateFromProps,he=typeof de=="function"||typeof F.getSnapshotBeforeUpdate=="function";he||typeof F.UNSAFE_componentWillReceiveProps!="function"&&typeof F.componentWillReceiveProps!="function"||(O!==c||$!==ne)&&Xf(n,F,c,ne),Fr=!1;var ue=n.memoizedState;F.state=ue,bi(n,c,F,x),$=n.memoizedState,O!==c||ue!==$||un.current||Fr?(typeof de=="function"&&(wu(n,o,de,c),$=n.memoizedState),(O=Fr||Gf(n,o,O,c,ue,$,ne))?(he||typeof F.UNSAFE_componentWillMount!="function"&&typeof F.componentWillMount!="function"||(typeof F.componentWillMount=="function"&&F.componentWillMount(),typeof F.UNSAFE_componentWillMount=="function"&&F.UNSAFE_componentWillMount()),typeof F.componentDidMount=="function"&&(n.flags|=4194308)):(typeof F.componentDidMount=="function"&&(n.flags|=4194308),n.memoizedProps=c,n.memoizedState=$),F.props=c,F.state=$,F.context=ne,c=O):(typeof F.componentDidMount=="function"&&(n.flags|=4194308),c=!1)}else{F=n.stateNode,kf(e,n),O=n.memoizedProps,ne=n.type===n.elementType?O:Mn(n.type,O),F.props=ne,he=n.pendingProps,ue=F.context,$=o.contextType,typeof $=="object"&&$!==null?$=An($):($=dn(o)?to:Yt.current,$=Uo(n,$));var we=o.getDerivedStateFromProps;(de=typeof we=="function"||typeof F.getSnapshotBeforeUpdate=="function")||typeof F.UNSAFE_componentWillReceiveProps!="function"&&typeof F.componentWillReceiveProps!="function"||(O!==he||ue!==$)&&Xf(n,F,c,$),Fr=!1,ue=n.m Line truncated
* @license lucide-react v0.562.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const H2=t=>t.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),L2=t=>t.replace(/^([A-Z])|[\s-_]+(\w)/g,(r,s,a)=>a?a.toUpperCase():s.toLowerCase()),hp=t=>{const r=L2(t);return r.charAt(0).toUpperCase()+r.slice(1)},kx=(...t)=>t.filter((r,s,a)=>!!r&&r.trim()!==""&&a.indexOf(r)===s).join(" ").trim(),I2=t=>{for(const r in t)if(r.startsWith("aria-")||r==="role"||r==="title")return!0};/**
* @license lucide-react v0.562.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/var $2={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/**
* @license lucide-react v0.562.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const V2=E.forwardRef(({color:t="currentColor",size:r=24,strokeWidth:s=2,absoluteStrokeWidth:a,className:i="",children:l,iconNode:d,...u},p)=>E.createElement("svg",{ref:p,...$2,width:r,height:r,stroke:t,strokeWidth:a?Number(s)*24/Number(r):s,className:kx("lucide",i),...!l&&!I2(u)&&{"aria-hidden":"true"},...u},[...d.map(([f,v])=>E.createElement(f,v)),...Array.isArray(l)?l:[l]]));/**
* @license lucide-react v0.562.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const ht=(t,r)=>{const s=E.forwardRef(({className:a,...i},l)=>E.createElement(V2,{ref:l,iconNode:r,className:kx(`lucide-${H2(hp(t))}`,`lucide-${t}`,a),...i}));return s.displayName=hp(t),s};/**
* @license lucide-react v0.562.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const U2=[["path",{d:"M4.929 4.929 19.07 19.071",key:"196cmz"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],os=ht("ban",U2);/**
* @license lucide-react v0.562.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const W2=[["path",{d:"M10.268 21a2 2 0 0 0 3.464 0",key:"vwvbt9"}],["path",{d:"M3.262 15.326A1 1 0 0 0 4 17h16a1 1 0 0 0 .74-1.673C19.41 13.956 18 12.499 18 8A6 6 0 0 0 6 8c0 4.499-1.411 5.956-2.738 7.326",key:"11g9vi"}]],Ex=ht("bell",W2);/**
* @license lucide-react v0.562.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const q2=[["path",{d:"M3 3v16a2 2 0 0 0 2 2h16",key:"c24i48"}],["path",{d:"M18 17V9",key:"2bz60n"}],["path",{d:"M13 17V5",key:"1frdt8"}],["path",{d:"M8 17v-3",key:"17ska0"}]],K2=ht("chart-column",q2);/**
* @license lucide-react v0.562.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const G2=[["path",{d:"M18 6 7 17l-5-5",key:"116fxf"}],["path",{d:"m22 10-7.5 7.5L13 16",key:"ke71qq"}]],Y2=ht("check-check",G2);/**
* @license lucide-react v0.562.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const X2=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],Q2=ht("check",X2);/**
* @license lucide-react v0.562.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Z2=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],J2=ht("chevron-down",Z2);/**
* @license lucide-react v0.562.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const eb=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],tb=ht("chevron-right",eb);/**
* @license lucide-react v0.562.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const nb=[["ellipse",{cx:"12",cy:"5",rx:"9",ry:"3",key:"msslwz"}],["path",{d:"M3 5V19A9 3 0 0 0 21 19V5",key:"1wlel7"}],["path",{d:"M3 12A9 3 0 0 0 21 12",key:"mv7ke4"}]],rb=ht("database",nb);/**
* @license lucide-react v0.562.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const ob=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}],["path",{d:"M16 8h.01",key:"cr5u4v"}],["path",{d:"M8 8h.01",key:"1e4136"}],["path",{d:"M8 16h.01",key:"18s6g9"}],["path",{d:"M16 16h.01",key:"1f9h7w"}],["path",{d:"M12 12h.01",key:"1mp3jc"}]],sb=ht("dice-5",ob);/**
* @license lucide-react v0.562.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const ab=[["path",{d:"M21.54 15H17a2 2 0 0 0-2 2v4.54",key:"1djwo0"}],["path",{d:"M7 3.34V5a3 3 0 0 0 3 3a2 2 0 0 1 2 2c0 1.1.9 2 2 2a2 2 0 0 0 2-2c0-1.1.9-2 2-2h3.17",key:"1tzkfa"}],["path",{d:"M11 21.95V18a2 2 0 0 0-2-2a2 2 0 0 1-2-2v-1a2 2 0 0 0-2-2H2.05",key:"14pb5j"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],pp=ht("earth",ab);/**
* @license lucide-react v0.562.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const ib=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]],_x=ht("info",ib);/**
* @license lucide-react v0.562.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const lb=[["rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2",key:"1w4ew1"}],["path",{d:"M7 11V7a5 5 0 0 1 9.9-1",key:"1mm8w8"}]],cb=ht("lock-open",lb);/**
* @license lucide-react v0.562.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const ub=[["path",{d:"M3 5h1",key:"1mv5vm"}],["path",{d:"M3 12h1",key:"lp3yf2"}],["path",{d:"M3 19h1",key:"w6f3n9"}],["path",{d:"M8 5h1",key:"1nxr5w"}],["path",{d:"M8 12h1",key:"1con00"}],["path",{d:"M8 19h1",key:"k7p10e"}],["path",{d:"M13 5h8",key:"a7qcls"}],["path",{d:"M13 12h8",key:"h98zly"}],["path",{d:"M13 19h8",key:"c3s6r1"}]],db=ht("logs",ub);/**
* @license lucide-react v0.562.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const fb=[["path",{d:"M14.106 5.553a2 2 0 0 0 1.788 0l3.659-1.83A1 1 0 0 1 21 4.619v12.764a1 1 0 0 1-.553.894l-4.553 2.277a2 2 0 0 1-1.788 0l-4.212-2.106a2 2 0 0 0-1.788 0l-3.659 1.83A1 1 0 0 1 3 19.381V6.618a1 1 0 0 1 .553-.894l4.553-2.277a2 2 0 0 1 1.788 0z",key:"169xi5"}],["path",{d:"M15 5.764v15",key:"1pn4in"}],["path",{d:"M9 3.236v15",key:"1uimfh"}]],hb=ht("map",fb);/**
* @license lucide-react v0.562.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const pb=[["path",{d:"M4 5h16",key:"1tepv9"}],["path",{d:"M4 12h16",key:"1lakjw"}],["path",{d:"M4 19h16",key:"1djgab"}]],mb=ht("menu",pb);/**
* @license lucide-react v0.562.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const xb=[["path",{d:"M12 17v4",key:"1riwvh"}],["path",{d:"m14.305 7.53.923-.382",key:"1mlnsw"}],["path",{d:"m15.228 4.852-.923-.383",key:"82mpwg"}],["path",{d:"m16.852 3.228-.383-.924",key:"ln4sir"}],["path",{d:"m16.852 8.772-.383.923",key:"1dejw0"}],["path",{d:"m19.148 3.228.383-.924",key:"192kgf"}],["path",{d:"m19.53 9.696-.382-.924",key:"fiavlr"}],["path",{d:"m20.772 4.852.924-.383",key:"1j8mgp"}],["path",{d:"m20.772 7.148.924.383",key:"zix9be"}],["path",{d:"M22 13v2a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h7",key:"1tnzv8"}],["path",{d:"M8 21h8",key:"1ev6f3"}],["circle",{cx:"18",cy:"6",r:"3",key:"1h7g24"}]],vb=ht("monitor-cog",xb);/**
* @license lucide-react v0.562.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const yb=[["path",{d:"M20.985 12.486a9 9 0 1 1-9.473-9.472c.405-.022.617.46.402.803a6 6 0 0 0 8.268 8.268c.344-.215.825-.004.803.401",key:"kfwtm"}]],gb=ht("moon",yb);/**
* @license lucide-react v0.562.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const bb=[["path",{d:"M4.9 16.1C1 12.2 1 5.8 4.9 1.9",key:"s0qx1y"}],["path",{d:"M7.8 4.7a6.14 6.14 0 0 0-.8 7.5",key:"1idnkw"}],["circle",{cx:"12",cy:"9",r:"2",key:"1092wv"}],["path",{d:"M16.2 4.8c2 2 2.26 5.11.8 7.47",key:"ojru2q"}],["path",{d:"M19.1 1.9a9.96 9.96 0 0 1 0 14.1",key:"rhi7fg"}],["path",{d:"M9.5 18h5",key:"mfy3pd"}],["path",{d:"m8 22 4-11 4 11",key:"25yftu"}]],wb=ht("radio-tower",bb);/**
* @license lucide-react v0.562.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Cb=[["circle",{cx:"6",cy:"19",r:"3",key:"1kj8tv"}],["path",{d:"M9 19h8.5a3.5 3.5 0 0 0 0-7h-11a3.5 3.5 0 0 1 0-7H15",key:"1d8sl"}],["circle",{cx:"18",cy:"5",r:"3",key:"gq8acd"}]],kb=ht("route",Cb);/**
* @license lucide-react v0.562.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Eb=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],F0=ht("search",Eb);/**
* @license lucide-react v0.562.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const _b=[["circle",{cx:"18",cy:"5",r:"3",key:"gq8acd"}],["circle",{cx:"6",cy:"12",r:"3",key:"w7nqdw"}],["circle",{cx:"18",cy:"19",r:"3",key:"1xt0gg"}],["line",{x1:"8.59",x2:"15.42",y1:"13.51",y2:"17.49",key:"47mynk"}],["line",{x1:"15.41",x2:"8.59",y1:"6.51",y2:"10.49",key:"1n3mei"}]],Sb=ht("share-2",_b);/**
* @license lucide-react v0.562.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Ab=[["path",{d:"M12 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7",key:"1m0v6g"}],["path",{d:"M18.375 2.625a1 1 0 0 1 3 3l-9.013 9.014a2 2 0 0 1-.853.505l-2.873.84a.5.5 0 0 1-.62-.62l.84-2.873a2 2 0 0 1 .506-.852z",key:"ohrbg2"}]],Nb=ht("square-pen",Ab);/**
* @license lucide-react v0.562.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Bb=[["path",{d:"M11.525 2.295a.53.53 0 0 1 .95 0l2.31 4.679a2.123 2.123 0 0 0 1.595 1.16l5.166.756a.53.53 0 0 1 .294.904l-3.736 3.638a2.123 2.123 0 0 0-.611 1.878l.882 5.14a.53.53 0 0 1-.771.56l-4.618-2.428a2.122 2.122 0 0 0-1.973 0L6.396 21.01a.53.53 0 0 1-.77-.56l.881-5.139a2.122 2.122 0 0 0-.611-1.879L2.16 9.795a.53.53 0 0 1 .294-.906l5.165-.755a2.122 2.122 0 0 0 1.597-1.16z",key:"r04s7s"}]],hs=ht("star",Bb);/**
* @license lucide-react v0.562.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Db=[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"m4.93 4.93 1.41 1.41",key:"149t6j"}],["path",{d:"m17.66 17.66 1.41 1.41",key:"ptbguv"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"m6.34 17.66-1.41 1.41",key:"1m8zz5"}],["path",{d:"m19.07 4.93-1.41 1.41",key:"1shlcs"}]],Fb=ht("sun",Db);/**
* @license lucide-react v0.562.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Rb=[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]],Tb=ht("trash-2",Rb);/**
* @license lucide-react v0.562.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Pb=[["circle",{cx:"12",cy:"4.5",r:"2.5",key:"r5ysbb"}],["path",{d:"m10.2 6.3-3.9 3.9",key:"1nzqf6"}],["circle",{cx:"4.5",cy:"12",r:"2.5",key:"jydg6v"}],["path",{d:"M7 12h10",key:"b7w52i"}],["circle",{cx:"19.5",cy:"12",r:"2.5",key:"1piiel"}],["path",{d:"m13.8 17.7 3.9-3.9",key:"1wyg1y"}],["circle",{cx:"12",cy:"19.5",r:"2.5",key:"13o1pw"}]],jb=ht("waypoints",Pb);/**
* @license lucide-react v0.562.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Mb=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],Q0=ht("x",Mb);function rn(t){(t.key==="Enter"||t.key===" ")&&(t.preventDefault(),t.currentTarget.click())}const R0="remoteterm-theme-change",zb=[{id:"original",name:"Original",swatches:["#111419","#181b21","#27a05c","#282c33","#f59e0b","#3b82f6"],metaThemeColor:"#111419"},{id:"light",name:"Light",swatches:["#F8F7F4","#FFFFFF","#1B7D4E","#EDEBE7","#D97706","#3B82F6"],metaThemeColor:"#F8F7F4"},{id:"ios",name:"iPhone",swatches:["#F2F2F7","#FFFFFF","#007AFF","#E5E5EA","#FF9F0A","#34C759"],metaThemeColor:"#F2F2F7"},{id:"paper-grove",name:"Paper Grove",swatches:["#F7F1E4","#FFF9EE","#2F9E74","#E7DEC8","#E76F51","#5C7CFA"],metaThemeColor:"#F7F1E4"},{id:"cyberpunk",name:"Cyberpunk",swatches:["#07080A","#0D1112","#00FF41","#141E17","#FAFF00","#FF2E6C"],metaThemeColor:"#07080A"},{id:"obsidian-glass",name:"Obsidian Glass",swatches:["#0C0E12","#151821","#D4A070","#1E2230","#D4924A","#5B82B4"],metaThemeColor:"#0C0E12"},{id:"solar-flare",name:"Solar Flare",swatches:["#0D0607","#151012","#FF0066","#2D1D22","#FF8C1A","#30ACD4"],metaThemeColor:"#0D0607"},{id:"lagoon-pop",name:"Lagoon Pop",swatches:["#081A22","#0F2630","#23D7C6","#173844","#FF7A66","#7C83FF"],metaThemeColor:"#081A22"},{id:"candy-dusk",name:"Candy Dusk",swatches:["#140F24","#201736","#FF79C9","#2A2144","#FFC857","#8BE9FD"],metaThemeColor:"#140F24"},{id:"high-contrast",name:"High Contrast",swatches:["#000000","#141414","#3B9EFF","#1E1E1E","#FFB800","#FF4757"],metaThemeColor:"#000000"},{id:"monochrome",name:"Monochrome",swatches:["#FAFAFA","#FFFFFF","#111111","#EAEAEA","#8A8A8A","#4A4A4A"],metaThemeColor:"#FAFAFA"},{id:"windows-95",name:"Windows 95",swatches:["#008080","#C0C0C0","#000080","#DFDFDF","#FFDE59","#000000"],metaThemeColor:"#008080"}],Sx="remoteterm-theme";function T0(){try{return localStorage.getItem(Sx)??"original"}catch{return"original"}}function Ax(t){try{localStorage.setItem(Sx,t)}catch{}t==="original"?delete document.documentElement.dataset.theme:document.documentElement.dataset.theme=t;const r=zb.find(s=>s.id===t);if(r){const s=document.querySelector('meta[name="theme-color"]');s&&s.setAttribute("content",r.metaThemeColor)}typeof window<"u"&&window.dispatchEvent(new CustomEvent(R0,{detail:t}))}function Nx(t){var r,s,a="";if(typeof t=="string"||typeof t=="number")a+=t;else if(typeof t=="object")if(Array.isArray(t)){var i=t.length;for(r=0;r<i;r++)t[r]&&(s=Nx(t[r]))&&(a&&(a+=" "),a+=s)}else for(s in t)t[s]&&(a&&(a+=" "),a+=s);return a}function Bx(){for(var t,r,s=0,a="",i=arguments.length;s<i;s++)(t=arguments[s])&&(r=Nx(t))&&(a&&(a+=" "),a+=r);return a}const Ob=(t,r)=>{const s=new Array(t.length+r.length);for(let a=0;a<t.length;a++)s[a]=t[a];for(let a=0;a<r.length;a++)s[t.length+a]=r[a];return s},Hb=(t,r)=>({classGroupId:t,validator:r}),Dx=(t=new Map,r=null,s)=>({nextPart:t,validators:r,classGroupId:s}),Wl="-",mp=[],Lb="arbitrary..",Ib=t=>{const r=Vb(t),{conflictingClassGroups:s,conflictingClassGroupModifiers:a}=t;return{getClassGroupId:d=>{if(d.startsWith("[")&&d.endsWith("]"))return $b(d);const u=d.split(Wl),p=u[0]===""&&u.length>1?1:0;return Fx(u,p,r)},getConflictingClassGroupIds:(d,u)=>{if(u){const p=a[d],f=s[d];return p?f?Ob(f,p):p:f||mp}return s[d]||mp}}},Fx=(t,r,s)=>{if(t.length-r===0)return s.classGroupId;const i=t[r],l=s.nextPart.get(i);if(l){const f=Fx(t,r+1,l);if(f)return f}const d=s.validators;if(d===null)return;const u=r===0?t.join(Wl):t.slice(r).join(Wl),p=d.length;for(let f=0;f<p;f++){const v=d[f];if(v.validator(u))return v.classGroupId}},$b=t=>t.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const r=t.slice(1,-1),s=r.indexOf(":"),a=r.slice(0,s);return a?Lb+a:void 0})(),Vb=t=>{const{theme:r,classGroups:s}=t;return Ub(s,r)},Ub=(t,r)=>{const s=Dx();for(const a in t){const i=t[a];Z0(i,s,a,r)}return s},Z0=(t,r,s,a)=>{const i=t.length;for(let l=0;l<i;l++){const d=t[l];Wb(d,r,s,a)}},Wb=(t,r,s,a)=>{if(typeof t=="string"){qb(t,r,s);return}if(typeof t=="function"){Kb(t,r,s,a);return}Gb(t,r,s,a)},qb=(t,r,s)=>{const a=t===""?r:Rx(r,t);a.classGroupId=s},Kb=(t,r,s,a)=>{if(Yb(t)){Z0(t(a),r,s,a);return}r.validators===null&&(r.validators=[]),r.validators.push(Hb(s,t))},Gb=(t,r,s,a)=>{const i=Object.entries(t),l=i.length;for(let d=0;d<l;d++){const[u,p]=i[d];Z0(p,Rx(r,u),s,a)}},Rx=(t,r)=>{let s=t;const a=r.split(Wl),i=a.length;for(let l=0;l<i;l++){const d=a[l];let u=s.nextPart.get(d);u||(u=Dx(),s.nextPart.set(d,u)),s=u}return s},Yb=t=>"isThemeGetter"in t&&t.isThemeGetter===!0,Xb=t=>{if(t<1)return{get:()=>{},set:()=>{}};let r=0,s=Object.create(null),a=Object.create(null);const i=(l,d)=>{s[l]=d,r++,r>t&&(r=0,a=s,s=Object.create(null))};return{get(l){let d=s[l];if(d!==void 0)return d;if((d=a[l])!==void 0)return i(l,d),d},set(l,d){l in s?s[l]=d:i(l,d)}}},P0="!",xp=":",Qb=[],vp=(t,r,s,a,i)=>({modifiers:t,hasImportantModifier:r,baseClassName:s,maybePostfixModifierPosition:a,isExternal:i}),Zb=t=>{const{prefix:r,experimentalParseClassName:s}=t;let a=i=>{const l=[];let d=Line truncated
.`.concat(z4,` {
overflow: hidden `).concat(a,`;
padding-right: `).concat(u,"px ").concat(a,`;
}
body[`).concat(us,`] {
overflow: hidden `).concat(a,`;
overscroll-behavior: contain;
`).concat([r&&"position: relative ".concat(a,";"),s==="margin"&&`
padding-left: `.concat(i,`px;
padding-top: `).concat(l,`px;
padding-right: `).concat(d,`px;
margin-left:0;
margin-top:0;
margin-right: `).concat(u,"px ").concat(a,`;
`),s==="padding"&&"padding-right: ".concat(u,"px ").concat(a,";")].filter(Boolean).join(""),`
}
.`).concat(ol,` {
right: `).concat(u,"px ").concat(a,`;
}
.`).concat(sl,` {
margin-right: `).concat(u,"px ").concat(a,`;
}
.`).concat(ol," .").concat(ol,` {
right: 0 `).concat(a,`;
}
.`).concat(sl," .").concat(sl,` {
margin-right: 0 `).concat(a,`;
}
body[`).concat(us,`] {
`).concat(O4,": ").concat(u,`px;
}
`)},Tp=function(){var t=parseInt(document.body.getAttribute(us)||"0",10);return isFinite(t)?t:0},rC=function(){E.useEffect(function(){return document.body.setAttribute(us,(Tp()+1).toString()),function(){var t=Tp()-1;t<=0?document.body.removeAttribute(us):document.body.setAttribute(us,t.toString())}},[])},oC=function(t){var r=t.noRelative,s=t.noImportant,a=t.gapMode,i=a===void 0?"margin":a;rC();var l=E.useMemo(function(){return eC(i)},[i]);return E.createElement(tC,{styles:nC(l,!r,i,s?"":"!important")})},z0=!1;if(typeof window<"u")try{var el=Object.defineProperty({},"passive",{get:function(){return z0=!0,!0}});window.addEventListener("test",el,el),window.removeEventListener("test",el,el)}catch{z0=!1}var ss=z0?{passive:!1}:!1,sC=function(t){return t.tagName==="TEXTAREA"},s1=function(t,r){if(!(t instanceof Element))return!1;var s=window.getComputedStyle(t);return s[r]!=="hidden"&&!(s.overflowY===s.overflowX&&!sC(t)&&s[r]==="visible")},aC=function(t){return s1(t,"overflowY")},iC=function(t){return s1(t,"overflowX")},Pp=function(t,r){var s=r.ownerDocument,a=r;do{typeof ShadowRoot<"u"&&a instanceof ShadowRoot&&(a=a.host);var i=a1(t,a);if(i){var l=i1(t,a),d=l[1],u=l[2];if(d>u)return!0}a=a.parentNode}while(a&&a!==s.body);return!1},lC=function(t){var r=t.scrollTop,s=t.scrollHeight,a=t.clientHeight;return[r,s,a]},cC=function(t){var r=t.scrollLeft,s=t.scrollWidth,a=t.clientWidth;return[r,s,a]},a1=function(t,r){return t==="v"?aC(r):iC(r)},i1=function(t,r){return t==="v"?lC(r):cC(r)},uC=function(t,r){return t==="h"&&r==="rtl"?-1:1},dC=function(t,r,s,a,i){var l=uC(t,window.getComputedStyle(r).direction),d=l*a,u=s.target,p=r.contains(u),f=!1,v=d>0,m=0,y=0;do{if(!u)break;var w=i1(t,u),C=w[0],_=w[1],b=w[2],N=_-b-l*C;(C||N)&&a1(t,u)&&(m+=N,y+=C);var A=u.parentNode;u=A&&A.nodeType===Node.DOCUMENT_FRAGMENT_NODE?A.host:A}while(!p&&u!==document.body||p&&(r.contains(u)||r===u));return(v&&Math.abs(m)<1||!v&&Math.abs(y)<1)&&(f=!0),f},tl=function(t){return"changedTouches"in t?[t.changedTouches[0].clientX,t.changedTouches[0].clientY]:[0,0]},jp=function(t){return[t.deltaX,t.deltaY]},Mp=function(t){return t&&"current"in t?t.current:t},fC=function(t,r){return t[0]===r[0]&&t[1]===r[1]},hC=function(t){return`
.block-interactivity-`.concat(t,` {pointer-events: none;}
.allow-interactivity-`).concat(t,` {pointer-events: all;}
`)},pC=0,as=[];function mC(t){var r=E.useRef([]),s=E.useRef([0,0]),a=E.useRef(),i=E.useState(pC++)[0],l=E.useState(o1)[0],d=E.useRef(t);E.useEffect(function(){d.current=t},[t]),E.useEffect(function(){if(t.inert){document.body.classList.add("block-interactivity-".concat(i));var _=M4([t.lockRef.current],(t.shards||[]).map(Mp),!0).filter(Boolean);return _.forEach(function(b){return b.classList.add("allow-interactivity-".concat(i))}),function(){document.body.classList.remove("block-interactivity-".concat(i)),_.forEach(function(b){return b.classList.remove("allow-interactivity-".concat(i))})}}},[t.inert,t.lockRef.current,t.shards]);var u=E.useCallback(function(_,b){if("touches"in _&&_.touches.length===2||_.type==="wheel"&&_.ctrlKey)return!d.current.allowPinchZoom;var N=tl(_),A=s.current,k="deltaX"in _?_.deltaX:A[0]-N[0],B="deltaY"in _?_.deltaY:A[1]-N[1],S,R=_.target,T=Math.abs(k)>Math.abs(B)?"h":"v";if("touches"in _&&T==="h"&&R.type==="range")return!1;var D=window.getSelection(),L=D&&D.anchorNode,M=L?L===R||L.contains(R):!1;if(M)return!1;var I=Pp(T,R);if(!I)return!0;if(I?S=T:(S=T==="v"?"h":"v",I=Pp(T,R)),!I)return!1;if(!a.current&&"changedTouches"in _&&(k||B)&&(a.current=S),!S)return!0;var V=a.current||S;return dC(V,b,_,V==="h"?k:B)},[]),p=E.useCallback(function(_){var b=_;if(!(!as.length||as[as.length-1]!==l)){var N="deltaY"in b?jp(b):tl(b),A=r.current.filter(function(S){return S.name===b.type&&(S.target===b.target||b.target===S.shadowParent)&&fC(S.delta,N)})[0];if(A&&A.should){b.cancelable&&b.preventDefault();return}if(!A){var k=(d.current.shards||[]).map(Mp).filter(Boolean).filter(function(S){return S.contains(b.target)}),B=k.length>0?u(b,k[0]):!d.current.noIsolation;B&&b.cancelable&&b.preventDefault()}}},[]),f=E.useCallback(function(_,b,N,A){var k={name:_,delta:b,target:N,should:A,shadowParent:xC(N)};r.current.push(k),setTimeout(function(){r.current=r.current.filter(function(B){return B!==k})},1)},[]),v=E.useCallback(function(_){s.current=tl(_),a.current=void 0},[]),m=E.useCallback(function(_){f(_.type,jp(_),_.target,u(_,t.lockRef.current))},[]),y=E.useCallback(function(_){f(_.type,tl(_),_.target,u(_,t.lockRef.current))},[]);E.useEffect(function(){return as.push(l),t.setCallbacks({onScrollCapture:m,onWheelCapture:m,onTouchMoveCapture:y}),document.addEventListener("wheel",p,ss),document.addEventListener("touchmove",p,ss),document.addEventListener("touchstart",v,ss),function(){as=as.filter(function(_){return _!==l}),document.removeEventListener("wheel",p,ss),document.removeEventListener("touchmove",p,ss),document.removeEventListener("touchstart",v,ss)}},[]);var w=t.removeScrollBar,C=t.inert;return E.createElement(E.Fragment,null,C?E.createElement(l,{styles:hC(i)}):null,w?E.createElement(oC,{noRelative:t.noRelative,gapMode:t.gapMode}):null)}function xC(t){for(var r=null;t!==null;)t instanceof ShadowRoot&&(r=t.host,t=t.host),t=t.parentNode;return r}const vC=W4(r1,mC);var l1=E.forwardRef(function(t,r){return E.createElement(Jl,nr({},t,{ref:r,sideCar:vC}))});l1.classNames=Jl.classNames;var yC=function(t){if(typeof document>"u")return null;var r=Array.isArray(t)?t[0]:t;return r.ownerDocument.body},is=new WeakMap,nl=new WeakMap,rl={},m0=0,c1=function(t){return t&&(t.host||c1(t.parentNode))},gC=function(t,r){return r.map(function(s){if(t.contains(s))return s;var a=c1(s);return a&&t.contains(a)?a:(console.error("aria-hidden",s,"in not contained inside",t,". Doing nothing"),null)}).filter(function(s){return!!s})},bC=function(t,r,s,a){var i=gC(r,Array.isArray(t)?t:[t]);rl[s]||(rl[s]=new WeakMap);var l=rl[s],d=[],u=new Set,p=new Set(i),f=function(m){!m||u.has(m)||(u.add(m),f(m.parentNode))};i.forEach(f);var v=function(m){!m||p.has(m)||Array.prototype.forEach.call(m.children,function(y){if(u.has(y))v(y);else try{var w=y.getAttribute(a),C=w!==null&&w!=="false",_=(is.get(y)||0)+1,b=(l.get(y)||0)+1;is.set(y,_),l.set(y,b),d.push(y),_===1&&C&&nl.set(y,!0),b===1&&y.setAttribute(s,"true"),C||y.setAttribute(a,"true")}catch(N){console.error("aria-hidden: cannot operate on ",y,N)}})};return v(r),u.clear(),m0++,function(){d.forEach(function(m){var y=is.get(m)-1,w=l.get(m)-1;is.set(m,y),l.set(m,w),y||(nl.has(m)||m.removeAttribute(a),nl.delete(m)),w||m.removeAttribute(s)}),m0--,m0||(is=new WeakMap,is=new WeakMap,nl=new WeakMap,rl={})}},wC=function(t,r,s){s===void 0&&(s="data-aria-hidden");var a=Array.from(Array.isArray(t)?t:[t]),i=yC(t);return i?(a.push.apply(a,Array.from(i.querySelectorAll("[aria-live], script"))),bC(a,i,s,"aria-hidden")):function(){return null}};function CC(t){const r=kC(t),s=E.forwardRef((a,i)=>{const{children:l,...d}=a,u=E.Children.toArray(l),p=u.find(_C);if(p){const f=p.props.children,v=u.map(m=>m===p?E.Children.count(f)>1?E.Children.only(null):E.isValidElement(f)?f.props.children:null:m);return h.jsx(r,{...d,ref:i,children:E.isValidElement(f)?E.cloneElement(f,void 0,v):null})}return h.jsx(r,{...d,ref:i,children:l})});return s.displayName=`${t}.Slot`,s}function kC(t){const r=E.forwardRef((s,a)=>{const{children:i Line truncated
If you want to hide the \`${r.titleName}\`, you can wrap it with our VisuallyHidden component.
For more information, see https://radix-ui.com/primitives/docs/components/${r.docsSlug}`;return E.useEffect(()=>{t&&(document.getElementById(t)||console.error(s))},[s,t]),null},MC="DialogDescriptionWarning",zC=({contentRef:t,descriptionId:r})=>{const a=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${E1(MC).contentName}}.`;return E.useEffect(()=>{var l;const i=(l=t.current)==null?void 0:l.getAttribute("aria-describedby");r&&i&&(document.getElementById(r)||console.warn(a))},[a,t,r]),null},_1=d1,S1=p1,tc=m1,nc=x1,rc=y1,oc=b1,A1=C1;const Ma=_1,OC=S1,N1=E.forwardRef(({className:t,...r},s)=>h.jsx(tc,{ref:s,className:We("fixed inset-0 z-50 bg-overlay/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",t),...r}));N1.displayName=tc.displayName;const gs=E.forwardRef(({className:t,children:r,...s},a)=>h.jsxs(OC,{children:[h.jsx(N1,{}),h.jsxs(nc,{ref:a,className:We("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",t),...s,children:[r,h.jsxs(A1,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground",children:[h.jsx(Q0,{className:"h-4 w-4"}),h.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));gs.displayName=nc.displayName;const bs=({className:t,...r})=>h.jsx("div",{className:We("flex flex-col space-y-1.5 text-center sm:text-left",t),...r});bs.displayName="DialogHeader";const za=({className:t,...r})=>h.jsx("div",{className:We("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",t),...r});za.displayName="DialogFooter";const ws=E.forwardRef(({className:t,...r},s)=>h.jsx(rc,{ref:s,className:We("text-lg font-semibold leading-none tracking-tight",t),...r}));ws.displayName=rc.displayName;const Cs=E.forwardRef(({className:t,...r},s)=>h.jsx(oc,{ref:s,className:We("text-sm text-muted-foreground",t),...r}));Cs.displayName=oc.displayName;function HC(t){return t===0?"1-byte hops":t===1?"2-byte hops":t===2?"3-byte hops":"Unknown hop width"}function zp(t,r,s,a){if(t.path_len<=0||!t.path)return`${r} -> ${s}`;const i=Gr(t.path,t.path_len).map(l=>{const d=Gx(l,a,!0);return d.length===1?d[0].name||`${d[0].public_key.slice(0,l.length)}…`:d.length>1?`${l}…?`:`${l}…`});return[r,...i,s].join(" -> ")}function Op({label:t,route:r,chain:s}){const a=Gr(r.path,r.path_len).join(" -> ")||"direct";return h.jsxs("div",{className:"rounded-md border border-border bg-muted/20 p-3",children:[h.jsxs("div",{className:"flex items-center justify-between gap-3",children:[h.jsx("h4",{className:"text-sm font-semibold",children:t}),h.jsx("span",{className:"text-[11px] text-muted-foreground",children:In(r.path_len,!0)})]}),h.jsx("p",{className:"mt-2 text-sm",children:s}),h.jsxs("div",{className:"mt-2 flex flex-wrap gap-x-3 gap-y-1 text-[11px] text-muted-foreground",children:[h.jsxs("span",{children:["Raw: ",a]}),h.jsx("span",{children:HC(r.path_hash_mode)})]})]})}function LC({open:t,onClose:r,contact:s,contacts:a,radioName:i,onDiscover:l}){const[d,u]=E.useState(!1),[p,f]=E.useState(null),[v,m]=E.useState(null),y=E.useMemo(()=>td(s),[s]),w=Pa(s),C=E.useMemo(()=>{if(s.last_path_len===-1)return"Flood";const k=Gr(s.last_path,s.last_path_len);return k.length>0?`${In(s.last_path_len,!0)} (${k.join(" -> ")})`:In(s.last_path_len,!0)},[s.last_path,s.last_path_len]),_=E.useMemo(()=>{if(!w)return null;if(y.pathLen===-1)return"Flood";const k=Gr(y.path,y.pathLen);return k.length>0?`${In(y.pathLen,!0)} (${k.join(" -> ")})`:In(y.pathLen,!0)},[y,w]),b=v?zp(v.forward_path,i||"Local radio",s.name||s.public_key.slice(0,12),a):null,N=v?zp(v.return_path,s.name||s.public_key.slice(0,12),i||"Local radio",a):null,A=async()=>{u(!0),f(null);try{const k=await l(s.public_key);m(k)}catch(k){f(k instanceof Error?k.message:"Unknown error")}finally{u(!1)}};return h.jsx(Ma,{open:t,onOpenChange:k=>!k&&r(),children:h.jsxs(gs,{className:"sm:max-w-[560px]",children:[h.jsxs(bs,{children:[h.jsx(ws,{children:"Path Discovery"}),h.jsx(Cs,{children:"Send a routed probe to this contact and wait for the round-trip path response. The learned forward route will be saved back onto the contact if a response comes back."})]}),h.jsxs("div",{className:"space-y-4",children:[h.jsxs("div",{className:"rounded-md border border-border bg-muted/20 p-3 text-sm",children:[h.jsx("div",{className:"font-medium",children:s.name Line truncated
`).map(($e,rt,ut)=>h.jsxs("span",{children:[ck($e,v),rt<ut.length-1&&h.jsx("br",{})]},rt)),!ge&&h.jsxs(h.Fragment,{children:[h.jsx("span",{className:"text-[10px] text-muted-foreground ml-2",children:Fn(Q.sender_timestamp||Q.received_at)}),!Q.outgoing&&Q.paths&&Q.paths.length>0&&h.jsx(qp,{paths:Q.paths,variant:"inline",onClick:()=>L({paths:Q.paths,senderInfo:pt(Q,Pe,Ve)})})]}),Q.outgoing&&(Q.acked>0?Q.paths&&Q.paths.length>0?h.jsx("span",{className:"text-muted-foreground cursor-pointer hover:text-primary",role:"button",tabIndex:0,onKeyDown:rn,onClick:$e=>{$e.stopPropagation(),L({paths:Q.paths,senderInfo:Et,messageId:Q.id,isOutgoingChan:Q.type==="CHAN"&&!!f})},title:"View echo paths","aria-label":`Acknowledged, ${Q.acked} echo${Q.acked!==1?"s":""} — view paths`,children:` ✓${Q.acked>1?Q.acked:""}`}):h.jsx("span",{className:"text-muted-foreground",children:` ✓${Q.acked>1?Q.acked:""}`}):f&&Q.type==="CHAN"?h.jsxs("span",{className:"text-muted-foreground cursor-pointer hover:text-primary",role:"button",tabIndex:0,onKeyDown:rn,onClick:$e=>{$e.stopPropagation(),L({paths:[],senderInfo:Et,messageId:Q.id,isOutgoingChan:!0})},title:"Message status","aria-label":"No echoes yet — view message status",children:[" ","?"]}):h.jsxs("span",{className:"text-muted-foreground",title:"No repeats heard yet",children:[" ","?"]}))]})]})]})]},Q.id)}),b&&h.jsx("div",{className:"text-center py-2 text-muted-foreground text-sm",role:"status",children:"Loading newer messages..."}),!b&&_&&h.jsx("div",{className:"text-center py-2 text-muted-foreground text-xs",children:"Scroll down for newer messages"})]}),ie&&h.jsx("div",{className:"pointer-events-none absolute bottom-4 left-1/2 -translate-x-1/2",children:h.jsxs("div",{className:"pointer-events-auto flex h-9 items-center overflow-hidden rounded-full border border-border bg-card shadow-lg transition-all hover:scale-105",children:[h.jsx("button",{type:"button",onClick:()=>{var Q,ye;(ye=(Q=K.current)==null?void 0:Q.scrollIntoView)==null||ye.call(Q,{block:"center"}),oe(!0),re(!1)},className:"h-full px-3 text-sm font-medium hover:bg-accent focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",children:"Jump to unread"}),h.jsx("button",{type:"button",onClick:()=>{oe(!0),re(!1)},className:"flex h-full w-9 items-center justify-center border-l border-border text-muted-foreground hover:bg-accent hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring","aria-label":"Dismiss jump to unread",title:"Dismiss jump to unread",children:"×"})]})}),R&&h.jsx("button",{onClick:Ue,className:"absolute bottom-4 right-4 w-9 h-9 rounded-full bg-card hover:bg-accent border border-border flex items-center justify-center shadow-lg transition-all hover:scale-105 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",title:"Scroll to bottom","aria-label":"Scroll to bottom",children:h.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"text-muted-foreground",children:h.jsx("polyline",{points:"6 9 12 15 18 9"})})}),D&&h.jsx(sk,{open:!0,onClose:()=>L(null),paths:D.paths,senderInfo:D.senderInfo,contacts:r,config:m??null,messageId:D.messageId,isOutgoingChan:D.isOutgoingChan,isResendable:_t,onResend:f})]})}var mr={},da={},Kt={},Kp;function En(){if(Kp)return Kt;Kp=1,Object.defineProperty(Kt,"__esModule",{value:!0}),Kt.RequestType=Kt.AdvertFlags=Kt.DeviceRole=Kt.PayloadVersion=Kt.ControlSubType=Kt.PayloadType=Kt.RouteType=void 0;var t;(function(u){u[u.TransportFlood=0]="TransportFlood",u[u.Flood=1]="Flood",u[u.Direct=2]="Direct",u[u.TransportDirect=3]="TransportDirect"})(t||(Kt.RouteType=t={}));var r;(function(u){u[u.Request=0]="Request",u[u.Response=1]="Response",u[u.TextMessage=2]="TextMessage",u[u.Ack=3]="Ack",u[u.Advert=4]="Advert",u[u.GroupText=5]="GroupText",u[u.GroupData=6]="GroupData",u[u.AnonRequest=7]="AnonRequest",u[u.Path=8]="Path",u[u.Trace=9]="Trace",u[u.Multipart=10]="Multipart",u[u.Control=11]="Control",u[u.RawCustom=15]="RawCustom"})(r||(Kt.PayloadType=r={}));var s;(function(u){u[u.NodeDiscoverReq=128]="NodeDiscoverReq",u[u.NodeDiscoverResp=144]="NodeDiscoverResp"})(s||(Kt.ControlSubType=s={}));var a;(function(u){u[u.Version1=0]="Version1",u[u.Version2=1]="Version2",u[u.Version3=2]="Version3",u[u.Version4=3]="Version4"})(a||(Kt.PayloadVersion=a={}));var i;(function(u){u[u.Unknown=0]="Unknown",u[u.ChatNode=1]="ChatNode",u[u.Repeater=2]="Repeater",u[u.RoomServer=3]="RoomServer",u[u.Sensor=4]="Sensor"})(i||(Kt.DeviceRole=i={}));var l;(function(u){u[u.HasLocation=16]="HasLocation",u[u.HasFeature1=32]="HasFeature1",u[u.HasFeature2=64]="HasFeature2",u[u.HasName=128]="HasName"})(l||(Kt.AdvertFlags=l={}));var d;return(function(u){u[u.GetStats=1]="GetStats",u[u.Keepalive=2]="Keepalive",u[u.GetTelemetryData=3]="GetTelemetryData",u[u.GetMinMaxAvgData=4]="GetMinMaxAvgData",u[u.GetAccessList=5]="GetAc Line truncated
(c) 2012 by Cédric Mesnil. All rights reserved.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
- Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
- Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/return(function(a){var i=s,l=i.lib,d=l.WordArray,u=l.Hasher,p=i.algo,f=d.create([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13]),v=d.create([5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11]),m=d.create([11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6]),y=d.create([8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11]),w=d.create([0,1518500249,1859775393,2400959708,2840853838]),C=d.create([1352829926,1548603684,1836072691,2053994217,0]),_=p.RIPEMD160=u.extend({_doReset:function(){this._hash=d.create([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(R,T){for(var D=0;D<16;D++){var L=T+D,M=R[L];R[L]=(M<<8|M>>>24)&16711935|(M<<24|M>>>8)&4278255360}var I=this._hash.words,V=w.words,q=C.words,G=f.words,ie=v.words,re=m.words,ce=y.words,oe,se,K,P,z,W,j,Y,te,fe;W=oe=I[0],j=se=I[1],Y=K=I[2],te=P=I[3],fe=z=I[4];for(var Z,D=0;D<80;D+=1)Z=oe+R[T+G[D]]|0,D<16?Z+=b(se,K,P)+V[0]:D<32?Z+=N(se,K,P)+V[1]:D<48?Z+=A(se,K,P)+V[2]:D<64?Z+=k(se,K,P)+V[3]:Z+=B(se,K,P)+V[4],Z=Z|0,Z=S(Z,re[D]),Z=Z+z|0,oe=z,z=P,P=S(K,10),K=se,se=Z,Z=W+R[T+ie[D]]|0,D<16?Z+=B(j,Y,te)+q[0]:D<32?Z+=k(j,Y,te)+q[1]:D<48?Z+=A(j,Y,te)+q[2]:D<64?Z+=N(j,Y,te)+q[3]:Z+=b(j,Y,te)+q[4],Z=Z|0,Z=S(Z,ce[D]),Z=Z+fe|0,W=fe,fe=te,te=S(Y,10),Y=j,j=Z;Z=I[1]+K+te|0,I[1]=I[2]+P+fe|0,I[2]=I[3]+z+W|0,I[3]=I[4]+oe+j|0,I[4]=I[0]+se+Y|0,I[0]=Z},_doFinalize:function(){var R=this._data,T=R.words,D=this._nDataBytes*8,L=R.sigBytes*8;T[L>>>5]|=128<<24-L%32,T[(L+64>>>9<<4)+14]=(D<<8|D>>>24)&16711935|(D<<24|D>>>8)&4278255360,R.sigBytes=(T.length+1)*4,this._process();for(var M=this._hash,I=M.words,V=0;V<5;V++){var q=I[V];I[V]=(q<<8|q>>>24)&16711935|(q<<24|q>>>8)&4278255360}return M},clone:function(){var R=u.clone.call(this);return R._hash=this._hash.clone(),R}});function b(R,T,D){return R^T^D}function N(R,T,D){return R&T|~R&D}function A(R,T,D){return(R|~T)^D}function k(R,T,D){return R&D|T&~D}function B(R,T,D){return R^(T|~D)}function S(R,T){return R<<T|R>>>32-T}i.RIPEMD160=u._createHelper(_),i.HmacRIPEMD160=u._createHmacHelper(_)})(),s.RIPEMD160})})(bl)),bl.exports}var wl={exports:{}},Mk=wl.exports,um;function ad(){return um||(um=1,(function(t,r){(function(s,a){t.exports=a(Ze())})(Mk,function(s){(function(){var a=s,i=a.lib,l=i.Base,d=a.enc,u=d.Utf8,p=a.algo;p.HMAC=l.extend({init:function(f,v){f=this._hasher=new f.init,typeof v=="string"&&(v=u.parse(v));var m=f.blockSize,y=m*4;v.sigBytes>y&&(v=f.finalize(v)),v.clamp();for(var w=this._oKey=v.clone(),C=this._iKey=v.clone(),_=w.words,b=C.words,N=0;N<m;N++)_[N]^=1549556828,b[N]^=909522486;w.sigBytes=C.sigBytes=y,this.reset()},reset:function(){var f=this._hasher;f.reset(),f.update(this._iKey)},update:function(f){return this._hasher.update(f),this},finalize:function(f){var v=this._hasher,m=v.finalize(f);v.reset();var y=v.finalize(this._oKey.clone().concat(m));return y}})})()})})(wl)),wl.exports}var Cl={exports:{}},zk=Cl.exports,dm;function Ok(){return dm||(dm=1,(function(t,r){(function(s,a,i){t.exports=a(Ze(),sd(),ad())})(zk,function(s){return(function(){var a=s,i=a.lib,l=i.Base,d=i.WordArray,u=a.algo,p=u.SHA256,f=u.HMAC,v=u.PBKDF2=l.extend({cfg:l.extend({keySize:128/32,hasher:p,iterations:25e4}),init:function(m){this.cfg=this.cfg.extend(m)},compute:function(m,y){for(var w=this.cfg,C=f.create(w.hasher,m),_=d.create(),b=d.create([1]),N=_.words,A=b.words,k=w.keySize,B=w.iterations;N.length<k;){var S=C.update(y).finalize(b);C.reset();for(var R=S.words,T=R.length,D=S,L=1;L<B;L++){D=C.finalize(D),C.reset();for(var M=D.words,I=0;I<T;I++)R[I]^=M[I]}_.concat(S),A[0]++}return _.sigBytes=k*4,_}});a.PBKDF2=function(m,y,w){return v.create(w).compute(m,y)}})(),s.PBKDF2})})(Cl)),Cl.exports}var kl={exports:{}},Hk=kl.exports,fm;function Xr(){return fm||(fm=1,(function(t,r){(function(s,a,i){t.exports=a(Ze(),F1(),ad())})(Hk,function(s){return(function(){var a=s,i=a.lib,l=i.Base,d=i.WordArray,u=a.algo,p=u.MD5,f=u.EvpKDF=l.extend({cfg:l.extend({keySize:128/32,hasher:p,iterations:1}),init:function(v){this.cfg=this.cfg.extend(v)},compute:function(v,m){for(var y,w=this.cfg,C=w.hasher.create(),_=d.create(),b=_.words,N=w.keySize,A=w.iterations;b.length<N;){y&&C.update(y),y=C.update(v).finalize(m),C.reset();for(var k=1;k<A;k++)y=C.finalize(y),C.reset();_.concat(y)}return _.sigBytes=N*4,_}});a.EvpKDF=function(v,m,y){return f.create(y).compute(v,m)}})(),s.EvpKDF})})(kl)),kl.exports}var El={exports:{}},Lk=El.exports,hm;function Ut(){return hm||(hm=1,(function(t,rLine truncated
* Counter block mode compatible with Dr Brian Gladman fileenc.c
* derived from CryptoJS.mode.CTR
* Jan Hruby jhruby.web@gmail.com
*/return s.mode.CTRGladman=(function(){var a=s.lib.BlockCipherMode.extend();function i(u){if((u>>24&255)===255){var p=u>>16&255,f=u>>8&255,v=u&255;p===255?(p=0,f===255?(f=0,v===255?v=0:++v):++f):++p,u=0,u+=p<<16,u+=f<<8,u+=v}else u+=1<<24;return u}function l(u){return(u[0]=i(u[0]))===0&&(u[1]=i(u[1])),u}var d=a.Encryptor=a.extend({processBlock:function(u,p){var f=this._cipher,v=f.blockSize,m=this._iv,y=this._counter;m&&(y=this._counter=m.slice(0),this._iv=void 0),l(y);var w=y.slice(0);f.encryptBlock(w,0);for(var C=0;C<v;C++)u[p+C]^=w[C]}});return a.Decryptor=d,a})(),s.mode.CTRGladman})})(Al)),Al.exports}var Nl={exports:{}},Kk=Nl.exports,vm;function Gk(){return vm||(vm=1,(function(t,r){(function(s,a,i){t.exports=a(Ze(),Ut())})(Kk,function(s){return s.mode.OFB=(function(){var a=s.lib.BlockCipherMode.extend(),i=a.Encryptor=a.extend({processBlock:function(l,d){var u=this._cipher,p=u.blockSize,f=this._iv,v=this._keystream;f&&(v=this._keystream=f.slice(0),this._iv=void 0),u.encryptBlock(v,0);for(var m=0;m<p;m++)l[d+m]^=v[m]}});return a.Decryptor=i,a})(),s.mode.OFB})})(Nl)),Nl.exports}var Bl={exports:{}},Yk=Bl.exports,ym;function Xk(){return ym||(ym=1,(function(t,r){(function(s,a,i){t.exports=a(Ze(),Ut())})(Yk,function(s){return s.mode.ECB=(function(){var a=s.lib.BlockCipherMode.extend();return a.Encryptor=a.extend({processBlock:function(i,l){this._cipher.encryptBlock(i,l)}}),a.Decryptor=a.extend({processBlock:function(i,l){this._cipher.decryptBlock(i,l)}}),a})(),s.mode.ECB})})(Bl)),Bl.exports}var Dl={exports:{}},Qk=Dl.exports,gm;function Zk(){return gm||(gm=1,(function(t,r){(function(s,a,i){t.exports=a(Ze(),Ut())})(Qk,function(s){return s.pad.AnsiX923={pad:function(a,i){var l=a.sigBytes,d=i*4,u=d-l%d,p=l+u-1;a.clamp(),a.words[p>>>2]|=u<<24-p%4*8,a.sigBytes+=u},unpad:function(a){var i=a.words[a.sigBytes-1>>>2]&255;a.sigBytes-=i}},s.pad.Ansix923})})(Dl)),Dl.exports}var Fl={exports:{}},Jk=Fl.exports,bm;function e8(){return bm||(bm=1,(function(t,r){(function(s,a,i){t.exports=a(Ze(),Ut())})(Jk,function(s){return s.pad.Iso10126={pad:function(a,i){var l=i*4,d=l-a.sigBytes%l;a.concat(s.lib.WordArray.random(d-1)).concat(s.lib.WordArray.create([d<<24],1))},unpad:function(a){var i=a.words[a.sigBytes-1>>>2]&255;a.sigBytes-=i}},s.pad.Iso10126})})(Fl)),Fl.exports}var Rl={exports:{}},t8=Rl.exports,wm;function n8(){return wm||(wm=1,(function(t,r){(function(s,a,i){t.exports=a(Ze(),Ut())})(t8,function(s){return s.pad.Iso97971={pad:function(a,i){a.concat(s.lib.WordArray.create([2147483648],1)),s.pad.ZeroPadding.pad(a,i)},unpad:function(a){s.pad.ZeroPadding.unpad(a),a.sigBytes--}},s.pad.Iso97971})})(Rl)),Rl.exports}var Tl={exports:{}},r8=Tl.exports,Cm;function o8(){return Cm||(Cm=1,(function(t,r){(function(s,a,i){t.exports=a(Ze(),Ut())})(r8,function(s){return s.pad.ZeroPadding={pad:function(a,i){var l=i*4;a.clamp(),a.sigBytes+=l-(a.sigBytes%l||l)},unpad:function(a){for(var i=a.words,l=a.sigBytes-1,l=a.sigBytes-1;l>=0;l--)if(i[l>>>2]>>>24-l%4*8&255){a.sigBytes=l+1;break}}},s.pad.ZeroPadding})})(Tl)),Tl.exports}var Pl={exports:{}},s8=Pl.exports,km;function a8(){return km||(km=1,(function(t,r){(function(s,a,i){t.exports=a(Ze(),Ut())})(s8,function(s){return s.pad.NoPadding={pad:function(){},unpad:function(){}},s.pad.NoPadding})})(Pl)),Pl.exports}var jl={exports:{}},i8=jl.exports,Em;function l8(){return Em||(Em=1,(function(t,r){(function(s,a,i){t.exports=a(Ze(),Ut())})(i8,function(s){return(function(a){var i=s,l=i.lib,d=l.CipherParams,u=i.enc,p=u.Hex,f=i.format;f.Hex={stringify:function(v){return v.ciphertext.toString(p)},parse:function(v){var m=p.parse(v);return d.create({ciphertext:m})}}})(),s.format.Hex})})(jl)),jl.exports}var Ml={exports:{}},c8=Ml.exports,_m;function u8(){return _m||(_m=1,(function(t,r){(function(s,a,i){t.exports=a(Ze(),_o(),So(),Xr(),Ut())})(c8,function(s){return(function(){var a=s,i=a.lib,l=i.BlockCipher,d=a.algo,u=[],p=[],f=[],v=[],m=[],y=[],w=[],C=[],_=[],b=[];(function(){for(var k=[],B=0;B<256;B++)B<128?k[B]=B<<1:k[B]=B<<1^283;for(var S=0,R=0,B=0;B<256;B++){var T=R^R<<1^R<<2^R<<3^R<<4;T=T>>>8^T&255^99,u[S]=T,p[T]=S;var D=k[S],L=k[D],M=k[L],I=k[T]*257^T*16843008;f[S]=I<<24|I>>>8,v[S]=I<<16|I>>>16,m[S]=I<<8|I>>>24,y[S]=I;var I=M*16843009^L*65537^D*257^S*16843008;w[T]=I<<24|I>>>8,C[T]=I<<16|I>>>16,_[T]=I<<8|I>>>24,b[T]=I,S?(S=D^k[k[k[M^D]]],R^=k[k[R]]):S=R=1}})();var N=[0,1,2,4,8,16,32,64,128,27,54],A=d.AES=l.extend({_doReset:function(){var k;if(!(this._nRounds&&this._keyPriorReset===this._key)){for(var B=this._keyPriorReset=this._key,S=B.words,R=B.sigBytes/4,T=this._nRounds=R+6,D=(T+1)*4,L=this._keySchedule=[],M=0;M<D;M++)M<R?L[M]=S[M]:(k=L[M-1],M%R?R>6&&M%R==4&&(k=u[k>>>24]<<24|u[k>>>16&255]<<16|u[k>>>8&255]<<8|u[k&255]):(k=k<<8|k>>>24,k=u[k>>>24]<<24|u[k>>>16&255]<<16|u[k>>>8&255]<<8|u[k&255],k^=N[M/R|0]<<24),L[M]=L[M-R]^k);for(var I=this._invKeySchedule=[],V=0;V<D;V++){var M=D-V;if(V%4)var k=L[M];else var k=L[M-4];V<4||M<=4?I[V]=k:I[V]=w[u[k>>>24]]^C[u[k>>>16&255]]^_[u[k>>>8&255]]^b[u[k&255]]}}},encryptBlock:Line truncated
• Timestamp (4 bytes) - send time as unix timestamp
• Request Type (1 byte) - type of request (GetStats, GetTelemetryData, etc.)
• Request Data (remaining bytes) - additional request-specific data`,startByte:u+p,endByte:u+i.length-1,value:y});const w={type:t.PayloadType.Request,version:t.PayloadVersion.Version1,isValid:!0,timestamp:0,requestType:t.RequestType.GetStats,requestData:"",destinationHash:f,sourceHash:v,cipherMac:m,ciphertext:y};return l!=null&&l.includeSegments&&(w.segments=d),w}catch(d){return{type:t.PayloadType.Request,version:t.PayloadVersion.Version1,isValid:!1,errors:[d instanceof Error?d.message:"Failed to decode request payload"],timestamp:0,requestType:t.RequestType.GetStats,requestData:"",destinationHash:"",sourceHash:"",cipherMac:"",ciphertext:""}}}}return va.RequestPayloadDecoder=s,va}var ya={},Gm;function q8(){if(Gm)return ya;Gm=1,Object.defineProperty(ya,"__esModule",{value:!0}),ya.ResponsePayloadDecoder=void 0;const t=En(),r=Gt();class s{static decode(i,l){try{if(i.length<4){const C={type:t.PayloadType.Response,version:t.PayloadVersion.Version1,isValid:!1,errors:["Response payload too short (minimum 4 bytes: dest + source + MAC)"],destinationHash:"",sourceHash:"",cipherMac:"",ciphertext:"",ciphertextLength:0};return l!=null&&l.includeSegments&&(C.segments=[{name:"Invalid Response Data",description:"Response payload too short (minimum 4 bytes required)",startByte:l.segmentOffset||0,endByte:(l.segmentOffset||0)+i.length-1,value:(0,r.bytesToHex)(i)}]),C}const d=[],u=(l==null?void 0:l.segmentOffset)||0;let p=0;const f=(0,r.byteToHex)(i[p]);l!=null&&l.includeSegments&&d.push({name:"Destination Hash",description:"First byte of destination node public key",startByte:u+p,endByte:u+p,value:f}),p+=1;const v=(0,r.byteToHex)(i[p]);l!=null&&l.includeSegments&&d.push({name:"Source Hash",description:"First byte of source node public key",startByte:u+p,endByte:u+p,value:v}),p+=1;const m=(0,r.bytesToHex)(i.subarray(p,p+2));l!=null&&l.includeSegments&&d.push({name:"Cipher MAC",description:"MAC for encrypted data in next field",startByte:u+p,endByte:u+p+1,value:m}),p+=2;const y=(0,r.bytesToHex)(i.subarray(p));l!=null&&l.includeSegments&&i.length>p&&d.push({name:"Ciphertext",description:"Encrypted response data (tag + content)",startByte:u+p,endByte:u+i.length-1,value:y});const w={type:t.PayloadType.Response,version:t.PayloadVersion.Version1,isValid:!0,destinationHash:f,sourceHash:v,cipherMac:m,ciphertext:y,ciphertextLength:i.length-4};return l!=null&&l.includeSegments&&(w.segments=d),w}catch(d){return{type:t.PayloadType.Response,version:t.PayloadVersion.Version1,isValid:!1,errors:[d instanceof Error?d.message:"Failed to decode response payload"],destinationHash:"",sourceHash:"",cipherMac:"",ciphertext:"",ciphertextLength:0}}}}return ya.ResponsePayloadDecoder=s,ya}var ga={},Ym;function K8(){if(Ym)return ga;Ym=1,Object.defineProperty(ga,"__esModule",{value:!0}),ga.AnonRequestPayloadDecoder=void 0;const t=En(),r=Gt();class s{static decode(i,l){try{if(i.length<35){const C={type:t.PayloadType.AnonRequest,version:t.PayloadVersion.Version1,isValid:!1,errors:["AnonRequest payload too short (minimum 35 bytes: dest + public key + MAC)"],destinationHash:"",senderPublicKey:"",cipherMac:"",ciphertext:"",ciphertextLength:0};return l!=null&&l.includeSegments&&(C.segments=[{name:"Invalid AnonRequest Data",description:"AnonRequest payload too short (minimum 35 bytes required: 1 for dest hash + 32 for public key + 2 for MAC)",startByte:l.segmentOffset||0,endByte:(l.segmentOffset||0)+i.length-1,value:(0,r.bytesToHex)(i)}]),C}const d=[],u=(l==null?void 0:l.segmentOffset)||0;let p=0;const f=(0,r.byteToHex)(i[0]);l!=null&&l.includeSegments&&d.push({name:"Destination Hash",description:`First byte of destination node public key: 0x${f}`,startByte:u+p,endByte:u+p,value:f}),p+=1;const v=(0,r.bytesToHex)(i.subarray(1,33));l!=null&&l.includeSegments&&d.push({name:"Sender Public Key",description:"Ed25519 public key of the sender (32 bytes)",startByte:u+p,endByte:u+p+31,value:v}),p+=32;const m=(0,r.bytesToHex)(i.subarray(33,35));l!=null&&l.includeSegments&&d.push({name:"Cipher MAC",description:"MAC for encrypted data verification (2 bytes)",startByte:u+p,endByte:u+p+1,value:m}),p+=2;const y=(0,r.bytesToHex)(i.subarray(35));l!=null&&l.includeSegments&&i.length>35&&d.push({name:"Ciphertext",description:`Encrypted message data (${i.length-35} bytes). Contains encrypted plaintext with this structure:
• Timestamp (4 bytes) - send time as unix timestamp
• Sync Timestamp (4 bytes) - room server only, sender's "sync messages SINCE x" timestamp
• Password (remaining bytes) - password for repeater/room`,startByte:u+p,endByte:u+i.length-1,value:y});const w={type:t.PayloadType.AnonRequest,version:t.PayloadVersion.Version1,isValid:!0,destinationHash:f,senderPublicKey:v,cipherMac:m,ciphertext:y,ciphertextLength:i.length-35};return l!=null&&l.includeSegments&&(w.segments=d),w}catch(d){return{type:t.PayloadType.AnonRequest,version:t.PayloadVersion.Version1,isValid:!1,errors:[d instanceof Error?d.message:"Failed to decode AnonRequest payload"],destinationHash:"",senderPublicKey:"",cipherMac:"",ciphertext:"",ciphertextLength:0}}}}return ga.AnonRequestPayloadDecoder=s,ga}var ba={},Xm;function G8(){if(Xm)return ba;Xm=1,Object.defineProperty(ba,"__esModule",{value:!0}),ba.AckPayloadDecoder=void 0;const t=En(),r=Gt();class s{static decode(i,l){try{if(i.length<4){const v={type:t.PayloadType.Ack,version:t.PayloadVersion.Version1,isValid:!1,errors:["Ack payload too short (minimum 4 bytes for checksum)"],checksum:""};return l!=null&&l.includeSegments&&(v.segments=[{name:"Invalid Ack Data",description:"Ack payload too short (minimum 4 bytes required for checksum)",startByte:l.segmentOffset||0,endByte:(l.segmentOffset||0)+i.length-1,value:(0,r.bytesToHex)(i)}]),v}const d=[],u=(l==null?void 0:l.segmentOffset)||0,p=(0,r.bytesToHex)(i.subarray(0,4));l!=null&&l.includeSegments&&d.push({name:"Checksum",description:`CRC checksum of message timestamp, text, and sender pubkey: 0x${p}`,startByte:u,endByte:u+3,value:p}),l!=null&&l.includeSegments&&i.length>4&&d.push({name:"Additional Data",description:"Extra data in Ack payload",startByte:u+4,endByte:u+i.length-1,value:(0,r.bytesToHex)(i.subarray(4))});const f={type:t.PayloadType.Ack,version:t.PayloadVersion.Version1,isValid:!0,checksum:p};return l!=null&&l.includeSegments&&(f.segments=d),f}catch(d){return{type:t.PayloadType.Ack,version:t.PayloadVersion.Version1,isValid:!1,errors:[d instanceof Error?d.message:"Failed to decode Ack payload"],checksum:""}}}}return ba.AckPayloadDecoder=s,ba}var wa={},Qm;function Y8(){if(Qm)return wa;Qm=1,Object.defineProperty(wa,"__esModule",{value:!0}),wa.PathPayloadDecoder=void 0;const t=En(),r=Gt();class s{static decode(i){try{if(i.length<2)return{type:t.PayloadType.Path,version:t.PayloadVersion.Version1,isValid:!1,errors:["Path payload too short (minimum 2 bytes: path length + extra type)"],pathLength:0,pathHashes:[],extraType:0,extraData:""};const l=i[0],d=(l>>6)+1,u=l&63,p=u*d;if(d===4)return{type:t.PayloadType.Path,version:t.PayloadVersion.Version1,isValid:!1,errors:["Invalid path length byte: reserved hash size (bits 7:6 = 11)"],pathLength:0,pathHashes:[],extraType:0,extraData:""};if(i.length<1+p+1)return{type:t.PayloadType.Path,version:t.PayloadVersion.Version1,isValid:!1,errors:[`Path payload too short (need ${1+p+1} bytes for path length + path + extra type)`],pathLength:u,...d>1?{pathHashSize:d}:{},pathHashes:[],extraType:0,extraData:""};const f=[];for(let y=0;y<u;y++){const w=1+y*d,C=i.subarray(w,w+d);f.push((0,r.bytesToHex)(C))}const v=i[1+p];let m="";return i.length>1+p+1&&(m=(0,r.bytesToHex)(i.subarray(1+p+1))),{type:t.PayloadType.Path,version:t.PayloadVersion.Version1,isValid:!0,pathLength:u,...d>1?{pathHashSize:d}:{},pathHashes:f,extraType:v,extraData:m}}catch(l){return{type:t.PayloadType.Path,version:t.PayloadVersion.Version1,isValid:!1,errors:[l instanceof Error?l.message:"Failed to decode Path payload"],pathLength:0,pathHashes:[],extraType:0,extraData:""}}}}return wa.PathPayloadDecoder=s,wa}var Ca={},Zm;function X8(){if(Zm)return Ca;Zm=1,Object.defineProperty(Ca,"__esModule",{value:!0}),Ca.TextMessagePayloadDecoder=void 0;const t=En(),r=Gt();class s{static decode(i,l){try{if(i.length<4){const C={type:t.PayloadType.TextMessage,version:t.PayloadVersion.Version1,isValid:!1,errors:["TextMessage payload too short (minimum 4 bytes: dest + source + MAC)"],destinationHash:"",sourceHash:"",cipherMac:"",ciphertext:"",ciphertextLength:0};return l!=null&&l.includeSegments&&(C.segments=[{name:"Invalid TextMessage Data",description:"TextMessage payload too short (minimum 4 bytes required)",startByte:l.segmentOffset||0,endByte:(l.segmentOffset||0)+i.length-1,value:(0,r.bytesToHex)(i)}]),C}const d=[],u=(l==null?void 0:l.segmentOffset)||0;let p=0;const f=(0,r.byteToHex)(i[p]);l!=null&&l.includeSegments&&d.push({name:"Destination Hash",description:"First byte of destination node public key",startByte:u+p,endByte:u+p,value:f}),p+=1;const v=(0,r.byteToHex)(i[p]);l!=null&&l.includeSegments&&d.push({name:"Source Hash",description:"First byte of source node public key",startByte:u+p,endByte:u+p,value:v}),p+=1;const m=(0,r.bytesToHex)(i.subarray(p,p+2));l!=null&&l.includeSegments&&d.push({name:"Cipher MAC",description:"MAC for encrypted data in next field",startByte:u+p,endByte:u+p+1,value:m}),p+=2;const y=(0,r.bytesToHex)(i.subarray(p));l!=null&&l.includeSegments&&i.length>p&&d.push({name:"Ciphertext",description:"Encrypted message data (timestamp + message text)",startByte:u+p,endByte:u+i.leng Line truncated
//# sourceMappingURL=index-C_33NHxn.js.map
@@ -0,0 +1 @@
{"version":3,"mappings":";;;;;;;;;6CASa,IAAIA,EAAE,OAAO,IAAI,eAAe,EAAEC,EAAE,OAAO,IAAI,cAAc,EAAEC,EAAE,OAAO,IAAI,gBAAgB,EAAEC,EAAE,OAAO,IAAI,mBAAmB,EAAEC,EAAE,OAAO,IAAI,gBAAgB,EAAEC,EAAE,OAAO,IAAI,gBAAgB,EAAEC,EAAE,OAAO,IAAI,eAAe,EAAEC,EAAE,OAAO,IAAI,mBAAmB,EAAEC,EAAE,OAAO,IAAI,gBAAgB,EAAEC,EAAE,OAAO,IAAI,YAAY,EAAEC,EAAE,OAAO,IAAI,YAAY,EAAEC,EAAE,OAAO,SAAS,SAASC,EAAEC,EAAE,CAAC,OAAUA,IAAP,MAAqB,OAAOA,GAAlB,SAA2B,MAAKA,EAAEF,GAAGE,EAAEF,CAAC,GAAGE,EAAE,YAAY,EAAqB,OAAOA,GAApB,WAAsBA,EAAE,KAAI,CAC1e,IAA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OAAAC,GAAA,SAAiB,CAAC,IAAIN,GAAE,QAAQ,SAAS3B,EAAEI,EAAEC,EAAE,CAACsB,GAAE3B,EAAE,UAAU,CAACI,EAAE,MAAM,KAAK,SAAS,CAAC,EAAEC,CAAC,CAAC,EAAE,MAAM,SAASL,EAAE,CAAC,IAAII,EAAE,EAAE,OAAAuB,GAAE3B,EAAE,UAAU,CAACI,GAAG,CAAC,EAASA,CAAC,EAAE,QAAQ,SAASJ,EAAE,CAAC,OAAO2B,GAAE3B,EAAE,SAASA,EAAE,CAAC,OAAOA,CAAC,CAAC,GAAG,EAAE,EAAE,KAAK,SAASA,EAAE,CAAC,GAAG,CAACsB,EAAEtB,CAAC,EAAE,MAAMLine truncated
@@ -1,5 +1,5 @@
import{r as O,a3 as si,a4 as ss,v as rs}from"./index-BUPp0i0i.js";function Mn(d,_){const h=O.useRef(_);O.useEffect(function(){_!==h.current&&d.attributionControl!=null&&(h.current!=null&&d.attributionControl.removeAttribution(h.current),_!=null&&d.attributionControl.addAttribution(_)),h.current=_},[d,_])}const as=1;function hs(d){return Object.freeze({__version:as,map:d})}function xs(d,_){return Object.freeze({...d,..._})}const Cn=O.createContext(null),Sn=Cn.Provider;function ai(){const d=O.useContext(Cn);if(d==null)throw new Error("No context provided: useLeafletContext() can only be used in a descendant of <MapContainer>");return d}function zn(d){function _(h,m){const{instance:f,context:E}=d(h).current;return O.useImperativeHandle(m,()=>f),h.children==null?null:si.createElement(Sn,{value:E},h.children)}return O.forwardRef(_)}function us(d){function _(h,m){const[f,E]=O.useState(!1),{instance:P}=d(h,E).current;O.useImperativeHandle(m,()=>P),O.useEffect(function(){f&&P.update()},[P,f,h.children]);const ot=P._contentNode;return ot?ss.createPortal(h.children,ot):null}return O.forwardRef(_)}function ls(d){function _(h,m){const{instance:f}=d(h).current;return O.useImperativeHandle(m,()=>f),null}return O.forwardRef(_)}function hi(d,_){const h=O.useRef();O.useEffect(function(){return _!=null&&d.instance.on(_),h.current=_,function(){h.current!=null&&d.instance.off(h.current),h.current=null}},[d,_])}function we(d,_){const h=d.pane??_.pane;return h?{...d,pane:h}:d}function cs(d,_){return function(m,f){const E=ai(),P=d(we(m,E),E);return Mn(E.map,m.attribution),hi(P.current,m.eventHandlers),_(P.current,E,m,f),P}}var Jt={exports:{}};/* @preserve
import{r as O,a3 as si,a4 as ss,v as rs}from"./index-C_33NHxn.js";function Mn(d,_){const h=O.useRef(_);O.useEffect(function(){_!==h.current&&d.attributionControl!=null&&(h.current!=null&&d.attributionControl.removeAttribution(h.current),_!=null&&d.attributionControl.addAttribution(_)),h.current=_},[d,_])}const as=1;function hs(d){return Object.freeze({__version:as,map:d})}function xs(d,_){return Object.freeze({...d,..._})}const Cn=O.createContext(null),Sn=Cn.Provider;function ai(){const d=O.useContext(Cn);if(d==null)throw new Error("No context provided: useLeafletContext() can only be used in a descendant of <MapContainer>");return d}function zn(d){function _(h,m){const{instance:f,context:E}=d(h).current;return O.useImperativeHandle(m,()=>f),h.children==null?null:si.createElement(Sn,{value:E},h.children)}return O.forwardRef(_)}function us(d){function _(h,m){const[f,E]=O.useState(!1),{instance:P}=d(h,E).current;O.useImperativeHandle(m,()=>P),O.useEffect(function(){f&&P.update()},[P,f,h.children]);const ot=P._contentNode;return ot?ss.createPortal(h.children,ot):null}return O.forwardRef(_)}function ls(d){function _(h,m){const{instance:f}=d(h).current;return O.useImperativeHandle(m,()=>f),null}return O.forwardRef(_)}function hi(d,_){const h=O.useRef();O.useEffect(function(){return _!=null&&d.instance.on(_),h.current=_,function(){h.current!=null&&d.instance.off(h.current),h.current=null}},[d,_])}function we(d,_){const h=d.pane??_.pane;return h?{...d,pane:h}:d}function cs(d,_){return function(m,f){const E=ai(),P=d(we(m,E),E);return Mn(E.map,m.attribution),hi(P.current,m.eventHandlers),_(P.current,E,m,f),P}}var Jt={exports:{}};/* @preserve
* Leaflet 1.9.4, a JS library for interactive maps. https://leafletjs.com
* (c) 2010-2023 Vladimir Agafonkin, (c) 2010-2011 CloudMade
*/var fs=Jt.exports,bn;function ds(){return bn||(bn=1,(function(d,_){(function(h,m){m(_)})(fs,(function(h){var m="1.9.4";function f(t){var e,i,n,o;for(i=1,n=arguments.length;i<n;i++){o=arguments[i];for(e in o)t[e]=o[e]}return t}var E=Object.create||(function(){function t(){}return function(e){return t.prototype=e,new t}})();function P(t,e){var i=Array.prototype.slice;if(t.bind)return t.bind.apply(t,i.call(arguments,1));var n=i.call(arguments,2);return function(){return t.apply(e,n.length?n.concat(i.call(arguments)):arguments)}}var ot=0;function b(t){return"_leaflet_id"in t||(t._leaflet_id=++ot),t._leaflet_id}function At(t,e,i){var n,o,s,r;return r=function(){n=!1,o&&(s.apply(i,o),o=!1)},s=function(){n?o=arguments:(t.apply(i,arguments),setTimeout(r,e),n=!0)},s}function yt(t,e,i){var n=e[1],o=e[0],s=n-o;return t===n&&i?t:((t-o)%s+s)%s+o}function I(){return!1}function X(t,e){if(e===!1)return t;var i=Math.pow(10,e===void 0?6:e);return Math.round(t*i)/i}function U(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}function ut(t){return U(t).split(/\s+/)}function k(t,e){Object.prototype.hasOwnProperty.call(t,"options")||(t.options=t.options?E(t.options):{});for(var i in e)t.options[i]=e[i];return t.options}function Qt(t,e,i){var n=[];for(var o in t)n.push(encodeURIComponent(i?o.toUpperCase():o)+"="+encodeURIComponent(t[o]));return(!e||e.indexOf("?")===-1?"?":"&")+n.join("&")}var $t=/\{ *([\w_ -]+) *\}/g;function wt(t,e){return t.replace($t,function(i,n){var o=e[n];if(o===void 0)throw new Error("No value provided for variable "+i);return typeof o=="function"&&(o=o(e)),o})}var et=Array.isArray||function(t){return Object.prototype.toString.call(t)==="[object Array]"};function Pe(t,e){for(var i=0;i<t.length;i++)if(t[i]===e)return i;return-1}var te="data:image/gif;base64,R0lGODlhAQABAAD/ACwAAAAAAQABAAACADs=";function Le(t){return window["webkit"+t]||window["moz"+t]||window["ms"+t]}var li=0;function ci(t){var e=+new Date,i=Math.max(0,16-(e-li));return li=e+i,window.setTimeout(t,i)}var Te=window.requestAnimationFrame||Le("RequestAnimationFrame")||ci,fi=window.cancelAnimationFrame||Le("CancelAnimationFrame")||Le("CancelRequestAnimationFrame")||function(t){window.clearTimeout(t)};function V(t,e,i){if(i&&Te===ci)t.call(e);else return Te.call(window,P(t,e))}function J(t){t&&fi.call(window,t)}var kn={__proto__:null,extend:f,create:E,bind:P,get lastId(){return ot},stamp:b,throttle:At,wrapNum:yt,falseFn:I,formatNum:X,trim:U,splitWords:ut,setOptions:k,getParamString:Qt,template:wt,isArray:et,indexOf:Pe,emptyImageUrl:te,requestFn:Te,cancelFn:fi,requestAnimFrame:V,cancelAnimFrame:J};function lt(){}lt.extend=function(t){var e=function(){k(this),this.initialize&&this.initialize.apply(this,arguments),this.callInitHooks()},i=e.__super__=this.prototype,n=E(i);n.constructor=e,e.prototype=n;for(var o in this)Object.prototype.hasOwnProperty.call(this,o)&&o!=="prototype"&&o!=="__super__"&&(e[o]=this[o]);return t.statics&&f(e,t.statics),t.includes&&(Zn(t.includes),f.apply(null,[n].concat(t.includes))),f(n,t),delete n.statics,delete n.includes,n.options&&(n.options=i.options?E(i.options):{},f(n.options,t.options)),n._initHooks=[],n.callInitHooks=function(){if(!this._initHooksCalled){i.callInitHooks&&i.callInitHooks.call(this),this._initHooksCalled=!0;for(var s=0,r=n._initHooks.length;s<r;s++)n._initHooks[s].call(this)}},e},lt.include=function(t){var e=this.prototype.options;return f(this.prototype,t),t.options&&(this.prototype.options=e,this.mergeOptions(t.options)),this},lt.mergeOptions=function(t){return f(this.prototype.options,t),this},lt.addInitHook=function(t){var e=Array.prototype.slice.call(arguments,1),i=typeof t=="function"?t:function(){this[t].apply(this,e)};return this.prototype._initHooks=this.prototype._initHooks||[],this.prototype._initHooks.push(i),this};function Zn(t){if(!(typeof L>"u"||!L||!L.Mixin)){t=et(t)?t:[t];for(var e=0;e<t.length;e++)t[e]===L.Mixin.Events&&console.warn("Deprecated include of L.Mixin.Events: this property will be removed in future releases, please inherit from L.Evented instead.",new Error().stack)}}var Y={on:function(t,e,i){if(typeof t=="object")for(var n in t)this._on(n,t[n],e);else{t=ut(t);for(var o=0,s=t.length;o<s;o++)this._on(t[o],e,i)}return this},off:function(t,e,i){if(!arguments.length)delete this._events;else if(typeof t=="object")for(var n in t)this._off(n,t[n],e);else{t=ut(t);for(var o=arguments.length===1,s=0,r=t.length;s<r;s++)o?this._off(t[s]):this._off(t[s],e,i)}return this},_on:function(t,e,i,n){if(typeof e!="function"){console.warn("wrong listener type: "+typeof e);return}if(this._listens(t,e,i)===!1){i===this&&(i=void 0);var o={fn:e,ctx:i};n&&(o.once=!0),this._events=this._events||{},this._events[t]=this._events[t]||[],this._events[t].push(o)}},_off:function(t,e,i){var n,o,s;if(this._events&&(n=this._events[t],!!n)){if(arguments.length===1){if(this._firingCount)for(o=0,s=n.length;o<s;o++)n[o].fn=I;delete this._events[t];return}if(typeof e!="function"){console.warn("wrong listenLine truncated
//# sourceMappingURL=leaflet-Nkpzzebg.js.map
//# sourceMappingURL=leaflet-DNHXPpW7.js.map
@@ -1 +1 @@
{"version":3,"file":"leaflet-Nkpzzebg.js","sources":["../../node_modules/@react-leaflet/core/lib/attribution.js","../../node_modules/@react-leaflet/core/lib/context.js","../../node_modules/@react-leaflet/core/lib/component.js","../../node_modules/@react-leaflet/core/lib/events.js","../../node_modules/@react-leaflet/core/lib/pane.js","../../node_modules/@react-leaflet/core/lib/div-overlay.js","../../node_modules/leaflet/dist/leaflet-src.js","../../node_modules/@react-leaflet/core/lib/element.js","../../node_modules/@react-leaflet/core/lib/layer.js","../../node_modules/@react-leaflet/core/lib/path.js","../../node_modules/@react-leaflet/core/lib/generic.js","../../node_modules/@react-leaflet/core/lib/grid-layer.js","../../node_modules/react-leaflet/lib/MapContainer.js","../../node_modules/react-leaflet/lib/TileLayer.js"],"sourcesContent":["import { useEffect, useRef } from 'react';\nexport function useAttribution(map, attribution) {\n const attributionRef = useRef(attribution);\n useEffect(function updateAttribution() {\n if (attribution !== attributionRef.current && map.attributionControl != null) {\n if (attributionRef.current != null) {\n map.attributionControl.removeAttribution(attributionRef.current);\n }\n if (attribution != null) {\n map.attributionControl.addAttribution(attribution);\n }\n }\n attributionRef.current = attribution;\n }, [\n map,\n attribution\n ]);\n}\n","import { createContext, useContext } from 'react';\nexport const CONTEXT_VERSION = 1;\nexport function createLeafletContext(map) {\n return Object.freeze({\n __version: CONTEXT_VERSION,\n map\n });\n}\nexport function extendContext(source, extra) {\n return Object.freeze({\n ...source,\n ...extra\n });\n}\nexport const LeafletContext = createContext(null);\nexport const LeafletProvider = LeafletContext.Provider;\nexport function useLeafletContext() {\n const context = useContext(LeafletContext);\n if (context == null) {\n throw new Error('No context provided: useLeafletContext() can only be used in a descendant of <MapContainer>');\n }\n return context;\n}\n","import React, { forwardRef, useEffect, useImperativeHandle, useState } from 'react';\nimport { createPortal } from 'react-dom';\nimport { LeafletProvider } from './context.js';\nexport function createContainerComponent(useElement) {\n function ContainerComponent(props, forwardedRef) {\n const { instance , context } = useElement(props).current;\n useImperativeHandle(forwardedRef, ()=>instance);\n return props.children == null ? null : /*#__PURE__*/ React.createElement(LeafletProvider, {\n value: context\n }, props.children);\n }\n return /*#__PURE__*/ forwardRef(ContainerComponent);\n}\nexport function createDivOverlayComponent(useElement) {\n function OverlayComponent(props, forwardedRef) {\n const [isOpen, setOpen] = useState(false);\n const { instance } = useElement(props, setOpen).current;\n useImperativeHandle(forwardedRef, ()=>instance);\n useEffect(function updateOverlay() {\n if (isOpen) {\n instance.update();\n }\n }, [\n instance,\n isOpen,\n props.children\n ]);\n // @ts-ignore _contentNode missing in type definition\n const contentNode = instance._contentNode;\n return contentNode ? /*#__PURE__*/ createPortal(props.children, contentNode) : null;\n }\n return /*#__PURE__*/ forwardRef(OverlayComponent);\n}\nexport function createLeafComponent(useElement) {\n function LeafComponent(props, forwardedRef) {\n const { instance } = useElement(props).current;\n useImperativeHandle(forwardedRef, ()=>instance);\n return null;\n }\n return /*#__PURE__*/ forwardRef(LeafComponent);\n}\n","import { useEffect, useRef } from 'react';\nexport function useEventHandlers(element, eventHandlers) {\n const eventHandlersRef = useRef();\n useEffect(function addEventHandlers() {\n if (eventHandlers != null) {\n element.instance.on(eventHandlers);\n }\n eventHandlersRef.current = eventHandlers;\n return function removeEventHandlers() {\n if (eventHandlersRef.current != null) {\n element.instance.off(eventHandlersRef.current);\n }\n eventHandlersRef.current = null;\n };\n }, [\n element,\n eventHandlers\n ]);\n}\n","export function withPane(props, context) {\n const pane = props.pane ?? context.pane;\n return pane ? {\n ...props,\n pane\n } : props;\n}\n","import { useAttribution } from './attribution.js';\nimport { useLeafletContext } from './context.js';\nimport { useEventHandlers } from './events.js';\nimport { withPane } from './pane.js';\nexport function Line truncated
{"version":3,"file":"leaflet-DNHXPpW7.js","sources":["../../node_modules/@react-leaflet/core/lib/attribution.js","../../node_modules/@react-leaflet/core/lib/context.js","../../node_modules/@react-leaflet/core/lib/component.js","../../node_modules/@react-leaflet/core/lib/events.js","../../node_modules/@react-leaflet/core/lib/pane.js","../../node_modules/@react-leaflet/core/lib/div-overlay.js","../../node_modules/leaflet/dist/leaflet-src.js","../../node_modules/@react-leaflet/core/lib/element.js","../../node_modules/@react-leaflet/core/lib/layer.js","../../node_modules/@react-leaflet/core/lib/path.js","../../node_modules/@react-leaflet/core/lib/generic.js","../../node_modules/@react-leaflet/core/lib/grid-layer.js","../../node_modules/react-leaflet/lib/MapContainer.js","../../node_modules/react-leaflet/lib/TileLayer.js"],"sourcesContent":["import { useEffect, useRef } from 'react';\nexport function useAttribution(map, attribution) {\n const attributionRef = useRef(attribution);\n useEffect(function updateAttribution() {\n if (attribution !== attributionRef.current && map.attributionControl != null) {\n if (attributionRef.current != null) {\n map.attributionControl.removeAttribution(attributionRef.current);\n }\n if (attribution != null) {\n map.attributionControl.addAttribution(attribution);\n }\n }\n attributionRef.current = attribution;\n }, [\n map,\n attribution\n ]);\n}\n","import { createContext, useContext } from 'react';\nexport const CONTEXT_VERSION = 1;\nexport function createLeafletContext(map) {\n return Object.freeze({\n __version: CONTEXT_VERSION,\n map\n });\n}\nexport function extendContext(source, extra) {\n return Object.freeze({\n ...source,\n ...extra\n });\n}\nexport const LeafletContext = createContext(null);\nexport const LeafletProvider = LeafletContext.Provider;\nexport function useLeafletContext() {\n const context = useContext(LeafletContext);\n if (context == null) {\n throw new Error('No context provided: useLeafletContext() can only be used in a descendant of <MapContainer>');\n }\n return context;\n}\n","import React, { forwardRef, useEffect, useImperativeHandle, useState } from 'react';\nimport { createPortal } from 'react-dom';\nimport { LeafletProvider } from './context.js';\nexport function createContainerComponent(useElement) {\n function ContainerComponent(props, forwardedRef) {\n const { instance , context } = useElement(props).current;\n useImperativeHandle(forwardedRef, ()=>instance);\n return props.children == null ? null : /*#__PURE__*/ React.createElement(LeafletProvider, {\n value: context\n }, props.children);\n }\n return /*#__PURE__*/ forwardRef(ContainerComponent);\n}\nexport function createDivOverlayComponent(useElement) {\n function OverlayComponent(props, forwardedRef) {\n const [isOpen, setOpen] = useState(false);\n const { instance } = useElement(props, setOpen).current;\n useImperativeHandle(forwardedRef, ()=>instance);\n useEffect(function updateOverlay() {\n if (isOpen) {\n instance.update();\n }\n }, [\n instance,\n isOpen,\n props.children\n ]);\n // @ts-ignore _contentNode missing in type definition\n const contentNode = instance._contentNode;\n return contentNode ? /*#__PURE__*/ createPortal(props.children, contentNode) : null;\n }\n return /*#__PURE__*/ forwardRef(OverlayComponent);\n}\nexport function createLeafComponent(useElement) {\n function LeafComponent(props, forwardedRef) {\n const { instance } = useElement(props).current;\n useImperativeHandle(forwardedRef, ()=>instance);\n return null;\n }\n return /*#__PURE__*/ forwardRef(LeafComponent);\n}\n","import { useEffect, useRef } from 'react';\nexport function useEventHandlers(element, eventHandlers) {\n const eventHandlersRef = useRef();\n useEffect(function addEventHandlers() {\n if (eventHandlers != null) {\n element.instance.on(eventHandlers);\n }\n eventHandlersRef.current = eventHandlers;\n return function removeEventHandlers() {\n if (eventHandlersRef.current != null) {\n element.instance.off(eventHandlersRef.current);\n }\n eventHandlersRef.current = null;\n };\n }, [\n element,\n eventHandlers\n ]);\n}\n","export function withPane(props, context) {\n const pane = props.pane ?? context.pane;\n return pane ? {\n ...props,\n pane\n } : props;\n}\n","import { useAttribution } from './attribution.js';\nimport { useLeafletContext } from './context.js';\nimport { useEventHandlers } from './events.js';\nimport { withPane } from './pane.js';\nexport function Line truncated
@@ -1,2 +1,2 @@
import{r as s,j as l,Q as f,l as u}from"./index-BUPp0i0i.js";var N=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],h=N.reduce((a,r)=>{const t=f(`Primitive.${r}`),o=s.forwardRef((i,e)=>{const{asChild:p,...n}=i,m=p?t:r;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),l.jsx(m,{...n,ref:e})});return o.displayName=`Primitive.${r}`,{...a,[r]:o}},{}),x="Separator",c="horizontal",w=["horizontal","vertical"],d=s.forwardRef((a,r)=>{const{decorative:t,orientation:o=c,...i}=a,e=S(o)?o:c,n=t?{role:"none"}:{"aria-orientation":e==="vertical"?e:void 0,role:"separator"};return l.jsx(h.div,{"data-orientation":e,...n,...i,ref:r})});d.displayName=x;function S(a){return w.includes(a)}var v=d;const O=s.forwardRef(({className:a,orientation:r="horizontal",decorative:t=!0,...o},i)=>l.jsx(v,{ref:i,decorative:t,orientation:r,className:u("shrink-0 bg-border",r==="horizontal"?"h-[1px] w-full":"h-full w-[1px]",a),...o}));O.displayName=v.displayName;export{O as S};
//# sourceMappingURL=separator-C7ZN2sFh.js.map
import{r as s,j as l,Q as f,l as u}from"./index-C_33NHxn.js";var N=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],h=N.reduce((a,r)=>{const t=f(`Primitive.${r}`),o=s.forwardRef((i,e)=>{const{asChild:p,...n}=i,m=p?t:r;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),l.jsx(m,{...n,ref:e})});return o.displayName=`Primitive.${r}`,{...a,[r]:o}},{}),x="Separator",c="horizontal",w=["horizontal","vertical"],d=s.forwardRef((a,r)=>{const{decorative:t,orientation:o=c,...i}=a,e=S(o)?o:c,n=t?{role:"none"}:{"aria-orientation":e==="vertical"?e:void 0,role:"separator"};return l.jsx(h.div,{"data-orientation":e,...n,...i,ref:r})});d.displayName=x;function S(a){return w.includes(a)}var v=d;const O=s.forwardRef(({className:a,orientation:r="horizontal",decorative:t=!0,...o},i)=>l.jsx(v,{ref:i,decorative:t,orientation:r,className:u("shrink-0 bg-border",r==="horizontal"?"h-[1px] w-full":"h-full w-[1px]",a),...o}));O.displayName=v.displayName;export{O as S};
//# sourceMappingURL=separator-BtL4plOj.js.map
@@ -1 +1 @@
{"version":3,"file":"separator-C7ZN2sFh.js","sources":["../../node_modules/@radix-ui/react-separator/node_modules/@radix-ui/react-primitive/dist/index.mjs","../../node_modules/@radix-ui/react-separator/dist/index.mjs","../../src/components/ui/separator.tsx"],"sourcesContent":["// src/primitive.tsx\nimport * as React from \"react\";\nimport * as ReactDOM from \"react-dom\";\nimport { createSlot } from \"@radix-ui/react-slot\";\nimport { jsx } from \"react/jsx-runtime\";\nvar NODES = [\n \"a\",\n \"button\",\n \"div\",\n \"form\",\n \"h2\",\n \"h3\",\n \"img\",\n \"input\",\n \"label\",\n \"li\",\n \"nav\",\n \"ol\",\n \"p\",\n \"select\",\n \"span\",\n \"svg\",\n \"ul\"\n];\nvar Primitive = NODES.reduce((primitive, node) => {\n const Slot = createSlot(`Primitive.${node}`);\n const Node = React.forwardRef((props, forwardedRef) => {\n const { asChild, ...primitiveProps } = props;\n const Comp = asChild ? Slot : node;\n if (typeof window !== \"undefined\") {\n window[Symbol.for(\"radix-ui\")] = true;\n }\n return /* @__PURE__ */ jsx(Comp, { ...primitiveProps, ref: forwardedRef });\n });\n Node.displayName = `Primitive.${node}`;\n return { ...primitive, [node]: Node };\n}, {});\nfunction dispatchDiscreteCustomEvent(target, event) {\n if (target) ReactDOM.flushSync(() => target.dispatchEvent(event));\n}\nvar Root = Primitive;\nexport {\n Primitive,\n Root,\n dispatchDiscreteCustomEvent\n};\n//# sourceMappingURL=index.mjs.map\n","// src/separator.tsx\nimport * as React from \"react\";\nimport { Primitive } from \"@radix-ui/react-primitive\";\nimport { jsx } from \"react/jsx-runtime\";\nvar NAME = \"Separator\";\nvar DEFAULT_ORIENTATION = \"horizontal\";\nvar ORIENTATIONS = [\"horizontal\", \"vertical\"];\nvar Separator = React.forwardRef((props, forwardedRef) => {\n const { decorative, orientation: orientationProp = DEFAULT_ORIENTATION, ...domProps } = props;\n const orientation = isValidOrientation(orientationProp) ? orientationProp : DEFAULT_ORIENTATION;\n const ariaOrientation = orientation === \"vertical\" ? orientation : void 0;\n const semanticProps = decorative ? { role: \"none\" } : { \"aria-orientation\": ariaOrientation, role: \"separator\" };\n return /* @__PURE__ */ jsx(\n Primitive.div,\n {\n \"data-orientation\": orientation,\n ...semanticProps,\n ...domProps,\n ref: forwardedRef\n }\n );\n});\nSeparator.displayName = NAME;\nfunction isValidOrientation(orientation) {\n return ORIENTATIONS.includes(orientation);\n}\nvar Root = Separator;\nexport {\n Root,\n Separator\n};\n//# sourceMappingURL=index.mjs.map\n","'use client';\n\nimport * as React from 'react';\nimport * as SeparatorPrimitive from '@radix-ui/react-separator';\n\nimport { cn } from '@/lib/utils';\n\nconst Separator = React.forwardRef<\n React.ElementRef<typeof SeparatorPrimitive.Root>,\n React.ComponentPropsWithoutRef<typeof SeparatorPrimitive.Root>\n>(({ className, orientation = 'horizontal', decorative = true, ...props }, ref) => (\n <SeparatorPrimitive.Root\n ref={ref}\n decorative={decorative}\n orientation={orientation}\n className={cn(\n 'shrink-0 bg-border',\n orientation === 'horizontal' ? 'h-[1px] w-full' : 'h-full w-[1px]',\n className\n )}\n {...props}\n />\n));\nSeparator.displayName = SeparatorPrimitive.Root.displayName;\n\nexport { Separator };\n"],"names":["NODES","Primitive","primitive","node","Slot","createSlot","Node","React.forwardRef","props","forwardedRef","asChild","primitiveProps","Comp","jsx","NAME","DEFAULT_ORIENTATION","ORIENTATIONS","Separator","decorative","orientationProp","domProps","orientation","isValidOrientation","semanticProps","Root","className","ref","SeparatorPrimitive.Root","cn"],"mappings":"6DAKA,IAAIA,EAAQ,CACV,IACA,SACA,MACA,OACA,KACA,KACA,MACA,QACA,QACA,KACA,MACA,KACA,IACA,SACA,OACA,MACA,IACF,EACIC,EAAYD,EAAM,OAAO,CAACE,EAAWC,IAAS,CAChD,MAAMC,EAAOC,EAAW,aAAaF,CAAI,EAAE,EACrCG,EAAOC,EAAAA,WAAiB,CAACC,EAAOC,IAAiB,CACrD,KAAM,CAAE,QAAAC,EAAS,GAAGC,CAAc,EAAKH,EACjCI,EAAOF,EAAUN,EAAOD,EAC9B,OAAI,OAAO,OAAW,MACpB,OAAO,OAAO,IAAI,UAAU,CAAC,EAAI,IAEZU,EAAAA,IAAID,EAAM,CAAE,GAAGD,EAAgB,IAAKF,EAAc,CAC3E,CAAC,EACD,OAAAH,EAAK,YAAc,aAAaH,CAAI,GAC7B,CAAE,GAAGD,EAAW,CAACC,CAAI,EAAGG,CAAI,CACrC,EAAG,EAAE,EChCDQ,EAAO,YACPC,EAAsB,aACtBC,EAAe,CAAC,aAAc,UAAU,EACxCC,EAAYV,EAAAA,WAAiB,CAACC,EAAOC,IAAiB,CACxD,KAAM,CAAE,WAAAS,EAAY,YAAaC,EAAkBJ,EAAqB,GAAGK,CAAQ,EAAKZ,EAClFa,EAAcC,EAAmBH,CAAe,EAAIA,EAAkBJ,EAEtEQ,EAAgBL,EAAa,CAAE,KAAM,QAAW,CAAE,mBADhCG,IAAgB,WAAaA,EAAc,OAC0B,KAAM,WAAW,EAC9G,OAAuBR,EAAAA,IACrBZ,EAAU,IACV,CACE,mBAAoBoB,EACpB,GAAGE,EACH,GAAGH,EACH,IAAKX,CACX,CACA,CACA,CAAC,EACDQ,EAAU,YAAcH,EACxB,SAASQ,EAAmBD,EAAa,CACvC,OAAOL,EAAa,SAASK,CAAW,CAC1C,CACA,IAAIG,EAAOP,ECnBX,MAAMA,EAAYV,EAAAA,WAGhB,CAAC,CAAE,UAAAkB,EAAW,YAAAJ,EAAc,aAAc,WAAAH,EAAa,GAAM,GAAGV,CAAA,EAASkB,IACzEb,EAAAA,IAACc,EAAA,CACC,IAAAD,EACA,WAAAR,EACA,YAAAG,EACA,UAAWO,EACT,qBACAP,IAAgB,aAAe,iBAAmB,iBAClDI,CAAA,EAED,GAAGjB,CAAA,CACLine truncated
{"version":3,"file":"separator-BtL4plOj.js","sources":["../../node_modules/@radix-ui/react-separator/node_modules/@radix-ui/react-primitive/dist/index.mjs","../../node_modules/@radix-ui/react-separator/dist/index.mjs","../../src/components/ui/separator.tsx"],"sourcesContent":["// src/primitive.tsx\nimport * as React from \"react\";\nimport * as ReactDOM from \"react-dom\";\nimport { createSlot } from \"@radix-ui/react-slot\";\nimport { jsx } from \"react/jsx-runtime\";\nvar NODES = [\n \"a\",\n \"button\",\n \"div\",\n \"form\",\n \"h2\",\n \"h3\",\n \"img\",\n \"input\",\n \"label\",\n \"li\",\n \"nav\",\n \"ol\",\n \"p\",\n \"select\",\n \"span\",\n \"svg\",\n \"ul\"\n];\nvar Primitive = NODES.reduce((primitive, node) => {\n const Slot = createSlot(`Primitive.${node}`);\n const Node = React.forwardRef((props, forwardedRef) => {\n const { asChild, ...primitiveProps } = props;\n const Comp = asChild ? Slot : node;\n if (typeof window !== \"undefined\") {\n window[Symbol.for(\"radix-ui\")] = true;\n }\n return /* @__PURE__ */ jsx(Comp, { ...primitiveProps, ref: forwardedRef });\n });\n Node.displayName = `Primitive.${node}`;\n return { ...primitive, [node]: Node };\n}, {});\nfunction dispatchDiscreteCustomEvent(target, event) {\n if (target) ReactDOM.flushSync(() => target.dispatchEvent(event));\n}\nvar Root = Primitive;\nexport {\n Primitive,\n Root,\n dispatchDiscreteCustomEvent\n};\n//# sourceMappingURL=index.mjs.map\n","// src/separator.tsx\nimport * as React from \"react\";\nimport { Primitive } from \"@radix-ui/react-primitive\";\nimport { jsx } from \"react/jsx-runtime\";\nvar NAME = \"Separator\";\nvar DEFAULT_ORIENTATION = \"horizontal\";\nvar ORIENTATIONS = [\"horizontal\", \"vertical\"];\nvar Separator = React.forwardRef((props, forwardedRef) => {\n const { decorative, orientation: orientationProp = DEFAULT_ORIENTATION, ...domProps } = props;\n const orientation = isValidOrientation(orientationProp) ? orientationProp : DEFAULT_ORIENTATION;\n const ariaOrientation = orientation === \"vertical\" ? orientation : void 0;\n const semanticProps = decorative ? { role: \"none\" } : { \"aria-orientation\": ariaOrientation, role: \"separator\" };\n return /* @__PURE__ */ jsx(\n Primitive.div,\n {\n \"data-orientation\": orientation,\n ...semanticProps,\n ...domProps,\n ref: forwardedRef\n }\n );\n});\nSeparator.displayName = NAME;\nfunction isValidOrientation(orientation) {\n return ORIENTATIONS.includes(orientation);\n}\nvar Root = Separator;\nexport {\n Root,\n Separator\n};\n//# sourceMappingURL=index.mjs.map\n","'use client';\n\nimport * as React from 'react';\nimport * as SeparatorPrimitive from '@radix-ui/react-separator';\n\nimport { cn } from '@/lib/utils';\n\nconst Separator = React.forwardRef<\n React.ElementRef<typeof SeparatorPrimitive.Root>,\n React.ComponentPropsWithoutRef<typeof SeparatorPrimitive.Root>\n>(({ className, orientation = 'horizontal', decorative = true, ...props }, ref) => (\n <SeparatorPrimitive.Root\n ref={ref}\n decorative={decorative}\n orientation={orientation}\n className={cn(\n 'shrink-0 bg-border',\n orientation === 'horizontal' ? 'h-[1px] w-full' : 'h-full w-[1px]',\n className\n )}\n {...props}\n />\n));\nSeparator.displayName = SeparatorPrimitive.Root.displayName;\n\nexport { Separator };\n"],"names":["NODES","Primitive","primitive","node","Slot","createSlot","Node","React.forwardRef","props","forwardedRef","asChild","primitiveProps","Comp","jsx","NAME","DEFAULT_ORIENTATION","ORIENTATIONS","Separator","decorative","orientationProp","domProps","orientation","isValidOrientation","semanticProps","Root","className","ref","SeparatorPrimitive.Root","cn"],"mappings":"6DAKA,IAAIA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kB,IACzEb,EAAAA,IAACc,EAAA,CACC,IAAAD,EACA,WAAAR,EACA,YAAAG,EACA,UAAWO,EACT,qBACAP,IAAgB,aAAe,iBAAmB,iBAClDI,CAAA,EAED,GAAGjB,CAAA,CACLine truncated
+1 -1
View File
@@ -50,7 +50,7 @@
undecryptedCount: fetchJsonOrThrow('/api/packets/undecrypted/count'),
};
</script>
<script type="module" crossorigin src="/assets/index-BUPp0i0i.js"></script>
<script type="module" crossorigin src="/assets/index-C_33NHxn.js"></script>
<link rel="stylesheet" crossorigin href="/assets/index-Cx5ENk0V.css">
</head>
<body>
+46 -14
View File
@@ -161,6 +161,8 @@ export function useConversationMessages(
const [loadingNewer, setLoadingNewer] = useState(false);
const abortControllerRef = useRef<AbortController | null>(null);
const olderAbortControllerRef = useRef<AbortController | null>(null);
const newerAbortControllerRef = useRef<AbortController | null>(null);
const fetchingConversationIdRef = useRef<string | null>(null);
const latestReconcileRequestIdRef = useRef(0);
const messagesRef = useRef<Message[]>([]);
@@ -306,14 +308,19 @@ export function useConversationMessages(
loadingOlderRef.current = true;
setLoadingOlder(true);
const controller = new AbortController();
olderAbortControllerRef.current = controller;
try {
const data = await api.getMessages({
type: activeConversation.type === 'channel' ? 'CHAN' : 'PRIV',
conversation_key: conversationId,
limit: MESSAGE_PAGE_SIZE,
before: oldestMessage.received_at,
before_id: oldestMessage.id,
});
const data = await api.getMessages(
{
type: activeConversation.type === 'channel' ? 'CHAN' : 'PRIV',
conversation_key: conversationId,
limit: MESSAGE_PAGE_SIZE,
before: oldestMessage.received_at,
before_id: oldestMessage.id,
},
controller.signal
);
if (fetchingConversationIdRef.current !== conversationId) return;
@@ -335,11 +342,17 @@ export function useConversationMessages(
}
setHasOlderMessages(dataWithPendingAck.length >= MESSAGE_PAGE_SIZE);
} catch (err) {
if (isAbortError(err)) {
return;
}
console.error('Failed to fetch older messages:', err);
toast.error('Failed to load older messages', {
description: err instanceof Error ? err.message : 'Check your connection',
});
} finally {
if (olderAbortControllerRef.current === controller) {
olderAbortControllerRef.current = null;
}
loadingOlderRef.current = false;
setLoadingOlder(false);
}
@@ -361,14 +374,19 @@ export function useConversationMessages(
if (!newestMessage) return;
setLoadingNewer(true);
const controller = new AbortController();
newerAbortControllerRef.current = controller;
try {
const data = await api.getMessages({
type: activeConversation.type === 'channel' ? 'CHAN' : 'PRIV',
conversation_key: conversationId,
limit: MESSAGE_PAGE_SIZE,
after: newestMessage.received_at,
after_id: newestMessage.id,
});
const data = await api.getMessages(
{
type: activeConversation.type === 'channel' ? 'CHAN' : 'PRIV',
conversation_key: conversationId,
limit: MESSAGE_PAGE_SIZE,
after: newestMessage.received_at,
after_id: newestMessage.id,
},
controller.signal
);
if (fetchingConversationIdRef.current !== conversationId) return;
@@ -385,11 +403,17 @@ export function useConversationMessages(
}
setHasNewerMessages(dataWithPendingAck.length >= MESSAGE_PAGE_SIZE);
} catch (err) {
if (isAbortError(err)) {
return;
}
console.error('Failed to fetch newer messages:', err);
toast.error('Failed to load newer messages', {
description: err instanceof Error ? err.message : 'Check your connection',
});
} finally {
if (newerAbortControllerRef.current === controller) {
newerAbortControllerRef.current = null;
}
setLoadingNewer(false);
}
}, [activeConversation, applyPendingAck, hasNewerMessages, loadingNewer, messages]);
@@ -420,6 +444,14 @@ export function useConversationMessages(
if (abortControllerRef.current) {
abortControllerRef.current.abort();
}
if (olderAbortControllerRef.current) {
olderAbortControllerRef.current.abort();
olderAbortControllerRef.current = null;
}
if (newerAbortControllerRef.current) {
newerAbortControllerRef.current.abort();
newerAbortControllerRef.current = null;
}
const prevId = prevConversationIdRef.current;
const newId = activeConversation?.id ?? null;
@@ -2,20 +2,28 @@ import { act, renderHook, waitFor } from '@testing-library/react';
import { beforeEach, describe, expect, it, vi, type Mock } from 'vitest';
import * as messageCache from '../messageCache';
import { api } from '../api';
import { useConversationMessages } from '../hooks/useConversationMessages';
import type { Conversation, Message } from '../types';
const mockGetMessages = vi.fn<(...args: unknown[]) => Promise<Message[]>>();
const mockGetMessages = vi.fn<typeof api.getMessages>();
const mockGetMessagesAround = vi.fn();
vi.mock('../api', () => ({
api: {
getMessages: (...args: unknown[]) => mockGetMessages(...args),
getMessages: (...args: Parameters<typeof api.getMessages>) => mockGetMessages(...args),
getMessagesAround: (...args: unknown[]) => mockGetMessagesAround(...args),
},
isAbortError: (err: unknown) => err instanceof DOMException && err.name === 'AbortError',
}));
const mockToastError = vi.fn();
vi.mock('../components/ui/sonner', () => ({
toast: {
error: (...args: unknown[]) => mockToastError(...args),
},
}));
function createConversation(): Conversation {
return {
type: 'contact',
@@ -55,6 +63,7 @@ describe('useConversationMessages ACK ordering', () => {
beforeEach(() => {
mockGetMessages.mockReset();
messageCache.clear();
mockToastError.mockReset();
});
it('applies buffered ACK when message is added after ACK event', async () => {
@@ -447,6 +456,55 @@ describe('useConversationMessages older-page dedup and reentry', () => {
expect(result.current.messages.filter((msg) => msg.id === 0)).toHaveLength(1);
expect(result.current.messages).toHaveLength(201);
});
it('aborts stale older-page requests on conversation switch without toasting', async () => {
const convA: Conversation = { type: 'contact', id: 'conv_a', name: 'Contact A' };
const convB: Conversation = { type: 'contact', id: 'conv_b', name: 'Contact B' };
const fullPage = Array.from({ length: 200 }, (_, i) =>
createMessage({
id: i + 1,
conversation_key: 'conv_a',
text: `msg-${i + 1}`,
sender_timestamp: 1700000000 + i,
received_at: 1700000000 + i,
})
);
mockGetMessages.mockResolvedValueOnce(fullPage);
const olderDeferred = createDeferred<Message[]>();
let olderSignal: AbortSignal | undefined;
mockGetMessages.mockImplementationOnce((_, signal?: AbortSignal) => {
olderSignal = signal;
signal?.addEventListener('abort', () => {
olderDeferred.resolve([]);
});
return new Promise<Message[]>((_, reject) => {
signal?.addEventListener('abort', () => {
reject(new DOMException('The operation was aborted', 'AbortError'));
});
});
});
const { result, rerender } = renderHook(
({ conv }: { conv: Conversation }) => useConversationMessages(conv),
{ initialProps: { conv: convA } }
);
await waitFor(() => expect(result.current.messagesLoading).toBe(false));
act(() => {
void result.current.fetchOlderMessages();
});
await waitFor(() => expect(result.current.loadingOlder).toBe(true));
mockGetMessages.mockResolvedValueOnce([createMessage({ id: 999, conversation_key: 'conv_b' })]);
rerender({ conv: convB });
await waitFor(() => expect(result.current.messagesLoading).toBe(false));
expect(olderSignal?.aborted).toBe(true);
expect(mockToastError).not.toHaveBeenCalled();
});
});
describe('useConversationMessages forward pagination', () => {
@@ -454,6 +512,7 @@ describe('useConversationMessages forward pagination', () => {
mockGetMessages.mockReset();
mockGetMessagesAround.mockReset();
messageCache.clear();
mockToastError.mockReset();
});
it('fetchNewerMessages loads newer messages and appends them', async () => {
@@ -618,6 +677,69 @@ describe('useConversationMessages forward pagination', () => {
expect(result.current.messages[0].text).toBe('latest-msg');
});
it('aborts stale newer-page requests on conversation switch without toasting', async () => {
const convA: Conversation = { type: 'channel', id: 'ch1', name: 'Channel A' };
const convB: Conversation = { type: 'channel', id: 'ch2', name: 'Channel B' };
mockGetMessagesAround.mockResolvedValueOnce({
messages: [
createMessage({
id: 1,
type: 'CHAN',
conversation_key: 'ch1',
text: 'msg-0',
sender_timestamp: 1700000000,
received_at: 1700000000,
}),
],
has_older: false,
has_newer: true,
});
let newerSignal: AbortSignal | undefined;
mockGetMessages.mockImplementationOnce((_, signal?: AbortSignal) => {
newerSignal = signal;
return new Promise<Message[]>((_, reject) => {
signal?.addEventListener('abort', () => {
reject(new DOMException('The operation was aborted', 'AbortError'));
});
});
});
const initialProps: { conv: Conversation; target: number | null } = {
conv: convA,
target: 1,
};
const { result, rerender } = renderHook(
({ conv, target }: { conv: Conversation; target: number | null }) =>
useConversationMessages(conv, target),
{ initialProps }
);
await waitFor(() => expect(result.current.messagesLoading).toBe(false));
act(() => {
void result.current.fetchNewerMessages();
});
await waitFor(() => expect(result.current.loadingNewer).toBe(true));
mockGetMessages.mockResolvedValueOnce([
createMessage({
id: 999,
type: 'CHAN',
conversation_key: 'ch2',
text: 'conv-b',
}),
]);
rerender({ conv: convB, target: null });
await waitFor(() => expect(result.current.messagesLoading).toBe(false));
expect(newerSignal?.aborted).toBe(true);
expect(mockToastError).not.toHaveBeenCalled();
});
it('preserves around-loaded messages when the jump target is cleared in the same conversation', async () => {
const conv: Conversation = { type: 'channel', id: 'ch1', name: 'Channel' };