@camstack/addon-post-analysis 0.1.18 → 0.1.20
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/embedding-encoder/index.js +1 -1
- package/dist/embedding-encoder/index.mjs +1 -1
- package/dist/enrichment-engine/index.js +1 -1
- package/dist/enrichment-engine/index.mjs +1 -1
- package/dist/{index-DafwGlkQ.js → index-B0RhVv1c.js} +3940 -807
- package/dist/index-B0RhVv1c.js.map +1 -0
- package/dist/{index-CIJfmsWX.mjs → index-ot5PeFg_.mjs} +3943 -810
- package/dist/index-ot5PeFg_.mjs.map +1 -0
- package/dist/pipeline-analytics/@mf-types.zip +0 -0
- package/dist/pipeline-analytics/{__mfe_internal__addon_pipeline_analytics_widgets__loadShare___mf_0_camstack_mf_1_sdk__loadShare__.mjs-h5aXOPSA.mjs → __mfe_internal__addon_pipeline_analytics_widgets__loadShare___mf_0_camstack_mf_1_sdk__loadShare__.mjs-lantnv8e.mjs} +1 -1
- package/dist/pipeline-analytics/__mfe_internal__addon_pipeline_analytics_widgets__loadShare___mf_0_camstack_mf_1_types__loadShare__.mjs-BD3oMNGB.mjs +29 -0
- package/dist/pipeline-analytics/__mfe_internal__addon_pipeline_analytics_widgets__loadShare___mf_0_camstack_mf_1_ui_mf_2_library__loadShare__.mjs-BgOHCakr.mjs +18 -0
- package/dist/pipeline-analytics/{__mfe_internal__addon_pipeline_analytics_widgets__loadShare__react__loadShare__.mjs-D-USVuHq.mjs → __mfe_internal__addon_pipeline_analytics_widgets__loadShare__react__loadShare__.mjs-D1qPKjvR.mjs} +3 -1
- package/dist/pipeline-analytics/{__mfe_internal__addon_pipeline_analytics_widgets__loadShare__react__loadShare__.mjs_commonjs-proxy-qQCPW8pT.mjs → __mfe_internal__addon_pipeline_analytics_widgets__loadShare__react__loadShare__.mjs_commonjs-proxy-B5X50Xa4.mjs} +1 -1
- package/dist/pipeline-analytics/{__mfe_internal__addon_pipeline_analytics_widgets__loadShare__react_mf_2_dom__loadShare__.mjs_commonjs-proxy-Bv9bYz9E.mjs → __mfe_internal__addon_pipeline_analytics_widgets__loadShare__react_mf_2_dom__loadShare__.mjs_commonjs-proxy-B10b5k5J.mjs} +1 -1
- package/dist/pipeline-analytics/_stub.js +2 -3
- package/dist/pipeline-analytics/{_virtual_mf-localSharedImportMap___mfe_internal__addon_pipeline_analytics_widgets-B3kCe2qM.mjs → _virtual_mf-localSharedImportMap___mfe_internal__addon_pipeline_analytics_widgets-DWB3apaJ.mjs} +6 -6
- package/dist/pipeline-analytics/{client-DHmQcIWy.mjs → client-C6xdgLZU.mjs} +2 -2
- package/dist/pipeline-analytics/{hostInit-CuWzic_f.mjs → hostInit-3cyL9eyG.mjs} +12 -12
- package/dist/pipeline-analytics/{index-BA65ZJOW.mjs → index-BCTHeI2m.mjs} +254 -268
- package/dist/pipeline-analytics/{index-Crs1D0Uu.mjs → index-BuWLz0GG.mjs} +1 -1
- package/dist/pipeline-analytics/{index-gpelkpEE.mjs → index-CIwq-tQL.mjs} +1 -1
- package/dist/pipeline-analytics/{index-CHnXxMRA.mjs → index-CWBMDbou.mjs} +1 -1
- package/dist/pipeline-analytics/index-CZhagnlH.mjs +67784 -0
- package/dist/pipeline-analytics/{index-DicaGC31.mjs → index-D883Q5B8.mjs} +1 -1
- package/dist/pipeline-analytics/index-DtOI1aTU.mjs +18504 -0
- package/dist/pipeline-analytics/index.js +605 -42
- package/dist/pipeline-analytics/index.js.map +1 -1
- package/dist/pipeline-analytics/index.mjs +604 -42
- package/dist/pipeline-analytics/index.mjs.map +1 -1
- package/dist/pipeline-analytics/{jsx-runtime-Wcfyyyt4.mjs → jsx-runtime-DdLhuHmJ.mjs} +1 -1
- package/dist/pipeline-analytics/remoteEntry.js +1 -1
- package/dist/pipeline-analytics/{schemas-ChN4Ih0h.mjs → schemas-B7L0qZtq.mjs} +530 -515
- package/package.json +12 -27
- package/dist/ffmpeg-config-DRONlBsj.mjs +0 -56
- package/dist/ffmpeg-config-DRONlBsj.mjs.map +0 -1
- package/dist/ffmpeg-config-uANz3sV5.js +0 -73
- package/dist/ffmpeg-config-uANz3sV5.js.map +0 -1
- package/dist/index-CIJfmsWX.mjs.map +0 -1
- package/dist/index-DafwGlkQ.js.map +0 -1
- package/dist/pipeline-analytics/__mfe_internal__addon_pipeline_analytics_widgets__loadShare___mf_0_camstack_mf_1_types__loadShare__.mjs-d8PmLbO2.mjs +0 -19
- package/dist/pipeline-analytics/__mfe_internal__addon_pipeline_analytics_widgets__loadShare___mf_0_camstack_mf_1_ui_mf_2_library__loadShare__.mjs-BcWYbuKp.mjs +0 -18
- package/dist/pipeline-analytics/index-CUXiTSWS.mjs +0 -13883
- package/dist/pipeline-analytics/index-gbflFMEY.mjs +0 -36403
- package/dist/playlist-generator-EhPaB7Hn.js +0 -48
- package/dist/playlist-generator-EhPaB7Hn.js.map +0 -1
- package/dist/playlist-generator-VTkgn53O.mjs +0 -48
- package/dist/playlist-generator-VTkgn53O.mjs.map +0 -1
- package/dist/recording/index.js +0 -257
- package/dist/recording/index.js.map +0 -1
- package/dist/recording/index.mjs +0 -235
- package/dist/recording/index.mjs.map +0 -1
- package/dist/recording-coordinator-BKsM_JGg.js +0 -1052
- package/dist/recording-coordinator-BKsM_JGg.js.map +0 -1
- package/dist/recording-coordinator-Bw3N1gYu.mjs +0 -1012
- package/dist/recording-coordinator-Bw3N1gYu.mjs.map +0 -1
- package/dist/recording-db-gOgaoQh0.js +0 -348
- package/dist/recording-db-gOgaoQh0.js.map +0 -1
- package/dist/recording-db-lIkSMTLq.mjs +0 -348
- package/dist/recording-db-lIkSMTLq.mjs.map +0 -1
- package/dist/recording-service-facade-B9lG6OFn.mjs +0 -123
- package/dist/recording-service-facade-B9lG6OFn.mjs.map +0 -1
- package/dist/recording-service-facade-Do1PKlAL.js +0 -123
- package/dist/recording-service-facade-Do1PKlAL.js.map +0 -1
- package/dist/storage-estimator-CRpoQc9j.js +0 -72
- package/dist/storage-estimator-CRpoQc9j.js.map +0 -1
- package/dist/storage-estimator-DzD8gWJH.mjs +0 -72
- package/dist/storage-estimator-DzD8gWJH.mjs.map +0 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { i as _e, b as
|
|
2
|
-
import { _ as V, a as Ee } from "./__mfe_internal__addon_pipeline_analytics_widgets__loadShare___mf_0_camstack_mf_1_types__loadShare__.mjs-
|
|
1
|
+
import { i as _e, b as N, A as be, n as ve } from "./__mfe_internal__addon_pipeline_analytics_widgets__loadShare___mf_0_trpc_mf_1_client__loadShare__.mjs-52bfkwC8.mjs";
|
|
2
|
+
import { _ as V, a as Ee } from "./__mfe_internal__addon_pipeline_analytics_widgets__loadShare___mf_0_camstack_mf_1_types__loadShare__.mjs-BD3oMNGB.mjs";
|
|
3
3
|
class Pe {
|
|
4
4
|
constructor() {
|
|
5
5
|
this.keyToValue = /* @__PURE__ */ new Map(), this.valueToKey = /* @__PURE__ */ new Map();
|
|
@@ -17,7 +17,7 @@ class Pe {
|
|
|
17
17
|
this.keyToValue.clear(), this.valueToKey.clear();
|
|
18
18
|
}
|
|
19
19
|
}
|
|
20
|
-
class
|
|
20
|
+
class F {
|
|
21
21
|
constructor(t) {
|
|
22
22
|
this.generateIdentifier = t, this.kv = new Pe();
|
|
23
23
|
}
|
|
@@ -34,7 +34,7 @@ class $ {
|
|
|
34
34
|
return this.kv.getByKey(t);
|
|
35
35
|
}
|
|
36
36
|
}
|
|
37
|
-
class Ce extends
|
|
37
|
+
class Ce extends F {
|
|
38
38
|
constructor() {
|
|
39
39
|
super((t) => t.name), this.classToAllowedProps = /* @__PURE__ */ new Map();
|
|
40
40
|
}
|
|
@@ -64,10 +64,10 @@ function Se(e, t) {
|
|
|
64
64
|
return i;
|
|
65
65
|
}
|
|
66
66
|
}
|
|
67
|
-
function
|
|
67
|
+
function g(e, t) {
|
|
68
68
|
Object.entries(e).forEach(([r, s]) => t(s, r));
|
|
69
69
|
}
|
|
70
|
-
function
|
|
70
|
+
function C(e, t) {
|
|
71
71
|
return e.indexOf(t) !== -1;
|
|
72
72
|
}
|
|
73
73
|
function B(e, t) {
|
|
@@ -91,17 +91,17 @@ class Te {
|
|
|
91
91
|
return this.transfomers[t];
|
|
92
92
|
}
|
|
93
93
|
}
|
|
94
|
-
const Re = (e) => Object.prototype.toString.call(e).slice(8, -1), W = (e) => typeof e > "u", Ie = (e) => e === null,
|
|
94
|
+
const Re = (e) => Object.prototype.toString.call(e).slice(8, -1), W = (e) => typeof e > "u", Ie = (e) => e === null, v = (e) => typeof e != "object" || e === null || e === Object.prototype ? !1 : Object.getPrototypeOf(e) === null ? !0 : Object.getPrototypeOf(e) === Object.prototype, T = (e) => v(e) && Object.keys(e).length === 0, m = (e) => Array.isArray(e), Ae = (e) => typeof e == "string", Me = (e) => typeof e == "number" && !isNaN(e), Oe = (e) => typeof e == "boolean", De = (e) => e instanceof RegExp, E = (e) => e instanceof Map, P = (e) => e instanceof Set, K = (e) => Re(e) === "Symbol", Le = (e) => e instanceof Date && !isNaN(e.valueOf()), $ = (e) => e instanceof Error, x = (e) => typeof e == "number" && isNaN(e), Ne = (e) => Oe(e) || Ie(e) || W(e) || Me(e) || Ae(e) || K(e), Ve = (e) => typeof e == "bigint", Be = (e) => e === 1 / 0 || e === -1 / 0, xe = (e) => ArrayBuffer.isView(e) && !(e instanceof DataView), Ue = (e) => e instanceof URL, R = (e) => e.replace(/\\/g, "\\\\").replace(/\./g, "\\."), S = (e) => e.map(String).map(R).join("."), b = (e, t) => {
|
|
95
95
|
const r = [];
|
|
96
96
|
let s = "";
|
|
97
97
|
for (let i = 0; i < e.length; i++) {
|
|
98
98
|
let o = e.charAt(i);
|
|
99
99
|
if (!t && o === "\\") {
|
|
100
|
-
const
|
|
101
|
-
if (
|
|
100
|
+
const u = e.charAt(i + 1);
|
|
101
|
+
if (u === "\\") {
|
|
102
102
|
s += "\\", i++;
|
|
103
103
|
continue;
|
|
104
|
-
} else if (
|
|
104
|
+
} else if (u !== ".")
|
|
105
105
|
throw Error("invalid path");
|
|
106
106
|
}
|
|
107
107
|
if (o === "\\" && e.charAt(i + 1) === ".") {
|
|
@@ -117,7 +117,7 @@ const Re = (e) => Object.prototype.toString.call(e).slice(8, -1), W = (e) => typ
|
|
|
117
117
|
const n = s;
|
|
118
118
|
return r.push(n), r;
|
|
119
119
|
};
|
|
120
|
-
function
|
|
120
|
+
function h(e, t, r, s) {
|
|
121
121
|
return {
|
|
122
122
|
isApplicable: e,
|
|
123
123
|
annotation: t,
|
|
@@ -125,12 +125,12 @@ function y(e, t, r, s) {
|
|
|
125
125
|
untransform: s
|
|
126
126
|
};
|
|
127
127
|
}
|
|
128
|
-
const
|
|
129
|
-
|
|
128
|
+
const Y = [
|
|
129
|
+
h(W, "undefined", () => null, () => {
|
|
130
130
|
}),
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
131
|
+
h(Ve, "bigint", (e) => e.toString(), (e) => typeof BigInt < "u" ? BigInt(e) : (console.error("Please add a BigInt polyfill."), e)),
|
|
132
|
+
h(Le, "Date", (e) => e.toISOString(), (e) => new Date(e)),
|
|
133
|
+
h($, "Error", (e, t) => {
|
|
134
134
|
const r = {
|
|
135
135
|
name: e.name,
|
|
136
136
|
message: e.message
|
|
@@ -144,24 +144,24 @@ const G = [
|
|
|
144
144
|
r[s] = e[s];
|
|
145
145
|
}), r;
|
|
146
146
|
}),
|
|
147
|
-
|
|
147
|
+
h(De, "regexp", (e) => "" + e, (e) => {
|
|
148
148
|
const t = e.slice(1, e.lastIndexOf("/")), r = e.slice(e.lastIndexOf("/") + 1);
|
|
149
149
|
return new RegExp(t, r);
|
|
150
150
|
}),
|
|
151
|
-
|
|
152
|
-
|
|
151
|
+
h(
|
|
152
|
+
P,
|
|
153
153
|
"set",
|
|
154
154
|
// (sets only exist in es6+)
|
|
155
155
|
// eslint-disable-next-line es5/no-es6-methods
|
|
156
156
|
(e) => [...e.values()],
|
|
157
157
|
(e) => new Set(e)
|
|
158
158
|
),
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
159
|
+
h(E, "map", (e) => [...e.entries()], (e) => new Map(e)),
|
|
160
|
+
h((e) => x(e) || Be(e), "number", (e) => x(e) ? "NaN" : e > 0 ? "Infinity" : "-Infinity", Number),
|
|
161
|
+
h((e) => e === 0 && 1 / e === -1 / 0, "number", () => "-0", Number),
|
|
162
|
+
h(Ue, "URL", (e) => e.toString(), (e) => new URL(e))
|
|
163
163
|
];
|
|
164
|
-
function
|
|
164
|
+
function k(e, t, r, s) {
|
|
165
165
|
return {
|
|
166
166
|
isApplicable: e,
|
|
167
167
|
annotation: t,
|
|
@@ -169,7 +169,7 @@ function T(e, t, r, s) {
|
|
|
169
169
|
untransform: s
|
|
170
170
|
};
|
|
171
171
|
}
|
|
172
|
-
const
|
|
172
|
+
const G = k((e, t) => K(e) ? !!t.symbolRegistry.getIdentifier(e) : !1, (e, t) => ["symbol", t.symbolRegistry.getIdentifier(e)], (e) => e.description, (e, t, r) => {
|
|
173
173
|
const s = r.symbolRegistry.getValue(t[1]);
|
|
174
174
|
if (!s)
|
|
175
175
|
throw new Error("Trying to deserialize unknown symbol");
|
|
@@ -184,16 +184,16 @@ const H = T((e, t) => K(e) ? !!t.symbolRegistry.getIdentifier(e) : !1, (e, t) =>
|
|
|
184
184
|
Float32Array,
|
|
185
185
|
Float64Array,
|
|
186
186
|
Uint8ClampedArray
|
|
187
|
-
].reduce((e, t) => (e[t.name] = t, e), {}),
|
|
187
|
+
].reduce((e, t) => (e[t.name] = t, e), {}), H = k(xe, (e) => ["typed-array", e.constructor.name], (e) => [...e], (e, t) => {
|
|
188
188
|
const r = ze[t[1]];
|
|
189
189
|
if (!r)
|
|
190
190
|
throw new Error("Trying to deserialize unknown typed array");
|
|
191
191
|
return new r(e);
|
|
192
192
|
});
|
|
193
|
-
function
|
|
193
|
+
function X(e, t) {
|
|
194
194
|
return e?.constructor ? !!t.classRegistry.getIdentifier(e.constructor) : !1;
|
|
195
195
|
}
|
|
196
|
-
const
|
|
196
|
+
const Z = k(X, (e, t) => ["class", t.classRegistry.getIdentifier(e.constructor)], (e, t) => {
|
|
197
197
|
const r = t.classRegistry.getAllowedProps(e.constructor);
|
|
198
198
|
if (!r)
|
|
199
199
|
return { ...e };
|
|
@@ -206,49 +206,49 @@ const j = T(Z, (e, t) => ["class", t.classRegistry.getIdentifier(e.constructor)]
|
|
|
206
206
|
if (!s)
|
|
207
207
|
throw new Error(`Trying to deserialize unknown class '${t[1]}' - check https://github.com/blitz-js/superjson/issues/116#issuecomment-773996564`);
|
|
208
208
|
return Object.assign(Object.create(s.prototype), e);
|
|
209
|
-
}),
|
|
209
|
+
}), j = k((e, t) => !!t.customTransformerRegistry.findApplicable(e), (e, t) => ["custom", t.customTransformerRegistry.findApplicable(e).name], (e, t) => t.customTransformerRegistry.findApplicable(e).serialize(e), (e, t, r) => {
|
|
210
210
|
const s = r.customTransformerRegistry.findByName(t[1]);
|
|
211
211
|
if (!s)
|
|
212
212
|
throw new Error("Trying to deserialize unknown custom value");
|
|
213
213
|
return s.deserialize(e);
|
|
214
|
-
}), qe = [
|
|
214
|
+
}), qe = [Z, G, j, H], U = (e, t) => {
|
|
215
215
|
const r = B(qe, (n) => n.isApplicable(e, t));
|
|
216
216
|
if (r)
|
|
217
217
|
return {
|
|
218
218
|
value: r.transform(e, t),
|
|
219
219
|
type: r.annotation(e, t)
|
|
220
220
|
};
|
|
221
|
-
const s = B(
|
|
221
|
+
const s = B(Y, (n) => n.isApplicable(e, t));
|
|
222
222
|
if (s)
|
|
223
223
|
return {
|
|
224
224
|
value: s.transform(e, t),
|
|
225
225
|
type: s.annotation
|
|
226
226
|
};
|
|
227
|
-
},
|
|
228
|
-
|
|
229
|
-
|
|
227
|
+
}, Q = {};
|
|
228
|
+
Y.forEach((e) => {
|
|
229
|
+
Q[e.annotation] = e;
|
|
230
230
|
});
|
|
231
231
|
const Fe = (e, t, r) => {
|
|
232
|
-
if (
|
|
232
|
+
if (m(t))
|
|
233
233
|
switch (t[0]) {
|
|
234
234
|
case "symbol":
|
|
235
|
-
return
|
|
235
|
+
return G.untransform(e, t, r);
|
|
236
236
|
case "class":
|
|
237
|
-
return
|
|
237
|
+
return Z.untransform(e, t, r);
|
|
238
238
|
case "custom":
|
|
239
|
-
return
|
|
239
|
+
return j.untransform(e, t, r);
|
|
240
240
|
case "typed-array":
|
|
241
|
-
return
|
|
241
|
+
return H.untransform(e, t, r);
|
|
242
242
|
default:
|
|
243
243
|
throw new Error("Unknown transformation: " + t);
|
|
244
244
|
}
|
|
245
245
|
else {
|
|
246
|
-
const s =
|
|
246
|
+
const s = Q[t];
|
|
247
247
|
if (!s)
|
|
248
248
|
throw new Error("Unknown transformation: " + t);
|
|
249
249
|
return s.untransform(e, r);
|
|
250
250
|
}
|
|
251
|
-
},
|
|
251
|
+
}, y = (e, t) => {
|
|
252
252
|
if (t > e.size)
|
|
253
253
|
throw new Error("index out of bounds");
|
|
254
254
|
const r = e.keys();
|
|
@@ -256,22 +256,22 @@ const Fe = (e, t, r) => {
|
|
|
256
256
|
r.next(), t--;
|
|
257
257
|
return r.next().value;
|
|
258
258
|
};
|
|
259
|
-
function
|
|
260
|
-
if (
|
|
259
|
+
function J(e) {
|
|
260
|
+
if (C(e, "__proto__"))
|
|
261
261
|
throw new Error("__proto__ is not allowed as a property");
|
|
262
|
-
if (
|
|
262
|
+
if (C(e, "prototype"))
|
|
263
263
|
throw new Error("prototype is not allowed as a property");
|
|
264
|
-
if (
|
|
264
|
+
if (C(e, "constructor"))
|
|
265
265
|
throw new Error("constructor is not allowed as a property");
|
|
266
266
|
}
|
|
267
|
-
const
|
|
268
|
-
|
|
267
|
+
const We = (e, t) => {
|
|
268
|
+
J(t);
|
|
269
269
|
for (let r = 0; r < t.length; r++) {
|
|
270
270
|
const s = t[r];
|
|
271
|
-
if (
|
|
272
|
-
e =
|
|
273
|
-
else if (
|
|
274
|
-
const n = +s, i = +t[++r] == 0 ? "key" : "value", o =
|
|
271
|
+
if (P(e))
|
|
272
|
+
e = y(e, +s);
|
|
273
|
+
else if (E(e)) {
|
|
274
|
+
const n = +s, i = +t[++r] == 0 ? "key" : "value", o = y(e, n);
|
|
275
275
|
switch (i) {
|
|
276
276
|
case "key":
|
|
277
277
|
e = o;
|
|
@@ -284,45 +284,45 @@ const $e = (e, t) => {
|
|
|
284
284
|
e = e[s];
|
|
285
285
|
}
|
|
286
286
|
return e;
|
|
287
|
-
},
|
|
288
|
-
if (
|
|
287
|
+
}, I = (e, t, r) => {
|
|
288
|
+
if (J(t), t.length === 0)
|
|
289
289
|
return r(e);
|
|
290
290
|
let s = e;
|
|
291
291
|
for (let i = 0; i < t.length - 1; i++) {
|
|
292
292
|
const o = t[i];
|
|
293
|
-
if (
|
|
294
|
-
const
|
|
295
|
-
s = s[
|
|
296
|
-
} else if (
|
|
293
|
+
if (m(s)) {
|
|
294
|
+
const c = +o;
|
|
295
|
+
s = s[c];
|
|
296
|
+
} else if (v(s))
|
|
297
297
|
s = s[o];
|
|
298
|
-
else if (
|
|
299
|
-
const
|
|
300
|
-
s =
|
|
301
|
-
} else if (
|
|
298
|
+
else if (P(s)) {
|
|
299
|
+
const c = +o;
|
|
300
|
+
s = y(s, c);
|
|
301
|
+
} else if (E(s)) {
|
|
302
302
|
if (i === t.length - 2)
|
|
303
303
|
break;
|
|
304
|
-
const
|
|
305
|
-
switch (
|
|
304
|
+
const l = +o, u = +t[++i] == 0 ? "key" : "value", f = y(s, l);
|
|
305
|
+
switch (u) {
|
|
306
306
|
case "key":
|
|
307
|
-
s =
|
|
307
|
+
s = f;
|
|
308
308
|
break;
|
|
309
309
|
case "value":
|
|
310
|
-
s = s.get(
|
|
310
|
+
s = s.get(f);
|
|
311
311
|
break;
|
|
312
312
|
}
|
|
313
313
|
}
|
|
314
314
|
}
|
|
315
315
|
const n = t[t.length - 1];
|
|
316
|
-
if (
|
|
317
|
-
const i =
|
|
316
|
+
if (m(s) ? s[+n] = r(s[+n]) : v(s) && (s[n] = r(s[n])), P(s)) {
|
|
317
|
+
const i = y(s, +n), o = r(i);
|
|
318
318
|
i !== o && (s.delete(i), s.add(o));
|
|
319
319
|
}
|
|
320
|
-
if (
|
|
321
|
-
const i = +t[t.length - 2], o =
|
|
320
|
+
if (E(s)) {
|
|
321
|
+
const i = +t[t.length - 2], o = y(s, i);
|
|
322
322
|
switch (+n == 0 ? "key" : "value") {
|
|
323
323
|
case "key": {
|
|
324
|
-
const
|
|
325
|
-
s.set(
|
|
324
|
+
const l = r(o);
|
|
325
|
+
s.set(l, s.get(o)), l !== o && s.delete(o);
|
|
326
326
|
break;
|
|
327
327
|
}
|
|
328
328
|
case "value": {
|
|
@@ -332,49 +332,49 @@ const $e = (e, t) => {
|
|
|
332
332
|
}
|
|
333
333
|
}
|
|
334
334
|
return e;
|
|
335
|
-
},
|
|
336
|
-
function
|
|
335
|
+
}, ee = (e) => e < 1;
|
|
336
|
+
function A(e, t, r, s = []) {
|
|
337
337
|
if (!e)
|
|
338
338
|
return;
|
|
339
|
-
const n =
|
|
340
|
-
if (!
|
|
341
|
-
|
|
339
|
+
const n = ee(r);
|
|
340
|
+
if (!m(e)) {
|
|
341
|
+
g(e, (c, l) => A(c, t, r, [
|
|
342
342
|
...s,
|
|
343
|
-
...
|
|
343
|
+
...b(l, n)
|
|
344
344
|
]));
|
|
345
345
|
return;
|
|
346
346
|
}
|
|
347
347
|
const [i, o] = e;
|
|
348
|
-
o &&
|
|
349
|
-
|
|
348
|
+
o && g(o, (c, l) => {
|
|
349
|
+
A(c, t, r, [
|
|
350
350
|
...s,
|
|
351
|
-
...
|
|
351
|
+
...b(l, n)
|
|
352
352
|
]);
|
|
353
353
|
}), t(i, s);
|
|
354
354
|
}
|
|
355
|
-
function
|
|
356
|
-
return
|
|
357
|
-
e =
|
|
355
|
+
function Ke(e, t, r, s) {
|
|
356
|
+
return A(t, (n, i) => {
|
|
357
|
+
e = I(e, i, (o) => Fe(o, n, s));
|
|
358
358
|
}, r), e;
|
|
359
359
|
}
|
|
360
|
-
function
|
|
361
|
-
const s =
|
|
360
|
+
function $e(e, t, r) {
|
|
361
|
+
const s = ee(r);
|
|
362
362
|
function n(i, o) {
|
|
363
|
-
const
|
|
364
|
-
i.map((
|
|
365
|
-
e =
|
|
363
|
+
const c = We(e, b(o, s));
|
|
364
|
+
i.map((l) => b(l, s)).forEach((l) => {
|
|
365
|
+
e = I(e, l, () => c);
|
|
366
366
|
});
|
|
367
367
|
}
|
|
368
|
-
if (
|
|
368
|
+
if (m(t)) {
|
|
369
369
|
const [i, o] = t;
|
|
370
|
-
i.forEach((
|
|
371
|
-
e =
|
|
372
|
-
}), o &&
|
|
370
|
+
i.forEach((c) => {
|
|
371
|
+
e = I(e, b(c, s), () => e);
|
|
372
|
+
}), o && g(o, n);
|
|
373
373
|
} else
|
|
374
|
-
|
|
374
|
+
g(t, n);
|
|
375
375
|
return e;
|
|
376
376
|
}
|
|
377
|
-
const Ye = (e, t) =>
|
|
377
|
+
const Ye = (e, t) => v(e) || m(e) || E(e) || P(e) || $(e) || X(e, t);
|
|
378
378
|
function Ge(e, t, r) {
|
|
379
379
|
const s = r.get(e);
|
|
380
380
|
s ? s.push(t) : r.set(e, [t]);
|
|
@@ -385,60 +385,60 @@ function He(e, t) {
|
|
|
385
385
|
return e.forEach((n) => {
|
|
386
386
|
if (n.length <= 1)
|
|
387
387
|
return;
|
|
388
|
-
t || (n = n.map((
|
|
388
|
+
t || (n = n.map((c) => c.map(String)).sort((c, l) => c.length - l.length));
|
|
389
389
|
const [i, ...o] = n;
|
|
390
|
-
i.length === 0 ? s = o.map(
|
|
391
|
-
}), s ?
|
|
390
|
+
i.length === 0 ? s = o.map(S) : r[S(i)] = o.map(S);
|
|
391
|
+
}), s ? T(r) ? [s] : [s, r] : T(r) ? void 0 : r;
|
|
392
392
|
}
|
|
393
|
-
const
|
|
394
|
-
const
|
|
395
|
-
if (!
|
|
393
|
+
const te = (e, t, r, s, n = [], i = [], o = /* @__PURE__ */ new Map()) => {
|
|
394
|
+
const c = Ne(e);
|
|
395
|
+
if (!c) {
|
|
396
396
|
Ge(e, n, t);
|
|
397
|
-
const
|
|
398
|
-
if (
|
|
397
|
+
const p = o.get(e);
|
|
398
|
+
if (p)
|
|
399
399
|
return s ? {
|
|
400
400
|
transformedValue: null
|
|
401
|
-
} :
|
|
401
|
+
} : p;
|
|
402
402
|
}
|
|
403
403
|
if (!Ye(e, r)) {
|
|
404
|
-
const
|
|
405
|
-
transformedValue:
|
|
406
|
-
annotations: [
|
|
404
|
+
const p = U(e, r), d = p ? {
|
|
405
|
+
transformedValue: p.value,
|
|
406
|
+
annotations: [p.type]
|
|
407
407
|
} : {
|
|
408
408
|
transformedValue: e
|
|
409
409
|
};
|
|
410
|
-
return
|
|
410
|
+
return c || o.set(e, d), d;
|
|
411
411
|
}
|
|
412
|
-
if (
|
|
412
|
+
if (C(i, e))
|
|
413
413
|
return {
|
|
414
414
|
transformedValue: null
|
|
415
415
|
};
|
|
416
|
-
const
|
|
417
|
-
|
|
418
|
-
if (
|
|
419
|
-
throw new Error(`Detected property ${
|
|
420
|
-
const _ =
|
|
421
|
-
|
|
422
|
-
|
|
416
|
+
const l = U(e, r), u = l?.value ?? e, f = m(u) ? [] : {}, w = {};
|
|
417
|
+
g(u, (p, d) => {
|
|
418
|
+
if (d === "__proto__" || d === "constructor" || d === "prototype")
|
|
419
|
+
throw new Error(`Detected property ${d}. This is a prototype pollution risk, please remove it from your object.`);
|
|
420
|
+
const _ = te(p, t, r, s, [...n, d], [...i, e], o);
|
|
421
|
+
f[d] = _.transformedValue, m(_.annotations) ? w[R(d)] = _.annotations : v(_.annotations) && g(_.annotations, (ge, we) => {
|
|
422
|
+
w[R(d) + "." + we] = ge;
|
|
423
423
|
});
|
|
424
424
|
});
|
|
425
|
-
const
|
|
426
|
-
transformedValue:
|
|
427
|
-
annotations:
|
|
425
|
+
const L = T(w) ? {
|
|
426
|
+
transformedValue: f,
|
|
427
|
+
annotations: l ? [l.type] : void 0
|
|
428
428
|
} : {
|
|
429
|
-
transformedValue:
|
|
430
|
-
annotations:
|
|
429
|
+
transformedValue: f,
|
|
430
|
+
annotations: l ? [l.type, w] : w
|
|
431
431
|
};
|
|
432
|
-
return
|
|
432
|
+
return c || o.set(e, L), L;
|
|
433
433
|
};
|
|
434
|
-
function
|
|
434
|
+
function re(e) {
|
|
435
435
|
return Object.prototype.toString.call(e).slice(8, -1);
|
|
436
436
|
}
|
|
437
|
-
function
|
|
438
|
-
return
|
|
437
|
+
function z(e) {
|
|
438
|
+
return re(e) === "Array";
|
|
439
439
|
}
|
|
440
440
|
function Xe(e) {
|
|
441
|
-
if (
|
|
441
|
+
if (re(e) !== "Object")
|
|
442
442
|
return !1;
|
|
443
443
|
const t = Object.getPrototypeOf(e);
|
|
444
444
|
return !!t && t.constructor === Object && t === Object.prototype;
|
|
@@ -452,28 +452,28 @@ function Ze(e, t, r, s, n) {
|
|
|
452
452
|
configurable: !0
|
|
453
453
|
});
|
|
454
454
|
}
|
|
455
|
-
function
|
|
456
|
-
if (
|
|
457
|
-
return e.map((n) =>
|
|
455
|
+
function M(e, t = {}) {
|
|
456
|
+
if (z(e))
|
|
457
|
+
return e.map((n) => M(n, t));
|
|
458
458
|
if (!Xe(e))
|
|
459
459
|
return e;
|
|
460
460
|
const r = Object.getOwnPropertyNames(e), s = Object.getOwnPropertySymbols(e);
|
|
461
461
|
return [...r, ...s].reduce((n, i) => {
|
|
462
|
-
if (i === "__proto__" ||
|
|
462
|
+
if (i === "__proto__" || z(t.props) && !t.props.includes(i))
|
|
463
463
|
return n;
|
|
464
|
-
const o = e[i],
|
|
465
|
-
return Ze(n, i,
|
|
464
|
+
const o = e[i], c = M(o, t);
|
|
465
|
+
return Ze(n, i, c, e, t.nonenumerable), n;
|
|
466
466
|
}, {});
|
|
467
467
|
}
|
|
468
|
-
class
|
|
468
|
+
class a {
|
|
469
469
|
/**
|
|
470
470
|
* @param dedupeReferentialEqualities If true, SuperJSON will make sure only one instance of referentially equal objects are serialized and the rest are replaced with `null`.
|
|
471
471
|
*/
|
|
472
472
|
constructor({ dedupe: t = !1 } = {}) {
|
|
473
|
-
this.classRegistry = new Ce(), this.symbolRegistry = new
|
|
473
|
+
this.classRegistry = new Ce(), this.symbolRegistry = new F((r) => r.description ?? ""), this.customTransformerRegistry = new Te(), this.allowedErrorProps = [], this.dedupe = t;
|
|
474
474
|
}
|
|
475
475
|
serialize(t) {
|
|
476
|
-
const r = /* @__PURE__ */ new Map(), s =
|
|
476
|
+
const r = /* @__PURE__ */ new Map(), s = te(t, r, this, this.dedupe), n = {
|
|
477
477
|
json: s.transformedValue
|
|
478
478
|
};
|
|
479
479
|
s.annotations && (n.meta = {
|
|
@@ -488,8 +488,8 @@ class l {
|
|
|
488
488
|
}
|
|
489
489
|
deserialize(t, r) {
|
|
490
490
|
const { json: s, meta: n } = t;
|
|
491
|
-
let i = r?.inPlace ? s :
|
|
492
|
-
return n?.values && (i =
|
|
491
|
+
let i = r?.inPlace ? s : M(s);
|
|
492
|
+
return n?.values && (i = Ke(i, n.values, n.v ?? 0, this)), n?.referentialEqualities && (i = $e(i, n.referentialEqualities, n.v ?? 0)), i;
|
|
493
493
|
}
|
|
494
494
|
stringify(t) {
|
|
495
495
|
return JSON.stringify(this.serialize(t));
|
|
@@ -513,24 +513,24 @@ class l {
|
|
|
513
513
|
this.allowedErrorProps.push(...t);
|
|
514
514
|
}
|
|
515
515
|
}
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
const je = 1e4, Qe =
|
|
516
|
+
a.defaultInstance = new a();
|
|
517
|
+
a.serialize = a.defaultInstance.serialize.bind(a.defaultInstance);
|
|
518
|
+
a.deserialize = a.defaultInstance.deserialize.bind(a.defaultInstance);
|
|
519
|
+
a.stringify = a.defaultInstance.stringify.bind(a.defaultInstance);
|
|
520
|
+
a.parse = a.defaultInstance.parse.bind(a.defaultInstance);
|
|
521
|
+
a.registerClass = a.defaultInstance.registerClass.bind(a.defaultInstance);
|
|
522
|
+
a.registerSymbol = a.defaultInstance.registerSymbol.bind(a.defaultInstance);
|
|
523
|
+
a.registerCustom = a.defaultInstance.registerCustom.bind(a.defaultInstance);
|
|
524
|
+
a.allowErrorProps = a.defaultInstance.allowErrorProps.bind(a.defaultInstance);
|
|
525
|
+
a.serialize;
|
|
526
|
+
a.deserialize;
|
|
527
|
+
a.stringify;
|
|
528
|
+
a.parse;
|
|
529
|
+
a.registerClass;
|
|
530
|
+
a.registerCustom;
|
|
531
|
+
a.registerSymbol;
|
|
532
|
+
a.allowErrorProps;
|
|
533
|
+
const je = 1e4, Qe = 6e3, Je = 2e3, et = 3e4;
|
|
534
534
|
class tt {
|
|
535
535
|
/** Active server base URL. Mutable via `switchServerUrl()` so the
|
|
536
536
|
* endpoint-race helper can pivot the transport onto a LAN candidate
|
|
@@ -638,8 +638,8 @@ class tt {
|
|
|
638
638
|
() => {
|
|
639
639
|
clearTimeout(o), n();
|
|
640
640
|
},
|
|
641
|
-
(
|
|
642
|
-
clearTimeout(o), i(
|
|
641
|
+
(c) => {
|
|
642
|
+
clearTimeout(o), i(c instanceof Error ? c : new Error(String(c)));
|
|
643
643
|
}
|
|
644
644
|
);
|
|
645
645
|
}) : await s, this.connected = !0;
|
|
@@ -734,19 +734,19 @@ class tt {
|
|
|
734
734
|
} catch {
|
|
735
735
|
return null;
|
|
736
736
|
}
|
|
737
|
-
})(), n = s?.port ? Number(s.port) : s?.protocol === "https:" ? 443 : 80, i = s?.protocol === "https:" ? "https" : "http",
|
|
738
|
-
if (!
|
|
737
|
+
})(), n = s?.port ? Number(s.port) : s?.protocol === "https:" ? 443 : 80, i = s?.protocol === "https:" ? "https" : "http", c = this._trpcClient.localNetwork?.getConnectionEndpoints;
|
|
738
|
+
if (!c)
|
|
739
739
|
return { winner: this._serverUrl, switched: !1 };
|
|
740
|
-
let
|
|
740
|
+
let l;
|
|
741
741
|
try {
|
|
742
|
-
|
|
742
|
+
l = (await c.query({ port: n, ipv4Only: t?.ipv4Only, scheme: i })).endpoints;
|
|
743
743
|
} catch {
|
|
744
744
|
return { winner: this._serverUrl, switched: !1 };
|
|
745
745
|
}
|
|
746
|
-
if (
|
|
746
|
+
if (l.length === 0)
|
|
747
747
|
return { winner: this._serverUrl, switched: !1 };
|
|
748
|
-
const
|
|
749
|
-
return !
|
|
748
|
+
const u = await rt(l.map((f) => f.baseUrl), r);
|
|
749
|
+
return !u || u === this._serverUrl ? { winner: u ?? this._serverUrl, switched: !1 } : (this.switchServerUrl(u), { winner: u, switched: !0 });
|
|
750
750
|
}
|
|
751
751
|
/** Tear down WS connection + mirror. The instance is unusable afterwards. */
|
|
752
752
|
close() {
|
|
@@ -826,6 +826,30 @@ class tt {
|
|
|
826
826
|
listDevices(t) {
|
|
827
827
|
return this.mirror ? (t ? this.mirror.query(t) : this.mirror.getAllDevices()).map((s) => this.attachBinding(s)) : [];
|
|
828
828
|
}
|
|
829
|
+
/**
|
|
830
|
+
* Sync `DeviceInfo` snapshot (name, canonical type, online, …) for one device
|
|
831
|
+
* from the warm-boot mirror — `null` if the mirror isn't booted or the device
|
|
832
|
+
* is unknown. Unlike a `DeviceProxy` (cap accessors only), this carries the
|
|
833
|
+
* display identity the UI needs to render a device on first paint.
|
|
834
|
+
*/
|
|
835
|
+
getDeviceInfo(t) {
|
|
836
|
+
return this.mirror?.getDeviceInfo(t) ?? null;
|
|
837
|
+
}
|
|
838
|
+
/**
|
|
839
|
+
* The `DeviceInfo` snapshots for the current device set (the warm-boot cache),
|
|
840
|
+
* honouring the same `filters` as {@link listDevices}. Lets a UI render a named
|
|
841
|
+
* device list immediately without waiting for per-device lifecycle events.
|
|
842
|
+
*/
|
|
843
|
+
listDeviceInfos(t) {
|
|
844
|
+
const r = this.mirror;
|
|
845
|
+
if (!r) return [];
|
|
846
|
+
const s = t ? r.query(t) : r.getAllDevices(), n = [];
|
|
847
|
+
for (const i of s) {
|
|
848
|
+
const o = r.getDeviceInfo(i.deviceId);
|
|
849
|
+
o && n.push(o);
|
|
850
|
+
}
|
|
851
|
+
return n;
|
|
852
|
+
}
|
|
829
853
|
/**
|
|
830
854
|
* Sync lookup by numeric id. `null` if the mirror has not been booted
|
|
831
855
|
* or the device is unknown.
|
|
@@ -934,12 +958,8 @@ class tt {
|
|
|
934
958
|
get pipelineRunner() {
|
|
935
959
|
return this._systemProxy.pipelineRunner;
|
|
936
960
|
}
|
|
937
|
-
|
|
938
|
-
|
|
939
|
-
}
|
|
940
|
-
get recordingEngine() {
|
|
941
|
-
return this._systemProxy.recordingEngine;
|
|
942
|
-
}
|
|
961
|
+
// `platform-probe` is infra (addon-to-addon via `api.platformProbe`), not a
|
|
962
|
+
// client-facing system cap — it isn't on SystemProxy, so no getter here.
|
|
943
963
|
get settingsStore() {
|
|
944
964
|
return this._systemProxy.settingsStore;
|
|
945
965
|
}
|
|
@@ -1025,16 +1045,16 @@ class tt {
|
|
|
1025
1045
|
onClose: () => {
|
|
1026
1046
|
this.emitConnectionEvent("disconnected");
|
|
1027
1047
|
}
|
|
1028
|
-
}),
|
|
1029
|
-
links: [be({ client: this._wsClient, transformer:
|
|
1048
|
+
}), N({
|
|
1049
|
+
links: [be({ client: this._wsClient, transformer: a })]
|
|
1030
1050
|
});
|
|
1031
1051
|
}
|
|
1032
|
-
return this._wsClient = null,
|
|
1033
|
-
links: [ve({ url: `${this._serverUrl}/trpc`, headers: t, transformer:
|
|
1052
|
+
return this._wsClient = null, N({
|
|
1053
|
+
links: [ve({ url: `${this._serverUrl}/trpc`, headers: t, transformer: a })]
|
|
1034
1054
|
});
|
|
1035
1055
|
}
|
|
1036
1056
|
}
|
|
1037
|
-
function
|
|
1057
|
+
function dt(e) {
|
|
1038
1058
|
return new tt(e);
|
|
1039
1059
|
}
|
|
1040
1060
|
async function rt(e, t) {
|
|
@@ -1042,29 +1062,29 @@ async function rt(e, t) {
|
|
|
1042
1062
|
if (typeof fetch != "function") return e[0] ?? null;
|
|
1043
1063
|
const s = typeof window < "u" && typeof window.location < "u" && window.location.protocol === "https:" ? e.filter((o) => o.toLowerCase().startsWith("https://")) : e;
|
|
1044
1064
|
if (s.length === 0) return null;
|
|
1045
|
-
const n = s.map(() => new AbortController()), i = s.map(async (o,
|
|
1046
|
-
const
|
|
1065
|
+
const n = s.map(() => new AbortController()), i = s.map(async (o, c) => {
|
|
1066
|
+
const l = n[c], u = setTimeout(() => l.abort(), t);
|
|
1047
1067
|
try {
|
|
1048
|
-
const
|
|
1068
|
+
const f = await fetch(`${o.replace(/\/+$/, "")}/trpc/health`, {
|
|
1049
1069
|
method: "GET",
|
|
1050
|
-
signal:
|
|
1070
|
+
signal: l.signal,
|
|
1051
1071
|
// Cross-origin probes from a browser sandbox are fine — the
|
|
1052
1072
|
// /trpc/health response is open-CORS by the Fastify default.
|
|
1053
1073
|
// No credentials needed (this is a transport-quality probe,
|
|
1054
1074
|
// not an auth round-trip).
|
|
1055
1075
|
credentials: "omit"
|
|
1056
1076
|
});
|
|
1057
|
-
if (!
|
|
1077
|
+
if (!f.ok) throw new Error(`${f.status}`);
|
|
1058
1078
|
return o;
|
|
1059
1079
|
} finally {
|
|
1060
|
-
clearTimeout(
|
|
1080
|
+
clearTimeout(u);
|
|
1061
1081
|
}
|
|
1062
1082
|
});
|
|
1063
1083
|
try {
|
|
1064
1084
|
const o = await Promise.any(i);
|
|
1065
|
-
for (const
|
|
1085
|
+
for (const c of n)
|
|
1066
1086
|
try {
|
|
1067
|
-
|
|
1087
|
+
c.abort();
|
|
1068
1088
|
} catch {
|
|
1069
1089
|
}
|
|
1070
1090
|
return o;
|
|
@@ -1072,8 +1092,8 @@ async function rt(e, t) {
|
|
|
1072
1092
|
return null;
|
|
1073
1093
|
}
|
|
1074
1094
|
}
|
|
1075
|
-
var
|
|
1076
|
-
const
|
|
1095
|
+
var se = /* @__PURE__ */ ((e) => (e.Motion = "motion", e.Person = "person", e.Vehicle = "vehicle", e.Animal = "animal", e.Audio = "audio", e.Face = "face", e.Plate = "plate", e.Package = "package", e.Doorbell = "doorbell", e.Sensor = "sensor", e))(se || {});
|
|
1096
|
+
const ne = [
|
|
1077
1097
|
"animal",
|
|
1078
1098
|
"dog_cat",
|
|
1079
1099
|
"dog",
|
|
@@ -1100,7 +1120,7 @@ const ie = [
|
|
|
1100
1120
|
"snake",
|
|
1101
1121
|
"turtle",
|
|
1102
1122
|
"lizard"
|
|
1103
|
-
],
|
|
1123
|
+
], ie = [
|
|
1104
1124
|
"person",
|
|
1105
1125
|
"people",
|
|
1106
1126
|
"pedestrian",
|
|
@@ -1113,7 +1133,7 @@ const ie = [
|
|
|
1113
1133
|
"hand",
|
|
1114
1134
|
"head",
|
|
1115
1135
|
"body"
|
|
1116
|
-
],
|
|
1136
|
+
], oe = [
|
|
1117
1137
|
"vehicle",
|
|
1118
1138
|
"car",
|
|
1119
1139
|
"truck",
|
|
@@ -1131,7 +1151,7 @@ const ie = [
|
|
|
1131
1151
|
"boat",
|
|
1132
1152
|
"ship",
|
|
1133
1153
|
"helicopter"
|
|
1134
|
-
],
|
|
1154
|
+
], ae = [
|
|
1135
1155
|
"face",
|
|
1136
1156
|
"eyes",
|
|
1137
1157
|
"nose",
|
|
@@ -1181,10 +1201,10 @@ const ie = [
|
|
|
1181
1201
|
"damaged_plate",
|
|
1182
1202
|
"obscured_plate",
|
|
1183
1203
|
"dirty_plate"
|
|
1184
|
-
],
|
|
1204
|
+
], le = ["motion", "movement", "other"], ue = ["package", "packet"], fe = [
|
|
1185
1205
|
"audio"
|
|
1186
1206
|
/* Audio */
|
|
1187
|
-
],
|
|
1207
|
+
], de = [
|
|
1188
1208
|
"speech",
|
|
1189
1209
|
"scream",
|
|
1190
1210
|
"babbling",
|
|
@@ -1254,33 +1274,33 @@ const ie = [
|
|
|
1254
1274
|
"door_open",
|
|
1255
1275
|
"flooded",
|
|
1256
1276
|
"entry_open"
|
|
1257
|
-
],
|
|
1258
|
-
...
|
|
1277
|
+
], me = {
|
|
1278
|
+
...ne.reduce((e, t) => ({
|
|
1259
1279
|
...e,
|
|
1260
1280
|
[t]: "animal"
|
|
1261
1281
|
/* Animal */
|
|
1262
1282
|
}), {}),
|
|
1263
|
-
...
|
|
1283
|
+
...ie.reduce((e, t) => ({
|
|
1264
1284
|
...e,
|
|
1265
1285
|
[t]: "person"
|
|
1266
1286
|
/* Person */
|
|
1267
1287
|
}), {}),
|
|
1268
|
-
...
|
|
1288
|
+
...oe.reduce((e, t) => ({
|
|
1269
1289
|
...e,
|
|
1270
1290
|
[t]: "vehicle"
|
|
1271
1291
|
/* Vehicle */
|
|
1272
1292
|
}), {}),
|
|
1273
|
-
...
|
|
1293
|
+
...le.reduce((e, t) => ({
|
|
1274
1294
|
...e,
|
|
1275
1295
|
[t]: "motion"
|
|
1276
1296
|
/* Motion */
|
|
1277
1297
|
}), {}),
|
|
1278
|
-
...
|
|
1298
|
+
...ue.reduce((e, t) => ({
|
|
1279
1299
|
...e,
|
|
1280
1300
|
[t]: "package"
|
|
1281
1301
|
/* Package */
|
|
1282
1302
|
}), {}),
|
|
1283
|
-
...
|
|
1303
|
+
...ae.reduce((e, t) => ({
|
|
1284
1304
|
...e,
|
|
1285
1305
|
[t]: "face"
|
|
1286
1306
|
/* Face */
|
|
@@ -1295,7 +1315,7 @@ const ie = [
|
|
|
1295
1315
|
[t]: "audio"
|
|
1296
1316
|
/* Audio */
|
|
1297
1317
|
}), {}),
|
|
1298
|
-
...
|
|
1318
|
+
...de.reduce((e, t) => ({
|
|
1299
1319
|
...e,
|
|
1300
1320
|
[t]: "audio"
|
|
1301
1321
|
/* Audio */
|
|
@@ -1310,45 +1330,45 @@ const ie = [
|
|
|
1310
1330
|
[t]: "sensor"
|
|
1311
1331
|
/* Sensor */
|
|
1312
1332
|
}), {})
|
|
1313
|
-
}, st = (e) =>
|
|
1333
|
+
}, st = (e) => ae.includes(e), nt = (e) => ce.includes(e), ht = (e) => ne.includes(e), pt = (e) => ie.includes(e), mt = (e) => oe.includes(e), yt = (e) => le.includes(e), gt = (e) => he.includes(e), wt = (e) => ue.includes(e), _t = (e) => fe.includes(e) || de.includes(e), bt = (e) => pe.includes(e), vt = (e) => st(e) || nt(e), Et = (e) => me[e], Pt = (e) => {
|
|
1314
1334
|
const { className: t } = e, r = {
|
|
1315
1335
|
face: "person",
|
|
1316
1336
|
plate: "vehicle"
|
|
1317
1337
|
/* Vehicle */
|
|
1318
|
-
}, s =
|
|
1338
|
+
}, s = me[t];
|
|
1319
1339
|
return s && s !== t ? s : r[t];
|
|
1320
|
-
}, it = Object.values(
|
|
1340
|
+
}, it = Object.values(se), O = it.filter(
|
|
1321
1341
|
(e) => e !== "motion"
|
|
1322
1342
|
/* Motion */
|
|
1323
|
-
),
|
|
1343
|
+
), ye = [
|
|
1324
1344
|
"person",
|
|
1325
1345
|
"doorbell",
|
|
1326
1346
|
"package"
|
|
1327
1347
|
/* Package */
|
|
1328
1348
|
], ot = [
|
|
1329
|
-
...
|
|
1349
|
+
...ye,
|
|
1330
1350
|
"vehicle",
|
|
1331
1351
|
"animal",
|
|
1332
1352
|
"audio",
|
|
1333
1353
|
"face",
|
|
1334
1354
|
"plate"
|
|
1335
1355
|
/* Plate */
|
|
1336
|
-
], at = [...
|
|
1356
|
+
], at = [...O];
|
|
1337
1357
|
function Ct(e, t) {
|
|
1338
1358
|
switch (e) {
|
|
1339
1359
|
case "critical":
|
|
1340
|
-
return
|
|
1360
|
+
return ye;
|
|
1341
1361
|
case "important":
|
|
1342
1362
|
return ot;
|
|
1343
1363
|
case "all":
|
|
1344
1364
|
return at;
|
|
1345
1365
|
case "custom":
|
|
1346
|
-
return t?.length ? t :
|
|
1366
|
+
return t?.length ? t : O;
|
|
1347
1367
|
default:
|
|
1348
|
-
return
|
|
1368
|
+
return O;
|
|
1349
1369
|
}
|
|
1350
1370
|
}
|
|
1351
|
-
const
|
|
1371
|
+
const q = {
|
|
1352
1372
|
// Scrypted PascalCase
|
|
1353
1373
|
Light: "light",
|
|
1354
1374
|
Switch: "switch",
|
|
@@ -1424,12 +1444,12 @@ const F = {
|
|
|
1424
1444
|
Outlet: "switch"
|
|
1425
1445
|
};
|
|
1426
1446
|
function Tt(e) {
|
|
1427
|
-
const t =
|
|
1447
|
+
const t = q[e];
|
|
1428
1448
|
if (t) return t;
|
|
1429
1449
|
const r = e.toLowerCase();
|
|
1430
|
-
return
|
|
1450
|
+
return q[r] ?? null;
|
|
1431
1451
|
}
|
|
1432
|
-
const
|
|
1452
|
+
const ct = [
|
|
1433
1453
|
"Entry",
|
|
1434
1454
|
"Light",
|
|
1435
1455
|
"Switch",
|
|
@@ -1441,7 +1461,7 @@ const lt = [
|
|
|
1441
1461
|
"Sensor",
|
|
1442
1462
|
"Select",
|
|
1443
1463
|
"Program"
|
|
1444
|
-
], Rt = new Set(
|
|
1464
|
+
], Rt = new Set(ct), lt = [
|
|
1445
1465
|
"light",
|
|
1446
1466
|
"switch",
|
|
1447
1467
|
"input_boolean",
|
|
@@ -1455,7 +1475,7 @@ const lt = [
|
|
|
1455
1475
|
"siren",
|
|
1456
1476
|
"media_player",
|
|
1457
1477
|
"script"
|
|
1458
|
-
], It = new Set(
|
|
1478
|
+
], It = new Set(lt), D = [
|
|
1459
1479
|
{
|
|
1460
1480
|
id: "liveStream",
|
|
1461
1481
|
label: "Live Stream",
|
|
@@ -1561,78 +1581,45 @@ const lt = [
|
|
|
1561
1581
|
}
|
|
1562
1582
|
];
|
|
1563
1583
|
function At(e, t, r) {
|
|
1564
|
-
const s =
|
|
1584
|
+
const s = D.find((n) => n.id === e);
|
|
1565
1585
|
return !(!s || !s.sources[t] || s.platforms && s.platforms[r] === !1);
|
|
1566
1586
|
}
|
|
1567
1587
|
function Mt(e) {
|
|
1568
|
-
return
|
|
1588
|
+
return D.filter((t) => t.sources[e]);
|
|
1569
1589
|
}
|
|
1570
1590
|
function Ot() {
|
|
1571
|
-
return
|
|
1572
|
-
}
|
|
1573
|
-
function Dt(e, t, r) {
|
|
1574
|
-
if (e.length === 0) return null;
|
|
1575
|
-
const s = t.viewportWidth * t.viewportHeight * (t.pixelRatio ?? 1), n = t.bandwidthMbps ?? 100, i = t.packetLoss ?? 0, o = t.rttMs ?? 50;
|
|
1576
|
-
let a = "high";
|
|
1577
|
-
t.maxResolution === "low" || t.isCellular || n < 1 || i > 0.05 ? a = "low" : t.maxResolution === "medium" || n < 5 || s < 5e5 || o > 200 ? a = "medium" : (t.maxResolution === "high" || s > 2e6) && (a = "high");
|
|
1578
|
-
const c = {
|
|
1579
|
-
main: "high",
|
|
1580
|
-
sub: "medium",
|
|
1581
|
-
ext: "low"
|
|
1582
|
-
}, f = r ?? "native", h = e.map((d) => {
|
|
1583
|
-
let u = 0;
|
|
1584
|
-
const m = c[d.profile] ?? "medium";
|
|
1585
|
-
if (m === a ? u += 100 : (a === "high" && m === "medium" || a === "medium" && m === "high" || a === "medium" && m === "low" || a === "low" && m === "medium") && (u += 50), d.transport === f ? u += 30 : d.transport === "native" ? u += 20 : d.transport === "rtsp" ? u += 15 : d.transport === "rtmp" && (u += 10), d.metadata?.width && d.metadata?.height) {
|
|
1586
|
-
const w = d.metadata.width * d.metadata.height / Math.max(s, 1);
|
|
1587
|
-
w >= 0.8 && w <= 2 ? u += 25 : w >= 0.5 && w <= 3 && (u += 15), w > 4 && n < 10 && (u -= 20);
|
|
1588
|
-
}
|
|
1589
|
-
return d.metadata?.codec && (n < 5 && d.metadata.codec.includes("265") && (u += 10), n >= 10 && d.metadata.codec.includes("264") && (u += 5)), { ...d, score: u, targetTier: a };
|
|
1590
|
-
});
|
|
1591
|
-
h.sort((d, u) => u.score - d.score);
|
|
1592
|
-
const p = h[0];
|
|
1593
|
-
return {
|
|
1594
|
-
streamName: p.streamName,
|
|
1595
|
-
profile: p.profile,
|
|
1596
|
-
transport: p.transport,
|
|
1597
|
-
label: p.label,
|
|
1598
|
-
metadata: p.metadata,
|
|
1599
|
-
reason: `${p.targetTier} quality → ${p.profile}/${p.transport} (score: ${p.score})`
|
|
1600
|
-
};
|
|
1601
|
-
}
|
|
1602
|
-
function Lt(e, t) {
|
|
1603
|
-
return t ? 10 : e.isCellular || (e.packetLoss ?? 0) > 0.02 ? 15 : 30;
|
|
1591
|
+
return D.filter((e) => e.requiresBackend);
|
|
1604
1592
|
}
|
|
1605
1593
|
export {
|
|
1606
|
-
|
|
1607
|
-
|
|
1608
|
-
|
|
1594
|
+
O as DEFAULT_ENABLED_CLASSES,
|
|
1595
|
+
se as DetectionClass,
|
|
1596
|
+
lt as ELIGIBLE_HA_DOMAINS,
|
|
1609
1597
|
It as ELIGIBLE_HA_DOMAINS_SET,
|
|
1610
|
-
|
|
1598
|
+
ct as ELIGIBLE_SCRYPTED_DEVICE_TYPES,
|
|
1611
1599
|
Rt as ELIGIBLE_SCRYPTED_DEVICE_TYPES_SET,
|
|
1612
|
-
|
|
1600
|
+
D as FEATURE_MATRIX,
|
|
1613
1601
|
kt as HA_DOMAIN_TYPE_MAP,
|
|
1614
|
-
|
|
1602
|
+
q as RAW_TO_CANONICAL,
|
|
1615
1603
|
St as SCRYPTED_TYPE_TO_CANONICAL,
|
|
1616
1604
|
tt as System,
|
|
1617
1605
|
at as TIMELINE_PRESET_ALL,
|
|
1618
|
-
|
|
1606
|
+
ye as TIMELINE_PRESET_CRITICAL,
|
|
1619
1607
|
ot as TIMELINE_PRESET_IMPORTANT,
|
|
1620
|
-
|
|
1608
|
+
ne as animalClasses,
|
|
1621
1609
|
fe as audioClasses,
|
|
1622
|
-
|
|
1623
|
-
|
|
1610
|
+
de as audioLabelClasses,
|
|
1611
|
+
dt as createSystem,
|
|
1624
1612
|
it as defaultDetectionClasses,
|
|
1625
|
-
|
|
1613
|
+
me as detectionClassesDefaultMap,
|
|
1626
1614
|
he as doorbellClasses,
|
|
1627
|
-
|
|
1615
|
+
ae as faceClasses,
|
|
1628
1616
|
Ot as getBackendRequiredFeatures,
|
|
1629
1617
|
Tt as getCanonicalDeviceType,
|
|
1630
1618
|
Ct as getClassesForTimelinePreset,
|
|
1631
|
-
Lt as getNextEvalInterval,
|
|
1632
1619
|
Et as getParentClass,
|
|
1633
1620
|
Pt as getParentDetectionClass,
|
|
1634
1621
|
Mt as getSourceFeatures,
|
|
1635
|
-
|
|
1622
|
+
ht as isAnimalClassname,
|
|
1636
1623
|
_t as isAudioClassname,
|
|
1637
1624
|
gt as isDoorbellClassname,
|
|
1638
1625
|
st as isFaceClassname,
|
|
@@ -1640,16 +1627,15 @@ export {
|
|
|
1640
1627
|
vt as isLabelDetection,
|
|
1641
1628
|
yt as isMotionClassname,
|
|
1642
1629
|
wt as isPackageClassname,
|
|
1643
|
-
|
|
1630
|
+
pt as isPersonClassname,
|
|
1644
1631
|
nt as isPlateClassname,
|
|
1645
1632
|
bt as isSensorLabelClassname,
|
|
1646
|
-
|
|
1633
|
+
mt as isVehicleClassname,
|
|
1647
1634
|
ce as licensePlateClasses,
|
|
1648
|
-
|
|
1649
|
-
|
|
1650
|
-
|
|
1635
|
+
le as motionClasses,
|
|
1636
|
+
ue as packageClasses,
|
|
1637
|
+
ie as personClasses,
|
|
1651
1638
|
rt as raceFastestEndpoint,
|
|
1652
|
-
Dt as selectOptimalStream,
|
|
1653
1639
|
pe as sensorLabelClasses,
|
|
1654
|
-
|
|
1640
|
+
oe as vehicleClasses
|
|
1655
1641
|
};
|