@camstack/addon-admin-ui 1.1.48 → 1.1.50
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/assets/{AddLocationWizard-CNu50RRk.js → AddLocationWizard-CIqEDdCn.js} +1 -1
- package/dist/assets/{AddonCollectionPage-PSUd7Fp3.js → AddonCollectionPage-oYV5gLkL.js} +1 -1
- package/dist/assets/Addons-DXHAaRyv.js +1 -0
- package/dist/assets/{AdminTabs-BHvYU2Ev.js → AdminTabs-BeF-jlOp.js} +1 -1
- package/dist/assets/{BrokerForm-D0rEasac.js → BrokerForm-CKF91l2P.js} +1 -1
- package/dist/assets/{Capabilities-BKDzO_QH.js → Capabilities-DjYa3mVl.js} +1 -1
- package/dist/assets/{CapabilityBadges-CnoS0ir9.js → CapabilityBadges-Ch3OxAx_.js} +1 -1
- package/dist/assets/{Cluster-Kw2bIhhr.js → Cluster-B0VcGezF.js} +1 -1
- package/dist/assets/{Dashboard-Dk7fWy7X.js → Dashboard-B7W-1CPO.js} +1 -1
- package/dist/assets/{Data-DCA91s8e.js → Data-DTdFNsIK.js} +1 -1
- package/dist/assets/DetectionIntelligence-Dlqt7Nfw.js +1 -0
- package/dist/assets/DeviceDetail-BoyqcoSb.js +2 -0
- package/dist/assets/{Devices-BC3G6oUT.js → Devices-DY58j8Im.js} +1 -1
- package/dist/assets/{EmbedPlayerPage-DSojH1CJ.js → EmbedPlayerPage-7fAe8VOM.js} +1 -1
- package/dist/assets/{FormBuilder-DQtsRfrS.js → FormBuilder-DF9HdVVE.js} +1 -1
- package/dist/assets/Identity-CcxXGRs-.js +1 -0
- package/dist/assets/IntegrationDetail-3unRfrYT.js +1 -0
- package/dist/assets/{Integrations-B1b2SfHN.js → Integrations-Cwy28tRf.js} +1 -1
- package/dist/assets/{Integrations-C6DlqzuU.js → Integrations-VffZ4PwO.js} +1 -1
- package/dist/assets/{Logs-oJOvATtc.js → Logs-CH6InwRa.js} +1 -1
- package/dist/assets/{MotionZonesSettings-CtyZyzO0.js → MotionZonesSettings-wgT8qNCk.js} +1 -1
- package/dist/assets/{MyAccess-B95erwTc.js → MyAccess-pia6abG8.js} +1 -1
- package/dist/assets/Network-Cs7w2ldQ.js +1 -0
- package/dist/assets/{NodeAddonsSettingsPanel-CDaY9-jy.js → NodeAddonsSettingsPanel-21ajRiKU.js} +1 -1
- package/dist/assets/{NotificationTargets-CpUBiCnZ.js → NotificationTargets-BPToXpbO.js} +1 -1
- package/dist/assets/Pipeline-D9UHFkhz.js +1 -0
- package/dist/assets/{PrivacyMaskSettings-BdvcV5Pq.js → PrivacyMaskSettings-aoGQ9CVn.js} +1 -1
- package/dist/assets/{ProviderIcon-eLscNoy4.js → ProviderIcon-B00C6yVI.js} +1 -1
- package/dist/assets/{ScanNetworkModal-QqDj5dFm.js → ScanNetworkModal-DTAMAK8z.js} +1 -1
- package/dist/assets/{ServerManagement-hZQ2-18O.js → ServerManagement-B0UENejd.js} +1 -1
- package/dist/assets/{Settings-CKkGgfFo.js → Settings-CyUdtPyP.js} +1 -1
- package/dist/assets/{Showroom-CJ1lhEcy.js → Showroom-DqNnYNbB.js} +1 -1
- package/dist/assets/{_virtual_mf-localSharedImportMap___mfe_internal__admin_ui_host-CZB2m_J6.js → _virtual_mf-localSharedImportMap___mfe_internal__admin_ui_host-DcgCF70N.js} +1 -1
- package/dist/assets/{build-cluster-graph-D8zI3CJw.js → build-cluster-graph-DLb-k44M.js} +2 -2
- package/dist/assets/circle-check-big-B3D63yK2.js +1 -0
- package/dist/assets/{copy-De0LCulr.js → copy-PDaNKoDE.js} +1 -1
- package/dist/assets/{dist-B5IRIygV.js → dist-D248MGg1.js} +1 -1
- package/dist/assets/dist-DK5byzu0.js +7 -0
- package/dist/assets/{download-gY2u92nb.js → download-iZu8ddva.js} +1 -1
- package/dist/assets/{hostInit-BToWOe6B.js → hostInit-DT-Sx4uZ.js} +1 -1
- package/dist/assets/index-BFJ6KO0x.css +2 -0
- package/dist/assets/index-pSZYK5ny.js +4 -0
- package/dist/assets/{key-round-DkqhaVT8.js → key-round-xzAl99gK.js} +1 -1
- package/dist/assets/{mf-entry-bootstrap-0-f884f398.js → mf-entry-bootstrap-0-c91235d9.js} +2 -2
- package/dist/assets/{pencil-CMpHSjpp.js → pencil-DL1TJsTc.js} +1 -1
- package/dist/assets/{player-overlays-Dsrz7Epi.js → player-overlays-D3fMTMSy.js} +1 -1
- package/dist/assets/plus-CRDyDYzj.js +1 -0
- package/dist/assets/{radio-RxH1E0zh.js → radio-Cidrh6lI.js} +1 -1
- package/dist/assets/{refresh-cw-C6St6mBe.js → refresh-cw-CQ8ZPCKP.js} +1 -1
- package/dist/assets/remoteEntry-CMix6vvq.js +1 -0
- package/dist/assets/{rotate-ccw-vHrIqGml.js → rotate-ccw-CdNSKqrT.js} +1 -1
- package/dist/assets/rotate-cw-DR-mTm0L.js +1 -0
- package/dist/assets/search-M9sg9sgJ.js +1 -0
- package/dist/assets/{sparkles-Crb67IKw.js → sparkles-Uqh90jkF.js} +1 -1
- package/dist/assets/square-DeI3vDTo.js +1 -0
- package/dist/assets/{square-check-big-ftIvwB2w.js → square-check-big-DHo5VpxB.js} +1 -1
- package/dist/assets/src-B45-uhaF.js +7 -0
- package/dist/assets/src-DUz15ij3.js +67 -0
- package/dist/assets/{upload-DfU_xONk.js → upload-CbQEsRc1.js} +1 -1
- package/dist/assets/{useDevice-DWDA_2pg.js → useDevice-BIRPCUj3.js} +1 -1
- package/dist/assets/{useEventInvalidation-BWNmKaq3.js → useEventInvalidation-dY_jfjb6.js} +1 -1
- package/dist/assets/{virtual_mf-REMOTE_ENTRY_ID___mfe_internal__admin_ui_host__remoteEntry-_hash_-BgfXovIL.js → virtual_mf-REMOTE_ENTRY_ID___mfe_internal__admin_ui_host__remoteEntry-_hash_-B65PZoVz.js} +2 -2
- package/dist/assets/{wifi-CVIceYWr.js → wifi-CXcT5hFl.js} +1 -1
- package/dist/assets/{zap-C34L74c5.js → zap-IxXrBEjL.js} +1 -1
- package/dist/index.html +6 -6
- package/dist/server/addon.js +143 -9
- package/package.json +1 -1
- package/dist/assets/Addons-CZjrkq5h.js +0 -1
- package/dist/assets/DetectionIntelligence-COHiawzo.js +0 -1
- package/dist/assets/DeviceDetail-D2xbVjhc.js +0 -2
- package/dist/assets/Identity-CZJMYa-0.js +0 -1
- package/dist/assets/IntegrationDetail-Dylopt_Q.js +0 -1
- package/dist/assets/Network-Bt-0u_vG.js +0 -1
- package/dist/assets/Pipeline-CIy4nvmh.js +0 -1
- package/dist/assets/circle-check-big-C6LRzNwE.js +0 -1
- package/dist/assets/dist-BggkTWZv.js +0 -7
- package/dist/assets/index-BbLGFHTA.js +0 -4
- package/dist/assets/index-Bjs7hcYx.css +0 -2
- package/dist/assets/plus-DwRCRuP4.js +0 -1
- package/dist/assets/remoteEntry-Dwdg-ENJ.js +0 -1
- package/dist/assets/rotate-cw-BTB8lJL-.js +0 -1
- package/dist/assets/search-rHmAwRLQ.js +0 -1
- package/dist/assets/square-CBYzFCHC.js +0 -1
- package/dist/assets/src-BD_Vx_7m.js +0 -67
- package/dist/assets/src-BkJfNPjU.js +0 -7
package/dist/server/addon.js
CHANGED
|
@@ -4629,7 +4629,7 @@ function _instanceof(cls, params = {}) {
|
|
|
4629
4629
|
return inst;
|
|
4630
4630
|
}
|
|
4631
4631
|
//#endregion
|
|
4632
|
-
//#region ../types/dist/sleep-
|
|
4632
|
+
//#region ../types/dist/sleep-Baang_XW.mjs
|
|
4633
4633
|
var EventCategory = /* @__PURE__ */ function(EventCategory) {
|
|
4634
4634
|
EventCategory["SystemBoot"] = "system.boot";
|
|
4635
4635
|
EventCategory["SystemAddonsReady"] = "system.addons-ready";
|
|
@@ -10674,7 +10674,15 @@ method(_void(), array(PipelineEngineChoiceSchema)), method(_void(), PipelineEngi
|
|
|
10674
10674
|
image: _instanceof(Uint8Array).optional(),
|
|
10675
10675
|
referenceImage: string().optional(),
|
|
10676
10676
|
deviceId: number().optional(),
|
|
10677
|
-
sessionId: string().optional()
|
|
10677
|
+
sessionId: string().optional(),
|
|
10678
|
+
/**
|
|
10679
|
+
* Execution plane. 'full' (default) runs the whole tree — benchmark,
|
|
10680
|
+
* reference-image, and detail-subtree calls. 'frame' is the live
|
|
10681
|
+
* per-frame dispatch: ONLY root-plane steps run; crop children
|
|
10682
|
+
* (inputClasses ≠ null) are skipped and served per-track via
|
|
10683
|
+
* pipelineRunner.runDetailSubtree (two-plane design).
|
|
10684
|
+
*/
|
|
10685
|
+
plane: _enum(["full", "frame"]).optional()
|
|
10678
10686
|
}), PipelineRunResultBridge, { kind: "mutation" }), method(object({
|
|
10679
10687
|
engine: PipelineEngineChoiceSchema.optional(),
|
|
10680
10688
|
steps: array(PipelineStepInputSchema).min(1),
|
|
@@ -10799,6 +10807,47 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(ZoneSchema).read
|
|
|
10799
10807
|
auth: "admin"
|
|
10800
10808
|
}), object({ zones: array(ZoneSchema).readonly() });
|
|
10801
10809
|
/**
|
|
10810
|
+
* A bounding box in NORMALIZED [0,1] frame coordinates for `getNativeCrop`. The
|
|
10811
|
+
* decode worker resolves it against the RETAINED native frame's real pixel dims,
|
|
10812
|
+
* so the caller supplies only the detection-res bbox divided by the detection
|
|
10813
|
+
* dims — no native resolution to plumb.
|
|
10814
|
+
*/
|
|
10815
|
+
var NativeCropBboxSchema = object({
|
|
10816
|
+
x: number(),
|
|
10817
|
+
y: number(),
|
|
10818
|
+
w: number(),
|
|
10819
|
+
h: number()
|
|
10820
|
+
});
|
|
10821
|
+
/** Result of a best-effort native-resolution crop (`getNativeCrop`). */
|
|
10822
|
+
var NativeCropResultSchema = object({
|
|
10823
|
+
/** Packed rgb (24-bit) pixels of the crop. */
|
|
10824
|
+
bytes: _instanceof(Uint8Array),
|
|
10825
|
+
width: number().int().positive(),
|
|
10826
|
+
height: number().int().positive()
|
|
10827
|
+
});
|
|
10828
|
+
/** Parent detection context passed to `runDetailSubtree` — the crop's
|
|
10829
|
+
* originating detection, in FRAME-space coordinates. Reuses
|
|
10830
|
+
* `NativeCropBboxSchema`'s `{x,y,w,h}` shape (same numeric fields; here
|
|
10831
|
+
* the coordinates are frame-space rather than getNativeCrop's
|
|
10832
|
+
* normalized [0,1] convention). */
|
|
10833
|
+
var DetailParentSchema = object({
|
|
10834
|
+
bbox: NativeCropBboxSchema,
|
|
10835
|
+
className: string()
|
|
10836
|
+
});
|
|
10837
|
+
/** One child-step result from `runDetailSubtree` — an embedding, label,
|
|
10838
|
+
* or refined detection produced by running the crop-subtree on a
|
|
10839
|
+
* single tracked detection. */
|
|
10840
|
+
var DetailResultSchema = object({
|
|
10841
|
+
stepId: string(),
|
|
10842
|
+
className: string(),
|
|
10843
|
+
score: number(),
|
|
10844
|
+
/** FRAME-space bbox (already mapped back from crop space). */
|
|
10845
|
+
bbox: NativeCropBboxSchema.optional(),
|
|
10846
|
+
embedding: string().optional(),
|
|
10847
|
+
label: string().optional(),
|
|
10848
|
+
alignedCropJpeg: string().optional()
|
|
10849
|
+
});
|
|
10850
|
+
/**
|
|
10802
10851
|
* Per-camera tunable ranges + defaults. Single source of truth used
|
|
10803
10852
|
* by both the Zod data schema (validation + default fallback) and
|
|
10804
10853
|
* the device settings UI (slider min/max/step). Touch one place and
|
|
@@ -11054,7 +11103,17 @@ var RunnerLocalMetricsSchema = object({
|
|
|
11054
11103
|
avgInferenceTimeMs: number(),
|
|
11055
11104
|
queueDepth: number()
|
|
11056
11105
|
});
|
|
11057
|
-
method(RunnerCameraConfigSchema, object({ success: literal(true) }), { kind: "mutation" }), method(object({ deviceId: number() }), object({ success: literal(true) }), { kind: "mutation" }), method(ReportMotionInputSchema, object({ success: literal(true) }), { kind: "mutation" }), method(_void(), RunnerLocalLoadSchema), method(_void(), RunnerLocalMetricsSchema), method(object({ deviceId: number() }), CameraMetricsSchema.nullable()), method(_void(), array(CameraMetricsWithDeviceIdSchema).readonly()), method(_void(), array(number()).readonly())
|
|
11106
|
+
method(RunnerCameraConfigSchema, object({ success: literal(true) }), { kind: "mutation" }), method(object({ deviceId: number() }), object({ success: literal(true) }), { kind: "mutation" }), method(ReportMotionInputSchema, object({ success: literal(true) }), { kind: "mutation" }), method(_void(), RunnerLocalLoadSchema), method(_void(), RunnerLocalMetricsSchema), method(object({ deviceId: number() }), CameraMetricsSchema.nullable()), method(_void(), array(CameraMetricsWithDeviceIdSchema).readonly()), method(_void(), array(number()).readonly()), method(object({
|
|
11107
|
+
handle: FrameHandleSchema,
|
|
11108
|
+
bbox: NativeCropBboxSchema,
|
|
11109
|
+
maxWidth: number().int().positive().optional()
|
|
11110
|
+
}), NativeCropResultSchema.nullable()), method(object({
|
|
11111
|
+
deviceId: number(),
|
|
11112
|
+
frameHandle: FrameHandleSchema.optional(),
|
|
11113
|
+
cropJpeg: string().optional(),
|
|
11114
|
+
parent: DetailParentSchema,
|
|
11115
|
+
steps: array(string()).optional()
|
|
11116
|
+
}), object({ details: array(DetailResultSchema) }).nullable(), { kind: "mutation" });
|
|
11058
11117
|
object({
|
|
11059
11118
|
detected: boolean(),
|
|
11060
11119
|
/** Ms epoch of the last detected-true observation. Null if never detected. */
|
|
@@ -15092,7 +15151,17 @@ var TrackSchema = object({
|
|
|
15092
15151
|
/** Cumulative normalized distance travelled (0..1 units = full frame width). */
|
|
15093
15152
|
totalDistance: number(),
|
|
15094
15153
|
state: TrackStateSchema,
|
|
15095
|
-
active: boolean()
|
|
15154
|
+
active: boolean(),
|
|
15155
|
+
/** Deterministic key-event importance score in [0,1] (server-computed at
|
|
15156
|
+
* track expiry, recomputed on late label). Absent on legacy rows written
|
|
15157
|
+
* before scoring shipped — consumers degrade to absence / compute-on-read. */
|
|
15158
|
+
importance: number().optional(),
|
|
15159
|
+
/** Id of the track's highest-confidence ObjectEvent (its representative
|
|
15160
|
+
* "best" frame). Absent when the track produced no object events. */
|
|
15161
|
+
bestEventId: string().optional(),
|
|
15162
|
+
/** Tag of the importance sub-signal that dominated the score
|
|
15163
|
+
* (identity|dwell|proximity|class|confidence|travel|zone). */
|
|
15164
|
+
importanceReason: string().optional()
|
|
15096
15165
|
});
|
|
15097
15166
|
var BaseEventFields = {
|
|
15098
15167
|
id: string(),
|
|
@@ -15157,8 +15226,18 @@ var ObjectEventSchema = object({
|
|
|
15157
15226
|
frameHeight: number().optional(),
|
|
15158
15227
|
/** MediaStore key for the crop attached to this event (if any). */
|
|
15159
15228
|
mediaKey: string().optional(),
|
|
15229
|
+
/** Design B: MediaStore key of the track's native-resolution key frame (the
|
|
15230
|
+
* best-detection full frame). Resolve via the event-media data-plane
|
|
15231
|
+
* (`/addon/<addonId>/event-media/<keyFrameMediaKey>`) for a detail view that
|
|
15232
|
+
* draws `bbox` over the native frame. Absent on legacy rows / non-decoded
|
|
15233
|
+
* sources — consumers fall back to `mediaKey` (the tight crop). */
|
|
15234
|
+
keyFrameMediaKey: string().optional(),
|
|
15160
15235
|
/** Populated by B5 (recording playback URL for this event). */
|
|
15161
|
-
mediaUrl: string().optional()
|
|
15236
|
+
mediaUrl: string().optional(),
|
|
15237
|
+
/** The parent track's key-event importance [0,1], propagated to every object
|
|
15238
|
+
* event of the track (so an event row can be sorted by importance without a
|
|
15239
|
+
* track join). Absent on legacy rows / before the track was scored. */
|
|
15240
|
+
importance: number().optional()
|
|
15162
15241
|
});
|
|
15163
15242
|
var AudioEventSchema = object({
|
|
15164
15243
|
...BaseEventFields,
|
|
@@ -15182,7 +15261,8 @@ var MediaFileKindEnum = _enum([
|
|
|
15182
15261
|
"fullFrame",
|
|
15183
15262
|
"fullFrameBoxed",
|
|
15184
15263
|
"faceCrop",
|
|
15185
|
-
"plateCrop"
|
|
15264
|
+
"plateCrop",
|
|
15265
|
+
"keyFrame"
|
|
15186
15266
|
]);
|
|
15187
15267
|
var MediaFileSchema = object({
|
|
15188
15268
|
key: string(),
|
|
@@ -15203,6 +15283,32 @@ var DeviceEventQueryInput = object({
|
|
|
15203
15283
|
projection: _enum(["full", "slim"]).optional()
|
|
15204
15284
|
});
|
|
15205
15285
|
var ObjectEventQueryInput = DeviceEventQueryInput.extend({ classFilter: string().optional() });
|
|
15286
|
+
var KeyEventQueryInput = object({
|
|
15287
|
+
deviceId: number(),
|
|
15288
|
+
/** Window lower bound (track firstSeen ≥ since). */
|
|
15289
|
+
since: number(),
|
|
15290
|
+
/** Window upper bound (track firstSeen ≤ until). */
|
|
15291
|
+
until: number(),
|
|
15292
|
+
limit: number().int().min(1).max(200).default(50),
|
|
15293
|
+
/** Drop tracks scoring below this importance. */
|
|
15294
|
+
minImportance: number().min(0).max(1).optional(),
|
|
15295
|
+
/** Restrict to a single class (e.g. 'person'). */
|
|
15296
|
+
classFilter: string().optional()
|
|
15297
|
+
});
|
|
15298
|
+
var KeyEventSchema = object({
|
|
15299
|
+
/** The representative event id (the track's best ObjectEvent, else its trackId). */
|
|
15300
|
+
id: string(),
|
|
15301
|
+
trackId: string(),
|
|
15302
|
+
/** Track start time (firstSeen). */
|
|
15303
|
+
timestamp: number(),
|
|
15304
|
+
className: string(),
|
|
15305
|
+
label: string().optional(),
|
|
15306
|
+
importance: number(),
|
|
15307
|
+
/** Highest-confidence ObjectEvent id for the track (empty when none). */
|
|
15308
|
+
bestEventId: string(),
|
|
15309
|
+
/** Track lifetime in ms (lastSeen - firstSeen). */
|
|
15310
|
+
windowMs: number().optional()
|
|
15311
|
+
});
|
|
15206
15312
|
var TrackedDetectionSchema = object({
|
|
15207
15313
|
trackId: string(),
|
|
15208
15314
|
className: string(),
|
|
@@ -15232,7 +15338,7 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
|
|
|
15232
15338
|
}), array(TrackSchema).readonly()), method(object({ deviceId: number() }), _void(), {
|
|
15233
15339
|
kind: "mutation",
|
|
15234
15340
|
auth: "admin"
|
|
15235
|
-
}), method(DeviceEventQueryInput, array(MotionEventSchema).readonly()), method(ObjectEventQueryInput, array(ObjectEventSchema).readonly()), method(DeviceEventQueryInput, array(AudioEventSchema).readonly()), method(object({
|
|
15341
|
+
}), method(DeviceEventQueryInput, array(MotionEventSchema).readonly()), method(ObjectEventQueryInput, array(ObjectEventSchema).readonly()), method(DeviceEventQueryInput, array(AudioEventSchema).readonly()), method(KeyEventQueryInput, array(KeyEventSchema).readonly()), method(object({
|
|
15236
15342
|
deviceId: number(),
|
|
15237
15343
|
since: number(),
|
|
15238
15344
|
until: number(),
|
|
@@ -17149,7 +17255,17 @@ var FaceInfoSchema = object({
|
|
|
17149
17255
|
recognizedIdentityId: string().optional(),
|
|
17150
17256
|
identityName: string().optional(),
|
|
17151
17257
|
assigned: boolean(),
|
|
17152
|
-
base64: string().optional()
|
|
17258
|
+
base64: string().optional(),
|
|
17259
|
+
/** Design B: the face bbox (pixel space) on the key frame — lets a detail
|
|
17260
|
+
* view draw the box over the native `keyFrameMediaKey` frame. Absent on
|
|
17261
|
+
* legacy rows written before design B. */
|
|
17262
|
+
faceBbox: BoundingBoxSchema.optional(),
|
|
17263
|
+
/** Design B: MediaStore key of the track's native-resolution key frame.
|
|
17264
|
+
* Fetch the native JPEG via the event-media data-plane
|
|
17265
|
+
* (`/addon/<addonId>/event-media/<keyFrameMediaKey>`). Absent when the
|
|
17266
|
+
* track produced no key frame (e.g. native/onboard source) — the UI falls
|
|
17267
|
+
* back to the inline `base64` face crop. */
|
|
17268
|
+
keyFrameMediaKey: string().optional()
|
|
17153
17269
|
});
|
|
17154
17270
|
var FaceFilterEnum = _enum([
|
|
17155
17271
|
"unassigned",
|
|
@@ -21268,6 +21384,12 @@ Object.freeze({
|
|
|
21268
21384
|
addonId: null,
|
|
21269
21385
|
access: "view"
|
|
21270
21386
|
},
|
|
21387
|
+
"pipelineAnalytics.getKeyEvents": {
|
|
21388
|
+
capName: "pipeline-analytics",
|
|
21389
|
+
capScope: "device",
|
|
21390
|
+
addonId: null,
|
|
21391
|
+
access: "view"
|
|
21392
|
+
},
|
|
21271
21393
|
"pipelineAnalytics.getMotionEvents": {
|
|
21272
21394
|
capName: "pipeline-analytics",
|
|
21273
21395
|
capScope: "device",
|
|
@@ -21796,12 +21918,24 @@ Object.freeze({
|
|
|
21796
21918
|
addonId: null,
|
|
21797
21919
|
access: "view"
|
|
21798
21920
|
},
|
|
21921
|
+
"pipelineRunner.getNativeCrop": {
|
|
21922
|
+
capName: "pipeline-runner",
|
|
21923
|
+
capScope: "system",
|
|
21924
|
+
addonId: null,
|
|
21925
|
+
access: "view"
|
|
21926
|
+
},
|
|
21799
21927
|
"pipelineRunner.reportMotion": {
|
|
21800
21928
|
capName: "pipeline-runner",
|
|
21801
21929
|
capScope: "system",
|
|
21802
21930
|
addonId: null,
|
|
21803
21931
|
access: "create"
|
|
21804
21932
|
},
|
|
21933
|
+
"pipelineRunner.runDetailSubtree": {
|
|
21934
|
+
capName: "pipeline-runner",
|
|
21935
|
+
capScope: "system",
|
|
21936
|
+
addonId: null,
|
|
21937
|
+
access: "create"
|
|
21938
|
+
},
|
|
21805
21939
|
"plateGallery.correctPlateText": {
|
|
21806
21940
|
capName: "plate-gallery",
|
|
21807
21941
|
capScope: "system",
|
|
@@ -23170,7 +23304,7 @@ var AdminUIAddon = class extends BaseAddon {
|
|
|
23170
23304
|
capability: adminUiCapability,
|
|
23171
23305
|
provider: {
|
|
23172
23306
|
getStaticDir: async () => ({ staticDir: resolveAdminUiDistDir() }),
|
|
23173
|
-
getVersion: async () => ({ version: "1.1.
|
|
23307
|
+
getVersion: async () => ({ version: "1.1.50" })
|
|
23174
23308
|
}
|
|
23175
23309
|
}];
|
|
23176
23310
|
}
|
package/package.json
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{Ar as e,At as t,Et as n,Ir as r,Ot as i,St as a,Tt as o,_t as s,bt as c,dt as l,ea as u,ft as d,g as ee,gt as f,ht as p,kt as m,m as h,mt as g,oa as _,pt as v,ra as y,ut as te,v as ne,wt as re,xt as ie,yt as b}from"./src-BD_Vx_7m.js";import{I as x,K as S,Q as C,R as ae,S as w,W as T,b as E,o as oe,q as D,x as O,z as k}from"./_virtual_mf___mfe_internal__admin_ui_host__loadShare___mf_0_tanstack_mf_1_react_mf_2_query__loadShare__.js-DTufy7Ue.js";import{R as A}from"./src-BkJfNPjU.js";import{p as se}from"./player-overlays-Dsrz7Epi.js";import{t as j}from"./download-gY2u92nb.js";import{t as ce}from"./plus-DwRCRuP4.js";import{t as M}from"./refresh-cw-C6St6mBe.js";import{t as N}from"./search-rHmAwRLQ.js";import{t as P}from"./upload-DfU_xONk.js";import{F as le,H as F,I,K as ue,S as L,W as de,f as fe,g as R,i as z,j as B,m as pe,s as V}from"./index-BbLGFHTA.js";import{t as H}from"./AdminPage-BwmGKnRf.js";import{t as me}from"./NodeAddonsSettingsPanel-CDaY9-jy.js";var he=F(`chevron-up`,[[`path`,{d:`m18 15-6-6-6 6`,key:`153udz`}]]),U=F(`clock`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`polyline`,{points:`12 6 12 12 16 14`,key:`68esgv`}]]),W=F(`octagon-alert`,[[`path`,{d:`M12 16h.01`,key:`1drbdi`}],[`path`,{d:`M12 8v4`,key:`1got3b`}],[`path`,{d:`M15.312 2a2 2 0 0 1 1.414.586l4.688 4.688A2 2 0 0 1 22 8.688v6.624a2 2 0 0 1-.586 1.414l-4.688 4.688a2 2 0 0 1-1.414.586H8.688a2 2 0 0 1-1.414-.586l-4.688-4.688A2 2 0 0 1 2 15.312V8.688a2 2 0 0 1 .586-1.414l4.688-4.688A2 2 0 0 1 8.688 2z`,key:`1fd625`}]]),ge=F(`package`,[[`path`,{d:`M11 21.73a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73z`,key:`1a0edw`}],[`path`,{d:`M12 22V12`,key:`d0xqtd`}],[`polyline`,{points:`3.29 7 12 12 20.71 7`,key:`ousv84`}],[`path`,{d:`m7.5 4.27 9 5.15`,key:`1c824w`}]]),G=F(`skip-forward`,[[`polygon`,{points:`5 4 15 12 5 20 5 4`,key:`16p6eg`}],[`line`,{x1:`19`,x2:`19`,y1:`5`,y2:`19`,key:`futhcm`}]]);C();var K=new Set([`completed`,`failed`,`partially-failed`,`cancelled`]),q=new Set([`done`,`failed`,`skipped`]);function J(e){return!q.has(e.phase)&&!K.has(e.jobState)}function _e(e,t){let n=new Map,r=[...e].sort((e,t)=>e.createdAtMs-t.createdAtMs);for(let e of r){let r=K.has(e.state);for(let i of e.tasks)r&&i.finishedAtMs!==null&&t-i.finishedAtMs>6e4||n.set(i.packageName,{jobId:e.jobId,packageName:i.packageName,phase:i.phase,fromVersion:i.fromVersion,toVersion:i.toVersion,error:i.error,jobState:e.state,finishedAtMs:i.finishedAtMs})}return n}function ve(){let{data:e}=b({activeOnly:!0},{refetchOnWindowFocus:!1,refetchInterval:e=>(e.state.data?.length??0)>0?3e3:!1}),{map:t}=_(A.AddonsJobProgress,e=>e.job.jobId);return T(()=>{let n=new Map;for(let t of e??[])n.set(t.jobId,t);for(let[e,r]of t)n.set(e,r.job);return _e([...n.values()],Date.now())},[e,t])}var Y={queued:{icon:U,cls:`bg-muted text-foreground-subtle`,label:`queued`},fetching:{icon:L,cls:`bg-primary/10 text-primary`,label:`fetching`,spin:!0},staged:{icon:L,cls:`bg-primary/10 text-primary`,label:`staged`,spin:!0},validating:{icon:L,cls:`bg-primary/10 text-primary`,label:`validating`,spin:!0},applying:{icon:L,cls:`bg-primary/10 text-primary`,label:`applying`,spin:!0},restarting:{icon:L,cls:`bg-amber-500/10 text-amber-600 dark:text-amber-400`,label:`restarting`,spin:!0},applied:{icon:L,cls:`bg-primary/10 text-primary`,label:`finalizing`,spin:!0},done:{icon:I,cls:`bg-success/10 text-success`,label:`updated`},failed:{icon:W,cls:`bg-danger/10 text-danger`,label:`failed`},skipped:{icon:G,cls:`bg-muted text-foreground-subtle`,label:`skipped`}};function ye({progress:e}){let t=Y[e.phase],n=t.icon,r=e.error??`${e.packageName}: ${e.fromVersion??`?`} → ${e.toVersion}`;return w(`span`,{"data-testid":`addon-job-progress`,className:`inline-flex items-center gap-1 px-1.5 py-0.5 text-[10px] rounded shrink-0 ${t.cls}`,title:r,children:[O(n,{className:`w-2.5 h-2.5 ${t.spin?`animate-spin`:``}`}),t.label,w(`span`,{className:`font-mono`,children:[`→ `,e.toVersion]})]})}function be({packageName:e,currentVersion:t,installSource:n,onInstall:r,onClose:i,onSelect:a,selectedVersion:o}){let s=n===`upload`||n===`local`,{data:c,isLoading:l}=p({name:e});return w(`div`,{className:`fixed z-50 w-72 rounded-lg border border-border bg-surface shadow-xl overflow-hidden`,style:{top:`auto`,bottom:`auto`},ref:e=>{if(!e)return;let t=e.parentElement?.getBoundingClientRect();if(!t)return;let n=window.innerHeight-t.bottom,r=t.top;n<280&&r>n?(e.style.bottom=`${window.innerHeight-t.top+4}px`,e.style.top=`auto`):(e.style.top=`${t.bottom+4}px`,e.style.bottom=`auto`),e.style.right=`${window.innerWidth-t.right}px`},onClick:e=>e.stopPropagation(),children:[w(`div`,{className:`flex items-center justify-between px-3 py-2 border-b border-border`,children:[O(`span`,{className:`text-[10px] uppercase tracking-wide text-foreground-subtle font-medium`,children:`Versions`}),O(`button`,{type:`button`,onClick:i,className:`text-foreground-subtle hover:text-foreground`,children:O(z,{className:`h-3 w-3`})})]}),s&&w(`div`,{className:`flex items-start gap-2 px-3 py-2 border-b border-border bg-cyan-500/10 text-[10px]`,children:[O(P,{className:`h-3 w-3 mt-0.5 text-cyan-500 shrink-0`}),w(`div`,{className:`text-cyan-700 dark:text-cyan-200`,children:[w(`span`,{className:`font-semibold`,children:[n===`upload`?`Uploaded copy`:`Local copy`,` in place.`]}),` `,`Re-install `,O(`span`,{className:`font-mono`,children:t}),` from npm to track upstream releases again.`]})]}),l&&w(`div`,{className:`flex items-center justify-center gap-2 py-6 text-[10px] text-foreground-subtle`,children:[O(L,{className:`h-3.5 w-3.5 animate-spin`}),`Loading versions...`]}),c&&O(`div`,{className:`max-h-64 overflow-auto divide-y divide-border`,children:c.map(e=>{let n=e.version===t,i=a!==void 0&&e.version===o,c=/-(alpha|beta|rc|dev|canary|next)/i.test(e.version),l=w(E,{children:[O(`span`,{className:`font-mono flex-1 text-left ${n?`text-primary font-semibold`:c?`text-amber-400`:`text-foreground`}`,children:e.version}),n&&O(`span`,{className:`text-[9px] rounded-full px-1.5 py-0.5 font-medium bg-primary/10 text-primary`,children:`current`}),e.distTags.map(e=>O(`span`,{className:`text-[9px] rounded-full px-1.5 py-0.5 font-medium ${e===`latest`?`bg-emerald-500/15 text-emerald-400`:e===`beta`?`bg-amber-500/15 text-amber-400`:`bg-gray-500/15 text-gray-400`}`,children:e},e)),e.deprecated&&O(`span`,{className:`text-[9px] text-red-400 line-through`,children:`deprecated`}),O(`span`,{className:`text-[9px] text-foreground-subtle shrink-0`,children:new Date(e.publishedAt).toLocaleDateString()})]});return a?w(`button`,{type:`button`,"aria-label":`Select ${e.version}`,onClick:()=>a(e.version),className:`w-full flex items-center gap-2 px-3 py-2 text-[11px] ${i?`bg-primary/5`:`hover:bg-surface-hover`} transition-colors`,children:[l,i?O(I,{className:`h-3 w-3 text-primary shrink-0`}):O(`span`,{className:`w-3 shrink-0`})]},e.version):w(`div`,{className:`flex items-center gap-2 px-3 py-2 text-[11px] ${n?`bg-primary/5`:`hover:bg-surface-hover`} transition-colors`,children:[l,n&&!s?O(I,{className:`h-3 w-3 text-primary shrink-0`}):O(`button`,{type:`button`,onClick:()=>r(e.version),className:`shrink-0 rounded p-0.5 hover:bg-primary/20 text-foreground-subtle hover:text-primary transition-colors`,title:n?`Re-install ${e.version} from npm`:`Install ${e.version}`,children:O(j,{className:`h-3 w-3`})})]},e.version)})}),c&&c.length===0&&O(`div`,{className:`py-4 text-center text-[10px] text-foreground-subtle`,children:`No versions found`})]})}var xe={queued:{icon:U,bg:`bg-muted text-foreground-subtle`,label:`queued`},updating:{icon:L,bg:`bg-primary/10 text-primary`,label:`updating`,spin:!0},"done-pending-restart":{icon:M,bg:`bg-amber-500/10 text-amber-700`,label:`pending restart`},done:{icon:I,bg:`bg-success/10 text-success`,label:`done`},failed:{icon:W,bg:`bg-danger/10 text-danger`,label:`failed`}};function Se({item:e}){let t=xe[e.status],n=t.icon;return w(`span`,{className:`inline-flex items-center gap-1 px-1.5 py-0.5 text-[10px] rounded ${t.bg}`,title:e.error,children:[O(n,{className:`w-2.5 h-2.5 ${t.spin?`animate-spin`:``}`}),t.label]})}C();var X=`device-export`;function Ce(e){return e.capabilities.some(e=>(typeof e==`string`?e:e.name)===X)}function we({isBundle:e,installSource:t,addonId:n,iconPath:r,color:i}){let[a,o]=D(!1),s=i?{backgroundColor:`${i.startsWith(`#`)?i:`#${i}`}26`}:void 0,c=e?`bg-indigo-500/20 text-indigo-700 dark:text-indigo-300`:`bg-purple-500/20 text-purple-700 dark:text-purple-300`,l=n&&r?`/api/addon-assets/${n}/${r}`:null,u=!!l&&!a;return w(`div`,{className:`relative flex-shrink-0`,children:[O(`div`,{className:`h-9 w-9 rounded-lg flex items-center justify-center ${s?``:c}`,style:s,children:u?O(`img`,{src:l,alt:n,className:`h-5 w-5`,onError:()=>o(!0)}):O(e?ge:R,{className:`h-4 w-4`})}),t===`local`&&O(`span`,{className:`absolute -top-1.5 -left-1.5 text-[7px] font-bold leading-none bg-orange-500 text-white px-1 py-0.5 rounded -rotate-12 shadow-sm`,children:`DEV`}),t===`npm`&&O(`span`,{className:`absolute -top-1 -left-1 w-4 h-4 rounded bg-[#cb3837] flex items-center justify-center -rotate-12 shadow-sm`,children:O(`svg`,{viewBox:`0 0 780 250`,className:`w-[11px] h-[11px]`,children:O(`path`,{fill:`#fff`,d:`M240 250h100V50h100v200h340V0H0v250z`})})}),t===`upload`&&O(`span`,{className:`absolute -top-1.5 -left-1.5 flex items-center justify-center h-4 w-4 rounded bg-cyan-500 -rotate-12 shadow-sm`,children:O(P,{className:`h-2.5 w-2.5 text-white`})})]})}function Te({version:e,availableUpdate:t,selectedVersion:n,isUpdating:r,installSource:i,disabled:a,onUpdate:o,onOpenPicker:s,children:c}){if(r)return w(`span`,{className:`inline-flex items-center gap-1 rounded-md px-2 py-1 text-[10px] font-medium border border-blue-500/30 bg-blue-500/10 text-blue-400 shrink-0`,children:[O(L,{className:`h-3 w-3 animate-spin`}),`Updating…`]});if(t){let r=n??t;return w(`div`,{className:`relative inline-flex items-center gap-1 shrink-0`,children:[o&&w(`button`,{type:`button`,onClick:e=>{e.stopPropagation(),o()},disabled:a,className:`inline-flex items-center gap-1 rounded-md px-2 py-1 text-[10px] font-semibold border border-blue-500/30 bg-blue-500/10 text-blue-400 hover:bg-blue-500/20 disabled:opacity-50 disabled:cursor-not-allowed transition-colors`,title:`Update to ${r}`,children:[O(j,{className:`h-3 w-3`}),`Update`]}),w(`button`,{type:`button`,onClick:e=>{e.stopPropagation(),s()},disabled:a,"aria-label":`Select version to install`,title:`Installed ${e} — update available. Selected ${r}; tap to choose another version.`,className:`inline-flex items-center gap-1 rounded-md px-2 py-1 text-[10px] font-bold font-mono border border-amber-500/40 bg-amber-500/15 text-amber-500 hover:bg-amber-500/25 animate-pulse disabled:opacity-50 disabled:cursor-not-allowed transition-colors`,children:[O(`span`,{className:`font-normal opacity-70`,children:e}),O(`span`,{className:`font-normal opacity-70`,children:`→`}),r,O(le,{className:`h-3 w-3`})]}),c]})}return w(`div`,{className:`relative inline-flex items-center gap-1 shrink-0`,children:[w(`button`,{type:`button`,onClick:e=>{e.stopPropagation(),s()},disabled:a,className:[`inline-flex items-center gap-1 rounded-md px-2 py-1 text-[10px] font-bold font-mono border transition-colors disabled:opacity-50 disabled:cursor-not-allowed`,i===`local`?`border-orange-500/30 bg-orange-500/10 text-orange-400 hover:bg-orange-500/20`:`border-emerald-500/30 bg-emerald-500/10 text-emerald-400 hover:bg-emerald-500/20`].join(` `),title:`Version ${e} — tap to view all versions`,children:[e,O(le,{className:`h-3 w-3 opacity-50`})]}),c]})}function Ee({addonId:e}){let t=oe(),{data:r=`inherit`}=d({addonId:e}),i=n({onSuccess:()=>{t.invalidateQueries({queryKey:[[`addons`,`getAddonAutoUpdate`]]})}});return O(`div`,{className:`flex rounded-lg border border-border overflow-hidden text-[10px] font-medium`,children:[`inherit`,`off`,`latest`,`beta`].map(t=>O(`button`,{type:`button`,onClick:n=>{n.stopPropagation(),i.mutate({addonId:e,channel:t})},disabled:i.isPending,className:`px-2.5 py-1 transition-colors capitalize ${r===t?t===`inherit`?`bg-gray-700/50 text-gray-700 dark:text-gray-300`:t===`off`?`bg-gray-700 text-gray-700 dark:text-gray-300`:t===`latest`?`bg-blue-500/20 text-blue-400`:`bg-amber-500/20 text-amber-400`:`bg-transparent text-foreground-subtle hover:bg-surface-hover`} ${t===`inherit`?``:`border-l border-border`}`,children:t},t))})}function De({addon:e,agents:t=[],clusterStatus:n,hideVersion:r,availableUpdate:i,onUpdate:o,isUpdating:s,jobProgress:c,bundle:l,bulkItem:d,disabledByBulk:p,isSystem:g}){let[_,v]=D(!1),[y,te]=D(!1),[ie,b]=D(!1),[x,S]=D(null);k(()=>{S(null)},[i]);let C=x??i,[ae,T]=D(!1),[A,j]=D(!1),[N,P]=D(`logs`),F=oe(),I=se(),ue=de(),L=u(),{manifest:R}=e,B=e.installedOn??[],H=!l&&!R.protected&&R.removable!==!1,U=!!l,G=l?.displayName??R.name,K=l?.packageName??R.packageName,q=l?.version??R.packageVersion??R.version,J=l?.installSource??e.installSource,_e=l?l.bundle?.description??l.addons[0]?.manifest.description:R.description,ve=m({onSuccess:()=>{F.invalidateQueries({queryKey:[[`addons`]]}),F.invalidateQueries({queryKey:[[`addonPages`]]}),F.invalidateQueries({queryKey:[[`capabilities`]]})}}),Y=a({onSuccess:()=>{F.invalidateQueries({queryKey:[[`addons`]]})}}),xe=f({onSuccess:()=>{F.invalidateQueries({queryKey:[[`addons`]]}),F.invalidateQueries({queryKey:[[`addonPages`]]}),F.invalidateQueries({queryKey:[[`capabilities`]]}),F.invalidateQueries({queryKey:[[`integrations`]]})}}),X=re({onSuccess:()=>{F.invalidateQueries({queryKey:[[`addons`]]}),F.invalidateQueries({queryKey:[[`alerts`]]})}}),Z=e.health,Q=Z?.phase===`failed`&&!Z.inGracePeriod,Oe=Q&&Z?.nextRetryAt&&!Z.retrying;return w(`div`,{className:`rounded-lg border bg-surface overflow-hidden ${Q?`border-red-500/50`:`border-border`}`,children:[Q&&Z&&w(`div`,{className:`bg-danger/10 border-b border-danger/30 px-4 py-2.5 flex items-start gap-2.5`,children:[O(W,{className:`h-4 w-4 text-danger shrink-0 mt-0.5`}),w(`div`,{className:`flex-1 min-w-0`,children:[w(`div`,{className:`text-xs font-semibold text-danger`,children:[`Failed to load (attempt #`,Z.retryCount,`)`]}),O(`div`,{className:`text-[11px] text-foreground mt-0.5 break-words font-mono`,children:Z.lastError?.message??`Unknown error`}),Oe&&Z.nextRetryAt&&w(`div`,{className:`text-[10px] text-foreground-subtle mt-1`,children:[`Auto-retry at `,new Date(Z.nextRetryAt).toLocaleTimeString()]})]}),w(`button`,{type:`button`,disabled:X.isPending||Z.retrying,onClick:e=>{e.stopPropagation(),X.mutate({packageName:K})},className:`inline-flex items-center gap-1.5 rounded-md px-2.5 py-1 text-[11px] font-semibold border border-red-400/40 bg-red-400/10 text-red-700 dark:text-red-300 hover:bg-red-400/20 disabled:opacity-50 disabled:cursor-not-allowed transition-colors shrink-0`,title:`Reset retry counter and force immediate reload`,children:[O(M,{className:`h-3 w-3 ${X.isPending||Z.retrying?`animate-spin`:``}`}),`Retry now`]})]}),w(`div`,{className:`flex items-start gap-3 px-4 py-3`,children:[O(we,{isBundle:U||!!R.components&&R.components.length>1,installSource:J,addonId:U?l.addons[0]?.manifest.id:R.id,iconPath:U?l.bundle?.icon??l.addons[0]?.manifest.icon:R.icon,color:U?l.addons[0]?.manifest.color:R.color}),w(`div`,{className:`flex-1 min-w-0`,children:[w(`div`,{className:`flex items-start justify-between gap-2`,children:[O(`span`,{className:`text-sm font-semibold text-foreground truncate min-w-0`,children:G}),!r&&O(Te,{version:q,availableUpdate:i,...C===void 0?{}:{selectedVersion:C},isUpdating:s,installSource:J,disabled:p,...o&&C!==void 0?{onUpdate:()=>o(C)}:{},onOpenPicker:()=>b(e=>!e),children:ie&&O(be,{packageName:K,currentVersion:q,...J?{installSource:J}:{},...i!==void 0&&C!==void 0?{selectedVersion:C,onSelect:e=>{S(e),b(!1)}}:{},onInstall:e=>{b(!1),xe.mutate({packageName:K,version:e})},onClose:()=>b(!1)})})]}),w(`div`,{className:`flex flex-wrap items-center gap-x-1.5 gap-y-1 mt-0.5`,children:[K!==G&&O(`span`,{className:`text-[10px] text-foreground-subtle font-mono truncate max-w-full`,children:K}),U&&w(`span`,{className:`text-[10px] rounded-full bg-primary/10 text-primary px-2 py-0.5 font-medium shrink-0 inline-flex items-center gap-1`,children:[O(ge,{className:`h-3 w-3`}),l.addons.length]}),g&&w(`span`,{className:`text-[10px] rounded-full bg-amber-500/15 text-amber-700 dark:text-amber-300 px-2 py-0.5 font-medium shrink-0 inline-flex items-center gap-1`,title:`System package — updating restarts the hub`,children:[O(M,{className:`h-3 w-3`}),`System`]}),d!=null&&O(Se,{item:d}),c!=null&&O(ye,{progress:c})]}),_e&&O(`p`,{className:`text-[10px] text-foreground-subtle mt-1 line-clamp-1`,children:_e}),!U&&e.process&&w(`div`,{className:`flex flex-wrap items-center gap-1.5 mt-1`,children:[O(`span`,{className:`text-[9px] rounded-full px-1.5 py-0.5 font-medium ${e.process.mode===`forked`?`bg-blue-500/15 text-blue-400`:`bg-gray-500/15 text-gray-400`}`,children:e.process.mode===`forked`?`forked`:`in-process`}),e.process.pid!=null&&w(`span`,{className:`text-[9px] font-mono text-foreground-subtle`,children:[`PID `,e.process.pid]}),O(`span`,{className:`text-[9px] rounded-full px-1.5 py-0.5 font-medium ${e.process.state===`running`?`bg-emerald-500/15 text-emerald-400`:e.process.state===`crashed`||e.process.state===`failed`?`bg-red-500/15 text-red-400`:`bg-gray-500/15 text-gray-400`}`,children:e.process.state})]})]})]}),!U&&w(`div`,{className:`flex items-center gap-1 px-4 py-1.5 border-t border-border/50 bg-surface-hover/20`,children:[w(`button`,{type:`button`,onClick:e=>{e.stopPropagation(),Y.mutate({addonId:R.id})},disabled:Y.isPending||p,className:`inline-flex items-center gap-1 rounded-md px-2 py-1 text-[10px] font-medium border border-border text-foreground-subtle hover:text-blue-400 hover:border-blue-500/30 hover:bg-blue-500/10 disabled:opacity-50 transition-colors`,children:[O(M,{className:`h-3 w-3 ${Y.isPending?`animate-spin`:``}`}),`Restart`]}),w(`button`,{type:`button`,onClick:e=>{e.stopPropagation(),T(e=>!e)},className:`inline-flex items-center gap-1 rounded-md px-2 py-1 text-[10px] font-medium border transition-colors ${ae?`border-primary/30 bg-primary/10 text-primary`:`border-border text-foreground-subtle hover:text-foreground hover:border-primary/30 hover:bg-primary/10`}`,children:[O(pe,{className:`h-3 w-3`}),`Logs`]}),!U&&w(`button`,{type:`button`,onClick:e=>{e.stopPropagation(),j(!0)},className:`inline-flex items-center gap-1 rounded-md px-2 py-1 text-[10px] font-medium border transition-colors ${A?`border-primary/30 bg-primary/10 text-primary`:`border-border text-foreground-subtle hover:text-foreground hover:border-primary/30 hover:bg-primary/10`}`,children:[O(fe,{className:`h-3 w-3`}),`Settings`]}),O(`div`,{className:`flex-1`}),H&&w(`button`,{type:`button`,onClick:async e=>{e.stopPropagation(),await L({title:`Uninstall ${R.name}?`,message:`This will remove the addon package and all its data. This action cannot be undone.`,confirmLabel:`Uninstall`,variant:`danger`})&&ve.mutate({packageName:R.packageName})},disabled:ve.isPending||p,className:`inline-flex items-center gap-1 rounded-md px-2 py-1 text-[10px] font-medium border border-border text-foreground-subtle hover:text-red-400 hover:border-red-500/30 hover:bg-red-500/10 disabled:opacity-50 transition-colors`,children:[O(V,{className:`h-3 w-3`}),ve.isPending?`Removing...`:`Uninstall`]})]}),n&&n.nodes.length>1&&!U&&w(`div`,{className:`border-t border-border px-4 py-2 bg-muted/10`,children:[O(`div`,{className:`text-[10px] font-medium text-foreground-subtle mb-1.5`,children:`Cluster Deployment`}),O(`div`,{className:`space-y-1`,children:n.nodes.map(e=>w(`div`,{className:`flex items-center gap-2 text-[10px]`,children:[O(`div`,{className:`h-1.5 w-1.5 rounded-full shrink-0 ${e.status===`offline`?`bg-muted-foreground/30`:e.synced?`bg-success`:`bg-amber-500`}`}),O(`span`,{className:`font-medium text-foreground min-w-[60px]`,children:e.name}),O(`span`,{className:`font-mono text-foreground-subtle`,children:e.version}),!e.synced&&e.status!==`offline`&&O(`span`,{className:`text-[9px] px-1 py-0.5 rounded bg-amber-500/10 text-amber-400 border border-amber-500/20`,children:`outdated`}),e.status===`offline`&&O(`span`,{className:`text-[9px] px-1 py-0.5 rounded bg-muted text-muted-foreground`,children:`offline`}),e.synced&&e.status!==`offline`&&O(`span`,{className:`text-[9px] text-success`,children:`synced`})]},e.nodeId))})]}),ae&&!U&&w(`div`,{className:`border-t border-border`,children:[w(`div`,{className:`flex items-center px-4 py-1 bg-surface-hover/20 border-b border-border/50`,children:[w(`div`,{className:`flex rounded border border-border overflow-hidden text-[9px]`,children:[O(`button`,{type:`button`,onClick:()=>P(`logs`),className:`px-2 py-0.5 transition-colors ${N===`logs`?`bg-primary/10 text-primary`:`text-foreground-subtle hover:bg-surface-hover`}`,children:`Logs`}),O(`button`,{type:`button`,onClick:()=>P(`events`),className:`px-2 py-0.5 border-l border-border transition-colors ${N===`events`?`bg-primary/10 text-primary`:`text-foreground-subtle hover:bg-surface-hover`}`,children:`Events`})]}),O(`div`,{className:`flex-1`}),O(`button`,{type:`button`,onClick:e=>{e.stopPropagation(),T(!1)},className:`text-foreground-subtle hover:text-foreground`,children:O(z,{className:`h-3.5 w-3.5`})})]}),N===`logs`&&O(ee,{addonId:R.id,maxHeight:`max-h-64`,showFilters:!1}),N===`events`&&O(h,{addonId:R.id,category:`addon.*`,maxHeight:`max-h-64`})]}),U&&w(E,{children:[O(`button`,{type:`button`,onClick:()=>v(e=>!e),className:`w-full flex items-center justify-center border-t border-border py-1 hover:bg-surface-hover/50 transition-colors`,children:O(_?he:le,{className:`h-3.5 w-3.5 text-foreground-subtle`})}),_&&O(`div`,{className:`border-t border-border px-3 py-2 space-y-2`,children:l.addons.map(e=>O(De,{addon:e,agents:t,hideVersion:!0},e.manifest.id))})]}),A&&!U&&O(`div`,{className:`fixed inset-0 z-50 flex items-center justify-center bg-black/60 backdrop-blur-sm p-4`,onClick:()=>j(!1),children:w(`div`,{className:`w-full max-w-lg max-h-[80vh] rounded-xl border border-border bg-surface shadow-2xl flex flex-col overflow-hidden`,onClick:e=>e.stopPropagation(),children:[w(`div`,{className:`flex items-center justify-between px-5 py-3 border-b border-border flex-shrink-0`,children:[w(`div`,{className:`flex items-center gap-2`,children:[O(fe,{className:`h-4 w-4 text-primary`}),w(`h2`,{className:`text-sm font-semibold text-foreground`,children:[G,` Settings`]})]}),O(`button`,{onClick:()=>j(!1),className:`text-foreground-subtle hover:text-foreground transition-colors p-1 rounded`,children:O(z,{className:`h-4 w-4`})})]}),w(`div`,{className:`flex-1 overflow-y-auto px-5 py-4 space-y-4`,children:[O(me,{nodeId:`hub`,addonIds:[R.id],level:`global`}),Ce(R)&&w(`div`,{children:[O(`div`,{className:`text-[10px] font-medium text-foreground-subtle uppercase tracking-wide mb-2`,children:`Device export`}),O(ne,{addonId:R.id,trpc:I.trpcClient,onOpenDevice:e=>ue(`/devices/${e}`)})]}),J===`npm`&&w(`div`,{children:[O(`div`,{className:`text-[10px] font-medium text-foreground-subtle uppercase tracking-wide mb-2`,children:`Auto-Update`}),O(Ee,{addonId:R.id})]}),R.components&&R.components.length>0&&w(`div`,{children:[w(`div`,{className:`text-[10px] font-medium text-foreground-subtle uppercase tracking-wide mb-2`,children:[`Components (`,R.components.length,`)`]}),O(`div`,{className:`flex flex-wrap gap-1`,children:R.components.map(e=>O(`span`,{className:`text-[10px] rounded bg-background border border-border px-1.5 py-0.5 text-foreground-subtle font-mono`,children:e},e))})]}),t.length>=2&&w(`div`,{children:[O(`div`,{className:`text-[10px] font-medium text-foreground-subtle uppercase tracking-wide mb-2`,children:`Installed on`}),w(`div`,{className:`flex items-center gap-1.5 flex-wrap`,children:[B.length===0&&O(`span`,{className:`text-[10px] text-foreground-subtle`,children:`Hub (local)`}),B.map(e=>O(`span`,{className:`rounded-full bg-surface-hover border border-border px-2 py-0.5 text-[10px] text-foreground-subtle`,children:e},e)),w(`div`,{className:`relative`,children:[w(`button`,{type:`button`,onClick:e=>{e.stopPropagation(),te(e=>!e)},className:`inline-flex items-center gap-1 rounded-full border border-dashed border-border px-2 py-0.5 text-[10px] text-foreground-subtle hover:text-foreground hover:border-primary transition-colors`,title:`Install on more agents`,children:[O(ce,{className:`h-3 w-3`}),`Add agent`]}),y&&w(`div`,{className:`absolute left-0 top-full mt-1 z-10 min-w-[160px] rounded-md border border-border bg-surface shadow-lg overflow-hidden`,children:[t.filter(e=>!e.isHub&&!B.includes(e.name)).map(e=>O(`button`,{type:`button`,onClick:e=>{e.stopPropagation(),te(!1)},className:`w-full text-left px-3 py-1.5 text-[10px] text-foreground hover:bg-surface-hover transition-colors`,children:e.name},e.id)),t.filter(e=>!e.isHub&&!B.includes(e.name)).length===0&&O(`div`,{className:`px-3 py-1.5 text-[10px] text-foreground-subtle`,children:`No available agents`})]})]})]})]})]}),O(`div`,{className:`flex items-center justify-end px-5 py-3 border-t border-border flex-shrink-0`,children:O(`button`,{type:`button`,onClick:()=>j(!1),className:`rounded-lg border border-border px-3 py-1.5 text-xs font-medium text-foreground-subtle hover:text-foreground hover:bg-surface-hover transition-colors`,children:`Close`})})]})})]})}C();var Z=`.tgz,.tar.gz,.zip`;function Q({onUploadSuccess:e}){let[t,n]=D(!1),r=S(null),i=x(async t=>{n(!0);let r=new FormData;r.append(`file`,t);let i=localStorage.getItem(`camstack_admin_token`)??``;try{(await(await fetch(`/api/addons/upload`,{method:`POST`,headers:{Authorization:`Bearer ${i}`},body:r})).json()).success&&e()}finally{n(!1)}},[e]);return w(E,{children:[O(`input`,{ref:r,type:`file`,accept:Z,onChange:x(e=>{let t=e.target.files?.[0];t&&i(t),e.target.value=``},[i]),className:`hidden`}),w(`button`,{type:`button`,onClick:()=>r.current?.click(),disabled:t,className:`flex items-center gap-1.5 px-3 py-1.5 text-xs rounded-md bg-surface hover:bg-surface-hover border border-border disabled:opacity-50 transition-colors`,children:[t?O(L,{className:`w-3.5 h-3.5 animate-spin`}):O(P,{className:`w-3.5 h-3.5`}),t?`Uploading...`:`Upload`]})]})}C();var Oe=new Set([`@camstack/system`,`@camstack/types`,`@camstack/sdk`,`@camstack/shm-ring`,`@camstack/ui-library`]);function ke(e){return e!==void 0&&Oe.has(e)}function Ae(e,t){let n=e??`hub-only`;return n===`any-node`?!0:n===`hub-only`?t:!t}function je(e){let t=e;if(!t?.manifest)return null;let n={...t.manifest,name:t.manifest.name??t.manifest.id,version:t.manifest.version??`0.0.0`,capabilities:t.manifest.capabilities??[]},r=t.process,i=r?{pid:r.pid,mode:r.mode===`forked`?`forked`:`in-process`,state:r.state??`unknown`}:void 0,a=t.health,o=t.declaration?.execution,s=t.manifest.execution,c=o?.placement??s?.placement;return{manifest:n,enabled:!0,source:t.source,installSource:t.installSource,installedOn:[],...i?{process:i}:{},hasBackup:t.hasBackup,...a?{health:a}:{},...c?{placement:c}:{}}}function Me(e){let t=new Map,n=[];for(let r of e){let e=r.manifest.packageName;if(!e){n.push(r);continue}let i=t.get(e);if(i)i.addons.push(r);else{let n=r.manifest.bundle,i={packageName:e,displayName:n?.displayName??r.manifest.packageDisplayName??r.manifest.name,version:r.manifest.packageVersion,addons:[r],...r.installSource===void 0?{}:{installSource:r.installSource},...n===void 0?{}:{bundle:n}};t.set(e,i)}}let r=[];for(let e of t.values())e.bundle!==void 0||e.addons.length>=2?r.push({bundle:e,representative:e.addons[0]}):r.push(e.addons[0]);return r.push(...n),r}function $(e){return`bundle`in e}function Ne({addons:e,clusterStatus:n,selectedNode:r,onRefresh:a,isRefreshing:s}){let l=oe(),[d,ee]=D(``),p=ae(d),[m,h]=D(!1),_=S(null);k(()=>{if(!m)return;let e=e=>{_.current&&!_.current.contains(e.target)&&h(!1)};return document.addEventListener(`mousedown`,e),()=>document.removeEventListener(`mousedown`,e)},[m]);let{data:y}=c({nodeId:r.id}),ne=T(()=>{let e=new Map;for(let t of y??[])e.set(t.name,t.latestVersion);return e},[y]),re=T(()=>(y??[]).filter(e=>!e.isSystem).length,[y]),[ie,b]=D(()=>new Set),[C,E]=D(()=>new Map),A=x(e=>{b(t=>new Set(t).add(e))},[]),se=x(e=>{b(t=>{if(!t.has(e))return t;let n=new Set(t);return n.delete(e),n})},[]),ce=x((e,t)=>{E(n=>new Map(n).set(e,t))},[]),P=x(e=>{E(t=>{if(!t.has(e))return t;let n=new Map(t);return n.delete(e),n})},[]),le=t({onMutate:e=>{A(e.name),P(e.name)},onSuccess:(e,t)=>{se(t.name);let n=e;if(n&&n.success===!1){ce(t.name,n.error??`Update failed (no error message returned by server)`);return}l.invalidateQueries({queryKey:[[`addons`]]}),l.invalidateQueries({queryKey:[[`addons`,`listUpdates`]]})},onError:(e,t)=>{se(t.name),ce(t.name,e instanceof Error?e.message:String(e))}}),F=ve(),de=S(new Set);k(()=>{let e=new Set;for(let[t,n]of F)J(n)&&e.add(t);let t=[...de.current].some(t=>!e.has(t));de.current=e,t&&(l.invalidateQueries({queryKey:[[`addons`]]}),l.invalidateQueries({queryKey:[[`addons`,`listUpdates`]]}))},[F,l]);let{data:fe}=v(void 0),R=te({onSuccess:()=>{l.invalidateQueries({queryKey:[[`addons`,`getAutoUpdateSettings`]]})}}),{data:z,isFetching:pe}=o({query:p||void 0},{enabled:m}),V=i(),{data:H}=g(void 0),me=H?.requestedAt,[he,U]=D(null),[W,ge]=D(!1);k(()=>{if(H?.kind===`framework-bulk-update`&&H.requestedAt!==he){U(H.requestedAt),ge(!0);let e=window.setTimeout(()=>ge(!1),6e3);return()=>window.clearTimeout(e)}},[me,he,H]),u();let G=x(async()=>{let e=(y??[]).filter(e=>!e.isSystem);e.length!==0&&await V.mutateAsync({kind:`update`,targets:e.map(e=>({name:e.name,version:e.latestVersion})),nodeIds:[r.id]})},[y,r.id,V]),K=f({onSuccess:()=>{l.invalidateQueries({queryKey:[[`addons`]]}),l.invalidateQueries({queryKey:[[`addonPages`]]}),l.invalidateQueries({queryKey:[[`capabilities`]]}),l.invalidateQueries({queryKey:[[`integrations`]]})}}),[q,_e]=D(`type`),[Y,ye]=D(()=>typeof window>`u`?`grouped`:window.localStorage.getItem(`camstack.addons.viewMode`)===`flat`?`flat`:`grouped`),be=e=>{ye(e),typeof window<`u`&&window.localStorage.setItem(`camstack.addons.viewMode`,e)},[xe,Se]=ue(),X=xe.get(`capability`),Ce=T(()=>{let t=e.filter(e=>!ke(e.manifest.packageName));return r.isHub||(t=t.filter(e=>Ae(e.placement,r.isHub))),X&&(t=t.filter(e=>(e.manifest.capabilities??[]).some(e=>(typeof e==`string`?e:e.name)===X))),t},[e,r.isHub,X]),we=()=>{let e=new URLSearchParams(xe);e.delete(`capability`),Se(e,{replace:!0})},Te=Y===`flat`?Ce:Me(Ce),Ee=T(()=>{let e=[...Te];switch(q){case`type`:e.sort((e,t)=>{let n=+!$(e),r=+!$(t);if(n!==r)return n-r;let i=$(e)?e.bundle.displayName:e.manifest.name,a=$(t)?t.bundle.displayName:t.manifest.name;return i.localeCompare(a)});break;case`name`:e.sort((e,t)=>{let n=$(e)?e.bundle.displayName:e.manifest.name,r=$(t)?t.bundle.displayName:t.manifest.name;return n.localeCompare(r)});break;case`source`:e.sort((e,t)=>{let n=$(e)?e.bundle.installSource??``:e.installSource??``,r=$(t)?t.bundle.installSource??``:t.installSource??``;return n.localeCompare(r)});break}return e},[Te,q]);return w(`div`,{className:`space-y-4`,children:[[...C.entries()].map(([e,t])=>O(`div`,{className:`rounded-md border border-danger/30 bg-danger/5 px-3 py-2 text-[11px]`,children:w(`div`,{className:`flex items-start justify-between gap-3`,children:[w(`div`,{className:`space-y-0.5`,children:[w(`div`,{className:`font-medium text-danger`,children:[`Failed to update `,e]}),O(`div`,{className:`text-foreground-subtle font-mono`,children:t})]}),O(`button`,{type:`button`,onClick:()=>P(e),className:`text-foreground-subtle hover:text-foreground text-[10px]`,children:`dismiss`})]})},e)),w(`div`,{className:`flex items-center gap-2 flex-wrap`,children:[w(`div`,{className:`flex items-center gap-1.5`,children:[O(`span`,{className:`text-[10px] text-foreground-subtle`,children:`Sort:`}),w(`select`,{value:q,onChange:e=>_e(e.target.value),className:`rounded-md border border-border bg-surface px-2 py-1.5 text-[11px] text-foreground focus:outline-none focus:border-primary/50`,children:[O(`option`,{value:`type`,children:`Bundles first`}),O(`option`,{value:`name`,children:`Name`}),O(`option`,{value:`source`,children:`Install source`})]})]}),w(`div`,{className:`flex items-center gap-1.5`,children:[O(`span`,{className:`text-[10px] text-foreground-subtle`,children:`View:`}),O(`div`,{className:`flex rounded-md border border-border overflow-hidden text-[10px] font-medium`,children:[`grouped`,`flat`].map(e=>O(`button`,{type:`button`,onClick:()=>be(e),className:`px-2.5 py-1.5 transition-colors capitalize ${Y===e?`bg-primary/10 text-primary`:`bg-transparent text-foreground-subtle hover:bg-surface-hover`}`,title:e===`grouped`?`Group multi-addon packages into a bundle card`:`Show every addon as its own card`,children:e},e))})]}),r.isHub&&w(`div`,{className:`flex items-center gap-1.5`,children:[O(M,{className:`h-3 w-3 text-foreground-subtle`}),O(`span`,{className:`text-[10px] text-foreground-subtle`,children:`Auto-Update:`}),O(`div`,{className:`flex rounded-md border border-border overflow-hidden text-[10px] font-medium`,children:[`off`,`latest`,`beta`].map(e=>O(`button`,{type:`button`,onClick:()=>R.mutate({channel:e}),disabled:R.isPending,className:`px-2.5 py-1.5 transition-colors capitalize ${fe?.channel===e?e===`off`?`bg-gray-700 text-gray-200`:e===`latest`?`bg-blue-500/20 text-blue-400`:`bg-amber-500/20 text-amber-400`:`bg-transparent text-foreground-subtle hover:bg-surface-hover`} ${e===`off`?``:`border-l border-border`}`,children:e},e))})]}),re>0&&w(`button`,{type:`button`,onClick:()=>void G(),disabled:V.isPending,className:`flex items-center gap-1.5 px-2.5 py-1.5 text-[11px] rounded-md bg-blue-500/10 text-blue-400 hover:bg-blue-500/20 border border-blue-500/30 disabled:opacity-50 transition-colors font-medium`,children:[V.isPending?O(L,{className:`w-3 h-3 animate-spin`}):O(j,{className:`w-3 h-3`}),V.isPending?`Updating…`:`Update All (${re})`]}),w(`button`,{type:`button`,onClick:a,disabled:s||V.isPending,className:`flex items-center gap-1.5 px-2.5 py-1.5 text-[11px] rounded-md bg-surface hover:bg-surface-hover border border-border disabled:opacity-50 transition-colors`,children:[O(M,{className:`w-3 h-3 ${s?`animate-spin`:``}`}),`Refresh`]})]}),w(`div`,{className:`flex flex-col gap-2 sm:flex-row sm:items-center sm:gap-3`,children:[w(`div`,{className:`relative flex-1 min-w-0 sm:min-w-[200px]`,ref:_,children:[O(N,{className:`absolute left-2.5 top-1/2 -translate-y-1/2 h-3.5 w-3.5 text-foreground-subtle`}),O(`input`,{type:`text`,value:d,onChange:e=>{ee(e.target.value),h(!0)},onFocus:()=>h(!0),placeholder:`Search addons on npm...`,disabled:V.isPending,className:`w-full rounded-lg border border-border bg-background pl-9 pr-3 py-2 text-xs text-foreground placeholder:text-foreground-subtle focus:outline-none focus:ring-1 focus:ring-primary disabled:opacity-50 disabled:cursor-not-allowed`}),pe&&O(L,{className:`absolute right-2.5 top-1/2 -translate-y-1/2 h-3 w-3 text-foreground-subtle animate-spin`}),m&&z&&z.length>0&&w(`div`,{className:`absolute left-0 right-0 top-full mt-1 z-40 rounded-lg border border-border bg-surface shadow-xl overflow-hidden`,children:[z.length>0&&w(`div`,{className:`px-3 py-1.5 text-[10px] uppercase tracking-wide text-foreground-subtle border-b border-border`,children:[`npm results (`,z.length,`)`]}),z&&z.length>0&&O(`div`,{className:`max-h-72 overflow-auto divide-y divide-border`,children:z.map(e=>w(`div`,{className:`flex items-center gap-3 px-3 py-2 hover:bg-surface-hover transition-colors`,children:[O(`div`,{className:`w-6 h-6 rounded-md bg-primary/10 flex items-center justify-center text-primary text-[9px] font-bold shrink-0`,children:e.name.replace(`@camstack/addon-`,``).charAt(0).toUpperCase()}),w(`div`,{className:`flex-1 min-w-0`,children:[w(`div`,{className:`flex items-baseline gap-2 min-w-0`,children:[O(`span`,{className:`text-[11px] font-semibold break-words`,children:e.name.replace(/^@camstack\/(addon-)?/,``)}),w(`span`,{className:`text-[10px] text-foreground-subtle shrink-0`,children:[`v`,e.version]})]}),O(`div`,{className:`font-mono text-[9px] text-foreground-subtle/80 truncate`,children:e.name}),e.description&&O(`div`,{className:`text-[10px] text-foreground-subtle truncate`,children:e.description})]}),e.installed?w(`span`,{className:`inline-flex items-center gap-1 px-2 py-1 text-[10px] font-medium rounded-md border border-emerald-500/30 bg-emerald-500/10 text-emerald-400 shrink-0`,children:[O(I,{className:`h-3 w-3`}),e.installedVersion??`Installed`]}):w(`button`,{type:`button`,onClick:()=>K.mutate({packageName:e.name}),disabled:K.isPending,className:`inline-flex items-center gap-1 px-2 py-1 text-[10px] font-medium rounded-md bg-primary text-primary-foreground hover:bg-primary/90 disabled:opacity-50 transition-colors shrink-0`,children:[K.isPending?O(L,{className:`h-3 w-3 animate-spin`}):O(j,{className:`h-3 w-3`}),`Install`]})]},e.name))})]})]}),O(Q,{onUploadSuccess:()=>{l.invalidateQueries({queryKey:[[`addons`]]}),a()}})]}),X&&w(`div`,{className:`flex items-center gap-2 px-3 py-2 rounded-lg bg-primary/10 border border-primary/30 text-sm`,children:[O(`span`,{className:`text-foreground-subtle`,children:`Filtering by capability:`}),O(`span`,{className:`font-mono text-primary font-semibold`,children:X}),O(`button`,{type:`button`,onClick:we,className:`ml-auto text-xs text-foreground-subtle hover:text-foreground underline`,children:`Clear`})]}),W&&w(`div`,{className:`fixed top-4 right-4 z-50 flex items-start gap-2 px-3 py-2.5 rounded-md border border-green-500/30 bg-green-500/10 shadow-lg backdrop-blur-sm max-w-sm pointer-events-auto`,children:[O(B,{className:`w-4 h-4 shrink-0 mt-0.5 text-green-400`}),w(`div`,{children:[O(`div`,{className:`text-[11px] font-semibold text-foreground`,children:`Bulk update completed`}),O(`div`,{className:`text-[10px] text-foreground-subtle mt-0.5`,children:`System packages updated — hub restarted successfully.`})]})]}),Ce.length===0&&O(`div`,{className:`text-xs text-foreground-subtle`,children:e.length===0?`No addons installed`:X?`No installed addons declare the "${X}" capability. Browse the npm catalog above to find a compatible addon.`:`No addons compatible with ${r.name} (placement filter active)`}),O(`div`,{className:`space-y-2`,children:Ee.map(e=>{let t=$(e)?e.bundle.packageName:e.manifest.packageName,i=ne.get(t),a=$(e)?e.representative:e,o=i?e=>le.mutate({name:t,version:e,nodeId:r.id}):void 0,s=F.get(t)??null,c=s!==null&&J(s);return O(De,{addon:a,clusterStatus:n?.[a.manifest.id],bundle:$(e)?e.bundle:void 0,availableUpdate:i,isUpdating:ie.has(t)||c,jobProgress:s,onUpdate:o,disabledByBulk:V.isPending},$(e)?t:e.manifest.id)})})]})}function Pe(){let t=oe(),{data:n,isLoading:i,isError:a}=s(),{data:o}=e(void 0),{data:c}=r(void 0,{refetchInterval:1e4}),u=T(()=>{let e=new Map;e.set(`hub`,{id:`hub`,name:`Hub`,isHub:!0});for(let t of c??[]){let n=String(t.id??``);n&&e.set(n,{id:n,name:String(t.name??n),isHub:!!t.isHub})}return[...e.values()]},[c]),[d,ee]=D(`hub`),f=u.find(e=>e.id===d)??u[0],p=l(),m=ie(),h=p.isPending||m.isPending,g=async()=>{await p.mutateAsync({nodeId:d}),await m.mutateAsync(),t.invalidateQueries({queryKey:[[`addons`]]})},_=S(p);_.current=p,k(()=>{_.current.mutate({nodeId:`hub`})},[]);let v=(n??[]).map(je).filter(e=>e!==null);return w(H,{children:[w(`div`,{className:`flex items-center justify-between gap-3 flex-wrap`,children:[O(y,{selectedNodeId:d,onSelect:ee}),w(`div`,{className:`flex items-center gap-3 flex-wrap`,children:[!i&&!a&&w(`span`,{className:`text-[10px] rounded-full bg-primary/10 text-primary px-2 py-0.5 font-medium`,children:[v.length,` installed`]}),w(`button`,{type:`button`,onClick:()=>void g(),disabled:h,className:`inline-flex items-center gap-1.5 px-2.5 py-1.5 text-[11px] rounded-md bg-surface hover:bg-surface-hover border border-border disabled:opacity-50 transition-colors`,title:`Re-fetch addons + check npm for new versions`,children:[O(M,{className:`w-3 h-3 ${h?`animate-spin`:``}`}),`Check for updates`]})]})]}),!f.isHub&&w(`div`,{className:`rounded-md border border-warning/30 bg-warning/5 px-3 py-2 text-[11px] text-foreground-subtle`,children:[`Showing only addons compatible with`,` `,O(`span`,{className:`font-medium text-foreground`,children:f.name}),` — agents only run`,` `,O(`code`,{className:`font-mono`,children:`agent-only`}),` and`,` `,O(`code`,{className:`font-mono`,children:`any-node`}),` addons. Install / uninstall is hub-driven; agents auto-sync from the hub.`]}),i&&O(`div`,{className:`text-xs text-foreground-subtle animate-pulse`,children:`Loading…`}),a&&O(`div`,{className:`text-xs text-danger`,children:`Failed to load addons`}),!i&&!a&&O(Ne,{addons:v,clusterStatus:o,selectedNode:f,onRefresh:()=>void g(),isRefreshing:h})]})}export{Pe as AddonsPage};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{$n as e,Aa as t,Ca as n,Da as r,Ea as i,Gn as a,Jn as o,Kn as s,Ma as c,Na as l,Oa as u,Qn as d,Ta as f,Un as p,Wn as m,Xn as h,Yn as g,Zn as _,er as v,qn as y,wa as b}from"./src-BD_Vx_7m.js";import{Q as x,S,W as C,b as w,o as T,q as E,x as D}from"./_virtual_mf___mfe_internal__admin_ui_host__loadShare___mf_0_tanstack_mf_1_react_mf_2_query__loadShare__.js-DTufy7Ue.js";import{t as O}from"./pencil-CMpHSjpp.js";import{t as k}from"./plus-DwRCRuP4.js";import{t as A}from"./sparkles-Crb67IKw.js";import{t as j}from"./square-check-big-ftIvwB2w.js";import{t as M}from"./square-CBYzFCHC.js";import{F as N,H as P,I as F,N as I,S as L,h as R,i as z,s as B}from"./index-BbLGFHTA.js";import{t as V}from"./AdminPage-BwmGKnRf.js";var H=P(`image-off`,[[`line`,{x1:`2`,x2:`22`,y1:`2`,y2:`22`,key:`a6p6uj`}],[`path`,{d:`M10.41 10.41a2 2 0 1 1-2.83-2.83`,key:`1bzlo9`}],[`line`,{x1:`13.5`,x2:`6`,y1:`13.5`,y2:`21`,key:`1q0aeu`}],[`line`,{x1:`18`,x2:`21`,y1:`12`,y2:`15`,key:`5mozeu`}],[`path`,{d:`M3.59 3.59A1.99 1.99 0 0 0 3 5v14a2 2 0 0 0 2 2h14c.55 0 1.052-.22 1.41-.59`,key:`mmje98`}],[`path`,{d:`M21 15V5a2 2 0 0 0-2-2H9`,key:`43el77`}]]),U=P(`user-check`,[[`path`,{d:`m16 11 2 2 4-4`,key:`9rsbq5`}],[`path`,{d:`M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2`,key:`1yyitq`}],[`circle`,{cx:`9`,cy:`7`,r:`4`,key:`nufk8`}]]),W=P(`user-round`,[[`circle`,{cx:`12`,cy:`8`,r:`5`,key:`1hypcn`}],[`path`,{d:`M20 21a8 8 0 0 0-16 0`,key:`rfgkzh`}]]),G=P(`user-x`,[[`path`,{d:`M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2`,key:`1yyitq`}],[`circle`,{cx:`9`,cy:`7`,r:`4`,key:`nufk8`}],[`line`,{x1:`17`,x2:`22`,y1:`8`,y2:`13`,key:`3nzzx3`}],[`line`,{x1:`22`,x2:`17`,y1:`8`,y2:`13`,key:`1swrse`}]]);x();var K=[[`faceGallery`]];function q({identityId:e}){let t=T(),{data:n,isLoading:r}=o({identityId:e}),i=h();function a(n){i.mutate({identityId:e,sampleId:n.id},{onSettled:()=>{t.invalidateQueries({queryKey:K})}})}return r?S(`div`,{className:`flex items-center gap-2 py-3 text-xs text-foreground-subtle`,children:[D(L,{className:`h-3.5 w-3.5 animate-spin`}),`Loading samples…`]}):!n||n.length===0?D(`p`,{className:`py-2 text-xs text-foreground-subtle`,children:`No samples yet.`}):D(`div`,{className:`mt-2 grid grid-cols-4 gap-2 sm:grid-cols-6 md:grid-cols-8`,children:n.map(e=>S(`div`,{className:`group relative aspect-square overflow-hidden rounded-md border border-border bg-surface`,children:[e.base64?D(`img`,{src:`data:image/jpeg;base64,${e.base64}`,alt:`Sample`,className:`h-full w-full object-cover`}):D(`div`,{className:`flex h-full w-full items-center justify-center text-foreground-subtle`,children:D(W,{className:`h-6 w-6`})}),D(`button`,{type:`button`,onClick:()=>a(e),disabled:i.isPending,className:`absolute inset-0 flex items-center justify-center bg-black/50 opacity-0 transition-opacity group-hover:opacity-100 disabled:cursor-not-allowed`,"aria-label":`Remove sample`,children:D(z,{className:`h-4 w-4 text-white`})})]},e.id))})}function J({identity:e,expanded:a,onToggle:o}){let d=T(),[p,m]=E(``),[h,g]=E(!1),[v,y]=E(!1),x=_(),C=s();function k(){m(e.name),g(!0)}function A(){g(!1),m(``)}function j(){let t=p.trim();if(!t||t===e.name){A();return}x.mutate({id:e.id,name:t},{onSettled:()=>{d.invalidateQueries({queryKey:K}),A()}})}function M(){C.mutate({id:e.id},{onSettled:()=>{d.invalidateQueries({queryKey:K}),y(!1)}})}return S(`div`,{className:`rounded-md border border-border bg-surface`,children:[S(`div`,{className:`flex items-center gap-2 px-3 py-2`,children:[D(`div`,{className:`h-8 w-8 shrink-0 overflow-hidden rounded-full border border-border bg-surface-hover`,children:e.coverBase64?D(`img`,{src:`data:image/jpeg;base64,${e.coverBase64}`,alt:e.name,className:`h-full w-full object-cover`}):D(`div`,{className:`flex h-full w-full items-center justify-center`,children:D(W,{className:`h-4 w-4 text-foreground-subtle`})})}),D(`div`,{className:`flex flex-1 min-w-0 items-center gap-2`,children:h?S(w,{children:[D(t,{value:p,onChange:e=>m(e.target.value),onKeyDown:e=>{e.key===`Enter`&&j(),e.key===`Escape`&&A()},className:`h-6 text-xs`,autoFocus:!0}),D(`button`,{type:`button`,onClick:j,disabled:x.isPending,className:`text-success hover:text-success/80 disabled:opacity-50`,"aria-label":`Confirm rename`,children:D(F,{className:`h-3.5 w-3.5`})}),D(`button`,{type:`button`,onClick:A,className:`text-foreground-subtle hover:text-foreground`,"aria-label":`Cancel rename`,children:D(z,{className:`h-3.5 w-3.5`})})]}):D(`span`,{className:`truncate text-sm font-medium text-foreground`,children:e.name})}),D(c,{variant:`default`,className:`text-[10px]`,children:e.sampleCount}),!h&&S(`div`,{className:`flex items-center gap-1`,children:[D(`button`,{type:`button`,onClick:k,className:`p-1 rounded hover:bg-surface-hover text-foreground-subtle hover:text-foreground`,"aria-label":`Rename`,children:D(O,{className:`h-3.5 w-3.5`})}),D(`button`,{type:`button`,onClick:()=>y(!0),className:`p-1 rounded hover:bg-danger/10 text-foreground-subtle hover:text-danger`,"aria-label":`Delete`,children:D(B,{className:`h-3.5 w-3.5`})})]}),D(`button`,{type:`button`,onClick:o,className:`p-1 rounded hover:bg-surface-hover text-foreground-subtle`,"aria-label":a?`Collapse`:`Expand`,children:D(a?N:I,{className:`h-3.5 w-3.5`})})]}),a&&D(`div`,{className:`border-t border-border px-3 pb-3 pt-2`,children:D(q,{identityId:e.id})}),D(n,{open:v,onOpenChange:e=>!e&&y(!1),children:S(b,{children:[S(r,{children:[D(u,{children:`Delete person`}),S(f,{children:[`Delete `,D(`strong`,{children:e.name}),` and all their samples? This cannot be undone.`]})]}),S(i,{children:[D(l,{variant:`secondary`,onClick:()=>y(!1),children:`Cancel`}),S(l,{variant:`danger`,onClick:M,disabled:C.isPending,children:[C.isPending?D(L,{className:`h-3.5 w-3.5 animate-spin`}):null,`Delete`]})]})]})})]})}function Y(){let e=T(),[n,r]=E(``),i=m();function a(){let t=n.trim();t&&i.mutate({name:t},{onSettled:()=>{e.invalidateQueries({queryKey:K}),r(``)}})}return S(`div`,{className:`flex items-center gap-2 pt-2`,children:[D(t,{placeholder:`New person name…`,value:n,onChange:e=>r(e.target.value),onKeyDown:e=>{e.key===`Enter`&&a()},className:`h-7 text-xs flex-1`}),S(l,{variant:`primary`,size:`sm`,onClick:a,disabled:i.isPending||!n.trim(),children:[i.isPending?D(L,{className:`h-3.5 w-3.5 animate-spin`}):D(k,{className:`h-3.5 w-3.5`}),`Add`]})]})}function X(){let{data:e,isLoading:t}=y(),[n,r]=E(null);function i(e){r(t=>t===e?null:e)}return t?S(`div`,{className:`flex items-center gap-2 py-4 text-xs text-foreground-subtle`,children:[D(L,{className:`h-4 w-4 animate-spin`}),`Loading people…`]}):S(`div`,{className:`space-y-2`,children:[(!e||e.length===0)&&D(`p`,{className:`py-2 text-xs text-foreground-subtle`,children:`No people enrolled yet. Add one below.`}),e?.map(e=>D(J,{identity:e,expanded:n===e.id,onToggle:()=>i(e.id)},e.id)),D(Y,{})]})}function Z(e){return e.base64===void 0||e.base64.length===0}function Q(e){return e.filter(Z).map(e=>e.faceId)}function ee(e){let t=0;for(let n of e)Z(n)&&(t+=1);return t}x();var $=[[`faceGallery`]];function te({faceIds:e,identities:a,onDone:o}){let s=T(),c=p(),d=m(),[h,g]=E(``),[_,v]=E(!1),[y,x]=E(null),C=e!==null&&e.length>0,w=e?.length??0;function O(){v(!1),g(``),x(null)}function k(){O(),o()}function A(t){!e||e.length===0||c.mutate({faceIds:[...e],identityId:t},{onSettled:()=>{s.invalidateQueries({queryKey:$}),k()}})}function j(){!e||!h.trim()||d.mutate({name:h.trim()},{onSuccess:e=>{e?.id&&A(e.id)},onError:()=>{s.invalidateQueries({queryKey:$}),k()}})}let M=c.isPending||d.isPending;return D(n,{open:C,onOpenChange:e=>!e&&k(),children:S(b,{children:[S(r,{children:[D(u,{children:w>1?`Assign ${w} faces to person`:`Assign face to person`}),D(f,{children:`Select an existing person or create a new one.`})]}),D(`div`,{className:`space-y-1 max-h-56 overflow-y-auto`,children:a.map(e=>S(`button`,{type:`button`,onClick:()=>x(e.id),className:`w-full rounded-md px-3 py-2 text-left text-xs transition-colors ${y===e.id?`bg-primary/12 text-primary`:`hover:bg-surface-hover text-foreground`}`,children:[D(`span`,{className:`font-medium`,children:e.name}),S(`span`,{className:`ml-2 text-foreground-subtle`,children:[e.sampleCount,` samples`]})]},e.id))}),_?D(`div`,{className:`flex items-center gap-2 pt-2 border-t border-border`,children:D(t,{placeholder:`New person name…`,value:h,onChange:e=>g(e.target.value),onKeyDown:e=>{e.key===`Enter`&&j()},autoFocus:!0,className:`flex-1`})}):D(`button`,{type:`button`,onClick:()=>{x(null),v(!0)},className:`mt-2 w-full rounded-md border border-dashed border-border px-3 py-2 text-left text-xs text-foreground-subtle hover:border-primary hover:text-primary transition-colors`,children:`+ New person…`}),S(i,{children:[D(l,{variant:`secondary`,onClick:k,disabled:M,children:`Cancel`}),_?S(l,{variant:`primary`,onClick:j,disabled:M||!h.trim(),children:[M&&D(L,{className:`h-3.5 w-3.5 animate-spin`}),`Create & assign`]}):S(l,{variant:`primary`,onClick:()=>y&&A(y),disabled:M||!y,children:[M&&D(L,{className:`h-3.5 w-3.5 animate-spin`}),`Assign`,w>1?` ${w}`:``]})]})]})})}function ne({face:t,selected:n,onToggleSelect:r,onAssign:i}){let o=T(),s=e(),c=a(),l=()=>{o.invalidateQueries({queryKey:$})};return S(`div`,{className:`group relative flex flex-col gap-1 rounded-md border bg-surface overflow-hidden ${n?`border-primary ring-1 ring-primary`:`border-border`}`,children:[S(`div`,{className:`aspect-square relative overflow-hidden bg-surface-hover`,children:[t.base64?D(`img`,{src:`data:image/jpeg;base64,${t.base64}`,alt:`Face`,className:`h-full w-full object-cover`}):S(`div`,{className:`flex h-full w-full flex-col items-center justify-center gap-1 bg-warning/5 text-foreground-subtle`,title:`No crop image — the face's crop media is missing (a pre-fix orphan). Safe to delete.`,children:[D(H,{className:`h-7 w-7 text-warning/70`}),D(`span`,{className:`text-[9px] font-medium uppercase tracking-wide text-warning/80`,children:`No crop`})]}),D(`button`,{type:`button`,onClick:()=>r(t.faceId),className:`absolute left-0 top-0 z-10 rounded-br-md bg-black/50 p-1.5 text-white hover:bg-black/70`,"aria-label":n?`Deselect`:`Select`,children:n?D(j,{className:`h-4 w-4 text-primary`}):D(M,{className:`h-4 w-4`})}),S(`div`,{className:`pointer-events-none absolute inset-0 flex items-center justify-center gap-2 bg-black/50 opacity-0 transition-opacity group-hover:pointer-events-auto group-hover:opacity-100`,children:[t.assigned?D(`button`,{type:`button`,onClick:()=>s.mutate({faceId:t.faceId},{onSettled:l}),disabled:s.isPending,className:`rounded-full bg-warning/80 p-1.5 text-white hover:bg-warning disabled:opacity-50`,title:`Detach`,children:s.isPending?D(L,{className:`h-3.5 w-3.5 animate-spin`}):D(G,{className:`h-3.5 w-3.5`})}):D(`button`,{type:`button`,onClick:()=>i(t.faceId),className:`rounded-full bg-primary/80 p-1.5 text-white hover:bg-primary`,title:`Assign to person`,children:D(U,{className:`h-3.5 w-3.5`})}),D(`button`,{type:`button`,onClick:()=>c.mutate({faceId:t.faceId},{onSettled:l}),disabled:c.isPending,className:`rounded-full bg-danger/80 p-1.5 text-white hover:bg-danger disabled:opacity-50`,title:`Delete face`,children:c.isPending?D(L,{className:`h-3.5 w-3.5 animate-spin`}):D(B,{className:`h-3.5 w-3.5`})})]})]}),S(`div`,{className:`px-2 pb-2 space-y-0.5`,children:[D(`p`,{className:`text-[10px] text-foreground-subtle truncate`,children:t.deviceId}),t.identityName&&D(`p`,{className:`text-[10px] font-medium text-primary truncate`,title:t.identityName,children:t.identityName})]})]})}var re=[{label:`All`,value:`all`},{label:`Unassigned`,value:`unassigned`},{label:`Recognized`,value:`recognized`}];function ie(){let e=T(),[t,n]=E(`all`),[r,i]=E(new Set),[o,s]=E(null),[c,u]=E(!1),{data:f,isLoading:m}=g({limit:100,filter:t}),{data:h=[]}=y(),{data:_,isFetching:b}=d({threshold:.5,minClusterSize:2,limit:20},{enabled:c}),x=p(),w=v(),O=a(),k=f??[],j=C(()=>new Map(k.map(e=>[e.faceId,e])),[k]),M=C(()=>ee(k),[k]),N=()=>{e.invalidateQueries({queryKey:$})},P=()=>i(new Set);function F(e){i(t=>{let n=new Set(t);return n.has(e)?n.delete(e):n.add(e),n})}function I(e){i(t=>{let n=new Set(t);for(let t of e)n.add(t);return n})}function R(){I(Q(k))}let V=[...r],K=x.isPending||w.isPending||O.isPending;function q(){V.length!==0&&w.mutate({faceIds:V},{onSettled:()=>{N(),P()}})}function J(){V.length!==0&&Promise.allSettled(V.map(e=>O.mutateAsync({faceId:e}))).then(()=>{N(),P()})}return S(`div`,{className:`space-y-3`,children:[S(`div`,{className:`flex items-center gap-1`,children:[re.map(e=>D(`button`,{type:`button`,onClick:()=>n(e.value),className:`rounded-md px-2.5 py-1 text-xs transition-colors ${t===e.value?`bg-primary/12 text-primary font-medium`:`text-foreground-subtle hover:bg-surface-hover hover:text-foreground`}`,children:e.label},e.value)),S(`button`,{type:`button`,onClick:()=>u(e=>!e),className:`ml-2 flex items-center gap-1 rounded-md px-2.5 py-1 text-xs transition-colors ${c?`bg-primary/12 text-primary font-medium`:`text-foreground-subtle hover:bg-surface-hover hover:text-foreground`}`,children:[D(A,{className:`h-3.5 w-3.5`}),` Similar groups`]}),!m&&M>0&&S(`button`,{type:`button`,onClick:R,className:`ml-auto flex items-center gap-1 rounded-md px-2.5 py-1 text-xs text-warning/90 transition-colors hover:bg-warning/10`,title:`Select every face whose crop image is missing so you can delete the orphans in one pass`,children:[D(H,{className:`h-3.5 w-3.5`}),` Select `,M,` crop-less`]}),!m&&S(`span`,{className:`text-[10px] text-foreground-subtle ${M>0?`ml-2`:`ml-auto`}`,children:[k.length,` face`,k.length===1?``:`s`]})]}),r.size>0&&S(`div`,{className:`flex items-center gap-2 rounded-md border border-primary/40 bg-primary/8 px-3 py-2`,children:[S(`span`,{className:`text-xs font-medium text-foreground`,children:[r.size,` selected`]}),S(`div`,{className:`ml-auto flex items-center gap-1.5`,children:[S(l,{variant:`primary`,onClick:()=>s(V),disabled:K,children:[D(U,{className:`h-3.5 w-3.5`}),` Assign`]}),S(l,{variant:`secondary`,onClick:q,disabled:K,children:[w.isPending?D(L,{className:`h-3.5 w-3.5 animate-spin`}):D(G,{className:`h-3.5 w-3.5`}),` `,`Detach`]}),S(l,{variant:`secondary`,onClick:J,disabled:K,children:[D(B,{className:`h-3.5 w-3.5`}),` Delete`]}),D(l,{variant:`ghost`,onClick:P,disabled:K,children:D(z,{className:`h-3.5 w-3.5`})})]})]}),c&&S(`div`,{className:`rounded-md border border-border bg-surface p-3`,children:[D(`p`,{className:`mb-2 text-xs font-medium text-foreground`,children:`Look-alike groups`}),b?S(`div`,{className:`flex items-center gap-2 text-xs text-foreground-subtle`,children:[D(L,{className:`h-4 w-4 animate-spin`}),` Finding similar faces…`]}):!_||_.length===0?D(`p`,{className:`text-xs text-foreground-subtle`,children:`No look-alike groups found among unassigned faces.`}):D(`div`,{className:`space-y-2`,children:_.map(e=>S(`div`,{className:`flex items-center gap-2 rounded-md bg-surface-hover/50 p-2`,children:[D(`div`,{className:`flex -space-x-1.5`,children:e.faceIds.slice(0,6).map(e=>{let t=j.get(e);return D(`div`,{className:`h-8 w-8 overflow-hidden rounded border border-border bg-surface`,children:t?.base64?D(`img`,{src:`data:image/jpeg;base64,${t.base64}`,alt:``,className:`h-full w-full object-cover`}):D(W,{className:`h-full w-full p-1.5 text-foreground-subtle`})},e)})}),S(`span`,{className:`text-xs text-foreground-subtle`,children:[e.size,` faces · `,Math.round(e.cohesion*100),`% alike`]}),S(`div`,{className:`ml-auto flex items-center gap-1.5`,children:[D(l,{variant:`secondary`,onClick:()=>I(e.faceIds),children:`Select group`}),S(l,{variant:`primary`,onClick:()=>s(e.faceIds),children:[D(U,{className:`h-3.5 w-3.5`}),` Assign all`]})]})]},e.representativeFaceId))})]}),m&&S(`div`,{className:`flex items-center gap-2 py-4 text-xs text-foreground-subtle`,children:[D(L,{className:`h-4 w-4 animate-spin`}),` Loading faces…`]}),!m&&k.length===0&&D(`p`,{className:`py-4 text-xs text-foreground-subtle`,children:`No faces found for this filter.`}),!m&&k.length>0&&D(`div`,{className:`grid grid-cols-4 gap-2 sm:grid-cols-6 md:grid-cols-8 lg:grid-cols-10`,children:k.map(e=>D(ne,{face:e,selected:r.has(e.faceId),onToggleSelect:F,onAssign:e=>s([e])},e.faceId))}),D(te,{faceIds:o,identities:h,onDone:()=>{s(null),P()}})]})}function ae(){return D(V,{icon:R,title:`Detection Intelligence`,subtitle:`Manage enrolled identities and assign detected face crops to people.`,children:S(`section`,{className:`space-y-3`,children:[S(`div`,{children:[D(`h2`,{className:`text-sm font-semibold text-foreground mb-1`,children:`People`}),D(`p`,{className:`text-xs text-foreground-subtle mb-3`,children:`Enrolled identities used for face recognition. Expand a row to view or remove training samples.`}),D(X,{})]}),S(`div`,{className:`pt-4 border-t border-border`,children:[D(`h2`,{className:`text-sm font-semibold text-foreground mb-1`,children:`Recent detected faces`}),D(`p`,{className:`text-xs text-foreground-subtle mb-3`,children:`Face crops captured by the detection pipeline. Assign them to a person to build recognition training data.`}),D(ie,{})]})]})})}export{ae as DetectionIntelligencePage};
|