signalk-webhook-bridge 2.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +52 -0
- package/LICENSE +674 -0
- package/README.md +358 -0
- package/assets/icon-128.png +0 -0
- package/docs/screenshots/config.png +0 -0
- package/package.json +63 -0
- package/plugin/index.js +481 -0
- package/plugin/paths.js +38 -0
- package/plugin/storage.js +145 -0
- package/plugin/units.js +90 -0
- package/plugin/webhook.js +52 -0
- package/public/540.main.js +2 -0
- package/public/540.main.js.LICENSE.txt +9 -0
- package/public/651.main.js +2 -0
- package/public/651.main.js.LICENSE.txt +9 -0
- package/public/main.js +2 -0
- package/public/main.js.LICENSE.txt +9 -0
- package/public/remoteEntry.js +1 -0
package/plugin/units.js
ADDED
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* plugin/units.js
|
|
3
|
+
*
|
|
4
|
+
* Converts numeric values from native Signal K units to selected output units.
|
|
5
|
+
* Supports speed, distance, angle, temperature and pressure, and supplies labels
|
|
6
|
+
* for the outgoing units map. Non-numeric values and unknown conversions pass through.
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
// Conversions assume the input uses the native unit for the selected quantity.
|
|
10
|
+
function convertValue(value, units) {
|
|
11
|
+
if (
|
|
12
|
+
value === null ||
|
|
13
|
+
value === undefined ||
|
|
14
|
+
typeof value !== "number" ||
|
|
15
|
+
Number.isNaN(value)
|
|
16
|
+
) {
|
|
17
|
+
return value;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
switch (units) {
|
|
21
|
+
case "native":
|
|
22
|
+
return value;
|
|
23
|
+
|
|
24
|
+
// Speed: metres per second to the selected speed unit.
|
|
25
|
+
case "knots":
|
|
26
|
+
return value * 1.94384;
|
|
27
|
+
|
|
28
|
+
case "kmh":
|
|
29
|
+
return value * 3.6;
|
|
30
|
+
|
|
31
|
+
case "mph":
|
|
32
|
+
return value * 2.23694;
|
|
33
|
+
|
|
34
|
+
// Distance / depth: metres to metres or feet.
|
|
35
|
+
case "metres":
|
|
36
|
+
return value;
|
|
37
|
+
|
|
38
|
+
case "feet":
|
|
39
|
+
return value * 3.28084;
|
|
40
|
+
|
|
41
|
+
// Angle: radians to degrees.
|
|
42
|
+
case "degrees":
|
|
43
|
+
return value * (180 / Math.PI);
|
|
44
|
+
|
|
45
|
+
// Temperature: kelvin to Celsius or Fahrenheit.
|
|
46
|
+
case "celsius":
|
|
47
|
+
return value - 273.15;
|
|
48
|
+
|
|
49
|
+
case "fahrenheit":
|
|
50
|
+
return (value - 273.15) * (9 / 5) + 32;
|
|
51
|
+
|
|
52
|
+
// Pressure: pascals to hectopascals or millibars.
|
|
53
|
+
case "hpa":
|
|
54
|
+
return value / 100;
|
|
55
|
+
|
|
56
|
+
case "mbar":
|
|
57
|
+
return value / 100;
|
|
58
|
+
|
|
59
|
+
default:
|
|
60
|
+
return value;
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
module.exports = {
|
|
65
|
+
convertValue,
|
|
66
|
+
getOutputUnitLabel,
|
|
67
|
+
};
|
|
68
|
+
|
|
69
|
+
// Use metadata for native units, or map a configured conversion to its output label.
|
|
70
|
+
// Missing native metadata becomes "unknown"; unrecognised unit names pass through.
|
|
71
|
+
function getOutputUnitLabel(configuredUnits, nativeUnits) {
|
|
72
|
+
if (!configuredUnits || configuredUnits === "native") {
|
|
73
|
+
return nativeUnits || "unknown";
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
const labels = {
|
|
77
|
+
knots: "kn",
|
|
78
|
+
kmh: "km/h",
|
|
79
|
+
mph: "mph",
|
|
80
|
+
metres: "m",
|
|
81
|
+
feet: "ft",
|
|
82
|
+
degrees: "deg",
|
|
83
|
+
celsius: "degC",
|
|
84
|
+
fahrenheit: "degF",
|
|
85
|
+
hpa: "hPa",
|
|
86
|
+
mbar: "mbar",
|
|
87
|
+
};
|
|
88
|
+
|
|
89
|
+
return labels[configuredUnits] || configuredUnits;
|
|
90
|
+
}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* plugin/webhook.js
|
|
3
|
+
*
|
|
4
|
+
* Sends a JSON payload to a webhook with optional Bearer authentication.
|
|
5
|
+
* Makes one POST attempt, returning its HTTP status on success and throwing on failure.
|
|
6
|
+
* Queue retention and retry scheduling are handled by the plugin delivery worker.
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
const fetch = require("node-fetch");
|
|
10
|
+
|
|
11
|
+
async function sendWebhook({ url, authKey, payload, app }) {
|
|
12
|
+
if (!url) {
|
|
13
|
+
throw new Error("Webhook URL is not configured");
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
const headers = {
|
|
17
|
+
"Content-Type": "application/json",
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
if (authKey) {
|
|
21
|
+
headers.Authorization = `Bearer ${authKey}`;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
const response = await fetch(url, {
|
|
25
|
+
method: "POST",
|
|
26
|
+
headers,
|
|
27
|
+
body: JSON.stringify(payload),
|
|
28
|
+
});
|
|
29
|
+
|
|
30
|
+
// Include the response body in errors so the caller can log the delivery failure.
|
|
31
|
+
if (!response.ok) {
|
|
32
|
+
const responseText = await response.text();
|
|
33
|
+
|
|
34
|
+
throw new Error(
|
|
35
|
+
`Webhook returned HTTP ${response.status}${
|
|
36
|
+
responseText ? `: ${responseText}` : ""
|
|
37
|
+
}`,
|
|
38
|
+
);
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
if (app) {
|
|
42
|
+
app.debug(`Webhook sent successfully: HTTP ${response.status}`);
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
return {
|
|
46
|
+
status: response.status,
|
|
47
|
+
};
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
module.exports = {
|
|
51
|
+
sendWebhook,
|
|
52
|
+
};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/*! For license information please see 540.main.js.LICENSE.txt */
|
|
2
|
+
"use strict";(self.webpackChunksignalk_webhook_bridge=self.webpackChunksignalk_webhook_bridge||[]).push([[540],{869(e,t){var n=Symbol.for("react.transitional.element"),r=Symbol.for("react.portal"),o=Symbol.for("react.fragment"),u=Symbol.for("react.strict_mode"),s=Symbol.for("react.profiler"),i=Symbol.for("react.consumer"),a=Symbol.for("react.context"),c=Symbol.for("react.forward_ref"),f=Symbol.for("react.suspense"),l=Symbol.for("react.memo"),p=Symbol.for("react.lazy"),y=Symbol.for("react.activity"),d=Symbol.for("react.view_transition"),h=Symbol.iterator,_={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},v=Object.assign,b={};function m(e,t,n){this.props=e,this.context=t,this.refs=b,this.updater=n||_}function S(){}function E(e,t,n){this.props=e,this.context=t,this.refs=b,this.updater=n||_}m.prototype.isReactComponent={},m.prototype.setState=function(e,t){if("object"!=typeof e&&"function"!=typeof e&&null!=e)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")},m.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")},S.prototype=m.prototype;var w=E.prototype=new S;w.constructor=E,v(w,m.prototype),w.isPureReactComponent=!0;var g=Array.isArray;function k(){}var j={H:null,A:null,T:null,S:null},H=Object.prototype.hasOwnProperty;function C(e,t,r){var o=r.ref;return{$$typeof:n,type:e,key:t,ref:void 0!==o?o:null,props:r}}function R(e){return"object"==typeof e&&null!==e&&e.$$typeof===n}var $=/\/+/g;function T(e,t){return"object"==typeof e&&null!==e&&null!=e.key?(n=""+e.key,r={"=":"=0",":":"=2"},"$"+n.replace(/[=:]/g,function(e){return r[e]})):t.toString(36);var n,r}function x(e,t,o,u,s){var i=typeof e;"undefined"!==i&&"boolean"!==i||(e=null);var a,c,f=!1;if(null===e)f=!0;else switch(i){case"bigint":case"string":case"number":f=!0;break;case"object":switch(e.$$typeof){case n:case r:f=!0;break;case p:return x((f=e._init)(e._payload),t,o,u,s)}}if(f)return s=s(e),f=""===u?"."+T(e,0):u,g(s)?(o="",null!=f&&(o=f.replace($,"$&/")+"/"),x(s,t,o,"",function(e){return e})):null!=s&&(R(s)&&(a=s,c=o+(null==s.key||e&&e.key===s.key?"":(""+s.key).replace($,"$&/")+"/")+f,s=C(a.type,c,a.props)),t.push(s)),1;f=0;var l,y=""===u?".":u+":";if(g(e))for(var d=0;d<e.length;d++)f+=x(u=e[d],t,o,i=y+T(u,d),s);else if("function"==typeof(d=null===(l=e)||"object"!=typeof l?null:"function"==typeof(l=h&&l[h]||l["@@iterator"])?l:null))for(e=d.call(e),d=0;!(u=e.next()).done;)f+=x(u=u.value,t,o,i=y+T(u,d++),s);else if("object"===i){if("function"==typeof e.then)return x(function(e){switch(e.status){case"fulfilled":return e.value;case"rejected":throw e.reason;default:switch("string"==typeof e.status?e.then(k,k):(e.status="pending",e.then(function(t){"pending"===e.status&&(e.status="fulfilled",e.value=t)},function(t){"pending"===e.status&&(e.status="rejected",e.reason=t)})),e.status){case"fulfilled":return e.value;case"rejected":throw e.reason}}throw e}(e),t,o,u,s);throw t=String(e),Error("Objects are not valid as a React child (found: "+("[object Object]"===t?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.")}return f}function O(e,t,n){if(null==e)return e;var r=[],o=0;return x(e,r,"","",function(e){return t.call(n,e,o++)}),r}function A(e){if(-1===e._status){var t=(0,e._result)();t.then(function(n){0!==e._status&&-1!==e._status||(e._status=1,e._result=n,void 0===t.status&&(t.status="fulfilled",t.value=n))},function(n){0!==e._status&&-1!==e._status||(e._status=2,e._result=n,void 0===t.status&&(t.status="rejected",t.reason=n))}),-1===e._status&&(e._status=0,e._result=t)}if(1===e._status)return e._result.default;throw e._result}var I="function"==typeof reportError?reportError:function(e){if("object"==typeof window&&"function"==typeof window.ErrorEvent){var t=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:"object"==typeof e&&null!==e&&"string"==typeof e.message?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if("object"==typeof process&&"function"==typeof process.emit)return void process.emit("uncaughtException",e);console.error(e)};function P(e){var t=j.T,n={};n.types=null!==t?t.types:null,j.T=n;try{var r=e(),o=j.S;null!==o&&o(n,r),"object"==typeof r&&null!==r&&"function"==typeof r.then&&r.then(k,I)}catch(e){I(e)}finally{null!==t&&null!==n.types&&(t.types=n.types),j.T=t}}var N={map:O,forEach:function(e,t,n){O(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return O(e,function(){t++}),t},toArray:function(e){return O(e,function(e){return e})||[]},only:function(e){if(!R(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};t.Activity=y,t.Children=N,t.Component=m,t.Fragment=o,t.Profiler=s,t.PureComponent=E,t.StrictMode=u,t.Suspense=f,t.ViewTransition=d,t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=j,t.__COMPILER_RUNTIME={__proto__:null,c:function(e){return j.H.useMemoCache(e)}},t.addTransitionType=function e(t){var n=j.T;if(null!==n){var r=n.types;null===r?n.types=[t]:-1===r.indexOf(t)&&r.push(t)}else P(e.bind(null,t))},t.cache=function(e){return function(){return e.apply(null,arguments)}},t.cacheSignal=function(){return null},t.cloneElement=function(e,t,n){if(null==e)throw Error("The argument must be a React element, but you passed "+e+".");var r=v({},e.props),o=e.key;if(null!=t)for(u in void 0!==t.key&&(o=""+t.key),t)!H.call(t,u)||"key"===u||"__self"===u||"__source"===u||"ref"===u&&void 0===t.ref||(r[u]=t[u]);var u=arguments.length-2;if(1===u)r.children=n;else if(1<u){for(var s=Array(u),i=0;i<u;i++)s[i]=arguments[i+2];r.children=s}return C(e.type,o,r)},t.createContext=function(e){return(e={$$typeof:a,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null}).Provider=e,e.Consumer={$$typeof:i,_context:e},e},t.createElement=function(e,t,n){var r,o={},u=null;if(null!=t)for(r in void 0!==t.key&&(u=""+t.key),t)H.call(t,r)&&"key"!==r&&"__self"!==r&&"__source"!==r&&(o[r]=t[r]);var s=arguments.length-2;if(1===s)o.children=n;else if(1<s){for(var i=Array(s),a=0;a<s;a++)i[a]=arguments[a+2];o.children=i}if(e&&e.defaultProps)for(r in s=e.defaultProps)void 0===o[r]&&(o[r]=s[r]);return C(e,u,o)},t.createRef=function(){return{current:null}},t.forwardRef=function(e){return{$$typeof:c,render:e}},t.isValidElement=R,t.lazy=function(e){return{$$typeof:p,_payload:{_status:-1,_result:e},_init:A}},t.memo=function(e,t){return{$$typeof:l,type:e,compare:void 0===t?null:t}},t.startTransition=P,t.unstable_useCacheRefresh=function(){return j.H.useCacheRefresh()},t.use=function(e){return j.H.use(e)},t.useActionState=function(e,t,n){return j.H.useActionState(e,t,n)},t.useCallback=function(e,t){return j.H.useCallback(e,t)},t.useContext=function(e){return j.H.useContext(e)},t.useDebugValue=function(){},t.useDeferredValue=function(e,t){return j.H.useDeferredValue(e,t)},t.useEffect=function(e,t){return j.H.useEffect(e,t)},t.useEffectEvent=function(e){return j.H.useEffectEvent(e)},t.useId=function(){return j.H.useId()},t.useImperativeHandle=function(e,t,n){return j.H.useImperativeHandle(e,t,n)},t.useInsertionEffect=function(e,t){return j.H.useInsertionEffect(e,t)},t.useLayoutEffect=function(e,t){return j.H.useLayoutEffect(e,t)},t.useMemo=function(e,t){return j.H.useMemo(e,t)},t.useOptimistic=function(e,t){return j.H.useOptimistic(e,t)},t.useReducer=function(e,t,n){return j.H.useReducer(e,t,n)},t.useRef=function(e){return j.H.useRef(e)},t.useState=function(e){return j.H.useState(e)},t.useSyncExternalStore=function(e,t,n){return j.H.useSyncExternalStore(e,t,n)},t.useTransition=function(){return j.H.useTransition()},t.version="19.3.0"},540(e,t,n){e.exports=n(869)}}]);
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/*! For license information please see 651.main.js.LICENSE.txt */
|
|
2
|
+
"use strict";(self.webpackChunksignalk_webhook_bridge=self.webpackChunksignalk_webhook_bridge||[]).push([[651],{651(e,t,a){a.r(t),a.d(t,{default:()=>s});var r=a.cw(function(e,t){var a=Symbol.for("react.transitional.element"),r=Symbol.for("react.fragment");function i(e,t,r){var i=null;if(void 0!==r&&(i=""+r),void 0!==t.key&&(i=""+t.key),"key"in t)for(var n in r={},t)"key"!==n&&(r[n]=t[n]);else r=t;return t=r.ref,{$$typeof:a,type:e,key:i,ref:void 0!==t?t:null,props:r}}t.Fragment=r,t.jsx=i,t.jsxs=i}),i=a.cw(function(e,t){e.exports=r()}),n=a(231);function s({configuration:e={},save:t}){const[a,i]=(0,n.useState)(e.webhookUrl||""),[s,l]=(0,n.useState)(e.authKey||""),[o,d]=(0,n.useState)(e.sendFreq||10),[h,u]=(0,n.useState)(Array.isArray(e.paths)?e.paths:[]),[c,g]=(0,n.useState)([]),[m,p]=(0,n.useState)(!0),[y,v]=(0,n.useState)(""),[b,x]=(0,n.useState)(null),[j,f]=(0,n.useState)(null),[k,w]=(0,n.useState)(""),[S,C]=(0,n.useState)(!1);(0,n.useEffect)(()=>{fetch("/plugins/signalk-webhook-bridge/paths").then(e=>{if(!e.ok)throw new Error(`HTTP ${e.status}`);return e.json()}).then(e=>{g(Array.isArray(e.paths)?e.paths:[]),p(!1)}).catch(e=>{console.error("Unable to load Signal K paths:",e),v("Unable to load available Signal K paths."),p(!1)})},[]),(0,n.useEffect)(()=>{let e=!0;const t=async()=>{try{const t=await fetch("/plugins/signalk-webhook-bridge/status");if(!t.ok)throw new Error(`HTTP ${t.status}`);const a=await t.json();e&&(f(a),w(""))}catch(t){console.error("Unable to load webhook status:",t),e&&w("Unable to load webhook status.")}};t();const a=setInterval(t,5e3);return()=>{e=!1,clearInterval(a)}},[]);const B=(e,t,a)=>{u(r=>r.map((r,i)=>i===e?{...r,[t]:a}:r))};return(0,r().jsxs)("div",{style:{padding:"1rem",maxWidth:"900px"},children:[(0,r().jsx)("h2",{children:"Webhook Bridge"}),(0,r().jsx)("div",{style:{marginBottom:"1.25rem",maxWidth:"750px",lineHeight:"1.5",opacity:.8},children:"Send selected Signal K data to an external webhook at a regular interval. Choose the data paths to include, give each value a webhook field name, and select the units you want to send. If delivery is unavailable, updates are stored locally and automatically sent in order when the connection returns."}),(0,r().jsxs)("div",{style:{marginBottom:"1.5rem",padding:"1rem",borderRadius:"6px",transition:"background 0.2s ease, border 0.2s ease",...(e=>{switch(e){case"queued":case"waiting":return{background:"rgba(255, 152, 0, 0.10)",border:"1px solid rgba(255, 152, 0, 0.40)"};case"error":return{background:"rgba(244, 67, 54, 0.10)",border:"1px solid rgba(244, 67, 54, 0.40)"};default:return{background:"rgba(33, 150, 243, 0.08)",border:"1px solid rgba(33, 150, 243, 0.35)"}}})(j?.deliveryState)},children:[(0,r().jsxs)("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",gap:"1rem",marginBottom:"0.75rem"},children:[(0,r().jsxs)("div",{children:[(0,r().jsx)("h3",{style:{margin:0},children:"Status"}),(0,r().jsx)("div",{style:{marginTop:"0.25rem",fontSize:"0.9rem",opacity:.75},children:"Current delivery and queue status."})]}),(0,r().jsx)("button",{type:"button",onClick:async()=>{C(!0);try{const e=await fetch("/plugins/signalk-webhook-bridge/retry",{method:"POST"});if(!e.ok)throw new Error(`HTTP ${e.status}`);const t=await e.json();f(t),w("")}catch(e){console.error("Unable to retry webhook delivery:",e),w("Unable to retry webhook delivery.")}finally{C(!1)}},disabled:S,style:{padding:"0.5rem 0.8rem",cursor:S?"default":"pointer",opacity:S?.7:1},children:S?"Retrying...":"Retry Now"})]}),k&&(0,r().jsx)("div",{style:{marginBottom:"0.75rem",padding:"0.65rem 0.8rem",border:"1px solid rgba(244, 67, 54, 0.45)",borderRadius:"6px",background:"rgba(244, 67, 54, 0.12)"},children:k}),!j&&!k&&(0,r().jsx)("div",{style:{opacity:.75},children:"Loading status..."}),j&&(0,r().jsxs)("div",{style:{display:"grid",gridTemplateColumns:"180px 1fr",gap:"0.5rem 1rem"},children:[(0,r().jsx)("div",{style:{fontWeight:"600"},children:"Delivery"}),(0,r().jsx)("div",{children:"connected"===j.deliveryState?"Connected":"delivering"===j.deliveryState?"Delivering":"waiting"===j.deliveryState?"Waiting to retry":"queued"===j.deliveryState?"Queued":"error"===j.deliveryState?"Error":"Idle"}),(0,r().jsx)("div",{style:{fontWeight:"600"},children:"Queue"}),(0,r().jsxs)("div",{children:[j.queueCount," ",1===j.queueCount?"entry":"entries"," ","waiting"]}),(0,r().jsx)("div",{style:{fontWeight:"600"},children:"Last capture"}),(0,r().jsx)("div",{children:j.lastCapture?new Date(j.lastCapture).toLocaleString():"Not yet"}),(0,r().jsx)("div",{style:{fontWeight:"600"},children:"Last delivery"}),(0,r().jsx)("div",{children:j.lastDelivery?new Date(j.lastDelivery).toLocaleString():"Not yet"}),j.lastError&&(0,r().jsxs)(r().Fragment,{children:[(0,r().jsx)("div",{style:{fontWeight:"600"},children:"Last error"}),(0,r().jsx)("div",{style:{wordBreak:"break-word"},children:j.lastError})]})]})]}),(0,r().jsxs)("div",{style:{marginBottom:"1rem"},children:[(0,r().jsx)("label",{htmlFor:"webhookUrl",style:{display:"block",fontWeight:"600",marginBottom:"0.35rem"},children:"Webhook URL"}),(0,r().jsx)("input",{id:"webhookUrl",type:"url",value:a,onChange:e=>i(e.target.value),placeholder:"https://example.com/webhook",style:{width:"100%",padding:"0.5rem"}})]}),(0,r().jsxs)("div",{style:{marginBottom:"1rem"},children:[(0,r().jsx)("label",{htmlFor:"authKey",style:{display:"block",fontWeight:"600",marginBottom:"0.35rem"},children:"Authentication Key"}),(0,r().jsx)("input",{id:"authKey",type:"text",value:s,onChange:e=>l(e.target.value),placeholder:"Optional",style:{width:"100%",padding:"0.5rem"}})]}),(0,r().jsxs)("div",{style:{marginBottom:"1.5rem"},children:[(0,r().jsx)("label",{htmlFor:"sendFreq",style:{display:"block",fontWeight:"600",marginBottom:"0.35rem"},children:"Send Interval"}),(0,r().jsx)("input",{id:"sendFreq",type:"number",min:"1",value:o,onChange:e=>d(e.target.value),style:{width:"150px",padding:"0.5rem"}}),(0,r().jsx)("div",{style:{marginTop:"0.35rem",fontSize:"0.9rem",opacity:.75},children:"Minutes between webhook updates."})]}),(0,r().jsx)("hr",{style:{margin:"1.5rem 0"}}),(0,r().jsx)("div",{style:{marginBottom:"1rem"},children:(0,r().jsxs)("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",gap:"1rem"},children:[(0,r().jsxs)("div",{children:[(0,r().jsx)("h3",{style:{marginBottom:"0.25rem"},children:"Signal K Data Paths"}),(0,r().jsx)("div",{style:{fontSize:"0.9rem",opacity:.75},children:"Choose the Signal K values to include in each webhook update."})]}),(0,r().jsx)("button",{type:"button",onClick:()=>{u(e=>[...e,{path:"",fieldName:"",units:"native"}])},style:{padding:"0.5rem 0.8rem",cursor:"pointer"},children:"Add Path"})]})}),0===h.length&&(0,r().jsx)("div",{style:{padding:"1rem",border:"1px solid rgba(128,128,128,0.35)",borderRadius:"6px",marginBottom:"1rem",opacity:.8},children:"No Signal K paths added yet."}),h.map((e,t)=>{const a=c.find(t=>t.path===e.path),i=function(e){switch(e){case"m/s":return[{value:"native",label:"Native (m/s)"},{value:"knots",label:"Knots"},{value:"kmh",label:"km/h"},{value:"mph",label:"mph"}];case"rad":return[{value:"native",label:"Native (rad)"},{value:"degrees",label:"Degrees"}];case"m":return[{value:"native",label:"Native (m)"},{value:"metres",label:"Metres"},{value:"feet",label:"Feet"}];case"K":return[{value:"native",label:"Native (K)"},{value:"celsius",label:"Celsius"},{value:"fahrenheit",label:"Fahrenheit"}];case"Pa":return[{value:"native",label:"Native (Pa)"},{value:"hpa",label:"hPa"},{value:"mbar",label:"mbar"}];default:return[{value:"native",label:e?`Native (${e})`:"Native"}]}}(a?.units);return(0,r().jsx)("div",{style:{border:"1px solid rgba(128,128,128,0.35)",borderRadius:"6px",padding:"1rem",marginBottom:"1rem"},children:(0,r().jsxs)("div",{style:{display:"grid",gridTemplateColumns:"minmax(220px, 2fr) minmax(180px, 1.2fr) minmax(140px, 1fr) auto",gap:"0.75rem",alignItems:"end"},children:[(0,r().jsxs)("div",{children:[(0,r().jsx)("label",{style:{display:"block",fontWeight:"600",marginBottom:"0.35rem"},children:"Signal K Path"}),(0,r().jsx)("input",{type:"text",list:`signalk-paths-${t}`,value:e.path,onChange:e=>B(t,"path",e.target.value),placeholder:m?"Loading Signal K paths...":"Search Signal K paths...",disabled:m,style:{width:"100%",padding:"0.5rem"}}),(0,r().jsx)("datalist",{id:`signalk-paths-${t}`,children:c.map(e=>(0,r().jsx)("option",{value:e.path},e.path))}),y&&(0,r().jsx)("div",{style:{marginTop:"0.35rem",fontSize:"0.85rem"},children:y})]}),(0,r().jsxs)("div",{children:[(0,r().jsx)("label",{style:{display:"block",fontWeight:"600",marginBottom:"0.35rem"},children:"Webhook Field Name"}),(0,r().jsx)("input",{type:"text",value:e.fieldName,onChange:e=>B(t,"fieldName",e.target.value),placeholder:"speed",style:{width:"100%",padding:"0.5rem"}})]}),(0,r().jsxs)("div",{children:[(0,r().jsx)("label",{style:{display:"block",fontWeight:"600",marginBottom:"0.35rem"},children:"Output Units"}),(0,r().jsx)("select",{value:i.some(t=>t.value===e.units)?e.units:"native",onChange:e=>B(t,"units",e.target.value),style:{width:"100%",padding:"0.5rem"},children:i.map(e=>(0,r().jsx)("option",{value:e.value,children:e.label},e.value))})]}),(0,r().jsx)("button",{type:"button",onClick:()=>{return e=t,void u(t=>t.filter((t,a)=>a!==e));var e},style:{padding:"0.5rem 0.75rem",cursor:"pointer"},children:"Remove"})]})},t)}),(0,r().jsxs)("details",{style:{marginTop:"1.5rem",marginBottom:"1.5rem"},children:[(0,r().jsx)("summary",{style:{cursor:"pointer",fontWeight:"600"},children:"What does Webhook Bridge send?"}),(0,r().jsxs)("div",{style:{marginTop:"1rem",lineHeight:"1.5"},children:[(0,r().jsxs)("p",{children:["Webhook Bridge sends an HTTP POST request containing a JSON object. Each configured Signal K path is sent using the ",(0,r().jsx)("strong",{children:"Webhook Field Name"})," you specify above, with values converted to your selected output units."]}),(0,r().jsxs)("p",{children:["Each request also contains the time the update was captured and a ",(0,r().jsx)("code",{children:"units"})," object describing the units used."]}),(0,r().jsx)("pre",{style:{padding:"1rem",overflowX:"auto",borderRadius:"4px",background:"rgba(128,128,128,0.10)"},children:'{\n "timestamp": "2026-09-13T10:15:00.000Z",\n "speed": 5.64,\n "depth": 12.8,\n "units": {\n "speed": "kn",\n "depth": "m"\n }\n}'}),(0,r().jsxs)("p",{children:["Your webhook should return an HTTP"," ",(0,r().jsx)("strong",{children:"2xx response"})," when the data has been successfully received. If delivery fails, the update remains in the local queue and will be sent again later in its original order."]}),(0,r().jsxs)("p",{style:{marginBottom:0},children:["If an Authentication Key is configured, it is sent as a"," ",(0,r().jsx)("strong",{children:"Bearer token"})," in the"," ",(0,r().jsx)("code",{children:"Authorization"})," header."]})]})]}),(0,r().jsx)("button",{type:"button",onClick:async()=>{x("saving");try{await t({...e,webhookUrl:a,authKey:s,sendFreq:Number(o),paths:h}),x("saved"),setTimeout(()=>{x(null)},4e3)}catch(e){console.error("Unable to save configuration:",e),x("error")}},disabled:"saving"===b,style:{padding:"0.55rem 1rem",cursor:"saving"===b?"default":"pointer",marginTop:"0.5rem",opacity:"saving"===b?.7:1},children:"saving"===b?"Saving...":"Save Configuration"}),"saved"===b&&(0,r().jsx)("div",{style:{marginTop:"0.75rem",padding:"0.65rem 0.8rem",border:"1px solid rgba(76, 175, 80, 0.45)",borderRadius:"6px",background:"rgba(76, 175, 80, 0.12)"},children:"Configuration saved successfully."}),"error"===b&&(0,r().jsx)("div",{style:{marginTop:"0.75rem",padding:"0.65rem 0.8rem",border:"1px solid rgba(244, 67, 54, 0.45)",borderRadius:"6px",background:"rgba(244, 67, 54, 0.12)"},children:"Unable to save configuration. Please try again."})]})}i()}}]);
|
package/public/main.js
ADDED
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/*! For license information please see main.js.LICENSE.txt */
|
|
2
|
+
(()=>{"use strict";var e={651(e,t,r){var n=r.cw(function(e,t){Symbol.for("react.transitional.element");Symbol.for("react.fragment")}),o=r.cw(function(e,t){n()});r(231),o()}};const t={};function r(n){const o=t[n];if(void 0!==o)return o.exports;const s=t[n]={exports:{}};return e[n](s,s.exports,r),s.exports}r.m=e,r.c=t,r.cw=e=>{var t;return()=>{if(e){var r=e;e=0,t={exports:{}},r.call(t.exports,t,t.exports)}return t.exports}},r.f={},r.e=e=>Promise.all(Object.keys(r.f).reduce((t,n)=>(r.f[n](e,t),t),[])),r.u=e=>e+".main.js",r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{const e={},t="signalk-webhook-bridge:";r.l=(n,o,s,i)=>{if(e[n])return void e[n].push(o);let c,a;if(void 0!==s){const e=document.getElementsByTagName("script");for(var u=0;u<e.length;u++){const r=e[u];if(r.getAttribute("src")==n||r.getAttribute("data-webpack")==t+s){c=r;break}}}c||(a=!0,c=document.createElement("script"),c.charset="utf-8",r.nc&&c.setAttribute("nonce",r.nc),c.setAttribute("data-webpack",t+s),c.src=n),e[n]=[o];const l=(t,r)=>{c.onerror=c.onload=null,clearTimeout(f);const o=e[n];if(delete e[n],c.parentNode?.removeChild(c),o?.forEach(e=>e(r)),t)return t(r)},f=setTimeout(l.bind(null,void 0,{type:"timeout",target:c}),12e4);c.onerror=l.bind(null,c.onerror),c.onload=l.bind(null,c.onload),a&&document.head.appendChild(c)}})(),(()=>{r.S={};const e={},t={};r.I=(n,o)=>{o||(o=[]);let s=t[n];if(s||(s=t[n]={}),o.indexOf(s)>=0)return;if(o.push(s),e[n])return e[n];r.o(r.S,n)||(r.S[n]={});const i=r.S[n],c="signalk-webhook-bridge",a=[];return"default"===n&&((e,t,n,o)=>{const s=i[e]=i[e]||{},a=s[t];(!a||!a.loaded&&(1!=!a.eager?o:c>a.from))&&(s[t]={get:()=>r.e(540).then(()=>()=>r(540)),from:c,eager:!1})})("react","19.3.0"),e[n]=a.length?Promise.all(a).then(()=>e[n]=1):1}})(),(()=>{let e;r.g.importScripts&&(e=r.g.location+"");const t=r.g.document;if(!e&&t&&("SCRIPT"===t.currentScript?.tagName.toUpperCase()&&(e=t.currentScript.src),!e)){const r=t.getElementsByTagName("script");if(r.length){let t=r.length-1;for(;t>-1&&(!e||!/^https?:/.test(e));)e=r[t--].src}}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/^blob:|[?#].*$/g,"").replace(/\/[^/]+$/,"/"),r.p=e})(),(()=>{var e=e=>{var t=e=>e.split(".").map(e=>+e==e?+e:e),r=/^([^-+]+)?(?:-([^+]+))?(?:\+(.+))?$/.exec(e),n=r[1]?t(r[1]):[];return r[2]&&(n.length++,n.push.apply(n,t(r[2]))),r[3]&&(n.push([]),n.push.apply(n,t(r[3]))),n},t=e=>{var r=e[0],n="";if(1===e.length)return"*";if(r+.5){n+=0==r?">=":-1==r?"<":1==r?"^":2==r?"~":r>0?"=":"!=";for(var o=1,s=1;s<e.length;s++)o--,n+="u"==(typeof(c=e[s]))[0]?"-":(o>0?".":"")+(o=2,c);return n}var i=[];for(s=1;s<e.length;s++){var c=e[s];i.push(0===c?"not("+a()+")":1===c?"("+a()+" || "+a()+")":2===c?i.pop()+" "+i.pop():t(c))}return a();function a(){return i.pop().replace(/^\((.+)\)$/,"$1")}},n=(t,r)=>{if(0 in t){r=e(r);var o=t[0],s=o<0;s&&(o=-o-1);for(var i=0,c=1,a=!0;;c++,i++){var u,l,f=c<t.length?(typeof t[c])[0]:"";if(i>=r.length||"o"==(l=(typeof(u=r[i]))[0]))return!a||("u"==f?c>o&&!s:""==f!=s);if("u"==l){if(!a||"u"!=f)return!1}else if(a)if(f==l)if(c<=o){if(u!=t[c])return!1}else{if(s?u>t[c]:u<t[c])return!1;u!=t[c]&&(a=!1)}else if("s"!=f&&"n"!=f){if(s||c<=o)return!1;a=!1,c--}else{if(c<=o||l<f!=s)return!1;a=!1}else"s"!=f&&"n"!=f&&(a=!1,c--)}}var p=[],h=p.pop.bind(p);for(i=1;i<t.length;i++){var d=t[i];p.push(1==d?h()|h():2==d?h()&h():d?n(d,r):!h())}return!!h()};const o=(t,r,n)=>{const o=n?(e=>Object.keys(e).reduce((t,r)=>(e[r].eager&&(t[r]=e[r]),t),{}))(t[r]):t[r];return Object.keys(o).reduce((t,r)=>!t||!o[t].loaded&&((t,r)=>{t=e(t),r=e(r);for(var n=0;;){if(n>=t.length)return n<r.length&&"u"!=(typeof r[n])[0];var o=t[n],s=(typeof o)[0];if(n>=r.length)return"u"==s;var i=r[n],c=(typeof i)[0];if(s!=c)return"o"==s&&"n"==c||"s"==c||"u"==s;if("o"!=s&&"u"!=s&&o!=i)return o<i;n++}})(t,r)?r:t,0)},s=(e,t,r)=>r?r():((e,t)=>(e=>{throw new Error(e)})("Shared module "+t+" doesn't exist in shared scope "+e))(e,t),i=(e=>function(t,n,o,s,i){const c=r.I(t);return c?.then&&!o?c.then(e.bind(e,t,r.S[t],n,!1,s,i)):e(t,r.S[t],n,o,s,i)})((e,i,c,a,u,l)=>{if(!((e,t)=>e&&r.o(e,t))(i,c))return s(e,c,l);const f=o(i,c,a);return n(u,f)||(h=((e,r,n,o)=>"Unsatisfied version "+n+" from "+(n&&e[r][n].from)+" of shared singleton module "+r+" (required "+t(o)+")")(i,c,f,u),"undefined"!=typeof console&&console.warn&&console.warn(h)),(p=i[c][f]).loaded=1,p.get();var p,h}),c={},a={231:()=>i("default","react",!1,[1,19],()=>r.e(540).then(()=>()=>r(540)))};[231].forEach(e=>{r.m[e]=t=>{c[e]=0,delete r.c[e];const n=a[e]();if("function"!=typeof n)throw new Error("Shared module is not available for eager consumption: "+e);t.exports=n()}});const u={792:[231]},l={};r.f.consumes=(e,t)=>{r.o(u,e)&&u[e].forEach(e=>{if(r.o(c,e))return t.push(c[e]);if(!l[e]){const n=t=>{c[e]=0,r.m[e]=n=>{delete r.c[e],n.exports=t()}};l[e]=!0;const o=t=>{delete c[e],r.m[e]=n=>{throw delete r.c[e],t}};try{const r=a[e]();r.then?t.push(c[e]=r.then(n).catch(o)):n(r)}catch(e){o(e)}}})}})(),(()=>{const e={651:0,792:0};r.f.j=(t,n)=>{let o=r.o(e,t)?e[t]:void 0;if(0!==o)if(o)n.push(o[2]);else{const s=new Promise((r,n)=>o=e[t]=[r,n]);n.push(o[2]=s);const i=new Error,c=n=>{if(r.o(e,t)&&(o=e[t],0!==o&&(e[t]=void 0),o)){const e=n&&("load"===n.type?"missing":n.type),r=n&&n.target&&n.target.src;i.message="Loading chunk "+t+" failed.\n("+e+": "+r+")",i.name="ChunkLoadError",i.type=e,i.request=r,i.event=n,o[1](i)}};r.l(r.p+r.u(t),c,"chunk-"+t,t)}};const t=(t,n)=>{let[o,s,i]=n;var c,a,u=0;if(o.some(t=>0!==e[t])){for(c in s)r.o(s,c)&&(r.m[c]=s[c]);i&&i(r)}for(t&&t(n);u<o.length;u++)a=o[u],r.o(e,a)&&e[a]&&e[a][0](),e[a]=0},n=self.webpackChunksignalk_webhook_bridge=self.webpackChunksignalk_webhook_bridge||[];n.forEach(t.bind(null,0)),n.push=t.bind(null,n.push.bind(n))})(),r(651)})();
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var signalk_webhook_bridge;(()=>{"use strict";var e={413(e,t,r){const n={"./PluginConfigurationPanel":()=>r.e(651).then(()=>()=>r(651))},o=(e,t)=>(r.R=t,t=r.o(n,e)?n[e]():Promise.resolve().then(()=>{throw new Error('Module "'+e+'" does not exist in container.')}),r.R=void 0,t),i=(e,t)=>{if(!r.S)return;const n="default",o=r.S[n];if(o&&o!==e)throw new Error("Container initialization failed as it has already been initialized with a different share scope");return r.S[n]=e,r.I(n,t)};r.d(t,{get:()=>o,init:()=>i})}};const t={};function r(n){const o=t[n];if(void 0!==o)return o.exports;const i=t[n]={exports:{}};return e[n](i,i.exports,r),i.exports}r.m=e,r.c=t,r.cw=e=>{var t;return()=>{if(e){var r=e;e=0,t={exports:{}},r.call(t.exports,t,t.exports)}return t.exports}},r.d=(e,t)=>{for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.f={},r.e=e=>Promise.all(Object.keys(r.f).reduce((t,n)=>(r.f[n](e,t),t),[])),r.u=e=>e+".main.js",r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{const e={},t="signalk-webhook-bridge:";r.l=(n,o,i,s)=>{if(e[n])return void e[n].push(o);let a,u;if(void 0!==i){const e=document.getElementsByTagName("script");for(var l=0;l<e.length;l++){const r=e[l];if(r.getAttribute("src")==n||r.getAttribute("data-webpack")==t+i){a=r;break}}}a||(u=!0,a=document.createElement("script"),a.charset="utf-8",r.nc&&a.setAttribute("nonce",r.nc),a.setAttribute("data-webpack",t+i),a.src=n),e[n]=[o];const c=(t,r)=>{a.onerror=a.onload=null,clearTimeout(f);const o=e[n];if(delete e[n],a.parentNode?.removeChild(a),o?.forEach(e=>e(r)),t)return t(r)},f=setTimeout(c.bind(null,void 0,{type:"timeout",target:a}),12e4);a.onerror=c.bind(null,a.onerror),a.onload=c.bind(null,a.onload),u&&document.head.appendChild(a)}})(),r.r=e=>{Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(()=>{r.S={};const e={},t={};r.I=(n,o)=>{o||(o=[]);let i=t[n];if(i||(i=t[n]={}),o.indexOf(i)>=0)return;if(o.push(i),e[n])return e[n];r.o(r.S,n)||(r.S[n]={});const s=r.S[n],a="signalk-webhook-bridge",u=[];return"default"===n&&((e,t,n,o)=>{const i=s[e]=s[e]||{},u=i[t];(!u||!u.loaded&&(1!=!u.eager?o:a>u.from))&&(i[t]={get:()=>r.e(540).then(()=>()=>r(540)),from:a,eager:!1})})("react","19.3.0"),e[n]=u.length?Promise.all(u).then(()=>e[n]=1):1}})(),(()=>{let e;r.g.importScripts&&(e=r.g.location+"");const t=r.g.document;if(!e&&t&&("SCRIPT"===t.currentScript?.tagName.toUpperCase()&&(e=t.currentScript.src),!e)){const r=t.getElementsByTagName("script");if(r.length){let t=r.length-1;for(;t>-1&&(!e||!/^https?:/.test(e));)e=r[t--].src}}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/^blob:|[?#].*$/g,"").replace(/\/[^/]+$/,"/"),r.p=e})(),(()=>{var e=e=>{var t=e=>e.split(".").map(e=>+e==e?+e:e),r=/^([^-+]+)?(?:-([^+]+))?(?:\+(.+))?$/.exec(e),n=r[1]?t(r[1]):[];return r[2]&&(n.length++,n.push.apply(n,t(r[2]))),r[3]&&(n.push([]),n.push.apply(n,t(r[3]))),n},t=e=>{var r=e[0],n="";if(1===e.length)return"*";if(r+.5){n+=0==r?">=":-1==r?"<":1==r?"^":2==r?"~":r>0?"=":"!=";for(var o=1,i=1;i<e.length;i++)o--,n+="u"==(typeof(a=e[i]))[0]?"-":(o>0?".":"")+(o=2,a);return n}var s=[];for(i=1;i<e.length;i++){var a=e[i];s.push(0===a?"not("+u()+")":1===a?"("+u()+" || "+u()+")":2===a?s.pop()+" "+s.pop():t(a))}return u();function u(){return s.pop().replace(/^\((.+)\)$/,"$1")}},n=(t,r)=>{if(0 in t){r=e(r);var o=t[0],i=o<0;i&&(o=-o-1);for(var s=0,a=1,u=!0;;a++,s++){var l,c,f=a<t.length?(typeof t[a])[0]:"";if(s>=r.length||"o"==(c=(typeof(l=r[s]))[0]))return!u||("u"==f?a>o&&!i:""==f!=i);if("u"==c){if(!u||"u"!=f)return!1}else if(u)if(f==c)if(a<=o){if(l!=t[a])return!1}else{if(i?l>t[a]:l<t[a])return!1;l!=t[a]&&(u=!1)}else if("s"!=f&&"n"!=f){if(i||a<=o)return!1;u=!1,a--}else{if(a<=o||c<f!=i)return!1;u=!1}else"s"!=f&&"n"!=f&&(u=!1,a--)}}var d=[],p=d.pop.bind(d);for(s=1;s<t.length;s++){var h=t[s];d.push(1==h?p()|p():2==h?p()&p():h?n(h,r):!p())}return!!p()};const o=(t,r,n)=>{const o=n?(e=>Object.keys(e).reduce((t,r)=>(e[r].eager&&(t[r]=e[r]),t),{}))(t[r]):t[r];return Object.keys(o).reduce((t,r)=>!t||!o[t].loaded&&((t,r)=>{t=e(t),r=e(r);for(var n=0;;){if(n>=t.length)return n<r.length&&"u"!=(typeof r[n])[0];var o=t[n],i=(typeof o)[0];if(n>=r.length)return"u"==i;var s=r[n],a=(typeof s)[0];if(i!=a)return"o"==i&&"n"==a||"s"==a||"u"==i;if("o"!=i&&"u"!=i&&o!=s)return o<s;n++}})(t,r)?r:t,0)},i=(e,t,r)=>r?r():((e,t)=>(e=>{throw new Error(e)})("Shared module "+t+" doesn't exist in shared scope "+e))(e,t),s=(e=>function(t,n,o,i,s){const a=r.I(t);return a?.then&&!o?a.then(e.bind(e,t,r.S[t],n,!1,i,s)):e(t,r.S[t],n,o,i,s)})((e,s,a,u,l,c)=>{if(!((e,t)=>e&&r.o(e,t))(s,a))return i(e,a,c);const f=o(s,a,u);return n(l,f)||(p=((e,r,n,o)=>"Unsatisfied version "+n+" from "+(n&&e[r][n].from)+" of shared singleton module "+r+" (required "+t(o)+")")(s,a,f,l),"undefined"!=typeof console&&console.warn&&console.warn(p)),(d=s[a][f]).loaded=1,d.get();var d,p}),a={},u={231:()=>s("default","react",!1,[1,19],()=>r.e(540).then(()=>()=>r(540)))},l={651:[231]},c={};r.f.consumes=(e,t)=>{r.o(l,e)&&l[e].forEach(e=>{if(r.o(a,e))return t.push(a[e]);if(!c[e]){const n=t=>{a[e]=0,r.m[e]=n=>{delete r.c[e],n.exports=t()}};c[e]=!0;const o=t=>{delete a[e],r.m[e]=n=>{throw delete r.c[e],t}};try{const r=u[e]();r.then?t.push(a[e]=r.then(n).catch(o)):n(r)}catch(e){o(e)}}})}})(),(()=>{const e={404:0};r.f.j=(t,n)=>{let o=r.o(e,t)?e[t]:void 0;if(0!==o)if(o)n.push(o[2]);else{const i=new Promise((r,n)=>o=e[t]=[r,n]);n.push(o[2]=i);const s=new Error,a=n=>{if(r.o(e,t)&&(o=e[t],0!==o&&(e[t]=void 0),o)){const e=n&&("load"===n.type?"missing":n.type),r=n&&n.target&&n.target.src;s.message="Loading chunk "+t+" failed.\n("+e+": "+r+")",s.name="ChunkLoadError",s.type=e,s.request=r,s.event=n,o[1](s)}};r.l(r.p+r.u(t),a,"chunk-"+t,t)}};const t=(t,n)=>{let[o,i,s]=n;var a,u,l=0;if(o.some(t=>0!==e[t])){for(a in i)r.o(i,a)&&(r.m[a]=i[a]);s&&s(r)}for(t&&t(n);l<o.length;l++)u=o[l],r.o(e,u)&&e[u]&&e[u][0](),e[u]=0},n=self.webpackChunksignalk_webhook_bridge=self.webpackChunksignalk_webhook_bridge||[];n.forEach(t.bind(null,0)),n.push=t.bind(null,n.push.bind(n))})();let n=r(413);signalk_webhook_bridge=n})();
|