hopwire 0.1.7 → 0.1.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,102 @@
1
+ import { ProtocolError } from './frames.js';
2
+ import { isPublicKeyHex } from './p2p.js';
3
+ /**
4
+ * The relay for strict networks (spec phase 12, decision 136): with --relay on the Team plan, private mode goes
5
+ * through the edge when no direct connection comes about. Both CLIs open a WebSocket to the edge; the edge pairs a
6
+ * dial with a listener of the same organisation and pipes the bytes. Over the pipe both CLIs run the same Noise
7
+ * handshake as on the DHT path, so the edge passes on bytes it cannot read.
8
+ *
9
+ * - The sharer keeps a listen socket (RELAY_LISTEN_PATH) open for its topics: the public key of its machine (what
10
+ * `hopwire connect` dials) and the discovery key of its traffic log (what `hopwire watch` dials).
11
+ * - A peer opens a dial socket (RELAY_DIAL_PATH?target=<topic>). The edge tells the listener (a dial message), the
12
+ * listener opens an accept socket (RELAY_ACCEPT_PATH?dial=<id>), and the edge tells the dialer it is paired. From
13
+ * then on every binary message of one side is the next binary message of the other.
14
+ * - Every socket carries a relay token of the control plane (Authorization: Bearer), audience RELAY_TOKEN_AUDIENCE.
15
+ */
16
+ /** The sharer's socket: `?topic=<hex>` once per topic. */
17
+ export const RELAY_LISTEN_PATH = '/_hopwire/relay/listen';
18
+ /** A peer's socket: `?target=<hex>`, the topic it wants to reach. */
19
+ export const RELAY_DIAL_PATH = '/_hopwire/relay/dial';
20
+ /** The sharer's answer to one dial: `?dial=<id>`, the id of the dial message. */
21
+ export const RELAY_ACCEPT_PATH = '/_hopwire/relay/accept';
22
+ /** Audience (`aud`) of a relay token; the edge takes it only on the relay paths, and nowhere else takes it. */
23
+ export const RELAY_TOKEN_AUDIENCE = 'hopwire-relay';
24
+ /** Topics one listen socket may name: the machine key and the discovery key of the log, with room to spare. */
25
+ export const RELAY_MAX_TOPICS = 4;
26
+ /** How long the edge holds a dial for the listener to accept it. */
27
+ export const RELAY_DIAL_TIMEOUT_MS = 10_000;
28
+ /** A pipe without a byte in either direction for this long is closed. */
29
+ export const RELAY_IDLE_TIMEOUT_MS = 10 * 60_000;
30
+ /** Bytes waiting to go out on one side of a pipe above which the edge stops reading the other side. */
31
+ export const RELAY_BACKPRESSURE_BYTES = 1024 * 1024;
32
+ /** Largest binary message on a relay socket; the CLI sends at most RELAY_CHUNK_BYTES of data in one. */
33
+ export const RELAY_MESSAGE_MAX_BYTES = 256 * 1024;
34
+ export const RELAY_CHUNK_BYTES = 64 * 1024;
35
+ /** Pipes one organisation may have open at once, unless the edge is configured otherwise (RELAY_PIPES_PER_ORG). */
36
+ export const RELAY_PIPES_PER_ORG_DEFAULT = 20;
37
+ /** Relayed bytes per organisation and UTC day on the Team plan, unless configured otherwise (provisional). */
38
+ export const RELAY_BYTES_PER_DAY_DEFAULT = 20_000_000_000;
39
+ /** Close codes of relay sockets. */
40
+ export const RELAY_CLOSE = {
41
+ /** The token of a listener expired; the CLI comes back with a new one */
42
+ tokenExpired: 4001,
43
+ /** A pipe had no byte for RELAY_IDLE_TIMEOUT_MS */
44
+ idle: 4009,
45
+ /** A limit of the organisation: open pipes or relayed bytes of the day; the reason names which */
46
+ limit: 4029,
47
+ /** Nobody of the organisation listens on the topic of a dial */
48
+ noListener: 4404,
49
+ /** The listener did not accept a dial in time */
50
+ dialTimeout: 4408,
51
+ };
52
+ /** The reasons of a RELAY_CLOSE.limit close. */
53
+ export const RELAY_LIMIT_REASONS = ['relay_pipes', 'relay_bytes'];
54
+ /** What a dial id looks like: 32 hexadecimal characters the edge made up. */
55
+ const DIAL_ID = /^[0-9a-f]{32}$/;
56
+ export function isRelayDialId(value) {
57
+ return DIAL_ID.test(value);
58
+ }
59
+ /** A topic as the relay takes it: a public key or discovery key as 64 hexadecimal characters, lower case. */
60
+ export function isRelayTopic(value) {
61
+ return isPublicKeyHex(value) && value === value.toLowerCase();
62
+ }
63
+ export function encodeRelayControl(message) {
64
+ return JSON.stringify(message);
65
+ }
66
+ /** Reads a control message of the edge. Throws ProtocolError for anything else. */
67
+ export function decodeRelayControl(text) {
68
+ let value;
69
+ try {
70
+ value = JSON.parse(text);
71
+ }
72
+ catch {
73
+ throw new ProtocolError('A relay control message is not JSON');
74
+ }
75
+ if (typeof value !== 'object' || value === null || Array.isArray(value)) {
76
+ throw new ProtocolError('A relay control message is not an object');
77
+ }
78
+ const message = value;
79
+ if (message.type === 'paired') {
80
+ return { type: 'paired' };
81
+ }
82
+ if (message.type === 'dial' &&
83
+ typeof message.dial === 'string' &&
84
+ isRelayDialId(message.dial) &&
85
+ typeof message.topic === 'string' &&
86
+ isRelayTopic(message.topic)) {
87
+ return { type: 'dial', dial: message.dial, topic: message.topic };
88
+ }
89
+ throw new ProtocolError('Unknown relay control message');
90
+ }
91
+ /**
92
+ * The first byte of every binary message between two CLIs on a pipe. The edge never looks at it: it passes whole
93
+ * messages on.
94
+ */
95
+ export const RELAY_FRAME = {
96
+ /** The rest is bytes of the encrypted stream */
97
+ data: 0,
98
+ /** The rest is one encrypted datagram next to the stream (the flow control of hopwire connect) */
99
+ datagram: 1,
100
+ /** The sender will send no more stream bytes */
101
+ end: 2,
102
+ };
package/package.json CHANGED
@@ -1,10 +1,15 @@
1
1
  {
2
2
  "name": "hopwire",
3
- "version": "0.1.7",
3
+ "version": "0.1.9",
4
4
  "mcpName": "to.hopwire/hopwire",
5
5
  "description": "Record, share and replay the HTTP traffic of your local services: private P2P sharing with teammates, and public HTTPS URLs.",
6
6
  "license": "Apache-2.0",
7
7
  "homepage": "https://hopwire.to",
8
+ "repository": {
9
+ "type": "git",
10
+ "url": "git+https://github.com/hopwire-to/cli.git",
11
+ "directory": "apps/cli"
12
+ },
8
13
  "keywords": [
9
14
  "tunnel",
10
15
  "webhooks",
@@ -27,6 +32,7 @@
27
32
  },
28
33
  "dependencies": {
29
34
  "@hopwire/protocol": "0.1.0",
35
+ "@hyperswarm/secret-stream": "^6.9.2",
30
36
  "corestore": "^7.16.1",
31
37
  "hypercore": "^11.40.5",
32
38
  "hyperdht": "^6.37.0",
@@ -1,2 +0,0 @@
1
- (function(){let e=document.createElement(`link`).relList;if(e&&e.supports&&e.supports(`modulepreload`))return;for(let e of document.querySelectorAll(`link[rel="modulepreload"]`))n(e);new MutationObserver(e=>{for(let t of e)if(t.type===`childList`)for(let e of t.addedNodes)e.tagName===`LINK`&&e.rel===`modulepreload`&&n(e)}).observe(document,{childList:!0,subtree:!0});function t(e){let t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),t.credentials=e.crossOrigin===`use-credentials`?`include`:e.crossOrigin===`anonymous`?`omit`:`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})();function e(e){let t=Object.create(null);for(let n of e.split(`,`))t[n]=1;return e=>e in t}var t={},n=[],r=()=>{},i=()=>!1,a=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),o=e=>e.startsWith(`onUpdate:`),s=Object.assign,c=(e,t)=>{let n=e.indexOf(t);n>-1&&e.splice(n,1)},l=Object.prototype.hasOwnProperty,u=(e,t)=>l.call(e,t),d=Array.isArray,f=e=>x(e)===`[object Map]`,p=e=>x(e)===`[object Set]`,m=e=>x(e)===`[object Date]`,h=e=>typeof e==`function`,g=e=>typeof e==`string`,_=e=>typeof e==`symbol`,v=e=>typeof e==`object`&&!!e,y=e=>(v(e)||h(e))&&h(e.then)&&h(e.catch),b=Object.prototype.toString,x=e=>b.call(e),ee=e=>x(e).slice(8,-1),S=e=>x(e)===`[object Object]`,te=e=>g(e)&&e!==`NaN`&&e[0]!==`-`&&``+parseInt(e,10)===e,ne=e(`,key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted`),re=1e4,ie=e=>{let t=Object.create(null),n=0;return(r=>{let i=t[r];return i===void 0?(++n>re&&(t=Object.create(null),n=1),t[r]=e(r)):i})},ae=/-\w/g,C=ie(e=>e.replace(ae,e=>e.slice(1).toUpperCase())),oe=/\B([A-Z])/g,se=ie(e=>e.replace(oe,`-$1`).toLowerCase()),ce=ie(e=>e.charAt(0).toUpperCase()+e.slice(1)),le=ie(e=>e?`on${ce(e)}`:``),ue=(e,t)=>!Object.is(e,t),w=(e,...t)=>{for(let n=0;n<e.length;n++)e[n](...t)},de=(e,t,n,r=!1)=>{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,writable:r,value:n})},fe=e=>{let t=parseFloat(e);return isNaN(t)?e:t},pe,me=()=>pe||=typeof globalThis<`u`?globalThis:typeof self<`u`?self:typeof window<`u`?window:typeof global<`u`?global:{};function he(e){if(d(e)){let t={};for(let n=0;n<e.length;n++){let r=e[n],i=g(r)?ye(r):he(r);if(i)for(let e in i)t[e]=i[e]}return t}if(g(e)||v(e))return e}var ge=/;(?![^(]*\))/g,_e=/:([^]+)/,ve=/"(?:[^"\\]|\\[^])*"|'(?:[^'\\]|\\[^])*'|\\[^]|\/\*[^]*?\*\//g;function ye(e){let t={};return e.replace(ve,e=>e.startsWith(`/*`)?``:e).split(ge).forEach(e=>{if(e){let n=e.split(_e);n.length>1&&(t[n[0].trim()]=n[1].trim())}}),t}function T(e){let t=``;if(g(e))t=e;else if(d(e))for(let n=0;n<e.length;n++){let r=T(e[n]);r&&(t+=r+` `)}else if(v(e))for(let n in e)e[n]&&(t+=n+` `);return t.trim()}var be=e(`itemscope,allowfullscreen,disablepictureinpicture,disableremoteplayback,formnovalidate,ismap,nomodule,novalidate,playsinline,readonly`);function xe(e){return!!e||e===``}function Se(e,t,n){if(e.length!==t.length)return!1;let r=!0;for(let i=0;r&&i<e.length;i++)r=Ee(e[i],t[i],n);return r}function Ce(e,t,n){if(e.size!==t.size)return!1;let r=Array.from(t),i=new Uint8Array(r.length);for(let t of e){let e=-1;for(let a=0;a<r.length;a++)if(!i[a]&&Ee(t,r[a],n)){e=a;break}if(e<0)return!1;i[e]=1}return!0}function we(e,t,n){let r=f(e),i=f(t);if(r||i||(r=p(e),i=p(t),r||i))return r&&i?Ce(e,t,n):!1;if(Object.keys(e).length!==Object.keys(t).length)return!1;for(let r in e){let i=u(e,r),a=u(t,r);if(i&&!a||!i&&a||!Ee(e[r],t[r],n))return!1}return Oe(e)===Oe(t)}function Te(e,t,n,r){n||=[new Map,new Map];let[i,a]=n;if(i.has(e)||a.has(t))return i.get(e)===t&&a.get(t)===e;i.set(e,t),a.set(t,e);let o=r(e,t,n);return i.delete(e),a.delete(t),o}function Ee(e,t,n){if(e===t)return!0;let r=m(e),i=m(t);return r||i?r&&i?e.getTime()===t.getTime():!1:(r=_(e),i=_(t),r||i?e===t:(r=d(e),i=d(t),r||i?r&&i?Te(e,t,n,Se):!1:(r=v(e),i=v(t),r||i?!r||!i?!1:Te(e,t,n,we):String(e)===String(t))))}function De(e,t){return e.findIndex(e=>Ee(e,t))}function Oe(e){return Object.getPrototypeOf(e)===null&&e[Symbol.toPrimitive]==null&&typeof e.toString!=`function`&&typeof e.valueOf!=`function`?x(e):String(e)}var ke=e=>!!(e&&e.__v_isRef===!0),E=e=>g(e)?e:e==null?``:d(e)||v(e)&&(e.toString===b||!h(e.toString))?ke(e)?E(e.value):JSON.stringify(e,Ae,2):String(e),Ae=(e,t)=>ke(t)?Ae(e,t.value):f(t)?{[`Map(${t.size})`]:[...t.entries()].reduce((e,[t,n],r)=>(e[je(t,r)+` =>`]=n,e),{})}:p(t)?{[`Set(${t.size})`]:[...t.values()].map(e=>je(e))}:_(t)?je(t):v(t)&&!d(t)&&!S(t)?String(t):t,je=(e,t=``)=>_(e)?`Symbol(${e.description??t})`:e,D,Me=class{constructor(e=!1){this.detached=e,this._active=!0,this._on=0,this.effects=[],this.cleanups=[],this._isPaused=!1,this._warnOnRun=!0,this.__v_skip=!0,!e&&D&&(D.active?(this.parent=D,this.index=(D.scopes||(D.scopes=[])).push(this)-1):(this._active=!1,this._warnOnRun=!1))}get active(){return this._active}pause(){if(this._active){this._isPaused=!0;let e,t;if(this.scopes){let n=this.scopes.slice();for(e=0,t=n.length;e<t;e++)n[e].pause()}for(e=0,t=this.effects.length;e<t;e++)this.effects[e].pause()}}resume(){if(this._active&&this._isPaused){this._isPaused=!1;let e,t;if(this.scopes){let n=this.scopes.slice();for(e=0,t=n.length;e<t;e++)n[e].resume()}let n=this.effects.slice();for(e=0,t=n.length;e<t;e++)n[e].resume()}}run(e){if(this._active){let t=D;try{return D=this,e()}finally{D=t}}}on(){++this._on===1&&(this.prevScope=D,D=this)}off(){if(this._on>0&&--this._on===0){if(D===this)D=this.prevScope;else{let e=D;for(;e;){if(e.prevScope===this){e.prevScope=this.prevScope;break}e=e.prevScope}}this.prevScope=void 0}}stop(e){if(this._active){this._active=!1;let t,n;for(t=0,n=this.effects.length;t<n;t++)this.effects[t].stop();for(this.effects.length=0,t=0,n=this.cleanups.length;t<n;t++)this.cleanups[t]();if(this.cleanups.length=0,this.scopes){let e=this.scopes.slice();for(t=0,n=e.length;t<n;t++)e[t].stop(!0);this.scopes.length=0}if(!this.detached&&this.parent&&!e){let e=this.parent.scopes.pop();e&&e!==this&&(this.parent.scopes[this.index]=e,e.index=this.index)}this.parent=void 0}}};function Ne(){return D}var O,Pe=new WeakSet,Fe=class{constructor(e){this.fn=e,this.deps=void 0,this.depsTail=void 0,this.flags=5,this.next=void 0,this.cleanup=void 0,this.scheduler=void 0,D&&(D.active?D.effects.push(this):this.flags&=-2)}pause(){this.flags|=64}resume(){this.flags&64&&(this.flags&=-65,Pe.has(this)&&(Pe.delete(this),this.trigger()))}notify(){this.flags&2&&!(this.flags&32)||this.flags&8||ze(this)}run(){if(!(this.flags&1))return this.fn();this.flags|=2,Qe(this),He(this);let e=O,t=Je;O=this,Je=!0;try{return this.fn()}finally{Ue(this),O=e,Je=t,this.flags&=-3}}stop(){if(this.flags&1){for(let e=this.deps;e;e=e.nextDep)Ke(e);this.deps=this.depsTail=void 0,Qe(this),this.onStop&&this.onStop(),this.flags&=-2}}trigger(){this.flags&64?Pe.add(this):this.scheduler?this.scheduler():this.runIfDirty()}runIfDirty(){We(this)&&this.run()}get dirty(){return We(this)}},Ie=0,Le,Re;function ze(e,t=!1){e.flags|=8,t?(e.next=Re,Re=e):(e.next=Le,Le=e)}function Be(){Ie++}function Ve(){if(--Ie>0)return;if(Re){let e=Re;for(Re=void 0;e;){let t=e.next;e.next=void 0,e.flags&=-9,e=t}}let e;for(;Le;){let t=Le;for(Le=void 0;t;){let n=t.next;if(t.next=void 0,t.flags&=-9,t.flags&1)try{t.trigger()}catch(t){e||=t}t=n}}if(e)throw e}function He(e){for(let t=e.deps;t;t=t.nextDep)t.version=-1,t.prevActiveLink=t.dep.activeLink,t.dep.activeLink=t}function Ue(e){let t,n=e.depsTail,r=n;for(;r;){let e=r.prevDep;r.version===-1?(r===n&&(n=e),Ke(r),qe(r)):t=r,r.dep.activeLink=r.prevActiveLink,r.prevActiveLink=void 0,r=e}e.deps=t,e.depsTail=n}function We(e){for(let t=e.deps;t;t=t.nextDep)if(t.dep.version!==t.version||t.dep.computed&&(Ge(t.dep.computed)||t.dep.version!==t.version))return!0;return!!e._dirty}function Ge(e){if(e.flags&4&&!(e.flags&16)||(e.flags&=-17,e.globalVersion===$e)||(e.globalVersion=$e,!e.isSSR&&e.flags&128&&(!e.deps&&!e._dirty||!We(e))))return;e.flags|=2;let t=e.dep,n=O,r=Je;O=e,Je=!0;try{He(e);let n=e.fn(e._value);(t.version===0||ue(n,e._value))&&(e.flags|=128,e._value=n,t.version++)}catch(e){throw t.version++,e}finally{O=n,Je=r,Ue(e),e.flags&=-3}}function Ke(e,t=!1){let{dep:n,prevSub:r,nextSub:i}=e;if(r&&(r.nextSub=i,e.prevSub=void 0),i&&(i.prevSub=r,e.nextSub=void 0),n.subs===e&&(n.subs=r,!r&&n.computed)){n.computed.flags&=-5;for(let e=n.computed.deps;e;e=e.nextDep)Ke(e,!0)}!t&&!--n.sc&&n.map&&n.map.delete(n.key)}function qe(e){let{prevDep:t,nextDep:n}=e;t&&(t.nextDep=n,e.prevDep=void 0),n&&(n.prevDep=t,e.nextDep=void 0)}var Je=!0,Ye=[];function Xe(){Ye.push(Je),Je=!1}function Ze(){let e=Ye.pop();Je=e===void 0||e}function Qe(e){let{cleanup:t}=e;if(e.cleanup=void 0,t){let e=O;O=void 0;try{t()}finally{O=e}}}var $e=0,et=class{constructor(e,t){this.sub=e,this.dep=t,this.version=t.version,this.nextDep=this.prevDep=this.nextSub=this.prevSub=this.prevActiveLink=void 0}},tt=class{constructor(e){this.computed=e,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(e){if(!O||!Je||O===this.computed)return;let t=this.activeLink;if(t===void 0||t.sub!==O)t=this.activeLink=new et(O,this),O.deps?(t.prevDep=O.depsTail,O.depsTail.nextDep=t,O.depsTail=t):O.deps=O.depsTail=t,nt(t);else if(t.version===-1&&(t.version=this.version,t.nextDep)){let e=t.nextDep;e.prevDep=t.prevDep,t.prevDep&&(t.prevDep.nextDep=e),t.prevDep=O.depsTail,t.nextDep=void 0,O.depsTail.nextDep=t,O.depsTail=t,O.deps===t&&(O.deps=e)}return t}trigger(e){this.version++,$e++,this.notify(e)}notify(e){Be();try{for(let e=this.subs;e;e=e.prevSub)e.sub.notify()&&e.sub.dep.notify()}finally{Ve()}}};function nt(e){if(e.dep.sc++,e.sub.flags&4){let t=e.dep.computed;if(t&&!e.dep.subs){t.flags|=20;for(let e=t.deps;e;e=e.nextDep)nt(e)}let n=e.dep.subs;n!==e&&(e.prevSub=n,n&&(n.nextSub=e)),e.dep.subs=e}}var rt=new WeakMap,it=Symbol(``),at=Symbol(``),ot=Symbol(``);function k(e,t,n){if(Je&&O){let t=rt.get(e);t||rt.set(e,t=new Map);let r=t.get(n);r||(t.set(n,r=new tt),r.map=t,r.key=n),r.track()}}function st(e,t,n,r,i,a){let o=rt.get(e);if(!o){$e++;return}let s=e=>{e&&e.trigger()};if(Be(),t===`clear`)o.forEach(s);else{let i=d(e),a=i&&te(n);if(i&&n===`length`){let e=Number(r);o.forEach((t,n)=>{(n===`length`||n===ot||!_(n)&&n>=e)&&s(t)})}else switch((n!==void 0||o.has(void 0))&&s(o.get(n)),a&&s(o.get(ot)),t){case`add`:i?a&&s(o.get(`length`)):(s(o.get(it)),f(e)&&s(o.get(at)));break;case`delete`:i||(s(o.get(it)),f(e)&&s(o.get(at)));break;case`set`:f(e)&&s(o.get(it))}}Ve()}function ct(e){let t=A(e);return t===e||(k(t,`iterate`,ot),Jt(e))?t:qt(e)?Kt(e)?t.map(e=>Qt(Zt(e))):t.map(Qt):t.map(Zt)}function lt(e){return k(e=A(e),`iterate`,ot),e}function ut(e,t){return qt(e)?Qt(Kt(e)?Zt(t):t):Zt(t)}var dt={__proto__:null,[Symbol.iterator](){return ft(this,Symbol.iterator,e=>ut(this,e))},concat(...e){return ct(this).concat(...e.map(e=>d(e)?ct(e):e))},entries(){return ft(this,`entries`,e=>(e[1]=ut(this,e[1]),e))},every(e,t){return ht(this,`every`,e,t,void 0,arguments)},filter(e,t){return ht(this,`filter`,e,t,e=>e.map(e=>ut(this,e)),arguments)},find(e,t){return ht(this,`find`,e,t,e=>ut(this,e),arguments)},findIndex(e,t){return ht(this,`findIndex`,e,t,void 0,arguments)},findLast(e,t){return ht(this,`findLast`,e,t,e=>ut(this,e),arguments)},findLastIndex(e,t){return ht(this,`findLastIndex`,e,t,void 0,arguments)},forEach(e,t){return ht(this,`forEach`,e,t,void 0,arguments)},includes(...e){return _t(this,`includes`,e)},indexOf(...e){return _t(this,`indexOf`,e)},join(e){return ct(this).join(e)},lastIndexOf(...e){return _t(this,`lastIndexOf`,e)},map(e,t){return ht(this,`map`,e,t,void 0,arguments)},pop(){return vt(this,`pop`)},push(...e){return vt(this,`push`,e)},reduce(e,...t){return gt(this,`reduce`,e,t)},reduceRight(e,...t){return gt(this,`reduceRight`,e,t)},shift(){return vt(this,`shift`)},some(e,t){return ht(this,`some`,e,t,void 0,arguments)},splice(...e){return vt(this,`splice`,e)},toReversed(){return ct(this).toReversed()},toSorted(e){return ct(this).toSorted(e)},toSpliced(...e){return ct(this).toSpliced(...e)},unshift(...e){return vt(this,`unshift`,e)},values(){return ft(this,`values`,e=>ut(this,e))}};function ft(e,t,n){let r=lt(e),i=r[t],a=i.call(r);if(r!==e&&!Jt(e)){if(a[Symbol.toStringTag]===`Array Iterator`){let e=Object.create(Object.getPrototypeOf(a));return e.next=()=>pt(a.next(),n),i!==mt[t]&&Object.defineProperties(e,{return:{get(){let e=a.return;return typeof e==`function`?e.bind(a):e}},throw:{get(){let e=a.throw;return typeof e==`function`?e.bind(a):e}}}),e}a._next=a.next,a.next=()=>pt(a._next(),n)}return a}function pt(e,t){return e.done||(e.value=t(e.value)),e}var mt=Array.prototype;function ht(e,t,n,r,i,a){let o=lt(e),s=o!==e&&!Jt(e),c=o[t];if(c!==mt[t]){let t=c.apply(e,a);return s?Zt(t):t}let l=n;o!==e&&(s?l=function(t,r){return n.call(this,ut(e,t),r,e)}:n.length>2&&(l=function(t,r){return n.call(this,t,r,e)}));let u=c.call(o,l,r);return s&&i?i(u):u}function gt(e,t,n,r){let i=lt(e),a=i!==e&&!Jt(e),o=n,s=!1;i!==e&&(a?(s=r.length===0,o=function(t,r,i){return s&&(s=!1,t=ut(e,t)),n.call(this,t,ut(e,r),i,e)}):n.length>3&&(o=function(t,r,i){return n.call(this,t,r,i,e)}));let c=i[t](o,...r);return s?ut(e,c):c}function _t(e,t,n){let r=A(e);k(r,`iterate`,ot);let i=r[t](...n);return(i===-1||i===!1)&&Yt(n[0])?(n[0]=A(n[0]),r[t](...n)):i}function vt(e,t,n=[]){Xe(),Be();let r=A(e)[t].apply(e,n);return Ve(),Ze(),r}var yt=e(`__proto__,__v_isRef,__isVue`),bt=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>e!==`arguments`&&e!==`caller`).map(e=>Symbol[e]).filter(_));function xt(e){_(e)||(e=String(e));let t=A(this);return k(t,`has`,e),t.hasOwnProperty(e)}var St=class{constructor(e=!1,t=!1){this._isReadonly=e,this._isShallow=t}get(e,t,n){if(t===`__v_skip`)return e.__v_skip;let r=this._isReadonly,i=this._isShallow;if(t===`__v_isReactive`)return!r;if(t===`__v_isReadonly`)return r;if(t===`__v_isShallow`)return i;if(t===`__v_raw`)return n===(r?i?Bt:zt:i?Rt:Lt).get(e)||Object.getPrototypeOf(e)===Object.getPrototypeOf(n)?e:void 0;let a=d(e);if(!r){let e;if(a&&(e=dt[t]))return e;if(t===`hasOwnProperty`)return xt}let o=Reflect.get(e,t,j(e)?e:n);if((_(t)?bt.has(t):yt(t))||(r||k(e,`get`,t),i))return o;if(j(o)){let e=a&&te(t)?o:o.value;return r&&v(e)?Wt(e):e}return v(o)?r?Wt(o):Ht(o):o}},Ct=class extends St{constructor(e=!1){super(!1,e)}set(e,t,n,r){let i=e[t],a=d(e)&&te(t);if(!this._isShallow){let e=qt(i);if(!Jt(n)&&!qt(n)&&(i=A(i),n=A(n)),!a&&j(i)&&!j(n))return e||(i.value=n),!0}let o=a?Number(t)<e.length:u(e,t),s=Reflect.set(e,t,n,j(e)?e:r);return e===A(r)&&s&&(o?ue(n,i)&&st(e,`set`,t,n,i):st(e,`add`,t,n)),s}deleteProperty(e,t){let n=u(e,t),r=e[t],i=Reflect.deleteProperty(e,t);return i&&n&&st(e,`delete`,t,void 0,r),i}has(e,t){let n=Reflect.has(e,t);return _(t)&&bt.has(t)||k(e,`has`,t),n}ownKeys(e){return k(e,`iterate`,d(e)?`length`:it),Reflect.ownKeys(e)}},wt=class extends St{constructor(e=!1){super(!0,e)}set(e,t){return!0}deleteProperty(e,t){return!0}},Tt=new Ct,Et=new wt,Dt=new Ct(!0),Ot=e=>e,kt=e=>Reflect.getPrototypeOf(e);function At(e,t,n){return function(...r){let i=this.__v_raw,a=A(i),o=f(a),c=e===`entries`||e===Symbol.iterator&&o,l=e===`keys`&&o,u=i[e](...r),d=n?Ot:t?Qt:Zt;return!t&&k(a,`iterate`,l?at:it),s(Object.create(u),{next(){let{value:e,done:t}=u.next();return t?{value:e,done:t}:{value:c?[d(e[0]),d(e[1])]:d(e),done:t}}})}}function jt(e){return function(...t){return e===`delete`?!1:e===`clear`?void 0:this}}function Mt(e,t){let n={get(n){let r=this.__v_raw,i=A(r),a=A(n);e||(ue(n,a)&&k(i,`get`,n),k(i,`get`,a));let{has:o}=kt(i),s=t?Ot:e?Qt:Zt;if(o.call(i,n))return s(r.get(n));if(o.call(i,a))return s(r.get(a));r!==i&&r.get(n)},get size(){let t=this.__v_raw;return!e&&k(A(t),`iterate`,it),t.size},has(t){let n=this.__v_raw,r=A(n),i=A(t);return e||(ue(t,i)&&k(r,`has`,t),k(r,`has`,i)),t===i?n.has(t):n.has(t)||n.has(i)},forEach(n,r){let i=this,a=i.__v_raw,o=A(a),s=t?Ot:e?Qt:Zt;return!e&&k(o,`iterate`,it),a.forEach((e,t)=>n.call(r,s(e),s(t),i))}};return s(n,e?{add:jt(`add`),set:jt(`set`),delete:jt(`delete`),clear:jt(`clear`)}:{add(e){let n=A(this),r=kt(n),i=A(e),a=!t&&!Jt(e)&&!qt(e)?i:e;return r.has.call(n,a)||ue(e,a)&&r.has.call(n,e)||ue(i,a)&&r.has.call(n,i)||(n.add(a),st(n,`add`,a,a)),this},set(e,n){t||Jt(n)||qt(n)||(n=A(n));let r=A(this),{has:i,get:a}=kt(r),o=i.call(r,e);o||=(e=A(e),i.call(r,e));let s=a.call(r,e);return r.set(e,n),o?ue(n,s)&&st(r,`set`,e,n,s):st(r,`add`,e,n),this},delete(e){let t=A(this),{has:n,get:r}=kt(t),i=n.call(t,e);i||=(e=A(e),n.call(t,e));let a=r?r.call(t,e):void 0,o=t.delete(e);return i&&st(t,`delete`,e,void 0,a),o},clear(){let e=A(this),t=e.size!==0,n=e.clear();return t&&st(e,`clear`,void 0,void 0,void 0),n}}),[`keys`,`values`,`entries`,Symbol.iterator].forEach(r=>{n[r]=At(r,e,t)}),n}function Nt(e,t){let n=Mt(e,t);return(r,i,a)=>i===`__v_isReactive`?!e:i===`__v_isReadonly`?e:i===`__v_isShallow`?t:i===`__v_raw`?r:Reflect.get(u(n,i)&&i in r?n:r,i,a)}var Pt={get:Nt(!1,!1)},Ft={get:Nt(!1,!0)},It={get:Nt(!0,!1)},Lt=new WeakMap,Rt=new WeakMap,zt=new WeakMap,Bt=new WeakMap;function Vt(e){switch(e){case`Object`:case`Array`:return 1;case`Map`:case`Set`:case`WeakMap`:case`WeakSet`:return 2;default:return 0}}function Ht(e){return qt(e)?e:Gt(e,!1,Tt,Pt,Lt)}function Ut(e){return Gt(e,!1,Dt,Ft,Rt)}function Wt(e){return Gt(e,!0,Et,It,zt)}function Gt(e,t,n,r,i){if(!v(e)||e.__v_raw&&!(t&&e.__v_isReactive)||e.__v_skip||!Object.isExtensible(e))return e;let a=i.get(e);if(a)return a;let o=Vt(ee(e));if(o===0)return e;let s=new Proxy(e,o===2?r:n);return i.set(e,s),s}function Kt(e){return qt(e)?Kt(e.__v_raw):!!(e&&e.__v_isReactive)}function qt(e){return!!(e&&e.__v_isReadonly)}function Jt(e){return!!(e&&e.__v_isShallow)}function Yt(e){return e?!!e.__v_raw:!1}function A(e){let t=e&&e.__v_raw;return t?A(t):e}function Xt(e){return!u(e,`__v_skip`)&&Object.isExtensible(e)&&de(e,`__v_skip`,!0),e}var Zt=e=>v(e)?Ht(e):e,Qt=e=>v(e)?Wt(e):e;function j(e){return e?e.__v_isRef===!0:!1}function M(e){return en(e,!1)}function $t(e){return en(e,!0)}function en(e,t){return j(e)?e:new tn(e,t)}var tn=class{constructor(e,t){this.dep=new tt,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=t?e:A(e),this._value=t?e:Zt(e),this.__v_isShallow=t}get value(){return this.dep.track(),this._value}set value(e){let t=this._rawValue,n=this.__v_isShallow||Jt(e)||qt(e);e=n?e:A(e),ue(e,t)&&(this._rawValue=e,this._value=n?e:Zt(e),this.dep.trigger())}};function N(e){return j(e)?e.value:e}var nn={get:(e,t,n)=>t===`__v_raw`?e:N(Reflect.get(e,t,n)),set:(e,t,n,r)=>{let i=e[t];return j(i)&&!j(n)?(i.value=n,!0):Reflect.set(e,t,n,r)}};function rn(e){return Kt(e)?e:new Proxy(e,nn)}var an=class{constructor(e,t,n){this.fn=e,this.setter=t,this._value=void 0,this.dep=new tt(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=$e-1,this.next=void 0,this.effect=this,this.__v_isReadonly=!t,this.isSSR=n}notify(){if(this.flags|=16,!(this.flags&8)&&O!==this)return ze(this,!0),!0}get value(){let e=this.dep.track();return Ge(this),e&&(e.version=this.dep.version),this._value}set value(e){this.setter&&this.setter(e)}};function on(e,t,n=!1){let r,i;return h(e)?r=e:(r=e.get,i=e.set),new an(r,i,n)}var sn={},cn=new WeakMap,ln=void 0;function un(e,t=!1,n=ln){if(n){let t=cn.get(n);t||cn.set(n,t=[]),t.push(e)}}function dn(e,n,i=t){let{immediate:a,deep:o,once:s,scheduler:l,augmentJob:u,call:f}=i,p=e=>o?e:Jt(e)||o===!1||o===0?fn(e,1):fn(e),m,g,_,v,y=!1,b=!1;if(j(e)?(g=()=>e.value,y=Jt(e)):Kt(e)?(g=()=>p(e),y=!0):d(e)?(b=!0,y=e.some(e=>Kt(e)||Jt(e)),g=()=>e.map(e=>{if(j(e))return e.value;if(Kt(e))return p(e);if(h(e))return f?f(e,2):e()})):g=h(e)?n?f?()=>f(e,2):e:()=>{if(_){Xe();try{_()}finally{Ze()}}let t=ln;ln=m;try{return f?f(e,3,[v]):e(v)}finally{ln=t}}:r,n&&o){let e=g,t=o===!0?1/0:o;g=()=>fn(e(),t)}let x=Ne(),ee=()=>{m.stop(),x&&x.active&&c(x.effects,m)};if(s&&n){let e=n;n=(...t)=>{try{return e(...t)}finally{ee()}}}let S=b?Array(e.length).fill(sn):sn,te=e=>{if(m.flags&1&&(m.dirty||e)){if(n){let t=m.run();if(e||o||y||(b?t.some((e,t)=>ue(e,S[t])):ue(t,S))){let e=ln;Xe();try{_&&_(),ln=m;let e=[t,S===sn?void 0:b&&S[0]===sn?[]:S,v];S=t,f?f(n,3,e):n(...e)}finally{ln=e,Ze()}}}else m.run()}};return u&&u(te),m=new Fe(g),m.scheduler=l?()=>l(te,!1):te,v=e=>un(e,!1,m),_=m.onStop=()=>{let e=cn.get(m);if(e){if(f)f(e,4);else for(let t of e)t();cn.delete(m)}},n?a?te(!0):S=m.run():l?l(te.bind(null,!0),!0):m.run(),ee.pause=m.pause.bind(m),ee.resume=m.resume.bind(m),ee.stop=ee,ee}function fn(e,t=1/0,n){if(t<=0||!v(e)||e.__v_skip||(n||=new Map,(n.get(e)||0)>=t))return e;if(n.set(e,t),t--,j(e))fn(e.value,t,n);else if(d(e))for(let r=0;r<e.length;r++)fn(e[r],t,n);else if(p(e)||f(e))e.forEach(e=>{fn(e,t,n)});else if(S(e)){for(let r in e)fn(e[r],t,n);for(let r of Object.getOwnPropertySymbols(e))Object.prototype.propertyIsEnumerable.call(e,r)&&fn(e[r],t,n)}return e}function pn(e,t,n,r){try{return r?e(...r):e()}catch(e){hn(e,t,n)}}function mn(e,t,n,r){if(h(e)){let i=pn(e,t,n,r);return i&&y(i)&&i.catch(e=>{hn(e,t,n,void 0,!0)}),i}if(d(e)){let i=[];for(let a=0;a<e.length;a++)i.push(mn(e[a],t,n,r));return i}}function hn(e,n,r,i=!0,a=!1){let o=n?n.vnode:null,{errorHandler:s,throwUnhandledErrorInProduction:c}=n&&n.appContext.config||t;if(n){let t=n.parent,i=n.proxy,o=`https://vuejs.org/error-reference/#runtime-${r}`;for(;t;){let n=t.ec;if(n&&!t.isUnmounted&&(!a||t.scope.active)){for(let t=0;t<n.length;t++)if(n[t](e,i,o)===!1)return}t=t.parent}if(s){Xe(),pn(s,null,10,[e,i,o]),Ze();return}}gn(e,r,o,i,c)}function gn(e,t,n,r=!0,i=!1){if(i)throw e;console.error(e)}var P=[],_n=-1,vn=[],yn=null,bn=0,xn=Promise.resolve(),Sn=null;function Cn(e){let t=Sn||xn;return e?t.then(this?e.bind(this):e):t}function wn(e){let t=_n+1,n=P.length;for(;t<n;){let r=t+n>>>1,i=P[r],a=Mn(i);a<e||a===e&&i.flags&2?t=r+1:n=r}return t}function Tn(e){if(!(e.flags&1)){let t=Mn(e),n=P[P.length-1];!n||!(e.flags&2)&&t>=Mn(n)?P.push(e):P.splice(wn(t),0,e),e.flags|=1,En()}}function En(){Sn||=xn.then(Nn)}function Dn(e){if(!d(e))yn&&e.id===-1?yn.splice(bn+1,0,e):e.flags&1||(vn.push(e),e.flags|=1);else for(let t=0;t<e.length;t++)vn.push(e[t]);En()}function On(e,t,n,r=_n+1){for(;r<P.length;r++){let n=P[r];if(n&&n.flags&2){if(e&&n.id!==e.uid||t!==void 0&&!(n.id>=t))continue;P.splice(r,1),r=e?r-1:_n,n.flags&4&&(n.flags&=-2),n(),n.flags&4||(n.flags&=-2)}}}function kn(e,t,n=0){if(vn.length){let e=vn,r=0;if(t){e=[];for(let i=0;i<vn.length;i++){let a=vn[i];(a.i===void 0?t.has(a):!a.i||a.i.uid<n)?vn[r++]=a:e.push(a)}}let i=[...new Set(e)].sort((e,t)=>Mn(e)-Mn(t));if(vn.length=r,yn){for(let e=0;e<i.length;e++)yn.push(i[e]);return}for(yn=i,bn=0;bn<yn.length;bn++){let e=yn[bn];e.flags&4&&(e.flags&=-2),e.flags&8||e(),e.flags&=-2}yn=null,bn=0}}var An=!1;function jn(e,t){if(An){e();return}let n=t===void 0?void 0:new Set(vn);e(),An=!0;try{On(void 0,t),kn(void 0,n,t)}finally{An=!1}}var Mn=e=>e.id==null?e.flags&2?-1:1/0:e.id;function Nn(e){try{for(_n=0;_n<P.length;_n++){let e=P[_n];e&&!(e.flags&8)&&(e.flags&4&&(e.flags&=-2),pn(e,e.i,e.i?15:14),e.flags&4||(e.flags&=-2))}}finally{for(;_n<P.length;_n++){let e=P[_n];e&&(e.flags&=-2)}_n=-1,P.length=0,kn(e),Sn=null,(P.length||vn.length)&&Nn(e)}}var F=null,Pn=null;function Fn(e){let t=F;return F=e,Pn=e&&e.type.__scopeId||null,t}function I(e,t=F,n){if(!t||e._n)return e;let r=(...n)=>{r._d&&Wi(-1);let i=Fn(t),a=Vi.length,o;try{o=e(...n)}finally{for(let e=Vi.length;e>a;e--)Hi();Fn(i),r._d&&Wi(1)}return o};return r._n=!0,r._c=!0,r._d=!0,r}function L(e,n){if(F===null)return e;let r=Sa(F),i=e.dirs||=[];for(let e=0;e<n.length;e++){let[a,o,s,c=t]=n[e];a&&(h(a)&&(a={mounted:a,updated:a}),a.deep&&fn(o),i.push({dir:a,instance:r,value:o,oldValue:void 0,arg:s,modifiers:c}))}return e}function In(e,t,n,r){let i=e;if(r===`beforeMount`)e._mount=e;else if(r===`beforeUpdate`){let n=t&&t._mount;n&&(n._latest=e,e._mount=n)}else if(r===`mounted`){let t=e._latest;e._mount=e._latest=void 0,t&&(i=t,t._mount=void 0)}let a=i.dirs,o=t&&t.dirs;for(let c=0;c<a.length;c++){let l=a[c];o?l.oldValue=o[c].value:r===`mounted`&&l.oldValue!==void 0&&(l=s({},l,{oldValue:void 0}));let u=l.dir[r];u&&(Xe(),mn(u,n,8,[e.el,l,i,t]),Ze())}}function Ln(e,t){if(Z){let n=Z.provides,r=Z.parent&&Z.parent.provides;r===n&&(n=Z.provides=Object.create(r)),n[e]=t}}function Rn(e,t,n=!1){let r=ca();if(r||qr){let i=qr?qr._context.provides:r?r.parent==null||r.ce?r.vnode.appContext&&r.vnode.appContext.provides:r.parent.provides:void 0;if(i&&e in i)return i[e];if(arguments.length>1)return n&&h(t)?t.call(r&&r.proxy):t}}var zn=Symbol.for(`v-scx`),Bn=()=>Rn(zn);function Vn(e,t,n){return Hn(e,t,n)}function Hn(e,n,i=t){let{immediate:a,deep:o,flush:c,once:l}=i,u=s({},i),d=n&&a||!n&&c!==`post`,f;if(ma){if(c===`sync`){let e=Bn();f=e.__watcherHandles||=[]}else if(!d){let e=()=>{};return e.stop=r,e.resume=r,e.pause=r,e}}let p=Z;u.call=(e,t,n)=>mn(e,p,t,n);let m=!1;c===`post`?u.scheduler=e=>{e.i=p,V(e,p&&p.suspense)}:c!==`sync`&&(m=!0,u.scheduler=(e,t)=>{t?e():Tn(e)}),u.augmentJob=e=>{n&&(e.flags|=4),m&&(e.flags|=2,p&&(e.id=p.uid,e.i=p))};let h=dn(e,n,u);return ma&&(f?f.push(h):d&&h()),h}function Un(e,t,n){let r=this.proxy,i=g(e)?e.includes(`.`)?Wn(r,e):()=>r[e]:e.bind(r,r),a;h(t)?a=t:(a=t.handler,n=t);let o=da(this),s=Hn(i,a.bind(r),n);return o(),s}function Wn(e,t){let n=t.split(`.`);return()=>{let t=e;for(let e=0;e<n.length&&t;e++)t=t[n[e]];return t}}var Gn=Symbol(`_vte`),Kn=e=>e.__isTeleport,qn=Symbol(`_leaveCb`);function Jn(e){let t=e[0];if(e.length>1){for(let n of e)if(n.type!==zi){t=n;break}}return t}function Yn(e){if(!ar(e))return Kn(e.type)&&e.children?Jn(e.children):e;if(e.component)return e.component.subTree;let{shapeFlag:t,children:n}=e;if(n){if(t&16)return n[0];if(t&32&&h(n.default))return n.default()}}function Xn(e,t){if(e.shapeFlag&6&&e.component){e.transition=t;let n=e.component.subTree;Xn(Kn(n.type)&&Yn(n)||n,t)}else if(e.shapeFlag&128){let n=e.suspense;if(n){let e=n.isHydrating?n.pendingBranch:n.activeBranch;e&&Xn(e,t.clone(e))}else e.ssContent.transition=t.clone(e.ssContent),e.ssFallback.transition=t.clone(e.ssFallback)}else if(e.transition=t,e.type===H&&d(e.children)){let n=ei(e.children,!1);n&&Xn(n,t)}}function Zn(e){if(e.component)return Zn(e.component.subTree);if(e.type===H){let t=d(e.children)&&ei(e.children,!1);return t?Zn(t):void 0}if(e.type!==zi)return e}function R(e,t){return h(e)?s({name:e.name},t,{setup:e}):e}function Qn(){let e=ca();return e?(e.appContext.config.idPrefix||`v`)+`-`+e.ids[0]+e.ids[1]++:``}function $n(e){e.ids=[e.ids[0]+e.ids[2]+++`-`,0,0]}function er(e,t){let n;return!!((n=Object.getOwnPropertyDescriptor(e,t))&&!n.configurable)}var tr=new WeakMap;function nr(e,n,r,a,o=!1){if(d(e)){e.forEach((e,t)=>nr(e,n&&(d(n)?n[t]:n),r,a,o));return}if(ir(a)&&!o){a.shapeFlag&512&&a.type.__asyncResolved&&a.component.subTree.component&&nr(e,n,r,a.component.subTree);return}let s=a.shapeFlag&4?Sa(a.component):a.el,l=o?null:s,{i:f,r:p}=e,m=n&&n.r,_=f.refs===t?f.refs={}:f.refs,v=f.setupState,y=A(v),b=v===t?i:e=>!er(_,e)&&u(y,e),x=(e,t)=>!(t&&er(_,t));if(m!=null&&m!==p){if(rr(n),g(m))_[m]=null,b(m)&&(v[m]=null);else if(j(m)){let e=n;x(m,e.k)&&(m.value=null),e.k&&(_[e.k]=null)}}if(h(p))pn(p,f,12,[l,_]);else{let t=g(p),n=j(p);if(t||n){let i=()=>{if(e.f){let n=t?b(p)?v[p]:_[p]:x(p)||!e.k?p.value:_[e.k];if(o)d(n)&&c(n,s);else if(d(n))n.includes(s)||n.push(s);else if(t)_[p]=[s],b(p)&&(v[p]=_[p]);else{let t=[s];x(p,e.k)&&(p.value=t),e.k&&(_[e.k]=t)}}else t?(_[p]=l,b(p)&&(v[p]=l)):n&&(x(p,e.k)&&(p.value=l),e.k&&(_[e.k]=l))};if(l){let t=()=>{i(),tr.delete(e)};t.id=-1,tr.set(e,t),V(t,r)}else rr(e),i()}}}function rr(e){let t=tr.get(e);t&&(t.flags|=8,tr.delete(e))}me().requestIdleCallback,me().cancelIdleCallback;var ir=e=>!!e.type.__asyncLoader,ar=e=>e.type.__isKeepAlive;function or(e,t){cr(e,`a`,t)}function sr(e,t){cr(e,`da`,t)}function cr(e,t,n=Z){let r=e.__wdc||=()=>{let t=n;for(;t;){if(t.isDeactivated)return;t=t.parent}return e()};if(ur(t,r,n),n){let e=n.parent;for(;e&&e.parent;)ar(e.parent.vnode)&&lr(r,t,n,e),e=e.parent}}function lr(e,t,n,r){let i=ur(t,e,r,!0),a=ur(`um`,()=>c(r[t],i),n);a.flags=16}function ur(e,t,n=Z,r=!1){if(n){let i=n[e]||(n[e]=[]),a=t.__weh||=(...r)=>{Xe();let i=da(n),a=mn(t,n,e,r);return i(),Ze(),a};return r?i.unshift(a):i.push(a),a}}var dr=e=>(t,n=Z)=>{ma&&e!==`sp`||ur(e,(...e)=>t(...e),n)},fr=dr(`bm`),pr=dr(`m`),mr=dr(`bu`),hr=dr(`u`),gr=dr(`bum`),_r=dr(`um`),vr=dr(`sp`),yr=dr(`rtg`),br=dr(`rtc`);function xr(e,t=Z){ur(`ec`,e,t)}var Sr=Symbol.for(`v-ndc`);function z(e,t,n,r){let i,a=n&&n[r],o=d(e);if(o||g(e)){let n=o&&Kt(e),r=!1,s=!1;n&&(r=!Jt(e),s=qt(e),e=lt(e)),i=Array(e.length);for(let n=0,o=e.length;n<o;n++)i[n]=t(r?s?Qt(Zt(e[n])):Zt(e[n]):e[n],n,void 0,a&&a[n])}else if(typeof e==`number`){if(!Number.isInteger(e)||e<0)i=[];else{i=Array(e);for(let n=0;n<e;n++)i[n]=t(n+1,n,void 0,a&&a[n])}}else if(v(e)){if(e[Symbol.iterator])i=Array.from(e,(e,n)=>t(e,n,void 0,a&&a[n]));else{let n=Object.keys(e);i=Array(n.length);for(let r=0,o=n.length;r<o;r++){let o=n[r];i[r]=t(e[o],o,r,a&&a[r])}}}else i=[];return n&&(n[r]=i),i}function Cr(e,t,n,r,i,a){if(n??={},F.ce||F.parent&&ir(F.parent)&&F.parent.ce){let e=a!=null&&n.key==null?s({},n,{key:a}):n,i=Object.keys(e).length>0;return t!=="default"&&(e.name=t),W(),K(H,null,[J(`slot`,e,r&&r())],i?-2:64)}let o=e[t];o&&o._c&&(o._d=!1);let c=Vi.length;W();let l;try{let i=o&&wr(o(n)),s=n.key||a||i&&i.key;l=K(H,{key:(s&&!_(s)?s:`_${t}`)+(!i&&r?`_fb`:``)},i||(r?r():[]),i&&e._===1?64:-2)}catch(e){for(let e=Vi.length;e>c;e--)Hi();throw e}finally{o&&o._c&&(o._d=!0)}return!i&&l.scopeId&&(l.slotScopeIds=[l.scopeId+`-s`]),l}function wr(e){return e.some(e=>!Ki(e)||!(e.type===zi||e.type===H&&!wr(e.children)))?e:null}var Tr=e=>e?pa(e)?Sa(e):Tr(e.parent):null,Er=s(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=>Tr(e.parent),$root:e=>Tr(e.root),$host:e=>e.ce,$emit:e=>e.emit,$options:e=>Fr(e),$forceUpdate:e=>e.f||=()=>{Tn(e.update)},$nextTick:e=>e.n||=Cn.bind(e.proxy),$watch:e=>Un.bind(e)}),Dr=(e,n)=>e!==t&&!e.__isScriptSetup&&u(e,n),Or={get({_:e},n){if(n===`__v_skip`)return!0;let{ctx:r,setupState:i,data:a,props:o,accessCache:s,type:c,appContext:l}=e;if(n[0]!==`$`){let e=s[n];if(e!==void 0)switch(e){case 1:return i[n];case 2:return a[n];case 4:return r[n];case 3:return o[n]}else if(Dr(i,n))return s[n]=1,i[n];else if(a!==t&&u(a,n))return s[n]=2,a[n];else if(u(o,n))return s[n]=3,o[n];else if(r!==t&&u(r,n))return s[n]=4,r[n];else Ar&&(s[n]=0)}let d=Er[n],f,p;if(d)return n===`$attrs`&&k(e.attrs,`get`,``),d(e);if((f=c.__cssModules)&&(f=f[n]))return f;if(r!==t&&u(r,n))return s[n]=4,r[n];if(p=l.config.globalProperties,u(p,n))return p[n]},set({_:e},n,r){let{data:i,setupState:a,ctx:o}=e;return Dr(a,n)?(a[n]=r,!0):i!==t&&u(i,n)?(i[n]=r,!0):u(e.props,n)||n[0]===`$`&&n.slice(1)in e?!1:(o[n]=r,!0)},has({_:{data:e,setupState:n,accessCache:r,ctx:i,appContext:a,props:o,type:s}},c){let l;return!!(r[c]||e!==t&&c[0]!==`$`&&u(e,c)||Dr(n,c)||u(o,c)||u(i,c)||u(Er,c)||u(a.config.globalProperties,c)||(l=s.__cssModules)&&l[c])},defineProperty(e,t,n){return n.get==null?u(n,`value`)&&this.set(e,t,n.value,null):e._.accessCache[t]=0,Reflect.defineProperty(e,t,n)}};function kr(e){return d(e)?e.reduce((e,t)=>(e[t]=null,e),{}):e}var Ar=!0;function jr(e){let t=Fr(e),n=e.proxy,i=e.ctx;Ar=!1,t.beforeCreate&&Nr(t.beforeCreate,e,`bc`);let{data:a,computed:o,methods:s,watch:c,provide:l,inject:u,created:f,beforeMount:p,mounted:m,beforeUpdate:g,updated:_,activated:y,deactivated:b,beforeDestroy:x,beforeUnmount:ee,destroyed:S,unmounted:te,render:ne,renderTracked:re,renderTriggered:ie,errorCaptured:ae,serverPrefetch:C,expose:oe,inheritAttrs:se,components:ce,directives:le,filters:ue}=t;if(u&&Mr(u,i,null),s)for(let e in s){let t=s[e];h(t)&&(i[e]=t.bind(n))}if(a){let t=a.call(n,n);v(t)&&(e.data=Ht(t))}if(Ar=!0,o)for(let e in o){let t=o[e],a=Q({get:h(t)?t.bind(n,n):h(t.get)?t.get.bind(n,n):r,set:!h(t)&&h(t.set)?t.set.bind(n):r});Object.defineProperty(i,e,{enumerable:!0,configurable:!0,get:()=>a.value,set:e=>a.value=e})}if(c)for(let e in c)Pr(c[e],i,n,e);if(l){let e=h(l)?l.call(n):l;Reflect.ownKeys(e).forEach(t=>{Ln(t,e[t])})}f&&Nr(f,e,`c`);function w(e,t){d(t)?t.forEach(t=>e(t.bind(n))):t&&e(t.bind(n))}if(w(fr,p),w(pr,m),w(mr,g),w(hr,_),w(or,y),w(sr,b),w(xr,ae),w(br,re),w(yr,ie),w(gr,ee),w(_r,te),w(vr,C),d(oe)){if(oe.length){let t=e.exposed||={};oe.forEach(e=>{Object.defineProperty(t,e,{get:()=>n[e],set:t=>n[e]=t,enumerable:!0})})}else e.exposed||={}}ne&&e.render===r&&(e.render=ne),se!=null&&(e.inheritAttrs=se),ce&&(e.components=ce),le&&(e.directives=le),C&&$n(e)}function Mr(e,t,n=r){d(e)&&(e=Br(e));for(let n in e){let r=e[n],i;i=v(r)?`default`in r?Rn(r.from||n,r.default,!0):Rn(r.from||n):Rn(r),j(i)?Object.defineProperty(t,n,{enumerable:!0,configurable:!0,get:()=>i.value,set:e=>i.value=e}):t[n]=i}}function Nr(e,t,n){mn(d(e)?e.map(e=>e.bind(t.proxy)):e.bind(t.proxy),t,n)}function Pr(e,t,n,r){let i=r.includes(`.`)?Wn(n,r):()=>n[r];if(g(e)){let n=t[e];h(n)&&Vn(i,n)}else if(h(e))Vn(i,e.bind(n));else if(v(e)){if(d(e))e.forEach(e=>Pr(e,t,n,r));else{let r=h(e.handler)?e.handler.bind(n):t[e.handler];h(r)&&Vn(i,r,e)}}}function Fr(e){let t=e.type,{mixins:n,extends:r}=t,{mixins:i,optionsCache:a,config:{optionMergeStrategies:o}}=e.appContext,s=a.get(t),c;return s?c=s:!i.length&&!n&&!r?c=t:(c={},i.length&&i.forEach(e=>Ir(c,e,o,!0)),Ir(c,t,o)),v(t)&&a.set(t,c),c}function Ir(e,t,n,r=!1){let{mixins:i,extends:a}=t;a&&Ir(e,a,n,!0),i&&i.forEach(t=>Ir(e,t,n,!0));for(let i in t)if(!(r&&i===`expose`)){let r=Lr[i]||n&&n[i];e[i]=r?r(e[i],t[i]):t[i]}return e}var Lr={data:Rr,props:Hr,emits:Hr,methods:Vr,computed:Vr,beforeCreate:B,created:B,beforeMount:B,mounted:B,beforeUpdate:B,updated:B,beforeDestroy:B,beforeUnmount:B,destroyed:B,unmounted:B,activated:B,deactivated:B,errorCaptured:B,serverPrefetch:B,components:Vr,directives:Vr,watch:Ur,provide:Rr,inject:zr};function Rr(e,t){return t?e?function(){return s(h(e)?e.call(this,this):e,h(t)?t.call(this,this):t)}:t:e}function zr(e,t){return Vr(Br(e),Br(t))}function Br(e){if(d(e)){let t={};for(let n=0;n<e.length;n++)t[e[n]]=e[n];return t}return e}function B(e,t){return e?[...new Set([].concat(e,t))]:t}function Vr(e,t){return e?s(Object.create(null),e,t):t}function Hr(e,t){return e?d(e)&&d(t)?[...new Set([...e,...t])]:s(Object.create(null),kr(e),kr(t??{})):t}function Ur(e,t){if(!e)return t;if(!t)return e;let n=s(Object.create(null),e);for(let r in t)n[r]=B(e[r],t[r]);return n}function Wr(){return{app:null,config:{isNativeTag:i,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}}var Gr=0;function Kr(e,t){return function(n,r=null){h(n)||(n=s({},n)),r!=null&&!v(r)&&(r=null);let i=Wr(),a=new WeakSet,o=[],c=!1,l=i.app={_uid:Gr++,_component:n,_props:r,_container:null,_context:i,_instance:null,version:wa,get config(){return i.config},set config(e){},use(e,...t){return a.has(e)||(e&&h(e.install)?(a.add(e),e.install(l,...t)):h(e)&&(a.add(e),e(l,...t))),l},mixin(e){return i.mixins.includes(e)||i.mixins.push(e),l},component(e,t){return t?(i.components[e]=t,l):i.components[e]},directive(e,t){return t?(i.directives[e]=t,l):i.directives[e]},mount(a,o,s){if(!c){let u=l._ceVNode||J(n,r);return u.appContext=i,s===!0?s=`svg`:s===!1&&(s=void 0),o&&t?t(u,a):e(u,a,s),c=!0,l._container=a,a.__vue_app__=l,Sa(u.component)}},onUnmount(e){o.push(e)},unmount(){c&&(mn(o,l._instance,16),e(null,l._container),delete l._container.__vue_app__)},provide(e,t){return i.provides[e]=t,l},runWithContext(e){let t=qr;qr=l;try{return e()}finally{qr=t}}};return l}}var qr=null,Jr=(e,t)=>t===`modelValue`||t===`model-value`?e.modelModifiers:e[`${t}Modifiers`]||e[`${C(t)}Modifiers`]||e[`${se(t)}Modifiers`];function Yr(e,n,...r){if(e.isUnmounted)return;let i=e.vnode.props||t,a=r,o=n.startsWith(`update:`),s=o&&Jr(i,n.slice(7));s&&(s.trim&&(a=r.map(e=>g(e)?e.trim():e)),s.number&&(a=a.map(fe)));let c,l=i[c=le(n)]||i[c=le(C(n))];!l&&o&&(l=i[c=le(se(n))]),l&&mn(l,e,6,a);let u=i[c+`Once`];if(u){if(!e.emitted)e.emitted={};else if(e.emitted[c])return;e.emitted[c]=!0,mn(u,e,6,a)}}var Xr=new WeakMap;function Zr(e,t,n=!1){let r=n?Xr:t.emitsCache,i=r.get(e);if(i!==void 0)return i;let a=e.emits,o={},c=!1;if(!h(e)){let r=e=>{let n=Zr(e,t,!0);n&&(c=!0,s(o,n))};!n&&t.mixins.length&&t.mixins.forEach(r),e.extends&&r(e.extends),e.mixins&&e.mixins.forEach(r)}return!a&&!c?(v(e)&&r.set(e,null),null):(d(a)?a.forEach(e=>o[e]=null):s(o,a),v(e)&&r.set(e,o),o)}function Qr(e,t){return!e||!a(t)?!1:(t=t.slice(2),t=t===`Once`?t:t.replace(/Once$/,``),u(e,t[0].toLowerCase()+t.slice(1))||u(e,se(t))||u(e,t))}function $r(e){let{type:t,vnode:n,proxy:r,withProxy:i,propsOptions:[a],slots:s,attrs:c,emit:l,render:u,renderCache:d,props:f,data:p,setupState:m,ctx:h,inheritAttrs:g}=e,_=Fn(e),v,y;try{if(n.shapeFlag&4){let e=i||r,t=e;v=$i(u.call(t,e,d,f,m,p,h)),y=c}else{let e=t;v=$i(e.length>1?e(f,{attrs:c,slots:s,emit:l}):e(f,null)),y=t.props?c:ti(c)}}catch(t){Vi.length=0,hn(t,e,1),v=J(zi)}let b=v;if(y&&g!==!1){let e=Object.keys(y),{shapeFlag:t}=b;e.length&&t&7&&(a&&e.some(o)&&(y=ni(y,a)),b=Qi(b,y,!1,!0))}return n.dirs&&(b=Qi(b,null,!1,!0),b.dirs=b.dirs?b.dirs.concat(n.dirs):n.dirs),n.transition&&Xn(Kn(b.type)&&Yn(b)||b,n.transition),v=b,Fn(_),v}function ei(e,t=!0){let n;for(let t=0;t<e.length;t++){let r=e[t];if(Ki(r)){if(r.type!==zi||r.children===`v-if`){if(n)return;n=r}}else return}return n}var ti=e=>{let t;for(let n in e)(n===`class`||n===`style`||a(n))&&((t||={})[n]=e[n]);return t},ni=(e,t)=>{let n={};for(let r in e)o(r)&&r.slice(9)in t||(n[r]=e[r]);return n};function ri(e,t,n){let{props:r,children:i,component:a}=e,{props:o,children:s,patchFlag:c}=t,l=a.emitsOptions;if(t.dirs||t.transition)return!0;if(n&&c>=0){if(c&1024)return!0;if(c&16)return r?ii(r,o,l):!!o;if(c&8){let e=t.dynamicProps;for(let t=0;t<e.length;t++){let n=e[t];if(ai(o,r,n)&&!Qr(l,n))return!0}}}else return(i||s)&&(!s||!s.$stable)?!0:r===o?!1:r?!o||ii(r,o,l):!!o;return!1}function ii(e,t,n){let r=Object.keys(t);if(r.length!==Object.keys(e).length)return!0;for(let i=0;i<r.length;i++){let a=r[i];if(!u(e,a)||ai(t,e,a)&&!Qr(n,a))return!0}return!1}function ai(e,t,n){let r=e[n],i=t[n];return n===`style`&&v(r)&&v(i)?!Ee(r,i):r!==i}function oi({vnode:e,parent:t,suspense:n},r){for(;t;){let n=t.subTree;if(n.suspense&&n.suspense.activeBranch===e&&(n.suspense.vnode.el=n.el=r,e=n),n===e)(e=t.vnode).el=r,t=t.parent;else break}n&&n.activeBranch===e&&(n.vnode.el=r)}var si={},ci=()=>Object.create(si),li=e=>Object.getPrototypeOf(e)===si;function ui(e,t,n,r=!1){let i={},a=ci();e.propsDefaults=Object.create(null),fi(e,t,i,a);for(let t in e.propsOptions[0])t in i||(i[t]=void 0);e.props=n?r?i:Ut(i):e.type.props?i:a,e.attrs=a}function di(e,t,n,r){let{props:i,attrs:a,vnode:{patchFlag:o}}=e,s=A(i),[c]=e.propsOptions,l=!1;if((r||o>0)&&!(o&16)){if(o&8){let n=e.vnode.dynamicProps;for(let r=0;r<n.length;r++){let o=n[r];if(Qr(e.emitsOptions,o))continue;let d=t[o];if(c){if(u(a,o))d!==a[o]&&(a[o]=d,l=!0);else{let t=C(o);i[t]=pi(c,s,t,d,e,!1)}}else d!==a[o]&&(a[o]=d,l=!0)}}}else{fi(e,t,i,a)&&(l=!0);let r;for(let a in s)t&&(u(t,a)||(r=se(a))!==a&&u(t,r))||(c?n&&(n[a]!==void 0||n[r]!==void 0)&&(i[a]=pi(c,s,a,void 0,e,!0)):delete i[a]);if(a!==s)for(let e in a)t&&u(t,e)||(delete a[e],l=!0)}l&&st(e.attrs,`set`,``)}function fi(e,n,r,i){let[a,o]=e.propsOptions,s=!1,c;if(n)for(let t in n){if(ne(t))continue;let l=n[t],d;a&&u(a,d=C(t))?!o||!o.includes(d)?r[d]=l:(c||={})[d]=l:Qr(e.emitsOptions,t)||t in i&&l===i[t]||(i[t]=l,s=!0)}if(o){let n=A(r),i=c||t;for(let t=0;t<o.length;t++){let s=o[t];r[s]=pi(a,n,s,i[s],e,!u(i,s))}}return s}function pi(e,t,n,r,i,a){let o=e[n];if(o!=null){let e=u(o,`default`);if(e&&r===void 0){let e=o.default;if(o.type!==Function&&!o.skipFactory&&h(e)){let{propsDefaults:a}=i;if(n in a)r=a[n];else{let o=da(i);r=a[n]=e.call(null,t),o()}}else r=e;i.ce&&i.ce._setProp(n,r)}o[0]&&(a&&!e?r=!1:o[1]&&(r===``||r===se(n))&&(r=!0))}return r}var mi=new WeakMap;function hi(e,r,i=!1){let a=i?mi:r.propsCache,o=a.get(e);if(o)return o;let c=e.props,l={},f=[],p=!1;if(!h(e)){let t=e=>{p=!0;let[t,n]=hi(e,r,!0);s(l,t),n&&f.push(...n)};!i&&r.mixins.length&&r.mixins.forEach(t),e.extends&&t(e.extends),e.mixins&&e.mixins.forEach(t)}if(!c&&!p)return v(e)&&a.set(e,n),n;if(d(c))for(let e=0;e<c.length;e++){let n=C(c[e]);gi(n)&&(l[n]=t)}else if(c)for(let e in c){let t=C(e);if(gi(t)){let n=c[e],r=l[t]=d(n)||h(n)?{type:n}:s({},n),i=r.type,a=!1,o=!0;if(d(i))for(let e=0;e<i.length;++e){let t=i[e],n=h(t)&&t.name;if(n===`Boolean`){a=!0;break}n===`String`&&(o=!1)}else a=h(i)&&i.name===`Boolean`;r[0]=a,r[1]=o,(a||u(r,`default`))&&f.push(t)}}let m=[l,f];return v(e)&&a.set(e,m),m}function gi(e){return e[0]!==`$`&&!ne(e)}var _i=e=>e===`_`||e===`_ctx`||e===`$stable`,vi=e=>d(e)?e.map($i):[$i(e)],yi=(e,t,n)=>{if(t._n)return t;let r=I((...e)=>vi(t(...e)),n);return r._c=!1,r},bi=(e,t,n)=>{let r=e._ctx;for(let n in e){if(_i(n))continue;let i=e[n];if(h(i))t[n]=yi(n,i,r);else if(i!=null){let e=vi(i);t[n]=()=>e}}},xi=(e,t)=>{let n=vi(t);e.slots.default=()=>n},Si=(e,t,n)=>{for(let r in t)(n||!_i(r))&&(e[r]=t[r])},Ci=(e,t,n)=>{let r=e.slots=ci();if(e.vnode.shapeFlag&32){let e=t._;e?(Si(r,t,n),n&&de(r,`_`,e,!0)):bi(t,r)}else t&&xi(e,t)},wi=(e,n,r)=>{let{vnode:i,slots:a}=e,o=!0,s=t;if(i.shapeFlag&32){let e=n._;e?r&&e===1?o=!1:Si(a,n,r):(o=!n.$stable,bi(n,a)),s=n}else n&&(xi(e,n),s={default:1});if(o)for(let e in a)!_i(e)&&s[e]==null&&delete a[e]},V=Li;function Ti(e){return Ei(e)}function Ei(e,i){let a=me();a.__VUE__=!0;let{insert:o,remove:s,patchProp:c,createElement:l,createText:u,createComment:d,setText:f,setElementText:p,parentNode:m,nextSibling:h,setScopeId:g=r,insertStaticContent:_}=e,v=(e,t,r,i=null,a=null,o=null,s=void 0,c=null,l=!!t.dynamicChildren)=>{if(e===t)return;e&&!qi(e,t)&&(i=Ce(e),ye(e,a,o,!0),e=null),t.patchFlag===-2&&(l=!1,t.dynamicChildren=null),t.dynamicChildren&&e&&e.dynamicChildren&&e.dynamicChildren.hasOnce&&(t.dynamicChildren===n&&(t.dynamicChildren=[]),t.dynamicChildren.hasOnce=!0);let{type:u,ref:d,shapeFlag:f}=t;switch(u){case Ri:y(e,t,r,i);break;case zi:b(e,t,r,i);break;case Bi:e??x(t,r,i,s);break;case H:ce(e,t,r,i,a,o,s,c,l);break;default:f&1?te(e,t,r,i,a,o,s,c,l):f&6?le(e,t,r,i,a,o,s,c,l):(f&64||f&128)&&u.process(e,t,r,i,a,o,s,c,l,Te)}d!=null&&a?nr(d,e&&e.ref,o,t||e,!t):d==null&&e&&e.ref!=null&&nr(e.ref,null,o,e,!0)},y=(e,t,n,r)=>{if(e==null)o(t.el=u(t.children),n,r);else{let n=t.el=e.el;t.children!==e.children&&f(n,t.children)}},b=(e,t,n,r)=>{e==null?o(t.el=d(t.children||``),n,r):t.el=e.el},x=(e,t,n,r)=>{[e.el,e.anchor]=_(e.children,t,n,r,e.el,e.anchor)},ee=({el:e,anchor:t},n,r)=>{let i;for(;e&&e!==t;)i=h(e),o(e,n,r),e=i;o(t,n,r)},S=({el:e,anchor:t})=>{let n;for(;e&&e!==t;)n=h(e),s(e),e=n;s(t)},te=(e,t,n,r,i,a,o,s,c)=>{if(t.type===`svg`?o=`svg`:t.type===`math`&&(o=`mathml`),e==null)re(t,n,r,i,a,o,s,c);else{let n=e.el&&e.el._isVueCE?e.el:null;try{n&&n._beginPatch(),C(e,t,i,a,o,s,c)}finally{n&&n._endPatch()}}},re=(e,t,n,r,i,a,s,u)=>{let d,f,{props:m,shapeFlag:h,transition:g,dirs:_}=e;if(d=e.el=l(e.type,a,m&&m.is,m),h&8?p(d,e.children):h&16&&ae(e.children,d,null,r,i,Di(e,a),s,u),_&&In(e,null,r,`created`),ie(d,e,e.scopeId,s,r),m){for(let e in m)e!==`value`&&!ne(e)&&c(d,e,null,m[e],a,r);`value`in m&&c(d,`value`,null,m.value,a),(f=m.onVnodeBeforeMount)&&ra(f,r,e)}_&&In(e,null,r,`beforeMount`);let v=ki(i,g);v?g.beforeEnter(d):g&&!g.persisted&&(d[Ii]=!0),o(d,t,n),((f=m&&m.onVnodeMounted)||v||_)&&V(()=>{try{f&&ra(f,r,e),v&&g.enter(d),_&&In(e,null,r,`mounted`)}finally{}},i)},ie=(e,t,n,r,i)=>{if(n&&g(e,n),r)for(let t=0;t<r.length;t++)g(e,r[t]);if(i){let n=i.subTree;if(t===n||Fi(n.type)&&(n.ssContent===t||n.ssFallback===t)){let t=i.vnode;ie(e,t,t.scopeId,t.slotScopeIds,i.parent)}}},ae=(e,t,n,r,i,a,o,s,c=0)=>{for(let l=c;l<e.length;l++){let c=e[l]=s?ea(e[l]):$i(e[l]);v(null,c,t,n,r,i,a,o,s)}},C=(e,n,r,i,a,o,s)=>{let l=n.el=e.el,{patchFlag:u,dynamicChildren:d,dirs:f}=n;u|=e.patchFlag&16;let m=e.props||t,h=n.props||t,g;if(r&&Oi(r,!1),(g=h.onVnodeBeforeUpdate)&&ra(g,r,n,e),f&&In(n,e,r,`beforeUpdate`),r&&Oi(r,!0),d&&(!e.dynamicChildren||e.dynamicChildren.length!==d.length)&&(u=0,s=!1,d=null),(m.innerHTML&&h.innerHTML==null||m.textContent&&h.textContent==null)&&p(l,``),d?oe(e.dynamicChildren,d,l,r,i,Di(n,a),o):s||he(e,n,l,null,r,i,Di(n,a),o,!1),u>0){if(u&16)se(l,m,h,r,a);else if(u&2&&m.class!==h.class&&c(l,`class`,null,h.class,a),u&4&&c(l,`style`,m.style,h.style,a),u&8){let e=n.dynamicProps;for(let t=0;t<e.length;t++){let n=e[t],i=m[n],o=h[n];(o!==i||n===`value`)&&c(l,n,i,o,a,r)}}u&1&&e.children!==n.children&&p(l,n.children)}else!s&&d==null&&se(l,m,h,r,a);((g=h.onVnodeUpdated)||f)&&V(()=>{g&&ra(g,r,n,e),f&&In(n,e,r,`updated`)},i)},oe=(e,t,n,r,i,a,o)=>{for(let s=0;s<t.length;s++){let c=e[s],l=t[s],u=c.el||Pi(c),d=u&&(c.type===H||!qi(c,l)||c.shapeFlag&198)?m(u):n;v(c,l,d,null,r,i,a,o,!0)}},se=(e,n,r,i,a)=>{if(n!==r){if(n!==t)for(let t in n)!ne(t)&&!(t in r)&&c(e,t,n[t],null,a,i);for(let t in r){if(ne(t))continue;let o=r[t],s=n[t];o!==s&&t!==`value`&&c(e,t,s,o,a,i)}`value`in r&&c(e,`value`,n.value,r.value,a)}},ce=(e,t,n,r,i,a,s,c,l)=>{let d=t.el=e?e.el:u(``),f=t.anchor=e?e.anchor:u(``),{patchFlag:p,dynamicChildren:m,slotScopeIds:h}=t;h&&(c=c?c.concat(h):h),e==null?(o(d,n,r),o(f,n,r),ae(t.children||[],n,f,i,a,s,c,l)):p>0&&p&64&&m&&e.dynamicChildren&&e.dynamicChildren.length===m.length?(oe(e.dynamicChildren,m,n,i,a,s,c),(t.key!=null||i&&t===i.subTree)&&Ai(e,t,!0)):he(e,t,n,f,i,a,s,c,l)},le=(e,t,n,r,i,a,o,s,c)=>{t.slotScopeIds=s,e==null?t.shapeFlag&512?i.ctx.activate(t,n,r,o,c):ue(t,n,r,i,a,o,c):de(e,t,c)},ue=(e,t,n,r,i,a,o)=>{let s=e.component=sa(e,r,i);if(ar(e)&&(s.ctx.renderer=Te),ha(s,!1,o),s.asyncDep){if(i&&i.registerDep(s,fe,o,a),!e.el){let r=s.subTree=J(zi);b(null,r,t,n),e.placeholder=r.el}}else fe(s,e,t,n,i,a,o)},de=(e,t,n)=>{let r=t.component=e.component;if(ri(e,t,n)){if(r.asyncDep&&!r.asyncResolved){t.el=e.el,t.placeholder=e.placeholder,pe(r,t,n);return}r.next=t,r.update()}else t.el=e.el,t.placeholder=e.placeholder,r.vnode=t},fe=(e,t,n,r,i,a,o)=>{let s=()=>{if(e.isMounted){let{next:t,bu:n,u:r,parent:s,vnode:c}=e;{let n=Mi(e);if(n){t&&(t.el=c.el,pe(e,t,o)),n.asyncDep.then(()=>{let t=()=>{e.job.flags&8||(i&&i.pendingBranch?V(t,i):l())};t.flags=48,V(t,i)});return}}let u=t,d;Oi(e,!1),t?(t.el=c.el,pe(e,t,o)):t=c,n&&w(n),(d=t.props&&t.props.onVnodeBeforeUpdate)&&ra(d,s,t,c),Oi(e,!0);let f=$r(e),p=e.subTree;e.subTree=f,v(p,f,m(p.el||Pi(p)),Ce(p),e,i,a),t.el=f.el,u===null&&oi(e,f.el),r&&V(r,i),(d=t.props&&t.props.onVnodeUpdated)&&V(()=>ra(d,s,t,c),i)}else{let o,{el:s,props:c}=t,{bm:l,m:u,parent:d,root:f,type:p}=e,m=ir(t);if(Oi(e,!1),l&&w(l),!m&&(o=c&&c.onVnodeBeforeMount)&&ra(o,d,t),Oi(e,!0),s&&De){let t=()=>{e.subTree=$r(e),De(s,e.subTree,e,i,null)};m&&p.__asyncHydrate?p.__asyncHydrate(s,e,t):t()}else{f.ce&&f.ce._hasShadowRoot()&&f.ce._injectChildStyle(p,e.parent?e.parent.type:void 0);let o=e.subTree=$r(e);v(null,o,n,r,e,i,a),t.el=o.el}if(u&&V(u,i),!m&&(o=c&&c.onVnodeMounted)){let e=t;V(()=>ra(o,d,e),i)}(t.shapeFlag&256||d&&ir(d.vnode)&&d.vnode.shapeFlag&256)&&e.a&&V(e.a,i),e.isMounted=!0,t=n=r=null}};e.scope.on();let c=e.effect=new Fe(s);e.scope.off();let l=e.update=c.run.bind(c),u=e.job=c.runIfDirty.bind(c);u.i=e,u.id=e.uid,c.scheduler=()=>Tn(u),Oi(e,!0),l()},pe=(e,t,n)=>{t.component=e;let r=e.vnode.props;e.vnode=t,e.next=null,di(e,t.props,r,n),wi(e,t.children,n),Xe(),On(e),Ze()},he=(e,t,n,r,i,a,o,s,c=!1)=>{let l=e&&e.children,u=e?e.shapeFlag:0,d=t.children,{patchFlag:f,shapeFlag:m}=t;if(f>0){if(f&128){_e(l,d,n,r,i,a,o,s,c);return}if(f&256){ge(l,d,n,r,i,a,o,s,c);return}}m&8?(u&16&&Se(l,i,a),d!==l&&p(n,d)):u&16?m&16?_e(l,d,n,r,i,a,o,s,c):Se(l,i,a,!0):(u&8&&p(n,``),m&16&&ae(d,n,r,i,a,o,s,c))},ge=(e,t,r,i,a,o,s,c,l)=>{e||=n,t||=n;let u=e.length,d=t.length,f=Math.min(u,d),p=0;for(;p<f;p++){let n=t[p]=l?ea(t[p]):$i(t[p]);v(e[p],n,r,null,a,o,s,c,l)}u>d?Se(e,a,o,!0,!1,f):ae(t,r,i,a,o,s,c,l,f)},_e=(e,t,r,i,a,o,s,c,l)=>{let u=0,d=t.length,f=e.length-1,p=d-1;for(;u<=f&&u<=p;){let n=e[u],i=t[u]=l?ea(t[u]):$i(t[u]);if(qi(n,i))v(n,i,r,null,a,o,s,c,l);else break;u++}for(;u<=f&&u<=p;){let n=e[f],i=t[p]=l?ea(t[p]):$i(t[p]);if(qi(n,i))v(n,i,r,null,a,o,s,c,l);else break;f--,p--}if(u>f){if(u<=p){let e=p+1,n=e<d?t[e].el:i;for(;u<=p;)v(null,t[u]=l?ea(t[u]):$i(t[u]),r,n,a,o,s,c,l),u++}}else if(u>p)for(;u<=f;)ye(e[u],a,o,!0),u++;else{let m=u,h=u,g=new Map;for(u=h;u<=p;u++){let e=t[u]=l?ea(t[u]):$i(t[u]);e.key!=null&&g.set(e.key,u)}let _,y=0,b=p-h+1,x=!1,ee=0,S=Array(b);for(u=0;u<b;u++)S[u]=0;for(u=m;u<=f;u++){let n=e[u];if(y>=b){ye(n,a,o,!0);continue}let i;if(n.key!=null)i=g.get(n.key);else for(_=h;_<=p;_++)if(S[_-h]===0&&qi(n,t[_])){i=_;break}i===void 0?ye(n,a,o,!0):(S[i-h]=u+1,i>=ee?ee=i:x=!0,v(n,t[i],r,null,a,o,s,c,l),y++)}let te=x?ji(S):n;for(_=te.length-1,u=b-1;u>=0;u--){let e=h+u,n=t[e],f=t[e+1],p=e+1<d?f.el||Pi(f):i;S[u]===0?v(null,n,r,p,a,o,s,c,l):x&&(_<0||u!==te[_]?ve(n,r,p,2):_--)}}},ve=(e,t,n,r,i=null)=>{let{el:a,type:c,transition:l,children:u,shapeFlag:d}=e;if(d&6)ve(e.component.subTree,t,n,r);else if(d&128)e.suspense.move(t,n,r);else if(d&64)c.move(e,t,n,Te);else if(c===H){o(a,t,n);for(let e=0;e<u.length;e++)ve(u[e],t,n,r);o(e.anchor,t,n)}else if(c===Bi)ee(e,t,n);else if(r!==2&&d&1&&l){if(r===0)l.persisted&&!a[qn]?o(a,t,n):(l.beforeEnter(a),o(a,t,n),V(()=>l.enter(a),i));else{let{leave:r,delayLeave:i,afterLeave:c}=l,u=()=>{e.ctx.isUnmounted?s(a):o(a,t,n)},d=()=>{let e=a._isLeaving||!!a[qn];a._isLeaving&&a[qn](!0),l.persisted&&!e?u():r(a,()=>{u(),c&&c()})};i?i(a,u,d):d()}}else o(a,t,n)},ye=(e,t,n,r=!1,i=!1)=>{let{type:a,props:o,ref:s,children:c,dynamicChildren:l,shapeFlag:u,patchFlag:d,dirs:f,cacheIndex:p,memo:m}=e;if((d===-2||l&&l.hasOnce)&&(i=!1),s!=null&&(Xe(),nr(s,null,n,e,!0),Ze()),p==null||e.ctx&&e.ctx!==t||(t.renderCache[p]=void 0),u&256&&t.ctx.deactivate(e))return;let h=u&1&&f,g=!ir(e),_;if(g&&(_=o&&o.onVnodeBeforeUnmount)&&ra(_,t,e),u&6)xe(e.component,n,r);else{if(u&128){e.suspense.unmount(n,r);return}h&&In(e,null,t,`beforeUnmount`),u&64?e.type.remove(e,t,n,Te,r):l&&!l.hasOnce&&(a!==H||d>0&&d&64)?Se(l,t,n,!1,!0):(a===H&&d&384||!i&&u&16)&&Se(c,t,n),r&&T(e)}let v=m!=null&&p==null;(g&&(_=o&&o.onVnodeUnmounted)||h||v)&&V(()=>{_&&ra(_,t,e),h&&In(e,null,t,`unmounted`),v&&(e.el=null)},n)},T=e=>{let{type:t,el:n,anchor:r,transition:i}=e,a=t===H;if(a&&!i){be(n,r);return}if(t===Bi){S(e),i&&!i.persisted&&i.afterLeave&&i.afterLeave();return}let o=a?Zn(e):e,c=()=>{a?m(n)&&be(n,r):s(n),i&&!i.persisted&&i.afterLeave&&i.afterLeave()};if(o&&o.shapeFlag&1&&i&&!i.persisted){let{leave:e,delayLeave:t}=i,n=o.el,r=()=>e(n,c);t?t(n,c,r):r()}else c()},be=(e,t)=>{let n;for(;e!==t;)n=h(e),s(e),e=n;s(t)},xe=(e,t,n)=>{let{bum:r,scope:i,job:a,subTree:o,um:s,m:c,a:l}=e;Ni(c),Ni(l),r&&w(r),i.stop(),a?(a.flags|=8,ye(o,e,t,n)):o&&(o.transition=e.vnode.transition,ye(o,e,t,n)),s&&V(s,t);let u=()=>{e.isUnmounted=!0};u.flags=16,V(u,t)},Se=(e,t,n,r=!1,i=!1,a=0)=>{for(let o=a;o<e.length;o++)ye(e[o],t,n,r,i)},Ce=e=>{if(e.shapeFlag&6)return Ce(e.component.subTree);if(e.shapeFlag&128)return e.suspense.next();let t=h(e.anchor||e.el),n=t&&t[Gn];return n?h(n):t},we=(e,t,n)=>{jn(()=>{e==null?t._vnode&&ye(t._vnode,null,null,!0):v(t._vnode||null,e,t,null,null,null,n),t._vnode=e},e&&t._vnode?void 0:e&&e.component?e.component.uid:oa())},Te={p:v,um:ye,m:ve,r:T,mt:ue,mc:ae,pc:he,pbc:oe,n:Ce,o:e},Ee,De;return i&&([Ee,De]=i(Te)),{render:we,hydrate:Ee,createApp:Kr(we,Ee)}}function Di({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 Oi({effect:e,job:t},n){n?(e.flags|=32,t.flags|=4):(e.flags&=-33,t.flags&=-5)}function ki(e,t){return(!e||e&&!e.pendingBranch)&&t&&!t.persisted}function Ai(e,t,n=!1){let r=e.children,i=t.children;if(d(r)&&d(i))for(let e=0;e<r.length;e++){let t=r[e],a=i[e];a.shapeFlag&1&&!a.dynamicChildren&&((a.patchFlag<=0||a.patchFlag===32)&&(a=i[e]=ea(i[e]),a.el=t.el),!n&&a.patchFlag!==-2&&Ai(t,a)),a.type===Ri&&(a.patchFlag===-1&&(a=i[e]=ea(a)),a.el=t.el),a.type===zi&&!a.el&&(a.el=t.el)}}function ji(e){let t=e.slice(),n=[0],r,i,a,o,s,c=e.length;for(r=0;r<c;r++){let c=e[r];if(c!==0){if(i=n[n.length-1],e[i]<c){t[r]=i,n.push(r);continue}for(a=0,o=n.length-1;a<o;)s=a+o>>1,e[n[s]]<c?a=s+1:o=s;c<e[n[a]]&&(a>0&&(t[r]=n[a-1]),n[a]=r)}}for(a=n.length,o=n[a-1];a-->0;)n[a]=o,o=t[o];return n}function Mi(e){let t=e.subTree.component;if(t)return t.asyncDep&&!t.asyncResolved?t:Mi(t)}function Ni(e){if(e)for(let t=0;t<e.length;t++)e[t].flags|=8}function Pi(e){if(e.placeholder)return e.placeholder;let t=e.component;if(t)return Pi(t.subTree);let n=e.suspense;return n&&n.activeBranch?Pi(n.activeBranch):null}var Fi=e=>e.__isSuspense,Ii=Symbol(`_deferredEnter`);function Li(e,t){t&&t.pendingBranch?d(e)?t.effects.push(...e):t.effects.push(e):Dn(e)}var H=Symbol.for(`v-fgt`),Ri=Symbol.for(`v-txt`),zi=Symbol.for(`v-cmt`),Bi=Symbol.for(`v-stc`),Vi=[],U=null;function W(e=!1){Vi.push(U=e?null:[])}function Hi(){Vi.pop(),U=Vi[Vi.length-1]||null}var Ui=1;function Wi(e,t=!1){Ui+=e,e<0&&U&&t&&(U.hasOnce=!0)}function Gi(e){return e.dynamicChildren=Ui>0?U||n:null,Hi(),Ui>0&&U&&U.push(e),e}function G(e,t,n,r,i,a){return Gi(q(e,t,n,r,i,a,!0))}function K(e,t,n,r,i){return Gi(J(e,t,n,r,i,!0))}function Ki(e){return e?e.__v_isVNode===!0:!1}function qi(e,t){return e.type===t.type&&e.key===t.key}var Ji=({key:e})=>e??null,Yi=({ref:e,ref_key:t,ref_for:n})=>(typeof e==`number`&&(e=``+e),e==null?null:g(e)||j(e)||h(e)?{i:F,r:e,k:t,f:!!n}:e);function q(e,t=null,n=null,r=0,i=null,a=e===H?0:1,o=!1,s=!1){let c={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&Ji(t),ref:t&&Yi(t),scopeId:Pn,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:a,patchFlag:r,dynamicProps:i,dynamicChildren:null,appContext:null,ctx:F};return s?(ta(c,n),a&128&&e.normalize(c)):n&&(c.shapeFlag|=g(n)?8:16),Ui>0&&!o&&U&&(c.patchFlag>0||a&6)&&c.patchFlag!==32&&U.push(c),c}var J=Xi;function Xi(e,t=null,n=null,r=0,i=null,a=!1){if(e&&e!==Sr||(e=zi),Ki(e)){let r=Qi(e,t,!0);return n&&ta(r,n),Ui>0&&!a&&U&&(r.shapeFlag&6?U[U.indexOf(e)]=r:U.push(r)),r.patchFlag=-2,r}if(Ca(e)&&(e=e.__vccOpts),t){t=Zi(t);let{class:e,style:n}=t;e&&!g(e)&&(t.class=T(e)),v(n)&&(Yt(n)&&!d(n)&&(n=s({},n)),t.style=he(n))}let o=g(e)?1:Fi(e)?128:Kn(e)?64:v(e)?4:h(e)?2:0;return q(e,t,n,r,i,o,a,!0)}function Zi(e){return e?Yt(e)?s({},e):li(e)?s({},e[ya]||e):e:null}function Qi(e,t,n=!1,r=!1){let{props:i,ref:a,patchFlag:o,children:s,transition:c}=e,l=t?na(i||{},t):i,u={__v_isVNode:!0,__v_skip:!0,type:e.type,props:l,key:l&&Ji(l),ref:t&&t.ref?n&&a?d(a)?a.concat(Yi(t)):[a,Yi(t)]:Yi(t):a,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:s,target:e.target,targetStart:e.targetStart,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:t&&e.type!==H?o===-1?16:o|16:o,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:c,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&Qi(e.ssContent),ssFallback:e.ssFallback&&Qi(e.ssFallback),placeholder:e.placeholder,el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce,cacheIndex:e.cacheIndex};return c&&r&&Xn(u,c.clone(u)),u}function Y(e=` `,t=0){return J(Ri,null,e,t)}function X(e=``,t=!1){return t?(W(),K(zi,null,e)):J(zi,null,e)}function $i(e){return e==null||typeof e==`boolean`?J(zi):d(e)?J(H,null,e.slice()):Ki(e)?ea(e):J(Ri,null,String(e))}function ea(e){return e.el===null&&e.patchFlag!==-1||e.memo?e:Qi(e)}function ta(e,t){let n=0,{shapeFlag:r}=e;if(t==null)t=null;else if(d(t))n=16;else if(typeof t==`object`){if(r&65){let n=t.default;n&&(n._c&&(n._d=!1),ta(e,n()),n._c&&(n._d=!0));return}{n=32;let r=t._;!r&&!li(t)?t._ctx=F:r===3&&F&&(F.slots._===1?t._=1:(t._=2,e.patchFlag|=1024))}}else if(h(t)){if(r&65){ta(e,{default:t});return}t={default:t,_ctx:F},n=32}else t=String(t),r&64?(n=16,t=[Y(t)]):n=8;e.children=t,e.shapeFlag|=n}function na(...e){let t={};for(let n=0;n<e.length;n++){let r=e[n];for(let e in r)if(e===`class`)t.class!==r.class&&(t.class=T([t.class,r.class]));else if(e===`style`)t.style=he([t.style,r.style]);else if(a(e)){let n=t[e],i=r[e];i&&n!==i&&!(d(n)&&n.includes(i))?t[e]=n?[].concat(n,i):i:i==null&&n==null&&!o(e)&&(t[e]=i)}else e!==``&&(t[e]=r[e])}return t}function ra(e,t,n,r=null){mn(e,t,7,[n,r])}var ia=Wr(),aa=0;function oa(){return aa}function sa(e,n,r){let i=e.type,a=(n?n.appContext:e.appContext)||ia,o={uid:aa++,vnode:e,type:i,parent:n,appContext:a,root:null,next:null,subTree:null,effect:null,update:null,job:null,scope:new Me(!0),render:null,proxy:null,exposed:null,exposeProxy:null,withProxy:null,provides:n?n.provides:Object.create(a.provides),ids:n?n.ids:[``,0,0],accessCache:null,renderCache:[],components:null,directives:null,propsOptions:hi(i,a),emitsOptions:Zr(i,a),emit:null,emitted:null,propsDefaults:t,inheritAttrs:i.inheritAttrs,ctx:t,data:t,props:t,attrs:t,slots:t,refs:t,setupState:t,setupContext:null,suspense:r,suspenseId:r?r.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 o.ctx={_:o},o.root=n?n.root:o,o.emit=Yr.bind(null,o),e.ce&&e.ce(o),o}var Z=null,ca=()=>Z||F,la,ua;{let e=me(),t=(t,n)=>{let r;return(r=e[t])||(r=e[t]=[]),r.push(n),e=>{r.length>1?r.forEach(t=>t(e)):r[0](e)}};la=t(`__VUE_INSTANCE_SETTERS__`,e=>Z=e),ua=t(`__VUE_SSR_SETTERS__`,e=>ma=e)}var da=e=>{let t=Z;return la(e),e.scope.on(),()=>{e.scope.off(),la(t)}},fa=()=>{Z&&Z.scope.off(),la(null)};function pa(e){return e.vnode.shapeFlag&4}var ma=!1;function ha(e,t=!1,n=!1){t&&ua(t);let{props:r,children:i}=e.vnode,a=pa(e);ui(e,r,a,t),Ci(e,i,n||t);let o=a?ga(e,t):void 0;return t&&ua(!1),o}function ga(e,t){let n=e.type;e.accessCache=Object.create(null),e.proxy=new Proxy(e.ctx,Or);let{setup:r}=n;if(r){Xe();let n=e.setupContext=r.length>1?xa(e):null,i=da(e),a=pn(r,e,0,[e.props,n]),o=y(a);if(Ze(),i(),(o||e.sp)&&!ir(e)&&$n(e),o){if(a.then(fa,fa),t)return a.then(n=>{ua(!0);try{_a(e,n,t)}finally{ua(!1)}}).catch(t=>{hn(t,e,0,void 0,!0),e.ssrRender=(e,t)=>t(`<!---->`)});e.asyncDep=a}else _a(e,a,t)}else va(e,t)}function _a(e,t,n){h(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:v(t)&&(e.setupState=rn(t)),va(e,n)}function va(e,t,n){let i=e.type;e.render||=i.render||r;{let t=da(e);Xe();try{jr(e)}finally{Ze(),t()}}}var ya=Symbol(),ba={get(e,t){return k(e,`get`,``),t===ya?e:e[t]}};function xa(e){return{attrs:new Proxy(e.attrs,ba),slots:e.slots,emit:e.emit,expose:t=>{e.exposed=t||{}}}}function Sa(e){return e.exposed?e.exposeProxy||=new Proxy(rn(Xt(e.exposed)),{get(t,n){if(n in t)return t[n];if(n in Er)return Er[n](e)},has(e,t){return t in e||t in Er}}):e.proxy}function Ca(e){return h(e)&&`__vccOpts`in e}var Q=(e,t)=>on(e,t,ma),wa=`3.5.46`,Ta=void 0,Ea=typeof window<`u`&&window.trustedTypes;if(Ea)try{Ta=Ea.createPolicy(`vue`,{createHTML:e=>e})}catch{}var Da=Ta?e=>Ta.createHTML(e):e=>e,Oa=`http://www.w3.org/2000/svg`,ka=`http://www.w3.org/1998/Math/MathML`,Aa=typeof document<`u`?document:null,ja=Aa&&Aa.createElement(`template`),Ma={insert:(e,t,n)=>{t.insertBefore(e,n||null)},remove:e=>{let t=e.parentNode;t&&t.removeChild(e)},createElement:(e,t,n,r)=>{let i=t===`svg`?Aa.createElementNS(Oa,e):t===`mathml`?Aa.createElementNS(ka,e):n?Aa.createElement(e,{is:n}):Aa.createElement(e);return e===`select`&&r&&r.multiple!=null&&i.setAttribute(`multiple`,r.multiple),i},createText:e=>Aa.createTextNode(e),createComment:e=>Aa.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>Aa.querySelector(e),setScopeId(e,t){e.setAttribute(t,``)},insertStaticContent(e,t,n,r,i,a){let o=n?n.previousSibling:t.lastChild;if(i&&(i===a||i.nextSibling))for(;t.insertBefore(i.cloneNode(!0),n),i!==a&&(i=i.nextSibling););else{ja.innerHTML=Da(r===`svg`?`<svg>${e}</svg>`:r===`mathml`?`<math>${e}</math>`:e);let i=ja.content;if(r===`svg`||r===`mathml`){let e=i.firstChild;for(;e.firstChild;)i.appendChild(e.firstChild);i.removeChild(e)}t.insertBefore(i,n)}return[o?o.nextSibling:t.firstChild,n?n.previousSibling:t.lastChild]}},Na=Symbol(`_vtc`);function Pa(e,t,n){let r=e[Na];r&&(t=(t?[t,...r]:[...r]).join(` `)),t==null?e.removeAttribute(`class`):n?e.setAttribute(`class`,t):e.className=t}var Fa=Symbol(`_vod`),Ia=Symbol(`_vsh`),La=Symbol(``),Ra=/(?:^|;)\s*display\s*:/;function za(e,t,n){let r=e.style,i=g(n),a=!1;if(n&&!i){if(t){if(g(t))for(let e of t.split(`;`)){let t=e.slice(0,e.indexOf(`:`)).trim();n[t]??Va(r,t,``)}else for(let e in t)n[e]??Va(r,e,``)}for(let i in n){i===`display`&&(a=!0);let o=n[i];o==null?Va(r,i,``):Ga(e,i,!g(t)&&t?t[i]:void 0,o)||Va(r,i,o)}}else if(i){if(t!==n){let e=r[La];e&&(n+=`;`+e),r.cssText=n,a=Ra.test(n)}}else t&&e.removeAttribute(`style`);Fa in e&&(i&&t===n||(e[Fa]=a?r.display:``),e[Ia]&&(r.display=`none`))}var Ba=/\s*!important$/;function Va(e,t,n){if(d(n))n.forEach(n=>Va(e,t,n));else if(n??=``,t.startsWith(`--`))Ba.test(n)?e.setProperty(t,n.replace(Ba,``),`important`):e.setProperty(t,n);else{let r=Wa(e,t);Ba.test(n)?e.setProperty(se(r),n.replace(Ba,``),`important`):e[r]=n}}var Ha=[`Webkit`,`Moz`,`ms`],Ua={};function Wa(e,t){let n=Ua[t];if(n)return n;let r=C(t);if(r!==`filter`&&r in e)return Ua[t]=r;r=ce(r);for(let n=0;n<Ha.length;n++){let i=Ha[n]+r;if(i in e)return Ua[t]=i}return t}function Ga(e,t,n,r){return e.tagName===`TEXTAREA`&&(t===`width`||t===`height`)&&g(r)&&n===r}var Ka=`http://www.w3.org/1999/xlink`;function qa(e,t,n,r,i,a=be(t)){r&&t.startsWith(`xlink:`)?n==null?e.removeAttributeNS(Ka,t.slice(6,t.length)):e.setAttributeNS(Ka,t,n):n==null||a&&!xe(n)?e.removeAttribute(t):e.setAttribute(t,a?``:_(n)?String(n):n)}function Ja(e,t,n,r,i){if(t===`innerHTML`||t===`textContent`){n!=null&&(e[t]=t===`innerHTML`?Da(n):n);return}let a=e.tagName;if(t===`value`&&a!==`PROGRESS`&&!a.includes(`-`)){let r=a===`OPTION`?e.getAttribute(`value`)||``:e.value,i=n==null?e.type===`checkbox`?`on`:``:String(n);r===i&&`_value`in e||(e.value=i),n??e.removeAttribute(t),e._value=n;return}let o=!1;if(n===``||n==null){let r=typeof e[t];r===`boolean`?n=xe(n):n==null&&r===`string`?(n=``,o=!0):r===`number`&&(n=0,o=!0)}try{e[t]=n}catch{}o&&e.removeAttribute(i||t)}function Ya(e,t,n,r){e.addEventListener(t,n,r)}function Xa(e,t,n,r){e.removeEventListener(t,n,r)}var Za=Symbol(`_vei`);function Qa(e,t,n,r,i=null){let a=e[Za]||(e[Za]={}),o=a[t];if(r&&o)o.value=r;else{let[n,s]=to(t);r?Ya(e,n,a[t]=ao(r,i),s):o&&(Xa(e,n,o,s),a[t]=void 0)}}var $a=/(Once|Passive|Capture)$/,eo=/^on:?(?:Once|Passive|Capture)$/;function to(e){let t,n;for(;(n=e.match($a))&&!eo.test(e);)t||={},e=e.slice(0,e.length-n[1].length),t[n[1].toLowerCase()]=!0;return[e[2]===`:`?e.slice(3):se(e.slice(2)),t]}var no=0,ro=Promise.resolve(),io=()=>no||=(ro.then(()=>no=0),Date.now());function ao(e,t){let n=e=>{if(!e._vts)e._vts=Date.now();else if(e._vts<=n.attached)return;let r=n.value;if(d(r)){let n=e.stopImmediatePropagation;e.stopImmediatePropagation=()=>{n.call(e),e._stopped=!0};let i=r.slice(),a=[e];for(let n=0;n<i.length&&!e._stopped;n++){let e=i[n];e&&mn(e,t,5,a)}}else mn(r,t,5,[e])};return n.value=e,n.attached=io(),n}var oo=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)>96&&e.charCodeAt(2)<123,so=(e,t,n,r,i,s)=>{let c=i===`svg`;t===`class`?Pa(e,r,c):t===`style`?za(e,n,r):a(t)?o(t)||Qa(e,t,n,r,s):(t[0]===`.`?(t=t.slice(1),1):t[0]===`^`?(t=t.slice(1),0):co(e,t,r,c))?(Ja(e,t,r),e.tagName.includes(`-`)||t!==`value`&&t!==`checked`&&t!==`selected`||qa(e,t,r,c,s,t!==`value`)):e._isVueCE&&(lo(e,t)||e._def.__asyncLoader&&(/[A-Z]/.test(t)||!g(r)))?Ja(e,C(t),r,s,t):(t===`true-value`?e._trueValue=r:t===`false-value`&&(e._falseValue=r),qa(e,t,r,c))};function co(e,t,n,r){if(r)return!!(t===`innerHTML`||t===`textContent`||t in e&&oo(t)&&h(n));if(t===`spellcheck`||t===`draggable`||t===`translate`||t===`autocorrect`||t===`sandbox`&&e.tagName===`IFRAME`||t===`form`||t===`list`&&e.tagName===`INPUT`||t===`type`&&e.tagName===`TEXTAREA`)return!1;if(t===`width`||t===`height`){let t=e.tagName;if(t===`IMG`||t===`VIDEO`||t===`CANVAS`||t===`SOURCE`)return!1}return oo(t)&&g(n)?!1:t in e}function lo(e,t){let n=e._def.props;if(!n)return!1;let r=C(t);return Array.isArray(n)?n.some(e=>C(e)===r):Object.keys(n).some(e=>C(e)===r)}var uo=e=>{let t=e.props[`onUpdate:modelValue`]||!1;return d(t)?e=>w(t,e):t};function fo(e){e.target.composing=!0}function po(e){let t=e.target;t.composing&&(t.composing=!1,t.dispatchEvent(new Event(`input`)))}var mo=Symbol(`_assign`),ho=Symbol(`_initialValue`);function go(e,t,n){return t&&(e=e.trim()),n&&(e=fe(e)),e}var _o={created(e,{modifiers:{lazy:t,trim:n,number:r}},i){e.parentNode&&(e.type===`text`?e[ho]=e.defaultValue.replace(/[\r\n]/g,``):e.type===`textarea`&&(e[ho]=e.defaultValue.replace(/\r\n?/g,`
2
- `))),e[mo]=uo(i);let a=r||i.props&&i.props.type===`number`;Ya(e,t?`change`:`input`,t=>{t.target.composing||e[mo](go(e.value,n,a))}),(n||a)&&Ya(e,`change`,()=>{e.value=go(e.value,n,a)}),t||(Ya(e,`compositionstart`,fo),Ya(e,`compositionend`,po),Ya(e,`change`,po))},mounted(e,{value:t,modifiers:{trim:n,number:r}}){let i=t??``,a=e[ho];delete e[ho],a!==void 0&&(e.type===`text`||e.type===`textarea`)&&e.value!==a?e[mo](go(e.value,n,r)):e.value=i},beforeUpdate(e,{value:t,oldValue:n,modifiers:{lazy:r,trim:i,number:a}},o){if(e[mo]=uo(o),e.composing)return;let s=(a||e.type===`number`)&&!/^0\d/.test(e.value)?fe(e.value):e.value,c=t??``;if(s===c)return;let l=e.getRootNode();(l instanceof Document||l instanceof ShadowRoot)&&l.activeElement===e&&e.type!==`range`&&(r&&t===n||i&&e.value.trim()===c)||(e.value=c)}},vo={created(e,{value:t},n){e.checked=Ee(t,n.props.value),e[mo]=uo(n),Ya(e,`change`,()=>{e[mo](So(e))})},beforeUpdate(e,{value:t,oldValue:n},r){e[mo]=uo(r),t!==n&&(e.checked=Ee(t,r.props.value))}},yo={deep:!0,created(e,{value:t,modifiers:{number:n}},r){e._modelValue=t,Ya(e,`change`,()=>{let t=Array.prototype.filter.call(e.options,e=>e.selected).map(e=>n?fe(So(e)):So(e)),r=e.multiple,i=r?p(e._modelValue)?new Set(t):t:t[0],a=e._pendingValue=[r,r?d(i)?t.slice():t:i];try{e[mo](i)}finally{Cn(()=>{e._pendingValue===a&&(e._pendingValue=void 0)})}}),e[mo]=uo(r)},mounted(e,{value:t,modifiers:{number:n}}){xo(e,t,n)},beforeUpdate(e,{value:t},n){e._modelValue=t,e[mo]=uo(n)},updated(e,{value:t,modifiers:{number:n}}){let r=e._pendingValue;e._pendingValue=void 0,r&&r[0]===e.multiple&&bo(t,r[1],r[0])||xo(e,t,n)}};function bo(e,t,n){if(!n||d(e))return Ee(e,t);if(p(e)){if(e.size!==t.length)return!1;for(let n of t)if(!e.has(n))return!1;return!0}return!1}function xo(e,t,n=!1){let r=e.multiple,i=d(t);if(!r||i||p(t)){for(let a=0,o=e.options.length;a<o;a++){let o=e.options[a],s=So(o);if(r){if(i){let e=typeof s;o.selected=e===`string`||e===`number`?t.some(e=>String(e)===String(s)):De(t,s)>-1}else o.selected=t.has(s)||n&&typeof s==`string`&&t.has(fe(s))}else if(Ee(So(o),t)){e.selectedIndex!==a&&(e.selectedIndex=a);return}}!r&&e.selectedIndex!==-1&&(e.selectedIndex=-1)}}function So(e){return`_value`in e?e._value:e.value}var Co=[`ctrl`,`shift`,`alt`,`meta`],wo={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)=>Co.some(n=>e[`${n}Key`]&&!t.includes(n))},To=(e,t)=>{if(!e)return e;let n=e._withMods||={},r=t.join(`.`);return n[r]||(n[r]=((n,...r)=>{for(let e=0;e<t.length;e++){let r=wo[t[e]];if(r&&r(n,t))return}return e(n,...r)}))},Eo=s({patchProp:so},Ma),Do;function Oo(){return Do||=Ti(Eo)}var ko=((...e)=>{let t=Oo().createApp(...e),{mount:n}=t;return t.mount=e=>{let r=jo(e);if(!r)return;let i=t._component;h(i)||i.render||i.template||(i.template=r.innerHTML),r.nodeType===1&&(r.textContent=``);let a=n(r,!1,Ao(r));return r instanceof Element&&(r.removeAttribute(`v-cloak`),r.setAttribute(`data-v-app`,``)),a},t});function Ao(e){if(e instanceof SVGElement)return`svg`;if(typeof MathMLElement==`function`&&e instanceof MathMLElement)return`mathml`}function jo(e){return g(e)?document.querySelector(e):e}var Mo=`296 62 430 108`,No=`300 62 124 110`,Po=4.5,Fo=[`M336.89 111.56C337.43 111.4 339.26 111.03 340.5 110.5C341.74 109.97 343.04 108.72 345.17 108C347.29 107.28 351.42 105.97 354.67 105.67C357.92 105.37 363.86 105.65 366.83 106C369.81 106.35 372.7 107.42 374.5 108C376.3 108.58 377.61 109.56 378.83 109.83C380.06 110.11 381.87 110.21 382.67 109.83C383.47 109.46 383.87 108.21 384.17 107.33C384.47 106.46 384.64 104.72 384.67 104C384.69 103.28 385.33 103.22 384.33 102.5C383.33 101.78 379.93 100.34 378 99.17C376.07 97.99 373.1 95.97 371.5 94.67C369.9 93.37 368.68 92.3 367.33 90.5C365.98 88.7 363.4 84.77 362.5 82.67C361.6 80.57 361.46 77.5 361.33 76.5C361.21 75.5 361.09 76.08 361.67 76C362.24 75.92 363.79 75.72 365.17 76C366.54 76.28 368.93 76.98 370.83 77.83C372.73 78.68 375.86 80.32 377.83 81.67C379.81 83.02 382.35 85.21 384 86.83C385.65 88.46 387.58 90.85 388.83 92.5C390.08 94.15 390.43 96.71 392.33 97.83C394.23 98.96 399.38 99.22 401.5 100C403.63 100.78 405.18 101.95 406.5 103C407.82 104.05 409.23 105.58 410.33 107C411.43 108.42 413.33 110.95 413.83 112.5C414.33 114.05 414.09 116.13 413.67 117.33C413.24 118.53 411.93 119.78 411 120.5C410.07 121.22 408.73 121.87 407.5 122.17C406.27 122.47 404.31 122.28 402.83 122.5C401.36 122.72 399.81 122.4 397.67 123.67C395.52 124.93 389.89 129.84 388.52 130.93`,`M388.52 130.93C389.84 131.32 394.31 131.96 397.33 133.5C400.35 135.04 406.67 139.69 408.67 141.17C410.67 142.64 410.32 142.58 410.67 143.33C411.02 144.08 411.02 145.44 411 146.17C410.98 146.89 411 147.67 410.5 148.17C410 148.67 408.54 149.4 407.67 149.5C406.79 149.6 407.19 150.08 404.67 148.83C402.14 147.58 394.86 142.99 390.83 141.17C386.81 139.34 381.46 137.54 377.83 136.67C374.21 135.79 369.24 135.46 366.67 135.33C364.09 135.21 361.57 135.76 360.67 135.83`,`M331 120.88C330.77 122.84 330.2 131.76 329.5 134C328.8 136.24 327.63 135.48 326.33 135.83C325.03 136.18 321.88 136.16 320.83 136.33C319.78 136.51 320.86 134.7 319.33 137C317.81 139.3 312.07 149.12 310.67 151.67C309.27 154.22 310.05 153.32 310 154C309.95 154.68 310.08 155.59 310.33 156.17C310.58 156.74 311.19 157.51 311.67 157.83C312.14 158.16 312.85 158.31 313.5 158.33C314.15 158.36 315.43 158.22 316 158C316.57 157.78 316.58 157.86 317.33 156.83C318.08 155.81 319.82 152.74 321 151.17C322.18 149.59 323.29 147.16 325.17 146.33C327.04 145.51 331.23 146.02 333.5 145.67C335.77 145.32 338.76 144.53 340.33 144C341.91 143.47 342.95 142.82 344 142.17C345.05 141.52 346.18 140.94 347.33 139.67C348.48 138.39 350.72 135.57 351.67 133.67C352.62 131.77 353.34 128.4 353.67 127C353.99 125.6 353.81 124.73 353.83 124.33`,`M336.89 111.56C336.46 111.1 334.91 109.08 334 108.5C333.09 107.92 331.81 107.72 330.83 107.67C329.86 107.62 328.45 107.67 327.5 108.17C326.55 108.67 325.05 110.03 324.5 111C323.95 111.97 323.81 113.67 323.83 114.67C323.86 115.67 324.24 116.89 324.67 117.67C325.09 118.44 325.72 119.35 326.67 119.83C327.62 120.31 330.35 120.72 331 120.88`,`M336.89 111.56C336.73 112.02 336.52 113.42 335.83 114.67C335.15 115.91 333.06 118.9 332.33 119.83C331.61 120.76 331.2 120.72 331 120.88`],Io=`M454.72 144L447.01 144L447.01 94.02L454.72 94.02L454.72 115.44L475.72 115.44L475.72 94.02L483.43 94.02L483.43 144L475.72 144L475.72 122.44L454.72 122.44L454.72 144M510.56 145Q505.27 145 501.17 142.82Q497.06 140.64 494.71 136.57Q492.35 132.50 492.35 126.94L492.35 125.86Q492.35 120.30 494.71 116.26Q497.06 112.23 501.17 110.01Q505.27 107.80 510.56 107.80Q515.84 107.80 519.98 110.01Q524.12 112.23 526.48 116.26Q528.84 120.30 528.84 125.86L528.84 126.94Q528.84 132.50 526.48 136.57Q524.12 140.64 519.98 142.82Q515.84 145 510.56 145M510.56 138.43Q515.41 138.43 518.45 135.32Q521.48 132.22 521.48 126.72L521.48 126.08Q521.48 120.58 518.48 117.47Q515.48 114.37 510.56 114.37Q505.77 114.37 502.74 117.47Q499.71 120.58 499.71 126.08L499.71 126.72Q499.71 132.22 502.74 135.32Q505.77 138.43 510.56 138.43M545.33 158.28L537.98 158.28L537.98 108.80L545.19 108.80L545.19 113.87L546.33 113.87Q547.69 111.51 550.44 109.66Q553.18 107.80 558.32 107.80Q562.75 107.80 566.43 109.94Q570.11 112.08 572.35 116.12Q574.60 120.15 574.60 125.86L574.60 126.94Q574.60 132.65 572.39 136.68Q570.18 140.72 566.46 142.86Q562.75 145 558.32 145Q554.90 145 552.54 144.14Q550.19 143.29 548.76 141.97Q547.33 140.64 546.47 139.22L545.33 139.22L545.33 158.28M556.18 138.57Q561.04 138.57 564.11 135.50Q567.18 132.43 567.18 126.72L567.18 126.08Q567.18 120.44 564.07 117.37Q560.97 114.30 556.18 114.30Q551.47 114.30 548.36 117.37Q545.26 120.44 545.26 126.08L545.26 126.72Q545.26 132.43 548.36 135.50Q551.47 138.57 556.18 138.57M599.52 144L587.17 144L581.17 108.80L588.53 108.80L592.95 139.07L594.10 139.07L600.24 108.80L612.16 108.80L618.23 139.07L619.37 139.07L623.80 108.80L631.15 108.80L625.16 144L612.80 144L606.73 113.80L605.59 113.80L599.52 144M647.22 144L639.86 144L639.86 108.80L647.22 108.80L647.22 144M643.58 104.02Q641.43 104.02 639.97 102.62Q638.51 101.23 638.51 99.02Q638.51 96.80 639.97 95.41Q641.43 94.02 643.58 94.02Q645.79 94.02 647.22 95.41Q648.65 96.80 648.65 99.02Q648.65 101.23 647.22 102.62Q645.79 104.02 643.58 104.02M665.50 144L658.14 144L658.14 108.80L665.35 108.80L665.35 112.94L666.50 112.94Q667.35 110.73 669.24 109.69Q671.14 108.66 673.92 108.66L678.13 108.66L678.13 115.30L673.64 115.30Q670.07 115.30 667.78 117.26Q665.50 119.22 665.50 123.29L665.50 144M700.63 145Q695.27 145 691.27 142.75Q687.27 140.50 685.02 136.40Q682.77 132.29 682.77 126.86L682.77 126.01Q682.77 120.51 684.99 116.40Q687.20 112.30 691.16 110.05Q695.13 107.80 700.34 107.80Q705.41 107.80 709.23 110.05Q713.05 112.30 715.19 116.30Q717.33 120.30 717.33 125.65L717.33 128.43L690.27 128.43Q690.41 133.08 693.38 135.82Q696.34 138.57 700.77 138.57Q704.91 138.57 707.02 136.72Q709.12 134.86 710.26 132.43L716.33 135.57Q715.33 137.57 713.44 139.79Q711.55 142 708.48 143.50Q705.41 145 700.63 145M690.34 122.79L709.84 122.79Q709.55 118.80 706.98 116.55Q704.41 114.30 700.27 114.30Q696.13 114.30 693.52 116.55Q690.91 118.80 690.34 122.79`,Lo=[`id`],Ro=[`id`],zo=[`fill`],Bo=[`mask`],Vo={class:`hwx-wire`},Ho=[`cx`],Uo={class:`hwx-hop`},Wo=[`stroke-width`],Go=[`d`],Ko=R({__name:`HopLoader`,props:{active:{type:Boolean}},setup(e){let t=Array.from({length:9},(e,t)=>-128+t*64),n=Qn(),r=Qn();return(i,a)=>(W(),G(`svg`,{viewBox:`0 0 256 150`,"aria-hidden":`true`,focusable:`false`,class:T([`block h-auto`,e.active?`hwx-run`:void 0])},[q(`defs`,null,[q(`linearGradient`,{id:N(r),x1:`0`,x2:`1`,y1:`0`,y2:`0`},[...a[0]||=[q(`stop`,{offset:`0`,"stop-color":`#000`},null,-1),q(`stop`,{offset:`.22`,"stop-color":`#fff`},null,-1),q(`stop`,{offset:`.78`,"stop-color":`#fff`},null,-1),q(`stop`,{offset:`1`,"stop-color":`#000`},null,-1)]],8,Lo),q(`mask`,{id:N(n),maskUnits:`userSpaceOnUse`,x:`0`,y:`0`,width:`256`,height:`150`},[q(`rect`,{width:`256`,height:`150`,fill:`url(#${N(r)})`},null,8,zo)],8,Ro)]),q(`g`,{mask:`url(#${N(n)})`},[q(`g`,Vo,[a[1]||=q(`line`,{class:`stroke-muted`,x1:`-192`,y1:`122`,x2:`448`,y2:`122`,"stroke-width":`1.5`},null,-1),(W(!0),G(H,null,z(N(t),e=>(W(),G(`circle`,{key:e,class:`fill-ground stroke-muted`,cx:e,cy:`122`,r:`3.4`,"stroke-width":`1.5`},null,8,Ho))),128))]),a[2]||=q(`circle`,{class:`hwx-lit1 fill-hop-green`,cx:`128`,cy:`122`,r:`4.6`},null,-1),a[3]||=q(`circle`,{class:`hwx-lit2 fill-hop-green`,cx:`64`,cy:`122`,r:`4.6`},null,-1),a[4]||=q(`circle`,{class:`hwx-lit3 fill-hop-green`,cx:`0`,cy:`122`,r:`4.6`},null,-1)],8,Bo),a[5]||=q(`circle`,{class:`hwx-ring stroke-green-text`,cx:`128`,cy:`122`,r:`5`,fill:`none`,"stroke-width":`1.5`},null,-1),q(`g`,Uo,[q(`g`,{transform:`translate(-132.64 10.80) scale(0.72)`,class:`stroke-mark`,fill:`none`,"stroke-width":N(Po),"stroke-linecap":`round`,"stroke-linejoin":`round`},[(W(!0),G(H,null,z(N(Fo),(e,t)=>(W(),G(`path`,{key:t,d:e},null,8,Go))),128))],8,Wo)])],2))}}),qo={class:`flex h-full flex-col items-center justify-center gap-4 p-8 text-center`,role:`status`},Jo={class:`text-sm text-muted`},Yo=R({__name:`ConnectingState`,props:{connecting:{type:Boolean}},setup(e){return(t,n)=>(W(),G(`div`,qo,[J(Ko,{class:`w-44`,active:e.connecting},null,8,[`active`]),q(`p`,Jo,E(e.connecting?`Connecting to the tunnel`:`Not connected to the tunnel`),1)]))}}),Xo={connecting:`Connecting`,live:`Live`,reconnecting:`Reconnecting`,closed:`Disconnected`};function Zo(e,t){return e?`closed`:t?`reconnecting`:`connecting`}function Qo(e){return e===`connecting`||e===`reconnecting`}function $o(){let e=M(!1),t;async function n(n){try{await navigator.clipboard.writeText(n)}catch{return}e.value=!0,clearTimeout(t),t=setTimeout(()=>{e.value=!1},1500)}return gr(()=>clearTimeout(t)),{copied:e,copy:n}}var es=[`aria-label`],ts={"aria-live":`polite`},ns=R({__name:`CopyButton`,props:{text:{},label:{}},setup(e){let{copied:t,copy:n}=$o();return(r,i)=>(W(),G(`button`,{type:`button`,class:`shrink-0 cursor-pointer rounded-sm px-1.5 py-0.5 text-xs font-medium text-tag-fg transition-colors duration-150 ease-out hover:bg-ink/8 hover:text-ink`,"aria-label":e.label,onClick:i[0]||=t=>N(n)(e.text)},[q(`span`,ts,E(N(t)?`Copied`:`Copy`),1)],8,es))}}),rs={class:`flex h-full items-center justify-center overflow-y-auto p-8`},is={class:`w-full max-w-2xl`},as={key:0,class:`mt-2 text-sm text-muted`},os={class:`mt-4 flex items-start gap-2 rounded-md border border-hairline bg-well p-3`},ss={class:`min-w-0 flex-1 text-xs leading-5 break-all text-ink`},cs={class:`mt-4 text-sm text-muted`},ls={class:`font-mono text-xs text-ink`},us={class:`font-mono text-xs text-ink`},ds={key:2,class:`mt-2 text-sm text-muted`},fs=R({__name:`EmptyState`,props:{status:{},stream:{}},setup(e){let t=e,n=Q(()=>t.status?.services.find(e=>e.entryUrl!==null)??null),r=Q(()=>n.value===null?null:`curl -X POST ${n.value.entryUrl}/hello -H 'content-type: application/json' -d '{"hello":"hopwire"}'`);return(t,i)=>(W(),G(`div`,rs,[q(`div`,is,[J(Ko,{class:`mb-6 w-44`,active:N(Qo)(e.stream)},null,8,[`active`]),i[5]||=q(`h2`,{class:`text-subheading`},`No requests yet`,-1),e.status?.watching?(W(),G(`p`,as,` This inspector follows a shared traffic log. Requests show up here as soon as your teammate's tunnel receives them. `)):n.value&&r.value?(W(),G(H,{key:1},[i[4]||=q(`p`,{class:`mt-2 text-sm text-muted`},` Send a request to the entry point and it appears here right away, no reload needed: `,-1),q(`div`,os,[q(`code`,ss,[i[0]||=q(`span`,{class:`text-muted select-none`},`$ `,-1),Y(E(r.value),1)]),J(ns,{text:r.value,label:`Copy curl command`},null,8,[`text`])]),q(`p`,cs,[i[1]||=Y(` Everything sent to `,-1),q(`span`,ls,E(n.value.entryUrl),1),i[2]||=Y(` is forwarded to `,-1),q(`span`,us,E(n.value.target),1),i[3]||=Y(` and recorded in the traffic log. Point your webhook sender or client at the entry point instead of the service. `,-1)])],64)):(W(),G(`p`,ds,`Waiting for the tunnel.`))])]))}});function ps(e){return e.response.status===101}var ms=class extends Error{status;code;constructor(e,t,n){super(n),this.status=e,this.code=t}},hs=`api/`;async function gs(e,t){let n;try{n=await fetch(e,t)}catch{throw new ms(0,`unreachable`,`The tunnel does not answer. Is it still running?`)}if(!n.ok){let e=await n.json().catch(()=>null);throw new ms(n.status,typeof e?.error==`string`?e.error:`unknown`,typeof e?.message==`string`?e.message:`The inspector answered ${n.status}.`)}return await n.json()}function _s(){return gs(`${hs}status`)}function vs(e){let t=new URLSearchParams({origin:e.origin,limit:String(e.limit)});return e.before!==void 0&&t.set(`before`,String(e.before)),gs(`${hs}exchanges?${t.toString()}`)}async function ys(e,t){let n=[],r=null;for(;;){let i=new URLSearchParams({origin:e});r!==null&&i.set(`after`,String(r));let a=await gs(`${hs}ws-messages/${encodeURIComponent(t)}?${i.toString()}`);n.push(...a.blocks);let o=a.blocks.at(-1);if(!a.more||o===void 0)return n;r=o.seq}}function bs(e,t){let n=new URLSearchParams({origin:e.origin,index:String(e.index)});return gs(`${hs}replay/${encodeURIComponent(e.exchange.id)}?${n.toString()}`,{method:`POST`,...t===void 0?{}:{headers:{"content-type":`application/json`},body:JSON.stringify(t)}})}function xs(e){return e>=200&&e<300?`success`:e>=300&&e<400?`info`:e>=400&&e<500?`warning`:e>=500&&e<600?`danger`:`neutral`}var Ss={success:`bg-ok-bg text-ok-fg`,info:`bg-info-bg text-info-fg`,warning:`bg-warn-bg text-warn-fg`,danger:`bg-err-bg text-err-fg`,neutral:`bg-tag-bg text-tag-fg`},Cs={local:`local`,replay:`replay`,p2p_peer:`peer`,public_edge:`public`};function ws(e){return Cs[e]}function Ts(e){return e<1e3?`${e} ms`:`${(e/1e3).toFixed(e<1e4?2:1)} s`}function Es(e){return e<1024?`${e} B`:e<1048576?`${(e/1024).toFixed(1)} kB`:`${(e/1048576).toFixed(1)} MB`}function Ds(e,t){return t?`Binary body; the log keeps its first ${Es(e)}. It is not shown.`:`Binary body of ${Es(e)}. It is not shown, but it is replayed as captured.`}function Os(e){let t=new Date(e),n=e=>String(e).padStart(2,`0`);return`${n(t.getHours())}:${n(t.getMinutes())}:${n(t.getSeconds())}`}function ks(e){return e.length<=20?e:`${e.slice(0,10)}...${e.slice(-6)}`}function As(e){let t=atob(e),n=new Uint8Array(t.length);for(let e=0;e<t.length;e++)n[e]=t.charCodeAt(e);return n}function js(e){let t=``,n=32768;for(let r=0;r<e.length;r+=n)t+=String.fromCharCode(...e.subarray(r,r+n));return btoa(t)}function Ms(e){return js(new TextEncoder().encode(e))}function Ns(e,t){let n=new TextDecoder(`utf-8`,{fatal:!0});for(let r=0;r<=(t?3:0)&&r<e.length;r++)try{let t=n.decode(e.subarray(0,e.length-r));return t.includes(`\0`)?null:t}catch{}return null}function Ps(e){let t=e.trim();if(t===``)return null;try{return JSON.stringify(JSON.parse(t),null,2)}catch{return null}}function Fs(e,t=!1){if(e===``)return{kind:`empty`};let n=As(e),r=Ns(n,t);if(r===null)return{kind:`binary`,bytes:n.length};let i=Ps(r);return i!==null&&/^\s*[[{]/.test(r)?{kind:`json`,text:r,formatted:i,bytes:n.length}:{kind:`text`,text:r,bytes:n.length}}function Is(e,t){return`${e}:${t}`}function Ls(e,t){let n=new Map;for(let r of[...e,...t])n.set(r.seq,r);return[...n.values()].sort((e,t)=>e.seq-t.seq)}function Rs(e){return{messages:e.flatMap(e=>e.messages).map((e,t)=>({...e,position:t})),close:e.find(e=>e.close!==void 0)?.close??null}}function zs(e){if(!e.binary){let t=Fs(e.dataBase64,e.truncated);if(t.kind===`json`)return{kind:`json`,text:t.text,formatted:t.formatted};if(t.kind===`text`)return{kind:`text`,text:t.text};if(t.kind===`empty`)return{kind:`text`,text:``}}let t=As(e.dataBase64);return{kind:`binary`,hex:Array.from(t.subarray(0,256),e=>e.toString(16).padStart(2,`0`)).join(` `),more:t.length>256}}function Bs(e,t){let n=t.text.trim().toLowerCase();return e.filter(e=>{if(t.direction!==``&&e.direction!==t.direction)return!1;if(n===``)return!0;let r=zs(e);return r.kind!==`binary`&&r.text.toLowerCase().includes(n)})}function Vs(e){switch(e){case`client`:return`the client`;case`service`:return`the service`;case`hopwire`:return`Hopwire`}return e}function Hs(e){return e.some(e=>e.direction===`in`&&e.truncated)?`A client message was captured only in part. Use Edit & Replay to replace or remove it.`:null}var Us=0;function Ws(e=``){return Us+=1,{key:Us,binary:!1,text:e,dataBase64:``,length:0,truncated:!1}}function Gs(e,t,n){return{path:e,headers:t.map(([e,t])=>({name:e,value:t})),messages:n.filter(e=>e.direction===`in`).map(e=>{Us+=1;let t=e.binary?null:zs(e),n=t!==null&&t.kind!==`binary`;return{key:Us,binary:!n,text:n?t.text:``,dataBase64:e.dataBase64,atMs:e.atMs,length:e.length,truncated:e.truncated}}),timing:`recorded`}}var Ks=/^[!#$%&'*+\-.^_`|~0-9A-Za-z]+$/;function qs(e){if(!/^\/\S*$/.test(e.path))return`The path must start with / and must not contain spaces.`;for(let t of e.headers)if(t.name.trim()!==``||t.value.trim()!==``){if(!Ks.test(t.name.trim()))return`"${t.name}" is not a valid header name.`;if(/[\r\n]/.test(t.value))return`The value of ${t.name.trim()} must be a single line.`}return e.messages.some(e=>e.binary&&e.truncated)?`A binary message was captured only in part and cannot be sent. Remove it to replay the rest.`:null}function Js(e){let t=e.messages.map(e=>({binary:e.binary,dataBase64:e.binary?e.dataBase64:Ms(e.text),...e.atMs===void 0?{}:{atMs:e.atMs}}));return{path:e.path,headers:e.headers.filter(e=>e.name.trim()!==``).map(e=>[e.name.trim(),e.value.trim()]),messages:t,timing:e.timing}}var Ys=[`GET`,`POST`,`PUT`,`PATCH`,`DELETE`,`HEAD`,`OPTIONS`],Xs=/^[!#$%&'*+\-.^_`|~0-9A-Za-z]+$/;function Zs(e){let{request:t}=e,n=Fs(t.bodyBase64,t.bodyTruncated);return{method:t.method.toUpperCase(),path:t.path,headers:t.headers.map(([e,t])=>({name:e,value:t})),body:n.kind===`json`||n.kind===`text`?n.text:``,bodyEditable:n.kind!==`binary`}}function Qs(e,t){if(!Xs.test(e.method.trim()))return`Enter a method such as GET or POST.`;if(!/^\/\S*$/.test(e.path))return`The path must start with / and must not contain spaces.`;for(let t of e.headers)if(t.name.trim()!==``||t.value.trim()!==``){if(!Xs.test(t.name.trim()))return`"${t.name}" is not a valid header name.`;if(/[\r\n]/.test(t.value))return`The value of ${t.name.trim()} must be a single line.`}return!e.bodyEditable&&t.request.bodyTruncated?`The stored body is binary and was truncated, so this request cannot be replayed.`:null}function $s(e){let t=e.headers.filter(e=>e.name.trim()!==``).map(e=>[e.name.trim(),e.value.trim()]);return{method:e.method.trim().toUpperCase(),path:e.path,headers:t,...e.bodyEditable?{bodyBase64:Ms(e.body)}:{}}}function ec(e,t){return e===null?`The inspector is not connected to the tunnel.`:e.watching?e.replayTarget===null?`Replay is off because this watch has no replay target. Start hopwire watch with --replay-target <url>.`:null:e.services.some(e=>e.name===t.serviceName)?null:`The service "${t.serviceName}" is not part of this tunnel, so there is nothing to replay to.`}function tc(e,t,n=[]){let r=ec(e,t);if(r!==null)return{replay:r,editAndReplay:r};if(ps(t))return{replay:Hs(n),editAndReplay:null};let{request:i}=t;if(!i.bodyTruncated)return{replay:null,editAndReplay:null};if(Fs(i.bodyBase64,!0).kind===`binary`){let e=`The stored body is binary and was truncated, so this request cannot be replayed.`;return{replay:e,editAndReplay:e}}return{replay:`The stored body was truncated. Use Edit & Replay to supply the body.`,editAndReplay:null}}function nc(e,t){return e===null?null:e.watching?e.replayTarget:e.services.find(e=>e.name===t.serviceName)?.target??null}function rc(e){return e.replayTarget===null?e.watching?{text:`none: start hopwire watch with --replay-target <url>`,missing:!0}:e.services.length>1?{text:`the local target of each service`,missing:!1}:{text:`none`,missing:!0}:{text:e.replayTarget,missing:!1}}var ic={class:`space-y-6`},ac={key:0,class:`mt-2 text-sm text-muted`},oc={key:1,class:`mt-2 w-full table-fixed border-collapse text-left font-mono text-xs`},sc={scope:`row`,class:`w-2/5 py-1.5 pr-3 font-normal break-words text-muted`},cc={class:`py-1.5 break-all text-ink`},lc={class:`flex items-center gap-3`},uc={key:0,class:`text-xs text-muted`},dc={key:0,class:`mt-2 rounded-sm bg-warn-bg px-3 py-2 text-sm text-warn-fg`,role:`note`},fc={key:1,class:`mt-2 text-sm text-muted`},pc={key:2,class:`mt-2 text-sm text-muted`},mc={key:3,class:`mt-2 max-h-[60vh] overflow-auto rounded-sm border border-hairline bg-surface p-3 font-mono text-xs leading-5 break-words whitespace-pre-wrap text-ink`},hc=R({__name:`MessageView`,props:{headers:{},bodyBase64:{},bodyTruncated:{type:Boolean}},setup(e){let t=e,n=Q(()=>Fs(t.bodyBase64,t.bodyTruncated)),r=Q(()=>n.value.kind===`json`?n.value.formatted:n.value.kind===`text`?n.value.text:null),i=Q(()=>{switch(n.value.kind){case`empty`:return``;case`json`:return`JSON, ${Es(n.value.bytes)}`;case`text`:return`Text, ${Es(n.value.bytes)}`;case`binary`:return`Binary, ${Es(n.value.bytes)}`}return``});return(t,a)=>(W(),G(`div`,ic,[q(`section`,null,[a[1]||=q(`h3`,{class:`text-xs font-medium tracking-wider text-muted uppercase`},`Headers`,-1),e.headers.length===0?(W(),G(`p`,ac,`No headers.`)):(W(),G(`table`,oc,[a[0]||=q(`thead`,{class:`sr-only`},[q(`tr`,null,[q(`th`,{scope:`col`},`Name`),q(`th`,{scope:`col`},`Value`)])],-1),q(`tbody`,null,[(W(!0),G(H,null,z(e.headers,(e,t)=>(W(),G(`tr`,{key:t,class:`border-b border-hairline align-top`},[q(`th`,sc,E(e[0]),1),q(`td`,cc,E(e[1]),1)]))),128))])]))]),q(`section`,null,[q(`div`,lc,[a[2]||=q(`h3`,{class:`text-xs font-medium tracking-wider text-muted uppercase`},`Body`,-1),i.value?(W(),G(`span`,uc,E(i.value),1)):X(``,!0),r.value===null?X(``,!0):(W(),K(ns,{key:1,class:`ml-auto`,text:r.value,label:`Copy body`},null,8,[`text`]))]),e.bodyTruncated?(W(),G(`p`,dc,` Truncated: the log keeps only the first `+E(N(Es)(n.value.kind===`empty`?0:n.value.bytes))+` of this body. The full body was forwarded. `,1)):X(``,!0),n.value.kind===`empty`?(W(),G(`p`,fc,`No body.`)):n.value.kind===`binary`?(W(),G(`p`,pc,E(N(Ds)(n.value.bytes,e.bodyTruncated)),1)):(W(),G(`pre`,mc,E(r.value),1))])]))}}),gc={class:`inline-flex shrink-0 rounded-sm bg-tag-bg px-1.5 py-0.5 font-mono text-xs font-medium text-tag-fg`},_c=R({__name:`MethodBadge`,props:{method:{}},setup(e){return(t,n)=>(W(),G(`span`,gc,E(e.method),1))}}),vc=[`viewBox`],yc=[`stroke-width`],bc=[`d`],xc=R({__name:`MarkLoader`,setup(e){return(e,t)=>(W(),G(`svg`,{viewBox:N(No),"aria-hidden":`true`,focusable:`false`,class:`block w-auto shrink-0`},[q(`g`,{class:`stroke-current`,fill:`none`,"stroke-width":N(Po),"stroke-linecap":`round`,"stroke-linejoin":`round`},[(W(!0),G(H,null,z(N(Fo),(e,t)=>(W(),G(`path`,{key:t,d:e,pathLength:`1`,class:T(`hwl hwl-${t+1}`)},null,10,bc))),128))],8,yc)],8,vc))}}),Sc=[`type`,`disabled`,`aria-busy`],$=R({__name:`UiButton`,props:{variant:{default:`secondary`},type:{default:`button`},disabled:{type:Boolean,default:!1},loading:{type:Boolean,default:!1}},setup(e){let t={primary:`border border-transparent bg-hop-green text-on-green hover:bg-ink hover:text-ground disabled:hover:bg-hop-green disabled:hover:text-on-green`,secondary:`border border-line-strong text-ink hover:border-ink disabled:hover:border-line-strong`,quiet:`border border-transparent text-muted hover:bg-ink/8 hover:text-ink disabled:hover:bg-transparent disabled:hover:text-muted`};return(n,r)=>(W(),G(`button`,{type:e.type,disabled:e.disabled||e.loading,"aria-busy":e.loading?`true`:void 0,class:T([`inline-flex shrink-0 cursor-pointer items-center justify-center gap-1.5 rounded-md px-3 py-1.5 text-sm font-medium transition-colors duration-150 ease-out disabled:cursor-not-allowed disabled:opacity-60`,t[e.variant]])},[e.loading?(W(),K(xc,{key:0,class:`h-4`})):X(``,!0),Cr(n.$slots,`default`)],10,Sc))}}),Cc={class:`flex gap-3`},wc={class:`w-32 shrink-0`},Tc=[`value`],Ec={class:`min-w-0 flex-1`},Dc={class:`mt-1.5 space-y-1.5`},Oc=[`onUpdate:modelValue`,`aria-label`],kc=[`onUpdate:modelValue`,`aria-label`],Ac={class:`mt-2 flex items-center gap-3`},jc={class:`flex items-center gap-3`},Mc={key:0,class:`mt-1.5 rounded-sm bg-warn-bg px-3 py-2 text-sm text-warn-fg`,role:`note`},Nc={key:2,class:`mt-1.5 text-sm text-muted`},Pc={class:`sticky bottom-0 -mx-4 space-y-3 border-t border-hairline bg-ground px-4 py-3`},Fc={key:0,class:`rounded-sm bg-err-bg px-3 py-2 text-sm text-err-fg`,role:`alert`},Ic={class:`flex items-center gap-3`},Lc={key:0,class:`truncate text-xs text-muted`},Rc={class:`font-mono`},zc=`w-full rounded-sm border border-line-strong bg-well px-2.5 py-1.5 font-mono text-xs text-ink placeholder:text-muted`,Bc=R({__name:`ReplayEditor`,props:{exchange:{},target:{},sending:{type:Boolean},error:{}},emits:[`send`,`cancel`],setup(e,{emit:t}){let n=e,r=t,i=Ht(Zs(n.exchange)),a=M(null),o=Q(()=>{let e=n.exchange.request.method.toUpperCase();return Ys.includes(e)?[...Ys]:[...Ys,e]}),s=Q(()=>i.bodyEditable&&Ps(i.body)!==null);function c(){i.body=Ps(i.body)??i.body}function l(){i.headers.push({name:``,value:``})}function u(e){i.headers.splice(e,1)}function d(){a.value=Qs(i,n.exchange),a.value===null&&r(`send`,$s(i))}return(t,n)=>(W(),G(`form`,{class:`space-y-6 px-4 pt-4`,"aria-label":`Edit and replay`,novalidate:``,onSubmit:To(d,[`prevent`])},[q(`div`,Cc,[q(`div`,wc,[n[4]||=q(`label`,{class:`text-xs font-medium tracking-wider text-muted uppercase`,for:`replay-method`},` Method `,-1),L(q(`select`,{id:`replay-method`,"onUpdate:modelValue":n[0]||=e=>i.method=e,class:T([`mt-1.5`,zc])},[(W(!0),G(H,null,z(o.value,e=>(W(),G(`option`,{key:e,value:e},E(e),9,Tc))),128))],512),[[yo,i.method]])]),q(`div`,Ec,[n[5]||=q(`label`,{class:`text-xs font-medium tracking-wider text-muted uppercase`,for:`replay-path`},`Path`,-1),L(q(`input`,{id:`replay-path`,"onUpdate:modelValue":n[1]||=e=>i.path=e,type:`text`,autocomplete:`off`,spellcheck:`false`,class:T([`mt-1.5`,zc])},null,512),[[_o,i.path]])])]),q(`fieldset`,null,[n[9]||=q(`legend`,{class:`text-xs font-medium tracking-wider text-muted uppercase`},`Headers`,-1),q(`ul`,Dc,[(W(!0),G(H,null,z(i.headers,(e,t)=>(W(),G(`li`,{key:t,class:`flex gap-1.5`},[L(q(`input`,{"onUpdate:modelValue":t=>e.name=t,type:`text`,autocomplete:`off`,spellcheck:`false`,placeholder:`Name`,"aria-label":`Header ${t+1} name`,class:T([`basis-2/5`,zc])},null,8,Oc),[[_o,e.name]]),L(q(`input`,{"onUpdate:modelValue":t=>e.value=t,type:`text`,autocomplete:`off`,spellcheck:`false`,placeholder:`Value`,"aria-label":`Header ${t+1} value`,class:T([`basis-3/5`,zc])},null,8,kc),[[_o,e.value]]),J($,{variant:`quiet`,"aria-label":`Remove header ${e.name||t+1}`,onClick:e=>u(t)},{default:I(()=>[...n[6]||=[Y(` Remove `,-1)]]),_:1},8,[`aria-label`,`onClick`])]))),128))]),q(`div`,Ac,[J($,{onClick:l},{default:I(()=>[...n[7]||=[Y(`Add header`,-1)]]),_:1}),n[8]||=q(`span`,{class:`text-xs text-muted`},`Content-Length is set to match the body.`,-1)])]),q(`div`,null,[q(`div`,jc,[n[11]||=q(`label`,{class:`text-xs font-medium tracking-wider text-muted uppercase`,for:`replay-body`},`Body`,-1),s.value?(W(),K($,{key:0,class:`ml-auto`,variant:`quiet`,onClick:c},{default:I(()=>[...n[10]||=[Y(`Format JSON`,-1)]]),_:1})):X(``,!0)]),e.exchange.request.bodyTruncated&&i.bodyEditable?(W(),G(`p`,Mc,` The log holds only the first part of this body. What you send is exactly the text below. `)):X(``,!0),i.bodyEditable?L((W(),G(`textarea`,{key:1,id:`replay-body`,"onUpdate:modelValue":n[2]||=e=>i.body=e,rows:`12`,spellcheck:`false`,class:T([`mt-1.5 leading-5`,zc])},null,512)),[[_o,i.body]]):(W(),G(`p`,Nc,` The body is binary and cannot be edited here. It is sent as captured. `))]),q(`div`,Pc,[a.value||e.error?(W(),G(`p`,Fc,E(a.value??e.error),1)):X(``,!0),q(`div`,Ic,[J($,{type:`submit`,variant:`primary`,loading:e.sending},{default:I(()=>[Y(E(e.sending?`Sending`:`Send replay`),1)]),_:1},8,[`loading`]),J($,{disabled:e.sending,onClick:n[3]||=e=>r(`cancel`)},{default:I(()=>[...n[12]||=[Y(`Cancel`,-1)]]),_:1},8,[`disabled`]),e.target?(W(),G(`span`,Lc,[n[13]||=Y(` Goes to `,-1),q(`span`,Rc,E(e.target),1)])):X(``,!0)])])],32))}}),Vc=R({__name:`StatusBadge`,props:{status:{}},setup(e){let t=e,n=Q(()=>Ss[xs(t.status)]);return(t,r)=>(W(),G(`span`,{class:T([`inline-flex shrink-0 rounded-sm px-1.5 py-0.5 font-mono text-xs font-medium tabular-nums`,n.value])},E(e.status),3))}}),Hc={class:`space-y-3`,"aria-label":`WebSocket messages`},Uc={class:`flex gap-2`},Wc=[`value`],Gc={key:0,class:`rounded-sm bg-err-bg px-3 py-2 text-sm text-err-fg`,role:`alert`},Kc={key:1,class:`text-sm text-muted`},qc={key:2,class:`text-sm text-muted`},Jc={key:3,class:`text-sm text-muted`},Yc={class:`space-y-2`,"aria-live":`polite`},Xc=[`aria-label`],Zc={class:`flex items-center gap-3 text-xs text-muted`},Qc={class:`tabular-nums`},$c={class:`tabular-nums`},el={key:0,class:`mt-2 rounded-sm bg-warn-bg px-3 py-2 text-sm text-warn-fg`,role:`note`},tl={class:`mt-2 max-h-80 overflow-auto font-mono text-xs leading-5 break-words whitespace-pre-wrap text-ink`},nl={key:4,class:`space-y-1 rounded-sm border border-hairline px-3 py-2 text-sm text-muted`,"aria-label":`Close of the WebSocket`},rl={key:0,class:`text-warn-fg`},il={key:5,class:`text-xs text-muted`},al=R({__name:`WsMessages`,props:{blocks:{},failure:{}},setup(e){let t=e,n=M(``),r=M(``),i=Q(()=>Rs(t.blocks??[])),a=Q(()=>Bs(i.value.messages,{text:n.value,direction:r.value}).map(e=>({message:e,view:zs(e)}))),o=Q(()=>n.value.trim()!==``||r.value!==``),s=Q(()=>{let e=i.value.close;if(e===null)return``;let t=e.reason===``?``:` and reason "${e.reason}"`;return`Closed by ${Vs(e.by)} with code ${e.code}${t}.`}),c=[{value:``,label:`Both directions`},{value:`in`,label:`Client to service`},{value:`out`,label:`Service to client`}];return(t,l)=>(W(),G(`section`,Hc,[q(`div`,Uc,[l[2]||=q(`label`,{class:`sr-only`,for:`ws-filter`},`Filter messages`,-1),L(q(`input`,{id:`ws-filter`,"onUpdate:modelValue":l[0]||=e=>n.value=e,type:`search`,placeholder:`Filter by text`,autocomplete:`off`,spellcheck:`false`,class:`min-w-0 flex-1 rounded-sm border border-line-strong bg-well px-2.5 py-1.5 text-sm text-ink placeholder:text-muted`},null,512),[[_o,n.value]]),l[3]||=q(`label`,{class:`sr-only`,for:`ws-direction`},`Filter by direction`,-1),L(q(`select`,{id:`ws-direction`,"onUpdate:modelValue":l[1]||=e=>r.value=e,class:`rounded-sm border border-line-strong bg-well px-2 py-1.5 text-sm text-ink`},[(W(),G(H,null,z(c,e=>q(`option`,{key:e.value,value:e.value},E(e.label),9,Wc)),64))],512),[[yo,r.value]])]),e.failure?(W(),G(`p`,Gc,E(e.failure),1)):e.blocks===null?(W(),G(`p`,Kc,`Loading messages.`)):i.value.messages.length===0&&i.value.close===null?(W(),G(`p`,qc,` No messages yet. New ones appear here as they pass. `)):a.value.length===0&&o.value?(W(),G(`p`,Jc,`No message matches the filter.`)):X(``,!0),q(`ol`,Yc,[(W(!0),G(H,null,z(a.value,({message:e,view:t})=>(W(),G(`li`,{key:e.position,class:`rounded-sm border border-hairline bg-surface p-3`,"aria-label":`Message ${e.position+1}, ${e.direction===`in`?`client to service`:`service to client`}`},[q(`div`,Zc,[q(`span`,{class:T([`font-mono font-medium`,e.direction===`in`?`text-cyan-text`:`text-green-text`]),"aria-hidden":`true`},E(e.direction===`in`?`Client → service`:`Service → client`),3),q(`span`,Qc,`+`+E(e.atMs)+` ms`,1),q(`span`,$c,E(N(Es)(e.length)),1),q(`span`,null,E(t.kind===`json`?`JSON`:t.kind===`text`?`Text`:`Binary`),1),t.kind===`binary`?(W(),K(ns,{key:0,class:`ml-auto`,text:e.dataBase64,label:`Copy message as Base64`},null,8,[`text`])):(W(),K(ns,{key:1,class:`ml-auto`,text:t.kind===`json`?t.formatted:t.text,label:`Copy message`},null,8,[`text`]))]),e.truncated?(W(),G(`p`,el,` Truncated: the log keeps the first `+E(N(Es)(65536))+` of this message of `+E(N(Es)(e.length))+`. The full message was carried. `,1)):X(``,!0),q(`pre`,tl,E(t.kind===`json`?t.formatted:t.kind===`text`?t.text:`${t.hex}${t.more?` ...`:``}`),1)],8,Xc))),128))]),i.value.close?(W(),G(`div`,nl,[q(`p`,null,E(s.value),1),i.value.close.omittedMessages>0?(W(),G(`p`,rl,E(i.value.close.omittedMessages)+` `+E(i.value.close.omittedMessages===1?`message was`:`messages were`)+` not captured: the log keeps up to 2 MB or 10,000 messages per WebSocket. Every message was carried in full. `,1)):X(``,!0)])):e.blocks===null?X(``,!0):(W(),G(`p`,il,`Open. New messages appear here as they pass.`))]))}}),ol={class:`mt-1.5 space-y-1.5`},sl=[`onUpdate:modelValue`,`aria-label`],cl=[`onUpdate:modelValue`,`aria-label`],ll={class:`mt-2 flex items-center gap-3`},ul={key:0,class:`mt-1.5 text-sm text-muted`},dl={class:`mt-1.5 space-y-2`},fl={class:`flex items-center gap-2 text-xs text-muted`},pl={class:`font-medium text-ink`},ml={key:0,class:`tabular-nums`},hl={key:1},gl={key:0,class:`mt-2 rounded-sm bg-warn-bg px-3 py-2 text-sm text-warn-fg`,role:`note`},_l={key:1,class:`mt-2 text-sm text-muted`},vl=[`onUpdate:modelValue`,`aria-label`],yl={class:`mt-1.5 space-y-1.5 text-sm text-ink`},bl={class:`flex items-center gap-2`},xl={class:`flex items-center gap-2`},Sl={class:`sticky bottom-0 -mx-4 space-y-3 border-t border-hairline bg-ground px-4 py-3`},Cl={key:0,class:`rounded-sm bg-err-bg px-3 py-2 text-sm text-err-fg`,role:`alert`},wl={class:`flex items-center gap-3`},Tl={key:0,class:`truncate text-xs text-muted`},El={class:`font-mono`},Dl=`w-full rounded-sm border border-line-strong bg-well px-2.5 py-1.5 font-mono text-xs text-ink placeholder:text-muted`,Ol=`text-xs font-medium tracking-wider text-muted uppercase`,kl=R({__name:`WsReplayEditor`,props:{exchange:{},messages:{},target:{},sending:{type:Boolean},error:{}},emits:[`send`,`cancel`],setup(e,{emit:t}){let n=e,r=t,i=Ht(Gs(n.exchange.request.path,n.exchange.request.headers,n.messages)),a=M(null);function o(){i.headers.push({name:``,value:``})}function s(e){i.headers.splice(e,1)}function c(){i.messages.push(Ws())}function l(e){i.messages.splice(e,1)}function u(e,t){let[n]=i.messages.splice(e,1);n!==void 0&&i.messages.splice(e+t,0,n)}function d(){a.value=qs(i),a.value===null&&r(`send`,Js(i))}return(t,n)=>(W(),G(`form`,{class:`space-y-6 px-4 pt-4`,"aria-label":`Edit and replay the WebSocket`,novalidate:``,onSubmit:To(d,[`prevent`])},[q(`div`,null,[q(`label`,{class:T(Ol),for:`ws-replay-path`},`Path`),L(q(`input`,{id:`ws-replay-path`,"onUpdate:modelValue":n[0]||=e=>i.path=e,type:`text`,autocomplete:`off`,spellcheck:`false`,class:T([`mt-1.5`,Dl])},null,512),[[_o,i.path]])]),q(`fieldset`,null,[q(`legend`,{class:T(Ol)},`Headers`),q(`ul`,ol,[(W(!0),G(H,null,z(i.headers,(e,t)=>(W(),G(`li`,{key:t,class:`flex gap-1.5`},[L(q(`input`,{"onUpdate:modelValue":t=>e.name=t,type:`text`,autocomplete:`off`,spellcheck:`false`,placeholder:`Name`,"aria-label":`Header ${t+1} name`,class:T([`basis-2/5`,Dl])},null,8,sl),[[_o,e.name]]),L(q(`input`,{"onUpdate:modelValue":t=>e.value=t,type:`text`,autocomplete:`off`,spellcheck:`false`,placeholder:`Value`,"aria-label":`Header ${t+1} value`,class:T([`basis-3/5`,Dl])},null,8,cl),[[_o,e.value]]),J($,{variant:`quiet`,"aria-label":`Remove header ${e.name||t+1}`,onClick:e=>s(t)},{default:I(()=>[...n[4]||=[Y(` Remove `,-1)]]),_:1},8,[`aria-label`,`onClick`])]))),128))]),q(`div`,ll,[J($,{onClick:o},{default:I(()=>[...n[5]||=[Y(`Add header`,-1)]]),_:1}),n[6]||=q(`span`,{class:`text-xs text-muted`},`The handshake headers of the WebSocket are made anew.`,-1)])]),q(`fieldset`,null,[q(`legend`,{class:T(Ol)},`Messages from the client`),i.messages.length===0?(W(),G(`p`,ul,` No messages. The WebSocket opens, waits 5 s for the service and closes. `)):X(``,!0),q(`ol`,dl,[(W(!0),G(H,null,z(i.messages,(e,t)=>(W(),G(`li`,{key:e.key,class:`rounded-sm border border-hairline bg-surface p-3`},[q(`div`,fl,[q(`span`,pl,E(t+1),1),q(`span`,null,E(e.binary?`Binary`:`Text`),1),e.atMs===void 0?(W(),G(`span`,hl,`Added`)):(W(),G(`span`,ml,`+`+E(e.atMs)+` ms`,1)),J($,{class:`ml-auto`,variant:`quiet`,disabled:t===0,"aria-label":`Move message ${t+1} up`,onClick:e=>u(t,-1)},{default:I(()=>[...n[7]||=[Y(` Up `,-1)]]),_:1},8,[`disabled`,`aria-label`,`onClick`]),J($,{variant:`quiet`,disabled:t===i.messages.length-1,"aria-label":`Move message ${t+1} down`,onClick:e=>u(t,1)},{default:I(()=>[...n[8]||=[Y(` Down `,-1)]]),_:1},8,[`disabled`,`aria-label`,`onClick`]),J($,{variant:`quiet`,"aria-label":`Remove message ${t+1}`,onClick:e=>l(t)},{default:I(()=>[...n[9]||=[Y(` Remove `,-1)]]),_:1},8,[`aria-label`,`onClick`])]),e.truncated?(W(),G(`p`,gl,[e.binary?(W(),G(H,{key:0},[Y(` Captured only in part (`+E(N(Es)(e.length))+` in full), so it cannot be sent. Remove it to replay the rest. `,1)],64)):(W(),G(H,{key:1},[Y(` The log holds only the first part of this message. What you send is exactly the text below. `)],64))])):X(``,!0),e.binary&&!e.truncated?(W(),G(`p`,_l,` Binary, `+E(N(Es)(e.length))+`. It cannot be edited here and is sent as captured. `,1)):e.binary?X(``,!0):L((W(),G(`textarea`,{key:2,"onUpdate:modelValue":t=>e.text=t,rows:`3`,spellcheck:`false`,class:T([`mt-2 leading-5`,Dl]),"aria-label":`Text of message ${t+1}`},null,8,vl)),[[_o,e.text]])]))),128))]),J($,{class:`mt-2`,onClick:c},{default:I(()=>[...n[10]||=[Y(`Add text message`,-1)]]),_:1})]),q(`fieldset`,null,[q(`legend`,{class:T(Ol)},`Timing`),q(`div`,yl,[q(`label`,bl,[L(q(`input`,{"onUpdate:modelValue":n[1]||=e=>i.timing=e,type:`radio`,name:`ws-timing`,value:`recorded`},null,512),[[vo,i.timing]]),n[11]||=Y(` As recorded: the gaps between the messages, each at most 5 s `,-1)]),q(`label`,xl,[L(q(`input`,{"onUpdate:modelValue":n[2]||=e=>i.timing=e,type:`radio`,name:`ws-timing`,value:`fast`},null,512),[[vo,i.timing]]),n[12]||=Y(` Fast: one message after the other `,-1)])]),n[13]||=q(`p`,{class:`mt-1.5 text-xs text-muted`},` After the last message the WebSocket stays open 5 s for the answers, then it is closed with 1000. `,-1)]),q(`div`,Sl,[a.value||e.error?(W(),G(`p`,Cl,E(a.value??e.error),1)):X(``,!0),q(`div`,wl,[J($,{type:`submit`,variant:`primary`,loading:e.sending},{default:I(()=>[Y(E(e.sending?`Sending`:`Send replay`),1)]),_:1},8,[`loading`]),J($,{disabled:e.sending,onClick:n[3]||=e=>r(`cancel`)},{default:I(()=>[...n[14]||=[Y(`Cancel`,-1)]]),_:1},8,[`disabled`]),e.target?(W(),G(`span`,Tl,[n[15]||=Y(` Goes to `,-1),q(`span`,El,E(e.target),1)])):X(``,!0)])])],32))}}),Al={class:`flex h-full min-h-0 flex-col`,"aria-label":`Request details`},jl={class:`border-b border-hairline p-4`},Ml={class:`flex items-start gap-2`},Nl={class:`min-w-0 flex-1 font-mono text-sm leading-5 font-normal break-all text-ink`},Pl={class:`mt-2 flex flex-wrap gap-x-4 gap-y-1 text-xs text-muted`},Fl={class:`flex gap-1`},Il={class:`text-tag-fg tabular-nums`},Ll={class:`flex gap-1`},Rl={class:`text-tag-fg tabular-nums`},zl={class:`flex gap-1`},Bl={class:`text-tag-fg`},Vl={class:`flex gap-1`},Hl={class:`text-tag-fg`},Ul={key:0,class:`flex gap-1`},Wl={key:1,class:`flex gap-1`},Gl={key:1,class:`font-mono text-tag-fg`},Kl={key:0,class:`mt-3 flex flex-wrap items-center gap-2`},ql={key:0,class:`truncate text-xs text-muted`},Jl={class:`font-mono`},Yl={key:1,class:`mt-2 text-sm text-warn-fg`,role:`note`},Xl={key:2,class:`mt-2 rounded-sm bg-err-bg px-3 py-2 text-sm text-err-fg`,role:`alert`},Zl={key:0,class:`min-h-0 flex-1 overflow-y-auto`},Ql={class:`flex gap-1 border-b border-hairline px-4`,role:`tablist`,"aria-label":`Message`},$l=[`id`,`aria-selected`,`onClick`],eu=[`aria-labelledby`],tu=R({__name:`ExchangeDetail`,props:{record:{},status:{},originalLoaded:{type:Boolean},replay:{},wsBlocks:{default:null},wsFailure:{default:null}},emits:[`select`,`load-messages`],setup(e,{emit:t}){let n=e,r=t,i=M(`request`),a=M(!1),o=M(!1),s=M(null),c=Q(()=>n.record.exchange),l=Q(()=>ps(c.value)),u=Q(()=>l.value?[`request`,`response`,`messages`]:[`request`,`response`]),d=Q(()=>Rs(n.wsBlocks??[]).messages),f=Q(()=>nc(n.status,c.value)),p=Q(()=>{let e=tc(n.status,c.value,d.value);if(l.value&&n.wsBlocks===null&&e.replay===null){let t=`The messages of this WebSocket are still loading.`;return{replay:t,editAndReplay:e.editAndReplay??t}}return e}),m=Q(()=>p.value.replay);Vn(()=>[c.value.id,n.record.origin],()=>{a.value=!1,s.value=null,u.value.includes(i.value)||(i.value=`request`),l.value&&r(`load-messages`,n.record)},{immediate:!0});async function h(e){o.value=!0,s.value=null;try{let t=await n.replay(n.record,e);a.value=!1,i.value=l.value&&ps(t)?`messages`:`response`,r(`select`,t.id)}catch(e){s.value=e instanceof ms?e.message:`The replay could not be sent.`}finally{o.value=!1}}function g(){s.value=null,a.value=!0}return(t,n)=>(W(),G(`article`,Al,[q(`header`,jl,[q(`div`,Ml,[J(_c,{method:c.value.request.method},null,8,[`method`]),q(`h2`,Nl,E(c.value.request.path),1),J(Vc,{status:c.value.response.status},null,8,[`status`])]),q(`dl`,Pl,[q(`div`,Fl,[n[4]||=q(`dt`,null,`Time`,-1),q(`dd`,Il,E(N(Os)(c.value.timestamp)),1)]),q(`div`,Ll,[n[5]||=q(`dt`,null,`Duration`,-1),q(`dd`,Rl,E(N(Ts)(c.value.response.durationMs)),1)]),q(`div`,zl,[n[6]||=q(`dt`,null,`Source`,-1),q(`dd`,Bl,E(N(ws)(c.value.source)),1)]),q(`div`,Vl,[n[7]||=q(`dt`,null,`Service`,-1),q(`dd`,Hl,E(c.value.serviceName),1)]),e.record.origin===`remote`?(W(),G(`div`,Ul,[...n[8]||=[q(`dt`,null,`Origin`,-1),q(`dd`,{class:`text-tag-fg`},`remote log`,-1)]])):X(``,!0),c.value.replayOf?(W(),G(`div`,Wl,[n[9]||=q(`dt`,null,`Replay of`,-1),q(`dd`,null,[e.originalLoaded?(W(),G(`button`,{key:0,type:`button`,class:`cursor-pointer rounded-sm font-mono text-ink underline decoration-line-strong underline-offset-2 transition-colors duration-150 ease-out hover:decoration-ink`,onClick:n[0]||=e=>r(`select`,c.value.replayOf)},E(c.value.replayOf.slice(0,8)),1)):(W(),G(`span`,Gl,E(c.value.replayOf.slice(0,8)),1))])])):X(``,!0)]),a.value?X(``,!0):(W(),G(`div`,Kl,[J($,{variant:`primary`,loading:o.value,disabled:m.value!==null,onClick:n[1]||=e=>h()},{default:I(()=>[Y(E(o.value?`Sending`:`Replay`),1)]),_:1},8,[`loading`,`disabled`]),J($,{disabled:o.value||p.value.editAndReplay!==null,onClick:g},{default:I(()=>[...n[10]||=[Y(` Edit & Replay `,-1)]]),_:1},8,[`disabled`]),f.value&&m.value===null?(W(),G(`span`,ql,[n[11]||=Y(` Goes to `,-1),q(`span`,Jl,E(f.value),1)])):X(``,!0)])),!a.value&&m.value?(W(),G(`p`,Yl,E(m.value),1)):X(``,!0),!a.value&&s.value?(W(),G(`p`,Xl,E(s.value),1)):X(``,!0)]),a.value?(W(),G(`div`,Zl,[l.value?(W(),K(kl,{key:`ws-${c.value.id}`,exchange:c.value,messages:d.value,target:f.value,sending:o.value,error:s.value,onSend:h,onCancel:n[2]||=e=>a.value=!1},null,8,[`exchange`,`messages`,`target`,`sending`,`error`])):(W(),K(Bc,{key:c.value.id,exchange:c.value,target:f.value,sending:o.value,error:s.value,onSend:h,onCancel:n[3]||=e=>a.value=!1},null,8,[`exchange`,`target`,`sending`,`error`]))])):(W(),G(H,{key:1},[q(`div`,Ql,[(W(!0),G(H,null,z(u.value,e=>(W(),G(`button`,{id:`tab-${e}`,key:e,type:`button`,role:`tab`,"aria-selected":i.value===e,"aria-controls":`message-panel`,class:T([`-mb-px cursor-pointer border-b-2 px-3 py-2 text-sm font-medium capitalize transition-colors duration-150 ease-out focus-visible:-outline-offset-2`,i.value===e?`border-ink text-ink`:`border-transparent text-muted hover:text-ink`]),onClick:t=>i.value=e},E(e),11,$l))),128))]),q(`div`,{id:`message-panel`,class:`min-h-0 flex-1 overflow-y-auto p-4`,role:`tabpanel`,"aria-labelledby":`tab-${i.value}`},[i.value===`request`?(W(),K(hc,{key:0,headers:c.value.request.headers,"body-base64":c.value.request.bodyBase64,"body-truncated":c.value.request.bodyTruncated},null,8,[`headers`,`body-base64`,`body-truncated`])):i.value===`messages`?(W(),K(al,{key:1,blocks:e.wsBlocks,failure:e.wsFailure},null,8,[`blocks`,`failure`])):(W(),K(hc,{key:2,headers:c.value.response.headers,"body-base64":c.value.response.bodyBase64,"body-truncated":c.value.response.bodyTruncated},null,8,[`headers`,`body-base64`,`body-truncated`]))],8,eu)],64))]))}});function nu(e){return`${e.origin}:${e.index}`}function ru(e,t){let n=new Map;for(let t of e)n.set(nu(t),t);for(let e of t)n.set(nu(e),e);return[...n.values()].sort((e,t)=>t.exchange.timestamp-e.exchange.timestamp||t.index-e.index)}function iu(e,t){let n=t.text.toLowerCase().split(/\s+/).filter(Boolean);return e.filter(({exchange:e})=>{if(t.service!==``&&e.serviceName!==t.service)return!1;let r=`${e.request.method} ${e.request.path} ${e.response.status} ${e.serviceName} ${e.source}${ps(e)?` ws`:``}`.toLowerCase();return n.every(e=>r.includes(e))})}function au(e,t){return[...new Set([...t,...e.map(e=>e.exchange.serviceName)])].sort()}function ou(e){return e?[`remote`,`own`]:[`own`]}function su(e,t){return e.reduce((e,n)=>n.origin===t&&(e===null||n.index<e)?n.index:e,null)}function cu(e){let t=[];for(let n of[`remote`,`own`]){let r=su(e,n);r!==null&&r>0&&t.push({origin:n,before:r})}return t}var lu={class:`flex h-full min-h-0 flex-col`},uu={class:`flex gap-2 border-b border-hairline p-2`},du=[`value`],fu={key:0,class:`p-4 text-sm text-muted`},pu={class:`min-h-0 flex-1 overflow-y-auto`,"aria-label":`Requests, newest first`},mu=[`aria-current`,`onClick`],hu={class:`flex items-center gap-2`},gu=[`title`],_u={class:`mt-1 flex items-center gap-2 text-xs text-muted`},vu={class:`tabular-nums`},yu={class:`tabular-nums`},bu={key:0,class:`rounded-sm bg-tag-bg px-1.5 py-px font-medium text-tag-fg`,title:`WebSocket handshake; its messages are in the Messages tab`},xu={key:1,class:`rounded-sm bg-info-bg px-1.5 py-px font-medium text-info-fg`},Su={key:2,class:`truncate`},Cu={key:0,class:`p-2 text-center`},wu=R({__name:`ExchangeList`,props:{records:{},services:{},selectedKey:{},hasOlder:{type:Boolean},loadingOlder:{type:Boolean}},emits:[`select`,`load-older`],setup(e,{emit:t}){let n=e,r=t,i=M(``),a=M(``),o=Q(()=>n.services.length>1),s=Q(()=>iu(n.records,{text:i.value,service:a.value})),c=Q(()=>i.value.trim()!==``||a.value!==``);return(t,n)=>(W(),G(`div`,lu,[q(`div`,uu,[n[5]||=q(`label`,{class:`sr-only`,for:`traffic-filter`},`Filter requests`,-1),L(q(`input`,{id:`traffic-filter`,"onUpdate:modelValue":n[0]||=e=>i.value=e,type:`search`,placeholder:`Filter by method, path or status`,autocomplete:`off`,spellcheck:`false`,class:`min-w-0 flex-1 rounded-sm border border-line-strong bg-well px-2.5 py-1.5 text-sm text-ink placeholder:text-muted`},null,512),[[_o,i.value]]),o.value?(W(),G(H,{key:0},[n[4]||=q(`label`,{class:`sr-only`,for:`traffic-service`},`Filter by service`,-1),L(q(`select`,{id:`traffic-service`,"onUpdate:modelValue":n[1]||=e=>a.value=e,class:`rounded-sm border border-line-strong bg-well px-2 py-1.5 text-sm text-ink`},[n[3]||=q(`option`,{value:``},`All services`,-1),(W(!0),G(H,null,z(e.services,e=>(W(),G(`option`,{key:e,value:e},E(e),9,du))),128))],512),[[yo,a.value]])],64)):X(``,!0)]),s.value.length===0?(W(),G(`p`,fu,E(c.value?`No request matches the filter.`:`No requests yet.`),1)):X(``,!0),q(`ul`,pu,[(W(!0),G(H,null,z(s.value,t=>(W(),G(`li`,{key:N(nu)(t)},[q(`button`,{type:`button`,class:T([`block w-full cursor-pointer border-b border-l-2 border-b-hairline px-3 py-2 text-left transition-colors duration-150 ease-out focus-visible:-outline-offset-2`,N(nu)(t)===e.selectedKey?`border-l-ink bg-surface`:`border-l-transparent hover:bg-surface/60`]),"aria-current":N(nu)(t)===e.selectedKey?`true`:void 0,onClick:e=>r(`select`,N(nu)(t))},[q(`span`,hu,[J(_c,{method:t.exchange.request.method},null,8,[`method`]),q(`span`,{class:`min-w-0 flex-1 truncate font-mono text-sm text-ink`,title:t.exchange.request.path},E(t.exchange.request.path),9,gu),J(Vc,{status:t.exchange.response.status},null,8,[`status`])]),q(`span`,_u,[q(`span`,vu,E(N(Os)(t.exchange.timestamp)),1),q(`span`,yu,E(N(Ts)(t.exchange.response.durationMs)),1),q(`span`,{class:T([`rounded-sm px-1.5 py-px font-medium`,t.exchange.source===`replay`?`bg-warn-bg text-warn-fg`:`bg-tag-bg text-tag-fg`])},E(N(ws)(t.exchange.source)),3),N(ps)(t.exchange)?(W(),G(`span`,bu,` ws `)):X(``,!0),t.origin===`remote`?(W(),G(`span`,xu,` remote `)):X(``,!0),o.value?(W(),G(`span`,Su,E(t.exchange.serviceName),1)):X(``,!0)])],10,mu)]))),128)),e.hasOlder?(W(),G(`li`,Cu,[J($,{variant:`quiet`,loading:e.loadingOlder,onClick:n[2]||=e=>r(`load-older`)},{default:I(()=>[Y(E(e.loadingOlder?`Loading`:`Load older requests`),1)]),_:1},8,[`loading`])])):X(``,!0)])]))}}),Tu=`hopwire-inspector-theme`;function Eu(){try{return localStorage.getItem(Tu)===`light`?`light`:`dark`}catch{return`dark`}}var Du=M(Eu());Vn(Du,e=>{document.documentElement.classList.toggle(`dark`,e===`dark`);try{localStorage.setItem(Tu,e)}catch{}},{immediate:!0});function Ou(){function e(){Du.value=Du.value===`dark`?`light`:`dark`}return{theme:Du,toggleTheme:e}}var ku=[`viewBox`],Au=[`stroke-width`],ju=[`d`,`pathLength`],Mu=[`d`],Nu=R({__name:`BrandLogo`,props:{animated:{type:Boolean,default:!1}},setup(e){return(t,n)=>(W(),G(`svg`,{viewBox:N(Mo),role:`img`,"aria-label":`Hopwire`,class:`block w-auto`},[q(`g`,{class:`stroke-mark`,fill:`none`,"stroke-width":N(Po),"stroke-linecap":`round`,"stroke-linejoin":`round`},[(W(!0),G(H,null,z(N(Fo),(t,n)=>(W(),G(`path`,{key:n,d:t,pathLength:e.animated?1:void 0,class:T(e.animated?`hwd-s hwd-s${n+1}`:void 0)},null,10,ju))),128))],8,Au),q(`g`,{class:T(e.animated?`hwd-w`:void 0)},[q(`path`,{class:`fill-ink`,d:N(Io)},null,8,Mu)],2)],8,ku))}}),Pu={class:`flex flex-wrap items-center gap-x-5 gap-y-2 border-b border-hairline bg-surface px-4 py-2.5 text-sm`},Fu={class:`flex items-center gap-2.5 font-normal`},Iu={key:0,class:`inline-flex items-center gap-1.5 rounded-full bg-tag-bg px-2 py-0.5 text-xs font-medium text-tag-fg`},Lu={key:1,class:`rounded-full bg-info-bg px-2 py-0.5 text-xs font-medium text-info-fg`},Ru={key:2,class:`order-last flex w-full min-w-0 flex-wrap items-center gap-x-5 gap-y-1 lg:order-none lg:w-auto lg:flex-1`},zu={class:`truncate font-mono text-xs text-ink`},Bu={key:0,class:`flex items-center gap-1.5`},Vu=[`title`],Hu={class:`flex items-center gap-1.5`},Uu=[`title`],Wu={class:`flex min-w-0 items-center gap-1.5`},Gu={key:0,class:`truncate font-mono text-xs text-ink`},Ku={class:`ml-auto flex items-center gap-3`},qu={class:`flex items-center gap-1.5 text-xs text-tag-fg`,role:`status`},Ju=R({__name:`StatusBar`,props:{status:{},stream:{}},setup(e){let t=e,{theme:n,toggleTheme:r}=Ou(),i=Q(()=>t.status===null?null:rc(t.status));return(t,a)=>(W(),G(`header`,Pu,[q(`h1`,Fu,[J(Nu,{class:`h-6`}),a[0]||=q(`span`,{class:`text-muted`},`Inspector`,-1)]),e.status?(W(),G(`span`,Iu,[q(`span`,{class:T([`size-2 rounded-full border-[1.5px]`,e.status.mode===`public`?`border-link-blue bg-link-blue`:`border-cyan-text bg-wire-cyan`]),"aria-hidden":`true`},null,2),Y(` `+E(e.status.mode===`public`?`Public mode`:`Private mode`),1)])):X(``,!0),e.status?.watching?(W(),G(`span`,Lu,` Watching a shared log `)):X(``,!0),e.status?(W(),G(`dl`,Ru,[(W(!0),G(H,null,z(e.status.publicUrls,e=>(W(),G(`div`,{key:e,class:`flex min-w-0 items-center gap-1.5`},[a[1]||=q(`dt`,{class:`text-muted`},`Public URL`,-1),q(`dd`,zu,E(e),1),J(ns,{text:e,label:`Copy public URL`},null,8,[`text`])]))),128)),e.status.peerKey?(W(),G(`div`,Bu,[a[2]||=q(`dt`,{class:`text-muted`},`Peer key`,-1),q(`dd`,{class:`font-mono text-xs text-ink`,title:e.status.peerKey},E(N(ks)(e.status.peerKey)),9,Vu),J(ns,{text:e.status.peerKey,label:`Copy peer key`},null,8,[`text`])])):X(``,!0),q(`div`,Hu,[a[3]||=q(`dt`,{class:`text-muted`},`Log key`,-1),q(`dd`,{class:`font-mono text-xs text-ink`,title:e.status.logKey},E(N(ks)(e.status.logKey)),9,Uu),J(ns,{text:e.status.logKey,label:`Copy log key`},null,8,[`text`])]),q(`div`,Wu,[a[4]||=q(`dt`,{class:`text-muted`},`Replay target`,-1),e.status.replayTarget?(W(),G(`dd`,Gu,E(e.status.replayTarget),1)):i.value?(W(),G(`dd`,{key:1,class:T([`text-xs`,i.value.missing?`text-warn-fg`:`text-tag-fg`])},E(i.value.text),3)):X(``,!0)])])):X(``,!0),q(`div`,Ku,[q(`span`,qu,[N(Qo)(e.stream)?(W(),K(xc,{key:0,class:`h-3.5`})):(W(),G(`span`,{key:1,class:T([`size-2 rounded-full`,e.stream===`live`?`bg-hop-green`:`border-[1.5px] border-muted`]),"aria-hidden":`true`},null,2)),Y(` `+E(N(Xo)[e.stream]),1)]),J($,{variant:`quiet`,"aria-label":`Switch to ${N(n)===`dark`?`light`:`dark`} mode`,onClick:N(r)},{default:I(()=>[Y(E(N(n)===`dark`?`Light`:`Dark`),1)]),_:1},8,[`aria-label`,`onClick`])])]))}}),Yu=100;function Xu(){let e=M(null),t=$t([]),n=M(`connecting`),r=M(!1),i=M(!1),a=M(null),o=null,s=!1,c=$t(new Map),l=$t(new Map);function u(e,t){let n=new Map(c.value);n.set(e,t),c.value=n}async function d(e){let t=Is(e.origin,e.exchange.id);c.value.has(t)||u(t,[]);try{let n=await ys(e.origin,e.exchange.id);if(u(t,Ls(c.value.get(t)??[],n)),l.value.has(t)){let e=new Map(l.value);e.delete(t),l.value=e}}catch(e){let n=new Map(l.value);n.set(t,e instanceof ms?e.message:`The messages could not be loaded.`),l.value=n}}let f=Q(()=>cu(t.value).length>0),p=Q(()=>a.value??(n.value===`closed`?`The connection to the tunnel is closed. Reload the page to connect again.`:null)),m=Q(()=>!r.value&&p.value===null);async function h(){r.value||(a.value=null);try{let n=await _s(),i=(await Promise.all(ou(n.watching).map(e=>vs({origin:e,limit:Yu})))).flat(),o=e.value===null||e.value.logKey===n.logKey;e.value=n,t.value=ru(o?t.value:[],i),r.value=!0,a.value=null,o||(c.value=new Map);for(let e of c.value.keys()){let n=t.value.find(t=>Is(t.origin,t.exchange.id)===e);n!==void 0&&d(n)}}catch(e){a.value=e instanceof ms?e.message:`The traffic could not be loaded.`}}function g(){let e=new EventSource(`${hs}stream`);o=e,e.addEventListener(`open`,()=>{s=!0,n.value=`live`,h()}),e.addEventListener(`exchange`,e=>{let n=JSON.parse(e.data);t.value=ru(t.value,[n])}),e.addEventListener(`ws_messages`,e=>{let{origin:t,block:n}=JSON.parse(e.data),r=Is(t,n.exchangeId),i=c.value.get(r);i!==void 0&&u(r,Ls(i,[n]))}),e.addEventListener(`error`,()=>{n.value=Zo(e.readyState===EventSource.CLOSED,s)})}function _(){o?.close(),o=null,n.value=`closed`}async function v(){let e=cu(t.value);if(!(e.length===0||i.value)){i.value=!0;try{let n=await Promise.all(e.map(e=>vs({...e,limit:Yu})));t.value=ru(t.value,n.flat())}catch(e){a.value=e instanceof ms?e.message:`Older requests could not be loaded.`}finally{i.value=!1}}}async function y(e,n){let r=await bs(e,n);return t.value.some(e=>e.exchange.id===r.id)||await h(),r}return{status:e,records:t,stream:n,connecting:m,loaded:r,loadingOlder:i,problem:p,hasOlder:f,start:g,stop:_,loadOlder:v,replay:y,wsSessions:c,wsFailures:l,loadWsMessages:d}}function Zu(){let e=Xu();return gr(e.stop),e}var Qu={class:`flex h-dvh flex-col bg-ground text-ink`},$u={key:0,class:`border-b border-hairline bg-err-bg px-4 py-2 text-sm text-err-fg`,role:`alert`},ed={class:`min-h-0 flex-1`},td={key:2,class:`flex h-full min-h-0 flex-col md:flex-row`},nd={class:`h-2/5 min-h-0 shrink-0 border-b border-hairline md:h-full md:w-2/5 md:max-w-xl md:min-w-80 md:border-r md:border-b-0`,"aria-label":`Traffic`},rd={class:`min-h-0 min-w-0 flex-1`},id={key:1,class:`flex h-full items-center justify-center p-8 text-sm text-muted`};ko(R({__name:`App`,setup(e){let{status:t,records:n,stream:r,connecting:i,loaded:a,loadingOlder:o,problem:s,hasOlder:c,start:l,loadOlder:u,replay:d,wsSessions:f,wsFailures:p,loadWsMessages:m}=Zu(),h=M(null),g=Q(()=>n.value.find(e=>nu(e)===h.value)??null);function _(e){let t=n.value.find(t=>t.exchange.id===e);h.value=t===void 0?null:nu(t)}let v=Q(()=>au(n.value,(t.value?.services??[]).map(e=>e.name))),y=Q(()=>g.value===null?null:Is(g.value.origin,g.value.exchange.id)),b=Q(()=>y.value===null?null:f.value.get(y.value)??null),x=Q(()=>y.value===null?null:p.value.get(y.value)??null),ee=Q(()=>{let e=g.value?.exchange.replayOf;return e!==void 0&&n.value.some(t=>t.exchange.id===e)});return pr(l),(e,l)=>(W(),G(`div`,Qu,[J(Ju,{status:N(t),stream:N(r)},null,8,[`status`,`stream`]),N(s)?(W(),G(`p`,$u,E(N(s)),1)):X(``,!0),q(`main`,ed,[N(a)?N(n).length===0?(W(),K(fs,{key:1,status:N(t),stream:N(r)},null,8,[`status`,`stream`])):(W(),G(`div`,td,[q(`section`,nd,[J(wu,{records:N(n),services:v.value,"selected-key":h.value,"has-older":N(c),"loading-older":N(o),onSelect:l[0]||=e=>h.value=e,onLoadOlder:N(u)},null,8,[`records`,`services`,`selected-key`,`has-older`,`loading-older`,`onLoadOlder`])]),q(`section`,rd,[g.value?(W(),K(tu,{key:0,record:g.value,status:N(t),"original-loaded":ee.value,replay:N(d),"ws-blocks":b.value,"ws-failure":x.value,onSelect:_,onLoadMessages:N(m)},null,8,[`record`,`status`,`original-loaded`,`replay`,`ws-blocks`,`ws-failure`,`onLoadMessages`])):(W(),G(`div`,id,` Select a request to see its headers and body. `))])])):(W(),K(Yo,{key:0,connecting:N(i)},null,8,[`connecting`]))])]))}})).mount(`#app`);