signalk-questdb 2.1.9 → 2.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,9 +1,9 @@
1
- import{a as e,i as t,n,r,t as i}from"./_virtual_mf___mfe_internal__signalk_questdb__mf_owner__275086164343916__loadShare__react__loadShare__.js-BWO9MGdR.js";var a={root:{fontFamily:`-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif`,color:`#333`,padding:`16px 0`},sectionToggle:{color:`#555`,display:`flex`,alignItems:`center`,gap:6,width:`100%`,textAlign:`left`,background:`none`,border:`none`,padding:0,cursor:`pointer`,userSelect:`none`},sectionMarker:{fontSize:11,transition:`transform 0.15s`},sectionTitle:{fontSize:13,fontWeight:600,color:`#888`,textTransform:`uppercase`,letterSpacing:`0.05em`,marginBottom:10,marginTop:24},btn:{display:`inline-flex`,alignItems:`center`,gap:8,padding:`8px 16px`,border:`none`,borderRadius:6,fontSize:13,fontWeight:600,cursor:`pointer`},btnPrimary:{background:`#3b82f6`,color:`#fff`},btnSecondary:{background:`#f1f5f9`,color:`#475569`,border:`1px solid #e2e8f0`},btnWarn:{background:`#f59e0b`,color:`#fff`},btnDanger:{background:`#ef4444`,color:`#fff`},btnDisabled:{opacity:.5,cursor:`not-allowed`},btnSmall:{padding:`4px 12px`,fontSize:12},status:{marginTop:8,fontSize:12,minHeight:18},card:{display:`flex`,alignItems:`center`,gap:14,padding:`14px 18px`,background:`#f8f9fa`,border:`1px solid #e0e0e0`,borderRadius:10,marginBottom:12},cardIcon:{width:44,height:44,borderRadius:10,display:`flex`,alignItems:`center`,justifyContent:`center`,fontSize:20,fontWeight:700,flexShrink:0},cardInfo:{flex:1},cardTitle:{fontSize:15,fontWeight:600,color:`#333`},cardMeta:{fontSize:12,color:`#888`},stateIndicator:{width:10,height:10,borderRadius:`50%`,flexShrink:0},fieldRow:{display:`flex`,alignItems:`center`,gap:12,marginBottom:10},label:{fontSize:13,fontWeight:500,color:`#555`,width:180,flexShrink:0},select:{padding:`6px 10px`,borderRadius:6,border:`1px solid #ccc`,fontSize:13,background:`#fff`,color:`#333`,minWidth:200},input:{padding:`6px 10px`,borderRadius:6,border:`1px solid #ccc`,fontSize:13,background:`#fff`,color:`#333`,width:200},inputSmall:{padding:`6px 10px`,borderRadius:6,border:`1px solid #ccc`,fontSize:13,background:`#fff`,color:`#333`,width:80},checkbox:{width:16,height:16,accentColor:`#3b82f6`},hint:{fontSize:11,color:`#aaa`,marginLeft:8},link:{color:`#3b82f6`,textDecoration:`none`,fontSize:13,fontWeight:600},textarea:{padding:`6px 10px`,borderRadius:6,border:`1px solid #ccc`,fontSize:13,fontFamily:`monospace`,background:`#fff`,color:`#333`,width:`100%`,minHeight:70,boxSizing:`border-box`,resize:`vertical`},empty:{textAlign:`center`,padding:`30px 16px`,color:`#999`,fontSize:13},tag:{display:`inline-block`,padding:`2px 8px`,borderRadius:4,fontSize:10,fontWeight:600,marginLeft:8},tagPre:{background:`#fef3c7`,color:`#92400e`},tagLatest:{background:`#dcfce7`,color:`#166534`},warnBanner:{padding:`12px 16px`,background:`#fef2f2`,border:`1px solid #fecaca`,borderRadius:10,marginBottom:12,fontSize:13,color:`#991b1b`,lineHeight:1.5},warnBannerTitle:{fontWeight:700,marginBottom:4},infoBanner:{padding:`12px 16px`,background:`#fffbeb`,border:`1px solid #fde68a`,borderRadius:10,marginBottom:12,fontSize:13,color:`#92400e`,lineHeight:1.5},bannerCode:{display:`block`,marginTop:8,padding:`8px 10px`,background:`#fff`,border:`1px solid #fecaca`,borderRadius:6,fontFamily:`monospace`,fontSize:12,color:`#7f1d1d`,whiteSpace:`pre-wrap`,wordBreak:`break-word`},statsGrid:{display:`grid`,gridTemplateColumns:`repeat(auto-fit, minmax(140px, 1fr))`,gap:10,marginBottom:12},statCard:{padding:`12px 16px`,background:`#f8f9fa`,border:`1px solid #e0e0e0`,borderRadius:10,textAlign:`center`},statValue:{fontSize:22,fontWeight:700,color:`#333`},statLabel:{fontSize:11,color:`#888`,marginTop:2}},o={ok:`#10b981`,warn:`#f59e0b`,error:`#ef4444`};function s(e,t){if(!e)return{versions:null,versionsError:`⚠ Could not reach GitHub — showing last known versions, retry`};let n=t&&typeof t==`object`?t:{},r=Array.isArray(n)?n:Array.isArray(n.versions)?n.versions:[],i=!Array.isArray(n)&&n.sources&&typeof n.sources==`object`?n.sources:{},a=``;return i.prImages===`rate-limited`?a=`⚠ GitHub rate-limited — PR test images temporarily unavailable, retry shortly`:i.releases===`rate-limited`?a=`⚠ GitHub rate-limited — some versions temporarily unavailable, retry shortly`:(i.prImages===`error`||i.releases===`error`)&&(a=`⚠ Could not fetch some versions from GitHub, retry`),{versions:r,versionsError:a}}function c(e,t={}){let{stableCount:n=5,preCount:r=3}=t,i=e.filter(e=>typeof e.pr==`number`),a=e.filter(e=>typeof e.pr!=`number`);return{prVersions:i,stableVersions:a.filter(e=>!e.prerelease).slice(0,n),preVersions:a.filter(e=>e.prerelease).slice(0,r)}}function l(e,t=[`latest`],n={}){let{prVersions:r,stableVersions:i,preVersions:a}=c(e,n);return new Set([...t,...a.map(e=>e.tag),...i.map(e=>e.tag),...r.map(e=>e.tag)])}function u(e,t,n=[`latest`],r={}){return e?l(t,n,r).has(e)?null:e:null}function d(e){return e==null?`—`:e>=1e6?(e/1e6).toFixed(1)+`M`:e>=1e3?(e/1e3).toFixed(1)+`K`:String(e)}function f(e,a={}){let{intervalMs:o=5e3}=a,[s,c]=t(null),[l,u]=t(!0),d=r(0),f=r(a.fallback??null),p=i(async t=>{let n=++d.current,r=f.current;try{let n=await(await fetch(e,{signal:t})).json().catch(()=>null);n&&typeof n==`object`&&(r=n)}catch{}n===d.current&&(c(r),u(!1))},[e]);return n(()=>{let e=!1,t=null,n=new AbortController,r=async()=>{await p(n.signal),!e&&o>0&&(t=setTimeout(()=>void r(),o))};return r(),()=>{e=!0,n.abort(),t&&clearTimeout(t)}},[p,o]),{status:s,loading:l,refresh:()=>p()}}function p(e){let[a,o]=t([]),[c,l]=t(``),[u,d]=t(!1),f=r(0),p=i(async()=>{let t=++f.current;d(!0);try{let n=await fetch(e),r=await n.json().catch(()=>null),i=s(n.ok,r);if(t!==f.current)return;i.versions!==null&&o(i.versions),l(i.versionsError)}catch{if(t!==f.current)return;l(`⚠ Offline — showing last known versions`)}d(!1)},[e]);return n(()=>{p()},[p]),{versions:a,versionsError:c,loading:u,refresh:p}}function m({children:t,color:n}){return e.createElement(`span`,{style:{...a.hint,...n?{color:n}:{}}},t)}function h({state:t=`ok`,color:n,title:r,style:i}){return e.createElement(`div`,{style:{...a.stateIndicator,background:n??o[t],...i},title:r})}function ee({icon:t,iconBackground:n,iconColor:r,title:i,meta:s,state:c=`ok`,stateTitle:l,link:u,children:d}){let f=c===`error`&&!n;return e.createElement(`div`,{style:a.card},e.createElement(`div`,{style:{...a.cardIcon,background:f?`#fef2f2`:n??`#3b82f6`,color:f?o.error:r??`#fff`}},t),e.createElement(`div`,{style:a.cardInfo},e.createElement(`div`,{style:a.cardTitle},i),s!=null&&e.createElement(`div`,{style:a.cardMeta},s)),d,u&&e.createElement(`a`,{href:u.href,target:`_blank`,rel:`noopener noreferrer`,style:a.link},u.label),e.createElement(h,{state:c,title:l}))}function g({title:n,defaultOpen:r=!1,children:i}){let[o,s]=t(r);return e.createElement(`div`,null,e.createElement(`button`,{type:`button`,"aria-expanded":o,style:{...a.sectionTitle,...a.sectionToggle},onClick:()=>s(!o)},e.createElement(`span`,{style:{...a.sectionMarker,transform:o?`rotate(90deg)`:`rotate(0deg)`}},`▶`),n),o&&e.createElement(`div`,{style:{marginBottom:16}},i))}var _={primary:a.btnPrimary,secondary:a.btnSecondary,warn:a.btnWarn,danger:a.btnDanger};function v({variant:t=`primary`,small:n=!1,busy:r=!1,busyLabel:i,disabled:o=!1,onClick:s,title:c,style:l,children:u}){let d=o||r;return e.createElement(`button`,{type:`button`,style:{...a.btn,..._[t],...n?a.btnSmall:{},...d?a.btnDisabled:{},...l},onClick:s,disabled:d,title:c},r?i??u:u)}function te({message:t,error:n=!1,style:r}){return t?e.createElement(`div`,{style:{...a.status,color:n?o.error:o.ok,marginTop:16,...r}},t):null}var ne=[{tag:`latest`,label:`latest (recommended)`}];function re({value:t,onChange:n,versions:r,floatingOptions:i=ne,stableCount:s,preCount:l,loading:d=!1,error:f,onRefresh:p,disabled:h=!1,style:ee}){let g={stableCount:s,preCount:l},{prVersions:_,stableVersions:te,preVersions:re}=c(r,g),y=u(t,r,i.map(e=>e.tag),g);return e.createElement(e.Fragment,null,e.createElement(`select`,{style:{...a.select,...ee},value:t,onChange:e=>n(e.target.value),disabled:h},i.map(t=>e.createElement(`option`,{key:t.tag,value:t.tag},t.label??t.tag)),re.map(t=>e.createElement(`option`,{key:t.tag,value:t.tag},t.tag,` (pre-release)`)),te.map((t,n)=>e.createElement(`option`,{key:t.tag,value:t.tag},t.tag,n===0?` (current stable)`:``)),_.length>0&&e.createElement(`optgroup`,{label:`PR test images`},_.map(t=>e.createElement(`option`,{key:t.tag,value:t.tag},t.tag,t.title?` — ${t.title}`:``))),y&&e.createElement(`option`,{value:y},y,` (running)`)),d&&e.createElement(m,null,`loading releases...`),p&&e.createElement(v,{small:!0,style:{padding:`4px 10px`,fontSize:11},onClick:p,title:`Refresh available versions`},`↻`),f&&e.createElement(m,{color:o.error},f))}var y={...a,warnBannerCode:{display:`block`,marginTop:8,padding:`8px 10px`,background:`#fff`,border:`1px solid #fecaca`,borderRadius:6,fontFamily:`monospace`,fontSize:12,color:`#7f1d1d`,whiteSpace:`pre-wrap`,wordBreak:`break-word`},fieldHelp:{fontSize:12,color:`#666`,marginTop:6,lineHeight:1.5},migrationItem:{display:`flex`,alignItems:`center`,gap:12,padding:`12px 16px`,background:`#f8f9fa`,border:`1px solid #e0e0e0`,borderRadius:10,marginBottom:8},migrationActions:{display:`flex`,gap:8,alignItems:`center`}},b=e=>typeof e==`object`&&!!e;function ie(e){let t=b(e)?e.sources:void 0;return Array.isArray(t)?t.filter(e=>b(e)&&typeof e.type==`string`&&typeof e.url==`string`&&typeof e.status==`string`&&(e.version===void 0||typeof e.version==`string`)):[]}function ae(e){let t=b(e)?e.buckets:void 0;return Array.isArray(t)?t.filter(e=>b(e)&&typeof e.name==`string`&&(e.id===void 0||typeof e.id==`string`)&&(e.retentionSeconds===void 0||typeof e.retentionSeconds==`number`)):[]}function oe(e){let t=b(e)?e.measurements:void 0;return Array.isArray(t)?t.filter(e=>b(e)&&typeof e.name==`string`&&Array.isArray(e.fields)):[]}function x(e){let t=b(e)?e.run:void 0;if(!b(t)||typeof t.id!=`string`||typeof t.state!=`string`)return;let n=t.state;if(n!==`running`&&n!==`done`&&n!==`failed`&&n!==`cancelled`)return;let r=b(t.progress)?t.progress:{},i=e=>typeof e==`number`&&Number.isFinite(e)?e:0,a=e=>typeof e==`string`?e:void 0;return{id:t.id,state:n,url:a(t.url)??``,bucket:a(t.bucket)??``,startedAt:a(t.startedAt)??``,finishedAt:a(t.finishedAt),error:a(t.error),resumedFrom:b(t.resumedFrom)?{measurement:a(t.resumedFrom.measurement),windowStart:a(t.resumedFrom.windowStart)}:void 0,progress:{read:i(r.read),written:i(r.written),skipped:i(r.skipped),measurementsDone:i(r.measurementsDone),measurementsTotal:i(r.measurementsTotal),currentMeasurement:a(r.currentMeasurement),currentWindowStart:a(r.currentWindowStart)}}}function se(e){let t=e=>typeof e==`number`&&Number.isFinite(e)&&e>0?Math.floor(e):0;return{rows:t(b(e)?e.rows:void 0),dropped:t(b(e)?e.dropped:void 0)}}function ce(e){let t=b(e)&&Array.isArray(e.contexts)?e.contexts.filter(e=>typeof e==`string`&&!!e):[],n=b(e)&&typeof e.self==`string`&&t.includes(e.self)?e.self:void 0;return{contexts:t,self:n,selfBy:n!==void 0&&b(e)&&(e.selfBy===`tag`||e.selfBy===`identity`)?e.selfBy:void 0}}function S(e){let t=new Date(e);return Number.isNaN(t.getTime())?e:t.toLocaleString()}function le(e){let t=b(e)?e.interrupted:void 0;if(b(t)&&typeof t.url==`string`&&typeof t.type==`string`&&typeof t.bucket==`string`&&typeof t.from==`string`&&typeof t.to==`string`&&typeof t.updatedAt==`string`)return{url:t.url,type:t.type,bucket:t.bucket,from:t.from,to:t.to,updatedAt:t.updatedAt,measurementsDone:typeof t.measurementsDone==`number`&&Number.isFinite(t.measurementsDone)?t.measurementsDone:0,measurement:typeof t.measurement==`string`?t.measurement:void 0,windowStart:typeof t.windowStart==`string`?t.windowStart:void 0}}function ue(e,t){let n=new Date(e),r=new Date(t);return Number.isNaN(n.getTime())||Number.isNaN(r.getTime())?{error:`Enter a valid From and To date for the import.`}:r<=n?{error:`The To date must be after the From date.`}:{from:n.toISOString(),to:r.toISOString()}}function C(e){return e instanceof Error?e.message:String(e)}function w(e,t){return e??t}var de=[`none`,`lz4`,`zstd`],fe={padding:`4px 12px`,fontSize:12};function pe(e){return de.includes(e)?e:`lz4`}function me({configuration:a,save:o}){let s=a||{},[c,l]=t(s.questdbHost||`127.0.0.1`),[u,m]=t(s.questdbIlpPort||9009),[h,_]=t(s.questdbHttpPort||9e3),[ne,b]=t(s.questdbPgPort||8812),[de,me]=t(s.questdbVersion||`latest`),[T,he]=t(s.managedContainer!==!1),[ge,_e]=t(s.recordSelf!==!1),[ve,ye]=t(s.recordOthers!==!1),[be,xe]=t(s.restoreOnStart===!0),[Se,Ce]=t(s.enableConsole!==!1),[we,Te]=t(s.historySourcePolicyAll===!0),[Ee,De]=t((s.restoreMaxAgeMinutes??0)>0?s.restoreMaxAgeMinutes:9),[Oe,ke]=t(s.defaultSamplingRate??2e3),[Ae,je]=t(String(s.ilpFlushIntervalMs??5e3)),[Me,Ne]=t(s.retentionDays||0),[Pe,Fe]=t(s.pathFilter?.mode===`include`?`include`:`exclude`),[Ie,Le]=t((Array.isArray(s.pathFilter?.paths)?s.pathFilter.paths:[]).join(`
2
- `)),[Re,ze]=t(s.compression||`lz4`),[Be,Ve]=t(s.compressionLevel||3),[He,Ue]=t(s.networkName||`sk-network`),[E,We]=t(s.exposeToContainers||!1),{versions:Ge,versionsError:Ke,loading:qe,refresh:Je}=p(`/plugins/signalk-questdb/api/versions`),{status:D,loading:Ye,refresh:O}=f(`/plugins/signalk-questdb/api/status`,{fallback:{status:`not_running`},intervalMs:5e3}),[k,Xe]=t(null),[Ze,Qe]=t(!1),[A,$e]=t(``),[j,et]=t(null),[tt,nt]=t(``),[rt,it]=t(``),[at,ot]=t(``),[st,ct]=t(``),[lt,ut]=t(null),[M,N]=t(``),[P,dt]=t(null),[ft,F]=t(!1),[pt,mt]=t(!1),[I,ht]=t(null),[gt,_t]=t(``),[vt,yt]=t(!0),[bt,xt]=t(``),[St,Ct]=t(``),[L,R]=t(null),[wt,z]=t(!1),[B,Tt]=t(null),[Et,Dt]=t(!1),[V,H]=t(null),[Ot,U]=t(``),[kt,W]=t(!1),[G,At]=t(null),[jt,Mt]=t(!1),[Nt,Pt]=t(!1),[Ft,It]=t(!1),[Lt,Rt]=t(!1),[zt,K]=t(``),[q,Bt]=t(null),[Vt,J]=t(!1),Y=r(0),[Ht,Ut]=t(!1),X=i(async e=>{let t=++Y.current;try{let n=await fetch(`/plugins/signalk-questdb/api/wal-diagnosis`,{signal:e});if(t!==Y.current)return;if(n.ok){let e=await n.json();if(t!==Y.current)return;Bt(e),J(!1)}else J(!0)}catch{t===Y.current&&J(!0)}},[]),Wt=!!(D&&D.status===`running`&&(D.suspendedTables||[]).length>0);n(()=>{if(!Wt){Bt(null),J(!1);return}let e=!1,t=null,n=new AbortController,r=async()=>{await X(n.signal),e||(t=setTimeout(r,15e3))};return r(),()=>{e=!0,n.abort(),t&&clearTimeout(t)}},[Wt,X]);let Gt=async(e,t)=>{let n=t.tailSkip?`
1
+ import{a as e,i as t,n,r,t as i}from"./_virtual_mf___mfe_internal__signalk_questdb__mf_owner__275086164343916__loadShare__react__loadShare__.js-BWO9MGdR.js";var a={root:{fontFamily:`-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif`,color:`#333`,padding:`16px 0`},sectionToggle:{color:`#555`,display:`flex`,alignItems:`center`,gap:6,width:`100%`,textAlign:`left`,background:`none`,border:`none`,padding:0,cursor:`pointer`,userSelect:`none`},sectionMarker:{fontSize:11,transition:`transform 0.15s`},sectionTitle:{fontSize:13,fontWeight:600,color:`#888`,textTransform:`uppercase`,letterSpacing:`0.05em`,marginBottom:10,marginTop:24},btn:{display:`inline-flex`,alignItems:`center`,gap:8,padding:`8px 16px`,border:`none`,borderRadius:6,fontSize:13,fontWeight:600,cursor:`pointer`},btnPrimary:{background:`#3b82f6`,color:`#fff`},btnSecondary:{background:`#f1f5f9`,color:`#475569`,border:`1px solid #e2e8f0`},btnWarn:{background:`#f59e0b`,color:`#fff`},btnDanger:{background:`#ef4444`,color:`#fff`},btnDisabled:{opacity:.5,cursor:`not-allowed`},btnSmall:{padding:`4px 12px`,fontSize:12},status:{marginTop:8,fontSize:12,minHeight:18},card:{display:`flex`,alignItems:`center`,gap:14,padding:`14px 18px`,background:`#f8f9fa`,border:`1px solid #e0e0e0`,borderRadius:10,marginBottom:12},cardIcon:{width:44,height:44,borderRadius:10,display:`flex`,alignItems:`center`,justifyContent:`center`,fontSize:20,fontWeight:700,flexShrink:0},cardInfo:{flex:1},cardTitle:{fontSize:15,fontWeight:600,color:`#333`},cardMeta:{fontSize:12,color:`#888`},stateIndicator:{width:10,height:10,borderRadius:`50%`,flexShrink:0},fieldRow:{display:`flex`,alignItems:`center`,gap:12,marginBottom:10},label:{fontSize:13,fontWeight:500,color:`#555`,width:180,flexShrink:0},select:{padding:`6px 10px`,borderRadius:6,border:`1px solid #ccc`,fontSize:13,background:`#fff`,color:`#333`,minWidth:200},input:{padding:`6px 10px`,borderRadius:6,border:`1px solid #ccc`,fontSize:13,background:`#fff`,color:`#333`,width:200},inputSmall:{padding:`6px 10px`,borderRadius:6,border:`1px solid #ccc`,fontSize:13,background:`#fff`,color:`#333`,width:80},checkbox:{width:16,height:16,accentColor:`#3b82f6`},hint:{fontSize:11,color:`#aaa`,marginLeft:8},link:{color:`#3b82f6`,textDecoration:`none`,fontSize:13,fontWeight:600},textarea:{padding:`6px 10px`,borderRadius:6,border:`1px solid #ccc`,fontSize:13,fontFamily:`monospace`,background:`#fff`,color:`#333`,width:`100%`,minHeight:70,boxSizing:`border-box`,resize:`vertical`},empty:{textAlign:`center`,padding:`30px 16px`,color:`#999`,fontSize:13},tag:{display:`inline-block`,padding:`2px 8px`,borderRadius:4,fontSize:10,fontWeight:600,marginLeft:8},tagPre:{background:`#fef3c7`,color:`#92400e`},tagLatest:{background:`#dcfce7`,color:`#166534`},warnBanner:{padding:`12px 16px`,background:`#fef2f2`,border:`1px solid #fecaca`,borderRadius:10,marginBottom:12,fontSize:13,color:`#991b1b`,lineHeight:1.5},warnBannerTitle:{fontWeight:700,marginBottom:4},infoBanner:{padding:`12px 16px`,background:`#fffbeb`,border:`1px solid #fde68a`,borderRadius:10,marginBottom:12,fontSize:13,color:`#92400e`,lineHeight:1.5},bannerCode:{display:`block`,marginTop:8,padding:`8px 10px`,background:`#fff`,border:`1px solid #fecaca`,borderRadius:6,fontFamily:`monospace`,fontSize:12,color:`#7f1d1d`,whiteSpace:`pre-wrap`,wordBreak:`break-word`},statsGrid:{display:`grid`,gridTemplateColumns:`repeat(auto-fit, minmax(140px, 1fr))`,gap:10,marginBottom:12},statCard:{padding:`12px 16px`,background:`#f8f9fa`,border:`1px solid #e0e0e0`,borderRadius:10,textAlign:`center`},statValue:{fontSize:22,fontWeight:700,color:`#333`},statLabel:{fontSize:11,color:`#888`,marginTop:2}},o={ok:`#10b981`,warn:`#f59e0b`,error:`#ef4444`};function s(e,t){if(!e)return{versions:null,versionsError:`⚠ Could not reach GitHub — showing last known versions, retry`};let n=t&&typeof t==`object`?t:{},r=Array.isArray(n)?n:Array.isArray(n.versions)?n.versions:[],i=!Array.isArray(n)&&n.sources&&typeof n.sources==`object`?n.sources:{},a=``;return i.prImages===`rate-limited`?a=`⚠ GitHub rate-limited — PR test images temporarily unavailable, retry shortly`:i.releases===`rate-limited`?a=`⚠ GitHub rate-limited — some versions temporarily unavailable, retry shortly`:(i.prImages===`error`||i.releases===`error`)&&(a=`⚠ Could not fetch some versions from GitHub, retry`),{versions:r,versionsError:a}}function c(e,t={}){let{stableCount:n=5,preCount:r=3}=t,i=e.filter(e=>typeof e.pr==`number`),a=e.filter(e=>typeof e.pr!=`number`);return{prVersions:i,stableVersions:a.filter(e=>!e.prerelease).slice(0,n),preVersions:a.filter(e=>e.prerelease).slice(0,r)}}function l(e,t=[`latest`],n={}){let{prVersions:r,stableVersions:i,preVersions:a}=c(e,n);return new Set([...t,...a.map(e=>e.tag),...i.map(e=>e.tag),...r.map(e=>e.tag)])}function u(e,t,n=[`latest`],r={}){return e?l(t,n,r).has(e)?null:e:null}function d(e){return e==null?`—`:e>=1e6?(e/1e6).toFixed(1)+`M`:e>=1e3?(e/1e3).toFixed(1)+`K`:String(e)}function f(e,a={}){let{intervalMs:o=5e3}=a,[s,c]=t(null),[l,u]=t(!0),d=r(0),f=r(a.fallback??null),p=i(async t=>{let n=++d.current,r=f.current;try{let n=await(await fetch(e,{signal:t})).json().catch(()=>null);n&&typeof n==`object`&&(r=n)}catch{}n===d.current&&(c(r),u(!1))},[e]);return n(()=>{let e=!1,t=null,n=new AbortController,r=async()=>{await p(n.signal),!e&&o>0&&(t=setTimeout(()=>void r(),o))};return r(),()=>{e=!0,n.abort(),t&&clearTimeout(t)}},[p,o]),{status:s,loading:l,refresh:()=>p()}}function p(e){let[a,o]=t([]),[c,l]=t(``),[u,d]=t(!1),f=r(0),p=i(async()=>{let t=++f.current;d(!0);try{let n=await fetch(e),r=await n.json().catch(()=>null),i=s(n.ok,r);if(t!==f.current)return;i.versions!==null&&o(i.versions),l(i.versionsError)}catch{if(t!==f.current)return;l(`⚠ Offline — showing last known versions`)}d(!1)},[e]);return n(()=>{p()},[p]),{versions:a,versionsError:c,loading:u,refresh:p}}function m({children:t,color:n}){return e.createElement(`span`,{style:{...a.hint,...n?{color:n}:{}}},t)}function h({state:t=`ok`,color:n,title:r,style:i}){return e.createElement(`div`,{style:{...a.stateIndicator,background:n??o[t],...i},title:r})}function ee({icon:t,iconBackground:n,iconColor:r,title:i,meta:s,state:c=`ok`,stateTitle:l,link:u,children:d}){let f=c===`error`&&!n;return e.createElement(`div`,{style:a.card},e.createElement(`div`,{style:{...a.cardIcon,background:f?`#fef2f2`:n??`#3b82f6`,color:f?o.error:r??`#fff`}},t),e.createElement(`div`,{style:a.cardInfo},e.createElement(`div`,{style:a.cardTitle},i),s!=null&&e.createElement(`div`,{style:a.cardMeta},s)),d,u&&e.createElement(`a`,{href:u.href,target:`_blank`,rel:`noopener noreferrer`,style:a.link},u.label),e.createElement(h,{state:c,title:l}))}function g({title:n,defaultOpen:r=!1,children:i}){let[o,s]=t(r);return e.createElement(`div`,null,e.createElement(`button`,{type:`button`,"aria-expanded":o,style:{...a.sectionTitle,...a.sectionToggle},onClick:()=>s(!o)},e.createElement(`span`,{style:{...a.sectionMarker,transform:o?`rotate(90deg)`:`rotate(0deg)`}},`▶`),n),o&&e.createElement(`div`,{style:{marginBottom:16}},i))}var _={primary:a.btnPrimary,secondary:a.btnSecondary,warn:a.btnWarn,danger:a.btnDanger};function v({variant:t=`primary`,small:n=!1,busy:r=!1,busyLabel:i,disabled:o=!1,onClick:s,title:c,style:l,children:u}){let d=o||r;return e.createElement(`button`,{type:`button`,style:{...a.btn,..._[t],...n?a.btnSmall:{},...d?a.btnDisabled:{},...l},onClick:s,disabled:d,title:c},r?i??u:u)}function te({message:t,error:n=!1,style:r}){return t?e.createElement(`div`,{style:{...a.status,color:n?o.error:o.ok,marginTop:16,...r}},t):null}var ne=[{tag:`latest`,label:`latest (recommended)`}];function re({value:t,onChange:n,versions:r,floatingOptions:i=ne,stableCount:s,preCount:l,loading:d=!1,error:f,onRefresh:p,disabled:h=!1,style:ee}){let g={stableCount:s,preCount:l},{prVersions:_,stableVersions:te,preVersions:re}=c(r,g),y=u(t,r,i.map(e=>e.tag),g);return e.createElement(e.Fragment,null,e.createElement(`select`,{style:{...a.select,...ee},value:t,onChange:e=>n(e.target.value),disabled:h},i.map(t=>e.createElement(`option`,{key:t.tag,value:t.tag},t.label??t.tag)),re.map(t=>e.createElement(`option`,{key:t.tag,value:t.tag},t.tag,` (pre-release)`)),te.map((t,n)=>e.createElement(`option`,{key:t.tag,value:t.tag},t.tag,n===0?` (current stable)`:``)),_.length>0&&e.createElement(`optgroup`,{label:`PR test images`},_.map(t=>e.createElement(`option`,{key:t.tag,value:t.tag},t.tag,t.title?` — ${t.title}`:``))),y&&e.createElement(`option`,{value:y},y,` (running)`)),d&&e.createElement(m,null,`loading releases...`),p&&e.createElement(v,{small:!0,style:{padding:`4px 10px`,fontSize:11},onClick:p,title:`Refresh available versions`},`↻`),f&&e.createElement(m,{color:o.error},f))}var y={...a,warnBannerCode:{display:`block`,marginTop:8,padding:`8px 10px`,background:`#fff`,border:`1px solid #fecaca`,borderRadius:6,fontFamily:`monospace`,fontSize:12,color:`#7f1d1d`,whiteSpace:`pre-wrap`,wordBreak:`break-word`},fieldHelp:{fontSize:12,color:`#666`,marginTop:6,lineHeight:1.5},migrationItem:{display:`flex`,alignItems:`center`,gap:12,padding:`12px 16px`,background:`#f8f9fa`,border:`1px solid #e0e0e0`,borderRadius:10,marginBottom:8},migrationActions:{display:`flex`,gap:8,alignItems:`center`}},b=e=>typeof e==`object`&&!!e;function ie(e){let t=b(e)?e.sources:void 0;return Array.isArray(t)?t.filter(e=>b(e)&&typeof e.type==`string`&&typeof e.url==`string`&&typeof e.status==`string`&&(e.version===void 0||typeof e.version==`string`)):[]}function ae(e){let t=b(e)?e.buckets:void 0;return Array.isArray(t)?t.filter(e=>b(e)&&typeof e.name==`string`&&(e.id===void 0||typeof e.id==`string`)&&(e.retentionSeconds===void 0||typeof e.retentionSeconds==`number`)):[]}function oe(e){let t=b(e)?e.measurements:void 0;return Array.isArray(t)?t.filter(e=>b(e)&&typeof e.name==`string`&&Array.isArray(e.fields)):[]}function x(e){let t=b(e)?e.run:void 0;if(!b(t)||typeof t.id!=`string`||typeof t.state!=`string`)return;let n=t.state;if(n!==`running`&&n!==`done`&&n!==`failed`&&n!==`cancelled`)return;let r=b(t.progress)?t.progress:{},i=e=>typeof e==`number`&&Number.isFinite(e)?e:0,a=e=>typeof e==`string`?e:void 0;return{id:t.id,state:n,url:a(t.url)??``,bucket:a(t.bucket)??``,startedAt:a(t.startedAt)??``,finishedAt:a(t.finishedAt),error:a(t.error),resumedFrom:b(t.resumedFrom)?{measurement:a(t.resumedFrom.measurement),windowStart:a(t.resumedFrom.windowStart)}:void 0,progress:{read:i(r.read),written:i(r.written),skipped:i(r.skipped),measurementsDone:i(r.measurementsDone),measurementsTotal:i(r.measurementsTotal),currentMeasurement:a(r.currentMeasurement),currentWindowStart:a(r.currentWindowStart)}}}function se(e){let t=e=>typeof e==`number`&&Number.isFinite(e)&&e>0?Math.floor(e):0;return{rows:t(b(e)?e.rows:void 0),dropped:t(b(e)?e.dropped:void 0)}}function ce(e){let t=b(e)&&Array.isArray(e.contexts)?e.contexts.filter(e=>typeof e==`string`&&!!e):[],n=b(e)&&typeof e.self==`string`&&t.includes(e.self)?e.self:void 0;return{contexts:t,self:n,selfBy:n!==void 0&&b(e)&&(e.selfBy===`tag`||e.selfBy===`identity`)?e.selfBy:void 0}}function S(e){let t=new Date(e);return Number.isNaN(t.getTime())?e:t.toLocaleString()}function le(e){let t=b(e)?e.interrupted:void 0;if(b(t)&&typeof t.url==`string`&&typeof t.type==`string`&&typeof t.bucket==`string`&&typeof t.from==`string`&&typeof t.to==`string`&&typeof t.updatedAt==`string`)return{url:t.url,type:t.type,bucket:t.bucket,from:t.from,to:t.to,updatedAt:t.updatedAt,measurementsDone:typeof t.measurementsDone==`number`&&Number.isFinite(t.measurementsDone)?t.measurementsDone:0,measurement:typeof t.measurement==`string`?t.measurement:void 0,windowStart:typeof t.windowStart==`string`?t.windowStart:void 0}}function ue(e,t){let n=new Date(e),r=new Date(t);return Number.isNaN(n.getTime())||Number.isNaN(r.getTime())?{error:`Enter a valid From and To date for the import.`}:r<=n?{error:`The To date must be after the From date.`}:{from:n.toISOString(),to:r.toISOString()}}function C(e){return e instanceof Error?e.message:String(e)}function w(e,t){return e??t}var de=[`none`,`lz4`,`zstd`],fe={padding:`4px 12px`,fontSize:12};function pe(e){return de.includes(e)?e:`lz4`}function me({configuration:a,save:o}){let s=a||{},[c,l]=t(s.questdbHost||`127.0.0.1`),[u,m]=t(s.questdbIlpPort||9009),[h,_]=t(s.questdbHttpPort||9e3),[ne,b]=t(s.questdbPgPort||8812),[de,me]=t(s.questdbVersion||`latest`),[T,he]=t(s.managedContainer!==!1),[ge,_e]=t(s.recordSelf!==!1),[ve,ye]=t(s.recordOthers!==!1),[be,xe]=t(s.restoreOnStart===!0),[Se,Ce]=t(s.enableConsole!==!1),[we,Te]=t(s.historySourcePolicyAll===!0),[Ee,De]=t((s.restoreMaxAgeMinutes??0)>0?s.restoreMaxAgeMinutes:9),[Oe,ke]=t(s.defaultSamplingRate??2e3),[Ae,je]=t(String(s.ilpFlushIntervalMs??5e3)),[Me,Ne]=t(String(s.unchangedHeartbeatSeconds??300)),[Pe,Fe]=t(s.retentionDays||0),[Ie,Le]=t(s.pathFilter?.mode===`include`?`include`:`exclude`),[Re,ze]=t((Array.isArray(s.pathFilter?.paths)?s.pathFilter.paths:[]).join(`
2
+ `)),[Be,Ve]=t(s.compression||`lz4`),[He,Ue]=t(s.compressionLevel||3),[We,Ge]=t(s.networkName||`sk-network`),[E,Ke]=t(s.exposeToContainers||!1),{versions:qe,versionsError:Je,loading:Ye,refresh:Xe}=p(`/plugins/signalk-questdb/api/versions`),{status:D,loading:Ze,refresh:O}=f(`/plugins/signalk-questdb/api/status`,{fallback:{status:`not_running`},intervalMs:5e3}),[k,Qe]=t(null),[$e,et]=t(!1),[A,tt]=t(``),[j,nt]=t(null),[rt,it]=t(``),[at,ot]=t(``),[st,ct]=t(``),[lt,ut]=t(``),[dt,ft]=t(null),[M,N]=t(``),[P,pt]=t(null),[mt,F]=t(!1),[ht,gt]=t(!1),[I,_t]=t(null),[vt,yt]=t(``),[bt,xt]=t(!0),[St,Ct]=t(``),[wt,Tt]=t(``),[L,R]=t(null),[Et,z]=t(!1),[B,Dt]=t(null),[Ot,kt]=t(!1),[V,H]=t(null),[At,U]=t(``),[jt,W]=t(!1),[G,Mt]=t(null),[Nt,Pt]=t(!1),[Ft,It]=t(!1),[Lt,Rt]=t(!1),[zt,Bt]=t(!1),[Vt,K]=t(``),[q,Ht]=t(null),[Ut,J]=t(!1),Y=r(0),[Wt,Gt]=t(!1),X=i(async e=>{let t=++Y.current;try{let n=await fetch(`/plugins/signalk-questdb/api/wal-diagnosis`,{signal:e});if(t!==Y.current)return;if(n.ok){let e=await n.json();if(t!==Y.current)return;Ht(e),J(!1)}else J(!0)}catch{t===Y.current&&J(!0)}},[]),Kt=!!(D&&D.status===`running`&&(D.suspendedTables||[]).length>0);n(()=>{if(!Kt){Ht(null),J(!1);return}let e=!1,t=null,n=new AbortController,r=async()=>{await X(n.signal),e||(t=setTimeout(r,15e3))};return r(),()=>{e=!0,n.abort(),t&&clearTimeout(t)}},[Kt,X]);let qt=async(e,t)=>{let n=t.tailSkip?`
3
3
 
4
- WARNING: this is the newest pending segment — skipping it drops the ENTIRE pending backlog.`:``;if(window.confirm(`Skip the unreadable WAL segment on ${e}?\n\nThis permanently loses ${d(t.skippedTxns)} transaction(s) recorded between ${t.skipWindowStart} and ${t.skipWindowEnd}. Everything after the skipped segment is replayed without loss.`+n)){Ut(!0),K(``);try{let n=await fetch(`/plugins/signalk-questdb/api/resume-wal/skip`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({table:e,confirmPlan:t})}),r=await n.json().catch(()=>({error:n.statusText}));n.ok?K(r.message??``):K(`Skip failed: ${w(r.error,`unknown error`)}`),O(),X()}catch(e){K(`Skip failed: ${C(e)}`)}Ut(!1)}},Kt=async()=>{Mt(!0);try{let e=await fetch(`/plugins/signalk-questdb/api/update/check`);e.ok&&At(await e.json())}catch{}Mt(!1)},qt=async()=>{Pt(!0),U(`Pulling new image and restarting...`),W(!1);try{let e=await fetch(`/plugins/signalk-questdb/api/update/apply`,{method:`POST`});if(e.ok){let t=await e.json();U(t.message??``),At(null),t.newVersion&&me(t.newVersion),O()}else{let t=await e.json().catch(()=>({error:e.statusText}));U(`Update failed: ${w(t.error,`unknown error`)}`),W(!0)}}catch(e){U(`Update failed: ${C(e)}`),W(!0)}Pt(!1)},Jt=async()=>{if(window.confirm(`Remove the QuestDB container and DELETE ALL recorded data? This cannot be undone.`)){It(!0),U(`Removing QuestDB container and data...`),W(!1);try{let e=await fetch(`/plugins/signalk-questdb/api/purge-data`,{method:`POST`}),t=await e.json().catch(()=>({error:e.statusText}));e.ok?(U(t.message??``),O()):(U(`Remove failed: ${w(t.error,`unknown error`)}`),W(!0))}catch(e){U(`Remove failed: ${C(e)}`),W(!0)}It(!1)}},Yt=async()=>{Rt(!0),K(``);try{let e=await fetch(`/plugins/signalk-questdb/api/resume-wal`,{method:`POST`}),t=await e.json().catch(()=>({error:e.statusText}));if(e.ok){let e=(t.results||[]).filter(e=>!e.ok);K(e.length===0?`${w(t.message,`Resume requested`)}. Recording resumes as the backlog drains — the banner clears once tables catch up.`:`${w(t.message,`Resume requested`)}. `+e.map(e=>`${e.table}: ${e.error}`).join(` · `)),O(),X()}else K(`Resume failed: ${w(t.error,`unknown error`)}`)}catch(e){K(`Resume failed: ${C(e)}`)}Rt(!1)},Xt=async()=>{Qe(!0),U(``);try{let e=A?`?url=${encodeURIComponent(A)}`:``,t=await fetch(`/plugins/signalk-questdb/api/migration/detect${e}`);if(t.ok){let e=ie(await t.json().catch(()=>null));Xe(e),e.length===0&&(U(A?`No InfluxDB found at ${A}.`:`No InfluxDB instances detected on localhost:8086.`),W(!1))}}catch(e){U(`Detection failed: `+C(e)),W(!0)}Qe(!1)},Z=i(()=>({token:tt||void 0,org:rt||void 0,username:at||void 0,password:st||void 0}),[tt,rt,at,st]),Zt=i(async(e,t=Z())=>{F(!0),U(``),N(``);try{let n=await fetch(`/plugins/signalk-questdb/api/migration/buckets`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({url:e.url,type:e.type,...t})}),r=await n.json().catch(()=>null),i=ae(r);ut(i),n.ok?i.length===0?(U(`No buckets found. InfluxDB 2.x needs an API token with read access.`),W(!0)):i.length===1&&N(i[0].name):(U(r?.error??`Could not list buckets.`),W(!0))}catch(e){U(`Could not list buckets: `+C(e)),W(!0)}F(!1)},[Z]),Qt=r(Z);n(()=>{Qt.current=Z},[Z]),n(()=>{if(ht(null),_t(``),mt(!1),!j||!M)return;let e=!1;return mt(!0),(async()=>{try{let t=await fetch(`/plugins/signalk-questdb/api/migration/contexts`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({url:j.url,type:j.type,bucket:M,...Qt.current()})}),n=await t.json().catch(()=>null);if(e)return;if(!t.ok){U(n?.error??`Could not list the vessels.`),W(!0);return}let r=ce(n);ht(r),_t(r.self??(r.contexts.length===1?r.contexts[0]:``))}catch(t){if(e)return;U(`Could not list the vessels: `+C(t)),W(!0)}finally{e||mt(!1)}})(),()=>{e=!0}},[j,M]);let $t=i(async()=>{if(j&&M){F(!0);try{let e=await fetch(`/plugins/signalk-questdb/api/migration/measurements`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({url:j.url,type:j.type,bucket:M,...Z()})}),t=await e.json().catch(()=>null),n=oe(t);dt(n),e.ok||(U(t?.error??`Could not list measurements.`),W(!0))}catch(e){U(`Could not list measurements: `+C(e)),W(!0)}F(!1)}},[j,M,Z]),en=async()=>{if(!j||!M)return;let e=ue(bt,St);if(`error`in e){U(e.error),W(!0);return}z(!0),U(``);try{let t=await fetch(`/plugins/signalk-questdb/api/migration/start`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({url:j.url,type:j.type,bucket:M,...Z(),from:e.from,to:e.to,sourceSelfContext:gt||void 0,others:vt?`keep`:`skip`})}),n=await t.json().catch(()=>null);t.ok?(R(x(n)??null),H(null)):(U(n?.error??`Could not start migration.`),W(!0))}catch(e){U(`Could not start migration: `+C(e)),W(!0)}z(!1)},tn=async()=>{z(!0),U(``),W(!1);try{let e=await fetch(`/plugins/signalk-questdb/api/migration/start`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({resume:!0,...Z()})}),t=await e.json().catch(()=>null);e.ok?(R(x(t)??null),H(null)):(U(t?.error??`Could not resume the import.`),W(!0))}catch(e){U(`Could not resume the import: `+C(e)),W(!0)}z(!1)},nn=async()=>{if(window.confirm(`Discard the saved position? The import will then start again from the beginning. Rows already imported are kept and are not duplicated.`)){U(``),W(!1);try{let e=await fetch(`/plugins/signalk-questdb/api/migration/discard`,{method:`POST`});if(e.ok)H(null);else{let t=await e.json().catch(()=>null);U(t?.error??`Could not discard the saved position.`),W(!0)}}catch(e){U(`Could not discard: `+C(e)),W(!0)}}},rn=async()=>{try{let e=await(await fetch(`/plugins/signalk-questdb/api/migration/cancel`,{method:`POST`})).json().catch(()=>null);R(x(e)??L)}catch(e){U(`Could not cancel: `+C(e)),W(!0)}};n(()=>{if(L?.state!==`running`)return;let e=!1,t,n=async()=>{try{let t=await fetch(`/plugins/signalk-questdb/api/migration/status`),n=await t.json().catch(()=>null),r=x(n);if(!e){if(r)R(r),H(le(n)??null);else if(t.ok){let e=le(n)??null;R(null),H(e),U(e?`The import stopped because the Signal K server restarted. It can be resumed from its saved position below.`:`The import stopped because the Signal K server restarted before a position was saved. Start it again — already-imported rows are not duplicated.`),W(!0)}}}catch{}e||(t=setTimeout(n,1e3))};return t=setTimeout(n,1e3),()=>{e=!0,clearTimeout(t)}},[L?.state]),n(()=>{let e=!1;return(async()=>{try{let t=await fetch(`/plugins/signalk-questdb/api/migration/legacy-rows`),{rows:n}=se(await t.json().catch(()=>null));!e&&t.ok&&Tt(n)}catch{}})(),()=>{e=!0}},[]);let an=async()=>{if(B&&window.confirm(`Remove ${d(B)} rows imported under suffixed paths?\n\nThis rebuilds the string table without them, which can take a few minutes on a large database. Recording continues meanwhile. Run the import again afterwards to get these rows under their real paths.`)){Dt(!0),U(``),W(!1);try{let e=await fetch(`/plugins/signalk-questdb/api/migration/legacy-rows/remove`,{method:`POST`}),t=await e.json().catch(()=>null);if(e.ok){let{rows:e,dropped:n}=se(t);Tt(0),U(`Removed ${d(e)} rows. Run the import again to get them under their real paths.`+(n>0?` ${d(n)} live samples could not be kept while the table was swapped.`:``)),n>0&&W(!0)}else U(t?.error??`Could not remove the rows.`),W(!0)}catch(e){U(`Could not remove the rows: `+C(e)),W(!0)}Dt(!1)}};n(()=>{let e=!1;return(async()=>{try{let t=await(await fetch(`/plugins/signalk-questdb/api/migration/status`)).json().catch(()=>null),n=x(t);if(e)return;n&&R(n),H(le(t)??null)}catch{}})(),()=>{e=!0}},[]);let[on,sn]=t(``),[cn,ln]=t(``),[un,dn]=t(`parquet`),[fn,pn]=t(!1),mn=()=>{let e=Number(Ae);if(Ae===``||!Number.isFinite(e)||e<500||e>3e5){U(`Write batch interval must be 500–300000 ms.`),W(!0);return}o({...s,questdbHost:c,questdbIlpPort:u,questdbHttpPort:h,questdbPgPort:ne,questdbVersion:de,managedContainer:T,defaultSamplingRate:Oe,ilpFlushIntervalMs:e,recordSelf:ge,recordOthers:ve,restoreOnStart:be,historySourcePolicyAll:we,enableConsole:Se,restoreMaxAgeMinutes:Ee,retentionDays:Me,compression:Re,compressionLevel:Be,networkName:He,exposeToContainers:E,pathFilter:{mode:Pe,paths:Ie.split(`
5
- `).map(e=>e.trim()).filter(Boolean)},samplingRates:s.samplingRates||{}}),U(`Saved! Plugin will restart with new configuration.`),W(!1)},hn=async()=>{if(!on||!cn){U(`Set both from and to dates for export.`),W(!0);return}pn(!0),U(`Exporting ${un.toUpperCase()}...`),W(!1);try{let e=`/plugins/signalk-questdb/api/export?from=${encodeURIComponent(on)}&to=${encodeURIComponent(cn)}&format=${un}`,t=await fetch(e);if(!t.ok){let e=await t.json().catch(()=>({error:t.statusText}));U(`Export failed: ${w(e.error,`unknown error`)}`),W(!0),pn(!1);return}let n=await t.blob(),r=un===`parquet`?`parquet`:`csv`,i=document.createElement(`a`);i.href=URL.createObjectURL(n),i.download=`signalk-export-${on.slice(0,10)}.${r}`,i.click(),URL.revokeObjectURL(i.href),U(`Exported ${(n.size/1024/1024).toFixed(1)} MB`)}catch(e){U(`Export failed: ${C(e)}`),W(!0)}pn(!1)},gn=D&&D.status===`running`,_n=gn&&D.suspendedTables||[],vn=_n.length>0,yn=gn&&D.schemaMismatch||!1,Q=gn&&D.ulimitClamp||null,bn=Q!==null&&Q.granted<=0,$=D?.hostMaxMapCount?.tooLow&&D.hostMaxMapCount||null;return e.createElement(`div`,{style:y.root},e.createElement(`div`,{style:y.sectionTitle},`QuestDB Status`),$&&e.createElement(`div`,{style:y.infoBanner},e.createElement(`div`,{style:y.warnBannerTitle},`Host vm.max_map_count is low — `,d($.current),` `,`(QuestDB recommends `,d($.recommended),`)`),`QuestDB memory-maps every partition and WAL segment it touches. As the database grows, this kernel limit can run out — mmap then fails with out-of-memory errors even though RAM is free, which shows up as slow or failing history queries, can suspend recording, and can take QuestDB down entirely. Run this in a shell on the host machine — not inside the QuestDB container, which can neither change the kernel-global limit nor has sudo (takes effect immediately, no restart needed):`,e.createElement(`code`,{style:y.warnBannerCode},`echo 'vm.max_map_count=${$.recommended}' | sudo tee /etc/sysctl.d/99-questdb.conf && sudo sysctl --system`)),Ye?e.createElement(`div`,{style:y.empty},`Checking QuestDB...`):gn?e.createElement(e.Fragment,null,vn&&e.createElement(`div`,{style:y.warnBanner},e.createElement(`div`,{style:y.warnBannerTitle},`QuestDB WAL suspended — recording stalled`),`Rows are arriving but no longer commit, so the counts below have stopped advancing. This follows an error while QuestDB applied the write-ahead log — see the reason reported per table below. Resuming replays every pending transaction, so no data is lost.`,e.createElement(`code`,{style:y.warnBannerCode},_n.map(e=>{let t=String(e.errorMessage||e.errorTag||`reason not reported`).replace(/[\r\n]+/g,` `),n=(q?.tables||[]).find(t=>t.name===e.name),r=n?.suspendedSince?` — frozen since ${n.suspendedSince}`:``;return`${e.name}: ${d(e.txnLag)} txns behind — ${t}${r}`}).join(`
6
- `)),(q?.tables||[]).filter(e=>e.applyError).map(t=>e.createElement(`div`,{key:t.name,style:{marginTop:8,fontSize:12}},`QuestDB's own log reports the apply failure on`,` `,e.createElement(`code`,null,t.name),` as:`,e.createElement(`code`,{style:y.warnBannerCode},t.applyError))),e.createElement(`div`,{style:{marginTop:10}},e.createElement(v,{variant:`primary`,busy:Lt,busyLabel:`Resuming...`,disabled:Ht,onClick:Yt},`Resume recording`)),_n.filter(e=>e.autoResume===`failed`).map(t=>{let n=(q?.tables||[]).find(e=>e.name===t.name);if(n?.partitionOpenFailure)return e.createElement(`div`,{key:t.name,style:{marginTop:12}},e.createElement(`div`,{style:y.warnBannerTitle},t.name,`: table data damaged — automatic repair not possible`),`QuestDB fails while opening this table's stored data, before it reaches any pending transaction. That means the commit record on disk describes rows whose data never made it to storage — the signature of a power loss during a write. Skipping transactions cannot fix this (the failure happens before them) and would discard the `,d(t.txnLag),` pending transactions for nothing, so no repair button is offered. Recovering this table means repairing its commit record by hand; please open an issue with the error above. Recording continues into the other tables, and “Resume recording” will re-suspend this one within milliseconds — it is safe to press, but it cannot repair this damage.`);let r=n?.skipPlan;return r?e.createElement(`div`,{key:t.name,style:{marginTop:12}},e.createElement(`div`,{style:y.warnBannerTitle},t.name,`: automatic resume failed — WAL segment unreadable`),`A lossless resume was attempted and the table re-suspended at the same transaction: the write-ahead-log segment at the stall point cannot be read back (typically corrupted by an unclean shutdown mid-write). Replaying can never get past it. The only repair is to skip the unreadable segment, losing`,` `,e.createElement(`b`,null,d(r.skippedTxns),` transaction(s)`),` `,`recorded between `,e.createElement(`b`,null,r.skipWindowStart),` and`,` `,e.createElement(`b`,null,r.skipWindowEnd),r.tailSkip?` — and this is the newest pending segment, so skipping it drops the ENTIRE pending backlog`:` — everything after the skipped segment (${d(Math.max(0,t.txnLag-r.skippedTxns))} txns) is replayed without loss`,`.`,e.createElement(`div`,{style:{marginTop:8}},e.createElement(v,{variant:`danger`,busy:Ht,busyLabel:`Skipping...`,disabled:Lt||Vt,onClick:()=>Gt(t.name,r)},`Skip unreadable segment (loses data)`),Vt&&e.createElement(`div`,{style:{marginTop:6,fontSize:12}},`The diagnosis could not be refreshed — the numbers above may be stale. The skip re-enables once a refresh succeeds.`))):null}),e.createElement(`div`,{style:{marginTop:8,fontSize:12}},`Manual fallback in the QuestDB SQL console (`,e.createElement(`code`,null,`:9000`),`), one statement at a time — avoid running it from several tabs, the console retries a busy statement forever:`,e.createElement(`code`,{style:y.warnBannerCode},_n.map(e=>{let t=`"${String(e.name).replace(/"/g,`""`)}"`,n=(q?.tables||[]).find(t=>t.name===e.name),r=[`ALTER TABLE ${t} RESUME WAL;`];return e.autoResume===`failed`&&n?.skipPlan&&!Vt&&r.push(`-- if the resume re-suspends: skip the unreadable segment (loses ${d(n.skipPlan.skippedTxns)} txns)`,`ALTER TABLE ${t} RESUME WAL FROM TXN ${n.skipPlan.skipToTxn};`),r.join(`
4
+ WARNING: this is the newest pending segment — skipping it drops the ENTIRE pending backlog.`:``;if(window.confirm(`Skip the unreadable WAL segment on ${e}?\n\nThis permanently loses ${d(t.skippedTxns)} transaction(s) recorded between ${t.skipWindowStart} and ${t.skipWindowEnd}. Everything after the skipped segment is replayed without loss.`+n)){Gt(!0),K(``);try{let n=await fetch(`/plugins/signalk-questdb/api/resume-wal/skip`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({table:e,confirmPlan:t})}),r=await n.json().catch(()=>({error:n.statusText}));n.ok?K(r.message??``):K(`Skip failed: ${w(r.error,`unknown error`)}`),O(),X()}catch(e){K(`Skip failed: ${C(e)}`)}Gt(!1)}},Jt=async()=>{Pt(!0);try{let e=await fetch(`/plugins/signalk-questdb/api/update/check`);e.ok&&Mt(await e.json())}catch{}Pt(!1)},Yt=async()=>{It(!0),U(`Pulling new image and restarting...`),W(!1);try{let e=await fetch(`/plugins/signalk-questdb/api/update/apply`,{method:`POST`});if(e.ok){let t=await e.json();U(t.message??``),Mt(null),t.newVersion&&me(t.newVersion),O()}else{let t=await e.json().catch(()=>({error:e.statusText}));U(`Update failed: ${w(t.error,`unknown error`)}`),W(!0)}}catch(e){U(`Update failed: ${C(e)}`),W(!0)}It(!1)},Xt=async()=>{if(window.confirm(`Remove the QuestDB container and DELETE ALL recorded data? This cannot be undone.`)){Rt(!0),U(`Removing QuestDB container and data...`),W(!1);try{let e=await fetch(`/plugins/signalk-questdb/api/purge-data`,{method:`POST`}),t=await e.json().catch(()=>({error:e.statusText}));e.ok?(U(t.message??``),O()):(U(`Remove failed: ${w(t.error,`unknown error`)}`),W(!0))}catch(e){U(`Remove failed: ${C(e)}`),W(!0)}Rt(!1)}},Zt=async()=>{Bt(!0),K(``);try{let e=await fetch(`/plugins/signalk-questdb/api/resume-wal`,{method:`POST`}),t=await e.json().catch(()=>({error:e.statusText}));if(e.ok){let e=(t.results||[]).filter(e=>!e.ok);K(e.length===0?`${w(t.message,`Resume requested`)}. Recording resumes as the backlog drains — the banner clears once tables catch up.`:`${w(t.message,`Resume requested`)}. `+e.map(e=>`${e.table}: ${e.error}`).join(` · `)),O(),X()}else K(`Resume failed: ${w(t.error,`unknown error`)}`)}catch(e){K(`Resume failed: ${C(e)}`)}Bt(!1)},Qt=async()=>{et(!0),U(``);try{let e=A?`?url=${encodeURIComponent(A)}`:``,t=await fetch(`/plugins/signalk-questdb/api/migration/detect${e}`);if(t.ok){let e=ie(await t.json().catch(()=>null));Qe(e),e.length===0&&(U(A?`No InfluxDB found at ${A}.`:`No InfluxDB instances detected on localhost:8086.`),W(!1))}}catch(e){U(`Detection failed: `+C(e)),W(!0)}et(!1)},Z=i(()=>({token:rt||void 0,org:at||void 0,username:st||void 0,password:lt||void 0}),[rt,at,st,lt]),$t=i(async(e,t=Z())=>{F(!0),U(``),N(``);try{let n=await fetch(`/plugins/signalk-questdb/api/migration/buckets`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({url:e.url,type:e.type,...t})}),r=await n.json().catch(()=>null),i=ae(r);ft(i),n.ok?i.length===0?(U(`No buckets found. InfluxDB 2.x needs an API token with read access.`),W(!0)):i.length===1&&N(i[0].name):(U(r?.error??`Could not list buckets.`),W(!0))}catch(e){U(`Could not list buckets: `+C(e)),W(!0)}F(!1)},[Z]),en=r(Z);n(()=>{en.current=Z},[Z]),n(()=>{if(_t(null),yt(``),gt(!1),!j||!M)return;let e=!1;return gt(!0),(async()=>{try{let t=await fetch(`/plugins/signalk-questdb/api/migration/contexts`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({url:j.url,type:j.type,bucket:M,...en.current()})}),n=await t.json().catch(()=>null);if(e)return;if(!t.ok){U(n?.error??`Could not list the vessels.`),W(!0);return}let r=ce(n);_t(r),yt(r.self??(r.contexts.length===1?r.contexts[0]:``))}catch(t){if(e)return;U(`Could not list the vessels: `+C(t)),W(!0)}finally{e||gt(!1)}})(),()=>{e=!0}},[j,M]);let tn=i(async()=>{if(j&&M){F(!0);try{let e=await fetch(`/plugins/signalk-questdb/api/migration/measurements`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({url:j.url,type:j.type,bucket:M,...Z()})}),t=await e.json().catch(()=>null),n=oe(t);pt(n),e.ok||(U(t?.error??`Could not list measurements.`),W(!0))}catch(e){U(`Could not list measurements: `+C(e)),W(!0)}F(!1)}},[j,M,Z]),nn=async()=>{if(!j||!M)return;let e=ue(St,wt);if(`error`in e){U(e.error),W(!0);return}z(!0),U(``);try{let t=await fetch(`/plugins/signalk-questdb/api/migration/start`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({url:j.url,type:j.type,bucket:M,...Z(),from:e.from,to:e.to,sourceSelfContext:vt||void 0,others:bt?`keep`:`skip`})}),n=await t.json().catch(()=>null);t.ok?(R(x(n)??null),H(null)):(U(n?.error??`Could not start migration.`),W(!0))}catch(e){U(`Could not start migration: `+C(e)),W(!0)}z(!1)},rn=async()=>{z(!0),U(``),W(!1);try{let e=await fetch(`/plugins/signalk-questdb/api/migration/start`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({resume:!0,...Z()})}),t=await e.json().catch(()=>null);e.ok?(R(x(t)??null),H(null)):(U(t?.error??`Could not resume the import.`),W(!0))}catch(e){U(`Could not resume the import: `+C(e)),W(!0)}z(!1)},an=async()=>{if(window.confirm(`Discard the saved position? The import will then start again from the beginning. Rows already imported are kept and are not duplicated.`)){U(``),W(!1);try{let e=await fetch(`/plugins/signalk-questdb/api/migration/discard`,{method:`POST`});if(e.ok)H(null);else{let t=await e.json().catch(()=>null);U(t?.error??`Could not discard the saved position.`),W(!0)}}catch(e){U(`Could not discard: `+C(e)),W(!0)}}},on=async()=>{try{let e=await(await fetch(`/plugins/signalk-questdb/api/migration/cancel`,{method:`POST`})).json().catch(()=>null);R(x(e)??L)}catch(e){U(`Could not cancel: `+C(e)),W(!0)}};n(()=>{if(L?.state!==`running`)return;let e=!1,t,n=async()=>{try{let t=await fetch(`/plugins/signalk-questdb/api/migration/status`),n=await t.json().catch(()=>null),r=x(n);if(!e){if(r)R(r),H(le(n)??null);else if(t.ok){let e=le(n)??null;R(null),H(e),U(e?`The import stopped because the Signal K server restarted. It can be resumed from its saved position below.`:`The import stopped because the Signal K server restarted before a position was saved. Start it again — already-imported rows are not duplicated.`),W(!0)}}}catch{}e||(t=setTimeout(n,1e3))};return t=setTimeout(n,1e3),()=>{e=!0,clearTimeout(t)}},[L?.state]),n(()=>{let e=!1;return(async()=>{try{let t=await fetch(`/plugins/signalk-questdb/api/migration/legacy-rows`),{rows:n}=se(await t.json().catch(()=>null));!e&&t.ok&&Dt(n)}catch{}})(),()=>{e=!0}},[]);let sn=async()=>{if(B&&window.confirm(`Remove ${d(B)} rows imported under suffixed paths?\n\nThis rebuilds the string table without them, which can take a few minutes on a large database. Recording continues meanwhile. Run the import again afterwards to get these rows under their real paths.`)){kt(!0),U(``),W(!1);try{let e=await fetch(`/plugins/signalk-questdb/api/migration/legacy-rows/remove`,{method:`POST`}),t=await e.json().catch(()=>null);if(e.ok){let{rows:e,dropped:n}=se(t);Dt(0),U(`Removed ${d(e)} rows. Run the import again to get them under their real paths.`+(n>0?` ${d(n)} live samples could not be kept while the table was swapped.`:``)),n>0&&W(!0)}else U(t?.error??`Could not remove the rows.`),W(!0)}catch(e){U(`Could not remove the rows: `+C(e)),W(!0)}kt(!1)}};n(()=>{let e=!1;return(async()=>{try{let t=await(await fetch(`/plugins/signalk-questdb/api/migration/status`)).json().catch(()=>null),n=x(t);if(e)return;n&&R(n),H(le(t)??null)}catch{}})(),()=>{e=!0}},[]);let[Q,cn]=t(``),[ln,un]=t(``),[dn,fn]=t(`parquet`),[pn,mn]=t(!1),hn=()=>{let e=Number(Ae);if(Ae===``||!Number.isFinite(e)||e<500||e>3e5){U(`Write batch interval must be 500–300000 ms.`),W(!0);return}let t=Number(Me);if(Me===``||!Number.isFinite(t)||t<0){U(`Unchanged-value heartbeat must be 0 or more seconds (0 = off).`),W(!0);return}o({...s,questdbHost:c,questdbIlpPort:u,questdbHttpPort:h,questdbPgPort:ne,questdbVersion:de,managedContainer:T,defaultSamplingRate:Oe,ilpFlushIntervalMs:e,unchangedHeartbeatSeconds:t,recordSelf:ge,recordOthers:ve,restoreOnStart:be,historySourcePolicyAll:we,enableConsole:Se,restoreMaxAgeMinutes:Ee,retentionDays:Pe,compression:Be,compressionLevel:He,networkName:We,exposeToContainers:E,pathFilter:{mode:Ie,paths:Re.split(`
5
+ `).map(e=>e.trim()).filter(Boolean)},samplingRates:s.samplingRates||{}}),U(`Saved! Plugin will restart with new configuration.`),W(!1)},gn=async()=>{if(!Q||!ln){U(`Set both from and to dates for export.`),W(!0);return}mn(!0),U(`Exporting ${dn.toUpperCase()}...`),W(!1);try{let e=`/plugins/signalk-questdb/api/export?from=${encodeURIComponent(Q)}&to=${encodeURIComponent(ln)}&format=${dn}`,t=await fetch(e);if(!t.ok){let e=await t.json().catch(()=>({error:t.statusText}));U(`Export failed: ${w(e.error,`unknown error`)}`),W(!0),mn(!1);return}let n=await t.blob(),r=dn===`parquet`?`parquet`:`csv`,i=document.createElement(`a`);i.href=URL.createObjectURL(n),i.download=`signalk-export-${Q.slice(0,10)}.${r}`,i.click(),URL.revokeObjectURL(i.href),U(`Exported ${(n.size/1024/1024).toFixed(1)} MB`)}catch(e){U(`Export failed: ${C(e)}`),W(!0)}mn(!1)},_n=D&&D.status===`running`,vn=_n&&D.suspendedTables||[],yn=vn.length>0,bn=_n&&D.schemaMismatch||!1,$=_n&&D.ulimitClamp||null,xn=$!==null&&$.granted<=0,Sn=D?.hostMaxMapCount?.tooLow&&D.hostMaxMapCount||null;return e.createElement(`div`,{style:y.root},e.createElement(`div`,{style:y.sectionTitle},`QuestDB Status`),Sn&&e.createElement(`div`,{style:y.infoBanner},e.createElement(`div`,{style:y.warnBannerTitle},`Host vm.max_map_count is low — `,d(Sn.current),` `,`(QuestDB recommends `,d(Sn.recommended),`)`),`QuestDB memory-maps every partition and WAL segment it touches. As the database grows, this kernel limit can run out — mmap then fails with out-of-memory errors even though RAM is free, which shows up as slow or failing history queries, can suspend recording, and can take QuestDB down entirely. Run this in a shell on the host machine — not inside the QuestDB container, which can neither change the kernel-global limit nor has sudo (takes effect immediately, no restart needed):`,e.createElement(`code`,{style:y.warnBannerCode},`echo 'vm.max_map_count=${Sn.recommended}' | sudo tee /etc/sysctl.d/99-questdb.conf && sudo sysctl --system`)),Ze?e.createElement(`div`,{style:y.empty},`Checking QuestDB...`):_n?e.createElement(e.Fragment,null,yn&&e.createElement(`div`,{style:y.warnBanner},e.createElement(`div`,{style:y.warnBannerTitle},`QuestDB WAL suspended — recording stalled`),`Rows are arriving but no longer commit, so the counts below have stopped advancing. This follows an error while QuestDB applied the write-ahead log — see the reason reported per table below. Resuming replays every pending transaction, so no data is lost.`,e.createElement(`code`,{style:y.warnBannerCode},vn.map(e=>{let t=String(e.errorMessage||e.errorTag||`reason not reported`).replace(/[\r\n]+/g,` `),n=(q?.tables||[]).find(t=>t.name===e.name),r=n?.suspendedSince?` — frozen since ${n.suspendedSince}`:``;return`${e.name}: ${d(e.txnLag)} txns behind — ${t}${r}`}).join(`
6
+ `)),(q?.tables||[]).filter(e=>e.applyError).map(t=>e.createElement(`div`,{key:t.name,style:{marginTop:8,fontSize:12}},`QuestDB's own log reports the apply failure on`,` `,e.createElement(`code`,null,t.name),` as:`,e.createElement(`code`,{style:y.warnBannerCode},t.applyError))),e.createElement(`div`,{style:{marginTop:10}},e.createElement(v,{variant:`primary`,busy:zt,busyLabel:`Resuming...`,disabled:Wt,onClick:Zt},`Resume recording`)),vn.filter(e=>e.autoResume===`failed`).map(t=>{let n=(q?.tables||[]).find(e=>e.name===t.name);if(n?.partitionOpenFailure)return e.createElement(`div`,{key:t.name,style:{marginTop:12}},e.createElement(`div`,{style:y.warnBannerTitle},t.name,`: table data damaged — automatic repair not possible`),`QuestDB fails while opening this table's stored data, before it reaches any pending transaction. That means the commit record on disk describes rows whose data never made it to storage — the signature of a power loss during a write. Skipping transactions cannot fix this (the failure happens before them) and would discard the `,d(t.txnLag),` pending transactions for nothing, so no repair button is offered. Recovering this table means repairing its commit record by hand; please open an issue with the error above. Recording continues into the other tables, and “Resume recording” will re-suspend this one within milliseconds — it is safe to press, but it cannot repair this damage.`);let r=n?.skipPlan;return r?e.createElement(`div`,{key:t.name,style:{marginTop:12}},e.createElement(`div`,{style:y.warnBannerTitle},t.name,`: automatic resume failed — WAL segment unreadable`),`A lossless resume was attempted and the table re-suspended at the same transaction: the write-ahead-log segment at the stall point cannot be read back (typically corrupted by an unclean shutdown mid-write). Replaying can never get past it. The only repair is to skip the unreadable segment, losing`,` `,e.createElement(`b`,null,d(r.skippedTxns),` transaction(s)`),` `,`recorded between `,e.createElement(`b`,null,r.skipWindowStart),` and`,` `,e.createElement(`b`,null,r.skipWindowEnd),r.tailSkip?` — and this is the newest pending segment, so skipping it drops the ENTIRE pending backlog`:` — everything after the skipped segment (${d(Math.max(0,t.txnLag-r.skippedTxns))} txns) is replayed without loss`,`.`,e.createElement(`div`,{style:{marginTop:8}},e.createElement(v,{variant:`danger`,busy:Wt,busyLabel:`Skipping...`,disabled:zt||Ut,onClick:()=>qt(t.name,r)},`Skip unreadable segment (loses data)`),Ut&&e.createElement(`div`,{style:{marginTop:6,fontSize:12}},`The diagnosis could not be refreshed — the numbers above may be stale. The skip re-enables once a refresh succeeds.`))):null}),e.createElement(`div`,{style:{marginTop:8,fontSize:12}},`Manual fallback in the QuestDB SQL console (`,e.createElement(`code`,null,`:9000`),`), one statement at a time — avoid running it from several tabs, the console retries a busy statement forever:`,e.createElement(`code`,{style:y.warnBannerCode},vn.map(e=>{let t=`"${String(e.name).replace(/"/g,`""`)}"`,n=(q?.tables||[]).find(t=>t.name===e.name),r=[`ALTER TABLE ${t} RESUME WAL;`];return e.autoResume===`failed`&&n?.skipPlan&&!Ut&&r.push(`-- if the resume re-suspends: skip the unreadable segment (loses ${d(n.skipPlan.skippedTxns)} txns)`,`ALTER TABLE ${t} RESUME WAL FROM TXN ${n.skipPlan.skipToTxn};`),r.join(`
7
7
  `)}).join(`
