matter-all-in-one-addon 1.8.34 → 1.8.35
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/README.md +8 -2
- package/dist/camera/cameraui/cameraui-homekit-bridge.js +7 -3
- package/dist/camera/cameraui/cameraui-homekit-bridge.js.map +1 -1
- package/dist/camera/homekit/homekit-camera.accessory.d.ts +2 -0
- package/dist/camera/homekit/homekit-camera.accessory.js +12 -6
- package/dist/camera/homekit/homekit-camera.accessory.js.map +1 -1
- package/dist/frontend/assets/{index-eUZTR1Ch.js → index-BkucCndp.js} +1 -1
- package/dist/frontend/index.html +1 -1
- package/dist/platform.js +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# Matter All-in-One for Home Assistant — v1.8.
|
|
1
|
+
# Matter All-in-One for Home Assistant — v1.8.35
|
|
2
2
|
|
|
3
3
|
<div align="center">
|
|
4
4
|
<img src="https://raw.githubusercontent.com/chrisalvir1/matter-all-in-one-chrisalvir/main/matter-all-in-one-addon/logo.png" alt="Matter All In One Logo" width="300" />
|
|
@@ -15,7 +15,7 @@ This file is intentionally structured for both humans and AI agents.
|
|
|
15
15
|
|
|
16
16
|
```yaml
|
|
17
17
|
project: matter-all-in-one-chrisalvir
|
|
18
|
-
version: "1.8.
|
|
18
|
+
version: "1.8.35"
|
|
19
19
|
spec: "Matter 1.6"
|
|
20
20
|
engine: matterbridge
|
|
21
21
|
engine_version: "3.10.10"
|
|
@@ -136,6 +136,12 @@ npm update -g matter-all-in-one-chrisalvir
|
|
|
136
136
|
|
|
137
137
|
## Changelog Summary (latest)
|
|
138
138
|
|
|
139
|
+
### v1.8.35 (2026-09-20) — QR individuales y Camera.UI sin lectores duplicados
|
|
140
|
+
|
|
141
|
+
- Los registros Camera.UI sin emparejar migran del PIN compartido heredado a un PIN HAP individual; al restablecer, el nuevo PIN también se persiste correctamente.
|
|
142
|
+
- Las cámaras Camera.UI no hacen probe ni snapshot RTSP automáticos durante el arranque. Se usa la metadata de Camera.UI y se abre el stream solo bajo petición de Casa o al verificar manualmente.
|
|
143
|
+
- La acción de la interfaz muestra claramente Activar o Desactivar HomeKit para evitar invertir el estado por accidente.
|
|
144
|
+
|
|
139
145
|
### v1.8.34 (2026-09-20) — HAP, Live View y arranque sin saturación
|
|
140
146
|
|
|
141
147
|
- Restablecer emparejamiento conserva el PIN HAP recién generado: ya no se sobrescribe con el PIN por defecto. QR, Setup ID, MAC y puerto cambian juntos.
|
|
@@ -3,7 +3,7 @@ import { uuid } from "hap-nodejs";
|
|
|
3
3
|
import { MatterbridgeEndpoint, occupancySensor } from "matterbridge";
|
|
4
4
|
import { OccupancySensing } from "matterbridge/matter/clusters";
|
|
5
5
|
import { safeSetAttribute } from "../../utils/matter-attributes.js";
|
|
6
|
-
import { HomeKitCameraAccessory } from "../homekit/homekit-camera.accessory.js";
|
|
6
|
+
import { generateFreshHomeKitPin, HomeKitCameraAccessory, } from "../homekit/homekit-camera.accessory.js";
|
|
7
7
|
import { FfmpegMotionDetector } from "../motion/ffmpeg-motion-detector.js";
|
|
8
8
|
import { CameraUiStorage } from "./cameraui-storage.js";
|
|
9
9
|
export class CameraUiHomeKitBridge {
|
|
@@ -91,8 +91,11 @@ export class CameraUiHomeKitBridge {
|
|
|
91
91
|
if (!camera.port) {
|
|
92
92
|
camera.port = this.allocateNextPort(platform);
|
|
93
93
|
}
|
|
94
|
-
|
|
95
|
-
|
|
94
|
+
// The old seeded records all used the same manual HAP code. Migrate an
|
|
95
|
+
// unpaired default safely before publishing; paired accessories retain
|
|
96
|
+
// their established identity until the user explicitly resets them.
|
|
97
|
+
if (!camera.pincode || (!camera.isPaired && camera.pincode === "031-45-154")) {
|
|
98
|
+
camera.pincode = generateFreshHomeKitPin(camera.pincode);
|
|
96
99
|
}
|
|
97
100
|
if (!camera.username) {
|
|
98
101
|
const hex = crypto.randomBytes(5).toString("hex").toUpperCase();
|
|
@@ -312,6 +315,7 @@ export class CameraUiHomeKitBridge {
|
|
|
312
315
|
const camera = store.cameras.find((c) => c.id === cameraId);
|
|
313
316
|
if (camera) {
|
|
314
317
|
camera.username = accessory.record.username;
|
|
318
|
+
camera.pincode = accessory.record.pincode;
|
|
315
319
|
camera.setupId = accessory.record.setupId;
|
|
316
320
|
camera.port = accessory.record.port;
|
|
317
321
|
camera.uuid = accessory.record.uuid;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cameraui-homekit-bridge.js","sourceRoot":"","sources":["../../../src/camera/cameraui/cameraui-homekit-bridge.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,aAAa,CAAC;AACjC,OAAO,EAAE,IAAI,EAAE,MAAM,YAAY,CAAC;AAClC,OAAO,EAAE,oBAAoB,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AACrE,OAAO,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAC;AAChE,OAAO,EAAE,gBAAgB,EAAE,MAAM,kCAAkC,CAAC;AAMpE,OAAO,EAAE,sBAAsB,EAAE,MAAM,wCAAwC,CAAC;AAChF,OAAO,EAAE,oBAAoB,EAAE,MAAM,qCAAqC,CAAC;AAE3E,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAExD,MAAM,OAAO,qBAAqB;IACxB,MAAM,CAAC,iBAAiB,GAAG,IAAI,GAAG,EAAkC,CAAC;IACrE,MAAM,CAAC,qBAAqB,GAAG,IAAI,GAAG,EAAgC,CAAC;IAC/E,wEAAwE;IAChE,MAAM,CAAC,qBAAqB,GAAG,IAAI,GAAG,EAAgC,CAAC;IAExE,MAAM,CAAC,YAAY,CAAC,QAAgB;QACzC,OAAO,IAAI,CAAC,iBAAiB,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;IAC9C,CAAC;IAEM,MAAM,CAAC,iBAAiB;QAC7B,OAAO,IAAI,CAAC,iBAAiB,CAAC;IAChC,CAAC;IAEM,MAAM,CAAC,iBAAiB,C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AAG,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;QACvD,CAAC;QACD,IAAI,IAAI,GAAG,KAAK,CAAC;QACjB,OAAO,SAAS,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC;YAC3B,IAAI,EAAE,CAAC;QACT,CAAC;QACD,OAAO,IAAI,CAAC;IACd,CAAC;CACF;AAEA,UAAkB,CAAC,gBAAgB,GAAG,qBAAqB,CAAC"}
|
|
@@ -2,6 +2,8 @@ import { Accessory, CameraController, Service } from "hap-nodejs";
|
|
|
2
2
|
import type { CameraCapabilitiesInfo, HomeKitCameraStorageRecord, ResolvedStreamSource } from "../camera-types.js";
|
|
3
3
|
import { HomeKitCameraStreamingDelegate } from "./homekit-camera-stream.delegate.js";
|
|
4
4
|
import { HomeKitCameraRecordingDelegate } from "./homekit-camera-recording.delegate.js";
|
|
5
|
+
/** Generate a fresh, HAP-valid setup PIN for an explicit pairing reset. */
|
|
6
|
+
export declare function generateFreshHomeKitPin(previous?: string): string;
|
|
5
7
|
export declare class HomeKitCameraAccessory {
|
|
6
8
|
readonly platform: any;
|
|
7
9
|
readonly entityId: string;
|
|
@@ -8,7 +8,7 @@ import { CameraUiStorage } from "../cameraui/cameraui-storage.js";
|
|
|
8
8
|
import { probeCameraSource, supportsFdkAac } from "./ffmpeg-helper.js";
|
|
9
9
|
import { NestCameraAdapter } from "../nest/nest-camera-adapter.js";
|
|
10
10
|
/** Generate a fresh, HAP-valid setup PIN for an explicit pairing reset. */
|
|
11
|
-
function generateFreshHomeKitPin(previous) {
|
|
11
|
+
export function generateFreshHomeKitPin(previous) {
|
|
12
12
|
for (;;) {
|
|
13
13
|
const digits = crypto.randomBytes(4).readUInt32BE(0).toString().padStart(10, "0").slice(-8);
|
|
14
14
|
if (digits === "00000000" ||
|
|
@@ -521,11 +521,17 @@ export class HomeKitCameraAccessory {
|
|
|
521
521
|
});
|
|
522
522
|
this.isPublished = true;
|
|
523
523
|
this.platform?.log?.notice?.(`[HomeKitCamera][${this.entityId}] Published production HAP camera port=${this.record.port} (advertiser=ciao, iface=all) HKSV=${this.record.hksvEnabled ? "enabled" : "disabled"}`);
|
|
524
|
-
//
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
524
|
+
// Camera.UI already supplies its RTSP codec/audio metadata. Probing and
|
|
525
|
+
// warming every Camera.UI source after a restart opened dozens of extra
|
|
526
|
+
// RTSP readers at once, which is precisely what makes cameras become
|
|
527
|
+
// unavailable. Capabilities are refreshed by the explicit verification
|
|
528
|
+
// action; snapshots are fetched only when Apple Home requests one.
|
|
529
|
+
if (!this.streamSource.metadata?.isCameraUi) {
|
|
530
|
+
void this.probeAndAdaptCapabilities();
|
|
531
|
+
setTimeout(() => {
|
|
532
|
+
void this.delegate.handleSnapshotRequest({ width: 1280, height: 720 }, () => { });
|
|
533
|
+
}, 1500);
|
|
534
|
+
}
|
|
529
535
|
}
|
|
530
536
|
async probeAndAdaptCapabilities() {
|
|
531
537
|
if (!this.streamSource.url)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"homekit-camera.accessory.js","sourceRoot":"","sources":["../../../src/camera/homekit/homekit-camera.accessory.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,SAAS,EACT,aAAa,EAKb,gBAAgB,EAGhB,cAAc,EAKd,OAAO,EAEP,IAAI,GAGL,MAAM,YAAY,CAAC;AAMpB,OAAO,EAAE,8BAA8B,EAAE,MAAM,qCAAqC,CAAC;AACrF,OAAO,EAAE,8BAA8B,EAAE,MAAM,wCAAwC,CAAC;AACxF,OAAO,MAAM,MAAM,aAAa,CAAC;AACjC,OAAO,EAAE,MAAM,SAAS,CAAC;AACzB,OAAO,EAAE,eAAe,EAAE,MAAM,iCAAiC,CAAC;AAElE,OAAO,EAAE,eAAe,EAAE,MAAM,iCAAiC,CAAC;AAClE,OAAO,EAAE,iBAAiB,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACvE,OAAO,EAAE,iBAAiB,E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,IAAI,SAAS,CAC5B,IAAI,CAAC,MAAM,CAAC,IAAI,IAAI,IAAI,CAAC,QAAQ,EACjC,IAAI,CAAC,MAAM,CAAC,IAAI,CACjB,CAAC;QACF,IAAI,CAAC,mBAAmB,EAAE,CAAC;QAC3B,MAAM,IAAI,CAAC,OAAO,EAAE,CAAC;QACrB,IAAI,CAAC,MAAM,CAAC,SAAS,GAAG,IAAI,CAAC;QAC7B,OAAO,IAAI,CAAC,MAAM,CAAC;IACrB,CAAC;IAED,IAAW,QAAQ;QACjB,OAAO,IAAI,CAAC,SAAS,CAAC,QAAQ,EAAE,CAAC;IACnC,CAAC;CACF"}
|
|
@@ -22,5 +22,5 @@ Minimum version required to store current data is: `+c+`.
|
|
|
22
22
|
|
|
23
23
|
IMPORTANTE: Si ya agregaste este accesorio en Apple Home, primero elimínalo de la app Casa (Ajustes -> Eliminar accesorio) para evitar que Apple Home intente reconectar una sesión obsoleta.`))return;c(!0);let t=E&&D?.entityId||S.entityId;try{let n=await x.resetAccessory(t);(n?.pairingCode||n?.manualPairingCode)&&(f(n.pairingCode||null),m(n.manualPairingCode||null),g(!0),S.pairingCode=n.pairingCode||S.pairingCode,S.manualPairingCode=n.manualPairingCode||S.manualPairingCode,S.commissioned=!1,S.matterFabrics=[],e.entities.forEach(e=>{e.commissioned=!1,e.matterFabrics=[],n?.pairingCode&&(e.pairingCode=n.pairingCode),n?.manualPairingCode&&(e.manualPairingCode=n.manualPairingCode)})),i(`✓ Accesorio desvinculado y nuevo QR generado`),r()}catch(e){i(e.message||`Error al desvincular`,!0)}finally{c(!1)}},se=a||S,ce=(se?.state||``).toLowerCase(),le=ce===`unavailable`||ce===`unknown`||ce===`offline`,ue=se?.diagnostics||[],de=a?.logs||se?.logs||[],fe=(0,_.useMemo)(()=>{let e=[];le&&e.push({text:`Home Assistant informa estado "${ce.toUpperCase()}". El dispositivo físico no responde (posiblemente apagado, sin batería, fuera de rango o con la integración origen caída).`,level:`warning`});for(let t of ue)e.push({text:t.message,level:t.level||`warning`,timestamp:t.timestamp});for(let t of de){let n=typeof t==`string`?t:t?.message||JSON.stringify(t),r=typeof t==`object`&&t?.level?t.level:`error`;e.push({text:n,level:r})}return e},[le,ce,ue,de]),pe=async()=>{if(!S)return;let e=fe.map(e=>`${e.timestamp?`[${new Date(e.timestamp).toLocaleTimeString()}] `:``}[${e.level.toUpperCase()}] ${e.text}`).join(`
|
|
24
24
|
`);await Ae([`=== DIAGNÓSTICO DE ACCESORIO MATTER ===`,`Entidad: ${S.entityId}`,`Nombre: ${S.name||S.friendly_name||`Desconocido`}`,`Dominio: ${S.domain}`,`Estado en Home Assistant: ${S.state?S.state.toUpperCase():`N/A`}`,...le?[`Causa detectada: Dispositivo físico no responde en Home Assistant (apagado, sin batería o sin enlace con la integración)`]:[],`Publicado en Matter: ${S.exported?`SÍ`:`NO`}`,`Emparejado: ${S.commissioned?`SÍ (Vinculado)`:`NO`}`,`Código de emparejamiento manual: ${S.manualPairingCode||`N/A`}`,`Incidencias activas: ${S.hasIssue||le?`SÍ`:`NO`}`,`\n=== HISTORIAL DE EVENTOS Y DIAGNÓSTICO (${fe.length}) ===`,e||`(Sin incidencias ni eventos registrados)`].join(`
|
|
25
|
-
`))?i(`✓ Diagnóstico y logs copiados al portapapeles`):i(`⚠️ No se pudo acceder al portapapeles, intenta seleccionar el texto manualmente`,!0)},me=new Set(e.entities.filter(e=>e.exported).map(e=>e.compositeDeviceId||e.entityId)).size;return(0,w.jsx)(`div`,{className:`modal-backdrop open`,id:`device-modal`,role:`dialog`,"aria-modal":`true`,"aria-labelledby":`device-modal-name`,children:(0,w.jsxs)(`section`,{className:`modal modal-wide modal-fullscreen`,style:{width:`min(98vw, 1720px)`,maxWidth:`98vw`,height:`min(96vh, 960px)`,maxHeight:`96vh`,display:`flex`,flexDirection:`column`,padding:`24px 32px`},children:[(0,w.jsx)(`button`,{className:`icon-button`,id:`device-modal-close`,type:`button`,"aria-label":`Cerrar`,onClick:n,children:`×`}),(0,w.jsxs)(`header`,{className:`modal-header`,style:{marginBottom:8},children:[(0,w.jsx)(`span`,{className:`modal-icon`,id:`device-modal-icon`,children:Me(S?.domain||b[0]?.domain||e.entities[0]?.domain)}),(0,w.jsxs)(`div`,{children:[(0,w.jsx)(`p`,{className:`eyebrow`,children:`DISPOSITIVO IOT · MATTER ALL-IN-ONE`}),(0,w.jsx)(`h2`,{id:`device-modal-name`,children:e.name}),(0,w.jsxs)(`p`,{className:`entity-id`,id:`device-modal-id`,children:[e.manufacturer?`${e.manufacturer} · `:``,e.model?`${e.model} · `:``,e.area?`📍 ${e.area}`:e.id]})]})]}),(0,w.jsxs)(`div`,{className:`modal-layout`,style:{display:`grid`,gridTemplateColumns:`310px minmax(0, 1fr) 370px`,gap:16,flex:1,minHeight:0,overflow:`hidden`,alignItems:`stretch`},children:[(0,w.jsxs)(`div`,{className:`entity-list-col`,style:{display:`flex`,flexDirection:`column`,minHeight:0,height:`100%`},children:[(0,w.jsxs)(`div`,{className:`section-header`,style:{marginBottom:E?`8px`:`12px`},children:[(0,w.jsxs)(`div`,{children:[(0,w.jsx)(`h3`,{style:{margin:0},children:E?`Endpoints del Accesorio`:`Entidades disponibles`}),E&&(0,w.jsx)(`p`,{style:{fontSize:`11px`,color:`var(--muted)`,margin:`2px 0 0`},children:`1 accesorio Matter unificado (1 solo código QR)`})]}),(0,w.jsx)(`span`,{id:`modal-export-count`,children:E?O?`✓ 1 accesorio activo en Matter`:`0 accesorios en Matter`:me?`${me} accesorio Matter · ${e.entities.filter(e=>e.exported).length}/${e.entities.length} endpoints`:`0/${e.entities.length} publicadas`})]}),E&&(0,w.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,justifyContent:`space-between`,padding:`10px 14px`,background:O?`rgba(16, 185, 129, 0.08)`:`rgba(255, 255, 255, 0.03)`,border:`1px solid ${O?`rgba(16, 185, 129, 0.25)`:`var(--border)`}`,borderRadius:`10px`,marginBottom:`10px`,flexShrink:0},children:[(0,w.jsxs)(`div`,{children:[(0,w.jsx)(`div`,{style:{fontSize:`12.5px`,fontWeight:600,color:`var(--text)`},children:`Publicar Accesorio en Matter`}),(0,w.jsx)(`div`,{style:{fontSize:`11px`,color:`var(--muted)`,marginTop:`2px`},children:`Ventilador y luz juntos bajo un solo código QR`})]}),(0,w.jsxs)(`label`,{className:`toggle`,style:{margin:0},children:[(0,w.jsx)(`input`,{type:`checkbox`,checked:!!O,onChange:ne}),(0,w.jsx)(`span`,{})]})]}),(0,w.jsx)(`div`,{className:`entity-list`,id:`entity-list`,style:{flex:1,minHeight:0,maxHeight:`none`,overflowY:`auto`},children:b.map(e=>{let t=S?.entityId===e.entityId,n=e.entityId===e.compositePrimaryEntityId||E&&e.domain===`fan`,r=E&&(e.domain===`fan`||e.domain===`light`)&&!e.auxiliary,i=E&&e.auxiliary;return(0,w.jsxs)(`div`,{className:`entity-row${e.exported?``:` dimmed`}${t?` selected`:``}`,onClick:()=>o(e),children:[(0,w.jsx)(`span`,{className:`entity-row-icon`,children:Me(e.domain)}),(0,w.jsxs)(`div`,{style:{flex:1,minWidth:0},children:[(0,w.jsx)(`div`,{className:`entity-row-name`,children:e.name||e.entityId}),(0,w.jsx)(`div`,{className:`entity-row-id`,children:e.entityId}),(0,w.jsxs)(`div`,{style:{display:`flex`,gap:`6px`,alignItems:`center`,marginTop:`3px`,flexWrap:`wrap`},children:[(0,w.jsx)(`span`,{className:`entity-state${e.state===`on`?` on`:``}`,children:e.state||`desconocido`}),E&&n&&(0,w.jsx)(`span`,{className:`tag`,style:{fontSize:`10px`,padding:`1px 6px`,background:`rgba(59, 130, 246, 0.15)`,color:`#60a5fa`,border:`1px solid rgba(59, 130, 246, 0.3)`},children:`Endpoint 1 · Ventilador`}),E&&!n&&r&&(0,w.jsx)(`span`,{className:`tag`,style:{fontSize:`10px`,padding:`1px 6px`,background:`rgba(16, 185, 129, 0.15)`,color:`#34d399`,border:`1px solid rgba(16, 185, 129, 0.3)`},children:`Endpoint 2 · Luz (Dimmer + Kelvin)`}),i&&(0,w.jsx)(`span`,{className:`tag`,style:{fontSize:`10px`,padding:`1px 6px`,background:`rgba(156, 163, 175, 0.15)`,color:`#9ca3af`,border:`1px solid rgba(156, 163, 175, 0.25)`},children:`Auxiliar (Omitido)`})]})]}),(0,w.jsx)(`div`,{className:`export-control`,onClick:e=>e.stopPropagation(),children:E?i?(0,w.jsx)(`span`,{style:{fontSize:`11px`,color:`var(--muted)`,fontStyle:`italic`},children:`Excluido`}):(0,w.jsx)(`span`,{className:`badge ${e.exported?`badge-success`:`badge-muted`}`,style:{fontSize:`10.5px`,padding:`2px 8px`,borderRadius:`6px`,background:e.exported?`rgba(16, 185, 129, 0.15)`:`rgba(255, 255, 255, 0.05)`,color:e.exported?`#34d399`:`var(--muted)`,border:`1px solid ${e.exported?`rgba(16, 185, 129, 0.3)`:`rgba(255, 255, 255, 0.1)`}`,fontWeight:500},children:e.exported?`✓ En Matter`:`Inactivo`}):(0,w.jsxs)(`label`,{className:`toggle`,children:[(0,w.jsx)(`input`,{type:`checkbox`,checked:!!e.exported,onChange:()=>re(e)}),(0,w.jsx)(`span`,{})]})})]},e.entityId)})})]}),(0,w.jsxs)(`aside`,{className:`selection-panel`,id:`selection-panel`,style:{flex:1,minHeight:0,maxHeight:`none`,overflowY:`auto`,padding:22,gap:14},children:[(0,w.jsx)(`p`,{className:`card-label`,children:`SELECCIÓN Y CONFIGURACIÓN`}),(0,w.jsxs)(`h3`,{id:`selection-title`,children:[(0,w.jsx)(`span`,{className:`selection-title-text`,children:S?.name||S?.entityId||`Selecciona una entidad`}),te&&(0,w.jsx)(`span`,{className:`home-badge commissioned`,children:`🏠 Vinculado`})]}),(0,w.jsx)(`p`,{id:`selection-description`,children:E?S?.auxiliary?`Esta entidad es auxiliar (ej. buzzer/beeper) y se omite en Matter para mantener limpio el accesorio.`:j?`Este canal forma parte del accesorio unificado y está activo en Matter bajo el mismo código QR.`:`Activa el interruptor general arriba para publicar el accesorio (ventilador y luz juntos en 1 QR).`:j?`Esta entidad está activa y expuesta a través de Matter.`:`Activa el interruptor para publicar este canal en Matter.`}),S&&Array.isArray(S.profiles)&&S.profiles.length>0&&!S.auxiliary&&(0,w.jsxs)(`div`,{className:`profile-field`,id:`profile-field`,style:{display:`flex`,flexDirection:`column`,gap:6,marginTop:14,padding:12,background:`rgba(255, 255, 255, 0.03)`,border:`1px solid var(--border)`,borderRadius:10},children:[(0,w.jsx)(`label`,{htmlFor:`profile-select`,style:{fontSize:10,fontWeight:750,letterSpacing:`0.05em`,color:`var(--dim)`,textTransform:`uppercase`},children:`Perfil Matter`}),(0,w.jsx)(`select`,{id:`profile-select`,"aria-label":`Perfil Matter`,value:S.profileId||S.matterType||``,onChange:async e=>{let t=e.target.value;try{c(!0),await x.setDeviceProfile(S.entityId,t),S.profileId=t,S.matterType=t,i(`✓ Perfil Matter actualizado a ${t}`),r()}catch(e){i(e.message||`Error al cambiar perfil Matter`,!0)}finally{c(!1)}},disabled:s,style:{width:`100%`,padding:`8px 10px`,background:`#0b1528`,color:`var(--text)`,border:`1px solid var(--border)`,borderRadius:8,fontSize:12,cursor:`pointer`},children:S.profiles.map(e=>(0,w.jsxs)(`option`,{value:e.id,children:[e.label,e.appleHome===`supported`?``:e.appleHome===`experimental`?` · experimental`:` · no compatible con Apple Home`]},e.id))}),(()=>{let e=S.profiles.find(e=>e.id===(S.profileId||S.matterType))||S.profiles[0];return e?(0,w.jsx)(`small`,{id:`profile-note`,style:{color:`var(--muted)`,fontSize:10,lineHeight:1.4},children:e.description}):null})()]}),(0,w.jsxs)(`dl`,{className:`selection-meta`,id:`selection-meta`,children:[(0,w.jsxs)(`div`,{children:[(0,w.jsx)(`dt`,{children:`Entidad ID`}),(0,w.jsx)(`dd`,{children:S?.entityId||`—`})]}),(0,w.jsxs)(`div`,{children:[(0,w.jsx)(`dt`,{children:`Dominio`}),(0,w.jsx)(`dd`,{children:S?.domain||`—`})]}),S?.area_name&&(0,w.jsxs)(`div`,{children:[(0,w.jsx)(`dt`,{children:`Área`}),(0,w.jsx)(`dd`,{children:S.area_name})]}),(0,w.jsxs)(`div`,{children:[(0,w.jsx)(`dt`,{children:`Estado Matter`}),(0,w.jsx)(`dd`,{children:te?`Emparejado en red Matter`:j?`Listo para vincular`:`Sin publicar`})]})]}),(0,w.jsxs)(`section`,{className:`fabrics-section`,id:`fabrics-section`,children:[(0,w.jsxs)(`div`,{className:`fabrics-heading`,children:[(0,w.jsx)(`span`,{className:`fabrics-icon`,"aria-hidden":`true`,children:`🏠`}),(0,w.jsx)(`strong`,{children:`Casas / Controladores Conectados`})]}),(0,w.jsx)(`p`,{className:`fabrics-subtitle`,children:`Desconectar de ecosistemas Matter existentes si cambias de controlador o si ya eliminaste este accesorio en tu app de Apple Home, Google Home o Alexa.`}),A.length>0?(0,w.jsx)(`div`,{className:`fabrics-list`,children:A.map((e,t)=>{let n=Ne(e.vendorId,e.controller),r=e.fabricIndex??e.fabricId??t+1;return(0,w.jsxs)(`div`,{className:`fabric-item`,children:[(0,w.jsxs)(`div`,{className:`fabric-info`,children:[(0,w.jsxs)(`div`,{className:`fabric-controller-line`,children:[(0,w.jsx)(`span`,{style:{fontSize:15},children:n.icon}),(0,w.jsx)(`span`,{className:`fabric-name`,children:n.name})]}),e.label&&(0,w.jsxs)(`span`,{className:`fabric-home-name`,children:[`Casa: `,(0,w.jsx)(`strong`,{children:e.label})]}),(0,w.jsxs)(`span`,{className:`fabric-detail`,children:[`Fabric `,r,e.vendorId?` · VID: 0x${Number(e.vendorId).toString(16).toUpperCase()}`:``]})]}),(0,w.jsx)(`button`,{type:`button`,className:`button button-danger-outline button-xs`,onClick:()=>M(r),disabled:s,title:`Desconectar únicamente esta casa`,style:{padding:`4px 8px`,fontSize:`11px`,borderRadius:`6px`,cursor:`pointer`,background:`rgba(239, 68, 68, 0.15)`,color:`#fca5a5`,border:`1px solid rgba(239, 68, 68, 0.35)`},children:`Desconectar`})]},r)})}):(0,w.jsx)(`div`,{style:{fontSize:11,color:`var(--muted)`,fontStyle:`italic`,padding:`4px 0`},children:te?`Sesión registrada en el puente (sin etiquetas de controlador reportadas).`:`No hay casas ni controladores vinculados a este accesorio.`})]}),(0,w.jsxs)(`section`,{className:`diagnostics-panel ${le||S?.hasIssue?`has-issues`:``}`,id:`diagnostics-panel`,"aria-live":`polite`,style:{userSelect:`text`,background:le?`rgba(245, 158, 11, 0.08)`:`rgba(255, 255, 255, 0.03)`,border:le?`1px solid rgba(245, 158, 11, 0.3)`:`1px solid var(--border)`,borderRadius:`10px`,padding:`14px`},children:[(0,w.jsxs)(`div`,{className:`diagnostics-heading`,style:{display:`flex`,alignItems:`center`,justifyContent:`space-between`,marginBottom:`8px`},children:[(0,w.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:`6px`},children:[(0,w.jsx)(`span`,{id:`diagnostics-icon`,"aria-hidden":`true`,style:{fontSize:`16px`},children:le||S?.hasIssue?`⚠️`:fe.length>0?`ℹ️`:`✓`}),(0,w.jsx)(`strong`,{id:`diagnostics-heading-text`,style:{fontSize:`13px`},children:le?`Estado de Conexión y Diagnóstico`:`Diagnóstico y logs`})]}),(0,w.jsx)(`button`,{id:`copy-diagnostics-button`,className:`copy-diagnostics-button`,type:`button`,onClick:pe,title:`Copiar diagnóstico y logs al portapapeles`,children:`📋 Copiar logs`})]}),le&&(0,w.jsxs)(`div`,{style:{background:`rgba(245, 158, 11, 0.15)`,borderLeft:`3px solid #f59e0b`,padding:`8px 10px`,borderRadius:`4px`,fontSize:`11px`,color:`#fbbf24`,marginBottom:`8px`,lineHeight:`1.4`},children:[(0,w.jsxs)(`strong`,{children:[`⚠️ Dispositivo no disponible en Home Assistant (Estado: `,ce.toUpperCase(),`)`]}),(0,w.jsx)(`div`,{style:{marginTop:`3px`,color:`var(--text)`},children:`Home Assistant perdió comunicación con el dispositivo físico. El puente Matter sigue activo, pero el aparato no responde en su origen (posiblemente apagado, sin batería o sin Wi-Fi).`})]}),(0,w.jsx)(`p`,{id:`diagnostics-summary`,style:{margin:`4px 0`,fontSize:`11.5px`,color:le?`#fbbf24`:`var(--muted)`},children:fe.length===0?`Sin errores registrados para este accesorio.`:`${fe.length} evento${fe.length===1?``:`s`} registrado${fe.length===1?``:`s`}`}),fe.length>0&&(0,w.jsx)(`ul`,{id:`diagnostics-list`,style:{userSelect:`text`,maxHeight:`180px`,overflowY:`auto`,margin:`6px 0 0`,paddingLeft:`16px`,fontSize:`11px`,display:`flex`,flexDirection:`column`,gap:`4px`},children:fe.slice(-25).map((e,t)=>(0,w.jsxs)(`li`,{style:{userSelect:`text`,wordBreak:`break-word`,color:e.level===`warning`?`#fbbf24`:e.level===`error`?`#f87171`:`var(--text)`},children:[e.timestamp?(0,w.jsxs)(`span`,{style:{opacity:.6,marginRight:`5px`},children:[`[`,new Date(e.timestamp).toLocaleTimeString(),`]`]}):null,(0,w.jsxs)(`span`,{style:{fontWeight:600,marginRight:`4px`},children:[`[`,e.level.toUpperCase(),`]`]}),e.text]},t))})]})]}),(0,w.jsxs)(`div`,{className:`qr-panel`,id:`qr-panel`,style:{display:`flex`,flexDirection:`column`,gap:8,minHeight:0,height:`100%`,overflowY:`auto`,overflowX:`hidden`,paddingRight:6},children:[(0,w.jsx)(`p`,{className:`card-label`,style:{margin:`0 0 2px 0`,flexShrink:0},children:`CÓDIGO MATTER`}),(0,w.jsx)(`div`,{className:`qr-status-label${te?` commissioned`:j?` active`:``}`,id:`qr-status-label`,style:{flexShrink:0},children:te?`Vinculado a Matter`:j?`Listo para emparejar`:`Sin publicar`}),j?te&&!l?(0,w.jsxs)(`div`,{className:`paired-success-glass-card`,id:`paired-device-card`,children:[(0,w.jsx)(`div`,{className:`paired-apple-home-badge`,children:(0,w.jsx)(De,{variant:`color`,size:56})}),(0,w.jsx)(`h4`,{className:`paired-card-title`,children:`¡Accesorio vinculado en Apple Home!`}),(0,w.jsx)(`p`,{className:`paired-card-desc`,children:`Este dispositivo ya está emparejado y activo en tu red Matter. El código QR inicial se oculta para proteger la sesión activa.`}),(0,w.jsxs)(`div`,{className:`paired-multiadmin-box`,children:[(0,w.jsx)(`p`,{className:`paired-multiadmin-subtext`,children:`¿Deseas compartirlo con Google Home, Alexa o SmartThings?`}),(0,w.jsx)(`button`,{className:`button button-primary button-open-multiadmin`,type:`button`,onClick:ae,disabled:s,id:`paired-open-multiadmin-btn`,children:(0,w.jsx)(`span`,{children:`🌐 Abrir Modo Multi-Admin (15 min)`})})]})]}):(0,w.jsxs)(w.Fragment,{children:[l&&(0,w.jsxs)(`div`,{id:`multi-admin-hint`,className:`multi-admin-hint`,style:{display:`block`,flexShrink:0},children:[(0,w.jsx)(`p`,{className:`hint-title`,children:`🌐 Modo Multi-Admin Abierto (15 min)`}),(0,w.jsxs)(`p`,{className:`hint-desc`,children:[`Ventana de emparejamiento abierta. Escanea este código QR en`,(0,w.jsx)(`strong`,{children:` Google Home`}),`, `,(0,w.jsx)(`strong`,{children:`Alexa`}),` o`,` `,(0,w.jsx)(`strong`,{children:`SmartThings`}),`.`]})]}),(0,w.jsx)(ke,{pairingCode:k,manualCode:ee,entityName:E?D?.name||e.name:S?.name||e.name,elementId:`device-qr-code`,variant:l?`multi-admin-glass`:`matter-badge`})]}):(0,w.jsx)(`div`,{className:`qr-liquid-glass-card`,style:{padding:20,textAlign:`center`,color:`var(--text-secondary)`,flexShrink:0},children:E?`Activa el interruptor general del accesorio para generar el código QR de Matter.`:`Activa la entidad para generar el código QR de Matter.`}),(0,w.jsx)(`div`,{className:`accessory-controls`,id:`accessory-controls`,style:{flexShrink:0,paddingTop:6},children:j&&(0,w.jsxs)(`div`,{className:`matter-actions`,style:{display:`flex`,flexDirection:`column`,gap:6},children:[(0,w.jsx)(`button`,{className:`button button-secondary action-btn`,id:`reconnect-accessory-button`,type:`button`,onClick:ie,disabled:s,title:`Refresca la conexión con Home Assistant y Matter`,style:{padding:`7px 10px`,fontSize:11.5},children:`↻ Recargar / Sincronizar`}),(0,w.jsx)(`button`,{className:`button button-secondary action-btn`,id:`regenerate-code-button`,type:`button`,onClick:ae,disabled:s,style:{padding:`7px 10px`,fontSize:11.5},children:`Abrir Modo Multi-Admin`}),(0,w.jsx)(`button`,{className:`button button-danger action-btn`,id:`reset-accessory-button`,type:`button`,onClick:oe,disabled:s,title:`Desconectar de todas las casas y generar un nuevo código QR`,style:{padding:`7px 10px`,fontSize:11.5},children:`Desconectar todo y nuevo QR`})]})})]})]})]})})},Fe=({config:e,onClose:t,onRefresh:n,showToast:r})=>{let[i,a]=(0,_.useState)(``),[o,s]=(0,_.useState)(``),[c,l]=(0,_.useState)(``),[u,d]=(0,_.useState)(!1),[f,p]=(0,_.useState)(!1),[m,h]=(0,_.useState)(!1),[g,v]=(0,_.useState)(null);(0,_.useEffect)(()=>{e&&(a(e.serverUrl||``),s(e.username||``),d(!!e.allowSelfSignedCertificate))},[e]);let y=async()=>{if(!i.trim()||!o.trim()||!c){r(`Completa la URL, usuario y contraseña`,!0);return}p(!0),v({text:`Comprobando conexión con Scrypted...`});try{let e=await x.testScryptedConnection({serverUrl:i.trim(),username:o.trim(),password:c,allowSelfSignedCertificate:u});e.success?v({text:`✓ Conexión exitosa. Se detectaron ${e.cameraCount||0} cámaras.`}):v({text:`❌ ${e.error||`No se pudo conectar`}`,isError:!0})}catch(e){v({text:`❌ Error: ${e.message}`,isError:!0})}finally{p(!1)}},b=async e=>{if(e.preventDefault(),!i.trim()||!o.trim()){r(`Ingresa la URL y el usuario`,!0);return}h(!0);try{await x.saveScryptedConfig({serverUrl:i.trim(),username:o.trim(),password:c,allowSelfSignedCertificate:u}),r(`✓ Configuración de Scrypted guardada exitosamente`),n(),t()}catch(e){r(e.message||`Error al guardar`,!0)}finally{h(!1)}},[S,C]=(0,_.useState)(!1);return(0,w.jsx)(`div`,{className:`modal-backdrop open`,role:`dialog`,"aria-modal":`true`,children:(0,w.jsxs)(`section`,{className:`modal`,style:{maxWidth:520},children:[(0,w.jsx)(`button`,{className:`icon-button`,type:`button`,"aria-label":`Cerrar`,onClick:t,children:`×`}),(0,w.jsxs)(`header`,{className:`modal-header`,children:[(0,w.jsx)(`span`,{className:`modal-icon`,style:{fontSize:`1.8rem`},children:`📹`}),(0,w.jsxs)(`div`,{children:[(0,w.jsx)(`p`,{className:`eyebrow`,children:`INTEGRACIÓN DE CÁMARAS`}),(0,w.jsx)(`h2`,{children:`Conectar con Scrypted`}),(0,w.jsx)(`p`,{className:`entity-id`,children:`Transmisión de alta velocidad HAP y Matter`})]})]}),(0,w.jsxs)(`form`,{onSubmit:b,style:{display:`flex`,flexDirection:`column`,gap:12},children:[(0,w.jsxs)(`div`,{children:[(0,w.jsx)(`label`,{style:{display:`block`,fontSize:`0.8rem`,color:`var(--dim)`,marginBottom:4},children:`URL del Servidor Scrypted`}),(0,w.jsx)(`input`,{type:`url`,value:i,onChange:e=>a(e.target.value),placeholder:`https://192.168.1.100:10443`,required:!0,style:{width:`100%`,padding:`8px 12px`,borderRadius:8,background:`rgba(0,0,0,0.2)`,border:`1px solid rgba(255,255,255,0.1)`,color:`#fff`}})]}),(0,w.jsxs)(`div`,{children:[(0,w.jsx)(`label`,{style:{display:`block`,fontSize:`0.8rem`,color:`var(--dim)`,marginBottom:4},children:`Usuario de Scrypted`}),(0,w.jsx)(`input`,{type:`text`,value:o,onChange:e=>s(e.target.value),placeholder:`admin`,required:!0,style:{width:`100%`,padding:`8px 12px`,borderRadius:8,background:`rgba(0,0,0,0.2)`,border:`1px solid rgba(255,255,255,0.1)`,color:`#fff`}})]}),(0,w.jsxs)(`div`,{children:[(0,w.jsx)(`label`,{style:{display:`block`,fontSize:`0.8rem`,color:`var(--dim)`,marginBottom:4},children:`Contraseña`}),(0,w.jsx)(`input`,{type:`password`,value:c,onChange:e=>l(e.target.value),placeholder:`••••••••`,style:{width:`100%`,padding:`8px 12px`,borderRadius:8,background:`rgba(0,0,0,0.2)`,border:`1px solid rgba(255,255,255,0.1)`,color:`#fff`}})]}),(0,w.jsxs)(`label`,{style:{display:`flex`,alignItems:`center`,gap:8,cursor:`pointer`,fontSize:`0.82rem`},children:[(0,w.jsx)(`input`,{type:`checkbox`,checked:u,onChange:e=>d(e.target.checked)}),(0,w.jsx)(`span`,{children:`Permitir certificados SSL autofirmados (HTTPS local)`})]}),g&&(0,w.jsx)(`div`,{style:{padding:`8px 12px`,borderRadius:8,fontSize:`0.8rem`,background:g.isError?`rgba(239,68,68,0.15)`:`rgba(16,185,129,0.15)`,color:g.isError?`#fca5a5`:`#6ee7b7`},children:g.text}),(0,w.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,gap:8,marginTop:12,flexWrap:`wrap`},children:[(0,w.jsxs)(`div`,{style:{display:`flex`,gap:8},children:[(0,w.jsx)(`button`,{className:`button button-secondary`,type:`button`,onClick:y,disabled:f,children:f?`Comprobando...`:`Probar Conexión`}),!!e?.serverUrl&&(0,w.jsx)(`button`,{className:`button button-danger-outline`,type:`button`,onClick:async()=>{if(confirm(`¿Desvincular Scrypted y limpiar todas las cámaras en caché de Scrypted?`)){C(!0);try{await x.deleteScryptedConfig(),r(`✓ Scrypted desvinculado y caché de cámaras limpiada`),n(),t()}catch(e){r(e.message||`Error al desvincular`,!0)}finally{C(!1)}}},disabled:S,title:`Elimina las credenciales y limpia las cámaras de Scrypted en caché`,style:{background:`rgba(239, 68, 68, 0.12)`,color:`#fca5a5`,borderColor:`rgba(239, 68, 68, 0.35)`,fontSize:`0.8rem`},children:S?`Limpiando...`:`Desvincular y Limpiar`})]}),(0,w.jsxs)(`div`,{style:{display:`flex`,gap:8},children:[(0,w.jsx)(`button`,{className:`button button-secondary`,type:`button`,onClick:t,children:`Cancelar`}),(0,w.jsx)(`button`,{className:`button button-primary`,type:`submit`,disabled:m,children:m?`Guardando...`:`Guardar`})]})]})]})]})})},Ie=({config:e,onClose:t,onRefresh:n,showToast:r})=>{let[i,a]=(0,_.useState)(!1),[o,s]=(0,_.useState)(``),[c,l]=(0,_.useState)(``),[u,d]=(0,_.useState)(``),[f,p]=(0,_.useState)(``),[m,h]=(0,_.useState)(``),[g,v]=(0,_.useState)(!0),[y,b]=(0,_.useState)(!0),[S,C]=(0,_.useState)(`camera.ui`),[T,E]=(0,_.useState)(!1),[D,O]=(0,_.useState)(!1),[k,ee]=(0,_.useState)(!1),[A,j]=(0,_.useState)(null),[te,ne]=(0,_.useState)([]),[M,re]=(0,_.useState)(`settings`),ie=(0,_.useRef)(!1);(0,_.useEffect)(()=>{if(e&&!ie.current){ie.current=!0,a(e.enabled??!0);let t=(e.serverUrl||``).trim();s(t||`http://127.0.0.1:8181`),l(e.username||``),p(e.rtspUsername||``),v(e.allowSelfSignedCertificate??!0),b(e.mqttEnabled??!0),C(e.mqttTopicPrefix||`camera.ui`)}ae()},[e]);let ae=async()=>{try{let e=await x.getCameraUiCameras();ne(e)}catch{}},oe=async()=>{let t=o.trim()||e?.serverUrl||`http://127.0.0.1:8181`;if(!t){r(`Ingresa la URL del servidor Camera.UI (ej. https://192.168.110.46:3543)`,!0);return}E(!0),j({text:`Comprobando conexión con Camera.UI...`});try{let e=await x.testCameraUiConnection({serverUrl:t,username:c.trim()||void 0,password:u.trim()?u:void 0,allowSelfSignedCertificate:g});e.ok?j({text:`✓ ${e.message}`}):j({text:`❌ ${e.message}`,isError:!0})}catch(e){j({text:`❌ Error: ${e.message}`,isError:!0})}finally{E(!1)}},se=async()=>{let t=o.trim()||e?.serverUrl||`http://127.0.0.1:8181`;if(!t){r(`Ingresa la URL del servidor Camera.UI (ej. https://192.168.110.46:3543)`,!0);return}O(!0);try{let e=await x.syncCameraUiCameras({serverUrl:t,username:c.trim()||void 0,password:u.trim()?u:void 0,allowSelfSignedCertificate:g});e.success?(r(`✓ Sincronización completa: ${e.totalCameras} cámaras detectadas (${e.newCameras} nuevas).`),ne(e.cameras||[]),n()):r(`Error al sincronizar cámaras de Camera.UI`,!0)}catch(e){r(e.message||`Error al sincronizar`,!0)}finally{O(!1)}},ce=async e=>{try{await x.toggleCameraUiHomeKit(e),await ae(),r(`✓ Estado de HomeKit actualizado.`),n()}catch(e){r(`Error: ${e.message}`,!0)}},le=async e=>{try{(await x.resetCameraUiPairing(e)).success?(r(`✓ Emparejamiento HomeKit restablecido. Listo para escanear en Apple Home.`),await ae(),n()):r(`No se pudo restablecer el emparejamiento`,!0)}catch(e){r(`Error: ${e.message}`,!0)}};return(0,w.jsx)(`div`,{className:`modal-backdrop open`,role:`dialog`,"aria-modal":`true`,children:(0,w.jsxs)(`section`,{className:`modal`,style:{maxWidth:620,maxHeight:`90vh`,overflowY:`auto`},children:[(0,w.jsx)(`button`,{className:`icon-button`,type:`button`,"aria-label":`Cerrar`,onClick:t,children:`×`}),(0,w.jsxs)(`header`,{className:`modal-header`,children:[(0,w.jsx)(`span`,{className:`modal-icon`,style:{fontSize:`1.8rem`},children:`🎥`}),(0,w.jsxs)(`div`,{children:[(0,w.jsx)(`p`,{className:`eyebrow`,children:`INTEGRACIÓN DE CÁMARAS Y MQTT`}),(0,w.jsx)(`h2`,{children:`Camera.UI / Homebridge Camera.UI`}),(0,w.jsx)(`p`,{className:`entity-id`,children:`Descubrimiento RTSP, eventos MQTT (movimiento/timbre) y puente directo HomeKit HAP`})]})]}),(0,w.jsxs)(`div`,{style:{display:`flex`,gap:10,margin:`12px 0 16px`,borderBottom:`1px solid rgba(255,255,255,0.1)`,paddingBottom:8},children:[(0,w.jsx)(`button`,{type:`button`,className:`button ${M===`settings`?`button-primary`:`button-secondary`}`,style:{fontSize:`0.85rem`,padding:`6px 14px`},onClick:()=>re(`settings`),children:`⚙️ Configuración y Conexión`}),(0,w.jsxs)(`button`,{type:`button`,className:`button ${M===`cameras`?`button-primary`:`button-secondary`}`,style:{fontSize:`0.85rem`,padding:`6px 14px`},onClick:()=>{re(`cameras`),ae()},children:[`📷 Cámaras Descubiertas (`,te.length,`)`]})]}),M===`settings`?(0,w.jsxs)(`form`,{onSubmit:async e=>{if(e.preventDefault(),!o.trim()){r(`Ingresa la URL del servidor Camera.UI`,!0);return}ee(!0);try{await x.saveCameraUiConfig({enabled:i,serverUrl:o.trim(),username:c.trim()||void 0,password:u||void 0,rtspUsername:f.trim()||void 0,rtspPassword:m||void 0,allowSelfSignedCertificate:g,mqttEnabled:y,mqttTopicPrefix:S.trim()||`camera.ui`}),r(`✓ Configuración de Camera.UI guardada exitosamente`),n(),t()}catch(e){r(e.message||`Error al guardar`,!0)}finally{ee(!1)}},style:{display:`flex`,flexDirection:`column`,gap:12},children:[(0,w.jsxs)(`label`,{style:{display:`flex`,alignItems:`center`,gap:10,cursor:`pointer`,fontSize:`0.9rem`,fontWeight:600},children:[(0,w.jsx)(`input`,{type:`checkbox`,checked:i,onChange:e=>a(e.target.checked)}),(0,w.jsx)(`span`,{children:`Habilitar integración Camera.UI`})]}),(0,w.jsxs)(`div`,{children:[(0,w.jsx)(`label`,{style:{display:`block`,fontSize:`0.8rem`,color:`var(--dim)`,marginBottom:4},children:`URL del Servidor Camera.UI`}),(0,w.jsx)(`input`,{type:`url`,value:o,onChange:e=>s(e.target.value),placeholder:`https://192.168.110.46:3543 o http://192.168.1.100:8181`,required:!0,style:{width:`100%`,padding:`8px 12px`,borderRadius:8,background:`rgba(0,0,0,0.2)`,border:`1px solid rgba(255,255,255,0.1)`,color:`#fff`}}),(0,w.jsx)(`span`,{style:{fontSize:`0.75rem`,color:`var(--dim)`},children:`Puerto REST por defecto de Camera.UI: 8181 (o HTTPS en 3543). El RTSP nativo de esta instalación usa el puerto 2101.`}),(0,w.jsx)(`div`,{style:{marginTop:8},children:(0,w.jsxs)(`label`,{style:{display:`flex`,alignItems:`center`,gap:8,cursor:`pointer`,fontSize:`0.8rem`,color:`var(--dim)`},children:[(0,w.jsx)(`input`,{type:`checkbox`,checked:g,onChange:e=>v(e.target.checked)}),(0,w.jsx)(`span`,{children:`Permitir certificados SSL autofirmados (HTTPS local)`})]})})]}),(0,w.jsxs)(`div`,{style:{display:`grid`,gridTemplateColumns:`1fr 1fr`,gap:10},children:[(0,w.jsxs)(`div`,{children:[(0,w.jsx)(`label`,{style:{display:`block`,fontSize:`0.8rem`,color:`var(--dim)`,marginBottom:4},children:`Usuario RTSP de Camera.UI`}),(0,w.jsx)(`input`,{type:`text`,value:f,onChange:e=>p(e.target.value),placeholder:`admin`,style:{width:`100%`,padding:`8px 12px`,borderRadius:8,background:`rgba(0,0,0,0.2)`,border:`1px solid rgba(255,255,255,0.1)`,color:`#fff`}})]}),(0,w.jsxs)(`div`,{children:[(0,w.jsx)(`label`,{style:{display:`block`,fontSize:`0.8rem`,color:`var(--dim)`,marginBottom:4},children:`Contraseña RTSP`}),(0,w.jsx)(`input`,{type:`password`,value:m,onChange:e=>h(e.target.value),placeholder:e?.hasRtspPassword?`•••••••• (guardada)`:`••••••••`,style:{width:`100%`,padding:`8px 12px`,borderRadius:8,background:`rgba(0,0,0,0.2)`,border:`1px solid rgba(255,255,255,0.1)`,color:`#fff`}})]})]}),(0,w.jsxs)(`div`,{style:{display:`grid`,gridTemplateColumns:`1fr 1fr`,gap:10},children:[(0,w.jsxs)(`div`,{children:[(0,w.jsx)(`label`,{style:{display:`block`,fontSize:`0.8rem`,color:`var(--dim)`,marginBottom:4},children:`Usuario (opcional)`}),(0,w.jsx)(`input`,{type:`text`,value:c,onChange:e=>l(e.target.value),placeholder:`admin`,style:{width:`100%`,padding:`8px 12px`,borderRadius:8,background:`rgba(0,0,0,0.2)`,border:`1px solid rgba(255,255,255,0.1)`,color:`#fff`}})]}),(0,w.jsxs)(`div`,{children:[(0,w.jsx)(`label`,{style:{display:`block`,fontSize:`0.8rem`,color:`var(--dim)`,marginBottom:4},children:`Contraseña (opcional)`}),(0,w.jsx)(`input`,{type:`password`,value:u,onChange:e=>d(e.target.value),placeholder:e?.hasPassword?`•••••••• (guardada)`:`••••••••`,style:{width:`100%`,padding:`8px 12px`,borderRadius:8,background:`rgba(0,0,0,0.2)`,border:`1px solid rgba(255,255,255,0.1)`,color:`#fff`}})]})]}),(0,w.jsxs)(`div`,{style:{padding:`10px 12px`,borderRadius:8,background:`rgba(255,255,255,0.03)`,border:`1px solid rgba(255,255,255,0.08)`},children:[(0,w.jsxs)(`label`,{style:{display:`flex`,alignItems:`center`,gap:8,cursor:`pointer`,fontSize:`0.85rem`,fontWeight:500},children:[(0,w.jsx)(`input`,{type:`checkbox`,checked:y,onChange:e=>b(e.target.checked)}),(0,w.jsx)(`span`,{children:`Escuchar tópicos MQTT de Camera.UI para Movimiento y Timbre`})]}),y&&(0,w.jsxs)(`div`,{style:{marginTop:8},children:[(0,w.jsx)(`label`,{style:{display:`block`,fontSize:`0.75rem`,color:`var(--dim)`,marginBottom:4},children:`Prefijo de Tópicos MQTT`}),(0,w.jsx)(`input`,{type:`text`,value:S,onChange:e=>C(e.target.value),placeholder:`camera.ui`,style:{width:`100%`,padding:`6px 10px`,borderRadius:6,background:`rgba(0,0,0,0.2)`,border:`1px solid rgba(255,255,255,0.1)`,color:`#fff`,fontSize:`0.85rem`}}),(0,w.jsxs)(`span`,{style:{fontSize:`0.75rem`,color:`var(--dim)`,display:`block`,marginTop:4},children:[`Se suscribe automáticamente a `,(0,w.jsx)(`code`,{children:`camera.ui/#`}),` y `,(0,w.jsx)(`code`,{children:`cameraui/#`}),` para disparar notificaciones de movimiento y timbres en Apple Home.`]})]})]}),A&&(0,w.jsx)(`div`,{style:{padding:`8px 12px`,borderRadius:8,fontSize:`0.8rem`,background:A.isError?`rgba(239,68,68,0.15)`:`rgba(16,185,129,0.15)`,color:A.isError?`#fca5a5`:`#6ee7b7`},children:A.text}),(0,w.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,gap:8,marginTop:12},children:[(0,w.jsxs)(`div`,{style:{display:`flex`,gap:8},children:[(0,w.jsx)(`button`,{className:`button button-secondary`,type:`button`,onClick:oe,disabled:T,children:T?`Comprobando...`:`Probar Conexión`}),(0,w.jsx)(`button`,{className:`button button-secondary`,type:`button`,onClick:se,disabled:D,children:D?`Sincronizando...`:`🔄 Sincronizar Cámaras`})]}),(0,w.jsxs)(`div`,{style:{display:`flex`,gap:8},children:[(0,w.jsx)(`button`,{className:`button button-secondary`,type:`button`,onClick:t,children:`Cancelar`}),(0,w.jsx)(`button`,{className:`button button-primary`,type:`submit`,disabled:k,children:k?`Guardando...`:`Guardar`})]})]})]}):(0,w.jsxs)(`div`,{style:{display:`flex`,flexDirection:`column`,gap:12},children:[(0,w.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,alignItems:`center`},children:[(0,w.jsx)(`span`,{style:{fontSize:`0.85rem`,color:`var(--dim)`},children:te.length===0?`No se han sincronizado cámaras aún.`:`${te.length} cámaras encontradas en Camera.UI.`}),(0,w.jsx)(`button`,{className:`button button-secondary`,type:`button`,onClick:se,disabled:D,style:{fontSize:`0.8rem`,padding:`4px 10px`},children:D?`Sincronizando...`:`🔄 Sincronizar Ahora`})]}),te.length===0?(0,w.jsx)(`div`,{style:{padding:`24px 16px`,textAlign:`center`,background:`rgba(255,255,255,0.02)`,borderRadius:8,border:`1px dashed rgba(255,255,255,0.1)`},children:(0,w.jsxs)(`p`,{style:{margin:0,color:`var(--dim)`,fontSize:`0.9rem`},children:[`Asegúrate de que la URL del servidor sea correcta y presiona `,(0,w.jsx)(`strong`,{children:`Sincronizar Ahora`}),`.`]})}):(0,w.jsx)(`div`,{style:{display:`flex`,flexDirection:`column`,gap:10},children:te.map(e=>(0,w.jsxs)(`div`,{style:{padding:`12px`,borderRadius:8,background:`rgba(255,255,255,0.03)`,border:`1px solid rgba(255,255,255,0.08)`,display:`flex`,flexDirection:`column`,gap:8},children:[(0,w.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,alignItems:`flex-start`},children:[(0,w.jsxs)(`div`,{children:[(0,w.jsx)(`strong`,{style:{fontSize:`0.95rem`},children:e.name}),(0,w.jsxs)(`div`,{style:{fontSize:`0.75rem`,color:`var(--dim)`,marginTop:2},children:[`ID: `,(0,w.jsx)(`code`,{children:e.id}),` · Puerto HAP: `,(0,w.jsx)(`code`,{children:e.port||`Pendiente`})]})]}),(0,w.jsx)(`span`,{style:{fontSize:`0.75rem`,padding:`2px 8px`,borderRadius:6,background:e.isPaired?`rgba(16,185,129,0.2)`:`rgba(245,158,11,0.2)`,color:e.isPaired?`#6ee7b7`:`#fde68a`},children:e.isPaired?`✓ Vinculada en Apple Home`:`⚠️ Lista para vincular`})]}),(0,w.jsxs)(`div`,{style:{fontSize:`0.8rem`,color:`var(--dim)`,wordBreak:`break-all`},children:[`RTSP: `,(0,w.jsx)(`code`,{children:e.rtspUrl})]}),(0,w.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,justifyContent:`space-between`,marginTop:4,paddingTop:8,borderTop:`1px solid rgba(255,255,255,0.06)`},children:[(0,w.jsxs)(`div`,{style:{display:`flex`,gap:8,alignItems:`center`},children:[(0,w.jsxs)(`span`,{style:{fontSize:`0.8rem`},children:[`PIN: `,(0,w.jsx)(`strong`,{children:e.pincode||`031-45-154`})]}),e.setupUri&&!e.isPaired&&(0,w.jsx)(`a`,{href:e.setupUri,target:`_blank`,rel:`noopener noreferrer`,className:`button button-secondary`,style:{fontSize:`0.75rem`,padding:`2px 8px`,textDecoration:`none`},children:`🔗 Código HomeKit`})]}),(0,w.jsxs)(`div`,{style:{display:`flex`,gap:8},children:[(0,w.jsx)(`button`,{type:`button`,className:`button button-secondary`,style:{fontSize:`0.75rem`,padding:`3px 8px`},onClick:()=>le(e.id),title:`Restablece el ID y genera nuevo PIN si Apple Home no la encuentra`,children:`Restablecer PIN`}),(0,w.jsx)(`button`,{type:`button`,className:`button ${e.homeKitEnabled?`button-primary`:`button-secondary`}`,style:{fontSize:`0.75rem`,padding:`3px 8px`},onClick:()=>ce(e.id),children:e.homeKitEnabled?`Activada en HomeKit`:`Desactivada`})]})]})]},e.id))})]})]})})};function Le(e){let t=e.toLowerCase();return/\b(error|failed|failure|exception|unable|crash|fatal)\b/.test(t)?`error`:/\b(warn|warning|timeout|retry|deprecated)\b/.test(t)?`warn`:/\b(info|notice|debug|connected|registered|online)\b/.test(t)?`info`:`default`}var Re=({isOpen:e,onClose:t,showToast:n,status:r,stats:i})=>{let[a,o]=(0,_.useState)(``),[s,c]=(0,_.useState)(1883),[l,u]=(0,_.useState)(``),[d,f]=(0,_.useState)(``),[p,m]=(0,_.useState)(!1),[h,g]=(0,_.useState)([]),[v,y]=(0,_.useState)(!1),[b,S]=(0,_.useState)(`all`),[C,T]=(0,_.useState)(``),[E,D]=(0,_.useState)(!0),O=(0,_.useRef)(null),k=async()=>{y(!0);try{let e=await x.getLogs();g(e.logs||[])}catch(e){n(e.message||`Error al cargar logs`,!0)}finally{y(!1)}};(0,_.useEffect)(()=>{e&&(x.getMqttConfig().then(e=>{e&&(o(e.host||``),c(e.port||1883),u(e.username||``),f(e.password||``))}).catch(()=>{}),k())},[e]);let ee=(0,_.useMemo)(()=>{let e=0,t=0,n=0;for(let r of h){let i=Le(r);i===`error`?e++:i===`warn`?t++:i===`info`&&n++}return{all:h.length,errors:e,warns:t,infos:n}},[h]),A=(0,_.useMemo)(()=>{let e=h;if(b!==`all`&&(e=e.filter(e=>Le(e)===b)),C.trim()){let t=C.toLowerCase().trim();e=e.filter(e=>e.toLowerCase().includes(t))}return e},[h,b,C]);return(0,_.useEffect)(()=>{E&&O.current&&(O.current.scrollTop=O.current.scrollHeight)},[A,E]),e?(0,w.jsx)(`div`,{className:`modal-backdrop open`,id:`settings-modal`,role:`dialog`,"aria-modal":`true`,"aria-labelledby":`settings-title`,children:(0,w.jsxs)(`section`,{className:`modal modal-settings-wide`,children:[(0,w.jsx)(`button`,{className:`icon-button`,id:`settings-modal-close`,type:`button`,"aria-label":`Cerrar`,onClick:t,children:`×`}),(0,w.jsx)(`div`,{className:`settings-modal-header`,children:(0,w.jsxs)(`div`,{className:`settings-modal-header-left`,children:[(0,w.jsx)(`span`,{className:`settings-sparkle`,children:`⚙️`}),(0,w.jsxs)(`div`,{children:[(0,w.jsxs)(`div`,{className:`settings-header-badge-row`,children:[(0,w.jsx)(`span`,{className:`settings-badge-eyebrow`,children:`MANTENIMIENTO & SISTEMA`}),(0,w.jsx)(`span`,{className:`settings-ha-status-pill`,children:r?.haStatus===`conectado`?(0,w.jsx)(`span`,{className:`pill-healthy`,children:`✓ HA Conectado`}):(0,w.jsx)(`span`,{className:`pill-warning`,children:`⚠️ HA Desconectado`})}),(0,w.jsxs)(`span`,{className:`settings-version-pill`,children:[`v`,r?.version||`1.5.76`]})]}),(0,w.jsx)(`h2`,{id:`settings-title`,children:`Ajustes del Servicio & Registros`})]})]})}),(0,w.jsxs)(`div`,{className:`settings-grid-layout`,children:[(0,w.jsxs)(`div`,{className:`settings-left-col`,children:[(0,w.jsxs)(`div`,{className:`settings-card-glass`,children:[(0,w.jsxs)(`div`,{className:`settings-card-title`,children:[(0,w.jsx)(`span`,{children:`📊`}),` Telemetría del Servicio`]}),(0,w.jsxs)(`div`,{className:`settings-telemetry-grid`,children:[(0,w.jsxs)(`div`,{className:`telemetry-item`,children:[(0,w.jsx)(`span`,{className:`telemetry-label`,children:`Servicio Bridge`}),(0,w.jsx)(`strong`,{className:`telemetry-value`,title:r?.bridgeName,children:r?.bridgeName||`Matter All-in-One`})]}),(0,w.jsxs)(`div`,{className:`telemetry-item`,children:[(0,w.jsx)(`span`,{className:`telemetry-label`,children:`Nodos Activos`}),(0,w.jsx)(`strong`,{className:`telemetry-value`,children:i?.exportedNodes??r?.exportedNodes??0})]}),(0,w.jsxs)(`div`,{className:`telemetry-item`,children:[(0,w.jsx)(`span`,{className:`telemetry-label`,children:`Emparejados`}),(0,w.jsx)(`strong`,{className:`telemetry-value text-green`,children:i?.pairedTotal??r?.commissionedNodes??0})]}),(0,w.jsxs)(`div`,{className:`telemetry-item`,children:[(0,w.jsx)(`span`,{className:`telemetry-label`,children:`Incidencias`}),(0,w.jsx)(`strong`,{className:`telemetry-value ${(i?.issues??0)>0?`text-amber`:`text-green`}`,children:i?.issues??0})]})]})]}),(0,w.jsxs)(`div`,{className:`settings-card-glass`,children:[(0,w.jsxs)(`div`,{className:`settings-card-title`,children:[(0,w.jsx)(`span`,{children:`📡`}),` Configuración MQTT (Auto-Discovery)`]}),(0,w.jsx)(`p`,{className:`settings-card-desc`,children:`Habilita la integración de dispositivos MQTT directamente en el ecosistema Matter.`}),(0,w.jsxs)(`div`,{className:`mqtt-form-grid`,children:[(0,w.jsxs)(`div`,{className:`input-group`,children:[(0,w.jsx)(`label`,{htmlFor:`mqtt-host`,children:`Broker IP / Host`}),(0,w.jsx)(`input`,{type:`text`,id:`mqtt-host`,placeholder:`ej. 192.168.110.147`,"aria-label":`MQTT Host`,className:`form-input`,value:a,onChange:e=>o(e.target.value)})]}),(0,w.jsxs)(`div`,{className:`input-group`,children:[(0,w.jsx)(`label`,{htmlFor:`mqtt-port`,children:`Puerto`}),(0,w.jsx)(`input`,{type:`number`,id:`mqtt-port`,placeholder:`1883`,"aria-label":`MQTT Port`,className:`form-input`,value:s,onChange:e=>c(Number(e.target.value))})]}),(0,w.jsxs)(`div`,{className:`input-group`,children:[(0,w.jsx)(`label`,{htmlFor:`mqtt-user`,children:`Usuario (opcional)`}),(0,w.jsx)(`input`,{type:`text`,id:`mqtt-user`,placeholder:`Usuario MQTT`,"aria-label":`MQTT User`,className:`form-input`,value:l,onChange:e=>u(e.target.value)})]}),(0,w.jsxs)(`div`,{className:`input-group`,children:[(0,w.jsx)(`label`,{htmlFor:`mqtt-pass`,children:`Contraseña (opcional)`}),(0,w.jsx)(`input`,{type:`password`,id:`mqtt-pass`,placeholder:`Contraseña`,"aria-label":`MQTT Password`,className:`form-input`,value:d,onChange:e=>f(e.target.value)})]})]}),(0,w.jsx)(`button`,{className:`button button-primary button-full`,id:`mqtt-save-button`,type:`button`,onClick:async()=>{m(!0);try{await x.saveMqttConfig({host:a,port:Number(s),username:l,password:d}),n(`✓ Configuración MQTT guardada`)}catch(e){n(e.message||`Error al guardar MQTT`,!0)}finally{m(!1)}},disabled:p,children:p?`Guardando...`:`💾 Guardar Configuración MQTT`})]}),(0,w.jsxs)(`div`,{className:`settings-card-glass`,children:[(0,w.jsxs)(`div`,{className:`settings-card-title`,children:[(0,w.jsx)(`span`,{children:`⚡`}),` Operaciones del Servicio`]}),(0,w.jsxs)(`div`,{className:`operations-row`,children:[(0,w.jsxs)(`div`,{children:[(0,w.jsx)(`strong`,{children:`Reiniciar servicio`}),(0,w.jsx)(`p`,{children:`Recarga el runtime y restablece conexiones activas.`})]}),(0,w.jsx)(`button`,{className:`button button-secondary`,id:`restart-button`,type:`button`,onClick:async()=>{if(confirm(`¿Deseas reiniciar el servicio de Matter All-in-One?`))try{await x.restartService(),n(`Reiniciando servicio...`),t()}catch(e){n(e.message||`Error al reiniciar servicio`,!0)}},children:`🔄 Reiniciar`})]})]}),(0,w.jsxs)(`div`,{className:`settings-card-glass danger-card`,children:[(0,w.jsxs)(`div`,{className:`settings-card-title danger-title`,children:[(0,w.jsx)(`span`,{children:`⚠️`}),` Zona de Mantenimiento Crítico`]}),(0,w.jsxs)(`div`,{className:`operations-row`,children:[(0,w.jsxs)(`div`,{children:[(0,w.jsx)(`strong`,{className:`text-red`,children:`Restablecimiento de fábrica`}),(0,w.jsx)(`p`,{children:`Elimina toda la configuración y obligará a volver a emparejar.`})]}),(0,w.jsx)(`button`,{className:`button button-danger`,id:`factory-reset-button`,type:`button`,onClick:async()=>{if(confirm(`¿Estás seguro de que deseas restablecer de fábrica el plugin? Se eliminarán todos los accesorios Matter y requerirá volver a emparejar.`))try{await x.factoryReset(),n(`Restablecimiento de fábrica iniciado...`),t()}catch(e){n(e.message||`Error al restablecer`,!0)}},children:`Restablecer`})]})]})]}),(0,w.jsx)(`div`,{className:`settings-right-col`,children:(0,w.jsxs)(`div`,{className:`glass-terminal-wrapper`,children:[(0,w.jsxs)(`div`,{className:`terminal-header`,children:[(0,w.jsxs)(`div`,{className:`terminal-header-title`,children:[(0,w.jsx)(`span`,{className:`terminal-dot red`}),(0,w.jsx)(`span`,{className:`terminal-dot yellow`}),(0,w.jsx)(`span`,{className:`terminal-dot green`}),(0,w.jsx)(`span`,{className:`terminal-title-text`,children:`REGISTROS DEL SISTEMA (CONSOLE LOGS)`})]}),(0,w.jsxs)(`div`,{className:`terminal-header-actions`,children:[(0,w.jsxs)(`label`,{className:`terminal-search-box`,children:[(0,w.jsx)(`span`,{children:`⌕`}),(0,w.jsx)(`input`,{type:`search`,placeholder:`Buscar en logs...`,value:C,onChange:e=>T(e.target.value)}),C&&(0,w.jsx)(`button`,{type:`button`,onClick:()=>T(``),className:`search-clear-btn`,title:`Borrar búsqueda`,children:`×`})]}),(0,w.jsx)(`button`,{className:`terminal-action-btn ${E?`active`:``}`,type:`button`,onClick:()=>D(!E),title:E?`Auto-scroll activado`:`Auto-scroll pausado`,children:E?`⬇ Auto-scroll`:`⏸ Pausado`}),(0,w.jsxs)(`button`,{className:`terminal-action-btn`,type:`button`,onClick:k,disabled:v,title:`Recargar registros`,children:[(0,w.jsx)(`span`,{className:v?`spin`:``,children:`↻`}),v?`Cargando…`:`Actualizar`]}),(0,w.jsx)(`button`,{className:`terminal-action-btn`,type:`button`,onClick:async()=>{try{let e=A.join(`
|
|
25
|
+
`))?i(`✓ Diagnóstico y logs copiados al portapapeles`):i(`⚠️ No se pudo acceder al portapapeles, intenta seleccionar el texto manualmente`,!0)},me=new Set(e.entities.filter(e=>e.exported).map(e=>e.compositeDeviceId||e.entityId)).size;return(0,w.jsx)(`div`,{className:`modal-backdrop open`,id:`device-modal`,role:`dialog`,"aria-modal":`true`,"aria-labelledby":`device-modal-name`,children:(0,w.jsxs)(`section`,{className:`modal modal-wide modal-fullscreen`,style:{width:`min(98vw, 1720px)`,maxWidth:`98vw`,height:`min(96vh, 960px)`,maxHeight:`96vh`,display:`flex`,flexDirection:`column`,padding:`24px 32px`},children:[(0,w.jsx)(`button`,{className:`icon-button`,id:`device-modal-close`,type:`button`,"aria-label":`Cerrar`,onClick:n,children:`×`}),(0,w.jsxs)(`header`,{className:`modal-header`,style:{marginBottom:8},children:[(0,w.jsx)(`span`,{className:`modal-icon`,id:`device-modal-icon`,children:Me(S?.domain||b[0]?.domain||e.entities[0]?.domain)}),(0,w.jsxs)(`div`,{children:[(0,w.jsx)(`p`,{className:`eyebrow`,children:`DISPOSITIVO IOT · MATTER ALL-IN-ONE`}),(0,w.jsx)(`h2`,{id:`device-modal-name`,children:e.name}),(0,w.jsxs)(`p`,{className:`entity-id`,id:`device-modal-id`,children:[e.manufacturer?`${e.manufacturer} · `:``,e.model?`${e.model} · `:``,e.area?`📍 ${e.area}`:e.id]})]})]}),(0,w.jsxs)(`div`,{className:`modal-layout`,style:{display:`grid`,gridTemplateColumns:`310px minmax(0, 1fr) 370px`,gap:16,flex:1,minHeight:0,overflow:`hidden`,alignItems:`stretch`},children:[(0,w.jsxs)(`div`,{className:`entity-list-col`,style:{display:`flex`,flexDirection:`column`,minHeight:0,height:`100%`},children:[(0,w.jsxs)(`div`,{className:`section-header`,style:{marginBottom:E?`8px`:`12px`},children:[(0,w.jsxs)(`div`,{children:[(0,w.jsx)(`h3`,{style:{margin:0},children:E?`Endpoints del Accesorio`:`Entidades disponibles`}),E&&(0,w.jsx)(`p`,{style:{fontSize:`11px`,color:`var(--muted)`,margin:`2px 0 0`},children:`1 accesorio Matter unificado (1 solo código QR)`})]}),(0,w.jsx)(`span`,{id:`modal-export-count`,children:E?O?`✓ 1 accesorio activo en Matter`:`0 accesorios en Matter`:me?`${me} accesorio Matter · ${e.entities.filter(e=>e.exported).length}/${e.entities.length} endpoints`:`0/${e.entities.length} publicadas`})]}),E&&(0,w.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,justifyContent:`space-between`,padding:`10px 14px`,background:O?`rgba(16, 185, 129, 0.08)`:`rgba(255, 255, 255, 0.03)`,border:`1px solid ${O?`rgba(16, 185, 129, 0.25)`:`var(--border)`}`,borderRadius:`10px`,marginBottom:`10px`,flexShrink:0},children:[(0,w.jsxs)(`div`,{children:[(0,w.jsx)(`div`,{style:{fontSize:`12.5px`,fontWeight:600,color:`var(--text)`},children:`Publicar Accesorio en Matter`}),(0,w.jsx)(`div`,{style:{fontSize:`11px`,color:`var(--muted)`,marginTop:`2px`},children:`Ventilador y luz juntos bajo un solo código QR`})]}),(0,w.jsxs)(`label`,{className:`toggle`,style:{margin:0},children:[(0,w.jsx)(`input`,{type:`checkbox`,checked:!!O,onChange:ne}),(0,w.jsx)(`span`,{})]})]}),(0,w.jsx)(`div`,{className:`entity-list`,id:`entity-list`,style:{flex:1,minHeight:0,maxHeight:`none`,overflowY:`auto`},children:b.map(e=>{let t=S?.entityId===e.entityId,n=e.entityId===e.compositePrimaryEntityId||E&&e.domain===`fan`,r=E&&(e.domain===`fan`||e.domain===`light`)&&!e.auxiliary,i=E&&e.auxiliary;return(0,w.jsxs)(`div`,{className:`entity-row${e.exported?``:` dimmed`}${t?` selected`:``}`,onClick:()=>o(e),children:[(0,w.jsx)(`span`,{className:`entity-row-icon`,children:Me(e.domain)}),(0,w.jsxs)(`div`,{style:{flex:1,minWidth:0},children:[(0,w.jsx)(`div`,{className:`entity-row-name`,children:e.name||e.entityId}),(0,w.jsx)(`div`,{className:`entity-row-id`,children:e.entityId}),(0,w.jsxs)(`div`,{style:{display:`flex`,gap:`6px`,alignItems:`center`,marginTop:`3px`,flexWrap:`wrap`},children:[(0,w.jsx)(`span`,{className:`entity-state${e.state===`on`?` on`:``}`,children:e.state||`desconocido`}),E&&n&&(0,w.jsx)(`span`,{className:`tag`,style:{fontSize:`10px`,padding:`1px 6px`,background:`rgba(59, 130, 246, 0.15)`,color:`#60a5fa`,border:`1px solid rgba(59, 130, 246, 0.3)`},children:`Endpoint 1 · Ventilador`}),E&&!n&&r&&(0,w.jsx)(`span`,{className:`tag`,style:{fontSize:`10px`,padding:`1px 6px`,background:`rgba(16, 185, 129, 0.15)`,color:`#34d399`,border:`1px solid rgba(16, 185, 129, 0.3)`},children:`Endpoint 2 · Luz (Dimmer + Kelvin)`}),i&&(0,w.jsx)(`span`,{className:`tag`,style:{fontSize:`10px`,padding:`1px 6px`,background:`rgba(156, 163, 175, 0.15)`,color:`#9ca3af`,border:`1px solid rgba(156, 163, 175, 0.25)`},children:`Auxiliar (Omitido)`})]})]}),(0,w.jsx)(`div`,{className:`export-control`,onClick:e=>e.stopPropagation(),children:E?i?(0,w.jsx)(`span`,{style:{fontSize:`11px`,color:`var(--muted)`,fontStyle:`italic`},children:`Excluido`}):(0,w.jsx)(`span`,{className:`badge ${e.exported?`badge-success`:`badge-muted`}`,style:{fontSize:`10.5px`,padding:`2px 8px`,borderRadius:`6px`,background:e.exported?`rgba(16, 185, 129, 0.15)`:`rgba(255, 255, 255, 0.05)`,color:e.exported?`#34d399`:`var(--muted)`,border:`1px solid ${e.exported?`rgba(16, 185, 129, 0.3)`:`rgba(255, 255, 255, 0.1)`}`,fontWeight:500},children:e.exported?`✓ En Matter`:`Inactivo`}):(0,w.jsxs)(`label`,{className:`toggle`,children:[(0,w.jsx)(`input`,{type:`checkbox`,checked:!!e.exported,onChange:()=>re(e)}),(0,w.jsx)(`span`,{})]})})]},e.entityId)})})]}),(0,w.jsxs)(`aside`,{className:`selection-panel`,id:`selection-panel`,style:{flex:1,minHeight:0,maxHeight:`none`,overflowY:`auto`,padding:22,gap:14},children:[(0,w.jsx)(`p`,{className:`card-label`,children:`SELECCIÓN Y CONFIGURACIÓN`}),(0,w.jsxs)(`h3`,{id:`selection-title`,children:[(0,w.jsx)(`span`,{className:`selection-title-text`,children:S?.name||S?.entityId||`Selecciona una entidad`}),te&&(0,w.jsx)(`span`,{className:`home-badge commissioned`,children:`🏠 Vinculado`})]}),(0,w.jsx)(`p`,{id:`selection-description`,children:E?S?.auxiliary?`Esta entidad es auxiliar (ej. buzzer/beeper) y se omite en Matter para mantener limpio el accesorio.`:j?`Este canal forma parte del accesorio unificado y está activo en Matter bajo el mismo código QR.`:`Activa el interruptor general arriba para publicar el accesorio (ventilador y luz juntos en 1 QR).`:j?`Esta entidad está activa y expuesta a través de Matter.`:`Activa el interruptor para publicar este canal en Matter.`}),S&&Array.isArray(S.profiles)&&S.profiles.length>0&&!S.auxiliary&&(0,w.jsxs)(`div`,{className:`profile-field`,id:`profile-field`,style:{display:`flex`,flexDirection:`column`,gap:6,marginTop:14,padding:12,background:`rgba(255, 255, 255, 0.03)`,border:`1px solid var(--border)`,borderRadius:10},children:[(0,w.jsx)(`label`,{htmlFor:`profile-select`,style:{fontSize:10,fontWeight:750,letterSpacing:`0.05em`,color:`var(--dim)`,textTransform:`uppercase`},children:`Perfil Matter`}),(0,w.jsx)(`select`,{id:`profile-select`,"aria-label":`Perfil Matter`,value:S.profileId||S.matterType||``,onChange:async e=>{let t=e.target.value;try{c(!0),await x.setDeviceProfile(S.entityId,t),S.profileId=t,S.matterType=t,i(`✓ Perfil Matter actualizado a ${t}`),r()}catch(e){i(e.message||`Error al cambiar perfil Matter`,!0)}finally{c(!1)}},disabled:s,style:{width:`100%`,padding:`8px 10px`,background:`#0b1528`,color:`var(--text)`,border:`1px solid var(--border)`,borderRadius:8,fontSize:12,cursor:`pointer`},children:S.profiles.map(e=>(0,w.jsxs)(`option`,{value:e.id,children:[e.label,e.appleHome===`supported`?``:e.appleHome===`experimental`?` · experimental`:` · no compatible con Apple Home`]},e.id))}),(()=>{let e=S.profiles.find(e=>e.id===(S.profileId||S.matterType))||S.profiles[0];return e?(0,w.jsx)(`small`,{id:`profile-note`,style:{color:`var(--muted)`,fontSize:10,lineHeight:1.4},children:e.description}):null})()]}),(0,w.jsxs)(`dl`,{className:`selection-meta`,id:`selection-meta`,children:[(0,w.jsxs)(`div`,{children:[(0,w.jsx)(`dt`,{children:`Entidad ID`}),(0,w.jsx)(`dd`,{children:S?.entityId||`—`})]}),(0,w.jsxs)(`div`,{children:[(0,w.jsx)(`dt`,{children:`Dominio`}),(0,w.jsx)(`dd`,{children:S?.domain||`—`})]}),S?.area_name&&(0,w.jsxs)(`div`,{children:[(0,w.jsx)(`dt`,{children:`Área`}),(0,w.jsx)(`dd`,{children:S.area_name})]}),(0,w.jsxs)(`div`,{children:[(0,w.jsx)(`dt`,{children:`Estado Matter`}),(0,w.jsx)(`dd`,{children:te?`Emparejado en red Matter`:j?`Listo para vincular`:`Sin publicar`})]})]}),(0,w.jsxs)(`section`,{className:`fabrics-section`,id:`fabrics-section`,children:[(0,w.jsxs)(`div`,{className:`fabrics-heading`,children:[(0,w.jsx)(`span`,{className:`fabrics-icon`,"aria-hidden":`true`,children:`🏠`}),(0,w.jsx)(`strong`,{children:`Casas / Controladores Conectados`})]}),(0,w.jsx)(`p`,{className:`fabrics-subtitle`,children:`Desconectar de ecosistemas Matter existentes si cambias de controlador o si ya eliminaste este accesorio en tu app de Apple Home, Google Home o Alexa.`}),A.length>0?(0,w.jsx)(`div`,{className:`fabrics-list`,children:A.map((e,t)=>{let n=Ne(e.vendorId,e.controller),r=e.fabricIndex??e.fabricId??t+1;return(0,w.jsxs)(`div`,{className:`fabric-item`,children:[(0,w.jsxs)(`div`,{className:`fabric-info`,children:[(0,w.jsxs)(`div`,{className:`fabric-controller-line`,children:[(0,w.jsx)(`span`,{style:{fontSize:15},children:n.icon}),(0,w.jsx)(`span`,{className:`fabric-name`,children:n.name})]}),e.label&&(0,w.jsxs)(`span`,{className:`fabric-home-name`,children:[`Casa: `,(0,w.jsx)(`strong`,{children:e.label})]}),(0,w.jsxs)(`span`,{className:`fabric-detail`,children:[`Fabric `,r,e.vendorId?` · VID: 0x${Number(e.vendorId).toString(16).toUpperCase()}`:``]})]}),(0,w.jsx)(`button`,{type:`button`,className:`button button-danger-outline button-xs`,onClick:()=>M(r),disabled:s,title:`Desconectar únicamente esta casa`,style:{padding:`4px 8px`,fontSize:`11px`,borderRadius:`6px`,cursor:`pointer`,background:`rgba(239, 68, 68, 0.15)`,color:`#fca5a5`,border:`1px solid rgba(239, 68, 68, 0.35)`},children:`Desconectar`})]},r)})}):(0,w.jsx)(`div`,{style:{fontSize:11,color:`var(--muted)`,fontStyle:`italic`,padding:`4px 0`},children:te?`Sesión registrada en el puente (sin etiquetas de controlador reportadas).`:`No hay casas ni controladores vinculados a este accesorio.`})]}),(0,w.jsxs)(`section`,{className:`diagnostics-panel ${le||S?.hasIssue?`has-issues`:``}`,id:`diagnostics-panel`,"aria-live":`polite`,style:{userSelect:`text`,background:le?`rgba(245, 158, 11, 0.08)`:`rgba(255, 255, 255, 0.03)`,border:le?`1px solid rgba(245, 158, 11, 0.3)`:`1px solid var(--border)`,borderRadius:`10px`,padding:`14px`},children:[(0,w.jsxs)(`div`,{className:`diagnostics-heading`,style:{display:`flex`,alignItems:`center`,justifyContent:`space-between`,marginBottom:`8px`},children:[(0,w.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:`6px`},children:[(0,w.jsx)(`span`,{id:`diagnostics-icon`,"aria-hidden":`true`,style:{fontSize:`16px`},children:le||S?.hasIssue?`⚠️`:fe.length>0?`ℹ️`:`✓`}),(0,w.jsx)(`strong`,{id:`diagnostics-heading-text`,style:{fontSize:`13px`},children:le?`Estado de Conexión y Diagnóstico`:`Diagnóstico y logs`})]}),(0,w.jsx)(`button`,{id:`copy-diagnostics-button`,className:`copy-diagnostics-button`,type:`button`,onClick:pe,title:`Copiar diagnóstico y logs al portapapeles`,children:`📋 Copiar logs`})]}),le&&(0,w.jsxs)(`div`,{style:{background:`rgba(245, 158, 11, 0.15)`,borderLeft:`3px solid #f59e0b`,padding:`8px 10px`,borderRadius:`4px`,fontSize:`11px`,color:`#fbbf24`,marginBottom:`8px`,lineHeight:`1.4`},children:[(0,w.jsxs)(`strong`,{children:[`⚠️ Dispositivo no disponible en Home Assistant (Estado: `,ce.toUpperCase(),`)`]}),(0,w.jsx)(`div`,{style:{marginTop:`3px`,color:`var(--text)`},children:`Home Assistant perdió comunicación con el dispositivo físico. El puente Matter sigue activo, pero el aparato no responde en su origen (posiblemente apagado, sin batería o sin Wi-Fi).`})]}),(0,w.jsx)(`p`,{id:`diagnostics-summary`,style:{margin:`4px 0`,fontSize:`11.5px`,color:le?`#fbbf24`:`var(--muted)`},children:fe.length===0?`Sin errores registrados para este accesorio.`:`${fe.length} evento${fe.length===1?``:`s`} registrado${fe.length===1?``:`s`}`}),fe.length>0&&(0,w.jsx)(`ul`,{id:`diagnostics-list`,style:{userSelect:`text`,maxHeight:`180px`,overflowY:`auto`,margin:`6px 0 0`,paddingLeft:`16px`,fontSize:`11px`,display:`flex`,flexDirection:`column`,gap:`4px`},children:fe.slice(-25).map((e,t)=>(0,w.jsxs)(`li`,{style:{userSelect:`text`,wordBreak:`break-word`,color:e.level===`warning`?`#fbbf24`:e.level===`error`?`#f87171`:`var(--text)`},children:[e.timestamp?(0,w.jsxs)(`span`,{style:{opacity:.6,marginRight:`5px`},children:[`[`,new Date(e.timestamp).toLocaleTimeString(),`]`]}):null,(0,w.jsxs)(`span`,{style:{fontWeight:600,marginRight:`4px`},children:[`[`,e.level.toUpperCase(),`]`]}),e.text]},t))})]})]}),(0,w.jsxs)(`div`,{className:`qr-panel`,id:`qr-panel`,style:{display:`flex`,flexDirection:`column`,gap:8,minHeight:0,height:`100%`,overflowY:`auto`,overflowX:`hidden`,paddingRight:6},children:[(0,w.jsx)(`p`,{className:`card-label`,style:{margin:`0 0 2px 0`,flexShrink:0},children:`CÓDIGO MATTER`}),(0,w.jsx)(`div`,{className:`qr-status-label${te?` commissioned`:j?` active`:``}`,id:`qr-status-label`,style:{flexShrink:0},children:te?`Vinculado a Matter`:j?`Listo para emparejar`:`Sin publicar`}),j?te&&!l?(0,w.jsxs)(`div`,{className:`paired-success-glass-card`,id:`paired-device-card`,children:[(0,w.jsx)(`div`,{className:`paired-apple-home-badge`,children:(0,w.jsx)(De,{variant:`color`,size:56})}),(0,w.jsx)(`h4`,{className:`paired-card-title`,children:`¡Accesorio vinculado en Apple Home!`}),(0,w.jsx)(`p`,{className:`paired-card-desc`,children:`Este dispositivo ya está emparejado y activo en tu red Matter. El código QR inicial se oculta para proteger la sesión activa.`}),(0,w.jsxs)(`div`,{className:`paired-multiadmin-box`,children:[(0,w.jsx)(`p`,{className:`paired-multiadmin-subtext`,children:`¿Deseas compartirlo con Google Home, Alexa o SmartThings?`}),(0,w.jsx)(`button`,{className:`button button-primary button-open-multiadmin`,type:`button`,onClick:ae,disabled:s,id:`paired-open-multiadmin-btn`,children:(0,w.jsx)(`span`,{children:`🌐 Abrir Modo Multi-Admin (15 min)`})})]})]}):(0,w.jsxs)(w.Fragment,{children:[l&&(0,w.jsxs)(`div`,{id:`multi-admin-hint`,className:`multi-admin-hint`,style:{display:`block`,flexShrink:0},children:[(0,w.jsx)(`p`,{className:`hint-title`,children:`🌐 Modo Multi-Admin Abierto (15 min)`}),(0,w.jsxs)(`p`,{className:`hint-desc`,children:[`Ventana de emparejamiento abierta. Escanea este código QR en`,(0,w.jsx)(`strong`,{children:` Google Home`}),`, `,(0,w.jsx)(`strong`,{children:`Alexa`}),` o`,` `,(0,w.jsx)(`strong`,{children:`SmartThings`}),`.`]})]}),(0,w.jsx)(ke,{pairingCode:k,manualCode:ee,entityName:E?D?.name||e.name:S?.name||e.name,elementId:`device-qr-code`,variant:l?`multi-admin-glass`:`matter-badge`})]}):(0,w.jsx)(`div`,{className:`qr-liquid-glass-card`,style:{padding:20,textAlign:`center`,color:`var(--text-secondary)`,flexShrink:0},children:E?`Activa el interruptor general del accesorio para generar el código QR de Matter.`:`Activa la entidad para generar el código QR de Matter.`}),(0,w.jsx)(`div`,{className:`accessory-controls`,id:`accessory-controls`,style:{flexShrink:0,paddingTop:6},children:j&&(0,w.jsxs)(`div`,{className:`matter-actions`,style:{display:`flex`,flexDirection:`column`,gap:6},children:[(0,w.jsx)(`button`,{className:`button button-secondary action-btn`,id:`reconnect-accessory-button`,type:`button`,onClick:ie,disabled:s,title:`Refresca la conexión con Home Assistant y Matter`,style:{padding:`7px 10px`,fontSize:11.5},children:`↻ Recargar / Sincronizar`}),(0,w.jsx)(`button`,{className:`button button-secondary action-btn`,id:`regenerate-code-button`,type:`button`,onClick:ae,disabled:s,style:{padding:`7px 10px`,fontSize:11.5},children:`Abrir Modo Multi-Admin`}),(0,w.jsx)(`button`,{className:`button button-danger action-btn`,id:`reset-accessory-button`,type:`button`,onClick:oe,disabled:s,title:`Desconectar de todas las casas y generar un nuevo código QR`,style:{padding:`7px 10px`,fontSize:11.5},children:`Desconectar todo y nuevo QR`})]})})]})]})]})})},Fe=({config:e,onClose:t,onRefresh:n,showToast:r})=>{let[i,a]=(0,_.useState)(``),[o,s]=(0,_.useState)(``),[c,l]=(0,_.useState)(``),[u,d]=(0,_.useState)(!1),[f,p]=(0,_.useState)(!1),[m,h]=(0,_.useState)(!1),[g,v]=(0,_.useState)(null);(0,_.useEffect)(()=>{e&&(a(e.serverUrl||``),s(e.username||``),d(!!e.allowSelfSignedCertificate))},[e]);let y=async()=>{if(!i.trim()||!o.trim()||!c){r(`Completa la URL, usuario y contraseña`,!0);return}p(!0),v({text:`Comprobando conexión con Scrypted...`});try{let e=await x.testScryptedConnection({serverUrl:i.trim(),username:o.trim(),password:c,allowSelfSignedCertificate:u});e.success?v({text:`✓ Conexión exitosa. Se detectaron ${e.cameraCount||0} cámaras.`}):v({text:`❌ ${e.error||`No se pudo conectar`}`,isError:!0})}catch(e){v({text:`❌ Error: ${e.message}`,isError:!0})}finally{p(!1)}},b=async e=>{if(e.preventDefault(),!i.trim()||!o.trim()){r(`Ingresa la URL y el usuario`,!0);return}h(!0);try{await x.saveScryptedConfig({serverUrl:i.trim(),username:o.trim(),password:c,allowSelfSignedCertificate:u}),r(`✓ Configuración de Scrypted guardada exitosamente`),n(),t()}catch(e){r(e.message||`Error al guardar`,!0)}finally{h(!1)}},[S,C]=(0,_.useState)(!1);return(0,w.jsx)(`div`,{className:`modal-backdrop open`,role:`dialog`,"aria-modal":`true`,children:(0,w.jsxs)(`section`,{className:`modal`,style:{maxWidth:520},children:[(0,w.jsx)(`button`,{className:`icon-button`,type:`button`,"aria-label":`Cerrar`,onClick:t,children:`×`}),(0,w.jsxs)(`header`,{className:`modal-header`,children:[(0,w.jsx)(`span`,{className:`modal-icon`,style:{fontSize:`1.8rem`},children:`📹`}),(0,w.jsxs)(`div`,{children:[(0,w.jsx)(`p`,{className:`eyebrow`,children:`INTEGRACIÓN DE CÁMARAS`}),(0,w.jsx)(`h2`,{children:`Conectar con Scrypted`}),(0,w.jsx)(`p`,{className:`entity-id`,children:`Transmisión de alta velocidad HAP y Matter`})]})]}),(0,w.jsxs)(`form`,{onSubmit:b,style:{display:`flex`,flexDirection:`column`,gap:12},children:[(0,w.jsxs)(`div`,{children:[(0,w.jsx)(`label`,{style:{display:`block`,fontSize:`0.8rem`,color:`var(--dim)`,marginBottom:4},children:`URL del Servidor Scrypted`}),(0,w.jsx)(`input`,{type:`url`,value:i,onChange:e=>a(e.target.value),placeholder:`https://192.168.1.100:10443`,required:!0,style:{width:`100%`,padding:`8px 12px`,borderRadius:8,background:`rgba(0,0,0,0.2)`,border:`1px solid rgba(255,255,255,0.1)`,color:`#fff`}})]}),(0,w.jsxs)(`div`,{children:[(0,w.jsx)(`label`,{style:{display:`block`,fontSize:`0.8rem`,color:`var(--dim)`,marginBottom:4},children:`Usuario de Scrypted`}),(0,w.jsx)(`input`,{type:`text`,value:o,onChange:e=>s(e.target.value),placeholder:`admin`,required:!0,style:{width:`100%`,padding:`8px 12px`,borderRadius:8,background:`rgba(0,0,0,0.2)`,border:`1px solid rgba(255,255,255,0.1)`,color:`#fff`}})]}),(0,w.jsxs)(`div`,{children:[(0,w.jsx)(`label`,{style:{display:`block`,fontSize:`0.8rem`,color:`var(--dim)`,marginBottom:4},children:`Contraseña`}),(0,w.jsx)(`input`,{type:`password`,value:c,onChange:e=>l(e.target.value),placeholder:`••••••••`,style:{width:`100%`,padding:`8px 12px`,borderRadius:8,background:`rgba(0,0,0,0.2)`,border:`1px solid rgba(255,255,255,0.1)`,color:`#fff`}})]}),(0,w.jsxs)(`label`,{style:{display:`flex`,alignItems:`center`,gap:8,cursor:`pointer`,fontSize:`0.82rem`},children:[(0,w.jsx)(`input`,{type:`checkbox`,checked:u,onChange:e=>d(e.target.checked)}),(0,w.jsx)(`span`,{children:`Permitir certificados SSL autofirmados (HTTPS local)`})]}),g&&(0,w.jsx)(`div`,{style:{padding:`8px 12px`,borderRadius:8,fontSize:`0.8rem`,background:g.isError?`rgba(239,68,68,0.15)`:`rgba(16,185,129,0.15)`,color:g.isError?`#fca5a5`:`#6ee7b7`},children:g.text}),(0,w.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,gap:8,marginTop:12,flexWrap:`wrap`},children:[(0,w.jsxs)(`div`,{style:{display:`flex`,gap:8},children:[(0,w.jsx)(`button`,{className:`button button-secondary`,type:`button`,onClick:y,disabled:f,children:f?`Comprobando...`:`Probar Conexión`}),!!e?.serverUrl&&(0,w.jsx)(`button`,{className:`button button-danger-outline`,type:`button`,onClick:async()=>{if(confirm(`¿Desvincular Scrypted y limpiar todas las cámaras en caché de Scrypted?`)){C(!0);try{await x.deleteScryptedConfig(),r(`✓ Scrypted desvinculado y caché de cámaras limpiada`),n(),t()}catch(e){r(e.message||`Error al desvincular`,!0)}finally{C(!1)}}},disabled:S,title:`Elimina las credenciales y limpia las cámaras de Scrypted en caché`,style:{background:`rgba(239, 68, 68, 0.12)`,color:`#fca5a5`,borderColor:`rgba(239, 68, 68, 0.35)`,fontSize:`0.8rem`},children:S?`Limpiando...`:`Desvincular y Limpiar`})]}),(0,w.jsxs)(`div`,{style:{display:`flex`,gap:8},children:[(0,w.jsx)(`button`,{className:`button button-secondary`,type:`button`,onClick:t,children:`Cancelar`}),(0,w.jsx)(`button`,{className:`button button-primary`,type:`submit`,disabled:m,children:m?`Guardando...`:`Guardar`})]})]})]})]})})},Ie=({config:e,onClose:t,onRefresh:n,showToast:r})=>{let[i,a]=(0,_.useState)(!1),[o,s]=(0,_.useState)(``),[c,l]=(0,_.useState)(``),[u,d]=(0,_.useState)(``),[f,p]=(0,_.useState)(``),[m,h]=(0,_.useState)(``),[g,v]=(0,_.useState)(!0),[y,b]=(0,_.useState)(!0),[S,C]=(0,_.useState)(`camera.ui`),[T,E]=(0,_.useState)(!1),[D,O]=(0,_.useState)(!1),[k,ee]=(0,_.useState)(!1),[A,j]=(0,_.useState)(null),[te,ne]=(0,_.useState)([]),[M,re]=(0,_.useState)(`settings`),ie=(0,_.useRef)(!1);(0,_.useEffect)(()=>{if(e&&!ie.current){ie.current=!0,a(e.enabled??!0);let t=(e.serverUrl||``).trim();s(t||`http://127.0.0.1:8181`),l(e.username||``),p(e.rtspUsername||``),v(e.allowSelfSignedCertificate??!0),b(e.mqttEnabled??!0),C(e.mqttTopicPrefix||`camera.ui`)}ae()},[e]);let ae=async()=>{try{let e=await x.getCameraUiCameras();ne(e)}catch{}},oe=async()=>{let t=o.trim()||e?.serverUrl||`http://127.0.0.1:8181`;if(!t){r(`Ingresa la URL del servidor Camera.UI (ej. https://192.168.110.46:3543)`,!0);return}E(!0),j({text:`Comprobando conexión con Camera.UI...`});try{let e=await x.testCameraUiConnection({serverUrl:t,username:c.trim()||void 0,password:u.trim()?u:void 0,allowSelfSignedCertificate:g});e.ok?j({text:`✓ ${e.message}`}):j({text:`❌ ${e.message}`,isError:!0})}catch(e){j({text:`❌ Error: ${e.message}`,isError:!0})}finally{E(!1)}},se=async()=>{let t=o.trim()||e?.serverUrl||`http://127.0.0.1:8181`;if(!t){r(`Ingresa la URL del servidor Camera.UI (ej. https://192.168.110.46:3543)`,!0);return}O(!0);try{let e=await x.syncCameraUiCameras({serverUrl:t,username:c.trim()||void 0,password:u.trim()?u:void 0,allowSelfSignedCertificate:g});e.success?(r(`✓ Sincronización completa: ${e.totalCameras} cámaras detectadas (${e.newCameras} nuevas).`),ne(e.cameras||[]),n()):r(`Error al sincronizar cámaras de Camera.UI`,!0)}catch(e){r(e.message||`Error al sincronizar`,!0)}finally{O(!1)}},ce=async e=>{try{await x.toggleCameraUiHomeKit(e),await ae(),r(`✓ Estado de HomeKit actualizado.`),n()}catch(e){r(`Error: ${e.message}`,!0)}},le=async e=>{try{(await x.resetCameraUiPairing(e)).success?(r(`✓ Emparejamiento HomeKit restablecido. Listo para escanear en Apple Home.`),await ae(),n()):r(`No se pudo restablecer el emparejamiento`,!0)}catch(e){r(`Error: ${e.message}`,!0)}};return(0,w.jsx)(`div`,{className:`modal-backdrop open`,role:`dialog`,"aria-modal":`true`,children:(0,w.jsxs)(`section`,{className:`modal`,style:{maxWidth:620,maxHeight:`90vh`,overflowY:`auto`},children:[(0,w.jsx)(`button`,{className:`icon-button`,type:`button`,"aria-label":`Cerrar`,onClick:t,children:`×`}),(0,w.jsxs)(`header`,{className:`modal-header`,children:[(0,w.jsx)(`span`,{className:`modal-icon`,style:{fontSize:`1.8rem`},children:`🎥`}),(0,w.jsxs)(`div`,{children:[(0,w.jsx)(`p`,{className:`eyebrow`,children:`INTEGRACIÓN DE CÁMARAS Y MQTT`}),(0,w.jsx)(`h2`,{children:`Camera.UI / Homebridge Camera.UI`}),(0,w.jsx)(`p`,{className:`entity-id`,children:`Descubrimiento RTSP, eventos MQTT (movimiento/timbre) y puente directo HomeKit HAP`})]})]}),(0,w.jsxs)(`div`,{style:{display:`flex`,gap:10,margin:`12px 0 16px`,borderBottom:`1px solid rgba(255,255,255,0.1)`,paddingBottom:8},children:[(0,w.jsx)(`button`,{type:`button`,className:`button ${M===`settings`?`button-primary`:`button-secondary`}`,style:{fontSize:`0.85rem`,padding:`6px 14px`},onClick:()=>re(`settings`),children:`⚙️ Configuración y Conexión`}),(0,w.jsxs)(`button`,{type:`button`,className:`button ${M===`cameras`?`button-primary`:`button-secondary`}`,style:{fontSize:`0.85rem`,padding:`6px 14px`},onClick:()=>{re(`cameras`),ae()},children:[`📷 Cámaras Descubiertas (`,te.length,`)`]})]}),M===`settings`?(0,w.jsxs)(`form`,{onSubmit:async e=>{if(e.preventDefault(),!o.trim()){r(`Ingresa la URL del servidor Camera.UI`,!0);return}ee(!0);try{await x.saveCameraUiConfig({enabled:i,serverUrl:o.trim(),username:c.trim()||void 0,password:u||void 0,rtspUsername:f.trim()||void 0,rtspPassword:m||void 0,allowSelfSignedCertificate:g,mqttEnabled:y,mqttTopicPrefix:S.trim()||`camera.ui`}),r(`✓ Configuración de Camera.UI guardada exitosamente`),n(),t()}catch(e){r(e.message||`Error al guardar`,!0)}finally{ee(!1)}},style:{display:`flex`,flexDirection:`column`,gap:12},children:[(0,w.jsxs)(`label`,{style:{display:`flex`,alignItems:`center`,gap:10,cursor:`pointer`,fontSize:`0.9rem`,fontWeight:600},children:[(0,w.jsx)(`input`,{type:`checkbox`,checked:i,onChange:e=>a(e.target.checked)}),(0,w.jsx)(`span`,{children:`Habilitar integración Camera.UI`})]}),(0,w.jsxs)(`div`,{children:[(0,w.jsx)(`label`,{style:{display:`block`,fontSize:`0.8rem`,color:`var(--dim)`,marginBottom:4},children:`URL del Servidor Camera.UI`}),(0,w.jsx)(`input`,{type:`url`,value:o,onChange:e=>s(e.target.value),placeholder:`https://192.168.110.46:3543 o http://192.168.1.100:8181`,required:!0,style:{width:`100%`,padding:`8px 12px`,borderRadius:8,background:`rgba(0,0,0,0.2)`,border:`1px solid rgba(255,255,255,0.1)`,color:`#fff`}}),(0,w.jsx)(`span`,{style:{fontSize:`0.75rem`,color:`var(--dim)`},children:`Puerto REST por defecto de Camera.UI: 8181 (o HTTPS en 3543). El RTSP nativo de esta instalación usa el puerto 2101.`}),(0,w.jsx)(`div`,{style:{marginTop:8},children:(0,w.jsxs)(`label`,{style:{display:`flex`,alignItems:`center`,gap:8,cursor:`pointer`,fontSize:`0.8rem`,color:`var(--dim)`},children:[(0,w.jsx)(`input`,{type:`checkbox`,checked:g,onChange:e=>v(e.target.checked)}),(0,w.jsx)(`span`,{children:`Permitir certificados SSL autofirmados (HTTPS local)`})]})})]}),(0,w.jsxs)(`div`,{style:{display:`grid`,gridTemplateColumns:`1fr 1fr`,gap:10},children:[(0,w.jsxs)(`div`,{children:[(0,w.jsx)(`label`,{style:{display:`block`,fontSize:`0.8rem`,color:`var(--dim)`,marginBottom:4},children:`Usuario RTSP de Camera.UI`}),(0,w.jsx)(`input`,{type:`text`,value:f,onChange:e=>p(e.target.value),placeholder:`admin`,style:{width:`100%`,padding:`8px 12px`,borderRadius:8,background:`rgba(0,0,0,0.2)`,border:`1px solid rgba(255,255,255,0.1)`,color:`#fff`}})]}),(0,w.jsxs)(`div`,{children:[(0,w.jsx)(`label`,{style:{display:`block`,fontSize:`0.8rem`,color:`var(--dim)`,marginBottom:4},children:`Contraseña RTSP`}),(0,w.jsx)(`input`,{type:`password`,value:m,onChange:e=>h(e.target.value),placeholder:e?.hasRtspPassword?`•••••••• (guardada)`:`••••••••`,style:{width:`100%`,padding:`8px 12px`,borderRadius:8,background:`rgba(0,0,0,0.2)`,border:`1px solid rgba(255,255,255,0.1)`,color:`#fff`}})]})]}),(0,w.jsxs)(`div`,{style:{display:`grid`,gridTemplateColumns:`1fr 1fr`,gap:10},children:[(0,w.jsxs)(`div`,{children:[(0,w.jsx)(`label`,{style:{display:`block`,fontSize:`0.8rem`,color:`var(--dim)`,marginBottom:4},children:`Usuario (opcional)`}),(0,w.jsx)(`input`,{type:`text`,value:c,onChange:e=>l(e.target.value),placeholder:`admin`,style:{width:`100%`,padding:`8px 12px`,borderRadius:8,background:`rgba(0,0,0,0.2)`,border:`1px solid rgba(255,255,255,0.1)`,color:`#fff`}})]}),(0,w.jsxs)(`div`,{children:[(0,w.jsx)(`label`,{style:{display:`block`,fontSize:`0.8rem`,color:`var(--dim)`,marginBottom:4},children:`Contraseña (opcional)`}),(0,w.jsx)(`input`,{type:`password`,value:u,onChange:e=>d(e.target.value),placeholder:e?.hasPassword?`•••••••• (guardada)`:`••••••••`,style:{width:`100%`,padding:`8px 12px`,borderRadius:8,background:`rgba(0,0,0,0.2)`,border:`1px solid rgba(255,255,255,0.1)`,color:`#fff`}})]})]}),(0,w.jsxs)(`div`,{style:{padding:`10px 12px`,borderRadius:8,background:`rgba(255,255,255,0.03)`,border:`1px solid rgba(255,255,255,0.08)`},children:[(0,w.jsxs)(`label`,{style:{display:`flex`,alignItems:`center`,gap:8,cursor:`pointer`,fontSize:`0.85rem`,fontWeight:500},children:[(0,w.jsx)(`input`,{type:`checkbox`,checked:y,onChange:e=>b(e.target.checked)}),(0,w.jsx)(`span`,{children:`Escuchar tópicos MQTT de Camera.UI para Movimiento y Timbre`})]}),y&&(0,w.jsxs)(`div`,{style:{marginTop:8},children:[(0,w.jsx)(`label`,{style:{display:`block`,fontSize:`0.75rem`,color:`var(--dim)`,marginBottom:4},children:`Prefijo de Tópicos MQTT`}),(0,w.jsx)(`input`,{type:`text`,value:S,onChange:e=>C(e.target.value),placeholder:`camera.ui`,style:{width:`100%`,padding:`6px 10px`,borderRadius:6,background:`rgba(0,0,0,0.2)`,border:`1px solid rgba(255,255,255,0.1)`,color:`#fff`,fontSize:`0.85rem`}}),(0,w.jsxs)(`span`,{style:{fontSize:`0.75rem`,color:`var(--dim)`,display:`block`,marginTop:4},children:[`Se suscribe automáticamente a `,(0,w.jsx)(`code`,{children:`camera.ui/#`}),` y `,(0,w.jsx)(`code`,{children:`cameraui/#`}),` para disparar notificaciones de movimiento y timbres en Apple Home.`]})]})]}),A&&(0,w.jsx)(`div`,{style:{padding:`8px 12px`,borderRadius:8,fontSize:`0.8rem`,background:A.isError?`rgba(239,68,68,0.15)`:`rgba(16,185,129,0.15)`,color:A.isError?`#fca5a5`:`#6ee7b7`},children:A.text}),(0,w.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,gap:8,marginTop:12},children:[(0,w.jsxs)(`div`,{style:{display:`flex`,gap:8},children:[(0,w.jsx)(`button`,{className:`button button-secondary`,type:`button`,onClick:oe,disabled:T,children:T?`Comprobando...`:`Probar Conexión`}),(0,w.jsx)(`button`,{className:`button button-secondary`,type:`button`,onClick:se,disabled:D,children:D?`Sincronizando...`:`🔄 Sincronizar Cámaras`})]}),(0,w.jsxs)(`div`,{style:{display:`flex`,gap:8},children:[(0,w.jsx)(`button`,{className:`button button-secondary`,type:`button`,onClick:t,children:`Cancelar`}),(0,w.jsx)(`button`,{className:`button button-primary`,type:`submit`,disabled:k,children:k?`Guardando...`:`Guardar`})]})]})]}):(0,w.jsxs)(`div`,{style:{display:`flex`,flexDirection:`column`,gap:12},children:[(0,w.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,alignItems:`center`},children:[(0,w.jsx)(`span`,{style:{fontSize:`0.85rem`,color:`var(--dim)`},children:te.length===0?`No se han sincronizado cámaras aún.`:`${te.length} cámaras encontradas en Camera.UI.`}),(0,w.jsx)(`button`,{className:`button button-secondary`,type:`button`,onClick:se,disabled:D,style:{fontSize:`0.8rem`,padding:`4px 10px`},children:D?`Sincronizando...`:`🔄 Sincronizar Ahora`})]}),te.length===0?(0,w.jsx)(`div`,{style:{padding:`24px 16px`,textAlign:`center`,background:`rgba(255,255,255,0.02)`,borderRadius:8,border:`1px dashed rgba(255,255,255,0.1)`},children:(0,w.jsxs)(`p`,{style:{margin:0,color:`var(--dim)`,fontSize:`0.9rem`},children:[`Asegúrate de que la URL del servidor sea correcta y presiona `,(0,w.jsx)(`strong`,{children:`Sincronizar Ahora`}),`.`]})}):(0,w.jsx)(`div`,{style:{display:`flex`,flexDirection:`column`,gap:10},children:te.map(e=>(0,w.jsxs)(`div`,{style:{padding:`12px`,borderRadius:8,background:`rgba(255,255,255,0.03)`,border:`1px solid rgba(255,255,255,0.08)`,display:`flex`,flexDirection:`column`,gap:8},children:[(0,w.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,alignItems:`flex-start`},children:[(0,w.jsxs)(`div`,{children:[(0,w.jsx)(`strong`,{style:{fontSize:`0.95rem`},children:e.name}),(0,w.jsxs)(`div`,{style:{fontSize:`0.75rem`,color:`var(--dim)`,marginTop:2},children:[`ID: `,(0,w.jsx)(`code`,{children:e.id}),` · Puerto HAP: `,(0,w.jsx)(`code`,{children:e.port||`Pendiente`})]})]}),(0,w.jsx)(`span`,{style:{fontSize:`0.75rem`,padding:`2px 8px`,borderRadius:6,background:e.isPaired?`rgba(16,185,129,0.2)`:`rgba(245,158,11,0.2)`,color:e.isPaired?`#6ee7b7`:`#fde68a`},children:e.isPaired?`✓ Vinculada en Apple Home`:`⚠️ Lista para vincular`})]}),(0,w.jsxs)(`div`,{style:{fontSize:`0.8rem`,color:`var(--dim)`,wordBreak:`break-all`},children:[`RTSP: `,(0,w.jsx)(`code`,{children:e.rtspUrl})]}),(0,w.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,justifyContent:`space-between`,marginTop:4,paddingTop:8,borderTop:`1px solid rgba(255,255,255,0.06)`},children:[(0,w.jsxs)(`div`,{style:{display:`flex`,gap:8,alignItems:`center`},children:[(0,w.jsxs)(`span`,{style:{fontSize:`0.8rem`},children:[`PIN: `,(0,w.jsx)(`strong`,{children:e.pincode||`031-45-154`})]}),e.setupUri&&!e.isPaired&&(0,w.jsx)(`a`,{href:e.setupUri,target:`_blank`,rel:`noopener noreferrer`,className:`button button-secondary`,style:{fontSize:`0.75rem`,padding:`2px 8px`,textDecoration:`none`},children:`🔗 Código HomeKit`})]}),(0,w.jsxs)(`div`,{style:{display:`flex`,gap:8},children:[(0,w.jsx)(`button`,{type:`button`,className:`button button-secondary`,style:{fontSize:`0.75rem`,padding:`3px 8px`},onClick:()=>le(e.id),title:`Restablece el ID y genera nuevo PIN si Apple Home no la encuentra`,children:`Restablecer PIN`}),(0,w.jsx)(`button`,{type:`button`,className:`button ${e.homeKitEnabled?`button-primary`:`button-secondary`}`,style:{fontSize:`0.75rem`,padding:`3px 8px`},onClick:()=>ce(e.id),title:e.homeKitEnabled?`Desactiva la exportación HAP de esta cámara`:`Activa y publica esta cámara para Apple Home`,children:e.homeKitEnabled?`Desactivar HomeKit`:`Activar HomeKit`})]})]})]},e.id))})]})]})})};function Le(e){let t=e.toLowerCase();return/\b(error|failed|failure|exception|unable|crash|fatal)\b/.test(t)?`error`:/\b(warn|warning|timeout|retry|deprecated)\b/.test(t)?`warn`:/\b(info|notice|debug|connected|registered|online)\b/.test(t)?`info`:`default`}var Re=({isOpen:e,onClose:t,showToast:n,status:r,stats:i})=>{let[a,o]=(0,_.useState)(``),[s,c]=(0,_.useState)(1883),[l,u]=(0,_.useState)(``),[d,f]=(0,_.useState)(``),[p,m]=(0,_.useState)(!1),[h,g]=(0,_.useState)([]),[v,y]=(0,_.useState)(!1),[b,S]=(0,_.useState)(`all`),[C,T]=(0,_.useState)(``),[E,D]=(0,_.useState)(!0),O=(0,_.useRef)(null),k=async()=>{y(!0);try{let e=await x.getLogs();g(e.logs||[])}catch(e){n(e.message||`Error al cargar logs`,!0)}finally{y(!1)}};(0,_.useEffect)(()=>{e&&(x.getMqttConfig().then(e=>{e&&(o(e.host||``),c(e.port||1883),u(e.username||``),f(e.password||``))}).catch(()=>{}),k())},[e]);let ee=(0,_.useMemo)(()=>{let e=0,t=0,n=0;for(let r of h){let i=Le(r);i===`error`?e++:i===`warn`?t++:i===`info`&&n++}return{all:h.length,errors:e,warns:t,infos:n}},[h]),A=(0,_.useMemo)(()=>{let e=h;if(b!==`all`&&(e=e.filter(e=>Le(e)===b)),C.trim()){let t=C.toLowerCase().trim();e=e.filter(e=>e.toLowerCase().includes(t))}return e},[h,b,C]);return(0,_.useEffect)(()=>{E&&O.current&&(O.current.scrollTop=O.current.scrollHeight)},[A,E]),e?(0,w.jsx)(`div`,{className:`modal-backdrop open`,id:`settings-modal`,role:`dialog`,"aria-modal":`true`,"aria-labelledby":`settings-title`,children:(0,w.jsxs)(`section`,{className:`modal modal-settings-wide`,children:[(0,w.jsx)(`button`,{className:`icon-button`,id:`settings-modal-close`,type:`button`,"aria-label":`Cerrar`,onClick:t,children:`×`}),(0,w.jsx)(`div`,{className:`settings-modal-header`,children:(0,w.jsxs)(`div`,{className:`settings-modal-header-left`,children:[(0,w.jsx)(`span`,{className:`settings-sparkle`,children:`⚙️`}),(0,w.jsxs)(`div`,{children:[(0,w.jsxs)(`div`,{className:`settings-header-badge-row`,children:[(0,w.jsx)(`span`,{className:`settings-badge-eyebrow`,children:`MANTENIMIENTO & SISTEMA`}),(0,w.jsx)(`span`,{className:`settings-ha-status-pill`,children:r?.haStatus===`conectado`?(0,w.jsx)(`span`,{className:`pill-healthy`,children:`✓ HA Conectado`}):(0,w.jsx)(`span`,{className:`pill-warning`,children:`⚠️ HA Desconectado`})}),(0,w.jsxs)(`span`,{className:`settings-version-pill`,children:[`v`,r?.version||`1.5.76`]})]}),(0,w.jsx)(`h2`,{id:`settings-title`,children:`Ajustes del Servicio & Registros`})]})]})}),(0,w.jsxs)(`div`,{className:`settings-grid-layout`,children:[(0,w.jsxs)(`div`,{className:`settings-left-col`,children:[(0,w.jsxs)(`div`,{className:`settings-card-glass`,children:[(0,w.jsxs)(`div`,{className:`settings-card-title`,children:[(0,w.jsx)(`span`,{children:`📊`}),` Telemetría del Servicio`]}),(0,w.jsxs)(`div`,{className:`settings-telemetry-grid`,children:[(0,w.jsxs)(`div`,{className:`telemetry-item`,children:[(0,w.jsx)(`span`,{className:`telemetry-label`,children:`Servicio Bridge`}),(0,w.jsx)(`strong`,{className:`telemetry-value`,title:r?.bridgeName,children:r?.bridgeName||`Matter All-in-One`})]}),(0,w.jsxs)(`div`,{className:`telemetry-item`,children:[(0,w.jsx)(`span`,{className:`telemetry-label`,children:`Nodos Activos`}),(0,w.jsx)(`strong`,{className:`telemetry-value`,children:i?.exportedNodes??r?.exportedNodes??0})]}),(0,w.jsxs)(`div`,{className:`telemetry-item`,children:[(0,w.jsx)(`span`,{className:`telemetry-label`,children:`Emparejados`}),(0,w.jsx)(`strong`,{className:`telemetry-value text-green`,children:i?.pairedTotal??r?.commissionedNodes??0})]}),(0,w.jsxs)(`div`,{className:`telemetry-item`,children:[(0,w.jsx)(`span`,{className:`telemetry-label`,children:`Incidencias`}),(0,w.jsx)(`strong`,{className:`telemetry-value ${(i?.issues??0)>0?`text-amber`:`text-green`}`,children:i?.issues??0})]})]})]}),(0,w.jsxs)(`div`,{className:`settings-card-glass`,children:[(0,w.jsxs)(`div`,{className:`settings-card-title`,children:[(0,w.jsx)(`span`,{children:`📡`}),` Configuración MQTT (Auto-Discovery)`]}),(0,w.jsx)(`p`,{className:`settings-card-desc`,children:`Habilita la integración de dispositivos MQTT directamente en el ecosistema Matter.`}),(0,w.jsxs)(`div`,{className:`mqtt-form-grid`,children:[(0,w.jsxs)(`div`,{className:`input-group`,children:[(0,w.jsx)(`label`,{htmlFor:`mqtt-host`,children:`Broker IP / Host`}),(0,w.jsx)(`input`,{type:`text`,id:`mqtt-host`,placeholder:`ej. 192.168.110.147`,"aria-label":`MQTT Host`,className:`form-input`,value:a,onChange:e=>o(e.target.value)})]}),(0,w.jsxs)(`div`,{className:`input-group`,children:[(0,w.jsx)(`label`,{htmlFor:`mqtt-port`,children:`Puerto`}),(0,w.jsx)(`input`,{type:`number`,id:`mqtt-port`,placeholder:`1883`,"aria-label":`MQTT Port`,className:`form-input`,value:s,onChange:e=>c(Number(e.target.value))})]}),(0,w.jsxs)(`div`,{className:`input-group`,children:[(0,w.jsx)(`label`,{htmlFor:`mqtt-user`,children:`Usuario (opcional)`}),(0,w.jsx)(`input`,{type:`text`,id:`mqtt-user`,placeholder:`Usuario MQTT`,"aria-label":`MQTT User`,className:`form-input`,value:l,onChange:e=>u(e.target.value)})]}),(0,w.jsxs)(`div`,{className:`input-group`,children:[(0,w.jsx)(`label`,{htmlFor:`mqtt-pass`,children:`Contraseña (opcional)`}),(0,w.jsx)(`input`,{type:`password`,id:`mqtt-pass`,placeholder:`Contraseña`,"aria-label":`MQTT Password`,className:`form-input`,value:d,onChange:e=>f(e.target.value)})]})]}),(0,w.jsx)(`button`,{className:`button button-primary button-full`,id:`mqtt-save-button`,type:`button`,onClick:async()=>{m(!0);try{await x.saveMqttConfig({host:a,port:Number(s),username:l,password:d}),n(`✓ Configuración MQTT guardada`)}catch(e){n(e.message||`Error al guardar MQTT`,!0)}finally{m(!1)}},disabled:p,children:p?`Guardando...`:`💾 Guardar Configuración MQTT`})]}),(0,w.jsxs)(`div`,{className:`settings-card-glass`,children:[(0,w.jsxs)(`div`,{className:`settings-card-title`,children:[(0,w.jsx)(`span`,{children:`⚡`}),` Operaciones del Servicio`]}),(0,w.jsxs)(`div`,{className:`operations-row`,children:[(0,w.jsxs)(`div`,{children:[(0,w.jsx)(`strong`,{children:`Reiniciar servicio`}),(0,w.jsx)(`p`,{children:`Recarga el runtime y restablece conexiones activas.`})]}),(0,w.jsx)(`button`,{className:`button button-secondary`,id:`restart-button`,type:`button`,onClick:async()=>{if(confirm(`¿Deseas reiniciar el servicio de Matter All-in-One?`))try{await x.restartService(),n(`Reiniciando servicio...`),t()}catch(e){n(e.message||`Error al reiniciar servicio`,!0)}},children:`🔄 Reiniciar`})]})]}),(0,w.jsxs)(`div`,{className:`settings-card-glass danger-card`,children:[(0,w.jsxs)(`div`,{className:`settings-card-title danger-title`,children:[(0,w.jsx)(`span`,{children:`⚠️`}),` Zona de Mantenimiento Crítico`]}),(0,w.jsxs)(`div`,{className:`operations-row`,children:[(0,w.jsxs)(`div`,{children:[(0,w.jsx)(`strong`,{className:`text-red`,children:`Restablecimiento de fábrica`}),(0,w.jsx)(`p`,{children:`Elimina toda la configuración y obligará a volver a emparejar.`})]}),(0,w.jsx)(`button`,{className:`button button-danger`,id:`factory-reset-button`,type:`button`,onClick:async()=>{if(confirm(`¿Estás seguro de que deseas restablecer de fábrica el plugin? Se eliminarán todos los accesorios Matter y requerirá volver a emparejar.`))try{await x.factoryReset(),n(`Restablecimiento de fábrica iniciado...`),t()}catch(e){n(e.message||`Error al restablecer`,!0)}},children:`Restablecer`})]})]})]}),(0,w.jsx)(`div`,{className:`settings-right-col`,children:(0,w.jsxs)(`div`,{className:`glass-terminal-wrapper`,children:[(0,w.jsxs)(`div`,{className:`terminal-header`,children:[(0,w.jsxs)(`div`,{className:`terminal-header-title`,children:[(0,w.jsx)(`span`,{className:`terminal-dot red`}),(0,w.jsx)(`span`,{className:`terminal-dot yellow`}),(0,w.jsx)(`span`,{className:`terminal-dot green`}),(0,w.jsx)(`span`,{className:`terminal-title-text`,children:`REGISTROS DEL SISTEMA (CONSOLE LOGS)`})]}),(0,w.jsxs)(`div`,{className:`terminal-header-actions`,children:[(0,w.jsxs)(`label`,{className:`terminal-search-box`,children:[(0,w.jsx)(`span`,{children:`⌕`}),(0,w.jsx)(`input`,{type:`search`,placeholder:`Buscar en logs...`,value:C,onChange:e=>T(e.target.value)}),C&&(0,w.jsx)(`button`,{type:`button`,onClick:()=>T(``),className:`search-clear-btn`,title:`Borrar búsqueda`,children:`×`})]}),(0,w.jsx)(`button`,{className:`terminal-action-btn ${E?`active`:``}`,type:`button`,onClick:()=>D(!E),title:E?`Auto-scroll activado`:`Auto-scroll pausado`,children:E?`⬇ Auto-scroll`:`⏸ Pausado`}),(0,w.jsxs)(`button`,{className:`terminal-action-btn`,type:`button`,onClick:k,disabled:v,title:`Recargar registros`,children:[(0,w.jsx)(`span`,{className:v?`spin`:``,children:`↻`}),v?`Cargando…`:`Actualizar`]}),(0,w.jsx)(`button`,{className:`terminal-action-btn`,type:`button`,onClick:async()=>{try{let e=A.join(`
|
|
26
26
|
`);if(!e){n(`No hay registros para copiar`,!0);return}await Ae(e)?n(`✓ ${A.length} líneas copiadas al portapapeles`):n(`⚠️ No se pudo acceder al portapapeles`,!0)}catch(e){n(e.message||`Error al copiar logs`,!0)}},title:`Copiar registros visibles al portapapeles`,children:`📋 Copiar`}),(0,w.jsx)(`button`,{className:`terminal-action-btn btn-danger-subtle`,type:`button`,onClick:async()=>{if(confirm(`¿Deseas vaciar el historial de registros del Add-on?`))try{await x.clearLogs(),g([]),n(`✓ Registros del sistema vaciados`)}catch(e){n(e.message||`Error al vaciar logs`,!0)}},title:`Vaciar historial de logs del Add-on`,children:`🗑️ Limpiar`})]})]}),(0,w.jsxs)(`div`,{className:`terminal-filters-row`,children:[(0,w.jsxs)(`button`,{type:`button`,className:`filter-tab-pill ${b===`all`?`active`:``}`,onClick:()=>S(`all`),children:[`Todos `,(0,w.jsx)(`span`,{className:`pill-count`,children:ee.all})]}),(0,w.jsxs)(`button`,{type:`button`,className:`filter-tab-pill pill-error ${b===`error`?`active`:``}`,onClick:()=>S(`error`),children:[`❌ Errores `,(0,w.jsx)(`span`,{className:`pill-count`,children:ee.errors})]}),(0,w.jsxs)(`button`,{type:`button`,className:`filter-tab-pill pill-warn ${b===`warn`?`active`:``}`,onClick:()=>S(`warn`),children:[`⚠️ Advertencias `,(0,w.jsx)(`span`,{className:`pill-count`,children:ee.warns})]}),(0,w.jsxs)(`button`,{type:`button`,className:`filter-tab-pill pill-info ${b===`info`?`active`:``}`,onClick:()=>S(`info`),children:[`ℹ️ Info / Eventos `,(0,w.jsx)(`span`,{className:`pill-count`,children:ee.infos})]}),(0,w.jsxs)(`span`,{className:`terminal-status-counter`,children:[`Mostrando: `,(0,w.jsx)(`strong`,{children:A.length}),` de `,h.length]})]}),(0,w.jsx)(`div`,{className:`glass-terminal-body`,ref:O,children:A.length===0?(0,w.jsx)(`div`,{className:`terminal-empty-state`,children:v?(0,w.jsxs)(w.Fragment,{children:[(0,w.jsx)(`span`,{className:`spinner`}),(0,w.jsx)(`p`,{children:`Cargando registros del sistema…`})]}):(0,w.jsx)(`p`,{children:C?`No se encontraron registros que coincidan con "${C}".`:`No hay registros disponibles para este filtro.`})}):(0,w.jsx)(`div`,{className:`terminal-lines-list`,children:A.map((e,t)=>{let n=Le(e);return(0,w.jsxs)(`div`,{className:`terminal-line line-${n}`,children:[(0,w.jsx)(`span`,{className:`line-num`,children:t+1}),(0,w.jsx)(`span`,{className:`line-content`,children:e})]},t)})})})]})})]})]})}):null},ze=()=>{let{status:e,allDevices:t,cameras:n,cameraUiCameras:r,realHaCameraDevices:i,scryptedConfig:a,cameraUiConfig:o,loading:s,searchQuery:c,setSearchQuery:l,activeFilter:u,setActiveFilter:d,stats:f,toastMessage:p,showToast:m,refreshAll:h}=S(),[g,v]=(0,_.useState)(null),[y,b]=(0,_.useState)(null),[C,k]=(0,_.useState)(null),[ee,A]=(0,_.useState)(!1),[te,M]=(0,_.useState)(!1),[re,ie]=(0,_.useState)(!1),[ae,oe]=(0,_.useState)(!1);(0,_.useEffect)(()=>{if(!C)return;let e=t.find(e=>e.id===C.id);e&&k(e)},[t]),(0,_.useEffect)(()=>{if(!g)return;let e=n.find(e=>e.cameraId===g.cameraId);e&&v(e)},[n]),(0,_.useEffect)(()=>{if(!y)return;let e=r.find(e=>e.id===y.id);e&&b(e)},[r]);let se=(0,_.useMemo)(()=>{let e=t;if(c.trim()){let t=c.toLowerCase().trim();e=e.filter(e=>e.name.toLowerCase().includes(t)||e.manufacturer&&e.manufacturer.toLowerCase().includes(t)||e.model&&e.model.toLowerCase().includes(t)||e.area&&e.area.toLowerCase().includes(t)||e.entities.some(e=>e.name?.toLowerCase().includes(t)||e.entityId.toLowerCase().includes(t)))}let n=new Set(i.map(e=>e.id)),r=e.filter(e=>!n.has(e.id));switch(u){case`all`:return r;case`iot`:return r;case`cameras`:return[];case`paired`:return r.filter(e=>e.entities.some(e=>e.exported&&e.commissioned));case`unpaired`:return r.filter(e=>e.entities.some(e=>e.exported&&!e.commissioned));case`unactivated`:return r.filter(e=>!e.entities.some(e=>e.exported||e.commissioned));case`mqtt`:return r.filter(e=>e.entities.some(e=>e.origin===`mqtt`||e.entityId.startsWith(`mqtt.`)));case`issues`:return r.filter(e=>e.entities.some(e=>e.exported?e.hasIssue||e.state===`unavailable`||e.state===`unknown`||e.state===`offline`:!1));default:return r}},[t,i,c,u]),ce=(0,_.useMemo)(()=>{if(u===`iot`||u===`mqtt`)return[];let e=new Map,t=n;if(c.trim()){let e=c.toLowerCase().trim();t=t.filter(t=>t.name.toLowerCase().includes(e))}u===`paired`?t=t.filter(e=>e.identity?.homeKitPairingState===`paired`||e.bindingState?.matterCommissioned===!0):u===`unpaired`?t=t.filter(e=>!!e.identity?.matterPairingCode&&e.identity?.homeKitPairingState!==`paired`&&e.bindingState?.matterCommissioned!==!0):u===`unactivated`?t=t.filter(e=>e.identity?.homeKitPairingState!==`paired`&&e.bindingState?.matterCommissioned!==!0&&!e.identity?.matterPairingCode):u===`issues`&&(t=t.filter(e=>e.identity?.homeKitPairingState===`paired`||e.bindingState?.matterCommissioned===!0||e.identity?.matterPairingCode?e.status?.connection===`offline`||e.status?.isOnline===!1||!!e.status?.lastError||e.hasIssue===!0:!1));for(let n of t){let t=O(n);e.has(t)||e.set(t,{scrypted:[],ha:[],cui:[]}),e.get(t).scrypted.push(n)}let a=r;if(c.trim()){let e=c.toLowerCase().trim();a=a.filter(t=>t.name.toLowerCase().includes(e))}u===`paired`?a=a.filter(e=>e.isPaired===!0):u===`unpaired`?a=a.filter(e=>e.homeKitEnabled&&!e.isPaired):u===`unactivated`?a=a.filter(e=>!e.homeKitEnabled):u===`issues`&&(a=a.filter(e=>e.status===`offline`));for(let t of a){let n=O(t);e.has(n)||e.set(n,{scrypted:[],ha:[],cui:[]}),e.get(n).cui.push(t)}let o=i;if(c.trim()){let e=c.toLowerCase().trim();o=o.filter(t=>t.name.toLowerCase().includes(e))}u===`paired`?o=o.filter(e=>e.entities.some(e=>e.exported&&e.commissioned)):u===`unpaired`?o=o.filter(e=>e.entities.some(e=>e.exported&&!e.commissioned)):u===`unactivated`?o=o.filter(e=>!e.entities.some(e=>e.exported||e.commissioned)):u===`issues`&&(o=o.filter(e=>e.entities.some(e=>e.exported||e.commissioned)?e.entities.some(e=>e.hasIssue||e.state===`unavailable`||e.state===`unknown`||e.state===`offline`||Array.isArray(e.logs)&&e.logs.length>0&&e.exported):!1));for(let t of o){let n=O(t);e.has(n)||e.set(n,{scrypted:[],ha:[],cui:[]}),e.get(n).ha.push(t)}return[...e.keys()].sort((e,t)=>{let n=e.toLowerCase().includes(`no identificada`),r=t.toLowerCase().includes(`no identificada`);return n&&!r?1:!n&&r?-1:e.localeCompare(t,`es`,{sensitivity:`base`})}).map(t=>({brand:t,scrypted:e.get(t).scrypted,ha:e.get(t).ha,cui:e.get(t).cui}))},[u,n,r,i,c]),le=(0,_.useMemo)(()=>{let e=ce.reduce((e,t)=>e+t.scrypted.length+t.ha.length+t.cui.length,0);return se.length+e},[ce,se]),ue=(0,_.useCallback)(e=>{let t=e.entities.find(e=>e.domain===`camera`),n=(e.manufacturer||``).toLowerCase().includes(`google`)||(e.manufacturer||``).toLowerCase().includes(`nest`)||(e.name||``).toLowerCase().includes(`nest`)||!!t?.entityId.toLowerCase().includes(`nest`),r=e.entities.filter(e=>e.domain===`binary_sensor`).map(e=>({name:e.name||e.entityId,sensorId:e.entityId,type:e.entityId.includes(`doorbell`)||e.name?.toLowerCase().includes(`timbre`)?`doorbell`:`motion`,enabled:!0,state:e.state===`on`})),i=e.entities.filter(e=>e.domain===`binary_sensor`||e.domain===`light`||e.domain===`siren`||e.domain===`switch`||e.domain===`event`).map(e=>({id:e.entityId,domain:e.domain,name:e.name||e.entityId,type:e.entityId.includes(`doorbell`)||e.name?.toLowerCase().includes(`timbre`)?`doorbell`:e.domain===`light`?`light`:e.domain===`siren`?`siren`:e.domain===`switch`?`switch`:`motion`,state:e.state===`on`,matterExported:!!e.exported})),a=e.entities.some(e=>e.exported&&e.commissioned);return{cameraId:t?.entityId||e.id,name:e.name,manufacturer:e.manufacturer||(n?`Google`:`Home Assistant`),model:e.model||(n?`Nest Cam`:`Cámara IP`),serialNumber:e.id,status:{connection:`online`,isOnline:!0},sensors:r,realEntities:i,identity:{homeKitPairingState:a?`paired`:`not_paired`,homeKitSetupId:`HA01`,homeKitPincode:`031-45-154`},source:{streamReference:{directUrl:t?.stream_source||``}}}},[]);return(0,w.jsxs)(w.Fragment,{children:[(0,w.jsx)(`div`,{className:`ambient ambient-one`}),(0,w.jsx)(`div`,{className:`ambient ambient-two`}),(0,w.jsxs)(`div`,{className:`app-shell`,children:[(0,w.jsx)(T,{status:e,onOpenSettings:()=>ie(!0),onRestartService:async()=>{if(confirm(`¿Deseas reiniciar el servicio de Matter All-in-One?`))try{await x.restartService(),m(`Reiniciando servicio...`)}catch(e){m(e.message||`Error al reiniciar`,!0)}}}),(0,w.jsxs)(`main`,{className:`content`,children:[(0,w.jsxs)(`header`,{className:`content-header`,children:[(0,w.jsxs)(`div`,{children:[(0,w.jsxs)(`p`,{className:`eyebrow`,children:[(0,w.jsx)(`span`,{className:`eyebrow-pulse`,"aria-hidden":`true`}),`PUBLICACIÓN CONTROLADA`]}),(0,w.jsx)(`h2`,{children:`Tu espacio Matter`}),(0,w.jsx)(`p`,{className:`lead`,children:`Activa la entidad principal para publicar el dispositivo físico. Sus capacidades compatibles se integran como endpoints bajo un único código Matter.`})]}),(0,w.jsxs)(`label`,{className:`search`,htmlFor:`device-search`,children:[(0,w.jsx)(`span`,{"aria-hidden":`true`,children:`⌕`}),(0,w.jsx)(`input`,{id:`device-search`,type:`search`,placeholder:`Buscar dispositivo o habitación`,autoComplete:`off`,value:c,onChange:e=>l(e.target.value)})]})]}),(0,w.jsx)(E,{stats:f,activeFilter:u,onFilterChange:d,loading:s,onRefresh:h,filteredCount:le}),(0,w.jsx)(D,{activeFilter:u,stats:f,scryptedConfig:a,cameraUiConfig:o,onOpenScryptedModal:()=>A(!0),onOpenCameraUiModal:()=>M(!0),onSyncCameras:async()=>{oe(!0),m(`Sincronizando cámaras de Scrypted...`);try{let e=await x.syncCameras();m(`✓ Sincronización completada. ${e?.length||0} cámaras encontradas.`),h()}catch(e){m(e.message||`Error al sincronizar cámaras`,!0)}finally{oe(!1)}},isSyncing:ae}),(0,w.jsx)(`section`,{className:`device-grid`,id:`device-list`,"aria-live":`polite`,"aria-busy":s,children:s?(0,w.jsxs)(`div`,{className:`empty-state`,style:{gridColumn:`1 / -1`,textAlign:`center`,padding:40},children:[(0,w.jsx)(`span`,{className:`spinner`}),(0,w.jsx)(`p`,{children:`Cargando entidades de Home Assistant…`})]}):(0,w.jsxs)(w.Fragment,{children:[ce.map(e=>(0,w.jsx)(j,{brand:e.brand,scryptedCameras:e.scrypted,haCameras:e.ha,cameraUiCameras:e.cui,onConfigureCamera:e=>v(e),onConfigureHaDevice:e=>v(ue(e)),onConfigureCameraUiCamera:e=>b(e)},e.brand)),se.map(e=>(0,w.jsx)(ne,{device:e,searchQuery:c,onConfigure:()=>k(e)},e.id)),ce.length===0&&se.length===0&&(0,w.jsx)(`div`,{className:`empty-state`,style:{gridColumn:`1 / -1`,textAlign:`center`,padding:40},children:(0,w.jsx)(`p`,{children:u===`cameras`?`No se encontraron cámaras configuradas.`:u===`mqtt`?`No se encontraron dispositivos MQTT configurados.`:u===`paired`?`No hay accesorios vinculados en Matter ni en HAP todavía.`:u===`unpaired`?`No hay accesorios pendientes de emparejar (todos los accesorios activos ya están vinculados).`:u===`unactivated`?`No hay dispositivos inactivos disponibles.`:u===`issues`?`No hay incidencias registradas en este momento.`:`No hay dispositivos que coincidan con los filtros seleccionados.`})})]})})]})]}),(g||y)&&(0,w.jsx)(L,{camera:g||y,onClose:()=>{v(null),b(null)},onRefresh:h,showToast:m}),C&&(0,w.jsx)(Pe,{device:C,onClose:()=>k(null),onRefresh:h,showToast:m}),ee&&(0,w.jsx)(Fe,{config:a,onClose:()=>A(!1),onRefresh:h,showToast:m}),te&&(0,w.jsx)(Ie,{config:o,onClose:()=>M(!1),onRefresh:h,showToast:m}),(0,w.jsx)(Re,{isOpen:re,onClose:()=>ie(!1),showToast:m,status:e,stats:f}),p&&(0,w.jsx)(`div`,{className:`toast show${p.isError?` error`:``}`,role:`status`,"aria-live":`polite`,children:p.text})]})},Be=class extends _.Component{state={hasError:!1,error:null,errorInfo:null};static getDerivedStateFromError(e){return{hasError:!0,error:e,errorInfo:null}}componentDidCatch(e,t){console.error(`[ErrorBoundary] Uncaught render error:`,e,t),this.setState({errorInfo:t})}handleReload=()=>{window.location.reload()};handleClearCache=()=>{try{localStorage.clear(),sessionStorage.clear()}catch{}window.location.reload()};render(){return this.state.hasError?(0,w.jsx)(`div`,{style:{display:`flex`,flexDirection:`column`,alignItems:`center`,justifyContent:`center`,minHeight:`100vh`,padding:`24px`,background:`var(--bg, #09101f)`,color:`var(--text, #f2f6ff)`,fontFamily:`var(--font, system-ui, sans-serif)`,boxSizing:`border-box`},children:(0,w.jsxs)(`div`,{style:{maxWidth:580,width:`100%`,background:`rgba(20, 31, 53, 0.85)`,backdropFilter:`blur(20px)`,WebkitBackdropFilter:`blur(20px)`,border:`1px solid rgba(251, 132, 150, 0.35)`,borderRadius:16,padding:28,boxShadow:`0 16px 40px rgba(0,0,0,0.5)`,textAlign:`center`},children:[(0,w.jsx)(`div`,{style:{fontSize:44,marginBottom:12},children:`⚠️`}),(0,w.jsx)(`h2`,{style:{fontSize:20,margin:`0 0 8px 0`,color:`#fb8496`},children:`Error al cargar la interfaz`}),(0,w.jsx)(`p`,{style:{fontSize:13,color:`var(--muted, #9aa9c2)`,margin:`0 0 20px 0`},children:`Se produjo una excepción inesperada durante la inicialización visual. Puedes intentar recargar o restablecer los datos guardados en caché local.`}),this.state.error&&(0,w.jsxs)(`div`,{style:{textAlign:`left`,background:`rgba(0, 0, 0, 0.35)`,border:`1px solid rgba(255, 255, 255, 0.08)`,borderRadius:8,padding:12,marginBottom:20,maxHeight:180,overflowY:`auto`},children:[(0,w.jsxs)(`div`,{style:{fontSize:12,fontWeight:700,color:`#fca5a5`},children:[this.state.error.name,`: `,this.state.error.message]}),this.state.error.stack&&(0,w.jsx)(`pre`,{style:{fontSize:10,color:`rgba(255, 255, 255, 0.6)`,margin:`8px 0 0 0`,whiteSpace:`pre-wrap`,wordBreak:`break-all`},children:this.state.error.stack})]}),(0,w.jsxs)(`div`,{style:{display:`flex`,gap:12,justifyContent:`center`,flexWrap:`wrap`},children:[(0,w.jsx)(`button`,{onClick:this.handleReload,style:{padding:`10px 18px`,borderRadius:8,background:`linear-gradient(135deg, #3b82f6, #2563eb)`,color:`#ffffff`,border:`none`,fontSize:13,fontWeight:600,cursor:`pointer`},children:`↻ Recargar interfaz`}),(0,w.jsx)(`button`,{onClick:this.handleClearCache,style:{padding:`10px 18px`,borderRadius:8,background:`rgba(255, 255, 255, 0.08)`,color:`var(--text, #f2f6ff)`,border:`1px solid rgba(255, 255, 255, 0.15)`,fontSize:13,fontWeight:600,cursor:`pointer`},children:`🧹 Limpiar caché local`})]})]})}):this.props.children}};window.addEventListener(`error`,e=>{console.error(`[Window Error]`,e.error||e.message)}),window.addEventListener(`unhandledrejection`,e=>{console.error(`[Unhandled Promise Rejection]`,e.reason)});var Ve=document.getElementById(`root`);Ve&&(0,v.createRoot)(Ve).render((0,w.jsx)(_.StrictMode,{children:(0,w.jsx)(Be,{children:(0,w.jsx)(ze,{})})}));
|
package/dist/frontend/index.html
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
6
6
|
<title>Matter All-in-One (Chrisalvir)</title>
|
|
7
7
|
<link rel="icon" type="image/png" href="./assets/logo-B_gEBugV.png" />
|
|
8
|
-
<script type="module" crossorigin src="./assets/index-
|
|
8
|
+
<script type="module" crossorigin src="./assets/index-BkucCndp.js"></script>
|
|
9
9
|
<link rel="stylesheet" crossorigin href="./assets/index-DalMl4eS.css">
|
|
10
10
|
</head>
|
|
11
11
|
<body>
|
package/dist/platform.js
CHANGED
|
@@ -1662,7 +1662,7 @@ export class HomeAssistantPlatform extends MatterbridgeDynamicPlatform {
|
|
|
1662
1662
|
const mbVersion = String(this.matterbridge?.matterbridgeVersion ?? "unknown");
|
|
1663
1663
|
this.log.notice(`[Runtime] Matterbridge runtime: ${mbVersion}`);
|
|
1664
1664
|
this.log.notice(`[Runtime] Node.js runtime: ${process.version}`);
|
|
1665
|
-
this.log.notice(`[Runtime] Plugin version: 1.8.
|
|
1665
|
+
this.log.notice(`[Runtime] Plugin version: 1.8.35`);
|
|
1666
1666
|
await this.loadEntityDiagnostics();
|
|
1667
1667
|
await this.startUiServer();
|
|
1668
1668
|
this.startMatterConnectionMonitor();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "matter-all-in-one-addon",
|
|
3
|
-
"version": "1.8.
|
|
3
|
+
"version": "1.8.35",
|
|
4
4
|
"description": "Matterbridge all-in-one addon with local storage, web UI and Home Assistant Ingress support with complete Scrypted, BLE, Smart Dimmers, Vacuum, AC, Climate, Lock and Multi-Platform ecosystem compatibility",
|
|
5
5
|
"author": "chrisalvir",
|
|
6
6
|
"license": "Apache-2.0",
|