@camstack/addon-pipeline-orchestrator 1.2.287 → 1.2.288

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.
@@ -96,15 +96,15 @@ __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{v
96
96
  __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.describeRunningBundle=u,e.buildVersionRows=function(t){const l={id:'app',value:n(t.configVersion)};return!1===t.nativeBinary?[l]:[l,{id:'build',value:n(t.nativeBuildNumber)},{id:'runtime',value:n(t.runtimeVersion)},{id:'update',value:u(t)}]};const t='\u2014',n=n=>null!=n&&''!==n?n:t;function u(n){if(!1===n.updatesEnabled)return'dev';if(!0===n.isEmbeddedLaunch)return'embedded';if(null===n.updateId||void 0===n.updateId||''===n.updateId)return t;const u=n.updateId.slice(0,8),o=n.updateCreatedAt;return!o||Number.isNaN(o.getTime())?u:`${u} \xb7 ${l(o)}`}function l(t){const n=t=>String(t).padStart(2,'0');return`${t.getFullYear()}-${n(t.getMonth()+1)}-${n(t.getDate())} ${n(t.getHours())}:${n(t.getMinutes())}`}},943,[]);
97
97
  __d(function(g,_r,_i,_a,m,e,_d){"use strict";function t(t,n){const r=t.split('.').map(t=>Number.parseInt(t,10)||0),i=n.split('.').map(t=>Number.parseInt(t,10)||0);for(let t=0;t<Math.max(r.length,i.length);t++){const n=(r[t]??0)-(i[t]??0);if(0!==n)return n<0?-1:1}return 0}Object.defineProperty(e,'__esModule',{value:!0}),e.isNativeRelease=function(t){if('object'!=typeof t||null===t)return!1;const n=t;return'string'==typeof n.version&&'number'==typeof n.buildNumber&&'string'==typeof n.runtimeVersion&&('testflight'===n.channel||'appstore'===n.channel||'play'===n.channel)&&'string'==typeof n.publishedAt},e.compareVersions=t,e.nativeReleaseState=function(n,r){return r&&n.version&&null!==n.buildNumber&&void 0!==n.buildNumber?r.buildNumber>n.buildNumber||t(r.version,n.version)>0?'newer-available':'up-to-date':'unknown'},e.storeUrlFor=function(t,n,r){if('ios'===n)return'testflight'===t.channel?'itms-beta://':t.storeAppId?`itms-apps://apps.apple.com/app/id${t.storeAppId}`:null;return'android'===n?`market://details?id=${r}`:null},e.nativeReleasePath=function(t){return`${t.replace(/\/+$/,'')}/viewer/camstack/native-release.json`}},944,[]);
98
98
  __d(function(g,r,i,a,m,_e,_d){"use strict";Object.defineProperty(_e,'__esModule',{value:!0}),_e.publishRunningBundle=function(){(0,d.setRunningBundle)({version:t.default.expoConfig?.version??null,bundle:(0,o.describeRunningBundle)({runtimeVersion:u.runtimeVersion,updateId:u.updateId,updateCreatedAt:u.createdAt,isEmbeddedLaunch:u.isEmbeddedLaunch,updatesEnabled:u.isEnabled})})},_e.runningBuildNumber=function(){const e=t.default.platform?.ios?.buildNumber;if('string'==typeof e&&''!==e){const n=Number.parseInt(e,10);return Number.isFinite(n)?n:null}const n=t.default.platform?.android?.versionCode;return'number'==typeof n?n:null};var e,n=r(_d[0]),t=(e=n)&&e.__esModule?e:{default:e},u=(function(e){if(e&&e.__esModule)return e;var n={};return e&&Object.keys(e).forEach(function(t){var u=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(n,t,u.get?u:{enumerable:!0,get:function(){return e[t]}})}),n.default=e,n})(r(_d[1])),d=r(_d[2]),o=r(_d[3])},945,[520,942,1278,943]);
99
- __d(function(g,r,i,a,m,_e,d){"use strict";Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"WHATS_NEW",{enumerable:!0,get:function(){return e}}),_e.whatsNewHistory=function(n){const t=o(n);return{latest:t,past:e.filter(e=>e!==t)}},_e.whatsNewFor=o,_e.whatsNewLines=function(e,o){const n=o.toLowerCase().startsWith('it')?'it':'en',t=e.notes[n];return t.length>0?t:e.notes.en},_e.shouldShowWhatsNew=function(e,n){return!!n&&(e!==n&&null!==o(n))};const e=[{version:'1.0.586',date:'2026-10-06',notes:{en:['Playback controls no longer overlap; the speed menu opens on top.','Sign-in names a wrong or non-CamStack address right away.'],it:['I controlli di riproduzione non si sovrappongono; il menu velocit\xe0 si apre sopra.',"L'accesso segnala subito un indirizzo errato o non CamStack."]}},{version:'1.0.585',date:'2026-10-06',notes:{en:['The Motion order now follows real motion on every camera.','The motion border lights up again from live events.','New system notifications: node restarting and node updating.'],it:["L'ordine Motion ora segue la motion reale di ogni telecamera.",'Il bordo motion torna ad accendersi con gli eventi live.','Nuove notifiche di sistema: nodo in riavvio e nodo in aggiornamento.']}},{version:'1.0.584',date:'2026-10-06',notes:{en:['The web app opens faster and loads camera tiles quicker.','Enter signs you in; an unreachable server now says so.','Addon updates have their own system-notification group.'],it:["L'app web si apre e carica le anteprime pi\xf9 in fretta.",'Invio fa il login; un server irraggiungibile ora lo dice.','Gli aggiornamenti addon hanno un gruppo di notifiche tutto loro.']}},{version:'1.0.583',date:'2026-10-06',notes:{en:['Cameras can be sorted by latest motion.','Switch between saved servers in Settings, no sign-out needed.','Alarm settings drop the recipients list: alarm rules decide who is told.'],it:['Le telecamere si possono ordinare per ultimo movimento.','Passa da un server salvato all\u2019altro in Impostazioni, senza uscire.','Le impostazioni allarme perdono i destinatari: decidono le regole allarme.']}},{version:'1.0.582',date:'2026-10-04',notes:{en:['Stream quality chip shows the tier you picked.','Quality button no longer shows a down arrow.'],it:['Il chip qualit\xe0 mostra il livello che hai scelto.','Il pulsante qualit\xe0 non ha pi\xf9 la freccia verso il basso.']}},{version:'1.0.580',date:'2026-10-04',notes:{en:['Chosen stream quality sticks after a camera swap.','Exiting fullscreen returns the phone to portrait.','Timeline toolbar no longer wraps onto a second line.'],it:['La qualit\xe0 stream scelta resta dopo un cambio camera.','Uscendo dal fullscreen il telefono torna in verticale.','La toolbar della timeline non va pi\xf9 a capo.']}},{version:'1.0.579',date:'2026-10-03',notes:{en:['Away from home, playback always uses the lowest stream quality.'],it:['Fuori rete locale, la riproduzione usa sempre la qualit\xe0 pi\xf9 bassa.']}},{version:'1.0.578',date:'2026-10-03',notes:{en:['Event seek opens on the exact moment.','Timeline duration menu stays above its chip.','Date picker is shorter, with a Today row.'],it:['Il seek evento apre sull\u2019istante esatto.','Il menu durata resta sopra il chip.','Il selettore data \xe8 pi\xf9 basso, con la riga Oggi.']}},{version:'1.0.577',date:'2026-10-02',notes:{en:['Timeline Auto zoom follows scrub speed; slow tightens to 15 minutes.','The time-range menu includes Auto and 15 minutes.'],it:['Zoom Auto della timeline segue la velocit\xe0 di scrub; lento stringe a 15 minuti.','Il menu durata include Auto e 15 minuti.']}},{version:'1.0.576',date:'2026-10-02',notes:{en:['Filter menus open again after the timeline range fix.'],it:['I menu filtro si riaprono dopo il fix della durata timeline.']}},{version:'1.0.575',date:'2026-10-02',notes:{en:['Timeline opens on 30 minutes.','An event opens 10 seconds before it.','The time-range menu opens above the chip.'],it:['La timeline si apre su 30 minuti.','Un evento apre 10 secondi prima.','Il menu della durata si apre sopra il chip.']}},{version:'1.0.574',date:'2026-10-02',notes:{en:['Rules: Immediate, grouped waits for subjects and sends one mosaic.'],it:['Regole: Immediata raggruppata attende i soggetti e invia un mosaico.']}},{version:'1.0.573',date:'2026-10-02',notes:{en:['Alarm: opens on the first mode that checks a sensor.'],it:['Allarme: si apre sulla prima modalit\xe0 che controlla dei sensori.']}},{version:'1.0.572',date:'2026-10-02',notes:{en:['Alarm: pick a mode at the top; each mode is one short summary, its delays and its sensors sorted by name.'],it:['Allarme: scegli la modalit\xe0 in alto; ogni modalit\xe0 mostra un riepilogo breve, i suoi ritardi e i sensori in ordine di nome.']}},{version:'1.0.571',date:'2026-10-02',notes:{en:['Alarm: each mode lists only the sensors its rules cover, in the same table, rows and fields as the rest of the app.'],it:["Allarme: ogni modalit\xe0 elenca solo i sensori coperti dalle sue regole, con la stessa tabella, righe e campi del resto dell'app."]}},{version:'1.0.570',date:'2026-10-02',notes:{en:['Alarm: exit, entry and siren delays can be set per arm mode (unset modes keep the default).','Alarm: each mode lists its sensors in a table with their state and a switch to stop a sensor from blocking the arm.','Device picker: filter by device type, area and location, with a button to reset the filters.'],it:['Allarme: i ritardi di uscita, ingresso e sirena si impostano per modalit\xe0 (senza valore vale il default).','Allarme: ogni modalit\xe0 elenca i sensori in una tabella con lo stato e uno switch per non bloccare l\'inserimento.','Selezione dispositivi: filtri per tipo, area e posizione, con un pulsante per azzerarli.']}},{version:'1.0.569',date:'2026-10-01',notes:{en:['A scheduled system summary can be sent as one notification per category (offline devices, batteries, consumables, ...).','Testing a summary rule now sends the current summary.'],it:['Il riepilogo programmato di sistema pu\xf2 arrivare come una notifica per categoria (dispositivi offline, batterie, consumabili, ...).','Il test di una regola di riepilogo ora invia il riepilogo attuale.']}},{version:'1.0.568',date:'2026-10-01',notes:{en:['Deleting a rule asks for confirmation in the standard dialog.'],it:["L'eliminazione di una regola chiede conferma con la finestra standard."]}},{version:'1.0.567',date:'2026-10-01',notes:{en:['A person who steps out of frame for a few seconds stays the same track.','A track fused into another still opens from its old link.','Rule editor: the Advanced section is unified across rule kinds.','Cooldown defaults to separate windows per class.','Sensor rules attach one snapshot, not a choice of media.','The device picker lists only devices the rule kind can target.'],it:["Una persona che esce dall'inquadratura per pochi secondi resta la stessa traccia.","Una traccia fusa in un'altra si apre ancora dal suo vecchio collegamento.",'Editor regole: la sezione Avanzate \xe8 unificata per ogni tipo di regola.','Il cooldown usa di default finestre separate per classe.',"Le regole sui sensori allegano un'unica foto, senza scelta del media.",'Il selettore dispositivi mostra solo quelli compatibili con la regola.']}},{version:'1.0.566',date:'2026-10-01',notes:{en:['Rules are sorted by name, and tapping anywhere on a rule opens it.','A Snooze switch on each rule silences it for 30 minutes.','Deleting a rule asks for confirmation right on the button.','Rule conditions are all shown; source and zone crossing moved to Advanced.','Faces, zones and labels use the same Only / All except picker as classes.','Zones are listed as "camera:zone", from every camera.','Zone crossing: Entering, Leaving or Either \u2014 Entering by default.','New detection rules watch the pipeline; sounds are no longer offered as classes.','Device and scene states are shown as readable words.'],it:['Le regole sono ordinate per nome e un tocco ovunque sulla regola la apre.','Un interruttore Silenzia su ogni regola la silenzia per 30 minuti.','Eliminare una regola chiede conferma direttamente sul pulsante.','Le condizioni sono tutte visibili; sorgente e attraversamento zona sono in Avanzate.','Volti, zone ed etichette usano lo stesso selettore delle classi.','Le zone sono elencate come "camera:zona", da tutte le camere.','Attraversamento zona: In entrata, In uscita o Entrambe \u2014 In entrata di default.','Le nuove regole di rilevamento usano la pipeline; i suoni non sono pi\xf9 tra le classi.','Gli stati di dispositivi e scene sono mostrati in parole leggibili.']}},{version:'1.0.565',date:'2026-09-29',notes:{en:['The "Groups" view is gone from the timeline, Events and the Recent reel: they always list subjects now.','Summary rules no longer offer "one line is a group"; a rule that had it now lists subjects.'],it:['La vista \xabGruppi\xbb \xe8 stata rimossa da timeline, Eventi e striscia Recenti: ora mostrano sempre i soggetti.','Le regole di riepilogo non offrono pi\xf9 \xabuna riga \xe8 un gruppo\xbb; una regola che lo usava ora elenca i soggetti.']}},{version:'1.0.564',date:'2026-09-26',notes:{en:['Device and system rules can send a scheduled summary instead of one notification per event.','Summary rules show their send times in the list, e.g. "Summary \xb7 daily 08:00".','Semantic search in Events uses the server\'s own score threshold unless you set one.','On a server that does not support summaries yet, the app says the rule stayed instant and keeps its active hours.'],it:['Le regole dei dispositivi e di sistema possono inviare un riepilogo pianificato invece di una notifica per evento.','Le regole di riepilogo mostrano gli orari di invio nell\'elenco, ad es. "Riepilogo \xb7 ogni giorno 08:00".','La ricerca semantica negli Eventi usa la soglia di punteggio del server, salvo che tu ne imposti una.','Su un server che non supporta ancora i riepiloghi, l\'app avvisa che la regola \xe8 rimasta immediata e ne conserva le fasce orarie.']}},{version:'1.0.563',date:'2026-09-26',notes:{en:['Sensor rules now pick from your sensors, not cameras.',"A rule's overview lists the devices it is active on.",'Selected devices are always all shown, with no "show more".','The "off" note is gone where the switch already says it.'],it:['Le regole dei sensori ora scelgono tra i sensori, non tra le camere.','La panoramica di una regola elenca i dispositivi su cui \xe8 attiva.','I dispositivi selezionati sono sempre tutti visibili, senza "mostra altri".','Niente pi\xf9 scritta "disattivata" dove c\'\xe8 gi\xe0 l\'interruttore.']}},{version:'1.0.562',date:'2026-09-26',notes:{en:['Device rules can set their own consumable threshold (1\u201395 %).','Robot vacuum tank alerts: tank low, tank full, back to normal.'],it:['Le regole dei dispositivi possono avere una propria soglia dei consumabili (1\u201395 %).','Avvisi dei serbatoi del robot: serbatoio basso, pieno, tornato normale.']}},{version:'1.0.561',date:'2026-09-26',notes:{en:['Rules: pick All, Only these or All except these for devices and classes, with a smarter class picker.','Sensor rules can notify only when a sensor triggers, or only when it clears.','Each rule shows its last run; tap it for the delivery history (admins).','Rule cards keep the name readable, with the switch, Edit and Delete on one row.','The device picker groups by zone, location or not at all.'],it:['Regole: scegli Tutti, Solo questi o Tutti tranne questi per dispositivi e classi, con un selettore classi migliore.','Le regole dei sensori possono notificare solo quando il sensore scatta, o solo quando rientra.',"Ogni regola mostra l'ultima esecuzione; toccala per lo storico degli invii (admin).",'Le schede delle regole mostrano sempre il nome, con interruttore, Modifica ed Elimina su una riga.','Il selettore dispositivi raggruppa per zona, posizione o nessuno.']}},{version:'1.0.560',date:'2026-09-26',notes:{en:['System alerts are now three rule kinds: device events, system and alarm, each with its own settings.','System rules pick nodes and packages from a list instead of typed names.','A rule that mixes families is shown read-only, marked to recreate.'],it:['Gli avvisi di sistema sono ora tre tipi di regola: eventi dispositivi, sistema e allarme.','Le regole di sistema scelgono nodi e pacchetti da un elenco, non pi\xf9 a testo libero.','Una regola che mescola famiglie \xe8 in sola lettura, segnata da ricreare.']}},{version:'1.0.559',date:'2026-09-26',notes:{en:['Sensor rules can send one mosaic of every linked camera, or one picture per camera.','Clip thumbnails load one at a time per camera and no longer hammer it with retries.','PTZ Home is greyed out when the camera has no home position set.'],it:['Le regole dei sensori inviano un mosaico di tutte le camere collegate, o una foto per camera.','Le anteprime delle clip arrivano una alla volta per camera, senza raffiche di tentativi.','Il tasto PTZ "posizione iniziale" \xe8 disattivato se la camera non ne ha una impostata.']}},{version:'1.0.558',date:'2026-09-25',notes:{en:['Live quality now climbs on a good connection instead of staying stuck on low.','Rules for batteries and consumables have their own section.','System-event rules can exclude devices.','A new compact device picker, with search and groups.',"The alarm's non-blocking list offers every door, window and lock."],it:['La qualit\xe0 live ora sale con una buona connessione invece di restare su bassa.','Le regole per batterie e consumabili hanno una sezione dedicata.','Le regole sugli eventi di sistema possono escludere dispositivi.','Un nuovo selettore di dispositivi compatto, con ricerca e gruppi.',"La lista non bloccante dell'allarme propone ogni porta, finestra e serratura."]}},{version:'1.0.557',date:'2026-09-25',notes:{en:['Rules are edited per kind, on their own screens, like the admin UI.','Text fields offer the placeholders of that rule: tap to insert, with a live preview.','Timelapse and summary rules expose every field; admins can test a rule from the phone.','A device that no longer exists shows as "removed" and can be deselected.','Alarm: every mode, what is open when arming is refused, and Arm anyway for admins.','Disarm is always available, and admins can configure the alarm from the phone.'],it:['Le regole si modificano per tipo, su schermate dedicate, come nell\'admin UI.','I campi di testo propongono i segnaposto della regola: tocca per inserire, con anteprima.','Timelapse e riepiloghi hanno tutti i campi; gli admin possono provare una regola dal telefono.','Un dispositivo che non esiste pi\xf9 appare come "rimosso" e si pu\xf2 togliere.','Allarme: tutte le modalit\xe0, cosa \xe8 aperto quando \xe8 rifiutato, e Arma comunque per gli admin.','Disarma \xe8 sempre disponibile, e gli admin configurano l\'allarme dal telefono.']}},{version:'1.0.556',date:'2026-09-24',notes:{en:['A camera function with a warning now shows whether it is ON \u2014 the privacy mask could never look enabled.'],it:['Una funzione con un avviso ora mostra se \xe8 ACCESA: la privacy mask non poteva mai sembrarlo.']}},{version:'1.0.555',date:'2026-09-24',notes:{en:['A shutter on its way up or down makes the button you pressed pulse.'],it:['Una tapparella che sta salendo o scendendo fa pulsare il tasto che hai premuto.']}},{version:'1.0.554',date:'2026-09-24',notes:{en:['Closing clip mode returns to the recording at the moment the clip was at.','The privacy-mask switch no longer looks locked when the camera has no zone drawn.'],it:['Chiudendo la modalit\xe0 clip si torna alla registrazione nel punto in cui era la clip.',"L'interruttore della privacy mask non sembra pi\xf9 bloccato quando la camera non ha zone disegnate."]}},{version:'1.0.553',date:'2026-09-24',notes:{en:['Recordings read the source each camera is set to, and you can pick it per camera.','The camera reel says it is loading instead of looking like you own one camera.'],it:['Le registrazioni leggono la sorgente impostata per ogni camera, e la scegli tu camera per camera.','La striscia delle camere dice che sta caricando, invece di sembrare che ne hai una sola.']}},{version:'1.0.552',date:'2026-09-24',notes:{en:['A clip the camera cut short now says so, with how much arrived.'],it:['Una clip che la camera ha troncato ora lo dice, e quanto ne \xe8 arrivato.']}},{version:'1.0.551',date:'2026-09-24',notes:{en:['A clip silent because of the speed now says so, on the speaker.','Recorded playback reaches 8\xd7.'],it:['Una clip muta per via della velocit\xe0 ora lo dice, sull\u2019altoparlante.','La riproduzione delle registrazioni arriva a 8\xd7.']}},{version:'1.0.550',date:'2026-09-23',notes:{en:['Renaming a linked device is a field in the row now, and no longer hangs the app.'],it:['Rinominare un dispositivo collegato si fa nella riga, e non blocca pi\xf9 l\u2019app.']}},{version:'1.0.549',date:'2026-09-23',notes:{en:['Turning the sound back on now really turns it back on, clips included.'],it:['Riaccendere l\u2019audio ora lo riaccende davvero, clip comprese.']}},{version:'1.0.548',date:'2026-09-23',notes:{en:['In a linked device\u2019s edit mode, the name now looks tappable \u2014 it always was.'],it:['Nella modifica di un dispositivo collegato il nome ora si vede che si tocca.']}},{version:'1.0.547',date:'2026-09-23',notes:{en:['A clip now repeats when it ends. There is a loop switch beside the transport.','A clip that simply finished no longer looks like a fault.'],it:['Una clip ora si ripete alla fine. L\u2019interruttore \xe8 accanto ai comandi.','Una clip che \xe8 semplicemente finita non sembra pi\xf9 un errore.']}},{version:'1.0.546',date:'2026-09-23',notes:{en:['Tapping a clip brings it to the middle of the timeline.','Reolink clips play again \u2014 the camera was being asked with the wrong handle.'],it:['Toccare una clip la porta al centro della linea del tempo.','Le clip Reolink ripartono: chiedevamo alla camera con la maniglia sbagliata.']}},{version:'1.0.545',date:'2026-09-23',notes:{en:['The cursor moves as you drag away from live, not when you let go.','The speed menu lists only the speeds your camera has, with no note.','A camera recorded on events opens on its clips.'],it:['Il cursore si sposta mentre trascini via dal live, non quando lasci.','Il menu velocit\xe0 elenca solo quelle che la camera ha, senza scritte.','Una camera registrata a eventi si apre sulle sue clip.']}},{version:'1.0.544',date:'2026-09-23',notes:{en:['Tapping a clip sends one command to the camera instead of two.'],it:['Toccare una clip manda un comando solo alla camera invece di due.']}},{version:'1.0.543',date:'2026-09-23',notes:{en:['The cursor now slides between its two positions instead of jumping there.','Hikvision clips no longer stop after a few seconds.'],it:['Il cursore ora scivola fra le sue due posizioni invece di saltarci.','Le clip Hikvision non si fermano pi\xf9 dopo qualche secondo.']}},{version:'1.0.542',date:'2026-09-23',notes:{en:['Away from live the cursor sits mid-screen, so a cluster you tap fits on it.','Previous updates are tucked behind one panel, leaving the newest room to breathe.'],it:['Lontano dal live il cursore sta a met\xe0 schermo, cos\xec il cluster che tocchi ci sta tutto.','Gli aggiornamenti precedenti stanno dietro un pannello, e il pi\xf9 recente ha spazio.']}},{version:'1.0.541',date:'2026-09-23',notes:{en:['While a clip plays the timeline stays put: no cursor, and scrolling does nothing.','Scrolling to the top of a clip list no longer jumps you back to live.'],it:['Mentre una clip gira la linea del tempo sta ferma: niente cursore, e scorrere non fa nulla.','Scorrere in cima a una lista di clip non ti riporta pi\xf9 al live.']}},{version:'1.0.540',date:'2026-09-23',notes:{en:['The oldest clips can be scrolled under the cursor again.','The cursor reads the clip on the frame, not a time it is not at.','The timeline follows the clip that is playing; drag it and it lets go.'],it:['Le clip pi\xf9 vecchie si possono di nuovo portare sotto il cursore.','Il cursore legge la clip nel riquadro, non un orario che non le appartiene.','La linea del tempo segue la clip in riproduzione; se la trascini, si sgancia.']}},{version:'1.0.539',date:'2026-09-23',notes:{en:['The timeline follows the clip that is playing, and stops when you drag it.','Speeds a camera cannot really do are greyed out instead of pretending.','Download now asks which quality, and the file lands in your exports.','A clip you have not seen before gets a picture, taken from its middle.','Clips that would not start on the studio and laundry cameras now do.'],it:['La linea del tempo segue la clip in riproduzione e si ferma se la trascini.','Le velocit\xe0 che una telecamera non sa fare sono spente invece di fingere.','Il download ora chiede la qualit\xe0, e il file finisce nelle esportazioni.','Una clip mai vista prima ora ha una foto, presa dal suo centro.','Le clip che non partivano su studio e lavanderia adesso partono.']}},{version:'1.0.538',date:'2026-09-23',notes:{en:['A camera that just woke no longer shows its old sleeping snapshot.','The speed menu opens upward, so it no longer covers the clip track.','Clip controls now offer only what the camera can really do.','Tapping anywhere outside a grid panel closes it.'],it:['Una telecamera appena sveglia non mostra pi\xf9 la vecchia foto di quando dormiva.','Il menu della velocit\xe0 si apre verso l\u2019alto e non copre pi\xf9 la barra della clip.','I comandi delle clip offrono solo ci\xf2 che la telecamera sa fare davvero.','Toccando fuori da un pannello della griglia, il pannello si chiude.']}},{version:'1.0.537',date:'2026-09-22',notes:{en:['A clip tapped while the player is starting now plays, instead of the live view.'],it:['Una clip toccata mentre il player sta partendo adesso parte davvero, invece del live.']}},{version:'1.0.536',date:'2026-09-22',notes:{en:['One devices panel everywhere, with the camera functions under it.','Edit that panel: reorder, rename, re-icon, hide, and add your own devices.','Linked devices are now edited in the admin UI, not here.','The privacy-mask switch works with no zones drawn.','A clip\u2019s progress bar no longer snaps forward when dragged back.','157 icons to choose from, with search.'],it:['Un solo pannello dispositivi ovunque, con sotto le funzioni della telecamera.','Modifica quel pannello: riordina, rinomina, cambia icona, nascondi e aggiungi dispositivi tuoi.','I dispositivi collegati si modificano dall\u2019interfaccia admin, non pi\xf9 da qui.','L\u2019interruttore della maschera privacy funziona anche senza zone disegnate.','La barra di una clip non scatta pi\xf9 in avanti se la trascini indietro.','157 icone fra cui scegliere, con ricerca.']}},{version:'1.0.535',date:'2026-09-22',notes:{en:['Clips start faster. When a camera\u2019s list comes up, the hub now fetches its newest few clips in the background, so the first ones you open are already there \u2014 on a hub camera that was a 6\u20138 s wait per clip, now a fraction of a second. Never on a battery camera that would have to wake for it.','Opening a clip now shows that it is loading: the ring around the play button turns while the file is being fetched and stops when it plays. Before, the frame just sat there until the clip appeared.','The quality badge by the play button now works on the web too. It used to show only in the app.','A live recording in progress stops when you open a clip, and asks whether to keep what it captured. It used to keep recording the clip as if it were the live picture.','Tapping a clip plays the clip. It used to start the live view instead: the command was sent once, at the tap, and the player is created BY that tap \u2014 so it arrived before there was anything to receive it, and what came up was the live edge. Previous/next clip fell in the same hole, which is why they appeared to do nothing.'],it:['Le clip partono pi\xf9 in fretta. Quando compare la lista di una telecamera, l\u2019hub scarica in sottofondo le sue clip pi\xf9 recenti, cos\xec le prime che apri sono gi\xe0 pronte \u2014 su una telecamera dell\u2019hub erano 6\u20138 s di attesa a clip, ora una frazione di secondo. Mai su una telecamera a batteria che dovrebbe svegliarsi per farlo.','Aprire una clip adesso mostra che sta caricando: l\u2019anello attorno al tasto play gira mentre il file viene scaricato e si ferma quando parte. Prima il riquadro restava fermo finch\xe9 la clip non compariva.','Il badge della qualit\xe0 accanto al tasto play adesso funziona anche sul web. Prima compariva solo nell\u2019app.','Una registrazione live in corso si ferma quando apri una clip, e chiede se tenere quanto catturato. Prima continuava a registrare la clip come se fosse il live.','Toccare una clip riproduce la clip. Prima partiva il live: il comando veniva inviato una volta sola, al tocco, e il player nasce PROPRIO da quel tocco \u2014 quindi arrivava prima che ci fosse qualcosa ad ascoltarlo, e a schermo veniva il live. Clip precedente/successiva cadevano nello stesso buco, ed \xe8 per questo che sembravano non fare nulla.']}},{version:'1.0.534',date:'2026-09-22',notes:{en:['A clip in the frame now shows where you are inside it: a position track under the transport, with the file\u2019s real length once the hub has measured it, and a drag along it that seeks inside the clip. While the length is not known yet the track says so instead of pretending the file is empty.','Go live now really leaves the clip \u2014 the frame goes back to the live view (or the poster, on a battery camera). Previous/next still keep you in the list.','Play/pause on a clip is the clip\u2019s own pause. Opened from the live edge, it used to run the live pause instead, which took the player down and the clip with it.','Seeking inside a clip stays inside the clip. A release used to land on the recorder\u2019s footage at a nonsense moment and the file was gone.','A clip in the frame now keeps its controls. Play/pause, speed, frame-step, previous/next clip and Go live are all there \u2014 before, opening a clip took the whole bar away, because the bar was asking whether the picture was live and a clip leaves the session exactly where it was.','A camera whose current day is empty now looks back by itself, up to fourteen days, and says how far it has got. It used to show \u201cNo clips\u201d straight away and only reveal the earlier ones once you dragged the list by hand.','When a source cannot answer, the reason is now printed. The sentence used to arrive with the placeholder still in it.'],it:['Una clip nel riquadro adesso mostra a che punto sei: una traccia di posizione sotto i controlli, con la durata reale del file appena l\u2019hub l\u2019ha misurata, e un trascinamento lungo la traccia per cercare dentro la clip. Finch\xe9 la durata non \xe8 nota la traccia lo dice, invece di fingere che il file sia vuoto.','Vai al live adesso esce davvero dalla clip \u2014 il riquadro torna al live (o al poster, su una telecamera a batteria). Precedente/successiva restano nella lista.','Play/pausa su una clip \xe8 la pausa della clip. Aperta dal live, prima eseguiva la pausa del live, che smontava il player e con lui la clip.','Cercare dentro una clip resta dentro la clip. Prima il rilascio finiva sulle registrazioni in un istante senza senso e il file spariva.','Una clip nel riquadro adesso mantiene i suoi controlli. Play/pausa, velocit\xe0, avanzamento a fotogramma, clip precedente/successiva e Vai al live ci sono tutti \u2014 prima aprire una clip faceva sparire l\u2019intera barra, perch\xe9 la barra chiedeva se l\u2019immagine fosse il live e una clip lascia la sessione esattamente dov\u2019era.','Una telecamera il cui giorno corrente \xe8 vuoto adesso cerca da sola nei giorni precedenti, fino a quattordici, e dice a che punto \xe8 arrivata. Prima mostrava subito \u201cNessuna clip\u201d e le pi\xf9 vecchie comparivano solo trascinando la lista a mano.','Quando una sorgente non pu\xf2 rispondere, adesso il motivo viene scritto. Prima la frase arrivava con il segnaposto ancora dentro.']}},{version:'1.0.533',date:'2026-09-21',notes:{en:['While a clip is playing, the time around the picture is the clip\u2019s own. It used to keep showing wherever the timeline had been left, which made a card from the afternoon sit under a frame claiming the evening \u2014 and made the list look wrong when it was not.'],it:['Mentre una clip \xe8 in riproduzione, l\u2019ora attorno all\u2019immagine \xe8 quella della clip. Prima continuava a mostrare il punto in cui era rimasta la timeline, cos\xec una scheda del pomeriggio finiva sotto un riquadro che dichiarava la sera \u2014 e faceva sembrare sbagliata la lista, che non lo era.']}},{version:'1.0.532',date:'2026-09-21',notes:{en:['A camera that was asleep is no longer woken after a clip finishes. Playing a clip brings the player up, and until now nothing took that reason away again \u2014 so the player stayed up and the live stream started by itself.'],it:['Una camera che dormiva non viene pi\xf9 svegliata quando una clip finisce. Riprodurre una clip accende il player, e finora nulla toglieva pi\xf9 quel motivo \u2014 cos\xec il player restava acceso e la diretta partiva da sola.']}},{version:'1.0.531',date:'2026-09-21',notes:{en:['Clips from a camera\u2019s own storage play, instead of flashing for an instant and stopping. The hub was asking the wrong source for the file \u2014 CamStack\u2019s own recorder, which has no file behind a clip the camera wrote \u2014 because nothing said which source the clip came from.'],it:['Le clip dall\u2019archivio della camera si riproducono, invece di lampeggiare un istante e fermarsi. L\u2019hub chiedeva il file alla sorgente sbagliata \u2014 il registratore di CamStack, che dietro una clip scritta dalla camera non ha alcun file \u2014 perch\xe9 nessuno diceva da quale sorgente venisse la clip.']}},{version:'1.0.530',date:'2026-09-21',notes:{en:['Clips from a camera\u2019s own storage play. On a camera that is asleep the player is deliberately kept down so nothing wakes it, and the command to play a clip was dropped into that gap without a word. A clip now brings the player up and opens straight on the file \u2014 the camera is never dialled.'],it:['Le clip dall\u2019archivio della camera si riproducono. Su una camera che dorme il player resta spento apposta perch\xe9 nulla la svegli, e il comando per riprodurre una clip finiva in quel vuoto senza una parola. Ora una clip accende il player e apre direttamente sul file \u2014 la camera non viene mai contattata.']}},{version:'1.0.529',date:'2026-09-21',notes:{en:['The download button on a clip says it is working. It fetches a file of several megabytes, and until now a press looked exactly like a press that did nothing.'],it:['Il pulsante di scaricamento su una clip dice che sta lavorando. Scarica un file di diversi megabyte, e finora premerlo era identico a premere qualcosa che non fa niente.']}},{version:'1.0.528',date:'2026-09-21',notes:{en:['In the clips view the timeline no longer seeks while you scroll. Browsing the list moves the list and nothing else \u2014 the rule was written months ago and only one of its four parts was ever obeyed.'],it:['Nella vista clip la timeline non cerca pi\xf9 mentre scorri. Sfogliare la lista muove la lista e nient\u2019altro \u2014 la regola era scritta da mesi e di quattro sue parti ne veniva rispettata una.']}},{version:'1.0.527',date:'2026-09-21',notes:{en:['Clip thumbnails appear. They were being requested without the session\u2019s credentials, so the hub refused every one of them and the cards went black \u2014 a clip still now gets its credentials from the same single place as every other image on the timeline.'],it:['Le miniature delle clip compaiono. Venivano richieste senza le credenziali della sessione, quindi l\u2019hub le rifiutava tutte e le schede restavano nere \u2014 ora un\u2019immagine di clip prende le credenziali dallo stesso unico posto di ogni altra immagine della timeline.']}},{version:'1.0.526',date:'2026-09-21',notes:{en:['Clip thumbnails render, and the second look at a clip is instant. A still the camera already holds now goes straight to the image cache with the session\u2019s credentials, so it is kept on the device instead of being downloaded and re-encoded every time \u2014 and it no longer trips the limit that printed an error across every card.'],it:['Le miniature delle clip si vedono, e riaprire una clip \xe8 istantaneo. Un\u2019immagine che la camera ha gi\xe0 va ora direttamente alla cache immagini con le credenziali della sessione, quindi resta sul dispositivo invece di essere riscaricata e ricodificata ogni volta \u2014 e non incappa pi\xf9 nel limite che stampava un errore su ogni scheda.']}},{version:'1.0.525',date:'2026-09-21',notes:{en:['Clips from a camera\u2019s own storage get their thumbnails back. Those rows carry a still the camera already holds, and the card was only ever passed the OTHER kind of address \u2014 so no thumbnail was ever requested, on any of them.'],it:['Le clip dall\u2019archivio della camera ritrovano le loro miniature. Quelle righe portano un\u2019immagine che la camera ha gi\xe0, e alla scheda veniva passato solo l\u2019ALTRO tipo di indirizzo \u2014 quindi nessuna miniatura veniva mai richiesta, su nessuna di esse.']}},{version:'1.0.524',date:'2026-09-21',notes:{en:['While a clip is playing in the camera\u2019s picture, the timeline no longer drives the player. Scrolling used to re-arm a seek into the live session behind the clip, which left the picture loading on cameras that record only on events.','The clip surface now reports what it did \u2014 how many rows a list returned, how many stills were served, queued or refused, and what playback resolved to \u2014 so a camera whose clips do not appear can be diagnosed from the logs instead of guessed at.'],it:['Mentre una clip \xe8 in riproduzione nell\u2019immagine della camera, la timeline non pilota pi\xf9 il player. Prima lo scorrimento riarmava una ricerca sulla sessione dal vivo dietro la clip, e l\u2019immagine restava in caricamento sulle camere che registrano solo a eventi.','La superficie clip ora riferisce quel che ha fatto \u2014 quante righe ha restituito un elenco, quante miniature sono state servite, messe in coda o rifiutate, e a cosa si \xe8 risolta la riproduzione \u2014 cos\xec una camera le cui clip non compaiono si diagnostica dai log invece che a intuito.']}},{version:'1.0.523',date:'2026-09-21',notes:{en:['The camera dot no longer claims a camera is not recording when it simply could not be asked. A recording state that failed to load now shows as unknown, in grey, instead of the green of a camera that is idle \u2014 and the timeline says the same about a footage band it could not read.','A finger bouncing off the glass at the end of a pinch no longer advances the zoom a step.','Zooming into a camera no longer follows you out of it: the zoom resets when you open a camera, instead of surviving until the app is killed.'],it:['Il pallino della camera non afferma pi\xf9 che una camera non registra quando semplicemente non \xe8 riuscito a chiederlo. Uno stato di registrazione che non si \xe8 caricato ora appare come sconosciuto, in grigio, invece del verde di una camera ferma \u2014 e la timeline dice lo stesso di una fascia di filmato che non ha potuto leggere.','Un dito che rimbalza sul vetro alla fine di una pizzicata non fa pi\xf9 avanzare lo zoom di un gradino.','Lo zoom su una camera non ti segue pi\xf9 fuori: si azzera all\u2019apertura di una camera, invece di sopravvivere finch\xe9 l\u2019app non viene chiusa.']}},{version:'1.0.522',date:'2026-09-21',notes:{en:['Previous and next clip are on the playback controls. While a clip is playing in the camera\u2019s picture, the two skip buttons step between clips instead of jumping ten seconds \u2014 inside a clip, what comes before and after is another clip.'],it:['Clip precedente e successiva sono nei comandi di riproduzione. Mentre una clip \xe8 in riproduzione nell\u2019immagine della camera, i due pulsanti laterali passano da una clip all\u2019altra invece di saltare dieci secondi \u2014 dentro una clip, ci\xf2 che viene prima e dopo \xe8 un\u2019altra clip.']}},{version:'1.0.521',date:'2026-09-21',notes:{en:['The side navigation is icons only. Beside the picture there was never room for the words, so they were being cut off mid-name; the bar along the bottom, which has the whole width, keeps its labels.','The playback controls now fit the panel they are in. They were sized against the whole window rather than the box around them, so on a narrow panel the rightmost controls ran off the edge instead of stepping aside.'],it:['La navigazione laterale \xe8 a sole icone. Di fianco all\u2019immagine lo spazio per le parole non c\u2019\xe8 mai stato, e i nomi venivano tagliati a met\xe0; la barra in basso, che ha tutta la larghezza, mantiene le sue etichette.','I comandi di riproduzione ora stanno nel pannello che li contiene. Erano dimensionati sull\u2019intera finestra invece che sul riquadro attorno a loro, quindi su un pannello stretto quelli a destra uscivano dal bordo invece di farsi da parte.']}},{version:'1.0.520',date:'2026-09-21',notes:{en:['Settings templates now keep themselves up to date. Save one from the device you set up the way you like, mark that device as the one that keeps it current, and any other device can follow it \u2014 it takes the newest version on its own, including a template someone else in the house made. A following device is read-only on the shared settings: the template wins.','The rows that only mean something on a phone or tablet \u2014 build number, runtime, running bundle \u2014 are no longer shown in the desktop app, where there is no native build behind them.'],it:['I template delle impostazioni ora si mantengono aggiornati da soli. Salvane uno dal dispositivo che hai configurato come vuoi, segna quel dispositivo come quello che lo tiene aggiornato, e qualunque altro pu\xf2 seguirlo \u2014 prende l\u2019ultima versione da solo, anche un template fatto da un\u2019altra persona di casa. Un dispositivo che segue \xe8 in sola lettura sulle impostazioni condivise: vince il template.','Le righe che hanno senso solo su telefono o tablet \u2014 numero di build, runtime, bundle in esecuzione \u2014 non compaiono pi\xf9 nell\u2019app desktop, dove non c\u2019\xe8 una build nativa dietro.']}},{version:'1.0.518',date:'2026-09-21',notes:{en:['A camera that simply has no clips of a kind no longer looks broken. HomeKit clips were showing as a failure with a retry button on cameras HomeKit has never recorded \u2014 which retrying could never fix. The source already explains itself, and the app now shows that explanation instead of an error. A real fault still shows as a fault.'],it:['Una camera che semplicemente non ha clip di un certo tipo non sembra pi\xf9 rotta. Le clip HomeKit comparivano come errore con un pulsante Riprova su camere che HomeKit non ha mai registrato \u2014 e riprovare non poteva cambiarlo. La sorgente si spiega gi\xe0 da s\xe9, e ora l\u2019app mostra quella spiegazione invece di un errore. Un guasto vero continua a comparire come guasto.']}},{version:'1.0.517',date:'2026-09-21',notes:{en:['A clip from the camera now plays in the camera\u2019s own picture, not in a panel on top of it. It is the same player and the same connection the live view and the recorded timeline already use \u2014 so the controls under it are its controls, and going live leaves the clip. A clip that is only ever a link still opens in its own panel, because there is nothing for the player to fetch.'],it:['Una clip della camera ora si riproduce nell\u2019immagine della camera stessa, non in un pannello sopra. \xc8 lo stesso player e la stessa connessione che gi\xe0 usano la diretta e la timeline registrata \u2014 quindi i comandi sotto sono i suoi comandi, e tornare in diretta esce dalla clip. Una clip che \xe8 solo un collegamento continua ad aprirsi nel suo pannello, perch\xe9 non c\u2019\xe8 nulla che il player possa scaricare.']}},{version:'1.0.516',date:'2026-09-21',notes:{en:['The clip list no longer disappears while it is loading. Scrolling could take the list off the screen and leave a loading message in its place \u2014 the rows were being dropped whenever anything upstream flickered, not only when a new window was being read. What is on screen now stays on screen until there is an answer to replace it, and a list that is genuinely empty still says so.'],it:['L\u2019elenco delle clip non sparisce pi\xf9 mentre carica. Scorrendo poteva togliere la lista dallo schermo lasciando al suo posto un messaggio di caricamento \u2014 le righe venivano buttate a ogni sfarfallio a monte, non solo quando si leggeva una finestra nuova. Ora ci\xf2 che \xe8 a schermo ci resta finch\xe9 non arriva una risposta che lo sostituisca, e un elenco davvero vuoto continua a dirlo.']}},{version:'1.0.515',date:'2026-09-21',notes:{en:['Clip thumbnails appear straight away. The hub already held a finished picture for almost every clip \u2014 275 of 300 on one camera \u2014 and the app ignored it, asking the camera to cut a fresh one out of the video file instead, one at a time, in a queue. It now uses the picture that already exists and only asks for one to be made when there genuinely is none.'],it:['Le miniature delle clip compaiono subito. L\u2019hub aveva gi\xe0 pronta l\u2019immagine per quasi ogni clip \u2014 275 su 300 di una camera \u2014 e l\u2019app la ignorava, chiedendo invece alla camera di ritagliarne una nuova dal file video, una alla volta, in coda. Ora usa l\u2019immagine che esiste gi\xe0 e ne fa produrre una solo quando davvero non c\u2019\xe8.']}},{version:'1.0.514',date:'2026-09-21',notes:{en:['Scrolling the clip list no longer sticks on loading. Reaching the oldest end buys another day of history, and the list was buying one from a scroll it had caused itself: a wider window has no cards yet, an empty body collapses, and collapsing snaps the position \u2014 which counted as reaching the end again. Measured at twenty-nine days bought with no finger on the screen. A day of history is now bought by a touch.','A clip\u2019s still stays once it has arrived. The list only keeps the tiles near what you are looking at, so an ordinary scroll was throwing away pictures the camera had already been asked for, and asking again put them back at the end of the queue \u2014 the camera makes one at a time. They are now kept across scrolling, leaving the list and coming back.'],it:['Scorrendo l\u2019elenco delle clip non resta pi\xf9 bloccato sul caricamento. Arrivare in fondo compra un altro giorno di storia, e l\u2019elenco se lo comprava da uno scorrimento causato da s\xe9: una finestra pi\xf9 larga non ha ancora schede, un corpo vuoto si accorcia, e accorciandosi fa scattare la posizione \u2014 che contava come essere di nuovo in fondo. Misurati ventinove giorni comprati senza un dito sullo schermo. Ora un giorno di storia si compra con un tocco.','La miniatura di una clip resta, una volta arrivata. L\u2019elenco tiene montate solo le schede vicine a ci\xf2 che guardi, quindi un normale scorrimento buttava via immagini gi\xe0 chieste alla camera, e richiederle le rimetteva in fondo alla coda \u2014 la camera ne produce una alla volta. Ora si conservano scorrendo, uscendo dall\u2019elenco e tornandoci.']}},{version:'1.0.513',date:'2026-09-20',notes:{en:['Fixes a camera becoming unusable after opening a clip \u2014 continuous vibration and a frozen timeline. Two separate loops caused it. The timeline asks to return to live whenever its list sits at the newest end, and it stops asking once it gets there; the clip mode added yesterday could not be left that way, so the request repeated for ever and each repeat buzzed. It showed up on a sleeping battery camera with few clips, whose short list sits at that end permanently, and never on a mains camera with hundreds. The clip no longer takes over the camera\u2019s frame at all, which removes the cause rather than muting it.','A clip tile\u2019s still now arrives instead of staying blank. The camera mints one still at a time, so on a page of sixty most requests are told to come back \u2014 and the app was treating that like a refusal. It now waits and asks again, spread out so the tiles do not collide, and gives up with a reason rather than silently.'],it:['Corregge una camera che diventava inutilizzabile dopo l\u2019apertura di una clip \u2014 vibrazione continua e timeline bloccata. Le cause erano due cicli distinti. La timeline chiede di tornare al live ogni volta che la sua lista \xe8 sull\u2019estremo pi\xf9 recente, e smette di chiederlo una volta arrivata; la modalit\xe0 clip introdotta ieri non poteva essere abbandonata in quel modo, quindi la richiesta si ripeteva all\u2019infinito e ogni ripetizione vibrava. Si vedeva su una camera a batteria addormentata con poche clip, la cui lista corta sta sempre su quell\u2019estremo, e mai su una camera a rete con centinaia. La clip non occupa pi\xf9 il riquadro della camera, il che elimina la causa invece di zittirla.','La miniatura di una clip ora arriva invece di restare vuota. La camera ne produce una alla volta, quindi su una pagina da sessanta la maggior parte delle richieste riceve un \u201ctorna fra poco\u201d \u2014 e l\u2019app lo trattava come un rifiuto. Ora aspetta e richiede, distanziando i tentativi perch\xe9 non si scontrino, e si arrende dicendo il motivo invece che in silenzio.']}},{version:'1.0.512',date:'2026-09-20',notes:{en:['A camera\u2019s own clip now plays in the camera\u2019s own frame instead of a separate window, and repeats. While it does, the timeline\u2019s transport, heatmap and position line are gone \u2014 there is nothing for them to point at, and an empty scrubber still takes a drag that seeks the wrong footage. Arrows step to the previous and next clip, skipping any the camera cannot serve, and closing puts the frame back on exactly what it was showing rather than jumping to live \u2014 which on a battery camera would be a wake nobody asked for. A clip still being recorded plays once and says why it does not repeat: its end time is a guess the camera has not updated yet.','Each clip tile has a save control where the cluster magnifier normally sits. It asks for the full-size copy, because that is the one worth keeping \u2014 the opposite of what the frame plays, which is deliberately the small one. A clip the camera cannot serve shows the control disabled with the camera\u2019s own reason rather than hiding it.'],it:['Una clip della camera ora si riproduce nel riquadro della camera stessa invece che in una finestra separata, e si ripete. Mentre gira, il trasporto della timeline, la mappa di densit\xe0 e la linea di posizione spariscono: non hanno niente da indicare, e una barra vuota accetta comunque un trascinamento che cerca nel materiale sbagliato. Le frecce passano alla clip precedente e successiva saltando quelle che la camera non riesce a servire, e chiudendo il riquadro torna esattamente a ci\xf2 che mostrava invece di saltare al live \u2014 che su una camera a batteria sarebbe un risveglio che nessuno ha chiesto. Una clip ancora in registrazione si riproduce una volta e dice perch\xe9 non si ripete: la sua fine \xe8 una stima che la camera non ha ancora aggiornato.','Ogni riquadro di clip ha un comando di salvataggio dove di solito sta la lente del gruppo. Chiede la copia a piena dimensione, perch\xe9 \xe8 quella che vale la pena tenere \u2014 il contrario di quella che il riquadro riproduce, che \xe8 deliberatamente la piccola. Una clip che la camera non riesce a servire mostra il comando disattivato con il motivo della camera, invece di nasconderlo.']}},{version:'1.0.511',date:'2026-09-20',notes:{en:['Cameras that keep their own recordings \u2014 on an SD card, or on a Reolink hub \u2014 now show those clips in the app. Pick the source under Timeline \u2192 Clip source; the row only appears on a camera that actually has more than one. Tapping a clip plays the camera\u2019s own file, at the small copy rather than the one thirty times its size, in the same player a saved export opens in. Leaving the setting on CamStack recordings keeps the timeline exactly as it was.'],it:['Le camere che conservano registrazioni proprie \u2014 su scheda SD, o su un hub Reolink \u2014 ora mostrano quelle clip nell\u2019app. La sorgente si sceglie in Timeline \u2192 Sorgente clip, e la riga compare solo su una camera che ne ha davvero pi\xf9 di una. Toccando una clip si riproduce il file della camera stessa, nella copia piccola invece di quella trenta volte pi\xf9 pesante, nello stesso player con cui si apre un export salvato. Lasciando l\u2019impostazione su Registrazioni CamStack la timeline resta esattamente com\u2019era.']}},{version:'1.0.510',date:'2026-09-20',notes:{en:['A single camera\u2019s live view now recovers from a freeze on its own. A stream whose picture stops is not an errored stream \u2014 the connection stays up and the player still reports that it is playing \u2014 so every recovery path in the app slept through it, and pressing pause and then play was the only way out. That gesture worked because the session could always be rebuilt; what was missing was anything that decided to. The grid already healed itself this way; the single-camera view never did.','Animal, vehicle and audio labels on the Events page are translated. The translations were never missing: the app asked each camera which classes it advertises and printed the raw English id whenever that list did not carry one \u2014 which happens whenever a camera has its animal or vehicle group switched off while older events still mention a dog, whenever that per-camera list is still loading, and for every raw label the audio classifier produces. A label now falls back to its family and, in the last resort, shows the original word rather than a blank.'],it:['La vista dal vivo di una singola camera ora riparte da sola quando si blocca. Uno stream la cui immagine si ferma non \xe8 uno stream in errore \u2014 la connessione resta su e il player continua a dire che sta riproducendo \u2014 quindi tutti i percorsi di recupero dell\u2019app ci dormivano sopra, e premere pausa e poi play era l\u2019unico modo per uscirne. Quel gesto funzionava perch\xe9 la sessione si poteva sempre ricostruire; mancava solo qualcuno che decidesse di farlo. La griglia si curava gi\xe0 cos\xec, la vista a camera singola no.','Le etichette di animali, veicoli e audio nella pagina Eventi sono tradotte. Le traduzioni non erano mai mancate: l\u2019app chiedeva a ogni camera quali classi dichiara e stampava l\u2019identificativo inglese grezzo ogni volta che quella lista non ne conteneva una \u2014 cosa che succede quando una camera ha il gruppo animali o veicoli spento mentre lo storico parla ancora di un cane, quando quella lista sta ancora caricando, e per ogni etichetta grezza prodotta dal classificatore audio. Ora un\u2019etichetta ripiega sulla sua famiglia e, in ultima istanza, mostra la parola originale invece del vuoto.']}},{version:'1.0.509',date:'2026-09-19',notes:{en:['The timeline column on a tablet is wider, because its toolbar had stopped fitting: the row had wrapped onto a second line and the menu that opens from it was clipped by the column\u2019s edge. The second line was eating the space the timeline itself needs.'],it:['La colonna della timeline su tablet \xe8 pi\xf9 larga, perch\xe9 la sua barra non ci stava pi\xf9: la riga era andata a capo su due righe e il menu che si apre da l\xec veniva tagliato dal bordo della colonna. La seconda riga si mangiava lo spazio che serve alla timeline stessa.']}},{version:'1.0.508',date:'2026-09-19',notes:{en:['The stream numbers on the camera card now actually arrive. They were being measured once a second and thrown away on the way in: the app checks incoming messages for a stats reply, and it was matching any message that merely mentioned stats \u2014 which every sample does. So the card said "no measurement yet" on every camera, permanently, while the data was arriving the whole time.'],it:['I numeri dello stream sulla scheda della telecamera adesso arrivano davvero. Venivano misurati una volta al secondo e buttati via all\u2019ingresso: l\u2019app controlla nei messaggi in arrivo se \xe8 una risposta di statistiche, e accettava qualunque messaggio che nominasse le statistiche \u2014 cosa che ogni campione fa. Cos\xec la scheda diceva \u201cnessuna misura ancora\u201d su ogni telecamera, per sempre, mentre i dati arrivavano da subito.']}},{version:'1.0.507',date:'2026-09-19',notes:{en:['A camera that reports neither a battery nor a link now gets a chart glyph of its own, which opens the same card and its stream numbers. Those cameras had no badge at all, so the card could not be opened on them \u2014 the permanently-powered, wired ones, which are exactly the cameras you are most likely to be investigating.'],it:['Una telecamera che non riporta n\xe9 batteria n\xe9 collegamento adesso ha un\u2019icona a grafico tutta sua, che apre la stessa scheda e i suoi numeri dello stream. Su quelle telecamere non c\u2019era nessuna icona, quindi la scheda non si poteva aprire \u2014 e sono le telecamere fisse alimentate, cio\xe8 proprio quelle su cui \xe8 pi\xf9 probabile che tu stia indagando.']}},{version:'1.0.506',date:'2026-09-19',notes:{en:['The stream numbers moved to where you can reach them. Tap the battery or link glyph on a camera and the card now also carries the stream: the verdict first \u2014 is a frozen picture the network or the decoder? \u2014 then the evidence. Frames decoded and whether they are still advancing, freezes and how long they lasted, key-frame requests, loss, latency and the connection path; and from the hub, which profile you are actually being served, whether that stream is native or transcoded here, which node ingests it, and why the quality ladder last moved. The pill on the picture stays as it is: on a phone the panel behind it could never be opened, because the app owns the touches over the player.'],it:['I numeri dello stream si sono spostati dove puoi raggiungerli. Tocca l\u2019icona della batteria o del collegamento su una telecamera e la scheda adesso porta anche lo stream: prima il verdetto \u2014 un\u2019immagine bloccata \xe8 la rete o il decoder? \u2014 e poi le prove. Fotogrammi decodificati e se stanno ancora avanzando, blocchi e quanto sono durati, richieste di key frame, perdita, latenza e il percorso della connessione; e dall\u2019hub, quale profilo ti sta servendo davvero, se quello stream \xe8 nativo o transcodificato qui, quale nodo lo ingerisce e perch\xe9 la scala di qualit\xe0 si \xe8 mossa l\u2019ultima volta. La pastiglia sull\u2019immagine resta com\u2019\xe8: sul telefono il pannello dietro non si poteva aprire, perch\xe9 i tocchi sopra il player appartengono all\u2019app.']}},{version:'1.0.505',date:'2026-09-19',notes:{en:['The stream stats are a real debug tool now, and they stay out of your way. A small pill above the controls carries the verdict, the resolution, the frame rate and the bitrate; tap it for the full panel. The panel answers the question that mattered and could not be answered before: when a picture freezes, is it the network or the decoder? It shows frames decoded, freezes and their duration, key-frame requests, retransmissions, jitter, loss and the ICE path on the client side \u2014 and, from the hub, which rung you are actually being served, whether that stream is native or transcoded, which node is ingesting it, and why the quality ladder last moved.'],it:['Le statistiche dello stream sono diventate uno strumento di debug vero, e stanno fuori dai piedi. Una pastiglia sopra i controlli porta il verdetto, la risoluzione, i fotogrammi al secondo e il bitrate; toccala per il pannello completo. Il pannello risponde alla domanda che contava e a cui non si poteva rispondere: quando l\u2019immagine si blocca, \xe8 la rete o il decoder? Mostra i fotogrammi decodificati, i blocchi e quanto sono durati, le richieste di key frame, le ritrasmissioni, jitter, perdita e il percorso ICE lato client \u2014 e, dall\u2019hub, quale profilo ti sta servendo davvero, se quello stream \xe8 nativo o transcodificato, quale nodo lo sta ingerendo e perch\xe9 la scala di qualit\xe0 si \xe8 mossa l\u2019ultima volta.']}},{version:'1.0.504',date:'2026-09-17',notes:{en:['The Home button on a PTZ camera now tells you when it cannot do anything. It used to send the camera to whichever preset happened to sit in the first slot \u2014 on these cameras that was \u201cstanza\u201d, \u201cCredenza\u201d and \u201cPreset1\u201d, nobody\u2019s idea of home \u2014 and when that slot was empty it failed in silence. The hub now asks which preset you chose as home, refuses rather than guessing, and the app shows you the refusal instead of swallowing it. Pick one under PTZ settings.'],it:['Il pulsante Home su una telecamera PTZ ora ti dice quando non pu\xf2 fare niente. Prima mandava la telecamera al preset che si trovava nel primo posto \u2014 su queste telecamere erano \u201cstanza\u201d, \u201cCredenza\u201d e \u201cPreset1\u201d, che home non sono \u2014 e quando quel posto era vuoto falliva in silenzio. Adesso l\u2019hub chiede quale preset hai scelto come home, rifiuta invece di indovinare, e l\u2019app ti mostra il rifiuto invece di ingoiarlo. Scegline uno nelle impostazioni PTZ.']}},{version:'1.0.503',date:'2026-09-16',notes:{en:['Pages with camera tiles scroll again on a phone. A tile claimed every touch that landed on it \u2014 and on a phone a tile is most of the screen \u2014 then did nothing with it, because dragging only pans a tile you have already zoomed into. Now the gesture is yours until you zoom in; pinch and double-tap are unchanged.'],it:['Le pagine con i riquadri delle telecamere tornano a scorrere sul telefono. Un riquadro si prendeva ogni tocco che ci finiva sopra \u2014 e sul telefono un riquadro e\u2019 quasi tutto lo schermo \u2014 e poi non ne faceva niente, perche\u2019 trascinare sposta solo un riquadro in cui hai gia\u2019 zoomato. Ora il gesto resta tuo finche\u2019 non zoomi; pinch e doppio tocco invariati.']}},{version:'1.0.502',date:'2026-09-16',notes:{en:['Zones, above the places: a part of the home that holds several rooms \u2014 \u201cZona notte\u201d for the bedrooms. They come first in the filter strip, with their own icon, because it is the coarser question: asking for upstairs should not mean pressing four rooms. Create them on the hub, under Locations.','A camera still belongs to exactly one place, and a place to at most one zone. Nothing about your cameras changed to make this work.','The drawn zones in the rule editor are now called detection zones, which is what they are \u2014 so the word is free for the rooms of your home.'],it:['Le zone, sopra i luoghi: una parte della casa che tiene pi\xf9 stanze \u2014 \u201cZona notte\u201d per le camere da letto. Vengono per prime nella striscia dei filtri, con la loro icona, perch\xe9 sono la domanda pi\xf9 grossa: chiedere il piano di sopra non deve voler dire premere quattro stanze. Si creano sull\u2019hub, sotto Locations.','Una telecamera resta in un solo luogo, e un luogo in al massimo una zona. Non \xe8 cambiato nulla sulle tue telecamere perch\xe9 questo funzionasse.','Le zone disegnate nell\u2019editor delle regole ora si chiamano zone di rilevamento, che \xe8 quello che sono \u2014 cos\xec la parola resta libera per le stanze di casa.']}},{version:'1.0.501',date:'2026-09-16',notes:{en:['Choosing a place that has nothing in it no longer takes the page away. Pressing Favourites with nothing starred replaced the reel, the selector and the cameras with \u201cno cameras configured\u201d \u2014 and took away the control that would have undone it. The reel and the strip stay put; only the list below says it is empty.','The location chips are the size of chips again, and Favourites is in your language.'],it:['Scegliere un luogo vuoto non porta pi\xf9 via la pagina. Premere Preferite senza averne sostituiva reel, selettore e camere con \u201cnessuna camera configurata\u201d \u2014 e toglieva proprio il comando per tornare indietro. Reel e striscia restano al loro posto; \xe8 la lista sotto a dire che \xe8 vuota.','I chip dei luoghi sono tornati alti quanto un chip, e Preferite \xe8 nella tua lingua.']}},{version:'1.0.500',date:'2026-09-16',notes:{en:['The camera list has a location strip, between the reel and the cameras. Favourites first \u2014 with a count, because an empty shortlist is worth knowing before you press into it \u2014 then \u201cAll\u201d, then every place your cameras actually name. Pressing the place you are already in takes you back out, so a room whose cameras are all offline is never a dead end.','A heart on each camera, top left. Favourites live in your profile and travel with it: share the profile and they go too. They are yours alone otherwise.','A place can carry its own icon, chosen in the hub. A room nobody gave one to shows no icon at all rather than a default \u2014 \u201cnobody chose\u201d and \u201cthe pin was chosen\u201d are different things.'],it:['La lista camere ha una striscia dei luoghi, fra il reel e le camere. Prima le Preferite \u2014 col conteggio, perch\xe9 una lista corta vuota \xe8 meglio saperlo prima di entrarci \u2014 poi \u201cTutte\u201d, poi ogni luogo che le tue camere hanno davvero. Premere il luogo in cui sei gi\xe0 ti riporta indietro, cos\xec una stanza con tutte le camere offline non \xe8 mai un vicolo cieco.','Un cuore su ogni camera, in alto a sinistra. Le preferite stanno nel tuo profilo e viaggiano con lui: condividi il profilo e vanno con quello. Per il resto sono solo tue.','Un luogo pu\xf2 avere la sua icona, scelta sull\u2019hub. Una stanza a cui nessuno l\u2019ha data non disegna nessuna icona invece di una di default \u2014 \u201cnessuno ha scelto\u201d e \u201cha scelto il pin\u201d sono due cose diverse.']}},{version:'1.0.499',date:'2026-09-15',notes:{en:['The debug reasons are the ones you actually use. Nine of them, in your order \u2014 the old list had been inferred from a reading of eleven real notes; this one was dictated by the person who reviews with it. \u201cNo crop\u201d is gone: a crop that is WRONG and a crop that is ABSENT are two different findings, and one checkbox was blurring them.','A track\u2019s media strip can now show \u201cGate crop\u201d \u2014 the pixels the confirmation gate judged, kept when it refused to confirm a birth. It exists to be argued with: it is the only thing that can say whether the detector was right to drop a sighting.'],it:['Le reason di debug sono quelle che usi davvero. Nove, nel tuo ordine \u2014 la lista precedente era stata dedotta da una lettura di undici note reali; questa l\u2019ha dettata chi ci rivede. \xc8 sparito \u201cnessun ritaglio\u201d: un crop SBAGLIATO e un crop ASSENTE sono due reperti diversi, e una casella sola li confondeva.','La striscia media di una traccia pu\xf2 ora mostrare \u201cGate crop\u201d \u2014 i pixel su cui il confirmation gate ha deciso, tenuti quando ha rifiutato di confermare una nascita. Serve per poterlo contestare: \xe8 l\u2019unica cosa che dice se il detector avesse ragione a scartare un avvistamento.']}},{version:'1.0.498',date:'2026-09-15',notes:{en:['The \u201c?\u201d on an events card really does open the assignment now. It was made a button last time and still could not be tapped: it sits in the caption row, which is deliberately transparent to touches so the labels never swallow the card\u2019s own open \u2014 and the button inherited that.','Audio on open is no longer one answer for every camera. Alongside \u201calways on\u201d and \u201calways off\u201d there is now \u201cas you left it\u201d, which is the new default: each camera opens the way you last left it, and a camera you have never chosen on opens silent.'],it:['Il \u201c?\u201d su una card degli eventi ora apre davvero l\u2019assegnazione. L\u2019ultima volta era diventato un pulsante e restava comunque intoccabile: sta nella riga delle etichette, che \xe8 trasparente ai tocchi apposta perch\xe9 le etichette non si mangino l\u2019apertura della card \u2014 e il pulsante ereditava quella trasparenza.','L\u2019audio all\u2019apertura non \xe8 pi\xf9 una risposta sola per tutte le camere. Accanto a \u201csempre acceso\u201d e \u201csempre spento\u201d c\u2019\xe8 ora \u201ccome l\u2019hai lasciato\u201d, che \xe8 il nuovo default: ogni camera si apre com\u2019era l\u2019ultima volta, e una camera su cui non hai mai scelto si apre muta.']}},{version:'1.0.497',date:'2026-09-14',notes:{en:['You can add a linked device from the camera\u2019s own panel, not only from the cameras list. The panel showed you what was linked and gave you nowhere to add one, so the answer was to leave the camera you were looking at.','The keyboard no longer covers the device picker while you search it. And tapping outside now closes the keyboard first, so a search you were half way through is not thrown away with it.'],it:['Puoi aggiungere un dispositivo collegato dal pannello della camera stessa, non solo dalla lista camere. Il pannello ti mostrava cosa era collegato e non ti dava dove aggiungerne uno, quindi la risposta era uscire dalla camera che stavi guardando.','La tastiera non copre pi\xf9 il selettore dei dispositivi mentre lo cerchi. E il tocco fuori ora chiude prima la tastiera, cos\xec una ricerca lasciata a met\xe0 non se ne va con lei.']}},{version:'1.0.496',date:'2026-09-14',notes:{en:['The \u201c?\u201d on an events card now opens the assignment. It was a label that said a face was waiting for a name and did nothing when you tapped it \u2014 so you opened the card and looked for the assignment again, answering a question you had already asked.','A group now shows its PATH: what each of its subjects did, drawn on the picture they were in together, one colour each. Every member already had its own crop in the group; what was missing was where they went.'],it:['Il \u201c?\u201d su una card degli eventi ora apre l\u2019assegnazione. Era un\u2019etichetta che diceva che un volto aspettava un nome e non faceva niente al tocco \u2014 cos\xec aprivi la card e ricercavi l\u2019assegnazione, rispondendo a una domanda che avevi gi\xe0 fatto.','Un gruppo ora mostra il suo PERCORSO: cosa ha fatto ognuno dei suoi soggetti, disegnato sull\u2019immagine in cui erano insieme, un colore per ciascuno. Ogni membro aveva gi\xe0 il suo ritaglio nel gruppo; mancava dove sono andati.']}},{version:'1.0.495',date:'2026-09-13',notes:{en:['Groups with no camera filter now list every camera. Leaving the camera chip untouched means "all of them" here, and it meant "none of them" to the hub \u2014 so the gallery came back empty on a system full of groups.'],it:['I gruppi senza filtro camera ora elencano tutte le telecamere. Non toccare il chip delle camere qui significa \u201ctutte\u201d, e per l\u2019hub significava \u201cnessuna\u201d \u2014 cos\xec la galleria tornava vuota su un sistema pieno di gruppi.']}},{version:'1.0.494',date:'2026-09-13',notes:{en:['Administrators can link devices to a camera from the phone \u2014 a doorbell, a sensor, a light \u2014 in the same list the pencil arranges. The picker suggests the devices in that camera\u2019s own room first, and nothing is linked until you pick it.'],it:['Gli amministratori possono collegare device a una telecamera dal telefono \u2014 un campanello, un sensore, una luce \u2014 nella stessa lista che la matita riordina. Il selettore suggerisce per primi i device della stanza di quella telecamera, e niente viene collegato finch\xe9 non lo scegli tu.']}},{version:'1.0.493',date:'2026-09-13',notes:{en:['You can arrange the camera list by hand. A small pencil in the corner turns the list into edit mode, you drag the rows, and a tick saves. Nothing is draggable until you ask \u2014 no more reordering a camera by accident \u2014 and cancelling puts back exactly the order you started with, not the last one saved.','The arrangement is yours and stays on this device. A camera added on the hub appears at the end rather than somewhere unpredictable, and an order can move a camera but can never hide one.'],it:['Puoi sistemare la lista delle telecamere a mano. Una piccola matita nell\u2019angolo mette la lista in modifica, trascini le righe, e la spunta salva. Niente \xe8 trascinabile finch\xe9 non lo chiedi \u2014 niente pi\xf9 riordini per sbaglio \u2014 e annullare rimette esattamente l\u2019ordine da cui eri partito, non l\u2019ultimo salvato.','La disposizione \xe8 tua e resta su questo dispositivo. Una telecamera aggiunta sull\u2019hub compare in fondo invece che in un punto imprevedibile, e un ordine pu\xf2 spostare una telecamera ma non pu\xf2 mai nasconderla.']}},{version:'1.0.492',date:'2026-09-13',notes:{en:['Three pages can now list GROUPS instead of subjects: the camera timeline, the reel on the cameras page, and the Events gallery. A family walking in together is one entry with several pictures, not four cards. Each page has its OWN switch and each one starts on subjects \u2014 nothing changes until you ask it to, and you can always switch back from the page itself.','A group card shows what the group was made of \u2014 two people and a dog \u2014 and a Live chip while the session is still running. Opening it lists the members, each one linking to its own track.','The reel draws groups as their own strip, with several images per entry and no clustering: two sessions seconds apart are two things that happened, and the old grouping used to swallow one of them.','Filtering understands groups. Picking Dog now finds the arrivals that HAD a dog with them, including the group of four people \u2014 the filter asks about the members, and it runs on the hub rather than on your phone.'],it:['Tre pagine possono ora elencare i GRUPPI invece dei soggetti: la timeline della telecamera, il reel nella pagina telecamere e la galleria Eventi. Una famiglia che entra insieme \xe8 una voce sola con pi\xf9 immagini, non quattro schede. Ogni pagina ha il SUO interruttore e parte dai soggetti \u2014 non cambia nulla finch\xe9 non lo chiedi tu, e si torna indietro dalla pagina stessa.','La scheda di un gruppo dice di cosa era fatto \u2014 due persone e un cane \u2014 e porta la pastiglia Live finch\xe9 la sessione \xe8 in corso. Aprendola trovi i membri, ognuno con il link alla sua traccia.','Nel reel i gruppi hanno una striscia propria, con pi\xf9 immagini per voce e senza raggruppamento: due sessioni a pochi secondi di distanza sono due cose successe, e il vecchio accorpamento se ne mangiava una.','Il filtro capisce i gruppi. Scegliere Cane ora trova gli arrivi che AVEVANO un cane con loro, compreso il gruppo di quattro persone \u2014 il filtro chiede dei membri, e gira sull\u2019hub invece che sul telefono.']}},{version:'1.0.491',date:'2026-09-13',notes:{en:['The movable window now carries the stream\u2019s own controls: audio, talk-back, picture-in-picture, and a button that opens that camera full-screen. They are the same controls as the single-camera screen \u2014 the same code, so they cannot drift apart.','The resize corner wore the FULLSCREEN icon, so the grip was signing the wrong action. It now looks like every other control in the app.','The heatmap in that window only ever drew recordings. Motion and audio were never missing from the hub \u2014 the window was handing the bar an empty list. Both lanes are there now. Detections are deliberately still absent: loading them costs a few hundred kilobytes, which a floating panel over a live stream should not spend.','Exports and the hub\u2019s own files are ONE section, now called Media. An export finally has a detail view and plays in the app instead of only downloading, and the filter is the one from Events \u2014 a chip per facet that says what it is narrowing, instead of a pill that only counted.','You can delete what the hub produced. Until now a timelapse could only be waited out. A video takes its preview still with it, so one card frees both files.','The timeline can show GROUPS instead of subjects: a family arriving together is one card, not three. Off by default \u2014 turn it on in the timeline filters or in Settings. A session still in progress is listed with a Live chip rather than hidden.'],it:['La finestra mobile ora porta i comandi dello stream: audio, microfono, picture-in-picture e un pulsante che apre quella telecamera a schermo intero. Sono gli STESSI comandi della schermata singola \u2014 lo stesso codice, quindi non possono divergere.','L\u2019angolo di ridimensionamento portava l\u2019icona dello SCHERMO INTERO: la presa firmava l\u2019azione sbagliata. Ora ha l\u2019aspetto di ogni altro comando dell\u2019app.','La heatmap in quella finestra disegnava solo le registrazioni. Movimento e audio non sono mai mancati dall\u2019hub \u2014 era la finestra a passare alla barra una lista vuota. Ora ci sono entrambi. Le rilevazioni restano fuori di proposito: caricarle costa qualche centinaio di kilobyte, che un pannello sopra uno stream dal vivo non deve spendere.','Gli export e i file prodotti dall\u2019hub sono UNA sezione sola, che ora si chiama Media. Un export ha finalmente una scheda e si riproduce dentro l\u2019app invece di poter solo essere scaricato, e il filtro \xe8 quello di Eventi \u2014 una pastiglia per faceta che dice cosa sta restringendo, invece di una che contava e basta.','Puoi cancellare quello che ha prodotto l\u2019hub. Fino a ora un timelapse si poteva solo aspettare. Un video porta via anche la sua anteprima, quindi una card libera due file.','La timeline pu\xf2 mostrare i GRUPPI invece dei soggetti: una famiglia che arriva insieme \xe8 una card, non tre. Spento di default \u2014 si accende dai filtri della timeline o dalle Impostazioni. Una sessione ancora in corso viene elencata con la pastiglia Live, non nascosta.']}},{version:'1.0.490',date:'2026-09-13',notes:{en:['The movable window resizes properly now. The handle always worked \u2014 the sizes behind it did not: all three snaps came out the same box on a phone, so dragging changed nothing. The grip is finger-sized and no longer shares its corner with the playback controls.','The playback bar inside that window fits the width it is given. It was drawing a full-width bar into a small window with nothing to wrap into, which is why LIVE broke onto two lines and buttons landed on top of each other.','Event thumbnails stop failing to warm. The list was pre-fetching them with the wrong kind of id \u2014 an event\u2019s, where a track\u2019s was needed \u2014 so every pre-fetch missed and the picture had to be fetched again when the card appeared.','Picture-in-picture on app close is gone. It was granted by the system and lost 176 ms later, every time: Apple only starts picture-in-picture in response to something you do, and an app closing is not that. The button on the player still works and survives closing the app.'],it:['La finestra mobile ora si ridimensiona davvero. La maniglia ha sempre funzionato \u2014 erano le misure dietro a non funzionare: su telefono tutte e tre le taglie davano la stessa identica finestra, quindi trascinare non cambiava nulla. L\u2019angolo di presa \xe8 dimensionato per un dito e non se lo contende pi\xf9 con i comandi di riproduzione.','La barra di riproduzione dentro quella finestra si adatta alla larghezza che ha. Prima disegnava una barra intera dentro una finestra piccola senza spazio in cui andare a capo: per questo LIVE finiva su due righe e i pulsanti si sovrapponevano.','Le miniature degli eventi smettono di fallire il precaricamento. La lista le chiedeva con il tipo di id sbagliato \u2014 quello dell\u2019evento invece che quello della traccia \u2014 quindi ogni precaricamento mancava e l\u2019immagine andava richiesta da capo quando la card compariva.','Il picture-in-picture alla chiusura dell\u2019app non c\u2019\xe8 pi\xf9. Il sistema lo concedeva e lo perdeva 176 ms dopo, ogni volta: Apple avvia il picture-in-picture solo in risposta a qualcosa che fai tu, e chiudere l\u2019app non lo \xe8. Il pulsante sul player continua a funzionare e sopravvive alla chiusura.']}},{version:'1.0.489',date:'2026-09-13',notes:{en:['Review: deleting a sample from a person now actually deletes it. The request was never leaving the app \u2014 it was looked up in a way that can never find it, so nothing happened and nothing said so.','Review: you can delete parked faces you do not want to keep, and create a new person without leaving the page. Picking a person is a searchable list instead of a row of chips that grew with your gallery.','Review: the similar-groups button kept going quiet after the first pass. It was comparing faces over a wide window and then only showing groups that fell inside a much narrower one, so the matches sitting just outside vanished. One window now \u2014 and the button no longer claims a number.','The movable player lost its padlock: it came along with the shared playback bar and did nothing there but swallow your taps.','Opening a camera full-screen now closes the movable window if it was showing that same camera, instead of leaving two pictures of it.'],it:['Review: cancellare un campione da una persona ora lo cancella davvero. La richiesta non usciva nemmeno dall\u2019app \u2014 veniva cercata in un modo che non pu\xf2 trovarla, quindi non succedeva nulla e nulla lo diceva.','Review: puoi cancellare le facce parcheggiate che non vuoi tenere, e creare una nuova persona senza uscire dalla pagina. Scegliere una persona ora \xe8 una lista con ricerca invece di una fila di pastiglie che cresceva con la tua galleria.','Review: il pulsante dei gruppi simili ammutoliva dopo il primo giro. Confrontava le facce su una finestra ampia e poi mostrava solo i gruppi che cadevano dentro una molto pi\xf9 stretta, quindi le somiglianze appena fuori sparivano. Ora la finestra \xe8 una sola \u2014 e il pulsante non promette pi\xf9 un numero.','Il player mobile ha perso il lucchetto: arrivava insieme alla barra di riproduzione condivisa e l\xec non faceva altro che ingoiare i tuoi tocchi.','Aprire una telecamera a schermo intero ora chiude la finestra mobile se mostrava quella stessa telecamera, invece di lasciarne due immagini.']}},{version:'1.0.488',date:'2026-09-13',notes:{en:['The movable player works on the phone now, not only on tablets and wide windows. A button on each camera card summons it without leaving the list, and its title is the CAMERA\u2019s name \u2014 it used to say "Playback", which cannot tell two open windows apart.','The downward swipe on a camera changed hands: one finger goes back, two fingers hand the camera to the movable player and go back. Picture-in-picture is no longer a gesture at all \u2014 it now happens by itself when you close the app on a single camera, because that is the moment your hands are busy pressing Home. There is a switch for it under Stream.','Audio is on when you open a camera. It used to open muted until you found the button.','Settings were reorganised: General (theme, language, press feedback) sits right under Server, the event-vibration switches are gone, and on a tablet or a desktop window the sections lay out in two or three columns instead of one long scroll.'],it:['Il player mobile ora funziona anche sul telefono, non solo su tablet e finestre larghe. Un pulsante su ogni scheda telecamera lo apre senza uscire dalla lista, e il titolo \xe8 il nome della TELECAMERA \u2014 prima diceva "Riproduzione", che non distingue due finestre aperte.','Lo scorrimento verso il basso su una telecamera cambia mano: un dito torna indietro, due dita passano la telecamera al player mobile e tornano indietro. Il picture-in-picture non \xe8 pi\xf9 un gesto \u2014 ora parte da solo quando chiudi l\u2019app su una singola telecamera, perch\xe9 quello \xe8 il momento in cui le mani sono occupate a premere Home. C\u2019\xe8 un interruttore sotto Streaming.','L\u2019audio \xe8 attivo quando apri una telecamera. Prima si apriva muta finch\xe9 non trovavi il pulsante.','Impostazioni riorganizzate: Generale (tema, lingua, vibrazione alla pressione) sta subito sotto Server, gli interruttori di vibrazione sugli eventi sono spariti, e su tablet o finestra desktop le sezioni si dispongono su due o tre colonne invece di una lista lunga.']}},{version:'1.0.487',date:'2026-09-13',notes:{en:['Thumbnails and track media are back. A media file used to be addressed by a composite key that embedded a foreign id, and once every event table got its own numbering those keys started naming the wrong row \u2014 a night shot could answer for a different camera. The hub now addresses a media file by its own id, and asks for "the best picture of this track" as its own question. The app had been left on the old address, so every thumbnail it asked for came back missing: the track detail opened empty and the timeline drew nothing.','Playback got a player you can move. Open a recording from anywhere and it keeps playing in a window you can drag and resize, and it survives you navigating elsewhere in the app.','The camera reel lights up when something happens \u2014 motion and audio, on by default, with a settings panel to choose what counts. Tapping a camera in the reel now swaps it in place instead of reloading the page, and if you are in playback the new camera opens at the same instant you were watching, not at its own live edge.'],it:['Le miniature e i media delle tracce sono tornati. Un file media veniva indirizzato con una chiave composta che conteneva un id altrui, e da quando ogni tabella di eventi ha una sua numerazione quelle chiavi hanno cominciato a nominare la riga sbagliata \u2014 uno scatto notturno poteva rispondere per un\u2019altra telecamera. L\u2019hub ora indirizza un media con il suo id, e chiede \u201cla foto migliore di questa traccia\u201d come domanda a s\xe9. L\u2019app era rimasta all\u2019indirizzo vecchio, quindi ogni miniatura che chiedeva tornava mancante: il dettaglio della traccia si apriva vuoto e la timeline non disegnava nulla.','La riproduzione ha un player che puoi spostare. Apri una registrazione da qualsiasi punto e continua in una finestra che puoi trascinare e ridimensionare, e resta l\xec anche se navighi altrove nell\u2019app.','Il carosello delle telecamere si illumina quando succede qualcosa \u2014 movimento e audio, attivi di default, con un pannello per scegliere cosa conta. Toccare una telecamera nel carosello ora la scambia sul posto invece di ricaricare la pagina, e se sei in riproduzione la nuova telecamera si apre allo stesso istante che stavi guardando, non al suo live.']}},{version:'1.0.486',date:'2026-09-11',notes:{en:['The camera timeline now opens on the last hour instead of the last three. Three hours was the density the timeline had always drawn, not a decision about what you want to see when you open a camera \u2014 it put whatever just happened in a third of the screen and made the rest yesterday\u2019s scrolling.','Event cards now sit ON the track they describe. The timeline runs newest at the top, so a track ends above and begins below \u2014 but the card was anchored by its top edge to the track\u2019s beginning, which hung it under the event, over the minutes before anything happened. Now the card\u2019s bottom edge is where the track starts, so the card covers the subject\u2019s own passage and reading upward follows it.'],it:['La timeline della telecamera si apre sull\u2019ultima ora invece che sulle ultime tre. Tre ore erano la densit\xe0 che la timeline aveva sempre disegnato, non una scelta su cosa serve vedere aprendo una telecamera: mettevano quello appena successo in un terzo di schermo e rendevano il resto lo scroll di ieri.','Le card degli eventi ora stanno SOPRA la traccia che descrivono. La timeline ha il pi\xf9 recente in alto, quindi una traccia finisce sopra e comincia sotto \u2014 ma la card era ancorata col bordo superiore all\u2019inizio della traccia, il che la appendeva sotto l\u2019evento, sui minuti in cui non era ancora successo nulla. Ora il bordo inferiore della card \xe8 dove la traccia comincia, cos\xec la card copre il passaggio del soggetto e leggere verso l\u2019alto lo segue.']}},{version:'1.0.485',date:'2026-09-11',notes:{en:['The app now hangs up when you leave it, and calls back when you return. In the background the phone freezes the app and stops reading, but the connection stayed open \u2014 so the hub kept piling up messages for a listener that was asleep. One evening of that was 88 MB held on the hub for a phone nobody was holding. The app now closes the connection as it leaves and opens a new one as it comes back.','Coming back is a normal thing, not a fault: no error, no "offline", nothing emptied. You see a brief "connecting" and the screen you left, and the app re-asks the hub for everything that can have changed while it was away \u2014 cameras, batteries, switches, who is in frame \u2014 so what you are looking at a second later is current rather than remembered.'],it:['L\u2019app ora chiude la linea quando la lasci, e richiama quando torni. In background il telefono congela l\u2019app e smette di leggere, ma la connessione restava aperta \u2014 cos\xec l\u2019hub continuava ad accumulare messaggi per un ascoltatore che dormiva. Una sera cos\xec erano 88 MB tenuti sull\u2019hub per un telefono che nessuno aveva in mano. Ora l\u2019app chiude la connessione mentre esce e ne apre una nuova quando rientra.','Il rientro \xe8 una cosa normale, non un guasto: nessun errore, nessun \u201coffline\u201d, niente che si svuota. Vedi un breve \u201cconnessione\u201d e la schermata che avevi lasciato, e l\u2019app richiede all\u2019hub tutto quello che pu\xf2 essere cambiato mentre era via \u2014 telecamere, batterie, interruttori, chi \xe8 inquadrato \u2014 cos\xec quello che guardi un secondo dopo \xe8 attuale e non ricordato.']}},{version:'1.0.484',date:'2026-09-11',notes:{en:['Pinch-to-zoom, the pan while zoomed and the PTZ joystick work again. The crash guard added in 1.0.479 wrapped every gesture handler, and the wrapped handlers were no longer compiled for the UI thread \u2014 so each gesture was caught and dropped on every frame instead of running. Nothing was lost on the hub: every dropped gesture was logged, which is how this was found.','The camera timeline filter now lists every detection class that actually appears in the loaded window, even when the hub does not advertise it for that camera. A class you could see on the timeline but not tick in the filter was the hub describing the camera from a momentary status; the viewer no longer hides what it is showing.'],it:['Il pinch-to-zoom, lo spostamento da zoomato e il joystick PTZ funzionano di nuovo. La protezione anti-crash aggiunta nella 1.0.479 avvolgeva ogni gestore dei gesti, e i gestori avvolti non venivano pi\xf9 compilati per il thread UI \u2014 quindi ogni gesto veniva intercettato e scartato a ogni frame invece di eseguire. Sull\u2019hub non \xe8 andato perso nulla: ogni gesto scartato \xe8 stato registrato, ed \xe8 cos\xec che \xe8 stato trovato.','Il filtro della timeline della telecamera ora elenca ogni classe di rilevamento che compare davvero nella finestra caricata, anche quando l\u2019hub non la dichiara per quella telecamera. Una classe che vedevi sulla timeline ma non potevi spuntare nel filtro era l\u2019hub che descriveva la telecamera da uno stato momentaneo; il viewer non nasconde pi\xf9 ci\xf2 che sta mostrando.']}},{version:'1.0.483',date:'2026-09-10',notes:{en:['On a tablet, turning from portrait to landscape puts the timeline back beside the picture. The app was reading its window size from a notification that sometimes arrived seconds late, or not at all, so it kept laying out for portrait inside a landscape screen until you killed it. It now reads the size of the view you are actually looking at.','The camera reel under the player refreshes in turns instead of all at once. Every card used to ask the hub for a new frame in the same second, every fifteen seconds \u2014 thirty captures in a burst, and the slow cameras never made it in time. Now a quarter of the reel takes its turn on each poll, so each card refreshes about every twenty seconds and the hub is never asked for thirty frames at once.'],it:['Su tablet, ruotando da verticale a orizzontale la timeline torna accanto all\u2019immagine. L\u2019app leggeva la dimensione della finestra da una notifica che a volte arrivava con secondi di ritardo, o mai, e continuava a impaginare in verticale dentro uno schermo orizzontale finch\xe9 non la chiudevi. Ora legge la dimensione della vista che stai davvero guardando.','Il nastro delle telecamere sotto il player si aggiorna a turni invece che tutto insieme. Ogni scheda chiedeva all\u2019hub un frame nuovo nello stesso secondo, ogni quindici secondi \u2014 trenta catture in raffica, e le telecamere lente non facevano mai in tempo. Ora a ogni giro tocca a un quarto del nastro, cos\xec ogni scheda si aggiorna circa ogni venti secondi e all\u2019hub non vengono mai chiesti trenta frame in una volta.']}},{version:'1.0.482',date:'2026-09-10',notes:{en:['When assigning a face fails, it now says why. The failure was caught and thrown away in eight different places \u2014 you saw "could not assign a face" and there was nothing, anywhere, to explain it. The reason is now recorded and reaches the hub, including the case where the server answers but assigns nothing.','The app also stopped narrating itself. Four routine messages \u2014 one per camera tile, several times each \u2014 were more than half of everything it sent to the hub. They are still there in debug mode; what stays are the lines that report something going wrong.'],it:['Quando assegnare una faccia fallisce, ora dice perch\xe9. L\u2019errore veniva catturato e buttato via in otto punti diversi \u2014 tu vedevi \u201cimpossibile assegnare una faccia\u201d e non c\u2019era nulla, da nessuna parte, che lo spiegasse. Ora il motivo viene registrato e arriva all\u2019hub, compreso il caso in cui il server risponde ma non assegna niente.','L\u2019app ha anche smesso di raccontarsi. Quattro messaggi di routine \u2014 uno per riquadro di telecamera, pi\xf9 volte ciascuno \u2014 erano pi\xf9 della met\xe0 di tutto ci\xf2 che spediva all\u2019hub. Restano in modalit\xe0 debug; quel che resta sempre sono le righe che segnalano qualcosa che non va.']}},{version:'1.0.481',date:'2026-09-10',notes:{en:['Assigning faces no longer freezes the page. "Apply suggestions" writes one group per person, and each group used to wait for the whole gallery to be re-read before the next one started \u2014 six people meant dozens of round trips before you got the screen back. The gallery is now re-read once, when the last group is written. Assigning one face at a time waits only for the card you are looking at.','Scrubbing the timeline had a pulse every 80 ms \u2014 twelve a second, which is a buzz and not detents. It is now paced to feel like clicks, and dragging is lighter for it.'],it:['Assegnare le facce non blocca pi\xf9 la pagina. "Applica suggerimenti" scrive un gruppo per persona, e ogni gruppo aspettava che l\u2019intera galleria fosse riletta prima che partisse il successivo \u2014 sei persone significavano decine di andate e ritorni prima di riavere lo schermo. Ora la galleria si rilegge una volta sola, quando l\u2019ultimo gruppo \xe8 scritto. Assegnando una faccia per volta si aspetta soltanto la scheda che stai guardando.','Lo scrub della timeline aveva una vibrazione ogni 80 ms \u2014 dodici al secondo, che \xe8 un ronzio e non degli scatti. Ora \xe8 cadenzata per sembrare clic, e trascinare \xe8 pi\xf9 leggero.']}},{version:'1.0.480',date:'2026-09-10',notes:{en:['The timeline\u2019s audio bar shows the LEVEL now. It was showing how MANY audio events fell in each slot, painted on the same six-rung meter the live view uses for decibels \u2014 so fifty short clicks in a quiet hour lit every rung, whatever their volume. The hub now works out the average loudness of each slot and the bar draws that: a busy quiet hour reads quiet, one door slam reads loud. A slot with no audio at all draws nothing, because \u201cnothing was heard\u201d and \u201cnothing was measured\u201d are not the same thing.','A gesture that fails no longer takes the app down with it. The joystick and the pinch-zoom ran code that, if it threw, closed the app outright \u2014 three crash reports came from exactly that. Now the gesture is simply dropped and the reason is sent back, so the next one can be fixed instead of guessed at.'],it:['La barra audio della timeline mostra finalmente il LIVELLO. Prima mostrava QUANTI eventi audio cadevano in ogni fascia, disegnati sullo stesso misuratore a sei tacche che la vista live usa per i decibel \u2014 cos\xec cinquanta clic brevi in un\u2019ora tranquilla accendevano tutte le tacche, qualunque fosse il volume. Ora l\u2019hub calcola la rumorosit\xe0 media di ogni fascia e la barra disegna quella: un\u2019ora tranquilla ma affollata resta bassa, una porta sbattuta si vede. Una fascia senza audio non disegna nulla, perch\xe9 \u201cnon si \xe8 sentito niente\u201d e \u201cnessuno ha misurato\u201d non sono la stessa cosa.','Un gesto che va in errore non porta pi\xf9 gi\xf9 l\u2019app. Il joystick e lo zoom a pinch eseguivano codice che, se falliva, chiudeva l\u2019app di netto \u2014 tre segnalazioni di crash venivano esattamente da l\xec. Ora il gesto viene semplicemente ignorato e il motivo viene rimandato indietro, cos\xec il prossimo si corregge invece di indovinarlo.']}},{version:'1.0.479',date:'2026-09-09',notes:{en:['Pinch-zoom, second attempt. Yesterday\u2019s fix stopped the box resizing under your fingers, and that turned out to be the wrong half: with the panel set to grow, the picture kept zooming and sliding for a third of a second AFTER you let go \u2014 worst at full zoom, where all of the growth was still pending. The panel now grows under your fingers again, but the player\u2019s own frame never moves: the growth is folded into the zoom itself. Turn on debug mode and a pinch now writes one trace line you can send back.','The app also says far less to the hub: two diagnostics were 72% of everything it shipped \u2014 one of them logged every camera tile twice more just for sitting still while its snapshot aged.'],it:['Zoom a pinch, secondo tentativo. La correzione di ieri ha tolto il riquadro che si ridimensionava sotto le dita, e si \xe8 rivelata la met\xe0 sbagliata: col pannello impostato per crescere, l\u2019immagine continuava a zoomare e scivolare per un terzo di secondo DOPO che avevi lasciato \u2014 peggio al massimo, dove restava pendente tutta la crescita. Ora il pannello cresce di nuovo sotto le dita, ma il frame del player non si muove mai: la crescita \xe8 piegata dentro lo zoom stesso. Con la modalit\xe0 debug accesa, una pinch scrive una riga di traccia da rimandare indietro.','L\u2019app dice anche molto meno all\u2019hub: due diagnostiche facevano il 72% di tutto ci\xf2 che spediva \u2014 una di queste rilogga ogni tessera due volte solo per essere rimasta ferma mentre lo snapshot invecchiava.']}},{version:'1.0.478',date:'2026-09-09',notes:{en:['Pinch-zoom on the live view is smooth again. The picture box no longer resizes under your fingers frame by frame \u2014 it settles once, after you let go \u2014 the pan no longer springs back at the end of a gesture, and the double tap now runs on the UI thread instead of queueing behind the screen. The gesture feels slightly different on purpose: the panel grows after the pinch, not during it.'],it:['Lo zoom a pinch sulla vista live \xe8 di nuovo fluido. Il riquadro dell\u2019immagine non si ridimensiona pi\xf9 sotto le dita frame per frame \u2014 si assesta una volta sola, dopo che hai lasciato \u2014 la panoramica non torna pi\xf9 indietro a fine gesto, e il doppio tap gira sul thread della UI invece di accodarsi dietro allo schermo. Il gesto si sente un po\u2019 diverso di proposito: il pannello cresce dopo la pinch, non durante.']}},{version:'1.0.477',date:'2026-09-08',notes:{en:['The debug note\u2019s preset reasons now come from the notes actually written, not from guesswork: \u201ctrack started late\u201d leads, the thumbnail entry is reworded as \u201ca better frame existed (face/plate)\u201d \u2014 which is what gets typed by hand every time \u2014 and three reasons that were being typed out are now checkboxes: last frame before the first, two subjects in one track, and a two-wheeler whose rider is outside the keyframe.'],it:['Le ragioni preset della nota di debug ora vengono dalle note davvero scritte, non da supposizioni: \u201ctraccia partita in ritardo\u201d \xe8 la prima, la voce sulla miniatura diventa \u201cc\u2019era un frame migliore (volto/targa)\u201d \u2014 che \xe8 quello che viene digitato ogni volta \u2014 e tre ragioni che venivano scritte a mano sono ora caselle: ultimo frame prima del primo, due soggetti nella stessa traccia, e il conducente di un due ruote fuori dal keyframe.']}},{version:'1.0.476',date:'2026-09-08',notes:{en:['Closing the keyboard in the note dialog is the keyboard\u2019s own button now: on iOS a Done bar sits docked to it, drawn by the system above the keys, instead of a button crowding the card.'],it:['Chiudere la tastiera nel dialogo della nota ora \xe8 un pulsante della tastiera stessa: su iOS una barra Fatto le sta agganciata, disegnata dal sistema sopra i tasti, invece di un pulsante che toglie spazio alla scheda.']}},{version:'1.0.475',date:'2026-09-08',notes:{en:['The note dialog was a trap with the keyboard up: its buttons sat behind it, a multiline field has no return key, and tapping outside threw the note away. The card now lifts above the keyboard, a tap outside closes the keyboard first, and there is a Close keyboard button while it is open.'],it:['Il dialogo della nota era una trappola con la tastiera aperta: i pulsanti restavano dietro, un campo multiriga non ha tasto invio, e toccare fuori buttava via la nota. Ora la scheda si solleva sopra la tastiera, un tocco fuori chiude prima la tastiera, e c\u2019\xe8 un pulsante Chiudi tastiera finch\xe9 \xe8 aperta.']}},{version:'1.0.474',date:'2026-09-08',notes:{en:['On a Mac the player still opened the embed page in a browser: the WebView declines that load without reporting an error, so the previous fallback had nothing to react to. The player now watches for silence \u2014 if the bundled page has not spoken within six seconds, it loads the same page from the hub.'],it:['Su Mac il player apriva ancora la pagina dell\u2019embed nel browser: la WebView rifiuta quel caricamento senza segnalare alcun errore, quindi il fallback precedente non aveva nulla a cui reagire. Ora il player sorveglia il silenzio \u2014 se la pagina inclusa non ha parlato entro sei secondi, carica la stessa pagina dall\u2019hub.']}},{version:'1.0.473',date:'2026-09-08',notes:{en:['A sample whose picture is gone now says so, instead of drawing an empty square. Most of the gallery is in that state today \u2014 the crops were lost before the panel existed \u2014 and the scores beside them are unaffected: they come from the stored vector, which is intact.'],it:['Un campione la cui immagine non c\u2019\xe8 pi\xf9 ora lo dice, invece di disegnare un quadrato vuoto. Oggi gran parte della galleria \xe8 in quello stato \u2014 i ritagli erano gi\xe0 andati persi prima che il pannello esistesse \u2014 e i punteggi accanto non ne risentono: vengono dal vettore memorizzato, che \xe8 intatto.']}},{version:'1.0.472',date:'2026-09-08',notes:{en:['Library \u2192 Review can re-analyse one person\u2019s enrolled samples. Worst first, each with its crop and the reason \u2014 \u201clooks like Matthias (61%) more than like this person (12%)\u201d \u2014 and a sample is flagged only when it could actually be auto-assigned to the other person. Remove is one tap, and nothing is removed for you.'],it:['Libreria \u2192 Revisione pu\xf2 rianalizzare i campioni di una persona. Peggiori in cima, ognuno col suo ritaglio e il motivo \u2014 \u201csomiglia a Matthias (61%) pi\xf9 che a questa persona (12%)\u201d \u2014 e un campione \xe8 segnalato solo se potrebbe davvero essere auto-assegnato all\u2019altra persona. Rimuovere \xe8 un tocco, e nessuno rimuove niente al posto tuo.']}},{version:'1.0.471',date:'2026-09-08',notes:{en:['Opening the Cameras page now refreshes every camera\u2019s thumbnail, two at a time, once \u2014 so the tiles below the fold are minutes old instead of hours. It stops when it has been round the list.','What\u2019s new is a panel now, not a one-line dialog: the build that just arrived is at the top, and every earlier update is listed under it by version and date, tap to open. Settings \u2192 Info opens the same panel.'],it:['Aprendo la pagina Telecamere ora si aggiorna la miniatura di ogni camera, due alla volta, una sola volta \u2014 cos\xec i riquadri sotto la piega sono vecchi di minuti e non di ore. Finito il giro, si ferma.','Le novit\xe0 sono un pannello, non pi\xf9 un avviso a una riga: in alto la build appena arrivata, sotto l\u2019elenco di tutti gli aggiornamenti precedenti per versione e data, che si aprono al tocco. Impostazioni \u2192 Info apre lo stesso pannello.']}},{version:'1.0.470',date:'2026-09-08',notes:{en:['The debug checkboxes changed with use: an edge crop that came back mirrored, and a box that does not match the path the track drew \u2014 which usually means two subjects ended up sharing one id. "Wrong class" and "audio-only" left; neither was what anyone was actually reporting.'],it:['Le caselle di debug sono cambiate con l\u2019uso: un ritaglio sul bordo tornato specchiato, e un box che non coincide col percorso disegnato dalla traccia \u2014 che di solito significa due soggetti finiti sullo stesso id. Sono uscite "classe sbagliata" e "solo audio": non era quello che si segnalava davvero.']}},{version:'1.0.469',date:'2026-09-08',notes:{en:['Marking an event for debug now offers the questions that keep coming back as checkboxes, so a mark carries a question without typing one. Ticking one writes its phrase into the note; the field below still takes anything the boxes cannot say.'],it:['Marcando un evento per il debug ora trovi come caselle le domande che ricorrono, cos\xec una marcatura porta con s\xe9 una domanda senza doverla scrivere. Spuntarne una scrive la sua frase nella nota; il campo sotto accetta ancora tutto ci\xf2 che le caselle non dicono.']}},{version:'1.0.468',date:'2026-09-08',notes:{en:['The privacy-mask switch now says what is actually missing: no privacy zone is drawn on the camera. It used to give the same general "nothing is set up yet" sentence as every other control, which left no next step \u2014 and the next step is on the camera, not in this app.'],it:["L'interruttore della maschera privacy ora dice cosa manca davvero: sulla telecamera non \xe8 disegnata nessuna zona di privacy. Prima dava la stessa frase generica di ogni altro controllo, che non indicava alcun passo successivo \u2014 e il passo successivo \xe8 sulla telecamera, non in questa app."]}},{version:'1.0.467',date:'2026-09-08',notes:{en:['Unticking every event kind used to leave invisible leftovers behind, so the list stayed empty and the counters disagreed with the boxes. The leftovers are cleared, and no ticks now means no constraint.','Ticking only Faces or Plates therefore works on its own, across every kind, while narrowing them with a kind still works as before.','A collapsed group now shows a partial mark when something inside it is ticked, so nothing can be on where you cannot see it.'],it:["Togliendo la spunta a tutti i tipi di evento restavano dietro dei residui invisibili, cos\xec la lista restava vuota e i contatori non coincidevano con le caselle. I residui vengono ripuliti, e nessuna spunta adesso vuol dire nessun vincolo.","Spuntare solo Volti o Targhe funziona quindi da solo, su tutti i tipi, mentre restringerli a un tipo continua a funzionare come prima.","Un gruppo chiuso mostra adesso un segno parziale quando qualcosa al suo interno \xe8 spuntato, cos\xec niente pu\xf2 essere attivo dove non lo vedi."]}},{version:'1.0.466',date:'2026-09-08',notes:{en:['A filter that matched nothing on the first page used to stop the list from loading any further, so a narrow choice looked empty even when matches existed further back. The list now keeps reading until it finds them.','Plates were the clearest case: they sat four pages deep and were never reached. Faces happened to match early, which is why the same defect looked intermittent.','An empty list now says which kind of empty it is, and offers to load older events instead of ending the road.'],it:["Un filtro che non trovava nulla nella prima pagina impediva alla lista di caricare oltre, cos\xec una scelta stretta sembrava vuota anche quando i risultati c'erano pi\xf9 indietro. Adesso la lista continua a leggere finch\xe9 li trova.","Le targhe erano il caso pi\xf9 evidente: stavano quattro pagine pi\xf9 in l\xe0 e non venivano mai raggiunte. I volti capitavano presto, ed \xe8 per questo che lo stesso difetto sembrava intermittente.","Una lista vuota adesso dice di che vuoto si tratta, e propone di caricare gli eventi pi\xf9 vecchi invece di finire l\xec."]}},{version:'1.0.465',date:'2026-09-08',notes:{en:['The event kinds you already had \u2014 Audio, Sensor, Control \u2014 now actually filter. Ticking one shows those events, unticking hides them; there is no second filter to find, because the tree you were already using is the one that works.','Audio events start unticked, so the list opens on what you look at. A Default button puts the preset back without re-ticking everything by hand.','The chip counts what you kept in the terms you picked it in, so a default that hides one thing reads as one thing hidden.'],it:["I tipi di evento che avevi gi\xe0 \u2014 Audio, Sensore, Controllo \u2014 adesso filtrano davvero. Spuntandone uno vedi quegli eventi, togliendo la spunta li nascondi, e non c'\xe8 un secondo filtro da cercare: quello che usavi \xe8 quello che funziona.","Gli eventi audio partono senza spunta, cos\xec la lista si apre su quello che guardi. Un pulsante Predefinito rimette il preset senza dover rispuntare tutto a mano.","Il contatore conta quello che hai tenuto nei termini in cui l'hai scelto, cos\xec un default che nasconde una cosa si legge come una cosa nascosta."]}},{version:'1.0.464',date:'2026-09-07',notes:{en:['The events page can now filter by where an event came from, and audio-only events start hidden. The filter sits in More with the others, and the chip counts it, so a shorter list always says why it is shorter.','Picking a class used to drag every sensor and audio event along with it, and picking a sensor selected nothing at all. Provenance is now its own axis, so both do what they say.','The Recent strip on the Cameras screen has its own filter, in the same fan menu, showing detections by default and remembering what you choose.'],it:["La pagina eventi ora filtra anche per provenienza, e gli eventi di solo audio partono nascosti. Il filtro sta in Altro insieme agli altri e il contatore lo conta, cos\xec una lista pi\xf9 corta dice sempre perch\xe9 lo \xe8.","Scegliere una classe si portava dietro ogni evento di sensore e di audio, e scegliere un sensore non selezionava nulla. La provenienza adesso \xe8 un asse suo, quindi entrambi fanno quello che dicono.","La striscia Recenti nella schermata Camere ha un filtro suo, nello stesso menu a ventaglio, che di default mostra le rilevazioni e ricorda quello che scegli."]}},{version:'1.0.463',date:'2026-09-07',notes:{en:['One record button, the same pair of buttons everywhere: press it, then Keep \u2014 with the duration on it \u2014 or Discard. On the live picture it records forward from now; on the recording it anchors a period you draw with the scrub, in either direction.','Pressing it during playback no longer reports that the live view cannot be recorded, and the period you draw stops at the live edge instead of losing itself there.','While you are drawing a period the timeline no longer buzzes at every step: the notch feedback belongs to looking for an event, not to choosing a moment.'],it:["Un solo pulsante di registrazione, e la stessa coppia di pulsanti ovunque: premi, poi Salva \u2014 con la durata sopra \u2014 oppure Scarta. Sull'immagine live registra da adesso in avanti; sul registrato fissa un periodo che disegni con lo scorrimento, in entrambe le direzioni.","Premendolo durante la riproduzione non dice pi\xf9 che non pu\xf2 registrare la vista live, e il periodo che stai disegnando si ferma al bordo live invece di perdersi.","Mentre disegni un periodo la timeline non vibra pi\xf9 a ogni passo: lo scatto delle tacche serve a cercare un evento, non a scegliere un momento."]}},{version:'1.0.462',date:'2026-09-07',notes:{en:['Save a stretch of the recording from the timeline: press the record button during playback to anchor the period, scrub to the other end, then Save or Discard. The selected period is highlighted on the strip.','While you are choosing, the recording does not play \u2014 you see the frame you scrubbed to. Nothing is created on the hub until you press Save, and a period that crosses a stretch with no recording says so before it is exported.'],it:["Salva un tratto di registrato dalla timeline: durante la riproduzione premi il pulsante di registrazione per fissare il periodo, scorri fino all'altro estremo, poi Salva o Scarta. Il periodo selezionato \xe8 evidenziato sulla striscia.","Mentre scegli la registrazione non parte: vedi il fotogramma su cui ti sei fermato. Sull'hub non viene creato nulla finch\xe9 non premi Salva, e un periodo che attraversa un tratto senza registrazione lo dice prima di esportare."]}},{version:'1.0.461',date:'2026-09-07',notes:{en:['A host with nowhere to show a tile\'s linked-devices and view-options panels can now say so, and the embed stops drawing two buttons that would do nothing.'],it:["Un ospite che non ha dove mostrare i pannelli dispositivi collegati e opzioni di vista pu\xf2 dirlo, e l'embed smette di disegnare due pulsanti che non farebbero nulla."]}},{version:'1.0.460',date:'2026-09-06',notes:{en:['Battery and signal icons are now buttons: tapping one opens the figures \u2014 charge, power source, sleeping, link type, signal and Wi-Fi network \u2014 on the stream and in the cameras list.','What the camera does not report is said in words, never as a fabricated 0%.'],it:["Le icone di batteria e segnale sono diventate pulsanti: toccandone una si aprono i numeri \u2014 carica, alimentazione, sospensione, tipo di collegamento, segnale e rete Wi-Fi \u2014 sullo stream e nella lista camere.","Ci\xf2 che la camera non riporta viene detto a parole, mai come uno 0% inventato."]}},{version:'1.0.459',date:'2026-09-06',notes:{en:['Home Assistant cards: the embed no longer needs a viewing token in the page \u2014 Home Assistant carries it, and the events card URL stops carrying a credential.'],it:["Card di Home Assistant: l'embed non ha pi\xf9 bisogno del token nella pagina, lo porta Home Assistant, e l'URL della card eventi smette di trasportare una credenziale."]}},{version:'1.0.458',date:'2026-09-06',notes:{en:['Robot camera in landscape: with the timeline open the drive buttons move onto the visible picture and shrink to fit; the "\u2026" is gone there, the timeline has its own.'],it:['Camera del robot in landscape: con la timeline aperta i pulsanti di guida passano sul video visibile e si rimpiccioliscono; l\xec sparisce il "\u2026", la timeline ha gi\xe0 il suo.']}},{version:'1.0.457',date:'2026-09-06',notes:{en:['A restart for an update waits for the snapshot downloads in flight \u2014 the crash right after an update on build 16.'],it:['Il riavvio per un aggiornamento aspetta i download degli snapshot in corso: il crash subito dopo un aggiornamento sulla build 16.']}},{version:'1.0.456',date:'2026-09-06',notes:{en:['An OTA update asks before restarting the app.','A newer TestFlight / store build is announced, with a button to open it.',"What's new: these notes, once per version and in Settings \u2192 Info."],it:["Un aggiornamento OTA chiede conferma prima di riavviare l'app.",'Una build TestFlight / Store pi\xf9 recente viene segnalata, con il pulsante per aprirla.','Novit\xe0: queste note, una volta per versione e in Impostazioni \u2192 Info.']}},{version:'1.0.455',date:'2026-09-06',notes:{en:['Robot camera: a drive joystick in landscape, with Stop, light, Follow me and Return to dock.','The controls button opens for robot cameras too.','Battery and signal are glyphs in the toolbar; the day arrows fold on a narrow row.','A sleeping camera shows the moon in its name chip.'],it:['Camera del robot: joystick di guida in landscape, con Stop, luce, Seguimi e Torna alla base.','Il pulsante dei controlli si apre anche per le camere del robot.','Batteria e segnale sono glifi nella toolbar; le frecce del giorno si ripiegano su riga stretta.','Una camera dormiente mostra la luna nel chip del nome.']}}];function o(o){return o?e.find(e=>e.version===o)??null:null}},946,[]);
99
+ __d(function(g,r,i,a,m,_e,d){"use strict";Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"WHATS_NEW",{enumerable:!0,get:function(){return e}}),_e.whatsNewHistory=function(n){const t=o(n);return{latest:t,past:e.filter(e=>e!==t)}},_e.whatsNewFor=o,_e.whatsNewLines=function(e,o){const n=o.toLowerCase().startsWith('it')?'it':'en',t=e.notes[n];return t.length>0?t:e.notes.en},_e.shouldShowWhatsNew=function(e,n){return!!n&&(e!==n&&null!==o(n))};const e=[{version:'1.0.588',date:'2026-10-07',notes:{en:['Recorded playback in the web app runs smoothly, without stalls.','Playback controls fit on one row whenever there is room.'],it:["La riproduzione registrata nell'app web scorre senza scatti.","I controlli di riproduzione stanno su una riga quando c'\xe8 spazio."]}},{version:'1.0.587',date:'2026-10-07',notes:{en:['Full screen fills the screen in the web app.','The web app connects over your local network when it can.','Live view reaches full quality without reopening the stream.','Stream statistics can sit in any corner.'],it:["Lo schermo intero riempie lo schermo anche nell'app web.","L'app web si collega in rete locale quando pu\xf2.",'Il live passa alla qualit\xe0 piena senza riaprire lo stream.','Le statistiche dello stream possono stare in qualsiasi angolo.']}},{version:'1.0.586',date:'2026-10-06',notes:{en:['Playback controls no longer overlap; the speed menu opens on top.','Sign-in names a wrong or non-CamStack address right away.'],it:['I controlli di riproduzione non si sovrappongono; il menu velocit\xe0 si apre sopra.',"L'accesso segnala subito un indirizzo errato o non CamStack."]}},{version:'1.0.585',date:'2026-10-06',notes:{en:['The Motion order now follows real motion on every camera.','The motion border lights up again from live events.','New system notifications: node restarting and node updating.'],it:["L'ordine Motion ora segue la motion reale di ogni telecamera.",'Il bordo motion torna ad accendersi con gli eventi live.','Nuove notifiche di sistema: nodo in riavvio e nodo in aggiornamento.']}},{version:'1.0.584',date:'2026-10-06',notes:{en:['The web app opens faster and loads camera tiles quicker.','Enter signs you in; an unreachable server now says so.','Addon updates have their own system-notification group.'],it:["L'app web si apre e carica le anteprime pi\xf9 in fretta.",'Invio fa il login; un server irraggiungibile ora lo dice.','Gli aggiornamenti addon hanno un gruppo di notifiche tutto loro.']}},{version:'1.0.583',date:'2026-10-06',notes:{en:['Cameras can be sorted by latest motion.','Switch between saved servers in Settings, no sign-out needed.','Alarm settings drop the recipients list: alarm rules decide who is told.'],it:['Le telecamere si possono ordinare per ultimo movimento.','Passa da un server salvato all\u2019altro in Impostazioni, senza uscire.','Le impostazioni allarme perdono i destinatari: decidono le regole allarme.']}},{version:'1.0.582',date:'2026-10-04',notes:{en:['Stream quality chip shows the tier you picked.','Quality button no longer shows a down arrow.'],it:['Il chip qualit\xe0 mostra il livello che hai scelto.','Il pulsante qualit\xe0 non ha pi\xf9 la freccia verso il basso.']}},{version:'1.0.580',date:'2026-10-04',notes:{en:['Chosen stream quality sticks after a camera swap.','Exiting fullscreen returns the phone to portrait.','Timeline toolbar no longer wraps onto a second line.'],it:['La qualit\xe0 stream scelta resta dopo un cambio camera.','Uscendo dal fullscreen il telefono torna in verticale.','La toolbar della timeline non va pi\xf9 a capo.']}},{version:'1.0.579',date:'2026-10-03',notes:{en:['Away from home, playback always uses the lowest stream quality.'],it:['Fuori rete locale, la riproduzione usa sempre la qualit\xe0 pi\xf9 bassa.']}},{version:'1.0.578',date:'2026-10-03',notes:{en:['Event seek opens on the exact moment.','Timeline duration menu stays above its chip.','Date picker is shorter, with a Today row.'],it:['Il seek evento apre sull\u2019istante esatto.','Il menu durata resta sopra il chip.','Il selettore data \xe8 pi\xf9 basso, con la riga Oggi.']}},{version:'1.0.577',date:'2026-10-02',notes:{en:['Timeline Auto zoom follows scrub speed; slow tightens to 15 minutes.','The time-range menu includes Auto and 15 minutes.'],it:['Zoom Auto della timeline segue la velocit\xe0 di scrub; lento stringe a 15 minuti.','Il menu durata include Auto e 15 minuti.']}},{version:'1.0.576',date:'2026-10-02',notes:{en:['Filter menus open again after the timeline range fix.'],it:['I menu filtro si riaprono dopo il fix della durata timeline.']}},{version:'1.0.575',date:'2026-10-02',notes:{en:['Timeline opens on 30 minutes.','An event opens 10 seconds before it.','The time-range menu opens above the chip.'],it:['La timeline si apre su 30 minuti.','Un evento apre 10 secondi prima.','Il menu della durata si apre sopra il chip.']}},{version:'1.0.574',date:'2026-10-02',notes:{en:['Rules: Immediate, grouped waits for subjects and sends one mosaic.'],it:['Regole: Immediata raggruppata attende i soggetti e invia un mosaico.']}},{version:'1.0.573',date:'2026-10-02',notes:{en:['Alarm: opens on the first mode that checks a sensor.'],it:['Allarme: si apre sulla prima modalit\xe0 che controlla dei sensori.']}},{version:'1.0.572',date:'2026-10-02',notes:{en:['Alarm: pick a mode at the top; each mode is one short summary, its delays and its sensors sorted by name.'],it:['Allarme: scegli la modalit\xe0 in alto; ogni modalit\xe0 mostra un riepilogo breve, i suoi ritardi e i sensori in ordine di nome.']}},{version:'1.0.571',date:'2026-10-02',notes:{en:['Alarm: each mode lists only the sensors its rules cover, in the same table, rows and fields as the rest of the app.'],it:["Allarme: ogni modalit\xe0 elenca solo i sensori coperti dalle sue regole, con la stessa tabella, righe e campi del resto dell'app."]}},{version:'1.0.570',date:'2026-10-02',notes:{en:['Alarm: exit, entry and siren delays can be set per arm mode (unset modes keep the default).','Alarm: each mode lists its sensors in a table with their state and a switch to stop a sensor from blocking the arm.','Device picker: filter by device type, area and location, with a button to reset the filters.'],it:['Allarme: i ritardi di uscita, ingresso e sirena si impostano per modalit\xe0 (senza valore vale il default).','Allarme: ogni modalit\xe0 elenca i sensori in una tabella con lo stato e uno switch per non bloccare l\'inserimento.','Selezione dispositivi: filtri per tipo, area e posizione, con un pulsante per azzerarli.']}},{version:'1.0.569',date:'2026-10-01',notes:{en:['A scheduled system summary can be sent as one notification per category (offline devices, batteries, consumables, ...).','Testing a summary rule now sends the current summary.'],it:['Il riepilogo programmato di sistema pu\xf2 arrivare come una notifica per categoria (dispositivi offline, batterie, consumabili, ...).','Il test di una regola di riepilogo ora invia il riepilogo attuale.']}},{version:'1.0.568',date:'2026-10-01',notes:{en:['Deleting a rule asks for confirmation in the standard dialog.'],it:["L'eliminazione di una regola chiede conferma con la finestra standard."]}},{version:'1.0.567',date:'2026-10-01',notes:{en:['A person who steps out of frame for a few seconds stays the same track.','A track fused into another still opens from its old link.','Rule editor: the Advanced section is unified across rule kinds.','Cooldown defaults to separate windows per class.','Sensor rules attach one snapshot, not a choice of media.','The device picker lists only devices the rule kind can target.'],it:["Una persona che esce dall'inquadratura per pochi secondi resta la stessa traccia.","Una traccia fusa in un'altra si apre ancora dal suo vecchio collegamento.",'Editor regole: la sezione Avanzate \xe8 unificata per ogni tipo di regola.','Il cooldown usa di default finestre separate per classe.',"Le regole sui sensori allegano un'unica foto, senza scelta del media.",'Il selettore dispositivi mostra solo quelli compatibili con la regola.']}},{version:'1.0.566',date:'2026-10-01',notes:{en:['Rules are sorted by name, and tapping anywhere on a rule opens it.','A Snooze switch on each rule silences it for 30 minutes.','Deleting a rule asks for confirmation right on the button.','Rule conditions are all shown; source and zone crossing moved to Advanced.','Faces, zones and labels use the same Only / All except picker as classes.','Zones are listed as "camera:zone", from every camera.','Zone crossing: Entering, Leaving or Either \u2014 Entering by default.','New detection rules watch the pipeline; sounds are no longer offered as classes.','Device and scene states are shown as readable words.'],it:['Le regole sono ordinate per nome e un tocco ovunque sulla regola la apre.','Un interruttore Silenzia su ogni regola la silenzia per 30 minuti.','Eliminare una regola chiede conferma direttamente sul pulsante.','Le condizioni sono tutte visibili; sorgente e attraversamento zona sono in Avanzate.','Volti, zone ed etichette usano lo stesso selettore delle classi.','Le zone sono elencate come "camera:zona", da tutte le camere.','Attraversamento zona: In entrata, In uscita o Entrambe \u2014 In entrata di default.','Le nuove regole di rilevamento usano la pipeline; i suoni non sono pi\xf9 tra le classi.','Gli stati di dispositivi e scene sono mostrati in parole leggibili.']}},{version:'1.0.565',date:'2026-09-29',notes:{en:['The "Groups" view is gone from the timeline, Events and the Recent reel: they always list subjects now.','Summary rules no longer offer "one line is a group"; a rule that had it now lists subjects.'],it:['La vista \xabGruppi\xbb \xe8 stata rimossa da timeline, Eventi e striscia Recenti: ora mostrano sempre i soggetti.','Le regole di riepilogo non offrono pi\xf9 \xabuna riga \xe8 un gruppo\xbb; una regola che lo usava ora elenca i soggetti.']}},{version:'1.0.564',date:'2026-09-26',notes:{en:['Device and system rules can send a scheduled summary instead of one notification per event.','Summary rules show their send times in the list, e.g. "Summary \xb7 daily 08:00".','Semantic search in Events uses the server\'s own score threshold unless you set one.','On a server that does not support summaries yet, the app says the rule stayed instant and keeps its active hours.'],it:['Le regole dei dispositivi e di sistema possono inviare un riepilogo pianificato invece di una notifica per evento.','Le regole di riepilogo mostrano gli orari di invio nell\'elenco, ad es. "Riepilogo \xb7 ogni giorno 08:00".','La ricerca semantica negli Eventi usa la soglia di punteggio del server, salvo che tu ne imposti una.','Su un server che non supporta ancora i riepiloghi, l\'app avvisa che la regola \xe8 rimasta immediata e ne conserva le fasce orarie.']}},{version:'1.0.563',date:'2026-09-26',notes:{en:['Sensor rules now pick from your sensors, not cameras.',"A rule's overview lists the devices it is active on.",'Selected devices are always all shown, with no "show more".','The "off" note is gone where the switch already says it.'],it:['Le regole dei sensori ora scelgono tra i sensori, non tra le camere.','La panoramica di una regola elenca i dispositivi su cui \xe8 attiva.','I dispositivi selezionati sono sempre tutti visibili, senza "mostra altri".','Niente pi\xf9 scritta "disattivata" dove c\'\xe8 gi\xe0 l\'interruttore.']}},{version:'1.0.562',date:'2026-09-26',notes:{en:['Device rules can set their own consumable threshold (1\u201395 %).','Robot vacuum tank alerts: tank low, tank full, back to normal.'],it:['Le regole dei dispositivi possono avere una propria soglia dei consumabili (1\u201395 %).','Avvisi dei serbatoi del robot: serbatoio basso, pieno, tornato normale.']}},{version:'1.0.561',date:'2026-09-26',notes:{en:['Rules: pick All, Only these or All except these for devices and classes, with a smarter class picker.','Sensor rules can notify only when a sensor triggers, or only when it clears.','Each rule shows its last run; tap it for the delivery history (admins).','Rule cards keep the name readable, with the switch, Edit and Delete on one row.','The device picker groups by zone, location or not at all.'],it:['Regole: scegli Tutti, Solo questi o Tutti tranne questi per dispositivi e classi, con un selettore classi migliore.','Le regole dei sensori possono notificare solo quando il sensore scatta, o solo quando rientra.',"Ogni regola mostra l'ultima esecuzione; toccala per lo storico degli invii (admin).",'Le schede delle regole mostrano sempre il nome, con interruttore, Modifica ed Elimina su una riga.','Il selettore dispositivi raggruppa per zona, posizione o nessuno.']}},{version:'1.0.560',date:'2026-09-26',notes:{en:['System alerts are now three rule kinds: device events, system and alarm, each with its own settings.','System rules pick nodes and packages from a list instead of typed names.','A rule that mixes families is shown read-only, marked to recreate.'],it:['Gli avvisi di sistema sono ora tre tipi di regola: eventi dispositivi, sistema e allarme.','Le regole di sistema scelgono nodi e pacchetti da un elenco, non pi\xf9 a testo libero.','Una regola che mescola famiglie \xe8 in sola lettura, segnata da ricreare.']}},{version:'1.0.559',date:'2026-09-26',notes:{en:['Sensor rules can send one mosaic of every linked camera, or one picture per camera.','Clip thumbnails load one at a time per camera and no longer hammer it with retries.','PTZ Home is greyed out when the camera has no home position set.'],it:['Le regole dei sensori inviano un mosaico di tutte le camere collegate, o una foto per camera.','Le anteprime delle clip arrivano una alla volta per camera, senza raffiche di tentativi.','Il tasto PTZ "posizione iniziale" \xe8 disattivato se la camera non ne ha una impostata.']}},{version:'1.0.558',date:'2026-09-25',notes:{en:['Live quality now climbs on a good connection instead of staying stuck on low.','Rules for batteries and consumables have their own section.','System-event rules can exclude devices.','A new compact device picker, with search and groups.',"The alarm's non-blocking list offers every door, window and lock."],it:['La qualit\xe0 live ora sale con una buona connessione invece di restare su bassa.','Le regole per batterie e consumabili hanno una sezione dedicata.','Le regole sugli eventi di sistema possono escludere dispositivi.','Un nuovo selettore di dispositivi compatto, con ricerca e gruppi.',"La lista non bloccante dell'allarme propone ogni porta, finestra e serratura."]}},{version:'1.0.557',date:'2026-09-25',notes:{en:['Rules are edited per kind, on their own screens, like the admin UI.','Text fields offer the placeholders of that rule: tap to insert, with a live preview.','Timelapse and summary rules expose every field; admins can test a rule from the phone.','A device that no longer exists shows as "removed" and can be deselected.','Alarm: every mode, what is open when arming is refused, and Arm anyway for admins.','Disarm is always available, and admins can configure the alarm from the phone.'],it:['Le regole si modificano per tipo, su schermate dedicate, come nell\'admin UI.','I campi di testo propongono i segnaposto della regola: tocca per inserire, con anteprima.','Timelapse e riepiloghi hanno tutti i campi; gli admin possono provare una regola dal telefono.','Un dispositivo che non esiste pi\xf9 appare come "rimosso" e si pu\xf2 togliere.','Allarme: tutte le modalit\xe0, cosa \xe8 aperto quando \xe8 rifiutato, e Arma comunque per gli admin.','Disarma \xe8 sempre disponibile, e gli admin configurano l\'allarme dal telefono.']}},{version:'1.0.556',date:'2026-09-24',notes:{en:['A camera function with a warning now shows whether it is ON \u2014 the privacy mask could never look enabled.'],it:['Una funzione con un avviso ora mostra se \xe8 ACCESA: la privacy mask non poteva mai sembrarlo.']}},{version:'1.0.555',date:'2026-09-24',notes:{en:['A shutter on its way up or down makes the button you pressed pulse.'],it:['Una tapparella che sta salendo o scendendo fa pulsare il tasto che hai premuto.']}},{version:'1.0.554',date:'2026-09-24',notes:{en:['Closing clip mode returns to the recording at the moment the clip was at.','The privacy-mask switch no longer looks locked when the camera has no zone drawn.'],it:['Chiudendo la modalit\xe0 clip si torna alla registrazione nel punto in cui era la clip.',"L'interruttore della privacy mask non sembra pi\xf9 bloccato quando la camera non ha zone disegnate."]}},{version:'1.0.553',date:'2026-09-24',notes:{en:['Recordings read the source each camera is set to, and you can pick it per camera.','The camera reel says it is loading instead of looking like you own one camera.'],it:['Le registrazioni leggono la sorgente impostata per ogni camera, e la scegli tu camera per camera.','La striscia delle camere dice che sta caricando, invece di sembrare che ne hai una sola.']}},{version:'1.0.552',date:'2026-09-24',notes:{en:['A clip the camera cut short now says so, with how much arrived.'],it:['Una clip che la camera ha troncato ora lo dice, e quanto ne \xe8 arrivato.']}},{version:'1.0.551',date:'2026-09-24',notes:{en:['A clip silent because of the speed now says so, on the speaker.','Recorded playback reaches 8\xd7.'],it:['Una clip muta per via della velocit\xe0 ora lo dice, sull\u2019altoparlante.','La riproduzione delle registrazioni arriva a 8\xd7.']}},{version:'1.0.550',date:'2026-09-23',notes:{en:['Renaming a linked device is a field in the row now, and no longer hangs the app.'],it:['Rinominare un dispositivo collegato si fa nella riga, e non blocca pi\xf9 l\u2019app.']}},{version:'1.0.549',date:'2026-09-23',notes:{en:['Turning the sound back on now really turns it back on, clips included.'],it:['Riaccendere l\u2019audio ora lo riaccende davvero, clip comprese.']}},{version:'1.0.548',date:'2026-09-23',notes:{en:['In a linked device\u2019s edit mode, the name now looks tappable \u2014 it always was.'],it:['Nella modifica di un dispositivo collegato il nome ora si vede che si tocca.']}},{version:'1.0.547',date:'2026-09-23',notes:{en:['A clip now repeats when it ends. There is a loop switch beside the transport.','A clip that simply finished no longer looks like a fault.'],it:['Una clip ora si ripete alla fine. L\u2019interruttore \xe8 accanto ai comandi.','Una clip che \xe8 semplicemente finita non sembra pi\xf9 un errore.']}},{version:'1.0.546',date:'2026-09-23',notes:{en:['Tapping a clip brings it to the middle of the timeline.','Reolink clips play again \u2014 the camera was being asked with the wrong handle.'],it:['Toccare una clip la porta al centro della linea del tempo.','Le clip Reolink ripartono: chiedevamo alla camera con la maniglia sbagliata.']}},{version:'1.0.545',date:'2026-09-23',notes:{en:['The cursor moves as you drag away from live, not when you let go.','The speed menu lists only the speeds your camera has, with no note.','A camera recorded on events opens on its clips.'],it:['Il cursore si sposta mentre trascini via dal live, non quando lasci.','Il menu velocit\xe0 elenca solo quelle che la camera ha, senza scritte.','Una camera registrata a eventi si apre sulle sue clip.']}},{version:'1.0.544',date:'2026-09-23',notes:{en:['Tapping a clip sends one command to the camera instead of two.'],it:['Toccare una clip manda un comando solo alla camera invece di due.']}},{version:'1.0.543',date:'2026-09-23',notes:{en:['The cursor now slides between its two positions instead of jumping there.','Hikvision clips no longer stop after a few seconds.'],it:['Il cursore ora scivola fra le sue due posizioni invece di saltarci.','Le clip Hikvision non si fermano pi\xf9 dopo qualche secondo.']}},{version:'1.0.542',date:'2026-09-23',notes:{en:['Away from live the cursor sits mid-screen, so a cluster you tap fits on it.','Previous updates are tucked behind one panel, leaving the newest room to breathe.'],it:['Lontano dal live il cursore sta a met\xe0 schermo, cos\xec il cluster che tocchi ci sta tutto.','Gli aggiornamenti precedenti stanno dietro un pannello, e il pi\xf9 recente ha spazio.']}},{version:'1.0.541',date:'2026-09-23',notes:{en:['While a clip plays the timeline stays put: no cursor, and scrolling does nothing.','Scrolling to the top of a clip list no longer jumps you back to live.'],it:['Mentre una clip gira la linea del tempo sta ferma: niente cursore, e scorrere non fa nulla.','Scorrere in cima a una lista di clip non ti riporta pi\xf9 al live.']}},{version:'1.0.540',date:'2026-09-23',notes:{en:['The oldest clips can be scrolled under the cursor again.','The cursor reads the clip on the frame, not a time it is not at.','The timeline follows the clip that is playing; drag it and it lets go.'],it:['Le clip pi\xf9 vecchie si possono di nuovo portare sotto il cursore.','Il cursore legge la clip nel riquadro, non un orario che non le appartiene.','La linea del tempo segue la clip in riproduzione; se la trascini, si sgancia.']}},{version:'1.0.539',date:'2026-09-23',notes:{en:['The timeline follows the clip that is playing, and stops when you drag it.','Speeds a camera cannot really do are greyed out instead of pretending.','Download now asks which quality, and the file lands in your exports.','A clip you have not seen before gets a picture, taken from its middle.','Clips that would not start on the studio and laundry cameras now do.'],it:['La linea del tempo segue la clip in riproduzione e si ferma se la trascini.','Le velocit\xe0 che una telecamera non sa fare sono spente invece di fingere.','Il download ora chiede la qualit\xe0, e il file finisce nelle esportazioni.','Una clip mai vista prima ora ha una foto, presa dal suo centro.','Le clip che non partivano su studio e lavanderia adesso partono.']}},{version:'1.0.538',date:'2026-09-23',notes:{en:['A camera that just woke no longer shows its old sleeping snapshot.','The speed menu opens upward, so it no longer covers the clip track.','Clip controls now offer only what the camera can really do.','Tapping anywhere outside a grid panel closes it.'],it:['Una telecamera appena sveglia non mostra pi\xf9 la vecchia foto di quando dormiva.','Il menu della velocit\xe0 si apre verso l\u2019alto e non copre pi\xf9 la barra della clip.','I comandi delle clip offrono solo ci\xf2 che la telecamera sa fare davvero.','Toccando fuori da un pannello della griglia, il pannello si chiude.']}},{version:'1.0.537',date:'2026-09-22',notes:{en:['A clip tapped while the player is starting now plays, instead of the live view.'],it:['Una clip toccata mentre il player sta partendo adesso parte davvero, invece del live.']}},{version:'1.0.536',date:'2026-09-22',notes:{en:['One devices panel everywhere, with the camera functions under it.','Edit that panel: reorder, rename, re-icon, hide, and add your own devices.','Linked devices are now edited in the admin UI, not here.','The privacy-mask switch works with no zones drawn.','A clip\u2019s progress bar no longer snaps forward when dragged back.','157 icons to choose from, with search.'],it:['Un solo pannello dispositivi ovunque, con sotto le funzioni della telecamera.','Modifica quel pannello: riordina, rinomina, cambia icona, nascondi e aggiungi dispositivi tuoi.','I dispositivi collegati si modificano dall\u2019interfaccia admin, non pi\xf9 da qui.','L\u2019interruttore della maschera privacy funziona anche senza zone disegnate.','La barra di una clip non scatta pi\xf9 in avanti se la trascini indietro.','157 icone fra cui scegliere, con ricerca.']}},{version:'1.0.535',date:'2026-09-22',notes:{en:['Clips start faster. When a camera\u2019s list comes up, the hub now fetches its newest few clips in the background, so the first ones you open are already there \u2014 on a hub camera that was a 6\u20138 s wait per clip, now a fraction of a second. Never on a battery camera that would have to wake for it.','Opening a clip now shows that it is loading: the ring around the play button turns while the file is being fetched and stops when it plays. Before, the frame just sat there until the clip appeared.','The quality badge by the play button now works on the web too. It used to show only in the app.','A live recording in progress stops when you open a clip, and asks whether to keep what it captured. It used to keep recording the clip as if it were the live picture.','Tapping a clip plays the clip. It used to start the live view instead: the command was sent once, at the tap, and the player is created BY that tap \u2014 so it arrived before there was anything to receive it, and what came up was the live edge. Previous/next clip fell in the same hole, which is why they appeared to do nothing.'],it:['Le clip partono pi\xf9 in fretta. Quando compare la lista di una telecamera, l\u2019hub scarica in sottofondo le sue clip pi\xf9 recenti, cos\xec le prime che apri sono gi\xe0 pronte \u2014 su una telecamera dell\u2019hub erano 6\u20138 s di attesa a clip, ora una frazione di secondo. Mai su una telecamera a batteria che dovrebbe svegliarsi per farlo.','Aprire una clip adesso mostra che sta caricando: l\u2019anello attorno al tasto play gira mentre il file viene scaricato e si ferma quando parte. Prima il riquadro restava fermo finch\xe9 la clip non compariva.','Il badge della qualit\xe0 accanto al tasto play adesso funziona anche sul web. Prima compariva solo nell\u2019app.','Una registrazione live in corso si ferma quando apri una clip, e chiede se tenere quanto catturato. Prima continuava a registrare la clip come se fosse il live.','Toccare una clip riproduce la clip. Prima partiva il live: il comando veniva inviato una volta sola, al tocco, e il player nasce PROPRIO da quel tocco \u2014 quindi arrivava prima che ci fosse qualcosa ad ascoltarlo, e a schermo veniva il live. Clip precedente/successiva cadevano nello stesso buco, ed \xe8 per questo che sembravano non fare nulla.']}},{version:'1.0.534',date:'2026-09-22',notes:{en:['A clip in the frame now shows where you are inside it: a position track under the transport, with the file\u2019s real length once the hub has measured it, and a drag along it that seeks inside the clip. While the length is not known yet the track says so instead of pretending the file is empty.','Go live now really leaves the clip \u2014 the frame goes back to the live view (or the poster, on a battery camera). Previous/next still keep you in the list.','Play/pause on a clip is the clip\u2019s own pause. Opened from the live edge, it used to run the live pause instead, which took the player down and the clip with it.','Seeking inside a clip stays inside the clip. A release used to land on the recorder\u2019s footage at a nonsense moment and the file was gone.','A clip in the frame now keeps its controls. Play/pause, speed, frame-step, previous/next clip and Go live are all there \u2014 before, opening a clip took the whole bar away, because the bar was asking whether the picture was live and a clip leaves the session exactly where it was.','A camera whose current day is empty now looks back by itself, up to fourteen days, and says how far it has got. It used to show \u201cNo clips\u201d straight away and only reveal the earlier ones once you dragged the list by hand.','When a source cannot answer, the reason is now printed. The sentence used to arrive with the placeholder still in it.'],it:['Una clip nel riquadro adesso mostra a che punto sei: una traccia di posizione sotto i controlli, con la durata reale del file appena l\u2019hub l\u2019ha misurata, e un trascinamento lungo la traccia per cercare dentro la clip. Finch\xe9 la durata non \xe8 nota la traccia lo dice, invece di fingere che il file sia vuoto.','Vai al live adesso esce davvero dalla clip \u2014 il riquadro torna al live (o al poster, su una telecamera a batteria). Precedente/successiva restano nella lista.','Play/pausa su una clip \xe8 la pausa della clip. Aperta dal live, prima eseguiva la pausa del live, che smontava il player e con lui la clip.','Cercare dentro una clip resta dentro la clip. Prima il rilascio finiva sulle registrazioni in un istante senza senso e il file spariva.','Una clip nel riquadro adesso mantiene i suoi controlli. Play/pausa, velocit\xe0, avanzamento a fotogramma, clip precedente/successiva e Vai al live ci sono tutti \u2014 prima aprire una clip faceva sparire l\u2019intera barra, perch\xe9 la barra chiedeva se l\u2019immagine fosse il live e una clip lascia la sessione esattamente dov\u2019era.','Una telecamera il cui giorno corrente \xe8 vuoto adesso cerca da sola nei giorni precedenti, fino a quattordici, e dice a che punto \xe8 arrivata. Prima mostrava subito \u201cNessuna clip\u201d e le pi\xf9 vecchie comparivano solo trascinando la lista a mano.','Quando una sorgente non pu\xf2 rispondere, adesso il motivo viene scritto. Prima la frase arrivava con il segnaposto ancora dentro.']}},{version:'1.0.533',date:'2026-09-21',notes:{en:['While a clip is playing, the time around the picture is the clip\u2019s own. It used to keep showing wherever the timeline had been left, which made a card from the afternoon sit under a frame claiming the evening \u2014 and made the list look wrong when it was not.'],it:['Mentre una clip \xe8 in riproduzione, l\u2019ora attorno all\u2019immagine \xe8 quella della clip. Prima continuava a mostrare il punto in cui era rimasta la timeline, cos\xec una scheda del pomeriggio finiva sotto un riquadro che dichiarava la sera \u2014 e faceva sembrare sbagliata la lista, che non lo era.']}},{version:'1.0.532',date:'2026-09-21',notes:{en:['A camera that was asleep is no longer woken after a clip finishes. Playing a clip brings the player up, and until now nothing took that reason away again \u2014 so the player stayed up and the live stream started by itself.'],it:['Una camera che dormiva non viene pi\xf9 svegliata quando una clip finisce. Riprodurre una clip accende il player, e finora nulla toglieva pi\xf9 quel motivo \u2014 cos\xec il player restava acceso e la diretta partiva da sola.']}},{version:'1.0.531',date:'2026-09-21',notes:{en:['Clips from a camera\u2019s own storage play, instead of flashing for an instant and stopping. The hub was asking the wrong source for the file \u2014 CamStack\u2019s own recorder, which has no file behind a clip the camera wrote \u2014 because nothing said which source the clip came from.'],it:['Le clip dall\u2019archivio della camera si riproducono, invece di lampeggiare un istante e fermarsi. L\u2019hub chiedeva il file alla sorgente sbagliata \u2014 il registratore di CamStack, che dietro una clip scritta dalla camera non ha alcun file \u2014 perch\xe9 nessuno diceva da quale sorgente venisse la clip.']}},{version:'1.0.530',date:'2026-09-21',notes:{en:['Clips from a camera\u2019s own storage play. On a camera that is asleep the player is deliberately kept down so nothing wakes it, and the command to play a clip was dropped into that gap without a word. A clip now brings the player up and opens straight on the file \u2014 the camera is never dialled.'],it:['Le clip dall\u2019archivio della camera si riproducono. Su una camera che dorme il player resta spento apposta perch\xe9 nulla la svegli, e il comando per riprodurre una clip finiva in quel vuoto senza una parola. Ora una clip accende il player e apre direttamente sul file \u2014 la camera non viene mai contattata.']}},{version:'1.0.529',date:'2026-09-21',notes:{en:['The download button on a clip says it is working. It fetches a file of several megabytes, and until now a press looked exactly like a press that did nothing.'],it:['Il pulsante di scaricamento su una clip dice che sta lavorando. Scarica un file di diversi megabyte, e finora premerlo era identico a premere qualcosa che non fa niente.']}},{version:'1.0.528',date:'2026-09-21',notes:{en:['In the clips view the timeline no longer seeks while you scroll. Browsing the list moves the list and nothing else \u2014 the rule was written months ago and only one of its four parts was ever obeyed.'],it:['Nella vista clip la timeline non cerca pi\xf9 mentre scorri. Sfogliare la lista muove la lista e nient\u2019altro \u2014 la regola era scritta da mesi e di quattro sue parti ne veniva rispettata una.']}},{version:'1.0.527',date:'2026-09-21',notes:{en:['Clip thumbnails appear. They were being requested without the session\u2019s credentials, so the hub refused every one of them and the cards went black \u2014 a clip still now gets its credentials from the same single place as every other image on the timeline.'],it:['Le miniature delle clip compaiono. Venivano richieste senza le credenziali della sessione, quindi l\u2019hub le rifiutava tutte e le schede restavano nere \u2014 ora un\u2019immagine di clip prende le credenziali dallo stesso unico posto di ogni altra immagine della timeline.']}},{version:'1.0.526',date:'2026-09-21',notes:{en:['Clip thumbnails render, and the second look at a clip is instant. A still the camera already holds now goes straight to the image cache with the session\u2019s credentials, so it is kept on the device instead of being downloaded and re-encoded every time \u2014 and it no longer trips the limit that printed an error across every card.'],it:['Le miniature delle clip si vedono, e riaprire una clip \xe8 istantaneo. Un\u2019immagine che la camera ha gi\xe0 va ora direttamente alla cache immagini con le credenziali della sessione, quindi resta sul dispositivo invece di essere riscaricata e ricodificata ogni volta \u2014 e non incappa pi\xf9 nel limite che stampava un errore su ogni scheda.']}},{version:'1.0.525',date:'2026-09-21',notes:{en:['Clips from a camera\u2019s own storage get their thumbnails back. Those rows carry a still the camera already holds, and the card was only ever passed the OTHER kind of address \u2014 so no thumbnail was ever requested, on any of them.'],it:['Le clip dall\u2019archivio della camera ritrovano le loro miniature. Quelle righe portano un\u2019immagine che la camera ha gi\xe0, e alla scheda veniva passato solo l\u2019ALTRO tipo di indirizzo \u2014 quindi nessuna miniatura veniva mai richiesta, su nessuna di esse.']}},{version:'1.0.524',date:'2026-09-21',notes:{en:['While a clip is playing in the camera\u2019s picture, the timeline no longer drives the player. Scrolling used to re-arm a seek into the live session behind the clip, which left the picture loading on cameras that record only on events.','The clip surface now reports what it did \u2014 how many rows a list returned, how many stills were served, queued or refused, and what playback resolved to \u2014 so a camera whose clips do not appear can be diagnosed from the logs instead of guessed at.'],it:['Mentre una clip \xe8 in riproduzione nell\u2019immagine della camera, la timeline non pilota pi\xf9 il player. Prima lo scorrimento riarmava una ricerca sulla sessione dal vivo dietro la clip, e l\u2019immagine restava in caricamento sulle camere che registrano solo a eventi.','La superficie clip ora riferisce quel che ha fatto \u2014 quante righe ha restituito un elenco, quante miniature sono state servite, messe in coda o rifiutate, e a cosa si \xe8 risolta la riproduzione \u2014 cos\xec una camera le cui clip non compaiono si diagnostica dai log invece che a intuito.']}},{version:'1.0.523',date:'2026-09-21',notes:{en:['The camera dot no longer claims a camera is not recording when it simply could not be asked. A recording state that failed to load now shows as unknown, in grey, instead of the green of a camera that is idle \u2014 and the timeline says the same about a footage band it could not read.','A finger bouncing off the glass at the end of a pinch no longer advances the zoom a step.','Zooming into a camera no longer follows you out of it: the zoom resets when you open a camera, instead of surviving until the app is killed.'],it:['Il pallino della camera non afferma pi\xf9 che una camera non registra quando semplicemente non \xe8 riuscito a chiederlo. Uno stato di registrazione che non si \xe8 caricato ora appare come sconosciuto, in grigio, invece del verde di una camera ferma \u2014 e la timeline dice lo stesso di una fascia di filmato che non ha potuto leggere.','Un dito che rimbalza sul vetro alla fine di una pizzicata non fa pi\xf9 avanzare lo zoom di un gradino.','Lo zoom su una camera non ti segue pi\xf9 fuori: si azzera all\u2019apertura di una camera, invece di sopravvivere finch\xe9 l\u2019app non viene chiusa.']}},{version:'1.0.522',date:'2026-09-21',notes:{en:['Previous and next clip are on the playback controls. While a clip is playing in the camera\u2019s picture, the two skip buttons step between clips instead of jumping ten seconds \u2014 inside a clip, what comes before and after is another clip.'],it:['Clip precedente e successiva sono nei comandi di riproduzione. Mentre una clip \xe8 in riproduzione nell\u2019immagine della camera, i due pulsanti laterali passano da una clip all\u2019altra invece di saltare dieci secondi \u2014 dentro una clip, ci\xf2 che viene prima e dopo \xe8 un\u2019altra clip.']}},{version:'1.0.521',date:'2026-09-21',notes:{en:['The side navigation is icons only. Beside the picture there was never room for the words, so they were being cut off mid-name; the bar along the bottom, which has the whole width, keeps its labels.','The playback controls now fit the panel they are in. They were sized against the whole window rather than the box around them, so on a narrow panel the rightmost controls ran off the edge instead of stepping aside.'],it:['La navigazione laterale \xe8 a sole icone. Di fianco all\u2019immagine lo spazio per le parole non c\u2019\xe8 mai stato, e i nomi venivano tagliati a met\xe0; la barra in basso, che ha tutta la larghezza, mantiene le sue etichette.','I comandi di riproduzione ora stanno nel pannello che li contiene. Erano dimensionati sull\u2019intera finestra invece che sul riquadro attorno a loro, quindi su un pannello stretto quelli a destra uscivano dal bordo invece di farsi da parte.']}},{version:'1.0.520',date:'2026-09-21',notes:{en:['Settings templates now keep themselves up to date. Save one from the device you set up the way you like, mark that device as the one that keeps it current, and any other device can follow it \u2014 it takes the newest version on its own, including a template someone else in the house made. A following device is read-only on the shared settings: the template wins.','The rows that only mean something on a phone or tablet \u2014 build number, runtime, running bundle \u2014 are no longer shown in the desktop app, where there is no native build behind them.'],it:['I template delle impostazioni ora si mantengono aggiornati da soli. Salvane uno dal dispositivo che hai configurato come vuoi, segna quel dispositivo come quello che lo tiene aggiornato, e qualunque altro pu\xf2 seguirlo \u2014 prende l\u2019ultima versione da solo, anche un template fatto da un\u2019altra persona di casa. Un dispositivo che segue \xe8 in sola lettura sulle impostazioni condivise: vince il template.','Le righe che hanno senso solo su telefono o tablet \u2014 numero di build, runtime, bundle in esecuzione \u2014 non compaiono pi\xf9 nell\u2019app desktop, dove non c\u2019\xe8 una build nativa dietro.']}},{version:'1.0.518',date:'2026-09-21',notes:{en:['A camera that simply has no clips of a kind no longer looks broken. HomeKit clips were showing as a failure with a retry button on cameras HomeKit has never recorded \u2014 which retrying could never fix. The source already explains itself, and the app now shows that explanation instead of an error. A real fault still shows as a fault.'],it:['Una camera che semplicemente non ha clip di un certo tipo non sembra pi\xf9 rotta. Le clip HomeKit comparivano come errore con un pulsante Riprova su camere che HomeKit non ha mai registrato \u2014 e riprovare non poteva cambiarlo. La sorgente si spiega gi\xe0 da s\xe9, e ora l\u2019app mostra quella spiegazione invece di un errore. Un guasto vero continua a comparire come guasto.']}},{version:'1.0.517',date:'2026-09-21',notes:{en:['A clip from the camera now plays in the camera\u2019s own picture, not in a panel on top of it. It is the same player and the same connection the live view and the recorded timeline already use \u2014 so the controls under it are its controls, and going live leaves the clip. A clip that is only ever a link still opens in its own panel, because there is nothing for the player to fetch.'],it:['Una clip della camera ora si riproduce nell\u2019immagine della camera stessa, non in un pannello sopra. \xc8 lo stesso player e la stessa connessione che gi\xe0 usano la diretta e la timeline registrata \u2014 quindi i comandi sotto sono i suoi comandi, e tornare in diretta esce dalla clip. Una clip che \xe8 solo un collegamento continua ad aprirsi nel suo pannello, perch\xe9 non c\u2019\xe8 nulla che il player possa scaricare.']}},{version:'1.0.516',date:'2026-09-21',notes:{en:['The clip list no longer disappears while it is loading. Scrolling could take the list off the screen and leave a loading message in its place \u2014 the rows were being dropped whenever anything upstream flickered, not only when a new window was being read. What is on screen now stays on screen until there is an answer to replace it, and a list that is genuinely empty still says so.'],it:['L\u2019elenco delle clip non sparisce pi\xf9 mentre carica. Scorrendo poteva togliere la lista dallo schermo lasciando al suo posto un messaggio di caricamento \u2014 le righe venivano buttate a ogni sfarfallio a monte, non solo quando si leggeva una finestra nuova. Ora ci\xf2 che \xe8 a schermo ci resta finch\xe9 non arriva una risposta che lo sostituisca, e un elenco davvero vuoto continua a dirlo.']}},{version:'1.0.515',date:'2026-09-21',notes:{en:['Clip thumbnails appear straight away. The hub already held a finished picture for almost every clip \u2014 275 of 300 on one camera \u2014 and the app ignored it, asking the camera to cut a fresh one out of the video file instead, one at a time, in a queue. It now uses the picture that already exists and only asks for one to be made when there genuinely is none.'],it:['Le miniature delle clip compaiono subito. L\u2019hub aveva gi\xe0 pronta l\u2019immagine per quasi ogni clip \u2014 275 su 300 di una camera \u2014 e l\u2019app la ignorava, chiedendo invece alla camera di ritagliarne una nuova dal file video, una alla volta, in coda. Ora usa l\u2019immagine che esiste gi\xe0 e ne fa produrre una solo quando davvero non c\u2019\xe8.']}},{version:'1.0.514',date:'2026-09-21',notes:{en:['Scrolling the clip list no longer sticks on loading. Reaching the oldest end buys another day of history, and the list was buying one from a scroll it had caused itself: a wider window has no cards yet, an empty body collapses, and collapsing snaps the position \u2014 which counted as reaching the end again. Measured at twenty-nine days bought with no finger on the screen. A day of history is now bought by a touch.','A clip\u2019s still stays once it has arrived. The list only keeps the tiles near what you are looking at, so an ordinary scroll was throwing away pictures the camera had already been asked for, and asking again put them back at the end of the queue \u2014 the camera makes one at a time. They are now kept across scrolling, leaving the list and coming back.'],it:['Scorrendo l\u2019elenco delle clip non resta pi\xf9 bloccato sul caricamento. Arrivare in fondo compra un altro giorno di storia, e l\u2019elenco se lo comprava da uno scorrimento causato da s\xe9: una finestra pi\xf9 larga non ha ancora schede, un corpo vuoto si accorcia, e accorciandosi fa scattare la posizione \u2014 che contava come essere di nuovo in fondo. Misurati ventinove giorni comprati senza un dito sullo schermo. Ora un giorno di storia si compra con un tocco.','La miniatura di una clip resta, una volta arrivata. L\u2019elenco tiene montate solo le schede vicine a ci\xf2 che guardi, quindi un normale scorrimento buttava via immagini gi\xe0 chieste alla camera, e richiederle le rimetteva in fondo alla coda \u2014 la camera ne produce una alla volta. Ora si conservano scorrendo, uscendo dall\u2019elenco e tornandoci.']}},{version:'1.0.513',date:'2026-09-20',notes:{en:['Fixes a camera becoming unusable after opening a clip \u2014 continuous vibration and a frozen timeline. Two separate loops caused it. The timeline asks to return to live whenever its list sits at the newest end, and it stops asking once it gets there; the clip mode added yesterday could not be left that way, so the request repeated for ever and each repeat buzzed. It showed up on a sleeping battery camera with few clips, whose short list sits at that end permanently, and never on a mains camera with hundreds. The clip no longer takes over the camera\u2019s frame at all, which removes the cause rather than muting it.','A clip tile\u2019s still now arrives instead of staying blank. The camera mints one still at a time, so on a page of sixty most requests are told to come back \u2014 and the app was treating that like a refusal. It now waits and asks again, spread out so the tiles do not collide, and gives up with a reason rather than silently.'],it:['Corregge una camera che diventava inutilizzabile dopo l\u2019apertura di una clip \u2014 vibrazione continua e timeline bloccata. Le cause erano due cicli distinti. La timeline chiede di tornare al live ogni volta che la sua lista \xe8 sull\u2019estremo pi\xf9 recente, e smette di chiederlo una volta arrivata; la modalit\xe0 clip introdotta ieri non poteva essere abbandonata in quel modo, quindi la richiesta si ripeteva all\u2019infinito e ogni ripetizione vibrava. Si vedeva su una camera a batteria addormentata con poche clip, la cui lista corta sta sempre su quell\u2019estremo, e mai su una camera a rete con centinaia. La clip non occupa pi\xf9 il riquadro della camera, il che elimina la causa invece di zittirla.','La miniatura di una clip ora arriva invece di restare vuota. La camera ne produce una alla volta, quindi su una pagina da sessanta la maggior parte delle richieste riceve un \u201ctorna fra poco\u201d \u2014 e l\u2019app lo trattava come un rifiuto. Ora aspetta e richiede, distanziando i tentativi perch\xe9 non si scontrino, e si arrende dicendo il motivo invece che in silenzio.']}},{version:'1.0.512',date:'2026-09-20',notes:{en:['A camera\u2019s own clip now plays in the camera\u2019s own frame instead of a separate window, and repeats. While it does, the timeline\u2019s transport, heatmap and position line are gone \u2014 there is nothing for them to point at, and an empty scrubber still takes a drag that seeks the wrong footage. Arrows step to the previous and next clip, skipping any the camera cannot serve, and closing puts the frame back on exactly what it was showing rather than jumping to live \u2014 which on a battery camera would be a wake nobody asked for. A clip still being recorded plays once and says why it does not repeat: its end time is a guess the camera has not updated yet.','Each clip tile has a save control where the cluster magnifier normally sits. It asks for the full-size copy, because that is the one worth keeping \u2014 the opposite of what the frame plays, which is deliberately the small one. A clip the camera cannot serve shows the control disabled with the camera\u2019s own reason rather than hiding it.'],it:['Una clip della camera ora si riproduce nel riquadro della camera stessa invece che in una finestra separata, e si ripete. Mentre gira, il trasporto della timeline, la mappa di densit\xe0 e la linea di posizione spariscono: non hanno niente da indicare, e una barra vuota accetta comunque un trascinamento che cerca nel materiale sbagliato. Le frecce passano alla clip precedente e successiva saltando quelle che la camera non riesce a servire, e chiudendo il riquadro torna esattamente a ci\xf2 che mostrava invece di saltare al live \u2014 che su una camera a batteria sarebbe un risveglio che nessuno ha chiesto. Una clip ancora in registrazione si riproduce una volta e dice perch\xe9 non si ripete: la sua fine \xe8 una stima che la camera non ha ancora aggiornato.','Ogni riquadro di clip ha un comando di salvataggio dove di solito sta la lente del gruppo. Chiede la copia a piena dimensione, perch\xe9 \xe8 quella che vale la pena tenere \u2014 il contrario di quella che il riquadro riproduce, che \xe8 deliberatamente la piccola. Una clip che la camera non riesce a servire mostra il comando disattivato con il motivo della camera, invece di nasconderlo.']}},{version:'1.0.511',date:'2026-09-20',notes:{en:['Cameras that keep their own recordings \u2014 on an SD card, or on a Reolink hub \u2014 now show those clips in the app. Pick the source under Timeline \u2192 Clip source; the row only appears on a camera that actually has more than one. Tapping a clip plays the camera\u2019s own file, at the small copy rather than the one thirty times its size, in the same player a saved export opens in. Leaving the setting on CamStack recordings keeps the timeline exactly as it was.'],it:['Le camere che conservano registrazioni proprie \u2014 su scheda SD, o su un hub Reolink \u2014 ora mostrano quelle clip nell\u2019app. La sorgente si sceglie in Timeline \u2192 Sorgente clip, e la riga compare solo su una camera che ne ha davvero pi\xf9 di una. Toccando una clip si riproduce il file della camera stessa, nella copia piccola invece di quella trenta volte pi\xf9 pesante, nello stesso player con cui si apre un export salvato. Lasciando l\u2019impostazione su Registrazioni CamStack la timeline resta esattamente com\u2019era.']}},{version:'1.0.510',date:'2026-09-20',notes:{en:['A single camera\u2019s live view now recovers from a freeze on its own. A stream whose picture stops is not an errored stream \u2014 the connection stays up and the player still reports that it is playing \u2014 so every recovery path in the app slept through it, and pressing pause and then play was the only way out. That gesture worked because the session could always be rebuilt; what was missing was anything that decided to. The grid already healed itself this way; the single-camera view never did.','Animal, vehicle and audio labels on the Events page are translated. The translations were never missing: the app asked each camera which classes it advertises and printed the raw English id whenever that list did not carry one \u2014 which happens whenever a camera has its animal or vehicle group switched off while older events still mention a dog, whenever that per-camera list is still loading, and for every raw label the audio classifier produces. A label now falls back to its family and, in the last resort, shows the original word rather than a blank.'],it:['La vista dal vivo di una singola camera ora riparte da sola quando si blocca. Uno stream la cui immagine si ferma non \xe8 uno stream in errore \u2014 la connessione resta su e il player continua a dire che sta riproducendo \u2014 quindi tutti i percorsi di recupero dell\u2019app ci dormivano sopra, e premere pausa e poi play era l\u2019unico modo per uscirne. Quel gesto funzionava perch\xe9 la sessione si poteva sempre ricostruire; mancava solo qualcuno che decidesse di farlo. La griglia si curava gi\xe0 cos\xec, la vista a camera singola no.','Le etichette di animali, veicoli e audio nella pagina Eventi sono tradotte. Le traduzioni non erano mai mancate: l\u2019app chiedeva a ogni camera quali classi dichiara e stampava l\u2019identificativo inglese grezzo ogni volta che quella lista non ne conteneva una \u2014 cosa che succede quando una camera ha il gruppo animali o veicoli spento mentre lo storico parla ancora di un cane, quando quella lista sta ancora caricando, e per ogni etichetta grezza prodotta dal classificatore audio. Ora un\u2019etichetta ripiega sulla sua famiglia e, in ultima istanza, mostra la parola originale invece del vuoto.']}},{version:'1.0.509',date:'2026-09-19',notes:{en:['The timeline column on a tablet is wider, because its toolbar had stopped fitting: the row had wrapped onto a second line and the menu that opens from it was clipped by the column\u2019s edge. The second line was eating the space the timeline itself needs.'],it:['La colonna della timeline su tablet \xe8 pi\xf9 larga, perch\xe9 la sua barra non ci stava pi\xf9: la riga era andata a capo su due righe e il menu che si apre da l\xec veniva tagliato dal bordo della colonna. La seconda riga si mangiava lo spazio che serve alla timeline stessa.']}},{version:'1.0.508',date:'2026-09-19',notes:{en:['The stream numbers on the camera card now actually arrive. They were being measured once a second and thrown away on the way in: the app checks incoming messages for a stats reply, and it was matching any message that merely mentioned stats \u2014 which every sample does. So the card said "no measurement yet" on every camera, permanently, while the data was arriving the whole time.'],it:['I numeri dello stream sulla scheda della telecamera adesso arrivano davvero. Venivano misurati una volta al secondo e buttati via all\u2019ingresso: l\u2019app controlla nei messaggi in arrivo se \xe8 una risposta di statistiche, e accettava qualunque messaggio che nominasse le statistiche \u2014 cosa che ogni campione fa. Cos\xec la scheda diceva \u201cnessuna misura ancora\u201d su ogni telecamera, per sempre, mentre i dati arrivavano da subito.']}},{version:'1.0.507',date:'2026-09-19',notes:{en:['A camera that reports neither a battery nor a link now gets a chart glyph of its own, which opens the same card and its stream numbers. Those cameras had no badge at all, so the card could not be opened on them \u2014 the permanently-powered, wired ones, which are exactly the cameras you are most likely to be investigating.'],it:['Una telecamera che non riporta n\xe9 batteria n\xe9 collegamento adesso ha un\u2019icona a grafico tutta sua, che apre la stessa scheda e i suoi numeri dello stream. Su quelle telecamere non c\u2019era nessuna icona, quindi la scheda non si poteva aprire \u2014 e sono le telecamere fisse alimentate, cio\xe8 proprio quelle su cui \xe8 pi\xf9 probabile che tu stia indagando.']}},{version:'1.0.506',date:'2026-09-19',notes:{en:['The stream numbers moved to where you can reach them. Tap the battery or link glyph on a camera and the card now also carries the stream: the verdict first \u2014 is a frozen picture the network or the decoder? \u2014 then the evidence. Frames decoded and whether they are still advancing, freezes and how long they lasted, key-frame requests, loss, latency and the connection path; and from the hub, which profile you are actually being served, whether that stream is native or transcoded here, which node ingests it, and why the quality ladder last moved. The pill on the picture stays as it is: on a phone the panel behind it could never be opened, because the app owns the touches over the player.'],it:['I numeri dello stream si sono spostati dove puoi raggiungerli. Tocca l\u2019icona della batteria o del collegamento su una telecamera e la scheda adesso porta anche lo stream: prima il verdetto \u2014 un\u2019immagine bloccata \xe8 la rete o il decoder? \u2014 e poi le prove. Fotogrammi decodificati e se stanno ancora avanzando, blocchi e quanto sono durati, richieste di key frame, perdita, latenza e il percorso della connessione; e dall\u2019hub, quale profilo ti sta servendo davvero, se quello stream \xe8 nativo o transcodificato qui, quale nodo lo ingerisce e perch\xe9 la scala di qualit\xe0 si \xe8 mossa l\u2019ultima volta. La pastiglia sull\u2019immagine resta com\u2019\xe8: sul telefono il pannello dietro non si poteva aprire, perch\xe9 i tocchi sopra il player appartengono all\u2019app.']}},{version:'1.0.505',date:'2026-09-19',notes:{en:['The stream stats are a real debug tool now, and they stay out of your way. A small pill above the controls carries the verdict, the resolution, the frame rate and the bitrate; tap it for the full panel. The panel answers the question that mattered and could not be answered before: when a picture freezes, is it the network or the decoder? It shows frames decoded, freezes and their duration, key-frame requests, retransmissions, jitter, loss and the ICE path on the client side \u2014 and, from the hub, which rung you are actually being served, whether that stream is native or transcoded, which node is ingesting it, and why the quality ladder last moved.'],it:['Le statistiche dello stream sono diventate uno strumento di debug vero, e stanno fuori dai piedi. Una pastiglia sopra i controlli porta il verdetto, la risoluzione, i fotogrammi al secondo e il bitrate; toccala per il pannello completo. Il pannello risponde alla domanda che contava e a cui non si poteva rispondere: quando l\u2019immagine si blocca, \xe8 la rete o il decoder? Mostra i fotogrammi decodificati, i blocchi e quanto sono durati, le richieste di key frame, le ritrasmissioni, jitter, perdita e il percorso ICE lato client \u2014 e, dall\u2019hub, quale profilo ti sta servendo davvero, se quello stream \xe8 nativo o transcodificato, quale nodo lo sta ingerendo e perch\xe9 la scala di qualit\xe0 si \xe8 mossa l\u2019ultima volta.']}},{version:'1.0.504',date:'2026-09-17',notes:{en:['The Home button on a PTZ camera now tells you when it cannot do anything. It used to send the camera to whichever preset happened to sit in the first slot \u2014 on these cameras that was \u201cstanza\u201d, \u201cCredenza\u201d and \u201cPreset1\u201d, nobody\u2019s idea of home \u2014 and when that slot was empty it failed in silence. The hub now asks which preset you chose as home, refuses rather than guessing, and the app shows you the refusal instead of swallowing it. Pick one under PTZ settings.'],it:['Il pulsante Home su una telecamera PTZ ora ti dice quando non pu\xf2 fare niente. Prima mandava la telecamera al preset che si trovava nel primo posto \u2014 su queste telecamere erano \u201cstanza\u201d, \u201cCredenza\u201d e \u201cPreset1\u201d, che home non sono \u2014 e quando quel posto era vuoto falliva in silenzio. Adesso l\u2019hub chiede quale preset hai scelto come home, rifiuta invece di indovinare, e l\u2019app ti mostra il rifiuto invece di ingoiarlo. Scegline uno nelle impostazioni PTZ.']}},{version:'1.0.503',date:'2026-09-16',notes:{en:['Pages with camera tiles scroll again on a phone. A tile claimed every touch that landed on it \u2014 and on a phone a tile is most of the screen \u2014 then did nothing with it, because dragging only pans a tile you have already zoomed into. Now the gesture is yours until you zoom in; pinch and double-tap are unchanged.'],it:['Le pagine con i riquadri delle telecamere tornano a scorrere sul telefono. Un riquadro si prendeva ogni tocco che ci finiva sopra \u2014 e sul telefono un riquadro e\u2019 quasi tutto lo schermo \u2014 e poi non ne faceva niente, perche\u2019 trascinare sposta solo un riquadro in cui hai gia\u2019 zoomato. Ora il gesto resta tuo finche\u2019 non zoomi; pinch e doppio tocco invariati.']}},{version:'1.0.502',date:'2026-09-16',notes:{en:['Zones, above the places: a part of the home that holds several rooms \u2014 \u201cZona notte\u201d for the bedrooms. They come first in the filter strip, with their own icon, because it is the coarser question: asking for upstairs should not mean pressing four rooms. Create them on the hub, under Locations.','A camera still belongs to exactly one place, and a place to at most one zone. Nothing about your cameras changed to make this work.','The drawn zones in the rule editor are now called detection zones, which is what they are \u2014 so the word is free for the rooms of your home.'],it:['Le zone, sopra i luoghi: una parte della casa che tiene pi\xf9 stanze \u2014 \u201cZona notte\u201d per le camere da letto. Vengono per prime nella striscia dei filtri, con la loro icona, perch\xe9 sono la domanda pi\xf9 grossa: chiedere il piano di sopra non deve voler dire premere quattro stanze. Si creano sull\u2019hub, sotto Locations.','Una telecamera resta in un solo luogo, e un luogo in al massimo una zona. Non \xe8 cambiato nulla sulle tue telecamere perch\xe9 questo funzionasse.','Le zone disegnate nell\u2019editor delle regole ora si chiamano zone di rilevamento, che \xe8 quello che sono \u2014 cos\xec la parola resta libera per le stanze di casa.']}},{version:'1.0.501',date:'2026-09-16',notes:{en:['Choosing a place that has nothing in it no longer takes the page away. Pressing Favourites with nothing starred replaced the reel, the selector and the cameras with \u201cno cameras configured\u201d \u2014 and took away the control that would have undone it. The reel and the strip stay put; only the list below says it is empty.','The location chips are the size of chips again, and Favourites is in your language.'],it:['Scegliere un luogo vuoto non porta pi\xf9 via la pagina. Premere Preferite senza averne sostituiva reel, selettore e camere con \u201cnessuna camera configurata\u201d \u2014 e toglieva proprio il comando per tornare indietro. Reel e striscia restano al loro posto; \xe8 la lista sotto a dire che \xe8 vuota.','I chip dei luoghi sono tornati alti quanto un chip, e Preferite \xe8 nella tua lingua.']}},{version:'1.0.500',date:'2026-09-16',notes:{en:['The camera list has a location strip, between the reel and the cameras. Favourites first \u2014 with a count, because an empty shortlist is worth knowing before you press into it \u2014 then \u201cAll\u201d, then every place your cameras actually name. Pressing the place you are already in takes you back out, so a room whose cameras are all offline is never a dead end.','A heart on each camera, top left. Favourites live in your profile and travel with it: share the profile and they go too. They are yours alone otherwise.','A place can carry its own icon, chosen in the hub. A room nobody gave one to shows no icon at all rather than a default \u2014 \u201cnobody chose\u201d and \u201cthe pin was chosen\u201d are different things.'],it:['La lista camere ha una striscia dei luoghi, fra il reel e le camere. Prima le Preferite \u2014 col conteggio, perch\xe9 una lista corta vuota \xe8 meglio saperlo prima di entrarci \u2014 poi \u201cTutte\u201d, poi ogni luogo che le tue camere hanno davvero. Premere il luogo in cui sei gi\xe0 ti riporta indietro, cos\xec una stanza con tutte le camere offline non \xe8 mai un vicolo cieco.','Un cuore su ogni camera, in alto a sinistra. Le preferite stanno nel tuo profilo e viaggiano con lui: condividi il profilo e vanno con quello. Per il resto sono solo tue.','Un luogo pu\xf2 avere la sua icona, scelta sull\u2019hub. Una stanza a cui nessuno l\u2019ha data non disegna nessuna icona invece di una di default \u2014 \u201cnessuno ha scelto\u201d e \u201cha scelto il pin\u201d sono due cose diverse.']}},{version:'1.0.499',date:'2026-09-15',notes:{en:['The debug reasons are the ones you actually use. Nine of them, in your order \u2014 the old list had been inferred from a reading of eleven real notes; this one was dictated by the person who reviews with it. \u201cNo crop\u201d is gone: a crop that is WRONG and a crop that is ABSENT are two different findings, and one checkbox was blurring them.','A track\u2019s media strip can now show \u201cGate crop\u201d \u2014 the pixels the confirmation gate judged, kept when it refused to confirm a birth. It exists to be argued with: it is the only thing that can say whether the detector was right to drop a sighting.'],it:['Le reason di debug sono quelle che usi davvero. Nove, nel tuo ordine \u2014 la lista precedente era stata dedotta da una lettura di undici note reali; questa l\u2019ha dettata chi ci rivede. \xc8 sparito \u201cnessun ritaglio\u201d: un crop SBAGLIATO e un crop ASSENTE sono due reperti diversi, e una casella sola li confondeva.','La striscia media di una traccia pu\xf2 ora mostrare \u201cGate crop\u201d \u2014 i pixel su cui il confirmation gate ha deciso, tenuti quando ha rifiutato di confermare una nascita. Serve per poterlo contestare: \xe8 l\u2019unica cosa che dice se il detector avesse ragione a scartare un avvistamento.']}},{version:'1.0.498',date:'2026-09-15',notes:{en:['The \u201c?\u201d on an events card really does open the assignment now. It was made a button last time and still could not be tapped: it sits in the caption row, which is deliberately transparent to touches so the labels never swallow the card\u2019s own open \u2014 and the button inherited that.','Audio on open is no longer one answer for every camera. Alongside \u201calways on\u201d and \u201calways off\u201d there is now \u201cas you left it\u201d, which is the new default: each camera opens the way you last left it, and a camera you have never chosen on opens silent.'],it:['Il \u201c?\u201d su una card degli eventi ora apre davvero l\u2019assegnazione. L\u2019ultima volta era diventato un pulsante e restava comunque intoccabile: sta nella riga delle etichette, che \xe8 trasparente ai tocchi apposta perch\xe9 le etichette non si mangino l\u2019apertura della card \u2014 e il pulsante ereditava quella trasparenza.','L\u2019audio all\u2019apertura non \xe8 pi\xf9 una risposta sola per tutte le camere. Accanto a \u201csempre acceso\u201d e \u201csempre spento\u201d c\u2019\xe8 ora \u201ccome l\u2019hai lasciato\u201d, che \xe8 il nuovo default: ogni camera si apre com\u2019era l\u2019ultima volta, e una camera su cui non hai mai scelto si apre muta.']}},{version:'1.0.497',date:'2026-09-14',notes:{en:['You can add a linked device from the camera\u2019s own panel, not only from the cameras list. The panel showed you what was linked and gave you nowhere to add one, so the answer was to leave the camera you were looking at.','The keyboard no longer covers the device picker while you search it. And tapping outside now closes the keyboard first, so a search you were half way through is not thrown away with it.'],it:['Puoi aggiungere un dispositivo collegato dal pannello della camera stessa, non solo dalla lista camere. Il pannello ti mostrava cosa era collegato e non ti dava dove aggiungerne uno, quindi la risposta era uscire dalla camera che stavi guardando.','La tastiera non copre pi\xf9 il selettore dei dispositivi mentre lo cerchi. E il tocco fuori ora chiude prima la tastiera, cos\xec una ricerca lasciata a met\xe0 non se ne va con lei.']}},{version:'1.0.496',date:'2026-09-14',notes:{en:['The \u201c?\u201d on an events card now opens the assignment. It was a label that said a face was waiting for a name and did nothing when you tapped it \u2014 so you opened the card and looked for the assignment again, answering a question you had already asked.','A group now shows its PATH: what each of its subjects did, drawn on the picture they were in together, one colour each. Every member already had its own crop in the group; what was missing was where they went.'],it:['Il \u201c?\u201d su una card degli eventi ora apre l\u2019assegnazione. Era un\u2019etichetta che diceva che un volto aspettava un nome e non faceva niente al tocco \u2014 cos\xec aprivi la card e ricercavi l\u2019assegnazione, rispondendo a una domanda che avevi gi\xe0 fatto.','Un gruppo ora mostra il suo PERCORSO: cosa ha fatto ognuno dei suoi soggetti, disegnato sull\u2019immagine in cui erano insieme, un colore per ciascuno. Ogni membro aveva gi\xe0 il suo ritaglio nel gruppo; mancava dove sono andati.']}},{version:'1.0.495',date:'2026-09-13',notes:{en:['Groups with no camera filter now list every camera. Leaving the camera chip untouched means "all of them" here, and it meant "none of them" to the hub \u2014 so the gallery came back empty on a system full of groups.'],it:['I gruppi senza filtro camera ora elencano tutte le telecamere. Non toccare il chip delle camere qui significa \u201ctutte\u201d, e per l\u2019hub significava \u201cnessuna\u201d \u2014 cos\xec la galleria tornava vuota su un sistema pieno di gruppi.']}},{version:'1.0.494',date:'2026-09-13',notes:{en:['Administrators can link devices to a camera from the phone \u2014 a doorbell, a sensor, a light \u2014 in the same list the pencil arranges. The picker suggests the devices in that camera\u2019s own room first, and nothing is linked until you pick it.'],it:['Gli amministratori possono collegare device a una telecamera dal telefono \u2014 un campanello, un sensore, una luce \u2014 nella stessa lista che la matita riordina. Il selettore suggerisce per primi i device della stanza di quella telecamera, e niente viene collegato finch\xe9 non lo scegli tu.']}},{version:'1.0.493',date:'2026-09-13',notes:{en:['You can arrange the camera list by hand. A small pencil in the corner turns the list into edit mode, you drag the rows, and a tick saves. Nothing is draggable until you ask \u2014 no more reordering a camera by accident \u2014 and cancelling puts back exactly the order you started with, not the last one saved.','The arrangement is yours and stays on this device. A camera added on the hub appears at the end rather than somewhere unpredictable, and an order can move a camera but can never hide one.'],it:['Puoi sistemare la lista delle telecamere a mano. Una piccola matita nell\u2019angolo mette la lista in modifica, trascini le righe, e la spunta salva. Niente \xe8 trascinabile finch\xe9 non lo chiedi \u2014 niente pi\xf9 riordini per sbaglio \u2014 e annullare rimette esattamente l\u2019ordine da cui eri partito, non l\u2019ultimo salvato.','La disposizione \xe8 tua e resta su questo dispositivo. Una telecamera aggiunta sull\u2019hub compare in fondo invece che in un punto imprevedibile, e un ordine pu\xf2 spostare una telecamera ma non pu\xf2 mai nasconderla.']}},{version:'1.0.492',date:'2026-09-13',notes:{en:['Three pages can now list GROUPS instead of subjects: the camera timeline, the reel on the cameras page, and the Events gallery. A family walking in together is one entry with several pictures, not four cards. Each page has its OWN switch and each one starts on subjects \u2014 nothing changes until you ask it to, and you can always switch back from the page itself.','A group card shows what the group was made of \u2014 two people and a dog \u2014 and a Live chip while the session is still running. Opening it lists the members, each one linking to its own track.','The reel draws groups as their own strip, with several images per entry and no clustering: two sessions seconds apart are two things that happened, and the old grouping used to swallow one of them.','Filtering understands groups. Picking Dog now finds the arrivals that HAD a dog with them, including the group of four people \u2014 the filter asks about the members, and it runs on the hub rather than on your phone.'],it:['Tre pagine possono ora elencare i GRUPPI invece dei soggetti: la timeline della telecamera, il reel nella pagina telecamere e la galleria Eventi. Una famiglia che entra insieme \xe8 una voce sola con pi\xf9 immagini, non quattro schede. Ogni pagina ha il SUO interruttore e parte dai soggetti \u2014 non cambia nulla finch\xe9 non lo chiedi tu, e si torna indietro dalla pagina stessa.','La scheda di un gruppo dice di cosa era fatto \u2014 due persone e un cane \u2014 e porta la pastiglia Live finch\xe9 la sessione \xe8 in corso. Aprendola trovi i membri, ognuno con il link alla sua traccia.','Nel reel i gruppi hanno una striscia propria, con pi\xf9 immagini per voce e senza raggruppamento: due sessioni a pochi secondi di distanza sono due cose successe, e il vecchio accorpamento se ne mangiava una.','Il filtro capisce i gruppi. Scegliere Cane ora trova gli arrivi che AVEVANO un cane con loro, compreso il gruppo di quattro persone \u2014 il filtro chiede dei membri, e gira sull\u2019hub invece che sul telefono.']}},{version:'1.0.491',date:'2026-09-13',notes:{en:['The movable window now carries the stream\u2019s own controls: audio, talk-back, picture-in-picture, and a button that opens that camera full-screen. They are the same controls as the single-camera screen \u2014 the same code, so they cannot drift apart.','The resize corner wore the FULLSCREEN icon, so the grip was signing the wrong action. It now looks like every other control in the app.','The heatmap in that window only ever drew recordings. Motion and audio were never missing from the hub \u2014 the window was handing the bar an empty list. Both lanes are there now. Detections are deliberately still absent: loading them costs a few hundred kilobytes, which a floating panel over a live stream should not spend.','Exports and the hub\u2019s own files are ONE section, now called Media. An export finally has a detail view and plays in the app instead of only downloading, and the filter is the one from Events \u2014 a chip per facet that says what it is narrowing, instead of a pill that only counted.','You can delete what the hub produced. Until now a timelapse could only be waited out. A video takes its preview still with it, so one card frees both files.','The timeline can show GROUPS instead of subjects: a family arriving together is one card, not three. Off by default \u2014 turn it on in the timeline filters or in Settings. A session still in progress is listed with a Live chip rather than hidden.'],it:['La finestra mobile ora porta i comandi dello stream: audio, microfono, picture-in-picture e un pulsante che apre quella telecamera a schermo intero. Sono gli STESSI comandi della schermata singola \u2014 lo stesso codice, quindi non possono divergere.','L\u2019angolo di ridimensionamento portava l\u2019icona dello SCHERMO INTERO: la presa firmava l\u2019azione sbagliata. Ora ha l\u2019aspetto di ogni altro comando dell\u2019app.','La heatmap in quella finestra disegnava solo le registrazioni. Movimento e audio non sono mai mancati dall\u2019hub \u2014 era la finestra a passare alla barra una lista vuota. Ora ci sono entrambi. Le rilevazioni restano fuori di proposito: caricarle costa qualche centinaio di kilobyte, che un pannello sopra uno stream dal vivo non deve spendere.','Gli export e i file prodotti dall\u2019hub sono UNA sezione sola, che ora si chiama Media. Un export ha finalmente una scheda e si riproduce dentro l\u2019app invece di poter solo essere scaricato, e il filtro \xe8 quello di Eventi \u2014 una pastiglia per faceta che dice cosa sta restringendo, invece di una che contava e basta.','Puoi cancellare quello che ha prodotto l\u2019hub. Fino a ora un timelapse si poteva solo aspettare. Un video porta via anche la sua anteprima, quindi una card libera due file.','La timeline pu\xf2 mostrare i GRUPPI invece dei soggetti: una famiglia che arriva insieme \xe8 una card, non tre. Spento di default \u2014 si accende dai filtri della timeline o dalle Impostazioni. Una sessione ancora in corso viene elencata con la pastiglia Live, non nascosta.']}},{version:'1.0.490',date:'2026-09-13',notes:{en:['The movable window resizes properly now. The handle always worked \u2014 the sizes behind it did not: all three snaps came out the same box on a phone, so dragging changed nothing. The grip is finger-sized and no longer shares its corner with the playback controls.','The playback bar inside that window fits the width it is given. It was drawing a full-width bar into a small window with nothing to wrap into, which is why LIVE broke onto two lines and buttons landed on top of each other.','Event thumbnails stop failing to warm. The list was pre-fetching them with the wrong kind of id \u2014 an event\u2019s, where a track\u2019s was needed \u2014 so every pre-fetch missed and the picture had to be fetched again when the card appeared.','Picture-in-picture on app close is gone. It was granted by the system and lost 176 ms later, every time: Apple only starts picture-in-picture in response to something you do, and an app closing is not that. The button on the player still works and survives closing the app.'],it:['La finestra mobile ora si ridimensiona davvero. La maniglia ha sempre funzionato \u2014 erano le misure dietro a non funzionare: su telefono tutte e tre le taglie davano la stessa identica finestra, quindi trascinare non cambiava nulla. L\u2019angolo di presa \xe8 dimensionato per un dito e non se lo contende pi\xf9 con i comandi di riproduzione.','La barra di riproduzione dentro quella finestra si adatta alla larghezza che ha. Prima disegnava una barra intera dentro una finestra piccola senza spazio in cui andare a capo: per questo LIVE finiva su due righe e i pulsanti si sovrapponevano.','Le miniature degli eventi smettono di fallire il precaricamento. La lista le chiedeva con il tipo di id sbagliato \u2014 quello dell\u2019evento invece che quello della traccia \u2014 quindi ogni precaricamento mancava e l\u2019immagine andava richiesta da capo quando la card compariva.','Il picture-in-picture alla chiusura dell\u2019app non c\u2019\xe8 pi\xf9. Il sistema lo concedeva e lo perdeva 176 ms dopo, ogni volta: Apple avvia il picture-in-picture solo in risposta a qualcosa che fai tu, e chiudere l\u2019app non lo \xe8. Il pulsante sul player continua a funzionare e sopravvive alla chiusura.']}},{version:'1.0.489',date:'2026-09-13',notes:{en:['Review: deleting a sample from a person now actually deletes it. The request was never leaving the app \u2014 it was looked up in a way that can never find it, so nothing happened and nothing said so.','Review: you can delete parked faces you do not want to keep, and create a new person without leaving the page. Picking a person is a searchable list instead of a row of chips that grew with your gallery.','Review: the similar-groups button kept going quiet after the first pass. It was comparing faces over a wide window and then only showing groups that fell inside a much narrower one, so the matches sitting just outside vanished. One window now \u2014 and the button no longer claims a number.','The movable player lost its padlock: it came along with the shared playback bar and did nothing there but swallow your taps.','Opening a camera full-screen now closes the movable window if it was showing that same camera, instead of leaving two pictures of it.'],it:['Review: cancellare un campione da una persona ora lo cancella davvero. La richiesta non usciva nemmeno dall\u2019app \u2014 veniva cercata in un modo che non pu\xf2 trovarla, quindi non succedeva nulla e nulla lo diceva.','Review: puoi cancellare le facce parcheggiate che non vuoi tenere, e creare una nuova persona senza uscire dalla pagina. Scegliere una persona ora \xe8 una lista con ricerca invece di una fila di pastiglie che cresceva con la tua galleria.','Review: il pulsante dei gruppi simili ammutoliva dopo il primo giro. Confrontava le facce su una finestra ampia e poi mostrava solo i gruppi che cadevano dentro una molto pi\xf9 stretta, quindi le somiglianze appena fuori sparivano. Ora la finestra \xe8 una sola \u2014 e il pulsante non promette pi\xf9 un numero.','Il player mobile ha perso il lucchetto: arrivava insieme alla barra di riproduzione condivisa e l\xec non faceva altro che ingoiare i tuoi tocchi.','Aprire una telecamera a schermo intero ora chiude la finestra mobile se mostrava quella stessa telecamera, invece di lasciarne due immagini.']}},{version:'1.0.488',date:'2026-09-13',notes:{en:['The movable player works on the phone now, not only on tablets and wide windows. A button on each camera card summons it without leaving the list, and its title is the CAMERA\u2019s name \u2014 it used to say "Playback", which cannot tell two open windows apart.','The downward swipe on a camera changed hands: one finger goes back, two fingers hand the camera to the movable player and go back. Picture-in-picture is no longer a gesture at all \u2014 it now happens by itself when you close the app on a single camera, because that is the moment your hands are busy pressing Home. There is a switch for it under Stream.','Audio is on when you open a camera. It used to open muted until you found the button.','Settings were reorganised: General (theme, language, press feedback) sits right under Server, the event-vibration switches are gone, and on a tablet or a desktop window the sections lay out in two or three columns instead of one long scroll.'],it:['Il player mobile ora funziona anche sul telefono, non solo su tablet e finestre larghe. Un pulsante su ogni scheda telecamera lo apre senza uscire dalla lista, e il titolo \xe8 il nome della TELECAMERA \u2014 prima diceva "Riproduzione", che non distingue due finestre aperte.','Lo scorrimento verso il basso su una telecamera cambia mano: un dito torna indietro, due dita passano la telecamera al player mobile e tornano indietro. Il picture-in-picture non \xe8 pi\xf9 un gesto \u2014 ora parte da solo quando chiudi l\u2019app su una singola telecamera, perch\xe9 quello \xe8 il momento in cui le mani sono occupate a premere Home. C\u2019\xe8 un interruttore sotto Streaming.','L\u2019audio \xe8 attivo quando apri una telecamera. Prima si apriva muta finch\xe9 non trovavi il pulsante.','Impostazioni riorganizzate: Generale (tema, lingua, vibrazione alla pressione) sta subito sotto Server, gli interruttori di vibrazione sugli eventi sono spariti, e su tablet o finestra desktop le sezioni si dispongono su due o tre colonne invece di una lista lunga.']}},{version:'1.0.487',date:'2026-09-13',notes:{en:['Thumbnails and track media are back. A media file used to be addressed by a composite key that embedded a foreign id, and once every event table got its own numbering those keys started naming the wrong row \u2014 a night shot could answer for a different camera. The hub now addresses a media file by its own id, and asks for "the best picture of this track" as its own question. The app had been left on the old address, so every thumbnail it asked for came back missing: the track detail opened empty and the timeline drew nothing.','Playback got a player you can move. Open a recording from anywhere and it keeps playing in a window you can drag and resize, and it survives you navigating elsewhere in the app.','The camera reel lights up when something happens \u2014 motion and audio, on by default, with a settings panel to choose what counts. Tapping a camera in the reel now swaps it in place instead of reloading the page, and if you are in playback the new camera opens at the same instant you were watching, not at its own live edge.'],it:['Le miniature e i media delle tracce sono tornati. Un file media veniva indirizzato con una chiave composta che conteneva un id altrui, e da quando ogni tabella di eventi ha una sua numerazione quelle chiavi hanno cominciato a nominare la riga sbagliata \u2014 uno scatto notturno poteva rispondere per un\u2019altra telecamera. L\u2019hub ora indirizza un media con il suo id, e chiede \u201cla foto migliore di questa traccia\u201d come domanda a s\xe9. L\u2019app era rimasta all\u2019indirizzo vecchio, quindi ogni miniatura che chiedeva tornava mancante: il dettaglio della traccia si apriva vuoto e la timeline non disegnava nulla.','La riproduzione ha un player che puoi spostare. Apri una registrazione da qualsiasi punto e continua in una finestra che puoi trascinare e ridimensionare, e resta l\xec anche se navighi altrove nell\u2019app.','Il carosello delle telecamere si illumina quando succede qualcosa \u2014 movimento e audio, attivi di default, con un pannello per scegliere cosa conta. Toccare una telecamera nel carosello ora la scambia sul posto invece di ricaricare la pagina, e se sei in riproduzione la nuova telecamera si apre allo stesso istante che stavi guardando, non al suo live.']}},{version:'1.0.486',date:'2026-09-11',notes:{en:['The camera timeline now opens on the last hour instead of the last three. Three hours was the density the timeline had always drawn, not a decision about what you want to see when you open a camera \u2014 it put whatever just happened in a third of the screen and made the rest yesterday\u2019s scrolling.','Event cards now sit ON the track they describe. The timeline runs newest at the top, so a track ends above and begins below \u2014 but the card was anchored by its top edge to the track\u2019s beginning, which hung it under the event, over the minutes before anything happened. Now the card\u2019s bottom edge is where the track starts, so the card covers the subject\u2019s own passage and reading upward follows it.'],it:['La timeline della telecamera si apre sull\u2019ultima ora invece che sulle ultime tre. Tre ore erano la densit\xe0 che la timeline aveva sempre disegnato, non una scelta su cosa serve vedere aprendo una telecamera: mettevano quello appena successo in un terzo di schermo e rendevano il resto lo scroll di ieri.','Le card degli eventi ora stanno SOPRA la traccia che descrivono. La timeline ha il pi\xf9 recente in alto, quindi una traccia finisce sopra e comincia sotto \u2014 ma la card era ancorata col bordo superiore all\u2019inizio della traccia, il che la appendeva sotto l\u2019evento, sui minuti in cui non era ancora successo nulla. Ora il bordo inferiore della card \xe8 dove la traccia comincia, cos\xec la card copre il passaggio del soggetto e leggere verso l\u2019alto lo segue.']}},{version:'1.0.485',date:'2026-09-11',notes:{en:['The app now hangs up when you leave it, and calls back when you return. In the background the phone freezes the app and stops reading, but the connection stayed open \u2014 so the hub kept piling up messages for a listener that was asleep. One evening of that was 88 MB held on the hub for a phone nobody was holding. The app now closes the connection as it leaves and opens a new one as it comes back.','Coming back is a normal thing, not a fault: no error, no "offline", nothing emptied. You see a brief "connecting" and the screen you left, and the app re-asks the hub for everything that can have changed while it was away \u2014 cameras, batteries, switches, who is in frame \u2014 so what you are looking at a second later is current rather than remembered.'],it:['L\u2019app ora chiude la linea quando la lasci, e richiama quando torni. In background il telefono congela l\u2019app e smette di leggere, ma la connessione restava aperta \u2014 cos\xec l\u2019hub continuava ad accumulare messaggi per un ascoltatore che dormiva. Una sera cos\xec erano 88 MB tenuti sull\u2019hub per un telefono che nessuno aveva in mano. Ora l\u2019app chiude la connessione mentre esce e ne apre una nuova quando rientra.','Il rientro \xe8 una cosa normale, non un guasto: nessun errore, nessun \u201coffline\u201d, niente che si svuota. Vedi un breve \u201cconnessione\u201d e la schermata che avevi lasciato, e l\u2019app richiede all\u2019hub tutto quello che pu\xf2 essere cambiato mentre era via \u2014 telecamere, batterie, interruttori, chi \xe8 inquadrato \u2014 cos\xec quello che guardi un secondo dopo \xe8 attuale e non ricordato.']}},{version:'1.0.484',date:'2026-09-11',notes:{en:['Pinch-to-zoom, the pan while zoomed and the PTZ joystick work again. The crash guard added in 1.0.479 wrapped every gesture handler, and the wrapped handlers were no longer compiled for the UI thread \u2014 so each gesture was caught and dropped on every frame instead of running. Nothing was lost on the hub: every dropped gesture was logged, which is how this was found.','The camera timeline filter now lists every detection class that actually appears in the loaded window, even when the hub does not advertise it for that camera. A class you could see on the timeline but not tick in the filter was the hub describing the camera from a momentary status; the viewer no longer hides what it is showing.'],it:['Il pinch-to-zoom, lo spostamento da zoomato e il joystick PTZ funzionano di nuovo. La protezione anti-crash aggiunta nella 1.0.479 avvolgeva ogni gestore dei gesti, e i gestori avvolti non venivano pi\xf9 compilati per il thread UI \u2014 quindi ogni gesto veniva intercettato e scartato a ogni frame invece di eseguire. Sull\u2019hub non \xe8 andato perso nulla: ogni gesto scartato \xe8 stato registrato, ed \xe8 cos\xec che \xe8 stato trovato.','Il filtro della timeline della telecamera ora elenca ogni classe di rilevamento che compare davvero nella finestra caricata, anche quando l\u2019hub non la dichiara per quella telecamera. Una classe che vedevi sulla timeline ma non potevi spuntare nel filtro era l\u2019hub che descriveva la telecamera da uno stato momentaneo; il viewer non nasconde pi\xf9 ci\xf2 che sta mostrando.']}},{version:'1.0.483',date:'2026-09-10',notes:{en:['On a tablet, turning from portrait to landscape puts the timeline back beside the picture. The app was reading its window size from a notification that sometimes arrived seconds late, or not at all, so it kept laying out for portrait inside a landscape screen until you killed it. It now reads the size of the view you are actually looking at.','The camera reel under the player refreshes in turns instead of all at once. Every card used to ask the hub for a new frame in the same second, every fifteen seconds \u2014 thirty captures in a burst, and the slow cameras never made it in time. Now a quarter of the reel takes its turn on each poll, so each card refreshes about every twenty seconds and the hub is never asked for thirty frames at once.'],it:['Su tablet, ruotando da verticale a orizzontale la timeline torna accanto all\u2019immagine. L\u2019app leggeva la dimensione della finestra da una notifica che a volte arrivava con secondi di ritardo, o mai, e continuava a impaginare in verticale dentro uno schermo orizzontale finch\xe9 non la chiudevi. Ora legge la dimensione della vista che stai davvero guardando.','Il nastro delle telecamere sotto il player si aggiorna a turni invece che tutto insieme. Ogni scheda chiedeva all\u2019hub un frame nuovo nello stesso secondo, ogni quindici secondi \u2014 trenta catture in raffica, e le telecamere lente non facevano mai in tempo. Ora a ogni giro tocca a un quarto del nastro, cos\xec ogni scheda si aggiorna circa ogni venti secondi e all\u2019hub non vengono mai chiesti trenta frame in una volta.']}},{version:'1.0.482',date:'2026-09-10',notes:{en:['When assigning a face fails, it now says why. The failure was caught and thrown away in eight different places \u2014 you saw "could not assign a face" and there was nothing, anywhere, to explain it. The reason is now recorded and reaches the hub, including the case where the server answers but assigns nothing.','The app also stopped narrating itself. Four routine messages \u2014 one per camera tile, several times each \u2014 were more than half of everything it sent to the hub. They are still there in debug mode; what stays are the lines that report something going wrong.'],it:['Quando assegnare una faccia fallisce, ora dice perch\xe9. L\u2019errore veniva catturato e buttato via in otto punti diversi \u2014 tu vedevi \u201cimpossibile assegnare una faccia\u201d e non c\u2019era nulla, da nessuna parte, che lo spiegasse. Ora il motivo viene registrato e arriva all\u2019hub, compreso il caso in cui il server risponde ma non assegna niente.','L\u2019app ha anche smesso di raccontarsi. Quattro messaggi di routine \u2014 uno per riquadro di telecamera, pi\xf9 volte ciascuno \u2014 erano pi\xf9 della met\xe0 di tutto ci\xf2 che spediva all\u2019hub. Restano in modalit\xe0 debug; quel che resta sempre sono le righe che segnalano qualcosa che non va.']}},{version:'1.0.481',date:'2026-09-10',notes:{en:['Assigning faces no longer freezes the page. "Apply suggestions" writes one group per person, and each group used to wait for the whole gallery to be re-read before the next one started \u2014 six people meant dozens of round trips before you got the screen back. The gallery is now re-read once, when the last group is written. Assigning one face at a time waits only for the card you are looking at.','Scrubbing the timeline had a pulse every 80 ms \u2014 twelve a second, which is a buzz and not detents. It is now paced to feel like clicks, and dragging is lighter for it.'],it:['Assegnare le facce non blocca pi\xf9 la pagina. "Applica suggerimenti" scrive un gruppo per persona, e ogni gruppo aspettava che l\u2019intera galleria fosse riletta prima che partisse il successivo \u2014 sei persone significavano decine di andate e ritorni prima di riavere lo schermo. Ora la galleria si rilegge una volta sola, quando l\u2019ultimo gruppo \xe8 scritto. Assegnando una faccia per volta si aspetta soltanto la scheda che stai guardando.','Lo scrub della timeline aveva una vibrazione ogni 80 ms \u2014 dodici al secondo, che \xe8 un ronzio e non degli scatti. Ora \xe8 cadenzata per sembrare clic, e trascinare \xe8 pi\xf9 leggero.']}},{version:'1.0.480',date:'2026-09-10',notes:{en:['The timeline\u2019s audio bar shows the LEVEL now. It was showing how MANY audio events fell in each slot, painted on the same six-rung meter the live view uses for decibels \u2014 so fifty short clicks in a quiet hour lit every rung, whatever their volume. The hub now works out the average loudness of each slot and the bar draws that: a busy quiet hour reads quiet, one door slam reads loud. A slot with no audio at all draws nothing, because \u201cnothing was heard\u201d and \u201cnothing was measured\u201d are not the same thing.','A gesture that fails no longer takes the app down with it. The joystick and the pinch-zoom ran code that, if it threw, closed the app outright \u2014 three crash reports came from exactly that. Now the gesture is simply dropped and the reason is sent back, so the next one can be fixed instead of guessed at.'],it:['La barra audio della timeline mostra finalmente il LIVELLO. Prima mostrava QUANTI eventi audio cadevano in ogni fascia, disegnati sullo stesso misuratore a sei tacche che la vista live usa per i decibel \u2014 cos\xec cinquanta clic brevi in un\u2019ora tranquilla accendevano tutte le tacche, qualunque fosse il volume. Ora l\u2019hub calcola la rumorosit\xe0 media di ogni fascia e la barra disegna quella: un\u2019ora tranquilla ma affollata resta bassa, una porta sbattuta si vede. Una fascia senza audio non disegna nulla, perch\xe9 \u201cnon si \xe8 sentito niente\u201d e \u201cnessuno ha misurato\u201d non sono la stessa cosa.','Un gesto che va in errore non porta pi\xf9 gi\xf9 l\u2019app. Il joystick e lo zoom a pinch eseguivano codice che, se falliva, chiudeva l\u2019app di netto \u2014 tre segnalazioni di crash venivano esattamente da l\xec. Ora il gesto viene semplicemente ignorato e il motivo viene rimandato indietro, cos\xec il prossimo si corregge invece di indovinarlo.']}},{version:'1.0.479',date:'2026-09-09',notes:{en:['Pinch-zoom, second attempt. Yesterday\u2019s fix stopped the box resizing under your fingers, and that turned out to be the wrong half: with the panel set to grow, the picture kept zooming and sliding for a third of a second AFTER you let go \u2014 worst at full zoom, where all of the growth was still pending. The panel now grows under your fingers again, but the player\u2019s own frame never moves: the growth is folded into the zoom itself. Turn on debug mode and a pinch now writes one trace line you can send back.','The app also says far less to the hub: two diagnostics were 72% of everything it shipped \u2014 one of them logged every camera tile twice more just for sitting still while its snapshot aged.'],it:['Zoom a pinch, secondo tentativo. La correzione di ieri ha tolto il riquadro che si ridimensionava sotto le dita, e si \xe8 rivelata la met\xe0 sbagliata: col pannello impostato per crescere, l\u2019immagine continuava a zoomare e scivolare per un terzo di secondo DOPO che avevi lasciato \u2014 peggio al massimo, dove restava pendente tutta la crescita. Ora il pannello cresce di nuovo sotto le dita, ma il frame del player non si muove mai: la crescita \xe8 piegata dentro lo zoom stesso. Con la modalit\xe0 debug accesa, una pinch scrive una riga di traccia da rimandare indietro.','L\u2019app dice anche molto meno all\u2019hub: due diagnostiche facevano il 72% di tutto ci\xf2 che spediva \u2014 una di queste rilogga ogni tessera due volte solo per essere rimasta ferma mentre lo snapshot invecchiava.']}},{version:'1.0.478',date:'2026-09-09',notes:{en:['Pinch-zoom on the live view is smooth again. The picture box no longer resizes under your fingers frame by frame \u2014 it settles once, after you let go \u2014 the pan no longer springs back at the end of a gesture, and the double tap now runs on the UI thread instead of queueing behind the screen. The gesture feels slightly different on purpose: the panel grows after the pinch, not during it.'],it:['Lo zoom a pinch sulla vista live \xe8 di nuovo fluido. Il riquadro dell\u2019immagine non si ridimensiona pi\xf9 sotto le dita frame per frame \u2014 si assesta una volta sola, dopo che hai lasciato \u2014 la panoramica non torna pi\xf9 indietro a fine gesto, e il doppio tap gira sul thread della UI invece di accodarsi dietro allo schermo. Il gesto si sente un po\u2019 diverso di proposito: il pannello cresce dopo la pinch, non durante.']}},{version:'1.0.477',date:'2026-09-08',notes:{en:['The debug note\u2019s preset reasons now come from the notes actually written, not from guesswork: \u201ctrack started late\u201d leads, the thumbnail entry is reworded as \u201ca better frame existed (face/plate)\u201d \u2014 which is what gets typed by hand every time \u2014 and three reasons that were being typed out are now checkboxes: last frame before the first, two subjects in one track, and a two-wheeler whose rider is outside the keyframe.'],it:['Le ragioni preset della nota di debug ora vengono dalle note davvero scritte, non da supposizioni: \u201ctraccia partita in ritardo\u201d \xe8 la prima, la voce sulla miniatura diventa \u201cc\u2019era un frame migliore (volto/targa)\u201d \u2014 che \xe8 quello che viene digitato ogni volta \u2014 e tre ragioni che venivano scritte a mano sono ora caselle: ultimo frame prima del primo, due soggetti nella stessa traccia, e il conducente di un due ruote fuori dal keyframe.']}},{version:'1.0.476',date:'2026-09-08',notes:{en:['Closing the keyboard in the note dialog is the keyboard\u2019s own button now: on iOS a Done bar sits docked to it, drawn by the system above the keys, instead of a button crowding the card.'],it:['Chiudere la tastiera nel dialogo della nota ora \xe8 un pulsante della tastiera stessa: su iOS una barra Fatto le sta agganciata, disegnata dal sistema sopra i tasti, invece di un pulsante che toglie spazio alla scheda.']}},{version:'1.0.475',date:'2026-09-08',notes:{en:['The note dialog was a trap with the keyboard up: its buttons sat behind it, a multiline field has no return key, and tapping outside threw the note away. The card now lifts above the keyboard, a tap outside closes the keyboard first, and there is a Close keyboard button while it is open.'],it:['Il dialogo della nota era una trappola con la tastiera aperta: i pulsanti restavano dietro, un campo multiriga non ha tasto invio, e toccare fuori buttava via la nota. Ora la scheda si solleva sopra la tastiera, un tocco fuori chiude prima la tastiera, e c\u2019\xe8 un pulsante Chiudi tastiera finch\xe9 \xe8 aperta.']}},{version:'1.0.474',date:'2026-09-08',notes:{en:['On a Mac the player still opened the embed page in a browser: the WebView declines that load without reporting an error, so the previous fallback had nothing to react to. The player now watches for silence \u2014 if the bundled page has not spoken within six seconds, it loads the same page from the hub.'],it:['Su Mac il player apriva ancora la pagina dell\u2019embed nel browser: la WebView rifiuta quel caricamento senza segnalare alcun errore, quindi il fallback precedente non aveva nulla a cui reagire. Ora il player sorveglia il silenzio \u2014 se la pagina inclusa non ha parlato entro sei secondi, carica la stessa pagina dall\u2019hub.']}},{version:'1.0.473',date:'2026-09-08',notes:{en:['A sample whose picture is gone now says so, instead of drawing an empty square. Most of the gallery is in that state today \u2014 the crops were lost before the panel existed \u2014 and the scores beside them are unaffected: they come from the stored vector, which is intact.'],it:['Un campione la cui immagine non c\u2019\xe8 pi\xf9 ora lo dice, invece di disegnare un quadrato vuoto. Oggi gran parte della galleria \xe8 in quello stato \u2014 i ritagli erano gi\xe0 andati persi prima che il pannello esistesse \u2014 e i punteggi accanto non ne risentono: vengono dal vettore memorizzato, che \xe8 intatto.']}},{version:'1.0.472',date:'2026-09-08',notes:{en:['Library \u2192 Review can re-analyse one person\u2019s enrolled samples. Worst first, each with its crop and the reason \u2014 \u201clooks like Matthias (61%) more than like this person (12%)\u201d \u2014 and a sample is flagged only when it could actually be auto-assigned to the other person. Remove is one tap, and nothing is removed for you.'],it:['Libreria \u2192 Revisione pu\xf2 rianalizzare i campioni di una persona. Peggiori in cima, ognuno col suo ritaglio e il motivo \u2014 \u201csomiglia a Matthias (61%) pi\xf9 che a questa persona (12%)\u201d \u2014 e un campione \xe8 segnalato solo se potrebbe davvero essere auto-assegnato all\u2019altra persona. Rimuovere \xe8 un tocco, e nessuno rimuove niente al posto tuo.']}},{version:'1.0.471',date:'2026-09-08',notes:{en:['Opening the Cameras page now refreshes every camera\u2019s thumbnail, two at a time, once \u2014 so the tiles below the fold are minutes old instead of hours. It stops when it has been round the list.','What\u2019s new is a panel now, not a one-line dialog: the build that just arrived is at the top, and every earlier update is listed under it by version and date, tap to open. Settings \u2192 Info opens the same panel.'],it:['Aprendo la pagina Telecamere ora si aggiorna la miniatura di ogni camera, due alla volta, una sola volta \u2014 cos\xec i riquadri sotto la piega sono vecchi di minuti e non di ore. Finito il giro, si ferma.','Le novit\xe0 sono un pannello, non pi\xf9 un avviso a una riga: in alto la build appena arrivata, sotto l\u2019elenco di tutti gli aggiornamenti precedenti per versione e data, che si aprono al tocco. Impostazioni \u2192 Info apre lo stesso pannello.']}},{version:'1.0.470',date:'2026-09-08',notes:{en:['The debug checkboxes changed with use: an edge crop that came back mirrored, and a box that does not match the path the track drew \u2014 which usually means two subjects ended up sharing one id. "Wrong class" and "audio-only" left; neither was what anyone was actually reporting.'],it:['Le caselle di debug sono cambiate con l\u2019uso: un ritaglio sul bordo tornato specchiato, e un box che non coincide col percorso disegnato dalla traccia \u2014 che di solito significa due soggetti finiti sullo stesso id. Sono uscite "classe sbagliata" e "solo audio": non era quello che si segnalava davvero.']}},{version:'1.0.469',date:'2026-09-08',notes:{en:['Marking an event for debug now offers the questions that keep coming back as checkboxes, so a mark carries a question without typing one. Ticking one writes its phrase into the note; the field below still takes anything the boxes cannot say.'],it:['Marcando un evento per il debug ora trovi come caselle le domande che ricorrono, cos\xec una marcatura porta con s\xe9 una domanda senza doverla scrivere. Spuntarne una scrive la sua frase nella nota; il campo sotto accetta ancora tutto ci\xf2 che le caselle non dicono.']}},{version:'1.0.468',date:'2026-09-08',notes:{en:['The privacy-mask switch now says what is actually missing: no privacy zone is drawn on the camera. It used to give the same general "nothing is set up yet" sentence as every other control, which left no next step \u2014 and the next step is on the camera, not in this app.'],it:["L'interruttore della maschera privacy ora dice cosa manca davvero: sulla telecamera non \xe8 disegnata nessuna zona di privacy. Prima dava la stessa frase generica di ogni altro controllo, che non indicava alcun passo successivo \u2014 e il passo successivo \xe8 sulla telecamera, non in questa app."]}},{version:'1.0.467',date:'2026-09-08',notes:{en:['Unticking every event kind used to leave invisible leftovers behind, so the list stayed empty and the counters disagreed with the boxes. The leftovers are cleared, and no ticks now means no constraint.','Ticking only Faces or Plates therefore works on its own, across every kind, while narrowing them with a kind still works as before.','A collapsed group now shows a partial mark when something inside it is ticked, so nothing can be on where you cannot see it.'],it:["Togliendo la spunta a tutti i tipi di evento restavano dietro dei residui invisibili, cos\xec la lista restava vuota e i contatori non coincidevano con le caselle. I residui vengono ripuliti, e nessuna spunta adesso vuol dire nessun vincolo.","Spuntare solo Volti o Targhe funziona quindi da solo, su tutti i tipi, mentre restringerli a un tipo continua a funzionare come prima.","Un gruppo chiuso mostra adesso un segno parziale quando qualcosa al suo interno \xe8 spuntato, cos\xec niente pu\xf2 essere attivo dove non lo vedi."]}},{version:'1.0.466',date:'2026-09-08',notes:{en:['A filter that matched nothing on the first page used to stop the list from loading any further, so a narrow choice looked empty even when matches existed further back. The list now keeps reading until it finds them.','Plates were the clearest case: they sat four pages deep and were never reached. Faces happened to match early, which is why the same defect looked intermittent.','An empty list now says which kind of empty it is, and offers to load older events instead of ending the road.'],it:["Un filtro che non trovava nulla nella prima pagina impediva alla lista di caricare oltre, cos\xec una scelta stretta sembrava vuota anche quando i risultati c'erano pi\xf9 indietro. Adesso la lista continua a leggere finch\xe9 li trova.","Le targhe erano il caso pi\xf9 evidente: stavano quattro pagine pi\xf9 in l\xe0 e non venivano mai raggiunte. I volti capitavano presto, ed \xe8 per questo che lo stesso difetto sembrava intermittente.","Una lista vuota adesso dice di che vuoto si tratta, e propone di caricare gli eventi pi\xf9 vecchi invece di finire l\xec."]}},{version:'1.0.465',date:'2026-09-08',notes:{en:['The event kinds you already had \u2014 Audio, Sensor, Control \u2014 now actually filter. Ticking one shows those events, unticking hides them; there is no second filter to find, because the tree you were already using is the one that works.','Audio events start unticked, so the list opens on what you look at. A Default button puts the preset back without re-ticking everything by hand.','The chip counts what you kept in the terms you picked it in, so a default that hides one thing reads as one thing hidden.'],it:["I tipi di evento che avevi gi\xe0 \u2014 Audio, Sensore, Controllo \u2014 adesso filtrano davvero. Spuntandone uno vedi quegli eventi, togliendo la spunta li nascondi, e non c'\xe8 un secondo filtro da cercare: quello che usavi \xe8 quello che funziona.","Gli eventi audio partono senza spunta, cos\xec la lista si apre su quello che guardi. Un pulsante Predefinito rimette il preset senza dover rispuntare tutto a mano.","Il contatore conta quello che hai tenuto nei termini in cui l'hai scelto, cos\xec un default che nasconde una cosa si legge come una cosa nascosta."]}},{version:'1.0.464',date:'2026-09-07',notes:{en:['The events page can now filter by where an event came from, and audio-only events start hidden. The filter sits in More with the others, and the chip counts it, so a shorter list always says why it is shorter.','Picking a class used to drag every sensor and audio event along with it, and picking a sensor selected nothing at all. Provenance is now its own axis, so both do what they say.','The Recent strip on the Cameras screen has its own filter, in the same fan menu, showing detections by default and remembering what you choose.'],it:["La pagina eventi ora filtra anche per provenienza, e gli eventi di solo audio partono nascosti. Il filtro sta in Altro insieme agli altri e il contatore lo conta, cos\xec una lista pi\xf9 corta dice sempre perch\xe9 lo \xe8.","Scegliere una classe si portava dietro ogni evento di sensore e di audio, e scegliere un sensore non selezionava nulla. La provenienza adesso \xe8 un asse suo, quindi entrambi fanno quello che dicono.","La striscia Recenti nella schermata Camere ha un filtro suo, nello stesso menu a ventaglio, che di default mostra le rilevazioni e ricorda quello che scegli."]}},{version:'1.0.463',date:'2026-09-07',notes:{en:['One record button, the same pair of buttons everywhere: press it, then Keep \u2014 with the duration on it \u2014 or Discard. On the live picture it records forward from now; on the recording it anchors a period you draw with the scrub, in either direction.','Pressing it during playback no longer reports that the live view cannot be recorded, and the period you draw stops at the live edge instead of losing itself there.','While you are drawing a period the timeline no longer buzzes at every step: the notch feedback belongs to looking for an event, not to choosing a moment.'],it:["Un solo pulsante di registrazione, e la stessa coppia di pulsanti ovunque: premi, poi Salva \u2014 con la durata sopra \u2014 oppure Scarta. Sull'immagine live registra da adesso in avanti; sul registrato fissa un periodo che disegni con lo scorrimento, in entrambe le direzioni.","Premendolo durante la riproduzione non dice pi\xf9 che non pu\xf2 registrare la vista live, e il periodo che stai disegnando si ferma al bordo live invece di perdersi.","Mentre disegni un periodo la timeline non vibra pi\xf9 a ogni passo: lo scatto delle tacche serve a cercare un evento, non a scegliere un momento."]}},{version:'1.0.462',date:'2026-09-07',notes:{en:['Save a stretch of the recording from the timeline: press the record button during playback to anchor the period, scrub to the other end, then Save or Discard. The selected period is highlighted on the strip.','While you are choosing, the recording does not play \u2014 you see the frame you scrubbed to. Nothing is created on the hub until you press Save, and a period that crosses a stretch with no recording says so before it is exported.'],it:["Salva un tratto di registrato dalla timeline: durante la riproduzione premi il pulsante di registrazione per fissare il periodo, scorri fino all'altro estremo, poi Salva o Scarta. Il periodo selezionato \xe8 evidenziato sulla striscia.","Mentre scegli la registrazione non parte: vedi il fotogramma su cui ti sei fermato. Sull'hub non viene creato nulla finch\xe9 non premi Salva, e un periodo che attraversa un tratto senza registrazione lo dice prima di esportare."]}},{version:'1.0.461',date:'2026-09-07',notes:{en:['A host with nowhere to show a tile\'s linked-devices and view-options panels can now say so, and the embed stops drawing two buttons that would do nothing.'],it:["Un ospite che non ha dove mostrare i pannelli dispositivi collegati e opzioni di vista pu\xf2 dirlo, e l'embed smette di disegnare due pulsanti che non farebbero nulla."]}},{version:'1.0.460',date:'2026-09-06',notes:{en:['Battery and signal icons are now buttons: tapping one opens the figures \u2014 charge, power source, sleeping, link type, signal and Wi-Fi network \u2014 on the stream and in the cameras list.','What the camera does not report is said in words, never as a fabricated 0%.'],it:["Le icone di batteria e segnale sono diventate pulsanti: toccandone una si aprono i numeri \u2014 carica, alimentazione, sospensione, tipo di collegamento, segnale e rete Wi-Fi \u2014 sullo stream e nella lista camere.","Ci\xf2 che la camera non riporta viene detto a parole, mai come uno 0% inventato."]}},{version:'1.0.459',date:'2026-09-06',notes:{en:['Home Assistant cards: the embed no longer needs a viewing token in the page \u2014 Home Assistant carries it, and the events card URL stops carrying a credential.'],it:["Card di Home Assistant: l'embed non ha pi\xf9 bisogno del token nella pagina, lo porta Home Assistant, e l'URL della card eventi smette di trasportare una credenziale."]}},{version:'1.0.458',date:'2026-09-06',notes:{en:['Robot camera in landscape: with the timeline open the drive buttons move onto the visible picture and shrink to fit; the "\u2026" is gone there, the timeline has its own.'],it:['Camera del robot in landscape: con la timeline aperta i pulsanti di guida passano sul video visibile e si rimpiccioliscono; l\xec sparisce il "\u2026", la timeline ha gi\xe0 il suo.']}},{version:'1.0.457',date:'2026-09-06',notes:{en:['A restart for an update waits for the snapshot downloads in flight \u2014 the crash right after an update on build 16.'],it:['Il riavvio per un aggiornamento aspetta i download degli snapshot in corso: il crash subito dopo un aggiornamento sulla build 16.']}},{version:'1.0.456',date:'2026-09-06',notes:{en:['An OTA update asks before restarting the app.','A newer TestFlight / store build is announced, with a button to open it.',"What's new: these notes, once per version and in Settings \u2192 Info."],it:["Un aggiornamento OTA chiede conferma prima di riavviare l'app.",'Una build TestFlight / Store pi\xf9 recente viene segnalata, con il pulsante per aprirla.','Novit\xe0: queste note, una volta per versione e in Impostazioni \u2192 Info.']}},{version:'1.0.455',date:'2026-09-06',notes:{en:['Robot camera: a drive joystick in landscape, with Stop, light, Follow me and Return to dock.','The controls button opens for robot cameras too.','Battery and signal are glyphs in the toolbar; the day arrows fold on a narrow row.','A sleeping camera shows the moon in its name chip.'],it:['Camera del robot: joystick di guida in landscape, con Stop, luce, Seguimi e Torna alla base.','Il pulsante dei controlli si apre anche per le camere del robot.','Batteria e segnale sono glifi nella toolbar; le frecce del giorno si ripiegano su riga stretta.','Una camera dormiente mostra la luna nel chip del nome.']}}];function o(o){return o?e.find(e=>e.version===o)??null:null}},946,[]);
100
100
  __d(function(g,r,i,a,m,_e,d){"use strict";function e(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(_e,'__esModule',{value:!0}),_e.WhatsNewModal=function(e){const o=(0,t.c)(48),{visible:h,latest:b,past:x,onClose:S}=e,{t:v,i18n:N}=(0,p.useTranslation)(),{colors:A}=(0,y.useTheme)(),w=N.language;let G,T,R,D,z,H,_,k,W,V,L,B,E,U,q,F;o[0]!==v?(G=v("v2.common.close"),o[0]=v,o[1]=G):G=o[1];o[2]!==S||o[3]!==G?(T=(0,C.jsx)(l.default,{style:u.default.absoluteFill,accessibilityRole:"button",accessibilityLabel:G,onPress:S}),o[2]=S,o[3]=G,o[4]=T):T=o[4];o[5]!==A.backgroundElevated||o[6]!==A.border?(R=[M.card,{backgroundColor:A.backgroundElevated,borderColor:A.border}],o[5]=A.backgroundElevated,o[6]=A.border,o[7]=R):R=o[7];o[8]!==A.foreground?(D=[M.title,{color:A.foreground}],o[8]=A.foreground,o[9]=D):D=o[9];o[10]!==v?(z=v("v2.updates.whatsNewHeading"),o[10]=v,o[11]=z):z=o[11];o[12]!==D||o[13]!==z?(H=(0,C.jsx)(c.default,{style:D,children:z}),o[12]=D,o[13]=z,o[14]=H):H=o[14];o[15]!==A.foregroundMuted||o[16]!==A.primary||o[17]!==w||o[18]!==b?(_=null!==b?(0,C.jsxs)(f.default,{style:[M.latest,{borderColor:A.primary}],children:[(0,C.jsxs)(f.default,{style:M.latestHeader,children:[(0,C.jsx)(c.default,{style:[M.latestVersion,{color:A.primary}],children:b.version}),(0,C.jsx)(c.default,{style:[M.pastDate,{color:A.foregroundMuted}],children:j(b.date,w)})]}),(0,C.jsx)(P,{entry:b,language:w})]}):null,o[15]=A.foregroundMuted,o[16]=A.primary,o[17]=w,o[18]=b,o[19]=_):_=o[19];o[20]!==w||o[21]!==x?(k=x.length>0?(0,C.jsx)(I,{past:x,language:w}):null,o[20]=w,o[21]=x,o[22]=k):k=o[22];o[23]!==_||o[24]!==k?(W=(0,C.jsxs)(s.default,{style:M.scroll,contentContainerStyle:M.scrollContent,children:[_,k]}),o[23]=_,o[24]=k,o[25]=W):W=o[25];o[26]!==A.primary?(V=[M.close,{backgroundColor:A.primary}],o[26]=A.primary,o[27]=V):V=o[27];o[28]!==v?(L=v("v2.common.ok"),o[28]=v,o[29]=L):L=o[29];o[30]!==L?(B=(0,C.jsx)(c.default,{style:M.closeLabel,children:L}),o[30]=L,o[31]=B):B=o[31];o[32]!==S||o[33]!==V||o[34]!==B?(E=(0,C.jsx)(l.default,{accessibilityRole:"button",onPress:S,style:V,children:B}),o[32]=S,o[33]=V,o[34]=B,o[35]=E):E=o[35];o[36]!==E||o[37]!==R||o[38]!==H||o[39]!==W?(U=(0,C.jsxs)(f.default,{style:R,children:[H,W,E]}),o[36]=E,o[37]=R,o[38]=H,o[39]=W,o[40]=U):U=o[40];o[41]!==U||o[42]!==T?(q=(0,C.jsxs)(f.default,{style:M.backdrop,children:[T,U]}),o[41]=U,o[42]=T,o[43]=q):q=o[43];o[44]!==S||o[45]!==q||o[46]!==h?(F=(0,C.jsx)(n.default,{visible:h,transparent:!0,animationType:"fade",onRequestClose:S,children:q}),o[44]=S,o[45]=q,o[46]=h,o[47]=F):F=o[47];return F};var t=r(d[0]),o=r(d[1]),n=e(r(d[2])),l=e(r(d[3])),s=e(r(d[4])),u=e(r(d[5])),c=e(r(d[6])),f=e(r(d[7])),p=r(d[8]),h=r(d[9]),b=r(d[10]),y=r(d[11]),x=r(d[12]),S=r(d[13]),C=r(d[14]);function j(e,t){const o=new Date(e);return Number.isNaN(o.getTime())?e:o.toLocaleDateString(t,{day:'numeric',month:'short',year:'numeric'})}function P(e){const o=(0,t.c)(8),{entry:n,language:l}=e,{colors:s}=(0,y.useTheme)();let u,p;if(o[0]!==s||o[1]!==n||o[2]!==l){let e;o[4]!==s?(e=e=>(0,C.jsxs)(f.default,{style:M.note,children:[(0,C.jsx)(c.default,{style:[M.bullet,{color:s.primary}],children:"\u2022"}),(0,C.jsx)(c.default,{style:[M.noteText,{color:s.foreground}],children:e})]},e),o[4]=s,o[5]=e):e=o[5],u=(0,S.whatsNewLines)(n,l).map(e),o[0]=s,o[1]=n,o[2]=l,o[3]=u}else u=o[3];return o[6]!==u?(p=(0,C.jsx)(f.default,{style:M.notes,children:u}),o[6]=u,o[7]=p):p=o[7],p}function v(e){const n=(0,t.c)(35),{entry:s,language:u}=e,{colors:p}=(0,y.useTheme)(),[x,S]=(0,o.useState)(!1),v=x?h.ChevronDown:h.ChevronRight;let I,A;n[0]!==p.border?(I=[M.pastRow,{borderColor:p.border}],n[0]=p.border,n[1]=I):I=n[1],n[2]!==x?(A={expanded:x},n[2]=x,n[3]=A):A=n[3];const w=s.version;let G,T,R,D,z,H,_,k,W,V;return n[4]===Symbol.for("react.memo_cache_sentinel")?(G=()=>{(0,b.hapticTap)(),S(N)},n[4]=G):G=n[4],n[5]!==v||n[6]!==p.foregroundMuted?(T=(0,C.jsx)(v,{size:14,color:p.foregroundMuted}),n[5]=v,n[6]=p.foregroundMuted,n[7]=T):T=n[7],n[8]!==p.foreground?(R=[M.pastVersion,{color:p.foreground}],n[8]=p.foreground,n[9]=R):R=n[9],n[10]!==s.version||n[11]!==R?(D=(0,C.jsx)(c.default,{style:R,children:s.version}),n[10]=s.version,n[11]=R,n[12]=D):D=n[12],n[13]!==p.foregroundMuted?(z=[M.pastDate,{color:p.foregroundMuted}],n[13]=p.foregroundMuted,n[14]=z):z=n[14],n[15]!==s.date||n[16]!==u?(H=j(s.date,u),n[15]=s.date,n[16]=u,n[17]=H):H=n[17],n[18]!==z||n[19]!==H?(_=(0,C.jsx)(c.default,{style:z,children:H}),n[18]=z,n[19]=H,n[20]=_):_=n[20],n[21]!==s.version||n[22]!==_||n[23]!==A||n[24]!==T||n[25]!==D?(k=(0,C.jsxs)(l.default,{accessibilityRole:"button",accessibilityState:A,accessibilityLabel:w,onPress:G,style:M.pastHeader,children:[T,D,_]}),n[21]=s.version,n[22]=_,n[23]=A,n[24]=T,n[25]=D,n[26]=k):k=n[26],n[27]!==s||n[28]!==u||n[29]!==x?(W=x?(0,C.jsx)(P,{entry:s,language:u}):null,n[27]=s,n[28]=u,n[29]=x,n[30]=W):W=n[30],n[31]!==I||n[32]!==k||n[33]!==W?(V=(0,C.jsxs)(f.default,{style:I,children:[k,W]}),n[31]=I,n[32]=k,n[33]=W,n[34]=V):V=n[34],V}function N(e){return!e}function I(e){const n=(0,t.c)(33),{past:s,language:u}=e,{t:x}=(0,p.useTranslation)(),{colors:S}=(0,y.useTheme)(),[j,P]=(0,o.useState)(!1),N=j?h.ChevronDown:h.ChevronRight;let I,w,G,T,R,D,z,H;n[0]!==j?(I={expanded:j},n[0]=j,n[1]=I):I=n[1],n[2]!==x?(w=x("v2.updates.whatsNewPrevious"),n[2]=x,n[3]=w):w=n[3],n[4]===Symbol.for("react.memo_cache_sentinel")?(G=()=>{(0,b.hapticTap)(),P(A)},n[4]=G):G=n[4],n[5]!==N||n[6]!==S.foregroundMuted?(T=(0,C.jsx)(N,{size:14,color:S.foregroundMuted}),n[5]=N,n[6]=S.foregroundMuted,n[7]=T):T=n[7],n[8]!==S.foregroundMuted?(R=[M.pastTitle,{color:S.foregroundMuted}],n[8]=S.foregroundMuted,n[9]=R):R=n[9],n[10]!==x?(D=x("v2.updates.whatsNewPrevious"),n[10]=x,n[11]=D):D=n[11],n[12]!==R||n[13]!==D?(z=(0,C.jsx)(c.default,{style:R,children:D}),n[12]=R,n[13]=D,n[14]=z):z=n[14],n[15]!==S.foregroundMuted?(H=[M.pastCount,{color:S.foregroundMuted}],n[15]=S.foregroundMuted,n[16]=H):H=n[16];const _=String(s.length);let k,W,V,L;return n[17]!==H||n[18]!==_?(k=(0,C.jsx)(c.default,{style:H,children:_}),n[17]=H,n[18]=_,n[19]=k):k=n[19],n[20]!==I||n[21]!==k||n[22]!==w||n[23]!==T||n[24]!==z?(W=(0,C.jsxs)(l.default,{accessibilityRole:"button",accessibilityState:I,accessibilityLabel:w,onPress:G,style:M.pastPanelHeader,children:[T,z,k]}),n[20]=I,n[21]=k,n[22]=w,n[23]=T,n[24]=z,n[25]=W):W=n[25],n[26]!==u||n[27]!==j||n[28]!==s?(V=j?s.map(e=>(0,C.jsx)(v,{entry:e,language:u},e.version)):null,n[26]=u,n[27]=j,n[28]=s,n[29]=V):V=n[29],n[30]!==W||n[31]!==V?(L=(0,C.jsxs)(f.default,{style:M.pastPanel,children:[W,V]}),n[30]=W,n[31]=V,n[32]=L):L=n[32],L}function A(e){return!e}const M=u.default.create({backdrop:{flex:1,alignItems:'center',justifyContent:'center',padding:x.SPACING.lg,backgroundColor:'rgba(0,0,0,0.5)'},card:{width:'100%',maxWidth:460,maxHeight:'80%',borderWidth:1,borderRadius:x.RADIUS.lg,padding:x.SPACING.lg},title:{fontSize:16,fontWeight:'600',marginBottom:x.SPACING.md},scroll:{flexGrow:0},scrollContent:{paddingBottom:x.SPACING.sm},latest:{borderWidth:1,borderRadius:x.RADIUS.md,padding:x.SPACING.md,marginBottom:x.SPACING.lg},latestHeader:{flexDirection:'row',alignItems:'baseline',gap:x.SPACING.sm},latestVersion:{fontSize:15,fontWeight:'700'},notes:{marginTop:x.SPACING.sm,gap:x.SPACING.xs},note:{flexDirection:'row',gap:x.SPACING.xs},bullet:{fontSize:13,lineHeight:19},noteText:{flex:1,fontSize:13,lineHeight:19},pastTitle:{flex:1,fontSize:11,textTransform:'uppercase',letterSpacing:.6},pastPanel:{marginTop:x.SPACING.sm},pastPanelHeader:{flexDirection:'row',alignItems:'center',gap:x.SPACING.sm,paddingVertical:x.SPACING.sm},pastCount:{fontSize:11,fontVariant:['tabular-nums']},pastRow:{borderTopWidth:1,paddingVertical:x.SPACING.sm},pastHeader:{flexDirection:'row',alignItems:'center',gap:x.SPACING.sm},pastVersion:{fontSize:13,fontWeight:'600'},pastDate:{fontSize:11},close:{marginTop:x.SPACING.md,alignSelf:'flex-end',paddingHorizontal:x.SPACING.lg,paddingVertical:x.SPACING.sm,borderRadius:x.RADIUS.md},closeLabel:{color:'#fff',fontSize:13,fontWeight:'600'}})},947,[787,16,241,248,139,33,194,115,813,814,817,789,831,946,10]);
101
101
  __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.useNativeRelease=function(){const c=(0,t.c)(8),{server:o}=(0,s.useServer)(),v=o?.serverUrl??null;let f;c[0]!==v?(f=["v2","native-release",v],c[0]=v,c[1]=f):f=c[1];const y=!1;let _,h;c[2]!==v?(_=async()=>{if(null===v)return null;const t=await fetch((0,l.nativeReleasePath)(v),{cache:"no-store"});if(!t.ok)return null;const n=await t.json();return(0,l.isNativeRelease)(n)?n:null},c[2]=v,c[3]=_):_=c[3];c[4]!==f||c[5]!==y||c[6]!==_?(h={queryKey:f,enabled:y,staleTime:u,queryFn:_},c[4]=f,c[5]=y,c[6]=_,c[7]=h):h=c[7];return(0,n.useQuery)(h)};var t=r(d[0]),n=r(d[1]);r(d[2]);var s=r(d[3]),l=r(d[4]);const u=36e5},948,[787,848,110,914,944]);
102
102
  __d(function(g,r,i,a,m,_e,_d){"use strict";Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"RELOAD_DRAIN_TIMEOUT_MS",{enumerable:!0,get:function(){return u}}),_e.reloadRuntimeForUpdate=async function(c){o.runtimeQuiesce.requestQuiesce();const s=o.runtimeQuiesce.inflight(),d=await o.runtimeQuiesce.waitForIdle(u);n.log.info('crash','restarting the runtime to apply an OTA update',{reason:c,inflight:s,drained:d}),await(0,t.getExitMarkerRecorder)().record('ota-reload'),await e.reloadAsync()};var e=(function(e){if(e&&e.__esModule)return e;var t={};return e&&Object.keys(e).forEach(function(n){var o=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,o.get?o:{enumerable:!0,get:function(){return e[n]}})}),t.default=e,t})(r(_d[0])),t=r(_d[1]),n=r(_d[2]),o=r(_d[3]);const u=4e3},949,[942,2510,916,2385]);
103
- __d(function(g,r,i,_a,m,_e,d){"use strict";Object.defineProperty(_e,'__esModule',{value:!0}),_e.parsePortScheme=function(t){try{const n=new URL(t),e='http:'===n.protocol?'http':'https';return n.port?{port:Number(n.port),scheme:e,explicitPort:!0}:{port:'http'===e?80:443,scheme:e,explicitPort:!1}}catch{return{port:4443,scheme:'https',explicitPort:!1}}},_e.isLoopbackUrl=n,_e.isLoopbackEndpoint=e,_e.dropLoopbackEndpoints=o,_e.isIpv6Url=c,_e.isIpv6Endpoint=l,_e.dropIpv6Endpoints=function(t){return t.filter(t=>!l(t))},_e.isDefaultViewerEndpoint=s,_e.filterViewerRaceEndpoints=u,_e.dropUnverifiedPortEndpoints=function(t,n){return a(n)?{kept:t,dropped:[]}:{kept:t.filter(t=>!p.has(t.kind)),dropped:t.filter(t=>p.has(t.kind))}},_e.isPortVouchedFor=a,_e.endpointsToCandidates=function(t,n){const e=(t,n)=>t.priority-n.priority,o=t.filter(t=>t.plausible).slice().sort(e),c=t.filter(t=>!t.plausible).slice().sort(e),l=[...o.map(t=>t.baseUrl),n,...c.map(t=>t.baseUrl)],s=[];for(const t of l)t&&!s.includes(t)&&s.push(t);return s},_e.parseAdvertisedLocalPort=y,_e.discoverEndpoints=async function(n,e,c){try{const t=n.trpcClient,l=t?.localNetwork,s=l?.getConnectionEndpoints,p=s?.query;if('function'!=typeof p)return f;const a=await p({port:e,scheme:c,includeLoopback:!1}),b=o(a?.endpoints?[...a.endpoints]:[]);return{endpoints:u(b,await h(l)),localPort:y(a?.localPort)}}catch(n){return t.log.warn('conn','discoverEndpoints failed',{error:n instanceof Error?n.message:String(n)}),f}},_e.isMixedContentUrl=v,_e.dropMixedContentUrls=function(t,n){return t.filter(t=>!v(t,n))},_e.currentPageProtocol=function(){const t=globalThis.location;if('object'!=typeof t||null===t)return null;const n=t.protocol;return'string'==typeof n&&n.length>0?n:null};var t=r(d[0]);function n(t){try{const n=new URL(t).hostname.replace(/^\[|\]$/g,'').toLowerCase();return'localhost'===n||'::1'===n||n.startsWith('127.')}catch{return!1}}function e(t){return'loopback'===t.kind||n(t.baseUrl)}function o(t){return t.filter(t=>!e(t))}function c(t){try{return new URL(t).hostname.replace(/^\[|\]$/g,'').includes(':')}catch{return!1}}function l(t){return'lan-ipv6'===t.kind||c(t.baseUrl)}function s(t){return'lan-ipv4'===t.kind||'public'===t.kind&&'public'===t.interfaceKind}function u(t,n){if(null===n)return t.filter(s);const e=new Set(n),o=t.filter(t=>e.has(t.baseUrl));return o.length>0?o:t.filter(s)}const p=new Set(['lan-ipv4','lan-ipv6','loopback']);function a(t){const n=t.declared;return null!==n&&'caller-hint'!==n.source||t.explicitPort}const f={endpoints:[],localPort:null};async function h(t){const n=t?.getViewerEndpoints,e=n?.query;if('function'!=typeof e)return null;try{const t=await e();if(!Array.isArray(t?.resolved))return null;return t.resolved.filter(t=>'string'==typeof t&&t.length>0)}catch{return null}}const b=['server-config','server-env','caller-hint','default'];function y(t){if('object'!=typeof t||null===t)return null;const n=Object.assign({},t),e=n.port,o=n.source;if('number'!=typeof e||!Number.isInteger(e)||e<1||e>65535)return null;if('string'!=typeof o)return null;const c=b.find(t=>t===o);return c?{port:e,source:c}:null}function v(t,n){return'https:'===n&&t.trim().toLowerCase().startsWith('http:')}},950,[916]);
103
+ __d(function(g,r,i,_a,m,_e,d){"use strict";Object.defineProperty(_e,'__esModule',{value:!0}),_e.parsePortScheme=function(t){try{const n=new URL(t),e='http:'===n.protocol?'http':'https';return n.port?{port:Number(n.port),scheme:e,explicitPort:!0}:{port:'http'===e?80:443,scheme:e,explicitPort:!1}}catch{return{port:4443,scheme:'https',explicitPort:!1}}},_e.isLoopbackUrl=n,_e.isLoopbackEndpoint=e,_e.dropLoopbackEndpoints=o,_e.isIpv6Url=l,_e.isIpv6Endpoint=s,_e.dropIpv6Endpoints=function(t){return t.filter(t=>!s(t))},_e.isDefaultViewerEndpoint=c,_e.filterViewerRaceEndpoints=u,_e.dropUnverifiedPortEndpoints=function(t,n){return a(n)?{kept:t,dropped:[]}:{kept:t.filter(t=>!p.has(t.kind)),dropped:t.filter(t=>p.has(t.kind))}},_e.isPortVouchedFor=a,_e.endpointsToCandidates=function(t,n){const e=(t,n)=>t.priority-n.priority,o=t.filter(t=>t.plausible).slice().sort(e),l=t.filter(t=>!t.plausible).slice().sort(e),s=[...o.map(t=>t.baseUrl),n,...l.map(t=>t.baseUrl)],c=[];for(const t of s)t&&!c.includes(t)&&c.push(t);return c},_e.parseAdvertisedLocalPort=v,_e.discoverEndpoints=async function(n,e,l){try{const t=n.trpcClient,s=t?.localNetwork,c=s?.getConnectionEndpoints,p=c?.query;if('function'!=typeof p)return f;const a=await p({port:e,scheme:l,includeLoopback:!1}),b=o(a?.endpoints?[...a.endpoints]:[]);return{endpoints:u(b,await h(s)),localPort:v(a?.localPort)}}catch(n){return t.log.warn('conn','discoverEndpoints failed',{error:n instanceof Error?n.message:String(n)}),f}},_e.isMixedContentUrl=y,_e.dropMixedContentUrls=function(t,n){return t.filter(t=>!y(t,n))},_e.currentPageProtocol=function(){const t=globalThis.location;if('object'!=typeof t||null===t)return null;const n=t.protocol;return'string'==typeof n&&n.length>0?n:null},_e.secureLanTwin=k,_e.withSecureLanTwins=function(t,n,e){if('https:'!==e)return[...t];const o=[];for(const l of t){const t=y(l.baseUrl,e)?k(l,n)??l:l;o.some(n=>n.baseUrl===t.baseUrl)||o.push(t)}return o},_e.pinnableRouteEndpoints=function(t,n){return o(t).filter(t=>!y(t.baseUrl,n))};var t=r(d[0]);function n(t){try{const n=new URL(t).hostname.replace(/^\[|\]$/g,'').toLowerCase();return'localhost'===n||'::1'===n||n.startsWith('127.')}catch{return!1}}function e(t){return'loopback'===t.kind||n(t.baseUrl)}function o(t){return t.filter(t=>!e(t))}function l(t){try{return new URL(t).hostname.replace(/^\[|\]$/g,'').includes(':')}catch{return!1}}function s(t){return'lan-ipv6'===t.kind||l(t.baseUrl)}function c(t){return'lan-ipv4'===t.kind||'public'===t.kind&&'public'===t.interfaceKind}function u(t,n){if(null===n)return t.filter(c);const e=new Set(n),o=t.filter(t=>e.has(t.baseUrl));return o.length>0?o:t.filter(c)}const p=new Set(['lan-ipv4','lan-ipv6','loopback']);function a(t){const n=t.declared;return null!==n&&'caller-hint'!==n.source||t.explicitPort}const f={endpoints:[],localPort:null};async function h(t){const n=t?.getViewerEndpoints,e=n?.query;if('function'!=typeof e)return null;try{const t=await e();if(!Array.isArray(t?.resolved))return null;return t.resolved.filter(t=>'string'==typeof t&&t.length>0)}catch{return null}}const b=['server-config','server-env','caller-hint','default'];function v(t){if('object'!=typeof t||null===t)return null;const n=Object.assign({},t),e=n.port,o=n.source;if('number'!=typeof e||!Number.isInteger(e)||e<1||e>65535)return null;if('string'!=typeof o)return null;const l=b.find(t=>t===o);return l?{port:e,source:l}:null}function y(t,n){return'https:'===n&&t.trim().toLowerCase().startsWith('http:')}const w=new Set(['server-config','server-env']),U=new Set(['lan-ipv4','lan-ipv6']);function k(t,n){if(null===n||!w.has(n.source))return null;if(!U.has(t.kind))return null;try{const e=new URL(t.baseUrl);return'http:'!==e.protocol?null:(e.protocol='https:',e.port=String(n.port),Object.assign({},t,{baseUrl:e.origin}))}catch{return null}}},950,[916]);
104
104
  __d(function(g,r,i,a,m,_e,d){"use strict";function e(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(_e,'__esModule',{value:!0}),_e.Row=function(e){const b=(0,o.c)(33),{label:h,value:v,icon:S,onPress:x,danger:p,right:j,last:y}=e,_=void 0!==p&&p,C=void 0!==y&&y,{colors:M}=(0,s.useTheme)(),P=_?M.danger:M.foreground,z=_?M.danger:M.foregroundMuted,H="function"==typeof x,I=C?0:1;let A,G,N,O,R,W,w;b[0]!==M.borderSubtle||b[1]!==I?(A={flexDirection:"row",alignItems:"center",gap:c.SPACING.lg,paddingHorizontal:c.SPACING.xl,paddingVertical:c.SPACING.lg,borderBottomWidth:I,borderBottomColor:M.borderSubtle},b[0]=M.borderSubtle,b[1]=I,b[2]=A):A=b[2];b[3]!==S||b[4]!==z?(G=S?(0,f.jsx)(S,{size:18,color:z}):null,b[3]=S,b[4]=z,b[5]=G):G=b[5];b[6]!==P?(N={flex:1,color:P,fontSize:15,fontWeight:"500"},b[6]=P,b[7]=N):N=b[7];b[8]!==h||b[9]!==N?(O=(0,f.jsx)(n.default,{style:N,numberOfLines:1,children:h}),b[8]=h,b[9]=N,b[10]=O):O=b[10];b[11]!==M.foregroundMuted||b[12]!==j||b[13]!==v?(R=j??(v?(0,f.jsx)(n.default,{style:{color:M.foregroundMuted,fontSize:14,maxWidth:"55%"},numberOfLines:1,children:v}):null),b[11]=M.foregroundMuted,b[12]=j,b[13]=v,b[14]=R):R=b[14];b[15]!==M.foregroundSubtle||b[16]!==H||b[17]!==j?(W=H&&!j?(0,f.jsx)(u.ChevronRight,{size:18,color:M.foregroundSubtle}):null,b[15]=M.foregroundSubtle,b[16]=H,b[17]=j,b[18]=W):W=b[18];b[19]!==A||b[20]!==G||b[21]!==O||b[22]!==R||b[23]!==W?(w=(0,f.jsxs)(l.default,{style:A,children:[G,O,R,W]}),b[19]=A,b[20]=G,b[21]=O,b[22]=R,b[23]=W,b[24]=w):w=b[24];const B=w;if(!H)return B;let L,k,D;b[25]!==M.surfaceHover?(L={color:M.surfaceHover},k=e=>{const{pressed:o}=e;return{backgroundColor:o?M.surfaceHover:"transparent"}},b[25]=M.surfaceHover,b[26]=L,b[27]=k):(L=b[26],k=b[27]);b[28]!==B||b[29]!==x||b[30]!==L||b[31]!==k?(D=(0,f.jsx)(t.default,{accessibilityRole:"button",onPress:x,android_ripple:L,style:k,children:B}),b[28]=B,b[29]=x,b[30]=L,b[31]=k,b[32]=D):D=b[32];return D};var o=r(d[0]);r(d[1]);var t=e(r(d[2])),n=e(r(d[3])),l=e(r(d[4])),u=r(d[5]),s=r(d[6]),c=r(d[7]),f=r(d[8])},951,[787,16,248,194,115,814,789,831,10]);
105
105
  __d(function(g,r,i,a,m,_e,d){"use strict";function e(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(_e,'__esModule',{value:!0}),_e.SelectRow=function(e){const x=(0,o.c)(48),{label:S,icon:p,options:y,value:_,onChange:v,last:j}=e,C=void 0!==j&&j,{colors:I}=(0,c.useTheme)(),w=(0,t.useRef)(null),[M,P]=(0,t.useState)(!1),[z,A]=(0,t.useState)(null),H=Math.max(0,y.findIndex(e=>e.value===_)),W=y[H];let D;x[0]===Symbol.for("react.memo_cache_sentinel")?(D=()=>{w.current?.measureInWindow((e,o,t,n)=>{A({x:e,y:o,width:t,height:n}),P(!0)})},x[0]=D):D=x[0];const G=D;let N,R,O;x[1]!==M?(N={expanded:M},x[1]=M,x[2]=N):N=x[2];x[3]!==I.surfaceHover?(R={color:I.surfaceHover},O=e=>{const{pressed:o}=e;return{backgroundColor:o?I.surfaceHover:"transparent"}},x[3]=I.surfaceHover,x[4]=R,x[5]=O):(R=x[4],O=x[5]);const B=C?0:1;let L,k,q,F,T,U;x[6]!==I.borderSubtle||x[7]!==B?(L={flexDirection:"row",alignItems:"center",gap:f.SPACING.lg,paddingHorizontal:f.SPACING.xl,paddingVertical:f.SPACING.lg,borderBottomWidth:B,borderBottomColor:I.borderSubtle},x[6]=I.borderSubtle,x[7]=B,x[8]=L):L=x[8];x[9]!==p||x[10]!==I.foregroundMuted?(k=p?(0,h.jsx)(p,{size:18,color:I.foregroundMuted}):null,x[9]=p,x[10]=I.foregroundMuted,x[11]=k):k=x[11];x[12]!==I.foreground?(q={flex:1,color:I.foreground,fontSize:15,fontWeight:"500"},x[12]=I.foreground,x[13]=q):q=x[13];x[14]!==S||x[15]!==q?(F=(0,h.jsx)(l.default,{style:q,numberOfLines:1,children:S}),x[14]=S,x[15]=q,x[16]=F):F=x[16];x[17]===Symbol.for("react.memo_cache_sentinel")?(T={flexDirection:"row",alignItems:"center",gap:f.SPACING.xs},x[17]=T):T=x[17];x[18]!==I.primary?(U={color:I.primary,fontSize:14,fontWeight:"600",maxWidth:160},x[18]=I.primary,x[19]=U):U=x[19];const V=W?.label??"";let E,J,K,Q,X,Y,Z,$;x[20]!==U||x[21]!==V?(E=(0,h.jsx)(l.default,{style:U,numberOfLines:1,children:V}),x[20]=U,x[21]=V,x[22]=E):E=x[22];x[23]!==I.foregroundSubtle?(J=(0,h.jsx)(u.ChevronsUpDown,{size:16,color:I.foregroundSubtle}),x[23]=I.foregroundSubtle,x[24]=J):J=x[24];x[25]!==E||x[26]!==J?(K=(0,h.jsxs)(s.default,{ref:w,collapsable:!1,style:T,children:[E,J]}),x[25]=E,x[26]=J,x[27]=K):K=x[27];x[28]!==F||x[29]!==K||x[30]!==L||x[31]!==k?(Q=(0,h.jsxs)(s.default,{style:L,children:[k,F,K]}),x[28]=F,x[29]=K,x[30]=L,x[31]=k,x[32]=Q):Q=x[32];x[33]!==Q||x[34]!==N||x[35]!==R||x[36]!==O?(X=(0,h.jsx)(n.default,{accessibilityRole:"button",accessibilityState:N,onPress:G,android_ripple:R,style:O,children:Q}),x[33]=Q,x[34]=N,x[35]=R,x[36]=O,x[37]=X):X=x[37];x[38]===Symbol.for("react.memo_cache_sentinel")?(Y=()=>{P(!1)},x[38]=Y):Y=x[38];x[39]!==z||x[40]!==v||x[41]!==M||x[42]!==y||x[43]!==_?(Z=(0,h.jsx)(b.AnchoredDropdown,{visible:M,onRequestClose:Y,anchor:z,options:y,value:_,onChange:v}),x[39]=z,x[40]=v,x[41]=M,x[42]=y,x[43]=_,x[44]=Z):Z=x[44];x[45]!==X||x[46]!==Z?($=(0,h.jsxs)(h.Fragment,{children:[X,Z]}),x[45]=X,x[46]=Z,x[47]=$):$=x[47];return $};var o=r(d[0]),t=r(d[1]),n=e(r(d[2])),l=e(r(d[3])),s=e(r(d[4])),u=r(d[5]),c=r(d[6]),f=r(d[7]),b=r(d[8]),h=r(d[9])},952,[787,16,248,194,115,814,789,831,2388,10]);
106
106
  __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"AUDIO_ON_OPEN_MODES",{enumerable:!0,get:function(){return n}}),Object.defineProperty(e,"AUDIO_ON_OPEN_DEFAULT",{enumerable:!0,get:function(){return t}}),e.isAudioOnOpenMode=o,e.parseAudioOnOpen=function(n){return o(n)?n:!0===n?'on':!1===n?'off':t},e.opensMuted=function(n,t){return'on'!==n&&('off'===n||(void 0===t||!t))};const n=['last-selected','on','off'],t='last-selected';function o(n){return'on'===n||'off'===n||'last-selected'===n}},953,[]);
107
- __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"REFERENCE_WIDTH",{enumerable:!0,get:function(){return n}}),Object.defineProperty(e,"MIN_SCALE",{enumerable:!0,get:function(){return o}}),Object.defineProperty(e,"MAX_SCALE",{enumerable:!0,get:function(){return u}}),Object.defineProperty(e,"TOOLBAR_DENSITY_FACTOR",{enumerable:!0,get:function(){return c}}),e.scaleForWidth=l,e.timelineTokens=b,Object.defineProperty(e,"FULL_SIZE_TOKENS",{enumerable:!0,get:function(){return O}});var t=r(d[0]);const n=390,o=.66,u=1,c={small:1,medium:1.2,large:1.45};function s(t,n){return!Number.isFinite(t)||t<=0?t:Math.max(1,Math.round(t*n))}function f(t,n){const o={};for(const u of Object.keys(t))o[u]=s(t[u],n);return o}function l(t,s="small"){const f=c[s];if(!Number.isFinite(t)||t<=0)return u*f;const l=t/n;return Math.min(u,Math.max(o,l))*f}function b(n,o="small"){const u=l(n,o);return{scale:u,width:n,space:f(t.SPACING,u),radius:f(t.RADIUS,u),font:f(t.TYPOGRAPHY.size,u),control:{button:s(30,u),arrow:s(28,u),primary:s(40,u)},icon:{xs:s(11,u),sm:s(14,u),md:s(18,u)},px:t=>s(t,u)}}const O=b(n)},954,[831]);
107
+ __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"REFERENCE_WIDTH",{enumerable:!0,get:function(){return t}}),Object.defineProperty(e,"MIN_SCALE",{enumerable:!0,get:function(){return o}}),Object.defineProperty(e,"MAX_SCALE",{enumerable:!0,get:function(){return u}}),Object.defineProperty(e,"TOOLBAR_DENSITY_FACTOR",{enumerable:!0,get:function(){return c}}),e.scaleDimension=function(n,t){return s(n,t)},e.scaleForWidth=l,e.timelineTokens=b,Object.defineProperty(e,"FULL_SIZE_TOKENS",{enumerable:!0,get:function(){return O}});var n=r(d[0]);const t=390,o=.66,u=1,c={small:1,medium:1.2,large:1.45};function s(n,t){return!Number.isFinite(n)||n<=0?n:Math.max(1,Math.round(n*t))}function f(n,t){const o={};for(const u of Object.keys(n))o[u]=s(n[u],t);return o}function l(n,s="small"){const f=c[s];if(!Number.isFinite(n)||n<=0)return u*f;const l=n/t;return Math.min(u,Math.max(o,l))*f}function b(t,o="small"){const u=l(t,o);return{scale:u,width:t,space:f(n.SPACING,u),radius:f(n.RADIUS,u),font:f(n.TYPOGRAPHY.size,u),control:{button:s(30,u),arrow:s(28,u),primary:s(40,u)},icon:{xs:s(11,u),sm:s(14,u),md:s(18,u)},px:n=>s(n,u)}}const O=b(t)},954,[831]);
108
108
  __d(function(g,r,i,a,m,_e,_d){"use strict";Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"LANGUAGE_KEY",{enumerable:!0,get:function(){return f}}),_e.resolveLanguage=_,_e.useLanguage=function(){const e=(0,t.c)(7),{i18n:c}=(0,u.useTranslation)(),[s,l]=(0,n.useState)("system");let d,y,b;e[0]===Symbol.for("react.memo_cache_sentinel")?(d=()=>{o.default.getItem(f).then(e=>{"system"!==e&&"it"!==e&&"en"!==e||l(e)})},y=[],e[0]=d,e[1]=y):(d=e[0],y=e[1]);(0,n.useEffect)(d,y),e[2]!==c?(b=e=>{l(e),o.default.setItem(f,e),c.changeLanguage(_(e))},e[2]=c,e[3]=b):b=e[3];const p=b;let v;e[4]!==s||e[5]!==p?(v={preference:s,setPreference:p},e[4]=s,e[5]=p,e[6]=v):v=e[6];return v};var e,t=r(_d[0]),n=r(_d[1]),u=r(_d[2]),c=(function(e){if(e&&e.__esModule)return e;var t={};return e&&Object.keys(e).forEach(function(n){var u=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,u.get?u:{enumerable:!0,get:function(){return e[n]}})}),t.default=e,t})(r(_d[3])),s=r(_d[4]),o=(e=s)&&e.__esModule?e:{default:e};const f='v2.language',l=['it','en'];function d(){const e=c.getLocales()[0]?.languageCode?.slice(0,2)??'en';return l.includes(e)?e:'en'}function _(e){return'system'===e?d():e}},955,[787,16,813,1275,858]);
109
109
  __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"TABLET_MIN_SIDE",{enumerable:!0,get:function(){return t}}),Object.defineProperty(e,"WEB_SIDEBAR_MIN_WIDTH",{enumerable:!0,get:function(){return n}}),Object.defineProperty(e,"DETAIL_WIDE_MIN_WIDTH",{enumerable:!0,get:function(){return o}}),e.isLandscapeViewport=c,e.tabletSourceFor=s,e.isTabletViewport=h,e.shouldShowSidebar=function({width:o,height:u,isWeb:c}){const s=Math.min(o,u)>=t,h=Math.min(o,u)<t&&o>u,b=c&&o>=n;return s||h||b},e.shouldUseWideDetail=function(t){return!(!h(t)||!c(t))||t.isWeb&&t.width>=o},e.shouldRestorePortraitLock=function({screenMinSide:n,isWeb:o}){return!o&&(void 0===n||!u(n)||n<t)};const t=768,n=900,o=1e3;function u(t){return Number.isFinite(t)&&t>0}function c({width:t,height:n}){return!(!u(t)||!u(n))&&t>=n}function s({isWeb:t,screenMinSide:n}){return!t&&void 0!==n&&u(n)?'screen':'window'}function h(n){const{width:o,height:u,screenMinSide:c}=n;return'screen'===s(n)?(c??0)>=t:Math.min(o,u)>=t}},956,[]);
110
110
  __d(function(g,r,i,_a,m,e,d){"use strict";function n(n){try{return new URL(n.trim()).origin}catch{return null}}Object.defineProperty(e,'__esModule',{value:!0}),e.parseHubOrigin=function(n){if('string'!=typeof n)return null;const t=n.trim();if(''===t)return null;let u;try{u=new URL(t)}catch{return null}return'https:'!==u.protocol||''!==u.username||''!==u.password||''===u.hostname||''!==u.search||''!==u.hash||'/'!==u.pathname&&''!==u.pathname?null:u.origin},e.originOf=n,e.sameHubOrigin=function(t,u){const o=n(t);return null!==o&&o===n(u)},e.serverDisplayName=function(n){try{return new URL(n.trim()).host||n}catch{return n}}},957,[]);
@@ -129,7 +129,7 @@ __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{v
129
129
  __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.qualityForRoute=o,e.qualityToTarget=u,e.qualityToTargetForRoute=function(t,n){return u(o(t,n))};var t=r(d[0]);function o(o,u){return(0,t.isLocalRouteChannel)(u)?o:'low'}function u(t){return'auto'===t?{kind:'adaptive'}:{kind:'profile',profile:t}}},990,[1741]);
130
130
  __d(function(g,r,i,a,m,_e,d){"use strict";Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"initialPlaybackState",{enumerable:!0,get:function(){return l}}),Object.defineProperty(_e,"RECONCILE_TOLERANCE_MS",{enumerable:!0,get:function(){return p}}),Object.defineProperty(_e,"MAX_STRAGGLER_REPORTS",{enumerable:!0,get:function(){return b}}),_e.playbackReducer=S,_e.shouldEmit=O,Object.defineProperty(_e,"COMMIT_DEDUPE_TOLERANCE_MS",{enumerable:!0,get:function(){return y}}),Object.defineProperty(_e,"COMMIT_DEDUPE_WINDOW_MS",{enumerable:!0,get:function(){return f}}),_e.shouldCommit=_,_e.selectActiveEpoch=L,_e.selectExportSelectionAnchor=function(e){return e.selectionAnchor},_e.selectScrubDirection=function(e){return'seeking'===e.mode?e.scrubDirection:null},_e.selectPlaybackStatus=function(e){const t='live'===e.mode?'live':'gap'===e.mode?'gap':'error'===e.mode?'error':'playing';return(0,o.derivePlaybackStatus)({mode:t,playheadEpoch:L(e)})},_e.makePlaybackBridge=T,_e.usePlaybackMachine=function(t,c=()=>!1){const[n,o]=(0,e.useReducer)(S,l),u=(0,e.useRef)(0),s=(0,e.useRef)(null),p=(0,e.useRef)(null),b=(0,e.useRef)(c);b.current=c;const k=(0,e.useRef)(n.liveLocked);k.current=n.liveLocked;const h=(0,e.useRef)('live'===n.mode);h.current='live'===n.mode;const E=(0,e.useRef)(null!==n.selectionAnchor);E.current=null!==n.selectionAnchor;const O=(0,e.useMemo)(()=>T(t,o,u,s,()=>b.current(),()=>k.current,()=>h.current,p,()=>E.current),[t]);return Object.assign({state:n},O)};var e=r(d[0]),t=r(d[1]),c=r(d[2]),n=r(d[3]),o=r(d[4]),u=r(d[5]),s=r(d[6]);const l={mode:'live',playhead:null,seekTarget:null,seekAnchor:null,seekLanded:!1,stragglerReports:0,lastSource:null,scrubDirection:null,liveLocked:!1,selectionAnchor:null},p=1500,b=3;function k(e,t){return'playback'!==e.mode?e:null===e.seekAnchor?Object.assign({},e,{playhead:t}):e.seekLanded?e:Math.abs(t-e.seekAnchor)<=p||e.stragglerReports+1>=b?Object.assign({},e,{playhead:t,seekLanded:!0,seekAnchor:null,stragglerReports:0}):Object.assign({},e,{stragglerReports:e.stragglerReports+1})}function h(e,t){return'gap'!==t&&'error'!==t||'playback'!==e.mode?e:Object.assign({},e,{mode:t})}function E(e,t,c){return Object.assign({},e,{seekTarget:t,lastSource:c,scrubDirection:null})}function S(e,t){switch(t.type){case'SCRUB_BEGIN':return e.liveLocked||null!==e.selectionAnchor?E(e,null,t.source):Object.assign({},e,{mode:'seeking',seekTarget:null,lastSource:t.source,scrubDirection:null});case'SCRUB_MOVE':return e.liveLocked||null!==e.selectionAnchor?E(e,t.epoch,t.source):Object.assign({},e,{mode:'seeking',seekTarget:t.epoch,lastSource:t.source,scrubDirection:(0,u.resolveScrubDirection)(e.seekTarget??e.playhead,t.epoch,e.scrubDirection)});case'SCRUB_COMMIT':case'SEEK':return null!==e.selectionAnchor||e.liveLocked&&'cluster'!==t.source?E(e,t.epoch,t.source):Object.assign({},e,{liveLocked:'cluster'!==t.source&&e.liveLocked,mode:'playback',playhead:t.epoch,seekTarget:null,seekAnchor:t.epoch,seekLanded:!1,stragglerReports:0,lastSource:t.source,scrubDirection:null});case'SWAP_CAMERA':return null===t.atMs?l:Object.assign({},l,{mode:'playback',playhead:t.atMs,seekAnchor:t.atMs,lastSource:'timeline'});case'GO_LIVE':return Object.assign({},e,{selectionAnchor:null,mode:'live',playhead:null,seekTarget:null,seekAnchor:null,seekLanded:!1,stragglerReports:0,scrubDirection:null});case'POSITION_REPORT':return k(e,t.epoch);case'EMBED_STATE':return h(e,t.embed);case'SET_LIVE_LOCK':return Object.assign({},e,{liveLocked:t.locked,seekTarget:null});case'SELECTION_BEGIN':return'live'===e.mode?e:Object.assign({},e,{selectionAnchor:t.epoch});case'SELECTION_END':return Object.assign({},e,{selectionAnchor:null});default:return e}}function O(e,t,c=s.PLAYER_SCRUB_EMIT_MS){return(0,s.shouldEmitScrubSample)(e,t,c)}const y=750,f=2e3;function _(e,t,c,n=y,o=f){if(null===e)return!0;const u=Math.abs(t-e.epoch)<=n,s=c-e.at<=o;return!(u&&s)}function L(e){return'seeking'===e.mode||e.liveLocked&&null!==e.seekTarget||null!==e.selectionAnchor&&null!==e.seekTarget?e.seekTarget:e.playhead}function T(e,o,u,s={current:null},l=()=>!1,p=()=>!1,b=()=>!1,k={current:null},h=()=>!1){const E=(e,t,c)=>{const o=Date.now();if(l())return s.current={epoch:e,at:o},void t(e);_(s.current,e,o)?(s.current={epoch:e,at:o},t(e)):n.log.debug('playback:machine','commit deduped',{epoch:e,kind:c,last:s.current})};return{beginScrub:n=>{if(o({type:'SCRUB_BEGIN',source:n}),p())return;const u=(0,c.generateDragId)();k.current=u,(0,t.scrubDragStarted)(),e.scrubStart(u)},moveScrub:(t,c,n)=>{if(o({type:'SCRUB_MOVE',epoch:t,source:c}),p())return;const s=Date.now();O(u.current,s)&&(u.current=s,n?e.scrubTo(t,n):e.scrubTo(t))},commitScrub:(t,c)=>{if(o({type:'SCRUB_COMMIT',epoch:t,source:c}),h())return void(k.current=null);if(p()&&'cluster'!==c)return;const u=k.current??void 0;k.current=null,n.log.info('playback:machine','commitScrub',{epoch:t,source:c,dragId:u}),E(t,t=>void 0!==u?e.scrubCommit(t,u):e.scrubCommit(t),'scrubCommit')},seek:(t,c)=>{if(o({type:'SEEK',epoch:t,source:c}),h())return e.scrubStart(),void e.scrubTo(t);p()&&'cluster'!==c||(n.log.debug('playback:machine','seek',{epoch:t,source:c}),E(t,e.seek,'seek'))},adoptSeek:(e,t)=>{o({type:'SEEK',epoch:e,source:t}),s.current={epoch:e,at:Date.now()},n.log.debug('playback:machine','adoptSeek',{epoch:e,source:t})},swapCamera:e=>{o({type:'SWAP_CAMERA',atMs:e}),s.current=null,k.current=null,n.log.info('playback:machine','swap camera',{atMs:e})},setLiveLock:e=>o({type:'SET_LIVE_LOCK',locked:e}),beginSelection:e=>o({type:'SELECTION_BEGIN',epoch:e}),endSelection:()=>o({type:'SELECTION_END'}),toggleLiveLock:()=>o({type:'SET_LIVE_LOCK',locked:!p()}),goLive:()=>{o({type:'GO_LIVE'}),s.current=null,k.current=null,p()&&b()||e.goLive()},reportPosition:e=>o({type:'POSITION_REPORT',epoch:e}),reportEmbedState:e=>o({type:'EMBED_STATE',embed:e})}}},991,[16,1055,1090,916,1062,2523,1092]);
131
131
  __d(function(g,_r,_i,_a,m,_e,d){"use strict";function t(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"HEATMAP_UNKNOWN_TEST_ID",{enumerable:!0,get:function(){return P}}),Object.defineProperty(_e,"HEATMAP_SELECTION_TEST_ID",{enumerable:!0,get:function(){return x}}),Object.defineProperty(_e,"HeatmapBar",{enumerable:!0,get:function(){return E}});var e=_r(d[0]),o=_r(d[1]),r=t(_r(d[2])),n=t(_r(d[3])),i=t(_r(d[4])),a=_r(d[5]),l=_r(d[6]),u=_r(d[7]),s=_r(d[8]),c=_r(d[9]),h=_r(d[10]),p=_r(d[11]),b=_r(d[12]),f=_r(d[13]);const y=(0,s.heatmapCursorGeometry)(),P='heatmap-coverage-unknown',x='heatmap-export-selection';function _(t,e,o){const r=o-e;if(r<=0)return[];const n=[];for(const i of t){const t=Math.max(i.startMs,e),a=Math.min(i.endMs,o);a<=t||n.push({leftPct:(t-e)/r*100,widthPct:(a-t)/r*100})}return n}function S(t){const e=t.length;if(0===e)return[];const o=[];let r=-1;for(let n=0;n<e;n++){const i=t[n].recorded;i&&r<0&&(r=n);if((!i||n===e-1)&&r>=0){const t=i?n:n-1;o.push({leftPct:r/e*100,widthPct:(t-r+1)/e*100}),r=-1}}return o}function v(t){return t<10?`0${t}`:String(t)}const E=(0,o.memo)(function(t){const i=(0,e.c)(83),{bins:l,cursorFraction:c,coverage:E,unknownCameras:M,dayStartMs:w,dayEndMs:C,selection:j,onSeekFraction:A,onScrubStart:W,onScrubFraction:B,onScrubEnd:I}=t,D=void 0===M?0:M,L=void 0===j?null:j,{colors:O}=(0,a.useTheme)(),$=(0,o.useRef)(0),N=(0,o.useRef)(0),X=(0,o.useRef)(!1),F=!(!A&&!B);let G;t:{if(E&&void 0!==w&&void 0!==C){let t;i[0]!==E||i[1]!==C||i[2]!==w?(t=_(E,w,C),i[0]=E,i[1]=C,i[2]=w,i[3]=t):t=i[3],G=t;break t}let t;i[4]!==l?(t=S(l),i[4]=l,i[5]=t):t=i[5],G=t}const U=G;let z;t:{if(!L||void 0===w||void 0===C){let t;i[6]===Symbol.for("react.memo_cache_sentinel")?(t=[],i[6]=t):t=i[6],z=t;break t}let t;i[7]!==C||i[8]!==w||i[9]!==L?(t=_([L],w,C),i[7]=C,i[8]=w,i[9]=L,i[10]=t):t=i[10],z=t}const K=z;let q;i[11]===Symbol.for("react.memo_cache_sentinel")?(q=t=>{$.current=t.nativeEvent.layout.width},i[11]=q):q=i[11];const V=q;let J;i[12]===Symbol.for("react.memo_cache_sentinel")?(J=t=>(0,u.pointerFraction)(t.nativeEvent.locationX,$.current),i[12]=J):J=i[12];const Q=J,Y=(0,o.useRef)(0),Z=(0,o.useRef)(null);let tt;i[13]!==F?(tt=t=>{N.current=t.nativeEvent.locationX,X.current=!1,Y.current=0,Z.current=Q(t),p.log.debug("heatmap","grant",{interactive:F,x:t.nativeEvent.locationX})},i[13]=F,i[14]=tt):tt=i[14];const et=tt;let ot;i[15]!==B||i[16]!==W?(ot=t=>{if(!X.current&&Math.abs(t.nativeEvent.locationX-N.current)>8&&(X.current=!0,(0,h.hapticTap)(),W?.()),!X.current)return;const e=Q(t);if(null===e)return;Z.current=e;const o=Date.now();(0,b.shouldEmitScrubSample)(Y.current,o,b.HEATMAP_SCRUB_EMIT_MS)&&(Y.current=o,B?.(e))},i[15]=B,i[16]=W,i[17]=ot):ot=i[17];const rt=ot;let nt;i[18]!==I||i[19]!==A?(nt=t=>{const e=Q(t);p.log.debug("heatmap","release",{moved:X.current,fraction:e}),null!==e&&(X.current?((0,h.hapticTap)(),I?.(e)):A?.(e))},i[18]=I,i[19]=A,i[20]=nt):nt=i[20];const it=nt,at=R;let lt;i[21]!==I?(lt=()=>{if(!X.current)return;const t=Z.current;null!==t&&I?.(t)},i[21]=I,i[22]=lt):lt=i[22];const ut=lt;let st,ct,dt,ht,pt,bt,ft,mt,gt,yt,Pt,xt,_t;if(i[23]!==F?(st=()=>F,ct=()=>F,i[23]=F,i[24]=st,i[25]=ct):(st=i[24],ct=i[25]),i[26]!==O.border||i[27]!==O.surface?(dt=[H.bar,{backgroundColor:O.surface,borderBottomColor:O.border}],i[26]=O.border,i[27]=O.surface,i[28]=dt):dt=i[28],i[29]===Symbol.for("react.memo_cache_sentinel")?(ht=[H.recordingRow,{height:y.bandInsetPx}],i[29]=ht):ht=i[29],i[30]!==O.foregroundSubtle||i[31]!==D?(pt=D>0?(0,f.jsx)(r.default,{testID:P,style:[H.unknownRail,{borderTopColor:O.foregroundSubtle}]}):null,i[30]=O.foregroundSubtle,i[31]=D,i[32]=pt):pt=i[32],i[33]!==U?(bt=U.map(k),i[33]=U,i[34]=bt):bt=i[34],i[35]!==pt||i[36]!==bt?(ft=(0,f.jsxs)(r.default,{pointerEvents:"none",style:ht,children:[pt,bt]}),i[35]=pt,i[36]=bt,i[37]=ft):ft=i[37],i[38]!==O.background?(mt=[H.tape,{top:y.bandInsetPx,height:s.HEATMAP_BAND_HEIGHT_PX,backgroundColor:O.background}],i[38]=O.background,i[39]=mt):mt=i[39],i[40]!==l?(gt=l.map(T),i[40]=l,i[41]=gt):gt=i[41],i[42]!==mt||i[43]!==gt?(yt=(0,f.jsx)(r.default,{pointerEvents:"none",style:mt,children:gt}),i[42]=mt,i[43]=gt,i[44]=yt):yt=i[44],i[45]!==O.primary||i[46]!==K){let t;i[48]!==O.primary?(t=(t,e)=>(0,f.jsx)(r.default,{testID:0===e?x:void 0,pointerEvents:"none",style:[H.selectionBand,{left:`${t.leftPct}%`,width:`${t.widthPct}%`,top:y.bandInsetPx,height:s.HEATMAP_BAND_HEIGHT_PX,backgroundColor:O.primary,borderColor:O.primary}]},`sel-${e}`),i[48]=O.primary,i[49]=t):t=i[49],Pt=K.map(t),i[45]=O.primary,i[46]=K,i[47]=Pt}else Pt=i[47];i[50]!==O.foregroundMuted?(xt=s.HEATMAP_HOUR_MARKS.map(t=>(0,f.jsx)(n.default,{style:[H.hourLabel,{left:t/24*100+"%",color:O.foregroundMuted}],children:v(t)},t)),i[50]=O.foregroundMuted,i[51]=xt):xt=i[51],i[52]!==xt?(_t=(0,f.jsx)(r.default,{pointerEvents:"none",style:H.hours,children:xt}),i[52]=xt,i[53]=_t):_t=i[53];const St=100*c+"%";let vt,Et,Ht,Rt,kt,Tt,Mt;return i[54]!==St?(vt=[H.cursor,{left:St}],i[54]=St,i[55]=vt):vt=i[55],i[56]!==O.background?(Et=(0,f.jsx)(r.default,{style:[H.cursorHalo,{backgroundColor:O.background}]}),i[56]=O.background,i[57]=Et):Et=i[57],i[58]!==O.primary?(Ht=(0,f.jsx)(r.default,{style:[H.cursorStem,{backgroundColor:O.primary}]}),i[58]=O.primary,i[59]=Ht):Ht=i[59],i[60]!==O.primary?(Rt=(0,f.jsx)(r.default,{style:[H.cursorCapTop,{backgroundColor:O.primary}]}),i[60]=O.primary,i[61]=Rt):Rt=i[61],i[62]!==O.primary?(kt=(0,f.jsx)(r.default,{style:[H.cursorCapBottom,{backgroundColor:O.primary}]}),i[62]=O.primary,i[63]=kt):kt=i[63],i[64]!==vt||i[65]!==Et||i[66]!==Ht||i[67]!==Rt||i[68]!==kt?(Tt=(0,f.jsxs)(r.default,{pointerEvents:"none",style:vt,children:[Et,Ht,Rt,kt]}),i[64]=vt,i[65]=Et,i[66]=Ht,i[67]=Rt,i[68]=kt,i[69]=Tt):Tt=i[69],i[70]!==et||i[71]!==rt||i[72]!==it||i[73]!==ut||i[74]!==st||i[75]!==ct||i[76]!==dt||i[77]!==ft||i[78]!==yt||i[79]!==Pt||i[80]!==_t||i[81]!==Tt?(Mt=(0,f.jsxs)(r.default,{onLayout:V,onStartShouldSetResponder:st,onMoveShouldSetResponder:ct,onResponderGrant:et,onResponderMove:rt,onResponderRelease:it,onResponderTerminationRequest:at,onResponderTerminate:ut,style:dt,children:[ft,yt,Pt,_t,Tt]}),i[70]=et,i[71]=rt,i[72]=it,i[73]=ut,i[74]=st,i[75]=ct,i[76]=dt,i[77]=ft,i[78]=yt,i[79]=Pt,i[80]=_t,i[81]=Tt,i[82]=Mt):Mt=i[82],Mt}),H=i.default.create({bar:{height:y.stripHeightPx,borderBottomWidth:1,paddingHorizontal:2},tape:{position:'absolute',left:2,right:2,flexDirection:'row',overflow:'visible',borderRadius:2},bin:{flex:1,height:'100%',justifyContent:'flex-end'},recordingRow:{position:'absolute',top:0,left:2,right:2},unknownRail:{position:'absolute',left:0,right:0,bottom:0,borderTopWidth:1,borderStyle:'dashed'},selectionBand:{position:'absolute',minWidth:2,opacity:.28,borderLeftWidth:1,borderRightWidth:1},recordingHairline:{position:'absolute',top:0,bottom:0,minWidth:2},bottomFill:{width:'100%',borderRadius:1,minHeight:3},audioPeak:{position:'absolute',top:0,left:1,right:1,boxShadow:'0 1px 3px rgba(0,0,0,0.35)'},hours:{position:'absolute',left:2,right:2,bottom:0,height:s.HEATMAP_HOUR_LABELS_HEIGHT_PX},hourLabel:{position:'absolute',top:1,fontSize:9,lineHeight:12,fontVariant:['tabular-nums']},cursor:{position:'absolute',top:0,height:y.markerHeightPx,width:y.capWidthPx,marginLeft:y.centeringOffsetPx},cursorHalo:{position:'absolute',top:0,bottom:0,left:(y.capWidthPx-y.haloWidthPx)/2,width:y.haloWidthPx,borderRadius:y.haloWidthPx/2,opacity:.85},cursorStem:{position:'absolute',top:0,bottom:0,left:(y.capWidthPx-y.stemWidthPx)/2,width:y.stemWidthPx},cursorCapTop:{position:'absolute',top:0,left:0,width:y.capWidthPx,height:y.capHeightPx,borderRadius:y.capHeightPx/2},cursorCapBottom:{position:'absolute',bottom:0,left:0,width:y.capWidthPx,height:y.capHeightPx,borderRadius:y.capHeightPx/2}});function R(){return!1}function k(t,e){return(0,f.jsx)(r.default,{style:[H.recordingHairline,{left:`${t.leftPct}%`,width:`${t.widthPct}%`,backgroundColor:l.BAND.recording}]},`rec-${e}`)}function T(t,e){const o=(0,c.heatmapBinLayers)(t);return(0,f.jsxs)(r.default,{style:H.bin,children:[o.bottom?(0,f.jsx)(r.default,{style:[H.bottomFill,{height:`${o.bottom.heightPct}%`,backgroundColor:o.bottom.color}]}):null,o.audio?(0,f.jsx)(r.default,{style:[H.audioPeak,{height:`${o.audio.heightPct}%`,backgroundColor:o.audio.color}]}):null]},e)}},992,[787,16,115,194,33,789,831,995,2524,998,817,916,1092,10]);
132
- __d(function(g,r,i,a,_m,_e,d){"use strict";function e(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"OVERFLOW_TEST_ID",{enumerable:!0,get:function(){return F}}),Object.defineProperty(_e,"RECORD_TEST_ID",{enumerable:!0,get:function(){return R}}),Object.defineProperty(_e,"RECORD_ACCEPT_TEST_ID",{enumerable:!0,get:function(){return L}}),Object.defineProperty(_e,"RECORD_DISCARD_TEST_ID",{enumerable:!0,get:function(){return T}}),_e.TimelinePlaybackBar=function(e){const c=(0,o.c)(292),{mode:O,rate:B,paused:A,servedTier:I,loading:H,faulted:_,scrubDirection:E,onTogglePause:M,onJogBack:W,onJogForward:V,onClipPrev:U,onClipNext:q,clipHeld:J,clipProgress:G,clipLoop:$,onStepFrame:N,onSelectRate:X,onGoLive:Y,liveLocked:K,onToggleLiveLock:Q,record:Z,clipControls:ee,canWrap:re}=e,oe=void 0===I?null:I,ie=void 0!==_&&_,ae=void 0===E?null:E,le=void 0===U?null:U,te=void 0===q?null:q,ne=void 0!==J&&J,se=void 0!==K&&K,de=void 0===ee?w.LEGACY_CONTROLS_VIEW:ee,ce=void 0!==re&&re,{t:pe}=(0,p.useTranslation)(),{colors:ue}=(0,f.useTheme)(),be=(0,b.useTimelineScale)(),[ge,ye]=(0,l.useState)("none"),fe=(0,l.useRef)(null),me=(0,l.useRef)(null);let he;c[0]===Symbol.for("react.memo_cache_sentinel")?(he=()=>ye("none"),c[0]=he):he=c[0];const xe=he;let ve,je,Se,ke,we,Ce,Fe,Re,Le,Te,ze,Pe,De,Oe,Be,Ae,Ie,He,Ee,Me,We,Ve,Ue,qe,Je,Ge,$e;if(c[1]!==ce||c[2]!==de||c[3]!==ne||c[4]!==$||c[5]!==ue.border||c[6]!==ue.surfaceHover||c[7]!==se||c[8]!==O||c[9]!==N||c[10]!==Q||c[11]!==ge||c[12]!==A||c[13]!==B||c[14]!==Z||c[15]!==ae||c[16]!==pe||c[17]!==be){Fe=(0,h.playbackBarLayout)(O,A,void 0===Q?null:se,void 0!==N,Z?.active??!1,ne),Se=(0,x.playbackBarFit)(be.width,{scale:be.scale,canWrap:ce,trailingIcon:void 0!==Z||void 0!==$,canStep:void 0!==N});const e=(0,x.playbackBarGapSet)(Se.gaps);ke=be.px(e.gap),He=be.px(e.pad),Me=Fe.showJog&&Se.allowJog,Ge="clip"===Fe.jogMeans,qe=Fe.showStep&&Se.allowStep;const o=Fe.showRate&&(0,w.clipRateMenuShown)(de);let l,t,n,s,p;Le=Ge&&void 0!==$,Ie=void 0!==Z&&"hidden"!==Fe.record&&Z.active,Ae=void 0!==Z&&"hidden"!==Fe.record&&!Z.active,Te="overflow"===Se.secondary&&o,Ve=o&&!Te,We=Le&&!Te,Ue=Ae&&!Te,ve="liveCapture"===Fe.record,Re="locked"===Fe.liveLock,De=1!==B,Be="rate"===ge,c[45]!==de?(l=(0,w.clipRateChoices)(de),c[45]=de,c[46]=l):l=c[46],Oe=l,c[47]!==de?(t=(0,w.clipControlDisabled)(de,(0,w.clipStepBackAllowed)(de.controls)),c[47]=de,c[48]=t):t=c[48],Je=t,Ee=null!==ae,c[49]!==A||c[50]!==ae||c[51]!==Ee||c[52]!==pe?(n=pe(Ee?"forward"===ae?"v2.streamBar.scrubForward":"v2.streamBar.scrubBackward":A?"v2.streamBar.play":"v2.streamBar.pause"),c[49]=A,c[50]=ae,c[51]=Ee,c[52]=pe,c[53]=n):n=c[53],Pe=n,c[54]!==be.control.button||c[55]!==be.radius.lg||c[56]!==be.space.md||c[57]!==be.space.xs?(s={height:be.control.button,borderRadius:be.radius.lg,paddingHorizontal:be.space.md,gap:be.space.xs},c[54]=be.control.button,c[55]=be.radius.lg,c[56]=be.space.md,c[57]=be.space.xs,c[58]=s):s=c[58],je=s,c[59]!==je||c[60]!==ue.border||c[61]!==ue.surfaceHover||c[62]!==be.control.button?(p=Object.assign({},je,{width:be.control.button,paddingHorizontal:0,backgroundColor:ue.surfaceHover,borderColor:ue.border}),c[59]=je,c[60]=ue.border,c[61]=ue.surfaceHover,c[62]=be.control.button,c[63]=p):p=c[63],we=p;const u=be.control.primary/2;let b;c[64]!==u||c[65]!==be.control.primary?(b={width:be.control.primary,height:be.control.primary,borderRadius:u},c[64]=u,c[65]=be.control.primary,c[66]=b):b=c[66],ze=b;const y=Se.reserveSlots&&!(Ie&&!ve),f=e=>({width:e||y?be.control.button:0,height:be.control.button});Ce=f(Me),$e=f(qe),c[1]=ce,c[2]=de,c[3]=ne,c[4]=$,c[5]=ue.border,c[6]=ue.surfaceHover,c[7]=se,c[8]=O,c[9]=N,c[10]=Q,c[11]=ge,c[12]=A,c[13]=B,c[14]=Z,c[15]=ae,c[16]=pe,c[17]=be,c[18]=ve,c[19]=je,c[20]=Se,c[21]=ke,c[22]=we,c[23]=Ce,c[24]=Fe,c[25]=Re,c[26]=Le,c[27]=Te,c[28]=ze,c[29]=Pe,c[30]=De,c[31]=Oe,c[32]=Be,c[33]=Ae,c[34]=Ie,c[35]=He,c[36]=Ee,c[37]=Me,c[38]=We,c[39]=Ve,c[40]=Ue,c[41]=qe,c[42]=Je,c[43]=Ge,c[44]=$e}else ve=c[18],je=c[19],Se=c[20],ke=c[21],we=c[22],Ce=c[23],Fe=c[24],Re=c[25],Le=c[26],Te=c[27],ze=c[28],Pe=c[29],De=c[30],Oe=c[31],Be=c[32],Ae=c[33],Ie=c[34],He=c[35],Ee=c[36],Me=c[37],We=c[38],Ve=c[39],Ue=c[40],qe=c[41],Je=c[42],Ge=c[43],$e=c[44];const Ne=$e;let Xe;c[67]!==de||c[68]!==ue.foreground||c[69]!==ue.primary||c[70]!==ue.primaryForeground||c[71]!==X||c[72]!==B||c[73]!==Oe||c[74]!==pe||c[75]!==be.font.sm||c[76]!==be.space.lg||c[77]!==be.space.sm?(Xe=e=>(0,k.playbackRateMenuOrder)(e,Oe).map(e=>{const o=e===B,l=(0,w.clipControlDisabled)(de,(0,w.clipRateAllowed)(de.controls,e));return(0,C.jsx)(s.default,Object.assign({disabled:l,onPress:()=>{(0,y.hapticTap)(),X(e),xe()},style:[D.menuItem,{paddingHorizontal:be.space.lg,paddingVertical:be.space.sm},o?{backgroundColor:ue.primary}:null,l?D.disabled:null],accessibilityRole:"menuitem",accessibilityState:{selected:o,disabled:l},accessibilityLabel:(0,k.formatRateLabel)(e)},l?{accessibilityHint:pe("v2.playback.rateUnavailable")}:{},{children:(0,C.jsx)(n.default,{style:[D.chipStrong,m.TABULAR,{fontSize:be.font.sm,color:o?ue.primaryForeground:ue.foreground}],children:(0,k.formatRateLabel)(e)})}),e)}),c[67]=de,c[68]=ue.foreground,c[69]=ue.primary,c[70]=ue.primaryForeground,c[71]=X,c[72]=B,c[73]=Oe,c[74]=pe,c[75]=be.font.sm,c[76]=be.space.lg,c[77]=be.space.sm,c[78]=Xe):Xe=c[78];const Ye=Xe;let Ke;c[79]!==ue.foreground||c[80]!==ue.primary||c[81]!==ue.primaryForeground||c[82]!==be.font.sm||c[83]!==be.space.lg||c[84]!==be.space.sm?(Ke=(e,o,l,t,c,p)=>{const u=void 0!==c&&c;return(0,C.jsxs)(s.default,Object.assign({},void 0===p?{}:{testID:p},{onPress:()=>{(0,y.hapticTap)(),xe(),t()},style:[D.menuItem,D.menuVerb,{paddingHorizontal:be.space.lg,paddingVertical:be.space.sm,gap:be.space.sm},u?{backgroundColor:ue.primary}:null],accessibilityRole:"menuitem",accessibilityState:{selected:u},accessibilityLabel:o,children:[l,(0,C.jsx)(n.default,{numberOfLines:1,style:{fontSize:be.font.sm,color:u?ue.primaryForeground:ue.foreground},children:o})]}),e)},c[79]=ue.foreground,c[80]=ue.primary,c[81]=ue.primaryForeground,c[82]=be.font.sm,c[83]=be.space.lg,c[84]=be.space.sm,c[85]=Ke):Ke=c[85];const Qe=Ke;let Ze;c[86]!==ve||c[87]!==$||c[88]!==ue.border||c[89]!==ue.danger||c[90]!==ue.foreground||c[91]!==ue.primaryForeground||c[92]!==Le||c[93]!==Ye||c[94]!==Z||c[95]!==Ae||c[96]!==pe||c[97]!==be||c[98]!==Qe?(Ze=e=>{const o=[];Ae&&void 0!==Z&&o.push(Qe("record",pe(ve?"v2.theater.recordLive":"v2.exportSelection.start"),(0,C.jsx)(t.default,{style:[D.recDot,{backgroundColor:ue.danger}]}),Z.onArm,!1,R)),Le&&void 0!==$&&o.push(Qe("loop",$.enabled?pe("v2.clips.loopOn"):pe("v2.clips.loopOff"),(0,C.jsx)(u.Repeat,{size:be.px(15),color:$.enabled?ue.primaryForeground:ue.foreground}),$.onToggle,$.enabled));const l=o.length>0?(0,C.jsx)(t.default,{style:[D.menuDivider,{backgroundColor:ue.border}]},"divider"):null;return"up"===e?(0,C.jsxs)(C.Fragment,{children:[Ye(e),l,o]}):(0,C.jsxs)(C.Fragment,{children:[o,l,Ye(e)]})},c[86]=ve,c[87]=$,c[88]=ue.border,c[89]=ue.danger,c[90]=ue.foreground,c[91]=ue.primaryForeground,c[92]=Le,c[93]=Ye,c[94]=Z,c[95]=Ae,c[96]=pe,c[97]=be,c[98]=Qe,c[99]=Ze):Ze=c[99];const er=Ze;let rr;c[100]!==je||c[101]!==ue.danger||c[102]!==ue.live||c[103]!==ue.primary||c[104]!==ue.primaryForeground||c[105]!==Fe.leading||c[106]!==Re||c[107]!==Y||c[108]!==Q||c[109]!==pe||c[110]!==be?(rr=(0,C.jsx)(C.Fragment,{children:"goLive"===Fe.leading?(0,C.jsxs)(s.default,{onPress:()=>{(0,y.hapticTap)(),Y()},style:[D.chip,je,{backgroundColor:ue.danger}],hitSlop:4,accessibilityRole:"button",accessibilityLabel:pe("v2.theater.goToLive"),children:[(0,C.jsx)(u.ArrowUp,{size:be.icon.sm,color:ue.primaryForeground}),(0,C.jsx)(n.default,{numberOfLines:1,style:[D.chipStrong,{color:ue.primaryForeground,fontSize:be.font.xs}],children:pe("v2.theater.live")})]}):void 0===Q?(0,C.jsx)(t.default,{style:[D.chip,je,{backgroundColor:ue.live}],accessibilityRole:"text",children:(0,C.jsx)(n.default,{numberOfLines:1,style:[D.chipStrong,{color:ue.primaryForeground,fontSize:be.font.xs}],children:pe("v2.theater.live")})}):(0,C.jsxs)(s.default,{onPress:()=>{(0,y.hapticTap)(),Q()},style:[D.chip,je,Re?{backgroundColor:ue.primary}:{backgroundColor:ue.live}],hitSlop:4,accessibilityRole:"button",accessibilityState:{selected:Re},accessibilityLabel:pe(Re?"v2.theater.liveLockOn":"v2.theater.liveLockOff"),children:[(0,C.jsx)(n.default,{numberOfLines:1,style:[D.chipStrong,{color:ue.primaryForeground,fontSize:be.font.xs}],children:pe("v2.theater.live")}),Re?(0,C.jsx)(u.Lock,{size:be.px(15),color:ue.primaryForeground}):(0,C.jsx)(u.LockOpen,{size:be.px(15),color:ue.primaryForeground})]})}),c[100]=je,c[101]=ue.danger,c[102]=ue.live,c[103]=ue.primary,c[104]=ue.primaryForeground,c[105]=Fe.leading,c[106]=Re,c[107]=Y,c[108]=Q,c[109]=pe,c[110]=be,c[111]=rr):rr=c[111];const or=rr;let ir,ar,lr,tr,nr,sr,dr,cr,pr,ur,br,gr,yr,fr,mr,hr,xr,vr,jr,Sr;c[112]!==ke?(ir=[D.centre,{gap:ke}],c[112]=ke,c[113]=ir):ir=c[113];c[114]!==ue.foreground||c[115]!==we||c[116]!==le||c[117]!==W||c[118]!==Me||c[119]!==Ge||c[120]!==pe||c[121]!==be?(ar=Me?(0,C.jsx)(s.default,{onPress:()=>{(0,y.hapticTap)(),Ge?le?.():W()},disabled:Ge&&null===le,style:[D.chip,we,D.bordered,Ge&&null===le?D.disabled:null],hitSlop:4,accessibilityRole:"button",accessibilityLabel:Ge?pe("v2.clips.previousClip"):"\u221210s",children:Ge?(0,C.jsx)(u.SkipBack,{size:be.px(15),color:ue.foreground}):(0,C.jsx)(u.RotateCcw,{size:be.px(15),color:ue.foreground})}):null,c[114]=ue.foreground,c[115]=we,c[116]=le,c[117]=W,c[118]=Me,c[119]=Ge,c[120]=pe,c[121]=be,c[122]=ar):ar=c[122];c[123]!==Ce||c[124]!==ar?(lr=(0,C.jsx)(t.default,{style:Ce,children:ar}),c[123]=Ce,c[124]=ar,c[125]=lr):lr=c[125];c[126]!==ue.foreground||c[127]!==we||c[128]!==N||c[129]!==qe||c[130]!==Je||c[131]!==pe||c[132]!==be?(tr=qe?(0,C.jsx)(s.default,Object.assign({onPress:()=>{(0,y.hapticTap)(),N?.(-1)},disabled:Je,style:[D.chip,we,D.bordered,Je?D.disabled:null],hitSlop:4,accessibilityRole:"button",accessibilityState:{disabled:Je},accessibilityLabel:pe("v2.playback.prevFrame")},Je?{accessibilityHint:pe("v2.playback.stepBackUnavailable")}:{},{children:(0,C.jsx)(u.StepBack,{size:be.px(15),color:ue.foreground})})):null,c[126]=ue.foreground,c[127]=we,c[128]=N,c[129]=qe,c[130]=Je,c[131]=pe,c[132]=be,c[133]=tr):tr=c[133];c[134]!==Ne||c[135]!==tr?(nr=(0,C.jsx)(t.default,{style:Ne,children:tr}),c[134]=Ne,c[135]=tr,c[136]=nr):nr=c[136];c[137]!==ze?(sr=[ze,D.primaryAnchor],c[137]=ze,c[138]=sr):sr=c[138];c[139]!==M?(dr=()=>{(0,y.hapticTap)(),M()},c[139]=M,c[140]=dr):dr=c[140];c[141]!==ue.primary?(cr={backgroundColor:ue.primary},c[141]=ue.primary,c[142]=cr):cr=c[142];c[143]!==ze||c[144]!==cr?(pr=[D.chip,ze,cr],c[143]=ze,c[144]=cr,c[145]=pr):pr=c[145];c[146]!==Ee?(ur={disabled:Ee},c[146]=Ee,c[147]=ur):ur=c[147];c[148]!==ue.primaryForeground||c[149]!==A||c[150]!==ae||c[151]!==be.icon.md?(br="forward"===ae?(0,C.jsx)(u.FastForward,{size:be.icon.md,color:ue.primaryForeground,fill:ue.primaryForeground}):"backward"===ae?(0,C.jsx)(u.Rewind,{size:be.icon.md,color:ue.primaryForeground,fill:ue.primaryForeground}):A?(0,C.jsx)(u.Play,{size:be.icon.md,color:ue.primaryForeground,fill:ue.primaryForeground}):(0,C.jsx)(u.Pause,{size:be.icon.md,color:ue.primaryForeground,fill:ue.primaryForeground}),c[148]=ue.primaryForeground,c[149]=A,c[150]=ae,c[151]=be.icon.md,c[152]=br):br=c[152];c[153]!==Pe||c[154]!==Ee||c[155]!==dr||c[156]!==pr||c[157]!==ur||c[158]!==br?(gr=(0,C.jsx)(s.default,{onPress:dr,disabled:Ee,style:pr,hitSlop:4,accessibilityRole:"button",accessibilityState:ur,accessibilityLabel:Pe,children:br}),c[153]=Pe,c[154]=Ee,c[155]=dr,c[156]=pr,c[157]=ur,c[158]=br,c[159]=gr):gr=c[159];c[160]!==ue.border||c[161]!==ue.foregroundMuted||c[162]!==ue.warning||c[163]!==O||c[164]!==oe||c[165]!==pe||c[166]!==be.font.xs?(yr="live"!==O&&null!==oe?(0,C.jsx)(t.default,{accessibilityRole:"text",accessibilityLabel:oe.profile===oe.requested?pe("v2.playback.servedTier",{tier:pe(`v2.playback.tier.${oe.profile}`)}):pe("v2.playback.servedTierDegraded",{served:pe(`v2.playback.tier.${oe.profile}`),requested:pe(`v2.playback.tier.${oe.requested}`,{defaultValue:oe.requested})}),style:[D.tierBadge,{borderColor:oe.profile===oe.requested?ue.border:ue.warning}],children:(0,C.jsx)(n.default,{style:[D.tierBadgeText,{color:oe.profile===oe.requested?ue.foregroundMuted:ue.warning,fontSize:be.font.xs}],children:oe.profile.charAt(0).toUpperCase()})}):null,c[160]=ue.border,c[161]=ue.foregroundMuted,c[162]=ue.warning,c[163]=O,c[164]=oe,c[165]=pe,c[166]=be.font.xs,c[167]=yr):yr=c[167];c[168]!==ue.danger||c[169]!==ue.primary||c[170]!==ie||c[171]!==H||c[172]!==be.control.primary?(fr=H||ie?(0,C.jsx)(j.TransportSpinnerRing,{size:be.control.primary,color:ie?ue.danger:ue.primary}):null,c[168]=ue.danger,c[169]=ue.primary,c[170]=ie,c[171]=H,c[172]=be.control.primary,c[173]=fr):fr=c[173];c[174]!==sr||c[175]!==gr||c[176]!==yr||c[177]!==fr?(mr=(0,C.jsxs)(t.default,{style:sr,children:[gr,yr,fr]}),c[174]=sr,c[175]=gr,c[176]=yr,c[177]=fr,c[178]=mr):mr=c[178];c[179]!==ue.foreground||c[180]!==we||c[181]!==N||c[182]!==qe||c[183]!==pe||c[184]!==be?(hr=qe?(0,C.jsx)(s.default,{onPress:()=>{(0,y.hapticTap)(),N?.(1)},style:[D.chip,we,D.bordered],hitSlop:4,accessibilityRole:"button",accessibilityLabel:pe("v2.playback.nextFrame"),children:(0,C.jsx)(u.StepForward,{size:be.px(15),color:ue.foreground})}):null,c[179]=ue.foreground,c[180]=we,c[181]=N,c[182]=qe,c[183]=pe,c[184]=be,c[185]=hr):hr=c[185];c[186]!==Ne||c[187]!==hr?(xr=(0,C.jsx)(t.default,{style:Ne,children:hr}),c[186]=Ne,c[187]=hr,c[188]=xr):xr=c[188];c[189]!==ue.foreground||c[190]!==we||c[191]!==te||c[192]!==V||c[193]!==Me||c[194]!==Ge||c[195]!==pe||c[196]!==be?(vr=Me?(0,C.jsx)(s.default,{onPress:()=>{(0,y.hapticTap)(),Ge?te?.():V()},disabled:Ge&&null===te,style:[D.chip,we,D.bordered,Ge&&null===te?D.disabled:null],hitSlop:4,accessibilityRole:"button",accessibilityLabel:Ge?pe("v2.clips.nextClip"):"+10s",children:Ge?(0,C.jsx)(u.SkipForward,{size:be.px(15),color:ue.foreground}):(0,C.jsx)(u.RotateCw,{size:be.px(15),color:ue.foreground})}):null,c[189]=ue.foreground,c[190]=we,c[191]=te,c[192]=V,c[193]=Me,c[194]=Ge,c[195]=pe,c[196]=be,c[197]=vr):vr=c[197];c[198]!==Ce||c[199]!==vr?(jr=(0,C.jsx)(t.default,{style:Ce,children:vr}),c[198]=Ce,c[199]=vr,c[200]=jr):jr=c[200];c[201]!==ir||c[202]!==lr||c[203]!==nr||c[204]!==mr||c[205]!==xr||c[206]!==jr?(Sr=(0,C.jsxs)(t.default,{style:ir,children:[lr,nr,mr,xr,jr]}),c[201]=ir,c[202]=lr,c[203]=nr,c[204]=mr,c[205]=xr,c[206]=jr,c[207]=Sr):Sr=c[207];const kr=Sr;let wr,Cr,Fr,Rr,Lr,Tr;c[208]!==ve||c[209]!==ue.danger||c[210]!==we||c[211]!==Z||c[212]!==Ue||c[213]!==pe?(wr=Ue&&Z?(0,C.jsx)(s.default,{testID:R,onPress:()=>{(0,y.hapticTap)(),Z.onArm()},style:[D.chip,we,D.bordered],hitSlop:4,accessibilityRole:"button",accessibilityLabel:pe(ve?"v2.theater.recordLive":"v2.exportSelection.start"),children:(0,C.jsx)(t.default,{style:[D.recDot,{backgroundColor:ue.danger}]})}):null,c[208]=ve,c[209]=ue.danger,c[210]=we,c[211]=Z,c[212]=Ue,c[213]=pe,c[214]=wr):wr=c[214];c[215]!==ve||c[216]!==je||c[217]!==ue.border||c[218]!==ue.foreground||c[219]!==ue.primary||c[220]!==ue.primaryForeground||c[221]!==ue.surfaceHover||c[222]!==ue.warning||c[223]!==we||c[224]!==Z||c[225]!==Ie||c[226]!==pe||c[227]!==be?(Cr=Ie&&Z?(0,C.jsxs)(C.Fragment,{children:[(0,C.jsx)(s.default,{testID:T,onPress:()=>{(0,y.hapticTap)(),Z.onDiscard()},style:[D.chip,we,D.bordered],hitSlop:4,accessibilityRole:"button",accessibilityLabel:pe(ve?"v2.theater.discardClip":"v2.exportSelection.discard"),children:(0,C.jsx)(u.X,{size:be.px(15),color:ue.foreground})}),(0,C.jsxs)(s.default,{testID:L,disabled:!Z.canAccept||Z.busy,onPress:()=>{(0,y.hapticTap)(),Z.onAccept()},style:[D.chip,je,D.bordered,Z.canAccept&&!Z.busy?Z.warn?{backgroundColor:ue.surfaceHover,borderColor:ue.warning}:{backgroundColor:ue.primary,borderColor:ue.primary}:{backgroundColor:ue.surfaceHover,borderColor:ue.border}],hitSlop:4,accessibilityRole:"button",accessibilityState:{disabled:!Z.canAccept||Z.busy},accessibilityLabel:ve?pe("v2.theater.keepClip"):Z.warn?pe("v2.exportSelection.savePartial"):pe("v2.exportSelection.save"),children:[(0,C.jsx)(u.Check,{size:be.px(14),color:!Z.canAccept||Z.busy||Z.warn?ue.foreground:ue.primaryForeground}),(0,C.jsx)(n.default,{style:[D.chipStrong,m.TABULAR,{fontSize:be.font.sm,color:!Z.canAccept||Z.busy||Z.warn?ue.foreground:ue.primaryForeground}],children:Z.durationLabel})]})]}):null,c[215]=ve,c[216]=je,c[217]=ue.border,c[218]=ue.foreground,c[219]=ue.primary,c[220]=ue.primaryForeground,c[221]=ue.surfaceHover,c[222]=ue.warning,c[223]=we,c[224]=Z,c[225]=Ie,c[226]=pe,c[227]=be,c[228]=Cr):Cr=c[228];c[229]!==$||c[230]!==ue.foreground||c[231]!==ue.primary||c[232]!==ue.primaryForeground||c[233]!==we||c[234]!==We||c[235]!==pe||c[236]!==be?(Fr=We&&void 0!==$?(0,C.jsx)(s.default,{onPress:()=>{(0,y.hapticTap)(),$.onToggle()},style:[D.chip,we,D.bordered,$.enabled?{backgroundColor:ue.primary,borderColor:ue.primary}:null],hitSlop:4,accessibilityRole:"button",accessibilityState:{selected:$.enabled},accessibilityLabel:$.enabled?pe("v2.clips.loopOn"):pe("v2.clips.loopOff"),children:(0,C.jsx)(u.Repeat,{size:be.px(15),color:$.enabled?ue.primaryForeground:ue.foreground})}):null,c[229]=$,c[230]=ue.foreground,c[231]=ue.primary,c[232]=ue.primaryForeground,c[233]=we,c[234]=We,c[235]=pe,c[236]=be,c[237]=Fr):Fr=c[237];c[238]!==je||c[239]!==ue.border||c[240]!==ue.foreground||c[241]!==ue.foregroundMuted||c[242]!==ue.primary||c[243]!==ue.primaryForeground||c[244]!==ue.surfaceHover||c[245]!==B||c[246]!==De||c[247]!==Be||c[248]!==Ye||c[249]!==Ve||c[250]!==pe||c[251]!==be?(Rr=Ve?(0,C.jsxs)(t.default,{style:D.speedAnchor,children:[(0,C.jsxs)(s.default,{ref:fe,onPress:()=>ye(P),style:[D.chip,je,D.bordered,De?{backgroundColor:ue.primary,borderColor:ue.primary}:{backgroundColor:ue.surfaceHover,borderColor:ue.border}],hitSlop:4,accessibilityRole:"button",accessibilityState:{expanded:Be},accessibilityLabel:pe("v2.playback.speed"),children:[(0,C.jsx)(n.default,{numberOfLines:1,style:[D.chipStrong,m.TABULAR,{fontSize:be.font.sm,color:De?ue.primaryForeground:ue.foreground}],children:(0,k.formatRateLabel)(B)}),(0,C.jsx)(u.ChevronDown,{size:be.px(13),color:De?ue.primaryForeground:ue.foregroundMuted})]}),(0,C.jsx)(v.PlaybackBarPopover,{open:Be,onClose:xe,anchorRef:fe,children:Ye})]}):null,c[238]=je,c[239]=ue.border,c[240]=ue.foreground,c[241]=ue.foregroundMuted,c[242]=ue.primary,c[243]=ue.primaryForeground,c[244]=ue.surfaceHover,c[245]=B,c[246]=De,c[247]=Be,c[248]=Ye,c[249]=Ve,c[250]=pe,c[251]=be,c[252]=Rr):Rr=c[252];c[253]!==ue.foreground||c[254]!==ue.primary||c[255]!==ue.primaryForeground||c[256]!==we||c[257]!==ge||c[258]!==Te||c[259]!==er||c[260]!==De||c[261]!==pe||c[262]!==be?(Lr=Te?(0,C.jsxs)(t.default,{style:D.speedAnchor,children:[(0,C.jsx)(s.default,{ref:me,testID:F,onPress:()=>ye(z),style:[D.chip,we,D.bordered,De?{backgroundColor:ue.primary,borderColor:ue.primary}:null],hitSlop:4,accessibilityRole:"button",accessibilityState:{expanded:"overflow"===ge},accessibilityLabel:pe("v2.playback.moreControls"),children:(0,C.jsx)(u.MoreHorizontal,{size:be.px(15),color:De?ue.primaryForeground:ue.foreground})}),(0,C.jsx)(v.PlaybackBarPopover,{open:"overflow"===ge,onClose:xe,anchorRef:me,children:er})]}):null,c[253]=ue.foreground,c[254]=ue.primary,c[255]=ue.primaryForeground,c[256]=we,c[257]=ge,c[258]=Te,c[259]=er,c[260]=De,c[261]=pe,c[262]=be,c[263]=Lr):Lr=c[263];c[264]!==wr||c[265]!==Cr||c[266]!==Fr||c[267]!==Rr||c[268]!==Lr?(Tr=(0,C.jsxs)(C.Fragment,{children:[wr,Cr,Fr,Rr,Lr]}),c[264]=wr,c[265]=Cr,c[266]=Fr,c[267]=Rr,c[268]=Lr,c[269]=Tr):Tr=c[269];const zr=Tr;let Pr,Dr,Or,Br,Ar;c[270]!==ue.background||c[271]!==ue.border?(Pr=[D.container,{backgroundColor:ue.background,borderBottomColor:ue.border}],c[270]=ue.background,c[271]=ue.border,c[272]=Pr):Pr=c[272];c[273]!==pe?(Dr=pe("v2.theater.playbackBar"),c[273]=pe,c[274]=Dr):Dr=c[274];c[275]!==kr||c[276]!==Se.wrap||c[277]!==ke||c[278]!==or||c[279]!==He||c[280]!==zr||c[281]!==be.space.sm||c[282]!==be.space.xs?(Or=Se.wrap?(0,C.jsxs)(C.Fragment,{children:[(0,C.jsx)(t.default,{style:[D.row,D.rowCentred,{paddingHorizontal:He,paddingTop:be.space.sm}],children:kr}),(0,C.jsxs)(t.default,{style:[D.row,D.rowSpread,{paddingHorizontal:He,paddingTop:ke,paddingBottom:be.space.sm,gap:ke}],children:[(0,C.jsx)(t.default,{style:[D.wrapSide,{gap:be.space.xs}],children:or}),(0,C.jsx)(t.default,{style:[D.wrapSide,{gap:ke}],children:zr})]})]}):(0,C.jsxs)(t.default,{style:[D.row,{paddingHorizontal:He,paddingVertical:be.space.sm,gap:ke}],children:[(0,C.jsx)(t.default,{style:[D.side,{gap:be.space.xs}],children:or}),kr,(0,C.jsx)(t.default,{style:[D.side,D.sideEnd,{gap:ke}],children:zr})]}),c[275]=kr,c[276]=Se.wrap,c[277]=ke,c[278]=or,c[279]=He,c[280]=zr,c[281]=be.space.sm,c[282]=be.space.xs,c[283]=Or):Or=c[283];c[284]!==G||c[285]!==Ge?(Br=Ge&&void 0!==G?(0,C.jsx)(S.ClipProgressBar,Object.assign({},G)):null,c[284]=G,c[285]=Ge,c[286]=Br):Br=c[286];c[287]!==Pr||c[288]!==Dr||c[289]!==Or||c[290]!==Br?(Ar=(0,C.jsxs)(t.default,{style:Pr,accessibilityRole:"toolbar",accessibilityLabel:Dr,children:[Or,Br]}),c[287]=Pr,c[288]=Dr,c[289]=Or,c[290]=Br,c[291]=Ar):Ar=c[291];return Ar};var o=r(d[0]),l=r(d[1]),t=e(r(d[2])),n=e(r(d[3])),s=e(r(d[4])),c=e(r(d[5])),p=r(d[6]),u=r(d[7]),b=r(d[8]),y=r(d[9]),f=r(d[10]),m=r(d[11]),h=r(d[12]),x=r(d[13]),v=r(d[14]),j=r(d[15]),S=r(d[16]),k=r(d[17]),w=r(d[18]),C=r(d[19]);const F='playback-bar-overflow',R='playback-bar-record',L='playback-bar-record-accept',T='playback-bar-record-discard';function z(e){return"overflow"===e?"none":"overflow"}function P(e){return"rate"===e?"none":"rate"}const D=c.default.create({disabled:{opacity:.35},tierBadge:{position:'absolute',right:-6,top:-4,minWidth:16,height:16,borderRadius:8,borderWidth:1,alignItems:'center',justifyContent:'center',paddingHorizontal:3},tierBadgeText:{fontWeight:'700',includeFontPadding:!1},container:{borderBottomWidth:1,zIndex:15,elevation:15},row:{flexDirection:'row',alignItems:'center'},side:{flex:1,flexDirection:'row',alignItems:'center'},sideEnd:{justifyContent:'flex-end'},rowCentred:{justifyContent:'center'},rowSpread:{justifyContent:'space-between'},wrapSide:{flexDirection:'row',alignItems:'center'},centre:{flexDirection:'row',alignItems:'center'},chip:{flexDirection:'row',alignItems:'center',justifyContent:'center',flexShrink:0},bordered:{borderWidth:1},chipStrong:{fontWeight:'700',letterSpacing:.3},primaryAnchor:{position:'relative'},speedAnchor:{position:'relative',alignItems:'flex-end',zIndex:20,elevation:20},menuItem:{alignItems:'center'},menuVerb:{flexDirection:'row',justifyContent:'flex-start'},menuDivider:{height:c.default.hairlineWidth,marginVertical:2},recDot:{width:12,height:12,borderRadius:6}})},993,[787,16,115,194,248,33,813,814,994,817,789,831,2525,2527,2528,2530,2531,2526,1091,10]);
132
+ __d(function(g,r,i,a,_m,_e,d){"use strict";function e(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"OVERFLOW_TEST_ID",{enumerable:!0,get:function(){return F}}),Object.defineProperty(_e,"RECORD_TEST_ID",{enumerable:!0,get:function(){return R}}),Object.defineProperty(_e,"RECORD_ACCEPT_TEST_ID",{enumerable:!0,get:function(){return L}}),Object.defineProperty(_e,"RECORD_DISCARD_TEST_ID",{enumerable:!0,get:function(){return T}}),_e.TimelinePlaybackBar=function(e){const c=(0,o.c)(304),{mode:O,rate:B,paused:_,servedTier:A,loading:I,faulted:H,scrubDirection:E,onTogglePause:W,onJogBack:M,onJogForward:V,onClipPrev:U,onClipNext:q,clipHeld:J,clipProgress:G,clipLoop:$,onStepFrame:N,onSelectRate:X,onGoLive:Y,liveLocked:K,onToggleLiveLock:Q,record:Z,clipControls:ee,canWrap:re}=e,oe=void 0===A?null:A,ie=void 0!==H&&H,te=void 0===E?null:E,ae=void 0===U?null:U,le=void 0===q?null:q,ne=void 0!==J&&J,se=void 0!==K&&K,ce=void 0===ee?w.LEGACY_CONTROLS_VIEW:ee,de=void 0!==re&&re,{t:pe}=(0,p.useTranslation)(),{colors:ue}=(0,f.useTheme)(),be=(0,b.useTimelineScale)(),[ge,ye]=(0,t.useState)("none"),fe=(0,t.useRef)(null),me=(0,t.useRef)(null);let he;c[0]===Symbol.for("react.memo_cache_sentinel")?(he=()=>ye("none"),c[0]=he):he=c[0];const xe=he;let ve;c[1]===Symbol.for("react.memo_cache_sentinel")?(ve={},c[1]=ve):ve=c[1];const[je,Se]=(0,t.useState)(ve);let ke;c[2]===Symbol.for("react.memo_cache_sentinel")?(ke=e=>o=>{const t=o.nativeEvent.layout.width;Se(o=>(0,x.acceptMeasuredWidth)(o[e],t)?Object.assign({},o,{[e]:t}):o)},c[2]=ke):ke=c[2];const we=ke;let Ce;c[3]===Symbol.for("react.memo_cache_sentinel")?(Ce=we("leading"),c[3]=Ce):Ce=c[3];const Fe=Ce;let Re;c[4]===Symbol.for("react.memo_cache_sentinel")?(Re=we("rate"),c[4]=Re):Re=c[4];const Le=Re;let Te,ze,Pe,De,Oe,Be,Ae,Ie,He,Ee,We,Me,Ve,Ue,qe,Je,Ge,$e,Ne,Xe,Ye,Ke,Qe,Ze,er,rr,or,ir;if(c[5]!==de||c[6]!==ce||c[7]!==ne||c[8]!==$||c[9]!==ue.border||c[10]!==ue.surfaceHover||c[11]!==se||c[12]!==je||c[13]!==O||c[14]!==N||c[15]!==Q||c[16]!==ge||c[17]!==_||c[18]!==B||c[19]!==Z||c[20]!==te||c[21]!==pe||c[22]!==be){Ie=(0,h.playbackBarLayout)(O,_,void 0===Q?null:se,void 0!==N,Z?.active??!1,ne);const e={scale:be.scale,canWrap:de,trailingIcon:void 0!==Z||void 0!==$,canStep:void 0!==N,measured:je};Pe=(0,x.playbackBarFit)(be.width,e);const o=(0,x.playbackBarGapSet)(Pe.gaps);De=be.px(o.gap),Ne=be.px(o.pad),Ye=Ie.showJog&&Pe.allowJog,or="clip"===Ie.jogMeans,er=Ie.showStep&&Pe.allowStep;const t=Ie.showRate&&(0,w.clipRateMenuShown)(ce);let l,n,s,p,u;Ee=or&&void 0!==$,$e=void 0!==Z&&"hidden"!==Ie.record&&Z.active,Ge=void 0!==Z&&"hidden"!==Ie.record&&!Z.active,We="overflow"===Pe.secondary&&t,Qe=t&&!We,Ke=Ee&&!We,Ze=Ge&&!We,Te="liveCapture"===Ie.record,He="locked"===Ie.liveLock,Ue=1!==B,Je="rate"===ge,c[51]!==ce?(l=(0,w.clipRateChoices)(ce),c[51]=ce,c[52]=l):l=c[52],qe=l,c[53]!==ce?(n=(0,w.clipControlDisabled)(ce,(0,w.clipStepBackAllowed)(ce.controls)),c[53]=ce,c[54]=n):n=c[54],rr=n,Xe=null!==te,c[55]!==_||c[56]!==te||c[57]!==Xe||c[58]!==pe?(s=pe(Xe?"forward"===te?"v2.streamBar.scrubForward":"v2.streamBar.scrubBackward":_?"v2.streamBar.play":"v2.streamBar.pause"),c[55]=_,c[56]=te,c[57]=Xe,c[58]=pe,c[59]=s):s=c[59],Ve=s,c[60]!==be.control.button||c[61]!==be.radius.lg||c[62]!==be.space.md||c[63]!==be.space.xs?(p={height:be.control.button,borderRadius:be.radius.lg,paddingHorizontal:be.space.md,gap:be.space.xs},c[60]=be.control.button,c[61]=be.radius.lg,c[62]=be.space.md,c[63]=be.space.xs,c[64]=p):p=c[64],ze=p,c[65]!==ze||c[66]!==ue.border||c[67]!==ue.surfaceHover||c[68]!==be.control.button?(u=Object.assign({},ze,{width:be.control.button,paddingHorizontal:0,backgroundColor:ue.surfaceHover,borderColor:ue.border}),c[65]=ze,c[66]=ue.border,c[67]=ue.surfaceHover,c[68]=be.control.button,c[69]=u):u=c[69],Be=u;const b=be.control.primary/2;let y;c[70]!==b||c[71]!==be.control.primary?(y={width:be.control.primary,height:be.control.primary,borderRadius:b},c[70]=b,c[71]=be.control.primary,c[72]=y):y=c[72],Me=y;const f=Pe.reserveSlots&&!($e&&!Te),m=e=>({width:e||f?be.control.button:0,height:be.control.button});Oe=f?(0,x.playbackBarSideWidths)(Pe,e):{leading:0,trailing:0},Ae=m(Ye),ir=m(er),c[5]=de,c[6]=ce,c[7]=ne,c[8]=$,c[9]=ue.border,c[10]=ue.surfaceHover,c[11]=se,c[12]=je,c[13]=O,c[14]=N,c[15]=Q,c[16]=ge,c[17]=_,c[18]=B,c[19]=Z,c[20]=te,c[21]=pe,c[22]=be,c[23]=Te,c[24]=ze,c[25]=Pe,c[26]=De,c[27]=Oe,c[28]=Be,c[29]=Ae,c[30]=Ie,c[31]=He,c[32]=Ee,c[33]=We,c[34]=Me,c[35]=Ve,c[36]=Ue,c[37]=qe,c[38]=Je,c[39]=Ge,c[40]=$e,c[41]=Ne,c[42]=Xe,c[43]=Ye,c[44]=Ke,c[45]=Qe,c[46]=Ze,c[47]=er,c[48]=rr,c[49]=or,c[50]=ir}else Te=c[23],ze=c[24],Pe=c[25],De=c[26],Oe=c[27],Be=c[28],Ae=c[29],Ie=c[30],He=c[31],Ee=c[32],We=c[33],Me=c[34],Ve=c[35],Ue=c[36],qe=c[37],Je=c[38],Ge=c[39],$e=c[40],Ne=c[41],Xe=c[42],Ye=c[43],Ke=c[44],Qe=c[45],Ze=c[46],er=c[47],rr=c[48],or=c[49],ir=c[50];const tr=ir;let ar;c[73]!==ce||c[74]!==ue.foreground||c[75]!==ue.primary||c[76]!==ue.primaryForeground||c[77]!==X||c[78]!==B||c[79]!==qe||c[80]!==pe||c[81]!==be.font.sm||c[82]!==be.space.lg||c[83]!==be.space.sm?(ar=e=>(0,k.playbackRateMenuOrder)(e,qe).map(e=>{const o=e===B,t=(0,w.clipControlDisabled)(ce,(0,w.clipRateAllowed)(ce.controls,e));return(0,C.jsx)(s.default,Object.assign({disabled:t,onPress:()=>{(0,y.hapticTap)(),X(e),xe()},style:[D.menuItem,{paddingHorizontal:be.space.lg,paddingVertical:be.space.sm},o?{backgroundColor:ue.primary}:null,t?D.disabled:null],accessibilityRole:"menuitem",accessibilityState:{selected:o,disabled:t},accessibilityLabel:(0,k.formatRateLabel)(e)},t?{accessibilityHint:pe("v2.playback.rateUnavailable")}:{},{children:(0,C.jsx)(n.default,{style:[D.chipStrong,m.TABULAR,{fontSize:be.font.sm,color:o?ue.primaryForeground:ue.foreground}],children:(0,k.formatRateLabel)(e)})}),e)}),c[73]=ce,c[74]=ue.foreground,c[75]=ue.primary,c[76]=ue.primaryForeground,c[77]=X,c[78]=B,c[79]=qe,c[80]=pe,c[81]=be.font.sm,c[82]=be.space.lg,c[83]=be.space.sm,c[84]=ar):ar=c[84];const lr=ar;let nr;c[85]!==ue.foreground||c[86]!==ue.primary||c[87]!==ue.primaryForeground||c[88]!==be.font.sm||c[89]!==be.space.lg||c[90]!==be.space.sm?(nr=(e,o,t,l,c,p)=>{const u=void 0!==c&&c;return(0,C.jsxs)(s.default,Object.assign({},void 0===p?{}:{testID:p},{onPress:()=>{(0,y.hapticTap)(),xe(),l()},style:[D.menuItem,D.menuVerb,{paddingHorizontal:be.space.lg,paddingVertical:be.space.sm,gap:be.space.sm},u?{backgroundColor:ue.primary}:null],accessibilityRole:"menuitem",accessibilityState:{selected:u},accessibilityLabel:o,children:[t,(0,C.jsx)(n.default,{numberOfLines:1,style:{fontSize:be.font.sm,color:u?ue.primaryForeground:ue.foreground},children:o})]}),e)},c[85]=ue.foreground,c[86]=ue.primary,c[87]=ue.primaryForeground,c[88]=be.font.sm,c[89]=be.space.lg,c[90]=be.space.sm,c[91]=nr):nr=c[91];const sr=nr;let cr;c[92]!==Te||c[93]!==$||c[94]!==ue.border||c[95]!==ue.danger||c[96]!==ue.foreground||c[97]!==ue.primaryForeground||c[98]!==Ee||c[99]!==lr||c[100]!==Z||c[101]!==Ge||c[102]!==pe||c[103]!==be||c[104]!==sr?(cr=e=>{const o=[];Ge&&void 0!==Z&&o.push(sr("record",pe(Te?"v2.theater.recordLive":"v2.exportSelection.start"),(0,C.jsx)(l.default,{style:[D.recDot,{backgroundColor:ue.danger}]}),Z.onArm,!1,R)),Ee&&void 0!==$&&o.push(sr("loop",$.enabled?pe("v2.clips.loopOn"):pe("v2.clips.loopOff"),(0,C.jsx)(u.Repeat,{size:be.px(15),color:$.enabled?ue.primaryForeground:ue.foreground}),$.onToggle,$.enabled));const t=o.length>0?(0,C.jsx)(l.default,{style:[D.menuDivider,{backgroundColor:ue.border}]},"divider"):null;return"up"===e?(0,C.jsxs)(C.Fragment,{children:[lr(e),t,o]}):(0,C.jsxs)(C.Fragment,{children:[o,t,lr(e)]})},c[92]=Te,c[93]=$,c[94]=ue.border,c[95]=ue.danger,c[96]=ue.foreground,c[97]=ue.primaryForeground,c[98]=Ee,c[99]=lr,c[100]=Z,c[101]=Ge,c[102]=pe,c[103]=be,c[104]=sr,c[105]=cr):cr=c[105];const dr=cr;let pr;c[106]!==ze||c[107]!==ue.danger||c[108]!==ue.live||c[109]!==ue.primary||c[110]!==ue.primaryForeground||c[111]!==Ie.leading||c[112]!==He||c[113]!==Y||c[114]!==Q||c[115]!==pe||c[116]!==be?(pr=(0,C.jsx)(C.Fragment,{children:"goLive"===Ie.leading?(0,C.jsxs)(s.default,{onPress:()=>{(0,y.hapticTap)(),Y()},style:[D.chip,ze,{backgroundColor:ue.danger}],hitSlop:4,accessibilityRole:"button",accessibilityLabel:pe("v2.theater.goToLive"),children:[(0,C.jsx)(u.ArrowUp,{size:be.icon.sm,color:ue.primaryForeground}),(0,C.jsx)(n.default,{numberOfLines:1,style:[D.chipStrong,{color:ue.primaryForeground,fontSize:be.font.xs}],children:pe("v2.theater.live")})]}):void 0===Q?(0,C.jsx)(l.default,{style:[D.chip,ze,{backgroundColor:ue.live}],accessibilityRole:"text",children:(0,C.jsx)(n.default,{numberOfLines:1,style:[D.chipStrong,{color:ue.primaryForeground,fontSize:be.font.xs}],children:pe("v2.theater.live")})}):(0,C.jsxs)(s.default,{onPress:()=>{(0,y.hapticTap)(),Q()},style:[D.chip,ze,He?{backgroundColor:ue.primary}:{backgroundColor:ue.live}],hitSlop:4,accessibilityRole:"button",accessibilityState:{selected:He},accessibilityLabel:pe(He?"v2.theater.liveLockOn":"v2.theater.liveLockOff"),children:[(0,C.jsx)(n.default,{numberOfLines:1,style:[D.chipStrong,{color:ue.primaryForeground,fontSize:be.font.xs}],children:pe("v2.theater.live")}),He?(0,C.jsx)(u.Lock,{size:be.px(15),color:ue.primaryForeground}):(0,C.jsx)(u.LockOpen,{size:be.px(15),color:ue.primaryForeground})]})}),c[106]=ze,c[107]=ue.danger,c[108]=ue.live,c[109]=ue.primary,c[110]=ue.primaryForeground,c[111]=Ie.leading,c[112]=He,c[113]=Y,c[114]=Q,c[115]=pe,c[116]=be,c[117]=pr):pr=c[117];const ur=pr;let br,gr,yr,fr,mr,hr,xr,vr,jr,Sr,kr,wr,Cr,Fr,Rr,Lr,Tr,zr,Pr,Dr;c[118]!==De?(br=[D.centre,{gap:De}],c[118]=De,c[119]=br):br=c[119];c[120]!==ue.foreground||c[121]!==Be||c[122]!==ae||c[123]!==M||c[124]!==Ye||c[125]!==or||c[126]!==pe||c[127]!==be?(gr=Ye?(0,C.jsx)(s.default,{onPress:()=>{(0,y.hapticTap)(),or?ae?.():M()},disabled:or&&null===ae,style:[D.chip,Be,D.bordered,or&&null===ae?D.disabled:null],hitSlop:4,accessibilityRole:"button",accessibilityLabel:or?pe("v2.clips.previousClip"):"\u221210s",children:or?(0,C.jsx)(u.SkipBack,{size:be.px(15),color:ue.foreground}):(0,C.jsx)(u.RotateCcw,{size:be.px(15),color:ue.foreground})}):null,c[120]=ue.foreground,c[121]=Be,c[122]=ae,c[123]=M,c[124]=Ye,c[125]=or,c[126]=pe,c[127]=be,c[128]=gr):gr=c[128];c[129]!==Ae||c[130]!==gr?(yr=(0,C.jsx)(l.default,{style:Ae,children:gr}),c[129]=Ae,c[130]=gr,c[131]=yr):yr=c[131];c[132]!==ue.foreground||c[133]!==Be||c[134]!==N||c[135]!==er||c[136]!==rr||c[137]!==pe||c[138]!==be?(fr=er?(0,C.jsx)(s.default,Object.assign({onPress:()=>{(0,y.hapticTap)(),N?.(-1)},disabled:rr,style:[D.chip,Be,D.bordered,rr?D.disabled:null],hitSlop:4,accessibilityRole:"button",accessibilityState:{disabled:rr},accessibilityLabel:pe("v2.playback.prevFrame")},rr?{accessibilityHint:pe("v2.playback.stepBackUnavailable")}:{},{children:(0,C.jsx)(u.StepBack,{size:be.px(15),color:ue.foreground})})):null,c[132]=ue.foreground,c[133]=Be,c[134]=N,c[135]=er,c[136]=rr,c[137]=pe,c[138]=be,c[139]=fr):fr=c[139];c[140]!==tr||c[141]!==fr?(mr=(0,C.jsx)(l.default,{style:tr,children:fr}),c[140]=tr,c[141]=fr,c[142]=mr):mr=c[142];c[143]!==Me?(hr=[Me,D.primaryAnchor],c[143]=Me,c[144]=hr):hr=c[144];c[145]!==W?(xr=()=>{(0,y.hapticTap)(),W()},c[145]=W,c[146]=xr):xr=c[146];c[147]!==ue.primary?(vr={backgroundColor:ue.primary},c[147]=ue.primary,c[148]=vr):vr=c[148];c[149]!==Me||c[150]!==vr?(jr=[D.chip,Me,vr],c[149]=Me,c[150]=vr,c[151]=jr):jr=c[151];c[152]!==Xe?(Sr={disabled:Xe},c[152]=Xe,c[153]=Sr):Sr=c[153];c[154]!==ue.primaryForeground||c[155]!==_||c[156]!==te||c[157]!==be.icon.md?(kr="forward"===te?(0,C.jsx)(u.FastForward,{size:be.icon.md,color:ue.primaryForeground,fill:ue.primaryForeground}):"backward"===te?(0,C.jsx)(u.Rewind,{size:be.icon.md,color:ue.primaryForeground,fill:ue.primaryForeground}):_?(0,C.jsx)(u.Play,{size:be.icon.md,color:ue.primaryForeground,fill:ue.primaryForeground}):(0,C.jsx)(u.Pause,{size:be.icon.md,color:ue.primaryForeground,fill:ue.primaryForeground}),c[154]=ue.primaryForeground,c[155]=_,c[156]=te,c[157]=be.icon.md,c[158]=kr):kr=c[158];c[159]!==Ve||c[160]!==Xe||c[161]!==xr||c[162]!==jr||c[163]!==Sr||c[164]!==kr?(wr=(0,C.jsx)(s.default,{onPress:xr,disabled:Xe,style:jr,hitSlop:4,accessibilityRole:"button",accessibilityState:Sr,accessibilityLabel:Ve,children:kr}),c[159]=Ve,c[160]=Xe,c[161]=xr,c[162]=jr,c[163]=Sr,c[164]=kr,c[165]=wr):wr=c[165];c[166]!==ue.border||c[167]!==ue.foregroundMuted||c[168]!==ue.warning||c[169]!==O||c[170]!==oe||c[171]!==pe||c[172]!==be.font.xs?(Cr="live"!==O&&null!==oe?(0,C.jsx)(l.default,{accessibilityRole:"text",accessibilityLabel:oe.profile===oe.requested?pe("v2.playback.servedTier",{tier:pe(`v2.playback.tier.${oe.profile}`)}):pe("v2.playback.servedTierDegraded",{served:pe(`v2.playback.tier.${oe.profile}`),requested:pe(`v2.playback.tier.${oe.requested}`,{defaultValue:oe.requested})}),style:[D.tierBadge,{borderColor:oe.profile===oe.requested?ue.border:ue.warning}],children:(0,C.jsx)(n.default,{style:[D.tierBadgeText,{color:oe.profile===oe.requested?ue.foregroundMuted:ue.warning,fontSize:be.font.xs}],children:oe.profile.charAt(0).toUpperCase()})}):null,c[166]=ue.border,c[167]=ue.foregroundMuted,c[168]=ue.warning,c[169]=O,c[170]=oe,c[171]=pe,c[172]=be.font.xs,c[173]=Cr):Cr=c[173];c[174]!==ue.danger||c[175]!==ue.primary||c[176]!==ie||c[177]!==I||c[178]!==be.control.primary?(Fr=I||ie?(0,C.jsx)(j.TransportSpinnerRing,{size:be.control.primary,color:ie?ue.danger:ue.primary}):null,c[174]=ue.danger,c[175]=ue.primary,c[176]=ie,c[177]=I,c[178]=be.control.primary,c[179]=Fr):Fr=c[179];c[180]!==hr||c[181]!==wr||c[182]!==Cr||c[183]!==Fr?(Rr=(0,C.jsxs)(l.default,{style:hr,children:[wr,Cr,Fr]}),c[180]=hr,c[181]=wr,c[182]=Cr,c[183]=Fr,c[184]=Rr):Rr=c[184];c[185]!==ue.foreground||c[186]!==Be||c[187]!==N||c[188]!==er||c[189]!==pe||c[190]!==be?(Lr=er?(0,C.jsx)(s.default,{onPress:()=>{(0,y.hapticTap)(),N?.(1)},style:[D.chip,Be,D.bordered],hitSlop:4,accessibilityRole:"button",accessibilityLabel:pe("v2.playback.nextFrame"),children:(0,C.jsx)(u.StepForward,{size:be.px(15),color:ue.foreground})}):null,c[185]=ue.foreground,c[186]=Be,c[187]=N,c[188]=er,c[189]=pe,c[190]=be,c[191]=Lr):Lr=c[191];c[192]!==tr||c[193]!==Lr?(Tr=(0,C.jsx)(l.default,{style:tr,children:Lr}),c[192]=tr,c[193]=Lr,c[194]=Tr):Tr=c[194];c[195]!==ue.foreground||c[196]!==Be||c[197]!==le||c[198]!==V||c[199]!==Ye||c[200]!==or||c[201]!==pe||c[202]!==be?(zr=Ye?(0,C.jsx)(s.default,{onPress:()=>{(0,y.hapticTap)(),or?le?.():V()},disabled:or&&null===le,style:[D.chip,Be,D.bordered,or&&null===le?D.disabled:null],hitSlop:4,accessibilityRole:"button",accessibilityLabel:or?pe("v2.clips.nextClip"):"+10s",children:or?(0,C.jsx)(u.SkipForward,{size:be.px(15),color:ue.foreground}):(0,C.jsx)(u.RotateCw,{size:be.px(15),color:ue.foreground})}):null,c[195]=ue.foreground,c[196]=Be,c[197]=le,c[198]=V,c[199]=Ye,c[200]=or,c[201]=pe,c[202]=be,c[203]=zr):zr=c[203];c[204]!==Ae||c[205]!==zr?(Pr=(0,C.jsx)(l.default,{style:Ae,children:zr}),c[204]=Ae,c[205]=zr,c[206]=Pr):Pr=c[206];c[207]!==br||c[208]!==yr||c[209]!==mr||c[210]!==Rr||c[211]!==Tr||c[212]!==Pr?(Dr=(0,C.jsxs)(l.default,{style:br,children:[yr,mr,Rr,Tr,Pr]}),c[207]=br,c[208]=yr,c[209]=mr,c[210]=Rr,c[211]=Tr,c[212]=Pr,c[213]=Dr):Dr=c[213];const Or=Dr;let Br,_r;c[214]!==be.space.xs?(Br=[D.group,{gap:be.space.xs}],c[214]=be.space.xs,c[215]=Br):Br=c[215];c[216]!==ur||c[217]!==Br?(_r=(0,C.jsx)(l.default,{style:Br,onLayout:Fe,children:ur}),c[216]=ur,c[217]=Br,c[218]=_r):_r=c[218];const Ar=_r;let Ir,Hr,Er,Wr,Mr,Vr;c[219]!==Te||c[220]!==ue.danger||c[221]!==Be||c[222]!==Z||c[223]!==Ze||c[224]!==pe?(Ir=Ze&&Z?(0,C.jsx)(s.default,{testID:R,onPress:()=>{(0,y.hapticTap)(),Z.onArm()},style:[D.chip,Be,D.bordered],hitSlop:4,accessibilityRole:"button",accessibilityLabel:pe(Te?"v2.theater.recordLive":"v2.exportSelection.start"),children:(0,C.jsx)(l.default,{style:[D.recDot,{backgroundColor:ue.danger}]})}):null,c[219]=Te,c[220]=ue.danger,c[221]=Be,c[222]=Z,c[223]=Ze,c[224]=pe,c[225]=Ir):Ir=c[225];c[226]!==Te||c[227]!==ze||c[228]!==ue.border||c[229]!==ue.foreground||c[230]!==ue.primary||c[231]!==ue.primaryForeground||c[232]!==ue.surfaceHover||c[233]!==ue.warning||c[234]!==Be||c[235]!==Z||c[236]!==$e||c[237]!==pe||c[238]!==be?(Hr=$e&&Z?(0,C.jsxs)(C.Fragment,{children:[(0,C.jsx)(s.default,{testID:T,onPress:()=>{(0,y.hapticTap)(),Z.onDiscard()},style:[D.chip,Be,D.bordered],hitSlop:4,accessibilityRole:"button",accessibilityLabel:pe(Te?"v2.theater.discardClip":"v2.exportSelection.discard"),children:(0,C.jsx)(u.X,{size:be.px(15),color:ue.foreground})}),(0,C.jsxs)(s.default,{testID:L,disabled:!Z.canAccept||Z.busy,onPress:()=>{(0,y.hapticTap)(),Z.onAccept()},style:[D.chip,ze,D.bordered,Z.canAccept&&!Z.busy?Z.warn?{backgroundColor:ue.surfaceHover,borderColor:ue.warning}:{backgroundColor:ue.primary,borderColor:ue.primary}:{backgroundColor:ue.surfaceHover,borderColor:ue.border}],hitSlop:4,accessibilityRole:"button",accessibilityState:{disabled:!Z.canAccept||Z.busy},accessibilityLabel:Te?pe("v2.theater.keepClip"):Z.warn?pe("v2.exportSelection.savePartial"):pe("v2.exportSelection.save"),children:[(0,C.jsx)(u.Check,{size:be.px(14),color:!Z.canAccept||Z.busy||Z.warn?ue.foreground:ue.primaryForeground}),(0,C.jsx)(n.default,{style:[D.chipStrong,m.TABULAR,{fontSize:be.font.sm,color:!Z.canAccept||Z.busy||Z.warn?ue.foreground:ue.primaryForeground}],children:Z.durationLabel})]})]}):null,c[226]=Te,c[227]=ze,c[228]=ue.border,c[229]=ue.foreground,c[230]=ue.primary,c[231]=ue.primaryForeground,c[232]=ue.surfaceHover,c[233]=ue.warning,c[234]=Be,c[235]=Z,c[236]=$e,c[237]=pe,c[238]=be,c[239]=Hr):Hr=c[239];c[240]!==$||c[241]!==ue.foreground||c[242]!==ue.primary||c[243]!==ue.primaryForeground||c[244]!==Be||c[245]!==Ke||c[246]!==pe||c[247]!==be?(Er=Ke&&void 0!==$?(0,C.jsx)(s.default,{onPress:()=>{(0,y.hapticTap)(),$.onToggle()},style:[D.chip,Be,D.bordered,$.enabled?{backgroundColor:ue.primary,borderColor:ue.primary}:null],hitSlop:4,accessibilityRole:"button",accessibilityState:{selected:$.enabled},accessibilityLabel:$.enabled?pe("v2.clips.loopOn"):pe("v2.clips.loopOff"),children:(0,C.jsx)(u.Repeat,{size:be.px(15),color:$.enabled?ue.primaryForeground:ue.foreground})}):null,c[240]=$,c[241]=ue.foreground,c[242]=ue.primary,c[243]=ue.primaryForeground,c[244]=Be,c[245]=Ke,c[246]=pe,c[247]=be,c[248]=Er):Er=c[248];c[249]!==ze||c[250]!==ue.border||c[251]!==ue.foreground||c[252]!==ue.foregroundMuted||c[253]!==ue.primary||c[254]!==ue.primaryForeground||c[255]!==ue.surfaceHover||c[256]!==B||c[257]!==Ue||c[258]!==Je||c[259]!==lr||c[260]!==Qe||c[261]!==pe||c[262]!==be?(Wr=Qe?(0,C.jsxs)(l.default,{style:D.speedAnchor,onLayout:Le,children:[(0,C.jsxs)(s.default,{ref:fe,onPress:()=>ye(P),style:[D.chip,ze,D.bordered,Ue?{backgroundColor:ue.primary,borderColor:ue.primary}:{backgroundColor:ue.surfaceHover,borderColor:ue.border}],hitSlop:4,accessibilityRole:"button",accessibilityState:{expanded:Je},accessibilityLabel:pe("v2.playback.speed"),children:[(0,C.jsx)(n.default,{numberOfLines:1,style:[D.chipStrong,m.TABULAR,{fontSize:be.font.sm,color:Ue?ue.primaryForeground:ue.foreground}],children:(0,k.formatRateLabel)(B)}),(0,C.jsx)(u.ChevronDown,{size:be.px(13),color:Ue?ue.primaryForeground:ue.foregroundMuted})]}),(0,C.jsx)(v.PlaybackBarPopover,{open:Je,onClose:xe,anchorRef:fe,children:lr})]}):null,c[249]=ze,c[250]=ue.border,c[251]=ue.foreground,c[252]=ue.foregroundMuted,c[253]=ue.primary,c[254]=ue.primaryForeground,c[255]=ue.surfaceHover,c[256]=B,c[257]=Ue,c[258]=Je,c[259]=lr,c[260]=Qe,c[261]=pe,c[262]=be,c[263]=Wr):Wr=c[263];c[264]!==ue.foreground||c[265]!==ue.primary||c[266]!==ue.primaryForeground||c[267]!==Be||c[268]!==ge||c[269]!==We||c[270]!==dr||c[271]!==Ue||c[272]!==pe||c[273]!==be?(Mr=We?(0,C.jsxs)(l.default,{style:D.speedAnchor,children:[(0,C.jsx)(s.default,{ref:me,testID:F,onPress:()=>ye(z),style:[D.chip,Be,D.bordered,Ue?{backgroundColor:ue.primary,borderColor:ue.primary}:null],hitSlop:4,accessibilityRole:"button",accessibilityState:{expanded:"overflow"===ge},accessibilityLabel:pe("v2.playback.moreControls"),children:(0,C.jsx)(u.MoreHorizontal,{size:be.px(15),color:Ue?ue.primaryForeground:ue.foreground})}),(0,C.jsx)(v.PlaybackBarPopover,{open:"overflow"===ge,onClose:xe,anchorRef:me,children:dr})]}):null,c[264]=ue.foreground,c[265]=ue.primary,c[266]=ue.primaryForeground,c[267]=Be,c[268]=ge,c[269]=We,c[270]=dr,c[271]=Ue,c[272]=pe,c[273]=be,c[274]=Mr):Mr=c[274];c[275]!==Ir||c[276]!==Hr||c[277]!==Er||c[278]!==Wr||c[279]!==Mr?(Vr=(0,C.jsxs)(C.Fragment,{children:[Ir,Hr,Er,Wr,Mr]}),c[275]=Ir,c[276]=Hr,c[277]=Er,c[278]=Wr,c[279]=Mr,c[280]=Vr):Vr=c[280];const Ur=Vr;let qr,Jr,Gr,$r,Nr;c[281]!==ue.background||c[282]!==ue.border?(qr=[D.container,{backgroundColor:ue.background,borderBottomColor:ue.border}],c[281]=ue.background,c[282]=ue.border,c[283]=qr):qr=c[283];c[284]!==pe?(Jr=pe("v2.theater.playbackBar"),c[284]=pe,c[285]=Jr):Jr=c[285];c[286]!==Or||c[287]!==Pe.centring||c[288]!==Pe.wrap||c[289]!==De||c[290]!==Oe||c[291]!==Ar||c[292]!==Ne||c[293]!==Ur||c[294]!==be.space.sm?(Gr=Pe.wrap?(0,C.jsxs)(C.Fragment,{children:[(0,C.jsx)(l.default,{style:[D.row,D.rowCentred,{paddingHorizontal:Ne,paddingTop:be.space.sm}],children:Or}),(0,C.jsxs)(l.default,{style:[D.row,D.rowSpread,{paddingHorizontal:Ne,paddingTop:De,paddingBottom:be.space.sm,gap:De}],children:[Ar,(0,C.jsx)(l.default,{style:[D.group,{gap:De}],children:Ur})]})]}):"between"===Pe.centring?(0,C.jsxs)(l.default,{style:[D.row,{paddingHorizontal:Ne,paddingVertical:be.space.sm,gap:De}],children:[(0,C.jsx)(l.default,{style:{minWidth:Oe.leading},children:Ar}),(0,C.jsx)(l.default,{style:D.centreSpace,children:Or}),(0,C.jsx)(l.default,{style:[D.group,D.sideEnd,{gap:De,minWidth:Oe.trailing}],children:Ur})]}):(0,C.jsxs)(l.default,{style:[D.row,{paddingHorizontal:Ne,paddingVertical:be.space.sm,gap:De}],children:[(0,C.jsx)(l.default,{style:D.side,children:Ar}),Or,(0,C.jsx)(l.default,{style:[D.side,D.sideEnd,{gap:De}],children:Ur})]}),c[286]=Or,c[287]=Pe.centring,c[288]=Pe.wrap,c[289]=De,c[290]=Oe,c[291]=Ar,c[292]=Ne,c[293]=Ur,c[294]=be.space.sm,c[295]=Gr):Gr=c[295];c[296]!==G||c[297]!==or?($r=or&&void 0!==G?(0,C.jsx)(S.ClipProgressBar,Object.assign({},G)):null,c[296]=G,c[297]=or,c[298]=$r):$r=c[298];c[299]!==qr||c[300]!==Jr||c[301]!==Gr||c[302]!==$r?(Nr=(0,C.jsxs)(l.default,{style:qr,accessibilityRole:"toolbar",accessibilityLabel:Jr,children:[Gr,$r]}),c[299]=qr,c[300]=Jr,c[301]=Gr,c[302]=$r,c[303]=Nr):Nr=c[303];return Nr};var o=r(d[0]),t=r(d[1]),l=e(r(d[2])),n=e(r(d[3])),s=e(r(d[4])),c=e(r(d[5])),p=r(d[6]),u=r(d[7]),b=r(d[8]),y=r(d[9]),f=r(d[10]),m=r(d[11]),h=r(d[12]),x=r(d[13]),v=r(d[14]),j=r(d[15]),S=r(d[16]),k=r(d[17]),w=r(d[18]),C=r(d[19]);const F='playback-bar-overflow',R='playback-bar-record',L='playback-bar-record-accept',T='playback-bar-record-discard';function z(e){return"overflow"===e?"none":"overflow"}function P(e){return"rate"===e?"none":"rate"}const D=c.default.create({disabled:{opacity:.35},tierBadge:{position:'absolute',right:-6,top:-4,minWidth:16,height:16,borderRadius:8,borderWidth:1,alignItems:'center',justifyContent:'center',paddingHorizontal:3},tierBadgeText:{fontWeight:'700',includeFontPadding:!1},container:{borderBottomWidth:1,zIndex:15,elevation:15},row:{flexDirection:'row',alignItems:'center'},side:{flex:1,flexDirection:'row',alignItems:'center'},sideEnd:{justifyContent:'flex-end'},rowCentred:{justifyContent:'center'},rowSpread:{justifyContent:'space-between'},group:{flexDirection:'row',alignItems:'center'},centreSpace:{flex:1,flexDirection:'row',alignItems:'center',justifyContent:'center'},centre:{flexDirection:'row',alignItems:'center'},chip:{flexDirection:'row',alignItems:'center',justifyContent:'center',flexShrink:0},bordered:{borderWidth:1},chipStrong:{fontWeight:'700',letterSpacing:.3},primaryAnchor:{position:'relative'},speedAnchor:{position:'relative',alignItems:'flex-end',zIndex:20,elevation:20},menuItem:{alignItems:'center'},menuVerb:{flexDirection:'row',justifyContent:'flex-start'},menuDivider:{height:c.default.hairlineWidth,marginVertical:2},recDot:{width:12,height:12,borderRadius:6}})},993,[787,16,115,194,248,33,813,814,994,817,789,831,2525,2527,2528,2530,2531,2526,1091,10]);
133
133
  __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.TimelineScaleProvider=function(n){const s=(0,t.c)(6),{availableWidth:u,density:v,children:_}=n;let f;s[0]!==u||s[1]!==v?(f=(0,c.timelineTokens)(u,v),s[0]=u,s[1]=v,s[2]=f):f=s[2];const S=f;let T;s[3]!==_||s[4]!==S?(T=(0,l.jsx)(o.Provider,{value:S,children:_}),s[3]=_,s[4]=S,s[5]=T):T=s[5];return T},e.useTimelineScale=function(){return(0,n.useContext)(o)};var t=r(d[0]),n=r(d[1]),c=r(d[2]),l=r(d[3]);const o=(0,n.createContext)(c.FULL_SIZE_TOKENS)},994,[787,16,954,10]);
134
134
  __d(function(g,r,i,a,m,e,_d){"use strict";function n(n){return Math.max(0,Math.min(1,n))}Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"DAY_SPAN_MS",{enumerable:!0,get:function(){return t}}),e.localDayWindow=function(n){const o=new Date(n);o.setHours(0,0,0,0);const u=o.getTime();return{fromMs:u,toMs:u+t}},e.dayFractionToEpoch=function(t,o,u){const c=u-o;return Math.round(o+n(t)*c)},e.epochToDayFraction=function(t,o,u){const c=u-o;return c<=0?0:n((t-o)/c)},e.pointerFraction=function(t,o){return!Number.isFinite(t)||!Number.isFinite(o)||o<=0?null:n(t/o)};const t=864e5},995,[]);
135
135
  __d(function(g,_r,i,a,m,e,_d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.useRecordingAvailability=function(t,c,d,l){const p=(0,n.c)(17),{controller:v,state:h}=(0,r.useConnection)(),R=(0,y.planScopeAsk)((0,y.scopeToIds)(t)),k=(0,u.useRecordingProviderPlan)(R.asked),M=(0,f.scopeQueryKey)(R.asked);let S,C;p[0]!==k?(S=(0,u.recordingPlanKey)(k),p[0]=k,p[1]=S):S=p[1];p[2]!==c||p[3]!==M||p[4]!==S||p[5]!==d?(C=["v2","recording","availability",M,S,c,d],p[2]=c,p[3]=M,p[4]=S,p[5]=d,p[6]=C):C=p[6];const b=l&&"connected"===h&&R.asked.length>0&&k.ready;let A,D;p[7]!==R||p[8]!==v||p[9]!==c||p[10]!==k||p[11]!==d?(A=async()=>{const n=v.getSystem();return n?I(n.trpcClient,R,k,c,d):(s.log.warn("rec:avail","no system (not connected)"),w)},p[7]=R,p[8]=v,p[9]=c,p[10]=k,p[11]=d,p[12]=A):A=p[12];p[13]!==C||p[14]!==b||p[15]!==A?(D={queryKey:C,enabled:b,staleTime:3e4,queryFn:A},p[13]=C,p[14]=b,p[15]=A,p[16]=D):D=p[16];return(0,o.useQuery)(D)},e.useDaysWithRecordings=function(t,s,c,d){const l=(0,n.c)(17),{controller:p,state:v}=(0,r.useConnection)();let w;l[0]===Symbol.for("react.memo_cache_sentinel")?(w=(new Date).getTimezoneOffset(),l[0]=w):w=l[0];const R=-w,I=(0,y.planScopeAsk)((0,y.scopeToIds)(t)),k=(0,u.useRecordingProviderPlan)(I.asked),S=(0,f.scopeQueryKey)(I.asked);let C,b;l[1]!==k?(C=(0,u.recordingPlanKey)(k),l[1]=k,l[2]=C):C=l[2];l[3]!==s||l[4]!==S||l[5]!==C?(b=["v2","recording","days",S,C,s],l[3]=s,l[4]=S,l[5]=C,l[6]=b):b=l[6];const A=d&&"connected"===v&&I.asked.length>0&&k.ready;let D,K;l[7]!==I||l[8]!==p||l[9]!==s||l[10]!==c||l[11]!==k?(D=async()=>{const n=p.getSystem();return n?M(n.trpcClient,I,k,s,c,R):h},l[7]=I,l[8]=p,l[9]=s,l[10]=c,l[11]=k,l[12]=D):D=l[12];l[13]!==b||l[14]!==A||l[15]!==D?(K={queryKey:b,enabled:A,staleTime:6e4,queryFn:D},l[13]=b,l[14]=A,l[15]=D,l[16]=K):K=l[16];return(0,o.useQuery)(K)},e.useRecordingProfiles=function(t,s,d,f){const y=(0,n.c)(19),{controller:p,state:w}=(0,r.useConnection)();let h;y[0]!==t?(h=v(t),y[0]=t,y[1]=h):h=y[1];const I=(0,u.useRecordingProviderPlan)(h),k=I.pinned[0]?.provider??(1===I.ours.length?l.RECORDING_SOURCE_CAMSTACK_ADDON:null);let M,S;y[2]!==I?(M=(0,u.recordingPlanKey)(I),y[2]=I,y[3]=M):M=y[3];y[4]!==t||y[5]!==s||y[6]!==M||y[7]!==d?(S=["v2","recording","profiles",t,M,s,d],y[4]=t,y[5]=s,y[6]=M,y[7]=d,y[8]=S):S=y[8];const C=f&&"connected"===w&&null!==k;let b,A;y[9]!==p||y[10]!==t||y[11]!==s||y[12]!==k||y[13]!==d?(b=async()=>{const n=p.getSystem();if(!n||null===k)return[];const o=R(await(0,c.capQuery)(n.trpcClient,"recording","getAvailability",{deviceId:t,provider:k,fromMs:s,toMs:d})),r=new Set;for(const n of o)n.profile&&"unknown"!==n.profile&&r.add(n.profile);return[...r]},y[9]=p,y[10]=t,y[11]=s,y[12]=k,y[13]=d,y[14]=b):b=y[14];y[15]!==S||y[16]!==C||y[17]!==b?(A={queryKey:S,enabled:C,staleTime:3e4,queryFn:b},y[15]=S,y[16]=C,y[17]=b,y[18]=A):A=y[18];return(0,o.useQuery)(A)},e.useRecordingMode=function(t,s){const d=(0,n.c)(9),{controller:l,state:u}=(0,r.useConnection)();let f;d[0]!==t?(f=["v2","recording","mode",t],d[0]=t,d[1]=f):f=d[1];const y=s&&"connected"===u;let p,v;d[2]!==l||d[3]!==t?(p=async()=>{const n=l.getSystem();if(!n)return null;const o=await(0,c.capQuery)(n.trpcClient,"recordingArchive","getDeviceConfig",{deviceId:t},{rethrow:!0});if(null===o)return null;const r=(0,c.isRecord)(o)?o.mode:void 0;return"continuous"===r||"events"===r?r:"off"},d[2]=l,d[3]=t,d[4]=p):p=d[4];d[5]!==f||d[6]!==y||d[7]!==p?(v={queryKey:f,enabled:y,staleTime:3e5,queryFn:p},d[5]=f,d[6]=y,d[7]=p,d[8]=v):v=d[8];return(0,o.useQuery)(v)};var n=_r(_d[0]),o=_r(_d[1]),r=_r(_d[2]),t=_r(_d[3]),s=_r(_d[4]),c=_r(_d[5]),d=_r(_d[6]),l=_r(_d[7]),u=_r(_d[8]),f=_r(_d[9]),y=_r(_d[10]);const p=new Map;function v(n){const o=p.get(n);if(void 0!==o)return o;const r=Object.freeze([n]);return p.set(n,r),r}const w={ranges:[],unknownIds:[],overflowIds:[],verdict:'complete'},h={days:new Set,unknownIds:[],overflowIds:[],verdict:'complete'};function R(n){if(!(0,c.isRecord)(n)||!Array.isArray(n.ranges))return[];const o=[];for(const r of n.ranges)(0,c.isRecord)(r)&&'number'==typeof r.startMs&&'number'==typeof r.endMs&&o.push({profile:'string'==typeof r.profile?r.profile:'unknown',startMs:r.startMs,endMs:r.endMs});return o}async function I(n,o,r,c,l){const f=await(0,u.fetchAvailabilityRows)(n,r,c,l),p=[];for(const n of f)(0,d.isReadRow)(n)&&p.push(...R(n));const v=(0,y.resolveScopeKnowledge)({ask:o,rows:(0,d.parseScopeRowHeads)(f)}),w=(0,t.availabilityToCoverage)(p);return s.log.info('rec:avail','scope availability',{asked:o.asked.length,ours:r.ours.length,pinned:r.pinned.length,unresolved:r.unresolved.length,read:v.readIds.length,unknown:v.unknownIds.length,coverage:w.length}),{ranges:w,unknownIds:v.unknownIds,overflowIds:v.overflowIds,verdict:v.verdict}}function k(n){return(0,c.isRecord)(n)&&Array.isArray(n.days)?n.days.filter(n=>'number'==typeof n):[]}async function M(n,o,r,t,s,p){const v=[];r.ours.length>1?v.push((0,c.capQuery)(n,'recordingArchive','getDaysWithRecordingsBatch',{deviceIds:r.ours,fromMs:t,toMs:s,tzOffsetMinutes:p},{rethrow:!0})):1===r.ours.length&&v.push((0,c.capQuery)(n,'recording','getDaysWithRecordings',{deviceId:r.ours[0],provider:l.RECORDING_SOURCE_CAMSTACK_ADDON,fromMs:t,toMs:s,tzOffsetMinutes:p},{rethrow:!0}));for(const o of r.pinned)v.push((0,c.capQuery)(n,'recording','getDaysWithRecordings',{deviceId:o.deviceId,provider:o.provider,fromMs:t,toMs:s,tzOffsetMinutes:p},{rethrow:!0}));const w=await Promise.all(v),h=[];for(const n of w)h.push(...(0,u.answerRows)(n));for(const n of r.unresolved)h.push({deviceId:n,read:'unreadable'});const R=[];for(const n of h)(0,d.isReadRow)(n)&&R.push(new Set(k(n)));const I=(0,y.resolveScopeKnowledge)({ask:o,rows:(0,d.parseScopeRowHeads)(h)});return{days:(0,f.unionDaySets)(R),unknownIds:I.unknownIds,overflowIds:I.overflowIds,verdict:I.verdict}}},996,[787,848,815,2392,916,870,2394,2395,2396,2397,2398]);
@@ -154,7 +154,7 @@ __d(function(g,r,_i,a,_m,e,d){"use strict";Object.defineProperty(e,'__esModule',
154
154
  __d(function(g,_r,i,_a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"MIN_EXPORT_SELECTION_MS",{enumerable:!0,get:function(){return n}}),Object.defineProperty(e,"EXPORT_SELECTION_PROFILE",{enumerable:!0,get:function(){return t}}),Object.defineProperty(e,"EXPORT_SELECTION_LIFE_MS",{enumerable:!0,get:function(){return r}}),e.resolveExportSelection=o,e.isSavableSelection=u,e.missingMsInSelection=function(n,t){return t.durationMs-a(n,t)},e.selectionCoverage=c,e.formatSelectionDuration=s,e.describeExportSelection=function(n,t,r,a,l,f){const M=o(n,t,f),h=null===M?'unknown':c(r,a,l,M);return{armed:null!==n,range:M,coverage:h,durationLabel:s(M?.durationMs??0),canSave:u(M)&&'absent'!==h,warn:'partial'===h}};const n=1e3,t='high',r=6048e5;function o(n,t,r){if(null===n||null===t)return null;const o=Math.min(n,r),u=Math.min(t,r),a=Math.min(o,u),c=Math.max(o,u);return{fromMs:a,toMs:c,durationMs:c-a}}function u(t){return null!==t&&t.durationMs>=n}function a(n,t){let r=0;for(const o of n){const n=Math.max(o.startMs,t.fromMs),u=Math.min(o.endMs,t.toMs);u>n&&(r+=u-n)}return r}function c(n,t,r,o){if(0===n.length)return'unknown';if(o.fromMs<t||o.toMs>r)return'unknown';const u=a(n,o);return u<=0?'absent':u>=o.durationMs?'covered':'partial'}function l(n){return n<10?`0${n}`:String(n)}function s(n){const t=Math.max(0,Math.floor(n/1e3)),r=t%60,o=Math.floor(t/60)%60,u=Math.floor(t/3600);return u>0?`${u}:${l(o)}:${l(r)}`:`${o}:${l(r)}`}},1066,[]);
155
155
  __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.drawerWidth=u,Object.defineProperty(e,"DRAWER_OVERLAY_Z",{enumerable:!0,get:function(){return c}}),e.drawerPanelBox=function(t){const n=u(t);return{panelWidth:n,contentWidth:n}};const t=340,n=240,o=.34;function u(u){if(!Number.isFinite(u)||u<=0)return n;const c=Math.round(u*o),s=Math.min(t,Math.max(n,c));return Math.min(s,u)}const c=60},1067,[]);
156
156
  __d(function(g,r,i,a,m,e,d){"use strict";function t(t){return null!==t.operatorChoice?t.operatorChoice:!t.cameraKnown||t.batteryPowered}function o(t){return null===t.operatorChoice&&t.cameraKnown&&t.batteryPowered}function n(t,o){return!!t.pausedIds.has(o)||!t.startedIds.has(o)&&null}Object.defineProperty(e,'__esModule',{value:!0}),e.resolveLivePaused=t,e.isBatteryHold=o,e.shouldMountLiveView=function(t){return null!==t.initialClipId||(!t.liveHeld||'gap'!==t.mode&&'error'!==t.mode&&('live'===t.mode?null!=t.recordedSeekMs:'seeking'===t.mode?t.keepRecordedSession:null!=t.playhead||null!=t.recordedSeekMs))},e.shouldDialLiveOnGoLive=function(t){return!t},e.tileOperatorChoice=n,e.heldTileIds=function(o,s){return o.filter(o=>t({operatorChoice:n(s,o.id),cameraKnown:!0,batteryPowered:o.batteryPowered})).map(t=>t.id)},e.toggleTileTransport=function(t,s,u){const l=new Set(t.pausedIds),c=new Set(t.startedIds);if(l.has(s))return l.delete(s),u&&c.add(s),{pausedIds:l,startedIds:c};if(o({operatorChoice:n(t,s),cameraKnown:!0,batteryPowered:u}))return c.add(s),{pausedIds:l,startedIds:c};return l.add(s),{pausedIds:l,startedIds:c}}},1068,[]);
157
- __d(function(g,_r,i,a,m,_e,d){"use strict";function t(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(_e,'__esModule',{value:!0}),_e.StreamStatsOverlay=function(t){const n=(0,e.c)(62),{getStats:h,compact:x}=t,y=void 0!==x&&x,{t:j}=(0,r.useTranslation)(),[S,k]=(0,l.useState)(null);let z,w,W,$,_,T,V,K;n[0]!==h?(z=()=>{let t=!0;const e=async()=>{const e=await h().catch(b);t&&k(e)};e();const l=setInterval(()=>{e()},f);return()=>{t=!1,clearInterval(l)}},w=[h],n[0]=h,n[1]=z,n[2]=w):(z=n[1],w=n[2]);if((0,l.useEffect)(z,w),y){let t;n[3]!==S?(t=u(S),n[3]=S,n[4]=t):t=n[4];const e=t;let l,r;return n[5]!==e||n[6]!==j?(l=e??j("v2.stats.waiting"),n[5]=e,n[6]=j,n[7]=l):l=n[7],n[8]!==l?(r=(0,c.jsx)(s.default,{style:v.compact,pointerEvents:"none",children:(0,c.jsx)(o.default,{style:v.compactText,numberOfLines:1,children:l})}),n[8]=l,n[9]=r):r=n[9],r}if(n[10]!==S||n[11]!==j){if(W=[],S){if(S.resolution){let t,e;n[13]!==j?(t=j("v2.stats.resolution"),n[13]=j,n[14]=t):t=n[14],n[15]!==S.resolution||n[16]!==t?(e={label:t,value:S.resolution},n[15]=S.resolution,n[16]=t,n[17]=e):e=n[17],W.push(e)}if(void 0!==S.fps){let t;n[18]!==j?(t=j("v2.stats.fps"),n[18]=j,n[19]=t):t=n[19];const e=String(S.fps);let l;n[20]!==t||n[21]!==e?(l={label:t,value:e},n[20]=t,n[21]=e,n[22]=l):l=n[22],W.push(l)}if(void 0!==S.bitrateKbps){let t;n[23]!==j?(t=j("v2.stats.bitrate"),n[23]=j,n[24]=t):t=n[24];const e=`${S.bitrateKbps} kbps`;let l;n[25]!==t||n[26]!==e?(l={label:t,value:e},n[25]=t,n[26]=e,n[27]=l):l=n[27],W.push(l)}if(void 0!==S.packetsLost){let t;n[28]!==j?(t=j("v2.stats.packetLoss"),n[28]=j,n[29]=t):t=n[29];const e=String(S.packetsLost);let l;n[30]!==t||n[31]!==e?(l={label:t,value:e},n[30]=t,n[31]=e,n[32]=l):l=n[32],W.push(l)}if(void 0!==S.jitterMs){let t;n[33]!==j?(t=j("v2.stats.jitter"),n[33]=j,n[34]=t):t=n[34];const e=`${S.jitterMs} ms`;let l;n[35]!==t||n[36]!==e?(l={label:t,value:e},n[35]=t,n[36]=e,n[37]=l):l=n[37],W.push(l)}if(S.codec){let t,e;n[38]!==j?(t=j("v2.stats.codec"),n[38]=j,n[39]=t):t=n[39],n[40]!==S.codec||n[41]!==t?(e={label:t,value:S.codec},n[40]=S.codec,n[41]=t,n[42]=e):e=n[42],W.push(e)}if("playback"===S.source&&(void 0!==S.dropped||void 0!==S.total)){let t;n[43]!==j?(t=j("v2.stats.frames"),n[43]=j,n[44]=t):t=n[44];const e=`${S.dropped??0}/${S.total??0}`;let l;n[45]!==t||n[46]!==e?(l={label:t,value:e},n[45]=t,n[46]=e,n[47]=l):l=n[47],W.push(l)}}n[10]=S,n[11]=j,n[12]=W}else W=n[12];n[48]!==j?($=j("v2.stats.title"),n[48]=j,n[49]=$):$=n[49];n[50]!==$?(_=(0,c.jsx)(o.default,{style:v.title,children:$}),n[50]=$,n[51]=_):_=n[51];n[52]!==W||n[53]!==j?(T=0===W.length?(0,c.jsx)(o.default,{style:v.dim,children:j("v2.stats.waiting")}):W.map(p),n[52]=W,n[53]=j,n[54]=T):T=n[54];n[55]!==S?.source||n[56]!==j?(V="playback"===S?.source?(0,c.jsx)(o.default,{style:v.hint,children:j("v2.stats.playbackHint")}):null,n[55]=S?.source,n[56]=j,n[57]=V):V=n[57];n[58]!==_||n[59]!==T||n[60]!==V?(K=(0,c.jsxs)(s.default,{style:v.panel,pointerEvents:"none",children:[_,T,V]}),n[58]=_,n[59]=T,n[60]=V,n[61]=K):K=n[61];return K};var e=_r(d[0]),l=_r(d[1]),s=t(_r(d[2])),o=t(_r(d[3])),n=t(_r(d[4])),r=_r(d[5]),c=_r(d[6]);function u(t){if(!t)return null;const e=[];return t.resolution&&e.push(t.resolution),void 0!==t.fps&&e.push(`${t.fps}fps`),void 0!==t.bitrateKbps&&e.push(`${t.bitrateKbps}k`),e.length>0?e.join(' \xb7 '):null}const f=1e3;function p(t){return(0,c.jsxs)(s.default,{style:v.row,children:[(0,c.jsx)(o.default,{style:v.label,children:t.label}),(0,c.jsx)(o.default,{style:v.value,children:t.value})]},t.label)}function b(){return null}const v=n.default.create({panel:{position:'absolute',top:36,left:8,minWidth:150,maxWidth:220,paddingHorizontal:10,paddingVertical:8,borderRadius:8,backgroundColor:'#000000b3'},title:{color:'#f59e42',fontSize:10,fontWeight:'800',letterSpacing:.5,marginBottom:4,textTransform:'uppercase'},row:{flexDirection:'row',justifyContent:'space-between',gap:12,paddingVertical:1},compact:{position:'absolute',top:4,right:4,maxWidth:'90%',paddingHorizontal:6,paddingVertical:2,borderRadius:6,backgroundColor:'#000000b3'},compactText:{color:'#fafaf9',fontSize:10,fontWeight:'600',fontVariant:['tabular-nums']},label:{color:'#a8a29e',fontSize:11},value:{color:'#fafaf9',fontSize:11,fontWeight:'600',fontVariant:['tabular-nums']},dim:{color:'#a8a29e',fontSize:11},hint:{color:'#78716c',fontSize:9,marginTop:4,maxWidth:200}})},1069,[787,16,115,194,33,813,10]);
157
+ __d(function(g,_r,i,a,m,_e,d){"use strict";function t(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(_e,'__esModule',{value:!0}),_e.StreamStatsOverlay=function(t){const n=(0,e.c)(72),{getStats:x,position:y,compact:j}=t,S=void 0!==j&&j,{t:k}=(0,r.useTranslation)(),[z,_]=(0,l.useState)(null);let w,C,E;n[0]!==x?(w=()=>{let t=!0;const e=async()=>{const e=await x().catch(b);t&&_(e)};e();const l=setInterval(()=>{e()},p);return()=>{t=!1,clearInterval(l)}},C=[x],n[0]=x,n[1]=w,n[2]=C):(w=n[1],C=n[2]);if((0,l.useEffect)(w,C),S){let t;n[3]!==z?(t=f(z),n[3]=z,n[4]=t):t=n[4];const e=t,l=c.ANCHOR_PLACEMENT[y];let r,p,v,b;return n[5]!==l?(r=[h.anchor,l],n[5]=l,n[6]=r):r=n[6],n[7]!==e||n[8]!==k?(p=e??k("v2.stats.waiting"),n[7]=e,n[8]=k,n[9]=p):p=n[9],n[10]!==p?(v=(0,u.jsx)(s.default,{style:h.compact,children:(0,u.jsx)(o.default,{style:h.compactText,numberOfLines:1,children:p})}),n[10]=p,n[11]=v):v=n[11],n[12]!==r||n[13]!==v?(b=(0,u.jsx)(s.default,{style:r,pointerEvents:"none",children:v}),n[12]=r,n[13]=v,n[14]=b):b=n[14],b}if(n[15]!==z||n[16]!==k){if(E=[],z){if(z.resolution){let t,e;n[18]!==k?(t=k("v2.stats.resolution"),n[18]=k,n[19]=t):t=n[19],n[20]!==z.resolution||n[21]!==t?(e={label:t,value:z.resolution},n[20]=z.resolution,n[21]=t,n[22]=e):e=n[22],E.push(e)}if(void 0!==z.fps){let t;n[23]!==k?(t=k("v2.stats.fps"),n[23]=k,n[24]=t):t=n[24];const e=String(z.fps);let l;n[25]!==t||n[26]!==e?(l={label:t,value:e},n[25]=t,n[26]=e,n[27]=l):l=n[27],E.push(l)}if(void 0!==z.bitrateKbps){let t;n[28]!==k?(t=k("v2.stats.bitrate"),n[28]=k,n[29]=t):t=n[29];const e=`${z.bitrateKbps} kbps`;let l;n[30]!==t||n[31]!==e?(l={label:t,value:e},n[30]=t,n[31]=e,n[32]=l):l=n[32],E.push(l)}if(void 0!==z.packetsLost){let t;n[33]!==k?(t=k("v2.stats.packetLoss"),n[33]=k,n[34]=t):t=n[34];const e=String(z.packetsLost);let l;n[35]!==t||n[36]!==e?(l={label:t,value:e},n[35]=t,n[36]=e,n[37]=l):l=n[37],E.push(l)}if(void 0!==z.jitterMs){let t;n[38]!==k?(t=k("v2.stats.jitter"),n[38]=k,n[39]=t):t=n[39];const e=`${z.jitterMs} ms`;let l;n[40]!==t||n[41]!==e?(l={label:t,value:e},n[40]=t,n[41]=e,n[42]=l):l=n[42],E.push(l)}if(z.codec){let t,e;n[43]!==k?(t=k("v2.stats.codec"),n[43]=k,n[44]=t):t=n[44],n[45]!==z.codec||n[46]!==t?(e={label:t,value:z.codec},n[45]=z.codec,n[46]=t,n[47]=e):e=n[47],E.push(e)}if("playback"===z.source&&(void 0!==z.dropped||void 0!==z.total)){let t;n[48]!==k?(t=k("v2.stats.frames"),n[48]=k,n[49]=t):t=n[49];const e=`${z.dropped??0}/${z.total??0}`;let l;n[50]!==t||n[51]!==e?(l={label:t,value:e},n[50]=t,n[51]=e,n[52]=l):l=n[52],E.push(l)}}n[15]=z,n[16]=k,n[17]=E}else E=n[17];const T=c.ANCHOR_PLACEMENT[y];let W,L,M,$,H,O,V;n[53]!==T?(W=[h.anchor,T],n[53]=T,n[54]=W):W=n[54];n[55]!==k?(L=k("v2.stats.title"),n[55]=k,n[56]=L):L=n[56];n[57]!==L?(M=(0,u.jsx)(o.default,{style:h.title,children:L}),n[57]=L,n[58]=M):M=n[58];n[59]!==E||n[60]!==k?($=0===E.length?(0,u.jsx)(o.default,{style:h.dim,children:k("v2.stats.waiting")}):E.map(v),n[59]=E,n[60]=k,n[61]=$):$=n[61];n[62]!==z?.source||n[63]!==k?(H="playback"===z?.source?(0,u.jsx)(o.default,{style:h.hint,children:k("v2.stats.playbackHint")}):null,n[62]=z?.source,n[63]=k,n[64]=H):H=n[64];n[65]!==M||n[66]!==$||n[67]!==H?(O=(0,u.jsxs)(s.default,{style:h.panel,children:[M,$,H]}),n[65]=M,n[66]=$,n[67]=H,n[68]=O):O=n[68];n[69]!==O||n[70]!==W?(V=(0,u.jsx)(s.default,{style:W,pointerEvents:"none",children:O}),n[69]=O,n[70]=W,n[71]=V):V=n[71];return V};var e=_r(d[0]),l=_r(d[1]),s=t(_r(d[2])),o=t(_r(d[3])),n=t(_r(d[4])),r=_r(d[5]),c=_r(d[6]),u=_r(d[7]);function f(t){if(!t)return null;const e=[];return t.resolution&&e.push(t.resolution),void 0!==t.fps&&e.push(`${t.fps}fps`),void 0!==t.bitrateKbps&&e.push(`${t.bitrateKbps}k`),e.length>0?e.join(' \xb7 '):null}const p=1e3;function v(t){return(0,u.jsxs)(s.default,{style:h.row,children:[(0,u.jsx)(o.default,{style:h.label,children:t.label}),(0,u.jsx)(o.default,{style:h.value,children:t.value})]},t.label)}function b(){return null}const h=n.default.create({anchor:{position:'absolute'},panel:{minWidth:150,maxWidth:220,paddingHorizontal:10,paddingVertical:8,borderRadius:8,backgroundColor:'#000000b3'},title:{color:'#f59e42',fontSize:10,fontWeight:'800',letterSpacing:.5,marginBottom:4,textTransform:'uppercase'},row:{flexDirection:'row',justifyContent:'space-between',gap:12,paddingVertical:1},compact:{maxWidth:'100%',paddingHorizontal:6,paddingVertical:2,borderRadius:6,backgroundColor:'#000000b3'},compactText:{color:'#fafaf9',fontSize:10,fontWeight:'600',fontVariant:['tabular-nums']},label:{color:'#a8a29e',fontSize:11},value:{color:'#fafaf9',fontSize:11,fontWeight:'600',fontVariant:['tabular-nums']},dim:{color:'#a8a29e',fontSize:11},hint:{color:'#78716c',fontSize:9,marginTop:4,maxWidth:200}})},1069,[787,16,115,194,33,813,1116,10]);
158
158
  __d(function(g,r,_i,a,m,_e,d){"use strict";function e(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(_e,'__esModule',{value:!0}),_e.MotionBoxesOverlay=function(e){const u=(0,t.c)(11),{deviceId:y,enabled:v}=e,{boxes:w}=(0,h.useDetections)(y,v);let S;u[0]!==y?(S=[y],u[0]=y,u[1]=S):S=u[1];const _=(0,f.useEventKindResolver)(S);let p;u[2]===Symbol.for("react.memo_cache_sentinel")?(p={width:0,height:0},u[2]=p):p=u[2];const[j,M]=(0,l.useState)(p);let $;u[3]===Symbol.for("react.memo_cache_sentinel")?($=e=>{const{width:t,height:l}=e.nativeEvent.layout;M(e=>e.width===t&&e.height===l?e:{width:t,height:l})},u[3]=$):$=u[3];const F=$;let R,C;u[4]!==w||u[5]!==_||u[6]!==j.height||u[7]!==j.width?(R=j.width>0&&j.height>0?w.map((e,t)=>{const l=e.x1*j.width,s=e.y1*j.height,h=(e.x2-e.x1)*j.width,u=(e.y2-e.y1)*j.height;if(h<=0||u<=0)return null;const f=(0,c.getClassColor)(e.label),y=Math.round(100*e.score),v=void 0!==e.name?`${e.name} ${y}%`:`${_.resolveLabel(e.label)} ${y}%`,w=`${e.label}-${t}`,S=Math.max(24,j.width-l);return(0,b.jsxs)(o.default.Fragment,{children:[(0,b.jsx)(i.default,{style:[x.box,e.detail?x.detailBox:null,{borderColor:f,left:l,top:s,width:h,height:u}]}),(0,b.jsx)(i.default,{style:[x.label,{backgroundColor:f,left:l,top:Math.max(0,s-18),maxWidth:S}],children:(0,b.jsx)(n.default,{style:x.labelText,numberOfLines:1,adjustsFontSizeToFit:!0,minimumFontScale:.6,children:v})})]},w)}):null,u[4]=w,u[5]=_,u[6]=j.height,u[7]=j.width,u[8]=R):R=u[8];u[9]!==R?(C=(0,b.jsx)(i.default,{style:s.default.absoluteFill,pointerEvents:"none",onLayout:F,children:R}),u[9]=R,u[10]=C):C=u[10];return C};var t=r(d[0]),l=r(d[1]),o=e(l),i=e(r(d[2])),n=e(r(d[3])),s=e(r(d[4])),h=r(d[5]),u=r(d[6]),c=r(d[7]),f=r(d[8]),b=r(d[9]);const x=s.default.create({box:{position:'absolute',borderWidth:2,borderRadius:u.RADIUS.sm},detailBox:{borderWidth:1,borderStyle:'dashed'},label:{position:'absolute',alignSelf:'flex-start',paddingHorizontal:5,paddingVertical:1,borderRadius:u.RADIUS.sm},labelText:{fontSize:10,fontWeight:'700',color:'#ffffff'}})},1070,[787,16,115,194,33,1084,831,2185,2182,10]);
159
159
  __d(function(g,r,i,a,m,_e,d){"use strict";function t(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(_e,'__esModule',{value:!0}),_e.StationaryBoxesOverlay=function(t){const b=(0,e.c)(15),{deviceId:x,enabled:p}=t,{t:v}=(0,c.useTranslation)(),{data:w,dataUpdatedAt:j}=(0,u.useCurrentOccupancy)(x,p);let _;b[0]!==x?(_=[x],b[0]=x,b[1]=_):_=b[1];const O=(0,f.useEventKindResolver)(_);let F;b[2]!==w?.stationaryObjects?(F=w?.stationaryObjects??[],b[2]=w?.stationaryObjects,b[3]=F):F=b[3];const M=F;let R;b[4]===Symbol.for("react.memo_cache_sentinel")?(R={width:0,height:0},b[4]=R):R=b[4];const[A,C]=(0,o.useState)(R);let T;b[5]===Symbol.for("react.memo_cache_sentinel")?(T=t=>{const{width:e,height:o}=t.nativeEvent.layout;C(t=>t.width===e&&t.height===o?t:{width:e,height:o})},b[5]=T):T=b[5];const z=T;if(!p)return null;let E,I;b[6]!==j||b[7]!==O||b[8]!==A.height||b[9]!==A.width||b[10]!==M||b[11]!==v?(E=A.width>0&&A.height>0?M.map(t=>{const e=t.x1*A.width,o=t.y1*A.height,h=(t.x2-t.x1)*A.width,c=(t.y2-t.y1)*A.height;if(h<=0||c<=0)return null;const u=Math.max(0,Math.round((j-t.becameStationaryAt)/6e4)),b=`${t.label??O.resolveLabel(t.className)} \xb7 ${v("v2.cameras.stationaryFor",{min:u})}`;return(0,y.jsxs)(n.default.Fragment,{children:[(0,y.jsx)(l.default,{style:[S.box,{left:e,top:o,width:h,height:c}]}),(0,y.jsx)(l.default,{style:[S.label,{left:e,top:Math.max(0,o-18),maxWidth:Math.max(24,A.width-e)}],children:(0,y.jsx)(s.default,{style:S.labelText,numberOfLines:1,adjustsFontSizeToFit:!0,minimumFontScale:.6,children:b})})]},`stationary-${t.id}`)}):null,b[6]=j,b[7]=O,b[8]=A.height,b[9]=A.width,b[10]=M,b[11]=v,b[12]=E):E=b[12];b[13]!==E?(I=(0,y.jsx)(l.default,{style:h.default.absoluteFill,pointerEvents:"none",onLayout:z,children:E}),b[13]=E,b[14]=I):I=b[14];return I};var e=r(d[0]),o=r(d[1]),n=t(o),l=t(r(d[2])),s=t(r(d[3])),h=t(r(d[4])),c=r(d[5]),u=r(d[6]),b=r(d[7]),f=r(d[8]),y=r(d[9]);const x='#8b98a5';const S=h.default.create({box:{position:'absolute',borderWidth:2,borderStyle:'dashed',borderRadius:b.RADIUS.sm,borderColor:x,backgroundColor:'rgba(139,152,165,0.08)'},label:{position:'absolute',alignSelf:'flex-start',paddingHorizontal:5,paddingVertical:1,borderRadius:b.RADIUS.sm,backgroundColor:x},labelText:{fontSize:10,fontWeight:'700',color:'#ffffff'}})},1071,[787,16,115,194,33,813,2180,831,2182,10]);
160
160
  __d(function(g,_r,_i,a,m,_e,d){"use strict";function e(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(_e,'__esModule',{value:!0}),_e.regionAlpha=c,_e.alphaHex=f,_e.MotionRegionsOverlay=function(e){const u=(0,t.c)(9),{deviceId:s,enabled:b}=e,{colors:y}=(0,r.useTheme)();let _;u[0]===Symbol.for("react.memo_cache_sentinel")?(_={width:0,height:0},u[0]=_):_=u[0];const[p,M]=(0,n.useState)(_),v=(0,h.useMotionRegions)(s,b);let x;u[1]===Symbol.for("react.memo_cache_sentinel")?(x=e=>{const{width:t,height:n}=e.nativeEvent.layout;M({width:t,height:n})},u[1]=x):x=u[1];const $=x;let S,j;u[2]!==p.height||u[3]!==p.width||u[4]!==y||u[5]!==v?(S=p.width<=0||p.height<=0?null:v.map((e,t)=>(0,l.jsx)(o.default,{style:[w.region,{borderColor:y.warning,backgroundColor:`${y.warning}${f(c(e.pixelCount))}`,left:e.x*p.width,top:e.y*p.height,width:e.w*p.width,height:e.h*p.height}]},`${e.x}:${e.y}:${e.w}:${e.h}:${t}`)),u[2]=p.height,u[3]=p.width,u[4]=y,u[5]=v,u[6]=S):S=u[6];u[7]!==S?(j=(0,l.jsx)(o.default,{style:i.default.absoluteFill,onLayout:$,pointerEvents:"none",children:S}),u[7]=S,u[8]=j):j=u[8];return j};var t=_r(d[0]),n=_r(d[1]),o=e(_r(d[2])),i=e(_r(d[3])),h=_r(d[4]),r=_r(d[5]),l=_r(d[6]);const u=4e3,s=.28;function c(e){return!Number.isFinite(e)||e<=0?.08:Math.min(s,.08+e/u*s)}function f(e){const t=Math.min(1,Math.max(0,e));return Math.round(255*t).toString(16).padStart(2,'0')}const w=i.default.create({region:{position:'absolute',borderWidth:1,borderStyle:'dashed',borderRadius:2}})},1072,[787,16,115,33,842,789,10]);
@@ -172,7 +172,7 @@ __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{v
172
172
  __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"DETECTION_CATEGORY",{enumerable:!0,get:function(){return o}}),Object.defineProperty(e,"FRAME_TRACKED_CATEGORY",{enumerable:!0,get:function(){return u}}),Object.defineProperty(e,"DETECTION_FADE_MS",{enumerable:!0,get:function(){return c}}),e.parseDetectionEvent=p,e.parseFrameTrackedEvent=E,e.shouldSuppressRaw=x,e.useDetections=function(f,b){const h=(0,t.c)(6),{controller:y,state:v}=(0,s.useConnection)(),[w,A]=(0,n.useState)(l),M=(0,n.useRef)(void 0);let T,F;h[0]!==v||h[1]!==y||h[2]!==f||h[3]!==b?(T=()=>{if(!b||"connected"!==v)return void A(l);const t=y.getSystem();if(!t)return;const n=()=>{M.current&&clearTimeout(M.current),M.current=void 0},s={current:0},h={current:0},w=t.subscribeEvent(o,t=>{const o=p(t);o&&Number(o.sourceId)===f&&(x({lastEnrichedAtMs:s.current,lastEnrichedFrameMs:h.current,rawFrameMs:o.timestamp,nowMs:Date.now()})||(A({boxes:o.boxes,frameWidth:o.width,frameHeight:o.height}),n(),M.current=setTimeout(()=>A(l),c)))}),T=t.subscribeEvent(u,t=>{const o=E(t);o&&o.deviceId===f&&0!==o.boxes.length&&(s.current=Date.now(),h.current=o.timestamp,A({boxes:o.boxes,frameWidth:o.width,frameHeight:o.height}),n(),M.current=setTimeout(()=>A(l),c))});return()=>{w(),T(),n(),A(l)}},F=[y,v,f,b],h[0]=v,h[1]=y,h[2]=f,h[3]=b,h[4]=T,h[5]=F):(T=h[4],F=h[5]);return(0,n.useEffect)(T,F),w};var t=r(d[0]),n=r(d[1]),s=r(d[2]);const o='detection.result',u='pipeline-analytics.frame-tracked',c=2500,l={boxes:[],frameWidth:0,frameHeight:0};function f(t){return'object'==typeof t&&null!==t}function b(t){return'number'==typeof t&&Number.isFinite(t)?t:null}function h(t,n,s){if(!f(t))return null;const o=b(t.x),u=b(t.y),c=b(t.width),l=b(t.height);if(null!==o&&null!==u&&null!==c&&null!==l&&n>0&&s>0)return{x1:o/n,y1:u/s,x2:(o+c)/n,y2:(u+l)/s};const h=b(t.x1),y=b(t.y1),p=b(t.x2),E=b(t.y2);return null!==h&&null!==y&&null!==p&&null!==E?{x1:h,y1:y,x2:p,y2:E}:null}function y(t){return'string'==typeof t.macroClass&&t.macroClass?t.macroClass:'string'==typeof t.class&&t.class?t.class:'string'==typeof t.label&&t.label?t.label:'object'}function p(t){if(!f(t))return null;const n=t.source;if(!f(n))return null;const s=n.id;if('string'!=typeof s&&'number'!=typeof s)return null;const o=t.data;if(!f(o))return null;const u=o.frame;if(!f(u))return null;const c=b(u.width)??0,l=b(u.height)??0,p=b(u.timestamp)??0,E=u.detections;if(!Array.isArray(E))return null;const x=[];for(const t of E){if(!f(t))continue;const n=b(t.score);if(null===n)continue;const s=h(t.bbox??t.boundingBox??t.region,c,l);s&&x.push(Object.assign({label:y(t),score:n},s))}return{sourceId:s,boxes:x,width:c,height:l,timestamp:p}}function E(t){if(!f(t))return null;const n=t.data;if(!f(n))return null;const s=b(n.deviceId),o=b(n.frameWidth)??0,u=b(n.frameHeight)??0,c=b(n.timestamp)??0,l=n.detections;if(null===s||!Array.isArray(l))return null;const p=[];for(const t of l){if(!f(t))continue;const n=b(t.score);if(null===n)continue;const s=h(t.bbox,o,u);if(!s)continue;const c=(Array.isArray(t.labels)?t.labels:[]).find(t=>f(t)&&'string'==typeof t.label),l='string'==typeof c?.label&&c.label.length>0?c.label:void 0;p.push(Object.assign({label:y(t),score:n},s,void 0!==l?{name:l}:{},'detail'===t.kind?{detail:!0}:{}))}return{deviceId:s,boxes:p,width:o,height:u,timestamp:c}}function x(t){if(t.nowMs-t.lastEnrichedAtMs>=c)return!1;return!(t.rawFrameMs>0&&t.lastEnrichedFrameMs>0&&t.rawFrameMs>t.lastEnrichedFrameMs)}},1084,[787,16,815]);
173
173
  __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"AUDIO_CATEGORY",{enumerable:!0,get:function(){return c}}),e.parseAudioEvent=s,e.useAudioLevel=function(o,l){const f=(0,t.c)(6),{controller:b,state:v}=(0,u.useConnection)(),[I,y]=(0,n.useState)(null);let p,A;f[0]!==v||f[1]!==b||f[2]!==o||f[3]!==l?(p=()=>{if(!l||"connected"!==v)return void y(null);const t=b.getSystem();if(!t)return;const n=t.subscribeEvent(c,t=>{const n=s(t);n&&n.deviceId===o&&y(n.dbfs)});return()=>{n(),y(null)}},A=[b,v,o,l],f[0]=v,f[1]=b,f[2]=o,f[3]=l,f[4]=p,f[5]=A):(p=f[4],A=f[5]);return(0,n.useEffect)(p,A),I},e.useAudioActive=function(o,l,f){const b=(0,t.c)(7),{controller:v,state:I}=(0,u.useConnection)(),[y,p]=(0,n.useState)(!1);let A,E;b[0]!==I||b[1]!==v||b[2]!==f||b[3]!==o||b[4]!==l?(A=()=>{if("off"===l||"connected"!==I)return void p(!1);const t=v.getSystem();if(!t)return;const n=t.subscribeEvent(c,t=>{const n=s(t);if(!n||n.deviceId!==o)return;const u="sensor"===l?n.hasDetection:(n.dbfs??Number.NEGATIVE_INFINITY)>=f;p(u)});return()=>{n(),p(!1)}},E=[v,I,o,l,f],b[0]=I,b[1]=v,b[2]=f,b[3]=o,b[4]=l,b[5]=A,b[6]=E):(A=b[5],E=b[6]);return(0,n.useEffect)(A,E),y};var t=r(d[0]),n=r(d[1]),u=r(d[2]);const c='pipeline.audio-inference-result';function o(t){return'object'==typeof t&&null!==t}function s(t){if(!o(t))return null;const n=t.data;if(!o(n))return null;const u=n.frame;if(!o(u))return null;const c='number'==typeof n.deviceId?n.deviceId:'number'==typeof u.deviceId?u.deviceId:null;if(null===c)return null;const s=u.level,l=o(s)&&'number'==typeof s.dbfs?s.dbfs:null,f=u.detections;return{deviceId:c,dbfs:l,hasDetection:Array.isArray(f)&&f.length>0}}},1085,[787,16,815]);
174
174
  __d(function(g,r,_i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"AUDIO_METER_FLOOR_DBFS",{enumerable:!0,get:function(){return t}}),Object.defineProperty(e,"AUDIO_METER_CEILING_DBFS",{enumerable:!0,get:function(){return n}}),Object.defineProperty(e,"AUDIO_LEVEL_THRESHOLDS_DBFS",{enumerable:!0,get:function(){return o}}),Object.defineProperty(e,"AUDIO_LEVEL_STEPS",{enumerable:!0,get:function(){return i}}),Object.defineProperty(e,"AUDIO_LEVEL_COLORS",{enumerable:!0,get:function(){return u}}),e.audioLevelColor=function(t){const n=Math.min(Math.max(0,t),u.length-1);return u[n]??u[0]},Object.defineProperty(e,"AUDIO_HIGHLIGHT_HOLD_SEC",{enumerable:!0,get:function(){return c}}),Object.defineProperty(e,"AUDIO_HIGHLIGHT_LEVELS",{enumerable:!0,get:function(){return f}}),Object.defineProperty(e,"AUDIO_HIGHLIGHT_LEVEL_ORDER",{enumerable:!0,get:function(){return l}}),e.dbfsForAudioUi=_,e.audioLevelFromStored=b,e.audioUiFromStored=function(t,n){return'off'===t?'off':b(t,n)},e.dbfsToLevel=function(t){if(null===t||!Number.isFinite(t))return 0;let n=0;for(const i of o)t>=i&&(n+=1);return n},Object.defineProperty(e,"DEFAULT_AUDIO_METER_POSITION",{enumerable:!0,get:function(){return h}}),Object.defineProperty(e,"AUDIO_METER_COMPACT_HEIGHTS",{enumerable:!0,get:function(){return s}}),Object.defineProperty(e,"AUDIO_METER_STRIP",{enumerable:!0,get:function(){return E}}),e.meterSegmentSize=function(t,n){if('vertical'===t)return E.vertical;if('horizontal'===t)return E.horizontal;const o=s[n]??s[0];return{width:E.compactWidth,height:o}},e.meterRenderOrder=function(t){const n=Array.from({length:i},(t,n)=>n);return'vertical'===t?[...n].reverse():n},e.anchorBands=I,e.meterOrientation=function(t){const n=I(t);return null===n?null:'center'!==n.vertical&&'center'!==n.horizontal?'compact':'center'===n.horizontal?'horizontal':'vertical'};const t=-60,n=-24,o=[-60,-53,-46,-39,-32,-24],i=o.length,u=['#22c55e','#84cc16','#eab308','#f59e0b','#f97316','#ef4444'];const c=5,f=[2,4,6],l=['low','mid','high'],O={low:2,mid:4,high:6};function _(t){const i=O[t];return o[i-1]??n}function b(t,n){if('sensor'===t)return'low';let o='mid',i=Number.POSITIVE_INFINITY;for(const t of l){const u=Math.abs(n-_(t));u<i&&(o=t,i=u)}return o}const h='top-center',s=[8,11,14,17,21,26],E={horizontal:{width:8,height:16},vertical:{width:24,height:7},compactWidth:4};function I(t){if('off'===t)return null;const n=t.split('-');return{vertical:n.includes('top')?'top':n.includes('bottom')?'bottom':'center',horizontal:n.includes('left')?'left':n.includes('right')?'right':'center'}}},1086,[]);
175
- __d(function(g,_r,i,_a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"OVERLAY_LAYERS",{enumerable:!0,get:function(){return r}}),Object.defineProperty(e,"LAYER_LABEL_KEY",{enumerable:!0,get:function(){return n}}),Object.defineProperty(e,"OVERLAY_DEFAULTS",{enumerable:!0,get:function(){return o}}),e.patchOverlay=function(t,r){return Object.assign({},t,r)},e.hasLayer=a,e.toggleLayer=function(t,r){const n=a(t,r)?t.layers.filter(t=>t!==r):[...t.layers,r];return Object.assign({},t,{layers:y(n)})},e.addReadout=function(t,r){const n=t.readouts.filter(t=>!s(t.source,r.source));return Object.assign({},t,{readouts:[...n,r]})},e.removeReadout=function(t,r){return Object.assign({},t,{readouts:t.readouts.filter(t=>t.id!==r)})},e.patchReadout=function(t,r,n){return Object.assign({},t,{readouts:t.readouts.map(t=>t.id===r?Object.assign({},t,n):t)})},e.sameSource=s,e.readoutId=u,e.readoutsAt=function(t,r){return t.readouts.filter(t=>t.corner===r)},e.migrateLegacyLayers=f,e.canonicalLayers=y,e.normaliseOverlay=function(r){if(!c(r))return;const n=(0,t.normalisePosition)(r.audioMeter)??o.audioMeter,a=(0,t.normalisePosition)(r.occupancy)??o.occupancy,s=!0===r.motionBadge?'top-right':!1===r.motionBadge?'off':(0,t.normalisePosition)(r.motionBadge)??o.motionBadge,u=Array.isArray(r.readouts)?r.readouts.map(p).filter(t=>null!==t):o.readouts;return{layers:Array.isArray(r.layers)?y(r.layers):f(r),motionBadge:s,highlightBorder:!1!==r.highlightBorder,audioMeter:n,occupancy:a,stats:!0===r.stats,readouts:u}},e.isDefaultOverlay=function(t){return 0===t.layers.length&&t.motionBadge===o.motionBadge&&t.highlightBorder===o.highlightBorder&&t.audioMeter===o.audioMeter&&t.occupancy===o.occupancy&&t.stats===o.stats&&0===t.readouts.length};var t=_r(d[0]);const r=Object.freeze(['motion','objects','discarded','stationary']),n={motion:'v2.overlay.layerMotion',objects:'v2.overlay.layerObjects',discarded:'v2.overlay.layerDiscarded',stationary:'v2.overlay.layerStationary'},o=Object.freeze({layers:Object.freeze([]),motionBadge:'off',highlightBorder:!0,audioMeter:'top-center',occupancy:'off',stats:!1,readouts:Object.freeze([])});function a(t,r){return t.layers.includes(r)}function s(t,r){return t.kind===r.kind&&('audioDbfs'===t.kind||'audioDbfs'===r.kind||t.deviceId===r.deviceId&&t.sectionId===r.sectionId&&t.fieldKey===r.fieldKey)}function u(t){return'audioDbfs'===t.kind?'audio-dbfs':`dev:${t.deviceId}:${t.sectionId}:${t.fieldKey}`}function c(t){return'object'==typeof t&&null!==t}const l={off:[],kept:['objects','stationary'],all:['objects','discarded','stationary']};function f(t){const r=l[n=t.boxes,o=t.discardedBoxes,!0===o?'all':'kept'===n||'all'===n||'off'===n?n:!0===n?'kept':'off'];var n,o;return y(!0===t.motionBoxes?['motion',...r]:r)}function y(t){return Array.isArray(t)?r.filter(r=>t.includes(r)):[]}function b(t){return c(t)?'audioDbfs'===t.kind?{kind:'audioDbfs'}:'deviceField'===t.kind&&'number'==typeof t.deviceId&&'string'==typeof t.sectionId&&'string'==typeof t.fieldKey?{kind:'deviceField',deviceId:t.deviceId,sectionId:t.sectionId,fieldKey:t.fieldKey}:null:null}function p(r){if(!c(r))return null;const n=b(r.source);if(null===n)return null;if('string'!=typeof r.label)return null;const o=(0,t.normaliseAnchor)(r.corner)??'top-right',a={id:'string'==typeof r.id&&r.id.length>0?r.id:u(n),source:n,label:r.label,corner:o};return'string'==typeof r.unit&&r.unit.length>0&&(a.unit=r.unit),'number'==typeof r.precision&&Number.isFinite(r.precision)&&(a.precision=Math.max(0,Math.min(6,Math.trunc(r.precision)))),a}},1087,[1116]);
175
+ __d(function(g,_r,i,_a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"OVERLAY_LAYERS",{enumerable:!0,get:function(){return r}}),Object.defineProperty(e,"LAYER_LABEL_KEY",{enumerable:!0,get:function(){return n}}),Object.defineProperty(e,"OVERLAY_DEFAULTS",{enumerable:!0,get:function(){return o}}),Object.defineProperty(e,"LEGACY_STATS_POSITION",{enumerable:!0,get:function(){return a}}),e.patchOverlay=function(t,r){return Object.assign({},t,r)},e.hasLayer=s,e.toggleLayer=function(t,r){const n=s(t,r)?t.layers.filter(t=>t!==r):[...t.layers,r];return Object.assign({},t,{layers:b(n)})},e.addReadout=function(t,r){const n=t.readouts.filter(t=>!u(t.source,r.source));return Object.assign({},t,{readouts:[...n,r]})},e.removeReadout=function(t,r){return Object.assign({},t,{readouts:t.readouts.filter(t=>t.id!==r)})},e.patchReadout=function(t,r,n){return Object.assign({},t,{readouts:t.readouts.map(t=>t.id===r?Object.assign({},t,n):t)})},e.sameSource=u,e.readoutId=c,e.readoutsAt=function(t,r){return t.readouts.filter(t=>t.corner===r)},e.migrateLegacyLayers=y,e.canonicalLayers=b,e.normaliseOverlay=function(r){if(!l(r))return;const n=(0,t.normalisePosition)(r.audioMeter)??o.audioMeter,s=(0,t.normalisePosition)(r.occupancy)??o.occupancy,u=!0===r.motionBadge?'top-right':!1===r.motionBadge?'off':(0,t.normalisePosition)(r.motionBadge)??o.motionBadge,c=Array.isArray(r.readouts)?r.readouts.map(h).filter(t=>null!==t):o.readouts,f=!0===r.stats?a:!1===r.stats?'off':(0,t.normalisePosition)(r.stats)??o.stats;return{layers:Array.isArray(r.layers)?b(r.layers):y(r),motionBadge:u,highlightBorder:!1!==r.highlightBorder,audioMeter:n,occupancy:s,stats:f,readouts:c}},e.isDefaultOverlay=function(t){return 0===t.layers.length&&t.motionBadge===o.motionBadge&&t.highlightBorder===o.highlightBorder&&t.audioMeter===o.audioMeter&&t.occupancy===o.occupancy&&t.stats===o.stats&&0===t.readouts.length};var t=_r(d[0]);const r=Object.freeze(['motion','objects','discarded','stationary']),n={motion:'v2.overlay.layerMotion',objects:'v2.overlay.layerObjects',discarded:'v2.overlay.layerDiscarded',stationary:'v2.overlay.layerStationary'},o=Object.freeze({layers:Object.freeze([]),motionBadge:'off',highlightBorder:!0,audioMeter:'top-center',occupancy:'off',stats:'off',readouts:Object.freeze([])}),a='top-right';function s(t,r){return t.layers.includes(r)}function u(t,r){return t.kind===r.kind&&('audioDbfs'===t.kind||'audioDbfs'===r.kind||t.deviceId===r.deviceId&&t.sectionId===r.sectionId&&t.fieldKey===r.fieldKey)}function c(t){return'audioDbfs'===t.kind?'audio-dbfs':`dev:${t.deviceId}:${t.sectionId}:${t.fieldKey}`}function l(t){return'object'==typeof t&&null!==t}const f={off:[],kept:['objects','stationary'],all:['objects','discarded','stationary']};function y(t){const r=f[n=t.boxes,o=t.discardedBoxes,!0===o?'all':'kept'===n||'all'===n||'off'===n?n:!0===n?'kept':'off'];var n,o;return b(!0===t.motionBoxes?['motion',...r]:r)}function b(t){return Array.isArray(t)?r.filter(r=>t.includes(r)):[]}function p(t){return l(t)?'audioDbfs'===t.kind?{kind:'audioDbfs'}:'deviceField'===t.kind&&'number'==typeof t.deviceId&&'string'==typeof t.sectionId&&'string'==typeof t.fieldKey?{kind:'deviceField',deviceId:t.deviceId,sectionId:t.sectionId,fieldKey:t.fieldKey}:null:null}function h(r){if(!l(r))return null;const n=p(r.source);if(null===n)return null;if('string'!=typeof r.label)return null;const o=(0,t.normaliseAnchor)(r.corner)??'top-right',a={id:'string'==typeof r.id&&r.id.length>0?r.id:c(n),source:n,label:r.label,corner:o};return'string'==typeof r.unit&&r.unit.length>0&&(a.unit=r.unit),'number'==typeof r.precision&&Number.isFinite(r.precision)&&(a.precision=Math.max(0,Math.min(6,Math.trunc(r.precision)))),a}},1087,[1116]);
176
176
  __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.resolveCameraViewOptions=function(t){return{overlay:t?.overlay??o.OVERLAY_DEFAULTS,highlight:(0,u.withHighlightDefaults)(t?.highlight)}},e.mergeHighlightPatch=l,e.useCameraOverlay=function(u){const l=(0,t.c)(5);let c;l[0]!==u?(c=t=>t.prefs.byId[u]?.overlay,l[0]=u,l[1]=c):c=l[1];const f=(0,n.useCameraPrefsStore)(c),y=(0,n.useCameraPrefsStore)(h);let C,v;l[2]!==y?(C=()=>{y()},v=[y],l[2]=y,l[3]=C,l[4]=v):(C=l[3],v=l[4]);return(0,s.useEffect)(C,v),f??o.OVERLAY_DEFAULTS},e.useCameraViewOptions=function(h){const C=(0,t.c)(21);let v;C[0]!==h?(v=t=>t.prefs.byId[h]?.overlay,C[0]=h,C[1]=v):v=C[1];const O=(0,n.useCameraPrefsStore)(v);let S;C[2]!==h?(S=t=>t.prefs.byId[h]?.highlight,C[2]=h,C[3]=S):S=C[3];const P=(0,n.useCameraPrefsStore)(S),E=(0,n.useCameraPrefsStore)(y),_=(0,n.useCameraPrefsStore)(f),p=(0,n.useCameraPrefsStore)(c);let A,L;C[4]!==p?(A=()=>{p()},L=[p],C[4]=p,C[5]=A,C[6]=L):(A=C[5],L=C[6]);(0,s.useEffect)(A,L);const b=O??o.OVERLAY_DEFAULTS;let D;C[7]!==P?(D=(0,u.withHighlightDefaults)(P),C[7]=P,C[8]=D):D=C[8];const H=D;let V;C[9]!==h||C[10]!==E?(V=t=>E(h,t),C[9]=h,C[10]=E,C[11]=V):V=C[11];const w=V;let F;C[12]!==h||C[13]!==H||C[14]!==_?(F=t=>_(h,l(H,t)),C[12]=h,C[13]=H,C[14]=_,C[15]=F):F=C[15];const I=F;let R;C[16]!==H||C[17]!==b||C[18]!==I||C[19]!==w?(R={overlay:b,highlight:H,setOverlay:w,setHighlight:I},C[16]=H,C[17]=b,C[18]=I,C[19]=w,C[20]=R):R=C[20];return R};var t=r(d[0]),s=r(d[1]),n=r(d[2]),o=r(d[3]),u=r(d[4]);function l(t,s){return Object.assign({},t,s)}function h(t){return t.hydrate}function c(t){return t.hydrate}function f(t){return t.setCameraHighlight}function y(t){return t.setCameraOverlay}},1088,[787,16,978,1087,929]);
177
177
  __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"UNKNOWN_CLIP_DURATION",{enumerable:!0,get:function(){return t}}),e.resolveClipDuration=function(n){if(null!==n.measuredMs&&Number.isFinite(n.measuredMs)&&n.measuredMs>0)return{ms:n.measuredMs,source:'measured'};if(n.inProgress)return t;const o=n.endMs-n.startMs;return!Number.isFinite(o)||o<=0?t:{ms:o,source:'index'}},Object.defineProperty(e,"EMPTY_CLIP_PROGRESS",{enumerable:!0,get:function(){return o}}),e.resolveClipProgress=function(t,o){return null===t||null===o.ms?{positionMs:t,duration:o,fraction:null}:{positionMs:t,duration:o,fraction:(0,n.clampFraction)(t/o.ms)}},Object.defineProperty(e,"clampFraction",{enumerable:!0,get:function(){return n.clampFraction}}),e.fractionAtX=function(t,o){return o>0?(0,n.clampFraction)(t/o):0},e.clipOffsetAtFraction=function(t,o){return Math.round((0,n.clampFraction)(t)*Math.max(0,o))},Object.defineProperty(e,"CLIP_POSITION_EPOCH_FLOOR_MS",{enumerable:!0,get:function(){return u}}),e.routePlayerPosition=function(n,t){if('clip'!==n.kind)return{kind:'session',epochMs:t};if(t>=u)return{kind:'dropped',clipId:n.clipId,reportedMs:t};return{kind:'clip',clipId:n.clipId,positionMs:Math.max(0,t)}};var n=r(d[0]);const t={ms:null,source:'unknown'};const o={positionMs:null,duration:t,fraction:null};const u=1e11},1089,[2532]);
178
178
  __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.generateDragId=function(){return t+=1,`drag-${t}`};let t=0},1090,[]);
@@ -196,7 +196,7 @@ __d(function(g,r,i,a,m,_e,d){"use strict";function e(e){return e&&e.__esModule?e
196
196
  __d(function(g,r,i,a,m,_e,d){"use strict";function e(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(_e,'__esModule',{value:!0}),_e.GridLiveEmbed=function(e){const{devices:c,quality:h,layout:j,showName:O,audioOnIds:T,pausedIds:w,highlight:P,activeOnly:A,showBoxes:L,ptzIds:N,editable:z,spans:G}=e,{server:_,token:M}=(0,v.useServer)(),{colors:R}=(0,b.useTheme)(),{t:D}=(0,u.useTranslation)();(0,S.useScreenWakeLock)();const[B,H]=(0,t.useState)('connecting'),[U,W]=(0,t.useState)(!1),[q,V]=(0,t.useState)(!1),[F,J]=(0,t.useState)(0),Q=(0,t.useMemo)(()=>(0,k.buildTileLabels)(D),[D]),K=_?.serverUrl??null,X=(0,t.useCallback)(()=>K?(0,y.buildGridEmbedConfig)({serverUrl:K,token:M??'',deviceIds:c,options:{showName:O,quality:h,layout:j},muted:!0,paused:!1,highlight:P,activeOnly:A,showBoxes:L,audioOnIds:T,pausedIds:w,ptzIds:N,editable:z,spans:G,labels:Q}):{},[K,M,c,O,h,j,P,A,L,T,w,N,z,G,Q]),Y=(0,t.useCallback)(t=>{const n=(0,p.coerceGridHostMessage)(t);if(n)switch(n.type){case'state':H(n.state),n.commands?.includes(p.GRID_HOT_DEVICES_COMMAND)&&W(!0),n.commands?.includes(p.GRID_SPANS_COMMAND)&&V(!0),e.onStateChange?.(n.state);break;case'tileTap':e.onTileTap?.(n.deviceId,n.rect);break;case'tileLongPress':e.onTileLongPress?.(n.deviceId,n.rect);break;case'tileOpen':e.onTileOpen?.(n.deviceId);break;case'audioToggle':e.onAudioToggle?.(n.deviceId);break;case'pauseToggle':e.onPauseToggle?.(n.deviceId);break;case'ptzOpen':e.onPtzOpen?.(n.deviceId);break;case'cellPanelOpen':e.onCellPanelOpen?.(n.panel,n.deviceId);break;case'tileRemove':e.onTileRemove?.(n.deviceId);break;case'tileResize':e.onTileResize?.(n.deviceId,n.cw,n.ch)}},[e]),{iframeRef:Z,src:$,postCommand:ee,reload:te}=(0,x.useEmbedIframe)({serverUrl:K,mode:'grid',buildConfig:X,onHostMessage:Y});(0,I.useGridEmbedPlaybackSink)(ee);const ne=c.join(','),se=(0,t.useRef)(ne);(0,t.useEffect)(()=>{ne!==se.current&&(se.current=ne,U?ee({kind:'setDevices',value:c}):J(e=>e+1))},[ne,U,ee]);const re=JSON.stringify(G??{});(0,t.useEffect)(()=>{q&&ee({kind:'setSpans',value:G??{}})},[re,q]);const ie=T.join(','),oe=w.join(',');(0,t.useEffect)(()=>ee({kind:'setAudioOn',value:T}),[ie]),(0,t.useEffect)(()=>ee({kind:'setPaused',value:w}),[oe]),(0,t.useEffect)(()=>ee({kind:'setQuality',value:h}),[h,ee]),(0,t.useEffect)(()=>ee({kind:'setLayout',value:j}),[j,ee]),(0,t.useEffect)(()=>ee({kind:'setShowName',value:O}),[O,ee]),(0,t.useEffect)(()=>{P&&ee({kind:'setHighlight',value:P})},[P,ee]),(0,t.useEffect)(()=>ee({kind:'setActiveOnly',value:A??!1}),[A,ee]),(0,t.useEffect)(()=>ee({kind:'setShowBoxes',value:L??!1}),[L,ee]),(0,t.useEffect)(()=>{const e=()=>ee({kind:'reconnect'}),t=()=>{'visible'===document.visibilityState&&ee({kind:'reconnect'})};return window.addEventListener('online',e),document.addEventListener('visibilitychange',t),()=>{window.removeEventListener('online',e),document.removeEventListener('visibilitychange',t)}},[ee]);const le=(0,t.useCallback)(()=>{H('connecting'),te()},[te]);if(!$)return(0,C.jsx)(n.default,{style:E.container,children:(0,C.jsx)(n.default,{style:E.center,children:(0,C.jsx)(s.default,{style:[E.errorText,{color:R.danger}],children:D('v2.live.error')})})});return(0,C.jsxs)(n.default,{style:E.container,children:[(0,C.jsx)("iframe",{ref:Z,src:$,title:"camera-grid",allow:"microphone; autoplay; fullscreen",style:{width:'100%',height:'100%',border:'none',background:'#000'}},F),'ready'!==B&&(0,C.jsx)(n.default,{style:E.overlay,pointerEvents:'error'===B?'auto':'none',children:'connecting'===B?(0,C.jsxs)(n.default,{style:E.center,children:[(0,C.jsx)(o.default,{color:R.primary}),(0,C.jsx)(s.default,{style:[E.hint,{color:R.foregroundMuted}],children:D('v2.live.connecting')})]}):(0,C.jsxs)(n.default,{style:E.center,children:[(0,C.jsx)(s.default,{style:[E.errorText,{color:R.danger}],children:D('v2.live.error')}),(0,C.jsxs)(l.default,{onPress:le,style:[E.retryButton,{borderColor:R.border}],children:[(0,C.jsx)(f.RotateCw,{size:16,color:R.foreground}),(0,C.jsx)(s.default,{style:[E.retryLabel,{color:R.foreground}],children:D('v2.live.retry')})]})]})})]})};var t=r(d[0]),n=e(r(d[1])),s=e(r(d[2])),o=e(r(d[3])),l=e(r(d[4])),c=e(r(d[5])),u=r(d[6]),f=r(d[7]),v=r(d[8]),b=r(d[9]),h=r(d[10]),y=r(d[11]),k=r(d[12]),p=r(d[13]),I=r(d[14]),x=r(d[15]),S=r(d[16]),C=r(d[17]);const E=c.default.create({container:{flex:1,overflow:'hidden',backgroundColor:'#000'},overlay:Object.assign({},c.default.absoluteFill,{alignItems:'center',justifyContent:'center',backgroundColor:'#000'}),center:{flex:1,alignItems:'center',justifyContent:'center',padding:h.SPACING.xl,gap:h.SPACING.md},hint:{fontSize:13,textAlign:'center'},errorText:{fontSize:13,textAlign:'center'},retryButton:{flexDirection:'row',alignItems:'center',gap:h.SPACING.sm,paddingHorizontal:h.SPACING.lg,paddingVertical:h.SPACING.md,borderRadius:8,borderWidth:1},retryLabel:{fontSize:13,fontWeight:'600'}})},1108,[16,115,194,233,248,33,813,814,914,789,831,1111,2633,2634,2635,2190,2520,10]);
197
197
  __d(function(g,r,i,a,m,_e,d){"use strict";function e(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(_e,'__esModule',{value:!0}),_e.GridWall=function(e){const c=(0,l.c)(36),{cameras:p,layout:y,showName:W,quality:j,muted:v,paused:x,layers:H,ptzIds:C,onCellPanelOpen:_}=e,b=void 0===v||v,P=void 0!==x&&x,I=void 0===H?f:H;let k;c[0]!==p?(k=p.map(w),c[0]=p,c[1]=k):k=c[1];const O=k;let q;c[2]!==p||c[3]!==y.cols?(q=(0,s.splitIntoRows)(p,y.cols),c[2]=p,c[3]=y.cols,c[4]=q):q=c[4];const z=q;let D,G,M,N;c[5]!==y.wallH||c[6]!==y.wallW?(D=[h.block,{width:y.wallW,height:y.wallH}],c[5]=y.wallH,c[6]=y.wallW,c[7]=D):D=c[7];if(c[8]!==I||c[9]!==y.cellH||c[10]!==y.cellW||c[11]!==b||c[12]!==_||c[13]!==P||c[14]!==C||c[15]!==j||c[16]!==z||c[17]!==W){let e;c[19]!==I||c[20]!==y.cellH||c[21]!==y.cellW||c[22]!==b||c[23]!==_||c[24]!==P||c[25]!==C||c[26]!==j||c[27]!==W?(e=e=>(0,u.jsx)(t.default,{style:h.row,children:e.map(e=>(0,u.jsx)(n.GridTile,{camera:e,width:y.cellW,height:y.cellH,showName:W,quality:j,muted:b,paused:P,layers:I,onCellPanel:_,hasPtz:C?.includes(e.id)??!1},e.id))},e[0]?.id??"empty"),c[19]=I,c[20]=y.cellH,c[21]=y.cellW,c[22]=b,c[23]=_,c[24]=P,c[25]=C,c[26]=j,c[27]=W,c[28]=e):e=c[28],G=z.map(e),c[8]=I,c[9]=y.cellH,c[10]=y.cellW,c[11]=b,c[12]=_,c[13]=P,c[14]=C,c[15]=j,c[16]=z,c[17]=W,c[18]=G}else G=c[18];c[29]!==D||c[30]!==G?(M=(0,u.jsx)(t.default,{style:h.wrap,children:(0,u.jsx)(t.default,{style:D,children:G})}),c[29]=D,c[30]=G,c[31]=M):M=c[31];c[32]!==O||c[33]!==W||c[34]!==M?(N=(0,u.jsx)(o.CameraSwitchedOffProvider,{deviceIds:O,enabled:W,children:M}),c[32]=O,c[33]=W,c[34]=M,c[35]=N):N=c[35];return N};var l=r(d[0]);r(d[1]);var t=e(r(d[2])),c=e(r(d[3])),n=r(d[4]),o=r(d[5]),s=r(d[6]),u=r(d[7]);const f=[];function w(e){return e.id}const h=c.default.create({wrap:{flex:1,alignItems:'center',justifyContent:'center',backgroundColor:'#000'},block:{flexDirection:'column'},row:{flexDirection:'row',justifyContent:'center'}})},1109,[787,16,115,33,2636,2637,1110,10]);
198
198
  __d(function(g,r,_i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.computeAutoLayout=c,e.computeGridLayout=function(s,u,i,f="auto",p=t){if('number'!=typeof f||f<1)return c(s,u,i,p);if(s<=0||u<=0||i<=0)return l;const w=Math.floor(f),A=Math.ceil(s/w);return o(n(w,A,s,u,i,p))},e.splitIntoRows=function(t,l){if(0===t.length)return[];const n=l>=1?Math.floor(l):t.length,o=[];for(let l=0;l<t.length;l+=n)o.push(t.slice(l,l+n));return o},Object.defineProperty(e,"MIN_SECONDARY_AREA_FRACTION",{enumerable:!0,get:function(){return i}}),e.resolvePrimaryWallSpan=function(l,n,o,s=t){const u=c(l,n,o,s);if(l<3||n<=0||o<=0||u.cols<=0)return f(u);const w=u.cellW*u.cellH,A=l-1;let y=null;for(let t=2;t<=l;t++)for(let l=2;l<=t;l++){const c=l*(t-l);if(A<c)continue;const u=A-c;if(u%t!==0)continue;const f=l+u/t,h=Math.min(n/t,o/f*s),M=h*h/s,W=M*l*l;if(W<=w)continue;if(M<w*i)continue;const H={span:l,cols:t,rows:f,primaryArea:W,trackArea:M};(null===y||p(H,y))&&(y=H)}return null===y?f(u):{span:y.span,cols:y.cols,rows:y.rows}};const t=1.7777777777777777,l={cols:0,rows:0,cellW:0,cellH:0,wallW:0,wallH:0};function n(t,l,n,o,c,s){const u=Math.min(o/t,c/l*s),i=u/s;return{cols:t,rows:l,cellW:u,cellH:i,wallW:Math.min(t,n)*u,wallH:l*i,empty:t*l-n}}function o(t){return{cols:t.cols,rows:t.rows,cellW:t.cellW,cellH:t.cellH,wallW:t.wallW,wallH:t.wallH}}function c(c,s,i,f=t){if(c<=0||s<=0||i<=0)return l;let p=null;for(let t=1;t<=c;t++){const l=Math.ceil(c/t);if(Math.ceil(c/l)!==t)continue;const o=n(l,t,c,s,i,f);(null===p||u(o,p))&&(p=o)}return null===p?l:o(p)}const s=1e-9;function u(t,l){const n=t.cellW*t.cellH,o=l.cellW*l.cellH,c=Math.max(n,o,1);return n-o>c*s||!(o-n>c*s)&&(t.empty!==l.empty?t.empty<l.empty:t.rows<l.rows)}const i=.4;function f(t){return{span:1,cols:t.cols,rows:t.rows}}function p(t,l){const n=Math.max(t.primaryArea,l.primaryArea,1);if(t.primaryArea-l.primaryArea>n*s)return!0;if(l.primaryArea-t.primaryArea>n*s)return!1;const o=Math.max(t.trackArea,l.trackArea,1);return t.trackArea-l.trackArea>o*s||!(l.trackArea-t.trackArea>o*s)&&(t.rows!==l.rows?t.rows<l.rows:t.cols<l.cols)}},1110,[]);
199
- __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.tileOverlayFor=t,e.buildTileOverlayMap=function(s){const o={};for(const n of s){const s=t(n.overlay);null!==s&&(o[String(n.deviceId)]=s)}return o},e.buildGridEmbedConfig=function(s){return Object.assign({serverUrl:s.serverUrl,token:s.token,devices:[...s.deviceIds],layout:s.options.layout,quality:s.options.quality,showName:s.options.showName,showBadges:!0,muted:s.muted,paused:s.paused},s.highlight?{highlight:s.highlight}:{},s.activeOnly?{activeOnly:!0}:{},s.showBoxes?{showBoxes:!0}:{},s.audioOnIds&&s.audioOnIds.length>0?{audioOnIds:[...s.audioOnIds]}:{},s.pausedIds&&s.pausedIds.length>0?{pausedIds:[...s.pausedIds]}:{},s.ptzIds&&s.ptzIds.length>0?{ptzIds:[...s.ptzIds]}:{},s.overlays&&Object.keys(s.overlays).length>0?{overlays:s.overlays}:{},!0===s.editable?{editable:!0}:{},s.spans&&Object.keys(s.spans).length>0?{spans:s.spans}:{},s.labels&&Object.keys(s.labels).length>0?{labels:s.labels}:{})};var s=r(d[0]);function t(t){const o=Object.assign({},(0,s.hasLayer)(t,'motion')?{motionBoxes:!0}:{},'off'!==t.motionBadge?{motionBadge:t.motionBadge}:{},'off'!==t.audioMeter?{audioMeter:t.audioMeter}:{},'off'!==t.occupancy?{occupancy:t.occupancy}:{},t.stats?{stats:!0}:{});return Object.keys(o).length>0?o:null}},1111,[1087]);
199
+ __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.tileOverlayFor=t,e.buildTileOverlayMap=function(s){const o={};for(const n of s){const s=t(n.overlay);null!==s&&(o[String(n.deviceId)]=s)}return o},e.buildGridEmbedConfig=function(s){return Object.assign({serverUrl:s.serverUrl,token:s.token,devices:[...s.deviceIds],layout:s.options.layout,quality:s.options.quality,showName:s.options.showName,showBadges:!0,muted:s.muted,paused:s.paused},s.highlight?{highlight:s.highlight}:{},s.activeOnly?{activeOnly:!0}:{},s.showBoxes?{showBoxes:!0}:{},s.audioOnIds&&s.audioOnIds.length>0?{audioOnIds:[...s.audioOnIds]}:{},s.pausedIds&&s.pausedIds.length>0?{pausedIds:[...s.pausedIds]}:{},s.ptzIds&&s.ptzIds.length>0?{ptzIds:[...s.ptzIds]}:{},s.overlays&&Object.keys(s.overlays).length>0?{overlays:s.overlays}:{},!0===s.editable?{editable:!0}:{},s.spans&&Object.keys(s.spans).length>0?{spans:s.spans}:{},s.labels&&Object.keys(s.labels).length>0?{labels:s.labels}:{})};var s=r(d[0]);function t(t){const o=Object.assign({},(0,s.hasLayer)(t,'motion')?{motionBoxes:!0}:{},'off'!==t.motionBadge?{motionBadge:t.motionBadge}:{},'off'!==t.audioMeter?{audioMeter:t.audioMeter}:{},'off'!==t.occupancy?{occupancy:t.occupancy}:{},'off'!==t.stats?{stats:!0,statsAt:t.stats}:{});return Object.keys(o).length>0?o:null}},1111,[1087]);
200
200
  __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"SIDE_NAV_WIDTH",{enumerable:!0,get:function(){return t}}),e.sideNavFootprint=function({visible:n,insetLeft:u}){return n?t+(Number.isFinite(u)&&u>0?u:0):0};const t=56},1112,[]);
201
201
  __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"HAPTIC_EVENT_KINDS",{enumerable:!0,get:function(){return n}}),Object.defineProperty(e,"HAPTICS_DEFAULTS",{enumerable:!0,get:function(){return t}}),e.hapticKindForEvent=o,e.isHapticEventEnabled=c,Object.defineProperty(e,"HAPTIC_MIN_INTERVAL_MS",{enumerable:!0,get:function(){return u}}),e.canFireHaptic=s,e.isForegroundActive=function(n){return'active'===n},e.detectionEventKind=function(n,t){return t||n.some(n=>'person'===n.toLowerCase())?'person':'detection'},e.resolveHaptic=function(n,t,f,p,l=u){return c(n,t)&&s(f,p,l)?o(t):null};const n=['motion','detection','person'],t={enabled:!1,motion:!0,detection:!0,person:!0,uiFeedback:!0};function o(n){switch(n){case'motion':return'selection';case'detection':return'impact-light';case'person':return'notification'}}function c(n,t){if(!n.enabled)return!1;switch(t){case'motion':return n.motion;case'detection':return n.detection;case'person':return n.person}}const u=2e3;function s(n,t,o=u){return n<=0||t-n>=o}},1113,[]);
202
202
  __d(function(g,r,i,a,_m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.fireHaptic=function(t){return},r(d[0])},1114,{"0":110,"1":1286,"2":14,"paths":{"1286":"/viewer/camstack/_expo/static/js/web/Haptics-566573db9c5600a5d9301df56a140f0c.js"}});
@@ -222,7 +222,7 @@ __d(function(g,_r,i,a,m,_e,d){"use strict";const e=["systemEventKinds"];Object.d
222
222
  __d(function(g,r,i,a,m,_e,d){"use strict";function e(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(_e,'__esModule',{value:!0}),_e.StepperRow=function(e){const h=(0,o.c)(48),{label:x,icon:S,value:p,min:y,max:j,step:C,onChange:I,last:M}=e,_=void 0===C?1:C,P=void 0!==M&&M,{colors:v}=(0,c.useTheme)(),A=p>y,z=p<j;let W;h[0]!==v.background||h[1]!==v.border||h[2]!==v.foreground?(W=(e,o,n)=>(0,b.jsx)(t.default,{accessibilityRole:"button",disabled:!e,onPress:()=>{(0,s.hapticTap)(),n()},style:{width:34,height:34,alignItems:"center",justifyContent:"center",borderRadius:f.RADIUS.md,backgroundColor:v.background,borderWidth:1,borderColor:v.border,opacity:e?1:.4},children:(0,b.jsx)(o,{size:16,color:v.foreground})}),h[0]=v.background,h[1]=v.border,h[2]=v.foreground,h[3]=W):W=h[3];const k=W,w=P?0:1;let G,N,R,D,B,O,T,H,L,U,V,q,E;h[4]!==v.borderSubtle||h[5]!==w?(G={flexDirection:"row",alignItems:"center",gap:f.SPACING.lg,paddingHorizontal:f.SPACING.xl,paddingVertical:f.SPACING.lg,borderBottomWidth:w,borderBottomColor:v.borderSubtle},h[4]=v.borderSubtle,h[5]=w,h[6]=G):G=h[6];h[7]!==S||h[8]!==v.foregroundMuted?(N=S?(0,b.jsx)(S,{size:18,color:v.foregroundMuted}):null,h[7]=S,h[8]=v.foregroundMuted,h[9]=N):N=h[9];h[10]!==v.foreground?(R={flex:1,color:v.foreground,fontSize:15,fontWeight:"500"},h[10]=v.foreground,h[11]=R):R=h[11];h[12]!==x||h[13]!==R?(D=(0,b.jsx)(n.default,{style:R,numberOfLines:1,children:x}),h[12]=x,h[13]=R,h[14]=D):D=h[14];h[15]===Symbol.for("react.memo_cache_sentinel")?(B={flexDirection:"row",alignItems:"center",gap:f.SPACING.md},h[15]=B):B=h[15];h[16]!==y||h[17]!==I||h[18]!==_||h[19]!==p?(O=()=>I(Math.max(y,p-_)),h[16]=y,h[17]=I,h[18]=_,h[19]=p,h[20]=O):O=h[20];h[21]!==k||h[22]!==A||h[23]!==O?(T=k(A,u.Minus,O),h[21]=k,h[22]=A,h[23]=O,h[24]=T):T=h[24];h[25]!==v.foreground?(H={minWidth:28,textAlign:"center",color:v.foreground,fontSize:16,fontWeight:"600"},h[25]=v.foreground,h[26]=H):H=h[26];h[27]!==H||h[28]!==p?(L=(0,b.jsx)(n.default,{style:H,children:p}),h[27]=H,h[28]=p,h[29]=L):L=h[29];h[30]!==j||h[31]!==I||h[32]!==_||h[33]!==p?(U=()=>I(Math.min(j,p+_)),h[30]=j,h[31]=I,h[32]=_,h[33]=p,h[34]=U):U=h[34];h[35]!==k||h[36]!==z||h[37]!==U?(V=k(z,u.Plus,U),h[35]=k,h[36]=z,h[37]=U,h[38]=V):V=h[38];h[39]!==T||h[40]!==L||h[41]!==V?(q=(0,b.jsxs)(l.default,{style:B,children:[T,L,V]}),h[39]=T,h[40]=L,h[41]=V,h[42]=q):q=h[42];h[43]!==q||h[44]!==G||h[45]!==N||h[46]!==D?(E=(0,b.jsxs)(l.default,{style:G,children:[N,D,q]}),h[43]=q,h[44]=G,h[45]=N,h[46]=D,h[47]=E):E=h[47];return E};var o=r(d[0]);r(d[1]);var t=e(r(d[2])),n=e(r(d[3])),l=e(r(d[4])),u=r(d[5]),s=r(d[6]),c=r(d[7]),f=r(d[8]),b=r(d[9])},1167,[787,16,248,194,115,814,817,789,831,10]);
223
223
  __d(function(g,r,i,_a,m,e,_d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"CONTAINER_DEVICE_TYPE",{enumerable:!0,get:function(){return n}}),e.pickerOptionsInOrder=function(n){return[...n.suggested,...n.others]},e.buildPickerGroups=function(c,s,d){const a=new Map(c.map(n=>[n.id,n.name])),p=new Set([n,...s.excludeTypes]),f=t(d),h=[],v=[];for(const n of c){if(null!==s.excludeDeviceId&&n.id===s.excludeDeviceId)continue;if(p.has(n.type))continue;const u=null!==n.parentDeviceId?a.get(n.parentDeviceId)??null:null,c=t(n.location),d={id:n.id,label:o(n),description:l(n,u),location:c};null!==f&&c===f?h.push(d):v.push(d)}return{suggested:u(h),others:u(v)}},e.filterPickerGroups=function(n,t){const o=t.trim().toLowerCase().split(/\s+/).filter(Boolean);if(0===o.length)return n;const l=n=>{const t=`${n.id} ${n.label} ${n.description}`.toLowerCase();return o.every(n=>t.includes(n))};return{suggested:n.suggested.filter(l),others:n.others.filter(l)}},e.resolvePickedOptions=function(n,u){const c=new Map(n.map(n=>[n.id,n]));return u.map(n=>{const u=c.get(n);if(void 0===u)return{id:n,label:`Device #${n}`,description:'',location:null};const s=null!==u.parentDeviceId?c.get(u.parentDeviceId)?.name??null:null;return{id:n,label:o(u),description:l(u,s),location:t(u.location)}})},e.boundOptions=function(n,t){return n.length<=t?{shown:n,hidden:0}:{shown:n.slice(0,t),hidden:n.length-t}};const n='container';function t(n){return'string'==typeof n&&n.length>0?n:null}function o(n){const o=t(n.location);return null!==o?`${n.name} (${o})`:n.name}function l(n,o){const l=[],u=t(n.location);return null!==u&&l.push(u),l.push(n.type),null!==o&&l.push(`in ${o}`),l.join(' \xb7 ')}function u(n){return[...n].sort((n,t)=>n.label.localeCompare(t.label,void 0,{sensitivity:'base'}))}},1168,[]);
224
224
  __d(function(g,r,i,a,m,e,d){"use strict";function n(n,t,o){if('answered'!==o||void 0===t)return n.map(n=>({id:n,removed:!1}));const s=new Map(t.map(n=>[n.id,n.name]));return n.map(n=>{const t=s.get(n);return void 0===t?{id:n,removed:!0}:{id:n,name:t,removed:!1}})}Object.defineProperty(e,'__esModule',{value:!0}),e.deviceListStateOf=function(n){return void 0!==n.data?'answered':n.isError?'failed':'pending'},e.resolveSelectedDevices=n,e.offListSelections=function(t,o,s,c){const u=new Set((o??[]).map(n=>n.id));return n(t.filter(n=>!u.has(n)),s,c)},e.showsNoCamerasHint=function(n,t,o){return'answered'===n&&0===t&&0===o},e.emptyDevicesWidens=function(n,t,o){return n&&0===t&&o}},1169,[]);
225
- __d(function(e,t,i,n,a,r,o){"use strict";Object.defineProperty(r,'__esModule',{value:!0}),Object.defineProperty(r,"APPLE_SA_TO_MACRO",{enumerable:!0,get:function(){return U}}),Object.defineProperty(r,"AUDIO_MACRO_LABELS",{enumerable:!0,get:function(){return _}}),Object.defineProperty(r,"AlarmArmModeSchema",{enumerable:!0,get:function(){return de}}),Object.defineProperty(r,"CLIP_BROKER_PACED_RATES",{enumerable:!0,get:function(){return Oi}}),Object.defineProperty(r,"COCO_TO_MACRO",{enumerable:!0,get:function(){return b}}),Object.defineProperty(r,"CamProfileSchema",{enumerable:!0,get:function(){return c}}),Object.defineProperty(r,"DEFAULT_TIMELAPSE_PREVIEW_TEXT",{enumerable:!0,get:function(){return Or}}),Object.defineProperty(r,"DeviceType",{enumerable:!0,get:function(){return q}}),Object.defineProperty(r,"EVENTFUL_CAP_NAMES",{enumerable:!0,get:function(){return Ai}}),Object.defineProperty(r,"EVENT_KIND_BY_CAP",{enumerable:!0,get:function(){return Ci}}),Object.defineProperty(r,"EVENT_TAXONOMY",{enumerable:!0,get:function(){return re}}),Object.defineProperty(r,"MACRO_LABELS",{enumerable:!0,get:function(){return v}}),Object.defineProperty(r,"NC_ALARM_DELAY_MAX_SEC",{enumerable:!0,get:function(){return xt}}),Object.defineProperty(r,"NC_ALARM_SENSORS_MAX",{enumerable:!0,get:function(){return gi}}),Object.defineProperty(r,"NC_ALARM_SYSTEM_EVENT_KINDS",{enumerable:!0,get:function(){return ze}}),Object.defineProperty(r,"NC_ALARM_TRIGGERED_MAX_SEC",{enumerable:!0,get:function(){return Ot}}),Object.defineProperty(r,"NC_BATTERY_CONSUMABLE_SYSTEM_EVENT_KINDS",{enumerable:!0,get:function(){return he}}),Object.defineProperty(r,"NC_CAMERA_SCOPE_CAP_NAME",{enumerable:!0,get:function(){return aa}}),Object.defineProperty(r,"NC_CONSUMABLE_LOW_PERCENT_DEFAULT",{enumerable:!0,get:function(){return ke}}),Object.defineProperty(r,"NC_CONSUMABLE_LOW_PERCENT_MAX",{enumerable:!0,get:function(){return qe}}),Object.defineProperty(r,"NC_GROUPING_DEFAULT_SEC",{enumerable:!0,get:function(){return tt}}),Object.defineProperty(r,"NC_GROUPING_MAX_SEC",{enumerable:!0,get:function(){return it}}),Object.defineProperty(r,"NC_GROUPING_MIN_SEC",{enumerable:!0,get:function(){return et}}),Object.defineProperty(r,"NC_RULE_EDITOR_SECTION_ORDER",{enumerable:!0,get:function(){return pa}}),Object.defineProperty(r,"NC_RULE_KIND_SPECS",{enumerable:!0,get:function(){return Qn}}),Object.defineProperty(r,"NC_SENSOR_TRANSITION_UNSUPPORTED_REASON",{enumerable:!0,get:function(){return Ga}}),Object.defineProperty(r,"NC_SYSTEM_EVENT_FAMILY_FILTERS",{enumerable:!0,get:function(){return Kn}}),Object.defineProperty(r,"NC_SYSTEM_EVENT_KIND_GROUP_SPECS",{enumerable:!0,get:function(){return Un}}),Object.defineProperty(r,"NC_SYSTEM_EVENT_SUMMARY_FAMILIES",{enumerable:!0,get:function(){return lr}}),Object.defineProperty(r,"NC_TEMPLATE_HELD_BACK_SYSTEM_EVENT_KINDS",{enumerable:!0,get:function(){return nr}}),Object.defineProperty(r,"NC_TEMPLATE_VARS",{enumerable:!0,get:function(){return ir}}),Object.defineProperty(r,"NcAlarmConfigSchema",{enumerable:!0,get:function(){return pi}}),Object.defineProperty(r,"NcAlarmSensorsSchema",{enumerable:!0,get:function(){return fi}}),Object.defineProperty(r,"NcAlarmSettingsPatchSchema",{enumerable:!0,get:function(){return ri}}),Object.defineProperty(r,"NcHistoryEntrySchema",{enumerable:!0,get:function(){return wt}}),Object.defineProperty(r,"NcRuleLastRunsSchema",{enumerable:!0,get:function(){return Pt}}),Object.defineProperty(r,"NodeDirectorySchema",{enumerable:!0,get:function(){return en}}),Object.defineProperty(r,"RECORDING_EXPORT_MAX_READ_BYTES",{enumerable:!0,get:function(){return pn}}),Object.defineProperty(r,"SystemMirror",{enumerable:!0,get:function(){return zn}}),Object.defineProperty(r,"TIMELAPSE_DENSE_FLOOR_SEC",{enumerable:!0,get:function(){return Mr}}),Object.defineProperty(r,"TimelapseRuleSchema",{enumerable:!0,get:function(){return Tr}}),Object.defineProperty(r,"YAMNET_TO_MACRO",{enumerable:!0,get:function(){return K}}),Object.defineProperty(r,"alarmDeviceBlocksArming",{enumerable:!0,get:function(){return Aa}}),Object.defineProperty(r,"alarmDeviceSecureOnArm",{enumerable:!0,get:function(){return wa}}),Object.defineProperty(r,"alarmPatchLanded",{enumerable:!0,get:function(){return Fa}}),Object.defineProperty(r,"conditionVisibleForKind",{enumerable:!0,get:function(){return la}}),Object.defineProperty(r,"createSystemProxy",{enumerable:!0,get:function(){return qn}}),Object.defineProperty(r,"droppedConditionsForKind",{enumerable:!0,get:function(){return ca}}),Object.defineProperty(r,"isHeldBackTemplateVar",{enumerable:!0,get:function(){return ar}}),Object.defineProperty(r,"isSystemRuleKind",{enumerable:!0,get:function(){return Zn}}),Object.defineProperty(r,"kindsForDiscriminator",{enumerable:!0,get:function(){return ea}}),Object.defineProperty(r,"knownValues",{enumerable:!0,get:function(){return Bn}}),Object.defineProperty(r,"nodePickerItems",{enumerable:!0,get:function(){return mr}}),Object.defineProperty(r,"packagePickerItems",{enumerable:!0,get:function(){return yr}}),Object.defineProperty(r,"pickerForCondition",{enumerable:!0,get:function(){return On}}),Object.defineProperty(r,"pickerForRuleClasses",{enumerable:!0,get:function(){return Rn}}),Object.defineProperty(r,"resolveModeDelays",{enumerable:!0,get:function(){return Ea}}),Object.defineProperty(r,"ruleDeviceCompatCapNames",{enumerable:!0,get:function(){return na}}),Object.defineProperty(r,"ruleEditorSectionsForKind",{enumerable:!0,get:function(){return ya}}),Object.defineProperty(r,"ruleGroupingApplies",{enumerable:!0,get:function(){return oa}}),Object.defineProperty(r,"ruleKindOf",{enumerable:!0,get:function(){return ra}}),Object.defineProperty(r,"ruleKindSpec",{enumerable:!0,get:function(){return Xn}}),Object.defineProperty(r,"ruleSeedForSection",{enumerable:!0,get:function(){return ma}}),Object.defineProperty(r,"sensorTransitionNeverFires",{enumerable:!0,get:function(){return Ca}}),Object.defineProperty(r,"sensorTransitionOffered",{enumerable:!0,get:function(){return Ua}}),Object.defineProperty(r,"stateLabel",{enumerable:!0,get:function(){return zr}}),Object.defineProperty(r,"systemEventDeliveryProblems",{enumerable:!0,get:function(){return cr}}),Object.defineProperty(r,"systemEventFilterAppliesToAnyKind",{enumerable:!0,get:function(){return Fn}}),Object.defineProperty(r,"systemEventKindsOfFamily",{enumerable:!0,get:function(){return Gn}}),Object.defineProperty(r,"systemFamilyOfKind",{enumerable:!0,get:function(){return $n}}),Object.defineProperty(r,"templateCarriesSummary",{enumerable:!0,get:function(){return ur}}),Object.defineProperty(r,"templateVarDeliveryApplies",{enumerable:!0,get:function(){return rr}}),Object.defineProperty(r,"templateVarKindApplies",{enumerable:!0,get:function(){return or}}),Object.defineProperty(r,"templateVarSystemEventApplies",{enumerable:!0,get:function(){return sr}});var s=t(o[0]);!(function(){const e=new Float32Array(256);for(let t=0;t<256;t++){const i=255&~t,n=128&i?-1:1,a=i>>4&7;e[t]=n*((8*(15&i)+132<<a)-132)/32768}})(),(function(){const e=new Float32Array(256);for(let t=0;t<256;t++){const i=85^t,n=128&i?1:-1,a=i>>4&7,r=15&i;e[t]=n*(0===a?16*r+8:16*r+264<<a-1)/32768}})();var l=s.z.object({url:s.z.string().min(1),hostNodeId:s.z.string().min(1),expiresAtMs:s.z.number().int().nonnegative(),declaredBytes:s.z.number().int().nonnegative().nullable()}),c=s.z.enum(["high","mid","low"]);s.z.union([c,s.z.literal("auto")]);var d=s.z.enum(["pull-rtsp","pull-rtmp","pull-http","pull-flv","pull-rfc4571","push-annexb","derived"]),u=s.z.object({width:s.z.number().int().positive(),height:s.z.number().int().positive()});s.z.object({camStreamId:s.z.string().min(1),deviceId:s.z.number().int().nonnegative(),kind:d,url:s.z.string().optional(),codec:s.z.string().optional(),resolution:u.optional(),fps:s.z.number().positive().optional(),label:s.z.string().optional(),deviceFeatures:s.z.array(s.z.string()).optional(),autoEligible:s.z.boolean().optional(),profileHint:c.optional(),metadata:s.z.record(s.z.string(),s.z.unknown()).optional()});var m=s.z.enum(["unassigned","idle","connecting","streaming","error"]);s.z.object({deviceId:s.z.number().int().nonnegative(),profile:c,brokerId:s.z.string(),sourceCamStreamId:s.z.string().nullable(),status:m,resolution:u.optional(),codec:s.z.string().optional(),preBufferSec:s.z.number().nonnegative().optional(),errorMessage:s.z.string().optional()}),s.z.object({id:s.z.string(),label:s.z.string(),protocol:s.z.enum(["rtsp","rtmp","annexb","http-mjpeg","webrtc","custom"]),url:s.z.string().optional(),resolution:s.z.object({width:s.z.number(),height:s.z.number()}).readonly().optional(),fps:s.z.number().optional(),bitrate:s.z.number().optional(),codec:s.z.string().optional(),profileHint:c.optional()}),s.z.object({type:s.z.string(),url:s.z.string(),videoCodec:s.z.string().optional(),audioCodec:s.z.string().optional(),metadata:s.z.record(s.z.string(),s.z.unknown()).readonly().optional()}),s.z.object({type:s.z.enum(["video","audio"]),data:s.z.instanceof(Uint8Array),pts:s.z.number(),dts:s.z.number(),keyframe:s.z.boolean(),codec:s.z.string()}),s.z.object({data:s.z.instanceof(Uint8Array),width:s.z.number(),height:s.z.number(),format:s.z.enum(["jpeg","rgb","bgr","yuv420","gray"]),timestamp:s.z.number()}),s.z.object({shmId:s.z.string(),slot:s.z.number().int().nonnegative(),seq:s.z.number().int().nonnegative(),width:s.z.number().int().positive(),height:s.z.number().int().positive(),format:s.z.enum(["jpeg","rgb","bgr","yuv420","gray"]),pts:s.z.number(),byteLength:s.z.number().int().nonnegative(),nodeId:s.z.string(),slotCount:s.z.number().int().positive()});var p=s.z.enum(["rgb","bgr","yuv420","gray"]);s.z.object({brokerId:s.z.string(),format:p,maxFps:s.z.number().positive().optional(),tag:s.z.string().optional()}),s.z.object({subscriptionId:s.z.string(),maxFps:s.z.number().nonnegative()});var g=s.z.enum(["f32le","pcmu","pcma"]);s.z.object({data:s.z.instanceof(Uint8Array),sampleRate:s.z.number().int().positive(),channels:s.z.number().int().positive(),timestamp:s.z.number(),format:g.optional()}),s.z.object({brokerId:s.z.string(),tag:s.z.string().optional(),accept:s.z.array(g).readonly().optional()}),s.z.object({subscriptionId:s.z.string()});var y=s.z.enum(["idle","connecting","streaming","error","stopped"]);s.z.object({status:y,inputFps:s.z.number(),decodeFps:s.z.number(),encodedSubscribers:s.z.number(),decodedSubscribers:s.z.number(),uptimeMs:s.z.number(),bitrateKbps:s.z.number(),idrIntervalMs:s.z.number(),codec:s.z.string().optional(),totalBytes:s.z.number(),packetCount:s.z.number(),rtspClients:s.z.number(),pipeClients:s.z.number(),preBufferSec:s.z.number(),preBufferMs:s.z.number(),preBufferPackets:s.z.number(),decoderNodeId:s.z.string().nullable(),audio:s.z.object({codec:s.z.string(),sampleRate:s.z.number(),channels:s.z.number(),supported:s.z.boolean()}).nullable().optional(),audioMuted:s.z.boolean().optional(),audioMutedDropped:s.z.number().optional()}),s.z.object({profile:c,brokerId:s.z.string(),url:s.z.string(),mutedUrl:s.z.string(),enabled:s.z.boolean(),codec:s.z.string().optional(),resolution:u.optional()});var v=[{id:"person",name:"Person"},{id:"vehicle",name:"Vehicle"},{id:"animal",name:"Animal"},{id:"package",name:"Package"}];new Set(v.map(e=>e.id));var b={mapping:{person:"person",bicycle:"vehicle",car:"vehicle",motorcycle:"vehicle",airplane:"vehicle",bus:"vehicle",train:"vehicle",truck:"vehicle",boat:"vehicle",bird:"animal",cat:"animal",dog:"animal",horse:"animal",sheep:"animal",cow:"animal",elephant:"animal",bear:"animal",zebra:"animal",giraffe:"animal",suitcase:"package",backpack:"package",handbag:"package"},preserveOriginal:!1},f={contact:"entryOpen",binary:"on",switch:"on",motion:"detected",flood:"flooded",gas:"detected",smoke:"detected","carbon-monoxide":"detected",vibration:"detected",tamper:"tampered"};s.z.object({field:s.z.string().min(1),on:s.z.literal("advance")});var z=s.z.object({id:s.z.string(),title:s.z.string(),description:s.z.string().optional(),style:s.z.enum(["card","accordion"]).optional(),defaultCollapsed:s.z.boolean().optional(),columns:s.z.union([s.z.literal(1),s.z.literal(2),s.z.literal(3),s.z.literal(4)]).optional(),tab:s.z.string().optional(),location:s.z.enum(["settings","top-tab"]).optional(),order:s.z.number().optional(),fields:s.z.array(s.z.any())}),h=s.z.object({id:s.z.string(),label:s.z.string(),icon:s.z.string(),order:s.z.number().optional()});function S(e,t,i){return Object.assign({input:e,output:t,kind:i?.kind??"query"},void 0!==i?.auth?{auth:i.auth}:{},void 0!==i?.access?{access:i.access}:{},void 0!==i?.caller?{caller:i.caller}:{},{timeoutMs:i?.timeoutMs})}function k(e,t,i){return Object.assign({},S(e,t,i),{providerOptional:!0})}s.z.object({tabs:s.z.array(h).optional(),sections:s.z.array(z)}).nullable(),s.z.object({deviceId:s.z.number()}),s.z.object({deviceId:s.z.number()}),s.z.object({deviceId:s.z.number(),patch:s.z.record(s.z.string(),s.z.unknown())}),s.z.object({success:s.z.literal(!0)}),s.z.object({deviceId:s.z.number()}),s.z.unknown().nullable();var q=(function(e){return e.Camera="camera",e.Hub="hub",e.Light="light",e.Siren="siren",e.Switch="switch",e.Sensor="sensor",e.Thermostat="thermostat",e.Climate="climate",e.Button="button",e.EventEmitter="event-emitter",e.Update="update",e.Generic="generic",e.Notifier="notifier",e.Script="script",e.Automation="automation",e.Lock="lock",e.Cover="cover",e.Valve="valve",e.Humidifier="humidifier",e.WaterHeater="water-heater",e.Fan="fan",e.MediaPlayer="media-player",e.AlarmPanel="alarm-panel",e.Control="control",e.Presence="presence",e.Weather="weather",e.Vacuum="vacuum",e.LawnMower="lawn-mower",e.Container="container",e.Image="image",e.PetFeeder="pet-feeder",e})({}),C=s.z.enum(["image","video","gif","audio","icon"]),A=s.z.object({mediaType:C,url:s.z.string().optional(),bytes:s.z.instanceof(Uint8Array).optional(),mime:s.z.string().optional(),name:s.z.string().optional()}).refine(e=>void 0!==e.url||void 0!==e.bytes,{message:"Attachment requires either `url` or `bytes`"}),w=s.z.enum(["text","markdown","html"]),M=s.z.enum(["acknowledge","dismiss","silence","snooze","view","play","open","close","lock","unlock","arm","arm-home","arm-away","arm-night","disarm","light","alert","camera"]),D=s.z.object({id:s.z.string(),label:s.z.string(),url:s.z.string().optional(),icon:M.optional(),destructive:s.z.boolean().optional(),mode:s.z.enum(["navigate","background"]).optional()}),P=s.z.object({body:s.z.string(),title:s.z.string().optional(),format:w.default("text"),priority:s.z.number().int().min(1).max(5).default(3),level:s.z.string().optional(),attachments:s.z.array(A).optional(),clickUrl:s.z.string().optional(),actions:s.z.array(D).optional(),sound:s.z.string().optional(),ttl:s.z.number().optional(),tag:s.z.string().optional(),deviceId:s.z.number().optional(),eventId:s.z.string().optional(),metadata:s.z.record(s.z.string(),s.z.unknown()).optional()}),I=s.z.object({id:s.z.string(),label:s.z.string(),ordinal:s.z.number().int().min(1).max(5).nullable(),flags:s.z.object({critical:s.z.boolean().optional(),silent:s.z.boolean().optional(),noPush:s.z.boolean().optional()}).optional(),requires:s.z.array(s.z.string()).optional(),description:s.z.string().optional()}),E=s.z.object({mediaTypes:s.z.array(C),mode:s.z.enum(["url","bytes","both"]),max:s.z.number().int().nonnegative(),maxBytes:s.z.number().int().positive().optional()}),j=s.z.object({attachments:E,actions:s.z.number().int().nonnegative(),actionIcons:s.z.boolean().optional(),levels:s.z.array(I),format:s.z.array(w),clickUrl:s.z.boolean(),sound:s.z.boolean(),ttl:s.z.boolean(),bodyMaxLen:s.z.number().int().positive()}),x=s.z.unknown(),O=s.z.object({kind:s.z.string(),label:s.z.string(),icon:s.z.string(),addonId:s.z.string(),iconUrl:s.z.string().optional(),iconMediaType:s.z.string().optional(),configSchema:x,destinationKeys:s.z.array(s.z.string()).optional(),supportsDiscovery:s.z.boolean(),caps:j}),T=s.z.object({id:s.z.string(),name:s.z.string(),kind:s.z.string(),addonId:s.z.string(),enabled:s.z.boolean(),config:s.z.record(s.z.string(),s.z.unknown())}),R=s.z.object({kind:s.z.string(),suggestedName:s.z.string(),config:s.z.record(s.z.string(),s.z.unknown())}),B=s.z.object({level:s.z.string(),format:w,attachmentsSent:s.z.number().int().nonnegative(),actionsSent:s.z.number().int().nonnegative(),truncated:s.z.boolean(),dropped:s.z.array(s.z.string())}),L=s.z.object({success:s.z.boolean(),error:s.z.string().optional(),renderedAs:B.optional()}),F=L,N=s.z.object({ok:s.z.boolean(),resolvedUrl:s.z.string(),httpStatus:s.z.number().int().optional(),stateInstance:s.z.string().optional(),error:s.z.string().optional()});S(s.z.object({}),s.z.array(O)),S(s.z.object({}),s.z.array(T),{auth:"admin"}),S(s.z.object({targetId:s.z.string()}),T,{auth:"admin"}),S(s.z.object({kind:s.z.string(),config:s.z.record(s.z.string(),s.z.unknown()).optional(),targetId:s.z.string().optional()}),s.z.array(R),{auth:"admin"}),S(s.z.object({kind:s.z.string(),config:s.z.record(s.z.string(),s.z.unknown()),targetId:s.z.string().optional()}),N,{kind:"mutation",auth:"admin"}),S(s.z.object({targetId:s.z.string(),notification:P}),L,{kind:"mutation",auth:"admin"}),S(s.z.object({targetId:s.z.string(),sample:P.optional()}),F,{kind:"mutation",auth:"admin"}),S(s.z.object({target:T,cloneSecretsFrom:s.z.string().optional()}),T,{kind:"mutation",auth:"admin"}),S(s.z.object({targetId:s.z.string()}),s.z.void(),{kind:"mutation",auth:"admin"}),S(s.z.object({targetId:s.z.string(),enabled:s.z.boolean()}),s.z.void(),{kind:"mutation",auth:"admin"});var _=[{id:"speech",name:"Speech"},{id:"scream",name:"Scream / Shout"},{id:"crying",name:"Crying / Baby"},{id:"laughter",name:"Laughter"},{id:"music",name:"Music"},{id:"dog",name:"Dog"},{id:"cat",name:"Cat"},{id:"bird",name:"Bird"},{id:"animal",name:"Animal (other)"},{id:"alarm",name:"Alarm / Siren"},{id:"doorbell",name:"Doorbell / Knock"},{id:"glass_breaking",name:"Glass Breaking"},{id:"gunshot",name:"Gunshot / Explosion"},{id:"vehicle",name:"Vehicle"},{id:"siren",name:"Emergency Siren"},{id:"fire",name:"Fire / Smoke"},{id:"water",name:"Water"},{id:"wind",name:"Wind / Weather"},{id:"door",name:"Door"},{id:"footsteps",name:"Footsteps"},{id:"crowd",name:"Crowd / Chatter"},{id:"telephone",name:"Telephone"},{id:"engine",name:"Engine / Motor"},{id:"tools",name:"Tools / Construction"},{id:"silence",name:"Silence"}],K={mapping:{Speech:"speech","Child speech, kid speaking":"speech",Conversation:"speech","Narration, monologue":"speech",Babbling:"speech",Whispering:"speech","Speech synthesizer":"speech",Humming:"speech",Rapping:"speech",Singing:"speech",Choir:"speech","Child singing":"speech",Shout:"scream",Bellow:"scream",Yell:"scream",Screaming:"scream","Children shouting":"scream",Whoop:"scream","Crying, sobbing":"crying","Baby cry, infant cry":"crying",Whimper:"crying","Wail, moan":"crying",Groan:"crying",Laughter:"laughter","Baby laughter":"laughter",Giggle:"laughter",Snicker:"laughter","Belly laugh":"laughter","Chuckle, chortle":"laughter",Music:"music","Musical instrument":"music",Guitar:"music",Piano:"music",Drum:"music","Drum kit":"music","Violin, fiddle":"music",Flute:"music",Saxophone:"music",Trumpet:"music",Synthesizer:"music","Pop music":"music","Rock music":"music","Hip hop music":"music","Classical music":"music",Jazz:"music","Electronic music":"music","Background music":"music",Dog:"dog",Bark:"dog",Yip:"dog",Howl:"dog","Bow-wow":"dog",Growling:"dog","Whimper (dog)":"dog",Cat:"cat",Purr:"cat",Meow:"cat",Hiss:"cat",Caterwaul:"cat",Bird:"bird","Bird vocalization, bird call, bird song":"bird","Chirp, tweet":"bird",Squawk:"bird",Crow:"bird",Owl:"bird","Pigeon, dove":"bird",Animal:"animal","Domestic animals, pets":"animal","Livestock, farm animals, working animals":"animal",Horse:"animal","Cattle, bovinae":"animal",Pig:"animal",Sheep:"animal",Goat:"animal",Frog:"animal",Insect:"animal",Cricket:"animal",Alarm:"alarm","Alarm clock":"alarm","Smoke detector, smoke alarm":"alarm","Fire alarm":"alarm",Buzzer:"alarm","Civil defense siren":"alarm","Car alarm":"alarm",Siren:"siren","Police car (siren)":"siren","Ambulance (siren)":"siren","Fire engine, fire truck (siren)":"siren","Emergency vehicle":"siren",Foghorn:"siren",Doorbell:"doorbell","Ding-dong":"doorbell",Knock:"doorbell",Tap:"doorbell",Glass:"glass_breaking",Shatter:"glass_breaking","Chink, clink":"glass_breaking","Gunshot, gunfire":"gunshot","Machine gun":"gunshot",Explosion:"gunshot",Fireworks:"gunshot",Firecracker:"gunshot","Artillery fire":"gunshot","Cap gun":"gunshot",Boom:"gunshot",Vehicle:"vehicle",Car:"vehicle",Truck:"vehicle",Bus:"vehicle",Motorcycle:"vehicle","Car passing by":"vehicle","Vehicle horn, car horn, honking":"vehicle","Traffic noise, roadway noise":"vehicle",Train:"vehicle",Aircraft:"vehicle",Helicopter:"vehicle",Bicycle:"vehicle",Skateboard:"vehicle",Fire:"fire",Crackle:"fire",Water:"water",Rain:"water",Raindrop:"water","Rain on surface":"water",Stream:"water",Waterfall:"water",Ocean:"water","Waves, surf":"water","Splash, splatter":"water",Wind:"wind",Thunderstorm:"wind",Thunder:"wind","Wind noise (microphone)":"wind","Rustling leaves":"wind",Door:"door","Sliding door":"door",Slam:"door","Cupboard open or close":"door","Walk, footsteps":"footsteps",Run:"footsteps",Shuffle:"footsteps",Crowd:"crowd",Chatter:"crowd",Cheering:"crowd",Applause:"crowd","Children playing":"crowd","Hubbub, speech noise, speech babble":"crowd",Telephone:"telephone","Telephone bell ringing":"telephone",Ringtone:"telephone","Telephone dialing, DTMF":"telephone","Busy signal":"telephone",Engine:"engine","Engine starting":"engine",Idling:"engine","Accelerating, revving, vroom":"engine","Light engine (high frequency)":"engine","Medium engine (mid frequency)":"engine","Heavy engine (low frequency)":"engine","Lawn mower":"engine",Chainsaw:"engine",Hammer:"tools",Jackhammer:"tools",Sawing:"tools","Power tool":"tools",Drill:"tools",Sanding:"tools",Silence:"silence"},preserveOriginal:!1},U={mapping:{speech:"speech",child_speech:"speech",conversation:"speech",whispering:"speech",singing:"speech",humming:"speech",shout:"scream",yell:"scream",screaming:"scream",crying:"crying",baby_crying:"crying",sobbing:"crying",laughter:"laughter",baby_laughter:"laughter",giggling:"laughter",music:"music",guitar:"music",piano:"music",drums:"music",dog_bark:"dog",dog_bow_wow:"dog",dog_growling:"dog",dog_howl:"dog",cat_meow:"cat",cat_purr:"cat",cat_hiss:"cat",bird:"bird",bird_chirp:"bird",bird_squawk:"bird",animal:"animal",horse:"animal",cow_moo:"animal",insect:"animal",alarm:"alarm",smoke_alarm:"alarm",fire_alarm:"alarm",car_alarm:"alarm",siren:"siren",police_siren:"siren",ambulance_siren:"siren",doorbell:"doorbell",door_knock:"doorbell",knocking:"doorbell",glass_breaking:"glass_breaking",glass_shatter:"glass_breaking",gunshot:"gunshot",explosion:"gunshot",fireworks:"gunshot",car:"vehicle",truck:"vehicle",motorcycle:"vehicle",car_horn:"vehicle",vehicle_horn:"vehicle",traffic:"vehicle",fire:"fire",fire_crackle:"fire",water:"water",rain:"water",ocean:"water",splash:"water",wind:"wind",thunder:"wind",thunderstorm:"wind",door:"door",door_slam:"door",sliding_door:"door",footsteps:"footsteps",walking:"footsteps",running:"footsteps",crowd:"crowd",chatter:"crowd",cheering:"crowd",applause:"crowd",telephone_ring:"telephone",ringtone:"telephone",engine:"engine",engine_starting:"engine",lawn_mower:"engine",chainsaw:"engine",hammer:"tools",jackhammer:"tools",drill:"tools",power_tool:"tools",silence:"silence"},preserveOriginal:!1},G=new Map;for(const[e,t]of Object.entries(K.mapping))G.set(e.toLowerCase(),t);for(const[e,t]of Object.entries(U.mapping))G.set(e.toLowerCase(),t);var H="#f59e0b",W="#06b6d4",V="#22c55e",Z="#3b82f6",$="#f97316",J="#a855f7",Y="#8b5cf6",Q="#10b981",X="#64748b",ee={car:"#f59e0b",truck:"#d97706",bus:"#b45309",motorcycle:"#eab308",bicycle:"#ca8a04",airplane:"#60a5fa",boat:"#2563eb",train:"#1d4ed8",bird:"#14b8a6",dog:"#84cc16",cat:"#f97316",horse:"#a16207",sheep:"#a3a3a3",cow:"#78716c",elephant:"#6b7280",bear:"#7c2d12",zebra:"#404040",giraffe:"#d4a373"};function te(e){return e.split(/[-_ ]/).filter(e=>e.length>0).map(e=>e.charAt(0).toUpperCase()+e.slice(1)).join(" ")}var ie=new Map;function ne(e,t,i,n,a){ie.set(e,{kind:e,parentKind:null,level:"macro",category:t,color:i,iconId:n,labelKey:`eventKind.${e}`,label:a})}function ae(e,t,i,n,a,r){ie.set(e,{kind:e,parentKind:t,level:"sub",category:i,color:n,iconId:a,labelKey:`eventKind.${e}`,label:r})}ne("motion","motion",H,"motion","Motion"),ne("audio","audio",W,"audio","Audio"),ne("person","detection",V,"person","Person"),ne("vehicle","detection",Z,"vehicle","Vehicle"),ne("animal","detection",$,"animal","Animal"),ne("package","package",J,"package","Package"),ne("sensor","sensor",Y,"sensor","Sensor"),ne("control","control",Q,"control","Control");for(const[e,t]of Object.entries(b.mapping))"vehicle"!==t&&"animal"!==t||ie.has(e)||ae(e,t,"detection",ee[e]??X,e,te(e));ae("package-delivered","package","package",J,"package","Package delivered"),ae("package-picked-up","package","package",J,"package","Package picked up"),ae("contact","sensor","sensor","#f59e0b","door","Contact"),ae("motion-sensor","sensor","sensor",Y,"pir","Motion sensor"),ae("smoke","sensor","sensor","#ef4444","smoke","Smoke"),ae("flood","sensor","sensor","#3b82f6","water","Water leak"),ae("gas","sensor","sensor","#ef4444","gas","Gas"),ae("carbon-monoxide","sensor","sensor","#dc2626","smoke","Carbon monoxide"),ae("vibration","sensor","sensor","#eab308","vibration","Vibration"),ae("tamper","sensor","sensor","#f97316","tamper","Tamper"),ae("presence","sensor","sensor","#22c55e","presence","Presence"),ae("enum-sensor","sensor","sensor",Y,"generic","Sensor state"),ae("device-event","sensor","sensor","#10b981","button","Device event"),ae("lock","control","control","#0ea5e9","lock","Lock"),ae("cover","control","control","#0ea5e9","door","Cover"),ae("switch","control","control",Q,"switch","Switch"),ae("siren","control","control","#dc2626","siren","Siren"),ae("button","control","control","#10b981","button","Button"),ae("doorbell","control","control","#a855f7","doorbell","Doorbell");for(const e of _){const t=`audio-${e.id}`;ie.has(t)||ae(t,"audio","audio",W,t,e.name)}var re=Object.freeze(Object.fromEntries(ie)),oe=s.z.object({kind:s.z.string(),label:s.z.string(),parentKind:s.z.string().nullable()}),se=s.z.object({videoClasses:s.z.array(oe),audioKinds:s.z.array(oe),labels:s.z.array(oe)});function le(e,t,i){return{kind:e,label:t,parentKind:i}}Object.freeze((function(){const e=Object.values(re);return{videoClasses:e.filter(e=>"detection"===e.category).map(e=>le(e.kind,e.label,e.parentKind)),audioKinds:e.filter(e=>"audio"===e.category&&"sub"===e.level).map(e=>le(e.kind,e.label,e.parentKind)),labels:e.filter(e=>"sensor"===e.category||"control"===e.category).map(e=>le(e.kind,e.label,e.parentKind))}})());var ce=s.z.enum(["disarmed","armed_home","armed_away","armed_night","armed_vacation","armed_custom_bypass","arming","disarming","pending","triggered"]),de=s.z.enum(["home","away","night","vacation","custom_bypass"]);s.z.object({state:ce,targetMode:de.nullable().optional(),availableModes:s.z.array(de),requiresCode:s.z.boolean(),lastChangedAt:s.z.number()}),q.AlarmPanel,S(s.z.object({deviceId:s.z.number().int().nonnegative(),mode:de,code:s.z.string().min(1).optional()}),s.z.void(),{kind:"mutation",auth:"protected"}),S(s.z.object({deviceId:s.z.number().int().nonnegative(),code:s.z.string().min(1).optional()}),s.z.void(),{kind:"mutation",auth:"protected"}),S(s.z.object({deviceId:s.z.number().int().nonnegative()}),s.z.void(),{kind:"mutation",auth:"protected"});var ue=s.z.object({x:s.z.number(),y:s.z.number()}),me=s.z.object({kind:s.z.literal("rect"),x:s.z.number(),y:s.z.number(),width:s.z.number(),height:s.z.number()}),pe=s.z.object({kind:s.z.literal("polygon"),points:s.z.array(ue)}),ge=s.z.object({kind:s.z.literal("grid"),gridWidth:s.z.number(),gridHeight:s.z.number(),cells:s.z.array(s.z.boolean())}),ye=s.z.object({kind:s.z.literal("line"),points:s.z.array(ue)});s.z.discriminatedUnion("kind",[me,pe,ge,ye]),s.z.enum(["rect","polygon","grid","line"]),s.z.object({min:s.z.number(),max:s.z.number()}),s.z.object({width:s.z.number(),height:s.z.number()});var ve=s.z.enum(["immediate","track-end","device-event","package-event","system-event"]),be=s.z.enum(["device-online","device-offline","device-disabled","device-enabled","device-battery-low","device-battery-normal","device-consumable-low","device-consumable-normal","device-tank-low","device-tank-full","device-tank-normal","stream-online","stream-offline","node-online","node-offline","node-restarting","node-updating","node-inference-unavailable","detection-blind","addon-crash-loop","addon-update-available","server-update-available","wrapper-update-available","alarm-triggered","alarm-armed","alarm-disarmed","alarm-arming","alarm-arm-refused","alarm-pending","alarm-rearmed","alarm-sensor-bypass","alarm-check-failed","addon-updated","server-updated","export-completed","backup-completed","camera-online","camera-offline","camera-disabled","camera-enabled"]),fe=new Set(["camera-online","camera-offline","camera-disabled","camera-enabled"]);be.options.filter(e=>!fe.has(e));var ze=["alarm-arm-refused","alarm-check-failed","alarm-arming","alarm-armed","alarm-pending","alarm-triggered","alarm-rearmed","alarm-sensor-bypass","alarm-disarmed"],he=["device-battery-low","device-battery-normal","device-consumable-low","device-consumable-normal"],Se=["device-consumable-low","device-consumable-normal"],ke=15,qe=95,Ce=s.z.object({kinds:s.z.array(be).min(1),deviceIds:s.z.array(s.z.number().int()).min(1).optional(),deviceTypes:s.z.array(s.z.string().min(1)).min(1).optional(),excludeDeviceIds:s.z.array(s.z.number().int()).min(1).optional(),nodeIds:s.z.array(s.z.string().min(1)).min(1).optional(),packageNames:s.z.array(s.z.string().min(1)).min(1).optional(),consumableLowPercent:s.z.number().int().min(1).max(95).optional()}),Ae=s.z.object({days:s.z.array(s.z.number().int().min(0).max(6)).min(1),startMinute:s.z.number().int().min(0).max(1439),endMinute:s.z.number().int().min(0).max(1439)}),we=s.z.object({windows:s.z.array(Ae).min(1),timezone:s.z.string().optional(),invert:s.z.boolean().optional()}),Me=s.z.enum(["instant","summary"]),De=s.z.enum(["rule","section"]),Pe=s.z.discriminatedUnion("mode",[s.z.object({mode:s.z.literal("instant")}),s.z.object({mode:s.z.literal("summary"),schedule:we,split:De.optional()})]),Ie=s.z.object({values:s.z.array(s.z.string().min(1)),maxDistance:s.z.number().int().min(0).max(3).default(1)}),Ee=s.z.object({zoneId:s.z.string().optional(),className:s.z.string().optional(),op:s.z.enum(["became-occupied","became-free",">=","<="]).default("became-occupied"),count:s.z.number().int().min(0).default(1),sustainSeconds:s.z.number().int().min(0).max(3600).default(15)}),je=s.z.object({labels:s.z.array(s.z.string().min(1)).min(1).optional(),dbThreshold:s.z.number().min(-96).max(0).optional(),hitPercent:s.z.number().int().min(1).max(100).default(60),samplingSeconds:s.z.number().int().min(1).max(300).default(10),confirmHits:s.z.number().int().min(1).max(20).optional(),confirmWindowSec:s.z.number().int().min(1).max(60).optional()}),xe=s.z.enum(["enter","exit","any"]),Oe=s.z.enum(["raised","cleared"]),Te=s.z.object({ids:s.z.array(s.z.string().min(1)).min(1),match:s.z.enum(["any","all"]).optional()}),Re=s.z.discriminatedUnion("kind",[s.z.object({kind:s.z.literal("wait"),seconds:s.z.number().min(0).max(300)}),s.z.object({kind:s.z.literal("cap"),deviceId:s.z.number().int(),cap:s.z.string().min(1),method:s.z.string().min(1),args:s.z.record(s.z.string(),s.z.unknown()).optional()})]),Be=s.z.object({id:s.z.string().min(1),name:s.z.string().min(1).max(120),minDelaySec:s.z.number().int().min(0).max(86400).optional(),actions:s.z.array(Re).min(1)}),Le=s.z.object({name:s.z.string().min(1).max(120),minDelaySec:s.z.number().int().min(0).max(86400).optional(),actions:s.z.array(Re).min(1)}),Fe=s.z.discriminatedUnion("kind",[s.z.object({kind:s.z.literal("sequence"),sequenceId:s.z.string().min(1)}),s.z.object({kind:s.z.literal("do"),action:Re})]),Ne=s.z.array(Fe).max(4),_e=s.z.object({id:s.z.string().min(1).max(64),label:s.z.string().min(1).max(40),sequenceId:s.z.string().min(1),icon:M.optional(),destructive:s.z.boolean().optional()}),Ke=s.z.object({onActivation:Ne.optional(),onDeactivation:Ne.optional(),onTrigger:Ne.optional(),onTriggerOff:Ne.optional(),buttons:s.z.array(_e).max(8).optional()});s.z.object({name:s.z.string().min(1).max(120),enabled:s.z.boolean(),minDelaySec:s.z.number().int().min(0).max(86400).optional(),actions:s.z.array(Re).min(1)});var Ue=s.z.object({deviceId:s.z.number().int(),states:s.z.array(s.z.string().min(1)).min(1)}),Ge=s.z.object({sceneId:s.z.string().min(1),deviceId:s.z.number().int().optional(),requiredState:s.z.enum(["matched","diverged"]),latched:s.z.boolean().optional()}),He=s.z.object({deviceState:Ue.optional(),scene:Ge.optional(),devices:s.z.array(s.z.number()).optional(),devicesExclude:s.z.array(s.z.number()).min(1).optional(),classes:s.z.array(s.z.string().min(1)).optional(),classesExclude:s.z.array(s.z.string().min(1)).optional(),minConfidence:s.z.number().min(0).max(1).optional(),zones:Te.optional(),zonesExclude:s.z.array(s.z.string().min(1)).optional(),crossing:xe.optional(),labelEquals:s.z.array(s.z.string().min(1)).optional(),identities:s.z.array(s.z.string().min(1)).optional(),plates:Ie.optional(),identitiesExclude:s.z.array(s.z.string().min(1)).optional(),minImportance:s.z.number().min(0).max(1).optional(),minDwellSeconds:s.z.number().min(0).optional(),source:s.z.enum(["pipeline","onboard","sensor","audio","any"]).optional(),minLabelConfidence:s.z.number().min(0).max(1).optional(),eventTypeTokens:s.z.array(s.z.string().min(1)).optional(),sensorKinds:s.z.array(s.z.string().min(1)).optional(),sensorTransition:Oe.optional(),packagePhase:s.z.enum(["delivered","picked-up","both"]).optional(),systemEvent:Ce.optional(),customZones:s.z.array(pe).optional(),occupancy:Ee.optional(),audio:je.optional()}),We=s.z.object({targetId:s.z.string().min(1),params:s.z.record(s.z.string(),s.z.unknown()).optional()}),Ve=s.z.enum(["cropped","full","boxed"]),Ze=s.z.enum(["mosaic","each"]),$e=s.z.object({attach:s.z.enum(["best","best-matching","keyFrame","none"]).default("best"),frame:Ve.optional(),zoneCrop:s.z.boolean().optional(),gif:s.z.boolean().optional(),clip:s.z.boolean().optional(),clipPreRollSec:s.z.number().int().min(0).max(30).optional(),clipPostRollSec:s.z.number().int().min(0).max(30).optional(),clipSpeed:s.z.number().min(1).max(8).optional(),profile:c.optional(),linkedCameras:Ze.optional()}),Je=s.z.enum(["shared","per-class"]),Ye=s.z.object({cooldownSec:s.z.number().int().min(0).max(86400).default(60),scope:s.z.enum(["rule","rule-device"]).default("rule-device"),granularity:Je.optional()}),Qe=s.z.object({op:s.z.enum([">=",">","<=","<","=="]),count:s.z.number().int().min(0).max(1e3)}),Xe=s.z.object({enabled:s.z.boolean().default(!1),profileId:s.z.string().optional(),prompt:s.z.string().max(1e3).optional(),expect:Qe.optional(),timeoutMs:s.z.number().int().min(1e3).max(2e4).default(8e3),onTimeout:s.z.enum(["fire","suppress"]).default("fire"),maxImagePx:s.z.number().int().min(64).max(2048).default(448)}),et=5,tt=20,it=60,nt=s.z.object({name:s.z.string().min(1).max(200),enabled:s.z.boolean().default(!0),delivery:ve,conditions:He.default({}),schedule:we.optional(),systemEventDelivery:Pe.optional(),targets:s.z.array(We),targetUsers:s.z.array(s.z.string()).optional(),media:$e.default({attach:"best"}),throttle:Ye.default({cooldownSec:60,scope:"rule-device"}),template:s.z.object({title:s.z.string().max(500).optional(),body:s.z.string().max(2e3).optional()}).optional(),priority:s.z.number().int().min(1).max(5).default(3),ownerUserId:s.z.string().optional(),snoozeAllowGlobal:s.z.boolean().optional(),snoozeOptions:s.z.array(s.z.number().int().min(1).max(1440)).max(4).optional(),actions:Ke.optional(),confirm:Xe.optional(),groupingSec:s.z.number().int().min(5).max(60).optional()}),at=nt.partial().extend({disabledTargetIds:s.z.array(s.z.string()).optional(),enabled:s.z.boolean().optional(),conditions:He.optional(),media:$e.optional(),throttle:Ye.optional(),priority:s.z.number().int().min(1).max(5).optional()}),rt=s.z.enum(["template","schedule","targetUsers","snoozeOptions","snoozeAllowGlobal","actions","confirm","groupingSec","waitForEnhancement","groupIdleSec"]),ot=s.z.object({ruleId:s.z.string(),patch:at,clear:s.z.array(rt).optional()}),st=nt.extend({id:s.z.string(),createdBy:s.z.string(),createdAt:s.z.number(),updatedAt:s.z.number(),disabledTargetIds:s.z.array(s.z.string()).default([])}),lt=s.z.enum(["device-state","streams","battery","consumables","tanks","detection-blind","nodes","addons","addon-updates","updates"]),ct=s.z.object({id:lt,status:s.z.enum(["read","unavailable"]),items:s.z.number().int().nonnegative(),reason:s.z.string().optional()}),dt=s.z.object({section:lt.optional(),title:s.z.string(),text:s.z.string(),count:s.z.number().int().nonnegative()}),ut=s.z.object({empty:s.z.boolean(),count:s.z.number().int().nonnegative(),text:s.z.string(),sections:s.z.array(ct),dropped:s.z.record(s.z.string(),s.z.number().int().nonnegative()),excludedGroups:s.z.array(s.z.string()),split:De.optional(),rows:s.z.array(dt).optional()}),mt=s.z.object({recordId:s.z.string(),recordKind:s.z.enum(["object-event","track","device-event","package-event","system-event"]),deviceId:s.z.number(),timestamp:s.z.number(),wouldFire:s.z.boolean(),failedCondition:s.z.string().optional(),className:s.z.string().optional(),label:s.z.string().optional()}),pt=s.z.enum(["detection","sensor","occupancy","sound","device-events","system","alarm","mixed"]),gt=s.z.enum(["detection","sensor","occupancy","sound","system"]),yt=s.z.enum(["rule","timelapse","summary"]),vt=s.z.enum(["title","body","previewText","captionText"]),bt=s.z.enum(["subject","place","time","rule","occupancy","sound","sensor","system","digest","ai"]),ft=s.z.object({name:s.z.string().regex(/^\w+$/),label:s.z.string(),description:s.z.string().optional(),example:s.z.string(),group:bt,families:s.z.array(yt).min(1),fields:s.z.array(vt).optional(),kinds:s.z.array(gt).optional(),deliveries:s.z.array(ve).optional(),systemEventKinds:s.z.array(be).optional(),systemEventDeliveries:s.z.array(Me).optional(),dynamic:s.z.object({prefix:s.z.literal("count_"),from:s.z.literal("classes")}).optional()}),zt=s.z.object({family:yt,field:vt,kind:pt.optional(),delivery:ve.optional(),systemEventKinds:s.z.array(be).optional(),systemEventDelivery:Me.optional()}),ht=s.z.object({context:zt,template:s.z.object({title:s.z.string().max(500).optional(),body:s.z.string().max(2e3).optional()})}),St=s.z.object({title:s.z.string().nullable(),body:s.z.string().nullable(),unknown:s.z.array(s.z.string())}),kt=s.z.object({id:s.z.string(),group:s.z.enum(["scope","class","zones","quality","label","schedule","device","package","occupancy","audio","system"]),label:s.z.string(),valueType:s.z.enum(["deviceIdList","deviceIdExcludeList","stringList","number01","number","sourceSelect","zoneSelection","zoneIdList","schedule","plateMatcher","packagePhase","crossingSelect","sensorTransition","polygonDraw","occupancy","audio","deviceState","scene","systemEvent"]),operator:s.z.enum(["in","notIn","anyOf","allOf","gte","fuzzyIn","withinSchedule"]),appliesTo:s.z.array(ve),phase:s.z.string(),description:s.z.string().optional(),options:s.z.array(s.z.object({value:s.z.string(),label:s.z.string(),hint:s.z.string().optional()})).readonly().optional()}),qt=s.z.enum(["pending","sent","dead"]),Ct=s.z.enum(["object-event","track-end","device-event","package-event","system-event"]),At=s.z.object({className:s.z.string(),label:s.z.string().optional(),confidence:s.z.number().optional(),zones:s.z.array(s.z.string()),timestamp:s.z.number(),systemEvent:s.z.object({kind:be,subject:s.z.string(),title:s.z.string(),body:s.z.string(),data:s.z.record(s.z.string(),s.z.unknown())}).optional()}),wt=s.z.object({id:s.z.string(),ruleId:s.z.string(),ruleName:s.z.string(),delivery:ve,targetId:s.z.string(),deviceId:s.z.number(),recordKind:Ct,recordId:s.z.string(),trackId:s.z.string().optional(),status:qt,attempts:s.z.number().int(),createdAt:s.z.number(),updatedAt:s.z.number(),error:s.z.string().optional(),subject:At,artifactIds:s.z.array(s.z.string().min(1)).optional()}),Mt=s.z.object({ruleId:s.z.string().optional(),deviceId:s.z.number().optional(),status:qt.optional(),since:s.z.number().optional(),until:s.z.number().optional(),limit:s.z.number().int().min(1).max(500).default(100)}),Dt=s.z.object({ruleId:s.z.string(),lastAt:s.z.number(),status:qt,deviceId:s.z.number()}),Pt=s.z.object({runs:s.z.array(Dt),horizonMs:s.z.number().nonnegative().nullable()}),It=s.z.enum(["rule","device","all"]),Et=s.z.object({scope:It,ruleId:s.z.string().optional(),deviceId:s.z.number().int().optional(),classes:s.z.array(s.z.string().min(1)).min(1).optional(),durationMinutes:s.z.number().int().min(1).max(1440),global:s.z.boolean().optional(),summary:s.z.boolean().optional()}),jt=s.z.object({id:s.z.string(),userId:s.z.string(),scope:It,ruleId:s.z.string().optional(),deviceId:s.z.number().int().optional(),classes:s.z.array(s.z.string().min(1)).min(1).optional(),startedAt:s.z.number(),expiresAt:s.z.number(),global:s.z.boolean(),summary:s.z.boolean(),digestSentAt:s.z.number().optional()});s.z.object({snoozeId:s.z.string(),targetId:s.z.string(),ruleId:s.z.string(),ruleName:s.z.string(),deviceId:s.z.number().int(),count:s.z.number().int(),firstAt:s.z.number(),lastAt:s.z.number()});var xt=600,Ot=3600,Tt=s.z.number().int().min(0).max(600),Rt=s.z.number().int().min(0).max(Ot),Bt=e=>new Set(e.map(e=>e.mode)).size===e.length,Lt=s.z.enum(["rearmAfter","disableAfter","doNothing"]),Ft=s.z.object({mode:de,exitDelaySec:Tt.optional(),entryDelaySec:Tt.optional(),triggeredDurationSec:Rt.optional(),postTriggeredAction:Lt.optional(),schedule:we.optional(),notifyDuringEntryDelay:s.z.boolean().optional(),notifySensorRewatched:s.z.boolean().optional()}),Nt=s.z.array(Ft).max(8).refine(Bt,{message:"modeDelays: at most one entry per arm mode"}),_t=s.z.object({mode:de,exitDelaySec:Tt.nullable().optional(),entryDelaySec:Tt.nullable().optional(),triggeredDurationSec:Rt.nullable().optional(),postTriggeredAction:Lt.nullable().optional(),schedule:we.nullable().optional(),notifyDuringEntryDelay:s.z.boolean().nullable().optional(),notifySensorRewatched:s.z.boolean().nullable().optional()}),Kt=s.z.array(_t).max(8).refine(Bt,{message:"modeDelays: at most one edit per arm mode"}),Ut=s.z.object({mode:de,deviceId:s.z.number().int().positive(),nonBlocking:s.z.boolean()}),Gt=s.z.object({mode:de,deviceId:s.z.number().int().positive(),blocking:s.z.boolean()}),Ht=s.z.object({mode:de,deviceId:s.z.number().int().positive(),secureOnArm:s.z.boolean()}),Wt=s.z.object({mode:de,deviceIds:s.z.array(s.z.number().int()).max(200)}),Vt=Wt,Zt=Wt,$t=Wt,Jt=s.z.array(Vt).max(8).refine(Bt,{message:"nonBlocking: at most one list per arm mode"}),Yt=s.z.array(Zt).max(8).refine(Bt,{message:"blocking: at most one list per arm mode"}),Qt=s.z.array($t).max(8).refine(Bt,{message:"secureOnArmOff: at most one list per arm mode"}),Xt=s.z.object({exitDelaySec:Tt,entryDelaySec:Tt,triggeredDurationSec:Rt,postTriggeredAction:Lt.optional(),announceArm:s.z.boolean().optional(),announceTargets:s.z.array(s.z.string().min(1)).max(16),nonBlocking:Jt.default([]),blocking:Yt.default([]),secureOnArmOff:Qt.default([]),modeDelays:Nt.default([])}),ei=s.z.object({id:s.z.string().min(1).max(64),name:s.z.string().min(1).max(64),isDefault:s.z.boolean()}),ti=s.z.object({activeId:s.z.string().min(1),items:s.z.array(ei).min(1)}),ii=s.z.object({name:s.z.string().min(1).max(64),cloneFromId:s.z.string().min(1).max(64).optional()}),ni=s.z.object({id:s.z.string().min(1).max(64),name:s.z.string().min(1).max(64)}),ai=s.z.object({id:s.z.string().min(1).max(64)}),ri=Xt.extend({nonBlocking:Jt,blocking:Yt,secureOnArmOff:Qt,modeDelays:Kt,nonBlockingEdit:Ut,blockingEdit:Gt,secureOnArmEdit:Ht}).partial().refine(e=>void 0===e.nonBlocking||void 0===e.nonBlockingEdit,{message:"nonBlocking and nonBlockingEdit are exclusive \u2014 send the whole lists or one edit"}).refine(e=>void 0===e.blocking||void 0===e.blockingEdit,{message:"blocking and blockingEdit are exclusive \u2014 send the whole lists or one edit"}).refine(e=>void 0===e.secureOnArmOff||void 0===e.secureOnArmEdit,{message:"secureOnArmOff and secureOnArmEdit are exclusive \u2014 send the whole lists or one edit"}),oi=s.z.enum(["muted","detection-off","offline"]),si=s.z.object({deviceId:s.z.number().int(),reason:oi}),li=s.z.object({mode:de,ruleCount:s.z.number().int().min(0),allDevices:s.z.boolean(),deviceIds:s.z.array(s.z.number().int()),allDevicesExcept:s.z.array(s.z.number().int()).default([]),skippedDevices:s.z.array(si).default([])}),ci=s.z.object({deviceId:s.z.number().int(),name:s.z.string(),state:s.z.string(),blocking:s.z.boolean()}),di=s.z.object({deviceId:s.z.number().int(),name:s.z.string(),phase:s.z.enum(["open","closed"])}),ui=s.z.object({mode:de,devices:s.z.array(ci),unknown:s.z.array(s.z.number().int())}),mi=s.z.object({state:ce,targetMode:de.nullable(),availableModes:s.z.array(de),openings:s.z.array(ui),exclusions:s.z.array(di)}),pi=s.z.object({deviceId:s.z.number().int().nullable(),settings:Xt,profiles:ti.optional(),coverage:s.z.array(li),live:mi.optional()}),gi=500,yi=s.z.enum(["open","closed","unknown","not-opening"]),vi=s.z.object({deviceId:s.z.number().int().positive(),reading:yi,state:s.z.string().nullable(),unknownWhy:s.z.enum(["read-failed","unknown-word"]).nullable(),online:s.z.boolean().nullable(),controllable:s.z.boolean().default(!1)}),bi=s.z.object({deviceIds:s.z.array(s.z.number().int().positive()).max(500)}),fi=s.z.object({sensors:s.z.array(vi),readAt:s.z.number().int().nonnegative()}),zi=s.z.object({deviceId:s.z.number().int().nonnegative().optional(),seconds:s.z.number().min(0).max(60),profile:c.optional(),ruleId:s.z.string(),ruleName:s.z.string(),reason:s.z.enum(["window","occupancy"])}),hi=s.z.object({rulesLoaded:s.z.boolean(),asks:s.z.array(zi).readonly()});S(s.z.object({}),s.z.object({rules:s.z.array(st)}),{auth:"admin"}),S(s.z.object({ruleId:s.z.string()}),s.z.object({rule:st.nullable()}),{auth:"admin"}),S(s.z.object({rule:nt}),s.z.object({rule:st}),{kind:"mutation",auth:"admin",caller:"required"}),S(ot,s.z.object({rule:st}),{kind:"mutation",auth:"admin",caller:"required"}),S(s.z.object({ruleId:s.z.string()}),s.z.object({success:s.z.literal(!0)}),{kind:"mutation",auth:"admin"}),S(s.z.object({ruleId:s.z.string(),enabled:s.z.boolean()}),s.z.object({success:s.z.literal(!0)}),{kind:"mutation",auth:"admin"}),S(s.z.object({}),s.z.object({sequences:s.z.array(Be)}),{auth:"admin"}),S(s.z.object({sequenceId:s.z.string().min(1)}),s.z.object({sequence:Be.nullable()}),{auth:"admin"}),S(s.z.object({sequence:Le}),s.z.object({sequence:Be}),{kind:"mutation",auth:"admin"}),S(s.z.object({sequenceId:s.z.string().min(1),sequence:Le}),s.z.object({sequence:Be}),{kind:"mutation",auth:"admin"}),S(s.z.object({sequenceId:s.z.string().min(1)}),s.z.object({success:s.z.literal(!0)}),{kind:"mutation",auth:"admin"}),S(s.z.object({}),hi,{auth:"admin"}),S(s.z.object({}),s.z.object({mutedDeviceIds:s.z.array(s.z.number().int()).readonly()}),{auth:"admin"}),S(s.z.object({deviceId:s.z.number().int(),muted:s.z.boolean()}),s.z.object({success:s.z.literal(!0)}),{kind:"mutation",auth:"admin"}),S(s.z.object({rule:nt,lookbackMinutes:s.z.number().int().min(1).max(1440).default(60)}),s.z.object({results:s.z.array(mt)}),{kind:"mutation",auth:"admin"}),S(s.z.object({rule:nt}),ut,{kind:"mutation",auth:"admin",access:"view"}),S(s.z.object({}),s.z.object({catalog:s.z.array(kt),taxonomy:se.optional()})),S(s.z.object({}),s.z.object({vars:s.z.array(ft)})),S(ht,St,{kind:"mutation",access:"view"}),S(s.z.object({filter:Mt.default({limit:100})}),s.z.object({entries:s.z.array(wt)}),{auth:"admin"}),S(s.z.object({}),Pt,{auth:"admin"}),S(s.z.object({artifactId:s.z.string().min(1)}),s.z.object({url:s.z.string().nullable()}),{auth:"admin"}),S(s.z.object({}),s.z.object({snoozes:s.z.array(jt)}),{caller:"required"}),S(s.z.object({snooze:Et}),s.z.object({snooze:jt}),{kind:"mutation",caller:"required"}),S(s.z.object({snoozeId:s.z.string()}),s.z.object({success:s.z.literal(!0)}),{kind:"mutation",caller:"required"}),S(s.z.object({}),pi,{auth:"admin"}),S(s.z.object({patch:ri}),pi,{kind:"mutation",auth:"admin"}),S(ii,pi,{kind:"mutation",auth:"admin"}),S(ni,pi,{kind:"mutation",auth:"admin"}),S(ai,pi,{kind:"mutation",auth:"admin"}),S(ai,pi,{kind:"mutation",auth:"admin"}),S(bi,fi,{auth:"admin"});var Si={motion:"motion",audio:"audio",person:"person",vehicle:"vehicle",animal:"animal",package:"package",door:"door",pir:"pir",smoke:"smoke",water:"water",button:"button",generic:"generic",gas:"smoke",vibration:"generic",tamper:"generic",presence:"person",lock:"generic",siren:"generic",switch:"generic",doorbell:"button"};var ki={contact:"contact",motion:"motion-sensor",smoke:"smoke",flood:"flood",gas:"gas","carbon-monoxide":"carbon-monoxide",vibration:"vibration",tamper:"tamper",presence:"presence","enum-sensor":"enum-sensor","event-emitter":"device-event","lock-control":"lock",cover:"cover",switch:"switch",button:"button",doorbell:"doorbell"};function qi(e,t){const i=re[t];if(void 0===i)throw new Error(`EVENT_KIND_BY_CAP: cap '${e}' maps to unknown taxonomy kind '${t}'`);return Object.assign({},i,{icon:(n=i.iconId,Si[n]??"generic")});var n}var Ci=Object.freeze(Object.fromEntries(Object.entries(ki).map(([e,t])=>[e,qi(e,t)]))),Ai=Object.keys(ki);s.z.enum(["queue-full","camera-backoff","sleeping","camera-refused","no-keyframe","decode-failed","no-catalog-row","unsupported","unknown-device","uid-missing"]),s.z.enum(["deferred","final"]);var wi=s.z.object({id:s.z.string(),source:s.z.string(),kind:s.z.enum(["motion","object","audio","native"]),timeRange:s.z.object({startMs:s.z.number(),endMs:s.z.number()}),labels:s.z.array(s.z.string()).max(3).optional(),thumbnail:s.z.string().optional(),stillAtMs:s.z.number().optional(),eventIds:s.z.array(s.z.string()).optional(),eventCount:s.z.number().int().nonnegative().optional(),holes:s.z.array(s.z.object({startMs:s.z.number(),endMs:s.z.number()})).optional(),thumbnailMint:s.z.string().optional(),thumbnailUnavailable:s.z.object({reason:s.z.enum(["sleeping","camera-refused","no-keyframe","unsupported"])}).optional(),catalogAsOf:s.z.number().optional(),nativeTypes:s.z.array(s.z.string()).optional(),behaviours:s.z.array(s.z.string()).optional(),streams:s.z.object({sub:s.z.object({id:s.z.string(),bytes:s.z.number().optional()}).optional(),main:s.z.object({id:s.z.string(),bytes:s.z.number().optional()}).optional()}).optional(),supportSub:s.z.boolean().optional(),playable:s.z.boolean().optional(),unplayableReason:s.z.string().optional(),inProgress:s.z.boolean().optional()}),Mi=s.z.object({playbackUrl:s.z.string(),format:s.z.enum(["hls","mp4"]).optional(),served:c.optional(),playbackEndpoints:s.z.array(s.z.string()).optional(),token:s.z.string().optional()}),Di=s.z.enum(["authorised"]),Pi=s.z.object({base64:s.z.string(),contentType:s.z.string(),name:s.z.string(),bytes:s.z.number().int().nonnegative(),served:c,durationMs:s.z.number().positive().optional()}),Ii=s.z.object({ticket:l,contentType:s.z.string(),name:s.z.string(),served:c,durationMs:s.z.number().positive().optional()}),Ei=s.z.enum(["opus","pcmu","none"]),ji=s.z.enum(["not-requested","unsupported-ask"]),xi=s.z.object({url:s.z.string().min(1),expiresAtMs:s.z.number(),transport:s.z.literal("forward-only"),served:c,servedAudio:Ei,audioReason:ji.optional()}),Oi=[.25,.5,1,1.5,2,4,8],Ti=s.z.object({transport:s.z.enum(["stream","file"]),seek:s.z.enum(["forward","free"]),stepBack:s.z.boolean(),scrub:s.z.boolean(),rates:s.z.array(s.z.number().positive()).min(1).readonly()}),Ri=s.z.object({state:s.z.enum(["ok","sleeping","unreachable","no-storage","index-empty"]),reason:s.z.string().optional(),catalogAsOf:s.z.number().optional()}),Bi=s.z.object({source:s.z.string(),label:s.z.string(),addonId:s.z.string().optional(),availability:Ri});q.Camera,S(s.z.object({deviceId:s.z.number(),since:s.z.number(),until:s.z.number(),limit:s.z.number().int().positive().optional(),provider:s.z.string().min(1)}),s.z.array(wi).readonly(),{kind:"query",auth:"protected"}),S(s.z.object({deviceId:s.z.number()}),s.z.array(Bi).readonly(),{kind:"query",auth:"protected"}),S(s.z.object({deviceId:s.z.number(),clipId:s.z.string(),profile:c.optional()}),Mi,{kind:"query",auth:"protected"}),k(s.z.object({deviceId:s.z.number(),clipId:s.z.string().min(1),provider:s.z.string().min(1),profile:c.optional(),maxBytes:s.z.number().int().positive().optional(),wake:Di.optional()}),Pi,{kind:"query",auth:"protected"}),k(s.z.object({deviceId:s.z.number(),clipId:s.z.string().min(1),provider:s.z.string().min(1),profile:c.optional(),maxBytes:s.z.number().int().positive().optional(),wake:Di.optional()}),Ii,{kind:"query",auth:"protected"}),k(s.z.object({deviceId:s.z.number(),clipId:s.z.string().min(1),provider:s.z.string().min(1),profile:c.optional(),audio:Ei.optional()}),xi,{kind:"query",auth:"protected"}),k(s.z.object({deviceId:s.z.number(),provider:s.z.string().min(1)}),Ti,{kind:"query",auth:"protected"});var Li=s.z.object({addonId:s.z.string(),capabilities:s.z.array(s.z.string()).readonly(),status:s.z.string()}),Fi=s.z.object({pid:s.z.number(),name:s.z.string(),state:s.z.string(),cpuPercent:s.z.number(),memoryRss:s.z.number(),uptimeSeconds:s.z.number(),services:s.z.array(Li).readonly(),groupId:s.z.string().optional()}),Ni=s.z.object({id:s.z.string(),status:s.z.string(),cpuPercent:s.z.number(),memoryRss:s.z.number()}),_i=s.z.object({category:s.z.string(),total:s.z.number(),healthy:s.z.number(),addons:s.z.array(Ni).readonly()}),Ki=s.z.object({name:s.z.string(),version:s.z.string()}),Ui=s.z.object({id:s.z.string(),name:s.z.string(),hostname:s.z.string(),platform:s.z.string(),arch:s.z.string(),cpuModel:s.z.string().nullable(),cpuCores:s.z.number(),memoryMB:s.z.number(),engines:s.z.array(s.z.string()).readonly(),isHub:s.z.boolean(),isOnline:s.z.boolean(),cpuPercent:s.z.number(),memoryPercent:s.z.number(),uptime:s.z.number(),lastSeen:s.z.string(),localIps:s.z.array(s.z.string()).readonly(),addons:s.z.array(s.z.object({id:s.z.string(),capabilities:s.z.array(s.z.string()).readonly(),status:s.z.string()})).readonly(),processes:s.z.array(Fi).readonly(),categories:s.z.array(_i).readonly(),rootPackage:Ki.nullable()}),Gi=s.z.object({callerAddonId:s.z.string(),providerAddonId:s.z.string(),capName:s.z.string(),callsPerMin:s.z.number(),lastCallAtMs:s.z.number()}),Hi=s.z.object({nodeId:s.z.string(),name:s.z.string(),version:s.z.string(),status:s.z.string(),synced:s.z.boolean()}),Wi=s.z.object({hubVersion:s.z.string(),nodes:s.z.array(Hi)}),Vi=s.z.object({nodeId:s.z.string(),addonId:s.z.string()}),Zi=s.z.object({id:s.z.string(),status:s.z.string(),version:s.z.string().optional(),packageName:s.z.string().optional()}),$i=s.z.object({success:s.z.boolean()}),Ji=s.z.object({success:s.z.boolean(),reason:s.z.string().optional()}),Yi=s.z.object({restarted:s.z.array(s.z.string()).readonly(),failed:s.z.array(s.z.string()).readonly()}),Qi=s.z.object({nodeId:s.z.string(),name:s.z.string()}),Xi=s.z.object({id:s.z.string(),name:s.z.string(),isHub:s.z.boolean(),isOnline:s.z.boolean()}),en=s.z.object({nodes:s.z.array(Xi).readonly(),complete:s.z.boolean()});S(s.z.void(),s.z.array(Ui).readonly(),{auth:"admin"}),S(s.z.void(),en,{auth:"admin"}),S(Vi,$i,{kind:"mutation",auth:"admin"}),S(Vi,$i,{kind:"mutation",auth:"admin"}),S(Vi,$i,{kind:"mutation",auth:"admin"}),S(s.z.object({nodeId:s.z.string(),processName:s.z.string()}),Ji,{kind:"mutation",auth:"admin"}),S(s.z.object({nodeId:s.z.string()}),Yi,{kind:"mutation",auth:"admin"}),S(s.z.object({nodeId:s.z.string()}),$i,{kind:"mutation",auth:"admin"}),S(s.z.object({nodeId:s.z.string(),name:s.z.string().min(1).max(64)}),Qi,{kind:"mutation",auth:"admin"}),S(s.z.void(),s.z.record(s.z.string(),Wi),{auth:"admin"}),S(s.z.object({windowSeconds:s.z.number().int().positive().max(300).default(60)}),s.z.array(Gi).readonly(),{auth:"admin"}),S(s.z.object({nodeId:s.z.string()}),s.z.array(Zi).readonly(),{auth:"admin"}),S(s.z.object({nodeId:s.z.string(),level:s.z.string()}),$i,{kind:"mutation",auth:"admin"}),S(s.z.object({nodeId:s.z.string(),addonId:s.z.string(),queryName:s.z.string(),params:s.z.record(s.z.string(),s.z.unknown()).optional()}),s.z.unknown(),{kind:"mutation",auth:"admin"});var tn=s.z.number().min(.25).max(32),nn=s.z.object({fromSec:s.z.number().nonnegative(),toSec:s.z.number().nonnegative()}).refine(e=>e.toSec>e.fromSec,{message:"dense range must have toSec > fromSec"}),an=s.z.object({everyMs:s.z.number().int().positive(),ranges:s.z.array(nn).min(1).max(200)}),rn=s.z.object({everyMs:s.z.number().int().positive(),outputFps:s.z.number().int().min(1).max(60).optional(),dense:an.optional()}).superRefine((e,t)=>{void 0!==e.dense&&e.dense.everyMs>=e.everyMs&&t.addIssue({code:s.z.ZodIssueCode.custom,message:"dense.everyMs must be strictly smaller than the base everyMs",path:["dense","everyMs"]})}),on=s.z.object({speed:tn.optional(),timelapse:rn.optional(),includeAudio:s.z.boolean(),maxLifeMs:s.z.number().int().positive(),deleteAfterDownload:s.z.boolean(),title:s.z.string().max(200).optional(),notifyTargetIds:s.z.array(s.z.string().min(1)).max(20).optional()}).superRefine((e,t)=>{void 0!==e.speed&&void 0!==e.timelapse&&t.addIssue({code:s.z.ZodIssueCode.custom,message:"speed and timelapse are mutually exclusive",path:["timelapse"]})}),sn=s.z.enum(["queued","rendering","ready","failed","expired","deleted"]),ln=s.z.object({kind:s.z.literal("footage"),deviceId:s.z.number(),profiles:s.z.array(s.z.string()).min(1),fromMs:s.z.number(),toMs:s.z.number()}),cn=s.z.object({kind:s.z.literal("clip"),deviceId:s.z.number(),provider:s.z.string().min(1),source:s.z.string().min(1),sourceLabel:s.z.string().min(1),clipId:s.z.string().min(1),catalogWindow:s.z.object({sinceMs:s.z.number(),untilMs:s.z.number()}),profile:s.z.enum(["high","mid","low"]),wake:Di.optional()}),dn=s.z.discriminatedUnion("kind",[ln,cn]),un=s.z.object({id:s.z.string(),deviceId:s.z.number(),profile:s.z.string(),fromMs:s.z.number(),toMs:s.z.number(),subject:dn.optional(),options:on,state:sn,progressPct:s.z.number().nullable(),fileBytes:s.z.number().nullable(),expiresAt:s.z.number(),deleteAfterDownload:s.z.boolean(),downloadedAt:s.z.number().nullable(),createdAt:s.z.number(),createdBy:s.z.string(),error:s.z.string().nullable()});s.z.enum(["catalog-miss","catalog-unreachable","no-file-for-window","clip-in-progress","unsupported-option","sleeping","camera-refused","fetch-failed","too-large-to-transfer","wake-expired"]);var mn=s.z.object({url:s.z.string(),endpoints:s.z.array(s.z.string())}),pn=52428800,gn=s.z.object({base64:s.z.string(),contentType:s.z.string(),name:s.z.string(),bytes:s.z.number().int().nonnegative()});S(s.z.object({deviceId:s.z.number(),profile:s.z.string().optional(),profiles:s.z.array(s.z.string()).min(1).optional(),fromMs:s.z.number().optional(),toMs:s.z.number().optional(),subject:dn.optional(),options:on}).superRefine((e,t)=>{if("clip"===e.subject?.kind)return e.subject.deviceId!==e.deviceId&&t.addIssue({code:s.z.ZodIssueCode.custom,message:`subject.deviceId (${e.subject.deviceId}) must equal deviceId (${e.deviceId}) \u2014 the top-level field is what per-device scope enforcement reads`,path:["subject","deviceId"]}),void(void 0===e.fromMs&&void 0===e.toMs||t.addIssue({code:s.z.ZodIssueCode.custom,message:"a clip export asks for no time range: the camera chose the boundaries and they are read from the catalog row",path:["fromMs"]}));"footage"===e.subject?.kind&&e.subject.deviceId!==e.deviceId&&t.addIssue({code:s.z.ZodIssueCode.custom,message:`subject.deviceId (${e.subject.deviceId}) must equal deviceId (${e.deviceId})`,path:["subject","deviceId"]});const i="footage"===e.subject?.kind?e.subject.fromMs:e.fromMs,n="footage"===e.subject?.kind?e.subject.toMs:e.toMs;var a;"number"==typeof i&&"number"==typeof n||t.addIssue({code:s.z.ZodIssueCode.custom,message:"a footage export needs fromMs and toMs",path:["fromMs"]}),("footage"===e.subject?.kind?[...e.subject.profiles]:(a=e,void 0!==a.profiles&&a.profiles.length>0?[...a.profiles]:"string"==typeof a.profile&&a.profile.length>0?[a.profile]:[])).length<1&&t.addIssue({code:s.z.ZodIssueCode.custom,message:"pass profiles[] (min 1) or legacy profile",path:["profiles"]})}),un,{kind:"mutation",auth:"protected"}),S(s.z.object({deviceId:s.z.number().optional()}),s.z.array(un),{kind:"query",auth:"protected"}),S(s.z.object({exportId:s.z.string()}),un,{kind:"query",auth:"protected"}),S(s.z.object({exportId:s.z.string()}),un,{kind:"mutation",auth:"protected"}),S(s.z.object({exportId:s.z.string()}),un,{kind:"mutation",auth:"protected"}),S(s.z.object({exportId:s.z.string()}),mn,{kind:"query",auth:"protected"}),S(s.z.object({exportId:s.z.string()}),gn,{kind:"query",auth:"protected"});function yn(e){const t=new Map,i=new Map;let n=null;const a=(e,t)=>`${e}:${t}`;return{read:(e,i)=>t.get(a(e,i)),async refresh(n,r){const o=await e.deviceState.getCapSlice.query({deviceId:n,capName:r}),s=a(n,r);t.set(s,o??void 0);const l=i.get(s);if(l)for(const e of l)try{e(o??void 0)}catch{}},watch(r,o,s){const l=a(r,o);let c=i.get(l);return c||(c=new Set,i.set(l,c)),c.add(s),n||e.live?.onEvent&&(n=e.live.onEvent.subscribe({category:"device.state-changed"},{onData:e=>{const n=e.data;if(!n||"number"!=typeof n.deviceId||"string"!=typeof n.capName)return;const r=a(n.deviceId,n.capName);t.set(r,n.slice);const o=i.get(r);if(o)for(const e of o)try{e(n.slice)}catch{}}})),()=>{c.delete(s),0===c.size&&i.delete(l),n&&(i.size>0||(n.unsubscribe(),n=null))}},async write(t,i,n){await e.deviceState.setCapSlice.mutate({deviceId:t,capName:i,slice:n})}}}function vn(e,t,i){const n=(e,t)=>`${e}:${t}`;return{read:(t,i)=>e.get(t)?.get(i),async refresh(){},watch(e,i,a){const r=n(e,i);let o=t.get(r);return o||(o=new Set,t.set(r,o)),o.add(a),()=>{o.delete(a),0===o.size&&t.delete(r)}},async write(e,t,n){if(!i)throw new Error("createMirrorSource: write requires an api reference \u2014 pass it as the third argument when constructing the source");await i.deviceState.setCapSlice.mutate({deviceId:e,capName:t,slice:n})}}}function bn(e,t,i){const n="function"==typeof(a=e).read&&"function"==typeof a.watch?e:yn(e);var a;return{get value(){return n.read(t,i)},refresh:()=>n.refresh(t,i),subscribe(e){const a=n.watch(t,i,t=>{try{e(t)}catch{}});try{e(n.read(t,i))}catch{}return void 0===n.read(t,i)&&n.refresh(t,i).catch(()=>{}),a},async set(e){await n.write(t,i,e)},async patch(e){const a=Object.assign({},n.read(t,i),e);await n.write(t,i,a)}}}function fn(e,t,i){const n=e,a=i?.stateSource??yn(e);function r(e,i){const n="object"==typeof e&&null!==e?e:{};return void 0!==i?Object.assign({},n,{deviceId:t.deviceId,nodeId:i}):Object.assign({},n,{deviceId:t.deviceId})}function o(e,t,i,a,r){const o=n[e]?.[t];if(!o)throw new Error(`DeviceProxy: api has no '${e}.${t}'`);const s=o;return"mutation"===i?s.mutate(a):"subscription"===i?s.subscribe(a,r):s.query(a)}function s(e,i,n,a,s,l){return o(i,n,a,r(s,t.entries.find(t=>t.capName===e)?.providerNodeId),l)}function l(e,t,i,n,a){return o(e,t,i,r(n,void 0),a)}function c(e){return t.entries.some(t=>t.capName===e)}const d={setChildHidden:e=>s("accessories","accessories","setChildHidden","mutation",e),getStatus:e=>s("accessories","accessories","getStatus","query",e)},u={getStatus:e=>s("air-quality-sensor","airQualitySensor","getStatus","query",e)},m={arm:e=>s("alarm-panel","alarmPanel","arm","mutation",e),disarm:e=>s("alarm-panel","alarmPanel","disarm","mutation",e),trigger:e=>s("alarm-panel","alarmPanel","trigger","mutation",e),getStatus:e=>s("alarm-panel","alarmPanel","getStatus","query",e)},p={getStatus:e=>s("ambient-light-sensor","ambientLightSensor","getStatus","query",e)},g={resolveDeviceSettings:e=>s("audio-analysis","audioAnalysis","resolveDeviceSettings","query",e),getDeviceSettingsContribution:e=>s("audio-analysis","audioAnalysis","getDeviceSettingsContribution","query",e),getDeviceLiveContribution:e=>s("audio-analysis","audioAnalysis","getDeviceLiveContribution","query",e),applyDeviceSettingsPatch:e=>s("audio-analysis","audioAnalysis","applyDeviceSettingsPatch","mutation",e)},y={getCurrentSnapshot:e=>s("audio-metrics","audioMetrics","getCurrentSnapshot","query",e),getHistory:e=>s("audio-metrics","audioMetrics","getHistory","query",e)},v={enable:e=>s("automation-control","automationControl","enable","mutation",e),disable:e=>s("automation-control","automationControl","disable","mutation",e),trigger:e=>s("automation-control","automationControl","trigger","mutation",e),getStatus:e=>s("automation-control","automationControl","getStatus","query",e)},b={wakeForStream:e=>s("battery","battery","wakeForStream","mutation",e),getStatus:e=>s("battery","battery","getStatus","query",e)},f={getStatus:e=>s("binary","binary","getStatus","query",e)},z={setBrightness:e=>s("brightness","brightness","setBrightness","mutation",e),getStatus:e=>s("brightness","brightness","getStatus","query",e)},h={press:e=>s("button","button","press","mutation",e)},S={getCredentials:e=>s("camera-credentials","cameraCredentials","getCredentials","query",e),getStatus:e=>s("camera-credentials","cameraCredentials","getStatus","query",e)},k={getLayout:e=>s("camera-grid-layout","cameraGridLayout","getLayout","query",e),saveLayout:e=>s("camera-grid-layout","cameraGridLayout","saveLayout","mutation",e),getDeviceSettingsContribution:e=>s("camera-grid-layout","cameraGridLayout","getDeviceSettingsContribution","query",e),getDeviceLiveContribution:e=>s("camera-grid-layout","cameraGridLayout","getDeviceLiveContribution","query",e),applyDeviceSettingsPatch:e=>s("camera-grid-layout","cameraGridLayout","applyDeviceSettingsPatch","mutation",e)},q={getDeviceSettingsContribution:e=>s("camera-pipeline-config","cameraPipelineConfig","getDeviceSettingsContribution","query",e),getDeviceLiveContribution:e=>s("camera-pipeline-config","cameraPipelineConfig","getDeviceLiveContribution","query",e),applyDeviceSettingsPatch:e=>s("camera-pipeline-config","cameraPipelineConfig","applyDeviceSettingsPatch","mutation",e)},C={getCameraStreams:e=>s("camera-streams","cameraStreams","getCameraStreams","query",e),getBrokerStreams:e=>s("camera-streams","cameraStreams","getBrokerStreams","query",e),getRtspEntries:e=>s("camera-streams","cameraStreams","getRtspEntries","query",e),getProfileRtspEntries:e=>s("camera-streams","cameraStreams","getProfileRtspEntries","query",e),pickStream:e=>s("camera-streams","cameraStreams","pickStream","query",e)},A={getStatus:e=>s("carbon-monoxide","carbonMonoxide","getStatus","query",e)},w={setMode:e=>s("climate-control","climateControl","setMode","mutation",e),setFanMode:e=>s("climate-control","climateControl","setFanMode","mutation",e),setPreset:e=>s("climate-control","climateControl","setPreset","mutation",e),setTarget:e=>s("climate-control","climateControl","setTarget","mutation",e),setTargetRange:e=>s("climate-control","climateControl","setTargetRange","mutation",e),setTargetHumidity:e=>s("climate-control","climateControl","setTargetHumidity","mutation",e),setSwingVertical:e=>s("climate-control","climateControl","setSwingVertical","mutation",e),setSwingHorizontal:e=>s("climate-control","climateControl","setSwingHorizontal","mutation",e),getStatus:e=>s("climate-control","climateControl","getStatus","query",e)},M={setColor:e=>s("color","color","setColor","mutation",e),getStatus:e=>s("color","color","getStatus","query",e)},D={getStatus:e=>s("connectivity","connectivity","getStatus","query",e)},P={reset:e=>s("consumables","consumables","reset","mutation",e),getStatus:e=>s("consumables","consumables","getStatus","query",e)},I={getStatus:e=>s("contact","contact","getStatus","query",e)},E={setValue:e=>s("control","control","setValue","mutation",e),getStatus:e=>s("control","control","getStatus","query",e)},j={open:e=>s("cover","cover","open","mutation",e),close:e=>s("cover","cover","close","mutation",e),stop:e=>s("cover","cover","stop","mutation",e),setPosition:e=>s("cover","cover","setPosition","mutation",e),setTiltPosition:e=>s("cover","cover","setTiltPosition","mutation",e),getStatus:e=>s("cover","cover","getStatus","query",e)},x={getOptions:e=>s("day-night","dayNight","getOptions","query",e),setSettings:e=>s("day-night","dayNight","setSettings","mutation",e),getStatus:e=>s("day-night","dayNight","getStatus","query",e)},O={getDeviceSettingsContribution:e=>s("detection-pipeline","detectionPipeline","getDeviceSettingsContribution","query",e),getDeviceLiveContribution:e=>s("detection-pipeline","detectionPipeline","getDeviceLiveContribution","query",e),applyDeviceSettingsPatch:e=>s("detection-pipeline","detectionPipeline","applyDeviceSettingsPatch","mutation",e)},T={getAdminLink:e=>s("device-admin-link","deviceAdminLink","getAdminLink","query",e)},R={listDiscovered:e=>s("device-discovery","deviceDiscovery","listDiscovered","query",e),refreshDiscovery:e=>s("device-discovery","deviceDiscovery","refreshDiscovery","mutation",e),adoptDevice:e=>s("device-discovery","deviceDiscovery","adoptDevice","mutation",e),releaseDevice:e=>s("device-discovery","deviceDiscovery","releaseDevice","mutation",e),getStatus:e=>s("device-discovery","deviceDiscovery","getStatus","query",e)},B={listSources:e=>s("device-extension","deviceExtension","listSources","query",e),listSlots:e=>s("device-extension","deviceExtension","listSlots","query",e),listCandidates:e=>s("device-extension","deviceExtension","listCandidates","query",e),setSlot:e=>s("device-extension","deviceExtension","setSlot","mutation",e)},L={getStreamSources:e=>s("device-ops","deviceOps","getStreamSources","query",e),getConfigEntries:e=>s("device-ops","deviceOps","getConfigEntries","query",e),setConfig:e=>s("device-ops","deviceOps","setConfig","mutation",e),runAction:e=>s("device-ops","deviceOps","runAction","mutation",e),removeDevice:e=>s("device-ops","deviceOps","removeDevice","mutation",e),getSettingsSchema:e=>s("device-ops","deviceOps","getSettingsSchema","query",e),getRawState:e=>s("device-ops","deviceOps","getRawState","query",e)},F={getStatus:e=>s("device-status","deviceStatus","getStatus","query",e)},N={getStatus:e=>s("doorbell","doorbell","getStatus","query",e)},_={getStatus:e=>s("enum-sensor","enumSensor","getStatus","query",e)},K={getStatus:e=>s("event-emitter","eventEmitter","getStatus","query",e)},U={setPercentage:e=>s("fan-control","fanControl","setPercentage","mutation",e),setPreset:e=>s("fan-control","fanControl","setPreset","mutation",e),setDirection:e=>s("fan-control","fanControl","setDirection","mutation",e),setOscillating:e=>s("fan-control","fanControl","setOscillating","mutation",e),getStatus:e=>s("fan-control","fanControl","getStatus","query",e)},G={getStatus:e=>s("feature-probe","featureProbe","getStatus","query",e)},H={getStatus:e=>s("flood","flood","getStatus","query",e)},W={getStatus:e=>s("gas","gas","getStatus","query",e)},V={setOn:e=>s("humidifier","humidifier","setOn","mutation",e),setTargetHumidity:e=>s("humidifier","humidifier","setTargetHumidity","mutation",e),setMode:e=>s("humidifier","humidifier","setMode","mutation",e),getStatus:e=>s("humidifier","humidifier","getStatus","query",e)},Z={getStatus:e=>s("humidity-sensor","humiditySensor","getStatus","query",e)},$={getStatus:e=>s("image","image","getStatus","query",e)},J={getOptions:e=>s("image-settings","imageSettings","getOptions","query",e),setSettings:e=>s("image-settings","imageSettings","setSettings","mutation",e),getStatus:e=>s("image-settings","imageSettings","getStatus","query",e)},Y={startSession:e=>s("intercom","intercom","startSession","mutation",e),handleAnswer:e=>s("intercom","intercom","handleAnswer","mutation",e),stopSession:e=>s("intercom","intercom","stopSession","mutation",e),startTalkSession:e=>s("intercom","intercom","startTalkSession","mutation",e),pushTalkAudio:e=>s("intercom","intercom","pushTalkAudio","mutation",e),endTalkSession:e=>s("intercom","intercom","endTalkSession","mutation",e),getStatus:e=>s("intercom","intercom","getStatus","query",e)},Q={startMowing:e=>s("lawn-mower-control","lawnMowerControl","startMowing","mutation",e),pause:e=>s("lawn-mower-control","lawnMowerControl","pause","mutation",e),dock:e=>s("lawn-mower-control","lawnMowerControl","dock","mutation",e),getStatus:e=>s("lawn-mower-control","lawnMowerControl","getStatus","query",e)},X={lock:e=>s("lock-control","lockControl","lock","mutation",e),unlock:e=>s("lock-control","lockControl","unlock","mutation",e),open:e=>s("lock-control","lockControl","open","mutation",e),getStatus:e=>s("lock-control","lockControl","getStatus","query",e)},ee={play:e=>s("media-player","mediaPlayer","play","mutation",e),pause:e=>s("media-player","mediaPlayer","pause","mutation",e),stop:e=>s("media-player","mediaPlayer","stop","mutation",e),next:e=>s("media-player","mediaPlayer","next","mutation",e),previous:e=>s("media-player","mediaPlayer","previous","mutation",e),seek:e=>s("media-player","mediaPlayer","seek","mutation",e),setVolume:e=>s("media-player","mediaPlayer","setVolume","mutation",e),setMute:e=>s("media-player","mediaPlayer","setMute","mutation",e),setShuffle:e=>s("media-player","mediaPlayer","setShuffle","mutation",e),setRepeat:e=>s("media-player","mediaPlayer","setRepeat","mutation",e),selectSource:e=>s("media-player","mediaPlayer","selectSource","mutation",e),playMedia:e=>s("media-player","mediaPlayer","playMedia","mutation",e),getStatus:e=>s("media-player","mediaPlayer","getStatus","query",e)},te={isDetected:e=>s("motion","motion","isDetected","query",e),getStatus:e=>s("motion","motion","getStatus","query",e)},ie={analyze:e=>s("motion-detection","motionDetection","analyze","mutation",e),removeCamera:e=>s("motion-detection","motionDetection","removeCamera","mutation",e),reset:e=>s("motion-detection","motionDetection","reset","mutation",e),getDeviceSettingsContribution:e=>s("motion-detection","motionDetection","getDeviceSettingsContribution","query",e),getDeviceLiveContribution:e=>s("motion-detection","motionDetection","getDeviceLiveContribution","query",e),applyDeviceSettingsPatch:e=>s("motion-detection","motionDetection","applyDeviceSettingsPatch","mutation",e)},ne={setMotionTrigger:e=>s("motion-trigger","motionTrigger","setMotionTrigger","mutation",e),getStatus:e=>s("motion-trigger","motionTrigger","getStatus","query",e)},ae={getOptions:e=>s("motion-zones","motionZones","getOptions","query",e),setZone:e=>s("motion-zones","motionZones","setZone","mutation",e),getStatus:e=>s("motion-zones","motionZones","getStatus","query",e)},re={getOptions:e=>s("native-object-detection","nativeObjectDetection","getOptions","query",e),setSettings:e=>s("native-object-detection","nativeObjectDetection","setSettings","mutation",e),setEnabled:e=>s("native-object-detection","nativeObjectDetection","setEnabled","mutation",e),getStatus:e=>s("native-object-detection","nativeObjectDetection","getStatus","query",e)},oe={move:e=>s("navigation","navigation","move","mutation",e),stop:e=>s("navigation","navigation","stop","mutation",e),goToPoint:e=>s("navigation","navigation","goToPoint","mutation",e),listActions:e=>s("navigation","navigation","listActions","query",e),runAction:e=>s("navigation","navigation","runAction","mutation",e),playSound:e=>s("navigation","navigation","playSound","mutation",e),setLightOn:e=>s("navigation","navigation","setLightOn","mutation",e),setLightMode:e=>s("navigation","navigation","setLightMode","mutation",e),setLightLevel:e=>s("navigation","navigation","setLightLevel","mutation",e),getFeatures:e=>s("navigation","navigation","getFeatures","query",e),getStatus:e=>s("navigation","navigation","getStatus","query",e)},se={getStatus:e=>s("network-link","networkLink","getStatus","query",e)},le={send:e=>s("notifier","notifier","send","mutation",e),cancel:e=>s("notifier","notifier","cancel","mutation",e),getStatus:e=>s("notifier","notifier","getStatus","query",e)},ce={getStatus:e=>s("numeric-sensor","numericSensor","getStatus","query",e)},de={setOverlay:e=>s("osd","osd","setOverlay","mutation",e),getStatus:e=>s("osd","osd","getStatus","query",e)},ue={feed:e=>s("pet-feeder","petFeeder","feed","mutation",e),cancelFeed:e=>s("pet-feeder","petFeeder","cancelFeed","mutation",e),resetDesiccant:e=>s("pet-feeder","petFeeder","resetDesiccant","mutation",e),markFoodReplenished:e=>s("pet-feeder","petFeeder","markFoodReplenished","mutation",e),callPet:e=>s("pet-feeder","petFeeder","callPet","mutation",e),playSound:e=>s("pet-feeder","petFeeder","playSound","mutation",e),setChildLock:e=>s("pet-feeder","petFeeder","setChildLock","mutation",e),setIndicatorLight:e=>s("pet-feeder","petFeeder","setIndicatorLight","mutation",e),setFeedSound:e=>s("pet-feeder","petFeeder","setFeedSound","mutation",e),setVolume:e=>s("pet-feeder","petFeeder","setVolume","mutation",e),getStatus:e=>s("pet-feeder","petFeeder","getStatus","query",e)},me={getActiveTracks:e=>s("pipeline-analytics","pipelineAnalytics","getActiveTracks","query",e),getTrack:e=>s("pipeline-analytics","pipelineAnalytics","getTrack","query",e),listTracks:e=>s("pipeline-analytics","pipelineAnalytics","listTracks","query",e),listRecentTracks:e=>s("pipeline-analytics","pipelineAnalytics","listRecentTracks","query",e),clearTracks:e=>s("pipeline-analytics","pipelineAnalytics","clearTracks","mutation",e),getMotionEvents:e=>s("pipeline-analytics","pipelineAnalytics","getMotionEvents","query",e),getObjectEvents:e=>s("pipeline-analytics","pipelineAnalytics","getObjectEvents","query",e),getAudioEvents:e=>s("pipeline-analytics","pipelineAnalytics","getAudioEvents","query",e),listEventKinds:e=>s("pipeline-analytics","pipelineAnalytics","listEventKinds","query",e),listEventKindsBatch:e=>s("pipeline-analytics","pipelineAnalytics","listEventKindsBatch","query",e),getSensorEvents:e=>s("pipeline-analytics","pipelineAnalytics","getSensorEvents","query",e),getKeyEvents:e=>s("pipeline-analytics","pipelineAnalytics","getKeyEvents","query",e),getKeyEventsBatch:e=>s("pipeline-analytics","pipelineAnalytics","getKeyEventsBatch","query",e),readLongTermSeries:e=>s("pipeline-analytics","pipelineAnalytics","readLongTermSeries","query",e),getEventDensity:e=>s("pipeline-analytics","pipelineAnalytics","getEventDensity","query",e),getEventDensityBatch:e=>s("pipeline-analytics","pipelineAnalytics","getEventDensityBatch","query",e),pruneEventsBefore:e=>s("pipeline-analytics","pipelineAnalytics","pruneEventsBefore","mutation",e),pruneTracksBefore:e=>s("pipeline-analytics","pipelineAnalytics","pruneTracksBefore","mutation",e),wipeAllAnalytics:e=>s("pipeline-analytics","pipelineAnalytics","wipeAllAnalytics","mutation",e),reconcileFromDisk:e=>s("pipeline-analytics","pipelineAnalytics","reconcileFromDisk","mutation",e),deleteTracks:e=>s("pipeline-analytics","pipelineAnalytics","deleteTracks","mutation",e),setTrackFlags:e=>s("pipeline-analytics","pipelineAnalytics","setTrackFlags","mutation",e),listArchivedDebugNotes:e=>s("pipeline-analytics","pipelineAnalytics","listArchivedDebugNotes","query",e),setTrackRelation:e=>s("pipeline-analytics","pipelineAnalytics","setTrackRelation","mutation",e),clearTrackRelation:e=>s("pipeline-analytics","pipelineAnalytics","clearTrackRelation","mutation",e),setTrackPurity:e=>s("pipeline-analytics","pipelineAnalytics","setTrackPurity","mutation",e),listTrackRelations:e=>s("pipeline-analytics","pipelineAnalytics","listTrackRelations","query",e),listBirthDecisions:e=>s("pipeline-analytics","pipelineAnalytics","listBirthDecisions","query",e),getEventStoreFootprint:e=>s("pipeline-analytics","pipelineAnalytics","getEventStoreFootprint","query",e),getEventMediaFootprintByKind:e=>s("pipeline-analytics","pipelineAnalytics","getEventMediaFootprintByKind","query",e),pruneEvents:e=>s("pipeline-analytics","pipelineAnalytics","pruneEvents","mutation",e),deleteDeviceEvents:e=>s("pipeline-analytics","pipelineAnalytics","deleteDeviceEvents","mutation",e),pauseForStorageMigration:e=>s("pipeline-analytics","pipelineAnalytics","pauseForStorageMigration","mutation",e),resumeForStorageMigration:e=>s("pipeline-analytics","pipelineAnalytics","resumeForStorageMigration","mutation",e),refreshStorageLocationsForMigration:e=>s("pipeline-analytics","pipelineAnalytics","refreshStorageLocationsForMigration","mutation",e),startStorageMigrationMove:e=>s("pipeline-analytics","pipelineAnalytics","startStorageMigrationMove","mutation",e),getStorageMigrationMoveStatus:e=>s("pipeline-analytics","pipelineAnalytics","getStorageMigrationMoveStatus","query",e),cancelStorageMigrationMove:e=>s("pipeline-analytics","pipelineAnalytics","cancelStorageMigrationMove","mutation",e),relocateMedia:e=>s("pipeline-analytics","pipelineAnalytics","relocateMedia","mutation",e),countUnstampedEventMedia:e=>s("pipeline-analytics","pipelineAnalytics","countUnstampedEventMedia","query",e),countRelocatableMedia:e=>s("pipeline-analytics","pipelineAnalytics","countRelocatableMedia","query",e),listRelocateMediaJobs:e=>s("pipeline-analytics","pipelineAnalytics","listRelocateMediaJobs","query",e),cancelRelocateMedia:e=>s("pipeline-analytics","pipelineAnalytics","cancelRelocateMedia","mutation",e),listOpsLog:e=>s("pipeline-analytics","pipelineAnalytics","listOpsLog","query",e),reclaimDebugMedia:e=>s("pipeline-analytics","pipelineAnalytics","reclaimDebugMedia","mutation",e),getMediaReclaimStatus:e=>s("pipeline-analytics","pipelineAnalytics","getMediaReclaimStatus","query",e),getTrainingExportSummary:e=>s("pipeline-analytics","pipelineAnalytics","getTrainingExportSummary","query",e),getTrainingExportUrl:e=>s("pipeline-analytics","pipelineAnalytics","getTrainingExportUrl","query",e),listRetrainStaging:e=>s("pipeline-analytics","pipelineAnalytics","listRetrainStaging","query",e),listRetrainFrames:e=>s("pipeline-analytics","pipelineAnalytics","listRetrainFrames","query",e),selectRetrainFrames:e=>s("pipeline-analytics","pipelineAnalytics","selectRetrainFrames","mutation",e),deselectRetrainFrame:e=>s("pipeline-analytics","pipelineAnalytics","deselectRetrainFrame","mutation",e),getRetrainFrameImage:e=>s("pipeline-analytics","pipelineAnalytics","getRetrainFrameImage","query",e),proposeRetrainAnnotations:e=>s("pipeline-analytics","pipelineAnalytics","proposeRetrainAnnotations","mutation",e),listRetrainAnnotations:e=>s("pipeline-analytics","pipelineAnalytics","listRetrainAnnotations","query",e),saveRetrainAnnotations:e=>s("pipeline-analytics","pipelineAnalytics","saveRetrainAnnotations","mutation",e),completeRetrainTrack:e=>s("pipeline-analytics","pipelineAnalytics","completeRetrainTrack","mutation",e),restageRetrainTrack:e=>s("pipeline-analytics","pipelineAnalytics","restageRetrainTrack","mutation",e),getRetrainExportUrl:e=>s("pipeline-analytics","pipelineAnalytics","getRetrainExportUrl","query",e),getEventMedia:e=>s("pipeline-analytics","pipelineAnalytics","getEventMedia","query",e),getTrackMedia:e=>s("pipeline-analytics","pipelineAnalytics","getTrackMedia","query",e),listTrackMedia:e=>s("pipeline-analytics","pipelineAnalytics","listTrackMedia","query",e),listEventMedia:e=>s("pipeline-analytics","pipelineAnalytics","listEventMedia","query",e),ownersWithMedia:e=>s("pipeline-analytics","pipelineAnalytics","ownersWithMedia","query",e),searchObjectEvents:e=>s("pipeline-analytics","pipelineAnalytics","searchObjectEvents","query",e),wipeObjectEmbeddings:e=>s("pipeline-analytics","pipelineAnalytics","wipeObjectEmbeddings","mutation",e),rebuildObjectEmbeddings:e=>s("pipeline-analytics","pipelineAnalytics","rebuildObjectEmbeddings","mutation",e),getObjectEmbeddingRebuildStatus:e=>s("pipeline-analytics","pipelineAnalytics","getObjectEmbeddingRebuildStatus","query",e),getDeviceSettingsContribution:e=>s("pipeline-analytics","pipelineAnalytics","getDeviceSettingsContribution","query",e),getDeviceLiveContribution:e=>s("pipeline-analytics","pipelineAnalytics","getDeviceLiveContribution","query",e),applyDeviceSettingsPatch:e=>s("pipeline-analytics","pipelineAnalytics","applyDeviceSettingsPatch","mutation",e)},pe={getStatus:e=>s("power-meter","powerMeter","getStatus","query",e)},ge={getStatus:e=>s("presence","presence","getStatus","query",e)},ye={getStatus:e=>s("pressure-sensor","pressureSensor","getStatus","query",e)},ve={getOptions:e=>s("privacy-mask","privacyMask","getOptions","query",e),setMask:e=>s("privacy-mask","privacyMask","setMask","mutation",e),setAudioEnabled:e=>s("privacy-mask","privacyMask","setAudioEnabled","mutation",e),getStatus:e=>s("privacy-mask","privacyMask","getStatus","query",e)},be={move:e=>s("ptz","ptz","move","mutation",e),continuousMove:e=>s("ptz","ptz","continuousMove","mutation",e),stop:e=>s("ptz","ptz","stop","mutation",e),getPresets:e=>s("ptz","ptz","getPresets","query",e),goToPreset:e=>s("ptz","ptz","goToPreset","mutation",e),savePreset:e=>s("ptz","ptz","savePreset","mutation",e),deletePreset:e=>s("ptz","ptz","deletePreset","mutation",e),getOptions:e=>s("ptz","ptz","getOptions","query",e),goHome:e=>s("ptz","ptz","goHome","mutation",e),getHomePreset:e=>s("ptz","ptz","getHomePreset","query",e),setHomePreset:e=>s("ptz","ptz","setHomePreset","mutation",e),captureHomeHere:e=>s("ptz","ptz","captureHomeHere","mutation",e),getHomeReturn:e=>s("ptz","ptz","getHomeReturn","query",e),setHomeReturn:e=>s("ptz","ptz","setHomeReturn","mutation",e),getPosition:e=>s("ptz","ptz","getPosition","query",e),setAutofocus:e=>s("ptz","ptz","setAutofocus","mutation",e),getStatus:e=>s("ptz","ptz","getStatus","query",e)},fe={getStatus:e=>s("ptz-autotrack","ptzAutotrack","getStatus","query",e),setEnabled:e=>s("ptz-autotrack","ptzAutotrack","setEnabled","mutation",e),getSettings:e=>s("ptz-autotrack","ptzAutotrack","getSettings","query",e),setSettings:e=>s("ptz-autotrack","ptzAutotrack","setSettings","mutation",e)},ze={reboot:e=>s("reboot","reboot","reboot","mutation",e)},he={listSources:e=>s("recording","recording","listSources","query",e),getAvailability:e=>s("recording","recording","getAvailability","query",e),getDaysWithRecordings:e=>s("recording","recording","getDaysWithRecordings","query",e),getPlayback:e=>s("recording","recording","getPlayback","query",e),getPlaybackOptions:e=>s("recording","recording","getPlaybackOptions","query",e)},Se={getOptions:e=>s("recording-onboard","recordingOnboard","getOptions","query",e),setSettings:e=>s("recording-onboard","recordingOnboard","setSettings","mutation",e),getStatus:e=>s("recording-onboard","recordingOnboard","getStatus","query",e)},ke={getStatus:e=>s("recording-signal","recordingSignal","getStatus","query",e)},qe={listScenes:e=>s("scene-monitor","sceneMonitor","listScenes","query",e),listScenesBatch:e=>s("scene-monitor","sceneMonitor","listScenesBatch","query",e),createScene:e=>s("scene-monitor","sceneMonitor","createScene","mutation",e),updateScene:e=>s("scene-monitor","sceneMonitor","updateScene","mutation",e),deleteScene:e=>s("scene-monitor","sceneMonitor","deleteScene","mutation",e),captureReference:e=>s("scene-monitor","sceneMonitor","captureReference","mutation",e),deleteReference:e=>s("scene-monitor","sceneMonitor","deleteReference","mutation",e),recheckNow:e=>s("scene-monitor","sceneMonitor","recheckNow","mutation",e),resetScene:e=>s("scene-monitor","sceneMonitor","resetScene","mutation",e),getStatus:e=>s("scene-monitor","sceneMonitor","getStatus","query",e)},Ce={run:e=>s("script-runner","scriptRunner","run","mutation",e),stop:e=>s("script-runner","scriptRunner","stop","mutation",e),getStatus:e=>s("script-runner","scriptRunner","getStatus","query",e)},Ae={getStatus:e=>s("smoke","smoke","getStatus","query",e)},we={getSnapshot:e=>s("snapshot","snapshot","getSnapshot","query",e),invalidateCache:e=>s("snapshot","snapshot","invalidateCache","mutation",e),getSnapshotOverview:e=>s("snapshot","snapshot","getSnapshotOverview","query",e),getDebugState:e=>s("snapshot","snapshot","getDebugState","query",e),getSnapshotLinks:e=>s("snapshot","snapshot","getSnapshotLinks","query",e),getStatus:e=>s("snapshot","snapshot","getStatus","query",e),getDeviceSettingsContribution:e=>s("snapshot","snapshot","getDeviceSettingsContribution","query",e),getDeviceLiveContribution:e=>s("snapshot","snapshot","getDeviceLiveContribution","query",e),applyDeviceSettingsPatch:e=>s("snapshot","snapshot","applyDeviceSettingsPatch","mutation",e)},Me={getCatalog:e=>s("stream-catalog","streamCatalog","getCatalog","query",e)},De={getOptions:e=>s("stream-params","streamParams","getOptions","query",e),setProfile:e=>s("stream-params","streamParams","setProfile","mutation",e),getConfigSchema:e=>s("stream-params","streamParams","getConfigSchema","query",e),getStatus:e=>s("stream-params","streamParams","getStatus","query",e)},Pe={listSignals:e=>s("stream-signals","streamSignals","listSignals","query",e)},Ie={setState:e=>s("switch","switch","setState","mutation",e),getStatus:e=>s("switch","switch","getStatus","query",e)},Ee={getStatus:e=>s("tamper","tamper","getStatus","query",e)},je={getStatus:e=>s("temperature-sensor","temperatureSensor","getStatus","query",e)},xe={installUpdate:e=>s("update","update","installUpdate","mutation",e),getStatus:e=>s("update","update","getStatus","query",e)},Oe={start:e=>s("vacuum-control","vacuumControl","start","mutation",e),pause:e=>s("vacuum-control","vacuumControl","pause","mutation",e),stop:e=>s("vacuum-control","vacuumControl","stop","mutation",e),returnToBase:e=>s("vacuum-control","vacuumControl","returnToBase","mutation",e),locate:e=>s("vacuum-control","vacuumControl","locate","mutation",e),setFanSpeed:e=>s("vacuum-control","vacuumControl","setFanSpeed","mutation",e),getStatus:e=>s("vacuum-control","vacuumControl","getStatus","query",e)},Te={open:e=>s("valve","valve","open","mutation",e),close:e=>s("valve","valve","close","mutation",e),stop:e=>s("valve","valve","stop","mutation",e),setPosition:e=>s("valve","valve","setPosition","mutation",e),getStatus:e=>s("valve","valve","getStatus","query",e)},Re={getStatus:e=>s("vibration","vibration","getStatus","query",e)},Be={listClips:e=>s("videoclips","videoclips","listClips","query",e),listSources:e=>s("videoclips","videoclips","listSources","query",e),getClipPlayback:e=>s("videoclips","videoclips","getClipPlayback","query",e),readClipBytes:e=>s("videoclips","videoclips","readClipBytes","query",e),offerClipBytes:e=>s("videoclips","videoclips","offerClipBytes","query",e),dialClipStream:e=>s("videoclips","videoclips","dialClipStream","query",e),getPlaybackOptions:e=>s("videoclips","videoclips","getPlaybackOptions","query",e)},Le={setTargetTemp:e=>s("water-heater","waterHeater","setTargetTemp","mutation",e),setOperationMode:e=>s("water-heater","waterHeater","setOperationMode","mutation",e),setAway:e=>s("water-heater","waterHeater","setAway","mutation",e),getStatus:e=>s("water-heater","waterHeater","getStatus","query",e)},Fe={getStatus:e=>s("weather","weather","getStatus","query",e)},Ne={listStreams:e=>s("webrtc-session","webrtcSession","listStreams","query",e),createSession:e=>s("webrtc-session","webrtcSession","createSession","mutation",e),handleOffer:e=>s("webrtc-session","webrtcSession","handleOffer","mutation",e),handleAnswer:e=>s("webrtc-session","webrtcSession","handleAnswer","mutation",e),addIceCandidate:e=>s("webrtc-session","webrtcSession","addIceCandidate","mutation",e),getIceCandidates:e=>s("webrtc-session","webrtcSession","getIceCandidates","query",e),closeSession:e=>s("webrtc-session","webrtcSession","closeSession","mutation",e),hasAdaptiveBitrate:e=>s("webrtc-session","webrtcSession","hasAdaptiveBitrate","query",e),getSessionState:e=>s("webrtc-session","webrtcSession","getSessionState","query",e),getSessionDebug:e=>s("webrtc-session","webrtcSession","getSessionDebug","query",e)},_e={getCurrentSnapshot:e=>s("zone-analytics","zoneAnalytics","getCurrentSnapshot","query",e),getCurrentSnapshotBatch:e=>s("zone-analytics","zoneAnalytics","getCurrentSnapshotBatch","query",e),getZoneHistory:e=>s("zone-analytics","zoneAnalytics","getZoneHistory","query",e),getCameraHistory:e=>s("zone-analytics","zoneAnalytics","getCameraHistory","query",e),getUnzonedHistory:e=>s("zone-analytics","zoneAnalytics","getUnzonedHistory","query",e)},Ke={listRules:e=>s("zone-rules","zoneRules","listRules","query",e),setRules:e=>s("zone-rules","zoneRules","setRules","mutation",e)},Ue={listZones:e=>s("zones","zones","listZones","query",e),addZone:e=>s("zones","zones","addZone","mutation",e),removeZone:e=>s("zones","zones","removeZone","mutation",e),updateZone:e=>s("zones","zones","updateZone","mutation",e)},Ge={getDeviceSettings:e=>l("addonSettings","getDeviceSettings","query",e),updateDeviceSettings:e=>l("addonSettings","updateDeviceSettings","mutation",e)},He={detachDevice:e=>l("audioAnalyzer","detachDevice","mutation",e)},We={getStatus:e=>l("deviceAdoption","getStatus","query",e)},Ve={getDeviceSettingsContribution:e=>l("deviceExport","getDeviceSettingsContribution","query",e),getDeviceLiveContribution:e=>l("deviceExport","getDeviceLiveContribution","query",e),applyDeviceSettingsPatch:e=>l("deviceExport","applyDeviceSettingsPatch","mutation",e)},Ze={loadConfig:e=>l("deviceManager","loadConfig","query",e),loadRuntimeState:e=>l("deviceManager","loadRuntimeState","query",e),loadMeta:e=>l("deviceManager","loadMeta","query",e),setName:e=>l("deviceManager","setName","mutation",e),setLocation:e=>l("deviceManager","setLocation","mutation",e),setType:e=>l("deviceManager","setType","mutation",e),setIntegrationId:e=>l("deviceManager","setIntegrationId","mutation",e),setLinkDeviceId:e=>l("deviceManager","setLinkDeviceId","mutation",e),setPrimaryChildEntityId:e=>l("deviceManager","setPrimaryChildEntityId","mutation",e),setChildLayout:e=>l("deviceManager","setChildLayout","mutation",e),setDisplay:e=>l("deviceManager","setDisplay","mutation",e),getWireableFields:e=>l("deviceManager","getWireableFields","query",e),setRole:e=>l("deviceManager","setRole","mutation",e),applyInitialMeta:e=>l("deviceManager","applyInitialMeta","mutation",e),setMetadata:e=>l("deviceManager","setMetadata","mutation",e),setDisabled:e=>l("deviceManager","setDisabled","mutation",e),getDevice:e=>l("deviceManager","getDevice","query",e),getLinkedDevices:e=>l("deviceManager","getLinkedDevices","query",e),getStreamSources:e=>l("deviceManager","getStreamSources","query",e),getConfigSchema:e=>l("deviceManager","getConfigSchema","query",e),getSettingsSchema:e=>l("deviceManager","getSettingsSchema","query",e),updateConfig:e=>l("deviceManager","updateConfig","mutation",e),enable:e=>l("deviceManager","enable","mutation",e),disable:e=>l("deviceManager","disable","mutation",e),remove:e=>l("deviceManager","remove","mutation",e),getStreamProfileMap:e=>l("deviceManager","getStreamProfileMap","query",e),setStreamProfileMap:e=>l("deviceManager","setStreamProfileMap","mutation",e),probeStreams:e=>l("deviceManager","probeStreams","mutation",e),getBindings:e=>l("deviceManager","getBindings","query",e),setWrapperActive:e=>l("deviceManager","setWrapperActive","mutation",e),getWrapperActivation:e=>l("deviceManager","getWrapperActivation","query",e),getDeviceSettingsAggregate:e=>l("deviceManager","getDeviceSettingsAggregate","query",e),getDeviceLiveInfoAggregate:e=>l("deviceManager","getDeviceLiveInfoAggregate","query",e),getDeviceAggregate:e=>l("deviceManager","getDeviceAggregate","query",e),runDeviceAction:e=>l("deviceManager","runDeviceAction","mutation",e),updateDeviceField:e=>l("deviceManager","updateDeviceField","mutation",e),updateDeviceFieldsBatch:e=>l("deviceManager","updateDeviceFieldsBatch","mutation",e),testField:e=>l("deviceManager","testField","mutation",e),getDeviceStatusAggregate:e=>l("deviceManager","getDeviceStatusAggregate","query",e)},$e={getSnapshot:e=>l("deviceState","getSnapshot","query",e),getCapSlice:e=>l("deviceState","getCapSlice","query",e),setCapSlice:e=>l("deviceState","setCapSlice","mutation",e),claimFields:e=>l("deviceState","claimFields","mutation",e),patchOwnedFields:e=>l("deviceState","patchOwnedFields","mutation",e),releaseClaim:e=>l("deviceState","releaseClaim","mutation",e),getNativeCapSlice:e=>l("deviceState","getNativeCapSlice","query",e)},Je={listRecentFaces:e=>l("faceGallery","listRecentFaces","query",e),getFaceByTrack:e=>l("faceGallery","getFaceByTrack","query",e)},Ye={getDeviceStats:e=>l("networkQuality","getDeviceStats","query",e),reportClientStats:e=>l("networkQuality","reportClientStats","mutation",e)},Qe={setDeviceMuted:e=>l("notificationRules","setDeviceMuted","mutation",e)},Xe={getDeviceOsd:e=>l("osdManager","getDeviceOsd","query",e),getSourceCatalog:e=>l("osdManager","getSourceCatalog","query",e),setSlotBinding:e=>l("osdManager","setSlotBinding","mutation",e),clearSlotBinding:e=>l("osdManager","clearSlotBinding","mutation",e),previewSlot:e=>l("osdManager","previewSlot","mutation",e),renderDevice:e=>l("osdManager","renderDevice","mutation",e)},et={runPipeline:e=>l("pipelineExecutor","runPipeline","mutation",e),runPipelineBatch:e=>l("pipelineExecutor","runPipelineBatch","mutation",e)},tt={assignPipeline:e=>l("pipelineOrchestrator","assignPipeline","mutation",e),unassignPipeline:e=>l("pipelineOrchestrator","unassignPipeline","mutation",e),setPipelineDevicePin:e=>l("pipelineOrchestrator","setPipelineDevicePin","mutation",e),getPipelineDevicePin:e=>l("pipelineOrchestrator","getPipelineDevicePin","query",e),getPipelineAssignment:e=>l("pipelineOrchestrator","getPipelineAssignment","query",e),getCameraMetrics:e=>l("pipelineOrchestrator","getCameraMetrics","query",e),assignAudio:e=>l("pipelineOrchestrator","assignAudio","mutation",e),unassignAudio:e=>l("pipelineOrchestrator","unassignAudio","mutation",e),getAudioAssignment:e=>l("pipelineOrchestrator","getAudioAssignment","query",e),getCameraSettings:e=>l("pipelineOrchestrator","getCameraSettings","query",e),setCameraStepToggle:e=>l("pipelineOrchestrator","setCameraStepToggle","mutation",e),getCameraStepOverrides:e=>l("pipelineOrchestrator","getCameraStepOverrides","query",e),setCameraStepOverride:e=>l("pipelineOrchestrator","setCameraStepOverride","mutation",e),setCameraPipelineForAgent:e=>l("pipelineOrchestrator","setCameraPipelineForAgent","mutation",e),resolvePipeline:e=>l("pipelineOrchestrator","resolvePipeline","query",e),getCameraSwitches:e=>l("pipelineOrchestrator","getCameraSwitches","query",e),setCameraSwitch:e=>l("pipelineOrchestrator","setCameraSwitch","mutation",e),getCameraStatus:e=>l("pipelineOrchestrator","getCameraStatus","query",e),getDeviceSettingsContribution:e=>l("pipelineOrchestrator","getDeviceSettingsContribution","query",e),getDeviceLiveContribution:e=>l("pipelineOrchestrator","getDeviceLiveContribution","query",e),applyDeviceSettingsPatch:e=>l("pipelineOrchestrator","applyDeviceSettingsPatch","mutation",e)},it={detachCamera:e=>l("pipelineRunner","detachCamera","mutation",e),getCameraMetrics:e=>l("pipelineRunner","getCameraMetrics","query",e),requestOccupancyBurst:e=>l("pipelineRunner","requestOccupancyBurst","mutation",e),runDetailSubtree:e=>l("pipelineRunner","runDetailSubtree","mutation",e),parkTrackFrame:e=>l("pipelineRunner","parkTrackFrame","mutation",e),getParkedTrackFrame:e=>l("pipelineRunner","getParkedTrackFrame","query",e),releaseParkedTrackFrames:e=>l("pipelineRunner","releaseParkedTrackFrames","mutation",e)},nt={listPlates:e=>l("plateGallery","listPlates","query",e),getPlateByTrack:e=>l("plateGallery","getPlateByTrack","query",e)},at={getDeviceConfig:e=>l("recordingArchive","getDeviceConfig","query",e),locateSegment:e=>l("recordingArchive","locateSegment","query",e),readSegmentBytes:e=>l("recordingArchive","readSegmentBytes","query",e),readGopBytes:e=>l("recordingArchive","readGopBytes","query",e),readWindowBytes:e=>l("recordingArchive","readWindowBytes","query",e),setDeviceConfig:e=>l("recordingArchive","setDeviceConfig","mutation",e),rescanStorage:e=>l("recordingArchive","rescanStorage","mutation",e),pruneFootage:e=>l("recordingArchive","pruneFootage","mutation",e),deleteFootprint:e=>l("recordingArchive","deleteFootprint","mutation",e),renderGif:e=>l("recordingArchive","renderGif","mutation",e),renderClip:e=>l("recordingArchive","renderClip","mutation",e),getStatus:e=>l("recordingArchive","getStatus","query",e),getDeviceSettingsContribution:e=>l("recordingArchive","getDeviceSettingsContribution","query",e),getDeviceLiveContribution:e=>l("recordingArchive","getDeviceLiveContribution","query",e),applyDeviceSettingsPatch:e=>l("recordingArchive","applyDeviceSettingsPatch","mutation",e)},rt={listExports:e=>l("recordingExport","listExports","query",e)},ot={reportStreamSignal:e=>l("streamBroker","reportStreamSignal","mutation",e),publishCameraStream:e=>l("streamBroker","publishCameraStream","mutation",e),retractCameraStream:e=>l("streamBroker","retractCameraStream","mutation",e),assignProfile:e=>l("streamBroker","assignProfile","mutation",e),unassignProfile:e=>l("streamBroker","unassignProfile","mutation",e),forgetDeviceHardware:e=>l("streamBroker","forgetDeviceHardware","mutation",e),renderPreBufferClip:e=>l("streamBroker","renderPreBufferClip","mutation",e),produceEventMedia:e=>l("streamBroker","produceEventMedia","mutation",e),restartProfile:e=>l("streamBroker","restartProfile","mutation",e),getDeviceAudioMute:e=>l("streamBroker","getDeviceAudioMute","query",e),setDeviceAudioMute:e=>l("streamBroker","setDeviceAudioMute","mutation",e),getDeviceSettingsContribution:e=>l("streamBroker","getDeviceSettingsContribution","query",e),getDeviceLiveContribution:e=>l("streamBroker","getDeviceLiveContribution","query",e),applyDeviceSettingsPatch:e=>l("streamBroker","applyDeviceSettingsPatch","mutation",e)};return Object.assign({deviceId:t.deviceId,binding:t,state:{airQualitySensor:bn(a,t.deviceId,"air-quality-sensor"),alarmPanel:bn(a,t.deviceId,"alarm-panel"),ambientLightSensor:bn(a,t.deviceId,"ambient-light-sensor"),audioMetrics:bn(a,t.deviceId,"audio-metrics"),automationControl:bn(a,t.deviceId,"automation-control"),battery:bn(a,t.deviceId,"battery"),binary:bn(a,t.deviceId,"binary"),brightness:bn(a,t.deviceId,"brightness"),cameraStreams:bn(a,t.deviceId,"camera-streams"),carbonMonoxide:bn(a,t.deviceId,"carbon-monoxide"),climateControl:bn(a,t.deviceId,"climate-control"),color:bn(a,t.deviceId,"color"),connectivity:bn(a,t.deviceId,"connectivity"),consumables:bn(a,t.deviceId,"consumables"),contact:bn(a,t.deviceId,"contact"),control:bn(a,t.deviceId,"control"),cover:bn(a,t.deviceId,"cover"),dayNight:bn(a,t.deviceId,"day-night"),deviceDiscovery:bn(a,t.deviceId,"device-discovery"),deviceStatus:bn(a,t.deviceId,"device-status"),doorbell:bn(a,t.deviceId,"doorbell"),enumSensor:bn(a,t.deviceId,"enum-sensor"),eventEmitter:bn(a,t.deviceId,"event-emitter"),fanControl:bn(a,t.deviceId,"fan-control"),featureProbe:bn(a,t.deviceId,"feature-probe"),flood:bn(a,t.deviceId,"flood"),gas:bn(a,t.deviceId,"gas"),humidifier:bn(a,t.deviceId,"humidifier"),humiditySensor:bn(a,t.deviceId,"humidity-sensor"),image:bn(a,t.deviceId,"image"),imageSettings:bn(a,t.deviceId,"image-settings"),intercom:bn(a,t.deviceId,"intercom"),lawnMowerControl:bn(a,t.deviceId,"lawn-mower-control"),lockControl:bn(a,t.deviceId,"lock-control"),mediaPlayer:bn(a,t.deviceId,"media-player"),motion:bn(a,t.deviceId,"motion"),motionTrigger:bn(a,t.deviceId,"motion-trigger"),motionZones:bn(a,t.deviceId,"motion-zones"),nativeObjectDetection:bn(a,t.deviceId,"native-object-detection"),navigation:bn(a,t.deviceId,"navigation"),networkLink:bn(a,t.deviceId,"network-link"),notifier:bn(a,t.deviceId,"notifier"),numericSensor:bn(a,t.deviceId,"numeric-sensor"),petFeeder:bn(a,t.deviceId,"pet-feeder"),powerMeter:bn(a,t.deviceId,"power-meter"),presence:bn(a,t.deviceId,"presence"),pressureSensor:bn(a,t.deviceId,"pressure-sensor"),privacyMask:bn(a,t.deviceId,"privacy-mask"),ptzAutotrack:bn(a,t.deviceId,"ptz-autotrack"),recordingOnboard:bn(a,t.deviceId,"recording-onboard"),recordingSignal:bn(a,t.deviceId,"recording-signal"),sceneMonitor:bn(a,t.deviceId,"scene-monitor"),scriptRunner:bn(a,t.deviceId,"script-runner"),smoke:bn(a,t.deviceId,"smoke"),streamCatalog:bn(a,t.deviceId,"stream-catalog"),streamParams:bn(a,t.deviceId,"stream-params"),streamSignals:bn(a,t.deviceId,"stream-signals"),switch:bn(a,t.deviceId,"switch"),tamper:bn(a,t.deviceId,"tamper"),temperatureSensor:bn(a,t.deviceId,"temperature-sensor"),update:bn(a,t.deviceId,"update"),vacuumControl:bn(a,t.deviceId,"vacuum-control"),valve:bn(a,t.deviceId,"valve"),vibration:bn(a,t.deviceId,"vibration"),waterHeater:bn(a,t.deviceId,"water-heater"),weather:bn(a,t.deviceId,"weather"),zoneAnalytics:bn(a,t.deviceId,"zone-analytics"),zoneRules:bn(a,t.deviceId,"zone-rules"),zones:bn(a,t.deviceId,"zones")}},c("accessories")?{accessories:d}:{},c("air-quality-sensor")?{airQualitySensor:u}:{},c("alarm-panel")?{alarmPanel:m}:{},c("ambient-light-sensor")?{ambientLightSensor:p}:{},c("audio-analysis")?{audioAnalysis:g}:{},c("audio-metrics")?{audioMetrics:y}:{},c("automation-control")?{automationControl:v}:{},c("battery")?{battery:b}:{},c("binary")?{binary:f}:{},c("brightness")?{brightness:z}:{},c("button")?{button:h}:{},c("camera-credentials")?{cameraCredentials:S}:{},c("camera-grid-layout")?{cameraGridLayout:k}:{},c("camera-pipeline-config")?{cameraPipelineConfig:q}:{},c("camera-streams")?{cameraStreams:C}:{},c("carbon-monoxide")?{carbonMonoxide:A}:{},c("climate-control")?{climateControl:w}:{},c("color")?{color:M}:{},c("connectivity")?{connectivity:D}:{},c("consumables")?{consumables:P}:{},c("contact")?{contact:I}:{},c("control")?{control:E}:{},c("cover")?{cover:j}:{},c("day-night")?{dayNight:x}:{},c("detection-pipeline")?{detectionPipeline:O}:{},c("device-admin-link")?{deviceAdminLink:T}:{},c("device-discovery")?{deviceDiscovery:R}:{},c("device-extension")?{deviceExtension:B}:{},c("device-ops")?{deviceOps:L}:{},c("device-status")?{deviceStatus:F}:{},c("doorbell")?{doorbell:N}:{},c("enum-sensor")?{enumSensor:_}:{},c("event-emitter")?{eventEmitter:K}:{},c("fan-control")?{fanControl:U}:{},c("feature-probe")?{featureProbe:G}:{},c("flood")?{flood:H}:{},c("gas")?{gas:W}:{},c("humidifier")?{humidifier:V}:{},c("humidity-sensor")?{humiditySensor:Z}:{},c("image")?{image:$}:{},c("image-settings")?{imageSettings:J}:{},c("intercom")?{intercom:Y}:{},c("lawn-mower-control")?{lawnMowerControl:Q}:{},c("lock-control")?{lockControl:X}:{},c("media-player")?{mediaPlayer:ee}:{},c("motion")?{motion:te}:{},c("motion-detection")?{motionDetection:ie}:{},c("motion-trigger")?{motionTrigger:ne}:{},c("motion-zones")?{motionZones:ae}:{},c("native-object-detection")?{nativeObjectDetection:re}:{},c("navigation")?{navigation:oe}:{},c("network-link")?{networkLink:se}:{},c("notifier")?{notifier:le}:{},c("numeric-sensor")?{numericSensor:ce}:{},c("osd")?{osd:de}:{},c("pet-feeder")?{petFeeder:ue}:{},c("pipeline-analytics")?{pipelineAnalytics:me}:{},c("power-meter")?{powerMeter:pe}:{},c("presence")?{presence:ge}:{},c("pressure-sensor")?{pressureSensor:ye}:{},c("privacy-mask")?{privacyMask:ve}:{},c("ptz")?{ptz:be}:{},c("ptz-autotrack")?{ptzAutotrack:fe}:{},c("reboot")?{reboot:ze}:{},c("recording")?{recording:he}:{},c("recording-onboard")?{recordingOnboard:Se}:{},c("recording-signal")?{recordingSignal:ke}:{},c("scene-monitor")?{sceneMonitor:qe}:{},c("script-runner")?{scriptRunner:Ce}:{},c("smoke")?{smoke:Ae}:{},c("snapshot")?{snapshot:we}:{},c("stream-catalog")?{streamCatalog:Me}:{},c("stream-params")?{streamParams:De}:{},c("stream-signals")?{streamSignals:Pe}:{},c("switch")?{switch:Ie}:{},c("tamper")?{tamper:Ee}:{},c("temperature-sensor")?{temperatureSensor:je}:{},c("update")?{update:xe}:{},c("vacuum-control")?{vacuumControl:Oe}:{},c("valve")?{valve:Te}:{},c("vibration")?{vibration:Re}:{},c("videoclips")?{videoclips:Be}:{},c("water-heater")?{waterHeater:Le}:{},c("weather")?{weather:Fe}:{},c("webrtc-session")?{webrtcSession:Ne}:{},c("zone-analytics")?{zoneAnalytics:_e}:{},c("zone-rules")?{zoneRules:Ke}:{},c("zones")?{zones:Ue}:{},{addonSettings:Ge,audioAnalyzer:He,deviceAdoption:We,deviceExport:Ve,deviceManager:Ze,deviceState:$e,faceGallery:Je,networkQuality:Ye,notificationRules:Qe,osdManager:Xe,pipelineExecutor:et,pipelineOrchestrator:tt,pipelineRunner:it,plateGallery:nt,recordingArchive:at,recordingExport:rt,streamBroker:ot})}var zn=class{stateMirror=new Map;bindings=new Map;devices=new Map;handleListeners=new Map;globalStateListeners=new Set;capListeners=new Map;deviceListeners=new Map;addedListeners=new Set;removedListeners=new Set;pendingWaits=new Set;bridges=[];initialized=!1;initPromise=null;constructor(e){this.api=e,this.stateSource=vn(this.stateMirror,this.handleListeners,this.api)}async init(e=15e3){if(!this.initialized){if(this.initPromise)return this.initPromise;this.initPromise=(async()=>{const t=(t,i)=>Number.isFinite(e)?new Promise((n,a)=>{const r=setTimeout(()=>a(new Error(`SystemMirror.init: '${i}' timed out after ${e}ms`)),e);t.then(e=>{clearTimeout(r),n(e)},e=>{clearTimeout(r),a(e)})}):t,[i,n,a]=await Promise.all([t(this.api.deviceManager.getAllBindings.query({}),"deviceManager.getAllBindings"),t(this.api.deviceState.getAllSnapshots.query({}),"deviceState.getAllSnapshots"),t(this.api.deviceManager.listAll.query({}),"deviceManager.listAll")]);for(const e of i)this.bindings.set(e.deviceId,e);for(const[e,t]of Object.entries(n)){const i=Number(e);if(!Number.isFinite(i))continue;const n=new Map;for(const[e,i]of Object.entries(t))n.set(e,i);this.stateMirror.set(i,n)}for(const e of a)this.devices.set(e.id,e);try{this.subscribeBus()}catch(e){}this.initialized=!0})();try{await this.initPromise}finally{this.initPromise=null}}}isReady(){return this.initialized}async awaitReady(){if(!this.initialized)return this.initPromise?this.initPromise:this.init()}dispose(){for(const e of this.bridges)try{e.unsubscribe()}catch{}this.bridges=[],this.handleListeners.clear(),this.globalStateListeners.clear(),this.capListeners.clear(),this.deviceListeners.clear(),this.addedListeners.clear(),this.removedListeners.clear(),this.pendingWaits.clear(),this.initialized=!1}getDeviceById(e){const t=this.bindings.get(e);return t?fn(this.api,t,{stateSource:this.stateSource}):null}getDeviceByName(e){for(const t of this.devices.values())if(t.name===e)return this.getDeviceById(t.id);return null}getDeviceByStableId(e){for(const t of this.devices.values())if(t.stableId===e)return this.getDeviceById(t.id);return null}getDevicesByAddon(e){return this.query({addonId:e})}getDevicesByType(e){return this.query({type:e})}getDeviceInfo(e){return this.devices.get(e)??null}getAllDevices(){const e=[];for(const t of this.bindings.keys()){const i=this.getDeviceById(t);i&&e.push(i)}return e}filterByCap(e){return this.query({caps:e})}query(e={}){const t=[];for(const[i,n]of this.bindings){const a=this.devices.get(i);if(void 0!==e.id&&!hn(i,e.id))continue;if(void 0!==e.stableId){if(!a)continue;if(!hn(a.stableId,e.stableId))continue}if(void 0!==e.addonId){if(!a)continue;if(!hn(a.addonId,e.addonId))continue}if(void 0!==e.type){if(!a)continue;if(!hn(a.type,e.type))continue}if(void 0!==e.caps){const t=Sn(e.caps),i=new Set(n.entries.map(e=>e.capName));if(!t.every(e=>i.has(e)))continue}if(void 0!==e.anyCap){const t=Sn(e.anyCap),i=new Set(n.entries.map(e=>e.capName));if(!t.some(e=>i.has(e)))continue}if(void 0!==e.name){if(!a)continue;if(!kn(a.name,e.name))continue}if(void 0!==e.online){if(!a)continue;if(a.online!==e.online)continue}if(void 0!==e.parentDeviceId){if(!a)continue;const t=e.parentDeviceId;if((a.parentDeviceId??null)!==t)continue}if(void 0!==e.feature){if(!a)continue;if(!Sn(e.feature).every(e=>a.features.includes(e)))continue}if(void 0!==e.isCamera){if(!a)continue;if(a.isCamera!==e.isCamera)continue}const r=this.getDeviceById(i);if(r){if(e.where&&a){if(!e.where(a,r))continue}else if(e.where&&!a)continue;t.push(r)}}return t}whereState(e,t){const i=[];for(const[n,a]of this.stateMirror){const r=a.get(e);if(!r)continue;if(!t(r,n))continue;const o=this.getDeviceById(n);o&&i.push(o)}return i}mapState(e,t){const i=[];for(const[n,a]of this.stateMirror){const r=a.get(e);r&&i.push(t(r,n))}return i}findState(e,t){for(const[i,n]of this.stateMirror){const a=n.get(e);if(a&&t(a,i))return this.getDeviceById(i)}return null}countByCap(e){let t=0;for(const i of this.bindings.values())i.entries.some(t=>t.capName===e)&&t++;return t}countByState(e,t){let i=0;for(const[n,a]of this.stateMirror){const r=a.get(e);r&&(t(r,n)&&i++)}return i}listen(e){return this.globalStateListeners.add(e),()=>{this.globalStateListeners.delete(e)}}listenCap(e,t){let i=this.capListeners.get(e);return i||(i=new Set,this.capListeners.set(e,i)),i.add(t),()=>{i.delete(t),0===i.size&&this.capListeners.delete(e)}}listenDevice(e,t){let i=this.deviceListeners.get(e);return i||(i=new Set,this.deviceListeners.set(e,i)),i.add(t),()=>{i.delete(t),0===i.size&&this.deviceListeners.delete(e)}}onDeviceAdded(e){return this.addedListeners.add(e),()=>{this.addedListeners.delete(e)}}onDeviceRemoved(e){return this.removedListeners.add(e),()=>{this.removedListeners.delete(e)}}waitForState(e,t,i,n=3e4){return new Promise((a,r)=>{const o=(()=>{const n=this.stateMirror.get(e)?.get(t);return n&&i(n)?n:null})();if(o)return void a(o);let s=null;const l=this.listenDevice(e,(e,n,r)=>{n===t&&r&&i(r)&&(s&&clearTimeout(s),l(),a(r))});Number.isFinite(n)&&(s=setTimeout(()=>{l(),r(new Error(`waitForState timed out after ${n}ms (deviceId=${e}, capName=${t})`))},n))})}waitForDevice(e,t=3e4){return new Promise((i,n)=>{const a=this.getDeviceById(e);if(a)return void i(a);let r=null;const o=this.onDeviceAdded(t=>{if(t!==e)return;const n=this.getDeviceById(t);n&&(r&&clearTimeout(r),o(),i(n))});Number.isFinite(t)&&(r=setTimeout(()=>{o(),n(new Error(`waitForDevice timed out after ${t}ms (deviceId=${e})`))},t))})}async forEachCap(e,t){for(const i of this.filterByCap(e))await t(i)}async invokeCap(e,t,i,n={}){const a=this.filterByCap(e),r=Math.max(1,n.parallelism??a.length),o=[];for(let n=0;n<a.length;n+=r){const s=a.slice(n,n+r),l=await Promise.allSettled(s.map(async n=>{const a=n[e];if(!a||"function"!=typeof a[t])throw new Error(`device '${n.deviceId}' does not expose '${e}.${t}'`);return await a[t](i)}));for(let e=0;e<l.length;e++){const t=s[e],i=l[e];"fulfilled"===i.status?o.push({deviceId:t.deviceId,ok:!0,result:i.value}):o.push({deviceId:t.deviceId,ok:!1,error:i.reason})}}return o}summary(){const e={},t={},i={};let n=0,a=0;for(const t of this.bindings.values())for(const i of t.entries)e[i.capName]=(e[i.capName]??0)+1;for(const e of this.devices.values())t[e.addonId]=(t[e.addonId]??0)+1,i[e.type]=(i[e.type]??0)+1,e.online?n++:a++;return{totalDevices:this.bindings.size,online:n,offline:a,byCap:e,byAddon:t,byType:i,statedDevices:this.stateMirror.size}}dump(e){const t=e=>{const t=this.devices.get(e)??null,i=this.bindings.get(e)??null,n={},a=this.stateMirror.get(e);if(a)for(const[e,t]of a)n[e]=Object.assign({},t);return{deviceId:e,info:t,binding:i?Object.assign({},i,{entries:i.entries.map(e=>Object.assign({},e))}):null,state:n}};if(void 0!==e)return t(e);const i=[];for(const e of this.bindings.keys())i.push(t(e));return i}getRawMirror(){return this.stateMirror}getSystemState(){const e=new Map;for(const[t,i]of this.stateMirror){const n=new Map;for(const[e,t]of i)n.set(e,Object.assign({},t));e.set(t,n)}return e}subscribeBus(){if(!this.api.live?.onEvent)return;const e=this.api.live.onEvent;this.bridges.push(e.subscribe({category:"device.state-changed"},{onData:e=>{const t=e.data;t&&"number"==typeof t.deviceId&&"string"==typeof t.capName&&this.applyStateUpdate(t.deviceId,t.capName,t.slice)}})),this.bridges.push(e.subscribe({category:"capability.binding-changed"},{onData:e=>{const t=e.data,i="number"==typeof t?.deviceId?t.deviceId:"device"===t?.source?.type&&"number"==typeof t.source.id?t.source.id:null;null!==i&&this.refreshBinding(i)}})),this.bridges.push(e.subscribe({category:"device.registered"},{onData:e=>{const t=e.data;"number"==typeof t?.deviceId&&this.refreshDeviceMetadata(t.deviceId,"added")}})),this.bridges.push(e.subscribe({category:"device.unregistered"},{onData:e=>{const t=e.data;"number"==typeof t?.deviceId&&this.applyDeviceRemoval(t.deviceId)}})),this.bridges.push(e.subscribe({category:"device.updated"},{onData:e=>{const t=e.data;"number"==typeof t?.deviceId&&this.refreshDeviceMetadata(t.deviceId,"updated")}}))}applyStateUpdate(e,t,i){let n=this.stateMirror.get(e);n||(n=new Map,this.stateMirror.set(e,n)),void 0===i?n.delete(t):n.set(t,i);const a=`${e}:${t}`,r=this.handleListeners.get(a);if(r)for(const e of r)try{e(i)}catch{}for(const n of this.globalStateListeners)try{n(e,t,i)}catch{}const o=this.capListeners.get(t);if(o)for(const t of o)try{t(e,i)}catch{}const s=this.deviceListeners.get(e);if(s)for(const n of s)try{n(e,t,i)}catch{}}applyDeviceRemoval(e){const t=this.devices.get(e)??null;this.bindings.delete(e),this.devices.delete(e),this.stateMirror.delete(e);for(const i of this.removedListeners)try{i(e,t)}catch{}}async refreshBinding(e){try{const t=await this.api.deviceManager.getBindings.query({deviceId:e});if(t.entries.length>0)return void this.bindings.set(e,t);if(null===await this.api.deviceManager.getDevice.query({deviceId:e}))return void this.applyDeviceRemoval(e);this.bindings.set(e,t)}catch{}}async refreshDeviceMetadata(e,t){try{const i=await this.api.deviceManager.getDevice.query({deviceId:e});if(!i)return;const n=!this.devices.has(e);if(this.devices.set(e,i),"added"===t&&n){await this.refreshBinding(e);for(const t of this.addedListeners)try{t(e,i)}catch{}}}catch{}}};function hn(e,t){return Array.isArray(t)?t.includes(e):e===t}function Sn(e){return Array.isArray(e)?e:[e]}function kn(e,t){return"string"==typeof t?e===t:t instanceof RegExp?t.test(e):"exact"in t?e===t.exact:"contains"in t&&e.toLowerCase().includes(t.contains.toLowerCase())}function qn(e){const t=e;function i(e,i,n,a,r){const o=t[e]?.[i];if(!o)throw new Error(`SystemProxy: api has no '${e}.${i}'`);const s=o;return"mutation"===n?s.mutate(a):"subscription"===n?s.subscribe(a,r):s.query(a)}return{addonPages:{listPages:e=>i("addonPages","listPages","query",e)},addons:{list:e=>i("addons","list","query",e),getLogs:e=>i("addons","getLogs","query",e),listPackages:e=>i("addons","listPackages","query",e),installPackage:e=>i("addons","installPackage","mutation",e),installFromWorkspace:e=>i("addons","installFromWorkspace","mutation",e),isWorkspaceAvailable:e=>i("addons","isWorkspaceAvailable","query",e),listWorkspacePackages:e=>i("addons","listWorkspacePackages","query",e),uninstallPackage:e=>i("addons","uninstallPackage","mutation",e),reloadPackages:e=>i("addons","reloadPackages","mutation",e),searchAvailable:e=>i("addons","searchAvailable","query",e),listUpdates:e=>i("addons","listUpdates","query",e),updatePackage:e=>i("addons","updatePackage","mutation",e),rollbackPackage:e=>i("addons","rollbackPackage","mutation",e),forceRefresh:e=>i("addons","forceRefresh","mutation",e),restartServer:e=>i("addons","restartServer","mutation",e),getLastRestart:e=>i("addons","getLastRestart","query",e),listFrameworkPackages:e=>i("addons","listFrameworkPackages","query",e),listCapabilityProviders:e=>i("addons","listCapabilityProviders","query",e),setCapabilityProviderEnabled:e=>i("addons","setCapabilityProviderEnabled","mutation",e),getVersions:e=>i("addons","getVersions","query",e),restartAddon:e=>i("addons","restartAddon","mutation",e),retryLoad:e=>i("addons","retryLoad","mutation",e),getAutoUpdateSettings:e=>i("addons","getAutoUpdateSettings","query",e),setAutoUpdateSettings:e=>i("addons","setAutoUpdateSettings","mutation",e),getAddonAutoUpdate:e=>i("addons","getAddonAutoUpdate","query",e),setAddonAutoUpdate:e=>i("addons","setAddonAutoUpdate","mutation",e),applyAutoUpdateToAll:e=>i("addons","applyAutoUpdateToAll","mutation",e),custom:e=>i("addons","custom","mutation",e),startJob:e=>i("addons","startJob","mutation",e),getJob:e=>i("addons","getJob","query",e),listJobs:e=>i("addons","listJobs","query",e),cancelJob:e=>i("addons","cancelJob","mutation",e),onAddonLogs:(e,t)=>i("addons","onAddonLogs","subscription",e,t)},addonSettings:{getGlobalSettings:e=>i("addonSettings","getGlobalSettings","query",e),updateGlobalSettings:e=>i("addonSettings","updateGlobalSettings","mutation",e),getIntegrationSettings:e=>i("addonSettings","getIntegrationSettings","query",e)},addonWidgets:{listWidgets:e=>i("addonWidgets","listWidgets","query",e)},alerts:{emit:e=>i("alerts","emit","mutation",e),update:e=>i("alerts","update","mutation",e),list:e=>i("alerts","list","query",e),getUnreadCount:e=>i("alerts","getUnreadCount","query",e),markRead:e=>i("alerts","markRead","mutation",e),markAllRead:e=>i("alerts","markAllRead","mutation",e),dismiss:e=>i("alerts","dismiss","mutation",e)},audioAnalyzer:{analyseChunk:e=>i("audioAnalyzer","analyseChunk","mutation",e),classify:e=>i("audioAnalyzer","classify","query",e),attachDevice:e=>i("audioAnalyzer","attachDevice","mutation",e),isReady:e=>i("audioAnalyzer","isReady","query",e),dispose:e=>i("audioAnalyzer","dispose","mutation",e),reprobeAudioEngine:e=>i("audioAnalyzer","reprobeAudioEngine","mutation",e)},audioCodec:{listSupportedCodecs:e=>i("audioCodec","listSupportedCodecs","query",e),canHandle:e=>i("audioCodec","canHandle","query",e),createDecodeSession:e=>i("audioCodec","createDecodeSession","mutation",e),createEncodeSession:e=>i("audioCodec","createEncodeSession","mutation",e),closeSession:e=>i("audioCodec","closeSession","mutation",e),pushEncodedFrame:e=>i("audioCodec","pushEncodedFrame","mutation",e),pullPcm:e=>i("audioCodec","pullPcm","query",e),pushPcm:e=>i("audioCodec","pushPcm","mutation",e),pullEncoded:e=>i("audioCodec","pullEncoded","query",e),flushEncode:e=>i("audioCodec","flushEncode","mutation",e),listActiveSessions:e=>i("audioCodec","listActiveSessions","query",e)},backup:{listDestinations:e=>i("backup","listDestinations","query",e),trigger:e=>i("backup","trigger","mutation",e),listRuns:e=>i("backup","listRuns","query",e),cancel:e=>i("backup","cancel","mutation",e),list:e=>i("backup","list","query",e),listLocations:e=>i("backup","listLocations","query",e),getEntries:e=>i("backup","getEntries","query",e),restore:e=>i("backup","restore","mutation",e),delete:e=>i("backup","delete","mutation",e),listArchives:e=>i("backup","listArchives","query",e),upsertDestinationPolicy:e=>i("backup","upsertDestinationPolicy","mutation",e),previewSchedule:e=>i("backup","previewSchedule","query",e),listSchedules:e=>i("backup","listSchedules","query",e),upsertSchedule:e=>i("backup","upsertSchedule","mutation",e),deleteSchedule:e=>i("backup","deleteSchedule","mutation",e)},broker:{list:e=>i("broker","list","query",e),get:e=>i("broker","get","query",e),listProviders:e=>i("broker","listProviders","query",e),add:e=>i("broker","add","mutation",e),remove:e=>i("broker","remove","mutation",e),testConnection:e=>i("broker","testConnection","mutation",e),getSettings:e=>i("broker","getSettings","query",e),setSettings:e=>i("broker","setSettings","mutation",e),getBrokerConfig:e=>i("broker","getBrokerConfig","query",e),getSettingsSchema:e=>i("broker","getSettingsSchema","query",e),testSettings:e=>i("broker","testSettings","mutation",e),publish:e=>i("broker","publish","mutation",e),subscribe:e=>i("broker","subscribe","mutation",e),unsubscribe:e=>i("broker","unsubscribe","mutation",e),getState:e=>i("broker","getState","query",e),getStatus:e=>i("broker","getStatus","query",e)},calendars:{listCalendars:e=>i("calendars","listCalendars","query",e),listEvents:e=>i("calendars","listEvents","query",e),getPreferences:e=>i("calendars","getPreferences","query",e),setCalendarPreference:e=>i("calendars","setCalendarPreference","mutation",e)},connectionTest:{testSettings:e=>i("connectionTest","testSettings","mutation",e),describeTest:e=>i("connectionTest","describeTest","query",e)},coreBlocks:{list:e=>i("coreBlocks","list","query",e),get:e=>i("coreBlocks","get","query",e),create:e=>i("coreBlocks","create","mutation",e),update:e=>i("coreBlocks","update","mutation",e),delete:e=>i("coreBlocks","delete","mutation",e),setEnabled:e=>i("coreBlocks","setEnabled","mutation",e),restart:e=>i("coreBlocks","restart","mutation",e),compile:e=>i("coreBlocks","compile","mutation",e),getBlockSettings:e=>i("coreBlocks","getBlockSettings","query",e),updateBlockSettings:e=>i("coreBlocks","updateBlockSettings","mutation",e),getTypeDefs:e=>i("coreBlocks","getTypeDefs","query",e),createComposition:e=>i("coreBlocks","createComposition","mutation",e),updateComposition:e=>i("coreBlocks","updateComposition","mutation",e),getComposition:e=>i("coreBlocks","getComposition","query",e),listCompositions:e=>i("coreBlocks","listCompositions","query",e),getCustomization:e=>i("coreBlocks","getCustomization","query",e),listComposableCaps:e=>i("coreBlocks","listComposableCaps","query",e),validateComposition:e=>i("coreBlocks","validateComposition","mutation",e)},decoder:{supportsCodec:e=>i("decoder","supportsCodec","query",e),getInfo:e=>i("decoder","getInfo","query",e),createSession:e=>i("decoder","createSession","query",e),destroySession:e=>i("decoder","destroySession","query",e),pushPacket:e=>i("decoder","pushPacket","query",e),openStream:e=>i("decoder","openStream","query",e),pullFrames:e=>i("decoder","pullFrames","query",e),pullHandles:e=>i("decoder","pullHandles","query",e),getFrame:e=>i("decoder","getFrame","query",e),getShmStats:e=>i("decoder","getShmStats","query",e),updateConfig:e=>i("decoder","updateConfig","query",e),getStats:e=>i("decoder","getStats","query",e),listActiveSessions:e=>i("decoder","listActiveSessions","query",e),reprobeHwaccel:e=>i("decoder","reprobeHwaccel","mutation",e)},deviceAdoption:{listCandidateFilters:e=>i("deviceAdoption","listCandidateFilters","query",e),listCandidates:e=>i("deviceAdoption","listCandidates","query",e),getCandidate:e=>i("deviceAdoption","getCandidate","query",e),refresh:e=>i("deviceAdoption","refresh","mutation",e),adopt:e=>i("deviceAdoption","adopt","mutation",e),release:e=>i("deviceAdoption","release","mutation",e),resync:e=>i("deviceAdoption","resync","mutation",e)},deviceExport:{getStatus:e=>i("deviceExport","getStatus","query",e),listSupportedDeviceKinds:e=>i("deviceExport","listSupportedDeviceKinds","query",e),listExposedDevices:e=>i("deviceExport","listExposedDevices","query",e),exposeDevice:e=>i("deviceExport","exposeDevice","mutation",e),unexposeDevice:e=>i("deviceExport","unexposeDevice","mutation",e)},deviceManager:{allocateDeviceId:e=>i("deviceManager","allocateDeviceId","mutation",e),migrateDevice:e=>i("deviceManager","migrateDevice","mutation",e),registerDevice:e=>i("deviceManager","registerDevice","mutation",e),removeDevice:e=>i("deviceManager","removeDevice","mutation",e),persistConfig:e=>i("deviceManager","persistConfig","mutation",e),getRoleDisplayDefaults:e=>i("deviceManager","getRoleDisplayDefaults","query",e),setRoleDisplayDefaults:e=>i("deviceManager","setRoleDisplayDefaults","mutation",e),listLocations:e=>i("deviceManager","listLocations","query",e),addLocation:e=>i("deviceManager","addLocation","mutation",e),removeLocation:e=>i("deviceManager","removeLocation","mutation",e),renameLocation:e=>i("deviceManager","renameLocation","mutation",e),listLocationIcons:e=>i("deviceManager","listLocationIcons","query",e),setLocationIcon:e=>i("deviceManager","setLocationIcon","mutation",e),listLocationDescriptions:e=>i("deviceManager","listLocationDescriptions","query",e),setLocationDescription:e=>i("deviceManager","setLocationDescription","mutation",e),listSiteZones:e=>i("deviceManager","listSiteZones","query",e),setSiteZone:e=>i("deviceManager","setSiteZone","mutation",e),removeSiteZone:e=>i("deviceManager","removeSiteZone","mutation",e),renameSiteZone:e=>i("deviceManager","renameSiteZone","mutation",e),setLocationZone:e=>i("deviceManager","setLocationZone","mutation",e),listPersistedByAddon:e=>i("deviceManager","listPersistedByAddon","query",e),listAll:e=>i("deviceManager","listAll","query",e),getChildren:e=>i("deviceManager","getChildren","query",e),getChildrenBatch:e=>i("deviceManager","getChildrenBatch","query",e),getLinkedDevicesBatch:e=>i("deviceManager","getLinkedDevicesBatch","query",e),removeByIntegration:e=>i("deviceManager","removeByIntegration","mutation",e),getBindingsBatch:e=>i("deviceManager","getBindingsBatch","query",e),getAllBindings:e=>i("deviceManager","getAllBindings","query",e),listDeviceIdsByCaps:e=>i("deviceManager","listDeviceIdsByCaps","query",e),listWrappersForCap:e=>i("deviceManager","listWrappersForCap","query",e),listBindableCapsForDeviceType:e=>i("deviceManager","listBindableCapsForDeviceType","query",e),discoverDevices:e=>i("deviceManager","discoverDevices","mutation",e),adoptDevice:e=>i("deviceManager","adoptDevice","mutation",e),getCreationSchema:e=>i("deviceManager","getCreationSchema","query",e),createDevice:e=>i("deviceManager","createDevice","mutation",e),testCreationField:e=>i("deviceManager","testCreationField","mutation",e),adoptionListCandidateFilters:e=>i("deviceManager","adoptionListCandidateFilters","query",e),adoptionListCandidates:e=>i("deviceManager","adoptionListCandidates","query",e),adoptionRefresh:e=>i("deviceManager","adoptionRefresh","mutation",e),adoptionAdopt:e=>i("deviceManager","adoptionAdopt","mutation",e),adoptionRelease:e=>i("deviceManager","adoptionRelease","mutation",e),adoptionStartJob:e=>i("deviceManager","adoptionStartJob","mutation",e),adoptionListJobs:e=>i("deviceManager","adoptionListJobs","query",e),adoptionCancelJob:e=>i("deviceManager","adoptionCancelJob","mutation",e),adoptionResync:e=>i("deviceManager","adoptionResync","mutation",e),discoveryProviders:e=>i("deviceManager","discoveryProviders","query",e),discoverAllProviders:e=>i("deviceManager","discoverAllProviders","mutation",e),discoverProvider:e=>i("deviceManager","discoverProvider","mutation",e),providerCreationType:e=>i("deviceManager","providerCreationType","query",e),providerDiscoveryParamsSchema:e=>i("deviceManager","providerDiscoveryParamsSchema","query",e),getDeviceStatusAggregateBatch:e=>i("deviceManager","getDeviceStatusAggregateBatch","query",e)},deviceProvider:{start:e=>i("deviceProvider","start","mutation",e),stop:e=>i("deviceProvider","stop","mutation",e),getStatus:e=>i("deviceProvider","getStatus","query",e),getDevices:e=>i("deviceProvider","getDevices","query",e),reloadDevice:e=>i("deviceProvider","reloadDevice","mutation",e),supportsDiscovery:e=>i("deviceProvider","supportsDiscovery","query",e),discoverDevices:e=>i("deviceProvider","discoverDevices","mutation",e),getDiscoveryParamsSchema:e=>i("deviceProvider","getDiscoveryParamsSchema","query",e),getManualCreationType:e=>i("deviceProvider","getManualCreationType","query",e),adoptDiscoveredDevice:e=>i("deviceProvider","adoptDiscoveredDevice","mutation",e),supportsManualCreation:e=>i("deviceProvider","supportsManualCreation","query",e),getChildCreationSchema:e=>i("deviceProvider","getChildCreationSchema","query",e),createDevice:e=>i("deviceProvider","createDevice","mutation",e),testCreationField:e=>i("deviceProvider","testCreationField","mutation",e)},deviceState:{getAllSnapshots:e=>i("deviceState","getAllSnapshots","query",e),listClaims:e=>i("deviceState","listClaims","query",e)},faceGallery:{listIdentities:e=>i("faceGallery","listIdentities","query",e),createIdentity:e=>i("faceGallery","createIdentity","mutation",e),renameIdentity:e=>i("faceGallery","renameIdentity","mutation",e),deleteIdentity:e=>i("faceGallery","deleteIdentity","mutation",e),listIdentitySamples:e=>i("faceGallery","listIdentitySamples","query",e),auditIdentitySamples:e=>i("faceGallery","auditIdentitySamples","query",e),removeSample:e=>i("faceGallery","removeSample","mutation",e),getFaceMedia:e=>i("faceGallery","getFaceMedia","query",e),assignFace:e=>i("faceGallery","assignFace","mutation",e),unassignFace:e=>i("faceGallery","unassignFace","mutation",e),deleteFace:e=>i("faceGallery","deleteFace","mutation",e),assignFaces:e=>i("faceGallery","assignFaces","mutation",e),unassignFaces:e=>i("faceGallery","unassignFaces","mutation",e),suggestFaceClusters:e=>i("faceGallery","suggestFaceClusters","query",e)},integrations:{list:e=>i("integrations","list","query",e),get:e=>i("integrations","get","query",e),getByAddonId:e=>i("integrations","getByAddonId","query",e),create:e=>i("integrations","create","mutation",e),update:e=>i("integrations","update","mutation",e),delete:e=>i("integrations","delete","mutation",e),getSettings:e=>i("integrations","getSettings","query",e),setSettings:e=>i("integrations","setSettings","mutation",e),getAvailableTypes:e=>i("integrations","getAvailableTypes","query",e),testConnection:e=>i("integrations","testConnection","mutation",e)},llm:{generate:e=>i("llm","generate","mutation",e),generateVision:e=>i("llm","generateVision","mutation",e),cancel:e=>i("llm","cancel","mutation",e),listProfileKinds:e=>i("llm","listProfileKinds","query",e),listProfiles:e=>i("llm","listProfiles","query",e),upsertProfile:e=>i("llm","upsertProfile","mutation",e),deleteProfile:e=>i("llm","deleteProfile","mutation",e),testProfile:e=>i("llm","testProfile","mutation",e),listModels:e=>i("llm","listModels","query",e),getDefaults:e=>i("llm","getDefaults","query",e),setDefault:e=>i("llm","setDefault","mutation",e),getUsage:e=>i("llm","getUsage","query",e),listModelCatalog:e=>i("llm","listModelCatalog","query",e),listRuntimeNodes:e=>i("llm","listRuntimeNodes","query",e),listNodeModels:e=>i("llm","listNodeModels","query",e),resolveModelRef:e=>i("llm","resolveModelRef","mutation",e),installModel:e=>i("llm","installModel","mutation",e),deleteModel:e=>i("llm","deleteModel","mutation",e),getRuntimeStatus:e=>i("llm","getRuntimeStatus","query",e),startRuntime:e=>i("llm","startRuntime","mutation",e),stopRuntime:e=>i("llm","stopRuntime","mutation",e)},localNetwork:{list:e=>i("localNetwork","list","query",e),getPreferred:e=>i("localNetwork","getPreferred","query",e),getConnectionEndpoints:e=>i("localNetwork","getConnectionEndpoints","query",e),getNotificationEndpoint:e=>i("localNetwork","getNotificationEndpoint","query",e),setNotificationEndpoint:e=>i("localNetwork","setNotificationEndpoint","mutation",e),getViewerEndpoints:e=>i("localNetwork","getViewerEndpoints","query",e),setViewerEndpoints:e=>i("localNetwork","setViewerEndpoints","mutation",e),getAllowedAddresses:e=>i("localNetwork","getAllowedAddresses","query",e),setAllowedAddresses:e=>i("localNetwork","setAllowedAddresses","mutation",e),resetAllowlistToBestMatch:e=>i("localNetwork","resetAllowlistToBestMatch","mutation",e),getTlsStatus:e=>i("localNetwork","getTlsStatus","query",e),regenerateCertificate:e=>i("localNetwork","regenerateCertificate","mutation",e),uploadCertificate:e=>i("localNetwork","uploadCertificate","mutation",e),downloadCa:e=>i("localNetwork","downloadCa","query",e),revertToGeneratedCertificate:e=>i("localNetwork","revertToGeneratedCertificate","mutation",e)},meshNetwork:{getStatus:e=>i("meshNetwork","getStatus","query",e),join:e=>i("meshNetwork","join","mutation",e),startLogin:e=>i("meshNetwork","startLogin","mutation",e),leave:e=>i("meshNetwork","leave","mutation",e),logout:e=>i("meshNetwork","logout","mutation",e),listPeers:e=>i("meshNetwork","listPeers","query",e),testConnection:e=>i("meshNetwork","testConnection","mutation",e)},metricsProvider:{collectSnapshot:e=>i("metricsProvider","collectSnapshot","query",e),getCached:e=>i("metricsProvider","getCached","query",e),getCurrent:e=>i("metricsProvider","getCurrent","query",e),getDiskSpace:e=>i("metricsProvider","getDiskSpace","query",e),getGpuInfo:e=>i("metricsProvider","getGpuInfo","query",e),getCpuTemperature:e=>i("metricsProvider","getCpuTemperature","query",e),getProcessStats:e=>i("metricsProvider","getProcessStats","query",e),listAddonInstances:e=>i("metricsProvider","listAddonInstances","query",e),getAddonStats:e=>i("metricsProvider","getAddonStats","query",e),listNodeProcesses:e=>i("metricsProvider","listNodeProcesses","query",e),getLoadSeries:e=>i("metricsProvider","getLoadSeries","query",e)},mqttBroker:{listBrokers:e=>i("mqttBroker","listBrokers","query",e),getBrokerConfig:e=>i("mqttBroker","getBrokerConfig","query",e),addBroker:e=>i("mqttBroker","addBroker","mutation",e),removeBroker:e=>i("mqttBroker","removeBroker","mutation",e),testConnection:e=>i("mqttBroker","testConnection","mutation",e),startEmbeddedBroker:e=>i("mqttBroker","startEmbeddedBroker","mutation",e),stopEmbeddedBroker:e=>i("mqttBroker","stopEmbeddedBroker","mutation",e),getStatus:e=>i("mqttBroker","getStatus","query",e)},networkAccess:{start:e=>i("networkAccess","start","mutation",e),stop:e=>i("networkAccess","stop","mutation",e),getEndpoint:e=>i("networkAccess","getEndpoint","query",e),getStatus:e=>i("networkAccess","getStatus","query",e),listEndpoints:e=>i("networkAccess","listEndpoints","query",e)},networkQuality:{getAllStats:e=>i("networkQuality","getAllStats","query",e)},nodes:{topology:e=>i("nodes","topology","query",e),directory:e=>i("nodes","directory","query",e),deployAddon:e=>i("nodes","deployAddon","mutation",e),undeployAddon:e=>i("nodes","undeployAddon","mutation",e),restartAddon:e=>i("nodes","restartAddon","mutation",e),restartProcess:e=>i("nodes","restartProcess","mutation",e),restartNode:e=>i("nodes","restartNode","mutation",e),shutdownNode:e=>i("nodes","shutdownNode","mutation",e),renameNode:e=>i("nodes","renameNode","mutation",e),clusterAddonStatus:e=>i("nodes","clusterAddonStatus","query",e),getCapUsageGraph:e=>i("nodes","getCapUsageGraph","query",e),getNodeAddons:e=>i("nodes","getNodeAddons","query",e),setProcessLogLevel:e=>i("nodes","setProcessLogLevel","mutation",e),executeQuery:e=>i("nodes","executeQuery","mutation",e)},notificationOutput:{listTargetKinds:e=>i("notificationOutput","listTargetKinds","query",e),listTargets:e=>i("notificationOutput","listTargets","query",e),getTarget:e=>i("notificationOutput","getTarget","query",e),discoverTargets:e=>i("notificationOutput","discoverTargets","query",e),probeTargetConfig:e=>i("notificationOutput","probeTargetConfig","mutation",e),send:e=>i("notificationOutput","send","mutation",e),testTarget:e=>i("notificationOutput","testTarget","mutation",e),upsertTarget:e=>i("notificationOutput","upsertTarget","mutation",e),deleteTarget:e=>i("notificationOutput","deleteTarget","mutation",e),setTargetEnabled:e=>i("notificationOutput","setTargetEnabled","mutation",e)},notificationRules:{listRules:e=>i("notificationRules","listRules","query",e),getRule:e=>i("notificationRules","getRule","query",e),createRule:e=>i("notificationRules","createRule","mutation",e),updateRule:e=>i("notificationRules","updateRule","mutation",e),deleteRule:e=>i("notificationRules","deleteRule","mutation",e),setRuleEnabled:e=>i("notificationRules","setRuleEnabled","mutation",e),listSequences:e=>i("notificationRules","listSequences","query",e),getSequence:e=>i("notificationRules","getSequence","query",e),createSequence:e=>i("notificationRules","createSequence","mutation",e),updateSequence:e=>i("notificationRules","updateSequence","mutation",e),deleteSequence:e=>i("notificationRules","deleteSequence","mutation",e),getClipRetentionAsks:e=>i("notificationRules","getClipRetentionAsks","query",e),listDeviceMutes:e=>i("notificationRules","listDeviceMutes","query",e),testRule:e=>i("notificationRules","testRule","mutation",e),previewStateSummary:e=>i("notificationRules","previewStateSummary","mutation",e),getConditionCatalog:e=>i("notificationRules","getConditionCatalog","query",e),getTemplateCatalog:e=>i("notificationRules","getTemplateCatalog","query",e),previewTemplate:e=>i("notificationRules","previewTemplate","mutation",e),getHistory:e=>i("notificationRules","getHistory","query",e),getRuleLastRuns:e=>i("notificationRules","getRuleLastRuns","query",e),resolveArtifactUrl:e=>i("notificationRules","resolveArtifactUrl","query",e),listSnoozes:e=>i("notificationRules","listSnoozes","query",e),createSnooze:e=>i("notificationRules","createSnooze","mutation",e),cancelSnooze:e=>i("notificationRules","cancelSnooze","mutation",e),getAlarmConfig:e=>i("notificationRules","getAlarmConfig","query",e),setAlarmConfig:e=>i("notificationRules","setAlarmConfig","mutation",e),createAlarmProfile:e=>i("notificationRules","createAlarmProfile","mutation",e),renameAlarmProfile:e=>i("notificationRules","renameAlarmProfile","mutation",e),deleteAlarmProfile:e=>i("notificationRules","deleteAlarmProfile","mutation",e),activateAlarmProfile:e=>i("notificationRules","activateAlarmProfile","mutation",e),getAlarmSensors:e=>i("notificationRules","getAlarmSensors","query",e)},osdManager:{getConditionSupport:e=>i("osdManager","getConditionSupport","query",e),copyDeviceConfiguration:e=>i("osdManager","copyDeviceConfiguration","mutation",e),listTemplates:e=>i("osdManager","listTemplates","query",e),upsertTemplate:e=>i("osdManager","upsertTemplate","mutation",e),deleteTemplate:e=>i("osdManager","deleteTemplate","mutation",e)},pipelineExecutor:{getAvailableEngines:e=>i("pipelineExecutor","getAvailableEngines","query",e),getSelectedEngine:e=>i("pipelineExecutor","getSelectedEngine","query",e),getDefaultSteps:e=>i("pipelineExecutor","getDefaultSteps","query",e),getEngineProvisioning:e=>i("pipelineExecutor","getEngineProvisioning","query",e),getVideoPipelineSteps:e=>i("pipelineExecutor","getVideoPipelineSteps","query",e),setVideoPipelineSteps:e=>i("pipelineExecutor","setVideoPipelineSteps","mutation",e),clearDeviceOverrides:e=>i("pipelineExecutor","clearDeviceOverrides","mutation",e),getInferenceDeviceHealth:e=>i("pipelineExecutor","getInferenceDeviceHealth","query",e),rearmInferenceDevice:e=>i("pipelineExecutor","rearmInferenceDevice","mutation",e),getSchema:e=>i("pipelineExecutor","getSchema","query",e),getGlobalSteps:e=>i("pipelineExecutor","getGlobalSteps","query",e),getGlobalPipelineConfig:e=>i("pipelineExecutor","getGlobalPipelineConfig","query",e),getOrchestratorConfigSchema:e=>i("pipelineExecutor","getOrchestratorConfigSchema","query",e),validatePipeline:e=>i("pipelineExecutor","validatePipeline","query",e),listTemplates:e=>i("pipelineExecutor","listTemplates","query",e),saveTemplate:e=>i("pipelineExecutor","saveTemplate","mutation",e),updateTemplate:e=>i("pipelineExecutor","updateTemplate","mutation",e),deleteTemplate:e=>i("pipelineExecutor","deleteTemplate","mutation",e),getCapabilities:e=>i("pipelineExecutor","getCapabilities","query",e),getAddonModels:e=>i("pipelineExecutor","getAddonModels","query",e),downloadModel:e=>i("pipelineExecutor","downloadModel","mutation",e),deleteModel:e=>i("pipelineExecutor","deleteModel","mutation",e),cacheFrameInPool:e=>i("pipelineExecutor","cacheFrameInPool","mutation",e),inferCached:e=>i("pipelineExecutor","inferCached","mutation",e),uncacheFrame:e=>i("pipelineExecutor","uncacheFrame","mutation",e),getEffectiveTuning:e=>i("pipelineExecutor","getEffectiveTuning","query",e),listLoadedEngines:e=>i("pipelineExecutor","listLoadedEngines","query",e),spinEngine:e=>i("pipelineExecutor","spinEngine","mutation",e),killEngine:e=>i("pipelineExecutor","killEngine","mutation",e),listReferenceImages:e=>i("pipelineExecutor","listReferenceImages","query",e),getReferenceImage:e=>i("pipelineExecutor","getReferenceImage","query",e),getReferenceAudioFiles:e=>i("pipelineExecutor","getReferenceAudioFiles","query",e),getReferenceAudio:e=>i("pipelineExecutor","getReferenceAudio","query",e),getAudioCapabilities:e=>i("pipelineExecutor","getAudioCapabilities","query",e),runAudioTest:e=>i("pipelineExecutor","runAudioTest","mutation",e),getDetectionConfigSchema:e=>i("pipelineExecutor","getDetectionConfigSchema","query",e)},pipelineOrchestrator:{requestOccupancyLook:e=>i("pipelineOrchestrator","requestOccupancyLook","mutation",e),pauseForStorageMigration:e=>i("pipelineOrchestrator","pauseForStorageMigration","mutation",e),resumeForStorageMigration:e=>i("pipelineOrchestrator","resumeForStorageMigration","mutation",e),rebalance:e=>i("pipelineOrchestrator","rebalance","mutation",e),getPipelineAssignments:e=>i("pipelineOrchestrator","getPipelineAssignments","query",e),getAgentLoad:e=>i("pipelineOrchestrator","getAgentLoad","query",e),getClusterModelChoice:e=>i("pipelineOrchestrator","getClusterModelChoice","query",e),getGlobalMetrics:e=>i("pipelineOrchestrator","getGlobalMetrics","query",e),getCapabilityBindings:e=>i("pipelineOrchestrator","getCapabilityBindings","query",e),setCapabilityBinding:e=>i("pipelineOrchestrator","setCapabilityBinding","mutation",e),getIngestOwner:e=>i("pipelineOrchestrator","getIngestOwner","query",e),getAudioNodeLoad:e=>i("pipelineOrchestrator","getAudioNodeLoad","query",e),getAudioAssignments:e=>i("pipelineOrchestrator","getAudioAssignments","query",e),getAgentSettings:e=>i("pipelineOrchestrator","getAgentSettings","query",e),listAgentSettings:e=>i("pipelineOrchestrator","listAgentSettings","query",e),removeAgentSettings:e=>i("pipelineOrchestrator","removeAgentSettings","mutation",e),setAgentMaxCameras:e=>i("pipelineOrchestrator","setAgentMaxCameras","mutation",e),setAgentDetectWeight:e=>i("pipelineOrchestrator","setAgentDetectWeight","mutation",e),setAgentCapabilities:e=>i("pipelineOrchestrator","setAgentCapabilities","mutation",e),setAgentDecodeLimits:e=>i("pipelineOrchestrator","setAgentDecodeLimits","mutation",e),setAgentReachableHost:e=>i("pipelineOrchestrator","setAgentReachableHost","mutation",e),setAgentInferenceDevices:e=>i("pipelineOrchestrator","setAgentInferenceDevices","mutation",e),getNodeInferenceDevices:e=>i("pipelineOrchestrator","getNodeInferenceDevices","query",e),resetNodePipelineDefaults:e=>i("pipelineOrchestrator","resetNodePipelineDefaults","mutation",e),getCameraStatuses:e=>i("pipelineOrchestrator","getCameraStatuses","query",e),setCameraSensors:e=>i("pipelineOrchestrator","setCameraSensors","mutation",e),reconcileFromDisk:e=>i("pipelineOrchestrator","reconcileFromDisk","mutation",e),getReconcileFromDiskStatus:e=>i("pipelineOrchestrator","getReconcileFromDiskStatus","query",e),listTemplates:e=>i("pipelineOrchestrator","listTemplates","query",e),saveTemplate:e=>i("pipelineOrchestrator","saveTemplate","mutation",e),updateTemplate:e=>i("pipelineOrchestrator","updateTemplate","mutation",e),deleteTemplate:e=>i("pipelineOrchestrator","deleteTemplate","mutation",e)},pipelineRunner:{attachCamera:e=>i("pipelineRunner","attachCamera","mutation",e),reportMotion:e=>i("pipelineRunner","reportMotion","mutation",e),getLocalLoad:e=>i("pipelineRunner","getLocalLoad","query",e),getLocalMetrics:e=>i("pipelineRunner","getLocalMetrics","query",e),getAllCameraMetrics:e=>i("pipelineRunner","getAllCameraMetrics","query",e),getLocalCameras:e=>i("pipelineRunner","getLocalCameras","query",e),getNativeCrop:e=>i("pipelineRunner","getNativeCrop","query",e),runStatelessStep:e=>i("pipelineRunner","runStatelessStep","mutation",e)},plateGallery:{getPlateMedia:e=>i("plateGallery","getPlateMedia","query",e),searchPlates:e=>i("plateGallery","searchPlates","query",e),suggestPlateClusters:e=>i("plateGallery","suggestPlateClusters","query",e),correctPlateText:e=>i("plateGallery","correctPlateText","mutation",e),deletePlate:e=>i("plateGallery","deletePlate","mutation",e),listVehicles:e=>i("plateGallery","listVehicles","query",e),createVehicle:e=>i("plateGallery","createVehicle","mutation",e),renameVehicle:e=>i("plateGallery","renameVehicle","mutation",e),deleteVehicle:e=>i("plateGallery","deleteVehicle","mutation",e),listVehicleSamples:e=>i("plateGallery","listVehicleSamples","query",e),removeVehicleSample:e=>i("plateGallery","removeVehicleSample","mutation",e),assignPlate:e=>i("plateGallery","assignPlate","mutation",e),unassignPlate:e=>i("plateGallery","unassignPlate","mutation",e),assignPlates:e=>i("plateGallery","assignPlates","mutation",e),unassignPlates:e=>i("plateGallery","unassignPlates","mutation",e)},recordingArchive:{getAvailabilityBatch:e=>i("recordingArchive","getAvailabilityBatch","query",e),getDaysWithRecordingsBatch:e=>i("recordingArchive","getDaysWithRecordingsBatch","query",e),getStorageUsage:e=>i("recordingArchive","getStorageUsage","query",e),listOpsLog:e=>i("recordingArchive","listOpsLog","query",e),pauseForStorageMigration:e=>i("recordingArchive","pauseForStorageMigration","mutation",e),resumeForStorageMigration:e=>i("recordingArchive","resumeForStorageMigration","mutation",e),refreshStorageLocationsForMigration:e=>i("recordingArchive","refreshStorageLocationsForMigration","mutation",e),startStorageMigrationMove:e=>i("recordingArchive","startStorageMigrationMove","mutation",e),getStorageMigrationMoveStatus:e=>i("recordingArchive","getStorageMigrationMoveStatus","query",e),cancelStorageMigrationMove:e=>i("recordingArchive","cancelStorageMigrationMove","mutation",e),relocateFootage:e=>i("recordingArchive","relocateFootage","mutation",e),listRelocateJobs:e=>i("recordingArchive","listRelocateJobs","query",e),getRelocateResidue:e=>i("recordingArchive","getRelocateResidue","query",e),reconcileLedgerAgainstDisk:e=>i("recordingArchive","reconcileLedgerAgainstDisk","mutation",e),cancelRelocateJob:e=>i("recordingArchive","cancelRelocateJob","mutation",e),planStorageRebalance:e=>i("recordingArchive","planStorageRebalance","query",e),startStorageRebalance:e=>i("recordingArchive","startStorageRebalance","mutation",e),getPlacement:e=>i("recordingArchive","getPlacement","query",e),setDevicePlacement:e=>i("recordingArchive","setDevicePlacement","mutation",e)},recordingExport:{createExport:e=>i("recordingExport","createExport","mutation",e),getExport:e=>i("recordingExport","getExport","query",e),cancelExport:e=>i("recordingExport","cancelExport","mutation",e),deleteExport:e=>i("recordingExport","deleteExport","mutation",e),getDownloadUrl:e=>i("recordingExport","getDownloadUrl","query",e),readExportBytes:e=>i("recordingExport","readExportBytes","query",e)},serverManagement:{getServerPackageStatus:e=>i("serverManagement","getServerPackageStatus","query",e),checkServerUpdate:e=>i("serverManagement","checkServerUpdate","mutation",e),applyServerUpdate:e=>i("serverManagement","applyServerUpdate","mutation",e),rollbackServerUpdate:e=>i("serverManagement","rollbackServerUpdate","mutation",e),restartServer:e=>i("serverManagement","restartServer","mutation",e)},settingsStore:{get:e=>i("settingsStore","get","query",e),set:e=>i("settingsStore","set","mutation",e),query:e=>i("settingsStore","query","query",e),upsert:e=>i("settingsStore","upsert","mutation",e),insert:e=>i("settingsStore","insert","mutation",e),insertMany:e=>i("settingsStore","insertMany","mutation",e),update:e=>i("settingsStore","update","mutation",e),delete:e=>i("settingsStore","delete","mutation",e),deleteWhere:e=>i("settingsStore","deleteWhere","mutation",e),updateWhere:e=>i("settingsStore","updateWhere","mutation",e),count:e=>i("settingsStore","count","query",e),aggregate:e=>i("settingsStore","aggregate","query",e),histogram:e=>i("settingsStore","histogram","query",e),isEmpty:e=>i("settingsStore","isEmpty","query",e),declareCollection:e=>i("settingsStore","declareCollection","mutation",e)},storage:{resolve:e=>i("storage","resolve","query",e),write:e=>i("storage","write","mutation",e),read:e=>i("storage","read","query",e),exists:e=>i("storage","exists","query",e),list:e=>i("storage","list","query",e),delete:e=>i("storage","delete","mutation",e),getAvailableSpace:e=>i("storage","getAvailableSpace","query",e),beginUpload:e=>i("storage","beginUpload","mutation",e),writeChunk:e=>i("storage","writeChunk","mutation",e),finalizeUpload:e=>i("storage","finalizeUpload","mutation",e),abortUpload:e=>i("storage","abortUpload","mutation",e),beginDownload:e=>i("storage","beginDownload","mutation",e),readChunk:e=>i("storage","readChunk","query",e),endDownload:e=>i("storage","endDownload","mutation",e),listLocations:e=>i("storage","listLocations","query",e),listLocationDeclarations:e=>i("storage","listLocationDeclarations","query",e),upsertLocation:e=>i("storage","upsertLocation","mutation",e),deleteLocation:e=>i("storage","deleteLocation","mutation",e),listDrainProgress:e=>i("storage","listDrainProgress","query",e),testLocation:e=>i("storage","testLocation","query",e),listProviders:e=>i("storage","listProviders","query",e),testConfig:e=>i("storage","testConfig","query",e)},storageMigration:{plan:e=>i("storageMigration","plan","query",e),start:e=>i("storageMigration","start","mutation",e),status:e=>i("storageMigration","status","query",e),cancel:e=>i("storageMigration","cancel","mutation",e),movers:e=>i("storageMigration","movers","query",e),residue:e=>i("storageMigration","residue","query",e),drain:e=>i("storageMigration","drain","mutation",e),cleanupStart:e=>i("storageMigration","cleanupStart","mutation",e),cleanupStatus:e=>i("storageMigration","cleanupStatus","query",e),cleanupCancel:e=>i("storageMigration","cleanupCancel","mutation",e),history:e=>i("storageMigration","history","query",e)},streamBroker:{fetchEventMedia:e=>i("streamBroker","fetchEventMedia","mutation",e),listAllCameraStreams:e=>i("streamBroker","listAllCameraStreams","query",e),listAllProfileSlots:e=>i("streamBroker","listAllProfileSlots","query",e),getBrokerStats:e=>i("streamBroker","getBrokerStats","query",e),probeStream:e=>i("streamBroker","probeStream","mutation",e),listClients:e=>i("streamBroker","listClients","query",e),killClient:e=>i("streamBroker","killClient","mutation",e),getStreamUrl:e=>i("streamBroker","getStreamUrl","query",e),getStreamWithCodec:e=>i("streamBroker","getStreamWithCodec","mutation",e),releaseStreamWithCodec:e=>i("streamBroker","releaseStreamWithCodec","mutation",e),acquireEgressTranscode:e=>i("streamBroker","acquireEgressTranscode","mutation",e),releaseEgressTranscode:e=>i("streamBroker","releaseEgressTranscode","mutation",e),subscribeAudioChunks:e=>i("streamBroker","subscribeAudioChunks","mutation",e),pullAudioChunks:e=>i("streamBroker","pullAudioChunks","query",e),unsubscribeAudioChunks:e=>i("streamBroker","unsubscribeAudioChunks","mutation",e),subscribeFrames:e=>i("streamBroker","subscribeFrames","mutation",e),pullFrameHandles:e=>i("streamBroker","pullFrameHandles","query",e),unsubscribeFrames:e=>i("streamBroker","unsubscribeFrames","mutation",e),setPreBufferDuration:e=>i("streamBroker","setPreBufferDuration","mutation",e),getPreBufferInfo:e=>i("streamBroker","getPreBufferInfo","query",e),getRtspPort:e=>i("streamBroker","getRtspPort","query",e),getAllRtspEntries:e=>i("streamBroker","getAllRtspEntries","query",e),getRtspEntry:e=>i("streamBroker","getRtspEntry","query",e),regenerateRtspToken:e=>i("streamBroker","regenerateRtspToken","mutation",e),setRtspEnabled:e=>i("streamBroker","setRtspEnabled","mutation",e),isRtspEnabled:e=>i("streamBroker","isRtspEnabled","query",e)},system:{info:e=>i("system","info","query",e),health:e=>i("system","health","query",e),featureFlags:e=>i("system","featureFlags","query",e),networkAddresses:e=>i("system","networkAddresses","query",e),getRetentionConfig:e=>i("system","getRetentionConfig","query",e),setRetentionConfig:e=>i("system","setRetentionConfig","mutation",e),forceRetentionCleanup:e=>i("system","forceRetentionCleanup","mutation",e),getSiteLocation:e=>i("system","getSiteLocation","query",e),setSiteLocation:e=>i("system","setSiteLocation","mutation",e),detectSiteLocation:e=>i("system","detectSiteLocation","mutation",e),getRequestCensus:e=>i("system","getRequestCensus","query",e),getLoadContributions:e=>i("system","getLoadContributions","query",e),getFailureContributions:e=>i("system","getFailureContributions","query",e),getLoggingSettings:e=>i("system","getLoggingSettings","query",e),setLoggingSettings:e=>i("system","setLoggingSettings","mutation",e)},terminalSession:{listProfiles:e=>i("terminalSession","listProfiles","query",e),listInstances:e=>i("terminalSession","listInstances","query",e),createInstance:e=>i("terminalSession","createInstance","mutation",e),updateInstance:e=>i("terminalSession","updateInstance","mutation",e),deleteInstance:e=>i("terminalSession","deleteInstance","mutation",e),setInstanceEnabled:e=>i("terminalSession","setInstanceEnabled","mutation",e),listLegacyCameras:e=>i("terminalSession","listLegacyCameras","query",e),adoptLegacyMonitor:e=>i("terminalSession","adoptLegacyMonitor","mutation",e),listSessions:e=>i("terminalSession","listSessions","query",e),openSession:e=>i("terminalSession","openSession","mutation",e),resize:e=>i("terminalSession","resize","mutation",e),pullOutput:e=>i("terminalSession","pullOutput","mutation",e),writeInput:e=>i("terminalSession","writeInput","mutation",e),close:e=>i("terminalSession","close","mutation",e)},toast:{onToast:(e,t)=>i("toast","onToast","subscription",e,t)},turnProvider:{getTurnServers:e=>i("turnProvider","getTurnServers","query",e)},userManagement:{listUsers:e=>i("userManagement","listUsers","query",e),createUser:e=>i("userManagement","createUser","mutation",e),updateUser:e=>i("userManagement","updateUser","mutation",e),deleteUser:e=>i("userManagement","deleteUser","mutation",e),resetPassword:e=>i("userManagement","resetPassword","mutation",e),setUserScopes:e=>i("userManagement","setUserScopes","mutation",e),validateCredentials:e=>i("userManagement","validateCredentials","mutation",e),listApiKeys:e=>i("userManagement","listApiKeys","query",e),createApiKey:e=>i("userManagement","createApiKey","mutation",e),revokeApiKey:e=>i("userManagement","revokeApiKey","mutation",e),validateApiKey:e=>i("userManagement","validateApiKey","mutation",e),createScopedToken:e=>i("userManagement","createScopedToken","mutation",e),revokeScopedToken:e=>i("userManagement","revokeScopedToken","mutation",e),validateScopedToken:e=>i("userManagement","validateScopedToken","query",e),listScopedTokens:e=>i("userManagement","listScopedTokens","query",e),setupTotp:e=>i("userManagement","setupTotp","mutation",e),confirmTotp:e=>i("userManagement","confirmTotp","mutation",e),disableTotp:e=>i("userManagement","disableTotp","mutation",e),getTotpStatus:e=>i("userManagement","getTotpStatus","query",e),verifyTotp:e=>i("userManagement","verifyTotp","mutation",e),oauthIssueCode:e=>i("userManagement","oauthIssueCode","mutation",e),oauthExchangeCode:e=>i("userManagement","oauthExchangeCode","mutation",e),oauthRefresh:e=>i("userManagement","oauthRefresh","mutation",e),oauthVerifyAccessToken:e=>i("userManagement","oauthVerifyAccessToken","query",e),listOauthSessions:e=>i("userManagement","listOauthSessions","query",e),revokeOauthSession:e=>i("userManagement","revokeOauthSession","mutation",e)}}}var Cn={PCMU:20*Math.log10(4),PCMA:20*Math.log10(8)};var An=Math.round(-55+Cn["PCMU"]),wn=60,Mn=10,Dn=new Set(["classes","classesExclude"]),Pn=new Set(["sensorKinds"]),In=new Set(["occupancy"]);function En(e){return{value:e.kind,label:e.label}}function jn(e){const t=[],i=new Map,n=(e,n)=>{const a=i.get(e);if(void 0!==a)return a;const r={fallbackLabel:n,options:[]};return i.set(e,r),t.push(e),r};for(const t of e){const e=t.parentKind??t.kind,i=n(e,null===t.parentKind?t.label:e);i.options.push(En(t)),null===t.parentKind&&(i.fallbackLabel=t.label)}return t.flatMap(e=>{const t=i.get(e);return void 0===t?[]:[{key:e,fallbackLabel:t.fallbackLabel,options:t.options}]})}function xn(e){const t=[],i=new Map;for(const n of e){const e=n.parentKind??"other",a=i.get(e);void 0===a?(i.set(e,[En(n)]),t.push(e)):a.push(En(n))}return t.flatMap(e=>{const t=i.get(e);return void 0===t?[]:[{key:e,fallbackLabel:e,options:t}]})}function On(e,t){if(!t)return null;if(Dn.has(e)){const e=jn(t.videoClasses);return t.audioKinds.length>0&&e.push({key:"audio",fallbackLabel:"Audio",options:t.audioKinds.map(En)}),e.length>0?{groups:e}:null}if(In.has(e)){const e=t.videoClasses.filter(e=>null===e.parentKind).map(En);return e.length>0?{groups:[{key:"macro",fallbackLabel:"Classes",options:e}]}:null}if(Pn.has(e)){const e=xn(t.labels);return e.length>0?{groups:e}:null}return null}var Tn="audio";function Rn(e){const t=On("classes",e);if(null===t)return null;const i=t.groups.filter(e=>e.key!==Tn);return i.length>0?{groups:i}:null}function Bn(e){const t=new Set;for(const i of e.groups)for(const e of i.options)t.add(e.value);return t}new Set(["devices","classes"]);function Ln(e,t){switch(t){case"deviceIds":return e.startsWith("device-")||e.startsWith("stream-")||"detection-blind"===e||"alarm-triggered"===e;case"deviceTypes":return e.startsWith("device-")||"detection-blind"===e;case"nodeIds":return e.startsWith("node-")||"addon-crash-loop"===e||"addon-update-available"===e||"addon-updated"===e||"server-update-available"===e||"wrapper-update-available"===e||"server-updated"===e;case"packageNames":return e.endsWith("update-available")||"addon-updated"===e||"node-updating"===e||"server-updated"===e;case"consumableLowPercent":return Se.includes(e)}}function Fn(e,t){return e.some(e=>Ln(e,t))}var Nn=["device-events","system","alarm"];var _n=new Map(Object.entries({"device-online":"device-events","device-offline":"device-events","device-disabled":"device-events","device-enabled":"device-events","device-battery-low":"device-events","device-battery-normal":"device-events","device-consumable-low":"device-events","device-consumable-normal":"device-events","device-tank-low":"device-events","device-tank-full":"device-events","device-tank-normal":"device-events","stream-online":"device-events","stream-offline":"device-events","detection-blind":"device-events","node-online":"system","node-offline":"system","node-restarting":"system","node-updating":"system","node-inference-unavailable":"system","addon-crash-loop":"system","addon-update-available":"system","addon-updated":"system","server-update-available":"system","server-updated":"system","wrapper-update-available":"system","backup-completed":"system","export-completed":"system","alarm-triggered":"alarm","alarm-armed":"alarm","alarm-disarmed":"alarm","alarm-arming":"alarm","alarm-arm-refused":"alarm","alarm-pending":"alarm","alarm-rearmed":"alarm","alarm-sensor-bypass":"alarm","alarm-check-failed":"alarm","camera-online":null,"camera-offline":null,"camera-disabled":null,"camera-enabled":null})),Kn={"device-events":["deviceIds","excludeDeviceIds","deviceTypes","consumableLowPercent"],system:["nodeIds","packageNames"],alarm:["deviceIds"]},Un=[{id:"device-state",family:"device-events",label:"Device state",kinds:["device-offline","device-online","device-disabled","device-enabled"]},{id:"streams",family:"device-events",label:"Streams",kinds:["stream-offline","stream-online"]},{id:"battery",family:"device-events",label:"Battery",kinds:["device-battery-low","device-battery-normal"]},{id:"consumables",family:"device-events",label:"Consumables",kinds:["device-consumable-low","device-consumable-normal"]},{id:"tanks",family:"device-events",label:"Tanks",kinds:["device-tank-low","device-tank-full","device-tank-normal"]},{id:"detection-blind",family:"device-events",label:"Detecting nothing",kinds:["detection-blind"]},{id:"nodes",family:"system",label:"Nodes",kinds:["node-offline","node-online","node-restarting","node-inference-unavailable"]},{id:"addons",family:"system",label:"Addons stopped",kinds:["addon-crash-loop"]},{id:"addon-updates",family:"system",label:"Addon updates",kinds:["addon-update-available","addon-updated"]},{id:"updates",family:"system",label:"Server & container updates",kinds:["server-update-available","node-updating","server-updated","wrapper-update-available"]},{id:"backups-exports",family:"system",label:"Backups & exports",kinds:["backup-completed","export-completed"]},{id:"alarm",family:"alarm",label:"Alarm",kinds:ze}];function Gn(e){return Un.filter(t=>t.family===e).flatMap(e=>e.kinds)}function Hn(e){if("object"!=typeof e||null===e||!("kinds"in e))return;const t=e.kinds;return Array.isArray(t)?t.filter(e=>"string"==typeof e):void 0}function Wn(e){const t=new Set;for(const i of e){const e=_n.get(i);if(null==e)return{kind:"mixed"};t.add(e)}const[i]=[...t];return 1===t.size&&void 0!==i?{kind:"family",family:i}:{kind:"mixed"}}var Vn=["device-events","system","alarm","mixed"];function Zn(e){return Vn.some(t=>t===e)}function $n(e){return t=e,Nn.some(e=>e===t)?e:void 0;var t}var Jn="A sound rule fires on what the camera HEARD. Its subject carries no detection, so this condition can never match one \u2014 name the sounds in the Sound condition instead.",Yn="A sound has no position in the frame, so a zone or a drawn polygon can never match it.",Qn=[{kind:"detection",label:"Conditions",excluded:{audio:"A detection rule fires on what the camera SAW. Sounds are a Sound rule of their own \u2014 adding one here turned the rule into a sound rule and dropped every detection condition."},editable:!0,carriesMedia:!0,carriesSubjectCrop:!0},{kind:"sensor",label:"Conditions",excluded:{},editable:!0,carriesMedia:!0,carriesSubjectCrop:!0,blurb:"A doorbell press or a linked sensor changing state. The picture comes from the camera the sensor is attributed to."},{kind:"occupancy",label:"Occupancy",discriminator:"occupancy",excluded:{sensorKinds:"An occupancy edge is not a sensor event: it carries no sensor kind, so this condition can never match one.",eventTypeTokens:"An occupancy edge carries no device event-type token \u2014 that comes from an event-emitter slice, which a count crossing has none of.",sensorTransition:"An occupancy edge is a count crossing, not a sensor reading: it has no raise or clear, so this choice could never narrow it.",source:"An occupancy edge is always produced by the pipeline, so any other source can never match and \u201cpipeline\u201d narrows nothing."},editable:!0,carriesMedia:!0,carriesSubjectCrop:!0,blurb:"Fires when the count in a camera frame or a zone crosses your threshold and holds. Pick the camera first \u2014 the zone list is that camera\u2019s."},{kind:"sound",label:"Sound",discriminator:"audio",excluded:{classes:Jn,classesExclude:Jn,minConfidence:"A sound window\u2019s evidence is a percentage of samples, not a detector score, so a confidence threshold can never be satisfied.",zones:Yn,zonesExclude:Yn,customZones:Yn,crossing:Yn,labelEquals:Jn,identities:Jn,identitiesExclude:Jn,plates:Jn,source:"A confirmed sound window is always stamped as an audio subject, so any other source can never match."},editable:!0,carriesMedia:!0,carriesSubjectCrop:!1,blurb:"Fires on a confirmed sampling window of audio, never on a picture. Name the sounds and/or keep a level threshold \u2014 with neither it can never match.",mediaBlurb:"A sound owns no frame, so the picture is a photograph of the camera taken at the moment of the match \u2014 the whole scene, never a crop. The GIF and the clip are cut around the same instant, from the camera."},{kind:"device-events",label:"Device events",discriminator:"systemEvent",excluded:{},editable:!0,carriesMedia:!1,carriesSubjectCrop:!1,blurb:"A device or its stream going away or coming back, switched off or on, a battery or consumable running low, a camera detecting nothing. There is no frame to attach."},{kind:"system",label:"System events",discriminator:"systemEvent",excluded:{},editable:!0,carriesMedia:!1,carriesSubjectCrop:!1,blurb:"The installation itself: a node leaving, an addon crash-looping, an update available or installed, a backup or an export finishing."},{kind:"alarm",label:"Alarm",discriminator:"systemEvent",excluded:{},editable:!0,carriesMedia:!1,carriesSubjectCrop:!1,blurb:"The alarm panel: refused, arming, armed, entry delay, triggered, re-armed, sensor bypass, disarmed.",mediaBlurb:"An alarm set off by a rule arrives with THAT rule's pictures, combined into one notification. This rule adds none of its own."},{kind:"mixed",label:"To recreate",discriminator:"systemEvent",excluded:{},editable:!1,carriesMedia:!1,carriesSubjectCrop:!1,blurb:"This rule mixes events from more than one family (device events, system, alarm). It keeps firing as it is, but it can no longer be edited: create one rule per family, then delete this one."}];function Xn(e){return Qn.find(t=>t.kind===e)??Qn[0]}function ea(e){return Qn.filter(t=>t.discriminator===e).map(e=>e.kind)}var ta="system-event";function ia(e){return e===ta}function na(e){switch(e){case"sensor":return Ai;case"detection":case"occupancy":return["detection-pipeline"];case"sound":return["audio-metrics"];case"device-events":case"system":case"alarm":case"mixed":return null}}var aa="camera-streams";function ra(e){return ia(e.delivery)?sa(e.conditions.systemEvent):void 0!==e.conditions.occupancy&&"device-event"===e.delivery?"occupancy":void 0!==e.conditions.audio&&"immediate"===e.delivery?"sound":"device-event"===e.delivery?"sensor":"detection"}function oa(e){return"immediate"===e.delivery&&"detection"===ra(e)}function sa(e){const t=Wn(Hn(e)??[]);return"family"===t.kind?t.family:"mixed"}function la(e,t,i){const n=Xn(i);return e.id===n.discriminator||!!e.appliesTo.includes(t)&&void 0===n.excluded[e.id]}function ca(e,t){const i=Xn(t),n=[];for(const[t,a]of Object.entries(e)){if(void 0===a)continue;if(Array.isArray(a)&&0===a.length)continue;const e=i.excluded[t];void 0!==e&&n.push({conditionId:t,reason:e})}return n}var da={op:"became-occupied",count:1,sustainSeconds:15},ua={hitPercent:wn,samplingSeconds:Mn,dbThreshold:An};function ma(e){switch(e){case"device-events":return{delivery:ta,conditions:{systemEvent:{kinds:["device-offline","device-online"]}}};case"system":return{delivery:ta,conditions:{systemEvent:{kinds:["node-offline","node-online"]}}};case"alarm":return{delivery:ta,conditions:{systemEvent:{kinds:["alarm-triggered"]}}};case"audio":return{delivery:"immediate",conditions:{audio:ua}};case"occupancy":return{delivery:"device-event",conditions:{occupancy:da}};case"sensor":return{delivery:"device-event",conditions:{}};default:return{delivery:"immediate",conditions:{source:"pipeline"}}}}var pa=["rule","devices","conditions","notification","actions","advanced"],ga={rule:"Rule",devices:"Cameras",conditions:"Conditions",notification:"Notification",actions:"Actions",advanced:"Advanced"};function ya(e){const t=Xn(e),i=[];for(const n of pa)"devices"===n&&Zn(e)||i.push({key:n,label:"conditions"===n?t.label:ga[n]});return i}var va="armed_",ba="alarm-panel",fa="trigger",za=["contact","cover","lock","switch"];function ha(e,t){if("do"===e.kind){const t=e.action;return"cap"===t.kind&&t.cap===ba&&t.method===fa}const i=t?.(e.sequenceId);return void 0!==i&&i.some(e=>"cap"===e.kind&&e.cap===ba&&e.method===fa)}function Sa(e){return(e.conditions.deviceState?.states??[]).some(e=>e.trim().toLowerCase().startsWith(va))}function ka(e){if(Sa(e))return!0;for(const t of e.actions?.onTrigger??[])if(ha(t,e.sequenceActionsOf))return!0;return!1}function qa(e){const t=e.trim().toLowerCase();return za.some(e=>e===t)}function Ca(e){if("cleared"!==e.conditions.sensorTransition)return!1;const t=e.conditions.sensorKinds??[];return!(0===t.length||!t.every(qa))&&ka(e)}function Aa(e){return e.controllable?e.blocking.includes(e.deviceId):!e.nonBlocking.includes(e.deviceId)}function wa(e){return!!e.controllable&&!e.secureOnArmOff.includes(e.deviceId)}var Ma=["exitDelaySec","entryDelaySec","triggeredDurationSec"],Da=["notifyDuringEntryDelay","notifySensorRewatched"];function Pa(e,t){return void 0!==e?e:t>0?"rearmAfter":"doNothing"}function Ia(e,t){return void 0===e?{value:t,source:"default"}:{value:e,source:"mode"}}function Ea(e,t){const i=(e.modeDelays??[]).find(e=>e.mode===t),n=Ia(i?.exitDelaySec,e.exitDelaySec),a=Ia(i?.entryDelaySec,e.entryDelaySec),r=Ia(i?.triggeredDurationSec,e.triggeredDurationSec),o=i?.postTriggeredAction,s=void 0!==o?"mode":"default",l=Pa(o??e.postTriggeredAction,r.value);return{exitDelaySec:n.value,entryDelaySec:a.value,triggeredDurationSec:r.value,postTriggeredAction:l,source:{exitDelaySec:n.source,entryDelaySec:a.source,triggeredDurationSec:r.source,postTriggeredAction:s}}}function ja(e,t){if(void 0===e&&void 0===t)return!0;if(void 0===e||void 0===t)return!1;if(e.invert!==t.invert||e.timezone!==t.timezone)return!1;if(e.windows.length!==t.windows.length)return!1;for(let i=0;i<e.windows.length;i++){const n=e.windows[i],a=t.windows[i];if(void 0===n||void 0===a)return!1;if(n.startMinute!==a.startMinute||n.endMinute!==a.endMinute)return!1;if(n.days.length!==a.days.length)return!1;for(let e=0;e<n.days.length;e++)if(n.days[e]!==a.days[e])return!1}return!0}function xa(e,t){const i=new Set(e),n=new Set(t);return i.size===n.size&&[...i].every(e=>n.has(e))}function Oa(e){const t=new Map;for(const i of e)i.deviceIds.length>0&&t.set(i.mode,new Set(i.deviceIds));return t}function Ta(e,t){const i=Oa(e),n=Oa(t);if(i.size!==n.size)return!1;for(const[e,t]of i){const i=n.get(e);if(void 0===i||!xa([...t],[...i]))return!1}return!0}function Ra(e,t){if(void 0!==e)switch(t){case"exitDelaySec":return e.exitDelaySec;case"entryDelaySec":return e.entryDelaySec;case"triggeredDurationSec":return e.triggeredDurationSec}}function Ba(e,t){switch(t){case"exitDelaySec":return e.exitDelaySec;case"entryDelaySec":return e.entryDelaySec;case"triggeredDurationSec":return e.triggeredDurationSec}}function La(e,t,i){return e?.find(e=>e.mode===t)?.deviceIds.includes(i)??!1}function Fa(e,t){if(void 0!==e.exitDelaySec&&e.exitDelaySec!==t.exitDelaySec)return!1;if(void 0!==e.entryDelaySec&&e.entryDelaySec!==t.entryDelaySec)return!1;if(void 0!==e.triggeredDurationSec&&e.triggeredDurationSec!==t.triggeredDurationSec)return!1;if(void 0!==e.postTriggeredAction&&e.postTriggeredAction!==Pa(t.postTriggeredAction,t.triggeredDurationSec))return!1;if(void 0!==e.announceTargets&&!xa(e.announceTargets,t.announceTargets))return!1;if(void 0!==e.nonBlocking&&!Ta(e.nonBlocking,t.nonBlocking??[]))return!1;if(void 0!==e.blocking&&!Ta(e.blocking,t.blocking??[]))return!1;if(void 0!==e.secureOnArmOff&&!Ta(e.secureOnArmOff,t.secureOnArmOff??[]))return!1;for(const i of e.modeDelays??[]){const e=(t.modeDelays??[]).find(e=>e.mode===i.mode);for(const t of Ma){const n=Ba(i,t);if(void 0===n)continue;const a=Ra(e,t);if(null===n?void 0!==a:a!==n)return!1}if(void 0!==i.postTriggeredAction){const t=e?.postTriggeredAction;if(null===i.postTriggeredAction?void 0!==t:t!==i.postTriggeredAction)return!1}for(const t of Da){const n=i[t];if(void 0===n)continue;const a=e?.[t];if(null===n?void 0!==a:a!==n)return!1}if(void 0!==i.schedule){const t=e?.schedule;if(null===i.schedule?void 0!==t:!ja(t,i.schedule))return!1}}if(void 0!==e.nonBlockingEdit){const i=e.nonBlockingEdit;if(La(t.nonBlocking,i.mode,i.deviceId)!==i.nonBlocking)return!1}if(void 0!==e.blockingEdit){const i=e.blockingEdit;if(La(t.blocking,i.mode,i.deviceId)!==i.blocking)return!1}if(void 0!==e.secureOnArmEdit){const i=e.secureOnArmEdit;if(La(t.secureOnArmOff,i.mode,i.deviceId)===i.secureOnArm)return!1}return!0}var Na=Object.freeze(Object.fromEntries(Object.entries(Ci).flatMap(([e,t])=>{const i=f[e];return void 0===i||"sensor"!==t.category?[]:[[t.kind,i]]}))),_a=Object.freeze(Object.keys(Na));function Ka(e){return e.trim().toLowerCase()}function Ua(e){return void 0!==e&&0!==e.length&&e.every(e=>_a.includes(Ka(e)))}var Ga="Only a sensor that raises and clears (water, smoke, gas, CO, vibration, tamper, motion, contact) can fire on one edge. Pick only such sensor kinds, or the rule fires on every change.",Ha=["title","body"],Wa=["device-battery-low","device-battery-normal"],Va=["device-consumable-low","device-consumable-normal"],Za=["device-tank-low","device-tank-full","device-tank-normal"],$a=["addon-update-available","server-update-available","wrapper-update-available"],Ja=["addon-update-available","server-update-available"],Ya=["alarm-triggered"],Qa=["device-online","device-offline","device-disabled","device-enabled",...Wa,...Va,...Za,"stream-online","stream-offline","detection-blind","alarm-triggered","alarm-armed","alarm-disarmed","alarm-arming","alarm-arm-refused","alarm-pending","alarm-rearmed","alarm-sensor-bypass","alarm-check-failed"],Xa=[...Gn("device-events"),...Gn("system")],er=[{name:"summaryDevices",label:"Summary: devices offline / switched off",example:"Garage \u2014 offline since 07:12",kinds:["device-offline","device-online","device-disabled","device-enabled"]},{name:"summaryStreams",label:"Summary: streams offline",example:"Ingresso (high) \u2014 since 06:40",kinds:["stream-offline","stream-online"]},{name:"summaryBattery",label:"Summary: low batteries",example:"Sensore porta \u2014 8 %",kinds:Wa},{name:"summaryConsumables",label:"Summary: consumables",example:"Robot \u2014 filter 10 %",kinds:Va},{name:"summaryTanks",label:"Summary: tanks",example:"Robot \u2014 clean water low",kinds:Za},{name:"summaryDetection",label:"Summary: cameras detecting nothing",example:"Ingresso \u2014 since 05:10",kinds:["detection-blind"]},{name:"summaryNodes",label:"Summary: nodes",example:"little-unraid \u2014 offline since 03:00",kinds:["node-offline","node-online","node-restarting","node-inference-unavailable"]},{name:"summaryAddons",label:"Summary: addons stopped",example:"hub \u2014 recorder stopped after repeated crashes",kinds:["addon-crash-loop"]},{name:"summaryAddonUpdates",label:"Summary: addon updates",example:"hub:\n\u2022 @camstack/addon-recorder 1.2.3 \u2192 1.2.4",kinds:["addon-update-available","addon-updated"]},{name:"summaryUpdates",label:"Summary: server & container updates",example:"server 1.2.377 \u2192 1.2.378",kinds:["server-update-available","node-updating","server-updated","wrapper-update-available"]}],tr=[{name:"summaryText",label:"Summary: every section",description:"One block per section with something to report, one line per item.",example:"Batterie scariche: Sensore porta \u2014 8 %",group:"system",families:["rule"],fields:[...Ha],kinds:["system"],systemEventKinds:[...Xa],systemEventDeliveries:["summary"]},{name:"summaryCount",label:"Summary: items reported",example:"3",group:"system",families:["rule"],fields:[...Ha],kinds:["system"],systemEventKinds:[...Xa],systemEventDeliveries:["summary"]},{name:"summarySection",label:"Summary: this section",description:"The section a per-section summary row is about (D698); on a summary sent as one message, every section it reports, comma-separated.",example:"Batterie scariche",group:"system",families:["rule"],fields:[...Ha],kinds:["system"],systemEventKinds:[...Xa],systemEventDeliveries:["summary"]},...er.map(e=>({name:e.name,label:e.label,example:e.example,group:"system",families:["rule"],fields:[...Ha],kinds:["system"],systemEventKinds:[...e.kinds],systemEventDeliveries:["summary"]}))],ir=[{name:"camera",label:"Camera",example:"Ingresso",group:"subject",families:["rule","timelapse"],systemEventKinds:[...Qa,"export-completed"]},{name:"class",label:"Detected class",description:"The wire class id (e.g. \"person\", \"cat\"); the counted class on an occupancy row.",example:"person",group:"subject",families:["rule"],fields:[...Ha],kinds:["detection","sensor","sound","occupancy","system"],systemEventKinds:[...Ya]},{name:"classLabel",label:"Detected class (translated)",description:"Human label of {{class}} in the notification language (EVENT_KIND_LABELS); falls back to the raw id.",example:"Persona",group:"subject",families:["rule"],fields:[...Ha],kinds:["detection","sensor","sound","occupancy","system"],systemEventKinds:[...Ya]},{name:"label",label:"Name or plate",description:"Recognised person or read plate; empty otherwise.",example:"Mario",group:"subject",families:["rule"],fields:[...Ha],kinds:["detection","system"],systemEventKinds:[...Ya]},{name:"subject",label:"Subject sentence",description:"Composed in the notification language, e.g. \"person (Mario)\".",example:"persona (Mario)",group:"subject",families:["rule"],fields:[...Ha],kinds:["detection","sensor","sound","occupancy"]},{name:"confidence",label:"Confidence",example:"87%",group:"subject",families:["rule"],fields:[...Ha],kinds:["detection","system"],systemEventKinds:[...Ya]},{name:"count",label:"Count",description:"Occupancy count, subjects in a grouped notification, or the event count of a system notice.",example:"3",group:"subject",families:["rule"],fields:[...Ha],kinds:["detection","occupancy","system"],systemEventKinds:["addon-crash-loop",...Ja,"addon-updated"]},{name:"detectionSummary",label:"Detection summary",description:"Class composition, e.g. \"2 persons and 1 car\".",example:"2 persone e 1 auto",group:"subject",families:["rule","timelapse","summary"],fields:[...Ha],kinds:["detection"]},{name:"zones",label:"Zones",example:"Cancello, Vialetto",group:"place",families:["rule"],fields:[...Ha],kinds:["detection","system"],systemEventKinds:[...Ya]},{name:"zone",label:"Zone",example:"Cancello",group:"place",families:["rule"],fields:[...Ha],kinds:["detection","occupancy","system"],systemEventKinds:[...Ya]},{name:"inZones",label:"\"in <zones>\" fragment",description:"Leading space included; empty when no zone.",example:" in Cancello",group:"place",families:["rule"],fields:[...Ha],kinds:["detection","system"],systemEventKinds:[...Ya]},{name:"scope",label:"Occupancy scope",example:"Cancello",group:"place",families:["rule"],fields:[...Ha],kinds:["occupancy"]},{name:"time",label:"Time",description:"Hours and minutes, in the notification language.",example:"20:05",group:"time",families:["rule","timelapse","summary"],fields:[...Ha]},{name:"rule",label:"Rule name",example:"Ingresso notte",group:"rule",families:["rule","timelapse","summary"]},{name:"from",label:"Window start",example:"07:00",group:"time",families:["timelapse","summary"]},{name:"to",label:"Window end",example:"08:00",group:"time",families:["timelapse","summary"]},{name:"capacity",label:"Capacity",example:"2",group:"occupancy",families:["rule"],fields:[...Ha],kinds:["occupancy"]},{name:"op",label:"Occupied / free",example:"occupata",group:"occupancy",families:["rule"],fields:[...Ha],kinds:["occupancy"]},{name:"sounds",label:"Sounds heard",example:"abbaio, clacson",group:"sound",families:["rule"],fields:[...Ha],kinds:["sound"]},{name:"hitPercent",label:"Share of the window",description:"Level mode only: percentage of samples above the threshold.",example:"42",group:"sound",families:["rule"],fields:[...Ha],kinds:["sound"]},{name:"db",label:"Peak level (dBFS)",example:"-18",group:"sound",families:["rule"],fields:[...Ha],kinds:["sound"]},{name:"eventType",label:"Event type",description:"Raw device event token, e.g. \"press\" or \"open\"; empty when the device sends none.",example:"press",group:"sensor",families:["rule"],fields:[...Ha],kinds:["sensor"]},{name:"ai",label:"AI sentence",description:"Where the AI description goes; appended on its own line when absent.",example:"Una persona lascia un pacco.",group:"ai",families:["rule","summary"],fields:["body"],kinds:["detection","occupancy"]},{name:"eventKind",label:"Event kind",example:"device-offline",group:"system",families:["rule"],fields:[...Ha],kinds:["system"],systemEventDeliveries:["instant"]},{name:"deviceName",label:"Device",example:"Ingresso",group:"system",families:["rule"],fields:[...Ha],kinds:["system"],systemEventKinds:[...Qa]},{name:"locations",label:"Intrusion locations",example:"Ingresso, Corridoio, Salone",group:"system",families:["rule"],fields:[...Ha],kinds:["system"],systemEventKinds:[...Ya]},{name:"deviceId",label:"Device id",example:"617",group:"system",families:["rule"],fields:[...Ha],kinds:["system"],systemEventKinds:[...Qa,"export-completed"]},{name:"percentage",label:"Percentage",example:"15",group:"system",families:["rule"],fields:[...Ha],kinds:["system"],systemEventKinds:[...Wa,...Va]},{name:"item",label:"Consumable",example:"Filtro",group:"system",families:["rule"],fields:[...Ha],kinds:["system"],systemEventKinds:[...Va]},{name:"tank",label:"Tank",description:"Which tank: clean water, dirty water, detergent or dust bin.",example:"clean water",group:"system",families:["rule"],fields:[...Ha],kinds:["system"],systemEventKinds:[...Za]},{name:"profile",label:"Stream profile",example:"high",group:"system",families:["rule"],fields:[...Ha],kinds:["system"],systemEventKinds:["stream-online","stream-offline"]},{name:"node",label:"Node",example:"hub",group:"system",families:["rule"],fields:[...Ha],kinds:["system"],systemEventKinds:["node-online","node-offline","node-restarting","node-updating","node-inference-unavailable","addon-crash-loop",...$a,"addon-updated","server-updated"]},{name:"nodeId",label:"Node id",example:"hub",group:"system",families:["rule"],fields:[...Ha],kinds:["system"],systemEventKinds:["node-online","node-offline","node-restarting","node-updating","node-inference-unavailable","addon-crash-loop",...$a,"server-updated"]},{name:"devices",label:"Devices",description:"node-inference-unavailable: the affected cameras, comma-joined. Alarm arm / arming / refusal: HOW MANY devices are armed (or open).",example:"Ingresso, Garage",group:"system",families:["rule"],fields:[...Ha],kinds:["system"],systemEventKinds:["node-inference-unavailable","alarm-armed","alarm-arming","alarm-arm-refused"]},{name:"addons",label:"Addons",example:"stream-broker",group:"system",families:["rule"],fields:[...Ha],kinds:["system"],systemEventKinds:["addon-crash-loop"]},{name:"minutes",label:"Minutes",example:"12",group:"system",families:["rule"],fields:[...Ha],kinds:["system"],systemEventKinds:["detection-blind"]},{name:"package",label:"Package",example:"@camstack/addon-recorder",group:"system",families:["rule"],fields:[...Ha],kinds:["system"],systemEventKinds:[...$a,"addon-updated","node-updating","server-updated"]},{name:"packageName",label:"Package",example:"@camstack/addon-recorder",group:"system",families:["rule"],fields:[...Ha],kinds:["system"],systemEventKinds:[...Ja,"node-updating","server-updated"]},{name:"nodes",label:"Nodes",description:"Comma-joined node ids, when an update spans more than one \u2014 the single-node case names it through {{nodeId}} instead. `incomingFromUpdateAvailable` (event-intake.ts) fills `nodes` from ONE shared textParams object for both addon- and server-update-available, exactly like packageName/currentVersion/latestVersion/count \u2014 only the shipped TEXT (system.server-update-available.body.onNodes) reads it today, but the var is real on both kinds.",example:"hub, little-unraid",group:"system",families:["rule"],fields:[...Ha],kinds:["system"],systemEventKinds:[...Ja]},{name:"currentVersion",label:"Current version",example:"1.2.377",group:"system",families:["rule"],fields:[...Ha],kinds:["system"],systemEventKinds:[...$a]},{name:"latestVersion",label:"Latest version",example:"1.2.378",group:"system",families:["rule"],fields:[...Ha],kinds:["system"],systemEventKinds:[...$a]},{name:"list",label:"Updated packages",description:"One line per package. `incomingFromUpdateAvailable` fills it for addon-/server-update-available too (the SAME shared textParams object as `nodes`) \u2014 `system.addon-update-available.body` reads it; `incomingFromAddonUpdates` fills it again, independently, for the completed `addon-updated` event.",example:"recorder, notifiers",group:"system",families:["rule"],fields:[...Ha],kinds:["system"],systemEventKinds:[...Ja,"addon-updated"]},{name:"fromVersion",label:"From version",example:"1.2.377",group:"system",families:["rule"],fields:[...Ha],kinds:["system"],systemEventKinds:["node-updating","server-updated"]},{name:"toVersion",label:"To version",example:"1.2.378",group:"system",families:["rule"],fields:[...Ha],kinds:["system"],systemEventKinds:["node-updating","server-updated"]},{name:"destinationsOk",label:"Destinations ok",example:"2",group:"system",families:["rule"],fields:[...Ha],kinds:["system"],systemEventKinds:["backup-completed"]},{name:"destinationsTotal",label:"Destinations",example:"2",group:"system",families:["rule"],fields:[...Ha],kinds:["system"],systemEventKinds:["backup-completed"]},{name:"destinationsFailed",label:"Destinations failed",example:"0",group:"system",families:["rule"],fields:[...Ha],kinds:["system"],systemEventKinds:["backup-completed"]},{name:"sizeMB",label:"Size (MB)",example:"412",group:"system",families:["rule"],fields:[...Ha],kinds:["system"],systemEventKinds:["backup-completed"]},{name:"backupId",label:"Backup id",example:"bk-20260924",group:"system",families:["rule"],fields:[...Ha],kinds:["system"],systemEventKinds:["backup-completed"]},{name:"title",label:"Export title",example:"Ingresso 08:00",group:"system",families:["rule"],fields:[...Ha],kinds:["system"],systemEventKinds:["export-completed"]},{name:"exportId",label:"Export id",example:"exp-20260924",group:"system",families:["rule"],fields:[...Ha],kinds:["system"],systemEventKinds:["export-completed"]},{name:"bytes",label:"Export size (bytes)",example:"10485760",group:"system",families:["rule"],fields:[...Ha],kinds:["system"],systemEventKinds:["export-completed"]},{name:"mode",label:"Alarm mode",example:"away",group:"system",families:["rule"],fields:[...Ha],kinds:["system"],systemEventKinds:["alarm-armed","alarm-arming","alarm-arm-refused","alarm-pending","alarm-rearmed","alarm-check-failed"]},{name:"seconds",label:"Seconds",description:"Arming: the exit delay left. Pending: the entry delay left to disarm.",example:"30",group:"system",families:["rule"],fields:[...Ha],kinds:["system"],systemEventKinds:["alarm-arming","alarm-pending"]},{name:"rules",label:"Covering rules",description:"How many enabled rules the armed / arming mode gates.",example:"2",group:"system",families:["rule"],fields:[...Ha],kinds:["system"],systemEventKinds:["alarm-armed","alarm-arming"]},{name:"names",label:"Device names",description:"Armed / arming: the Active devices (or every skipped name when none are Active). Refusal: the open sensors.",example:"Ingresso, Garage",group:"system",families:["rule"],fields:[...Ha],kinds:["system"],systemEventKinds:["alarm-armed","alarm-arming","alarm-arm-refused"]},{name:"skippedNames",label:"Skipped devices",description:"Devices the mode names but cannot arm (muted, detection off, offline).",example:"Garage",group:"system",families:["rule"],fields:[...Ha],kinds:["system"],systemEventKinds:["alarm-armed","alarm-arming"]},{name:"active",label:"Active count",description:"How many named devices the armed / arming mode is watching (title: n attivi / n active).",example:"3",group:"system",families:["rule"],fields:[...Ha],kinds:["system"],systemEventKinds:["alarm-armed","alarm-arming"]},{name:"skipped",label:"Skipped count",description:"How many named devices the mode cannot arm \u2014 muted, detection off, offline (title: m saltati).",example:"1",group:"system",families:["rule"],fields:[...Ha],kinds:["system"],systemEventKinds:["alarm-armed","alarm-arming"]},{name:"bypassedNames",label:"Bypassed sensors",description:"Sensors the operator armed around because they were open.",example:"Finestra veranda",group:"system",families:["rule"],fields:[...Ha],kinds:["system"],systemEventKinds:["alarm-armed","alarm-arming"]},{name:"coverage",label:"Coverage %",example:"96",group:"digest",families:["timelapse"],fields:[...Ha]},{name:"events",label:"Events",example:"4",group:"digest",families:["timelapse","summary"],fields:[...Ha]},{name:"detections",label:"Detections",example:"7",group:"digest",families:["timelapse","summary"],fields:[...Ha]},{name:"count_person",label:"Count of one class",description:"count_<class>, e.g. count_person, count_car.",example:"3",group:"digest",families:["timelapse","summary"],fields:[...Ha],dynamic:{prefix:"count_",from:"classes"}},{name:"cameras",label:"Cameras",example:"3",group:"digest",families:["summary"],fields:[...Ha]},{name:"matched",label:"Matched events",example:"12",group:"digest",families:["summary"],fields:[...Ha]},{name:"shown",label:"Events shown",example:"9",group:"digest",families:["summary"],fields:[...Ha]},{name:"total",label:"Events total",example:"12",group:"digest",families:["summary"],fields:[...Ha]},...tr],nr=["device-tank-low","device-tank-full","device-tank-normal","node-restarting","node-updating"];function ar(e){return void 0!==e.systemEventDeliveries&&!e.systemEventDeliveries.includes("instant")}function rr(e,t){if(!Zn(t.kind))return!0;const i=t.systemEventDelivery??"instant";return(e.systemEventDeliveries??(void 0!==e.systemEventKinds?["instant"]:[i])).includes(i)}function or(e,t){return void 0===e||void 0===t||(!!e.some(e=>e===t)||Zn(t)&&e.includes("system"))}function sr(e,t){if(!Zn(t.kind)||void 0===e.systemEventKinds)return!0;const i=e.systemEventKinds,n=t.systemEventKinds??[];if(n.length>0)return n.some(e=>i.includes(e));const a=void 0===t.kind?void 0:$n(t.kind);if(void 0===a)return!0;const r=Gn(a);return i.some(e=>r.includes(e))}var lr=["device-events","system"];function cr(e){if("summary"!==e.systemEventDelivery?.mode)return[];if(!ia(e.delivery))return[{code:"not-a-system-rule",delivery:e.delivery}];const t=[],i=Wn(e.conditions.systemEvent?.kinds??[]),n="family"===i.kind?i.family:"mixed";"mixed"!==n&&lr.includes(n)||t.push({code:"family-not-summarisable",family:n});const a=e.systemEventDelivery.schedule.windows;var r;return 0===a.length&&t.push({code:"empty-schedule"}),a.forEach((e,i)=>{0!==e.days.length&&e.startMinute!==e.endMinute||t.push({code:"degenerate-window",index:i})}),void 0!==e.schedule&&t.push({code:"schedule-beside-summary"}),void 0!==(r=e.actions)&&((r.onActivation?.length??0)>0||(r.onDeactivation?.length??0)>0||(r.onTrigger?.length??0)>0||(r.onTriggerOff?.length??0)>0||(r.buttons?.length??0)>0)&&t.push({code:"actions-beside-summary"}),t}var dr=/\{\{\s*summary(?:Text|Devices|Streams|Battery|Consumables|Tanks|Detection|Nodes|Addons|AddonUpdates|Updates)\s*\}\}/;function ur(e){return void 0===e||0===e.trim().length||dr.test(e)}function mr(e){return e.map(e=>Object.assign({id:e.id,name:e.name,type:e.isHub?"hub":"agent",location:e.isOnline?"online":"offline"},e.name!==e.id?{detail:e.id}:{}))}var pr=["@camstack/server","@camstack/system","camstack-wrapper"],gr={"@camstack/server":"server","@camstack/system":"framework","camstack-wrapper":"wrapper"};function yr(e){const t=new Map(e.map(e=>[e.name,e.version])),i=pr.map(e=>{const i=t.get(e);return Object.assign({id:e,name:e,type:gr[e],location:null},void 0!==i?{detail:i}:{})}),n=e.filter(e=>{return t=e.name,!pr.some(e=>e===t);var t}).map(e=>({id:e.name,name:e.name,type:"addon",location:null,detail:e.version})).sort((e,t)=>e.name.localeCompare(t.name));return[...i,...n]}var vr={disarmed:{en:"Disarmed",it:"Disinserito"},armed_home:{en:"Armed (home)",it:"Inserito (in casa)"},armed_away:{en:"Armed (away)",it:"Inserito (fuori casa)"},armed_night:{en:"Armed (night)",it:"Inserito (notte)"},armed_vacation:{en:"Armed (vacation)",it:"Inserito (vacanza)"},armed_custom_bypass:{en:"Armed (custom)",it:"Inserito (personalizzato)"},arming:{en:"Arming",it:"In inserimento"},disarming:{en:"Disarming",it:"In disinserimento"},pending:{en:"Pending (entry delay)",it:"In attesa (ritardo ingresso)"},triggered:{en:"Triggered",it:"In allarme"},open:{en:"Open",it:"Aperto"},opening:{en:"Opening",it:"In apertura"},closing:{en:"Closing",it:"In chiusura"},closed:{en:"Closed",it:"Chiuso"},stopped:{en:"Stopped",it:"Fermo"},locked:{en:"Locked",it:"Bloccata"},unlocked:{en:"Unlocked",it:"Sbloccata"},locking:{en:"Locking",it:"In blocco"},unlocking:{en:"Unlocking",it:"In sblocco"},jammed:{en:"Jammed",it:"Inceppata"},on:{en:"On",it:"Acceso"},off:{en:"Off",it:"Spento"},home:{en:"Home",it:"In casa"},not_home:{en:"Away",it:"Fuori casa"},matched:{en:"Matched (as captured)",it:"Corrisponde (come acquisita)"},diverged:{en:"Diverged (changed)",it:"Diversa (cambiata)"},unknown:{en:"Cannot judge",it:"Non valutabile"},latched:{en:"Latched",it:"Memorizzato"},live:{en:"Live",it:"In tempo reale"}},br=new Set(["disarmed","armed_home","armed_away","armed_night","armed_vacation","armed_custom_bypass","arming","disarming","pending","triggered","open","opening","closing","closed","stopped","locked","unlocked","locking","unlocking","jammed","on","off","home","not_home","matched","diverged","unknown","latched","live"]);function fr(e){return br.has(e)}function zr(e,t){return fr(e)?vr[e][t]:e}var hr=s.z.object({title:s.z.string().max(500).optional(),body:s.z.string().max(2e3).optional()}),Sr=s.z.string().min(1).max(200),kr=s.z.array(s.z.number()).min(1),qr=s.z.number().int().min(2).max(3600),Cr=s.z.number().int().min(1).max(60),Ar=s.z.array(We).min(1),wr=s.z.number().int().min(1).max(5),Mr=.1,Dr=s.z.number().min(Mr).max(3600),Pr=s.z.number().min(0).max(60),Ir=s.z.string().max(200),Er=s.z.enum(["image","gif"]),jr=s.z.array(s.z.string().min(1).max(40)).max(20),xr=s.z.object({name:Sr,enabled:s.z.boolean().default(!0),deviceIds:kr,schedule:we,cadenceSec:qr.default(15),framerate:Cr.default(10),denseCadenceSec:Dr.optional(),minDwellSec:Pr.optional(),targets:Ar,template:hr.optional(),previewText:Ir.optional(),previewMode:Er.default("image"),reportClasses:jr.optional(),priority:wr.default(3)}),Or="Timelapse {{camera}}";s.z.object({name:Sr.optional(),enabled:s.z.boolean().optional(),deviceIds:kr.optional(),schedule:we.optional(),cadenceSec:qr.optional(),framerate:Cr.optional(),denseCadenceSec:Dr.optional(),minDwellSec:Pr.optional(),targets:Ar.optional(),template:hr.nullable().optional(),previewText:Ir.optional(),previewMode:Er.optional(),reportClasses:jr.optional(),priority:wr.optional()});var Tr=xr.extend({id:s.z.string(),ownerUserId:s.z.string().optional(),lastGeneratedAt:s.z.number().optional(),generatedByDevice:s.z.record(s.z.string(),s.z.number()).optional(),createdBy:s.z.string(),createdAt:s.z.number(),updatedAt:s.z.number()})},1170,[1196]);
225
+ __d(function(e,t,i,n,a,r,o){"use strict";Object.defineProperty(r,'__esModule',{value:!0}),Object.defineProperty(r,"APPLE_SA_TO_MACRO",{enumerable:!0,get:function(){return U}}),Object.defineProperty(r,"AUDIO_MACRO_LABELS",{enumerable:!0,get:function(){return _}}),Object.defineProperty(r,"AlarmArmModeSchema",{enumerable:!0,get:function(){return de}}),Object.defineProperty(r,"CLIP_BROKER_PACED_RATES",{enumerable:!0,get:function(){return Oi}}),Object.defineProperty(r,"COCO_TO_MACRO",{enumerable:!0,get:function(){return N}}),Object.defineProperty(r,"CamProfileSchema",{enumerable:!0,get:function(){return c}}),Object.defineProperty(r,"DEFAULT_TIMELAPSE_PREVIEW_TEXT",{enumerable:!0,get:function(){return Or}}),Object.defineProperty(r,"DeviceType",{enumerable:!0,get:function(){return S}}),Object.defineProperty(r,"EVENTFUL_CAP_NAMES",{enumerable:!0,get:function(){return Ci}}),Object.defineProperty(r,"EVENT_KIND_BY_CAP",{enumerable:!0,get:function(){return Ai}}),Object.defineProperty(r,"EVENT_TAXONOMY",{enumerable:!0,get:function(){return re}}),Object.defineProperty(r,"MACRO_LABELS",{enumerable:!0,get:function(){return F}}),Object.defineProperty(r,"NC_ALARM_DELAY_MAX_SEC",{enumerable:!0,get:function(){return xt}}),Object.defineProperty(r,"NC_ALARM_SENSORS_MAX",{enumerable:!0,get:function(){return gi}}),Object.defineProperty(r,"NC_ALARM_SYSTEM_EVENT_KINDS",{enumerable:!0,get:function(){return ze}}),Object.defineProperty(r,"NC_ALARM_TRIGGERED_MAX_SEC",{enumerable:!0,get:function(){return Ot}}),Object.defineProperty(r,"NC_BATTERY_CONSUMABLE_SYSTEM_EVENT_KINDS",{enumerable:!0,get:function(){return he}}),Object.defineProperty(r,"NC_CAMERA_SCOPE_CAP_NAME",{enumerable:!0,get:function(){return aa}}),Object.defineProperty(r,"NC_CONSUMABLE_LOW_PERCENT_DEFAULT",{enumerable:!0,get:function(){return ke}}),Object.defineProperty(r,"NC_CONSUMABLE_LOW_PERCENT_MAX",{enumerable:!0,get:function(){return qe}}),Object.defineProperty(r,"NC_GROUPING_DEFAULT_SEC",{enumerable:!0,get:function(){return tt}}),Object.defineProperty(r,"NC_GROUPING_MAX_SEC",{enumerable:!0,get:function(){return it}}),Object.defineProperty(r,"NC_GROUPING_MIN_SEC",{enumerable:!0,get:function(){return et}}),Object.defineProperty(r,"NC_RULE_EDITOR_SECTION_ORDER",{enumerable:!0,get:function(){return pa}}),Object.defineProperty(r,"NC_RULE_KIND_SPECS",{enumerable:!0,get:function(){return Qn}}),Object.defineProperty(r,"NC_SENSOR_TRANSITION_UNSUPPORTED_REASON",{enumerable:!0,get:function(){return Ga}}),Object.defineProperty(r,"NC_SYSTEM_EVENT_FAMILY_FILTERS",{enumerable:!0,get:function(){return Kn}}),Object.defineProperty(r,"NC_SYSTEM_EVENT_KIND_GROUP_SPECS",{enumerable:!0,get:function(){return Un}}),Object.defineProperty(r,"NC_SYSTEM_EVENT_SUMMARY_FAMILIES",{enumerable:!0,get:function(){return lr}}),Object.defineProperty(r,"NC_TEMPLATE_HELD_BACK_SYSTEM_EVENT_KINDS",{enumerable:!0,get:function(){return nr}}),Object.defineProperty(r,"NC_TEMPLATE_VARS",{enumerable:!0,get:function(){return ir}}),Object.defineProperty(r,"NcAlarmConfigSchema",{enumerable:!0,get:function(){return pi}}),Object.defineProperty(r,"NcAlarmSensorsSchema",{enumerable:!0,get:function(){return fi}}),Object.defineProperty(r,"NcAlarmSettingsPatchSchema",{enumerable:!0,get:function(){return ri}}),Object.defineProperty(r,"NcHistoryEntrySchema",{enumerable:!0,get:function(){return wt}}),Object.defineProperty(r,"NcRuleLastRunsSchema",{enumerable:!0,get:function(){return Pt}}),Object.defineProperty(r,"NodeDirectorySchema",{enumerable:!0,get:function(){return en}}),Object.defineProperty(r,"RECORDING_EXPORT_MAX_READ_BYTES",{enumerable:!0,get:function(){return pn}}),Object.defineProperty(r,"SystemMirror",{enumerable:!0,get:function(){return zn}}),Object.defineProperty(r,"TIMELAPSE_DENSE_FLOOR_SEC",{enumerable:!0,get:function(){return Mr}}),Object.defineProperty(r,"TimelapseRuleSchema",{enumerable:!0,get:function(){return Tr}}),Object.defineProperty(r,"YAMNET_TO_MACRO",{enumerable:!0,get:function(){return K}}),Object.defineProperty(r,"alarmDeviceBlocksArming",{enumerable:!0,get:function(){return Ca}}),Object.defineProperty(r,"alarmDeviceSecureOnArm",{enumerable:!0,get:function(){return wa}}),Object.defineProperty(r,"alarmPatchLanded",{enumerable:!0,get:function(){return Fa}}),Object.defineProperty(r,"conditionVisibleForKind",{enumerable:!0,get:function(){return la}}),Object.defineProperty(r,"createSystemProxy",{enumerable:!0,get:function(){return qn}}),Object.defineProperty(r,"droppedConditionsForKind",{enumerable:!0,get:function(){return ca}}),Object.defineProperty(r,"isHeldBackTemplateVar",{enumerable:!0,get:function(){return ar}}),Object.defineProperty(r,"isSystemRuleKind",{enumerable:!0,get:function(){return Zn}}),Object.defineProperty(r,"kindsForDiscriminator",{enumerable:!0,get:function(){return ea}}),Object.defineProperty(r,"knownValues",{enumerable:!0,get:function(){return Bn}}),Object.defineProperty(r,"nodePickerItems",{enumerable:!0,get:function(){return mr}}),Object.defineProperty(r,"packagePickerItems",{enumerable:!0,get:function(){return yr}}),Object.defineProperty(r,"pickerForCondition",{enumerable:!0,get:function(){return On}}),Object.defineProperty(r,"pickerForRuleClasses",{enumerable:!0,get:function(){return Rn}}),Object.defineProperty(r,"resolveModeDelays",{enumerable:!0,get:function(){return Ea}}),Object.defineProperty(r,"ruleDeviceCompatCapNames",{enumerable:!0,get:function(){return na}}),Object.defineProperty(r,"ruleEditorSectionsForKind",{enumerable:!0,get:function(){return ya}}),Object.defineProperty(r,"ruleGroupingApplies",{enumerable:!0,get:function(){return oa}}),Object.defineProperty(r,"ruleKindOf",{enumerable:!0,get:function(){return ra}}),Object.defineProperty(r,"ruleKindSpec",{enumerable:!0,get:function(){return Xn}}),Object.defineProperty(r,"ruleSeedForSection",{enumerable:!0,get:function(){return ma}}),Object.defineProperty(r,"sensorTransitionNeverFires",{enumerable:!0,get:function(){return Aa}}),Object.defineProperty(r,"sensorTransitionOffered",{enumerable:!0,get:function(){return Ua}}),Object.defineProperty(r,"stateLabel",{enumerable:!0,get:function(){return zr}}),Object.defineProperty(r,"systemEventDeliveryProblems",{enumerable:!0,get:function(){return cr}}),Object.defineProperty(r,"systemEventFilterAppliesToAnyKind",{enumerable:!0,get:function(){return Fn}}),Object.defineProperty(r,"systemEventKindsOfFamily",{enumerable:!0,get:function(){return Gn}}),Object.defineProperty(r,"systemFamilyOfKind",{enumerable:!0,get:function(){return $n}}),Object.defineProperty(r,"templateCarriesSummary",{enumerable:!0,get:function(){return ur}}),Object.defineProperty(r,"templateVarDeliveryApplies",{enumerable:!0,get:function(){return rr}}),Object.defineProperty(r,"templateVarKindApplies",{enumerable:!0,get:function(){return or}}),Object.defineProperty(r,"templateVarSystemEventApplies",{enumerable:!0,get:function(){return sr}});var s=t(o[0]);!(function(){const e=new Float32Array(256);for(let t=0;t<256;t++){const i=255&~t,n=128&i?-1:1,a=i>>4&7;e[t]=n*((8*(15&i)+132<<a)-132)/32768}})(),(function(){const e=new Float32Array(256);for(let t=0;t<256;t++){const i=85^t,n=128&i?1:-1,a=i>>4&7,r=15&i;e[t]=n*(0===a?16*r+8:16*r+264<<a-1)/32768}})();var l=s.z.object({url:s.z.string().min(1),hostNodeId:s.z.string().min(1),expiresAtMs:s.z.number().int().nonnegative(),declaredBytes:s.z.number().int().nonnegative().nullable()}),c=s.z.enum(["high","mid","low"]);s.z.union([c,s.z.literal("auto")]);var d=s.z.enum(["pull-rtsp","pull-rtmp","pull-http","pull-flv","pull-rfc4571","push-annexb","derived"]),u=s.z.object({width:s.z.number().int().positive(),height:s.z.number().int().positive()});s.z.object({camStreamId:s.z.string().min(1),deviceId:s.z.number().int().nonnegative(),kind:d,url:s.z.string().optional(),codec:s.z.string().optional(),resolution:u.optional(),fps:s.z.number().positive().optional(),label:s.z.string().optional(),deviceFeatures:s.z.array(s.z.string()).optional(),autoEligible:s.z.boolean().optional(),profileHint:c.optional(),metadata:s.z.record(s.z.string(),s.z.unknown()).optional()});var m=s.z.enum(["unassigned","idle","connecting","streaming","error"]);s.z.object({deviceId:s.z.number().int().nonnegative(),profile:c,brokerId:s.z.string(),sourceCamStreamId:s.z.string().nullable(),status:m,resolution:u.optional(),codec:s.z.string().optional(),preBufferSec:s.z.number().nonnegative().optional(),errorMessage:s.z.string().optional()}),s.z.object({id:s.z.string(),label:s.z.string(),protocol:s.z.enum(["rtsp","rtmp","annexb","http-mjpeg","webrtc","custom"]),url:s.z.string().optional(),resolution:s.z.object({width:s.z.number(),height:s.z.number()}).readonly().optional(),fps:s.z.number().optional(),bitrate:s.z.number().optional(),codec:s.z.string().optional(),profileHint:c.optional()}),s.z.object({type:s.z.string(),url:s.z.string(),videoCodec:s.z.string().optional(),audioCodec:s.z.string().optional(),metadata:s.z.record(s.z.string(),s.z.unknown()).readonly().optional()}),s.z.object({type:s.z.enum(["video","audio"]),data:s.z.instanceof(Uint8Array),pts:s.z.number(),dts:s.z.number(),keyframe:s.z.boolean(),codec:s.z.string()}),s.z.object({data:s.z.instanceof(Uint8Array),width:s.z.number(),height:s.z.number(),format:s.z.enum(["jpeg","rgb","bgr","yuv420","gray"]),timestamp:s.z.number()}),s.z.object({shmId:s.z.string(),slot:s.z.number().int().nonnegative(),seq:s.z.number().int().nonnegative(),width:s.z.number().int().positive(),height:s.z.number().int().positive(),format:s.z.enum(["jpeg","rgb","bgr","yuv420","gray"]),pts:s.z.number(),byteLength:s.z.number().int().nonnegative(),nodeId:s.z.string(),slotCount:s.z.number().int().positive()});var p=s.z.enum(["rgb","bgr","yuv420","gray"]);s.z.object({brokerId:s.z.string(),format:p,maxFps:s.z.number().positive().optional(),tag:s.z.string().optional()}),s.z.object({subscriptionId:s.z.string(),maxFps:s.z.number().nonnegative()});var g=s.z.enum(["f32le","pcmu","pcma"]);s.z.object({data:s.z.instanceof(Uint8Array),sampleRate:s.z.number().int().positive(),channels:s.z.number().int().positive(),timestamp:s.z.number(),format:g.optional()}),s.z.object({brokerId:s.z.string(),tag:s.z.string().optional(),accept:s.z.array(g).readonly().optional()}),s.z.object({subscriptionId:s.z.string()});var y=s.z.enum(["idle","connecting","streaming","error","stopped"]);s.z.object({status:y,inputFps:s.z.number(),decodeFps:s.z.number(),encodedSubscribers:s.z.number(),decodedSubscribers:s.z.number(),uptimeMs:s.z.number(),bitrateKbps:s.z.number(),idrIntervalMs:s.z.number(),codec:s.z.string().optional(),totalBytes:s.z.number(),packetCount:s.z.number(),rtspClients:s.z.number(),pipeClients:s.z.number(),preBufferSec:s.z.number(),preBufferMs:s.z.number(),preBufferPackets:s.z.number(),decoderNodeId:s.z.string().nullable(),audio:s.z.object({codec:s.z.string(),sampleRate:s.z.number(),channels:s.z.number(),supported:s.z.boolean()}).nullable().optional(),audioMuted:s.z.boolean().optional(),audioMutedDropped:s.z.number().optional()}),s.z.object({profile:c,brokerId:s.z.string(),url:s.z.string(),mutedUrl:s.z.string(),enabled:s.z.boolean(),codec:s.z.string().optional(),resolution:u.optional()});var v={contact:"entryOpen",binary:"on",switch:"on",motion:"detected",flood:"flooded",gas:"detected",smoke:"detected","carbon-monoxide":"detected",vibration:"detected",tamper:"tampered"};s.z.object({field:s.z.string().min(1),on:s.z.literal("advance")});var b=s.z.object({id:s.z.string(),title:s.z.string(),description:s.z.string().optional(),style:s.z.enum(["card","accordion"]).optional(),defaultCollapsed:s.z.boolean().optional(),columns:s.z.union([s.z.literal(1),s.z.literal(2),s.z.literal(3),s.z.literal(4)]).optional(),tab:s.z.string().optional(),location:s.z.enum(["settings","top-tab"]).optional(),order:s.z.number().optional(),fields:s.z.array(s.z.any())}),f=s.z.object({id:s.z.string(),label:s.z.string(),icon:s.z.string(),order:s.z.number().optional()});function z(e,t,i){return Object.assign({input:e,output:t,kind:i?.kind??"query"},void 0!==i?.auth?{auth:i.auth}:{},void 0!==i?.access?{access:i.access}:{},void 0!==i?.caller?{caller:i.caller}:{},{timeoutMs:i?.timeoutMs})}function h(e,t,i){return Object.assign({},z(e,t,i),{providerOptional:!0})}s.z.object({tabs:s.z.array(f).optional(),sections:s.z.array(b)}).nullable(),s.z.object({deviceId:s.z.number()}),s.z.object({deviceId:s.z.number()}),s.z.object({deviceId:s.z.number(),patch:s.z.record(s.z.string(),s.z.unknown())}),s.z.object({success:s.z.literal(!0)}),s.z.object({deviceId:s.z.number()}),s.z.unknown().nullable();var S=(function(e){return e.Camera="camera",e.Hub="hub",e.Light="light",e.Siren="siren",e.Switch="switch",e.Sensor="sensor",e.Thermostat="thermostat",e.Climate="climate",e.Button="button",e.EventEmitter="event-emitter",e.Update="update",e.Generic="generic",e.Notifier="notifier",e.Script="script",e.Automation="automation",e.Lock="lock",e.Cover="cover",e.Valve="valve",e.Humidifier="humidifier",e.WaterHeater="water-heater",e.Fan="fan",e.MediaPlayer="media-player",e.AlarmPanel="alarm-panel",e.Control="control",e.Presence="presence",e.Weather="weather",e.Vacuum="vacuum",e.LawnMower="lawn-mower",e.Container="container",e.Image="image",e.PetFeeder="pet-feeder",e})({}),k=s.z.enum(["image","video","gif","audio","icon"]),q=s.z.object({mediaType:k,url:s.z.string().optional(),bytes:s.z.instanceof(Uint8Array).optional(),mime:s.z.string().optional(),name:s.z.string().optional()}).refine(e=>void 0!==e.url||void 0!==e.bytes,{message:"Attachment requires either `url` or `bytes`"}),A=s.z.enum(["text","markdown","html"]),C=s.z.enum(["acknowledge","dismiss","silence","snooze","view","play","open","close","lock","unlock","arm","arm-home","arm-away","arm-night","disarm","light","alert","camera"]),w=s.z.object({id:s.z.string(),label:s.z.string(),url:s.z.string().optional(),icon:C.optional(),destructive:s.z.boolean().optional(),mode:s.z.enum(["navigate","background"]).optional()}),M=s.z.object({body:s.z.string(),title:s.z.string().optional(),format:A.default("text"),priority:s.z.number().int().min(1).max(5).default(3),level:s.z.string().optional(),attachments:s.z.array(q).optional(),clickUrl:s.z.string().optional(),actions:s.z.array(w).optional(),sound:s.z.string().optional(),ttl:s.z.number().optional(),tag:s.z.string().optional(),deviceId:s.z.number().optional(),eventId:s.z.string().optional(),metadata:s.z.record(s.z.string(),s.z.unknown()).optional()}),D=s.z.object({id:s.z.string(),label:s.z.string(),ordinal:s.z.number().int().min(1).max(5).nullable(),flags:s.z.object({critical:s.z.boolean().optional(),silent:s.z.boolean().optional(),noPush:s.z.boolean().optional()}).optional(),requires:s.z.array(s.z.string()).optional(),description:s.z.string().optional()}),P=s.z.object({mediaTypes:s.z.array(k),mode:s.z.enum(["url","bytes","both"]),max:s.z.number().int().nonnegative(),maxBytes:s.z.number().int().positive().optional()}),I=s.z.object({attachments:P,actions:s.z.number().int().nonnegative(),actionIcons:s.z.boolean().optional(),levels:s.z.array(D),format:s.z.array(A),clickUrl:s.z.boolean(),sound:s.z.boolean(),ttl:s.z.boolean(),bodyMaxLen:s.z.number().int().positive()}),E=s.z.unknown(),j=s.z.object({kind:s.z.string(),label:s.z.string(),icon:s.z.string(),addonId:s.z.string(),iconUrl:s.z.string().optional(),iconMediaType:s.z.string().optional(),configSchema:E,destinationKeys:s.z.array(s.z.string()).optional(),supportsDiscovery:s.z.boolean(),caps:I}),x=s.z.object({id:s.z.string(),name:s.z.string(),kind:s.z.string(),addonId:s.z.string(),enabled:s.z.boolean(),config:s.z.record(s.z.string(),s.z.unknown())}),O=s.z.object({kind:s.z.string(),suggestedName:s.z.string(),config:s.z.record(s.z.string(),s.z.unknown())}),T=s.z.object({level:s.z.string(),format:A,attachmentsSent:s.z.number().int().nonnegative(),actionsSent:s.z.number().int().nonnegative(),truncated:s.z.boolean(),dropped:s.z.array(s.z.string())}),R=s.z.object({success:s.z.boolean(),error:s.z.string().optional(),renderedAs:T.optional()}),B=R,L=s.z.object({ok:s.z.boolean(),resolvedUrl:s.z.string(),httpStatus:s.z.number().int().optional(),stateInstance:s.z.string().optional(),error:s.z.string().optional()});z(s.z.object({}),s.z.array(j)),z(s.z.object({}),s.z.array(x),{auth:"admin"}),z(s.z.object({targetId:s.z.string()}),x,{auth:"admin"}),z(s.z.object({kind:s.z.string(),config:s.z.record(s.z.string(),s.z.unknown()).optional(),targetId:s.z.string().optional()}),s.z.array(O),{auth:"admin"}),z(s.z.object({kind:s.z.string(),config:s.z.record(s.z.string(),s.z.unknown()),targetId:s.z.string().optional()}),L,{kind:"mutation",auth:"admin"}),z(s.z.object({targetId:s.z.string(),notification:M}),R,{kind:"mutation",auth:"admin"}),z(s.z.object({targetId:s.z.string(),sample:M.optional()}),B,{kind:"mutation",auth:"admin"}),z(s.z.object({target:x,cloneSecretsFrom:s.z.string().optional()}),x,{kind:"mutation",auth:"admin"}),z(s.z.object({targetId:s.z.string()}),s.z.void(),{kind:"mutation",auth:"admin"}),z(s.z.object({targetId:s.z.string(),enabled:s.z.boolean()}),s.z.void(),{kind:"mutation",auth:"admin"});var F=[{id:"person",name:"Person"},{id:"vehicle",name:"Vehicle"},{id:"animal",name:"Animal"},{id:"package",name:"Package"}];new Set(F.map(e=>e.id));var N={mapping:{person:"person",bicycle:"vehicle",car:"vehicle",motorcycle:"vehicle",airplane:"vehicle",bus:"vehicle",train:"vehicle",truck:"vehicle",boat:"vehicle",bird:"animal",cat:"animal",dog:"animal",horse:"animal",sheep:"animal",cow:"animal",elephant:"animal",bear:"animal",zebra:"animal",giraffe:"animal",suitcase:"package",backpack:"package",handbag:"package"},preserveOriginal:!1},_=[{id:"speech",name:"Speech"},{id:"scream",name:"Scream / Shout"},{id:"crying",name:"Crying / Baby"},{id:"laughter",name:"Laughter"},{id:"music",name:"Music"},{id:"dog",name:"Dog"},{id:"cat",name:"Cat"},{id:"bird",name:"Bird"},{id:"animal",name:"Animal (other)"},{id:"alarm",name:"Alarm / Siren"},{id:"doorbell",name:"Doorbell / Knock"},{id:"glass_breaking",name:"Glass Breaking"},{id:"gunshot",name:"Gunshot / Explosion"},{id:"vehicle",name:"Vehicle"},{id:"siren",name:"Emergency Siren"},{id:"fire",name:"Fire / Smoke"},{id:"water",name:"Water"},{id:"wind",name:"Wind / Weather"},{id:"door",name:"Door"},{id:"footsteps",name:"Footsteps"},{id:"crowd",name:"Crowd / Chatter"},{id:"telephone",name:"Telephone"},{id:"engine",name:"Engine / Motor"},{id:"tools",name:"Tools / Construction"},{id:"silence",name:"Silence"}],K={mapping:{Speech:"speech","Child speech, kid speaking":"speech",Conversation:"speech","Narration, monologue":"speech",Babbling:"speech",Whispering:"speech","Speech synthesizer":"speech",Humming:"speech",Rapping:"speech",Singing:"speech",Choir:"speech","Child singing":"speech",Shout:"scream",Bellow:"scream",Yell:"scream",Screaming:"scream","Children shouting":"scream",Whoop:"scream","Crying, sobbing":"crying","Baby cry, infant cry":"crying",Whimper:"crying","Wail, moan":"crying",Groan:"crying",Laughter:"laughter","Baby laughter":"laughter",Giggle:"laughter",Snicker:"laughter","Belly laugh":"laughter","Chuckle, chortle":"laughter",Music:"music","Musical instrument":"music",Guitar:"music",Piano:"music",Drum:"music","Drum kit":"music","Violin, fiddle":"music",Flute:"music",Saxophone:"music",Trumpet:"music",Synthesizer:"music","Pop music":"music","Rock music":"music","Hip hop music":"music","Classical music":"music",Jazz:"music","Electronic music":"music","Background music":"music",Dog:"dog",Bark:"dog",Yip:"dog",Howl:"dog","Bow-wow":"dog",Growling:"dog","Whimper (dog)":"dog",Cat:"cat",Purr:"cat",Meow:"cat",Hiss:"cat",Caterwaul:"cat",Bird:"bird","Bird vocalization, bird call, bird song":"bird","Chirp, tweet":"bird",Squawk:"bird",Crow:"bird",Owl:"bird","Pigeon, dove":"bird",Animal:"animal","Domestic animals, pets":"animal","Livestock, farm animals, working animals":"animal",Horse:"animal","Cattle, bovinae":"animal",Pig:"animal",Sheep:"animal",Goat:"animal",Frog:"animal",Insect:"animal",Cricket:"animal",Alarm:"alarm","Alarm clock":"alarm","Smoke detector, smoke alarm":"alarm","Fire alarm":"alarm",Buzzer:"alarm","Civil defense siren":"alarm","Car alarm":"alarm",Siren:"siren","Police car (siren)":"siren","Ambulance (siren)":"siren","Fire engine, fire truck (siren)":"siren","Emergency vehicle":"siren",Foghorn:"siren",Doorbell:"doorbell","Ding-dong":"doorbell",Knock:"doorbell",Tap:"doorbell",Glass:"glass_breaking",Shatter:"glass_breaking","Chink, clink":"glass_breaking","Gunshot, gunfire":"gunshot","Machine gun":"gunshot",Explosion:"gunshot",Fireworks:"gunshot",Firecracker:"gunshot","Artillery fire":"gunshot","Cap gun":"gunshot",Boom:"gunshot",Vehicle:"vehicle",Car:"vehicle",Truck:"vehicle",Bus:"vehicle",Motorcycle:"vehicle","Car passing by":"vehicle","Vehicle horn, car horn, honking":"vehicle","Traffic noise, roadway noise":"vehicle",Train:"vehicle",Aircraft:"vehicle",Helicopter:"vehicle",Bicycle:"vehicle",Skateboard:"vehicle",Fire:"fire",Crackle:"fire",Water:"water",Rain:"water",Raindrop:"water","Rain on surface":"water",Stream:"water",Waterfall:"water",Ocean:"water","Waves, surf":"water","Splash, splatter":"water",Wind:"wind",Thunderstorm:"wind",Thunder:"wind","Wind noise (microphone)":"wind","Rustling leaves":"wind",Door:"door","Sliding door":"door",Slam:"door","Cupboard open or close":"door","Walk, footsteps":"footsteps",Run:"footsteps",Shuffle:"footsteps",Crowd:"crowd",Chatter:"crowd",Cheering:"crowd",Applause:"crowd","Children playing":"crowd","Hubbub, speech noise, speech babble":"crowd",Telephone:"telephone","Telephone bell ringing":"telephone",Ringtone:"telephone","Telephone dialing, DTMF":"telephone","Busy signal":"telephone",Engine:"engine","Engine starting":"engine",Idling:"engine","Accelerating, revving, vroom":"engine","Light engine (high frequency)":"engine","Medium engine (mid frequency)":"engine","Heavy engine (low frequency)":"engine","Lawn mower":"engine",Chainsaw:"engine",Hammer:"tools",Jackhammer:"tools",Sawing:"tools","Power tool":"tools",Drill:"tools",Sanding:"tools",Silence:"silence"},preserveOriginal:!1},U={mapping:{speech:"speech",child_speech:"speech",conversation:"speech",whispering:"speech",singing:"speech",humming:"speech",shout:"scream",yell:"scream",screaming:"scream",crying:"crying",baby_crying:"crying",sobbing:"crying",laughter:"laughter",baby_laughter:"laughter",giggling:"laughter",music:"music",guitar:"music",piano:"music",drums:"music",dog_bark:"dog",dog_bow_wow:"dog",dog_growling:"dog",dog_howl:"dog",cat_meow:"cat",cat_purr:"cat",cat_hiss:"cat",bird:"bird",bird_chirp:"bird",bird_squawk:"bird",animal:"animal",horse:"animal",cow_moo:"animal",insect:"animal",alarm:"alarm",smoke_alarm:"alarm",fire_alarm:"alarm",car_alarm:"alarm",siren:"siren",police_siren:"siren",ambulance_siren:"siren",doorbell:"doorbell",door_knock:"doorbell",knocking:"doorbell",glass_breaking:"glass_breaking",glass_shatter:"glass_breaking",gunshot:"gunshot",explosion:"gunshot",fireworks:"gunshot",car:"vehicle",truck:"vehicle",motorcycle:"vehicle",car_horn:"vehicle",vehicle_horn:"vehicle",traffic:"vehicle",fire:"fire",fire_crackle:"fire",water:"water",rain:"water",ocean:"water",splash:"water",wind:"wind",thunder:"wind",thunderstorm:"wind",door:"door",door_slam:"door",sliding_door:"door",footsteps:"footsteps",walking:"footsteps",running:"footsteps",crowd:"crowd",chatter:"crowd",cheering:"crowd",applause:"crowd",telephone_ring:"telephone",ringtone:"telephone",engine:"engine",engine_starting:"engine",lawn_mower:"engine",chainsaw:"engine",hammer:"tools",jackhammer:"tools",drill:"tools",power_tool:"tools",silence:"silence"},preserveOriginal:!1},G=new Map;for(const[e,t]of Object.entries(K.mapping))G.set(e.toLowerCase(),t);for(const[e,t]of Object.entries(U.mapping))G.set(e.toLowerCase(),t);var H="#f59e0b",W="#06b6d4",V="#22c55e",Z="#3b82f6",$="#f97316",J="#a855f7",Y="#8b5cf6",Q="#10b981",X="#64748b",ee={car:"#f59e0b",truck:"#d97706",bus:"#b45309",motorcycle:"#eab308",bicycle:"#ca8a04",airplane:"#60a5fa",boat:"#2563eb",train:"#1d4ed8",bird:"#14b8a6",dog:"#84cc16",cat:"#f97316",horse:"#a16207",sheep:"#a3a3a3",cow:"#78716c",elephant:"#6b7280",bear:"#7c2d12",zebra:"#404040",giraffe:"#d4a373"};function te(e){return e.split(/[-_ ]/).filter(e=>e.length>0).map(e=>e.charAt(0).toUpperCase()+e.slice(1)).join(" ")}var ie=new Map;function ne(e,t,i,n,a){ie.set(e,{kind:e,parentKind:null,level:"macro",category:t,color:i,iconId:n,labelKey:`eventKind.${e}`,label:a})}function ae(e,t,i,n,a,r){ie.set(e,{kind:e,parentKind:t,level:"sub",category:i,color:n,iconId:a,labelKey:`eventKind.${e}`,label:r})}ne("motion","motion",H,"motion","Motion"),ne("audio","audio",W,"audio","Audio"),ne("person","detection",V,"person","Person"),ne("vehicle","detection",Z,"vehicle","Vehicle"),ne("animal","detection",$,"animal","Animal"),ne("package","package",J,"package","Package"),ne("sensor","sensor",Y,"sensor","Sensor"),ne("control","control",Q,"control","Control");for(const[e,t]of Object.entries(N.mapping))"vehicle"!==t&&"animal"!==t||ie.has(e)||ae(e,t,"detection",ee[e]??X,e,te(e));ae("package-delivered","package","package",J,"package","Package delivered"),ae("package-picked-up","package","package",J,"package","Package picked up"),ae("contact","sensor","sensor","#f59e0b","door","Contact"),ae("motion-sensor","sensor","sensor",Y,"pir","Motion sensor"),ae("smoke","sensor","sensor","#ef4444","smoke","Smoke"),ae("flood","sensor","sensor","#3b82f6","water","Water leak"),ae("gas","sensor","sensor","#ef4444","gas","Gas"),ae("carbon-monoxide","sensor","sensor","#dc2626","smoke","Carbon monoxide"),ae("vibration","sensor","sensor","#eab308","vibration","Vibration"),ae("tamper","sensor","sensor","#f97316","tamper","Tamper"),ae("presence","sensor","sensor","#22c55e","presence","Presence"),ae("enum-sensor","sensor","sensor",Y,"generic","Sensor state"),ae("device-event","sensor","sensor","#10b981","button","Device event"),ae("lock","control","control","#0ea5e9","lock","Lock"),ae("cover","control","control","#0ea5e9","door","Cover"),ae("switch","control","control",Q,"switch","Switch"),ae("siren","control","control","#dc2626","siren","Siren"),ae("button","control","control","#10b981","button","Button"),ae("doorbell","control","control","#a855f7","doorbell","Doorbell");for(const e of _){const t=`audio-${e.id}`;ie.has(t)||ae(t,"audio","audio",W,t,e.name)}var re=Object.freeze(Object.fromEntries(ie)),oe=s.z.object({kind:s.z.string(),label:s.z.string(),parentKind:s.z.string().nullable()}),se=s.z.object({videoClasses:s.z.array(oe),audioKinds:s.z.array(oe),labels:s.z.array(oe)});function le(e,t,i){return{kind:e,label:t,parentKind:i}}Object.freeze((function(){const e=Object.values(re);return{videoClasses:e.filter(e=>"detection"===e.category).map(e=>le(e.kind,e.label,e.parentKind)),audioKinds:e.filter(e=>"audio"===e.category&&"sub"===e.level).map(e=>le(e.kind,e.label,e.parentKind)),labels:e.filter(e=>"sensor"===e.category||"control"===e.category).map(e=>le(e.kind,e.label,e.parentKind))}})());var ce=s.z.enum(["disarmed","armed_home","armed_away","armed_night","armed_vacation","armed_custom_bypass","arming","disarming","pending","triggered"]),de=s.z.enum(["home","away","night","vacation","custom_bypass"]);s.z.object({state:ce,targetMode:de.nullable().optional(),availableModes:s.z.array(de),requiresCode:s.z.boolean(),lastChangedAt:s.z.number()}),S.AlarmPanel,z(s.z.object({deviceId:s.z.number().int().nonnegative(),mode:de,code:s.z.string().min(1).optional()}),s.z.void(),{kind:"mutation",auth:"protected"}),z(s.z.object({deviceId:s.z.number().int().nonnegative(),code:s.z.string().min(1).optional()}),s.z.void(),{kind:"mutation",auth:"protected"}),z(s.z.object({deviceId:s.z.number().int().nonnegative()}),s.z.void(),{kind:"mutation",auth:"protected"});var ue=s.z.object({x:s.z.number(),y:s.z.number()}),me=s.z.object({kind:s.z.literal("rect"),x:s.z.number(),y:s.z.number(),width:s.z.number(),height:s.z.number()}),pe=s.z.object({kind:s.z.literal("polygon"),points:s.z.array(ue)}),ge=s.z.object({kind:s.z.literal("grid"),gridWidth:s.z.number(),gridHeight:s.z.number(),cells:s.z.array(s.z.boolean())}),ye=s.z.object({kind:s.z.literal("line"),points:s.z.array(ue)});s.z.discriminatedUnion("kind",[me,pe,ge,ye]),s.z.enum(["rect","polygon","grid","line"]),s.z.object({min:s.z.number(),max:s.z.number()}),s.z.object({width:s.z.number(),height:s.z.number()});var ve=s.z.enum(["immediate","track-end","device-event","package-event","system-event"]),be=s.z.enum(["device-online","device-offline","device-disabled","device-enabled","device-battery-low","device-battery-normal","device-consumable-low","device-consumable-normal","device-tank-low","device-tank-full","device-tank-normal","stream-online","stream-offline","node-online","node-offline","node-restarting","node-updating","node-inference-unavailable","detection-blind","addon-crash-loop","addon-update-available","server-update-available","wrapper-update-available","alarm-triggered","alarm-armed","alarm-disarmed","alarm-arming","alarm-arm-refused","alarm-pending","alarm-rearmed","alarm-sensor-bypass","alarm-check-failed","addon-updated","server-updated","export-completed","backup-completed","camera-online","camera-offline","camera-disabled","camera-enabled"]),fe=new Set(["camera-online","camera-offline","camera-disabled","camera-enabled"]);be.options.filter(e=>!fe.has(e));var ze=["alarm-arm-refused","alarm-check-failed","alarm-arming","alarm-armed","alarm-pending","alarm-triggered","alarm-rearmed","alarm-sensor-bypass","alarm-disarmed"],he=["device-battery-low","device-battery-normal","device-consumable-low","device-consumable-normal"],Se=["device-consumable-low","device-consumable-normal"],ke=15,qe=95,Ae=s.z.object({kinds:s.z.array(be).min(1),deviceIds:s.z.array(s.z.number().int()).min(1).optional(),deviceTypes:s.z.array(s.z.string().min(1)).min(1).optional(),excludeDeviceIds:s.z.array(s.z.number().int()).min(1).optional(),nodeIds:s.z.array(s.z.string().min(1)).min(1).optional(),packageNames:s.z.array(s.z.string().min(1)).min(1).optional(),consumableLowPercent:s.z.number().int().min(1).max(95).optional()}),Ce=s.z.object({days:s.z.array(s.z.number().int().min(0).max(6)).min(1),startMinute:s.z.number().int().min(0).max(1439),endMinute:s.z.number().int().min(0).max(1439)}),we=s.z.object({windows:s.z.array(Ce).min(1),timezone:s.z.string().optional(),invert:s.z.boolean().optional()}),Me=s.z.enum(["instant","summary"]),De=s.z.enum(["rule","section"]),Pe=s.z.discriminatedUnion("mode",[s.z.object({mode:s.z.literal("instant")}),s.z.object({mode:s.z.literal("summary"),schedule:we,split:De.optional()})]),Ie=s.z.object({values:s.z.array(s.z.string().min(1)),maxDistance:s.z.number().int().min(0).max(3).default(1)}),Ee=s.z.object({zoneId:s.z.string().optional(),className:s.z.string().optional(),op:s.z.enum(["became-occupied","became-free",">=","<="]).default("became-occupied"),count:s.z.number().int().min(0).default(1),sustainSeconds:s.z.number().int().min(0).max(3600).default(15)}),je=s.z.object({labels:s.z.array(s.z.string().min(1)).min(1).optional(),dbThreshold:s.z.number().min(-96).max(0).optional(),hitPercent:s.z.number().int().min(1).max(100).default(60),samplingSeconds:s.z.number().int().min(1).max(300).default(10),confirmHits:s.z.number().int().min(1).max(20).optional(),confirmWindowSec:s.z.number().int().min(1).max(60).optional()}),xe=s.z.enum(["enter","exit","any"]),Oe=s.z.enum(["raised","cleared"]),Te=s.z.object({ids:s.z.array(s.z.string().min(1)).min(1),match:s.z.enum(["any","all"]).optional()}),Re=s.z.discriminatedUnion("kind",[s.z.object({kind:s.z.literal("wait"),seconds:s.z.number().min(0).max(300)}),s.z.object({kind:s.z.literal("cap"),deviceId:s.z.number().int(),cap:s.z.string().min(1),method:s.z.string().min(1),args:s.z.record(s.z.string(),s.z.unknown()).optional()})]),Be=s.z.object({id:s.z.string().min(1),name:s.z.string().min(1).max(120),minDelaySec:s.z.number().int().min(0).max(86400).optional(),actions:s.z.array(Re).min(1)}),Le=s.z.object({name:s.z.string().min(1).max(120),minDelaySec:s.z.number().int().min(0).max(86400).optional(),actions:s.z.array(Re).min(1)}),Fe=s.z.discriminatedUnion("kind",[s.z.object({kind:s.z.literal("sequence"),sequenceId:s.z.string().min(1)}),s.z.object({kind:s.z.literal("do"),action:Re})]),Ne=s.z.array(Fe).max(4),_e=s.z.object({id:s.z.string().min(1).max(64),label:s.z.string().min(1).max(40),sequenceId:s.z.string().min(1),icon:C.optional(),destructive:s.z.boolean().optional()}),Ke=s.z.object({onActivation:Ne.optional(),onDeactivation:Ne.optional(),onTrigger:Ne.optional(),onTriggerOff:Ne.optional(),buttons:s.z.array(_e).max(8).optional()});s.z.object({name:s.z.string().min(1).max(120),enabled:s.z.boolean(),minDelaySec:s.z.number().int().min(0).max(86400).optional(),actions:s.z.array(Re).min(1)});var Ue=s.z.object({deviceId:s.z.number().int(),states:s.z.array(s.z.string().min(1)).min(1)}),Ge=s.z.object({sceneId:s.z.string().min(1),deviceId:s.z.number().int().optional(),requiredState:s.z.enum(["matched","diverged"]),latched:s.z.boolean().optional()}),He=s.z.object({deviceState:Ue.optional(),scene:Ge.optional(),devices:s.z.array(s.z.number()).optional(),devicesExclude:s.z.array(s.z.number()).min(1).optional(),classes:s.z.array(s.z.string().min(1)).optional(),classesExclude:s.z.array(s.z.string().min(1)).optional(),minConfidence:s.z.number().min(0).max(1).optional(),zones:Te.optional(),zonesExclude:s.z.array(s.z.string().min(1)).optional(),crossing:xe.optional(),labelEquals:s.z.array(s.z.string().min(1)).optional(),identities:s.z.array(s.z.string().min(1)).optional(),plates:Ie.optional(),identitiesExclude:s.z.array(s.z.string().min(1)).optional(),minImportance:s.z.number().min(0).max(1).optional(),minDwellSeconds:s.z.number().min(0).optional(),source:s.z.enum(["pipeline","onboard","sensor","audio","any"]).optional(),minLabelConfidence:s.z.number().min(0).max(1).optional(),eventTypeTokens:s.z.array(s.z.string().min(1)).optional(),sensorKinds:s.z.array(s.z.string().min(1)).optional(),sensorTransition:Oe.optional(),packagePhase:s.z.enum(["delivered","picked-up","both"]).optional(),systemEvent:Ae.optional(),customZones:s.z.array(pe).optional(),occupancy:Ee.optional(),audio:je.optional()}),We=s.z.object({targetId:s.z.string().min(1),params:s.z.record(s.z.string(),s.z.unknown()).optional()}),Ve=s.z.enum(["cropped","full","boxed"]),Ze=s.z.enum(["mosaic","each"]),$e=s.z.object({attach:s.z.enum(["best","best-matching","keyFrame","none"]).default("best"),frame:Ve.optional(),zoneCrop:s.z.boolean().optional(),gif:s.z.boolean().optional(),clip:s.z.boolean().optional(),clipPreRollSec:s.z.number().int().min(0).max(30).optional(),clipPostRollSec:s.z.number().int().min(0).max(30).optional(),clipSpeed:s.z.number().min(1).max(8).optional(),profile:c.optional(),linkedCameras:Ze.optional()}),Je=s.z.enum(["shared","per-class"]),Ye=s.z.object({cooldownSec:s.z.number().int().min(0).max(86400).default(60),scope:s.z.enum(["rule","rule-device"]).default("rule-device"),granularity:Je.optional()}),Qe=s.z.object({op:s.z.enum([">=",">","<=","<","=="]),count:s.z.number().int().min(0).max(1e3)}),Xe=s.z.object({enabled:s.z.boolean().default(!1),profileId:s.z.string().optional(),prompt:s.z.string().max(1e3).optional(),expect:Qe.optional(),timeoutMs:s.z.number().int().min(1e3).max(2e4).default(8e3),onTimeout:s.z.enum(["fire","suppress"]).default("fire"),maxImagePx:s.z.number().int().min(64).max(2048).default(448)}),et=5,tt=20,it=60,nt=s.z.object({name:s.z.string().min(1).max(200),enabled:s.z.boolean().default(!0),delivery:ve,conditions:He.default({}),schedule:we.optional(),systemEventDelivery:Pe.optional(),targets:s.z.array(We),targetUsers:s.z.array(s.z.string()).optional(),media:$e.default({attach:"best"}),throttle:Ye.default({cooldownSec:60,scope:"rule-device"}),template:s.z.object({title:s.z.string().max(500).optional(),body:s.z.string().max(2e3).optional()}).optional(),priority:s.z.number().int().min(1).max(5).default(3),ownerUserId:s.z.string().optional(),snoozeAllowGlobal:s.z.boolean().optional(),snoozeOptions:s.z.array(s.z.number().int().min(1).max(1440)).max(4).optional(),actions:Ke.optional(),confirm:Xe.optional(),groupingSec:s.z.number().int().min(5).max(60).optional()}),at=nt.partial().extend({disabledTargetIds:s.z.array(s.z.string()).optional(),enabled:s.z.boolean().optional(),conditions:He.optional(),media:$e.optional(),throttle:Ye.optional(),priority:s.z.number().int().min(1).max(5).optional()}),rt=s.z.enum(["template","schedule","targetUsers","snoozeOptions","snoozeAllowGlobal","actions","confirm","groupingSec","waitForEnhancement","groupIdleSec"]),ot=s.z.object({ruleId:s.z.string(),patch:at,clear:s.z.array(rt).optional()}),st=nt.extend({id:s.z.string(),createdBy:s.z.string(),createdAt:s.z.number(),updatedAt:s.z.number(),disabledTargetIds:s.z.array(s.z.string()).default([])}),lt=s.z.enum(["device-state","streams","battery","consumables","tanks","detection-blind","nodes","addons","addon-updates","updates"]),ct=s.z.object({id:lt,status:s.z.enum(["read","unavailable"]),items:s.z.number().int().nonnegative(),reason:s.z.string().optional()}),dt=s.z.object({section:lt.optional(),title:s.z.string(),text:s.z.string(),count:s.z.number().int().nonnegative()}),ut=s.z.object({empty:s.z.boolean(),count:s.z.number().int().nonnegative(),text:s.z.string(),sections:s.z.array(ct),dropped:s.z.record(s.z.string(),s.z.number().int().nonnegative()),excludedGroups:s.z.array(s.z.string()),split:De.optional(),rows:s.z.array(dt).optional()}),mt=s.z.object({recordId:s.z.string(),recordKind:s.z.enum(["object-event","track","device-event","package-event","system-event"]),deviceId:s.z.number(),timestamp:s.z.number(),wouldFire:s.z.boolean(),failedCondition:s.z.string().optional(),className:s.z.string().optional(),label:s.z.string().optional()}),pt=s.z.enum(["detection","sensor","occupancy","sound","device-events","system","alarm","mixed"]),gt=s.z.enum(["detection","sensor","occupancy","sound","system"]),yt=s.z.enum(["rule","timelapse","summary"]),vt=s.z.enum(["title","body","previewText","captionText"]),bt=s.z.enum(["subject","place","time","rule","occupancy","sound","sensor","system","digest","ai"]),ft=s.z.object({name:s.z.string().regex(/^\w+$/),label:s.z.string(),description:s.z.string().optional(),example:s.z.string(),group:bt,families:s.z.array(yt).min(1),fields:s.z.array(vt).optional(),kinds:s.z.array(gt).optional(),deliveries:s.z.array(ve).optional(),systemEventKinds:s.z.array(be).optional(),systemEventDeliveries:s.z.array(Me).optional(),dynamic:s.z.object({prefix:s.z.literal("count_"),from:s.z.literal("classes")}).optional()}),zt=s.z.object({family:yt,field:vt,kind:pt.optional(),delivery:ve.optional(),systemEventKinds:s.z.array(be).optional(),systemEventDelivery:Me.optional()}),ht=s.z.object({context:zt,template:s.z.object({title:s.z.string().max(500).optional(),body:s.z.string().max(2e3).optional()})}),St=s.z.object({title:s.z.string().nullable(),body:s.z.string().nullable(),unknown:s.z.array(s.z.string())}),kt=s.z.object({id:s.z.string(),group:s.z.enum(["scope","class","zones","quality","label","schedule","device","package","occupancy","audio","system"]),label:s.z.string(),valueType:s.z.enum(["deviceIdList","deviceIdExcludeList","stringList","number01","number","sourceSelect","zoneSelection","zoneIdList","schedule","plateMatcher","packagePhase","crossingSelect","sensorTransition","polygonDraw","occupancy","audio","deviceState","scene","systemEvent"]),operator:s.z.enum(["in","notIn","anyOf","allOf","gte","fuzzyIn","withinSchedule"]),appliesTo:s.z.array(ve),phase:s.z.string(),description:s.z.string().optional(),options:s.z.array(s.z.object({value:s.z.string(),label:s.z.string(),hint:s.z.string().optional()})).readonly().optional()}),qt=s.z.enum(["pending","sent","dead"]),At=s.z.enum(["object-event","track-end","device-event","package-event","system-event"]),Ct=s.z.object({className:s.z.string(),label:s.z.string().optional(),confidence:s.z.number().optional(),zones:s.z.array(s.z.string()),timestamp:s.z.number(),systemEvent:s.z.object({kind:be,subject:s.z.string(),title:s.z.string(),body:s.z.string(),data:s.z.record(s.z.string(),s.z.unknown())}).optional()}),wt=s.z.object({id:s.z.string(),ruleId:s.z.string(),ruleName:s.z.string(),delivery:ve,targetId:s.z.string(),deviceId:s.z.number(),recordKind:At,recordId:s.z.string(),trackId:s.z.string().optional(),status:qt,attempts:s.z.number().int(),createdAt:s.z.number(),updatedAt:s.z.number(),error:s.z.string().optional(),subject:Ct,artifactIds:s.z.array(s.z.string().min(1)).optional()}),Mt=s.z.object({ruleId:s.z.string().optional(),deviceId:s.z.number().optional(),status:qt.optional(),since:s.z.number().optional(),until:s.z.number().optional(),limit:s.z.number().int().min(1).max(500).default(100)}),Dt=s.z.object({ruleId:s.z.string(),lastAt:s.z.number(),status:qt,deviceId:s.z.number()}),Pt=s.z.object({runs:s.z.array(Dt),horizonMs:s.z.number().nonnegative().nullable()}),It=s.z.enum(["rule","device","all"]),Et=s.z.object({scope:It,ruleId:s.z.string().optional(),deviceId:s.z.number().int().optional(),classes:s.z.array(s.z.string().min(1)).min(1).optional(),durationMinutes:s.z.number().int().min(1).max(1440),global:s.z.boolean().optional(),summary:s.z.boolean().optional()}),jt=s.z.object({id:s.z.string(),userId:s.z.string(),scope:It,ruleId:s.z.string().optional(),deviceId:s.z.number().int().optional(),classes:s.z.array(s.z.string().min(1)).min(1).optional(),startedAt:s.z.number(),expiresAt:s.z.number(),global:s.z.boolean(),summary:s.z.boolean(),digestSentAt:s.z.number().optional()});s.z.object({snoozeId:s.z.string(),targetId:s.z.string(),ruleId:s.z.string(),ruleName:s.z.string(),deviceId:s.z.number().int(),count:s.z.number().int(),firstAt:s.z.number(),lastAt:s.z.number()});var xt=600,Ot=3600,Tt=s.z.number().int().min(0).max(600),Rt=s.z.number().int().min(0).max(Ot),Bt=e=>new Set(e.map(e=>e.mode)).size===e.length,Lt=s.z.enum(["rearmAfter","disableAfter","doNothing"]),Ft=s.z.object({mode:de,exitDelaySec:Tt.optional(),entryDelaySec:Tt.optional(),triggeredDurationSec:Rt.optional(),postTriggeredAction:Lt.optional(),schedule:we.optional(),notifyDuringEntryDelay:s.z.boolean().optional(),notifySensorRewatched:s.z.boolean().optional()}),Nt=s.z.array(Ft).max(8).refine(Bt,{message:"modeDelays: at most one entry per arm mode"}),_t=s.z.object({mode:de,exitDelaySec:Tt.nullable().optional(),entryDelaySec:Tt.nullable().optional(),triggeredDurationSec:Rt.nullable().optional(),postTriggeredAction:Lt.nullable().optional(),schedule:we.nullable().optional(),notifyDuringEntryDelay:s.z.boolean().nullable().optional(),notifySensorRewatched:s.z.boolean().nullable().optional()}),Kt=s.z.array(_t).max(8).refine(Bt,{message:"modeDelays: at most one edit per arm mode"}),Ut=s.z.object({mode:de,deviceId:s.z.number().int().positive(),nonBlocking:s.z.boolean()}),Gt=s.z.object({mode:de,deviceId:s.z.number().int().positive(),blocking:s.z.boolean()}),Ht=s.z.object({mode:de,deviceId:s.z.number().int().positive(),secureOnArm:s.z.boolean()}),Wt=s.z.object({mode:de,deviceIds:s.z.array(s.z.number().int()).max(200)}),Vt=Wt,Zt=Wt,$t=Wt,Jt=s.z.array(Vt).max(8).refine(Bt,{message:"nonBlocking: at most one list per arm mode"}),Yt=s.z.array(Zt).max(8).refine(Bt,{message:"blocking: at most one list per arm mode"}),Qt=s.z.array($t).max(8).refine(Bt,{message:"secureOnArmOff: at most one list per arm mode"}),Xt=s.z.object({exitDelaySec:Tt,entryDelaySec:Tt,triggeredDurationSec:Rt,postTriggeredAction:Lt.optional(),announceArm:s.z.boolean().optional(),announceTargets:s.z.array(s.z.string().min(1)).max(16),nonBlocking:Jt.default([]),blocking:Yt.default([]),secureOnArmOff:Qt.default([]),modeDelays:Nt.default([])}),ei=s.z.object({id:s.z.string().min(1).max(64),name:s.z.string().min(1).max(64),isDefault:s.z.boolean()}),ti=s.z.object({activeId:s.z.string().min(1),items:s.z.array(ei).min(1)}),ii=s.z.object({name:s.z.string().min(1).max(64),cloneFromId:s.z.string().min(1).max(64).optional()}),ni=s.z.object({id:s.z.string().min(1).max(64),name:s.z.string().min(1).max(64)}),ai=s.z.object({id:s.z.string().min(1).max(64)}),ri=Xt.extend({nonBlocking:Jt,blocking:Yt,secureOnArmOff:Qt,modeDelays:Kt,nonBlockingEdit:Ut,blockingEdit:Gt,secureOnArmEdit:Ht}).partial().refine(e=>void 0===e.nonBlocking||void 0===e.nonBlockingEdit,{message:"nonBlocking and nonBlockingEdit are exclusive \u2014 send the whole lists or one edit"}).refine(e=>void 0===e.blocking||void 0===e.blockingEdit,{message:"blocking and blockingEdit are exclusive \u2014 send the whole lists or one edit"}).refine(e=>void 0===e.secureOnArmOff||void 0===e.secureOnArmEdit,{message:"secureOnArmOff and secureOnArmEdit are exclusive \u2014 send the whole lists or one edit"}),oi=s.z.enum(["muted","detection-off","offline"]),si=s.z.object({deviceId:s.z.number().int(),reason:oi}),li=s.z.object({mode:de,ruleCount:s.z.number().int().min(0),allDevices:s.z.boolean(),deviceIds:s.z.array(s.z.number().int()),allDevicesExcept:s.z.array(s.z.number().int()).default([]),skippedDevices:s.z.array(si).default([])}),ci=s.z.object({deviceId:s.z.number().int(),name:s.z.string(),state:s.z.string(),blocking:s.z.boolean()}),di=s.z.object({deviceId:s.z.number().int(),name:s.z.string(),phase:s.z.enum(["open","closed"])}),ui=s.z.object({mode:de,devices:s.z.array(ci),unknown:s.z.array(s.z.number().int())}),mi=s.z.object({state:ce,targetMode:de.nullable(),availableModes:s.z.array(de),openings:s.z.array(ui),exclusions:s.z.array(di)}),pi=s.z.object({deviceId:s.z.number().int().nullable(),settings:Xt,profiles:ti.optional(),coverage:s.z.array(li),live:mi.optional()}),gi=500,yi=s.z.enum(["open","closed","unknown","not-opening"]),vi=s.z.object({deviceId:s.z.number().int().positive(),reading:yi,state:s.z.string().nullable(),unknownWhy:s.z.enum(["read-failed","unknown-word"]).nullable(),online:s.z.boolean().nullable(),controllable:s.z.boolean().default(!1)}),bi=s.z.object({deviceIds:s.z.array(s.z.number().int().positive()).max(500)}),fi=s.z.object({sensors:s.z.array(vi),readAt:s.z.number().int().nonnegative()}),zi=s.z.object({deviceId:s.z.number().int().nonnegative().optional(),seconds:s.z.number().min(0).max(60),profile:c.optional(),ruleId:s.z.string(),ruleName:s.z.string(),reason:s.z.enum(["window","occupancy"])}),hi=s.z.object({rulesLoaded:s.z.boolean(),asks:s.z.array(zi).readonly()});z(s.z.object({}),s.z.object({rules:s.z.array(st)}),{auth:"admin"}),z(s.z.object({ruleId:s.z.string()}),s.z.object({rule:st.nullable()}),{auth:"admin"}),z(s.z.object({rule:nt}),s.z.object({rule:st}),{kind:"mutation",auth:"admin",caller:"required"}),z(ot,s.z.object({rule:st}),{kind:"mutation",auth:"admin",caller:"required"}),z(s.z.object({ruleId:s.z.string()}),s.z.object({success:s.z.literal(!0)}),{kind:"mutation",auth:"admin"}),z(s.z.object({ruleId:s.z.string(),enabled:s.z.boolean()}),s.z.object({success:s.z.literal(!0)}),{kind:"mutation",auth:"admin"}),z(s.z.object({}),s.z.object({sequences:s.z.array(Be)}),{auth:"admin"}),z(s.z.object({sequenceId:s.z.string().min(1)}),s.z.object({sequence:Be.nullable()}),{auth:"admin"}),z(s.z.object({sequence:Le}),s.z.object({sequence:Be}),{kind:"mutation",auth:"admin"}),z(s.z.object({sequenceId:s.z.string().min(1),sequence:Le}),s.z.object({sequence:Be}),{kind:"mutation",auth:"admin"}),z(s.z.object({sequenceId:s.z.string().min(1)}),s.z.object({success:s.z.literal(!0)}),{kind:"mutation",auth:"admin"}),z(s.z.object({}),hi,{auth:"admin"}),z(s.z.object({}),s.z.object({mutedDeviceIds:s.z.array(s.z.number().int()).readonly()}),{auth:"admin"}),z(s.z.object({deviceId:s.z.number().int(),muted:s.z.boolean()}),s.z.object({success:s.z.literal(!0)}),{kind:"mutation",auth:"admin"}),z(s.z.object({rule:nt,lookbackMinutes:s.z.number().int().min(1).max(1440).default(60)}),s.z.object({results:s.z.array(mt)}),{kind:"mutation",auth:"admin"}),z(s.z.object({rule:nt}),ut,{kind:"mutation",auth:"admin",access:"view"}),z(s.z.object({}),s.z.object({catalog:s.z.array(kt),taxonomy:se.optional()})),z(s.z.object({}),s.z.object({vars:s.z.array(ft)})),z(ht,St,{kind:"mutation",access:"view"}),z(s.z.object({filter:Mt.default({limit:100})}),s.z.object({entries:s.z.array(wt)}),{auth:"admin"}),z(s.z.object({}),Pt,{auth:"admin"}),z(s.z.object({artifactId:s.z.string().min(1)}),s.z.object({url:s.z.string().nullable()}),{auth:"admin"}),z(s.z.object({}),s.z.object({snoozes:s.z.array(jt)}),{caller:"required"}),z(s.z.object({snooze:Et}),s.z.object({snooze:jt}),{kind:"mutation",caller:"required"}),z(s.z.object({snoozeId:s.z.string()}),s.z.object({success:s.z.literal(!0)}),{kind:"mutation",caller:"required"}),z(s.z.object({}),pi,{auth:"admin"}),z(s.z.object({patch:ri}),pi,{kind:"mutation",auth:"admin"}),z(ii,pi,{kind:"mutation",auth:"admin"}),z(ni,pi,{kind:"mutation",auth:"admin"}),z(ai,pi,{kind:"mutation",auth:"admin"}),z(ai,pi,{kind:"mutation",auth:"admin"}),z(bi,fi,{auth:"admin"});var Si={motion:"motion",audio:"audio",person:"person",vehicle:"vehicle",animal:"animal",package:"package",door:"door",pir:"pir",smoke:"smoke",water:"water",button:"button",generic:"generic",gas:"smoke",vibration:"generic",tamper:"generic",presence:"person",lock:"generic",siren:"generic",switch:"generic",doorbell:"button"};var ki={contact:"contact",motion:"motion-sensor",smoke:"smoke",flood:"flood",gas:"gas","carbon-monoxide":"carbon-monoxide",vibration:"vibration",tamper:"tamper",presence:"presence","enum-sensor":"enum-sensor","event-emitter":"device-event","lock-control":"lock",cover:"cover",switch:"switch",button:"button",doorbell:"doorbell"};function qi(e,t){const i=re[t];if(void 0===i)throw new Error(`EVENT_KIND_BY_CAP: cap '${e}' maps to unknown taxonomy kind '${t}'`);return Object.assign({},i,{icon:(n=i.iconId,Si[n]??"generic")});var n}var Ai=Object.freeze(Object.fromEntries(Object.entries(ki).map(([e,t])=>[e,qi(e,t)]))),Ci=Object.keys(ki);s.z.enum(["queue-full","camera-backoff","sleeping","camera-refused","no-keyframe","decode-failed","no-catalog-row","unsupported","unknown-device","uid-missing"]),s.z.enum(["deferred","final"]);var wi=s.z.object({id:s.z.string(),source:s.z.string(),kind:s.z.enum(["motion","object","audio","native"]),timeRange:s.z.object({startMs:s.z.number(),endMs:s.z.number()}),labels:s.z.array(s.z.string()).max(3).optional(),thumbnail:s.z.string().optional(),stillAtMs:s.z.number().optional(),eventIds:s.z.array(s.z.string()).optional(),eventCount:s.z.number().int().nonnegative().optional(),holes:s.z.array(s.z.object({startMs:s.z.number(),endMs:s.z.number()})).optional(),thumbnailMint:s.z.string().optional(),thumbnailUnavailable:s.z.object({reason:s.z.enum(["sleeping","camera-refused","no-keyframe","unsupported"])}).optional(),catalogAsOf:s.z.number().optional(),nativeTypes:s.z.array(s.z.string()).optional(),behaviours:s.z.array(s.z.string()).optional(),streams:s.z.object({sub:s.z.object({id:s.z.string(),bytes:s.z.number().optional()}).optional(),main:s.z.object({id:s.z.string(),bytes:s.z.number().optional()}).optional()}).optional(),supportSub:s.z.boolean().optional(),playable:s.z.boolean().optional(),unplayableReason:s.z.string().optional(),inProgress:s.z.boolean().optional()}),Mi=s.z.object({playbackUrl:s.z.string(),format:s.z.enum(["hls","mp4"]).optional(),served:c.optional(),playbackEndpoints:s.z.array(s.z.string()).optional(),token:s.z.string().optional()}),Di=s.z.enum(["authorised"]),Pi=s.z.object({base64:s.z.string(),contentType:s.z.string(),name:s.z.string(),bytes:s.z.number().int().nonnegative(),served:c,durationMs:s.z.number().positive().optional()}),Ii=s.z.object({ticket:l,contentType:s.z.string(),name:s.z.string(),served:c,durationMs:s.z.number().positive().optional()}),Ei=s.z.enum(["opus","pcmu","none"]),ji=s.z.enum(["not-requested","unsupported-ask"]),xi=s.z.object({url:s.z.string().min(1),expiresAtMs:s.z.number(),transport:s.z.literal("forward-only"),served:c,servedAudio:Ei,audioReason:ji.optional()}),Oi=[.25,.5,1,1.5,2,4,8],Ti=s.z.object({transport:s.z.enum(["stream","file"]),seek:s.z.enum(["forward","free"]),stepBack:s.z.boolean(),scrub:s.z.boolean(),rates:s.z.array(s.z.number().positive()).min(1).readonly()}),Ri=s.z.object({state:s.z.enum(["ok","sleeping","unreachable","no-storage","index-empty"]),reason:s.z.string().optional(),catalogAsOf:s.z.number().optional()}),Bi=s.z.object({source:s.z.string(),label:s.z.string(),addonId:s.z.string().optional(),availability:Ri});S.Camera,z(s.z.object({deviceId:s.z.number(),since:s.z.number(),until:s.z.number(),limit:s.z.number().int().positive().optional(),provider:s.z.string().min(1)}),s.z.array(wi).readonly(),{kind:"query",auth:"protected"}),z(s.z.object({deviceId:s.z.number()}),s.z.array(Bi).readonly(),{kind:"query",auth:"protected"}),z(s.z.object({deviceId:s.z.number(),clipId:s.z.string(),profile:c.optional()}),Mi,{kind:"query",auth:"protected"}),h(s.z.object({deviceId:s.z.number(),clipId:s.z.string().min(1),provider:s.z.string().min(1),profile:c.optional(),maxBytes:s.z.number().int().positive().optional(),wake:Di.optional()}),Pi,{kind:"query",auth:"protected"}),h(s.z.object({deviceId:s.z.number(),clipId:s.z.string().min(1),provider:s.z.string().min(1),profile:c.optional(),maxBytes:s.z.number().int().positive().optional(),wake:Di.optional()}),Ii,{kind:"query",auth:"protected"}),h(s.z.object({deviceId:s.z.number(),clipId:s.z.string().min(1),provider:s.z.string().min(1),profile:c.optional(),audio:Ei.optional()}),xi,{kind:"query",auth:"protected"}),h(s.z.object({deviceId:s.z.number(),provider:s.z.string().min(1)}),Ti,{kind:"query",auth:"protected"});var Li=s.z.object({addonId:s.z.string(),capabilities:s.z.array(s.z.string()).readonly(),status:s.z.string()}),Fi=s.z.object({pid:s.z.number(),name:s.z.string(),state:s.z.string(),cpuPercent:s.z.number(),memoryRss:s.z.number(),uptimeSeconds:s.z.number(),services:s.z.array(Li).readonly(),groupId:s.z.string().optional()}),Ni=s.z.object({id:s.z.string(),status:s.z.string(),cpuPercent:s.z.number(),memoryRss:s.z.number()}),_i=s.z.object({category:s.z.string(),total:s.z.number(),healthy:s.z.number(),addons:s.z.array(Ni).readonly()}),Ki=s.z.object({name:s.z.string(),version:s.z.string()}),Ui=s.z.object({id:s.z.string(),name:s.z.string(),hostname:s.z.string(),platform:s.z.string(),arch:s.z.string(),cpuModel:s.z.string().nullable(),cpuCores:s.z.number(),memoryMB:s.z.number(),engines:s.z.array(s.z.string()).readonly(),isHub:s.z.boolean(),isOnline:s.z.boolean(),cpuPercent:s.z.number(),memoryPercent:s.z.number(),uptime:s.z.number(),lastSeen:s.z.string(),localIps:s.z.array(s.z.string()).readonly(),addons:s.z.array(s.z.object({id:s.z.string(),capabilities:s.z.array(s.z.string()).readonly(),status:s.z.string()})).readonly(),processes:s.z.array(Fi).readonly(),categories:s.z.array(_i).readonly(),rootPackage:Ki.nullable()}),Gi=s.z.object({callerAddonId:s.z.string(),providerAddonId:s.z.string(),capName:s.z.string(),callsPerMin:s.z.number(),lastCallAtMs:s.z.number()}),Hi=s.z.object({nodeId:s.z.string(),name:s.z.string(),version:s.z.string(),status:s.z.string(),synced:s.z.boolean()}),Wi=s.z.object({hubVersion:s.z.string(),nodes:s.z.array(Hi)}),Vi=s.z.object({nodeId:s.z.string(),addonId:s.z.string()}),Zi=s.z.object({id:s.z.string(),status:s.z.string(),version:s.z.string().optional(),packageName:s.z.string().optional()}),$i=s.z.object({success:s.z.boolean()}),Ji=s.z.object({success:s.z.boolean(),reason:s.z.string().optional()}),Yi=s.z.object({restarted:s.z.array(s.z.string()).readonly(),failed:s.z.array(s.z.string()).readonly()}),Qi=s.z.object({nodeId:s.z.string(),name:s.z.string()}),Xi=s.z.object({id:s.z.string(),name:s.z.string(),isHub:s.z.boolean(),isOnline:s.z.boolean()}),en=s.z.object({nodes:s.z.array(Xi).readonly(),complete:s.z.boolean()});z(s.z.void(),s.z.array(Ui).readonly(),{auth:"admin"}),z(s.z.void(),en,{auth:"admin"}),z(Vi,$i,{kind:"mutation",auth:"admin"}),z(Vi,$i,{kind:"mutation",auth:"admin"}),z(Vi,$i,{kind:"mutation",auth:"admin"}),z(s.z.object({nodeId:s.z.string(),processName:s.z.string()}),Ji,{kind:"mutation",auth:"admin"}),z(s.z.object({nodeId:s.z.string()}),Yi,{kind:"mutation",auth:"admin"}),z(s.z.object({nodeId:s.z.string()}),$i,{kind:"mutation",auth:"admin"}),z(s.z.object({nodeId:s.z.string(),name:s.z.string().min(1).max(64)}),Qi,{kind:"mutation",auth:"admin"}),z(s.z.void(),s.z.record(s.z.string(),Wi),{auth:"admin"}),z(s.z.object({windowSeconds:s.z.number().int().positive().max(300).default(60)}),s.z.array(Gi).readonly(),{auth:"admin"}),z(s.z.object({nodeId:s.z.string()}),s.z.array(Zi).readonly(),{auth:"admin"}),z(s.z.object({nodeId:s.z.string(),level:s.z.string()}),$i,{kind:"mutation",auth:"admin"}),z(s.z.object({nodeId:s.z.string(),addonId:s.z.string(),queryName:s.z.string(),params:s.z.record(s.z.string(),s.z.unknown()).optional()}),s.z.unknown(),{kind:"mutation",auth:"admin"});var tn=s.z.number().min(.25).max(32),nn=s.z.object({fromSec:s.z.number().nonnegative(),toSec:s.z.number().nonnegative()}).refine(e=>e.toSec>e.fromSec,{message:"dense range must have toSec > fromSec"}),an=s.z.object({everyMs:s.z.number().int().positive(),ranges:s.z.array(nn).min(1).max(200)}),rn=s.z.object({everyMs:s.z.number().int().positive(),outputFps:s.z.number().int().min(1).max(60).optional(),dense:an.optional()}).superRefine((e,t)=>{void 0!==e.dense&&e.dense.everyMs>=e.everyMs&&t.addIssue({code:s.z.ZodIssueCode.custom,message:"dense.everyMs must be strictly smaller than the base everyMs",path:["dense","everyMs"]})}),on=s.z.object({speed:tn.optional(),timelapse:rn.optional(),includeAudio:s.z.boolean(),maxLifeMs:s.z.number().int().positive(),deleteAfterDownload:s.z.boolean(),title:s.z.string().max(200).optional(),notifyTargetIds:s.z.array(s.z.string().min(1)).max(20).optional()}).superRefine((e,t)=>{void 0!==e.speed&&void 0!==e.timelapse&&t.addIssue({code:s.z.ZodIssueCode.custom,message:"speed and timelapse are mutually exclusive",path:["timelapse"]})}),sn=s.z.enum(["queued","rendering","ready","failed","expired","deleted"]),ln=s.z.object({kind:s.z.literal("footage"),deviceId:s.z.number(),profiles:s.z.array(s.z.string()).min(1),fromMs:s.z.number(),toMs:s.z.number()}),cn=s.z.object({kind:s.z.literal("clip"),deviceId:s.z.number(),provider:s.z.string().min(1),source:s.z.string().min(1),sourceLabel:s.z.string().min(1),clipId:s.z.string().min(1),catalogWindow:s.z.object({sinceMs:s.z.number(),untilMs:s.z.number()}),profile:s.z.enum(["high","mid","low"]),wake:Di.optional()}),dn=s.z.discriminatedUnion("kind",[ln,cn]),un=s.z.object({id:s.z.string(),deviceId:s.z.number(),profile:s.z.string(),fromMs:s.z.number(),toMs:s.z.number(),subject:dn.optional(),options:on,state:sn,progressPct:s.z.number().nullable(),fileBytes:s.z.number().nullable(),expiresAt:s.z.number(),deleteAfterDownload:s.z.boolean(),downloadedAt:s.z.number().nullable(),createdAt:s.z.number(),createdBy:s.z.string(),error:s.z.string().nullable()});s.z.enum(["catalog-miss","catalog-unreachable","no-file-for-window","clip-in-progress","unsupported-option","sleeping","camera-refused","fetch-failed","too-large-to-transfer","wake-expired"]);var mn=s.z.object({url:s.z.string(),endpoints:s.z.array(s.z.string())}),pn=52428800,gn=s.z.object({base64:s.z.string(),contentType:s.z.string(),name:s.z.string(),bytes:s.z.number().int().nonnegative()});z(s.z.object({deviceId:s.z.number(),profile:s.z.string().optional(),profiles:s.z.array(s.z.string()).min(1).optional(),fromMs:s.z.number().optional(),toMs:s.z.number().optional(),subject:dn.optional(),options:on}).superRefine((e,t)=>{if("clip"===e.subject?.kind)return e.subject.deviceId!==e.deviceId&&t.addIssue({code:s.z.ZodIssueCode.custom,message:`subject.deviceId (${e.subject.deviceId}) must equal deviceId (${e.deviceId}) \u2014 the top-level field is what per-device scope enforcement reads`,path:["subject","deviceId"]}),void(void 0===e.fromMs&&void 0===e.toMs||t.addIssue({code:s.z.ZodIssueCode.custom,message:"a clip export asks for no time range: the camera chose the boundaries and they are read from the catalog row",path:["fromMs"]}));"footage"===e.subject?.kind&&e.subject.deviceId!==e.deviceId&&t.addIssue({code:s.z.ZodIssueCode.custom,message:`subject.deviceId (${e.subject.deviceId}) must equal deviceId (${e.deviceId})`,path:["subject","deviceId"]});const i="footage"===e.subject?.kind?e.subject.fromMs:e.fromMs,n="footage"===e.subject?.kind?e.subject.toMs:e.toMs;var a;"number"==typeof i&&"number"==typeof n||t.addIssue({code:s.z.ZodIssueCode.custom,message:"a footage export needs fromMs and toMs",path:["fromMs"]}),("footage"===e.subject?.kind?[...e.subject.profiles]:(a=e,void 0!==a.profiles&&a.profiles.length>0?[...a.profiles]:"string"==typeof a.profile&&a.profile.length>0?[a.profile]:[])).length<1&&t.addIssue({code:s.z.ZodIssueCode.custom,message:"pass profiles[] (min 1) or legacy profile",path:["profiles"]})}),un,{kind:"mutation",auth:"protected"}),z(s.z.object({deviceId:s.z.number().optional()}),s.z.array(un),{kind:"query",auth:"protected"}),z(s.z.object({exportId:s.z.string()}),un,{kind:"query",auth:"protected"}),z(s.z.object({exportId:s.z.string()}),un,{kind:"mutation",auth:"protected"}),z(s.z.object({exportId:s.z.string()}),un,{kind:"mutation",auth:"protected"}),z(s.z.object({exportId:s.z.string()}),mn,{kind:"query",auth:"protected"}),z(s.z.object({exportId:s.z.string()}),gn,{kind:"query",auth:"protected"});function yn(e){const t=new Map,i=new Map;let n=null;const a=(e,t)=>`${e}:${t}`;return{read:(e,i)=>t.get(a(e,i)),async refresh(n,r){const o=await e.deviceState.getCapSlice.query({deviceId:n,capName:r}),s=a(n,r);t.set(s,o??void 0);const l=i.get(s);if(l)for(const e of l)try{e(o??void 0)}catch{}},watch(r,o,s){const l=a(r,o);let c=i.get(l);return c||(c=new Set,i.set(l,c)),c.add(s),n||e.live?.onEvent&&(n=e.live.onEvent.subscribe({category:"device.state-changed"},{onData:e=>{const n=e.data;if(!n||"number"!=typeof n.deviceId||"string"!=typeof n.capName)return;const r=a(n.deviceId,n.capName);t.set(r,n.slice);const o=i.get(r);if(o)for(const e of o)try{e(n.slice)}catch{}}})),()=>{c.delete(s),0===c.size&&i.delete(l),n&&(i.size>0||(n.unsubscribe(),n=null))}},async write(t,i,n){await e.deviceState.setCapSlice.mutate({deviceId:t,capName:i,slice:n})}}}function vn(e,t,i){const n=(e,t)=>`${e}:${t}`;return{read:(t,i)=>e.get(t)?.get(i),async refresh(){},watch(e,i,a){const r=n(e,i);let o=t.get(r);return o||(o=new Set,t.set(r,o)),o.add(a),()=>{o.delete(a),0===o.size&&t.delete(r)}},async write(e,t,n){if(!i)throw new Error("createMirrorSource: write requires an api reference \u2014 pass it as the third argument when constructing the source");await i.deviceState.setCapSlice.mutate({deviceId:e,capName:t,slice:n})}}}function bn(e,t,i){const n="function"==typeof(a=e).read&&"function"==typeof a.watch?e:yn(e);var a;return{get value(){return n.read(t,i)},refresh:()=>n.refresh(t,i),subscribe(e){const a=n.watch(t,i,t=>{try{e(t)}catch{}});try{e(n.read(t,i))}catch{}return void 0===n.read(t,i)&&n.refresh(t,i).catch(()=>{}),a},async set(e){await n.write(t,i,e)},async patch(e){const a=Object.assign({},n.read(t,i),e);await n.write(t,i,a)}}}function fn(e,t,i){const n=e,a=i?.stateSource??yn(e);function r(e,i){const n="object"==typeof e&&null!==e?e:{};return void 0!==i?Object.assign({},n,{deviceId:t.deviceId,nodeId:i}):Object.assign({},n,{deviceId:t.deviceId})}function o(e,t,i,a,r){const o=n[e]?.[t];if(!o)throw new Error(`DeviceProxy: api has no '${e}.${t}'`);const s=o;return"mutation"===i?s.mutate(a):"subscription"===i?s.subscribe(a,r):s.query(a)}function s(e,i,n,a,s,l){return o(i,n,a,r(s,t.entries.find(t=>t.capName===e)?.providerNodeId),l)}function l(e,t,i,n,a){return o(e,t,i,r(n,void 0),a)}function c(e){return t.entries.some(t=>t.capName===e)}const d={setChildHidden:e=>s("accessories","accessories","setChildHidden","mutation",e),getStatus:e=>s("accessories","accessories","getStatus","query",e)},u={getStatus:e=>s("air-quality-sensor","airQualitySensor","getStatus","query",e)},m={arm:e=>s("alarm-panel","alarmPanel","arm","mutation",e),disarm:e=>s("alarm-panel","alarmPanel","disarm","mutation",e),trigger:e=>s("alarm-panel","alarmPanel","trigger","mutation",e),getStatus:e=>s("alarm-panel","alarmPanel","getStatus","query",e)},p={getStatus:e=>s("ambient-light-sensor","ambientLightSensor","getStatus","query",e)},g={resolveDeviceSettings:e=>s("audio-analysis","audioAnalysis","resolveDeviceSettings","query",e),getDeviceSettingsContribution:e=>s("audio-analysis","audioAnalysis","getDeviceSettingsContribution","query",e),getDeviceLiveContribution:e=>s("audio-analysis","audioAnalysis","getDeviceLiveContribution","query",e),applyDeviceSettingsPatch:e=>s("audio-analysis","audioAnalysis","applyDeviceSettingsPatch","mutation",e)},y={getCurrentSnapshot:e=>s("audio-metrics","audioMetrics","getCurrentSnapshot","query",e),getHistory:e=>s("audio-metrics","audioMetrics","getHistory","query",e)},v={enable:e=>s("automation-control","automationControl","enable","mutation",e),disable:e=>s("automation-control","automationControl","disable","mutation",e),trigger:e=>s("automation-control","automationControl","trigger","mutation",e),getStatus:e=>s("automation-control","automationControl","getStatus","query",e)},b={wakeForStream:e=>s("battery","battery","wakeForStream","mutation",e),getStatus:e=>s("battery","battery","getStatus","query",e)},f={getStatus:e=>s("binary","binary","getStatus","query",e)},z={setBrightness:e=>s("brightness","brightness","setBrightness","mutation",e),getStatus:e=>s("brightness","brightness","getStatus","query",e)},h={press:e=>s("button","button","press","mutation",e)},S={getCredentials:e=>s("camera-credentials","cameraCredentials","getCredentials","query",e),getStatus:e=>s("camera-credentials","cameraCredentials","getStatus","query",e)},k={getLayout:e=>s("camera-grid-layout","cameraGridLayout","getLayout","query",e),saveLayout:e=>s("camera-grid-layout","cameraGridLayout","saveLayout","mutation",e),getDeviceSettingsContribution:e=>s("camera-grid-layout","cameraGridLayout","getDeviceSettingsContribution","query",e),getDeviceLiveContribution:e=>s("camera-grid-layout","cameraGridLayout","getDeviceLiveContribution","query",e),applyDeviceSettingsPatch:e=>s("camera-grid-layout","cameraGridLayout","applyDeviceSettingsPatch","mutation",e)},q={getDeviceSettingsContribution:e=>s("camera-pipeline-config","cameraPipelineConfig","getDeviceSettingsContribution","query",e),getDeviceLiveContribution:e=>s("camera-pipeline-config","cameraPipelineConfig","getDeviceLiveContribution","query",e),applyDeviceSettingsPatch:e=>s("camera-pipeline-config","cameraPipelineConfig","applyDeviceSettingsPatch","mutation",e)},A={getCameraStreams:e=>s("camera-streams","cameraStreams","getCameraStreams","query",e),getBrokerStreams:e=>s("camera-streams","cameraStreams","getBrokerStreams","query",e),getRtspEntries:e=>s("camera-streams","cameraStreams","getRtspEntries","query",e),getProfileRtspEntries:e=>s("camera-streams","cameraStreams","getProfileRtspEntries","query",e),pickStream:e=>s("camera-streams","cameraStreams","pickStream","query",e)},C={getStatus:e=>s("carbon-monoxide","carbonMonoxide","getStatus","query",e)},w={setMode:e=>s("climate-control","climateControl","setMode","mutation",e),setFanMode:e=>s("climate-control","climateControl","setFanMode","mutation",e),setPreset:e=>s("climate-control","climateControl","setPreset","mutation",e),setTarget:e=>s("climate-control","climateControl","setTarget","mutation",e),setTargetRange:e=>s("climate-control","climateControl","setTargetRange","mutation",e),setTargetHumidity:e=>s("climate-control","climateControl","setTargetHumidity","mutation",e),setSwingVertical:e=>s("climate-control","climateControl","setSwingVertical","mutation",e),setSwingHorizontal:e=>s("climate-control","climateControl","setSwingHorizontal","mutation",e),getStatus:e=>s("climate-control","climateControl","getStatus","query",e)},M={setColor:e=>s("color","color","setColor","mutation",e),getStatus:e=>s("color","color","getStatus","query",e)},D={getStatus:e=>s("connectivity","connectivity","getStatus","query",e)},P={reset:e=>s("consumables","consumables","reset","mutation",e),getStatus:e=>s("consumables","consumables","getStatus","query",e)},I={getStatus:e=>s("contact","contact","getStatus","query",e)},E={setValue:e=>s("control","control","setValue","mutation",e),getStatus:e=>s("control","control","getStatus","query",e)},j={open:e=>s("cover","cover","open","mutation",e),close:e=>s("cover","cover","close","mutation",e),stop:e=>s("cover","cover","stop","mutation",e),setPosition:e=>s("cover","cover","setPosition","mutation",e),setTiltPosition:e=>s("cover","cover","setTiltPosition","mutation",e),getStatus:e=>s("cover","cover","getStatus","query",e)},x={getOptions:e=>s("day-night","dayNight","getOptions","query",e),setSettings:e=>s("day-night","dayNight","setSettings","mutation",e),getStatus:e=>s("day-night","dayNight","getStatus","query",e)},O={getDeviceSettingsContribution:e=>s("detection-pipeline","detectionPipeline","getDeviceSettingsContribution","query",e),getDeviceLiveContribution:e=>s("detection-pipeline","detectionPipeline","getDeviceLiveContribution","query",e),applyDeviceSettingsPatch:e=>s("detection-pipeline","detectionPipeline","applyDeviceSettingsPatch","mutation",e)},T={getAdminLink:e=>s("device-admin-link","deviceAdminLink","getAdminLink","query",e)},R={listDiscovered:e=>s("device-discovery","deviceDiscovery","listDiscovered","query",e),refreshDiscovery:e=>s("device-discovery","deviceDiscovery","refreshDiscovery","mutation",e),adoptDevice:e=>s("device-discovery","deviceDiscovery","adoptDevice","mutation",e),releaseDevice:e=>s("device-discovery","deviceDiscovery","releaseDevice","mutation",e),getStatus:e=>s("device-discovery","deviceDiscovery","getStatus","query",e)},B={listSources:e=>s("device-extension","deviceExtension","listSources","query",e),listSlots:e=>s("device-extension","deviceExtension","listSlots","query",e),listCandidates:e=>s("device-extension","deviceExtension","listCandidates","query",e),setSlot:e=>s("device-extension","deviceExtension","setSlot","mutation",e)},L={getStreamSources:e=>s("device-ops","deviceOps","getStreamSources","query",e),getConfigEntries:e=>s("device-ops","deviceOps","getConfigEntries","query",e),setConfig:e=>s("device-ops","deviceOps","setConfig","mutation",e),runAction:e=>s("device-ops","deviceOps","runAction","mutation",e),removeDevice:e=>s("device-ops","deviceOps","removeDevice","mutation",e),getSettingsSchema:e=>s("device-ops","deviceOps","getSettingsSchema","query",e),getRawState:e=>s("device-ops","deviceOps","getRawState","query",e)},F={getStatus:e=>s("device-status","deviceStatus","getStatus","query",e)},N={getStatus:e=>s("doorbell","doorbell","getStatus","query",e)},_={getStatus:e=>s("enum-sensor","enumSensor","getStatus","query",e)},K={getStatus:e=>s("event-emitter","eventEmitter","getStatus","query",e)},U={setPercentage:e=>s("fan-control","fanControl","setPercentage","mutation",e),setPreset:e=>s("fan-control","fanControl","setPreset","mutation",e),setDirection:e=>s("fan-control","fanControl","setDirection","mutation",e),setOscillating:e=>s("fan-control","fanControl","setOscillating","mutation",e),getStatus:e=>s("fan-control","fanControl","getStatus","query",e)},G={getStatus:e=>s("feature-probe","featureProbe","getStatus","query",e)},H={getStatus:e=>s("flood","flood","getStatus","query",e)},W={getStatus:e=>s("gas","gas","getStatus","query",e)},V={setOn:e=>s("humidifier","humidifier","setOn","mutation",e),setTargetHumidity:e=>s("humidifier","humidifier","setTargetHumidity","mutation",e),setMode:e=>s("humidifier","humidifier","setMode","mutation",e),getStatus:e=>s("humidifier","humidifier","getStatus","query",e)},Z={getStatus:e=>s("humidity-sensor","humiditySensor","getStatus","query",e)},$={getStatus:e=>s("image","image","getStatus","query",e)},J={getOptions:e=>s("image-settings","imageSettings","getOptions","query",e),setSettings:e=>s("image-settings","imageSettings","setSettings","mutation",e),getStatus:e=>s("image-settings","imageSettings","getStatus","query",e)},Y={startSession:e=>s("intercom","intercom","startSession","mutation",e),handleAnswer:e=>s("intercom","intercom","handleAnswer","mutation",e),stopSession:e=>s("intercom","intercom","stopSession","mutation",e),startTalkSession:e=>s("intercom","intercom","startTalkSession","mutation",e),pushTalkAudio:e=>s("intercom","intercom","pushTalkAudio","mutation",e),endTalkSession:e=>s("intercom","intercom","endTalkSession","mutation",e),getStatus:e=>s("intercom","intercom","getStatus","query",e)},Q={startMowing:e=>s("lawn-mower-control","lawnMowerControl","startMowing","mutation",e),pause:e=>s("lawn-mower-control","lawnMowerControl","pause","mutation",e),dock:e=>s("lawn-mower-control","lawnMowerControl","dock","mutation",e),getStatus:e=>s("lawn-mower-control","lawnMowerControl","getStatus","query",e)},X={lock:e=>s("lock-control","lockControl","lock","mutation",e),unlock:e=>s("lock-control","lockControl","unlock","mutation",e),open:e=>s("lock-control","lockControl","open","mutation",e),getStatus:e=>s("lock-control","lockControl","getStatus","query",e)},ee={play:e=>s("media-player","mediaPlayer","play","mutation",e),pause:e=>s("media-player","mediaPlayer","pause","mutation",e),stop:e=>s("media-player","mediaPlayer","stop","mutation",e),next:e=>s("media-player","mediaPlayer","next","mutation",e),previous:e=>s("media-player","mediaPlayer","previous","mutation",e),seek:e=>s("media-player","mediaPlayer","seek","mutation",e),setVolume:e=>s("media-player","mediaPlayer","setVolume","mutation",e),setMute:e=>s("media-player","mediaPlayer","setMute","mutation",e),setShuffle:e=>s("media-player","mediaPlayer","setShuffle","mutation",e),setRepeat:e=>s("media-player","mediaPlayer","setRepeat","mutation",e),selectSource:e=>s("media-player","mediaPlayer","selectSource","mutation",e),playMedia:e=>s("media-player","mediaPlayer","playMedia","mutation",e),getStatus:e=>s("media-player","mediaPlayer","getStatus","query",e)},te={isDetected:e=>s("motion","motion","isDetected","query",e),getStatus:e=>s("motion","motion","getStatus","query",e)},ie={analyze:e=>s("motion-detection","motionDetection","analyze","mutation",e),removeCamera:e=>s("motion-detection","motionDetection","removeCamera","mutation",e),reset:e=>s("motion-detection","motionDetection","reset","mutation",e),getDeviceSettingsContribution:e=>s("motion-detection","motionDetection","getDeviceSettingsContribution","query",e),getDeviceLiveContribution:e=>s("motion-detection","motionDetection","getDeviceLiveContribution","query",e),applyDeviceSettingsPatch:e=>s("motion-detection","motionDetection","applyDeviceSettingsPatch","mutation",e)},ne={setMotionTrigger:e=>s("motion-trigger","motionTrigger","setMotionTrigger","mutation",e),getStatus:e=>s("motion-trigger","motionTrigger","getStatus","query",e)},ae={getOptions:e=>s("motion-zones","motionZones","getOptions","query",e),setZone:e=>s("motion-zones","motionZones","setZone","mutation",e),getStatus:e=>s("motion-zones","motionZones","getStatus","query",e)},re={getOptions:e=>s("native-object-detection","nativeObjectDetection","getOptions","query",e),setSettings:e=>s("native-object-detection","nativeObjectDetection","setSettings","mutation",e),setEnabled:e=>s("native-object-detection","nativeObjectDetection","setEnabled","mutation",e),getStatus:e=>s("native-object-detection","nativeObjectDetection","getStatus","query",e)},oe={move:e=>s("navigation","navigation","move","mutation",e),stop:e=>s("navigation","navigation","stop","mutation",e),goToPoint:e=>s("navigation","navigation","goToPoint","mutation",e),listActions:e=>s("navigation","navigation","listActions","query",e),runAction:e=>s("navigation","navigation","runAction","mutation",e),playSound:e=>s("navigation","navigation","playSound","mutation",e),setLightOn:e=>s("navigation","navigation","setLightOn","mutation",e),setLightMode:e=>s("navigation","navigation","setLightMode","mutation",e),setLightLevel:e=>s("navigation","navigation","setLightLevel","mutation",e),getFeatures:e=>s("navigation","navigation","getFeatures","query",e),getStatus:e=>s("navigation","navigation","getStatus","query",e)},se={getStatus:e=>s("network-link","networkLink","getStatus","query",e)},le={send:e=>s("notifier","notifier","send","mutation",e),cancel:e=>s("notifier","notifier","cancel","mutation",e),getStatus:e=>s("notifier","notifier","getStatus","query",e)},ce={getStatus:e=>s("numeric-sensor","numericSensor","getStatus","query",e)},de={setOverlay:e=>s("osd","osd","setOverlay","mutation",e),getStatus:e=>s("osd","osd","getStatus","query",e)},ue={feed:e=>s("pet-feeder","petFeeder","feed","mutation",e),cancelFeed:e=>s("pet-feeder","petFeeder","cancelFeed","mutation",e),resetDesiccant:e=>s("pet-feeder","petFeeder","resetDesiccant","mutation",e),markFoodReplenished:e=>s("pet-feeder","petFeeder","markFoodReplenished","mutation",e),callPet:e=>s("pet-feeder","petFeeder","callPet","mutation",e),playSound:e=>s("pet-feeder","petFeeder","playSound","mutation",e),setChildLock:e=>s("pet-feeder","petFeeder","setChildLock","mutation",e),setIndicatorLight:e=>s("pet-feeder","petFeeder","setIndicatorLight","mutation",e),setFeedSound:e=>s("pet-feeder","petFeeder","setFeedSound","mutation",e),setVolume:e=>s("pet-feeder","petFeeder","setVolume","mutation",e),getStatus:e=>s("pet-feeder","petFeeder","getStatus","query",e)},me={getActiveTracks:e=>s("pipeline-analytics","pipelineAnalytics","getActiveTracks","query",e),getTrack:e=>s("pipeline-analytics","pipelineAnalytics","getTrack","query",e),listTracks:e=>s("pipeline-analytics","pipelineAnalytics","listTracks","query",e),listRecentTracks:e=>s("pipeline-analytics","pipelineAnalytics","listRecentTracks","query",e),clearTracks:e=>s("pipeline-analytics","pipelineAnalytics","clearTracks","mutation",e),getMotionEvents:e=>s("pipeline-analytics","pipelineAnalytics","getMotionEvents","query",e),getObjectEvents:e=>s("pipeline-analytics","pipelineAnalytics","getObjectEvents","query",e),getAudioEvents:e=>s("pipeline-analytics","pipelineAnalytics","getAudioEvents","query",e),listEventKinds:e=>s("pipeline-analytics","pipelineAnalytics","listEventKinds","query",e),listEventKindsBatch:e=>s("pipeline-analytics","pipelineAnalytics","listEventKindsBatch","query",e),getSensorEvents:e=>s("pipeline-analytics","pipelineAnalytics","getSensorEvents","query",e),getKeyEvents:e=>s("pipeline-analytics","pipelineAnalytics","getKeyEvents","query",e),getKeyEventsBatch:e=>s("pipeline-analytics","pipelineAnalytics","getKeyEventsBatch","query",e),readLongTermSeries:e=>s("pipeline-analytics","pipelineAnalytics","readLongTermSeries","query",e),getEventDensity:e=>s("pipeline-analytics","pipelineAnalytics","getEventDensity","query",e),getEventDensityBatch:e=>s("pipeline-analytics","pipelineAnalytics","getEventDensityBatch","query",e),pruneEventsBefore:e=>s("pipeline-analytics","pipelineAnalytics","pruneEventsBefore","mutation",e),pruneTracksBefore:e=>s("pipeline-analytics","pipelineAnalytics","pruneTracksBefore","mutation",e),wipeAllAnalytics:e=>s("pipeline-analytics","pipelineAnalytics","wipeAllAnalytics","mutation",e),reconcileFromDisk:e=>s("pipeline-analytics","pipelineAnalytics","reconcileFromDisk","mutation",e),deleteTracks:e=>s("pipeline-analytics","pipelineAnalytics","deleteTracks","mutation",e),setTrackFlags:e=>s("pipeline-analytics","pipelineAnalytics","setTrackFlags","mutation",e),listArchivedDebugNotes:e=>s("pipeline-analytics","pipelineAnalytics","listArchivedDebugNotes","query",e),setTrackRelation:e=>s("pipeline-analytics","pipelineAnalytics","setTrackRelation","mutation",e),clearTrackRelation:e=>s("pipeline-analytics","pipelineAnalytics","clearTrackRelation","mutation",e),setTrackPurity:e=>s("pipeline-analytics","pipelineAnalytics","setTrackPurity","mutation",e),listTrackRelations:e=>s("pipeline-analytics","pipelineAnalytics","listTrackRelations","query",e),listBirthDecisions:e=>s("pipeline-analytics","pipelineAnalytics","listBirthDecisions","query",e),getEventStoreFootprint:e=>s("pipeline-analytics","pipelineAnalytics","getEventStoreFootprint","query",e),getEventMediaFootprintByKind:e=>s("pipeline-analytics","pipelineAnalytics","getEventMediaFootprintByKind","query",e),pruneEvents:e=>s("pipeline-analytics","pipelineAnalytics","pruneEvents","mutation",e),deleteDeviceEvents:e=>s("pipeline-analytics","pipelineAnalytics","deleteDeviceEvents","mutation",e),pauseForStorageMigration:e=>s("pipeline-analytics","pipelineAnalytics","pauseForStorageMigration","mutation",e),resumeForStorageMigration:e=>s("pipeline-analytics","pipelineAnalytics","resumeForStorageMigration","mutation",e),refreshStorageLocationsForMigration:e=>s("pipeline-analytics","pipelineAnalytics","refreshStorageLocationsForMigration","mutation",e),startStorageMigrationMove:e=>s("pipeline-analytics","pipelineAnalytics","startStorageMigrationMove","mutation",e),getStorageMigrationMoveStatus:e=>s("pipeline-analytics","pipelineAnalytics","getStorageMigrationMoveStatus","query",e),cancelStorageMigrationMove:e=>s("pipeline-analytics","pipelineAnalytics","cancelStorageMigrationMove","mutation",e),relocateMedia:e=>s("pipeline-analytics","pipelineAnalytics","relocateMedia","mutation",e),countUnstampedEventMedia:e=>s("pipeline-analytics","pipelineAnalytics","countUnstampedEventMedia","query",e),countRelocatableMedia:e=>s("pipeline-analytics","pipelineAnalytics","countRelocatableMedia","query",e),listRelocateMediaJobs:e=>s("pipeline-analytics","pipelineAnalytics","listRelocateMediaJobs","query",e),cancelRelocateMedia:e=>s("pipeline-analytics","pipelineAnalytics","cancelRelocateMedia","mutation",e),listOpsLog:e=>s("pipeline-analytics","pipelineAnalytics","listOpsLog","query",e),reclaimDebugMedia:e=>s("pipeline-analytics","pipelineAnalytics","reclaimDebugMedia","mutation",e),getMediaReclaimStatus:e=>s("pipeline-analytics","pipelineAnalytics","getMediaReclaimStatus","query",e),getTrainingExportSummary:e=>s("pipeline-analytics","pipelineAnalytics","getTrainingExportSummary","query",e),getTrainingExportUrl:e=>s("pipeline-analytics","pipelineAnalytics","getTrainingExportUrl","query",e),listRetrainStaging:e=>s("pipeline-analytics","pipelineAnalytics","listRetrainStaging","query",e),listRetrainFrames:e=>s("pipeline-analytics","pipelineAnalytics","listRetrainFrames","query",e),selectRetrainFrames:e=>s("pipeline-analytics","pipelineAnalytics","selectRetrainFrames","mutation",e),deselectRetrainFrame:e=>s("pipeline-analytics","pipelineAnalytics","deselectRetrainFrame","mutation",e),getRetrainFrameImage:e=>s("pipeline-analytics","pipelineAnalytics","getRetrainFrameImage","query",e),proposeRetrainAnnotations:e=>s("pipeline-analytics","pipelineAnalytics","proposeRetrainAnnotations","mutation",e),listRetrainAnnotations:e=>s("pipeline-analytics","pipelineAnalytics","listRetrainAnnotations","query",e),saveRetrainAnnotations:e=>s("pipeline-analytics","pipelineAnalytics","saveRetrainAnnotations","mutation",e),completeRetrainTrack:e=>s("pipeline-analytics","pipelineAnalytics","completeRetrainTrack","mutation",e),restageRetrainTrack:e=>s("pipeline-analytics","pipelineAnalytics","restageRetrainTrack","mutation",e),getRetrainExportUrl:e=>s("pipeline-analytics","pipelineAnalytics","getRetrainExportUrl","query",e),getEventMedia:e=>s("pipeline-analytics","pipelineAnalytics","getEventMedia","query",e),getTrackMedia:e=>s("pipeline-analytics","pipelineAnalytics","getTrackMedia","query",e),listTrackMedia:e=>s("pipeline-analytics","pipelineAnalytics","listTrackMedia","query",e),listEventMedia:e=>s("pipeline-analytics","pipelineAnalytics","listEventMedia","query",e),ownersWithMedia:e=>s("pipeline-analytics","pipelineAnalytics","ownersWithMedia","query",e),searchObjectEvents:e=>s("pipeline-analytics","pipelineAnalytics","searchObjectEvents","query",e),wipeObjectEmbeddings:e=>s("pipeline-analytics","pipelineAnalytics","wipeObjectEmbeddings","mutation",e),rebuildObjectEmbeddings:e=>s("pipeline-analytics","pipelineAnalytics","rebuildObjectEmbeddings","mutation",e),getObjectEmbeddingRebuildStatus:e=>s("pipeline-analytics","pipelineAnalytics","getObjectEmbeddingRebuildStatus","query",e),getDeviceSettingsContribution:e=>s("pipeline-analytics","pipelineAnalytics","getDeviceSettingsContribution","query",e),getDeviceLiveContribution:e=>s("pipeline-analytics","pipelineAnalytics","getDeviceLiveContribution","query",e),applyDeviceSettingsPatch:e=>s("pipeline-analytics","pipelineAnalytics","applyDeviceSettingsPatch","mutation",e)},pe={getStatus:e=>s("power-meter","powerMeter","getStatus","query",e)},ge={getStatus:e=>s("presence","presence","getStatus","query",e)},ye={getStatus:e=>s("pressure-sensor","pressureSensor","getStatus","query",e)},ve={getOptions:e=>s("privacy-mask","privacyMask","getOptions","query",e),setMask:e=>s("privacy-mask","privacyMask","setMask","mutation",e),setAudioEnabled:e=>s("privacy-mask","privacyMask","setAudioEnabled","mutation",e),getStatus:e=>s("privacy-mask","privacyMask","getStatus","query",e)},be={move:e=>s("ptz","ptz","move","mutation",e),continuousMove:e=>s("ptz","ptz","continuousMove","mutation",e),stop:e=>s("ptz","ptz","stop","mutation",e),getPresets:e=>s("ptz","ptz","getPresets","query",e),goToPreset:e=>s("ptz","ptz","goToPreset","mutation",e),savePreset:e=>s("ptz","ptz","savePreset","mutation",e),deletePreset:e=>s("ptz","ptz","deletePreset","mutation",e),getOptions:e=>s("ptz","ptz","getOptions","query",e),goHome:e=>s("ptz","ptz","goHome","mutation",e),getHomePreset:e=>s("ptz","ptz","getHomePreset","query",e),setHomePreset:e=>s("ptz","ptz","setHomePreset","mutation",e),captureHomeHere:e=>s("ptz","ptz","captureHomeHere","mutation",e),getHomeReturn:e=>s("ptz","ptz","getHomeReturn","query",e),setHomeReturn:e=>s("ptz","ptz","setHomeReturn","mutation",e),getPosition:e=>s("ptz","ptz","getPosition","query",e),setAutofocus:e=>s("ptz","ptz","setAutofocus","mutation",e),getStatus:e=>s("ptz","ptz","getStatus","query",e)},fe={getStatus:e=>s("ptz-autotrack","ptzAutotrack","getStatus","query",e),setEnabled:e=>s("ptz-autotrack","ptzAutotrack","setEnabled","mutation",e),getSettings:e=>s("ptz-autotrack","ptzAutotrack","getSettings","query",e),setSettings:e=>s("ptz-autotrack","ptzAutotrack","setSettings","mutation",e)},ze={reboot:e=>s("reboot","reboot","reboot","mutation",e)},he={listSources:e=>s("recording","recording","listSources","query",e),getAvailability:e=>s("recording","recording","getAvailability","query",e),getDaysWithRecordings:e=>s("recording","recording","getDaysWithRecordings","query",e),getPlayback:e=>s("recording","recording","getPlayback","query",e),getPlaybackOptions:e=>s("recording","recording","getPlaybackOptions","query",e)},Se={getOptions:e=>s("recording-onboard","recordingOnboard","getOptions","query",e),setSettings:e=>s("recording-onboard","recordingOnboard","setSettings","mutation",e),getStatus:e=>s("recording-onboard","recordingOnboard","getStatus","query",e)},ke={getStatus:e=>s("recording-signal","recordingSignal","getStatus","query",e)},qe={listScenes:e=>s("scene-monitor","sceneMonitor","listScenes","query",e),listScenesBatch:e=>s("scene-monitor","sceneMonitor","listScenesBatch","query",e),createScene:e=>s("scene-monitor","sceneMonitor","createScene","mutation",e),updateScene:e=>s("scene-monitor","sceneMonitor","updateScene","mutation",e),deleteScene:e=>s("scene-monitor","sceneMonitor","deleteScene","mutation",e),captureReference:e=>s("scene-monitor","sceneMonitor","captureReference","mutation",e),deleteReference:e=>s("scene-monitor","sceneMonitor","deleteReference","mutation",e),recheckNow:e=>s("scene-monitor","sceneMonitor","recheckNow","mutation",e),resetScene:e=>s("scene-monitor","sceneMonitor","resetScene","mutation",e),getStatus:e=>s("scene-monitor","sceneMonitor","getStatus","query",e)},Ae={run:e=>s("script-runner","scriptRunner","run","mutation",e),stop:e=>s("script-runner","scriptRunner","stop","mutation",e),getStatus:e=>s("script-runner","scriptRunner","getStatus","query",e)},Ce={getStatus:e=>s("smoke","smoke","getStatus","query",e)},we={getSnapshot:e=>s("snapshot","snapshot","getSnapshot","query",e),invalidateCache:e=>s("snapshot","snapshot","invalidateCache","mutation",e),getSnapshotOverview:e=>s("snapshot","snapshot","getSnapshotOverview","query",e),getDebugState:e=>s("snapshot","snapshot","getDebugState","query",e),getSnapshotLinks:e=>s("snapshot","snapshot","getSnapshotLinks","query",e),getStatus:e=>s("snapshot","snapshot","getStatus","query",e),getDeviceSettingsContribution:e=>s("snapshot","snapshot","getDeviceSettingsContribution","query",e),getDeviceLiveContribution:e=>s("snapshot","snapshot","getDeviceLiveContribution","query",e),applyDeviceSettingsPatch:e=>s("snapshot","snapshot","applyDeviceSettingsPatch","mutation",e)},Me={getCatalog:e=>s("stream-catalog","streamCatalog","getCatalog","query",e)},De={getOptions:e=>s("stream-params","streamParams","getOptions","query",e),setProfile:e=>s("stream-params","streamParams","setProfile","mutation",e),getConfigSchema:e=>s("stream-params","streamParams","getConfigSchema","query",e),getStatus:e=>s("stream-params","streamParams","getStatus","query",e)},Pe={listSignals:e=>s("stream-signals","streamSignals","listSignals","query",e)},Ie={setState:e=>s("switch","switch","setState","mutation",e),getStatus:e=>s("switch","switch","getStatus","query",e)},Ee={getStatus:e=>s("tamper","tamper","getStatus","query",e)},je={getStatus:e=>s("temperature-sensor","temperatureSensor","getStatus","query",e)},xe={installUpdate:e=>s("update","update","installUpdate","mutation",e),getStatus:e=>s("update","update","getStatus","query",e)},Oe={start:e=>s("vacuum-control","vacuumControl","start","mutation",e),pause:e=>s("vacuum-control","vacuumControl","pause","mutation",e),stop:e=>s("vacuum-control","vacuumControl","stop","mutation",e),returnToBase:e=>s("vacuum-control","vacuumControl","returnToBase","mutation",e),locate:e=>s("vacuum-control","vacuumControl","locate","mutation",e),setFanSpeed:e=>s("vacuum-control","vacuumControl","setFanSpeed","mutation",e),getStatus:e=>s("vacuum-control","vacuumControl","getStatus","query",e)},Te={open:e=>s("valve","valve","open","mutation",e),close:e=>s("valve","valve","close","mutation",e),stop:e=>s("valve","valve","stop","mutation",e),setPosition:e=>s("valve","valve","setPosition","mutation",e),getStatus:e=>s("valve","valve","getStatus","query",e)},Re={getStatus:e=>s("vibration","vibration","getStatus","query",e)},Be={listClips:e=>s("videoclips","videoclips","listClips","query",e),listSources:e=>s("videoclips","videoclips","listSources","query",e),getClipPlayback:e=>s("videoclips","videoclips","getClipPlayback","query",e),readClipBytes:e=>s("videoclips","videoclips","readClipBytes","query",e),offerClipBytes:e=>s("videoclips","videoclips","offerClipBytes","query",e),dialClipStream:e=>s("videoclips","videoclips","dialClipStream","query",e),getPlaybackOptions:e=>s("videoclips","videoclips","getPlaybackOptions","query",e)},Le={setTargetTemp:e=>s("water-heater","waterHeater","setTargetTemp","mutation",e),setOperationMode:e=>s("water-heater","waterHeater","setOperationMode","mutation",e),setAway:e=>s("water-heater","waterHeater","setAway","mutation",e),getStatus:e=>s("water-heater","waterHeater","getStatus","query",e)},Fe={getStatus:e=>s("weather","weather","getStatus","query",e)},Ne={listStreams:e=>s("webrtc-session","webrtcSession","listStreams","query",e),createSession:e=>s("webrtc-session","webrtcSession","createSession","mutation",e),handleOffer:e=>s("webrtc-session","webrtcSession","handleOffer","mutation",e),handleAnswer:e=>s("webrtc-session","webrtcSession","handleAnswer","mutation",e),addIceCandidate:e=>s("webrtc-session","webrtcSession","addIceCandidate","mutation",e),getIceCandidates:e=>s("webrtc-session","webrtcSession","getIceCandidates","query",e),closeSession:e=>s("webrtc-session","webrtcSession","closeSession","mutation",e),hasAdaptiveBitrate:e=>s("webrtc-session","webrtcSession","hasAdaptiveBitrate","query",e),getSessionState:e=>s("webrtc-session","webrtcSession","getSessionState","query",e),applyDownlinkProbe:e=>s("webrtc-session","webrtcSession","applyDownlinkProbe","mutation",e),getSessionDebug:e=>s("webrtc-session","webrtcSession","getSessionDebug","query",e)},_e={getCurrentSnapshot:e=>s("zone-analytics","zoneAnalytics","getCurrentSnapshot","query",e),getCurrentSnapshotBatch:e=>s("zone-analytics","zoneAnalytics","getCurrentSnapshotBatch","query",e),getZoneHistory:e=>s("zone-analytics","zoneAnalytics","getZoneHistory","query",e),getCameraHistory:e=>s("zone-analytics","zoneAnalytics","getCameraHistory","query",e),getUnzonedHistory:e=>s("zone-analytics","zoneAnalytics","getUnzonedHistory","query",e)},Ke={listRules:e=>s("zone-rules","zoneRules","listRules","query",e),setRules:e=>s("zone-rules","zoneRules","setRules","mutation",e)},Ue={listZones:e=>s("zones","zones","listZones","query",e),addZone:e=>s("zones","zones","addZone","mutation",e),removeZone:e=>s("zones","zones","removeZone","mutation",e),updateZone:e=>s("zones","zones","updateZone","mutation",e)},Ge={getDeviceSettings:e=>l("addonSettings","getDeviceSettings","query",e),updateDeviceSettings:e=>l("addonSettings","updateDeviceSettings","mutation",e)},He={detachDevice:e=>l("audioAnalyzer","detachDevice","mutation",e)},We={getStatus:e=>l("deviceAdoption","getStatus","query",e)},Ve={getDeviceSettingsContribution:e=>l("deviceExport","getDeviceSettingsContribution","query",e),getDeviceLiveContribution:e=>l("deviceExport","getDeviceLiveContribution","query",e),applyDeviceSettingsPatch:e=>l("deviceExport","applyDeviceSettingsPatch","mutation",e)},Ze={loadConfig:e=>l("deviceManager","loadConfig","query",e),loadRuntimeState:e=>l("deviceManager","loadRuntimeState","query",e),loadMeta:e=>l("deviceManager","loadMeta","query",e),setName:e=>l("deviceManager","setName","mutation",e),setLocation:e=>l("deviceManager","setLocation","mutation",e),setType:e=>l("deviceManager","setType","mutation",e),setIntegrationId:e=>l("deviceManager","setIntegrationId","mutation",e),setLinkDeviceId:e=>l("deviceManager","setLinkDeviceId","mutation",e),setPrimaryChildEntityId:e=>l("deviceManager","setPrimaryChildEntityId","mutation",e),setChildLayout:e=>l("deviceManager","setChildLayout","mutation",e),setDisplay:e=>l("deviceManager","setDisplay","mutation",e),getWireableFields:e=>l("deviceManager","getWireableFields","query",e),setRole:e=>l("deviceManager","setRole","mutation",e),applyInitialMeta:e=>l("deviceManager","applyInitialMeta","mutation",e),setMetadata:e=>l("deviceManager","setMetadata","mutation",e),setDisabled:e=>l("deviceManager","setDisabled","mutation",e),getDevice:e=>l("deviceManager","getDevice","query",e),getLinkedDevices:e=>l("deviceManager","getLinkedDevices","query",e),getStreamSources:e=>l("deviceManager","getStreamSources","query",e),getConfigSchema:e=>l("deviceManager","getConfigSchema","query",e),getSettingsSchema:e=>l("deviceManager","getSettingsSchema","query",e),updateConfig:e=>l("deviceManager","updateConfig","mutation",e),enable:e=>l("deviceManager","enable","mutation",e),disable:e=>l("deviceManager","disable","mutation",e),remove:e=>l("deviceManager","remove","mutation",e),getStreamProfileMap:e=>l("deviceManager","getStreamProfileMap","query",e),setStreamProfileMap:e=>l("deviceManager","setStreamProfileMap","mutation",e),probeStreams:e=>l("deviceManager","probeStreams","mutation",e),getBindings:e=>l("deviceManager","getBindings","query",e),setWrapperActive:e=>l("deviceManager","setWrapperActive","mutation",e),getWrapperActivation:e=>l("deviceManager","getWrapperActivation","query",e),getDeviceSettingsAggregate:e=>l("deviceManager","getDeviceSettingsAggregate","query",e),getDeviceLiveInfoAggregate:e=>l("deviceManager","getDeviceLiveInfoAggregate","query",e),getDeviceAggregate:e=>l("deviceManager","getDeviceAggregate","query",e),runDeviceAction:e=>l("deviceManager","runDeviceAction","mutation",e),updateDeviceField:e=>l("deviceManager","updateDeviceField","mutation",e),updateDeviceFieldsBatch:e=>l("deviceManager","updateDeviceFieldsBatch","mutation",e),testField:e=>l("deviceManager","testField","mutation",e),getDeviceStatusAggregate:e=>l("deviceManager","getDeviceStatusAggregate","query",e)},$e={getSnapshot:e=>l("deviceState","getSnapshot","query",e),getCapSlice:e=>l("deviceState","getCapSlice","query",e),setCapSlice:e=>l("deviceState","setCapSlice","mutation",e),claimFields:e=>l("deviceState","claimFields","mutation",e),patchOwnedFields:e=>l("deviceState","patchOwnedFields","mutation",e),releaseClaim:e=>l("deviceState","releaseClaim","mutation",e),getNativeCapSlice:e=>l("deviceState","getNativeCapSlice","query",e)},Je={listRecentFaces:e=>l("faceGallery","listRecentFaces","query",e),getFaceByTrack:e=>l("faceGallery","getFaceByTrack","query",e)},Ye={getDeviceStats:e=>l("networkQuality","getDeviceStats","query",e),reportClientStats:e=>l("networkQuality","reportClientStats","mutation",e)},Qe={setDeviceMuted:e=>l("notificationRules","setDeviceMuted","mutation",e)},Xe={getDeviceOsd:e=>l("osdManager","getDeviceOsd","query",e),getSourceCatalog:e=>l("osdManager","getSourceCatalog","query",e),setSlotBinding:e=>l("osdManager","setSlotBinding","mutation",e),clearSlotBinding:e=>l("osdManager","clearSlotBinding","mutation",e),previewSlot:e=>l("osdManager","previewSlot","mutation",e),renderDevice:e=>l("osdManager","renderDevice","mutation",e)},et={runPipeline:e=>l("pipelineExecutor","runPipeline","mutation",e),runPipelineBatch:e=>l("pipelineExecutor","runPipelineBatch","mutation",e)},tt={assignPipeline:e=>l("pipelineOrchestrator","assignPipeline","mutation",e),unassignPipeline:e=>l("pipelineOrchestrator","unassignPipeline","mutation",e),setPipelineDevicePin:e=>l("pipelineOrchestrator","setPipelineDevicePin","mutation",e),getPipelineDevicePin:e=>l("pipelineOrchestrator","getPipelineDevicePin","query",e),getPipelineAssignment:e=>l("pipelineOrchestrator","getPipelineAssignment","query",e),getCameraMetrics:e=>l("pipelineOrchestrator","getCameraMetrics","query",e),assignAudio:e=>l("pipelineOrchestrator","assignAudio","mutation",e),unassignAudio:e=>l("pipelineOrchestrator","unassignAudio","mutation",e),getAudioAssignment:e=>l("pipelineOrchestrator","getAudioAssignment","query",e),getCameraSettings:e=>l("pipelineOrchestrator","getCameraSettings","query",e),setCameraStepToggle:e=>l("pipelineOrchestrator","setCameraStepToggle","mutation",e),getCameraStepOverrides:e=>l("pipelineOrchestrator","getCameraStepOverrides","query",e),setCameraStepOverride:e=>l("pipelineOrchestrator","setCameraStepOverride","mutation",e),setCameraPipelineForAgent:e=>l("pipelineOrchestrator","setCameraPipelineForAgent","mutation",e),resolvePipeline:e=>l("pipelineOrchestrator","resolvePipeline","query",e),getCameraSwitches:e=>l("pipelineOrchestrator","getCameraSwitches","query",e),setCameraSwitch:e=>l("pipelineOrchestrator","setCameraSwitch","mutation",e),getCameraStatus:e=>l("pipelineOrchestrator","getCameraStatus","query",e),getDeviceSettingsContribution:e=>l("pipelineOrchestrator","getDeviceSettingsContribution","query",e),getDeviceLiveContribution:e=>l("pipelineOrchestrator","getDeviceLiveContribution","query",e),applyDeviceSettingsPatch:e=>l("pipelineOrchestrator","applyDeviceSettingsPatch","mutation",e)},it={detachCamera:e=>l("pipelineRunner","detachCamera","mutation",e),getCameraMetrics:e=>l("pipelineRunner","getCameraMetrics","query",e),requestOccupancyBurst:e=>l("pipelineRunner","requestOccupancyBurst","mutation",e),runDetailSubtree:e=>l("pipelineRunner","runDetailSubtree","mutation",e),parkTrackFrame:e=>l("pipelineRunner","parkTrackFrame","mutation",e),getParkedTrackFrame:e=>l("pipelineRunner","getParkedTrackFrame","query",e),releaseParkedTrackFrames:e=>l("pipelineRunner","releaseParkedTrackFrames","mutation",e)},nt={listPlates:e=>l("plateGallery","listPlates","query",e),getPlateByTrack:e=>l("plateGallery","getPlateByTrack","query",e)},at={getDeviceConfig:e=>l("recordingArchive","getDeviceConfig","query",e),locateSegment:e=>l("recordingArchive","locateSegment","query",e),readSegmentBytes:e=>l("recordingArchive","readSegmentBytes","query",e),readGopBytes:e=>l("recordingArchive","readGopBytes","query",e),readWindowBytes:e=>l("recordingArchive","readWindowBytes","query",e),setDeviceConfig:e=>l("recordingArchive","setDeviceConfig","mutation",e),rescanStorage:e=>l("recordingArchive","rescanStorage","mutation",e),pruneFootage:e=>l("recordingArchive","pruneFootage","mutation",e),deleteFootprint:e=>l("recordingArchive","deleteFootprint","mutation",e),renderGif:e=>l("recordingArchive","renderGif","mutation",e),renderClip:e=>l("recordingArchive","renderClip","mutation",e),getStatus:e=>l("recordingArchive","getStatus","query",e),getDeviceSettingsContribution:e=>l("recordingArchive","getDeviceSettingsContribution","query",e),getDeviceLiveContribution:e=>l("recordingArchive","getDeviceLiveContribution","query",e),applyDeviceSettingsPatch:e=>l("recordingArchive","applyDeviceSettingsPatch","mutation",e)},rt={listExports:e=>l("recordingExport","listExports","query",e)},ot={reportStreamSignal:e=>l("streamBroker","reportStreamSignal","mutation",e),publishCameraStream:e=>l("streamBroker","publishCameraStream","mutation",e),retractCameraStream:e=>l("streamBroker","retractCameraStream","mutation",e),assignProfile:e=>l("streamBroker","assignProfile","mutation",e),unassignProfile:e=>l("streamBroker","unassignProfile","mutation",e),forgetDeviceHardware:e=>l("streamBroker","forgetDeviceHardware","mutation",e),renderPreBufferClip:e=>l("streamBroker","renderPreBufferClip","mutation",e),produceEventMedia:e=>l("streamBroker","produceEventMedia","mutation",e),restartProfile:e=>l("streamBroker","restartProfile","mutation",e),getDeviceAudioMute:e=>l("streamBroker","getDeviceAudioMute","query",e),setDeviceAudioMute:e=>l("streamBroker","setDeviceAudioMute","mutation",e),getDeviceSettingsContribution:e=>l("streamBroker","getDeviceSettingsContribution","query",e),getDeviceLiveContribution:e=>l("streamBroker","getDeviceLiveContribution","query",e),applyDeviceSettingsPatch:e=>l("streamBroker","applyDeviceSettingsPatch","mutation",e)};return Object.assign({deviceId:t.deviceId,binding:t,state:{airQualitySensor:bn(a,t.deviceId,"air-quality-sensor"),alarmPanel:bn(a,t.deviceId,"alarm-panel"),ambientLightSensor:bn(a,t.deviceId,"ambient-light-sensor"),audioMetrics:bn(a,t.deviceId,"audio-metrics"),automationControl:bn(a,t.deviceId,"automation-control"),battery:bn(a,t.deviceId,"battery"),binary:bn(a,t.deviceId,"binary"),brightness:bn(a,t.deviceId,"brightness"),cameraStreams:bn(a,t.deviceId,"camera-streams"),carbonMonoxide:bn(a,t.deviceId,"carbon-monoxide"),climateControl:bn(a,t.deviceId,"climate-control"),color:bn(a,t.deviceId,"color"),connectivity:bn(a,t.deviceId,"connectivity"),consumables:bn(a,t.deviceId,"consumables"),contact:bn(a,t.deviceId,"contact"),control:bn(a,t.deviceId,"control"),cover:bn(a,t.deviceId,"cover"),dayNight:bn(a,t.deviceId,"day-night"),deviceDiscovery:bn(a,t.deviceId,"device-discovery"),deviceStatus:bn(a,t.deviceId,"device-status"),doorbell:bn(a,t.deviceId,"doorbell"),enumSensor:bn(a,t.deviceId,"enum-sensor"),eventEmitter:bn(a,t.deviceId,"event-emitter"),fanControl:bn(a,t.deviceId,"fan-control"),featureProbe:bn(a,t.deviceId,"feature-probe"),flood:bn(a,t.deviceId,"flood"),gas:bn(a,t.deviceId,"gas"),humidifier:bn(a,t.deviceId,"humidifier"),humiditySensor:bn(a,t.deviceId,"humidity-sensor"),image:bn(a,t.deviceId,"image"),imageSettings:bn(a,t.deviceId,"image-settings"),intercom:bn(a,t.deviceId,"intercom"),lawnMowerControl:bn(a,t.deviceId,"lawn-mower-control"),lockControl:bn(a,t.deviceId,"lock-control"),mediaPlayer:bn(a,t.deviceId,"media-player"),motion:bn(a,t.deviceId,"motion"),motionTrigger:bn(a,t.deviceId,"motion-trigger"),motionZones:bn(a,t.deviceId,"motion-zones"),nativeObjectDetection:bn(a,t.deviceId,"native-object-detection"),navigation:bn(a,t.deviceId,"navigation"),networkLink:bn(a,t.deviceId,"network-link"),notifier:bn(a,t.deviceId,"notifier"),numericSensor:bn(a,t.deviceId,"numeric-sensor"),petFeeder:bn(a,t.deviceId,"pet-feeder"),powerMeter:bn(a,t.deviceId,"power-meter"),presence:bn(a,t.deviceId,"presence"),pressureSensor:bn(a,t.deviceId,"pressure-sensor"),privacyMask:bn(a,t.deviceId,"privacy-mask"),ptzAutotrack:bn(a,t.deviceId,"ptz-autotrack"),recordingOnboard:bn(a,t.deviceId,"recording-onboard"),recordingSignal:bn(a,t.deviceId,"recording-signal"),sceneMonitor:bn(a,t.deviceId,"scene-monitor"),scriptRunner:bn(a,t.deviceId,"script-runner"),smoke:bn(a,t.deviceId,"smoke"),streamCatalog:bn(a,t.deviceId,"stream-catalog"),streamParams:bn(a,t.deviceId,"stream-params"),streamSignals:bn(a,t.deviceId,"stream-signals"),switch:bn(a,t.deviceId,"switch"),tamper:bn(a,t.deviceId,"tamper"),temperatureSensor:bn(a,t.deviceId,"temperature-sensor"),update:bn(a,t.deviceId,"update"),vacuumControl:bn(a,t.deviceId,"vacuum-control"),valve:bn(a,t.deviceId,"valve"),vibration:bn(a,t.deviceId,"vibration"),waterHeater:bn(a,t.deviceId,"water-heater"),weather:bn(a,t.deviceId,"weather"),zoneAnalytics:bn(a,t.deviceId,"zone-analytics"),zoneRules:bn(a,t.deviceId,"zone-rules"),zones:bn(a,t.deviceId,"zones")}},c("accessories")?{accessories:d}:{},c("air-quality-sensor")?{airQualitySensor:u}:{},c("alarm-panel")?{alarmPanel:m}:{},c("ambient-light-sensor")?{ambientLightSensor:p}:{},c("audio-analysis")?{audioAnalysis:g}:{},c("audio-metrics")?{audioMetrics:y}:{},c("automation-control")?{automationControl:v}:{},c("battery")?{battery:b}:{},c("binary")?{binary:f}:{},c("brightness")?{brightness:z}:{},c("button")?{button:h}:{},c("camera-credentials")?{cameraCredentials:S}:{},c("camera-grid-layout")?{cameraGridLayout:k}:{},c("camera-pipeline-config")?{cameraPipelineConfig:q}:{},c("camera-streams")?{cameraStreams:A}:{},c("carbon-monoxide")?{carbonMonoxide:C}:{},c("climate-control")?{climateControl:w}:{},c("color")?{color:M}:{},c("connectivity")?{connectivity:D}:{},c("consumables")?{consumables:P}:{},c("contact")?{contact:I}:{},c("control")?{control:E}:{},c("cover")?{cover:j}:{},c("day-night")?{dayNight:x}:{},c("detection-pipeline")?{detectionPipeline:O}:{},c("device-admin-link")?{deviceAdminLink:T}:{},c("device-discovery")?{deviceDiscovery:R}:{},c("device-extension")?{deviceExtension:B}:{},c("device-ops")?{deviceOps:L}:{},c("device-status")?{deviceStatus:F}:{},c("doorbell")?{doorbell:N}:{},c("enum-sensor")?{enumSensor:_}:{},c("event-emitter")?{eventEmitter:K}:{},c("fan-control")?{fanControl:U}:{},c("feature-probe")?{featureProbe:G}:{},c("flood")?{flood:H}:{},c("gas")?{gas:W}:{},c("humidifier")?{humidifier:V}:{},c("humidity-sensor")?{humiditySensor:Z}:{},c("image")?{image:$}:{},c("image-settings")?{imageSettings:J}:{},c("intercom")?{intercom:Y}:{},c("lawn-mower-control")?{lawnMowerControl:Q}:{},c("lock-control")?{lockControl:X}:{},c("media-player")?{mediaPlayer:ee}:{},c("motion")?{motion:te}:{},c("motion-detection")?{motionDetection:ie}:{},c("motion-trigger")?{motionTrigger:ne}:{},c("motion-zones")?{motionZones:ae}:{},c("native-object-detection")?{nativeObjectDetection:re}:{},c("navigation")?{navigation:oe}:{},c("network-link")?{networkLink:se}:{},c("notifier")?{notifier:le}:{},c("numeric-sensor")?{numericSensor:ce}:{},c("osd")?{osd:de}:{},c("pet-feeder")?{petFeeder:ue}:{},c("pipeline-analytics")?{pipelineAnalytics:me}:{},c("power-meter")?{powerMeter:pe}:{},c("presence")?{presence:ge}:{},c("pressure-sensor")?{pressureSensor:ye}:{},c("privacy-mask")?{privacyMask:ve}:{},c("ptz")?{ptz:be}:{},c("ptz-autotrack")?{ptzAutotrack:fe}:{},c("reboot")?{reboot:ze}:{},c("recording")?{recording:he}:{},c("recording-onboard")?{recordingOnboard:Se}:{},c("recording-signal")?{recordingSignal:ke}:{},c("scene-monitor")?{sceneMonitor:qe}:{},c("script-runner")?{scriptRunner:Ae}:{},c("smoke")?{smoke:Ce}:{},c("snapshot")?{snapshot:we}:{},c("stream-catalog")?{streamCatalog:Me}:{},c("stream-params")?{streamParams:De}:{},c("stream-signals")?{streamSignals:Pe}:{},c("switch")?{switch:Ie}:{},c("tamper")?{tamper:Ee}:{},c("temperature-sensor")?{temperatureSensor:je}:{},c("update")?{update:xe}:{},c("vacuum-control")?{vacuumControl:Oe}:{},c("valve")?{valve:Te}:{},c("vibration")?{vibration:Re}:{},c("videoclips")?{videoclips:Be}:{},c("water-heater")?{waterHeater:Le}:{},c("weather")?{weather:Fe}:{},c("webrtc-session")?{webrtcSession:Ne}:{},c("zone-analytics")?{zoneAnalytics:_e}:{},c("zone-rules")?{zoneRules:Ke}:{},c("zones")?{zones:Ue}:{},{addonSettings:Ge,audioAnalyzer:He,deviceAdoption:We,deviceExport:Ve,deviceManager:Ze,deviceState:$e,faceGallery:Je,networkQuality:Ye,notificationRules:Qe,osdManager:Xe,pipelineExecutor:et,pipelineOrchestrator:tt,pipelineRunner:it,plateGallery:nt,recordingArchive:at,recordingExport:rt,streamBroker:ot})}var zn=class{stateMirror=new Map;bindings=new Map;devices=new Map;handleListeners=new Map;globalStateListeners=new Set;capListeners=new Map;deviceListeners=new Map;addedListeners=new Set;removedListeners=new Set;pendingWaits=new Set;bridges=[];initialized=!1;initPromise=null;constructor(e){this.api=e,this.stateSource=vn(this.stateMirror,this.handleListeners,this.api)}async init(e=15e3){if(!this.initialized){if(this.initPromise)return this.initPromise;this.initPromise=(async()=>{const t=(t,i)=>Number.isFinite(e)?new Promise((n,a)=>{const r=setTimeout(()=>a(new Error(`SystemMirror.init: '${i}' timed out after ${e}ms`)),e);t.then(e=>{clearTimeout(r),n(e)},e=>{clearTimeout(r),a(e)})}):t,[i,n,a]=await Promise.all([t(this.api.deviceManager.getAllBindings.query({}),"deviceManager.getAllBindings"),t(this.api.deviceState.getAllSnapshots.query({}),"deviceState.getAllSnapshots"),t(this.api.deviceManager.listAll.query({}),"deviceManager.listAll")]);for(const e of i)this.bindings.set(e.deviceId,e);for(const[e,t]of Object.entries(n)){const i=Number(e);if(!Number.isFinite(i))continue;const n=new Map;for(const[e,i]of Object.entries(t))n.set(e,i);this.stateMirror.set(i,n)}for(const e of a)this.devices.set(e.id,e);try{this.subscribeBus()}catch(e){}this.initialized=!0})();try{await this.initPromise}finally{this.initPromise=null}}}isReady(){return this.initialized}async awaitReady(){if(!this.initialized)return this.initPromise?this.initPromise:this.init()}dispose(){for(const e of this.bridges)try{e.unsubscribe()}catch{}this.bridges=[],this.handleListeners.clear(),this.globalStateListeners.clear(),this.capListeners.clear(),this.deviceListeners.clear(),this.addedListeners.clear(),this.removedListeners.clear(),this.pendingWaits.clear(),this.initialized=!1}getDeviceById(e){const t=this.bindings.get(e);return t?fn(this.api,t,{stateSource:this.stateSource}):null}getDeviceByName(e){for(const t of this.devices.values())if(t.name===e)return this.getDeviceById(t.id);return null}getDeviceByStableId(e){for(const t of this.devices.values())if(t.stableId===e)return this.getDeviceById(t.id);return null}getDevicesByAddon(e){return this.query({addonId:e})}getDevicesByType(e){return this.query({type:e})}getDeviceInfo(e){return this.devices.get(e)??null}getAllDevices(){const e=[];for(const t of this.bindings.keys()){const i=this.getDeviceById(t);i&&e.push(i)}return e}filterByCap(e){return this.query({caps:e})}query(e={}){const t=[];for(const[i,n]of this.bindings){const a=this.devices.get(i);if(void 0!==e.id&&!hn(i,e.id))continue;if(void 0!==e.stableId){if(!a)continue;if(!hn(a.stableId,e.stableId))continue}if(void 0!==e.addonId){if(!a)continue;if(!hn(a.addonId,e.addonId))continue}if(void 0!==e.type){if(!a)continue;if(!hn(a.type,e.type))continue}if(void 0!==e.caps){const t=Sn(e.caps),i=new Set(n.entries.map(e=>e.capName));if(!t.every(e=>i.has(e)))continue}if(void 0!==e.anyCap){const t=Sn(e.anyCap),i=new Set(n.entries.map(e=>e.capName));if(!t.some(e=>i.has(e)))continue}if(void 0!==e.name){if(!a)continue;if(!kn(a.name,e.name))continue}if(void 0!==e.online){if(!a)continue;if(a.online!==e.online)continue}if(void 0!==e.parentDeviceId){if(!a)continue;const t=e.parentDeviceId;if((a.parentDeviceId??null)!==t)continue}if(void 0!==e.feature){if(!a)continue;if(!Sn(e.feature).every(e=>a.features.includes(e)))continue}if(void 0!==e.isCamera){if(!a)continue;if(a.isCamera!==e.isCamera)continue}const r=this.getDeviceById(i);if(r){if(e.where&&a){if(!e.where(a,r))continue}else if(e.where&&!a)continue;t.push(r)}}return t}whereState(e,t){const i=[];for(const[n,a]of this.stateMirror){const r=a.get(e);if(!r)continue;if(!t(r,n))continue;const o=this.getDeviceById(n);o&&i.push(o)}return i}mapState(e,t){const i=[];for(const[n,a]of this.stateMirror){const r=a.get(e);r&&i.push(t(r,n))}return i}findState(e,t){for(const[i,n]of this.stateMirror){const a=n.get(e);if(a&&t(a,i))return this.getDeviceById(i)}return null}countByCap(e){let t=0;for(const i of this.bindings.values())i.entries.some(t=>t.capName===e)&&t++;return t}countByState(e,t){let i=0;for(const[n,a]of this.stateMirror){const r=a.get(e);r&&(t(r,n)&&i++)}return i}listen(e){return this.globalStateListeners.add(e),()=>{this.globalStateListeners.delete(e)}}listenCap(e,t){let i=this.capListeners.get(e);return i||(i=new Set,this.capListeners.set(e,i)),i.add(t),()=>{i.delete(t),0===i.size&&this.capListeners.delete(e)}}listenDevice(e,t){let i=this.deviceListeners.get(e);return i||(i=new Set,this.deviceListeners.set(e,i)),i.add(t),()=>{i.delete(t),0===i.size&&this.deviceListeners.delete(e)}}onDeviceAdded(e){return this.addedListeners.add(e),()=>{this.addedListeners.delete(e)}}onDeviceRemoved(e){return this.removedListeners.add(e),()=>{this.removedListeners.delete(e)}}waitForState(e,t,i,n=3e4){return new Promise((a,r)=>{const o=(()=>{const n=this.stateMirror.get(e)?.get(t);return n&&i(n)?n:null})();if(o)return void a(o);let s=null;const l=this.listenDevice(e,(e,n,r)=>{n===t&&r&&i(r)&&(s&&clearTimeout(s),l(),a(r))});Number.isFinite(n)&&(s=setTimeout(()=>{l(),r(new Error(`waitForState timed out after ${n}ms (deviceId=${e}, capName=${t})`))},n))})}waitForDevice(e,t=3e4){return new Promise((i,n)=>{const a=this.getDeviceById(e);if(a)return void i(a);let r=null;const o=this.onDeviceAdded(t=>{if(t!==e)return;const n=this.getDeviceById(t);n&&(r&&clearTimeout(r),o(),i(n))});Number.isFinite(t)&&(r=setTimeout(()=>{o(),n(new Error(`waitForDevice timed out after ${t}ms (deviceId=${e})`))},t))})}async forEachCap(e,t){for(const i of this.filterByCap(e))await t(i)}async invokeCap(e,t,i,n={}){const a=this.filterByCap(e),r=Math.max(1,n.parallelism??a.length),o=[];for(let n=0;n<a.length;n+=r){const s=a.slice(n,n+r),l=await Promise.allSettled(s.map(async n=>{const a=n[e];if(!a||"function"!=typeof a[t])throw new Error(`device '${n.deviceId}' does not expose '${e}.${t}'`);return await a[t](i)}));for(let e=0;e<l.length;e++){const t=s[e],i=l[e];"fulfilled"===i.status?o.push({deviceId:t.deviceId,ok:!0,result:i.value}):o.push({deviceId:t.deviceId,ok:!1,error:i.reason})}}return o}summary(){const e={},t={},i={};let n=0,a=0;for(const t of this.bindings.values())for(const i of t.entries)e[i.capName]=(e[i.capName]??0)+1;for(const e of this.devices.values())t[e.addonId]=(t[e.addonId]??0)+1,i[e.type]=(i[e.type]??0)+1,e.online?n++:a++;return{totalDevices:this.bindings.size,online:n,offline:a,byCap:e,byAddon:t,byType:i,statedDevices:this.stateMirror.size}}dump(e){const t=e=>{const t=this.devices.get(e)??null,i=this.bindings.get(e)??null,n={},a=this.stateMirror.get(e);if(a)for(const[e,t]of a)n[e]=Object.assign({},t);return{deviceId:e,info:t,binding:i?Object.assign({},i,{entries:i.entries.map(e=>Object.assign({},e))}):null,state:n}};if(void 0!==e)return t(e);const i=[];for(const e of this.bindings.keys())i.push(t(e));return i}getRawMirror(){return this.stateMirror}getSystemState(){const e=new Map;for(const[t,i]of this.stateMirror){const n=new Map;for(const[e,t]of i)n.set(e,Object.assign({},t));e.set(t,n)}return e}subscribeBus(){if(!this.api.live?.onEvent)return;const e=this.api.live.onEvent;this.bridges.push(e.subscribe({category:"device.state-changed"},{onData:e=>{const t=e.data;t&&"number"==typeof t.deviceId&&"string"==typeof t.capName&&this.applyStateUpdate(t.deviceId,t.capName,t.slice)}})),this.bridges.push(e.subscribe({category:"capability.binding-changed"},{onData:e=>{const t=e.data,i="number"==typeof t?.deviceId?t.deviceId:"device"===t?.source?.type&&"number"==typeof t.source.id?t.source.id:null;null!==i&&this.refreshBinding(i)}})),this.bridges.push(e.subscribe({category:"device.registered"},{onData:e=>{const t=e.data;"number"==typeof t?.deviceId&&this.refreshDeviceMetadata(t.deviceId,"added")}})),this.bridges.push(e.subscribe({category:"device.unregistered"},{onData:e=>{const t=e.data;"number"==typeof t?.deviceId&&this.applyDeviceRemoval(t.deviceId)}})),this.bridges.push(e.subscribe({category:"device.updated"},{onData:e=>{const t=e.data;"number"==typeof t?.deviceId&&this.refreshDeviceMetadata(t.deviceId,"updated")}}))}applyStateUpdate(e,t,i){let n=this.stateMirror.get(e);n||(n=new Map,this.stateMirror.set(e,n)),void 0===i?n.delete(t):n.set(t,i);const a=`${e}:${t}`,r=this.handleListeners.get(a);if(r)for(const e of r)try{e(i)}catch{}for(const n of this.globalStateListeners)try{n(e,t,i)}catch{}const o=this.capListeners.get(t);if(o)for(const t of o)try{t(e,i)}catch{}const s=this.deviceListeners.get(e);if(s)for(const n of s)try{n(e,t,i)}catch{}}applyDeviceRemoval(e){const t=this.devices.get(e)??null;this.bindings.delete(e),this.devices.delete(e),this.stateMirror.delete(e);for(const i of this.removedListeners)try{i(e,t)}catch{}}async refreshBinding(e){try{const t=await this.api.deviceManager.getBindings.query({deviceId:e});if(t.entries.length>0)return void this.bindings.set(e,t);if(null===await this.api.deviceManager.getDevice.query({deviceId:e}))return void this.applyDeviceRemoval(e);this.bindings.set(e,t)}catch{}}async refreshDeviceMetadata(e,t){try{const i=await this.api.deviceManager.getDevice.query({deviceId:e});if(!i)return;const n=!this.devices.has(e);if(this.devices.set(e,i),"added"===t&&n){await this.refreshBinding(e);for(const t of this.addedListeners)try{t(e,i)}catch{}}}catch{}}};function hn(e,t){return Array.isArray(t)?t.includes(e):e===t}function Sn(e){return Array.isArray(e)?e:[e]}function kn(e,t){return"string"==typeof t?e===t:t instanceof RegExp?t.test(e):"exact"in t?e===t.exact:"contains"in t&&e.toLowerCase().includes(t.contains.toLowerCase())}function qn(e){const t=e;function i(e,i,n,a,r){const o=t[e]?.[i];if(!o)throw new Error(`SystemProxy: api has no '${e}.${i}'`);const s=o;return"mutation"===n?s.mutate(a):"subscription"===n?s.subscribe(a,r):s.query(a)}return{addonPages:{listPages:e=>i("addonPages","listPages","query",e)},addons:{list:e=>i("addons","list","query",e),getLogs:e=>i("addons","getLogs","query",e),listPackages:e=>i("addons","listPackages","query",e),installPackage:e=>i("addons","installPackage","mutation",e),installFromWorkspace:e=>i("addons","installFromWorkspace","mutation",e),isWorkspaceAvailable:e=>i("addons","isWorkspaceAvailable","query",e),listWorkspacePackages:e=>i("addons","listWorkspacePackages","query",e),uninstallPackage:e=>i("addons","uninstallPackage","mutation",e),reloadPackages:e=>i("addons","reloadPackages","mutation",e),searchAvailable:e=>i("addons","searchAvailable","query",e),listUpdates:e=>i("addons","listUpdates","query",e),updatePackage:e=>i("addons","updatePackage","mutation",e),rollbackPackage:e=>i("addons","rollbackPackage","mutation",e),forceRefresh:e=>i("addons","forceRefresh","mutation",e),restartServer:e=>i("addons","restartServer","mutation",e),getLastRestart:e=>i("addons","getLastRestart","query",e),listFrameworkPackages:e=>i("addons","listFrameworkPackages","query",e),listCapabilityProviders:e=>i("addons","listCapabilityProviders","query",e),setCapabilityProviderEnabled:e=>i("addons","setCapabilityProviderEnabled","mutation",e),getVersions:e=>i("addons","getVersions","query",e),restartAddon:e=>i("addons","restartAddon","mutation",e),retryLoad:e=>i("addons","retryLoad","mutation",e),getAutoUpdateSettings:e=>i("addons","getAutoUpdateSettings","query",e),setAutoUpdateSettings:e=>i("addons","setAutoUpdateSettings","mutation",e),getAddonAutoUpdate:e=>i("addons","getAddonAutoUpdate","query",e),setAddonAutoUpdate:e=>i("addons","setAddonAutoUpdate","mutation",e),applyAutoUpdateToAll:e=>i("addons","applyAutoUpdateToAll","mutation",e),custom:e=>i("addons","custom","mutation",e),startJob:e=>i("addons","startJob","mutation",e),getJob:e=>i("addons","getJob","query",e),listJobs:e=>i("addons","listJobs","query",e),cancelJob:e=>i("addons","cancelJob","mutation",e),onAddonLogs:(e,t)=>i("addons","onAddonLogs","subscription",e,t)},addonSettings:{getGlobalSettings:e=>i("addonSettings","getGlobalSettings","query",e),updateGlobalSettings:e=>i("addonSettings","updateGlobalSettings","mutation",e),getIntegrationSettings:e=>i("addonSettings","getIntegrationSettings","query",e)},addonWidgets:{listWidgets:e=>i("addonWidgets","listWidgets","query",e)},alerts:{emit:e=>i("alerts","emit","mutation",e),update:e=>i("alerts","update","mutation",e),list:e=>i("alerts","list","query",e),getUnreadCount:e=>i("alerts","getUnreadCount","query",e),markRead:e=>i("alerts","markRead","mutation",e),markAllRead:e=>i("alerts","markAllRead","mutation",e),dismiss:e=>i("alerts","dismiss","mutation",e)},audioAnalyzer:{analyseChunk:e=>i("audioAnalyzer","analyseChunk","mutation",e),classify:e=>i("audioAnalyzer","classify","query",e),attachDevice:e=>i("audioAnalyzer","attachDevice","mutation",e),isReady:e=>i("audioAnalyzer","isReady","query",e),dispose:e=>i("audioAnalyzer","dispose","mutation",e),reprobeAudioEngine:e=>i("audioAnalyzer","reprobeAudioEngine","mutation",e)},audioCodec:{listSupportedCodecs:e=>i("audioCodec","listSupportedCodecs","query",e),canHandle:e=>i("audioCodec","canHandle","query",e),createDecodeSession:e=>i("audioCodec","createDecodeSession","mutation",e),createEncodeSession:e=>i("audioCodec","createEncodeSession","mutation",e),closeSession:e=>i("audioCodec","closeSession","mutation",e),pushEncodedFrame:e=>i("audioCodec","pushEncodedFrame","mutation",e),pullPcm:e=>i("audioCodec","pullPcm","query",e),pushPcm:e=>i("audioCodec","pushPcm","mutation",e),pullEncoded:e=>i("audioCodec","pullEncoded","query",e),flushEncode:e=>i("audioCodec","flushEncode","mutation",e),listActiveSessions:e=>i("audioCodec","listActiveSessions","query",e)},backup:{listDestinations:e=>i("backup","listDestinations","query",e),trigger:e=>i("backup","trigger","mutation",e),listRuns:e=>i("backup","listRuns","query",e),cancel:e=>i("backup","cancel","mutation",e),list:e=>i("backup","list","query",e),listLocations:e=>i("backup","listLocations","query",e),getEntries:e=>i("backup","getEntries","query",e),restore:e=>i("backup","restore","mutation",e),delete:e=>i("backup","delete","mutation",e),listArchives:e=>i("backup","listArchives","query",e),upsertDestinationPolicy:e=>i("backup","upsertDestinationPolicy","mutation",e),previewSchedule:e=>i("backup","previewSchedule","query",e),listSchedules:e=>i("backup","listSchedules","query",e),upsertSchedule:e=>i("backup","upsertSchedule","mutation",e),deleteSchedule:e=>i("backup","deleteSchedule","mutation",e)},broker:{list:e=>i("broker","list","query",e),get:e=>i("broker","get","query",e),listProviders:e=>i("broker","listProviders","query",e),add:e=>i("broker","add","mutation",e),remove:e=>i("broker","remove","mutation",e),testConnection:e=>i("broker","testConnection","mutation",e),getSettings:e=>i("broker","getSettings","query",e),setSettings:e=>i("broker","setSettings","mutation",e),getBrokerConfig:e=>i("broker","getBrokerConfig","query",e),getSettingsSchema:e=>i("broker","getSettingsSchema","query",e),testSettings:e=>i("broker","testSettings","mutation",e),publish:e=>i("broker","publish","mutation",e),subscribe:e=>i("broker","subscribe","mutation",e),unsubscribe:e=>i("broker","unsubscribe","mutation",e),getState:e=>i("broker","getState","query",e),getStatus:e=>i("broker","getStatus","query",e)},calendars:{listCalendars:e=>i("calendars","listCalendars","query",e),listEvents:e=>i("calendars","listEvents","query",e),getPreferences:e=>i("calendars","getPreferences","query",e),setCalendarPreference:e=>i("calendars","setCalendarPreference","mutation",e)},connectionTest:{testSettings:e=>i("connectionTest","testSettings","mutation",e),describeTest:e=>i("connectionTest","describeTest","query",e)},coreBlocks:{list:e=>i("coreBlocks","list","query",e),get:e=>i("coreBlocks","get","query",e),create:e=>i("coreBlocks","create","mutation",e),update:e=>i("coreBlocks","update","mutation",e),delete:e=>i("coreBlocks","delete","mutation",e),setEnabled:e=>i("coreBlocks","setEnabled","mutation",e),restart:e=>i("coreBlocks","restart","mutation",e),compile:e=>i("coreBlocks","compile","mutation",e),getBlockSettings:e=>i("coreBlocks","getBlockSettings","query",e),updateBlockSettings:e=>i("coreBlocks","updateBlockSettings","mutation",e),getTypeDefs:e=>i("coreBlocks","getTypeDefs","query",e),createComposition:e=>i("coreBlocks","createComposition","mutation",e),updateComposition:e=>i("coreBlocks","updateComposition","mutation",e),getComposition:e=>i("coreBlocks","getComposition","query",e),listCompositions:e=>i("coreBlocks","listCompositions","query",e),getCustomization:e=>i("coreBlocks","getCustomization","query",e),listComposableCaps:e=>i("coreBlocks","listComposableCaps","query",e),validateComposition:e=>i("coreBlocks","validateComposition","mutation",e)},decoder:{supportsCodec:e=>i("decoder","supportsCodec","query",e),getInfo:e=>i("decoder","getInfo","query",e),createSession:e=>i("decoder","createSession","query",e),destroySession:e=>i("decoder","destroySession","query",e),pushPacket:e=>i("decoder","pushPacket","query",e),openStream:e=>i("decoder","openStream","query",e),pullFrames:e=>i("decoder","pullFrames","query",e),pullHandles:e=>i("decoder","pullHandles","query",e),getFrame:e=>i("decoder","getFrame","query",e),getShmStats:e=>i("decoder","getShmStats","query",e),updateConfig:e=>i("decoder","updateConfig","query",e),getStats:e=>i("decoder","getStats","query",e),listActiveSessions:e=>i("decoder","listActiveSessions","query",e),reprobeHwaccel:e=>i("decoder","reprobeHwaccel","mutation",e)},deviceAdoption:{listCandidateFilters:e=>i("deviceAdoption","listCandidateFilters","query",e),listCandidates:e=>i("deviceAdoption","listCandidates","query",e),getCandidate:e=>i("deviceAdoption","getCandidate","query",e),refresh:e=>i("deviceAdoption","refresh","mutation",e),adopt:e=>i("deviceAdoption","adopt","mutation",e),release:e=>i("deviceAdoption","release","mutation",e),resync:e=>i("deviceAdoption","resync","mutation",e)},deviceExport:{getStatus:e=>i("deviceExport","getStatus","query",e),listSupportedDeviceKinds:e=>i("deviceExport","listSupportedDeviceKinds","query",e),listExposedDevices:e=>i("deviceExport","listExposedDevices","query",e),exposeDevice:e=>i("deviceExport","exposeDevice","mutation",e),unexposeDevice:e=>i("deviceExport","unexposeDevice","mutation",e)},deviceManager:{allocateDeviceId:e=>i("deviceManager","allocateDeviceId","mutation",e),migrateDevice:e=>i("deviceManager","migrateDevice","mutation",e),registerDevice:e=>i("deviceManager","registerDevice","mutation",e),removeDevice:e=>i("deviceManager","removeDevice","mutation",e),persistConfig:e=>i("deviceManager","persistConfig","mutation",e),getRoleDisplayDefaults:e=>i("deviceManager","getRoleDisplayDefaults","query",e),setRoleDisplayDefaults:e=>i("deviceManager","setRoleDisplayDefaults","mutation",e),listLocations:e=>i("deviceManager","listLocations","query",e),addLocation:e=>i("deviceManager","addLocation","mutation",e),removeLocation:e=>i("deviceManager","removeLocation","mutation",e),renameLocation:e=>i("deviceManager","renameLocation","mutation",e),listLocationIcons:e=>i("deviceManager","listLocationIcons","query",e),setLocationIcon:e=>i("deviceManager","setLocationIcon","mutation",e),listLocationDescriptions:e=>i("deviceManager","listLocationDescriptions","query",e),setLocationDescription:e=>i("deviceManager","setLocationDescription","mutation",e),listSiteZones:e=>i("deviceManager","listSiteZones","query",e),setSiteZone:e=>i("deviceManager","setSiteZone","mutation",e),removeSiteZone:e=>i("deviceManager","removeSiteZone","mutation",e),renameSiteZone:e=>i("deviceManager","renameSiteZone","mutation",e),setLocationZone:e=>i("deviceManager","setLocationZone","mutation",e),listPersistedByAddon:e=>i("deviceManager","listPersistedByAddon","query",e),listAll:e=>i("deviceManager","listAll","query",e),getChildren:e=>i("deviceManager","getChildren","query",e),getChildrenBatch:e=>i("deviceManager","getChildrenBatch","query",e),getLinkedDevicesBatch:e=>i("deviceManager","getLinkedDevicesBatch","query",e),removeByIntegration:e=>i("deviceManager","removeByIntegration","mutation",e),getBindingsBatch:e=>i("deviceManager","getBindingsBatch","query",e),getAllBindings:e=>i("deviceManager","getAllBindings","query",e),listDeviceIdsByCaps:e=>i("deviceManager","listDeviceIdsByCaps","query",e),listWrappersForCap:e=>i("deviceManager","listWrappersForCap","query",e),listBindableCapsForDeviceType:e=>i("deviceManager","listBindableCapsForDeviceType","query",e),discoverDevices:e=>i("deviceManager","discoverDevices","mutation",e),adoptDevice:e=>i("deviceManager","adoptDevice","mutation",e),getCreationSchema:e=>i("deviceManager","getCreationSchema","query",e),createDevice:e=>i("deviceManager","createDevice","mutation",e),testCreationField:e=>i("deviceManager","testCreationField","mutation",e),adoptionListCandidateFilters:e=>i("deviceManager","adoptionListCandidateFilters","query",e),adoptionListCandidates:e=>i("deviceManager","adoptionListCandidates","query",e),adoptionRefresh:e=>i("deviceManager","adoptionRefresh","mutation",e),adoptionAdopt:e=>i("deviceManager","adoptionAdopt","mutation",e),adoptionRelease:e=>i("deviceManager","adoptionRelease","mutation",e),adoptionStartJob:e=>i("deviceManager","adoptionStartJob","mutation",e),adoptionListJobs:e=>i("deviceManager","adoptionListJobs","query",e),adoptionCancelJob:e=>i("deviceManager","adoptionCancelJob","mutation",e),adoptionResync:e=>i("deviceManager","adoptionResync","mutation",e),discoveryProviders:e=>i("deviceManager","discoveryProviders","query",e),discoverAllProviders:e=>i("deviceManager","discoverAllProviders","mutation",e),discoverProvider:e=>i("deviceManager","discoverProvider","mutation",e),providerCreationType:e=>i("deviceManager","providerCreationType","query",e),providerDiscoveryParamsSchema:e=>i("deviceManager","providerDiscoveryParamsSchema","query",e),getDeviceStatusAggregateBatch:e=>i("deviceManager","getDeviceStatusAggregateBatch","query",e)},deviceProvider:{start:e=>i("deviceProvider","start","mutation",e),stop:e=>i("deviceProvider","stop","mutation",e),getStatus:e=>i("deviceProvider","getStatus","query",e),getDevices:e=>i("deviceProvider","getDevices","query",e),reloadDevice:e=>i("deviceProvider","reloadDevice","mutation",e),supportsDiscovery:e=>i("deviceProvider","supportsDiscovery","query",e),discoverDevices:e=>i("deviceProvider","discoverDevices","mutation",e),getDiscoveryParamsSchema:e=>i("deviceProvider","getDiscoveryParamsSchema","query",e),getManualCreationType:e=>i("deviceProvider","getManualCreationType","query",e),adoptDiscoveredDevice:e=>i("deviceProvider","adoptDiscoveredDevice","mutation",e),supportsManualCreation:e=>i("deviceProvider","supportsManualCreation","query",e),getChildCreationSchema:e=>i("deviceProvider","getChildCreationSchema","query",e),createDevice:e=>i("deviceProvider","createDevice","mutation",e),testCreationField:e=>i("deviceProvider","testCreationField","mutation",e)},deviceState:{getAllSnapshots:e=>i("deviceState","getAllSnapshots","query",e),listClaims:e=>i("deviceState","listClaims","query",e)},faceGallery:{listIdentities:e=>i("faceGallery","listIdentities","query",e),createIdentity:e=>i("faceGallery","createIdentity","mutation",e),renameIdentity:e=>i("faceGallery","renameIdentity","mutation",e),deleteIdentity:e=>i("faceGallery","deleteIdentity","mutation",e),listIdentitySamples:e=>i("faceGallery","listIdentitySamples","query",e),auditIdentitySamples:e=>i("faceGallery","auditIdentitySamples","query",e),removeSample:e=>i("faceGallery","removeSample","mutation",e),getFaceMedia:e=>i("faceGallery","getFaceMedia","query",e),assignFace:e=>i("faceGallery","assignFace","mutation",e),unassignFace:e=>i("faceGallery","unassignFace","mutation",e),deleteFace:e=>i("faceGallery","deleteFace","mutation",e),assignFaces:e=>i("faceGallery","assignFaces","mutation",e),unassignFaces:e=>i("faceGallery","unassignFaces","mutation",e),suggestFaceClusters:e=>i("faceGallery","suggestFaceClusters","query",e)},integrations:{list:e=>i("integrations","list","query",e),get:e=>i("integrations","get","query",e),getByAddonId:e=>i("integrations","getByAddonId","query",e),create:e=>i("integrations","create","mutation",e),update:e=>i("integrations","update","mutation",e),delete:e=>i("integrations","delete","mutation",e),getSettings:e=>i("integrations","getSettings","query",e),setSettings:e=>i("integrations","setSettings","mutation",e),getAvailableTypes:e=>i("integrations","getAvailableTypes","query",e),testConnection:e=>i("integrations","testConnection","mutation",e)},llm:{generate:e=>i("llm","generate","mutation",e),generateVision:e=>i("llm","generateVision","mutation",e),cancel:e=>i("llm","cancel","mutation",e),listProfileKinds:e=>i("llm","listProfileKinds","query",e),listProfiles:e=>i("llm","listProfiles","query",e),upsertProfile:e=>i("llm","upsertProfile","mutation",e),deleteProfile:e=>i("llm","deleteProfile","mutation",e),testProfile:e=>i("llm","testProfile","mutation",e),listModels:e=>i("llm","listModels","query",e),getDefaults:e=>i("llm","getDefaults","query",e),setDefault:e=>i("llm","setDefault","mutation",e),getUsage:e=>i("llm","getUsage","query",e),listModelCatalog:e=>i("llm","listModelCatalog","query",e),listRuntimeNodes:e=>i("llm","listRuntimeNodes","query",e),listNodeModels:e=>i("llm","listNodeModels","query",e),resolveModelRef:e=>i("llm","resolveModelRef","mutation",e),installModel:e=>i("llm","installModel","mutation",e),deleteModel:e=>i("llm","deleteModel","mutation",e),getRuntimeStatus:e=>i("llm","getRuntimeStatus","query",e),startRuntime:e=>i("llm","startRuntime","mutation",e),stopRuntime:e=>i("llm","stopRuntime","mutation",e)},localNetwork:{list:e=>i("localNetwork","list","query",e),getPreferred:e=>i("localNetwork","getPreferred","query",e),getConnectionEndpoints:e=>i("localNetwork","getConnectionEndpoints","query",e),getNotificationEndpoint:e=>i("localNetwork","getNotificationEndpoint","query",e),setNotificationEndpoint:e=>i("localNetwork","setNotificationEndpoint","mutation",e),getViewerEndpoints:e=>i("localNetwork","getViewerEndpoints","query",e),setViewerEndpoints:e=>i("localNetwork","setViewerEndpoints","mutation",e),getAddresses:e=>i("localNetwork","getAddresses","query",e),addCustomAddress:e=>i("localNetwork","addCustomAddress","mutation",e),removeCustomAddress:e=>i("localNetwork","removeCustomAddress","mutation",e),setAddressRole:e=>i("localNetwork","setAddressRole","mutation",e),getHubAddresses:e=>i("localNetwork","getHubAddresses","query",e),getAllowedAddresses:e=>i("localNetwork","getAllowedAddresses","query",e),setAllowedAddresses:e=>i("localNetwork","setAllowedAddresses","mutation",e),resetAllowlistToBestMatch:e=>i("localNetwork","resetAllowlistToBestMatch","mutation",e),getTlsStatus:e=>i("localNetwork","getTlsStatus","query",e),regenerateCertificate:e=>i("localNetwork","regenerateCertificate","mutation",e),uploadCertificate:e=>i("localNetwork","uploadCertificate","mutation",e),downloadCa:e=>i("localNetwork","downloadCa","query",e),revertToGeneratedCertificate:e=>i("localNetwork","revertToGeneratedCertificate","mutation",e)},meshNetwork:{getStatus:e=>i("meshNetwork","getStatus","query",e),join:e=>i("meshNetwork","join","mutation",e),startLogin:e=>i("meshNetwork","startLogin","mutation",e),leave:e=>i("meshNetwork","leave","mutation",e),logout:e=>i("meshNetwork","logout","mutation",e),listPeers:e=>i("meshNetwork","listPeers","query",e),testConnection:e=>i("meshNetwork","testConnection","mutation",e)},metricsProvider:{collectSnapshot:e=>i("metricsProvider","collectSnapshot","query",e),getCached:e=>i("metricsProvider","getCached","query",e),getCurrent:e=>i("metricsProvider","getCurrent","query",e),getDiskSpace:e=>i("metricsProvider","getDiskSpace","query",e),getGpuInfo:e=>i("metricsProvider","getGpuInfo","query",e),getCpuTemperature:e=>i("metricsProvider","getCpuTemperature","query",e),getProcessStats:e=>i("metricsProvider","getProcessStats","query",e),listAddonInstances:e=>i("metricsProvider","listAddonInstances","query",e),getAddonStats:e=>i("metricsProvider","getAddonStats","query",e),listNodeProcesses:e=>i("metricsProvider","listNodeProcesses","query",e),getLoadSeries:e=>i("metricsProvider","getLoadSeries","query",e)},mqttBroker:{listBrokers:e=>i("mqttBroker","listBrokers","query",e),getBrokerConfig:e=>i("mqttBroker","getBrokerConfig","query",e),addBroker:e=>i("mqttBroker","addBroker","mutation",e),removeBroker:e=>i("mqttBroker","removeBroker","mutation",e),testConnection:e=>i("mqttBroker","testConnection","mutation",e),startEmbeddedBroker:e=>i("mqttBroker","startEmbeddedBroker","mutation",e),stopEmbeddedBroker:e=>i("mqttBroker","stopEmbeddedBroker","mutation",e),getStatus:e=>i("mqttBroker","getStatus","query",e)},networkAccess:{start:e=>i("networkAccess","start","mutation",e),stop:e=>i("networkAccess","stop","mutation",e),getEndpoint:e=>i("networkAccess","getEndpoint","query",e),getStatus:e=>i("networkAccess","getStatus","query",e),listEndpoints:e=>i("networkAccess","listEndpoints","query",e)},networkQuality:{getAllStats:e=>i("networkQuality","getAllStats","query",e)},nodes:{topology:e=>i("nodes","topology","query",e),directory:e=>i("nodes","directory","query",e),deployAddon:e=>i("nodes","deployAddon","mutation",e),undeployAddon:e=>i("nodes","undeployAddon","mutation",e),restartAddon:e=>i("nodes","restartAddon","mutation",e),restartProcess:e=>i("nodes","restartProcess","mutation",e),restartNode:e=>i("nodes","restartNode","mutation",e),shutdownNode:e=>i("nodes","shutdownNode","mutation",e),renameNode:e=>i("nodes","renameNode","mutation",e),clusterAddonStatus:e=>i("nodes","clusterAddonStatus","query",e),getCapUsageGraph:e=>i("nodes","getCapUsageGraph","query",e),getNodeAddons:e=>i("nodes","getNodeAddons","query",e),setProcessLogLevel:e=>i("nodes","setProcessLogLevel","mutation",e),executeQuery:e=>i("nodes","executeQuery","mutation",e)},notificationOutput:{listTargetKinds:e=>i("notificationOutput","listTargetKinds","query",e),listTargets:e=>i("notificationOutput","listTargets","query",e),getTarget:e=>i("notificationOutput","getTarget","query",e),discoverTargets:e=>i("notificationOutput","discoverTargets","query",e),probeTargetConfig:e=>i("notificationOutput","probeTargetConfig","mutation",e),send:e=>i("notificationOutput","send","mutation",e),testTarget:e=>i("notificationOutput","testTarget","mutation",e),upsertTarget:e=>i("notificationOutput","upsertTarget","mutation",e),deleteTarget:e=>i("notificationOutput","deleteTarget","mutation",e),setTargetEnabled:e=>i("notificationOutput","setTargetEnabled","mutation",e)},notificationRules:{listRules:e=>i("notificationRules","listRules","query",e),getRule:e=>i("notificationRules","getRule","query",e),createRule:e=>i("notificationRules","createRule","mutation",e),updateRule:e=>i("notificationRules","updateRule","mutation",e),deleteRule:e=>i("notificationRules","deleteRule","mutation",e),setRuleEnabled:e=>i("notificationRules","setRuleEnabled","mutation",e),listSequences:e=>i("notificationRules","listSequences","query",e),getSequence:e=>i("notificationRules","getSequence","query",e),createSequence:e=>i("notificationRules","createSequence","mutation",e),updateSequence:e=>i("notificationRules","updateSequence","mutation",e),deleteSequence:e=>i("notificationRules","deleteSequence","mutation",e),getClipRetentionAsks:e=>i("notificationRules","getClipRetentionAsks","query",e),listDeviceMutes:e=>i("notificationRules","listDeviceMutes","query",e),testRule:e=>i("notificationRules","testRule","mutation",e),previewStateSummary:e=>i("notificationRules","previewStateSummary","mutation",e),getConditionCatalog:e=>i("notificationRules","getConditionCatalog","query",e),getTemplateCatalog:e=>i("notificationRules","getTemplateCatalog","query",e),previewTemplate:e=>i("notificationRules","previewTemplate","mutation",e),getHistory:e=>i("notificationRules","getHistory","query",e),getRuleLastRuns:e=>i("notificationRules","getRuleLastRuns","query",e),resolveArtifactUrl:e=>i("notificationRules","resolveArtifactUrl","query",e),listSnoozes:e=>i("notificationRules","listSnoozes","query",e),createSnooze:e=>i("notificationRules","createSnooze","mutation",e),cancelSnooze:e=>i("notificationRules","cancelSnooze","mutation",e),getAlarmConfig:e=>i("notificationRules","getAlarmConfig","query",e),setAlarmConfig:e=>i("notificationRules","setAlarmConfig","mutation",e),createAlarmProfile:e=>i("notificationRules","createAlarmProfile","mutation",e),renameAlarmProfile:e=>i("notificationRules","renameAlarmProfile","mutation",e),deleteAlarmProfile:e=>i("notificationRules","deleteAlarmProfile","mutation",e),activateAlarmProfile:e=>i("notificationRules","activateAlarmProfile","mutation",e),getAlarmSensors:e=>i("notificationRules","getAlarmSensors","query",e)},osdManager:{getConditionSupport:e=>i("osdManager","getConditionSupport","query",e),copyDeviceConfiguration:e=>i("osdManager","copyDeviceConfiguration","mutation",e),listTemplates:e=>i("osdManager","listTemplates","query",e),upsertTemplate:e=>i("osdManager","upsertTemplate","mutation",e),deleteTemplate:e=>i("osdManager","deleteTemplate","mutation",e)},pipelineExecutor:{getAvailableEngines:e=>i("pipelineExecutor","getAvailableEngines","query",e),getSelectedEngine:e=>i("pipelineExecutor","getSelectedEngine","query",e),getDefaultSteps:e=>i("pipelineExecutor","getDefaultSteps","query",e),getEngineProvisioning:e=>i("pipelineExecutor","getEngineProvisioning","query",e),getVideoPipelineSteps:e=>i("pipelineExecutor","getVideoPipelineSteps","query",e),setVideoPipelineSteps:e=>i("pipelineExecutor","setVideoPipelineSteps","mutation",e),clearDeviceOverrides:e=>i("pipelineExecutor","clearDeviceOverrides","mutation",e),getInferenceDeviceHealth:e=>i("pipelineExecutor","getInferenceDeviceHealth","query",e),rearmInferenceDevice:e=>i("pipelineExecutor","rearmInferenceDevice","mutation",e),getSchema:e=>i("pipelineExecutor","getSchema","query",e),getGlobalSteps:e=>i("pipelineExecutor","getGlobalSteps","query",e),getGlobalPipelineConfig:e=>i("pipelineExecutor","getGlobalPipelineConfig","query",e),getOrchestratorConfigSchema:e=>i("pipelineExecutor","getOrchestratorConfigSchema","query",e),validatePipeline:e=>i("pipelineExecutor","validatePipeline","query",e),listTemplates:e=>i("pipelineExecutor","listTemplates","query",e),saveTemplate:e=>i("pipelineExecutor","saveTemplate","mutation",e),updateTemplate:e=>i("pipelineExecutor","updateTemplate","mutation",e),deleteTemplate:e=>i("pipelineExecutor","deleteTemplate","mutation",e),getCapabilities:e=>i("pipelineExecutor","getCapabilities","query",e),getAddonModels:e=>i("pipelineExecutor","getAddonModels","query",e),downloadModel:e=>i("pipelineExecutor","downloadModel","mutation",e),deleteModel:e=>i("pipelineExecutor","deleteModel","mutation",e),cacheFrameInPool:e=>i("pipelineExecutor","cacheFrameInPool","mutation",e),inferCached:e=>i("pipelineExecutor","inferCached","mutation",e),uncacheFrame:e=>i("pipelineExecutor","uncacheFrame","mutation",e),getEffectiveTuning:e=>i("pipelineExecutor","getEffectiveTuning","query",e),listLoadedEngines:e=>i("pipelineExecutor","listLoadedEngines","query",e),spinEngine:e=>i("pipelineExecutor","spinEngine","mutation",e),killEngine:e=>i("pipelineExecutor","killEngine","mutation",e),listReferenceImages:e=>i("pipelineExecutor","listReferenceImages","query",e),getReferenceImage:e=>i("pipelineExecutor","getReferenceImage","query",e),getReferenceAudioFiles:e=>i("pipelineExecutor","getReferenceAudioFiles","query",e),getReferenceAudio:e=>i("pipelineExecutor","getReferenceAudio","query",e),getAudioCapabilities:e=>i("pipelineExecutor","getAudioCapabilities","query",e),runAudioTest:e=>i("pipelineExecutor","runAudioTest","mutation",e),getDetectionConfigSchema:e=>i("pipelineExecutor","getDetectionConfigSchema","query",e)},pipelineOrchestrator:{requestOccupancyLook:e=>i("pipelineOrchestrator","requestOccupancyLook","mutation",e),pauseForStorageMigration:e=>i("pipelineOrchestrator","pauseForStorageMigration","mutation",e),resumeForStorageMigration:e=>i("pipelineOrchestrator","resumeForStorageMigration","mutation",e),rebalance:e=>i("pipelineOrchestrator","rebalance","mutation",e),getPipelineAssignments:e=>i("pipelineOrchestrator","getPipelineAssignments","query",e),getAgentLoad:e=>i("pipelineOrchestrator","getAgentLoad","query",e),getClusterModelChoice:e=>i("pipelineOrchestrator","getClusterModelChoice","query",e),getGlobalMetrics:e=>i("pipelineOrchestrator","getGlobalMetrics","query",e),getCapabilityBindings:e=>i("pipelineOrchestrator","getCapabilityBindings","query",e),setCapabilityBinding:e=>i("pipelineOrchestrator","setCapabilityBinding","mutation",e),getIngestOwner:e=>i("pipelineOrchestrator","getIngestOwner","query",e),getAudioNodeLoad:e=>i("pipelineOrchestrator","getAudioNodeLoad","query",e),getAudioAssignments:e=>i("pipelineOrchestrator","getAudioAssignments","query",e),getAgentSettings:e=>i("pipelineOrchestrator","getAgentSettings","query",e),listAgentSettings:e=>i("pipelineOrchestrator","listAgentSettings","query",e),removeAgentSettings:e=>i("pipelineOrchestrator","removeAgentSettings","mutation",e),setAgentMaxCameras:e=>i("pipelineOrchestrator","setAgentMaxCameras","mutation",e),setAgentDetectWeight:e=>i("pipelineOrchestrator","setAgentDetectWeight","mutation",e),setAgentCapabilities:e=>i("pipelineOrchestrator","setAgentCapabilities","mutation",e),setAgentDecodeLimits:e=>i("pipelineOrchestrator","setAgentDecodeLimits","mutation",e),setAgentReachableHost:e=>i("pipelineOrchestrator","setAgentReachableHost","mutation",e),setAgentInferenceDevices:e=>i("pipelineOrchestrator","setAgentInferenceDevices","mutation",e),getNodeInferenceDevices:e=>i("pipelineOrchestrator","getNodeInferenceDevices","query",e),resetNodePipelineDefaults:e=>i("pipelineOrchestrator","resetNodePipelineDefaults","mutation",e),getCameraStatuses:e=>i("pipelineOrchestrator","getCameraStatuses","query",e),setCameraSensors:e=>i("pipelineOrchestrator","setCameraSensors","mutation",e),reconcileFromDisk:e=>i("pipelineOrchestrator","reconcileFromDisk","mutation",e),getReconcileFromDiskStatus:e=>i("pipelineOrchestrator","getReconcileFromDiskStatus","query",e),listTemplates:e=>i("pipelineOrchestrator","listTemplates","query",e),saveTemplate:e=>i("pipelineOrchestrator","saveTemplate","mutation",e),updateTemplate:e=>i("pipelineOrchestrator","updateTemplate","mutation",e),deleteTemplate:e=>i("pipelineOrchestrator","deleteTemplate","mutation",e)},pipelineRunner:{attachCamera:e=>i("pipelineRunner","attachCamera","mutation",e),reportMotion:e=>i("pipelineRunner","reportMotion","mutation",e),getLocalLoad:e=>i("pipelineRunner","getLocalLoad","query",e),getLocalMetrics:e=>i("pipelineRunner","getLocalMetrics","query",e),getAllCameraMetrics:e=>i("pipelineRunner","getAllCameraMetrics","query",e),getLocalCameras:e=>i("pipelineRunner","getLocalCameras","query",e),getNativeCrop:e=>i("pipelineRunner","getNativeCrop","query",e),runStatelessStep:e=>i("pipelineRunner","runStatelessStep","mutation",e)},plateGallery:{getPlateMedia:e=>i("plateGallery","getPlateMedia","query",e),searchPlates:e=>i("plateGallery","searchPlates","query",e),suggestPlateClusters:e=>i("plateGallery","suggestPlateClusters","query",e),correctPlateText:e=>i("plateGallery","correctPlateText","mutation",e),deletePlate:e=>i("plateGallery","deletePlate","mutation",e),listVehicles:e=>i("plateGallery","listVehicles","query",e),createVehicle:e=>i("plateGallery","createVehicle","mutation",e),renameVehicle:e=>i("plateGallery","renameVehicle","mutation",e),deleteVehicle:e=>i("plateGallery","deleteVehicle","mutation",e),listVehicleSamples:e=>i("plateGallery","listVehicleSamples","query",e),removeVehicleSample:e=>i("plateGallery","removeVehicleSample","mutation",e),assignPlate:e=>i("plateGallery","assignPlate","mutation",e),unassignPlate:e=>i("plateGallery","unassignPlate","mutation",e),assignPlates:e=>i("plateGallery","assignPlates","mutation",e),unassignPlates:e=>i("plateGallery","unassignPlates","mutation",e)},recordingArchive:{getAvailabilityBatch:e=>i("recordingArchive","getAvailabilityBatch","query",e),getDaysWithRecordingsBatch:e=>i("recordingArchive","getDaysWithRecordingsBatch","query",e),getStorageUsage:e=>i("recordingArchive","getStorageUsage","query",e),listOpsLog:e=>i("recordingArchive","listOpsLog","query",e),pauseForStorageMigration:e=>i("recordingArchive","pauseForStorageMigration","mutation",e),resumeForStorageMigration:e=>i("recordingArchive","resumeForStorageMigration","mutation",e),refreshStorageLocationsForMigration:e=>i("recordingArchive","refreshStorageLocationsForMigration","mutation",e),startStorageMigrationMove:e=>i("recordingArchive","startStorageMigrationMove","mutation",e),getStorageMigrationMoveStatus:e=>i("recordingArchive","getStorageMigrationMoveStatus","query",e),cancelStorageMigrationMove:e=>i("recordingArchive","cancelStorageMigrationMove","mutation",e),relocateFootage:e=>i("recordingArchive","relocateFootage","mutation",e),listRelocateJobs:e=>i("recordingArchive","listRelocateJobs","query",e),getRelocateResidue:e=>i("recordingArchive","getRelocateResidue","query",e),reconcileLedgerAgainstDisk:e=>i("recordingArchive","reconcileLedgerAgainstDisk","mutation",e),cancelRelocateJob:e=>i("recordingArchive","cancelRelocateJob","mutation",e),planStorageRebalance:e=>i("recordingArchive","planStorageRebalance","query",e),startStorageRebalance:e=>i("recordingArchive","startStorageRebalance","mutation",e),getPlacement:e=>i("recordingArchive","getPlacement","query",e),setDevicePlacement:e=>i("recordingArchive","setDevicePlacement","mutation",e)},recordingExport:{createExport:e=>i("recordingExport","createExport","mutation",e),getExport:e=>i("recordingExport","getExport","query",e),cancelExport:e=>i("recordingExport","cancelExport","mutation",e),deleteExport:e=>i("recordingExport","deleteExport","mutation",e),getDownloadUrl:e=>i("recordingExport","getDownloadUrl","query",e),readExportBytes:e=>i("recordingExport","readExportBytes","query",e)},serverManagement:{getServerPackageStatus:e=>i("serverManagement","getServerPackageStatus","query",e),checkServerUpdate:e=>i("serverManagement","checkServerUpdate","mutation",e),applyServerUpdate:e=>i("serverManagement","applyServerUpdate","mutation",e),rollbackServerUpdate:e=>i("serverManagement","rollbackServerUpdate","mutation",e),restartServer:e=>i("serverManagement","restartServer","mutation",e)},settingsStore:{get:e=>i("settingsStore","get","query",e),set:e=>i("settingsStore","set","mutation",e),query:e=>i("settingsStore","query","query",e),upsert:e=>i("settingsStore","upsert","mutation",e),insert:e=>i("settingsStore","insert","mutation",e),insertMany:e=>i("settingsStore","insertMany","mutation",e),update:e=>i("settingsStore","update","mutation",e),delete:e=>i("settingsStore","delete","mutation",e),deleteWhere:e=>i("settingsStore","deleteWhere","mutation",e),updateWhere:e=>i("settingsStore","updateWhere","mutation",e),count:e=>i("settingsStore","count","query",e),aggregate:e=>i("settingsStore","aggregate","query",e),histogram:e=>i("settingsStore","histogram","query",e),isEmpty:e=>i("settingsStore","isEmpty","query",e),declareCollection:e=>i("settingsStore","declareCollection","mutation",e)},storage:{resolve:e=>i("storage","resolve","query",e),write:e=>i("storage","write","mutation",e),read:e=>i("storage","read","query",e),exists:e=>i("storage","exists","query",e),list:e=>i("storage","list","query",e),delete:e=>i("storage","delete","mutation",e),getAvailableSpace:e=>i("storage","getAvailableSpace","query",e),beginUpload:e=>i("storage","beginUpload","mutation",e),writeChunk:e=>i("storage","writeChunk","mutation",e),finalizeUpload:e=>i("storage","finalizeUpload","mutation",e),abortUpload:e=>i("storage","abortUpload","mutation",e),beginDownload:e=>i("storage","beginDownload","mutation",e),readChunk:e=>i("storage","readChunk","query",e),endDownload:e=>i("storage","endDownload","mutation",e),listLocations:e=>i("storage","listLocations","query",e),listLocationDeclarations:e=>i("storage","listLocationDeclarations","query",e),upsertLocation:e=>i("storage","upsertLocation","mutation",e),deleteLocation:e=>i("storage","deleteLocation","mutation",e),listDrainProgress:e=>i("storage","listDrainProgress","query",e),testLocation:e=>i("storage","testLocation","query",e),listProviders:e=>i("storage","listProviders","query",e),testConfig:e=>i("storage","testConfig","query",e)},storageMigration:{plan:e=>i("storageMigration","plan","query",e),start:e=>i("storageMigration","start","mutation",e),status:e=>i("storageMigration","status","query",e),cancel:e=>i("storageMigration","cancel","mutation",e),movers:e=>i("storageMigration","movers","query",e),residue:e=>i("storageMigration","residue","query",e),drain:e=>i("storageMigration","drain","mutation",e),cleanupStart:e=>i("storageMigration","cleanupStart","mutation",e),cleanupStatus:e=>i("storageMigration","cleanupStatus","query",e),cleanupCancel:e=>i("storageMigration","cleanupCancel","mutation",e),history:e=>i("storageMigration","history","query",e)},streamBroker:{fetchEventMedia:e=>i("streamBroker","fetchEventMedia","mutation",e),listAllCameraStreams:e=>i("streamBroker","listAllCameraStreams","query",e),listAllProfileSlots:e=>i("streamBroker","listAllProfileSlots","query",e),getBrokerStats:e=>i("streamBroker","getBrokerStats","query",e),probeStream:e=>i("streamBroker","probeStream","mutation",e),listClients:e=>i("streamBroker","listClients","query",e),killClient:e=>i("streamBroker","killClient","mutation",e),getStreamUrl:e=>i("streamBroker","getStreamUrl","query",e),getStreamWithCodec:e=>i("streamBroker","getStreamWithCodec","mutation",e),releaseStreamWithCodec:e=>i("streamBroker","releaseStreamWithCodec","mutation",e),acquireEgressTranscode:e=>i("streamBroker","acquireEgressTranscode","mutation",e),releaseEgressTranscode:e=>i("streamBroker","releaseEgressTranscode","mutation",e),subscribeAudioChunks:e=>i("streamBroker","subscribeAudioChunks","mutation",e),pullAudioChunks:e=>i("streamBroker","pullAudioChunks","query",e),unsubscribeAudioChunks:e=>i("streamBroker","unsubscribeAudioChunks","mutation",e),subscribeFrames:e=>i("streamBroker","subscribeFrames","mutation",e),pullFrameHandles:e=>i("streamBroker","pullFrameHandles","query",e),unsubscribeFrames:e=>i("streamBroker","unsubscribeFrames","mutation",e),setPreBufferDuration:e=>i("streamBroker","setPreBufferDuration","mutation",e),getPreBufferInfo:e=>i("streamBroker","getPreBufferInfo","query",e),getRtspPort:e=>i("streamBroker","getRtspPort","query",e),getAllRtspEntries:e=>i("streamBroker","getAllRtspEntries","query",e),getRtspEntry:e=>i("streamBroker","getRtspEntry","query",e),regenerateRtspToken:e=>i("streamBroker","regenerateRtspToken","mutation",e),setRtspEnabled:e=>i("streamBroker","setRtspEnabled","mutation",e),isRtspEnabled:e=>i("streamBroker","isRtspEnabled","query",e)},system:{info:e=>i("system","info","query",e),health:e=>i("system","health","query",e),featureFlags:e=>i("system","featureFlags","query",e),networkAddresses:e=>i("system","networkAddresses","query",e),getRetentionConfig:e=>i("system","getRetentionConfig","query",e),setRetentionConfig:e=>i("system","setRetentionConfig","mutation",e),forceRetentionCleanup:e=>i("system","forceRetentionCleanup","mutation",e),getSiteLocation:e=>i("system","getSiteLocation","query",e),setSiteLocation:e=>i("system","setSiteLocation","mutation",e),detectSiteLocation:e=>i("system","detectSiteLocation","mutation",e),getRequestCensus:e=>i("system","getRequestCensus","query",e),getLoadContributions:e=>i("system","getLoadContributions","query",e),getFailureContributions:e=>i("system","getFailureContributions","query",e),getLoggingSettings:e=>i("system","getLoggingSettings","query",e),setLoggingSettings:e=>i("system","setLoggingSettings","mutation",e)},terminalSession:{listProfiles:e=>i("terminalSession","listProfiles","query",e),listInstances:e=>i("terminalSession","listInstances","query",e),createInstance:e=>i("terminalSession","createInstance","mutation",e),updateInstance:e=>i("terminalSession","updateInstance","mutation",e),deleteInstance:e=>i("terminalSession","deleteInstance","mutation",e),setInstanceEnabled:e=>i("terminalSession","setInstanceEnabled","mutation",e),listLegacyCameras:e=>i("terminalSession","listLegacyCameras","query",e),adoptLegacyMonitor:e=>i("terminalSession","adoptLegacyMonitor","mutation",e),listSessions:e=>i("terminalSession","listSessions","query",e),openSession:e=>i("terminalSession","openSession","mutation",e),resize:e=>i("terminalSession","resize","mutation",e),pullOutput:e=>i("terminalSession","pullOutput","mutation",e),writeInput:e=>i("terminalSession","writeInput","mutation",e),close:e=>i("terminalSession","close","mutation",e)},toast:{onToast:(e,t)=>i("toast","onToast","subscription",e,t)},turnProvider:{getTurnServers:e=>i("turnProvider","getTurnServers","query",e)},userManagement:{listUsers:e=>i("userManagement","listUsers","query",e),createUser:e=>i("userManagement","createUser","mutation",e),updateUser:e=>i("userManagement","updateUser","mutation",e),deleteUser:e=>i("userManagement","deleteUser","mutation",e),resetPassword:e=>i("userManagement","resetPassword","mutation",e),setUserScopes:e=>i("userManagement","setUserScopes","mutation",e),validateCredentials:e=>i("userManagement","validateCredentials","mutation",e),listApiKeys:e=>i("userManagement","listApiKeys","query",e),createApiKey:e=>i("userManagement","createApiKey","mutation",e),revokeApiKey:e=>i("userManagement","revokeApiKey","mutation",e),validateApiKey:e=>i("userManagement","validateApiKey","mutation",e),createScopedToken:e=>i("userManagement","createScopedToken","mutation",e),revokeScopedToken:e=>i("userManagement","revokeScopedToken","mutation",e),validateScopedToken:e=>i("userManagement","validateScopedToken","query",e),listScopedTokens:e=>i("userManagement","listScopedTokens","query",e),setupTotp:e=>i("userManagement","setupTotp","mutation",e),confirmTotp:e=>i("userManagement","confirmTotp","mutation",e),disableTotp:e=>i("userManagement","disableTotp","mutation",e),getTotpStatus:e=>i("userManagement","getTotpStatus","query",e),verifyTotp:e=>i("userManagement","verifyTotp","mutation",e),oauthIssueCode:e=>i("userManagement","oauthIssueCode","mutation",e),oauthExchangeCode:e=>i("userManagement","oauthExchangeCode","mutation",e),oauthRefresh:e=>i("userManagement","oauthRefresh","mutation",e),oauthVerifyAccessToken:e=>i("userManagement","oauthVerifyAccessToken","query",e),listOauthSessions:e=>i("userManagement","listOauthSessions","query",e),revokeOauthSession:e=>i("userManagement","revokeOauthSession","mutation",e)}}}var An={PCMU:20*Math.log10(4),PCMA:20*Math.log10(8)};var Cn=Math.round(-55+An["PCMU"]),wn=60,Mn=10,Dn=new Set(["classes","classesExclude"]),Pn=new Set(["sensorKinds"]),In=new Set(["occupancy"]);function En(e){return{value:e.kind,label:e.label}}function jn(e){const t=[],i=new Map,n=(e,n)=>{const a=i.get(e);if(void 0!==a)return a;const r={fallbackLabel:n,options:[]};return i.set(e,r),t.push(e),r};for(const t of e){const e=t.parentKind??t.kind,i=n(e,null===t.parentKind?t.label:e);i.options.push(En(t)),null===t.parentKind&&(i.fallbackLabel=t.label)}return t.flatMap(e=>{const t=i.get(e);return void 0===t?[]:[{key:e,fallbackLabel:t.fallbackLabel,options:t.options}]})}function xn(e){const t=[],i=new Map;for(const n of e){const e=n.parentKind??"other",a=i.get(e);void 0===a?(i.set(e,[En(n)]),t.push(e)):a.push(En(n))}return t.flatMap(e=>{const t=i.get(e);return void 0===t?[]:[{key:e,fallbackLabel:e,options:t}]})}function On(e,t){if(!t)return null;if(Dn.has(e)){const e=jn(t.videoClasses);return t.audioKinds.length>0&&e.push({key:"audio",fallbackLabel:"Audio",options:t.audioKinds.map(En)}),e.length>0?{groups:e}:null}if(In.has(e)){const e=t.videoClasses.filter(e=>null===e.parentKind).map(En);return e.length>0?{groups:[{key:"macro",fallbackLabel:"Classes",options:e}]}:null}if(Pn.has(e)){const e=xn(t.labels);return e.length>0?{groups:e}:null}return null}var Tn="audio";function Rn(e){const t=On("classes",e);if(null===t)return null;const i=t.groups.filter(e=>e.key!==Tn);return i.length>0?{groups:i}:null}function Bn(e){const t=new Set;for(const i of e.groups)for(const e of i.options)t.add(e.value);return t}new Set(["devices","classes"]);function Ln(e,t){switch(t){case"deviceIds":return e.startsWith("device-")||e.startsWith("stream-")||"detection-blind"===e||"alarm-triggered"===e;case"deviceTypes":return e.startsWith("device-")||"detection-blind"===e;case"nodeIds":return e.startsWith("node-")||"addon-crash-loop"===e||"addon-update-available"===e||"addon-updated"===e||"server-update-available"===e||"wrapper-update-available"===e||"server-updated"===e;case"packageNames":return e.endsWith("update-available")||"addon-updated"===e||"node-updating"===e||"server-updated"===e;case"consumableLowPercent":return Se.includes(e)}}function Fn(e,t){return e.some(e=>Ln(e,t))}var Nn=["device-events","system","alarm"];var _n=new Map(Object.entries({"device-online":"device-events","device-offline":"device-events","device-disabled":"device-events","device-enabled":"device-events","device-battery-low":"device-events","device-battery-normal":"device-events","device-consumable-low":"device-events","device-consumable-normal":"device-events","device-tank-low":"device-events","device-tank-full":"device-events","device-tank-normal":"device-events","stream-online":"device-events","stream-offline":"device-events","detection-blind":"device-events","node-online":"system","node-offline":"system","node-restarting":"system","node-updating":"system","node-inference-unavailable":"system","addon-crash-loop":"system","addon-update-available":"system","addon-updated":"system","server-update-available":"system","server-updated":"system","wrapper-update-available":"system","backup-completed":"system","export-completed":"system","alarm-triggered":"alarm","alarm-armed":"alarm","alarm-disarmed":"alarm","alarm-arming":"alarm","alarm-arm-refused":"alarm","alarm-pending":"alarm","alarm-rearmed":"alarm","alarm-sensor-bypass":"alarm","alarm-check-failed":"alarm","camera-online":null,"camera-offline":null,"camera-disabled":null,"camera-enabled":null})),Kn={"device-events":["deviceIds","excludeDeviceIds","deviceTypes","consumableLowPercent"],system:["nodeIds","packageNames"],alarm:["deviceIds"]},Un=[{id:"device-state",family:"device-events",label:"Device state",kinds:["device-offline","device-online","device-disabled","device-enabled"]},{id:"streams",family:"device-events",label:"Streams",kinds:["stream-offline","stream-online"]},{id:"battery",family:"device-events",label:"Battery",kinds:["device-battery-low","device-battery-normal"]},{id:"consumables",family:"device-events",label:"Consumables",kinds:["device-consumable-low","device-consumable-normal"]},{id:"tanks",family:"device-events",label:"Tanks",kinds:["device-tank-low","device-tank-full","device-tank-normal"]},{id:"detection-blind",family:"device-events",label:"Detecting nothing",kinds:["detection-blind"]},{id:"nodes",family:"system",label:"Nodes",kinds:["node-offline","node-online","node-restarting","node-inference-unavailable"]},{id:"addons",family:"system",label:"Addons stopped",kinds:["addon-crash-loop"]},{id:"addon-updates",family:"system",label:"Addon updates",kinds:["addon-update-available","addon-updated"]},{id:"updates",family:"system",label:"Server & container updates",kinds:["server-update-available","node-updating","server-updated","wrapper-update-available"]},{id:"backups-exports",family:"system",label:"Backups & exports",kinds:["backup-completed","export-completed"]},{id:"alarm",family:"alarm",label:"Alarm",kinds:ze}];function Gn(e){return Un.filter(t=>t.family===e).flatMap(e=>e.kinds)}function Hn(e){if("object"!=typeof e||null===e||!("kinds"in e))return;const t=e.kinds;return Array.isArray(t)?t.filter(e=>"string"==typeof e):void 0}function Wn(e){const t=new Set;for(const i of e){const e=_n.get(i);if(null==e)return{kind:"mixed"};t.add(e)}const[i]=[...t];return 1===t.size&&void 0!==i?{kind:"family",family:i}:{kind:"mixed"}}var Vn=["device-events","system","alarm","mixed"];function Zn(e){return Vn.some(t=>t===e)}function $n(e){return t=e,Nn.some(e=>e===t)?e:void 0;var t}var Jn="A sound rule fires on what the camera HEARD. Its subject carries no detection, so this condition can never match one \u2014 name the sounds in the Sound condition instead.",Yn="A sound has no position in the frame, so a zone or a drawn polygon can never match it.",Qn=[{kind:"detection",label:"Conditions",excluded:{audio:"A detection rule fires on what the camera SAW. Sounds are a Sound rule of their own \u2014 adding one here turned the rule into a sound rule and dropped every detection condition."},editable:!0,carriesMedia:!0,carriesSubjectCrop:!0},{kind:"sensor",label:"Conditions",excluded:{},editable:!0,carriesMedia:!0,carriesSubjectCrop:!0,blurb:"A doorbell press or a linked sensor changing state. The picture comes from the camera the sensor is attributed to."},{kind:"occupancy",label:"Occupancy",discriminator:"occupancy",excluded:{sensorKinds:"An occupancy edge is not a sensor event: it carries no sensor kind, so this condition can never match one.",eventTypeTokens:"An occupancy edge carries no device event-type token \u2014 that comes from an event-emitter slice, which a count crossing has none of.",sensorTransition:"An occupancy edge is a count crossing, not a sensor reading: it has no raise or clear, so this choice could never narrow it.",source:"An occupancy edge is always produced by the pipeline, so any other source can never match and \u201cpipeline\u201d narrows nothing."},editable:!0,carriesMedia:!0,carriesSubjectCrop:!0,blurb:"Fires when the count in a camera frame or a zone crosses your threshold and holds. Pick the camera first \u2014 the zone list is that camera\u2019s."},{kind:"sound",label:"Sound",discriminator:"audio",excluded:{classes:Jn,classesExclude:Jn,minConfidence:"A sound window\u2019s evidence is a percentage of samples, not a detector score, so a confidence threshold can never be satisfied.",zones:Yn,zonesExclude:Yn,customZones:Yn,crossing:Yn,labelEquals:Jn,identities:Jn,identitiesExclude:Jn,plates:Jn,source:"A confirmed sound window is always stamped as an audio subject, so any other source can never match."},editable:!0,carriesMedia:!0,carriesSubjectCrop:!1,blurb:"Fires on a confirmed sampling window of audio, never on a picture. Name the sounds and/or keep a level threshold \u2014 with neither it can never match.",mediaBlurb:"A sound owns no frame, so the picture is a photograph of the camera taken at the moment of the match \u2014 the whole scene, never a crop. The GIF and the clip are cut around the same instant, from the camera."},{kind:"device-events",label:"Device events",discriminator:"systemEvent",excluded:{},editable:!0,carriesMedia:!1,carriesSubjectCrop:!1,blurb:"A device or its stream going away or coming back, switched off or on, a battery or consumable running low, a camera detecting nothing. There is no frame to attach."},{kind:"system",label:"System events",discriminator:"systemEvent",excluded:{},editable:!0,carriesMedia:!1,carriesSubjectCrop:!1,blurb:"The installation itself: a node leaving, an addon crash-looping, an update available or installed, a backup or an export finishing."},{kind:"alarm",label:"Alarm",discriminator:"systemEvent",excluded:{},editable:!0,carriesMedia:!1,carriesSubjectCrop:!1,blurb:"The alarm panel: refused, arming, armed, entry delay, triggered, re-armed, sensor bypass, disarmed.",mediaBlurb:"An alarm set off by a rule arrives with THAT rule's pictures, combined into one notification. This rule adds none of its own."},{kind:"mixed",label:"To recreate",discriminator:"systemEvent",excluded:{},editable:!1,carriesMedia:!1,carriesSubjectCrop:!1,blurb:"This rule mixes events from more than one family (device events, system, alarm). It keeps firing as it is, but it can no longer be edited: create one rule per family, then delete this one."}];function Xn(e){return Qn.find(t=>t.kind===e)??Qn[0]}function ea(e){return Qn.filter(t=>t.discriminator===e).map(e=>e.kind)}var ta="system-event";function ia(e){return e===ta}function na(e){switch(e){case"sensor":return Ci;case"detection":case"occupancy":return["detection-pipeline"];case"sound":return["audio-metrics"];case"device-events":case"system":case"alarm":case"mixed":return null}}var aa="camera-streams";function ra(e){return ia(e.delivery)?sa(e.conditions.systemEvent):void 0!==e.conditions.occupancy&&"device-event"===e.delivery?"occupancy":void 0!==e.conditions.audio&&"immediate"===e.delivery?"sound":"device-event"===e.delivery?"sensor":"detection"}function oa(e){return"immediate"===e.delivery&&"detection"===ra(e)}function sa(e){const t=Wn(Hn(e)??[]);return"family"===t.kind?t.family:"mixed"}function la(e,t,i){const n=Xn(i);return e.id===n.discriminator||!!e.appliesTo.includes(t)&&void 0===n.excluded[e.id]}function ca(e,t){const i=Xn(t),n=[];for(const[t,a]of Object.entries(e)){if(void 0===a)continue;if(Array.isArray(a)&&0===a.length)continue;const e=i.excluded[t];void 0!==e&&n.push({conditionId:t,reason:e})}return n}var da={op:"became-occupied",count:1,sustainSeconds:15},ua={hitPercent:wn,samplingSeconds:Mn,dbThreshold:Cn};function ma(e){switch(e){case"device-events":return{delivery:ta,conditions:{systemEvent:{kinds:["device-offline","device-online"]}}};case"system":return{delivery:ta,conditions:{systemEvent:{kinds:["node-offline","node-online"]}}};case"alarm":return{delivery:ta,conditions:{systemEvent:{kinds:["alarm-triggered"]}}};case"audio":return{delivery:"immediate",conditions:{audio:ua}};case"occupancy":return{delivery:"device-event",conditions:{occupancy:da}};case"sensor":return{delivery:"device-event",conditions:{}};default:return{delivery:"immediate",conditions:{source:"pipeline"}}}}var pa=["rule","devices","conditions","notification","actions","advanced"],ga={rule:"Rule",devices:"Cameras",conditions:"Conditions",notification:"Notification",actions:"Actions",advanced:"Advanced"};function ya(e){const t=Xn(e),i=[];for(const n of pa)"devices"===n&&Zn(e)||i.push({key:n,label:"conditions"===n?t.label:ga[n]});return i}var va="armed_",ba="alarm-panel",fa="trigger",za=["contact","cover","lock","switch"];function ha(e,t){if("do"===e.kind){const t=e.action;return"cap"===t.kind&&t.cap===ba&&t.method===fa}const i=t?.(e.sequenceId);return void 0!==i&&i.some(e=>"cap"===e.kind&&e.cap===ba&&e.method===fa)}function Sa(e){return(e.conditions.deviceState?.states??[]).some(e=>e.trim().toLowerCase().startsWith(va))}function ka(e){if(Sa(e))return!0;for(const t of e.actions?.onTrigger??[])if(ha(t,e.sequenceActionsOf))return!0;return!1}function qa(e){const t=e.trim().toLowerCase();return za.some(e=>e===t)}function Aa(e){if("cleared"!==e.conditions.sensorTransition)return!1;const t=e.conditions.sensorKinds??[];return!(0===t.length||!t.every(qa))&&ka(e)}function Ca(e){return e.controllable?e.blocking.includes(e.deviceId):!e.nonBlocking.includes(e.deviceId)}function wa(e){return!!e.controllable&&!e.secureOnArmOff.includes(e.deviceId)}var Ma=["exitDelaySec","entryDelaySec","triggeredDurationSec"],Da=["notifyDuringEntryDelay","notifySensorRewatched"];function Pa(e,t){return void 0!==e?e:t>0?"rearmAfter":"doNothing"}function Ia(e,t){return void 0===e?{value:t,source:"default"}:{value:e,source:"mode"}}function Ea(e,t){const i=(e.modeDelays??[]).find(e=>e.mode===t),n=Ia(i?.exitDelaySec,e.exitDelaySec),a=Ia(i?.entryDelaySec,e.entryDelaySec),r=Ia(i?.triggeredDurationSec,e.triggeredDurationSec),o=i?.postTriggeredAction,s=void 0!==o?"mode":"default",l=Pa(o??e.postTriggeredAction,r.value);return{exitDelaySec:n.value,entryDelaySec:a.value,triggeredDurationSec:r.value,postTriggeredAction:l,source:{exitDelaySec:n.source,entryDelaySec:a.source,triggeredDurationSec:r.source,postTriggeredAction:s}}}function ja(e,t){if(void 0===e&&void 0===t)return!0;if(void 0===e||void 0===t)return!1;if(e.invert!==t.invert||e.timezone!==t.timezone)return!1;if(e.windows.length!==t.windows.length)return!1;for(let i=0;i<e.windows.length;i++){const n=e.windows[i],a=t.windows[i];if(void 0===n||void 0===a)return!1;if(n.startMinute!==a.startMinute||n.endMinute!==a.endMinute)return!1;if(n.days.length!==a.days.length)return!1;for(let e=0;e<n.days.length;e++)if(n.days[e]!==a.days[e])return!1}return!0}function xa(e,t){const i=new Set(e),n=new Set(t);return i.size===n.size&&[...i].every(e=>n.has(e))}function Oa(e){const t=new Map;for(const i of e)i.deviceIds.length>0&&t.set(i.mode,new Set(i.deviceIds));return t}function Ta(e,t){const i=Oa(e),n=Oa(t);if(i.size!==n.size)return!1;for(const[e,t]of i){const i=n.get(e);if(void 0===i||!xa([...t],[...i]))return!1}return!0}function Ra(e,t){if(void 0!==e)switch(t){case"exitDelaySec":return e.exitDelaySec;case"entryDelaySec":return e.entryDelaySec;case"triggeredDurationSec":return e.triggeredDurationSec}}function Ba(e,t){switch(t){case"exitDelaySec":return e.exitDelaySec;case"entryDelaySec":return e.entryDelaySec;case"triggeredDurationSec":return e.triggeredDurationSec}}function La(e,t,i){return e?.find(e=>e.mode===t)?.deviceIds.includes(i)??!1}function Fa(e,t){if(void 0!==e.exitDelaySec&&e.exitDelaySec!==t.exitDelaySec)return!1;if(void 0!==e.entryDelaySec&&e.entryDelaySec!==t.entryDelaySec)return!1;if(void 0!==e.triggeredDurationSec&&e.triggeredDurationSec!==t.triggeredDurationSec)return!1;if(void 0!==e.postTriggeredAction&&e.postTriggeredAction!==Pa(t.postTriggeredAction,t.triggeredDurationSec))return!1;if(void 0!==e.announceTargets&&!xa(e.announceTargets,t.announceTargets))return!1;if(void 0!==e.nonBlocking&&!Ta(e.nonBlocking,t.nonBlocking??[]))return!1;if(void 0!==e.blocking&&!Ta(e.blocking,t.blocking??[]))return!1;if(void 0!==e.secureOnArmOff&&!Ta(e.secureOnArmOff,t.secureOnArmOff??[]))return!1;for(const i of e.modeDelays??[]){const e=(t.modeDelays??[]).find(e=>e.mode===i.mode);for(const t of Ma){const n=Ba(i,t);if(void 0===n)continue;const a=Ra(e,t);if(null===n?void 0!==a:a!==n)return!1}if(void 0!==i.postTriggeredAction){const t=e?.postTriggeredAction;if(null===i.postTriggeredAction?void 0!==t:t!==i.postTriggeredAction)return!1}for(const t of Da){const n=i[t];if(void 0===n)continue;const a=e?.[t];if(null===n?void 0!==a:a!==n)return!1}if(void 0!==i.schedule){const t=e?.schedule;if(null===i.schedule?void 0!==t:!ja(t,i.schedule))return!1}}if(void 0!==e.nonBlockingEdit){const i=e.nonBlockingEdit;if(La(t.nonBlocking,i.mode,i.deviceId)!==i.nonBlocking)return!1}if(void 0!==e.blockingEdit){const i=e.blockingEdit;if(La(t.blocking,i.mode,i.deviceId)!==i.blocking)return!1}if(void 0!==e.secureOnArmEdit){const i=e.secureOnArmEdit;if(La(t.secureOnArmOff,i.mode,i.deviceId)===i.secureOnArm)return!1}return!0}var Na=Object.freeze(Object.fromEntries(Object.entries(Ai).flatMap(([e,t])=>{const i=v[e];return void 0===i||"sensor"!==t.category?[]:[[t.kind,i]]}))),_a=Object.freeze(Object.keys(Na));function Ka(e){return e.trim().toLowerCase()}function Ua(e){return void 0!==e&&0!==e.length&&e.every(e=>_a.includes(Ka(e)))}var Ga="Only a sensor that raises and clears (water, smoke, gas, CO, vibration, tamper, motion, contact) can fire on one edge. Pick only such sensor kinds, or the rule fires on every change.",Ha=["title","body"],Wa=["device-battery-low","device-battery-normal"],Va=["device-consumable-low","device-consumable-normal"],Za=["device-tank-low","device-tank-full","device-tank-normal"],$a=["addon-update-available","server-update-available","wrapper-update-available"],Ja=["addon-update-available","server-update-available"],Ya=["alarm-triggered"],Qa=["device-online","device-offline","device-disabled","device-enabled",...Wa,...Va,...Za,"stream-online","stream-offline","detection-blind","alarm-triggered","alarm-armed","alarm-disarmed","alarm-arming","alarm-arm-refused","alarm-pending","alarm-rearmed","alarm-sensor-bypass","alarm-check-failed"],Xa=[...Gn("device-events"),...Gn("system")],er=[{name:"summaryDevices",label:"Summary: devices offline / switched off",example:"Garage \u2014 offline since 07:12",kinds:["device-offline","device-online","device-disabled","device-enabled"]},{name:"summaryStreams",label:"Summary: streams offline",example:"Ingresso (high) \u2014 since 06:40",kinds:["stream-offline","stream-online"]},{name:"summaryBattery",label:"Summary: low batteries",example:"Sensore porta \u2014 8 %",kinds:Wa},{name:"summaryConsumables",label:"Summary: consumables",example:"Robot \u2014 filter 10 %",kinds:Va},{name:"summaryTanks",label:"Summary: tanks",example:"Robot \u2014 clean water low",kinds:Za},{name:"summaryDetection",label:"Summary: cameras detecting nothing",example:"Ingresso \u2014 since 05:10",kinds:["detection-blind"]},{name:"summaryNodes",label:"Summary: nodes",example:"little-unraid \u2014 offline since 03:00",kinds:["node-offline","node-online","node-restarting","node-inference-unavailable"]},{name:"summaryAddons",label:"Summary: addons stopped",example:"hub \u2014 recorder stopped after repeated crashes",kinds:["addon-crash-loop"]},{name:"summaryAddonUpdates",label:"Summary: addon updates",example:"hub:\n\u2022 @camstack/addon-recorder 1.2.3 \u2192 1.2.4",kinds:["addon-update-available","addon-updated"]},{name:"summaryUpdates",label:"Summary: server & container updates",example:"server 1.2.377 \u2192 1.2.378",kinds:["server-update-available","node-updating","server-updated","wrapper-update-available"]}],tr=[{name:"summaryText",label:"Summary: every section",description:"One block per section with something to report, one line per item.",example:"Batterie scariche: Sensore porta \u2014 8 %",group:"system",families:["rule"],fields:[...Ha],kinds:["system"],systemEventKinds:[...Xa],systemEventDeliveries:["summary"]},{name:"summaryCount",label:"Summary: items reported",example:"3",group:"system",families:["rule"],fields:[...Ha],kinds:["system"],systemEventKinds:[...Xa],systemEventDeliveries:["summary"]},{name:"summarySection",label:"Summary: this section",description:"The section a per-section summary row is about; on a summary sent as one message, every section it reports, comma-separated.",example:"Batterie scariche",group:"system",families:["rule"],fields:[...Ha],kinds:["system"],systemEventKinds:[...Xa],systemEventDeliveries:["summary"]},...er.map(e=>({name:e.name,label:e.label,example:e.example,group:"system",families:["rule"],fields:[...Ha],kinds:["system"],systemEventKinds:[...e.kinds],systemEventDeliveries:["summary"]}))],ir=[{name:"camera",label:"Camera",example:"Ingresso",group:"subject",families:["rule","timelapse"],systemEventKinds:[...Qa,"export-completed"]},{name:"class",label:"Detected class",description:"The wire class id (e.g. \"person\", \"cat\"); the counted class on an occupancy row.",example:"person",group:"subject",families:["rule"],fields:[...Ha],kinds:["detection","sensor","sound","occupancy","system"],systemEventKinds:[...Ya]},{name:"classLabel",label:"Detected class (translated)",description:"Human label of {{class}} in the notification language (EVENT_KIND_LABELS); falls back to the raw id.",example:"Persona",group:"subject",families:["rule"],fields:[...Ha],kinds:["detection","sensor","sound","occupancy","system"],systemEventKinds:[...Ya]},{name:"label",label:"Name or plate",description:"Recognised person or read plate; empty otherwise.",example:"Mario",group:"subject",families:["rule"],fields:[...Ha],kinds:["detection","system"],systemEventKinds:[...Ya]},{name:"subject",label:"Subject sentence",description:"Composed in the notification language, e.g. \"person (Mario)\".",example:"persona (Mario)",group:"subject",families:["rule"],fields:[...Ha],kinds:["detection","sensor","sound","occupancy"]},{name:"confidence",label:"Confidence",example:"87%",group:"subject",families:["rule"],fields:[...Ha],kinds:["detection","system"],systemEventKinds:[...Ya]},{name:"count",label:"Count",description:"Occupancy count, subjects in a grouped notification, or the event count of a system notice.",example:"3",group:"subject",families:["rule"],fields:[...Ha],kinds:["detection","occupancy","system"],systemEventKinds:["addon-crash-loop",...Ja,"addon-updated"]},{name:"detectionSummary",label:"Detection summary",description:"Class composition, e.g. \"2 persons and 1 car\".",example:"2 persone e 1 auto",group:"subject",families:["rule","timelapse","summary"],fields:[...Ha],kinds:["detection"]},{name:"zones",label:"Zones",example:"Cancello, Vialetto",group:"place",families:["rule"],fields:[...Ha],kinds:["detection","system"],systemEventKinds:[...Ya]},{name:"zone",label:"Zone",example:"Cancello",group:"place",families:["rule"],fields:[...Ha],kinds:["detection","occupancy","system"],systemEventKinds:[...Ya]},{name:"inZones",label:"\"in <zones>\" fragment",description:"Leading space included; empty when no zone.",example:" in Cancello",group:"place",families:["rule"],fields:[...Ha],kinds:["detection","system"],systemEventKinds:[...Ya]},{name:"scope",label:"Occupancy scope",example:"Cancello",group:"place",families:["rule"],fields:[...Ha],kinds:["occupancy"]},{name:"time",label:"Time",description:"Hours and minutes, in the notification language.",example:"20:05",group:"time",families:["rule","timelapse","summary"],fields:[...Ha]},{name:"rule",label:"Rule name",example:"Ingresso notte",group:"rule",families:["rule","timelapse","summary"]},{name:"from",label:"Window start",example:"07:00",group:"time",families:["timelapse","summary"]},{name:"to",label:"Window end",example:"08:00",group:"time",families:["timelapse","summary"]},{name:"capacity",label:"Capacity",example:"2",group:"occupancy",families:["rule"],fields:[...Ha],kinds:["occupancy"]},{name:"op",label:"Occupied / free",example:"occupata",group:"occupancy",families:["rule"],fields:[...Ha],kinds:["occupancy"]},{name:"sounds",label:"Sounds heard",example:"abbaio, clacson",group:"sound",families:["rule"],fields:[...Ha],kinds:["sound"]},{name:"hitPercent",label:"Share of the window",description:"Level mode only: percentage of samples above the threshold.",example:"42",group:"sound",families:["rule"],fields:[...Ha],kinds:["sound"]},{name:"db",label:"Peak level (dBFS)",example:"-18",group:"sound",families:["rule"],fields:[...Ha],kinds:["sound"]},{name:"eventType",label:"Event type",description:"Raw device event token, e.g. \"press\" or \"open\"; empty when the device sends none.",example:"press",group:"sensor",families:["rule"],fields:[...Ha],kinds:["sensor"]},{name:"ai",label:"AI sentence",description:"Where the AI description goes; appended on its own line when absent.",example:"Una persona lascia un pacco.",group:"ai",families:["rule","summary"],fields:["body"],kinds:["detection","occupancy"]},{name:"eventKind",label:"Event kind",example:"device-offline",group:"system",families:["rule"],fields:[...Ha],kinds:["system"],systemEventDeliveries:["instant"]},{name:"deviceName",label:"Device",example:"Ingresso",group:"system",families:["rule"],fields:[...Ha],kinds:["system"],systemEventKinds:[...Qa]},{name:"locations",label:"Intrusion locations",example:"Ingresso, Corridoio, Salone",group:"system",families:["rule"],fields:[...Ha],kinds:["system"],systemEventKinds:[...Ya]},{name:"deviceId",label:"Device id",example:"617",group:"system",families:["rule"],fields:[...Ha],kinds:["system"],systemEventKinds:[...Qa,"export-completed"]},{name:"percentage",label:"Percentage",example:"15",group:"system",families:["rule"],fields:[...Ha],kinds:["system"],systemEventKinds:[...Wa,...Va]},{name:"item",label:"Consumable",example:"Filtro",group:"system",families:["rule"],fields:[...Ha],kinds:["system"],systemEventKinds:[...Va]},{name:"tank",label:"Tank",description:"Which tank: clean water, dirty water, detergent or dust bin.",example:"clean water",group:"system",families:["rule"],fields:[...Ha],kinds:["system"],systemEventKinds:[...Za]},{name:"profile",label:"Stream profile",example:"high",group:"system",families:["rule"],fields:[...Ha],kinds:["system"],systemEventKinds:["stream-online","stream-offline"]},{name:"node",label:"Node",example:"hub",group:"system",families:["rule"],fields:[...Ha],kinds:["system"],systemEventKinds:["node-online","node-offline","node-restarting","node-updating","node-inference-unavailable","addon-crash-loop",...$a,"addon-updated","server-updated"]},{name:"nodeId",label:"Node id",example:"hub",group:"system",families:["rule"],fields:[...Ha],kinds:["system"],systemEventKinds:["node-online","node-offline","node-restarting","node-updating","node-inference-unavailable","addon-crash-loop",...$a,"server-updated"]},{name:"devices",label:"Devices",description:"node-inference-unavailable: the affected cameras, comma-joined. Alarm arm / arming / refusal: HOW MANY devices are armed (or open).",example:"Ingresso, Garage",group:"system",families:["rule"],fields:[...Ha],kinds:["system"],systemEventKinds:["node-inference-unavailable","alarm-armed","alarm-arming","alarm-arm-refused"]},{name:"addons",label:"Addons",example:"stream-broker",group:"system",families:["rule"],fields:[...Ha],kinds:["system"],systemEventKinds:["addon-crash-loop"]},{name:"minutes",label:"Minutes",example:"12",group:"system",families:["rule"],fields:[...Ha],kinds:["system"],systemEventKinds:["detection-blind"]},{name:"package",label:"Package",example:"@camstack/addon-recorder",group:"system",families:["rule"],fields:[...Ha],kinds:["system"],systemEventKinds:[...$a,"addon-updated","node-updating","server-updated"]},{name:"packageName",label:"Package",example:"@camstack/addon-recorder",group:"system",families:["rule"],fields:[...Ha],kinds:["system"],systemEventKinds:[...Ja,"node-updating","server-updated"]},{name:"nodes",label:"Nodes",description:"Comma-joined node ids, when an update spans more than one \u2014 the single-node case names it through {{nodeId}} instead. `incomingFromUpdateAvailable` (event-intake.ts) fills `nodes` from ONE shared textParams object for both addon- and server-update-available, exactly like packageName/currentVersion/latestVersion/count \u2014 only the shipped TEXT (system.server-update-available.body.onNodes) reads it today, but the var is real on both kinds.",example:"hub, little-unraid",group:"system",families:["rule"],fields:[...Ha],kinds:["system"],systemEventKinds:[...Ja]},{name:"currentVersion",label:"Current version",example:"1.2.377",group:"system",families:["rule"],fields:[...Ha],kinds:["system"],systemEventKinds:[...$a]},{name:"latestVersion",label:"Latest version",example:"1.2.378",group:"system",families:["rule"],fields:[...Ha],kinds:["system"],systemEventKinds:[...$a]},{name:"list",label:"Updated packages",description:"One line per package. `incomingFromUpdateAvailable` fills it for addon-/server-update-available too (the SAME shared textParams object as `nodes`) \u2014 `system.addon-update-available.body` reads it; `incomingFromAddonUpdates` fills it again, independently, for the completed `addon-updated` event.",example:"recorder, notifiers",group:"system",families:["rule"],fields:[...Ha],kinds:["system"],systemEventKinds:[...Ja,"addon-updated"]},{name:"fromVersion",label:"From version",example:"1.2.377",group:"system",families:["rule"],fields:[...Ha],kinds:["system"],systemEventKinds:["node-updating","server-updated"]},{name:"toVersion",label:"To version",example:"1.2.378",group:"system",families:["rule"],fields:[...Ha],kinds:["system"],systemEventKinds:["node-updating","server-updated"]},{name:"destinationsOk",label:"Destinations ok",example:"2",group:"system",families:["rule"],fields:[...Ha],kinds:["system"],systemEventKinds:["backup-completed"]},{name:"destinationsTotal",label:"Destinations",example:"2",group:"system",families:["rule"],fields:[...Ha],kinds:["system"],systemEventKinds:["backup-completed"]},{name:"destinationsFailed",label:"Destinations failed",example:"0",group:"system",families:["rule"],fields:[...Ha],kinds:["system"],systemEventKinds:["backup-completed"]},{name:"sizeMB",label:"Size (MB)",example:"412",group:"system",families:["rule"],fields:[...Ha],kinds:["system"],systemEventKinds:["backup-completed"]},{name:"backupId",label:"Backup id",example:"bk-20260924",group:"system",families:["rule"],fields:[...Ha],kinds:["system"],systemEventKinds:["backup-completed"]},{name:"title",label:"Export title",example:"Ingresso 08:00",group:"system",families:["rule"],fields:[...Ha],kinds:["system"],systemEventKinds:["export-completed"]},{name:"exportId",label:"Export id",example:"exp-20260924",group:"system",families:["rule"],fields:[...Ha],kinds:["system"],systemEventKinds:["export-completed"]},{name:"bytes",label:"Export size (bytes)",example:"10485760",group:"system",families:["rule"],fields:[...Ha],kinds:["system"],systemEventKinds:["export-completed"]},{name:"mode",label:"Alarm mode",example:"away",group:"system",families:["rule"],fields:[...Ha],kinds:["system"],systemEventKinds:["alarm-armed","alarm-arming","alarm-arm-refused","alarm-pending","alarm-rearmed","alarm-check-failed"]},{name:"seconds",label:"Seconds",description:"Arming: the exit delay left. Pending: the entry delay left to disarm.",example:"30",group:"system",families:["rule"],fields:[...Ha],kinds:["system"],systemEventKinds:["alarm-arming","alarm-pending"]},{name:"rules",label:"Covering rules",description:"How many enabled rules the armed / arming mode gates.",example:"2",group:"system",families:["rule"],fields:[...Ha],kinds:["system"],systemEventKinds:["alarm-armed","alarm-arming"]},{name:"names",label:"Device names",description:"Armed / arming: the Active devices (or every skipped name when none are Active). Refusal: the open sensors.",example:"Ingresso, Garage",group:"system",families:["rule"],fields:[...Ha],kinds:["system"],systemEventKinds:["alarm-armed","alarm-arming","alarm-arm-refused"]},{name:"skippedNames",label:"Skipped devices",description:"Devices the mode names but cannot arm (muted, detection off, offline).",example:"Garage",group:"system",families:["rule"],fields:[...Ha],kinds:["system"],systemEventKinds:["alarm-armed","alarm-arming"]},{name:"active",label:"Active count",description:"How many named devices the armed / arming mode is watching (title: n attivi / n active).",example:"3",group:"system",families:["rule"],fields:[...Ha],kinds:["system"],systemEventKinds:["alarm-armed","alarm-arming"]},{name:"skipped",label:"Skipped count",description:"How many named devices the mode cannot arm \u2014 muted, detection off, offline (title: m saltati).",example:"1",group:"system",families:["rule"],fields:[...Ha],kinds:["system"],systemEventKinds:["alarm-armed","alarm-arming"]},{name:"bypassedNames",label:"Bypassed sensors",description:"Sensors the operator armed around because they were open.",example:"Finestra veranda",group:"system",families:["rule"],fields:[...Ha],kinds:["system"],systemEventKinds:["alarm-armed","alarm-arming"]},{name:"coverage",label:"Coverage %",example:"96",group:"digest",families:["timelapse"],fields:[...Ha]},{name:"events",label:"Events",example:"4",group:"digest",families:["timelapse","summary"],fields:[...Ha]},{name:"detections",label:"Detections",example:"7",group:"digest",families:["timelapse","summary"],fields:[...Ha]},{name:"count_person",label:"Count of one class",description:"count_<class>, e.g. count_person, count_car.",example:"3",group:"digest",families:["timelapse","summary"],fields:[...Ha],dynamic:{prefix:"count_",from:"classes"}},{name:"cameras",label:"Cameras",example:"3",group:"digest",families:["summary"],fields:[...Ha]},{name:"matched",label:"Matched events",example:"12",group:"digest",families:["summary"],fields:[...Ha]},{name:"shown",label:"Events shown",example:"9",group:"digest",families:["summary"],fields:[...Ha]},{name:"total",label:"Events total",example:"12",group:"digest",families:["summary"],fields:[...Ha]},...tr],nr=["device-tank-low","device-tank-full","device-tank-normal","node-restarting","node-updating"];function ar(e){return void 0!==e.systemEventDeliveries&&!e.systemEventDeliveries.includes("instant")}function rr(e,t){if(!Zn(t.kind))return!0;const i=t.systemEventDelivery??"instant";return(e.systemEventDeliveries??(void 0!==e.systemEventKinds?["instant"]:[i])).includes(i)}function or(e,t){return void 0===e||void 0===t||(!!e.some(e=>e===t)||Zn(t)&&e.includes("system"))}function sr(e,t){if(!Zn(t.kind)||void 0===e.systemEventKinds)return!0;const i=e.systemEventKinds,n=t.systemEventKinds??[];if(n.length>0)return n.some(e=>i.includes(e));const a=void 0===t.kind?void 0:$n(t.kind);if(void 0===a)return!0;const r=Gn(a);return i.some(e=>r.includes(e))}var lr=["device-events","system"];function cr(e){if("summary"!==e.systemEventDelivery?.mode)return[];if(!ia(e.delivery))return[{code:"not-a-system-rule",delivery:e.delivery}];const t=[],i=Wn(e.conditions.systemEvent?.kinds??[]),n="family"===i.kind?i.family:"mixed";"mixed"!==n&&lr.includes(n)||t.push({code:"family-not-summarisable",family:n});const a=e.systemEventDelivery.schedule.windows;var r;return 0===a.length&&t.push({code:"empty-schedule"}),a.forEach((e,i)=>{0!==e.days.length&&e.startMinute!==e.endMinute||t.push({code:"degenerate-window",index:i})}),void 0!==e.schedule&&t.push({code:"schedule-beside-summary"}),void 0!==(r=e.actions)&&((r.onActivation?.length??0)>0||(r.onDeactivation?.length??0)>0||(r.onTrigger?.length??0)>0||(r.onTriggerOff?.length??0)>0||(r.buttons?.length??0)>0)&&t.push({code:"actions-beside-summary"}),t}var dr=/\{\{\s*summary(?:Text|Devices|Streams|Battery|Consumables|Tanks|Detection|Nodes|Addons|AddonUpdates|Updates)\s*\}\}/;function ur(e){return void 0===e||0===e.trim().length||dr.test(e)}function mr(e){return e.map(e=>Object.assign({id:e.id,name:e.name,type:e.isHub?"hub":"agent",location:e.isOnline?"online":"offline"},e.name!==e.id?{detail:e.id}:{}))}var pr=["@camstack/server","@camstack/system","camstack-wrapper"],gr={"@camstack/server":"server","@camstack/system":"framework","camstack-wrapper":"wrapper"};function yr(e){const t=new Map(e.map(e=>[e.name,e.version])),i=pr.map(e=>{const i=t.get(e);return Object.assign({id:e,name:e,type:gr[e],location:null},void 0!==i?{detail:i}:{})}),n=e.filter(e=>{return t=e.name,!pr.some(e=>e===t);var t}).map(e=>({id:e.name,name:e.name,type:"addon",location:null,detail:e.version})).sort((e,t)=>e.name.localeCompare(t.name));return[...i,...n]}var vr={disarmed:{en:"Disarmed",it:"Disinserito"},armed_home:{en:"Armed (home)",it:"Inserito (in casa)"},armed_away:{en:"Armed (away)",it:"Inserito (fuori casa)"},armed_night:{en:"Armed (night)",it:"Inserito (notte)"},armed_vacation:{en:"Armed (vacation)",it:"Inserito (vacanza)"},armed_custom_bypass:{en:"Armed (custom)",it:"Inserito (personalizzato)"},arming:{en:"Arming",it:"In inserimento"},disarming:{en:"Disarming",it:"In disinserimento"},pending:{en:"Pending (entry delay)",it:"In attesa (ritardo ingresso)"},triggered:{en:"Triggered",it:"In allarme"},open:{en:"Open",it:"Aperto"},opening:{en:"Opening",it:"In apertura"},closing:{en:"Closing",it:"In chiusura"},closed:{en:"Closed",it:"Chiuso"},stopped:{en:"Stopped",it:"Fermo"},locked:{en:"Locked",it:"Bloccata"},unlocked:{en:"Unlocked",it:"Sbloccata"},locking:{en:"Locking",it:"In blocco"},unlocking:{en:"Unlocking",it:"In sblocco"},jammed:{en:"Jammed",it:"Inceppata"},on:{en:"On",it:"Acceso"},off:{en:"Off",it:"Spento"},home:{en:"Home",it:"In casa"},not_home:{en:"Away",it:"Fuori casa"},matched:{en:"Matched (as captured)",it:"Corrisponde (come acquisita)"},diverged:{en:"Diverged (changed)",it:"Diversa (cambiata)"},unknown:{en:"Cannot judge",it:"Non valutabile"},latched:{en:"Latched",it:"Memorizzato"},live:{en:"Live",it:"In tempo reale"}},br=new Set(["disarmed","armed_home","armed_away","armed_night","armed_vacation","armed_custom_bypass","arming","disarming","pending","triggered","open","opening","closing","closed","stopped","locked","unlocked","locking","unlocking","jammed","on","off","home","not_home","matched","diverged","unknown","latched","live"]);function fr(e){return br.has(e)}function zr(e,t){return fr(e)?vr[e][t]:e}var hr=s.z.object({title:s.z.string().max(500).optional(),body:s.z.string().max(2e3).optional()}),Sr=s.z.string().min(1).max(200),kr=s.z.array(s.z.number()).min(1),qr=s.z.number().int().min(2).max(3600),Ar=s.z.number().int().min(1).max(60),Cr=s.z.array(We).min(1),wr=s.z.number().int().min(1).max(5),Mr=.1,Dr=s.z.number().min(Mr).max(3600),Pr=s.z.number().min(0).max(60),Ir=s.z.string().max(200),Er=s.z.enum(["image","gif"]),jr=s.z.array(s.z.string().min(1).max(40)).max(20),xr=s.z.object({name:Sr,enabled:s.z.boolean().default(!0),deviceIds:kr,schedule:we,cadenceSec:qr.default(15),framerate:Ar.default(10),denseCadenceSec:Dr.optional(),minDwellSec:Pr.optional(),targets:Cr,template:hr.optional(),previewText:Ir.optional(),previewMode:Er.default("image"),reportClasses:jr.optional(),priority:wr.default(3)}),Or="Timelapse {{camera}}";s.z.object({name:Sr.optional(),enabled:s.z.boolean().optional(),deviceIds:kr.optional(),schedule:we.optional(),cadenceSec:qr.optional(),framerate:Ar.optional(),denseCadenceSec:Dr.optional(),minDwellSec:Pr.optional(),targets:Cr.optional(),template:hr.nullable().optional(),previewText:Ir.optional(),previewMode:Er.optional(),reportClasses:jr.optional(),priority:wr.optional()});var Tr=xr.extend({id:s.z.string(),ownerUserId:s.z.string().optional(),lastGeneratedAt:s.z.number().optional(),generatedByDevice:s.z.record(s.z.string(),s.z.number()).optional(),createdBy:s.z.string(),createdAt:s.z.number(),updatedAt:s.z.number()})},1170,[1196]);
226
226
  __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"NC_COOLDOWN_UI_MAX_SEC",{enumerable:!0,get:function(){return o}}),Object.defineProperty(e,"NC_COOLDOWN_STEP_SEC",{enumerable:!0,get:function(){return u}}),Object.defineProperty(e,"NC_GROUPING_STEPPER",{enumerable:!0,get:function(){return c}}),Object.defineProperty(e,"NC_CLIP_SPEED_CHOICES",{enumerable:!0,get:function(){return s}}),e.linkedCamerasApplies=function(n){return'sensor'===n},Object.defineProperty(e,"NC_CONFIRM_OPS",{enumerable:!0,get:function(){return f}}),e.parseConfirmOp=function(n){return f.find(t=>t===n)},e.isValidTimeZone=function(n){if(0===n.trim().length)return!1;try{return new Intl.DateTimeFormat(void 0,{timeZone:n}),!0}catch{return!1}},e.timeZoneChoices=function(){if('function'!=typeof Intl.supportedValuesOf)return null;try{return Intl.supportedValuesOf('timeZone')}catch{return null}},e.isSnoozeExempt=function(n,t){return!!l(n)||t.some(n=>'cap'===n.kind&&n.cap===p)},e.sequenceResolver=function(n){const t=new Map(n.map(n=>[n.id,n.actions]));return n=>t.get(n)};var n=r(d[0]),t=r(d[1]);const o=3600,u=10,c={min:n.NC_GROUPING_MIN_SEC,max:n.NC_GROUPING_MAX_SEC,step:5},s=[1,2,3,4,6,8];const f=t.NcConfirmExpectSchema.shape.op.options;const _=new Set(n.NC_ALARM_SYSTEM_EVENT_KINDS),p='alarm-panel';function l(n){return(n.systemEvent?.kinds??[]).some(n=>_.has(n))}},1171,[1170,1166]);
227
227
  __d(function(g,r,_i,a,_m,_e,_d){"use strict";function e(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(_e,'__esModule',{value:!0}),_e.ConditionField=function(e){const o=(0,t.c)(98),{descriptor:n,conditions:l,savedConditions:s,schedule:i,taxonomy:u,onFieldChange:d,onScheduleChange:c,systemFamily:f,deviceIds:m,alarmActions:b}=e;switch(n.valueType){case"deviceIdList":case"deviceIdExcludeList":case"zoneIdList":case"zoneSelection":default:return null;case"stringList":{if(!(0,j.isStringListKey)(n.id))return null;const e=n.id;let t;o[0]!==l||o[1]!==e?(t=(0,j.readStringList)(l,e),o[0]=l,o[1]=e,o[2]=t):t=o[2];const s=t;let i;o[3]!==e||o[4]!==d?(i=t=>d(e,t.length>0?t:void 0),o[3]=e,o[4]=d,o[5]=i):i=o[5];const c=i;let f;o[6]!==n.id||o[7]!==u?(f=(0,I.pickerForCondition)(n.id,u),o[6]=n.id,o[7]=u,o[8]=f):f=o[8];const m=f;if(m){let e;return o[9]!==c||o[10]!==m||o[11]!==s?(e=(0,_.jsx)(T,{picker:m,value:s,onChange:c}),o[9]=c,o[10]=m,o[11]=s,o[12]=e):e=o[12],e}let b;return o[13]!==c||o[14]!==s?(b=(0,_.jsx)(P,{value:s,onChange:c}),o[13]=c,o[14]=s,o[15]=b):b=o[15],b}case"number01":{if(!(0,j.isNumber01Key)(n.id))return null;const e=n.id;let t,s,i;return o[16]!==l||o[17]!==e?(t=(0,j.readNumber01)(l,e),o[16]=l,o[17]=e,o[18]=t):t=o[18],o[19]!==e||o[20]!==d?(s=t=>d(e,t),o[19]=e,o[20]=d,o[21]=s):s=o[21],o[22]!==t||o[23]!==s?(i=(0,_.jsx)(y.NumericStepper,{value:t,min:0,max:1,step:.05,decimals:2,onChange:s}),o[22]=t,o[23]=s,o[24]=i):i=o[24],i}case"number":{if(!(0,A.isNumberConditionKey)(n.id))return null;const e=n.id,t=l[e];let s,i;return o[25]!==e||o[26]!==d?(s=t=>d(e,t),o[25]=e,o[26]=d,o[27]=s):s=o[27],o[28]!==t||o[29]!==s?(i=(0,_.jsx)(y.NumericStepper,{value:t,min:0,step:1,decimals:0,onChange:s}),o[28]=t,o[29]=s,o[30]=i):i=o[30],i}case"sourceSelect":{let e,t;return o[31]!==d?(e=e=>d("source",e),o[31]=d,o[32]=e):e=o[32],o[33]!==l.source||o[34]!==e?(t=(0,_.jsx)(E,{value:l.source,onChange:e}),o[33]=l.source,o[34]=e,o[35]=t):t=o[35],t}case"deviceState":{let e;return o[36]!==l.deviceState?(e=(0,_.jsx)(W,{value:l.deviceState}),o[36]=l.deviceState,o[37]=e):e=o[37],e}case"scene":{let e;return o[38]!==l.scene?(e=(0,_.jsx)(K,{value:l.scene}),o[38]=l.scene,o[39]=e):e=o[39],e}case"systemEvent":{if(void 0===f){let e;return o[40]!==l.systemEvent?(e=(0,_.jsx)(p.MixedSystemEventSummary,{value:l.systemEvent}),o[40]=l.systemEvent,o[41]=e):e=o[41],e}const e=(s?.systemEvent?.deviceIds?.length??0)>0;let t,i;return o[42]!==d?(t=e=>d("systemEvent",e),o[42]=d,o[43]=t):t=o[43],o[44]!==l.systemEvent||o[45]!==n||o[46]!==f||o[47]!==e||o[48]!==t?(i=(0,_.jsx)(p.SystemEventField,{descriptor:n,value:l.systemEvent,savedHadDevices:e,family:f,onChange:t}),o[44]=l.systemEvent,o[45]=n,o[46]=f,o[47]=e,o[48]=t,o[49]=i):i=o[49],i}case"crossingSelect":{let e,t;return o[50]!==d?(e=e=>d("crossing",e),o[50]=d,o[51]=e):e=o[51],o[52]!==l.crossing||o[53]!==e?(t=(0,_.jsx)(w,{value:l.crossing,onChange:e}),o[52]=l.crossing,o[53]=e,o[54]=t):t=o[54],t}case"sensorTransition":{const e=l.sensorTransition,t=n.options;let s,i,u;return o[55]!==b||o[56]!==l?(s=(0,N.sensorTransitionNeverFiresFor)(Object.assign({conditions:l},b)),o[55]=b,o[56]=l,o[57]=s):s=o[57],o[58]!==d?(i=e=>d("sensorTransition",e),o[58]=d,o[59]=i):i=o[59],o[60]!==l.sensorTransition||o[61]!==n.options||o[62]!==s||o[63]!==i?(u=(0,_.jsx)(M,{value:e,options:t,neverFires:s,onChange:i}),o[60]=l.sensorTransition,o[61]=n.options,o[62]=s,o[63]=i,o[64]=u):u=o[64],u}case"packagePhase":{let e,t;return o[65]!==d?(e=e=>d("packagePhase",e),o[65]=d,o[66]=e):e=o[66],o[67]!==l.packagePhase||o[68]!==e?(t=(0,_.jsx)(R,{value:l.packagePhase,onChange:e}),o[67]=l.packagePhase,o[68]=e,o[69]=t):t=o[69],t}case"plateMatcher":{let e,t;return o[70]!==d?(e=e=>d("plates",e),o[70]=d,o[71]=e):e=o[71],o[72]!==l.plates||o[73]!==e?(t=(0,_.jsx)(z,{value:l.plates,onChange:e}),o[72]=l.plates,o[73]=e,o[74]=t):t=o[74],t}case"occupancy":{let e,t;return o[75]!==d?(e=e=>d("occupancy",e),o[75]=d,o[76]=e):e=o[76],o[77]!==l.occupancy||o[78]!==m||o[79]!==e||o[80]!==u?(t=(0,_.jsx)(v.OccupancyField,{deviceIds:m,taxonomy:u,value:l.occupancy,onChange:e}),o[77]=l.occupancy,o[78]=m,o[79]=e,o[80]=u,o[81]=t):t=o[81],t}case"audio":{let e,t;return o[82]!==d?(e=e=>d("audio",e),o[82]=d,o[83]=e):e=o[83],o[84]!==l.audio||o[85]!==e||o[86]!==u?(t=(0,_.jsx)(x.AudioField,{taxonomy:u,value:l.audio,onChange:e}),o[84]=l.audio,o[85]=e,o[86]=u,o[87]=t):t=o[87],t}case"schedule":{let e;return o[88]!==c||o[89]!==i?(e=(0,_.jsx)(L,{value:i,onChange:c}),o[88]=c,o[89]=i,o[90]=e):e=o[90],e}case"polygonDraw":{let e,t,n;return o[91]!==l.customZones?(e=l.customZones??[],o[91]=l.customZones,o[92]=e):e=o[92],o[93]!==d?(t=e=>d("customZones",e.length>0?e:void 0),o[93]=d,o[94]=t):t=o[94],o[95]!==e||o[96]!==t?(n=(0,_.jsx)(h.CustomZoneField,{value:e,onChange:t}),o[95]=e,o[96]=t,o[97]=n):n=o[97],n}}},_e.TagsInput=P,_e.TaxonomyMultiSelect=T,_e.ScheduleField=L;var t=r(_d[0]),o=r(_d[1]),n=e(r(_d[2])),l=e(r(_d[3])),s=e(r(_d[4])),i=e(r(_d[5])),u=r(_d[6]),d=r(_d[7]),c=r(_d[8]),f=r(_d[9]),m=r(_d[10]),b=r(_d[11]),S=r(_d[12]),p=r(_d[13]),h=r(_d[14]),y=r(_d[15]),v=r(_d[16]),x=r(_d[17]),C=r(_d[18]),j=r(_d[19]),I=r(_d[20]),A=r(_d[21]),N=r(_d[22]),_=r(_d[23]);function P(e){const f=(0,t.c)(31),{value:b,onChange:S,placeholderKey:p}=e,{t:h}=(0,u.useTranslation)(),{colors:y}=(0,c.useTheme)(),[v,x]=(0,o.useState)("");let C;f[0]!==v||f[1]!==S||f[2]!==b?(C=()=>{const e=v.trim();0===e.length||b.includes(e)||S([...b,e]),x("")},f[0]=v,f[1]=S,f[2]=b,f[3]=C):C=f[3];const j=C;let I;f[4]!==S||f[5]!==b?(I=e=>S(b.filter(t=>t!==e)),f[4]=S,f[5]=b,f[6]=I):I=f[6];const A=I;let N,P;f[7]===Symbol.for("react.memo_cache_sentinel")?(N={gap:m.SPACING.sm},f[7]=N):N=f[7],f[8]!==y.foreground||f[9]!==y.foregroundSubtle||f[10]!==y.surfaceHover||f[11]!==A||f[12]!==h||f[13]!==b?(P=b.length>0?(0,_.jsx)(i.default,{style:{flexDirection:"row",flexWrap:"wrap",gap:m.SPACING.sm},children:b.map(e=>(0,_.jsxs)(i.default,{style:{flexDirection:"row",alignItems:"center",gap:m.SPACING.xs,backgroundColor:y.surfaceHover,borderRadius:m.RADIUS.md,paddingVertical:m.SPACING.xs,paddingHorizontal:m.SPACING.sm},children:[(0,_.jsx)(l.default,{style:{color:y.foreground,fontSize:13},children:e}),(0,_.jsx)(n.default,{accessibilityRole:"button",accessibilityLabel:h("v2.nc.rules.editor.removeTag",{value:e}),onPress:()=>A(e),hitSlop:6,children:(0,_.jsx)(d.X,{size:13,color:y.foregroundSubtle})})]},e))}):null,f[8]=y.foreground,f[9]=y.foregroundSubtle,f[10]=y.surfaceHover,f[11]=A,f[12]=h,f[13]=b,f[14]=P):P=f[14];const T=p??"v2.nc.rules.editor.addValue";let E,G,k,w;return f[15]!==h||f[16]!==T?(E=h(T),f[15]=h,f[16]=T,f[17]=E):E=f[17],f[18]!==y.background||f[19]!==y.border||f[20]!==y.foreground?(G={color:y.foreground,backgroundColor:y.background,borderColor:y.border,borderWidth:1,borderRadius:m.RADIUS.md,paddingHorizontal:m.SPACING.lg,paddingVertical:m.SPACING.md,fontSize:15},f[18]=y.background,f[19]=y.border,f[20]=y.foreground,f[21]=G):G=f[21],f[22]!==y.foregroundSubtle||f[23]!==j||f[24]!==v||f[25]!==E||f[26]!==G?(k=(0,_.jsx)(s.default,{value:v,onChangeText:x,onSubmitEditing:j,onBlur:j,blurOnSubmit:!1,placeholder:E,placeholderTextColor:y.foregroundSubtle,autoCapitalize:"none",autoCorrect:!1,style:G}),f[22]=y.foregroundSubtle,f[23]=j,f[24]=v,f[25]=E,f[26]=G,f[27]=k):k=f[27],f[28]!==P||f[29]!==k?(w=(0,_.jsxs)(i.default,{style:N,children:[P,k]}),f[28]=P,f[29]=k,f[30]=w):w=f[30],w}function T(e){const f=(0,t.c)(63),{picker:b,value:S,onChange:p}=e,{t:h}=(0,u.useTranslation)(),{colors:y}=(0,c.useTheme)(),[v,x]=(0,o.useState)("");let C;f[0]!==S?(C=new Set(S),f[0]=S,f[1]=C):C=f[1];const j=C;let A,N,P,T,E,G,k,w,M;if(f[2]!==y.background||f[3]!==y.border||f[4]!==y.foreground||f[5]!==y.foregroundSubtle||f[6]!==y.primary||f[7]!==v||f[8]!==p||f[9]!==b||f[10]!==j||f[11]!==h||f[12]!==S){const e=(0,I.knownValues)(b),t=S.filter(t=>!e.has(t));let o;f[18]!==p||f[19]!==j||f[20]!==S?(o=e=>p(j.has(e)?S.filter(t=>t!==e):[...S,e]),f[18]=p,f[19]=j,f[20]=S,f[21]=o):o=f[21];const s=o;let u,c;f[22]!==v||f[23]!==p||f[24]!==S?(u=()=>{const e=v.trim();0===e.length||S.includes(e)||p([...S,e]),x("")},f[22]=v,f[23]=p,f[24]=S,f[25]=u):u=f[25],N=u,f[26]!==y.background||f[27]!==y.border||f[28]!==y.foreground||f[29]!==y.primary?(c=(e,t,o,s)=>(0,_.jsxs)(n.default,{accessibilityRole:"button",accessibilityState:{selected:t},onPress:o,style:{flexDirection:"row",alignItems:"center",gap:m.SPACING.xs,borderRadius:m.RADIUS.md,paddingVertical:m.SPACING.xs,paddingHorizontal:m.SPACING.sm,borderWidth:1,borderColor:t?y.primary:y.border,backgroundColor:t?`${y.primary}1f`:y.background},children:[(0,_.jsx)(l.default,{style:{color:t?y.primary:y.foreground,fontSize:13},children:e}),t?(0,_.jsx)(d.X,{size:12,color:y.primary}):null]},s),f[26]=y.background,f[27]=y.border,f[28]=y.foreground,f[29]=y.primary,f[30]=c):c=f[30];const C=c;if(A=i.default,f[31]===Symbol.for("react.memo_cache_sentinel")?(P={gap:m.SPACING.md},f[31]=P):P=f[31],f[32]!==C||f[33]!==y.foregroundSubtle||f[34]!==b.groups||f[35]!==j||f[36]!==h||f[37]!==s){let e;f[39]!==C||f[40]!==y.foregroundSubtle||f[41]!==j||f[42]!==h||f[43]!==s?(e=e=>(0,_.jsxs)(i.default,{style:{gap:m.SPACING.sm},children:[(0,_.jsx)(l.default,{style:{color:y.foregroundSubtle,fontSize:11,fontWeight:"600",textTransform:"uppercase",letterSpacing:.4},children:h(`v2.nc.rules.editor.taxonomy.${e.key}`,{defaultValue:e.fallbackLabel})}),(0,_.jsx)(i.default,{style:{flexDirection:"row",flexWrap:"wrap",gap:m.SPACING.sm},children:e.options.map(e=>C(e.label,j.has(e.value),()=>s(e.value),e.value))})]},e.key),f[39]=C,f[40]=y.foregroundSubtle,f[41]=j,f[42]=h,f[43]=s,f[44]=e):e=f[44],T=b.groups.map(e),f[32]=C,f[33]=y.foregroundSubtle,f[34]=b.groups,f[35]=j,f[36]=h,f[37]=s,f[38]=T}else T=f[38];E=t.length>0?(0,_.jsxs)(i.default,{style:{gap:m.SPACING.sm},children:[(0,_.jsx)(l.default,{style:{color:y.foregroundSubtle,fontSize:11,fontWeight:"600",textTransform:"uppercase",letterSpacing:.4},children:h("v2.nc.rules.editor.taxonomy.custom")}),(0,_.jsx)(i.default,{style:{flexDirection:"row",flexWrap:"wrap",gap:m.SPACING.sm},children:t.map(e=>C(e,!0,()=>s(e),`custom:${e}`))})]}):null,f[2]=y.background,f[3]=y.border,f[4]=y.foreground,f[5]=y.foregroundSubtle,f[6]=y.primary,f[7]=v,f[8]=p,f[9]=b,f[10]=j,f[11]=h,f[12]=S,f[13]=A,f[14]=N,f[15]=P,f[16]=T,f[17]=E}else A=f[13],N=f[14],P=f[15],T=f[16],E=f[17];return f[45]!==h?(G=h("v2.nc.rules.editor.taxonomy.addCustom"),f[45]=h,f[46]=G):G=f[46],f[47]!==y.background||f[48]!==y.border||f[49]!==y.foreground?(k={color:y.foreground,backgroundColor:y.background,borderColor:y.border,borderWidth:1,borderRadius:m.RADIUS.md,paddingHorizontal:m.SPACING.lg,paddingVertical:m.SPACING.md,fontSize:15},f[47]=y.background,f[48]=y.border,f[49]=y.foreground,f[50]=k):k=f[50],f[51]!==y.foregroundSubtle||f[52]!==N||f[53]!==v||f[54]!==G||f[55]!==k?(w=(0,_.jsx)(s.default,{value:v,onChangeText:x,onSubmitEditing:N,onBlur:N,blurOnSubmit:!1,placeholder:G,placeholderTextColor:y.foregroundSubtle,autoCapitalize:"none",autoCorrect:!1,style:k}),f[51]=y.foregroundSubtle,f[52]=N,f[53]=v,f[54]=G,f[55]=k,f[56]=w):w=f[56],f[57]!==A||f[58]!==P||f[59]!==T||f[60]!==E||f[61]!==w?(M=(0,_.jsxs)(A,{style:P,children:[T,E,w]}),f[57]=A,f[58]=P,f[59]=T,f[60]=E,f[61]=w,f[62]=M):M=f[62],M}function E(e){const o=(0,t.c)(8),{value:n,onChange:l}=e,{t:s}=(0,u.useTranslation)();let i;o[0]!==s?(i=j.NC_SOURCE_VALUES.map(e=>({value:e,label:s(`v2.nc.rules.editor.source.${e}`)})),o[0]=s,o[1]=i):i=o[1];const d=i,c=n??"any";let m,b;return o[2]!==l?(m=e=>l((0,j.parseSource)(e)),o[2]=l,o[3]=m):m=o[3],o[4]!==d||o[5]!==c||o[6]!==m?(b=(0,_.jsx)(f.SegmentedControl,{options:d,value:c,onChange:m}),o[4]=d,o[5]=c,o[6]=m,o[7]=b):b=o[7],b}const G=['enter','exit','any'];function k(e){return G.find(t=>t===e)}function w(e){const o=(0,t.c)(17),{value:n,onChange:l}=e,{t:s}=(0,u.useTranslation)(),d=n??"enter";let c;o[0]!==s?(c=G.map(e=>({value:e,label:s(`v2.nc.rules.editor.crossing.${e}`)})),o[0]=s,o[1]=c):c=o[1];const S=c;let p,h,y;o[2]===Symbol.for("react.memo_cache_sentinel")?(p={gap:m.SPACING.xs},o[2]=p):p=o[2],o[3]!==l?(h=e=>{const t=k(e);void 0!==t&&l("enter"===t?void 0:t)},o[3]=l,o[4]=h):h=o[4],o[5]!==d||o[6]!==S||o[7]!==h?(y=(0,_.jsx)(f.SegmentedControl,{options:S,value:d,onChange:h}),o[5]=d,o[6]=S,o[7]=h,o[8]=y):y=o[8];const v=`v2.nc.rules.editor.crossing.${d}Hint`;let x,C,j;return o[9]!==s||o[10]!==v?(x=s(v),o[9]=s,o[10]=v,o[11]=x):x=o[11],o[12]!==x?(C=(0,_.jsx)(b.Hint,{text:x}),o[12]=x,o[13]=C):C=o[13],o[14]!==y||o[15]!==C?(j=(0,_.jsxs)(i.default,{style:p,children:[y,C]}),o[14]=y,o[15]=C,o[16]=j):j=o[16],j}function M(e){const o=(0,t.c)(28),{value:s,options:d,neverFires:f,onChange:S}=e,{t:p}=(0,u.useTranslation)(),{colors:h}=(0,c.useTheme)();let y,v,x,C,j,I;if(o[0]!==h||o[1]!==S||o[2]!==d||o[3]!==p||o[4]!==s){const e=(0,N.sensorTransitionChoices)(d),t=s??"";let u;o[9]!==t?(u=e=>e.value===t,o[9]=t,o[10]=u):u=o[10];const c=e.find(u);let f,j;y=i.default,o[11]===Symbol.for("react.memo_cache_sentinel")?(v={gap:m.SPACING.sm},o[11]=v):v=o[11],o[12]===Symbol.for("react.memo_cache_sentinel")?(f={gap:m.SPACING.xs},o[12]=f):f=o[12],o[13]!==h||o[14]!==t||o[15]!==S||o[16]!==p?(j=e=>{const o=e.value===t;return(0,_.jsx)(n.default,{accessibilityRole:"radio",accessibilityState:{checked:o},onPress:()=>S((0,N.parseSensorTransition)(e.value)),style:{borderWidth:1,borderColor:o?h.primary:h.border,backgroundColor:o?`${h.primary}1f`:h.background,borderRadius:m.RADIUS.md,paddingHorizontal:m.SPACING.lg,paddingVertical:m.SPACING.md},children:(0,_.jsx)(l.default,{style:{color:o?h.primary:h.foreground,fontSize:14,fontWeight:o?"600":"400"},children:p(e.labelKey,{defaultValue:e.fallbackLabel})})},""===e.value?"both":e.value)},o[13]=h,o[14]=t,o[15]=S,o[16]=p,o[17]=j):j=o[17],x=(0,_.jsx)(i.default,{accessibilityRole:"radiogroup",style:f,children:e.map(j)}),C=void 0!==c?(0,_.jsx)(b.Hint,{text:p(c.hintKey,{defaultValue:c.hint??""})}):null,o[0]=h,o[1]=S,o[2]=d,o[3]=p,o[4]=s,o[5]=y,o[6]=v,o[7]=x,o[8]=C}else y=o[5],v=o[6],x=o[7],C=o[8];return o[18]!==h||o[19]!==f||o[20]!==p?(j=f?(0,_.jsx)(l.default,{style:{color:h.warning,fontSize:12,lineHeight:16},children:p(N.SENSOR_TRANSITION_NEVER_FIRES_KEY)}):null,o[18]=h,o[19]=f,o[20]=p,o[21]=j):j=o[21],o[22]!==y||o[23]!==v||o[24]!==x||o[25]!==C||o[26]!==j?(I=(0,_.jsxs)(y,{style:v,children:[x,C,j]}),o[22]=y,o[23]=v,o[24]=x,o[25]=C,o[26]=j,o[27]=I):I=o[27],I}function R(e){const o=(0,t.c)(8),{value:n,onChange:l}=e,{t:s}=(0,u.useTranslation)();let i;o[0]!==s?(i=j.NC_PACKAGE_PHASE_VALUES.map(e=>({value:e,label:s(`v2.nc.rules.editor.phase.${e}`)})),o[0]=s,o[1]=i):i=o[1];const d=i,c=n??"both";let m,b;return o[2]!==l?(m=e=>l((0,j.parsePackagePhase)(e)),o[2]=l,o[3]=m):m=o[3],o[4]!==d||o[5]!==c||o[6]!==m?(b=(0,_.jsx)(f.SegmentedControl,{options:d,value:c,onChange:m}),o[4]=d,o[5]=c,o[6]=m,o[7]=b):b=o[7],b}function z(e){const o=(0,t.c)(42),{value:n,onChange:s}=e,{t:d}=(0,u.useTranslation)(),{colors:b}=(0,c.useTheme)();let S;o[0]!==n?(S=(0,C.plateScopeMode)(n),o[0]=n,o[1]=S):S=o[1];const p=S;let h;o[2]!==n?.values?(h=n?.values??[],o[2]=n?.values,o[3]=h):h=o[3];const v=h,x=n?.maxDistance??C.NC_PLATE_MAX_DISTANCE_DEFAULT;let j;o[4]!==d?(j=C.NC_RECOGNITION_MODES.map(e=>({value:e,label:d(`v2.nc.rules.editor.recognition.plates.${e}`)})),o[4]=d,o[5]=j):j=o[5];const I=j;let A;o[6]!==x||o[7]!==s||o[8]!==v?(A=e=>{const t=(0,C.parseRecognitionMode)(e);void 0!==t&&s((0,C.plateScopeValue)(t,v,x))},o[6]=x,o[7]=s,o[8]=v,o[9]=A):A=o[9];const N=A;let T;o[10]!==x||o[11]!==s?(T=e=>s((0,C.plateScopeValue)("specific",e,x)),o[10]=x,o[11]=s,o[12]=T):T=o[12];const E=T;let G;o[13]!==p||o[14]!==s||o[15]!==v?(G=e=>s((0,C.plateScopeValue)(p,v,Math.max(C.NC_PLATE_MAX_DISTANCE_MIN,Math.min(C.NC_PLATE_MAX_DISTANCE_MAX,e)))),o[13]=p,o[14]=s,o[15]=v,o[16]=G):G=o[16];const k=G;let w,M,R;o[17]===Symbol.for("react.memo_cache_sentinel")?(w={gap:m.SPACING.sm},o[17]=w):w=o[17],o[18]!==p||o[19]!==I||o[20]!==N?(M=(0,_.jsx)(f.SegmentedControl,{options:I,value:p,onChange:N}),o[18]=p,o[19]=I,o[20]=N,o[21]=M):M=o[21],o[22]!==b.foregroundSubtle?(R={color:b.foregroundSubtle,fontSize:11,lineHeight:15},o[22]=b.foregroundSubtle,o[23]=R):R=o[23];const z=`v2.nc.rules.editor.recognition.plates.${p}Hint`;let D,H,F,L;return o[24]!==d||o[25]!==z?(D=d(z),o[24]=d,o[25]=z,o[26]=D):D=o[26],o[27]!==D||o[28]!==R?(H=(0,_.jsx)(l.default,{style:R,children:D}),o[27]=D,o[28]=R,o[29]=H):H=o[29],o[30]!==b.foregroundSubtle||o[31]!==x||o[32]!==p||o[33]!==k||o[34]!==E||o[35]!==d||o[36]!==v?(F="specific"===p?(0,_.jsxs)(_.Fragment,{children:[(0,_.jsx)(P,{value:v,onChange:E,placeholderKey:"v2.nc.rules.editor.plateText"}),(0,_.jsxs)(i.default,{style:{flexDirection:"row",alignItems:"center",gap:m.SPACING.md},children:[(0,_.jsx)(l.default,{style:{flex:1,color:b.foregroundSubtle,fontSize:13},children:d("v2.nc.rules.editor.maxDistance")}),(0,_.jsx)(y.NumericStepper,{value:x,min:C.NC_PLATE_MAX_DISTANCE_MIN,max:C.NC_PLATE_MAX_DISTANCE_MAX,step:1,decimals:0,onChange:e=>k(e??C.NC_PLATE_MAX_DISTANCE_DEFAULT)})]})]}):null,o[30]=b.foregroundSubtle,o[31]=x,o[32]=p,o[33]=k,o[34]=E,o[35]=d,o[36]=v,o[37]=F):F=o[37],o[38]!==H||o[39]!==F||o[40]!==M?(L=(0,_.jsxs)(i.default,{style:w,children:[M,H,F]}),o[38]=H,o[39]=F,o[40]=M,o[41]=L):L=o[41],L}const D=[{value:1,labelKey:'mon'},{value:2,labelKey:'tue'},{value:3,labelKey:'wed'},{value:4,labelKey:'thu'},{value:5,labelKey:'fri'},{value:6,labelKey:'sat'},{value:0,labelKey:'sun'}];function H(e){const t=Math.floor(e/60),o=e%60;return`${String(t).padStart(2,'0')}:${String(o).padStart(2,'0')}`}function F(e){const[t,o]=e.split(':'),n=60*Number(t)+Number(o);return Number.isFinite(n)?Math.max(0,Math.min(1439,n)):0}function L(e){const o=(0,t.c)(54),{value:s,onChange:f}=e,{t:S}=(0,u.useTranslation)(),{colors:p}=(0,c.useTheme)();let h;o[0]!==s?.windows?(h=s?.windows??[],o[0]=s?.windows,o[1]=h):h=o[1];const y=h,v=s?.invert??!1;let x;o[2]!==f||o[3]!==s?(x=(e,t)=>{0!==e.length?f(Object.assign({windows:e},t?{invert:!0}:{},s?.timezone?{timezone:s.timezone}:{})):f(void 0)},o[2]=f,o[3]=s,o[4]=x):x=o[4];const C=x;let j;o[5]!==C||o[6]!==v||o[7]!==y?(j=()=>C([...y,{days:[1,2,3,4,5],startMinute:540,endMinute:1080}],v),o[5]=C,o[6]=v,o[7]=y,o[8]=j):j=o[8];const I=j;let A;o[9]!==C||o[10]!==v||o[11]!==y?(A=e=>C(y.filter((t,o)=>o!==e),v),o[9]=C,o[10]=v,o[11]=y,o[12]=A):A=o[12];const N=A;let P;o[13]!==C||o[14]!==v||o[15]!==y?(P=(e,t)=>C(y.map((o,n)=>n===e?t:o),v),o[13]=C,o[14]=v,o[15]=y,o[16]=P):P=o[16];const T=P;let E,G,k,w,M,R,z,D,H,F,L,W;return o[17]===Symbol.for("react.memo_cache_sentinel")?(E={gap:m.SPACING.sm},o[17]=E):E=o[17],o[18]!==N||o[19]!==T||o[20]!==S||o[21]!==y?(G=0===y.length?(0,_.jsx)(b.Hint,{text:S("v2.nc.rules.editor.scheduleAlways")}):y.map((e,t)=>(0,_.jsx)(V,{window:e,onChange:e=>T(t,e),onRemove:()=>N(t)},t)),o[18]=N,o[19]=T,o[20]=S,o[21]=y,o[22]=G):G=o[22],o[23]===Symbol.for("react.memo_cache_sentinel")?(k={flexDirection:"row",alignItems:"center",gap:m.SPACING.lg},o[23]=k):k=o[23],o[24]!==p.surfaceHover?(w={flexDirection:"row",alignItems:"center",gap:m.SPACING.xs,paddingVertical:m.SPACING.sm,paddingHorizontal:m.SPACING.md,borderRadius:m.RADIUS.md,backgroundColor:p.surfaceHover},o[24]=p.surfaceHover,o[25]=w):w=o[25],o[26]!==p.foregroundMuted?(M=(0,_.jsx)(d.Plus,{size:14,color:p.foregroundMuted}),o[26]=p.foregroundMuted,o[27]=M):M=o[27],o[28]!==p.foregroundMuted?(R={color:p.foregroundMuted,fontSize:13,fontWeight:"600"},o[28]=p.foregroundMuted,o[29]=R):R=o[29],o[30]!==S?(z=S("v2.nc.rules.editor.addWindow"),o[30]=S,o[31]=z):z=o[31],o[32]!==R||o[33]!==z?(D=(0,_.jsx)(l.default,{style:R,children:z}),o[32]=R,o[33]=z,o[34]=D):D=o[34],o[35]!==I||o[36]!==M||o[37]!==D||o[38]!==w?(H=(0,_.jsxs)(n.default,{accessibilityRole:"button",onPress:I,style:w,children:[M,D]}),o[35]=I,o[36]=M,o[37]=D,o[38]=w,o[39]=H):H=o[39],o[40]!==p.border||o[41]!==p.foregroundSubtle||o[42]!==p.primary||o[43]!==C||o[44]!==v||o[45]!==S||o[46]!==y?(F=y.length>0?(0,_.jsxs)(n.default,{accessibilityRole:"button",accessibilityState:{selected:v},onPress:()=>C([...y],!v),style:{flexDirection:"row",alignItems:"center",gap:m.SPACING.xs},children:[(0,_.jsx)(i.default,{style:{width:16,height:16,borderRadius:m.RADIUS.sm,borderWidth:1.5,borderColor:v?p.primary:p.border,backgroundColor:v?p.primary:"transparent"}}),(0,_.jsx)(l.default,{style:{color:p.foregroundSubtle,fontSize:12},children:S("v2.nc.rules.editor.scheduleInvert")})]}):null,o[40]=p.border,o[41]=p.foregroundSubtle,o[42]=p.primary,o[43]=C,o[44]=v,o[45]=S,o[46]=y,o[47]=F):F=o[47],o[48]!==H||o[49]!==F?(L=(0,_.jsxs)(i.default,{style:k,children:[H,F]}),o[48]=H,o[49]=F,o[50]=L):L=o[50],o[51]!==L||o[52]!==G?(W=(0,_.jsxs)(i.default,{style:E,children:[G,L]}),o[51]=L,o[52]=G,o[53]=W):W=o[53],W}function V(e){const o=(0,t.c)(53),{window:f,onChange:b,onRemove:S}=e,{t:p}=(0,u.useTranslation)(),{colors:h}=(0,c.useTheme)();let y;o[0]!==b||o[1]!==f?(y=e=>{const t=f.days.includes(e)?f.days.filter(t=>t!==e):[...f.days,e];0!==t.length&&b(Object.assign({},f,{days:t}))},o[0]=b,o[1]=f,o[2]=y):y=o[2];const v=y;let x;o[3]!==h.background||o[4]!==h.border||o[5]!==h.foreground||o[6]!==h.foregroundSubtle?(x=(e,t)=>(0,_.jsx)(s.default,{defaultValue:e,onEndEditing:e=>t(e.nativeEvent.text),keyboardType:"numbers-and-punctuation",autoCapitalize:"none",autoCorrect:!1,placeholder:"HH:MM",placeholderTextColor:h.foregroundSubtle,style:{color:h.foreground,backgroundColor:h.background,borderColor:h.border,borderWidth:1,borderRadius:m.RADIUS.md,paddingHorizontal:m.SPACING.md,paddingVertical:m.SPACING.sm,fontSize:15,minWidth:68,textAlign:"center"}}),o[3]=h.background,o[4]=h.border,o[5]=h.foreground,o[6]=h.foregroundSubtle,o[7]=x):x=o[7];const C=x;let j,I,A,N,P,T,E,G,k,w,M,R,z;if(o[8]!==h.border?(j={gap:m.SPACING.sm,borderWidth:1,borderColor:h.border,borderRadius:m.RADIUS.md,padding:m.SPACING.md},o[8]=h.border,o[9]=j):j=o[9],o[10]===Symbol.for("react.memo_cache_sentinel")?(I={flexDirection:"row",alignItems:"center",gap:m.SPACING.md},o[10]=I):I=o[10],o[11]!==b||o[12]!==C||o[13]!==f){let e;o[15]!==b||o[16]!==f?(e=e=>b(Object.assign({},f,{startMinute:F(e)})),o[15]=b,o[16]=f,o[17]=e):e=o[17],A=C(H(f.startMinute),e),o[11]=b,o[12]=C,o[13]=f,o[14]=A}else A=o[14];if(o[18]!==h.foregroundSubtle?(N=(0,_.jsx)(l.default,{style:{color:h.foregroundSubtle,fontSize:14},children:"\u2192"}),o[18]=h.foregroundSubtle,o[19]=N):N=o[19],o[20]!==b||o[21]!==C||o[22]!==f){let e;o[24]!==b||o[25]!==f?(e=e=>b(Object.assign({},f,{endMinute:F(e)})),o[24]=b,o[25]=f,o[26]=e):e=o[26],P=C(H(f.endMinute),e),o[20]=b,o[21]=C,o[22]=f,o[23]=P}else P=o[23];return o[27]===Symbol.for("react.memo_cache_sentinel")?(T=(0,_.jsx)(i.default,{style:{flex:1}}),o[27]=T):T=o[27],o[28]!==h.danger?(E=(0,_.jsx)(d.Trash2,{size:16,color:h.danger}),o[28]=h.danger,o[29]=E):E=o[29],o[30]!==S||o[31]!==E?(G=(0,_.jsx)(n.default,{accessibilityRole:"button",onPress:S,hitSlop:6,children:E}),o[30]=S,o[31]=E,o[32]=G):G=o[32],o[33]!==G||o[34]!==A||o[35]!==N||o[36]!==P?(k=(0,_.jsxs)(i.default,{style:I,children:[A,N,P,T,G]}),o[33]=G,o[34]=A,o[35]=N,o[36]=P,o[37]=k):k=o[37],o[38]===Symbol.for("react.memo_cache_sentinel")?(w={flexDirection:"row",flexWrap:"wrap",gap:m.SPACING.xs},o[38]=w):w=o[38],o[39]!==h.foregroundSubtle||o[40]!==h.primary||o[41]!==h.primaryForeground||o[42]!==h.surfaceHover||o[43]!==p||o[44]!==v||o[45]!==f.days?(M=D.map(e=>{const t=f.days.includes(e.value);return(0,_.jsx)(n.default,{accessibilityRole:"button",accessibilityState:{selected:t},onPress:()=>v(e.value),style:{paddingVertical:m.SPACING.xs,paddingHorizontal:m.SPACING.sm,borderRadius:m.RADIUS.sm,backgroundColor:t?h.primary:h.surfaceHover},children:(0,_.jsx)(l.default,{style:{color:t?h.primaryForeground:h.foregroundSubtle,fontSize:11,fontWeight:"600"},children:p(`v2.nc.rules.editor.weekday.${e.labelKey}`)})},e.value)}),o[39]=h.foregroundSubtle,o[40]=h.primary,o[41]=h.primaryForeground,o[42]=h.surfaceHover,o[43]=p,o[44]=v,o[45]=f.days,o[46]=M):M=o[46],o[47]!==M?(R=(0,_.jsx)(i.default,{style:w,children:M}),o[47]=M,o[48]=R):R=o[48],o[49]!==k||o[50]!==R||o[51]!==j?(z=(0,_.jsxs)(i.default,{style:j,children:[k,R]}),o[49]=k,o[50]=R,o[51]=j,o[52]=z):z=o[52],z}function W(e){const o=(0,t.c)(13),{value:n}=e,{t:l,i18n:s}=(0,u.useTranslation)();if(void 0===n){let e,t;return o[0]!==l?(e=l("v2.nc.rules.editor.deviceStateNone"),o[0]=l,o[1]=e):e=o[1],o[2]!==e?(t=(0,_.jsx)(b.Hint,{text:e}),o[2]=e,o[3]=t):t=o[3],t}let i,d;if(o[4]!==s||o[5]!==l||o[6]!==n.deviceId||o[7]!==n.states){let e;o[9]!==s?(e=e=>(0,S.stateLabelFor)(e,s.language),o[9]=s,o[10]=e):e=o[10],i=l("v2.nc.rules.editor.deviceStateSet",{deviceId:n.deviceId,states:n.states.map(e).join(", ")}),o[4]=s,o[5]=l,o[6]=n.deviceId,o[7]=n.states,o[8]=i}else i=o[8];return o[11]!==i?(d=(0,_.jsx)(b.Hint,{text:i}),o[11]=i,o[12]=d):d=o[12],d}function K(e){const o=(0,t.c)(11),{value:n}=e,{t:l,i18n:s}=(0,u.useTranslation)();if(void 0===n){let e,t;return o[0]!==l?(e=l("v2.nc.rules.editor.sceneGateNone"),o[0]=l,o[1]=e):e=o[1],o[2]!==e?(t=(0,_.jsx)(b.Hint,{text:e}),o[2]=e,o[3]=t):t=o[3],t}let i,d;return o[4]!==s.language||o[5]!==l||o[6]!==n.requiredState||o[7]!==n.sceneId?(i=l("v2.nc.rules.editor.sceneGateSet",{sceneId:n.sceneId,state:(0,S.stateLabelFor)(n.requiredState,s.language)}),o[4]=s.language,o[5]=l,o[6]=n.requiredState,o[7]=n.sceneId,o[8]=i):i=o[8],o[9]!==i?(d=(0,_.jsx)(b.Hint,{text:i}),o[9]=i,o[10]=d):d=o[10],d}},1172,[787,16,248,194,258,115,813,814,789,903,831,1248,2649,2650,2657,1249,2660,2662,1195,1187,1250,2664,1178,10]);
228
228
  __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"NC_RULE_AI_SHAPES",{enumerable:!0,get:function(){return o}}),e.ruleAiShapeForForm=function(n,t){return'occupancy'===n?'occupancy':'track-end'===t?'detection-track':'detection-immediate'},e.ruleAiApplies=function(t){return(0,n.ruleKindSpec)(t).carriesMedia},Object.defineProperty(e,"NC_RULE_AI_DEFAULT_PROMPT",{enumerable:!0,get:function(){return u}}),e.ruleAiDefaultPromptKey=function(n){return`v2.nc.rules.ai.defaultPrompt.${n}`},Object.defineProperty(e,"NC_RULE_AI_WORDS_FALLBACK",{enumerable:!0,get:function(){return c}}),Object.defineProperty(e,"NC_RULE_AI_WORDS_FLOOR_CHARS",{enumerable:!0,get:function(){return l}}),Object.defineProperty(e,"NC_RULE_AI_WORDS_PER_DOUBLING",{enumerable:!0,get:function(){return s}}),e.ruleAiWordCap=p,e.ruleAiTargetWordDefault=function(n,t,o){const u=[];for(const c of n){const n=t.find(n=>n.id===c);if(void 0===n)continue;const l=o.find(t=>t.kind===n.kind);void 0!==l&&u.push(l.caps.bodyMaxLen)}if(0===u.length)return{words:c,varies:!1};const l=u.map(n=>p(void 0,n)),s=Math.min(...l);return{words:s,varies:l.some(n=>n!==s)}},e.emptyRuleAiForm=f,e.ruleAiToForm=function(n){return void 0===n?f():{enabled:n.enabled,profileId:n.profileId??'',prompt:n.prompt,language:n.language,maxWords:n.maxWords,carried:Object.assign({},void 0!==n.maxImagePx?{maxImagePx:n.maxImagePx}:{},void 0!==n.timeoutMs?{timeoutMs:n.timeoutMs}:{})}},e.ruleAiPromptValue=function(n,t){return n.prompt??u[t]},e.ruleAiWordsValue=function(n,t){return n.maxWords??t},e.ruleAiFormToInput=function(n,t,o){const c=n.prompt?.trim()??'',l=c.length>0&&c!==u[t],s=void 0!==n.maxWords&&n.maxWords!==o,p=void 0!==n.carried.maxImagePx||void 0!==n.carried.timeoutMs,f=l||s||p||''!==n.profileId||void 0!==n.language;return n.enabled||f?Object.assign({enabled:n.enabled},''!==n.profileId?{profileId:n.profileId}:{},l?{prompt:c}:{},void 0!==n.language?{language:n.language}:{},s&&void 0!==n.maxWords?{maxWords:n.maxWords}:{},n.carried):null},e.ruleAiUnchanged=function(n,t){return null===n?void 0===t:void 0!==t&&(n.enabled===t.enabled&&n.profileId===t.profileId&&n.prompt===t.prompt&&n.language===t.language&&n.maxWords===t.maxWords&&n.maxImagePx===t.maxImagePx&&n.timeoutMs===t.timeoutMs)},e.ruleAiLanguageKey=function(n){return`v2.nc.rules.editor.ai.language.${n}`},Object.defineProperty(e,"NC_RULE_AI_LANGUAGES",{enumerable:!0,get:function(){return _}}),e.ruleAiProfileLabel=function(n){return n.model.length>0?`${n.name} \xb7 ${n.model}`:n.name};var n=r(d[0]),t=r(d[1]);const o=['occupancy','detection-immediate','detection-track'];const u={occupancy:'Does the claimed count hold?','detection-immediate':'What is in this picture?','detection-track':'What happened during this passage?'};const c=24,l=250,s=12;function p(n,o){if(void 0!==n)return n;if(void 0===o||!Number.isFinite(o)||o<=0)return c;const u=Math.log2(o/l),p=Math.round(s*u);return Math.min(t.NC_RULE_AI_WORDS_MAX,Math.max(t.NC_RULE_AI_WORDS_MIN,p))}function f(){return{enabled:!1,profileId:'',prompt:void 0,language:void 0,maxWords:void 0,carried:{}}}const _=['en','it']},1173,[1170,1166]);
@@ -2450,7 +2450,7 @@ __d(function(g,r,_i,a,m,_e,_d){"use strict";function e(e){if(e&&e.__esModule)ret
2450
2450
  __d(function(g,r,i,a,m,_e,_d){"use strict";function e(e){if(e&&e.__esModule)return e;var n={};return e&&Object.keys(e).forEach(function(t){var o=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(n,t,o.get?o:{enumerable:!0,get:function(){return e[t]}})}),n.default=e,n}Object.defineProperty(_e,'__esModule',{value:!0}),_e.string=function(e){return n._coercedString(t.ZodString,e)},_e.number=function(e){return n._coercedNumber(t.ZodNumber,e)},_e.boolean=function(e){return n._coercedBoolean(t.ZodBoolean,e)},_e.bigint=function(e){return n._coercedBigint(t.ZodBigInt,e)},_e.date=function(e){return n._coercedDate(t.ZodDate,e)};var n=e(r(_d[0])),t=e(r(_d[1]))},1709,[1633,1702]);
2451
2451
  __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"UI_HAPTIC_INTENTS",{enumerable:!0,get:function(){return t}}),e.hapticKindForIntent=n,e.isUiHapticEnabled=c,e.resolveUiHaptic=function(t,u){return c(t)?n(u):null};const t=['tap','action','detent','success','error'];function n(t){switch(t){case'tap':return'impact-light';case'action':return'impact-medium';case'detent':return'selection';case'success':return'notification-success';case'error':return'notification-error'}}function c(t){return t.uiFeedback}},1710,[]);
2452
2452
  __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.isOnCameraRoute=n,e.resolveCamerasPress=function(u,o){if(n(u))return{kind:'list',forget:!0};if('/cameras'===u)return{kind:'noop'};if(null!==o)return{kind:'camera',href:(0,t.cameraRoute)(o)};return{kind:'list',forget:!1}};var t=r(d[0]);function n(t){return/^\/camera\/\d+/.test(t)}},1711,[985]);
2453
- __d(function(g,_r,_i,a,m,_e,d){"use strict";Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"SystemController",{enumerable:!0,get:function(){return p}});var e=_r(d[0]),t=_r(d[1]),s=_r(d[2]),n=_r(d[3]),r=_r(d[4]),i=_r(d[5]),o=_r(d[6]),c=_r(d[7]),h=_r(d[8]),u=_r(d[9]),l=_r(d[10]);class p{system=null;prevState='connecting';tracker=new i.LifecycleTracker('connecting');routePass=null;selfSwitchPending=!1;selfSwitchConnectedAtMs=null;lastEndpoints=[];suspended=!1;suspendedAtMs=null;constructor(e){this.config=e,this.pageProtocol=void 0===e.pageProtocol?(0,l.currentPageProtocol)():e.pageProtocol,this.candidates=(0,l.dropMixedContentUrls)(e.candidates,this.pageProtocol);const t=e.pinnedRouteUrl??null,s=null!==t&&(0,l.isMixedContentUrl)(t,this.pageProtocol)?null:t;this.pinnedRouteUrl=null!==s&&(0,l.isIpv6Url)(s)&&!this.candidates.includes(s)?null:s,this.route=(0,h.describeRoute)(e.serverUrl,[],'initial')}adoptRoute(e,t){const s=(0,h.normaliseBaseUrl)(e)===this.route.url,n='unchanged'===t&&s?this.route.reason:t;this.route=(0,h.describeRoute)(e,this.lastEndpoints,n),(0,i.traceRoute)(this.route)}subscribe(e){return this.onStateChange=e.onStateChange,this.onUnauthorized=e.onUnauthorized,()=>{this.onStateChange===e.onStateChange&&(this.onStateChange=void 0),this.onUnauthorized===e.onUnauthorized&&(this.onUnauthorized=void 0)}}async connect(){this.system=(0,e.createSystem)({serverUrl:this.config.serverUrl,token:this.config.token,onConnectionChange:e=>{this.handleStateChange(e)}}),(0,o.markBoot)('transportCreated',{candidates:this.candidates.length}),this.prevState='connected',this.optimiseRoute('connect'),this.verifySession()}async verifySession(){const e=this.system;if(e)try{await e.awaitConnected(),this.system===e&&((0,o.markBoot)('transportReady'),this.onStateChange?.('connected'))}catch(s){if((0,t.isUnauthorizedError)(s))return void this.onUnauthorized?.();if(this.selfSwitchPending)return;this.system===e&&this.onStateChange?.('disconnected')}}async handleStateChange(e){if(this.suspended)return this.prevState='connecting',void(0,i.traceConnection)(this.tracker.transition(e),{suspended:!0,surfaced:!1});const t=this.prevState;this.prevState=e;const n=this.config.now?.()??Date.now(),r=this.selfSwitchPending;r&&'connecting'!==e&&(this.selfSwitchPending=!1),r&&'disconnected'===e&&(0,i.traceSwitchDropped)(this.system?.serverUrl??this.route.url,this.pinnedRouteUrl);const o=r&&'connected'===e;if(o&&(this.selfSwitchConnectedAtMs=n),'disconnected'===e&&(0,s.isStaleSwitchClose)(this.selfSwitchConnectedAtMs,n))return this.prevState=t,void(0,i.traceStaleSwitchClose)(this.system?.serverUrl??this.route.url,n-(this.selfSwitchConnectedAtMs??n));const c=(0,s.shouldRerace)(t,e)&&!o;(0,i.traceConnection)(this.tracker.transition(e),{rerace:c,selfSwitchEcho:o}),this.onStateChange?.(e),c&&await this.optimiseRoute('recovery')}async optimiseRoute(e){const t=this.routePass;if(t)return t;const s=(async()=>{try{await this.race(e),await this.discoverAndApply()}finally{this.routePass=null}})();return this.routePass=s,s}async routeSettled(){await this.routePass}async race(e){const t=this.pinnedRouteUrl?[this.pinnedRouteUrl]:[...this.candidates];if(!this.system||0===t.length)return;(0,i.traceRace)('start',{candidates:t.length,reason:e});const s=await this.runRace(t,1500),n=s.winner;for(const t of s.results)(0,i.traceCandidateResult)(t,{trigger:e,pinned:this.pinnedRouteUrl,channel:(0,h.describeRoute)(t.url,this.lastEndpoints,'initial').channel});if(n&&this.system){(0,o.markBoot)('routeDecided',{reason:e});const t=n.replace(/\/+$/,'')!==this.system.serverUrl.replace(/\/+$/,''),r=!t&&'connected'!==this.prevState;return t?(this.selfSwitchPending=!0,(0,o.markBoot)('routeSwitched',{winner:n}),this.system.switchServerUrl(n)):r?(this.selfSwitchPending=!0,this.system.reconnect()):this.system.switchServerUrl(n),(0,i.traceRace)('won',{winner:n,switched:t,rebuilt:r,reason:e,ms:s.results.find(e=>e.url===n)?.ms??null}),void this.adoptRoute(n,this.pinnedRouteUrl?'pinned':'race-won')}(0,i.traceRace)('failed',{hadWinner:null!==n,disposed:null===this.system,reason:e});const r=this.system;null!==r?this.adoptRoute(r.serverUrl,'no-winner'):this.adoptRoute(this.config.serverUrl,'disposed')}probeDeps(){return{fetchImpl:(e,t)=>fetch(e,t),now:()=>Date.now()}}runRace(e,t){const s=this.config.raceCandidatesImpl;return s?s(e,t):(0,c.raceCandidates)(e,t,this.probeDeps())}async discoverAndApply(){if(!this.system)return;const{port:e,scheme:t,explicitPort:s}=(0,l.parsePortScheme)(this.config.serverUrl),n=await(0,l.discoverEndpoints)(this.system,e,t);if(0===n.endpoints.length||!this.system)return;const r={explicitPort:s,declared:n.localPort},{kept:o,dropped:c}=(0,l.dropUnverifiedPortEndpoints)(n.endpoints,r);if(c.length>0?(0,i.traceCandidateProbe)({trigger:'inferred-port',dropped:c.map(e=>e.baseUrl),inferredPort:e,configuredUrl:this.config.serverUrl,note:'the hub declared no listen port and echoes ours, so these are unverifiable'}):null!==n.localPort&&(0,i.traceCandidateProbe)({trigger:'declared-port',declaredPort:n.localPort.port,declaredPortSource:n.localPort.source,configuredUrl:this.config.serverUrl}),0===o.length)return;this.lastEndpoints=o,this.config.onEndpointsDiscovered?.(o);const h=(0,l.dropMixedContentUrls)((0,l.endpointsToCandidates)(o,this.config.serverUrl),this.pageProtocol),u=h.length===this.candidates.length&&h.every((e,t)=>e===this.candidates[t]);if(this.candidates=h,u)return(0,i.traceRace)('failed',{reason:'candidates-unchanged',hadWinner:!0,disposed:!1}),void this.adoptRoute(this.system.serverUrl,'unchanged');await this.race('discovery')}suspendForBackground(){const e=this.system,t=(0,r.decideBackgroundSuspend)({suspended:this.suspended,hasTransport:null!==e,hasSocket:null!=e?.wsClient}),s=this.tracker.heldMs();if('suspend'!==t||null===e)return(0,i.traceBackgroundSuspend)(t,{state:this.prevState,heldMs:s}),t;this.suspended=!0,this.suspendedAtMs=this.config.now?.()??Date.now(),this.onStateChange?.('connecting');try{e.close()}catch(e){return(0,i.traceBackgroundSuspend)('close-failed',{heldMs:s,error:e instanceof Error?e.message:String(e)}),t}return(0,i.traceBackgroundSuspend)(t,{heldMs:s,route:this.route.url,state:this.prevState}),t}isSuspended(){return this.suspended}async handleForeground(e){return'resume'===(0,r.decideForegroundAction)(this.suspended)?this.resumeFromBackground(e):this.verifyAfterResume(e)}resumeFromBackground(e){const t=this.config.now?.()??Date.now(),s=null===this.suspendedAtMs?null:t-this.suspendedAtMs;this.suspended=!1,this.suspendedAtMs=null;const n=this.system;if(!n)return(0,i.traceBackgroundResume)('no-transport',{awayMs:e,backgroundMs:s}),'no-transport';try{n.reconnect()}catch(t){return(0,i.traceBackgroundResume)('resume-failed',{awayMs:e,backgroundMs:s,error:t instanceof Error?t.message:String(t)}),'resume-failed'}return(0,i.traceBackgroundResume)('resumed',{awayMs:e,backgroundMs:s,route:this.route.url}),'resumed'}async verifyAfterResume(e){const s=(0,n.decideResumeProbe)({awayMs:e,state:this.prevState});if('probe'!==s)return(0,i.traceResumeProbe)(s,{awayMs:e,state:this.prevState}),s;const r=this.system;if(!r)return(0,i.traceResumeProbe)('no-transport',{awayMs:e}),'no-transport';const o=Date.now();try{return await(0,u.withQueryDeadline)(r.trpcClient.auth.me.query(),'auth.me (resume probe)',n.RESUME_PROBE_DEADLINE_MS),(0,i.traceResumeProbe)('healthy',{awayMs:e,ms:Date.now()-o}),'healthy'}catch(s){if((0,t.isUnauthorizedError)(s))return(0,i.traceResumeProbe)('unauthorized',{awayMs:e,ms:Date.now()-o}),this.onUnauthorized?.(),'unauthorized';if(this.system!==r)return(0,i.traceResumeProbe)('no-transport',{awayMs:e,disposed:!0}),'no-transport';(0,i.traceResumeProbe)('rebuilt',{awayMs:e,ms:Date.now()-o,error:s instanceof Error?s.message:String(s)});try{r.reconnect()}catch(t){return(0,i.traceResumeProbe)('rebuild-failed',{awayMs:e,error:t instanceof Error?t.message:String(t)}),'rebuild-failed'}return'rebuilt'}}async reprobe(){await this.optimiseRoute('reprobe')}getSystem(){return this.system}get configuredServerUrl(){return this.config.serverUrl}getCandidates(){return this.candidates}getRoute(){return this.route}getPinnedRouteUrl(){return this.pinnedRouteUrl}async diagnoseRoutes(e={}){const t=[],s=e=>{if(!e||(0,l.isMixedContentUrl)(e,this.pageProtocol))return;const s=e.replace(/\/+$/,'');t.includes(s)||t.push(s)};for(const e of this.lastEndpoints)s(e.baseUrl);for(const e of this.candidates)s(e);s(this.pinnedRouteUrl),s(this.route.url),s(this.config.serverUrl),(0,i.traceRace)('start',Object.assign({candidates:t.length,reason:'diagnose'},e,{urls:t,pin:this.pinnedRouteUrl}));const n=await(0,c.probeCandidates)(t,1500,this.probeDeps());for(const e of n)(0,i.traceCandidateResult)(e,{trigger:'diagnose',pinned:this.pinnedRouteUrl});const r=n.filter(e=>e.ok).length;return(0,i.traceRace)(0===r?'failed':'won',{reason:'diagnose',ok:r,fail:n.length-r,total:n.length}),n}async setPinnedRouteUrl(e){const t=null===e||''===e?null:(0,h.normaliseBaseUrl)(e);null!==t&&(0,l.isMixedContentUrl)(t,this.pageProtocol)||(null===t||!(0,l.isIpv6Url)(t)||this.candidates.includes(t)||this.lastEndpoints.some(e=>e.baseUrl===t))&&t!==this.pinnedRouteUrl&&(this.pinnedRouteUrl=t,(0,i.traceRace)('start',{reason:'pin',pinned:t,candidates:null===t?this.candidates.length:1}),await this.optimiseRoute(null===t?'reprobe':'pin'))}dispose(){this.system?.close(),this.system=null,this.suspended=!1,this.suspendedAtMs=null}}},1712,[1713,1738,1739,1740,981,980,1279,1742,1741,824,950]);
2453
+ __d(function(g,_r,_i,a,m,_e,d){"use strict";Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"SystemController",{enumerable:!0,get:function(){return p}});var e=_r(d[0]),t=_r(d[1]),s=_r(d[2]),n=_r(d[3]),r=_r(d[4]),i=_r(d[5]),o=_r(d[6]),c=_r(d[7]),l=_r(d[8]),u=_r(d[9]),h=_r(d[10]);class p{system=null;prevState='connecting';tracker=new i.LifecycleTracker('connecting');routePass=null;selfSwitchPending=!1;selfSwitchConnectedAtMs=null;lastEndpoints=[];suspended=!1;suspendedAtMs=null;constructor(e){this.config=e,this.pageProtocol=void 0===e.pageProtocol?(0,h.currentPageProtocol)():e.pageProtocol,this.candidates=(0,h.dropMixedContentUrls)(e.candidates,this.pageProtocol);const t=e.pinnedRouteUrl??null,s=null!==t&&(0,h.isMixedContentUrl)(t,this.pageProtocol)?null:t;this.pinnedRouteUrl=null!==s&&(0,h.isIpv6Url)(s)&&!this.candidates.includes(s)?null:s,this.route=(0,l.describeRoute)(e.serverUrl,[],'initial')}adoptRoute(e,t){const s=(0,l.normaliseBaseUrl)(e)===this.route.url,n='unchanged'===t&&s?this.route.reason:t;this.route=(0,l.describeRoute)(e,this.lastEndpoints,n),(0,i.traceRoute)(this.route)}subscribe(e){return this.onStateChange=e.onStateChange,this.onUnauthorized=e.onUnauthorized,()=>{this.onStateChange===e.onStateChange&&(this.onStateChange=void 0),this.onUnauthorized===e.onUnauthorized&&(this.onUnauthorized=void 0)}}async connect(){this.system=(0,e.createSystem)({serverUrl:this.config.serverUrl,token:this.config.token,onConnectionChange:e=>{this.handleStateChange(e)}}),(0,o.markBoot)('transportCreated',{candidates:this.candidates.length}),this.prevState='connected',this.optimiseRoute('connect'),this.verifySession()}async verifySession(){const e=this.system;if(e)try{await e.awaitConnected(),this.system===e&&((0,o.markBoot)('transportReady'),this.onStateChange?.('connected'))}catch(s){if((0,t.isUnauthorizedError)(s))return void this.onUnauthorized?.();if(this.selfSwitchPending)return;this.system===e&&this.onStateChange?.('disconnected')}}async handleStateChange(e){if(this.suspended)return this.prevState='connecting',void(0,i.traceConnection)(this.tracker.transition(e),{suspended:!0,surfaced:!1});const t=this.prevState;this.prevState=e;const n=this.config.now?.()??Date.now(),r=this.selfSwitchPending;r&&'connecting'!==e&&(this.selfSwitchPending=!1),r&&'disconnected'===e&&(0,i.traceSwitchDropped)(this.system?.serverUrl??this.route.url,this.pinnedRouteUrl);const o=r&&'connected'===e;if(o&&(this.selfSwitchConnectedAtMs=n),'disconnected'===e&&(0,s.isStaleSwitchClose)(this.selfSwitchConnectedAtMs,n))return this.prevState=t,void(0,i.traceStaleSwitchClose)(this.system?.serverUrl??this.route.url,n-(this.selfSwitchConnectedAtMs??n));const c=(0,s.shouldRerace)(t,e)&&!o;(0,i.traceConnection)(this.tracker.transition(e),{rerace:c,selfSwitchEcho:o}),this.onStateChange?.(e),c&&await this.optimiseRoute('recovery')}async optimiseRoute(e){const t=this.routePass;if(t)return t;const s=(async()=>{try{await this.race(e),await this.discoverAndApply()}finally{this.routePass=null}})();return this.routePass=s,s}async routeSettled(){await this.routePass}async race(e){const t=this.pinnedRouteUrl?[this.pinnedRouteUrl]:[...this.candidates];if(!this.system||0===t.length)return;(0,i.traceRace)('start',{candidates:t.length,reason:e});const s=await this.runRace(t,1500),n=s.winner;for(const t of s.results)(0,i.traceCandidateResult)(t,{trigger:e,pinned:this.pinnedRouteUrl,channel:(0,l.describeRoute)(t.url,this.lastEndpoints,'initial').channel});if(n&&this.system){(0,o.markBoot)('routeDecided',{reason:e});const t=n.replace(/\/+$/,'')!==this.system.serverUrl.replace(/\/+$/,''),r=!t&&'connected'!==this.prevState;return t?(this.selfSwitchPending=!0,(0,o.markBoot)('routeSwitched',{winner:n}),this.system.switchServerUrl(n)):r?(this.selfSwitchPending=!0,this.system.reconnect()):this.system.switchServerUrl(n),(0,i.traceRace)('won',{winner:n,switched:t,rebuilt:r,reason:e,ms:s.results.find(e=>e.url===n)?.ms??null}),void this.adoptRoute(n,this.pinnedRouteUrl?'pinned':'race-won')}(0,i.traceRace)('failed',{hadWinner:null!==n,disposed:null===this.system,reason:e});const r=this.system;null!==r?this.adoptRoute(r.serverUrl,'no-winner'):this.adoptRoute(this.config.serverUrl,'disposed')}probeDeps(){return{fetchImpl:(e,t)=>fetch(e,t),now:()=>Date.now()}}runRace(e,t){const s=this.config.raceCandidatesImpl;return s?s(e,t):(0,c.raceCandidates)(e,t,this.probeDeps())}async discoverAndApply(){if(!this.system)return;const{port:e,scheme:t,explicitPort:s}=(0,h.parsePortScheme)(this.config.serverUrl),n=await(0,h.discoverEndpoints)(this.system,e,t);if(0===n.endpoints.length||!this.system)return;const r={explicitPort:s,declared:n.localPort},{kept:o,dropped:c}=(0,h.dropUnverifiedPortEndpoints)(n.endpoints,r),l=(0,h.withSecureLanTwins)(o,n.localPort,this.pageProtocol),u=l.filter(e=>!o.some(t=>t.baseUrl===e.baseUrl));if(u.length>0&&(0,i.traceCandidateProbe)({trigger:'secure-lan-twin',added:u.map(e=>e.baseUrl),declaredPort:n.localPort?.port??null,note:'plain-http LAN addresses replaced by the hub TLS listener on an https page'}),c.length>0?(0,i.traceCandidateProbe)({trigger:'inferred-port',dropped:c.map(e=>e.baseUrl),inferredPort:e,configuredUrl:this.config.serverUrl,note:'the hub declared no listen port and echoes ours, so these are unverifiable'}):null!==n.localPort&&(0,i.traceCandidateProbe)({trigger:'declared-port',declaredPort:n.localPort.port,declaredPortSource:n.localPort.source,configuredUrl:this.config.serverUrl}),0===l.length)return;this.lastEndpoints=l,this.config.onEndpointsDiscovered?.(l);const p=(0,h.dropMixedContentUrls)((0,h.endpointsToCandidates)(l,this.config.serverUrl),this.pageProtocol),f=p.length===this.candidates.length&&p.every((e,t)=>e===this.candidates[t]);if(this.candidates=p,f)return(0,i.traceRace)('failed',{reason:'candidates-unchanged',hadWinner:!0,disposed:!1}),void this.adoptRoute(this.system.serverUrl,'unchanged');await this.race('discovery')}suspendForBackground(){const e=this.system,t=(0,r.decideBackgroundSuspend)({suspended:this.suspended,hasTransport:null!==e,hasSocket:null!=e?.wsClient}),s=this.tracker.heldMs();if('suspend'!==t||null===e)return(0,i.traceBackgroundSuspend)(t,{state:this.prevState,heldMs:s}),t;this.suspended=!0,this.suspendedAtMs=this.config.now?.()??Date.now(),this.onStateChange?.('connecting');try{e.close()}catch(e){return(0,i.traceBackgroundSuspend)('close-failed',{heldMs:s,error:e instanceof Error?e.message:String(e)}),t}return(0,i.traceBackgroundSuspend)(t,{heldMs:s,route:this.route.url,state:this.prevState}),t}isSuspended(){return this.suspended}async handleForeground(e){return'resume'===(0,r.decideForegroundAction)(this.suspended)?this.resumeFromBackground(e):this.verifyAfterResume(e)}resumeFromBackground(e){const t=this.config.now?.()??Date.now(),s=null===this.suspendedAtMs?null:t-this.suspendedAtMs;this.suspended=!1,this.suspendedAtMs=null;const n=this.system;if(!n)return(0,i.traceBackgroundResume)('no-transport',{awayMs:e,backgroundMs:s}),'no-transport';try{n.reconnect()}catch(t){return(0,i.traceBackgroundResume)('resume-failed',{awayMs:e,backgroundMs:s,error:t instanceof Error?t.message:String(t)}),'resume-failed'}return(0,i.traceBackgroundResume)('resumed',{awayMs:e,backgroundMs:s,route:this.route.url}),'resumed'}async verifyAfterResume(e){const s=(0,n.decideResumeProbe)({awayMs:e,state:this.prevState});if('probe'!==s)return(0,i.traceResumeProbe)(s,{awayMs:e,state:this.prevState}),s;const r=this.system;if(!r)return(0,i.traceResumeProbe)('no-transport',{awayMs:e}),'no-transport';const o=Date.now();try{return await(0,u.withQueryDeadline)(r.trpcClient.auth.me.query(),'auth.me (resume probe)',n.RESUME_PROBE_DEADLINE_MS),(0,i.traceResumeProbe)('healthy',{awayMs:e,ms:Date.now()-o}),'healthy'}catch(s){if((0,t.isUnauthorizedError)(s))return(0,i.traceResumeProbe)('unauthorized',{awayMs:e,ms:Date.now()-o}),this.onUnauthorized?.(),'unauthorized';if(this.system!==r)return(0,i.traceResumeProbe)('no-transport',{awayMs:e,disposed:!0}),'no-transport';(0,i.traceResumeProbe)('rebuilt',{awayMs:e,ms:Date.now()-o,error:s instanceof Error?s.message:String(s)});try{r.reconnect()}catch(t){return(0,i.traceResumeProbe)('rebuild-failed',{awayMs:e,error:t instanceof Error?t.message:String(t)}),'rebuild-failed'}return'rebuilt'}}async reprobe(){await this.optimiseRoute('reprobe')}getSystem(){return this.system}get configuredServerUrl(){return this.config.serverUrl}getCandidates(){return this.candidates}getRoute(){return this.route}getPinnedRouteUrl(){return this.pinnedRouteUrl}async diagnoseRoutes(e={}){const t=[],s=e=>{if(!e||(0,h.isMixedContentUrl)(e,this.pageProtocol))return;const s=e.replace(/\/+$/,'');t.includes(s)||t.push(s)};for(const e of this.lastEndpoints)s(e.baseUrl);for(const e of this.candidates)s(e);s(this.pinnedRouteUrl),s(this.route.url),s(this.config.serverUrl),(0,i.traceRace)('start',Object.assign({candidates:t.length,reason:'diagnose'},e,{urls:t,pin:this.pinnedRouteUrl}));const n=await(0,c.probeCandidates)(t,1500,this.probeDeps());for(const e of n)(0,i.traceCandidateResult)(e,{trigger:'diagnose',pinned:this.pinnedRouteUrl});const r=n.filter(e=>e.ok).length;return(0,i.traceRace)(0===r?'failed':'won',{reason:'diagnose',ok:r,fail:n.length-r,total:n.length}),n}async setPinnedRouteUrl(e){const t=null===e||''===e?null:(0,l.normaliseBaseUrl)(e);return null!==t&&(0,h.isMixedContentUrl)(t,this.pageProtocol)?((0,i.traceRace)('failed',{reason:'pin-refused',pinned:t,refusal:'mixed-content'}),{kind:'refused',reason:'mixed-content'}):null===t||!(0,h.isIpv6Url)(t)||this.candidates.includes(t)||this.lastEndpoints.some(e=>e.baseUrl===t)?(t===this.pinnedRouteUrl||(this.pinnedRouteUrl=t,(0,i.traceRace)('start',{reason:'pin',pinned:t,candidates:null===t?this.candidates.length:1}),await this.optimiseRoute(null===t?'reprobe':'pin')),{kind:'applied'}):((0,i.traceRace)('failed',{reason:'pin-refused',pinned:t,refusal:'unknown-ipv6'}),{kind:'refused',reason:'unknown-ipv6'})}dispose(){this.system?.close(),this.system=null,this.suspended=!1,this.suspendedAtMs=null}}},1712,[1713,1738,1739,1740,981,980,1279,1742,1741,824,950]);
2454
2454
  __d(function(g,_r,_i,_a,_m,_e,d){"use strict";Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"DEFAULT_ENABLED_CLASSES",{enumerable:!0,get:function(){return Ve}}),Object.defineProperty(_e,"DetectionClass",{enumerable:!0,get:function(){return le}}),Object.defineProperty(_e,"System",{enumerable:!0,get:function(){return oe}}),Object.defineProperty(_e,"TIMELINE_PRESET_ALL",{enumerable:!0,get:function(){return ze}}),Object.defineProperty(_e,"TIMELINE_PRESET_CRITICAL",{enumerable:!0,get:function(){return Le}}),Object.defineProperty(_e,"TIMELINE_PRESET_IMPORTANT",{enumerable:!0,get:function(){return Ue}}),Object.defineProperty(_e,"animalClasses",{enumerable:!0,get:function(){return ue}}),Object.defineProperty(_e,"audioClasses",{enumerable:!0,get:function(){return me}}),Object.defineProperty(_e,"audioLabelClasses",{enumerable:!0,get:function(){return be}}),Object.defineProperty(_e,"createSystem",{enumerable:!0,get:function(){return ae}}),Object.defineProperty(_e,"defaultDetectionClasses",{enumerable:!0,get:function(){return Be}}),Object.defineProperty(_e,"detectionClassesDefaultMap",{enumerable:!0,get:function(){return Pe}}),Object.defineProperty(_e,"doorbellClasses",{enumerable:!0,get:function(){return we}}),Object.defineProperty(_e,"faceClasses",{enumerable:!0,get:function(){return de}}),Object.defineProperty(_e,"getClassesForTimelinePreset",{enumerable:!0,get:function(){return Ne}}),Object.defineProperty(_e,"getParentClass",{enumerable:!0,get:function(){return xe}}),Object.defineProperty(_e,"getParentDetectionClass",{enumerable:!0,get:function(){return Me}}),Object.defineProperty(_e,"isAnimalClassname",{enumerable:!0,get:function(){return Ce}}),Object.defineProperty(_e,"isAudioClassname",{enumerable:!0,get:function(){return Ae}}),Object.defineProperty(_e,"isDoorbellClassname",{enumerable:!0,get:function(){return Ie}}),Object.defineProperty(_e,"isFaceClassname",{enumerable:!0,get:function(){return ke}}),Object.defineProperty(_e,"isLabelDetection",{enumerable:!0,get:function(){return De}}),Object.defineProperty(_e,"isMotionClassname",{enumerable:!0,get:function(){return Te}}),Object.defineProperty(_e,"isPackageClassname",{enumerable:!0,get:function(){return Se}}),Object.defineProperty(_e,"isPersonClassname",{enumerable:!0,get:function(){return je}}),Object.defineProperty(_e,"isPlateClassname",{enumerable:!0,get:function(){return Oe}}),Object.defineProperty(_e,"isSensorLabelClassname",{enumerable:!0,get:function(){return Re}}),Object.defineProperty(_e,"isVehicleClassname",{enumerable:!0,get:function(){return Ee}}),Object.defineProperty(_e,"licensePlateClasses",{enumerable:!0,get:function(){return fe}}),Object.defineProperty(_e,"motionClasses",{enumerable:!0,get:function(){return ye}}),Object.defineProperty(_e,"packageClasses",{enumerable:!0,get:function(){return ge}}),Object.defineProperty(_e,"personClasses",{enumerable:!0,get:function(){return he}}),Object.defineProperty(_e,"raceFastestEndpoint",{enumerable:!0,get:function(){return ce}}),Object.defineProperty(_e,"sensorLabelClasses",{enumerable:!0,get:function(){return ve}}),Object.defineProperty(_e,"vehicleClasses",{enumerable:!0,get:function(){return pe}});var e=_r(d[0]),t=_r(d[1]),r=class{constructor(){this.keyToValue=new Map,this.valueToKey=new Map}set(e,t){this.keyToValue.set(e,t),this.valueToKey.set(t,e)}getByKey(e){return this.keyToValue.get(e)}getByValue(e){return this.valueToKey.get(e)}clear(){this.keyToValue.clear(),this.valueToKey.clear()}},n=class{constructor(e){this.generateIdentifier=e,this.kv=new r}register(e,t){this.kv.getByValue(e)||(t||(t=this.generateIdentifier(e)),this.kv.set(t,e))}clear(){this.kv.clear()}getIdentifier(e){return this.kv.getByValue(e)}getValue(e){return this.kv.getByKey(e)}},s=class extends n{constructor(){super(e=>e.name),this.classToAllowedProps=new Map}register(e,t){"object"==typeof t?(t.allowProps&&this.classToAllowedProps.set(e,t.allowProps),super.register(e,t.identifier)):super.register(e,t)}getAllowedProps(e){return this.classToAllowedProps.get(e)}};function i(e){if("values"in Object)return Object.values(e);const t=[];for(const r in e)e.hasOwnProperty(r)&&t.push(e[r]);return t}function o(e,t){const r=i(e);if("find"in r)return r.find(t);const n=r;for(let e=0;e<n.length;e++){const r=n[e];if(t(r))return r}}function a(e,t){Object.entries(e).forEach(([e,r])=>t(r,e))}function c(e,t){return-1!==e.indexOf(t)}function l(e,t){for(let r=0;r<e.length;r++){const n=e[r];if(t(n))return n}}var u=class{constructor(){this.transfomers={}}register(e){this.transfomers[e.name]=e}findApplicable(e){return o(this.transfomers,t=>t.isApplicable(e))}findByName(e){return this.transfomers[e]}},h=e=>Object.prototype.toString.call(e).slice(8,-1),p=e=>void 0===e,f=e=>null===e,y=e=>"object"==typeof e&&null!==e&&(e!==Object.prototype&&(null===Object.getPrototypeOf(e)||Object.getPrototypeOf(e)===Object.prototype)),m=e=>y(e)&&0===Object.keys(e).length,b=e=>Array.isArray(e),w=e=>"string"==typeof e,_=e=>"number"==typeof e&&!isNaN(e),v=e=>"boolean"==typeof e,P=e=>e instanceof Map,k=e=>e instanceof Set,O=e=>"Symbol"===h(e),C=e=>e instanceof Error,j=e=>"number"==typeof e&&isNaN(e),E=e=>e.replace(/\\/g,"\\\\").replace(/\./g,"\\."),T=e=>e.map(String).map(E).join("."),I=(e,t)=>{const r=[];let n="";for(let s=0;s<e.length;s++){let i=e.charAt(s);if(!t&&"\\"===i){const t=e.charAt(s+1);if("\\"===t){n+="\\",s++;continue}if("."!==t)throw Error("invalid path")}"\\"!==i||"."!==e.charAt(s+1)?"."!==i?n+=i:(r.push(n),n=""):(n+=".",s++)}const s=n;return r.push(s),r};function S(e,t,r,n){return{isApplicable:e,annotation:t,transform:r,untransform:n}}var A=[S(p,"undefined",()=>null,()=>{}),S(e=>"bigint"==typeof e,"bigint",e=>e.toString(),e=>"undefined"!=typeof BigInt?BigInt(e):(console.error("Please add a BigInt polyfill."),e)),S(e=>e instanceof Date&&!isNaN(e.valueOf()),"Date",e=>e.toISOString(),e=>new Date(e)),S(C,"Error",(e,t)=>{const r={name:e.name,message:e.message};return"cause"in e&&(r.cause=e.cause),t.allowedErrorProps.forEach(t=>{r[t]=e[t]}),r},(e,t)=>{const r=new Error(e.message,{cause:e.cause});return r.name=e.name,r.stack=e.stack,t.allowedErrorProps.forEach(t=>{r[t]=e[t]}),r}),S(e=>e instanceof RegExp,"regexp",e=>""+e,e=>{const t=e.slice(1,e.lastIndexOf("/")),r=e.slice(e.lastIndexOf("/")+1);return new RegExp(t,r)}),S(k,"set",e=>[...e.values()],e=>new Set(e)),S(P,"map",e=>[...e.entries()],e=>new Map(e)),S(e=>{return j(e)||((t=e)===1/0||t===-1/0);var t},"number",e=>j(e)?"NaN":e>0?"Infinity":"-Infinity",Number),S(e=>0===e&&1/e==-1/0,"number",()=>"-0",Number),S(e=>e instanceof URL,"URL",e=>e.toString(),e=>new URL(e))];function R(e,t,r,n){return{isApplicable:e,annotation:t,transform:r,untransform:n}}var D=R((e,t)=>!!O(e)&&!!t.symbolRegistry.getIdentifier(e),(e,t)=>["symbol",t.symbolRegistry.getIdentifier(e)],e=>e.description,(e,t,r)=>{const n=r.symbolRegistry.getValue(t[1]);if(!n)throw new Error("Trying to deserialize unknown symbol");return n}),x=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array,Uint8ClampedArray].reduce((e,t)=>(e[t.name]=t,e),{}),M=R(e=>ArrayBuffer.isView(e)&&!(e instanceof DataView),e=>["typed-array",e.constructor.name],e=>[...e],(e,t)=>{const r=x[t[1]];if(!r)throw new Error("Trying to deserialize unknown typed array");return new r(e)});function B(e,t){return!!e?.constructor&&!!t.classRegistry.getIdentifier(e.constructor)}var V=R(B,(e,t)=>["class",t.classRegistry.getIdentifier(e.constructor)],(e,t)=>{const r=t.classRegistry.getAllowedProps(e.constructor);if(!r)return Object.assign({},e);const n={};return r.forEach(t=>{n[t]=e[t]}),n},(e,t,r)=>{const n=r.classRegistry.getValue(t[1]);if(!n)throw new Error(`Trying to deserialize unknown class '${t[1]}' - check https://github.com/blitz-js/superjson/issues/116#issuecomment-773996564`);return Object.assign(Object.create(n.prototype),e)}),L=R((e,t)=>!!t.customTransformerRegistry.findApplicable(e),(e,t)=>["custom",t.customTransformerRegistry.findApplicable(e).name],(e,t)=>t.customTransformerRegistry.findApplicable(e).serialize(e),(e,t,r)=>{const n=r.customTransformerRegistry.findByName(t[1]);if(!n)throw new Error("Trying to deserialize unknown custom value");return n.deserialize(e)}),U=[V,D,L,M],z=(e,t)=>{const r=l(U,r=>r.isApplicable(e,t));if(r)return{value:r.transform(e,t),type:r.annotation(e,t)};const n=l(A,r=>r.isApplicable(e,t));return n?{value:n.transform(e,t),type:n.annotation}:void 0},N={};A.forEach(e=>{N[e.annotation]=e});var F=(e,t,r)=>{if(!b(t)){const n=N[t];if(!n)throw new Error("Unknown transformation: "+t);return n.untransform(e,r)}switch(t[0]){case"symbol":return D.untransform(e,t,r);case"class":return V.untransform(e,t,r);case"custom":return L.untransform(e,t,r);case"typed-array":return M.untransform(e,t,r);default:throw new Error("Unknown transformation: "+t)}},q=(e,t)=>{if(t>e.size)throw new Error("index out of bounds");const r=e.keys();for(;t>0;)r.next(),t--;return r.next().value};function $(e){if(c(e,"__proto__"))throw new Error("__proto__ is not allowed as a property");if(c(e,"prototype"))throw new Error("prototype is not allowed as a property");if(c(e,"constructor"))throw new Error("constructor is not allowed as a property")}var K=(e,t)=>{$(t);for(let r=0;r<t.length;r++){const n=t[r];if(k(e))e=q(e,+n);else if(P(e)){const s=+n,i=0===+t[++r]?"key":"value",o=q(e,s);switch(i){case"key":e=o;break;case"value":e=e.get(o)}}else e=e[n]}return e},W=(e,t,r)=>{if($(t),0===t.length)return r(e);let n=e;for(let e=0;e<t.length-1;e++){const r=t[e];if(b(n)){n=n[+r]}else if(y(n))n=n[r];else if(k(n)){n=q(n,+r)}else if(P(n)){if(e===t.length-2)break;const s=+r,i=0===+t[++e]?"key":"value",o=q(n,s);switch(i){case"key":n=o;break;case"value":n=n.get(o)}}}const s=t[t.length-1];if(b(n)?n[+s]=r(n[+s]):y(n)&&(n[s]=r(n[s])),k(n)){const e=q(n,+s),t=r(e);e!==t&&(n.delete(e),n.add(t))}if(P(n)){const e=+t[t.length-2],i=q(n,e);switch(0===+s?"key":"value"){case"key":{const e=r(i);n.set(e,n.get(i)),e!==i&&n.delete(i);break}case"value":n.set(i,r(n.get(i)))}}return e},J=e=>e<1;function G(e,t,r,n=[]){if(!e)return;const s=J(r);if(!b(e))return void a(e,(e,i)=>G(e,t,r,[...n,...I(i,s)]));const[i,o]=e;o&&a(o,(e,i)=>{G(e,t,r,[...n,...I(i,s)])}),t(i,n)}function H(e,t,r){const n=J(r);function s(t,r){const s=K(e,I(r,n));t.map(e=>I(e,n)).forEach(t=>{e=W(e,t,()=>s)})}if(b(t)){const[r,i]=t;r.forEach(t=>{e=W(e,I(t,n),()=>e)}),i&&a(i,s)}else a(t,s);return e}var Q=(e,t)=>y(e)||b(e)||P(e)||k(e)||C(e)||B(e,t);function X(e,t,r){const n=r.get(e);n?n.push(t):r.set(e,[t])}function Y(e,t){const r={};let n;return e.forEach(e=>{if(e.length<=1)return;t||(e=e.map(e=>e.map(String)).sort((e,t)=>e.length-t.length));const[s,...i]=e;0===s.length?n=i.map(T):r[T(s)]=i.map(T)}),n?m(r)?[n]:[n,r]:m(r)?void 0:r}var Z=(e,t,r,n,s=[],i=[],o=new Map)=>{const l=v(u=e)||f(u)||p(u)||_(u)||w(u)||O(u);var u;if(!l){X(e,s,t);const r=o.get(e);if(r)return n?{transformedValue:null}:r}if(!Q(e,r)){const t=z(e,r),n=t?{transformedValue:t.value,annotations:[t.type]}:{transformedValue:e};return l||o.set(e,n),n}if(c(i,e))return{transformedValue:null};const h=z(e,r),P=h?.value??e,k=b(P)?[]:{},C={};a(P,(c,l)=>{if("__proto__"===l||"constructor"===l||"prototype"===l)throw new Error(`Detected property ${l}. This is a prototype pollution risk, please remove it from your object.`);const u=Z(c,t,r,n,[...s,l],[...i,e],o);k[l]=u.transformedValue,b(u.annotations)?C[E(l)]=u.annotations:y(u.annotations)&&a(u.annotations,(e,t)=>{C[E(l)+"."+t]=e})});const j=m(C)?{transformedValue:k,annotations:h?[h.type]:void 0}:{transformedValue:k,annotations:h?[h.type,C]:C};return l||o.set(e,j),j};function ee(e){return Object.prototype.toString.call(e).slice(8,-1)}function te(e){return"Array"===ee(e)}function re(e){if("Object"!==ee(e))return!1;const t=Object.getPrototypeOf(e);return!!t&&t.constructor===Object&&t===Object.prototype}function ne(e,t,r,n,s){const i={}.propertyIsEnumerable.call(n,t)?"enumerable":"nonenumerable";"enumerable"===i&&(e[t]=r),s&&"nonenumerable"===i&&Object.defineProperty(e,t,{value:r,enumerable:!1,writable:!0,configurable:!0})}function se(e,t={}){if(te(e))return e.map(e=>se(e,t));if(!re(e))return e;return[...Object.getOwnPropertyNames(e),...Object.getOwnPropertySymbols(e)].reduce((r,n)=>{if("__proto__"===n)return r;if(te(t.props)&&!t.props.includes(n))return r;return ne(r,n,se(e[n],t),e,t.nonenumerable),r},{})}var ie=class{constructor({dedupe:e=!1}={}){this.classRegistry=new s,this.symbolRegistry=new n(e=>e.description??""),this.customTransformerRegistry=new u,this.allowedErrorProps=[],this.dedupe=e}serialize(e){const t=new Map,r=Z(e,t,this,this.dedupe),n={json:r.transformedValue};r.annotations&&(n.meta=Object.assign({},n.meta,{values:r.annotations}));const s=Y(t,this.dedupe);return s&&(n.meta=Object.assign({},n.meta,{referentialEqualities:s})),n.meta&&(n.meta.v=1),n}deserialize(e,t){const{json:r,meta:n}=e;let s=t?.inPlace?r:se(r);var i,o,a,c;return n?.values&&(i=s,o=n.values,a=n.v??0,c=this,G(o,(e,t)=>{i=W(i,t,t=>F(t,e,c))},a),s=i),n?.referentialEqualities&&(s=H(s,n.referentialEqualities,n.v??0)),s}stringify(e){return JSON.stringify(this.serialize(e))}parse(e){return this.deserialize(JSON.parse(e),{inPlace:!0})}registerClass(e,t){this.classRegistry.register(e,t)}registerSymbol(e,t){this.symbolRegistry.register(e,t)}registerCustom(e,t){this.customTransformerRegistry.register(Object.assign({name:t},e))}allowErrorProps(...e){this.allowedErrorProps.push(...e)}};ie.defaultInstance=new ie,ie.serialize=ie.defaultInstance.serialize.bind(ie.defaultInstance),ie.deserialize=ie.defaultInstance.deserialize.bind(ie.defaultInstance),ie.stringify=ie.defaultInstance.stringify.bind(ie.defaultInstance),ie.parse=ie.defaultInstance.parse.bind(ie.defaultInstance),ie.registerClass=ie.defaultInstance.registerClass.bind(ie.defaultInstance),ie.registerSymbol=ie.defaultInstance.registerSymbol.bind(ie.defaultInstance),ie.registerCustom=ie.defaultInstance.registerCustom.bind(ie.defaultInstance),ie.allowErrorProps=ie.defaultInstance.allowErrorProps.bind(ie.defaultInstance),ie.serialize,ie.deserialize,ie.stringify,ie.parse,ie.registerClass,ie.registerCustom,ie.registerSymbol,ie.allowErrorProps;var oe=class{_wsClient=null;_eventSubs=new Map;mirror=null;mirrorInit=null;connected=!1;connectedPromise=null;_connectionVersion=0;_wsEpoch=0;connectionListeners=new Set;constructor(e){this._serverUrl=e.serverUrl.replace(/\/+$/,""),this.token=e.token;const r="undefined"!=typeof window;this.useWs=e.useWebSocket??r,this.onConnectionChange=e.onConnectionChange,this.baseRetryMs=e.retryDelayMs??2e3,this.maxRetryMs=e.maxRetryDelayMs??3e4,this._trpcClient=this.buildTrpcClient(),this._systemProxy=(0,t.createSystemProxy)(this._trpcClient)}get serverUrl(){return this._serverUrl}get connectionVersion(){return this._connectionVersion}subscribeConnectionEvents(e){return this.connectionListeners.add(e),()=>{this.connectionListeners.delete(e)}}emitConnectionEvent(e){try{this.onConnectionChange?.(e)}catch{}for(const t of this.connectionListeners)try{t(e,this._connectionVersion)}catch{}}async awaitConnected(e){if(this.connected)return;if(this.connectedPromise)return this.connectedPromise;const t=e??15e3;this.connectedPromise=(async()=>{const e=this._trpcClient.auth.me.query();Number.isFinite(t)?await new Promise((r,n)=>{const s=setTimeout(()=>n(new Error(`System.awaitConnected: probe timed out after ${t}ms`)),t);e.then(()=>{clearTimeout(s),r()},e=>{clearTimeout(s),n(e instanceof Error?e:new Error(String(e)))})}):await e,this.connected=!0})();try{await this.connectedPromise}finally{this.connectedPromise=null}}async init(e){if(this.mirror?.isReady())return;if(this.mirrorInit)return this.mirrorInit;const r=new t.SystemMirror(this._trpcClient);return this.mirror=r,this.mirrorInit=(async()=>{await this.awaitConnected(e),await r.init(e)})().finally(()=>{this.mirrorInit=null}),this.mirrorInit}async awaitReady(){if(!this.mirror?.isReady())return this.mirrorInit?this.mirrorInit:this.init()}isReady(){return this.mirror?.isReady()??!1}isConnected(){return this.connected}reconnect(){this.useWs&&(this._wsEpoch+=1,this.emitConnectionEvent("connecting"),this._wsClient?.close(),this.disposeMirror(),this.resetEventSubs(),this.connected=!1,this.connectedPromise=null,this._trpcClient=this.buildTrpcClient(),this._systemProxy=(0,t.createSystemProxy)(this._trpcClient))}switchServerUrl(e){const t=e.replace(/\/+$/,"");t!==this._serverUrl&&(this._serverUrl=t,this.reconnect())}async raceConnectionEndpoints(e){const t=e?.perCandidateTimeoutMs??1500,r=(()=>{try{return new URL(this._serverUrl)}catch{return null}})(),n=r?.port?Number(r.port):"https:"===r?.protocol?443:80,s="https:"===r?.protocol?"https":"http",i=this._trpcClient.localNetwork?.getConnectionEndpoints;if(!i)return{winner:this._serverUrl,switched:!1};let o;try{o=(await i.query({port:n,ipv4Only:e?.ipv4Only,scheme:s,includeLoopback:!1})).endpoints}catch{return{winner:this._serverUrl,switched:!1}}if(0===o.length)return{winner:this._serverUrl,switched:!1};const a=await ce(o.map(e=>e.baseUrl),t);return a&&a!==this._serverUrl?(this.switchServerUrl(a),{winner:a,switched:!0}):{winner:a??this._serverUrl,switched:!1}}close(){this.disposeMirror(),this.connected=!1,this.connectedPromise=null,this._wsClient?.close()}disposeMirror(){this.mirror?.dispose(),this.mirror=null,this.mirrorInit=null}async login(e,t){const r=await this._trpcClient.auth.login.mutate({username:e,password:t});if("object"==typeof r&&null!==r&&"token"in r){const e=r,t=e.token,n=!0===e.requiresTotp||Array.isArray(e.secondFactors)&&e.secondFactors.length>0;"string"!=typeof t||n||this.setToken(t)}return r}async loginVerifyTotp(e,t){const r=await this._trpcClient.auth.loginVerifyTotp.mutate({challengeToken:e,code:t});if("object"==typeof r&&null!==r&&"token"in r){const e=r.token;"string"==typeof e&&this.setToken(e)}return r}async loginBeginPasskey(e){return await this._trpcClient.auth.loginBeginPasskey.mutate({challengeToken:e})}async loginVerifyPasskey(e,t){const r=await this._trpcClient.auth.loginVerifyPasskey.mutate({challengeToken:e,response:t});if("object"==typeof r&&null!==r&&"token"in r){const e=r.token;"string"==typeof e&&this.setToken(e)}return r}async passkeyLoginBegin(){return await this._trpcClient.auth.passkeyLoginBegin.mutate()}async passkeyLoginFinish(e){const t=await this._trpcClient.auth.passkeyLoginFinish.mutate({response:e});if("object"==typeof t&&null!==t&&"token"in t){const e=t,r=!0===e.requiresTotp||Array.isArray(e.secondFactors)&&e.secondFactors.length>0;"string"!=typeof e.token||r||this.setToken(e.token)}return t}async logout(){await this._trpcClient.auth.logout.mutate()}async getMe(){return await this._trpcClient.auth.me.query()}async changeOwnPassword(e){return await this._trpcClient.auth.changeOwnPassword.mutate(e)}async setupOwnTotp(){return await this._trpcClient.auth.setupOwnTotp.mutate()}async confirmOwnTotp(e){return await this._trpcClient.auth.confirmOwnTotp.mutate(e)}async disableOwnTotp(){return await this._trpcClient.auth.disableOwnTotp.mutate()}async getOwnTotpStatus(){return await this._trpcClient.auth.getOwnTotpStatus.query()}async beginOwnPasskeyRegistration(){return await this._trpcClient.auth.beginOwnPasskeyRegistration.mutate()}async finishOwnPasskeyRegistration(e){return await this._trpcClient.auth.finishOwnPasskeyRegistration.mutate(e)}async listOwnPasskeys(){return await this._trpcClient.auth.listOwnPasskeys.query()}async removeOwnPasskey(e){return await this._trpcClient.auth.removeOwnPasskey.mutate(e)}async getOwnPasskeySecondFactorPreference(){return await this._trpcClient.auth.getOwnPasskeySecondFactorPreference.query()}async setOwnPasskeySecondFactorPreference(e){return await this._trpcClient.auth.setOwnPasskeySecondFactorPreference.mutate(e)}setToken(e){this.token=e}listDevices(e){return this.mirror?(e?this.mirror.query(e):this.mirror.getAllDevices()).map(e=>this.attachBinding(e)):[]}getDeviceInfo(e){return this.mirror?.getDeviceInfo(e)??null}listDeviceInfos(e){const t=this.mirror;if(!t)return[];const r=e?t.query(e):t.getAllDevices(),n=[];for(const e of r){const r=t.getDeviceInfo(e.deviceId);r&&n.push(r)}return n}getDevice(e){const t=this.mirror?.getDeviceById(e)??null;return t?this.attachBinding(t):null}getDeviceByName(e){const t=this.mirror?.getDeviceByName(e)??null;return t?this.attachBinding(t):null}getDeviceByStableId(e){const t=this.mirror?.getDeviceByStableId(e)??null;return t?this.attachBinding(t):null}async waitForDevice(e,t){this.mirror||await this.init();const r=await this.mirror.waitForDevice(e,t??3e4);return this.attachBinding(r)}onDeviceAdded(e){if(!this.mirror)throw new Error("System.onDeviceAdded: call init() before subscribing");return this.mirror.onDeviceAdded(e)}onDeviceRemoved(e){if(!this.mirror)throw new Error("System.onDeviceRemoved: call init() before subscribing");return this.mirror.onDeviceRemoved(e)}attachBinding(e){const t=this.lookupBinding(e.deviceId);if(t===e.binding)return e;return e.binding=t,e}lookupBinding(e){return this.mirror?this.mirror.getDeviceById(e)?.binding??null:null}get addonPages(){return this._systemProxy.addonPages}get addonSettings(){return this._systemProxy.addonSettings}get alerts(){return this._systemProxy.alerts}get audioAnalyzer(){return this._systemProxy.audioAnalyzer}get audioCodec(){return this._systemProxy.audioCodec}get backup(){return this._systemProxy.backup}get decoder(){return this._systemProxy.decoder}get deviceManager(){return this._systemProxy.deviceManager}get deviceProvider(){return this._systemProxy.deviceProvider}get deviceState(){return this._systemProxy.deviceState}get metricsProvider(){return this._systemProxy.metricsProvider}get notificationOutput(){return this._systemProxy.notificationOutput}get pipelineExecutor(){return this._systemProxy.pipelineExecutor}get pipelineOrchestrator(){return this._systemProxy.pipelineOrchestrator}get pipelineRunner(){return this._systemProxy.pipelineRunner}get settingsStore(){return this._systemProxy.settingsStore}get storage(){return this._systemProxy.storage}get streamBroker(){return this._systemProxy.streamBroker}get turnProvider(){return this._systemProxy.turnProvider}get userManagement(){return this._systemProxy.userManagement}subscribeEvent(e,t){const r=t;let n=this._eventSubs.get(e);if(void 0===n){const t=new Set,r=this._trpcClient.live.onEvent.subscribe({category:e},{onData:e=>{for(const r of[...t])try{r(e)}catch{}}});n={listeners:t,unsubscribe:()=>{try{r.unsubscribe()}catch{}}},this._eventSubs.set(e,n)}n.listeners.add(r);let s=!1;return()=>{if(s)return;s=!0;const t=this._eventSubs.get(e);void 0!==t&&(t.listeners.delete(r),0===t.listeners.size&&(t.unsubscribe(),this._eventSubs.delete(e)))}}resetEventSubs(){for(const e of this._eventSubs.values())e.unsubscribe();this._eventSubs.clear()}get trpcClient(){return this._trpcClient}get wsClient(){return this._wsClient}buildTrpcClient(){if(this.useWs){const t=this._serverUrl.replace(/^http/,"ws")+"/trpc",r=this.baseRetryMs,n=this.maxRetryMs,s=this._wsEpoch;return this._wsClient=(0,e.createWSClient)({url:t,connectionParams:()=>({token:this.token}),retryDelayMs:e=>Math.min(r*Math.pow(2,e),n),keepAlive:{enabled:!0,intervalMs:1e4,pongTimeoutMs:6e3},onOpen:()=>{s===this._wsEpoch&&(this._connectionVersion+=1,this.emitConnectionEvent("connected"))},onClose:()=>{s===this._wsEpoch&&this.emitConnectionEvent("disconnected")}}),(0,e.createTRPCClient)({links:[(0,e.wsLink)({client:this._wsClient,transformer:ie})]})}return this._wsClient=null,(0,e.createTRPCClient)({links:[(0,e.httpLink)({url:`${this._serverUrl}/trpc`,headers:()=>{const e={};return this.token&&(e.Authorization=`Bearer ${this.token}`),e},transformer:ie})]})}};function ae(e){return new oe(e)}async function ce(e,t){if(0===e.length)return null;if("function"!=typeof fetch)return e[0]??null;const r="undefined"!=typeof window&&void 0!==window.location&&"https:"===window.location.protocol?e.filter(e=>e.toLowerCase().startsWith("https://")):e;if(0===r.length)return null;const n=r.map(()=>new AbortController),s=r.map(async(e,r)=>{const s=n[r],i=setTimeout(()=>s.abort(),t);try{const t=await fetch(`${e.replace(/\/+$/,"")}/trpc/health`,{method:"GET",signal:s.signal,credentials:"omit"});if(!t.ok)throw new Error(`${t.status}`);return e}finally{clearTimeout(i)}});try{const e=await Promise.any(s);for(const e of n)try{e.abort()}catch{}return e}catch{return null}}var le=(function(e){return e.Motion="motion",e.Person="person",e.Vehicle="vehicle",e.Animal="animal",e.Audio="audio",e.Face="face",e.Plate="plate",e.Package="package",e.Doorbell="doorbell",e.Sensor="sensor",e})({}),ue=["animal","dog_cat","dog","cat","horse","sheep","cow","elephant","bear","zebra","giraffe","mouse","rabbit","deer","lion","tiger","bird","eagle","owl","pigeon","fish","whale","dolphin","snake","turtle","lizard"],he=["person","people","pedestrian","rider","driver","cyclist","skier","skateboarder","face","hand","head","body"],pe=["vehicle","car","truck","bus","motorcycle","bicycle","van","ambulance","police_car","fire_truck","train","subway","tram","airplane","boat","ship","helicopter"],de=["face","eyes","nose","mouth","ears","eyebrows","left_eye","right_eye","pupil","iris","eyelid","eye_corner","upper_lip","lower_lip","teeth","chin","cheek","forehead","jaw","glasses","sunglasses","facial_hair","beard","mustache","facial_landmark","facial_keypoint"],fe=["plate","license_plate","front_plate","rear_plate","motorcycle_plate","temporary_plate","dealer_plate","licensePlate","plate_number","plate_character","plate_digit","plate_letter","plate_symbol","plate_region","plate_country_identifier","plate_frame","plate_bolt","plate_sticker","plate_validation_tag","damaged_plate","obscured_plate","dirty_plate"],ye=["motion","movement","other"],ge=["package","packet"],me=["audio"],be=["speech","scream","babbling","yell","bellow","whoop","whispering","laughter","snicker","crying","cry","sigh","singing","choir","chant","mantra","child_singing","rapping","humming","groan","grunt","whistling","breathing","wheeze","snoring","gasp","pant","snort","cough","throat_clearing","sneeze","sniff","cheering","applause","chatter","crowd","children_playing","bark","yip","howl","bow-wow","growling","whimper_dog","purr","meow","hiss","caterwaul","pets","livestock","doorbell","ding-dong","door","slam","knock","alarm","telephone","music","dog","dogs"],we=["doorbell","ring"],ve=["lock","binary","flood","entry","door","leak","door_open","flooded","entry_open"],Pe=Object.assign({},ue.reduce((e,t)=>Object.assign({},e,{[t]:"animal"}),{}),he.reduce((e,t)=>Object.assign({},e,{[t]:"person"}),{}),pe.reduce((e,t)=>Object.assign({},e,{[t]:"vehicle"}),{}),ye.reduce((e,t)=>Object.assign({},e,{[t]:"motion"}),{}),ge.reduce((e,t)=>Object.assign({},e,{[t]:"package"}),{}),de.reduce((e,t)=>Object.assign({},e,{[t]:"face"}),{}),fe.reduce((e,t)=>Object.assign({},e,{[t]:"plate"}),{}),me.reduce((e,t)=>Object.assign({},e,{[t]:"audio"}),{}),be.reduce((e,t)=>Object.assign({},e,{[t]:"audio"}),{}),we.reduce((e,t)=>Object.assign({},e,{[t]:"doorbell"}),{}),ve.reduce((e,t)=>Object.assign({},e,{[t]:"sensor"}),{})),ke=e=>de.includes(e),Oe=e=>fe.includes(e),Ce=e=>ue.includes(e),je=e=>he.includes(e),Ee=e=>pe.includes(e),Te=e=>ye.includes(e),Ie=e=>we.includes(e),Se=e=>ge.includes(e),Ae=e=>me.includes(e)||be.includes(e),Re=e=>ve.includes(e),De=e=>ke(e)||Oe(e),xe=e=>Pe[e],Me=e=>{const{className:t}=e,r={face:"person",plate:"vehicle"},n=Pe[t];return n&&n!==t?n:r[t]},Be=Object.values(le),Ve=Be.filter(e=>"motion"!==e),Le=["person","doorbell","package"],Ue=[...Le,"vehicle","animal","audio","face","plate"],ze=[...Ve];function Ne(e,t){switch(e){case"critical":return Le;case"important":return Ue;case"all":return ze;case"custom":return t?.length?t:Ve;default:return Ve}}},1713,[1714,1170]);
2455
2455
  __d(function(g,_r,_i,a,m,_e,_d){"use strict";Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"TRPCClientError",{enumerable:!0,get:function(){return r.TRPCClientError}}),Object.defineProperty(_e,"TRPCUntypedClient",{enumerable:!0,get:function(){return h}}),Object.defineProperty(_e,"clientCallTypeToProcedureType",{enumerable:!0,get:function(){return j}}),Object.defineProperty(_e,"createTRPCClient",{enumerable:!0,get:function(){return S}}),Object.defineProperty(_e,"createTRPCClientProxy",{enumerable:!0,get:function(){return _}}),Object.defineProperty(_e,"createTRPCProxyClient",{enumerable:!0,get:function(){return S}}),Object.defineProperty(_e,"createTRPCUntypedClient",{enumerable:!0,get:function(){return v}}),Object.defineProperty(_e,"createWSClient",{enumerable:!0,get:function(){return c.createWSClient}}),Object.defineProperty(_e,"experimental_localLink",{enumerable:!0,get:function(){return G}}),Object.defineProperty(_e,"getFetch",{enumerable:!0,get:function(){return n.getFetch}}),Object.defineProperty(_e,"getUntypedClient",{enumerable:!0,get:function(){return w}}),Object.defineProperty(_e,"httpBatchLink",{enumerable:!0,get:function(){return i.httpBatchLink}}),Object.defineProperty(_e,"httpBatchStreamLink",{enumerable:!0,get:function(){return k}}),Object.defineProperty(_e,"httpLink",{enumerable:!0,get:function(){return o.httpLink}}),Object.defineProperty(_e,"httpSubscriptionLink",{enumerable:!0,get:function(){return A}}),Object.defineProperty(_e,"isFormData",{enumerable:!0,get:function(){return o.isFormData}}),Object.defineProperty(_e,"isNonJsonSerializable",{enumerable:!0,get:function(){return o.isNonJsonSerializable}}),Object.defineProperty(_e,"isOctetType",{enumerable:!0,get:function(){return o.isOctetType}}),Object.defineProperty(_e,"isTRPCClientError",{enumerable:!0,get:function(){return r.isTRPCClientError}}),Object.defineProperty(_e,"jsonEncoder",{enumerable:!0,get:function(){return c.jsonEncoder}}),Object.defineProperty(_e,"loggerLink",{enumerable:!0,get:function(){return s.loggerLink}}),Object.defineProperty(_e,"retryLink",{enumerable:!0,get:function(){return U}}),Object.defineProperty(_e,"splitLink",{enumerable:!0,get:function(){return t.splitLink}}),Object.defineProperty(_e,"unstable_httpBatchStreamLink",{enumerable:!0,get:function(){return E}}),Object.defineProperty(_e,"unstable_httpSubscriptionLink",{enumerable:!0,get:function(){return M}}),Object.defineProperty(_e,"unstable_localLink",{enumerable:!0,get:function(){return Y}}),Object.defineProperty(_e,"wsLink",{enumerable:!0,get:function(){return c.wsLink}});var e=_r(_d[0]),t=_r(_d[1]),r=_r(_d[2]),n=_r(_d[3]),o=_r(_d[4]),i=_r(_d[5]),u=_r(_d[6]),s=_r(_d[7]),c=_r(_d[8]),l=_r(_d[9]),p=_r(_d[10]),d=_r(_d[11]),f=_r(_d[12]),y=(0,e.__toESM)((0,e.require_defineProperty)(),1),b=(0,e.__toESM)((0,e.require_objectSpread2)(),1),h=class{constructor(e){(0,y.default)(this,"links",void 0),(0,y.default)(this,"runtime",void 0),(0,y.default)(this,"requestId",void 0),this.requestId=0,this.runtime={},this.links=e.links.map(e=>e(this.runtime))}$request(e){var r;return(0,t.createChain)({links:this.links,op:(0,b.default)((0,b.default)({},e),{},{context:null!==(r=e.context)&&void 0!==r?r:{},id:++this.requestId})}).pipe((0,l.share)())}async requestAsPromise(e){try{const t=this.$request(e),r=await(0,l.observableToPromise)(t);return r.result.data}catch(e){throw r.TRPCClientError.from(e)}}query(e,t,r){return this.requestAsPromise({type:"query",path:e,input:t,context:null==r?void 0:r.context,signal:null==r?void 0:r.signal})}mutation(e,t,r){return this.requestAsPromise({type:"mutation",path:e,input:t,context:null==r?void 0:r.context,signal:null==r?void 0:r.signal})}subscription(e,t,r){return this.$request({type:"subscription",path:e,input:t,context:r.context,signal:r.signal}).subscribe({next(e){switch(e.result.type){case"state":var t;null===(t=r.onConnectionStateChange)||void 0===t||t.call(r,e.result);break;case"started":var n;null===(n=r.onStarted)||void 0===n||n.call(r,{context:e.context});break;case"stopped":var o;null===(o=r.onStopped)||void 0===o||o.call(r);break;case"data":case void 0:var i;null===(i=r.onData)||void 0===i||i.call(r,e.result.data)}},error(e){var t;null===(t=r.onError)||void 0===t||t.call(r,e)},complete(){var e;null===(e=r.onComplete)||void 0===e||e.call(r)}})}};function v(e){return new h(e)}const x=Symbol.for("trpc_untypedClient"),P={query:"query",mutate:"mutation",subscribe:"subscription"},j=e=>P[e];function _(e){const t=(0,p.createRecursiveProxy)(({path:t,args:r})=>{const n=[...t],o=j(n.pop()),i=n.join(".");return e[o](i,...r)});return(0,p.createFlatProxy)(r=>r===x?e:t[r])}function S(e){return _(new h(e))}function w(e){return e[x]}var C=(0,e.__toESM)((0,e.require_objectSpread2)(),1);function k(e){var t,o;const u=(0,n.resolveHTTPLinkOptions)(e),s=null!==(t=e.maxURLLength)&&void 0!==t?t:1/0,c=null!==(o=e.maxItems)&&void 0!==o?o:1/0;return()=>{const t=t=>({validate(e){if(s===1/0&&c===1/0)return!0;if(e.length>c)return!1;const r=e.map(e=>e.path).join(","),o=e.map(e=>e.input);return(0,n.getUrl)((0,C.default)((0,C.default)({},u),{},{type:t,path:r,inputs:o,signal:null})).length<=s},async fetch(o){var s;const c=o.map(e=>e.path).join(","),l=o.map(e=>e.input),d=(0,i.allAbortSignals)(...o.map(e=>e.signal)),f=new AbortController,y=(0,n.fetchHTTPResponse)((0,C.default)((0,C.default)({},u),{},{signal:(0,i.raceAbortSignals)(d,f.signal),type:t,contentTypeHeader:"application/json",trpcAcceptHeader:"application/jsonl",trpcAcceptHeaderKey:null!==(s=e.streamHeader)&&void 0!==s?s:"trpc-accept",getUrl:n.getUrl,getBody:n.getBody,inputs:l,path:c,headers:()=>e.headers?"function"==typeof e.headers?e.headers({opList:o}):e.headers:{}})),b=await y;if(!b.ok){const e=await b.json();return"error"in e&&(e.error=u.transformer.output.deserialize(e.error)),o.map(()=>Promise.resolve({json:e,meta:{response:b}}))}const[h]=await(0,p.jsonlStreamConsumer)({from:b.body,deserialize:e=>u.transformer.output.deserialize(e),formatError(e){const t=e.error;return r.TRPCClientError.from({error:t})},abortController:f});return Object.keys(o).map(async e=>{let t=await Promise.resolve(h[e]);if("result"in t){const e=await Promise.resolve(t.result);t={result:{data:await Promise.resolve(e.data)}}}return{json:t,meta:{response:b}}})}}),o={query:(0,i.dataLoader)(t("query")),mutation:(0,i.dataLoader)(t("mutation"))};return({op:e})=>(0,l.observable)(t=>{
2456
2456
  /* istanbul ignore if -- @preserve */
@@ -3303,7 +3303,7 @@ __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{v
3303
3303
  __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"HEATMAP_TAPE_HEIGHT_PX",{enumerable:!0,get:function(){return t}}),Object.defineProperty(e,"HEATMAP_HOUR_LABELS_HEIGHT_PX",{enumerable:!0,get:function(){return n}}),Object.defineProperty(e,"HEATMAP_HOUR_MARKS",{enumerable:!0,get:function(){return P}}),Object.defineProperty(e,"HEATMAP_BAND_HEIGHT_PX",{enumerable:!0,get:function(){return _}}),Object.defineProperty(e,"HEATMAP_CURSOR_OVERSHOOT_PX",{enumerable:!0,get:function(){return u}}),Object.defineProperty(e,"HEATMAP_CURSOR_STEM_WIDTH_PX",{enumerable:!0,get:function(){return c}}),Object.defineProperty(e,"HEATMAP_CURSOR_CAP_WIDTH_PX",{enumerable:!0,get:function(){return o}}),Object.defineProperty(e,"HEATMAP_CURSOR_CAP_HEIGHT_PX",{enumerable:!0,get:function(){return A}}),Object.defineProperty(e,"HEATMAP_CURSOR_HALO_PAD_PX",{enumerable:!0,get:function(){return H}}),e.heatmapCursorGeometry=function(){return{stripHeightPx:50,bandInsetPx:u,markerHeightPx:36,stemWidthPx:c,haloWidthPx:4,capWidthPx:o,capHeightPx:A,centeringOffsetPx:-3.5}};const t=28,n=14,P=[0,6,12,18],_=t,u=4,c=2,o=7,A=3,H=1},2524,[]);
3304
3304
  __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.resolveTimelineBody=function(n){return null===n?{kind:'timeline'}:{kind:'panel',panel:n}},e.playbackBarLayout=function(o,l,t=!1,c=!0,u=!1,s=!1){const p='live'===o&&!s,h=p?l?'hidden':'liveCapture':'exportSelection',v=s?'hidden':h,k='exportSelection'===h&&u;return{leading:p?'liveBadge':'goLive',liveLock:p&&null!==t?t?'locked':'unlocked':'hidden',showJog:!p&&!k,jogMeans:s?'clip':'time',showStep:c&&!p&&!k&&(0,n.shouldShowStepControls)(l),showRate:!p&&!k,record:v}};var n=r(d[0])},2525,[2526]);
3305
3305
  __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.playbackRateMenuOrder=function(t,n){return'down'===t?n:[...n].reverse()},e.formatRateLabel=function(t){return`${t}\xd7`},e.shouldShowStepControls=function(t){return t}},2526,[]);
3306
- __d(function(_g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.playbackBarGapSet=function(t){return u[t]},e.estimateWidestBar=w,e.playbackBarTiers=O,Object.defineProperty(e,"PLAYBACK_BAR_TIERS",{enumerable:!0,get:function(){return A}}),Object.defineProperty(e,"NARROWEST_TIER",{enumerable:!0,get:function(){return I}}),Object.defineProperty(e,"NARROWEST_BAR_WIDTH",{enumerable:!0,get:function(){return j}}),e.playbackBarFit=function(t,n){if(!Number.isFinite(t)||t<=0)return I;const o=n??P(t);for(const n of O(o.canWrap))if(w(n,t,o)<=t)return n;return I};var t=r(d[0]),n=r(d[1]);const o=30,s=40,c=60,l=60,p=o+t.SPACING.sm+72,u={normal:{pad:t.SPACING.md,gap:t.SPACING.sm},tight:{pad:t.SPACING.sm,gap:t.SPACING.xs}};function g(t,n){return s+o*t+4*n.gap}function f(t,n,s){if('overflow'===t.secondary)return o;return(n.trailingIcon?o+s.gap:0)+l}function S(t,n){return t.reserveSlots?4:(t.allowJog?2:0)+(t.allowStep&&n.canStep?2:0)}function b(t,n,o,s){const l=2*n.pad;return t.wrap?Math.max(l+o,l+c+2*n.gap+s):l+2*n.gap+o+2*Math.max(c,s)}function w(t,n,o){const s=o??P(n),c=u[t.gaps],l=b(t,c,g(S(t,s),c),f(t,s,c)),w=s.trailingIcon?b(t,c,g(0,c),p):0;return Math.round(Math.max(l,w)*s.scale)}const v={reserveSlots:!0,allowJog:!0,allowStep:!0,wrap:!1,gaps:'normal',secondary:'inline'},h=[Object.assign({},v,{wrap:!0}),Object.assign({},v,{wrap:!0,reserveSlots:!1,gaps:'tight'})],y=[Object.assign({},v,{reserveSlots:!1,gaps:'tight'}),Object.assign({},v,{reserveSlots:!1,gaps:'tight',secondary:'overflow'}),Object.assign({},v,{reserveSlots:!1,gaps:'tight',secondary:'overflow',allowStep:!1}),Object.assign({},v,{reserveSlots:!1,gaps:'tight',secondary:'overflow',allowStep:!1,allowJog:!1})];function O(t){return t?[v,...h,...y]:[v,...y]}const A=O(!1),I=y[y.length-1],j=180;function P(t){return{scale:(0,n.scaleForWidth)(t),canWrap:!1,trailingIcon:!0,canStep:!0}}},2527,[831,954]);
3306
+ __d(function(_g,r,i,a,m,e,_d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.playbackBarGapSet=function(t){return g[t]},e.estimateWidestBar=v,e.playbackBarSideWidths=function(t,n){const o=d(t,n);return{leading:o.leading,trailing:b(t,n,o)}},e.playbackBarTiers=A,Object.defineProperty(e,"PLAYBACK_BAR_TIERS",{enumerable:!0,get:function(){return I}}),Object.defineProperty(e,"NARROWEST_TIER",{enumerable:!0,get:function(){return P}}),Object.defineProperty(e,"NARROWEST_BAR_WIDTH",{enumerable:!0,get:function(){return W}}),e.acceptMeasuredWidth=function(t,n){return!!p(n)&&(void 0===t||Math.abs(n-t)>=.5)},e.playbackBarFit=function(t,n){if(!Number.isFinite(t)||t<=0)return P;const o=n??_(t);for(const n of A(o.canWrap))if(v(n,t,o)<=t)return n;return P};var t=r(_d[0]),n=r(_d[1]);const o=30,s=40,c=59,l=52,u=72,g={normal:{pad:t.SPACING.md,gap:t.SPACING.sm},tight:{pad:t.SPACING.sm,gap:t.SPACING.xs}};function p(t){return void 0!==t&&Number.isFinite(t)&&t>0}function d(t,d){const f=t=>(0,n.scaleDimension)(t,d.scale),b=g[t.gaps],S=d.measured?.leading,w=d.measured?.rate;return{pad:f(b.pad),gap:f(b.gap),button:f(o),primary:f(s),leading:p(S)?S:f(c),rate:p(w)?w:f(l),accept:f(u)}}function f(t,n){return n.primary+n.button*t+4*n.gap}function b(t,n,o){if('overflow'===t.secondary)return o.button;return(n.trailingIcon?o.button+o.gap:0)+o.rate}function S(t,n){return t.reserveSlots?4:(t.allowJog?2:0)+(t.allowStep&&n.canStep?2:0)}function w(t,n,o,s){const c=2*n.pad;if(t.wrap)return Math.max(c+o,c+n.leading+2*n.gap+s);const l='bar'===t.centring?2*Math.max(n.leading,s):n.leading+s;return c+2*n.gap+o+l}function v(t,n,o){const s=o??_(n),c=d(t,s),l=w(t,c,f(S(t,s),c),b(t,s,c)),u=s.trailingIcon?w(t,c,f(0,c),c.button+c.gap+c.accept):0;return Math.max(l,u)}const y={reserveSlots:!0,allowJog:!0,allowStep:!0,wrap:!1,gaps:'normal',secondary:'inline',centring:'bar'},h=Object.assign({},y,{centring:'between'}),O=[Object.assign({},y,{wrap:!0}),Object.assign({},y,{wrap:!0,reserveSlots:!1,gaps:'tight'})],j=[Object.assign({},y,{reserveSlots:!1,gaps:'tight'}),Object.assign({},y,{reserveSlots:!1,gaps:'tight',secondary:'overflow'}),Object.assign({},y,{reserveSlots:!1,gaps:'tight',secondary:'overflow',allowStep:!1}),Object.assign({},y,{reserveSlots:!1,gaps:'tight',secondary:'overflow',allowStep:!1,allowJog:!1})];function A(t){return t?[y,h,...O,...j]:[y,h,...j]}const I=A(!1),P=j[j.length-1],W=180;function _(t){return{scale:(0,n.scaleForWidth)(t),canWrap:!1,trailingIcon:!0,canStep:!0}}},2527,[831,954]);
3307
3307
  __d(function(g,r,i,a,m,_e,d){"use strict";function e(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(_e,'__esModule',{value:!0}),_e.popoverPortalled=v,_e.PlaybackBarPopover=function(e){const l=(0,t.c)(2);if(!e.open)return null;let n;l[0]!==e?(n=(0,y.jsx)(j,Object.assign({},e)),l[0]=e,l[1]=n):n=l[1];return n};var t=r(d[0]),l=r(d[1]),n=r(d[2]),o=e(r(d[3]));r(d[4]);var u=e(r(d[5])),s=e(r(d[6])),c=e(r(d[7])),b=e(r(d[8])),f=r(d[9]),p=r(d[10]),h=r(d[11]),y=r(d[12]);function v(){return!0}function _(){const e=(0,t.c)(4),{colors:l}=(0,f.useTheme)(),n=(0,p.useTimelineScale)();let o;return e[0]!==l.backgroundElevated||e[1]!==l.border||e[2]!==n.radius.lg?(o={borderRadius:n.radius.lg,backgroundColor:l.backgroundElevated,borderColor:l.border},e[0]=l.backgroundElevated,e[1]=l.border,e[2]=n.radius.lg,e[3]=o):o=e[3],o}function j(e){const f=(0,t.c)(49),{onClose:p,anchorRef:v,children:j}=e,{t:x}=(0,n.useTranslation)(),M=_(),P=(0,b.default)(),[w,R]=(0,l.useState)(null),[C,E]=(0,l.useState)(null);let S;f[0]!==v?(S=()=>{v.current?.measureInWindow((e,t,l,n)=>{R({x:e,y:t,width:l,height:n})})},f[0]=v,f[1]=S):S=f[1];const T=S;let L,W,F,O,q,B,I,V,z,A,D,G,H,J,K,N,Q;if(f[2]!==w||f[3]!==j||f[4]!==M||f[5]!==p||f[6]!==T||f[7]!==C||f[8]!==x||f[9]!==P){const e=null!==w&&null!==C?(0,h.placePopover)(w,C,P,"up"):null,t=e?.direction??"up";let l;F=o.default,J=!0,O=!0,q="none",B=p,W=c.default,D=s.default.absoluteFill,G=T,f[24]!==x?(l=x("v2.playback.closeMenu"),f[24]=x,f[25]=l):l=f[25],f[26]!==p||f[27]!==l?(H=(0,y.jsx)(u.default,{style:s.default.absoluteFill,onPress:p,accessibilityRole:"button",accessibilityLabel:l}),f[26]=p,f[27]=l,f[28]=H):H=f[28],L=c.default,f[29]===Symbol.for("react.memo_cache_sentinel")?(I=e=>{const{width:t,height:l}=e.nativeEvent.layout;E(e=>e?.width===t&&e.height===l?e:{width:t,height:l})},f[29]=I):I=f[29],V=[k.menu,k.portalMenu,M,null===e?k.unplaced:{left:e.left,top:e.top}],z="menu",A=j(t),f[2]=w,f[3]=j,f[4]=M,f[5]=p,f[6]=T,f[7]=C,f[8]=x,f[9]=P,f[10]=L,f[11]=W,f[12]=F,f[13]=O,f[14]=q,f[15]=B,f[16]=I,f[17]=V,f[18]=z,f[19]=A,f[20]=D,f[21]=G,f[22]=H,f[23]=J}else L=f[10],W=f[11],F=f[12],O=f[13],q=f[14],B=f[15],I=f[16],V=f[17],z=f[18],A=f[19],D=f[20],G=f[21],H=f[22],J=f[23];return f[30]!==L||f[31]!==I||f[32]!==V||f[33]!==z||f[34]!==A?(K=(0,y.jsx)(L,{onLayout:I,style:V,accessibilityRole:z,children:A}),f[30]=L,f[31]=I,f[32]=V,f[33]=z,f[34]=A,f[35]=K):K=f[35],f[36]!==W||f[37]!==K||f[38]!==D||f[39]!==G||f[40]!==H?(N=(0,y.jsxs)(W,{style:D,onLayout:G,children:[H,K]}),f[36]=W,f[37]=K,f[38]=D,f[39]=G,f[40]=H,f[41]=N):N=f[41],f[42]!==F||f[43]!==O||f[44]!==q||f[45]!==B||f[46]!==N||f[47]!==J?(Q=(0,y.jsx)(F,{transparent:J,visible:O,animationType:q,onRequestClose:B,children:N}),f[42]=F,f[43]=O,f[44]=q,f[45]=B,f[46]=N,f[47]=J,f[48]=Q):Q=f[48],Q}const k=s.default.create({menu:{minWidth:84,borderWidth:1,paddingVertical:2},inlineMenu:{position:'absolute',bottom:'100%',right:0},portalMenu:{position:'absolute'},unplaced:{left:0,top:0,opacity:0}})},2528,[787,16,813,241,110,248,33,115,273,789,994,2529,10]);
3308
3308
  __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"POPOVER_GAP",{enumerable:!0,get:function(){return t}}),e.placePopover=function(n,u,o,c="up"){const p=n.y-8,f=o.height-(n.y+n.height)-8,w=u.height<=p,y=u.height<=f,P='up'===c?w||!y&&p>=f?'up':'down':y||!w&&f>=p?'down':'up',l=h('up'===P?n.y-t-u.height:n.y+n.height+t,t,o.height-t-u.height),s=h(n.x+n.width-u.width,t,o.width-t-u.width);return{direction:P,left:s,top:l}};const t=4;function h(t,h,n){return Math.max(h,Math.min(t,n))}},2529,[]);
3309
3309
  __d(function(g,_r,i,a,m,_e,d){"use strict";function e(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(_e,'__esModule',{value:!0}),_e.TransportSpinnerRing=function({size:e,color:o}){const h=(0,t.useRef)(new n.default.Value(0)).current;(0,t.useEffect)(()=>{const e=n.default.loop(n.default.timing(h,{toValue:1,duration:c,easing:r.default.linear,useNativeDriver:!0}));return e.start(),()=>e.stop()},[h]);const _=e+6+4,v=(_-f)/2,j=2*Math.PI*v,k=h.interpolate({inputRange:[0,1],outputRange:['0deg','360deg']});return(0,l.jsx)(n.default.View,{pointerEvents:"none",style:[p.ring,{width:_,height:_,marginLeft:-(_-e)/2,marginTop:-(_-e)/2,transform:[{rotate:k}]}],children:(0,l.jsx)(u.default,{width:_,height:_,children:(0,l.jsx)(s.Circle,{cx:_/2,cy:_/2,r:v,stroke:o,strokeWidth:f,fill:"none",strokeDasharray:`${.25*j} ${j}`,strokeLinecap:"round"})})})};var t=_r(d[0]),n=e(_r(d[1])),r=e(_r(d[2])),o=e(_r(d[3])),s=_r(d[4]),u=e(s),l=_r(d[5]);const c=900,f=2;const p=o.default.create({ring:{position:'absolute',left:0,top:0}})},2530,[16,108,212,33,1103,10]);
@@ -3316,7 +3316,7 @@ __d(function(g,r,i,a,m,_e,d){"use strict";function e(e){return e&&e.__esModule?e
3316
3316
  __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return N}});var n=r(d[0]),t=r(d[1]),o=r(d[2]);const c={[o.OrientationLock.DEFAULT]:o.WebOrientationLock.NATURAL,[o.OrientationLock.ALL]:o.WebOrientationLock.ANY,[o.OrientationLock.PORTRAIT]:o.WebOrientationLock.PORTRAIT,[o.OrientationLock.PORTRAIT_UP]:o.WebOrientationLock.PORTRAIT_PRIMARY,[o.OrientationLock.PORTRAIT_DOWN]:o.WebOrientationLock.PORTRAIT_SECONDARY,[o.OrientationLock.LANDSCAPE]:o.WebOrientationLock.LANDSCAPE,[o.OrientationLock.LANDSCAPE_LEFT]:o.WebOrientationLock.LANDSCAPE_PRIMARY,[o.OrientationLock.LANDSCAPE_RIGHT]:o.WebOrientationLock.LANDSCAPE_SECONDARY},s={[o.WebOrientation.PORTRAIT_PRIMARY]:o.Orientation.PORTRAIT_UP,[o.WebOrientation.PORTRAIT_SECONDARY]:o.Orientation.PORTRAIT_DOWN,[o.WebOrientation.LANDSCAPE_PRIMARY]:o.Orientation.LANDSCAPE_LEFT,[o.WebOrientation.LANDSCAPE_SECONDARY]:o.Orientation.LANDSCAPE_RIGHT},O=n.Platform.canUseViewport?window.screen:{};function A(n){switch(n){case o.WebOrientationLock.UNKNOWN:throw new Error("expo-screen-orientation: WebOrientationLock.UNKNOWN is not a valid lock to be converted.");case o.WebOrientationLock.ANY:return['portrait','landscape'];case o.WebOrientationLock.NATURAL:return'default';default:return n}}async function L(n){if(n===o.WebOrientationLock.UNKNOWN)throw new Error("expo-screen-orientation: WebOrientationLock.UNKNOWN is not a valid lock that can be applied to the device.");if(O.orientation&&'lock'in O.orientation&&'function'==typeof O.orientation.lock)return void await O.orientation.lock(n);const t=O.lockOrientation||O.mozLockOrientation||O.msLockOrientation;if('function'==typeof t){const o=A(n);if(!t.call(O,o))throw new Error(`Applying orientation lock: ${JSON.stringify(n)} to device was denied`);return}throw new Error("expo-screen-orientation: The browser doesn't support locking screen orientation.")}let k=o.WebOrientationLock.UNKNOWN;class l extends n.NativeModule{orientation=n.Platform.canUseViewport&&(O.orientation||O.msOrientation)||null;emitOrientationEvent=async()=>{const[n,o]=await Promise.all([(0,t.getOrientationLockAsync)(),(0,t.getOrientationAsync)()]);this.emit('expoDidUpdateDimensions',{orientationLock:n,orientationInfo:{orientation:o}})};startObserving(){n.Platform.canUseEventListeners&&(this.orientation?.addEventListener?this.orientation.addEventListener('change',this.emitOrientationEvent):window.addEventListener('orientationchange',this.emitOrientationEvent))}stopObserving(){n.Platform.canUseEventListeners&&(this.orientation?.removeEventListener?this.orientation.removeEventListener('change',this.emitOrientationEvent):window.removeEventListener('orientationchange',this.emitOrientationEvent))}async supportsOrientationLockAsync(n){return n in c}async getPlatformOrientationLockAsync(){return k}async getOrientationAsync(){const n=O.msOrientation||(O.orientation||O.mozOrientation||{}).type,t=s[n];return t||o.Orientation.UNKNOWN}async lockAsync(n){const t=c[n];if(!t)throw new TypeError(`Invalid Orientation Lock: ${n}`);await L(t)}async lockPlatformAsync(n){await L(n),k=n}async unlockAsync(){if(O.orientation&&'unlock'in O.orientation&&'function'==typeof O.orientation.unlock)return void O.orientation.unlock();const n=O.unlockOrientation||O.mozUnlockOrientation||O.msUnlockOrientation;if('function'==typeof n){if(!n.call(O))throw new Error("Unlocking screen orientation on device was denied");return}throw new Error("expo-screen-orientation: The browser doesn't support unlocking screen orientation.")}}var N=(0,n.registerWebModule)(l,'ExpoScreenOrientation')},2537,[441,1057,2538]);
3317
3317
  __d(function(g,r,i,a,m,e,d){"use strict";var A,n,t,R,N;Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"Orientation",{enumerable:!0,get:function(){return A}}),Object.defineProperty(e,"OrientationLock",{enumerable:!0,get:function(){return n}}),Object.defineProperty(e,"SizeClassIOS",{enumerable:!0,get:function(){return t}}),Object.defineProperty(e,"WebOrientationLock",{enumerable:!0,get:function(){return R}}),Object.defineProperty(e,"WebOrientation",{enumerable:!0,get:function(){return N}}),(function(A){A[A.UNKNOWN=0]="UNKNOWN",A[A.PORTRAIT_UP=1]="PORTRAIT_UP",A[A.PORTRAIT_DOWN=2]="PORTRAIT_DOWN",A[A.LANDSCAPE_LEFT=3]="LANDSCAPE_LEFT",A[A.LANDSCAPE_RIGHT=4]="LANDSCAPE_RIGHT"})(A||(A={})),(function(A){A[A.DEFAULT=0]="DEFAULT",A[A.ALL=1]="ALL",A[A.PORTRAIT=2]="PORTRAIT",A[A.PORTRAIT_UP=3]="PORTRAIT_UP",A[A.PORTRAIT_DOWN=4]="PORTRAIT_DOWN",A[A.LANDSCAPE=5]="LANDSCAPE",A[A.LANDSCAPE_LEFT=6]="LANDSCAPE_LEFT",A[A.LANDSCAPE_RIGHT=7]="LANDSCAPE_RIGHT",A[A.OTHER=8]="OTHER",A[A.UNKNOWN=9]="UNKNOWN"})(n||(n={})),(function(A){A[A.UNKNOWN=0]="UNKNOWN",A[A.COMPACT=1]="COMPACT",A[A.REGULAR=2]="REGULAR"})(t||(t={})),(function(A){A.PORTRAIT_PRIMARY="portrait-primary",A.PORTRAIT_SECONDARY="portrait-secondary",A.PORTRAIT="portrait",A.LANDSCAPE_PRIMARY="landscape-primary",A.LANDSCAPE_SECONDARY="landscape-secondary",A.LANDSCAPE="landscape",A.ANY="any",A.NATURAL="natural",A.UNKNOWN="unknown"})(R||(R={})),(function(A){A.PORTRAIT_PRIMARY="portrait-primary",A.PORTRAIT_SECONDARY="portrait-secondary",A.LANDSCAPE_PRIMARY="landscape-primary",A.LANDSCAPE_SECONDARY="landscape-secondary"})(N||(N={}))},2538,[]);
3318
3318
  __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"DISCARDED_CATEGORY",{enumerable:!0,get:function(){return u}}),Object.defineProperty(e,"PIPELINE_TRACE_CATEGORY",{enumerable:!0,get:function(){return l}}),e.parseDiscardedEvent=v,e.parseTraceEvent=E,e.discardReasonKey=function(n){switch(n){case'below-threshold':case'confidence':return'v2.overlay.reasonThreshold';case'full-frame-guard':return'v2.overlay.reasonFullFrame';case'nms':return'v2.overlay.reasonNms';case'class-filter':return'v2.overlay.reasonClassFilter';case'zone-gate':return'v2.overlay.reasonZoneGate';default:return null}},Object.defineProperty(e,"RELEVANT_DISCARD_REASONS",{enumerable:!0,get:function(){return O}}),e.isRelevantDiscard=x,e.filterRelevantDiscards=function(n){return n.filter(x)},e.useDiscardedDetections=function(f,b){const y=(0,n.c)(6),{controller:h,state:p}=(0,s.useConnection)(),[O,x]=(0,t.useState)(c),T=(0,t.useRef)(void 0),j=(0,t.useRef)(void 0);let R,_;y[0]!==p||y[1]!==h||y[2]!==f||y[3]!==b?(R=()=>{if(!b||"connected"!==p)return void x(c);const n=h.getSystem();if(!n)return;const t=D,s=n.subscribeEvent(u,n=>{const s=v(n);s&&Number(s.sourceId)===f&&(x(n=>Object.assign({},n,{boxes:s.boxes,frameWidth:s.width,frameHeight:s.height})),t(T),T.current=setTimeout(()=>x(C),o.DETECTION_FADE_MS))}),y=n.subscribeEvent(l,n=>{const s=E(n);s&&s.deviceId===f&&(x(n=>Object.assign({},n,{trace:s})),t(j),j.current=setTimeout(()=>x(A),o.DETECTION_FADE_MS))});return()=>{s(),y(),t(T),t(j),x(c)}},_=[h,p,f,b],y[0]=p,y[1]=h,y[2]=f,y[3]=b,y[4]=R,y[5]=_):(R=y[4],_=y[5]);return(0,t.useEffect)(R,_),O};var n=r(d[0]),t=r(d[1]),s=r(d[2]),o=r(d[3]);const u='detection.result',l='pipeline.trace',c={boxes:[],frameWidth:0,frameHeight:0,trace:null};function f(n){return'object'==typeof n&&null!==n}function b(n){return'number'==typeof n&&Number.isFinite(n)?n:null}function y(n,t,s){if(Array.isArray(n)&&4===n.length&&t>0&&s>0){const o=b(n[0]),u=b(n[1]),l=b(n[2]),c=b(n[3]);return null!==o&&null!==u&&null!==l&&null!==c?{x1:o/t,y1:u/s,x2:l/t,y2:c/s}:null}if(!f(n))return null;const o=b(n.x),u=b(n.y),l=b(n.width),c=b(n.height);if(null!==o&&null!==u&&null!==l&&null!==c&&t>0&&s>0)return{x1:o/t,y1:u/s,x2:(o+l)/t,y2:(u+c)/s};const y=b(n.x1),h=b(n.y1),v=b(n.x2),p=b(n.y2);return null!==y&&null!==h&&null!==v&&null!==p?{x1:y,y1:h,x2:v,y2:p}:null}function h(n){return'string'==typeof n.macroClass&&n.macroClass?n.macroClass:'string'==typeof n.class&&n.class?n.class:'string'==typeof n.label&&n.label?n.label:'object'}function v(n){if(!f(n))return null;const t=n.source;if(!f(t))return null;const s=t.id;if('string'!=typeof s&&'number'!=typeof s)return null;const o=n.data;if(!f(o))return null;const u=o.frame;if(!f(u))return null;const l=u.discarded;if(!Array.isArray(l))return null;const c=b(u.width)??0,v=b(u.height)??0,p=[];for(const n of l){if(!f(n))continue;const t=b(n.score);if(null===t)continue;const s=y(n.bbox,c,v);if(!s)continue;const o='string'==typeof n.reason&&n.reason.length>0?n.reason:void 0;p.push(Object.assign({label:h(n),score:t},s,void 0!==o?{reason:o}:{}))}return{sourceId:s,boxes:p,width:c,height:v}}const p='shed:';function E(n){if(!f(n))return null;const t=n.data;if(!f(t))return null;const s=b(t.deviceId);if(null===s)return null;const o=Array.isArray(t.steps)?t.steps:[];let u,l=0;for(const n of o)f(n)&&('full-frame'===n.inputType&&'detections'===n.outputKind&&(l+=b(n.outputCount)??0),'string'==typeof n.error&&n.error.startsWith(p)&&(u=n.error.slice(p.length)||'overload'));const c=b(t.detectionCount)??0;return Object.assign({deviceId:s,modelSaw:l,kept:c},void 0!==u?{shedReason:u}:{})}const O=Object.freeze(['below-threshold','confidence','zone-gate']);function x(n){return void 0!==n.reason&&O.includes(n.reason)}function A(n){return Object.assign({},n,{trace:null})}function C(n){return Object.assign({},n,{boxes:[],frameWidth:0,frameHeight:0})}function D(n){n.current&&clearTimeout(n.current),n.current=void 0}},2539,[787,16,815,1084]);
3319
- __d(function(g,r,i,a,m,_e,d){"use strict";function e(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"TimelineToolbarInline",{enumerable:!0,get:function(){return z}});var t=r(d[0]),n=r(d[1]),o=e(r(d[2])),l=e(r(d[3])),s=e(r(d[4])),c=e(r(d[5])),u=r(d[6]),p=r(d[7]),b=r(d[8]),f=r(d[9]),y=r(d[10]),h=r(d[11]),x=r(d[12]),k=r(d[13]),j=r(d[14]),w=r(d[15]),S=r(d[16]),L=r(d[17]),v=r(d[18]);const z=(0,n.memo)(function(e){const n=(0,t.c)(155),{t:c}=(0,u.useTranslation)(),{colors:L}=(0,S.useTheme)(),z=(0,p.useTimelineScale)(),P=z.control.button,D=z.control.arrow,I=z.space.sm+z.space.xs,C=z.space.xs+z.space.xs,B=null!=e.battery||null!=e.networkLink;let T;n[0]!==B||n[1]!==z.width?(T=(0,j.dayArrowsVisible)(z.width,B),n[0]=B,n[1]=z.width,n[2]=T):T=n[2];const R=T,q=(0,h.useStatusDetail)();let M;n[3]!==P||n[4]!==L.primary||n[5]!==z.radius.md?(M=e=>[O.iconBtn,{minWidth:P,height:P,borderRadius:z.radius.md},{backgroundColor:e?L.primary:"transparent"}],n[3]=P,n[4]=L.primary,n[5]=z.radius.md,n[6]=M):M=n[6];const A=M;let V;n[7]!==L.foregroundMuted||n[8]!==L.primaryForeground?(V=e=>e?L.primaryForeground:L.foregroundMuted,n[7]=L.foregroundMuted,n[8]=L.primaryForeground,n[9]=V):V=n[9];const W=V;let H,G,N,_,E,F;n[10]!==L.background||n[11]!==L.border?(H=[O.container,{backgroundColor:L.background,borderBottomColor:L.border}],n[10]=L.background,n[11]=L.border,n[12]=H):H=n[12],n[13]!==I||n[14]!==z.space.md||n[15]!==z.space.xs?(G=[O.row,{paddingVertical:I,gap:z.space.xs,paddingHorizontal:z.space.md}],n[13]=I,n[14]=z.space.md,n[15]=z.space.xs,n[16]=G):G=n[16],n[17]!==P||n[18]!==L.border||n[19]!==L.foreground||n[20]!==L.surface||n[21]!==e||n[22]!==c||n[23]!==z.icon?(N=e.hideBack?null:(0,v.jsx)(s.default,{style:[O.backBtn,{width:P,height:P,borderRadius:P/2,borderColor:L.border,backgroundColor:L.surface}],onPress:()=>{(0,w.hapticTap)(),e.onBack()},hitSlop:6,accessibilityLabel:c("v2.common.back"),children:(0,v.jsx)(b.ArrowLeft,{size:z.icon.md,color:L.foreground})}),n[17]=P,n[18]=L.border,n[19]=L.foreground,n[20]=L.surface,n[21]=e,n[22]=c,n[23]=z.icon,n[24]=N):N=n[24],n[25]!==z?(_=z.px(2),n[25]=z,n[26]=_):_=n[26],n[27]!==_?(E=[O.dateGroup,{gap:_}],n[27]=_,n[28]=E):E=n[28],n[29]!==D||n[30]!==L.foregroundMuted||n[31]!==e||n[32]!==R||n[33]!==z?(F=R?(0,v.jsx)(s.default,{style:[O.dateArrow,{width:D,height:D,borderRadius:D/2}],onPress:()=>{(0,w.hapticTap)(),e.onPrevDay?.()},hitSlop:6,children:(0,v.jsx)(b.ChevronLeft,{size:z.px(16),color:L.foregroundMuted})}):null,n[29]=D,n[30]=L.foregroundMuted,n[31]=e,n[32]=R,n[33]=z,n[34]=F):F=n[34];const Q=e.onOpenDatePicker;let U,J,K,X,Y,Z,$,ee,te,ne,oe,re,ie,le,ae,se,de,ce,ue,pe,ge,be,fe,ye;return n[35]!==L.surface||n[36]!==C||n[37]!==z.radius.lg||n[38]!==z.space.md||n[39]!==z.space.sm?(U=[O.datePill,{backgroundColor:L.surface,paddingVertical:C,paddingHorizontal:z.space.md,gap:z.space.sm,borderRadius:z.radius.lg}],n[35]=L.surface,n[36]=C,n[37]=z.radius.lg,n[38]=z.space.md,n[39]=z.space.sm,n[40]=U):U=n[40],n[41]!==z?(J=z.px(12),n[41]=z,n[42]=J):J=n[42],n[43]!==L.foregroundSubtle||n[44]!==J?(K=(0,v.jsx)(b.Calendar,{size:J,color:L.foregroundSubtle}),n[43]=L.foregroundSubtle,n[44]=J,n[45]=K):K=n[45],n[46]!==L.foreground||n[47]!==z.font.sm?(X=[O.dateText,{color:L.foreground,fontSize:z.font.sm,flexShrink:1}],n[46]=L.foreground,n[47]=z.font.sm,n[48]=X):X=n[48],n[49]!==e.dateLabel||n[50]!==X?(Y=(0,v.jsx)(l.default,{style:X,numberOfLines:1,children:e.dateLabel}),n[49]=e.dateLabel,n[50]=X,n[51]=Y):Y=n[51],n[52]!==z?(Z=z.px(10),n[52]=z,n[53]=Z):Z=n[53],n[54]!==L.foregroundSubtle||n[55]!==Z?($=(0,v.jsx)(b.ChevronDown,{size:Z,color:L.foregroundSubtle}),n[54]=L.foregroundSubtle,n[55]=Z,n[56]=$):$=n[56],n[57]!==U||n[58]!==K||n[59]!==Y||n[60]!==$?(ee=(0,v.jsxs)(o.default,{style:U,children:[K,Y,$]}),n[57]=U,n[58]=K,n[59]=Y,n[60]=$,n[61]=ee):ee=n[61],n[62]!==e.onOpenDatePicker||n[63]!==ee?(te=(0,v.jsx)(s.default,{onPress:Q,children:ee}),n[62]=e.onOpenDatePicker,n[63]=ee,n[64]=te):te=n[64],n[65]!==D||n[66]!==L.foregroundMuted||n[67]!==L.foregroundSubtle||n[68]!==e||n[69]!==R||n[70]!==z?(ne=R?(0,v.jsx)(s.default,{style:[O.dateArrow,{width:D,height:D,borderRadius:D/2}],onPress:()=>{(0,w.hapticTap)(),e.onNextDay?.()},disabled:e.nextDayDisabled,hitSlop:6,children:(0,v.jsx)(b.ChevronRight,{size:z.px(16),color:e.nextDayDisabled?L.foregroundSubtle:L.foregroundMuted})}):null,n[65]=D,n[66]=L.foregroundMuted,n[67]=L.foregroundSubtle,n[68]=e,n[69]=R,n[70]=z,n[71]=ne):ne=n[71],n[72]!==te||n[73]!==ne||n[74]!==E||n[75]!==F?(oe=(0,v.jsxs)(o.default,{style:E,children:[F,te,ne]}),n[72]=te,n[73]=ne,n[74]=E,n[75]=F,n[76]=oe):oe=n[76],n[77]===Symbol.for("react.memo_cache_sentinel")?(re=(0,v.jsx)(o.default,{style:O.spacer}),n[77]=re):re=n[77],n[78]!==L||n[79]!==e.battery||n[80]!==q||n[81]!==z.icon||n[82]!==z.space.xs?(ie=e.battery?(0,v.jsx)(o.default,{style:{paddingHorizontal:z.space.xs},children:(0,v.jsx)(h.StatusBadgeButton,{subject:"battery",lines:(0,x.batteryDetailLines)(e.battery),controller:q,children:(0,v.jsx)(f.BatteryBadge,{battery:e.battery,colors:L,size:z.icon.sm,compact:!0})})}):null,n[78]=L,n[79]=e.battery,n[80]=q,n[81]=z.icon,n[82]=z.space.xs,n[83]=ie):ie=n[83],n[84]!==L||n[85]!==e.networkLink||n[86]!==q||n[87]!==z.icon||n[88]!==z.space.xs?(le=(0,y.networkLinkBadgeVisible)(e.networkLink)&&e.networkLink?(0,v.jsx)(o.default,{style:{paddingHorizontal:z.space.xs},children:(0,v.jsx)(h.StatusBadgeButton,{subject:"link",lines:(0,x.networkLinkDetailLines)(e.networkLink),controller:q,children:(0,v.jsx)(y.NetworkLinkBadge,{link:e.networkLink,colors:L,size:z.icon.sm,compact:!0})})}):null,n[84]=L,n[85]=e.networkLink,n[86]=q,n[87]=z.icon,n[88]=z.space.xs,n[89]=le):le=n[89],n[90]!==L||n[91]!==e.battery||n[92]!==e.deviceId||n[93]!==e.networkLink||n[94]!==q||n[95]!==z.icon||n[96]!==z.space.xs?(ae=void 0!==e.deviceId&&(0,k.streamBadgeVisible)({batteryVisible:Boolean(e.battery),linkVisible:Boolean((0,y.networkLinkBadgeVisible)(e.networkLink)&&e.networkLink)})?(0,v.jsx)(o.default,{style:{paddingHorizontal:z.space.xs},children:(0,v.jsx)(h.StatusBadgeButton,{subject:"stream",lines:[],controller:q,children:(0,v.jsx)(k.StreamBadge,{colors:L,size:z.icon.sm})})}):null,n[90]=L,n[91]=e.battery,n[92]=e.deviceId,n[93]=e.networkLink,n[94]=q,n[95]=z.icon,n[96]=z.space.xs,n[97]=ae):ae=n[97],n[98]!==A||n[99]!==W||n[100]!==e.linkedDevicesOpen||n[101]!==e.onOpenLinkedDevices||n[102]!==z.icon?(se=e.onOpenLinkedDevices?(0,v.jsx)(s.default,{style:A(!0===e.linkedDevicesOpen),onPress:e.onOpenLinkedDevices,hitSlop:6,children:(0,v.jsx)(b.Lightbulb,{size:z.icon.sm,color:W(!0===e.linkedDevicesOpen)})}):null,n[98]=A,n[99]=W,n[100]=e.linkedDevicesOpen,n[101]=e.onOpenLinkedDevices,n[102]=z.icon,n[103]=se):se=n[103],n[104]!==A||n[105]!==W||n[106]!==e.onOpenPtz||n[107]!==e.ptzOpen||n[108]!==z.icon?(de=e.onOpenPtz?(0,v.jsx)(s.default,{style:A(!0===e.ptzOpen),onPress:e.onOpenPtz,hitSlop:6,children:(0,v.jsx)(b.Move,{size:z.icon.sm,color:W(!0===e.ptzOpen)})}):null,n[104]=A,n[105]=W,n[106]=e.onOpenPtz,n[107]=e.ptzOpen,n[108]=z.icon,n[109]=de):de=n[109],n[110]!==A||n[111]!==W||n[112]!==e.menuOpen||n[113]!==e.onToggleMenu||n[114]!==z.icon?(ce=e.onToggleMenu?(0,v.jsx)(s.default,{style:A(e.menuOpen),onPress:e.onToggleMenu,hitSlop:6,children:(0,v.jsx)(b.List,{size:z.icon.sm,color:W(e.menuOpen)})}):null,n[110]=A,n[111]=W,n[112]=e.menuOpen,n[113]=e.onToggleMenu,n[114]=z.icon,n[115]=ce):ce=n[115],n[116]!==L.backgroundElevated||n[117]!==L.border||n[118]!==L.foreground||n[119]!==L.primary||n[120]!==A||n[121]!==W||n[122]!==e||n[123]!==z?(ue=void 0===e.qualityLabel?null:(0,v.jsxs)(o.default,{style:O.qualityAnchor,children:[(0,v.jsx)(s.default,{style:A(e.qualityOpen),onPress:e.onToggleQuality,hitSlop:6,accessibilityRole:"button",accessibilityState:{expanded:!0===e.qualityOpen},children:(0,v.jsx)(l.default,{style:[O.qualityText,{color:W(e.qualityOpen),fontSize:z.font.xs}],children:e.qualityLabel})}),e.qualityOpen&&e.qualityOptions&&e.qualityOptions.length>0?(0,v.jsx)(o.default,{style:[O.qualityMenu,{marginTop:z.space.xs,borderRadius:z.radius.lg,backgroundColor:L.backgroundElevated,borderColor:L.border}],accessibilityRole:"menu",children:e.qualityOptions.map(t=>{const n=t.value===e.qualityValue;return(0,v.jsxs)(s.default,{onPress:()=>{(0,w.hapticTap)(),e.onSelectQuality?.(t.value)},style:O.qualityRow,accessibilityRole:"menuitem",accessibilityState:{selected:n},children:[(0,v.jsx)(l.default,{style:{fontSize:z.font.sm,color:n?L.primary:L.foreground,fontWeight:n?"700":"500"},children:t.label}),n?(0,v.jsx)(b.Check,{size:z.px(14),color:L.primary}):null]},t.value)})}):null]}),n[116]=L.backgroundElevated,n[117]=L.border,n[118]=L.foreground,n[119]=L.primary,n[120]=A,n[121]=W,n[122]=e,n[123]=z,n[124]=ue):ue=n[124],n[125]!==A||n[126]!==W||n[127]!==e||n[128]!==c||n[129]!==z.icon?(pe=e.onToggleLegend?(0,v.jsx)(s.default,{style:A(e.legendOpen),onPress:()=>{(0,w.hapticTap)(),e.onToggleLegend?.()},hitSlop:6,accessibilityRole:"button",accessibilityLabel:c("v2.theater.legend.open"),children:(0,v.jsx)(b.HelpCircle,{size:z.icon.sm,color:W(e.legendOpen)})}):null,n[125]=A,n[126]=W,n[127]=e,n[128]=c,n[129]=z.icon,n[130]=pe):pe=n[130],n[131]!==oe||n[132]!==ie||n[133]!==le||n[134]!==ae||n[135]!==se||n[136]!==de||n[137]!==ce||n[138]!==ue||n[139]!==pe||n[140]!==G||n[141]!==N?(ge=(0,v.jsxs)(o.default,{style:G,children:[N,oe,re,ie,le,ae,se,de,ce,ue,pe]}),n[131]=oe,n[132]=ie,n[133]=le,n[134]=ae,n[135]=se,n[136]=de,n[137]=ce,n[138]=ue,n[139]=pe,n[140]=G,n[141]=N,n[142]=ge):ge=n[142],n[143]!==e.deviceId?(be=void 0===e.deviceId?{}:{deviceId:e.deviceId},n[143]=e.deviceId,n[144]=be):be=n[144],n[145]!==L||n[146]!==e.battery||n[147]!==e.networkLink||n[148]!==q||n[149]!==be?(fe=(0,v.jsx)(h.StatusDetailPopover,Object.assign({controller:q,battery:e.battery,link:e.networkLink},be,{colors:L,placement:"below"})),n[145]=L,n[146]=e.battery,n[147]=e.networkLink,n[148]=q,n[149]=be,n[150]=fe):fe=n[150],n[151]!==H||n[152]!==ge||n[153]!==fe?(ye=(0,v.jsxs)(o.default,{style:H,children:[ge,fe]}),n[151]=H,n[152]=ge,n[153]=fe,n[154]=ye):ye=n[154],ye}),O=c.default.create({container:{borderBottomWidth:1,zIndex:20},row:{flexDirection:'row',alignItems:'center',flexWrap:'nowrap',gap:L.SPACING.xs,paddingHorizontal:L.SPACING.md,paddingVertical:L.SPACING.sm+2},backBtn:{width:30,height:30,borderRadius:15,alignItems:'center',justifyContent:'center',borderWidth:c.default.hairlineWidth},dateGroup:{flexDirection:'row',alignItems:'center'},dateArrow:{width:28,height:28,borderRadius:14,alignItems:'center',justifyContent:'center'},datePill:{flexDirection:'row',alignItems:'center',gap:L.SPACING.sm,paddingHorizontal:L.SPACING.md,paddingVertical:L.SPACING.xs+2,borderRadius:L.RADIUS.lg},dateText:{fontSize:12,fontWeight:'600'},spacer:{flex:1,minWidth:0,flexShrink:1},iconBtn:{minWidth:30,height:30,paddingHorizontal:L.SPACING.sm,borderRadius:L.RADIUS.lg,alignItems:'center',justifyContent:'center'},qualityAnchor:{position:'relative'},qualityMenu:{position:'absolute',top:'100%',right:0,minWidth:132,borderWidth:1,paddingVertical:4,zIndex:40,elevation:8},qualityRow:{flexDirection:'row',alignItems:'center',justifyContent:'space-between',gap:12,paddingHorizontal:12,paddingVertical:8},qualityText:{fontSize:10,fontWeight:'700'}})},2540,[787,16,115,194,248,33,813,994,814,836,837,838,839,840,2541,817,789,831,10]);
3319
+ __d(function(g,r,i,a,m,_e,d){"use strict";function e(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"TimelineToolbarInline",{enumerable:!0,get:function(){return z}});var t=r(d[0]),n=r(d[1]),o=e(r(d[2])),l=e(r(d[3])),s=e(r(d[4])),c=e(r(d[5])),u=r(d[6]),p=r(d[7]),b=r(d[8]),f=r(d[9]),y=r(d[10]),h=r(d[11]),x=r(d[12]),k=r(d[13]),j=r(d[14]),S=r(d[15]),w=r(d[16]),v=r(d[17]),L=r(d[18]);const z=(0,n.memo)(function(e){const n=(0,t.c)(156),{t:c}=(0,u.useTranslation)(),{colors:v}=(0,w.useTheme)(),z=(0,p.useTimelineScale)(),P=z.control.button,D=z.control.arrow,I=z.space.sm+z.space.xs,C=z.space.xs+z.space.xs,B=null!=e.battery||null!=e.networkLink;let T;n[0]!==B||n[1]!==z.width?(T=(0,j.dayArrowsVisible)(z.width,B),n[0]=B,n[1]=z.width,n[2]=T):T=n[2];const R=T,M=(0,h.useStatusDetail)();let q;n[3]!==P||n[4]!==v.primary||n[5]!==z.radius.md?(q=e=>[O.iconBtn,{minWidth:P,height:P,borderRadius:z.radius.md},{backgroundColor:e?v.primary:"transparent"}],n[3]=P,n[4]=v.primary,n[5]=z.radius.md,n[6]=q):q=n[6];const A=q;let V;n[7]!==v.foregroundMuted||n[8]!==v.primaryForeground?(V=e=>e?v.primaryForeground:v.foregroundMuted,n[7]=v.foregroundMuted,n[8]=v.primaryForeground,n[9]=V):V=n[9];const W=V;let H,G,N,_,E,F;n[10]!==v.background||n[11]!==v.border?(H=[O.container,{backgroundColor:v.background,borderBottomColor:v.border}],n[10]=v.background,n[11]=v.border,n[12]=H):H=n[12],n[13]!==I||n[14]!==z.space.md||n[15]!==z.space.xs?(G=[O.row,{paddingVertical:I,gap:z.space.xs,paddingHorizontal:z.space.md}],n[13]=I,n[14]=z.space.md,n[15]=z.space.xs,n[16]=G):G=n[16],n[17]!==P||n[18]!==v.border||n[19]!==v.foreground||n[20]!==v.surface||n[21]!==e||n[22]!==c||n[23]!==z.icon?(N=e.hideBack?null:(0,L.jsx)(s.default,{style:[O.backBtn,{width:P,height:P,borderRadius:P/2,borderColor:v.border,backgroundColor:v.surface}],onPress:()=>{(0,S.hapticTap)(),e.onBack()},hitSlop:6,accessibilityLabel:c("v2.common.back"),children:(0,L.jsx)(b.ArrowLeft,{size:z.icon.md,color:v.foreground})}),n[17]=P,n[18]=v.border,n[19]=v.foreground,n[20]=v.surface,n[21]=e,n[22]=c,n[23]=z.icon,n[24]=N):N=n[24],n[25]!==z?(_=z.px(2),n[25]=z,n[26]=_):_=n[26],n[27]!==_?(E=[O.dateGroup,{gap:_}],n[27]=_,n[28]=E):E=n[28],n[29]!==D||n[30]!==v.foregroundMuted||n[31]!==e||n[32]!==R||n[33]!==z?(F=R?(0,L.jsx)(s.default,{style:[O.dateArrow,{width:D,height:D,borderRadius:D/2}],onPress:()=>{(0,S.hapticTap)(),e.onPrevDay?.()},hitSlop:6,children:(0,L.jsx)(b.ChevronLeft,{size:z.px(16),color:v.foregroundMuted})}):null,n[29]=D,n[30]=v.foregroundMuted,n[31]=e,n[32]=R,n[33]=z,n[34]=F):F=n[34];const Q=e.onOpenDatePicker;let U,J,K,X,Y,Z,$,ee,te,ne,oe,re,ie,le,ae,se,de,ce,ue,pe,ge,be,fe,ye;return n[35]!==v.surface||n[36]!==C||n[37]!==z.radius.lg||n[38]!==z.space.md||n[39]!==z.space.sm?(U=[O.datePill,{backgroundColor:v.surface,paddingVertical:C,paddingHorizontal:z.space.md,gap:z.space.sm,borderRadius:z.radius.lg}],n[35]=v.surface,n[36]=C,n[37]=z.radius.lg,n[38]=z.space.md,n[39]=z.space.sm,n[40]=U):U=n[40],n[41]!==z?(J=z.px(12),n[41]=z,n[42]=J):J=n[42],n[43]!==v.foregroundSubtle||n[44]!==J?(K=(0,L.jsx)(b.Calendar,{size:J,color:v.foregroundSubtle}),n[43]=v.foregroundSubtle,n[44]=J,n[45]=K):K=n[45],n[46]!==v.foreground||n[47]!==z.font.sm?(X=[O.dateText,{color:v.foreground,fontSize:z.font.sm,flexShrink:1}],n[46]=v.foreground,n[47]=z.font.sm,n[48]=X):X=n[48],n[49]!==e.dateLabel||n[50]!==X?(Y=(0,L.jsx)(l.default,{style:X,numberOfLines:1,children:e.dateLabel}),n[49]=e.dateLabel,n[50]=X,n[51]=Y):Y=n[51],n[52]!==z?(Z=z.px(10),n[52]=z,n[53]=Z):Z=n[53],n[54]!==v.foregroundSubtle||n[55]!==Z?($=(0,L.jsx)(b.ChevronDown,{size:Z,color:v.foregroundSubtle}),n[54]=v.foregroundSubtle,n[55]=Z,n[56]=$):$=n[56],n[57]!==U||n[58]!==K||n[59]!==Y||n[60]!==$?(ee=(0,L.jsxs)(o.default,{style:U,children:[K,Y,$]}),n[57]=U,n[58]=K,n[59]=Y,n[60]=$,n[61]=ee):ee=n[61],n[62]!==e.onOpenDatePicker||n[63]!==ee?(te=(0,L.jsx)(s.default,{onPress:Q,children:ee}),n[62]=e.onOpenDatePicker,n[63]=ee,n[64]=te):te=n[64],n[65]!==D||n[66]!==v.foregroundMuted||n[67]!==v.foregroundSubtle||n[68]!==e||n[69]!==R||n[70]!==z?(ne=R?(0,L.jsx)(s.default,{style:[O.dateArrow,{width:D,height:D,borderRadius:D/2}],onPress:()=>{(0,S.hapticTap)(),e.onNextDay?.()},disabled:e.nextDayDisabled,hitSlop:6,children:(0,L.jsx)(b.ChevronRight,{size:z.px(16),color:e.nextDayDisabled?v.foregroundSubtle:v.foregroundMuted})}):null,n[65]=D,n[66]=v.foregroundMuted,n[67]=v.foregroundSubtle,n[68]=e,n[69]=R,n[70]=z,n[71]=ne):ne=n[71],n[72]!==te||n[73]!==ne||n[74]!==E||n[75]!==F?(oe=(0,L.jsxs)(o.default,{style:E,children:[F,te,ne]}),n[72]=te,n[73]=ne,n[74]=E,n[75]=F,n[76]=oe):oe=n[76],n[77]===Symbol.for("react.memo_cache_sentinel")?(re=(0,L.jsx)(o.default,{style:O.spacer}),n[77]=re):re=n[77],n[78]!==v||n[79]!==e.battery||n[80]!==M||n[81]!==z.icon||n[82]!==z.space.xs?(ie=e.battery?(0,L.jsx)(o.default,{style:{paddingHorizontal:z.space.xs},children:(0,L.jsx)(h.StatusBadgeButton,{subject:"battery",lines:(0,x.batteryDetailLines)(e.battery),controller:M,children:(0,L.jsx)(f.BatteryBadge,{battery:e.battery,colors:v,size:z.icon.sm,compact:!0})})}):null,n[78]=v,n[79]=e.battery,n[80]=M,n[81]=z.icon,n[82]=z.space.xs,n[83]=ie):ie=n[83],n[84]!==v||n[85]!==e.networkLink||n[86]!==M||n[87]!==z.icon||n[88]!==z.space.xs?(le=(0,y.networkLinkBadgeVisible)(e.networkLink)&&e.networkLink?(0,L.jsx)(o.default,{style:{paddingHorizontal:z.space.xs},children:(0,L.jsx)(h.StatusBadgeButton,{subject:"link",lines:(0,x.networkLinkDetailLines)(e.networkLink),controller:M,children:(0,L.jsx)(y.NetworkLinkBadge,{link:e.networkLink,colors:v,size:z.icon.sm,compact:!0})})}):null,n[84]=v,n[85]=e.networkLink,n[86]=M,n[87]=z.icon,n[88]=z.space.xs,n[89]=le):le=n[89],n[90]!==v||n[91]!==e.battery||n[92]!==e.deviceId||n[93]!==e.networkLink||n[94]!==M||n[95]!==z.icon||n[96]!==z.space.xs?(ae=void 0!==e.deviceId&&(0,k.streamBadgeVisible)({batteryVisible:Boolean(e.battery),linkVisible:Boolean((0,y.networkLinkBadgeVisible)(e.networkLink)&&e.networkLink)})?(0,L.jsx)(o.default,{style:{paddingHorizontal:z.space.xs},children:(0,L.jsx)(h.StatusBadgeButton,{subject:"stream",lines:[],controller:M,children:(0,L.jsx)(k.StreamBadge,{colors:v,size:z.icon.sm})})}):null,n[90]=v,n[91]=e.battery,n[92]=e.deviceId,n[93]=e.networkLink,n[94]=M,n[95]=z.icon,n[96]=z.space.xs,n[97]=ae):ae=n[97],n[98]!==A||n[99]!==W||n[100]!==e.linkedDevicesOpen||n[101]!==e.onOpenLinkedDevices||n[102]!==z.icon?(se=e.onOpenLinkedDevices?(0,L.jsx)(s.default,{style:A(!0===e.linkedDevicesOpen),onPress:e.onOpenLinkedDevices,hitSlop:6,children:(0,L.jsx)(b.Lightbulb,{size:z.icon.sm,color:W(!0===e.linkedDevicesOpen)})}):null,n[98]=A,n[99]=W,n[100]=e.linkedDevicesOpen,n[101]=e.onOpenLinkedDevices,n[102]=z.icon,n[103]=se):se=n[103],n[104]!==A||n[105]!==W||n[106]!==e.onOpenPtz||n[107]!==e.ptzOpen||n[108]!==z.icon?(de=e.onOpenPtz?(0,L.jsx)(s.default,{style:A(!0===e.ptzOpen),onPress:e.onOpenPtz,hitSlop:6,children:(0,L.jsx)(b.Move,{size:z.icon.sm,color:W(!0===e.ptzOpen)})}):null,n[104]=A,n[105]=W,n[106]=e.onOpenPtz,n[107]=e.ptzOpen,n[108]=z.icon,n[109]=de):de=n[109],n[110]!==A||n[111]!==W||n[112]!==e.menuOpen||n[113]!==e.onToggleMenu||n[114]!==c||n[115]!==z.icon?(ce=e.onToggleMenu?(0,L.jsx)(s.default,{style:A(e.menuOpen),onPress:e.onToggleMenu,hitSlop:6,accessibilityRole:"button",accessibilityLabel:c("v2.cameraMenu.title"),children:(0,L.jsx)(b.Settings,{size:z.icon.sm,color:W(e.menuOpen)})}):null,n[110]=A,n[111]=W,n[112]=e.menuOpen,n[113]=e.onToggleMenu,n[114]=c,n[115]=z.icon,n[116]=ce):ce=n[116],n[117]!==v.backgroundElevated||n[118]!==v.border||n[119]!==v.foreground||n[120]!==v.primary||n[121]!==A||n[122]!==W||n[123]!==e||n[124]!==z?(ue=void 0===e.qualityLabel?null:(0,L.jsxs)(o.default,{style:O.qualityAnchor,children:[(0,L.jsx)(s.default,{style:A(e.qualityOpen),onPress:e.onToggleQuality,hitSlop:6,accessibilityRole:"button",accessibilityState:{expanded:!0===e.qualityOpen},children:(0,L.jsx)(l.default,{style:[O.qualityText,{color:W(e.qualityOpen),fontSize:z.font.xs}],children:e.qualityLabel})}),e.qualityOpen&&e.qualityOptions&&e.qualityOptions.length>0?(0,L.jsx)(o.default,{style:[O.qualityMenu,{marginTop:z.space.xs,borderRadius:z.radius.lg,backgroundColor:v.backgroundElevated,borderColor:v.border}],accessibilityRole:"menu",children:e.qualityOptions.map(t=>{const n=t.value===e.qualityValue;return(0,L.jsxs)(s.default,{onPress:()=>{(0,S.hapticTap)(),e.onSelectQuality?.(t.value)},style:O.qualityRow,accessibilityRole:"menuitem",accessibilityState:{selected:n},children:[(0,L.jsx)(l.default,{style:{fontSize:z.font.sm,color:n?v.primary:v.foreground,fontWeight:n?"700":"500"},children:t.label}),n?(0,L.jsx)(b.Check,{size:z.px(14),color:v.primary}):null]},t.value)})}):null]}),n[117]=v.backgroundElevated,n[118]=v.border,n[119]=v.foreground,n[120]=v.primary,n[121]=A,n[122]=W,n[123]=e,n[124]=z,n[125]=ue):ue=n[125],n[126]!==A||n[127]!==W||n[128]!==e||n[129]!==c||n[130]!==z.icon?(pe=e.onToggleLegend?(0,L.jsx)(s.default,{style:A(e.legendOpen),onPress:()=>{(0,S.hapticTap)(),e.onToggleLegend?.()},hitSlop:6,accessibilityRole:"button",accessibilityLabel:c("v2.theater.legend.open"),children:(0,L.jsx)(b.HelpCircle,{size:z.icon.sm,color:W(e.legendOpen)})}):null,n[126]=A,n[127]=W,n[128]=e,n[129]=c,n[130]=z.icon,n[131]=pe):pe=n[131],n[132]!==oe||n[133]!==ie||n[134]!==le||n[135]!==ae||n[136]!==se||n[137]!==de||n[138]!==ce||n[139]!==ue||n[140]!==pe||n[141]!==G||n[142]!==N?(ge=(0,L.jsxs)(o.default,{style:G,children:[N,oe,re,ie,le,ae,se,de,ce,ue,pe]}),n[132]=oe,n[133]=ie,n[134]=le,n[135]=ae,n[136]=se,n[137]=de,n[138]=ce,n[139]=ue,n[140]=pe,n[141]=G,n[142]=N,n[143]=ge):ge=n[143],n[144]!==e.deviceId?(be=void 0===e.deviceId?{}:{deviceId:e.deviceId},n[144]=e.deviceId,n[145]=be):be=n[145],n[146]!==v||n[147]!==e.battery||n[148]!==e.networkLink||n[149]!==M||n[150]!==be?(fe=(0,L.jsx)(h.StatusDetailPopover,Object.assign({controller:M,battery:e.battery,link:e.networkLink},be,{colors:v,placement:"below"})),n[146]=v,n[147]=e.battery,n[148]=e.networkLink,n[149]=M,n[150]=be,n[151]=fe):fe=n[151],n[152]!==H||n[153]!==ge||n[154]!==fe?(ye=(0,L.jsxs)(o.default,{style:H,children:[ge,fe]}),n[152]=H,n[153]=ge,n[154]=fe,n[155]=ye):ye=n[155],ye}),O=c.default.create({container:{borderBottomWidth:1,zIndex:20},row:{flexDirection:'row',alignItems:'center',flexWrap:'nowrap',gap:v.SPACING.xs,paddingHorizontal:v.SPACING.md,paddingVertical:v.SPACING.sm+2},backBtn:{width:30,height:30,borderRadius:15,alignItems:'center',justifyContent:'center',borderWidth:c.default.hairlineWidth},dateGroup:{flexDirection:'row',alignItems:'center'},dateArrow:{width:28,height:28,borderRadius:14,alignItems:'center',justifyContent:'center'},datePill:{flexDirection:'row',alignItems:'center',gap:v.SPACING.sm,paddingHorizontal:v.SPACING.md,paddingVertical:v.SPACING.xs+2,borderRadius:v.RADIUS.lg},dateText:{fontSize:12,fontWeight:'600'},spacer:{flex:1,minWidth:0,flexShrink:1},iconBtn:{minWidth:30,height:30,paddingHorizontal:v.SPACING.sm,borderRadius:v.RADIUS.lg,alignItems:'center',justifyContent:'center'},qualityAnchor:{position:'relative'},qualityMenu:{position:'absolute',top:'100%',right:0,minWidth:132,borderWidth:1,paddingVertical:4,zIndex:40,elevation:8},qualityRow:{flexDirection:'row',alignItems:'center',justifyContent:'space-between',gap:12,paddingHorizontal:12,paddingVertical:8},qualityText:{fontSize:10,fontWeight:'700'}})},2540,[787,16,115,194,248,33,813,994,814,836,837,838,839,840,2541,817,789,831,10]);
3320
3320
  __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"COMPACT_TOOLBAR_WIDTH",{enumerable:!0,get:function(){return t}}),e.dayArrowsVisible=function(n,u){return!(u&&n<t)};const t=520},2541,[]);
3321
3321
  __d(function(g,r,i,a,m,_e,d){"use strict";Object.defineProperty(_e,'__esModule',{value:!0}),_e.MeasuredTimelineScale=function(e){const n=(0,t.c)(13),{availableWidth:h,density:v,children:y,fill:_}=e,f=void 0!==_&&_,[S,b]=(0,l.useState)(null);let W;n[0]===Symbol.for("react.memo_cache_sentinel")?(W=e=>{const t=e.nativeEvent.layout.width;b(e=>(0,s.shouldAcceptScaleWidth)(e,t)?t:e)},n[0]=W):W=n[0];const j=W;let x,M,T,p;n[1]!==f?(x=(0,s.measuredScaleBoxStyle)(f),n[1]=f,n[2]=x):x=n[2];n[3]!==h||n[4]!==S?(M=(0,s.scaleWidthToUse)(S,h),n[3]=h,n[4]=S,n[5]=M):M=n[5];n[6]!==y||n[7]!==v||n[8]!==M?(T=(0,u.jsx)(o.TimelineScaleProvider,{availableWidth:M,density:v,children:y}),n[6]=y,n[7]=v,n[8]=M,n[9]=T):T=n[9];n[10]!==x||n[11]!==T?(p=(0,u.jsx)(c.default,{onLayout:j,style:x,children:T}),n[10]=x,n[11]=T,n[12]=p):p=n[12];return p};var e,t=r(d[0]),l=r(d[1]),n=r(d[2]),c=(e=n)&&e.__esModule?e:{default:e},o=r(d[3]),s=r(d[4]),u=r(d[5])},2542,[787,16,115,994,2543,10]);
3322
3322
  __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"SCALE_WIDTH_EPSILON",{enumerable:!0,get:function(){return t}}),e.shouldAcceptScaleWidth=function(n,u){return!(!Number.isFinite(u)||u<=0)&&(null===n||Math.abs(u-n)>=t)},e.scaleWidthToUse=function(t,n){return null!==t&&t>0?t:n},e.measuredScaleBoxStyle=function(t){return t?{flex:1,minHeight:0}:void 0};const t=1},2543,[]);
@@ -3367,7 +3367,7 @@ __d(function(g,r,i,_a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{
3367
3367
  __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.playsFromRecording=A,e.parseClip=v,e.parseClips=function(n,t){if(!Array.isArray(n))return[];const l=[];for(const u of n){const n=v(u,t);null!==n&&l.push(n)}return l};var n=r(d[0]),t=r(d[1]);const l=['motion','object','audio','native'];function u(n){return l.includes(n)?n:'motion'}function s(n){if(!Array.isArray(n))return null;const t=n.filter(n=>'string'==typeof n&&n.length>0);return t.length>0?t:null}function o(n){if(!Array.isArray(n))return null;const t=n.filter(n=>'string'==typeof n&&n.length>0);return t.length>0?t:null}function c(t){if(!Array.isArray(t))return null;const l=[];for(const u of t){if(!(0,n.isRecord)(u))continue;const{startMs:t,endMs:s}=u;'number'==typeof t&&'number'==typeof s&&(Number.isFinite(t)&&Number.isFinite(s)&&l.push({startMs:t,endMs:s}))}return l.length>0?l:null}function f(t){if(!(0,n.isRecord)(t))return null;const{id:l,bytes:u}=t;return'string'!=typeof l||0===l.length||'number'!=typeof u||!Number.isFinite(u)||u<0?null:{id:l,bytes:u}}function b(t){if(!(0,n.isRecord)(t))return null;const l=f(t.sub),u=f(t.main);return null===l&&null===u?null:Object.assign({},null!==l?{sub:l}:{},null!==u?{main:u}:{})}function p(n){if(!Array.isArray(n))return null;const t=n.filter(n=>'string'==typeof n&&n.length>0);return t.length>0?t:null}function y(n){return'number'==typeof n&&Number.isFinite(n)?n:null}function h(n){return'string'==typeof n&&n.length>0?n:null}function A(n){return n===t.CLIP_SOURCE_ANALYTICS}function v(t,l){if(!(0,n.isRecord)(t))return null;const{id:f,source:v,timeRange:M,thumbnail:I}=t;if('string'!=typeof f||0===f.length)return null;if('string'!=typeof v||0===v.length)return null;if(!(0,n.isRecord)(M))return null;const{startMs:R,endMs:F}=M;if('number'!=typeof R||'number'!=typeof F)return null;if(!Number.isFinite(R)||!Number.isFinite(F)||F<=R)return null;const N=s(t.eventIds),O=c(t.holes),_=o(t.labels),k=b(t.streams),C=p(t.nativeTypes),S=y(t.catalogAsOf),U=h(t.thumbnailMint),j=h(t.thumbnailUnavailable),P=h(t.unplayableReason);return Object.assign({clipId:f,deviceId:l,startMs:R,endMs:F,sourceId:v,kind:u(t.kind),playback:A(v)?{kind:'recorded',deviceId:l}:{kind:'native',deviceId:l,clipId:f}},'string'==typeof I&&I.length>0?{thumbnailUrl:I}:{},null!==U?{thumbnailMintUrl:U}:{},null!==j?{thumbnailUnavailable:j}:{},null!==N?{eventIds:N}:{},null!==O?{holes:O}:{},null!==_?{labels:_}:{},null!==k?{streams:k}:{},null!==C?{nativeTypes:C}:{},null!==S?{catalogAsOf:S}:{},!1===t.playable?{playable:!1}:{},null!==P?{unplayableReason:P}:{},'boolean'==typeof t.supportSub?{supportSub:t.supportSub}:{},!0===t.inProgress?{inProgress:!0}:{})}},2588,[870,1094]);
3368
3368
  __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"CLIP_PROVIDER_CAMSTACK_SOURCE",{enumerable:!0,get:function(){return t}}),e.parseClipSources=function(t){if(!Array.isArray(t))return[];const o=[];for(const c of t){if(!(0,n.isRecord)(c))continue;const{source:t,addonId:u,label:l,availability:f}=c;if('string'!=typeof t||0===t.length)continue;if('string'!=typeof u||0===u.length)continue;const p=(0,n.isRecord)(f)?f:{};o.push(Object.assign({sourceId:t,addonId:u,label:'string'==typeof l&&l.length>0?l:t,state:s(p.state)},'string'==typeof p.reason&&p.reason.length>0?{reason:p.reason}:{},'number'==typeof p.catalogAsOf&&Number.isFinite(p.catalogAsOf)?{catalogAsOf:p.catalogAsOf}:{}))}return o},e.resolveClipProvider=function(n){const{chosen:o,sources:s}=n;if(0===s.length)return{sourceId:null,addonId:null,derivation:'derived',chosenMissing:!1,state:null};if(void 0!==o&&o.length>0){const n=s.find(n=>n.sourceId===o);if(void 0!==n)return c(n,!1)}const u=s.find(n=>n.sourceId===t)??s[0],l=void 0!==o&&o.length>0;return c(u,l)},e.clipSourcePickerOptions=function(n){return n.map(n=>Object.assign({value:n.sourceId,label:n.label,stateKey:u[n.state]},void 0!==n.reason?{detail:n.reason}:{}))};var n=r(d[0]);const t=r(d[1]).CLIP_SOURCE_ANALYTICS,o=['ok','sleeping','unreachable','no-storage','index-empty'];function s(n){return o.includes(n)?n:'unknown'}function c(n,o){return Object.assign({sourceId:n.sourceId,addonId:n.addonId,derivation:n.sourceId===t?'derived':'cap',chosenMissing:o,state:n.state},void 0!==n.reason?{reason:n.reason}:{})}const u={ok:null,sleeping:'v2.clips.sourceStateSleeping',unreachable:'v2.clips.sourceStateUnreachable','no-storage':'v2.clips.sourceStateNoStorage','index-empty':'v2.clips.sourceStateIndexEmpty',unknown:'v2.clips.sourceStateUnknown'}},2589,[870,1094]);
3369
3369
  __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.RecordingSourceRow=function(C){const S=(0,o.c)(15),{deviceId:O,last:_}=C,{t:p}=(0,n.useTranslation)(),b=(0,s.useCameraRecordingProvider)(O),f=(0,l.useRecordingSourceRows)(O);let h;S[0]!==f||S[1]!==p?(h=(0,u.recordingSourcePickerOptions)(f,p("v2.clips.recordingSourceOurs")).map(R),S[0]=f,S[1]=p,S[2]=h):h=S[2];const A=h;if(A.length<2)return null;const E=b.chosen??u.RECORDING_SOURCE_CAMSTACK;let j,w,D,I;S[3]!==p?(j=p("v2.clips.recordingSourceSetting"),S[3]=p,S[4]=j):j=S[4];S[5]!==b?(w=o=>b.setChosen(o===u.RECORDING_SOURCE_CAMSTACK?void 0:o),S[5]=b,S[6]=w):w=S[6];S[7]!==_?(D=void 0!==_?{last:_}:{},S[7]=_,S[8]=D):D=S[8];S[9]!==A||S[10]!==j||S[11]!==w||S[12]!==D||S[13]!==E?(I=(0,v.jsx)(t.SelectRow,Object.assign({icon:c.HardDrive,label:j,options:A,value:E,onChange:w},D)),S[9]=A,S[10]=j,S[11]=w,S[12]=D,S[13]=E,S[14]=I):I=S[14];return I};var o=r(d[0]);r(d[1]);var n=r(d[2]),c=r(d[3]),t=r(d[4]),s=r(d[5]),l=r(d[6]),u=r(d[7]),v=r(d[8]);function R(o){return{value:o.value,label:o.label}}},2590,[787,16,813,814,952,1240,2396,2395,10]);
3370
- __d(function(g,_r,i,a,m,_e,_d){"use strict";function e(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(_e,'__esModule',{value:!0}),_e.OverlaySettingsSections=function(e){const d=(0,o.c)(88),{deviceId:f,context:w,config:L,onChange:G,highlight:A,onSetHighlight:T}=e,{t:O}=(0,s.useTranslation)(),{colors:z}=(0,c.useTheme)(),[B,D]=(0,r.useState)(!1);let k,W;d[0]!==O?(k=O("v2.overlay.thisCamera"),d[0]=O,d[1]=k):k=d[1];d[2]!==f||d[3]!==k?(W={deviceId:f,name:k},d[2]=f,d[3]=k,d[4]=W):W=d[4];const[_,N]=(0,r.useState)(W);let V;d[5]!==w?(V=e=>(0,y.isRowVisible)(e,w),d[5]=w,d[6]=V):V=d[6];const E=V;let F;d[7]!==E?(F=I.some(E),d[7]=E,d[8]=F):F=d[8];const H=F,{data:K}=(0,x.useLinkedDevices)(f),{data:U}=(0,b.useDeviceLiveFields)(_.deviceId,B);let Y;d[9]!==U?(Y=void 0===U?[]:U,d[9]=U,d[10]=Y):Y=d[10];const $=Y;let X;d[11]!==L||d[12]!==G?(X=e=>G((0,S.patchOverlay)(L,e)),d[11]=L,d[12]=G,d[13]=X):X=d[13];const q=X;let J;d[14]!==L||d[15]!==G?(J=(e,o,r,t)=>{const l={id:(0,S.readoutId)(e),source:e,label:o,corner:"top-right"};void 0!==r&&(l.unit=r),void 0!==t&&(l.precision=t),G((0,S.addReadout)(L,l)),D(!1)},d[14]=L,d[15]=G,d[16]=J):J=d[16];const Q=J;let Z,ee,oe,re,te,le,ie,ne,de,ae,se,ue,ce,ge;d[17]!==H||d[18]!==z.foregroundSubtle||d[19]!==O?(Z=H?(0,j.jsx)(l.default,{style:[M.hint,{color:z.foregroundSubtle}],children:O("v2.overlay.liveOnlyHint")}):null,d[17]=H,d[18]=z.foregroundSubtle,d[19]=O,d[20]=Z):Z=d[20];d[21]!==z.foregroundMuted||d[22]!==w||d[23]!==O?(ee=(0,y.isGroupVisible)("detection",w)?(0,j.jsx)(l.default,{style:[M.section,{color:z.foregroundMuted}],children:O(y.GROUP_HEADER_KEY.detection)}):null,d[21]=z.foregroundMuted,d[22]=w,d[23]=O,d[24]=ee):ee=d[24];d[25]!==w?(oe=(0,y.visibleLayers)(w),d[25]=w,d[26]=oe):oe=d[26];d[27]!==L||d[28]!==G?(re=e=>G((0,S.toggleLayer)(L,e)),d[27]=L,d[28]=G,d[29]=re):re=d[29];d[30]!==L.layers||d[31]!==oe||d[32]!==re?(te=(0,j.jsx)(p.OverlayLayersRow,{layers:oe,selected:L.layers,onToggle:re}),d[30]=L.layers,d[31]=oe,d[32]=re,d[33]=te):te=d[33];d[34]!==L.highlightBorder||d[35]!==A||d[36]!==T||d[37]!==q||d[38]!==E||d[39]!==O?(le=E("highlightBorder")?(0,j.jsxs)(j.Fragment,{children:[(0,j.jsx)(h.PanelToggleRow,{icon:u.Frame,label:O("v2.overlay.highlightBorder"),value:L.highlightBorder,onValueChange:()=>q({highlightBorder:!L.highlightBorder})}),L.highlightBorder?(0,j.jsx)(h.HighlightTriggerRows,{highlight:A,onSetHighlight:T}):null]}):null,d[34]=L.highlightBorder,d[35]=A,d[36]=T,d[37]=q,d[38]=E,d[39]=O,d[40]=le):le=d[40];d[41]!==z.foregroundMuted||d[42]!==L.audioMeter||d[43]!==L.occupancy||d[44]!==L.stats||d[45]!==w||d[46]!==q||d[47]!==E||d[48]!==O?(ie=(0,y.isGroupVisible)("liveIndicators",w)?(0,j.jsxs)(j.Fragment,{children:[(0,j.jsx)(l.default,{style:[M.section,{color:z.foregroundMuted}],children:O(y.GROUP_HEADER_KEY.liveIndicators)}),E("audioMeter")?(0,j.jsx)(C,{icon:u.AudioLines,label:O("v2.cameraMenu.audioLevel"),value:L.audioMeter,onChange:e=>q({audioMeter:e})}):null,E("occupancy")?(0,j.jsx)(C,{icon:u.Users,label:O("v2.overlay.occupancy"),value:L.occupancy,onChange:e=>q({occupancy:e})}):null,E("stats")?(0,j.jsx)(h.PanelToggleRow,{icon:u.Activity,label:O("v2.cameraMenu.streamStats"),value:L.stats,onValueChange:()=>q({stats:!L.stats})}):null]}):null,d[41]=z.foregroundMuted,d[42]=L.audioMeter,d[43]=L.occupancy,d[44]=L.stats,d[45]=w,d[46]=q,d[47]=E,d[48]=O,d[49]=ie):ie=d[49];d[50]!==z.foregroundMuted?(ne=[M.section,{color:z.foregroundMuted}],d[50]=z.foregroundMuted,d[51]=ne):ne=d[51];d[52]!==O?(de=O(y.GROUP_HEADER_KEY.sensors),d[52]=O,d[53]=de):de=d[53];d[54]!==ne||d[55]!==de?(ae=(0,j.jsx)(l.default,{style:ne,children:de}),d[54]=ne,d[55]=de,d[56]=ae):ae=d[56];d[57]!==z.foregroundSubtle||d[58]!==L.readouts.length||d[59]!==O?(se=0===L.readouts.length?(0,j.jsx)(l.default,{style:[M.hint,{color:z.foregroundSubtle}],children:O("v2.overlay.readoutsHint")}):null,d[57]=z.foregroundSubtle,d[58]=L.readouts.length,d[59]=O,d[60]=se):se=d[60];d[61]!==z.foreground||d[62]!==z.foregroundMuted||d[63]!==L||d[64]!==G||d[65]!==O?(ue=L.readouts.map(e=>(0,j.jsxs)(t.default,{style:M.readoutRow,children:[(0,j.jsx)(l.default,{style:[M.readoutLabel,{color:z.foreground}],numberOfLines:1,children:e.label}),(0,j.jsx)(v.OverlayPositionPicker,{value:e.corner,onChange:o=>{"off"!==o&&G((0,S.patchReadout)(L,e.id,{corner:o}))},cellSize:22}),(0,j.jsx)(n.default,{accessibilityRole:"button",accessibilityLabel:O("v2.overlay.removeReadout"),onPress:()=>G((0,S.removeReadout)(L,e.id)),style:M.removeBtn,children:(0,j.jsx)(u.X,{size:16,color:z.foregroundMuted})})]},e.id)),d[61]=z.foreground,d[62]=z.foregroundMuted,d[63]=L,d[64]=G,d[65]=O,d[66]=ue):ue=d[66];d[67]!==z.border||d[68]!==z.foregroundSubtle||d[69]!==z.primary||d[70]!==f||d[71]!==$||d[72]!==K?.devices||d[73]!==B||d[74]!==Q||d[75]!==O||d[76]!==_.deviceId?(ce=B?(0,j.jsxs)(t.default,{style:[M.picker,{borderColor:z.border}],children:[(0,j.jsxs)(t.default,{style:M.deviceRow,children:[(0,j.jsx)(P,{label:O("v2.overlay.thisCamera"),active:_.deviceId===f,onPress:()=>N({deviceId:f,name:O("v2.overlay.thisCamera")})}),(K?.devices??[]).map(e=>(0,j.jsx)(P,{label:e.name,active:_.deviceId===e.id,onPress:()=>N({deviceId:e.id,name:e.name})},e.id))]}),_.deviceId===f?(0,j.jsx)(R,{label:O("v2.overlay.audioDbfs"),caption:"dBFS",onPress:()=>Q({kind:"audioDbfs"},O("v2.overlay.audioDbfs"),"dBFS",1)}):null,0===$.length?(0,j.jsx)(l.default,{style:[M.hint,{color:z.foregroundSubtle}],children:O("v2.overlay.noFields")}):null,$.map(e=>(0,j.jsx)(R,{label:e.label,caption:e.sectionTitle,onPress:()=>Q({kind:"deviceField",deviceId:_.deviceId,sectionId:e.sectionId,fieldKey:e.key},e.label,e.unit,e.precision)},`${e.sectionId}:${e.key}`))]}):(0,j.jsxs)(n.default,{accessibilityRole:"button",onPress:()=>D(!0),style:M.addRow,children:[(0,j.jsx)(u.Plus,{size:18,color:z.primary}),(0,j.jsx)(l.default,{style:[M.addLabel,{color:z.primary}],children:O("v2.overlay.addReadout")})]}),d[67]=z.border,d[68]=z.foregroundSubtle,d[69]=z.primary,d[70]=f,d[71]=$,d[72]=K?.devices,d[73]=B,d[74]=Q,d[75]=O,d[76]=_.deviceId,d[77]=ce):ce=d[77];d[78]!==ee||d[79]!==te||d[80]!==le||d[81]!==ie||d[82]!==ae||d[83]!==se||d[84]!==ue||d[85]!==ce||d[86]!==Z?(ge=(0,j.jsxs)(j.Fragment,{children:[Z,ee,te,le,ie,ae,se,ue,ce]}),d[78]=ee,d[79]=te,d[80]=le,d[81]=ie,d[82]=ae,d[83]=se,d[84]=ue,d[85]=ce,d[86]=Z,d[87]=ge):ge=d[87];return ge};var o=_r(_d[0]),r=_r(_d[1]),t=e(_r(_d[2])),l=e(_r(_d[3])),n=e(_r(_d[4])),d=e(_r(_d[5])),s=_r(_d[6]),u=_r(_d[7]),c=_r(_d[8]),f=_r(_d[9]),h=_r(_d[10]),v=_r(_d[11]),y=_r(_d[12]),p=_r(_d[13]),b=_r(_d[14]),x=_r(_d[15]),S=_r(_d[16]),j=_r(_d[17]);const I=[...(0,y.rowsInGroup)('detection'),...(0,y.rowsInGroup)('liveIndicators')];function P(e){const r=(0,o.c)(17),{label:t,active:d,onPress:s}=e,{colors:u}=(0,c.useTheme)(),f=d?u.primary:u.border;let h,v,y;r[0]!==f?(h={borderColor:f},r[0]=f,r[1]=h):h=r[1],r[2]!==d||r[3]!==u.primary?(v=d?{backgroundColor:u.primary+"22"}:null,r[2]=d,r[3]=u.primary,r[4]=v):v=r[4],r[5]!==h||r[6]!==v?(y=[M.chip,h,v],r[5]=h,r[6]=v,r[7]=y):y=r[7];const p=d?u.primary:u.foregroundMuted;let b,x,S;return r[8]!==p?(b=[M.chipText,{color:p}],r[8]=p,r[9]=b):b=r[9],r[10]!==t||r[11]!==b?(x=(0,j.jsx)(l.default,{style:b,numberOfLines:1,children:t}),r[10]=t,r[11]=b,r[12]=x):x=r[12],r[13]!==s||r[14]!==y||r[15]!==x?(S=(0,j.jsx)(n.default,{accessibilityRole:"button",onPress:s,style:y,children:x}),r[13]=s,r[14]=y,r[15]=x,r[16]=S):S=r[16],S}function R(e){const r=(0,o.c)(19),{label:d,caption:s,onPress:f}=e,{colors:h}=(0,c.useTheme)();let v,y,p,b,x,S,I;return r[0]!==h.foreground?(v=[M.fieldLabel,{color:h.foreground}],r[0]=h.foreground,r[1]=v):v=r[1],r[2]!==d||r[3]!==v?(y=(0,j.jsx)(l.default,{style:v,numberOfLines:1,children:d}),r[2]=d,r[3]=v,r[4]=y):y=r[4],r[5]!==h.foregroundSubtle?(p=[M.fieldCaption,{color:h.foregroundSubtle}],r[5]=h.foregroundSubtle,r[6]=p):p=r[6],r[7]!==s||r[8]!==p?(b=(0,j.jsx)(l.default,{style:p,numberOfLines:1,children:s}),r[7]=s,r[8]=p,r[9]=b):b=r[9],r[10]!==y||r[11]!==b?(x=(0,j.jsxs)(t.default,{style:M.fieldText,children:[y,b]}),r[10]=y,r[11]=b,r[12]=x):x=r[12],r[13]!==h.primary?(S=(0,j.jsx)(u.Plus,{size:16,color:h.primary}),r[13]=h.primary,r[14]=S):S=r[14],r[15]!==f||r[16]!==x||r[17]!==S?(I=(0,j.jsxs)(n.default,{accessibilityRole:"button",onPress:f,style:M.fieldRow,children:[x,S]}),r[15]=f,r[16]=x,r[17]=S,r[18]=I):I=r[18],I}function C(e){const r=(0,o.c)(15),{icon:n,label:d,value:s,onChange:u}=e,{colors:f}=(0,c.useTheme)();let h,y,p,b,x;return r[0]!==n||r[1]!==f.foregroundMuted?(h=(0,j.jsx)(n,{size:18,color:f.foregroundMuted}),r[0]=n,r[1]=f.foregroundMuted,r[2]=h):h=r[2],r[3]!==f.foreground?(y=[M.placementLabel,{color:f.foreground}],r[3]=f.foreground,r[4]=y):y=r[4],r[5]!==d||r[6]!==y?(p=(0,j.jsx)(l.default,{style:y,children:d}),r[5]=d,r[6]=y,r[7]=p):p=r[7],r[8]!==u||r[9]!==s?(b=(0,j.jsx)(v.OverlayPositionPicker,{value:s,onChange:u,allowOff:!0}),r[8]=u,r[9]=s,r[10]=b):b=r[10],r[11]!==h||r[12]!==p||r[13]!==b?(x=(0,j.jsxs)(t.default,{style:M.placementRow,children:[h,p,b]}),r[11]=h,r[12]=p,r[13]=b,r[14]=x):x=r[14],x}const M=d.default.create({section:{fontSize:12,fontWeight:'600',paddingTop:f.SPACING.sm,paddingBottom:f.SPACING.xs},hint:{fontSize:11,paddingVertical:f.SPACING.xs},placementRow:{flexDirection:'row',alignItems:'flex-start',gap:f.SPACING.md,paddingVertical:f.SPACING.xs},placementLabel:{flexShrink:1,fontSize:14,fontWeight:'500',paddingTop:6},readoutRow:{flexDirection:'row',alignItems:'center',gap:f.SPACING.sm,paddingVertical:2},readoutLabel:{flexShrink:1,fontSize:13,fontWeight:'500'},removeBtn:{padding:4},addRow:{flexDirection:'row',alignItems:'center',gap:f.SPACING.sm,paddingVertical:f.SPACING.sm},addLabel:{fontSize:14,fontWeight:'600'},picker:{borderWidth:d.default.hairlineWidth,borderRadius:8,padding:f.SPACING.sm,gap:2},deviceRow:{flexDirection:'row',flexWrap:'wrap',gap:6,paddingBottom:f.SPACING.xs},chip:{borderWidth:d.default.hairlineWidth,borderRadius:999,paddingHorizontal:10,paddingVertical:4},chipText:{fontSize:11,fontWeight:'600',maxWidth:140},fieldRow:{flexDirection:'row',alignItems:'center',gap:f.SPACING.sm,paddingVertical:5},fieldText:{flex:1},fieldLabel:{fontSize:13,fontWeight:'500'},fieldCaption:{fontSize:10}})},2591,[787,16,115,194,248,33,813,814,789,831,1107,863,2592,2593,1115,2412,1087,10]);
3370
+ __d(function(g,_r,i,a,m,_e,_d){"use strict";function e(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(_e,'__esModule',{value:!0}),_e.OverlaySettingsSections=function(e){const d=(0,o.c)(88),{deviceId:f,context:w,config:L,onChange:G,highlight:A,onSetHighlight:O}=e,{t:T}=(0,s.useTranslation)(),{colors:z}=(0,u.useTheme)(),[B,D]=(0,r.useState)(!1);let k,W;d[0]!==T?(k=T("v2.overlay.thisCamera"),d[0]=T,d[1]=k):k=d[1];d[2]!==f||d[3]!==k?(W={deviceId:f,name:k},d[2]=f,d[3]=k,d[4]=W):W=d[4];const[_,N]=(0,r.useState)(W);let V;d[5]!==w?(V=e=>(0,y.isRowVisible)(e,w),d[5]=w,d[6]=V):V=d[6];const E=V;let F;d[7]!==E?(F=I.some(E),d[7]=E,d[8]=F):F=d[8];const H=F,{data:K}=(0,x.useLinkedDevices)(f),{data:U}=(0,b.useDeviceLiveFields)(_.deviceId,B);let Y;d[9]!==U?(Y=void 0===U?[]:U,d[9]=U,d[10]=Y):Y=d[10];const $=Y;let X;d[11]!==L||d[12]!==G?(X=e=>G((0,S.patchOverlay)(L,e)),d[11]=L,d[12]=G,d[13]=X):X=d[13];const q=X;let J;d[14]!==L||d[15]!==G?(J=(e,o,r,t)=>{const l={id:(0,S.readoutId)(e),source:e,label:o,corner:"top-right"};void 0!==r&&(l.unit=r),void 0!==t&&(l.precision=t),G((0,S.addReadout)(L,l)),D(!1)},d[14]=L,d[15]=G,d[16]=J):J=d[16];const Q=J;let Z,ee,oe,re,te,le,ie,ne,de,ae,se,ce,ue,ge;d[17]!==H||d[18]!==z.foregroundSubtle||d[19]!==T?(Z=H?(0,j.jsx)(l.default,{style:[M.hint,{color:z.foregroundSubtle}],children:T("v2.overlay.liveOnlyHint")}):null,d[17]=H,d[18]=z.foregroundSubtle,d[19]=T,d[20]=Z):Z=d[20];d[21]!==z.foregroundMuted||d[22]!==w||d[23]!==T?(ee=(0,y.isGroupVisible)("detection",w)?(0,j.jsx)(l.default,{style:[M.section,{color:z.foregroundMuted}],children:T(y.GROUP_HEADER_KEY.detection)}):null,d[21]=z.foregroundMuted,d[22]=w,d[23]=T,d[24]=ee):ee=d[24];d[25]!==w?(oe=(0,y.visibleLayers)(w),d[25]=w,d[26]=oe):oe=d[26];d[27]!==L||d[28]!==G?(re=e=>G((0,S.toggleLayer)(L,e)),d[27]=L,d[28]=G,d[29]=re):re=d[29];d[30]!==L.layers||d[31]!==oe||d[32]!==re?(te=(0,j.jsx)(p.OverlayLayersRow,{layers:oe,selected:L.layers,onToggle:re}),d[30]=L.layers,d[31]=oe,d[32]=re,d[33]=te):te=d[33];d[34]!==L.highlightBorder||d[35]!==A||d[36]!==O||d[37]!==q||d[38]!==E||d[39]!==T?(le=E("highlightBorder")?(0,j.jsxs)(j.Fragment,{children:[(0,j.jsx)(h.PanelToggleRow,{icon:c.Frame,label:T("v2.overlay.highlightBorder"),value:L.highlightBorder,onValueChange:()=>q({highlightBorder:!L.highlightBorder})}),L.highlightBorder?(0,j.jsx)(h.HighlightTriggerRows,{highlight:A,onSetHighlight:O}):null]}):null,d[34]=L.highlightBorder,d[35]=A,d[36]=O,d[37]=q,d[38]=E,d[39]=T,d[40]=le):le=d[40];d[41]!==z.foregroundMuted||d[42]!==L.audioMeter||d[43]!==L.occupancy||d[44]!==L.stats||d[45]!==w||d[46]!==q||d[47]!==E||d[48]!==T?(ie=(0,y.isGroupVisible)("liveIndicators",w)?(0,j.jsxs)(j.Fragment,{children:[(0,j.jsx)(l.default,{style:[M.section,{color:z.foregroundMuted}],children:T(y.GROUP_HEADER_KEY.liveIndicators)}),E("audioMeter")?(0,j.jsx)(C,{icon:c.AudioLines,label:T("v2.cameraMenu.audioLevel"),value:L.audioMeter,onChange:e=>q({audioMeter:e})}):null,E("occupancy")?(0,j.jsx)(C,{icon:c.Users,label:T("v2.overlay.occupancy"),value:L.occupancy,onChange:e=>q({occupancy:e})}):null,E("stats")?(0,j.jsx)(C,{icon:c.Activity,label:T("v2.cameraMenu.streamStats"),value:L.stats,onChange:e=>q({stats:e})}):null]}):null,d[41]=z.foregroundMuted,d[42]=L.audioMeter,d[43]=L.occupancy,d[44]=L.stats,d[45]=w,d[46]=q,d[47]=E,d[48]=T,d[49]=ie):ie=d[49];d[50]!==z.foregroundMuted?(ne=[M.section,{color:z.foregroundMuted}],d[50]=z.foregroundMuted,d[51]=ne):ne=d[51];d[52]!==T?(de=T(y.GROUP_HEADER_KEY.sensors),d[52]=T,d[53]=de):de=d[53];d[54]!==ne||d[55]!==de?(ae=(0,j.jsx)(l.default,{style:ne,children:de}),d[54]=ne,d[55]=de,d[56]=ae):ae=d[56];d[57]!==z.foregroundSubtle||d[58]!==L.readouts.length||d[59]!==T?(se=0===L.readouts.length?(0,j.jsx)(l.default,{style:[M.hint,{color:z.foregroundSubtle}],children:T("v2.overlay.readoutsHint")}):null,d[57]=z.foregroundSubtle,d[58]=L.readouts.length,d[59]=T,d[60]=se):se=d[60];d[61]!==z.foreground||d[62]!==z.foregroundMuted||d[63]!==L||d[64]!==G||d[65]!==T?(ce=L.readouts.map(e=>(0,j.jsxs)(t.default,{style:M.readoutRow,children:[(0,j.jsx)(l.default,{style:[M.readoutLabel,{color:z.foreground}],numberOfLines:1,children:e.label}),(0,j.jsx)(v.OverlayPositionPicker,{value:e.corner,onChange:o=>{"off"!==o&&G((0,S.patchReadout)(L,e.id,{corner:o}))},cellSize:22}),(0,j.jsx)(n.default,{accessibilityRole:"button",accessibilityLabel:T("v2.overlay.removeReadout"),onPress:()=>G((0,S.removeReadout)(L,e.id)),style:M.removeBtn,children:(0,j.jsx)(c.X,{size:16,color:z.foregroundMuted})})]},e.id)),d[61]=z.foreground,d[62]=z.foregroundMuted,d[63]=L,d[64]=G,d[65]=T,d[66]=ce):ce=d[66];d[67]!==z.border||d[68]!==z.foregroundSubtle||d[69]!==z.primary||d[70]!==f||d[71]!==$||d[72]!==K?.devices||d[73]!==B||d[74]!==Q||d[75]!==T||d[76]!==_.deviceId?(ue=B?(0,j.jsxs)(t.default,{style:[M.picker,{borderColor:z.border}],children:[(0,j.jsxs)(t.default,{style:M.deviceRow,children:[(0,j.jsx)(P,{label:T("v2.overlay.thisCamera"),active:_.deviceId===f,onPress:()=>N({deviceId:f,name:T("v2.overlay.thisCamera")})}),(K?.devices??[]).map(e=>(0,j.jsx)(P,{label:e.name,active:_.deviceId===e.id,onPress:()=>N({deviceId:e.id,name:e.name})},e.id))]}),_.deviceId===f?(0,j.jsx)(R,{label:T("v2.overlay.audioDbfs"),caption:"dBFS",onPress:()=>Q({kind:"audioDbfs"},T("v2.overlay.audioDbfs"),"dBFS",1)}):null,0===$.length?(0,j.jsx)(l.default,{style:[M.hint,{color:z.foregroundSubtle}],children:T("v2.overlay.noFields")}):null,$.map(e=>(0,j.jsx)(R,{label:e.label,caption:e.sectionTitle,onPress:()=>Q({kind:"deviceField",deviceId:_.deviceId,sectionId:e.sectionId,fieldKey:e.key},e.label,e.unit,e.precision)},`${e.sectionId}:${e.key}`))]}):(0,j.jsxs)(n.default,{accessibilityRole:"button",onPress:()=>D(!0),style:M.addRow,children:[(0,j.jsx)(c.Plus,{size:18,color:z.primary}),(0,j.jsx)(l.default,{style:[M.addLabel,{color:z.primary}],children:T("v2.overlay.addReadout")})]}),d[67]=z.border,d[68]=z.foregroundSubtle,d[69]=z.primary,d[70]=f,d[71]=$,d[72]=K?.devices,d[73]=B,d[74]=Q,d[75]=T,d[76]=_.deviceId,d[77]=ue):ue=d[77];d[78]!==ee||d[79]!==te||d[80]!==le||d[81]!==ie||d[82]!==ae||d[83]!==se||d[84]!==ce||d[85]!==ue||d[86]!==Z?(ge=(0,j.jsxs)(j.Fragment,{children:[Z,ee,te,le,ie,ae,se,ce,ue]}),d[78]=ee,d[79]=te,d[80]=le,d[81]=ie,d[82]=ae,d[83]=se,d[84]=ce,d[85]=ue,d[86]=Z,d[87]=ge):ge=d[87];return ge};var o=_r(_d[0]),r=_r(_d[1]),t=e(_r(_d[2])),l=e(_r(_d[3])),n=e(_r(_d[4])),d=e(_r(_d[5])),s=_r(_d[6]),c=_r(_d[7]),u=_r(_d[8]),f=_r(_d[9]),h=_r(_d[10]),v=_r(_d[11]),y=_r(_d[12]),p=_r(_d[13]),b=_r(_d[14]),x=_r(_d[15]),S=_r(_d[16]),j=_r(_d[17]);const I=[...(0,y.rowsInGroup)('detection'),...(0,y.rowsInGroup)('liveIndicators')];function P(e){const r=(0,o.c)(17),{label:t,active:d,onPress:s}=e,{colors:c}=(0,u.useTheme)(),f=d?c.primary:c.border;let h,v,y;r[0]!==f?(h={borderColor:f},r[0]=f,r[1]=h):h=r[1],r[2]!==d||r[3]!==c.primary?(v=d?{backgroundColor:c.primary+"22"}:null,r[2]=d,r[3]=c.primary,r[4]=v):v=r[4],r[5]!==h||r[6]!==v?(y=[M.chip,h,v],r[5]=h,r[6]=v,r[7]=y):y=r[7];const p=d?c.primary:c.foregroundMuted;let b,x,S;return r[8]!==p?(b=[M.chipText,{color:p}],r[8]=p,r[9]=b):b=r[9],r[10]!==t||r[11]!==b?(x=(0,j.jsx)(l.default,{style:b,numberOfLines:1,children:t}),r[10]=t,r[11]=b,r[12]=x):x=r[12],r[13]!==s||r[14]!==y||r[15]!==x?(S=(0,j.jsx)(n.default,{accessibilityRole:"button",onPress:s,style:y,children:x}),r[13]=s,r[14]=y,r[15]=x,r[16]=S):S=r[16],S}function R(e){const r=(0,o.c)(19),{label:d,caption:s,onPress:f}=e,{colors:h}=(0,u.useTheme)();let v,y,p,b,x,S,I;return r[0]!==h.foreground?(v=[M.fieldLabel,{color:h.foreground}],r[0]=h.foreground,r[1]=v):v=r[1],r[2]!==d||r[3]!==v?(y=(0,j.jsx)(l.default,{style:v,numberOfLines:1,children:d}),r[2]=d,r[3]=v,r[4]=y):y=r[4],r[5]!==h.foregroundSubtle?(p=[M.fieldCaption,{color:h.foregroundSubtle}],r[5]=h.foregroundSubtle,r[6]=p):p=r[6],r[7]!==s||r[8]!==p?(b=(0,j.jsx)(l.default,{style:p,numberOfLines:1,children:s}),r[7]=s,r[8]=p,r[9]=b):b=r[9],r[10]!==y||r[11]!==b?(x=(0,j.jsxs)(t.default,{style:M.fieldText,children:[y,b]}),r[10]=y,r[11]=b,r[12]=x):x=r[12],r[13]!==h.primary?(S=(0,j.jsx)(c.Plus,{size:16,color:h.primary}),r[13]=h.primary,r[14]=S):S=r[14],r[15]!==f||r[16]!==x||r[17]!==S?(I=(0,j.jsxs)(n.default,{accessibilityRole:"button",onPress:f,style:M.fieldRow,children:[x,S]}),r[15]=f,r[16]=x,r[17]=S,r[18]=I):I=r[18],I}function C(e){const r=(0,o.c)(15),{icon:n,label:d,value:s,onChange:c}=e,{colors:f}=(0,u.useTheme)();let h,y,p,b,x;return r[0]!==n||r[1]!==f.foregroundMuted?(h=(0,j.jsx)(n,{size:18,color:f.foregroundMuted}),r[0]=n,r[1]=f.foregroundMuted,r[2]=h):h=r[2],r[3]!==f.foreground?(y=[M.placementLabel,{color:f.foreground}],r[3]=f.foreground,r[4]=y):y=r[4],r[5]!==d||r[6]!==y?(p=(0,j.jsx)(l.default,{style:y,children:d}),r[5]=d,r[6]=y,r[7]=p):p=r[7],r[8]!==c||r[9]!==s?(b=(0,j.jsx)(v.OverlayPositionPicker,{value:s,onChange:c,allowOff:!0}),r[8]=c,r[9]=s,r[10]=b):b=r[10],r[11]!==h||r[12]!==p||r[13]!==b?(x=(0,j.jsxs)(t.default,{style:M.placementRow,children:[h,p,b]}),r[11]=h,r[12]=p,r[13]=b,r[14]=x):x=r[14],x}const M=d.default.create({section:{fontSize:12,fontWeight:'600',paddingTop:f.SPACING.sm,paddingBottom:f.SPACING.xs},hint:{fontSize:11,paddingVertical:f.SPACING.xs},placementRow:{flexDirection:'row',alignItems:'flex-start',gap:f.SPACING.md,paddingVertical:f.SPACING.xs},placementLabel:{flexShrink:1,fontSize:14,fontWeight:'500',paddingTop:6},readoutRow:{flexDirection:'row',alignItems:'center',gap:f.SPACING.sm,paddingVertical:2},readoutLabel:{flexShrink:1,fontSize:13,fontWeight:'500'},removeBtn:{padding:4},addRow:{flexDirection:'row',alignItems:'center',gap:f.SPACING.sm,paddingVertical:f.SPACING.sm},addLabel:{fontSize:14,fontWeight:'600'},picker:{borderWidth:d.default.hairlineWidth,borderRadius:8,padding:f.SPACING.sm,gap:2},deviceRow:{flexDirection:'row',flexWrap:'wrap',gap:6,paddingBottom:f.SPACING.xs},chip:{borderWidth:d.default.hairlineWidth,borderRadius:999,paddingHorizontal:10,paddingVertical:4},chipText:{fontSize:11,fontWeight:'600',maxWidth:140},fieldRow:{flexDirection:'row',alignItems:'center',gap:f.SPACING.sm,paddingVertical:5},fieldText:{flex:1},fieldLabel:{fontSize:13,fontWeight:'500'},fieldCaption:{fontSize:10}})},2591,[787,16,115,194,248,33,813,814,789,831,1107,863,2592,2593,1115,2412,1087,10]);
3371
3371
  __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"VIEW_OPTION_ROWS",{enumerable:!0,get:function(){return n}}),Object.defineProperty(e,"VIEW_OPTION_GROUPS",{enumerable:!0,get:function(){return o}}),Object.defineProperty(e,"ROW_GROUP",{enumerable:!0,get:function(){return c}}),Object.defineProperty(e,"GROUP_HEADER_KEY",{enumerable:!0,get:function(){return u}}),e.rowsInGroup=l,Object.defineProperty(e,"GRID_ROW_OWNER",{enumerable:!0,get:function(){return s}}),Object.defineProperty(e,"GRID_BAR_ROWS",{enumerable:!0,get:function(){return f}}),e.isRowVisible=b,e.hiddenRows=function(t){return n.filter(n=>!b(n,t))},e.isGroupVisible=function(t,n){return l(t).some(t=>b(t,n))},Object.defineProperty(e,"GRID_BAR_GROUPS",{enumerable:!0,get:function(){return y}}),e.barRowsInGroup=function(t){return f.filter(n=>c[n]===t)},Object.defineProperty(e,"LAYER_ROW",{enumerable:!0,get:function(){return O}}),e.visibleLayers=function(n){return t.OVERLAY_LAYERS.filter(t=>b(O[t],n))},Object.defineProperty(e,"BAR_LAYERS",{enumerable:!0,get:function(){return R}});var t=r(d[0]);const n=['detectionLayers','motionLayer','highlightBorder','audioMeter','occupancy','stats','clusterLabel','clipSource','recordingSource','readouts','switches','management'],o=['detection','liveIndicators','sensors','timeline','functions','management'],c={detectionLayers:'detection',motionLayer:'detection',highlightBorder:'detection',audioMeter:'liveIndicators',occupancy:'liveIndicators',stats:'liveIndicators',clusterLabel:'timeline',clipSource:'timeline',recordingSource:'timeline',readouts:'sensors',switches:'functions',management:'management'},u={detection:'v2.viewOptions.groupDetection',liveIndicators:'v2.overlay.liveSection',sensors:'v2.overlay.readoutsSection',timeline:'v2.cameraMenu.timelineSection',functions:null,management:'v2.cameraMenu.managementTitle'};function l(t){return n.filter(n=>c[n]===t)}const s={detectionLayers:'bar',motionLayer:'cell',highlightBorder:'bar',audioMeter:'cell',occupancy:'cell',stats:'cell',clusterLabel:'bar',clipSource:'cell',recordingSource:'cell',readouts:'cell',switches:'cell',management:'cell'},f=n.filter(t=>'bar'===s[t]);function b(t,n){return'single'===n||'cell'===s[t]}const y=o.filter(t=>l(t).some(t=>'bar'===s[t]));const O={motion:'motionLayer',objects:'detectionLayers',discarded:'detectionLayers',stationary:'detectionLayers'};const R=t.OVERLAY_LAYERS.filter(t=>'bar'===s[O[t]])},2592,[1087]);
3372
3372
  __d(function(g,r,i,a,m,_e,d){"use strict";function e(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(_e,'__esModule',{value:!0}),_e.OverlayLayersRow=function(e){const n=(0,l.c)(34),{layers:f,selected:p,onToggle:x}=e,{t:_}=(0,s.useTranslation)(),{colors:j}=(0,c.useTheme)();if(0===f.length)return null;let A;if(n[0]!==f||n[1]!==_){let e;n[3]!==_?(e=e=>({value:e,label:_(h.LAYER_LABEL_KEY[e])}),n[3]=_,n[4]=e):e=n[4],A=f.map(e),n[0]=f,n[1]=_,n[2]=A}else A=n[2];const M=A;let C,I,L,P,T,G,N,z;n[5]!==j.foregroundMuted?(C=(0,S.jsx)(u.SquareDashed,{size:18,color:j.foregroundMuted}),n[5]=j.foregroundMuted,n[6]=C):C=n[6];n[7]!==j.foreground?(I=[v.label,{color:j.foreground}],n[7]=j.foreground,n[8]=I):I=n[8];n[9]!==_?(L=_("v2.overlay.layersLabel"),n[9]=_,n[10]=L):L=n[10];n[11]!==I||n[12]!==L?(P=(0,S.jsx)(o.default,{style:I,children:L}),n[11]=I,n[12]=L,n[13]=P):P=n[13];n[14]!==C||n[15]!==P?(T=(0,S.jsxs)(t.default,{style:v.head,children:[C,P]}),n[14]=C,n[15]=P,n[16]=T):T=n[16];n[17]!==x||n[18]!==M||n[19]!==p?(G=(0,S.jsx)(y.ChipMultiselect,{options:M,selected:p,onToggle:x}),n[17]=x,n[18]=M,n[19]=p,n[20]=G):G=n[20];if(n[21]!==j.foregroundSubtle||n[22]!==f||n[23]!==p||n[24]!==_){let e;n[26]!==j.foregroundSubtle||n[27]!==p||n[28]!==_?(e=e=>{const l=b[e];return void 0!==l&&p.includes(e)?(0,S.jsx)(o.default,{style:[v.hint,{color:j.foregroundSubtle}],children:_(l)},e):null},n[26]=j.foregroundSubtle,n[27]=p,n[28]=_,n[29]=e):e=n[29],N=f.map(e),n[21]=j.foregroundSubtle,n[22]=f,n[23]=p,n[24]=_,n[25]=N}else N=n[25];n[30]!==T||n[31]!==G||n[32]!==N?(z=(0,S.jsxs)(t.default,{style:v.block,children:[T,G,N]}),n[30]=T,n[31]=G,n[32]=N,n[33]=z):z=n[33];return z};var l=r(d[0]);r(d[1]);var t=e(r(d[2])),o=e(r(d[3])),n=e(r(d[4])),s=r(d[5]),u=r(d[6]),c=r(d[7]),f=r(d[8]),y=r(d[9]),h=r(d[10]),S=r(d[11]);const b={discarded:'v2.overlay.layerDiscardedHint',stationary:'v2.overlay.layerStationaryHint'};const v=n.default.create({block:{paddingVertical:f.SPACING.xs},head:{flexDirection:'row',alignItems:'center',gap:f.SPACING.sm,paddingTop:f.SPACING.sm},label:{fontSize:15,fontWeight:'500'},hint:{fontSize:12,lineHeight:16,paddingBottom:f.SPACING.xs}})},2593,[787,16,115,194,33,813,814,789,831,918,1087,10]);
3373
3373
  __d(function(g,r,i,a,m,_e,d){"use strict";function e(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(_e,'__esModule',{value:!0}),_e.TimelineLegendPanel=function(e){const l=(0,t.c)(83),{onClose:n}=e,{t:C}=(0,s.useTranslation)(),{colors:y}=(0,c.useTheme)();let T,v,w,B,S,O,M,R,k,A,I,L,V,D,N,P,E,G,H,U,W,z,q,F,J,K,Q,X,Y,Z,$,ee,te,le,oe;l[0]!==C?(T=C("v2.theater.legend.title"),l[0]=C,l[1]=T):T=l[1];l[2]!==y.foregroundMuted?(v=[_.section,{color:y.foregroundMuted}],l[2]=y.foregroundMuted,l[3]=v):v=l[3];l[4]!==C?(w=C("v2.theater.legend.heatmapTitle"),l[4]=C,l[5]=w):w=l[5];l[6]!==v||l[7]!==w?(B=(0,j.jsx)(o.default,{style:v,children:w}),l[6]=v,l[7]=w,l[8]=B):B=l[8];l[9]!==C?(S=C("v2.theater.legend.heatmapRecordingTitle"),l[9]=C,l[10]=S):S=l[10];l[11]!==S?(O=(0,j.jsx)(b,{color:u.BAND.recording,shape:"lineH",title:S}),l[11]=S,l[12]=O):O=l[12];l[13]!==C?(M=C("v2.theater.legend.heatmapAudioTitle"),l[13]=C,l[14]=M):M=l[14];l[15]!==M?(R=(0,j.jsx)(b,{scale:f.AUDIO_LEVEL_COLORS,shape:"scale",title:M}),l[15]=M,l[16]=R):R=l[16];l[17]!==C?(k=C("v2.theater.legend.heatmapBottomTitle"),l[17]=C,l[18]=k):k=l[18];l[19]!==k?(A=(0,j.jsx)(b,{color:h.MOTION_COLOR,shape:"fill",title:k}),l[19]=k,l[20]=A):A=l[20];l[21]!==y.foregroundMuted?(I=[_.section,{color:y.foregroundMuted}],l[21]=y.foregroundMuted,l[22]=I):I=l[22];l[23]!==C?(L=C("v2.theater.legend.timelineTitle"),l[23]=C,l[24]=L):L=l[24];l[25]!==I||l[26]!==L?(V=(0,j.jsx)(o.default,{style:I,children:L}),l[25]=I,l[26]=L,l[27]=V):V=l[27];l[28]!==C?(D=C("v2.theater.legend.timelineRecordingTitle"),l[28]=C,l[29]=D):D=l[29];l[30]!==D?(N=(0,j.jsx)(b,{color:u.BAND.recording,shape:"lineV",title:D}),l[30]=D,l[31]=N):N=l[31];l[32]!==C?(P=C("v2.theater.legend.timelineMotionTitle"),l[32]=C,l[33]=P):P=l[33];l[34]!==P?(E=(0,j.jsx)(b,{color:h.MOTION_COLOR,shape:"lineV",title:P}),l[34]=P,l[35]=E):E=l[35];l[36]===Symbol.for("react.memo_cache_sentinel")?(G=(0,x.getClassColor)("person"),l[36]=G):G=l[36];l[37]!==C?(H=C("v2.theater.legend.timelineDetectionTitle"),l[37]=C,l[38]=H):H=l[38];l[39]!==H?(U=(0,j.jsx)(b,{color:G,shape:"dot",title:H}),l[39]=H,l[40]=U):U=l[40];l[41]!==C?(W=C("v2.theater.legend.timelineAudioTitle"),l[41]=C,l[42]=W):W=l[42];l[43]!==W?(z=(0,j.jsx)(b,{scale:f.AUDIO_LEVEL_COLORS,shape:"scale",title:W}),l[43]=W,l[44]=z):z=l[44];l[45]!==y.foregroundMuted?(q=[_.section,{color:y.foregroundMuted}],l[45]=y.foregroundMuted,l[46]=q):q=l[46];l[47]!==C?(F=C("v2.theater.legend.classesTitle"),l[47]=C,l[48]=F):F=l[48];l[49]!==q||l[50]!==F?(J=(0,j.jsx)(o.default,{style:q,children:F}),l[49]=q,l[50]=F,l[51]=J):J=l[51];l[52]===Symbol.for("react.memo_cache_sentinel")?(K=(0,x.getClassColor)("person"),l[52]=K):K=l[52];l[53]!==C?(Q=C("v2.theater.legend.classPerson"),l[53]=C,l[54]=Q):Q=l[54];l[55]!==Q?(X=(0,j.jsx)(b,{color:K,shape:"dot",title:Q}),l[55]=Q,l[56]=X):X=l[56];l[57]===Symbol.for("react.memo_cache_sentinel")?(Y=(0,x.getClassColor)("vehicle"),l[57]=Y):Y=l[57];l[58]!==C?(Z=C("v2.theater.legend.classVehicle"),l[58]=C,l[59]=Z):Z=l[59];l[60]!==Z?($=(0,j.jsx)(b,{color:Y,shape:"dot",title:Z}),l[60]=Z,l[61]=$):$=l[61];l[62]===Symbol.for("react.memo_cache_sentinel")?(ee=(0,x.getClassColor)("animal"),l[62]=ee):ee=l[62];l[63]!==C?(te=C("v2.theater.legend.classAnimal"),l[63]=C,l[64]=te):te=l[64];l[65]!==te?(le=(0,j.jsx)(b,{color:ee,shape:"dot",title:te}),l[65]=te,l[66]=le):le=l[66];l[67]!==n||l[68]!==T||l[69]!==A||l[70]!==V||l[71]!==N||l[72]!==E||l[73]!==U||l[74]!==z||l[75]!==J||l[76]!==X||l[77]!==$||l[78]!==le||l[79]!==B||l[80]!==O||l[81]!==R?(oe=(0,j.jsxs)(p.TimelinePanelHost,{title:T,onClose:n,children:[B,O,R,A,V,N,E,U,z,J,X,$,le]}),l[67]=n,l[68]=T,l[69]=A,l[70]=V,l[71]=N,l[72]=E,l[73]=U,l[74]=z,l[75]=J,l[76]=X,l[77]=$,l[78]=le,l[79]=B,l[80]=O,l[81]=R,l[82]=oe):oe=l[82];return oe};var t=r(d[0]);r(d[1]);var l=e(r(d[2])),o=e(r(d[3])),n=e(r(d[4])),s=r(d[5]),c=r(d[6]),u=r(d[7]),h=r(d[8]),f=r(d[9]),x=r(d[10]),p=r(d[11]),j=r(d[12]);function C(e){const o=(0,t.c)(18),{color:n,scale:s,shape:c}=e;if("scale"===c){let e,t,n,c;return o[0]===Symbol.for("react.memo_cache_sentinel")?(e=[_.swatchBox,_.scaleBox],o[0]=e):e=o[0],o[1]!==s?(t=s??[],o[1]=s,o[2]=t):t=o[2],o[3]!==t?(n=t.map(y),o[3]=t,o[4]=n):n=o[4],o[5]!==n?(c=(0,j.jsx)(l.default,{style:e,children:n}),o[5]=n,o[6]=c):c=o[6],c}if("dot"===c){let e,t;return o[7]===Symbol.for("react.memo_cache_sentinel")?(e=[_.swatchBox,{backgroundColor:"transparent"}],o[7]=e):e=o[7],o[8]!==n?(t=(0,j.jsx)(l.default,{style:e,children:(0,j.jsx)(l.default,{style:[_.dot,{backgroundColor:n}]})}),o[8]=n,o[9]=t):t=o[9],t}if("lineV"===c){let e;return o[10]!==n?(e=(0,j.jsx)(l.default,{style:_.swatchBox,children:(0,j.jsx)(l.default,{style:[_.lineV,{backgroundColor:n}]})}),o[10]=n,o[11]=e):e=o[11],e}if("peak"===c){let e;return o[12]!==n?(e=(0,j.jsx)(l.default,{style:_.swatchBox,children:(0,j.jsx)(l.default,{style:[_.peak,{backgroundColor:n}]})}),o[12]=n,o[13]=e):e=o[13],e}if("fill"===c){let e;return o[14]!==n?(e=(0,j.jsx)(l.default,{style:[_.swatchBox,{backgroundColor:n}]}),o[14]=n,o[15]=e):e=o[15],e}let u;return o[16]!==n?(u=(0,j.jsx)(l.default,{style:_.swatchBox,children:(0,j.jsx)(l.default,{style:[_.lineH,{backgroundColor:n}]})}),o[16]=n,o[17]=u):u=o[17],u}function y(e){return(0,j.jsx)(l.default,{style:[_.scaleBar,{backgroundColor:e}]},e)}function b(e){const n=(0,t.c)(12),{color:s,scale:u,shape:h,title:f}=e,{colors:x}=(0,c.useTheme)();let p,y,b,T;return n[0]!==s||n[1]!==u||n[2]!==h?(p=(0,j.jsx)(C,{color:s,scale:u,shape:h}),n[0]=s,n[1]=u,n[2]=h,n[3]=p):p=n[3],n[4]!==x.foreground?(y=[_.title,{color:x.foreground}],n[4]=x.foreground,n[5]=y):y=n[5],n[6]!==y||n[7]!==f?(b=(0,j.jsx)(o.default,{style:y,children:f}),n[6]=y,n[7]=f,n[8]=b):b=n[8],n[9]!==p||n[10]!==b?(T=(0,j.jsxs)(l.default,{style:_.row,children:[p,b]}),n[9]=p,n[10]=b,n[11]=T):T=n[11],T}const _=n.default.create({section:{fontSize:12,fontWeight:'700',letterSpacing:.4,textTransform:'uppercase',marginTop:u.SPACING.lg,marginBottom:u.SPACING.sm,opacity:.7},row:{flexDirection:'row',alignItems:'center',gap:u.SPACING.md,marginBottom:u.SPACING.sm},swatchBox:{width:28,height:28,borderRadius:u.RADIUS.sm,alignItems:'center',justifyContent:'center',backgroundColor:'rgba(255,255,255,0.04)'},scaleBox:{flexDirection:'row',alignItems:'stretch',justifyContent:'center',backgroundColor:'transparent',gap:1,paddingVertical:5},lineH:{width:20,height:3,borderRadius:1},lineV:{width:3,height:18,borderRadius:1},peak:{width:8,height:18,borderRadius:1},scaleBar:{width:3,borderRadius:1},dot:{width:10,height:10,borderRadius:5,borderWidth:1,borderColor:'#000000'},title:{flex:1,fontSize:14,fontWeight:'600'}})},2594,[787,16,115,194,33,813,789,831,998,1086,2185,2574,10]);
@@ -3378,11 +3378,11 @@ __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{v
3378
3378
  __d(function(g,r,i,a,m,e,d){"use strict";function t(t){return Number.isFinite(t)?Math.min(100,Math.max(0,t)):0}Object.defineProperty(e,'__esModule',{value:!0}),e.indicatorOffsetPx=function(n,u){return!Number.isFinite(n)||n<=0?0:Math.round(n*t(u)/100)},Object.defineProperty(e,"LIVE_INDICATOR_POSITION_PCT",{enumerable:!0,get:function(){return n}}),Object.defineProperty(e,"PLAYBACK_INDICATOR_POSITION_PCT",{enumerable:!0,get:function(){return u}}),e.resolveIndicatorPct=function(t){return t.atLiveEdge?n:u};const n=10,u=50},2599,[]);
3379
3379
  __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"CURSOR_SHIFT_MS",{enumerable:!0,get:function(){return t}}),e.cursorShiftEase=function(t){if(!Number.isFinite(t))return 1;const n=1-Math.min(1,Math.max(0,t));return 1-n*n*n},e.cursorShiftStartPx=function(t){const{currentShiftPx:n,fromOffsetPx:u,toOffsetPx:s}=t,f=Number.isFinite(n)?n:0;return Number.isFinite(u)&&Number.isFinite(s)?f+(u-s):0},e.cursorShiftScreenPx=function(t,n){return t+(Number.isFinite(n)?n:0)},e.shouldAnimateCursorShift=function(t){const{fromOffsetPx:n,toOffsetPx:u,viewportHeightPx:s}=t;return!(!Number.isFinite(s)||s<=0)&&(!(!Number.isFinite(n)||!Number.isFinite(u))&&n!==u)};const t=220},2600,[]);
3380
3380
  __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"ZOOM_SHIFT_MS",{enumerable:!0,get:function(){return t}}),e.zoomShiftEase=function(t){if(!Number.isFinite(t))return 1;return 1-(1-Math.min(1,Math.max(0,t)))**3},e.zoomShiftScaleStart=n,e.shouldAnimateZoomShift=function(t,u){if(!(t>0&&u>0))return!1;if(t===u)return!1;const o=n(t,u);return Math.abs(o-1)>=.04};const t=220;function n(t,n){if(!(t>0&&n>0))return 1;const u=t/n;return!Number.isFinite(u)||u<=0?1:Math.min(4,Math.max(.25,u))}},2601,[]);
3381
- __d(function(g,r,_i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.targetZoomIndexFromVelocity=x,e.candidateZoomIndex=M,e.beginAutoZoom=function(t,i){return{zoomIndex:Number.isFinite(t)?Math.floor(t):n,candidateIndex:null,candidateSinceMs:i,gestureStartedAtMs:i}},e.mapAutoZoomSample=function(t,n,i,s){const{settleMs:o,holdMs:c,widest:x,tightest:l}=u(s),I=Math.min(l,Math.max(x,t.zoomIndex));if(i-t.gestureStartedAtMs<o)return t.zoomIndex===I?t:Object.assign({},t,{zoomIndex:I});const f=M(n,I,s);if(t.candidateIndex!==f)return{zoomIndex:I,candidateIndex:f,candidateSinceMs:i,gestureStartedAtMs:t.gestureStartedAtMs};if(f===I)return t.zoomIndex===I?t:Object.assign({},t,{zoomIndex:I});if(i-t.candidateSinceMs<c)return t.zoomIndex===I?t:Object.assign({},t,{zoomIndex:I});return{zoomIndex:f,candidateIndex:f,candidateSinceMs:t.candidateSinceMs,gestureStartedAtMs:t.gestureStartedAtMs}};const t=0,n=5,i=[80,160,280,450,700],s=100,o=300,c=40;function u(u){const x=u?.tightestIndex??n,M=u?.widestIndex??t;return{ceilings:u?.bandCeilingsPxPerS??i,widest:M,tightest:x,settleMs:u?.settleMs??s,holdMs:u?.holdMs??o,exitBias:u?.exitBiasPxPerS??c}}function x(t,n){const{ceilings:i,widest:s,tightest:o}=u(n),c=Number.isFinite(t)?Math.max(0,t):0;for(let t=0;t<i.length;t++){const n=o-t;if(n<=s)break;if(c<=i[t])return n}return s}function M(t,n,i){const{ceilings:s,widest:o,tightest:c,exitBias:M}=u(i),l=x(t,i);if(l>=n)return l;const I=c-n;if(I<0||I>=s.length)return l;return t<s[I]+M?n:l}},2602,[]);
3381
+ __d(function(g,r,_i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.targetZoomIndexFromVelocity=x,e.candidateZoomIndex=M,e.beginAutoZoom=function(t,i){return{zoomIndex:Number.isFinite(t)?Math.floor(t):n,candidateIndex:null,candidateSinceMs:i,gestureStartedAtMs:i}},e.mapAutoZoomSample=function(t,n,i,s){const{settleMs:o,holdMs:c,widest:x,tightest:l}=u(s),I=Math.min(l,Math.max(x,t.zoomIndex));if(i-t.gestureStartedAtMs<o)return t.zoomIndex===I?t:Object.assign({},t,{zoomIndex:I});const f=M(n,I,s);if(t.candidateIndex!==f)return{zoomIndex:I,candidateIndex:f,candidateSinceMs:i,gestureStartedAtMs:t.gestureStartedAtMs};if(f===I)return t.zoomIndex===I?t:Object.assign({},t,{zoomIndex:I});if(i-t.candidateSinceMs<c)return t.zoomIndex===I?t:Object.assign({},t,{zoomIndex:I});return{zoomIndex:f,candidateIndex:f,candidateSinceMs:t.candidateSinceMs,gestureStartedAtMs:t.gestureStartedAtMs}};const t=0,n=5,i=[80,160,280,450,700],s=100,o=300,c=40;function u(u){const x=u?.tightestIndex??n,M=u?.widestIndex??t;return{ceilings:u?.bandCeilingsPxPerS??i,widest:M,tightest:x,settleMs:u?.settleMs??s,holdMs:u?.holdMs??o,exitBias:u?.exitBiasPxPerS??c}}function x(t,n){const{ceilings:i,widest:s,tightest:o}=u(n),c=Number.isFinite(t)?Math.max(0,t):0;for(let t=0;t<i.length;t++){const n=o-t;if(n<=s)break;if(c<=i[t])return n}return s}function M(t,n,i){const{ceilings:s,tightest:o,exitBias:c}=u(i),M=x(t,i);if(M>=n)return M;const l=o-n;if(l<0||l>=s.length)return M;return t<s[l]+c?n:M}},2602,[]);
3382
3382
  __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.clipsModeDefaultFor=function(n){return null===n?null:'events'===n||'off'===n}},2603,[]);
3383
3383
  __d(function(g,r,i,a,m,e,d){"use strict";function t(t){return t.cursorDrawn?t.indicatorOffsetPx:t.viewportHeightPx/2}Object.defineProperty(e,'__esModule',{value:!0}),e.cardCenterLinePx=t,e.cardCenterScrollOffsetPx=function(n){const{cardTopPx:u,cardHeightPx:o,indicatorOffsetPx:c,viewportHeightPx:f}=n;if(!Number.isFinite(u)||!Number.isFinite(o))return null;if(!Number.isFinite(c))return null;if(!Number.isFinite(f)||f<=0)return null;if(o>f)return Math.max(0,u+c);return Math.max(0,u+o/2+c-t(n))},e.holdsTapPlacement=function(t,n){return null!==t&&null!==n&&(!!Number.isFinite(n)&&(n>=t.fromMs&&n<=t.toMs))}},2604,[]);
3384
3384
  __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.clipExitResumeMs=function(l){return null===l.heldClipId||null===l.clipStartMs||null===l.clipPositionMs?null:l.clipStartMs+l.clipPositionMs}},2605,[]);
3385
- __d(function(g,r,i,_a,m,_e,d){"use strict";Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"LIVE_EDGE_TOLERANCE_MS",{enumerable:!0,get:function(){return h}}),_e.useTimelineScrub=function(k){const _=(0,e.c)(59),{deviceId:E,topMs:R,zoomIndex:y,isLive:P,selectionArmed:O,indicatorPx:T,viewportHeight:D,timelineFromMs:L,lookbackDays:I,maxLookbackDays:w,onScrubBegin:B,onScrubMove:H,onScrubCommit:G,onGoLive:C,onScrollOffset:N,onExtendLookback:j,epochMap:z}=k,A=void 0===z?null:z,F=(0,t.useRef)(null),W=(0,t.useRef)(0),q=(0,t.useRef)(u.idleScrubGesture),U=(0,t.useRef)(null),V=(0,t.useRef)(null),Y=(0,t.useRef)(!1);let J,K;_[0]===Symbol.for("react.memo_cache_sentinel")?(J=[],_[0]=J):J=_[0];_[1]===Symbol.for("react.memo_cache_sentinel")?(K={fine:0,coarse:0,flips:0,velMax:0,vels:J,anchorMs:0},_[1]=K):K=_[1];const Q=(0,t.useRef)(K),X=(0,t.useRef)(!1),Z=(0,t.useRef)(!1),$=(0,t.useRef)(null),ee=(0,t.useRef)(null),te=(0,t.useRef)(!1),re=(0,t.useRef)(0),ne=(0,t.useRef)(P),ce=(0,t.useRef)(O),oe=(0,t.useRef)(T),ue=(0,t.useRef)(D),se=(0,t.useRef)(L),le=(0,t.useRef)(A),ae=(0,t.useRef)(l.idleLookbackWalk);let ie,me;_[2]!==A||_[3]!==T||_[4]!==P||_[5]!==I||_[6]!==O||_[7]!==L||_[8]!==D?(ie=()=>{ne.current=P,ce.current=O,oe.current=T,ue.current=D,se.current=L,le.current=A,ae.current=(0,l.observeLookbackDays)(ae.current,I)},me=[P,O,T,D,L,I,A],_[2]=A,_[3]=T,_[4]=P,_[5]=I,_[6]=O,_[7]=L,_[8]=D,_[9]=ie,_[10]=me):(ie=_[9],me=_[10]);(0,t.useEffect)(ie,me);const fe=(0,t.useRef)(!1),de=(0,t.useRef)(0),he=(0,t.useRef)(null);let pe;_[11]===Symbol.for("react.memo_cache_sentinel")?(pe=()=>{fe.current=!1,he.current&&(clearTimeout(he.current),he.current=null)},_[11]=pe):pe=_[11];const ve=pe;let be;_[12]===Symbol.for("react.memo_cache_sentinel")?(be=(e,t)=>{fe.current=!0,de.current=e,he.current&&clearTimeout(he.current),he.current=setTimeout(()=>{fe.current=!1,he.current=null},M),F.current?.scrollToOffset({offset:e,animated:t})},_[12]=be):be=_[12];const Me=be;let Se;_[13]===Symbol.for("react.memo_cache_sentinel")?(Se=()=>{$.current&&(clearTimeout($.current),$.current=null)},_[13]=Se):Se=_[13];const xe=Se;let ke;_[14]===Symbol.for("react.memo_cache_sentinel")?(ke=()=>{ee.current&&(clearTimeout(ee.current),ee.current=null)},_[14]=ke):ke=_[14];const ge=ke;let Ee;_[15]===Symbol.for("react.memo_cache_sentinel")?(Ee=()=>{U.current=null,V.current=null,Y.current=!1},_[15]=Ee):Ee=_[15];const Re=Ee;let ye;_[16]!==R||_[17]!==y?(ye=(e,t)=>{const c=(0,n.msPerPixel)(y),o=V.current;V.current={epoch:e,at:t};const u=U.current;if(null===u||null===o||c<=0)return U.current=(0,s.beginDrag)(e),Y.current=!1,Q.current={fine:0,coarse:0,flips:0,velMax:0,vels:[],anchorMs:e},{epoch:e};const l=Math.max(t-o.at,1),a=(e-o.epoch)/c,f=u.mode,h=(0,s.mapDragSample)(u,{dxPx:a,dtMs:l},{coarseMsPerPx:c}),p=Math.abs(a)/l*1e3,v=Q.current;"fine"===h.mode?v.fine=v.fine+1:v.coarse=v.coarse+1,h.mode!==f&&(v.flips=v.flips+1),v.velMax=Math.max(v.velMax,p),v.vels.length<512&&v.vels.push(p),Y.current="fine"===h.mode;const b=Math.round(Math.min(Math.max(h.cursorMs,se.current),R));return U.current=b===h.cursorMs?h:{cursorMs:b,mode:h.mode},{epoch:b,hint:{mode:h.mode,velocityPxPerS:Math.round(p)}}},_[16]=R,_[17]=y,_[18]=ye):ye=_[18];const Pe=ye;let Oe;_[19]!==T||_[20]!==C||_[21]!==B||_[22]!==G||_[23]!==H||_[24]!==R||_[25]!==D||_[26]!==y?(Oe=e=>{for(const t of e)e:switch(t.kind){case"begin":B("timeline");break e;case"move":H(t.epoch,"timeline",t.hint);break e;case"commit":{const e=Q.current,c=[...e.vels].sort(x);a.log.info("theater:scrub","seek committed",{epoch:t.epoch,at:new Date(t.epoch).toISOString(),indicatorPx:T,viewportHeight:D,zoomIndex:y,topMs:R,fineSamples:e.fine,coarseSamples:e.coarse,modeFlips:e.flips,velPxPerSMax:Math.round(e.velMax),velPxPerSP50:c.length>0?Math.round(c[c.length>>1]??0):null,spanMs:e.anchorMs>0?Math.round(t.epoch-e.anchorMs):null}),G(t.epoch,"timeline"),Y.current&&Me((0,n.mappedEpochToOffset)(t.epoch,R,y,le.current),!1),Re();break e}case"goLive":Re(),ne.current||(a.log.debug("theater:live-edge","go-live (scrolled into live edge)",{}),C())}},_[19]=T,_[20]=C,_[21]=B,_[22]=G,_[23]=H,_[24]=R,_[25]=D,_[26]=y,_[27]=Oe):Oe=_[27];const Te=Oe;let De;_[28]!==Te?(De=e=>{const{state:t,commands:n}=(0,u.reduceScrubGesture)(q.current,e);q.current=t,Te(n)},_[28]=Te,_[29]=De):De=_[29];const Le=De;let Ie;_[30]!==Le?(Ie=()=>{xe(),$.current=setTimeout(()=>{$.current=null,X.current||Z.current||Le({kind:"end"})},p)},_[30]=Le,_[31]=Ie):Ie=_[31];const we=Ie;let Be;_[32]!==Le||_[33]!==Pe||_[34]!==R||_[35]!==y?(Be=e=>{if(xe(),!q.current.active||fe.current)return;const t=Math.round((0,n.mappedOffsetToEpoch)(e,R,y,le.current));if((0,c.atLiveEdge)(R-t,h))return Re(),void Le({kind:"liveEdge",armedSelection:ce.current});const o=Pe(t,Date.now());Le({kind:"frame",epoch:o.epoch,hint:o.hint}),Le({kind:"end"})},_[32]=Le,_[33]=Pe,_[34]=R,_[35]=y,_[36]=Be):Be=_[36];const He=Be;let Ge;_[37]===Symbol.for("react.memo_cache_sentinel")?(Ge=()=>{ae.current=(0,l.armLookbackWalk)(ae.current),X.current=!0,Z.current=!1,te.current=!1,xe(),ge()},_[37]=Ge):Ge=_[37];const Ce=Ge;let Ne;_[38]!==He?(Ne=e=>{X.current=!1,xe();const t=e.nativeEvent.contentOffset.y;ge(),ee.current=setTimeout(()=>{ee.current=null,Z.current||(te.current=!0,He(t))},v)},_[38]=He,_[39]=Ne):Ne=_[39];const je=Ne;let ze;_[40]===Symbol.for("react.memo_cache_sentinel")?(ze=()=>{Z.current=!0,ge()},_[40]=ze):ze=_[40];const Ae=ze;let Fe;_[41]!==He?(Fe=e=>{Z.current=!1,ge(),te.current?te.current=!1:He(e.nativeEvent.contentOffset.y)},_[41]=He,_[42]=Fe):Fe=_[42];const We=Fe;let qe,Ue,Ve;_[43]===Symbol.for("react.memo_cache_sentinel")?(qe=()=>()=>{xe(),ge()},Ue=[xe,ge],_[43]=qe,_[44]=Ue):(qe=_[43],Ue=_[44]);(0,t.useEffect)(qe,Ue),_[45]!==we||_[46]!==E||_[47]!==Le||_[48]!==Pe||_[49]!==w||_[50]!==j||_[51]!==N||_[52]!==R||_[53]!==y?(Ve=e=>{const t=e.nativeEvent.contentOffset.y;N(t);const u=oe.current,s=ue.current,p=(0,n.mappedEpochToOffset)(se.current,R,y,le.current),v=(0,o.timelineMaxScrollOffsetPx)({indicatorOffsetPx:u,dayHeightPx:Math.max(s,p),contentBottomInsetPx:0,viewportHeightPx:s});if((0,l.nearOldestEnd)({offsetY:t,maxScrollPx:v,viewportHeightPx:s,compressed:null!==le.current})){const e=ae.current,t=(0,l.decideLookbackExtension)(e,w);if("extend"===t)ae.current=(0,l.markLookbackRequested)(e),a.log.info("theater","back-scroll extending lookback",{deviceId:E,fromDays:e.observedDays,oldest:new Date(se.current).toISOString()}),j();else{const n=Date.now();n-re.current>=S&&(re.current=n,a.log.info("theater","back-scroll did NOT extend",{deviceId:E,outcome:t,days:e.observedDays,maxLookbackDays:w}))}}if(fe.current)return void(Math.abs(t-de.current)<=b&&ve());if(Z.current&&te.current)return;const M=Math.round((0,n.mappedOffsetToEpoch)(t,R,y,le.current)),x=R-M;if((0,c.atLiveEdge)(x,h))return xe(),Re(),void Le({kind:"liveEdge",armedSelection:ce.current});const k=Date.now(),_=Pe(M,k);!q.current.active||(0,f.shouldEmitScrubSample)(W.current,k,f.TIMELINE_SCRUB_EMIT_MS)?(W.current=k,Le({kind:"frame",epoch:_.epoch,hint:_.hint}),we()):we()},_[45]=we,_[46]=E,_[47]=Le,_[48]=Pe,_[49]=w,_[50]=j,_[51]=N,_[52]=R,_[53]=y,_[54]=Ve):Ve=_[54];const Ye=Ve;let Je;_[55]!==We||_[56]!==Ye||_[57]!==je?(Je={scrollerRef:F,scrollListTo:Me,onScroll:Ye,onScrollBeginDrag:Ce,onScrollEndDrag:je,onMomentumScrollBegin:Ae,onMomentumScrollEnd:We},_[55]=We,_[56]=Ye,_[57]=je,_[58]=Je):Je=_[58];return Je};var e=r(d[0]),t=r(d[1]),n=r(d[2]),c=r(d[3]),o=r(d[4]),u=r(d[5]),s=r(d[6]),l=r(d[7]),a=r(d[8]),f=r(d[9]);const h=15e3,p=300,v=80,b=2,M=500,S=5e3;function x(e,t){return e-t}},2606,[787,16,2549,2607,2550,2608,2609,2610,916,1092]);
3385
+ __d(function(g,r,i,_a,m,_e,d){"use strict";Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"LIVE_EDGE_TOLERANCE_MS",{enumerable:!0,get:function(){return h}}),_e.useTimelineScrub=function(_){const R=(0,e.c)(59),{deviceId:E,topMs:y,zoomIndex:P,isLive:D,selectionArmed:O,indicatorPx:T,viewportHeight:L,timelineFromMs:w,lookbackDays:I,maxLookbackDays:B,onScrubBegin:H,onScrubMove:G,onScrubCommit:C,onGoLive:N,onScrollOffset:j,onExtendLookback:z,epochMap:A}=_,F=void 0===A?null:A,W=(0,t.useRef)(null),q=(0,t.useRef)(0),U=(0,t.useRef)(u.idleScrubGesture),V=(0,t.useRef)(null),Y=(0,t.useRef)(null),J=(0,t.useRef)(!1);let K,Q;R[0]===Symbol.for("react.memo_cache_sentinel")?(K=[],R[0]=K):K=R[0];R[1]===Symbol.for("react.memo_cache_sentinel")?(Q={fine:0,coarse:0,flips:0,velMax:0,vels:K,anchorMs:0},R[1]=Q):Q=R[1];const X=(0,t.useRef)(Q),Z=(0,t.useRef)(!1),$=(0,t.useRef)(!1),ee=(0,t.useRef)(null),te=(0,t.useRef)(null),re=(0,t.useRef)(!1),ne=(0,t.useRef)(0),ce=(0,t.useRef)(D),oe=(0,t.useRef)(O),ue=(0,t.useRef)(T),le=(0,t.useRef)(L),se=(0,t.useRef)(w),ae=(0,t.useRef)(F),ie=(0,t.useRef)(s.idleLookbackWalk);let fe,me;R[2]!==F||R[3]!==T||R[4]!==D||R[5]!==I||R[6]!==O||R[7]!==w||R[8]!==L?(fe=()=>{ce.current=D,oe.current=O,ue.current=T,le.current=L,se.current=w,ae.current=F,ie.current=(0,s.observeLookbackDays)(ie.current,I)},me=[D,O,T,L,w,I,F],R[2]=F,R[3]=T,R[4]=D,R[5]=I,R[6]=O,R[7]=w,R[8]=L,R[9]=fe,R[10]=me):(fe=R[9],me=R[10]);(0,t.useEffect)(fe,me);const de=(0,t.useRef)(!1),he=(0,t.useRef)(0),pe=(0,t.useRef)(null),ve=(0,t.useRef)(null);let be;R[11]===Symbol.for("react.memo_cache_sentinel")?(be=()=>{de.current=!1,ve.current&&(clearTimeout(ve.current),ve.current=null)},R[11]=be):be=R[11];const Me=be;let Se;R[12]===Symbol.for("react.memo_cache_sentinel")?(Se=(e,t)=>{pe.current=null,de.current=!0,he.current=e,ve.current&&clearTimeout(ve.current),ve.current=setTimeout(()=>{de.current=!1,ve.current=null},S),W.current?.scrollToOffset({offset:e,animated:t})},R[12]=Se):Se=R[12];const xe=Se;let ke;R[13]===Symbol.for("react.memo_cache_sentinel")?(ke=()=>{ee.current&&(clearTimeout(ee.current),ee.current=null)},R[13]=ke):ke=R[13];const ge=ke;let Re;R[14]===Symbol.for("react.memo_cache_sentinel")?(Re=()=>{te.current&&(clearTimeout(te.current),te.current=null)},R[14]=Re):Re=R[14];const Ee=Re;let ye;R[15]===Symbol.for("react.memo_cache_sentinel")?(ye=()=>{V.current=null,Y.current=null,J.current=!1},R[15]=ye):ye=R[15];const Pe=ye;let De;R[16]!==y||R[17]!==P?(De=(e,t)=>{const c=(0,n.msPerPixel)(P),o=Y.current;Y.current={epoch:e,at:t};const u=V.current;if(null===u||null===o||c<=0)return V.current=(0,l.beginDrag)(e),J.current=!1,X.current={fine:0,coarse:0,flips:0,velMax:0,vels:[],anchorMs:e},{epoch:e};const s=Math.max(t-o.at,1),a=(e-o.epoch)/c,f=u.mode,h=(0,l.mapDragSample)(u,{dxPx:a,dtMs:s},{coarseMsPerPx:c}),p=Math.abs(a)/s*1e3,v=X.current;"fine"===h.mode?v.fine=v.fine+1:v.coarse=v.coarse+1,h.mode!==f&&(v.flips=v.flips+1),v.velMax=Math.max(v.velMax,p),v.vels.length<512&&v.vels.push(p),J.current="fine"===h.mode;const b=Math.round(Math.min(Math.max(h.cursorMs,se.current),y));return V.current=b===h.cursorMs?h:{cursorMs:b,mode:h.mode},{epoch:b,hint:{mode:h.mode,velocityPxPerS:Math.round(p)}}},R[16]=y,R[17]=P,R[18]=De):De=R[18];const Oe=De;let Te;R[19]!==T||R[20]!==N||R[21]!==H||R[22]!==C||R[23]!==G||R[24]!==y||R[25]!==L||R[26]!==P?(Te=e=>{for(const t of e)e:switch(t.kind){case"begin":H("timeline");break e;case"move":G(t.epoch,"timeline",t.hint);break e;case"commit":{const e=X.current,c=[...e.vels].sort(k);a.log.info("theater:scrub","seek committed",{epoch:t.epoch,at:new Date(t.epoch).toISOString(),indicatorPx:T,viewportHeight:L,zoomIndex:P,topMs:y,fineSamples:e.fine,coarseSamples:e.coarse,modeFlips:e.flips,velPxPerSMax:Math.round(e.velMax),velPxPerSP50:c.length>0?Math.round(c[c.length>>1]??0):null,spanMs:e.anchorMs>0?Math.round(t.epoch-e.anchorMs):null}),C(t.epoch,"timeline"),J.current&&xe((0,n.mappedEpochToOffset)(t.epoch,y,P,ae.current),!1),Pe();break e}case"goLive":Pe(),ce.current||(a.log.debug("theater:live-edge","go-live (scrolled into live edge)",{}),N())}},R[19]=T,R[20]=N,R[21]=H,R[22]=C,R[23]=G,R[24]=y,R[25]=L,R[26]=P,R[27]=Te):Te=R[27];const Le=Te;let we;R[28]!==Le?(we=e=>{const{state:t,commands:n}=(0,u.reduceScrubGesture)(U.current,e);U.current=t,Le(n)},R[28]=Le,R[29]=we):we=R[29];const Ie=we;let Be;R[30]!==Ie?(Be=()=>{ge(),ee.current=setTimeout(()=>{ee.current=null,Z.current||$.current||Ie({kind:"end"})},p)},R[30]=Ie,R[31]=Be):Be=R[31];const He=Be;let Ge;R[32]!==Ie||R[33]!==Oe||R[34]!==y||R[35]!==P?(Ge=e=>{if(ge(),!U.current.active||de.current)return;const t=Math.round((0,n.mappedOffsetToEpoch)(e,y,P,ae.current));if((0,c.atLiveEdge)(y-t,h))return Pe(),void Ie({kind:"liveEdge",armedSelection:oe.current});const o=Oe(t,Date.now());Ie({kind:"frame",epoch:o.epoch,hint:o.hint}),Ie({kind:"end"})},R[32]=Ie,R[33]=Oe,R[34]=y,R[35]=P,R[36]=Ge):Ge=R[36];const Ce=Ge;let Ne;R[37]===Symbol.for("react.memo_cache_sentinel")?(Ne=()=>{ie.current=(0,s.armLookbackWalk)(ie.current),pe.current=null,Z.current=!0,$.current=!1,re.current=!1,ge(),Ee()},R[37]=Ne):Ne=R[37];const je=Ne;let ze;R[38]!==Ce?(ze=e=>{Z.current=!1,ge();const t=e.nativeEvent.contentOffset.y;Ee(),te.current=setTimeout(()=>{te.current=null,$.current||(re.current=!0,Ce(t))},v)},R[38]=Ce,R[39]=ze):ze=R[39];const Ae=ze;let Fe;R[40]===Symbol.for("react.memo_cache_sentinel")?(Fe=()=>{$.current=!0,Ee()},R[40]=Fe):Fe=R[40];const We=Fe;let qe;R[41]!==Ce?(qe=e=>{$.current=!1,Ee(),re.current?re.current=!1:Ce(e.nativeEvent.contentOffset.y)},R[41]=Ce,R[42]=qe):qe=R[42];const Ue=qe;let Ve,Ye,Je;R[43]===Symbol.for("react.memo_cache_sentinel")?(Ve=()=>()=>{ge(),Ee()},Ye=[ge,Ee],R[43]=Ve,R[44]=Ye):(Ve=R[43],Ye=R[44]);(0,t.useEffect)(Ve,Ye),R[45]!==He||R[46]!==E||R[47]!==Ie||R[48]!==Oe||R[49]!==B||R[50]!==z||R[51]!==j||R[52]!==y||R[53]!==P?(Je=e=>{const t=e.nativeEvent.contentOffset.y;j(t);const u=ue.current,l=le.current,p=(0,n.mappedEpochToOffset)(se.current,y,P,ae.current),v=(0,o.timelineMaxScrollOffsetPx)({indicatorOffsetPx:u,dayHeightPx:Math.max(l,p),contentBottomInsetPx:0,viewportHeightPx:l});if((0,s.nearOldestEnd)({offsetY:t,maxScrollPx:v,viewportHeightPx:l,compressed:null!==ae.current})){const e=ie.current,t=(0,s.decideLookbackExtension)(e,B);if("extend"===t)ie.current=(0,s.markLookbackRequested)(e),a.log.info("theater","back-scroll extending lookback",{deviceId:E,fromDays:e.observedDays,oldest:new Date(se.current).toISOString()}),z();else{const n=Date.now();n-ne.current>=x&&(ne.current=n,a.log.info("theater","back-scroll did NOT extend",{deviceId:E,outcome:t,days:e.observedDays,maxLookbackDays:B}))}}if(de.current)return void(Math.abs(t-he.current)<=b&&(Me(),pe.current={offset:t,at:Date.now()}));const S=pe.current;if(null!==S){if(Math.abs(t-S.offset)<=b&&Date.now()-S.at<=M)return;pe.current=null}if($.current&&re.current)return;const k=Math.round((0,n.mappedOffsetToEpoch)(t,y,P,ae.current)),_=y-k;if((0,c.atLiveEdge)(_,h))return ge(),Pe(),void Ie({kind:"liveEdge",armedSelection:oe.current});const R=Date.now(),D=Oe(k,R);!U.current.active||(0,f.shouldEmitScrubSample)(q.current,R,f.TIMELINE_SCRUB_EMIT_MS)?(q.current=R,Ie({kind:"frame",epoch:D.epoch,hint:D.hint}),He()):He()},R[45]=He,R[46]=E,R[47]=Ie,R[48]=Oe,R[49]=B,R[50]=z,R[51]=j,R[52]=y,R[53]=P,R[54]=Je):Je=R[54];const Ke=Je;let Qe;R[55]!==Ue||R[56]!==Ke||R[57]!==Ae?(Qe={scrollerRef:W,scrollListTo:xe,onScroll:Ke,onScrollBeginDrag:je,onScrollEndDrag:Ae,onMomentumScrollBegin:We,onMomentumScrollEnd:Ue},R[55]=Ue,R[56]=Ke,R[57]=Ae,R[58]=Qe):Qe=R[58];return Qe};var e=r(d[0]),t=r(d[1]),n=r(d[2]),c=r(d[3]),o=r(d[4]),u=r(d[5]),l=r(d[6]),s=r(d[7]),a=r(d[8]),f=r(d[9]);const h=15e3,p=300,v=80,b=2,M=400,S=500,x=5e3;function k(e,t){return e-t}},2606,[787,16,2549,2607,2550,2608,2609,2610,916,1092]);
3386
3386
  __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.atLiveEdge=function(t,n){return t<=n}},2607,[]);
3387
3387
  __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"idleScrubGesture",{enumerable:!0,get:function(){return t}}),e.reduceScrubGesture=function(c,n){switch(n.kind){case'frame':return c.active?{state:Object.assign({},c,{lastEpoch:n.epoch}),commands:[{kind:'move',epoch:n.epoch,hint:n.hint}]}:{state:{active:!0,lastEpoch:n.epoch},commands:[{kind:'begin'},{kind:'move',epoch:n.epoch,hint:n.hint}]};case'liveEdge':return n.armedSelection?{state:c,commands:[]}:{state:t,commands:[{kind:'goLive'}]};case'end':return c.active&&null!==c.lastEpoch?{state:t,commands:[{kind:'commit',epoch:c.lastEpoch}]}:{state:t,commands:[]}}};const t={active:!1,lastEpoch:null}},2608,[]);
3388
3388
  __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.beginDrag=function(s){return{cursorMs:s,mode:'coarse'}},e.mapDragSample=function(c,M,x){const P=Math.min(x.fineMsPerPx??s,x.coarseMsPerPx),u=x.sweepBudgetMs??t,f=x.enterFinePxPerS??n,h=x.exitFinePxPerS??o,b=Math.abs(M.dxPx)/Math.max(M.dtMs,1)*1e3,l=M.dxPx*x.coarseMsPerPx;let p;p='coarse'===c.mode?b<=f&&Math.abs(l)>u?'fine':'coarse':b>=h?'coarse':'fine';const _='fine'===p?Math.sign(M.dxPx)*Math.min(Math.abs(M.dxPx)*P,u):l;return{cursorMs:c.cursorMs+_,mode:p}};const s=1e3,t=3500,n=80,o=240},2609,[]);
@@ -3412,7 +3412,7 @@ __d(function(g,r,i,_a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{
3412
3412
  __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"TILE_LABEL_I18N",{enumerable:!0,get:function(){return t}}),e.buildTileLabels=function(l){const n={};for(const[o,s]of Object.entries(t)){const t=l(s);'string'==typeof t&&(''!==t.trim()&&t!==s&&(n[o]=t))}return n};const t={play:'v2.gridTile.play',pause:'v2.gridTile.pause',listen:'v2.gridTile.listen',mute:'v2.gridTile.mute',talk:'v2.gridTile.talk',stopTalk:'v2.gridTile.stopTalk',ptz:'v2.gridTile.ptz',linkedDevices:'v2.gridTile.linkedDevices',viewOptions:'v2.gridTile.viewOptions',moreActions:'v2.gridTile.moreActions',open:'v2.gridTile.open',removeFromView:'v2.gridTile.removeFromView',resizeWidth:'v2.gridTile.resizeWidth',resizeHeight:'v2.gridTile.resizeHeight',noActiveCameras:'v2.gridTile.noActiveCameras',camera:'v2.gridTile.camera'}},2633,[]);
3413
3413
  __d(function(g,_r,i,a,_m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.coerceGridHostMessage=u,e.parseGridHostMessage=function(t){let n;try{n=JSON.parse(t)}catch{return null}return u(n)},Object.defineProperty(e,"GRID_HOT_DEVICES_COMMAND",{enumerable:!0,get:function(){return o}}),Object.defineProperty(e,"GRID_SPANS_COMMAND",{enumerable:!0,get:function(){return l}}),e.gridCommandScript=function(t){const n='window.__camstackGrid';return`${n} && typeof ${n}.${t.kind} === 'function' && ${n}.${t.kind}(${s(t)}); true;`};const t=['devices','viewOptions','actions'];function n(t){if(!Array.isArray(t))return null;const n=[];for(const r of t)'string'==typeof r&&n.push(r);return n}function r(t){if('object'!=typeof t||null===t)return!1;const n=t;return'number'==typeof n.x&&'number'==typeof n.y&&'number'==typeof n.w&&'number'==typeof n.h}const c=['connecting','ready','error'];function u(u){if('object'!=typeof u||null===u)return null;const s=u;switch(s.type){case'state':{if('string'!=typeof s.state||!c.includes(s.state))return null;const t=s.state,r='string'==typeof s.message?{message:s.message}:{},u=n(s.commands);return Object.assign({type:'state',state:t},r,u?{commands:u}:{})}case'tileTap':case'tileLongPress':return'number'==typeof s.deviceId&&r(s.rect)?{type:s.type,deviceId:s.deviceId,rect:s.rect}:null;case'tileOpen':return'number'!=typeof s.deviceId?null:{type:'tileOpen',deviceId:s.deviceId};case'audioToggle':return'number'!=typeof s.deviceId?null:{type:'audioToggle',deviceId:s.deviceId};case'pauseToggle':return'number'!=typeof s.deviceId?null:{type:'pauseToggle',deviceId:s.deviceId};case'ptzOpen':return'number'!=typeof s.deviceId?null:{type:'ptzOpen',deviceId:s.deviceId};case'cellPanelOpen':return'number'==typeof s.deviceId&&('string'==typeof(o=s.panel)&&t.includes(o))?{type:'cellPanelOpen',deviceId:s.deviceId,panel:s.panel}:null;case'tileRemove':return'number'!=typeof s.deviceId?null:{type:'tileRemove',deviceId:s.deviceId};case'tileResize':return'number'!=typeof s.deviceId||'number'!=typeof s.cw||'number'!=typeof s.ch?null:Number.isFinite(s.cw)&&Number.isFinite(s.ch)?{type:'tileResize',deviceId:s.deviceId,cw:s.cw,ch:s.ch}:null;case'layout':{if(!Array.isArray(s.tiles))return null;const t=[];for(const n of s.tiles){if('object'!=typeof n||null===n)return null;const c=n;if('number'!=typeof c.deviceId||!r(c.rect))return null;t.push({deviceId:c.deviceId,rect:c.rect})}return{type:'layout',tiles:t}}default:return null}var o}function s(t){switch(t.kind){case'fit':return`${t.w}, ${t.h}`;case'reconnect':case'scrubStart':case'goLive':return'';default:return JSON.stringify(t.value)}}const o='setDevices',l='setSpans'},2634,[]);
3414
3414
  __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"GRID_EMBED_SINK_KEY",{enumerable:!0,get:function(){return c}}),e.createGridEmbedPlaybackSink=s,e.useGridEmbedPlaybackSink=function(o){const b=(0,t.c)(5);let k;b[0]!==o?(k=t=>o(t),b[0]=o,b[1]=k):k=b[1];const l=k;let f,v;b[2]!==l?(f=()=>u.gridPlaybackBus.register(c,s(l)),v=[l],b[2]=l,b[3]=f,b[4]=v):(f=b[3],v=b[4]);(0,n.useEffect)(f,v)};var t=r(d[0]),n=r(d[1]),u=r(d[2]);const c='grid-embed';function s(t){return{scrubStart:()=>t({kind:'scrubStart'}),scrubTo:n=>t({kind:'scrubTo',value:n}),scrubCommit:n=>t({kind:'scrubCommit',value:n}),seek:n=>t({kind:'seek',value:n}),setRate:n=>t({kind:'setRate',value:n}),goLive:()=>t({kind:'goLive'})}}},2635,[787,16,1079]);
3415
- __d(function(g,r,i,a,m,_e,d){"use strict";function e(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"GridTile",{enumerable:!0,get:function(){return q}});var t=r(d[0]),o=r(d[1]),l=e(o),n=e(r(d[2])),s=e(r(d[3])),c=e(r(d[4])),u=e(r(d[5])),f=r(d[6]),h=r(d[7]),y=r(d[8]),b=r(d[9]),p=r(d[10]),v=r(d[11]),x=r(d[12]),j=r(d[13]),S=r(d[14]),C=r(d[15]),w=r(d[16]),I=r(d[17]),P=r(d[18]),O=r(d[19]),_=r(d[20]),A=r(d[21]),B=r(d[22]),T=r(d[23]),F=r(d[24]),M=r(d[25]),L=r(d[26]),R=r(d[27]),E=r(d[28]),G=r(d[29]),N=r(d[30]),k=r(d[31]),z=r(d[32]),H=r(d[33]),D=r(d[34]),V=r(d[35]);const W=[],q=l.default.memo(function(e){const l=(0,t.c)(93),{camera:N,width:q,height:U,showName:J,quality:Q,muted:X,paused:Y,layers:Z,onCellPanel:$,hasPtz:ee}=e,te=void 0===X||X,oe=void 0!==Y&&Y,ie=void 0===Z?W:Z,le=void 0!==ee&&ee,{colors:ne}=(0,x.useTheme)(),{t:ae}=(0,f.useTranslation)(),{settings:se}=(0,R.useSettings)(),re=(0,E.useSwitchedOffFor)(N.id),[de,ce]=(0,o.useState)(null);let ue,fe;if(l[0]!==N.features||l[1]!==oe||l[2]!==de){const e={operatorChoice:de,cameraKnown:!0,batteryPowered:N.features.includes(k.FEATURE.battery)};ue=(0,z.isBatteryHold)(e),fe=oe||(0,z.resolveLivePaused)(e),l[0]=N.features,l[1]=oe,l[2]=de,l[3]=ue,l[4]=fe}else ue=l[3],fe=l[4];const he=fe;let me;l[5]===Symbol.for("react.memo_cache_sentinel")?(me=()=>ce(!1),l[5]=me):me=l[5];const ye=me;let ge;l[6]!==Q?(ge=(0,B.qualityToTarget)(Q),l[6]=Q,l[7]=ge):ge=l[7];const be=ge,pe=N.id;let ve;l[8]!==q?(ve=(0,M.snapshotWidthForCssPx)(q),l[8]=q,l[9]=ve):ve=l[9];const xe=(0,T.useSnapshot)(pe,he,ve),je=(0,L.useMotionHighlight)(N.id,!he&&N.online),Se=(0,A.useCameraOverlay)(N.id),Ce=!he&&N.online,we=(0,o.useRef)(null);let Ie;l[10]===Symbol.for("react.memo_cache_sentinel")?(Ie=()=>we.current?.getStats()??Promise.resolve(null),l[10]=Ie):Ie=l[10];const Pe=Ie,[Oe,Ae]=(0,o.useState)(!1),Be=(0,o.useRef)(null);let Te;l[11]===Symbol.for("react.memo_cache_sentinel")?(Te=()=>{Be.current&&clearTimeout(Be.current),Be.current=setTimeout(()=>Ae(!1),3500)},l[11]=Te):Te=l[11];const Fe=Te;let Me,Le,Re;l[12]===Symbol.for("react.memo_cache_sentinel")?(Me=()=>()=>{Be.current&&clearTimeout(Be.current)},Le=[],l[12]=Me,l[13]=Le):(Me=l[12],Le=l[13]),(0,o.useEffect)(Me,Le),l[14]===Symbol.for("react.memo_cache_sentinel")?(Re=()=>{(0,v.hapticTap)(),Ae(e=>(e||Fe(),!e))},l[14]=Re):Re=l[14];const Ee=Re;let Ge;l[15]!==N.id||l[16]!==$?(Ge=e=>{(0,v.hapticTap)(),Fe(),$?.(e,N.id)},l[15]=N.id,l[16]=$,l[17]=Ge):Ge=l[17];const Ne=Ge;let ke;l[18]!==le||l[19]!==U||l[20]!==q?(ke=(0,b.cameraActionBarForCell)(q,U,le),l[18]=le,l[19]=U,l[20]=q,l[21]=ke):ke=l[21];const ze=ke;let He,De,Ve,We,qe,Ke,Ue,Je,Qe,Xe,Ye,Ze,$e,et;return l[22]!==U||l[23]!==q?(He=[K.cell,{width:q,height:U}],l[22]=U,l[23]=q,l[24]=He):He=l[24],l[25]!==ue||l[26]!==N.id||l[27]!==he||l[28]!==te||l[29]!==xe||l[30]!==be?(De=he?(0,V.jsxs)(n.default,{style:K.pausedFill,children:[(0,V.jsx)(F.SnapshotImage,{source:xe,deviceId:N.id,style:K.pausedFill}),ue?null:(0,V.jsx)(n.default,{style:K.pauseBadge,pointerEvents:"none",children:(0,V.jsx)(h.Pause,{size:18,color:"#fafaf9",fill:"#fafaf9"})})]}):(0,V.jsx)(j.LiveView,{ref:we,deviceId:N.id,target:be,muted:te}),l[25]=ue,l[26]=N.id,l[27]=he,l[28]=te,l[29]=xe,l[30]=be,l[31]=De):De=l[31],l[32]!==N.id||l[33]!==he||l[34]!==ie?(Ve=ie.includes("objects")&&!he?(0,V.jsx)(S.MotionBoxesOverlay,{deviceId:N.id,enabled:!0}):null,l[32]=N.id,l[33]=he,l[34]=ie,l[35]=Ve):Ve=l[35],l[36]!==N.id||l[37]!==he||l[38]!==ie?(We=ie.includes("discarded")&&!he?(0,V.jsx)(w.DiscardedBoxesOverlay,{deviceId:N.id,enabled:!0}):null,l[36]=N.id,l[37]=he,l[38]=ie,l[39]=We):We=l[39],l[40]!==N.id||l[41]!==he||l[42]!==ie?(qe=ie.includes("stationary")&&!he?(0,V.jsx)(C.StationaryBoxesOverlay,{deviceId:N.id,enabled:!0}):null,l[40]=N.id,l[41]=he,l[42]=ie,l[43]=qe):qe=l[43],l[44]!==N.id||l[45]!==Ce||l[46]!==Se?(Ke=(0,D.hasLayer)(Se,"motion")&&Ce?(0,V.jsx)(I.MotionRegionsOverlay,{deviceId:N.id,enabled:!0}):null,l[44]=N.id,l[45]=Ce,l[46]=Se,l[47]=Ke):Ke=l[47],l[48]!==N.id||l[49]!==Ce||l[50]!==Se.audioMeter?(Ue="off"!==Se.audioMeter&&Ce?(0,V.jsx)(P.AudioLevelMeter,{deviceId:N.id,position:Se.audioMeter}):null,l[48]=N.id,l[49]=Ce,l[50]=Se.audioMeter,l[51]=Ue):Ue=l[51],l[52]!==N.id||l[53]!==Ce||l[54]!==Se.occupancy?(Je="off"!==Se.occupancy?(0,V.jsx)(O.OccupancyBadge,{deviceId:N.id,enabled:Ce,corner:Se.occupancy}):null,l[52]=N.id,l[53]=Ce,l[54]=Se.occupancy,l[55]=Je):Je=l[55],l[56]!==U||l[57]!==Ce||l[58]!==Se.stats||l[59]!==q?(Qe=Se.stats&&Ce?(0,V.jsx)(_.StreamStatsOverlay,{getStats:Pe,compact:!(0,y.statsPanelFits)(q,U)}):null,l[56]=U,l[57]=Ce,l[58]=Se.stats,l[59]=q,l[60]=Qe):Qe=l[60],l[61]!==je||l[62]!==se?(Xe=je?(0,V.jsx)(n.default,{pointerEvents:"none",style:[K.motionBorder,{borderWidth:se.highlight.thickness,borderColor:se.highlight.motionColor,shadowColor:se.highlight.motionColor}]}):null,l[61]=je,l[62]=se,l[63]=Xe):Xe=l[63],l[64]!==Oe||l[65]!==ze||l[66]!==$||l[67]!==Ne||l[68]!==ae?(Ye=$?(0,V.jsxs)(V.Fragment,{children:[(0,V.jsx)(u.default,{style:c.default.absoluteFill,onPress:Ee,accessibilityRole:"button",accessibilityLabel:ae("v2.gridView.cellActionsA11y")}),Oe?(0,V.jsx)(n.default,{style:K.actions,pointerEvents:"box-none",children:(0,V.jsx)(p.CameraActionBar,{items:ze,onAction:e=>{(0,b.isCameraPanelAction)(e)&&Ne(e)},variant:"overlay"})}):null]}):null,l[64]=Oe,l[65]=ze,l[66]=$,l[67]=Ne,l[68]=ae,l[69]=Ye):Ye=l[69],l[70]!==N.name||l[71]!==N.online||l[72]!==ne||l[73]!==J||l[74]!==re||l[75]!==ae?(Ze=J?(0,V.jsxs)(n.default,{style:K.overlay,pointerEvents:"none",children:[(0,V.jsx)(n.default,{style:[K.dot,{backgroundColor:N.online?ne.success:ne.foregroundDisabled}]}),(0,V.jsx)(s.default,{style:K.name,numberOfLines:1,children:N.name}),(0,V.jsx)(G.SwitchedOffBadge,{switchedOff:re,accessibilityLabel:ae("v2.cameraSwitches.badgeLabel",{count:re.length})})]}):null,l[70]=N.name,l[71]=N.online,l[72]=ne,l[73]=J,l[74]=re,l[75]=ae,l[76]=Ze):Ze=l[76],l[77]!==ue?($e=ue?(0,V.jsx)(H.BatteryHoldOverlay,{onStart:ye,compact:!0}):null,l[77]=ue,l[78]=$e):$e=l[78],l[79]!==He||l[80]!==De||l[81]!==Ve||l[82]!==We||l[83]!==qe||l[84]!==Ke||l[85]!==Ue||l[86]!==Je||l[87]!==Qe||l[88]!==Xe||l[89]!==Ye||l[90]!==Ze||l[91]!==$e?(et=(0,V.jsxs)(n.default,{style:He,children:[De,Ve,We,qe,Ke,Ue,Je,Qe,Xe,Ye,Ze,$e]}),l[79]=He,l[80]=De,l[81]=Ve,l[82]=We,l[83]=qe,l[84]=Ke,l[85]=Ue,l[86]=Je,l[87]=Qe,l[88]=Xe,l[89]=Ye,l[90]=Ze,l[91]=$e,l[92]=et):et=l[92],et}),K=c.default.create({cell:{backgroundColor:'#000'},pausedFill:{width:'100%',height:'100%',alignItems:'center',justifyContent:'center'},pauseBadge:{position:'absolute',width:36,height:36,borderRadius:18,alignItems:'center',justifyContent:'center',backgroundColor:'#0009'},motionBorder:{position:'absolute',top:0,left:0,right:0,bottom:0,shadowOffset:{width:0,height:0},shadowOpacity:.9,shadowRadius:8,elevation:8},overlay:{position:'absolute',left:0,right:0,bottom:0,flexDirection:'row',alignItems:'center',gap:N.SPACING.sm,paddingHorizontal:N.SPACING.md,paddingVertical:N.SPACING.sm,backgroundColor:'#0009'},actions:{position:'absolute',left:N.SPACING.sm,bottom:N.SPACING.xl},dot:{width:8,height:8,borderRadius:4},name:{flex:1,color:'#fafaf9',fontSize:12,fontWeight:'600'}})},2636,[787,16,115,194,33,248,813,814,1082,1106,1105,817,789,988,1070,1071,1073,1072,1074,847,1069,1088,990,833,843,790,842,829,2637,2407,831,823,1068,2638,1087,10]);
3415
+ __d(function(g,r,i,a,m,_e,d){"use strict";function e(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"GridTile",{enumerable:!0,get:function(){return q}});var t=r(d[0]),o=r(d[1]),l=e(o),n=e(r(d[2])),s=e(r(d[3])),c=e(r(d[4])),u=e(r(d[5])),f=r(d[6]),h=r(d[7]),y=r(d[8]),b=r(d[9]),p=r(d[10]),v=r(d[11]),x=r(d[12]),j=r(d[13]),S=r(d[14]),C=r(d[15]),w=r(d[16]),I=r(d[17]),P=r(d[18]),O=r(d[19]),_=r(d[20]),A=r(d[21]),B=r(d[22]),T=r(d[23]),F=r(d[24]),M=r(d[25]),L=r(d[26]),R=r(d[27]),E=r(d[28]),G=r(d[29]),N=r(d[30]),k=r(d[31]),z=r(d[32]),H=r(d[33]),D=r(d[34]),V=r(d[35]);const W=[],q=l.default.memo(function(e){const l=(0,t.c)(93),{camera:N,width:q,height:U,showName:J,quality:Q,muted:X,paused:Y,layers:Z,onCellPanel:$,hasPtz:ee}=e,te=void 0===X||X,oe=void 0!==Y&&Y,ie=void 0===Z?W:Z,le=void 0!==ee&&ee,{colors:ne}=(0,x.useTheme)(),{t:se}=(0,f.useTranslation)(),{settings:ae}=(0,R.useSettings)(),re=(0,E.useSwitchedOffFor)(N.id),[de,ce]=(0,o.useState)(null);let ue,fe;if(l[0]!==N.features||l[1]!==oe||l[2]!==de){const e={operatorChoice:de,cameraKnown:!0,batteryPowered:N.features.includes(k.FEATURE.battery)};ue=(0,z.isBatteryHold)(e),fe=oe||(0,z.resolveLivePaused)(e),l[0]=N.features,l[1]=oe,l[2]=de,l[3]=ue,l[4]=fe}else ue=l[3],fe=l[4];const he=fe;let me;l[5]===Symbol.for("react.memo_cache_sentinel")?(me=()=>ce(!1),l[5]=me):me=l[5];const ye=me;let ge;l[6]!==Q?(ge=(0,B.qualityToTarget)(Q),l[6]=Q,l[7]=ge):ge=l[7];const be=ge,pe=N.id;let ve;l[8]!==q?(ve=(0,M.snapshotWidthForCssPx)(q),l[8]=q,l[9]=ve):ve=l[9];const xe=(0,T.useSnapshot)(pe,he,ve),je=(0,L.useMotionHighlight)(N.id,!he&&N.online),Se=(0,A.useCameraOverlay)(N.id),Ce=!he&&N.online,we=(0,o.useRef)(null);let Ie;l[10]===Symbol.for("react.memo_cache_sentinel")?(Ie=()=>we.current?.getStats()??Promise.resolve(null),l[10]=Ie):Ie=l[10];const Pe=Ie,[Oe,Ae]=(0,o.useState)(!1),Be=(0,o.useRef)(null);let Te;l[11]===Symbol.for("react.memo_cache_sentinel")?(Te=()=>{Be.current&&clearTimeout(Be.current),Be.current=setTimeout(()=>Ae(!1),3500)},l[11]=Te):Te=l[11];const Fe=Te;let Me,Le,Re;l[12]===Symbol.for("react.memo_cache_sentinel")?(Me=()=>()=>{Be.current&&clearTimeout(Be.current)},Le=[],l[12]=Me,l[13]=Le):(Me=l[12],Le=l[13]),(0,o.useEffect)(Me,Le),l[14]===Symbol.for("react.memo_cache_sentinel")?(Re=()=>{(0,v.hapticTap)(),Ae(e=>(e||Fe(),!e))},l[14]=Re):Re=l[14];const Ee=Re;let Ge;l[15]!==N.id||l[16]!==$?(Ge=e=>{(0,v.hapticTap)(),Fe(),$?.(e,N.id)},l[15]=N.id,l[16]=$,l[17]=Ge):Ge=l[17];const Ne=Ge;let ke;l[18]!==le||l[19]!==U||l[20]!==q?(ke=(0,b.cameraActionBarForCell)(q,U,le),l[18]=le,l[19]=U,l[20]=q,l[21]=ke):ke=l[21];const ze=ke;let He,De,Ve,We,qe,Ke,Ue,Je,Qe,Xe,Ye,Ze,$e,et;return l[22]!==U||l[23]!==q?(He=[K.cell,{width:q,height:U}],l[22]=U,l[23]=q,l[24]=He):He=l[24],l[25]!==ue||l[26]!==N.id||l[27]!==he||l[28]!==te||l[29]!==xe||l[30]!==be?(De=he?(0,V.jsxs)(n.default,{style:K.pausedFill,children:[(0,V.jsx)(F.SnapshotImage,{source:xe,deviceId:N.id,style:K.pausedFill}),ue?null:(0,V.jsx)(n.default,{style:K.pauseBadge,pointerEvents:"none",children:(0,V.jsx)(h.Pause,{size:18,color:"#fafaf9",fill:"#fafaf9"})})]}):(0,V.jsx)(j.LiveView,{ref:we,deviceId:N.id,target:be,muted:te}),l[25]=ue,l[26]=N.id,l[27]=he,l[28]=te,l[29]=xe,l[30]=be,l[31]=De):De=l[31],l[32]!==N.id||l[33]!==he||l[34]!==ie?(Ve=ie.includes("objects")&&!he?(0,V.jsx)(S.MotionBoxesOverlay,{deviceId:N.id,enabled:!0}):null,l[32]=N.id,l[33]=he,l[34]=ie,l[35]=Ve):Ve=l[35],l[36]!==N.id||l[37]!==he||l[38]!==ie?(We=ie.includes("discarded")&&!he?(0,V.jsx)(w.DiscardedBoxesOverlay,{deviceId:N.id,enabled:!0}):null,l[36]=N.id,l[37]=he,l[38]=ie,l[39]=We):We=l[39],l[40]!==N.id||l[41]!==he||l[42]!==ie?(qe=ie.includes("stationary")&&!he?(0,V.jsx)(C.StationaryBoxesOverlay,{deviceId:N.id,enabled:!0}):null,l[40]=N.id,l[41]=he,l[42]=ie,l[43]=qe):qe=l[43],l[44]!==N.id||l[45]!==Ce||l[46]!==Se?(Ke=(0,D.hasLayer)(Se,"motion")&&Ce?(0,V.jsx)(I.MotionRegionsOverlay,{deviceId:N.id,enabled:!0}):null,l[44]=N.id,l[45]=Ce,l[46]=Se,l[47]=Ke):Ke=l[47],l[48]!==N.id||l[49]!==Ce||l[50]!==Se.audioMeter?(Ue="off"!==Se.audioMeter&&Ce?(0,V.jsx)(P.AudioLevelMeter,{deviceId:N.id,position:Se.audioMeter}):null,l[48]=N.id,l[49]=Ce,l[50]=Se.audioMeter,l[51]=Ue):Ue=l[51],l[52]!==N.id||l[53]!==Ce||l[54]!==Se.occupancy?(Je="off"!==Se.occupancy?(0,V.jsx)(O.OccupancyBadge,{deviceId:N.id,enabled:Ce,corner:Se.occupancy}):null,l[52]=N.id,l[53]=Ce,l[54]=Se.occupancy,l[55]=Je):Je=l[55],l[56]!==U||l[57]!==Ce||l[58]!==Se.stats||l[59]!==q?(Qe="off"!==Se.stats&&Ce?(0,V.jsx)(_.StreamStatsOverlay,{getStats:Pe,position:Se.stats,compact:!(0,y.statsPanelFits)(q,U)}):null,l[56]=U,l[57]=Ce,l[58]=Se.stats,l[59]=q,l[60]=Qe):Qe=l[60],l[61]!==je||l[62]!==ae?(Xe=je?(0,V.jsx)(n.default,{pointerEvents:"none",style:[K.motionBorder,{borderWidth:ae.highlight.thickness,borderColor:ae.highlight.motionColor,shadowColor:ae.highlight.motionColor}]}):null,l[61]=je,l[62]=ae,l[63]=Xe):Xe=l[63],l[64]!==Oe||l[65]!==ze||l[66]!==$||l[67]!==Ne||l[68]!==se?(Ye=$?(0,V.jsxs)(V.Fragment,{children:[(0,V.jsx)(u.default,{style:c.default.absoluteFill,onPress:Ee,accessibilityRole:"button",accessibilityLabel:se("v2.gridView.cellActionsA11y")}),Oe?(0,V.jsx)(n.default,{style:K.actions,pointerEvents:"box-none",children:(0,V.jsx)(p.CameraActionBar,{items:ze,onAction:e=>{(0,b.isCameraPanelAction)(e)&&Ne(e)},variant:"overlay"})}):null]}):null,l[64]=Oe,l[65]=ze,l[66]=$,l[67]=Ne,l[68]=se,l[69]=Ye):Ye=l[69],l[70]!==N.name||l[71]!==N.online||l[72]!==ne||l[73]!==J||l[74]!==re||l[75]!==se?(Ze=J?(0,V.jsxs)(n.default,{style:K.overlay,pointerEvents:"none",children:[(0,V.jsx)(n.default,{style:[K.dot,{backgroundColor:N.online?ne.success:ne.foregroundDisabled}]}),(0,V.jsx)(s.default,{style:K.name,numberOfLines:1,children:N.name}),(0,V.jsx)(G.SwitchedOffBadge,{switchedOff:re,accessibilityLabel:se("v2.cameraSwitches.badgeLabel",{count:re.length})})]}):null,l[70]=N.name,l[71]=N.online,l[72]=ne,l[73]=J,l[74]=re,l[75]=se,l[76]=Ze):Ze=l[76],l[77]!==ue?($e=ue?(0,V.jsx)(H.BatteryHoldOverlay,{onStart:ye,compact:!0}):null,l[77]=ue,l[78]=$e):$e=l[78],l[79]!==He||l[80]!==De||l[81]!==Ve||l[82]!==We||l[83]!==qe||l[84]!==Ke||l[85]!==Ue||l[86]!==Je||l[87]!==Qe||l[88]!==Xe||l[89]!==Ye||l[90]!==Ze||l[91]!==$e?(et=(0,V.jsxs)(n.default,{style:He,children:[De,Ve,We,qe,Ke,Ue,Je,Qe,Xe,Ye,Ze,$e]}),l[79]=He,l[80]=De,l[81]=Ve,l[82]=We,l[83]=qe,l[84]=Ke,l[85]=Ue,l[86]=Je,l[87]=Qe,l[88]=Xe,l[89]=Ye,l[90]=Ze,l[91]=$e,l[92]=et):et=l[92],et}),K=c.default.create({cell:{backgroundColor:'#000'},pausedFill:{width:'100%',height:'100%',alignItems:'center',justifyContent:'center'},pauseBadge:{position:'absolute',width:36,height:36,borderRadius:18,alignItems:'center',justifyContent:'center',backgroundColor:'#0009'},motionBorder:{position:'absolute',top:0,left:0,right:0,bottom:0,shadowOffset:{width:0,height:0},shadowOpacity:.9,shadowRadius:8,elevation:8},overlay:{position:'absolute',left:0,right:0,bottom:0,flexDirection:'row',alignItems:'center',gap:N.SPACING.sm,paddingHorizontal:N.SPACING.md,paddingVertical:N.SPACING.sm,backgroundColor:'#0009'},actions:{position:'absolute',left:N.SPACING.sm,bottom:N.SPACING.xl},dot:{width:8,height:8,borderRadius:4},name:{flex:1,color:'#fafaf9',fontSize:12,fontWeight:'600'}})},2636,[787,16,115,194,33,248,813,814,1082,1106,1105,817,789,988,1070,1071,1073,1072,1074,847,1069,1088,990,833,843,790,842,829,2637,2407,831,823,1068,2638,1087,10]);
3416
3416
  __d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.CameraSwitchedOffProvider=function(n){const u=(0,t.c)(3),{deviceIds:s,enabled:l,children:v}=n,h=(0,c.useSwitchedOffMap)(s,l);let O;u[0]!==v||u[1]!==h?(O=(0,o.jsx)(f.Provider,{value:h,children:v}),u[0]=v,u[1]=h,u[2]=O):O=u[2];return O},e.useSwitchedOffFor=function(t){const c=(0,n.useContext)(f);return c?.[t]??u};var t=r(d[0]),n=r(d[1]),c=r(d[2]),o=r(d[3]);const u=Object.freeze([]),f=(0,n.createContext)(null)},2637,[787,16,2404,10]);
3417
3417
  __d(function(g,r,i,a,m,_e,d){"use strict";function t(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(_e,'__esModule',{value:!0}),Object.defineProperty(_e,"BatteryHoldOverlay",{enumerable:!0,get:function(){return p}});var e=r(d[0]),o=r(d[1]),n=t(r(d[2])),l=t(r(d[3])),s=t(r(d[4])),c=t(r(d[5])),f=r(d[6]),u=r(d[7]),b=r(d[8]),h=r(d[9]),y=r(d[10]);const p=(0,o.memo)(function(t){const o=(0,e.c)(20),{onStart:c,compact:h}=t,p=void 0!==h&&h,{t:v}=(0,f.useTranslation)();let x;o[0]!==c?(x=()=>{(0,u.hapticAction)(),c()},o[0]=c,o[1]=x):x=o[1];const C=x,S=p?44:64;let A;o[2]!==v?(A=v("v2.battery.startStreamA11y"),o[2]=v,o[3]=A):A=o[3];const P=S/2;let I;o[4]!==S||o[5]!==P?(I=[j.disc,{width:S,height:S,borderRadius:P}],o[4]=S,o[5]=P,o[6]=I):I=o[6];const _=p?20:28;let O,R,z,G;return o[7]!==_?(O=(0,y.jsx)(b.Play,{size:_,color:"#fafaf9",fill:"#fafaf9"}),o[7]=_,o[8]=O):O=o[8],o[9]!==C||o[10]!==A||o[11]!==I||o[12]!==O?(R=(0,y.jsx)(s.default,{onPress:C,accessibilityRole:"button",accessibilityLabel:A,hitSlop:12,style:I,children:O}),o[9]=C,o[10]=A,o[11]=I,o[12]=O,o[13]=R):R=o[13],o[14]!==p||o[15]!==v?(z=p?null:(0,y.jsx)(l.default,{style:j.hint,numberOfLines:3,children:v("v2.battery.holdHint")}),o[14]=p,o[15]=v,o[16]=z):z=o[16],o[17]!==R||o[18]!==z?(G=(0,y.jsxs)(n.default,{style:j.root,pointerEvents:"box-none",children:[R,z]}),o[17]=R,o[18]=z,o[19]=G):G=o[19],G}),j=c.default.create({root:{position:'absolute',top:0,left:0,right:0,bottom:0,alignItems:'center',justifyContent:'center',gap:h.SPACING.md},disc:{alignItems:'center',justifyContent:'center',backgroundColor:'rgba(0,0,0,0.55)',borderWidth:1,borderColor:'rgba(250,250,249,0.5)'},hint:{color:'#fafaf9',fontSize:12,fontWeight:'600',textAlign:'center',maxWidth:260,paddingHorizontal:h.SPACING.md,paddingVertical:h.SPACING.xs,borderRadius:h.RADIUS.md,backgroundColor:'rgba(0,0,0,0.55)',overflow:'hidden'}})},2638,[787,16,115,194,248,33,813,817,814,831,10]);
3418
3418
  __d(function(g,r,i,a,m,_e,d){"use strict";function e(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(_e,'__esModule',{value:!0}),_e.GridWallTimeline=function(e){const n=(0,t.c)(55),{deviceIds:k,wall:f,title:B,onBack:A,layoutMode:I,railWidth:M,wallStackHeight:P,chromeHidden:w,hideBack:D}=e;let W;n[0]===Symbol.for("react.memo_cache_sentinel")?(W={scrubStart:T,scrubTo:_,scrubCommit:y,seek:L,goLive:h},n[0]=W):W=n[0];const j=W,C=(0,s.usePlaybackMachine)(j),[E,G]=o.default.useState(1),[H,J]=o.default.useState(!1);let N;n[1]===Symbol.for("react.memo_cache_sentinel")?(N=e=>{G(e),J(!1),R("setRate",t=>t.setRate(e))},n[1]=N):N=n[1];const x=N;let F;n[2]!==H||n[3]!==E?(F=()=>{const e=!H;J(e),R("setRate",t=>t.setRate(e?0:E))},n[2]=H,n[3]=E,n[4]=F):F=n[4];const O=F,z=C.seek,q=C.state.playhead;let K;n[5]!==C.state?(K=(0,s.selectActiveEpoch)(C.state),n[5]=C.state,n[6]=K):K=n[6];const Q=K;let U;n[7]!==Q||n[8]!==z||n[9]!==q?(U=e=>{const t=(0,l.jogTarget)((0,l.resolveJogBase)(q,Q),e);null!=t&&z(t,"timeline")},n[7]=Q,n[8]=z,n[9]=q,n[10]=U):U=n[10];const V=U;let X;n[11]!==V?(X=()=>V(-1),n[11]=V,n[12]=X):X=n[12];const Y=X;let Z;n[13]!==V?(Z=()=>V(1),n[13]=V,n[14]=Z):Z=n[14];const $=Z,ee=k[0]??S;let te;n[15]!==w||n[16]!==I||n[17]!==P?(te=(0,u.gridWallSlotStyle)(I,P,w),n[15]=w,n[16]=I,n[17]=P,n[18]=te):te=n[18];const oe=te,ce=u.GRID_WALL_SLOT_TEST_ID[w?"full":"shared"];let ae,ne;n[19]!==ce||n[20]!==f||n[21]!==oe?(ae=(0,v.jsx)(b.default,{testID:ce,style:oe,children:f}),n[19]=ce,n[20]=f,n[21]=oe,n[22]=ae):ae=n[22];n[23]!==B?(ne={cameraName:B,hasPtz:!1,hasBattery:!1,hasNetworkLink:!1,hasNavigation:!1},n[23]=B,n[24]=ne):ne=n[24];const se=C.state.mode,re=C.state.seekAnchor,ie=C.seek,le=C.beginScrub,ue=C.moveScrub,de=C.commitScrub,me=C.goLive,be=C.state.liveLocked,ge=C.toggleLiveLock;let ke,ve,Se;n[25]===Symbol.for("react.memo_cache_sentinel")?(ke={failed:!1,fetching:!1,reason:null,onRetry:p},n[25]=ke):ke=n[25];n[26]!==C.state?(ve=(0,s.selectScrubDirection)(C.state),n[26]=C.state,n[27]=ve):ve=n[27];n[28]!==Q||n[29]!==w||n[30]!==k||n[31]!==D||n[32]!==I||n[33]!==A||n[34]!==Y||n[35]!==$||n[36]!==O||n[37]!==H||n[38]!==C.beginScrub||n[39]!==C.commitScrub||n[40]!==C.goLive||n[41]!==C.moveScrub||n[42]!==C.seek||n[43]!==C.state.liveLocked||n[44]!==C.state.mode||n[45]!==C.state.seekAnchor||n[46]!==C.toggleLiveLock||n[47]!==ee||n[48]!==M||n[49]!==E||n[50]!==ne||n[51]!==ve||n[52]!==ae||n[53]!==B?(Se=(0,v.jsx)(c.TheaterTimeline,{layoutMode:I,railWidth:M,chromeHidden:w,hideBack:D,stream:ae,deviceId:ee,scopeIds:k,name:B,onBack:A,deviceBinding:ne,mode:se,activeEpoch:Q,seekAnchor:re,onSeek:ie,onScrubBegin:le,onScrubMove:ue,onScrubCommit:de,onGoLive:me,liveLocked:be,onToggleLiveLock:ge,playbackRate:E,paused:H,loading:!1,streamFault:ke,scrubDirection:ve,onTogglePlayPause:O,onJogBack:Y,onJogForward:$,onSelectRate:x}),n[28]=Q,n[29]=w,n[30]=k,n[31]=D,n[32]=I,n[33]=A,n[34]=Y,n[35]=$,n[36]=O,n[37]=H,n[38]=C.beginScrub,n[39]=C.commitScrub,n[40]=C.goLive,n[41]=C.moveScrub,n[42]=C.seek,n[43]=C.state.liveLocked,n[44]=C.state.mode,n[45]=C.state.seekAnchor,n[46]=C.toggleLiveLock,n[47]=ee,n[48]=M,n[49]=E,n[50]=ne,n[51]=ve,n[52]=ae,n[53]=B,n[54]=Se):Se=n[54];return Se};var t=r(d[0]),o=e(r(d[1])),c=r(d[2]),n=r(d[3]),s=r(d[4]),l=r(d[5]),u=r(d[6]),b=e(r(d[7])),k=r(d[8]),v=r(d[9]);const S=0;function h(){return R("goLive",f)}function f(e){return e.goLive()}function L(e){return R("seek",t=>t.seek(e))}function y(e){return R("scrubCommit",t=>t.scrubCommit(e))}function _(e){return R("scrubTo",t=>t.scrubTo(e))}function T(){return R("scrubStart",B)}function B(e){return e.scrubStart()}function p(){}function R(e,t){0===n.gridPlaybackBus.broadcast(t)&&k.log.warn('grid:timeline','broadcast reached no player surface',{command:e})}},2639,[787,16,1076,1079,991,1062,2640,115,916,10]);