8
- `)))),zt&&e.createElement(`div`,{style:y.infoBanner},zt),yn&&e.createElement(`div`,{style:y.warnBanner},e.createElement(`div`,{style:y.warnBannerTitle},`QuestDB table schema mismatch — data not readable`),`A QuestDB table was re-created by ILP ingestion with the wrong timestamp column, so rows are being stored but reads filtering on time (history, Grafana, and the counts above) return nothing. The plugin rebuilds the affected table with the correct schema automatically within a minute; if this persists, restart the plugin. (The few rows written into the wrong-schema table are lost — they were unreadable anyway.)`),Q&&e.createElement(`div`,{style:y.infoBanner},e.createElement(`div`,{style:y.warnBannerTitle},bn?`QuestDB open-files request rejected by the host`:`QuestDB open-files limit capped by the host`),bn?e.createElement(e.Fragment,null,`QuestDB requested a `,e.createElement(`code`,null,Q.ulimit),` limit of`,` `,d(Q.requested),`, but the container host rejected it, so QuestDB is running with the runtime's default limits. This is typical for podman machine on macOS, where the limits live inside the VM and cannot be read from here. Raise the limits of the service that runs the container runtime (on macOS: inside the VM, via`,` `,e.createElement(`code`,null,`podman machine ssh`),`), then remove the container once with `,e.createElement(`code`,null,`podman rm -f sk-signalk-questdb`),` and restart Signal K — a restart alone cannot re-grant a rejected ask.`):e.createElement(e.Fragment,null,`QuestDB requested a `,e.createElement(`code`,null,Q.ulimit),` limit of`,` `,d(Q.requested),`, but this host only allows `,d(Q.granted),`, so it was capped. QuestDB is running on the lower limit. To grant the full value, raise the host limit for the user running the container runtime — under rootless Podman that means a systemd`,` `,e.createElement(`code`,null,`user@.service`),` `,e.createElement(`code`,null,`LimitNOFILE`),` drop-in (editing `,e.createElement(`code`,null,`/etc/security/limits.conf`),` alone is usually not enough) — then restart the Signal K server so the plugin can re-create the QuestDB container with the raised limit (signalk-container 1.25.3+; on older versions remove the container once with`,` `,e.createElement(`code`,null,`podman rm -f sk-signalk-questdb`),` instead).`),` `,`This warning clears itself once the container is running with the full value.`,` `,e.createElement(`a`,{href:bn?`https://github.com/dirkwa/signalk-questdb#questdb-container-never-starts-on-macos-podman-machine`:`https://github.com/dirkwa/signalk-container#raising-the-open-files-limit-nofile`,target:`_blank`,rel:`noreferrer`,style:{color:`#92400e`,textDecoration:`underline`}},`Step-by-step instructions`),`.`),e.createElement(ee,{icon:`Q`,iconBackground:`#7c3aed`,iconColor:`#fff`,title:`QuestDB`,meta:e.createElement(e.Fragment,null,D?.endpoint||`${c}:${h}`,` `,`· `,vn?`WAL suspended`:`Recording`),state:vn?`error`:`ok`,stateTitle:vn?`WAL suspended`:`Running`}),e.createElement(`div`,{style:y.statsGrid},e.createElement(`div`,{style:y.statCard},e.createElement(`div`,{style:y.statValue},d(D.totalRows)),e.createElement(`div`,{style:y.statLabel},`Total Rows`)),e.createElement(`div`,{style:y.statCard},e.createElement(`div`,{style:y.statValue},d(D.activePathsToday)),e.createElement(`div`,{style:y.statLabel},`Active Paths Today`)),D.restore&&e.createElement(`div`,{style:y.statCard},e.createElement(`div`,{style:y.statValue},D.restore.failed?`—`:d(D.restore.contexts)),e.createElement(`div`,{style:y.statLabel},D.restore.failed?`Restore failed`:`Vessels Restored`))),e.createElement(`div`,{style:{display:`flex`,alignItems:`center`,gap:10,marginBottom:12}},G&&G.updateAvailable?e.createElement(e.Fragment,null,e.createElement(`span`,{style:{fontSize:13}},`v`,G.currentVersion,` →`,` `,e.createElement(`strong`,null,`v`,G.latestVersion),` available`),e.createElement(v,{variant:`primary`,busy:Nt,busyLabel:`Updating...`,onClick:qt,style:fe},`Update QuestDB`)):G&&!G.updateAvailable?e.createElement(`span`,{style:{fontSize:12,color:`#888`}},`v`,G.currentVersion,` (up to date)`):e.createElement(v,{variant:`secondary`,busy:jt,busyLabel:`Checking...`,onClick:Kt,style:fe},`Check for updates`))):e.createElement(ee,{icon:`Q`,title:`QuestDB`,meta:e.createElement(e.Fragment,null,D?.status===`unhealthy`?`Not responding`:`Not running`,T?` — enable plugin to start container`:``),state:`error`}),e.createElement(`div`,{style:y.sectionTitle},`Image Version`),e.createElement(`div`,{style:y.fieldRow},e.createElement(`span`,{style:y.label},`QuestDB version`),e.createElement(re,{value:de,onChange:me,versions:Ge,loading:qe,onRefresh:()=>void Je(),error:Ke,stableCount:3,preCount:2})),e.createElement(`div`,{style:y.sectionTitle},`Connection`),e.createElement(`div`,{style:y.fieldRow},e.createElement(`span`,{style:y.label},`Managed container`),e.createElement(`input`,{type:`checkbox`,style:y.checkbox,checked:T,onChange:e=>he(e.target.checked)}),e.createElement(`span`,{style:y.hint},T?`signalk-container manages QuestDB`:`Connect to external QuestDB`)),!T&&e.createElement(e.Fragment,null,e.createElement(`div`,{style:y.fieldRow},e.createElement(`span`,{style:y.label},`QuestDB host`),e.createElement(`input`,{style:y.input,value:c,onChange:e=>l(e.target.value)})),e.createElement(`div`,{style:y.fieldRow},e.createElement(`span`,{style:y.label},`HTTP port (queries)`),e.createElement(`input`,{style:y.inputSmall,type:`number`,value:h,onChange:e=>_(Number(e.target.value))})),e.createElement(`div`,{style:y.fieldRow},e.createElement(`span`,{style:y.label},`ILP port (writes)`),e.createElement(`input`,{style:y.inputSmall,type:`number`,value:u,onChange:e=>m(Number(e.target.value))}))),T&&e.createElement(`div`,{style:y.fieldRow},e.createElement(`span`,{style:y.label},`Bind to 0.0.0.0`),e.createElement(`input`,{type:`checkbox`,style:y.checkbox,checked:E,onChange:e=>We(e.target.checked)}),e.createElement(`span`,{style:{...y.hint,color:E?`#ef4444`:void 0}},E?`Caution! This exposes your data to the network`:`Signal K reaches QuestDB automatically — only enable to reach it from another machine or a separate-Docker Grafana`)),T&&E&&e.createElement(e.Fragment,null,e.createElement(`div`,{style:y.fieldRow},e.createElement(`span`,{style:y.label},`HTTP port (queries)`),e.createElement(`input`,{style:y.inputSmall,type:`number`,value:h,onChange:e=>_(Number(e.target.value))})),e.createElement(`div`,{style:y.fieldRow},e.createElement(`span`,{style:y.label},`ILP port (writes)`),e.createElement(`input`,{style:y.inputSmall,type:`number`,value:u,onChange:e=>m(Number(e.target.value))})),e.createElement(`div`,{style:y.fieldRow},e.createElement(`span`,{style:y.label},`PostgreSQL wire port`),e.createElement(`input`,{style:y.inputSmall,type:`number`,value:ne,onChange:e=>b(Number(e.target.value))}),e.createElement(`span`,{style:y.hint},`for Grafana`)),e.createElement(`div`,{style:y.fieldRow},e.createElement(`span`,{style:y.label},`Container network`),e.createElement(`input`,{style:y.input,value:He,onChange:e=>Ue(e.target.value)}),e.createElement(`span`,{style:y.hint},`shared with signalk-grafana`))),e.createElement(`div`,{style:y.sectionTitle},`Recording`),e.createElement(`div`,{style:y.fieldRow},e.createElement(`span`,{style:y.label},`Default sampling rate (ms)`),e.createElement(`input`,{style:y.inputSmall,type:`number`,value:Oe,onChange:e=>ke(Number(e.target.value))}),e.createElement(`span`,{style:y.hint},`1000 = max 1 write/sec per path (0 = every update)`)),e.createElement(`div`,{style:y.fieldRow},e.createElement(`span`,{style:y.label},`Write batch interval (ms)`),e.createElement(`input`,{style:y.inputSmall,type:`number`,min:500,max:3e5,"aria-label":`Write batch interval in milliseconds`,value:Ae,onChange:e=>je(e.target.value)}),e.createElement(`span`,{style:y.hint},`one QuestDB transaction per table per interval; longer = bigger batches, but up to this many ms lost on a hard crash (default 5000)`)),e.createElement(`div`,{style:y.fieldRow},e.createElement(`span`,{style:y.label},`Record own vessel`),e.createElement(`input`,{type:`checkbox`,style:y.checkbox,checked:ge,onChange:e=>_e(e.target.checked)})),e.createElement(`div`,{style:y.fieldRow},e.createElement(`span`,{style:y.label},`Record AIS targets`),e.createElement(`input`,{type:`checkbox`,style:y.checkbox,checked:ve,onChange:e=>ye(e.target.checked)})),e.createElement(`div`,{style:y.fieldRow},e.createElement(`span`,{style:y.label},`Restore vessels on startup`),e.createElement(`input`,{type:`checkbox`,style:y.checkbox,"aria-label":`Restore vessels on startup`,checked:be,onChange:e=>xe(e.target.checked)}),e.createElement(`span`,{style:y.hint},`replay each vessel's last recorded position after a restart, so AIS targets appear at once instead of only when they next transmit`)),e.createElement(`div`,{style:y.fieldRow},e.createElement(`span`,{style:y.label},`Allow sourcePolicy=all`),e.createElement(`input`,{type:`checkbox`,style:y.checkbox,"aria-label":`Allow sourcePolicy=all in the History API`,checked:we,onChange:e=>Te(e.target.checked)}),e.createElement(`span`,{style:y.hint},`let History API callers split a path into one column per recording source. Off by default: a path recorded by four receivers becomes four queries and four columns, which is markedly more work on a Pi-class host. Requests that name a source explicitly are unaffected`)),e.createElement(`div`,{style:y.fieldRow},e.createElement(`span`,{style:y.label},`QuestDB console webapp`),e.createElement(`input`,{type:`checkbox`,style:y.checkbox,"aria-label":`QuestDB console webapp`,checked:Se,onChange:e=>Ce(e.target.checked)}),e.createElement(`span`,{style:y.hint},`serve QuestDB's own console inside the Signal K admin UI (admin only). It is a full SQL client — unlike the read-only query endpoint it can modify and delete recorded data`)),be&&e.createElement(`div`,{style:y.fieldRow},e.createElement(`span`,{style:y.label},`Restore max age (minutes)`),e.createElement(`input`,{style:y.inputSmall,type:`number`,min:1,"aria-label":`Restore max age (minutes)`,value:Ee,onChange:e=>{let t=Number(e.target.value);Number.isFinite(t)&&t>=1&&De(t)}}),e.createElement(`span`,{style:y.hint},`only replay values this recent (default 9, matching Freeboard's AIS expiry); higher puts staler positions on the chart`)),e.createElement(`div`,{style:y.fieldRow},e.createElement(`span`,{style:y.label},`Retention (days)`),e.createElement(`input`,{style:y.inputSmall,type:`number`,value:Me,onChange:e=>Ne(Number(e.target.value))}),e.createElement(`span`,{style:y.hint},`0 = keep forever`)),e.createElement(g,{title:`Path filtering`,defaultOpen:Ie.trim()!==``},e.createElement(`div`,{style:y.fieldRow},e.createElement(`span`,{style:y.label},`Filter mode`),e.createElement(`select`,{style:y.select,value:Pe,onChange:e=>Fe(e.target.value===`include`?`include`:`exclude`)},e.createElement(`option`,{value:`exclude`},`Exclude matching paths`),e.createElement(`option`,{value:`include`},`Include only matching paths`))),e.createElement(`div`,{style:{marginBottom:10}},e.createElement(`div`,{style:{...y.label,width:`auto`,marginBottom:6}},`Path patterns (one per line, glob supported) — optional`),e.createElement(`textarea`,{style:y.textarea,value:Ie,onChange:e=>Le(e.target.value),placeholder:`notifications.*
9
- environment.wind.*`}),e.createElement(`div`,{style:y.fieldHelp},`Empty = record everything (the default). Nothing is filtered out unless you list a pattern here.`),e.createElement(`div`,{style:{...y.hint,marginLeft:0}},Pe===`exclude`?`These paths are NOT recorded; everything else is.`:`ONLY these paths are recorded; everything else is dropped.`))),e.createElement(g,{title:`Compression (on-disk)`},e.createElement(`div`,{style:y.fieldRow},e.createElement(`span`,{style:y.label},`Compression codec`),e.createElement(`select`,{style:y.select,value:Re,onChange:e=>ze(pe(e.target.value))},e.createElement(`option`,{value:`none`},`None`),e.createElement(`option`,{value:`lz4`},`LZ4 (fast)`),e.createElement(`option`,{value:`zstd`},`ZSTD (smaller)`)),e.createElement(`span`,{style:y.hint},`applies to new data after save`)),Re===`zstd`&&e.createElement(`div`,{style:y.fieldRow},e.createElement(`span`,{style:y.label},`ZSTD level`),e.createElement(`input`,{style:y.inputSmall,type:`number`,min:`1`,max:`22`,value:Be,onChange:e=>Ve(Number(e.target.value))}),e.createElement(`span`,{style:y.hint},`1 (fast) to 22 (smallest)`))),e.createElement(g,{title:`InfluxDB Migration`},B!==null&&B>0&&e.createElement(`div`,{style:{...y.empty,padding:`12px`,textAlign:`left`,marginBottom:12}},e.createElement(`div`,null,e.createElement(`strong`,null,d(B),` rows from an earlier import`),` `,`sit under paths nothing reads`),e.createElement(`div`,{style:y.fieldHelp},`Imports made before 2.1.5 from a signalk-to-influxdb 1.x database filed strings, booleans and positions under paths ending in`,` `,e.createElement(`code`,null,`.stringValue`),`, `,e.createElement(`code`,null,`.boolValue`),` or`,` `,e.createElement(`code`,null,`.jsonValue`),`. Removing them rebuilds the string table without them; run the import again afterwards and they land under their real paths.`),e.createElement(`div`,{style:{...y.migrationActions,marginTop:10}},e.createElement(v,{variant:`danger`,busy:Et,busyLabel:`Removing...`,disabled:L?.state===`running`,onClick:an},`Remove these rows`))),V&&L?.state!==`running`&&e.createElement(`div`,{style:{...y.empty,padding:`12px`,textAlign:`left`,marginBottom:12}},e.createElement(`div`,null,e.createElement(`strong`,null,`An import was interrupted`),` — ${V.bucket} from ${V.url}`),e.createElement(`div`,{style:y.cardMeta},S(V.from),` to`,` `,S(V.to),`.`,` `,V.measurementsDone,` measurements finished`,V.measurement?`, stopped in ${V.measurement}`+(V.windowStart?` at ${S(V.windowStart)}`:``):``,`. Position saved `,S(V.updatedAt),`.`),e.createElement(`div`,{style:y.fieldHelp},`Resuming continues from the saved position; rows already imported are not duplicated. If InfluxDB needs credentials, select the instance and enter them first — they are never stored.`),e.createElement(`div`,{style:{...y.migrationActions,marginTop:10}},e.createElement(v,{variant:`primary`,busy:wt,busyLabel:`Resuming...`,onClick:tn},`Resume import`),e.createElement(v,{variant:`danger`,onClick:nn},`Discard saved position`))),e.createElement(`div`,{style:{display:`flex`,gap:10,alignItems:`center`,marginBottom:10}},e.createElement(v,{variant:`primary`,busy:Ze,busyLabel:`Detecting...`,onClick:Xt},`Detect InfluxDB`),e.createElement(`span`,{style:y.hint},`Checks localhost:8086 for InfluxDB 1.x and 2.x`)),k&&k.length>0&&e.createElement(`div`,null,k.map((t,n)=>{let r=j?.url===t.url&&j?.type===t.type,i=()=>{et(t),ut(null),N(``),dt(null),nt(``),it(``),ot(``),ct(``),t.type!==`influxdb2`&&Zt(t,{token:void 0,org:void 0,username:void 0,password:void 0})};return e.createElement(`div`,{key:n,role:`button`,tabIndex:0,"aria-pressed":r,style:{...y.migrationItem,cursor:`pointer`,outline:r?`2px solid #22adf6`:void 0},onClick:i,onKeyDown:e=>{(e.key===`Enter`||e.key===` `)&&(e.preventDefault(),i())}},e.createElement(`div`,{style:{...y.cardIcon,width:36,height:36,fontSize:16,background:t.type===`influxdb2`?`#020a47`:`#22adf6`,color:`#fff`}},t.type===`influxdb2`?`2`:`1`),e.createElement(`div`,{style:y.cardInfo},e.createElement(`div`,{style:y.cardTitle},`InfluxDB `,t.type===`influxdb2`?`2.x`:`1.x`,e.createElement(`span`,{style:{...y.tag,...y.tagLatest}},t.status)),e.createElement(`div`,{style:y.cardMeta},t.url,` · v`,t.version)),e.createElement(`div`,{style:y.cardMeta},r?`selected`:`click to select`))})),e.createElement(`div`,{style:{...y.fieldRow,marginTop:10}},e.createElement(`span`,{style:y.label},`Manual InfluxDB URL`),e.createElement(`input`,{style:y.input,placeholder:`http://192.168.1.100:8086`,"aria-label":`Manual InfluxDB URL`,value:A,onChange:e=>$e(e.target.value)}),e.createElement(`span`,{style:y.hint},`for remote instances`)),k&&k.length===0&&!Ze&&e.createElement(`div`,{style:{...y.empty,padding:`16px`,textAlign:`left`}},`No InfluxDB found on localhost. Use manual URL above for remote instances.`),j&&e.createElement(`div`,{style:{marginTop:14}},e.createElement(`div`,{style:y.fieldHelp},j.type===`influxdb2`?`InfluxDB 2.x needs an API token with read access to the bucket, and the organisation name.`:`InfluxDB 1.x needs a username and password only if the server has authentication enabled.`),j.type===`influxdb2`?e.createElement(e.Fragment,null,e.createElement(`div`,{style:y.fieldRow},e.createElement(`span`,{style:y.label},`API token`),e.createElement(`input`,{style:y.input,type:`password`,"aria-label":`InfluxDB API token`,value:tt,onChange:e=>nt(e.target.value)}),e.createElement(`span`,{style:y.hint},`not stored`)),e.createElement(`div`,{style:y.fieldRow},e.createElement(`span`,{style:y.label},`Organisation`),e.createElement(`input`,{style:y.input,"aria-label":`InfluxDB organisation`,value:rt,onChange:e=>it(e.target.value)}))):e.createElement(e.Fragment,null,e.createElement(`div`,{style:y.fieldRow},e.createElement(`span`,{style:y.label},`Username`),e.createElement(`input`,{style:y.input,"aria-label":`InfluxDB username`,value:at,onChange:e=>ot(e.target.value)}),e.createElement(`span`,{style:y.hint},`blank if auth is off`)),e.createElement(`div`,{style:y.fieldRow},e.createElement(`span`,{style:y.label},`Password`),e.createElement(`input`,{style:y.input,type:`password`,"aria-label":`InfluxDB password`,value:st,onChange:e=>ct(e.target.value)}),e.createElement(`span`,{style:y.hint},`not stored`))),e.createElement(`div`,{style:{...y.fieldRow,marginTop:4}},e.createElement(`span`,{style:y.label}),e.createElement(v,{busy:ft,busyLabel:`Loading...`,onClick:()=>void Zt(j)},j.type===`influxdb2`?`List buckets`:`List databases`)),lt&&lt.length>0&&e.createElement(`div`,{style:y.fieldRow},e.createElement(`span`,{style:y.label},j.type===`influxdb2`?`Bucket`:`Database`),e.createElement(`select`,{style:y.select,"aria-label":`InfluxDB bucket or database to import from`,value:M,onChange:e=>{N(e.target.value),dt(null)}},e.createElement(`option`,{value:``},`Select...`),lt.map(t=>e.createElement(`option`,{key:t.name,value:t.name},t.name))),e.createElement(v,{busy:ft,busyLabel:`...`,onClick:()=>void $t()},`Preview paths`)),pt&&e.createElement(`div`,{style:y.fieldHelp},`Listing the vessels in the bucket... On a large bucket this takes a while; the import waits for it.`),I&&I.contexts.length>0&&e.createElement(e.Fragment,null,e.createElement(`div`,{style:y.fieldRow},e.createElement(`span`,{style:y.label},`Your vessel`),e.createElement(`select`,{style:y.select,"aria-label":`Which vessel in the source is this one`,value:gt,onChange:e=>_t(e.target.value)},I.contexts.length>1&&e.createElement(`option`,{value:``},`Select...`),I.contexts.map(t=>e.createElement(`option`,{key:t,value:t},t,t===I.self?I.selfBy===`tag`?` (recorded as the own vessel)`:` (this server)`:``)))),I.contexts.length>1&&e.createElement(e.Fragment,null,!I.self&&e.createElement(`div`,{style:y.fieldHelp},`The source holds `,I.contexts.length,` `,`vessels, does not say which was its own, and none of them is this server's identity. Pick the one the recording server used for this boat; its history is imported as this vessel.`),e.createElement(`label`,{style:{...y.fieldHelp,display:`block`}},e.createElement(`input`,{type:`checkbox`,checked:vt,onChange:e=>yt(e.target.checked)}),` `,`Also import the other vessels (AIS targets), each under its own context`))),P&&e.createElement(`div`,{style:y.fieldHelp},P.length,` measurement`,P.length===1?``:`s`,` found`,P.length>0&&e.createElement(e.Fragment,null,` `,`— e.g.`,` `,P.slice(0,3).map(e=>e.name).join(`, `),P.length>3?`, ...`:``)),e.createElement(`div`,{style:y.fieldRow},e.createElement(`span`,{style:y.label},`From`),e.createElement(`input`,{style:y.input,type:`datetime-local`,"aria-label":`Import range start`,value:bt,onChange:e=>xt(e.target.value)})),e.createElement(`div`,{style:y.fieldRow},e.createElement(`span`,{style:y.label},`To`),e.createElement(`input`,{style:y.input,type:`datetime-local`,"aria-label":`Import range end`,value:St,onChange:e=>Ct(e.target.value)})),e.createElement(`div`,{style:y.fieldHelp},`Imported rows are tagged `,e.createElement(`code`,null,`source=influxdb-import`),` and written with their original timestamps, so re-running the same range overwrites rather than duplicating.`),e.createElement(`div`,{style:{...y.migrationActions,marginTop:10}},e.createElement(v,{variant:`primary`,busy:wt,busyLabel:`Starting...`,disabled:!M||!bt||!St||pt||(I?.contexts.length??0)>1&&!gt||L?.state===`running`,onClick:en},`Start import`),L?.state===`running`&&e.createElement(v,{variant:`danger`,onClick:rn},`Cancel`))),L&&e.createElement(`div`,{style:{...y.empty,padding:`12px`,textAlign:`left`}},e.createElement(`div`,null,e.createElement(`strong`,null,L.state===`running`?`Importing`:L.state===`done`?`Import complete`:L.state===`cancelled`?`Import cancelled`:`Import failed`),L.bucket?` from ${L.bucket}`:``),L.resumedFrom&&e.createElement(`div`,{style:y.cardMeta},`Resumed`,L.resumedFrom.measurement?` in ${L.resumedFrom.measurement}`+(L.resumedFrom.windowStart?` at ${S(L.resumedFrom.windowStart)}`:``):` from the saved position`,`; the totals include the earlier run.`),e.createElement(`div`,{style:y.cardMeta},d(L.progress.written),` written,`,` `,d(L.progress.skipped),` skipped,`,` `,L.progress.measurementsDone,`/`,L.progress.measurementsTotal,` measurements`,L.progress.currentMeasurement?` — ${L.progress.currentMeasurement}`:``),L.error&&e.createElement(`div`,{style:{...y.cardMeta,color:`#b91c1c`}},L.error))),e.createElement(g,{title:`Data Export`},e.createElement(`div`,{style:y.fieldRow},e.createElement(`span`,{style:y.label},`From`),e.createElement(`input`,{style:y.input,type:`datetime-local`,value:on,onChange:e=>sn(e.target.value)})),e.createElement(`div`,{style:y.fieldRow},e.createElement(`span`,{style:y.label},`To`),e.createElement(`input`,{style:y.input,type:`datetime-local`,value:cn,onChange:e=>ln(e.target.value)})),e.createElement(`div`,{style:y.fieldRow},e.createElement(`span`,{style:y.label},`Format`),e.createElement(`select`,{style:y.select,value:un,onChange:e=>dn(e.target.value)},e.createElement(`option`,{value:`parquet`},`Parquet`),e.createElement(`option`,{value:`csv`},`CSV`))),e.createElement(v,{variant:`primary`,busy:fn,busyLabel:`Exporting...`,onClick:hn},`Export Data`)),s.managedContainer!==!1&&e.createElement(g,{title:`Danger zone`},e.createElement(`div`,{style:{fontSize:13,color:`#555`,marginBottom:10}},`Remove the QuestDB container and permanently delete all recorded data. Use this to fully reset QuestDB — Signal K's plugin-uninstall cannot delete this data on rootless Podman. This cannot be undone.`),e.createElement(v,{variant:`danger`,busy:Ft,busyLabel:`Removing...`,onClick:Jt},`Remove container & all data`)),e.createElement(te,{message:Ot,error:kt,style:{marginTop:16}}),e.createElement(`div`,{style:{marginTop:24}},e.createElement(v,{onClick:mn},`Save Configuration`)))}export{me as default};
8
+ `)))),Vt&&e.createElement(`div`,{style:y.infoBanner},Vt),bn&&e.createElement(`div`,{style:y.warnBanner},e.createElement(`div`,{style:y.warnBannerTitle},`QuestDB table schema mismatch — data not readable`),`A QuestDB table was re-created by ILP ingestion with the wrong timestamp column, so rows are being stored but reads filtering on time (history, Grafana, and the counts above) return nothing. The plugin rebuilds the affected table with the correct schema automatically within a minute; if this persists, restart the plugin. (The few rows written into the wrong-schema table are lost — they were unreadable anyway.)`),$&&e.createElement(`div`,{style:y.infoBanner},e.createElement(`div`,{style:y.warnBannerTitle},xn?`QuestDB open-files request rejected by the host`:`QuestDB open-files limit capped by the host`),xn?e.createElement(e.Fragment,null,`QuestDB requested a `,e.createElement(`code`,null,$.ulimit),` limit of`,` `,d($.requested),`, but the container host rejected it, so QuestDB is running with the runtime's default limits. This is typical for podman machine on macOS, where the limits live inside the VM and cannot be read from here. Raise the limits of the service that runs the container runtime (on macOS: inside the VM, via`,` `,e.createElement(`code`,null,`podman machine ssh`),`), then remove the container once with `,e.createElement(`code`,null,`podman rm -f sk-signalk-questdb`),` and restart Signal K — a restart alone cannot re-grant a rejected ask.`):e.createElement(e.Fragment,null,`QuestDB requested a `,e.createElement(`code`,null,$.ulimit),` limit of`,` `,d($.requested),`, but this host only allows `,d($.granted),`, so it was capped. QuestDB is running on the lower limit. To grant the full value, raise the host limit for the user running the container runtime — under rootless Podman that means a systemd`,` `,e.createElement(`code`,null,`user@.service`),` `,e.createElement(`code`,null,`LimitNOFILE`),` drop-in (editing `,e.createElement(`code`,null,`/etc/security/limits.conf`),` alone is usually not enough) — then restart the Signal K server so the plugin can re-create the QuestDB container with the raised limit (signalk-container 1.25.3+; on older versions remove the container once with`,` `,e.createElement(`code`,null,`podman rm -f sk-signalk-questdb`),` instead).`),` `,`This warning clears itself once the container is running with the full value.`,` `,e.createElement(`a`,{href:xn?`https://github.com/dirkwa/signalk-questdb#questdb-container-never-starts-on-macos-podman-machine`:`https://github.com/dirkwa/signalk-container#raising-the-open-files-limit-nofile`,target:`_blank`,rel:`noreferrer`,style:{color:`#92400e`,textDecoration:`underline`}},`Step-by-step instructions`),`.`),e.createElement(ee,{icon:`Q`,iconBackground:`#7c3aed`,iconColor:`#fff`,title:`QuestDB`,meta:e.createElement(e.Fragment,null,D?.endpoint||`${c}:${h}`,` `,`· `,yn?`WAL suspended`:`Recording`),state:yn?`error`:`ok`,stateTitle:yn?`WAL suspended`:`Running`}),e.createElement(`div`,{style:y.statsGrid},e.createElement(`div`,{style:y.statCard},e.createElement(`div`,{style:y.statValue},d(D.totalRows)),e.createElement(`div`,{style:y.statLabel},`Total Rows`)),e.createElement(`div`,{style:y.statCard},e.createElement(`div`,{style:y.statValue},d(D.activePathsToday)),e.createElement(`div`,{style:y.statLabel},`Active Paths Today`)),D.restore&&e.createElement(`div`,{style:y.statCard},e.createElement(`div`,{style:y.statValue},D.restore.failed?`—`:d(D.restore.contexts)),e.createElement(`div`,{style:y.statLabel},D.restore.failed?`Restore failed`:`Vessels Restored`))),e.createElement(`div`,{style:{display:`flex`,alignItems:`center`,gap:10,marginBottom:12}},G&&G.updateAvailable?e.createElement(e.Fragment,null,e.createElement(`span`,{style:{fontSize:13}},`v`,G.currentVersion,` →`,` `,e.createElement(`strong`,null,`v`,G.latestVersion),` available`),e.createElement(v,{variant:`primary`,busy:Ft,busyLabel:`Updating...`,onClick:Yt,style:fe},`Update QuestDB`)):G&&!G.updateAvailable?e.createElement(`span`,{style:{fontSize:12,color:`#888`}},`v`,G.currentVersion,` (up to date)`):e.createElement(v,{variant:`secondary`,busy:Nt,busyLabel:`Checking...`,onClick:Jt,style:fe},`Check for updates`))):e.createElement(ee,{icon:`Q`,title:`QuestDB`,meta:e.createElement(e.Fragment,null,D?.status===`unhealthy`?`Not responding`:`Not running`,T?` — enable plugin to start container`:``),state:`error`}),e.createElement(`div`,{style:y.sectionTitle},`Image Version`),e.createElement(`div`,{style:y.fieldRow},e.createElement(`span`,{style:y.label},`QuestDB version`),e.createElement(re,{value:de,onChange:me,versions:qe,loading:Ye,onRefresh:()=>void Xe(),error:Je,stableCount:3,preCount:2})),e.createElement(`div`,{style:y.sectionTitle},`Connection`),e.createElement(`div`,{style:y.fieldRow},e.createElement(`span`,{style:y.label},`Managed container`),e.createElement(`input`,{type:`checkbox`,style:y.checkbox,checked:T,onChange:e=>he(e.target.checked)}),e.createElement(`span`,{style:y.hint},T?`signalk-container manages QuestDB`:`Connect to external QuestDB`)),!T&&e.createElement(e.Fragment,null,e.createElement(`div`,{style:y.fieldRow},e.createElement(`span`,{style:y.label},`QuestDB host`),e.createElement(`input`,{style:y.input,value:c,onChange:e=>l(e.target.value)})),e.createElement(`div`,{style:y.fieldRow},e.createElement(`span`,{style:y.label},`HTTP port (queries)`),e.createElement(`input`,{style:y.inputSmall,type:`number`,value:h,onChange:e=>_(Number(e.target.value))})),e.createElement(`div`,{style:y.fieldRow},e.createElement(`span`,{style:y.label},`ILP port (writes)`),e.createElement(`input`,{style:y.inputSmall,type:`number`,value:u,onChange:e=>m(Number(e.target.value))}))),T&&e.createElement(`div`,{style:y.fieldRow},e.createElement(`span`,{style:y.label},`Bind to 0.0.0.0`),e.createElement(`input`,{type:`checkbox`,style:y.checkbox,checked:E,onChange:e=>Ke(e.target.checked)}),e.createElement(`span`,{style:{...y.hint,color:E?`#ef4444`:void 0}},E?`Caution! This exposes your data to the network`:`Signal K reaches QuestDB automatically — only enable to reach it from another machine or a separate-Docker Grafana`)),T&&E&&e.createElement(e.Fragment,null,e.createElement(`div`,{style:y.fieldRow},e.createElement(`span`,{style:y.label},`HTTP port (queries)`),e.createElement(`input`,{style:y.inputSmall,type:`number`,value:h,onChange:e=>_(Number(e.target.value))})),e.createElement(`div`,{style:y.fieldRow},e.createElement(`span`,{style:y.label},`ILP port (writes)`),e.createElement(`input`,{style:y.inputSmall,type:`number`,value:u,onChange:e=>m(Number(e.target.value))})),e.createElement(`div`,{style:y.fieldRow},e.createElement(`span`,{style:y.label},`PostgreSQL wire port`),e.createElement(`input`,{style:y.inputSmall,type:`number`,value:ne,onChange:e=>b(Number(e.target.value))}),e.createElement(`span`,{style:y.hint},`for Grafana`)),e.createElement(`div`,{style:y.fieldRow},e.createElement(`span`,{style:y.label},`Container network`),e.createElement(`input`,{style:y.input,value:We,onChange:e=>Ge(e.target.value)}),e.createElement(`span`,{style:y.hint},`shared with signalk-grafana`))),e.createElement(`div`,{style:y.sectionTitle},`Recording`),e.createElement(`div`,{style:y.fieldRow},e.createElement(`span`,{style:y.label},`Default sampling rate (ms)`),e.createElement(`input`,{style:y.inputSmall,type:`number`,value:Oe,onChange:e=>ke(Number(e.target.value))}),e.createElement(`span`,{style:y.hint},`1000 = max 1 write/sec per path (0 = every update)`)),e.createElement(`div`,{style:y.fieldRow},e.createElement(`span`,{style:y.label},`Unchanged-value heartbeat (s)`),e.createElement(`input`,{style:y.inputSmall,type:`number`,min:0,"aria-label":`Unchanged-value heartbeat in seconds`,value:Me,onChange:e=>Ne(e.target.value)}),e.createElement(`span`,{style:y.hint},`a value that has not changed is written once per this many seconds; changes are written at the sampling rate (default 300, 0 = every sample)`)),e.createElement(`div`,{style:y.fieldRow},e.createElement(`span`,{style:y.label},`Write batch interval (ms)`),e.createElement(`input`,{style:y.inputSmall,type:`number`,min:500,max:3e5,"aria-label":`Write batch interval in milliseconds`,value:Ae,onChange:e=>je(e.target.value)}),e.createElement(`span`,{style:y.hint},`one QuestDB transaction per table per interval; longer = bigger batches, but up to this many ms lost on a hard crash (default 5000)`)),e.createElement(`div`,{style:y.fieldRow},e.createElement(`span`,{style:y.label},`Record own vessel`),e.createElement(`input`,{type:`checkbox`,style:y.checkbox,checked:ge,onChange:e=>_e(e.target.checked)})),e.createElement(`div`,{style:y.fieldRow},e.createElement(`span`,{style:y.label},`Record AIS targets`),e.createElement(`input`,{type:`checkbox`,style:y.checkbox,checked:ve,onChange:e=>ye(e.target.checked)})),e.createElement(`div`,{style:y.fieldRow},e.createElement(`span`,{style:y.label},`Restore vessels on startup`),e.createElement(`input`,{type:`checkbox`,style:y.checkbox,"aria-label":`Restore vessels on startup`,checked:be,onChange:e=>xe(e.target.checked)}),e.createElement(`span`,{style:y.hint},`replay each vessel's last recorded position after a restart, so AIS targets appear at once instead of only when they next transmit`)),e.createElement(`div`,{style:y.fieldRow},e.createElement(`span`,{style:y.label},`Allow sourcePolicy=all`),e.createElement(`input`,{type:`checkbox`,style:y.checkbox,"aria-label":`Allow sourcePolicy=all in the History API`,checked:we,onChange:e=>Te(e.target.checked)}),e.createElement(`span`,{style:y.hint},`let History API callers split a path into one column per recording source. Off by default: a path recorded by four receivers becomes four queries and four columns, which is markedly more work on a Pi-class host. Requests that name a source explicitly are unaffected`)),e.createElement(`div`,{style:y.fieldRow},e.createElement(`span`,{style:y.label},`QuestDB console webapp`),e.createElement(`input`,{type:`checkbox`,style:y.checkbox,"aria-label":`QuestDB console webapp`,checked:Se,onChange:e=>Ce(e.target.checked)}),e.createElement(`span`,{style:y.hint},`serve QuestDB's own console inside the Signal K admin UI (admin only). It is a full SQL client — unlike the read-only query endpoint it can modify and delete recorded data`)),be&&e.createElement(`div`,{style:y.fieldRow},e.createElement(`span`,{style:y.label},`Restore max age (minutes)`),e.createElement(`input`,{style:y.inputSmall,type:`number`,min:1,"aria-label":`Restore max age (minutes)`,value:Ee,onChange:e=>{let t=Number(e.target.value);Number.isFinite(t)&&t>=1&&De(t)}}),e.createElement(`span`,{style:y.hint},`only replay values this recent (default 9, matching Freeboard's AIS expiry); higher puts staler positions on the chart`)),e.createElement(`div`,{style:y.fieldRow},e.createElement(`span`,{style:y.label},`Retention (days)`),e.createElement(`input`,{style:y.inputSmall,type:`number`,value:Pe,onChange:e=>Fe(Number(e.target.value))}),e.createElement(`span`,{style:y.hint},`0 = keep forever`)),e.createElement(g,{title:`Path filtering`,defaultOpen:Re.trim()!==``},e.createElement(`div`,{style:y.fieldRow},e.createElement(`span`,{style:y.label},`Filter mode`),e.createElement(`select`,{style:y.select,value:Ie,onChange:e=>Le(e.target.value===`include`?`include`:`exclude`)},e.createElement(`option`,{value:`exclude`},`Exclude matching paths`),e.createElement(`option`,{value:`include`},`Include only matching paths`))),e.createElement(`div`,{style:{marginBottom:10}},e.createElement(`div`,{style:{...y.label,width:`auto`,marginBottom:6}},`Path patterns (one per line, glob supported) — optional`),e.createElement(`textarea`,{style:y.textarea,value:Re,onChange:e=>ze(e.target.value),placeholder:`notifications.*
9
+ environment.wind.*`}),e.createElement(`div`,{style:y.fieldHelp},`Empty = record everything (the default). Nothing is filtered out unless you list a pattern here.`),e.createElement(`div`,{style:{...y.hint,marginLeft:0}},Ie===`exclude`?`These paths are NOT recorded; everything else is.`:`ONLY these paths are recorded; everything else is dropped.`))),e.createElement(g,{title:`Compression (on-disk)`},e.createElement(`div`,{style:y.fieldRow},e.createElement(`span`,{style:y.label},`Compression codec`),e.createElement(`select`,{style:y.select,value:Be,onChange:e=>Ve(pe(e.target.value))},e.createElement(`option`,{value:`none`},`None`),e.createElement(`option`,{value:`lz4`},`LZ4 (fast)`),e.createElement(`option`,{value:`zstd`},`ZSTD (smaller)`)),e.createElement(`span`,{style:y.hint},`applies to new data after save`)),Be===`zstd`&&e.createElement(`div`,{style:y.fieldRow},e.createElement(`span`,{style:y.label},`ZSTD level`),e.createElement(`input`,{style:y.inputSmall,type:`number`,min:`1`,max:`22`,value:He,onChange:e=>Ue(Number(e.target.value))}),e.createElement(`span`,{style:y.hint},`1 (fast) to 22 (smallest)`))),e.createElement(g,{title:`InfluxDB Migration`},B!==null&&B>0&&e.createElement(`div`,{style:{...y.empty,padding:`12px`,textAlign:`left`,marginBottom:12}},e.createElement(`div`,null,e.createElement(`strong`,null,d(B),` rows from an earlier import`),` `,`sit under paths nothing reads`),e.createElement(`div`,{style:y.fieldHelp},`Imports made before 2.1.5 from a signalk-to-influxdb 1.x database filed strings, booleans and positions under paths ending in`,` `,e.createElement(`code`,null,`.stringValue`),`, `,e.createElement(`code`,null,`.boolValue`),` or`,` `,e.createElement(`code`,null,`.jsonValue`),`. Removing them rebuilds the string table without them; run the import again afterwards and they land under their real paths.`),e.createElement(`div`,{style:{...y.migrationActions,marginTop:10}},e.createElement(v,{variant:`danger`,busy:Ot,busyLabel:`Removing...`,disabled:L?.state===`running`,onClick:sn},`Remove these rows`))),V&&L?.state!==`running`&&e.createElement(`div`,{style:{...y.empty,padding:`12px`,textAlign:`left`,marginBottom:12}},e.createElement(`div`,null,e.createElement(`strong`,null,`An import was interrupted`),` — ${V.bucket} from ${V.url}`),e.createElement(`div`,{style:y.cardMeta},S(V.from),` to`,` `,S(V.to),`.`,` `,V.measurementsDone,` measurements finished`,V.measurement?`, stopped in ${V.measurement}`+(V.windowStart?` at ${S(V.windowStart)}`:``):``,`. Position saved `,S(V.updatedAt),`.`),e.createElement(`div`,{style:y.fieldHelp},`Resuming continues from the saved position; rows already imported are not duplicated. If InfluxDB needs credentials, select the instance and enter them first — they are never stored.`),e.createElement(`div`,{style:{...y.migrationActions,marginTop:10}},e.createElement(v,{variant:`primary`,busy:Et,busyLabel:`Resuming...`,onClick:rn},`Resume import`),e.createElement(v,{variant:`danger`,onClick:an},`Discard saved position`))),e.createElement(`div`,{style:{display:`flex`,gap:10,alignItems:`center`,marginBottom:10}},e.createElement(v,{variant:`primary`,busy:$e,busyLabel:`Detecting...`,onClick:Qt},`Detect InfluxDB`),e.createElement(`span`,{style:y.hint},`Checks localhost:8086 for InfluxDB 1.x and 2.x`)),k&&k.length>0&&e.createElement(`div`,null,k.map((t,n)=>{let r=j?.url===t.url&&j?.type===t.type,i=()=>{nt(t),ft(null),N(``),pt(null),it(``),ot(``),ct(``),ut(``),t.type!==`influxdb2`&&$t(t,{token:void 0,org:void 0,username:void 0,password:void 0})};return e.createElement(`div`,{key:n,role:`button`,tabIndex:0,"aria-pressed":r,style:{...y.migrationItem,cursor:`pointer`,outline:r?`2px solid #22adf6`:void 0},onClick:i,onKeyDown:e=>{(e.key===`Enter`||e.key===` `)&&(e.preventDefault(),i())}},e.createElement(`div`,{style:{...y.cardIcon,width:36,height:36,fontSize:16,background:t.type===`influxdb2`?`#020a47`:`#22adf6`,color:`#fff`}},t.type===`influxdb2`?`2`:`1`),e.createElement(`div`,{style:y.cardInfo},e.createElement(`div`,{style:y.cardTitle},`InfluxDB `,t.type===`influxdb2`?`2.x`:`1.x`,e.createElement(`span`,{style:{...y.tag,...y.tagLatest}},t.status)),e.createElement(`div`,{style:y.cardMeta},t.url,` · v`,t.version)),e.createElement(`div`,{style:y.cardMeta},r?`selected`:`click to select`))})),e.createElement(`div`,{style:{...y.fieldRow,marginTop:10}},e.createElement(`span`,{style:y.label},`Manual InfluxDB URL`),e.createElement(`input`,{style:y.input,placeholder:`http://192.168.1.100:8086`,"aria-label":`Manual InfluxDB URL`,value:A,onChange:e=>tt(e.target.value)}),e.createElement(`span`,{style:y.hint},`for remote instances`)),k&&k.length===0&&!$e&&e.createElement(`div`,{style:{...y.empty,padding:`16px`,textAlign:`left`}},`No InfluxDB found on localhost. Use manual URL above for remote instances.`),j&&e.createElement(`div`,{style:{marginTop:14}},e.createElement(`div`,{style:y.fieldHelp},j.type===`influxdb2`?`InfluxDB 2.x needs an API token with read access to the bucket, and the organisation name.`:`InfluxDB 1.x needs a username and password only if the server has authentication enabled.`),j.type===`influxdb2`?e.createElement(e.Fragment,null,e.createElement(`div`,{style:y.fieldRow},e.createElement(`span`,{style:y.label},`API token`),e.createElement(`input`,{style:y.input,type:`password`,"aria-label":`InfluxDB API token`,value:rt,onChange:e=>it(e.target.value)}),e.createElement(`span`,{style:y.hint},`not stored`)),e.createElement(`div`,{style:y.fieldRow},e.createElement(`span`,{style:y.label},`Organisation`),e.createElement(`input`,{style:y.input,"aria-label":`InfluxDB organisation`,value:at,onChange:e=>ot(e.target.value)}))):e.createElement(e.Fragment,null,e.createElement(`div`,{style:y.fieldRow},e.createElement(`span`,{style:y.label},`Username`),e.createElement(`input`,{style:y.input,"aria-label":`InfluxDB username`,value:st,onChange:e=>ct(e.target.value)}),e.createElement(`span`,{style:y.hint},`blank if auth is off`)),e.createElement(`div`,{style:y.fieldRow},e.createElement(`span`,{style:y.label},`Password`),e.createElement(`input`,{style:y.input,type:`password`,"aria-label":`InfluxDB password`,value:lt,onChange:e=>ut(e.target.value)}),e.createElement(`span`,{style:y.hint},`not stored`))),e.createElement(`div`,{style:{...y.fieldRow,marginTop:4}},e.createElement(`span`,{style:y.label}),e.createElement(v,{busy:mt,busyLabel:`Loading...`,onClick:()=>void $t(j)},j.type===`influxdb2`?`List buckets`:`List databases`)),dt&&dt.length>0&&e.createElement(`div`,{style:y.fieldRow},e.createElement(`span`,{style:y.label},j.type===`influxdb2`?`Bucket`:`Database`),e.createElement(`select`,{style:y.select,"aria-label":`InfluxDB bucket or database to import from`,value:M,onChange:e=>{N(e.target.value),pt(null)}},e.createElement(`option`,{value:``},`Select...`),dt.map(t=>e.createElement(`option`,{key:t.name,value:t.name},t.name))),e.createElement(v,{busy:mt,busyLabel:`...`,onClick:()=>void tn()},`Preview paths`)),ht&&e.createElement(`div`,{style:y.fieldHelp},`Listing the vessels in the bucket... On a large bucket this takes a while; the import waits for it.`),I&&I.contexts.length>0&&e.createElement(e.Fragment,null,e.createElement(`div`,{style:y.fieldRow},e.createElement(`span`,{style:y.label},`Your vessel`),e.createElement(`select`,{style:y.select,"aria-label":`Which vessel in the source is this one`,value:vt,onChange:e=>yt(e.target.value)},I.contexts.length>1&&e.createElement(`option`,{value:``},`Select...`),I.contexts.map(t=>e.createElement(`option`,{key:t,value:t},t,t===I.self?I.selfBy===`tag`?` (recorded as the own vessel)`:` (this server)`:``)))),I.contexts.length>1&&e.createElement(e.Fragment,null,!I.self&&e.createElement(`div`,{style:y.fieldHelp},`The source holds `,I.contexts.length,` `,`vessels, does not say which was its own, and none of them is this server's identity. Pick the one the recording server used for this boat; its history is imported as this vessel.`),e.createElement(`label`,{style:{...y.fieldHelp,display:`block`}},e.createElement(`input`,{type:`checkbox`,checked:bt,onChange:e=>xt(e.target.checked)}),` `,`Also import the other vessels (AIS targets), each under its own context`))),P&&e.createElement(`div`,{style:y.fieldHelp},P.length,` measurement`,P.length===1?``:`s`,` found`,P.length>0&&e.createElement(e.Fragment,null,` `,`— e.g.`,` `,P.slice(0,3).map(e=>e.name).join(`, `),P.length>3?`, ...`:``)),e.createElement(`div`,{style:y.fieldRow},e.createElement(`span`,{style:y.label},`From`),e.createElement(`input`,{style:y.input,type:`datetime-local`,"aria-label":`Import range start`,value:St,onChange:e=>Ct(e.target.value)})),e.createElement(`div`,{style:y.fieldRow},e.createElement(`span`,{style:y.label},`To`),e.createElement(`input`,{style:y.input,type:`datetime-local`,"aria-label":`Import range end`,value:wt,onChange:e=>Tt(e.target.value)})),e.createElement(`div`,{style:y.fieldHelp},`Imported rows are tagged `,e.createElement(`code`,null,`source=influxdb-import`),` and written with their original timestamps, so re-running the same range overwrites rather than duplicating.`),e.createElement(`div`,{style:{...y.migrationActions,marginTop:10}},e.createElement(v,{variant:`primary`,busy:Et,busyLabel:`Starting...`,disabled:!M||!St||!wt||ht||(I?.contexts.length??0)>1&&!vt||L?.state===`running`,onClick:nn},`Start import`),L?.state===`running`&&e.createElement(v,{variant:`danger`,onClick:on},`Cancel`))),L&&e.createElement(`div`,{style:{...y.empty,padding:`12px`,textAlign:`left`}},e.createElement(`div`,null,e.createElement(`strong`,null,L.state===`running`?`Importing`:L.state===`done`?`Import complete`:L.state===`cancelled`?`Import cancelled`:`Import failed`),L.bucket?` from ${L.bucket}`:``),L.resumedFrom&&e.createElement(`div`,{style:y.cardMeta},`Resumed`,L.resumedFrom.measurement?` in ${L.resumedFrom.measurement}`+(L.resumedFrom.windowStart?` at ${S(L.resumedFrom.windowStart)}`:``):` from the saved position`,`; the totals include the earlier run.`),e.createElement(`div`,{style:y.cardMeta},d(L.progress.written),` written,`,` `,d(L.progress.skipped),` skipped,`,` `,L.progress.measurementsDone,`/`,L.progress.measurementsTotal,` measurements`,L.progress.currentMeasurement?` — ${L.progress.currentMeasurement}`:``),L.error&&e.createElement(`div`,{style:{...y.cardMeta,color:`#b91c1c`}},L.error))),e.createElement(g,{title:`Data Export`},e.createElement(`div`,{style:y.fieldRow},e.createElement(`span`,{style:y.label},`From`),e.createElement(`input`,{style:y.input,type:`datetime-local`,value:Q,onChange:e=>cn(e.target.value)})),e.createElement(`div`,{style:y.fieldRow},e.createElement(`span`,{style:y.label},`To`),e.createElement(`input`,{style:y.input,type:`datetime-local`,value:ln,onChange:e=>un(e.target.value)})),e.createElement(`div`,{style:y.fieldRow},e.createElement(`span`,{style:y.label},`Format`),e.createElement(`select`,{style:y.select,value:dn,onChange:e=>fn(e.target.value)},e.createElement(`option`,{value:`parquet`},`Parquet`),e.createElement(`option`,{value:`csv`},`CSV`))),e.createElement(v,{variant:`primary`,busy:pn,busyLabel:`Exporting...`,onClick:gn},`Export Data`)),s.managedContainer!==!1&&e.createElement(g,{title:`Danger zone`},e.createElement(`div`,{style:{fontSize:13,color:`#555`,marginBottom:10}},`Remove the QuestDB container and permanently delete all recorded data. Use this to fully reset QuestDB — Signal K's plugin-uninstall cannot delete this data on rootless Podman. This cannot be undone.`),e.createElement(v,{variant:`danger`,busy:Lt,busyLabel:`Removing...`,onClick:Xt},`Remove container & all data`)),e.createElement(te,{message:At,error:jt,style:{marginTop:16}}),e.createElement(`div`,{style:{marginTop:24}},e.createElement(v,{onClick:hn},`Save Configuration`)))}export{me as default};
@@ -1,4 +1,4 @@
1
- import{t as e}from"./assets/vite-preload-helper-uBIymjUX.js";import{t}from"./assets/dist-BK97MX24.js";import{t as n}from"./assets/helpers-Bizl8Raj.js";var r={},i=new Set,a=new Map;function o(e,t){let n=a.get(e);return n||(n=Promise.resolve().then(t).catch(t=>{throw a.delete(e),t}),a.set(e,n)),n}async function s(e){if(typeof document>`u`)return;let t=r[e]||[];await Promise.all(t.map(e=>{let t=new URL(e,import.meta.url).href;return i.has(t)||(i.add(t),document.querySelector(`link[rel="stylesheet"][href="${t}"]`))?Promise.resolve():new Promise((e,n)=>{let r=document.createElement(`link`);r.rel=`stylesheet`,r.href=t,r.onload=()=>e(),r.onerror=()=>n(Error(`[Module Federation] Failed to load CSS asset: ${t}`)),document.head.appendChild(r)})}))}var c={"./PluginConfigurationPanel":async()=>{await s(`./PluginConfigurationPanel`),await Promise.all([]);let t=await o(`./PluginConfigurationPanel`,()=>e(()=>import(`./assets/PluginConfigurationPanel-DWDBvXxG.js`),[],import.meta.url)),n=t&&t.__mf_remote_dependency_pending;n&&typeof n.then==`function`&&await n;let r={};return Object.assign(r,t),Object.defineProperty(r,"__esModule",{value:!0,enumerable:!1}),r},"./AppPanel":async()=>{await s(`./AppPanel`),await Promise.all([]);let t=await o(`./AppPanel`,()=>e(()=>import(`./assets/AppPanel-p27aQlBS.js`),[],import.meta.url)),n=t&&t.__mf_remote_dependency_pending;n&&typeof n.then==`function`&&await n;let r={};return Object.assign(r,t),Object.defineProperty(r,"__esModule",{value:!0,enumerable:!1}),r}};typeof __VUE_HMR_RUNTIME__>`u`&&(globalThis.__VUE_HMR_RUNTIME__={createRecord(){},rerender(){},reload(){}});var l=`__mf_init__virtual:mf:__mfe_internal__signalk_questdb__mf_owner__275086164343916__mf_v__runtimeInit__mf_v__.js__`,u=globalThis[l];if(!u){let e,t,n=new Promise((n,r)=>{e=n,t=r});u=globalThis[l]={initPromise:n,initResolve:e,initReject:t}}var d=u.initResolve,f=`__mf_module_cache__`;globalThis[f]||={share:{},remote:{}},globalThis[f].share||={},globalThis[f].remote||={};var p=globalThis[f];for(let e of Object.keys(p.share))if(e.startsWith(`default:`)){let t=e.slice(8);p.share[t]===void 0&&(p.share[t]=p.share[e])}else if(!e.includes(`:`)){let t=`default:`+e;p.share[t]===void 0&&(p.share[t]=p.share[e])}var m={},h=Array.isArray(`default`)?`default`:[`default`],g=`default`,_=`signalk_questdb`,v=[[`react`]],y,b;async function x(e){for(let t=0;;t++)try{return await e()}catch(e){throw e}}var S=Symbol(`mf.originalSharedProvider`),C={emit:e=>e},w=e=>Array.isArray(e.scope)?e.scope:[e.scope||`default`],T=(e,t)=>{if(t!==`version-first`)return e;let n={};for(let[t,r]of Object.entries(e))n[t]=Object.assign({},r,{[S]:r});return n},E=(e,t)=>{if(!t)return;let n=Object.entries(e||{}),r=n.find(([,e])=>e===t);if(r)return{version:r[0],provider:t,registered:!0};if(typeof t.version==`string`&&t.version)return{version:t.version,provider:t,registered:!1};let i=n.filter(([,e])=>e===t||!!(t.from&&e?.from===t.from));if(i.length===1)return{version:i[0][0],provider:t,registered:!1}},D=(e,t,r,i)=>{if(!e||!r)return;let a=Object.fromEntries(Object.entries(e).filter(([,e])=>e?.shareConfig?.import!==!1));if(Object.keys(a).length===0)return;let o=w(r),s=T(a,i),c={};for(let e of o)c[e||`default`]={[t]:s};let l=n.getRegisteredShare(c,t,{...r,scope:o,strategy:i},C)?.shared;return l?.[S]||l},O=(e,t,n,r)=>{let i=e=>k(e,n),a=Object.fromEntries(Object.entries(e||{}).filter(([,e])=>!i(e)&&e?.shareConfig?.import!==!1));n?.version&&n.shareConfig?.import!==!1&&(a[n.version]||(a[n.version]=n));let o=D(a,t,n,r);return i(o)?void 0:o},k=(e,t)=>e===t||!!(t?.from&&e?.from===t.from),A=(e,t,n,r,i,a,o,s,c)=>{if(c!==`version-first`||!s)return;let l=t?.options?.shared?.[i],u=Array.isArray(l)?l.find(e=>e?.version===a):void 0,d=(s?.from===t?.options?.name?s:void 0)||(k(u,s)?u:t?void 0:s);if(d)return e.some(e=>e!==t&&e?.options?.name===o?.from&&e?.shareScopeMap?.[r]===n)?d:void 0},ee=(e,t,n,r,i,a,o,s,c)=>{let l=a.registered?A(e,t,n,r,i,a.version,a.provider,s,c):void 0,u=l||o;if(u&&(!a.registered||k(u,s)))return{provider:u,scopeRootProvider:l}};async function j(){return y||=x(()=>e(()=>import(`./assets/_virtual_mf-localSharedImportMap___mfe_internal__signalk_questdb__mf_owner__1-BiBqFhVp.js`),[],import.meta.url)).catch(e=>{throw y=void 0,e}),y}async function M(){return c}async function N(e={},n=[],r={}){let i=(e,t,n,r)=>{let i=(Array.isArray(r)?r[0]:r)||`default`,a=t||!n?e:e+`@`+n,o={canonical:i+`:`+a};return i==="default"&&(o.aliases=[a]),o},a=(e,t)=>{let n=e[t.canonical];if(n!==void 0)return n;let r=t.aliases||[];for(let n of r){if(!Object.prototype.hasOwnProperty.call(e,n))continue;let r=e[n];if(r!==void 0)return e[t.canonical]=r,r}},o=Symbol.for(`module-federation.shared-cache-listeners`),s=Symbol.for(`module-federation.shared-cache-owners`),c=e=>{let t=e[s];return t===void 0&&(t=Object.create(null),Object.defineProperty(e,s,{value:t,enumerable:!1,configurable:!1,writable:!1})),t},l=(e,t)=>e[s]?.[t.canonical],u=(e,t,n,r)=>{e[t.canonical]=n;let i=t.aliases||[];for(let t of i)Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0});let a=e[s];r===void 0?a&&delete a[t.canonical]:c(e)[t.canonical]=r;let l=e[o]?.[t.canonical];if(l)for(let e of l)e(n);return n},f=Symbol.for(`module-federation.tree-shaking-shared-cache`),y=e=>{let t=e[f];return t===void 0&&(t=Object.create(null),Object.defineProperty(e,f,{value:t,enumerable:!1,configurable:!1,writable:!1})),t},S=(e,t,n,r)=>{if(!Array.isArray(n))return r;let i=[...new Set(n)].sort(),a=y(e),o=a[t.canonical]||=[],s=o.find(e=>e.providedExports.length===i.length&&e.providedExports.every((e,t)=>e===i[t]));return s?s.value=r:o.push({providedExports:i,value:r}),r},C=Symbol.for(`module-federation.tree-shaking-shared-selection-cache`),w=e=>{let t=e[C];return t===void 0&&(t=Object.create(null),Object.defineProperty(e,C,{value:t,enumerable:!1,configurable:!1,writable:!1})),t},T=(e,t,n)=>{let r=a(e,t);return r===void 0?e[C]?.[t.canonical]?.[n]:r},A=(e,t,n,r)=>{let i=w(e),a=i[t.canonical]||=Object.create(null);return a[n]=r,r},M=globalThis.__FEDERATION__?.__INSTANCES__||[],N=n.find(e=>e?.from)?.from,P=M.find(t=>t?.options?.name===N&&t?.shareScopeMap?.default===e)||M.find(t=>t?.options?.name!==_&&t?.shareScopeMap?.default===e),F=Object.create(null),I=e=>{let t=Object.create(null);for(let[n,r]of Object.entries(e||{}))t[n]=Object.assign(Object.create(null),r);return t},te=(e,t)=>{for(let[n,r]of Object.entries(G.shareScopeMap?.[e]||{}))for(let[e,i]of Object.entries(r||{})){if(!i||i.get===R[n]?.get)continue;let r=t[n]||={};r[e]===void 0&&(r[e]=i)}},ne=(e,t)=>{te(e,t);let n=!P&&Object.values(t||{}).some(e=>Object.values(e||{}).some(z)),r=n?I(t):t;return F[e]={host:t,runtime:r,isWebpackScope:n},r},re=()=>{let e=Object.values(F).filter(({isWebpackScope:e})=>e);if(e.length!==0)for(let{host:t,runtime:n}of e)for(let[e,r]of Object.entries(t||{})){let t=n[e]||=Object.create(null);for(let[e,n]of Object.entries(r||{}))t[e]=n}},L=Object.create(null);for(let[t,n]of Object.entries(e)){let e=L[t]=Object.create(null);for(let[t,r]of Object.entries(n))e[t]=Object.assign({},r)}let{usedShared:R,usedRemotes:ie}=await j();function z(e){if(typeof e?.get!=`function`)return!1;let t=Function.prototype.toString.call(e.get);return t.includes(`__webpack_require__`)||/\.\s*e\s*\([^)]*\)\s*\.then\s*\(/.test(t)}let ae=Object.values(L).some(e=>Object.values(e||{}).some(z)),oe=e=>{let t=e.split(`/`);return e.startsWith(`@`)?t.slice(0,2).join(`/`):t[0]},B=(t,n,r,i)=>{if(typeof O!=`function`)return;let a=oe(t),o=!i||a===t?[[t,n]]:[[t,n],[a,R[a]]];for(let[n,i]of o){if(!i)continue;let a=O(r?n===t?r:L[n]:L[n]??e[n],n,i,`version-first`);if(a)return a}},se=(e,t,n)=>{let r=B(e,t,n,!0);return r&&z(r)&&!r.lib&&!r.loaded?r:void 0};var V=m[g];if(V||=m[g]={from:_},n.indexOf(V)>=0)return;n.push(V);let ce=e=>{let t=e;for(let e=0;e<5;e++){let e=t?.default;if(!e||typeof e!=`object`||Object.keys(e).length===0)break;let n=Object.keys(t).filter(e=>e!=="default").map(e=>t[e]);if(n.length>0&&n.some(e=>e!==void 0))break;t=e}return t},le=[],ue=globalThis.window===void 0?await Promise.all([]):[],H=`__mf_vite_runtime_share_load_id__`,de=0,U=new Map,W=new Map,G=t({name:_,remotes:ie,shared:R,plugins:[fe(),pe(),...le,...ue],shareStrategy:`version-first`});G.initShareScopeMap(`default`,ne(`default`,e));function fe(){return{name:`vite-share-pin-lifecycle-plugin`,resolveShare(e){let t=e.shareInfo?.[H],n=t===void 0?void 0:W.get(t);if(!n)return e;let r=e.resolver;return e.resolver=(...e)=>(n.pinned.reapply(),r(...e)),n.pinned.reveal(),e}}}function pe(){return{name:`vite-real-name-snapshot-plugin`,afterLoadSnapshot(e){let t=e&&e.remoteSnapshot,n=t&&t.globalName,r=t&&t.version;if(!n||!r||!t.remoteEntry)return e;let i=globalThis.__FEDERATION__&&globalThis.__FEDERATION__.moduleInfo,a=n+`:`+r;return i&&!i[a]&&(i[a]=t),e}}}let me=G.sharedHandler.hooks.lifecycle.resolveShare,K=new WeakMap;me.on(e=>{let t=e.shareInfo?.[H],n=e.resolver;return typeof n==`function`&&(e.resolver=(...e)=>{let r=n(...e),i=r?.shared;return i&&(typeof i==`object`||typeof i==`function`)&&!K.has(i)&&K.set(i,{from:i.from}),t!==void 0&&i&&U.set(t,i),r}),e});let he=(e,t,n,r)=>{if(!e||e[t]!==n)return;let i=Object.assign({},r,{version:r.version??t,scope:r.scope??n?.scope??[`default`],strategy:`loaded-first`}),a=r.from;e[t]=i;let o=()=>n===void 0?e[t]===void 0:e[t]===n;return{provider:i,reveal(){return e[t]===i&&(n===void 0?delete e[t]:e[t]=n,!0)},reapply(){return o()?(e[t]=i,!0):!1},release(s,c=!0){return r.from=a,e[t]===i?c?s?(i.from=a,s&&i.lib&&(i.loaded=!0),r.strategy===void 0?delete i.strategy:i.strategy=r.strategy,!0):(n===void 0?delete e[t]:e[t]=n,!1):(n===void 0?delete e[t]:e[t]=n,!0):!c&&o()}}},ge=e=>Object.entries(e||{}).map(([e,t])=>({provider:t,version:e,from:t.from,registered:!0})),_e=(e,t)=>{if(t===void 0)return;let n;for(let r of e){let e=r.provider,i=e.treeShaking||e;if(r.loadedFactory===t||e.lib===t||i.lib===t){if(n)return;n=r}}return n},ve=async(e,t,n)=>{let r=++de;W.set(r,{pinned:n});try{let n=await G.loadShare(e,{customShareInfo:{shareConfig:t,[H]:r}});return{factory:n===!1?void 0:n,selectedProvider:U.get(r)}}finally{U.delete(r),W.delete(r)}},ye=async(e,t,n,r,i,a,o=!0)=>{let s=a.from,c=he(n,r,i,a);if(!c)return;let l;try{l=await ve(e,t,c)}catch(e){throw c.release(!1),e}let u=l?.factory;if(u===void 0){c.release(!1);return}let d=ge(n),f=c.provider.treeShaking||c.provider,p=c.provider.lib===u||f.lib===u;if(!o&&p){let e=d.findIndex(e=>e.provider===c.provider);e!==-1&&d.splice(e,1)}!o&&!d.some(e=>e.provider===a)&&d.push({provider:a,version:r,from:s,registered:!1,loadedFactory:p?u:void 0});let m=!o&&l.selectedProvider===c.provider&&p?a:l.selectedProvider;if(m&&!d.some(e=>e.provider===m)){let e=K.get(m),t=typeof m.version==`string`&&m.version?m.version:r;d.push({provider:m,version:t,from:e?e.from:m.from,registered:n?.[t]===m,loadedFactory:u})}let h=d.find(e=>e.provider===m)??_e(d,u);if(!c.release(!0,h?.provider===c.provider)||!h)return;let g=K.get(h.provider);h.from=h.provider===a?s:g?g.from:h.provider.from,g&&(h.provider.from=g.from);let _=typeof u==`function`?u():u,v=await Promise.resolve(_);if(!(h.registered&&n?.[h.version]!==h.provider))return{provider:h.provider,selection:h,resolved:v}},q=new Set,J=new Map,be=async(t,n,r)=>{let o=!!n.shareConfig?.singleton;if(!o&&n.canLiveRebind!==!1)try{let s=O(r,t,n,`version-first`),c=E(r,s);if(!c||n.shareConfig?.import===!1&&k(s,n)||s?.shareConfig?.import===!1)return;let{version:l}=c;if(!o&&l!==n.version||!s.lib&&!s.loading&&!(s.loaded&&typeof s.get==`function`))return;let d=i(t,o,n.version,n.scope);if(a(p.share,d)!==void 0)return;let f=e[t],m=f?.[l];if(c.registered&&!k(m,s))return;let h,g=s.lib;if(!g&&z(s)||(!g&&s.loading&&(g=await s.loading),!g&&s.loaded&&typeof s.get==`function`&&(g=await s.get()),!g))return;let _=typeof g==`function`?g():g,v=await Promise.resolve(_),y=c.registered?m:s;h={provider:y,selection:{provider:y,version:l,from:s.from,registered:c.registered},resolved:v};let b=h?.provider,x=h?.selection;if(!x)return;let S=h?.resolved;if(S===void 0||a(p.share,d)!==void 0||x.registered&&f?.[x.version]!==b)return;u(p.share,d,ce(S),x.from),q.add(b)}catch(e){console.error(`[Module Federation] Failed to bridge materialized shared module "`+t+`"`,e)}},xe=async(t,n,r,o,s)=>{try{let c=i(t,n.shareConfig?.singleton,n.version,n.scope),d=a(p.share,c),f=l(p.share,c),m=O(r,t,n,`version-first`),h=m||D(r,t,n,`version-first`)||n,g=E(r,h);if(!g)return;let v=k(h,n),{version:y}=g;if(!n.shareConfig?.singleton&&y!==n.version)return;let b=o?.[y],x=ee(M,P,e,`default`,t,g,m,b,`version-first`);if(!x&&!v)return;let{provider:S,scopeRootProvider:C}=x||{provider:h,scopeRootProvider:void 0};if(n.canLiveRebind===!1||n.shareConfig?.import===!1&&k(S,n)||S?.shareConfig?.import===!1||d!==void 0&&f!==_)return;let w=e[t],T=w?.[y];if(g.registered&&!C&&!k(T,S))return;let A=await ye(t,n.shareConfig,w,y,T,S,g.registered&&!v),j=A?.provider,N=A?.selection;if(!N||k(j,n)||s&&(s.version!==N.version||!k({from:N.from},s.provider))||q.has(j))return;let F=A?.resolved;if(F===void 0)return;let I=a(p.share,c),te=l(p.share,c);if(I!==void 0&&te!==_||N.registered&&w?.[N.version]!==j)return;s||J.set(t,{version:N.version,provider:{from:N.from}}),q.add(j);let ne=ce(F);u(p.share,c,ne,N.from)}catch(e){console.error(`[Module Federation] Failed to bridge external shared module "`+t+`"`,e)}};for(let e of v)await Promise.all(e.map(async e=>{let t=R[e];t&&t.materialize!==!1&&!t.treeShaking&&await be(e,t,L[e])}));for(let[e,t]of Object.entries(R)){if(t.treeShaking)continue;let n=i(e,t.shareConfig?.singleton,t.version,t.scope);if(a(p.share,n)!==void 0)continue;let r=i(e,!0,t.version,t.scope),o=a(p.share,r);o!==void 0&&u(p.share,n,o,l(p.share,r))}let Se=[`react`],Ce=[[`react`]],Y=new Map(Se.map((e,t)=>[e,t])),we={},X=Se.filter(e=>R[e]&&(R[e].materialize!==!1||R[e].shareConfig?.import===!1));p.providerInit||=new Map;let Te=(e,t)=>{let n=p.providerInit.get(e);if(n)return n;let r=Promise.resolve().then(t);return p.providerInit.set(e,r),r.catch(()=>p.providerInit.delete(e)),r};var Ee=async e=>{let t=new Set(e);for(let e of Ce)await Promise.all(e.filter(e=>t.has(e)).map(async e=>{let t=R[e],n=i(e,t.shareConfig?.singleton,t.version,t.scope);if(t.shareConfig?.import===!1||t.treeShaking||a(p.share,n)!==void 0)return;let r=i(e,!0,t.version,t.scope),o=a(p.share,r);if(o!==void 0){u(p.share,n,o,l(p.share,r));return}let s=typeof B==`function`?B(e,t):void 0;if(s){let e=s.lib;if(!e&&s.loading&&(e=await s.loading),!e&&s.loaded&&typeof s.get==`function`&&(e=await s.get()),e){let t=typeof e==`function`?e():e,r=await Promise.resolve(t);u(p.share,n,(e=>{let t=e;for(let e=0;e<5;e++){let e=t?.default;if(!e||typeof e!=`object`||Object.keys(e).length===0)break;let n=Object.keys(t).filter(e=>e!=="default").map(e=>t[e]);if(n.length>0&&n.some(e=>e!==void 0))break;t=e}return t})(r),s.from)}return}let c=n.canonical,d=await Te(c,async()=>{let e=await t.get(),n=typeof e==`function`?e():e;return Promise.resolve(n)}),f=(e=>{let t=e;for(let e=0;e<5;e++){let e=t?.default;if(!e||typeof e!=`object`||Object.keys(e).length===0)break;let n=Object.keys(t).filter(e=>e!=="default").map(e=>t[e]);if(n.length>0&&n.some(e=>e!==void 0))break;t=e}return t})(d),m=f===d?{...d}:f;m.__esModule!==!0&&Object.defineProperty(m,"__esModule",{value:!0,enumerable:!1}),u(p.share,n,m,_)}))};let De=e=>{let t=R[e];if(!t.treeShaking&&t.shareConfig?.import!==!1)return!1;let n=i(e,t.shareConfig?.singleton,t.version,t.scope);return t.treeShaking?T(p.share,n,_)===void 0&&a(p.share,n)===void 0:a(p.share,n)===void 0},Oe=e=>{let t=R[e],n=i(e,t.shareConfig?.singleton,t.version,t.scope);return(t.treeShaking?T(p.share,n,_)??a(p.share,n):a(p.share,n))===void 0?t.treeShaking||t.shareConfig?.import===!1?!0:typeof O==`function`&&!!O(L[e],e,t,`version-first`):!1},ke=e=>{let t=!0;for(;t;){t=!1;for(let n of X){let r=Y.get(n);e.has(r)||(we[r]||[]).some(t=>e.has(t))&&(e.add(r),t=!0)}}return e},Z=ke(new Set(X.filter(Oe).map(e=>Y.get(e)))),Ae=X.filter(e=>!Z.has(Y.get(e)));var je=X.filter(e=>Z.has(Y.get(e)));await Ee(Ae);try{await x(async()=>{await Promise.all(await G.initializeSharing(`default`,{strategy:`version-first`,from:`build`,initScope:n}))})}catch(e){console.error(`[Module Federation]`,e)}re();let Me=async()=>{for(let t of v)await Promise.all(t.map(async t=>{let n=R[t];n&&n.materialize!==!1&&!n.treeShaking&&await xe(t,n,e[t],L[t],void 0)}))};await Me(),ae&&(b=Me);try{let e=globalThis.__FEDERATION__?.__SHARE__,t=Object.create(null);if(e)for(let[,n]of Object.entries(e))for(let e of h){let r=n?.[e];if(r)for(let[e,n]of Object.entries(r)){let r=R?.[e],i=L[e],a=J.get(e);if(!r||!i||!a||r.treeShaking)continue;let o=t[e]||(t[e]=Object.create(null));for(let[e,t]of Object.entries(n)){if(!t.lib||a.version!==e||!k(t,a.provider))continue;let n=i[e];(t===n||n?.from&&t.from===n.from)&&(t===r||r.from&&t.from===r.from||o[e]===void 0&&(o[e]=t))}}}for(let e of v)await Promise.all(e.map(async e=>{let n=t[e];n&&await xe(e,R[e],n,L[e],J.get(e))}))}catch(e){console.error(`[Module Federation] Failed to bridge external shared modules`,e)}let Ne=async()=>{},Pe=async(t,n)=>{let r=i(t,n.shareConfig?.singleton,n.version,n.scope),o=n.treeShaking?T(p.share,r,_):a(p.share,r);if(n.shareConfig?.import!==!1||o!==void 0||se(t,n,L[t]))return;let s=e=>{let t=e;for(let e=0;e<5;e++){let e=t?.default;if(!e||typeof e!=`object`||Object.keys(e).length===0)break;let n=Object.keys(t).filter(e=>e!=="default").map(e=>t[e]);if(n.length>0&&n.some(e=>e!==void 0))break;t=e}return t},c=e?.[t],l=D(c,t,n,`version-first`)||n,d=E(c,l);if(!d)return;let f=e=>e===n||e?.shareConfig?.import===!1;if(f(l))return;let{version:m}=d,h=c?.[m],g=await ye(t,n.shareConfig,c,m,h,l,d.registered),v=g?.selection,y=g?.provider,b=g?.resolved;if(!v||f(y)||b===void 0||(n.treeShaking?T(p.share,r,_):a(p.share,r))!==void 0||v.registered&&c?.[v.version]!==y)return;let x=s(b);if(n.treeShaking){let e=n.treeShaking.providedExports??n.treeShaking.usedExports??[];S(p.share,r,e,x),A(p.share,r,_,x)}else u(p.share,r,x,v.from)},Q=[],$=new Set;for(let e of je){let t=R[e],n=Y.get(e);if(De(e))try{t.treeShaking?await Ne(e,t):t.shareConfig?.import===!1&&await Pe(e,t)}catch(t){console.error(`[Module Federation] Failed to resolve runtime-only shared module "${e}"`,t)}De(e)&&$.add(n)}return ke($),Q.push(...je.filter(e=>!$.has(Y.get(e)))),await Ee(Q),d(G),G}async function P(e){let t=await M();if(!(e in t))throw Error(`[Module Federation] Module ${e} does not exist in container.`);return b&&await b(),p.pendingShareLoads&&await Promise.all(p.pendingShareLoads),t[e]().then(e=>()=>e)}export{P as get,N as init};
1
+ import{t as e}from"./assets/vite-preload-helper-uBIymjUX.js";import{t}from"./assets/dist-BK97MX24.js";import{t as n}from"./assets/helpers-Bizl8Raj.js";var r={},i=new Set,a=new Map;function o(e,t){let n=a.get(e);return n||(n=Promise.resolve().then(t).catch(t=>{throw a.delete(e),t}),a.set(e,n)),n}async function s(e){if(typeof document>`u`)return;let t=r[e]||[];await Promise.all(t.map(e=>{let t=new URL(e,import.meta.url).href;return i.has(t)||(i.add(t),document.querySelector(`link[rel="stylesheet"][href="${t}"]`))?Promise.resolve():new Promise((e,n)=>{let r=document.createElement(`link`);r.rel=`stylesheet`,r.href=t,r.onload=()=>e(),r.onerror=()=>n(Error(`[Module Federation] Failed to load CSS asset: ${t}`)),document.head.appendChild(r)})}))}var c={"./PluginConfigurationPanel":async()=>{await s(`./PluginConfigurationPanel`),await Promise.all([]);let t=await o(`./PluginConfigurationPanel`,()=>e(()=>import(`./assets/PluginConfigurationPanel-BfNu3zmv.js`),[],import.meta.url)),n=t&&t.__mf_remote_dependency_pending;n&&typeof n.then==`function`&&await n;let r={};return Object.assign(r,t),Object.defineProperty(r,"__esModule",{value:!0,enumerable:!1}),r},"./AppPanel":async()=>{await s(`./AppPanel`),await Promise.all([]);let t=await o(`./AppPanel`,()=>e(()=>import(`./assets/AppPanel-p27aQlBS.js`),[],import.meta.url)),n=t&&t.__mf_remote_dependency_pending;n&&typeof n.then==`function`&&await n;let r={};return Object.assign(r,t),Object.defineProperty(r,"__esModule",{value:!0,enumerable:!1}),r}};typeof __VUE_HMR_RUNTIME__>`u`&&(globalThis.__VUE_HMR_RUNTIME__={createRecord(){},rerender(){},reload(){}});var l=`__mf_init__virtual:mf:__mfe_internal__signalk_questdb__mf_owner__275086164343916__mf_v__runtimeInit__mf_v__.js__`,u=globalThis[l];if(!u){let e,t,n=new Promise((n,r)=>{e=n,t=r});u=globalThis[l]={initPromise:n,initResolve:e,initReject:t}}var d=u.initResolve,f=`__mf_module_cache__`;globalThis[f]||={share:{},remote:{}},globalThis[f].share||={},globalThis[f].remote||={};var p=globalThis[f];for(let e of Object.keys(p.share))if(e.startsWith(`default:`)){let t=e.slice(8);p.share[t]===void 0&&(p.share[t]=p.share[e])}else if(!e.includes(`:`)){let t=`default:`+e;p.share[t]===void 0&&(p.share[t]=p.share[e])}var m={},h=Array.isArray(`default`)?`default`:[`default`],g=`default`,_=`signalk_questdb`,v=[[`react`]],y,b;async function x(e){for(let t=0;;t++)try{return await e()}catch(e){throw e}}var S=Symbol(`mf.originalSharedProvider`),C={emit:e=>e},w=e=>Array.isArray(e.scope)?e.scope:[e.scope||`default`],T=(e,t)=>{if(t!==`version-first`)return e;let n={};for(let[t,r]of Object.entries(e))n[t]=Object.assign({},r,{[S]:r});return n},E=(e,t)=>{if(!t)return;let n=Object.entries(e||{}),r=n.find(([,e])=>e===t);if(r)return{version:r[0],provider:t,registered:!0};if(typeof t.version==`string`&&t.version)return{version:t.version,provider:t,registered:!1};let i=n.filter(([,e])=>e===t||!!(t.from&&e?.from===t.from));if(i.length===1)return{version:i[0][0],provider:t,registered:!1}},D=(e,t,r,i)=>{if(!e||!r)return;let a=Object.fromEntries(Object.entries(e).filter(([,e])=>e?.shareConfig?.import!==!1));if(Object.keys(a).length===0)return;let o=w(r),s=T(a,i),c={};for(let e of o)c[e||`default`]={[t]:s};let l=n.getRegisteredShare(c,t,{...r,scope:o,strategy:i},C)?.shared;return l?.[S]||l},O=(e,t,n,r)=>{let i=e=>k(e,n),a=Object.fromEntries(Object.entries(e||{}).filter(([,e])=>!i(e)&&e?.shareConfig?.import!==!1));n?.version&&n.shareConfig?.import!==!1&&(a[n.version]||(a[n.version]=n));let o=D(a,t,n,r);return i(o)?void 0:o},k=(e,t)=>e===t||!!(t?.from&&e?.from===t.from),A=(e,t,n,r,i,a,o,s,c)=>{if(c!==`version-first`||!s)return;let l=t?.options?.shared?.[i],u=Array.isArray(l)?l.find(e=>e?.version===a):void 0,d=(s?.from===t?.options?.name?s:void 0)||(k(u,s)?u:t?void 0:s);if(d)return e.some(e=>e!==t&&e?.options?.name===o?.from&&e?.shareScopeMap?.[r]===n)?d:void 0},ee=(e,t,n,r,i,a,o,s,c)=>{let l=a.registered?A(e,t,n,r,i,a.version,a.provider,s,c):void 0,u=l||o;if(u&&(!a.registered||k(u,s)))return{provider:u,scopeRootProvider:l}};async function j(){return y||=x(()=>e(()=>import(`./assets/_virtual_mf-localSharedImportMap___mfe_internal__signalk_questdb__mf_owner__1-BiBqFhVp.js`),[],import.meta.url)).catch(e=>{throw y=void 0,e}),y}async function M(){return c}async function N(e={},n=[],r={}){let i=(e,t,n,r)=>{let i=(Array.isArray(r)?r[0]:r)||`default`,a=t||!n?e:e+`@`+n,o={canonical:i+`:`+a};return i==="default"&&(o.aliases=[a]),o},a=(e,t)=>{let n=e[t.canonical];if(n!==void 0)return n;let r=t.aliases||[];for(let n of r){if(!Object.prototype.hasOwnProperty.call(e,n))continue;let r=e[n];if(r!==void 0)return e[t.canonical]=r,r}},o=Symbol.for(`module-federation.shared-cache-listeners`),s=Symbol.for(`module-federation.shared-cache-owners`),c=e=>{let t=e[s];return t===void 0&&(t=Object.create(null),Object.defineProperty(e,s,{value:t,enumerable:!1,configurable:!1,writable:!1})),t},l=(e,t)=>e[s]?.[t.canonical],u=(e,t,n,r)=>{e[t.canonical]=n;let i=t.aliases||[];for(let t of i)Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0});let a=e[s];r===void 0?a&&delete a[t.canonical]:c(e)[t.canonical]=r;let l=e[o]?.[t.canonical];if(l)for(let e of l)e(n);return n},f=Symbol.for(`module-federation.tree-shaking-shared-cache`),y=e=>{let t=e[f];return t===void 0&&(t=Object.create(null),Object.defineProperty(e,f,{value:t,enumerable:!1,configurable:!1,writable:!1})),t},S=(e,t,n,r)=>{if(!Array.isArray(n))return r;let i=[...new Set(n)].sort(),a=y(e),o=a[t.canonical]||=[],s=o.find(e=>e.providedExports.length===i.length&&e.providedExports.every((e,t)=>e===i[t]));return s?s.value=r:o.push({providedExports:i,value:r}),r},C=Symbol.for(`module-federation.tree-shaking-shared-selection-cache`),w=e=>{let t=e[C];return t===void 0&&(t=Object.create(null),Object.defineProperty(e,C,{value:t,enumerable:!1,configurable:!1,writable:!1})),t},T=(e,t,n)=>{let r=a(e,t);return r===void 0?e[C]?.[t.canonical]?.[n]:r},A=(e,t,n,r)=>{let i=w(e),a=i[t.canonical]||=Object.create(null);return a[n]=r,r},M=globalThis.__FEDERATION__?.__INSTANCES__||[],N=n.find(e=>e?.from)?.from,P=M.find(t=>t?.options?.name===N&&t?.shareScopeMap?.default===e)||M.find(t=>t?.options?.name!==_&&t?.shareScopeMap?.default===e),F=Object.create(null),I=e=>{let t=Object.create(null);for(let[n,r]of Object.entries(e||{}))t[n]=Object.assign(Object.create(null),r);return t},te=(e,t)=>{for(let[n,r]of Object.entries(G.shareScopeMap?.[e]||{}))for(let[e,i]of Object.entries(r||{})){if(!i||i.get===R[n]?.get)continue;let r=t[n]||={};r[e]===void 0&&(r[e]=i)}},ne=(e,t)=>{te(e,t);let n=!P&&Object.values(t||{}).some(e=>Object.values(e||{}).some(z)),r=n?I(t):t;return F[e]={host:t,runtime:r,isWebpackScope:n},r},re=()=>{let e=Object.values(F).filter(({isWebpackScope:e})=>e);if(e.length!==0)for(let{host:t,runtime:n}of e)for(let[e,r]of Object.entries(t||{})){let t=n[e]||=Object.create(null);for(let[e,n]of Object.entries(r||{}))t[e]=n}},L=Object.create(null);for(let[t,n]of Object.entries(e)){let e=L[t]=Object.create(null);for(let[t,r]of Object.entries(n))e[t]=Object.assign({},r)}let{usedShared:R,usedRemotes:ie}=await j();function z(e){if(typeof e?.get!=`function`)return!1;let t=Function.prototype.toString.call(e.get);return t.includes(`__webpack_require__`)||/\.\s*e\s*\([^)]*\)\s*\.then\s*\(/.test(t)}let ae=Object.values(L).some(e=>Object.values(e||{}).some(z)),oe=e=>{let t=e.split(`/`);return e.startsWith(`@`)?t.slice(0,2).join(`/`):t[0]},B=(t,n,r,i)=>{if(typeof O!=`function`)return;let a=oe(t),o=!i||a===t?[[t,n]]:[[t,n],[a,R[a]]];for(let[n,i]of o){if(!i)continue;let a=O(r?n===t?r:L[n]:L[n]??e[n],n,i,`version-first`);if(a)return a}},se=(e,t,n)=>{let r=B(e,t,n,!0);return r&&z(r)&&!r.lib&&!r.loaded?r:void 0};var V=m[g];if(V||=m[g]={from:_},n.indexOf(V)>=0)return;n.push(V);let ce=e=>{let t=e;for(let e=0;e<5;e++){let e=t?.default;if(!e||typeof e!=`object`||Object.keys(e).length===0)break;let n=Object.keys(t).filter(e=>e!=="default").map(e=>t[e]);if(n.length>0&&n.some(e=>e!==void 0))break;t=e}return t},le=[],ue=globalThis.window===void 0?await Promise.all([]):[],H=`__mf_vite_runtime_share_load_id__`,de=0,U=new Map,W=new Map,G=t({name:_,remotes:ie,shared:R,plugins:[fe(),pe(),...le,...ue],shareStrategy:`version-first`});G.initShareScopeMap(`default`,ne(`default`,e));function fe(){return{name:`vite-share-pin-lifecycle-plugin`,resolveShare(e){let t=e.shareInfo?.[H],n=t===void 0?void 0:W.get(t);if(!n)return e;let r=e.resolver;return e.resolver=(...e)=>(n.pinned.reapply(),r(...e)),n.pinned.reveal(),e}}}function pe(){return{name:`vite-real-name-snapshot-plugin`,afterLoadSnapshot(e){let t=e&&e.remoteSnapshot,n=t&&t.globalName,r=t&&t.version;if(!n||!r||!t.remoteEntry)return e;let i=globalThis.__FEDERATION__&&globalThis.__FEDERATION__.moduleInfo,a=n+`:`+r;return i&&!i[a]&&(i[a]=t),e}}}let me=G.sharedHandler.hooks.lifecycle.resolveShare,K=new WeakMap;me.on(e=>{let t=e.shareInfo?.[H],n=e.resolver;return typeof n==`function`&&(e.resolver=(...e)=>{let r=n(...e),i=r?.shared;return i&&(typeof i==`object`||typeof i==`function`)&&!K.has(i)&&K.set(i,{from:i.from}),t!==void 0&&i&&U.set(t,i),r}),e});let he=(e,t,n,r)=>{if(!e||e[t]!==n)return;let i=Object.assign({},r,{version:r.version??t,scope:r.scope??n?.scope??[`default`],strategy:`loaded-first`}),a=r.from;e[t]=i;let o=()=>n===void 0?e[t]===void 0:e[t]===n;return{provider:i,reveal(){return e[t]===i&&(n===void 0?delete e[t]:e[t]=n,!0)},reapply(){return o()?(e[t]=i,!0):!1},release(s,c=!0){return r.from=a,e[t]===i?c?s?(i.from=a,s&&i.lib&&(i.loaded=!0),r.strategy===void 0?delete i.strategy:i.strategy=r.strategy,!0):(n===void 0?delete e[t]:e[t]=n,!1):(n===void 0?delete e[t]:e[t]=n,!0):!c&&o()}}},ge=e=>Object.entries(e||{}).map(([e,t])=>({provider:t,version:e,from:t.from,registered:!0})),_e=(e,t)=>{if(t===void 0)return;let n;for(let r of e){let e=r.provider,i=e.treeShaking||e;if(r.loadedFactory===t||e.lib===t||i.lib===t){if(n)return;n=r}}return n},ve=async(e,t,n)=>{let r=++de;W.set(r,{pinned:n});try{let n=await G.loadShare(e,{customShareInfo:{shareConfig:t,[H]:r}});return{factory:n===!1?void 0:n,selectedProvider:U.get(r)}}finally{U.delete(r),W.delete(r)}},ye=async(e,t,n,r,i,a,o=!0)=>{let s=a.from,c=he(n,r,i,a);if(!c)return;let l;try{l=await ve(e,t,c)}catch(e){throw c.release(!1),e}let u=l?.factory;if(u===void 0){c.release(!1);return}let d=ge(n),f=c.provider.treeShaking||c.provider,p=c.provider.lib===u||f.lib===u;if(!o&&p){let e=d.findIndex(e=>e.provider===c.provider);e!==-1&&d.splice(e,1)}!o&&!d.some(e=>e.provider===a)&&d.push({provider:a,version:r,from:s,registered:!1,loadedFactory:p?u:void 0});let m=!o&&l.selectedProvider===c.provider&&p?a:l.selectedProvider;if(m&&!d.some(e=>e.provider===m)){let e=K.get(m),t=typeof m.version==`string`&&m.version?m.version:r;d.push({provider:m,version:t,from:e?e.from:m.from,registered:n?.[t]===m,loadedFactory:u})}let h=d.find(e=>e.provider===m)??_e(d,u);if(!c.release(!0,h?.provider===c.provider)||!h)return;let g=K.get(h.provider);h.from=h.provider===a?s:g?g.from:h.provider.from,g&&(h.provider.from=g.from);let _=typeof u==`function`?u():u,v=await Promise.resolve(_);if(!(h.registered&&n?.[h.version]!==h.provider))return{provider:h.provider,selection:h,resolved:v}},q=new Set,J=new Map,be=async(t,n,r)=>{let o=!!n.shareConfig?.singleton;if(!o&&n.canLiveRebind!==!1)try{let s=O(r,t,n,`version-first`),c=E(r,s);if(!c||n.shareConfig?.import===!1&&k(s,n)||s?.shareConfig?.import===!1)return;let{version:l}=c;if(!o&&l!==n.version||!s.lib&&!s.loading&&!(s.loaded&&typeof s.get==`function`))return;let d=i(t,o,n.version,n.scope);if(a(p.share,d)!==void 0)return;let f=e[t],m=f?.[l];if(c.registered&&!k(m,s))return;let h,g=s.lib;if(!g&&z(s)||(!g&&s.loading&&(g=await s.loading),!g&&s.loaded&&typeof s.get==`function`&&(g=await s.get()),!g))return;let _=typeof g==`function`?g():g,v=await Promise.resolve(_),y=c.registered?m:s;h={provider:y,selection:{provider:y,version:l,from:s.from,registered:c.registered},resolved:v};let b=h?.provider,x=h?.selection;if(!x)return;let S=h?.resolved;if(S===void 0||a(p.share,d)!==void 0||x.registered&&f?.[x.version]!==b)return;u(p.share,d,ce(S),x.from),q.add(b)}catch(e){console.error(`[Module Federation] Failed to bridge materialized shared module "`+t+`"`,e)}},xe=async(t,n,r,o,s)=>{try{let c=i(t,n.shareConfig?.singleton,n.version,n.scope),d=a(p.share,c),f=l(p.share,c),m=O(r,t,n,`version-first`),h=m||D(r,t,n,`version-first`)||n,g=E(r,h);if(!g)return;let v=k(h,n),{version:y}=g;if(!n.shareConfig?.singleton&&y!==n.version)return;let b=o?.[y],x=ee(M,P,e,`default`,t,g,m,b,`version-first`);if(!x&&!v)return;let{provider:S,scopeRootProvider:C}=x||{provider:h,scopeRootProvider:void 0};if(n.canLiveRebind===!1||n.shareConfig?.import===!1&&k(S,n)||S?.shareConfig?.import===!1||d!==void 0&&f!==_)return;let w=e[t],T=w?.[y];if(g.registered&&!C&&!k(T,S))return;let A=await ye(t,n.shareConfig,w,y,T,S,g.registered&&!v),j=A?.provider,N=A?.selection;if(!N||k(j,n)||s&&(s.version!==N.version||!k({from:N.from},s.provider))||q.has(j))return;let F=A?.resolved;if(F===void 0)return;let I=a(p.share,c),te=l(p.share,c);if(I!==void 0&&te!==_||N.registered&&w?.[N.version]!==j)return;s||J.set(t,{version:N.version,provider:{from:N.from}}),q.add(j);let ne=ce(F);u(p.share,c,ne,N.from)}catch(e){console.error(`[Module Federation] Failed to bridge external shared module "`+t+`"`,e)}};for(let e of v)await Promise.all(e.map(async e=>{let t=R[e];t&&t.materialize!==!1&&!t.treeShaking&&await be(e,t,L[e])}));for(let[e,t]of Object.entries(R)){if(t.treeShaking)continue;let n=i(e,t.shareConfig?.singleton,t.version,t.scope);if(a(p.share,n)!==void 0)continue;let r=i(e,!0,t.version,t.scope),o=a(p.share,r);o!==void 0&&u(p.share,n,o,l(p.share,r))}let Se=[`react`],Ce=[[`react`]],Y=new Map(Se.map((e,t)=>[e,t])),we={},X=Se.filter(e=>R[e]&&(R[e].materialize!==!1||R[e].shareConfig?.import===!1));p.providerInit||=new Map;let Te=(e,t)=>{let n=p.providerInit.get(e);if(n)return n;let r=Promise.resolve().then(t);return p.providerInit.set(e,r),r.catch(()=>p.providerInit.delete(e)),r};var Ee=async e=>{let t=new Set(e);for(let e of Ce)await Promise.all(e.filter(e=>t.has(e)).map(async e=>{let t=R[e],n=i(e,t.shareConfig?.singleton,t.version,t.scope);if(t.shareConfig?.import===!1||t.treeShaking||a(p.share,n)!==void 0)return;let r=i(e,!0,t.version,t.scope),o=a(p.share,r);if(o!==void 0){u(p.share,n,o,l(p.share,r));return}let s=typeof B==`function`?B(e,t):void 0;if(s){let e=s.lib;if(!e&&s.loading&&(e=await s.loading),!e&&s.loaded&&typeof s.get==`function`&&(e=await s.get()),e){let t=typeof e==`function`?e():e,r=await Promise.resolve(t);u(p.share,n,(e=>{let t=e;for(let e=0;e<5;e++){let e=t?.default;if(!e||typeof e!=`object`||Object.keys(e).length===0)break;let n=Object.keys(t).filter(e=>e!=="default").map(e=>t[e]);if(n.length>0&&n.some(e=>e!==void 0))break;t=e}return t})(r),s.from)}return}let c=n.canonical,d=await Te(c,async()=>{let e=await t.get(),n=typeof e==`function`?e():e;return Promise.resolve(n)}),f=(e=>{let t=e;for(let e=0;e<5;e++){let e=t?.default;if(!e||typeof e!=`object`||Object.keys(e).length===0)break;let n=Object.keys(t).filter(e=>e!=="default").map(e=>t[e]);if(n.length>0&&n.some(e=>e!==void 0))break;t=e}return t})(d),m=f===d?{...d}:f;m.__esModule!==!0&&Object.defineProperty(m,"__esModule",{value:!0,enumerable:!1}),u(p.share,n,m,_)}))};let De=e=>{let t=R[e];if(!t.treeShaking&&t.shareConfig?.import!==!1)return!1;let n=i(e,t.shareConfig?.singleton,t.version,t.scope);return t.treeShaking?T(p.share,n,_)===void 0&&a(p.share,n)===void 0:a(p.share,n)===void 0},Oe=e=>{let t=R[e],n=i(e,t.shareConfig?.singleton,t.version,t.scope);return(t.treeShaking?T(p.share,n,_)??a(p.share,n):a(p.share,n))===void 0?t.treeShaking||t.shareConfig?.import===!1?!0:typeof O==`function`&&!!O(L[e],e,t,`version-first`):!1},ke=e=>{let t=!0;for(;t;){t=!1;for(let n of X){let r=Y.get(n);e.has(r)||(we[r]||[]).some(t=>e.has(t))&&(e.add(r),t=!0)}}return e},Z=ke(new Set(X.filter(Oe).map(e=>Y.get(e)))),Ae=X.filter(e=>!Z.has(Y.get(e)));var je=X.filter(e=>Z.has(Y.get(e)));await Ee(Ae);try{await x(async()=>{await Promise.all(await G.initializeSharing(`default`,{strategy:`version-first`,from:`build`,initScope:n}))})}catch(e){console.error(`[Module Federation]`,e)}re();let Me=async()=>{for(let t of v)await Promise.all(t.map(async t=>{let n=R[t];n&&n.materialize!==!1&&!n.treeShaking&&await xe(t,n,e[t],L[t],void 0)}))};await Me(),ae&&(b=Me);try{let e=globalThis.__FEDERATION__?.__SHARE__,t=Object.create(null);if(e)for(let[,n]of Object.entries(e))for(let e of h){let r=n?.[e];if(r)for(let[e,n]of Object.entries(r)){let r=R?.[e],i=L[e],a=J.get(e);if(!r||!i||!a||r.treeShaking)continue;let o=t[e]||(t[e]=Object.create(null));for(let[e,t]of Object.entries(n)){if(!t.lib||a.version!==e||!k(t,a.provider))continue;let n=i[e];(t===n||n?.from&&t.from===n.from)&&(t===r||r.from&&t.from===r.from||o[e]===void 0&&(o[e]=t))}}}for(let e of v)await Promise.all(e.map(async e=>{let n=t[e];n&&await xe(e,R[e],n,L[e],J.get(e))}))}catch(e){console.error(`[Module Federation] Failed to bridge external shared modules`,e)}let Ne=async()=>{},Pe=async(t,n)=>{let r=i(t,n.shareConfig?.singleton,n.version,n.scope),o=n.treeShaking?T(p.share,r,_):a(p.share,r);if(n.shareConfig?.import!==!1||o!==void 0||se(t,n,L[t]))return;let s=e=>{let t=e;for(let e=0;e<5;e++){let e=t?.default;if(!e||typeof e!=`object`||Object.keys(e).length===0)break;let n=Object.keys(t).filter(e=>e!=="default").map(e=>t[e]);if(n.length>0&&n.some(e=>e!==void 0))break;t=e}return t},c=e?.[t],l=D(c,t,n,`version-first`)||n,d=E(c,l);if(!d)return;let f=e=>e===n||e?.shareConfig?.import===!1;if(f(l))return;let{version:m}=d,h=c?.[m],g=await ye(t,n.shareConfig,c,m,h,l,d.registered),v=g?.selection,y=g?.provider,b=g?.resolved;if(!v||f(y)||b===void 0||(n.treeShaking?T(p.share,r,_):a(p.share,r))!==void 0||v.registered&&c?.[v.version]!==y)return;let x=s(b);if(n.treeShaking){let e=n.treeShaking.providedExports??n.treeShaking.usedExports??[];S(p.share,r,e,x),A(p.share,r,_,x)}else u(p.share,r,x,v.from)},Q=[],$=new Set;for(let e of je){let t=R[e],n=Y.get(e);if(De(e))try{t.treeShaking?await Ne(e,t):t.shareConfig?.import===!1&&await Pe(e,t)}catch(t){console.error(`[Module Federation] Failed to resolve runtime-only shared module "${e}"`,t)}De(e)&&$.add(n)}return ke($),Q.push(...je.filter(e=>!$.has(Y.get(e)))),await Ee(Q),d(G),G}async function P(e){let t=await M();if(!(e in t))throw Error(`[Module Federation] Module ${e} does not exist in container.`);return b&&await b(),p.pendingShareLoads&&await Promise.all(p.pendingShareLoads),t[e]().then(e=>()=>e)}export{P as get,N as init};
2
2
  if (typeof document !== 'undefined' && document.head) {
3
3
  try {
4
4
  for (const __mfWarmupPath of ["assets/_virtual_mf-localSharedImportMap___mfe_internal__signalk_questdb__mf_owner__1-BiBqFhVp.js","assets/vite-preload-helper-uBIymjUX.js","assets/dist-BK97MX24.js","assets/utils-jR9fY54i.js"]) {
@@ -2,7 +2,6 @@
2
2
  "$schema": "https://raw.githubusercontent.com/googleapis/release-please/main/schemas/config.json",
3
3
  "release-type": "node",
4
4
  "include-component-in-tag": false,
5
- "versioning": "always-bump-patch",
6
5
  "changelog-type": "github",
7
6
  "skip-changelog": true,
8
7
  "pull-request-title-pattern": "chore: release ${version}",