peerpigeon
Version:
WebRTC-based peer-to-peer mesh networking library with intelligent routing and signaling server
58 lines โข 256 kB
JavaScript
(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const a of document.querySelectorAll('link[rel="modulepreload"]'))o(a);new MutationObserver(a=>{for(const i of a)if(i.type==="childList")for(const r of i.addedNodes)r.tagName==="LINK"&&r.rel==="modulepreload"&&o(r)}).observe(document,{childList:!0,subtree:!0});function n(a){const i={};return a.integrity&&(i.integrity=a.integrity),a.referrerPolicy&&(i.referrerPolicy=a.referrerPolicy),a.crossOrigin==="use-credentials"?i.credentials="include":a.crossOrigin==="anonymous"?i.credentials="omit":i.credentials="same-origin",i}function o(a){if(a.ep)return;a.ep=!0;const i=n(a);fetch(a.href,i)}})();/**
* @vue/shared v3.5.22
* (c) 2018-present Yuxi (Evan) You and Vue contributors
* @license MIT
**/function Zn(e){const t=Object.create(null);for(const n of e.split(","))t[n]=1;return n=>n in t}const Me={},is=[],yt=()=>{},wa=()=>!1,rn=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),eo=e=>e.startsWith("onUpdate:"),Ze=Object.assign,to=(e,t)=>{const n=e.indexOf(t);n>-1&&e.splice(n,1)},Gi=Object.prototype.hasOwnProperty,Le=(e,t)=>Gi.call(e,t),be=Array.isArray,rs=e=>Ns(e)==="[object Map]",gs=e=>Ns(e)==="[object Set]",So=e=>Ns(e)==="[object Date]",we=e=>typeof e=="function",je=e=>typeof e=="string",St=e=>typeof e=="symbol",Ie=e=>e!==null&&typeof e=="object",Sa=e=>(Ie(e)||we(e))&&we(e.then)&&we(e.catch),Da=Object.prototype.toString,Ns=e=>Da.call(e),zi=e=>Ns(e).slice(8,-1),$a=e=>Ns(e)==="[object Object]",so=e=>je(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,ys=Zn(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),ln=e=>{const t=Object.create(null);return n=>t[n]||(t[n]=e(n))},Wi=/-\w/g,ct=ln(e=>e.replace(Wi,t=>t.slice(1).toUpperCase())),Ji=/\B([A-Z])/g,zt=ln(e=>e.replace(Ji,"-$1").toLowerCase()),cn=ln(e=>e.charAt(0).toUpperCase()+e.slice(1)),Dn=ln(e=>e?`on${cn(e)}`:""),Kt=(e,t)=>!Object.is(e,t),js=(e,...t)=>{for(let n=0;n<e.length;n++)e[n](...t)},ka=(e,t,n,o=!1)=>{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,writable:o,value:n})},qs=e=>{const t=parseFloat(e);return isNaN(t)?e:t};let Do;const un=()=>Do||(Do=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function no(e){if(be(e)){const t={};for(let n=0;n<e.length;n++){const o=e[n],a=je(o)?Xi(o):no(o);if(a)for(const i in a)t[i]=a[i]}return t}else if(je(e)||Ie(e))return e}const qi=/;(?![^(]*\))/g,Yi=/:([^]+)/,Qi=/\/\*[^]*?\*\//g;function Xi(e){const t={};return e.replace(Qi,"").split(qi).forEach(n=>{if(n){const o=n.split(Yi);o.length>1&&(t[o[0].trim()]=o[1].trim())}}),t}function ke(e){let t="";if(je(e))t=e;else if(be(e))for(let n=0;n<e.length;n++){const o=ke(e[n]);o&&(t+=o+" ")}else if(Ie(e))for(const n in e)e[n]&&(t+=n+" ");return t.trim()}const Zi="itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly",er=Zn(Zi);function Ca(e){return!!e||e===""}function tr(e,t){if(e.length!==t.length)return!1;let n=!0;for(let o=0;n&&o<e.length;o++)n=Os(e[o],t[o]);return n}function Os(e,t){if(e===t)return!0;let n=So(e),o=So(t);if(n||o)return n&&o?e.getTime()===t.getTime():!1;if(n=St(e),o=St(t),n||o)return e===t;if(n=be(e),o=be(t),n||o)return n&&o?tr(e,t):!1;if(n=Ie(e),o=Ie(t),n||o){if(!n||!o)return!1;const a=Object.keys(e).length,i=Object.keys(t).length;if(a!==i)return!1;for(const r in e){const l=e.hasOwnProperty(r),d=t.hasOwnProperty(r);if(l&&!d||!l&&d||!Os(e[r],t[r]))return!1}}return String(e)===String(t)}function oo(e,t){return e.findIndex(n=>Os(n,t))}const _a=e=>!!(e&&e.__v_isRef===!0),E=e=>je(e)?e:e==null?"":be(e)||Ie(e)&&(e.toString===Da||!we(e.toString))?_a(e)?E(e.value):JSON.stringify(e,Ea,2):String(e),Ea=(e,t)=>_a(t)?Ea(e,t.value):rs(t)?{[`Map(${t.size})`]:[...t.entries()].reduce((n,[o,a],i)=>(n[$n(o,i)+" =>"]=a,n),{})}:gs(t)?{[`Set(${t.size})`]:[...t.values()].map(n=>$n(n))}:St(t)?$n(t):Ie(t)&&!be(t)&&!$a(t)?String(t):t,$n=(e,t="")=>{var n;return St(e)?`Symbol(${(n=e.description)!=null?n:t})`:e};/**
* @vue/reactivity v3.5.22
* (c) 2018-present Yuxi (Evan) You and Vue contributors
* @license MIT
**/let Ye;class Ta{constructor(t=!1){this.detached=t,this._active=!0,this._on=0,this.effects=[],this.cleanups=[],this._isPaused=!1,this.parent=Ye,!t&&Ye&&(this.index=(Ye.scopes||(Ye.scopes=[])).push(this)-1)}get active(){return this._active}pause(){if(this._active){this._isPaused=!0;let t,n;if(this.scopes)for(t=0,n=this.scopes.length;t<n;t++)this.scopes[t].pause();for(t=0,n=this.effects.length;t<n;t++)this.effects[t].pause()}}resume(){if(this._active&&this._isPaused){this._isPaused=!1;let t,n;if(this.scopes)for(t=0,n=this.scopes.length;t<n;t++)this.scopes[t].resume();for(t=0,n=this.effects.length;t<n;t++)this.effects[t].resume()}}run(t){if(this._active){const n=Ye;try{return Ye=this,t()}finally{Ye=n}}}on(){++this._on===1&&(this.prevScope=Ye,Ye=this)}off(){this._on>0&&--this._on===0&&(Ye=this.prevScope,this.prevScope=void 0)}stop(t){if(this._active){this._active=!1;let n,o;for(n=0,o=this.effects.length;n<o;n++)this.effects[n].stop();for(this.effects.length=0,n=0,o=this.cleanups.length;n<o;n++)this.cleanups[n]();if(this.cleanups.length=0,this.scopes){for(n=0,o=this.scopes.length;n<o;n++)this.scopes[n].stop(!0);this.scopes.length=0}if(!this.detached&&this.parent&&!t){const a=this.parent.scopes.pop();a&&a!==this&&(this.parent.scopes[this.index]=a,a.index=this.index)}this.parent=void 0}}}function Pa(e){return new Ta(e)}function Ra(){return Ye}function sr(e,t=!1){Ye&&Ye.cleanups.push(e)}let Ne;const kn=new WeakSet;class xa{constructor(t){this.fn=t,this.deps=void 0,this.depsTail=void 0,this.flags=5,this.next=void 0,this.cleanup=void 0,this.scheduler=void 0,Ye&&Ye.active&&Ye.effects.push(this)}pause(){this.flags|=64}resume(){this.flags&64&&(this.flags&=-65,kn.has(this)&&(kn.delete(this),this.trigger()))}notify(){this.flags&2&&!(this.flags&32)||this.flags&8||Aa(this)}run(){if(!(this.flags&1))return this.fn();this.flags|=2,$o(this),Ma(this);const t=Ne,n=ft;Ne=this,ft=!0;try{return this.fn()}finally{Ia(this),Ne=t,ft=n,this.flags&=-3}}stop(){if(this.flags&1){for(let t=this.deps;t;t=t.nextDep)ro(t);this.deps=this.depsTail=void 0,$o(this),this.onStop&&this.onStop(),this.flags&=-2}}trigger(){this.flags&64?kn.add(this):this.scheduler?this.scheduler():this.runIfDirty()}runIfDirty(){On(this)&&this.run()}get dirty(){return On(this)}}let La=0,ws,Ss;function Aa(e,t=!1){if(e.flags|=8,t){e.next=Ss,Ss=e;return}e.next=ws,ws=e}function ao(){La++}function io(){if(--La>0)return;if(Ss){let t=Ss;for(Ss=void 0;t;){const n=t.next;t.next=void 0,t.flags&=-9,t=n}}let e;for(;ws;){let t=ws;for(ws=void 0;t;){const n=t.next;if(t.next=void 0,t.flags&=-9,t.flags&1)try{t.trigger()}catch(o){e||(e=o)}t=n}}if(e)throw e}function Ma(e){for(let t=e.deps;t;t=t.nextDep)t.version=-1,t.prevActiveLink=t.dep.activeLink,t.dep.activeLink=t}function Ia(e){let t,n=e.depsTail,o=n;for(;o;){const a=o.prevDep;o.version===-1?(o===n&&(n=a),ro(o),nr(o)):t=o,o.dep.activeLink=o.prevActiveLink,o.prevActiveLink=void 0,o=a}e.deps=t,e.depsTail=n}function On(e){for(let t=e.deps;t;t=t.nextDep)if(t.dep.version!==t.version||t.dep.computed&&(Na(t.dep.computed)||t.dep.version!==t.version))return!0;return!!e._dirty}function Na(e){if(e.flags&4&&!(e.flags&16)||(e.flags&=-17,e.globalVersion===Ts)||(e.globalVersion=Ts,!e.isSSR&&e.flags&128&&(!e.deps&&!e._dirty||!On(e))))return;e.flags|=2;const t=e.dep,n=Ne,o=ft;Ne=e,ft=!0;try{Ma(e);const a=e.fn(e._value);(t.version===0||Kt(a,e._value))&&(e.flags|=128,e._value=a,t.version++)}catch(a){throw t.version++,a}finally{Ne=n,ft=o,Ia(e),e.flags&=-3}}function ro(e,t=!1){const{dep:n,prevSub:o,nextSub:a}=e;if(o&&(o.nextSub=a,e.prevSub=void 0),a&&(a.prevSub=o,e.nextSub=void 0),n.subs===e&&(n.subs=o,!o&&n.computed)){n.computed.flags&=-5;for(let i=n.computed.deps;i;i=i.nextDep)ro(i,!0)}!t&&!--n.sc&&n.map&&n.map.delete(n.key)}function nr(e){const{prevDep:t,nextDep:n}=e;t&&(t.nextDep=n,e.prevDep=void 0),n&&(n.prevDep=t,e.nextDep=void 0)}let ft=!0;const Oa=[];function Rt(){Oa.push(ft),ft=!1}function xt(){const e=Oa.pop();ft=e===void 0?!0:e}function $o(e){const{cleanup:t}=e;if(e.cleanup=void 0,t){const n=Ne;Ne=void 0;try{t()}finally{Ne=n}}}let Ts=0;class or{constructor(t,n){this.sub=t,this.dep=n,this.version=n.version,this.nextDep=this.prevDep=this.nextSub=this.prevSub=this.prevActiveLink=void 0}}class lo{constructor(t){this.computed=t,this.version=0,this.activeLink=void 0,this.subs=void 0,this.map=void 0,this.key=void 0,this.sc=0,this.__v_skip=!0}track(t){if(!Ne||!ft||Ne===this.computed)return;let n=this.activeLink;if(n===void 0||n.sub!==Ne)n=this.activeLink=new or(Ne,this),Ne.deps?(n.prevDep=Ne.depsTail,Ne.depsTail.nextDep=n,Ne.depsTail=n):Ne.deps=Ne.depsTail=n,Va(n);else if(n.version===-1&&(n.version=this.version,n.nextDep)){const o=n.nextDep;o.prevDep=n.prevDep,n.prevDep&&(n.prevDep.nextDep=o),n.prevDep=Ne.depsTail,n.nextDep=void 0,Ne.depsTail.nextDep=n,Ne.depsTail=n,Ne.deps===n&&(Ne.deps=o)}return n}trigger(t){this.version++,Ts++,this.notify(t)}notify(t){ao();try{for(let n=this.subs;n;n=n.prevSub)n.sub.notify()&&n.sub.dep.notify()}finally{io()}}}function Va(e){if(e.dep.sc++,e.sub.flags&4){const t=e.dep.computed;if(t&&!e.dep.subs){t.flags|=20;for(let o=t.deps;o;o=o.nextDep)Va(o)}const n=e.dep.subs;n!==e&&(e.prevSub=n,n&&(n.nextSub=e)),e.dep.subs=e}}const Ys=new WeakMap,Xt=Symbol(""),Vn=Symbol(""),Ps=Symbol("");function Qe(e,t,n){if(ft&&Ne){let o=Ys.get(e);o||Ys.set(e,o=new Map);let a=o.get(n);a||(o.set(n,a=new lo),a.map=o,a.key=n),a.track()}}function Et(e,t,n,o,a,i){const r=Ys.get(e);if(!r){Ts++;return}const l=d=>{d&&d.trigger()};if(ao(),t==="clear")r.forEach(l);else{const d=be(e),p=d&&so(n);if(d&&n==="length"){const g=Number(o);r.forEach((f,S)=>{(S==="length"||S===Ps||!St(S)&&S>=g)&&l(f)})}else switch((n!==void 0||r.has(void 0))&&l(r.get(n)),p&&l(r.get(Ps)),t){case"add":d?p&&l(r.get("length")):(l(r.get(Xt)),rs(e)&&l(r.get(Vn)));break;case"delete":d||(l(r.get(Xt)),rs(e)&&l(r.get(Vn)));break;case"set":rs(e)&&l(r.get(Xt));break}}io()}function ar(e,t){const n=Ys.get(e);return n&&n.get(t)}function ss(e){const t=Pe(e);return t===e?t:(Qe(t,"iterate",Ps),lt(e)?t:t.map(qe))}function dn(e){return Qe(e=Pe(e),"iterate",Ps),e}const ir={__proto__:null,[Symbol.iterator](){return Cn(this,Symbol.iterator,qe)},concat(...e){return ss(this).concat(...e.map(t=>be(t)?ss(t):t))},entries(){return Cn(this,"entries",e=>(e[1]=qe(e[1]),e))},every(e,t){return $t(this,"every",e,t,void 0,arguments)},filter(e,t){return $t(this,"filter",e,t,n=>n.map(qe),arguments)},find(e,t){return $t(this,"find",e,t,qe,arguments)},findIndex(e,t){return $t(this,"findIndex",e,t,void 0,arguments)},findLast(e,t){return $t(this,"findLast",e,t,qe,arguments)},findLastIndex(e,t){return $t(this,"findLastIndex",e,t,void 0,arguments)},forEach(e,t){return $t(this,"forEach",e,t,void 0,arguments)},includes(...e){return _n(this,"includes",e)},indexOf(...e){return _n(this,"indexOf",e)},join(e){return ss(this).join(e)},lastIndexOf(...e){return _n(this,"lastIndexOf",e)},map(e,t){return $t(this,"map",e,t,void 0,arguments)},pop(){return vs(this,"pop")},push(...e){return vs(this,"push",e)},reduce(e,...t){return ko(this,"reduce",e,t)},reduceRight(e,...t){return ko(this,"reduceRight",e,t)},shift(){return vs(this,"shift")},some(e,t){return $t(this,"some",e,t,void 0,arguments)},splice(...e){return vs(this,"splice",e)},toReversed(){return ss(this).toReversed()},toSorted(e){return ss(this).toSorted(e)},toSpliced(...e){return ss(this).toSpliced(...e)},unshift(...e){return vs(this,"unshift",e)},values(){return Cn(this,"values",qe)}};function Cn(e,t,n){const o=dn(e),a=o[t]();return o!==e&&!lt(e)&&(a._next=a.next,a.next=()=>{const i=a._next();return i.done||(i.value=n(i.value)),i}),a}const rr=Array.prototype;function $t(e,t,n,o,a,i){const r=dn(e),l=r!==e&&!lt(e),d=r[t];if(d!==rr[t]){const f=d.apply(e,i);return l?qe(f):f}let p=n;r!==e&&(l?p=function(f,S){return n.call(this,qe(f),S,e)}:n.length>2&&(p=function(f,S){return n.call(this,f,S,e)}));const g=d.call(r,p,o);return l&&a?a(g):g}function ko(e,t,n,o){const a=dn(e);let i=n;return a!==e&&(lt(e)?n.length>3&&(i=function(r,l,d){return n.call(this,r,l,d,e)}):i=function(r,l,d){return n.call(this,r,qe(l),d,e)}),a[t](i,...o)}function _n(e,t,n){const o=Pe(e);Qe(o,"iterate",Ps);const a=o[t](...n);return(a===-1||a===!1)&&fo(n[0])?(n[0]=Pe(n[0]),o[t](...n)):a}function vs(e,t,n=[]){Rt(),ao();const o=Pe(e)[t].apply(e,n);return io(),xt(),o}const lr=Zn("__proto__,__v_isRef,__isVue"),Ua=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>e!=="arguments"&&e!=="caller").map(e=>Symbol[e]).filter(St));function cr(e){St(e)||(e=String(e));const t=Pe(this);return Qe(t,"has",e),t.hasOwnProperty(e)}class Fa{constructor(t=!1,n=!1){this._isReadonly=t,this._isShallow=n}get(t,n,o){if(n==="__v_skip")return t.__v_skip;const a=this._isReadonly,i=this._isShallow;if(n==="__v_isReactive")return!a;if(n==="__v_isReadonly")return a;if(n==="__v_isShallow")return i;if(n==="__v_raw")return o===(a?i?yr:ja:i?Ba:Ha).get(t)||Object.getPrototypeOf(t)===Object.getPrototypeOf(o)?t:void 0;const r=be(t);if(!a){let d;if(r&&(d=ir[n]))return d;if(n==="hasOwnProperty")return cr}const l=Reflect.get(t,n,Be(t)?t:o);if((St(n)?Ua.has(n):lr(n))||(a||Qe(t,"get",n),i))return l;if(Be(l)){const d=r&&so(n)?l:l.value;return a&&Ie(d)?Fn(d):d}return Ie(l)?a?Fn(l):tt(l):l}}class Ka extends Fa{constructor(t=!1){super(!1,t)}set(t,n,o,a){let i=t[n];if(!this._isShallow){const d=jt(i);if(!lt(o)&&!jt(o)&&(i=Pe(i),o=Pe(o)),!be(t)&&Be(i)&&!Be(o))return d||(i.value=o),!0}const r=be(t)&&so(n)?Number(n)<t.length:Le(t,n),l=Reflect.set(t,n,o,Be(t)?t:a);return t===Pe(a)&&(r?Kt(o,i)&&Et(t,"set",n,o):Et(t,"add",n,o)),l}deleteProperty(t,n){const o=Le(t,n);t[n];const a=Reflect.deleteProperty(t,n);return a&&o&&Et(t,"delete",n,void 0),a}has(t,n){const o=Reflect.has(t,n);return(!St(n)||!Ua.has(n))&&Qe(t,"has",n),o}ownKeys(t){return Qe(t,"iterate",be(t)?"length":Xt),Reflect.ownKeys(t)}}class ur extends Fa{constructor(t=!1){super(!0,t)}set(t,n){return!0}deleteProperty(t,n){return!0}}const dr=new Ka,fr=new ur,gr=new Ka(!0);const Un=e=>e,Ks=e=>Reflect.getPrototypeOf(e);function pr(e,t,n){return function(...o){const a=this.__v_raw,i=Pe(a),r=rs(i),l=e==="entries"||e===Symbol.iterator&&r,d=e==="keys"&&r,p=a[e](...o),g=n?Un:t?Qs:qe;return!t&&Qe(i,"iterate",d?Vn:Xt),{next(){const{value:f,done:S}=p.next();return S?{value:f,done:S}:{value:l?[g(f[0]),g(f[1])]:g(f),done:S}},[Symbol.iterator](){return this}}}}function Hs(e){return function(...t){return e==="delete"?!1:e==="clear"?void 0:this}}function vr(e,t){const n={get(a){const i=this.__v_raw,r=Pe(i),l=Pe(a);e||(Kt(a,l)&&Qe(r,"get",a),Qe(r,"get",l));const{has:d}=Ks(r),p=t?Un:e?Qs:qe;if(d.call(r,a))return p(i.get(a));if(d.call(r,l))return p(i.get(l));i!==r&&i.get(a)},get size(){const a=this.__v_raw;return!e&&Qe(Pe(a),"iterate",Xt),a.size},has(a){const i=this.__v_raw,r=Pe(i),l=Pe(a);return e||(Kt(a,l)&&Qe(r,"has",a),Qe(r,"has",l)),a===l?i.has(a):i.has(a)||i.has(l)},forEach(a,i){const r=this,l=r.__v_raw,d=Pe(l),p=t?Un:e?Qs:qe;return!e&&Qe(d,"iterate",Xt),l.forEach((g,f)=>a.call(i,p(g),p(f),r))}};return Ze(n,e?{add:Hs("add"),set:Hs("set"),delete:Hs("delete"),clear:Hs("clear")}:{add(a){!t&&!lt(a)&&!jt(a)&&(a=Pe(a));const i=Pe(this);return Ks(i).has.call(i,a)||(i.add(a),Et(i,"add",a,a)),this},set(a,i){!t&&!lt(i)&&!jt(i)&&(i=Pe(i));const r=Pe(this),{has:l,get:d}=Ks(r);let p=l.call(r,a);p||(a=Pe(a),p=l.call(r,a));const g=d.call(r,a);return r.set(a,i),p?Kt(i,g)&&Et(r,"set",a,i):Et(r,"add",a,i),this},delete(a){const i=Pe(this),{has:r,get:l}=Ks(i);let d=r.call(i,a);d||(a=Pe(a),d=r.call(i,a)),l&&l.call(i,a);const p=i.delete(a);return d&&Et(i,"delete",a,void 0),p},clear(){const a=Pe(this),i=a.size!==0,r=a.clear();return i&&Et(a,"clear",void 0,void 0),r}}),["keys","values","entries",Symbol.iterator].forEach(a=>{n[a]=pr(a,e,t)}),n}function co(e,t){const n=vr(e,t);return(o,a,i)=>a==="__v_isReactive"?!e:a==="__v_isReadonly"?e:a==="__v_raw"?o:Reflect.get(Le(n,a)&&a in o?n:o,a,i)}const mr={get:co(!1,!1)},br={get:co(!1,!0)},hr={get:co(!0,!1)};const Ha=new WeakMap,Ba=new WeakMap,ja=new WeakMap,yr=new WeakMap;function wr(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function Sr(e){return e.__v_skip||!Object.isExtensible(e)?0:wr(zi(e))}function tt(e){return jt(e)?e:uo(e,!1,dr,mr,Ha)}function Ga(e){return uo(e,!1,gr,br,Ba)}function Fn(e){return uo(e,!0,fr,hr,ja)}function uo(e,t,n,o,a){if(!Ie(e)||e.__v_raw&&!(t&&e.__v_isReactive))return e;const i=Sr(e);if(i===0)return e;const r=a.get(e);if(r)return r;const l=new Proxy(e,i===2?o:n);return a.set(e,l),l}function Ht(e){return jt(e)?Ht(e.__v_raw):!!(e&&e.__v_isReactive)}function jt(e){return!!(e&&e.__v_isReadonly)}function lt(e){return!!(e&&e.__v_isShallow)}function fo(e){return e?!!e.__v_raw:!1}function Pe(e){const t=e&&e.__v_raw;return t?Pe(t):e}function Rs(e){return!Le(e,"__v_skip")&&Object.isExtensible(e)&&ka(e,"__v_skip",!0),e}const qe=e=>Ie(e)?tt(e):e,Qs=e=>Ie(e)?Fn(e):e;function Be(e){return e?e.__v_isRef===!0:!1}function H(e){return za(e,!1)}function Dr(e){return za(e,!0)}function za(e,t){return Be(e)?e:new $r(e,t)}class $r{constructor(t,n){this.dep=new lo,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=n?t:Pe(t),this._value=n?t:qe(t),this.__v_isShallow=n}get value(){return this.dep.track(),this._value}set value(t){const n=this._rawValue,o=this.__v_isShallow||lt(t)||jt(t);t=o?t:Pe(t),Kt(t,n)&&(this._rawValue=t,this._value=o?t:qe(t),this.dep.trigger())}}function We(e){return Be(e)?e.value:e}const kr={get:(e,t,n)=>t==="__v_raw"?e:We(Reflect.get(e,t,n)),set:(e,t,n,o)=>{const a=e[t];return Be(a)&&!Be(n)?(a.value=n,!0):Reflect.set(e,t,n,o)}};function Wa(e){return Ht(e)?e:new Proxy(e,kr)}function Cr(e){const t=be(e)?new Array(e.length):{};for(const n in e)t[n]=Er(e,n);return t}class _r{constructor(t,n,o){this._object=t,this._key=n,this._defaultValue=o,this.__v_isRef=!0,this._value=void 0}get value(){const t=this._object[this._key];return this._value=t===void 0?this._defaultValue:t}set value(t){this._object[this._key]=t}get dep(){return ar(Pe(this._object),this._key)}}function Er(e,t,n){const o=e[t];return Be(o)?o:new _r(e,t,n)}class Tr{constructor(t,n,o){this.fn=t,this.setter=n,this._value=void 0,this.dep=new lo(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=Ts-1,this.next=void 0,this.effect=this,this.__v_isReadonly=!n,this.isSSR=o}notify(){if(this.flags|=16,!(this.flags&8)&&Ne!==this)return Aa(this,!0),!0}get value(){const t=this.dep.track();return Na(this),t&&(t.version=this.dep.version),this._value}set value(t){this.setter&&this.setter(t)}}function Pr(e,t,n=!1){let o,a;return we(e)?o=e:(o=e.get,a=e.set),new Tr(o,a,n)}const Bs={},Xs=new WeakMap;let Yt;function Rr(e,t=!1,n=Yt){if(n){let o=Xs.get(n);o||Xs.set(n,o=[]),o.push(e)}}function xr(e,t,n=Me){const{immediate:o,deep:a,once:i,scheduler:r,augmentJob:l,call:d}=n,p=ee=>a?ee:lt(ee)||a===!1||a===0?Tt(ee,1):Tt(ee);let g,f,S,D,M=!1,z=!1;if(Be(e)?(f=()=>e.value,M=lt(e)):Ht(e)?(f=()=>p(e),M=!0):be(e)?(z=!0,M=e.some(ee=>Ht(ee)||lt(ee)),f=()=>e.map(ee=>{if(Be(ee))return ee.value;if(Ht(ee))return p(ee);if(we(ee))return d?d(ee,2):ee()})):we(e)?t?f=d?()=>d(e,2):e:f=()=>{if(S){Rt();try{S()}finally{xt()}}const ee=Yt;Yt=g;try{return d?d(e,3,[D]):e(D)}finally{Yt=ee}}:f=yt,t&&a){const ee=f,ce=a===!0?1/0:a;f=()=>Tt(ee(),ce)}const B=Ra(),Y=()=>{g.stop(),B&&B.active&&to(B.effects,g)};if(i&&t){const ee=t;t=(...ce)=>{ee(...ce),Y()}}let q=z?new Array(e.length).fill(Bs):Bs;const Z=ee=>{if(!(!(g.flags&1)||!g.dirty&&!ee))if(t){const ce=g.run();if(a||M||(z?ce.some((ye,pe)=>Kt(ye,q[pe])):Kt(ce,q))){S&&S();const ye=Yt;Yt=g;try{const pe=[ce,q===Bs?void 0:z&&q[0]===Bs?[]:q,D];q=ce,d?d(t,3,pe):t(...pe)}finally{Yt=ye}}}else g.run()};return l&&l(Z),g=new xa(f),g.scheduler=r?()=>r(Z,!1):Z,D=ee=>Rr(ee,!1,g),S=g.onStop=()=>{const ee=Xs.get(g);if(ee){if(d)d(ee,4);else for(const ce of ee)ce();Xs.delete(g)}},t?o?Z(!0):q=g.run():r?r(Z.bind(null,!0),!0):g.run(),Y.pause=g.pause.bind(g),Y.resume=g.resume.bind(g),Y.stop=Y,Y}function Tt(e,t=1/0,n){if(t<=0||!Ie(e)||e.__v_skip||(n=n||new Map,(n.get(e)||0)>=t))return e;if(n.set(e,t),t--,Be(e))Tt(e.value,t,n);else if(be(e))for(let o=0;o<e.length;o++)Tt(e[o],t,n);else if(gs(e)||rs(e))e.forEach(o=>{Tt(o,t,n)});else if($a(e)){for(const o in e)Tt(e[o],t,n);for(const o of Object.getOwnPropertySymbols(e))Object.prototype.propertyIsEnumerable.call(e,o)&&Tt(e[o],t,n)}return e}/**
* @vue/runtime-core v3.5.22
* (c) 2018-present Yuxi (Evan) You and Vue contributors
* @license MIT
**/function Vs(e,t,n,o){try{return o?e(...o):e()}catch(a){fn(a,t,n)}}function Dt(e,t,n,o){if(we(e)){const a=Vs(e,t,n,o);return a&&Sa(a)&&a.catch(i=>{fn(i,t,n)}),a}if(be(e)){const a=[];for(let i=0;i<e.length;i++)a.push(Dt(e[i],t,n,o));return a}}function fn(e,t,n,o=!0){const a=t?t.vnode:null,{errorHandler:i,throwUnhandledErrorInProduction:r}=t&&t.appContext.config||Me;if(t){let l=t.parent;const d=t.proxy,p=`https://vuejs.org/error-reference/#runtime-${n}`;for(;l;){const g=l.ec;if(g){for(let f=0;f<g.length;f++)if(g[f](e,d,p)===!1)return}l=l.parent}if(i){Rt(),Vs(i,null,10,[e,d,p]),xt();return}}Lr(e,n,a,o,r)}function Lr(e,t,n,o=!0,a=!1){if(a)throw e;console.error(e)}const nt=[];let bt=-1;const ls=[];let Ot=null,os=0;const Ja=Promise.resolve();let Zs=null;function es(e){const t=Zs||Ja;return e?t.then(this?e.bind(this):e):t}function Ar(e){let t=bt+1,n=nt.length;for(;t<n;){const o=t+n>>>1,a=nt[o],i=xs(a);i<e||i===e&&a.flags&2?t=o+1:n=o}return t}function go(e){if(!(e.flags&1)){const t=xs(e),n=nt[nt.length-1];!n||!(e.flags&2)&&t>=xs(n)?nt.push(e):nt.splice(Ar(t),0,e),e.flags|=1,qa()}}function qa(){Zs||(Zs=Ja.then(Qa))}function Mr(e){be(e)?ls.push(...e):Ot&&e.id===-1?Ot.splice(os+1,0,e):e.flags&1||(ls.push(e),e.flags|=1),qa()}function Co(e,t,n=bt+1){for(;n<nt.length;n++){const o=nt[n];if(o&&o.flags&2){if(e&&o.id!==e.uid)continue;nt.splice(n,1),n--,o.flags&4&&(o.flags&=-2),o(),o.flags&4||(o.flags&=-2)}}}function Ya(e){if(ls.length){const t=[...new Set(ls)].sort((n,o)=>xs(n)-xs(o));if(ls.length=0,Ot){Ot.push(...t);return}for(Ot=t,os=0;os<Ot.length;os++){const n=Ot[os];n.flags&4&&(n.flags&=-2),n.flags&8||n(),n.flags&=-2}Ot=null,os=0}}const xs=e=>e.id==null?e.flags&2?-1:1/0:e.id;function Qa(e){try{for(bt=0;bt<nt.length;bt++){const t=nt[bt];t&&!(t.flags&8)&&(t.flags&4&&(t.flags&=-2),Vs(t,t.i,t.i?15:14),t.flags&4||(t.flags&=-2))}}finally{for(;bt<nt.length;bt++){const t=nt[bt];t&&(t.flags&=-2)}bt=-1,nt.length=0,Ya(),Zs=null,(nt.length||ls.length)&&Qa()}}let it=null,Xa=null;function en(e){const t=it;return it=e,Xa=e&&e.type.__scopeId||null,t}function Ct(e,t=it,n){if(!t||e._n)return e;const o=(...a)=>{o._d&&nn(-1);const i=en(t);let r;try{r=e(...a)}finally{en(i),o._d&&nn(1)}return r};return o._n=!0,o._c=!0,o._d=!0,o}function ae(e,t){if(it===null)return e;const n=mn(it),o=e.dirs||(e.dirs=[]);for(let a=0;a<t.length;a++){let[i,r,l,d=Me]=t[a];i&&(we(i)&&(i={mounted:i,updated:i}),i.deep&&Tt(r),o.push({dir:i,instance:n,value:r,oldValue:void 0,arg:l,modifiers:d}))}return e}function Jt(e,t,n,o){const a=e.dirs,i=t&&t.dirs;for(let r=0;r<a.length;r++){const l=a[r];i&&(l.oldValue=i[r].value);let d=l.dir[o];d&&(Rt(),Dt(d,n,8,[e.el,l,e,t]),xt())}}const Ir=Symbol("_vte"),Nr=e=>e.__isTeleport,Or=Symbol("_leaveCb");function po(e,t){e.shapeFlag&6&&e.component?(e.transition=t,po(e.component.subTree,t)):e.shapeFlag&128?(e.ssContent.transition=t.clone(e.ssContent),e.ssFallback.transition=t.clone(e.ssFallback)):e.transition=t}function Za(e,t){return we(e)?Ze({name:e.name},t,{setup:e}):e}function ei(e){e.ids=[e.ids[0]+e.ids[2]+++"-",0,0]}const tn=new WeakMap;function Ds(e,t,n,o,a=!1){if(be(e)){e.forEach((M,z)=>Ds(M,t&&(be(t)?t[z]:t),n,o,a));return}if($s(o)&&!a){o.shapeFlag&512&&o.type.__asyncResolved&&o.component.subTree.component&&Ds(e,t,n,o.component.subTree);return}const i=o.shapeFlag&4?mn(o.component):o.el,r=a?null:i,{i:l,r:d}=e,p=t&&t.r,g=l.refs===Me?l.refs={}:l.refs,f=l.setupState,S=Pe(f),D=f===Me?wa:M=>Le(S,M);if(p!=null&&p!==d){if(_o(t),je(p))g[p]=null,D(p)&&(f[p]=null);else if(Be(p)){p.value=null;const M=t;M.k&&(g[M.k]=null)}}if(we(d))Vs(d,l,12,[r,g]);else{const M=je(d),z=Be(d);if(M||z){const B=()=>{if(e.f){const Y=M?D(d)?f[d]:g[d]:d.value;if(a)be(Y)&&to(Y,i);else if(be(Y))Y.includes(i)||Y.push(i);else if(M)g[d]=[i],D(d)&&(f[d]=g[d]);else{const q=[i];d.value=q,e.k&&(g[e.k]=q)}}else M?(g[d]=r,D(d)&&(f[d]=r)):z&&(d.value=r,e.k&&(g[e.k]=r))};if(r){const Y=()=>{B(),tn.delete(e)};Y.id=-1,tn.set(e,Y),at(Y,n)}else _o(e),B()}}}function _o(e){const t=tn.get(e);t&&(t.flags|=8,tn.delete(e))}un().requestIdleCallback;un().cancelIdleCallback;const $s=e=>!!e.type.__asyncLoader,ti=e=>e.type.__isKeepAlive;function Vr(e,t){si(e,"a",t)}function Ur(e,t){si(e,"da",t)}function si(e,t,n=Xe){const o=e.__wdc||(e.__wdc=()=>{let a=n;for(;a;){if(a.isDeactivated)return;a=a.parent}return e()});if(gn(t,o,n),n){let a=n.parent;for(;a&&a.parent;)ti(a.parent.vnode)&&Fr(o,t,n,a),a=a.parent}}function Fr(e,t,n,o){const a=gn(t,e,o,!0);Us(()=>{to(o[t],a)},n)}function gn(e,t,n=Xe,o=!1){if(n){const a=n[e]||(n[e]=[]),i=t.__weh||(t.__weh=(...r)=>{Rt();const l=Fs(n),d=Dt(t,n,e,r);return l(),xt(),d});return o?a.unshift(i):a.push(i),i}}const Lt=e=>(t,n=Xe)=>{(!As||e==="sp")&&gn(e,(...o)=>t(...o),n)},Kr=Lt("bm"),Wt=Lt("m"),Hr=Lt("bu"),Br=Lt("u"),jr=Lt("bum"),Us=Lt("um"),Gr=Lt("sp"),zr=Lt("rtg"),Wr=Lt("rtc");function Jr(e,t=Xe){gn("ec",e,t)}const qr="components";function Eo(e,t){return Qr(qr,e,!0,t)||e}const Yr=Symbol.for("v-ndc");function Qr(e,t,n=!0,o=!1){const a=it||Xe;if(a){const i=a.type;{const l=Fl(i,!1);if(l&&(l===t||l===ct(t)||l===cn(ct(t))))return i}const r=To(a[e]||i[e],t)||To(a.appContext[e],t);return!r&&o?i:r}}function To(e,t){return e&&(e[t]||e[ct(t)]||e[cn(ct(t))])}function Oe(e,t,n,o){let a;const i=n,r=be(e);if(r||je(e)){const l=r&&Ht(e);let d=!1,p=!1;l&&(d=!lt(e),p=jt(e),e=dn(e)),a=new Array(e.length);for(let g=0,f=e.length;g<f;g++)a[g]=t(d?p?Qs(qe(e[g])):qe(e[g]):e[g],g,void 0,i)}else if(typeof e=="number"){a=new Array(e);for(let l=0;l<e;l++)a[l]=t(l+1,l,void 0,i)}else if(Ie(e))if(e[Symbol.iterator])a=Array.from(e,(l,d)=>t(l,d,void 0,i));else{const l=Object.keys(e);a=new Array(l.length);for(let d=0,p=l.length;d<p;d++){const g=l[d];a[d]=t(e[g],g,d,i)}}else a=[];return a}const Kn=e=>e?$i(e)?mn(e):Kn(e.parent):null,ks=Ze(Object.create(null),{$:e=>e,$el:e=>e.vnode.el,$data:e=>e.data,$props:e=>e.props,$attrs:e=>e.attrs,$slots:e=>e.slots,$refs:e=>e.refs,$parent:e=>Kn(e.parent),$root:e=>Kn(e.root),$host:e=>e.ce,$emit:e=>e.emit,$options:e=>oi(e),$forceUpdate:e=>e.f||(e.f=()=>{go(e.update)}),$nextTick:e=>e.n||(e.n=es.bind(e.proxy)),$watch:e=>yl.bind(e)}),En=(e,t)=>e!==Me&&!e.__isScriptSetup&&Le(e,t),Xr={get({_:e},t){if(t==="__v_skip")return!0;const{ctx:n,setupState:o,data:a,props:i,accessCache:r,type:l,appContext:d}=e;let p;if(t[0]!=="$"){const D=r[t];if(D!==void 0)switch(D){case 1:return o[t];case 2:return a[t];case 4:return n[t];case 3:return i[t]}else{if(En(o,t))return r[t]=1,o[t];if(a!==Me&&Le(a,t))return r[t]=2,a[t];if((p=e.propsOptions[0])&&Le(p,t))return r[t]=3,i[t];if(n!==Me&&Le(n,t))return r[t]=4,n[t];Hn&&(r[t]=0)}}const g=ks[t];let f,S;if(g)return t==="$attrs"&&Qe(e.attrs,"get",""),g(e);if((f=l.__cssModules)&&(f=f[t]))return f;if(n!==Me&&Le(n,t))return r[t]=4,n[t];if(S=d.config.globalProperties,Le(S,t))return S[t]},set({_:e},t,n){const{data:o,setupState:a,ctx:i}=e;return En(a,t)?(a[t]=n,!0):o!==Me&&Le(o,t)?(o[t]=n,!0):Le(e.props,t)||t[0]==="$"&&t.slice(1)in e?!1:(i[t]=n,!0)},has({_:{data:e,setupState:t,accessCache:n,ctx:o,appContext:a,propsOptions:i,type:r}},l){let d,p;return!!(n[l]||e!==Me&&l[0]!=="$"&&Le(e,l)||En(t,l)||(d=i[0])&&Le(d,l)||Le(o,l)||Le(ks,l)||Le(a.config.globalProperties,l)||(p=r.__cssModules)&&p[l])},defineProperty(e,t,n){return n.get!=null?e._.accessCache[t]=0:Le(n,"value")&&this.set(e,t,n.value,null),Reflect.defineProperty(e,t,n)}};function Po(e){return be(e)?e.reduce((t,n)=>(t[n]=null,t),{}):e}let Hn=!0;function Zr(e){const t=oi(e),n=e.proxy,o=e.ctx;Hn=!1,t.beforeCreate&&Ro(t.beforeCreate,e,"bc");const{data:a,computed:i,methods:r,watch:l,provide:d,inject:p,created:g,beforeMount:f,mounted:S,beforeUpdate:D,updated:M,activated:z,deactivated:B,beforeDestroy:Y,beforeUnmount:q,destroyed:Z,unmounted:ee,render:ce,renderTracked:ye,renderTriggered:pe,errorCaptured:ue,serverPrefetch:se,expose:V,inheritAttrs:F,components:j,directives:le,filters:Se}=t;if(p&&el(p,o,null),r)for(const J in r){const ve=r[J];we(ve)&&(o[J]=ve.bind(n))}if(a){const J=a.call(n,n);Ie(J)&&(e.data=tt(J))}if(Hn=!0,i)for(const J in i){const ve=i[J],$e=we(ve)?ve.bind(n,n):we(ve.get)?ve.get.bind(n,n):yt,Ee=!we(ve)&&we(ve.set)?ve.set.bind(n):yt,Ve=ge({get:$e,set:Ee});Object.defineProperty(o,J,{enumerable:!0,configurable:!0,get:()=>Ve.value,set:Ae=>Ve.value=Ae})}if(l)for(const J in l)ni(l[J],o,n,J);if(d){const J=we(d)?d.call(n):d;Reflect.ownKeys(J).forEach(ve=>{Gs(ve,J[ve])})}g&&Ro(g,e,"c");function y(J,ve){be(ve)?ve.forEach($e=>J($e.bind(n))):ve&&J(ve.bind(n))}if(y(Kr,f),y(Wt,S),y(Hr,D),y(Br,M),y(Vr,z),y(Ur,B),y(Jr,ue),y(Wr,ye),y(zr,pe),y(jr,q),y(Us,ee),y(Gr,se),be(V))if(V.length){const J=e.exposed||(e.exposed={});V.forEach(ve=>{Object.defineProperty(J,ve,{get:()=>n[ve],set:$e=>n[ve]=$e,enumerable:!0})})}else e.exposed||(e.exposed={});ce&&e.render===yt&&(e.render=ce),F!=null&&(e.inheritAttrs=F),j&&(e.components=j),le&&(e.directives=le),se&&ei(e)}function el(e,t,n=yt){be(e)&&(e=Bn(e));for(const o in e){const a=e[o];let i;Ie(a)?"default"in a?i=wt(a.from||o,a.default,!0):i=wt(a.from||o):i=wt(a),Be(i)?Object.defineProperty(t,o,{enumerable:!0,configurable:!0,get:()=>i.value,set:r=>i.value=r}):t[o]=i}}function Ro(e,t,n){Dt(be(e)?e.map(o=>o.bind(t.proxy)):e.bind(t.proxy),t,n)}function ni(e,t,n,o){let a=o.includes(".")?bi(n,o):()=>n[o];if(je(e)){const i=t[e];we(i)&&Bt(a,i)}else if(we(e))Bt(a,e.bind(n));else if(Ie(e))if(be(e))e.forEach(i=>ni(i,t,n,o));else{const i=we(e.handler)?e.handler.bind(n):t[e.handler];we(i)&&Bt(a,i,e)}}function oi(e){const t=e.type,{mixins:n,extends:o}=t,{mixins:a,optionsCache:i,config:{optionMergeStrategies:r}}=e.appContext,l=i.get(t);let d;return l?d=l:!a.length&&!n&&!o?d=t:(d={},a.length&&a.forEach(p=>sn(d,p,r,!0)),sn(d,t,r)),Ie(t)&&i.set(t,d),d}function sn(e,t,n,o=!1){const{mixins:a,extends:i}=t;i&&sn(e,i,n,!0),a&&a.forEach(r=>sn(e,r,n,!0));for(const r in t)if(!(o&&r==="expose")){const l=tl[r]||n&&n[r];e[r]=l?l(e[r],t[r]):t[r]}return e}const tl={data:xo,props:Lo,emits:Lo,methods:hs,computed:hs,beforeCreate:et,created:et,beforeMount:et,mounted:et,beforeUpdate:et,updated:et,beforeDestroy:et,beforeUnmount:et,destroyed:et,unmounted:et,activated:et,deactivated:et,errorCaptured:et,serverPrefetch:et,components:hs,directives:hs,watch:nl,provide:xo,inject:sl};function xo(e,t){return t?e?function(){return Ze(we(e)?e.call(this,this):e,we(t)?t.call(this,this):t)}:t:e}function sl(e,t){return hs(Bn(e),Bn(t))}function Bn(e){if(be(e)){const t={};for(let n=0;n<e.length;n++)t[e[n]]=e[n];return t}return e}function et(e,t){return e?[...new Set([].concat(e,t))]:t}function hs(e,t){return e?Ze(Object.create(null),e,t):t}function Lo(e,t){return e?be(e)&&be(t)?[...new Set([...e,...t])]:Ze(Object.create(null),Po(e),Po(t??{})):t}function nl(e,t){if(!e)return t;if(!t)return e;const n=Ze(Object.create(null),e);for(const o in t)n[o]=et(e[o],t[o]);return n}function ai(){return{app:null,config:{isNativeTag:wa,performance:!1,globalProperties:{},optionMergeStrategies:{},errorHandler:void 0,warnHandler:void 0,compilerOptions:{}},mixins:[],components:{},directives:{},provides:Object.create(null),optionsCache:new WeakMap,propsCache:new WeakMap,emitsCache:new WeakMap}}let ol=0;function al(e,t){return function(o,a=null){we(o)||(o=Ze({},o)),a!=null&&!Ie(a)&&(a=null);const i=ai(),r=new WeakSet,l=[];let d=!1;const p=i.app={_uid:ol++,_component:o,_props:a,_container:null,_context:i,_instance:null,version:Hl,get config(){return i.config},set config(g){},use(g,...f){return r.has(g)||(g&&we(g.install)?(r.add(g),g.install(p,...f)):we(g)&&(r.add(g),g(p,...f))),p},mixin(g){return i.mixins.includes(g)||i.mixins.push(g),p},component(g,f){return f?(i.components[g]=f,p):i.components[g]},directive(g,f){return f?(i.directives[g]=f,p):i.directives[g]},mount(g,f,S){if(!d){const D=p._ceVNode||Ue(o,a);return D.appContext=i,S===!0?S="svg":S===!1&&(S=void 0),e(D,g,S),d=!0,p._container=g,g.__vue_app__=p,mn(D.component)}},onUnmount(g){l.push(g)},unmount(){d&&(Dt(l,p._instance,16),e(null,p._container),delete p._container.__vue_app__)},provide(g,f){return i.provides[g]=f,p},runWithContext(g){const f=Zt;Zt=p;try{return g()}finally{Zt=f}}};return p}}let Zt=null;function Gs(e,t){if(Xe){let n=Xe.provides;const o=Xe.parent&&Xe.parent.provides;o===n&&(n=Xe.provides=Object.create(o)),n[e]=t}}function wt(e,t,n=!1){const o=Di();if(o||Zt){let a=Zt?Zt._context.provides:o?o.parent==null||o.ce?o.vnode.appContext&&o.vnode.appContext.provides:o.parent.provides:void 0;if(a&&e in a)return a[e];if(arguments.length>1)return n&&we(t)?t.call(o&&o.proxy):t}}function il(){return!!(Di()||Zt)}const ii={},ri=()=>Object.create(ii),li=e=>Object.getPrototypeOf(e)===ii;function rl(e,t,n,o=!1){const a={},i=ri();e.propsDefaults=Object.create(null),ci(e,t,a,i);for(const r in e.propsOptions[0])r in a||(a[r]=void 0);n?e.props=o?a:Ga(a):e.type.props?e.props=a:e.props=i,e.attrs=i}function ll(e,t,n,o){const{props:a,attrs:i,vnode:{patchFlag:r}}=e,l=Pe(a),[d]=e.propsOptions;let p=!1;if((o||r>0)&&!(r&16)){if(r&8){const g=e.vnode.dynamicProps;for(let f=0;f<g.length;f++){let S=g[f];if(pn(e.emitsOptions,S))continue;const D=t[S];if(d)if(Le(i,S))D!==i[S]&&(i[S]=D,p=!0);else{const M=ct(S);a[M]=jn(d,l,M,D,e,!1)}else D!==i[S]&&(i[S]=D,p=!0)}}}else{ci(e,t,a,i)&&(p=!0);let g;for(const f in l)(!t||!Le(t,f)&&((g=zt(f))===f||!Le(t,g)))&&(d?n&&(n[f]!==void 0||n[g]!==void 0)&&(a[f]=jn(d,l,f,void 0,e,!0)):delete a[f]);if(i!==l)for(const f in i)(!t||!Le(t,f))&&(delete i[f],p=!0)}p&&Et(e.attrs,"set","")}function ci(e,t,n,o){const[a,i]=e.propsOptions;let r=!1,l;if(t)for(let d in t){if(ys(d))continue;const p=t[d];let g;a&&Le(a,g=ct(d))?!i||!i.includes(g)?n[g]=p:(l||(l={}))[g]=p:pn(e.emitsOptions,d)||(!(d in o)||p!==o[d])&&(o[d]=p,r=!0)}if(i){const d=Pe(n),p=l||Me;for(let g=0;g<i.length;g++){const f=i[g];n[f]=jn(a,d,f,p[f],e,!Le(p,f))}}return r}function jn(e,t,n,o,a,i){const r=e[n];if(r!=null){const l=Le(r,"default");if(l&&o===void 0){const d=r.default;if(r.type!==Function&&!r.skipFactory&&we(d)){const{propsDefaults:p}=a;if(n in p)o=p[n];else{const g=Fs(a);o=p[n]=d.call(null,t),g()}}else o=d;a.ce&&a.ce._setProp(n,o)}r[0]&&(i&&!l?o=!1:r[1]&&(o===""||o===zt(n))&&(o=!0))}return o}const cl=new WeakMap;function ui(e,t,n=!1){const o=n?cl:t.propsCache,a=o.get(e);if(a)return a;const i=e.props,r={},l=[];let d=!1;if(!we(e)){const g=f=>{d=!0;const[S,D]=ui(f,t,!0);Ze(r,S),D&&l.push(...D)};!n&&t.mixins.length&&t.mixins.forEach(g),e.extends&&g(e.extends),e.mixins&&e.mixins.forEach(g)}if(!i&&!d)return Ie(e)&&o.set(e,is),is;if(be(i))for(let g=0;g<i.length;g++){const f=ct(i[g]);Ao(f)&&(r[f]=Me)}else if(i)for(const g in i){const f=ct(g);if(Ao(f)){const S=i[g],D=r[f]=be(S)||we(S)?{type:S}:Ze({},S),M=D.type;let z=!1,B=!0;if(be(M))for(let Y=0;Y<M.length;++Y){const q=M[Y],Z=we(q)&&q.name;if(Z==="Boolean"){z=!0;break}else Z==="String"&&(B=!1)}else z=we(M)&&M.name==="Boolean";D[0]=z,D[1]=B,(z||Le(D,"default"))&&l.push(f)}}const p=[r,l];return Ie(e)&&o.set(e,p),p}function Ao(e){return e[0]!=="$"&&!ys(e)}const vo=e=>e==="_"||e==="_ctx"||e==="$stable",mo=e=>be(e)?e.map(ht):[ht(e)],ul=(e,t,n)=>{if(t._n)return t;const o=Ct((...a)=>mo(t(...a)),n);return o._c=!1,o},di=(e,t,n)=>{const o=e._ctx;for(const a in e){if(vo(a))continue;const i=e[a];if(we(i))t[a]=ul(a,i,o);else if(i!=null){const r=mo(i);t[a]=()=>r}}},fi=(e,t)=>{const n=mo(t);e.slots.default=()=>n},gi=(e,t,n)=>{for(const o in t)(n||!vo(o))&&(e[o]=t[o])},dl=(e,t,n)=>{const o=e.slots=ri();if(e.vnode.shapeFlag&32){const a=t._;a?(gi(o,t,n),n&&ka(o,"_",a,!0)):di(t,o)}else t&&fi(e,t)},fl=(e,t,n)=>{const{vnode:o,slots:a}=e;let i=!0,r=Me;if(o.shapeFlag&32){const l=t._;l?n&&l===1?i=!1:gi(a,t,n):(i=!t.$stable,di(t,a)),r=t}else t&&(fi(e,t),r={default:1});if(i)for(const l in a)!vo(l)&&r[l]==null&&delete a[l]},at=El;function gl(e){return pl(e)}function pl(e,t){const n=un();n.__VUE__=!0;const{insert:o,remove:a,patchProp:i,createElement:r,createText:l,createComment:d,setText:p,setElementText:g,parentNode:f,nextSibling:S,setScopeId:D=yt,insertStaticContent:M}=e,z=(v,b,C,O=null,K=null,N=null,oe=void 0,te=null,T=!!b.dynamicChildren)=>{if(v===b)return;v&&!ms(v,b)&&(O=u(v),Ae(v,K,N,!0),v=null),b.patchFlag===-2&&(T=!1,b.dynamicChildren=null);const{type:c,ref:_,shapeFlag:Q}=b;switch(c){case vn:B(v,b,C,O);break;case Gt:Y(v,b,C,O);break;case zs:v==null&&q(b,C,O,oe);break;case _e:j(v,b,C,O,K,N,oe,te,T);break;default:Q&1?ce(v,b,C,O,K,N,oe,te,T):Q&6?le(v,b,C,O,K,N,oe,te,T):(Q&64||Q&128)&&c.process(v,b,C,O,K,N,oe,te,T,w)}_!=null&&K?Ds(_,v&&v.ref,N,b||v,!b):_==null&&v&&v.ref!=null&&Ds(v.ref,null,N,v,!0)},B=(v,b,C,O)=>{if(v==null)o(b.el=l(b.children),C,O);else{const K=b.el=v.el;b.children!==v.children&&p(K,b.children)}},Y=(v,b,C,O)=>{v==null?o(b.el=d(b.children||""),C,O):b.el=v.el},q=(v,b,C,O)=>{[v.el,v.anchor]=M(v.children,b,C,O,v.el,v.anchor)},Z=({el:v,anchor:b},C,O)=>{let K;for(;v&&v!==b;)K=S(v),o(v,C,O),v=K;o(b,C,O)},ee=({el:v,anchor:b})=>{let C;for(;v&&v!==b;)C=S(v),a(v),v=C;a(b)},ce=(v,b,C,O,K,N,oe,te,T)=>{b.type==="svg"?oe="svg":b.type==="math"&&(oe="mathml"),v==null?ye(b,C,O,K,N,oe,te,T):se(v,b,K,N,oe,te,T)},ye=(v,b,C,O,K,N,oe,te)=>{let T,c;const{props:_,shapeFlag:Q,transition:ie,dirs:fe}=v;if(T=v.el=r(v.type,N,_&&_.is,_),Q&8?g(T,v.children):Q&16&&ue(v.children,T,null,O,K,Tn(v,N),oe,te),fe&&Jt(v,null,O,"created"),pe(T,v,v.scopeId,oe,O),_){for(const h in _)h!=="value"&&!ys(h)&&i(T,h,null,_[h],N,O);"value"in _&&i(T,"value",null,_.value,N),(c=_.onVnodeBeforeMount)&&mt(c,O,v)}fe&&Jt(v,null,O,"beforeMount");const U=vl(K,ie);U&&ie.beforeEnter(T),o(T,b,C),((c=_&&_.onVnodeMounted)||U||fe)&&at(()=>{c&&mt(c,O,v),U&&ie.enter(T),fe&&Jt(v,null,O,"mounted")},K)},pe=(v,b,C,O,K)=>{if(C&&D(v,C),O)for(let N=0;N<O.length;N++)D(v,O[N]);if(K){let N=K.subTree;if(b===N||yi(N.type)&&(N.ssContent===b||N.ssFallback===b)){const oe=K.vnode;pe(v,oe,oe.scopeId,oe.slotScopeIds,K.parent)}}},ue=(v,b,C,O,K,N,oe,te,T=0)=>{for(let c=T;c<v.length;c++){const _=v[c]=te?Vt(v[c]):ht(v[c]);z(null,_,b,C,O,K,N,oe,te)}},se=(v,b,C,O,K,N,oe)=>{const te=b.el=v.el;let{patchFlag:T,dynamicChildren:c,dirs:_}=b;T|=v.patchFlag&16;const Q=v.props||Me,ie=b.props||Me;let fe;if(C&&qt(C,!1),(fe=ie.onVnodeBeforeUpdate)&&mt(fe,C,b,v),_&&Jt(b,v,C,"beforeUpdate"),C&&qt(C,!0),(Q.innerHTML&&ie.innerHTML==null||Q.textContent&&ie.textContent==null)&&g(te,""),c?V(v.dynamicChildren,c,te,C,O,Tn(b,K),N):oe||ve(v,b,te,null,C,O,Tn(b,K),N,!1),T>0){if(T&16)F(te,Q,ie,C,K);else if(T&2&&Q.class!==ie.class&&i(te,"class",null,ie.class,K),T&4&&i(te,"style",Q.style,ie.style,K),T&8){const U=b.dynamicProps;for(let h=0;h<U.length;h++){const G=U[h],me=Q[G],he=ie[G];(he!==me||G==="value")&&i(te,G,me,he,K,C)}}T&1&&v.children!==b.children&&g(te,b.children)}else!oe&&c==null&&F(te,Q,ie,C,K);((fe=ie.onVnodeUpdated)||_)&&at(()=>{fe&&mt(fe,C,b,v),_&&Jt(b,v,C,"updated")},O)},V=(v,b,C,O,K,N,oe)=>{for(let te=0;te<b.length;te++){const T=v[te],c=b[te],_=T.el&&(T.type===_e||!ms(T,c)||T.shapeFlag&198)?f(T.el):C;z(T,c,_,null,O,K,N,oe,!0)}},F=(v,b,C,O,K)=>{if(b!==C){if(b!==Me)for(const N in b)!ys(N)&&!(N in C)&&i(v,N,b[N],null,K,O);for(const N in C){if(ys(N))continue;const oe=C[N],te=b[N];oe!==te&&N!=="value"&&i(v,N,te,oe,K,O)}"value"in C&&i(v,"value",b.value,C.value,K)}},j=(v,b,C,O,K,N,oe,te,T)=>{const c=b.el=v?v.el:l(""),_=b.anchor=v?v.anchor:l("");let{patchFlag:Q,dynamicChildren:ie,slotScopeIds:fe}=b;fe&&(te=te?te.concat(fe):fe),v==null?(o(c,C,O),o(_,C,O),ue(b.children||[],C,_,K,N,oe,te,T)):Q>0&&Q&64&&ie&&v.dynamicChildren?(V(v.dynamicChildren,ie,C,K,N,oe,te),(b.key!=null||K&&b===K.subTree)&&pi(v,b,!0)):ve(v,b,C,_,K,N,oe,te,T)},le=(v,b,C,O,K,N,oe,te,T)=>{b.slotScopeIds=te,v==null?b.shapeFlag&512?K.ctx.activate(b,C,O,oe,T):Se(b,C,O,K,N,oe,T):re(v,b,T)},Se=(v,b,C,O,K,N,oe)=>{const te=v.component=Il(v,O,K);if(ti(v)&&(te.ctx.renderer=w),Nl(te,!1,oe),te.asyncDep){if(K&&K.registerDep(te,y,oe),!v.el){const T=te.subTree=Ue(Gt);Y(null,T,b,C),v.placeholder=T.el}}else y(te,v,b,C,K,N,oe)},re=(v,b,C)=>{const O=b.component=v.component;if(Cl(v,b,C))if(O.asyncDep&&!O.asyncResolved){J(O,b,C);return}else O.next=b,O.update();else b.el=v.el,O.vnode=b},y=(v,b,C,O,K,N,oe)=>{const te=()=>{if(v.isMounted){let{next:Q,bu:ie,u:fe,parent:U,vnode:h}=v;{const ut=vi(v);if(ut){Q&&(Q.el=h.el,J(v,Q,oe)),ut.asyncDep.then(()=>{v.isUnmounted||te()});return}}let G=Q,me;qt(v,!1),Q?(Q.el=h.el,J(v,Q,oe)):Q=h,ie&&js(ie),(me=Q.props&&Q.props.onVnodeBeforeUpdate)&&mt(me,U,Q,h),qt(v,!0);const he=Io(v),Je=v.subTree;v.subTree=he,z(Je,he,f(Je.el),u(Je),v,K,N),Q.el=he.el,G===null&&_l(v,he.el),fe&&at(fe,K),(me=Q.props&&Q.props.onVnodeUpdated)&&at(()=>mt(me,U,Q,h),K)}else{let Q;const{el:ie,props:fe}=b,{bm:U,m:h,parent:G,root:me,type:he}=v,Je=$s(b);qt(v,!1),U&&js(U),!Je&&(Q=fe&&fe.onVnodeBeforeMount)&&mt(Q,G,b),qt(v,!0);{me.ce&&me.ce._def.shadowRoot!==!1&&me.ce._injectChildStyle(he);const ut=v.subTree=Io(v);z(null,ut,C,O,v,K,N),b.el=ut.el}if(h&&at(h,K),!Je&&(Q=fe&&fe.onVnodeMounted)){const ut=b;at(()=>mt(Q,G,ut),K)}(b.shapeFlag&256||G&&$s(G.vnode)&&G.vnode.shapeFlag&256)&&v.a&&at(v.a,K),v.isMounted=!0,b=C=O=null}};v.scope.on();const T=v.effect=new xa(te);v.scope.off();const c=v.update=T.run.bind(T),_=v.job=T.runIfDirty.bind(T);_.i=v,_.id=v.uid,T.scheduler=()=>go(_),qt(v,!0),c()},J=(v,b,C)=>{b.component=v;const O=v.vnode.props;v.vnode=b,v.next=null,ll(v,b.props,O,C),fl(v,b.children,C),Rt(),Co(v),xt()},ve=(v,b,C,O,K,N,oe,te,T=!1)=>{const c=v&&v.children,_=v?v.shapeFlag:0,Q=b.children,{patchFlag:ie,shapeFlag:fe}=b;if(ie>0){if(ie&128){Ee(c,Q,C,O,K,N,oe,te,T);return}else if(ie&256){$e(c,Q,C,O,K,N,oe,te,T);return}}fe&8?(_&16&&I(c,K,N),Q!==c&&g(C,Q)):_&16?fe&16?Ee(c,Q,C,O,K,N,oe,te,T):I(c,K,N,!0):(_&8&&g(C,""),fe&16&&ue(Q,C,O,K,N,oe,te,T))},$e=(v,b,C,O,K,N,oe,te,T)=>{v=v||is,b=b||is;const c=v.length,_=b.length,Q=Math.min(c,_);let ie;for(ie=0;ie<Q;ie++){const fe=b[ie]=T?Vt(b[ie]):ht(b[ie]);z(v[ie],fe,C,null,K,N,oe,te,T)}c>_?I(v,K,N,!0,!1,Q):ue(b,C,O,K,N,oe,te,T,Q)},Ee=(v,b,C,O,K,N,oe,te,T)=>{let c=0;const _=b.length;let Q=v.length-1,ie=_-1;for(;c<=Q&&c<=ie;){const fe=v[c],U=b[c]=T?Vt(b[c]):ht(b[c]);if(ms(fe,U))z(fe,U,C,null,K,N,oe,te,T);else break;c++}for(;c<=Q&&c<=ie;){const fe=v[Q],U=b[ie]=T?Vt(b[ie]):ht(b[ie]);if(ms(fe,U))z(fe,U,C,null,K,N,oe,te,T);else break;Q--,ie--}if(c>Q){if(c<=ie){const fe=ie+1,U=fe<_?b[fe].el:O;for(;c<=ie;)z(null,b[c]=T?Vt(b[c]):ht(b[c]),C,U,K,N,oe,te,T),c++}}else if(c>ie)for(;c<=Q;)Ae(v[c],K,N,!0),c++;else{const fe=c,U=c,h=new Map;for(c=U;c<=ie;c++){const ot=b[c]=T?Vt(b[c]):ht(b[c]);ot.key!=null&&h.set(ot.key,c)}let G,me=0;const he=ie-U+1;let Je=!1,ut=0;const ts=new Array(he);for(c=0;c<he;c++)ts[c]=0;for(c=fe;c<=Q;c++){const ot=v[c];if(me>=he){Ae(ot,K,N,!0);continue}let dt;if(ot.key!=null)dt=h.get(ot.key);else for(G=U;G<=ie;G++)if(ts[G-U]===0&&ms(ot,b[G])){dt=G;break}dt===void 0?Ae(ot,K,N,!0):(ts[dt-U]=c+1,dt>=ut?ut=dt:Je=!0,z(ot,b[dt],C,null,K,N,oe,te,T),me++)}const yn=Je?ml(ts):is;for(G=yn.length-1,c=he-1;c>=0;c--){const ot=U+c,dt=b[ot],wn=b[ot+1],Sn=ot+1<_?wn.el||wn.placeholder:O;ts[c]===0?z(null,dt,C,Sn,K,N,oe,te,T):Je&&(G<0||c!==yn[G]?Ve(dt,C,Sn,2):G--)}}},Ve=(v,b,C,O,K=null)=>{const{el:N,type:oe,transition:te,children:T,shapeFlag:c}=v;if(c&6){Ve(v.component.subTree,b,C,O);return}if(c&128){v.suspense.move(b,C,O);return}if(c&64){oe.move(v,b,C,w);return}if(oe===_e){o(N,b,C);for(let Q=0;Q<T.length;Q++)Ve(T[Q],b,C,O);o(v.anchor,b,C);return}if(oe===zs){Z(v,b,C);return}if(O!==2&&c&1&&te)if(O===0)te.beforeEnter(N),o(N,b,C),at(()=>te.enter(N),K);else{const{leave:Q,delayLeave:ie,afterLeave:fe}=te,U=()=>{v.ctx.isUnmounted?a(N):o(N,b,C)},h=()=>{N._isLeaving&&N[Or](!0),Q(N,()=>{U(),fe&&fe()})};ie?ie(N,U,h):h()}else o(N,b,C)},Ae=(v,b,C,O=!1,K=!1)=>{const{type:N,props:oe,ref:te,children:T,dynamicChildren:c,shapeFlag:_,patchFlag:Q,dirs:ie,cacheIndex:fe}=v;if(Q===-2&&(K=!1),te!=null&&(Rt(),Ds(te,null,C,v,!0),xt()),fe!=null&&(b.renderCache[fe]=void 0),_&256){b.ctx.deactivate(v);return}const U=_&1&&ie,h=!$s(v);let G;if(h&&(G=oe&&oe.onVnodeBeforeUnmount)&&mt(G,b,v),_&6)$(v.component,C,O);else{if(_&128){v.suspense.unmount(C,O);return}U&&Jt(v,null,b,"beforeUnmount"),_&64?v.type.remove(v,b,C,w,O):c&&!c.hasOnce&&(N!==_e||Q>0&&Q&64)?I(c,b,C,!1,!0):(N===_e&&Q&384||!K&&_&16)&&I(T,b,C),O&&He(v)}(h&&(G=oe&&oe.onVnodeUnmounted)||U)&&at(()=>{G&&mt(G,b,v),U&&Jt(v,null,b,"unmounted")},C)},He=v=>{const{type:b,el:C,anchor:O,transition:K}=v;if(b===_e){ne(C,O);return}if(b===zs){ee(v);return}const N=()=>{a(C),K&&!K.persisted&&K.afterLeave&&K.afterLeave()};if(v.shapeFlag&1&&K&&!K.persisted){const{leave:oe,delayLeave:te}=K,T=()=>oe(C,N);te?te(v.el,N,T):T()}else N()},ne=(v,b)=>{let C;for(;v!==b;)C=S(v),a(v),v=C;a(b)},$=(v,b,C)=>{const{bum:O,scope:K,job:N,subTree:oe,um:te,m:T,a:c}=v;Mo(T),Mo(c),O&&js(O),K.stop(),N&&(N.flags|=8,Ae(oe,v,b,C)),te&&at(te,b),at(()=>{v.isUnmounted=!0},b)},I=(v,b,C,O=!1,K=!1,N=0)=>{for(let oe=N;oe<v.length;oe++)Ae(v[oe],b,C,O,K)},u=v=>{if(v.shapeFlag&6)return u(v.component.subTree);if(v.shapeFlag&128)return v.suspense.next();const b=S(v.anchor||v.el),C=b&&b[Ir];return C?S(C):b};let L=!1;const k=(v,b,C)=>{v==null?b._vnode&&Ae(b._vnode,null,null,!0):z(b._vnode||null,v,b,null,null,null,C),b._vnode=v,L||(L=!0,Co(),Ya(),L=!1)},w={p:z,um:Ae,m:Ve,r:He,mt:Se,mc:ue,pc:ve,pbc:V,n:u,o:e};return{render:k,hydrate:void 0,createApp:al(k)}}function Tn({type:e,props:t},n){return n==="svg"&&e==="foreignObject"||n==="mathml"&&e==="annotation-xml"&&t&&t.encoding&&t.encoding.includes("html")?void 0:n}function qt({effect:e,job:t},n){n?(e.flags|=32,t.flags|=4):(e.flags&=-33,t.flags&=-5)}function vl(e,t){return(!e||e&&!e.pendingBranch)&&t&&!t.persisted}function pi(e,t,n=!1){const o=e.children,a=t.children;if(be(o)&&be(a))for(let i=0;i<o.length;i++){const r=o[i];let l=a[i];l.shapeFlag&1&&!l.dynamicChildren&&((l.patchFlag<=0||l.patchFlag===32)&&(l=a[i]=Vt(a[i]),l.el=r.el),!n&&l.patchFlag!==-2&&pi(r,l)),l.type===vn&&l.patchFlag!==-1&&(l.el=r.el),l.type===Gt&&!l.el&&(l.el=r.el)}}function ml(e){const t=e.slice(),n=[0];let o,a,i,r,l;const d=e.length;for(o=0;o<d;o++){const p=e[o];if(p!==0){if(a=n[n.length-1],e[a]<p){t[o]=a,n.push(o);continue}for(i=0,r=n.length-1;i<r;)l=i+r>>1,e[n[l]]<p?i=l+1:r=l;p<e[n[i]]&&(i>0&&(t[o]=n[i-1]),n[i]=o)}}for(i=n.length,r=n[i-1];i-- >0;)n[i]=r,r=t[r];return n}function vi(e){const t=e.subTree.component;if(t)return t.asyncDep&&!t.asyncResolved?t:vi(t)}function Mo(e){if(e)for(let t=0;t<e.length;t++)e[t].flags|=8}const bl=Symbol.for("v-scx"),hl=()=>wt(bl);function Bt(e,t,n){return mi(e,t,n)}function mi(e,t,n=Me){const{immediate:o,deep:a,flush:i,once:r}=n,l=Ze({},n),d=t&&o||!t&&i!=="post";let p;if(As){if(i==="sync"){const D=hl();p=D.__watcherHandles||(D.__watcherHandles=[])}else if(!d){const D=()=>{};return D.stop=yt,D.resume=yt,D.pause=yt,D}}const g=Xe;l.call=(D,M,z)=>Dt(D,g,M,z);let f=!1;i==="post"?l.scheduler=D=>{at(D,g&&g.suspense)}:i!=="sync"&&(f=!0,l.scheduler=(D,M)=>{M?D():go(D)}),l.augmentJob=D=>{t&&(D.flags|=4),f&&(D.flags|=2,g&&(D.id=g.uid,D.i=g))};const S=xr(e,t,l);return As&&(p?p.push(S):d&&S()),S}function yl(e,t,n){const o=this.proxy,a=je(e)?e.includes(".")?bi(o,e):()=>o[e]:e.bind(o,o);let i;we(t)?i=t:(i=t.handler,n=t);const r=Fs(this),l=mi(a,i.bind(o),n);return r(),l}function bi(e,t){const n=t.split(".");return()=>{let o=e;for(let a=0;a<n.length&&o;a++)o=o[n[a]];return o}}const wl=(e,t)=>t==="modelValue"||t==="model-value"?e.modelModifiers:e[`${t}Modifiers`]||e[`${ct(t)}Modifiers`]||e[`${zt(t)}Modifiers`];function Sl(e,t,...n){if(e.isUnmounted)return;const o=e.vnode.props||Me;let a=n;const i=t.startsWith("update:"),r=i&&wl(o,t.slice(7));r&&(r.trim&&(a=n.map(g=>je(g)?g.trim():g)),r.number&&(a=n.map(qs)));let l,d=o[l=Dn(t)]||o[l=Dn(ct(t))];!d&&i&&(d=o[l=Dn(zt(t))]),d&&Dt(d,e,6,a);const p=o[l+"Once"];if(p){if(!e.emitted)e.emitted={};else if(e.emitted[l])return;e.emitted[l]=!0,Dt(p,e,6,a)}}const Dl=new WeakMap;function hi(e,t,n=!1){const o=n?Dl:t.emitsCache,a=o.get(e);if(a!==void 0)return a;const i=e.emits;let r={},l=!1;if(!we(e)){const d=p=>{const g=hi(p,t,!0);g&&(l=!0,Ze(r,g))};!n&&t.mixins.length&&t.mixins.forEach(d),e.extends&&d(e.extends),e.mixins&&e.mixins.forEach(d)}return!i&&!l?(Ie(e)&&o.set(e,null),null):(be(i)?i.forEach(d=>r[d]=null):Ze(r,i),Ie(e)&&o.set(e,r),r)}function pn(e,t){return!e||!rn(t)?!1:(t=t.slice(2).replace(/Once$/,""),Le(e,t[0].toLowerCase()+t.slice(1))||Le(e,zt(t))||Le(e,t))}function Io(e){const{type:t,vnode:n,proxy:o,withProxy:a,propsOptions:[i],slots:r,attrs:l,emit:d,render:p,renderCache:g,props:f,data:S,setupState:D,ctx:M,inheritAttrs:z}=e,B=en(e);let Y,q;try{if(n.shapeFlag&4){const ee=a||o,ce=ee;Y=ht(p.call(ce,ee,g,f,D,S,M)),q=l}else{const ee=t;Y=ht(ee.length>1?ee(f,{attrs:l,slots:r,emit:d}):ee(f,null)),q=t.props?l:$l(l)}}catch(ee){Cs.length=0,fn(ee,e,1),Y=Ue(Gt)}let Z=Y;if(q&&z!==!1){const ee=Object.keys(q),{shapeFlag:ce}=Z;ee.length&&ce&7&&(i&&ee.some(eo)&&(q=kl(q,i)),Z=cs(Z,q,!1,!0))}return n.dirs&&(Z=cs(Z,null,!1,!0),Z.dirs=Z.dirs?Z.dirs.concat(n.dirs):n.dirs),n.transition&&po(Z,n.transition),Y=Z,en(B),Y}const $l=e=>{let t;for(const n in e)(n==="class"||n==="style"||rn(n))&&((t||(t={}))[n]=e[n]);return t},kl=(e,t)=>{const n={};for(const o in e)(!eo(o)||!(o.slice(9)in t))&&(n[o]=e[o]);return n};function Cl(e,t,n){const{props:o,children:a,component:i}=e,{props:r,children:l,patchFlag:d}=t,p=i.emitsOptions;if(t.dirs||t.transition)return!0;if(n&&d>=0){if(d&1024)return!0;if(d&16)return o?No(o,r,p):!!r;if(d&8){const g=t.dynamicProps;for(let f=0;f<g.length;f++){const S=g[f];if(r[S]!==o[S]&&!pn(p,S))return!0}}}else return(a||l)&&(!l||!l.$stable)?!0:o===r?!1:o?r?No(o,r,p):!0:!!r;return!1}function No(e,t,n){const o=Object.keys(t);if(o.length!==Object.keys(e).length)return!0;for(let a=0;a<o.length;a++){const i=o[a];if(t[i]!==e[i]&&!pn(n,i))return!0}return!1}function _l({vnode:e,parent:t},n){for(;t;){const o=t.subTree;if(o.suspense&&o.suspense.activeBranch===e&&(o.el=e.el),o===e)(e=t.vnode).el=n,t=t.parent;else break}}const yi=e=>e.__isSuspense;function El(e,t){t&&t.pendingBranch?be(e)?t.effects.push(...e):t.effects.push(e):Mr(e)}const _e=Symbol.for("v-fgt"),vn=Symbol.for("v-txt"),Gt=Symbol.for("v-cmt"),zs=Symbol.for("v-stc"),Cs=[];let rt=null;function R(e=!1){Cs.push(rt=e?null:[])}function Tl(){Cs.pop(),rt=Cs[Cs.length-1]||null}let Ls=1;function nn(e,t=!1){Ls+=e,e<0&&rt&&t&&(rt.hasOnce=!0)}function wi(e){return e.dynamicChildren=Ls>0?rt||is:null,Tl(),Ls>0&&rt&&rt.push(e),e}function x(e,t,n,o,a,i){return wi(s(e,t,n,o,a,i,!0))}function Pl(e,t,n,o,a){return wi(Ue(e,t,n,o,a,!0))}function on(e){return e?e.__v_isVNode===!0:!1}function ms(e,t){return e.type===t.type&&e.key===t.key}const Si=({key:e})=>e??null,Ws=({ref:e,ref_key:t,ref_for:n})=>(typeof e=="number"&&(e=""+e),e!=null?je(e)||Be(e)||we(e)?{i:it,r:e,k:t,f:!!n}:e:null);function s(e,t=null,n=null,o=0,a=null,i=e===_e?0:1,r=!1,l=!1){const d={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&Si(t),ref:t&&Ws(t),scopeId:Xa,slotScopeIds:null,children:n,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetStart:null,targetAnchor:null,staticCount:0,shapeFlag:i,patchFlag:o,dynamicProps:a,dynamicChildren:null,appContext:null,ctx:it};return l?(bo(d,n),i&128&&e.normalize(d)):n&&(d.shapeFlag|=je(n)?8:16),Ls>0&&!r&&rt&&(d.patchFlag>0||i&6)&&d.patchFlag!==32&&rt.push(d),d}const Ue=Rl;function Rl(e,t=null,n=null,o=0,a=null,i=!1){if((!e||e===Yr)&&(e=Gt),on(e)){const l=cs(e,t,!0);return n&&bo(l,n),Ls>0&&!i&&rt&&(l.shapeFlag&6?rt[rt.indexOf(e)]=l:rt.push(l)),l.patchFlag=-2,l}if(Kl(e)&&(e=e.__vccOpts),t){t=xl(t);let{class:l,style:d}=t;l&&!je(l)&&(t.class=ke(l)),Ie(d)&&(fo(d)&&!be(d)&&(d=Ze({},d)),t.style=no(d))}const r=je(e)?1:yi(e)?128:Nr(e)?64:Ie(e)?4:we(e)?2:0;return s(e,t,n,o,a,r,i,!0)}function xl(e){return e?fo(e)||li(e)?Ze({},e):e:null}function cs(e,t,n=!1,o=!1){const{props:a,ref:i,patchFlag:r,children:l,transition:d}=e,p=t?Ll(a||{},t):a,g={__v_isVNode:!0,__v_skip:!0,type:e.type,props:p,key:p&&Si(p),ref:t&&t.ref?n&&i?be(i)?i.concat(Ws(t)):[i,Ws(t)]:Ws(t):i,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:l,target:e.target,targetStart:e.targetStart,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:t&&e.type!==_e?r===-1?16:r|16:r,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:d,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&cs(e.ssContent),ssFallback:e.ssFallback&&cs(e.ssFallback),placeholder:e.placeholder,el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce};return d&&o&&po(g,d.clone(g)),g}function P(e=" ",t=0){return Ue(vn,null,e,t)}function Pn(e,t){const n=Ue(zs,null,e);return n.staticCount=t,n}function de(e="",t=!1){return t?(R(),Pl(Gt,null,e)):Ue(Gt,null,e)}function ht(e){return e==null||typeof e=="boolean"?Ue(Gt):be(e)?Ue(_e,null,e.slice()):on(e)?Vt(e):Ue(vn,null,String(e))}function Vt(e){return e.el===null&&e.patchFlag!==-1||e.memo?e:cs(e)}function bo(e,t){let n=0;const{shapeFlag:o}=e;if(t==null)t=null;else if(be(t))n=16;else if(typeof t=="object")if(o&65){const a=t.default;a&&(a._c&&(a._d=!1),bo(e,a()),a._c&&(a._d=!0));return}else{n=32;const a=t._;!a&&!li(t)?t._ctx=it:a===3&&it&&(it.slots._===1?t._=1:(t._=2,e.patchFlag|=1024))}else we(t)?(t={default:t,_ctx:it},n=32):(t=String(t),o&64?(n=16,t=[P(t)]):n=8);e.children=t,e.shapeFlag|=n}function Ll(...e){const t={};for(let n=0;n<e.length;n++){const o=e[n];for(const a in o)if(a==="class")t.class!==o.class&&(t.class=ke([t.class,o.class]));else if(a==="style")t.style=no([t.style,o.style]);else if(rn(a)){const i=t[a],r=o[a];r&&i!==r&&!(be(i)&&i.includes(r))&&(t[a]=i?[].concat(i,r):r)}else a!==""&&(t[a]=o[a])}return t}function mt(e,t,n,o=null){Dt(e,t,7,[n,o])}const Al=ai();let Ml=0;function Il(e,t,n){const o=e.type,a=(t?t.appContext:e.appContext)||Al,i={uid:Ml++,vnode:e,type:o,parent:t,appContext:a,root:null,next:null,subTree:null,effect:null,update:null,job:null,scope:new Ta(!0),render:null,proxy:null,exposed:null,exposeProxy:null,withProxy:null,provides:t?t.provides:Object.create(a.provides),ids:t?t.ids:["",0,0],accessCache:null,renderCache:[],components:null,directives:null,propsOptions:ui(o,a),emitsOptions:hi(o,a),emit:null,emitted:null,propsDefaults:Me,inheritAttrs:o.inheritAttrs,ctx:Me,data:Me,props:Me,attrs:Me,slots:Me,refs:Me,setupState:Me,setupContext:null,suspense:n,suspenseId:n?n.pendingId:0,asyncDep:null,asyncResolved:!1,isMounted:!1,isUnmounted:!1,isDeactivated:!1,bc:null,c:null,bm:null,m:null,bu:null,u:null,um:null,bum:null,da:null,a:null,rtg:null,rtc:null,ec:null,sp:null};return i.ctx={_:i},i.root=t?t.root:i,i.emit=Sl.bind(null,i),e.ce&&e.ce(i),i}let Xe=null;const Di=()=>Xe||it;let an,Gn;{const e=un(),t=(n,o)=>{let a;return(a=e[n])||(a=e[n]=[]),a.push(o),i=>{a.length>1?a.forEach(r=>r(i)):a[0](i)}};an=t("__VUE_INSTANCE_SETTERS__",n=>Xe=n),Gn=t("__VUE_SSR_SETTERS__",n=>As=n)}const Fs=e=>{const t=Xe;return an(e),e.scope.on(),()=>{e.scope.off(),an(t)}},Oo=()=>{Xe&&Xe.scope.off(),an(null)};function $i(e){return e.vnode.shapeFlag&4}let As=!1;function Nl(e,t=!1,n=!1){t&&Gn(t);const{props:o,children:a}=e.vnode,i=$i(e);rl(e,o,i,t),dl(e,a,n||t);const r=i?Ol(e,t):void 0;return t&&Gn(!1),r}function Ol(e,t){const n=e.type;e.accessCache=Object.create(null),e.proxy=new Proxy(e.ctx,Xr);const{setup:o}=n;if(o){Rt();const a=e.setupContext=o.length>1?Ul(e):null,i=Fs(e),r=Vs(o,e,0,[e.props,a]),l=Sa(r);if(xt(),i(),(l||e.sp)&&!$s(e)&&ei(e),l){if(r.then(Oo,Oo),t)return r.then(d=>{Vo(e,d)}).catch(d=>{fn(d,e,0)});e.asyncDep=r}else Vo(e,r)}else ki(e)}function Vo(e,t,n){we(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:Ie(t)&&(e.setupState=Wa(t)),ki(e)}function ki(e,t,n){const o=e.type;e.render||(e.render=o.render||yt);{const a=Fs(e);Rt();try{Zr(e)}finally{xt(),a()}}}const Vl={get(e,t){return Qe(e,"get",""),e[t]}};function Ul(e){const t=n=>{e.exposed=n||{}};return{attrs:new Proxy(e.attrs,Vl),slots:e.slots,emit:e.emit,expose:t}}function mn(e){return e.exposed?e.exposeProxy||(e.exposeProxy=new Proxy(Wa(Rs(e.exposed)),{get(t,n){if(n in t)return t[n];if(n in ks)return ks[n](e)},has(t,n){return n in t||n in ks}})):e.proxy}function Fl(e,t=!0){return we(e)?e.displayName||e.name:e.name||t&&e.__name}function Kl(e){return we(e)&&"__vccOpts"in e}const ge=(e,t)=>Pr(e,t,As);function Ci(e,t,n){try{nn(-1);const o=arguments.length;return o===2?Ie(t)&&!be(t)?on(t)?Ue(e,null,[t]):Ue(e,t):Ue(e,null,t):(o>3?n=Array.prototype.slice.call(arguments,2):o===3&&on(n)&&(n=[n]),Ue(e,t,n))}finally{nn(1)}}const Hl="3.5.22";/**
* @vue/runtime-dom v3.5.22
* (c) 2018-present Yuxi (Evan) You and Vue contributors
* @license MIT
**/let zn;const Uo=typeof window<"u"&&window.trustedTypes;if(Uo)try{zn=Uo.createPolicy("vue",{createHTML:e=>e})}catch{}const _i=zn?e=>zn.createHTML(e):e=>e,Bl="http://www.w3.org/2000/svg",jl="http://www.w3.org/1998/Math/MathML",_t=typeof document<"u"?document:null,Fo=_t&&_t.createElement("template"),Gl={insert:(e,t,n)=>{t.insertBefore(e,n||null)},remove:e=>{const t=e.parentNode;t&&t.removeChild(e)},createElement:(e,t,n,o)=>{const a=t==="svg"?_t.createElementNS(Bl,e):t==="mathml"?_t.createElementNS(jl,e):n?_t.createElement(e,{is:n}):_t.createElement(e);return e==="select"&&o&&o.multiple!=null&&a.setAttribute("multiple",o.multiple),a},createText:e=>_t.createTextNode(e),createComment:e=>_t.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>_t.querySelector(e),setScopeId(e,t){e.setAttribute(t,"")},insertStaticContent(e,t,n,o,a,i){const r=n?n.previousSibling:t.lastChild;if(a&&(a===i||a.nextSibling))for(;t.insertBefore(a.cloneNode(!0),n),!(a===i||!(a=a.nextSibling)););else{Fo.innerHTML=_i(o==="svg"?`<svg>${e}</svg>`:o==="mathml"?`<math>${e}</math>`:e);const l=Fo.content;if(o==="svg"||o==="mathml"){const d=l.firstChild;for(;d.firstChild;)l.appendChild(d.firstChild);l.removeChild(d)}t.insertBefore(l,n)}return[r?r.nextSibling:t.firstChild,n?n.previousSibling:t.lastChild]}},zl=Symbol("_vtc");function Wl(e,t,n){const o=e[zl];o&&(t=(t?[t,...o]:[...o]).join(" ")),t==null?e.removeAttribute("class"):n?e.setAttribute("class",t):e.className=t}const Ko=Symbol("_vod"),Jl=Symbol("_vsh"),ql=Symbol(""),Yl=/(?:^|;)\s*display\s*:/;function Ql(e,t,n){const o=e.style,a=je(n);let i=!1;if(n&&!a){if(t)if(je(t))for(const r of t.split(";")){const l=r.slice(0,r.indexOf(":")).trim();n[l]==null&&Js(o,l,"")}else for(const r in t)n[r]==null&&Js(o,r,"");for(const r in n)r==="display"&&(i=!0),Js(o,r,n[r])}else if(a){if(t!==n){const r=o[ql];r&&(n+=";"+r),o.cssText=n,i=Yl.test(n)}}else t&&e.removeAttribute("style");Ko in e&&(e[Ko]=i?o.display:"",e[Jl]&&(o.display="none"))}const Ho=/\s*!important$/;function Js(e,t,n){if(be(n))n.forEach(o=>Js(e,t,o));else if(n==null&&(n=""),t.startsWith("--"))e.setProperty(t,n);else{const o=Xl(e,t);Ho.test(n)?e.setProperty(zt(o),n.replace(Ho,""),"important"):e[o]=n}}const Bo=["Webkit","Moz","ms"],Rn={};function Xl(e,t){const n=Rn[t];if(n)return n;let o=ct(t);if(o!=="filter"&&o in e)return Rn[t]=o;o=cn(o);for(let a=0;a<Bo.length;a++){const i=Bo[a]+o;if(i in e)return Rn[t]=i}return t}const jo="http://www.w3.org/1999/xlink";function Go(e,t,n,o,a,i=er(t)){o&&t.startsWith("xlink:")?n==null?e.removeAttributeNS(jo,t.slice(6,t.length)):e.setAttributeNS(jo,t,n):n==null||i&&!Ca(n)?e.removeAttribute(t):e.setAttribute(t,i?"":St(n)?String(n):n)}function zo(e,t,n,o,a){if(t==="innerHTML"||t==="textContent"){n!=null&&(e[t]=t==="innerHTML"?_i(n):n);return}const i=e.tagName;if(t==="value"&&i!=="PROGRESS"&&!i.includes("-")){const l=i==="OPTION"?e.getAttribute("value")||"":e.value,d=n==null?e.type==="checkbox"?"on":"":String(n);(l!==d||!("_value"in e))&&(e.value=d),n==null&&e.removeAttribute(t),e._value=n;return}let r=!1;if(n===""||n==null){const l=typeof e[t];l==="boolean"?n=Ca(n):n==null&&l==="string"?(n="",r=!0):l==="number"&&(n=0,r=!0)}try{e[t]=n}catch{}r&&e.removeAttribute(a||t)}function Ft(e,t,n,o){e.addEventListener(t,n,o)}function Zl(e,t,n,o){e.removeEventListener(t,n,o)}const Wo=Symbol("_vei");function ec(e,t,n,o,a=null){const i=e[Wo]||(e[Wo]={}),r=i[t];if(o&&r)r.value=o;else{const[l,d]=tc(t);if(o){const p=i[t]=oc(o,a);Ft(e,l,p,d)}else r&&(Zl(e,l,r,d),i[t]=void 0)}}const Jo=/(?:Once|Passive|Capture)$/;function tc(e){let t;if(Jo.test(e)){t={};let o;for(;o=e.match(Jo);)e=e.slice(0,e.length-o[0].length),t[o[0].toLowerCase()]=!0}return[e[2]===":"?e.slice(3):zt(e.slice(2)),t]}let xn=0;const sc=Promise.resolve(),nc=()=>xn||(sc.then(()=>xn=0),xn=Date.now());function oc(e,t){const n=o=>{if(!o._vts)o._vts=Date.now();else if(o._vts<=n.attached)return;Dt(ac(o,n.value),t,5,[o])};return n.value=e,n.attached=nc(),n}function ac(e,t){if(be(t)){const n=e.stopImmediatePropagation;return e.stopImmediatePropagation=()=>{n.call(e),e._stopped=!0},t.map(o=>a=>!a._stopped&&o&&o(a))}else return t}const qo=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)>96&&e.charCodeAt(2)<123,ic=(e,t,n,o,a,i)=>{const r=a==="svg";t==="class"?Wl(e,o,r):t==="style"?Ql(e,n,o):rn(t)?eo(t)||ec(e,t,n,o,i):(t[0]==="."?(t=t.slice(1),!0):t[0]==="^"?(t=t.slice(1),!1):rc(e,t,o,r))?(zo(e,t,o),!e.tagName.includes("-")&&(t==="value"||t==="checked"||t==="selected")&&Go(e,t,o,r,i,t!=="value")):e._isVueCE&&(/[A-Z]/.test(t)||!je(o))?zo(e,ct(t),o,i,t):(t==="true-value"?e._trueValue=o:t==="false-value"&&(e._falseValue=o),Go(e,t,o,r))};function rc(e,t,n,o){if(o)return!!(t==="innerHTML"||t==="textContent"||t in e&&qo(t)&&we(n));if(t==="spellcheck"||t==="draggable"||t==="translate"||t==="autocorrect"||t==="form"||t==="list"&&e.tagName==="INPUT"||t==="type"&&e.tagName==="TEXTAREA")return!1;if(t==="width"||t==="height"){const a=e.tagName;if(a==="IMG"||a==="VIDEO"||a==="CANVAS"||a==="SOURCE")return!1}return qo(t)&&je(n)?!1:t in e}const us=e=>{const t=e.props["onUpdate:modelValue"]||!1;return be(t)?n=>js(t,n):t};function lc(e){e.target.composing=!0}function Yo(e){const t=e.target;t.composing&&(t.composing=!1,t.dispatchEvent(new Event("input")))}const Pt=Symbol("_assign"),Te={created(e,{modifiers:{lazy:t,trim:n,number:o}},a){e[Pt]=us(a);const i=o||a.props&&a.props.type==="number";Ft(e,t?"change":"input",r=>{if(r.target.composing)return;let l=e.value;n&&(l=l.trim()),i&&(l=qs(l)),e[Pt](l)}),n&&Ft(e,"change",()=>{e.value=e.value.trim()}),t||(Ft(e,"compositionstart",lc),Ft(e,"compositionend",Yo),Ft(e,"change",Yo))},mounted(e,{value:t}){e.value=t??""},beforeUpdate(e,{value:t,oldValue:n,modifiers:{lazy:o,trim:a,number:i}},r){if(e[Pt]=us(r),e.composing)return;const l=(i||e.type==="number")&&!/^0\d/.test(e.value)?qs(e.value):e.value,d=t??"";l!==d&&(document.activeElement===e&&e.type!=="range"&&(o&&t===n||a&&e.value.trim()===d)||(e.value=d))}},ze={deep:!0,created(e,t,n){e[Pt]=us(n),Ft(e,"change",()=>{const o=e._modelValue,a=Ms(e),i=e.checked,r=e[Pt];if(be(o)){const l=oo(o,a),d=l!==-1;if(i&&!d)r(o.concat(a));else if(!i&&d){const p=[...o];p.splice(l,1),r(p)}}else if(gs(o)){const l=new Set(o);i?l.add(a):l.delete(a),r(l)}else r(Ei(e,i))})},mounted:Qo,beforeUpdate(e,t,n){e[Pt]=us(n),Qo(e,t,n)}};function Qo(e,{value:t,oldValue:n},o){e._modelValue=t;let a;if(be(t))a=oo(t,o.props.value)>-1;else if(gs(t))a=t.has(o.props.value);else{if(t===n)return;a=Os(t,Ei(e,!0))}e.checked!==a&&(e.checked=a)}const Ke={deep:!0,created(e,{value:t,modifiers:{number:n}},o){const a=gs(t);Ft(e,"change",()=>{const i=Array.prototype.filter.call(e.options,r=>r.selected).map(r=>n?qs(Ms(r)):Ms(r));e[Pt](e.multiple?a?new Set(i):i:i[0]),e._assigning=!0,es(()=>{e._assigning=!1})}),e[Pt]=us(o)},mounted(e,{value:t}){Xo(e,t)},beforeUpdate(e,t,n){e[Pt]=us(n)},updated(e,{value:t}){e._assigning||Xo(e,t)}};function Xo(e,t){const n=e.multiple,o=be(t);if(!(n&&!o&&!gs(t))){for(let a=0,i=e.options.length;a<i;a++){const r=e.options[a],l=Ms(r);if(n)if(o){const d=typeof l;d==="string"||d==="number"?r.selected=t.some(p=>String(p)===String(l)):r.selected=oo(t,l)>-1}else r.selected=t.has(l);else if(Os(Ms(r),t)){e.selectedIndex!==a&&(e.selectedIndex=a);return}}!n&&e.selectedIndex!==-1&&(e.selectedIndex=-1)}}function Ms(e){return"_value"in e?e._value:e.value}function Ei(e,t){const n=t?"_trueValue":"_falseValue";return n in e?e[n]:t}const cc=["ctrl","shift","alt","meta"],uc={stop:e=>e.stopPropagation(),prevent:e=>e.preventDefault(),self:e=>e.target!==e.currentTarget,ctrl:e=>!e.ctrlKey,shift:e=>!e.shiftKey,alt:e=>!e.altKey,meta:e=>!e.metaKey,left:e=>"button"in e&&e.button!==0,middle:e=>"button"in e&&e.button!==1,right:e=>"button"in e&&e.button!==2,exact:(e,t)=>cc.some(n=>e[`${n}Key`]&&!t.includes(n))},Zo=(e,t)=>{const n=e._withMods||(e._withMods={}),o=t.join(".");return n[o]||(n[o]=(a,...i)=>{for(let r=0;r<t.length;r++){const l=uc[t[r]];if(l&&l(a,t))return}return e(a,...i)})},dc={esc:"escape",space:" ",up:"arrow-up",left:"arrow-left",right:"arrow-right",down:"arrow-down",delete:"backspace"},ea=(e,t)=>{const n=e._withKeys||(e._withKeys={}),o=t.join(".");return n[o]||(n[o]=a=>{if(!("key"in a))return;const i=zt(a.key);if(t.some(r=>r===i||dc[r]===i))return e(a)})},fc=Ze({patchProp:ic},Gl);let ta;function gc(){return ta||(ta=gl(fc))}const pc=(...e)=>{const t=gc().createApp(...e),{mount:n}=t;return t.mount=o=>{const a=mc(o);if(!a)return;const i=t._component;!we(i)&&!i.render&&!i.template&&(i.template=a.innerHTML),a.nodeType===1&&(a.textContent="");const r=n(a,!1,vc(a));return a instanceof Element&&(a.removeAttribute("v-cloak"),a.setAttribute("data-v-app","")),r},t};function vc(e){if(e instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&e instanceof MathMLElement)return"mathml"}function mc(e){return je(e)?document.querySelector(e):e}/*!
* pinia v2.3.1
* (c) 2025 Eduardo San Martin Morote
* @license MIT
*/let Ti;const bn=e=>Ti=e,Pi=Symbol();function Wn(e){return e&&typeof e=="object"&&Object.prototype.toString.call(e)==="[object Object]"&&typeof e.toJSON!="function"}var _s;(function(e){e.direct="direct",e.patchObject="patch object",e.patchFunction="patch function"})(_s||(_s={}));function bc(){const e=Pa(!0),t=e.run(()=>H({}));let n=[],o=[];const a=Rs({install(i){bn(a),a._a=i,i.provide(Pi,a),i.config.globalProperties.$pinia=a,o.forEach(r=>n.push(r)),o=[]},use(i){return this._a?n.push(i):o.push(i),this},_p:n,_a:null,_e:e,_s:new Map,state:t});return a}const Ri=()=>{};function sa(e,t,n,o=Ri){e.push(t);const a=()=>{const i=e.indexOf(t);i>-1&&(e.splice(i,1),o())};return!n&&Ra()&&sr(a),a}function ns(e,...t){e.slice().forEach(n=>{n(...t)})}const hc=e=>e(),na=Symbol(),Ln=Symbol();function Jn(e,t){e instanceof Map&&t instanceof Map?t.forEach((n,o)=>e.set(o,n)):e instanceof Set&&t instanceof Set&&t.forEach(e.add,e);for(const n in t){if(!t.hasOwnProperty(n))continue;const o=t[n],a=e[n];Wn(a)&&Wn(o)&&e.hasOwnProperty(n)&&!Be(o)&&!Ht(o)?e[n]=Jn(a,o):e[n]=o}return e}const yc=Symbol();function wc(e){return!Wn(e)||!e.hasOwnProperty(yc)}const{assign:Nt}=Object;function Sc(e){return!!(Be(e)&&e.effect)}function Dc(e,t,n,o){const{state:a,actions:i,getters:r}=t,l=n.state.value[e];let d;function p(){l||(n.state.value[e]=a?a():{});const g=Cr(n.state.value[e]);return Nt(g,i,Object.keys(r||{}).reduce((f,S)=>(f[S]=Rs(ge(()=>{bn(n);const D=n._s.get(e);return r[S].call(D,D)})),f),{}))}return d=xi(e,p,t,n,o,!0),d}function xi(e,t,n={},o,a,i){let r;const l=Nt({actions:{}},n),d={deep:!0};let p,g,f=[],S=[],D;const M=o.state.value[e];!i&&!M&&(o.state.value[e]={}),H({});let z;function B(ue){let se;p=g=!1,typeof ue=="function"?(ue(o.state.value[e]),se={type:_s.patchFunction,storeId:e,events:D}):(Jn(o.state.value[e],ue),se={type:_s.patchObject,payload:ue,storeId:e,events:D});const V=z=Symbol();es().then(()=>{z===V&&(p=!0)}),g=!0,ns(f,se,o.state.value[e])}const Y=i?function(){const{state:se}=n,V=se?se():{};this.$patch(F=>{Nt(F,V)})}:Ri;function q(){r.stop(),f=[],S=[],o._s.delete(e)}const Z=(ue,se="")=>{if(na in ue)return ue[Ln]=se,ue;const V=function(){bn(o);const F=Array.from(arguments),j=[],le=[];function Se(J){j.push(J)}function re(J){le.push(J)}ns(S,{args:F,name:V[Ln],store:ce,after:Se,onError:re});let y;try{y=ue.apply(this&&this.$id===e?this:ce,F)}catch(J){throw ns(le,J),J}return y instanceof Promise?y.then(J=>(ns(j,J),J)).catch(J=>(ns(le,J),Promise.reject(J))):(ns(j,y),y)};return V[na]=!0,V[Ln]=se,V},ee={_p:o,$id:e,$onAction:sa.bind(null,S),$patch:B,$reset:Y,$subscribe(ue,se={}){const V=sa(f,ue,se.detached,()=>F()),F=r.run(()=>Bt(()=>o.state.value[e],j=>{(se.flush==="sync"?g:p)&&ue({storeId:e,type:_s.direct,events:D},j)},Nt({},d,se)));return V},$dispose:q},ce=tt(ee);o._s.set(e,ce);const pe=(o._a&&o._a.runWithContext||hc)(()=>o._e.run(()=>(r=Pa()).run(()=>t({action:Z}))));for(const ue in pe){const se=pe[ue];if(Be(se)&&!Sc(se)||Ht(se))i||(M&&wc(se)&&(Be(se)?se.value=M[ue]:Jn(se,M[ue])),o.state.value[e][ue]=se);else if(typeof se=="function"){const V=Z(se,ue);pe[ue]=V,l.actions[ue]=se}}return Nt(ce,pe),Nt(Pe(ce),pe),Object.defineProperty(ce,"$state",{get:()=>o.state.value[e],set:ue=>{B(se=>{Nt(se,ue)})}}),o._p.forEach(ue=>{Nt(ce,r.run(()=>ue({store:ce,app:o._a,pinia:o,options:l})))}),M&&i&&n.hydrate&&n.hydrate(ce.$state,M),p=!0,g=!0,ce}/*! #__NO_SIDE_EFFECTS__ */function $c(e,t,n){let o,a;const i=typeof t=="function";o=e,a=i?n:t;function r(l,d){const p=il();return l=l||(p?wt(Pi,null):null),l&&bn(l),l=Ti,l._s.has(o)||(i?xi(o,t,a,l):Dc(o,a,l)),l._s.get(o)}return r.$id=o,r}const kc="/pigeonlogo.svg",Cc=(e=5e3)=>new Promise((t,n)=>{const o=Date.now(),a=100,i=()=>{var r;(r=window.PeerPigeon)!=null&&r.PeerPigeonMesh?(console.log("โ
PeerPigeon loaded successfully"),t(window.PeerPigeon)):Date.now()-o>e?(console.error("โ PeerPigeon failed to load within timeout"),n(new Error("PeerPigeon library not available"))):setTimeout(i,a)};i()}),At=$c("peerpigeon",()=>{const e=H(null),t=H(!1),n=H(!1),o=H("ws://localhost:3000"),a=H(""),i=H("global"),r=H("global"),l=H(!1),d=H(!0),p=tt(new Map),g=tt(new Map),f=tt({connectedCount:0,maxPeers:6,minPeers:3,autoConnect:!0,autoDiscovery:!0,evictionStrategy:!0,xorRouting:!0}),S=H([]),D=tt(new Map),M=tt({localStream:null,remoteStreams:new Map,audioEnabled:!1,videoEnabled:!1,devices:[]}),z=tt(new Map),B=tt({}),Y=tt(new Map),q=tt({}),Z=H([]),ee=tt({enabled:!1,initialized:!1,publicKey:"",peerKeys:new Map}),ce=H([]),ye=H([]),pe=H(new Set),ue=H([]),se=ge(()=>Array.from(p.values()).filter(m=>m.connected)),V=ge(()=>f.connectedCount<f.maxPeers),F=async(m={})=>{var A;try{y("Waiting for PeerPigeon library to load...","info");let X;try{X=await Cc()}catch(Re){console.error("โ PeerPigeon not available:",Re),y("PeerPigeon library not found - using mock","error"),X=null}console.log("๐ PeerPigeon availability:",{available:!!X,PeerPigeonMesh:!!(X!=null&&X.PeerPigeonMesh),keys:X?Object.keys(X):[]});try{(A=X==null?void 0:X.DebugLogger)!=null&&A.enableAll&&(X.DebugLogger.enableAll(),y("DebugLogger enabled for all modules","info"))}catch{}const De=X==null?void 0:X.PeerPigeonMesh;if(De){console.log("๐ Initializing real PeerPigeonMesh with options:",{networkName:i.value,maxPeers:f.maxPeers,autoConnect:!0,autoDiscovery:f.autoDiscovery});const Re={enableWebDHT:!0,enableCrypto:!0,enableDistributedStorage:!0,networkName:i.value,allowGlobalFallback:d.value,maxPeers:f.maxPeers,minPeers:f.minPeers,autoConnect:!0,autoDiscovery:f.autoDiscovery,evictionStrategy:f.evictionStrategy,xorRouting:f.xorRouting,debug:!0,...m};e.value=Rs(new De(Re)),console.log("โ
PeerPigeonMesh instance created (marked as raw)")}else{console.error("โ PeerPigeonMesh not found! Using mock implementation."),y("Using mock PeerPigeon implementation","warning");const Re=class{constructor(Ce){this.options=Ce,this.peerId="mock-peer-"+Math.random().toString(36).substr(2,9),this.eventListeners=new Map,this.networkName=Ce.networkName||"global",this.originalNetworkName=this.networkName,this.isInFallbackMode=!1,this.allowGlobalFallback=Ce.allowGlobalFallback!==!1}async init(){return y("Mock mesh initialized","success"),!0}async connect(Ce){return y(`Mock connected to ${Ce}`,"success"),!0}disconnect(){y("Mock disconnected","info")}addEventListener(Ce,pt){this.eventListeners.has(Ce)||this.eventListeners.set(Ce,[]),this.eventListeners.get(Ce).push(pt)}sendMessage(Ce){return y(`Mock broadcast: ${JSON.stringify(Ce)}`,"info"),"mock-message-id-"+Date.now()}sendDirectMessage(Ce,pt){return y(`Mock direct to ${Ce}: ${JSON.stringify(pt)}`,"info"),"mock-message-id-"+Date.now()}getStatus(){return{connectedCount:0,maxPeers:f.maxPeers,minPeers:f.minPeers,autoDiscovery:f.autoDiscovery,evictionStrategy:f.evictionStrategy,xorRouting:f.xorRouting,networkName:this.networkName,originalNetworkName:this.originalNetworkName,isInFallbackMode:this.isInFallbackMode,allowGlobalFallback:this.allowGlobalFallback}}setNetworkName(Ce){return this.networkName=Ce||"global",this.originalNetworkName=this.networkName,this.isInFallbackMode=!1,y(`Mock network changed to: ${this.networkName}`,"info"),this.networkName}getNetworkName(){return this.networkName}getOriginalNetworkName(){return this.originalNetworkName}isUsingGlobalFallback(){return this.isInFallbackMode}setAllowGlobalFallback(Ce){return this.allowGlobalFallback=Ce,y(`Mock global fallback ${Ce?"enabled":"disabled"}`,"info"),this.allowGlobalFallback}async startMedia(Ce){return y(`Mock media started: ${JSON.stringify(Ce)}`,"info"),null}async stopMedia(){y("Mock media stopped","info")}async dhtPut(Ce,pt,vt){return y(`Mock DHT PUT: ${Ce}`,"info"),!0}async dhtGet(Ce,pt){return y(`Mock DHT GET: ${Ce}`,"info"),null}getDHTStats(){return{entries:0,peers:0}}get distributedStorage(){return{store:async(Ce,pt,vt)=>(y(`Mock storage STORE: ${Ce}`,"info"),!0),retrieve:async(Ce,pt)=>(y(`Mock storage RETRIEVE: ${Ce}`,"info"),null),getStats:async()=>({items:0,size:0})}}get cryptoManager(){return{init:async()=>!0,getPublicKey:()=>"mock-public-key"}}},ps={enableWebDHT:!0,enableCrypto:!0,enableDistributedStorage:!0,networkName:i.value,allowGlobalFallback:d.value,maxPeers:f.maxPeers,minPeers:f.minPeers,autoConnect:!0,autoDiscovery:f.autoDiscovery,evictionStrategy:f.evictionStrategy,xorRouting:f.xorRouting,...m};e.value=Rs(new Re(ps))}return Se(),await e.value.init(),t.value=!0,a.value=e.value.peerId,e.value.getNetworkName&&(i.value=e.value.getNetworkName(),r.value=e.value.getOriginalNetworkName(),l.value=e.value.isUsingGlobalFallback()),e.value.cryptoManager&&(await e.value.cryptoManager.init(),ee.enabled=!0,ee.initialized=!0,ee.publicKey=e.value.cryptoManager.getPublicKey()),y(`Mesh initialized successfully in network: ${i.value}`,"success"),!0}catch(X){throw y(`Failed to initialize mesh: ${X.message}`,"error"),X}},j=async m=>{if(!e.value||!t.value)throw new Error("Mesh not initialized");if(n.value&&o.value===m){y("Already connected to this signaling server","warning");return}try{return o.value=m,await e.value.connect(m),n.value=!0,y(`Connected to signaling server: ${m}`,"success"),!0}catch(A){throw y(`Failed to connect to signaling server: ${A.message}`,"error"),A}},le=()=>{e.value&&(e.value.disconnect(),n.value=!1,p.clear(),g.clear(),f.connectedCount=0,y("Disconnected from mesh","info"))},Se=()=>{e.value&&(e.value.addEventListener("statusChanged",m=>{y(`Status: ${m.type} - ${m.message||""}`,"info"),m.type==="connected"?(n.value=!0,y("Signaling connection established","success")):m.type==="disconnected"&&(n.value=!1,y("Signaling connection lost","warning")),m.type==="network"&&(i.value=m.networkName||i.value,l.value=m.fallbackMode||!1,y(`Network status: ${m.message}`,m.fallbackMode?"warning":"info")),m.type==="setting"&&(m.setting==="networkName"?i.value=m.value:m.setting==="allowGlobalFallback"&&(d.value=m.value)),re()}),e.value.addEventListener("peerConnected",m=>{if(console.log("๐ค PEER CONNECTED EVENT:",m),e.value.connectionManager){const X=e.value.connectionManager.peers.get(m.peerId);X&&X.allowRemoteStreamEmission&&(X.allowRemoteStreamEmission(),console.log(`๐ Enabled remote stream reception from ${m.peerId.substring(0,8)}...`),y(`Enabled remote stream reception from ${m.peerId.substring(0,8)}...`,"info"))}const A={id:m.peerId,connected:!0,connectionTime:new Date,status:"connected"};p.set(m.peerId,A),re(),y(`Peer connected: ${m.peerId.substring(0,8)}...`,"success")}),e.value.addEventListener("peerDisconnected",m=>{console.log("๐ PEER DISCONNECTED EVENT:",m);const A=p.get(m.peerId);A&&(A.connected=!1,A.status="disconnected",A.disconnectionTime=new Date,A.disconnectionReason=m.reason),re(),y(`Peer disconnected: ${m.peerId.substring(0,8)}... (${m.reason})`,"warning")}),e.value.addEventListener("peerDiscovered",m=>{var A;console.log("๐ PEER DISCOVERED EVENT:",m),console.log("๐ OUR PEER ID:",(A=e.value)==null?void 0:A.peerId),console.log("๐ DISCOVERED PEER ID:",m.peerId),g.set(m.peerId,{id:m.peerId,discoveryTime:new Date,status:"discovered"}),y(`Peer discovered: ${m.peerId.substring(0,8)}...`,"info")}),e.value.addEventListener("messageReceived",m=>{var pt;if(console.log("[DEBUG] messageReceived event:",JSON.stringify({from:m.from,message:m.message,content:m.content,data:m.data,subtype:m.subtype,messageId:m.messageId},null,2)),m.from&&(m.from===a.value||m.from===e.value.peerId)){console.log("[DEBUG] Filtering out self-originated message");return}const A=new Set(["signaling-relay","peer-announce-relay","bootstrap-keepalive","client-peer-announcement","cross-bootstrap-signaling","dht","eviction","renegotiation-offer","renegotiation-answer","signaling","binary","key_exchange"]),X=m.message??m.content??m.data??null;if(console.log("[DEBUG] rawContent:",X),(()=>{if(!X)return!1;try{const vt=typeof X=="string"?null:X;if(vt&&(vt.event||vt.type&&A.has(vt.type)||vt.broadcast&&vt.data&&vt.type&&A.has(vt.type))||m.data&&m.data.type&&A.has(m.data.type))return!0}catch{}return!1})())return;let Re=X,ps=!1;if(Re&&typeof Re=="object"&&(Re.encrypted&&Re.data?(ps=!0,Re=Re.data):Re.message?Re=Re.message:Re.broadcast&&Re.data&&(Re=Re.data,Re&&Re.encrypted&&(ps=!0))),!Re||typeof Re=="string"&&Re.trim().length===0){console.log("[DEBUG] Filtering out empty displayContent:",Re);return}console.log("[DEBUG] Creating message object with displayContent:",Re);const Ce={id:m.messageId||Date.now().toString(),content:Re,from:m.from,timestamp:new Date,type:m.subtype||"broadcast",fromPeerId:((pt=m.from)==null?void 0:pt.substring(0,8))+"..."||"unknown",encrypted:ps||!!m.encrypted};m.subtype==="direct"?(D.has(m.from)||D.set(m.from,[]),D.get(m.from).push(Ce)):S.value.push(Ce),y(`Message received from ${Ce.fromPeerId}: ${typeof Ce.content=="string"?Ce.content:JSON.stringify(Ce.content)}`,"info")}),e.value.addEventListener("localStreamStarted",m=>{M.localStream=m.stream,y("Local media stream started","success")}),e.value.addEventListener("localStreamStopped",()=>{M.localStream=null,y("Local media stream stopped","info")}),e.value.addEventListener("remoteStream",m=>{M.remoteStreams.set(m.peerId,{stream:m.stream,peerId:m.peerId,startTime:new Date}),y(`Remote stream received from ${m.peerId.substring(0,8)}...`,"success")}),e.value.addEventListener("remoteStreamEnded",m=>{M.remoteStreams.delete(m.peerId),y(`Remote stream ended from ${m.peerId.substring(0,8)}...`,"info")}),e.value.addEventListener("dhtValueChanged",m=>{z.set(m.key,{value:m.newValue,timestamp:new Date,version:m.version}),y(`DHT value changed: ${m.key}`,"info")}),e.value.addEventListener("storageDataStored",m=>{y(`Storage data stored: ${m.key}`,"success")}),e.value.addEventListener("storageDataUpdated",m=>{y(`Storage data updated: ${m.key} (version ${m.version})`,"info")}),e.value.addEventListener("cryptoReady",()=>{ee.initialized=!0,y("Crypto system ready","success")}),e.value.addEventListener("peerKeyAdded",m=>{ee.peerKeys.set(m.peerId,m.publicKey),y(`Peer key added: ${m.peerId.substring(0,8)}...`,"success")}),e.value.addEventListener("connectionStats",m=>{ue.value.push({...m,timestamp:Date.now()}),ue.value.length>100&&ue.value.shift()}),e.value.addEventListener("selectiveStreamStarted",m=>{var A;y(`Selective streaming started to ${((A=m.targetPeerIds)==null?void 0:A.length)||0} peer(s)`,"info")}),e.value.addEventListener("selectiveStreamStopped",m=>{y(`Selective streaming stopped${m.returnToBroadcast?" (broadcast mode)":""}`,"info")}),e.value.addEventListener("broadcastStreamEnabled",()=>{y("Broadcast streaming enabled for all peers","info")}),e.value.addEventListener("streamingBlockedToPeers",m=>{var A;y(`Streaming blocked to ${((A=m.blockedPeerIds)==null?void 0:A.length)||0} peer(s)`,"warning")}),e.value.addEventListener("streamingAllowedToPeers",m=>{var A;y(`Streaming allowed to ${((A=m.allowedPeerIds)==null?void 0:A.length)||0} peer(s)`,"success")}))},re=()=>{if(!e.value)return;const m=e.value.getStatus();f.connectedCount=m.connectedCount,f.maxPeers=m.maxPeers,f.minPeers=m.minPeers,f.autoDiscovery=m.autoDiscovery,f.evictionStrategy=m.evictionStrategy,f.xorRouting=m.xorRouting},y=(m,A="info")=>{const X={timestamp:new Date,message:m,level:A,id:Date.now()+Math.random()};ce.value.push(X),ce.value.length>100&&ce.value.shift()},J=m=>{if(!e.value||!n.value)throw new Error("Not connected to mesh");const A=e.value.sendMessage(m),X={id:A,content:m,from:a.value,timestamp:new Date,type:"broadcast",fromPeerId:"You"};return S.value.push(X),y(`Broadcast message sent: ${JSON.stringify(m)}`,"success"),A},ve=(m,A)=>{if(!e.value||!n.value)throw new Error("Not connected to mesh");const X=e.value.sendDirectMessage(m,A),De={id:X,content:A,from:a.value,to:m,timestamp:new Date,type:"direct",fromPeerId:"You"};return D.has(m)||D.set(m,[]),D.get(m).push(De),y(`Direct message sent to ${m.substring(0,8)}...: ${JSON.stringify(A)}`,"success"),X},$e=async(m,A)=>{if(!e.value||!n.value)throw new Error("Not connected to mesh");if(!e.value.sendEncryptedMessage)throw new Error("Encrypted messaging not available");const X=await e.value.sendEncryptedMessage(m,A),De={id:X,content:A,from:a.value,to:m,timestamp:new Date,type:"encrypted-direct",fromPeerId:"You"};return D.has(m)||D.set(m,[]),D.get(m).push(De),y(`Encrypted direct message sent to ${m.substring(0,8)}...`,"success"),X},Ee=async(m,A=null)=>{if(!e.value||!n.value)throw new Error("Not connected to mesh");if(!e.value.sendEncryptedBroadcast)throw new Error("Encrypted broadcast not available");const X=await e.value.sendEncryptedBroadcast(m,A),De={id:X,content:m,from:a.value,timestamp:new Date,type:"encrypted",fromPeerId:"You"};return S.value.push(De),y("Encrypted broadcast message sent","success"),X},Ve=async(m={})=>{if(!e.value)throw new Error("Mesh not initialized");const A=await e.value.startMedia(m);return M.audioEnabled=A.getAudioTracks().length>0,M.videoEnabled=A.getVideoTracks().length>0,A},Ae=async()=>{e.value&&(await e.value.stopMedia(),M.audioEnabled=!1,M.videoEnabled=!1)},He=async()=>{var m;if(!((m=e.value)!=null&&m.initializeMedia))throw new Error("Media initialization not available");return await e.value.initializeMedia()},ne=async()=>{var A;if(!((A=e.value)!=null&&A.enumerateMediaDevices))throw new Error("Media device enumeration not available");const m=await e.value.enumerateMediaDevices();return M.devices=m,m},$=()=>{var A;if(!((A=e.value)!=null&&A.toggleVideo))throw new Error("Video toggle not available");const m=e.value.toggleVideo();return M.videoEnabled=!!m,m},I=()=>{var A;if(!((A=e.value)!=null&&A.toggleAudio))throw new Error("Audio toggle not available");const m=e.value.toggleAudio();return M.audioEnabled=!!m,m},u=async(m,A={})=>{var De;if(!((De=e.value)!=null&&De.startSelectiveStream))throw new Error("Selective streaming not available");const X=await e.value.startSelectiveStream(m,A);return M.audioEnabled=!!A.audio,M.videoEnabled=!!A.video,X},L=async(m=!1)=>{var A;if(!((A=e.value)!=null&&A.stopSelectiveStream))throw new Error("Selective streaming not available");return await e.value.stopSelectiveStream(m)};return{mesh:e,isInitialized:t,isConnected:n,signalingUrl:o,peerId:a,networkName:i,originalNetworkName:r,isInFallbackMode:l,allowGlobalFallback:d,peers:p,discoveredPeers:g,networkStatus:f,messages:S,directMessages:D,mediaState:M,dhtData:z,dhtStats:B,storageData:Y,storageStats:q,cryptoKeys:Z,cryptoState:ee,debugLogs:ce,debugModules:ye,enabledModules:pe,connectedPeersList:se,canAcceptMorePeers:V,initMesh:F,connectToSignaling:j,disconnect:le,sendBroadcastMessage:J,sendDirectMessage:ve,startMedia:Ve,stopMedia:Ae,dhtPut:async(m,A,X={})=>{if(!e.value)throw new Error("Mesh not initialized");const De=await e.value.dhtPut(m,A,X);return De&&(z.set(m,{value:A,timestamp:new Date,local:!0}),y(`DHT put: ${m}`,"success")),De},dhtGet:async(m,A={})=>{if(!e.value)throw new Error("Mesh not initialized");const X=await e.value.dhtGet(m,A);return X!==null&&(z.set(m,{value:X,timestamp:new Date,local:!1}),y(`DHT get: ${m}`,"success")),X},getDHTStats:()=>e.value?e.value.getDHTStats():{},storageStore:async(m,A,X={})=>{var Re;if(!((Re=e.value)!=null&&Re.distributedStorage))throw new Error("Distributed storage not available");const De=await e.value.distributedStorage.store(m,A,X);return Y.set(m,{value:A,options:X,timestamp:new Date,local:!0}),De},storageRetrieve:async(m,A={})=>{var De;if(!((De=e.value)!=null&&De.distributedStorage))throw new Error("Distributed storage not available");const X=await e.value.distributedStorage.retrieve(m,A);return X!==null&&Y.set(m,{value:X,timestamp:new Date,local:!1}),X},getStorageStats:async()=>{var m;return(m=e.value)!=null&&m.distributedStorage?await e.value.distributedStorage.getStats():{}},getDebugModules:()=>{var m;return(m=e.value)!=null&&m.debugLogger?e.value.debugLogger.getModules():["PeerPigeonMesh","ConnectionManager","GossipManager","WebDHT","CryptoManager","MediaManager"]},enableDebugModule:m=>{var A;pe.value.add(m),(A=e.value)!=null&&A.debugLogger&&e.value.debugLogger.enable(m),y(`Debug enabled for module: ${m}`,"info")},disableDebugModule:m=>{var A;pe.value.delete(m),(A=e.value)!=null&&A.debugLogger&&e.value.debugLogger.disable(m),y(`Debug disabled for module: ${m}`,"info")},clearDebugLogs:()=>{ce.value=[]},addDebugLog:y,connectionStats:ue,setNetworkName:m=>{if(e.value&&e.value.setNetworkName){const A=e.value.setNetworkName(m);return i.value=A,r.value=e.value.getOriginalNetworkName(),l.value=e.value.isUsingGlobalFallback(),y(`Network changed to: ${A}`,"success"),A}else return i.value=m||"global",r.value=i.value,l.value=!1,y(`Network name set: ${i.value}`,"info"),i.value},getNetworkInfo:()=>({currentNetwork:i.value,originalNetwork:r.value,isInFallbackMode:l.value,allowGlobalFallback:d.value}),setAllowGlobalFallback:m=>{if(e.value&&e.value.setAllowGlobalFallback){const A=e.value.setAllowGlobalFallback(m);return d.value=A,y(`Global fallback ${m?"enabled":"disabled"}`,"success"),A}else return d.value=m,y(`Global fallback setting: ${m}`,"info"),d.value},forceReturnToOriginalNetwork:async()=>{e.value&&e.value._tryReturnToOriginalNetwork?(await e.value._tryReturnToOriginalNetwork(),i.value=e.value.getNetworkName(),l.value=e.value.isUsingGlobalFallback(),y("Attempted to return to original network","info")):y("Force return to original network not available","warning")},cleanupStaleSignalingData:async()=>{var A;if(!((A=e.value)!=null&&A.cleanupStaleSignalingData))throw new Error("Cleanup not available");const m=await e.value.cleanupStaleSignalingData();return y("Stale signaling data cleaned up","success"),m},forceConnectToAllPeers:()=>{var A;if(!((A=e.value)!=null&&A.forceConnectToAllPeers))throw new Error("Force connect not available");const m=e.value.forceConnectToAllPeers();return y(`Forced ${m} connection attempt(s)`,"info"),m},getPeerStateSummary:()=>{var m;return(m=e.value)!=null&&m.getPeerStateSummary?e.value.getPeerStateSummary():{}},startConnectionMonitoring:()=>{var m;(m=e.value)!=null&&m.startConnectionMonitoring&&(e.value.startConnectionMonitoring(),y("Connection monitoring started","info"))},stopConnectionMonitoring:()=>{var m;(m=e.value)!=null&&m.stopConnectionMonitoring&&(e.value.stopConnectionMonitoring(),y("Connection monitoring stopped","info"))},debugConnectivity:()=>{var m;(m=e.value)!=null&&m.debugConnectivity&&(e.value.debugConnectivity(),y("Connectivity debug invoked","info"))},getConnectedPeerIds:()=>{var m;return(m=e.value)!=null&&m.getConnectedPeerIds?e.value.getConnectedPeerIds():se.value.map(A=>A.id)},getPeers:()=>Array.from(p.values()),getDiscoveredPeers:()=>Array.from(g.values()),validatePeerId:m=>{var X;const A=(X=window.PeerPigeon)==null?void 0:X.PeerPigeonMesh;return A!=null&&A.validatePeerId?A.validatePeerId(m):!1},connectToPeer:m=>{var A;if(!((A=e.value)!=null&&A.connectToPeer))throw new Error("Connect-to-peer not available");return e.value.connectToPeer(m)},initializeCrypto:async()=>{try{return ee.initialized=!0,y("Crypto system initialized","success"),!0}catch(m){return y(`Crypto initialization failed: ${m.message}`,"error"),!1}},cryptoGenerateKey:async(m,A,X)=>{try{const De={id:Date.now().toString(),name:X,type:m,size:A,algorithm:m,usage:["encrypt","decrypt","sign","verify"],extractable:!0,created:Date.now(),fingerprint:Math.random().toString(36).substring(2)};return Z.value.push(De),y(`Generated ${m} key: ${X}`,"success"),De}catch(De){return y(`Key generation failed: ${De.message}`,"error"),null}},cryptoImportKey:async(m,A)=>{try{const X={id:Date.now().toString(),name:A,type:"imported",algorithm:"RSA",usage:["encrypt","decrypt"],extractable:!0,created:Date.now(),fingerprint:Math.random().toString(36).substring(2)};return Z.value.push(X),y(`Imported key: ${A}`,"success"),!0}catch(X){return y(`Key import failed: ${X.message}`,"error"),!1}},cryptoEncrypt:async(m,A,X)=>{try{const De=btoa(JSON.stringify(m));return y(`Data encrypted with key: ${A}`,"success"),De}catch(De){return y(`Encryption failed: ${De.message}`,"error"),null}},cryptoDecrypt:async(m,A)=>{try{const X=JSON.parse(atob(m));return y(`Data decrypted with key: ${A}`,"success"),X}catch(X){return y(`Decryption failed: ${X.message}`,"error"),null}},cryptoSign:async(m,A,X)=>{try{const De=btoa(m+A+Date.now());return y(`Data signed with key: ${A}`,"success"),De}catch(De){return y(`Signing failed: ${De.message}`,"error"),null}},cryptoVerify:async(m,A,X)=>{try{return y(`Signature verified with key: ${X}`,"success"),!0}catch(De){return y(`Verification failed: ${De.message}`,"error"),!1}},cryptoKeyExchange:async(m,A,X)=>{try{const De={keyId:Date.now().toString(),peerId:m,method:A,purpose:X,created:Date.now()};return y(`Key exchange initiated: ${A}`,"success"),De}catch(De){return y(`Key exchange failed: ${De.message}`,"error"),null}},exchangeKeysWithPeer:async m=>{var A;if(!((A=e.value)!=null&&A.exchangeKeysWithPeer))throw new Error("Key exchange not available");await e.value.exchangeKeysWithPeer(m),y(`Key exchange initiated with ${m.substring(0,8)}...`,"info")},addPeerPublicKey:async(m,A)=>{var De;if(!((De=e.value)!=null&&De.addPeerPublicKey))throw new Error("Add peer key not available");const X=await e.value.addPeerPublicKey(m,A);return X&&y(`Public key added for ${m.substring(0,8)}...`,"success"),X},cryptoRefreshKeys:async()=>{y("Key store refreshed","info")},cryptoExportKey:async m=>{const A=Z.value.find(X=>X.id===m);return A?(y(`Key exported: ${A.name}`,"success"),{...A,privateKey:"mock-private-key"}):null},cryptoDeleteKey:async m=>{const A=Z.value.findIndex(X=>X.id===m);if(A!==-1){const X=Z.value.splice(A,1)[0];return y(`Key deleted: ${X.name}`,"info"),!0}return!1},sendEncryptedDirectMessage:$e,sendEncryptedBroadcastMessage:Ee,initializeMedia:He,enumerateMediaDevices:ne,toggleVideo:$,toggleAudio:I,startSelectiveStream:u,stopSelectiveStream:L,switchToBroadcastMode:async()=>await L(!0),blockStreamingToPeers:async m=>{var A;if(!((A=e.value)!=null&&A.blockStreamingToPeers))throw new Error("Selective streaming not available");return await e.value.blockStreamingToPeers(m)},allowStreamingToPeers:async m=>{var A;if(!((A=e.value)!=null&&A.allowStreamingToPeers))throw new Error("Selective streaming not available");return await e.value.allowStreamingToPeers(m)},getStreamingPeers:()=>{var m;return(m=e.value)!=null&&m.getStreamingPeers?e.value.getStreamingPeers():[]},getBlockedStreamingPeers:()=>{var m;return(m=e.value)!=null&&m.getBlockedStreamingPeers?e.value.getBlockedStreamingPeers():[]},isStreamingToAll:()=>{var m;return(m=e.value)!=null&&m.isStreamingToAll?e.value.isStreamingToAll():!1},dhtSubscribe:async m=>{var X;if(!((X=e.value)!=null&&X.dhtSubscribe))throw new Error("WebDHT not available");const A=await e.value.dhtSubscribe(m);return y(`DHT subscribe: ${m}`,"info"),A},dhtUnsubscribe:async m=>{var X;if(!((X=e.value)!=null&&X.dhtUnsubscribe))throw new Error("WebDHT not available");const A=await e.value.dhtUnsubscribe(m);return y(`DHT unsubscribe: ${m}`,"info"),A}}}),Mt=(e,t)=>{const n=e.__vccOpts||e;for(const[o,a]of t)n[o]=a;return n},_c={id:"app"},Ec={class:"header"},Tc={class:"container"},Pc={class:"header-content"},Rc={class:"status-bar"},xc={key:0,class:"status-item"},Lc={class:"network-display"},Ac={key:0,class:"fallback-indicator"},Mc={key:1,class:"status-item"},Ic={class:"status-item"},Nc={class:"connection-controls"},Oc={class:"input-group"},Vc=["disabled"],Uc={class:"input-group"},Fc=["disabled"],Kc=["disabled"],Hc={class:"nav-tabs"},Bc={class:"container"},jc={class:"tabs"},Gc={class:"main-content"},zc={class:"container"},Wc={__name:"App",setup(e){const t=At(),n=ge(()=>t.isInitialized),o=ge(()=>t.isConnected),a=ge({get:()=>t.signalingUrl,set:g=>t.signalingUrl=g}),i=ge({get:()=>t.networkName,set:g=>t.setNetworkName(g)}),r=ge(()=>t.peerId),l=ge(()=>t.networkStatus),d=async()=>{try{i.value&&i.value.trim()&&t.setNetworkName(i.value.trim()),await t.connectToSignaling(a.value)}catch(g){console.error("Connection failed:",g),alert(`Connection failed: ${g.message}`)}},p=()=>{t.disconnect()};return Wt(async()=>{try{const g={};i.value&&i.value.trim()&&(g.networkName=i.value.trim()),await t.initMesh(g)}catch(g){console.error("Failed to initialize mesh:",g),alert(`Failed to initialize mesh: ${g.message}`)}}),(g,f)=>{const S=Eo("router-link"),D=Eo("router-view");return R(),x("div",_c,[s("header",Ec,[s("div",Tc,[s("div",Pc,[f[8]||(f[8]=s("div",{class:"logo"},[s("img",{src:kc,alt:"PeerPigeon Logo",width:"40",height:"40",class:"logo-icon"}),s("h1",null,"PeerPigeon Vue 3 Demo")],-1)),s("div",Rc,[s("div",{class:ke(["status-item",{connected:o.value,disconnected:!o.value}])},[f[2]||(f[2]=s("span",{class:"status-dot"},null,-1)),P(" "+E(o.value?"Connected":"Disconnected"),1)],2),i.value?(R(),x("div",xc,[f[3]||(f[3]=s("strong",null,"Network:",-1)),s("span",Lc,E(i.value),1),We(t).isInFallbackMode?(R(),x("span",Ac,"Fallback")):de("",!0)])):de("",!0),r.value?(R(),x("div",Mc,[f[4]||(f[4]=s("strong",null,"ID:",-1)),P(" "+E(r.value.substring(0,8))+"... ",1)])):de("",!0),s("div",Ic,[f[5]||(f[5]=s("strong",null,"Peers:",-1)),P(" "+E(l.value.connectedCount)+"/"+E(l.value.maxPeers),1)])]),s("div",Nc,[s("div",Oc,[f[6]||(f[6]=s("label",{for:"network-input"},"Network:",-1)),ae(s("input",{id:"network-input","onUpdate:modelValue":f[0]||(f[0]=M=>i.value=M),placeholder:"global",class:"network-input",disabled:o.value,title:"Network name (e.g., 'gaming', 'work', 'family')"},null,8,Vc),[[Te,i.value]])]),s("div",Uc,[f[7]||(f[7]=s("label",{for:"url-input"},"Signaling Server:",-1)),ae(s("input",{id:"url-input","onUpdate:modelValue":f[1]||(f[1]=M=>a.value=M),placeholder:"ws://localhost:3000",class:"url-input",disabled:o.value},null,8,Fc),[[Te,a.value]])]),o.value?(R(),x("button",{key:1,onClick:p,class:"btn btn-secondary"}," Disconnect ")):(R(),x("button",{key:0,onClick:d,disabled:!n.value,class:"btn btn-primary"},E(n.value?"Connect":"Initializing..."),9,Kc))])])])]),s("nav",Hc,[s("div",Bc,[s("div",jc,[Ue(S,{to:"/network",class:"tab"},{default:Ct(()=>[...f[9]||(f[9]=[s("span",{class:"tab-icon"},"๐",-1),P(" Network ",-1)])]),_:1}),Ue(S,{to:"/messaging",class:"tab"},{default:Ct(()=>[...f[10]||(f[10]=[s("span",{class:"tab-icon"},"๐ฌ",-1),P(" Messaging ",-1)])]),_:1}),Ue(S,{to:"/media",class:"tab"},{default:Ct(()=>[...f[11]||(f[11]=[s("span",{class:"tab-icon"},"๐ฅ",-1),P(" Media ",-1)])]),_:1}),Ue(S,{to:"/dht",class:"tab"},{default:Ct(()=>[...f[12]||(f[12]=[s("span",{class:"tab-icon"},"๐๏ธ",-1),P(" DHT ",-1)])]),_:1}),Ue(S,{to:"/storage",class:"tab"},{default:Ct(()=>[...f[13]||(f[13]=[s("span",{class:"tab-icon"},"๐ฆ",-1),P(" Storage ",-1)])]),_:1}),Ue(S,{to:"/crypto",class:"tab"},{default:Ct(()=>[...f[14]||(f[14]=[s("span",{class:"tab-icon"},"๐",-1),P(" Crypto ",-1)])]),_:1}),Ue(S,{to:"/debug",class:"tab"},{default:Ct(()=>[...f[15]||(f[15]=[s("span",{class:"tab-icon"},"๐",-1),P(" Debug ",-1)])]),_:1}),Ue(S,{to:"/testing",class:"tab"},{default:Ct(()=>[...f[16]||(f[16]=[s("span",{class:"tab-icon"},"๐งช",-1),P(" Testing ",-1)])]),_:1})])])]),s("main",Gc,[s("div",zc,[Ue(D)])])])}}},Jc=Mt(Wc,[["__scopeId","data-v-d77d2bdf"]]);/*!
* vue-router v4.6.3
* (c) 2025 Eduardo San Martin Morote
* @license MIT
*/const as=typeof document<"u";function Li(e){return typeof e=="object"||"displayName"in e||"props"in e||"__vccOpts"in e}function qc(e){return e.__esModule||e[Symbol.toStringTag]==="Module"||e.default&&Li(e.default)}const xe=Object.assign;function An(e,t){const n={};for(const o in t){const a=t[o];n[o]=gt(a)?a.map(e):e(a)}return n}const Es=()=>{},gt=Array.isArray;function oa(e,t){const n={};for(const o in e)n[o]=o in t?t[o]:e[o];return n}const Ai=/#/g,Yc=/&/g,Qc=/\//g,Xc=/=/g,Zc=/\?/g,Mi=/\+/g,eu=/%5B/g,tu=/%5D/g,Ii=/%5E/g,su=/%60/g,Ni=/%7B/g,nu=/%7C/g,Oi=/%7D/g,ou=/%20/g;function ho(e){return e==null?"":encodeURI(""+e).replace(nu,"|").replace(eu,"[").replace(tu,"]")}function au(e){return ho(e).replace(Ni,"{").replace(Oi,"}").replace(Ii,"^")}function qn(e){return ho(e).replace(Mi,"%2B").replace(ou,"+").replace(Ai,"%23").replace(Yc,"%26").replace(su,"`").replace(Ni,"{").replace(Oi,"}").replace(Ii,"^")}function iu(e){return qn(e).replace(Xc,"%3D")}function ru(e){return ho(e).replace(Ai,"%23").replace(Zc,"%3F")}function lu(e){return ru(e).replace(Qc,"%2F")}function Is(e){if(e==null)return null;try{return decodeURIComponent(""+e)}catch{}return""+e}const cu=/\/$/,uu=e=>e.replace(cu,"");function Mn(e,t,n="/"){let o,a={},i="",r="";const l=t.indexOf("#");let d=t.indexOf("?");return d=l>=0&&d>l?-1:d,d>=0&&(o=t.slice(0,d),i=t.slice(d,l>0?l:t.length),a=e(i.slice(1))),l>=0&&(o=o||t.slice(0,l),r=t.slice(l,t.length)),o=pu(o??t,n),{fullPath:o+i+r,path:o,query:a,hash:Is(r)}}function du(e,t){const n=t.query?e(t.query):"";return t.path+(n&&"?")+n+(t.hash||"")}function aa(e,t){return!t||!e.toLowerCase().startsWith(t.toLowerCase())?e:e.slice(t.length)||"/"}function fu(e,t,n){const o=t.matched.length-1,a=n.matched.length-1;return o>-1&&o===a&&ds(t.matched[o],n.matched[a])&&Vi(t.params,n.params)&&e(t.query)===e(n.query)&&t.hash===n.hash}function ds(e,t){return(e.aliasOf||e)===(t.aliasOf||t)}function Vi(e,t){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e)if(!gu(e[n],t[n]))return!1;return!0}function gu(e,t){return gt(e)?ia(e,t):gt(t)?ia(t,e):e===t}function ia(e,t){return gt(t)?e.length===t.length&&e.every((n,o)=>n===t[o]):e.length===1&&e[0]===t}function pu(e,t){if(e.startsWith("/"))return e;if(!e)return t;const n=t.split("/"),o=e.split("/"),a=o[o.length-1];(a===".."||a===".")&&o.push("");let i=n.length-1,r,l;for(r=0;r<o.length;r++)if(l=o[r],l!==".")if(l==="..")i>1&&i--;else break;return n.slice(0,i).join("/")+"/"+o.slice(r).join("/")}const It={path:"/",name:void 0,params:{},query:{},hash:"",fullPath:"/",matched:[],meta:{},redirectedFrom:void 0};let Yn=function(e){return e.pop="pop",e.push="push",e}({}),In=function(e){return e.back="back",e.forward="forward",e.unknown="",e}({});function vu(e){if(!e)if(as){const t=document.querySelector("base");e=t&&t.getAttribute("href")||"/",e=e.replace(/^\w+:\/\/[^\/]+/,"")}else e="/";return e[0]!=="/"&&e[0]!=="#"&&(e="/"+e),uu(e)}const mu=/^[^#]+#/;function bu(e,t){return e.replace(mu,"#")+t}function hu(e,t){const n=document.documentElement.getBoundingClientRect(),o=e.getBoundingClientRect();return{behavior:t.behavior,left:o.left-n.left-(t.left||0),top:o.top-n.top-(t.top||0)}}const hn=()=>({left:window.scrollX,top:window.scrollY});function yu(e){let t;if("el"in e){const n=e.el,o=typeof n=="string"&&n.startsWith("#"),a=typeof n=="string"?o?document.getElementById(n.slice(1)):document.querySelector(n):n;if(!a)return;t=hu(a,e)}else t=e;"scrollBehavior"in document.documentElement.style?window.scrollTo(t):window.scrollTo(t.left!=null?t.left:window.scrollX,t.top!=null?t.top:window.scrollY)}function ra(e,t){return(history.state?history.state.position-t:-1)+e}const Qn=new Map;function wu(e,t){Qn.set(e,t)}function Su(e){const t=Qn.get(e);return Qn.delete(e),t}function Du(e){return typeof e=="string"||e&&typeof e=="object"}function Ui(e){return typeof e=="string"||typeof e=="symbol"}let Fe=function(e){return e[e.MATCHER_NOT_FOUND=1]="MATCHER_NOT_FOUND",e[e.NAVIGATION_GUARD_REDIRECT=2]="NAVIGATION_GUARD_REDIRECT",e[e.NAVIGATION_ABORTED=4]="NAVIGATION_ABORTED",e[e.NAVIGATION_CANCELLED=8]="NAVIGATION_CANCELLED",e[e.NAVIGATION_DUPLICATED=16]="NAVIGATION_DUPLICATED",e}({});const Fi=Symbol("");Fe.MATCHER_NOT_FOUND+"",Fe.NAVIGATION_GUARD_REDIRECT+"",Fe.NAVIGATION_ABORTED+"",Fe.NAVIGATION_CANCELLED+"",Fe.NAVIGATION_DUPLICATED+"";function fs(e,t){return xe(new Error,{type:e,[Fi]:!0},t)}function kt(e,t){return e instanceof Error&&Fi in e&&(t==null||!!(e.type&t))}const $u=["params","query","hash"];function ku(e){if(typeof e=="string")return e;if(e.path!=null)return e.path;const t={};for(const n of $u)n in e&&(t[n]=e[n]);return JSON.stringify(t,null,2)}function Cu(e){const t={};if(e===""||e==="?")return t;const n=(e[0]==="?"?e.slice(1):e).split("&");for(let o=0;o<n.length;++o){const a=n[o].replace(Mi," "),i=a.indexOf("="),r=Is(i<0?a:a.slice(0,i)),l=i<0?null:Is(a.slice(i+1));if(r in t){let d=t[r];gt(d)||(d=t[r]=[d]),d.push(l)}else t[r]=l}return t}function la(e){let t="";for(let n in e){const o=e[n];if(n=iu(n),o==null){o!==void 0&&(t+=(t.length?"&":"")+n);continue}(gt(o)?o.map(a=>a&&qn(a)):[o&&qn(o)]).forEach(a=>{a!==void 0&&(t+=(t.length?"&":"")+n,a!=null&&(t+="="+a))})}return t}function _u(e){const t={};for(const n in e){const o=e[n];o!==void 0&&(t[n]=gt(o)?o.map(a=>a==null?null:""+a):o==null?o:""+o)}return t}const Eu=Symbol(""),ca=Symbol(""),yo=Symbol(""),Ki=Symbol(""),Xn=Symbol("");function bs(){let e=[];function t(o){return e.push(o),()=>{const a=e.indexOf(o);a>-1&&e.splice(a,1)}}function n(){e=[]}return{add:t,list:()=>e.slice(),reset:n}}function Ut(e,t,n,o,a,i=r=>r()){const r=o&&(o.enterCallbacks[a]=o.enterCallbacks[a]||[]);return()=>new Promise((l,d)=>{const p=S=>{S===!1?d(fs(Fe.NAVIGATION_ABORTED,{from:n,to:t})):S instanceof Error?d(S):Du(S)?d(fs(Fe.NAVIGATION_GUARD_REDIRECT,{from:t,to:S})):(r&&o.enterCallbacks[a]===r&&typeof S=="function"&&r.push(S),l())},g=i(()=>e.call(o&&o.instances[a],t,n,p));let f=Promise.resolve(g);e.length<3&&(f=f.then(p)),f.catch(S=>d(S))})}function Nn(e,t,n,o,a=i=>i()){const i=[];for(const r of e)for(const l in r.components){let d=r.components[l];if(!(t!=="beforeRouteEnter"&&!r.instances[l]))if(Li(d)){const p=(d.__vccOpts||d)[t];p&&i.push(Ut(p,n,o,r,l,a))}else{let p=d();i.push(()=>p.then(g=>{if(!g)throw new Error(`Couldn't resolve component "${l}" at "${r.path}"`);const f=qc(g)?g.default:g;r.mods[l]=g,r.components[l]=f;const S=(f.__vccOpts||f)[t];return S&&Ut(S,n,o,r,l,a)()}))}}return i}function Tu(e,t){const n=[],o=[],a=[],i=Math.max(t.matched.length,e.matched.length);for(let r=0;r<i;r++){const l=t.matched[r];l&&(e.matched.find(p=>ds(p,l))?o.push(l):n.push(l));const d=e.matched[r];d&&(t.matched.find(p=>ds(p,d))||a.push(d))}return[n,o,a]}/*!
* vue-router v4.6.3
* (c) 2025 Eduardo San Martin Morote
* @license MIT
*/let Pu=()=>location.protocol+"//"+location.host;function Hi(e,t){const{pathname:n,search:o,hash:a}=t,i=e.indexOf("#");if(i>-1){let r=a.includes(e.slice(i))?e.slice(i).length:1,l=a.slice(r);return l[0]!=="/"&&(l="/"+l),aa(l,"")}return aa(n,e)+o+a}function Ru(e,t,n,o){let a=[],i=[],r=null;const l=({state:S})=>{const D=Hi(e,location),M=n.value,z=t.value;let B=0;if(S){if(n.value=D,t.value=S,r&&r===M){r=null;return}B=z?S.position-z.position:0}else o(D);a.forEach(Y=>{Y(n.value,M,{delta:B,type:Yn.pop,direction:B?B>0?In.forward:In.back:In.unknown})})};function d(){r=n.value}function p(S){a.push(S);const D=()=>{const M=a.indexOf(S);M>-1&&a.splice(M,1)};return i.push(D),D}function g(){if(document.visibilityState==="hidden"){const{history:S}=window;if(!S.state)return;S.replaceState(xe({},S.state,{scroll:hn()}),"")}}function f(){for(const S of i)S();i=[],window.removeEventListener("popstate",l),window.removeEventListener("pagehide",g),document.removeEventListener("visibilitychange",g)}return window.addEventListener("popstate",l),window.addEventListener("pagehide",g),document.addEventListener("visibilitychange",g),{pauseListeners:d,listen:p,destroy:f}}function ua(e,t,n,o=!1,a=!1){return{back:e,current:t,forward:n,replaced:o,position:window.history.length,scroll:a?hn():null}}function xu(e){const{history:t,location:n}=window,o={value:Hi(e,n)},a={value:t.state};a.value||i(o.value,{back:null,current:o.value,forward:null,position:t.length-1,replaced:!0,scroll:null},!0);function i(d,p,g){const f=e.indexOf("#"),S=f>-1?(n.host&&document.querySelector("base")?e:e.slice(f))+d:Pu()+e+d;try{t[g?"replaceState":"pushState"](p,"",S),a.value=p}catch(D){console.error(D),n[g?"replace":"assign"](S)}}function r(d,p){i(d,xe({},t.state,ua(a.value.back,d,a.value.forward,!0),p,{position:a.value.position}),!0),o.value=d}function l(d,p){const g=xe({},a.value,t.state,{forward:d,scroll:hn()});i(g.current,g,!0),i(d,xe({},ua(o.value,d,null),{position:g.position+1},p),!1),o.value=d}return{location:o,state:a,push:l,replace:r}}function Lu(e){e=vu(e);const t=xu(e),n=Ru(e,t.state,t.location,t.replace);function o(i,r=!0){r||n.pauseListeners(),history.go(i)}const a=xe({location:"",base:e,go:o,createHref:bu.bind(null,e)},t,n);return Object.defineProperty(a,"location",{enumerable:!0,get:()=>t.location.value}),Object.defineProperty(a,"state",{enumerable:!0,get:()=>t.state.value}),a}let Qt=function(e){return e[e.Static=0]="Static",e[e.Param=1]="Param",e[e.Group=2]="Group",e}({});var Ge=function(e){return e[e.Static=0]="Static",e[e.Param=1]="Param",e[e.ParamRegExp=2]="ParamRegExp",e[e.ParamRegExpEnd=3]="ParamRegExpEnd",e[e.EscapeNext=4]="EscapeNext",e}(Ge||{});const Au={type:Qt.Static,value:""},Mu=/[a-zA-Z0-9_]/;function Iu(e){if(!e)return[[]];if(e==="/")return[[Au]];if(!e.startsWith("/"))throw new Error(`Invalid path "${e}"`);function t(D){throw new Error(`ERR (${n})/"${p}": ${D}`)}let n=Ge.Static,o=n;const a=[];let i;function r(){i&&a.push(i),i=[]}let l=0,d,p="",g="";function f(){p&&(n===Ge.Static?i.push({type:Qt.Static,value:p}):n===Ge.Param||n===Ge.ParamRegExp||n===Ge.ParamRegExpEnd?(i.length>1&&(d==="*"||d==="+")&&t(`A repeatable param (${p}) must be alone in its segment. eg: '/:ids+.`),i.push({type:Qt.Param,value:p,regexp:g,repeatable:d==="*"||d==="+",optional:d==="*"||d==="?"})):t("Invalid state to consume buffer"),p="")}function S(){p+=d}for(;l<e.length;){if(d=e[l++],d==="\\"&&n!==Ge.ParamRegExp){o=n,n=Ge.EscapeNext;continue}switch(n){case Ge.Static:d==="/"?(p&&f(),r()):d===":"?(f(),n=Ge.Param):S();break;case Ge.EscapeNext:S(),n=o;break;case Ge.Param:d==="("?n=Ge.ParamRegExp:Mu.test(d)?S():(f(),n=Ge.Static,d!=="*"&&d!=="?"&&d!=="+"&&l--);break;case Ge.ParamRegExp:d===")"?g[g.length-1]=="\\"?g=g.slice(0,-1)+d:n=Ge.ParamRegExpEnd:g+=d;break;case Ge.ParamRegExpEnd:f(),n=Ge.Static,d!=="*"&&d!=="?"&&d!=="+"&&l--,g="";break;default:t("Unknown state");break}}return n===Ge.ParamRegExp&&t(`Unfinished custom RegExp for param "${p}"`),f(),r(),a}const da="[^/]+?",Nu={sensitive:!1,strict:!1,start:!0,end:!0};var st=function(e){return e[e._multiplier=10]="_multiplier",e[e.Root=90]="Root",e[e.Segment=40]="Segment",e[e.SubSegment=30]="SubSegment",e[e.Static=40]="Static",e[e.Dynamic=20]="Dynamic",e[e.BonusCustomRegExp=10]="BonusCustomRegExp",e[e.BonusWildcard=-50]="BonusWildcard",e[e.BonusRepeatable=-20]="BonusRepeatable",e[e.BonusOptional=-8]="BonusOptional",e[e.BonusStrict=.7000000000000001]="BonusStrict",e[e.BonusCaseSensitive=.25]="BonusCaseSensitive",e}(st||{});const Ou=/[.+*?^${}()[\]/\\]/g;function Vu(e,t){const n=xe({},Nu,t),o=[];let a=n.start?"^":"";const i=[];for(const p of e){const g=p.length?[]:[st.Root];n.strict&&!p.length&&(a+="/");for(let f=0;f<p.length;f++){const S=p[f];let D=st.Segment+(n.sensitive?st.BonusCaseSensitive:0);if(S.type===Qt.Static)f||(a+="/"),a+=S.value.replace(Ou,"\\$&"),D+=st.Static;else if(S.type===Qt.Param){const{value:M,repeatable:z,optional:B,regexp:Y}=S;i.push({name:M,repeatable:z,optional:B});const q=Y||da;if(q!==da){D+=st.BonusCustomRegExp;try{`${q}`}catch(ee){throw new Error(`Invalid custom RegExp for param "${M}" (${q}): `+ee.message)}}let Z=z?`((?:${q})(?:/(?:${q}))*)`:`(${q})`;f||(Z=B&&p.length<2?`(?:/${Z})`:"/"+Z),B&&(Z+="?"),a+=Z,D+=st.Dynamic,B&&(D+=st.BonusOptional),z&&(D+=st.BonusRepeatable),q===".*"&&(D+=st.BonusWildcard)}g.push(D)}o.push(g)}if(n.strict&&n.end){const p=o.length-1;o[p][o[p].length-1]+=st.BonusStrict}n.strict||(a+="/?"),n.end?a+="$":n.strict&&!a.endsWith("/")&&(a+="(?:/|$)");const r=new RegExp(a,n.sensitive?"":"i");function l(p){const g=p.match(r),f={};if(!g)return null;for(let S=1;S<g.length;S++){const D=g[S]||"",M=i[S-1];f[M.name]=D&&M.repeatable?D.split("/"):D}return f}function d(p){let g="",f=!1;for(const S of e){(!f||!g.endsWith("/"))&&(g+="/"),f=!1;for(const D of S)if(D.type===Qt.Static)g+=D.value;else if(D.type===Qt.Param){const{value:M,repeatable:z,optional:B}=D,Y=M in p?p[M]:"";if(gt(Y)&&!z)throw new Error(`Provided param "${M}" is an array but it is not repeatable (* or + modifiers)`);const q=gt(Y)?Y.join("/"):Y;if(!q)if(B)S.length<2&&(g.endsWith("/")?g=g.slice(0,-1):f=!0);else throw new Error(`Missing required param "${M}"`);g+=q}}return g||"/"}return{re:r,score:o,keys:i,parse:l,stringify:d}}function Uu(e,t){let n=0;for(;n<e.length&&n<t.length;){const o=t[n]-e[n];if(o)return o;n++}return e.length<t.length?e.length===1&&e[0]===st.Static+st.Segment?-1:1:e.length>t.length?t.length===1&&t[0]===st.Static+st.Segment?1:-1:0}function Bi(e,t){let n=0;const o=e.score,a=t.score;for(;n<o.length&&n<a.length;){const i=Uu(o[n],a[n]);if(i)return i;n++}if(Math.abs(a.length-o.length)===1){if(fa(o))return 1;if(fa(a))return-1}return a.length-o.length}function fa(e){const t=e[e.length-1];return e.length>0&&t[t.length-1]<0}const Fu={strict:!1,end:!0,sensitive:!1};function Ku(e,t,n){const o=Vu(Iu(e.path),n),a=xe(o,{record:e,parent:t,children:[],alias:[]});return t&&!a.record.aliasOf==!t.record.aliasOf&&t.children.push(a),a}function Hu(e,t){const n=[],o=new Map;t=oa(Fu,t);function a(f){return o.get(f)}function i(f,S,D){const M=!D,z=pa(f);z.aliasOf=D&&D.record;const B=oa(t,f),Y=[z];if("alias"in f){const ee=typeof f.alias=="string"?[f.alias]:f.alias;for(const ce of ee)Y.push(pa(xe({},z,{components:D?D.record.components:z.components,path:ce,aliasOf:D?D.record:z})))}let q,Z;for(const ee of Y){const{path:ce}=ee;if(S&&ce[0]!=="/"){const ye=S.record.path,pe=ye[ye.length-1]==="/"?"":"/";ee.path=S.record.path+(ce&&pe+ce)}if(q=Ku(ee,S,B),D?D.alias.push(q):(Z=Z||q,Z!==q&&Z.alias.push(q),M&&f.name&&!va(q)&&r(f.name)),ji(q)&&d(q),z.children){const ye=z.children;for(let pe=0;pe<ye.length;pe++)i(ye[pe],q,D&&D.children[pe])}D=D||q}return Z?()=>{r(Z)}:Es}function r(f){if(Ui(f)){const S=o.get(f);S&&(o.delete(f),n.splice(n.indexOf(S),1),S.children.forEach(r),S.alias.forEach(r))}else{const S=n.indexOf(f);S>-1&&(n.splice(S,1),f.record.name&&o.delete(f.record.name),f.children.forEach(r),f.alias.forEach(r))}}function l(){return n}function d(f){const S=Gu(f,n);n.splice(S,0,f),f.record.name&&!va(f)&&o.set(f.record.name,f)}function p(f,S){let D,M={},z,B;if("name"in f&&f.name){if(D=o.get(f.name),!D)throw fs(Fe.MATCHER_NOT_FOUND,{location:f});B=D.record.name,M=xe(ga(S.params,D.keys.filter(Z=>!Z.optional).concat(D.parent?D.parent.keys.filter(Z=>Z.optional):[]).map(Z=>Z.name)),f.params&&ga(f.params,D.keys.map(Z=>Z.name))),z=D.stringify(M)}else if(f.path!=null)z=f.path,D=n.find(Z=>Z.re.test(z)),D&&(M=D.parse(z),B=D.record.name);else{if(D=S.name?o.get(S.name):n.find(Z=>Z.re.test(S.path)),!D)throw fs(Fe.MATCHER_NOT_FOUND,{location:f,currentLocation:S});B=D.record.name,M=xe({},S.params,f.params),z=D.stringify(M)}const Y=[];let q=D;for(;q;)Y.unshift(q.record),q=q.parent;return{name:B,path:z,params:M,matched:Y,meta:ju(Y)}}e.forEach(f=>i(f));function g(){n.length=0,o.clear()}return{addRoute:i,resolve:p,removeRoute:r,clearRoutes:g,getRoutes:l,getRecordMatcher:a}}function ga(e,t){const n={};for(const o of t)o in e&&(n[o]=e[o]);return n}function pa(e){const t={path:e.path,redirect:e.redirect,name:e.name,meta:e.meta||{},aliasOf:e.aliasOf,beforeEnter:e.beforeEnter,props:Bu(e),children:e.children||[],instances:{},leaveGuards:new Set,updateGuards:new Set,enterCallbacks:{},components:"components"in e?e.components||null:e.component&&{default:e.component}};return Object.defineProperty(t,"mods",{value:{}}),t}function Bu(e){const t={},n=e.props||!1;if("component"in e)t.default=n;else for(const o in e.components)t[o]=typeof n=="object"?n[o]:n;return t}function va(e){for(;e;){if(e.record.aliasOf)return!0;e=e.parent}return!1}function ju(e){return e.reduce((t,n)=>xe(t,n.meta),{})}function Gu(e,t){let n=0,o=t.length;for(;n!==o;){const i=n+o>>1;Bi(e,t[i])<0?o=i:n=i+1}const a=zu(e);return a&&(o=t.lastIndexOf(a,o-1)),o}function zu(e){let t=e;for(;t=t.parent;)if(ji(t)&&Bi(e,t)===0)return t}function ji({record:e}){return!!(e.name||e.components&&Object.keys(e.components).length||e.redirect)}function ma(e){const t=wt(yo),n=wt(Ki),o=ge(()=>{const d=We(e.to);return t.resolve(d)}),a=ge(()=>{const{matched:d}=o.value,{length:p}=d,g=d[p-1],f=n.matched;if(!g||!f.length)return-1;const S=f.findIndex(ds.bind(null,g));if(S>-1)return S;const D=ba(d[p-2]);return p>1&&ba(g)===D&&f[f.length-1].path!==D?f.findIndex(ds.bind(null,d[p-2])):S}),i=ge(()=>a.value>-1&&Qu(n.params,o.value.params)),r=ge(()=>a.value>-1&&a.value===n.matched.length-1&&Vi(n.params,o.value.params));function l(d={}){if(Yu(d)){const p=t[We(e.replace)?"replace":"push"](We(e.to)).catch(Es);return e.viewTransition&&typeof document<"u"&&"startViewTransition"in document&&document.startViewTransition(()=>p),p}return Promise.resolve()}return{route:o,href:ge(()=>o.value.href),isActive:i,isExactActive:r,navigate:l}}function Wu(e){return e.length===1?e[0]:e}const Ju=Za({name:"RouterLink",compatConfig:{MODE:3},props:{to:{type:[String,Object],required:!0},replace:Boolean,activeClass:String,exactActiveClass:String,custom:Boolean,ariaCurrentValue:{type:String,default:"page"},viewTransition:Boolean},useLink:ma,setup(e,{slots:t}){const n=tt(ma(e)),{options:o}=wt(yo),a=ge(()=>({[ha(e.activeClass,o.linkActiveClass,"router-link-active")]:n.isActive,[ha(e.exactActiveClass,o.linkExactActiveClass,"router-link-exact-active")]:n.isExactActive}));return()=>{const i=t.default&&Wu(t.default(n));return e.custom?i:Ci("a",{"aria-current":n.isExactActive?e.ariaCurrentValue:null,href:n.href,onClick:n.navigate,class:a.value},i)}}}),qu=Ju;function Yu(e){if(!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)&&!e.defaultPrevented&&!(e.button!==void 0&&e.button!==0)){if(e.currentTarget&&e.currentTarget.getAttribute){const t=e.currentTarget.getAttribute("target");if(/\b_blank\b/i.test(t))return}return e.preventDefault&&e.preventDefault(),!0}}function Qu(e,t){for(const n in t){const o=t[n],a=e[n];if(typeof o=="string"){if(o!==a)return!1}else if(!gt(a)||a.length!==o.length||o.some((i,r)=>i!==a[r]))return!1}return!0}function ba(e){return e?e.aliasOf?e.aliasOf.path:e.path:""}const ha=(e,t,n)=>e??t??n,Xu=Za({name:"RouterView",inheritAttrs:!1,props:{name:{type:String,default:"default"},route:Object},compatConfig:{MODE:3},setup(e,{attrs:t,slots:n}){const o=wt(Xn),a=ge(()=>e.route||o.value),i=wt(ca,0),r=ge(()=>{let p=We(i);const{matched:g}=a.value;let f;for(;(f=g[p])&&!f.components;)p++;return p}),l=ge(()=>a.value.matched[r.value]);Gs(ca,ge(()=>r.value+1)),Gs(Eu,l),Gs(Xn,a);const d=H();return Bt(()=>[d.value,l.value,e.name],([p,g,f],[S,D,M])=>{g&&(g.instances[f]=p,D&&D!==g&&p&&p===S&&(g.leaveGuards.size||(g.leaveGuards=D.leaveGuards),g.updateGuards.size||(g.updateGuards=D.updateGuards))),p&&g&&(!D||!ds(g,D)||!S)&&(g.enterCallbacks[f]||[]).forEach(z=>z(p))},{flush:"post"}),()=>{const p=a.value,g=e.name,f=l.value,S=f&&f.components[g];if(!S)return ya(n.default,{Component:S,route:p});const D=f.props[g],M=D?D===!0?p.params:typeof D=="function"?D(p):D:null,B=Ci(S,xe({},M,t,{onVnodeUnmounted:Y=>{Y.component.isUnmounted&&(f.instances[g]=null)},ref:d}));return ya(n.default,{Component:B,route:p})||B}}});function ya(e,t){if(!e)return null;const n=e(t);return n.length===1?n[0]:n}const Zu=Xu;function ed(e){const t=Hu(e.routes,e),n=e.parseQuery||Cu,o=e.stringifyQuery||la,a=e.history,i=bs(),r=bs(),l=bs(),d=Dr(It);let p=It;as&&e.scrollBehavior&&"scrollRestoration"in history&&(history.scrollRestoration="manual");const g=An.bind(null,u=>""+u),f=An.bind(null,lu),S=An.bind(null,Is);function D(u,L){let k,w;return Ui(u)?(k=t.getRecordMatcher(u),w=L):w=u,t.addRoute(w,k)}function M(u){const L=t.getRecordMatcher(u);L&&t.removeRoute(L)}function z(){return t.getRoutes().map(u=>u.record)}function B(u){return!!t.getRecordMatcher(u)}function Y(u,L){if(L=xe({},L||d.value),typeof u=="string"){const C=Mn(n,u,L.path),O=t.resolve({path:C.path},L),K=a.createHref(C.fullPath);return xe(C,O,{params:S(O.params),hash:Is(C.hash),redirectedFrom:void 0,href:K})}let k;if(u.path!=null)k=xe({},u,{path:Mn(n,u.path,L.path).path});else{const C=xe({},u.params);for(const O in C)C[O]==null&&delete C[O];k=xe({},u,{params:f(C)}),L.params=f(L.params)}const w=t.resolve(k,L),W=u.hash||"";w.params=g(S(w.params));const v=du(o,xe({},u,{hash:au(W),path:w.path})),b=a.createHref(v);return xe({fullPath:v,hash:W,query:o===la?_u(u.query):u.query||{}},w,{redirectedFrom:void 0,href:b})}function q(u){return typeof u=="string"?Mn(n,u,d.value.path):xe({},u)}function Z(u,L){if(p!==u)return fs(Fe.NAVIGATION_CANCELLED,{from:L,to:u})}function ee(u){return pe(u)}function ce(u){return ee(xe(q(u),{replace:!0}))}function ye(u,L){const k=u.matched[u.matched.length-1];if(k&&k.redirect){const{redirect:w}=k;let W=typeof w=="function"?w(u,L):w;return typeof W=="string"&&(W=W.includes("?")||W.includes("#")?W=q(W):{path:W},W.params={}),xe({query:u.query,hash:u.hash,params:W.path!=null?{}:u.params},W)}}function pe(u,L){const k=p=Y(u),w=d.value,W=u.state,v=u.force,b=u.replace===!0,C=ye(k,w);if(C)return pe(xe(q(C),{state:typeof C=="object"?xe({},W,C.state):W,force:v,replace:b}),L||k);const O=k;O.redirectedFrom=L;let K;return!v&&fu(o,w,k)&&(K=fs(Fe.NAVIGATION_DUPLICATED,{to:O,from:w}),Ve(w,w,!0,!1)),(K?Promise.resolve(K):V(O,w)).catch(N=>kt(N)?kt(N,Fe.NAVIGATION_GUARD_REDIRECT)?N:Ee(N):ve(N,O,w)).then(N=>{if(N){if(kt(N,Fe.NAVIGATION_GUARD_REDIRECT))return pe(xe({replace:b},q(N.to),{state:typeof N.to=="object"?xe({},W,N.to.state):W,force:v}),L||O)}else N=j(O,w,!0,b,W);return F(O,w,N),N})}function ue(u,L){const k=Z(u,L);return k?Promise.reject(k):Promise.resolve()}function se(u){const L=ne.values().next().value;return L&&typeof L.runWithContext=="function"?L.runWithContext(u):u()}function V(u,L){let k;const[w,W,v]=Tu(u,L);k=Nn(w.reverse(),"beforeRouteLeave",u,L);for(const C of w)C.leaveGuards.forEach(O=>{k.push(Ut(O,u,L))});const b=ue.bind(null,u,L);return k.push(b),I(k).then(()=>{k=[];for(const C of i.list())k.push(Ut(C,u,L));return k.push(b),I(k)}).then(()=>{k=Nn(W,"beforeRouteUpdate",u,L);for(const C of W)C.updateGuards.forEach(O=>{k.push(Ut(O,u,L))});return k.push(b),I(k)}).then(()=>{k=[];for(const C of v)if(C.beforeEnter)if(gt(C.beforeEnter))for(const O of C.beforeEnter)k.push(Ut(O,u,L));else k.push(Ut(C.beforeEnter,u,L));return k.push(b),I(k)}).then(()=>(u.matched.forEach(C=>C.enterCallbacks={}),k=Nn(v,"beforeRouteEnter",u,L,se),k.push(b),I(k))).then(()=>{k=[];for(const C of r.list())k.push(Ut(C,u,L));return k.push(b),I(k)}).catch(C=>kt(C,Fe.NAVIGATION_CANCELLED)?C:Promise.reject(C))}function F(u,L,k){l.list().forEach(w=>se(()=>w(u,L,k)))}function j(u,L,k,w,W){const v=Z(u,L);if(v)return v;const b=L===It,C=as?history.state:{};k&&(w||b?a.replace(u.fullPath,xe({scroll:b&&C&&C.scroll},W)):a.push(u.fullPath,W)),d.value=u,Ve(u,L,k,b),Ee()}let le;function Se(){le||(le=a.listen((u,L,k)=>{if(!$.listening)return;const w=Y(u),W=ye(w,$.currentRoute.value);if(W){pe(xe(W,{replace:!0,force:!0}),w).catch(Es);return}p=w;const v=d.value;as&&wu(ra(v.fullPath,k.delta),hn()),V(w,v).catch(b=>kt(b,Fe.NAVIGATION_ABORTED|Fe.NAVIGATION_CANCELLED)?b:kt(b,Fe.NAVIGATION_GUARD_REDIRECT)?(pe(xe(q(b.to),{force:!0}),w).then(C=>{kt(C,Fe.NAVIGATION_ABORTED|Fe.NAVIGATION_DUPLICATED)&&!k.delta&&k.type===Yn.pop&&a.go(-1,!1)}).catch(Es),Promise.reject()):(k.delta&&a.go(-k.delta,!1),ve(b,w,v))).then(b=>{b=b||j(w,v,!1),b&&(k.delta&&!kt(b,Fe.NAVIGATION_CANCELLED)?a.go(-k.delta,!1):k.type===Yn.pop&&kt(b,Fe.NAVIGATION_ABORTED|Fe.NAVIGATION_DUPLICATED)&&a.go(-1,!1)),F(w,v,b)}).catch(Es)}))}let re=bs(),y=bs(),J;function ve(u,L,k){Ee(u);const w=y.list();return w.length?w.forEach(W=>W(u,L,k)):console.error(u),Promise.reject(u)}function $e(){return J&&d.value!==It?Promise.resolve():new Promise((u,L)=>{re.add([u,L])})}function Ee(u){return J||(J=!u,Se(),re.list().forEach(([L,k])=>u?k(u):L()),re.reset()),u}function Ve(u,L,k,w){const{scrollBehavior:W}=e;if(!as||!W)return Promise.resolve();const v=!k&&Su(ra(u.fullPath,0))||(w||!k)&&history.state&&history.state.scroll||null;return es().then(()=>W(u,L,v)).then(b=>b&&yu(b)).catch(b=>ve(b,u,L))}const Ae=u=>a.go(u);let He;const ne=new Set,$={currentRoute:d,listening:!0,addRoute:D,removeRoute:M,clearRoutes:t.clearRoutes,hasRoute:B,getRoutes:z,resolve:Y,options:e,push:ee,replace:ce,go:Ae,back:()=>Ae(-1),forward:()=>Ae(1),beforeEach:i.add,beforeResolve:r.add,afterEach:l.add,onError:y.add,isReady:$e,install(u){u.component("RouterLink",qu),u.component("RouterView",Zu),u.config.globalProperties.$router=$,Object.defineProperty(u.config.globalProperties,"$route",{enumerable:!0,get:()=>We(d)}),as&&!He&&d.value===It&&(He=!0,ee(a.location).catch(w=>{}));const L={};for(const w in It)Object.defineProperty(L,w,{get:()=>d.value[w],enumerable:!0});u.provide(yo,$),u.provide(Ki,Ga(L)),u.provide(Xn,d);const k=u.unmount;ne.add(u),u.unmount=function(){ne.delete(u),ne.size<1&&(p=It,le&&le(),le=null,d.value=It,He=!1,J=!1),k()}}};function I(u){return u.reduce((L,k)=>L.then(()=>se(k)),Promise.resolve())}return $}const td={class:"network-view"},sd={class:"namespace-section"},nd={class:"namespace-info"},od={class:"current-network"},ad={class:"network-badge"},id={class:"network-name"},rd={key:0,class:"fallback-indicator"},ld={key:0,class:"original-network"},cd={class:"namespace-controls"},ud={class:"network-switch"},dd=["disabled"],fd=["disabled"],gd={class:"quick-networks"},pd=["onClick","disabled"],vd={class:"fallback-setting"},md={class:"checkbox-label"},bd={class:"status-grid"},hd={class:"status-card"},yd={class:"status-card-content"},wd={class:"status-value"},Sd={class:"status-meta"},Dd={class:"status-card"},$d={class:"status-card-content"},kd={class:"status-value"},Cd={class:"status-card"},_d={class:"status-card-content"},Ed={class:"status-value"},Td={class:"status-card"},Pd={class:"status-card-content"},Rd={class:"status-value"},xd={class:"config-section"},Ld={class:"config-grid"},Ad={class:"config-item"},Md={class:"config-item"},Id=["max"],Nd={class:"config-item"},Od={class:"config-item"},Vd={class:"peers-section"},Ud={class:"section-title"},Fd={class:"peers-list"},Kd={key:0,class:"empty-state"},Hd={class:"peer-header"},Bd={class:"peer-id"},jd={class:"peer-details"},Gd={class:"peer-detail"},zd={key:0,class:"peer-detail"},Wd={key:1,class:"peer-detail"},Jd={class:"peer-actions"},qd=["onClick","disabled"],Yd=["onClick","disabled"],Qd={key:0,class:"peers-section"},Xd={class:"peers-list"},Zd={class:"peer-header"},ef={class:"peer-id"},tf={class:"peer-details"},sf={class:"peer-detail"},nf={class:"peer-actions"},of=["onClick","disabled"],af={class:"stats-section"},rf={class:"stats-grid"},lf={class:"stat-item"},cf={class:"stat-item"},uf={class:"stat-item"},df={class:"stat-item"},ff={__name:"NetworkView",setup(e){const t=At(),n=H(3),o=H(2),a=H(null),i=H(null),r=H("00:00:00"),l=H(""),d=["global","gaming","work","family","test"],p=ge(()=>t.networkStatus);ge(()=>t.peers);const g=ge(()=>t.discoveredPeers),f=ge(()=>t.connectedPeersList),S=ge(()=>t.canAcceptMorePeers),D=ge(()=>t.peerId),M=ge(()=>t.isConnected),z=()=>{l.value.trim()&&(t.setNetworkName(l.value.trim()),t.addDebugLog(`Network set to: ${l.value.trim()}`,"success"),l.value="")},B=re=>{t.setNetworkName(re),t.addDebugLog(`Quick switch to network: ${re}`,"success")},Y=()=>{t.setAllowGlobalFallback(t.allowGlobalFallback)},q=()=>{t.mesh&&(t.mesh.setMaxPeers(n.value),t.addDebugLog(`Max peers updated to ${n.value}`))},Z=()=>{t.mesh&&(t.mesh.setMinPeers(o.value),t.addDebugLog(`Min peers updated to ${o.value}`))},ee=()=>{if(t.mesh){const re=!p.value.autoDiscovery;t.mesh.setAutoDiscovery(re),t.addDebugLog(`Auto discovery ${re?"enabled":"disabled"}`)}},ce=()=>{if(t.mesh){const re=!p.value.evictionStrategy;t.mesh.setEvictionStrategy(re),t.addDebugLog(`Eviction strategy ${re?"enabled":"disabled"}`)}},ye=()=>{t.addDebugLog("Peer list refreshed")},pe=re=>{t.sendDirectMessage(re,{type:"ping",timestamp:Date.now()}),t.addDebugLog(`Ping sent to ${re.substring(0,8)}...`)},ue=re=>{t.mesh&&t.addDebugLog(`Disconnect requested for ${re.substring(0,8)}...`)},se=re=>{try{t.connectToPeer(re),t.addDebugLog(`Connection attempt to ${re.substring(0,8)}...`)}catch(y){t.addDebugLog(`Failed to connect to peer: ${y.message}`,"error")}},V=re=>re?re.toLocaleTimeString():"Unknown",F=()=>{const re=p.value.connectedCount,y=p.value.minPeers,J=p.value.maxPeers;return re===0?"Isolated":re>=J?"Excellent":re>=y?"Good":re>0?"Fair":"Unknown"},j=()=>{const re=F();return{"health-isolated":re==="Isolated","health-poor":re==="Poor"||re==="Fair","health-good":re==="Good","health-excellent":re==="Excellent"}},le=()=>`Browser (WebRTC: ${!!(window.RTCPeerConnection||window.webkitRTCPeerConnection||window.mozRTCPeerConnection)?"Yes":"No"})`,Se=()=>{if(a.value&&M.value){const y=new Date-a.value,J=Math.floor(y/36e5),ve=Math.floor(y%36e5/6e4),$e=Math.floor(y%6e4/1e3);r.value=`${J.toString().padStart(2,"0")}:${ve.toString().padStart(2,"0")}:${$e.toString().padStart(2,"0")}`}else r.value="00:00:00"};return ge(()=>M.value,re=>{re?a.value=new Date:a.value=null}),Wt(()=>{n.value=p.value.maxPeers,o.value=p.value.minPeers,i.value=setInterval(Se,1e3)}),Us(()=>{i.value&&clearInterval(i.value)}),(re,y)=>(R(),x("div",td,[y[35]||(y[35]=s("div",{class:"section-header"},[s("h2",null,"๐ Network Overview"),s("p",null,"Monitor mesh network topology, peer connections, and network health")],-1)),s("div",sd,[y[5]||(y[5]=s("h3",null,"Network Namespace",-1)),s("div",nd,[s("div",od,[s("div",ad,[s("span",id,E(We(t).networkName),1),We(t).isInFallbackMode?(R(),x("span",rd,"Fallback Mode")):de("",!0)]),We(t).isInFallbackMode?(R(),x("div",ld," Original: "+E(We(t).originalNetworkName),1)):de("",!0)]),s("div",cd,[s("div",ud,[ae(s("input",{"onUpdate:modelValue":y[0]||(y[0]=J=>l.value=J),type:"text",placeholder:"Enter network name (e.g., 'gaming', 'work')",class:"network-input",disabled:M.value},null,8,dd),[[Te,l.value]]),s("button",{onClick:z,disabled:!l.value.trim()||M.value,class:"btn btn-primary btn-sm"}," Switch ",8,fd)]),s("div",gd,[(R(),x(_e,null,Oe(d,J=>s("button",{key:J,onClick:ve=>B(J),disabled:M.value||We(t).networkName===J,class:ke(["btn","btn-outline","btn-xs",{active:We(t).networkName===J}])},E(J),11,pd)),64))]),s("div",vd,[s("label",md,[ae(s("input",{type:"checkbox","onUpdate:modelValue":y[1]||(y[1]=J=>We(t).allowGlobalFallback=J),onChange:Y},null,544),[[ze,We(t).allowGlobalFallback]]),y[4]||(y[4]=P(" Allow global fallback ",-1))])])])])]),s("div",bd,[s("div",hd,[y[7]||(y[7]=s("div",{class:"status-card-icon"},"๐ฅ",-1)),s("div",yd,[y[6]||(y[6]=s("h3",null,"Connected Peers",-1)),s("div",wd,E(p.value.connectedCount)+"/"+E(p.value.maxPeers),1),s("div",Sd,E(S.value?"Can accept more":"At capacity"),1)])]),s("div",Dd,[y[10]||(y[10]=s("div",{class:"status-card-icon"},"๐",-1)),s("div",$d,[y[8]||(y[8]=s("h3",null,"Discovered Peers",-1)),s("div",kd,E(g.value.size),1),y[9]||(y[9]=s("div",{class:"status-meta"},"Available to connect",-1))])]),s("div",Cd,[y[13]||(y[13]=s("div",{class:"status-card-icon"},"โ๏ธ",-1)),s("div",_d,[y[11]||(y[11]=s("h3",null,"Auto Discovery",-1)),s("div",Ed,E(p.value.autoDiscovery?"ON":"OFF"),1),y[12]||(y[12]=s("div",{class:"status-meta"},"Automatic peer discovery",-1))])]),s("div",Td,[y[16]||(y[16]=s("div",{class:"status-card-icon"},"๐",-1)),s("div",Pd,[y[14]||(y[14]=s("h3",null,"XOR Routing",-1)),s("div",Rd,E(p.value.xorRouting?"ON":"OFF"),1),y[15]||(y[15]=s("div",{class:"status-meta"},"Distance-based routing",-1))])])]),s("div",xd,[y[21]||(y[21]=s("h3",null,"Network Configuration",-1)),s("div",Ld,[s("div",Ad,[y[17]||(y[17]=s("label",null,"Max Peers",-1)),ae(s("input",{"onUpdate:modelValue":y[2]||(y[2]=J=>n.value=J),type:"number",min:"1",max:"50",onChange:q,class:"config-input"},null,544),[[Te,n.value,void 0,{number:!0}]])]),s("div",Md,[y[18]||(y[18]=s("label",null,"Min Peers",-1)),ae(s("input",{"onUpdate:modelValue":y[3]||(y[3]=J=>o.value=J),type:"number",min:"0",max:n.value-1,onChange:Z,class:"config-input"},null,40,Id),[[Te,o.value,void 0,{number:!0}]])]),s("div",Nd,[y[19]||(y[19]=s("label",null,"Auto Discovery",-1)),s("button",{onClick:ee,class:ke(["toggle-btn",{active:p.value.autoDiscovery}])},E(p.value.autoDiscovery?"ON":"OFF"),3)]),s("div",Od,[y[20]||(y[20]=s("label",null,"Eviction Strategy",-1)),s("button",{onClick:ce,class:ke(["toggle-btn",{active:p.value.evictionStrategy}])},E(p.value.evictionStrategy?"ON":"OFF"),3)])])]),s("div",Vd,[s("div",Ud,[s("h3",null,"Connected Peers ("+E(f.value.length)+")",1),s("button",{onClick:ye,class:"btn btn-secondary"},"Refresh")]),s("div",Fd,[f.value.length===0?(R(),x("div",Kd,[...y[22]||(y[22]=[s("div",{class:"empty-icon"},"๐",-1),s("p",null,"No peers connected yet",-1),s("p",{class:"empty-meta"},"Connect to the signaling server to discover peers",-1)])])):de("",!0),(R(!0),x(_e,null,Oe(f.value,J=>(R(),x("div",{key:J.id,class:"peer-card"},[s("div",Hd,[s("div",Bd,[y[23]||(y[23]=s("span",{class:"peer-icon"},"๐ค",-1)),P(" "+E(J.id.substring(0,16))+"... ",1)]),s("div",{class:ke(["peer-status",J.status])},E(J.status),3)]),s("div",jd,[s("div",Gd,[y[24]||(y[24]=s("strong",null,"Connected:",-1)),P(" "+E(V(J.connectionTime)),1)]),J.disconnectionTime?(R(),x("div",zd,[y[25]||(y[25]=s("strong",null,"Disconnected:",-1)),P(" "+E(V(J.disconnectionTime)),1)])):de("",!0),J.disconnectionReason?(R(),x("div",Wd,[y[26]||(y[26]=s("strong",null,"Reason:",-1)),P(" "+E(J.disconnectionReason),1)])):de("",!0)]),s("div",Jd,[s("button",{onClick:ve=>pe(J.id),class:"btn btn-sm btn-primary",disabled:!J.connected}," Ping ",8,qd),s("button",{onClick:ve=>ue(J.id),class:"btn btn-sm btn-danger",disabled:!J.connected}," Disconnect ",8,Yd)])]))),128))])]),g.value.size>0?(R(),x("div",Qd,[s("h3",null,"Discovered Peers ("+E(g.value.size)+")",1),s("div",Xd,[(R(!0),x(_e,null,Oe(Array.from(g.value.values()),J=>(R(),x("div",{key:J.id,class:"peer-card discovered"},[s("div",Zd,[s("div",ef,[y[27]||(y[27]=s("span",{class:"peer-icon"},"๐",-1)),P(" "+E(J.id.substring(0,16))+"... ",1)]),y[28]||(y[28]=s("div",{class:"peer-status discovered"}," discovered ",-1))]),s("div",tf,[s("div",sf,[y[29]||(y[29]=s("strong",null,"Discovered:",-1)),P(" "+E(V(J.discoveryTime)),1)])]),s("div",nf,[s("button",{onClick:ve=>se(J.id),class:"btn btn-sm btn-primary",disabled:!S.value}," Connect ",8,of)])]))),128))])])):de("",!0),s("div",af,[y[34]||(y[34]=s("h3",null,"Network Statistics",-1)),s("div",rf,[s("div",lf,[y[30]||(y[30]=s("strong",null,"Your Peer ID:",-1)),s("code",null,E(D.value),1)]),s("div",cf,[y[31]||(y[31]=s("strong",null,"Network Health:",-1)),s("span",{class:ke(j())},E(F()),3)]),s("div",uf,[y[32]||(y[32]=s("strong",null,"Connection Time:",-1)),P(" "+E(r.value),1)]),s("div",df,[y[33]||(y[33]=s("strong",null,"Environment:",-1)),P(" "+E(le()),1)])])])]))}},gf=Mt(ff,[["__scopeId","data-v-9e349e85"]]),pf={class:"messaging-view"},vf={class:"messaging-layout"},mf={class:"broadcast-section"},bf={class:"message-composer"},hf={class:"composer-controls"},yf=["onKeydown"],wf={class:"composer-actions"},Sf=["disabled"],Df={class:"messages-container"},$f={class:"messages-header"},kf={class:"messages-list"},Cf={key:0,class:"empty-state"},_f={class:"message-header"},Ef={class:"message-sender"},Tf={class:"message-time"},Pf={class:"message-type"},Rf={key:0,class:"encryption-indicator",title:"Encrypted message"},xf={class:"message-content"},Lf={class:"direct-section"},Af={class:"peer-selector"},Mf=["value"],If={key:0,class:"message-composer"},Nf={class:"composer-header"},Of={class:"composer-controls"},Vf=["onKeydown"],Uf={class:"composer-actions"},Ff={class:"encrypt-toggle"},Kf={class:"checkbox-label"},Hf={class:"composer-buttons"},Bf=["disabled"],jf={class:"conversations"},Gf={key:0,class:"empty-state"},zf={class:"conversation-header"},Wf={class:"message-count"},Jf={class:"conversation-messages"},qf={class:"message-header"},Yf={class:"message-sender"},Qf={key:0,class:"encryption-indicator",title:"Encrypted message"},Xf={class:"message-time"},Zf={class:"message-content"},eg={key:0,class:"more-messages"},tg={class:"stats-section"},sg={class:"stats-grid"},ng={class:"stat-item"},og={class:"stat-item"},ag={class:"stat-item"},ig={class:"stat-item"},rg={__name:"MessagingView",setup(e){const t=At(),n=H(""),o=H(""),a=H("");H("");const i=H(!1),r=H(!1),l=ge(()=>t.messages),d=ge(()=>t.directMessages),p=ge(()=>t.connectedPeersList),g=ge(()=>t.isConnected),f=ge(()=>[...l.value].reverse()),S=ge(()=>{const se=[];for(const[V,F]of d.value)se.push({peerId:V,messages:F,lastMessage:F[F.length-1]});return se.sort((V,F)=>new Date(F.lastMessage.timestamp)-new Date(V.lastMessage.timestamp))}),D=ge(()=>l.value.filter(se=>se.type==="broadcast").length),M=ge(()=>{let se=0;for(const V of d.value.values())se+=V.length;return se}),z=ge(()=>{const se=l.value.filter(F=>F.fromPeerId==="You").length;let V=0;for(const F of d.value.values())V+=F.filter(j=>j.fromPeerId==="You").length;return se+V}),B=()=>{if(!(!n.value.trim()||!g.value))try{t.sendBroadcastMessage(n.value.trim()),n.value="",t.addDebugLog("Broadcast message sent successfully","success")}catch(se){t.addDebugLog(`Failed to send broadcast: ${se.message}`,"error")}},Y=()=>{if(!(!o.value.trim()||!a.value||!g.value))try{r.value?t.sendEncryptedDirectMessage(a.value,o.value.trim()):t.sendDirectMessage(a.value,o.value.trim()),o.value="",t.addDebugLog(`Direct message sent to ${a.value.substring(0,8)}...`,"success")}catch(se){t.addDebugLog(`Failed to send direct message: ${se.message}`,"error")}},q=()=>{t.messages=[],t.addDebugLog("Broadcast messages cleared","info")},Z=se=>new Date(se).toLocaleTimeString(),ee=se=>typeof se=="string"?se:JSON.stringify(se,null,2),ce=()=>{const se={type:"ping",timestamp:Date.now(),source:"vue-demo"};t.sendBroadcastMessage(se),t.addDebugLog("Ping sent to all peers","info")},ye=()=>{var V;const se={type:"system_info",timestamp:Date.now(),userAgent:navigator.userAgent,platform:navigator.platform,language:navigator.language,online:navigator.onLine,connectionType:((V=navigator.connection)==null?void 0:V.effectiveType)||"unknown",peerId:t.peerId.substring(0,8)+"...",connectedPeers:t.networkStatus.connectedCount};t.sendBroadcastMessage(se),t.addDebugLog("System info broadcast sent","info")},pe=()=>{[{type:"text",content:"Simple text message"},{type:"json",data:{key:"value",number:42,array:[1,2,3]}},{type:"binary_info",size:1024,encoding:"base64"},{type:"event",event:"user_action",action:"click",target:"button"}].forEach((V,F)=>{setTimeout(()=>{t.sendBroadcastMessage(V)},F*500)}),t.addDebugLog("Test messages sent","info")},ue=()=>{i.value=!i.value,t.addDebugLog(`Message filtering ${i.value?"enabled":"disabled"}`,"info")};return(se,V)=>(R(),x("div",pf,[V[30]||(V[30]=s("div",{class:"section-header"},[s("h2",null,"๐ฌ Messaging System"),s("p",null,"Send broadcast messages via gossip protocol and direct peer-to-peer messages")],-1)),s("div",vf,[s("div",mf,[V[8]||(V[8]=s("h3",null,"๐ Broadcast Messages (Gossip Protocol)",-1)),V[9]||(V[9]=s("p",{class:"section-description"}," Messages sent via gossip protocol reach all peers in the network, not just direct connections. They propagate with TTL (Time To Live) and path tracking to prevent loops. ",-1)),s("div",bf,[V[6]||(V[6]=s("div",{class:"composer-header"},[s("span",{class:"composer-icon"},"๐ข"),s("span",null,"Broadcast to all peers")],-1)),s("div",hf,[ae(s("textarea",{"onUpdate:modelValue":V[0]||(V[0]=F=>n.value=F),placeholder:"Type your message to broadcast to all peers...",class:"message-input",rows:"3",onKeydown:ea(Zo(B,["ctrl"]),["enter"])},null,40,yf),[[Te,n.value]]),s("div",wf,[s("button",{onClick:B,disabled:!n.value.trim()||!g.value,class:"btn btn-primary"},[...V[4]||(V[4]=[s("span",{class:"btn-icon"},"๐ค",-1),P(" Send Broadcast ",-1)])],8,Sf),V[5]||(V[5]=s("span",{class:"shortcut-hint"},"Ctrl+Enter",-1))])])]),s("div",Df,[s("div",$f,[s("h4",null,"Recent Broadcasts ("+E(l.value.length)+")",1),s("button",{onClick:q,class:"btn btn-secondary btn-sm"}," Clear ")]),s("div",kf,[l.value.length===0?(R(),x("div",Cf,[...V[7]||(V[7]=[s("div",{class:"empty-icon"},"๐ญ",-1),s("p",null,"No broadcast messages yet",-1),s("p",{class:"empty-meta"},"Send a message or wait for messages from other peers",-1)])])):de("",!0),(R(!0),x(_e,null,Oe(f.value,F=>(R(),x("div",{key:F.id,class:ke(["message-item",{"own-message":F.fromPeerId==="You"}])},[s("div",_f,[s("span",Ef,E(F.fromPeerId),1),s("span",Tf,E(Z(F.timestamp)),1),s("span",Pf,[P(E(F.type)+" ",1),F.encrypted?(R(),x("span",Rf,"๐")):de("",!0)])]),s("div",xf,[s("pre",null,E(ee(F.content)||"[Empty message]"),1)])],2))),128))])])]),s("div",Lf,[V[18]||(V[18]=s("h3",null,"๐ Direct Messages",-1)),V[19]||(V[19]=s("p",{class:"section-description"}," Send messages directly to specific peers. Messages are routed through the mesh network. ",-1)),s("div",Af,[V[11]||(V[11]=s("label",null,"Select target peer:",-1)),ae(s("select",{"onUpdate:modelValue":V[1]||(V[1]=F=>a.value=F),class:"peer-select"},[V[10]||(V[10]=s("option",{value:""},"Choose a peer...",-1)),(R(!0),x(_e,null,Oe(p.value,F=>(R(),x("option",{key:F.id,value:F.id},E(F.id.substring(0,16))+"... ("+E(F.status)+") ",9,Mf))),128))],512),[[Ke,a.value]])]),a.value?(R(),x("div",If,[s("div",Nf,[V[12]||(V[12]=s("span",{class:"composer-icon"},"๐",-1)),s("span",null,"Direct message to "+E(a.value.substring(0,16))+"...",1)]),s("div",Of,[ae(s("textarea",{"onUpdate:modelValue":V[2]||(V[2]=F=>o.value=F),placeholder:"Type your direct message...",class:"message-input",rows:"3",onKeydown:ea(Zo(Y,["ctrl"]),["enter"])},null,40,Vf),[[Te,o.value]]),s("div",Uf,[s("div",Ff,[s("label",Kf,[ae(s("input",{type:"checkbox","onUpdate:modelValue":V[3]||(V[3]=F=>r.value=F)},null,512),[[ze,r.value]]),V[13]||(V[13]=P(" Encrypt Direct Message ",-1))])]),s("div",Hf,[s("button",{onClick:Y,disabled:!o.value.trim()||!a.value||!g.value,class:"btn btn-primary"},[V[14]||(V[14]=s("span",{class:"btn-icon"},"๐ค",-1)),P(" "+E(r.value?"Send Encrypted":"Send Direct"),1)],8,Bf)]),V[15]||(V[15]=s("span",{class:"shortcut-hint"},"Ctrl+Enter",-1))])])])):de("",!0),s("div",jf,[V[17]||(V[17]=s("div",{class:"conversations-header"},[s("h4",null,"Conversations")],-1)),S.value.length===0?(R(),x("div",Gf,[...V[16]||(V[16]=[s("div",{class:"empty-icon"},"๐ฌ",-1),s("p",null,"No direct messages yet",-1),s("p",{class:"empty-meta"},"Select a peer and send a direct message",-1)])])):de("",!0),(R(!0),x(_e,null,Oe(S.value,F=>(R(),x("div",{key:F.peerId,class:"conversation"},[s("div",zf,[s("h5",null,E(F.peerId.substring(0,16))+"...",1),s("span",Wf,"("+E(F.messages.length)+")",1)]),s("div",Jf,[(R(!0),x(_e,null,Oe(F.messages.slice(-5),j=>(R(),x("div",{key:j.id,class:ke(["message-item","direct",{"own-message":j.fromPeerId==="You"}])},[s("div",qf,[s("span",Yf,[P(E(j.fromPeerId)+" ",1),j.encrypted?(R(),x("span",Qf,"๐")):de("",!0)]),s("span",Xf,E(Z(j.timestamp)),1)]),s("div",Zf,[s("pre",null,E(ee(j.content)),1)])],2))),128)),F.messages.length>5?(R(),x("div",eg," + "+E(F.messages.length-5)+" more messages ",1)):de("",!0)])]))),128))])])]),s("div",tg,[V[24]||(V[24]=s("h3",null,"๐ Messaging Statistics",-1)),s("div",sg,[s("div",ng,[V[20]||(V[20]=s("strong",null,"Total Broadcasts:",-1)),s("span",null,E(D.value),1)]),s("div",og,[V[21]||(V[21]=s("strong",null,"Total Direct Messages:",-1)),s("span",null,E(M.value),1)]),s("div",ag,[V[22]||(V[22]=s("strong",null,"Active Conversations:",-1)),s("span",null,E(S.value.length),1)]),s("div",ig,[V[23]||(V[23]=s("strong",null,"Messages Sent:",-1)),s("span",null,E(z.value),1)])])]),s("div",{class:"advanced-section"},[V[29]||(V[29]=s("h3",null,"๐ง Advanced Messaging",-1)),s("div",{class:"advanced-controls"},[s("button",{onClick:ce,class:"btn btn-secondary"},[...V[25]||(V[25]=[s("span",{class:"btn-icon"},"๐",-1),P(" Ping All Peers ",-1)])]),s("button",{onClick:ye,class:"btn btn-secondary"},[...V[26]||(V[26]=[s("span",{class:"btn-icon"},"โน๏ธ",-1),P(" Broadcast System Info ",-1)])]),s("button",{onClick:pe,class:"btn btn-secondary"},[...V[27]||(V[27]=[s("span",{class:"btn-icon"},"๐งช",-1),P(" Test Message Types ",-1)])]),s("button",{onClick:ue,class:"btn btn-secondary"},[...V[28]||(V[28]=[s("span",{class:"btn-icon"},"๐",-1),P(" Toggle Message Filtering ",-1)])])])])]))}},lg=Mt(rg,[["__scopeId","data-v-4e9d2c9c"]]),cg={class:"media-view"},ug={class:"media-controls"},dg={class:"controls-grid"},fg={class:"control-group"},gg={class:"control-buttons"},pg=["disabled"],vg=["disabled"],mg=["disabled"],bg=["disabled"],hg={class:"control-group"},yg={class:"control-buttons"},wg=["disabled"],Sg={class:"btn-icon"},Dg=["disabled"],$g={class:"btn-icon"},kg={class:"control-group"},Cg={class:"device-selectors"},_g=["value"],Eg=["value"],Tg={class:"streams-container"},Pg={class:"stream-section"},Rg={class:"local-stream-container"},xg={key:0,class:"stream-overlay"},Lg={key:1,class:"stream-info"},Ag={class:"stream-stats"},Mg={class:"stat"},Ig={class:"stat"},Ng={class:"stream-section"},Og={key:0,class:"empty-streams"},Vg={key:1,class:"remote-streams-grid"},Ug={class:"stream-info"},Fg={class:"peer-info"},Kg={class:"stream-stats"},Hg={class:"stream-time"},Bg={class:"media-controls"},jg={class:"controls-grid"},Gg={class:"control-group"},zg={class:"device-selectors"},Wg=["value"],Jg={class:"control-group"},qg={class:"control-buttons"},Yg=["disabled"],Qg=["disabled"],Xg=["disabled"],Zg={class:"control-group"},ep={class:"control-buttons"},tp=["disabled"],sp=["disabled"],np={class:"streaming-status"},op={class:"stats-section"},ap={class:"stats-grid"},ip={class:"stat-card"},rp={class:"stat-content"},lp={class:"stat-value"},cp={class:"stat-meta"},up={class:"stat-card"},dp={class:"stat-content"},fp={class:"stat-value"},gp={class:"stat-card"},pp={class:"stat-content"},vp={class:"stat-value"},mp={class:"stat-meta"},bp={class:"stat-card"},hp={class:"stat-content"},yp={class:"stat-value"},wp={class:"advanced-section"},Sp={class:"advanced-features"},Dp={class:"feature-group"},$p={class:"quality-controls"},kp={class:"feature-group"},Cp={class:"audio-controls"},_p={class:"feature-group"},Ep={class:"screen-controls"},Tp=["disabled"],Pp=["disabled"],Rp={class:"feature-group"},xp={class:"recording-controls"},Lp=["disabled"],Ap=["disabled"],Mp=["disabled"],Ip={__name:"MediaView",setup(e){const t=At(),n=H(null),o=H(new Map),a=H(""),i=H(""),r=H([]),l=H([]),d=H([]),p=H("medium"),g=H(!0),f=H(!0),S=H(!1),D=H(!1),M=H(null),z=H(null),B=ge(()=>t.mediaState),Y=ge(()=>t.isConnected),q=ge(()=>l.value.length+d.value.length),Z=ge(()=>"RTCPeerConnection"in window?"Supported":"Not Supported"),ee=async()=>{try{await t.startMedia({video:!0,audio:!1}),V()}catch(k){t.addDebugLog(`Failed to start video: ${k.message}`,"error")}},ce=async()=>{try{await t.startMedia({video:!1,audio:!0})}catch(k){t.addDebugLog(`Failed to start audio: ${k.message}`,"error")}},ye=async()=>{try{await t.startMedia({video:!0,audio:!0}),V()}catch(k){t.addDebugLog(`Failed to start media: ${k.message}`,"error")}},pe=async()=>{try{await t.stopMedia(),n.value&&(n.value.srcObject=null)}catch(k){t.addDebugLog(`Failed to stop media: ${k.message}`,"error")}},ue=()=>{try{const k=t.toggleVideo();t.addDebugLog(`Video ${k?"enabled":"disabled"}`)}catch(k){t.addDebugLog(`Failed to toggle video: ${k.message}`,"error")}},se=()=>{try{const k=t.toggleAudio();t.addDebugLog(`Audio ${k?"enabled":"disabled"}`)}catch(k){t.addDebugLog(`Failed to toggle audio: ${k.message}`,"error")}},V=async()=>{await es(),n.value&&B.value.localStream&&(n.value.srcObject=B.value.localStream)},F=(k,w)=>{if(k){o.value.set(w,k);const W=B.value.remoteStreams.get(w);W&&W.stream&&(k.srcObject=W.stream)}},j=async()=>{try{const k=await t.enumerateMediaDevices();if(k&&(k.cameras||k.microphones))l.value=k.cameras||[],d.value=k.microphones||[];else if(Array.isArray(k))l.value=k.filter(W=>W.kind==="videoinput"),d.value=k.filter(W=>W.kind==="audioinput");else{const W=await navigator.mediaDevices.enumerateDevices();l.value=W.filter(v=>v.kind==="videoinput"),d.value=W.filter(v=>v.kind==="audioinput")}const w=l.value.length+d.value.length;t.addDebugLog(`Found ${w} media devices`,"info")}catch(k){t.addDebugLog(`Failed to enumerate devices: ${k.message}`,"error")}},le=async()=>{if(r.value.length!==0)try{await t.initializeMedia();const k={video:!0,audio:!0};await t.startSelectiveStream(r.value,k),t.addDebugLog(`Selective streaming started to ${r.value.length} peer(s)`,"success")}catch(k){t.addDebugLog(`Failed to start selective streaming: ${k.message}`,"error")}},Se=async()=>{try{await t.stopSelectiveStream(!1),t.addDebugLog("Selective streaming stopped","info")}catch(k){t.addDebugLog(`Failed to stop selective streaming: ${k.message}`,"error")}},re=async()=>{try{await t.switchToBroadcastMode(),t.addDebugLog("Switched to broadcast mode","info")}catch(k){t.addDebugLog(`Failed to switch to broadcast mode: ${k.message}`,"error")}},y=async()=>{if(r.value.length!==0)try{await t.blockStreamingToPeers(r.value),t.addDebugLog("Streaming blocked to selected peers","warning")}catch(k){t.addDebugLog(`Failed to block streaming: ${k.message}`,"error")}},J=async()=>{if(r.value.length!==0)try{await t.allowStreamingToPeers(r.value),t.addDebugLog("Streaming allowed to selected peers","success")}catch(k){t.addDebugLog(`Failed to allow streaming: ${k.message}`,"error")}},ve=async()=>{if(a.value&&B.value.localStream)try{await pe(),await t.startMedia({video:{deviceId:a.value},audio:B.value.audioEnabled}),V()}catch(k){t.addDebugLog(`Failed to change video device: ${k.message}`,"error")}},$e=async()=>{if(i.value&&B.value.localStream)try{await pe(),await t.startMedia({video:B.value.videoEnabled,audio:{deviceId:i.value}}),V()}catch(k){t.addDebugLog(`Failed to change audio device: ${k.message}`,"error")}},Ee=async()=>{if(B.value.localStream&&B.value.videoEnabled){const k=Ae();try{await B.value.localStream.getVideoTracks()[0].applyConstraints(k),t.addDebugLog(`Video quality updated to ${p.value}`,"info")}catch(w){t.addDebugLog(`Failed to update video quality: ${w.message}`,"error")}}},Ve=async()=>{if(B.value.localStream&&B.value.audioEnabled){const k={echoCancellation:g.value,noiseSuppression:f.value};try{await B.value.localStream.getAudioTracks()[0].applyConstraints(k),t.addDebugLog("Audio settings updated","info")}catch(w){t.addDebugLog(`Failed to update audio settings: ${w.message}`,"error")}}},Ae=()=>{const k={low:{width:320,height:240},medium:{width:640,height:480},high:{width:1280,height:720},ultra:{width:1920,height:1080}};return k[p.value]||k.medium},He=async()=>{var k,w,W,v;try{const b=await navigator.mediaDevices.getDisplayMedia({video:!0,audio:!0});if(B.value.localStream){const C=b.getVideoTracks()[0],O=(v=(W=(w=(k=t.mesh)==null?void 0:k.connectionManager)==null?void 0:w.getAllConnections().find(K=>{var N;return(N=K.peerConnection)==null?void 0:N.getSenders}))==null?void 0:W.peerConnection)==null?void 0:v.getSenders().find(K=>{var N;return((N=K.track)==null?void 0:N.kind)==="video"});O&&await O.replaceTrack(C)}S.value=!0,t.addDebugLog("Screen sharing started","success"),b.getVideoTracks()[0].onended=()=>{S.value=!1,t.addDebugLog("Screen sharing ended","info")}}catch(b){t.addDebugLog(`Failed to start screen share: ${b.message}`,"error")}},ne=async()=>{var k,w,W,v;try{if(B.value.videoEnabled){const C=(await navigator.mediaDevices.getUserMedia({video:!0,audio:!1})).getVideoTracks()[0],O=(v=(W=(w=(k=t.mesh)==null?void 0:k.connectionManager)==null?void 0:w.getAllConnections().find(K=>{var N;return(N=K.peerConnection)==null?void 0:N.getSenders}))==null?void 0:W.peerConnection)==null?void 0:v.getSenders().find(K=>{var N;return((N=K.track)==null?void 0:N.kind)==="video"});O&&await O.replaceTrack(C)}S.value=!1,t.addDebugLog("Screen sharing stopped","info")}catch(b){t.addDebugLog(`Failed to stop screen share: ${b.message}`,"error")}},$=()=>{if(!B.value.localStream){t.addDebugLog("No local stream to record","error");return}try{const k=[];z.value=new MediaRecorder(B.value.localStream),z.value.ondataavailable=w=>{w.data.size>0&&k.push(w.data)},z.value.onstop=()=>{M.value=new Blob(k,{type:"video/webm"}),D.value=!1,t.addDebugLog("Recording stopped","info")},z.value.start(),D.value=!0,t.addDebugLog("Recording started","success")}catch(k){t.addDebugLog(`Failed to start recording: ${k.message}`,"error")}},I=()=>{z.value&&D.value&&z.value.stop()},u=()=>{if(M.value){const k=URL.createObjectURL(M.value),w=document.createElement("a");w.style.display="none",w.href=k,w.download=`peerpigeon-recording-${Date.now()}.webm`,document.body.appendChild(w),w.click(),document.body.removeChild(w),URL.revokeObjectURL(k),t.addDebugLog("Recording downloaded","success")}},L=k=>{if(!k)return"00:00";const W=Math.floor((new Date-k)/1e3),v=Math.floor(W/60),b=W%60;return`${v.toString().padStart(2,"0")}:${b.toString().padStart(2,"0")}`};return Bt(()=>B.value.localStream,k=>{k&&n.value&&(n.value.srcObject=k)}),Bt(()=>B.value.remoteStreams,k=>{for(const[w,W]of k){const v=o.value.get(w);v&&W.stream&&(v.srcObject=W.stream)}},{deep:!0}),Wt(async()=>{await j(),navigator.mediaDevices.addEventListener("devicechange",j)}),Us(()=>{navigator.mediaDevices.removeEventListener("devicechange",j),D.value&&I()}),(k,w)=>(R(),x("div",cg,[w[59]||(w[59]=s("div",{class:"section-header"},[s("h2",null,"๐ฅ Media Streaming"),s("p",null,"Stream audio and video between peers in real-time using WebRTC")],-1)),s("div",ug,[w[16]||(w[16]=s("h3",null,"๐น Local Media Controls",-1)),s("div",dg,[s("div",fg,[w[10]||(w[10]=s("h4",null,"Camera & Microphone",-1)),s("div",gg,[s("button",{onClick:ee,disabled:!Y.value||B.value.videoEnabled,class:"btn btn-primary"},[...w[6]||(w[6]=[s("span",{class:"btn-icon"},"๐น",-1),P(" Start Video ",-1)])],8,pg),s("button",{onClick:ce,disabled:!Y.value||B.value.audioEnabled,class:"btn btn-primary"},[...w[7]||(w[7]=[s("span",{class:"btn-icon"},"๐ค",-1),P(" Start Audio ",-1)])],8,vg),s("button",{onClick:ye,disabled:!Y.value||B.value.audioEnabled&&B.value.videoEnabled,class:"btn btn-success"},[...w[8]||(w[8]=[s("span",{class:"btn-icon"},"๐ฌ",-1),P(" Start Both ",-1)])],8,mg),s("button",{onClick:pe,disabled:!B.value.localStream,class:"btn btn-danger"},[...w[9]||(w[9]=[s("span",{class:"btn-icon"},"โน๏ธ",-1),P(" Stop All ",-1)])],8,bg)])]),s("div",hg,[w[11]||(w[11]=s("h4",null,"Stream Controls",-1)),s("div",yg,[s("button",{onClick:ue,disabled:!B.value.localStream,class:"btn btn-secondary"},[s("span",Sg,E(B.value.videoEnabled?"๐น":"โ"),1),P(" "+E(B.value.videoEnabled?"Disable Video":"Enable Video"),1)],8,wg),s("button",{onClick:se,disabled:!B.value.localStream,class:"btn btn-secondary"},[s("span",$g,E(B.value.audioEnabled?"๐ค":"๐"),1),P(" "+E(B.value.audioEnabled?"Mute Audio":"Unmute Audio"),1)],8,Dg)])]),s("div",kg,[w[15]||(w[15]=s("h4",null,"Device Selection",-1)),s("div",Cg,[ae(s("select",{"onUpdate:modelValue":w[0]||(w[0]=W=>a.value=W),onChange:ve,class:"device-select"},[w[12]||(w[12]=s("option",{value:""},"Select Camera...",-1)),(R(!0),x(_e,null,Oe(l.value,W=>(R(),x("option",{key:W.deviceId,value:W.deviceId},E(W.label||`Camera ${W.deviceId.slice(0,8)}...`),9,_g))),128))],544),[[Ke,a.value]]),ae(s("select",{"onUpdate:modelValue":w[1]||(w[1]=W=>i.value=W),onChange:$e,class:"device-select"},[w[13]||(w[13]=s("option",{value:""},"Select Microphone...",-1)),(R(!0),x(_e,null,Oe(d.value,W=>(R(),x("option",{key:W.deviceId,value:W.deviceId},E(W.label||`Microphone ${W.deviceId.slice(0,8)}...`),9,Eg))),128))],544),[[Ke,i.value]]),s("button",{onClick:j,class:"btn btn-secondary btn-sm"},[...w[14]||(w[14]=[s("span",{class:"btn-icon"},"๐",-1),P(" Refresh Devices ",-1)])])])])])]),s("div",Tg,[s("div",Pg,[w[20]||(w[20]=s("h3",null,"๐บ Your Stream",-1)),s("div",Rg,[s("video",{ref_key:"localVideo",ref:n,autoplay:"",muted:"",playsinline:"",class:ke(["media-stream local-stream",{active:B.value.localStream}])},null,2),B.value.localStream?de("",!0):(R(),x("div",xg,[...w[17]||(w[17]=[s("div",{class:"overlay-content"},[s("span",{class:"overlay-icon"},"๐ท"),s("p",null,"No local stream"),s("p",{class:"overlay-meta"},"Start your camera or microphone to see your stream here")],-1)])])),B.value.localStream?(R(),x("div",Lg,[s("div",Ag,[s("span",Mg,[w[18]||(w[18]=s("span",{class:"stat-icon"},"๐น",-1)),P(" "+E(B.value.videoEnabled?"Video ON":"Video OFF"),1)]),s("span",Ig,[w[19]||(w[19]=s("span",{class:"stat-icon"},"๐ค",-1)),P(" "+E(B.value.audioEnabled?"Audio ON":"Audio OFF"),1)])])])):de("",!0)])]),s("div",Ng,[s("h3",null,"๐ก Remote Streams ("+E(B.value.remoteStreams.size)+")",1),B.value.remoteStreams.size===0?(R(),x("div",Og,[...w[21]||(w[21]=[s("div",{class:"empty-icon"},"๐บ",-1),s("p",null,"No remote streams",-1),s("p",{class:"empty-meta"},"Remote streams from other peers will appear here",-1)])])):(R(),x("div",Vg,[(R(!0),x(_e,null,Oe(B.value.remoteStreams,([W,v])=>(R(),x("div",{key:W,class:"remote-stream-container"},[s("video",{ref_for:!0,ref:b=>F(b,W),autoplay:"",playsinline:"",class:"media-stream remote-stream"},null,512),s("div",Ug,[s("div",Fg,[w[22]||(w[22]=s("span",{class:"peer-icon"},"๐ค",-1)),P(" "+E(W.substring(0,12))+"... ",1)]),s("div",Kg,[s("span",Hg,E(L(v.startTime)),1)])])]))),128))]))])]),s("div",Bg,[w[33]||(w[33]=s("h3",null,"๐ฏ Selective Streaming",-1)),s("div",jg,[s("div",Gg,[w[24]||(w[24]=s("h4",null,"Target Peers",-1)),s("div",zg,[ae(s("select",{multiple:"","onUpdate:modelValue":w[2]||(w[2]=W=>r.value=W),class:"device-select"},[(R(!0),x(_e,null,Oe(k.connectedPeersList,W=>(R(),x("option",{key:W.id,value:W.id},E(W.id.substring(0,16))+"... ",9,Wg))),128))],512),[[Ke,r.value]]),w[23]||(w[23]=s("small",{class:"hint"},"Hold Cmd/Ctrl to select multiple",-1))])]),s("div",Jg,[w[28]||(w[28]=s("h4",null,"Actions",-1)),s("div",qg,[s("button",{onClick:le,disabled:!Y.value||r.value.length===0,class:"btn btn-primary"},[...w[25]||(w[25]=[s("span",{class:"btn-icon"},"๐ฏ",-1),P(" Start Selective ",-1)])],8,Yg),s("button",{onClick:re,disabled:!B.value.localStream,class:"btn btn-secondary"},[...w[26]||(w[26]=[s("span",{class:"btn-icon"},"๐ก",-1),P(" Switch to Broadcast ",-1)])],8,Qg),s("button",{onClick:Se,disabled:!B.value.localStream,class:"btn btn-danger"},[...w[27]||(w[27]=[s("span",{class:"btn-icon"},"โน๏ธ",-1),P(" Stop Selective ",-1)])],8,Xg)])]),s("div",Zg,[w[31]||(w[31]=s("h4",null,"Block/Allow",-1)),s("div",ep,[s("button",{onClick:y,disabled:r.value.length===0,class:"btn btn-secondary"},[...w[29]||(w[29]=[s("span",{class:"btn-icon"},"๐ซ",-1),P(" Block Selected ",-1)])],8,tp),s("button",{onClick:J,disabled:r.value.length===0,class:"btn btn-secondary"},[...w[30]||(w[30]=[s("span",{class:"btn-icon"},"โ
",-1),P(" Allow Selected ",-1)])],8,sp)])])]),s("div",np,[w[32]||(w[32]=s("strong",null,"Status:",-1)),s("span",null,E(k.isStreamingToAll()?"Broadcast":"Selective"),1),s("span",null,"โข Streaming to: "+E(k.getStreamingPeers().length),1),s("span",null,"โข Blocked: "+E(k.getBlockedStreamingPeers().length),1)])]),s("div",op,[w[44]||(w[44]=s("h3",null,"๐ Media Statistics",-1)),s("div",ap,[s("div",ip,[w[35]||(w[35]=s("div",{class:"stat-icon"},"๐น",-1)),s("div",rp,[w[34]||(w[34]=s("h4",null,"Local Stream",-1)),s("div",lp,E(B.value.localStream?"Active":"Inactive"),1),s("div",cp," Video: "+E(B.value.videoEnabled?"ON":"OFF")+", Audio: "+E(B.value.audioEnabled?"ON":"OFF"),1)])]),s("div",up,[w[38]||(w[38]=s("div",{class:"stat-icon"},"๐ก",-1)),s("div",dp,[w[36]||(w[36]=s("h4",null,"Remote Streams",-1)),s("div",fp,E(B.value.remoteStreams.size),1),w[37]||(w[37]=s("div",{class:"stat-meta"},"Connected peer streams",-1))])]),s("div",gp,[w[40]||(w[40]=s("div",{class:"stat-icon"},"๐๏ธ",-1)),s("div",pp,[w[39]||(w[39]=s("h4",null,"Available Devices",-1)),s("div",vp,E(q.value),1),s("div",mp,E(l.value.length)+" cameras, "+E(d.value.length)+" mics ",1)])]),s("div",bp,[w[43]||(w[43]=s("div",{class:"stat-icon"},"๐",-1)),s("div",hp,[w[41]||(w[41]=s("h4",null,"WebRTC Status",-1)),s("div",yp,E(Z.value),1),w[42]||(w[42]=s("div",{class:"stat-meta"},"Real-time communication",-1))])])])]),s("div",wp,[w[58]||(w[58]=s("h3",null,"๐ง Advanced Media Features",-1)),s("div",Sp,[s("div",Dp,[w[47]||(w[47]=s("h4",null,"Stream Quality",-1)),s("div",$p,[w[46]||(w[46]=s("label",null,"Video Quality:",-1)),ae(s("select",{"onUpdate:modelValue":w[3]||(w[3]=W=>p.value=W),onChange:Ee,class:"quality-select"},[...w[45]||(w[45]=[s("option",{value:"low"},"Low (320x240)",-1),s("option",{value:"medium"},"Medium (640x480)",-1),s("option",{value:"high"},"High (1280x720)",-1),s("option",{value:"ultra"},"Ultra (1920x1080)",-1)])],544),[[Ke,p.value]])])]),s("div",kp,[w[50]||(w[50]=s("h4",null,"Audio Settings",-1)),s("div",Cp,[s("label",null,[ae(s("input",{type:"checkbox","onUpdate:modelValue":w[4]||(w[4]=W=>g.value=W),onChange:Ve},null,544),[[ze,g.value]]),w[48]||(w[48]=P(" Echo Cancellation ",-1))]),s("label",null,[ae(s("input",{type:"checkbox","onUpdate:modelValue":w[5]||(w[5]=W=>f.value=W),onChange:Ve},null,544),[[ze,f.value]]),w[49]||(w[49]=P(" Noise Suppression ",-1))])])]),s("div",_p,[w[53]||(w[53]=s("h4",null,"Screen Sharing",-1)),s("div",Ep,[s("button",{onClick:He,disabled:S.value,class:"btn btn-secondary"},[...w[51]||(w[51]=[s("span",{class:"btn-icon"},"๐ฅ๏ธ",-1),P(" Start Screen Share ",-1)])],8,Tp),s("button",{onClick:ne,disabled:!S.value,class:"btn btn-secondary"},[...w[52]||(w[52]=[s("span",{class:"btn-icon"},"โน๏ธ",-1),P(" Stop Screen Share ",-1)])],8,Pp)])]),s("div",Rp,[w[57]||(w[57]=s("h4",null,"Recording",-1)),s("div",xp,[s("button",{onClick:$,disabled:D.value,class:"btn btn-secondary"},[...w[54]||(w[54]=[s("span",{class:"btn-icon"},"โบ๏ธ",-1),P(" Start Recording ",-1)])],8,Lp),s("button",{onClick:I,disabled:!D.value,class:"btn btn-secondary"},[...w[55]||(w[55]=[s("span",{class:"btn-icon"},"โน๏ธ",-1),P(" Stop Recording ",-1)])],8,Ap),s("button",{onClick:u,disabled:!M.value,class:"btn btn-secondary"},[...w[56]||(w[56]=[s("span",{class:"btn-icon"},"๐พ",-1),P(" Download ",-1)])],8,Mp)])])])])]))}},Np=Mt(Ip,[["__scopeId","data-v-8cd6532e"]]),Op={class:"dht-view"},Vp={class:"dht-operations"},Up={class:"operation-tabs"},Fp={key:0,class:"operation-panel"},Kp={class:"form-group"},Hp={class:"form-group"},Bp={class:"form-group"},jp=["disabled"],Gp={key:1,class:"operation-panel"},zp={class:"form-group"},Wp={class:"form-group"},Jp=["disabled"],qp={key:0,class:"result-panel"},Yp={class:"result-content"},Qp={key:2,class:"operation-panel"},Xp={class:"form-group"},Zp={class:"subscription-controls"},ev=["disabled"],tv=["disabled"],sv={class:"subscriptions-list"},nv={key:0,class:"empty-state"},ov={key:1,class:"subscription-items"},av={class:"subscription-key"},iv=["onClick"],rv={key:3,class:"operation-panel"},lv={class:"form-group"},cv={class:"form-group"},uv=["disabled"],dv={class:"stored-data"},fv={class:"section-title"},gv={key:0,class:"empty-data"},pv={key:1,class:"data-grid"},vv={class:"data-header"},mv={class:"data-key"},bv={class:"data-badges"},hv={key:0,class:"badge badge-local"},yv={key:1,class:"badge badge-remote"},wv={key:2,class:"badge badge-subscribed"},Sv={class:"data-meta"},Dv={class:"data-timestamp"},$v={key:0,class:"data-version"},kv={class:"data-content"},Cv={class:"data-actions"},_v=["onClick"],Ev=["onClick"],Tv=["onClick"],Pv=["onClick"],Rv={key:0,class:"notifications"},xv={class:"notifications-list"},Lv={class:"notification-header"},Av={class:"notification-key"},Mv={class:"notification-time"},Iv={class:"notification-content"},Nv={class:"stats-section"},Ov={class:"stats-grid"},Vv={class:"stat-card"},Uv={class:"stat-content"},Fv={class:"stat-value"},Kv={class:"stat-card"},Hv={class:"stat-content"},Bv={class:"stat-value"},jv={class:"stat-card"},Gv={class:"stat-content"},zv={class:"stat-value"},Wv={class:"stat-card"},Jv={class:"stat-content"},qv={class:"stat-value"},Yv={key:0,class:"dht-stats-detail"},Qv={class:"stats-json"},Xv={__name:"DHTView",setup(e){const t=At(),n=H("put"),o=H(""),a=H(""),i=H(null),r=H(""),l=H(null),d=H(!1),p=H(""),g=H(""),f=H(""),S=H(new Set),D=H([]),M=ge(()=>t.dhtData),z=ge(()=>t.getDHTStats()),B=ge(()=>t.isConnected),Y=ge(()=>Array.from(M.value.values()).filter(ne=>ne.local).length),q=ge(()=>Array.from(M.value.values()).filter(ne=>!ne.local).length),Z=async()=>{try{let ne;try{ne=JSON.parse(a.value)}catch{ne=a.value}const $={};i.value&&i.value>0&&($.ttl=i.value),await t.dhtPut(o.value,ne,$)&&(t.addDebugLog(`DHT PUT successful: ${o.value}`,"success"),o.value="",a.value="",i.value=null)}catch(ne){t.addDebugLog(`DHT PUT failed: ${ne.message}`,"error")}},ee=async()=>{try{const ne={forceRefresh:d.value},$=await t.dhtGet(r.value,ne);l.value=$,$!==null?t.addDebugLog(`DHT GET successful: ${r.value}`,"success"):t.addDebugLog(`DHT GET returned null for key: ${r.value}`,"warning")}catch(ne){t.addDebugLog(`DHT GET failed: ${ne.message}`,"error"),l.value=null}},ce=async()=>{try{t.mesh&&(await t.dhtSubscribe(p.value),S.value.add(p.value),t.addDebugLog(`Subscribed to DHT key: ${p.value}`,"success"),p.value="")}catch(ne){t.addDebugLog(`DHT SUBSCRIBE failed: ${ne.message}`,"error")}},ye=async()=>{try{t.mesh&&(await t.dhtUnsubscribe(p.value),S.value.delete(p.value),t.addDebugLog(`Unsubscribed from DHT key: ${p.value}`,"success"),p.value="")}catch(ne){t.addDebugLog(`DHT UNSUBSCRIBE failed: ${ne.message}`,"error")}},pe=async()=>{try{let ne;try{ne=JSON.parse(f.value)}catch{ne=f.value}t.mesh&&await t.mesh.dhtUpdate(g.value,ne)&&(t.addDebugLog(`DHT UPDATE successful: ${g.value}`,"success"),g.value="",f.value="")}catch(ne){t.addDebugLog(`DHT UPDATE failed: ${ne.message}`,"error")}},ue=ne=>S.value.has(ne),se=async ne=>{try{t.mesh&&(await t.dhtUnsubscribe(ne),S.value.delete(ne),t.addDebugLog(`Unsubscribed from DHT key: ${ne}`,"success"))}catch($){t.addDebugLog(`DHT UNSUBSCRIBE failed: ${$.message}`,"error")}},V=async ne=>{try{t.mesh&&(await t.dhtSubscribe(ne),S.value.add(ne),t.addDebugLog(`Subscribed to DHT key: ${ne}`,"success"))}catch($){t.addDebugLog(`DHT SUBSCRIBE failed: ${$.message}`,"error")}},F=async ne=>{await se(ne)},j=async()=>{for(const ne of M.value.keys())await le(ne);t.addDebugLog("Refreshed all DHT data","info")},le=async ne=>{try{await t.dhtGet(ne,{forceRefresh:!0})!==null&&t.addDebugLog(`Refreshed DHT key: ${ne}`,"success")}catch($){t.addDebugLog(`Failed to refresh DHT key ${ne}: ${$.message}`,"error")}},Se=()=>{t.dhtData.clear(),t.addDebugLog("Cleared local DHT data","info")},re=async ne=>{try{await navigator.clipboard.writeText(ne),t.addDebugLog(`Copied key to clipboard: ${ne}`,"success")}catch{t.addDebugLog("Failed to copy to clipboard","error")}},y=()=>{D.value=[],t.addDebugLog("Cleared DHT notifications","info")},J=ne=>new Date(ne).toLocaleTimeString(),ve=async()=>{const ne={theme:"dark",language:"en",notifications:!0,autoConnect:!0,maxPeers:5};await t.dhtPut("user:preferences",ne),t.addDebugLog("Stored user preferences in DHT","success")},$e=async()=>{const ne={value:0,lastUpdated:Date.now(),updatedBy:t.peerId.substring(0,8)+"..."};await t.dhtPut("shared:counter",ne),t.mesh&&(await t.dhtSubscribe("shared:counter"),S.value.add("shared:counter")),t.addDebugLog("Created shared counter in DHT","success")},Ee=async()=>{const ne={userAgent:navigator.userAgent,platform:navigator.platform,language:navigator.language,online:navigator.onLine,timestamp:Date.now(),peerId:t.peerId.substring(0,8)+"...",connectedPeers:t.networkStatus.connectedCount};await t.dhtPut("system:info",ne),t.addDebugLog("Stored system info in DHT","success")},Ve=async()=>{const $=[];t.addDebugLog("Starting DHT stress test with 10 operations...","info");for(let u=0;u<10;u++){const L=`test:stress:${u}`,k={index:u,data:Array(100).fill(0).map(()=>Math.random()),timestamp:Date.now()},w=performance.now();try{await t.dhtPut(L,k);const W=performance.now();$.push(W-w)}catch(W){t.addDebugLog(`Stress test operation ${u} failed: ${W.message}`,"error")}}const I=$.reduce((u,L)=>u+L,0)/$.length;t.addDebugLog(`DHT stress test completed. Average time: ${I.toFixed(2)}ms`,"success")},Ae=async()=>{const ne="demo:replication",$={message:"This data should be replicated across all peers",timestamp:Date.now(),source:t.peerId.substring(0,8)+"..."};await t.dhtPut(ne,$),t.mesh&&(await t.dhtSubscribe(ne),S.value.add(ne)),t.addDebugLog("Stored replication demo data. Other peers should receive this automatically.","success")},He=ne=>{const $={id:Date.now()+Math.random(),key:ne.key,oldValue:ne.oldValue,newValue:ne.newValue,timestamp:new Date};D.value.push($),D.value.length>20&&D.value.shift(),t.addDebugLog(`DHT value changed: ${ne.key}`,"info")};return Wt(()=>{t.mesh&&t.mesh.addEventListener("dhtValueChanged",He)}),(ne,$)=>(R(),x("div",Op,[$[68]||($[68]=s("div",{class:"section-header"},[s("h2",null,"๐๏ธ Distributed Hash Table (WebDHT)"),s("p",null,"Store and retrieve data across the mesh network with automatic replication and pub/sub")],-1)),s("div",Vp,[$[34]||($[34]=s("h3",null,"๐ DHT Operations",-1)),s("div",Up,[s("button",{onClick:$[0]||($[0]=I=>n.value="put"),class:ke(["tab-btn",{active:n.value==="put"}])}," PUT (Store) ",2),s("button",{onClick:$[1]||($[1]=I=>n.value="get"),class:ke(["tab-btn",{active:n.value==="get"}])}," GET (Retrieve) ",2),s("button",{onClick:$[2]||($[2]=I=>n.value="subscribe"),class:ke(["tab-btn",{active:n.value==="subscribe"}])}," SUBSCRIBE ",2),s("button",{onClick:$[3]||($[3]=I=>n.value="update"),class:ke(["tab-btn",{active:n.value==="update"}])}," UPDATE ",2)]),n.value==="put"?(R(),x("div",Fp,[$[16]||($[16]=s("h4",null,"๐ค Store Data in DHT",-1)),$[17]||($[17]=s("p",{class:"operation-description"}," Store key-value pairs in the distributed hash table. Data is automatically replicated across peers. ",-1)),s("div",Kp,[$[12]||($[12]=s("label",null,"Key:",-1)),ae(s("input",{"onUpdate:modelValue":$[4]||($[4]=I=>o.value=I),placeholder:"e.g., user:settings, app:config, shared:counter",class:"form-input"},null,512),[[Te,o.value]])]),s("div",Hp,[$[13]||($[13]=s("label",null,"Value (JSON):",-1)),ae(s("textarea",{"onUpdate:modelValue":$[5]||($[5]=I=>a.value=I),placeholder:'{"theme": "dark", "language": "en"}',rows:"4",class:"form-textarea"},null,512),[[Te,a.value]])]),s("div",Bp,[$[14]||($[14]=s("label",null,"TTL (seconds, optional):",-1)),ae(s("input",{"onUpdate:modelValue":$[6]||($[6]=I=>i.value=I),type:"number",placeholder:"Leave empty for no expiration",class:"form-input"},null,512),[[Te,i.value,void 0,{number:!0}]])]),s("button",{onClick:Z,disabled:!o.value||!a.value||!B.value,class:"btn btn-primary"},[...$[15]||($[15]=[s("span",{class:"btn-icon"},"๐พ",-1),P(" Store in DHT ",-1)])],8,jp)])):de("",!0),n.value==="get"?(R(),x("div",Gp,[$[22]||($[22]=s("h4",null,"๐ฅ Retrieve Data from DHT",-1)),$[23]||($[23]=s("p",{class:"operation-description"}," Retrieve values by key from the distributed hash table. Data is fetched from available peers. ",-1)),s("div",zp,[$[18]||($[18]=s("label",null,"Key:",-1)),ae(s("input",{"onUpdate:modelValue":$[7]||($[7]=I=>r.value=I),placeholder:"Enter key to retrieve",class:"form-input"},null,512),[[Te,r.value]])]),s("div",Wp,[s("label",null,[ae(s("input",{type:"checkbox","onUpdate:modelValue":$[8]||($[8]=I=>d.value=I)},null,512),[[ze,d.value]]),$[19]||($[19]=P(" Force refresh from network ",-1))])]),s("button",{onClick:ee,disabled:!r.value||!B.value,class:"btn btn-primary"},[...$[20]||($[20]=[s("span",{class:"btn-icon"},"๐",-1),P(" Retrieve from DHT ",-1)])],8,Jp),l.value?(R(),x("div",qp,[$[21]||($[21]=s("h5",null,"Result:",-1)),s("pre",Yp,E(JSON.stringify(l.value,null,2)),1)])):de("",!0)])):de("",!0),n.value==="subscribe"?(R(),x("div",Qp,[$[27]||($[27]=s("h4",null,"๐ Subscribe to Key Changes",-1)),$[28]||($[28]=s("p",{class:"operation-description"}," Subscribe to real-time notifications when a key's value changes in the DHT. ",-1)),s("div",Xp,[$[24]||($[24]=s("label",null,"Key to subscribe:",-1)),ae(s("input",{"onUpdate:modelValue":$[9]||($[9]=I=>p.value=I),placeholder:"Enter key to watch for changes",class:"form-input"},null,512),[[Te,p.value]])]),s("div",Zp,[s("button",{onClick:ce,disabled:!p.value||ue(p.value)||!B.value,class:"btn btn-success"},[...$[25]||($[25]=[s("span",{class:"btn-icon"},"๐",-1),P(" Subscribe ",-1)])],8,ev),s("button",{onClick:ye,disabled:!p.value||!ue(p.value)||!B.value,class:"btn btn-warning"},[...$[26]||($[26]=[s("span",{class:"btn-icon"},"๐",-1),P(" Unsubscribe ",-1)])],8,tv)]),s("div",sv,[s("h5",null,"Active Subscriptions ("+E(S.value.size)+"):",1),S.value.size===0?(R(),x("div",nv," No active subscriptions ")):(R(),x("div",ov,[(R(!0),x(_e,null,Oe(Array.from(S.value),I=>(R(),x("div",{key:I,class:"subscription-item"},[s("span",av,E(I),1),s("button",{onClick:u=>se(I),class:"btn btn-sm btn-danger"}," Remove ",8,iv)]))),128))]))])])):de("",!0),n.value==="update"?(R(),x("div",rv,[$[32]||($[32]=s("h4",null,"๐ Update Existing Data",-1)),$[33]||($[33]=s("p",{class:"operation-description"}," Update existing data in the DHT and notify all subscribers of the change. ",-1)),s("div",lv,[$[29]||($[29]=s("label",null,"Key:",-1)),ae(s("input",{"onUpdate:modelValue":$[10]||($[10]=I=>g.value=I),placeholder:"Key to update",class:"form-input"},null,512),[[Te,g.value]])]),s("div",cv,[$[30]||($[30]=s("label",null,"New Value (JSON):",-1)),ae(s("textarea",{"onUpdate:modelValue":$[11]||($[11]=I=>f.value=I),placeholder:'{"updated": true, "timestamp": 1234567890}',rows:"4",class:"form-textarea"},null,512),[[Te,f.value]])]),s("button",{onClick:pe,disabled:!g.value||!f.value||!B.value,class:"btn btn-primary"},[...$[31]||($[31]=[s("span",{class:"btn-icon"},"๐",-1),P(" Update in DHT ",-1)])],8,uv)])):de("",!0)]),s("div",dv,[s("div",fv,[s("h3",null,"๐พ Stored Data ("+E(M.value.size)+")",1),s("div",{class:"data-controls"},[s("button",{onClick:j,class:"btn btn-secondary"},[...$[35]||($[35]=[s("span",{class:"btn-icon"},"๐",-1),P(" Refresh All ",-1)])]),s("button",{onClick:Se,class:"btn btn-danger"},[...$[36]||($[36]=[s("span",{class:"btn-icon"},"๐๏ธ",-1),P(" Clear Local ",-1)])])])]),M.value.size===0?(R(),x("div",gv,[...$[37]||($[37]=[s("div",{class:"empty-icon"},"๐ญ",-1),s("p",null,"No data stored yet",-1),s("p",{class:"empty-meta"},"Store some data using the PUT operation above",-1)])])):(R(),x("div",pv,[(R(!0),x(_e,null,Oe(Array.from(M.value.entries()),([I,u])=>(R(),x("div",{key:I,class:"data-item"},[s("div",vv,[s("h4",mv,E(I),1),s("div",bv,[u.local?(R(),x("span",hv,"Local")):(R(),x("span",yv,"Remote")),ue(I)?(R(),x("span",wv,"Subscribed")):de("",!0)])]),s("div",Sv,[s("span",Dv,E(J(u.timestamp)),1),u.version?(R(),x("span",$v,"v"+E(u.version),1)):de("",!0)]),s("div",kv,[s("pre",null,E(JSON.stringify(u.value,null,2)),1)]),s("div",Cv,[s("button",{onClick:L=>re(I),class:"btn btn-sm btn-secondary"},[...$[38]||($[38]=[s("span",{class:"btn-icon"},"๐",-1),P(" Copy Key ",-1)])],8,_v),s("button",{onClick:L=>le(I),class:"btn btn-sm btn-secondary"},[...$[39]||($[39]=[s("span",{class:"btn-icon"},"๐",-1),P(" Refresh ",-1)])],8,Ev),ue(I)?(R(),x("button",{key:1,onClick:L=>F(I),class:"btn btn-sm btn-warning"},[...$[41]||($[41]=[s("span",{class:"btn-icon"},"๐",-1),P(" Unsubscribe ",-1)])],8,Pv)):(R(),x("button",{key:0,onClick:L=>V(I),class:"btn btn-sm btn-success"},[...$[40]||($[40]=[s("span",{class:"btn-icon"},"๐",-1),P(" Subscribe ",-1)])],8,Tv))])]))),128))]))]),D.value.length>0?(R(),x("div",Rv,[$[47]||($[47]=s("h3",null,"๐ Recent Change Notifications",-1)),s("div",xv,[(R(!0),x(_e,null,Oe(D.value.slice().reverse(),I=>(R(),x("div",{key:I.id,class:"notification-item"},[s("div",Lv,[s("span",Av,E(I.key),1),s("span",Mv,E(J(I.timestamp)),1)]),s("div",Iv,[$[42]||($[42]=s("strong",null,"Old:",-1)),$[43]||($[43]=P()),s("code",null,E(JSON.stringify(I.oldValue)),1),$[44]||($[44]=s("br",null,null,-1)),$[45]||($[45]=s("strong",null,"New:",-1)),$[46]||($[46]=P()),s("code",null,E(JSON.stringify(I.newValue)),1)])]))),128))]),s("button",{onClick:y,class:"btn btn-secondary btn-sm"}," Clear Notifications ")])):de("",!0),s("div",Nv,[$[61]||($[61]=s("h3",null,"๐ DHT Statistics",-1)),s("div",Ov,[s("div",Vv,[$[50]||($[50]=s("div",{class:"stat-icon"},"๐๏ธ",-1)),s("div",Uv,[$[48]||($[48]=s("h4",null,"Local Data",-1)),s("div",Fv,E(Y.value),1),$[49]||($[49]=s("div",{class:"stat-meta"},"Keys stored locally",-1))])]),s("div",Kv,[$[53]||($[53]=s("div",{class:"stat-icon"},"๐",-1)),s("div",Hv,[$[51]||($[51]=s("h4",null,"Remote Data",-1)),s("div",Bv,E(q.value),1),$[52]||($[52]=s("div",{class:"stat-meta"},"Keys from other peers",-1))])]),s("div",jv,[$[56]||($[56]=s("div",{class:"stat-icon"},"๐",-1)),s("div",Gv,[$[54]||($[54]=s("h4",null,"Subscriptions",-1)),s("div",zv,E(S.value.size),1),$[55]||($[55]=s("div",{class:"stat-meta"},"Active key watchers",-1))])]),s("div",Wv,[$[59]||($[59]=s("div",{class:"stat-icon"},"๐",-1)),s("div",Jv,[$[57]||($[57]=s("h4",null,"Notifications",-1)),s("div",qv,E(D.value.length),1),$[58]||($[58]=s("div",{class:"stat-meta"},"Change notifications received",-1))])])]),z.value?(R(),x("div",Yv,[$[60]||($[60]=s("h4",null,"Detailed DHT Statistics:",-1)),s("pre",Qv,E(JSON.stringify(z.value,null,2)),1)])):de("",!0)]),s("div",{class:"quick-actions"},[$[67]||($[67]=s("h3",null,"โก Quick Actions",-1)),s("div",{class:"action-buttons"},[s("button",{onClick:ve,class:"btn btn-secondary"},[...$[62]||($[62]=[s("span",{class:"btn-icon"},"๐ค",-1),P(" Store User Preferences ",-1)])]),s("button",{onClick:$e,class:"btn btn-secondary"},[...$[63]||($[63]=[s("span",{class:"btn-icon"},"๐ข",-1),P(" Create Shared Counter ",-1)])]),s("button",{onClick:Ee,class:"btn btn-secondary"},[...$[64]||($[64]=[s("span",{class:"btn-icon"},"โน๏ธ",-1),P(" Store System Info ",-1)])]),s("button",{onClick:Ve,class:"btn btn-secondary"},[...$[65]||($[65]=[s("span",{class:"btn-icon"},"๐งช",-1),P(" DHT Stress Test ",-1)])]),s("button",{onClick:Ae,class:"btn btn-secondary"},[...$[66]||($[66]=[s("span",{class:"btn-icon"},"๐",-1),P(" Test Replication ",-1)])])])])]))}},Zv=Mt(Xv,[["__scopeId","data-v-537bb91a"]]),em={class:"storage-view"},tm={class:"storage-operations"},sm={class:"operation-tabs"},nm={key:0,class:"operation-panel"},om={class:"form-group"},am={class:"form-group"},im={class:"form-group"},rm={class:"option-checkboxes"},lm={class:"checkbox-label"},cm={class:"checkbox-label"},um={class:"checkbox-label"},dm={class:"checkbox-label"},fm={key:0,class:"form-group"},gm={class:"form-group"},pm=["disabled"],vm={key:1,class:"operation-panel"},mm={class:"form-group"},bm={class:"form-group"},hm={class:"option-checkboxes"},ym={class:"checkbox-label"},wm={class:"checkbox-label"},Sm=["disabled"],Dm={key:0,class:"result-panel"},$m={class:"result-content"},km={key:2,class:"operation-panel"},Cm={class:"form-group"},_m={class:"form-group"},Em={class:"form-group"},Tm={class:"option-checkboxes"},Pm={class:"checkbox-label"},Rm={class:"checkbox-label"},xm={class:"checkbox-label"},Lm=["disabled"],Am={key:3,class:"operation-panel"},Mm={class:"access-section"},Im={class:"form-group"},Nm={class:"form-group"},Om=["value"],Vm={class:"access-controls"},Um=["disabled"],Fm=["disabled"],Km={class:"stored-data"},Hm={class:"section-title"},Bm={key:0,class:"empty-data"},jm={key:1,class:"data-grid"},Gm={class:"data-header"},zm={class:"data-key"},Wm={class:"data-badges"},Jm={key:0,class:"badge badge-local"},qm={key:1,class:"badge badge-remote"},Ym={key:2,class:"badge badge-public"},Qm={key:3,class:"badge badge-private"},Xm={key:4,class:"badge badge-immutable"},Zm={key:5,class:"badge badge-crdt"},eb={class:"data-meta"},tb={class:"data-timestamp"},sb={key:0,class:"data-version"},nb={key:1,class:"data-ttl"},ob={class:"data-content"},ab={class:"data-actions"},ib=["onClick"],rb=["onClick"],lb=["onClick"],cb=["onClick"],ub=["onClick"],db={class:"stats-section"},fb={class:"stats-grid"},gb={class:"stat-card"},pb={class:"stat-content"},vb={class:"stat-value"},mb={class:"stat-card"},bb={class:"stat-content"},hb={class:"stat-value"},yb={class:"stat-card"},wb={class:"stat-content"},Sb={class:"stat-value"},Db={class:"stat-card"},$b={class:"stat-content"},kb={class:"stat-value"},Cb={key:0,class:"storage-stats-detail"},_b={class:"stats-json"},Eb={__name:"StorageView",setup(e){const t=At(),n=H("store"),o=H(""),a=H(""),i=H({isPublic:!1,isImmutable:!1,enableCRDT:!1,replicate:!0,encryptionLevel:"standard",ttl:null}),r=H(""),l=H(null),d=H({forceRefresh:!1,includeMetadata:!1}),p=H(""),g=H(""),f=H({createIfNotExists:!1,mergeData:!1,incrementVersion:!0}),S=H(""),D=H(""),M=ge(()=>t.storageData),z=ge(()=>t.storageStats),B=ge(()=>t.connectedPeersList),Y=ge(()=>t.isConnected),q=ge(()=>Array.from(M.value.values()).filter(I=>I.local).length),Z=ge(()=>Array.from(M.value.values()).filter(I=>!I.local).length),ee=ge(()=>Array.from(M.value.values()).filter(I=>{var u;return!((u=I.options)!=null&&u.isPublic)}).length),ce=ge(()=>Array.from(M.value.values()).filter(I=>{var u;return(u=I.options)==null?void 0:u.isPublic}).length),ye=async()=>{try{let I;try{I=JSON.parse(a.value)}catch{I=a.value}const u={...i.value};u.ttl&&u.ttl<=0&&delete u.ttl,await t.storageStore(o.value,I,u)&&(t.addDebugLog(`Storage STORE successful: ${o.value}`,"success"),o.value="",a.value="",i.value={isPublic:!1,isImmutable:!1,enableCRDT:!1,replicate:!0,encryptionLevel:"standard",ttl:null})}catch(I){t.addDebugLog(`Storage STORE failed: ${I.message}`,"error")}},pe=async()=>{try{const I={...d.value},u=await t.storageRetrieve(r.value,I);l.value=u,u!==null?t.addDebugLog(`Storage RETRIEVE successful: ${r.value}`,"success"):t.addDebugLog(`Storage RETRIEVE returned null for key: ${r.value}`,"warning")}catch(I){t.addDebugLog(`Storage RETRIEVE failed: ${I.message}`,"error"),l.value=null}},ue=async()=>{var I;try{let u;try{u=JSON.parse(g.value)}catch{u=g.value}(I=t.mesh)!=null&&I.distributedStorage&&await t.mesh.distributedStorage.update(p.value,u,f.value)&&(t.addDebugLog(`Storage UPDATE successful: ${p.value}`,"success"),p.value="",g.value="")}catch(u){t.addDebugLog(`Storage UPDATE failed: ${u.message}`,"error")}},se=async()=>{var I;try{(I=t.mesh)!=null&&I.distributedStorage&&(await t.mesh.distributedStorage.grantAccess(S.value,D.value),t.addDebugLog(`Access granted to ${D.value.substring(0,8)}... for key: ${S.value}`,"success"))}catch(u){t.addDebugLog(`Failed to grant access: ${u.message}`,"error")}},V=async()=>{var I;try{(I=t.mesh)!=null&&I.distributedStorage&&(await t.mesh.distributedStorage.revokeAccess(S.value,D.value),t.addDebugLog(`Access revoked from ${D.value.substring(0,8)}... for key: ${S.value}`,"success"))}catch(u){t.addDebugLog(`Failed to revoke access: ${u.message}`,"error")}},F=async()=>{var I;for(const u of M.value.keys())await j(u);(I=t.mesh)!=null&&I.distributedStorage&&(t.storageStats=await t.getStorageStats()),t.addDebugLog("Refreshed all storage data","info")},j=async I=>{try{await t.storageRetrieve(I,{forceRefresh:!0})!==null&&t.addDebugLog(`Refreshed storage key: ${I}`,"success")}catch(u){t.addDebugLog(`Failed to refresh storage key ${I}: ${u.message}`,"error")}},le=()=>{t.storageData.clear(),t.addDebugLog("Cleared local storage data","info")},Se=async I=>{try{await navigator.clipboard.writeText(I),t.addDebugLog(`Copied key to clipboard: ${I}`,"success")}catch{t.addDebugLog("Failed to copy to clipboard","error")}},re=(I,u)=>{p.value=I,g.value=JSON.stringify(u.value,null,2),n.value="update",t.addDebugLog(`Editing data: ${I}`,"info")},y=I=>{S.value=I,n.value="access",t.addDebugLog(`Viewing access control for: ${I}`,"info")},J=async I=>{var u;if(confirm(`Are you sure you want to delete "${I}"?`))try{(u=t.mesh)!=null&&u.distributedStorage&&(await t.mesh.distributedStorage.delete(I),t.storageData.delete(I),t.addDebugLog(`Deleted storage key: ${I}`,"success"))}catch(L){t.addDebugLog(`Failed to delete storage key ${I}: ${L.message}`,"error")}},ve=()=>{const I={};for(const[W,v]of M.value)I[W]={value:v.value,timestamp:v.timestamp,options:v.options,local:v.local};const u=JSON.stringify(I,null,2),L=new Blob([u],{type:"application/json"}),k=URL.createObjectURL(L),w=document.createElement("a");w.href=k,w.download=`peerpigeon-storage-${Date.now()}.json`,document.body.appendChild(w),w.click(),document.body.removeChild(w),URL.revokeObjectURL(k),t.addDebugLog("Storage data exported","success")},$e=I=>new Date(I).toLocaleTimeString(),Ee=async()=>{const I={name:"Alice Smith",email:"alice@example.com",avatar:"https://avatars.dicebear.com/api/avataaars/alice.svg",preferences:{theme:"dark",notifications:!0,language:"en"},created:Date.now(),lastUpdated:Date.now()};await t.storageStore("user:profile",I,{isPublic:!1,isImmutable:!1,enableCRDT:!1,replicate:!0}),t.addDebugLog("Created user profile in storage","success")},Ve=async()=>{const I={title:"Shared Document",content:"This is a shared document that supports collaborative editing.",authors:[t.peerId.substring(0,8)+"..."],created:Date.now(),lastModified:Date.now(),version:1};await t.storageStore("doc:shared",I,{isPublic:!0,isImmutable:!1,enableCRDT:!0,replicate:!0}),t.addDebugLog("Created shared document in storage","success")},Ae=async()=>{const I={appName:"PeerPigeon Vue Demo",version:"1.0.0",features:{messaging:!0,media:!0,dht:!0,storage:!0,crypto:!0},limits:{maxPeers:10,maxMessageSize:1048576,maxStorageSize:104857600},created:Date.now()};await t.storageStore("config:app",I,{isPublic:!0,isImmutable:!0,enableCRDT:!1,replicate:!0}),t.addDebugLog("Created config file in storage","success")},He=async()=>{const I={document:"collaborative-demo",participants:[t.peerId.substring(0,8)+"..."],content:{title:"Collaborative Demo",sections:[{id:1,author:t.peerId.substring(0,8)+"...",content:"This section was created by the first participant.",timestamp:Date.now()}]},metadata:{created:Date.now(),lastModified:Date.now(),crdtVersion:1}};await t.storageStore("collab:demo",I,{isPublic:!0,isImmutable:!1,enableCRDT:!0,replicate:!0}),t.addDebugLog("Created collaboration demo in storage","success")},ne=async()=>{const I={secret:"This is sensitive information",keys:["key1","key2","key3"],metadata:{classification:"confidential",owner:t.peerId.substring(0,8)+"...",created:Date.now()}};await t.storageStore("test:encryption",I,{isPublic:!1,isImmutable:!1,enableCRDT:!1,replicate:!0,encryptionLevel:"high"}),t.addDebugLog("Created encryption test data in storage","success")},$=async()=>{const I={message:"This data requires explicit access permissions",level:"restricted",owner:t.peerId.substring(0,8)+"...",created:Date.now(),accessLog:[]};await t.storageStore("access:restricted",I,{isPublic:!1,isImmutable:!1,enableCRDT:!1,replicate:!0}),t.addDebugLog("Created access control demo data in storage","success")};return Wt(async()=>{try{t.storageStats=await t.getStorageStats()}catch(I){console.warn("Failed to load storage stats:",I)}}),(I,u)=>(R(),x("div",em,[u[91]||(u[91]=s("div",{class:"section-header"},[s("h2",null,"๐ฆ Distributed Storage Layer"),s("p",null,"Encrypted, access-controlled storage with CRDT support for collaborative editing")],-1)),s("div",tm,[u[60]||(u[60]=s("h3",null,"๐พ Storage Operations",-1)),s("div",sm,[s("button",{onClick:u[0]||(u[0]=L=>n.value="store"),class:ke(["tab-btn",{active:n.value==="store"}])}," STORE ",2),s("button",{onClick:u[1]||(u[1]=L=>n.value="retrieve"),class:ke(["tab-btn",{active:n.value==="retrieve"}])}," RETRIEVE ",2),s("button",{onClick:u[2]||(u[2]=L=>n.value="update"),class:ke(["tab-btn",{active:n.value==="update"}])}," UPDATE ",2),s("button",{onClick:u[3]||(u[3]=L=>n.value="access"),class:ke(["tab-btn",{active:n.value==="access"}])}," ACCESS CONTROL ",2)]),n.value==="store"?(R(),x("div",nm,[u[33]||(u[33]=s("h4",null,"๐พ Store Data",-1)),u[34]||(u[34]=s("p",{class:"operation-description"}," Store data with encryption, access control, and optional immutability. Data is automatically distributed across the mesh. ",-1)),s("div",om,[u[22]||(u[22]=s("label",null,"Key:",-1)),ae(s("input",{"onUpdate:modelValue":u[4]||(u[4]=L=>o.value=L),placeholder:"e.g., user:profile, doc:shared, config:app",class:"form-input"},null,512),[[Te,o.value]])]),s("div",am,[u[23]||(u[23]=s("label",null,"Value (JSON):",-1)),ae(s("textarea",{"onUpdate:modelValue":u[5]||(u[5]=L=>a.value=L),placeholder:'{"name": "Alice", "email": "alice@example.com"}',rows:"6",class:"form-textarea"},null,512),[[Te,a.value]])]),s("div",im,[u[28]||(u[28]=s("label",null,"Storage Options:",-1)),s("div",rm,[s("label",lm,[ae(s("input",{type:"checkbox","onUpdate:modelValue":u[6]||(u[6]=L=>i.value.isPublic=L)},null,512),[[ze,i.value.isPublic]]),u[24]||(u[24]=P(" Public (not encrypted, anyone can read) ",-1))]),s("label",cm,[ae(s("input",{type:"checkbox","onUpdate:modelValue":u[7]||(u[7]=L=>i.value.isImmutable=L)},null,512),[[ze,i.value.isImmutable]]),u[25]||(u[25]=P(" Immutable (cannot be modified after creation) ",-1))]),s("label",um,[ae(s("input",{type:"checkbox","onUpdate:modelValue":u[8]||(u[8]=L=>i.value.enableCRDT=L)},null,512),[[ze,i.value.enableCRDT]]),u[26]||(u[26]=P(" Enable CRDT (collaborative editing support) ",-1))]),s("label",dm,[ae(s("input",{type:"checkbox","onUpdate:modelValue":u[9]||(u[9]=L=>i.value.replicate=L)},null,512),[[ze,i.value.replicate]]),u[27]||(u[27]=P(" Replicate across mesh ",-1))])])]),i.value.isPublic?de("",!0):(R(),x("div",fm,[u[30]||(u[30]=s("label",null,"Encryption Level:",-1)),ae(s("select",{"onUpdate:modelValue":u[10]||(u[10]=L=>i.value.encryptionLevel=L),class:"form-select"},[...u[29]||(u[29]=[s("option",{value:"standard"},"Standard Encryption",-1),s("option",{value:"high"},"High Security",-1),s("option",{value:"group"},"Group Encryption",-1)])],512),[[Ke,i.value.encryptionLevel]])])),s("div",gm,[u[31]||(u[31]=s("label",null,"TTL (seconds, optional):",-1)),ae(s("input",{"onUpdate:modelValue":u[11]||(u[11]=L=>i.value.ttl=L),type:"number",placeholder:"Leave empty for no expiration",class:"form-input"},null,512),[[Te,i.value.ttl,void 0,{number:!0}]])]),s("button",{onClick:ye,disabled:!o.value||!a.value||!Y.value,class:"btn btn-primary"},[...u[32]||(u[32]=[s("span",{class:"btn-icon"},"๐พ",-1),P(" Store Data ",-1)])],8,pm)])):de("",!0),n.value==="retrieve"?(R(),x("div",vm,[u[41]||(u[41]=s("h4",null,"๐ฅ Retrieve Data",-1)),u[42]||(u[42]=s("p",{class:"operation-description"}," Retrieve encrypted data with automatic decryption based on your access permissions. ",-1)),s("div",mm,[u[35]||(u[35]=s("label",null,"Key:",-1)),ae(s("input",{"onUpdate:modelValue":u[12]||(u[12]=L=>r.value=L),placeholder:"Enter key to retrieve",class:"form-input"},null,512),[[Te,r.value]])]),s("div",bm,[u[38]||(u[38]=s("label",null,"Retrieve Options:",-1)),s("div",hm,[s("label",ym,[ae(s("input",{type:"checkbox","onUpdate:modelValue":u[13]||(u[13]=L=>d.value.forceRefresh=L)},null,512),[[ze,d.value.forceRefresh]]),u[36]||(u[36]=P(" Force refresh from network ",-1))]),s("label",wm,[ae(s("input",{type:"checkbox","onUpdate:modelValue":u[14]||(u[14]=L=>d.value.includeMetadata=L)},null,512),[[ze,d.value.includeMetadata]]),u[37]||(u[37]=P(" Include metadata ",-1))])])]),s("button",{onClick:pe,disabled:!r.value||!Y.value,class:"btn btn-primary"},[...u[39]||(u[39]=[s("span",{class:"btn-icon"},"๐",-1),P(" Retrieve Data ",-1)])],8,Sm),l.value?(R(),x("div",Dm,[u[40]||(u[40]=s("h5",null,"Retrieved Data:",-1)),s("pre",$m,E(JSON.stringify(l.value,null,2)),1)])):de("",!0)])):de("",!0),n.value==="update"?(R(),x("div",km,[u[50]||(u[50]=s("h4",null,"๐ Update Existing Data",-1)),u[51]||(u[51]=s("p",{class:"operation-description"}," Update data you own or contribute to CRDT-enabled collaborative documents. ",-1)),s("div",Cm,[u[43]||(u[43]=s("label",null,"Key:",-1)),ae(s("input",{"onUpdate:modelValue":u[15]||(u[15]=L=>p.value=L),placeholder:"Key to update",class:"form-input"},null,512),[[Te,p.value]])]),s("div",_m,[u[44]||(u[44]=s("label",null,"New Value (JSON):",-1)),ae(s("textarea",{"onUpdate:modelValue":u[16]||(u[16]=L=>g.value=L),placeholder:'{"name": "Alice Smith", "updated": true}',rows:"6",class:"form-textarea"},null,512),[[Te,g.value]])]),s("div",Em,[u[48]||(u[48]=s("label",null,"Update Options:",-1)),s("div",Tm,[s("label",Pm,[ae(s("input",{type:"checkbox","onUpdate:modelValue":u[17]||(u[17]=L=>f.value.createIfNotExists=L)},null,512),[[ze,f.value.createIfNotExists]]),u[45]||(u[45]=P(" Create if doesn't exist ",-1))]),s("label",Rm,[ae(s("input",{type:"checkbox","onUpdate:modelValue":u[18]||(u[18]=L=>f.value.mergeData=L)},null,512),[[ze,f.value.mergeData]]),u[46]||(u[46]=P(" Merge with existing data ",-1))]),s("label",xm,[ae(s("input",{type:"checkbox","onUpdate:modelValue":u[19]||(u[19]=L=>f.value.incrementVersion=L)},null,512),[[ze,f.value.incrementVersion]]),u[47]||(u[47]=P(" Increment version ",-1))])])]),s("button",{onClick:ue,disabled:!p.value||!g.value||!Y.value,class:"btn btn-primary"},[...u[49]||(u[49]=[s("span",{class:"btn-icon"},"๐",-1),P(" Update Data ",-1)])],8,Lm)])):de("",!0),n.value==="access"?(R(),x("div",Am,[u[58]||(u[58]=s("h4",null,"๐ Access Control",-1)),u[59]||(u[59]=s("p",{class:"operation-description"}," Grant or revoke access to your private data for specific peers. ",-1)),s("div",Mm,[u[57]||(u[57]=s("h5",null,"Grant Access",-1)),s("div",Im,[u[52]||(u[52]=s("label",null,"Data Key:",-1)),ae(s("input",{"onUpdate:modelValue":u[20]||(u[20]=L=>S.value=L),placeholder:"Key to grant access to",class:"form-input"},null,512),[[Te,S.value]])]),s("div",Nm,[u[54]||(u[54]=s("label",null,"Peer ID:",-1)),ae(s("select",{"onUpdate:modelValue":u[21]||(u[21]=L=>D.value=L),class:"form-select"},[u[53]||(u[53]=s("option",{value:""},"Select a peer...",-1)),(R(!0),x(_e,null,Oe(B.value,L=>(R(),x("option",{key:L.id,value:L.id},E(L.id.substring(0,16))+"... ("+E(L.status)+") ",9,Om))),128))],512),[[Ke,D.value]])]),s("div",Vm,[s("button",{onClick:se,disabled:!S.value||!D.value||!Y.value,class:"btn btn-success"},[...u[55]||(u[55]=[s("span",{class:"btn-icon"},"โ
",-1),P(" Grant Access ",-1)])],8,Um),s("button",{onClick:V,disabled:!S.value||!D.value||!Y.value,class:"btn btn-danger"},[...u[56]||(u[56]=[s("span",{class:"btn-icon"},"โ",-1),P(" Revoke Access ",-1)])],8,Fm)])])])):de("",!0)]),s("div",Km,[s("div",Hm,[s("h3",null,"๐ Stored Data ("+E(M.value.size)+")",1),s("div",{class:"data-controls"},[s("button",{onClick:F,class:"btn btn-secondary"},[...u[61]||(u[61]=[s("span",{class:"btn-icon"},"๐",-1),P(" Refresh All ",-1)])]),s("button",{onClick:ve,class:"btn btn-secondary"},[...u[62]||(u[62]=[s("span",{class:"btn-icon"},"๐ค",-1),P(" Export ",-1)])]),s("button",{onClick:le,class:"btn btn-danger"},[...u[63]||(u[63]=[s("span",{class:"btn-icon"},"๐๏ธ",-1),P(" Clear Local ",-1)])])])]),M.value.size===0?(R(),x("div",Bm,[...u[64]||(u[64]=[s("div",{class:"empty-icon"},"๐ญ",-1),s("p",null,"No data stored yet",-1),s("p",{class:"empty-meta"},"Store some data using the STORE operation above",-1)])])):(R(),x("div",jm,[(R(!0),x(_e,null,Oe(Array.from(M.value.entries()),([L,k])=>{var w,W,v,b,C;return R(),x("div",{key:L,class:"data-item"},[s("div",Gm,[s("h4",zm,E(L),1),s("div",Wm,[k.local?(R(),x("span",Jm,"Local")):(R(),x("span",qm,"Remote")),(w=k.options)!=null&&w.isPublic?(R(),x("span",Ym,"Public")):(R(),x("span",Qm,"Private")),(W=k.options)!=null&&W.isImmutable?(R(),x("span",Xm,"Immutable")):de("",!0),(v=k.options)!=null&&v.enableCRDT?(R(),x("span",Zm,"CRDT")):de("",!0)])]),s("div",eb,[s("span",tb,E($e(k.timestamp)),1),k.version?(R(),x("span",sb,"v"+E(k.version),1)):de("",!0),(b=k.options)!=null&&b.ttl?(R(),x("span",nb,"TTL: "+E(k.options.ttl)+"s",1)):de("",!0)]),s("div",ob,[s("pre",null,E(JSON.stringify(k.value,null,2)),1)]),s("div",ab,[s("button",{onClick:O=>Se(L),class:"btn btn-sm btn-secondary"},[...u[65]||(u[65]=[s("span",{class:"btn-icon"},"๐",-1),P(" Copy Key ",-1)])],8,ib),s("button",{onClick:O=>j(L),class:"btn btn-sm btn-secondary"},[...u[66]||(u[66]=[s("span",{class:"btn-icon"},"๐",-1),P(" Refresh ",-1)])],8,rb),k.local&&!((C=k.options)!=null&&C.isImmutable)?(R(),x("button",{key:0,onClick:O=>re(L,k),class:"btn btn-sm btn-primary"},[...u[67]||(u[67]=[s("span",{class:"btn-icon"},"โ๏ธ",-1),P(" Edit ",-1)])],8,lb)):de("",!0),k.local?(R(),x("button",{key:1,onClick:O=>y(L),class:"btn btn-sm btn-info"},[...u[68]||(u[68]=[s("span",{class:"btn-icon"},"๐",-1),P(" Access ",-1)])],8,cb)):de("",!0),k.local?(R(),x("button",{key:2,onClick:O=>J(L),class:"btn btn-sm btn-danger"},[...u[69]||(u[69]=[s("span",{class:"btn-icon"},"๐๏ธ",-1),P(" Delete ",-1)])],8,ub)):de("",!0)])])}),128))]))]),s("div",db,[u[83]||(u[83]=s("h3",null,"๐ Storage Statistics",-1)),s("div",fb,[s("div",gb,[u[72]||(u[72]=s("div",{class:"stat-icon"},"๐พ",-1)),s("div",pb,[u[70]||(u[70]=s("h4",null,"Local Data",-1)),s("div",vb,E(q.value),1),u[71]||(u[71]=s("div",{class:"stat-meta"},"Items stored locally",-1))])]),s("div",mb,[u[75]||(u[75]=s("div",{class:"stat-icon"},"๐",-1)),s("div",bb,[u[73]||(u[73]=s("h4",null,"Remote Data",-1)),s("div",hb,E(Z.value),1),u[74]||(u[74]=s("div",{class:"stat-meta"},"Items from other peers",-1))])]),s("div",yb,[u[78]||(u[78]=s("div",{class:"stat-icon"},"๐",-1)),s("div",wb,[u[76]||(u[76]=s("h4",null,"Private Items",-1)),s("div",Sb,E(ee.value),1),u[77]||(u[77]=s("div",{class:"stat-meta"},"Encrypted data",-1))])]),s("div",Db,[u[81]||(u[81]=s("div",{class:"stat-icon"},"๐",-1)),s("div",$b,[u[79]||(u[79]=s("h4",null,"Public Items",-1)),s("div",kb,E(ce.value),1),u[80]||(u[80]=s("div",{class:"stat-meta"},"Unencrypted data",-1))])])]),z.value?(R(),x("div",Cb,[u[82]||(u[82]=s("h4",null,"Detailed Storage Statistics:",-1)),s("pre",_b,E(JSON.stringify(z.value,null,2)),1)])):de("",!0)]),s("div",{class:"quick-actions"},[u[90]||(u[90]=s("h3",null,"โก Quick Storage Actions",-1)),s("div",{class:"action-buttons"},[s("button",{onClick:Ee,class:"btn btn-secondary"},[...u[84]||(u[84]=[s("span",{class:"btn-icon"},"๐ค",-1),P(" Create User Profile ",-1)])]),s("button",{onClick:Ve,class:"btn btn-secondary"},[...u[85]||(u[85]=[s("span",{class:"btn-icon"},"๐",-1),P(" Create Shared Document ",-1)])]),s("button",{onClick:Ae,class:"btn btn-secondary"},[...u[86]||(u[86]=[s("span",{class:"btn-icon"},"โ๏ธ",-1),P(" Create Config File ",-1)])]),s("button",{onClick:He,class:"btn btn-secondary"},[...u[87]||(u[87]=[s("span",{class:"btn-icon"},"๐ฅ",-1),P(" Demo Collaboration ",-1)])]),s("button",{onClick:ne,class:"btn btn-secondary"},[...u[88]||(u[88]=[s("span",{class:"btn-icon"},"๐",-1),P(" Test Encryption ",-1)])]),s("button",{onClick:$,class:"btn btn-secondary"},[...u[89]||(u[89]=[s("span",{class:"btn-icon"},"๐",-1),P(" Demo Access Control ",-1)])])])])]))}},Tb=Mt(Eb,[["__scopeId","data-v-5babeb99"]]),Pb={class:"crypto-view"},Rb={class:"crypto-operations"},xb={class:"operation-tabs"},Lb={key:0,class:"operation-panel"},Ab={class:"key-generation"},Mb={class:"form-group"},Ib={key:0,class:"form-group"},Nb={key:1,class:"form-group"},Ob={class:"form-group"},Vb=["disabled"],Ub={class:"key-import"},Fb={class:"form-group"},Kb={class:"form-group"},Hb=["disabled"],Bb={key:1,class:"operation-panel"},jb={class:"encrypt-section"},Gb={class:"form-group"},zb={class:"form-group"},Wb=["value"],Jb={class:"form-group"},qb=["disabled"],Yb={key:0,class:"result-panel"},Qb={class:"result-content"},Xb={class:"decrypt-section"},Zb={class:"form-group"},eh={class:"form-group"},th=["value"],sh=["disabled"],nh={key:0,class:"result-panel"},oh={class:"result-content"},ah={key:2,class:"operation-panel"},ih={class:"sign-section"},rh={class:"form-group"},lh={class:"form-group"},ch=["value"],uh={class:"form-group"},dh=["disabled"],fh={key:0,class:"result-panel"},gh={class:"result-content"},ph={class:"verify-section"},vh={class:"form-group"},mh={class:"form-group"},bh={class:"form-group"},hh=["value"],yh=["disabled"],wh={key:0,class:"result-panel"},Sh={class:"result-icon"},Dh={key:3,class:"operation-panel"},$h={class:"exchange-section"},kh={class:"form-group"},Ch=["value"],_h={class:"form-group"},Eh={class:"form-group"},Th=["disabled"],Ph={class:"shared-secrets"},Rh={key:0,class:"empty-secrets"},xh={key:1,class:"secrets-list"},Lh={class:"secret-header"},Ah={class:"secret-badges"},Mh={class:"badge badge-method"},Ih={class:"badge badge-status"},Nh={class:"secret-details"},Oh={class:"secret-peer"},Vh={class:"secret-created"},Uh={class:"secret-key"},Fh={class:"secret-actions"},Kh=["onClick"],Hh=["onClick"],Bh={class:"key-management-display"},jh={class:"section-title"},Gh={key:0,class:"empty-keys"},zh={key:1,class:"keys-grid"},Wh={class:"key-header"},Jh={class:"key-name"},qh={class:"key-badges"},Yh={class:"badge badge-type"},Qh={key:0,class:"badge badge-usage"},Xh={key:1,class:"badge badge-usage"},Zh={key:2,class:"badge badge-extractable"},ey={class:"key-details"},ty={class:"key-id"},sy={class:"key-algorithm"},ny={key:0,class:"key-size"},oy={class:"key-created"},ay={class:"key-fingerprint"},iy={class:"fingerprint"},ry={class:"key-actions"},ly=["onClick"],cy=["onClick"],uy=["onClick"],dy=["onClick"],fy={class:"crypto-stats"},gy={class:"stats-grid"},py={class:"stat-card"},vy={class:"stat-content"},my={class:"stat-value"},by={class:"stat-card"},hy={class:"stat-content"},yy={class:"stat-value"},wy={class:"stat-card"},Sy={class:"stat-content"},Dy={class:"stat-value"},$y={class:"stat-card"},ky={class:"stat-content"},Cy={class:"stat-value"},_y={__name:"CryptoView",setup(e){const t=At(),n=H("keys"),o=H({type:"RSA",size:2048,name:""}),a=H(!1),i=H(""),r=H(""),l=H(""),d=H(""),p=H({algorithm:"RSA-OAEP"}),g=H(""),f=H(""),S=H(""),D=H(""),M=H(""),z=H(""),B=H({hashAlg:"SHA-256"}),Y=H(""),q=H(""),Z=H(""),ee=H(""),ce=H(null),ye=H(""),pe=H({method:"ECDH",purpose:""}),ue=H([]),se=H(0),V=H(0),F=ge(()=>t.cryptoKeys),j=ge(()=>t.connectedPeersList),le=ge(()=>F.value.filter(T=>T.usage.includes("encrypt")||T.usage.includes("decrypt"))),Se=ge(()=>F.value.filter(T=>T.usage.includes("sign"))),re=ge(()=>F.value.filter(T=>T.usage.includes("verify"))),y=async()=>{a.value=!0;try{await t.cryptoGenerateKey(o.value.type,o.value.size,o.value.name)&&(t.addDebugLog(`Generated ${o.value.type} key pair: ${o.value.name}`,"success"),o.value.name="")}catch(T){t.addDebugLog(`Key generation failed: ${T.message}`,"error")}finally{a.value=!1}},J=async()=>{try{await t.cryptoImportKey(i.value,r.value)&&(t.addDebugLog(`Imported key: ${r.value}`,"success"),i.value="",r.value="")}catch(T){t.addDebugLog(`Key import failed: ${T.message}`,"error")}},ve=async()=>{try{const T=await t.cryptoEncrypt(l.value,d.value,p.value);T&&(g.value=T,se.value++,t.addDebugLog("Encryption successful","success"))}catch(T){t.addDebugLog(`Encryption failed: ${T.message}`,"error")}},$e=async()=>{try{const T=await t.cryptoDecrypt(f.value,S.value);T&&(D.value=T,t.addDebugLog("Decryption successful","success"))}catch(T){t.addDebugLog(`Decryption failed: ${T.message}`,"error")}},Ee=async()=>{try{const T=await t.cryptoSign(M.value,z.value,B.value);T&&(Y.value=T,V.value++,t.addDebugLog("Data signing successful","success"))}catch(T){t.addDebugLog(`Signing failed: ${T.message}`,"error")}},Ve=async()=>{try{const T=await t.cryptoVerify(q.value,Z.value,ee.value);ce.value=T,V.value++;const c=T?"Signature verification successful":"Signature verification failed",_=T?"success":"warning";t.addDebugLog(c,_)}catch(T){ce.value=!1,t.addDebugLog(`Signature verification error: ${T.message}`,"error")}},Ae=async()=>{try{const T=await t.cryptoKeyExchange(ye.value,pe.value.method,pe.value.purpose);T&&(ue.value.push({id:Date.now().toString(),peerId:ye.value,method:pe.value.method,purpose:pe.value.purpose,keyId:T.keyId,status:"active",created:Date.now()}),t.addDebugLog(`Key exchange initiated with ${ye.value.substring(0,8)}...`,"success"),ye.value="",pe.value.purpose="")}catch(T){t.addDebugLog(`Key exchange failed: ${T.message}`,"error")}},He=T=>{d.value=T.keyId,n.value="encrypt",t.addDebugLog(`Using shared secret for encryption: ${T.purpose}`,"info")},ne=T=>{const c=ue.value.findIndex(_=>_.id===T);c!==-1&&(ue.value.splice(c,1),t.addDebugLog("Shared secret revoked","info"))},$=async()=>{try{await t.cryptoRefreshKeys(),t.addDebugLog("Key store refreshed","success")}catch(T){t.addDebugLog(`Failed to refresh keys: ${T.message}`,"error")}},I=()=>{const T={keys:F.value.filter(fe=>fe.extractable),exported:Date.now(),version:"1.0"},c=JSON.stringify(T,null,2),_=new Blob([c],{type:"application/json"}),Q=URL.createObjectURL(_),ie=document.createElement("a");ie.href=Q,ie.download=`peerpigeon-keys-${Date.now()}.json`,document.body.appendChild(ie),ie.click(),document.body.removeChild(ie),URL.revokeObjectURL(Q),t.addDebugLog("Keys exported","success")},u=()=>{confirm("Are you sure you want to clear all keys? This cannot be undone.")&&(t.cryptoKeys.splice(0),t.addDebugLog("All keys cleared","warning"))},L=async T=>{try{const c=await t.cryptoExportKey(T.id);if(c){const _=JSON.stringify(c,null,2),Q=new Blob([_],{type:"application/json"}),ie=URL.createObjectURL(Q),fe=document.createElement("a");fe.href=ie,fe.download=`${T.name}-${Date.now()}.json`,document.body.appendChild(fe),fe.click(),document.body.removeChild(fe),URL.revokeObjectURL(ie),t.addDebugLog(`Exported key: ${T.name}`,"success")}}catch(c){t.addDebugLog(`Key export failed: ${c.message}`,"error")}},k=async T=>{try{await navigator.clipboard.writeText(T),t.addDebugLog("Key ID copied to clipboard","success")}catch{t.addDebugLog("Failed to copy to clipboard","error")}},w=async T=>{try{await navigator.clipboard.writeText(T),t.addDebugLog("Copied to clipboard","success")}catch{t.addDebugLog("Failed to copy to clipboard","error")}},W=T=>{t.addDebugLog(`Key Details: ${JSON.stringify(T,null,2)}`,"info")},v=async T=>{if(confirm("Are you sure you want to delete this key?"))try{await t.cryptoDeleteKey(T),t.addDebugLog("Key deleted","success")}catch(c){t.addDebugLog(`Key deletion failed: ${c.message}`,"error")}},b=T=>new Date(T).toLocaleTimeString(),C=async()=>{const T=[{type:"RSA",size:2048,name:"test-rsa-2048"},{type:"ECDSA",size:256,name:"test-ecdsa-p256"},{type:"Ed25519",size:null,name:"test-ed25519"},{type:"AES",size:256,name:"test-aes-256"}];for(const c of T)try{await t.cryptoGenerateKey(c.type,c.size,c.name)}catch(_){console.warn(`Failed to generate ${c.name}:`,_)}t.addDebugLog("Generated test key suite","success")},O=async()=>{const T="This is a test message for encryption demonstration.",c=le.value[0];if(!c){t.addDebugLog("No encryption keys available for test","warning");return}try{const _=await t.cryptoEncrypt(T,c.id,{algorithm:"RSA-OAEP"});if(!_)return;const ie=await t.cryptoDecrypt(_,c.id)===T,fe=ie?"Encryption test passed":"Encryption test failed";t.addDebugLog(fe,ie?"success":"error"),se.value+=2}catch(_){t.addDebugLog(`Encryption test failed: ${_.message}`,"error")}},K=async()=>{const T="This is a test message for signing demonstration.",c=Se.value[0],_=re.value[0];if(!c||!_){t.addDebugLog("No signing/verification keys available for test","warning");return}try{const Q=await t.cryptoSign(T,c.id,{hashAlg:"SHA-256"});if(!Q)return;const ie=await t.cryptoVerify(T,Q,_.id),fe=ie?"Signing test passed":"Signing test failed";t.addDebugLog(fe,ie?"success":"error"),V.value+=2}catch(Q){t.addDebugLog(`Signing test failed: ${Q.message}`,"error")}},N=async()=>{if(t.addDebugLog("Key exchange demo - requires connected peers","info"),j.value.length===0){t.addDebugLog("No connected peers available for key exchange demo","warning");return}const T=j.value[0];try{await Ae(T.id,"ECDH","demo-exchange")}catch(c){t.addDebugLog(`Key exchange demo failed: ${c.message}`,"error")}},oe=async()=>{t.addDebugLog("Running cryptographic benchmarks...","info");const T=performance.now();try{await t.cryptoGenerateKey("AES",256,"benchmark-key");const c="Benchmark test data";for(let ie=0;ie<10;ie++){const fe=le.value.find(U=>U.name==="benchmark-key");fe&&await t.cryptoEncrypt(c,fe.id,{algorithm:"AES-GCM"})}const _=performance.now(),Q=Math.round(_-T);t.addDebugLog(`Benchmark completed in ${Q}ms`,"success")}catch(c){t.addDebugLog(`Benchmark failed: ${c.message}`,"error")}},te=async()=>{const T=[];try{window.crypto&&window.crypto.subtle?T.push("โ
Web Crypto API"):T.push("โ Web Crypto API");const c=["RSA-OAEP","AES-GCM","ECDSA","Ed25519"];for(const _ of c)try{T.push(`โ
${_}`)}catch{T.push(`โ ${_}`)}t.addDebugLog(`Crypto Support:
${T.join(`
`)}`,"info")}catch(c){t.addDebugLog(`Crypto validation failed: ${c.message}`,"error")}};return Wt(async()=>{try{await t.initializeCrypto()}catch(T){console.warn("Failed to initialize crypto:",T)}}),(T,c)=>(R(),x("div",Pb,[c[118]||(c[118]=s("div",{class:"section-header"},[s("h2",null,"๐ Cryptographic Features"),s("p",null,"Key management, encryption/decryption, and secure peer communications")],-1)),s("div",Rb,[c[88]||(c[88]=s("h3",null,"๐ Cryptographic Operations",-1)),s("div",xb,[s("button",{onClick:c[0]||(c[0]=_=>n.value="keys"),class:ke(["tab-btn",{active:n.value==="keys"}])}," KEY MANAGEMENT ",2),s("button",{onClick:c[1]||(c[1]=_=>n.value="encrypt"),class:ke(["tab-btn",{active:n.value==="encrypt"}])}," ENCRYPT/DECRYPT ",2),s("button",{onClick:c[2]||(c[2]=_=>n.value="signatures"),class:ke(["tab-btn",{active:n.value==="signatures"}])}," SIGNATURES ",2),s("button",{onClick:c[3]||(c[3]=_=>n.value="exchange"),class:ke(["tab-btn",{active:n.value==="exchange"}])}," KEY EXCHANGE ",2)]),n.value==="keys"?(R(),x("div",Lb,[c[39]||(c[39]=s("h4",null,"๐ Key Management",-1)),c[40]||(c[40]=s("p",{class:"operation-description"}," Generate, import, export, and manage cryptographic keys. PeerPigeon supports multiple key types and algorithms. ",-1)),s("div",Ab,[c[34]||(c[34]=s("h5",null,"Generate New Key Pair",-1)),s("div",Mb,[c[27]||(c[27]=s("label",null,"Key Type:",-1)),ae(s("select",{"onUpdate:modelValue":c[4]||(c[4]=_=>o.value.type=_),class:"form-select"},[...c[26]||(c[26]=[s("option",{value:"RSA"},"RSA (Asymmetric)",-1),s("option",{value:"ECDSA"},"ECDSA (Elliptic Curve)",-1),s("option",{value:"Ed25519"},"Ed25519 (Edwards Curve)",-1),s("option",{value:"AES"},"AES (Symmetric)",-1)])],512),[[Ke,o.value.type]])]),o.value.type==="RSA"?(R(),x("div",Ib,[c[29]||(c[29]=s("label",null,"Key Size:",-1)),ae(s("select",{"onUpdate:modelValue":c[5]||(c[5]=_=>o.value.size=_),class:"form-select"},[...c[28]||(c[28]=[s("option",{value:"2048"},"2048 bits",-1),s("option",{value:"3072"},"3072 bits",-1),s("option",{value:"4096"},"4096 bits",-1)])],512),[[Ke,o.value.size]])])):de("",!0),o.value.type==="AES"?(R(),x("div",Nb,[c[31]||(c[31]=s("label",null,"Key Length:",-1)),ae(s("select",{"onUpdate:modelValue":c[6]||(c[6]=_=>o.value.size=_),class:"form-select"},[...c[30]||(c[30]=[s("option",{value:"128"},"128 bits",-1),s("option",{value:"192"},"192 bits",-1),s("option",{value:"256"},"256 bits",-1)])],512),[[Ke,o.value.size]])])):de("",!0),s("div",Ob,[c[32]||(c[32]=s("label",null,"Key Name/Label:",-1)),ae(s("input",{"onUpdate:modelValue":c[7]||(c[7]=_=>o.value.name=_),placeholder:"e.g., my-signing-key, backup-key",class:"form-input"},null,512),[[Te,o.value.name]])]),s("button",{onClick:y,disabled:!o.value.name||a.value,class:"btn btn-primary"},[c[33]||(c[33]=s("span",{class:"btn-icon"},"๐",-1)),P(" "+E(a.value?"Generating...":"Generate Key Pair"),1)],8,Vb)]),s("div",Ub,[c[38]||(c[38]=s("h5",null,"Import Existing Key",-1)),s("div",Fb,[c[35]||(c[35]=s("label",null,"Key Data (PEM/JWK format):",-1)),ae(s("textarea",{"onUpdate:modelValue":c[8]||(c[8]=_=>i.value=_),placeholder:`-----BEGIN PRIVATE KEY-----
...
-----END PRIVATE KEY-----`,rows:"8",class:"form-textarea"},null,512),[[Te,i.value]])]),s("div",Kb,[c[36]||(c[36]=s("label",null,"Key Name:",-1)),ae(s("input",{"onUpdate:modelValue":c[9]||(c[9]=_=>r.value=_),placeholder:"imported-key",class:"form-input"},null,512),[[Te,r.value]])]),s("button",{onClick:J,disabled:!i.value||!r.value,class:"btn btn-secondary"},[...c[37]||(c[37]=[s("span",{class:"btn-icon"},"๐ฅ",-1),P(" Import Key ",-1)])],8,Hb)])])):de("",!0),n.value==="encrypt"?(R(),x("div",Bb,[c[56]||(c[56]=s("h4",null,"๐ Encryption & Decryption",-1)),c[57]||(c[57]=s("p",{class:"operation-description"}," Encrypt and decrypt data using various algorithms. Supports both symmetric and asymmetric encryption. ",-1)),s("div",jb,[c[49]||(c[49]=s("h5",null,"Encrypt Data",-1)),s("div",Gb,[c[41]||(c[41]=s("label",null,"Data to Encrypt:",-1)),ae(s("textarea",{"onUpdate:modelValue":c[10]||(c[10]=_=>l.value=_),placeholder:"Enter text or JSON data to encrypt",rows:"4",class:"form-textarea"},null,512),[[Te,l.value]])]),s("div",zb,[c[43]||(c[43]=s("label",null,"Encryption Key:",-1)),ae(s("select",{"onUpdate:modelValue":c[11]||(c[11]=_=>d.value=_),class:"form-select"},[c[42]||(c[42]=s("option",{value:""},"Select a key...",-1)),(R(!0),x(_e,null,Oe(le.value,_=>(R(),x("option",{key:_.id,value:_.id},E(_.name)+" ("+E(_.type)+") ",9,Wb))),128))],512),[[Ke,d.value]])]),s("div",Jb,[c[45]||(c[45]=s("label",null,"Algorithm:",-1)),ae(s("select",{"onUpdate:modelValue":c[12]||(c[12]=_=>p.value.algorithm=_),class:"form-select"},[...c[44]||(c[44]=[s("option",{value:"RSA-OAEP"},"RSA-OAEP",-1),s("option",{value:"AES-GCM"},"AES-GCM",-1),s("option",{value:"AES-CBC"},"AES-CBC",-1)])],512),[[Ke,p.value.algorithm]])]),s("button",{onClick:ve,disabled:!l.value||!d.value,class:"btn btn-primary"},[...c[46]||(c[46]=[s("span",{class:"btn-icon"},"๐",-1),P(" Encrypt Data ",-1)])],8,qb),g.value?(R(),x("div",Yb,[c[48]||(c[48]=s("h6",null,"Encrypted Result:",-1)),s("pre",Qb,E(g.value),1),s("button",{onClick:c[13]||(c[13]=_=>w(g.value)),class:"btn btn-sm btn-secondary"},[...c[47]||(c[47]=[s("span",{class:"btn-icon"},"๐",-1),P(" Copy ",-1)])])])):de("",!0)]),s("div",Xb,[c[55]||(c[55]=s("h5",null,"Decrypt Data",-1)),s("div",Zb,[c[50]||(c[50]=s("label",null,"Encrypted Data:",-1)),ae(s("textarea",{"onUpdate:modelValue":c[14]||(c[14]=_=>f.value=_),placeholder:"Paste encrypted data here",rows:"4",class:"form-textarea"},null,512),[[Te,f.value]])]),s("div",eh,[c[52]||(c[52]=s("label",null,"Decryption Key:",-1)),ae(s("select",{"onUpdate:modelValue":c[15]||(c[15]=_=>S.value=_),class:"form-select"},[c[51]||(c[51]=s("option",{value:""},"Select a key...",-1)),(R(!0),x(_e,null,Oe(le.value,_=>(R(),x("option",{key:_.id,value:_.id},E(_.name)+" ("+E(_.type)+") ",9,th))),128))],512),[[Ke,S.value]])]),s("button",{onClick:$e,disabled:!f.value||!S.value,class:"btn btn-primary"},[...c[53]||(c[53]=[s("span",{class:"btn-icon"},"๐",-1),P(" Decrypt Data ",-1)])],8,sh),D.value?(R(),x("div",nh,[c[54]||(c[54]=s("h6",null,"Decrypted Result:",-1)),s("pre",oh,E(D.value),1)])):de("",!0)])])):de("",!0),n.value==="signatures"?(R(),x("div",ah,[c[73]||(c[73]=s("h4",null,"โ๏ธ Digital Signatures",-1)),c[74]||(c[74]=s("p",{class:"operation-description"}," Create and verify digital signatures to ensure data integrity and authenticity. ",-1)),s("div",ih,[c[66]||(c[66]=s("h5",null,"Sign Data",-1)),s("div",rh,[c[58]||(c[58]=s("label",null,"Data to Sign:",-1)),ae(s("textarea",{"onUpdate:modelValue":c[16]||(c[16]=_=>M.value=_),placeholder:"Enter data to create a digital signature",rows:"4",class:"form-textarea"},null,512),[[Te,M.value]])]),s("div",lh,[c[60]||(c[60]=s("label",null,"Signing Key:",-1)),ae(s("select",{"onUpdate:modelValue":c[17]||(c[17]=_=>z.value=_),class:"form-select"},[c[59]||(c[59]=s("option",{value:""},"Select a signing key...",-1)),(R(!0),x(_e,null,Oe(Se.value,_=>(R(),x("option",{key:_.id,value:_.id},E(_.name)+" ("+E(_.type)+") ",9,ch))),128))],512),[[Ke,z.value]])]),s("div",uh,[c[62]||(c[62]=s("label",null,"Hash Algorithm:",-1)),ae(s("select",{"onUpdate:modelValue":c[18]||(c[18]=_=>B.value.hashAlg=_),class:"form-select"},[...c[61]||(c[61]=[s("option",{value:"SHA-256"},"SHA-256",-1),s("option",{value:"SHA-384"},"SHA-384",-1),s("option",{value:"SHA-512"},"SHA-512",-1)])],512),[[Ke,B.value.hashAlg]])]),s("button",{onClick:Ee,disabled:!M.value||!z.value,class:"btn btn-primary"},[...c[63]||(c[63]=[s("span",{class:"btn-icon"},"โ๏ธ",-1),P(" Sign Data ",-1)])],8,dh),Y.value?(R(),x("div",fh,[c[65]||(c[65]=s("h6",null,"Digital Signature:",-1)),s("pre",gh,E(Y.value),1),s("button",{onClick:c[19]||(c[19]=_=>w(Y.value)),class:"btn btn-sm btn-secondary"},[...c[64]||(c[64]=[s("span",{class:"btn-icon"},"๐",-1),P(" Copy Signature ",-1)])])])):de("",!0)]),s("div",ph,[c[72]||(c[72]=s("h5",null,"Verify Signature",-1)),s("div",vh,[c[67]||(c[67]=s("label",null,"Original Data:",-1)),ae(s("textarea",{"onUpdate:modelValue":c[20]||(c[20]=_=>q.value=_),placeholder:"Enter the original data",rows:"4",class:"form-textarea"},null,512),[[Te,q.value]])]),s("div",mh,[c[68]||(c[68]=s("label",null,"Signature:",-1)),ae(s("textarea",{"onUpdate:modelValue":c[21]||(c[21]=_=>Z.value=_),placeholder:"Paste the signature to verify",rows:"3",class:"form-textarea"},null,512),[[Te,Z.value]])]),s("div",bh,[c[70]||(c[70]=s("label",null,"Verification Key:",-1)),ae(s("select",{"onUpdate:modelValue":c[22]||(c[22]=_=>ee.value=_),class:"form-select"},[c[69]||(c[69]=s("option",{value:""},"Select a public key...",-1)),(R(!0),x(_e,null,Oe(re.value,_=>(R(),x("option",{key:_.id,value:_.id},E(_.name)+" ("+E(_.type)+") ",9,hh))),128))],512),[[Ke,ee.value]])]),s("button",{onClick:Ve,disabled:!q.value||!Z.value||!ee.value,class:"btn btn-primary"},[...c[71]||(c[71]=[s("span",{class:"btn-icon"},"โ
",-1),P(" Verify Signature ",-1)])],8,yh),ce.value!==null?(R(),x("div",wh,[s("div",{class:ke(["verification-result",ce.value?"valid":"invalid"])},[s("span",Sh,E(ce.value?"โ
":"โ"),1),s("span",null,E(ce.value?"Signature Valid":"Signature Invalid"),1)],2)])):de("",!0)])])):de("",!0),n.value==="exchange"?(R(),x("div",Dh,[c[86]||(c[86]=s("h4",null,"๐ค Key Exchange",-1)),c[87]||(c[87]=s("p",{class:"operation-description"}," Securely exchange keys with peers using Diffie-Hellman key exchange and establish shared secrets. ",-1)),s("div",$h,[c[81]||(c[81]=s("h5",null,"Initiate Key Exchange",-1)),s("div",kh,[c[76]||(c[76]=s("label",null,"Target Peer:",-1)),ae(s("select",{"onUpdate:modelValue":c[23]||(c[23]=_=>ye.value=_),class:"form-select"},[c[75]||(c[75]=s("option",{value:""},"Select a peer...",-1)),(R(!0),x(_e,null,Oe(j.value,_=>(R(),x("option",{key:_.id,value:_.id},E(_.id.substring(0,16))+"... ("+E(_.status)+") ",9,Ch))),128))],512),[[Ke,ye.value]])]),s("div",_h,[c[78]||(c[78]=s("label",null,"Key Exchange Method:",-1)),ae(s("select",{"onUpdate:modelValue":c[24]||(c[24]=_=>pe.value.method=_),class:"form-select"},[...c[77]||(c[77]=[s("option",{value:"ECDH"},"ECDH (Elliptic Curve Diffie-Hellman)",-1),s("option",{value:"DH"},"DH (Classical Diffie-Hellman)",-1),s("option",{value:"X25519"},"X25519 (Curve25519)",-1)])],512),[[Ke,pe.value.method]])]),s("div",Eh,[c[79]||(c[79]=s("label",null,"Exchange Purpose:",-1)),ae(s("input",{"onUpdate:modelValue":c[25]||(c[25]=_=>pe.value.purpose=_),placeholder:"e.g., secure-channel, file-encryption",class:"form-input"},null,512),[[Te,pe.value.purpose]])]),s("button",{onClick:Ae,disabled:!ye.value||!pe.value.purpose,class:"btn btn-primary"},[...c[80]||(c[80]=[s("span",{class:"btn-icon"},"๐ค",-1),P(" Initiate Exchange ",-1)])],8,Th)]),s("div",Ph,[c[85]||(c[85]=s("h5",null,"Established Shared Secrets",-1)),ue.value.length===0?(R(),x("div",Rh,[...c[82]||(c[82]=[s("div",{class:"empty-icon"},"๐",-1),s("p",null,"No shared secrets established",-1)])])):(R(),x("div",xh,[(R(!0),x(_e,null,Oe(ue.value,_=>(R(),x("div",{key:_.id,class:"secret-item"},[s("div",Lh,[s("h6",null,E(_.purpose),1),s("div",Ah,[s("span",Mh,E(_.method),1),s("span",Ih,E(_.status),1)])]),s("div",Nh,[s("div",Oh,"Peer: "+E(_.peerId.substring(0,16))+"...",1),s("div",Vh,"Created: "+E(b(_.created)),1),s("div",Uh,"Key: "+E(_.keyId),1)]),s("div",Fh,[s("button",{onClick:Q=>He(_),class:"btn btn-sm btn-primary"},[...c[83]||(c[83]=[s("span",{class:"btn-icon"},"๐",-1),P(" Use for Encryption ",-1)])],8,Kh),s("button",{onClick:Q=>ne(_.id),class:"btn btn-sm btn-danger"},[...c[84]||(c[84]=[s("span",{class:"btn-icon"},"๐๏ธ",-1),P(" Revoke ",-1)])],8,Hh)])]))),128))]))])])):de("",!0)]),s("div",Bh,[s("div",jh,[s("h3",null,"๐๏ธ Key Store ("+E(F.value.length)+")",1),s("div",{class:"key-controls"},[s("button",{onClick:$,class:"btn btn-secondary"},[...c[89]||(c[89]=[s("span",{class:"btn-icon"},"๐",-1),P(" Refresh ",-1)])]),s("button",{onClick:I,class:"btn btn-secondary"},[...c[90]||(c[90]=[s("span",{class:"btn-icon"},"๐ค",-1),P(" Export ",-1)])]),s("button",{onClick:u,class:"btn btn-danger"},[...c[91]||(c[91]=[s("span",{class:"btn-icon"},"๐๏ธ",-1),P(" Clear All ",-1)])])])]),F.value.length===0?(R(),x("div",Gh,[...c[92]||(c[92]=[s("div",{class:"empty-icon"},"๐",-1),s("p",null,"No keys in store",-1),s("p",{class:"empty-meta"},"Generate or import keys using the operations above",-1)])])):(R(),x("div",zh,[(R(!0),x(_e,null,Oe(F.value,_=>(R(),x("div",{key:_.id,class:"key-item"},[s("div",Wh,[s("h4",Jh,E(_.name),1),s("div",qh,[s("span",Yh,E(_.type),1),_.usage.includes("sign")?(R(),x("span",Qh,"Signing")):de("",!0),_.usage.includes("encrypt")?(R(),x("span",Xh,"Encryption")):de("",!0),_.extractable?(R(),x("span",Zh,"Extractable")):de("",!0)])]),s("div",ey,[s("div",ty,"ID: "+E(_.id.substring(0,16))+"...",1),s("div",sy,"Algorithm: "+E(_.algorithm),1),_.size?(R(),x("div",ny,"Size: "+E(_.size)+" bits",1)):de("",!0),s("div",oy,"Created: "+E(b(_.created)),1)]),s("div",ay,[c[93]||(c[93]=s("label",null,"Fingerprint:",-1)),s("code",iy,E(_.fingerprint),1)]),s("div",ry,[_.extractable?(R(),x("button",{key:0,onClick:Q=>L(_),class:"btn btn-sm btn-secondary"},[...c[94]||(c[94]=[s("span",{class:"btn-icon"},"๐ค",-1),P(" Export ",-1)])],8,ly)):de("",!0),s("button",{onClick:Q=>k(_.id),class:"btn btn-sm btn-secondary"},[...c[95]||(c[95]=[s("span",{class:"btn-icon"},"๐",-1),P(" Copy ID ",-1)])],8,cy),s("button",{onClick:Q=>W(_),class:"btn btn-sm btn-info"},[...c[96]||(c[96]=[s("span",{class:"btn-icon"},"๐",-1),P(" Details ",-1)])],8,uy),s("button",{onClick:Q=>v(_.id),class:"btn btn-sm btn-danger"},[...c[97]||(c[97]=[s("span",{class:"btn-icon"},"๐๏ธ",-1),P(" Delete ",-1)])],8,dy)])]))),128))]))]),s("div",fy,[c[110]||(c[110]=s("h3",null,"๐ Cryptographic Statistics",-1)),s("div",gy,[s("div",py,[c[100]||(c[100]=s("div",{class:"stat-icon"},"๐",-1)),s("div",vy,[c[98]||(c[98]=s("h4",null,"Total Keys",-1)),s("div",my,E(F.value.length),1),c[99]||(c[99]=s("div",{class:"stat-meta"},"In key store",-1))])]),s("div",by,[c[103]||(c[103]=s("div",{class:"stat-icon"},"๐",-1)),s("div",hy,[c[101]||(c[101]=s("h4",null,"Encryption Ops",-1)),s("div",yy,E(se.value),1),c[102]||(c[102]=s("div",{class:"stat-meta"},"Total performed",-1))])]),s("div",wy,[c[106]||(c[106]=s("div",{class:"stat-icon"},"โ๏ธ",-1)),s("div",Sy,[c[104]||(c[104]=s("h4",null,"Signatures",-1)),s("div",Dy,E(V.value),1),c[105]||(c[105]=s("div",{class:"stat-meta"},"Created & verified",-1))])]),s("div",$y,[c[109]||(c[109]=s("div",{class:"stat-icon"},"๐ค",-1)),s("div",ky,[c[107]||(c[107]=s("h4",null,"Key Exchanges",-1)),s("div",Cy,E(ue.value.length),1),c[108]||(c[108]=s("div",{class:"stat-meta"},"Active sessions",-1))])])])]),s("div",{class:"quick-actions"},[c[117]||(c[117]=s("h3",null,"โก Quick Cryptographic Actions",-1)),s("div",{class:"action-buttons"},[s("button",{onClick:C,class:"btn btn-secondary"},[...c[111]||(c[111]=[s("span",{class:"btn-icon"},"๐",-1),P(" Generate Test Keys ",-1)])]),s("button",{onClick:O,class:"btn btn-secondary"},[...c[112]||(c[112]=[s("span",{class:"btn-icon"},"๐",-1),P(" Test Encryption ",-1)])]),s("button",{onClick:K,class:"btn btn-secondary"},[...c[113]||(c[113]=[s("span",{class:"btn-icon"},"โ๏ธ",-1),P(" Test Signing ",-1)])]),s("button",{onClick:N,class:"btn btn-secondary"},[...c[114]||(c[114]=[s("span",{class:"btn-icon"},"๐ค",-1),P(" Demo Key Exchange ",-1)])]),s("button",{onClick:oe,class:"btn btn-secondary"},[...c[115]||(c[115]=[s("span",{class:"btn-icon"},"โฑ๏ธ",-1),P(" Benchmark Performance ",-1)])]),s("button",{onClick:te,class:"btn btn-secondary"},[...c[116]||(c[116]=[s("span",{class:"btn-icon"},"โ
",-1),P(" Validate Support ",-1)])])])])]))}},Ey=Mt(_y,[["__scopeId","data-v-54778daf"]]),Ty={class:"debug-view"},Py={class:"debug-controls"},Ry={class:"control-tabs"},xy={key:0,class:"control-panel"},Ly={class:"logging-config"},Ay={class:"form-group"},My={class:"module-controls"},Iy={class:"module-grid"},Ny={class:"module-header"},Oy={class:"module-name"},Vy={class:"module-controls"},Uy={class:"toggle-label"},Fy=["onUpdate:modelValue","onChange"],Ky=["onUpdate:modelValue","onChange","disabled"],Hy={key:1,class:"control-panel"},By={class:"monitoring-config"},jy={class:"form-group"},Gy={class:"monitoring-toggles"},zy={class:"checkbox-label"},Wy={class:"checkbox-label"},Jy={class:"checkbox-label"},qy={class:"checkbox-label"},Yy={class:"monitoring-actions"},Qy=["disabled"],Xy=["disabled"],Zy={key:2,class:"control-panel"},e1={class:"performance-config"},t1={class:"profiling-controls"},s1={class:"profiling-actions"},n1=["disabled"],o1=["disabled"],a1={key:3,class:"control-panel"},i1={class:"debug-logs"},r1={class:"section-title"},l1={class:"log-controls"},c1={class:"log-filters"},u1={class:"log-actions"},d1={class:"btn-icon"},f1={key:0,class:"empty-logs"},g1={class:"empty-meta"},p1={key:1,class:"log-entries"},v1={class:"log-header"},m1={class:"log-timestamp"},b1={class:"log-level"},h1={key:0,class:"log-module"},y1={class:"log-message"},w1={key:0,class:"log-data"},S1={class:"system-dashboard"},D1={class:"dashboard-grid"},$1={class:"status-card"},k1={class:"status-content"},C1={class:"status-meta"},_1={class:"status-card"},E1={class:"status-content"},T1={class:"status-meta"},P1={class:"status-card"},R1={class:"status-content"},x1={class:"status-value"},L1={class:"status-meta"},A1={class:"status-card"},M1={class:"status-content"},I1={key:0,class:"monitoring-charts"},N1={class:"chart-placeholder"},O1={class:"chart-info"},V1={__name:"DebugView",setup(e){const t=At(),n=H("logging"),o=H(null),a=H(!0),i=H("all"),r=H(""),l=H(!1),d=H(!1),p=H(null),g=H(null),f=H([]),S=H({globalLevel:"info"}),D=H({interval:5e3,networkActivity:!0,memoryUsage:!0,peerMetrics:!0,eventTracking:!0}),M=H([{name:"Network",enabled:!0,level:"info"},{name:"Storage",enabled:!0,level:"info"},{name:"Crypto",enabled:!0,level:"info"},{name:"DHT",enabled:!0,level:"info"},{name:"Messaging",enabled:!0,level:"info"},{name:"Media",enabled:!0,level:"info"},{name:"WebRTC",enabled:!1,level:"debug"},{name:"SignalingClient",enabled:!1,level:"debug"},{name:"PeerConnection",enabled:!1,level:"debug"},{name:"EventEmitter",enabled:!1,level:"verbose"}]),z=H({overall:"healthy",lastCheck:Date.now()}),B=H({status:"good",connectedPeers:0}),Y=H({used:0,total:0,percentage:0}),q=H({status:"good",averageLatency:0}),Z=ge(()=>t.debugLogs),ee=ge(()=>{let U=Z.value;if(i.value!=="all"){const h={error:0,warning:1,info:2,debug:3,verbose:4},G=h[i.value];U=U.filter(me=>h[me.level]<=G)}if(r.value){const h=r.value.toLowerCase();U=U.filter(G=>G.message.toLowerCase().includes(h)||G.module&&G.module.toLowerCase().includes(h))}return U}),ce=()=>{var U;(U=t.mesh)!=null&&U.debugLogger&&t.mesh.debugLogger.setGlobalLevel(S.value.globalLevel),t.addDebugLog(`Global log level set to: ${S.value.globalLevel}`,"info")},ye=(U,h)=>{var G;(G=t.mesh)!=null&&G.debugLogger&&(h?t.mesh.debugLogger.enableModule(U):t.mesh.debugLogger.disableModule(U)),t.addDebugLog(`Module ${U}: ${h?"enabled":"disabled"}`,"info")},pe=(U,h)=>{var G;(G=t.mesh)!=null&&G.debugLogger&&t.mesh.debugLogger.setModuleLevel(U,h),t.addDebugLog(`Module ${U} level set to: ${h}`,"info")},ue=()=>{M.value.forEach(U=>{U.enabled=!0,ye(U.name,!0)})},se=()=>{M.value.forEach(U=>{U.enabled=!1,ye(U.name,!1)})},V=()=>{S.value.globalLevel="info",M.value.forEach(U=>{U.enabled=["Network","Storage","Crypto","DHT","Messaging","Media"].includes(U.name),U.level="info"}),ce(),t.addDebugLog("Logging configuration reset to defaults","info")},F=()=>{l.value&&(J(),y())},j=()=>{t.addDebugLog(`Network monitoring: ${D.value.networkActivity?"enabled":"disabled"}`,"info")},le=()=>{t.addDebugLog(`Memory monitoring: ${D.value.memoryUsage?"enabled":"disabled"}`,"info")},Se=()=>{t.addDebugLog(`Peer metrics: ${D.value.peerMetrics?"enabled":"disabled"}`,"info")},re=()=>{t.addDebugLog(`Event tracking: ${D.value.eventTracking?"enabled":"disabled"}`,"info")},y=()=>{l.value=!0,g.value=Date.now(),p.value=setInterval(()=>{$e()},D.value.interval),t.startConnectionMonitoring&&t.startConnectionMonitoring(),t.addDebugLog("System monitoring started","success")},J=()=>{l.value=!1,p.value&&(clearInterval(p.value),p.value=null),t.stopConnectionMonitoring&&t.stopConnectionMonitoring(),t.addDebugLog("System monitoring stopped","info")},ve=()=>{f.value=[],t.addDebugLog("Monitoring data cleared","info")},$e=()=>{const U={timestamp:Date.now(),memoryUsage:q.memory?{used:Math.round(q.memory.usedJSHeapSize/1024/1024),total:Math.round(q.memory.totalJSHeapSize/1024/1024)}:{used:0,total:0},connectedPeers:t.connectedPeersList.length,networkLatency:Math.random()*100+20,cpuUsage:Math.random()*50+10};f.value.push(U),f.value.length>100&&f.value.shift(),Ee(U)},Ee=U=>{Y.value={used:U.memoryUsage.used,total:U.memoryUsage.total,percentage:U.memoryUsage.total>0?Math.round(U.memoryUsage.used/U.memoryUsage.total*100):0},B.value={status:U.connectedPeers>0?"good":"warning",connectedPeers:U.connectedPeers},q.value={status:U.networkLatency<100?"good":"warning",averageLatency:Math.round(U.networkLatency)},z.value={overall:B.value.status==="good"&&q.value.status==="good"?"healthy":"warning",lastCheck:Date.now()}},Ve=()=>{d.value=!0,t.addDebugLog("Performance profiling started","info"),M.value.forEach(U=>{["Network","WebRTC","PeerConnection"].includes(U.name)&&(U.enabled=!0,U.level="debug",ye(U.name,!0),pe(U.name,"debug"))})},Ae=()=>{d.value=!1,t.addDebugLog("Performance profiling stopped","info")},He=()=>{const U={timestamp:Date.now(),monitoringData:f.value.slice(-20),systemStatus:z.value,memoryUsage:Y.value,networkHealth:B.value,performance:q.value,logSummary:{total:Z.value.length,errors:Z.value.filter(Je=>Je.level==="error").length,warnings:Z.value.filter(Je=>Je.level==="warning").length}},h=JSON.stringify(U,null,2),G=new Blob([h],{type:"application/json"}),me=URL.createObjectURL(G),he=document.createElement("a");he.href=me,he.download=`peerpigeon-performance-report-${Date.now()}.json`,document.body.appendChild(he),he.click(),document.body.removeChild(he),URL.revokeObjectURL(me),t.addDebugLog("Performance report generated and downloaded","success")},ne=async()=>{t.addDebugLog("Running network benchmark...","info");const U=q.now();for(let me=0;me<10;me++)await new Promise(he=>setTimeout(he,10)),t.connectedPeersList.length>0&&t.addDebugLog(`Benchmark message ${me+1}/10`,"debug");const h=q.now(),G=Math.round(h-U);t.addDebugLog(`Network benchmark completed in ${G}ms`,"success")},$=async()=>{t.addDebugLog("Running crypto benchmark...","info");const U=q.now();for(let me=0;me<5;me++)await new Promise(he=>setTimeout(he,20)),t.addDebugLog(`Crypto operation ${me+1}/5`,"debug");const h=q.now(),G=Math.round(h-U);t.addDebugLog(`Crypto benchmark completed in ${G}ms`,"success")},I=async()=>{t.addDebugLog("Running storage benchmark...","info");const U=q.now();for(let me=0;me<15;me++)await t.storageStore(`benchmark:test-${me}`,{data:`test-data-${me}`,timestamp:Date.now()}),await new Promise(he=>setTimeout(he,5));const h=q.now(),G=Math.round(h-U);t.addDebugLog(`Storage benchmark completed in ${G}ms`,"success")},u=async()=>{t.addDebugLog("Running full benchmark suite...","info"),await ne(),await $(),await I(),t.addDebugLog("Full benchmark suite completed","success")},L=async()=>{var G,me;t.addDebugLog("Running system health check...","info");const U=[{name:"Mesh Connection",status:t.isConnected?"pass":"fail"},{name:"WebRTC Support",status:window.RTCPeerConnection?"pass":"fail"},{name:"WebSocket Support",status:window.WebSocket?"pass":"fail"},{name:"Crypto API",status:window.crypto&&window.crypto.subtle?"pass":"fail"},{name:"Storage Manager",status:(G=t.mesh)!=null&&G.distributedStorage?"pass":"fail"},{name:"Debug Logger",status:(me=t.mesh)!=null&&me.debugLogger?"pass":"fail"}];U.forEach(he=>{const Je=he.status==="pass"?"success":"error";t.addDebugLog(`Health Check - ${he.name}: ${he.status.toUpperCase()}`,Je)});const h=U.filter(he=>he.status==="pass").length;t.addDebugLog(`Health check completed: ${h}/${U.length} checks passed`,h===U.length?"success":"warning")},k=()=>{var h;t.addDebugLog("Validating system configuration...","info");const U={mesh:!!t.mesh,peerId:!!t.peerId,signalingServer:t.signalingServer||"default",debugLogging:!!((h=t.mesh)!=null&&h.debugLogger)};t.addDebugLog(`Configuration validation:
${JSON.stringify(U,null,2)}`,"info")},w=async()=>{var U;t.addDebugLog("Testing connectivity...","info");try{(U=t.mesh)!=null&&U.signalingClient?t.addDebugLog("Signaling server: Connected","success"):t.addDebugLog("Signaling server: Not connected","warning");const h=t.connectedPeersList.length;t.addDebugLog(`Peer connections: ${h} active`,h>0?"success":"warning"),t.addDebugLog("Connectivity test completed","info")}catch(h){t.addDebugLog(`Connectivity test failed: ${h.message}`,"error")}},W=()=>{const U={timestamp:Date.now(),system:{userAgent:navigator.userAgent,platform:navigator.platform,language:navigator.language,onLine:navigator.onLine},peerpigeon:{version:"1.0.0",peerId:t.peerId,isConnected:t.isConnected,connectedPeers:t.connectedPeersList.length,storageItems:t.storageData.size,cryptoKeys:t.cryptoKeys.length},logs:{total:Z.value.length,recent:Z.value.slice(-50)},monitoring:{isActive:l.value,dataPoints:f.value.length,systemStatus:z.value}},h=JSON.stringify(U,null,2),G=new Blob([h],{type:"application/json"}),me=URL.createObjectURL(G),he=document.createElement("a");he.href=me,he.download=`peerpigeon-diagnostic-report-${Date.now()}.json`,document.body.appendChild(he),he.click(),document.body.removeChild(he),URL.revokeObjectURL(me),t.addDebugLog("Diagnostic report generated and downloaded","success")},v=()=>{const U={exported:Date.now(),totalLogs:Z.value.length,logs:Z.value},h=JSON.stringify(U,null,2),G=new Blob([h],{type:"application/json"}),me=URL.createObjectURL(G),he=document.createElement("a");he.href=me,he.download=`peerpigeon-debug-logs-${Date.now()}.json`,document.body.appendChild(he),he.click(),document.body.removeChild(he),URL.revokeObjectURL(me),t.addDebugLog("Debug logs exported","success")},b=()=>{confirm("Are you sure you want to reset the system? This will clear all data and restart.")&&(t.addDebugLog("System reset initiated...","warning"),J(),t.debugLogs.splice(0),t.storageData.clear(),t.cryptoKeys.splice(0),f.value=[],V(),t.addDebugLog("System reset completed","info"))},C=()=>{a.value=!a.value,a.value&&N()},O=()=>{t.debugLogs.splice(0),t.addDebugLog("Debug logs cleared","info")},K=()=>{v()},N=()=>{es(()=>{o.value&&(o.value.scrollTop=o.value.scrollHeight)})},oe=U=>new Date(U).toLocaleTimeString(),te=U=>new Date(U).toLocaleTimeString(),T=()=>{const U=["error","warning","info","debug","verbose"],h=["Network","Storage","Crypto","DHT"];U.forEach((G,me)=>{setTimeout(()=>{const he=h[me%h.length];t.addDebugLog(`Test ${G} message from ${he}`,G,he)},me*200)})},c=()=>{t.addDebugLog("Simulated error: Connection timeout","error","Network"),t.addDebugLog("Retrying connection...","warning","Network"),setTimeout(()=>{t.addDebugLog("Connection retry successful","success","Network")},1e3)},_=async()=>{t.addDebugLog("Starting stress test...","warning");for(let U=0;U<50;U++)setTimeout(()=>{t.addDebugLog(`Stress test operation ${U+1}/50`,"debug")},U*50);setTimeout(()=>{t.addDebugLog("Stress test completed","success")},50*50+100)},Q=()=>{He()},ie=()=>{S.value.globalLevel="verbose",ce(),M.value.forEach(U=>{U.enabled=!0,U.level="verbose",ye(U.name,!0),pe(U.name,"verbose")}),t.addDebugLog("Verbose logging enabled for all modules","info")},fe=()=>{const U={timestamp:Date.now(),mesh:{isConnected:t.isConnected,peerId:t.peerId,connectedPeers:t.connectedPeersList.length},storage:{itemCount:t.storageData.size,keys:Array.from(t.storageData.keys())},crypto:{keyCount:t.cryptoKeys.length},system:{memoryUsage:Y.value,performance:q.value,networkHealth:B.value},debug:{logCount:Z.value.length,isMonitoring:l.value,moduleStates:M.value}};t.addDebugLog(`System Snapshot:
${JSON.stringify(U,null,2)}`,"info")};return Bt(Z,()=>{a.value&&N()},{deep:!0}),Wt(()=>{(D.value.networkActivity||D.value.memoryUsage)&&y(),$e(),t.addDebugLog("Debug view initialized","info")}),Us(()=>{p.value&&clearInterval(p.value)}),(U,h)=>(R(),x("div",Ty,[h[81]||(h[81]=s("div",{class:"section-header"},[s("h2",null,"๐ Debug & Monitoring"),s("p",null,"System diagnostics, logging, performance monitoring, and debugging tools")],-1)),s("div",Py,[h[54]||(h[54]=s("h3",null,"๐๏ธ Debug Controls",-1)),s("div",Ry,[s("button",{onClick:h[0]||(h[0]=G=>n.value="logging"),class:ke(["tab-btn",{active:n.value==="logging"}])}," LOGGING ",2),s("button",{onClick:h[1]||(h[1]=G=>n.value="monitoring"),class:ke(["tab-btn",{active:n.value==="monitoring"}])}," MONITORING ",2),s("button",{onClick:h[2]||(h[2]=G=>n.value="performance"),class:ke(["tab-btn",{active:n.value==="performance"}])}," PERFORMANCE ",2),s("button",{onClick:h[3]||(h[3]=G=>n.value="diagnostics"),class:ke(["tab-btn",{active:n.value==="diagnostics"}])}," DIAGNOSTICS ",2)]),n.value==="logging"?(R(),x("div",xy,[h[20]||(h[20]=s("h4",null,"๐ Logging Configuration",-1)),h[21]||(h[21]=s("p",{class:"panel-description"}," Configure debug logging levels and modules. Control what information is captured and displayed. ",-1)),s("div",Ly,[s("div",Ay,[h[13]||(h[13]=s("label",null,"Global Log Level:",-1)),ae(s("select",{"onUpdate:modelValue":h[4]||(h[4]=G=>S.value.globalLevel=G),onChange:ce,class:"form-select"},[...h[12]||(h[12]=[Pn('<option value="error" data-v-e5116d1c>Error</option><option value="warning" data-v-e5116d1c>Warning</option><option value="info" data-v-e5116d1c>Info</option><option value="debug" data-v-e5116d1c>Debug</option><option value="verbose" data-v-e5116d1c>Verbose</option>',5)])],544),[[Ke,S.value.globalLevel]])]),s("div",My,[h[16]||(h[16]=s("h5",null,"Module-Specific Logging:",-1)),s("div",Iy,[(R(!0),x(_e,null,Oe(M.value,G=>(R(),x("div",{key:G.name,class:"module-item"},[s("div",Ny,[s("span",Oy,E(G.name),1),s("span",{class:ke(["module-status",{enabled:G.enabled}])},E(G.enabled?"ON":"OFF"),3)]),s("div",Vy,[s("label",Uy,[ae(s("input",{type:"checkbox","onUpdate:modelValue":me=>G.enabled=me,onChange:me=>ye(G.name,G.enabled)},null,40,Fy),[[ze,G.enabled]]),h[14]||(h[14]=P(" Enable ",-1))]),ae(s("select",{"onUpdate:modelValue":me=>G.level=me,onChange:me=>pe(G.name,G.level),disabled:!G.enabled,class:"form-select-sm"},[...h[15]||(h[15]=[Pn('<option value="error" data-v-e5116d1c>Error</option><option value="warning" data-v-e5116d1c>Warning</option><option value="info" data-v-e5116d1c>Info</option><option value="debug" data-v-e5116d1c>Debug</option><option value="verbose" data-v-e5116d1c>Verbose</option>',5)])],40,Ky),[[Ke,G.level]])])]))),128))])]),s("div",{class:"logging-actions"},[s("button",{onClick:ue,class:"btn btn-primary"},[...h[17]||(h[17]=[s("span",{class:"btn-icon"},"โ
",-1),P(" Enable All ",-1)])]),s("button",{onClick:se,class:"btn btn-secondary"},[...h[18]||(h[18]=[s("span",{class:"btn-icon"},"โ",-1),P(" Disable All ",-1)])]),s("button",{onClick:V,class:"btn btn-secondary"},[...h[19]||(h[19]=[s("span",{class:"btn-icon"},"๐",-1),P(" Reset Config ",-1)])])])])])):de("",!0),n.value==="monitoring"?(R(),x("div",Hy,[h[31]||(h[31]=s("h4",null,"๐ System Monitoring",-1)),h[32]||(h[32]=s("p",{class:"panel-description"}," Monitor system performance, network activity, and resource usage in real-time. ",-1)),s("div",By,[s("div",jy,[h[23]||(h[23]=s("label",null,"Monitoring Interval:",-1)),ae(s("select",{"onUpdate:modelValue":h[5]||(h[5]=G=>D.value.interval=G),onChange:F,class:"form-select"},[...h[22]||(h[22]=[s("option",{value:"1000"},"1 second",-1),s("option",{value:"5000"},"5 seconds",-1),s("option",{value:"10000"},"10 seconds",-1),s("option",{value:"30000"},"30 seconds",-1)])],544),[[Ke,D.value.interval]])]),s("div",Gy,[s("label",zy,[ae(s("input",{type:"checkbox","onUpdate:modelValue":h[6]||(h[6]=G=>D.value.networkActivity=G),onChange:j},null,544),[[ze,D.value.networkActivity]]),h[24]||(h[24]=P(" Network Activity Monitoring ",-1))]),s("label",Wy,[ae(s("input",{type:"checkbox","onUpdate:modelValue":h[7]||(h[7]=G=>D.value.memoryUsage=G),onChange:le},null,544),[[ze,D.value.memoryUsage]]),h[25]||(h[25]=P(" Memory Usage Tracking ",-1))]),s("label",Jy,[ae(s("input",{type:"checkbox","onUpdate:modelValue":h[8]||(h[8]=G=>D.value.peerMetrics=G),onChange:Se},null,544),[[ze,D.value.peerMetrics]]),h[26]||(h[26]=P(" Peer Connection Metrics ",-1))]),s("label",qy,[ae(s("input",{type:"checkbox","onUpdate:modelValue":h[9]||(h[9]=G=>D.value.eventTracking=G),onChange:re},null,544),[[ze,D.value.eventTracking]]),h[27]||(h[27]=P(" Event Tracking ",-1))])]),s("div",Yy,[s("button",{onClick:y,disabled:l.value,class:"btn btn-success"},[...h[28]||(h[28]=[s("span",{class:"btn-icon"},"โถ๏ธ",-1),P(" Start Monitoring ",-1)])],8,Qy),s("button",{onClick:J,disabled:!l.value,class:"btn btn-danger"},[...h[29]||(h[29]=[s("span",{class:"btn-icon"},"โน๏ธ",-1),P(" Stop Monitoring ",-1)])],8,Xy),s("button",{onClick:ve,class:"btn btn-secondary"},[...h[30]||(h[30]=[s("span",{class:"btn-icon"},"๐๏ธ",-1),P(" Clear Data ",-1)])])])])])):de("",!0),n.value==="performance"?(R(),x("div",Zy,[h[42]||(h[42]=s("h4",null,"โก Performance Analysis",-1)),h[43]||(h[43]=s("p",{class:"panel-description"}," Analyze performance bottlenecks, measure operation timing, and optimize system performance. ",-1)),s("div",e1,[s("div",t1,[h[36]||(h[36]=s("h5",null,"Performance Profiling:",-1)),s("div",s1,[s("button",{onClick:Ve,disabled:d.value,class:"btn btn-primary"},[...h[33]||(h[33]=[s("span",{class:"btn-icon"},"๐ฏ",-1),P(" Start Profiling ",-1)])],8,n1),s("button",{onClick:Ae,disabled:!d.value,class:"btn btn-danger"},[...h[34]||(h[34]=[s("span",{class:"btn-icon"},"โน๏ธ",-1),P(" Stop Profiling ",-1)])],8,o1),s("button",{onClick:He,class:"btn btn-info"},[...h[35]||(h[35]=[s("span",{class:"btn-icon"},"๐",-1),P(" Generate Report ",-1)])])])]),s("div",{class:"benchmark-controls"},[h[41]||(h[41]=s("h5",null,"System Benchmarks:",-1)),s("div",{class:"benchmark-actions"},[s("button",{onClick:ne,class:"btn btn-secondary"},[...h[37]||(h[37]=[s("span",{class:"btn-icon"},"๐",-1),P(" Network Benchmark ",-1)])]),s("button",{onClick:$,class:"btn btn-secondary"},[...h[38]||(h[38]=[s("span",{class:"btn-icon"},"๐",-1),P(" Crypto Benchmark ",-1)])]),s("button",{onClick:I,class:"btn btn-secondary"},[...h[39]||(h[39]=[s("span",{class:"btn-icon"},"๐พ",-1),P(" Storage Benchmark ",-1)])]),s("button",{onClick:u,class:"btn btn-primary"},[...h[40]||(h[40]=[s("span",{class:"btn-icon"},"๐",-1),P(" Full Benchmark Suite ",-1)])])])])])])):de("",!0),n.value==="diagnostics"?(R(),x("div",a1,[h[52]||(h[52]=s("h4",null,"๐ง System Diagnostics",-1)),h[53]||(h[53]=s("p",{class:"panel-description"}," Run diagnostic tests, validate system health, and troubleshoot issues. ",-1)),s("div",{class:"diagnostics-config"},[s("div",{class:"health-check"},[h[47]||(h[47]=s("h5",null,"System Health Check:",-1)),s("div",{class:"health-actions"},[s("button",{onClick:L,class:"btn btn-primary"},[...h[44]||(h[44]=[s("span",{class:"btn-icon"},"โค๏ธ",-1),P(" Run Health Check ",-1)])]),s("button",{onClick:k,class:"btn btn-secondary"},[...h[45]||(h[45]=[s("span",{class:"btn-icon"},"โ
",-1),P(" Validate Config ",-1)])]),s("button",{onClick:w,class:"btn btn-secondary"},[...h[46]||(h[46]=[s("span",{class:"btn-icon"},"๐",-1),P(" Test Connectivity ",-1)])])])]),s("div",{class:"troubleshooting"},[h[51]||(h[51]=s("h5",null,"Troubleshooting Tools:",-1)),s("div",{class:"trouble-actions"},[s("button",{onClick:W,class:"btn btn-info"},[...h[48]||(h[48]=[s("span",{class:"btn-icon"},"๐",-1),P(" Diagnostic Report ",-1)])]),s("button",{onClick:v,class:"btn btn-secondary"},[...h[49]||(h[49]=[s("span",{class:"btn-icon"},"๐ค",-1),P(" Export Debug Logs ",-1)])]),s("button",{onClick:b,class:"btn btn-warning"},[...h[50]||(h[50]=[s("span",{class:"btn-icon"},"๐",-1),P(" Reset System ",-1)])])])])])])):de("",!0)]),s("div",i1,[s("div",r1,[s("h3",null,"๐ Debug Logs ("+E(Z.value.length)+")",1),s("div",l1,[s("div",c1,[ae(s("select",{"onUpdate:modelValue":h[10]||(h[10]=G=>i.value=G),class:"form-select-sm"},[...h[55]||(h[55]=[Pn('<option value="all" data-v-e5116d1c>All Levels</option><option value="error" data-v-e5116d1c>Errors Only</option><option value="warning" data-v-e5116d1c>Warnings+</option><option value="info" data-v-e5116d1c>Info+</option><option value="debug" data-v-e5116d1c>Debug+</option><option value="verbose" data-v-e5116d1c>Verbose</option>',6)])],512),[[Ke,i.value]]),ae(s("input",{"onUpdate:modelValue":h[11]||(h[11]=G=>r.value=G),placeholder:"Search logs...",class:"form-input-sm"},null,512),[[Te,r.value]])]),s("div",u1,[s("button",{onClick:C,class:ke(["btn","btn-sm",a.value?"btn-primary":"btn-secondary"])},[s("span",d1,E((a.value,"๐")),1),h[56]||(h[56]=P(" Auto-scroll ",-1))],2),s("button",{onClick:O,class:"btn btn-sm btn-danger"},[...h[57]||(h[57]=[s("span",{class:"btn-icon"},"๐๏ธ",-1),P(" Clear ",-1)])]),s("button",{onClick:K,class:"btn btn-sm btn-secondary"},[...h[58]||(h[58]=[s("span",{class:"btn-icon"},"๐ค",-1),P(" Export ",-1)])])])])]),s("div",{class:"log-display",ref_key:"logDisplay",ref:o},[ee.value.length===0?(R(),x("div",f1,[h[59]||(h[59]=s("div",{class:"empty-icon"},"๐ญ",-1)),h[60]||(h[60]=s("p",null,"No logs to display",-1)),s("p",g1,E(i.value==="all"?"No debug logs yet":`No logs matching filter: ${i.value}`),1)])):(R(),x("div",p1,[(R(!0),x(_e,null,Oe(ee.value,G=>(R(),x("div",{key:G.id,class:ke(["log-entry",`log-${G.level}`])},[s("div",v1,[s("span",m1,E(oe(G.timestamp)),1),s("span",b1,E(G.level.toUpperCase()),1),G.module?(R(),x("span",h1,E(G.module),1)):de("",!0)]),s("div",y1,E(G.message),1),G.data?(R(),x("div",w1,[s("details",null,[h[61]||(h[61]=s("summary",null,"Additional Data",-1)),s("pre",null,E(JSON.stringify(G.data,null,2)),1)])])):de("",!0)],2))),128))]))],512)]),s("div",S1,[h[73]||(h[73]=s("h3",null,"๐ System Status Dashboard",-1)),s("div",D1,[s("div",$1,[h[63]||(h[63]=s("div",{class:"status-icon"},"๐ฅ๏ธ",-1)),s("div",k1,[h[62]||(h[62]=s("h4",null,"System Status",-1)),s("div",{class:ke(["status-value",z.value.overall])},E(z.value.overall),3),s("div",C1,"Last checked: "+E(te(z.value.lastCheck)),1)])]),s("div",_1,[h[65]||(h[65]=s("div",{class:"status-icon"},"๐",-1)),s("div",E1,[h[64]||(h[64]=s("h4",null,"Network Health",-1)),s("div",{class:ke(["status-value",B.value.status])},E(B.value.status),3),s("div",T1,E(B.value.connectedPeers)+" peers connected",1)])]),s("div",P1,[h[67]||(h[67]=s("div",{class:"status-icon"},"๐พ",-1)),s("div",R1,[h[66]||(h[66]=s("h4",null,"Memory Usage",-1)),s("div",x1,E(Y.value.used)+"MB",1),s("div",L1,E(Y.value.percentage)+"% of "+E(Y.value.total)+"MB",1)])]),s("div",A1,[h[70]||(h[70]=s("div",{class:"status-icon"},"โก",-1)),s("div",M1,[h[68]||(h[68]=s("h4",null,"Performance",-1)),s("div",{class:ke(["status-value",q.value.status])},E(q.value.averageLatency)+"ms",3),h[69]||(h[69]=s("div",{class:"status-meta"},"Average latency",-1))])])]),f.value.length>0?(R(),x("div",I1,[h[72]||(h[72]=s("h4",null,"Performance Charts",-1)),s("div",N1,[s("div",O1,[h[71]||(h[71]=s("p",null,"๐ Real-time performance data visualization would be displayed here",-1)),s("p",null,"Data points: "+E(f.value.length),1),s("p",null,"Monitoring since: "+E(te(g.value)),1)])])])):de("",!0)]),s("div",{class:"quick-debug-actions"},[h[80]||(h[80]=s("h3",null,"โก Quick Debug Actions",-1)),s("div",{class:"action-buttons"},[s("button",{onClick:T,class:"btn btn-secondary"},[...h[74]||(h[74]=[s("span",{class:"btn-icon"},"๐",-1),P(" Generate Test Logs ",-1)])]),s("button",{onClick:c,class:"btn btn-warning"},[...h[75]||(h[75]=[s("span",{class:"btn-icon"},"โ ๏ธ",-1),P(" Simulate Error ",-1)])]),s("button",{onClick:_,class:"btn btn-danger"},[...h[76]||(h[76]=[s("span",{class:"btn-icon"},"๐ฅ",-1),P(" Stress Test ",-1)])]),s("button",{onClick:Q,class:"btn btn-info"},[...h[77]||(h[77]=[s("span",{class:"btn-icon"},"๐",-1),P(" Performance Profile ",-1)])]),s("button",{onClick:ie,class:"btn btn-primary"},[...h[78]||(h[78]=[s("span",{class:"btn-icon"},"๐",-1),P(" Enable Verbose Logging ",-1)])]),s("button",{onClick:fe,class:"btn btn-secondary"},[...h[79]||(h[79]=[s("span",{class:"btn-icon"},"๐ธ",-1),P(" System Snapshot ",-1)])])])])]))}},U1=Mt(V1,[["__scopeId","data-v-e5116d1c"]]),F1={class:"testing-view"},K1={class:"card"},H1={class:"button-grid"},B1=["disabled"],j1=["disabled"],G1=["disabled"],z1={class:"card"},W1={class:"input-grid"},J1={class:"input-group"},q1={class:"input-group"},Y1={class:"input-group"},Q1={class:"card"},X1={key:0,class:"empty-state"},Z1={class:"result-header"},ew={class:"result-icon"},tw={class:"result-name"},sw={class:"result-time"},nw={class:"result-details"},ow={key:0,class:"result-error"},aw={class:"card"},iw={key:0,class:"utility-results"},rw={key:1,class:"empty-state"},lw={class:"card"},cw={class:"metrics-grid"},uw={class:"metric-item"},dw={class:"metric-value"},fw={class:"metric-item"},gw={class:"metric-value"},pw={class:"metric-item"},vw={class:"metric-value"},mw={class:"metric-item"},bw={class:"metric-value"},hw={class:"metric-item"},yw={class:"metric-value"},ww={class:"metric-item"},Sw={class:"metric-value"},Dw={__name:"TestingView",setup(e){const t=At(),n=H(""),o=H(50),a=H(100),i=H([]),r=H(""),l=H({messagesSent:0,messagesReceived:0,dhtOperations:0,duration:0,testStartTime:null,testEndTime:null,responseTimes:[]}),d=ge(()=>i.value.length===0?0:(i.value.filter(j=>j.status==="success").length/i.value.length*100).toFixed(1)),p=ge(()=>{const F=l.value.responseTimes;return F.length===0?0:(F.reduce((le,Se)=>le+Se,0)/F.length).toFixed(2)}),g=H(null),f=(F,j,le="info",Se=null)=>{i.value.push({name:F,details:j,status:le,error:Se,timestamp:Date.now()}),es(()=>{g.value&&(g.value.scrollTop=g.value.scrollHeight)})},S=F=>({success:"โ
",error:"โ",warning:"โ ๏ธ",info:"โน๏ธ"})[F]||"โน๏ธ",D=F=>new Date(F).toLocaleTimeString(),M=F=>F<1e3?`${F}ms`:`${(F/1e3).toFixed(2)}s`,z=()=>{if(!n.value){f("Peer ID Validation","Please enter a peer ID to validate","warning");return}const F=n.value.length>=8,j=`
Peer ID: ${n.value}
Length: ${n.value.length} characters
Valid: ${F?"Yes":"No"}
Expected: At least 8 characters
`.trim();r.value=j,f("Peer ID Validation",j,F?"success":"error")},B=async()=>{if(!t.mesh){f("Performance Test","Mesh not initialized","error");return}f("Performance Test",`Starting test with ${o.value} messages...`,"info");const F="x".repeat(a.value),j=Date.now();let le=0,Se=0;const re=[];l.value.testStartTime=j;for(let Ee=0;Ee<o.value;Ee++){const Ve=Date.now();try{await t.sendBroadcastMessage(`${F} #${Ee+1}`)?(le++,l.value.messagesSent++,re.push(Date.now()-Ve)):Se++,Ee%10===0&&Ee>0&&await new Promise(He=>setTimeout(He,10))}catch{Se++}}const y=Date.now(),J=y-j;l.value.testEndTime=y,l.value.duration=J,l.value.responseTimes=re;const ve=(le/J*1e3).toFixed(2),$e=`
Duration: ${J}ms
Success: ${le}/${o.value}
Failed: ${Se}
Rate: ${ve} msg/sec
Avg Response: ${p.value}ms
`.trim();f("Performance Test",$e,le>Se?"success":"warning")},Y=async()=>{if(!t.mesh){f("Stress Test","Mesh not initialized","error");return}f("Stress Test","Starting stress test...","info");const F=[],j=Date.now();for(let $e=0;$e<20;$e++)F.push(t.dhtPut(`stress-test-${$e}`,{value:$e,timestamp:Date.now()}).then(()=>(l.value.dhtOperations++,{success:!0})).catch(Ee=>({error:Ee.message})));for(let $e=0;$e<50;$e++)try{await t.sendBroadcastMessage(`Stress test message #${$e+1}`)?(l.value.messagesSent++,F.push(Promise.resolve({success:!0}))):F.push(Promise.resolve({error:"Failed to send"}))}catch(Ee){F.push(Promise.resolve({error:Ee.message}))}const le=await Promise.allSettled(F),re=Date.now()-j,y=le.filter($e=>{var Ee;return $e.status==="fulfilled"&&((Ee=$e.value)==null?void 0:Ee.success)}).length,J=le.length-y,ve=`
Duration: ${re}ms
Operations: ${le.length}
Successful: ${y}
Failed: ${J}
Success Rate: ${(y/le.length*100).toFixed(1)}%
`.trim();f("Stress Test",ve,y>J?"success":"warning")},q=async()=>{const F="invalid-peer-id-12345";try{await t.sendDirectMessage(F,"Test message"),f("Invalid Peer Test","Message sent to invalid peer (unexpected)","warning")}catch(j){f("Invalid Peer Test",`Handled gracefully: ${j.message}`,"success")}},Z=async()=>{const F=[{type:"undefined",value:void 0},{type:"null",value:null},{type:"function",value:()=>{}},{type:"symbol",value:Symbol("test")}],j=[];for(const le of F)try{const Se=await t.sendBroadcast(le.value);j.push(`${le.type}: ${Se?"Sent":"Failed"}`)}catch(Se){j.push(`${le.type}: Error handled - ${Se.message}`)}f("Malformed Message Test",j.join(`
`),"success")},ee=async()=>{try{const F="x".repeat(1e5),j=Date.now();await t.dhtPut("large-data-test",F);const le=await t.dhtGet("large-data-test"),Se=Date.now(),re=le===F,y=`
Data size: 100KB
Duration: ${Se-j}ms
Success: ${re}
`.trim();f("DHT Limits Test",y,re?"success":"error")}catch(F){f("DHT Limits Test",`Limit enforced: ${F.message}`,"success")}},ce=()=>{const F={testResults:i.value,performanceMetrics:l.value,debugLogs:t.debugLogs,messages:t.messages,networkStatus:t.networkStatus,timestamp:new Date().toISOString()};ue(F,`peerpigeon-logs-${Date.now()}.json`),f("Export","Logs exported successfully","success")},ye=()=>{const F={results:i.value,metrics:l.value,successRate:d.value,avgResponseTime:p.value,timestamp:new Date().toISOString()};ue(F,`peerpigeon-test-results-${Date.now()}.json`),f("Export","Test results exported successfully","success")},pe=()=>{ue(l.value,`peerpigeon-metrics-${Date.now()}.json`),f("Export","Metrics exported successfully","success")},ue=(F,j)=>{const le=JSON.stringify(F,null,2),Se=new Blob([le],{type:"application/json"}),re=URL.createObjectURL(Se),y=document.createElement("a");y.href=re,y.download=j,y.click(),URL.revokeObjectURL(re)},se=()=>{i.value=[],r.value=""},V=()=>{l.value={messagesSent:0,messagesReceived:0,dhtOperations:0,duration:0,testStartTime:null,testEndTime:null,responseTimes:[]}};return(F,j)=>(R(),x("div",F1,[j[19]||(j[19]=s("div",{class:"view-header"},[s("h2",null,"๐งช PeerPigeon API Testing"),s("p",null,"Comprehensive test suite for validating all PeerPigeon features")],-1)),s("div",K1,[j[3]||(j[3]=s("h3",null,"โก Quick Tests",-1)),s("div",H1,[s("button",{onClick:z,class:"btn btn-primary"}," ๐ Validate Peer ID "),s("button",{onClick:B,class:"btn btn-primary",disabled:!We(t).isConnected}," ๐ Performance Test ",8,B1),s("button",{onClick:Y,class:"btn btn-primary",disabled:!We(t).isConnected}," โก Stress Test ",8,j1),s("button",{onClick:q,class:"btn btn-secondary"}," โ Test Invalid Peer "),s("button",{onClick:Z,class:"btn btn-secondary"}," โ ๏ธ Test Malformed Message "),s("button",{onClick:ee,class:"btn btn-secondary",disabled:!We(t).isConnected}," ๐ Test DHT Limits ",8,G1)])]),s("div",z1,[j[7]||(j[7]=s("h3",null,"โ๏ธ Test Configuration",-1)),s("div",W1,[s("div",J1,[j[4]||(j[4]=s("label",{for:"test-peer-id"},"Test Peer ID:",-1)),ae(s("input",{id:"test-peer-id","onUpdate:modelValue":j[0]||(j[0]=le=>n.value=le),type:"text",placeholder:"Enter peer ID to validate"},null,512),[[Te,n.value]])]),s("div",q1,[j[5]||(j[5]=s("label",{for:"test-message-count"},"Message Count:",-1)),ae(s("input",{id:"test-message-count","onUpdate:modelValue":j[1]||(j[1]=le=>o.value=le),type:"number",min:"1",max:"1000"},null,512),[[Te,o.value,void 0,{number:!0}]])]),s("div",Y1,[j[6]||(j[6]=s("label",{for:"test-message-size"},"Message Size (chars):",-1)),ae(s("input",{id:"test-message-size","onUpdate:modelValue":j[2]||(j[2]=le=>a.value=le),type:"number",min:"1",max:"10000"},null,512),[[Te,a.value,void 0,{number:!0}]])])])]),s("div",Q1,[j[9]||(j[9]=s("h3",null,"๐ Test Results",-1)),s("div",{class:"test-results-header"},[s("button",{onClick:se,class:"btn btn-tertiary"}," ๐๏ธ Clear Results "),s("button",{onClick:ye,class:"btn btn-tertiary"}," ๐ฅ Export Results ")]),s("div",{class:"test-results",ref_key:"testResultsContainer",ref:g},[i.value.length===0?(R(),x("div",X1," No test results yet. Run a test to see results here. ")):de("",!0),(R(!0),x(_e,null,Oe(i.value,(le,Se)=>(R(),x("div",{key:Se,class:ke(["test-result-item",le.status])},[s("div",Z1,[s("span",ew,E(S(le.status)),1),s("span",tw,E(le.name),1),s("span",sw,E(D(le.timestamp)),1)]),s("div",nw,[s("pre",null,E(le.details),1)]),le.error?(R(),x("div",ow,[j[8]||(j[8]=s("strong",null,"Error:",-1)),P(" "+E(le.error),1)])):de("",!0)],2))),128))],512)]),s("div",aw,[j[10]||(j[10]=s("h3",null,"๐ง Utility Results",-1)),r.value?(R(),x("div",iw,[s("pre",null,E(r.value),1)])):(R(),x("div",rw," Utility test results will appear here "))]),s("div",lw,[j[17]||(j[17]=s("h3",null,"๐ Performance Metrics",-1)),s("div",cw,[s("div",uw,[j[11]||(j[11]=s("span",{class:"metric-label"},"Messages Sent:",-1)),s("span",dw,E(l.value.messagesSent),1)]),s("div",fw,[j[12]||(j[12]=s("span",{class:"metric-label"},"Messages Received:",-1)),s("span",gw,E(l.value.messagesReceived),1)]),s("div",pw,[j[13]||(j[13]=s("span",{class:"metric-label"},"DHT Operations:",-1)),s("span",vw,E(l.value.dhtOperations),1)]),s("div",mw,[j[14]||(j[14]=s("span",{class:"metric-label"},"Test Duration:",-1)),s("span",bw,E(M(l.value.duration)),1)]),s("div",hw,[j[15]||(j[15]=s("span",{class:"metric-label"},"Success Rate:",-1)),s("span",yw,E(d.value)+"%",1)]),s("div",ww,[j[16]||(j[16]=s("span",{class:"metric-label"},"Avg Response Time:",-1)),s("span",Sw,E(p.value)+"ms",1)])]),s("button",{onClick:V,class:"btn btn-tertiary"}," ๐ Reset Metrics ")]),s("div",{class:"card"},[j[18]||(j[18]=s("h3",null,"๐ Export Options",-1)),s("div",{class:"button-grid"},[s("button",{onClick:ce,class:"btn btn-primary"}," ๐ Export All Logs "),s("button",{onClick:ye,class:"btn btn-primary"}," ๐ Export Test Results "),s("button",{onClick:pe,class:"btn btn-primary"}," ๐ Export Metrics ")])])]))}},$w=Mt(Dw,[["__scopeId","data-v-6bb642a0"]]),kw=[{path:"/",redirect:"/network"},{path:"/network",name:"Network",component:gf},{path:"/messaging",name:"Messaging",component:lg},{path:"/media",name:"Media",component:Np},{path:"/dht",name:"DHT",component:Zv},{path:"/storage",name:"Storage",component:Tb},{path:"/crypto",name:"Crypto",component:Ey},{path:"/debug",name:"Debug",component:U1},{path:"/testing",name:"Testing",component:$w}],Cw=ed({history:Lu("/vue/"),routes:kw}),wo=pc(Jc),_w=bc();wo.use(_w);wo.use(Cw);wo.mount("#app");