hopwire 0.1.8 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -0
- package/dist/agent/redact.js +38 -0
- package/dist/bin.js +5 -1
- package/dist/cli.js +237 -10
- package/dist/commands/connect.js +23 -7
- package/dist/commands/doctor.js +63 -3
- package/dist/commands/http.js +25 -4
- package/dist/commands/init.js +355 -0
- package/dist/commands/up.js +22 -3
- package/dist/commands/watch.js +54 -9
- package/dist/config-template.js +80 -0
- package/dist/config.js +65 -5
- package/dist/control-plane-client.js +70 -0
- package/dist/inspector/assets/index-CIOfyIbK.js +5 -0
- package/dist/inspector/assets/index-Du4-DCNN.css +2 -0
- package/dist/inspector/index.html +2 -2
- package/dist/inspector-api.js +145 -0
- package/dist/interceptor.js +19 -4
- package/dist/log-follow.js +473 -0
- package/dist/log.js +178 -11
- package/dist/main.js +1 -0
- package/dist/mcp/logs.js +46 -0
- package/dist/mcp/tools.js +136 -3
- package/dist/output.js +67 -1
- package/dist/p2p.js +249 -24
- package/dist/prompt.js +63 -0
- package/dist/relay.js +545 -0
- package/dist/serve.js +62 -2
- package/node_modules/@hopwire/protocol/dist/constants.d.ts +10 -0
- package/node_modules/@hopwire/protocol/dist/constants.js +10 -0
- package/node_modules/@hopwire/protocol/dist/index.d.ts +2 -0
- package/node_modules/@hopwire/protocol/dist/index.js +2 -0
- package/node_modules/@hopwire/protocol/dist/inspector.d.ts +18 -0
- package/node_modules/@hopwire/protocol/dist/log-entries.d.ts +72 -0
- package/node_modules/@hopwire/protocol/dist/log-entries.js +147 -0
- package/node_modules/@hopwire/protocol/dist/relay.d.ts +81 -0
- package/node_modules/@hopwire/protocol/dist/relay.js +102 -0
- package/node_modules/@hopwire/protocol/dist/ws-messages.d.ts +2 -1
- package/package.json +2 -1
- package/dist/inspector/assets/index-D3yNjmSA.js +0 -2
- package/dist/inspector/assets/index-XotF7D1X.css +0 -2
|
@@ -0,0 +1,5 @@
|
|
|
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]`,C=e=>g(e)&&e!==`NaN`&&e[0]!==`-`&&``+parseInt(e,10)===e,te=e(`,key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted`),ne=1e4,re=e=>{let t=Object.create(null),n=0;return(r=>{let i=t[r];return i===void 0?(++n>ne&&(t=Object.create(null),n=1),t[r]=e(r)):i})},ie=/-\w/g,w=re(e=>e.replace(ie,e=>e.slice(1).toUpperCase())),ae=/\B([A-Z])/g,oe=re(e=>e.replace(ae,`-$1`).toLowerCase()),se=re(e=>e.charAt(0).toUpperCase()+e.slice(1)),ce=re(e=>e?`on${se(e)}`:``),le=(e,t)=>!Object.is(e,t),T=(e,...t)=>{for(let n=0;n<e.length;n++)e[n](...t)},ue=(e,t,n,r=!1)=>{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,writable:r,value:n})},de=e=>{let t=parseFloat(e);return isNaN(t)?e:t},fe,pe=()=>fe||=typeof globalThis<`u`?globalThis:typeof self<`u`?self:typeof window<`u`?window:typeof global<`u`?global:{};function me(e){if(d(e)){let t={};for(let n=0;n<e.length;n++){let r=e[n],i=g(r)?ve(r):me(r);if(i)for(let e in i)t[e]=i[e]}return t}if(g(e)||v(e))return e}var he=/;(?![^(]*\))/g,ge=/:([^]+)/,_e=/"(?:[^"\\]|\\[^])*"|'(?:[^'\\]|\\[^])*'|\\[^]|\/\*[^]*?\*\//g;function ve(e){let t={};return e.replace(_e,e=>e.startsWith(`/*`)?``:e).split(he).forEach(e=>{if(e){let n=e.split(ge);n.length>1&&(t[n[0].trim()]=n[1].trim())}}),t}function E(e){let t=``;if(g(e))t=e;else if(d(e))for(let n=0;n<e.length;n++){let r=E(e[n]);r&&(t+=r+` `)}else if(v(e))for(let n in e)e[n]&&(t+=n+` `);return t.trim()}var ye=`itemscope,allowfullscreen,disablepictureinpicture,disableremoteplayback,formnovalidate,ismap,nomodule,novalidate,playsinline,readonly`,be=e(ye);ye+``;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),D=e=>g(e)?e:e==null?``:d(e)||v(e)&&(e.toString===b||!h(e.toString))?ke(e)?D(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,O,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&&O&&(O.active?(this.parent=O,this.index=(O.scopes||(O.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=O;try{return O=this,e()}finally{O=t}}}on(){++this._on===1&&(this.prevScope=O,O=this)}off(){if(this._on>0&&--this._on===0){if(O===this)O=this.prevScope;else{let e=O;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 O}var k,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,O&&(O.active?O.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=k,t=Je;k=this,Je=!0;try{return this.fn()}finally{Ue(this),k=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=k,r=Je;k=e,Je=!0;try{He(e);let n=e.fn(e._value);(t.version===0||le(n,e._value))&&(e.flags|=128,e._value=n,t.version++)}catch(e){throw t.version++,e}finally{k=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=k;k=void 0;try{t()}finally{k=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(!k||!Je||k===this.computed)return;let t=this.activeLink;if(t===void 0||t.sub!==k)t=this.activeLink=new et(k,this),k.deps?(t.prevDep=k.depsTail,k.depsTail.nextDep=t,k.depsTail=t):k.deps=k.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=k.depsTail,t.nextDep=void 0,k.depsTail.nextDep=t,k.depsTail=t,k.deps===t&&(k.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 A(e,t,n){if(Je&&k){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&&C(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=j(e);return t===e||(A(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 A(e=j(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=j(e);A(r,`iterate`,ot);let i=r[t](...n);return(i===-1||i===!1)&&Yt(n[0])?(n[0]=j(n[0]),r[t](...n)):i}function vt(e,t,n=[]){Xe(),Be();let r=j(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=j(this);return A(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,M(e)?e:n);if((_(t)?bt.has(t):yt(t))||(r||A(e,`get`,t),i))return o;if(M(o)){let e=a&&C(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)&&C(t);if(!this._isShallow){let e=qt(i);if(!Jt(n)&&!qt(n)&&(i=j(i),n=j(n)),!a&&M(i)&&!M(n))return e||(i.value=n),!0}let o=a?Number(t)<e.length:u(e,t),s=Reflect.set(e,t,n,M(e)?e:r);return e===j(r)&&s&&(o?le(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)||A(e,`has`,t),n}ownKeys(e){return A(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=j(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&&A(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=j(r),a=j(n);e||(le(n,a)&&A(i,`get`,n),A(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&&A(j(t),`iterate`,it),t.size},has(t){let n=this.__v_raw,r=j(n),i=j(t);return e||(le(t,i)&&A(r,`has`,t),A(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=j(a),s=t?Ot:e?Qt:Zt;return!e&&A(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=j(this),r=kt(n),i=j(e),a=!t&&!Jt(e)&&!qt(e)?i:e;return r.has.call(n,a)||le(e,a)&&r.has.call(n,e)||le(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=j(n));let r=j(this),{has:i,get:a}=kt(r),o=i.call(r,e);o||=(e=j(e),i.call(r,e));let s=a.call(r,e);return r.set(e,n),o?le(n,s)&&st(r,`set`,e,n,s):st(r,`add`,e,n),this},delete(e){let t=j(this),{has:n,get:r}=kt(t),i=n.call(t,e);i||=(e=j(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=j(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 j(e){let t=e&&e.__v_raw;return t?j(t):e}function Xt(e){return!u(e,`__v_skip`)&&Object.isExtensible(e)&&ue(e,`__v_skip`,!0),e}var Zt=e=>v(e)?Ht(e):e,Qt=e=>v(e)?Wt(e):e;function M(e){return e?e.__v_isRef===!0:!1}function N(e){return en(e,!1)}function $t(e){return en(e,!0)}function en(e,t){return M(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:j(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:j(e),le(e,t)&&(this._rawValue=e,this._value=n?e:Zt(e),this.dep.trigger())}};function P(e){return M(e)?e.value:e}var nn={get:(e,t,n)=>t===`__v_raw`?e:P(Reflect.get(e,t,n)),set:(e,t,n,r)=>{let i=e[t];return M(i)&&!M(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)&&k!==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(M(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(M(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,C=e=>{if(m.flags&1&&(m.dirty||e)){if(n){let t=m.run();if(e||o||y||(b?t.some((e,t)=>le(e,S[t])):le(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(C),m=new Fe(g),m.scheduler=l?()=>l(C,!1):C,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?C(!0):S=m.run():l?l(C.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--,M(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 F=[],_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=F.length;for(;t<n;){let r=t+n>>>1,i=F[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=F[F.length-1];!n||!(e.flags&2)&&t>=Mn(n)?F.push(e):F.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<F.length;r++){let n=F[r];if(n&&n.flags&2){if(e&&n.id!==e.uid||t!==void 0&&!(n.id>=t))continue;F.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<F.length;_n++){let e=F[_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<F.length;_n++){let e=F[_n];e&&(e.flags&=-2)}_n=-1,F.length=0,kn(e),Sn=null,(F.length||vn.length)&&Nn(e)}}var I=null,Pn=null;function Fn(e){let t=I;return I=e,Pn=e&&e.type.__scopeId||null,t}function L(e,t=I,n){if(!t||e._n)return e;let r=(...n)=>{r._d&&Gi(-1);let i=Fn(t),a=Vi.length,o;try{o=e(...n)}finally{for(let e=Vi.length;e>a;e--)Ui();Fn(i),r._d&&Gi(1)}return o};return r._n=!0,r._c=!0,r._d=!0,r}function R(e,n){if(I===null)return e;let r=Ca(I),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=la();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(ha){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,H(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 ha&&(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=fa(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===U&&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===U){let t=d(e.children)&&ei(e.children,!1);return t?Zn(t):void 0}if(e.type!==zi)return e}function z(e,t){return h(e)?s({name:e.name},t,{setup:e}):e}function Qn(){let e=la();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?Ca(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=j(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(M(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=M(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),H(t,r)}else rr(e),i()}}}function rr(e){let t=tr.get(e);t&&(t.flags|=8,tr.delete(e))}pe().requestIdleCallback,pe().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=fa(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)=>{ha&&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 B(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??={},I.ce||I.parent&&ir(I.parent)&&I.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(U,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(U,{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--)Ui();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=>!qi(e)||!(e.type===zi||e.type===U&&!wr(e.children)))?e:null}var Tr=e=>e?ma(e)?Ca(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`&&A(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:C,render:te,renderTracked:ne,renderTriggered:re,errorCaptured:ie,serverPrefetch:w,expose:ae,inheritAttrs:oe,components:se,directives:ce,filters:le}=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 T(e,t){d(t)?t.forEach(t=>e(t.bind(n))):t&&e(t.bind(n))}if(T(fr,p),T(pr,m),T(mr,g),T(hr,_),T(or,y),T(sr,b),T(xr,ie),T(br,ne),T(yr,re),T(gr,ee),T(_r,C),T(vr,w),d(ae)){if(ae.length){let t=e.exposed||={};ae.forEach(e=>{Object.defineProperty(t,e,{get:()=>n[e],set:t=>n[e]=t,enumerable:!0})})}else e.exposed||={}}te&&e.render===r&&(e.render=te),oe!=null&&(e.inheritAttrs=oe),se&&(e.components=se),ce&&(e.directives=ce),w&&$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),M(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:V,created:V,beforeMount:V,mounted:V,beforeUpdate:V,updated:V,beforeDestroy:V,beforeUnmount:V,destroyed:V,unmounted:V,activated:V,deactivated:V,errorCaptured:V,serverPrefetch:V,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 V(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]=V(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:Ta,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,Ca(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[`${w(t)}Modifiers`]||e[`${oe(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(de)));let c,l=i[c=ce(n)]||i[c=ce(w(n))];!l&&o&&(l=i[c=ce(oe(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,oe(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=ea(u.call(t,e,d,f,m,p,h)),y=c}else{let e=t;v=ea(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=$i(b,y,!1,!0))}return n.dirs&&(b=$i(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(qi(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=j(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=w(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=oe(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(te(t))continue;let l=n[t],d;a&&u(a,d=w(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=j(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=fa(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===oe(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=w(c[e]);gi(n)&&(l[n]=t)}else if(c)for(let e in c){let t=w(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]!==`$`&&!te(e)}var _i=e=>e===`_`||e===`_ctx`||e===`$stable`,vi=e=>d(e)?e.map(ea):[ea(e)],yi=(e,t,n)=>{if(t._n)return t;let r=L((...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&&ue(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]},H=Li;function Ti(e){return Ei(e)}function Ei(e,i){let a=pe();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&&!Ji(e,t)&&(i=Se(e),ve(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 U:se(e,t,r,i,a,o,s,c,l);break;default:f&1?C(e,t,r,i,a,o,s,c,l):f&6?ce(e,t,r,i,a,o,s,c,l):(f&64||f&128)&&u.process(e,t,r,i,a,o,s,c,l,we)}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)},C=(e,t,n,r,i,a,o,s,c)=>{if(t.type===`svg`?o=`svg`:t.type===`math`&&(o=`mathml`),e==null)ne(t,n,r,i,a,o,s,c);else{let n=e.el&&e.el._isVueCE?e.el:null;try{n&&n._beginPatch(),w(e,t,i,a,o,s,c)}finally{n&&n._endPatch()}}},ne=(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&&ie(e.children,d,null,r,i,Di(e,a),s,u),_&&In(e,null,r,`created`),re(d,e,e.scopeId,s,r),m){for(let e in m)e!==`value`&&!te(e)&&c(d,e,null,m[e],a,r);`value`in m&&c(d,`value`,null,m.value,a),(f=m.onVnodeBeforeMount)&&ia(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||_)&&H(()=>{try{f&&ia(f,r,e),v&&g.enter(d),_&&In(e,null,r,`mounted`)}finally{}},i)},re=(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;re(e,t,t.scopeId,t.slotScopeIds,i.parent)}}},ie=(e,t,n,r,i,a,o,s,c=0)=>{for(let l=c;l<e.length;l++){let c=e[l]=s?ta(e[l]):ea(e[l]);v(null,c,t,n,r,i,a,o,s)}},w=(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)&&ia(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?ae(e.dynamicChildren,d,l,r,i,Di(n,a),o):s||me(e,n,l,null,r,i,Di(n,a),o,!1),u>0){if(u&16)oe(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&&oe(l,m,h,r,a);((g=h.onVnodeUpdated)||f)&&H(()=>{g&&ia(g,r,n,e),f&&In(n,e,r,`updated`)},i)},ae=(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===U||!Ji(c,l)||c.shapeFlag&198)?m(u):n;v(c,l,d,null,r,i,a,o,!0)}},oe=(e,n,r,i,a)=>{if(n!==r){if(n!==t)for(let t in n)!te(t)&&!(t in r)&&c(e,t,n[t],null,a,i);for(let t in r){if(te(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)}},se=(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),ie(t.children||[],n,f,i,a,s,c,l)):p>0&&p&64&&m&&e.dynamicChildren&&e.dynamicChildren.length===m.length?(ae(e.dynamicChildren,m,n,i,a,s,c),(t.key!=null||i&&t===i.subTree)&&Ai(e,t,!0)):me(e,t,n,f,i,a,s,c,l)},ce=(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):le(t,n,r,i,a,o,c):ue(e,t,c)},le=(e,t,n,r,i,a,o)=>{let s=e.component=ca(e,r,i);if(ar(e)&&(s.ctx.renderer=we),ga(s,!1,o),s.asyncDep){if(i&&i.registerDep(s,de,o,a),!e.el){let r=s.subTree=J(zi);b(null,r,t,n),e.placeholder=r.el}}else de(s,e,t,n,i,a,o)},ue=(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,fe(r,t,n);return}r.next=t,r.update()}else t.el=e.el,t.placeholder=e.placeholder,r.vnode=t},de=(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,fe(e,t,o)),n.asyncDep.then(()=>{let t=()=>{e.job.flags&8||(i&&i.pendingBranch?H(t,i):l())};t.flags=48,H(t,i)});return}}let u=t,d;Oi(e,!1),t?(t.el=c.el,fe(e,t,o)):t=c,n&&T(n),(d=t.props&&t.props.onVnodeBeforeUpdate)&&ia(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)),Se(p),e,i,a),t.el=f.el,u===null&&oi(e,f.el),r&&H(r,i),(d=t.props&&t.props.onVnodeUpdated)&&H(()=>ia(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&&T(l),!m&&(o=c&&c.onVnodeBeforeMount)&&ia(o,d,t),Oi(e,!0),s&&Ee){let t=()=>{e.subTree=$r(e),Ee(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&&H(u,i),!m&&(o=c&&c.onVnodeMounted)){let e=t;H(()=>ia(o,d,e),i)}(t.shapeFlag&256||d&&ir(d.vnode)&&d.vnode.shapeFlag&256)&&e.a&&H(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()},fe=(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()},me=(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){ge(l,d,n,r,i,a,o,s,c);return}if(f&256){he(l,d,n,r,i,a,o,s,c);return}}m&8?(u&16&&xe(l,i,a),d!==l&&p(n,d)):u&16?m&16?ge(l,d,n,r,i,a,o,s,c):xe(l,i,a,!0):(u&8&&p(n,``),m&16&&ie(d,n,r,i,a,o,s,c))},he=(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?ta(t[p]):ea(t[p]);v(e[p],n,r,null,a,o,s,c,l)}u>d?xe(e,a,o,!0,!1,f):ie(t,r,i,a,o,s,c,l,f)},ge=(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?ta(t[u]):ea(t[u]);if(Ji(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?ta(t[p]):ea(t[p]);if(Ji(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?ta(t[u]):ea(t[u]),r,n,a,o,s,c,l),u++}}else if(u>p)for(;u<=f;)ve(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?ta(t[u]):ea(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){ve(n,a,o,!0);continue}let i;if(n.key!=null)i=g.get(n.key);else for(_=h;_<=p;_++)if(S[_-h]===0&&Ji(n,t[_])){i=_;break}i===void 0?ve(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 C=x?ji(S):n;for(_=C.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!==C[_]?_e(n,r,p,2):_--)}}},_e=(e,t,n,r,i=null)=>{let{el:a,type:c,transition:l,children:u,shapeFlag:d}=e;if(d&6)_e(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,we);else if(c===U){o(a,t,n);for(let e=0;e<u.length;e++)_e(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),H(()=>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)},ve=(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)&&ia(_,t,e),u&6)be(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,we,r):l&&!l.hasOnce&&(a!==U||d>0&&d&64)?xe(l,t,n,!1,!0):(a===U&&d&384||!i&&u&16)&&xe(c,t,n),r&&E(e)}let v=m!=null&&p==null;(g&&(_=o&&o.onVnodeUnmounted)||h||v)&&H(()=>{_&&ia(_,t,e),h&&In(e,null,t,`unmounted`),v&&(e.el=null)},n)},E=e=>{let{type:t,el:n,anchor:r,transition:i}=e,a=t===U;if(a&&!i){ye(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)&&ye(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()},ye=(e,t)=>{let n;for(;e!==t;)n=h(e),s(e),e=n;s(t)},be=(e,t,n)=>{let{bum:r,scope:i,job:a,subTree:o,um:s,m:c,a:l}=e;Ni(c),Ni(l),r&&T(r),i.stop(),a?(a.flags|=8,ve(o,e,t,n)):o&&(o.transition=e.vnode.transition,ve(o,e,t,n)),s&&H(s,t);let u=()=>{e.isUnmounted=!0};u.flags=16,H(u,t)},xe=(e,t,n,r=!1,i=!1,a=0)=>{for(let o=a;o<e.length;o++)ve(e[o],t,n,r,i)},Se=e=>{if(e.shapeFlag&6)return Se(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},Ce=(e,t,n)=>{jn(()=>{e==null?t._vnode&&ve(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:sa())},we={p:v,um:ve,m:_e,r:E,mt:le,mc:ie,pc:me,pbc:ae,n:Se,o:e},Te,Ee;return i&&([Te,Ee]=i(we)),{render:Ce,hydrate:Te,createApp:Kr(Ce,Te)}}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]=ta(i[e]),a.el=t.el),!n&&a.patchFlag!==-2&&Ai(t,a)),a.type===Ri&&(a.patchFlag===-1&&(a=i[e]=ta(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 U=Symbol.for(`v-fgt`),Ri=Symbol.for(`v-txt`),zi=Symbol.for(`v-cmt`),Bi=Symbol.for(`v-stc`),Vi=[],Hi=null;function W(e=!1){Vi.push(Hi=e?null:[])}function Ui(){Vi.pop(),Hi=Vi[Vi.length-1]||null}var Wi=1;function Gi(e,t=!1){Wi+=e,e<0&&Hi&&t&&(Hi.hasOnce=!0)}function Ki(e){return e.dynamicChildren=Wi>0?Hi||n:null,Ui(),Wi>0&&Hi&&Hi.push(e),e}function G(e,t,n,r,i,a){return Ki(q(e,t,n,r,i,a,!0))}function K(e,t,n,r,i){return Ki(J(e,t,n,r,i,!0))}function qi(e){return e?e.__v_isVNode===!0:!1}function Ji(e,t){return e.type===t.type&&e.key===t.key}var Yi=({key:e})=>e??null,Xi=({ref:e,ref_key:t,ref_for:n})=>(typeof e==`number`&&(e=``+e),e==null?null:g(e)||M(e)||h(e)?{i:I,r:e,k:t,f:!!n}:e);function q(e,t=null,n=null,r=0,i=null,a=e===U?0:1,o=!1,s=!1){let c={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&Yi(t),ref:t&&Xi(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:I};return s?(na(c,n),a&128&&e.normalize(c)):n&&(c.shapeFlag|=g(n)?8:16),Wi>0&&!o&&Hi&&(c.patchFlag>0||a&6)&&c.patchFlag!==32&&Hi.push(c),c}var J=Zi;function Zi(e,t=null,n=null,r=0,i=null,a=!1){if(e&&e!==Sr||(e=zi),qi(e)){let r=$i(e,t,!0);return n&&na(r,n),Wi>0&&!a&&Hi&&(r.shapeFlag&6?Hi[Hi.indexOf(e)]=r:Hi.push(r)),r.patchFlag=-2,r}if(wa(e)&&(e=e.__vccOpts),t){t=Qi(t);let{class:e,style:n}=t;e&&!g(e)&&(t.class=E(e)),v(n)&&(Yt(n)&&!d(n)&&(n=s({},n)),t.style=me(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 Qi(e){return e?Yt(e)?s({},e):li(e)?s({},e[ba]||e):e:null}function $i(e,t,n=!1,r=!1){let{props:i,ref:a,patchFlag:o,children:s,transition:c}=e,l=t?ra(i||{},t):i,u={__v_isVNode:!0,__v_skip:!0,type:e.type,props:l,key:l&&Yi(l),ref:t&&t.ref?n&&a?d(a)?a.concat(Xi(t)):[a,Xi(t)]:Xi(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!==U?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&&$i(e.ssContent),ssFallback:e.ssFallback&&$i(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 ea(e){return e==null||typeof e==`boolean`?J(zi):d(e)?J(U,null,e.slice()):qi(e)?ta(e):J(Ri,null,String(e))}function ta(e){return e.el===null&&e.patchFlag!==-1||e.memo?e:$i(e)}function na(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),na(e,n()),n._c&&(n._d=!0));return}{n=32;let r=t._;!r&&!li(t)?t._ctx=I:r===3&&I&&(I.slots._===1?t._=1:(t._=2,e.patchFlag|=1024))}}else if(h(t)){if(r&65){na(e,{default:t});return}t={default:t,_ctx:I},n=32}else t=String(t),r&64?(n=16,t=[Y(t)]):n=8;e.children=t,e.shapeFlag|=n}function ra(...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=E([t.class,r.class]));else if(e===`style`)t.style=me([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 ia(e,t,n,r=null){mn(e,t,7,[n,r])}var aa=Wr(),oa=0;function sa(){return oa}function ca(e,n,r){let i=e.type,a=(n?n.appContext:e.appContext)||aa,o={uid:oa++,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,la=()=>Z||I,ua,da;{let e=pe(),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)}};ua=t(`__VUE_INSTANCE_SETTERS__`,e=>Z=e),da=t(`__VUE_SSR_SETTERS__`,e=>ha=e)}var fa=e=>{let t=Z;return ua(e),e.scope.on(),()=>{e.scope.off(),ua(t)}},pa=()=>{Z&&Z.scope.off(),ua(null)};function ma(e){return e.vnode.shapeFlag&4}var ha=!1;function ga(e,t=!1,n=!1){t&&da(t);let{props:r,children:i}=e.vnode,a=ma(e);ui(e,r,a,t),Ci(e,i,n||t);let o=a?_a(e,t):void 0;return t&&da(!1),o}function _a(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?Sa(e):null,i=fa(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(pa,pa),t)return a.then(n=>{da(!0);try{va(e,n,t)}finally{da(!1)}}).catch(t=>{hn(t,e,0,void 0,!0),e.ssrRender=(e,t)=>t(`<!---->`)});e.asyncDep=a}else va(e,a,t)}else ya(e,t)}function va(e,t,n){h(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:v(t)&&(e.setupState=rn(t)),ya(e,n)}function ya(e,t,n){let i=e.type;e.render||=i.render||r;{let t=fa(e);Xe();try{jr(e)}finally{Ze(),t()}}}var ba=Symbol(),xa={get(e,t){return A(e,`get`,``),t===ba?e:e[t]}};function Sa(e){return{attrs:new Proxy(e.attrs,xa),slots:e.slots,emit:e.emit,expose:t=>{e.exposed=t||{}}}}function Ca(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 wa(e){return h(e)&&`__vccOpts`in e}var Q=(e,t)=>on(e,t,ha),Ta=`3.5.46`,Ea=void 0,Da=typeof window<`u`&&window.trustedTypes;if(Da)try{Ea=Da.createPolicy(`vue`,{createHTML:e=>e})}catch{}var Oa=Ea?e=>Ea.createHTML(e):e=>e,ka=`http://www.w3.org/2000/svg`,Aa=`http://www.w3.org/1998/Math/MathML`,ja=typeof document<`u`?document:null,Ma=ja&&ja.createElement(`template`),Na={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`?ja.createElementNS(ka,e):t===`mathml`?ja.createElementNS(Aa,e):n?ja.createElement(e,{is:n}):ja.createElement(e);return e===`select`&&r&&r.multiple!=null&&i.setAttribute(`multiple`,r.multiple),i},createText:e=>ja.createTextNode(e),createComment:e=>ja.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>ja.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{Ma.innerHTML=Oa(r===`svg`?`<svg>${e}</svg>`:r===`mathml`?`<math>${e}</math>`:e);let i=Ma.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]}},Pa=Symbol(`_vtc`);function Fa(e,t,n){let r=e[Pa];r&&(t=(t?[t,...r]:[...r]).join(` `)),t==null?e.removeAttribute(`class`):n?e.setAttribute(`class`,t):e.className=t}var Ia=Symbol(`_vod`),La=Symbol(`_vsh`),Ra=Symbol(``),za=/(?:^|;)\s*display\s*:/;function Ba(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]??Ha(r,t,``)}else for(let e in t)n[e]??Ha(r,e,``)}for(let i in n){i===`display`&&(a=!0);let o=n[i];o==null?Ha(r,i,``):Ka(e,i,!g(t)&&t?t[i]:void 0,o)||Ha(r,i,o)}}else if(i){if(t!==n){let e=r[Ra];e&&(n+=`;`+e),r.cssText=n,a=za.test(n)}}else t&&e.removeAttribute(`style`);Ia in e&&(i&&t===n||(e[Ia]=a?r.display:``),e[La]&&(r.display=`none`))}var Va=/\s*!important$/;function Ha(e,t,n){if(d(n))n.forEach(n=>Ha(e,t,n));else if(n??=``,t.startsWith(`--`))Va.test(n)?e.setProperty(t,n.replace(Va,``),`important`):e.setProperty(t,n);else{let r=Ga(e,t);Va.test(n)?e.setProperty(oe(r),n.replace(Va,``),`important`):e[r]=n}}var Ua=[`Webkit`,`Moz`,`ms`],Wa={};function Ga(e,t){let n=Wa[t];if(n)return n;let r=w(t);if(r!==`filter`&&r in e)return Wa[t]=r;r=se(r);for(let n=0;n<Ua.length;n++){let i=Ua[n]+r;if(i in e)return Wa[t]=i}return t}function Ka(e,t,n,r){return e.tagName===`TEXTAREA`&&(t===`width`||t===`height`)&&g(r)&&n===r}var qa=`http://www.w3.org/1999/xlink`;function Ja(e,t,n,r,i,a=be(t)){r&&t.startsWith(`xlink:`)?n==null?e.removeAttributeNS(qa,t.slice(6,t.length)):e.setAttributeNS(qa,t,n):n==null||a&&!xe(n)?e.removeAttribute(t):e.setAttribute(t,a?``:_(n)?String(n):n)}function Ya(e,t,n,r,i){if(t===`innerHTML`||t===`textContent`){n!=null&&(e[t]=t===`innerHTML`?Oa(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 Xa(e,t,n,r){e.addEventListener(t,n,r)}function Za(e,t,n,r){e.removeEventListener(t,n,r)}var Qa=Symbol(`_vei`);function $a(e,t,n,r,i=null){let a=e[Qa]||(e[Qa]={}),o=a[t];if(r&&o)o.value=r;else{let[n,s]=no(t);r?Xa(e,n,a[t]=oo(r,i),s):o&&(Za(e,n,o,s),a[t]=void 0)}}var eo=/(Once|Passive|Capture)$/,to=/^on:?(?:Once|Passive|Capture)$/;function no(e){let t,n;for(;(n=e.match(eo))&&!to.test(e);)t||={},e=e.slice(0,e.length-n[1].length),t[n[1].toLowerCase()]=!0;return[e[2]===`:`?e.slice(3):oe(e.slice(2)),t]}var ro=0,io=Promise.resolve(),ao=()=>ro||=(io.then(()=>ro=0),Date.now());function oo(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=ao(),n}var so=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)>96&&e.charCodeAt(2)<123,co=(e,t,n,r,i,s)=>{let c=i===`svg`;t===`class`?Fa(e,r,c):t===`style`?Ba(e,n,r):a(t)?o(t)||$a(e,t,n,r,s):(t[0]===`.`?(t=t.slice(1),1):t[0]===`^`?(t=t.slice(1),0):lo(e,t,r,c))?(Ya(e,t,r),e.tagName.includes(`-`)||t!==`value`&&t!==`checked`&&t!==`selected`||Ja(e,t,r,c,s,t!==`value`)):e._isVueCE&&(uo(e,t)||e._def.__asyncLoader&&(/[A-Z]/.test(t)||!g(r)))?Ya(e,w(t),r,s,t):(t===`true-value`?e._trueValue=r:t===`false-value`&&(e._falseValue=r),Ja(e,t,r,c))};function lo(e,t,n,r){if(r)return!!(t===`innerHTML`||t===`textContent`||t in e&&so(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 so(t)&&g(n)?!1:t in e}function uo(e,t){let n=e._def.props;if(!n)return!1;let r=w(t);return Array.isArray(n)?n.some(e=>w(e)===r):Object.keys(n).some(e=>w(e)===r)}var fo=e=>{let t=e.props[`onUpdate:modelValue`]||!1;return d(t)?e=>T(t,e):t};function po(e){e.target.composing=!0}function mo(e){let t=e.target;t.composing&&(t.composing=!1,t.dispatchEvent(new Event(`input`)))}var ho=Symbol(`_assign`),go=Symbol(`_initialValue`);function _o(e,t,n){return t&&(e=e.trim()),n&&(e=de(e)),e}var vo={created(e,{modifiers:{lazy:t,trim:n,number:r}},i){e.parentNode&&(e.type===`text`?e[go]=e.defaultValue.replace(/[\r\n]/g,``):e.type===`textarea`&&(e[go]=e.defaultValue.replace(/\r\n?/g,`
|
|
2
|
+
`))),e[ho]=fo(i);let a=r||i.props&&i.props.type===`number`;Xa(e,t?`change`:`input`,t=>{t.target.composing||e[ho](_o(e.value,n,a))}),(n||a)&&Xa(e,`change`,()=>{e.value=_o(e.value,n,a)}),t||(Xa(e,`compositionstart`,po),Xa(e,`compositionend`,mo),Xa(e,`change`,mo))},mounted(e,{value:t,modifiers:{trim:n,number:r}}){let i=t??``,a=e[go];delete e[go],a!==void 0&&(e.type===`text`||e.type===`textarea`)&&e.value!==a?e[ho](_o(e.value,n,r)):e.value=i},beforeUpdate(e,{value:t,oldValue:n,modifiers:{lazy:r,trim:i,number:a}},o){if(e[ho]=fo(o),e.composing)return;let s=(a||e.type===`number`)&&!/^0\d/.test(e.value)?de(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)}},yo={created(e,{value:t},n){e.checked=Ee(t,n.props.value),e[ho]=fo(n),Xa(e,`change`,()=>{e[ho](Co(e))})},beforeUpdate(e,{value:t,oldValue:n},r){e[ho]=fo(r),t!==n&&(e.checked=Ee(t,r.props.value))}},bo={deep:!0,created(e,{value:t,modifiers:{number:n}},r){e._modelValue=t,Xa(e,`change`,()=>{let t=Array.prototype.filter.call(e.options,e=>e.selected).map(e=>n?de(Co(e)):Co(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[ho](i)}finally{Cn(()=>{e._pendingValue===a&&(e._pendingValue=void 0)})}}),e[ho]=fo(r)},mounted(e,{value:t,modifiers:{number:n}}){So(e,t,n)},beforeUpdate(e,{value:t},n){e._modelValue=t,e[ho]=fo(n)},updated(e,{value:t,modifiers:{number:n}}){let r=e._pendingValue;e._pendingValue=void 0,r&&r[0]===e.multiple&&xo(t,r[1],r[0])||So(e,t,n)}};function xo(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 So(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=Co(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(de(s))}else if(Ee(Co(o),t)){e.selectedIndex!==a&&(e.selectedIndex=a);return}}!r&&e.selectedIndex!==-1&&(e.selectedIndex=-1)}}function Co(e){return`_value`in e?e._value:e.value}var wo=[`ctrl`,`shift`,`alt`,`meta`],To={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)=>wo.some(n=>e[`${n}Key`]&&!t.includes(n))},Eo=(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=To[t[e]];if(r&&r(n,t))return}return e(n,...r)}))},Do=s({patchProp:co},Na),Oo;function ko(){return Oo||=Ti(Do)}var Ao=((...e)=>{let t=ko().createApp(...e),{mount:n}=t;return t.mount=e=>{let r=Mo(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,jo(r));return r instanceof Element&&(r.removeAttribute(`v-cloak`),r.setAttribute(`data-v-app`,``)),a},t});function jo(e){if(e instanceof SVGElement)return`svg`;if(typeof MathMLElement==`function`&&e instanceof MathMLElement)return`mathml`}function Mo(e){return g(e)?document.querySelector(e):e}var No=`296 62 430 108`,Po=`300 62 124 110`,Fo=4.5,Io=[`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`],Lo=`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`,Ro=[`id`],zo=[`id`],Bo=[`fill`],Vo=[`mask`],Ho={class:`hwx-wire`},Uo=[`cx`],Wo={class:`hwx-hop`},Go=[`stroke-width`],Ko=[`d`],qo=z({__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:E([`block h-auto`,e.active?`hwx-run`:void 0])},[q(`defs`,null,[q(`linearGradient`,{id:P(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,Ro),q(`mask`,{id:P(n),maskUnits:`userSpaceOnUse`,x:`0`,y:`0`,width:`256`,height:`150`},[q(`rect`,{width:`256`,height:`150`,fill:`url(#${P(r)})`},null,8,Bo)],8,zo)]),q(`g`,{mask:`url(#${P(n)})`},[q(`g`,Ho,[a[1]||=q(`line`,{class:`stroke-muted`,x1:`-192`,y1:`122`,x2:`448`,y2:`122`,"stroke-width":`1.5`},null,-1),(W(!0),G(U,null,B(P(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,Uo))),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,Vo),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`,Wo,[q(`g`,{transform:`translate(-132.64 10.80) scale(0.72)`,class:`stroke-mark`,fill:`none`,"stroke-width":P(Fo),"stroke-linecap":`round`,"stroke-linejoin":`round`},[(W(!0),G(U,null,B(P(Io),(e,t)=>(W(),G(`path`,{key:t,d:e},null,8,Ko))),128))],8,Go)])],2))}}),Jo={class:`flex h-full flex-col items-center justify-center gap-4 p-8 text-center`,role:`status`},Yo={class:`text-sm text-muted`},Xo=z({__name:`ConnectingState`,props:{connecting:{type:Boolean}},setup(e){return(t,n)=>(W(),G(`div`,Jo,[J(qo,{class:`w-44`,active:e.connecting},null,8,[`active`]),q(`p`,Yo,D(e.connecting?`Connecting to the tunnel`:`Not connected to the tunnel`),1)]))}}),Zo={connecting:`Connecting`,live:`Live`,reconnecting:`Reconnecting`,closed:`Disconnected`};function Qo(e,t){return e?`closed`:t?`reconnecting`:`connecting`}function $o(e){return e===`connecting`||e===`reconnecting`}function es(){let e=N(!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 ts=[`aria-label`],ns={"aria-live":`polite`},rs=z({__name:`CopyButton`,props:{text:{},label:{}},setup(e){let{copied:t,copy:n}=es();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=>P(n)(e.text)},[q(`span`,ns,D(P(t)?`Copied`:`Copy`),1)],8,ts))}}),is={class:`flex h-full items-center justify-center overflow-y-auto p-8`},as={class:`w-full max-w-2xl`},os={key:0,class:`mt-2 text-sm text-muted`},ss={class:`mt-4 flex items-start gap-2 rounded-md border border-hairline bg-well p-3`},cs={class:`min-w-0 flex-1 text-xs leading-5 break-all text-ink`},ls={class:`mt-4 text-sm text-muted`},us={class:`font-mono text-xs text-ink`},ds={class:`font-mono text-xs text-ink`},fs={key:2,class:`mt-2 text-sm text-muted`},ps=z({__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`,is,[q(`div`,as,[J(qo,{class:`mb-6 w-44`,active:P($o)(e.stream)},null,8,[`active`]),i[5]||=q(`h2`,{class:`text-subheading`},`No requests yet`,-1),e.status?.watching?(W(),G(`p`,os,` 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(U,{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`,ss,[q(`code`,cs,[i[0]||=q(`span`,{class:`text-muted select-none`},`$ `,-1),Y(D(r.value),1)]),J(rs,{text:r.value,label:`Copy curl command`},null,8,[`text`])]),q(`p`,ls,[i[1]||=Y(` Everything sent to `,-1),q(`span`,us,D(n.value.entryUrl),1),i[2]||=Y(` is forwarded to `,-1),q(`span`,ds,D(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`,fs,`Waiting for the tunnel.`))])]))}});function ms(e){return e.response.status===101}var hs=[[/^(emergency|alert|critical|crit|error|err|fatal)$/i,`error`],[/^(warning|warn)$/i,`warning`],[/^(notice|info)$/i,`info`],[/^(debug|trace)$/i,`debug`]];function gs(e){let t=e.slice(0,2048).split(`
|
|
3
|
+
`,1)[0]??``,n=/\.(EMERGENCY|ALERT|CRITICAL|ERROR|WARNING|NOTICE|INFO|DEBUG):/.exec(t)?.[1]??/"(?:level|level_name|severity)"\s*:\s*"([A-Za-z]+)"/.exec(t)?.[1]??/^\S*\s*\[?\b(FATAL|ERROR|ERR|WARN|WARNING|INFO|DEBUG|TRACE)\b\]?/.exec(t.replace(/^\[[^\]]*\]\s*/,``))?.[1];if(n===void 0)return null;for(let[e,t]of hs)if(e.test(n))return t;return null}var _s=class extends Error{status;code;constructor(e,t,n){super(n),this.status=e,this.code=t}},vs=`api/`;async function ys(e,t){let n;try{n=await fetch(e,t)}catch{throw new _s(0,`unreachable`,`The tunnel does not answer. Is it still running?`)}if(!n.ok){let e=await n.json().catch(()=>null);throw new _s(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 bs(){return ys(`${vs}status`)}function xs(e){let t=new URLSearchParams({origin:e.origin,limit:String(e.limit)});return e.before!==void 0&&t.set(`before`,String(e.before)),ys(`${vs}exchanges?${t.toString()}`)}async function Ss(e,t){let n=[],r=null;for(;;){let i=new URLSearchParams({origin:e});r!==null&&i.set(`after`,String(r));let a=await ys(`${vs}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 Cs(e){let t=new URLSearchParams;return e.exchangeId!==void 0&&t.set(`exchangeId`,e.exchangeId),e.origin!==void 0&&t.set(`origin`,e.origin),e.limit!==void 0&&t.set(`limit`,String(e.limit)),ys(`${vs}log-entries?${t.toString()}`)}function ws(e,t){let n=new URLSearchParams({origin:e.origin,index:String(e.index)});return ys(`${vs}replay/${encodeURIComponent(e.exchange.id)}?${n.toString()}`,{method:`POST`,...t===void 0?{}:{headers:{"content-type":`application/json`},body:JSON.stringify(t)}})}function Ts(e){return e>=200&&e<300?`success`:e>=300&&e<400?`info`:e>=400&&e<500?`warning`:e>=500&&e<600?`danger`:`neutral`}var Es={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`},Ds={local:`local`,replay:`replay`,p2p_peer:`peer`,public_edge:`public`};function Os(e){return Ds[e]}function ks(e){return e<1e3?`${e} ms`:`${(e/1e3).toFixed(e<1e4?2:1)} s`}function As(e){return e<1024?`${e} B`:e<1048576?`${(e/1024).toFixed(1)} kB`:`${(e/1048576).toFixed(1)} MB`}function js(e,t){return t?`Binary body; the log keeps its first ${As(e)}. It is not shown.`:`Binary body of ${As(e)}. It is not shown, but it is replayed as captured.`}function Ms(e){let t=new Date(e),n=e=>String(e).padStart(2,`0`);return`${n(t.getHours())}:${n(t.getMinutes())}:${n(t.getSeconds())}`}function Ns(e){return e.length<=20?e:`${e.slice(0,10)}...${e.slice(-6)}`}function Ps(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 Fs(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 Is(e){return Fs(new TextEncoder().encode(e))}function Ls(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 Rs(e){let t=e.trim();if(t===``)return null;try{return JSON.stringify(JSON.parse(t),null,2)}catch{return null}}function zs(e,t=!1){if(e===``)return{kind:`empty`};let n=Ps(e),r=Ls(n,t);if(r===null)return{kind:`binary`,bytes:n.length};let i=Rs(r);return i!==null&&/^\s*[[{]/.test(r)?{kind:`json`,text:r,formatted:i,bytes:n.length}:{kind:`text`,text:r,bytes:n.length}}function Bs(e,t){return`${e}:${t}`}function Vs(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 Hs(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 Us(e){if(!e.binary){let t=zs(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=Ps(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 Ws(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=Us(e);return r.kind!==`binary`&&r.text.toLowerCase().includes(n)})}function Gs(e){switch(e){case`client`:return`the client`;case`service`:return`the service`;case`hopwire`:return`Hopwire`}return e}function Ks(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 qs=0;function Js(e=``){return qs+=1,{key:qs,binary:!1,text:e,dataBase64:``,length:0,truncated:!1}}function Ys(e,t,n){return{path:e,headers:t.map(([e,t])=>({name:e,value:t})),messages:n.filter(e=>e.direction===`in`).map(e=>{qs+=1;let t=e.binary?null:Us(e),n=t!==null&&t.kind!==`binary`;return{key:qs,binary:!n,text:n?t.text:``,dataBase64:e.dataBase64,atMs:e.atMs,length:e.length,truncated:e.truncated}}),timing:`recorded`}}var Xs=/^[!#$%&'*+\-.^_`|~0-9A-Za-z]+$/;function Zs(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(!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.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 Qs(e){let t=e.messages.map(e=>({binary:e.binary,dataBase64:e.binary?e.dataBase64:Is(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 $s=[`GET`,`POST`,`PUT`,`PATCH`,`DELETE`,`HEAD`,`OPTIONS`],ec=/^[!#$%&'*+\-.^_`|~0-9A-Za-z]+$/;function tc(e){let{request:t}=e,n=zs(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 nc(e,t){if(!ec.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(!ec.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 rc(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:Is(e.body)}:{}}}function ic(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 ac(e,t,n=[]){let r=ic(e,t);if(r!==null)return{replay:r,editAndReplay:r};if(ms(t))return{replay:Ks(n),editAndReplay:null};let{request:i}=t;if(!i.bodyTruncated)return{replay:null,editAndReplay:null};if(zs(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 oc(e,t){return e===null?null:e.watching?e.replayTarget:e.services.find(e=>e.name===t.serviceName)?.target??null}function sc(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 cc=2e3;function lc(e){return e.flatMap(({origin:e,block:t})=>t.entries.map(n=>({key:`${e}:${t.serviceName}:${t.source}:${t.seq}:${n.readAt}:${n.length}:${n.text.slice(0,200)}`,origin:e,serviceName:t.serviceName,source:t.source,entry:n,level:gs(n.text)})))}function uc(e,t,n=cc){let r=new Map(e.map(e=>[e.key,e])),i=!1;for(let e of t)r.has(e.key)||(r.set(e.key,e),i=!0);if(!i)return e;let a=[...r.values()].sort((e,t)=>e.entry.readAt-t.entry.readAt);return a.length>n?a.slice(a.length-n):a}function dc(e){return e.reduce((e,{block:t})=>({entries:e.entries+(t.omitted?.entries??0),bytes:e.bytes+(t.omitted?.bytes??0)}),{entries:0,bytes:0})}function fc(e,t,n){return e.filter(e=>e.origin===t&&e.entry.exchangeIds.includes(n))}function pc(e,t){let n=t.text.trim().toLowerCase();return e.filter(e=>(t.source===``||e.source===t.source)&&(t.level===``||e.level===t.level)&&(n===``||e.entry.text.toLowerCase().includes(n)))}var mc=/^\s*(#\d+\s|at\s)/,hc=/[/\\](vendor|node_modules|site-packages)[/\\]/;function gc(e){return e.split(`
|
|
4
|
+
`).map(e=>({text:e,appFrame:mc.test(e)&&!hc.test(e)}))}var _c={error:`Error`,warning:`Warning`,info:`Info`,debug:`Debug`},vc={class:`space-y-2`,"aria-live":`polite`},yc=[`onClick`],bc={class:`flex flex-wrap items-center gap-x-3 gap-y-1 text-xs text-muted`},xc={class:`font-mono text-tag-fg`},Sc={class:`tabular-nums`},Cc={key:1,class:`rounded-full bg-info-bg px-2 py-0.5 text-info-fg`},wc={key:2,class:`text-warn-fg`},Tc={key:3,class:`text-warn-fg`},Ec={key:4},Dc={key:0,class:`mt-2 rounded-sm bg-warn-bg px-3 py-2 text-sm text-warn-fg`,role:`note`},Oc={class:`mt-2 max-h-80 overflow-auto font-mono text-xs leading-5 break-words whitespace-pre-wrap text-muted`},kc=z({__name:`LogEntryList`,props:{items:{},exchangeId:{default:null},selectable:{type:Boolean,default:!1}},emits:[`select`],setup(e,{emit:t}){let n=t,r={error:`bg-err-bg text-err-fg`,warning:`bg-warn-bg text-warn-fg`,info:`bg-info-bg text-info-fg`,debug:`bg-tag-bg text-tag-fg`};function i(e,t){return e.entry.exchangeIds.filter(e=>e!==t).length}return(t,a)=>(W(),G(`ol`,vc,[(W(!0),G(U,null,B(e.items,t=>(W(),G(`li`,{key:t.key,class:E([`rounded-sm border border-hairline bg-surface p-3`,e.selectable&&t.entry.exchangeIds.length>0?`cursor-pointer hover:border-line-strong`:``]),onClick:r=>e.selectable&&t.entry.exchangeIds.length>0&&n(`select`,t)},[q(`div`,bc,[t.level?(W(),G(`span`,{key:0,class:E([`rounded-sm px-1.5 py-0.5 font-medium`,r[t.level]])},D(P(_c)[t.level]),3)):X(``,!0),q(`span`,xc,D(t.source),1),q(`span`,Sc,D(P(Ms)(t.entry.readAt)),1),t.origin===`remote`?(W(),G(`span`,Cc,` watching `)):X(``,!0),t.entry.ambiguous&&e.exchangeId!==null?(W(),G(`span`,wc,` also linked to `+D(i(t,e.exchangeId))+` other `+D(i(t,e.exchangeId)===1?`request`:`requests`),1)):t.entry.ambiguous?(W(),G(`span`,Tc,` logged while `+D(t.entry.exchangeIds.length)+` requests were in flight `,1)):e.selectable&&t.entry.exchangeIds.length===0?(W(),G(`span`,Ec,`not linked to a request`)):X(``,!0)]),t.entry.truncated?(W(),G(`p`,Dc,` Truncated: the log keeps the first `+D(P(As)(16384))+` of this entry of `+D(P(As)(t.entry.length))+`. `,1)):X(``,!0),q(`pre`,Oc,[(W(!0),G(U,null,B(P(gc)(t.entry.text),(e,t)=>(W(),G(`span`,{key:t,class:E(e.appFrame||t===0?`text-ink`:``)},D(e.text)+D(`
|
|
5
|
+
`),3))),128))])],10,yc))),128))]))}}),Ac={class:`space-y-6`},jc={key:0,class:`mt-2 text-sm text-muted`},Mc={key:1,class:`mt-2 w-full table-fixed border-collapse text-left font-mono text-xs`},Nc={scope:`row`,class:`w-2/5 py-1.5 pr-3 font-normal break-words text-muted`},Pc={class:`py-1.5 break-all text-ink`},Fc={class:`flex items-center gap-3`},Ic={key:0,class:`text-xs text-muted`},Lc={key:0,class:`mt-2 rounded-sm bg-warn-bg px-3 py-2 text-sm text-warn-fg`,role:`note`},Rc={key:1,class:`mt-2 text-sm text-muted`},zc={key:2,class:`mt-2 text-sm text-muted`},Bc={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`},Vc=z({__name:`MessageView`,props:{headers:{},bodyBase64:{},bodyTruncated:{type:Boolean}},setup(e){let t=e,n=Q(()=>zs(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, ${As(n.value.bytes)}`;case`text`:return`Text, ${As(n.value.bytes)}`;case`binary`:return`Binary, ${As(n.value.bytes)}`}return``});return(t,a)=>(W(),G(`div`,Ac,[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`,jc,`No headers.`)):(W(),G(`table`,Mc,[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(U,null,B(e.headers,(e,t)=>(W(),G(`tr`,{key:t,class:`border-b border-hairline align-top`},[q(`th`,Nc,D(e[0]),1),q(`td`,Pc,D(e[1]),1)]))),128))])]))]),q(`section`,null,[q(`div`,Fc,[a[2]||=q(`h3`,{class:`text-xs font-medium tracking-wider text-muted uppercase`},`Body`,-1),i.value?(W(),G(`span`,Ic,D(i.value),1)):X(``,!0),r.value===null?X(``,!0):(W(),K(rs,{key:1,class:`ml-auto`,text:r.value,label:`Copy body`},null,8,[`text`]))]),e.bodyTruncated?(W(),G(`p`,Lc,` Truncated: the log keeps only the first `+D(P(As)(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`,Rc,`No body.`)):n.value.kind===`binary`?(W(),G(`p`,zc,D(P(js)(n.value.bytes,e.bodyTruncated)),1)):(W(),G(`pre`,Bc,D(r.value),1))])]))}}),Hc={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`},Uc=z({__name:`MethodBadge`,props:{method:{}},setup(e){return(t,n)=>(W(),G(`span`,Hc,D(e.method),1))}}),Wc=[`viewBox`],Gc=[`stroke-width`],Kc=[`d`],qc=z({__name:`MarkLoader`,setup(e){return(e,t)=>(W(),G(`svg`,{viewBox:P(Po),"aria-hidden":`true`,focusable:`false`,class:`block w-auto shrink-0`},[q(`g`,{class:`stroke-current`,fill:`none`,"stroke-width":P(Fo),"stroke-linecap":`round`,"stroke-linejoin":`round`},[(W(!0),G(U,null,B(P(Io),(e,t)=>(W(),G(`path`,{key:t,d:e,pathLength:`1`,class:E(`hwl hwl-${t+1}`)},null,10,Kc))),128))],8,Gc)],8,Wc))}}),Jc=[`type`,`disabled`,`aria-busy`],$=z({__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:E([`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(qc,{key:0,class:`h-4`})):X(``,!0),Cr(n.$slots,`default`)],10,Jc))}}),Yc={class:`flex gap-3`},Xc={class:`w-32 shrink-0`},Zc=[`value`],Qc={class:`min-w-0 flex-1`},$c={class:`mt-1.5 space-y-1.5`},el=[`onUpdate:modelValue`,`aria-label`],tl=[`onUpdate:modelValue`,`aria-label`],nl={class:`mt-2 flex items-center gap-3`},rl={class:`flex items-center gap-3`},il={key:0,class:`mt-1.5 rounded-sm bg-warn-bg px-3 py-2 text-sm text-warn-fg`,role:`note`},al={key:2,class:`mt-1.5 text-sm text-muted`},ol={class:`sticky bottom-0 -mx-4 space-y-3 border-t border-hairline bg-ground px-4 py-3`},sl={key:0,class:`rounded-sm bg-err-bg px-3 py-2 text-sm text-err-fg`,role:`alert`},cl={class:`flex items-center gap-3`},ll={key:0,class:`truncate text-xs text-muted`},ul={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`,fl=z({__name:`ReplayEditor`,props:{exchange:{},target:{},sending:{type:Boolean},error:{}},emits:[`send`,`cancel`],setup(e,{emit:t}){let n=e,r=t,i=Ht(tc(n.exchange)),a=N(null),o=Q(()=>{let e=n.exchange.request.method.toUpperCase();return $s.includes(e)?[...$s]:[...$s,e]}),s=Q(()=>i.bodyEditable&&Rs(i.body)!==null);function c(){i.body=Rs(i.body)??i.body}function l(){i.headers.push({name:``,value:``})}function u(e){i.headers.splice(e,1)}function d(){a.value=nc(i,n.exchange),a.value===null&&r(`send`,rc(i))}return(t,n)=>(W(),G(`form`,{class:`space-y-6 px-4 pt-4`,"aria-label":`Edit and replay`,novalidate:``,onSubmit:Eo(d,[`prevent`])},[q(`div`,Yc,[q(`div`,Xc,[n[4]||=q(`label`,{class:`text-xs font-medium tracking-wider text-muted uppercase`,for:`replay-method`},` Method `,-1),R(q(`select`,{id:`replay-method`,"onUpdate:modelValue":n[0]||=e=>i.method=e,class:E([`mt-1.5`,dl])},[(W(!0),G(U,null,B(o.value,e=>(W(),G(`option`,{key:e,value:e},D(e),9,Zc))),128))],512),[[bo,i.method]])]),q(`div`,Qc,[n[5]||=q(`label`,{class:`text-xs font-medium tracking-wider text-muted uppercase`,for:`replay-path`},`Path`,-1),R(q(`input`,{id:`replay-path`,"onUpdate:modelValue":n[1]||=e=>i.path=e,type:`text`,autocomplete:`off`,spellcheck:`false`,class:E([`mt-1.5`,dl])},null,512),[[vo,i.path]])])]),q(`fieldset`,null,[n[9]||=q(`legend`,{class:`text-xs font-medium tracking-wider text-muted uppercase`},`Headers`,-1),q(`ul`,$c,[(W(!0),G(U,null,B(i.headers,(e,t)=>(W(),G(`li`,{key:t,class:`flex gap-1.5`},[R(q(`input`,{"onUpdate:modelValue":t=>e.name=t,type:`text`,autocomplete:`off`,spellcheck:`false`,placeholder:`Name`,"aria-label":`Header ${t+1} name`,class:E([`basis-2/5`,dl])},null,8,el),[[vo,e.name]]),R(q(`input`,{"onUpdate:modelValue":t=>e.value=t,type:`text`,autocomplete:`off`,spellcheck:`false`,placeholder:`Value`,"aria-label":`Header ${t+1} value`,class:E([`basis-3/5`,dl])},null,8,tl),[[vo,e.value]]),J($,{variant:`quiet`,"aria-label":`Remove header ${e.name||t+1}`,onClick:e=>u(t)},{default:L(()=>[...n[6]||=[Y(` Remove `,-1)]]),_:1},8,[`aria-label`,`onClick`])]))),128))]),q(`div`,nl,[J($,{onClick:l},{default:L(()=>[...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`,rl,[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:L(()=>[...n[10]||=[Y(`Format JSON`,-1)]]),_:1})):X(``,!0)]),e.exchange.request.bodyTruncated&&i.bodyEditable?(W(),G(`p`,il,` The log holds only the first part of this body. What you send is exactly the text below. `)):X(``,!0),i.bodyEditable?R((W(),G(`textarea`,{key:1,id:`replay-body`,"onUpdate:modelValue":n[2]||=e=>i.body=e,rows:`12`,spellcheck:`false`,class:E([`mt-1.5 leading-5`,dl])},null,512)),[[vo,i.body]]):(W(),G(`p`,al,` The body is binary and cannot be edited here. It is sent as captured. `))]),q(`div`,ol,[a.value||e.error?(W(),G(`p`,sl,D(a.value??e.error),1)):X(``,!0),q(`div`,cl,[J($,{type:`submit`,variant:`primary`,loading:e.sending},{default:L(()=>[Y(D(e.sending?`Sending`:`Send replay`),1)]),_:1},8,[`loading`]),J($,{disabled:e.sending,onClick:n[3]||=e=>r(`cancel`)},{default:L(()=>[...n[12]||=[Y(`Cancel`,-1)]]),_:1},8,[`disabled`]),e.target?(W(),G(`span`,ll,[n[13]||=Y(` Goes to `,-1),q(`span`,ul,D(e.target),1)])):X(``,!0)])])],32))}}),pl=z({__name:`StatusBadge`,props:{status:{}},setup(e){let t=e,n=Q(()=>Es[Ts(t.status)]);return(t,r)=>(W(),G(`span`,{class:E([`inline-flex shrink-0 rounded-sm px-1.5 py-0.5 font-mono text-xs font-medium tabular-nums`,n.value])},D(e.status),3))}}),ml={class:`space-y-3`,"aria-label":`WebSocket messages`},hl={class:`flex gap-2`},gl=[`value`],_l={key:0,class:`rounded-sm bg-err-bg px-3 py-2 text-sm text-err-fg`,role:`alert`},vl={key:1,class:`text-sm text-muted`},yl={key:2,class:`text-sm text-muted`},bl={key:3,class:`text-sm text-muted`},xl={class:`space-y-2`,"aria-live":`polite`},Sl=[`aria-label`],Cl={class:`flex items-center gap-3 text-xs text-muted`},wl={class:`tabular-nums`},Tl={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`},Dl={class:`mt-2 max-h-80 overflow-auto font-mono text-xs leading-5 break-words whitespace-pre-wrap text-ink`},Ol={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`},kl={key:0,class:`text-warn-fg`},Al={key:5,class:`text-xs text-muted`},jl=z({__name:`WsMessages`,props:{blocks:{},failure:{}},setup(e){let t=e,n=N(``),r=N(``),i=Q(()=>Hs(t.blocks??[])),a=Q(()=>Ws(i.value.messages,{text:n.value,direction:r.value}).map(e=>({message:e,view:Us(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 ${Gs(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`,ml,[q(`div`,hl,[l[2]||=q(`label`,{class:`sr-only`,for:`ws-filter`},`Filter messages`,-1),R(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),[[vo,n.value]]),l[3]||=q(`label`,{class:`sr-only`,for:`ws-direction`},`Filter by direction`,-1),R(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(U,null,B(c,e=>q(`option`,{key:e.value,value:e.value},D(e.label),9,gl)),64))],512),[[bo,r.value]])]),e.failure?(W(),G(`p`,_l,D(e.failure),1)):e.blocks===null?(W(),G(`p`,vl,`Loading messages.`)):i.value.messages.length===0&&i.value.close===null?(W(),G(`p`,yl,` No messages yet. New ones appear here as they pass. `)):a.value.length===0&&o.value?(W(),G(`p`,bl,`No message matches the filter.`)):X(``,!0),q(`ol`,xl,[(W(!0),G(U,null,B(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`,Cl,[q(`span`,{class:E([`font-mono font-medium`,e.direction===`in`?`text-cyan-text`:`text-green-text`]),"aria-hidden":`true`},D(e.direction===`in`?`Client → service`:`Service → client`),3),q(`span`,wl,`+`+D(e.atMs)+` ms`,1),q(`span`,Tl,D(P(As)(e.length)),1),q(`span`,null,D(t.kind===`json`?`JSON`:t.kind===`text`?`Text`:`Binary`),1),t.kind===`binary`?(W(),K(rs,{key:0,class:`ml-auto`,text:e.dataBase64,label:`Copy message as Base64`},null,8,[`text`])):(W(),K(rs,{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 `+D(P(As)(65536))+` of this message of `+D(P(As)(e.length))+`. The full message was carried. `,1)):X(``,!0),q(`pre`,Dl,D(t.kind===`json`?t.formatted:t.kind===`text`?t.text:`${t.hex}${t.more?` ...`:``}`),1)],8,Sl))),128))]),i.value.close?(W(),G(`div`,Ol,[q(`p`,null,D(s.value),1),i.value.close.omittedMessages>0?(W(),G(`p`,kl,D(i.value.close.omittedMessages)+` `+D(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`,Al,`Open. New messages appear here as they pass.`))]))}}),Ml={class:`mt-1.5 space-y-1.5`},Nl=[`onUpdate:modelValue`,`aria-label`],Pl=[`onUpdate:modelValue`,`aria-label`],Fl={class:`mt-2 flex items-center gap-3`},Il={key:0,class:`mt-1.5 text-sm text-muted`},Ll={class:`mt-1.5 space-y-2`},Rl={class:`flex items-center gap-2 text-xs text-muted`},zl={class:`font-medium text-ink`},Bl={key:0,class:`tabular-nums`},Vl={key:1},Hl={key:0,class:`mt-2 rounded-sm bg-warn-bg px-3 py-2 text-sm text-warn-fg`,role:`note`},Ul={key:1,class:`mt-2 text-sm text-muted`},Wl=[`onUpdate:modelValue`,`aria-label`],Gl={class:`mt-1.5 space-y-1.5 text-sm text-ink`},Kl={class:`flex items-center gap-2`},ql={class:`flex items-center gap-2`},Jl={class:`sticky bottom-0 -mx-4 space-y-3 border-t border-hairline bg-ground px-4 py-3`},Yl={key:0,class:`rounded-sm bg-err-bg px-3 py-2 text-sm text-err-fg`,role:`alert`},Xl={class:`flex items-center gap-3`},Zl={key:0,class:`truncate text-xs text-muted`},Ql={class:`font-mono`},$l=`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`,eu=`text-xs font-medium tracking-wider text-muted uppercase`,tu=z({__name:`WsReplayEditor`,props:{exchange:{},messages:{},target:{},sending:{type:Boolean},error:{}},emits:[`send`,`cancel`],setup(e,{emit:t}){let n=e,r=t,i=Ht(Ys(n.exchange.request.path,n.exchange.request.headers,n.messages)),a=N(null);function o(){i.headers.push({name:``,value:``})}function s(e){i.headers.splice(e,1)}function c(){i.messages.push(Js())}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=Zs(i),a.value===null&&r(`send`,Qs(i))}return(t,n)=>(W(),G(`form`,{class:`space-y-6 px-4 pt-4`,"aria-label":`Edit and replay the WebSocket`,novalidate:``,onSubmit:Eo(d,[`prevent`])},[q(`div`,null,[q(`label`,{class:E(eu),for:`ws-replay-path`},`Path`),R(q(`input`,{id:`ws-replay-path`,"onUpdate:modelValue":n[0]||=e=>i.path=e,type:`text`,autocomplete:`off`,spellcheck:`false`,class:E([`mt-1.5`,$l])},null,512),[[vo,i.path]])]),q(`fieldset`,null,[q(`legend`,{class:E(eu)},`Headers`),q(`ul`,Ml,[(W(!0),G(U,null,B(i.headers,(e,t)=>(W(),G(`li`,{key:t,class:`flex gap-1.5`},[R(q(`input`,{"onUpdate:modelValue":t=>e.name=t,type:`text`,autocomplete:`off`,spellcheck:`false`,placeholder:`Name`,"aria-label":`Header ${t+1} name`,class:E([`basis-2/5`,$l])},null,8,Nl),[[vo,e.name]]),R(q(`input`,{"onUpdate:modelValue":t=>e.value=t,type:`text`,autocomplete:`off`,spellcheck:`false`,placeholder:`Value`,"aria-label":`Header ${t+1} value`,class:E([`basis-3/5`,$l])},null,8,Pl),[[vo,e.value]]),J($,{variant:`quiet`,"aria-label":`Remove header ${e.name||t+1}`,onClick:e=>s(t)},{default:L(()=>[...n[4]||=[Y(` Remove `,-1)]]),_:1},8,[`aria-label`,`onClick`])]))),128))]),q(`div`,Fl,[J($,{onClick:o},{default:L(()=>[...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:E(eu)},`Messages from the client`),i.messages.length===0?(W(),G(`p`,Il,` No messages. The WebSocket opens, waits 5 s for the service and closes. `)):X(``,!0),q(`ol`,Ll,[(W(!0),G(U,null,B(i.messages,(e,t)=>(W(),G(`li`,{key:e.key,class:`rounded-sm border border-hairline bg-surface p-3`},[q(`div`,Rl,[q(`span`,zl,D(t+1),1),q(`span`,null,D(e.binary?`Binary`:`Text`),1),e.atMs===void 0?(W(),G(`span`,Vl,`Added`)):(W(),G(`span`,Bl,`+`+D(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:L(()=>[...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:L(()=>[...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:L(()=>[...n[9]||=[Y(` Remove `,-1)]]),_:1},8,[`aria-label`,`onClick`])]),e.truncated?(W(),G(`p`,Hl,[e.binary?(W(),G(U,{key:0},[Y(` Captured only in part (`+D(P(As)(e.length))+` in full), so it cannot be sent. Remove it to replay the rest. `,1)],64)):(W(),G(U,{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`,Ul,` Binary, `+D(P(As)(e.length))+`. It cannot be edited here and is sent as captured. `,1)):e.binary?X(``,!0):R((W(),G(`textarea`,{key:2,"onUpdate:modelValue":t=>e.text=t,rows:`3`,spellcheck:`false`,class:E([`mt-2 leading-5`,$l]),"aria-label":`Text of message ${t+1}`},null,8,Wl)),[[vo,e.text]])]))),128))]),J($,{class:`mt-2`,onClick:c},{default:L(()=>[...n[10]||=[Y(`Add text message`,-1)]]),_:1})]),q(`fieldset`,null,[q(`legend`,{class:E(eu)},`Timing`),q(`div`,Gl,[q(`label`,Kl,[R(q(`input`,{"onUpdate:modelValue":n[1]||=e=>i.timing=e,type:`radio`,name:`ws-timing`,value:`recorded`},null,512),[[yo,i.timing]]),n[11]||=Y(` As recorded: the gaps between the messages, each at most 5 s `,-1)]),q(`label`,ql,[R(q(`input`,{"onUpdate:modelValue":n[2]||=e=>i.timing=e,type:`radio`,name:`ws-timing`,value:`fast`},null,512),[[yo,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`,Jl,[a.value||e.error?(W(),G(`p`,Yl,D(a.value??e.error),1)):X(``,!0),q(`div`,Xl,[J($,{type:`submit`,variant:`primary`,loading:e.sending},{default:L(()=>[Y(D(e.sending?`Sending`:`Send replay`),1)]),_:1},8,[`loading`]),J($,{disabled:e.sending,onClick:n[3]||=e=>r(`cancel`)},{default:L(()=>[...n[14]||=[Y(`Cancel`,-1)]]),_:1},8,[`disabled`]),e.target?(W(),G(`span`,Zl,[n[15]||=Y(` Goes to `,-1),q(`span`,Ql,D(e.target),1)])):X(``,!0)])])],32))}}),nu={class:`flex h-full min-h-0 flex-col`,"aria-label":`Request details`},ru={class:`border-b border-hairline p-4`},iu={class:`flex items-start gap-2`},au={class:`min-w-0 flex-1 font-mono text-sm leading-5 font-normal break-all text-ink`},ou={class:`mt-2 flex flex-wrap gap-x-4 gap-y-1 text-xs text-muted`},su={class:`flex gap-1`},cu={class:`text-tag-fg tabular-nums`},lu={class:`flex gap-1`},uu={class:`text-tag-fg tabular-nums`},du={class:`flex gap-1`},fu={class:`text-tag-fg`},pu={class:`flex gap-1`},mu={class:`text-tag-fg`},hu={key:0,class:`flex gap-1`},gu={key:1,class:`flex gap-1`},_u={key:1,class:`font-mono text-tag-fg`},vu={key:0,class:`mt-3 flex flex-wrap items-center gap-2`},yu={key:0,class:`truncate text-xs text-muted`},bu={class:`font-mono`},xu={key:1,class:`mt-2 text-sm text-warn-fg`,role:`note`},Su={key:2,class:`mt-2 rounded-sm bg-err-bg px-3 py-2 text-sm text-err-fg`,role:`alert`},Cu={key:0,class:`min-h-0 flex-1 overflow-y-auto`},wu={class:`flex gap-1 border-b border-hairline px-4`,role:`tablist`,"aria-label":`Message`},Tu=[`id`,`aria-selected`,`onClick`],Eu=[`aria-labelledby`],Du=z({__name:`ExchangeDetail`,props:{record:{},status:{},originalLoaded:{type:Boolean},replay:{},wsBlocks:{default:null},wsFailure:{default:null},logs:{default:()=>[]}},emits:[`select`,`load-messages`,`load-logs`],setup(e,{emit:t}){let n=e,r=t,i=N(`request`),a=N(!1),o=N(!1),s=N(null),c=Q(()=>n.record.exchange),l=Q(()=>ms(c.value)),u=Q(()=>[`request`,`response`,...l.value?[`messages`]:[],...n.logs.length>0?[`logs`]:[]]),d=N(!1);function f(e){return e===`logs`?`Logs ${n.logs.length}`:e}function p(e){i.value=e,d.value=!0}let m=Q(()=>Hs(n.wsBlocks??[]).messages),h=Q(()=>oc(n.status,c.value)),g=Q(()=>{let e=ac(n.status,c.value,m.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}),_=Q(()=>g.value.replay);Vn(()=>[c.value.id,n.record.origin],()=>{a.value=!1,s.value=null,d.value=!1,u.value.includes(i.value)||(i.value=`request`),l.value&&r(`load-messages`,n.record),r(`load-logs`,n.record)},{immediate:!0}),Vn(()=>[c.value.id,n.logs.length>0],([,e])=>{e&&!d.value&&c.value.response.status>=500?i.value=`logs`:!e&&i.value===`logs`&&(i.value=`request`)},{immediate:!0});async function v(e){o.value=!0,s.value=null;try{let t=await n.replay(n.record,e);a.value=!1,i.value=l.value&&ms(t)?`messages`:`response`,r(`select`,t.id)}catch(e){s.value=e instanceof _s?e.message:`The replay could not be sent.`}finally{o.value=!1}}function y(){s.value=null,a.value=!0}return(t,n)=>(W(),G(`article`,nu,[q(`header`,ru,[q(`div`,iu,[J(Uc,{method:c.value.request.method},null,8,[`method`]),q(`h2`,au,D(c.value.request.path),1),J(pl,{status:c.value.response.status},null,8,[`status`])]),q(`dl`,ou,[q(`div`,su,[n[4]||=q(`dt`,null,`Time`,-1),q(`dd`,cu,D(P(Ms)(c.value.timestamp)),1)]),q(`div`,lu,[n[5]||=q(`dt`,null,`Duration`,-1),q(`dd`,uu,D(P(ks)(c.value.response.durationMs)),1)]),q(`div`,du,[n[6]||=q(`dt`,null,`Source`,-1),q(`dd`,fu,D(P(Os)(c.value.source)),1)]),q(`div`,pu,[n[7]||=q(`dt`,null,`Service`,-1),q(`dd`,mu,D(c.value.serviceName),1)]),e.record.origin===`remote`?(W(),G(`div`,hu,[...n[8]||=[q(`dt`,null,`Origin`,-1),q(`dd`,{class:`text-tag-fg`},`remote log`,-1)]])):X(``,!0),c.value.replayOf?(W(),G(`div`,gu,[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)},D(c.value.replayOf.slice(0,8)),1)):(W(),G(`span`,_u,D(c.value.replayOf.slice(0,8)),1))])])):X(``,!0)]),a.value?X(``,!0):(W(),G(`div`,vu,[J($,{variant:`primary`,loading:o.value,disabled:_.value!==null,onClick:n[1]||=e=>v()},{default:L(()=>[Y(D(o.value?`Sending`:`Replay`),1)]),_:1},8,[`loading`,`disabled`]),J($,{disabled:o.value||g.value.editAndReplay!==null,onClick:y},{default:L(()=>[...n[10]||=[Y(` Edit & Replay `,-1)]]),_:1},8,[`disabled`]),h.value&&_.value===null?(W(),G(`span`,yu,[n[11]||=Y(` Goes to `,-1),q(`span`,bu,D(h.value),1)])):X(``,!0)])),!a.value&&_.value?(W(),G(`p`,xu,D(_.value),1)):X(``,!0),!a.value&&s.value?(W(),G(`p`,Su,D(s.value),1)):X(``,!0)]),a.value?(W(),G(`div`,Cu,[l.value?(W(),K(tu,{key:`ws-${c.value.id}`,exchange:c.value,messages:m.value,target:h.value,sending:o.value,error:s.value,onSend:v,onCancel:n[2]||=e=>a.value=!1},null,8,[`exchange`,`messages`,`target`,`sending`,`error`])):(W(),K(fl,{key:c.value.id,exchange:c.value,target:h.value,sending:o.value,error:s.value,onSend:v,onCancel:n[3]||=e=>a.value=!1},null,8,[`exchange`,`target`,`sending`,`error`]))])):(W(),G(U,{key:1},[q(`div`,wu,[(W(!0),G(U,null,B(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:E([`-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=>p(e)},D(f(e)),11,Tu))),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(Vc,{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(jl,{key:1,blocks:e.wsBlocks,failure:e.wsFailure},null,8,[`blocks`,`failure`])):i.value===`logs`?(W(),K(kc,{key:2,items:e.logs,"exchange-id":c.value.id},null,8,[`items`,`exchange-id`])):(W(),K(Vc,{key:3,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 Ou(e){return`${e.origin}:${e.index}`}function ku(e,t){let n=new Map;for(let t of e)n.set(Ou(t),t);for(let e of t)n.set(Ou(e),e);return[...n.values()].sort((e,t)=>t.exchange.timestamp-e.exchange.timestamp||t.index-e.index)}function Au(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}${ms(e)?` ws`:``}`.toLowerCase();return n.every(e=>r.includes(e))})}function ju(e,t){return[...new Set([...t,...e.map(e=>e.exchange.serviceName)])].sort()}function Mu(e){return e?[`remote`,`own`]:[`own`]}function Nu(e,t){return e.reduce((e,n)=>n.origin===t&&(e===null||n.index<e)?n.index:e,null)}function Pu(e){let t=[];for(let n of[`remote`,`own`]){let r=Nu(e,n);r!==null&&r>0&&t.push({origin:n,before:r})}return t}var Fu={class:`flex h-full min-h-0 flex-col`},Iu={class:`flex gap-2 border-b border-hairline p-2`},Lu=[`value`],Ru={key:0,class:`p-4 text-sm text-muted`},zu={class:`min-h-0 flex-1 overflow-y-auto`,"aria-label":`Requests, newest first`},Bu=[`aria-current`,`onClick`],Vu={class:`flex items-center gap-2`},Hu=[`title`],Uu={class:`mt-1 flex items-center gap-2 text-xs text-muted`},Wu={class:`tabular-nums`},Gu={class:`tabular-nums`},Ku={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`},qu={key:1,class:`rounded-sm bg-info-bg px-1.5 py-px font-medium text-info-fg`},Ju={key:2,class:`truncate`},Yu={key:0,class:`p-2 text-center`},Xu=z({__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=N(``),a=N(``),o=Q(()=>n.services.length>1),s=Q(()=>Au(n.records,{text:i.value,service:a.value})),c=Q(()=>i.value.trim()!==``||a.value!==``);return(t,n)=>(W(),G(`div`,Fu,[q(`div`,Iu,[n[5]||=q(`label`,{class:`sr-only`,for:`traffic-filter`},`Filter requests`,-1),R(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),[[vo,i.value]]),o.value?(W(),G(U,{key:0},[n[4]||=q(`label`,{class:`sr-only`,for:`traffic-service`},`Filter by service`,-1),R(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(U,null,B(e.services,e=>(W(),G(`option`,{key:e,value:e},D(e),9,Lu))),128))],512),[[bo,a.value]])],64)):X(``,!0)]),s.value.length===0?(W(),G(`p`,Ru,D(c.value?`No request matches the filter.`:`No requests yet.`),1)):X(``,!0),q(`ul`,zu,[(W(!0),G(U,null,B(s.value,t=>(W(),G(`li`,{key:P(Ou)(t)},[q(`button`,{type:`button`,class:E([`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`,P(Ou)(t)===e.selectedKey?`border-l-ink bg-surface`:`border-l-transparent hover:bg-surface/60`]),"aria-current":P(Ou)(t)===e.selectedKey?`true`:void 0,onClick:e=>r(`select`,P(Ou)(t))},[q(`span`,Vu,[J(Uc,{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},D(t.exchange.request.path),9,Hu),J(pl,{status:t.exchange.response.status},null,8,[`status`])]),q(`span`,Uu,[q(`span`,Wu,D(P(Ms)(t.exchange.timestamp)),1),q(`span`,Gu,D(P(ks)(t.exchange.response.durationMs)),1),q(`span`,{class:E([`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`])},D(P(Os)(t.exchange.source)),3),P(ms)(t.exchange)?(W(),G(`span`,Ku,` ws `)):X(``,!0),t.origin===`remote`?(W(),G(`span`,qu,` remote `)):X(``,!0),o.value?(W(),G(`span`,Ju,D(t.exchange.serviceName),1)):X(``,!0)])],10,Bu)]))),128)),e.hasOlder?(W(),G(`li`,Yu,[J($,{variant:`quiet`,loading:e.loadingOlder,onClick:n[2]||=e=>r(`load-older`)},{default:L(()=>[Y(D(e.loadingOlder?`Loading`:`Load older requests`),1)]),_:1},8,[`loading`])])):X(``,!0)])]))}}),Zu={class:`flex h-full min-h-0 flex-col`,"aria-label":`Application logs`},Qu={class:`flex flex-wrap gap-2 border-b border-hairline px-4 py-2`},$u=[`value`],ed=[`value`],td={key:0,class:`rounded-sm bg-warn-bg px-3 py-2 text-sm text-warn-fg`,role:`note`},nd={key:1,class:`text-sm text-muted`},rd={key:2,class:`text-sm text-muted`},id=z({__name:`LogPane`,props:{items:{},omitted:{}},emits:[`select`],setup(e,{emit:t}){let n=e,r=t,i=N(``),a=N(``),o=N(``),s=Q(()=>[...new Set(n.items.map(e=>e.source))].sort()),c=Q(()=>pc(n.items,{text:i.value,source:a.value,level:o.value})),l=Q(()=>i.value.trim()!==``||a.value!==``||o.value!==``),u=[`error`,`warning`,`info`,`debug`],d=N(null),f=!0;function p(){let e=d.value;e!==null&&(f=e.scrollHeight-e.scrollTop-e.clientHeight<40)}async function m(){await Cn(),f&&d.value!==null&&(d.value.scrollTop=d.value.scrollHeight)}return pr(m),Vn(()=>c.value.length,m),(t,n)=>(W(),G(`section`,Zu,[q(`div`,Qu,[n[6]||=q(`label`,{class:`sr-only`,for:`log-filter`},`Filter log entries`,-1),R(q(`input`,{id:`log-filter`,"onUpdate:modelValue":n[0]||=e=>i.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),[[vo,i.value]]),n[7]||=q(`label`,{class:`sr-only`,for:`log-source`},`Filter by file`,-1),R(q(`select`,{id:`log-source`,"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[4]||=q(`option`,{value:``},`All files`,-1),(W(!0),G(U,null,B(s.value,e=>(W(),G(`option`,{key:e,value:e},D(e),9,$u))),128))],512),[[bo,a.value]]),n[8]||=q(`label`,{class:`sr-only`,for:`log-level`},`Filter by level`,-1),R(q(`select`,{id:`log-level`,"onUpdate:modelValue":n[2]||=e=>o.value=e,class:`rounded-sm border border-line-strong bg-well px-2 py-1.5 text-sm text-ink`},[n[5]||=q(`option`,{value:``},`All levels`,-1),(W(),G(U,null,B(u,e=>q(`option`,{key:e,value:e},D(P(_c)[e]),9,ed)),64))],512),[[bo,o.value]])]),q(`div`,{ref_key:`scroller`,ref:d,class:`min-h-0 flex-1 space-y-3 overflow-y-auto p-4`,onScroll:p},[e.omitted.entries>0?(W(),G(`p`,td,D(e.omitted.entries)+` `+D(e.omitted.entries===1?`entry was`:`entries were`)+` (`+D(P(As)(e.omitted.bytes))+`) not captured: a log file is captured up to 200 entries per second and 10 MB per run. `,1)):X(``,!0),e.items.length===0?(W(),G(`p`,nd,` No log entries yet. Start the tunnel with --log <path> (or logs: in hopwire.yaml) and new entries of the file appear here as they are written. `)):c.value.length===0&&l.value?(W(),G(`p`,rd,`No entry matches the filter.`)):X(``,!0),J(kc,{items:c.value,selectable:``,onSelect:n[3]||=e=>r(`select`,e)},null,8,[`items`])],544)]))}}),ad=`hopwire-inspector-theme`;function od(){try{return localStorage.getItem(ad)===`light`?`light`:`dark`}catch{return`dark`}}var sd=N(od());Vn(sd,e=>{document.documentElement.classList.toggle(`dark`,e===`dark`);try{localStorage.setItem(ad,e)}catch{}},{immediate:!0});function cd(){function e(){sd.value=sd.value===`dark`?`light`:`dark`}return{theme:sd,toggleTheme:e}}var ld=[`viewBox`],ud=[`stroke-width`],dd=[`d`,`pathLength`],fd=[`d`],pd=z({__name:`BrandLogo`,props:{animated:{type:Boolean,default:!1}},setup(e){return(t,n)=>(W(),G(`svg`,{viewBox:P(No),role:`img`,"aria-label":`Hopwire`,class:`block w-auto`},[q(`g`,{class:`stroke-mark`,fill:`none`,"stroke-width":P(Fo),"stroke-linecap":`round`,"stroke-linejoin":`round`},[(W(!0),G(U,null,B(P(Io),(t,n)=>(W(),G(`path`,{key:n,d:t,pathLength:e.animated?1:void 0,class:E(e.animated?`hwd-s hwd-s${n+1}`:void 0)},null,10,dd))),128))],8,ud),q(`g`,{class:E(e.animated?`hwd-w`:void 0)},[q(`path`,{class:`fill-ink`,d:P(Lo)},null,8,fd)],2)],8,ld))}}),md={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`},hd={class:`flex items-center gap-2.5 font-normal`},gd={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`},_d={key:1,class:`rounded-full bg-info-bg px-2 py-0.5 text-xs font-medium text-info-fg`},vd={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`},yd={class:`truncate font-mono text-xs text-ink`},bd={key:0,class:`flex items-center gap-1.5`},xd=[`title`],Sd={class:`flex items-center gap-1.5`},Cd=[`title`],wd={class:`flex min-w-0 items-center gap-1.5`},Td={key:0,class:`truncate font-mono text-xs text-ink`},Ed={class:`ml-auto flex items-center gap-3`},Dd={class:`flex items-center gap-1.5 text-xs text-tag-fg`,role:`status`},Od=z({__name:`StatusBar`,props:{status:{},stream:{},logCount:{default:0},logsOpen:{type:Boolean,default:!1}},emits:[`toggle-logs`],setup(e,{emit:t}){let n=e,r=t,{theme:i,toggleTheme:a}=cd(),o=Q(()=>n.status===null?null:sc(n.status));return(t,n)=>(W(),G(`header`,md,[q(`h1`,hd,[J(pd,{class:`h-6`}),n[1]||=q(`span`,{class:`text-muted`},`Inspector`,-1)]),e.status?(W(),G(`span`,gd,[q(`span`,{class:E([`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(` `+D(e.status.mode===`public`?`Public mode`:`Private mode`),1)])):X(``,!0),e.status?.watching?(W(),G(`span`,_d,` Watching a shared log `)):X(``,!0),e.status?(W(),G(`dl`,vd,[(W(!0),G(U,null,B(e.status.publicUrls,e=>(W(),G(`div`,{key:e,class:`flex min-w-0 items-center gap-1.5`},[n[2]||=q(`dt`,{class:`text-muted`},`Public URL`,-1),q(`dd`,yd,D(e),1),J(rs,{text:e,label:`Copy public URL`},null,8,[`text`])]))),128)),e.status.peerKey?(W(),G(`div`,bd,[n[3]||=q(`dt`,{class:`text-muted`},`Peer key`,-1),q(`dd`,{class:`font-mono text-xs text-ink`,title:e.status.peerKey},D(P(Ns)(e.status.peerKey)),9,xd),J(rs,{text:e.status.peerKey,label:`Copy peer key`},null,8,[`text`])])):X(``,!0),q(`div`,Sd,[n[4]||=q(`dt`,{class:`text-muted`},`Log key`,-1),q(`dd`,{class:`font-mono text-xs text-ink`,title:e.status.logKey},D(P(Ns)(e.status.logKey)),9,Cd),J(rs,{text:e.status.logKey,label:`Copy log key`},null,8,[`text`])]),q(`div`,wd,[n[5]||=q(`dt`,{class:`text-muted`},`Replay target`,-1),e.status.replayTarget?(W(),G(`dd`,Td,D(e.status.replayTarget),1)):o.value?(W(),G(`dd`,{key:1,class:E([`text-xs`,o.value.missing?`text-warn-fg`:`text-tag-fg`])},D(o.value.text),3)):X(``,!0)])])):X(``,!0),q(`div`,Ed,[q(`span`,Dd,[P($o)(e.stream)?(W(),K(qc,{key:0,class:`h-3.5`})):(W(),G(`span`,{key:1,class:E([`size-2 rounded-full`,e.stream===`live`?`bg-hop-green`:`border-[1.5px] border-muted`]),"aria-hidden":`true`},null,2)),Y(` `+D(P(Zo)[e.stream]),1)]),e.logCount>0||e.logsOpen?(W(),K($,{key:0,variant:`quiet`,"aria-pressed":e.logsOpen,"aria-controls":`log-pane`,onClick:n[0]||=e=>r(`toggle-logs`)},{default:L(()=>[Y(D(e.logsOpen?`Hide logs`:`Logs ${e.logCount}`),1)]),_:1},8,[`aria-pressed`])):X(``,!0),J($,{variant:`quiet`,"aria-label":`Switch to ${P(i)===`dark`?`light`:`dark`} mode`,onClick:P(a)},{default:L(()=>[Y(D(P(i)===`dark`?`Light`:`Dark`),1)]),_:1},8,[`aria-label`,`onClick`])])]))}}),kd=100;function Ad(){let e=N(null),t=$t([]),n=N(`connecting`),r=N(!1),i=N(!1),a=N(null),o=null,s=!1,c=$t(new Map),l=$t(new Map),u=$t([]),d=N({entries:0,bytes:0});function f(e){u.value=uc(u.value,lc(e));let t=dc(e);t.entries>0&&(d.value={entries:d.value.entries+t.entries,bytes:d.value.bytes+t.bytes})}async function p(e){try{let t=await Cs({exchangeId:e.exchange.id,origin:e.origin});u.value=uc(u.value,lc(t.blocks))}catch{}}async function m(){try{let e=await Cs({limit:500});u.value=uc(u.value,lc(e.blocks))}catch{}}function h(e,t){let n=new Map(c.value);n.set(e,t),c.value=n}async function g(e){let t=Bs(e.origin,e.exchange.id);c.value.has(t)||h(t,[]);try{let n=await Ss(e.origin,e.exchange.id);if(h(t,Vs(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 _s?e.message:`The messages could not be loaded.`),l.value=n}}let _=Q(()=>Pu(t.value).length>0),v=Q(()=>a.value??(n.value===`closed`?`The connection to the tunnel is closed. Reload the page to connect again.`:null)),y=Q(()=>!r.value&&v.value===null);async function b(){r.value||(a.value=null);try{let n=await bs(),i=(await Promise.all(Mu(n.watching).map(e=>xs({origin:e,limit:kd})))).flat(),o=e.value===null||e.value.logKey===n.logKey;e.value=n,t.value=ku(o?t.value:[],i),r.value=!0,a.value=null,o||(c.value=new Map,u.value=[],d.value={entries:0,bytes:0}),m();for(let e of c.value.keys()){let n=t.value.find(t=>Bs(t.origin,t.exchange.id)===e);n!==void 0&&g(n)}}catch(e){a.value=e instanceof _s?e.message:`The traffic could not be loaded.`}}function x(){let e=new EventSource(`${vs}stream`);o=e,e.addEventListener(`open`,()=>{s=!0,n.value=`live`,b()}),e.addEventListener(`exchange`,e=>{let n=JSON.parse(e.data);t.value=ku(t.value,[n])}),e.addEventListener(`ws_messages`,e=>{let{origin:t,block:n}=JSON.parse(e.data),r=Bs(t,n.exchangeId),i=c.value.get(r);i!==void 0&&h(r,Vs(i,[n]))}),e.addEventListener(`log_entries`,e=>{f([JSON.parse(e.data)])}),e.addEventListener(`error`,()=>{n.value=Qo(e.readyState===EventSource.CLOSED,s)})}function ee(){o?.close(),o=null,n.value=`closed`}async function S(){let e=Pu(t.value);if(!(e.length===0||i.value)){i.value=!0;try{let n=await Promise.all(e.map(e=>xs({...e,limit:kd})));t.value=ku(t.value,n.flat())}catch(e){a.value=e instanceof _s?e.message:`Older requests could not be loaded.`}finally{i.value=!1}}}async function C(e,n){let r=await ws(e,n);return t.value.some(e=>e.exchange.id===r.id)||await b(),r}return{status:e,records:t,stream:n,connecting:y,loaded:r,loadingOlder:i,problem:v,hasOlder:_,start:x,stop:ee,loadOlder:S,replay:C,wsSessions:c,wsFailures:l,loadWsMessages:g,logs:u,logsOmitted:d,loadExchangeLogs:p}}function jd(){let e=Ad();return gr(e.stop),e}var Md={class:`flex h-dvh flex-col bg-ground text-ink`},Nd={key:0,class:`border-b border-hairline bg-err-bg px-4 py-2 text-sm text-err-fg`,role:`alert`},Pd={class:`min-h-0 flex-1`},Fd={key:2,class:`flex h-full min-h-0 flex-col md:flex-row`},Id={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`},Ld={class:`min-h-0 min-w-0 flex-1`},Rd={key:1,class:`flex h-full items-center justify-center p-8 text-sm text-muted`},zd={key:1,id:`log-pane`,class:`h-2/5 min-h-0 shrink-0 border-t border-hairline`};Ao(z({__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,logs:h,logsOmitted:g,loadExchangeLogs:_}=jd(),v=N(!1),y=N(null),b=Q(()=>n.value.find(e=>Ou(e)===y.value)??null);function x(e){let t=n.value.find(t=>t.exchange.id===e);y.value=t===void 0?null:Ou(t)}let ee=Q(()=>ju(n.value,(t.value?.services??[]).map(e=>e.name))),S=Q(()=>b.value===null?null:Bs(b.value.origin,b.value.exchange.id)),C=Q(()=>S.value===null?null:f.value.get(S.value)??null),te=Q(()=>S.value===null?null:p.value.get(S.value)??null),ne=Q(()=>b.value===null?[]:fc(h.value,b.value.origin,b.value.exchange.id));function re(e){let t=n.value.find(t=>t.origin===e.origin&&e.entry.exchangeIds.includes(t.exchange.id));t!==void 0&&(y.value=Ou(t))}let ie=Q(()=>{let e=b.value?.exchange.replayOf;return e!==void 0&&n.value.some(t=>t.exchange.id===e)});return pr(l),(e,l)=>(W(),G(`div`,Md,[J(Od,{status:P(t),stream:P(r),"log-count":P(h).length,"logs-open":v.value,onToggleLogs:l[0]||=e=>v.value=!v.value},null,8,[`status`,`stream`,`log-count`,`logs-open`]),P(s)?(W(),G(`p`,Nd,D(P(s)),1)):X(``,!0),q(`main`,Pd,[P(a)?P(n).length===0?(W(),K(ps,{key:1,status:P(t),stream:P(r)},null,8,[`status`,`stream`])):(W(),G(`div`,Fd,[q(`section`,Id,[J(Xu,{records:P(n),services:ee.value,"selected-key":y.value,"has-older":P(c),"loading-older":P(o),onSelect:l[1]||=e=>y.value=e,onLoadOlder:P(u)},null,8,[`records`,`services`,`selected-key`,`has-older`,`loading-older`,`onLoadOlder`])]),q(`section`,Ld,[b.value?(W(),K(Du,{key:0,record:b.value,status:P(t),"original-loaded":ie.value,replay:P(d),"ws-blocks":C.value,"ws-failure":te.value,logs:ne.value,onSelect:x,onLoadMessages:P(m),onLoadLogs:P(_)},null,8,[`record`,`status`,`original-loaded`,`replay`,`ws-blocks`,`ws-failure`,`logs`,`onLoadMessages`,`onLoadLogs`])):(W(),G(`div`,Rd,` Select a request to see its headers and body. `))])])):(W(),K(Xo,{key:0,connecting:P(i)},null,8,[`connecting`]))]),v.value?(W(),G(`div`,zd,[J(id,{items:P(h),omitted:P(g),onSelect:re},null,8,[`items`,`omitted`])])):X(``,!0)]))}})).mount(`#app`);
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/*! tailwindcss v4.3.5 | MIT License | https://tailwindcss.com */
|
|
2
|
+
@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:block))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after{--tw-rotate-x:initial;--tw-rotate-y:initial;--tw-rotate-z:initial;--tw-skew-x:initial;--tw-skew-y:initial;--tw-space-y-reverse:0;--tw-border-style:solid;--tw-leading:initial;--tw-font-weight:initial;--tw-tracking:initial;--tw-ordinal:initial;--tw-slashed-zero:initial;--tw-numeric-figure:initial;--tw-numeric-spacing:initial;--tw-numeric-fraction:initial;--tw-blur:initial;--tw-brightness:initial;--tw-contrast:initial;--tw-grayscale:initial;--tw-hue-rotate:initial;--tw-invert:initial;--tw-opacity:initial;--tw-saturate:initial;--tw-sepia:initial;--tw-drop-shadow:initial;--tw-drop-shadow-color:initial;--tw-drop-shadow-alpha:100%;--tw-drop-shadow-size:initial;--tw-duration:initial;--tw-ease:initial}::backdrop{--tw-rotate-x:initial;--tw-rotate-y:initial;--tw-rotate-z:initial;--tw-skew-x:initial;--tw-skew-y:initial;--tw-space-y-reverse:0;--tw-border-style:solid;--tw-leading:initial;--tw-font-weight:initial;--tw-tracking:initial;--tw-ordinal:initial;--tw-slashed-zero:initial;--tw-numeric-figure:initial;--tw-numeric-spacing:initial;--tw-numeric-fraction:initial;--tw-blur:initial;--tw-brightness:initial;--tw-contrast:initial;--tw-grayscale:initial;--tw-hue-rotate:initial;--tw-invert:initial;--tw-opacity:initial;--tw-saturate:initial;--tw-sepia:initial;--tw-drop-shadow:initial;--tw-drop-shadow-color:initial;--tw-drop-shadow-alpha:100%;--tw-drop-shadow-size:initial;--tw-duration:initial;--tw-ease:initial}}}@layer theme{:root,:host{--font-sans:"Space Grotesk", ui-sans-serif, system-ui, sans-serif;--font-mono:"JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;--spacing:.25rem;--container-xl:36rem;--container-2xl:42rem;--text-xs:.75rem;--text-xs--line-height:calc(1 / .75);--text-sm:.875rem;--text-sm--line-height:calc(1.25 / .875);--font-weight-normal:400;--font-weight-medium:500;--tracking-wider:.05em;--radius-sm:6px;--radius-md:10px;--ease-out:cubic-bezier(0, 0, .2, 1);--default-transition-duration:.15s;--default-transition-timing-function:cubic-bezier(.4, 0, .2, 1);--default-font-family:var(--font-sans);--default-mono-font-family:var(--font-mono);--default-mono-font-feature-settings:var(--font-mono--font-feature-settings);--font-mono--font-feature-settings:"liga" 0, "calt" 0;--text-subheading:1.125rem;--text-subheading--line-height:1.625rem;--text-subheading--font-weight:500;--text-body:.9375rem;--text-body--line-height:1.5rem}}@layer base{*,:after,:before{box-sizing:border-box;border:0 solid;margin:0;padding:0}::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}html,:host{-webkit-text-size-adjust:100%;tab-size:4;line-height:1.5;font-family:var(--default-font-family,-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", "Noto Sans", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);-webkit-tap-highlight-color:transparent}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:var(--default-mono-font-family,ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-variation-settings:var(--default-mono-font-variation-settings,normal);font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring:where(:not(iframe)){outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:currentColor}@supports (color:color-mix(in lab, red, red)){::placeholder{color:color-mix(in oklab, currentcolor 50%, transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit{padding-block:0}::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-month-field{padding-block:0}::-webkit-datetime-edit-day-field{padding-block:0}::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field{padding-block:0}::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-datetime-edit-meridiem-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){appearance:button}::file-selector-button{appearance:button}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}body{background-color:var(--hw-ground);color:var(--hw-ink);font-family:var(--font-sans);font-size:var(--text-body);line-height:var(--text-body--line-height);font-synthesis-weight:none}h1,h2,h3,h4,strong,b{font-weight:500}code,pre,kbd,samp{font-family:var(--font-mono);font-feature-settings:var(--font-mono--font-feature-settings)}:focus-visible{outline:2px solid var(--hw-focus);outline-offset:2px}}@layer components;@layer utilities{.visible{visibility:visible}.sr-only{clip-path:inset(50%);white-space:nowrap;border-width:0;width:1px;height:1px;margin:-1px;padding:0;position:absolute;overflow:hidden}.absolute{position:absolute}.relative{position:relative}.static{position:static}.sticky{position:sticky}.bottom-0{bottom:0}.order-last{order:9999}.-mx-4{margin-inline:calc(var(--spacing) * -4)}.mt-1{margin-top:var(--spacing)}.mt-1\.5{margin-top:calc(var(--spacing) * 1.5)}.mt-2{margin-top:calc(var(--spacing) * 2)}.mt-3{margin-top:calc(var(--spacing) * 3)}.mt-4{margin-top:calc(var(--spacing) * 4)}.-mb-px{margin-bottom:-1px}.mb-6{margin-bottom:calc(var(--spacing) * 6)}.ml-auto{margin-left:auto}.block{display:block}.contents{display:contents}.flex{display:flex}.inline-flex{display:inline-flex}.size-2{width:calc(var(--spacing) * 2);height:calc(var(--spacing) * 2)}.h-2\/5{height:40%}.h-3\.5{height:calc(var(--spacing) * 3.5)}.h-4{height:calc(var(--spacing) * 4)}.h-6{height:calc(var(--spacing) * 6)}.h-auto{height:auto}.h-dvh{height:100dvh}.h-full{height:100%}.max-h-80{max-height:calc(var(--spacing) * 80)}.max-h-\[60vh\]{max-height:60vh}.min-h-0{min-height:0}.w-2\/5{width:40%}.w-32{width:calc(var(--spacing) * 32)}.w-44{width:calc(var(--spacing) * 44)}.w-auto{width:auto}.w-full{width:100%}.max-w-2xl{max-width:var(--container-2xl)}.min-w-0{min-width:0}.flex-1{flex:1}.shrink-0{flex-shrink:0}.basis-2\/5{flex-basis:40%}.basis-3\/5{flex-basis:60%}.table-fixed{table-layout:fixed}.border-collapse{border-collapse:collapse}.transform{transform:var(--tw-rotate-x, ) var(--tw-rotate-y, ) var(--tw-rotate-z, ) var(--tw-skew-x, ) var(--tw-skew-y, )}.cursor-pointer{cursor:pointer}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.items-center{align-items:center}.items-start{align-items:flex-start}.justify-center{justify-content:center}.gap-1{gap:var(--spacing)}.gap-1\.5{gap:calc(var(--spacing) * 1.5)}.gap-2{gap:calc(var(--spacing) * 2)}.gap-2\.5{gap:calc(var(--spacing) * 2.5)}.gap-3{gap:calc(var(--spacing) * 3)}.gap-4{gap:calc(var(--spacing) * 4)}:where(.space-y-1>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(var(--spacing) * var(--tw-space-y-reverse));margin-block-end:calc(var(--spacing) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-1\.5>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 1.5) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 1.5) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-2>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 2) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 2) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-3>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 3) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 3) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-6>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 6) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 6) * calc(1 - var(--tw-space-y-reverse)))}.gap-x-3{column-gap:calc(var(--spacing) * 3)}.gap-x-4{column-gap:calc(var(--spacing) * 4)}.gap-x-5{column-gap:calc(var(--spacing) * 5)}.gap-y-1{row-gap:var(--spacing)}.gap-y-2{row-gap:calc(var(--spacing) * 2)}.truncate{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.overflow-auto{overflow:auto}.overflow-y-auto{overflow-y:auto}.rounded-full{border-radius:2147483647px}.rounded-md{border-radius:var(--radius-md)}.rounded-sm{border-radius:var(--radius-sm)}.border{border-style:var(--tw-border-style);border-width:1px}.border-\[1\.5px\]{border-style:var(--tw-border-style);border-width:1.5px}.border-t{border-top-style:var(--tw-border-style);border-top-width:1px}.border-b{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.border-b-2{border-bottom-style:var(--tw-border-style);border-bottom-width:2px}.border-l-2{border-left-style:var(--tw-border-style);border-left-width:2px}.border-cyan-text{border-color:var(--hw-cyan-text)}.border-hairline{border-color:var(--hw-hairline)}.border-ink{border-color:var(--hw-ink)}.border-line-strong{border-color:var(--hw-line-strong)}.border-link-blue{border-color:var(--hw-link-blue)}.border-muted{border-color:var(--hw-muted)}.border-transparent{border-color:#0000}.border-b-hairline{border-bottom-color:var(--hw-hairline)}.border-l-ink{border-left-color:var(--hw-ink)}.border-l-transparent{border-left-color:#0000}.bg-err-bg{background-color:var(--hw-err-bg)}.bg-ground{background-color:var(--hw-ground)}.bg-hop-green{background-color:var(--hw-hop-green)}.bg-info-bg{background-color:var(--hw-info-bg)}.bg-link-blue{background-color:var(--hw-link-blue)}.bg-ok-bg{background-color:var(--hw-ok-bg)}.bg-surface{background-color:var(--hw-surface)}.bg-tag-bg{background-color:var(--hw-tag-bg)}.bg-warn-bg{background-color:var(--hw-warn-bg)}.bg-well{background-color:var(--hw-well)}.bg-wire-cyan{background-color:var(--hw-wire-cyan)}.fill-ground{fill:var(--hw-ground)}.fill-hop-green{fill:var(--hw-hop-green)}.fill-ink{fill:var(--hw-ink)}.stroke-current{stroke:currentColor}.stroke-green-text{stroke:var(--hw-green-text)}.stroke-mark{stroke:var(--hw-mark)}.stroke-muted{stroke:var(--hw-muted)}.p-2{padding:calc(var(--spacing) * 2)}.p-3{padding:calc(var(--spacing) * 3)}.p-4{padding:calc(var(--spacing) * 4)}.p-8{padding:calc(var(--spacing) * 8)}.px-1\.5{padding-inline:calc(var(--spacing) * 1.5)}.px-2{padding-inline:calc(var(--spacing) * 2)}.px-2\.5{padding-inline:calc(var(--spacing) * 2.5)}.px-3{padding-inline:calc(var(--spacing) * 3)}.px-4{padding-inline:calc(var(--spacing) * 4)}.py-0\.5{padding-block:calc(var(--spacing) * .5)}.py-1\.5{padding-block:calc(var(--spacing) * 1.5)}.py-2{padding-block:calc(var(--spacing) * 2)}.py-2\.5{padding-block:calc(var(--spacing) * 2.5)}.py-3{padding-block:calc(var(--spacing) * 3)}.py-px{padding-block:1px}.pt-4{padding-top:calc(var(--spacing) * 4)}.pr-3{padding-right:calc(var(--spacing) * 3)}.text-center{text-align:center}.text-left{text-align:left}.align-top{vertical-align:top}.font-mono{font-family:var(--font-mono);font-feature-settings:var(--font-mono--font-feature-settings)}.font-sans{font-family:var(--font-sans)}.text-subheading{font-size:var(--text-subheading);line-height:var(--tw-leading,var(--text-subheading--line-height));font-weight:var(--tw-font-weight,var(--text-subheading--font-weight))}.text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.text-xs{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.leading-5{--tw-leading:calc(var(--spacing) * 5);line-height:calc(var(--spacing) * 5)}.font-medium{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.font-normal{--tw-font-weight:var(--font-weight-normal);font-weight:var(--font-weight-normal)}.tracking-wider{--tw-tracking:var(--tracking-wider);letter-spacing:var(--tracking-wider)}.break-words{overflow-wrap:break-word}.break-all{word-break:break-all}.whitespace-pre-wrap{white-space:pre-wrap}.text-cyan-text{color:var(--hw-cyan-text)}.text-err-fg{color:var(--hw-err-fg)}.text-green-text{color:var(--hw-green-text)}.text-info-fg{color:var(--hw-info-fg)}.text-ink{color:var(--hw-ink)}.text-muted{color:var(--hw-muted)}.text-ok-fg{color:var(--hw-ok-fg)}.text-on-green{color:var(--hw-on-green)}.text-tag-fg{color:var(--hw-tag-fg)}.text-warn-fg{color:var(--hw-warn-fg)}.capitalize{text-transform:capitalize}.uppercase{text-transform:uppercase}.tabular-nums{--tw-numeric-spacing:tabular-nums;font-variant-numeric:var(--tw-ordinal, ) var(--tw-slashed-zero, ) var(--tw-numeric-figure, ) var(--tw-numeric-spacing, ) var(--tw-numeric-fraction, )}.underline{text-decoration-line:underline}.decoration-line-strong{-webkit-text-decoration-color:var(--hw-line-strong);-webkit-text-decoration-color:var(--hw-line-strong);-webkit-text-decoration-color:var(--hw-line-strong);text-decoration-color:var(--hw-line-strong)}.underline-offset-2{text-underline-offset:2px}.antialiased{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.filter{filter:var(--tw-blur, ) var(--tw-brightness, ) var(--tw-contrast, ) var(--tw-grayscale, ) var(--tw-hue-rotate, ) var(--tw-invert, ) var(--tw-saturate, ) var(--tw-sepia, ) var(--tw-drop-shadow, )}.transition-colors{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.duration-150{--tw-duration:.15s;transition-duration:.15s}.ease-out{--tw-ease:var(--ease-out);transition-timing-function:var(--ease-out)}.select-none{-webkit-user-select:none;user-select:none}.placeholder\:text-muted::placeholder{color:var(--hw-muted)}@media (hover:hover){.hover\:border-ink:hover{border-color:var(--hw-ink)}.hover\:border-line-strong:hover{border-color:var(--hw-line-strong)}.hover\:bg-ink:hover,.hover\:bg-ink\/8:hover{background-color:var(--hw-ink)}@supports (color:color-mix(in lab, red, red)){.hover\:bg-ink\/8:hover{background-color:color-mix(in oklab, var(--hw-ink) 8%, transparent)}}.hover\:bg-surface\/60:hover{background-color:var(--hw-surface)}@supports (color:color-mix(in lab, red, red)){.hover\:bg-surface\/60:hover{background-color:color-mix(in oklab, var(--hw-surface) 60%, transparent)}}.hover\:text-ground:hover{color:var(--hw-ground)}.hover\:text-ink:hover{color:var(--hw-ink)}.hover\:decoration-ink:hover{-webkit-text-decoration-color:var(--hw-ink);-webkit-text-decoration-color:var(--hw-ink);-webkit-text-decoration-color:var(--hw-ink);text-decoration-color:var(--hw-ink)}}.focus-visible\:-outline-offset-2:focus-visible{outline-offset:calc(2px * -1)}.disabled\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\:opacity-60:disabled{opacity:.6}@media (hover:hover){.disabled\:hover\:border-line-strong:disabled:hover{border-color:var(--hw-line-strong)}.disabled\:hover\:bg-hop-green:disabled:hover{background-color:var(--hw-hop-green)}.disabled\:hover\:bg-transparent:disabled:hover{background-color:#0000}.disabled\:hover\:text-muted:disabled:hover{color:var(--hw-muted)}.disabled\:hover\:text-on-green:disabled:hover{color:var(--hw-on-green)}}@media (min-width:48rem){.md\:h-full{height:100%}.md\:w-2\/5{width:40%}.md\:max-w-xl{max-width:var(--container-xl)}.md\:min-w-80{min-width:calc(var(--spacing) * 80)}.md\:flex-row{flex-direction:row}.md\:border-r{border-right-style:var(--tw-border-style);border-right-width:1px}.md\:border-b-0{border-bottom-style:var(--tw-border-style);border-bottom-width:0}}@media (min-width:64rem){.lg\:order-none{order:0}.lg\:w-auto{width:auto}.lg\:flex-1{flex:1}}}@font-face{font-family:Space Grotesk;font-style:normal;font-weight:400;font-display:swap;src:url(./space-grotesk-latin-400-normal-CJ-V5oYT.woff2)format("woff2");unicode-range:U+??,U+131,U+152-153,U+2BB-2BC,U+2C6,U+2DA,U+2DC,U+304,U+308,U+329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}@font-face{font-family:Space Grotesk;font-style:normal;font-weight:400;font-display:swap;src:url(./space-grotesk-latin-ext-400-normal-CfP_5XZW.woff2)format("woff2");unicode-range:U+100-2BA,U+2BD-2C5,U+2C7-2CC,U+2CE-2D7,U+2DD-2FF,U+304,U+308,U+329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF}@font-face{font-family:Space Grotesk;font-style:normal;font-weight:500;font-display:swap;src:url(./space-grotesk-latin-500-normal-lFbtlQH6.woff2)format("woff2");unicode-range:U+??,U+131,U+152-153,U+2BB-2BC,U+2C6,U+2DA,U+2DC,U+304,U+308,U+329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}@font-face{font-family:Space Grotesk;font-style:normal;font-weight:500;font-display:swap;src:url(./space-grotesk-latin-ext-500-normal-DUe3BAxM.woff2)format("woff2");unicode-range:U+100-2BA,U+2BD-2C5,U+2C7-2CC,U+2CE-2D7,U+2DD-2FF,U+304,U+308,U+329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF}@font-face{font-family:JetBrains Mono;font-style:normal;font-weight:400;font-display:swap;src:url(./jetbrains-mono-latin-400-normal-V6pRDFza.woff2)format("woff2");unicode-range:U+??,U+131,U+152-153,U+2BB-2BC,U+2C6,U+2DA,U+2DC,U+304,U+308,U+329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}@font-face{font-family:JetBrains Mono;font-style:normal;font-weight:400;font-display:swap;src:url(./jetbrains-mono-latin-ext-400-normal-Bc8Ftmh3.woff2)format("woff2");unicode-range:U+100-2BA,U+2BD-2C5,U+2C7-2CC,U+2CE-2D7,U+2DD-2FF,U+304,U+308,U+329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF}@font-face{font-family:JetBrains Mono;font-style:normal;font-weight:500;font-display:swap;src:url(./jetbrains-mono-latin-500-normal-BWZEU5yA.woff2)format("woff2");unicode-range:U+??,U+131,U+152-153,U+2BB-2BC,U+2C6,U+2DA,U+2DC,U+304,U+308,U+329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}@font-face{font-family:JetBrains Mono;font-style:normal;font-weight:500;font-display:swap;src:url(./jetbrains-mono-latin-ext-500-normal-Cut-4mMH.woff2)format("woff2");unicode-range:U+100-2BA,U+2BD-2C5,U+2C7-2CC,U+2CE-2D7,U+2DD-2FF,U+304,U+308,U+329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF}:root{--lightningcss-light:initial;--lightningcss-dark: ;color-scheme:light;--hw-ground:#f6f8fa;--hw-surface:#fff;--hw-hairline:#d5dce5;--hw-ink:#0e131a;--hw-muted:#475569;--hw-hop-green:#0f6;--hw-green-text:#007a33;--hw-on-green:#0e131a;--hw-wire-cyan:#00f0ff;--hw-link-blue:#0a5cff;--hw-line-strong:#64748b;--hw-mark:#0e131a;--hw-cyan-text:#006e7a;--hw-well:#fff;--hw-focus:#0a5cff;--hw-tag-bg:#e2e8f0;--hw-tag-fg:#334155;--hw-ok-fg:#065f46;--hw-ok-bg:#d1fae5;--hw-info-fg:#075985;--hw-info-bg:#e0f2fe;--hw-warn-fg:#92400e;--hw-warn-bg:#fef3c7;--hw-err-fg:#991b1b;--hw-err-bg:#fee2e2}.dark{--lightningcss-light: ;--lightningcss-dark:initial;color-scheme:dark;--hw-ground:#0e131a;--hw-surface:#1e293b;--hw-hairline:#2a3545;--hw-ink:#fff;--hw-muted:#94a3b8;--hw-hop-green:#0f6;--hw-green-text:#0f6;--hw-on-green:#0e131a;--hw-wire-cyan:#00f0ff;--hw-link-blue:#0a5cff;--hw-line-strong:#64748b;--hw-mark:#0f6;--hw-cyan-text:#00f0ff;--hw-well:#0e131a;--hw-focus:#fff;--hw-tag-bg:#ffffff1a;--hw-tag-fg:#e2e8f0;--hw-ok-fg:#6ee7b7;--hw-ok-bg:#10b98133;--hw-info-fg:#7dd3fc;--hw-info-bg:#0ea5e933;--hw-warn-fg:#fcd34d;--hw-warn-bg:#f59e0b33;--hw-err-fg:#fca5a5;--hw-err-bg:#ef444433}.hwd-s{stroke-dasharray:1;animation-name:hwd-draw,hwd-on;animation-timing-function:cubic-bezier(.4,0,.2,1),linear;animation-fill-mode:both}.hwd-s1{animation-duration:.477s,10ms;animation-delay:0s,0s}.hwd-s2{animation-duration:.207s,10ms;animation-delay:.439s,.439s}.hwd-s3{animation-duration:.266s,10ms;animation-delay:.63s,.63s}.hwd-s4{animation-duration:.12s,10ms;animation-delay:.874s,.874s}.hwd-s5{animation-duration:.12s,10ms;animation-delay:.985s,.985s}.hwd-w{animation:.45s cubic-bezier(.2,.7,.2,1) .95s both hwd-w}@keyframes hwd-draw{0%{stroke-dashoffset:1px}to{stroke-dashoffset:0}}@keyframes hwd-on{0%{opacity:0}to{opacity:1}}@keyframes hwd-w{0%{opacity:0;transform:translate(-10px)}to{opacity:1;transform:translate(0)}}.hwx-lit2{opacity:.55}.hwx-lit3{opacity:.22}.hwx-ring{transform-box:fill-box;transform-origin:50%;opacity:0}.hwx-hop{transform-box:fill-box;transform-origin:50% 90%}.hwx-run .hwx-wire{animation:.72s linear infinite hwx-scroll}.hwx-run .hwx-lit1{animation:.72s linear infinite hwx-scroll,.72s linear infinite hwx-fade1}.hwx-run .hwx-lit2{animation:.72s linear infinite hwx-scroll,.72s linear infinite hwx-fade2}.hwx-run .hwx-lit3{animation:.72s linear infinite hwx-scroll,.72s linear infinite hwx-fade3}.hwx-run .hwx-ring{animation:.72s ease-out infinite hwx-ring}.hwx-run .hwx-hop{animation:.72s infinite hwx-hop}@keyframes hwx-scroll{0%{transform:translate(0)}to{transform:translate(-64px)}}@keyframes hwx-fade1{0%{opacity:1}to{opacity:.55}}@keyframes hwx-fade2{0%{opacity:.55}to{opacity:.22}}@keyframes hwx-fade3{0%{opacity:.22}to{opacity:0}}@keyframes hwx-ring{0%{opacity:.9;transform:scale(.6)}55%,to{opacity:0;transform:scale(2.6)}}@keyframes hwx-hop{0%{animation-timing-function:cubic-bezier(.25,.6,.45,1);transform:translateY(0)rotate(3deg)}50%{animation-timing-function:cubic-bezier(.55,0,.75,.4);transform:translateY(-20px)rotate(-7deg)}to{transform:translateY(0)rotate(3deg)}}.hwl{stroke-dasharray:1;animation-duration:2.4s;animation-timing-function:linear;animation-iteration-count:infinite}.hwl-1{animation-name:hwl-1}.hwl-2{animation-name:hwl-2}.hwl-3{animation-name:hwl-3}.hwl-4{animation-name:hwl-4}.hwl-5{animation-name:hwl-5}@keyframes hwl-1{0%,.01%{stroke-dashoffset:1px;opacity:1}18.94%,79.17%{stroke-dashoffset:0;opacity:1}91.67%,to{stroke-dashoffset:0;opacity:0}}@keyframes hwl-2{0%,18.94%{stroke-dashoffset:1px;opacity:0}18.95%{stroke-dashoffset:1px;opacity:1}27.16%,79.17%{stroke-dashoffset:0;opacity:1}91.67%,to{stroke-dashoffset:0;opacity:0}}@keyframes hwl-3{0%,27.16%{stroke-dashoffset:1px;opacity:0}27.17%{stroke-dashoffset:1px;opacity:1}37.71%,79.17%{stroke-dashoffset:0;opacity:1}91.67%,to{stroke-dashoffset:0;opacity:0}}@keyframes hwl-4{0%,37.71%{stroke-dashoffset:1px;opacity:0}37.72%{stroke-dashoffset:1px;opacity:1}40.56%,79.17%{stroke-dashoffset:0;opacity:1}91.67%,to{stroke-dashoffset:0;opacity:0}}@keyframes hwl-5{0%,40.56%{stroke-dashoffset:1px;opacity:0}40.57%{stroke-dashoffset:1px;opacity:1}41.67%,79.17%{stroke-dashoffset:0;opacity:1}91.67%,to{stroke-dashoffset:0;opacity:0}}@media (prefers-reduced-motion:reduce){.hwd-s,.hwd-w,.hwl,.hwx-run .hwx-wire,.hwx-run .hwx-lit1,.hwx-run .hwx-lit2,.hwx-run .hwx-lit3,.hwx-run .hwx-ring,.hwx-run .hwx-hop{animation:none!important}}@property --tw-rotate-x{syntax:"*";inherits:false}@property --tw-rotate-y{syntax:"*";inherits:false}@property --tw-rotate-z{syntax:"*";inherits:false}@property --tw-skew-x{syntax:"*";inherits:false}@property --tw-skew-y{syntax:"*";inherits:false}@property --tw-space-y-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-leading{syntax:"*";inherits:false}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-tracking{syntax:"*";inherits:false}@property --tw-ordinal{syntax:"*";inherits:false}@property --tw-slashed-zero{syntax:"*";inherits:false}@property --tw-numeric-figure{syntax:"*";inherits:false}@property --tw-numeric-spacing{syntax:"*";inherits:false}@property --tw-numeric-fraction{syntax:"*";inherits:false}@property --tw-blur{syntax:"*";inherits:false}@property --tw-brightness{syntax:"*";inherits:false}@property --tw-contrast{syntax:"*";inherits:false}@property --tw-grayscale{syntax:"*";inherits:false}@property --tw-hue-rotate{syntax:"*";inherits:false}@property --tw-invert{syntax:"*";inherits:false}@property --tw-opacity{syntax:"*";inherits:false}@property --tw-saturate{syntax:"*";inherits:false}@property --tw-sepia{syntax:"*";inherits:false}@property --tw-drop-shadow{syntax:"*";inherits:false}@property --tw-drop-shadow-color{syntax:"*";inherits:false}@property --tw-drop-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-drop-shadow-size{syntax:"*";inherits:false}@property --tw-duration{syntax:"*";inherits:false}@property --tw-ease{syntax:"*";inherits:false}
|
|
@@ -7,8 +7,8 @@
|
|
|
7
7
|
<meta name="referrer" content="no-referrer" />
|
|
8
8
|
<title>Hopwire Inspector</title>
|
|
9
9
|
<link rel="icon" type="image/svg+xml" href="./favicon.svg" />
|
|
10
|
-
<script type="module" crossorigin src="./assets/index-
|
|
11
|
-
<link rel="stylesheet" crossorigin href="./assets/index-
|
|
10
|
+
<script type="module" crossorigin src="./assets/index-CIOfyIbK.js"></script>
|
|
11
|
+
<link rel="stylesheet" crossorigin href="./assets/index-Du4-DCNN.css">
|
|
12
12
|
</head>
|
|
13
13
|
<body class="bg-ground font-sans text-ink antialiased">
|
|
14
14
|
<div id="app"></div>
|
package/dist/inspector-api.js
CHANGED
|
@@ -4,6 +4,68 @@ import { isRedactedHeader } from './agent/redact.js';
|
|
|
4
4
|
import { summarize } from './agent/summary.js';
|
|
5
5
|
import { InvalidBlockError } from './log.js';
|
|
6
6
|
import { WsReplays, recordedInMessages } from './ws-replay.js';
|
|
7
|
+
/**
|
|
8
|
+
* This machine's own log together with its core of log entries that are not shared (phase 15): everything is read
|
|
9
|
+
* from the log, and log entries from both, merged by time.
|
|
10
|
+
*/
|
|
11
|
+
export function withLocalLogs(log, local) {
|
|
12
|
+
if (local === null) {
|
|
13
|
+
return log;
|
|
14
|
+
}
|
|
15
|
+
return {
|
|
16
|
+
get length() {
|
|
17
|
+
return log.length;
|
|
18
|
+
},
|
|
19
|
+
get: (index, options) => log.get(index, options),
|
|
20
|
+
find: (id) => log.find(id),
|
|
21
|
+
subscribe: (listener) => log.subscribe(listener),
|
|
22
|
+
wsMessages: (exchangeId, handshakeIndex, afterSeq) => log.wsMessages(exchangeId, handshakeIndex, afterSeq),
|
|
23
|
+
subscribeWsMessages: (listener) => log.subscribeWsMessages(listener),
|
|
24
|
+
async logEntries(query) {
|
|
25
|
+
const [shared, unshared] = await Promise.all([log.logEntries(query), local.logEntries(query)]);
|
|
26
|
+
return mergeLogSlices([shared, unshared], query.limit);
|
|
27
|
+
},
|
|
28
|
+
subscribeLogEntries(listener) {
|
|
29
|
+
const endShared = log.subscribeLogEntries(listener);
|
|
30
|
+
const endLocal = local.subscribeLogEntries(listener);
|
|
31
|
+
return () => {
|
|
32
|
+
endShared();
|
|
33
|
+
endLocal();
|
|
34
|
+
};
|
|
35
|
+
},
|
|
36
|
+
};
|
|
37
|
+
}
|
|
38
|
+
/** Several answers of `logEntries` as one: blocks by the time of their first entry, the newest `limit` entries kept. */
|
|
39
|
+
export function mergeLogSlices(slices, limit) {
|
|
40
|
+
const merged = newestRecords(slices.flatMap((slice) => slice.blocks.map((block) => ({ origin: 'own', block }))), limit);
|
|
41
|
+
return {
|
|
42
|
+
blocks: merged.records.map((record) => record.block),
|
|
43
|
+
more: merged.more || slices.some((slice) => slice.more),
|
|
44
|
+
};
|
|
45
|
+
}
|
|
46
|
+
/** Records of log entries sorted by the time of their first entry, cut to the newest `limit` entries. */
|
|
47
|
+
function newestRecords(records, limit) {
|
|
48
|
+
const sorted = [...records].sort((a, b) => (a.block.entries[0]?.readAt ?? 0) - (b.block.entries[0]?.readAt ?? 0));
|
|
49
|
+
let more = false;
|
|
50
|
+
let count = sorted.reduce((sum, record) => sum + record.block.entries.length, 0);
|
|
51
|
+
while (count > limit && sorted.length > 0) {
|
|
52
|
+
const oldest = sorted[0];
|
|
53
|
+
if (oldest === undefined) {
|
|
54
|
+
break;
|
|
55
|
+
}
|
|
56
|
+
const over = count - limit;
|
|
57
|
+
if (oldest.block.entries.length <= over) {
|
|
58
|
+
sorted.shift();
|
|
59
|
+
count -= oldest.block.entries.length;
|
|
60
|
+
}
|
|
61
|
+
else {
|
|
62
|
+
sorted[0] = { ...oldest, block: { ...oldest.block, entries: oldest.block.entries.slice(over) } };
|
|
63
|
+
count = limit;
|
|
64
|
+
}
|
|
65
|
+
more = true;
|
|
66
|
+
}
|
|
67
|
+
return { records: sorted, more };
|
|
68
|
+
}
|
|
7
69
|
/**
|
|
8
70
|
* A teammate's log as their coding agents may see it (spec decision 140): only the exchanges the sharer marked with
|
|
9
71
|
* agents: true, and the recorded messages of a WebSocket whose handshake is marked. Any other block is left out as a
|
|
@@ -50,6 +112,17 @@ export function agentsOnly(log) {
|
|
|
50
112
|
}
|
|
51
113
|
return log.wsMessages(exchangeId, handshakeIndex, afterSeq);
|
|
52
114
|
},
|
|
115
|
+
async logEntries(query) {
|
|
116
|
+
const slice = await log.logEntries(query);
|
|
117
|
+
return { blocks: slice.blocks.filter((block) => block.agents === true), more: slice.more };
|
|
118
|
+
},
|
|
119
|
+
subscribeLogEntries(listener) {
|
|
120
|
+
return log.subscribeLogEntries((block) => {
|
|
121
|
+
if (block.agents === true) {
|
|
122
|
+
listener(block);
|
|
123
|
+
}
|
|
124
|
+
});
|
|
125
|
+
},
|
|
53
126
|
subscribeWsMessages(listener) {
|
|
54
127
|
const endExchanges = log.subscribe((_index, exchange) => {
|
|
55
128
|
if (isWebSocketHandshake(exchange)) {
|
|
@@ -153,6 +226,10 @@ export function createInspectorApi(options) {
|
|
|
153
226
|
const record = { index, origin, block };
|
|
154
227
|
broadcast(`event: ws_messages\ndata: ${JSON.stringify(record)}\n\n`);
|
|
155
228
|
}),
|
|
229
|
+
log.subscribeLogEntries((block) => {
|
|
230
|
+
const record = { origin, block };
|
|
231
|
+
broadcast(`event: log_entries\ndata: ${JSON.stringify(record)}\n\n`);
|
|
232
|
+
}),
|
|
156
233
|
]);
|
|
157
234
|
const heartbeat = setInterval(() => broadcast(': heartbeat\n\n'), options.heartbeatIntervalMs ?? INSPECTOR_HEARTBEAT_INTERVAL_MS);
|
|
158
235
|
heartbeat.unref();
|
|
@@ -189,6 +266,10 @@ export function createInspectorApi(options) {
|
|
|
189
266
|
only(method, 'GET');
|
|
190
267
|
sendJson(res, 200, await wsMessagesOf(options.sources, second, params));
|
|
191
268
|
}
|
|
269
|
+
else if (route.length === 1 && first === 'log-entries') {
|
|
270
|
+
only(method, 'GET');
|
|
271
|
+
sendJson(res, 200, await logEntriesOf(options.sources, params));
|
|
272
|
+
}
|
|
192
273
|
else if (first === 'replay' && second !== undefined && second !== '' && more.length === 0) {
|
|
193
274
|
only(method, 'POST');
|
|
194
275
|
sendJson(res, 200, await replay(options, replays, second, req, params));
|
|
@@ -636,6 +717,70 @@ async function wsMessagesOf(sources, id, query) {
|
|
|
636
717
|
}
|
|
637
718
|
throw new ApiError(404, 'not_found', 'No WebSocket handshake with this id is in the log');
|
|
638
719
|
}
|
|
720
|
+
const LOG_ENTRIES_DEFAULT_LIMIT = 200;
|
|
721
|
+
const LOG_ENTRIES_MAX_LIMIT = 1000;
|
|
722
|
+
/** Entries linked to one exchange one answer holds at most */
|
|
723
|
+
const LOG_ENTRIES_PER_EXCHANGE_LIMIT = 2000;
|
|
724
|
+
const LOG_LEVELS = ['debug', 'info', 'warning', 'error'];
|
|
725
|
+
/**
|
|
726
|
+
* `GET /api/log-entries` (phase 15): with `exchangeId` the entries linked to that exchange, from the log that holds
|
|
727
|
+
* it; otherwise the newest entries of every log (or the one `origin` names), filtered by `since`, `source`, `level`
|
|
728
|
+
* and `contains`, up to `limit`. Oldest first.
|
|
729
|
+
*/
|
|
730
|
+
async function logEntriesOf(sources, query) {
|
|
731
|
+
const origin = originParameter(query);
|
|
732
|
+
const text = (name, max) => {
|
|
733
|
+
const value = query.get(name);
|
|
734
|
+
if (value === null) {
|
|
735
|
+
return undefined;
|
|
736
|
+
}
|
|
737
|
+
if (value === '' || value.length > max) {
|
|
738
|
+
throw new ApiError(400, 'invalid_request', `${name} must be between 1 and ${max} characters`);
|
|
739
|
+
}
|
|
740
|
+
return value;
|
|
741
|
+
};
|
|
742
|
+
const exchangeId = text('exchangeId', 128);
|
|
743
|
+
const level = text('level', 16);
|
|
744
|
+
if (level !== undefined && !LOG_LEVELS.some((known) => known === level)) {
|
|
745
|
+
throw new ApiError(400, 'invalid_request', 'level must be debug, info, warning or error');
|
|
746
|
+
}
|
|
747
|
+
if (exchangeId !== undefined) {
|
|
748
|
+
for (const source of sources) {
|
|
749
|
+
if (origin !== undefined && source.origin !== origin) {
|
|
750
|
+
continue;
|
|
751
|
+
}
|
|
752
|
+
const found = await source.log.find(exchangeId);
|
|
753
|
+
if (found !== null) {
|
|
754
|
+
const slice = await source.log.logEntries({
|
|
755
|
+
exchange: found.exchange,
|
|
756
|
+
limit: LOG_ENTRIES_PER_EXCHANGE_LIMIT,
|
|
757
|
+
});
|
|
758
|
+
return { blocks: slice.blocks.map((block) => ({ origin: source.origin, block })), more: slice.more };
|
|
759
|
+
}
|
|
760
|
+
}
|
|
761
|
+
throw new ApiError(404, 'unknown_exchange', 'No exchange with this id is in the log');
|
|
762
|
+
}
|
|
763
|
+
const filter = {
|
|
764
|
+
limit: integerParameter(query, 'limit', 1, LOG_ENTRIES_MAX_LIMIT) ?? LOG_ENTRIES_DEFAULT_LIMIT,
|
|
765
|
+
since: integerParameter(query, 'since', 0, Number.MAX_SAFE_INTEGER),
|
|
766
|
+
source: text('source', 255),
|
|
767
|
+
level: level,
|
|
768
|
+
contains: text('contains', 1024),
|
|
769
|
+
};
|
|
770
|
+
const records = [];
|
|
771
|
+
let more = false;
|
|
772
|
+
for (const source of sources) {
|
|
773
|
+
if (origin !== undefined && source.origin !== origin) {
|
|
774
|
+
continue;
|
|
775
|
+
}
|
|
776
|
+
const slice = await source.log.logEntries(filter);
|
|
777
|
+
more ||= slice.more;
|
|
778
|
+
records.push(...slice.blocks.map((block) => ({ origin: source.origin, block })));
|
|
779
|
+
}
|
|
780
|
+
// The newest `limit` entries of all logs together
|
|
781
|
+
const merged = newestRecords(records, filter.limit);
|
|
782
|
+
return { blocks: merged.records, more: more || merged.more };
|
|
783
|
+
}
|
|
639
784
|
/** The body of a replay is known in full, so Content-Length is set to what is really sent. */
|
|
640
785
|
function replayHeaders(headers, body) {
|
|
641
786
|
const hadLength = headers.some(([name]) => name.toLowerCase() === 'content-length');
|