@camstack/addon-pipeline-orchestrator 1.2.656 → 1.2.657
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +6 -0
- package/assets/viewer/.viewer-current-files.json +18 -18
- package/assets/viewer/.viewer-version +1 -1
- package/assets/viewer/_expo/static/js/web/[frameId]-35c42299530aeeb8af9696a44574d5c2.js +23 -0
- package/assets/viewer/_expo/static/js/web/[id]-483ffcfbccae57166106f1a730461293.js +5 -0
- package/assets/viewer/_expo/static/js/web/[id]-c457536a2a37016983818811138b3a68.js +7 -0
- package/assets/viewer/_expo/static/js/web/[id]-fe77e3abe00340b8cdf3c7df3fb79c24.js +57 -0
- package/assets/viewer/_expo/static/js/web/[section]-72a776b38de8eb6487770a1830e6eada.js +31 -0
- package/assets/viewer/_expo/static/js/web/{__common-2f84b1ca43bfa1f12ceabf6b143bb44e.js → __common-d6b750942f15f710317cda14c45946b4.js} +1294 -1294
- package/assets/viewer/_expo/static/js/web/_layout-5d35df374c084c4635d1323a5e6d8399.js +29 -0
- package/assets/viewer/_expo/static/js/web/{_layout-17608b2531640cc566469fddcf1cdbea.js → _layout-daed64c97776d517df8e5f42a7d16b6f.js} +24 -24
- package/assets/viewer/_expo/static/js/web/adhoc-bcd88137d4e491b34717e02b4c9d0e32.js +1 -0
- package/assets/viewer/_expo/static/js/web/alarm-e5511212fbc4e9bab740e7ec259b5d9e.js +1 -0
- package/assets/viewer/_expo/static/js/web/cameras-5471fc1de6356415505bd7f707e6ac77.js +27 -0
- package/assets/viewer/_expo/static/js/web/{enroll-2c9af33bd8953e33bfb9034fdef2d63e.js → enroll-aba8aa69276085249ee806a26942194b.js} +19 -19
- package/assets/viewer/_expo/static/js/web/history-aa7ea0e4b4b755ec248bf939ade97798.js +3 -0
- package/assets/viewer/_expo/static/js/web/{index-7c624c3ed46f4397bb3abd93a9f436ec.js → index-265396a362ea3648a3697c2984d6c244.js} +2 -2
- package/assets/viewer/_expo/static/js/web/index-4498d2909e3bfdca3309ff3f3f59c10c.js +1 -0
- package/assets/viewer/_expo/static/js/web/index-ef33db09c327e9668346081607160e76.js +1 -0
- package/assets/viewer/_expo/static/js/web/new-ba66f0a1a170bf1a3f64c38ed30fcdbb.js +2 -0
- package/assets/viewer/_expo/static/js/web/sign-in-657339c48456ee6f863a61a77ff8af56.js +38 -0
- package/assets/viewer/index.html +1 -1
- package/dist/_stub.js +2 -2
- package/dist/{_virtual_mf-localSharedImportMap___mfe_internal__addon_pipeline_orchestrator_widgets-BlG7DFZv.mjs → _virtual_mf-localSharedImportMap___mfe_internal__addon_pipeline_orchestrator_widgets-CHSkS8Be.mjs} +2 -2
- package/dist/_virtual_mf___mfe_internal__addon_pipeline_orchestrator_widgets__loadShare___mf_0_camstack_mf_1_types__loadShare__.js-C33x6eba.mjs +26 -0
- package/dist/_virtual_mf___mfe_internal__addon_pipeline_orchestrator_widgets__loadShare___mf_0_camstack_mf_1_ui_mf_2_library__loadShare__.js-D8vih3Xp.mjs +26 -0
- package/dist/{hostInit-CNueneOD.mjs → hostInit-DT5XVm61.mjs} +2 -2
- package/dist/index.js +256 -202
- package/dist/index.mjs +256 -202
- package/dist/remoteEntry.js +1 -1
- package/package.json +2 -2
- package/assets/viewer/_expo/static/js/web/Clipboard-1f1164c412be79bd909a8e53c97a3482.js +0 -8
- package/assets/viewer/_expo/static/js/web/Haptics-8bcab636236172ba5f48ae47f6464b1c.js +0 -3
- package/assets/viewer/_expo/static/js/web/add-server-9d522e50b831fce3986b69e94e22191a.js +0 -2
- package/assets/viewer/_expo/static/js/web/connect-308ac6434caaad2fc6ccf6dbf0aa39d8.js +0 -2
- package/assets/viewer/_expo/static/js/web/index-b65eec858e160d6ed7880072a4ed593f.js +0 -4
- package/assets/viewer/_expo/static/js/web/index-e0b431ae0b4ca13eb0ab241ae4744574.js +0 -2
- package/dist/_virtual_mf___mfe_internal__addon_pipeline_orchestrator_widgets__loadShare___mf_0_camstack_mf_1_types__loadShare__.js-NEEgITJZ.mjs +0 -26
- package/dist/_virtual_mf___mfe_internal__addon_pipeline_orchestrator_widgets__loadShare___mf_0_camstack_mf_1_ui_mf_2_library__loadShare__.js-B_KHG4Or.mjs +0 -26
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
__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 u}});var n=r(d[0]),t=r(d[1]),o=r(d[2]),c=r(d[3]);function u(){const u=(0,n.c)(6),{id:l,at:s}=(0,t.useLocalSearchParams)(),b=Number(l),f=void 0!==s?Number(s):Number.NaN;if(!Number.isFinite(b))return null;let S,_,N;return u[0]===Symbol.for("react.memo_cache_sentinel")?(S=(0,c.jsx)(t.Stack.Screen,{options:{gestureEnabled:!1,fullScreenGestureEnabled:!1,presentation:"containedTransparentModal",animation:"slide_from_right",contentStyle:{backgroundColor:"transparent"}}}),u[0]=S):S=u[0],u[1]!==f?(_=Number.isFinite(f)&&f>0?f:void 0,u[1]=f,u[2]=_):_=u[2],u[3]!==b||u[4]!==_?(N=(0,c.jsxs)(c.Fragment,{children:[S,(0,c.jsx)(o.CameraDetailScreen,{deviceId:b,initialSeekMs:_})]}),u[3]=b,u[4]=_,u[5]=N):N=u[5],N}},755,[787,788,1155,10]);
|
|
2
|
+
__d(function(e,t,a,o,i,n,r){"use strict";function l(e){return e&&e.__esModule?e:{default:e}}function s(e){if(e&&e.__esModule)return e;var t={};return e&&Object.keys(e).forEach(function(a){var o=Object.getOwnPropertyDescriptor(e,a);Object.defineProperty(t,a,o.get?o:{enumerable:!0,get:function(){return e[a]}})}),t.default=e,t}Object.defineProperty(n,'__esModule',{value:!0}),Object.defineProperty(n,"WALL_STAGE_TEST_ID",{enumerable:!0,get:function(){return Pt}}),n.CameraDetailScreen=function({deviceId:e,initialSeekMs:t}){const a=(0,nt.usePopTransitions)(),{t:o}=(0,x.useTranslation)(),i=(0,O.useConfirm)(),n=(0,O.useNotice)(),r=(0,T.useRouter)(),{colors:l,mode:s}=(0,q.useTheme)(),c=(0,I.useSafeAreaInsets)(),{viewport:C,readout:Ke}=(0,k.useViewportReadout)(),{width:Qe,height:Jt}=C,{name:Ut,features:$t,online:qt,disabled:Zt,known:Kt}=Et(e),{settings:Qt,hydrated:Xt,setStreamDefault:ea}=(0,ot.useSettings)(),ta=Qt.stream.clipLoop,aa=(0,d.useCallback)(()=>{ea('clipLoop',!ta)},[ea,ta]),oa=(0,_t.useCanActuate)(),ia=oa&&$t.includes(Xe.FEATURE.ptz),na=$t.includes(Xe.FEATURE.battery),{data:ra=[]}=(0,ae.useDeviceCapNames)(e,!0),la=ra.includes('network-link'),sa=oa&&ra.includes('navigation'),{data:ca=null}=(0,at.useBattery)(e,na),ua=na&&!0===ca?.sleeping,da=$t.includes(Xe.FEATURE.twoWayAudio),ha=$t.includes(Xe.FEATURE.doorbell),ma=(0,pt.useCameraLocalStore)(t=>t.local.byId[e]?.quality),ga=(0,pt.useCameraLocalStore)(e=>e.setCameraQuality),pa=(0,pt.useCameraLocalStore)(t=>t.local.byId[e]?.audioOn),va=(0,pt.useCameraLocalStore)(e=>e.hydrated),fa=(0,pt.useCameraLocalStore)(e=>e.hydrate);(0,d.useEffect)(()=>{fa()},[fa]);const Sa=(0,pt.useCameraLocalStore)(e=>e.setCameraAudioOn),[wa,ba]=(0,d.useState)(ma??'auto'),_a=(0,d.useRef)(!1);(0,d.useEffect)(()=>{va&&!_a.current&&(_a.current=!0,void 0!==ma&&ba(ma))},[va,ma]);const ya=(0,kt.useRouteChannel)(),ka=(0,d.useMemo)(()=>(0,yt.qualityToTargetForRoute)(wa,ya),[wa,ya]),Ca=(0,d.useCallback)(t=>{ba(t),ga(e,t)},[e,ga]);(0,et.useEventHaptics)([e],!0);const{overlay:Ha,setOverlay:Oa,highlight:xa,setHighlight:Ta}=(0,bt.useCameraViewOptions)(e),Ia=(0,dt.useDetections)(e,xa.detection&&!0),Ea=xa.detection&&Ia.boxes.some(e=>0===xa.detectionClasses.length||xa.detectionClasses.includes(e.label)),Pa=(0,gt.useHeld)(Ea,1e3*xa.detectionHoldSec),Da=(0,ht.useAudioActive)(e,xa.audio,xa.audioDb),Ra=(0,gt.useHeld)('off'!==xa.audio&&Da,1e3*mt.AUDIO_HIGHLIGHT_HOLD_SEC),[Wa,La]=(0,d.useState)(0),Ba=`${xa.audio}:${xa.audioDb}`,Aa=(0,d.useRef)(!0);(0,d.useEffect)(()=>{if(Aa.current)return void(Aa.current=!1);if('off'===xa.audio)return void La(0);const e=Date.now()+1e3*mt.AUDIO_HIGHLIGHT_HOLD_SEC;La(e);const t=setTimeout(()=>La(0),1e3*mt.AUDIO_HIGHLIGHT_HOLD_SEC);return()=>clearTimeout(t)},[Ba,xa.audio]);const ja=Wa>Date.now(),Ma=(0,d.useMemo)(()=>({enabled:Ha.highlightBorder,...xa,audioHoldSec:mt.AUDIO_HIGHLIGHT_HOLD_SEC,appearance:Qt.highlight,motionHoldSec:Qt.grid.motionHoldSec}),[Ha.highlightBorder,xa,Qt.highlight,Qt.grid.motionHoldSec]),[za,Fa]=(0,d.useState)(null),Ga={operatorChoice:za,cameraKnown:Kt,batteryPowered:na},Na=(0,me.resolveLivePaused)(Ga),Ja=(0,d.useRef)(Na);Ja.current=Na;const[Ya,Va]=(0,d.useState)({state:'connecting'}),Ua=(0,d.useRef)(null),$a=(0,d.useRef)(Ya.state);$a.current=Ya.state;const qa=()=>{Fa(e=>!(0,me.resolveLivePaused)({operatorChoice:e,cameraKnown:Kt,batteryPowered:na}))},[Za,Ka]=(0,d.useState)(1),[Qa,Xa]=(0,d.useState)(!1),eo=(0,d.useRef)(null),[to,ao]=(0,d.useState)(!1),[oo,io]=(0,d.useState)(null),[no,ro]=(0,d.useState)(0),lo=(0,d.useRef)(!1);(0,d.useEffect)(()=>{if(!to||null===oo)return void ro(0);const e=()=>ro(Math.floor((Date.now()-oo)/1e3));e();const t=setInterval(e,250);return()=>clearInterval(t)},[to,oo]);const[so,co]=(0,d.useState)(0),uo=(0,d.useRef)(t??null),[ho,mo]=(0,d.useState)(t),[go,po]=(0,d.useState)(void 0),vo=(0,d.useMemo)(()=>({scrubStart:e=>{eo.current?.scrubStart(e)},scrubTo:(e,t)=>eo.current?.scrubTo(e,t?.mode,t?.velocityPxPerS),scrubCommit:(e,t)=>eo.current?.scrubCommit(e,t),seek:e=>eo.current?.seek(e),goLive:()=>{if(!(0,me.shouldDialLiveOnGoLive)(Ja.current))return uo.current=null,mo(void 0),Xa(!1),void Ka(1);eo.current?.goLive(),co(e=>e+1),Xa(!1),Ka(1),uo.current=null,mo(void 0)}}),[]),fo=(0,j.usePlaybackMachine)(vo),So=(0,d.useMemo)(()=>({playClip:(e,t,a,o)=>{const i=eo.current,n='connecting'!==$a.current&&'error'!==$a.current;return(0,g.noteClipOpenStep)('port',{clipId:e,provider:t,offsetMs:a,profile:o??null,hasPlayer:null!==i,canHear:n}),null!==i&&n?(i.playClip(e,t,a,o),!0):(po({clipId:e,provider:t,...void 0===o?{}:{profile:o}}),!1)},noteAsserted:e=>{Ua.current=e},scrubStart:e=>{eo.current?.scrubStart(e)},scrubTo:e=>{eo.current?.scrubTo(e)},scrubCommit:(e,t)=>{eo.current?.scrubCommit(e,t)}}),[]),wo=(0,h.useClipStage)(So,ta),[bo,_o]=(0,d.useState)(Dt),yo=(0,d.useCallback)(e=>{_o(t=>(0,f.adoptClipList)(t,e))},[]);(0,d.useEffect)(()=>{const e=[3e3,1e4].map(e=>setTimeout(()=>eo.current?.timelineWarm(Date.now()-3e4),e));return()=>{for(const t of e)clearTimeout(t)}},[]);const ko='live'!==fo.state.mode,Co=(0,d.useCallback)(()=>{po(void 0),wo.close()},[wo]),Ho=(0,d.useCallback)(()=>{Co(),fo.goLive()},[Co,fo]),Oo=(0,d.useRef)(!1),xo='clip'===wo.stage.kind?wo.stage.clipId:null;(0,d.useEffect)(()=>{const e=null!==eo.current;Ua.current=(0,u.assertionAfterPlayerChange)(Ua.current,e,Ya.state),(0,u.shouldAssertClip)({heldClipId:xo,playerPresent:e,playerState:Ya.state,assertedClipId:Ua.current})&&null!==xo&&((0,g.noteClipOpenStep)('assert',{clipId:xo,playerState:Ya.state}),Ua.current=xo,wo.replay())},[xo,Ya.state,wo]);const To=(0,m.clipStartOnFrame)(bo,wo.stage),Io=(0,me.shouldMountLiveView)({liveHeld:Na,mode:fo.state.mode,playhead:fo.state.playhead,recordedSeekMs:ho??null,keepRecordedSession:Oo.current,initialClipId:xo});Oo.current=Io;const Eo=e=>{Na&&null==eo.current&&(uo.current=e,mo(e))},Po=(0,d.useCallback)((e,t)=>{Eo(e),fo.seek(e,t)},[Na,fo]),Do=(0,d.useCallback)((e,t)=>{Eo(e),fo.commitScrub(e,t)},[Na,fo]),Ro=async()=>{if(!lo.current)return null;lo.current=!1,ao(!1),io(null);try{return await(eo.current?.stopLiveCapture())??null}catch{return n({title:o('v2.theater.recordLive'),message:o('v2.theater.recordFailed')}),null}},Wo=async t=>{const a=(0,Q.captureFileExtension)(t.mime),o=`${W.cacheDirectory}live-${e}-${Date.now()}.${a}`;await W.writeAsStringAsync(o,t.base64,{encoding:W.EncodingType.Base64}),await L.isAvailableAsync()&&await L.shareAsync(o,{mimeType:t.mime||('webm'===a?'video/webm':'video/mp4'),UTI:'webm'===a?'public.movie':'public.mpeg-4'})},Lo=e=>{(async()=>{await i({title:o('v2.theater.keepClipTitle'),confirmLabel:o('v2.theater.shareClip'),cancelLabel:o('v2.theater.discardClip')})&&await Wo(e)})()},Bo={capturing:to,elapsedLabel:(0,X.formatSelectionDuration)(1e3*no),onStart:()=>{lo.current=!0,ao(!0),io(Date.now()),eo.current?.startLiveCapture()},onKeep:()=>{(async()=>{const e=await Ro();e&&await Wo(e)})()},onDiscard:()=>{Ro()}},Ao=(0,oe.useExportSelection)(e,Ut,fo),jo=(0,ie.useActivityStore)(e=>e.add),Mo=(0,d.useCallback)(()=>{(async()=>{const t=()=>n({title:o('v2.activity.title'),message:o('v2.activity.snapshotFailed')}),a=eo.current;if(null!==a)try{const i=await a.captureSnapshot(),r=Date.now(),l=(0,j.selectActiveEpoch)(fo.state)??r,s=await(0,re.saveSnapshot)(i.base64,`snapshot-${e}-${l}`);if(null===s)return void t();jo((0,ne.snapshotItemFrom)({uid:`${e}-${r.toString(36)}`,deviceId:e,cameraName:Ut,atMs:l,fileUri:s.uri,mime:s.mime,now:r})),n({title:o('v2.activity.title'),message:o('v2.activity.snapshotSaved')})}catch(a){F.log.warn('activity','snapshot failed',{deviceId:e,error:a instanceof Error?a.message:String(a)}),t()}else t()})()},[jo,e,Ut,n,fo,o]),zo='clip'===wo.stage.kind;(0,d.useEffect)(()=>{(0,v.shouldEndLiveCapture)({mode:fo.state.mode,clipHeld:zo})&&lo.current&&(async()=>{const e=await Ro();e&&Lo(e)})()},[fo.state.mode,zo]);const Fo=(0,d.useCallback)(()=>{const e=!Qa;Xa(e),eo.current?.setRate(e?0:Za)},[Qa,Za]),Go=(0,d.useCallback)(e=>{Ka(e),Qa||eo.current?.setRate(e)},[Qa]),No=(0,d.useCallback)(e=>{Qa||Xa(!0),eo.current?.stepFrame(e)},[Qa]),Jo=(0,d.useCallback)(e=>{const t=uo.current;null!==t&&(uo.current=null,mo(void 0),'adopt'===e?fo.adoptSeek(t,'cluster'):fo.seek(t,'cluster'))},[fo]),[Yo,Vo]=(0,d.useState)(null),Uo=(0,d.useRef)(null);Uo.current=Yo;const $o=(0,d.useRef)(!1),qo=(0,d.useRef)(null),Zo=(0,d.useRef)(null),Ko=(0,d.useRef)(fo.state.mode);Ko.current=fo.state.mode;const Qo=(0,d.useRef)((0,j.selectActiveEpoch)(fo.state));Qo.current=(0,j.selectActiveEpoch)(fo.state);const Xo=(0,d.useRef)(null);Xo.current=xo;const ei=(0,d.useCallback)(()=>{if(!(0,K.shouldReassertRecordedOnReconnect)({playbackMode:Ko.current,playheadEpoch:Qo.current,clipHoldingFrame:Xo.current}))return;const e=Qo.current;null!==e&&(qo.current=e,Zo.current=(0,K.resolveRecordedProfileForReconnect)(ka,Uo.current?.profile??null),$o.current=!0)},[ka]);(0,d.useEffect)(()=>{if(!$o.current)return;if('playing'!==Ya.state)return;const t=qo.current,a=Zo.current;$o.current=!1,qo.current=null,Zo.current=null,null!==t&&null!==a&&'live'!==Ko.current&&(F.log.info('playback','foreground reconnect \u2192 playRecorded',{tags:{deviceId:e},epoch:t,profile:a}),eo.current?.playRecorded(t,a),Qa&&eo.current?.setRate(0))},[Ya.state,e,Qa]);const ti=wo.reportPlayerState,ai=(0,d.useCallback)(e=>{fo.reportEmbedState(e),ti(e),'paused'===e?Xa(!0):'playing'===e&&Xa(!1),'gap'!==e&&'error'!==e||(uo.current=null,mo(void 0)),Jo((0,z.resolveInitialSeekAction)(e))},[fo,Jo,ti]),[oi,ii]=(0,d.useState)(!0),ni=(0,d.useRef)(!1);(0,d.useEffect)(()=>{Xt&&va&&!ni.current&&(ni.current=!0,ii((0,ft.opensMuted)(Qt.stream.audioOnOpen,pa)))},[Xt,va,Qt.stream.audioOnOpen,pa]);const ri=(0,St.hasLayer)(Ha,'motion'),li=(0,St.hasLayer)(Ha,'objects'),si=(0,St.hasLayer)(Ha,'discarded'),ci=(0,St.hasLayer)(Ha,'stationary'),ui=Ha.stats,di=(0,fe.useStreamAspect)(e),hi=Ha.audioMeter,mi=(0,Ce.useSettingsStore)(e=>e.settings.deviceInfo),[gi,pi]=(0,d.useState)(!1),[vi,fi]=(0,d.useState)(!0),[Si,wi]=(0,d.useState)(!1),bi=(0,d.useCallback)(()=>wi(e=>!e),[]),[_i,yi]=(0,d.useState)(0),ki=(0,d.useCallback)(()=>yi(e=>e+1),[]),[Ci,Hi]=(0,d.useState)(Qt.stream.landscapeTimeline),Oi=(0,d.useCallback)(e=>{Hi(e),ea('landscapeTimeline',e)},[ea]),xi=(0,d.useRef)(null),Ti=(0,d.useCallback)(()=>{Hi(e=>'off'===e?'overlay':e),xi.current?.openControls()},[]),[Ii,Ei]=(0,d.useState)(null),[Pi,Di]=(0,d.useState)(!1),Ri=(0,d.useCallback)(()=>Di(!0),[]),Wi=(0,d.useCallback)(()=>{Di(!1),Ei(null)},[]),Li=(0,d.useCallback)(e=>{Ei(e),Di(!1)},[]),Bi=(0,d.useCallback)(()=>Di(!1),[]),Ai=(0,d.useRef)(null),ji=(0,d.useCallback)(()=>{(0,w.scrubFramePainted)(e)},[e]),Mi=wo.reportPosition,zi=(0,d.useCallback)(t=>{if(Mi(t))return;Jo('adopt'),fo.reportPosition(t);const a=Date.now(),o=(0,M.evaluateDivergence)({indicatorEpoch:(0,j.selectActiveEpoch)(fo.state),playerEpoch:t,nowMs:a,lastReportAt:Ai.current});null!==o&&(Ai.current=a,F.log.warn('theater:divergence','indicator and stream disagree',{deviceId:e,deltaMs:o.deltaMs,indicatorAhead:o.indicatorAhead,indicatorEpoch:(0,j.selectActiveEpoch)(fo.state),playerEpoch:t,mode:fo.state.mode,seekAnchor:fo.state.seekAnchor,seekLanded:fo.state.seekLanded}))},[fo,e,Jo,Mi]),Fi=(0,d.useCallback)(()=>{const t=!oi;ii(t),Sa(e,!t)},[oi,e,Sa]),Gi=(0,d.useCallback)(t=>{if(t===e)return;const a=(0,De.viewedInstant)((0,j.selectActiveEpoch)(fo.state));F.log.info('theater','switch camera',{tags:{deviceId:t},from:e,carrying:'at'===a.kind?a.atMs:'live'}),r.replace(`/camera/${t}${(0,De.atParam)(a)}`)},[r,e,fo.state]),[Ni,Ji]=(0,d.useState)(null),Yi=(0,Ye.useLastCameraStore)(e=>e.forget),Vi=(0,d.useCallback)((e,t)=>{Ji({kind:e,deviceId:t})},[]),Ui=(0,d.useCallback)(e=>{(0,Re.openOnDemandPlayer)({deviceId:e,atMs:(0,Pe.resolveReelInstant)((0,j.selectActiveEpoch)(fo.state))})},[fo.state]),$i=(0,d.useCallback)(()=>Ji(null),[]),{data:qi}=(0,Xe.useCameras)(),Zi=(0,d.useMemo)(()=>(0,Ve.resolveCellPanel)(Ni,(qi??[]).map(e=>e.id)),[Ni,qi]),Ki=(qi??[]).find(e=>e.id===Zi?.deviceId),Qi=Ki?.name??'',Xi=oa&&(Ki?.features??[]).includes(Xe.FEATURE.ptz),en=(0,d.useCallback)(e=>Oa((0,St.patchOverlay)(Ha,{audioMeter:e})),[Oa,Ha]),tn=(0,d.useCallback)(()=>fi(e=>!e),[]),an=(0,d.useCallback)(()=>fi(!1),[]),on=(0,d.useCallback)(()=>{Va({state:'connecting'}),Ho()},[Ho]),nn=(0,d.useCallback)(()=>eo.current?.startPip()??Promise.resolve('unavailable'),[]),rn=(0,G.useSystemPip)({mode:fo.state.mode,playerState:Ya.state,goLive:on,startPip:nn}),ln=rn.request,[sn,cn]=(0,d.useState)(e);if(sn!==e){cn(e);const t=(0,De.viewedInstant)((0,j.selectActiveEpoch)(fo.state)),a='at'===t.kind?t.atMs:void 0;fo.swapCamera(a??null),mo(a),Ka(1),Xa(!1),Fa(null),Va({state:'connecting'}),Vo(null),ii((0,ft.opensMuted)(Qt.stream.audioOnOpen,pa)),ba(ma??'auto'),Ei(null),Di(!1),Ji(null),wi(!1),La(0),ao(!1),io(null),ro(0),F.log.info('theater','camera swapped in place',{tags:{deviceId:e},from:sn,carrying:a??'live'})}(0,d.useEffect)(()=>{uo.current=ho??null,Oo.current=!1,Ja.current=!1,ni.current=!1,_a.current=!1,Aa.current=!0,lo.current&&(F.log.warn('live:lifecycle','live capture dropped: the camera was swapped',{tags:{deviceId:e}}),lo.current=!1),rn.abandon()},[e]),(0,d.useEffect)(()=>{(0,Re.focusOnDemandCamera)(e)},[e]);const un=(0,d.useCallback)(()=>eo.current?.getStats()??Promise.resolve(null),[]),{talking:dn,error:hn,toggle:mn}=(0,le.useIntercom)(e);(0,d.useEffect)(()=>{hn&&n({title:o('v2.cameraDetail.talk'),message:o('v2.cameraDetail.talkFailed')})},[hn,o,n]);const gn=(0,Ze.useScreenMinSide)(),{showSidebar:pn,compact:vn}=(0,Ze.useSidebarLayout)(),fn=(0,T.usePathname)(),Sn={width:Qe,height:Jt,screenMinSide:gn,isWeb:!0,fullscreen:gi},wn=(0,$e.resolveDetailLayoutMode)(Sn),bn='wide'===wn,_n=(0,Ge.useWorkspaceStore)(e=>e.setMembers),yn=(0,Ge.useWorkspaceStore)(e=>e.workspace.members),kn=(0,Ge.useWorkspaceStore)(e=>e.wallOptions.quality),Cn=(0,Ge.useWorkspaceStore)(e=>e.setWallOptions),Hn=(0,d.useCallback)(e=>Cn({quality:e}),[Cn]),On=(0,d.useMemo)(()=>(0,je.workspaceOnScreenCameras)(yn,e),[yn,e]),xn=(0,je.shouldShowWorkspaceGrid)(wn,yn,e);(0,d.useEffect)(()=>{xn&&lo.current&&(lo.current=!1,ao(!1),io(null),F.log.warn('live:lifecycle','live capture dropped: the picture became a wall',{deviceId:e}))},[xn,e]);const Tn=(0,Fe.cameraSelectionModeFor)(wn),In=(0,d.useCallback)(e=>{const t=(0,Fe.resolveCameraSelection)(Tn,e);switch(t.kind){case'buildView':return void _n(t.members);case'goTo':return void Gi(t.deviceId);case'openGrid':return void r.push(`/grid/adhoc?devices=${(0,xe.serializeAdhocDeviceIds)(t.deviceIds)}`);case'none':return}},[Tn,Gi,r,_n]),En=Qe>Jt,Pn='fill'===wn,Dn=Pn&&ia&&!sa,Rn=Pn?Ci:'off',Wn=(0,rt.timelineShown)(Rn),Ln='side'===Rn,Bn=(0,$e.toolbarPlacementFor)(wn),An=(0,N.shouldShowOverlayPlayPause)({fill:Pn,landscapeDrawerOpen:Wn}),[jn,Mn]=(0,d.useState)(null),zn=(0,d.useCallback)(e=>{const t=e.nativeEvent.layout.width;(0,Ue.isUsableMeasurement)(t)&&Mn(e=>null!==e&&e.width===t&&e.windowWidth===Qe?e:{width:t,windowWidth:Qe})},[Qe]),Fn=(0,d.useMemo)(()=>({visible:pn&&!Pn,compact:vn,insetLeft:c.left}),[pn,Pn,vn,c.left]),Gn=(0,Ue.resolveContainerWidth)({measured:jn,windowWidth:Qe,sideNav:Fn}),Nn=(0,Ne.shouldShowStreamNavBar)({enabled:Qt.stream.navBarOnStream,showSidebar:pn,fill:Pn}),Jn=(0,$.bottomNavFootprint)({visible:Nn,insetBottom:c.bottom}),Yn=(0,Ne.streamColumnHeight)({windowHeight:Jt,navBarFootprint:Jn}),Vn=(0,d.useMemo)(()=>(0,Ie.computeWideDetailSizes)({containerWidth:Gn,viewportHeight:Yn}),[Gn,Yn]),Un=(0,qe.buildDetailLayoutTrace)({deviceId:e,layout:Sn,viewport:Ke,sideNav:Fn,measured:jn,containerWidth:Gn,railWidth:Vn.railWidth,mode:wn}),$n=(0,qe.detailLayoutTraceSignature)(Un),qn=(0,d.useRef)(null);(0,d.useEffect)(()=>{qn.current!==$n&&(qn.current=$n,F.log.info(qe.DETAIL_LAYOUT_SCOPE,'layout decision',Un))},[$n,Un]),(0,d.useEffect)(()=>{F.log.debug('theater','detail geometry',{deviceId:e,winWidth:Qe,winHeight:Jt,screenMinSide:gn??-1,isLandscape:En,layoutMode:wn,toolbarPlacement:Bn,fullscreen:gi,containerWidth:Gn,measuredWidth:jn?.width??-1,railWidth:Vn.railWidth,defaultHeight:Math.round(9*Qe/16)})},[e,Qe,Jt,gn,En,wn,Bn,gi,Gn,jn,Vn.railWidth]),(0,Be.shouldShowCameraShelf)(wn)||xn||null===Ni||Ji(null);const Zn=(0,$e.isUnexpectedPortraitStack)(Sn,wn);(0,d.useEffect)(()=>{if(!Zn)return;let t=!1;return(async()=>{t||F.log.warn('theater','tablet resolved to the portrait stack',{deviceId:e,winWidth:Qe,winHeight:Jt,viewportSource:Ke.source,dimWidth:Ke.dimWidth,dimHeight:Ke.dimHeight,frameWidth:Ke.frameWidth,frameHeight:Ke.frameHeight,screenMinSide:gn??-1,isWeb:!0,orientationLock:-1,orientation:-1})})(),()=>{t=!0}},[Zn,e,Qe,Jt,gn,Ke]);const Kn=(0,d.useMemo)(()=>9*Qe/16,[Qe]),Qn=(0,d.useMemo)(()=>Jt*Tt,[Jt]),Xn=(0,Ae.resolvePortraitColumnSplit)({columnHeight:Yn,topInset:c.top,pictureHeight:Kn,wallShowing:xn}),er='stack'===wn?Math.round(Xn.timelineHeight):-1,tr=(0,d.useRef)(null);(0,d.useEffect)(()=>{const t=tr.current;tr.current={wall:xn,mode:wn,devices:On};const a=Ot(t,xn,wn);if(null===a)return;const o=t?.devices??[];F.log.info('live:lifecycle','theater surface changed',{deviceId:e,direction:a,opening:null===t,before:o,beforeCount:o.length,after:On,afterCount:On.length,layoutMode:wn,beforeLayoutMode:t?.mode??'none',portraitTimelineHeight:er})},[xn,On,e,wn,er]);const ar=Qt.stream.pinchExpandsHeight,or=Vn.streamWidth,ir=Vn.streamHeight,nr=(0,d.useCallback)((function({_worklet_252802605455_init_data:e,fill:t,winHeight:a,isWideDetail:o,wideStreamH:i,pinchExpandsHeight:n,defaultHeight:r,growBoxHeight:l,maxHeight:s,HEIGHT_GROW_SCALE:c}){const u=function(e){return t?a:o?i:n?l(e,{rest:r,max:s,growScale:c}):r};return u.__closure={fill:t,winHeight:a,isWideDetail:o,wideStreamH:i,pinchExpandsHeight:n,defaultHeight:r,growBoxHeight:l,maxHeight:s,HEIGHT_GROW_SCALE:c},u.__workletHash=252802605455,u.__initData=e,u})({_worklet_252802605455_init_data:Rt,fill:Pn,winHeight:Jt,isWideDetail:bn,wideStreamH:ir,pinchExpandsHeight:ar,defaultHeight:Kn,growBoxHeight:te.growBoxHeight,maxHeight:Qn,HEIGHT_GROW_SCALE:It}),[Pn,Jt,bn,ir,ar,Kn,Qn]),rr=(0,vt.useDeviceSettingsStore)(e=>e.settings.debugMode),lr=(0,ee.useStreamZoom)({fit:Pn||bn?'contain':'cover',viewport:{width:bn?or:Qe,heightFor:nr},trace:rr}),sr=lr.snapZoom;(0,d.useEffect)(()=>{sr()},[Qe,Jt,sr]);const cr=lr.resetZoom;(0,d.useEffect)(()=>{cr()},[Pn,cr]),(0,d.useEffect)(()=>{sr()},[e,sr]);const ur=(0,d.useCallback)(()=>{(0,Y.backToCameras)(r,Yi)},[r,Yi]),dr=(0,d.useCallback)(()=>{(0,Re.openOnDemandPlayer)({deviceId:e,atMs:(0,Pe.resolveReelInstant)((0,j.selectActiveEpoch)(fo.state))}),F.log.info('live:ondemand','swipe \u2192 on-demand overlay',{deviceId:e}),(0,Y.backToCameras)(r,Yi)},[e,fo.state,r,Yi]),hr=(0,d.useMemo)(()=>{const e=P.Gesture.Tap().numberOfTaps(1).onEnd((function({_worklet_11665093317600_init_data:e,runOnJS:t,onToggleControls:a}){const o=function(){t(a)()};return o.__closure={runOnJS:t,onToggleControls:a},o.__workletHash=0xa9bfdbe53e0,o.__initData=e,o})({_worklet_11665093317600_init_data:Wt,runOnJS:D.runOnJS,onToggleControls:tn})),t=P.Gesture.Tap().numberOfTaps(2).onEnd((function({_worklet_14880445913912_init_data:e,zoom:t}){const a=function(e){t.doubleTapZoomAt(e.x,e.y)};return a.__closure={zoom:t},a.__workletHash=0xd889fb15b38,a.__initData=e,a})({_worklet_14880445913912_init_data:Lt,zoom:lr})),a=P.Gesture.Exclusive(t,e),o=P.Gesture.Pan().minPointers(J.BACK_SWIPE_POINTERS).maxPointers(J.BACK_SWIPE_POINTERS).activeOffsetY(40).failOffsetX([-32,32]).onEnd((function({_worklet_10851337650826_init_data:e,shouldGoBackOnSwipe:t,zoom:a,runOnJS:o,onSwipeBack:i}){const n=function(e){t({translationY:e.translationY,velocityY:e.velocityY,zoomScale:a.scale.value})&&o(i)()};return n.__closure={shouldGoBackOnSwipe:t,zoom:a,runOnJS:o,onSwipeBack:i},n.__workletHash=0x9de8620428a,n.__initData=e,n})({_worklet_10851337650826_init_data:Bt,shouldGoBackOnSwipe:J.shouldGoBackOnSwipe,zoom:lr,runOnJS:D.runOnJS,onSwipeBack:ur})),i=P.Gesture.Pan().minPointers(J.OVERLAY_SWIPE_POINTERS).maxPointers(J.OVERLAY_SWIPE_POINTERS).activeOffsetY(40).failOffsetX([-32,32]).onEnd((function({_worklet_601866448939_init_data:e,shouldOpenOverlayOnSwipe:t,zoom:a,runOnJS:o,onSwipeToOverlay:i}){const n=function(e){t({translationY:e.translationY,velocityY:e.velocityY,zoomScale:a.scale.value})&&o(i)()};return n.__closure={shouldOpenOverlayOnSwipe:t,zoom:a,runOnJS:o,onSwipeToOverlay:i},n.__workletHash=601866448939,n.__initData=e,n})({_worklet_601866448939_init_data:At,shouldOpenOverlayOnSwipe:J.shouldOpenOverlayOnSwipe,zoom:lr,runOnJS:D.runOnJS,onSwipeToOverlay:dr}));return P.Gesture.Simultaneous(lr.composeWith(i),o,a)},[lr,tn,ur,dr]),mr=(0,D.useDerivedValue)((function({_worklet_12819335077660_init_data:e,zoomBoxHeightFor:t,zoom:a}){const o=function(){return t(a.scale.value)};return o.__closure={zoomBoxHeightFor:t,zoom:a},o.__workletHash=0xba8bbe9df1c,o.__initData=e,o})({_worklet_12819335077660_init_data:jt,zoomBoxHeightFor:nr,zoom:lr}),[nr,lr.scale]),gr=lr.traceBox;(0,D.useAnimatedReaction)((function({_worklet_9263996983302_init_data:e,liveBoxHeight:t}){const a=()=>t.value;return a.__closure={liveBoxHeight:t},a.__workletHash=9263996983302,a.__initData=e,a})({_worklet_9263996983302_init_data:Mt,liveBoxHeight:mr}),(function({_worklet_2483501414187_init_data:e,zoomTraceOn:t,traceBox:a}){const o=function(e,o){t&&null!==o&&e!==o&&a(e)};return o.__closure={zoomTraceOn:t,traceBox:a},o.__workletHash=2483501414187,o.__initData=e,o})({_worklet_2483501414187_init_data:zt,zoomTraceOn:rr,traceBox:gr}),[rr,gr]);const pr=(0,D.useAnimatedStyle)((function({_worklet_5895408842923_init_data:e,liveBoxHeight:t}){const a=()=>({height:t.value});return a.__closure={liveBoxHeight:t},a.__workletHash=5895408842923,a.__initData=e,a})({_worklet_5895408842923_init_data:Ft,liveBoxHeight:mr})),vr=(0,nt.useReducedMotion)(),fr=(0,D.useSharedValue)(Ln?1:0);(0,d.useEffect)(()=>{fr.set((0,nt.timingTo)(Ln?1:0,nt.MOTION.sheet.ms,vr))},[Ln,fr,vr]);const Sr=(0,rt.sideTimelineWidth)(Qe),wr=(0,D.useAnimatedStyle)((function({_worklet_3745472025135_init_data:e,fill:t,sideProgress:a,sideReserve:o}){const i=()=>({right:t?a.get()*o:0});return i.__closure={fill:t,sideProgress:a,sideReserve:o},i.__workletHash=3745472025135,i.__initData=e,i})({_worklet_3745472025135_init_data:Gt,fill:Pn,sideProgress:fr,sideReserve:Sr}),[Pn,Sr]),br=(0,D.useAnimatedStyle)((function({_worklet_15991984246055_init_data:e,fill:t,winWidth:a,sideProgress:o,sideReserve:i,winHeight:n,isWideDetail:r,wideStreamW:l,wideStreamH:s,defaultHeight:c}){const u=function(){return t?{position:'absolute',top:0,left:0,width:a-o.get()*i,height:n}:r?{position:'absolute',top:0,left:0,width:l,height:s}:{position:'absolute',top:0,left:0,width:a,height:c}};return u.__closure={fill:t,winWidth:a,sideProgress:o,sideReserve:i,winHeight:n,isWideDetail:r,wideStreamW:l,wideStreamH:s,defaultHeight:c},u.__workletHash=0xe8b6c8a4d27,u.__initData=e,u})({_worklet_15991984246055_init_data:Nt,fill:Pn,winWidth:Qe,sideProgress:fr,sideReserve:Sr,winHeight:Jt,isWideDetail:bn,wideStreamW:or,wideStreamH:ir,defaultHeight:Kn}),[Qe,Jt,Pn,bn,or,ir,Kn,Sr]),{ref:_r,isFullscreen:yr,supported:kr,mode:Cr,toggle:Hr}=(0,B.useWebFullscreen)(),Or=(0,B.webFullscreenButtonShown)(Cr),xr=(0,d.useCallback)(()=>{kr?Hr():pi(e=>!e)},[Hr,kr]);(0,d.useEffect)(()=>{kr&&pi(yr)},[yr,kr]),(0,A.useTheaterOrientation)(gi,{screenMinSide:gn});const Tr=(0,j.selectPlaybackStatus)(fo.state),Ir=Tr.isLive&&!Na,Er=Ir&&'playing'===Ya.state,Pr=(0,it.useMotionHighlight)(e,Ir),Dr=Pa?'detection':Ra||ja?'audio':xa.motion&&Pr?'motion':null,Rr=((0,d.useMemo)(()=>(0,Le.gateLiveHighlight)(Ma,Ir),[Ma,Ir]),(0,d.useMemo)(()=>({quality:wa,highlight:Ma,showBoxes:li}),[wa,Ma,li])),Wr='rate'===(0,v.resolvePauseAuthority)({mode:fo.state.mode,clipHeld:'clip'===wo.stage.kind}),Lr=Wr?Qa:Na,Br=()=>{!lo.current||Wr?Wr?Fo():qa():(async()=>{const e=await Ro();qa(),e&&Lo(e)})()},Ar='clip'===wo.stage.kind?!xn&&wo.loading:ko?'seeking'===fo.state.mode:!xn&&!Na&&'connecting'===Ya.state,jr=(0,d.useCallback)(()=>{eo.current?.retry()},[]),Mr='error'===Ya.state||'error'===fo.state.mode,zr=Ya.reason,Fr=Ya.state,Gr=(0,d.useMemo)(()=>xn?Ht:{failed:Mr,fetching:'connecting'===Fr,reason:'error'===Fr?zr??null:null,onRetry:jr},[xn,Mr,Fr,zr,jr]),Nr=(0,d.useCallback)(()=>{const e=(0,j.selectActiveEpoch)(fo.state),t=(0,z.jogBaseFor)(null!==fo.state.selectionAnchor,fo.state.playhead,e),a=(0,z.jogTarget)(t,-1);F.log.debug('playback:jog','jogBack',{playhead:fo.state.playhead,active:e,base:t,target:a,mode:fo.state.mode}),null!=a&&Po(a,'timeline')},[fo,Po]),Jr=(0,d.useCallback)(()=>{const e=(0,j.selectActiveEpoch)(fo.state),t=(0,z.jogBaseFor)(null!==fo.state.selectionAnchor,fo.state.playhead,e),a=(0,z.jogTarget)(t,1);F.log.debug('playback:jog','jogForward',{playhead:fo.state.playhead,active:e,base:t,target:a,mode:fo.state.mode}),null!=a&&Po(a,'timeline')},[fo,Po]),Yr='clip'===wo.stage.kind?wo.stage.clipId:null,Vr=(0,d.useMemo)(()=>null===Yr||null===(0,p.clipStageStep)(bo,Yr,-1)?null:()=>wo.step(bo,-1),[Yr,bo,wo]),Ur=(0,d.useMemo)(()=>null===Yr||null===(0,p.clipStageStep)(bo,Yr,1)?null:()=>wo.step(bo,1),[Yr,bo,wo]),$r=(0,Ct.jsx)(R.default.View,{style:Pn?[Vt.videoWrapFull,pr,wr]:bn?[Vt.videoWrap,{width:Vn.streamWidth,height:Vn.streamHeight}]:ar?[Vt.videoWrap,pr]:[Vt.videoWrap,{height:Kn}],children:(0,Ct.jsxs)(y.default,{style:Vt.videoContent,children:[(0,Ct.jsxs)(R.default.View,{style:[br,lr.videoStyle],children:[Zt?(0,Ct.jsxs)(y.default,{style:Vt.disabledStage,children:[(0,Ct.jsx)(tt.PowerOff,{size:34,color:"#9aa0a6"})," ",(0,Ct.jsx)(_.default,{style:Vt.disabledTitle,children:o('v2.cameras.disabledTitle')}),(0,Ct.jsx)(_.default,{style:Vt.disabledHint,children:o('v2.cameras.disabledHint')})]}):Io?(0,Ct.jsx)(Z.LiveView,{ref:eo,deviceId:e,muted:oi,target:ka,highlight:void 0,initialSeekMs:ho,initialClip:go,onPlaybackState:ai,onPlayerState:Va,onPosition:zi,onLiveCaptureError:()=>{lo.current=!1,ao(!1),io(null),n({title:o('v2.theater.recordLive'),message:o('v2.theater.recordFailed')})},onScrubDrawn:ji,onServedProfile:Vo,onClipDuration:wo.reportDuration,onClipAudio:wo.reportAudio,onClipIncomplete:wo.reportIncomplete,onPeerReconnect:ei},so):(0,Ct.jsx)(Yt,{deviceId:e,fill:Pn,enabled:Tr.isLive}),ri&&Ir?(0,Ct.jsx)(be.MotionRegionsOverlay,{deviceId:e,enabled:ri}):null,li&&Ir?(0,Ct.jsx)(Se.MotionBoxesOverlay,{deviceId:e,enabled:li}):null,ci&&Ir?(0,Ct.jsx)(we.StationaryBoxesOverlay,{deviceId:e,enabled:ci}):null,si&&Ir?(0,Ct.jsx)(_e.DiscardedBoxesOverlay,{deviceId:e,enabled:si}):null]}),(0,Ct.jsx)(P.GestureDetector,{gesture:hr,children:(0,Ct.jsx)(R.default.View,{style:b.default.absoluteFill})}),null===Ii||Pi?null:(0,Ct.jsx)(Oe.ZoneActiveOverlay,{zone:Ii}),'gap'===fo.state.mode?(0,Ct.jsxs)(y.default,{pointerEvents:"none",style:[b.default.absoluteFill,Vt.noRecOverlay],children:[(0,Ct.jsx)(tt.VideoOff,{size:28,color:"#9aa0a6"})," ",(0,Ct.jsx)(_.default,{style:Vt.noRecTitle,children:o('v2.theater.noRecording')}),(0,Ct.jsx)(_.default,{style:Vt.noRecHint,children:o('v2.theater.noRecordingHint')})]}):null,Dr&&Ir&&Ha.highlightBorder?(0,Ct.jsx)(y.default,{pointerEvents:"none",style:[b.default.absoluteFill,{borderWidth:Qt.highlight.thickness,borderColor:'motion'===Dr?Qt.highlight.motionColor:'audio'===Dr?Qt.highlight.audioColor:Qt.highlight.detectionColor}]}):null,vi?(0,Ct.jsx)(R.default.View,{entering:a.entering,exiting:a.exiting,style:Vt.nameTag,pointerEvents:"none",children:(0,Ct.jsxs)(H.GlassSurface,{contentStyle:Vt.nameTagRow,pointerEvents:"none",dense:!0,children:[ua&&!Zt?(0,Ct.jsx)(tt.Moon,{size:12,color:l.foreground}):(0,Ct.jsx)(st.CameraStatusDot,{deviceId:e,online:qt,disabled:Zt,size:9}),(0,Ct.jsx)(_.default,{style:[Vt.nameText,{color:l.foreground}],numberOfLines:1,children:Ut})]})}):null,(0,Ct.jsxs)(pe.OverlayFrame,{fit:Pn||bn?'contain':'cover',aspect:di,children:['off'!==hi&&Ir?(0,Ct.jsx)(ye.AudioLevelMeter,{deviceId:e,position:hi,onSetPosition:en}):null,'off'!==mi?(0,Ct.jsx)(ke.DeviceInfoOverlay,{position:mi}):null,(0,Ct.jsx)(ut.DoorbellBadge,{deviceId:e,enabled:ha&&Ir}),(0,Ct.jsx)(ct.OccupancyBadge,{deviceId:e,enabled:'off'!==Ha.occupancy&&Tr.isLive&&!Na,corner:'off'===Ha.occupancy?'bottom-left':Ha.occupancy}),(0,Ct.jsx)(wt.OverlayReadouts,{deviceId:e,config:Ha,enabled:Ir&&Tr.isLive}),'off'!==ui?(0,Ct.jsx)(ge.StreamStatsOverlay,{getStats:un,position:ui}):null,(0,Ct.jsx)(ve.LiveViewersBadge,{deviceId:e,position:Ha.viewers,enabled:Ir&&Tr.isLive})]}),(0,Ct.jsx)(se.StreamOverlayControls,{visible:vi,onRequestHide:an,paused:Lr,onTogglePause:Br,showPlayPause:An,muted:oi,onToggleMute:Fi,audio:wo.audioNotice,hasTwoWayAudio:da,talking:dn,onToggleTalk:mn,onStartSystemPip:ln,fullscreen:gi,onToggleFullscreen:Or?xr:void 0,edgePad:Pn?{left:c.left,right:Ln?0:c.right,bottom:c.bottom}:void 0,timelineToggle:Pn?{dock:Rn,onSet:Oi}:void 0,ptzToggle:Dn?{open:Si,onToggle:bi}:void 0,activity:_i}),Dn&&Si?(0,Ct.jsx)(ue.PtzOverlay,{deviceId:e,visible:vi,edgePad:{left:c.left,right:Ln?0:c.right,bottom:c.bottom},onInteract:ki}):null,Pn&&sa&&Er?(0,Ct.jsx)(ce.DriveOverlay,{deviceId:e,visible:vi,edgePad:{left:c.left,right:c.right,bottom:c.bottom},onOpenControls:Ti,drawer:{open:'overlay'===Rn,width:(0,de.drawerWidth)(Qe)}}):null,Pi?(0,Ct.jsx)(He.ZoneDrawOverlay,{zone:Ii,onConfirm:Li,onCancel:Bi}):null]})}),qr=[{id:'back',icon:tt.ArrowLeft,label:o('v2.common.back'),active:!1,onPress:()=>(0,Y.backToCameras)(r,Yi),cluster:'left'},(0,lt.timelineDockDisc)({dock:Rn,onSet:Oi,cluster:'left',t:o}),...Or||gi?[{id:'fullscreen',icon:gi?tt.Minimize2:tt.Maximize2,label:o(gi?'v2.streamBar.exitFullscreen':'v2.streamBar.fullscreen'),active:gi,onPress:xr,cluster:'right'}]:[]],Zr=xn?(0,Ct.jsxs)(y.default,{testID:Pt,style:[Vt.wallWrap,Pn&&Ln?{marginRight:(0,rt.sideTimelineWidth)(Qe)}:null,(0,Ae.wallBoxStyle)({mode:wn,wideStreamWidth:Vn.streamWidth,portraitStreamHeight:Xn.streamHeight})],children:[(0,Ct.jsx)(We.WorkspaceStage,{devices:On,primary:Rr,liveOverlaysVisible:Ir,onGoTo:Gi,onCellPanel:Vi}),Pn?(0,Ct.jsx)(he.OverlayDiscGroup,{visible:!0,holdOpen:!0,onRequestHide:xt,items:qr,edgePad:{left:c.left,right:Ln?0:c.right,bottom:c.bottom}}):null]}):null,Kr=(0,Me.fanOutPlaybackToWall)({primary:{onSeek:Po,onScrubBegin:fo.beginScrub,onScrubMove:fo.moveScrub,onScrubCommit:Do,onGoLive:Ho,onTogglePlayPause:Br,onSelectRate:Go},broadcast:ze.gridPlaybackBus.broadcast,paused:Lr}),Qr=(0,d.useCallback)(e=>{Co(),null!==e&&Kr.onSeek(e,'timeline')},[Co,Kr]);return(0,Ct.jsxs)(y.default,{style:Vt.screenRow,children:[pn&&!Pn?(0,Ct.jsx)(V.SideNavRail,{pathname:fn,compact:vn}):null,(0,Ct.jsxs)(y.default,{ref:_r,onLayout:zn,style:{flex:1,minWidth:0,backgroundColor:l.background,paddingTop:Pn?0:c.top},children:[(0,Ct.jsx)(E.StatusBar,{hidden:Pn,style:Pn||'dark'===s?'light':'dark'}),(0,Ct.jsx)(Te.TheaterTimeline,{ref:xi,navBarVisible:Nn,layoutMode:wn,railWidth:Vn.railWidth,stream:Zr??$r,onOpenClipInFrame:wo.open,onClipsChange:yo,belowStream:(0,Be.shouldShowCameraShelf)(wn)?(0,Ct.jsx)(Ee.BelowStreamArea,{width:Vn.streamWidth,currentDeviceId:e,wallShowing:xn,onGoTo:Gi,onCellPanel:Vi,onOpenPlayback:Ui}):null,deviceId:e,scopeIds:On,hideBack:bn,drawerExpanded:Wn,drawerBeside:Ln,name:Ut,onBack:()=>(0,Y.backToCameras)(r,Yi),deviceBinding:{cameraName:Ut,hasPtz:ia,hasBattery:na,hasNetworkLink:la,hasNavigation:sa,cameraJump:{onSwitchCamera:Gi,onOpenAdhocGrid:In,cameraSelection:Tn}},singleCamera:{streamBinding:xn?{quality:kn??wa,onSelectQuality:Hn}:{quality:wa,onSelectQuality:Ca},viewOptionsBinding:{highlight:xa,onSetHighlight:Ta},overlayBinding:{config:Ha,onChange:Oa},onOpenLinkedDevices:()=>{Vi('devices',e)},linkedDevicesOpen:'devices'===Zi?.kind&&Zi.deviceId===e,...xn?{}:{zone:{zoneRect:Ii,drawing:Pi,onRequestZoneDraw:Ri,onClearZone:Wi}}},mode:fo.state.mode,activeEpoch:To??(0,j.selectActiveEpoch)(fo.state),seekAnchor:fo.state.seekAnchor,onSeek:Kr.onSeek,onLeaveClipsMode:Qr,onScrubBegin:Kr.onScrubBegin,onScrubMove:Kr.onScrubMove,onScrubCommit:Kr.onScrubCommit,onGoLive:Kr.onGoLive,liveLocked:fo.state.liveLocked,onToggleLiveLock:fo.toggleLiveLock,liveCapture:xn||zo?void 0:Bo,exportSelection:xn||zo?void 0:Ao,onSnapshot:xn||zo?void 0:Mo,playbackRate:Za,paused:Lr,servedTier:Yo,onTogglePlayPause:Kr.onTogglePlayPause,loading:Ar,streamFault:Gr,scrubDirection:(0,j.selectScrubDirection)(fo.state),onJogBack:Nr,onJogForward:Jr,clipHeld:'clip'===wo.stage.kind,clipOnFrameId:'clip'===wo.stage.kind?wo.stage.clipId:null,onClipPrev:Vr,onClipNext:Ur,clipProgress:{progress:wo.progress,controls:wo.controls,...wo.seek},clipLoop:{enabled:ta,onToggle:aa},clipControls:wo.controls,clipIncomplete:wo.incompleteNotice,onStepFrame:No,onSelectRate:Kr.onSelectRate}),Nn?(0,Ct.jsx)(U.BottomNavBar,{pathname:fn,insetBottom:c.bottom}):null,(0,Ct.jsx)(Je.GridCellPanelOverlay,{panel:Zi,cameraName:Qi,hasPtz:Xi,onSelect:t=>Ji({kind:t,deviceId:Zi?.deviceId??e}),onClose:$i}),(0,Ct.jsx)(S.ClipStageView,{stage:wo.stage,playback:wo.playback,onPrev:Vr,onNext:Ur,onClose:Co})]})]})};var c=t(r[0]),u=t(r[1]),d=t(r[2]),h=t(r[3]),m=t(r[4]),g=t(r[5]),p=t(r[6]),v=t(r[7]),f=t(r[8]),S=t(r[9]),w=t(r[10]);t(r[11]);var b=l(t(r[12])),_=l(t(r[13])),y=l(t(r[14])),k=t(r[15]),C=t(r[16]),H=t(r[17]),O=t(r[18]),x=t(r[19]),T=t(r[20]),I=t(r[21]),E=t(r[22]);t(r[23]);var P=t(r[24]),D=t(r[25]),R=l(D),W=s(t(r[26])),L=s(t(r[27])),B=t(r[28]),A=t(r[29]),j=t(r[30]),M=t(r[31]),z=t(r[32]),F=t(r[33]),G=t(r[34]),N=t(r[35]),J=t(r[36]),Y=t(r[37]),V=t(r[38]),U=t(r[39]),$=t(r[40]),q=t(r[41]),Z=t(r[42]),K=t(r[43]),Q=t(r[44]),X=t(r[45]),ee=t(r[46]),te=t(r[47]),ae=t(r[48]),oe=t(r[49]),ie=t(r[50]),ne=t(r[51]),re=t(r[52]),le=t(r[53]),se=t(r[54]),ce=t(r[55]),ue=t(r[56]),de=t(r[57]),he=t(r[58]),me=t(r[59]),ge=t(r[60]),pe=t(r[61]),ve=t(r[62]),fe=t(r[63]),Se=t(r[64]),we=t(r[65]),be=t(r[66]),_e=t(r[67]),ye=t(r[68]),ke=t(r[69]),Ce=t(r[70]),He=t(r[71]),Oe=t(r[72]),xe=t(r[73]),Te=t(r[74]),Ie=t(r[75]),Ee=t(r[76]),Pe=t(r[77]),De=t(r[78]),Re=t(r[79]),We=t(r[80]),Le=t(r[81]),Be=t(r[82]),Ae=t(r[83]),je=t(r[84]),Me=t(r[85]),ze=t(r[86]),Fe=t(r[87]),Ge=t(r[88]),Ne=t(r[89]),Je=t(r[90]),Ye=t(r[91]),Ve=t(r[92]),Ue=t(r[93]),$e=t(r[94]),qe=t(r[95]),Ze=t(r[96]),Ke=t(r[97]),Qe=t(r[98]),Xe=t(r[99]),et=t(r[100]),tt=t(r[101]),at=t(r[102]),ot=t(r[103]),it=t(r[104]),nt=t(r[105]),rt=t(r[106]),lt=t(r[107]),st=t(r[108]),ct=t(r[109]),ut=t(r[110]),dt=t(r[111]),ht=t(r[112]),mt=t(r[113]),gt=t(r[114]),pt=t(r[115]),vt=t(r[116]),ft=t(r[117]),St=t(r[118]),wt=t(r[119]),bt=t(r[120]),_t=t(r[121]),yt=t(r[122]),kt=t(r[123]),Ct=t(r[124]);const Ht={failed:!1,fetching:!1,reason:null,onRetry:()=>{}};function Ot(e,t,a){return null===e||e.wall!==t?t?'pictureToWall':'wallToPicture':t&&e.mode!==a?'wallReshaped':null}const xt=()=>{},Tt=.5,It=2.5;function Et(e){const t=(0,c.c)(19),{t:a}=(0,x.useTranslation)(),{data:o}=(0,Xe.useCameras)();let i;t[0]!==o?(i=void 0===o?[]:o,t[0]=o,t[1]=i):i=t[1];const n=i;let r;if(t[2]!==n||t[3]!==e){let a;t[5]!==e?(a=t=>t.id===e,t[5]=e,t[6]=a):a=t[6],r=n.find(a),t[2]=n,t[3]=e,t[4]=r}else r=t[4];const l=r;let s,u;t[7]!==l?.name||t[8]!==e||t[9]!==a?(s=l?.name??a("v2.cameraDetail.fallbackName",{id:e}),t[7]=l?.name,t[8]=e,t[9]=a,t[10]=s):s=t[10],t[11]!==l?.features?(u=l?.features??[],t[11]=l?.features,t[12]=u):u=t[12];const d=l?.online??!1,h=l?.disabled??!1,m=void 0!==l;let g;return t[13]!==s||t[14]!==u||t[15]!==d||t[16]!==h||t[17]!==m?(g={name:s,features:u,online:d,disabled:h,known:m},t[13]=s,t[14]=u,t[15]=d,t[16]=h,t[17]=m,t[18]=g):g=t[18],g}const Pt='wall-stage',Dt=[],Rt={code:"function CameraDetailScreenTsx1(scale){const{fill,winHeight,isWideDetail,wideStreamH,pinchExpandsHeight,defaultHeight,growBoxHeight,maxHeight,HEIGHT_GROW_SCALE}=this.__closure;if(fill)return winHeight;if(isWideDetail)return wideStreamH;if(!pinchExpandsHeight)return defaultHeight;return growBoxHeight(scale,{rest:defaultHeight,max:maxHeight,growScale:HEIGHT_GROW_SCALE});}"},Wt={code:"function CameraDetailScreenTsx2(){const{runOnJS,onToggleControls}=this.__closure;runOnJS(onToggleControls)();}"},Lt={code:"function CameraDetailScreenTsx3(e){const{zoom}=this.__closure;zoom.doubleTapZoomAt(e.x,e.y);}"},Bt={code:"function CameraDetailScreenTsx4(e){const{shouldGoBackOnSwipe,zoom,runOnJS,onSwipeBack}=this.__closure;if(shouldGoBackOnSwipe({translationY:e.translationY,velocityY:e.velocityY,zoomScale:zoom.scale.value})){runOnJS(onSwipeBack)();}}"},At={code:"function CameraDetailScreenTsx5(e){const{shouldOpenOverlayOnSwipe,zoom,runOnJS,onSwipeToOverlay}=this.__closure;if(shouldOpenOverlayOnSwipe({translationY:e.translationY,velocityY:e.velocityY,zoomScale:zoom.scale.value})){runOnJS(onSwipeToOverlay)();}}"},jt={code:"function CameraDetailScreenTsx6(){const{zoomBoxHeightFor,zoom}=this.__closure;return zoomBoxHeightFor(zoom.scale.value);}"},Mt={code:"function CameraDetailScreenTsx7(){const{liveBoxHeight}=this.__closure;return liveBoxHeight.value;}"},zt={code:"function CameraDetailScreenTsx8(h,prev){const{zoomTraceOn,traceBox}=this.__closure;if(zoomTraceOn&&prev!==null&&h!==prev)traceBox(h);}"},Ft={code:"function CameraDetailScreenTsx9(){const{liveBoxHeight}=this.__closure;return{height:liveBoxHeight.value};}"},Gt={code:"function CameraDetailScreenTsx10(){const{fill,sideProgress,sideReserve}=this.__closure;return{right:fill?sideProgress.get()*sideReserve:0};}"},Nt={code:"function CameraDetailScreenTsx11(){const{fill,winWidth,sideProgress,sideReserve,winHeight,isWideDetail,wideStreamW,wideStreamH,defaultHeight}=this.__closure;if(fill){return{position:'absolute',top:0,left:0,width:winWidth-sideProgress.get()*sideReserve,height:winHeight};}if(isWideDetail){return{position:'absolute',top:0,left:0,width:wideStreamW,height:wideStreamH};}return{position:'absolute',top:0,left:0,width:winWidth,height:defaultHeight};}"};const Jt=960;function Yt(e){const t=(0,c.c)(9),{deviceId:a,fill:o,enabled:i}=e,n=(0,Ke.useSnapshot)(a,i,Jt);let r;t[0]!==n.uri?(r=null===n.uri?(0,Ct.jsx)(C.SkeletonBox,{}):null,t[0]=n.uri,t[1]=r):r=t[1];const l=o?"contain":"cover";let s,u;return t[2]!==a||t[3]!==n||t[4]!==l?(s=(0,Ct.jsx)(Qe.SnapshotImage,{source:n,deviceId:a,style:b.default.absoluteFill,contentFit:l}),t[2]=a,t[3]=n,t[4]=l,t[5]=s):s=t[5],t[6]!==r||t[7]!==s?(u=(0,Ct.jsxs)(y.default,{style:Vt.poster,children:[r,s]}),t[6]=r,t[7]=s,t[8]=u):u=t[8],u}const Vt=b.default.create({screenRow:{flex:1,flexDirection:'row'},videoWrap:{position:'relative',width:'100%',overflow:'hidden',backgroundColor:'#000'},wallWrap:{overflow:'hidden'},videoWrapFull:{...b.default.absoluteFill,backgroundColor:'#000'},videoContent:{flex:1,overflow:'hidden'},disabledStage:{flex:1,alignItems:'center',justifyContent:'center',gap:4,backgroundColor:'#000'},disabledTitle:{color:'#e8eaed',fontSize:15,fontWeight:'700'},disabledHint:{color:'#9aa0a6',fontSize:12},noRecOverlay:{alignItems:'center',justifyContent:'center',gap:6,backgroundColor:'rgba(0,0,0,0.55)'},noRecTitle:{color:'#e8eaed',fontSize:15,fontWeight:'600'},noRecHint:{color:'#9aa0a6',fontSize:12},poster:{flex:1,backgroundColor:'#000'},nameTag:{position:'absolute',top:8,left:8,maxWidth:'70%'},nameTagRow:{flexDirection:'row',alignItems:'center',gap:6,paddingHorizontal:10,paddingVertical:5},nameText:{fontSize:13,fontWeight:'600'}})},1155,[787,1156,16,1157,1165,1211,1158,1159,1166,1167,1212,109,32,193,114,973,839,884,1004,817,788,273,1213,1214,1215,1129,1216,1217,1168,1169,991,1170,1218,999,1151,1171,1172,1219,792,793,795,789,1140,1173,1220,1221,1175,1178,879,993,1005,1222,1181,1150,1182,1183,1185,1223,1152,1224,1225,1226,1227,1187,1228,1229,1230,1231,1232,1233,834,1188,1189,1234,990,1235,1190,823,1236,822,1200,1193,1198,1202,1199,1203,1237,1238,1191,1204,1239,1137,1240,1205,995,1206,790,838,848,827,1207,837,840,833,847,1130,1241,1153,850,852,1208,1242,1243,1244,1197,1245,1061,1074,1246,1210,1247,832,1142,1141,10]);
|
|
3
|
+
__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.shouldAssertClip=function(n){return null!==n.heldClipId&&(!!n.playerPresent&&('connecting'!==n.playerState&&'error'!==n.playerState&&n.assertedClipId!==n.heldClipId))},e.assertionAfterPlayerChange=function(n,t,l){return t?'connecting'===l||'error'===l?null:n:null}},1156,[]);
|
|
4
|
+
__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.useClipStage=function(M,P){const _=(0,l.c)(65),h=void 0!==P&&P,[E,R]=(0,t.useState)(n.initialClipStage),L=(0,t.useRef)(null),O=(0,t.useRef)(null),T=(0,u.useClipPlayback)(),[w,A]=(0,t.useState)(null),[N,B]=(0,t.useState)(null),[D,H]=(0,t.useState)(null),[Y,j]=(0,t.useState)(null),[F,G]=(0,t.useState)(null),[U,q]=(0,t.useState)(null);let x;_[0]!==T||_[1]!==M||_[2]!==E?(x=(l,t)=>{Z.current=t,G(n=>null!==n&&n.deviceId===l.deviceId&&n.provider===t?n:{deviceId:l.deviceId,provider:t}),O.current=(0,p.reduceClipLoop)(O.current,{kind:"opened"}).memo;const o=(0,n.clipStageAttach)(E,l);if((0,c.noteClipOpenStep)("stage",{deviceId:l.deviceId,clipId:l.clipId,attached:o.kind,holds:(0,n.stageHoldsClip)(o),playback:l.playback.kind,...!1===l.playable?{refusedBy:"provider"}:{}}),R(o),(0,n.stageHoldsClip)(o)){if("clip"===o.kind)switch(A(null),j(null),l.playback.kind){case"native":return(0,c.noteClipOpenStep)("dispatch",{deviceId:l.deviceId,clipId:l.playback.clipId,provider:t,profile:o.profile??null}),q(l=>(0,s.reduceClipLoading)(l,{kind:"opened",clipId:o.clipId})),L.current={fileClipId:l.playback.clipId,provider:t,...null===o.profile?{}:{profile:o.profile}},void(M.playClip(l.playback.clipId,t,0,o.profile??void 0)&&M.noteAsserted(o.clipId));case"recorded":return void R(n.initialClipStage)}}else T.refuse(l.clipId,l.unplayableReason??null)},_[0]=T,_[1]=M,_[2]=E,_[3]=x):x=_[3];const z=x;let J;_[4]!==T?(J=()=>{O.current=(0,p.reduceClipLoop)(O.current,{kind:"closed"}).memo,R(b),A(null),q(y),T.close()},_[4]=T,_[5]=J):J=_[5];const K=J;let Q;_[6]!==M?(Q=()=>{const l=L.current;null!==l&&M.playClip(l.fileClipId,l.provider,0,l.profile)},_[6]=M,_[7]=Q):Q=_[7];const V=Q;let W;_[8]!==h||_[9]!==V||_[10]!==E.clipId||_[11]!==E.kind?(W=l=>{if(q(t=>(0,s.reduceClipLoading)(t,{kind:"player",state:l})),"clip"!==E.kind)return;const t=(0,p.reduceClipLoop)(O.current,{kind:"player",state:l,clipId:E.clipId,loop:h});O.current=t.memo,t.replay&&V()},_[8]=h,_[9]=V,_[10]=E.clipId,_[11]=E.kind,_[12]=W):W=_[12];const X=W,Z=(0,t.useRef)(null);let $;_[13]!==z||_[14]!==E.clipId||_[15]!==E.kind?($=(l,t)=>{if("clip"!==E.kind)return;const o=Z.current;if(null===o)return;const c=(0,n.clipStageStep)(l,E.clipId,t);null!==c&&z(c,o)},_[13]=z,_[14]=E.clipId,_[15]=E.kind,_[16]=$):$=_[16];const ee=$;let le;_[17]!==E?(le=l=>{const t=(0,o.routePlayerPosition)(E,l);switch(t.kind){case"session":return!1;case"clip":return A(t.positionMs),!0;case"dropped":return(0,c.noteTimelineInputIgnored)("positionEpochOnClip"),!0}},_[17]=E,_[18]=le):le=_[18];const ie=le;let te;_[19]===Symbol.for("react.memo_cache_sentinel")?(te=l=>{B(l)},_[19]=te):te=_[19];const ne=te;let re;_[20]===Symbol.for("react.memo_cache_sentinel")?(re=l=>{H(l)},_[20]=re):re=_[20];const oe=re;let ce;_[21]===Symbol.for("react.memo_cache_sentinel")?(ce=l=>{j(l)},_[21]=ce):ce=_[21];const de=ce,se=(0,S.useClipPlaybackOptions)(F?.deviceId??null,F?.provider??null),pe=(0,t.useRef)(null),ue="clip"===E.kind;let ae;_[22]!==ue||_[23]!==M?(ae=()=>{if(!ue)return void(0,c.noteTimelineInputIgnored)("clipSeekNoClip");const l=(0,I.generateDragId)();pe.current={id:l,lastEmitMs:0},M.scrubStart(l)},_[22]=ue,_[23]=M,_[24]=ae):ae=_[24];const Ie=ae;let ke;_[25]!==M?(ke=l=>{const t=pe.current;if(null===t)return;const n=Date.now();(0,f.shouldEmitScrubSample)(t.lastEmitMs,n,f.PLAYER_SCRUB_EMIT_MS)&&(pe.current={id:t.id,lastEmitMs:n},M.scrubTo(l))},_[25]=M,_[26]=ke):ke=_[26];const Se=ke;let fe;_[27]!==se||_[28]!==ue||_[29]!==M||_[30]!==w?(fe=l=>{if(!ue)return pe.current=null,void(0,c.noteTimelineInputIgnored)("clipSeekNoClip");if(!(0,k.clipSeekAllowed)(se.controls,l,w??0))return pe.current=null,(0,c.noteTimelineInputIgnored)("clipSeekBackwardOnForwardOnly"),void A(w);const t=pe.current?.id;pe.current=null,j(null),M.scrubCommit(l,t),A(l)},_[27]=se,_[28]=ue,_[29]=M,_[30]=w,_[31]=fe):fe=_[31];const me=fe;let ve;_[32]!==N||_[33]!==w||_[34]!==E.clipId||_[35]!==E.endMs||_[36]!==E.inProgress||_[37]!==E.kind||_[38]!==E.startMs?(ve="clip"===E.kind?(0,o.resolveClipProgress)(w,(0,o.resolveClipDuration)({measuredMs:null!==N&&N.clipId===E.clipId?N.durationMs:null,startMs:E.startMs,endMs:E.endMs,inProgress:E.inProgress})):o.EMPTY_CLIP_PROGRESS,_[32]=N,_[33]=w,_[34]=E.clipId,_[35]=E.endMs,_[36]=E.inProgress,_[37]=E.kind,_[38]=E.startMs,_[39]=ve):ve=_[39];const Ce=ve,ge=T.state;let ye;_[40]!==Ie||_[41]!==me||_[42]!==Se?(ye={onSeekBegin:Ie,onSeekMove:Se,onSeekCommit:me},_[40]=Ie,_[41]=me,_[42]=Se,_[43]=ye):ye=_[43];const be="clip"===E.kind?E.clipId:null;let Me;_[44]!==Y||_[45]!==be?(Me=(0,C.resolveClipIncompleteNotice)(be,Y),_[44]=Y,_[45]=be,_[46]=Me):Me=_[46];const Pe="clip"===E.kind?E.clipId:null;let _e;_[47]!==D||_[48]!==Pe?(_e=(0,v.resolveClipAudioNotice)(Pe,D),_[47]=D,_[48]=Pe,_[49]=_e):_e=_[49];const he="clip"===E.kind&&U===E.clipId;let Ee;_[50]!==T.state||_[51]!==K||_[52]!==se||_[53]!==z||_[54]!==Ce||_[55]!==V||_[56]!==X||_[57]!==ie||_[58]!==E||_[59]!==ee||_[60]!==ye||_[61]!==Me||_[62]!==_e||_[63]!==he?(Ee={stage:E,playback:ge,open:z,replay:V,step:ee,close:K,progress:Ce,seek:ye,controls:se,reportPosition:ie,reportDuration:ne,reportAudio:oe,reportIncomplete:de,incompleteNotice:Me,audioNotice:_e,loading:he,reportPlayerState:X},_[50]=T.state,_[51]=K,_[52]=se,_[53]=z,_[54]=Ce,_[55]=V,_[56]=X,_[57]=ie,_[58]=E,_[59]=ee,_[60]=ye,_[61]=Me,_[62]=_e,_[63]=he,_[64]=Ee):Ee=_[64];return Ee};var l=r(d[0]),t=r(d[1]),n=r(d[2]),o=r(d[3]),c=r(d[4]),s=r(d[5]),p=r(d[6]),u=r(d[7]),I=r(d[8]),k=r(d[9]),S=r(d[10]),f=r(d[11]),v=r(d[12]),C=r(d[13]);function y(l){return(0,s.reduceClipLoading)(l,{kind:"closed"})}function b(l){return(0,n.clipStageClose)(l)}},1157,[787,16,1158,1248,1211,1159,1160,1161,1249,1250,1162,1251,1163,1164]);
|
|
5
|
+
__d(function(g,r,_i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.resolveClipLoop=o,Object.defineProperty(e,"initialClipStage",{enumerable:!0,get:function(){return t}}),e.stageHoldsClip=function(n){return'clip'===n.kind},e.clipStageAttach=function(t,l){if(!(0,i.isPlayable)(l))return{kind:'refused',clipId:l.clipId,reason:l.unplayableReason??null};const s=o(l);return{kind:'clip',clipId:l.clipId,deviceId:l.deviceId,profile:(0,n.cheapestClipProfile)(l),loop:s.loop,loopReason:s.reason,startMs:l.startMs,endMs:l.endMs,inProgress:!0===l.inProgress}},e.clipStageClose=function(n){return t},e.clipStageStep=function(n,o,t){const l=n.findIndex(n=>n.clipId===o);if(l<0)return null;for(let o=l+t;o>=0&&o<n.length;o+=t){const t=n[o];if(void 0!==t&&(0,i.isPlayable)(t))return t}return null},e.clipSheetShows=function(n){return'refused'===n.kind};var n=r(d[0]),i=r(d[1]);function o(n){return!0===n.inProgress?{loop:!1,reason:'in-progress'}:{loop:!0,reason:'closed'}}const t={kind:'session'}},1158,[1252,1253]);
|
|
6
|
+
__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.resolvePauseAuthority=function(t){return t.clipHeld?'rate':'live'===t.mode?'live-hold':'rate'},e.planClipExit=function(t){switch(t){case'live':return{closeStage:!0,goLive:!0};case'list':return{closeStage:!1,goLive:!1}}},e.reduceClipLoading=function(t,l){switch(l.kind){case'opened':return l.clipId;case'closed':return null;case'player':return'loading'===l.state?t:null}},e.shouldEndLiveCapture=function(t){return'live'!==t.mode||t.clipHeld}},1159,[]);
|
|
7
|
+
__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.reduceClipLoop=function(l,c){switch(c.kind){case'opened':case'closed':return o;case'player':return'ended'!==c.state?o:c.loop?l===c.clipId?{memo:l,replay:!1}:{memo:c.clipId,replay:!0}:{memo:l,replay:!1}}};const o={memo:null,replay:!1}},1160,[]);
|
|
8
|
+
__d(function(g,r,i,a,m,_e,d){"use strict";Object.defineProperty(_e,'__esModule',{value:!0}),_e.useClipPlayback=function(){const{controller:c}=(0,l.useConnection)(),[p,u]=(0,e.useState)({kind:'idle'}),k=(0,e.useCallback)((e,l,p)=>{u({kind:'resolving',clipId:l}),(async()=>{const k=Date.now();try{const y=c.getSystem();if(!y)throw new Error('not connected');const f=s(await(0,n.capQuery)(y.trpcClient,'videoclips','getClipPlayback',{deviceId:e,clipId:l,...null!==p?{profile:p}:{}},{rethrow:!0}),p);if(null===f)return(0,t.noteClipPlayback)({deviceId:e,ok:!1,served:null,ms:Date.now()-k}),o.log.warn('clips','clip playback resolved to nothing playable',{deviceId:e,clipId:l}),void u({kind:'failed',clipId:l,reason:null});(0,t.noteClipPlayback)({deviceId:e,ok:!0,served:null===f.mismatch?f.format:`${f.format}:swapped`,ms:Date.now()-k}),u({kind:'ready',clipId:l,playback:f})}catch(n){const c=n instanceof Error?n.message:String(n);(0,t.noteClipPlayback)({deviceId:e,ok:!1,served:null,ms:Date.now()-k}),o.log.warn('clips','clip playback resolve failed',{deviceId:e,clipId:l,error:c}),u({kind:'failed',clipId:l,reason:c})}})()},[c]),y=(0,e.useCallback)((e,l)=>{u({kind:'ready',clipId:e,playback:{playbackUrl:l,format:'mp4',mismatch:null}})},[]),f=(0,e.useCallback)((e,l)=>{u({kind:'failed',clipId:e,reason:l})},[]),b=(0,e.useCallback)(()=>u({kind:'idle'}),[]);return{state:p,open:k,openUrl:y,refuse:f,close:b}};var e=r(d[0]),l=r(d[1]),n=r(d[2]),c=r(d[3]),t=r(d[4]),o=r(d[5]);function s(e,l){if(!(0,n.isRecord)(e))return null;const{playbackUrl:t,format:o,served:s}=e;return'string'!=typeof t||0===t.length?null:{playbackUrl:t,format:'string'==typeof o&&o.length>0?o:'mp4',mismatch:(0,c.clipServedMismatch)(l,'string'==typeof s?s:null)}}},1161,[16,818,883,1252,1211,999]);
|
|
9
|
+
__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.clipPlaybackOptionsKey=p,e.classifyClipPlaybackOptions=y,e.useClipPlaybackOptions=function(C,b){const v=(0,t.c)(8),{controller:O,state:k}=(0,s.useConnection)(),f=null!==C&&Number.isFinite(C)&&null!==b&&b.length>0&&"connected"===k;let _;v[0]!==O||v[1]!==C||v[2]!==b?(_=async()=>{const t=O.getSystem();if(!t)throw new Error("not connected");const n=await(0,o.capQuery)(t.trpcClient,"videoclips","getPlaybackOptions",{deviceId:C,provider:b},{rethrow:!0});return(0,u.parseClipPlaybackOptions)(n)},v[0]=O,v[1]=C,v[2]=b,v[3]=_):_=v[3];const E=(0,n.useQuery)({queryKey:p(C??-1,b??""),enabled:f,staleTime:l.RECONCILE_MS,refetchInterval:l.RECONCILE_MS,queryFn:_}),P=y({asked:f,status:E.status,options:E.data}),w=E.data??null;let I;v[4]!==f||v[5]!==w||v[6]!==P?(I=f?(0,c.resolveClipControls)(P,w):c.LEGACY_CONTROLS_VIEW,v[4]=f,v[5]=w,v[6]=P,v[7]=I):I=v[7];return I};var t=r(d[0]);r(d[1]);var n=r(d[2]),s=r(d[3]),o=r(d[4]),l=r(d[5]),c=r(d[6]),u=r(d[7]);function p(t,n){return['v2','clip-playback-options',t,n]}function y(t){return t.asked?'pending'===t.status?'pending':'error'===t.status?'unknown':null===t.options||void 0===t.options?'absent':'present':'absent'}},1162,[787,16,853,818,883,854,1250,1254]);
|
|
10
|
+
__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.resolveClipAudioNotice=function(n,l){if(null===n||null===l)return null;if(l.clipId!==n)return null;if(l.carried)return null;if('rate'!==l.reason)return null;const{rate:u}=l;return'number'!=typeof u||!Number.isFinite(u)||u<=0||1===u?null:{kind:'silent-by-speed',rate:u}}},1163,[]);
|
|
11
|
+
__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.resolveClipIncompleteNotice=function(n,l){return null===l||l.clipId!==n||0===l.reason.trim().length?null:{kind:l.code,reason:l.reason}}},1164,[]);
|
|
12
|
+
__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.clipStartOnFrame=function(n,t){if('clip'!==t.kind)return null;const l=n.find(n=>n.clipId===t.clipId);return l?.startMs??null}},1165,[]);
|
|
13
|
+
__d(function(g,r,_i,_a,m,e,d){"use strict";function t(t,n){if(t===n)return!0;if(t.length!==n.length)return!1;for(let i=0;i<t.length;i++)if(t[i]?.clipId!==n[i]?.clipId)return!1;return!0}Object.defineProperty(e,'__esModule',{value:!0}),e.sameClipList=t,e.adoptClipList=function(n,i){return t(n,i)?n:i}},1166,[]);
|
|
14
|
+
__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,"CLIP_STAGE_TEST_ID",{enumerable:!0,get:function(){return j}}),_e.ClipStageView=function(e){const S=(0,l.c)(102),{stage:M,playback:P,onPrev:R,onNext:w,onClose:_}=e,{t:z}=(0,p.useTranslation)(),{colors:L}=(0,v.useTheme)(),{controller:T,state:E}=(0,f.useConnection)(),{token:D}=(0,k.useServer)();let F;S[0]!==E||S[1]!==T?(F="connected"===E?T.getSystem()?.serverUrl??null:null,S[0]=E,S[1]=T,S[2]=F):F=S[2];const U=F;let A;S[3]!==D?(A=D?{Authorization:`Bearer ${D}`}:void 0,S[3]=D,S[4]=A):A=S[4];const B=A;let N;e:{if("ready"!==P.kind){N=null;break e}let e;S[5]!==P.playback.playbackUrl||S[6]!==U?(e=(0,y.absoluteMediaPath)(U,P.playback.playbackUrl),S[5]=P.playback.playbackUrl,S[6]=U,S[7]=e):e=S[7],N=e}const O=N;let q;S[8]!==M.clipId||S[9]!==M.deviceId||S[10]!==M.kind?(q=e=>{h.log.warn("clips","clip stage playback failed",{deviceId:"clip"===M.kind?M.deviceId:null,clipId:"clip"===M.kind?M.clipId:null,error:String(e)})},S[8]=M.clipId,S[9]=M.deviceId,S[10]=M.kind,S[11]=q):q=S[11];const G=q;if(!(0,x.clipSheetShows)(M))return null;let V;S[12]!==P.kind||S[13]!==P.reason||S[14]!==M.kind||S[15]!==M.reason||S[16]!==z?(V="refused"===M.kind?M.reason??z("v2.clips.playFailed"):"failed"===P.kind?P.reason??z("v2.clips.playFailed"):"resolving"===P.kind?z("v2.clips.loading"):null,S[12]=P.kind,S[13]=P.reason,S[14]=M.kind,S[15]=M.reason,S[16]=z,S[17]=V):V=S[17];const X=V;let $,H,J,K;S[18]!==L.background?($=[t.default.absoluteFill,I.stage,{backgroundColor:L.background}],S[18]=L.background,S[19]=$):$=S[19];S[20]!==B||S[21]!==G||S[22]!==M.kind||S[23]!==M.loop||S[24]!==O?(H=null!==O&&"clip"===M.kind?(0,C.jsx)(u.default,{source:void 0===B?{uri:O}:{uri:O,headers:B},style:t.default.absoluteFill,resizeMode:"contain",controls:!0,paused:!1,repeat:M.loop,onError:G}):null,S[20]=B,S[21]=G,S[22]=M.kind,S[23]=M.loop,S[24]=O,S[25]=H):H=S[25];S[26]!==L.foregroundMuted||S[27]!==X?(J=null!==X?(0,C.jsx)(c.default,{style:I.noticeBox,children:(0,C.jsx)(s.default,{style:[I.notice,{color:L.foregroundMuted}],children:X})}):null,S[26]=L.foregroundMuted,S[27]=X,S[28]=J):J=S[28];S[29]!==z?(K=z("v2.clips.closeClip"),S[29]=z,S[30]=K):K=S[30];const Q=L.background+"CC";let W,Y,Z,ee,le,oe;S[31]!==Q?(W=[I.btn,{backgroundColor:Q}],S[31]=Q,S[32]=W):W=S[32];S[33]!==L.foreground?(Y=(0,C.jsx)(b.X,{size:14,color:L.foreground}),S[33]=L.foreground,S[34]=Y):Y=S[34];S[35]!==_||S[36]!==W||S[37]!==Y||S[38]!==K?(Z=(0,C.jsx)(n.default,{accessibilityRole:"button",accessibilityLabel:K,onPress:_,hitSlop:8,style:W,children:Y}),S[35]=_,S[36]=W,S[37]=Y,S[38]=K,S[39]=Z):Z=S[39];S[40]!==L.foregroundMuted||S[41]!==M.inProgress||S[42]!==M.kind||S[43]!==z?(ee="clip"===M.kind&&M.inProgress?(0,C.jsx)(s.default,{style:[I.badge,{color:L.foregroundMuted}],children:z("v2.clips.stillRecordingNoLoop")}):null,S[40]=L.foregroundMuted,S[41]=M.inProgress,S[42]=M.kind,S[43]=z,S[44]=ee):ee=S[44];S[45]!==L.foregroundMuted||S[46]!==P.kind||S[47]!==P.playback||S[48]!==z?(le="ready"===P.kind&&null!==P.playback.mismatch?(0,C.jsx)(s.default,{style:[I.badge,{color:L.foregroundMuted}],children:z("v2.clips.servedInstead",{asked:P.playback.mismatch.asked,served:P.playback.mismatch.served})}):null,S[45]=L.foregroundMuted,S[46]=P.kind,S[47]=P.playback,S[48]=z,S[49]=le):le=S[49];S[50]!==Z||S[51]!==ee||S[52]!==le?(oe=(0,C.jsxs)(c.default,{style:I.topRow,pointerEvents:"box-none",children:[Z,ee,le]}),S[50]=Z,S[51]=ee,S[52]=le,S[53]=oe):oe=S[53];const ne=null===R;let te,ie;S[54]!==ne?(te={disabled:ne},S[54]=ne,S[55]=te):te=S[55];S[56]!==z?(ie=z("v2.clips.previousClip"),S[56]=z,S[57]=ie):ie=S[57];const re=null===R;let se;S[58]!==R?(se=()=>R?.(),S[58]=R,S[59]=se):se=S[59];const de=L.background+"CC",ae=null===R?.35:1;let ce,ue,pe;S[60]!==de||S[61]!==ae?(ce=[I.btn,{backgroundColor:de,opacity:ae}],S[60]=de,S[61]=ae,S[62]=ce):ce=S[62];S[63]!==L.foreground?(ue=(0,C.jsx)(b.ChevronLeft,{size:16,color:L.foreground}),S[63]=L.foreground,S[64]=ue):ue=S[64];S[65]!==te||S[66]!==ie||S[67]!==re||S[68]!==se||S[69]!==ce||S[70]!==ue?(pe=(0,C.jsx)(n.default,{accessibilityRole:"button",accessibilityState:te,accessibilityLabel:ie,disabled:re,onPress:se,hitSlop:8,style:ce,children:ue}),S[65]=te,S[66]=ie,S[67]=re,S[68]=se,S[69]=ce,S[70]=ue,S[71]=pe):pe=S[71];const be=null===w;let ge,fe;S[72]!==be?(ge={disabled:be},S[72]=be,S[73]=ge):ge=S[73];S[74]!==z?(fe=z("v2.clips.nextClip"),S[74]=z,S[75]=fe):fe=S[75];const ke=null===w;let ye;S[76]!==w?(ye=()=>w?.(),S[76]=w,S[77]=ye):ye=S[77];const ve=L.background+"CC",he=null===w?.35:1;let xe,Ce,je,Ie,Se,me;S[78]!==ve||S[79]!==he?(xe=[I.btn,{backgroundColor:ve,opacity:he}],S[78]=ve,S[79]=he,S[80]=xe):xe=S[80];S[81]!==L.foreground?(Ce=(0,C.jsx)(b.ChevronRight,{size:16,color:L.foreground}),S[81]=L.foreground,S[82]=Ce):Ce=S[82];S[83]!==ge||S[84]!==fe||S[85]!==ke||S[86]!==ye||S[87]!==xe||S[88]!==Ce?(je=(0,C.jsx)(n.default,{accessibilityRole:"button",accessibilityState:ge,accessibilityLabel:fe,disabled:ke,onPress:ye,hitSlop:8,style:xe,children:Ce}),S[83]=ge,S[84]=fe,S[85]=ke,S[86]=ye,S[87]=xe,S[88]=Ce,S[89]=je):je=S[89];S[90]!==pe||S[91]!==je?(Ie=(0,C.jsxs)(c.default,{style:I.navRow,pointerEvents:"box-none",children:[pe,je]}),S[90]=pe,S[91]=je,S[92]=Ie):Ie=S[92];S[93]!==oe||S[94]!==Ie||S[95]!==$||S[96]!==H||S[97]!==J?(Se=(0,C.jsxs)(c.default,{testID:j,style:$,children:[H,J,oe,Ie]}),S[93]=oe,S[94]=Ie,S[95]=$,S[96]=H,S[97]=J,S[98]=Se):Se=S[98];S[99]!==_||S[100]!==Se?(me=(0,C.jsx)(o.default,{visible:!0,animationType:"slide",transparent:!1,onRequestClose:_,children:Se}),S[99]=_,S[100]=Se,S[101]=me):me=S[101];return me};var l=r(d[0]);r(d[1]);var o=e(r(d[2])),n=e(r(d[3])),t=e(r(d[4])),s=e(r(d[5])),c=e(r(d[6])),u=e(r(d[7])),p=r(d[8]),b=r(d[9]),f=r(d[10]),k=r(d[11]),y=r(d[12]),v=r(d[13]),h=r(d[14]),x=r(d[15]),C=r(d[16]);const j='clip-stage';const I=t.default.create({stage:{justifyContent:'center',zIndex:60},noticeBox:{alignItems:'center',justifyContent:'center',padding:16},notice:{fontSize:13,textAlign:'center'},topRow:{position:'absolute',top:8,left:8,right:8,flexDirection:'row',alignItems:'center',gap:8},navRow:{position:'absolute',bottom:8,left:8,flexDirection:'row',gap:8},btn:{padding:6,borderRadius:14},badge:{fontSize:11}})},1167,[787,16,240,247,32,193,114,1255,817,837,818,987,1019,789,999,1158,10]);
|
|
15
|
+
__d(function(g,r,i,a,m,_e,d){"use strict";Object.defineProperty(_e,'__esModule',{value:!0}),_e.decideWebFullscreenMode=t,_e.webFullscreenButtonShown=function(e){return'hidden'!==e},_e.usesBrowserFullscreen=l,_e.isWebFullscreenSupported=c,_e.createWebFullscreenController=s,_e.useWebFullscreen=function(){const o=(0,e.c)(14),t=(0,n.useRef)(null),[c,u]=(0,n.useState)(!1),[f]=(0,n.useState)(h);let p;e:{if("undefined"==typeof document){p=null;break e}let e;o[0]!==f?(e=s({doc:document,orientation:"undefined"!=typeof screen?screen.orientation??null:null,mode:f,warn:k}),o[0]=f,o[1]=e):e=o[1],p=e}const w=p;let v,b,F;o[2]!==w?(v=()=>{if(null===w)return;const e=()=>{u(null!==document.fullscreenElement),w.onFullscreenChange()};return document.addEventListener("fullscreenchange",e),()=>document.removeEventListener("fullscreenchange",e)},b=[w],o[2]=w,o[3]=v,o[4]=b):(v=o[3],b=o[4]);(0,n.useEffect)(v,b),o[5]!==w?(F=()=>{const e=t.current;w?.toggle(e)},o[5]=w,o[6]=F):F=o[6];const E=F;let y,P;o[7]!==f?(y=l(f),o[7]=f,o[8]=y):y=o[8];o[9]!==c||o[10]!==f||o[11]!==y||o[12]!==E?(P={ref:t,isFullscreen:c,mode:f,supported:y,toggle:E},o[9]=c,o[10]=f,o[11]=y,o[12]=E,o[13]=P):P=o[13];return P};var e=r(d[0]),n=r(d[1]);r(d[2]);var o=r(d[3]);function t(e){return e.coarsePointer?e.fullscreenEnabled?e.orientationLock?{mode:'lock-landscape',reason:'touch device: fullscreen + landscape lock'}:{mode:'hidden',reason:'touch device that cannot lock landscape (no screen.orientation.lock)'}:{mode:'hidden',reason:'touch device without the fullscreen API (iPhone Safari / iOS PWA)'}:e.fullscreenEnabled?{mode:'plain',reason:'desktop: fullscreen without an orientation lock'}:{mode:'app-fill',reason:'desktop without the fullscreen API: the app fill layout'}}function l(e){return'lock-landscape'===e||'plain'===e}function c(e){return!0===e?.fullscreenEnabled}function u(e){return e instanceof Error?e.message:String(e)}function s(e){const{doc:n,orientation:o,mode:t,warn:l}=e;let c=!1;const s=()=>{if(c){c=!1;try{o?.unlock?.()}catch(e){l('orientation unlock refused',{error:u(e)})}}},f=()=>{'lock-landscape'===t&&void 0!==o?.lock&&o.lock('landscape').then(()=>{c=!0},e=>l('orientation lock refused',{error:u(e)}))};return{toggle:e=>{if(null!==n.fullscreenElement)return s(),void n.exitFullscreen().catch(e=>l('exit refused',{error:u(e)}));null!==e&&void 0!==e.requestFullscreen&&e.requestFullscreen().then(f,e=>l('request refused',{error:u(e)}))},onFullscreenChange:()=>{null===n.fullscreenElement&&s()}}}function f(){const e='undefined'!=typeof document,n='undefined'!=typeof screen?screen.orientation:void 0,o='undefined'!=typeof window&&'function'==typeof window.matchMedia&&window.matchMedia('(pointer: coarse)').matches;return{fullscreenEnabled:e&&c(document),orientationLock:'function'==typeof n?.lock,coarsePointer:o}}let p=null;function h(){const e=f(),n=t(e);return p!==n.mode&&(p=n.mode,o.log.info('fullscreen',`web mode: ${n.mode}`,{reason:n.reason,...e})),n.mode}function k(e,n){return o.log.warn("fullscreen",e,n)}},1168,[787,16,109,999]);
|
|
16
|
+
__d(function(g,r,i,a,m,_e,_d){"use strict";Object.defineProperty(_e,'__esModule',{value:!0}),_e.theaterOrientationIntent=s,_e.useTheaterOrientation=function(l,O){const d=(0,e.c)(3),k=!0,{screenMinSide:y}=O,P=(0,n.useRef)(l);let b;d[0]!==l||d[1]!==y?(b=()=>{const e=P.current&&!l&&(0,o.shouldRestorePortraitLock)({screenMinSide:y,isWeb:k});P.current=l;const n=s({isWeb:k,fullscreen:l,restorePortraitOnExit:e});if("none"!==n)return"landscape"===n?c.lockAsync(c.OrientationLock.LANDSCAPE):"portrait"===n?c.lockAsync(c.OrientationLock.PORTRAIT_UP).then(f):c.unlockAsync(),u},d[0]=l,d[1]=y,d[2]=b):b=d[2];(0,t.useFocusEffect)(b)};var e=r(_d[0]),n=r(_d[1]);r(_d[2]);var t=r(_d[3]),c=(function(e){if(e&&e.__esModule)return e;var n={};return e&&Object.keys(e).forEach(function(t){var c=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(n,t,c.get?c:{enumerable:!0,get:function(){return e[t]}})}),n.default=e,n})(r(_d[4])),o=r(_d[5]);function s({isWeb:e,fullscreen:n,restorePortraitOnExit:t=!1}){return e?'none':n?'landscape':t?'portrait':'free'}function u(){c.unlockAsync()}function f(){c.unlockAsync()}},1169,[787,16,109,788,1214,994]);
|
|
17
|
+
__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"DIVERGENCE_TOLERANCE_MS",{enumerable:!0,get:function(){return n}}),Object.defineProperty(e,"DIVERGENCE_REPORT_INTERVAL_MS",{enumerable:!0,get:function(){return t}}),e.evaluateDivergence=function(u){const{indicatorEpoch:l,playerEpoch:o,nowMs:c,lastReportAt:E}=u;if(null===l||null===o)return null;const s=l-o;return Math.abs(s)<n||null!==E&&c-E<t?null:{deltaMs:s,indicatorAhead:s>0}};const n=2e3,t=1e4},1170,[]);
|
|
18
|
+
__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.shouldShowOverlayPlayPause=function(l){return l.fill&&!l.landscapeDrawerOpen}},1171,[]);
|
|
19
|
+
__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"BACK_SWIPE_POINTERS",{enumerable:!0,get:function(){return n}}),Object.defineProperty(e,"OVERLAY_SWIPE_POINTERS",{enumerable:!0,get:function(){return t}}),Object.defineProperty(e,"SWIPE_DISTANCE",{enumerable:!0,get:function(){return _}}),Object.defineProperty(e,"SWIPE_VELOCITY",{enumerable:!0,get:function(){return o}}),Object.defineProperty(e,"ZOOM_IDLE_SCALE",{enumerable:!0,get:function(){return s}}),Object.defineProperty(e,"shouldGoBackOnSwipe",{enumerable:!0,get:function(){return c}}),Object.defineProperty(e,"shouldOpenOverlayOnSwipe",{enumerable:!0,get:function(){return l}});const n=1,t=2,_=80,o=400,s=1.02,u=(function({_worklet_7215403088850_init_data:n,ZOOM_IDLE_SCALE:t,SWIPE_DISTANCE:_,SWIPE_VELOCITY:o}){const s=function(n){return!(n.zoomScale>t)&&(n.translationY>_&&n.velocityY>o)};return s.__closure={ZOOM_IDLE_SCALE:t,SWIPE_DISTANCE:_,SWIPE_VELOCITY:o},s.__workletHash=7215403088850,s.__initData=n,s})({_worklet_7215403088850_init_data:{code:"function isDownwardFling_streamSwipesTs1(args){const{ZOOM_IDLE_SCALE,SWIPE_DISTANCE,SWIPE_VELOCITY}=this.__closure;if(args.zoomScale>ZOOM_IDLE_SCALE)return false;return args.translationY>SWIPE_DISTANCE&&args.velocityY>SWIPE_VELOCITY;}"},ZOOM_IDLE_SCALE:s,SWIPE_DISTANCE:_,SWIPE_VELOCITY:o}),c=(function({_worklet_13342668791840_init_data:n,isDownwardFling:t}){const _=function(n){return t(n)};return _.__closure={isDownwardFling:t},_.__workletHash=0xc229508a020,_.__initData=n,_})({_worklet_13342668791840_init_data:{code:"function shouldGoBackOnSwipe_streamSwipesTs2(args){const{isDownwardFling}=this.__closure;return isDownwardFling(args);}"},isDownwardFling:u}),l=(function({_worklet_5901426502956_init_data:n,isDownwardFling:t}){const _=function(n){return t(n)};return _.__closure={isDownwardFling:t},_.__workletHash=5901426502956,_.__initData=n,_})({_worklet_5901426502956_init_data:{code:"function shouldOpenOverlayOnSwipe_streamSwipesTs3(args){const{isDownwardFling}=this.__closure;return isDownwardFling(args);}"},isDownwardFling:u})},1172,[]);
|
|
20
|
+
__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.shouldReassertRecordedOnReconnect=function(l){return null===l.clipHoldingFrame&&('live'!==l.playbackMode&&null!==l.playheadEpoch)},e.resolveRecordedProfileForReconnect=function(o,t){return null!==t&&t.length>0?t:(0,l.resolvePlaybackEntryProfile)(n(o),'low')};var l=r(d[0]);function n(l){return'profile'===l.kind&&void 0!==l.profile?{kind:'profile',profile:l.profile}:{kind:'adaptive'}}},1173,[1174]);
|
|
21
|
+
__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"DOWNLINK_HIGH_MBPS",{enumerable:!0,get:function(){return n}}),Object.defineProperty(e,"DOWNLINK_MID_MBPS",{enumerable:!0,get:function(){return t}}),e.suggestedPlaybackTier=o,e.resolvePlaybackEntryProfile=function(n,t){return'profile'===n.kind?n.profile:'low'},e.resolvePlaybackUpgradeProfile=function(n,t){return'profile'===n.kind?n.profile:o(t)};const n=8,t=2.5;function o(o){return o>=n?'high':o>=t?'mid':'low'}},1174,[]);
|
|
22
|
+
__d(function(g,_r,i,a,m,_e,d){"use strict";Object.defineProperty(_e,'__esModule',{value:!0}),_e.useStreamZoom=function(l){const B=(0,t.c)(158),{contentAspect:C,fit:L,viewport:H,trace:J}=l,R=void 0===C?S:C,D=void 0!==J&&J,{width:V,heightFor:$}=H,z=(0,h.useSharedValue)(1),K=(0,h.useSharedValue)(1),G=(0,h.useSharedValue)(0),U=(0,h.useSharedValue)(0),j=(0,h.useSharedValue)(0),q=(0,h.useSharedValue)(0),Q=(0,h.useSharedValue)(1),tt=(0,h.useSharedValue)(0),et=(0,h.useSharedValue)(0),at=(0,h.useSharedValue)((0,s.newZoomTraceBuffer)()),ot=(0,h.useSharedValue)("");let nt;B[0]!==at||B[1]!==ot?(nt=()=>{(0,h.runOnUI)((function({_worklet_8283821094612_init_data:t,takeZoomTrace:e,traceBuf:o,traceKind:n,runOnJS:c,reportZoomTrace:r}){const s=function(){const t=e(o.value),s=n.value;t.length>0&&c(r)(s,t)};return s.__closure={takeZoomTrace:e,traceBuf:o,traceKind:n,runOnJS:c,reportZoomTrace:r},s.__workletHash=8283821094612,s.__initData=t,s})({_worklet_8283821094612_init_data:y,takeZoomTrace:s.takeZoomTrace,traceBuf:at,traceKind:ot,runOnJS:h.runOnJS,reportZoomTrace:T}))()},B[0]=at,B[1]=ot,B[2]=nt):nt=B[2];const ct=nt;let rt;B[3]!==ct?(rt=()=>{setTimeout(ct,w)},B[3]=ct,B[4]=rt):rt=B[4];const st=rt;let lt;B[5]!==D||B[6]!==at||B[7]!==ot?(lt=(function({_worklet_6864190838485_init_data:t,trace:e,takeZoomTrace:o,traceBuf:n,runOnJS:c,reportZoomTrace:r,traceKind:s,beginZoomTrace:l}){const u=function(t){if(!e)return;const u=o(n.value);u.length>0&&c(r)(s.value,u),s.set(t),l(n.value,Date.now())};return u.__closure={trace:e,takeZoomTrace:o,traceBuf:n,runOnJS:c,reportZoomTrace:r,traceKind:s,beginZoomTrace:l},u.__workletHash=6864190838485,u.__initData=t,u})({_worklet_6864190838485_init_data:E,trace:D,takeZoomTrace:s.takeZoomTrace,traceBuf:at,runOnJS:h.runOnJS,reportZoomTrace:T,traceKind:ot,beginZoomTrace:s.beginZoomTrace}),B[5]=D,B[6]=at,B[7]=ot,B[8]=lt):lt=B[8];const it=lt;let ut;B[9]!==K||B[10]!==$||B[11]!==z.value||B[12]!==D||B[13]!==at||B[14]!==G.value||B[15]!==U.value||B[16]!==V?(ut=(function({_worklet_17285674996544_init_data:t,trace:e,traceBuf:o,pushZoomSample:n,zoomTraceElapsed:c,scale:r,committedScale:s,tx:l,ty:u,viewportWidth:_,heightFor:h}){const p=function(t,p){if(!e)return;const v=o.value;0!==v.startedAt&&n(v,{t:c(v,Date.now()),phase:t,live:r.value,committed:s.value,x:l.value,y:u.value,boxW:_,boxH:h(r.value),...p})};return p.__closure={trace:e,traceBuf:o,pushZoomSample:n,zoomTraceElapsed:c,scale:r,committedScale:s,tx:l,ty:u,viewportWidth:_,heightFor:h},p.__workletHash=0xfb8a2849340,p.__initData=t,p})({_worklet_17285674996544_init_data:P,trace:D,traceBuf:at,pushZoomSample:s.pushZoomSample,zoomTraceElapsed:s.zoomTraceElapsed,scale:z,committedScale:K,tx:G,ty:U,viewportWidth:V,heightFor:$}),B[9]=K,B[10]=$,B[11]=z.value,B[12]=D,B[13]=at,B[14]=G.value,B[15]=U.value,B[16]=V,B[17]=ut):ut=B[17];const _t=ut;let ht;B[18]!==st||B[19]!==D?(ht=(function({_worklet_4686333039655_init_data:t,trace:e,runOnJS:o,armTraceFlush:n}){const c=function(){e&&o(n)()};return c.__closure={trace:e,runOnJS:o,armTraceFlush:n},c.__workletHash=4686333039655,c.__initData=t,c})({_worklet_4686333039655_init_data:A,trace:D,runOnJS:h.runOnJS,armTraceFlush:st}),B[18]=st,B[19]=D,B[20]=ht):ht=B[20];const mt=ht;let dt;B[21]!==_t?(dt=(function({_worklet_16260371776350_init_data:t,traceSample:e}){const o=function(t){e("box",{drawnH:t})};return o.__closure={traceSample:e},o.__workletHash=0xec9e9af035e,o.__initData=t,o})({_worklet_16260371776350_init_data:Z,traceSample:_t}),B[21]=_t,B[22]=dt):dt=B[22];const pt=dt;let vt;B[23]!==K||B[24]!==j||B[25]!==q||B[26]!==z||B[27]!==G||B[28]!==U?(vt=()=>{z.set(1),K.set(1),G.set(0),U.set(0),j.set(0),q.set(0)},B[23]=K,B[24]=j,B[25]=q,B[26]=z,B[27]=G,B[28]=U,B[29]=vt):vt=B[29];const ft=vt;let St;B[30]!==K||B[31]!==j||B[32]!==q||B[33]!==z||B[34]!==G||B[35]!==U?(St=(function({_worklet_2948218997959_init_data:t,scale:e,withTiming:o,committedScale:n,tx:c,ty:r,savedTx:s,savedTy:l}){const u=function(){e.set(o(1)),n.set(1),c.set(o(0)),r.set(o(0)),s.set(0),l.set(0)};return u.__closure={scale:e,withTiming:o,committedScale:n,tx:c,ty:r,savedTx:s,savedTy:l},u.__workletHash=2948218997959,u.__initData=t,u})({_worklet_2948218997959_init_data:O,scale:z,withTiming:h.withTiming,committedScale:K,tx:G,ty:U,savedTx:j,savedTy:q}),B[30]=K,B[31]=j,B[32]=q,B[33]=z,B[34]=G,B[35]=U,B[36]=St):St=B[36];const xt=St,wt=(0,h.useSharedValue)(0);let Tt;if(B[37]!==K||B[38]!==R||B[39]!==L||B[40]!==$||B[41]!==wt||B[42]!==tt||B[43]!==et||B[44]!==Q||B[45]!==j||B[46]!==q||B[47]!==z||B[48]!==it||B[49]!==mt||B[50]!==_t||B[51]!==G||B[52]!==U||B[53]!==V){let t,n,c;B[55]!==K||B[56]!==tt||B[57]!==et||B[58]!==Q||B[59]!==it||B[60]!==_t?(t=(function({_worklet_9285017616255_init_data:t,pinchStartScale:e,committedScale:o,pinchFocalX:n,pinchFocalY:c,traceBegin:r,traceSample:s}){const l=function(t){e.set(o.value),n.set(t.focalX),c.set(t.focalY),r("pinch"),s("start",{focalX:t.focalX,focalY:t.focalY,pointers:t.numberOfPointers})};return l.__closure={pinchStartScale:e,committedScale:o,pinchFocalX:n,pinchFocalY:c,traceBegin:r,traceSample:s},l.__workletHash=9285017616255,l.__initData=t,l})({_worklet_9285017616255_init_data:X,pinchStartScale:Q,committedScale:K,pinchFocalX:tt,pinchFocalY:et,traceBegin:it,traceSample:_t}),B[55]=K,B[56]=tt,B[57]=et,B[58]=Q,B[59]=it,B[60]=_t,B[61]=t):t=B[61],B[62]!==R||B[63]!==L||B[64]!==$||B[65]!==tt||B[66]!==et||B[67]!==Q||B[68]!==j||B[69]!==q||B[70]!==z||B[71]!==_t||B[72]!==G||B[73]!==U||B[74]!==V?(n=(function({_worklet_3328464358507_init_data:t,viewportWidth:e,pinchStartScale:o,MIN_SCALE:n,MAX_SCALE:c,heightFor:r,MIN_VIEWPORT:s,scale:l,focalPan:u,pinchFocalX:_,savedTx:h,pinchFocalY:p,savedTy:v,streamPanExtent:f,contentAspect:S,fit:x,clampPan:w,tx:T,ty:M,traceSample:y}){const E=function(t){if(t.numberOfPointers<2)return;const E=e,P=o.value,A=Math.max(n,Math.min(c,P*t.scale)),Z=r(P),O=r(A);if(E<s||O<s)return;l.set(A);const X=u({focalNow:t.focalX,focalStart:_.value,center:E/2,panStart:h.value,scaleStart:P*Z,scaleAfter:A*O}),Y=u({focalNow:t.focalY,focalStart:p.value,center:Z/2,centerAfter:O/2,panStart:v.value,scaleStart:P*Z,scaleAfter:A*O}),{x:k,y:F}=f(E,O,S,A,x),b=w({tx:X,ty:Y,w:E,h:O,aspect:S,scale:A,fit:x});T.set(b.x),M.set(b.y),y("update",{pointers:t.numberOfPointers,focalX:t.focalX,focalY:t.focalY,rawX:X,rawY:Y,limX:k,limY:F})};return E.__closure={viewportWidth:e,pinchStartScale:o,MIN_SCALE:n,MAX_SCALE:c,heightFor:r,MIN_VIEWPORT:s,scale:l,focalPan:u,pinchFocalX:_,savedTx:h,pinchFocalY:p,savedTy:v,streamPanExtent:f,contentAspect:S,fit:x,clampPan:w,tx:T,ty:M,traceSample:y},E.__workletHash=3328464358507,E.__initData=t,E})({_worklet_3328464358507_init_data:Y,viewportWidth:V,pinchStartScale:Q,MIN_SCALE:p,MAX_SCALE:v,heightFor:$,MIN_VIEWPORT:f,scale:z,focalPan:o.focalPan,pinchFocalX:tt,savedTx:j,pinchFocalY:et,savedTy:q,streamPanExtent:e.streamPanExtent,contentAspect:R,fit:L,clampPan:e.clampPan,tx:G,ty:U,traceSample:_t}),B[62]=R,B[63]=L,B[64]=$,B[65]=tt,B[66]=et,B[67]=Q,B[68]=j,B[69]=q,B[70]=z,B[71]=_t,B[72]=G,B[73]=U,B[74]=V,B[75]=n):n=B[75],B[76]!==K||B[77]!==R||B[78]!==L||B[79]!==$||B[80]!==wt||B[81]!==j||B[82]!==q||B[83]!==z.value||B[84]!==mt||B[85]!==_t||B[86]!==G.value||B[87]!==U.value||B[88]!==V?(c=(function({_worklet_4867885748892_init_data:t,scale:e,heightFor:o,committedScale:n,savedTx:c,tx:r,savedTy:s,ty:l,viewportWidth:u,streamPanExtent:_,contentAspect:h,fit:p,traceSample:v,lastPinchEndMs:f,traceRelease:S,runOnJS:x,reportZoom:w}){const T=function(){const t=e.value,T=o(n.value);n.set(t),c.set(r.value),s.set(l.value);const M=u,y=o(t),{x:E,y:P}=_(M,y,h,t,p);v("end",{rawX:r.value,rawY:l.value,limX:E,limY:P,note:T===y?void 0:`box ${Math.round(T)}\u2192${Math.round(y)}`}),f.set(Date.now()),S(),x(w)("pinch",{viewportW:Math.round(M),viewportH:Math.round(y),viewportAspect:y>0?Math.round(M/y*100)/100:0,contentAspect:Math.round(100*h)/100,fitCover:"cover"===p?1:0,scale:Math.round(100*t)/100,panExtentX:Math.round(E),panExtentY:Math.round(P),tx:Math.round(r.value),ty:Math.round(l.value)})};return T.__closure={scale:e,heightFor:o,committedScale:n,savedTx:c,tx:r,savedTy:s,ty:l,viewportWidth:u,streamPanExtent:_,contentAspect:h,fit:p,traceSample:v,lastPinchEndMs:f,traceRelease:S,runOnJS:x,reportZoom:w},T.__workletHash=4867885748892,T.__initData=t,T})({_worklet_4867885748892_init_data:k,scale:z,heightFor:$,committedScale:K,savedTx:j,tx:G,savedTy:q,ty:U,viewportWidth:V,streamPanExtent:e.streamPanExtent,contentAspect:R,fit:L,traceSample:_t,lastPinchEndMs:wt,traceRelease:mt,runOnJS:h.runOnJS,reportZoom:x}),B[76]=K,B[77]=R,B[78]=L,B[79]=$,B[80]=wt,B[81]=j,B[82]=q,B[83]=z.value,B[84]=mt,B[85]=_t,B[86]=G.value,B[87]=U.value,B[88]=V,B[89]=c):c=B[89],Tt=_.Gesture.Pinch().onStart((0,u.guardWorklet)("zoom.pinch.start",t)).onUpdate((0,u.guardWorklet)("zoom.pinch.update",n)).onEnd((0,u.guardWorklet)("zoom.pinch.end",c)),B[37]=K,B[38]=R,B[39]=L,B[40]=$,B[41]=wt,B[42]=tt,B[43]=et,B[44]=Q,B[45]=j,B[46]=q,B[47]=z,B[48]=it,B[49]=mt,B[50]=_t,B[51]=G,B[52]=U,B[53]=V,B[54]=Tt}else Tt=B[54];const Mt=Tt;let yt;if(B[90]!==R||B[91]!==L||B[92]!==$||B[93]!==j||B[94]!==q||B[95]!==z.value||B[96]!==it||B[97]!==mt||B[98]!==_t||B[99]!==G||B[100]!==U||B[101]!==V){let t,o,n;B[103]!==z.value||B[104]!==it||B[105]!==_t?(t=(function({_worklet_16421660376853_init_data:t,scale:e,MIN_SCALE:o,traceBegin:n,traceSample:c}){const r=function(){e.value<=o||(n("pan"),c("start",{}))};return r.__closure={scale:e,MIN_SCALE:o,traceBegin:n,traceSample:c},r.__workletHash=0xeef773bbf15,r.__initData=t,r})({_worklet_16421660376853_init_data:F,scale:z,MIN_SCALE:p,traceBegin:it,traceSample:_t}),B[103]=z.value,B[104]=it,B[105]=_t,B[106]=t):t=B[106],B[107]!==R||B[108]!==L||B[109]!==$||B[110]!==j||B[111]!==q||B[112]!==z.value||B[113]!==_t||B[114]!==G||B[115]!==U||B[116]!==V?(o=(function({_worklet_15029703260994_init_data:t,scale:e,MIN_SCALE:o,viewportWidth:n,heightFor:c,streamPanExtent:r,contentAspect:s,fit:l,savedTx:u,savedTy:_,clampPan:h,tx:p,ty:v,traceSample:f}){const S=function(t){if(e.value<=o)return;const S=n,x=e.value,w=c(x),{x:T,y:M}=r(S,w,s,x,l),y=u.value+t.translationX,E=_.value+t.translationY,P=h({tx:y,ty:E,w:S,h:w,aspect:s,scale:x,fit:l});p.set(P.x),v.set(P.y),f("update",{pointers:1,rawX:y,rawY:E,limX:T,limY:M})};return S.__closure={scale:e,MIN_SCALE:o,viewportWidth:n,heightFor:c,streamPanExtent:r,contentAspect:s,fit:l,savedTx:u,savedTy:_,clampPan:h,tx:p,ty:v,traceSample:f},S.__workletHash=0xdab601fbb42,S.__initData=t,S})({_worklet_15029703260994_init_data:b,scale:z,MIN_SCALE:p,viewportWidth:V,heightFor:$,streamPanExtent:e.streamPanExtent,contentAspect:R,fit:L,savedTx:j,savedTy:q,clampPan:e.clampPan,tx:G,ty:U,traceSample:_t}),B[107]=R,B[108]=L,B[109]=$,B[110]=j,B[111]=q,B[112]=z.value,B[113]=_t,B[114]=G,B[115]=U,B[116]=V,B[117]=o):o=B[117],B[118]!==R||B[119]!==L||B[120]!==$||B[121]!==j||B[122]!==q||B[123]!==z.value||B[124]!==mt||B[125]!==_t||B[126]!==G.value||B[127]!==U.value||B[128]!==V?(n=(function({_worklet_5550474970474_init_data:t,savedTx:e,tx:o,savedTy:n,ty:c,viewportWidth:r,heightFor:s,scale:l,streamPanExtent:u,contentAspect:_,fit:h,traceSample:p,traceRelease:v,runOnJS:f,reportZoom:S}){const x=function(){e.set(o.value),n.set(c.value);const t=r,x=s(l.value),{x:w,y:T}=u(t,x,_,l.value,h);p("end",{rawX:o.value,rawY:c.value,limX:w,limY:T}),v(),f(S)("pan",{viewportW:Math.round(t),viewportH:Math.round(x),viewportAspect:x>0?Math.round(t/x*100)/100:0,contentAspect:Math.round(100*_)/100,fitCover:"cover"===h?1:0,scale:Math.round(100*l.value)/100,panExtentX:Math.round(w),panExtentY:Math.round(T),tx:Math.round(o.value),ty:Math.round(c.value),atLimitX:Math.abs(Math.abs(o.value)-w)<1?1:0,atLimitY:Math.abs(Math.abs(c.value)-T)<1?1:0})};return x.__closure={savedTx:e,tx:o,savedTy:n,ty:c,viewportWidth:r,heightFor:s,scale:l,streamPanExtent:u,contentAspect:_,fit:h,traceSample:p,traceRelease:v,runOnJS:f,reportZoom:S},x.__workletHash=5550474970474,x.__initData=t,x})({_worklet_5550474970474_init_data:W,savedTx:j,tx:G,savedTy:q,ty:U,viewportWidth:V,heightFor:$,scale:z,streamPanExtent:e.streamPanExtent,contentAspect:R,fit:L,traceSample:_t,traceRelease:mt,runOnJS:h.runOnJS,reportZoom:x}),B[118]=R,B[119]=L,B[120]=$,B[121]=j,B[122]=q,B[123]=z.value,B[124]=mt,B[125]=_t,B[126]=G.value,B[127]=U.value,B[128]=V,B[129]=n):n=B[129],yt=_.Gesture.Pan().maxPointers(1).minDistance(4).onStart((0,u.guardWorklet)("zoom.pan.start",t)).onUpdate((0,u.guardWorklet)("zoom.pan.update",o)).onEnd((0,u.guardWorklet)("zoom.pan.end",n)),B[90]=R,B[91]=L,B[92]=$,B[93]=j,B[94]=q,B[95]=z.value,B[96]=it,B[97]=mt,B[98]=_t,B[99]=G,B[100]=U,B[101]=V,B[102]=yt}else yt=B[102];const gt=yt,Et=(0,h.useAnimatedStyle)((function({_worklet_4116608177168_init_data:t,scale:e,foldGrowth:o,tx:n,ty:c,heightFor:r,ZOOM_MIN:s}){const l=function(){const t=e.value,l=o({scale:t,tx:n.value,ty:c.value,boxHeight:r(t),restHeight:r(s)});return{transform:[{translateX:l.tx},{translateY:l.ty},{scale:l.scale}]}};return l.__closure={scale:e,foldGrowth:o,tx:n,ty:c,heightFor:r,ZOOM_MIN:s},l.__workletHash=4116608177168,l.__initData=t,l})({_worklet_4116608177168_init_data:I,scale:z,foldGrowth:c.foldGrowth,tx:G,ty:U,heightFor:$,ZOOM_MIN:o.ZOOM_MIN}));let Pt;B[130]!==K||B[131]!==R||B[132]!==L||B[133]!==$||B[134]!==wt||B[135]!==xt||B[136]!==j||B[137]!==q||B[138]!==z||B[139]!==it||B[140]!==mt||B[141]!==_t||B[142]!==G||B[143]!==U||B[144]!==V?(Pt=(function({_worklet_14144076631279_init_data:t,tapStepAccepted:e,lastPinchEndMs:o,scale:n,viewportWidth:c,heightFor:r,doubleTapTarget:s,MIN_SCALE:l,MAX_SCALE:u,coverScale:_,contentAspect:h,fit:p,ZOOM_STEPS:v,MIN_VIEWPORT:f,traceBegin:S,traceSample:x,f2:w,traceRelease:T,resetZoom:M,focalPan:y,tx:E,ty:P,streamPanExtent:A,clampPan:Z,withTiming:O,committedScale:X,savedTx:Y,savedTy:k}){const F=function(t,F){if(!e({nowMs:Date.now(),lastPinchEndMs:o.value}))return;const b=n.value,W=c,I=r(b),N=s({current:b,minScale:l,maxScale:u,cover:_({viewportWidth:W,viewportHeight:I,contentAspect:h,fit:p}),fallbackStep:v[0]??2});if("fit"===N.kind||W<f||I<f)return S("double-tap"),x("step",{focalX:t,focalY:F,note:`${w(b)}\u2192fit`}),T(),void M();const B=N.scale,C=r(B),L=y({focalNow:t,focalStart:t,center:W/2,panStart:E.value,scaleStart:b*I,scaleAfter:B*C}),H=y({focalNow:F,focalStart:F,center:I/2,centerAfter:C/2,panStart:P.value,scaleStart:b*I,scaleAfter:B*C}),{x:J,y:R}=A(W,C,h,B,p),{x:D,y:V}=Z({tx:L,ty:H,w:W,h:C,aspect:h,scale:B,fit:p});n.set(O(B)),X.set(B),E.set(O(D)),Y.set(D),P.set(O(V)),k.set(V),S("double-tap"),x("step",{focalX:t,focalY:F,rawX:L,rawY:H,x:D,y:V,limX:J,limY:R,boxH:C,note:I===C?`${w(b)}\u2192${w(B)}`:`${w(b)}\u2192${w(B)} box ${Math.round(I)}\u2192${Math.round(C)}`}),T()};return F.__closure={tapStepAccepted:e,lastPinchEndMs:o,scale:n,viewportWidth:c,heightFor:r,doubleTapTarget:s,MIN_SCALE:l,MAX_SCALE:u,coverScale:_,contentAspect:h,fit:p,ZOOM_STEPS:v,MIN_VIEWPORT:f,traceBegin:S,traceSample:x,f2:w,traceRelease:T,resetZoom:M,focalPan:y,tx:E,ty:P,streamPanExtent:A,clampPan:Z,withTiming:O,committedScale:X,savedTx:Y,savedTy:k},F.__workletHash=0xcdd2ca9ccef,F.__initData=t,F})({_worklet_14144076631279_init_data:N,tapStepAccepted:r.tapStepAccepted,lastPinchEndMs:wt,scale:z,viewportWidth:V,heightFor:$,doubleTapTarget:n.doubleTapTarget,MIN_SCALE:p,MAX_SCALE:v,coverScale:n.coverScale,contentAspect:R,fit:L,ZOOM_STEPS:o.ZOOM_STEPS,MIN_VIEWPORT:f,traceBegin:it,traceSample:_t,f2:M,traceRelease:mt,resetZoom:xt,focalPan:o.focalPan,tx:G,ty:U,streamPanExtent:e.streamPanExtent,clampPan:e.clampPan,withTiming:h.withTiming,committedScale:K,savedTx:j,savedTy:q}),B[130]=K,B[131]=R,B[132]=L,B[133]=$,B[134]=wt,B[135]=xt,B[136]=j,B[137]=q,B[138]=z,B[139]=it,B[140]=mt,B[141]=_t,B[142]=G,B[143]=U,B[144]=V,B[145]=Pt):Pt=B[145];const At=Pt;let Zt;B[146]!==gt||B[147]!==Mt?(Zt=(...t)=>{const e=t;return _.Gesture.Simultaneous(Mt,gt,...e)},B[146]=gt,B[147]=Mt,B[148]=Zt):Zt=B[148];const Ot=Zt;let Xt;B[149]!==K||B[150]!==Ot||B[151]!==At||B[152]!==xt||B[153]!==z||B[154]!==ft||B[155]!==pt||B[156]!==Et?(Xt={scale:z,committedScale:K,videoStyle:Et,resetZoom:xt,doubleTapZoomAt:At,snapZoom:ft,composeWith:Ot,traceBox:pt},B[149]=K,B[150]=Ot,B[151]=At,B[152]=xt,B[153]=z,B[154]=ft,B[155]=pt,B[156]=Et,B[157]=Xt):Xt=B[157];return Xt};var t=_r(d[0]);_r(d[1]);var e=_r(d[2]),o=_r(d[3]),n=_r(d[4]),c=_r(d[5]),r=_r(d[6]),s=_r(d[7]),l=_r(d[8]),u=_r(d[9]),_=_r(d[10]),h=_r(d[11]);const p=o.ZOOM_MIN,v=o.ZOOM_MAX,f=10,S=1.7777777777777777;function x(t,e){l.log.debug('live:zoom',`zoom ${t} end`,e)}const w=600;function T(t,e){if(0===e.length)return;const o=e[e.length-1],n=void 0===o?0:Math.round(o.t);l.log.debug('live:zoom',`zoom trace \u2014 ${t}, ${e.length} samples over ${n} ms\n${(0,s.formatZoomTrace)(e)}`)}const M=(function({_worklet_12903011362749_init_data:t}){const e=function(t){return t.toFixed(2)};return e.__closure={},e.__workletHash=0xbbc3768a7bd,e.__initData=t,e})({_worklet_12903011362749_init_data:{code:"function useStreamZoomTs1(n){return n.toFixed(2);}"}}),y={code:"function useStreamZoomTs2(){const{takeZoomTrace,traceBuf,traceKind,runOnJS,reportZoomTrace}=this.__closure;const samples=takeZoomTrace(traceBuf.value);const kind=traceKind.value;if(samples.length>0){runOnJS(reportZoomTrace)(kind,samples);}}"},E={code:"function useStreamZoomTs3(kind_0){const{trace,takeZoomTrace,traceBuf,runOnJS,reportZoomTrace,traceKind,beginZoomTrace}=this.__closure;if(!trace){return;}const pending=takeZoomTrace(traceBuf.value);if(pending.length>0){runOnJS(reportZoomTrace)(traceKind.value,pending);}traceKind.set(kind_0);beginZoomTrace(traceBuf.value,Date.now());}"},P={code:"function useStreamZoomTs4(phase,extra){const{trace,traceBuf,pushZoomSample,zoomTraceElapsed,scale,committedScale,tx,ty,viewportWidth,heightFor}=this.__closure;if(!trace){return;}const buf=traceBuf.value;if(buf.startedAt===0){return;}pushZoomSample(buf,{t:zoomTraceElapsed(buf,Date.now()),phase:phase,live:scale.value,committed:committedScale.value,x:tx.value,y:ty.value,boxW:viewportWidth,boxH:heightFor(scale.value),...extra});}"},A={code:"function useStreamZoomTs5(){const{trace,runOnJS,armTraceFlush}=this.__closure;if(!trace){return;}runOnJS(armTraceFlush)();}"},Z={code:"function useStreamZoomTs6(drawnHeight){const{traceSample}=this.__closure;traceSample(\"box\",{drawnH:drawnHeight});}"},O={code:"function useStreamZoomTs7(){const{scale,withTiming,committedScale,tx,ty,savedTx,savedTy}=this.__closure;scale.set(withTiming(1));committedScale.set(1);tx.set(withTiming(0));ty.set(withTiming(0));savedTx.set(0);savedTy.set(0);}"},X={code:"function useStreamZoomTs8(e){const{pinchStartScale,committedScale,pinchFocalX,pinchFocalY,traceBegin,traceSample}=this.__closure;pinchStartScale.set(committedScale.value);pinchFocalX.set(e.focalX);pinchFocalY.set(e.focalY);traceBegin(\"pinch\");traceSample(\"start\",{focalX:e.focalX,focalY:e.focalY,pointers:e.numberOfPointers});}"},Y={code:"function useStreamZoomTs9(e_0){const{viewportWidth,pinchStartScale,MIN_SCALE,MAX_SCALE,heightFor,MIN_VIEWPORT,scale,focalPan,pinchFocalX,savedTx,pinchFocalY,savedTy,streamPanExtent,contentAspect,fit,clampPan,tx,ty,traceSample}=this.__closure;if(e_0.numberOfPointers<2){return;}const w=viewportWidth;const s0=pinchStartScale.value;const s1=Math.max(MIN_SCALE,Math.min(MAX_SCALE,s0*e_0.scale));const h0=heightFor(s0);const h=heightFor(s1);if(w<MIN_VIEWPORT||h<MIN_VIEWPORT){return;}scale.set(s1);const ptx=focalPan({focalNow:e_0.focalX,focalStart:pinchFocalX.value,center:w/2,panStart:savedTx.value,scaleStart:s0*h0,scaleAfter:s1*h});const pty=focalPan({focalNow:e_0.focalY,focalStart:pinchFocalY.value,center:h0/2,centerAfter:h/2,panStart:savedTy.value,scaleStart:s0*h0,scaleAfter:s1*h});const{x:limX,y:limY}=streamPanExtent(w,h,contentAspect,s1,fit);const clamped=clampPan({tx:ptx,ty:pty,w:w,h:h,aspect:contentAspect,scale:s1,fit:fit});tx.set(clamped.x);ty.set(clamped.y);traceSample(\"update\",{pointers:e_0.numberOfPointers,focalX:e_0.focalX,focalY:e_0.focalY,rawX:ptx,rawY:pty,limX:limX,limY:limY});}"},k={code:"function useStreamZoomTs10(){const{scale,heightFor,committedScale,savedTx,tx,savedTy,ty,viewportWidth,streamPanExtent,contentAspect,fit,traceSample,lastPinchEndMs,traceRelease,runOnJS,reportZoom}=this.__closure;const s=scale.value;const boxBefore=heightFor(committedScale.value);committedScale.set(s);savedTx.set(tx.value);savedTy.set(ty.value);const w_0=viewportWidth;const h_0=heightFor(s);const{x:limX_0,y:limY_0}=streamPanExtent(w_0,h_0,contentAspect,s,fit);traceSample(\"end\",{rawX:tx.value,rawY:ty.value,limX:limX_0,limY:limY_0,note:boxBefore===h_0?undefined:\"box \"+Math.round(boxBefore)+\"\\u2192\"+Math.round(h_0)});lastPinchEndMs.set(Date.now());traceRelease();runOnJS(reportZoom)(\"pinch\",{viewportW:Math.round(w_0),viewportH:Math.round(h_0),viewportAspect:h_0>0?Math.round(w_0/h_0*100)/100:0,contentAspect:Math.round(contentAspect*100)/100,fitCover:fit===\"cover\"?1:0,scale:Math.round(s*100)/100,panExtentX:Math.round(limX_0),panExtentY:Math.round(limY_0),tx:Math.round(tx.value),ty:Math.round(ty.value)});}"},F={code:"function useStreamZoomTs11(){const{scale,MIN_SCALE,traceBegin,traceSample}=this.__closure;if(scale.value<=MIN_SCALE){return;}traceBegin(\"pan\");traceSample(\"start\",{});}"},b={code:"function useStreamZoomTs12(e_1){const{scale,MIN_SCALE,viewportWidth,heightFor,streamPanExtent,contentAspect,fit,savedTx,savedTy,clampPan,tx,ty,traceSample}=this.__closure;if(scale.value<=MIN_SCALE){return;}const w_1=viewportWidth;const s_0=scale.value;const h_1=heightFor(s_0);const{x:limX_1,y:limY_1}=streamPanExtent(w_1,h_1,contentAspect,s_0,fit);const rawX=savedTx.value+e_1.translationX;const rawY=savedTy.value+e_1.translationY;const clamped_0=clampPan({tx:rawX,ty:rawY,w:w_1,h:h_1,aspect:contentAspect,scale:s_0,fit:fit});tx.set(clamped_0.x);ty.set(clamped_0.y);traceSample(\"update\",{pointers:1,rawX:rawX,rawY:rawY,limX:limX_1,limY:limY_1});}"},W={code:"function useStreamZoomTs13(){const{savedTx,tx,savedTy,ty,viewportWidth,heightFor,scale,streamPanExtent,contentAspect,fit,traceSample,traceRelease,runOnJS,reportZoom}=this.__closure;savedTx.set(tx.value);savedTy.set(ty.value);const w_2=viewportWidth;const h_2=heightFor(scale.value);const{x:limX_2,y:limY_2}=streamPanExtent(w_2,h_2,contentAspect,scale.value,fit);traceSample(\"end\",{rawX:tx.value,rawY:ty.value,limX:limX_2,limY:limY_2});traceRelease();runOnJS(reportZoom)(\"pan\",{viewportW:Math.round(w_2),viewportH:Math.round(h_2),viewportAspect:h_2>0?Math.round(w_2/h_2*100)/100:0,contentAspect:Math.round(contentAspect*100)/100,fitCover:fit===\"cover\"?1:0,scale:Math.round(scale.value*100)/100,panExtentX:Math.round(limX_2),panExtentY:Math.round(limY_2),tx:Math.round(tx.value),ty:Math.round(ty.value),atLimitX:Math.abs(Math.abs(tx.value)-limX_2)<1?1:0,atLimitY:Math.abs(Math.abs(ty.value)-limY_2)<1?1:0});}"},I={code:"function useStreamZoomTs14(){const{scale,foldGrowth,tx,ty,heightFor,ZOOM_MIN}=this.__closure;const s_1=scale.value;const r=foldGrowth({scale:s_1,tx:tx.value,ty:ty.value,boxHeight:heightFor(s_1),restHeight:heightFor(ZOOM_MIN)});return{transform:[{translateX:r.tx},{translateY:r.ty},{scale:r.scale}]};}"},N={code:"function useStreamZoomTs15(x,y){const{tapStepAccepted,lastPinchEndMs,scale,viewportWidth,heightFor,doubleTapTarget,MIN_SCALE,MAX_SCALE,coverScale,contentAspect,fit,ZOOM_STEPS,MIN_VIEWPORT,traceBegin,traceSample,f2,traceRelease,resetZoom,focalPan,tx,ty,streamPanExtent,clampPan,withTiming,committedScale,savedTx,savedTy}=this.__closure;var _ZOOM_STEPS$;if(!tapStepAccepted({nowMs:Date.now(),lastPinchEndMs:lastPinchEndMs.value})){return;}const s0_0=scale.value;const w_3=viewportWidth;const h0_0=heightFor(s0_0);const target=doubleTapTarget({current:s0_0,minScale:MIN_SCALE,maxScale:MAX_SCALE,cover:coverScale({viewportWidth:w_3,viewportHeight:h0_0,contentAspect:contentAspect,fit:fit}),fallbackStep:(_ZOOM_STEPS$=ZOOM_STEPS[0])!==null&&_ZOOM_STEPS$!==void 0?_ZOOM_STEPS$:2});if(target.kind===\"fit\"||w_3<MIN_VIEWPORT||h0_0<MIN_VIEWPORT){traceBegin(\"double-tap\");traceSample(\"step\",{focalX:x,focalY:y,note:f2(s0_0)+\"\\u2192fit\"});traceRelease();resetZoom();return;}const s1_0=target.scale;const h1=heightFor(s1_0);const ptx_0=focalPan({focalNow:x,focalStart:x,center:w_3/2,panStart:tx.value,scaleStart:s0_0*h0_0,scaleAfter:s1_0*h1});const pty_0=focalPan({focalNow:y,focalStart:y,center:h0_0/2,centerAfter:h1/2,panStart:ty.value,scaleStart:s0_0*h0_0,scaleAfter:s1_0*h1});const{x:limX_3,y:limY_3}=streamPanExtent(w_3,h1,contentAspect,s1_0,fit);const{x:nx,y:ny}=clampPan({tx:ptx_0,ty:pty_0,w:w_3,h:h1,aspect:contentAspect,scale:s1_0,fit:fit});scale.set(withTiming(s1_0));committedScale.set(s1_0);tx.set(withTiming(nx));savedTx.set(nx);ty.set(withTiming(ny));savedTy.set(ny);traceBegin(\"double-tap\");traceSample(\"step\",{focalX:x,focalY:y,rawX:ptx_0,rawY:pty_0,x:nx,y:ny,limX:limX_3,limY:limY_3,boxH:h1,note:h0_0===h1?f2(s0_0)+\"\\u2192\"+f2(s1_0):f2(s0_0)+\"\\u2192\"+f2(s1_0)+\" box \"+Math.round(h0_0)+\"\\u2192\"+Math.round(h1)});traceRelease();}"}},1175,[787,16,1176,1256,1177,1178,1179,1180,999,1257,1215,1129]);
|
|
23
|
+
__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"containBox",{enumerable:!0,get:function(){return t}}),Object.defineProperty(e,"coverBox",{enumerable:!0,get:function(){return n}}),Object.defineProperty(e,"panExtent",{enumerable:!0,get:function(){return o}}),Object.defineProperty(e,"streamPanExtent",{enumerable:!0,get:function(){return c}}),Object.defineProperty(e,"clampPan",{enumerable:!0,get:function(){return _}});const t=(function({_worklet_16403026519218_init_data:t}){const n=function(t,n,o){return!Number.isFinite(o)||o<=0?{width:t,height:n}:{width:Math.min(t,n*o),height:Math.min(n,t/o)}};return n.__closure={},n.__workletHash=0xeeb2091a4b2,n.__initData=t,n})({_worklet_16403026519218_init_data:{code:"function containBox_streamZoomClampTs1(w,h,aspect){if(!Number.isFinite(aspect)||aspect<=0)return{width:w,height:h};return{width:Math.min(w,h*aspect),height:Math.min(h,w/aspect)};}"}}),n=(function({_worklet_12373137558124_init_data:t}){const n=function(t,n,o){return!Number.isFinite(o)||o<=0?{width:t,height:n}:{width:Math.max(t,n*o),height:Math.max(n,t/o)}};return n.__closure={},n.__workletHash=0xb40d8780a6c,n.__initData=t,n})({_worklet_12373137558124_init_data:{code:"function coverBox_streamZoomClampTs2(w,h,aspect){if(!Number.isFinite(aspect)||aspect<=0)return{width:w,height:h};return{width:Math.max(w,h*aspect),height:Math.max(h,w/aspect)};}"}}),o=(function({_worklet_7793081511060_init_data:t}){const n=function(t,n,o){return Number.isFinite(t)&&Number.isFinite(n)&&Number.isFinite(o)?Math.max(0,(o*n-t)/2):0};return n.__closure={},n.__workletHash=7793081511060,n.__initData=t,n})({_worklet_7793081511060_init_data:{code:"function panExtent_streamZoomClampTs3(containerDim,contentDim,scale){if(!Number.isFinite(containerDim)||!Number.isFinite(contentDim)||!Number.isFinite(scale)){return 0;}return Math.max(0,(scale*contentDim-containerDim)/2);}"}}),c=(function({_worklet_17001621453331_init_data:t,coverBox:n,containBox:o,panExtent:c}){const _=function(t,_,s,u,h="contain"){const x='cover'===h?n(t,_,s):o(t,_,s);return{x:c(t,x.width,u),y:c(_,x.height,u)}};return _.__closure={coverBox:n,containBox:o,panExtent:c},_.__workletHash=0xf767f9b7a13,_.__initData=t,_})({_worklet_17001621453331_init_data:{code:"function streamPanExtent_streamZoomClampTs4(w,h,aspect,scale,fit='contain'){const{coverBox,containBox,panExtent}=this.__closure;const box=fit==='cover'?coverBox(w,h,aspect):containBox(w,h,aspect);return{x:panExtent(w,box.width,scale),y:panExtent(h,box.height,scale)};}"},coverBox:n,containBox:t,panExtent:o}),_=(function({_worklet_11264439652914_init_data:t,streamPanExtent:n}){const o=function(t){if(t.scale<=1)return{x:0,y:0};const{x:o,y:c}=n(t.w,t.h,t.aspect,t.scale,t.fit);return{x:Math.max(-o,Math.min(o,t.tx)),y:Math.max(-c,Math.min(c,t.ty))}};return o.__closure={streamPanExtent:n},o.__workletHash=0xa3eb4ec9232,o.__initData=t,o})({_worklet_11264439652914_init_data:{code:"function clampPan_streamZoomClampTs5(input){const{streamPanExtent}=this.__closure;if(input.scale<=1)return{x:0,y:0};const{x:limX,y:limY}=streamPanExtent(input.w,input.h,input.aspect,input.scale,input.fit);return{x:Math.max(-limX,Math.min(limX,input.tx)),y:Math.max(-limY,Math.min(limY,input.ty))};}"},streamPanExtent:c})},1176,[]);
|
|
24
|
+
__d(function(g,r,i,_a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"coverScale",{enumerable:!0,get:function(){return t}}),Object.defineProperty(e,"DOUBLE_TAP_EPSILON",{enumerable:!0,get:function(){return n}}),Object.defineProperty(e,"doubleTapTarget",{enumerable:!0,get:function(){return c}});const t=(function({_worklet_12565832045937_init_data:t}){const n=function(t){const{viewportWidth:n,viewportHeight:c,contentAspect:o,fit:a}=t;if('cover'===a)return 1;if(!Number.isFinite(n)||!Number.isFinite(c)||!Number.isFinite(o))return 1;if(n<=0||c<=0||o<=0)return 1;const u=n/c/o;return u>=1?u:1/u};return n.__closure={},n.__workletHash=0xb6db5f49571,n.__initData=t,n})({_worklet_12565832045937_init_data:{code:"function coverScale_doubleTapZoomTs1(input){const{viewportWidth:w,viewportHeight:h,contentAspect:a,fit:fit}=input;if(fit==='cover')return 1;if(!Number.isFinite(w)||!Number.isFinite(h)||!Number.isFinite(a))return 1;if(w<=0||h<=0||a<=0)return 1;const ratio=w/h/a;return ratio>=1?ratio:1/ratio;}"}}),n=.01,c=(function({_worklet_6821251347268_init_data:t,DOUBLE_TAP_EPSILON:n}){const c=function(t){const{minScale:c,maxScale:o,cover:a,fallbackStep:u}=t;if((Number.isFinite(t.current)?t.current:c)>c+n)return{kind:'fit'};const _=Number.isFinite(a)&&a>c+n?a:u;return{kind:'zoom',scale:Math.max(c,Math.min(o,_))}};return c.__closure={DOUBLE_TAP_EPSILON:n},c.__workletHash=6821251347268,c.__initData=t,c})({_worklet_6821251347268_init_data:{code:"function doubleTapTarget_doubleTapZoomTs2(input){const{DOUBLE_TAP_EPSILON}=this.__closure;const{minScale:minScale,maxScale:maxScale,cover:cover,fallbackStep:fallbackStep}=input;const current=Number.isFinite(input.current)?input.current:minScale;if(current>minScale+DOUBLE_TAP_EPSILON)return{kind:'fit'};const wanted=Number.isFinite(cover)&&cover>minScale+DOUBLE_TAP_EPSILON?cover:fallbackStep;return{kind:'zoom',scale:Math.max(minScale,Math.min(maxScale,wanted))};}"},DOUBLE_TAP_EPSILON:n})},1177,[]);
|
|
25
|
+
__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"foldGrowth",{enumerable:!0,get:function(){return t}}),Object.defineProperty(e,"growBoxHeight",{enumerable:!0,get:function(){return n}});const t=(function({_worklet_1598582764024_init_data:t}){const n=function(t){const{scale:n,tx:o,ty:s,boxHeight:c,restHeight:u}=t;return{scale:n*(u>0&&Number.isFinite(c/u)?c/u:1),tx:o,ty:s+(c-u)/2}};return n.__closure={},n.__workletHash=1598582764024,n.__initData=t,n})({_worklet_1598582764024_init_data:{code:"function foldGrowth_zoomRenderTs1(input){const{scale:scale,tx:tx,ty:ty,boxHeight:boxHeight,restHeight:restHeight}=input;const growth=restHeight>0&&Number.isFinite(boxHeight/restHeight)?boxHeight/restHeight:1;return{scale:scale*growth,tx:tx,ty:ty+(boxHeight-restHeight)/2};}"}}),n=(function({_worklet_6509324771015_init_data:t}){const n=function(t,n){const o=n.growScale-1;if(!(o>0&&Number.isFinite(t)))return n.rest;const s=Math.max(0,Math.min(1,(t-1)/o));return n.rest+(n.max-n.rest)*s};return n.__closure={},n.__workletHash=6509324771015,n.__initData=t,n})({_worklet_6509324771015_init_data:{code:"function growBoxHeight_zoomRenderTs2(scale,rule){const span=rule.growScale-1;if(!(span>0)||!Number.isFinite(scale))return rule.rest;const t=Math.max(0,Math.min(1,(scale-1)/span));return rule.rest+(rule.max-rule.rest)*t;}"}})},1178,[]);
|
|
26
|
+
__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"TAP_AFTER_PINCH_MS",{enumerable:!0,get:function(){return t}}),Object.defineProperty(e,"tapStepAccepted",{enumerable:!0,get:function(){return n}});const t=350,n=(function({_worklet_8291923632438_init_data:t,TAP_AFTER_PINCH_MS:n}){const _=function(t){const _=t.nowMs-t.lastPinchEndMs;return _<0||_>=n};return _.__closure={TAP_AFTER_PINCH_MS:n},_.__workletHash=8291923632438,_.__initData=t,_})({_worklet_8291923632438_init_data:{code:"function tapStepAccepted_zoomTapGateTs1(input){const{TAP_AFTER_PINCH_MS}=this.__closure;const since=input.nowMs-input.lastPinchEndMs;if(since<0)return true;return since>=TAP_AFTER_PINCH_MS;}"},TAP_AFTER_PINCH_MS:t})},1179,[]);
|
|
27
|
+
__d(function(g,_r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"ZOOM_TRACE_CAP",{enumerable:!0,get:function(){return t}}),Object.defineProperty(e,"ZOOM_TRACE_UPDATE_MIN_MS",{enumerable:!0,get:function(){return o}}),e.newZoomTraceBuffer=function(){return{samples:[],startedAt:0,lastUpdateT:-32,lastBoxT:-32}},Object.defineProperty(e,"beginZoomTrace",{enumerable:!0,get:function(){return _}}),Object.defineProperty(e,"zoomTraceElapsed",{enumerable:!0,get:function(){return n}}),Object.defineProperty(e,"pushZoomSample",{enumerable:!0,get:function(){return r}}),Object.defineProperty(e,"takeZoomTrace",{enumerable:!0,get:function(){return s}}),e.formatZoomTrace=function(t){return t.map(t=>{const o=[`${`+${l(t.t)}ms`.padStart(7)} ${t.phase.padEnd(6)}`,`live ${u(t.live)}`,`committed ${u(t.committed)}`];void 0!==t.pointers&&o.push(`${t.pointers} fingers`),void 0!==t.focalX&&void 0!==t.focalY&&o.push(`focal ${l(t.focalX)},${l(t.focalY)}`);const _=c(t);return''!==_&&o.push(_),void 0!==t.limX&&void 0!==t.limY&&o.push(`limit \xb1${l(t.limX)},\xb1${l(t.limY)}`),void 0!==t.drawnH&&o.push(`drawn ${l(t.drawnH)} of ${l(t.boxH)} asked`),o.push(`box ${l(t.boxW)}x${l(t.boxH)}`),void 0!==t.note&&o.push(t.note),o.join(' ')}).join('\n')};const t=400,o=32;const _=(function({_worklet_8237240510461_init_data:t,ZOOM_TRACE_UPDATE_MIN_MS:o}){const _=function(t,_){t.samples=[],t.startedAt=_,t.lastUpdateT=-o,t.lastBoxT=-o};return _.__closure={ZOOM_TRACE_UPDATE_MIN_MS:o},_.__workletHash=8237240510461,_.__initData=t,_})({_worklet_8237240510461_init_data:{code:"function beginZoomTrace_zoomTraceTs1(buf,now){const{ZOOM_TRACE_UPDATE_MIN_MS}=this.__closure;buf.samples=[];buf.startedAt=now;buf.lastUpdateT=-ZOOM_TRACE_UPDATE_MIN_MS;buf.lastBoxT=-ZOOM_TRACE_UPDATE_MIN_MS;}"},ZOOM_TRACE_UPDATE_MIN_MS:o}),n=(function({_worklet_14504184843227_init_data:t}){const o=function(t,o){return 0===t.startedAt?0:o-t.startedAt};return o.__closure={},o.__workletHash=0xd3104c90bdb,o.__initData=t,o})({_worklet_14504184843227_init_data:{code:"function zoomTraceElapsed_zoomTraceTs2(buf,now){return buf.startedAt===0?0:now-buf.startedAt;}"}}),r=(function({_worklet_9921221962001_init_data:t,ZOOM_TRACE_UPDATE_MIN_MS:o,ZOOM_TRACE_CAP:_}){const n=function(t,n){if('update'===n.phase){if(n.t-t.lastUpdateT<o)return;t.lastUpdateT=n.t}else if('box'===n.phase){if(n.t-t.lastBoxT<o)return;t.lastBoxT=n.t}t.samples.length>=_||t.samples.push(n)};return n.__closure={ZOOM_TRACE_UPDATE_MIN_MS:o,ZOOM_TRACE_CAP:_},n.__workletHash=9921221962001,n.__initData=t,n})({_worklet_9921221962001_init_data:{code:"function pushZoomSample_zoomTraceTs3(buf,sample){const{ZOOM_TRACE_UPDATE_MIN_MS,ZOOM_TRACE_CAP}=this.__closure;if(sample.phase==='update'){if(sample.t-buf.lastUpdateT<ZOOM_TRACE_UPDATE_MIN_MS)return;buf.lastUpdateT=sample.t;}else if(sample.phase==='box'){if(sample.t-buf.lastBoxT<ZOOM_TRACE_UPDATE_MIN_MS)return;buf.lastBoxT=sample.t;}if(buf.samples.length>=ZOOM_TRACE_CAP)return;buf.samples.push(sample);}"},ZOOM_TRACE_UPDATE_MIN_MS:o,ZOOM_TRACE_CAP:t}),s=(function({_worklet_16791759848171_init_data:t}){const o=function(t){const o=t.samples;return t.samples=[],t.startedAt=0,o};return o.__closure={},o.__workletHash=0xf45a2e182eb,o.__initData=t,o})({_worklet_16791759848171_init_data:{code:"function takeZoomTrace_zoomTraceTs4(buf){const out=buf.samples;buf.samples=[];buf.startedAt=0;return out;}"}}),u=t=>t.toFixed(2),l=t=>String(Math.round(t));function c(t){if(void 0===t.rawX||void 0===t.rawY)return'';const o=Math.abs(t.rawX-t.x)>.5,_=Math.abs(t.rawY-t.y)>.5,n=o||_?` CLAMPED ${o?'x':''}${_?'y':''}`:'';return`pan ${l(t.x)},${l(t.y)} (raw ${l(t.rawX)},${l(t.rawY)}${n})`}},1180,[]);
|
|
28
|
+
__d(function(g,r,_i,a,m,e,d){"use strict";function t(t,n){const c=atob(t),o=new Uint8Array(c.length);for(let t=0;t<c.length;t+=1)o[t]=c.charCodeAt(t);return new Blob([o],{type:n})}Object.defineProperty(e,'__esModule',{value:!0}),e.saveSnapshot=async function(n,c){const o='image/jpeg',u=`${c}.jpg`;try{return{uri:URL.createObjectURL(t(n,o)),mime:o,fileName:u}}catch{return null}},r(d[0])},1181,{"0":109,"1":1216,"2":14,"paths":{}});
|
|
29
|
+
__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.StreamOverlayControls=function(c){const p=(0,t.c)(51),{visible:T,onRequestHide:y,paused:f,onTogglePause:v,showPlayPause:h,muted:P,onToggleMute:S,audio:k,hasTwoWayAudio:b,talking:D,onToggleTalk:_,onStartSystemPip:M,fullscreen:w,onToggleFullscreen:z,edgePad:B,timelineToggle:O,ptzToggle:x,activity:j}=c,{t:q}=(0,l.useTranslation)();let A;p[0]===Symbol.for("react.memo_cache_sentinel")?(A=(0,n.systemPipSupported)("web"),p[0]=A):A=p[0];const F=A;let H,R;p[1]!==k||p[2]!==P||p[3]!==S||p[4]!==q?(H=(0,n.muteDisc)({muted:P,onToggleMute:S,cluster:"left",t:q,audio:k}),p[1]=k,p[2]=P,p[3]=S,p[4]=q,p[5]=H):H=p[5];if(p[6]!==w||p[7]!==b||p[8]!==M||p[9]!==z||p[10]!==v||p[11]!==_||p[12]!==f||p[13]!==x||p[14]!==h||p[15]!==q||p[16]!==H||p[17]!==D||p[18]!==O){let t;R=[H],p[20]!==b||p[21]!==_||p[22]!==q||p[23]!==D?(t=(0,n.talkDisc)({hasTwoWayAudio:b,talking:D,onToggleTalk:_,cluster:"left",t:q}),p[20]=b,p[21]=_,p[22]=q,p[23]=D,p[24]=t):t=p[24];const l=t;if(l&&R.push(l),O){let t;p[25]!==q||p[26]!==O.dock||p[27]!==O.onSet?(t=(0,n.timelineDockDisc)({dock:O.dock,onSet:O.onSet,cluster:"left",t:q}),p[25]=q,p[26]=O.dock,p[27]=O.onSet,p[28]=t):t=p[28],R.push(t)}if(x){let t;p[29]!==x.onToggle||p[30]!==x.open||p[31]!==q?(t=(0,n.ptzDisc)({open:x.open,onToggle:x.onToggle,cluster:"left",t:q}),p[29]=x.onToggle,p[30]=x.open,p[31]=q,p[32]=t):t=p[32],R.push(t)}let s;h&&R.push({id:"play",icon:f?o.Play:o.Pause,label:q(f?"v2.streamBar.play":"v2.streamBar.pause"),onPress:v,cluster:"right"}),p[33]!==M||p[34]!==q?(s=(0,n.systemPipDisc)({supported:F,onStartSystemPip:M,cluster:"right",t:q}),p[33]=M,p[34]=q,p[35]=s):s=p[35];const u=s;if(u&&R.push(u),void 0!==z){const t=w?o.Minimize2:o.Maximize2;let l,s;p[36]!==w||p[37]!==q?(l=q(w?"v2.streamBar.exitFullscreen":"v2.streamBar.fullscreen"),p[36]=w,p[37]=q,p[38]=l):l=p[38],p[39]!==w||p[40]!==z||p[41]!==t||p[42]!==l?(s={id:"fullscreen",icon:t,label:l,active:w,onPress:z,cluster:"right"},p[39]=w,p[40]=z,p[41]=t,p[42]=l,p[43]=s):s=p[43],R.push(s)}p[6]=w,p[7]=b,p[8]=M,p[9]=z,p[10]=v,p[11]=_,p[12]=f,p[13]=x,p[14]=h,p[15]=q,p[16]=H,p[17]=D,p[18]=O,p[19]=R}else R=p[19];const W=R;let C;p[44]!==j||p[45]!==B||p[46]!==W||p[47]!==y||p[48]!==f||p[49]!==T?(C=(0,u.jsx)(s.OverlayDiscGroup,{visible:T,onRequestHide:y,holdOpen:f,items:W,edgePad:B,activity:j}),p[44]=j,p[45]=B,p[46]=W,p[47]=y,p[48]=f,p[49]=T,p[50]=C):C=p[50];return C};var t=r(d[0]);r(d[1]),r(d[2]);var o=r(d[3]),l=r(d[4]),s=r(d[5]),n=r(d[6]),u=r(d[7])},1182,[787,16,109,837,817,1152,1153,10]);
|
|
30
|
+
__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,"DRIVE_OVERLAY_TEST_ID",{enumerable:!0,get:function(){return O}}),_e.DriveOverlay=function(t){const E=(0,e.c)(75),{deviceId:I,visible:j,edgePad:x,onOpenControls:P,drawer:w}=t,{t:z}=(0,c.useTranslation)(),{width:V}=(0,l.useViewportSize)(),A=(0,f.useNavigation)(I,!0),[C,L]=(0,o.useState)(!1);let R;E[0]===Symbol.for("react.memo_cache_sentinel")?(R=()=>L(!0),E[0]=R):R=E[0];const k=R;let B;E[1]!==A?(B=()=>{L(!1),A.stopDrive()},E[1]=A,E[2]=B):B=E[2];const T=B;if(!j&&!C)return null;const F=!0===A.status?.flash;let H,M,N,Y,G,Z,J,q,K,W,Q,U,X,$,tt,et,ot;if(E[3]!==w||E[4]!==x||E[5]!==F||E[6]!==A||E[7]!==T||E[8]!==z||E[9]!==V){const t=(0,b.actionEntry)(A.actions,"personFollow"),e=(0,b.actionEntry)(A.actions,"goHome"),o=(0,b.actionEntry)(A.actions,"stop");N=!0!==w?.open;const l=1+(A.features?.light?1:0)+(t?1:0)+(e?1:0)+(N?1:0);let c;E[24]!==l||E[25]!==w||E[26]!==x||E[27]!==V?(c=(0,h.driveOverlayLayout)({windowWidth:V,edgePad:x,drawer:w,discSize:p.OVERLAY_DISC_SIZE,joystickSize:y.DRIVE_JOYSTICK_SIZE,buttonCount:l}),E[24]=l,E[25]=w,E[26]=x,E[27]=V,E[28]=c):c=E[28];const f=c;Y=f.discSize;const I=x.bottom+v.SPACING.md+p.OVERLAY_DISC_SIZE+v.SPACING.lg;M=s.default,$=n.default.absoluteFill,G="box-none",Z=O;const j=x.left+v.SPACING.md;let P,C;E[29]!==I||E[30]!==j?(P=[_.stick,{left:j,bottom:I}],E[29]=I,E[30]=j,E[31]=P):P=E[31],E[32]!==A.driveVector||E[33]!==T?(C=(0,D.jsx)(y.DriveJoystick,{onVector:A.driveVector,onRelease:T,onEngage:k}),E[32]=A.driveVector,E[33]=T,E[34]=C):C=E[34],E[35]!==P||E[36]!==C?(J=(0,D.jsx)(s.default,{style:P,children:C}),E[35]=P,E[36]=C,E[37]=J):J=E[37],H=s.default,E[38]!==I||E[39]!==f.gap||E[40]!==f.right?(q=[_.buttons,{right:f.right,bottom:I,gap:f.gap}],E[38]=I,E[39]=f.gap,E[40]=f.right,E[41]=q):q=E[41],K="box-none";const L=S(o,z("v2.navigation.stop"));let R;E[42]!==A||E[43]!==o?(R=()=>{A.stopDrive(),o&&A.runAction("stop")},E[42]=A,E[43]=o,E[44]=R):R=E[44],E[45]!==Y||E[46]!==L||E[47]!==R?(W=(0,D.jsx)(p.OverlayDiscButton,{size:Y,icon:u.Square,label:L,onPress:R}),E[45]=Y,E[46]=L,E[47]=R,E[48]=W):W=E[48],E[49]!==F||E[50]!==A||E[51]!==Y||E[52]!==z?(Q=A.features?.light?(0,D.jsx)(p.OverlayDiscButton,{size:Y,icon:u.Lightbulb,label:z(F?"v2.navigation.lightOff":"v2.navigation.lightOn"),active:F,onPress:()=>A.setLightOn(!F)}):null,E[49]=F,E[50]=A,E[51]=Y,E[52]=z,E[53]=Q):Q=E[53],U=t?(0,D.jsx)(p.OverlayDiscButton,{size:Y,icon:u.Footprints,label:S(t,z("v2.navigation.followMe")),active:!0===A.status?.following,onPress:()=>A.runAction("personFollow")}):null,X=e?(0,D.jsx)(p.OverlayDiscButton,{size:Y,icon:u.Home,label:S(e,z("v2.navigation.returnToDock")),onPress:()=>A.runAction("goHome")}):null,E[3]=w,E[4]=x,E[5]=F,E[6]=A,E[7]=T,E[8]=z,E[9]=V,E[10]=H,E[11]=M,E[12]=N,E[13]=Y,E[14]=G,E[15]=Z,E[16]=J,E[17]=q,E[18]=K,E[19]=W,E[20]=Q,E[21]=U,E[22]=X,E[23]=$}else H=E[10],M=E[11],N=E[12],Y=E[13],G=E[14],Z=E[15],J=E[16],q=E[17],K=E[18],W=E[19],Q=E[20],U=E[21],X=E[22],$=E[23];E[54]!==P||E[55]!==N||E[56]!==Y||E[57]!==z?(tt=N?(0,D.jsx)(p.OverlayDiscButton,{size:Y,icon:u.MoreHorizontal,label:z("v2.navigation.moreControls"),onPress:P}):null,E[54]=P,E[55]=N,E[56]=Y,E[57]=z,E[58]=tt):tt=E[58];E[59]!==H||E[60]!==tt||E[61]!==q||E[62]!==K||E[63]!==W||E[64]!==Q||E[65]!==U||E[66]!==X?(et=(0,D.jsxs)(H,{style:q,pointerEvents:K,children:[W,Q,U,X,tt]}),E[59]=H,E[60]=tt,E[61]=q,E[62]=K,E[63]=W,E[64]=Q,E[65]=U,E[66]=X,E[67]=et):et=E[67];E[68]!==M||E[69]!==G||E[70]!==Z||E[71]!==J||E[72]!==et||E[73]!==$?(ot=(0,D.jsxs)(M,{style:$,pointerEvents:G,testID:Z,children:[J,et]}),E[68]=M,E[69]=G,E[70]=Z,E[71]=J,E[72]=et,E[73]=$,E[74]=ot):ot=E[74];return ot};var e=r(d[0]),o=r(d[1]),n=t(r(d[2])),s=t(r(d[3])),l=r(d[4]),c=r(d[5]),u=r(d[6]),v=r(d[7]),f=r(d[8]),b=r(d[9]),p=r(d[10]),y=r(d[11]),h=r(d[12]),D=r(d[13]);const O='drive-overlay';function S(t,e){return t?.label??e}const _=n.default.create({stick:{position:'absolute'},buttons:{position:'absolute',flexDirection:'row',alignItems:'center'}})},1183,[787,16,32,114,973,817,837,835,1258,1259,1152,1260,1184,10]);
|
|
31
|
+
__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"DRIVE_DISC_MIN_SIZE",{enumerable:!0,get:function(){return n}}),e.driveOverlayLayout=function(o){const{windowWidth:c,edgePad:u,drawer:S,discSize:h,joystickSize:s,buttonCount:I}=o,P=(S?.open?Math.max(S.width,u.right):u.right)+t.SPACING.md,f=u.left+t.SPACING.md+s+t.SPACING.lg,C=c-P-f,l=I*h+Math.max(0,I-1)*t.SPACING.md;if(0===I||l<=C)return{right:P,discSize:h,gap:t.SPACING.md};const M=t.SPACING.sm,N=Math.floor((C-(I-1)*M)/I);return{right:P,discSize:Math.max(n,Math.min(h,N)),gap:M}};var t=r(d[0]);const n=28},1184,[835]);
|
|
32
|
+
__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,"PTZ_OVERLAY_TEST_ID",{enumerable:!0,get:function(){return I}}),_e.PtzOverlay=function(e){const u=(0,t.c)(16),{deviceId:_,visible:v,edgePad:P,onInteract:S}=e,{width:w,height:j}=(0,c.useViewportSize)(),z=(0,s.useSafeAreaInsets)();if(!v)return null;let O;u[0]!==P||u[1]!==j||u[2]!==z.top||u[3]!==w?(O=(0,p.ptzOverlayLayout)({windowWidth:w,windowHeight:j,edgePad:P,topInset:z.top,discSize:f.OVERLAY_DISC_SIZE}),u[0]=P,u[1]=j,u[2]=z.top,u[3]=w,u[4]=O):O=u[4];const E=O;let H,W,A;u[5]!==E.bottom||u[6]!==E.left||u[7]!==E.maxHeight||u[8]!==E.maxWidth?(H=[y.panel,{left:E.left,bottom:E.bottom,maxWidth:E.maxWidth,maxHeight:E.maxHeight}],u[5]=E.bottom,u[6]=E.left,u[7]=E.maxHeight,u[8]=E.maxWidth,u[9]=H):H=u[9];u[10]!==_||u[11]!==S?(W=(0,x.jsx)(o.default,{contentContainerStyle:y.body,showsVerticalScrollIndicator:!1,bounces:!1,children:(0,x.jsx)(b.PtzControls,{deviceId:_,hasFeature:!0,onInteract:S})}),u[10]=_,u[11]=S,u[12]=W):W=u[12];u[13]!==H||u[14]!==W?(A=(0,x.jsx)(l.default,{style:n.default.absoluteFill,pointerEvents:"box-none",testID:I,children:(0,x.jsx)(h.GlassPanel,{style:H,children:W})}),u[13]=H,u[14]=W,u[15]=A):A=u[15];return A};var t=r(d[0]);r(d[1]);var o=e(r(d[2])),n=e(r(d[3])),l=e(r(d[4])),s=r(d[5]),c=r(d[6]),u=r(d[7]),h=r(d[8]),f=r(d[9]),b=r(d[10]),p=r(d[11]),x=r(d[12]);const I='ptz-overlay';const y=n.default.create({panel:{position:'absolute'},body:{padding:u.SPACING.lg}})},1185,[787,16,138,32,114,273,973,835,1261,1152,877,1186,10]);
|
|
33
|
+
__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"PTZ_OVERLAY_MAX_WIDTH",{enumerable:!0,get:function(){return n}}),e.ptzOverlayLayout=function(o){const{windowWidth:u,windowHeight:c,edgePad:P,topInset:h,discSize:f}=o,l=P.left+t.SPACING.md,s=P.bottom+t.SPACING.md+f+t.SPACING.lg,A=Math.max(0,Math.min(n,u-l-P.right-t.SPACING.md)),I=Math.max(0,c-s-h-t.SPACING.md);return{left:l,bottom:s,maxWidth:A,maxHeight:I}};var t=r(d[0]);const n=320},1186,[835]);
|
|
34
|
+
__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.aspectFromSample=c,e.useStreamAspect=function(n){const u=(0,t.c)(2);let l;u[0]!==n?(l=t=>c(t.samples[n]??null),u[0]=n,u[1]=l):l=u[1];return(0,s.useStreamDebugStore)(l)};var t=r(d[0]),n=r(d[1]),s=r(d[2]);const u=.5,l=4;function c(t){const s=t?.stats?.width??null,c=t?.stats?.height??null;if(null===s||null===c||s<=0||c<=0)return n.DEFAULT_VIDEO_ASPECT;const o=s/c;return o>=u&&o<=l?o:n.DEFAULT_VIDEO_ASPECT}},1187,[787,1076,1262]);
|
|
35
|
+
__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,"ZoneDrawOverlay",{enumerable:!0,get:function(){return v}});var t=r(d[0]),n=r(d[1]),o=e(r(d[2])),l=e(r(d[3])),i=e(r(d[4])),s=e(r(d[5])),c=r(d[6]),u=r(d[7]),h=e(u),f=r(d[8]),y=r(d[9]),b=r(d[10]),p=r(d[11]),x=r(d[12]);const S='#ffffff',j='rgba(0, 0, 0, 0.55)',v=(0,n.memo)(function(e){const b=(0,t.c)(124),{zone:j,onConfirm:v,onCancel:R}=e,{t:z}=(0,c.useTranslation)(),{colors:k}=(0,y.useTheme)();let I;b[0]===Symbol.for("react.memo_cache_sentinel")?(I={width:0,height:0},b[0]=I):I=b[0];const[T,E]=(0,n.useState)(I),[A,M]=(0,n.useState)("rect"===j?.kind?j.rect:null);let G;b[1]!==j?(G="polygon"===j?.kind?j.points:[],b[1]=j,b[2]=G):G=b[2];const[W,$]=(0,n.useState)(G),[D,N]=(0,n.useState)("polygon"===j?.kind?"polygon":"rect");let H;b[3]===Symbol.for("react.memo_cache_sentinel")?(H={x:0,y:0},b[3]=H):H=b[3];const F=(0,n.useRef)(H),O=(0,n.useRef)(!1);let U;b[4]===Symbol.for("react.memo_cache_sentinel")?(U=e=>{const{width:t,height:n}=e.nativeEvent.layout;E({width:t,height:n})},b[4]=U):U=b[4];const V=U;let L;b[5]===Symbol.for("react.memo_cache_sentinel")?(L=e=>{F.current={x:e.nativeEvent.locationX,y:e.nativeEvent.locationY},O.current=!1},b[5]=L):L=b[5];const X=L;let Y;b[6]!==T||b[7]!==D?(Y=e=>{if(O.current=!0,"rect"!==D)return;const t=(0,p.dragToRect)(F.current.x,F.current.y,e.nativeEvent.locationX,e.nativeEvent.locationY,T.width,T.height);null!==t&&M(t)},b[6]=T,b[7]=D,b[8]=Y):Y=b[8];const q=Y;let Z;b[9]!==T||b[10]!==D?(Z=()=>{if("polygon"!==D||O.current)return;if(T.width<=0||T.height<=0)return;const e={x:Math.min(1,Math.max(0,F.current.x/T.width)),y:Math.min(1,Math.max(0,F.current.y/T.height))};$(t=>[...t,e])},b[9]=T,b[10]=D,b[11]=Z):Z=b[11];const B=Z;let J;b[12]===Symbol.for("react.memo_cache_sentinel")?(J=()=>$(_),b[12]=J):J=b[12];const K=J;let Q;b[13]===Symbol.for("react.memo_cache_sentinel")?(Q=()=>$([]),b[13]=Q):Q=b[13];const ee=Q;let te,ne;b[14]!==D||b[15]!==W||b[16]!==A?(te="rect"===D?null===A?null:(0,p.rectShape)(A):W.length>=3?{kind:"polygon",points:W}:null,ne=null!==te&&(0,p.isShapeUsable)(te),b[14]=D,b[15]=W,b[16]=A,b[17]=te,b[18]=ne):(te=b[17],ne=b[18]);const oe=ne;let le;b[19]!==te||b[20]!==v?(le=()=>{null!==te&&(0,p.isShapeUsable)(te)&&v(te)},b[19]=te,b[20]=v,b[21]=le):le=b[21];const ie=le;let re,se,ae,ce,de,ue;b[22]===Symbol.for("react.memo_cache_sentinel")?(re=[s.default.absoluteFill,C.container],b[22]=re):re=b[22],b[23]!==D||b[24]!==z?(se=z("polygon"===D?"v2.theater.zoneHintPolygon":"v2.theater.zoneHint"),b[23]=D,b[24]=z,b[25]=se):se=b[25],b[26]!==se?(ae=(0,x.jsx)(o.default,{style:C.hintPill,pointerEvents:"none",children:(0,x.jsx)(l.default,{style:C.hintText,numberOfLines:2,children:se})}),b[26]=se,b[27]=ae):ae=b[27],b[28]!==k||b[29]!==D?(ce="rect"===D&&{backgroundColor:k.primary},b[28]=k,b[29]=D,b[30]=ce):ce=b[30],b[31]!==ce?(de=[C.modeChip,ce],b[31]=ce,b[32]=de):de=b[32],b[33]===Symbol.for("react.memo_cache_sentinel")?(ue=()=>N("rect"),b[33]=ue):ue=b[33];const he="rect"===D;let fe,ye,ge,me,be,pe,xe,Se;b[34]!==he?(fe={selected:he},b[34]=he,b[35]=fe):fe=b[35],b[36]===Symbol.for("react.memo_cache_sentinel")?(ye=(0,x.jsx)(f.Square,{size:14,color:S}),b[36]=ye):ye=b[36],b[37]!==z?(ge=z("v2.theater.zoneModeRect"),b[37]=z,b[38]=ge):ge=b[38],b[39]!==ge?(me=(0,x.jsx)(l.default,{style:C.modeText,children:ge}),b[39]=ge,b[40]=me):me=b[40],b[41]!==de||b[42]!==fe||b[43]!==me?(be=(0,x.jsxs)(i.default,{style:de,onPress:ue,accessibilityRole:"button",accessibilityState:fe,children:[ye,me]}),b[41]=de,b[42]=fe,b[43]=me,b[44]=be):be=b[44],b[45]!==k||b[46]!==D?(pe="polygon"===D&&{backgroundColor:k.primary},b[45]=k,b[46]=D,b[47]=pe):pe=b[47],b[48]!==pe?(xe=[C.modeChip,pe],b[48]=pe,b[49]=xe):xe=b[49],b[50]===Symbol.for("react.memo_cache_sentinel")?(Se=()=>N("polygon"),b[50]=Se):Se=b[50];const je="polygon"===D;let ve,Ce,we,Pe,Re,ze,ke,Ie,Te,Ee,Ae,Me,Ge,We;b[51]!==je?(ve={selected:je},b[51]=je,b[52]=ve):ve=b[52],b[53]===Symbol.for("react.memo_cache_sentinel")?(Ce=(0,x.jsx)(f.Pentagon,{size:14,color:S}),b[53]=Ce):Ce=b[53],b[54]!==z?(we=z("v2.theater.zoneModePolygon"),b[54]=z,b[55]=we):we=b[55],b[56]!==we?(Pe=(0,x.jsx)(l.default,{style:C.modeText,children:we}),b[56]=we,b[57]=Pe):Pe=b[57],b[58]!==xe||b[59]!==ve||b[60]!==Pe?(Re=(0,x.jsxs)(i.default,{style:xe,onPress:Se,accessibilityRole:"button",accessibilityState:ve,children:[Ce,Pe]}),b[58]=xe,b[59]=ve,b[60]=Pe,b[61]=Re):Re=b[61],b[62]!==be||b[63]!==Re?(ze=(0,x.jsxs)(o.default,{style:C.modeWrap,pointerEvents:"box-none",children:[be,Re]}),b[62]=be,b[63]=Re,b[64]=ze):ze=b[64],b[65]!==ae||b[66]!==ze?(ke=(0,x.jsxs)(o.default,{style:C.topColumn,pointerEvents:"box-none",children:[ae,ze]}),b[65]=ae,b[66]=ze,b[67]=ke):ke=b[67],b[68]!==T||b[69]!==k||b[70]!==D||b[71]!==A?(Ie="rect"===D&&null!==A&&T.width>0?(0,x.jsx)(o.default,{pointerEvents:"none",style:[C.zoneRect,{borderColor:k.warning,backgroundColor:`${k.warning}26`,left:A.x*T.width,top:A.y*T.height,width:A.w*T.width,height:A.h*T.height}]}):null,b[68]=T,b[69]=k,b[70]=D,b[71]=A,b[72]=Ie):Ie=b[72],b[73]!==T||b[74]!==k||b[75]!==D||b[76]!==W?(Te="polygon"===D&&W.length>0&&T.width>0?(0,x.jsxs)(h.default,{style:s.default.absoluteFill,pointerEvents:"none",children:[W.length>=3?(0,x.jsx)(u.Polygon,{points:W.map(e=>`${e.x*T.width},${e.y*T.height}`).join(" "),fill:`${k.warning}26`,stroke:k.warning,strokeWidth:1.5}):(0,x.jsx)(u.Polyline,{points:W.map(e=>`${e.x*T.width},${e.y*T.height}`).join(" "),fill:"none",stroke:k.warning,strokeWidth:1.5}),W.map((e,t)=>(0,x.jsx)(u.Circle,{cx:e.x*T.width,cy:e.y*T.height,r:5,fill:k.warning},`${e.x}:${e.y}:${t}`))]}):null,b[73]=T,b[74]=k,b[75]=D,b[76]=W,b[77]=Te):Te=b[77],b[78]!==D||b[79]!==W||b[80]!==z?(Ee="polygon"===D&&W.length>0?(0,x.jsxs)(x.Fragment,{children:[(0,x.jsx)(i.default,{style:C.button,onPress:K,accessibilityRole:"button",children:(0,x.jsx)(f.Undo2,{size:14,color:S})}),(0,x.jsx)(i.default,{style:C.button,onPress:ee,accessibilityRole:"button",children:(0,x.jsx)(l.default,{style:C.buttonText,children:z("v2.theater.zoneClearPoints")})})]}):null,b[78]=D,b[79]=W,b[80]=z,b[81]=Ee):Ee=b[81],b[82]!==z?(Ae=z("v2.theater.zoneCancel"),b[82]=z,b[83]=Ae):Ae=b[83],b[84]!==Ae?(Me=(0,x.jsx)(l.default,{style:C.buttonText,children:Ae}),b[84]=Ae,b[85]=Me):Me=b[85],b[86]!==R||b[87]!==Me?(Ge=(0,x.jsx)(i.default,{style:C.button,onPress:R,accessibilityRole:"button",children:Me}),b[86]=R,b[87]=Me,b[88]=Ge):Ge=b[88],b[89]!==k||b[90]!==oe?(We=oe&&{backgroundColor:k.primary},b[89]=k,b[90]=oe,b[91]=We):We=b[91];const $e=!oe&&C.buttonDisabled;let De;b[92]!==We||b[93]!==$e?(De=[C.button,We,$e],b[92]=We,b[93]=$e,b[94]=De):De=b[94];const Ne=!oe,He=!oe;let Fe,Oe,Ue,Ve,Le,Xe,Ye,qe;return b[95]!==He?(Fe={disabled:He},b[95]=He,b[96]=Fe):Fe=b[96],b[97]!==k||b[98]!==oe?(Oe=oe&&{color:k.primaryForeground},b[97]=k,b[98]=oe,b[99]=Oe):Oe=b[99],b[100]!==Oe?(Ue=[C.buttonText,Oe],b[100]=Oe,b[101]=Ue):Ue=b[101],b[102]!==z?(Ve=z("v2.theater.zoneConfirm"),b[102]=z,b[103]=Ve):Ve=b[103],b[104]!==Ue||b[105]!==Ve?(Le=(0,x.jsx)(l.default,{style:Ue,children:Ve}),b[104]=Ue,b[105]=Ve,b[106]=Le):Le=b[106],b[107]!==ie||b[108]!==De||b[109]!==Ne||b[110]!==Fe||b[111]!==Le?(Xe=(0,x.jsx)(i.default,{style:De,onPress:ie,disabled:Ne,accessibilityRole:"button",accessibilityState:Fe,children:Le}),b[107]=ie,b[108]=De,b[109]=Ne,b[110]=Fe,b[111]=Le,b[112]=Xe):Xe=b[112],b[113]!==Ee||b[114]!==Ge||b[115]!==Xe?(Ye=(0,x.jsxs)(o.default,{style:C.actions,pointerEvents:"box-none",children:[Ee,Ge,Xe]}),b[113]=Ee,b[114]=Ge,b[115]=Xe,b[116]=Ye):Ye=b[116],b[117]!==q||b[118]!==B||b[119]!==ke||b[120]!==Ie||b[121]!==Te||b[122]!==Ye?(qe=(0,x.jsxs)(o.default,{style:re,onLayout:V,onStartShouldSetResponder:w,onMoveShouldSetResponder:P,onResponderGrant:X,onResponderMove:q,onResponderRelease:B,children:[ke,Ie,Te,Ye]}),b[117]=q,b[118]=B,b[119]=ke,b[120]=Ie,b[121]=Te,b[122]=Ye,b[123]=qe):qe=b[123],qe}),C=s.default.create({modeWrap:{alignSelf:'flex-end',flexDirection:'row',gap:6},modeChip:{flexDirection:'row',alignItems:'center',gap:5,paddingHorizontal:9,paddingVertical:5,borderRadius:999,backgroundColor:j},modeText:{color:S,fontSize:11,fontWeight:'600'},container:{zIndex:60,backgroundColor:'rgba(0, 0, 0, 0.25)'},topColumn:{position:'absolute',top:b.SPACING.md,left:b.SPACING.md,right:b.SPACING.md,gap:b.SPACING.sm},hintPill:{alignSelf:'center',backgroundColor:j,paddingHorizontal:b.SPACING.md,paddingVertical:b.SPACING.xs+2,borderRadius:b.RADIUS.lg,maxWidth:'90%'},hintText:{color:S,fontSize:11,fontWeight:'600',textAlign:'center'},zoneRect:{position:'absolute',borderWidth:2,borderRadius:2},actions:{position:'absolute',right:b.SPACING.md,bottom:b.SPACING.md,flexDirection:'row',alignItems:'center',gap:6},button:{flexDirection:'row',alignItems:'center',gap:5,paddingHorizontal:9,paddingVertical:5,borderRadius:999,backgroundColor:j},buttonDisabled:{opacity:.5},buttonText:{color:S,fontSize:11,fontWeight:'600'}});function _(e){return e.slice(0,-1)}function w(){return!0}function P(){return!0}},1188,[787,16,114,193,247,32,817,1263,837,789,835,1264,10]);
|
|
36
|
+
__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,"ZoneActiveOverlay",{enumerable:!0,get:function(){return f}});var t=r(d[0]),n=r(d[1]),o=e(r(d[2])),l=e(r(d[3])),h=r(d[4]),c=e(h),s=r(d[5]),u=r(d[6]);const f=(0,n.memo)(function(e){const f=(0,t.c)(9),{zone:y}=e,{colors:b}=(0,s.useTheme)();let _;f[0]===Symbol.for("react.memo_cache_sentinel")?(_={width:0,height:0},f[0]=_):_=f[0];const[p,v]=(0,n.useState)(_);let j;f[1]===Symbol.for("react.memo_cache_sentinel")?(j=e=>{const{width:t,height:n}=e.nativeEvent.layout;v({width:t,height:n})},f[1]=j):j=f[1];const x=j;let k,$;return f[2]!==p.height||f[3]!==p.width||f[4]!==b||f[5]!==y?(k=p.width<=0||p.height<=0?null:"rect"===y.kind?(0,u.jsx)(o.default,{style:[w.zoneRect,{borderColor:b.warning,backgroundColor:`${b.warning}14`,left:y.rect.x*p.width,top:y.rect.y*p.height,width:y.rect.w*p.width,height:y.rect.h*p.height}]}):(0,u.jsx)(c.default,{style:l.default.absoluteFill,pointerEvents:"none",children:(0,u.jsx)(h.Polygon,{points:y.points.map(e=>`${e.x*p.width},${e.y*p.height}`).join(" "),fill:`${b.warning}14`,stroke:b.warning,strokeWidth:1.5})}),f[2]=p.height,f[3]=p.width,f[4]=b,f[5]=y,f[6]=k):k=f[6],f[7]!==k?($=(0,u.jsx)(o.default,{style:l.default.absoluteFill,onLayout:x,pointerEvents:"none",children:k}),f[7]=k,f[8]=$):$=f[8],$}),w=l.default.create({zoneRect:{position:'absolute',borderWidth:1.5,borderRadius:2}})},1189,[787,16,114,32,1263,789,10]);
|
|
37
|
+
__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.BelowStreamArea=function(e){const c=(0,n.c)(25),{width:v,currentDeviceId:_,wallShowing:y,onGoTo:C,onCellPanel:O,onOpenPlayback:P}=e,{data:b}=(0,l.useCameras)(),j=(0,u.useWorkspaceStore)(w),x=(0,u.useWorkspaceStore)(h);let W,D,G;c[0]!==b||c[1]!==x?(W=()=>{void 0!==b&&0!==b.length&&x(b.map(p))},D=[b,x],c[0]=b,c[1]=x,c[2]=W,c[3]=D):(W=c[2],D=c[3]);(0,t.useEffect)(W,D),c[4]!==_||c[5]!==j?(G=(0,f.workspaceOnScreenCameras)(j,_),c[4]=_,c[5]=j,c[6]=G):G=c[6];const I=G,M=y?k.rootStrip:k.root;let T,A,B,E,F;c[7]!==v?(T={width:v},c[7]=v,c[8]=T):T=c[8];c[9]!==M||c[10]!==T?(A=[M,T],c[9]=M,c[10]=T,c[11]=A):A=c[11];c[12]!==y?(B=(0,f.shelfVariantFor)(y),c[12]=y,c[13]=B):B=c[13];c[14]!==_||c[15]!==O||c[16]!==C||c[17]!==P||c[18]!==I||c[19]!==B||c[20]!==v?(E=(0,S.jsx)(s.CameraShelf,{currentDeviceId:_,contentWidth:v,variant:B,alreadyOnScreen:I,onGoTo:C,onCellPanel:O,onOpenPlayback:P}),c[14]=_,c[15]=O,c[16]=C,c[17]=P,c[18]=I,c[19]=B,c[20]=v,c[21]=E):E=c[21];c[22]!==A||c[23]!==E?(F=(0,S.jsx)(o.default,{style:A,children:E}),c[22]=A,c[23]=E,c[24]=F):F=c[24];return F};var n=r(d[0]),t=r(d[1]),o=e(r(d[2])),c=e(r(d[3])),l=r(d[4]),u=r(d[5]),s=r(d[6]),f=r(d[7]),S=r(d[8]);function p(e){return e.id}function h(e){return e.reconcile}function w(e){return e.workspace.members}const k=c.default.create({root:{flex:1,minHeight:0,alignSelf:'center'},rootStrip:{alignSelf:'center'}})},1190,[787,16,114,32,827,1191,1194,1199,10]);
|
|
38
|
+
__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"useWorkspaceStore",{enumerable:!0,get:function(){return n}});var s=r(d[0]),o=r(d[1]),t=r(d[2]);function c(s,o){return{workspace:o,wallOptions:0===o.members.length?t.NO_WALL_OPTIONS:s.wallOptions}}const n=(0,s.create)(s=>({workspace:o.EMPTY_WORKSPACE,wallOptions:t.NO_WALL_OPTIONS,setWallOptions:o=>s(s=>({wallOptions:{...s.wallOptions,...o}})),add:t=>s(s=>c(s,(0,o.addMember)(s.workspace,t))),setMembers:t=>s(s=>c(s,(0,o.setMembers)(s.workspace,t))),remove:t=>s(s=>c(s,(0,o.removeMember)(s.workspace,t))),setPrimaryCamera:t=>s(s=>({workspace:(0,o.setPrimary)(s.workspace,t)})),resize:(t,c)=>s(s=>({workspace:(0,o.resizeMember)(s.workspace,t,c)})),reconcile:t=>s(s=>c(s,(0,o.reconcileMembers)(s.workspace,t))),clear:()=>s({workspace:o.EMPTY_WORKSPACE,wallOptions:t.NO_WALL_OPTIONS})}))},1191,[1265,1192,1193]);
|
|
39
|
+
__d(function(g,r,_i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"EMPTY_WORKSPACE",{enumerable:!0,get:function(){return n}}),e.addMember=function(n,s){return Number.isFinite(s)?n.members.includes(s)?n:{members:[...n.members,s],primaryId:n.primaryId??s,cells:n.cells}:n},e.setMembers=function(i,t){const l=[];for(const n of t)Number.isFinite(n)&&(l.includes(n)||l.push(n));if(0===l.length)return n;if(l.length===i.members.length&&l.every((n,s)=>i.members[s]===n))return i;return{members:l,primaryId:null!==i.primaryId&&l.includes(i.primaryId)?i.primaryId:l[0],cells:s(i.cells,l)}},e.removeMember=function(i,t){if(!i.members.includes(t))return i;const l=i.members.filter(n=>n!==t);return 0===l.length?n:{members:l,primaryId:i.primaryId===t?l[0]:i.primaryId,cells:s(i.cells,l)}},e.setPrimary=function(n,s){return n.members.includes(s)?n.primaryId===s?n:{members:n.members,primaryId:s,cells:n.cells}:n},e.reconcileMembers=function(i,t){const l=new Set(t),c=i.members.filter(n=>l.has(n));return c.length===i.members.length?i:0===c.length?n:{members:c,primaryId:null!==i.primaryId&&l.has(i.primaryId)?i.primaryId:c[0],cells:s(i.cells,c)}},e.resizeMember=function(n,s,i){if(!n.members.includes(s))return n;const t=Number.isFinite(i.cw)?Math.max(1,Math.round(i.cw)):1,l=Number.isFinite(i.ch)?Math.max(1,Math.round(i.ch)):1,c=n.cells[s];if(1===t&&1===l){if(void 0===c)return n;const i={...n.cells};return delete i[s],{members:n.members,primaryId:n.primaryId,cells:i}}return void 0!==c&&c.cw===t&&c.ch===l?n:{members:n.members,primaryId:n.primaryId,cells:{...n.cells,[s]:{cw:t,ch:l}}}},e.isMember=function(n,s){return n.members.includes(s)};const n={members:[],primaryId:null,cells:{}};function s(n,s){const i=Object.keys(n);if(0===i.length)return n;const t={};let l=!1;for(const c of i){const i=Number(c);s.includes(i)?t[i]=n[i]:l=!0}return l?t:n}},1192,[]);
|
|
40
|
+
__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"NO_WALL_OPTIONS",{enumerable:!0,get:function(){return o}}),e.gateLiveHighlight=u,e.resolveWorkspaceWall=function(o,h,c){const s=h.highlightOn??o.highlight.enabled,b={...(y=o.highlight,(0,t.withHighlightDefaults)({motion:y.motion,audio:y.audio,audioDb:y.audioDb,audioHoldSec:y.audioHoldSec,detection:y.detection,detectionHoldSec:y.detectionHoldSec,detectionClasses:y.detectionClasses,clusterLabel:y.clusterLabel})),...h.highlight??{}},f=h.layers??(o.showBoxes?l:n);var y;return{quality:h.quality??o.quality,layout:h.layout??'auto',highlightOn:s,highlightSettings:b,highlight:u({...o.highlight,...b,enabled:s},c),layers:f,showBoxes:f.includes('objects'),activeOnly:h.activeOnly??!1}},e.toggleWallLayer=function(t,o){return t.includes(o)?t.filter(t=>t!==o):[...t,o]},e.toggleWallAudio=function(t,o){return t.length>0?[]:[...o]};var t=r(d[0]);const o={},l=['objects'],n=[];function u(t,o){return o?t:{...t,enabled:!1,motion:!1,detection:!1,audio:'off'}}},1193,[1032]);
|
|
41
|
+
__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,"CAMERA_SHELF_TEST_ID",{enumerable:!0,get:function(){return L}}),Object.defineProperty(_e,"SHELF_VARIANT_TEST_ID",{enumerable:!0,get:function(){return O}}),Object.defineProperty(_e,"CAMERA_SHELF_PENDING_TEST_ID",{enumerable:!0,get:function(){return k}}),Object.defineProperty(_e,"REEL_HIGHLIGHT_BUTTON_TEST_ID",{enumerable:!0,get:function(){return z}}),_e.CameraShelf=function(e){const o=(0,t.c)(67),{currentDeviceId:u,onGoTo:p,onCellPanel:I,onOpenPlayback:y,variant:x,contentWidth:T,alreadyOnScreen:_}=e,A=void 0===x?"rows":x,R=void 0===T?0:T,D=void 0===_?B:_,{colors:w}=(0,f.useTheme)(),{t:E}=(0,H.useTranslation)();let V;o[0]!==w?(V=q(w),o[0]=w,o[1]=V):V=o[1];const J=V,{data:K,status:Q}=(0,S.useCameras)(),X=(0,C.useScreenActive)(),Y=(0,j.useReelHighlightStore)(M),Z=(0,j.useReelHighlightStore)(F),[$,ee]=(0,n.useState)(!1);let te,ie,ne,oe;o[2]!==Z?(te=()=>{Z()},ie=[Z],o[2]=Z,o[3]=te,o[4]=ie):(te=o[3],ie=o[4]);(0,n.useEffect)(te,ie),o[5]!==K?(ne=K??[],o[5]=K,o[6]=ne):ne=o[6];o[7]!==D||o[8]!==u||o[9]!==ne?(oe=(0,W.shelfCameras)(ne,u,D),o[7]=D,o[8]=u,o[9]=ne,o[10]=oe):oe=o[10];const re=oe;let le;o[11]!==R?(le=(0,W.fitShelfRow)({contentWidth:R,gap:b.SPACING.sm,minCardWidth:W.SHELF_CARD_WIDTH}),o[11]=R,o[12]=le):le=o[12];const ae=le,se="strip"===A;if(void 0===K){if("error"===Q)return null;const e=se?J.rootStrip:J.root;let t;o[13]!==E?(t=E("v2.cameraShelf.loadingA11y"),o[13]=E,o[14]=t):t=o[14];const n=J.pending,c=J.pendingText;let h,u,f,b;return o[15]!==E?(h=E("v2.cameraShelf.loading"),o[15]=E,o[16]=h):h=o[16],o[17]!==J.pendingText||o[18]!==h?(u=(0,N.jsx)(s.default,{style:c,children:h}),o[17]=J.pendingText,o[18]=h,o[19]=u):u=o[19],o[20]!==J.pending||o[21]!==t||o[22]!==u?(f=(0,N.jsx)(l.default,{testID:k,accessibilityRole:"progressbar",accessibilityLabel:t,style:n,children:u}),o[20]=J.pending,o[21]=t,o[22]=u,o[23]=f):f=o[23],o[24]!==e||o[25]!==f?(b=(0,N.jsx)(l.default,{testID:L,style:e,children:f}),o[24]=e,o[25]=f,o[26]=b):b=o[26],b}if(0===re.length)return null;const de=se?J.rootStrip:J.root,ce=O[A],he=J.scroll,ue=se?J.strip:J.rows;let ge,fe,me,be,Se,pe,Ie,Ce,ye;if(o[27]!==X||o[28]!==Y||o[29]!==I||o[30]!==p||o[31]!==y||o[32]!==re||o[33]!==ae||o[34]!==se){let e;o[36]!==X||o[37]!==Y||o[38]!==I||o[39]!==p||o[40]!==y||o[41]!==ae||o[42]!==se?(e=e=>(0,N.jsx)(U,{camera:e,width:se?G.STRIP_CARD_WIDTH:ae.cardWidth,active:X,onGoTo:p,onOpenPlayback:y,onCellPanel:I,highlight:Y},e.id),o[36]=X,o[37]=Y,o[38]=I,o[39]=p,o[40]=y,o[41]=ae,o[42]=se,o[43]=e):e=o[43],ge=re.map(e),o[27]=X,o[28]=Y,o[29]=I,o[30]=p,o[31]=y,o[32]=re,o[33]=ae,o[34]=se,o[35]=ge}else ge=o[35];o[44]!==se||o[45]!==J.scroll||o[46]!==ce||o[47]!==ue||o[48]!==ge?(fe=(0,N.jsx)(c.default,{testID:ce,horizontal:se,style:he,contentContainerStyle:ue,showsVerticalScrollIndicator:!1,showsHorizontalScrollIndicator:!1,children:ge}),o[44]=se,o[45]=J.scroll,o[46]=ce,o[47]=ue,o[48]=ge,o[49]=fe):fe=o[49];o[50]===Symbol.for("react.memo_cache_sentinel")?(me=()=>ee(!0),o[50]=me):me=o[50];o[51]!==E?(be=E("v2.reelHighlight.openA11y"),o[51]=E,o[52]=be):be=o[52];o[53]!==w.foreground?(Se=(0,N.jsx)(v.SlidersHorizontal,{size:15,color:w.foreground}),o[53]=w.foreground,o[54]=Se):Se=o[54];o[55]!==J.highlightBtn||o[56]!==be||o[57]!==Se?(pe=(0,N.jsx)(h.default,{onPress:me,hitSlop:8,accessibilityRole:"button",accessibilityLabel:be,testID:z,style:J.highlightBtn,children:Se}),o[55]=J.highlightBtn,o[56]=be,o[57]=Se,o[58]=pe):pe=o[58];o[59]===Symbol.for("react.memo_cache_sentinel")?(Ie=()=>ee(!1),o[59]=Ie):Ie=o[59];o[60]!==$?(Ce=(0,N.jsx)(P.ReelHighlightSheet,{visible:$,onClose:Ie}),o[60]=$,o[61]=Ce):Ce=o[61];o[62]!==de||o[63]!==fe||o[64]!==pe||o[65]!==Ce?(ye=(0,N.jsxs)(l.default,{testID:L,style:de,children:[fe,pe,Ce]}),o[62]=de,o[63]=fe,o[64]=pe,o[65]=Ce,o[66]=ye):ye=o[66];return ye};var t=r(d[0]),n=r(d[1]),o=e(n),l=e(r(d[2])),s=e(r(d[3])),c=e(r(d[4])),h=e(r(d[5])),u=e(r(d[6])),f=r(d[7]),b=r(d[8]),S=r(d[9]),p=r(d[10]),I=r(d[11]),C=r(d[12]),y=r(d[13]),x=r(d[14]),T=r(d[15]),_=r(d[16]),A=r(d[17]),P=r(d[18]),R=r(d[19]),j=r(d[20]),v=r(d[21]),D=r(d[22]),H=r(d[23]),w=r(d[24]),E=r(d[25]),W=r(d[26]),G=r(d[27]),N=r(d[28]);const L='camera-shelf',O={rows:'camera-shelf-rows',strip:'camera-shelf-strip'},k='camera-shelf-pending',z='camera-shelf-highlight-settings',B=[];function F(e){return e.hydrate}function M(e){return e.highlight}const U=o.default.memo(function(e){const n=(0,t.c)(53),{camera:o,width:c,active:u,onGoTo:C,onCellPanel:P,onOpenPlayback:j,highlight:v}=e,{colors:H}=(0,f.useTheme)();let W;n[0]!==H?(W=q(H),n[0]=H,n[1]=W):W=n[1];const G=W,L=(0,E.useWorkspaceStore)(J),O=(0,I.useCanActuate)(),k=o.id;let z;n[2]!==c?(z=(0,y.snapshotWidthForCssPx)(c),n[2]=c,n[3]=z):z=n[3];const B=(0,p.useSnapshot)(k,u,z);let F;n[4]!==o.features||n[5]!==O?(F=(0,w.cameraActionBarItems)({hasPtz:O&&o.features.includes(S.FEATURE.ptz),layout:w.SHELF_CONTROLS,canNavigate:!0}),n[4]=o.features,n[5]=O,n[6]=F):F=n[6];const M=F;let U;n[7]!==L||n[8]!==o.id||n[9]!==P||n[10]!==C||n[11]!==j?(U=e=>{"goTo"!==e?"addToView"!==e?"playback"!==e?(0,w.isCameraPanelAction)(e)&&P(e,o.id):j(o.id):L(o.id):C(o.id)},n[7]=L,n[8]=o.id,n[9]=P,n[10]=C,n[11]=j,n[12]=U):U=n[12];const K=U,Q=(0,R.useReelHighlightTrigger)(o.id,v,u),X=(0,D.useSettings)().settings.highlight;let Y,Z,$,ee,te,ie,ne,oe,re,le,ae;return n[13]!==c?(Y={width:c},n[13]=c,n[14]=Y):Y=n[14],n[15]!==G.card||n[16]!==Y?(Z=[G.card,Y],n[15]=G.card,n[16]=Y,n[17]=Z):Z=n[17],n[18]!==o.id||n[19]!==C?($=()=>C(o.id),n[18]=o.id,n[19]=C,n[20]=$):$=n[20],n[21]!==o.id||n[22]!==B||n[23]!==G.thumb?(ee=(0,N.jsx)(x.SnapshotImage,{source:B,deviceId:o.id,style:G.thumb}),n[21]=o.id,n[22]=B,n[23]=G.thumb,n[24]=ee):ee=n[24],n[25]!==o.name||n[26]!==G.thumbWrap||n[27]!==$||n[28]!==ee?(te=(0,N.jsx)(h.default,{onPress:$,accessibilityRole:"button",accessibilityLabel:o.name,style:G.thumbWrap,children:ee}),n[25]=o.name,n[26]=G.thumbWrap,n[27]=$,n[28]=ee,n[29]=te):te=n[29],n[30]!==o.disabled||n[31]!==o.id||n[32]!==o.online?(ie=(0,N.jsx)(T.CameraStatusDot,{deviceId:o.id,online:o.online,disabled:o.disabled}),n[30]=o.disabled,n[31]=o.id,n[32]=o.online,n[33]=ie):ie=n[33],n[34]!==o.name||n[35]!==G.name?(ne=(0,N.jsx)(s.default,{style:G.name,numberOfLines:1,children:o.name}),n[34]=o.name,n[35]=G.name,n[36]=ne):ne=n[36],n[37]!==G.footer||n[38]!==ie||n[39]!==ne?(oe=(0,N.jsxs)(l.default,{style:G.footer,children:[ie,ne]}),n[37]=G.footer,n[38]=ie,n[39]=ne,n[40]=oe):oe=n[40],n[41]!==M||n[42]!==K?(re=(0,N.jsx)(_.CameraActionBar,{items:M,onAction:K,variant:"surface"}),n[41]=M,n[42]=K,n[43]=re):re=n[43],n[44]!==X||n[45]!==Q?(le=null===Q?null:(0,N.jsx)(A.MotionBorder,{color:X[V[Q]],radius:b.RADIUS.md}),n[44]=X,n[45]=Q,n[46]=le):le=n[46],n[47]!==te||n[48]!==oe||n[49]!==re||n[50]!==le||n[51]!==Z?(ae=(0,N.jsxs)(l.default,{style:Z,children:[te,oe,re,le]}),n[47]=te,n[48]=oe,n[49]=re,n[50]=le,n[51]=Z,n[52]=ae):ae=n[52],ae}),V={motion:'motionColor',audio:'audioColor',detection:'detectionColor'};function q(e){return u.default.create({root:{flex:1,minHeight:0,alignSelf:'stretch',paddingTop:b.SPACING.sm},rootStrip:{height:G.SHELF_STRIP_HEIGHT,alignSelf:'stretch',paddingVertical:b.SPACING.sm},scroll:{flex:1,minHeight:0},pending:{flex:1,minHeight:0,alignItems:'center',justifyContent:'center'},pendingText:{color:e.foregroundMuted,fontSize:12},rows:{flexDirection:'row',flexWrap:'wrap',gap:b.SPACING.sm,paddingBottom:b.SPACING.md},strip:{flexDirection:'row',gap:b.SPACING.sm,alignItems:'flex-start'},card:{borderRadius:b.RADIUS.md,overflow:'hidden',backgroundColor:e.backgroundElevated,borderWidth:u.default.hairlineWidth,borderColor:e.border,padding:b.SPACING.xs,gap:b.SPACING.xs},highlightBtn:{position:'absolute',top:0,right:0,width:28,height:28,borderRadius:b.RADIUS.md,alignItems:'center',justifyContent:'center',backgroundColor:e.backgroundElevated,borderWidth:u.default.hairlineWidth,borderColor:e.border,zIndex:2},thumbWrap:{width:'100%',aspectRatio:1.7777777777777777,borderRadius:b.RADIUS.sm,overflow:'hidden',backgroundColor:'#000'},thumb:{width:'100%',height:'100%'},footer:{flexDirection:'row',alignItems:'center',gap:b.SPACING.xs},name:{flex:1,color:e.foreground,fontSize:12,fontWeight:'600'}})}function J(e){return e.add}},1194,[787,16,114,193,138,247,32,789,835,827,838,832,831,790,848,850,1266,849,1195,1196,1121,837,833,817,1267,1191,1198,1199,10]);
|
|
42
|
+
__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,"ReelHighlightSheet",{enumerable:!0,get:function(){return p}});var t=r(d[0]),o=r(d[1]),n=e(r(d[2])),l=e(r(d[3])),s=e(r(d[4])),c=e(r(d[5])),u=e(r(d[6])),h=r(d[7]),f=r(d[8]),S=r(d[9]),b=r(d[10]),x=r(d[11]),C=r(d[12]),R=r(d[13]),I=r(d[14]),j=r(d[15]);const p=(0,o.memo)(function(e){const o=(0,t.c)(53),{visible:u,onClose:b}=e,{colors:p}=(0,S.useTheme)(),{t:v}=(0,h.useTranslation)(),G=(0,I.useReelHighlightStore)(H),N=(0,I.useReelHighlightStore)(A),T=(0,I.useReelHighlightStore)(P);let k,B,_,z,D,w,U,E,M,L,O,V,W,X,q,F,J,K,Q;return o[0]!==p.backgroundElevated?(k=[y.sheet,{backgroundColor:p.backgroundElevated}],o[0]=p.backgroundElevated,o[1]=k):k=o[1],o[2]!==p.foreground?(B=[y.title,{color:p.foreground}],o[2]=p.foreground,o[3]=B):B=o[3],o[4]!==v?(_=v("v2.reelHighlight.title"),o[4]=v,o[5]=_):_=o[5],o[6]!==B||o[7]!==_?(z=(0,j.jsx)(l.default,{style:B,children:_}),o[6]=B,o[7]=_,o[8]=z):z=o[8],o[9]!==v?(D=v("v2.reelHighlight.close"),o[9]=v,o[10]=D):D=o[10],o[11]!==p.surface?(w=[y.iconBtn,{backgroundColor:p.surface}],o[11]=p.surface,o[12]=w):w=o[12],o[13]!==p.foreground?(U=(0,j.jsx)(f.X,{size:18,color:p.foreground}),o[13]=p.foreground,o[14]=U):U=o[14],o[15]!==b||o[16]!==D||o[17]!==w||o[18]!==U?(E=(0,j.jsx)(s.default,{onPress:b,hitSlop:10,accessibilityRole:"button",accessibilityLabel:D,style:w,children:U}),o[15]=b,o[16]=D,o[17]=w,o[18]=U,o[19]=E):E=o[19],o[20]!==z||o[21]!==E?(M=(0,j.jsxs)(n.default,{style:y.header,children:[z,E]}),o[20]=z,o[21]=E,o[22]=M):M=o[22],o[23]!==v?(L=v("v2.reelHighlight.section"),o[23]=v,o[24]=L):L=o[24],o[25]!==G||o[26]!==N?(O=(0,j.jsx)(R.HighlightTriggerRows,{highlight:G,onSetHighlight:N}),o[25]=G,o[26]=N,o[27]=O):O=o[27],o[28]!==L||o[29]!==O?(V=(0,j.jsx)(C.Section,{title:L,children:O}),o[28]=L,o[29]=O,o[30]=V):V=o[30],o[31]!==p.surface?(W=[y.resetBtn,{backgroundColor:p.surface}],o[31]=p.surface,o[32]=W):W=o[32],o[33]!==p.foreground?(X=[y.resetText,{color:p.foreground}],o[33]=p.foreground,o[34]=X):X=o[34],o[35]!==v?(q=v("v2.reelHighlight.reset"),o[35]=v,o[36]=q):q=o[36],o[37]!==X||o[38]!==q?(F=(0,j.jsx)(l.default,{style:X,children:q}),o[37]=X,o[38]=q,o[39]=F):F=o[39],o[40]!==T||o[41]!==W||o[42]!==F?(J=(0,j.jsx)(s.default,{onPress:T,accessibilityRole:"button",style:W,children:F}),o[40]=T,o[41]=W,o[42]=F,o[43]=J):J=o[43],o[44]!==V||o[45]!==J?(K=(0,j.jsxs)(c.default,{contentContainerStyle:y.scroll,children:[V,J]}),o[44]=V,o[45]=J,o[46]=K):K=o[46],o[47]!==b||o[48]!==k||o[49]!==K||o[50]!==M||o[51]!==u?(Q=(0,j.jsxs)(x.SheetModal,{visible:u,onClose:b,sheetStyle:k,children:[M,K]}),o[47]=b,o[48]=k,o[49]=K,o[50]=M,o[51]=u,o[52]=Q):Q=o[52],Q}),y=u.default.create({sheet:{maxHeight:'85%',borderTopLeftRadius:b.RADIUS.xl,borderTopRightRadius:b.RADIUS.xl,paddingHorizontal:b.SPACING.md,paddingTop:b.SPACING.md},header:{flexDirection:'row',alignItems:'center',justifyContent:'space-between',paddingBottom:b.SPACING.sm},title:{fontSize:18,fontWeight:'700'},iconBtn:{width:32,height:32,borderRadius:b.RADIUS.md,alignItems:'center',justifyContent:'center'},scroll:{gap:b.SPACING.lg,paddingVertical:b.SPACING.sm,paddingBottom:b.SPACING.xl},resetBtn:{alignItems:'center',paddingVertical:b.SPACING.md,borderRadius:b.RADIUS.md,marginHorizontal:b.SPACING.md},resetText:{fontSize:15,fontWeight:'600'}});function H(e){return e.highlight}function A(e){return e.setHighlight}function P(e){return e.reset}},1195,[787,16,114,193,247,138,32,817,837,789,835,869,870,1268,1121,10]);
|
|
43
|
+
__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.useReelHighlightTrigger=function(H,f,h){const _=(0,t.c)(7);let C;_[0]!==f?(C=(0,c.reelHighlightDemand)(f),_[0]=f,_[1]=C):C=_[1];const D=C,b=(0,n.useMotionHighlight)(H,h&&D.motion),v=(0,s.useAudioActive)(H,h&&D.audio?f.audio:"off",f.audioDb),A=(0,u.useHeld)(h&&D.audio&&v,1e3*l.AUDIO_HIGHLIGHT_HOLD_SEC),I=(0,o.useDetections)(H,h&&D.detection);let O;_[2]!==D||_[3]!==I||_[4]!==h||_[5]!==f.detectionClasses?(O=h&&D.detection&&I.boxes.some(t=>0===f.detectionClasses.length||f.detectionClasses.includes(t.label)),_[2]=D,_[3]=I,_[4]=h,_[5]=f.detectionClasses,_[6]=O):O=_[6];const G=O;if((0,u.useHeld)(G,1e3*f.detectionHoldSec))return"detection";if(b)return"motion";if(A)return"audio";return null};var t=r(d[0]),o=r(d[1]),n=r(d[2]),s=r(d[3]),u=r(d[4]),l=r(d[5]),c=r(d[6])},1196,[787,1242,847,1243,1197,1244,1122]);
|
|
44
|
+
__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.useHeld=function(n,c){const o=(0,t.c)(4),[s,f]=(0,u.useState)(n);let l,_;o[0]!==n||o[1]!==c?(l=()=>{if(n)return void f(!0);const t=setTimeout(()=>f(!1),Math.max(0,c));return()=>clearTimeout(t)},_=[n,c],o[0]=n,o[1]=c,o[2]=l,o[3]=_):(l=o[2],_=o[3]);return(0,u.useEffect)(l,_),s};var t=r(d[0]),u=r(d[1])},1197,[787,16]);
|
|
45
|
+
__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.shouldShowCameraShelf=function(t){return'wide'===t},e.shelfCameras=function(t,n,o=[]){return t.filter(t=>t.id!==n&&!o.includes(t.id))},Object.defineProperty(e,"SHELF_CARD_WIDTH",{enumerable:!0,get:function(){return t}}),e.fitShelfRow=function({contentWidth:t,gap:n,minCardWidth:o}){if(!Number.isFinite(t)||t<o)return{perRow:1,cardWidth:o};const u=Math.max(1,Math.floor((t+n)/(o+n))),f=Math.floor((t-n*(u-1))/u);return{perRow:u,cardWidth:Math.max(o,f)}};const t=180},1198,[]);
|
|
46
|
+
__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.canHostWorkspaceWall=t,Object.defineProperty(e,"WORKSPACE_GRID_MIN_CAMERAS",{enumerable:!0,get:function(){return o}}),e.shouldShowWorkspaceGrid=function(n,u,s){return!!t(n)&&c(u,s).length>=o},e.workspaceOnScreenCameras=c,e.shelfVariantFor=function(n){return n?'strip':'rows'},Object.defineProperty(e,"STRIP_CARD_WIDTH",{enumerable:!0,get:function(){return u}}),Object.defineProperty(e,"SHELF_STRIP_HEIGHT",{enumerable:!0,get:function(){return s}});const n={wide:!0,fill:!0,stack:!0};function t(t){return n[t]}const o=2;function c(n,t){return[t,...n.filter(n=>n!==t)]}const u=132,s=154},1199,[]);
|
|
47
|
+
__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.WorkspaceStage=function(A){const I=(0,t.c)(91),{devices:C,primary:j,liveOverlaysVisible:G,onGoTo:L,onCellPanel:x}=A,{t:z}=(0,n.useTranslation)(),D=(0,o.useWorkspaceStore)(_),R=(0,o.useWorkspaceStore)(P),E=(0,o.useWorkspaceStore)(w),H=(0,o.useWorkspaceStore)(q),K=(0,o.useWorkspaceStore)(b),M=(0,o.useWorkspaceStore)(k);let B;if(I[0]!==D){B={};for(const t of Object.keys(D))B[t]=D[Number(t)];I[0]=D,I[1]=B}else B=I[1];const F=B,{data:N}=(0,s.useCameras)(),[Q,U]=(0,l.useState)(p),[V,J]=(0,l.useState)(f);let X;if(I[2]!==N||I[3]!==C){let t;I[5]!==N?(t=t=>(N??[]).find(l=>l.id===t),I[5]=N,I[6]=t):t=I[6],X=C.map(t).filter(S),I[2]=N,I[3]=C,I[4]=X}else X=I[4];const Y=X;let Z;I[7]!==Y?(Z=new Set(Y.filter(W).map(T)),I[7]=Y,I[8]=Z):Z=I[8];const $=Z;let ee;if(I[9]!==$||I[10]!==C||I[11]!==Q){let t;I[13]!==$?(t=t=>({id:t,batteryPowered:$.has(t)}),I[13]=$,I[14]=t):t=I[14],ee=(0,c.heldTileIds)(C.map(t),Q),I[9]=$,I[10]=C,I[11]=Q,I[12]=ee}else ee=I[12];const te=ee;let le;I[15]!==$?(le=t=>{U(l=>(0,c.toggleTileTransport)(l,t,$.has(t)))},I[15]=$,I[16]=le):le=I[16];const ie=le;let ne;I[17]===Symbol.for("react.memo_cache_sentinel")?(ne=t=>{J(l=>l.includes(t)?l.filter(l=>l!==t):[...l,t])},I[17]=ne):ne=I[17];const oe=ne;let ae;I[18]!==M?(ae=(t,l,n)=>M(t,{cw:l,ch:n}),I[18]=M,I[19]=ae):ae=I[19];const se=ae;let re;I[20]!==G||I[21]!==j||I[22]!==R?(re=(0,O.resolveWorkspaceWall)(j,R,G),I[20]=G,I[21]=j,I[22]=R,I[23]=re):re=I[23];const ce=re,[ge,ue]=(0,l.useState)(null);let he;I[24]!==V?(he=new Set(V),I[24]=V,I[25]=he):he=I[25];const ye=he,de=ce.quality,Oe=ce.highlight,ve=ce.layers,fe=ce.layout,pe=ce.activeOnly,Se=null!==ge;let me,Te,We;I[26]===Symbol.for("react.memo_cache_sentinel")?(me=()=>ue(null),I[26]=me):me=I[26];I[27]!==z?(Te=z("v2.cameraDetail.close"),I[27]=z,I[28]=Te):Te=I[28];I[29]!==Se||I[30]!==Te?(We=(0,v.jsx)(h.GridTapDismiss,{active:Se,onDismiss:me,accessibilityLabel:Te}),I[29]=Se,I[30]=Te,I[31]=We):We=I[31];const ke=Q.pausedIds.size>0;let be;I[32]!==$||I[33]!==C?(be=()=>U(t=>(0,c.toggleWallTransport)(t,C,$)),I[32]=$,I[33]=C,I[34]=be):be=I[34];const qe=V.length>0;let we,Pe,_e,Ae,Ie,Ce,je,Ge,Le;I[35]!==C?(we=()=>J(t=>(0,O.toggleWallAudio)(t,C)),I[35]=C,I[36]=we):we=I[36];I[37]!==E?(Pe=t=>E({quality:t}),I[37]=E,I[38]=Pe):Pe=I[38];I[39]!==E?(_e=t=>E({layout:t}),I[39]=E,I[40]=_e):_e=I[40];I[41]!==E||I[42]!==ce.highlightOn?(Ae=()=>E({highlightOn:!ce.highlightOn}),I[41]=E,I[42]=ce.highlightOn,I[43]=Ae):Ae=I[43];I[44]!==E||I[45]!==R.highlight?(Ie=t=>E({highlight:{...R.highlight,...t}}),I[44]=E,I[45]=R.highlight,I[46]=Ie):Ie=I[46];I[47]!==E||I[48]!==ce.layers?(Ce=t=>E({layers:(0,O.toggleWallLayer)(ce.layers,t)}),I[47]=E,I[48]=ce.layers,I[49]=Ce):Ce=I[49];I[50]!==E||I[51]!==ce.activeOnly?(je=()=>E({activeOnly:!ce.activeOnly}),I[50]=E,I[51]=ce.activeOnly,I[52]=je):je=I[52];I[53]!==ye||I[54]!==ge||I[55]!==Y||I[56]!==ke||I[57]!==be||I[58]!==qe||I[59]!==we||I[60]!==Pe||I[61]!==_e||I[62]!==Ae||I[63]!==Ie||I[64]!==Ce||I[65]!==je||I[66]!==ce.activeOnly||I[67]!==ce.highlightOn||I[68]!==ce.highlightSettings||I[69]!==ce.layers||I[70]!==ce.layout||I[71]!==ce.quality?(Ge=(0,v.jsx)(u.GridControlBar,{docked:!0,anyPaused:ke,onTogglePause:be,cameras:Y,audioOnIds:ye,onToggleAudio:oe,anyAudioOn:qe,onToggleMassAudio:we,quality:ce.quality,onSelectQuality:Pe,layout:ce.layout,onSelectLayout:_e,highlightOn:ce.highlightOn,onToggleHighlight:Ae,highlightSettings:ce.highlightSettings,onSetHighlightSettings:Ie,layers:ce.layers,onToggleLayer:Ce,activeOnly:ce.activeOnly,onToggleActiveOnly:je,panelKey:ge,onPanelKey:ue}),I[53]=ye,I[54]=ge,I[55]=Y,I[56]=ke,I[57]=be,I[58]=qe,I[59]=we,I[60]=Pe,I[61]=_e,I[62]=Ae,I[63]=Ie,I[64]=Ce,I[65]=je,I[66]=ce.activeOnly,I[67]=ce.highlightOn,I[68]=ce.highlightSettings,I[69]=ce.layers,I[70]=ce.layout,I[71]=ce.quality,I[72]=Ge):Ge=I[72];I[73]!==V||I[74]!==H||I[75]!==C||I[76]!==x||I[77]!==L||I[78]!==ie||I[79]!==se||I[80]!==te||I[81]!==K||I[82]!==F||I[83]!==We||I[84]!==Ge||I[85]!==ce.activeOnly||I[86]!==ce.highlight||I[87]!==ce.layers||I[88]!==ce.layout||I[89]!==ce.quality?(Le=(0,v.jsx)(y.WorkspaceGrid,{devices:C,quality:de,highlight:Oe,layers:ve,layoutChoice:fe,activeOnly:pe,onGoTo:L,onCellPanel:x,onClose:H,onRemove:K,onResize:se,spans:F,audioOnIds:V,pausedIds:te,onAudioToggle:oe,onPauseToggle:ie,cellsOverlay:We,footer:Ge}),I[73]=V,I[74]=H,I[75]=C,I[76]=x,I[77]=L,I[78]=ie,I[79]=se,I[80]=te,I[81]=K,I[82]=F,I[83]=We,I[84]=Ge,I[85]=ce.activeOnly,I[86]=ce.highlight,I[87]=ce.layers,I[88]=ce.layout,I[89]=ce.quality,I[90]=Le):Le=I[90];return Le};var t=r(d[0]),l=r(d[1]),n=r(d[2]),o=r(d[3]),s=r(d[4]),c=r(d[5]),u=r(d[6]),h=r(d[7]),y=r(d[8]),O=r(d[9]),v=r(d[10]);const f=[],p={pausedIds:new Set,startedIds:new Set};function S(t){return void 0!==t}function T(t){return t.id}function W(t){return t.features.includes(s.FEATURE.battery)}function k(t){return t.resize}function b(t){return t.remove}function q(t){return t.clear}function w(t){return t.setWallOptions}function P(t){return t.wallOptions}function _(t){return t.workspace.cells}},1200,[787,16,817,1191,827,1224,1269,1270,1201,1193,10]);
|
|
48
|
+
__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,"WORKSPACE_GRID_TEST_ID",{enumerable:!0,get:function(){return w}}),Object.defineProperty(_e,"WORKSPACE_GRID_FOOTER_TEST_ID",{enumerable:!0,get:function(){return R}}),_e.WorkspaceGrid=function({devices:e,quality:t,highlight:s,layers:f,layoutChoice:I,activeOnly:_,onGoTo:A,onCellPanel:E,onClose:M,onRemove:G,onResize:W,spans:k,audioOnIds:D,pausedIds:N,onAudioToggle:L,onPauseToggle:q,cellsOverlay:H,footer:V}){const{t:B}=(0,c.useTranslation)(),{colors:F}=(0,p.useTheme)(),U=(0,l.useMemo)(()=>z(F),[F]),{data:K}=(0,y.useCameras)(),$=(0,v.useCanActuate)(),X=(0,l.useMemo)(()=>{const t=new Map((K??[]).map(e=>[e.id,e]));return e.flatMap(e=>{const l=t.get(e);return void 0===l?[]:[l]})},[K,e]),Y=(0,l.useMemo)(()=>$?X.filter(e=>e.features.includes(y.FEATURE.ptz)).map(e=>e.id):j,[$,X]),J=(0,l.useMemo)(()=>X.map(e=>e.id),[X]),Q=(0,O.useCameraPrefsStore)(e=>e.prefs.byId),Z=(0,O.useCameraPrefsStore)(e=>e.hydrate),ee=(0,P.useDeviceSettingsStore)(e=>e.settings.overlaySize);(0,l.useEffect)(()=>{Z()},[Z]);const te=(0,l.useMemo)(()=>(0,S.buildTileOverlayMap)(J.map(e=>({deviceId:e,overlay:Q[e]?.overlay??x.OVERLAY_DEFAULTS})),ee),[J,Q,ee]),{width:le,height:oe}=(0,u.useViewportSize)(),ne=`${le}x${oe}`,[se,ae]=(0,l.useState)(null),ie=(0,l.useCallback)(e=>{const{width:t,height:l}=e.nativeEvent.layout;t<=0||l<=0||ae(e=>null!==e&&e.w===t&&e.h===l&&e.stamp===ne?e:{w:t,h:l,stamp:ne})},[ne]),re=null!==se&&se.stamp===ne?se:null,ue=Object.keys(k).length>0,de='auto'!==I,ce=(0,l.useMemo)(()=>ue||de||null===re?null:(0,C.resolvePrimaryWallSpan)(J.length,re.w,re.h),[ue,de,re,J.length]),he=J[0],pe=(0,l.useMemo)(()=>null===ce||ce.span<=1||void 0===he?k:{[String(he)]:{cw:ce.span,ch:ce.span}},[ce,he,k]),ge=null!==ce&&ce.span>1?ce.cols:I,fe=f.includes('objects');return(0,T.jsxs)(o.default,{testID:w,style:U.root,children:[(0,T.jsxs)(o.default,{style:U.content,onLayout:ie,children:[(0,T.jsx)(b.GridLiveEmbed,{devices:J,quality:t,layout:ge,showName:!0,audioOnIds:D,pausedIds:N,onAudioToggle:L,onPauseToggle:q,ptzIds:Y,highlight:s,showBoxes:fe,activeOnly:_,overlays:te,onTileOpen:A,onPtzOpen:e=>E('ptz',e),onCellPanelOpen:E,editable:!0,spans:pe,onTileRemove:G,onTileResize:W}),H]}),void 0!==V?(0,T.jsx)(o.default,{testID:R,style:U.footer,children:V}):null,(0,T.jsx)(n.default,{onPress:M,hitSlop:8,accessibilityRole:"button",accessibilityLabel:B('v2.cameraShelf.closeView'),style:({pressed:e})=>[U.close,{opacity:e?.7:1}],children:(0,T.jsx)(h.X,{size:16,color:"#fafaf9"})})]})},_e.NativeWorkspaceWall=_;var t=r(d[0]),l=r(d[1]),o=e(r(d[2])),n=e(r(d[3])),s=e(r(d[4]));r(d[5]);var u=r(d[6]),c=r(d[7]),h=r(d[8]),p=r(d[9]),f=r(d[10]),y=r(d[11]),v=r(d[12]),b=r(d[13]),I=r(d[14]),C=r(d[15]),S=r(d[16]),x=r(d[17]),O=r(d[18]),P=r(d[19]),T=r(d[20]);const w='workspace-grid',R='workspace-grid-footer';const j=[];function _(e){const l=(0,t.c)(15),{cameras:n,quality:s,ptzIds:u,layers:c,layout:h,audioOnIds:p,pausedIds:f,box:y,onCellPanel:v}=e,b=void 0===h?"auto":h;let S;l[0]!==y||l[1]!==n.length||l[2]!==b?(S=null===y?null:(0,C.computeGridLayout)(n.length,y.w,y.h,b),l[0]=y,l[1]=n.length,l[2]=b,l[3]=S):S=l[3];const x=S;let O,P;return l[4]!==p||l[5]!==n||l[6]!==c||l[7]!==x||l[8]!==v||l[9]!==f||l[10]!==u||l[11]!==s?(O=null!==x&&x.cellW>0?(0,T.jsx)(I.GridWall,{cameras:n,layout:x,showName:!0,quality:s,ptzIds:u,layers:c,muted:0===p.length,paused:f.length>0,onCellPanelOpen:v}):null,l[4]=p,l[5]=n,l[6]=c,l[7]=x,l[8]=v,l[9]=f,l[10]=u,l[11]=s,l[12]=O):O=l[12],l[13]!==O?(P=(0,T.jsx)(o.default,{style:A.nativeBox,children:O}),l[13]=O,l[14]=P):P=l[14],P}const A=s.default.create({nativeBox:{flex:1,minHeight:0,backgroundColor:'#000'}});function z(e){return s.default.create({root:{flex:1,minHeight:0,alignSelf:'stretch',borderRadius:f.RADIUS.md,overflow:'hidden',backgroundColor:'#000',borderWidth:s.default.hairlineWidth,borderColor:e.border},content:{flex:1,minHeight:0},footer:{alignItems:'center',paddingVertical:f.SPACING.xs,paddingHorizontal:f.SPACING.xs},close:{position:'absolute',top:f.SPACING.xs,right:f.SPACING.xs,width:28,height:28,borderRadius:14,alignItems:'center',justifyContent:'center',backgroundColor:'rgba(0,0,0,0.55)'}})}},1201,[787,16,114,247,32,109,973,817,837,789,835,827,832,1271,1272,997,1273,1246,1125,1061,10]);
|
|
49
|
+
__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"PORTRAIT_WALL_TIMELINE_FRACTION",{enumerable:!0,get:function(){return t}}),e.resolvePortraitColumnSplit=function({columnHeight:u,topInset:o,pictureHeight:c,wallShowing:l}){const h=n(u-o,Number.MAX_SAFE_INTEGER),s=n(c,h),f=h-s;if(!l)return{streamHeight:s,timelineHeight:f};const w=f*t;return{streamHeight:h-w,timelineHeight:w}},e.wallBoxStyle=function({mode:t,wideStreamWidth:n,portraitStreamHeight:u}){switch(t){case'fill':return{width:'100%',flex:1,minHeight:0};case'wide':return{width:n,flex:1,minHeight:0};case'stack':return{width:'100%',height:u}}};const t=.5;function n(t,n){return!Number.isFinite(t)||t<=0?0:t>n?n:t}},1202,[]);
|
|
50
|
+
__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.fanOutPlaybackToWall=function(o){const{primary:n,broadcast:t,paused:u}=o;return{onSeek:(o,u)=>{n.onSeek(o,u),t(n=>n.seek(o))},onScrubBegin:o=>{n.onScrubBegin(o),t(o=>o.scrubStart())},onScrubMove:(o,u,c)=>{n.onScrubMove(o,u,c),t(n=>n.scrubTo(o))},onScrubCommit:(o,u)=>{n.onScrubCommit(o,u),t(n=>n.scrubCommit(o))},onGoLive:()=>{n.onGoLive(),t(o=>o.goLive())},onTogglePlayPause:()=>{n.onTogglePlayPause(),t(o=>o.setRate(u?1:0))},onSelectRate:o=>{n.onSelectRate(o),t(n=>n.setRate(o))}}}},1203,[]);
|
|
51
|
+
__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.shouldShowStreamNavBar=function({enabled:t,showSidebar:n,fill:o}){return t&&!n&&!o},e.streamColumnHeight=function({windowHeight:t,navBarFootprint:n}){const o=t-n;return o>0?o:Math.max(0,t)}},1204,[]);
|
|
52
|
+
__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),e.isUsableMeasurement=n,e.acceptsMeasurement=u,e.containerWidthSource=function({measured:t,windowWidth:n}){return u(t,n)?'measured':'derived'},e.resolveContainerWidth=function({measured:n,windowWidth:o,sideNav:s}){if(u(n,o))return n.width;const c=o-(0,t.sideNavFootprint)(s);return c>0?c:Math.max(0,o)};var t=r(d[0]);function n(t){return Number.isFinite(t)&&t>0}function u(t,u){return null!==t&&n(t.width)&&t.windowWidth===u}},1205,[1274]);
|
|
53
|
+
__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"DETAIL_LAYOUT_SCOPE",{enumerable:!0,get:function(){return c}}),e.buildDetailLayoutTrace=function({deviceId:c,layout:s,viewport:u,sideNav:W,measured:l,containerWidth:w,railWidth:f,mode:b}){return{deviceId:c,winWidth:s.width,winHeight:s.height,orientation:(0,n.isLandscapeViewport)(s)?'landscape':'portrait',viewportSource:u.source,dimWidth:u.dimWidth,dimHeight:u.dimHeight,frameWidth:u.frameWidth,frameHeight:u.frameHeight,screenMinSide:s.screenMinSide??-1,isWeb:s.isWeb,tabletSource:(0,n.tabletSourceFor)(s),tabletMinSide:n.TABLET_MIN_SIDE,isTablet:(0,n.isTabletViewport)(s),webWideMinWidth:n.DETAIL_WIDE_MIN_WIDTH,fullscreen:s.fullscreen,mode:b,sideNavVisible:W.visible,insetLeft:W.insetLeft,sideNavWidth:(0,t.sideNavFootprint)(W),containerWidth:w,containerWidthSource:(0,o.containerWidthSource)({measured:l,windowWidth:s.width,sideNav:W}),measuredWidth:l?.width??-1,measuredInWindowWidth:l?.windowWidth??-1,railWidth:f,railNarrowBelow:h.RAIL_NARROW_BELOW}},e.detailLayoutTraceSignature=function(t){return[t.winWidth,t.winHeight,t.orientation,t.viewportSource,t.dimWidth,t.dimHeight,t.frameWidth,t.frameHeight,t.screenMinSide,t.isWeb?'w':'n',t.tabletSource,t.isTablet?'t':'p',t.fullscreen?'f':'-',t.mode,t.sideNavWidth,t.containerWidth,t.containerWidthSource,t.railWidth].join('|')};var t=r(d[0]),n=r(d[1]),o=r(d[2]),h=r(d[3]);const c='theater:layout'},1206,[1274,994,1205,1235]);
|
|
54
|
+
__d(function(g,r,i,_a,m,_e,d){"use strict";Object.defineProperty(_e,'__esModule',{value:!0}),_e.useEventHaptics=function(e,s){const h=(0,t.c)(10),{controller:T,state:O}=(0,o.useConnection)(),R=(0,u.useSettingsStore)(_);let C;h[0]!==e?(C=[...e].sort(p).join(","),h[0]=e,h[1]=C):C=h[1];const S=C,A=(0,n.useRef)(0),I=(0,n.useRef)(c.default.currentState),M=s&&R.enabled&&!1;let x,y,D,N;h[2]===Symbol.for("react.memo_cache_sentinel")?(x=()=>{},y=[],h[2]=x,h[3]=y):(x=h[2],y=h[3]);(0,n.useEffect)(x,y),h[4]!==M||h[5]!==T||h[6]!==S||h[7]!==R?(D=()=>{if(!M)return;const e=T.getSystem();if(!e)return;const t=new Set(S.split(",").map(v)),n=e=>{if("active"!==I.current)return;const t=Date.now(),n=(0,l.resolveHaptic)(R,e,A.current,t);n&&(A.current=t,(0,E.fireHaptic)(n))},s=e.subscribeEvent(a.MOTION_CATEGORY,e=>{const s=(0,a.parseMotionEvent)(e);s&&s.detected&&t.has(s.deviceId)&&n("motion")}),c=e.subscribeEvent(f.DETECTION_CATEGORY,e=>{const s=(0,f.parseDetectionEvent)(e);s&&0!==s.boxes.length&&t.has(Number(s.sourceId))&&n(b(s.boxes))}),o=e.subscribeEvent(f.FRAME_TRACKED_CATEGORY,e=>{const s=(0,f.parseFrameTrackedEvent)(e);s&&0!==s.boxes.length&&t.has(s.deviceId)&&n(b(s.boxes))});return()=>{s(),c(),o()}},N=[T,M,S,R],h[4]=M,h[5]=T,h[6]=S,h[7]=R,h[8]=D,h[9]=N):(D=h[8],N=h[9]);(0,n.useEffect)(D,N)};var e,t=r(d[0]),n=r(d[1]),s=r(d[2]),c=(e=s)&&e.__esModule?e:{default:e};r(d[3]);var o=r(d[4]),u=r(d[5]),a=r(d[6]),f=r(d[7]),l=r(d[8]),E=r(d[9]);function b(e){const t=e.map(e=>e.label),n=e.some(e=>'string'==typeof e.name&&e.name.length>0);return(0,l.detectionEventKind)(t,n)}function v(e){return Number(e)}function p(e,t){return e-t}function _(e){return e.settings.haptics}},1207,[787,16,218,109,818,834,847,1242,1275,1276]);
|
|
55
|
+
__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.DoorbellBadge=function(e){const s=(0,t.c)(83),{deviceId:h,enabled:C}=e,{t:j}=(0,_.useTranslation)(),{colors:D}=(0,b.useTheme)(),E=(0,p.useStyleScaler)(),M=(0,p.useScaledPx)(),{lastPressedAt:P,ringingNow:R}=(0,y.useDoorbell)(h,C),[k,N]=(0,n.useState)(A);let T,G;s[0]!==C||s[1]!==P||s[2]!==R?(T=()=>{if(!C||R||null===P)return;const e=setInterval(()=>N(Date.now()),v);return()=>clearInterval(e)},G=[C,R,P],s[0]=C,s[1]=P,s[2]=R,s[3]=T,s[4]=G):(T=s[3],G=s[4]);(0,n.useEffect)(T,G);const z=(0,u.useSharedValue)(1);let B,O;s[5]!==z||s[6]!==R?(B=()=>{if(R)return z.value=(0,u.withRepeat)((0,u.withSequence)((0,u.withTiming)(.4,{duration:S,easing:u.Easing.inOut(u.Easing.ease)}),(0,u.withTiming)(1,{duration:S,easing:u.Easing.inOut(u.Easing.ease)})),-1,!1),()=>(0,u.cancelAnimation)(z);z.value=(0,u.withTiming)(1,{duration:150})},O=[z,R],s[5]=z,s[6]=R,s[7]=B,s[8]=O):(B=s[7],O=s[8]);(0,n.useEffect)(B,O);const V=(0,u.useAnimatedStyle)((function({_worklet_15229690820397_init_data:e,breathe:t}){const n=()=>({opacity:t.value,transform:[{scale:.85+.15*t.value}]});return n.__closure={breathe:t},n.__workletHash=0xdd9f04fb72d,n.__initData=e,n})({_worklet_15229690820397_init_data:w,breathe:z}));if(!C)return null;if(R){let e;s[9]!==E?(e=E(I.badge),s[9]=E,s[10]=e):e=s[10];const t=`${D.primary}26`;let n,u,_,b,h,y,p,S,v,w,A;return s[11]!==t?(n={backgroundColor:t},s[11]=t,s[12]=n):n=s[12],s[13]!==e||s[14]!==n?(u=[e,n],s[13]=e,s[14]=n,s[15]=u):u=s[15],s[16]!==M?(_=M(13),s[16]=M,s[17]=_):_=s[17],s[18]!==D.primary||s[19]!==_?(b=(0,x.jsx)(f.BellRing,{size:_,color:D.primary}),s[18]=D.primary,s[19]=_,s[20]=b):b=s[20],s[21]!==V||s[22]!==b?(h=(0,x.jsx)(c.default.View,{style:V,children:b}),s[21]=V,s[22]=b,s[23]=h):h=s[23],s[24]!==E?(y=E(I.text),s[24]=E,s[25]=y):y=s[25],s[26]!==D.primary?(p={color:D.primary},s[26]=D.primary,s[27]=p):p=s[27],s[28]!==y||s[29]!==p?(S=[y,p],s[28]=y,s[29]=p,s[30]=S):S=s[30],s[31]!==j?(v=j("v2.cameras.doorbellRinging"),s[31]=j,s[32]=v):v=s[32],s[33]!==S||s[34]!==v?(w=(0,x.jsx)(l.default,{style:S,children:v}),s[33]=S,s[34]=v,s[35]=w):w=s[35],s[36]!==h||s[37]!==w||s[38]!==u?(A=(0,x.jsxs)(o.default,{style:u,pointerEvents:"none",children:[h,w]}),s[36]=h,s[37]=w,s[38]=u,s[39]=A):A=s[39],A}let H,$,q,L,U,W,F,J,K,Q;if(s[40]!==D||s[41]!==P||s[42]!==k||s[43]!==M||s[44]!==E||s[45]!==j){q=Symbol.for("react.early_return_sentinel");e:{const e=(0,y.formatRingAgo)(P,k);if(null===e){q=null;break e}let t;$=o.default,s[54]!==E?(t=E(I.badge),s[54]=E,s[55]=t):t=s[55];const n=`${D.background}CC`;let u,c,_,b;s[56]!==n?(u={backgroundColor:n},s[56]=n,s[57]=u):u=s[57],s[58]!==t||s[59]!==u?(W=[t,u],s[58]=t,s[59]=u,s[60]=W):W=s[60],F="none",s[61]!==M?(c=M(12),s[61]=M,s[62]=c):c=s[62],s[63]!==D.foregroundMuted||s[64]!==c?(J=(0,x.jsx)(f.BellRing,{size:c,color:D.foregroundMuted}),s[63]=D.foregroundMuted,s[64]=c,s[65]=J):J=s[65],H=l.default,s[66]!==E?(_=E(I.text),s[66]=E,s[67]=_):_=s[67],s[68]!==D.foregroundMuted?(b={color:D.foregroundMuted},s[68]=D.foregroundMuted,s[69]=b):b=s[69],s[70]!==_||s[71]!==b?(L=[_,b],s[70]=_,s[71]=b,s[72]=L):L=s[72],U=j("v2.cameras.doorbellLastRing",{time:e})}s[40]=D,s[41]=P,s[42]=k,s[43]=M,s[44]=E,s[45]=j,s[46]=H,s[47]=$,s[48]=q,s[49]=L,s[50]=U,s[51]=W,s[52]=F,s[53]=J}else H=s[46],$=s[47],q=s[48],L=s[49],U=s[50],W=s[51],F=s[52],J=s[53];if(q!==Symbol.for("react.early_return_sentinel"))return q;s[73]!==H||s[74]!==L||s[75]!==U?(K=(0,x.jsx)(H,{style:L,children:U}),s[73]=H,s[74]=L,s[75]=U,s[76]=K):K=s[76];s[77]!==$||s[78]!==K||s[79]!==W||s[80]!==F||s[81]!==J?(Q=(0,x.jsxs)($,{style:W,pointerEvents:F,children:[J,K]}),s[77]=$,s[78]=K,s[79]=W,s[80]=F,s[81]=J,s[82]=Q):Q=s[82];return Q};var t=r(d[0]),n=r(d[1]),o=e(r(d[2])),l=e(r(d[3])),s=e(r(d[4])),u=r(d[5]),c=e(u),f=r(d[6]),_=r(d[7]),b=r(d[8]),h=r(d[9]),y=r(d[10]),p=r(d[11]),x=r(d[12]);const S=500,v=6e4,w={code:"function DoorbellBadgeTsx1(){const{breathe}=this.__closure;return{opacity:breathe.value,transform:[{scale:0.85+0.15*breathe.value}]};}"};function A(){return Date.now()}const I=s.default.create({badge:{position:'absolute',top:h.SPACING.md,left:h.SPACING.md,flexDirection:'row',alignItems:'center',gap:h.SPACING.xs,paddingHorizontal:h.SPACING.md,paddingVertical:h.SPACING.xs,borderRadius:h.RADIUS.md},text:{fontSize:11,fontWeight:'700'}})},1208,[787,16,114,193,32,1129,837,817,789,835,1209,1226,10]);
|
|
56
|
+
__d(function(g,r,i,a,m,e,d){"use strict";Object.defineProperty(e,'__esModule',{value:!0}),Object.defineProperty(e,"DOORBELL_CATEGORY",{enumerable:!0,get:function(){return o}}),Object.defineProperty(e,"RING_WINDOW_MS",{enumerable:!0,get:function(){return c}}),e.readDoorbellStatus=p,e.parseDoorbellEvent=b,e.formatRingAgo=function(t,n){if(null===t)return null;const s=Math.max(0,Math.floor((n-t)/1e3));if(s<60)return'now';const u=Math.floor(s/60);if(u<60)return`${u}m`;const l=Math.floor(u/60);if(l<24)return`${l}h`;return`${Math.floor(l/24)}d`},e.useDoorbell=function(f,C){const y=(0,t.c)(20),{controller:P,state:A}=(0,u.useConnection)(),S=C&&"connected"===A;let v,E,I;y[0]!==f?(v=["v2","doorbell",f],y[0]=f,y[1]=v):v=y[1];y[2]!==P||y[3]!==f?(E=async()=>{const t=P.getSystem();if(!t)return{lastPressedAt:null,pressCount:0};try{return p(await t.trpcClient.doorbell.getStatus.query({deviceId:f}))}catch{return{lastPressedAt:null,pressCount:0}}},y[2]=P,y[3]=f,y[4]=E):E=y[4];y[5]!==S||y[6]!==v||y[7]!==E?(I={queryKey:v,enabled:S,staleTime:l.RECONCILE_MS,refetchInterval:l.RECONCILE_MS,queryFn:E},y[5]=S,y[6]=v,y[7]=E,y[8]=I):I=y[8];const{data:M}=(0,s.useQuery)(I);let O;y[9]!==M?(O=void 0===M?{lastPressedAt:null,pressCount:0}:M,y[9]=M,y[10]=O):O=y[10];const _=O,[h,R]=(0,n.useState)(!1),[D,N]=(0,n.useState)(null),T=(0,n.useRef)(null);let j,L;y[11]!==S||y[12]!==P||y[13]!==f?(j=()=>{if(!S)return R(!1),void N(null);const t=P.getSystem();if(!t)return;const n=t.subscribeEvent(o,t=>{const n=b(t);n&&n.deviceId===f&&(N(n.timestamp),R(!0),T.current&&clearTimeout(T.current),T.current=setTimeout(()=>{R(!1),T.current=null},c))});return()=>{n(),T.current&&(clearTimeout(T.current),T.current=null),R(!1)}},L=[P,S,f],y[11]=S,y[12]=P,y[13]=f,y[14]=j,y[15]=L):(j=y[14],L=y[15]);(0,n.useEffect)(j,L);const q=null!==D&&(null===_.lastPressedAt||D>_.lastPressedAt)?D:_.lastPressedAt;let w;y[16]!==q||y[17]!==_.pressCount||y[18]!==h?(w={lastPressedAt:q,pressCount:_.pressCount,ringingNow:h},y[16]=q,y[17]=_.pressCount,y[18]=h,y[19]=w):w=y[19];return w};var t=r(d[0]),n=r(d[1]),s=r(d[2]),u=r(d[3]),l=r(d[4]);const o='doorbell.onPressed',c=8e3;function f(t){return'object'==typeof t&&null!==t}function p(t){if(!f(t))return{lastPressedAt:null,pressCount:0};return{lastPressedAt:'number'==typeof t.lastPressedAt?t.lastPressedAt:null,pressCount:'number'==typeof t.pressCountSinceStart?t.pressCountSinceStart:0}}function b(t){if(!f(t))return null;const n=t.deviceId,s=t.timestamp;return'number'!=typeof n||'number'!=typeof s?null:{deviceId:n,timestamp:s}}},1209,[787,16,853,818,854]);
|
|
57
|
+
__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.readoutDeviceIds=L,_e.matchDeviceLiveField=S,_e.OverlayReadouts=function(e){const r=(0,n.c)(22),{deviceId:u,config:p,enabled:y}=e,{t:j}=(0,l.useTranslation)(),x=(0,b.useStyleScaler)();let O;r[0]!==p?(O=L(p),r[0]=p,r[1]=O):O=r[1];const V=O;let A;r[2]===Symbol.for("react.memo_cache_sentinel")?(A={},r[2]=A):A=r[2];const[D,E]=o.default.useState(A);let M;r[3]===Symbol.for("react.memo_cache_sentinel")?(M=(e,n)=>{E(o=>o[e]===n?o:{...o,[e]:n})},r[3]=M):M=r[3];const C=M;let R;r[4]!==p.readouts?(R=p.readouts.some(F),r[4]=p.readouts,r[5]=R):R=r[5];const N=R,z=(0,c.useAudioLevel)(u,y&&N);let H;r[6]!==D||r[7]!==z||r[8]!==j?(H=e=>{if("audioDbfs"===e.source.kind)return null!==z&&Number.isFinite(z)?(0,s.formatLiveValue)(z,{precision:e.precision??1,unit:e.unit??"dBFS",onLabel:j("v2.common.on"),offLabel:j("v2.common.off")}):"\u2014";const n=D[e.source.deviceId]??[],o="deviceField"===e.source.kind?S(n,e.source.sectionId,e.source.fieldKey):void 0;if(!o)return"\u2014";const t={onLabel:j("v2.common.on"),offLabel:j("v2.common.off")},r=e.precision??o.precision;void 0!==r&&(t.precision=r);const u=e.unit??o.unit;return void 0!==u&&(t.unit=u),(0,s.formatLiveValue)(o.value,t)},r[6]=D,r[7]=z,r[8]=j,r[9]=H):H=r[9];const T=H;if(!y||0===p.readouts.length)return null;let w,P,W;if(r[10]!==V||r[11]!==y){let e;r[13]!==y?(e=e=>(0,h.jsx)(_,{deviceId:e,enabled:y,onFields:C},e),r[13]=y,r[14]=e):e=r[14],w=V.map(e),r[10]=V,r[11]=y,r[12]=w}else w=r[12];r[15]!==p||r[16]!==x||r[17]!==T?(P=v.OVERLAY_ANCHORS.map(e=>{const n=(0,f.readoutsAt)(p,e);return 0===n.length?null:(0,h.jsx)(t.default,{pointerEvents:"none",style:[x(I.stack),v.ANCHOR_PLACEMENT[e]],children:n.map(e=>(0,h.jsx)(k,{label:e.label,value:T(e)},e.id))},e)}),r[15]=p,r[16]=x,r[17]=T,r[18]=P):P=r[18];r[19]!==w||r[20]!==P?(W=(0,h.jsxs)(h.Fragment,{children:[w,P]}),r[19]=w,r[20]=P,r[21]=W):W=r[21];return W};var n=_r(d[0]),o=e(_r(d[1])),t=e(_r(d[2])),r=e(_r(d[3])),u=e(_r(d[4])),l=_r(d[5]),c=_r(d[6]),s=_r(d[7]),f=_r(d[8]),v=_r(d[9]),b=_r(d[10]),p=_r(d[11]),h=_r(d[12]);function L(e){const n=new Set;for(const o of e.readouts)'deviceField'===o.source.kind&&n.add(o.source.deviceId);return[...n]}const y=[];function S(e,n,o){return e.find(e=>e.sectionId===n&&e.key===o)}function _(e){const t=(0,n.c)(5),{deviceId:r,enabled:u,onFields:l}=e,{data:c}=(0,s.useDeviceLiveFields)(r,u),f=c??y;let v,b;return t[0]!==r||t[1]!==f||t[2]!==l?(v=()=>{l(r,f)},b=[r,f,l],t[0]=r,t[1]=f,t[2]=l,t[3]=v,t[4]=b):(v=t[3],b=t[4]),o.default.useEffect(v,b),null}function k(e){const o=(0,n.c)(31),{label:u,value:l}=e,{colors:c}=(0,p.useTheme)(),s=(0,b.useStyleScaler)();let f;o[0]!==s?(f=s(I.chip),o[0]=s,o[1]=f):f=o[1];const v=`${c.background}8C`;let L,y,S,_,k,F,j,x,O,V,A;return o[2]!==v?(L={backgroundColor:v},o[2]=v,o[3]=L):L=o[3],o[4]!==f||o[5]!==L?(y=[f,L],o[4]=f,o[5]=L,o[6]=y):y=o[6],o[7]!==s?(S=s(I.chipLabel),o[7]=s,o[8]=S):S=o[8],o[9]!==c.foregroundMuted?(_={color:c.foregroundMuted},o[9]=c.foregroundMuted,o[10]=_):_=o[10],o[11]!==S||o[12]!==_?(k=[S,_],o[11]=S,o[12]=_,o[13]=k):k=o[13],o[14]!==u||o[15]!==k?(F=(0,h.jsx)(r.default,{style:k,numberOfLines:1,children:u}),o[14]=u,o[15]=k,o[16]=F):F=o[16],o[17]!==s?(j=s(I.chipValue),o[17]=s,o[18]=j):j=o[18],o[19]!==c.foreground?(x={color:c.foreground},o[19]=c.foreground,o[20]=x):x=o[20],o[21]!==x||o[22]!==j?(O=[j,x],o[21]=x,o[22]=j,o[23]=O):O=o[23],o[24]!==O||o[25]!==l?(V=(0,h.jsx)(r.default,{style:O,numberOfLines:1,children:l}),o[24]=O,o[25]=l,o[26]=V):V=o[26],o[27]!==V||o[28]!==y||o[29]!==F?(A=(0,h.jsxs)(t.default,{style:y,pointerEvents:"none",children:[F,V]}),o[27]=V,o[28]=y,o[29]=F,o[30]=A):A=o[30],A}function F(e){return"audioDbfs"===e.source.kind}const I=u.default.create({stack:{position:'absolute',gap:4},chip:{flexDirection:'row',alignItems:'baseline',gap:5,paddingHorizontal:7,paddingVertical:3,borderRadius:6},chipLabel:{fontSize:10,fontWeight:'600'},chipValue:{fontSize:12,fontWeight:'700',fontVariant:['tabular-nums']}})},1210,[787,16,114,193,32,817,1243,1277,1246,1278,1226,789,10]);
|