@mwguerra/hull 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +631 -0
- package/assets/hull-logo.png +0 -0
- package/assets/hull-logo.svg +5 -0
- package/bin/hull.js +4 -0
- package/devtools/dist/index.html +29 -0
- package/host/CMakeLists.txt +101 -0
- package/host/README.md +94 -0
- package/host/linux.Dockerfile +26 -0
- package/host/src/bindings/credentials.hpp +35 -0
- package/host/src/bindings/database.hpp +51 -0
- package/host/src/bindings/files.hpp +58 -0
- package/host/src/bindings/http.hpp +84 -0
- package/host/src/bindings/printer.hpp +281 -0
- package/host/src/bindings/storage.hpp +71 -0
- package/host/src/db_core.hpp +198 -0
- package/host/src/dispatcher.hpp +81 -0
- package/host/src/file_store.hpp +91 -0
- package/host/src/keychain.hpp +157 -0
- package/host/src/main.cpp +386 -0
- package/host/src/paths.hpp +62 -0
- package/host/src/secure.hpp +124 -0
- package/host/src/serve.hpp +113 -0
- package/host/test/db_test.cpp +80 -0
- package/host/test/secure_files_test.cpp +68 -0
- package/host/third_party/sqlite/sqlite3.c +269376 -0
- package/host/third_party/sqlite/sqlite3.h +14347 -0
- package/package.json +58 -0
- package/src/bridge/bridge-core.js +92 -0
- package/src/bridge/index.js +139 -0
- package/src/bridge/native-store.js +34 -0
- package/src/cli/build.js +122 -0
- package/src/cli/config.js +102 -0
- package/src/cli/dev.js +158 -0
- package/src/cli/eject.js +39 -0
- package/src/cli/host.js +61 -0
- package/src/cli/index.js +54 -0
- package/src/cli/installer.js +265 -0
- package/src/cli/release.js +178 -0
- package/src/cli/start.js +45 -0
- package/src/cli/timing.js +22 -0
- package/src/cli/vite.js +16 -0
- package/src/react/index.js +30 -0
- package/src/vue/index.js +31 -0
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
<!doctype html>
|
|
2
|
+
<html lang="en">
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="UTF-8" />
|
|
5
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
6
|
+
<title>Hull Inspector</title>
|
|
7
|
+
<script type="module" crossorigin>(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const r of document.querySelectorAll('link[rel="modulepreload"]'))n(r);new MutationObserver(r=>{for(const i of r)if(i.type==="childList")for(const l of i.addedNodes)l.tagName==="LINK"&&l.rel==="modulepreload"&&n(l)}).observe(document,{childList:!0,subtree:!0});function s(r){const i={};return r.integrity&&(i.integrity=r.integrity),r.referrerPolicy&&(i.referrerPolicy=r.referrerPolicy),r.crossOrigin==="use-credentials"?i.credentials="include":r.crossOrigin==="anonymous"?i.credentials="omit":i.credentials="same-origin",i}function n(r){if(r.ep)return;r.ep=!0;const i=s(r);fetch(r.href,i)}})();/**
|
|
8
|
+
* @vue/shared v3.5.35
|
|
9
|
+
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
10
|
+
* @license MIT
|
|
11
|
+
**/function Ns(e){const t=Object.create(null);for(const s of e.split(","))t[s]=1;return s=>s in t}const Y={},nt=[],Ie=()=>{},jn=()=>!1,Qt=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),es=e=>e.startsWith("onUpdate:"),re=Object.assign,Hs=(e,t)=>{const s=e.indexOf(t);s>-1&&e.splice(s,1)},Br=Object.prototype.hasOwnProperty,K=(e,t)=>Br.call(e,t),D=Array.isArray,rt=e=>Mt(e)==="[object Map]",Ln=e=>Mt(e)==="[object Set]",on=e=>Mt(e)==="[object Date]",N=e=>typeof e=="function",X=e=>typeof e=="string",Re=e=>typeof e=="symbol",V=e=>e!==null&&typeof e=="object",$n=e=>(V(e)||N(e))&&N(e.then)&&N(e.catch),Kn=Object.prototype.toString,Mt=e=>Kn.call(e),qr=e=>Mt(e).slice(8,-1),Un=e=>Mt(e)==="[object Object]",js=e=>X(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,bt=Ns(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),ts=e=>{const t=Object.create(null);return(s=>t[s]||(t[s]=e(s)))},Jr=/-\w/g,me=ts(e=>e.replace(Jr,t=>t.slice(1).toUpperCase())),Gr=/\B([A-Z])/g,et=ts(e=>e.replace(Gr,"-$1").toLowerCase()),Wn=ts(e=>e.charAt(0).toUpperCase()+e.slice(1)),us=ts(e=>e?`on${Wn(e)}`:""),Pe=(e,t)=>!Object.is(e,t),as=(e,...t)=>{for(let s=0;s<e.length;s++)e[s](...t)},Vn=(e,t,s,n=!1)=>{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,writable:n,value:s})},Yr=e=>{const t=parseFloat(e);return isNaN(t)?e:t};let cn;const ss=()=>cn||(cn=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function Ls(e){if(D(e)){const t={};for(let s=0;s<e.length;s++){const n=e[s],r=X(n)?Zr(n):Ls(n);if(r)for(const i in r)t[i]=r[i]}return t}else if(X(e)||V(e))return e}const zr=/;(?![^(]*\))/g,kr=/:([^]+)/,Xr=/\/\*[^]*?\*\//g;function Zr(e){const t={};return e.replace(Xr,"").split(zr).forEach(s=>{if(s){const n=s.split(kr);n.length>1&&(t[n[0].trim()]=n[1].trim())}}),t}function Xe(e){let t="";if(X(e))t=e;else if(D(e))for(let s=0;s<e.length;s++){const n=Xe(e[s]);n&&(t+=n+" ")}else if(V(e))for(const s in e)e[s]&&(t+=s+" ");return t.trim()}const Qr="itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly",ei=Ns(Qr);function Bn(e){return!!e||e===""}function ti(e,t){if(e.length!==t.length)return!1;let s=!0;for(let n=0;s&&n<e.length;n++)s=$s(e[n],t[n]);return s}function $s(e,t){if(e===t)return!0;let s=on(e),n=on(t);if(s||n)return s&&n?e.getTime()===t.getTime():!1;if(s=Re(e),n=Re(t),s||n)return e===t;if(s=D(e),n=D(t),s||n)return s&&n?ti(e,t):!1;if(s=V(e),n=V(t),s||n){if(!s||!n)return!1;const r=Object.keys(e).length,i=Object.keys(t).length;if(r!==i)return!1;for(const l in e){const o=e.hasOwnProperty(l),f=t.hasOwnProperty(l);if(o&&!f||!o&&f||!$s(e[l],t[l]))return!1}}return String(e)===String(t)}const qn=e=>!!(e&&e.__v_isRef===!0),Q=e=>X(e)?e:e==null?"":D(e)||V(e)&&(e.toString===Kn||!N(e.toString))?qn(e)?Q(e.value):JSON.stringify(e,Jn,2):String(e),Jn=(e,t)=>qn(t)?Jn(e,t.value):rt(t)?{[`Map(${t.size})`]:[...t.entries()].reduce((s,[n,r],i)=>(s[ds(n,i)+" =>"]=r,s),{})}:Ln(t)?{[`Set(${t.size})`]:[...t.values()].map(s=>ds(s))}:Re(t)?ds(t):V(t)&&!D(t)&&!Un(t)?String(t):t,ds=(e,t="")=>{var s;return Re(e)?`Symbol(${(s=e.description)!=null?s:t})`:e};/**
|
|
12
|
+
* @vue/reactivity v3.5.35
|
|
13
|
+
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
14
|
+
* @license MIT
|
|
15
|
+
**/let te;class si{constructor(t=!1){this.detached=t,this._active=!0,this._on=0,this.effects=[],this.cleanups=[],this._isPaused=!1,this._warnOnRun=!0,this.__v_skip=!0,!t&&te&&(te.active?(this.parent=te,this.index=(te.scopes||(te.scopes=[])).push(this)-1):(this._active=!1,this._warnOnRun=!1))}get active(){return this._active}pause(){if(this._active){this._isPaused=!0;let t,s;if(this.scopes)for(t=0,s=this.scopes.length;t<s;t++)this.scopes[t].pause();for(t=0,s=this.effects.length;t<s;t++)this.effects[t].pause()}}resume(){if(this._active&&this._isPaused){this._isPaused=!1;let t,s;if(this.scopes)for(t=0,s=this.scopes.length;t<s;t++)this.scopes[t].resume();for(t=0,s=this.effects.length;t<s;t++)this.effects[t].resume()}}run(t){if(this._active){const s=te;try{return te=this,t()}finally{te=s}}}on(){++this._on===1&&(this.prevScope=te,te=this)}off(){if(this._on>0&&--this._on===0){if(te===this)te=this.prevScope;else{let t=te;for(;t;){if(t.prevScope===this){t.prevScope=this.prevScope;break}t=t.prevScope}}this.prevScope=void 0}}stop(t){if(this._active){this._active=!1;let s,n;for(s=0,n=this.effects.length;s<n;s++)this.effects[s].stop();for(this.effects.length=0,s=0,n=this.cleanups.length;s<n;s++)this.cleanups[s]();if(this.cleanups.length=0,this.scopes){for(s=0,n=this.scopes.length;s<n;s++)this.scopes[s].stop(!0);this.scopes.length=0}if(!this.detached&&this.parent&&!t){const r=this.parent.scopes.pop();r&&r!==this&&(this.parent.scopes[this.index]=r,r.index=this.index)}this.parent=void 0}}}function ni(){return te}let G;const hs=new WeakSet;class Gn{constructor(t){this.fn=t,this.deps=void 0,this.depsTail=void 0,this.flags=5,this.next=void 0,this.cleanup=void 0,this.scheduler=void 0,te&&(te.active?te.effects.push(this):this.flags&=-2)}pause(){this.flags|=64}resume(){this.flags&64&&(this.flags&=-65,hs.has(this)&&(hs.delete(this),this.trigger()))}notify(){this.flags&2&&!(this.flags&32)||this.flags&8||zn(this)}run(){if(!(this.flags&1))return this.fn();this.flags|=2,fn(this),kn(this);const t=G,s=be;G=this,be=!0;try{return this.fn()}finally{Xn(this),G=t,be=s,this.flags&=-3}}stop(){if(this.flags&1){for(let t=this.deps;t;t=t.nextDep)Ws(t);this.deps=this.depsTail=void 0,fn(this),this.onStop&&this.onStop(),this.flags&=-2}}trigger(){this.flags&64?hs.add(this):this.scheduler?this.scheduler():this.runIfDirty()}runIfDirty(){ws(this)&&this.run()}get dirty(){return ws(this)}}let Yn=0,yt,vt;function zn(e,t=!1){if(e.flags|=8,t){e.next=vt,vt=e;return}e.next=yt,yt=e}function Ks(){Yn++}function Us(){if(--Yn>0)return;if(vt){let t=vt;for(vt=void 0;t;){const s=t.next;t.next=void 0,t.flags&=-9,t=s}}let e;for(;yt;){let t=yt;for(yt=void 0;t;){const s=t.next;if(t.next=void 0,t.flags&=-9,t.flags&1)try{t.trigger()}catch(n){e||(e=n)}t=s}}if(e)throw e}function kn(e){for(let t=e.deps;t;t=t.nextDep)t.version=-1,t.prevActiveLink=t.dep.activeLink,t.dep.activeLink=t}function Xn(e){let t,s=e.depsTail,n=s;for(;n;){const r=n.prevDep;n.version===-1?(n===s&&(s=r),Ws(n),ri(n)):t=n,n.dep.activeLink=n.prevActiveLink,n.prevActiveLink=void 0,n=r}e.deps=t,e.depsTail=s}function ws(e){for(let t=e.deps;t;t=t.nextDep)if(t.dep.version!==t.version||t.dep.computed&&(Zn(t.dep.computed)||t.dep.version!==t.version))return!0;return!!e._dirty}function Zn(e){if(e.flags&4&&!(e.flags&16)||(e.flags&=-17,e.globalVersion===Tt)||(e.globalVersion=Tt,!e.isSSR&&e.flags&128&&(!e.deps&&!e._dirty||!ws(e))))return;e.flags|=2;const t=e.dep,s=G,n=be;G=e,be=!0;try{kn(e);const r=e.fn(e._value);(t.version===0||Pe(r,e._value))&&(e.flags|=128,e._value=r,t.version++)}catch(r){throw t.version++,r}finally{G=s,be=n,Xn(e),e.flags&=-3}}function Ws(e,t=!1){const{dep:s,prevSub:n,nextSub:r}=e;if(n&&(n.nextSub=r,e.prevSub=void 0),r&&(r.prevSub=n,e.nextSub=void 0),s.subs===e&&(s.subs=n,!n&&s.computed)){s.computed.flags&=-5;for(let i=s.computed.deps;i;i=i.nextDep)Ws(i,!0)}!t&&!--s.sc&&s.map&&s.map.delete(s.key)}function ri(e){const{prevDep:t,nextDep:s}=e;t&&(t.nextDep=s,e.prevDep=void 0),s&&(s.prevDep=t,e.nextDep=void 0)}let be=!0;const Qn=[];function Le(){Qn.push(be),be=!1}function $e(){const e=Qn.pop();be=e===void 0?!0:e}function fn(e){const{cleanup:t}=e;if(e.cleanup=void 0,t){const s=G;G=void 0;try{t()}finally{G=s}}}let Tt=0;class ii{constructor(t,s){this.sub=t,this.dep=s,this.version=s.version,this.nextDep=this.prevDep=this.nextSub=this.prevSub=this.prevActiveLink=void 0}}class Vs{constructor(t){this.computed=t,this.version=0,this.activeLink=void 0,this.subs=void 0,this.map=void 0,this.key=void 0,this.sc=0,this.__v_skip=!0}track(t){if(!G||!be||G===this.computed)return;let s=this.activeLink;if(s===void 0||s.sub!==G)s=this.activeLink=new ii(G,this),G.deps?(s.prevDep=G.depsTail,G.depsTail.nextDep=s,G.depsTail=s):G.deps=G.depsTail=s,er(s);else if(s.version===-1&&(s.version=this.version,s.nextDep)){const n=s.nextDep;n.prevDep=s.prevDep,s.prevDep&&(s.prevDep.nextDep=n),s.prevDep=G.depsTail,s.nextDep=void 0,G.depsTail.nextDep=s,G.depsTail=s,G.deps===s&&(G.deps=n)}return s}trigger(t){this.version++,Tt++,this.notify(t)}notify(t){Ks();try{for(let s=this.subs;s;s=s.prevSub)s.sub.notify()&&s.sub.dep.notify()}finally{Us()}}}function er(e){if(e.dep.sc++,e.sub.flags&4){const t=e.dep.computed;if(t&&!e.dep.subs){t.flags|=20;for(let n=t.deps;n;n=n.nextDep)er(n)}const s=e.dep.subs;s!==e&&(e.prevSub=s,s&&(s.nextSub=e)),e.dep.subs=e}}const Cs=new WeakMap,Ze=Symbol(""),Ts=Symbol(""),Ot=Symbol("");function se(e,t,s){if(be&&G){let n=Cs.get(e);n||Cs.set(e,n=new Map);let r=n.get(s);r||(n.set(s,r=new Vs),r.map=n,r.key=s),r.track()}}function He(e,t,s,n,r,i){const l=Cs.get(e);if(!l){Tt++;return}const o=f=>{f&&f.trigger()};if(Ks(),t==="clear")l.forEach(o);else{const f=D(e),d=f&&js(s);if(f&&s==="length"){const a=Number(n);l.forEach((p,w)=>{(w==="length"||w===Ot||!Re(w)&&w>=a)&&o(p)})}else switch((s!==void 0||l.has(void 0))&&o(l.get(s)),d&&o(l.get(Ot)),t){case"add":f?d&&o(l.get("length")):(o(l.get(Ze)),rt(e)&&o(l.get(Ts)));break;case"delete":f||(o(l.get(Ze)),rt(e)&&o(l.get(Ts)));break;case"set":rt(e)&&o(l.get(Ze));break}}Us()}function tt(e){const t=$(e);return t===e?t:(se(t,"iterate",Ot),_e(e)?t:t.map(ye))}function ns(e){return se(e=$(e),"iterate",Ot),e}function Ee(e,t){return Ke(e)?ct(Qe(e)?ye(t):t):ye(t)}const li={__proto__:null,[Symbol.iterator](){return ps(this,Symbol.iterator,e=>Ee(this,e))},concat(...e){return tt(this).concat(...e.map(t=>D(t)?tt(t):t))},entries(){return ps(this,"entries",e=>(e[1]=Ee(this,e[1]),e))},every(e,t){return Fe(this,"every",e,t,void 0,arguments)},filter(e,t){return Fe(this,"filter",e,t,s=>s.map(n=>Ee(this,n)),arguments)},find(e,t){return Fe(this,"find",e,t,s=>Ee(this,s),arguments)},findIndex(e,t){return Fe(this,"findIndex",e,t,void 0,arguments)},findLast(e,t){return Fe(this,"findLast",e,t,s=>Ee(this,s),arguments)},findLastIndex(e,t){return Fe(this,"findLastIndex",e,t,void 0,arguments)},forEach(e,t){return Fe(this,"forEach",e,t,void 0,arguments)},includes(...e){return gs(this,"includes",e)},indexOf(...e){return gs(this,"indexOf",e)},join(e){return tt(this).join(e)},lastIndexOf(...e){return gs(this,"lastIndexOf",e)},map(e,t){return Fe(this,"map",e,t,void 0,arguments)},pop(){return pt(this,"pop")},push(...e){return pt(this,"push",e)},reduce(e,...t){return un(this,"reduce",e,t)},reduceRight(e,...t){return un(this,"reduceRight",e,t)},shift(){return pt(this,"shift")},some(e,t){return Fe(this,"some",e,t,void 0,arguments)},splice(...e){return pt(this,"splice",e)},toReversed(){return tt(this).toReversed()},toSorted(e){return tt(this).toSorted(e)},toSpliced(...e){return tt(this).toSpliced(...e)},unshift(...e){return pt(this,"unshift",e)},values(){return ps(this,"values",e=>Ee(this,e))}};function ps(e,t,s){const n=ns(e),r=n[t]();return n!==e&&!_e(e)&&(r._next=r.next,r.next=()=>{const i=r._next();return i.done||(i.value=s(i.value)),i}),r}const oi=Array.prototype;function Fe(e,t,s,n,r,i){const l=ns(e),o=l!==e&&!_e(e),f=l[t];if(f!==oi[t]){const p=f.apply(e,i);return o?ye(p):p}let d=s;l!==e&&(o?d=function(p,w){return s.call(this,Ee(e,p),w,e)}:s.length>2&&(d=function(p,w){return s.call(this,p,w,e)}));const a=f.call(l,d,n);return o&&r?r(a):a}function un(e,t,s,n){const r=ns(e),i=r!==e&&!_e(e);let l=s,o=!1;r!==e&&(i?(o=n.length===0,l=function(d,a,p){return o&&(o=!1,d=Ee(e,d)),s.call(this,d,Ee(e,a),p,e)}):s.length>3&&(l=function(d,a,p){return s.call(this,d,a,p,e)}));const f=r[t](l,...n);return o?Ee(e,f):f}function gs(e,t,s){const n=$(e);se(n,"iterate",Ot);const r=n[t](...s);return(r===-1||r===!1)&&Js(s[0])?(s[0]=$(s[0]),n[t](...s)):r}function pt(e,t,s=[]){Le(),Ks();const n=$(e)[t].apply(e,s);return Us(),$e(),n}const ci=Ns("__proto__,__v_isRef,__isVue"),tr=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>e!=="arguments"&&e!=="caller").map(e=>Symbol[e]).filter(Re));function fi(e){Re(e)||(e=String(e));const t=$(this);return se(t,"has",e),t.hasOwnProperty(e)}class sr{constructor(t=!1,s=!1){this._isReadonly=t,this._isShallow=s}get(t,s,n){if(s==="__v_skip")return t.__v_skip;const r=this._isReadonly,i=this._isShallow;if(s==="__v_isReactive")return!r;if(s==="__v_isReadonly")return r;if(s==="__v_isShallow")return i;if(s==="__v_raw")return n===(r?i?yi:lr:i?ir:rr).get(t)||Object.getPrototypeOf(t)===Object.getPrototypeOf(n)?t:void 0;const l=D(t);if(!r){let f;if(l&&(f=li[s]))return f;if(s==="hasOwnProperty")return fi}const o=Reflect.get(t,s,ne(t)?t:n);if((Re(s)?tr.has(s):ci(s))||(r||se(t,"get",s),i))return o;if(ne(o)){const f=l&&js(s)?o:o.value;return r&&V(f)?Es(f):f}return V(o)?r?Es(o):it(o):o}}class nr extends sr{constructor(t=!1){super(!1,t)}set(t,s,n,r){let i=t[s];const l=D(t)&&js(s);if(!this._isShallow){const d=Ke(i);if(!_e(n)&&!Ke(n)&&(i=$(i),n=$(n)),!l&&ne(i)&&!ne(n))return d||(i.value=n),!0}const o=l?Number(s)<t.length:K(t,s),f=Reflect.set(t,s,n,ne(t)?t:r);return t===$(r)&&(o?Pe(n,i)&&He(t,"set",s,n):He(t,"add",s,n)),f}deleteProperty(t,s){const n=K(t,s);t[s];const r=Reflect.deleteProperty(t,s);return r&&n&&He(t,"delete",s,void 0),r}has(t,s){const n=Reflect.has(t,s);return(!Re(s)||!tr.has(s))&&se(t,"has",s),n}ownKeys(t){return se(t,"iterate",D(t)?"length":Ze),Reflect.ownKeys(t)}}class ui extends sr{constructor(t=!1){super(!0,t)}set(t,s){return!0}deleteProperty(t,s){return!0}}const ai=new nr,di=new ui,hi=new nr(!0);const Os=e=>e,Lt=e=>Reflect.getPrototypeOf(e);function pi(e,t,s){return function(...n){const r=this.__v_raw,i=$(r),l=rt(i),o=e==="entries"||e===Symbol.iterator&&l,f=e==="keys"&&l,d=r[e](...n),a=s?Os:t?ct:ye;return!t&&se(i,"iterate",f?Ts:Ze),re(Object.create(d),{next(){const{value:p,done:w}=d.next();return w?{value:p,done:w}:{value:o?[a(p[0]),a(p[1])]:a(p),done:w}}})}}function $t(e){return function(...t){return e==="delete"?!1:e==="clear"?void 0:this}}function gi(e,t){const s={get(r){const i=this.__v_raw,l=$(i),o=$(r);e||(Pe(r,o)&&se(l,"get",r),se(l,"get",o));const{has:f}=Lt(l),d=t?Os:e?ct:ye;if(f.call(l,r))return d(i.get(r));if(f.call(l,o))return d(i.get(o));i!==l&&i.get(r)},get size(){const r=this.__v_raw;return!e&&se($(r),"iterate",Ze),r.size},has(r){const i=this.__v_raw,l=$(i),o=$(r);return e||(Pe(r,o)&&se(l,"has",r),se(l,"has",o)),r===o?i.has(r):i.has(r)||i.has(o)},forEach(r,i){const l=this,o=l.__v_raw,f=$(o),d=t?Os:e?ct:ye;return!e&&se(f,"iterate",Ze),o.forEach((a,p)=>r.call(i,d(a),d(p),l))}};return re(s,e?{add:$t("add"),set:$t("set"),delete:$t("delete"),clear:$t("clear")}:{add(r){const i=$(this),l=Lt(i),o=$(r),f=!t&&!_e(r)&&!Ke(r)?o:r;return l.has.call(i,f)||Pe(r,f)&&l.has.call(i,r)||Pe(o,f)&&l.has.call(i,o)||(i.add(f),He(i,"add",f,f)),this},set(r,i){!t&&!_e(i)&&!Ke(i)&&(i=$(i));const l=$(this),{has:o,get:f}=Lt(l);let d=o.call(l,r);d||(r=$(r),d=o.call(l,r));const a=f.call(l,r);return l.set(r,i),d?Pe(i,a)&&He(l,"set",r,i):He(l,"add",r,i),this},delete(r){const i=$(this),{has:l,get:o}=Lt(i);let f=l.call(i,r);f||(r=$(r),f=l.call(i,r)),o&&o.call(i,r);const d=i.delete(r);return f&&He(i,"delete",r,void 0),d},clear(){const r=$(this),i=r.size!==0,l=r.clear();return i&&He(r,"clear",void 0,void 0),l}}),["keys","values","entries",Symbol.iterator].forEach(r=>{s[r]=pi(r,e,t)}),s}function Bs(e,t){const s=gi(e,t);return(n,r,i)=>r==="__v_isReactive"?!e:r==="__v_isReadonly"?e:r==="__v_raw"?n:Reflect.get(K(s,r)&&r in n?s:n,r,i)}const _i={get:Bs(!1,!1)},mi={get:Bs(!1,!0)},bi={get:Bs(!0,!1)};const rr=new WeakMap,ir=new WeakMap,lr=new WeakMap,yi=new WeakMap;function vi(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function it(e){return Ke(e)?e:qs(e,!1,ai,_i,rr)}function xi(e){return qs(e,!1,hi,mi,ir)}function Es(e){return qs(e,!0,di,bi,lr)}function qs(e,t,s,n,r){if(!V(e)||e.__v_raw&&!(t&&e.__v_isReactive)||e.__v_skip||!Object.isExtensible(e))return e;const i=r.get(e);if(i)return i;const l=vi(qr(e));if(l===0)return e;const o=new Proxy(e,l===2?n:s);return r.set(e,o),o}function Qe(e){return Ke(e)?Qe(e.__v_raw):!!(e&&e.__v_isReactive)}function Ke(e){return!!(e&&e.__v_isReadonly)}function _e(e){return!!(e&&e.__v_isShallow)}function Js(e){return e?!!e.__v_raw:!1}function $(e){const t=e&&e.__v_raw;return t?$(t):e}function Si(e){return!K(e,"__v_skip")&&Object.isExtensible(e)&&Vn(e,"__v_skip",!0),e}const ye=e=>V(e)?it(e):e,ct=e=>V(e)?Es(e):e;function ne(e){return e?e.__v_isRef===!0:!1}function Kt(e){return wi(e,!1)}function wi(e,t){return ne(e)?e:new Ci(e,t)}class Ci{constructor(t,s){this.dep=new Vs,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=s?t:$(t),this._value=s?t:ye(t),this.__v_isShallow=s}get value(){return this.dep.track(),this._value}set value(t){const s=this._rawValue,n=this.__v_isShallow||_e(t)||Ke(t);t=n?t:$(t),Pe(t,s)&&(this._rawValue=t,this._value=n?t:ye(t),this.dep.trigger())}}function Ti(e){return ne(e)?e.value:e}const Oi={get:(e,t,s)=>t==="__v_raw"?e:Ti(Reflect.get(e,t,s)),set:(e,t,s,n)=>{const r=e[t];return ne(r)&&!ne(s)?(r.value=s,!0):Reflect.set(e,t,s,n)}};function or(e){return Qe(e)?e:new Proxy(e,Oi)}class Ei{constructor(t,s,n){this.fn=t,this.setter=s,this._value=void 0,this.dep=new Vs(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=Tt-1,this.next=void 0,this.effect=this,this.__v_isReadonly=!s,this.isSSR=n}notify(){if(this.flags|=16,!(this.flags&8)&&G!==this)return zn(this,!0),!0}get value(){const t=this.dep.track();return Zn(this),t&&(t.version=this.dep.version),this._value}set value(t){this.setter&&this.setter(t)}}function Ai(e,t,s=!1){let n,r;return N(e)?n=e:(n=e.get,r=e.set),new Ei(n,r,s)}const Ut={},Gt=new WeakMap;let ke;function Pi(e,t=!1,s=ke){if(s){let n=Gt.get(s);n||Gt.set(s,n=[]),n.push(e)}}function Mi(e,t,s=Y){const{immediate:n,deep:r,once:i,scheduler:l,augmentJob:o,call:f}=s,d=I=>r?I:_e(I)||r===!1||r===0?Ve(I,1):Ve(I);let a,p,w,O,L=!1,R=!1;if(ne(e)?(p=()=>e.value,L=_e(e)):Qe(e)?(p=()=>d(e),L=!0):D(e)?(R=!0,L=e.some(I=>Qe(I)||_e(I)),p=()=>e.map(I=>{if(ne(I))return I.value;if(Qe(I))return d(I);if(N(I))return f?f(I,2):I()})):N(e)?t?p=f?()=>f(e,2):e:p=()=>{if(w){Le();try{w()}finally{$e()}}const I=ke;ke=a;try{return f?f(e,3,[O]):e(O)}finally{ke=I}}:p=Ie,t&&r){const I=p,S=r===!0?1/0:r;p=()=>Ve(I(),S)}const z=ni(),U=()=>{a.stop(),z&&z.active&&Hs(z.effects,a)};if(i&&t){const I=t;t=(...S)=>{I(...S),U()}}let H=R?new Array(e.length).fill(Ut):Ut;const B=I=>{if(!(!(a.flags&1)||!a.dirty&&!I))if(t){const S=a.run();if(r||L||(R?S.some((T,A)=>Pe(T,H[A])):Pe(S,H))){w&&w();const T=ke;ke=a;try{const A=[S,H===Ut?void 0:R&&H[0]===Ut?[]:H,O];H=S,f?f(t,3,A):t(...A)}finally{ke=T}}}else a.run()};return o&&o(B),a=new Gn(p),a.scheduler=l?()=>l(B,!1):B,O=I=>Pi(I,!1,a),w=a.onStop=()=>{const I=Gt.get(a);if(I){if(f)f(I,4);else for(const S of I)S();Gt.delete(a)}},t?n?B(!0):H=a.run():l?l(B.bind(null,!0),!0):a.run(),U.pause=a.pause.bind(a),U.resume=a.resume.bind(a),U.stop=U,U}function Ve(e,t=1/0,s){if(t<=0||!V(e)||e.__v_skip||(s=s||new Map,(s.get(e)||0)>=t))return e;if(s.set(e,t),t--,ne(e))Ve(e.value,t,s);else if(D(e))for(let n=0;n<e.length;n++)Ve(e[n],t,s);else if(Ln(e)||rt(e))e.forEach(n=>{Ve(n,t,s)});else if(Un(e)){for(const n in e)Ve(e[n],t,s);for(const n of Object.getOwnPropertySymbols(e))Object.prototype.propertyIsEnumerable.call(e,n)&&Ve(e[n],t,s)}return e}/**
|
|
16
|
+
* @vue/runtime-core v3.5.35
|
|
17
|
+
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
18
|
+
* @license MIT
|
|
19
|
+
**/function It(e,t,s,n){try{return n?e(...n):e()}catch(r){rs(r,t,s)}}function ve(e,t,s,n){if(N(e)){const r=It(e,t,s,n);return r&&$n(r)&&r.catch(i=>{rs(i,t,s)}),r}if(D(e)){const r=[];for(let i=0;i<e.length;i++)r.push(ve(e[i],t,s,n));return r}}function rs(e,t,s,n=!0){const r=t?t.vnode:null,{errorHandler:i,throwUnhandledErrorInProduction:l}=t&&t.appContext.config||Y;if(t){let o=t.parent;const f=t.proxy,d=`https://vuejs.org/error-reference/#runtime-${s}`;for(;o;){const a=o.ec;if(a){for(let p=0;p<a.length;p++)if(a[p](e,f,d)===!1)return}o=o.parent}if(i){Le(),It(i,null,10,[e,f,d]),$e();return}}Ii(e,s,r,n,l)}function Ii(e,t,s,n=!0,r=!1){if(r)throw e;console.error(e)}const ce=[];let Oe=-1;const lt=[];let We=null,st=0;const cr=Promise.resolve();let Yt=null;function Ri(e){const t=Yt||cr;return e?t.then(this?e.bind(this):e):t}function Fi(e){let t=Oe+1,s=ce.length;for(;t<s;){const n=t+s>>>1,r=ce[n],i=Et(r);i<e||i===e&&r.flags&2?t=n+1:s=n}return t}function Gs(e){if(!(e.flags&1)){const t=Et(e),s=ce[ce.length-1];!s||!(e.flags&2)&&t>=Et(s)?ce.push(e):ce.splice(Fi(t),0,e),e.flags|=1,fr()}}function fr(){Yt||(Yt=cr.then(ar))}function Di(e){D(e)?lt.push(...e):We&&e.id===-1?We.splice(st+1,0,e):e.flags&1||(lt.push(e),e.flags|=1),fr()}function an(e,t,s=Oe+1){for(;s<ce.length;s++){const n=ce[s];if(n&&n.flags&2){if(e&&n.id!==e.uid)continue;ce.splice(s,1),s--,n.flags&4&&(n.flags&=-2),n(),n.flags&4||(n.flags&=-2)}}}function ur(e){if(lt.length){const t=[...new Set(lt)].sort((s,n)=>Et(s)-Et(n));if(lt.length=0,We){We.push(...t);return}for(We=t,st=0;st<We.length;st++){const s=We[st];s.flags&4&&(s.flags&=-2),s.flags&8||s(),s.flags&=-2}We=null,st=0}}const Et=e=>e.id==null?e.flags&2?-1:1/0:e.id;function ar(e){try{for(Oe=0;Oe<ce.length;Oe++){const t=ce[Oe];t&&!(t.flags&8)&&(t.flags&4&&(t.flags&=-2),It(t,t.i,t.i?15:14),t.flags&4||(t.flags&=-2))}}finally{for(;Oe<ce.length;Oe++){const t=ce[Oe];t&&(t.flags&=-2)}Oe=-1,ce.length=0,ur(),Yt=null,(ce.length||lt.length)&&ar()}}let Me=null,dr=null;function zt(e){const t=Me;return Me=e,dr=e&&e.type.__scopeId||null,t}function Ni(e,t=Me,s){if(!t||e._n)return e;const n=(...r)=>{n._d&&Sn(-1);const i=zt(t);let l;try{l=e(...r)}finally{zt(i),n._d&&Sn(1)}return l};return n._n=!0,n._c=!0,n._d=!0,n}function Ye(e,t,s,n){const r=e.dirs,i=t&&t.dirs;for(let l=0;l<r.length;l++){const o=r[l];i&&(o.oldValue=i[l].value);let f=o.dir[n];f&&(Le(),ve(f,s,8,[e.el,o,e,t]),$e())}}function Hi(e,t){if(fe){let s=fe.provides;const n=fe.parent&&fe.parent.provides;n===s&&(s=fe.provides=Object.create(n)),s[e]=t}}function Bt(e,t,s=!1){const n=Dl();if(n||ot){let r=ot?ot._context.provides:n?n.parent==null||n.ce?n.vnode.appContext&&n.vnode.appContext.provides:n.parent.provides:void 0;if(r&&e in r)return r[e];if(arguments.length>1)return s&&N(t)?t.call(n&&n.proxy):t}}const ji=Symbol.for("v-scx"),Li=()=>Bt(ji);function _s(e,t,s){return hr(e,t,s)}function hr(e,t,s=Y){const{immediate:n,deep:r,flush:i,once:l}=s,o=re({},s),f=t&&n||!t&&i!=="post";let d;if(Pt){if(i==="sync"){const O=Li();d=O.__watcherHandles||(O.__watcherHandles=[])}else if(!f){const O=()=>{};return O.stop=Ie,O.resume=Ie,O.pause=Ie,O}}const a=fe;o.call=(O,L,R)=>ve(O,a,L,R);let p=!1;i==="post"?o.scheduler=O=>{ae(O,a&&a.suspense)}:i!=="sync"&&(p=!0,o.scheduler=(O,L)=>{L?O():Gs(O)}),o.augmentJob=O=>{t&&(O.flags|=4),p&&(O.flags|=2,a&&(O.id=a.uid,O.i=a))};const w=Mi(e,t,o);return Pt&&(d?d.push(w):f&&w()),w}function $i(e,t,s){const n=this.proxy,r=X(e)?e.includes(".")?pr(n,e):()=>n[e]:e.bind(n,n);let i;N(t)?i=t:(i=t.handler,s=t);const l=Rt(this),o=hr(r,i.bind(n),s);return l(),o}function pr(e,t){const s=t.split(".");return()=>{let n=e;for(let r=0;r<s.length&&n;r++)n=n[s[r]];return n}}const Ki=Symbol("_vte"),Ui=e=>e.__isTeleport,ms=Symbol("_leaveCb");function Ys(e,t){e.shapeFlag&6&&e.component?(e.transition=t,Ys(e.component.subTree,t)):e.shapeFlag&128?(e.ssContent.transition=t.clone(e.ssContent),e.ssFallback.transition=t.clone(e.ssFallback)):e.transition=t}function gr(e){e.ids=[e.ids[0]+e.ids[2]+++"-",0,0]}function dn(e,t){let s;return!!((s=Object.getOwnPropertyDescriptor(e,t))&&!s.configurable)}const kt=new WeakMap;function xt(e,t,s,n,r=!1){if(D(e)){e.forEach((R,z)=>xt(R,t&&(D(t)?t[z]:t),s,n,r));return}if(St(n)&&!r){n.shapeFlag&512&&n.type.__asyncResolved&&n.component.subTree.component&&xt(e,t,s,n.component.subTree);return}const i=n.shapeFlag&4?Qs(n.component):n.el,l=r?null:i,{i:o,r:f}=e,d=t&&t.r,a=o.refs===Y?o.refs={}:o.refs,p=o.setupState,w=$(p),O=p===Y?jn:R=>dn(a,R)?!1:K(w,R),L=(R,z)=>!(z&&dn(a,z));if(d!=null&&d!==f){if(hn(t),X(d))a[d]=null,O(d)&&(p[d]=null);else if(ne(d)){const R=t;L(d,R.k)&&(d.value=null),R.k&&(a[R.k]=null)}}if(N(f))It(f,o,12,[l,a]);else{const R=X(f),z=ne(f);if(R||z){const U=()=>{if(e.f){const H=R?O(f)?p[f]:a[f]:L()||!e.k?f.value:a[e.k];if(r)D(H)&&Hs(H,i);else if(D(H))H.includes(i)||H.push(i);else if(R)a[f]=[i],O(f)&&(p[f]=a[f]);else{const B=[i];L(f,e.k)&&(f.value=B),e.k&&(a[e.k]=B)}}else R?(a[f]=l,O(f)&&(p[f]=l)):z&&(L(f,e.k)&&(f.value=l),e.k&&(a[e.k]=l))};if(l){const H=()=>{U(),kt.delete(e)};H.id=-1,kt.set(e,H),ae(H,s)}else hn(e),U()}}}function hn(e){const t=kt.get(e);t&&(t.flags|=8,kt.delete(e))}ss().requestIdleCallback;ss().cancelIdleCallback;const St=e=>!!e.type.__asyncLoader,_r=e=>e.type.__isKeepAlive;function Wi(e,t){mr(e,"a",t)}function Vi(e,t){mr(e,"da",t)}function mr(e,t,s=fe){const n=e.__wdc||(e.__wdc=()=>{let r=s;for(;r;){if(r.isDeactivated)return;r=r.parent}return e()});if(is(t,n,s),s){let r=s.parent;for(;r&&r.parent;)_r(r.parent.vnode)&&Bi(n,t,s,r),r=r.parent}}function Bi(e,t,s,n){const r=is(t,e,n,!0);zs(()=>{Hs(n[t],r)},s)}function is(e,t,s=fe,n=!1){if(s){const r=s[e]||(s[e]=[]),i=t.__weh||(t.__weh=(...l)=>{Le();const o=Rt(s),f=ve(t,s,e,l);return o(),$e(),f});return n?r.unshift(i):r.push(i),i}}const Ue=e=>(t,s=fe)=>{(!Pt||e==="sp")&&is(e,(...n)=>t(...n),s)},qi=Ue("bm"),br=Ue("m"),Ji=Ue("bu"),Gi=Ue("u"),Yi=Ue("bum"),zs=Ue("um"),zi=Ue("sp"),ki=Ue("rtg"),Xi=Ue("rtc");function Zi(e,t=fe){is("ec",e,t)}const Qi=Symbol.for("v-ndc");function Wt(e,t,s,n){let r;const i=s,l=D(e);if(l||X(e)){const o=l&&Qe(e);let f=!1,d=!1;o&&(f=!_e(e),d=Ke(e),e=ns(e)),r=new Array(e.length);for(let a=0,p=e.length;a<p;a++)r[a]=t(f?d?ct(ye(e[a])):ye(e[a]):e[a],a,void 0,i)}else if(typeof e=="number"){r=new Array(e);for(let o=0;o<e;o++)r[o]=t(o+1,o,void 0,i)}else if(V(e))if(e[Symbol.iterator])r=Array.from(e,(o,f)=>t(o,f,void 0,i));else{const o=Object.keys(e);r=new Array(o.length);for(let f=0,d=o.length;f<d;f++){const a=o[f];r[f]=t(e[a],a,f,i)}}else r=[];return r}const As=e=>e?$r(e)?Qs(e):As(e.parent):null,wt=re(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=>As(e.parent),$root:e=>As(e.root),$host:e=>e.ce,$emit:e=>e.emit,$options:e=>vr(e),$forceUpdate:e=>e.f||(e.f=()=>{Gs(e.update)}),$nextTick:e=>e.n||(e.n=Ri.bind(e.proxy)),$watch:e=>$i.bind(e)}),bs=(e,t)=>e!==Y&&!e.__isScriptSetup&&K(e,t),el={get({_:e},t){if(t==="__v_skip")return!0;const{ctx:s,setupState:n,data:r,props:i,accessCache:l,type:o,appContext:f}=e;if(t[0]!=="$"){const w=l[t];if(w!==void 0)switch(w){case 1:return n[t];case 2:return r[t];case 4:return s[t];case 3:return i[t]}else{if(bs(n,t))return l[t]=1,n[t];if(r!==Y&&K(r,t))return l[t]=2,r[t];if(K(i,t))return l[t]=3,i[t];if(s!==Y&&K(s,t))return l[t]=4,s[t];Ps&&(l[t]=0)}}const d=wt[t];let a,p;if(d)return t==="$attrs"&&se(e.attrs,"get",""),d(e);if((a=o.__cssModules)&&(a=a[t]))return a;if(s!==Y&&K(s,t))return l[t]=4,s[t];if(p=f.config.globalProperties,K(p,t))return p[t]},set({_:e},t,s){const{data:n,setupState:r,ctx:i}=e;return bs(r,t)?(r[t]=s,!0):n!==Y&&K(n,t)?(n[t]=s,!0):K(e.props,t)||t[0]==="$"&&t.slice(1)in e?!1:(i[t]=s,!0)},has({_:{data:e,setupState:t,accessCache:s,ctx:n,appContext:r,props:i,type:l}},o){let f;return!!(s[o]||e!==Y&&o[0]!=="$"&&K(e,o)||bs(t,o)||K(i,o)||K(n,o)||K(wt,o)||K(r.config.globalProperties,o)||(f=l.__cssModules)&&f[o])},defineProperty(e,t,s){return s.get!=null?e._.accessCache[t]=0:K(s,"value")&&this.set(e,t,s.value,null),Reflect.defineProperty(e,t,s)}};function pn(e){return D(e)?e.reduce((t,s)=>(t[s]=null,t),{}):e}let Ps=!0;function tl(e){const t=vr(e),s=e.proxy,n=e.ctx;Ps=!1,t.beforeCreate&&gn(t.beforeCreate,e,"bc");const{data:r,computed:i,methods:l,watch:o,provide:f,inject:d,created:a,beforeMount:p,mounted:w,beforeUpdate:O,updated:L,activated:R,deactivated:z,beforeDestroy:U,beforeUnmount:H,destroyed:B,unmounted:I,render:S,renderTracked:T,renderTriggered:A,errorCaptured:ge,serverPrefetch:Ft,expose:qe,inheritAttrs:ut,components:Dt,directives:Nt,filters:cs}=t;if(d&&sl(d,n,null),l)for(const k in l){const J=l[k];N(J)&&(n[k]=J.bind(s))}if(r){const k=r.call(s,s);V(k)&&(e.data=it(k))}if(Ps=!0,i)for(const k in i){const J=i[k],Je=N(J)?J.bind(s,s):N(J.get)?J.get.bind(s,s):Ie,Ht=!N(J)&&N(J.set)?J.set.bind(s):Ie,Ge=Jt({get:Je,set:Ht});Object.defineProperty(n,k,{enumerable:!0,configurable:!0,get:()=>Ge.value,set:xe=>Ge.value=xe})}if(o)for(const k in o)yr(o[k],n,s,k);if(f){const k=N(f)?f.call(s):f;Reflect.ownKeys(k).forEach(J=>{Hi(J,k[J])})}a&&gn(a,e,"c");function ie(k,J){D(J)?J.forEach(Je=>k(Je.bind(s))):J&&k(J.bind(s))}if(ie(qi,p),ie(br,w),ie(Ji,O),ie(Gi,L),ie(Wi,R),ie(Vi,z),ie(Zi,ge),ie(Xi,T),ie(ki,A),ie(Yi,H),ie(zs,I),ie(zi,Ft),D(qe))if(qe.length){const k=e.exposed||(e.exposed={});qe.forEach(J=>{Object.defineProperty(k,J,{get:()=>s[J],set:Je=>s[J]=Je,enumerable:!0})})}else e.exposed||(e.exposed={});S&&e.render===Ie&&(e.render=S),ut!=null&&(e.inheritAttrs=ut),Dt&&(e.components=Dt),Nt&&(e.directives=Nt),Ft&&gr(e)}function sl(e,t,s=Ie){D(e)&&(e=Ms(e));for(const n in e){const r=e[n];let i;V(r)?"default"in r?i=Bt(r.from||n,r.default,!0):i=Bt(r.from||n):i=Bt(r),ne(i)?Object.defineProperty(t,n,{enumerable:!0,configurable:!0,get:()=>i.value,set:l=>i.value=l}):t[n]=i}}function gn(e,t,s){ve(D(e)?e.map(n=>n.bind(t.proxy)):e.bind(t.proxy),t,s)}function yr(e,t,s,n){let r=n.includes(".")?pr(s,n):()=>s[n];if(X(e)){const i=t[e];N(i)&&_s(r,i)}else if(N(e))_s(r,e.bind(s));else if(V(e))if(D(e))e.forEach(i=>yr(i,t,s,n));else{const i=N(e.handler)?e.handler.bind(s):t[e.handler];N(i)&&_s(r,i,e)}}function vr(e){const t=e.type,{mixins:s,extends:n}=t,{mixins:r,optionsCache:i,config:{optionMergeStrategies:l}}=e.appContext,o=i.get(t);let f;return o?f=o:!r.length&&!s&&!n?f=t:(f={},r.length&&r.forEach(d=>Xt(f,d,l,!0)),Xt(f,t,l)),V(t)&&i.set(t,f),f}function Xt(e,t,s,n=!1){const{mixins:r,extends:i}=t;i&&Xt(e,i,s,!0),r&&r.forEach(l=>Xt(e,l,s,!0));for(const l in t)if(!(n&&l==="expose")){const o=nl[l]||s&&s[l];e[l]=o?o(e[l],t[l]):t[l]}return e}const nl={data:_n,props:mn,emits:mn,methods:_t,computed:_t,beforeCreate:le,created:le,beforeMount:le,mounted:le,beforeUpdate:le,updated:le,beforeDestroy:le,beforeUnmount:le,destroyed:le,unmounted:le,activated:le,deactivated:le,errorCaptured:le,serverPrefetch:le,components:_t,directives:_t,watch:il,provide:_n,inject:rl};function _n(e,t){return t?e?function(){return re(N(e)?e.call(this,this):e,N(t)?t.call(this,this):t)}:t:e}function rl(e,t){return _t(Ms(e),Ms(t))}function Ms(e){if(D(e)){const t={};for(let s=0;s<e.length;s++)t[e[s]]=e[s];return t}return e}function le(e,t){return e?[...new Set([].concat(e,t))]:t}function _t(e,t){return e?re(Object.create(null),e,t):t}function mn(e,t){return e?D(e)&&D(t)?[...new Set([...e,...t])]:re(Object.create(null),pn(e),pn(t??{})):t}function il(e,t){if(!e)return t;if(!t)return e;const s=re(Object.create(null),e);for(const n in t)s[n]=le(e[n],t[n]);return s}function xr(){return{app:null,config:{isNativeTag:jn,performance:!1,globalProperties:{},optionMergeStrategies:{},errorHandler:void 0,warnHandler:void 0,compilerOptions:{}},mixins:[],components:{},directives:{},provides:Object.create(null),optionsCache:new WeakMap,propsCache:new WeakMap,emitsCache:new WeakMap}}let ll=0;function ol(e,t){return function(n,r=null){N(n)||(n=re({},n)),r!=null&&!V(r)&&(r=null);const i=xr(),l=new WeakSet,o=[];let f=!1;const d=i.app={_uid:ll++,_component:n,_props:r,_container:null,_context:i,_instance:null,version:Kl,get config(){return i.config},set config(a){},use(a,...p){return l.has(a)||(a&&N(a.install)?(l.add(a),a.install(d,...p)):N(a)&&(l.add(a),a(d,...p))),d},mixin(a){return i.mixins.includes(a)||i.mixins.push(a),d},component(a,p){return p?(i.components[a]=p,d):i.components[a]},directive(a,p){return p?(i.directives[a]=p,d):i.directives[a]},mount(a,p,w){if(!f){const O=d._ceVNode||je(n,r);return O.appContext=i,w===!0?w="svg":w===!1&&(w=void 0),e(O,a,w),f=!0,d._container=a,a.__vue_app__=d,Qs(O.component)}},onUnmount(a){o.push(a)},unmount(){f&&(ve(o,d._instance,16),e(null,d._container),delete d._container.__vue_app__)},provide(a,p){return i.provides[a]=p,d},runWithContext(a){const p=ot;ot=d;try{return a()}finally{ot=p}}};return d}}let ot=null;const cl=(e,t)=>t==="modelValue"||t==="model-value"?e.modelModifiers:e[`${t}Modifiers`]||e[`${me(t)}Modifiers`]||e[`${et(t)}Modifiers`];function fl(e,t,...s){if(e.isUnmounted)return;const n=e.vnode.props||Y;let r=s;const i=t.startsWith("update:"),l=i&&cl(n,t.slice(7));l&&(l.trim&&(r=s.map(a=>X(a)?a.trim():a)),l.number&&(r=s.map(Yr)));let o,f=n[o=us(t)]||n[o=us(me(t))];!f&&i&&(f=n[o=us(et(t))]),f&&ve(f,e,6,r);const d=n[o+"Once"];if(d){if(!e.emitted)e.emitted={};else if(e.emitted[o])return;e.emitted[o]=!0,ve(d,e,6,r)}}const ul=new WeakMap;function Sr(e,t,s=!1){const n=s?ul:t.emitsCache,r=n.get(e);if(r!==void 0)return r;const i=e.emits;let l={},o=!1;if(!N(e)){const f=d=>{const a=Sr(d,t,!0);a&&(o=!0,re(l,a))};!s&&t.mixins.length&&t.mixins.forEach(f),e.extends&&f(e.extends),e.mixins&&e.mixins.forEach(f)}return!i&&!o?(V(e)&&n.set(e,null),null):(D(i)?i.forEach(f=>l[f]=null):re(l,i),V(e)&&n.set(e,l),l)}function ls(e,t){return!e||!Qt(t)?!1:(t=t.slice(2).replace(/Once$/,""),K(e,t[0].toLowerCase()+t.slice(1))||K(e,et(t))||K(e,t))}function bn(e){const{type:t,vnode:s,proxy:n,withProxy:r,propsOptions:[i],slots:l,attrs:o,emit:f,render:d,renderCache:a,props:p,data:w,setupState:O,ctx:L,inheritAttrs:R}=e,z=zt(e);let U,H;try{if(s.shapeFlag&4){const I=r||n,S=I;U=Ae(d.call(S,I,a,p,O,w,L)),H=o}else{const I=t;U=Ae(I.length>1?I(p,{attrs:o,slots:l,emit:f}):I(p,null)),H=t.props?o:al(o)}}catch(I){Ct.length=0,rs(I,e,1),U=je(Be)}let B=U;if(H&&R!==!1){const I=Object.keys(H),{shapeFlag:S}=B;I.length&&S&7&&(i&&I.some(es)&&(H=dl(H,i)),B=ft(B,H,!1,!0))}return s.dirs&&(B=ft(B,null,!1,!0),B.dirs=B.dirs?B.dirs.concat(s.dirs):s.dirs),s.transition&&Ys(B,s.transition),U=B,zt(z),U}const al=e=>{let t;for(const s in e)(s==="class"||s==="style"||Qt(s))&&((t||(t={}))[s]=e[s]);return t},dl=(e,t)=>{const s={};for(const n in e)(!es(n)||!(n.slice(9)in t))&&(s[n]=e[n]);return s};function hl(e,t,s){const{props:n,children:r,component:i}=e,{props:l,children:o,patchFlag:f}=t,d=i.emitsOptions;if(t.dirs||t.transition)return!0;if(s&&f>=0){if(f&1024)return!0;if(f&16)return n?yn(n,l,d):!!l;if(f&8){const a=t.dynamicProps;for(let p=0;p<a.length;p++){const w=a[p];if(wr(l,n,w)&&!ls(d,w))return!0}}}else return(r||o)&&(!o||!o.$stable)?!0:n===l?!1:n?l?yn(n,l,d):!0:!!l;return!1}function yn(e,t,s){const n=Object.keys(t);if(n.length!==Object.keys(e).length)return!0;for(let r=0;r<n.length;r++){const i=n[r];if(wr(t,e,i)&&!ls(s,i))return!0}return!1}function wr(e,t,s){const n=e[s],r=t[s];return s==="style"&&V(n)&&V(r)?!$s(n,r):n!==r}function pl({vnode:e,parent:t,suspense:s},n){for(;t;){const r=t.subTree;if(r.suspense&&r.suspense.activeBranch===e&&(r.suspense.vnode.el=r.el=n,e=r),r===e)(e=t.vnode).el=n,t=t.parent;else break}s&&s.activeBranch===e&&(s.vnode.el=n)}const Cr={},Tr=()=>Object.create(Cr),Or=e=>Object.getPrototypeOf(e)===Cr;function gl(e,t,s,n=!1){const r={},i=Tr();e.propsDefaults=Object.create(null),Er(e,t,r,i);for(const l in e.propsOptions[0])l in r||(r[l]=void 0);s?e.props=n?r:xi(r):e.type.props?e.props=r:e.props=i,e.attrs=i}function _l(e,t,s,n){const{props:r,attrs:i,vnode:{patchFlag:l}}=e,o=$(r),[f]=e.propsOptions;let d=!1;if((n||l>0)&&!(l&16)){if(l&8){const a=e.vnode.dynamicProps;for(let p=0;p<a.length;p++){let w=a[p];if(ls(e.emitsOptions,w))continue;const O=t[w];if(f)if(K(i,w))O!==i[w]&&(i[w]=O,d=!0);else{const L=me(w);r[L]=Is(f,o,L,O,e,!1)}else O!==i[w]&&(i[w]=O,d=!0)}}}else{Er(e,t,r,i)&&(d=!0);let a;for(const p in o)(!t||!K(t,p)&&((a=et(p))===p||!K(t,a)))&&(f?s&&(s[p]!==void 0||s[a]!==void 0)&&(r[p]=Is(f,o,p,void 0,e,!0)):delete r[p]);if(i!==o)for(const p in i)(!t||!K(t,p))&&(delete i[p],d=!0)}d&&He(e.attrs,"set","")}function Er(e,t,s,n){const[r,i]=e.propsOptions;let l=!1,o;if(t)for(let f in t){if(bt(f))continue;const d=t[f];let a;r&&K(r,a=me(f))?!i||!i.includes(a)?s[a]=d:(o||(o={}))[a]=d:ls(e.emitsOptions,f)||(!(f in n)||d!==n[f])&&(n[f]=d,l=!0)}if(i){const f=$(s),d=o||Y;for(let a=0;a<i.length;a++){const p=i[a];s[p]=Is(r,f,p,d[p],e,!K(d,p))}}return l}function Is(e,t,s,n,r,i){const l=e[s];if(l!=null){const o=K(l,"default");if(o&&n===void 0){const f=l.default;if(l.type!==Function&&!l.skipFactory&&N(f)){const{propsDefaults:d}=r;if(s in d)n=d[s];else{const a=Rt(r);n=d[s]=f.call(null,t),a()}}else n=f;r.ce&&r.ce._setProp(s,n)}l[0]&&(i&&!o?n=!1:l[1]&&(n===""||n===et(s))&&(n=!0))}return n}const ml=new WeakMap;function Ar(e,t,s=!1){const n=s?ml:t.propsCache,r=n.get(e);if(r)return r;const i=e.props,l={},o=[];let f=!1;if(!N(e)){const a=p=>{f=!0;const[w,O]=Ar(p,t,!0);re(l,w),O&&o.push(...O)};!s&&t.mixins.length&&t.mixins.forEach(a),e.extends&&a(e.extends),e.mixins&&e.mixins.forEach(a)}if(!i&&!f)return V(e)&&n.set(e,nt),nt;if(D(i))for(let a=0;a<i.length;a++){const p=me(i[a]);vn(p)&&(l[p]=Y)}else if(i)for(const a in i){const p=me(a);if(vn(p)){const w=i[a],O=l[p]=D(w)||N(w)?{type:w}:re({},w),L=O.type;let R=!1,z=!0;if(D(L))for(let U=0;U<L.length;++U){const H=L[U],B=N(H)&&H.name;if(B==="Boolean"){R=!0;break}else B==="String"&&(z=!1)}else R=N(L)&&L.name==="Boolean";O[0]=R,O[1]=z,(R||K(O,"default"))&&o.push(p)}}const d=[l,o];return V(e)&&n.set(e,d),d}function vn(e){return e[0]!=="$"&&!bt(e)}const ks=e=>e==="_"||e==="_ctx"||e==="$stable",Xs=e=>D(e)?e.map(Ae):[Ae(e)],bl=(e,t,s)=>{if(t._n)return t;const n=Ni((...r)=>Xs(t(...r)),s);return n._c=!1,n},Pr=(e,t,s)=>{const n=e._ctx;for(const r in e){if(ks(r))continue;const i=e[r];if(N(i))t[r]=bl(r,i,n);else if(i!=null){const l=Xs(i);t[r]=()=>l}}},Mr=(e,t)=>{const s=Xs(t);e.slots.default=()=>s},Ir=(e,t,s)=>{for(const n in t)(s||!ks(n))&&(e[n]=t[n])},yl=(e,t,s)=>{const n=e.slots=Tr();if(e.vnode.shapeFlag&32){const r=t._;r?(Ir(n,t,s),s&&Vn(n,"_",r,!0)):Pr(t,n)}else t&&Mr(e,t)},vl=(e,t,s)=>{const{vnode:n,slots:r}=e;let i=!0,l=Y;if(n.shapeFlag&32){const o=t._;o?s&&o===1?i=!1:Ir(r,t,s):(i=!t.$stable,Pr(t,r)),l=t}else t&&(Mr(e,t),l={default:1});if(i)for(const o in r)!ks(o)&&l[o]==null&&delete r[o]},ae=Tl;function xl(e){return Sl(e)}function Sl(e,t){const s=ss();s.__VUE__=!0;const{insert:n,remove:r,patchProp:i,createElement:l,createText:o,createComment:f,setText:d,setElementText:a,parentNode:p,nextSibling:w,setScopeId:O=Ie,insertStaticContent:L}=e,R=(c,u,h,b=null,_=null,g=null,x=void 0,v=null,y=!!u.dynamicChildren)=>{if(c===u)return;c&&!gt(c,u)&&(b=jt(c),xe(c,_,g,!0),c=null),u.patchFlag===-2&&(y=!1,u.dynamicChildren=null);const{type:m,ref:P,shapeFlag:C}=u;switch(m){case os:z(c,u,h,b);break;case Be:U(c,u,h,b);break;case vs:c==null&&H(u,h,b,x);break;case de:Dt(c,u,h,b,_,g,x,v,y);break;default:C&1?S(c,u,h,b,_,g,x,v,y):C&6?Nt(c,u,h,b,_,g,x,v,y):(C&64||C&128)&&m.process(c,u,h,b,_,g,x,v,y,dt)}P!=null&&_?xt(P,c&&c.ref,g,u||c,!u):P==null&&c&&c.ref!=null&&xt(c.ref,null,g,c,!0)},z=(c,u,h,b)=>{if(c==null)n(u.el=o(u.children),h,b);else{const _=u.el=c.el;u.children!==c.children&&d(_,u.children)}},U=(c,u,h,b)=>{c==null?n(u.el=f(u.children||""),h,b):u.el=c.el},H=(c,u,h,b)=>{[c.el,c.anchor]=L(c.children,u,h,b,c.el,c.anchor)},B=({el:c,anchor:u},h,b)=>{let _;for(;c&&c!==u;)_=w(c),n(c,h,b),c=_;n(u,h,b)},I=({el:c,anchor:u})=>{let h;for(;c&&c!==u;)h=w(c),r(c),c=h;r(u)},S=(c,u,h,b,_,g,x,v,y)=>{if(u.type==="svg"?x="svg":u.type==="math"&&(x="mathml"),c==null)T(u,h,b,_,g,x,v,y);else{const m=c.el&&c.el._isVueCE?c.el:null;try{m&&m._beginPatch(),Ft(c,u,_,g,x,v,y)}finally{m&&m._endPatch()}}},T=(c,u,h,b,_,g,x,v)=>{let y,m;const{props:P,shapeFlag:C,transition:E,dirs:F}=c;if(y=c.el=l(c.type,g,P&&P.is,P),C&8?a(y,c.children):C&16&&ge(c.children,y,null,b,_,ys(c,g),x,v),F&&Ye(c,null,b,"created"),A(y,c,c.scopeId,x,b),P){for(const q in P)q!=="value"&&!bt(q)&&i(y,q,null,P[q],g,b);"value"in P&&i(y,"value",null,P.value,g),(m=P.onVnodeBeforeMount)&&Te(m,b,c)}F&&Ye(c,null,b,"beforeMount");const j=wl(_,E);j&&E.beforeEnter(y),n(y,u,h),((m=P&&P.onVnodeMounted)||j||F)&&ae(()=>{try{m&&Te(m,b,c),j&&E.enter(y),F&&Ye(c,null,b,"mounted")}finally{}},_)},A=(c,u,h,b,_)=>{if(h&&O(c,h),b)for(let g=0;g<b.length;g++)O(c,b[g]);if(_){let g=_.subTree;if(u===g||Nr(g.type)&&(g.ssContent===u||g.ssFallback===u)){const x=_.vnode;A(c,x,x.scopeId,x.slotScopeIds,_.parent)}}},ge=(c,u,h,b,_,g,x,v,y=0)=>{for(let m=y;m<c.length;m++){const P=c[m]=v?Ne(c[m]):Ae(c[m]);R(null,P,u,h,b,_,g,x,v)}},Ft=(c,u,h,b,_,g,x)=>{const v=u.el=c.el;let{patchFlag:y,dynamicChildren:m,dirs:P}=u;y|=c.patchFlag&16;const C=c.props||Y,E=u.props||Y;let F;if(h&&ze(h,!1),(F=E.onVnodeBeforeUpdate)&&Te(F,h,u,c),P&&Ye(u,c,h,"beforeUpdate"),h&&ze(h,!0),(C.innerHTML&&E.innerHTML==null||C.textContent&&E.textContent==null)&&a(v,""),m?qe(c.dynamicChildren,m,v,h,b,ys(u,_),g):x||J(c,u,v,null,h,b,ys(u,_),g,!1),y>0){if(y&16)ut(v,C,E,h,_);else if(y&2&&C.class!==E.class&&i(v,"class",null,E.class,_),y&4&&i(v,"style",C.style,E.style,_),y&8){const j=u.dynamicProps;for(let q=0;q<j.length;q++){const W=j[q],Z=C[W],ee=E[W];(ee!==Z||W==="value")&&i(v,W,Z,ee,_,h)}}y&1&&c.children!==u.children&&a(v,u.children)}else!x&&m==null&&ut(v,C,E,h,_);((F=E.onVnodeUpdated)||P)&&ae(()=>{F&&Te(F,h,u,c),P&&Ye(u,c,h,"updated")},b)},qe=(c,u,h,b,_,g,x)=>{for(let v=0;v<u.length;v++){const y=c[v],m=u[v],P=y.el&&(y.type===de||!gt(y,m)||y.shapeFlag&198)?p(y.el):h;R(y,m,P,null,b,_,g,x,!0)}},ut=(c,u,h,b,_)=>{if(u!==h){if(u!==Y)for(const g in u)!bt(g)&&!(g in h)&&i(c,g,u[g],null,_,b);for(const g in h){if(bt(g))continue;const x=h[g],v=u[g];x!==v&&g!=="value"&&i(c,g,v,x,_,b)}"value"in h&&i(c,"value",u.value,h.value,_)}},Dt=(c,u,h,b,_,g,x,v,y)=>{const m=u.el=c?c.el:o(""),P=u.anchor=c?c.anchor:o("");let{patchFlag:C,dynamicChildren:E,slotScopeIds:F}=u;F&&(v=v?v.concat(F):F),c==null?(n(m,h,b),n(P,h,b),ge(u.children||[],h,P,_,g,x,v,y)):C>0&&C&64&&E&&c.dynamicChildren&&c.dynamicChildren.length===E.length?(qe(c.dynamicChildren,E,h,_,g,x,v),(u.key!=null||_&&u===_.subTree)&&Rr(c,u,!0)):J(c,u,h,P,_,g,x,v,y)},Nt=(c,u,h,b,_,g,x,v,y)=>{u.slotScopeIds=v,c==null?u.shapeFlag&512?_.ctx.activate(u,h,b,x,y):cs(u,h,b,_,g,x,y):en(c,u,y)},cs=(c,u,h,b,_,g,x)=>{const v=c.component=Fl(c,b,_);if(_r(c)&&(v.ctx.renderer=dt),Nl(v,!1,x),v.asyncDep){if(_&&_.registerDep(v,ie,x),!c.el){const y=v.subTree=je(Be);U(null,y,u,h),c.placeholder=y.el}}else ie(v,c,u,h,_,g,x)},en=(c,u,h)=>{const b=u.component=c.component;if(hl(c,u,h))if(b.asyncDep&&!b.asyncResolved){k(b,u,h);return}else b.next=u,b.update();else u.el=c.el,b.vnode=u},ie=(c,u,h,b,_,g,x)=>{const v=()=>{if(c.isMounted){let{next:C,bu:E,u:F,parent:j,vnode:q}=c;{const we=Fr(c);if(we){C&&(C.el=q.el,k(c,C,x)),we.asyncDep.then(()=>{ae(()=>{c.isUnmounted||m()},_)});return}}let W=C,Z;ze(c,!1),C?(C.el=q.el,k(c,C,x)):C=q,E&&as(E),(Z=C.props&&C.props.onVnodeBeforeUpdate)&&Te(Z,j,C,q),ze(c,!0);const ee=bn(c),Se=c.subTree;c.subTree=ee,R(Se,ee,p(Se.el),jt(Se),c,_,g),C.el=ee.el,W===null&&pl(c,ee.el),F&&ae(F,_),(Z=C.props&&C.props.onVnodeUpdated)&&ae(()=>Te(Z,j,C,q),_)}else{let C;const{el:E,props:F}=u,{bm:j,m:q,parent:W,root:Z,type:ee}=c,Se=St(u);ze(c,!1),j&&as(j),!Se&&(C=F&&F.onVnodeBeforeMount)&&Te(C,W,u),ze(c,!0);{Z.ce&&Z.ce._hasShadowRoot()&&Z.ce._injectChildStyle(ee,c.parent?c.parent.type:void 0);const we=c.subTree=bn(c);R(null,we,h,b,c,_,g),u.el=we.el}if(q&&ae(q,_),!Se&&(C=F&&F.onVnodeMounted)){const we=u;ae(()=>Te(C,W,we),_)}(u.shapeFlag&256||W&&St(W.vnode)&&W.vnode.shapeFlag&256)&&c.a&&ae(c.a,_),c.isMounted=!0,u=h=b=null}};c.scope.on();const y=c.effect=new Gn(v);c.scope.off();const m=c.update=y.run.bind(y),P=c.job=y.runIfDirty.bind(y);P.i=c,P.id=c.uid,y.scheduler=()=>Gs(P),ze(c,!0),m()},k=(c,u,h)=>{u.component=c;const b=c.vnode.props;c.vnode=u,c.next=null,_l(c,u.props,b,h),vl(c,u.children,h),Le(),an(c),$e()},J=(c,u,h,b,_,g,x,v,y=!1)=>{const m=c&&c.children,P=c?c.shapeFlag:0,C=u.children,{patchFlag:E,shapeFlag:F}=u;if(E>0){if(E&128){Ht(m,C,h,b,_,g,x,v,y);return}else if(E&256){Je(m,C,h,b,_,g,x,v,y);return}}F&8?(P&16&&at(m,_,g),C!==m&&a(h,C)):P&16?F&16?Ht(m,C,h,b,_,g,x,v,y):at(m,_,g,!0):(P&8&&a(h,""),F&16&&ge(C,h,b,_,g,x,v,y))},Je=(c,u,h,b,_,g,x,v,y)=>{c=c||nt,u=u||nt;const m=c.length,P=u.length,C=Math.min(m,P);let E;for(E=0;E<C;E++){const F=u[E]=y?Ne(u[E]):Ae(u[E]);R(c[E],F,h,null,_,g,x,v,y)}m>P?at(c,_,g,!0,!1,C):ge(u,h,b,_,g,x,v,y,C)},Ht=(c,u,h,b,_,g,x,v,y)=>{let m=0;const P=u.length;let C=c.length-1,E=P-1;for(;m<=C&&m<=E;){const F=c[m],j=u[m]=y?Ne(u[m]):Ae(u[m]);if(gt(F,j))R(F,j,h,null,_,g,x,v,y);else break;m++}for(;m<=C&&m<=E;){const F=c[C],j=u[E]=y?Ne(u[E]):Ae(u[E]);if(gt(F,j))R(F,j,h,null,_,g,x,v,y);else break;C--,E--}if(m>C){if(m<=E){const F=E+1,j=F<P?u[F].el:b;for(;m<=E;)R(null,u[m]=y?Ne(u[m]):Ae(u[m]),h,j,_,g,x,v,y),m++}}else if(m>E)for(;m<=C;)xe(c[m],_,g,!0),m++;else{const F=m,j=m,q=new Map;for(m=j;m<=E;m++){const he=u[m]=y?Ne(u[m]):Ae(u[m]);he.key!=null&&q.set(he.key,m)}let W,Z=0;const ee=E-j+1;let Se=!1,we=0;const ht=new Array(ee);for(m=0;m<ee;m++)ht[m]=0;for(m=F;m<=C;m++){const he=c[m];if(Z>=ee){xe(he,_,g,!0);continue}let Ce;if(he.key!=null)Ce=q.get(he.key);else for(W=j;W<=E;W++)if(ht[W-j]===0&>(he,u[W])){Ce=W;break}Ce===void 0?xe(he,_,g,!0):(ht[Ce-j]=m+1,Ce>=we?we=Ce:Se=!0,R(he,u[Ce],h,null,_,g,x,v,y),Z++)}const nn=Se?Cl(ht):nt;for(W=nn.length-1,m=ee-1;m>=0;m--){const he=j+m,Ce=u[he],rn=u[he+1],ln=he+1<P?rn.el||Dr(rn):b;ht[m]===0?R(null,Ce,h,ln,_,g,x,v,y):Se&&(W<0||m!==nn[W]?Ge(Ce,h,ln,2):W--)}}},Ge=(c,u,h,b,_=null)=>{const{el:g,type:x,transition:v,children:y,shapeFlag:m}=c;if(m&6){Ge(c.component.subTree,u,h,b);return}if(m&128){c.suspense.move(u,h,b);return}if(m&64){x.move(c,u,h,dt);return}if(x===de){n(g,u,h);for(let C=0;C<y.length;C++)Ge(y[C],u,h,b);n(c.anchor,u,h);return}if(x===vs){B(c,u,h);return}if(b!==2&&m&1&&v)if(b===0)v.persisted&&!g[ms]?n(g,u,h):(v.beforeEnter(g),n(g,u,h),ae(()=>v.enter(g),_));else{const{leave:C,delayLeave:E,afterLeave:F}=v,j=()=>{c.ctx.isUnmounted?r(g):n(g,u,h)},q=()=>{const W=g._isLeaving||!!g[ms];g._isLeaving&&g[ms](!0),v.persisted&&!W?j():C(g,()=>{j(),F&&F()})};E?E(g,j,q):q()}else n(g,u,h)},xe=(c,u,h,b=!1,_=!1)=>{const{type:g,props:x,ref:v,children:y,dynamicChildren:m,shapeFlag:P,patchFlag:C,dirs:E,cacheIndex:F,memo:j}=c;if(C===-2&&(_=!1),v!=null&&(Le(),xt(v,null,h,c,!0),$e()),F!=null&&(u.renderCache[F]=void 0),P&256){u.ctx.deactivate(c);return}const q=P&1&&E,W=!St(c);let Z;if(W&&(Z=x&&x.onVnodeBeforeUnmount)&&Te(Z,u,c),P&6)Vr(c.component,h,b);else{if(P&128){c.suspense.unmount(h,b);return}q&&Ye(c,null,u,"beforeUnmount"),P&64?c.type.remove(c,u,h,dt,b):m&&!m.hasOnce&&(g!==de||C>0&&C&64)?at(m,u,h,!1,!0):(g===de&&C&384||!_&&P&16)&&at(y,u,h),b&&tn(c)}const ee=j!=null&&F==null;(W&&(Z=x&&x.onVnodeUnmounted)||q||ee)&&ae(()=>{Z&&Te(Z,u,c),q&&Ye(c,null,u,"unmounted"),ee&&(c.el=null)},h)},tn=c=>{const{type:u,el:h,anchor:b,transition:_}=c;if(u===de){Wr(h,b);return}if(u===vs){I(c);return}const g=()=>{r(h),_&&!_.persisted&&_.afterLeave&&_.afterLeave()};if(c.shapeFlag&1&&_&&!_.persisted){const{leave:x,delayLeave:v}=_,y=()=>x(h,g);v?v(c.el,g,y):y()}else g()},Wr=(c,u)=>{let h;for(;c!==u;)h=w(c),r(c),c=h;r(u)},Vr=(c,u,h)=>{const{bum:b,scope:_,job:g,subTree:x,um:v,m:y,a:m}=c;xn(y),xn(m),b&&as(b),_.stop(),g&&(g.flags|=8,xe(x,c,u,h)),v&&ae(v,u),ae(()=>{c.isUnmounted=!0},u)},at=(c,u,h,b=!1,_=!1,g=0)=>{for(let x=g;x<c.length;x++)xe(c[x],u,h,b,_)},jt=c=>{if(c.shapeFlag&6)return jt(c.component.subTree);if(c.shapeFlag&128)return c.suspense.next();const u=w(c.anchor||c.el),h=u&&u[Ki];return h?w(h):u};let fs=!1;const sn=(c,u,h)=>{let b;c==null?u._vnode&&(xe(u._vnode,null,null,!0),b=u._vnode.component):R(u._vnode||null,c,u,null,null,null,h),u._vnode=c,fs||(fs=!0,an(b),ur(),fs=!1)},dt={p:R,um:xe,m:Ge,r:tn,mt:cs,mc:ge,pc:J,pbc:qe,n:jt,o:e};return{render:sn,hydrate:void 0,createApp:ol(sn)}}function ys({type:e,props:t},s){return s==="svg"&&e==="foreignObject"||s==="mathml"&&e==="annotation-xml"&&t&&t.encoding&&t.encoding.includes("html")?void 0:s}function ze({effect:e,job:t},s){s?(e.flags|=32,t.flags|=4):(e.flags&=-33,t.flags&=-5)}function wl(e,t){return(!e||e&&!e.pendingBranch)&&t&&!t.persisted}function Rr(e,t,s=!1){const n=e.children,r=t.children;if(D(n)&&D(r))for(let i=0;i<n.length;i++){const l=n[i];let o=r[i];o.shapeFlag&1&&!o.dynamicChildren&&((o.patchFlag<=0||o.patchFlag===32)&&(o=r[i]=Ne(r[i]),o.el=l.el),!s&&o.patchFlag!==-2&&Rr(l,o)),o.type===os&&(o.patchFlag===-1&&(o=r[i]=Ne(o)),o.el=l.el),o.type===Be&&!o.el&&(o.el=l.el)}}function Cl(e){const t=e.slice(),s=[0];let n,r,i,l,o;const f=e.length;for(n=0;n<f;n++){const d=e[n];if(d!==0){if(r=s[s.length-1],e[r]<d){t[n]=r,s.push(n);continue}for(i=0,l=s.length-1;i<l;)o=i+l>>1,e[s[o]]<d?i=o+1:l=o;d<e[s[i]]&&(i>0&&(t[n]=s[i-1]),s[i]=n)}}for(i=s.length,l=s[i-1];i-- >0;)s[i]=l,l=t[l];return s}function Fr(e){const t=e.subTree.component;if(t)return t.asyncDep&&!t.asyncResolved?t:Fr(t)}function xn(e){if(e)for(let t=0;t<e.length;t++)e[t].flags|=8}function Dr(e){if(e.placeholder)return e.placeholder;const t=e.component;return t?Dr(t.subTree):null}const Nr=e=>e.__isSuspense;function Tl(e,t){t&&t.pendingBranch?D(e)?t.effects.push(...e):t.effects.push(e):Di(e)}const de=Symbol.for("v-fgt"),os=Symbol.for("v-txt"),Be=Symbol.for("v-cmt"),vs=Symbol.for("v-stc"),Ct=[];let pe=null;function oe(e=!1){Ct.push(pe=e?null:[])}function Ol(){Ct.pop(),pe=Ct[Ct.length-1]||null}let At=1;function Sn(e,t=!1){At+=e,e<0&&pe&&t&&(pe.hasOnce=!0)}function Hr(e){return e.dynamicChildren=At>0?pe||nt:null,Ol(),At>0&&pe&&pe.push(e),e}function ue(e,t,s,n,r,i){return Hr(M(e,t,s,n,r,i,!0))}function El(e,t,s,n,r){return Hr(je(e,t,s,n,r,!0))}function jr(e){return e?e.__v_isVNode===!0:!1}function gt(e,t){return e.type===t.type&&e.key===t.key}const Lr=({key:e})=>e??null,qt=({ref:e,ref_key:t,ref_for:s})=>(typeof e=="number"&&(e=""+e),e!=null?X(e)||ne(e)||N(e)?{i:Me,r:e,k:t,f:!!s}:e:null);function M(e,t=null,s=null,n=0,r=null,i=e===de?0:1,l=!1,o=!1){const f={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&Lr(t),ref:t&&qt(t),scopeId:dr,slotScopeIds:null,children:s,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetStart:null,targetAnchor:null,staticCount:0,shapeFlag:i,patchFlag:n,dynamicProps:r,dynamicChildren:null,appContext:null,ctx:Me};return o?(Zs(f,s),i&128&&e.normalize(f)):s&&(f.shapeFlag|=X(s)?8:16),At>0&&!l&&pe&&(f.patchFlag>0||i&6)&&f.patchFlag!==32&&pe.push(f),f}const je=Al;function Al(e,t=null,s=null,n=0,r=null,i=!1){if((!e||e===Qi)&&(e=Be),jr(e)){const o=ft(e,t,!0);return s&&Zs(o,s),At>0&&!i&&pe&&(o.shapeFlag&6?pe[pe.indexOf(e)]=o:pe.push(o)),o.patchFlag=-2,o}if($l(e)&&(e=e.__vccOpts),t){t=Pl(t);let{class:o,style:f}=t;o&&!X(o)&&(t.class=Xe(o)),V(f)&&(Js(f)&&!D(f)&&(f=re({},f)),t.style=Ls(f))}const l=X(e)?1:Nr(e)?128:Ui(e)?64:V(e)?4:N(e)?2:0;return M(e,t,s,n,r,l,i,!0)}function Pl(e){return e?Js(e)||Or(e)?re({},e):e:null}function ft(e,t,s=!1,n=!1){const{props:r,ref:i,patchFlag:l,children:o,transition:f}=e,d=t?Ml(r||{},t):r,a={__v_isVNode:!0,__v_skip:!0,type:e.type,props:d,key:d&&Lr(d),ref:t&&t.ref?s&&i?D(i)?i.concat(qt(t)):[i,qt(t)]:qt(t):i,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:o,target:e.target,targetStart:e.targetStart,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:t&&e.type!==de?l===-1?16:l|16:l,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:f,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&ft(e.ssContent),ssFallback:e.ssFallback&&ft(e.ssFallback),placeholder:e.placeholder,el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce};return f&&n&&Ys(a,f.clone(a)),a}function Rs(e=" ",t=0){return je(os,null,e,t)}function Vt(e="",t=!1){return t?(oe(),El(Be,null,e)):je(Be,null,e)}function Ae(e){return e==null||typeof e=="boolean"?je(Be):D(e)?je(de,null,e.slice()):jr(e)?Ne(e):je(os,null,String(e))}function Ne(e){return e.el===null&&e.patchFlag!==-1||e.memo?e:ft(e)}function Zs(e,t){let s=0;const{shapeFlag:n}=e;if(t==null)t=null;else if(D(t))s=16;else if(typeof t=="object")if(n&65){const r=t.default;r&&(r._c&&(r._d=!1),Zs(e,r()),r._c&&(r._d=!0));return}else{s=32;const r=t._;!r&&!Or(t)?t._ctx=Me:r===3&&Me&&(Me.slots._===1?t._=1:(t._=2,e.patchFlag|=1024))}else N(t)?(t={default:t,_ctx:Me},s=32):(t=String(t),n&64?(s=16,t=[Rs(t)]):s=8);e.children=t,e.shapeFlag|=s}function Ml(...e){const t={};for(let s=0;s<e.length;s++){const n=e[s];for(const r in n)if(r==="class")t.class!==n.class&&(t.class=Xe([t.class,n.class]));else if(r==="style")t.style=Ls([t.style,n.style]);else if(Qt(r)){const i=t[r],l=n[r];l&&i!==l&&!(D(i)&&i.includes(l))?t[r]=i?[].concat(i,l):l:l==null&&i==null&&!es(r)&&(t[r]=l)}else r!==""&&(t[r]=n[r])}return t}function Te(e,t,s,n=null){ve(e,t,7,[s,n])}const Il=xr();let Rl=0;function Fl(e,t,s){const n=e.type,r=(t?t.appContext:e.appContext)||Il,i={uid:Rl++,vnode:e,type:n,parent:t,appContext:r,root:null,next:null,subTree:null,effect:null,update:null,job:null,scope:new si(!0),render:null,proxy:null,exposed:null,exposeProxy:null,withProxy:null,provides:t?t.provides:Object.create(r.provides),ids:t?t.ids:["",0,0],accessCache:null,renderCache:[],components:null,directives:null,propsOptions:Ar(n,r),emitsOptions:Sr(n,r),emit:null,emitted:null,propsDefaults:Y,inheritAttrs:n.inheritAttrs,ctx:Y,data:Y,props:Y,attrs:Y,slots:Y,refs:Y,setupState:Y,setupContext:null,suspense:s,suspenseId:s?s.pendingId:0,asyncDep:null,asyncResolved:!1,isMounted:!1,isUnmounted:!1,isDeactivated:!1,bc:null,c:null,bm:null,m:null,bu:null,u:null,um:null,bum:null,da:null,a:null,rtg:null,rtc:null,ec:null,sp:null};return i.ctx={_:i},i.root=t?t.root:i,i.emit=fl.bind(null,i),e.ce&&e.ce(i),i}let fe=null;const Dl=()=>fe||Me;let Zt,Fs;{const e=ss(),t=(s,n)=>{let r;return(r=e[s])||(r=e[s]=[]),r.push(n),i=>{r.length>1?r.forEach(l=>l(i)):r[0](i)}};Zt=t("__VUE_INSTANCE_SETTERS__",s=>fe=s),Fs=t("__VUE_SSR_SETTERS__",s=>Pt=s)}const Rt=e=>{const t=fe;return Zt(e),e.scope.on(),()=>{e.scope.off(),Zt(t)}},wn=()=>{fe&&fe.scope.off(),Zt(null)};function $r(e){return e.vnode.shapeFlag&4}let Pt=!1;function Nl(e,t=!1,s=!1){t&&Fs(t);const{props:n,children:r}=e.vnode,i=$r(e);gl(e,n,i,t),yl(e,r,s||t);const l=i?Hl(e,t):void 0;return t&&Fs(!1),l}function Hl(e,t){const s=e.type;e.accessCache=Object.create(null),e.proxy=new Proxy(e.ctx,el);const{setup:n}=s;if(n){Le();const r=e.setupContext=n.length>1?Ll(e):null,i=Rt(e),l=It(n,e,0,[e.props,r]),o=$n(l);if($e(),i(),(o||e.sp)&&!St(e)&&gr(e),o){if(l.then(wn,wn),t)return l.then(f=>{Cn(e,f)}).catch(f=>{rs(f,e,0)});e.asyncDep=l}else Cn(e,l)}else Kr(e)}function Cn(e,t,s){N(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:V(t)&&(e.setupState=or(t)),Kr(e)}function Kr(e,t,s){const n=e.type;e.render||(e.render=n.render||Ie);{const r=Rt(e);Le();try{tl(e)}finally{$e(),r()}}}const jl={get(e,t){return se(e,"get",""),e[t]}};function Ll(e){const t=s=>{e.exposed=s||{}};return{attrs:new Proxy(e.attrs,jl),slots:e.slots,emit:e.emit,expose:t}}function Qs(e){return e.exposed?e.exposeProxy||(e.exposeProxy=new Proxy(or(Si(e.exposed)),{get(t,s){if(s in t)return t[s];if(s in wt)return wt[s](e)},has(t,s){return s in t||s in wt}})):e.proxy}function $l(e){return N(e)&&"__vccOpts"in e}const Jt=(e,t)=>Ai(e,t,Pt),Kl="3.5.35";/**
|
|
20
|
+
* @vue/runtime-dom v3.5.35
|
|
21
|
+
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
22
|
+
* @license MIT
|
|
23
|
+
**/let Ds;const Tn=typeof window<"u"&&window.trustedTypes;if(Tn)try{Ds=Tn.createPolicy("vue",{createHTML:e=>e})}catch{}const Ur=Ds?e=>Ds.createHTML(e):e=>e,Ul="http://www.w3.org/2000/svg",Wl="http://www.w3.org/1998/Math/MathML",De=typeof document<"u"?document:null,On=De&&De.createElement("template"),Vl={insert:(e,t,s)=>{t.insertBefore(e,s||null)},remove:e=>{const t=e.parentNode;t&&t.removeChild(e)},createElement:(e,t,s,n)=>{const r=t==="svg"?De.createElementNS(Ul,e):t==="mathml"?De.createElementNS(Wl,e):s?De.createElement(e,{is:s}):De.createElement(e);return e==="select"&&n&&n.multiple!=null&&r.setAttribute("multiple",n.multiple),r},createText:e=>De.createTextNode(e),createComment:e=>De.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>De.querySelector(e),setScopeId(e,t){e.setAttribute(t,"")},insertStaticContent(e,t,s,n,r,i){const l=s?s.previousSibling:t.lastChild;if(r&&(r===i||r.nextSibling))for(;t.insertBefore(r.cloneNode(!0),s),!(r===i||!(r=r.nextSibling)););else{On.innerHTML=Ur(n==="svg"?`<svg>${e}</svg>`:n==="mathml"?`<math>${e}</math>`:e);const o=On.content;if(n==="svg"||n==="mathml"){const f=o.firstChild;for(;f.firstChild;)o.appendChild(f.firstChild);o.removeChild(f)}t.insertBefore(o,s)}return[l?l.nextSibling:t.firstChild,s?s.previousSibling:t.lastChild]}},Bl=Symbol("_vtc");function ql(e,t,s){const n=e[Bl];n&&(t=(t?[t,...n]:[...n]).join(" ")),t==null?e.removeAttribute("class"):s?e.setAttribute("class",t):e.className=t}const En=Symbol("_vod"),Jl=Symbol("_vsh"),Gl=Symbol(""),Yl=/(?:^|;)\s*display\s*:/;function zl(e,t,s){const n=e.style,r=X(s);let i=!1;if(s&&!r){if(t)if(X(t))for(const l of t.split(";")){const o=l.slice(0,l.indexOf(":")).trim();s[o]==null&&mt(n,o,"")}else for(const l in t)s[l]==null&&mt(n,l,"");for(const l in s){l==="display"&&(i=!0);const o=s[l];o!=null?Xl(e,l,!X(t)&&t?t[l]:void 0,o)||mt(n,l,o):mt(n,l,"")}}else if(r){if(t!==s){const l=n[Gl];l&&(s+=";"+l),n.cssText=s,i=Yl.test(s)}}else t&&e.removeAttribute("style");En in e&&(e[En]=i?n.display:"",e[Jl]&&(n.display="none"))}const An=/\s*!important$/;function mt(e,t,s){if(D(s))s.forEach(n=>mt(e,t,n));else if(s==null&&(s=""),t.startsWith("--"))e.setProperty(t,s);else{const n=kl(e,t);An.test(s)?e.setProperty(et(n),s.replace(An,""),"important"):e[n]=s}}const Pn=["Webkit","Moz","ms"],xs={};function kl(e,t){const s=xs[t];if(s)return s;let n=me(t);if(n!=="filter"&&n in e)return xs[t]=n;n=Wn(n);for(let r=0;r<Pn.length;r++){const i=Pn[r]+n;if(i in e)return xs[t]=i}return t}function Xl(e,t,s,n){return e.tagName==="TEXTAREA"&&(t==="width"||t==="height")&&X(n)&&s===n}const Mn="http://www.w3.org/1999/xlink";function In(e,t,s,n,r,i=ei(t)){n&&t.startsWith("xlink:")?s==null?e.removeAttributeNS(Mn,t.slice(6,t.length)):e.setAttributeNS(Mn,t,s):s==null||i&&!Bn(s)?e.removeAttribute(t):e.setAttribute(t,i?"":Re(s)?String(s):s)}function Rn(e,t,s,n,r){if(t==="innerHTML"||t==="textContent"){s!=null&&(e[t]=t==="innerHTML"?Ur(s):s);return}const i=e.tagName;if(t==="value"&&i!=="PROGRESS"&&!i.includes("-")){const o=i==="OPTION"?e.getAttribute("value")||"":e.value,f=s==null?e.type==="checkbox"?"on":"":String(s);(o!==f||!("_value"in e))&&(e.value=f),s==null&&e.removeAttribute(t),e._value=s;return}let l=!1;if(s===""||s==null){const o=typeof e[t];o==="boolean"?s=Bn(s):s==null&&o==="string"?(s="",l=!0):o==="number"&&(s=0,l=!0)}try{e[t]=s}catch{}l&&e.removeAttribute(r||t)}function Zl(e,t,s,n){e.addEventListener(t,s,n)}function Ql(e,t,s,n){e.removeEventListener(t,s,n)}const Fn=Symbol("_vei");function eo(e,t,s,n,r=null){const i=e[Fn]||(e[Fn]={}),l=i[t];if(n&&l)l.value=n;else{const[o,f]=to(t);if(n){const d=i[t]=ro(n,r);Zl(e,o,d,f)}else l&&(Ql(e,o,l,f),i[t]=void 0)}}const Dn=/(?:Once|Passive|Capture)$/;function to(e){let t;if(Dn.test(e)){t={};let n;for(;n=e.match(Dn);)e=e.slice(0,e.length-n[0].length),t[n[0].toLowerCase()]=!0}return[e[2]===":"?e.slice(3):et(e.slice(2)),t]}let Ss=0;const so=Promise.resolve(),no=()=>Ss||(so.then(()=>Ss=0),Ss=Date.now());function ro(e,t){const s=n=>{if(!n._vts)n._vts=Date.now();else if(n._vts<=s.attached)return;const r=s.value;if(D(r)){const i=n.stopImmediatePropagation;n.stopImmediatePropagation=()=>{i.call(n),n._stopped=!0};const l=r.slice(),o=[n];for(let f=0;f<l.length&&!n._stopped;f++){const d=l[f];d&&ve(d,t,5,o)}}else ve(r,t,5,[n])};return s.value=e,s.attached=no(),s}const Nn=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)>96&&e.charCodeAt(2)<123,io=(e,t,s,n,r,i)=>{const l=r==="svg";t==="class"?ql(e,n,l):t==="style"?zl(e,s,n):Qt(t)?es(t)||eo(e,t,s,n,i):(t[0]==="."?(t=t.slice(1),!0):t[0]==="^"?(t=t.slice(1),!1):lo(e,t,n,l))?(Rn(e,t,n),!e.tagName.includes("-")&&(t==="value"||t==="checked"||t==="selected")&&In(e,t,n,l,i,t!=="value")):e._isVueCE&&(oo(e,t)||e._def.__asyncLoader&&(/[A-Z]/.test(t)||!X(n)))?Rn(e,me(t),n,i,t):(t==="true-value"?e._trueValue=n:t==="false-value"&&(e._falseValue=n),In(e,t,n,l))};function lo(e,t,s,n){if(n)return!!(t==="innerHTML"||t==="textContent"||t in e&&Nn(t)&&N(s));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"){const r=e.tagName;if(r==="IMG"||r==="VIDEO"||r==="CANVAS"||r==="SOURCE")return!1}return Nn(t)&&X(s)?!1:t in e}function oo(e,t){const s=e._def.props;if(!s)return!1;const n=me(t);return Array.isArray(s)?s.some(r=>me(r)===n):Object.keys(s).some(r=>me(r)===n)}const co=re({patchProp:io},Vl);let Hn;function fo(){return Hn||(Hn=xl(co))}const uo=((...e)=>{const t=fo().createApp(...e),{mount:s}=t;return t.mount=n=>{const r=ho(n);if(!r)return;const i=t._component;!N(i)&&!i.render&&!i.template&&(i.template=r.innerHTML),r.nodeType===1&&(r.textContent="");const l=s(r,!1,ao(r));return r instanceof Element&&(r.removeAttribute("v-cloak"),r.setAttribute("data-v-app","")),l},t});function ao(e){if(e instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&e instanceof MathMLElement)return"mathml"}function ho(e){return X(e)?document.querySelector(e):e}const po={class:"wrap"},go={class:"chips"},_o=["onClick"],mo={class:"n"},bo={key:0},yo={class:"t"},vo={class:"ev"},xo={class:"args"},So={key:0},wo={key:1},Co=["onClick"],To={class:"t"},Oo={class:"name"},Eo={class:"args"},Ao={class:"dur"},Po={key:0,class:"detail"},Mo={colspan:"5"},Io={key:0},Ro={class:"summary"},Fo={class:"name"},Do={key:0,class:"muted",style:{"font-size":".72rem"}},No=500,Ho={__name:"Inspector",setup(e){const t=typeof globalThis<"u"&&globalThis.__HULL_BRIDGE__||"",s=it([]),n=it([]),r=new Map,i=Kt("all"),l=Kt(!1),o=Kt(null),f=Kt(t?"connecting":"none"),d=()=>new Date().toLocaleTimeString();function a(S){for(;S.length>No;)S.pop()}function p(S){if(!(l.value||!S))if(S.type==="call"){const T=it({id:S.id,name:S.name,args:S.args,status:"pending",durMs:null,result:null,time:d()});r.set(S.id,T),s.unshift(T),a(s)}else if(S.type==="reply"){const T=r.get(S.id);T&&(T.status=S.ok?"ok":"error",T.durMs=S.durMs,T.result=S.result)}else S.type==="event"&&(n.unshift({event:S.event,payload:S.payload,time:d()}),a(n))}let w=null;br(()=>{t&&(w=new EventSource(`${t}/bridge/events`),w.onopen=()=>{f.value="live"},w.onerror=()=>{f.value="reconnecting"},w.onmessage=S=>{let T;try{T=JSON.parse(S.data)}catch{return}T&&T.event==="__trace"&&p(T.payload)})}),zs(()=>w&&w.close());const O={db:S=>S.startsWith("db"),files:S=>S.startsWith("file"),http:S=>S.startsWith("http")},L=Jt(()=>({all:s.length,db:s.filter(S=>O.db(S.name)).length,files:s.filter(S=>O.files(S.name)).length,http:s.filter(S=>O.http(S.name)).length,errors:s.filter(S=>S.status==="error").length,events:n.length})),R=Jt(()=>{if(i.value==="events")return[];if(i.value==="all")return s;if(i.value==="errors")return s.filter(T=>T.status==="error");const S=O[i.value];return S?s.filter(T=>S(T.name)):s}),z=Jt(()=>{const S={};for(const T of s){if(T.durMs==null)continue;S[T.name]??={n:0,sum:0,max:0};const A=S[T.name];A.n++,A.sum+=T.durMs,A.max=Math.max(A.max,T.durMs)}return Object.entries(S).map(([T,A])=>({name:T,n:A.n,avg:A.sum/A.n,max:A.max})).sort((T,A)=>A.max-T.max).slice(0,8)}),U=S=>S==null?"":S<1?"<1ms":`${Math.round(S)}ms`,H=S=>{const T=JSON.stringify(S);return T&&T.length>80?T.slice(0,80)+"…":T};function B(S){o.value=o.value===S?null:S}function I(){s.length=0,n.length=0,r.clear(),o.value=null}return(S,T)=>(oe(),ue("div",po,[M("header",null,[T[1]||(T[1]=M("h1",null,[Rs("⛵ Hull "),M("span",{class:"b"},"Inspector")],-1)),M("span",{class:Xe(["badge",{live:f.value!=="none"}])},Q(f.value),3),T[2]||(T[2]=M("span",{class:"spacer"},null,-1)),M("button",{class:Xe({on:l.value}),onClick:T[0]||(T[0]=A=>l.value=!l.value)},Q(l.value?"paused":"live"),3),M("button",{onClick:I},"clear")]),M("div",go,[(oe(),ue(de,null,Wt(["all","db","files","http","errors","events"],A=>M("span",{key:A,class:Xe(["chip",{active:i.value===A}]),onClick:ge=>i.value=A},[Rs(Q(A),1),M("span",mo,Q(L.value[A]),1)],10,_o)),64))]),M("main",null,[i.value==="events"?(oe(),ue("table",bo,[T[4]||(T[4]=M("thead",null,[M("tr",null,[M("th",{class:"t"},"time"),M("th",null,"event"),M("th",null,"payload")])],-1)),M("tbody",null,[(oe(!0),ue(de,null,Wt(n,(A,ge)=>(oe(),ue("tr",{key:ge,class:"row"},[M("td",yo,Q(A.time),1),M("td",vo,Q(A.event),1),M("td",xo,Q(H(A.payload)),1)]))),128)),n.length?Vt("",!0):(oe(),ue("tr",So,[...T[3]||(T[3]=[M("td",{colspan:"3",class:"empty"},"No C++ → UI events yet.",-1)])]))])])):(oe(),ue("table",wo,[T[8]||(T[8]=M("thead",null,[M("tr",null,[M("th",{class:"t"},"time"),M("th",null,"binding"),M("th",null,"args"),M("th",{class:"dur"},"dur"),M("th",null,"status")])],-1)),M("tbody",null,[(oe(!0),ue(de,null,Wt(R.value,A=>(oe(),ue(de,{key:A.id},[M("tr",{class:"row",onClick:ge=>B(A)},[M("td",To,Q(A.time),1),M("td",Oo,Q(A.name),1),M("td",Eo,Q(H(A.args)),1),M("td",Ao,Q(U(A.durMs)),1),M("td",{class:Xe(["st",A.status])},Q(A.status),3)],8,Co),o.value===A?(oe(),ue("tr",Po,[M("td",Mo,[T[5]||(T[5]=M("div",{class:"muted"},"args",-1)),M("pre",null,Q(JSON.stringify(A.args,null,2)),1),T[6]||(T[6]=M("div",{class:"muted"},"result",-1)),M("pre",null,Q(A.result==null?"(pending)":JSON.stringify(A.result,null,2)),1)])])):Vt("",!0)],64))),128)),R.value.length?Vt("",!0):(oe(),ue("tr",Io,[...T[7]||(T[7]=[M("td",{colspan:"5",class:"empty"},"No calls yet — interact with the app.",-1)])]))])]))]),M("div",Ro,[T[9]||(T[9]=M("h2",null,"slowest bindings",-1)),(oe(!0),ue(de,null,Wt(z.value,A=>(oe(),ue("div",{key:A.name,class:"srow"},[M("span",Fo,Q(A.name),1),M("span",null,"×"+Q(A.n),1),M("span",null,"avg "+Q(U(A.avg)),1),M("span",null,"max "+Q(U(A.max)),1)]))),128)),z.value.length?Vt("",!0):(oe(),ue("div",Do,"No timings yet."))])]))}};uo(Ho).mount("#app");</script>
|
|
24
|
+
<style rel="stylesheet" crossorigin>:root{--bg: #0b1220;--panel: #111a2e;--row: #0f1830;--border: #243049;--text: #e2e8f0;--muted: #93a4c0;--brand: #60a5fa;--ok: #34d399;--err: #f87171;--warn: #fbbf24;--pending: #94a3b8;color-scheme:dark}*{box-sizing:border-box}html,body,#app{margin:0;height:100%}body{font-family:ui-monospace,SF Mono,Consolas,monospace;background:var(--bg);color:var(--text);font-size:13px}.wrap{display:flex;flex-direction:column;height:100vh}header{display:flex;align-items:center;gap:.6rem;padding:.5rem .8rem;border-bottom:1px solid var(--border);background:var(--panel)}header h1{font-size:.95rem;margin:0;font-weight:700}header h1 .b{color:var(--brand)}.badge{font-size:.68rem;padding:.15rem .5rem;border-radius:999px;background:#1e293b;color:var(--muted)}.badge.live{color:var(--ok)}.spacer{flex:1}button{background:#1e293b;color:var(--text);border:1px solid var(--border);border-radius:.4rem;padding:.25rem .6rem;font:inherit;font-size:.72rem;cursor:pointer}button:hover{background:#243049}button.on{background:var(--brand);color:#04122b;border-color:var(--brand)}.chips{display:flex;gap:.35rem;padding:.45rem .8rem;border-bottom:1px solid var(--border);flex-wrap:wrap}.chip{font-size:.72rem;padding:.2rem .6rem;border-radius:999px;border:1px solid var(--border);background:var(--row);color:var(--muted);cursor:pointer}.chip.active{background:var(--brand);color:#04122b;border-color:var(--brand);font-weight:700}.chip .n{opacity:.7;margin-left:.3rem}main{flex:1;overflow:auto}table{width:100%;border-collapse:collapse}th{text-align:left;color:var(--muted);font-weight:600;font-size:.68rem;text-transform:uppercase;letter-spacing:.04em;padding:.35rem .8rem;position:sticky;top:0;background:var(--bg);border-bottom:1px solid var(--border)}td{padding:.3rem .8rem;border-bottom:1px solid #16203a;vertical-align:top}tr.row:hover{background:var(--row);cursor:pointer}.name{color:var(--brand)}.t{color:var(--muted);white-space:nowrap}.dur{text-align:right;white-space:nowrap;color:var(--muted)}.st{font-weight:700}.st.ok{color:var(--ok)}.st.error{color:var(--err)}.st.pending{color:var(--pending)}.ev{color:var(--warn)}pre{margin:.3rem 0 .5rem;padding:.5rem .7rem;background:#060c18;border:1px solid var(--border);border-radius:.4rem;white-space:pre-wrap;word-break:break-word;max-height:16rem;overflow:auto;color:#cbd5e1}.detail td{background:#0a1226}.summary{border-top:1px solid var(--border);background:var(--panel);padding:.4rem .8rem;max-height:9rem;overflow:auto}.summary h2{font-size:.68rem;text-transform:uppercase;color:var(--muted);margin:.1rem 0 .35rem}.srow{display:flex;gap:1rem;font-size:.72rem;padding:.12rem 0}.srow .name{width:12rem}.empty{color:var(--muted);padding:1.5rem .8rem}.args{color:#cbd5e1}</style>
|
|
25
|
+
</head>
|
|
26
|
+
<body>
|
|
27
|
+
<div id="app"></div>
|
|
28
|
+
</body>
|
|
29
|
+
</html>
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
cmake_minimum_required(VERSION 3.16)
|
|
2
|
+
project(hull_host LANGUAGES C CXX) # C needed for the vendored SQLite amalgamation
|
|
3
|
+
|
|
4
|
+
set(CMAKE_CXX_STANDARD 17)
|
|
5
|
+
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
|
6
|
+
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/bin")
|
|
7
|
+
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/lib")
|
|
8
|
+
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/lib")
|
|
9
|
+
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
|
|
10
|
+
set(WEBVIEW_WEBKITGTK_API 6.0) # use WebKitGTK 6 on Linux
|
|
11
|
+
|
|
12
|
+
if (MSVC)
|
|
13
|
+
add_compile_options(/utf-8 /EHsc)
|
|
14
|
+
endif()
|
|
15
|
+
|
|
16
|
+
include(FetchContent)
|
|
17
|
+
|
|
18
|
+
FetchContent_Declare(webview
|
|
19
|
+
GIT_REPOSITORY https://github.com/webview/webview
|
|
20
|
+
GIT_TAG 0.12.0
|
|
21
|
+
GIT_SHALLOW TRUE)
|
|
22
|
+
FetchContent_MakeAvailable(webview)
|
|
23
|
+
|
|
24
|
+
FetchContent_Declare(json
|
|
25
|
+
GIT_REPOSITORY https://github.com/nlohmann/json
|
|
26
|
+
GIT_TAG v3.12.0
|
|
27
|
+
GIT_SHALLOW TRUE)
|
|
28
|
+
FetchContent_MakeAvailable(json)
|
|
29
|
+
|
|
30
|
+
FetchContent_Declare(httplib
|
|
31
|
+
GIT_REPOSITORY https://github.com/yhirose/cpp-httplib
|
|
32
|
+
GIT_TAG v0.18.3
|
|
33
|
+
GIT_SHALLOW TRUE)
|
|
34
|
+
set(HTTPLIB_REQUIRE_OPENSSL ON CACHE BOOL "" FORCE)
|
|
35
|
+
FetchContent_MakeAvailable(httplib)
|
|
36
|
+
|
|
37
|
+
find_package(OpenSSL REQUIRED)
|
|
38
|
+
find_package(Threads REQUIRED) # SQLite (THREADSAFE) needs pthread on POSIX
|
|
39
|
+
|
|
40
|
+
# --- Security build option ---
|
|
41
|
+
# OFF (default): NullCipher (fast, plaintext at rest) + vendored vanilla SQLite.
|
|
42
|
+
# ON: AES-256-GCM for files/settings + SQLCipher for the DB; the binary is
|
|
43
|
+
# named hull-host-secure. Requires SQLCipher (Linux: libsqlcipher-dev;
|
|
44
|
+
# Windows: vcpkg install sqlcipher; macOS: brew install sqlcipher).
|
|
45
|
+
option(HULL_CRYPTO "Encrypt the database (SQLCipher) and files/settings (AES) at rest" OFF)
|
|
46
|
+
|
|
47
|
+
set(SQLITE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/third_party/sqlite")
|
|
48
|
+
|
|
49
|
+
# WIN32 => use WinMain on Windows (no console window). The host loads its UI at
|
|
50
|
+
# runtime (--url / --app), so there is no embedded index_html.h.
|
|
51
|
+
add_executable(hull-host WIN32)
|
|
52
|
+
target_sources(hull-host PRIVATE src/main.cpp)
|
|
53
|
+
target_include_directories(hull-host PRIVATE src)
|
|
54
|
+
|
|
55
|
+
target_link_libraries(hull-host PRIVATE
|
|
56
|
+
webview::core
|
|
57
|
+
nlohmann_json::nlohmann_json
|
|
58
|
+
httplib::httplib
|
|
59
|
+
OpenSSL::SSL
|
|
60
|
+
OpenSSL::Crypto
|
|
61
|
+
Threads::Threads
|
|
62
|
+
${CMAKE_DL_LIBS})
|
|
63
|
+
|
|
64
|
+
# --- SQLite backend: vendored vanilla (default) or SQLCipher (secure build) ---
|
|
65
|
+
if (HULL_CRYPTO)
|
|
66
|
+
set_target_properties(hull-host PROPERTIES OUTPUT_NAME "hull-host-secure")
|
|
67
|
+
target_compile_definitions(hull-host PRIVATE HULL_CRYPTO)
|
|
68
|
+
if (WIN32)
|
|
69
|
+
find_package(unofficial-sqlcipher CONFIG REQUIRED) # vcpkg: sqlcipher
|
|
70
|
+
target_link_libraries(hull-host PRIVATE unofficial::sqlcipher::sqlcipher)
|
|
71
|
+
else()
|
|
72
|
+
find_package(PkgConfig REQUIRED)
|
|
73
|
+
pkg_check_modules(SQLCIPHER REQUIRED sqlcipher) # apt: libsqlcipher-dev / brew: sqlcipher
|
|
74
|
+
target_include_directories(hull-host PRIVATE ${SQLCIPHER_INCLUDE_DIRS})
|
|
75
|
+
target_link_libraries(hull-host PRIVATE ${SQLCIPHER_LIBRARIES})
|
|
76
|
+
endif()
|
|
77
|
+
else()
|
|
78
|
+
# Vendored vanilla SQLite amalgamation (no system dependency). Hardened build:
|
|
79
|
+
# no extension loading, strict string literals, foreign keys on, FTS5, thread-safe.
|
|
80
|
+
target_sources(hull-host PRIVATE "${SQLITE_DIR}/sqlite3.c")
|
|
81
|
+
target_include_directories(hull-host PRIVATE "${SQLITE_DIR}")
|
|
82
|
+
set_source_files_properties("${SQLITE_DIR}/sqlite3.c" PROPERTIES COMPILE_DEFINITIONS
|
|
83
|
+
"SQLITE_THREADSAFE=1;SQLITE_DQS=0;SQLITE_OMIT_LOAD_EXTENSION=1;SQLITE_DEFAULT_FOREIGN_KEYS=1;SQLITE_ENABLE_FTS5=1;SQLITE_DEFAULT_MEMSTATUS=0;SQLITE_OMIT_DEPRECATED=1")
|
|
84
|
+
endif()
|
|
85
|
+
|
|
86
|
+
# --- Platform: keychain + printing + sockets + (Gdiplus for the window icon) ---
|
|
87
|
+
if (WIN32)
|
|
88
|
+
target_link_libraries(hull-host PRIVATE Advapi32 Winspool Crypt32 ws2_32 Gdiplus Gdi32 User32)
|
|
89
|
+
elseif (APPLE)
|
|
90
|
+
find_library(SECURITY_FRAMEWORK Security)
|
|
91
|
+
find_library(CF_FRAMEWORK CoreFoundation)
|
|
92
|
+
find_library(CUPS_LIB cups)
|
|
93
|
+
target_link_libraries(hull-host PRIVATE ${SECURITY_FRAMEWORK} ${CF_FRAMEWORK} ${CUPS_LIB})
|
|
94
|
+
else() # Linux
|
|
95
|
+
find_package(PkgConfig REQUIRED)
|
|
96
|
+
pkg_check_modules(SECRET REQUIRED libsecret-1)
|
|
97
|
+
pkg_check_modules(CUPS REQUIRED cups)
|
|
98
|
+
pkg_check_modules(GLIB REQUIRED glib-2.0) # g_set_prgname: window app-id -> desktop icon
|
|
99
|
+
target_include_directories(hull-host PRIVATE ${SECRET_INCLUDE_DIRS} ${CUPS_INCLUDE_DIRS} ${GLIB_INCLUDE_DIRS})
|
|
100
|
+
target_link_libraries(hull-host PRIVATE ${SECRET_LIBRARIES} ${CUPS_LIBRARIES} ${GLIB_LIBRARIES})
|
|
101
|
+
endif()
|
package/host/README.md
ADDED
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
# Hull host (C++)
|
|
2
|
+
|
|
3
|
+
This is the native runtime that renders your web UI in an OS web view (WebView2 /
|
|
4
|
+
WebKit / WebKitGTK) and exposes the JSON bridge. The published packages ship this
|
|
5
|
+
**prebuilt** — you only need this source if you ran `hull eject` to add custom
|
|
6
|
+
native bindings.
|
|
7
|
+
|
|
8
|
+
## Layout
|
|
9
|
+
|
|
10
|
+
```
|
|
11
|
+
host/
|
|
12
|
+
├── CMakeLists.txt # FetchContent: webview, json, cpp-httplib; OpenSSL; option(HULL_CRYPTO)
|
|
13
|
+
├── third_party/sqlite/ # vendored SQLite amalgamation (default build)
|
|
14
|
+
└── src/
|
|
15
|
+
├── main.cpp # arg parsing (--url/--app/--serve/--inspect/...), window + serve modes
|
|
16
|
+
├── dispatcher.hpp # transport-agnostic handler registry (args -> reply) + emit + trace
|
|
17
|
+
├── serve.hpp # HTTP/SSE bridge server (browser dev mode)
|
|
18
|
+
├── paths.hpp # app identity + per-user data dir + 0600 (webview-free)
|
|
19
|
+
├── keychain.hpp # OS keychain core (webview-free)
|
|
20
|
+
├── secure.hpp # at-rest crypto LAYER: NullCipher default, AES under -DHULL_CRYPTO
|
|
21
|
+
├── db_core.hpp # SQLite core (vendored, or SQLCipher in the secure build)
|
|
22
|
+
├── file_store.hpp # file/upload storage core (through secure.hpp)
|
|
23
|
+
└── bindings/
|
|
24
|
+
├── http.hpp # httpPost / httpGet (TLS, keychain-injected auth)
|
|
25
|
+
├── storage.hpp # settings store (through the secure layer)
|
|
26
|
+
├── credentials.hpp # keychain bindings, write-only from the UI
|
|
27
|
+
├── database.hpp # dbExec / dbQuery / dbGet / dbBatch
|
|
28
|
+
├── files.hpp # fileWrite / fileRead / fileList / fileDelete
|
|
29
|
+
└── printer.hpp # Winspool / CUPS discovery, ESC/POS, port-9100
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
> Build the **secure** variant (AES files/settings + SQLCipher DB) with
|
|
33
|
+
> `-DHULL_CRYPTO=ON` — it produces `hull-host-secure` and requires SQLCipher
|
|
34
|
+
> (Linux `libsqlcipher-dev`, macOS `brew install sqlcipher`, Windows `vcpkg install sqlcipher`).
|
|
35
|
+
|
|
36
|
+
## Add a binding
|
|
37
|
+
|
|
38
|
+
Bindings register handlers on the `Dispatcher` (`d.on(name, handler)`); they're then
|
|
39
|
+
exposed over the web view and over HTTP/SSE automatically. A handler gets the parsed
|
|
40
|
+
JSON args and calls `reply` once (sync or async):
|
|
41
|
+
|
|
42
|
+
```cpp
|
|
43
|
+
d.on("myThing", [](const json& args, Reply reply) {
|
|
44
|
+
reply(json{{"ok", true}}); // resolves the JS Promise
|
|
45
|
+
});
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
For anything that does I/O, spawn a worker and call `reply` later (see
|
|
49
|
+
`bindings/http.hpp` / `database.hpp`) so the UI thread never blocks. See
|
|
50
|
+
[../../../docs/native-code.md](../../../docs/native-code.md) for the full guide.
|
|
51
|
+
|
|
52
|
+
## Build
|
|
53
|
+
|
|
54
|
+
Prerequisites: CMake, a C++17 toolchain, and OpenSSL via
|
|
55
|
+
[vcpkg](https://github.com/microsoft/vcpkg).
|
|
56
|
+
|
|
57
|
+
```bash
|
|
58
|
+
cmake -S . -B build \
|
|
59
|
+
-DCMAKE_TOOLCHAIN_FILE="$VCPKG_ROOT/scripts/buildsystems/vcpkg.cmake"
|
|
60
|
+
cmake --build build --config Release
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
The binary is `build/bin/Release/hull-host.exe` (Windows) or `build/bin/hull-host`.
|
|
64
|
+
|
|
65
|
+
> On Windows, if CMake's FetchContent fails with `ambiguous argument 'HEAD0'`,
|
|
66
|
+
> point it at a real Git: add `-DGIT_EXECUTABLE="C:\Program Files\Git\cmd\git.exe"`.
|
|
67
|
+
|
|
68
|
+
## Runtime flags
|
|
69
|
+
|
|
70
|
+
| Flag | Meaning |
|
|
71
|
+
|------|---------|
|
|
72
|
+
| `--url <url>` | load a dev server (HMR) |
|
|
73
|
+
| `--app <file.html>` | load a built single-file bundle |
|
|
74
|
+
| `--serve <port>` | headless HTTP/SSE bridge (browser dev mode, no window) |
|
|
75
|
+
| `--inspect` | enable the dev trace (mirrors calls/events on `__trace`) |
|
|
76
|
+
| `--inspect-port <port>` | (window mode) also run a trace server for the inspector |
|
|
77
|
+
| `--title <s>` | window title |
|
|
78
|
+
| `--width <n>` / `--height <n>` | window size |
|
|
79
|
+
| `--icon <path>` | window icon (PNG/ICO; applied on Windows via GDI+, ignored on macOS/Linux) |
|
|
80
|
+
| `--app-id <s>` | namespaces storage + keychain per app |
|
|
81
|
+
| `--debug` | open dev tools |
|
|
82
|
+
|
|
83
|
+
## Environment (Linux sandbox)
|
|
84
|
+
|
|
85
|
+
WebKitGTK sandboxes its subprocesses with bubblewrap (needs unprivileged user
|
|
86
|
+
namespaces). When those are blocked (Ubuntu 24.04 default, many containers) the host
|
|
87
|
+
**auto-detects** it and disables the sandbox so the app runs. Override:
|
|
88
|
+
|
|
89
|
+
| Env var | Effect |
|
|
90
|
+
|---------|--------|
|
|
91
|
+
| `WEBKIT_DISABLE_SANDBOX_THIS_IS_DANGEROUS=1` | disable the sandbox (respected; skips the probe) |
|
|
92
|
+
| `HULL_FORCE_SANDBOX=1` | keep the sandbox, never auto-disable |
|
|
93
|
+
|
|
94
|
+
The CLI sets these from `.hullrc` `linux.sandbox` / `hull … --no-sandbox`.
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
# Builder image for the Linux Hull host. Lets you produce a Linux binary from any
|
|
2
|
+
# OS that runs Docker (used by `npm run build:linux`). Installs the WebKitGTK / GTK4
|
|
3
|
+
# stack plus OpenSSL, libsecret (keychain) and CUPS (printing) dev packages.
|
|
4
|
+
#
|
|
5
|
+
# The host sources are mounted at build time (not copied), so the image is reused
|
|
6
|
+
# across source changes:
|
|
7
|
+
# docker build -t hull-linux-builder -f linux.Dockerfile .
|
|
8
|
+
# docker run --rm -v <host>:/work/host:ro -v <out>:/out hull-linux-builder
|
|
9
|
+
FROM ubuntu:24.04
|
|
10
|
+
|
|
11
|
+
RUN apt-get update && apt-get install -y --no-install-recommends \
|
|
12
|
+
build-essential cmake git pkg-config ca-certificates \
|
|
13
|
+
libssl-dev libsecret-1-dev \
|
|
14
|
+
libcups2-dev libgnutls28-dev libavahi-client-dev \
|
|
15
|
+
libgtk-4-dev libwebkitgtk-6.0-dev \
|
|
16
|
+
libsqlcipher-dev \
|
|
17
|
+
&& rm -rf /var/lib/apt/lists/*
|
|
18
|
+
|
|
19
|
+
WORKDIR /work
|
|
20
|
+
# Configure out-of-source from the mounted, read-only sources, build, and stage the
|
|
21
|
+
# binary into the mounted /out directory.
|
|
22
|
+
CMD sh -c '\
|
|
23
|
+
cmake -S /work/host -B /tmp/build -DCMAKE_BUILD_TYPE=Release && \
|
|
24
|
+
cmake --build /tmp/build -j"$(nproc)" && \
|
|
25
|
+
cp /tmp/build/bin/hull-host /out/hull-host && \
|
|
26
|
+
echo "built: $(/out/hull-host --help >/dev/null 2>&1; file /out/hull-host 2>/dev/null || echo /out/hull-host)"'
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
#pragma once
|
|
2
|
+
#include <string>
|
|
3
|
+
#include <nlohmann/json.hpp>
|
|
4
|
+
#include "dispatcher.hpp"
|
|
5
|
+
#include "keychain.hpp" // secrets:: (webview-free keychain core)
|
|
6
|
+
|
|
7
|
+
// WRITE-ONLY from the UI. There is no "get secret" binding.
|
|
8
|
+
inline void register_credentials_bindings(Dispatcher& d) {
|
|
9
|
+
// saveCredential(service, account, secret) -> { ok }
|
|
10
|
+
d.on("saveCredential", [](const json& a, Reply reply) {
|
|
11
|
+
try {
|
|
12
|
+
bool ok = secrets::store(a.at(0).get<std::string>(),
|
|
13
|
+
a.at(1).get<std::string>(),
|
|
14
|
+
a.at(2).get<std::string>());
|
|
15
|
+
reply(json{{"ok", ok}});
|
|
16
|
+
} catch (const std::exception& e) { reply(json{{"ok", false}, {"error", e.what()}}); }
|
|
17
|
+
});
|
|
18
|
+
|
|
19
|
+
// credentialExists(service, account) -> { ok, exists } (boolean only; never the secret)
|
|
20
|
+
d.on("credentialExists", [](const json& a, Reply reply) {
|
|
21
|
+
try {
|
|
22
|
+
bool exists = secrets::load(a.at(0).get<std::string>(),
|
|
23
|
+
a.at(1).get<std::string>()).has_value();
|
|
24
|
+
reply(json{{"ok", true}, {"exists", exists}});
|
|
25
|
+
} catch (const std::exception& e) { reply(json{{"ok", false}, {"error", e.what()}}); }
|
|
26
|
+
});
|
|
27
|
+
|
|
28
|
+
// eraseCredential(service, account) -> { ok }
|
|
29
|
+
d.on("eraseCredential", [](const json& a, Reply reply) {
|
|
30
|
+
try {
|
|
31
|
+
bool ok = secrets::erase(a.at(0).get<std::string>(), a.at(1).get<std::string>());
|
|
32
|
+
reply(json{{"ok", ok}});
|
|
33
|
+
} catch (const std::exception& e) { reply(json{{"ok", false}, {"error", e.what()}}); }
|
|
34
|
+
});
|
|
35
|
+
}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
#pragma once
|
|
2
|
+
// SQLite bridge bindings. Logic lives in db_core.hpp (webview-free + unit-tested);
|
|
3
|
+
// these run it on a worker thread and reply with the JSON result.
|
|
4
|
+
#include <thread>
|
|
5
|
+
#include <string>
|
|
6
|
+
#include <nlohmann/json.hpp>
|
|
7
|
+
#include "dispatcher.hpp"
|
|
8
|
+
#include "../db_core.hpp"
|
|
9
|
+
|
|
10
|
+
using json = nlohmann::json;
|
|
11
|
+
|
|
12
|
+
inline void register_database_bindings(Dispatcher& d) {
|
|
13
|
+
// dbExec(sql, params?) -> { ok, changes, lastInsertRowid }
|
|
14
|
+
d.on("dbExec", [](const json& a, Reply reply) {
|
|
15
|
+
std::thread([a, reply]() {
|
|
16
|
+
try {
|
|
17
|
+
json params = a.size() > 1 ? a.at(1) : json::array();
|
|
18
|
+
reply(hulldb::exec(a.at(0).get<std::string>(), params));
|
|
19
|
+
} catch (const std::exception& e) { reply(json{{"ok", false}, {"error", e.what()}}); }
|
|
20
|
+
}).detach();
|
|
21
|
+
});
|
|
22
|
+
|
|
23
|
+
// dbQuery(sql, params?) -> { ok, rows }
|
|
24
|
+
d.on("dbQuery", [](const json& a, Reply reply) {
|
|
25
|
+
std::thread([a, reply]() {
|
|
26
|
+
try {
|
|
27
|
+
json params = a.size() > 1 ? a.at(1) : json::array();
|
|
28
|
+
reply(hulldb::query(a.at(0).get<std::string>(), params));
|
|
29
|
+
} catch (const std::exception& e) { reply(json{{"ok", false}, {"error", e.what()}}); }
|
|
30
|
+
}).detach();
|
|
31
|
+
});
|
|
32
|
+
|
|
33
|
+
// dbGet(sql, params?) -> { ok, row|null }
|
|
34
|
+
d.on("dbGet", [](const json& a, Reply reply) {
|
|
35
|
+
std::thread([a, reply]() {
|
|
36
|
+
try {
|
|
37
|
+
json params = a.size() > 1 ? a.at(1) : json::array();
|
|
38
|
+
reply(hulldb::get(a.at(0).get<std::string>(), params));
|
|
39
|
+
} catch (const std::exception& e) { reply(json{{"ok", false}, {"error", e.what()}}); }
|
|
40
|
+
}).detach();
|
|
41
|
+
});
|
|
42
|
+
|
|
43
|
+
// dbBatch([{sql, params?}, ...]) -> { ok, results } (atomic transaction)
|
|
44
|
+
d.on("dbBatch", [](const json& a, Reply reply) {
|
|
45
|
+
std::thread([a, reply]() {
|
|
46
|
+
try {
|
|
47
|
+
reply(hulldb::batch(a.at(0)));
|
|
48
|
+
} catch (const std::exception& e) { reply(json{{"ok", false}, {"error", e.what()}}); }
|
|
49
|
+
}).detach();
|
|
50
|
+
});
|
|
51
|
+
}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
#pragma once
|
|
2
|
+
// File storage bindings (uploads/blobs). Logic lives in file_store.hpp (webview-free
|
|
3
|
+
// + unit-tested); these run it on a worker thread and speak base64 over the bridge.
|
|
4
|
+
#include <thread>
|
|
5
|
+
#include <string>
|
|
6
|
+
#include <filesystem>
|
|
7
|
+
#include <nlohmann/json.hpp>
|
|
8
|
+
#include "dispatcher.hpp"
|
|
9
|
+
#include "../file_store.hpp"
|
|
10
|
+
|
|
11
|
+
namespace fs = std::filesystem;
|
|
12
|
+
using json = nlohmann::json;
|
|
13
|
+
|
|
14
|
+
inline void register_files_bindings(Dispatcher& d) {
|
|
15
|
+
// fileWrite(name, base64) -> { ok }
|
|
16
|
+
d.on("fileWrite", [](const json& a, Reply reply) {
|
|
17
|
+
std::thread([a, reply]() {
|
|
18
|
+
try {
|
|
19
|
+
appfiles::write_file(a.at(0).get<std::string>(),
|
|
20
|
+
appfiles::b64decode(a.at(1).get<std::string>()));
|
|
21
|
+
reply(json{{"ok", true}});
|
|
22
|
+
} catch (const std::exception& e) { reply(json{{"ok", false}, {"error", e.what()}}); }
|
|
23
|
+
}).detach();
|
|
24
|
+
});
|
|
25
|
+
|
|
26
|
+
// fileRead(name) -> { ok, data: base64 }
|
|
27
|
+
d.on("fileRead", [](const json& a, Reply reply) {
|
|
28
|
+
std::thread([a, reply]() {
|
|
29
|
+
try {
|
|
30
|
+
reply(json{{"ok", true}, {"data", appfiles::b64encode(appfiles::read_file(a.at(0).get<std::string>()))}});
|
|
31
|
+
} catch (const std::exception& e) { reply(json{{"ok", false}, {"error", e.what()}}); }
|
|
32
|
+
}).detach();
|
|
33
|
+
});
|
|
34
|
+
|
|
35
|
+
// fileList() -> { ok, files: [{name, size}] }
|
|
36
|
+
d.on("fileList", [](const json&, Reply reply) {
|
|
37
|
+
std::thread([reply]() {
|
|
38
|
+
try {
|
|
39
|
+
json arr = json::array();
|
|
40
|
+
for (const auto& e : fs::directory_iterator(appfiles::dir())) {
|
|
41
|
+
if (!e.is_regular_file()) continue;
|
|
42
|
+
arr.push_back({{"name", e.path().filename().string()}, {"size", (int64_t)e.file_size()}});
|
|
43
|
+
}
|
|
44
|
+
reply(json{{"ok", true}, {"files", arr}});
|
|
45
|
+
} catch (const std::exception& e) { reply(json{{"ok", false}, {"error", e.what()}}); }
|
|
46
|
+
}).detach();
|
|
47
|
+
});
|
|
48
|
+
|
|
49
|
+
// fileDelete(name) -> { ok, removed }
|
|
50
|
+
d.on("fileDelete", [](const json& a, Reply reply) {
|
|
51
|
+
std::thread([a, reply]() {
|
|
52
|
+
try {
|
|
53
|
+
bool removed = fs::remove(appfiles::dir() / appfiles::safe_name(a.at(0).get<std::string>()));
|
|
54
|
+
reply(json{{"ok", true}, {"removed", removed}});
|
|
55
|
+
} catch (const std::exception& e) { reply(json{{"ok", false}, {"error", e.what()}}); }
|
|
56
|
+
}).detach();
|
|
57
|
+
});
|
|
58
|
+
}
|