hopwire 0.1.6 → 0.1.7
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/dist/cli.js +5 -0
- package/dist/commands/http.js +1 -0
- package/dist/commands/up.js +1 -0
- package/dist/config.js +20 -2
- package/dist/edge-bridge.js +8 -2
- package/dist/inspector/assets/index-CUURvDyL.js +2 -0
- package/dist/inspector/assets/index-XotF7D1X.css +2 -0
- package/dist/inspector/index.html +2 -2
- package/dist/inspector-api.js +145 -20
- package/dist/interceptor.js +17 -3
- package/dist/log.js +154 -18
- package/dist/mcp/tools.js +139 -7
- package/dist/mcp/ws-messages.js +72 -0
- package/dist/proxy-server.js +22 -1
- package/dist/serve.js +1 -0
- package/dist/websocket.js +9 -5
- package/dist/ws-capture.js +129 -0
- package/dist/ws-replay.js +97 -0
- package/node_modules/@hopwire/protocol/dist/index.d.ts +1 -0
- package/node_modules/@hopwire/protocol/dist/index.js +1 -0
- package/node_modules/@hopwire/protocol/dist/inspector.d.ts +33 -1
- package/node_modules/@hopwire/protocol/dist/inspector.js +32 -1
- package/node_modules/@hopwire/protocol/dist/websocket.d.ts +2 -2
- package/node_modules/@hopwire/protocol/dist/websocket.js +2 -2
- package/node_modules/@hopwire/protocol/dist/ws-messages.d.ts +69 -0
- package/node_modules/@hopwire/protocol/dist/ws-messages.js +104 -0
- package/package.json +1 -1
- package/dist/inspector/assets/index-BvwyMIFs.css +0 -2
- package/dist/inspector/assets/index-Ctrz3UJp.js +0 -2
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
(function(){let e=document.createElement(`link`).relList;if(e&&e.supports&&e.supports(`modulepreload`))return;for(let e of document.querySelectorAll(`link[rel="modulepreload"]`))n(e);new MutationObserver(e=>{for(let t of e)if(t.type===`childList`)for(let e of t.addedNodes)e.tagName===`LINK`&&e.rel===`modulepreload`&&n(e)}).observe(document,{childList:!0,subtree:!0});function t(e){let t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),t.credentials=e.crossOrigin===`use-credentials`?`include`:e.crossOrigin===`anonymous`?`omit`:`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})();function e(e){let t=Object.create(null);for(let n of e.split(`,`))t[n]=1;return e=>e in t}var t={},n=[],r=()=>{},i=()=>!1,a=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),o=e=>e.startsWith(`onUpdate:`),s=Object.assign,c=(e,t)=>{let n=e.indexOf(t);n>-1&&e.splice(n,1)},l=Object.prototype.hasOwnProperty,u=(e,t)=>l.call(e,t),d=Array.isArray,f=e=>x(e)===`[object Map]`,p=e=>x(e)===`[object Set]`,m=e=>x(e)===`[object Date]`,h=e=>typeof e==`function`,g=e=>typeof e==`string`,_=e=>typeof e==`symbol`,v=e=>typeof e==`object`&&!!e,y=e=>(v(e)||h(e))&&h(e.then)&&h(e.catch),b=Object.prototype.toString,x=e=>b.call(e),ee=e=>x(e).slice(8,-1),S=e=>x(e)===`[object Object]`,te=e=>g(e)&&e!==`NaN`&&e[0]!==`-`&&``+parseInt(e,10)===e,ne=e(`,key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted`),re=1e4,ie=e=>{let t=Object.create(null),n=0;return(r=>{let i=t[r];return i===void 0?(++n>re&&(t=Object.create(null),n=1),t[r]=e(r)):i})},ae=/-\w/g,C=ie(e=>e.replace(ae,e=>e.slice(1).toUpperCase())),oe=/\B([A-Z])/g,se=ie(e=>e.replace(oe,`-$1`).toLowerCase()),ce=ie(e=>e.charAt(0).toUpperCase()+e.slice(1)),le=ie(e=>e?`on${ce(e)}`:``),w=(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=e(`itemscope,allowfullscreen,disablepictureinpicture,disableremoteplayback,formnovalidate,ismap,nomodule,novalidate,playsinline,readonly`);function be(e){return!!e||e===``}function xe(e,t,n){if(e.length!==t.length)return!1;let r=!0;for(let i=0;r&&i<e.length;i++)r=Te(e[i],t[i],n);return r}function Se(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]&&Te(t,r[a],n)){e=a;break}if(e<0)return!1;i[e]=1}return!0}function Ce(e,t,n){let r=f(e),i=f(t);if(r||i||(r=p(e),i=p(t),r||i))return r&&i?Se(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||!Te(e[r],t[r],n))return!1}return De(e)===De(t)}function we(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 Te(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?we(e,t,n,xe):!1:(r=v(e),i=v(t),r||i?!r||!i?!1:we(e,t,n,Ce):String(e)===String(t))))}function Ee(e,t){return e.findIndex(e=>Te(e,t))}function De(e){return Object.getPrototypeOf(e)===null&&e[Symbol.toPrimitive]==null&&typeof e.toString!=`function`&&typeof e.valueOf!=`function`?x(e):String(e)}var Oe=e=>!!(e&&e.__v_isRef===!0),D=e=>g(e)?e:e==null?``:d(e)||v(e)&&(e.toString===b||!h(e.toString))?Oe(e)?D(e.value):JSON.stringify(e,ke,2):String(e),ke=(e,t)=>Oe(t)?ke(e,t.value):f(t)?{[`Map(${t.size})`]:[...t.entries()].reduce((e,[t,n],r)=>(e[Ae(t,r)+` =>`]=n,e),{})}:p(t)?{[`Set(${t.size})`]:[...t.values()].map(e=>Ae(e))}:_(t)?Ae(t):v(t)&&!d(t)&&!S(t)?String(t):t,Ae=(e,t=``)=>_(e)?`Symbol(${e.description??t})`:e,O,je=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 Me(){return O}var k,Ne=new WeakSet,Pe=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,Ne.has(this)&&(Ne.delete(this),this.trigger()))}notify(){this.flags&2&&!(this.flags&32)||this.flags&8||Re(this)}run(){if(!(this.flags&1))return this.fn();this.flags|=2,Ze(this),Ve(this);let e=k,t=qe;k=this,qe=!0;try{return this.fn()}finally{He(this),k=e,qe=t,this.flags&=-3}}stop(){if(this.flags&1){for(let e=this.deps;e;e=e.nextDep)Ge(e);this.deps=this.depsTail=void 0,Ze(this),this.onStop&&this.onStop(),this.flags&=-2}}trigger(){this.flags&64?Ne.add(this):this.scheduler?this.scheduler():this.runIfDirty()}runIfDirty(){Ue(this)&&this.run()}get dirty(){return Ue(this)}},Fe=0,Ie,Le;function Re(e,t=!1){e.flags|=8,t?(e.next=Le,Le=e):(e.next=Ie,Ie=e)}function ze(){Fe++}function Be(){if(--Fe>0)return;if(Le){let e=Le;for(Le=void 0;e;){let t=e.next;e.next=void 0,e.flags&=-9,e=t}}let e;for(;Ie;){let t=Ie;for(Ie=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 Ve(e){for(let t=e.deps;t;t=t.nextDep)t.version=-1,t.prevActiveLink=t.dep.activeLink,t.dep.activeLink=t}function He(e){let t,n=e.depsTail,r=n;for(;r;){let e=r.prevDep;r.version===-1?(r===n&&(n=e),Ge(r),Ke(r)):t=r,r.dep.activeLink=r.prevActiveLink,r.prevActiveLink=void 0,r=e}e.deps=t,e.depsTail=n}function Ue(e){for(let t=e.deps;t;t=t.nextDep)if(t.dep.version!==t.version||t.dep.computed&&(We(t.dep.computed)||t.dep.version!==t.version))return!0;return!!e._dirty}function We(e){if(e.flags&4&&!(e.flags&16)||(e.flags&=-17,e.globalVersion===Qe)||(e.globalVersion=Qe,!e.isSSR&&e.flags&128&&(!e.deps&&!e._dirty||!Ue(e))))return;e.flags|=2;let t=e.dep,n=k,r=qe;k=e,qe=!0;try{Ve(e);let n=e.fn(e._value);(t.version===0||w(n,e._value))&&(e.flags|=128,e._value=n,t.version++)}catch(e){throw t.version++,e}finally{k=n,qe=r,He(e),e.flags&=-3}}function Ge(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)Ge(e,!0)}!t&&!--n.sc&&n.map&&n.map.delete(n.key)}function Ke(e){let{prevDep:t,nextDep:n}=e;t&&(t.nextDep=n,e.prevDep=void 0),n&&(n.prevDep=t,e.nextDep=void 0)}var qe=!0,Je=[];function Ye(){Je.push(qe),qe=!1}function Xe(){let e=Je.pop();qe=e===void 0||e}function Ze(e){let{cleanup:t}=e;if(e.cleanup=void 0,t){let e=k;k=void 0;try{t()}finally{k=e}}}var Qe=0,$e=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}},et=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||!qe||k===this.computed)return;let t=this.activeLink;if(t===void 0||t.sub!==k)t=this.activeLink=new $e(k,this),k.deps?(t.prevDep=k.depsTail,k.depsTail.nextDep=t,k.depsTail=t):k.deps=k.depsTail=t,tt(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++,Qe++,this.notify(e)}notify(e){ze();try{for(let e=this.subs;e;e=e.prevSub)e.sub.notify()&&e.sub.dep.notify()}finally{Be()}}};function tt(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)tt(e)}let n=e.dep.subs;n!==e&&(e.prevSub=n,n&&(n.nextSub=e)),e.dep.subs=e}}var nt=new WeakMap,rt=Symbol(``),it=Symbol(``),at=Symbol(``);function A(e,t,n){if(qe&&k){let t=nt.get(e);t||nt.set(e,t=new Map);let r=t.get(n);r||(t.set(n,r=new et),r.map=t,r.key=n),r.track()}}function ot(e,t,n,r,i,a){let o=nt.get(e);if(!o){Qe++;return}let s=e=>{e&&e.trigger()};if(ze(),t===`clear`)o.forEach(s);else{let i=d(e),a=i&&te(n);if(i&&n===`length`){let e=Number(r);o.forEach((t,n)=>{(n===`length`||n===at||!_(n)&&n>=e)&&s(t)})}else switch((n!==void 0||o.has(void 0))&&s(o.get(n)),a&&s(o.get(at)),t){case`add`:i?a&&s(o.get(`length`)):(s(o.get(rt)),f(e)&&s(o.get(it)));break;case`delete`:i||(s(o.get(rt)),f(e)&&s(o.get(it)));break;case`set`:f(e)&&s(o.get(rt))}}Be()}function st(e){let t=M(e);return t===e||(A(t,`iterate`,at),j(e))?t:Kt(e)?Gt(e)?t.map(e=>Yt(N(e))):t.map(Yt):t.map(N)}function ct(e){return A(e=M(e),`iterate`,at),e}function lt(e,t){return Kt(e)?Yt(Gt(e)?N(t):t):N(t)}var ut={__proto__:null,[Symbol.iterator](){return dt(this,Symbol.iterator,e=>lt(this,e))},concat(...e){return st(this).concat(...e.map(e=>d(e)?st(e):e))},entries(){return dt(this,`entries`,e=>(e[1]=lt(this,e[1]),e))},every(e,t){return mt(this,`every`,e,t,void 0,arguments)},filter(e,t){return mt(this,`filter`,e,t,e=>e.map(e=>lt(this,e)),arguments)},find(e,t){return mt(this,`find`,e,t,e=>lt(this,e),arguments)},findIndex(e,t){return mt(this,`findIndex`,e,t,void 0,arguments)},findLast(e,t){return mt(this,`findLast`,e,t,e=>lt(this,e),arguments)},findLastIndex(e,t){return mt(this,`findLastIndex`,e,t,void 0,arguments)},forEach(e,t){return mt(this,`forEach`,e,t,void 0,arguments)},includes(...e){return gt(this,`includes`,e)},indexOf(...e){return gt(this,`indexOf`,e)},join(e){return st(this).join(e)},lastIndexOf(...e){return gt(this,`lastIndexOf`,e)},map(e,t){return mt(this,`map`,e,t,void 0,arguments)},pop(){return _t(this,`pop`)},push(...e){return _t(this,`push`,e)},reduce(e,...t){return ht(this,`reduce`,e,t)},reduceRight(e,...t){return ht(this,`reduceRight`,e,t)},shift(){return _t(this,`shift`)},some(e,t){return mt(this,`some`,e,t,void 0,arguments)},splice(...e){return _t(this,`splice`,e)},toReversed(){return st(this).toReversed()},toSorted(e){return st(this).toSorted(e)},toSpliced(...e){return st(this).toSpliced(...e)},unshift(...e){return _t(this,`unshift`,e)},values(){return dt(this,`values`,e=>lt(this,e))}};function dt(e,t,n){let r=ct(e),i=r[t],a=i.call(r);if(r!==e&&!j(e)){if(a[Symbol.toStringTag]===`Array Iterator`){let e=Object.create(Object.getPrototypeOf(a));return e.next=()=>ft(a.next(),n),i!==pt[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=()=>ft(a._next(),n)}return a}function ft(e,t){return e.done||(e.value=t(e.value)),e}var pt=Array.prototype;function mt(e,t,n,r,i,a){let o=ct(e),s=o!==e&&!j(e),c=o[t];if(c!==pt[t]){let t=c.apply(e,a);return s?N(t):t}let l=n;o!==e&&(s?l=function(t,r){return n.call(this,lt(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 ht(e,t,n,r){let i=ct(e),a=i!==e&&!j(e),o=n,s=!1;i!==e&&(a?(s=r.length===0,o=function(t,r,i){return s&&(s=!1,t=lt(e,t)),n.call(this,t,lt(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?lt(e,c):c}function gt(e,t,n){let r=M(e);A(r,`iterate`,at);let i=r[t](...n);return(i===-1||i===!1)&&qt(n[0])?(n[0]=M(n[0]),r[t](...n)):i}function _t(e,t,n=[]){Ye(),ze();let r=M(e)[t].apply(e,n);return Be(),Xe(),r}var vt=e(`__proto__,__v_isRef,__isVue`),yt=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>e!==`arguments`&&e!==`caller`).map(e=>Symbol[e]).filter(_));function bt(e){_(e)||(e=String(e));let t=M(this);return A(t,`has`,e),t.hasOwnProperty(e)}var xt=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?zt:Rt:i?Lt:It).get(e)||Object.getPrototypeOf(e)===Object.getPrototypeOf(n)?e:void 0;let a=d(e);if(!r){let e;if(a&&(e=ut[t]))return e;if(t===`hasOwnProperty`)return bt}let o=Reflect.get(e,t,P(e)?e:n);if((_(t)?yt.has(t):vt(t))||(r||A(e,`get`,t),i))return o;if(P(o)){let e=a&&te(t)?o:o.value;return r&&v(e)?Ut(e):e}return v(o)?r?Ut(o):Vt(o):o}},St=class extends xt{constructor(e=!1){super(!1,e)}set(e,t,n,r){let i=e[t],a=d(e)&&te(t);if(!this._isShallow){let e=Kt(i);if(!j(n)&&!Kt(n)&&(i=M(i),n=M(n)),!a&&P(i)&&!P(n))return e||(i.value=n),!0}let o=a?Number(t)<e.length:u(e,t),s=Reflect.set(e,t,n,P(e)?e:r);return e===M(r)&&s&&(o?w(n,i)&&ot(e,`set`,t,n,i):ot(e,`add`,t,n)),s}deleteProperty(e,t){let n=u(e,t),r=e[t],i=Reflect.deleteProperty(e,t);return i&&n&&ot(e,`delete`,t,void 0,r),i}has(e,t){let n=Reflect.has(e,t);return _(t)&&yt.has(t)||A(e,`has`,t),n}ownKeys(e){return A(e,`iterate`,d(e)?`length`:rt),Reflect.ownKeys(e)}},Ct=class extends xt{constructor(e=!1){super(!0,e)}set(e,t){return!0}deleteProperty(e,t){return!0}},wt=new St,Tt=new Ct,Et=new St(!0),Dt=e=>e,Ot=e=>Reflect.getPrototypeOf(e);function kt(e,t,n){return function(...r){let i=this.__v_raw,a=M(i),o=f(a),c=e===`entries`||e===Symbol.iterator&&o,l=e===`keys`&&o,u=i[e](...r),d=n?Dt:t?Yt:N;return!t&&A(a,`iterate`,l?it:rt),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 At(e){return function(...t){return e===`delete`?!1:e===`clear`?void 0:this}}function jt(e,t){let n={get(n){let r=this.__v_raw,i=M(r),a=M(n);e||(w(n,a)&&A(i,`get`,n),A(i,`get`,a));let{has:o}=Ot(i),s=t?Dt:e?Yt:N;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(M(t),`iterate`,rt),t.size},has(t){let n=this.__v_raw,r=M(n),i=M(t);return e||(w(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=M(a),s=t?Dt:e?Yt:N;return!e&&A(o,`iterate`,rt),a.forEach((e,t)=>n.call(r,s(e),s(t),i))}};return s(n,e?{add:At(`add`),set:At(`set`),delete:At(`delete`),clear:At(`clear`)}:{add(e){let n=M(this),r=Ot(n),i=M(e),a=!t&&!j(e)&&!Kt(e)?i:e;return r.has.call(n,a)||w(e,a)&&r.has.call(n,e)||w(i,a)&&r.has.call(n,i)||(n.add(a),ot(n,`add`,a,a)),this},set(e,n){t||j(n)||Kt(n)||(n=M(n));let r=M(this),{has:i,get:a}=Ot(r),o=i.call(r,e);o||=(e=M(e),i.call(r,e));let s=a.call(r,e);return r.set(e,n),o?w(n,s)&&ot(r,`set`,e,n,s):ot(r,`add`,e,n),this},delete(e){let t=M(this),{has:n,get:r}=Ot(t),i=n.call(t,e);i||=(e=M(e),n.call(t,e));let a=r?r.call(t,e):void 0,o=t.delete(e);return i&&ot(t,`delete`,e,void 0,a),o},clear(){let e=M(this),t=e.size!==0,n=e.clear();return t&&ot(e,`clear`,void 0,void 0,void 0),n}}),[`keys`,`values`,`entries`,Symbol.iterator].forEach(r=>{n[r]=kt(r,e,t)}),n}function Mt(e,t){let n=jt(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 Nt={get:Mt(!1,!1)},Pt={get:Mt(!1,!0)},Ft={get:Mt(!0,!1)},It=new WeakMap,Lt=new WeakMap,Rt=new WeakMap,zt=new WeakMap;function Bt(e){switch(e){case`Object`:case`Array`:return 1;case`Map`:case`Set`:case`WeakMap`:case`WeakSet`:return 2;default:return 0}}function Vt(e){return Kt(e)?e:Wt(e,!1,wt,Nt,It)}function Ht(e){return Wt(e,!1,Et,Pt,Lt)}function Ut(e){return Wt(e,!0,Tt,Ft,Rt)}function Wt(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=Bt(ee(e));if(o===0)return e;let s=new Proxy(e,o===2?r:n);return i.set(e,s),s}function Gt(e){return Kt(e)?Gt(e.__v_raw):!!(e&&e.__v_isReactive)}function Kt(e){return!!(e&&e.__v_isReadonly)}function j(e){return!!(e&&e.__v_isShallow)}function qt(e){return e?!!e.__v_raw:!1}function M(e){let t=e&&e.__v_raw;return t?M(t):e}function Jt(e){return!u(e,`__v_skip`)&&Object.isExtensible(e)&&ue(e,`__v_skip`,!0),e}var N=e=>v(e)?Vt(e):e,Yt=e=>v(e)?Ut(e):e;function P(e){return e?e.__v_isRef===!0:!1}function F(e){return Zt(e,!1)}function Xt(e){return Zt(e,!0)}function Zt(e,t){return P(e)?e:new Qt(e,t)}var Qt=class{constructor(e,t){this.dep=new et,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=t?e:M(e),this._value=t?e:N(e),this.__v_isShallow=t}get value(){return this.dep.track(),this._value}set value(e){let t=this._rawValue,n=this.__v_isShallow||j(e)||Kt(e);e=n?e:M(e),w(e,t)&&(this._rawValue=e,this._value=n?e:N(e),this.dep.trigger())}};function I(e){return P(e)?e.value:e}var $t={get:(e,t,n)=>t===`__v_raw`?e:I(Reflect.get(e,t,n)),set:(e,t,n,r)=>{let i=e[t];return P(i)&&!P(n)?(i.value=n,!0):Reflect.set(e,t,n,r)}};function en(e){return Gt(e)?e:new Proxy(e,$t)}var tn=class{constructor(e,t,n){this.fn=e,this.setter=t,this._value=void 0,this.dep=new et(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=Qe-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 Re(this,!0),!0}get value(){let e=this.dep.track();return We(this),e&&(e.version=this.dep.version),this._value}set value(e){this.setter&&this.setter(e)}};function nn(e,t,n=!1){let r,i;return h(e)?r=e:(r=e.get,i=e.set),new tn(r,i,n)}var rn={},an=new WeakMap,on=void 0;function sn(e,t=!1,n=on){if(n){let t=an.get(n);t||an.set(n,t=[]),t.push(e)}}function cn(e,n,i=t){let{immediate:a,deep:o,once:s,scheduler:l,augmentJob:u,call:f}=i,p=e=>o?e:j(e)||o===!1||o===0?ln(e,1):ln(e),m,g,_,v,y=!1,b=!1;if(P(e)?(g=()=>e.value,y=j(e)):Gt(e)?(g=()=>p(e),y=!0):d(e)?(b=!0,y=e.some(e=>Gt(e)||j(e)),g=()=>e.map(e=>{if(P(e))return e.value;if(Gt(e))return p(e);if(h(e))return f?f(e,2):e()})):g=h(e)?n?f?()=>f(e,2):e:()=>{if(_){Ye();try{_()}finally{Xe()}}let t=on;on=m;try{return f?f(e,3,[v]):e(v)}finally{on=t}}:r,n&&o){let e=g,t=o===!0?1/0:o;g=()=>ln(e(),t)}let x=Me(),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(rn):rn,te=e=>{if(m.flags&1&&(m.dirty||e)){if(n){let t=m.run();if(e||o||y||(b?t.some((e,t)=>w(e,S[t])):w(t,S))){let e=on;Ye();try{_&&_(),on=m;let e=[t,S===rn?void 0:b&&S[0]===rn?[]:S,v];S=t,f?f(n,3,e):n(...e)}finally{on=e,Xe()}}}else m.run()}};return u&&u(te),m=new Pe(g),m.scheduler=l?()=>l(te,!1):te,v=e=>sn(e,!1,m),_=m.onStop=()=>{let e=an.get(m);if(e){if(f)f(e,4);else for(let t of e)t();an.delete(m)}},n?a?te(!0):S=m.run():l?l(te.bind(null,!0),!0):m.run(),ee.pause=m.pause.bind(m),ee.resume=m.resume.bind(m),ee.stop=ee,ee}function ln(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--,P(e))ln(e.value,t,n);else if(d(e))for(let r=0;r<e.length;r++)ln(e[r],t,n);else if(p(e)||f(e))e.forEach(e=>{ln(e,t,n)});else if(S(e)){for(let r in e)ln(e[r],t,n);for(let r of Object.getOwnPropertySymbols(e))Object.prototype.propertyIsEnumerable.call(e,r)&&ln(e[r],t,n)}return e}function un(e,t,n,r){try{return r?e(...r):e()}catch(e){fn(e,t,n)}}function dn(e,t,n,r){if(h(e)){let i=un(e,t,n,r);return i&&y(i)&&i.catch(e=>{fn(e,t,n,void 0,!0)}),i}if(d(e)){let i=[];for(let a=0;a<e.length;a++)i.push(dn(e[a],t,n,r));return i}}function fn(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){Ye(),un(s,null,10,[e,i,o]),Xe();return}}pn(e,r,o,i,c)}function pn(e,t,n,r=!0,i=!1){if(i)throw e;console.error(e)}var L=[],mn=-1,hn=[],gn=null,_n=0,vn=Promise.resolve(),yn=null;function bn(e){let t=yn||vn;return e?t.then(this?e.bind(this):e):t}function xn(e){let t=mn+1,n=L.length;for(;t<n;){let r=t+n>>>1,i=L[r],a=kn(i);a<e||a===e&&i.flags&2?t=r+1:n=r}return t}function Sn(e){if(!(e.flags&1)){let t=kn(e),n=L[L.length-1];!n||!(e.flags&2)&&t>=kn(n)?L.push(e):L.splice(xn(t),0,e),e.flags|=1,Cn()}}function Cn(){yn||=vn.then(An)}function wn(e){if(!d(e))gn&&e.id===-1?gn.splice(_n+1,0,e):e.flags&1||(hn.push(e),e.flags|=1);else for(let t=0;t<e.length;t++)hn.push(e[t]);Cn()}function Tn(e,t,n,r=mn+1){for(;r<L.length;r++){let n=L[r];if(n&&n.flags&2){if(e&&n.id!==e.uid||t!==void 0&&!(n.id>=t))continue;L.splice(r,1),r=e?r-1:mn,n.flags&4&&(n.flags&=-2),n(),n.flags&4||(n.flags&=-2)}}}function En(e,t,n=0){if(hn.length){let e=hn,r=0;if(t){e=[];for(let i=0;i<hn.length;i++){let a=hn[i];(a.i===void 0?t.has(a):!a.i||a.i.uid<n)?hn[r++]=a:e.push(a)}}let i=[...new Set(e)].sort((e,t)=>kn(e)-kn(t));if(hn.length=r,gn){for(let e=0;e<i.length;e++)gn.push(i[e]);return}for(gn=i,_n=0;_n<gn.length;_n++){let e=gn[_n];e.flags&4&&(e.flags&=-2),e.flags&8||e(),e.flags&=-2}gn=null,_n=0}}var Dn=!1;function On(e,t){if(Dn){e();return}let n=t===void 0?void 0:new Set(hn);e(),Dn=!0;try{Tn(void 0,t),En(void 0,n,t)}finally{Dn=!1}}var kn=e=>e.id==null?e.flags&2?-1:1/0:e.id;function An(e){try{for(mn=0;mn<L.length;mn++){let e=L[mn];e&&!(e.flags&8)&&(e.flags&4&&(e.flags&=-2),un(e,e.i,e.i?15:14),e.flags&4||(e.flags&=-2))}}finally{for(;mn<L.length;mn++){let e=L[mn];e&&(e.flags&=-2)}mn=-1,L.length=0,En(e),yn=null,(L.length||hn.length)&&An(e)}}var R=null,jn=null;function Mn(e){let t=R;return R=e,jn=e&&e.type.__scopeId||null,t}function Nn(e,t=R,n){if(!t||e._n)return e;let r=(...n)=>{r._d&&Ui(-1);let i=Mn(t),a=Bi.length,o;try{o=e(...n)}finally{for(let e=Bi.length;e>a;e--)Vi();Mn(i),r._d&&Ui(1)}return o};return r._n=!0,r._c=!0,r._d=!0,r}function Pn(e,n){if(R===null)return e;let r=xa(R),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&&ln(o),i.push({dir:a,instance:r,value:o,oldValue:void 0,arg:s,modifiers:c}))}return e}function Fn(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&&(Ye(),dn(u,n,8,[e.el,l,i,t]),Xe())}}function In(e,t){if(Q){let n=Q.provides,r=Q.parent&&Q.parent.provides;r===n&&(n=Q.provides=Object.create(r)),n[e]=t}}function Ln(e,t,n=!1){let r=sa();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 Rn=Symbol.for(`v-scx`),zn=()=>Ln(Rn);function Bn(e,t,n){return Vn(e,t,n)}function Vn(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(pa){if(c===`sync`){let e=zn();f=e.__watcherHandles||=[]}else if(!d){let e=()=>{};return e.stop=r,e.resume=r,e.pause=r,e}}let p=Q;u.call=(e,t,n)=>dn(e,p,t,n);let m=!1;c===`post`?u.scheduler=e=>{e.i=p,V(e,p&&p.suspense)}:c!==`sync`&&(m=!0,u.scheduler=(e,t)=>{t?e():Sn(e)}),u.augmentJob=e=>{n&&(e.flags|=4),m&&(e.flags|=2,p&&(e.id=p.uid,e.i=p))};let h=cn(e,n,u);return pa&&(f?f.push(h):d&&h()),h}function Hn(e,t,n){let r=this.proxy,i=g(e)?e.includes(`.`)?Un(r,e):()=>r[e]:e.bind(r,r),a;h(t)?a=t:(a=t.handler,n=t);let o=ua(this),s=Vn(i,a.bind(r),n);return o(),s}function Un(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 Wn=Symbol(`_vte`),Gn=e=>e.__isTeleport,Kn=Symbol(`_leaveCb`);function qn(e){let t=e[0];if(e.length>1){for(let n of e)if(n.type!==U){t=n;break}}return t}function Jn(e){if(!ir(e))return Gn(e.type)&&e.children?qn(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 Yn(e,t){if(e.shapeFlag&6&&e.component){e.transition=t;let n=e.component.subTree;Yn(Gn(n.type)&&Jn(n)||n,t)}else if(e.shapeFlag&128){let n=e.suspense;if(n){let e=n.isHydrating?n.pendingBranch:n.activeBranch;e&&Yn(e,t.clone(e))}else e.ssContent.transition=t.clone(e.ssContent),e.ssFallback.transition=t.clone(e.ssFallback)}else if(e.transition=t,e.type===H&&d(e.children)){let n=ei(e.children,!1);n&&Yn(n,t)}}function Xn(e){if(e.component)return Xn(e.component.subTree);if(e.type===H){let t=d(e.children)&&ei(e.children,!1);return t?Xn(t):void 0}if(e.type!==U)return e}function z(e,t){return h(e)?s({name:e.name},t,{setup:e}):e}function Zn(){let e=sa();return e?(e.appContext.config.idPrefix||`v`)+`-`+e.ids[0]+e.ids[1]++:``}function Qn(e){e.ids=[e.ids[0]+e.ids[2]+++`-`,0,0]}function $n(e,t){let n;return!!((n=Object.getOwnPropertyDescriptor(e,t))&&!n.configurable)}var er=new WeakMap;function tr(e,n,r,a,o=!1){if(d(e)){e.forEach((e,t)=>tr(e,n&&(d(n)?n[t]:n),r,a,o));return}if(rr(a)&&!o){a.shapeFlag&512&&a.type.__asyncResolved&&a.component.subTree.component&&tr(e,n,r,a.component.subTree);return}let s=a.shapeFlag&4?xa(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=M(v),b=v===t?i:e=>!$n(_,e)&&u(y,e),x=(e,t)=>!(t&&$n(_,t));if(m!=null&&m!==p){if(nr(n),g(m))_[m]=null,b(m)&&(v[m]=null);else if(P(m)){let e=n;x(m,e.k)&&(m.value=null),e.k&&(_[e.k]=null)}}if(h(p))un(p,f,12,[l,_]);else{let t=g(p),n=P(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(),er.delete(e)};t.id=-1,er.set(e,t),V(t,r)}else nr(e),i()}}}function nr(e){let t=er.get(e);t&&(t.flags|=8,er.delete(e))}pe().requestIdleCallback,pe().cancelIdleCallback;var rr=e=>!!e.type.__asyncLoader,ir=e=>e.type.__isKeepAlive;function ar(e,t){sr(e,`a`,t)}function or(e,t){sr(e,`da`,t)}function sr(e,t,n=Q){let r=e.__wdc||=()=>{let t=n;for(;t;){if(t.isDeactivated)return;t=t.parent}return e()};if(lr(t,r,n),n){let e=n.parent;for(;e&&e.parent;)ir(e.parent.vnode)&&cr(r,t,n,e),e=e.parent}}function cr(e,t,n,r){let i=lr(t,e,r,!0),a=lr(`um`,()=>c(r[t],i),n);a.flags=16}function lr(e,t,n=Q,r=!1){if(n){let i=n[e]||(n[e]=[]),a=t.__weh||=(...r)=>{Ye();let i=ua(n),a=dn(t,n,e,r);return i(),Xe(),a};return r?i.unshift(a):i.push(a),a}}var ur=e=>(t,n=Q)=>{pa&&e!==`sp`||lr(e,(...e)=>t(...e),n)},dr=ur(`bm`),fr=ur(`m`),pr=ur(`bu`),mr=ur(`u`),hr=ur(`bum`),gr=ur(`um`),_r=ur(`sp`),vr=ur(`rtg`),yr=ur(`rtc`);function br(e,t=Q){lr(`ec`,e,t)}var xr=Symbol.for(`v-ndc`);function Sr(e,t,n,r){let i,a=n&&n[r],o=d(e);if(o||g(e)){let n=o&&Gt(e),r=!1,s=!1;n&&(r=!j(e),s=Kt(e),e=ct(e)),i=Array(e.length);for(let n=0,o=e.length;n<o;n++)i[n]=t(r?s?Yt(N(e[n])):N(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??={},R.ce||R.parent&&rr(R.parent)&&R.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),G(),q(H,null,[Y(`slot`,e,r&&r())],i?-2:64)}let o=e[t];o&&o._c&&(o._d=!1);let c=Bi.length;G();let l;try{let i=o&&wr(o(n)),s=n.key||a||i&&i.key;l=q(H,{key:(s&&!_(s)?s:`_${t}`)+(!i&&r?`_fb`:``)},i||(r?r():[]),i&&e._===1?64:-2)}catch(e){for(let e=Bi.length;e>c;e--)Vi();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=>!Gi(e)||!(e.type===U||e.type===H&&!wr(e.children)))?e:null}var Tr=e=>e?fa(e)?xa(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||=()=>{Sn(e.update)},$nextTick:e=>e.n||=bn.bind(e.proxy),$watch:e=>Hn.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:te,render:ne,renderTracked:re,renderTriggered:ie,errorCaptured:ae,serverPrefetch:C,expose:oe,inheritAttrs:se,components:ce,directives:le,filters:w}=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=Vt(t))}if(Ar=!0,o)for(let e in o){let t=o[e],a=$({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=>{In(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(dr,p),T(fr,m),T(pr,g),T(mr,_),T(ar,y),T(or,b),T(br,ae),T(yr,re),T(vr,ie),T(hr,ee),T(gr,te),T(_r,C),d(oe)){if(oe.length){let t=e.exposed||={};oe.forEach(e=>{Object.defineProperty(t,e,{get:()=>n[e],set:t=>n[e]=t,enumerable:!0})})}else e.exposed||={}}ne&&e.render===r&&(e.render=ne),se!=null&&(e.inheritAttrs=se),ce&&(e.components=ce),le&&(e.directives=le),C&&Qn(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?Ln(r.from||n,r.default,!0):Ln(r.from||n):Ln(r),P(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){dn(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(`.`)?Un(n,r):()=>n[r];if(g(e)){let n=t[e];h(n)&&Bn(i,n)}else if(h(e))Bn(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)&&Bn(i,r,e)}}}function Fr(e){let t=e.type,{mixins:n,extends:r}=t,{mixins:i,optionsCache:a,config:{optionMergeStrategies:o}}=e.appContext,s=a.get(t),c;return s?c=s:!i.length&&!n&&!r?c=t:(c={},i.length&&i.forEach(e=>Ir(c,e,o,!0)),Ir(c,t,o)),v(t)&&a.set(t,c),c}function Ir(e,t,n,r=!1){let{mixins:i,extends:a}=t;a&&Ir(e,a,n,!0),i&&i.forEach(t=>Ir(e,t,n,!0));for(let i in t)if(!(r&&i===`expose`)){let r=Lr[i]||n&&n[i];e[i]=r?r(e[i],t[i]):t[i]}return e}var Lr={data:Rr,props:Hr,emits:Hr,methods:Vr,computed:Vr,beforeCreate:B,created:B,beforeMount:B,mounted:B,beforeUpdate:B,updated:B,beforeDestroy:B,beforeUnmount:B,destroyed:B,unmounted:B,activated:B,deactivated:B,errorCaptured:B,serverPrefetch:B,components:Vr,directives:Vr,watch:Ur,provide:Rr,inject:zr};function Rr(e,t){return t?e?function(){return s(h(e)?e.call(this,this):e,h(t)?t.call(this,this):t)}:t:e}function zr(e,t){return Vr(Br(e),Br(t))}function Br(e){if(d(e)){let t={};for(let n=0;n<e.length;n++)t[e[n]]=e[n];return t}return e}function B(e,t){return e?[...new Set([].concat(e,t))]:t}function Vr(e,t){return e?s(Object.create(null),e,t):t}function Hr(e,t){return e?d(e)&&d(t)?[...new Set([...e,...t])]:s(Object.create(null),kr(e),kr(t??{})):t}function Ur(e,t){if(!e)return t;if(!t)return e;let n=s(Object.create(null),e);for(let r in t)n[r]=B(e[r],t[r]);return n}function Wr(){return{app:null,config:{isNativeTag:i,performance:!1,globalProperties:{},optionMergeStrategies:{},errorHandler:void 0,warnHandler:void 0,compilerOptions:{}},mixins:[],components:{},directives:{},provides:Object.create(null),optionsCache:new WeakMap,propsCache:new WeakMap,emitsCache:new WeakMap}}var Gr=0;function Kr(e,t){return function(n,r=null){h(n)||(n=s({},n)),r!=null&&!v(r)&&(r=null);let i=Wr(),a=new WeakSet,o=[],c=!1,l=i.app={_uid:Gr++,_component:n,_props:r,_container:null,_context:i,_instance:null,version:Ca,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||Y(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,xa(u.component)}},onUnmount(e){o.push(e)},unmount(){c&&(dn(o,l._instance,16),e(null,l._container),delete l._container.__vue_app__)},provide(e,t){return i.provides[e]=t,l},runWithContext(e){let t=qr;qr=l;try{return e()}finally{qr=t}}};return l}}var qr=null,Jr=(e,t)=>t===`modelValue`||t===`model-value`?e.modelModifiers:e[`${t}Modifiers`]||e[`${C(t)}Modifiers`]||e[`${se(t)}Modifiers`];function Yr(e,n,...r){if(e.isUnmounted)return;let i=e.vnode.props||t,a=r,o=n.startsWith(`update:`),s=o&&Jr(i,n.slice(7));s&&(s.trim&&(a=r.map(e=>g(e)?e.trim():e)),s.number&&(a=a.map(de)));let c,l=i[c=le(n)]||i[c=le(C(n))];!l&&o&&(l=i[c=le(se(n))]),l&&dn(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,dn(u,e,6,a)}}var Xr=new WeakMap;function Zr(e,t,n=!1){let r=n?Xr:t.emitsCache,i=r.get(e);if(i!==void 0)return i;let a=e.emits,o={},c=!1;if(!h(e)){let r=e=>{let n=Zr(e,t,!0);n&&(c=!0,s(o,n))};!n&&t.mixins.length&&t.mixins.forEach(r),e.extends&&r(e.extends),e.mixins&&e.mixins.forEach(r)}return!a&&!c?(v(e)&&r.set(e,null),null):(d(a)?a.forEach(e=>o[e]=null):s(o,a),v(e)&&r.set(e,o),o)}function Qr(e,t){return!e||!a(t)?!1:(t=t.slice(2),t=t===`Once`?t:t.replace(/Once$/,``),u(e,t[0].toLowerCase()+t.slice(1))||u(e,se(t))||u(e,t))}function $r(e){let{type:t,vnode:n,proxy:r,withProxy:i,propsOptions:[a],slots:s,attrs:c,emit:l,render:u,renderCache:d,props:f,data:p,setupState:m,ctx:h,inheritAttrs:g}=e,_=Mn(e),v,y;try{if(n.shapeFlag&4){let e=i||r,t=e;v=Qi(u.call(t,e,d,f,m,p,h)),y=c}else{let e=t;v=Qi(e.length>1?e(f,{attrs:c,slots:s,emit:l}):e(f,null)),y=t.props?c:ti(c)}}catch(t){Bi.length=0,fn(t,e,1),v=Y(U)}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=Zi(b,y,!1,!0))}return n.dirs&&(b=Zi(b,null,!1,!0),b.dirs=b.dirs?b.dirs.concat(n.dirs):n.dirs),n.transition&&Yn(Gn(b.type)&&Jn(b)||b,n.transition),v=b,Mn(_),v}function ei(e,t=!0){let n;for(let t=0;t<e.length;t++){let r=e[t];if(Gi(r)){if(r.type!==U||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)?!Te(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:Ht(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=M(i),[c]=e.propsOptions,l=!1;if((r||o>0)&&!(o&16)){if(o&8){let n=e.vnode.dynamicProps;for(let r=0;r<n.length;r++){let o=n[r];if(Qr(e.emitsOptions,o))continue;let d=t[o];if(c){if(u(a,o))d!==a[o]&&(a[o]=d,l=!0);else{let t=C(o);i[t]=pi(c,s,t,d,e,!1)}}else d!==a[o]&&(a[o]=d,l=!0)}}}else{fi(e,t,i,a)&&(l=!0);let r;for(let a in s)t&&(u(t,a)||(r=se(a))!==a&&u(t,r))||(c?n&&(n[a]!==void 0||n[r]!==void 0)&&(i[a]=pi(c,s,a,void 0,e,!0)):delete i[a]);if(a!==s)for(let e in a)t&&u(t,e)||(delete a[e],l=!0)}l&&ot(e.attrs,`set`,``)}function fi(e,n,r,i){let[a,o]=e.propsOptions,s=!1,c;if(n)for(let t in n){if(ne(t))continue;let l=n[t],d;a&&u(a,d=C(t))?!o||!o.includes(d)?r[d]=l:(c||={})[d]=l:Qr(e.emitsOptions,t)||t in i&&l===i[t]||(i[t]=l,s=!0)}if(o){let n=M(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=ua(i);r=a[n]=e.call(null,t),o()}}else r=e;i.ce&&i.ce._setProp(n,r)}o[0]&&(a&&!e?r=!1:o[1]&&(r===``||r===se(n))&&(r=!0))}return r}var mi=new WeakMap;function hi(e,r,i=!1){let a=i?mi:r.propsCache,o=a.get(e);if(o)return o;let c=e.props,l={},f=[],p=!1;if(!h(e)){let t=e=>{p=!0;let[t,n]=hi(e,r,!0);s(l,t),n&&f.push(...n)};!i&&r.mixins.length&&r.mixins.forEach(t),e.extends&&t(e.extends),e.mixins&&e.mixins.forEach(t)}if(!c&&!p)return v(e)&&a.set(e,n),n;if(d(c))for(let e=0;e<c.length;e++){let n=C(c[e]);gi(n)&&(l[n]=t)}else if(c)for(let e in c){let t=C(e);if(gi(t)){let n=c[e],r=l[t]=d(n)||h(n)?{type:n}:s({},n),i=r.type,a=!1,o=!0;if(d(i))for(let e=0;e<i.length;++e){let t=i[e],n=h(t)&&t.name;if(n===`Boolean`){a=!0;break}n===`String`&&(o=!1)}else a=h(i)&&i.name===`Boolean`;r[0]=a,r[1]=o,(a||u(r,`default`))&&f.push(t)}}let m=[l,f];return v(e)&&a.set(e,m),m}function gi(e){return e[0]!==`$`&&!ne(e)}var _i=e=>e===`_`||e===`_ctx`||e===`$stable`,vi=e=>d(e)?e.map(Qi):[Qi(e)],yi=(e,t,n)=>{if(t._n)return t;let r=Nn((...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]},V=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&&!Ki(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 U:b(e,t,r,i);break;case zi:e??x(t,r,i,s);break;case H:ce(e,t,r,i,a,o,s,c,l);break;default:f&1?te(e,t,r,i,a,o,s,c,l):f&6?le(e,t,r,i,a,o,s,c,l):(f&64||f&128)&&u.process(e,t,r,i,a,o,s,c,l,we)}d!=null&&a?tr(d,e&&e.ref,o,t||e,!t):d==null&&e&&e.ref!=null&&tr(e.ref,null,o,e,!0)},y=(e,t,n,r)=>{if(e==null)o(t.el=u(t.children),n,r);else{let n=t.el=e.el;t.children!==e.children&&f(n,t.children)}},b=(e,t,n,r)=>{e==null?o(t.el=d(t.children||``),n,r):t.el=e.el},x=(e,t,n,r)=>{[e.el,e.anchor]=_(e.children,t,n,r,e.el,e.anchor)},ee=({el:e,anchor:t},n,r)=>{let i;for(;e&&e!==t;)i=h(e),o(e,n,r),e=i;o(t,n,r)},S=({el:e,anchor:t})=>{let n;for(;e&&e!==t;)n=h(e),s(e),e=n;s(t)},te=(e,t,n,r,i,a,o,s,c)=>{if(t.type===`svg`?o=`svg`:t.type===`math`&&(o=`mathml`),e==null)re(t,n,r,i,a,o,s,c);else{let n=e.el&&e.el._isVueCE?e.el:null;try{n&&n._beginPatch(),C(e,t,i,a,o,s,c)}finally{n&&n._endPatch()}}},re=(e,t,n,r,i,a,s,u)=>{let d,f,{props:m,shapeFlag:h,transition:g,dirs:_}=e;if(d=e.el=l(e.type,a,m&&m.is,m),h&8?p(d,e.children):h&16&&ae(e.children,d,null,r,i,Di(e,a),s,u),_&&Fn(e,null,r,`created`),ie(d,e,e.scopeId,s,r),m){for(let e in m)e!==`value`&&!ne(e)&&c(d,e,null,m[e],a,r);`value`in m&&c(d,`value`,null,m.value,a),(f=m.onVnodeBeforeMount)&&na(f,r,e)}_&&Fn(e,null,r,`beforeMount`);let v=ki(i,g);v?g.beforeEnter(d):g&&!g.persisted&&(d[Ii]=!0),o(d,t,n),((f=m&&m.onVnodeMounted)||v||_)&&V(()=>{try{f&&na(f,r,e),v&&g.enter(d),_&&Fn(e,null,r,`mounted`)}finally{}},i)},ie=(e,t,n,r,i)=>{if(n&&g(e,n),r)for(let t=0;t<r.length;t++)g(e,r[t]);if(i){let n=i.subTree;if(t===n||Fi(n.type)&&(n.ssContent===t||n.ssFallback===t)){let t=i.vnode;ie(e,t,t.scopeId,t.slotScopeIds,i.parent)}}},ae=(e,t,n,r,i,a,o,s,c=0)=>{for(let l=c;l<e.length;l++){let c=e[l]=s?$i(e[l]):Qi(e[l]);v(null,c,t,n,r,i,a,o,s)}},C=(e,n,r,i,a,o,s)=>{let l=n.el=e.el,{patchFlag:u,dynamicChildren:d,dirs:f}=n;u|=e.patchFlag&16;let m=e.props||t,h=n.props||t,g;if(r&&Oi(r,!1),(g=h.onVnodeBeforeUpdate)&&na(g,r,n,e),f&&Fn(n,e,r,`beforeUpdate`),r&&Oi(r,!0),d&&(!e.dynamicChildren||e.dynamicChildren.length!==d.length)&&(u=0,s=!1,d=null),(m.innerHTML&&h.innerHTML==null||m.textContent&&h.textContent==null)&&p(l,``),d?oe(e.dynamicChildren,d,l,r,i,Di(n,a),o):s||me(e,n,l,null,r,i,Di(n,a),o,!1),u>0){if(u&16)se(l,m,h,r,a);else if(u&2&&m.class!==h.class&&c(l,`class`,null,h.class,a),u&4&&c(l,`style`,m.style,h.style,a),u&8){let e=n.dynamicProps;for(let t=0;t<e.length;t++){let n=e[t],i=m[n],o=h[n];(o!==i||n===`value`)&&c(l,n,i,o,a,r)}}u&1&&e.children!==n.children&&p(l,n.children)}else!s&&d==null&&se(l,m,h,r,a);((g=h.onVnodeUpdated)||f)&&V(()=>{g&&na(g,r,n,e),f&&Fn(n,e,r,`updated`)},i)},oe=(e,t,n,r,i,a,o)=>{for(let s=0;s<t.length;s++){let c=e[s],l=t[s],u=c.el||Pi(c),d=u&&(c.type===H||!Ki(c,l)||c.shapeFlag&198)?m(u):n;v(c,l,d,null,r,i,a,o,!0)}},se=(e,n,r,i,a)=>{if(n!==r){if(n!==t)for(let t in n)!ne(t)&&!(t in r)&&c(e,t,n[t],null,a,i);for(let t in r){if(ne(t))continue;let o=r[t],s=n[t];o!==s&&t!==`value`&&c(e,t,s,o,a,i)}`value`in r&&c(e,`value`,n.value,r.value,a)}},ce=(e,t,n,r,i,a,s,c,l)=>{let d=t.el=e?e.el:u(``),f=t.anchor=e?e.anchor:u(``),{patchFlag:p,dynamicChildren:m,slotScopeIds:h}=t;h&&(c=c?c.concat(h):h),e==null?(o(d,n,r),o(f,n,r),ae(t.children||[],n,f,i,a,s,c,l)):p>0&&p&64&&m&&e.dynamicChildren&&e.dynamicChildren.length===m.length?(oe(e.dynamicChildren,m,n,i,a,s,c),(t.key!=null||i&&t===i.subTree)&&Ai(e,t,!0)):me(e,t,n,f,i,a,s,c,l)},le=(e,t,n,r,i,a,o,s,c)=>{t.slotScopeIds=s,e==null?t.shapeFlag&512?i.ctx.activate(t,n,r,o,c):w(t,n,r,i,a,o,c):ue(e,t,c)},w=(e,t,n,r,i,a,o)=>{let s=e.component=oa(e,r,i);if(ir(e)&&(s.ctx.renderer=we),ma(s,!1,o),s.asyncDep){if(i&&i.registerDep(s,de,o,a),!e.el){let r=s.subTree=Y(U);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?V(t,i):l())};t.flags=48,V(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)&&na(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&&V(r,i),(d=t.props&&t.props.onVnodeUpdated)&&V(()=>na(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=rr(t);if(Oi(e,!1),l&&T(l),!m&&(o=c&&c.onVnodeBeforeMount)&&na(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&&V(u,i),!m&&(o=c&&c.onVnodeMounted)){let e=t;V(()=>na(o,d,e),i)}(t.shapeFlag&256||d&&rr(d.vnode)&&d.vnode.shapeFlag&256)&&e.a&&V(e.a,i),e.isMounted=!0,t=n=r=null}};e.scope.on();let c=e.effect=new Pe(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=()=>Sn(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),Ye(),Tn(e),Xe()},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&&ae(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?$i(t[p]):Qi(t[p]);v(e[p],n,r,null,a,o,s,c,l)}u>d?xe(e,a,o,!0,!1,f):ae(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?$i(t[u]):Qi(t[u]);if(Ki(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?$i(t[p]):Qi(t[p]);if(Ki(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?$i(t[u]):Qi(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?$i(t[u]):Qi(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&&Ki(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 te=x?ji(S):n;for(_=te.length-1,u=b-1;u>=0;u--){let e=h+u,n=t[e],f=t[e+1],p=e+1<d?f.el||Pi(f):i;S[u]===0?v(null,n,r,p,a,o,s,c,l):x&&(_<0||u!==te[_]?_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===H){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===zi)ee(e,t,n);else if(r!==2&&d&1&&l){if(r===0)l.persisted&&!a[Kn]?o(a,t,n):(l.beforeEnter(a),o(a,t,n),V(()=>l.enter(a),i));else{let{leave:r,delayLeave:i,afterLeave:c}=l,u=()=>{e.ctx.isUnmounted?s(a):o(a,t,n)},d=()=>{let e=a._isLeaving||!!a[Kn];a._isLeaving&&a[Kn](!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&&(Ye(),tr(s,null,n,e,!0),Xe()),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=!rr(e),_;if(g&&(_=o&&o.onVnodeBeforeUnmount)&&na(_,t,e),u&6)be(e.component,n,r);else{if(u&128){e.suspense.unmount(n,r);return}h&&Fn(e,null,t,`beforeUnmount`),u&64?e.type.remove(e,t,n,we,r):l&&!l.hasOnce&&(a!==H||d>0&&d&64)?xe(l,t,n,!1,!0):(a===H&&d&384||!i&&u&16)&&xe(c,t,n),r&&E(e)}let v=m!=null&&p==null;(g&&(_=o&&o.onVnodeUnmounted)||h||v)&&V(()=>{_&&na(_,t,e),h&&Fn(e,null,t,`unmounted`),v&&(e.el=null)},n)},E=e=>{let{type:t,el:n,anchor:r,transition:i}=e,a=t===H;if(a&&!i){ye(n,r);return}if(t===zi){S(e),i&&!i.persisted&&i.afterLeave&&i.afterLeave();return}let o=a?Xn(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&&V(s,t);let u=()=>{e.isUnmounted=!0};u.flags=16,V(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[Wn];return n?h(n):t},Ce=(e,t,n)=>{On(()=>{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:aa())},we={p:v,um:ve,m:_e,r:E,mt:w,mc:ae,pc:me,pbc:oe,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]=$i(i[e]),a.el=t.el),!n&&a.patchFlag!==-2&&Ai(t,a)),a.type===Ri&&(a.patchFlag===-1&&(a=i[e]=$i(a)),a.el=t.el),a.type===U&&!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):wn(e)}var H=Symbol.for(`v-fgt`),Ri=Symbol.for(`v-txt`),U=Symbol.for(`v-cmt`),zi=Symbol.for(`v-stc`),Bi=[],W=null;function G(e=!1){Bi.push(W=e?null:[])}function Vi(){Bi.pop(),W=Bi[Bi.length-1]||null}var Hi=1;function Ui(e,t=!1){Hi+=e,e<0&&W&&t&&(W.hasOnce=!0)}function Wi(e){return e.dynamicChildren=Hi>0?W||n:null,Vi(),Hi>0&&W&&W.push(e),e}function K(e,t,n,r,i,a){return Wi(J(e,t,n,r,i,a,!0))}function q(e,t,n,r,i){return Wi(Y(e,t,n,r,i,!0))}function Gi(e){return e?e.__v_isVNode===!0:!1}function Ki(e,t){return e.type===t.type&&e.key===t.key}var qi=({key:e})=>e??null,Ji=({ref:e,ref_key:t,ref_for:n})=>(typeof e==`number`&&(e=``+e),e==null?null:g(e)||P(e)||h(e)?{i:R,r:e,k:t,f:!!n}:e);function J(e,t=null,n=null,r=0,i=null,a=e===H?0:1,o=!1,s=!1){let c={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&qi(t),ref:t&&Ji(t),scopeId:jn,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:R};return s?(ea(c,n),a&128&&e.normalize(c)):n&&(c.shapeFlag|=g(n)?8:16),Hi>0&&!o&&W&&(c.patchFlag>0||a&6)&&c.patchFlag!==32&&W.push(c),c}var Y=Yi;function Yi(e,t=null,n=null,r=0,i=null,a=!1){if(e&&e!==xr||(e=U),Gi(e)){let r=Zi(e,t,!0);return n&&ea(r,n),Hi>0&&!a&&W&&(r.shapeFlag&6?W[W.indexOf(e)]=r:W.push(r)),r.patchFlag=-2,r}if(Sa(e)&&(e=e.__vccOpts),t){t=Xi(t);let{class:e,style:n}=t;e&&!g(e)&&(t.class=E(e)),v(n)&&(qt(n)&&!d(n)&&(n=s({},n)),t.style=me(n))}let o=g(e)?1:Fi(e)?128:Gn(e)?64:v(e)?4:h(e)?2:0;return J(e,t,n,r,i,o,a,!0)}function Xi(e){return e?qt(e)?s({},e):li(e)?s({},e[va]||e):e:null}function Zi(e,t,n=!1,r=!1){let{props:i,ref:a,patchFlag:o,children:s,transition:c}=e,l=t?ta(i||{},t):i,u={__v_isVNode:!0,__v_skip:!0,type:e.type,props:l,key:l&&qi(l),ref:t&&t.ref?n&&a?d(a)?a.concat(Ji(t)):[a,Ji(t)]:Ji(t):a,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:s,target:e.target,targetStart:e.targetStart,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:t&&e.type!==H?o===-1?16:o|16:o,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:c,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&Zi(e.ssContent),ssFallback:e.ssFallback&&Zi(e.ssFallback),placeholder:e.placeholder,el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce,cacheIndex:e.cacheIndex};return c&&r&&Yn(u,c.clone(u)),u}function X(e=` `,t=0){return Y(Ri,null,e,t)}function Z(e=``,t=!1){return t?(G(),q(U,null,e)):Y(U,null,e)}function Qi(e){return e==null||typeof e==`boolean`?Y(U):d(e)?Y(H,null,e.slice()):Gi(e)?$i(e):Y(Ri,null,String(e))}function $i(e){return e.el===null&&e.patchFlag!==-1||e.memo?e:Zi(e)}function ea(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),ea(e,n()),n._c&&(n._d=!0));return}{n=32;let r=t._;!r&&!li(t)?t._ctx=R:r===3&&R&&(R.slots._===1?t._=1:(t._=2,e.patchFlag|=1024))}}else if(h(t)){if(r&65){ea(e,{default:t});return}t={default:t,_ctx:R},n=32}else t=String(t),r&64?(n=16,t=[X(t)]):n=8;e.children=t,e.shapeFlag|=n}function ta(...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 na(e,t,n,r=null){dn(e,t,7,[n,r])}var ra=Wr(),ia=0;function aa(){return ia}function oa(e,n,r){let i=e.type,a=(n?n.appContext:e.appContext)||ra,o={uid:ia++,vnode:e,type:i,parent:n,appContext:a,root:null,next:null,subTree:null,effect:null,update:null,job:null,scope:new je(!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 Q=null,sa=()=>Q||R,ca,la;{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)}};ca=t(`__VUE_INSTANCE_SETTERS__`,e=>Q=e),la=t(`__VUE_SSR_SETTERS__`,e=>pa=e)}var ua=e=>{let t=Q;return ca(e),e.scope.on(),()=>{e.scope.off(),ca(t)}},da=()=>{Q&&Q.scope.off(),ca(null)};function fa(e){return e.vnode.shapeFlag&4}var pa=!1;function ma(e,t=!1,n=!1){t&&la(t);let{props:r,children:i}=e.vnode,a=fa(e);ui(e,r,a,t),Ci(e,i,n||t);let o=a?ha(e,t):void 0;return t&&la(!1),o}function ha(e,t){let n=e.type;e.accessCache=Object.create(null),e.proxy=new Proxy(e.ctx,Or);let{setup:r}=n;if(r){Ye();let n=e.setupContext=r.length>1?ba(e):null,i=ua(e),a=un(r,e,0,[e.props,n]),o=y(a);if(Xe(),i(),(o||e.sp)&&!rr(e)&&Qn(e),o){if(a.then(da,da),t)return a.then(n=>{la(!0);try{ga(e,n,t)}finally{la(!1)}}).catch(t=>{fn(t,e,0,void 0,!0),e.ssrRender=(e,t)=>t(`<!---->`)});e.asyncDep=a}else ga(e,a,t)}else _a(e,t)}function ga(e,t,n){h(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:v(t)&&(e.setupState=en(t)),_a(e,n)}function _a(e,t,n){let i=e.type;e.render||=i.render||r;{let t=ua(e);Ye();try{jr(e)}finally{Xe(),t()}}}var va=Symbol(),ya={get(e,t){return A(e,`get`,``),t===va?e:e[t]}};function ba(e){return{attrs:new Proxy(e.attrs,ya),slots:e.slots,emit:e.emit,expose:t=>{e.exposed=t||{}}}}function xa(e){return e.exposed?e.exposeProxy||=new Proxy(en(Jt(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 Sa(e){return h(e)&&`__vccOpts`in e}var $=(e,t)=>nn(e,t,pa),Ca=`3.5.46`,wa=void 0,Ta=typeof window<`u`&&window.trustedTypes;if(Ta)try{wa=Ta.createPolicy(`vue`,{createHTML:e=>e})}catch{}var Ea=wa?e=>wa.createHTML(e):e=>e,Da=`http://www.w3.org/2000/svg`,Oa=`http://www.w3.org/1998/Math/MathML`,ka=typeof document<`u`?document:null,Aa=ka&&ka.createElement(`template`),ja={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`?ka.createElementNS(Da,e):t===`mathml`?ka.createElementNS(Oa,e):n?ka.createElement(e,{is:n}):ka.createElement(e);return e===`select`&&r&&r.multiple!=null&&i.setAttribute(`multiple`,r.multiple),i},createText:e=>ka.createTextNode(e),createComment:e=>ka.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>ka.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{Aa.innerHTML=Ea(r===`svg`?`<svg>${e}</svg>`:r===`mathml`?`<math>${e}</math>`:e);let i=Aa.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]}},Ma=Symbol(`_vtc`);function Na(e,t,n){let r=e[Ma];r&&(t=(t?[t,...r]:[...r]).join(` `)),t==null?e.removeAttribute(`class`):n?e.setAttribute(`class`,t):e.className=t}var Pa=Symbol(`_vod`),Fa=Symbol(`_vsh`),Ia=Symbol(``),La=/(?:^|;)\s*display\s*:/;function Ra(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]??Ba(r,t,``)}else for(let e in t)n[e]??Ba(r,e,``)}for(let i in n){i===`display`&&(a=!0);let o=n[i];o==null?Ba(r,i,``):Wa(e,i,!g(t)&&t?t[i]:void 0,o)||Ba(r,i,o)}}else if(i){if(t!==n){let e=r[Ia];e&&(n+=`;`+e),r.cssText=n,a=La.test(n)}}else t&&e.removeAttribute(`style`);Pa in e&&(i&&t===n||(e[Pa]=a?r.display:``),e[Fa]&&(r.display=`none`))}var za=/\s*!important$/;function Ba(e,t,n){if(d(n))n.forEach(n=>Ba(e,t,n));else if(n??=``,t.startsWith(`--`))za.test(n)?e.setProperty(t,n.replace(za,``),`important`):e.setProperty(t,n);else{let r=Ua(e,t);za.test(n)?e.setProperty(se(r),n.replace(za,``),`important`):e[r]=n}}var Va=[`Webkit`,`Moz`,`ms`],Ha={};function Ua(e,t){let n=Ha[t];if(n)return n;let r=C(t);if(r!==`filter`&&r in e)return Ha[t]=r;r=ce(r);for(let n=0;n<Va.length;n++){let i=Va[n]+r;if(i in e)return Ha[t]=i}return t}function Wa(e,t,n,r){return e.tagName===`TEXTAREA`&&(t===`width`||t===`height`)&&g(r)&&n===r}var Ga=`http://www.w3.org/1999/xlink`;function Ka(e,t,n,r,i,a=ye(t)){r&&t.startsWith(`xlink:`)?n==null?e.removeAttributeNS(Ga,t.slice(6,t.length)):e.setAttributeNS(Ga,t,n):n==null||a&&!be(n)?e.removeAttribute(t):e.setAttribute(t,a?``:_(n)?String(n):n)}function qa(e,t,n,r,i){if(t===`innerHTML`||t===`textContent`){n!=null&&(e[t]=t===`innerHTML`?Ea(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=be(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 Ja(e,t,n,r){e.addEventListener(t,n,r)}function Ya(e,t,n,r){e.removeEventListener(t,n,r)}var Xa=Symbol(`_vei`);function Za(e,t,n,r,i=null){let a=e[Xa]||(e[Xa]={}),o=a[t];if(r&&o)o.value=r;else{let[n,s]=eo(t);r?Ja(e,n,a[t]=io(r,i),s):o&&(Ya(e,n,o,s),a[t]=void 0)}}var Qa=/(Once|Passive|Capture)$/,$a=/^on:?(?:Once|Passive|Capture)$/;function eo(e){let t,n;for(;(n=e.match(Qa))&&!$a.test(e);)t||={},e=e.slice(0,e.length-n[1].length),t[n[1].toLowerCase()]=!0;return[e[2]===`:`?e.slice(3):se(e.slice(2)),t]}var to=0,no=Promise.resolve(),ro=()=>to||=(no.then(()=>to=0),Date.now());function io(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&&dn(e,t,5,a)}}else dn(r,t,5,[e])};return n.value=e,n.attached=ro(),n}var ao=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)>96&&e.charCodeAt(2)<123,oo=(e,t,n,r,i,s)=>{let c=i===`svg`;t===`class`?Na(e,r,c):t===`style`?Ra(e,n,r):a(t)?o(t)||Za(e,t,n,r,s):(t[0]===`.`?(t=t.slice(1),1):t[0]===`^`?(t=t.slice(1),0):so(e,t,r,c))?(qa(e,t,r),e.tagName.includes(`-`)||t!==`value`&&t!==`checked`&&t!==`selected`||Ka(e,t,r,c,s,t!==`value`)):e._isVueCE&&(co(e,t)||e._def.__asyncLoader&&(/[A-Z]/.test(t)||!g(r)))?qa(e,C(t),r,s,t):(t===`true-value`?e._trueValue=r:t===`false-value`&&(e._falseValue=r),Ka(e,t,r,c))};function so(e,t,n,r){if(r)return!!(t===`innerHTML`||t===`textContent`||t in e&&ao(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 ao(t)&&g(n)?!1:t in e}function co(e,t){let n=e._def.props;if(!n)return!1;let r=C(t);return Array.isArray(n)?n.some(e=>C(e)===r):Object.keys(n).some(e=>C(e)===r)}var lo=e=>{let t=e.props[`onUpdate:modelValue`]||!1;return d(t)?e=>T(t,e):t};function uo(e){e.target.composing=!0}function fo(e){let t=e.target;t.composing&&(t.composing=!1,t.dispatchEvent(new Event(`input`)))}var po=Symbol(`_assign`),mo=Symbol(`_initialValue`);function ho(e,t,n){return t&&(e=e.trim()),n&&(e=de(e)),e}var go={created(e,{modifiers:{lazy:t,trim:n,number:r}},i){e.parentNode&&(e.type===`text`?e[mo]=e.defaultValue.replace(/[\r\n]/g,``):e.type===`textarea`&&(e[mo]=e.defaultValue.replace(/\r\n?/g,`
|
|
2
|
-
`))),e[po]=lo(i);let a=r||i.props&&i.props.type===`number`;Ja(e,t?`change`:`input`,t=>{t.target.composing||e[po](ho(e.value,n,a))}),(n||a)&&Ja(e,`change`,()=>{e.value=ho(e.value,n,a)}),t||(Ja(e,`compositionstart`,uo),Ja(e,`compositionend`,fo),Ja(e,`change`,fo))},mounted(e,{value:t,modifiers:{trim:n,number:r}}){let i=t??``,a=e[mo];delete e[mo],a!==void 0&&(e.type===`text`||e.type===`textarea`)&&e.value!==a?e[po](ho(e.value,n,r)):e.value=i},beforeUpdate(e,{value:t,oldValue:n,modifiers:{lazy:r,trim:i,number:a}},o){if(e[po]=lo(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)}},_o={deep:!0,created(e,{value:t,modifiers:{number:n}},r){e._modelValue=t,Ja(e,`change`,()=>{let t=Array.prototype.filter.call(e.options,e=>e.selected).map(e=>n?de(bo(e)):bo(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[po](i)}finally{bn(()=>{e._pendingValue===a&&(e._pendingValue=void 0)})}}),e[po]=lo(r)},mounted(e,{value:t,modifiers:{number:n}}){yo(e,t,n)},beforeUpdate(e,{value:t},n){e._modelValue=t,e[po]=lo(n)},updated(e,{value:t,modifiers:{number:n}}){let r=e._pendingValue;e._pendingValue=void 0,r&&r[0]===e.multiple&&vo(t,r[1],r[0])||yo(e,t,n)}};function vo(e,t,n){if(!n||d(e))return Te(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 yo(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=bo(o);if(r){if(i){let e=typeof s;o.selected=e===`string`||e===`number`?t.some(e=>String(e)===String(s)):Ee(t,s)>-1}else o.selected=t.has(s)||n&&typeof s==`string`&&t.has(de(s))}else if(Te(bo(o),t)){e.selectedIndex!==a&&(e.selectedIndex=a);return}}!r&&e.selectedIndex!==-1&&(e.selectedIndex=-1)}}function bo(e){return`_value`in e?e._value:e.value}var xo=[`ctrl`,`shift`,`alt`,`meta`],So={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)=>xo.some(n=>e[`${n}Key`]&&!t.includes(n))},Co=(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=So[t[e]];if(r&&r(n,t))return}return e(n,...r)}))},wo=s({patchProp:oo},ja),To;function Eo(){return To||=Ti(wo)}var Do=((...e)=>{let t=Eo().createApp(...e),{mount:n}=t;return t.mount=e=>{let r=ko(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,Oo(r));return r instanceof Element&&(r.removeAttribute(`v-cloak`),r.setAttribute(`data-v-app`,``)),a},t});function Oo(e){if(e instanceof SVGElement)return`svg`;if(typeof MathMLElement==`function`&&e instanceof MathMLElement)return`mathml`}function ko(e){return g(e)?document.querySelector(e):e}var Ao=`296 62 430 108`,jo=`300 62 124 110`,Mo=4.5,No=[`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`],Po=`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`,Fo=[`id`],Io=[`id`],Lo=[`fill`],Ro=[`mask`],zo={class:`hwx-wire`},Bo=[`cx`],Vo={class:`hwx-hop`},Ho=[`stroke-width`],Uo=[`d`],Wo=z({__name:`HopLoader`,props:{active:{type:Boolean}},setup(e){let t=Array.from({length:9},(e,t)=>-128+t*64),n=Zn(),r=Zn();return(i,a)=>(G(),K(`svg`,{viewBox:`0 0 256 150`,"aria-hidden":`true`,focusable:`false`,class:E([`block h-auto`,e.active?`hwx-run`:void 0])},[J(`defs`,null,[J(`linearGradient`,{id:I(r),x1:`0`,x2:`1`,y1:`0`,y2:`0`},[...a[0]||=[J(`stop`,{offset:`0`,"stop-color":`#000`},null,-1),J(`stop`,{offset:`.22`,"stop-color":`#fff`},null,-1),J(`stop`,{offset:`.78`,"stop-color":`#fff`},null,-1),J(`stop`,{offset:`1`,"stop-color":`#000`},null,-1)]],8,Fo),J(`mask`,{id:I(n),maskUnits:`userSpaceOnUse`,x:`0`,y:`0`,width:`256`,height:`150`},[J(`rect`,{width:`256`,height:`150`,fill:`url(#${I(r)})`},null,8,Lo)],8,Io)]),J(`g`,{mask:`url(#${I(n)})`},[J(`g`,zo,[a[1]||=J(`line`,{class:`stroke-muted`,x1:`-192`,y1:`122`,x2:`448`,y2:`122`,"stroke-width":`1.5`},null,-1),(G(!0),K(H,null,Sr(I(t),e=>(G(),K(`circle`,{key:e,class:`fill-ground stroke-muted`,cx:e,cy:`122`,r:`3.4`,"stroke-width":`1.5`},null,8,Bo))),128))]),a[2]||=J(`circle`,{class:`hwx-lit1 fill-hop-green`,cx:`128`,cy:`122`,r:`4.6`},null,-1),a[3]||=J(`circle`,{class:`hwx-lit2 fill-hop-green`,cx:`64`,cy:`122`,r:`4.6`},null,-1),a[4]||=J(`circle`,{class:`hwx-lit3 fill-hop-green`,cx:`0`,cy:`122`,r:`4.6`},null,-1)],8,Ro),a[5]||=J(`circle`,{class:`hwx-ring stroke-green-text`,cx:`128`,cy:`122`,r:`5`,fill:`none`,"stroke-width":`1.5`},null,-1),J(`g`,Vo,[J(`g`,{transform:`translate(-132.64 10.80) scale(0.72)`,class:`stroke-mark`,fill:`none`,"stroke-width":I(Mo),"stroke-linecap":`round`,"stroke-linejoin":`round`},[(G(!0),K(H,null,Sr(I(No),(e,t)=>(G(),K(`path`,{key:t,d:e},null,8,Uo))),128))],8,Ho)])],2))}}),Go={class:`flex h-full flex-col items-center justify-center gap-4 p-8 text-center`,role:`status`},Ko={class:`text-sm text-muted`},qo=z({__name:`ConnectingState`,props:{connecting:{type:Boolean}},setup(e){return(t,n)=>(G(),K(`div`,Go,[Y(Wo,{class:`w-44`,active:e.connecting},null,8,[`active`]),J(`p`,Ko,D(e.connecting?`Connecting to the tunnel`:`Not connected to the tunnel`),1)]))}}),Jo={connecting:`Connecting`,live:`Live`,reconnecting:`Reconnecting`,closed:`Disconnected`};function Yo(e,t){return e?`closed`:t?`reconnecting`:`connecting`}function Xo(e){return e===`connecting`||e===`reconnecting`}function Zo(){let e=F(!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 hr(()=>clearTimeout(t)),{copied:e,copy:n}}var Qo=[`aria-label`],$o={"aria-live":`polite`},es=z({__name:`CopyButton`,props:{text:{},label:{}},setup(e){let{copied:t,copy:n}=Zo();return(r,i)=>(G(),K(`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=>I(n)(e.text)},[J(`span`,$o,D(I(t)?`Copied`:`Copy`),1)],8,Qo))}}),ts={class:`flex h-full items-center justify-center overflow-y-auto p-8`},ns={class:`w-full max-w-2xl`},rs={key:0,class:`mt-2 text-sm text-muted`},is={class:`mt-4 flex items-start gap-2 rounded-md border border-hairline bg-well p-3`},as={class:`min-w-0 flex-1 text-xs leading-5 break-all text-ink`},os={class:`mt-4 text-sm text-muted`},ss={class:`font-mono text-xs text-ink`},cs={class:`font-mono text-xs text-ink`},ls={key:2,class:`mt-2 text-sm text-muted`},us=z({__name:`EmptyState`,props:{status:{},stream:{}},setup(e){let t=e,n=$(()=>t.status?.services.find(e=>e.entryUrl!==null)??null),r=$(()=>n.value===null?null:`curl -X POST ${n.value.entryUrl}/hello -H 'content-type: application/json' -d '{"hello":"hopwire"}'`);return(t,i)=>(G(),K(`div`,ts,[J(`div`,ns,[Y(Wo,{class:`mb-6 w-44`,active:I(Xo)(e.stream)},null,8,[`active`]),i[5]||=J(`h2`,{class:`text-subheading`},`No requests yet`,-1),e.status?.watching?(G(),K(`p`,rs,` This inspector follows a shared traffic log. Requests show up here as soon as your teammate's tunnel receives them. `)):n.value&&r.value?(G(),K(H,{key:1},[i[4]||=J(`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),J(`div`,is,[J(`code`,as,[i[0]||=J(`span`,{class:`text-muted select-none`},`$ `,-1),X(D(r.value),1)]),Y(es,{text:r.value,label:`Copy curl command`},null,8,[`text`])]),J(`p`,os,[i[1]||=X(` Everything sent to `,-1),J(`span`,ss,D(n.value.entryUrl),1),i[2]||=X(` is forwarded to `,-1),J(`span`,cs,D(n.value.target),1),i[3]||=X(` and recorded in the traffic log. Point your webhook sender or client at the entry point instead of the service. `,-1)])],64)):(G(),K(`p`,ls,`Waiting for the tunnel.`))])]))}}),ds=class extends Error{status;code;constructor(e,t,n){super(n),this.status=e,this.code=t}},fs=`api/`;async function ps(e,t){let n;try{n=await fetch(e,t)}catch{throw new ds(0,`unreachable`,`The tunnel does not answer. Is it still running?`)}if(!n.ok){let e=await n.json().catch(()=>null);throw new ds(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 ms(){return ps(`${fs}status`)}function hs(e){let t=new URLSearchParams({origin:e.origin,limit:String(e.limit)});return e.before!==void 0&&t.set(`before`,String(e.before)),ps(`${fs}exchanges?${t.toString()}`)}function gs(e,t){let n=new URLSearchParams({origin:e.origin,index:String(e.index)});return ps(`${fs}replay/${encodeURIComponent(e.exchange.id)}?${n.toString()}`,{method:`POST`,...t===void 0?{}:{headers:{"content-type":`application/json`},body:JSON.stringify(t)}})}function _s(e){return e>=200&&e<300?`success`:e>=300&&e<400?`info`:e>=400&&e<500?`warning`:e>=500&&e<600?`danger`:`neutral`}var vs={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`},ys={local:`local`,replay:`replay`,p2p_peer:`peer`,public_edge:`public`};function bs(e){return ys[e]}function xs(e){return e<1e3?`${e} ms`:`${(e/1e3).toFixed(e<1e4?2:1)} s`}function Ss(e){return e<1024?`${e} B`:e<1048576?`${(e/1024).toFixed(1)} kB`:`${(e/1048576).toFixed(1)} MB`}function Cs(e,t){return t?`Binary body; the log keeps its first ${Ss(e)}. It is not shown.`:`Binary body of ${Ss(e)}. It is not shown, but it is replayed as captured.`}function ws(e){let t=new Date(e),n=e=>String(e).padStart(2,`0`);return`${n(t.getHours())}:${n(t.getMinutes())}:${n(t.getSeconds())}`}function Ts(e){return e.length<=20?e:`${e.slice(0,10)}...${e.slice(-6)}`}function Es(e){return e.response.status===101}function Ds(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 Os(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 ks(e){return Os(new TextEncoder().encode(e))}function As(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 js(e){let t=e.trim();if(t===``)return null;try{return JSON.stringify(JSON.parse(t),null,2)}catch{return null}}function Ms(e,t=!1){if(e===``)return{kind:`empty`};let n=Ds(e),r=As(n,t);if(r===null)return{kind:`binary`,bytes:n.length};let i=js(r);return i!==null&&/^\s*[[{]/.test(r)?{kind:`json`,text:r,formatted:i,bytes:n.length}:{kind:`text`,text:r,bytes:n.length}}var Ns=[`GET`,`POST`,`PUT`,`PATCH`,`DELETE`,`HEAD`,`OPTIONS`],Ps=/^[!#$%&'*+\-.^_`|~0-9A-Za-z]+$/;function Fs(e){let{request:t}=e,n=Ms(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 Is(e,t){if(!Ps.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(!Ps.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 Ls(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:ks(e.body)}:{}}}function Rs(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.`}var zs=`A WebSocket handshake cannot be replayed: the messages of the connection are not recorded.`;function Bs(e,t){if(Es(t))return{replay:zs,editAndReplay:zs};let n=Rs(e,t);if(n!==null)return{replay:n,editAndReplay:n};let{request:r}=t;if(!r.bodyTruncated)return{replay:null,editAndReplay:null};if(Ms(r.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 Vs(e,t){return e===null?null:e.watching?e.replayTarget:e.services.find(e=>e.name===t.serviceName)?.target??null}function Hs(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 Us={class:`space-y-6`},Ws={key:0,class:`mt-2 text-sm text-muted`},Gs={key:1,class:`mt-2 w-full table-fixed border-collapse text-left font-mono text-xs`},Ks={scope:`row`,class:`w-2/5 py-1.5 pr-3 font-normal break-words text-muted`},qs={class:`py-1.5 break-all text-ink`},Js={class:`flex items-center gap-3`},Ys={key:0,class:`text-xs text-muted`},Xs={key:0,class:`mt-2 rounded-sm bg-warn-bg px-3 py-2 text-sm text-warn-fg`,role:`note`},Zs={key:1,class:`mt-2 text-sm text-muted`},Qs={key:2,class:`mt-2 text-sm text-muted`},$s={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`},ec=z({__name:`MessageView`,props:{headers:{},bodyBase64:{},bodyTruncated:{type:Boolean}},setup(e){let t=e,n=$(()=>Ms(t.bodyBase64,t.bodyTruncated)),r=$(()=>n.value.kind===`json`?n.value.formatted:n.value.kind===`text`?n.value.text:null),i=$(()=>{switch(n.value.kind){case`empty`:return``;case`json`:return`JSON, ${Ss(n.value.bytes)}`;case`text`:return`Text, ${Ss(n.value.bytes)}`;case`binary`:return`Binary, ${Ss(n.value.bytes)}`}return``});return(t,a)=>(G(),K(`div`,Us,[J(`section`,null,[a[1]||=J(`h3`,{class:`text-xs font-medium tracking-wider text-muted uppercase`},`Headers`,-1),e.headers.length===0?(G(),K(`p`,Ws,`No headers.`)):(G(),K(`table`,Gs,[a[0]||=J(`thead`,{class:`sr-only`},[J(`tr`,null,[J(`th`,{scope:`col`},`Name`),J(`th`,{scope:`col`},`Value`)])],-1),J(`tbody`,null,[(G(!0),K(H,null,Sr(e.headers,(e,t)=>(G(),K(`tr`,{key:t,class:`border-b border-hairline align-top`},[J(`th`,Ks,D(e[0]),1),J(`td`,qs,D(e[1]),1)]))),128))])]))]),J(`section`,null,[J(`div`,Js,[a[2]||=J(`h3`,{class:`text-xs font-medium tracking-wider text-muted uppercase`},`Body`,-1),i.value?(G(),K(`span`,Ys,D(i.value),1)):Z(``,!0),r.value===null?Z(``,!0):(G(),q(es,{key:1,class:`ml-auto`,text:r.value,label:`Copy body`},null,8,[`text`]))]),e.bodyTruncated?(G(),K(`p`,Xs,` Truncated: the log keeps only the first `+D(I(Ss)(n.value.kind===`empty`?0:n.value.bytes))+` of this body. The full body was forwarded. `,1)):Z(``,!0),n.value.kind===`empty`?(G(),K(`p`,Zs,`No body.`)):n.value.kind===`binary`?(G(),K(`p`,Qs,D(I(Cs)(n.value.bytes,e.bodyTruncated)),1)):(G(),K(`pre`,$s,D(r.value),1))])]))}}),tc={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`},nc=z({__name:`MethodBadge`,props:{method:{}},setup(e){return(t,n)=>(G(),K(`span`,tc,D(e.method),1))}}),rc=[`viewBox`],ic=[`stroke-width`],ac=[`d`],oc=z({__name:`MarkLoader`,setup(e){return(e,t)=>(G(),K(`svg`,{viewBox:I(jo),"aria-hidden":`true`,focusable:`false`,class:`block w-auto shrink-0`},[J(`g`,{class:`stroke-current`,fill:`none`,"stroke-width":I(Mo),"stroke-linecap":`round`,"stroke-linejoin":`round`},[(G(!0),K(H,null,Sr(I(No),(e,t)=>(G(),K(`path`,{key:t,d:e,pathLength:`1`,class:E(`hwl hwl-${t+1}`)},null,10,ac))),128))],8,ic)],8,rc))}}),sc=[`type`,`disabled`,`aria-busy`],cc=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)=>(G(),K(`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?(G(),q(oc,{key:0,class:`h-4`})):Z(``,!0),Cr(n.$slots,`default`)],10,sc))}}),lc={class:`flex gap-3`},uc={class:`w-32 shrink-0`},dc=[`value`],fc={class:`min-w-0 flex-1`},pc={class:`mt-1.5 space-y-1.5`},mc=[`onUpdate:modelValue`,`aria-label`],hc=[`onUpdate:modelValue`,`aria-label`],gc={class:`mt-2 flex items-center gap-3`},_c={class:`flex items-center gap-3`},vc={key:0,class:`mt-1.5 rounded-sm bg-warn-bg px-3 py-2 text-sm text-warn-fg`,role:`note`},yc={key:2,class:`mt-1.5 text-sm text-muted`},bc={class:`sticky bottom-0 -mx-4 space-y-3 border-t border-hairline bg-ground px-4 py-3`},xc={key:0,class:`rounded-sm bg-err-bg px-3 py-2 text-sm text-err-fg`,role:`alert`},Sc={class:`flex items-center gap-3`},Cc={key:0,class:`truncate text-xs text-muted`},wc={class:`font-mono`},Tc=`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`,Ec=z({__name:`ReplayEditor`,props:{exchange:{},target:{},sending:{type:Boolean},error:{}},emits:[`send`,`cancel`],setup(e,{emit:t}){let n=e,r=t,i=Vt(Fs(n.exchange)),a=F(null),o=$(()=>{let e=n.exchange.request.method.toUpperCase();return Ns.includes(e)?[...Ns]:[...Ns,e]}),s=$(()=>i.bodyEditable&&js(i.body)!==null);function c(){i.body=js(i.body)??i.body}function l(){i.headers.push({name:``,value:``})}function u(e){i.headers.splice(e,1)}function d(){a.value=Is(i,n.exchange),a.value===null&&r(`send`,Ls(i))}return(t,n)=>(G(),K(`form`,{class:`space-y-6 px-4 pt-4`,"aria-label":`Edit and replay`,novalidate:``,onSubmit:Co(d,[`prevent`])},[J(`div`,lc,[J(`div`,uc,[n[4]||=J(`label`,{class:`text-xs font-medium tracking-wider text-muted uppercase`,for:`replay-method`},` Method `,-1),Pn(J(`select`,{id:`replay-method`,"onUpdate:modelValue":n[0]||=e=>i.method=e,class:E([`mt-1.5`,Tc])},[(G(!0),K(H,null,Sr(o.value,e=>(G(),K(`option`,{key:e,value:e},D(e),9,dc))),128))],512),[[_o,i.method]])]),J(`div`,fc,[n[5]||=J(`label`,{class:`text-xs font-medium tracking-wider text-muted uppercase`,for:`replay-path`},`Path`,-1),Pn(J(`input`,{id:`replay-path`,"onUpdate:modelValue":n[1]||=e=>i.path=e,type:`text`,autocomplete:`off`,spellcheck:`false`,class:E([`mt-1.5`,Tc])},null,512),[[go,i.path]])])]),J(`fieldset`,null,[n[9]||=J(`legend`,{class:`text-xs font-medium tracking-wider text-muted uppercase`},`Headers`,-1),J(`ul`,pc,[(G(!0),K(H,null,Sr(i.headers,(e,t)=>(G(),K(`li`,{key:t,class:`flex gap-1.5`},[Pn(J(`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`,Tc])},null,8,mc),[[go,e.name]]),Pn(J(`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`,Tc])},null,8,hc),[[go,e.value]]),Y(cc,{variant:`quiet`,"aria-label":`Remove header ${e.name||t+1}`,onClick:e=>u(t)},{default:Nn(()=>[...n[6]||=[X(` Remove `,-1)]]),_:1},8,[`aria-label`,`onClick`])]))),128))]),J(`div`,gc,[Y(cc,{onClick:l},{default:Nn(()=>[...n[7]||=[X(`Add header`,-1)]]),_:1}),n[8]||=J(`span`,{class:`text-xs text-muted`},`Content-Length is set to match the body.`,-1)])]),J(`div`,null,[J(`div`,_c,[n[11]||=J(`label`,{class:`text-xs font-medium tracking-wider text-muted uppercase`,for:`replay-body`},`Body`,-1),s.value?(G(),q(cc,{key:0,class:`ml-auto`,variant:`quiet`,onClick:c},{default:Nn(()=>[...n[10]||=[X(`Format JSON`,-1)]]),_:1})):Z(``,!0)]),e.exchange.request.bodyTruncated&&i.bodyEditable?(G(),K(`p`,vc,` The log holds only the first part of this body. What you send is exactly the text below. `)):Z(``,!0),i.bodyEditable?Pn((G(),K(`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`,Tc])},null,512)),[[go,i.body]]):(G(),K(`p`,yc,` The body is binary and cannot be edited here. It is sent as captured. `))]),J(`div`,bc,[a.value||e.error?(G(),K(`p`,xc,D(a.value??e.error),1)):Z(``,!0),J(`div`,Sc,[Y(cc,{type:`submit`,variant:`primary`,loading:e.sending},{default:Nn(()=>[X(D(e.sending?`Sending`:`Send replay`),1)]),_:1},8,[`loading`]),Y(cc,{disabled:e.sending,onClick:n[3]||=e=>r(`cancel`)},{default:Nn(()=>[...n[12]||=[X(`Cancel`,-1)]]),_:1},8,[`disabled`]),e.target?(G(),K(`span`,Cc,[n[13]||=X(` Goes to `,-1),J(`span`,wc,D(e.target),1)])):Z(``,!0)])])],32))}}),Dc=z({__name:`StatusBadge`,props:{status:{}},setup(e){let t=e,n=$(()=>vs[_s(t.status)]);return(t,r)=>(G(),K(`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))}}),Oc={class:`flex h-full min-h-0 flex-col`,"aria-label":`Request details`},kc={class:`border-b border-hairline p-4`},Ac={class:`flex items-start gap-2`},jc={class:`min-w-0 flex-1 font-mono text-sm leading-5 font-normal break-all text-ink`},Mc={class:`mt-2 flex flex-wrap gap-x-4 gap-y-1 text-xs text-muted`},Nc={class:`flex gap-1`},Pc={class:`text-tag-fg tabular-nums`},Fc={class:`flex gap-1`},Ic={class:`text-tag-fg tabular-nums`},Lc={class:`flex gap-1`},Rc={class:`text-tag-fg`},zc={class:`flex gap-1`},Bc={class:`text-tag-fg`},Vc={key:0,class:`flex gap-1`},Hc={key:1,class:`flex gap-1`},Uc={key:1,class:`font-mono text-tag-fg`},Wc={key:0,class:`mt-3 flex flex-wrap items-center gap-2`},Gc={key:0,class:`truncate text-xs text-muted`},Kc={class:`font-mono`},qc={key:1,class:`mt-2 text-sm text-warn-fg`,role:`note`},Jc={key:2,class:`mt-2 rounded-sm bg-err-bg px-3 py-2 text-sm text-err-fg`,role:`alert`},Yc={key:0,class:`min-h-0 flex-1 overflow-y-auto`},Xc={class:`flex gap-1 border-b border-hairline px-4`,role:`tablist`,"aria-label":`Message`},Zc=[`id`,`aria-selected`,`onClick`],Qc=[`aria-labelledby`],$c=z({__name:`ExchangeDetail`,props:{record:{},status:{},originalLoaded:{type:Boolean},replay:{type:Function}},emits:[`select`],setup(e,{emit:t}){let n=e,r=t,i=F(`request`),a=F(!1),o=F(!1),s=F(null),c=$(()=>n.record.exchange),l=$(()=>Vs(n.status,c.value)),u=$(()=>Bs(n.status,c.value)),d=$(()=>u.value.replay);Bn(()=>c.value.id,()=>{a.value=!1,s.value=null});async function f(e){o.value=!0,s.value=null;try{let t=await n.replay(n.record,e);a.value=!1,i.value=`response`,r(`select`,t.id)}catch(e){s.value=e instanceof ds?e.message:`The replay could not be sent.`}finally{o.value=!1}}function p(){s.value=null,a.value=!0}return(t,n)=>(G(),K(`article`,Oc,[J(`header`,kc,[J(`div`,Ac,[Y(nc,{method:c.value.request.method},null,8,[`method`]),J(`h2`,jc,D(c.value.request.path),1),Y(Dc,{status:c.value.response.status},null,8,[`status`])]),J(`dl`,Mc,[J(`div`,Nc,[n[3]||=J(`dt`,null,`Time`,-1),J(`dd`,Pc,D(I(ws)(c.value.timestamp)),1)]),J(`div`,Fc,[n[4]||=J(`dt`,null,`Duration`,-1),J(`dd`,Ic,D(I(xs)(c.value.response.durationMs)),1)]),J(`div`,Lc,[n[5]||=J(`dt`,null,`Source`,-1),J(`dd`,Rc,D(I(bs)(c.value.source)),1)]),J(`div`,zc,[n[6]||=J(`dt`,null,`Service`,-1),J(`dd`,Bc,D(c.value.serviceName),1)]),e.record.origin===`remote`?(G(),K(`div`,Vc,[...n[7]||=[J(`dt`,null,`Origin`,-1),J(`dd`,{class:`text-tag-fg`},`remote log`,-1)]])):Z(``,!0),c.value.replayOf?(G(),K(`div`,Hc,[n[8]||=J(`dt`,null,`Replay of`,-1),J(`dd`,null,[e.originalLoaded?(G(),K(`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)):(G(),K(`span`,Uc,D(c.value.replayOf.slice(0,8)),1))])])):Z(``,!0)]),a.value?Z(``,!0):(G(),K(`div`,Wc,[Y(cc,{variant:`primary`,loading:o.value,disabled:d.value!==null,onClick:n[1]||=e=>f()},{default:Nn(()=>[X(D(o.value?`Sending`:`Replay`),1)]),_:1},8,[`loading`,`disabled`]),Y(cc,{disabled:o.value||u.value.editAndReplay!==null,onClick:p},{default:Nn(()=>[...n[9]||=[X(` Edit & Replay `,-1)]]),_:1},8,[`disabled`]),l.value&&d.value===null?(G(),K(`span`,Gc,[n[10]||=X(` Goes to `,-1),J(`span`,Kc,D(l.value),1)])):Z(``,!0)])),!a.value&&d.value?(G(),K(`p`,qc,D(d.value),1)):Z(``,!0),!a.value&&s.value?(G(),K(`p`,Jc,D(s.value),1)):Z(``,!0)]),a.value?(G(),K(`div`,Yc,[(G(),q(Ec,{key:c.value.id,exchange:c.value,target:l.value,sending:o.value,error:s.value,onSend:f,onCancel:n[2]||=e=>a.value=!1},null,8,[`exchange`,`target`,`sending`,`error`]))])):(G(),K(H,{key:1},[J(`div`,Xc,[(G(),K(H,null,Sr([`request`,`response`],e=>J(`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=>i.value=e},D(e),11,Zc)),64))]),J(`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`?(G(),q(ec,{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`])):(G(),q(ec,{key:1,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,Qc)],64))]))}});function el(e){return`${e.origin}:${e.index}`}function tl(e,t){let n=new Map;for(let t of e)n.set(el(t),t);for(let e of t)n.set(el(e),e);return[...n.values()].sort((e,t)=>t.exchange.timestamp-e.exchange.timestamp||t.index-e.index)}function nl(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}${Es(e)?` ws`:``}`.toLowerCase();return n.every(e=>r.includes(e))})}function rl(e,t){return[...new Set([...t,...e.map(e=>e.exchange.serviceName)])].sort()}function il(e){return e?[`remote`,`own`]:[`own`]}function al(e,t){return e.reduce((e,n)=>n.origin===t&&(e===null||n.index<e)?n.index:e,null)}function ol(e){let t=[];for(let n of[`remote`,`own`]){let r=al(e,n);r!==null&&r>0&&t.push({origin:n,before:r})}return t}var sl={class:`flex h-full min-h-0 flex-col`},cl={class:`flex gap-2 border-b border-hairline p-2`},ll=[`value`],ul={key:0,class:`p-4 text-sm text-muted`},dl={class:`min-h-0 flex-1 overflow-y-auto`,"aria-label":`Requests, newest first`},fl=[`aria-current`,`onClick`],pl={class:`flex items-center gap-2`},ml=[`title`],hl={class:`mt-1 flex items-center gap-2 text-xs text-muted`},gl={class:`tabular-nums`},_l={class:`tabular-nums`},vl={key:0,class:`rounded-sm bg-tag-bg px-1.5 py-px font-medium text-tag-fg`,title:`WebSocket handshake; the messages of the connection are not recorded`},yl={key:1,class:`rounded-sm bg-info-bg px-1.5 py-px font-medium text-info-fg`},bl={key:2,class:`truncate`},xl={key:0,class:`p-2 text-center`},Sl=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=F(``),a=F(``),o=$(()=>n.services.length>1),s=$(()=>nl(n.records,{text:i.value,service:a.value})),c=$(()=>i.value.trim()!==``||a.value!==``);return(t,n)=>(G(),K(`div`,sl,[J(`div`,cl,[n[5]||=J(`label`,{class:`sr-only`,for:`traffic-filter`},`Filter requests`,-1),Pn(J(`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),[[go,i.value]]),o.value?(G(),K(H,{key:0},[n[4]||=J(`label`,{class:`sr-only`,for:`traffic-service`},`Filter by service`,-1),Pn(J(`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]||=J(`option`,{value:``},`All services`,-1),(G(!0),K(H,null,Sr(e.services,e=>(G(),K(`option`,{key:e,value:e},D(e),9,ll))),128))],512),[[_o,a.value]])],64)):Z(``,!0)]),s.value.length===0?(G(),K(`p`,ul,D(c.value?`No request matches the filter.`:`No requests yet.`),1)):Z(``,!0),J(`ul`,dl,[(G(!0),K(H,null,Sr(s.value,t=>(G(),K(`li`,{key:I(el)(t)},[J(`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`,I(el)(t)===e.selectedKey?`border-l-ink bg-surface`:`border-l-transparent hover:bg-surface/60`]),"aria-current":I(el)(t)===e.selectedKey?`true`:void 0,onClick:e=>r(`select`,I(el)(t))},[J(`span`,pl,[Y(nc,{method:t.exchange.request.method},null,8,[`method`]),J(`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,ml),Y(Dc,{status:t.exchange.response.status},null,8,[`status`])]),J(`span`,hl,[J(`span`,gl,D(I(ws)(t.exchange.timestamp)),1),J(`span`,_l,D(I(xs)(t.exchange.response.durationMs)),1),J(`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(I(bs)(t.exchange.source)),3),I(Es)(t.exchange)?(G(),K(`span`,vl,` ws `)):Z(``,!0),t.origin===`remote`?(G(),K(`span`,yl,` remote `)):Z(``,!0),o.value?(G(),K(`span`,bl,D(t.exchange.serviceName),1)):Z(``,!0)])],10,fl)]))),128)),e.hasOlder?(G(),K(`li`,xl,[Y(cc,{variant:`quiet`,loading:e.loadingOlder,onClick:n[2]||=e=>r(`load-older`)},{default:Nn(()=>[X(D(e.loadingOlder?`Loading`:`Load older requests`),1)]),_:1},8,[`loading`])])):Z(``,!0)])]))}}),Cl=`hopwire-inspector-theme`;function wl(){try{return localStorage.getItem(Cl)===`light`?`light`:`dark`}catch{return`dark`}}var Tl=F(wl());Bn(Tl,e=>{document.documentElement.classList.toggle(`dark`,e===`dark`);try{localStorage.setItem(Cl,e)}catch{}},{immediate:!0});function El(){function e(){Tl.value=Tl.value===`dark`?`light`:`dark`}return{theme:Tl,toggleTheme:e}}var Dl=[`viewBox`],Ol=[`stroke-width`],kl=[`d`,`pathLength`],Al=[`d`],jl=z({__name:`BrandLogo`,props:{animated:{type:Boolean,default:!1}},setup(e){return(t,n)=>(G(),K(`svg`,{viewBox:I(Ao),role:`img`,"aria-label":`Hopwire`,class:`block w-auto`},[J(`g`,{class:`stroke-mark`,fill:`none`,"stroke-width":I(Mo),"stroke-linecap":`round`,"stroke-linejoin":`round`},[(G(!0),K(H,null,Sr(I(No),(t,n)=>(G(),K(`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,kl))),128))],8,Ol),J(`g`,{class:E(e.animated?`hwd-w`:void 0)},[J(`path`,{class:`fill-ink`,d:I(Po)},null,8,Al)],2)],8,Dl))}}),Ml={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`},Nl={class:`flex items-center gap-2.5 font-normal`},Pl={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`},Fl={key:1,class:`rounded-full bg-info-bg px-2 py-0.5 text-xs font-medium text-info-fg`},Il={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`},Ll={class:`truncate font-mono text-xs text-ink`},Rl={key:0,class:`flex items-center gap-1.5`},zl=[`title`],Bl={class:`flex items-center gap-1.5`},Vl=[`title`],Hl={class:`flex min-w-0 items-center gap-1.5`},Ul={key:0,class:`truncate font-mono text-xs text-ink`},Wl={class:`ml-auto flex items-center gap-3`},Gl={class:`flex items-center gap-1.5 text-xs text-tag-fg`,role:`status`},Kl=z({__name:`StatusBar`,props:{status:{},stream:{}},setup(e){let t=e,{theme:n,toggleTheme:r}=El(),i=$(()=>t.status===null?null:Hs(t.status));return(t,a)=>(G(),K(`header`,Ml,[J(`h1`,Nl,[Y(jl,{class:`h-6`}),a[0]||=J(`span`,{class:`text-muted`},`Inspector`,-1)]),e.status?(G(),K(`span`,Pl,[J(`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),X(` `+D(e.status.mode===`public`?`Public mode`:`Private mode`),1)])):Z(``,!0),e.status?.watching?(G(),K(`span`,Fl,` Watching a shared log `)):Z(``,!0),e.status?(G(),K(`dl`,Il,[(G(!0),K(H,null,Sr(e.status.publicUrls,e=>(G(),K(`div`,{key:e,class:`flex min-w-0 items-center gap-1.5`},[a[1]||=J(`dt`,{class:`text-muted`},`Public URL`,-1),J(`dd`,Ll,D(e),1),Y(es,{text:e,label:`Copy public URL`},null,8,[`text`])]))),128)),e.status.peerKey?(G(),K(`div`,Rl,[a[2]||=J(`dt`,{class:`text-muted`},`Peer key`,-1),J(`dd`,{class:`font-mono text-xs text-ink`,title:e.status.peerKey},D(I(Ts)(e.status.peerKey)),9,zl),Y(es,{text:e.status.peerKey,label:`Copy peer key`},null,8,[`text`])])):Z(``,!0),J(`div`,Bl,[a[3]||=J(`dt`,{class:`text-muted`},`Log key`,-1),J(`dd`,{class:`font-mono text-xs text-ink`,title:e.status.logKey},D(I(Ts)(e.status.logKey)),9,Vl),Y(es,{text:e.status.logKey,label:`Copy log key`},null,8,[`text`])]),J(`div`,Hl,[a[4]||=J(`dt`,{class:`text-muted`},`Replay target`,-1),e.status.replayTarget?(G(),K(`dd`,Ul,D(e.status.replayTarget),1)):i.value?(G(),K(`dd`,{key:1,class:E([`text-xs`,i.value.missing?`text-warn-fg`:`text-tag-fg`])},D(i.value.text),3)):Z(``,!0)])])):Z(``,!0),J(`div`,Wl,[J(`span`,Gl,[I(Xo)(e.stream)?(G(),q(oc,{key:0,class:`h-3.5`})):(G(),K(`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)),X(` `+D(I(Jo)[e.stream]),1)]),Y(cc,{variant:`quiet`,"aria-label":`Switch to ${I(n)===`dark`?`light`:`dark`} mode`,onClick:I(r)},{default:Nn(()=>[X(D(I(n)===`dark`?`Light`:`Dark`),1)]),_:1},8,[`aria-label`,`onClick`])])]))}}),ql=100;function Jl(){let e=F(null),t=Xt([]),n=F(`connecting`),r=F(!1),i=F(!1),a=F(null),o=null,s=!1,c=$(()=>ol(t.value).length>0),l=$(()=>a.value??(n.value===`closed`?`The connection to the tunnel is closed. Reload the page to connect again.`:null)),u=$(()=>!r.value&&l.value===null);async function d(){r.value||(a.value=null);try{let n=await ms(),i=(await Promise.all(il(n.watching).map(e=>hs({origin:e,limit:ql})))).flat(),o=e.value===null||e.value.logKey===n.logKey;e.value=n,t.value=tl(o?t.value:[],i),r.value=!0,a.value=null}catch(e){a.value=e instanceof ds?e.message:`The traffic could not be loaded.`}}function f(){let e=new EventSource(`${fs}stream`);o=e,e.addEventListener(`open`,()=>{s=!0,n.value=`live`,d()}),e.addEventListener(`exchange`,e=>{let n=JSON.parse(e.data);t.value=tl(t.value,[n])}),e.addEventListener(`error`,()=>{n.value=Yo(e.readyState===EventSource.CLOSED,s)})}function p(){o?.close(),o=null,n.value=`closed`}async function m(){let e=ol(t.value);if(!(e.length===0||i.value)){i.value=!0;try{let n=await Promise.all(e.map(e=>hs({...e,limit:ql})));t.value=tl(t.value,n.flat())}catch(e){a.value=e instanceof ds?e.message:`Older requests could not be loaded.`}finally{i.value=!1}}}async function h(e,n){let r=await gs(e,n);return t.value.some(e=>e.exchange.id===r.id)||await d(),r}return{status:e,records:t,stream:n,connecting:u,loaded:r,loadingOlder:i,problem:l,hasOlder:c,start:f,stop:p,loadOlder:m,replay:h}}function Yl(){let e=Jl();return hr(e.stop),e}var Xl={class:`flex h-dvh flex-col bg-ground text-ink`},Zl={key:0,class:`border-b border-hairline bg-err-bg px-4 py-2 text-sm text-err-fg`,role:`alert`},Ql={class:`min-h-0 flex-1`},$l={key:2,class:`flex h-full min-h-0 flex-col md:flex-row`},eu={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`},tu={class:`min-h-0 min-w-0 flex-1`},nu={key:1,class:`flex h-full items-center justify-center p-8 text-sm text-muted`};Do(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}=Yl(),f=F(null),p=$(()=>n.value.find(e=>el(e)===f.value)??null);function m(e){let t=n.value.find(t=>t.exchange.id===e);f.value=t===void 0?null:el(t)}let h=$(()=>rl(n.value,(t.value?.services??[]).map(e=>e.name))),g=$(()=>{let e=p.value?.exchange.replayOf;return e!==void 0&&n.value.some(t=>t.exchange.id===e)});return fr(l),(e,l)=>(G(),K(`div`,Xl,[Y(Kl,{status:I(t),stream:I(r)},null,8,[`status`,`stream`]),I(s)?(G(),K(`p`,Zl,D(I(s)),1)):Z(``,!0),J(`main`,Ql,[I(a)?I(n).length===0?(G(),q(us,{key:1,status:I(t),stream:I(r)},null,8,[`status`,`stream`])):(G(),K(`div`,$l,[J(`section`,eu,[Y(Sl,{records:I(n),services:h.value,"selected-key":f.value,"has-older":I(c),"loading-older":I(o),onSelect:l[0]||=e=>f.value=e,onLoadOlder:I(u)},null,8,[`records`,`services`,`selected-key`,`has-older`,`loading-older`,`onLoadOlder`])]),J(`section`,tu,[p.value?(G(),q($c,{key:0,record:p.value,status:I(t),"original-loaded":g.value,replay:I(d),onSelect:m},null,8,[`record`,`status`,`original-loaded`,`replay`])):(G(),K(`div`,nu,` Select a request to see its headers and body. `))])])):(G(),q(qo,{key:0,connecting:I(i)},null,8,[`connecting`]))])]))}})).mount(`#app`);
|