@camstack/addon-admin-ui 1.2.170 → 1.2.171
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assets/{AddonCollectionPage-Dzu7if7X.js → AddonCollectionPage-9yRtmnSi.js} +1 -1
- package/dist/assets/{Addons-cmY_BeHx.js → Addons-XL2tsxqo.js} +1 -1
- package/dist/assets/{AdminTabs-KbDahb5g.js → AdminTabs-BT8iv0Xi.js} +1 -1
- package/dist/assets/{AiProfiles-G3iTDdFi.js → AiProfiles-BC274VaA.js} +1 -1
- package/dist/assets/{BrokerForm-Cnlcd0iS.js → BrokerForm-C5ctMIet.js} +1 -1
- package/dist/assets/{Build-CLJkQ8d1.js → Build-28nSXcNl.js} +1 -1
- package/dist/assets/{Capabilities-ChYuK5bi.js → Capabilities-BkP0kibJ.js} +1 -1
- package/dist/assets/{CapabilityBadges-CX6rtH_Z.js → CapabilityBadges-5uA2K_Bv.js} +1 -1
- package/dist/assets/{Cluster-LQa_PfIs.js → Cluster-jxVywr-M.js} +1 -1
- package/dist/assets/{Data-qmgCHWst.js → Data-CXptywS7.js} +1 -1
- package/dist/assets/{DetectionIntelligence-DHjzD_xY.js → DetectionIntelligence-lkQ_XT9y.js} +1 -1
- package/dist/assets/{DeviceAggregateSection-BYV9beqX.js → DeviceAggregateSection-C9pw-ssr.js} +1 -1
- package/dist/assets/{DeviceDetail-1sBb391Z.js → DeviceDetail-BNM8e3Zm.js} +1 -1
- package/dist/assets/{Devices-BklvFBhA.js → Devices-B7qwE5CK.js} +1 -1
- package/dist/assets/{EmbedPlayerPage-D5rXh9NK.js → EmbedPlayerPage-BebCZTez.js} +1 -1
- package/dist/assets/{Events-C8XTJKuj.js → Events-CdPJHGux.js} +1 -1
- package/dist/assets/{FormBuilder-BqDI8IF8.js → FormBuilder-CPSYCtr-.js} +1 -1
- package/dist/assets/{Identity-BMyE1TSF.js → Identity-eTTbnFif.js} +1 -1
- package/dist/assets/{IntegrationDetail-CVecwBfB.js → IntegrationDetail-DOBHrpiq.js} +1 -1
- package/dist/assets/{Integrations-DoyN_2ix.js → Integrations-Cb3PK4cr.js} +1 -1
- package/dist/assets/{Integrations-DgiUN8WI.js → Integrations-D-vgmFVF.js} +1 -1
- package/dist/assets/{Locations-Dqtm7049.js → Locations-xDxH2XyP.js} +1 -1
- package/dist/assets/{Logs-D3T5VqXU.js → Logs-CTf0D3y0.js} +1 -1
- package/dist/assets/{MotionZonesSettings-CeiqMsOP.js → MotionZonesSettings-Bqzb26rw.js} +1 -1
- package/dist/assets/{MyAccess-DnaLAFgi.js → MyAccess-T5aNyjXk.js} +1 -1
- package/dist/assets/{Network-CC3nkKu6.js → Network-BdbUVo22.js} +1 -1
- package/dist/assets/{NodeAddonsSettingsPanel-C-NPPWAc.js → NodeAddonsSettingsPanel-CUiP3a75.js} +1 -1
- package/dist/assets/{NodeInferenceDevices-oEPHvzHv.js → NodeInferenceDevices-B3Wd48Cc.js} +1 -1
- package/dist/assets/{Notifications-D_qXhtY3.js → Notifications-qeNF7u3p.js} +1 -1
- package/dist/assets/{Pipeline-D2u6gpex.js → Pipeline-DRKBqdVf.js} +1 -1
- package/dist/assets/{Plates-Dfe3UFiw.js → Plates-CGPq1eHK.js} +1 -1
- package/dist/assets/{PrivacyMaskSettings-B5j9CVpD.js → PrivacyMaskSettings-DtZYayBx.js} +1 -1
- package/dist/assets/{ProviderIcon-BhtIEbgI.js → ProviderIcon-CTU-GAa9.js} +1 -1
- package/dist/assets/{Recordings-DO23vw2_.js → Recordings-3vRZk8Kt.js} +1 -1
- package/dist/assets/{ScanNetworkModal-CA-OArEA.js → ScanNetworkModal-B36zNgl3.js} +1 -1
- package/dist/assets/{SceneMonitorEditor-BB4kENsO.js → SceneMonitorEditor-o77QlnUc.js} +1 -1
- package/dist/assets/{Scenes-DAfrrTj_.js → Scenes-DC-4pIW1.js} +1 -1
- package/dist/assets/{Settings-BvMSL-Rl.js → Settings-D5hfN91r.js} +1 -1
- package/dist/assets/{Showroom-CAwb6Ck8.js → Showroom-DRWliey-.js} +1 -1
- package/dist/assets/{StorageLocationsPanel-DL0p6Cgw.js → StorageLocationsPanel-BWUFYD0b.js} +1 -1
- package/dist/assets/{Terminal-DNX5eu6E.js → Terminal-DM1F0TCi.js} +1 -1
- package/dist/assets/{_virtual_mf-localSharedImportMap___mfe_internal__admin_ui_host-fHqNX4tQ.js → _virtual_mf-localSharedImportMap___mfe_internal__admin_ui_host-UiQmXCyK.js} +1 -1
- package/dist/assets/{authed-media-DOXm0tcZ.js → authed-media-UBAi-Lhn.js} +1 -1
- package/dist/assets/{bell-off-Ts2x4_io.js → bell-off-oTIklrxl.js} +1 -1
- package/dist/assets/{bell-ring-ColLr5Sv.js → bell-ring-FXp4jV85.js} +1 -1
- package/dist/assets/{boxes-DLBOZdEv.js → boxes-BH2lf5u9.js} +1 -1
- package/dist/assets/circle-check-big-BK3dkJT9.js +1 -0
- package/dist/assets/circle-dot-CDbEaTh1.js +1 -0
- package/dist/assets/circle-slash-DWdo8x6N.js +1 -0
- package/dist/assets/{circle-x-D4XhwphR.js → circle-x-DDsrb_2P.js} +1 -1
- package/dist/assets/clock-DTr2DCN5.js +1 -0
- package/dist/assets/{copy-Cr3rjCTp.js → copy-BN7bt7TF.js} +1 -1
- package/dist/assets/{debounced-invalidate-Bh2p192d.js → debounced-invalidate-C9cr4J-3.js} +1 -1
- package/dist/assets/dist-BN-a8jMo.js +349 -0
- package/dist/assets/{dist-B3d-1omx.js → dist-D1Haydhz.js} +1 -1
- package/dist/assets/{download-DlHJFiX_.js → download-BhwwBSAh.js} +1 -1
- package/dist/assets/{face-bbox-BkUtqpif.js → face-bbox-D7SN3VuC.js} +1 -1
- package/dist/assets/{flame-0-uiutPM.js → flame-Co8-vBoj.js} +1 -1
- package/dist/assets/{format-size-DoXWOpar.js → format-size-D0po-kDi.js} +1 -1
- package/dist/assets/{hard-drive-C4Gwi3hi.js → hard-drive-B2ZD9Dw2.js} +1 -1
- package/dist/assets/{hostInit-CKZ6nc-d.js → hostInit-BUDjKUAQ.js} +1 -1
- package/dist/assets/{index-g356Z7K8.js → index-CWmgzFYA.js} +3 -3
- package/dist/assets/{key-round-Bf8UD3ir.js → key-round-CwqB2N7R.js} +1 -1
- package/dist/assets/{layers-BxwjXR1w.js → layers-sLaTSOlU.js} +1 -1
- package/dist/assets/{location-owned-usage-RXMicHPP.js → location-owned-usage-DwI4BF7S.js} +1 -1
- package/dist/assets/{mf-entry-bootstrap-0-62b76ab1.js → mf-entry-bootstrap-0-9f66eb0d.js} +2 -2
- package/dist/assets/{pencil-GpDj1Q2p.js → pencil-BmHWmA5C.js} +1 -1
- package/dist/assets/play-Cs-6RxW1.js +1 -0
- package/dist/assets/{player-overlays-BOHd-BQW.js → player-overlays-CxkGdXT-.js} +1 -1
- package/dist/assets/plus-m8t8zcIv.js +1 -0
- package/dist/assets/power-kB5p-Ak_.js +1 -0
- package/dist/assets/{radio-CkABc76L.js → radio--gGl0P2y.js} +1 -1
- package/dist/assets/{refresh-cw-CGsZO3dv.js → refresh-cw-Cl-7vQNO.js} +1 -1
- package/dist/assets/remoteEntry-BBhCXkNX.js +1 -0
- package/dist/assets/rotate-ccw-Ch2ZUNN7.js +1 -0
- package/dist/assets/rotate-cw-B0szOn1S.js +1 -0
- package/dist/assets/{send-VTRrGOSw.js → send-9pt5qWny.js} +1 -1
- package/dist/assets/{server-B7kfcasJ.js → server-CnFSzPaO.js} +1 -1
- package/dist/assets/{shield-CQ4OLCaq.js → shield-Dhd5foNC.js} +1 -1
- package/dist/assets/{shield-alert-B5lZ5qPg.js → shield-alert-BfHKw30e.js} +1 -1
- package/dist/assets/square-b_uMT8DM.js +1 -0
- package/dist/assets/{square-check-big-CYG6mqRn.js → square-check-big-DhiCUwXV.js} +1 -1
- package/dist/assets/{src-BmPEyOJ9.js → src-BJmgjR4B.js} +3 -3
- package/dist/assets/src-C4HChujE.js +349 -0
- package/dist/assets/{undo-2-B4kJBBZH.js → undo-2-Cgprp3xa.js} +1 -1
- package/dist/assets/{use-scenes-feed-BRjVzclh.js → use-scenes-feed-Di3XZrP9.js} +1 -1
- package/dist/assets/useEventInvalidation-KuicKH1b.js +1 -0
- package/dist/assets/{useNodeUrlSelection-DGIGjgUa.js → useNodeUrlSelection-mM_cYhAA.js} +1 -1
- package/dist/assets/user-round-_c5jLmPl.js +1 -0
- package/dist/assets/{video-vgosx6J5.js → video-CU_EQF_f.js} +1 -1
- package/dist/assets/{virtual_mf-REMOTE_ENTRY_ID___mfe_internal__admin_ui_host__remoteEntry-_hash_-DMsOet1U.js → virtual_mf-REMOTE_ENTRY_ID___mfe_internal__admin_ui_host__remoteEntry-_hash_-n8H5TlEC.js} +2 -2
- package/dist/assets/{wifi-DtqTmADb.js → wifi-DOytf5Bt.js} +1 -1
- package/dist/assets/{zap-BsoxkPxV.js → zap-DgDM01s3.js} +1 -1
- package/dist/index.html +5 -5
- package/dist/server/addon.js +70 -70
- package/package.json +1 -1
- package/dist/assets/circle-check-big-Cm7khd5f.js +0 -1
- package/dist/assets/circle-dot-B4DfqCOD.js +0 -1
- package/dist/assets/circle-slash-IyU_gVDG.js +0 -1
- package/dist/assets/clock-Czi0ZaPo.js +0 -1
- package/dist/assets/dist-DrjaRpaz.js +0 -349
- package/dist/assets/play-JJtA4mLK.js +0 -1
- package/dist/assets/plus-Ce-u1cy0.js +0 -1
- package/dist/assets/power-DHeS0c53.js +0 -1
- package/dist/assets/remoteEntry-DIWyDOfS.js +0 -1
- package/dist/assets/rotate-ccw-CNXGqau-.js +0 -1
- package/dist/assets/rotate-cw-CLl0fQTC.js +0 -1
- package/dist/assets/square-D5_FHQhn.js +0 -1
- package/dist/assets/src-DGE3vmjp.js +0 -349
- package/dist/assets/useEventInvalidation-BO1Mqzp4.js +0 -1
- package/dist/assets/user-round-CJoGmSnV.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{I as e,K as t,Q as n,S as r,W as i,b as a,q as o,x as s,z as c}from"./_virtual_mf___mfe_internal__admin_ui_host__loadShare___mf_0_tanstack_mf_1_react_mf_2_query__loadShare__.js-DhP-Lgiq.js";import{G as l,H as u,L as d,M as f,R as p,U as m,V as h,W as g,Z as _,at as ee,dt as v,gt as y,ht as b,lt as x,q as S,s as C,st as w,z as T}from"./player-overlays-BOHd-BQW.js";import{MaskShapeCanvas as E}from"./MaskShapeCanvas-Dcpby34M.js";var D=y(`settings-2`,[[`path`,{d:`M14 17H5`,key:`gfn3mx`}],[`path`,{d:`M19 7h-9`,key:`6i9tg`}],[`circle`,{cx:`17`,cy:`17`,r:`3`,key:`18b49y`}],[`circle`,{cx:`7`,cy:`7`,r:`3`,key:`dfmy0x`}]]);n();var O=_(`/addon/pipeline-analytics/event-media`);function k(e){let t=new Map;for(let n of e.states)n.references.forEach((e,r)=>{let i=t.get(e.condition)??[];i.push({stateId:n.id,index:r,reference:e}),t.set(e.condition,i)});return[...t.entries()].map(([e,t])=>({condition:e,tiles:[...t].sort((e,t)=>t.reference.capturedAt-e.reference.capturedAt)})).sort((e,t)=>e.condition.localeCompare(t.condition))}function A(e){return e.states.reduce((e,t)=>e+t.references.length,0)}var j=`rounded border border-danger/50 bg-danger/10 px-1 py-0.5 text-[10px] font-medium text-danger hover:bg-danger/20 disabled:opacity-40 transition-colors`;function te({monitor:e,disabled:t,onDelete:n}){let i=k(e),a=A(e),[c,l]=o(null);return i.length===0?s(`p`,{className:`${f} leading-relaxed`,children:`No photographs captured yet. Press “Capture daylight” to take the one this scene will judge everything against.`}):s(`div`,{className:`flex flex-col gap-2`,children:i.map(e=>r(`div`,{className:`flex flex-col gap-1`,children:[r(`p`,{className:`text-[10px] font-semibold uppercase tracking-wide text-foreground-subtle`,children:[m(e.condition),` · `,e.tiles.length]}),s(`ul`,{className:`flex flex-wrap gap-1.5`,children:e.tiles.map(i=>{let o=`${i.stateId}:${String(i.index)}`,u=a===1,d=c===o;return r(`li`,{className:`flex w-24 flex-col gap-1 rounded-md border border-border p-1`,children:[s(M,{reference:i.reference}),s(`span`,{className:`${f} tabular-nums`,children:N(i.reference.capturedAt)}),r(`button`,{type:`button`,className:j,disabled:t,"aria-label":`Delete the ${m(e.condition).toLowerCase()} photograph from ${N(i.reference.capturedAt)}`,onClick:()=>{if(u&&!d){l(o);return}l(null),n({stateId:i.stateId,index:i.index})},children:[s(w,{className:`mr-1 inline h-3 w-3`}),d?`Confirm`:`Delete`]}),d&&s(`p`,{className:`text-[10px] leading-snug text-warning`,children:`This is the only photograph this scene has. Delete it and the scene no longer knows what normal looks like — it stops judging until you capture again.`})]},o)})})]},e.condition))})}function M({reference:e}){let[t,n]=o(!1),i=e.thumbnailMediaId;return i===void 0||t?r(`div`,{className:`flex h-16 w-full flex-col items-center justify-center gap-0.5 rounded bg-surface text-foreground-subtle`,title:`The picture for this reference is no longer stored. The reference itself is intact and still being scored against.`,children:[s(v,{className:`h-4 w-4`}),s(`span`,{className:`text-[9px]`,children:`no picture`})]}):s(`img`,{src:`${O}/${encodeURIComponent(i)}`,alt:``,loading:`lazy`,className:`h-16 w-full rounded object-cover`,onError:()=>n(!0)})}function N(e){let t=new Date(e);return`${t.toLocaleDateString()} ${t.toLocaleTimeString([],{hour:`2-digit`,minute:`2-digit`})}`}n();var P=`rounded-md border border-border bg-surface px-2 py-1 text-[11px] text-foreground focus:border-primary focus:outline-none disabled:opacity-50`,F=`text-[10px] font-medium text-foreground-subtle`,I=`flex flex-col gap-2 rounded-md border border-border bg-surface/40 p-2`,L=`text-[10px] font-semibold uppercase tracking-wide text-foreground-subtle`,R=5,z=3600,B={periodic:`Only on the clock. Predictable, and it notices a change even on a camera nothing ever moves in front of.`,"on-motion":`Only after the camera has been still again for the quiet window below. Cheapest, but a change nobody walks past is never seen.`,both:`Both — the clock is the safety net that lets the motion path miss. This is the right answer for almost every scene.`},V={skip:`Sit that light out. No verdict, no alarm, no flag touched — it picks itself back up when a light it knows returns. This is why the night capture is optional.`,"judge-anyway":`Compare against the references you do have. Only correct when the two lights genuinely look alike (a floodlit driveway, an indoor lamp) — against a real infrared frame it will report a change that did not happen.`};function H(e){return{label:e.label,checkIntervalSec:e.checkIntervalSec??60,threshold:e.check.mode===`similarity`?e.check.threshold:.8,hysteresisCount:e.check.hysteresisCount,quietSeconds:e.quietSeconds,minObservationSpacingSec:e.minObservationSpacingSec,confirmPrompt:e.confirm?.prompt??``}}function U({monitor:e,disabled:t,onPatch:n}){let[i,l]=o(()=>H(e)),[u,d]=o(!1);c(()=>{u||l(H(e))},[e,u]);let p=e=>{d(!1),n(e)},m=t=>e.check.mode===`similarity`?{mode:`similarity`,threshold:t.threshold??e.check.threshold,hysteresisCount:t.hysteresisCount??e.check.hysteresisCount}:{...e.check,hysteresisCount:t.hysteresisCount??e.check.hysteresisCount},h=e.confirm?.enabled===!0,g=e.check.mode===`similarity`?e.check.threshold:null;return r(`div`,{className:`flex flex-col gap-2`,children:[r(`div`,{className:I,children:[s(`p`,{className:L,children:`What it watches`}),r(`label`,{className:`flex flex-col gap-1`,children:[s(`span`,{className:F,children:`Name`}),s(`input`,{type:`text`,value:i.label,disabled:t,className:P,onFocus:()=>d(!0),onChange:e=>l(t=>({...t,label:e.target.value})),onBlur:()=>{let t=i.label.trim();t.length>0&&t!==e.label?p({label:t}):d(!1)}})]}),r(`label`,{className:`flex items-center gap-2`,children:[s(`input`,{type:`checkbox`,checked:e.enabled,disabled:t,onChange:e=>p({enabled:e.target.checked})}),s(`span`,{className:F,children:`Watching`})]}),s(`p`,{className:f,children:`Turned off, the scene keeps its region, its references and its flag — it simply stops checking. Nothing is lost by pausing one for a while.`}),r(`label`,{className:`flex flex-col gap-1`,children:[s(`span`,{className:F,children:`When to look`}),r(`select`,{value:e.triggerMode,disabled:t,className:P,onChange:e=>{let t=e.target.value;(t===`periodic`||t===`on-motion`||t===`both`)&&p({triggerMode:t})},children:[s(`option`,{value:`both`,children:`On the clock and after motion settles`}),s(`option`,{value:`periodic`,children:`On the clock only`}),s(`option`,{value:`on-motion`,children:`After motion settles only`})]})]}),s(`p`,{className:f,children:B[e.triggerMode]}),r(`label`,{className:`flex flex-col gap-1`,children:[s(`span`,{className:F,children:`Check every (seconds)`}),s(`input`,{type:`number`,min:R,max:z,value:i.checkIntervalSec,disabled:t,className:P,onFocus:()=>d(!0),onChange:e=>l(t=>({...t,checkIntervalSec:Number(e.target.value)||0})),onBlur:()=>{let t=W(i.checkIntervalSec,R,z);t===e.checkIntervalSec?d(!1):p({checkIntervalSec:t})}})]}),s(`p`,{className:f,children:`60 s suits “is the bin still out”. Every check costs one photograph and one encode, so going below about 30 s buys latency you almost never need and multiplies the cost by the number of scenes you own.`})]}),r(`div`,{className:I,children:[s(`p`,{className:L,children:`How sure it has to be`}),e.check.mode===`similarity`&&r(a,{children:[r(`label`,{className:`flex flex-col gap-1`,children:[r(`span`,{className:F,children:[`Match threshold — `,s(`span`,{className:`tabular-nums`,children:i.threshold.toFixed(2)})]}),s(`input`,{type:`range`,min:.3,max:.99,step:.01,value:i.threshold,disabled:t,onFocus:()=>d(!0),onChange:e=>l(t=>({...t,threshold:Number(e.target.value)})),onMouseUp:()=>{i.threshold===g?d(!1):p({check:m({threshold:i.threshold})})},onBlur:()=>{i.threshold===g?d(!1):p({check:m({threshold:i.threshold})})}})]}),s(`p`,{className:`text-[10px] text-foreground-subtle`,children:`How closely the region still has to resemble the photograph to count as unchanged. Higher means fussier: at 0.95 a passing cloud can read as a change; at 0.60 the bin can be taken and the scene will shrug. 0.80 is a sensible start — if it cries wolf, lower it; if it misses the thing you care about, raise it.`})]}),r(`label`,{className:`flex flex-col gap-1`,children:[s(`span`,{className:F,children:`Agreeing checks before it changes its mind`}),s(`input`,{type:`number`,min:1,max:10,value:i.hysteresisCount,disabled:t,className:P,onFocus:()=>d(!0),onChange:e=>l(t=>({...t,hysteresisCount:Number(e.target.value)||1})),onBlur:()=>{let t=W(i.hysteresisCount,1,10);t===e.check.hysteresisCount?d(!1):p({check:m({hysteresisCount:t})})}})]}),s(`p`,{className:f,children:`One bad photograph must never be able to flip a scene. 3 agreeing checks at 60 s is about four minutes of latency and is what makes the answer trustworthy — leaving a state costs exactly the same as entering one.`}),r(`label`,{className:`flex flex-col gap-1`,children:[s(`span`,{className:F,children:`Quiet for (seconds) before a check counts`}),s(`input`,{type:`number`,min:0,max:3600,value:i.quietSeconds,disabled:t,className:P,onFocus:()=>d(!0),onChange:e=>l(t=>({...t,quietSeconds:Number(e.target.value)||0})),onBlur:()=>{let t=W(i.quietSeconds,0,3600);t===e.quietSeconds?d(!1):p({quietSeconds:t})}})]}),s(`p`,{className:f,children:`A check taken while something is moving is a photograph of the van parked in front of the bin, so it is discarded rather than merely delayed. 0 disables the gate.`}),r(`label`,{className:`flex flex-col gap-1`,children:[s(`span`,{className:F,children:`Minimum gap between counted checks (seconds)`}),s(`input`,{type:`number`,min:0,max:3600,value:i.minObservationSpacingSec,disabled:t,className:P,onFocus:()=>d(!0),onChange:e=>l(t=>({...t,minObservationSpacingSec:Number(e.target.value)||0})),onBlur:()=>{let t=W(i.minObservationSpacingSec,0,3600);t===e.minObservationSpacingSec?d(!1):p({minObservationSpacingSec:t})}})]}),s(`p`,{className:f,children:`Spreads the agreeing checks over real time instead of letting three adjacent polls inside one long occlusion be mistaken for three independent opinions.`})]}),r(`div`,{className:I,children:[s(`p`,{className:L,children:`Lighting`}),r(`label`,{className:`flex flex-col gap-1`,children:[s(`span`,{className:F,children:`When a light has no reference of its own`}),r(`select`,{value:e.onUncoveredCondition,disabled:t,className:P,onChange:e=>{let t=e.target.value;(t===`skip`||t===`judge-anyway`)&&p({onUncoveredCondition:t})},children:[s(`option`,{value:`skip`,children:`Skip the check (recommended)`}),s(`option`,{value:`judge-anyway`,children:`Judge against the other light anyway`})]})]}),s(`p`,{className:f,children:V[e.onUncoveredCondition]})]}),r(`div`,{className:I,children:[s(`p`,{className:L,children:`What you get told`}),r(`label`,{className:`flex flex-col gap-1`,children:[s(`span`,{className:F,children:`Notifications follow`}),r(`select`,{value:e.emit,disabled:t,className:P,onChange:e=>{let t=e.target.value;(t===`latched`||t===`live`)&&p({emit:t})},children:[s(`option`,{value:`latched`,children:`The flag — told once, still visible at breakfast`}),s(`option`,{value:`live`,children:`The live state — follows the region as it changes`})]})]}),s(`p`,{className:f,children:`“Is the bin gone” is a flag: you want to be told once and still see it later. “Is the gate open” is a live state.`}),r(`label`,{className:`flex items-center gap-2`,children:[s(`input`,{type:`checkbox`,checked:e.autoRestore,disabled:t,onChange:e=>p({autoRestore:e.target.checked})}),s(`span`,{className:F,children:`Clear the flag by itself when things look normal again`})]}),s(`p`,{className:f,children:`Off by default, so an alarm never silently clears itself. The “back to normal” moment is recorded either way, so an automation can still react to it.`})]}),r(`div`,{className:I,children:[s(`p`,{className:L,children:`AI double-check`}),r(`label`,{className:`flex items-center gap-2`,children:[s(`input`,{type:`checkbox`,checked:h,disabled:t||i.confirmPrompt.trim().length===0,onChange:e=>p(e.target.checked?{confirm:{...G(i.confirmPrompt.trim()),enabled:!0}}:{confirm:null})}),s(`span`,{className:F,children:`Ask a vision model before changing the answer`})]}),r(`label`,{className:`flex flex-col gap-1`,children:[s(`span`,{className:F,children:`The question to ask`}),s(`input`,{type:`text`,value:i.confirmPrompt,placeholder:`e.g. Is the wheelie bin still there?`,disabled:t,className:P,onFocus:()=>d(!0),onChange:e=>l(t=>({...t,confirmPrompt:e.target.value})),onBlur:()=>{let t=i.confirmPrompt.trim();t.length>0&&t!==e.confirm?.prompt?p({confirm:{...G(t),enabled:h}}):d(!1)}})]}),r(`p`,{className:f,children:[`The model is asked `,s(`strong`,{children:`only`}),` when the region has already changed enough to flip the answer — roughly twice a week for a bin, not once a minute. It reasons about the object rather than the pixels, so rain, shadows and a repositioned bin stop counting as the thing being taken. If it cannot be reached, the change is held rather than announced.`]})]})]})}function W(e,t,n){return Math.min(n,Math.max(t,e))}function G(e){return{enabled:!1,prompt:e,timeoutMs:8e3,maxImagePx:448,onTimeout:`hold`}}n();var K=`rounded-md border border-border bg-surface px-2 py-1 text-[11px] font-medium text-foreground-subtle hover:bg-surface-hover disabled:opacity-40 transition-colors`,q=`rounded-md border border-primary/50 bg-primary/15 px-2.5 py-1 text-[11px] font-medium text-primary hover:bg-primary/25 disabled:opacity-40 transition-colors`,J=`rounded-md border border-danger/50 bg-danger/10 px-2 py-1 text-[11px] font-medium text-danger hover:bg-danger/20 disabled:opacity-40 transition-colors`,ne={alarm:`border-danger/50 bg-danger/15 text-danger`,ok:`border-success/50 bg-success/15 text-success`,unknown:`border-border bg-surface text-foreground-subtle`},re=.8,ie=3;function Y({deviceId:n}){let _=l(ee().trpcClient,n),v=S(_?.state.sceneMonitor),y=C(n,{width:640}),[O,k]=o(null),[A,j]=o(!1),[M,N]=o(null),[P,F]=o(null),[I,L]=o(null),[R,z]=o(null),[B,V]=o(!1),[H,W]=o(null),[G,Y]=o(``),X=t(!0);c(()=>(X.current=!0,()=>{X.current=!1}),[]);let Z=e(async()=>{if(_)try{let e=await _.sceneMonitor?.listScenes({});if(!X.current)return;e&&k(e)}catch(e){if(!X.current)return;g(e)?j(!0):F(e instanceof Error?e.message:String(e))}},[_]);c(()=>{k(null),j(!1),F(null),Z()},[Z]);let Q=v?.monitors??O?.monitors??[],ae=Date.now(),$=e(async(e,t)=>{N(e),F(null);try{await t(),await Z()}catch(e){X.current&&F(e instanceof Error?e.message:String(e))}finally{X.current&&N(null)}},[Z]),oe=i(()=>{let e=Q.map(e=>({id:e.id,shape:e.roi,label:e.label,enabled:e.enabled}));return H===null?e:[...e,{id:`__draft__`,shape:H,label:`New scene`}]},[Q,H]),se=e((e,t)=>{if(t.kind===`rect`){if(e===`__draft__`){W(t);return}$(`roi-${String(e)}`,async()=>_?.sceneMonitor?.updateScene({monitorId:String(e),patch:{roi:t}}))}},[_,$]),ce=e(e=>{e.kind===`rect`&&W(e)},[]),le=e(async()=>{H===null||G.trim().length===0||(await $(`create`,async()=>{await _?.sceneMonitor?.createScene({label:G.trim(),roi:H,check:{mode:`similarity`,threshold:re,hysteresisCount:ie}})}),W(null),Y(``),V(!1))},[_,H,G,$]);return _?s(`div`,{className:`flex flex-col gap-3`,children:A?s(`p`,{className:`${f} leading-relaxed`,children:`Scene monitoring is not available for this camera.`}):r(a,{children:[s(`p`,{className:`${f} leading-relaxed`,children:`A scene watches one region of this camera and tells you when it stops looking like the picture you captured. Draw a box around the thing you care about — a wheelie bin, a gate, a parking space — then capture what “normal” looks like. Daylight is enough to start: the night reference is optional, and without it the scene simply sits the infrared hours out instead of reporting a problem.`}),s(`div`,{className:`relative overflow-hidden rounded-md border border-border`,children:s(E,{items:oe,supportedShapes:[`rect`],selectedId:I??(H===null?null:`__draft__`),onSelect:e=>L(e===null?null:String(e)),onShapeChange:se,onDrawComplete:ce,drawingKind:B&&H===null?`rect`:null,backdrop:y.src===null?null:s(`img`,{src:y.src,alt:``,className:`h-full w-full object-contain`,draggable:!1})})}),r(`div`,{className:`flex flex-wrap items-center gap-2`,children:[s(`button`,{type:`button`,className:B?q:K,"aria-pressed":B,onClick:()=>{V(e=>!e),W(null)},disabled:M!==null,children:B?`Cancel`:`+ New scene`}),s(`button`,{type:`button`,className:K,onClick:y.refresh,disabled:M!==null,children:`Refresh frame`})]}),B&&r(`div`,{className:`flex flex-col gap-2 rounded-md border border-border bg-surface p-2`,children:[s(`p`,{className:`text-[10px] text-foreground-subtle`,children:H===null?`Click on the frame to drop a box, then drag its corner to fit it around the thing you want watched.`:`Name it, then create. You capture what “normal” looks like next.`}),H!==null&&h(H)&&s(`p`,{className:`text-[11px] leading-relaxed text-warning`,children:`That box covers most of the frame. A scene that big is dominated by the weather, the sky and passing cars — it will quietly stop noticing the thing you actually care about. Draw it tighter.`}),r(`div`,{className:`flex items-center gap-2`,children:[s(`input`,{type:`text`,value:G,onChange:e=>Y(e.target.value),placeholder:`e.g. Immondizia prelevata`,className:`flex-1 rounded-md border border-border bg-surface px-2 py-1 text-[12px] text-foreground`}),s(`button`,{type:`button`,className:q,onClick:()=>void le(),disabled:H===null||G.trim().length===0||M!==null,children:`Create`})]})]}),P!==null&&s(`p`,{className:`text-[11px] leading-relaxed text-danger`,children:P}),Q.length===0?s(`p`,{className:`${f} leading-relaxed`,children:`No scenes on this camera yet.`}):s(`ul`,{className:`flex flex-col gap-2`,children:Q.map(e=>{let t=p(e);return r(`li`,{className:`flex flex-col gap-1.5 rounded-md border p-2 ${I===e.id?`border-primary/50`:`border-border`}`,children:[r(`div`,{className:`flex items-center gap-2`,children:[s(`button`,{type:`button`,className:`flex-1 text-left text-[12px] font-medium text-foreground`,onClick:()=>L(e.id),children:e.label}),s(`span`,{className:`rounded border px-1.5 py-0.5 text-[10px] font-medium ${ne[t.tone]}`,children:t.text})]}),s(`p`,{className:`${f} leading-relaxed`,children:u(e,ae)}),s(`p`,{className:`${f} tabular-nums`,children:T(e)}),s(te,{monitor:e,disabled:M!==null,onDelete:({stateId:t,index:n})=>void $(`refdel-${e.id}-${t}-${String(n)}`,async()=>_.sceneMonitor?.deleteReference({monitorId:e.id,stateId:t,index:n}))}),r(`div`,{className:`flex flex-wrap items-center gap-1.5`,children:[d.map(t=>{let n=t===`ir`;return r(`button`,{type:`button`,className:K,disabled:M!==null,title:n?`Optional. Without a night reference the checks in infrared are simply skipped — the scene keeps working in daylight and nothing is reported as broken.`:`Take a fresh photo now and store it as the ${m(t).toLowerCase()} reference`,onClick:()=>void $(`cap-${e.id}-${t}`,async()=>_.sceneMonitor?.captureReference({monitorId:e.id,condition:t})),children:[s(b,{className:`mr-1 inline h-3 w-3`}),`Capture `,m(t).toLowerCase(),n&&s(`span`,{className:`ml-1 text-foreground-subtle/70`,children:`(optional)`})]},t)}),r(`button`,{type:`button`,className:q,disabled:M!==null||e.states.length===0,title:`Clear the flag and re-photograph what normal looks like right now`,onClick:()=>void $(`reset-${e.id}`,async()=>_.sceneMonitor?.resetScene({monitorId:e.id})),children:[s(x,{className:`mr-1 inline h-3 w-3`}),`Reset`]}),s(`button`,{type:`button`,className:K,disabled:M!==null,onClick:()=>void $(`check-${e.id}`,async()=>_.sceneMonitor?.recheckNow({monitorId:e.id})),children:`Check now`}),r(`button`,{type:`button`,className:R===e.id?q:K,"aria-pressed":R===e.id,"aria-label":`Settings for ${e.label}`,disabled:M!==null,onClick:()=>z(t=>t===e.id?null:e.id),children:[s(D,{className:`mr-1 inline h-3 w-3`}),`Settings`]}),s(`button`,{type:`button`,className:J,disabled:M!==null,onClick:()=>void $(`del-${e.id}`,async()=>_.sceneMonitor?.deleteScene({monitorId:e.id})),children:s(w,{className:`h-3 w-3`})})]}),R===e.id&&s(U,{monitor:e,disabled:M!==null,onPatch:t=>void $(`tune-${e.id}`,async()=>_.sceneMonitor?.updateScene({monitorId:e.id,patch:t}))})]},e.id)})})]})}):null}export{Y as SceneMonitorEditor};
|
|
1
|
+
import{I as e,K as t,Q as n,S as r,W as i,b as a,q as o,x as s,z as c}from"./_virtual_mf___mfe_internal__admin_ui_host__loadShare___mf_0_tanstack_mf_1_react_mf_2_query__loadShare__.js-DhP-Lgiq.js";import{G as l,H as u,L as d,M as f,R as p,U as m,V as h,W as g,Z as _,at as ee,dt as v,gt as y,ht as b,lt as x,q as S,s as C,st as w,z as T}from"./player-overlays-CxkGdXT-.js";import{MaskShapeCanvas as E}from"./MaskShapeCanvas-Dcpby34M.js";var D=y(`settings-2`,[[`path`,{d:`M14 17H5`,key:`gfn3mx`}],[`path`,{d:`M19 7h-9`,key:`6i9tg`}],[`circle`,{cx:`17`,cy:`17`,r:`3`,key:`18b49y`}],[`circle`,{cx:`7`,cy:`7`,r:`3`,key:`dfmy0x`}]]);n();var O=_(`/addon/pipeline-analytics/event-media`);function k(e){let t=new Map;for(let n of e.states)n.references.forEach((e,r)=>{let i=t.get(e.condition)??[];i.push({stateId:n.id,index:r,reference:e}),t.set(e.condition,i)});return[...t.entries()].map(([e,t])=>({condition:e,tiles:[...t].sort((e,t)=>t.reference.capturedAt-e.reference.capturedAt)})).sort((e,t)=>e.condition.localeCompare(t.condition))}function A(e){return e.states.reduce((e,t)=>e+t.references.length,0)}var j=`rounded border border-danger/50 bg-danger/10 px-1 py-0.5 text-[10px] font-medium text-danger hover:bg-danger/20 disabled:opacity-40 transition-colors`;function te({monitor:e,disabled:t,onDelete:n}){let i=k(e),a=A(e),[c,l]=o(null);return i.length===0?s(`p`,{className:`${f} leading-relaxed`,children:`No photographs captured yet. Press “Capture daylight” to take the one this scene will judge everything against.`}):s(`div`,{className:`flex flex-col gap-2`,children:i.map(e=>r(`div`,{className:`flex flex-col gap-1`,children:[r(`p`,{className:`text-[10px] font-semibold uppercase tracking-wide text-foreground-subtle`,children:[m(e.condition),` · `,e.tiles.length]}),s(`ul`,{className:`flex flex-wrap gap-1.5`,children:e.tiles.map(i=>{let o=`${i.stateId}:${String(i.index)}`,u=a===1,d=c===o;return r(`li`,{className:`flex w-24 flex-col gap-1 rounded-md border border-border p-1`,children:[s(M,{reference:i.reference}),s(`span`,{className:`${f} tabular-nums`,children:N(i.reference.capturedAt)}),r(`button`,{type:`button`,className:j,disabled:t,"aria-label":`Delete the ${m(e.condition).toLowerCase()} photograph from ${N(i.reference.capturedAt)}`,onClick:()=>{if(u&&!d){l(o);return}l(null),n({stateId:i.stateId,index:i.index})},children:[s(w,{className:`mr-1 inline h-3 w-3`}),d?`Confirm`:`Delete`]}),d&&s(`p`,{className:`text-[10px] leading-snug text-warning`,children:`This is the only photograph this scene has. Delete it and the scene no longer knows what normal looks like — it stops judging until you capture again.`})]},o)})})]},e.condition))})}function M({reference:e}){let[t,n]=o(!1),i=e.thumbnailMediaId;return i===void 0||t?r(`div`,{className:`flex h-16 w-full flex-col items-center justify-center gap-0.5 rounded bg-surface text-foreground-subtle`,title:`The picture for this reference is no longer stored. The reference itself is intact and still being scored against.`,children:[s(v,{className:`h-4 w-4`}),s(`span`,{className:`text-[9px]`,children:`no picture`})]}):s(`img`,{src:`${O}/${encodeURIComponent(i)}`,alt:``,loading:`lazy`,className:`h-16 w-full rounded object-cover`,onError:()=>n(!0)})}function N(e){let t=new Date(e);return`${t.toLocaleDateString()} ${t.toLocaleTimeString([],{hour:`2-digit`,minute:`2-digit`})}`}n();var P=`rounded-md border border-border bg-surface px-2 py-1 text-[11px] text-foreground focus:border-primary focus:outline-none disabled:opacity-50`,F=`text-[10px] font-medium text-foreground-subtle`,I=`flex flex-col gap-2 rounded-md border border-border bg-surface/40 p-2`,L=`text-[10px] font-semibold uppercase tracking-wide text-foreground-subtle`,R=5,z=3600,B={periodic:`Only on the clock. Predictable, and it notices a change even on a camera nothing ever moves in front of.`,"on-motion":`Only after the camera has been still again for the quiet window below. Cheapest, but a change nobody walks past is never seen.`,both:`Both — the clock is the safety net that lets the motion path miss. This is the right answer for almost every scene.`},V={skip:`Sit that light out. No verdict, no alarm, no flag touched — it picks itself back up when a light it knows returns. This is why the night capture is optional.`,"judge-anyway":`Compare against the references you do have. Only correct when the two lights genuinely look alike (a floodlit driveway, an indoor lamp) — against a real infrared frame it will report a change that did not happen.`};function H(e){return{label:e.label,checkIntervalSec:e.checkIntervalSec??60,threshold:e.check.mode===`similarity`?e.check.threshold:.8,hysteresisCount:e.check.hysteresisCount,quietSeconds:e.quietSeconds,minObservationSpacingSec:e.minObservationSpacingSec,confirmPrompt:e.confirm?.prompt??``}}function U({monitor:e,disabled:t,onPatch:n}){let[i,l]=o(()=>H(e)),[u,d]=o(!1);c(()=>{u||l(H(e))},[e,u]);let p=e=>{d(!1),n(e)},m=t=>e.check.mode===`similarity`?{mode:`similarity`,threshold:t.threshold??e.check.threshold,hysteresisCount:t.hysteresisCount??e.check.hysteresisCount}:{...e.check,hysteresisCount:t.hysteresisCount??e.check.hysteresisCount},h=e.confirm?.enabled===!0,g=e.check.mode===`similarity`?e.check.threshold:null;return r(`div`,{className:`flex flex-col gap-2`,children:[r(`div`,{className:I,children:[s(`p`,{className:L,children:`What it watches`}),r(`label`,{className:`flex flex-col gap-1`,children:[s(`span`,{className:F,children:`Name`}),s(`input`,{type:`text`,value:i.label,disabled:t,className:P,onFocus:()=>d(!0),onChange:e=>l(t=>({...t,label:e.target.value})),onBlur:()=>{let t=i.label.trim();t.length>0&&t!==e.label?p({label:t}):d(!1)}})]}),r(`label`,{className:`flex items-center gap-2`,children:[s(`input`,{type:`checkbox`,checked:e.enabled,disabled:t,onChange:e=>p({enabled:e.target.checked})}),s(`span`,{className:F,children:`Watching`})]}),s(`p`,{className:f,children:`Turned off, the scene keeps its region, its references and its flag — it simply stops checking. Nothing is lost by pausing one for a while.`}),r(`label`,{className:`flex flex-col gap-1`,children:[s(`span`,{className:F,children:`When to look`}),r(`select`,{value:e.triggerMode,disabled:t,className:P,onChange:e=>{let t=e.target.value;(t===`periodic`||t===`on-motion`||t===`both`)&&p({triggerMode:t})},children:[s(`option`,{value:`both`,children:`On the clock and after motion settles`}),s(`option`,{value:`periodic`,children:`On the clock only`}),s(`option`,{value:`on-motion`,children:`After motion settles only`})]})]}),s(`p`,{className:f,children:B[e.triggerMode]}),r(`label`,{className:`flex flex-col gap-1`,children:[s(`span`,{className:F,children:`Check every (seconds)`}),s(`input`,{type:`number`,min:R,max:z,value:i.checkIntervalSec,disabled:t,className:P,onFocus:()=>d(!0),onChange:e=>l(t=>({...t,checkIntervalSec:Number(e.target.value)||0})),onBlur:()=>{let t=W(i.checkIntervalSec,R,z);t===e.checkIntervalSec?d(!1):p({checkIntervalSec:t})}})]}),s(`p`,{className:f,children:`60 s suits “is the bin still out”. Every check costs one photograph and one encode, so going below about 30 s buys latency you almost never need and multiplies the cost by the number of scenes you own.`})]}),r(`div`,{className:I,children:[s(`p`,{className:L,children:`How sure it has to be`}),e.check.mode===`similarity`&&r(a,{children:[r(`label`,{className:`flex flex-col gap-1`,children:[r(`span`,{className:F,children:[`Match threshold — `,s(`span`,{className:`tabular-nums`,children:i.threshold.toFixed(2)})]}),s(`input`,{type:`range`,min:.3,max:.99,step:.01,value:i.threshold,disabled:t,onFocus:()=>d(!0),onChange:e=>l(t=>({...t,threshold:Number(e.target.value)})),onMouseUp:()=>{i.threshold===g?d(!1):p({check:m({threshold:i.threshold})})},onBlur:()=>{i.threshold===g?d(!1):p({check:m({threshold:i.threshold})})}})]}),s(`p`,{className:`text-[10px] text-foreground-subtle`,children:`How closely the region still has to resemble the photograph to count as unchanged. Higher means fussier: at 0.95 a passing cloud can read as a change; at 0.60 the bin can be taken and the scene will shrug. 0.80 is a sensible start — if it cries wolf, lower it; if it misses the thing you care about, raise it.`})]}),r(`label`,{className:`flex flex-col gap-1`,children:[s(`span`,{className:F,children:`Agreeing checks before it changes its mind`}),s(`input`,{type:`number`,min:1,max:10,value:i.hysteresisCount,disabled:t,className:P,onFocus:()=>d(!0),onChange:e=>l(t=>({...t,hysteresisCount:Number(e.target.value)||1})),onBlur:()=>{let t=W(i.hysteresisCount,1,10);t===e.check.hysteresisCount?d(!1):p({check:m({hysteresisCount:t})})}})]}),s(`p`,{className:f,children:`One bad photograph must never be able to flip a scene. 3 agreeing checks at 60 s is about four minutes of latency and is what makes the answer trustworthy — leaving a state costs exactly the same as entering one.`}),r(`label`,{className:`flex flex-col gap-1`,children:[s(`span`,{className:F,children:`Quiet for (seconds) before a check counts`}),s(`input`,{type:`number`,min:0,max:3600,value:i.quietSeconds,disabled:t,className:P,onFocus:()=>d(!0),onChange:e=>l(t=>({...t,quietSeconds:Number(e.target.value)||0})),onBlur:()=>{let t=W(i.quietSeconds,0,3600);t===e.quietSeconds?d(!1):p({quietSeconds:t})}})]}),s(`p`,{className:f,children:`A check taken while something is moving is a photograph of the van parked in front of the bin, so it is discarded rather than merely delayed. 0 disables the gate.`}),r(`label`,{className:`flex flex-col gap-1`,children:[s(`span`,{className:F,children:`Minimum gap between counted checks (seconds)`}),s(`input`,{type:`number`,min:0,max:3600,value:i.minObservationSpacingSec,disabled:t,className:P,onFocus:()=>d(!0),onChange:e=>l(t=>({...t,minObservationSpacingSec:Number(e.target.value)||0})),onBlur:()=>{let t=W(i.minObservationSpacingSec,0,3600);t===e.minObservationSpacingSec?d(!1):p({minObservationSpacingSec:t})}})]}),s(`p`,{className:f,children:`Spreads the agreeing checks over real time instead of letting three adjacent polls inside one long occlusion be mistaken for three independent opinions.`})]}),r(`div`,{className:I,children:[s(`p`,{className:L,children:`Lighting`}),r(`label`,{className:`flex flex-col gap-1`,children:[s(`span`,{className:F,children:`When a light has no reference of its own`}),r(`select`,{value:e.onUncoveredCondition,disabled:t,className:P,onChange:e=>{let t=e.target.value;(t===`skip`||t===`judge-anyway`)&&p({onUncoveredCondition:t})},children:[s(`option`,{value:`skip`,children:`Skip the check (recommended)`}),s(`option`,{value:`judge-anyway`,children:`Judge against the other light anyway`})]})]}),s(`p`,{className:f,children:V[e.onUncoveredCondition]})]}),r(`div`,{className:I,children:[s(`p`,{className:L,children:`What you get told`}),r(`label`,{className:`flex flex-col gap-1`,children:[s(`span`,{className:F,children:`Notifications follow`}),r(`select`,{value:e.emit,disabled:t,className:P,onChange:e=>{let t=e.target.value;(t===`latched`||t===`live`)&&p({emit:t})},children:[s(`option`,{value:`latched`,children:`The flag — told once, still visible at breakfast`}),s(`option`,{value:`live`,children:`The live state — follows the region as it changes`})]})]}),s(`p`,{className:f,children:`“Is the bin gone” is a flag: you want to be told once and still see it later. “Is the gate open” is a live state.`}),r(`label`,{className:`flex items-center gap-2`,children:[s(`input`,{type:`checkbox`,checked:e.autoRestore,disabled:t,onChange:e=>p({autoRestore:e.target.checked})}),s(`span`,{className:F,children:`Clear the flag by itself when things look normal again`})]}),s(`p`,{className:f,children:`Off by default, so an alarm never silently clears itself. The “back to normal” moment is recorded either way, so an automation can still react to it.`})]}),r(`div`,{className:I,children:[s(`p`,{className:L,children:`AI double-check`}),r(`label`,{className:`flex items-center gap-2`,children:[s(`input`,{type:`checkbox`,checked:h,disabled:t||i.confirmPrompt.trim().length===0,onChange:e=>p(e.target.checked?{confirm:{...G(i.confirmPrompt.trim()),enabled:!0}}:{confirm:null})}),s(`span`,{className:F,children:`Ask a vision model before changing the answer`})]}),r(`label`,{className:`flex flex-col gap-1`,children:[s(`span`,{className:F,children:`The question to ask`}),s(`input`,{type:`text`,value:i.confirmPrompt,placeholder:`e.g. Is the wheelie bin still there?`,disabled:t,className:P,onFocus:()=>d(!0),onChange:e=>l(t=>({...t,confirmPrompt:e.target.value})),onBlur:()=>{let t=i.confirmPrompt.trim();t.length>0&&t!==e.confirm?.prompt?p({confirm:{...G(t),enabled:h}}):d(!1)}})]}),r(`p`,{className:f,children:[`The model is asked `,s(`strong`,{children:`only`}),` when the region has already changed enough to flip the answer — roughly twice a week for a bin, not once a minute. It reasons about the object rather than the pixels, so rain, shadows and a repositioned bin stop counting as the thing being taken. If it cannot be reached, the change is held rather than announced.`]})]})]})}function W(e,t,n){return Math.min(n,Math.max(t,e))}function G(e){return{enabled:!1,prompt:e,timeoutMs:8e3,maxImagePx:448,onTimeout:`hold`}}n();var K=`rounded-md border border-border bg-surface px-2 py-1 text-[11px] font-medium text-foreground-subtle hover:bg-surface-hover disabled:opacity-40 transition-colors`,q=`rounded-md border border-primary/50 bg-primary/15 px-2.5 py-1 text-[11px] font-medium text-primary hover:bg-primary/25 disabled:opacity-40 transition-colors`,J=`rounded-md border border-danger/50 bg-danger/10 px-2 py-1 text-[11px] font-medium text-danger hover:bg-danger/20 disabled:opacity-40 transition-colors`,ne={alarm:`border-danger/50 bg-danger/15 text-danger`,ok:`border-success/50 bg-success/15 text-success`,unknown:`border-border bg-surface text-foreground-subtle`},re=.8,ie=3;function Y({deviceId:n}){let _=l(ee().trpcClient,n),v=S(_?.state.sceneMonitor),y=C(n,{width:640}),[O,k]=o(null),[A,j]=o(!1),[M,N]=o(null),[P,F]=o(null),[I,L]=o(null),[R,z]=o(null),[B,V]=o(!1),[H,W]=o(null),[G,Y]=o(``),X=t(!0);c(()=>(X.current=!0,()=>{X.current=!1}),[]);let Z=e(async()=>{if(_)try{let e=await _.sceneMonitor?.listScenes({});if(!X.current)return;e&&k(e)}catch(e){if(!X.current)return;g(e)?j(!0):F(e instanceof Error?e.message:String(e))}},[_]);c(()=>{k(null),j(!1),F(null),Z()},[Z]);let Q=v?.monitors??O?.monitors??[],ae=Date.now(),$=e(async(e,t)=>{N(e),F(null);try{await t(),await Z()}catch(e){X.current&&F(e instanceof Error?e.message:String(e))}finally{X.current&&N(null)}},[Z]),oe=i(()=>{let e=Q.map(e=>({id:e.id,shape:e.roi,label:e.label,enabled:e.enabled}));return H===null?e:[...e,{id:`__draft__`,shape:H,label:`New scene`}]},[Q,H]),se=e((e,t)=>{if(t.kind===`rect`){if(e===`__draft__`){W(t);return}$(`roi-${String(e)}`,async()=>_?.sceneMonitor?.updateScene({monitorId:String(e),patch:{roi:t}}))}},[_,$]),ce=e(e=>{e.kind===`rect`&&W(e)},[]),le=e(async()=>{H===null||G.trim().length===0||(await $(`create`,async()=>{await _?.sceneMonitor?.createScene({label:G.trim(),roi:H,check:{mode:`similarity`,threshold:re,hysteresisCount:ie}})}),W(null),Y(``),V(!1))},[_,H,G,$]);return _?s(`div`,{className:`flex flex-col gap-3`,children:A?s(`p`,{className:`${f} leading-relaxed`,children:`Scene monitoring is not available for this camera.`}):r(a,{children:[s(`p`,{className:`${f} leading-relaxed`,children:`A scene watches one region of this camera and tells you when it stops looking like the picture you captured. Draw a box around the thing you care about — a wheelie bin, a gate, a parking space — then capture what “normal” looks like. Daylight is enough to start: the night reference is optional, and without it the scene simply sits the infrared hours out instead of reporting a problem.`}),s(`div`,{className:`relative overflow-hidden rounded-md border border-border`,children:s(E,{items:oe,supportedShapes:[`rect`],selectedId:I??(H===null?null:`__draft__`),onSelect:e=>L(e===null?null:String(e)),onShapeChange:se,onDrawComplete:ce,drawingKind:B&&H===null?`rect`:null,backdrop:y.src===null?null:s(`img`,{src:y.src,alt:``,className:`h-full w-full object-contain`,draggable:!1})})}),r(`div`,{className:`flex flex-wrap items-center gap-2`,children:[s(`button`,{type:`button`,className:B?q:K,"aria-pressed":B,onClick:()=>{V(e=>!e),W(null)},disabled:M!==null,children:B?`Cancel`:`+ New scene`}),s(`button`,{type:`button`,className:K,onClick:y.refresh,disabled:M!==null,children:`Refresh frame`})]}),B&&r(`div`,{className:`flex flex-col gap-2 rounded-md border border-border bg-surface p-2`,children:[s(`p`,{className:`text-[10px] text-foreground-subtle`,children:H===null?`Click on the frame to drop a box, then drag its corner to fit it around the thing you want watched.`:`Name it, then create. You capture what “normal” looks like next.`}),H!==null&&h(H)&&s(`p`,{className:`text-[11px] leading-relaxed text-warning`,children:`That box covers most of the frame. A scene that big is dominated by the weather, the sky and passing cars — it will quietly stop noticing the thing you actually care about. Draw it tighter.`}),r(`div`,{className:`flex items-center gap-2`,children:[s(`input`,{type:`text`,value:G,onChange:e=>Y(e.target.value),placeholder:`e.g. Immondizia prelevata`,className:`flex-1 rounded-md border border-border bg-surface px-2 py-1 text-[12px] text-foreground`}),s(`button`,{type:`button`,className:q,onClick:()=>void le(),disabled:H===null||G.trim().length===0||M!==null,children:`Create`})]})]}),P!==null&&s(`p`,{className:`text-[11px] leading-relaxed text-danger`,children:P}),Q.length===0?s(`p`,{className:`${f} leading-relaxed`,children:`No scenes on this camera yet.`}):s(`ul`,{className:`flex flex-col gap-2`,children:Q.map(e=>{let t=p(e);return r(`li`,{className:`flex flex-col gap-1.5 rounded-md border p-2 ${I===e.id?`border-primary/50`:`border-border`}`,children:[r(`div`,{className:`flex items-center gap-2`,children:[s(`button`,{type:`button`,className:`flex-1 text-left text-[12px] font-medium text-foreground`,onClick:()=>L(e.id),children:e.label}),s(`span`,{className:`rounded border px-1.5 py-0.5 text-[10px] font-medium ${ne[t.tone]}`,children:t.text})]}),s(`p`,{className:`${f} leading-relaxed`,children:u(e,ae)}),s(`p`,{className:`${f} tabular-nums`,children:T(e)}),s(te,{monitor:e,disabled:M!==null,onDelete:({stateId:t,index:n})=>void $(`refdel-${e.id}-${t}-${String(n)}`,async()=>_.sceneMonitor?.deleteReference({monitorId:e.id,stateId:t,index:n}))}),r(`div`,{className:`flex flex-wrap items-center gap-1.5`,children:[d.map(t=>{let n=t===`ir`;return r(`button`,{type:`button`,className:K,disabled:M!==null,title:n?`Optional. Without a night reference the checks in infrared are simply skipped — the scene keeps working in daylight and nothing is reported as broken.`:`Take a fresh photo now and store it as the ${m(t).toLowerCase()} reference`,onClick:()=>void $(`cap-${e.id}-${t}`,async()=>_.sceneMonitor?.captureReference({monitorId:e.id,condition:t})),children:[s(b,{className:`mr-1 inline h-3 w-3`}),`Capture `,m(t).toLowerCase(),n&&s(`span`,{className:`ml-1 text-foreground-subtle/70`,children:`(optional)`})]},t)}),r(`button`,{type:`button`,className:q,disabled:M!==null||e.states.length===0,title:`Clear the flag and re-photograph what normal looks like right now`,onClick:()=>void $(`reset-${e.id}`,async()=>_.sceneMonitor?.resetScene({monitorId:e.id})),children:[s(x,{className:`mr-1 inline h-3 w-3`}),`Reset`]}),s(`button`,{type:`button`,className:K,disabled:M!==null,onClick:()=>void $(`check-${e.id}`,async()=>_.sceneMonitor?.recheckNow({monitorId:e.id})),children:`Check now`}),r(`button`,{type:`button`,className:R===e.id?q:K,"aria-pressed":R===e.id,"aria-label":`Settings for ${e.label}`,disabled:M!==null,onClick:()=>z(t=>t===e.id?null:e.id),children:[s(D,{className:`mr-1 inline h-3 w-3`}),`Settings`]}),s(`button`,{type:`button`,className:J,disabled:M!==null,onClick:()=>void $(`del-${e.id}`,async()=>_.sceneMonitor?.deleteScene({monitorId:e.id})),children:s(w,{className:`h-3 w-3`})})]}),R===e.id&&s(U,{monitor:e,disabled:M!==null,onPatch:t=>void $(`tune-${e.id}`,async()=>_.sceneMonitor?.updateScene({monitorId:e.id,patch:t}))})]},e.id)})})]})}):null}export{Y as SceneMonitorEditor};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{Q as e,S as t,W as n,X as r,q as i,x as a}from"./_virtual_mf___mfe_internal__admin_ui_host__loadShare___mf_0_tanstack_mf_1_react_mf_2_query__loadShare__.js-DhP-Lgiq.js";import{B as o,H as s,R as c,z as l}from"./player-overlays-
|
|
1
|
+
import{Q as e,S as t,W as n,X as r,q as i,x as a}from"./_virtual_mf___mfe_internal__admin_ui_host__loadShare___mf_0_tanstack_mf_1_react_mf_2_query__loadShare__.js-DhP-Lgiq.js";import{B as o,H as s,R as c,z as l}from"./player-overlays-CxkGdXT-.js";import{Ct as u,Et as d,Ft as f,It as p,Jr as m,Mt as h,Ot as g,Pt as _,Tt as v,kt as y,nt as b,rt as x,t as S,wt as C}from"./src-BJmgjR4B.js";import{t as w}from"./plus-m8t8zcIv.js";import{g as T}from"./index-CWmgzFYA.js";import{t as E}from"./AdminPage-CCD07UMs.js";import{t as D}from"./use-scenes-feed-Di3XZrP9.js";e();function O(e){return e.states.length===0?3:e.latched?0:e.verdict===`diverged`?1:e.verdict===`unknown`?2:4}function k(e){let t=[e.divergedAt,e.restoredAt].filter(e=>typeof e==`number`);return t.length===0?null:Math.max(...t)}function A(e,t){let n=new Map(e.map(e=>[e.deviceId,e.deviceName])),r=[];for(let e of t)for(let t of e.monitors)r.push({deviceId:e.deviceId,deviceName:n.get(e.deviceId)??`Camera ${e.deviceId}`,monitor:t});return r.toSorted((e,t)=>{let n=O(e.monitor)-O(t.monitor);if(n!==0)return n;let r=k(e.monitor)??-1,i=k(t.monitor)??-1;if(r!==i)return i-r;let a=e.deviceName.localeCompare(t.deviceName);return a===0?e.monitor.label.localeCompare(t.monitor.label):a})}var j={alarm:`danger`,ok:`success`,unknown:`default`};function M(e,t){let n=k(e);return n===null?`—`:`${o(Math.max(0,t-n))} ago`}function N(){let e=m({isCamera:!0,projection:`slim`}),o=n(()=>(e.data??[]).map(e=>({deviceId:e.id,deviceName:e.name})).sort((e,t)=>e.deviceName.localeCompare(t.deviceName)),[e.data]),O=n(()=>o.map(e=>e.deviceId),[o]),k=D(O),N=n(()=>A(o,k.results),[o,k.results]),[P,F]=i(null),[I,L]=i(null),R=Date.now(),z=o.find(e=>e.deviceId===P)?.deviceName??``;return t(E,{icon:T,title:`Scenes`,subtitle:`A scene watches one region of one camera and tells you when it stops looking like the picture you captured — a wheelie bin, a gate, a parking space.`,actions:t(p,{onClick:()=>L(O[0]??null),disabled:o.length===0,children:[a(w,{className:`mr-1 h-3.5 w-3.5`}),`New scene`]}),children:[k.unreachableCount>0?t(`p`,{className:`text-xs text-warning`,children:[k.unreachableCount,` camera`,k.unreachableCount===1?``:`s`,` could not be asked about scenes. Those cameras are missing from this list — this is not the same as having no scenes.`]}):null,a(_,{variant:`flat`,className:`p-0`,children:a(b,{columns:[{key:`label`,header:`Scene`,render:e=>a(`span`,{className:`font-medium`,children:e.monitor.label})},{key:`camera`,header:`Camera`,nowrap:!0,render:e=>e.deviceName},{key:`state`,header:`State`,nowrap:!0,render:e=>{let t=c(e.monitor);return a(f,{variant:j[t.tone],children:t.text})}},{key:`status`,header:`What it says`,render:e=>a(`span`,{className:`text-xs text-muted-foreground`,children:s(e.monitor,R)})},{key:`coverage`,header:`Variants`,render:e=>a(`span`,{className:`text-xs text-muted-foreground`,children:l(e.monitor)})},{key:`transition`,header:`Last change`,align:`right`,nowrap:!0,render:e=>a(`span`,{className:`text-xs tabular-nums text-muted-foreground`,children:M(e.monitor,R)})},{key:`actions`,header:``,align:`right`,nowrap:!0,render:e=>a(p,{variant:`ghost`,onClick:()=>F(e.deviceId),children:`Open`})}],rows:N,rowKey:e=>`${e.deviceId}:${e.monitor.id}`,minWidthPx:880,bordered:!1,mobileMode:`scroll`,maxBodyHeight:x,emptyMessage:k.isLoading?`Loading scenes…`:`No scenes yet. Press “New scene”, pick a camera, then draw a box around the thing you want watched.`})}),a(u,{open:I!==null,onOpenChange:e=>!e&&L(null),children:t(v,{width:`sm`,children:[t(g,{children:[a(y,{children:`Which camera?`}),a(d,{children:`A scene lives on one camera. Pick the one that can see the thing.`})]}),t(`div`,{className:`mt-3 flex items-center gap-2`,children:[a(h,{value:I===null?``:String(I),onChange:e=>L(Number(e.target.value)),"aria-label":`Camera`,options:o.map(e=>({value:String(e.deviceId),label:e.deviceName}))}),a(p,{onClick:()=>{F(I),L(null)},disabled:I===null,children:`Continue`})]})]})}),a(u,{open:P!==null,onOpenChange:e=>!e&&F(null),children:t(v,{width:`lg`,scroll:`body`,children:[t(g,{children:[t(y,{children:[`Scenes — `,z]}),a(d,{children:`Draw a box, name it, then capture what “normal” looks like. Daylight is enough — the night reference is optional, and “Settings” on each scene tunes how fussy and how often it checks.`})]}),a(C,{className:`mt-3`,children:P===null?null:a(r,{fallback:a(`p`,{className:`text-xs text-muted-foreground`,children:`Loading the editor…`}),children:a(S,{deviceId:P})})})]})})]})}export{N as ScenesPage};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{Q as e,S as t,o as n,q as r,x as i,z as a}from"./_virtual_mf___mfe_internal__admin_ui_host__loadShare___mf_0_tanstack_mf_1_react_mf_2_query__loadShare__.js-DhP-Lgiq.js";import{Ft as o,It as s,Nt as c,Pt as l,Qs as u,_s as d,ms as f,ys as p}from"./src-
|
|
1
|
+
import{Q as e,S as t,o as n,q as r,x as i,z as a}from"./_virtual_mf___mfe_internal__admin_ui_host__loadShare___mf_0_tanstack_mf_1_react_mf_2_query__loadShare__.js-DhP-Lgiq.js";import{Ft as o,It as s,Nt as c,Pt as l,Qs as u,_s as d,ms as f,ys as p}from"./src-BJmgjR4B.js";import{t as m}from"./refresh-cw-Cl-7vQNO.js";import{f as h,x as g}from"./index-CWmgzFYA.js";import{t as _}from"./AdminPage-CCD07UMs.js";import{t as v}from"./NodeAddonsSettingsPanel-CUiP3a75.js";e();var y=[[`system`]];function b(e){return e.toFixed(6).replace(/0+$/,``).replace(/\.$/,``)}function x(){let e=n(),u=d(),h=p(),_=f(),[v,x]=r(``),[S,C]=r(``),[w,T]=r(null),E=u.data?.location??null;a(()=>{x(E===null?``:b(E.latitude)),C(E===null?``:b(E.longitude))},[E]);let D=async()=>{await e.invalidateQueries({queryKey:y})},O=async e=>{e.preventDefault();let t=Number(v),n=Number(S);if(v.trim()===``||S.trim()===``){T(`Enter both a latitude and a longitude, or press Clear.`);return}if(!Number.isFinite(t)||t<-90||t>90){T(`Latitude must be between -90 and 90 decimal degrees.`);return}if(!Number.isFinite(n)||n<-180||n>180){T(`Longitude must be between -180 and 180 decimal degrees.`);return}T(null),await h.mutateAsync({latitude:t,longitude:n}),await D()},k=async()=>{T(null),await h.mutateAsync(null),await D()},A=async()=>{T(null),await _.mutateAsync(),await D()},j=h.isPending||_.isPending||u.isLoading;return t(l,{className:`space-y-3`,children:[t(`div`,{className:`flex items-start justify-between gap-3`,children:[t(`div`,{className:`flex items-start gap-2`,children:[i(g,{className:`h-4 w-4 mt-0.5 text-muted-foreground shrink-0`}),i(`div`,{children:i(`h3`,{className:`text-sm font-medium`,children:`Site location`})})]}),E===null?i(o,{variant:`warning`,children:`Not configured`}):i(o,{variant:E.source===`operator-set`?`success`:`info`,children:E.source===`operator-set`?`Set by you`:`Derived from IP`})]}),E?.label!==void 0&&E.label!==``?t(`p`,{className:`text-xs text-muted-foreground`,children:[`Detected near `,E.label,`.`]}):null,E===null&&u.data?.derivationAttemptedAt!==null?t(`p`,{className:`text-xs text-warning`,children:[`Automatic detection from the public IP did not succeed`,u.data?.derivationError!==null&&u.data?.derivationError!==void 0?`: ${u.data.derivationError}`:`.`,` `,`It is not retried on its own — enter the coordinates, or press Detect.`]}):null,t(`form`,{className:`flex flex-wrap items-end gap-3`,onSubmit:O,children:[t(`label`,{className:`flex flex-col gap-1 text-xs`,children:[i(`span`,{className:`text-muted-foreground`,children:`Latitude`}),i(c,{className:`w-40`,value:v,inputMode:`decimal`,placeholder:`40.851800`,onChange:e=>x(e.target.value),"aria-label":`Latitude`})]}),t(`label`,{className:`flex flex-col gap-1 text-xs`,children:[i(`span`,{className:`text-muted-foreground`,children:`Longitude`}),i(c,{className:`w-40`,value:S,inputMode:`decimal`,placeholder:`14.268100`,onChange:e=>C(e.target.value),"aria-label":`Longitude`})]}),i(s,{type:`submit`,disabled:j,children:`Save`}),t(s,{type:`button`,variant:`ghost`,disabled:j,onClick:A,children:[i(m,{className:`h-3.5 w-3.5 mr-1`}),`Detect from IP`]}),E===null?null:i(s,{type:`button`,variant:`ghost`,disabled:j,onClick:k,children:`Clear`})]}),w===null?null:i(`p`,{className:`text-xs text-danger`,children:w}),i(`p`,{className:`text-xs text-muted-foreground`,children:`WGS84 decimal degrees. Detect asks a public geo-IP service once and will not overwrite a value you typed — clear it first.`})]})}function S(){let{nodes:e,isLoading:n}=u(),r=e.find(e=>e.isHub&&e.isOnline),a=r?.addons.map(e=>e.addonId)??[];return t(_,{children:[i(x,{}),n?i(`div`,{className:`text-muted-foreground text-sm py-12 text-center`,children:`Loading hub topology…`}):r?a.length===0?i(`div`,{className:`text-muted-foreground text-sm py-12 text-center`,children:`No addons installed on the hub yet.`}):i(v,{nodeId:r.id,addonIds:a,level:`global`}):t(`div`,{className:`flex flex-col items-center justify-center text-muted-foreground text-sm gap-2 py-12`,children:[i(h,{className:`h-8 w-8 opacity-30`}),i(`p`,{children:`No online hub node found.`}),i(`p`,{className:`text-xs`,children:`Settings will appear once the hub is reachable.`})]})]})}export{S as SettingsPage};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{Q as e,S as t,q as n,x as r}from"./_virtual_mf___mfe_internal__admin_ui_host__loadShare___mf_0_tanstack_mf_1_react_mf_2_query__loadShare__.js-DhP-Lgiq.js";import{t as i}from"./CapabilityBadges-CX6rtH_Z.js";import{t as a}from"./ProviderIcon-BhtIEbgI.js";import{t as o}from"./StatusBadge-CeptlsPG.js";import{t as s}from"./FormBuilder-BqDI8IF8.js";e();function c({title:e,children:n}){return t(`div`,{className:`rounded-lg border border-border bg-surface overflow-hidden`,children:[r(`div`,{className:`border-b border-border px-4 py-2.5`,children:r(`h2`,{className:`text-xs font-semibold text-foreground uppercase tracking-wider`,children:e})}),r(`div`,{className:`p-4`,children:n})]})}function l({name:e,cssVar:n,hex:i}){return t(`div`,{className:`flex flex-col items-center gap-1.5`,children:[r(`div`,{className:`h-10 w-10 rounded-lg border border-border shadow-inner`,style:{backgroundColor:n?`var(${n})`:i}}),r(`span`,{className:`text-[10px] text-foreground-subtle text-center leading-tight`,children:e})]})}var u={sections:[{id:`demo`,title:`Demo Fields`,columns:2,fields:[{key:`name`,type:`text`,label:`Name`,placeholder:`Enter name`},{key:`count`,type:`number`,label:`Count`,min:0,max:100,unit:`items`},{key:`enabled`,type:`boolean`,label:`Enabled`},{key:`mode`,type:`select`,label:`Mode`,options:[{value:`a`,label:`Alpha`},{value:`b`,label:`Beta`}]},{key:`tags`,type:`tags`,label:`Tags`,span:2,suggestions:[`camera`,`zone`,`alert`]},{key:`confidence`,type:`slider`,label:`Confidence`,min:0,max:100,step:5,unit:`%`,span:2},{key:`info`,type:`info`,label:`Note`,content:`This is an informational message for the user.`,variant:`info`}]}]};function d(){let[e,d]=n({name:`Example`,count:10,enabled:!0,mode:`a`,tags:[`camera`],confidence:60});return t(`div`,{className:`p-6 space-y-6 max-w-5xl mx-auto`,children:[t(`div`,{className:`mb-6`,children:[r(`h1`,{className:`text-xl font-bold text-foreground`,children:`Component Showroom`}),r(`p`,{className:`text-sm text-foreground-subtle mt-1`,children:`All UI components at a glance`})]}),r(c,{title:`Typography`,children:t(`div`,{className:`space-y-3`,children:[r(`h1`,{className:`text-2xl font-bold text-foreground`,children:`Heading 1 — Display title`}),r(`h2`,{className:`text-xl font-semibold text-foreground`,children:`Heading 2 — Section title`}),r(`h3`,{className:`text-base font-semibold text-foreground`,children:`Heading 3 — Card title`}),r(`h4`,{className:`text-sm font-semibold text-foreground`,children:`Heading 4 — Sub-section`}),r(`p`,{className:`text-sm text-foreground`,children:`Body text — Regular paragraph content goes here. It uses the foreground color.`}),r(`p`,{className:`text-sm text-foreground-subtle`,children:`Subtle text — Secondary/descriptive text with reduced emphasis.`}),r(`p`,{className:`text-xs text-foreground-subtle uppercase tracking-wider font-semibold`,children:`Label / Caption`}),r(`p`,{className:`text-xs text-foreground-disabled`,children:`Disabled / placeholder text`})]})}),r(c,{title:`Colors`,children:t(`div`,{className:`flex flex-wrap gap-4`,children:[r(l,{name:`primary`,cssVar:`--color-primary`}),r(l,{name:`background`,cssVar:`--color-background`}),r(l,{name:`surface`,cssVar:`--color-surface`}),r(l,{name:`foreground`,cssVar:`--color-foreground`}),r(l,{name:`success`,cssVar:`--color-success`}),r(l,{name:`warning`,cssVar:`--color-warning`}),r(l,{name:`danger`,cssVar:`--color-danger`}),r(l,{name:`info`,cssVar:`--color-info`}),r(l,{name:`border`,cssVar:`--color-border`}),r(`div`,{className:`w-px`}),r(l,{name:`frigate`,hex:`#3b82f6`}),r(l,{name:`scrypted`,hex:`#a855f7`}),r(l,{name:`reolink`,hex:`#06b6d4`}),r(l,{name:`ha`,hex:`#22d3ee`}),r(l,{name:`rtsp`,hex:`#78716c`})]})}),r(c,{title:`Buttons`,children:t(`div`,{className:`flex flex-wrap gap-3`,children:[r(`button`,{className:`inline-flex items-center gap-1.5 rounded-md bg-primary px-4 py-2 text-sm font-medium text-white hover:opacity-90 transition-opacity`,children:`Primary`}),r(`button`,{className:`inline-flex items-center gap-1.5 rounded-md border border-border bg-surface px-4 py-2 text-sm font-medium text-foreground hover:bg-surface-hover transition-colors`,children:`Secondary`}),r(`button`,{className:`inline-flex items-center gap-1.5 rounded-md border border-danger/40 bg-danger/10 px-4 py-2 text-sm font-medium text-danger hover:bg-danger/20 transition-colors`,children:`Danger`}),r(`button`,{disabled:!0,className:`inline-flex items-center gap-1.5 rounded-md bg-primary px-4 py-2 text-sm font-medium text-white opacity-40 cursor-not-allowed`,children:`Disabled`}),r(`button`,{className:`inline-flex items-center gap-1.5 rounded-md border border-warning/40 bg-warning/10 px-4 py-2 text-sm font-medium text-warning hover:bg-warning/20 transition-colors`,children:`Warning`}),r(`button`,{className:`inline-flex items-center gap-1.5 rounded-md border border-success/40 bg-success/10 px-4 py-2 text-sm font-medium text-success hover:bg-success/20 transition-colors`,children:`Success`})]})}),r(c,{title:`Inputs`,children:t(`div`,{className:`grid grid-cols-1 md:grid-cols-2 gap-4`,children:[t(`div`,{children:[r(`label`,{className:`block text-xs font-medium text-foreground mb-1`,children:`Text input`}),r(`input`,{type:`text`,className:`w-full rounded-md border border-border bg-background px-3 py-2 text-sm text-foreground outline-none focus:border-primary focus:ring-1 focus:ring-primary/30`,placeholder:`Type something...`})]}),t(`div`,{children:[r(`label`,{className:`block text-xs font-medium text-foreground mb-1`,children:`Number input`}),r(`input`,{type:`number`,className:`w-full rounded-md border border-border bg-background px-3 py-2 text-sm text-foreground outline-none focus:border-primary focus:ring-1 focus:ring-primary/30`,placeholder:`0`})]}),t(`div`,{children:[r(`label`,{className:`block text-xs font-medium text-foreground mb-1`,children:`Password input`}),r(`input`,{type:`password`,className:`w-full rounded-md border border-border bg-background px-3 py-2 text-sm text-foreground outline-none focus:border-primary focus:ring-1 focus:ring-primary/30`,placeholder:`••••••••`})]}),t(`div`,{children:[r(`label`,{className:`block text-xs font-medium text-foreground mb-1`,children:`Select`}),t(`select`,{className:`w-full rounded-md border border-border bg-background px-3 py-2 text-sm text-foreground outline-none focus:border-primary focus:ring-1 focus:ring-primary/30`,children:[r(`option`,{children:`Option A`}),r(`option`,{children:`Option B`}),r(`option`,{children:`Option C`})]})]}),t(`div`,{className:`md:col-span-2`,children:[r(`label`,{className:`block text-xs font-medium text-foreground mb-1`,children:`Textarea`}),r(`textarea`,{className:`w-full rounded-md border border-border bg-background px-3 py-2 text-sm text-foreground outline-none focus:border-primary focus:ring-1 focus:ring-primary/30 resize-y min-h-[60px]`,placeholder:`Enter multi-line text...`,rows:3})]}),r(`div`,{children:t(`label`,{className:`flex items-center gap-2 cursor-pointer select-none`,children:[r(`input`,{type:`checkbox`,className:`h-3.5 w-3.5 rounded border-border accent-primary`,defaultChecked:!0}),r(`span`,{className:`text-xs font-medium text-foreground`,children:`Checkbox (checked)`})]})}),r(`div`,{children:t(`div`,{className:`flex items-center justify-between`,children:[r(`span`,{className:`text-xs font-medium text-foreground`,children:`Toggle switch`}),r(f,{})]})}),t(`div`,{children:[r(`label`,{className:`block text-xs font-medium text-foreground mb-1`,children:`Slider`}),r(`input`,{type:`range`,className:`w-full h-1 accent-primary cursor-pointer`,min:0,max:100,defaultValue:60})]}),t(`div`,{children:[r(`label`,{className:`block text-xs font-medium text-foreground mb-1`,children:`Tags example`}),r(`div`,{className:`flex flex-wrap gap-1.5 rounded-md border border-border bg-background px-2 py-1.5 min-h-[38px]`,children:[`camera`,`zone`,`alert`].map(e=>r(`span`,{className:`inline-flex items-center gap-1 rounded-md bg-primary/10 px-1.5 py-0.5 text-xs text-primary`,children:e},e))})]})]})}),r(c,{title:`Badges`,children:t(`div`,{className:`space-y-3`,children:[t(`div`,{children:[r(`p`,{className:`text-xs text-foreground-subtle mb-2`,children:`StatusBadge`}),r(`div`,{className:`flex flex-wrap gap-2`,children:[`running`,`stopped`,`error`,`online`,`offline`,`idle`].map(e=>r(o,{status:e},e))})]}),t(`div`,{children:[r(`p`,{className:`text-xs text-foreground-subtle mb-2`,children:`CapabilityBadges`}),r(i,{capabilities:[`streaming`,`detection`,`recording`,`audio`]})]})]})}),r(c,{title:`Cards`,children:t(`div`,{className:`grid grid-cols-1 md:grid-cols-2 gap-4`,children:[t(`div`,{className:`rounded-lg bg-surface p-4`,children:[r(`h3`,{className:`text-sm font-semibold text-foreground mb-1`,children:`Surface card`}),r(`p`,{className:`text-xs text-foreground-subtle`,children:"Uses `bg-surface`. Default card background."})]}),t(`div`,{className:`rounded-lg border border-border bg-surface p-4`,children:[r(`h3`,{className:`text-sm font-semibold text-foreground mb-1`,children:`Bordered card`}),r(`p`,{className:`text-xs text-foreground-subtle`,children:"Uses `border border-border bg-surface`."})]}),t(`div`,{className:`rounded-lg border border-primary/30 bg-primary/5 p-4`,children:[r(`h3`,{className:`text-sm font-semibold text-primary mb-1`,children:`Accent card`}),r(`p`,{className:`text-xs text-foreground-subtle`,children:`Highlighted with primary color.`})]}),t(`div`,{className:`rounded-lg bg-background p-4`,children:[r(`h3`,{className:`text-sm font-semibold text-foreground mb-1`,children:`Background card`}),r(`p`,{className:`text-xs text-foreground-subtle`,children:"Uses `bg-background`. Inset card."})]})]})}),r(c,{title:`Provider Icons`,children:r(`div`,{className:`flex flex-wrap gap-4`,children:[`frigate`,`scrypted`,`reolink`,`homeassistant`,`rtsp`,`onvif`].map(e=>r(a,{type:e,size:`lg`,showLabel:!0},e))})}),t(c,{title:`Form Builder Demo`,children:[r(s,{schema:u,values:e,onChange:d}),t(`details`,{className:`mt-3`,children:[r(`summary`,{className:`text-[10px] text-foreground-subtle cursor-pointer hover:text-foreground`,children:`View current values`}),r(`pre`,{className:`mt-2 rounded-md bg-background p-3 text-[10px] text-foreground-subtle overflow-auto`,children:JSON.stringify(e,null,2)})]})]}),r(c,{title:`Info Boxes`,children:r(`div`,{className:`space-y-2`,children:[{variant:`info`,label:`Info`,content:`This is an informational message. Use it for tips and hints.`},{variant:`warning`,label:`Warning`,content:`This action may have side effects. Proceed with caution.`},{variant:`success`,label:`Success`,content:`Operation completed successfully. All systems are green.`},{variant:`danger`,label:`Danger`,content:`This operation is irreversible. Data will be permanently deleted.`}].map(({variant:e,label:n,content:i})=>{let a={info:{border:`border-info`,bg:`bg-info/5`,text:`text-info`},warning:{border:`border-warning`,bg:`bg-warning/5`,text:`text-warning`},success:{border:`border-success`,bg:`bg-success/5`,text:`text-success`},danger:{border:`border-danger`,bg:`bg-danger/5`,text:`text-danger`}}[e];return t(`div`,{className:`rounded-md border-l-4 px-3 py-2.5 ${a.border} ${a.bg}`,children:[r(`p`,{className:`text-xs font-semibold mb-0.5 ${a.text}`,children:n}),r(`p`,{className:`text-xs text-foreground-subtle leading-relaxed`,children:i})]},e)})})})]})}function f(){let[e,t]=n(!0);return r(`button`,{type:`button`,role:`switch`,"aria-checked":e,onClick:()=>t(e=>!e),className:[`relative inline-flex h-4 w-8 shrink-0 items-center rounded-full transition-colors duration-150 cursor-pointer`,e?`bg-primary`:`bg-foreground-subtle/30`].join(` `),children:r(`span`,{className:[`inline-block h-3 w-3 rounded-full bg-white shadow transition-transform duration-150`,e?`translate-x-4`:`translate-x-0.5`].join(` `)})})}export{d as ShowroomPage};
|
|
1
|
+
import{Q as e,S as t,q as n,x as r}from"./_virtual_mf___mfe_internal__admin_ui_host__loadShare___mf_0_tanstack_mf_1_react_mf_2_query__loadShare__.js-DhP-Lgiq.js";import{t as i}from"./CapabilityBadges-5uA2K_Bv.js";import{t as a}from"./ProviderIcon-CTU-GAa9.js";import{t as o}from"./StatusBadge-CeptlsPG.js";import{t as s}from"./FormBuilder-CPSYCtr-.js";e();function c({title:e,children:n}){return t(`div`,{className:`rounded-lg border border-border bg-surface overflow-hidden`,children:[r(`div`,{className:`border-b border-border px-4 py-2.5`,children:r(`h2`,{className:`text-xs font-semibold text-foreground uppercase tracking-wider`,children:e})}),r(`div`,{className:`p-4`,children:n})]})}function l({name:e,cssVar:n,hex:i}){return t(`div`,{className:`flex flex-col items-center gap-1.5`,children:[r(`div`,{className:`h-10 w-10 rounded-lg border border-border shadow-inner`,style:{backgroundColor:n?`var(${n})`:i}}),r(`span`,{className:`text-[10px] text-foreground-subtle text-center leading-tight`,children:e})]})}var u={sections:[{id:`demo`,title:`Demo Fields`,columns:2,fields:[{key:`name`,type:`text`,label:`Name`,placeholder:`Enter name`},{key:`count`,type:`number`,label:`Count`,min:0,max:100,unit:`items`},{key:`enabled`,type:`boolean`,label:`Enabled`},{key:`mode`,type:`select`,label:`Mode`,options:[{value:`a`,label:`Alpha`},{value:`b`,label:`Beta`}]},{key:`tags`,type:`tags`,label:`Tags`,span:2,suggestions:[`camera`,`zone`,`alert`]},{key:`confidence`,type:`slider`,label:`Confidence`,min:0,max:100,step:5,unit:`%`,span:2},{key:`info`,type:`info`,label:`Note`,content:`This is an informational message for the user.`,variant:`info`}]}]};function d(){let[e,d]=n({name:`Example`,count:10,enabled:!0,mode:`a`,tags:[`camera`],confidence:60});return t(`div`,{className:`p-6 space-y-6 max-w-5xl mx-auto`,children:[t(`div`,{className:`mb-6`,children:[r(`h1`,{className:`text-xl font-bold text-foreground`,children:`Component Showroom`}),r(`p`,{className:`text-sm text-foreground-subtle mt-1`,children:`All UI components at a glance`})]}),r(c,{title:`Typography`,children:t(`div`,{className:`space-y-3`,children:[r(`h1`,{className:`text-2xl font-bold text-foreground`,children:`Heading 1 — Display title`}),r(`h2`,{className:`text-xl font-semibold text-foreground`,children:`Heading 2 — Section title`}),r(`h3`,{className:`text-base font-semibold text-foreground`,children:`Heading 3 — Card title`}),r(`h4`,{className:`text-sm font-semibold text-foreground`,children:`Heading 4 — Sub-section`}),r(`p`,{className:`text-sm text-foreground`,children:`Body text — Regular paragraph content goes here. It uses the foreground color.`}),r(`p`,{className:`text-sm text-foreground-subtle`,children:`Subtle text — Secondary/descriptive text with reduced emphasis.`}),r(`p`,{className:`text-xs text-foreground-subtle uppercase tracking-wider font-semibold`,children:`Label / Caption`}),r(`p`,{className:`text-xs text-foreground-disabled`,children:`Disabled / placeholder text`})]})}),r(c,{title:`Colors`,children:t(`div`,{className:`flex flex-wrap gap-4`,children:[r(l,{name:`primary`,cssVar:`--color-primary`}),r(l,{name:`background`,cssVar:`--color-background`}),r(l,{name:`surface`,cssVar:`--color-surface`}),r(l,{name:`foreground`,cssVar:`--color-foreground`}),r(l,{name:`success`,cssVar:`--color-success`}),r(l,{name:`warning`,cssVar:`--color-warning`}),r(l,{name:`danger`,cssVar:`--color-danger`}),r(l,{name:`info`,cssVar:`--color-info`}),r(l,{name:`border`,cssVar:`--color-border`}),r(`div`,{className:`w-px`}),r(l,{name:`frigate`,hex:`#3b82f6`}),r(l,{name:`scrypted`,hex:`#a855f7`}),r(l,{name:`reolink`,hex:`#06b6d4`}),r(l,{name:`ha`,hex:`#22d3ee`}),r(l,{name:`rtsp`,hex:`#78716c`})]})}),r(c,{title:`Buttons`,children:t(`div`,{className:`flex flex-wrap gap-3`,children:[r(`button`,{className:`inline-flex items-center gap-1.5 rounded-md bg-primary px-4 py-2 text-sm font-medium text-white hover:opacity-90 transition-opacity`,children:`Primary`}),r(`button`,{className:`inline-flex items-center gap-1.5 rounded-md border border-border bg-surface px-4 py-2 text-sm font-medium text-foreground hover:bg-surface-hover transition-colors`,children:`Secondary`}),r(`button`,{className:`inline-flex items-center gap-1.5 rounded-md border border-danger/40 bg-danger/10 px-4 py-2 text-sm font-medium text-danger hover:bg-danger/20 transition-colors`,children:`Danger`}),r(`button`,{disabled:!0,className:`inline-flex items-center gap-1.5 rounded-md bg-primary px-4 py-2 text-sm font-medium text-white opacity-40 cursor-not-allowed`,children:`Disabled`}),r(`button`,{className:`inline-flex items-center gap-1.5 rounded-md border border-warning/40 bg-warning/10 px-4 py-2 text-sm font-medium text-warning hover:bg-warning/20 transition-colors`,children:`Warning`}),r(`button`,{className:`inline-flex items-center gap-1.5 rounded-md border border-success/40 bg-success/10 px-4 py-2 text-sm font-medium text-success hover:bg-success/20 transition-colors`,children:`Success`})]})}),r(c,{title:`Inputs`,children:t(`div`,{className:`grid grid-cols-1 md:grid-cols-2 gap-4`,children:[t(`div`,{children:[r(`label`,{className:`block text-xs font-medium text-foreground mb-1`,children:`Text input`}),r(`input`,{type:`text`,className:`w-full rounded-md border border-border bg-background px-3 py-2 text-sm text-foreground outline-none focus:border-primary focus:ring-1 focus:ring-primary/30`,placeholder:`Type something...`})]}),t(`div`,{children:[r(`label`,{className:`block text-xs font-medium text-foreground mb-1`,children:`Number input`}),r(`input`,{type:`number`,className:`w-full rounded-md border border-border bg-background px-3 py-2 text-sm text-foreground outline-none focus:border-primary focus:ring-1 focus:ring-primary/30`,placeholder:`0`})]}),t(`div`,{children:[r(`label`,{className:`block text-xs font-medium text-foreground mb-1`,children:`Password input`}),r(`input`,{type:`password`,className:`w-full rounded-md border border-border bg-background px-3 py-2 text-sm text-foreground outline-none focus:border-primary focus:ring-1 focus:ring-primary/30`,placeholder:`••••••••`})]}),t(`div`,{children:[r(`label`,{className:`block text-xs font-medium text-foreground mb-1`,children:`Select`}),t(`select`,{className:`w-full rounded-md border border-border bg-background px-3 py-2 text-sm text-foreground outline-none focus:border-primary focus:ring-1 focus:ring-primary/30`,children:[r(`option`,{children:`Option A`}),r(`option`,{children:`Option B`}),r(`option`,{children:`Option C`})]})]}),t(`div`,{className:`md:col-span-2`,children:[r(`label`,{className:`block text-xs font-medium text-foreground mb-1`,children:`Textarea`}),r(`textarea`,{className:`w-full rounded-md border border-border bg-background px-3 py-2 text-sm text-foreground outline-none focus:border-primary focus:ring-1 focus:ring-primary/30 resize-y min-h-[60px]`,placeholder:`Enter multi-line text...`,rows:3})]}),r(`div`,{children:t(`label`,{className:`flex items-center gap-2 cursor-pointer select-none`,children:[r(`input`,{type:`checkbox`,className:`h-3.5 w-3.5 rounded border-border accent-primary`,defaultChecked:!0}),r(`span`,{className:`text-xs font-medium text-foreground`,children:`Checkbox (checked)`})]})}),r(`div`,{children:t(`div`,{className:`flex items-center justify-between`,children:[r(`span`,{className:`text-xs font-medium text-foreground`,children:`Toggle switch`}),r(f,{})]})}),t(`div`,{children:[r(`label`,{className:`block text-xs font-medium text-foreground mb-1`,children:`Slider`}),r(`input`,{type:`range`,className:`w-full h-1 accent-primary cursor-pointer`,min:0,max:100,defaultValue:60})]}),t(`div`,{children:[r(`label`,{className:`block text-xs font-medium text-foreground mb-1`,children:`Tags example`}),r(`div`,{className:`flex flex-wrap gap-1.5 rounded-md border border-border bg-background px-2 py-1.5 min-h-[38px]`,children:[`camera`,`zone`,`alert`].map(e=>r(`span`,{className:`inline-flex items-center gap-1 rounded-md bg-primary/10 px-1.5 py-0.5 text-xs text-primary`,children:e},e))})]})]})}),r(c,{title:`Badges`,children:t(`div`,{className:`space-y-3`,children:[t(`div`,{children:[r(`p`,{className:`text-xs text-foreground-subtle mb-2`,children:`StatusBadge`}),r(`div`,{className:`flex flex-wrap gap-2`,children:[`running`,`stopped`,`error`,`online`,`offline`,`idle`].map(e=>r(o,{status:e},e))})]}),t(`div`,{children:[r(`p`,{className:`text-xs text-foreground-subtle mb-2`,children:`CapabilityBadges`}),r(i,{capabilities:[`streaming`,`detection`,`recording`,`audio`]})]})]})}),r(c,{title:`Cards`,children:t(`div`,{className:`grid grid-cols-1 md:grid-cols-2 gap-4`,children:[t(`div`,{className:`rounded-lg bg-surface p-4`,children:[r(`h3`,{className:`text-sm font-semibold text-foreground mb-1`,children:`Surface card`}),r(`p`,{className:`text-xs text-foreground-subtle`,children:"Uses `bg-surface`. Default card background."})]}),t(`div`,{className:`rounded-lg border border-border bg-surface p-4`,children:[r(`h3`,{className:`text-sm font-semibold text-foreground mb-1`,children:`Bordered card`}),r(`p`,{className:`text-xs text-foreground-subtle`,children:"Uses `border border-border bg-surface`."})]}),t(`div`,{className:`rounded-lg border border-primary/30 bg-primary/5 p-4`,children:[r(`h3`,{className:`text-sm font-semibold text-primary mb-1`,children:`Accent card`}),r(`p`,{className:`text-xs text-foreground-subtle`,children:`Highlighted with primary color.`})]}),t(`div`,{className:`rounded-lg bg-background p-4`,children:[r(`h3`,{className:`text-sm font-semibold text-foreground mb-1`,children:`Background card`}),r(`p`,{className:`text-xs text-foreground-subtle`,children:"Uses `bg-background`. Inset card."})]})]})}),r(c,{title:`Provider Icons`,children:r(`div`,{className:`flex flex-wrap gap-4`,children:[`frigate`,`scrypted`,`reolink`,`homeassistant`,`rtsp`,`onvif`].map(e=>r(a,{type:e,size:`lg`,showLabel:!0},e))})}),t(c,{title:`Form Builder Demo`,children:[r(s,{schema:u,values:e,onChange:d}),t(`details`,{className:`mt-3`,children:[r(`summary`,{className:`text-[10px] text-foreground-subtle cursor-pointer hover:text-foreground`,children:`View current values`}),r(`pre`,{className:`mt-2 rounded-md bg-background p-3 text-[10px] text-foreground-subtle overflow-auto`,children:JSON.stringify(e,null,2)})]})]}),r(c,{title:`Info Boxes`,children:r(`div`,{className:`space-y-2`,children:[{variant:`info`,label:`Info`,content:`This is an informational message. Use it for tips and hints.`},{variant:`warning`,label:`Warning`,content:`This action may have side effects. Proceed with caution.`},{variant:`success`,label:`Success`,content:`Operation completed successfully. All systems are green.`},{variant:`danger`,label:`Danger`,content:`This operation is irreversible. Data will be permanently deleted.`}].map(({variant:e,label:n,content:i})=>{let a={info:{border:`border-info`,bg:`bg-info/5`,text:`text-info`},warning:{border:`border-warning`,bg:`bg-warning/5`,text:`text-warning`},success:{border:`border-success`,bg:`bg-success/5`,text:`text-success`},danger:{border:`border-danger`,bg:`bg-danger/5`,text:`text-danger`}}[e];return t(`div`,{className:`rounded-md border-l-4 px-3 py-2.5 ${a.border} ${a.bg}`,children:[r(`p`,{className:`text-xs font-semibold mb-0.5 ${a.text}`,children:n}),r(`p`,{className:`text-xs text-foreground-subtle leading-relaxed`,children:i})]},e)})})})]})}function f(){let[e,t]=n(!0);return r(`button`,{type:`button`,role:`switch`,"aria-checked":e,onClick:()=>t(e=>!e),className:[`relative inline-flex h-4 w-8 shrink-0 items-center rounded-full transition-colors duration-150 cursor-pointer`,e?`bg-primary`:`bg-foreground-subtle/30`].join(` `),children:r(`span`,{className:[`inline-block h-3 w-3 rounded-full bg-white shadow transition-transform duration-150`,e?`translate-x-4`:`translate-x-0.5`].join(` `)})})}export{d as ShowroomPage};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{Q as e,S as t,W as n,o as r,q as i,x as a}from"./_virtual_mf___mfe_internal__admin_ui_host__loadShare___mf_0_tanstack_mf_1_react_mf_2_query__loadShare__.js-DhP-Lgiq.js";import{Qo as o,Vo as s,Yo as c,Zo as l,ds as u,sn as d}from"./src-
|
|
1
|
+
import{Q as e,S as t,W as n,o as r,q as i,x as a}from"./_virtual_mf___mfe_internal__admin_ui_host__loadShare___mf_0_tanstack_mf_1_react_mf_2_query__loadShare__.js-DhP-Lgiq.js";import{Qo as o,Vo as s,Yo as c,Zo as l,ds as u,sn as d}from"./src-BJmgjR4B.js";import{c as f,l as p,n as m,o as h,s as g,t as _,u as v}from"./location-owned-usage-DwI4BF7S.js";e();function y({types:e}){let y=r(),b=d(),{data:x}=o({}),S=l(),C=n(()=>S.data??[],[S.data]),{data:w}=s({},{refetchOnWindowFocus:!1}),T=n(()=>_(x??[],w?.locations),[x,w?.locations]),[E,D]=i(null),[O,k]=i(null),A=()=>{y.invalidateQueries({queryKey:[[`storage`,`listLocations`]]})},j=u({onSuccess:A}),M=c({onSuccess:A}),N=n(()=>{let e=new Map;for(let t of x??[]){let n=e.get(t.type);n?n.push(t):e.set(t.type,[t])}return e},[x]),P=async(e,t)=>{p(t)&&!await b({title:`Disable "${e.displayName}"?`,message:`${f(t).consequence}\n\nNothing is deleted — set the location back to Read-only or Active to bring its footage back.`,confirmLabel:`Disable`,variant:`danger`})||j.mutate(g(e,{mode:t}))},F=async e=>{if(await b({title:`Delete location "${e.displayName}"?`,message:`Removes the record; files on disk are untouched.`,confirmLabel:`Delete`,variant:`danger`}))try{await M.mutateAsync({id:e.id})}catch(t){await b({title:`Delete anyway?`,message:`${t instanceof Error?t.message:String(t)}\n\nForcing removes the record only. Anything still on that location becomes unreachable.`,confirmLabel:`Force delete`,variant:`danger`})&&M.mutate({id:e.id,force:!0})}},I=e.map(e=>C.find(t=>t.id===e)).filter(e=>e!==void 0);return t(`div`,{className:`space-y-3`,children:[I.length===0?a(`p`,{className:`text-[11px] text-foreground-subtle italic`,children:`No storage locations declared for this purpose.`}):I.map(e=>a(m,{type:e.id,displayName:e.displayName,description:e.description,cardinality:e.cardinality,locations:N.get(e.id)??[],onAdd:e=>D(e),onEdit:e=>k(e),onDelete:e=>{F(e)},ownedBytesById:T,onSetMode:(e,t)=>{P(e,t)}},e.id)),E!==null&&a(v,{initialType:E,onClose:()=>D(null),onCreated:()=>{A(),D(null)}}),O!==null&&a(h,{location:O,onClose:()=>k(null),onSaved:()=>{A(),k(null)}})]})}export{y as t};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{t as e}from"./rolldown-runtime-Cyuzqnbw.js";import{K as t,Q as n,S as r,W as i,q as a,x as o,z as s}from"./_virtual_mf___mfe_internal__admin_ui_host__loadShare___mf_0_tanstack_mf_1_react_mf_2_query__loadShare__.js-DhP-Lgiq.js";import{As as c,Cs as l,Ds as u,Es as d,Jt as f,Ms as p,Ns as m,Os as h,Ss as g,Ts as _,Wt as v,bs as y,g as b,js as x,ks as S,ws as C,xs as w}from"./src-
|
|
1
|
+
import{t as e}from"./rolldown-runtime-Cyuzqnbw.js";import{K as t,Q as n,S as r,W as i,q as a,x as o,z as s}from"./_virtual_mf___mfe_internal__admin_ui_host__loadShare___mf_0_tanstack_mf_1_react_mf_2_query__loadShare__.js-DhP-Lgiq.js";import{As as c,Cs as l,Ds as u,Es as d,Jt as f,Ms as p,Ns as m,Os as h,Ss as g,Ts as _,Wt as v,bs as y,g as b,js as x,ks as S,ws as C,xs as w}from"./src-BJmgjR4B.js";import{t as T}from"./pencil-BmHWmA5C.js";import{t as E}from"./plus-m8t8zcIv.js";import{t as D}from"./power-kB5p-Ak_.js";import{L as ee,o as O,r as k,s as A,u as te,w as j,z as M}from"./index-CWmgzFYA.js";import{t as ne}from"./AdminPage-CCD07UMs.js";import{t as N}from"./NodeAddonsSettingsPanel-CUiP3a75.js";var P=e(((e,t)=>{(function(n,r){if(typeof e==`object`&&typeof t==`object`)t.exports=r();else if(typeof define==`function`&&define.amd)define([],r);else{var i=r();for(var a in i)(typeof e==`object`?e:n)[a]=i[a]}})(globalThis,(()=>(()=>{var e={4567:function(e,t,n){var r=this&&this.__decorate||function(e,t,n,r){var i,a=arguments.length,o=a<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,n):r;if(typeof Reflect==`object`&&typeof Reflect.decorate==`function`)o=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(o=(a<3?i(o):a>3?i(t,n,o):i(t,n))||o);return a>3&&o&&Object.defineProperty(t,n,o),o},i=this&&this.__param||function(e,t){return function(n,r){t(n,r,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.AccessibilityManager=void 0;let a=n(9042),o=n(9924),s=n(844),c=n(4725),l=n(2585),u=n(3656),d=t.AccessibilityManager=class extends s.Disposable{constructor(e,t,n,r){super(),this._terminal=e,this._coreBrowserService=n,this._renderService=r,this._rowColumns=new WeakMap,this._liveRegionLineCount=0,this._charsToConsume=[],this._charsToAnnounce=``,this._accessibilityContainer=this._coreBrowserService.mainDocument.createElement(`div`),this._accessibilityContainer.classList.add(`xterm-accessibility`),this._rowContainer=this._coreBrowserService.mainDocument.createElement(`div`),this._rowContainer.setAttribute(`role`,`list`),this._rowContainer.classList.add(`xterm-accessibility-tree`),this._rowElements=[];for(let e=0;e<this._terminal.rows;e++)this._rowElements[e]=this._createAccessibilityTreeNode(),this._rowContainer.appendChild(this._rowElements[e]);if(this._topBoundaryFocusListener=e=>this._handleBoundaryFocus(e,0),this._bottomBoundaryFocusListener=e=>this._handleBoundaryFocus(e,1),this._rowElements[0].addEventListener(`focus`,this._topBoundaryFocusListener),this._rowElements[this._rowElements.length-1].addEventListener(`focus`,this._bottomBoundaryFocusListener),this._refreshRowsDimensions(),this._accessibilityContainer.appendChild(this._rowContainer),this._liveRegion=this._coreBrowserService.mainDocument.createElement(`div`),this._liveRegion.classList.add(`live-region`),this._liveRegion.setAttribute(`aria-live`,`assertive`),this._accessibilityContainer.appendChild(this._liveRegion),this._liveRegionDebouncer=this.register(new o.TimeBasedDebouncer(this._renderRows.bind(this))),!this._terminal.element)throw Error(`Cannot enable accessibility before Terminal.open`);this._terminal.element.insertAdjacentElement(`afterbegin`,this._accessibilityContainer),this.register(this._terminal.onResize((e=>this._handleResize(e.rows)))),this.register(this._terminal.onRender((e=>this._refreshRows(e.start,e.end)))),this.register(this._terminal.onScroll((()=>this._refreshRows()))),this.register(this._terminal.onA11yChar((e=>this._handleChar(e)))),this.register(this._terminal.onLineFeed((()=>this._handleChar(`
|
|
2
2
|
`)))),this.register(this._terminal.onA11yTab((e=>this._handleTab(e)))),this.register(this._terminal.onKey((e=>this._handleKey(e.key)))),this.register(this._terminal.onBlur((()=>this._clearLiveRegion()))),this.register(this._renderService.onDimensionsChange((()=>this._refreshRowsDimensions()))),this.register((0,u.addDisposableDomListener)(document,`selectionchange`,(()=>this._handleSelectionChange()))),this.register(this._coreBrowserService.onDprChange((()=>this._refreshRowsDimensions()))),this._refreshRows(),this.register((0,s.toDisposable)((()=>{this._accessibilityContainer.remove(),this._rowElements.length=0})))}_handleTab(e){for(let t=0;t<e;t++)this._handleChar(` `)}_handleChar(e){this._liveRegionLineCount<21&&(this._charsToConsume.length>0?this._charsToConsume.shift()!==e&&(this._charsToAnnounce+=e):this._charsToAnnounce+=e,e===`
|
|
3
3
|
`&&(this._liveRegionLineCount++,this._liveRegionLineCount===21&&(this._liveRegion.textContent+=a.tooMuchOutput)))}_clearLiveRegion(){this._liveRegion.textContent=``,this._liveRegionLineCount=0}_handleKey(e){this._clearLiveRegion(),/\p{Control}/u.test(e)||this._charsToConsume.push(e)}_refreshRows(e,t){this._liveRegionDebouncer.refresh(e,t,this._terminal.rows)}_renderRows(e,t){let n=this._terminal.buffer,r=n.lines.length.toString();for(let i=e;i<=t;i++){let e=n.lines.get(n.ydisp+i),t=[],a=e?.translateToString(!0,void 0,void 0,t)||``,o=(n.ydisp+i+1).toString(),s=this._rowElements[i];s&&(a.length===0?(s.innerText=`\xA0`,this._rowColumns.set(s,[0,1])):(s.textContent=a,this._rowColumns.set(s,t)),s.setAttribute(`aria-posinset`,o),s.setAttribute(`aria-setsize`,r))}this._announceCharacters()}_announceCharacters(){this._charsToAnnounce.length!==0&&(this._liveRegion.textContent+=this._charsToAnnounce,this._charsToAnnounce=``)}_handleBoundaryFocus(e,t){let n=e.target,r=this._rowElements[t===0?1:this._rowElements.length-2];if(n.getAttribute(`aria-posinset`)===(t===0?`1`:`${this._terminal.buffer.lines.length}`)||e.relatedTarget!==r)return;let i,a;if(t===0?(i=n,a=this._rowElements.pop(),this._rowContainer.removeChild(a)):(i=this._rowElements.shift(),a=n,this._rowContainer.removeChild(i)),i.removeEventListener(`focus`,this._topBoundaryFocusListener),a.removeEventListener(`focus`,this._bottomBoundaryFocusListener),t===0){let e=this._createAccessibilityTreeNode();this._rowElements.unshift(e),this._rowContainer.insertAdjacentElement(`afterbegin`,e)}else{let e=this._createAccessibilityTreeNode();this._rowElements.push(e),this._rowContainer.appendChild(e)}this._rowElements[0].addEventListener(`focus`,this._topBoundaryFocusListener),this._rowElements[this._rowElements.length-1].addEventListener(`focus`,this._bottomBoundaryFocusListener),this._terminal.scrollLines(t===0?-1:1),this._rowElements[t===0?1:this._rowElements.length-2].focus(),e.preventDefault(),e.stopImmediatePropagation()}_handleSelectionChange(){if(this._rowElements.length===0)return;let e=document.getSelection();if(!e)return;if(e.isCollapsed)return void(this._rowContainer.contains(e.anchorNode)&&this._terminal.clearSelection());if(!e.anchorNode||!e.focusNode)return void console.error(`anchorNode and/or focusNode are null`);let t={node:e.anchorNode,offset:e.anchorOffset},n={node:e.focusNode,offset:e.focusOffset};if((t.node.compareDocumentPosition(n.node)&Node.DOCUMENT_POSITION_PRECEDING||t.node===n.node&&t.offset>n.offset)&&([t,n]=[n,t]),t.node.compareDocumentPosition(this._rowElements[0])&(Node.DOCUMENT_POSITION_CONTAINED_BY|Node.DOCUMENT_POSITION_FOLLOWING)&&(t={node:this._rowElements[0].childNodes[0],offset:0}),!this._rowContainer.contains(t.node))return;let r=this._rowElements.slice(-1)[0];if(n.node.compareDocumentPosition(r)&(Node.DOCUMENT_POSITION_CONTAINED_BY|Node.DOCUMENT_POSITION_PRECEDING)&&(n={node:r,offset:r.textContent?.length??0}),!this._rowContainer.contains(n.node))return;let i=({node:e,offset:t})=>{let n=e instanceof Text?e.parentNode:e,r=parseInt(n?.getAttribute(`aria-posinset`),10)-1;if(isNaN(r))return console.warn(`row is invalid. Race condition?`),null;let i=this._rowColumns.get(n);if(!i)return console.warn(`columns is null. Race condition?`),null;let a=t<i.length?i[t]:i.slice(-1)[0]+1;return a>=this._terminal.cols&&(++r,a=0),{row:r,column:a}},a=i(t),o=i(n);if(a&&o){if(a.row>o.row||a.row===o.row&&a.column>=o.column)throw Error(`invalid range`);this._terminal.select(a.column,a.row,(o.row-a.row)*this._terminal.cols-a.column+o.column)}}_handleResize(e){this._rowElements[this._rowElements.length-1].removeEventListener(`focus`,this._bottomBoundaryFocusListener);for(let e=this._rowContainer.children.length;e<this._terminal.rows;e++)this._rowElements[e]=this._createAccessibilityTreeNode(),this._rowContainer.appendChild(this._rowElements[e]);for(;this._rowElements.length>e;)this._rowContainer.removeChild(this._rowElements.pop());this._rowElements[this._rowElements.length-1].addEventListener(`focus`,this._bottomBoundaryFocusListener),this._refreshRowsDimensions()}_createAccessibilityTreeNode(){let e=this._coreBrowserService.mainDocument.createElement(`div`);return e.setAttribute(`role`,`listitem`),e.tabIndex=-1,this._refreshRowDimensions(e),e}_refreshRowsDimensions(){if(this._renderService.dimensions.css.cell.height){this._accessibilityContainer.style.width=`${this._renderService.dimensions.css.canvas.width}px`,this._rowElements.length!==this._terminal.rows&&this._handleResize(this._terminal.rows);for(let e=0;e<this._terminal.rows;e++)this._refreshRowDimensions(this._rowElements[e])}}_refreshRowDimensions(e){e.style.height=`${this._renderService.dimensions.css.cell.height}px`}};t.AccessibilityManager=d=r([i(1,l.IInstantiationService),i(2,c.ICoreBrowserService),i(3,c.IRenderService)],d)},3614:(e,t)=>{function n(e){return e.replace(/\r?\n/g,`\r`)}function r(e,t){return t?`\x1B[200~`+e+`\x1B[201~`:e}function i(e,t,i,a){e=r(e=n(e),i.decPrivateModes.bracketedPasteMode&&!0!==a.rawOptions.ignoreBracketedPasteMode),i.triggerDataEvent(e,!0),t.value=``}function a(e,t,n){let r=n.getBoundingClientRect(),i=e.clientX-r.left-10,a=e.clientY-r.top-10;t.style.width=`20px`,t.style.height=`20px`,t.style.left=`${i}px`,t.style.top=`${a}px`,t.style.zIndex=`1000`,t.focus()}Object.defineProperty(t,"__esModule",{value:!0}),t.rightClickHandler=t.moveTextAreaUnderMouseCursor=t.paste=t.handlePasteEvent=t.copyHandler=t.bracketTextForPaste=t.prepareTextForTerminal=void 0,t.prepareTextForTerminal=n,t.bracketTextForPaste=r,t.copyHandler=function(e,t){e.clipboardData&&e.clipboardData.setData(`text/plain`,t.selectionText),e.preventDefault()},t.handlePasteEvent=function(e,t,n,r){e.stopPropagation(),e.clipboardData&&i(e.clipboardData.getData(`text/plain`),t,n,r)},t.paste=i,t.moveTextAreaUnderMouseCursor=a,t.rightClickHandler=function(e,t,n,r,i){a(e,t,n),i&&r.rightClickSelect(e),t.value=r.selectionText,t.select()}},7239:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ColorContrastCache=void 0;let r=n(1505);t.ColorContrastCache=class{constructor(){this._color=new r.TwoKeyMap,this._css=new r.TwoKeyMap}setCss(e,t,n){this._css.set(e,t,n)}getCss(e,t){return this._css.get(e,t)}setColor(e,t,n){this._color.set(e,t,n)}getColor(e,t){return this._color.get(e,t)}clear(){this._color.clear(),this._css.clear()}}},3656:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.addDisposableDomListener=void 0,t.addDisposableDomListener=function(e,t,n,r){e.addEventListener(t,n,r);let i=!1;return{dispose:()=>{i||(i=!0,e.removeEventListener(t,n,r))}}}},3551:function(e,t,n){var r=this&&this.__decorate||function(e,t,n,r){var i,a=arguments.length,o=a<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,n):r;if(typeof Reflect==`object`&&typeof Reflect.decorate==`function`)o=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(o=(a<3?i(o):a>3?i(t,n,o):i(t,n))||o);return a>3&&o&&Object.defineProperty(t,n,o),o},i=this&&this.__param||function(e,t){return function(n,r){t(n,r,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.Linkifier=void 0;let a=n(3656),o=n(8460),s=n(844),c=n(2585),l=n(4725),u=t.Linkifier=class extends s.Disposable{get currentLink(){return this._currentLink}constructor(e,t,n,r,i){super(),this._element=e,this._mouseService=t,this._renderService=n,this._bufferService=r,this._linkProviderService=i,this._linkCacheDisposables=[],this._isMouseOut=!0,this._wasResized=!1,this._activeLine=-1,this._onShowLinkUnderline=this.register(new o.EventEmitter),this.onShowLinkUnderline=this._onShowLinkUnderline.event,this._onHideLinkUnderline=this.register(new o.EventEmitter),this.onHideLinkUnderline=this._onHideLinkUnderline.event,this.register((0,s.getDisposeArrayDisposable)(this._linkCacheDisposables)),this.register((0,s.toDisposable)((()=>{this._lastMouseEvent=void 0,this._activeProviderReplies?.clear()}))),this.register(this._bufferService.onResize((()=>{this._clearCurrentLink(),this._wasResized=!0}))),this.register((0,a.addDisposableDomListener)(this._element,`mouseleave`,(()=>{this._isMouseOut=!0,this._clearCurrentLink()}))),this.register((0,a.addDisposableDomListener)(this._element,`mousemove`,this._handleMouseMove.bind(this))),this.register((0,a.addDisposableDomListener)(this._element,`mousedown`,this._handleMouseDown.bind(this))),this.register((0,a.addDisposableDomListener)(this._element,`mouseup`,this._handleMouseUp.bind(this)))}_handleMouseMove(e){this._lastMouseEvent=e;let t=this._positionFromMouseEvent(e,this._element,this._mouseService);if(!t)return;this._isMouseOut=!1;let n=e.composedPath();for(let e=0;e<n.length;e++){let t=n[e];if(t.classList.contains(`xterm`))break;if(t.classList.contains(`xterm-hover`))return}this._lastBufferCell&&t.x===this._lastBufferCell.x&&t.y===this._lastBufferCell.y||(this._handleHover(t),this._lastBufferCell=t)}_handleHover(e){if(this._activeLine!==e.y||this._wasResized)return this._clearCurrentLink(),this._askForLink(e,!1),void(this._wasResized=!1);this._currentLink&&this._linkAtPosition(this._currentLink.link,e)||(this._clearCurrentLink(),this._askForLink(e,!0))}_askForLink(e,t){this._activeProviderReplies&&t||(this._activeProviderReplies?.forEach((e=>{e?.forEach((e=>{e.link.dispose&&e.link.dispose()}))})),this._activeProviderReplies=new Map,this._activeLine=e.y);let n=!1;for(let[r,i]of this._linkProviderService.linkProviders.entries())t?this._activeProviderReplies?.get(r)&&(n=this._checkLinkProviderResult(r,e,n)):i.provideLinks(e.y,(t=>{if(this._isMouseOut)return;let i=t?.map((e=>({link:e})));this._activeProviderReplies?.set(r,i),n=this._checkLinkProviderResult(r,e,n),this._activeProviderReplies?.size===this._linkProviderService.linkProviders.length&&this._removeIntersectingLinks(e.y,this._activeProviderReplies)}))}_removeIntersectingLinks(e,t){let n=new Set;for(let r=0;r<t.size;r++){let i=t.get(r);if(i)for(let t=0;t<i.length;t++){let r=i[t],a=r.link.range.start.y<e?0:r.link.range.start.x,o=r.link.range.end.y>e?this._bufferService.cols:r.link.range.end.x;for(let e=a;e<=o;e++){if(n.has(e)){i.splice(t--,1);break}n.add(e)}}}}_checkLinkProviderResult(e,t,n){if(!this._activeProviderReplies)return n;let r=this._activeProviderReplies.get(e),i=!1;for(let t=0;t<e;t++)this._activeProviderReplies.has(t)&&!this._activeProviderReplies.get(t)||(i=!0);if(!i&&r){let e=r.find((e=>this._linkAtPosition(e.link,t)));e&&(n=!0,this._handleNewLink(e))}if(this._activeProviderReplies.size===this._linkProviderService.linkProviders.length&&!n)for(let e=0;e<this._activeProviderReplies.size;e++){let r=this._activeProviderReplies.get(e)?.find((e=>this._linkAtPosition(e.link,t)));if(r){n=!0,this._handleNewLink(r);break}}return n}_handleMouseDown(){this._mouseDownLink=this._currentLink}_handleMouseUp(e){if(!this._currentLink)return;let t=this._positionFromMouseEvent(e,this._element,this._mouseService);t&&this._mouseDownLink===this._currentLink&&this._linkAtPosition(this._currentLink.link,t)&&this._currentLink.link.activate(e,this._currentLink.link.text)}_clearCurrentLink(e,t){this._currentLink&&this._lastMouseEvent&&(!e||!t||this._currentLink.link.range.start.y>=e&&this._currentLink.link.range.end.y<=t)&&(this._linkLeave(this._element,this._currentLink.link,this._lastMouseEvent),this._currentLink=void 0,(0,s.disposeArray)(this._linkCacheDisposables))}_handleNewLink(e){if(!this._lastMouseEvent)return;let t=this._positionFromMouseEvent(this._lastMouseEvent,this._element,this._mouseService);t&&this._linkAtPosition(e.link,t)&&(this._currentLink=e,this._currentLink.state={decorations:{underline:e.link.decorations===void 0||e.link.decorations.underline,pointerCursor:e.link.decorations===void 0||e.link.decorations.pointerCursor},isHovered:!0},this._linkHover(this._element,e.link,this._lastMouseEvent),e.link.decorations={},Object.defineProperties(e.link.decorations,{pointerCursor:{get:()=>this._currentLink?.state?.decorations.pointerCursor,set:e=>{this._currentLink?.state&&this._currentLink.state.decorations.pointerCursor!==e&&(this._currentLink.state.decorations.pointerCursor=e,this._currentLink.state.isHovered&&this._element.classList.toggle(`xterm-cursor-pointer`,e))}},underline:{get:()=>this._currentLink?.state?.decorations.underline,set:t=>{this._currentLink?.state&&this._currentLink?.state?.decorations.underline!==t&&(this._currentLink.state.decorations.underline=t,this._currentLink.state.isHovered&&this._fireUnderlineEvent(e.link,t))}}}),this._linkCacheDisposables.push(this._renderService.onRenderedViewportChange((e=>{if(!this._currentLink)return;let t=e.start===0?0:e.start+1+this._bufferService.buffer.ydisp,n=this._bufferService.buffer.ydisp+1+e.end;if(this._currentLink.link.range.start.y>=t&&this._currentLink.link.range.end.y<=n&&(this._clearCurrentLink(t,n),this._lastMouseEvent)){let e=this._positionFromMouseEvent(this._lastMouseEvent,this._element,this._mouseService);e&&this._askForLink(e,!1)}}))))}_linkHover(e,t,n){this._currentLink?.state&&(this._currentLink.state.isHovered=!0,this._currentLink.state.decorations.underline&&this._fireUnderlineEvent(t,!0),this._currentLink.state.decorations.pointerCursor&&e.classList.add(`xterm-cursor-pointer`)),t.hover&&t.hover(n,t.text)}_fireUnderlineEvent(e,t){let n=e.range,r=this._bufferService.buffer.ydisp,i=this._createLinkUnderlineEvent(n.start.x-1,n.start.y-r-1,n.end.x,n.end.y-r-1,void 0);(t?this._onShowLinkUnderline:this._onHideLinkUnderline).fire(i)}_linkLeave(e,t,n){this._currentLink?.state&&(this._currentLink.state.isHovered=!1,this._currentLink.state.decorations.underline&&this._fireUnderlineEvent(t,!1),this._currentLink.state.decorations.pointerCursor&&e.classList.remove(`xterm-cursor-pointer`)),t.leave&&t.leave(n,t.text)}_linkAtPosition(e,t){let n=e.range.start.y*this._bufferService.cols+e.range.start.x,r=e.range.end.y*this._bufferService.cols+e.range.end.x,i=t.y*this._bufferService.cols+t.x;return n<=i&&i<=r}_positionFromMouseEvent(e,t,n){let r=n.getCoords(e,t,this._bufferService.cols,this._bufferService.rows);if(r)return{x:r[0],y:r[1]+this._bufferService.buffer.ydisp}}_createLinkUnderlineEvent(e,t,n,r,i){return{x1:e,y1:t,x2:n,y2:r,cols:this._bufferService.cols,fg:i}}};t.Linkifier=u=r([i(1,l.IMouseService),i(2,l.IRenderService),i(3,c.IBufferService),i(4,l.ILinkProviderService)],u)},9042:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.tooMuchOutput=t.promptLabel=void 0,t.promptLabel=`Terminal input`,t.tooMuchOutput=`Too much output to announce, navigate to rows manually to read`},3730:function(e,t,n){var r=this&&this.__decorate||function(e,t,n,r){var i,a=arguments.length,o=a<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,n):r;if(typeof Reflect==`object`&&typeof Reflect.decorate==`function`)o=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(o=(a<3?i(o):a>3?i(t,n,o):i(t,n))||o);return a>3&&o&&Object.defineProperty(t,n,o),o},i=this&&this.__param||function(e,t){return function(n,r){t(n,r,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.OscLinkProvider=void 0;let a=n(511),o=n(2585),s=t.OscLinkProvider=class{constructor(e,t,n){this._bufferService=e,this._optionsService=t,this._oscLinkService=n}provideLinks(e,t){let n=this._bufferService.buffer.lines.get(e-1);if(!n)return void t(void 0);let r=[],i=this._optionsService.rawOptions.linkHandler,o=new a.CellData,s=n.getTrimmedLength(),l=-1,u=-1,d=!1;for(let t=0;t<s;t++)if(u!==-1||n.hasContent(t)){if(n.loadCell(t,o),o.hasExtendedAttrs()&&o.extended.urlId){if(u===-1){u=t,l=o.extended.urlId;continue}d=o.extended.urlId!==l}else u!==-1&&(d=!0);if(d||u!==-1&&t===s-1){let n=this._oscLinkService.getLinkData(l)?.uri;if(n){let a={start:{x:u+1,y:e},end:{x:t+(d||t!==s-1?0:1),y:e}},o=!1;if(!i?.allowNonHttpProtocols)try{let e=new URL(n);[`http:`,`https:`].includes(e.protocol)||(o=!0)}catch{o=!0}o||r.push({text:n,range:a,activate:(e,t)=>i?i.activate(e,t,a):c(0,t),hover:(e,t)=>i?.hover?.(e,t,a),leave:(e,t)=>i?.leave?.(e,t,a)})}d=!1,o.hasExtendedAttrs()&&o.extended.urlId?(u=t,l=o.extended.urlId):(u=-1,l=-1)}}t(r)}};function c(e,t){if(confirm(`Do you want to navigate to ${t}?\n\nWARNING: This link could potentially be dangerous`)){let e=window.open();if(e){try{e.opener=null}catch{}e.location.href=t}else console.warn(`Opening link blocked as opener could not be cleared`)}}t.OscLinkProvider=s=r([i(0,o.IBufferService),i(1,o.IOptionsService),i(2,o.IOscLinkService)],s)},6193:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.RenderDebouncer=void 0,t.RenderDebouncer=class{constructor(e,t){this._renderCallback=e,this._coreBrowserService=t,this._refreshCallbacks=[]}dispose(){this._animationFrame&&=(this._coreBrowserService.window.cancelAnimationFrame(this._animationFrame),void 0)}addRefreshCallback(e){return this._refreshCallbacks.push(e),this._animationFrame||=this._coreBrowserService.window.requestAnimationFrame((()=>this._innerRefresh())),this._animationFrame}refresh(e,t,n){this._rowCount=n,e=e===void 0?0:e,t=t===void 0?this._rowCount-1:t,this._rowStart=this._rowStart===void 0?e:Math.min(this._rowStart,e),this._rowEnd=this._rowEnd===void 0?t:Math.max(this._rowEnd,t),this._animationFrame||=this._coreBrowserService.window.requestAnimationFrame((()=>this._innerRefresh()))}_innerRefresh(){if(this._animationFrame=void 0,this._rowStart===void 0||this._rowEnd===void 0||this._rowCount===void 0)return void this._runRefreshCallbacks();let e=Math.max(this._rowStart,0),t=Math.min(this._rowEnd,this._rowCount-1);this._rowStart=void 0,this._rowEnd=void 0,this._renderCallback(e,t),this._runRefreshCallbacks()}_runRefreshCallbacks(){for(let e of this._refreshCallbacks)e(0);this._refreshCallbacks=[]}}},3236:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.Terminal=void 0;let r=n(3614),i=n(3656),a=n(3551),o=n(9042),s=n(3730),c=n(1680),l=n(3107),u=n(5744),d=n(2950),f=n(1296),p=n(428),m=n(4269),h=n(5114),g=n(8934),_=n(3230),v=n(9312),y=n(4725),b=n(6731),x=n(8055),S=n(8969),C=n(8460),w=n(844),T=n(6114),E=n(8437),D=n(2584),ee=n(7399),O=n(5941),k=n(9074),A=n(2585),te=n(5435),j=n(4567),M=n(779);class ne extends S.CoreTerminal{get onFocus(){return this._onFocus.event}get onBlur(){return this._onBlur.event}get onA11yChar(){return this._onA11yCharEmitter.event}get onA11yTab(){return this._onA11yTabEmitter.event}get onWillOpen(){return this._onWillOpen.event}constructor(e={}){super(e),this.browser=T,this._keyDownHandled=!1,this._keyDownSeen=!1,this._keyPressHandled=!1,this._unprocessedDeadKey=!1,this._accessibilityManager=this.register(new w.MutableDisposable),this._onCursorMove=this.register(new C.EventEmitter),this.onCursorMove=this._onCursorMove.event,this._onKey=this.register(new C.EventEmitter),this.onKey=this._onKey.event,this._onRender=this.register(new C.EventEmitter),this.onRender=this._onRender.event,this._onSelectionChange=this.register(new C.EventEmitter),this.onSelectionChange=this._onSelectionChange.event,this._onTitleChange=this.register(new C.EventEmitter),this.onTitleChange=this._onTitleChange.event,this._onBell=this.register(new C.EventEmitter),this.onBell=this._onBell.event,this._onFocus=this.register(new C.EventEmitter),this._onBlur=this.register(new C.EventEmitter),this._onA11yCharEmitter=this.register(new C.EventEmitter),this._onA11yTabEmitter=this.register(new C.EventEmitter),this._onWillOpen=this.register(new C.EventEmitter),this._setup(),this._decorationService=this._instantiationService.createInstance(k.DecorationService),this._instantiationService.setService(A.IDecorationService,this._decorationService),this._linkProviderService=this._instantiationService.createInstance(M.LinkProviderService),this._instantiationService.setService(y.ILinkProviderService,this._linkProviderService),this._linkProviderService.registerLinkProvider(this._instantiationService.createInstance(s.OscLinkProvider)),this.register(this._inputHandler.onRequestBell((()=>this._onBell.fire()))),this.register(this._inputHandler.onRequestRefreshRows(((e,t)=>this.refresh(e,t)))),this.register(this._inputHandler.onRequestSendFocus((()=>this._reportFocus()))),this.register(this._inputHandler.onRequestReset((()=>this.reset()))),this.register(this._inputHandler.onRequestWindowsOptionsReport((e=>this._reportWindowsOptions(e)))),this.register(this._inputHandler.onColor((e=>this._handleColorEvent(e)))),this.register((0,C.forwardEvent)(this._inputHandler.onCursorMove,this._onCursorMove)),this.register((0,C.forwardEvent)(this._inputHandler.onTitleChange,this._onTitleChange)),this.register((0,C.forwardEvent)(this._inputHandler.onA11yChar,this._onA11yCharEmitter)),this.register((0,C.forwardEvent)(this._inputHandler.onA11yTab,this._onA11yTabEmitter)),this.register(this._bufferService.onResize((e=>this._afterResize(e.cols,e.rows)))),this.register((0,w.toDisposable)((()=>{this._customKeyEventHandler=void 0,this.element?.parentNode?.removeChild(this.element)})))}_handleColorEvent(e){if(this._themeService)for(let t of e){let e,n=``;switch(t.index){case 256:e=`foreground`,n=`10`;break;case 257:e=`background`,n=`11`;break;case 258:e=`cursor`,n=`12`;break;default:e=`ansi`,n=`4;`+t.index}switch(t.type){case 0:let r=x.color.toColorRGB(e===`ansi`?this._themeService.colors.ansi[t.index]:this._themeService.colors[e]);this.coreService.triggerDataEvent(`${D.C0.ESC}]${n};${(0,O.toRgbString)(r)}${D.C1_ESCAPED.ST}`);break;case 1:if(e===`ansi`)this._themeService.modifyColors((e=>e.ansi[t.index]=x.channels.toColor(...t.color)));else{let n=e;this._themeService.modifyColors((e=>e[n]=x.channels.toColor(...t.color)))}break;case 2:this._themeService.restoreColor(t.index)}}}_setup(){super._setup(),this._customKeyEventHandler=void 0}get buffer(){return this.buffers.active}focus(){this.textarea&&this.textarea.focus({preventScroll:!0})}_handleScreenReaderModeOptionChange(e){e?!this._accessibilityManager.value&&this._renderService&&(this._accessibilityManager.value=this._instantiationService.createInstance(j.AccessibilityManager,this)):this._accessibilityManager.clear()}_handleTextAreaFocus(e){this.coreService.decPrivateModes.sendFocus&&this.coreService.triggerDataEvent(D.C0.ESC+`[I`),this.element.classList.add(`focus`),this._showCursor(),this._onFocus.fire()}blur(){return this.textarea?.blur()}_handleTextAreaBlur(){this.textarea.value=``,this.refresh(this.buffer.y,this.buffer.y),this.coreService.decPrivateModes.sendFocus&&this.coreService.triggerDataEvent(D.C0.ESC+`[O`),this.element.classList.remove(`focus`),this._onBlur.fire()}_syncTextArea(){if(!this.textarea||!this.buffer.isCursorInViewport||this._compositionHelper.isComposing||!this._renderService)return;let e=this.buffer.ybase+this.buffer.y,t=this.buffer.lines.get(e);if(!t)return;let n=Math.min(this.buffer.x,this.cols-1),r=this._renderService.dimensions.css.cell.height,i=t.getWidth(n),a=this._renderService.dimensions.css.cell.width*i,o=this.buffer.y*this._renderService.dimensions.css.cell.height,s=n*this._renderService.dimensions.css.cell.width;this.textarea.style.left=s+`px`,this.textarea.style.top=o+`px`,this.textarea.style.width=a+`px`,this.textarea.style.height=r+`px`,this.textarea.style.lineHeight=r+`px`,this.textarea.style.zIndex=`-5`}_initGlobal(){this._bindKeys(),this.register((0,i.addDisposableDomListener)(this.element,`copy`,(e=>{this.hasSelection()&&(0,r.copyHandler)(e,this._selectionService)})));let e=e=>(0,r.handlePasteEvent)(e,this.textarea,this.coreService,this.optionsService);this.register((0,i.addDisposableDomListener)(this.textarea,`paste`,e)),this.register((0,i.addDisposableDomListener)(this.element,`paste`,e)),T.isFirefox?this.register((0,i.addDisposableDomListener)(this.element,`mousedown`,(e=>{e.button===2&&(0,r.rightClickHandler)(e,this.textarea,this.screenElement,this._selectionService,this.options.rightClickSelectsWord)}))):this.register((0,i.addDisposableDomListener)(this.element,`contextmenu`,(e=>{(0,r.rightClickHandler)(e,this.textarea,this.screenElement,this._selectionService,this.options.rightClickSelectsWord)}))),T.isLinux&&this.register((0,i.addDisposableDomListener)(this.element,`auxclick`,(e=>{e.button===1&&(0,r.moveTextAreaUnderMouseCursor)(e,this.textarea,this.screenElement)})))}_bindKeys(){this.register((0,i.addDisposableDomListener)(this.textarea,`keyup`,(e=>this._keyUp(e)),!0)),this.register((0,i.addDisposableDomListener)(this.textarea,`keydown`,(e=>this._keyDown(e)),!0)),this.register((0,i.addDisposableDomListener)(this.textarea,`keypress`,(e=>this._keyPress(e)),!0)),this.register((0,i.addDisposableDomListener)(this.textarea,`compositionstart`,(()=>this._compositionHelper.compositionstart()))),this.register((0,i.addDisposableDomListener)(this.textarea,`compositionupdate`,(e=>this._compositionHelper.compositionupdate(e)))),this.register((0,i.addDisposableDomListener)(this.textarea,`compositionend`,(()=>this._compositionHelper.compositionend()))),this.register((0,i.addDisposableDomListener)(this.textarea,`input`,(e=>this._inputEvent(e)),!0)),this.register(this.onRender((()=>this._compositionHelper.updateCompositionElements())))}open(e){if(!e)throw Error(`Terminal requires a parent element.`);if(e.isConnected||this._logService.debug(`Terminal.open was called on an element that was not attached to the DOM`),this.element?.ownerDocument.defaultView&&this._coreBrowserService)return void(this.element.ownerDocument.defaultView!==this._coreBrowserService.window&&(this._coreBrowserService.window=this.element.ownerDocument.defaultView));this._document=e.ownerDocument,this.options.documentOverride&&this.options.documentOverride instanceof Document&&(this._document=this.optionsService.rawOptions.documentOverride),this.element=this._document.createElement(`div`),this.element.dir=`ltr`,this.element.classList.add(`terminal`),this.element.classList.add(`xterm`),e.appendChild(this.element);let t=this._document.createDocumentFragment();this._viewportElement=this._document.createElement(`div`),this._viewportElement.classList.add(`xterm-viewport`),t.appendChild(this._viewportElement),this._viewportScrollArea=this._document.createElement(`div`),this._viewportScrollArea.classList.add(`xterm-scroll-area`),this._viewportElement.appendChild(this._viewportScrollArea),this.screenElement=this._document.createElement(`div`),this.screenElement.classList.add(`xterm-screen`),this.register((0,i.addDisposableDomListener)(this.screenElement,`mousemove`,(e=>this.updateCursorStyle(e)))),this._helperContainer=this._document.createElement(`div`),this._helperContainer.classList.add(`xterm-helpers`),this.screenElement.appendChild(this._helperContainer),t.appendChild(this.screenElement),this.textarea=this._document.createElement(`textarea`),this.textarea.classList.add(`xterm-helper-textarea`),this.textarea.setAttribute(`aria-label`,o.promptLabel),T.isChromeOS||this.textarea.setAttribute(`aria-multiline`,`false`),this.textarea.setAttribute(`autocorrect`,`off`),this.textarea.setAttribute(`autocapitalize`,`off`),this.textarea.setAttribute(`spellcheck`,`false`),this.textarea.tabIndex=0,this._coreBrowserService=this.register(this._instantiationService.createInstance(h.CoreBrowserService,this.textarea,e.ownerDocument.defaultView??window,this._document??typeof window<`u`?window.document:null)),this._instantiationService.setService(y.ICoreBrowserService,this._coreBrowserService),this.register((0,i.addDisposableDomListener)(this.textarea,`focus`,(e=>this._handleTextAreaFocus(e)))),this.register((0,i.addDisposableDomListener)(this.textarea,`blur`,(()=>this._handleTextAreaBlur()))),this._helperContainer.appendChild(this.textarea),this._charSizeService=this._instantiationService.createInstance(p.CharSizeService,this._document,this._helperContainer),this._instantiationService.setService(y.ICharSizeService,this._charSizeService),this._themeService=this._instantiationService.createInstance(b.ThemeService),this._instantiationService.setService(y.IThemeService,this._themeService),this._characterJoinerService=this._instantiationService.createInstance(m.CharacterJoinerService),this._instantiationService.setService(y.ICharacterJoinerService,this._characterJoinerService),this._renderService=this.register(this._instantiationService.createInstance(_.RenderService,this.rows,this.screenElement)),this._instantiationService.setService(y.IRenderService,this._renderService),this.register(this._renderService.onRenderedViewportChange((e=>this._onRender.fire(e)))),this.onResize((e=>this._renderService.resize(e.cols,e.rows))),this._compositionView=this._document.createElement(`div`),this._compositionView.classList.add(`composition-view`),this._compositionHelper=this._instantiationService.createInstance(d.CompositionHelper,this.textarea,this._compositionView),this._helperContainer.appendChild(this._compositionView),this._mouseService=this._instantiationService.createInstance(g.MouseService),this._instantiationService.setService(y.IMouseService,this._mouseService),this.linkifier=this.register(this._instantiationService.createInstance(a.Linkifier,this.screenElement)),this.element.appendChild(t);try{this._onWillOpen.fire(this.element)}catch{}this._renderService.hasRenderer()||this._renderService.setRenderer(this._createRenderer()),this.viewport=this._instantiationService.createInstance(c.Viewport,this._viewportElement,this._viewportScrollArea),this.viewport.onRequestScrollLines((e=>this.scrollLines(e.amount,e.suppressScrollEvent,1))),this.register(this._inputHandler.onRequestSyncScrollBar((()=>this.viewport.syncScrollArea()))),this.register(this.viewport),this.register(this.onCursorMove((()=>{this._renderService.handleCursorMove(),this._syncTextArea()}))),this.register(this.onResize((()=>this._renderService.handleResize(this.cols,this.rows)))),this.register(this.onBlur((()=>this._renderService.handleBlur()))),this.register(this.onFocus((()=>this._renderService.handleFocus()))),this.register(this._renderService.onDimensionsChange((()=>this.viewport.syncScrollArea()))),this._selectionService=this.register(this._instantiationService.createInstance(v.SelectionService,this.element,this.screenElement,this.linkifier)),this._instantiationService.setService(y.ISelectionService,this._selectionService),this.register(this._selectionService.onRequestScrollLines((e=>this.scrollLines(e.amount,e.suppressScrollEvent)))),this.register(this._selectionService.onSelectionChange((()=>this._onSelectionChange.fire()))),this.register(this._selectionService.onRequestRedraw((e=>this._renderService.handleSelectionChanged(e.start,e.end,e.columnSelectMode)))),this.register(this._selectionService.onLinuxMouseSelection((e=>{this.textarea.value=e,this.textarea.focus(),this.textarea.select()}))),this.register(this._onScroll.event((e=>{this.viewport.syncScrollArea(),this._selectionService.refresh()}))),this.register((0,i.addDisposableDomListener)(this._viewportElement,`scroll`,(()=>this._selectionService.refresh()))),this.register(this._instantiationService.createInstance(l.BufferDecorationRenderer,this.screenElement)),this.register((0,i.addDisposableDomListener)(this.element,`mousedown`,(e=>this._selectionService.handleMouseDown(e)))),this.coreMouseService.areMouseEventsActive?(this._selectionService.disable(),this.element.classList.add(`enable-mouse-events`)):this._selectionService.enable(),this.options.screenReaderMode&&(this._accessibilityManager.value=this._instantiationService.createInstance(j.AccessibilityManager,this)),this.register(this.optionsService.onSpecificOptionChange(`screenReaderMode`,(e=>this._handleScreenReaderModeOptionChange(e)))),this.options.overviewRulerWidth&&(this._overviewRulerRenderer=this.register(this._instantiationService.createInstance(u.OverviewRulerRenderer,this._viewportElement,this.screenElement))),this.optionsService.onSpecificOptionChange(`overviewRulerWidth`,(e=>{!this._overviewRulerRenderer&&e&&this._viewportElement&&this.screenElement&&(this._overviewRulerRenderer=this.register(this._instantiationService.createInstance(u.OverviewRulerRenderer,this._viewportElement,this.screenElement)))})),this._charSizeService.measure(),this.refresh(0,this.rows-1),this._initGlobal(),this.bindMouse()}_createRenderer(){return this._instantiationService.createInstance(f.DomRenderer,this,this._document,this.element,this.screenElement,this._viewportElement,this._helperContainer,this.linkifier)}bindMouse(){let e=this,t=this.element;function n(t){let n=e._mouseService.getMouseReportCoords(t,e.screenElement);if(!n)return!1;let r,i;switch(t.overrideType||t.type){case`mousemove`:i=32,t.buttons===void 0?(r=3,t.button!==void 0&&(r=t.button<3?t.button:3)):r=1&t.buttons?0:4&t.buttons?1:2&t.buttons?2:3;break;case`mouseup`:i=0,r=t.button<3?t.button:3;break;case`mousedown`:i=1,r=t.button<3?t.button:3;break;case`wheel`:if(e._customWheelEventHandler&&!1===e._customWheelEventHandler(t)||e.viewport.getLinesScrolled(t)===0)return!1;i=t.deltaY<0?0:1,r=4;break;default:return!1}return!(i===void 0||r===void 0||r>4)&&e.coreMouseService.triggerMouseEvent({col:n.col,row:n.row,x:n.x,y:n.y,button:r,action:i,ctrl:t.ctrlKey,alt:t.altKey,shift:t.shiftKey})}let r={mouseup:null,wheel:null,mousedrag:null,mousemove:null},a={mouseup:e=>(n(e),e.buttons||(this._document.removeEventListener(`mouseup`,r.mouseup),r.mousedrag&&this._document.removeEventListener(`mousemove`,r.mousedrag)),this.cancel(e)),wheel:e=>(n(e),this.cancel(e,!0)),mousedrag:e=>{e.buttons&&n(e)},mousemove:e=>{e.buttons||n(e)}};this.register(this.coreMouseService.onProtocolChange((e=>{e?(this.optionsService.rawOptions.logLevel===`debug`&&this._logService.debug(`Binding to mouse events:`,this.coreMouseService.explainEvents(e)),this.element.classList.add(`enable-mouse-events`),this._selectionService.disable()):(this._logService.debug(`Unbinding from mouse events.`),this.element.classList.remove(`enable-mouse-events`),this._selectionService.enable()),8&e?r.mousemove||=(t.addEventListener(`mousemove`,a.mousemove),a.mousemove):(t.removeEventListener(`mousemove`,r.mousemove),r.mousemove=null),16&e?r.wheel||=(t.addEventListener(`wheel`,a.wheel,{passive:!1}),a.wheel):(t.removeEventListener(`wheel`,r.wheel),r.wheel=null),2&e?r.mouseup||=a.mouseup:(this._document.removeEventListener(`mouseup`,r.mouseup),r.mouseup=null),4&e?r.mousedrag||=a.mousedrag:(this._document.removeEventListener(`mousemove`,r.mousedrag),r.mousedrag=null)}))),this.coreMouseService.activeProtocol=this.coreMouseService.activeProtocol,this.register((0,i.addDisposableDomListener)(t,`mousedown`,(e=>{if(e.preventDefault(),this.focus(),this.coreMouseService.areMouseEventsActive&&!this._selectionService.shouldForceSelection(e))return n(e),r.mouseup&&this._document.addEventListener(`mouseup`,r.mouseup),r.mousedrag&&this._document.addEventListener(`mousemove`,r.mousedrag),this.cancel(e)}))),this.register((0,i.addDisposableDomListener)(t,`wheel`,(e=>{if(!r.wheel){if(this._customWheelEventHandler&&!1===this._customWheelEventHandler(e))return!1;if(!this.buffer.hasScrollback){let t=this.viewport.getLinesScrolled(e);if(t===0)return;let n=D.C0.ESC+(this.coreService.decPrivateModes.applicationCursorKeys?`O`:`[`)+(e.deltaY<0?`A`:`B`),r=``;for(let e=0;e<Math.abs(t);e++)r+=n;return this.coreService.triggerDataEvent(r,!0),this.cancel(e,!0)}return this.viewport.handleWheel(e)?this.cancel(e):void 0}}),{passive:!1})),this.register((0,i.addDisposableDomListener)(t,`touchstart`,(e=>{if(!this.coreMouseService.areMouseEventsActive)return this.viewport.handleTouchStart(e),this.cancel(e)}),{passive:!0})),this.register((0,i.addDisposableDomListener)(t,`touchmove`,(e=>{if(!this.coreMouseService.areMouseEventsActive)return this.viewport.handleTouchMove(e)?void 0:this.cancel(e)}),{passive:!1}))}refresh(e,t){this._renderService?.refreshRows(e,t)}updateCursorStyle(e){this._selectionService?.shouldColumnSelect(e)?this.element.classList.add(`column-select`):this.element.classList.remove(`column-select`)}_showCursor(){this.coreService.isCursorInitialized||(this.coreService.isCursorInitialized=!0,this.refresh(this.buffer.y,this.buffer.y))}scrollLines(e,t,n=0){n===1?(super.scrollLines(e,t,n),this.refresh(0,this.rows-1)):this.viewport?.scrollLines(e)}paste(e){(0,r.paste)(e,this.textarea,this.coreService,this.optionsService)}attachCustomKeyEventHandler(e){this._customKeyEventHandler=e}attachCustomWheelEventHandler(e){this._customWheelEventHandler=e}registerLinkProvider(e){return this._linkProviderService.registerLinkProvider(e)}registerCharacterJoiner(e){if(!this._characterJoinerService)throw Error(`Terminal must be opened first`);let t=this._characterJoinerService.register(e);return this.refresh(0,this.rows-1),t}deregisterCharacterJoiner(e){if(!this._characterJoinerService)throw Error(`Terminal must be opened first`);this._characterJoinerService.deregister(e)&&this.refresh(0,this.rows-1)}get markers(){return this.buffer.markers}registerMarker(e){return this.buffer.addMarker(this.buffer.ybase+this.buffer.y+e)}registerDecoration(e){return this._decorationService.registerDecoration(e)}hasSelection(){return!!this._selectionService&&this._selectionService.hasSelection}select(e,t,n){this._selectionService.setSelection(e,t,n)}getSelection(){return this._selectionService?this._selectionService.selectionText:``}getSelectionPosition(){if(this._selectionService&&this._selectionService.hasSelection)return{start:{x:this._selectionService.selectionStart[0],y:this._selectionService.selectionStart[1]},end:{x:this._selectionService.selectionEnd[0],y:this._selectionService.selectionEnd[1]}}}clearSelection(){this._selectionService?.clearSelection()}selectAll(){this._selectionService?.selectAll()}selectLines(e,t){this._selectionService?.selectLines(e,t)}_keyDown(e){if(this._keyDownHandled=!1,this._keyDownSeen=!0,this._customKeyEventHandler&&!1===this._customKeyEventHandler(e))return!1;let t=this.browser.isMac&&this.options.macOptionIsMeta&&e.altKey;if(!t&&!this._compositionHelper.keydown(e))return this.options.scrollOnUserInput&&this.buffer.ybase!==this.buffer.ydisp&&this.scrollToBottom(),!1;t||e.key!==`Dead`&&e.key!==`AltGraph`||(this._unprocessedDeadKey=!0);let n=(0,ee.evaluateKeyboardEvent)(e,this.coreService.decPrivateModes.applicationCursorKeys,this.browser.isMac,this.options.macOptionIsMeta);if(this.updateCursorStyle(e),n.type===3||n.type===2){let t=this.rows-1;return this.scrollLines(n.type===2?-t:t),this.cancel(e,!0)}return n.type===1&&this.selectAll(),!!this._isThirdLevelShift(this.browser,e)||(n.cancel&&this.cancel(e,!0),!n.key||!!(e.key&&!e.ctrlKey&&!e.altKey&&!e.metaKey&&e.key.length===1&&e.key.charCodeAt(0)>=65&&e.key.charCodeAt(0)<=90)||(this._unprocessedDeadKey?(this._unprocessedDeadKey=!1,!0):(n.key!==D.C0.ETX&&n.key!==D.C0.CR||(this.textarea.value=``),this._onKey.fire({key:n.key,domEvent:e}),this._showCursor(),this.coreService.triggerDataEvent(n.key,!0),!this.optionsService.rawOptions.screenReaderMode||e.altKey||e.ctrlKey?this.cancel(e,!0):void(this._keyDownHandled=!0))))}_isThirdLevelShift(e,t){let n=e.isMac&&!this.options.macOptionIsMeta&&t.altKey&&!t.ctrlKey&&!t.metaKey||e.isWindows&&t.altKey&&t.ctrlKey&&!t.metaKey||e.isWindows&&t.getModifierState(`AltGraph`);return t.type===`keypress`?n:n&&(!t.keyCode||t.keyCode>47)}_keyUp(e){this._keyDownSeen=!1,this._customKeyEventHandler&&!1===this._customKeyEventHandler(e)||(function(e){return e.keyCode===16||e.keyCode===17||e.keyCode===18}(e)||this.focus(),this.updateCursorStyle(e),this._keyPressHandled=!1)}_keyPress(e){let t;if(this._keyPressHandled=!1,this._keyDownHandled||this._customKeyEventHandler&&!1===this._customKeyEventHandler(e))return!1;if(this.cancel(e),e.charCode)t=e.charCode;else if(e.which===null||e.which===void 0)t=e.keyCode;else{if(e.which===0||e.charCode===0)return!1;t=e.which}return!(!t||(e.altKey||e.ctrlKey||e.metaKey)&&!this._isThirdLevelShift(this.browser,e)||(t=String.fromCharCode(t),this._onKey.fire({key:t,domEvent:e}),this._showCursor(),this.coreService.triggerDataEvent(t,!0),this._keyPressHandled=!0,this._unprocessedDeadKey=!1,0))}_inputEvent(e){if(e.data&&e.inputType===`insertText`&&(!e.composed||!this._keyDownSeen)&&!this.optionsService.rawOptions.screenReaderMode){if(this._keyPressHandled)return!1;this._unprocessedDeadKey=!1;let t=e.data;return this.coreService.triggerDataEvent(t,!0),this.cancel(e),!0}return!1}resize(e,t){e!==this.cols||t!==this.rows?super.resize(e,t):this._charSizeService&&!this._charSizeService.hasValidSize&&this._charSizeService.measure()}_afterResize(e,t){this._charSizeService?.measure(),this.viewport?.syncScrollArea(!0)}clear(){if(this.buffer.ybase!==0||this.buffer.y!==0){this.buffer.clearAllMarkers(),this.buffer.lines.set(0,this.buffer.lines.get(this.buffer.ybase+this.buffer.y)),this.buffer.lines.length=1,this.buffer.ydisp=0,this.buffer.ybase=0,this.buffer.y=0;for(let e=1;e<this.rows;e++)this.buffer.lines.push(this.buffer.getBlankLine(E.DEFAULT_ATTR_DATA));this._onScroll.fire({position:this.buffer.ydisp,source:0}),this.viewport?.reset(),this.refresh(0,this.rows-1)}}reset(){this.options.rows=this.rows,this.options.cols=this.cols;let e=this._customKeyEventHandler;this._setup(),super.reset(),this._selectionService?.reset(),this._decorationService.reset(),this.viewport?.reset(),this._customKeyEventHandler=e,this.refresh(0,this.rows-1)}clearTextureAtlas(){this._renderService?.clearTextureAtlas()}_reportFocus(){this.element?.classList.contains(`focus`)?this.coreService.triggerDataEvent(D.C0.ESC+`[I`):this.coreService.triggerDataEvent(D.C0.ESC+`[O`)}_reportWindowsOptions(e){if(this._renderService)switch(e){case te.WindowsOptionsReportType.GET_WIN_SIZE_PIXELS:let e=this._renderService.dimensions.css.canvas.width.toFixed(0),t=this._renderService.dimensions.css.canvas.height.toFixed(0);this.coreService.triggerDataEvent(`${D.C0.ESC}[4;${t};${e}t`);break;case te.WindowsOptionsReportType.GET_CELL_SIZE_PIXELS:let n=this._renderService.dimensions.css.cell.width.toFixed(0),r=this._renderService.dimensions.css.cell.height.toFixed(0);this.coreService.triggerDataEvent(`${D.C0.ESC}[6;${r};${n}t`)}}cancel(e,t){if(this.options.cancelEvents||t)return e.preventDefault(),e.stopPropagation(),!1}}t.Terminal=ne},9924:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.TimeBasedDebouncer=void 0,t.TimeBasedDebouncer=class{constructor(e,t=1e3){this._renderCallback=e,this._debounceThresholdMS=t,this._lastRefreshMs=0,this._additionalRefreshRequested=!1}dispose(){this._refreshTimeoutID&&clearTimeout(this._refreshTimeoutID)}refresh(e,t,n){this._rowCount=n,e=e===void 0?0:e,t=t===void 0?this._rowCount-1:t,this._rowStart=this._rowStart===void 0?e:Math.min(this._rowStart,e),this._rowEnd=this._rowEnd===void 0?t:Math.max(this._rowEnd,t);let r=Date.now();if(r-this._lastRefreshMs>=this._debounceThresholdMS)this._lastRefreshMs=r,this._innerRefresh();else if(!this._additionalRefreshRequested){let e=r-this._lastRefreshMs,t=this._debounceThresholdMS-e;this._additionalRefreshRequested=!0,this._refreshTimeoutID=window.setTimeout((()=>{this._lastRefreshMs=Date.now(),this._innerRefresh(),this._additionalRefreshRequested=!1,this._refreshTimeoutID=void 0}),t)}}_innerRefresh(){if(this._rowStart===void 0||this._rowEnd===void 0||this._rowCount===void 0)return;let e=Math.max(this._rowStart,0),t=Math.min(this._rowEnd,this._rowCount-1);this._rowStart=void 0,this._rowEnd=void 0,this._renderCallback(e,t)}}},1680:function(e,t,n){var r=this&&this.__decorate||function(e,t,n,r){var i,a=arguments.length,o=a<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,n):r;if(typeof Reflect==`object`&&typeof Reflect.decorate==`function`)o=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(o=(a<3?i(o):a>3?i(t,n,o):i(t,n))||o);return a>3&&o&&Object.defineProperty(t,n,o),o},i=this&&this.__param||function(e,t){return function(n,r){t(n,r,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.Viewport=void 0;let a=n(3656),o=n(4725),s=n(8460),c=n(844),l=n(2585),u=t.Viewport=class extends c.Disposable{constructor(e,t,n,r,i,o,c,l){super(),this._viewportElement=e,this._scrollArea=t,this._bufferService=n,this._optionsService=r,this._charSizeService=i,this._renderService=o,this._coreBrowserService=c,this.scrollBarWidth=0,this._currentRowHeight=0,this._currentDeviceCellHeight=0,this._lastRecordedBufferLength=0,this._lastRecordedViewportHeight=0,this._lastRecordedBufferHeight=0,this._lastTouchY=0,this._lastScrollTop=0,this._wheelPartialScroll=0,this._refreshAnimationFrame=null,this._ignoreNextScrollEvent=!1,this._smoothScrollState={startTime:0,origin:-1,target:-1},this._onRequestScrollLines=this.register(new s.EventEmitter),this.onRequestScrollLines=this._onRequestScrollLines.event,this.scrollBarWidth=this._viewportElement.offsetWidth-this._scrollArea.offsetWidth||15,this.register((0,a.addDisposableDomListener)(this._viewportElement,`scroll`,this._handleScroll.bind(this))),this._activeBuffer=this._bufferService.buffer,this.register(this._bufferService.buffers.onBufferActivate((e=>this._activeBuffer=e.activeBuffer))),this._renderDimensions=this._renderService.dimensions,this.register(this._renderService.onDimensionsChange((e=>this._renderDimensions=e))),this._handleThemeChange(l.colors),this.register(l.onChangeColors((e=>this._handleThemeChange(e)))),this.register(this._optionsService.onSpecificOptionChange(`scrollback`,(()=>this.syncScrollArea()))),setTimeout((()=>this.syncScrollArea()))}_handleThemeChange(e){this._viewportElement.style.backgroundColor=e.background.css}reset(){this._currentRowHeight=0,this._currentDeviceCellHeight=0,this._lastRecordedBufferLength=0,this._lastRecordedViewportHeight=0,this._lastRecordedBufferHeight=0,this._lastTouchY=0,this._lastScrollTop=0,this._coreBrowserService.window.requestAnimationFrame((()=>this.syncScrollArea()))}_refresh(e){if(e)return this._innerRefresh(),void(this._refreshAnimationFrame!==null&&this._coreBrowserService.window.cancelAnimationFrame(this._refreshAnimationFrame));this._refreshAnimationFrame===null&&(this._refreshAnimationFrame=this._coreBrowserService.window.requestAnimationFrame((()=>this._innerRefresh())))}_innerRefresh(){if(this._charSizeService.height>0){this._currentRowHeight=this._renderDimensions.device.cell.height/this._coreBrowserService.dpr,this._currentDeviceCellHeight=this._renderDimensions.device.cell.height,this._lastRecordedViewportHeight=this._viewportElement.offsetHeight;let e=Math.round(this._currentRowHeight*this._lastRecordedBufferLength)+(this._lastRecordedViewportHeight-this._renderDimensions.css.canvas.height);this._lastRecordedBufferHeight!==e&&(this._lastRecordedBufferHeight=e,this._scrollArea.style.height=this._lastRecordedBufferHeight+`px`)}let e=this._bufferService.buffer.ydisp*this._currentRowHeight;this._viewportElement.scrollTop!==e&&(this._ignoreNextScrollEvent=!0,this._viewportElement.scrollTop=e),this._refreshAnimationFrame=null}syncScrollArea(e=!1){if(this._lastRecordedBufferLength!==this._bufferService.buffer.lines.length)return this._lastRecordedBufferLength=this._bufferService.buffer.lines.length,void this._refresh(e);this._lastRecordedViewportHeight===this._renderService.dimensions.css.canvas.height&&this._lastScrollTop===this._activeBuffer.ydisp*this._currentRowHeight&&this._renderDimensions.device.cell.height===this._currentDeviceCellHeight||this._refresh(e)}_handleScroll(e){if(this._lastScrollTop=this._viewportElement.scrollTop,!this._viewportElement.offsetParent)return;if(this._ignoreNextScrollEvent)return this._ignoreNextScrollEvent=!1,void this._onRequestScrollLines.fire({amount:0,suppressScrollEvent:!0});let t=Math.round(this._lastScrollTop/this._currentRowHeight)-this._bufferService.buffer.ydisp;this._onRequestScrollLines.fire({amount:t,suppressScrollEvent:!0})}_smoothScroll(){if(this._isDisposed||this._smoothScrollState.origin===-1||this._smoothScrollState.target===-1)return;let e=this._smoothScrollPercent();this._viewportElement.scrollTop=this._smoothScrollState.origin+Math.round(e*(this._smoothScrollState.target-this._smoothScrollState.origin)),e<1?this._coreBrowserService.window.requestAnimationFrame((()=>this._smoothScroll())):this._clearSmoothScrollState()}_smoothScrollPercent(){return this._optionsService.rawOptions.smoothScrollDuration&&this._smoothScrollState.startTime?Math.max(Math.min((Date.now()-this._smoothScrollState.startTime)/this._optionsService.rawOptions.smoothScrollDuration,1),0):1}_clearSmoothScrollState(){this._smoothScrollState.startTime=0,this._smoothScrollState.origin=-1,this._smoothScrollState.target=-1}_bubbleScroll(e,t){let n=this._viewportElement.scrollTop+this._lastRecordedViewportHeight;return!(t<0&&this._viewportElement.scrollTop!==0||t>0&&n<this._lastRecordedBufferHeight)||(e.cancelable&&e.preventDefault(),!1)}handleWheel(e){let t=this._getPixelsScrolled(e);return t!==0&&(this._optionsService.rawOptions.smoothScrollDuration?(this._smoothScrollState.startTime=Date.now(),this._smoothScrollPercent()<1?(this._smoothScrollState.origin=this._viewportElement.scrollTop,this._smoothScrollState.target===-1?this._smoothScrollState.target=this._viewportElement.scrollTop+t:this._smoothScrollState.target+=t,this._smoothScrollState.target=Math.max(Math.min(this._smoothScrollState.target,this._viewportElement.scrollHeight),0),this._smoothScroll()):this._clearSmoothScrollState()):this._viewportElement.scrollTop+=t,this._bubbleScroll(e,t))}scrollLines(e){if(e!==0)if(this._optionsService.rawOptions.smoothScrollDuration){let t=e*this._currentRowHeight;this._smoothScrollState.startTime=Date.now(),this._smoothScrollPercent()<1?(this._smoothScrollState.origin=this._viewportElement.scrollTop,this._smoothScrollState.target=this._smoothScrollState.origin+t,this._smoothScrollState.target=Math.max(Math.min(this._smoothScrollState.target,this._viewportElement.scrollHeight),0),this._smoothScroll()):this._clearSmoothScrollState()}else this._onRequestScrollLines.fire({amount:e,suppressScrollEvent:!1})}_getPixelsScrolled(e){if(e.deltaY===0||e.shiftKey)return 0;let t=this._applyScrollModifier(e.deltaY,e);return e.deltaMode===WheelEvent.DOM_DELTA_LINE?t*=this._currentRowHeight:e.deltaMode===WheelEvent.DOM_DELTA_PAGE&&(t*=this._currentRowHeight*this._bufferService.rows),t}getBufferElements(e,t){let n,r=``,i=[],a=t??this._bufferService.buffer.lines.length,o=this._bufferService.buffer.lines;for(let t=e;t<a;t++){let e=o.get(t);if(!e)continue;let a=o.get(t+1)?.isWrapped;if(r+=e.translateToString(!a),!a||t===o.length-1){let e=document.createElement(`div`);e.textContent=r,i.push(e),r.length>0&&(n=e),r=``}}return{bufferElements:i,cursorElement:n}}getLinesScrolled(e){if(e.deltaY===0||e.shiftKey)return 0;let t=this._applyScrollModifier(e.deltaY,e);return e.deltaMode===WheelEvent.DOM_DELTA_PIXEL?(t/=this._currentRowHeight+0,this._wheelPartialScroll+=t,t=Math.floor(Math.abs(this._wheelPartialScroll))*(this._wheelPartialScroll>0?1:-1),this._wheelPartialScroll%=1):e.deltaMode===WheelEvent.DOM_DELTA_PAGE&&(t*=this._bufferService.rows),t}_applyScrollModifier(e,t){let n=this._optionsService.rawOptions.fastScrollModifier;return n===`alt`&&t.altKey||n===`ctrl`&&t.ctrlKey||n===`shift`&&t.shiftKey?e*this._optionsService.rawOptions.fastScrollSensitivity*this._optionsService.rawOptions.scrollSensitivity:e*this._optionsService.rawOptions.scrollSensitivity}handleTouchStart(e){this._lastTouchY=e.touches[0].pageY}handleTouchMove(e){let t=this._lastTouchY-e.touches[0].pageY;return this._lastTouchY=e.touches[0].pageY,t!==0&&(this._viewportElement.scrollTop+=t,this._bubbleScroll(e,t))}};t.Viewport=u=r([i(2,l.IBufferService),i(3,l.IOptionsService),i(4,o.ICharSizeService),i(5,o.IRenderService),i(6,o.ICoreBrowserService),i(7,o.IThemeService)],u)},3107:function(e,t,n){var r=this&&this.__decorate||function(e,t,n,r){var i,a=arguments.length,o=a<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,n):r;if(typeof Reflect==`object`&&typeof Reflect.decorate==`function`)o=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(o=(a<3?i(o):a>3?i(t,n,o):i(t,n))||o);return a>3&&o&&Object.defineProperty(t,n,o),o},i=this&&this.__param||function(e,t){return function(n,r){t(n,r,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.BufferDecorationRenderer=void 0;let a=n(4725),o=n(844),s=n(2585),c=t.BufferDecorationRenderer=class extends o.Disposable{constructor(e,t,n,r,i){super(),this._screenElement=e,this._bufferService=t,this._coreBrowserService=n,this._decorationService=r,this._renderService=i,this._decorationElements=new Map,this._altBufferIsActive=!1,this._dimensionsChanged=!1,this._container=document.createElement(`div`),this._container.classList.add(`xterm-decoration-container`),this._screenElement.appendChild(this._container),this.register(this._renderService.onRenderedViewportChange((()=>this._doRefreshDecorations()))),this.register(this._renderService.onDimensionsChange((()=>{this._dimensionsChanged=!0,this._queueRefresh()}))),this.register(this._coreBrowserService.onDprChange((()=>this._queueRefresh()))),this.register(this._bufferService.buffers.onBufferActivate((()=>{this._altBufferIsActive=this._bufferService.buffer===this._bufferService.buffers.alt}))),this.register(this._decorationService.onDecorationRegistered((()=>this._queueRefresh()))),this.register(this._decorationService.onDecorationRemoved((e=>this._removeDecoration(e)))),this.register((0,o.toDisposable)((()=>{this._container.remove(),this._decorationElements.clear()})))}_queueRefresh(){this._animationFrame===void 0&&(this._animationFrame=this._renderService.addRefreshCallback((()=>{this._doRefreshDecorations(),this._animationFrame=void 0})))}_doRefreshDecorations(){for(let e of this._decorationService.decorations)this._renderDecoration(e);this._dimensionsChanged=!1}_renderDecoration(e){this._refreshStyle(e),this._dimensionsChanged&&this._refreshXPosition(e)}_createElement(e){let t=this._coreBrowserService.mainDocument.createElement(`div`);t.classList.add(`xterm-decoration`),t.classList.toggle(`xterm-decoration-top-layer`,e?.options?.layer===`top`),t.style.width=`${Math.round((e.options.width||1)*this._renderService.dimensions.css.cell.width)}px`,t.style.height=(e.options.height||1)*this._renderService.dimensions.css.cell.height+`px`,t.style.top=(e.marker.line-this._bufferService.buffers.active.ydisp)*this._renderService.dimensions.css.cell.height+`px`,t.style.lineHeight=`${this._renderService.dimensions.css.cell.height}px`;let n=e.options.x??0;return n&&n>this._bufferService.cols&&(t.style.display=`none`),this._refreshXPosition(e,t),t}_refreshStyle(e){let t=e.marker.line-this._bufferService.buffers.active.ydisp;if(t<0||t>=this._bufferService.rows)e.element&&(e.element.style.display=`none`,e.onRenderEmitter.fire(e.element));else{let n=this._decorationElements.get(e);n||(n=this._createElement(e),e.element=n,this._decorationElements.set(e,n),this._container.appendChild(n),e.onDispose((()=>{this._decorationElements.delete(e),n.remove()}))),n.style.top=t*this._renderService.dimensions.css.cell.height+`px`,n.style.display=this._altBufferIsActive?`none`:`block`,e.onRenderEmitter.fire(n)}}_refreshXPosition(e,t=e.element){if(!t)return;let n=e.options.x??0;(e.options.anchor||`left`)===`right`?t.style.right=n?n*this._renderService.dimensions.css.cell.width+`px`:``:t.style.left=n?n*this._renderService.dimensions.css.cell.width+`px`:``}_removeDecoration(e){this._decorationElements.get(e)?.remove(),this._decorationElements.delete(e),e.dispose()}};t.BufferDecorationRenderer=c=r([i(1,s.IBufferService),i(2,a.ICoreBrowserService),i(3,s.IDecorationService),i(4,a.IRenderService)],c)},5871:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ColorZoneStore=void 0,t.ColorZoneStore=class{constructor(){this._zones=[],this._zonePool=[],this._zonePoolIndex=0,this._linePadding={full:0,left:0,center:0,right:0}}get zones(){return this._zonePool.length=Math.min(this._zonePool.length,this._zones.length),this._zones}clear(){this._zones.length=0,this._zonePoolIndex=0}addDecoration(e){if(e.options.overviewRulerOptions){for(let t of this._zones)if(t.color===e.options.overviewRulerOptions.color&&t.position===e.options.overviewRulerOptions.position){if(this._lineIntersectsZone(t,e.marker.line))return;if(this._lineAdjacentToZone(t,e.marker.line,e.options.overviewRulerOptions.position))return void this._addLineToZone(t,e.marker.line)}if(this._zonePoolIndex<this._zonePool.length)return this._zonePool[this._zonePoolIndex].color=e.options.overviewRulerOptions.color,this._zonePool[this._zonePoolIndex].position=e.options.overviewRulerOptions.position,this._zonePool[this._zonePoolIndex].startBufferLine=e.marker.line,this._zonePool[this._zonePoolIndex].endBufferLine=e.marker.line,void this._zones.push(this._zonePool[this._zonePoolIndex++]);this._zones.push({color:e.options.overviewRulerOptions.color,position:e.options.overviewRulerOptions.position,startBufferLine:e.marker.line,endBufferLine:e.marker.line}),this._zonePool.push(this._zones[this._zones.length-1]),this._zonePoolIndex++}}setPadding(e){this._linePadding=e}_lineIntersectsZone(e,t){return t>=e.startBufferLine&&t<=e.endBufferLine}_lineAdjacentToZone(e,t,n){return t>=e.startBufferLine-this._linePadding[n||`full`]&&t<=e.endBufferLine+this._linePadding[n||`full`]}_addLineToZone(e,t){e.startBufferLine=Math.min(e.startBufferLine,t),e.endBufferLine=Math.max(e.endBufferLine,t)}}},5744:function(e,t,n){var r=this&&this.__decorate||function(e,t,n,r){var i,a=arguments.length,o=a<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,n):r;if(typeof Reflect==`object`&&typeof Reflect.decorate==`function`)o=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(o=(a<3?i(o):a>3?i(t,n,o):i(t,n))||o);return a>3&&o&&Object.defineProperty(t,n,o),o},i=this&&this.__param||function(e,t){return function(n,r){t(n,r,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.OverviewRulerRenderer=void 0;let a=n(5871),o=n(4725),s=n(844),c=n(2585),l={full:0,left:0,center:0,right:0},u={full:0,left:0,center:0,right:0},d={full:0,left:0,center:0,right:0},f=t.OverviewRulerRenderer=class extends s.Disposable{get _width(){return this._optionsService.options.overviewRulerWidth||0}constructor(e,t,n,r,i,o,c){super(),this._viewportElement=e,this._screenElement=t,this._bufferService=n,this._decorationService=r,this._renderService=i,this._optionsService=o,this._coreBrowserService=c,this._colorZoneStore=new a.ColorZoneStore,this._shouldUpdateDimensions=!0,this._shouldUpdateAnchor=!0,this._lastKnownBufferLength=0,this._canvas=this._coreBrowserService.mainDocument.createElement(`canvas`),this._canvas.classList.add(`xterm-decoration-overview-ruler`),this._refreshCanvasDimensions(),this._viewportElement.parentElement?.insertBefore(this._canvas,this._viewportElement);let l=this._canvas.getContext(`2d`);if(!l)throw Error(`Ctx cannot be null`);this._ctx=l,this._registerDecorationListeners(),this._registerBufferChangeListeners(),this._registerDimensionChangeListeners(),this.register((0,s.toDisposable)((()=>{this._canvas?.remove()})))}_registerDecorationListeners(){this.register(this._decorationService.onDecorationRegistered((()=>this._queueRefresh(void 0,!0)))),this.register(this._decorationService.onDecorationRemoved((()=>this._queueRefresh(void 0,!0))))}_registerBufferChangeListeners(){this.register(this._renderService.onRenderedViewportChange((()=>this._queueRefresh()))),this.register(this._bufferService.buffers.onBufferActivate((()=>{this._canvas.style.display=this._bufferService.buffer===this._bufferService.buffers.alt?`none`:`block`}))),this.register(this._bufferService.onScroll((()=>{this._lastKnownBufferLength!==this._bufferService.buffers.normal.lines.length&&(this._refreshDrawHeightConstants(),this._refreshColorZonePadding())})))}_registerDimensionChangeListeners(){this.register(this._renderService.onRender((()=>{this._containerHeight&&this._containerHeight===this._screenElement.clientHeight||(this._queueRefresh(!0),this._containerHeight=this._screenElement.clientHeight)}))),this.register(this._optionsService.onSpecificOptionChange(`overviewRulerWidth`,(()=>this._queueRefresh(!0)))),this.register(this._coreBrowserService.onDprChange((()=>this._queueRefresh(!0)))),this._queueRefresh(!0)}_refreshDrawConstants(){let e=Math.floor(this._canvas.width/3),t=Math.ceil(this._canvas.width/3);u.full=this._canvas.width,u.left=e,u.center=t,u.right=e,this._refreshDrawHeightConstants(),d.full=0,d.left=0,d.center=u.left,d.right=u.left+u.center}_refreshDrawHeightConstants(){l.full=Math.round(2*this._coreBrowserService.dpr);let e=this._canvas.height/this._bufferService.buffer.lines.length,t=Math.round(Math.max(Math.min(e,12),6)*this._coreBrowserService.dpr);l.left=t,l.center=t,l.right=t}_refreshColorZonePadding(){this._colorZoneStore.setPadding({full:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*l.full),left:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*l.left),center:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*l.center),right:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*l.right)}),this._lastKnownBufferLength=this._bufferService.buffers.normal.lines.length}_refreshCanvasDimensions(){this._canvas.style.width=`${this._width}px`,this._canvas.width=Math.round(this._width*this._coreBrowserService.dpr),this._canvas.style.height=`${this._screenElement.clientHeight}px`,this._canvas.height=Math.round(this._screenElement.clientHeight*this._coreBrowserService.dpr),this._refreshDrawConstants(),this._refreshColorZonePadding()}_refreshDecorations(){this._shouldUpdateDimensions&&this._refreshCanvasDimensions(),this._ctx.clearRect(0,0,this._canvas.width,this._canvas.height),this._colorZoneStore.clear();for(let e of this._decorationService.decorations)this._colorZoneStore.addDecoration(e);this._ctx.lineWidth=1;let e=this._colorZoneStore.zones;for(let t of e)t.position!==`full`&&this._renderColorZone(t);for(let t of e)t.position===`full`&&this._renderColorZone(t);this._shouldUpdateDimensions=!1,this._shouldUpdateAnchor=!1}_renderColorZone(e){this._ctx.fillStyle=e.color,this._ctx.fillRect(d[e.position||`full`],Math.round((this._canvas.height-1)*(e.startBufferLine/this._bufferService.buffers.active.lines.length)-l[e.position||`full`]/2),u[e.position||`full`],Math.round((this._canvas.height-1)*((e.endBufferLine-e.startBufferLine)/this._bufferService.buffers.active.lines.length)+l[e.position||`full`]))}_queueRefresh(e,t){this._shouldUpdateDimensions=e||this._shouldUpdateDimensions,this._shouldUpdateAnchor=t||this._shouldUpdateAnchor,this._animationFrame===void 0&&(this._animationFrame=this._coreBrowserService.window.requestAnimationFrame((()=>{this._refreshDecorations(),this._animationFrame=void 0})))}};t.OverviewRulerRenderer=f=r([i(2,c.IBufferService),i(3,c.IDecorationService),i(4,o.IRenderService),i(5,c.IOptionsService),i(6,o.ICoreBrowserService)],f)},2950:function(e,t,n){var r=this&&this.__decorate||function(e,t,n,r){var i,a=arguments.length,o=a<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,n):r;if(typeof Reflect==`object`&&typeof Reflect.decorate==`function`)o=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(o=(a<3?i(o):a>3?i(t,n,o):i(t,n))||o);return a>3&&o&&Object.defineProperty(t,n,o),o},i=this&&this.__param||function(e,t){return function(n,r){t(n,r,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.CompositionHelper=void 0;let a=n(4725),o=n(2585),s=n(2584),c=t.CompositionHelper=class{get isComposing(){return this._isComposing}constructor(e,t,n,r,i,a){this._textarea=e,this._compositionView=t,this._bufferService=n,this._optionsService=r,this._coreService=i,this._renderService=a,this._isComposing=!1,this._isSendingComposition=!1,this._compositionPosition={start:0,end:0},this._dataAlreadySent=``}compositionstart(){this._isComposing=!0,this._compositionPosition.start=this._textarea.value.length,this._compositionView.textContent=``,this._dataAlreadySent=``,this._compositionView.classList.add(`active`)}compositionupdate(e){this._compositionView.textContent=e.data,this.updateCompositionElements(),setTimeout((()=>{this._compositionPosition.end=this._textarea.value.length}),0)}compositionend(){this._finalizeComposition(!0)}keydown(e){if(this._isComposing||this._isSendingComposition){if(e.keyCode===229||e.keyCode===16||e.keyCode===17||e.keyCode===18)return!1;this._finalizeComposition(!1)}return e.keyCode!==229||(this._handleAnyTextareaChanges(),!1)}_finalizeComposition(e){if(this._compositionView.classList.remove(`active`),this._isComposing=!1,e){let e={start:this._compositionPosition.start,end:this._compositionPosition.end};this._isSendingComposition=!0,setTimeout((()=>{if(this._isSendingComposition){let t;this._isSendingComposition=!1,e.start+=this._dataAlreadySent.length,t=this._isComposing?this._textarea.value.substring(e.start,e.end):this._textarea.value.substring(e.start),t.length>0&&this._coreService.triggerDataEvent(t,!0)}}),0)}else{this._isSendingComposition=!1;let e=this._textarea.value.substring(this._compositionPosition.start,this._compositionPosition.end);this._coreService.triggerDataEvent(e,!0)}}_handleAnyTextareaChanges(){let e=this._textarea.value;setTimeout((()=>{if(!this._isComposing){let t=this._textarea.value,n=t.replace(e,``);this._dataAlreadySent=n,t.length>e.length?this._coreService.triggerDataEvent(n,!0):t.length<e.length?this._coreService.triggerDataEvent(`${s.C0.DEL}`,!0):t.length===e.length&&t!==e&&this._coreService.triggerDataEvent(t,!0)}}),0)}updateCompositionElements(e){if(this._isComposing){if(this._bufferService.buffer.isCursorInViewport){let e=Math.min(this._bufferService.buffer.x,this._bufferService.cols-1),t=this._renderService.dimensions.css.cell.height,n=this._bufferService.buffer.y*this._renderService.dimensions.css.cell.height,r=e*this._renderService.dimensions.css.cell.width;this._compositionView.style.left=r+`px`,this._compositionView.style.top=n+`px`,this._compositionView.style.height=t+`px`,this._compositionView.style.lineHeight=t+`px`,this._compositionView.style.fontFamily=this._optionsService.rawOptions.fontFamily,this._compositionView.style.fontSize=this._optionsService.rawOptions.fontSize+`px`;let i=this._compositionView.getBoundingClientRect();this._textarea.style.left=r+`px`,this._textarea.style.top=n+`px`,this._textarea.style.width=Math.max(i.width,1)+`px`,this._textarea.style.height=Math.max(i.height,1)+`px`,this._textarea.style.lineHeight=i.height+`px`}e||setTimeout((()=>this.updateCompositionElements(!0)),0)}}};t.CompositionHelper=c=r([i(2,o.IBufferService),i(3,o.IOptionsService),i(4,o.ICoreService),i(5,a.IRenderService)],c)},9806:(e,t)=>{function n(e,t,n){let r=n.getBoundingClientRect(),i=e.getComputedStyle(n),a=parseInt(i.getPropertyValue(`padding-left`)),o=parseInt(i.getPropertyValue(`padding-top`));return[t.clientX-r.left-a,t.clientY-r.top-o]}Object.defineProperty(t,"__esModule",{value:!0}),t.getCoords=t.getCoordsRelativeToElement=void 0,t.getCoordsRelativeToElement=n,t.getCoords=function(e,t,r,i,a,o,s,c,l){if(!o)return;let u=n(e,t,r);return u?(u[0]=Math.ceil((u[0]+(l?s/2:0))/s),u[1]=Math.ceil(u[1]/c),u[0]=Math.min(Math.max(u[0],1),i+ +!!l),u[1]=Math.min(Math.max(u[1],1),a),u):void 0}},9504:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.moveToCellSequence=void 0;let r=n(2584);function i(e,t,n,r){let i=e-a(e,n),s=t-a(t,n);return l(Math.abs(i-s)-function(e,t,n){let r=0,i=e-a(e,n),s=t-a(t,n);for(let a=0;a<Math.abs(i-s);a++){let s=o(e,t)===`A`?-1:1;n.buffer.lines.get(i+s*a)?.isWrapped&&r++}return r}(e,t,n),c(o(e,t),r))}function a(e,t){let n=0,r=t.buffer.lines.get(e),i=r?.isWrapped;for(;i&&e>=0&&e<t.rows;)n++,r=t.buffer.lines.get(--e),i=r?.isWrapped;return n}function o(e,t){return e>t?`A`:`B`}function s(e,t,n,r,i,a){let o=e,s=t,c=``;for(;o!==n||s!==r;)o+=i?1:-1,i&&o>a.cols-1?(c+=a.buffer.translateBufferLineToString(s,!1,e,o),o=0,e=0,s++):!i&&o<0&&(c+=a.buffer.translateBufferLineToString(s,!1,0,e+1),o=a.cols-1,e=o,s--);return c+a.buffer.translateBufferLineToString(s,!1,e,o)}function c(e,t){let n=t?`O`:`[`;return r.C0.ESC+n+e}function l(e,t){e=Math.floor(e);let n=``;for(let r=0;r<e;r++)n+=t;return n}t.moveToCellSequence=function(e,t,n,r){let o=n.buffer.x,u=n.buffer.y;if(!n.buffer.hasScrollback)return function(e,t,n,r,o,u){return i(t,r,o,u).length===0?``:l(s(e,t,e,t-a(t,o),!1,o).length,c(`D`,u))}(o,u,0,t,n,r)+i(u,t,n,r)+function(e,t,n,r,o,u){let d;d=i(t,r,o,u).length>0?r-a(r,o):t;let f=r,p=function(e,t,n,r,o,s){let c;return c=i(n,r,o,s).length>0?r-a(r,o):t,e<n&&c<=r||e>=n&&c<r?`C`:`D`}(e,t,n,r,o,u);return l(s(e,d,n,f,p===`C`,o).length,c(p,u))}(o,u,e,t,n,r);let d;if(u===t)return d=o>e?`D`:`C`,l(Math.abs(o-e),c(d,r));d=u>t?`D`:`C`;let f=Math.abs(u-t);return l(function(e,t){return t.cols-e}(u>t?e:o,n)+(f-1)*n.cols+1+((u>t?o:e)-1),c(d,r))}},1296:function(e,t,n){var r=this&&this.__decorate||function(e,t,n,r){var i,a=arguments.length,o=a<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,n):r;if(typeof Reflect==`object`&&typeof Reflect.decorate==`function`)o=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(o=(a<3?i(o):a>3?i(t,n,o):i(t,n))||o);return a>3&&o&&Object.defineProperty(t,n,o),o},i=this&&this.__param||function(e,t){return function(n,r){t(n,r,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.DomRenderer=void 0;let a=n(3787),o=n(2550),s=n(2223),c=n(6171),l=n(6052),u=n(4725),d=n(8055),f=n(8460),p=n(844),m=n(2585),h=`xterm-dom-renderer-owner-`,g=`xterm-rows`,_=`xterm-fg-`,v=`xterm-bg-`,y=`xterm-focus`,b=`xterm-selection`,x=1,S=t.DomRenderer=class extends p.Disposable{constructor(e,t,n,r,i,s,u,d,m,_,v,y,S){super(),this._terminal=e,this._document=t,this._element=n,this._screenElement=r,this._viewportElement=i,this._helperContainer=s,this._linkifier2=u,this._charSizeService=m,this._optionsService=_,this._bufferService=v,this._coreBrowserService=y,this._themeService=S,this._terminalClass=x++,this._rowElements=[],this._selectionRenderModel=(0,l.createSelectionRenderModel)(),this.onRequestRedraw=this.register(new f.EventEmitter).event,this._rowContainer=this._document.createElement(`div`),this._rowContainer.classList.add(g),this._rowContainer.style.lineHeight=`normal`,this._rowContainer.setAttribute(`aria-hidden`,`true`),this._refreshRowElements(this._bufferService.cols,this._bufferService.rows),this._selectionContainer=this._document.createElement(`div`),this._selectionContainer.classList.add(b),this._selectionContainer.setAttribute(`aria-hidden`,`true`),this.dimensions=(0,c.createRenderDimensions)(),this._updateDimensions(),this.register(this._optionsService.onOptionChange((()=>this._handleOptionsChanged()))),this.register(this._themeService.onChangeColors((e=>this._injectCss(e)))),this._injectCss(this._themeService.colors),this._rowFactory=d.createInstance(a.DomRendererRowFactory,document),this._element.classList.add(h+this._terminalClass),this._screenElement.appendChild(this._rowContainer),this._screenElement.appendChild(this._selectionContainer),this.register(this._linkifier2.onShowLinkUnderline((e=>this._handleLinkHover(e)))),this.register(this._linkifier2.onHideLinkUnderline((e=>this._handleLinkLeave(e)))),this.register((0,p.toDisposable)((()=>{this._element.classList.remove(h+this._terminalClass),this._rowContainer.remove(),this._selectionContainer.remove(),this._widthCache.dispose(),this._themeStyleElement.remove(),this._dimensionsStyleElement.remove()}))),this._widthCache=new o.WidthCache(this._document,this._helperContainer),this._widthCache.setFont(this._optionsService.rawOptions.fontFamily,this._optionsService.rawOptions.fontSize,this._optionsService.rawOptions.fontWeight,this._optionsService.rawOptions.fontWeightBold),this._setDefaultSpacing()}_updateDimensions(){let e=this._coreBrowserService.dpr;this.dimensions.device.char.width=this._charSizeService.width*e,this.dimensions.device.char.height=Math.ceil(this._charSizeService.height*e),this.dimensions.device.cell.width=this.dimensions.device.char.width+Math.round(this._optionsService.rawOptions.letterSpacing),this.dimensions.device.cell.height=Math.floor(this.dimensions.device.char.height*this._optionsService.rawOptions.lineHeight),this.dimensions.device.char.left=0,this.dimensions.device.char.top=0,this.dimensions.device.canvas.width=this.dimensions.device.cell.width*this._bufferService.cols,this.dimensions.device.canvas.height=this.dimensions.device.cell.height*this._bufferService.rows,this.dimensions.css.canvas.width=Math.round(this.dimensions.device.canvas.width/e),this.dimensions.css.canvas.height=Math.round(this.dimensions.device.canvas.height/e),this.dimensions.css.cell.width=this.dimensions.css.canvas.width/this._bufferService.cols,this.dimensions.css.cell.height=this.dimensions.css.canvas.height/this._bufferService.rows;for(let e of this._rowElements)e.style.width=`${this.dimensions.css.canvas.width}px`,e.style.height=`${this.dimensions.css.cell.height}px`,e.style.lineHeight=`${this.dimensions.css.cell.height}px`,e.style.overflow=`hidden`;this._dimensionsStyleElement||(this._dimensionsStyleElement=this._document.createElement(`style`),this._screenElement.appendChild(this._dimensionsStyleElement));let t=`${this._terminalSelector} .${g} span { display: inline-block; height: 100%; vertical-align: top;}`;this._dimensionsStyleElement.textContent=t,this._selectionContainer.style.height=this._viewportElement.style.height,this._screenElement.style.width=`${this.dimensions.css.canvas.width}px`,this._screenElement.style.height=`${this.dimensions.css.canvas.height}px`}_injectCss(e){this._themeStyleElement||(this._themeStyleElement=this._document.createElement(`style`),this._screenElement.appendChild(this._themeStyleElement));let t=`${this._terminalSelector} .${g} { color: ${e.foreground.css}; font-family: ${this._optionsService.rawOptions.fontFamily}; font-size: ${this._optionsService.rawOptions.fontSize}px; font-kerning: none; white-space: pre}`;t+=`${this._terminalSelector} .${g} .xterm-dim { color: ${d.color.multiplyOpacity(e.foreground,.5).css};}`,t+=`${this._terminalSelector} span:not(.xterm-bold) { font-weight: ${this._optionsService.rawOptions.fontWeight};}${this._terminalSelector} span.xterm-bold { font-weight: ${this._optionsService.rawOptions.fontWeightBold};}${this._terminalSelector} span.xterm-italic { font-style: italic;}`;let n=`blink_underline_${this._terminalClass}`,r=`blink_bar_${this._terminalClass}`,i=`blink_block_${this._terminalClass}`;t+=`@keyframes ${n} { 50% { border-bottom-style: hidden; }}`,t+=`@keyframes ${r} { 50% { box-shadow: none; }}`,t+=`@keyframes ${i} { 0% { background-color: ${e.cursor.css}; color: ${e.cursorAccent.css}; } 50% { background-color: inherit; color: ${e.cursor.css}; }}`,t+=`${this._terminalSelector} .${g}.${y} .xterm-cursor.xterm-cursor-blink.xterm-cursor-underline { animation: ${n} 1s step-end infinite;}${this._terminalSelector} .${g}.${y} .xterm-cursor.xterm-cursor-blink.xterm-cursor-bar { animation: ${r} 1s step-end infinite;}${this._terminalSelector} .${g}.${y} .xterm-cursor.xterm-cursor-blink.xterm-cursor-block { animation: ${i} 1s step-end infinite;}${this._terminalSelector} .${g} .xterm-cursor.xterm-cursor-block { background-color: ${e.cursor.css}; color: ${e.cursorAccent.css};}${this._terminalSelector} .${g} .xterm-cursor.xterm-cursor-block:not(.xterm-cursor-blink) { background-color: ${e.cursor.css} !important; color: ${e.cursorAccent.css} !important;}${this._terminalSelector} .${g} .xterm-cursor.xterm-cursor-outline { outline: 1px solid ${e.cursor.css}; outline-offset: -1px;}${this._terminalSelector} .${g} .xterm-cursor.xterm-cursor-bar { box-shadow: ${this._optionsService.rawOptions.cursorWidth}px 0 0 ${e.cursor.css} inset;}${this._terminalSelector} .${g} .xterm-cursor.xterm-cursor-underline { border-bottom: 1px ${e.cursor.css}; border-bottom-style: solid; height: calc(100% - 1px);}`,t+=`${this._terminalSelector} .${b} { position: absolute; top: 0; left: 0; z-index: 1; pointer-events: none;}${this._terminalSelector}.focus .${b} div { position: absolute; background-color: ${e.selectionBackgroundOpaque.css};}${this._terminalSelector} .${b} div { position: absolute; background-color: ${e.selectionInactiveBackgroundOpaque.css};}`;for(let[n,r]of e.ansi.entries())t+=`${this._terminalSelector} .${_}${n} { color: ${r.css}; }${this._terminalSelector} .${_}${n}.xterm-dim { color: ${d.color.multiplyOpacity(r,.5).css}; }${this._terminalSelector} .${v}${n} { background-color: ${r.css}; }`;t+=`${this._terminalSelector} .${_}${s.INVERTED_DEFAULT_COLOR} { color: ${d.color.opaque(e.background).css}; }${this._terminalSelector} .${_}${s.INVERTED_DEFAULT_COLOR}.xterm-dim { color: ${d.color.multiplyOpacity(d.color.opaque(e.background),.5).css}; }${this._terminalSelector} .${v}${s.INVERTED_DEFAULT_COLOR} { background-color: ${e.foreground.css}; }`,this._themeStyleElement.textContent=t}_setDefaultSpacing(){let e=this.dimensions.css.cell.width-this._widthCache.get(`W`,!1,!1);this._rowContainer.style.letterSpacing=`${e}px`,this._rowFactory.defaultSpacing=e}handleDevicePixelRatioChange(){this._updateDimensions(),this._widthCache.clear(),this._setDefaultSpacing()}_refreshRowElements(e,t){for(let e=this._rowElements.length;e<=t;e++){let e=this._document.createElement(`div`);this._rowContainer.appendChild(e),this._rowElements.push(e)}for(;this._rowElements.length>t;)this._rowContainer.removeChild(this._rowElements.pop())}handleResize(e,t){this._refreshRowElements(e,t),this._updateDimensions(),this.handleSelectionChanged(this._selectionRenderModel.selectionStart,this._selectionRenderModel.selectionEnd,this._selectionRenderModel.columnSelectMode)}handleCharSizeChanged(){this._updateDimensions(),this._widthCache.clear(),this._setDefaultSpacing()}handleBlur(){this._rowContainer.classList.remove(y),this.renderRows(0,this._bufferService.rows-1)}handleFocus(){this._rowContainer.classList.add(y),this.renderRows(this._bufferService.buffer.y,this._bufferService.buffer.y)}handleSelectionChanged(e,t,n){if(this._selectionContainer.replaceChildren(),this._rowFactory.handleSelectionChanged(e,t,n),this.renderRows(0,this._bufferService.rows-1),!e||!t)return;this._selectionRenderModel.update(this._terminal,e,t,n);let r=this._selectionRenderModel.viewportStartRow,i=this._selectionRenderModel.viewportEndRow,a=this._selectionRenderModel.viewportCappedStartRow,o=this._selectionRenderModel.viewportCappedEndRow;if(a>=this._bufferService.rows||o<0)return;let s=this._document.createDocumentFragment();if(n){let n=e[0]>t[0];s.appendChild(this._createSelectionElement(a,n?t[0]:e[0],n?e[0]:t[0],o-a+1))}else{let n=r===a?e[0]:0,c=a===i?t[0]:this._bufferService.cols;s.appendChild(this._createSelectionElement(a,n,c));let l=o-a-1;if(s.appendChild(this._createSelectionElement(a+1,0,this._bufferService.cols,l)),a!==o){let e=i===o?t[0]:this._bufferService.cols;s.appendChild(this._createSelectionElement(o,0,e))}}this._selectionContainer.appendChild(s)}_createSelectionElement(e,t,n,r=1){let i=this._document.createElement(`div`),a=t*this.dimensions.css.cell.width,o=this.dimensions.css.cell.width*(n-t);return a+o>this.dimensions.css.canvas.width&&(o=this.dimensions.css.canvas.width-a),i.style.height=r*this.dimensions.css.cell.height+`px`,i.style.top=e*this.dimensions.css.cell.height+`px`,i.style.left=`${a}px`,i.style.width=`${o}px`,i}handleCursorMove(){}_handleOptionsChanged(){this._updateDimensions(),this._injectCss(this._themeService.colors),this._widthCache.setFont(this._optionsService.rawOptions.fontFamily,this._optionsService.rawOptions.fontSize,this._optionsService.rawOptions.fontWeight,this._optionsService.rawOptions.fontWeightBold),this._setDefaultSpacing()}clear(){for(let e of this._rowElements)e.replaceChildren()}renderRows(e,t){let n=this._bufferService.buffer,r=n.ybase+n.y,i=Math.min(n.x,this._bufferService.cols-1),a=this._optionsService.rawOptions.cursorBlink,o=this._optionsService.rawOptions.cursorStyle,s=this._optionsService.rawOptions.cursorInactiveStyle;for(let c=e;c<=t;c++){let e=c+n.ydisp,t=this._rowElements[c],l=n.lines.get(e);if(!t||!l)break;t.replaceChildren(...this._rowFactory.createRow(l,e,e===r,o,s,i,a,this.dimensions.css.cell.width,this._widthCache,-1,-1))}}get _terminalSelector(){return`.${h}${this._terminalClass}`}_handleLinkHover(e){this._setCellUnderline(e.x1,e.x2,e.y1,e.y2,e.cols,!0)}_handleLinkLeave(e){this._setCellUnderline(e.x1,e.x2,e.y1,e.y2,e.cols,!1)}_setCellUnderline(e,t,n,r,i,a){n<0&&(e=0),r<0&&(t=0);let o=this._bufferService.rows-1;n=Math.max(Math.min(n,o),0),r=Math.max(Math.min(r,o),0),i=Math.min(i,this._bufferService.cols);let s=this._bufferService.buffer,c=s.ybase+s.y,l=Math.min(s.x,i-1),u=this._optionsService.rawOptions.cursorBlink,d=this._optionsService.rawOptions.cursorStyle,f=this._optionsService.rawOptions.cursorInactiveStyle;for(let o=n;o<=r;++o){let p=o+s.ydisp,m=this._rowElements[o],h=s.lines.get(p);if(!m||!h)break;m.replaceChildren(...this._rowFactory.createRow(h,p,p===c,d,f,l,u,this.dimensions.css.cell.width,this._widthCache,a?o===n?e:0:-1,a?(o===r?t:i)-1:-1))}}};t.DomRenderer=S=r([i(7,m.IInstantiationService),i(8,u.ICharSizeService),i(9,m.IOptionsService),i(10,m.IBufferService),i(11,u.ICoreBrowserService),i(12,u.IThemeService)],S)},3787:function(e,t,n){var r=this&&this.__decorate||function(e,t,n,r){var i,a=arguments.length,o=a<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,n):r;if(typeof Reflect==`object`&&typeof Reflect.decorate==`function`)o=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(o=(a<3?i(o):a>3?i(t,n,o):i(t,n))||o);return a>3&&o&&Object.defineProperty(t,n,o),o},i=this&&this.__param||function(e,t){return function(n,r){t(n,r,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.DomRendererRowFactory=void 0;let a=n(2223),o=n(643),s=n(511),c=n(2585),l=n(8055),u=n(4725),d=n(4269),f=n(6171),p=n(3734),m=t.DomRendererRowFactory=class{constructor(e,t,n,r,i,a,o){this._document=e,this._characterJoinerService=t,this._optionsService=n,this._coreBrowserService=r,this._coreService=i,this._decorationService=a,this._themeService=o,this._workCell=new s.CellData,this._columnSelectMode=!1,this.defaultSpacing=0}handleSelectionChanged(e,t,n){this._selectionStart=e,this._selectionEnd=t,this._columnSelectMode=n}createRow(e,t,n,r,i,s,c,u,f,m,g){let _=[],v=this._characterJoinerService.getJoinedCharacters(t),y=this._themeService.colors,b,x=e.getNoBgTrimmedLength();n&&x<s+1&&(x=s+1);let S=0,C=``,w=0,T=0,E=0,D=!1,ee=0,O=!1,k=0,A=[],te=m!==-1&&g!==-1;for(let j=0;j<x;j++){e.loadCell(j,this._workCell);let x=this._workCell.getWidth();if(x===0)continue;let M=!1,ne=j,N=this._workCell;if(v.length>0&&j===v[0][0]){M=!0;let t=v.shift();N=new d.JoinedCellData(this._workCell,e.translateToString(!0,t[0],t[1]),t[1]-t[0]),ne=t[1]-1,x=N.getWidth()}let P=this._isCellInSelection(j,t),F=n&&j===s,I=te&&j>=m&&j<=g,L=!1;this._decorationService.forEachDecorationAtCell(j,t,void 0,(e=>{L=!0}));let R=N.getChars()||o.WHITESPACE_CELL_CHAR;if(R===` `&&(N.isUnderline()||N.isOverline())&&(R=`\xA0`),k=x*u-f.get(R,N.isBold(),N.isItalic()),b){if(S&&(P&&O||!P&&!O&&N.bg===w)&&(P&&O&&y.selectionForeground||N.fg===T)&&N.extended.ext===E&&I===D&&k===ee&&!F&&!M&&!L){N.isInvisible()?C+=o.WHITESPACE_CELL_CHAR:C+=R,S++;continue}S&&(b.textContent=C),b=this._document.createElement(`span`),S=0,C=``}else b=this._document.createElement(`span`);if(w=N.bg,T=N.fg,E=N.extended.ext,D=I,ee=k,O=P,M&&s>=j&&s<=ne&&(s=j),!this._coreService.isCursorHidden&&F&&this._coreService.isCursorInitialized){if(A.push(`xterm-cursor`),this._coreBrowserService.isFocused)c&&A.push(`xterm-cursor-blink`),A.push(r===`bar`?`xterm-cursor-bar`:r===`underline`?`xterm-cursor-underline`:`xterm-cursor-block`);else if(i)switch(i){case`outline`:A.push(`xterm-cursor-outline`);break;case`block`:A.push(`xterm-cursor-block`);break;case`bar`:A.push(`xterm-cursor-bar`);break;case`underline`:A.push(`xterm-cursor-underline`)}}if(N.isBold()&&A.push(`xterm-bold`),N.isItalic()&&A.push(`xterm-italic`),N.isDim()&&A.push(`xterm-dim`),C=N.isInvisible()?o.WHITESPACE_CELL_CHAR:N.getChars()||o.WHITESPACE_CELL_CHAR,N.isUnderline()&&(A.push(`xterm-underline-${N.extended.underlineStyle}`),C===` `&&(C=`\xA0`),!N.isUnderlineColorDefault()))if(N.isUnderlineColorRGB())b.style.textDecorationColor=`rgb(${p.AttributeData.toColorRGB(N.getUnderlineColor()).join(`,`)})`;else{let e=N.getUnderlineColor();this._optionsService.rawOptions.drawBoldTextInBrightColors&&N.isBold()&&e<8&&(e+=8),b.style.textDecorationColor=y.ansi[e].css}N.isOverline()&&(A.push(`xterm-overline`),C===` `&&(C=`\xA0`)),N.isStrikethrough()&&A.push(`xterm-strikethrough`),I&&(b.style.textDecoration=`underline`);let z=N.getFgColor(),B=N.getFgColorMode(),V=N.getBgColor(),H=N.getBgColorMode(),re=!!N.isInverse();if(re){let e=z;z=V,V=e;let t=B;B=H,H=t}let U,W,G,K=!1;switch(this._decorationService.forEachDecorationAtCell(j,t,void 0,(e=>{e.options.layer!==`top`&&K||(e.backgroundColorRGB&&(H=50331648,V=e.backgroundColorRGB.rgba>>8&16777215,U=e.backgroundColorRGB),e.foregroundColorRGB&&(B=50331648,z=e.foregroundColorRGB.rgba>>8&16777215,W=e.foregroundColorRGB),K=e.options.layer===`top`)})),!K&&P&&(U=this._coreBrowserService.isFocused?y.selectionBackgroundOpaque:y.selectionInactiveBackgroundOpaque,V=U.rgba>>8&16777215,H=50331648,K=!0,y.selectionForeground&&(B=50331648,z=y.selectionForeground.rgba>>8&16777215,W=y.selectionForeground)),K&&A.push(`xterm-decoration-top`),H){case 16777216:case 33554432:G=y.ansi[V],A.push(`xterm-bg-${V}`);break;case 50331648:G=l.channels.toColor(V>>16,V>>8&255,255&V),this._addStyle(b,`background-color:#${h((V>>>0).toString(16),`0`,6)}`);break;default:re?(G=y.foreground,A.push(`xterm-bg-${a.INVERTED_DEFAULT_COLOR}`)):G=y.background}switch(U||N.isDim()&&(U=l.color.multiplyOpacity(G,.5)),B){case 16777216:case 33554432:N.isBold()&&z<8&&this._optionsService.rawOptions.drawBoldTextInBrightColors&&(z+=8),this._applyMinimumContrast(b,G,y.ansi[z],N,U,void 0)||A.push(`xterm-fg-${z}`);break;case 50331648:let e=l.channels.toColor(z>>16&255,z>>8&255,255&z);this._applyMinimumContrast(b,G,e,N,U,W)||this._addStyle(b,`color:#${h(z.toString(16),`0`,6)}`);break;default:this._applyMinimumContrast(b,G,y.foreground,N,U,W)||re&&A.push(`xterm-fg-${a.INVERTED_DEFAULT_COLOR}`)}A.length&&=(b.className=A.join(` `),0),F||M||L?b.textContent=C:S++,k!==this.defaultSpacing&&(b.style.letterSpacing=`${k}px`),_.push(b),j=ne}return b&&S&&(b.textContent=C),_}_applyMinimumContrast(e,t,n,r,i,a){if(this._optionsService.rawOptions.minimumContrastRatio===1||(0,f.treatGlyphAsBackgroundColor)(r.getCode()))return!1;let o=this._getContrastCache(r),s;if(i||a||(s=o.getColor(t.rgba,n.rgba)),s===void 0){let e=this._optionsService.rawOptions.minimumContrastRatio/(r.isDim()?2:1);s=l.color.ensureContrastRatio(i||t,a||n,e),o.setColor((i||t).rgba,(a||n).rgba,s??null)}return!!s&&(this._addStyle(e,`color:${s.css}`),!0)}_getContrastCache(e){return e.isDim()?this._themeService.colors.halfContrastCache:this._themeService.colors.contrastCache}_addStyle(e,t){e.setAttribute(`style`,`${e.getAttribute(`style`)||``}${t};`)}_isCellInSelection(e,t){let n=this._selectionStart,r=this._selectionEnd;return!(!n||!r)&&(this._columnSelectMode?n[0]<=r[0]?e>=n[0]&&t>=n[1]&&e<r[0]&&t<=r[1]:e<n[0]&&t>=n[1]&&e>=r[0]&&t<=r[1]:t>n[1]&&t<r[1]||n[1]===r[1]&&t===n[1]&&e>=n[0]&&e<r[0]||n[1]<r[1]&&t===r[1]&&e<r[0]||n[1]<r[1]&&t===n[1]&&e>=n[0])}};function h(e,t,n){for(;e.length<n;)e=t+e;return e}t.DomRendererRowFactory=m=r([i(1,u.ICharacterJoinerService),i(2,c.IOptionsService),i(3,u.ICoreBrowserService),i(4,c.ICoreService),i(5,c.IDecorationService),i(6,u.IThemeService)],m)},2550:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.WidthCache=void 0,t.WidthCache=class{constructor(e,t){this._flat=new Float32Array(256),this._font=``,this._fontSize=0,this._weight=`normal`,this._weightBold=`bold`,this._measureElements=[],this._container=e.createElement(`div`),this._container.classList.add(`xterm-width-cache-measure-container`),this._container.setAttribute(`aria-hidden`,`true`),this._container.style.whiteSpace=`pre`,this._container.style.fontKerning=`none`;let n=e.createElement(`span`);n.classList.add(`xterm-char-measure-element`);let r=e.createElement(`span`);r.classList.add(`xterm-char-measure-element`),r.style.fontWeight=`bold`;let i=e.createElement(`span`);i.classList.add(`xterm-char-measure-element`),i.style.fontStyle=`italic`;let a=e.createElement(`span`);a.classList.add(`xterm-char-measure-element`),a.style.fontWeight=`bold`,a.style.fontStyle=`italic`,this._measureElements=[n,r,i,a],this._container.appendChild(n),this._container.appendChild(r),this._container.appendChild(i),this._container.appendChild(a),t.appendChild(this._container),this.clear()}dispose(){this._container.remove(),this._measureElements.length=0,this._holey=void 0}clear(){this._flat.fill(-9999),this._holey=new Map}setFont(e,t,n,r){e===this._font&&t===this._fontSize&&n===this._weight&&r===this._weightBold||(this._font=e,this._fontSize=t,this._weight=n,this._weightBold=r,this._container.style.fontFamily=this._font,this._container.style.fontSize=`${this._fontSize}px`,this._measureElements[0].style.fontWeight=`${n}`,this._measureElements[1].style.fontWeight=`${r}`,this._measureElements[2].style.fontWeight=`${n}`,this._measureElements[3].style.fontWeight=`${r}`,this.clear())}get(e,t,n){let r=0;if(!t&&!n&&e.length===1&&(r=e.charCodeAt(0))<256){if(this._flat[r]!==-9999)return this._flat[r];let t=this._measure(e,0);return t>0&&(this._flat[r]=t),t}let i=e;t&&(i+=`B`),n&&(i+=`I`);let a=this._holey.get(i);if(a===void 0){let r=0;t&&(r|=1),n&&(r|=2),a=this._measure(e,r),a>0&&this._holey.set(i,a)}return a}_measure(e,t){let n=this._measureElements[t];return n.textContent=e.repeat(32),n.offsetWidth/32}}},2223:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.TEXT_BASELINE=t.DIM_OPACITY=t.INVERTED_DEFAULT_COLOR=void 0;let r=n(6114);t.INVERTED_DEFAULT_COLOR=257,t.DIM_OPACITY=.5,t.TEXT_BASELINE=r.isFirefox||r.isLegacyEdge?`bottom`:`ideographic`},6171:(e,t)=>{function n(e){return 57508<=e&&e<=57558}function r(e){return e>=128512&&e<=128591||e>=127744&&e<=128511||e>=128640&&e<=128767||e>=9728&&e<=9983||e>=9984&&e<=10175||e>=65024&&e<=65039||e>=129280&&e<=129535||e>=127462&&e<=127487}Object.defineProperty(t,"__esModule",{value:!0}),t.computeNextVariantOffset=t.createRenderDimensions=t.treatGlyphAsBackgroundColor=t.allowRescaling=t.isEmoji=t.isRestrictedPowerlineGlyph=t.isPowerlineGlyph=t.throwIfFalsy=void 0,t.throwIfFalsy=function(e){if(!e)throw Error(`value must not be falsy`);return e},t.isPowerlineGlyph=n,t.isRestrictedPowerlineGlyph=function(e){return 57520<=e&&e<=57527},t.isEmoji=r,t.allowRescaling=function(e,t,i,a){return t===1&&i>Math.ceil(1.5*a)&&e!==void 0&&e>255&&!r(e)&&!n(e)&&!function(e){return 57344<=e&&e<=63743}(e)},t.treatGlyphAsBackgroundColor=function(e){return n(e)||function(e){return 9472<=e&&e<=9631}(e)},t.createRenderDimensions=function(){return{css:{canvas:{width:0,height:0},cell:{width:0,height:0}},device:{canvas:{width:0,height:0},cell:{width:0,height:0},char:{width:0,height:0,left:0,top:0}}}},t.computeNextVariantOffset=function(e,t,n=0){return(e-(2*Math.round(t)-n))%(2*Math.round(t))}},6052:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.createSelectionRenderModel=void 0;class n{constructor(){this.clear()}clear(){this.hasSelection=!1,this.columnSelectMode=!1,this.viewportStartRow=0,this.viewportEndRow=0,this.viewportCappedStartRow=0,this.viewportCappedEndRow=0,this.startCol=0,this.endCol=0,this.selectionStart=void 0,this.selectionEnd=void 0}update(e,t,n,r=!1){if(this.selectionStart=t,this.selectionEnd=n,!t||!n||t[0]===n[0]&&t[1]===n[1])return void this.clear();let i=e.buffers.active.ydisp,a=t[1]-i,o=n[1]-i,s=Math.max(a,0),c=Math.min(o,e.rows-1);s>=e.rows||c<0?this.clear():(this.hasSelection=!0,this.columnSelectMode=r,this.viewportStartRow=a,this.viewportEndRow=o,this.viewportCappedStartRow=s,this.viewportCappedEndRow=c,this.startCol=t[0],this.endCol=n[0])}isCellSelected(e,t,n){return!!this.hasSelection&&(n-=e.buffer.active.viewportY,this.columnSelectMode?this.startCol<=this.endCol?t>=this.startCol&&n>=this.viewportCappedStartRow&&t<this.endCol&&n<=this.viewportCappedEndRow:t<this.startCol&&n>=this.viewportCappedStartRow&&t>=this.endCol&&n<=this.viewportCappedEndRow:n>this.viewportStartRow&&n<this.viewportEndRow||this.viewportStartRow===this.viewportEndRow&&n===this.viewportStartRow&&t>=this.startCol&&t<this.endCol||this.viewportStartRow<this.viewportEndRow&&n===this.viewportEndRow&&t<this.endCol||this.viewportStartRow<this.viewportEndRow&&n===this.viewportStartRow&&t>=this.startCol)}}t.createSelectionRenderModel=function(){return new n}},456:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.SelectionModel=void 0,t.SelectionModel=class{constructor(e){this._bufferService=e,this.isSelectAllActive=!1,this.selectionStartLength=0}clearSelection(){this.selectionStart=void 0,this.selectionEnd=void 0,this.isSelectAllActive=!1,this.selectionStartLength=0}get finalSelectionStart(){return this.isSelectAllActive?[0,0]:this.selectionEnd&&this.selectionStart&&this.areSelectionValuesReversed()?this.selectionEnd:this.selectionStart}get finalSelectionEnd(){if(this.isSelectAllActive)return[this._bufferService.cols,this._bufferService.buffer.ybase+this._bufferService.rows-1];if(this.selectionStart){if(!this.selectionEnd||this.areSelectionValuesReversed()){let e=this.selectionStart[0]+this.selectionStartLength;return e>this._bufferService.cols?e%this._bufferService.cols==0?[this._bufferService.cols,this.selectionStart[1]+Math.floor(e/this._bufferService.cols)-1]:[e%this._bufferService.cols,this.selectionStart[1]+Math.floor(e/this._bufferService.cols)]:[e,this.selectionStart[1]]}if(this.selectionStartLength&&this.selectionEnd[1]===this.selectionStart[1]){let e=this.selectionStart[0]+this.selectionStartLength;return e>this._bufferService.cols?[e%this._bufferService.cols,this.selectionStart[1]+Math.floor(e/this._bufferService.cols)]:[Math.max(e,this.selectionEnd[0]),this.selectionEnd[1]]}return this.selectionEnd}}areSelectionValuesReversed(){let e=this.selectionStart,t=this.selectionEnd;return!(!e||!t)&&(e[1]>t[1]||e[1]===t[1]&&e[0]>t[0])}handleTrim(e){return this.selectionStart&&(this.selectionStart[1]-=e),this.selectionEnd&&(this.selectionEnd[1]-=e),this.selectionEnd&&this.selectionEnd[1]<0?(this.clearSelection(),!0):(this.selectionStart&&this.selectionStart[1]<0&&(this.selectionStart[1]=0),!1)}}},428:function(e,t,n){var r=this&&this.__decorate||function(e,t,n,r){var i,a=arguments.length,o=a<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,n):r;if(typeof Reflect==`object`&&typeof Reflect.decorate==`function`)o=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(o=(a<3?i(o):a>3?i(t,n,o):i(t,n))||o);return a>3&&o&&Object.defineProperty(t,n,o),o},i=this&&this.__param||function(e,t){return function(n,r){t(n,r,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.CharSizeService=void 0;let a=n(2585),o=n(8460),s=n(844),c=t.CharSizeService=class extends s.Disposable{get hasValidSize(){return this.width>0&&this.height>0}constructor(e,t,n){super(),this._optionsService=n,this.width=0,this.height=0,this._onCharSizeChange=this.register(new o.EventEmitter),this.onCharSizeChange=this._onCharSizeChange.event;try{this._measureStrategy=this.register(new d(this._optionsService))}catch{this._measureStrategy=this.register(new u(e,t,this._optionsService))}this.register(this._optionsService.onMultipleOptionChange([`fontFamily`,`fontSize`],(()=>this.measure())))}measure(){let e=this._measureStrategy.measure();e.width===this.width&&e.height===this.height||(this.width=e.width,this.height=e.height,this._onCharSizeChange.fire())}};t.CharSizeService=c=r([i(2,a.IOptionsService)],c);class l extends s.Disposable{constructor(){super(...arguments),this._result={width:0,height:0}}_validateAndSet(e,t){e!==void 0&&e>0&&t!==void 0&&t>0&&(this._result.width=e,this._result.height=t)}}class u extends l{constructor(e,t,n){super(),this._document=e,this._parentElement=t,this._optionsService=n,this._measureElement=this._document.createElement(`span`),this._measureElement.classList.add(`xterm-char-measure-element`),this._measureElement.textContent=`W`.repeat(32),this._measureElement.setAttribute(`aria-hidden`,`true`),this._measureElement.style.whiteSpace=`pre`,this._measureElement.style.fontKerning=`none`,this._parentElement.appendChild(this._measureElement)}measure(){return this._measureElement.style.fontFamily=this._optionsService.rawOptions.fontFamily,this._measureElement.style.fontSize=`${this._optionsService.rawOptions.fontSize}px`,this._validateAndSet(Number(this._measureElement.offsetWidth)/32,Number(this._measureElement.offsetHeight)),this._result}}class d extends l{constructor(e){super(),this._optionsService=e,this._canvas=new OffscreenCanvas(100,100),this._ctx=this._canvas.getContext(`2d`);let t=this._ctx.measureText(`W`);if(!(`width`in t&&`fontBoundingBoxAscent`in t&&`fontBoundingBoxDescent`in t))throw Error(`Required font metrics not supported`)}measure(){this._ctx.font=`${this._optionsService.rawOptions.fontSize}px ${this._optionsService.rawOptions.fontFamily}`;let e=this._ctx.measureText(`W`);return this._validateAndSet(e.width,e.fontBoundingBoxAscent+e.fontBoundingBoxDescent),this._result}}},4269:function(e,t,n){var r=this&&this.__decorate||function(e,t,n,r){var i,a=arguments.length,o=a<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,n):r;if(typeof Reflect==`object`&&typeof Reflect.decorate==`function`)o=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(o=(a<3?i(o):a>3?i(t,n,o):i(t,n))||o);return a>3&&o&&Object.defineProperty(t,n,o),o},i=this&&this.__param||function(e,t){return function(n,r){t(n,r,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.CharacterJoinerService=t.JoinedCellData=void 0;let a=n(3734),o=n(643),s=n(511),c=n(2585);class l extends a.AttributeData{constructor(e,t,n){super(),this.content=0,this.combinedData=``,this.fg=e.fg,this.bg=e.bg,this.combinedData=t,this._width=n}isCombined(){return 2097152}getWidth(){return this._width}getChars(){return this.combinedData}getCode(){return 2097151}setFromCharData(e){throw Error(`not implemented`)}getAsCharData(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]}}t.JoinedCellData=l;let u=t.CharacterJoinerService=class e{constructor(e){this._bufferService=e,this._characterJoiners=[],this._nextCharacterJoinerId=0,this._workCell=new s.CellData}register(e){let t={id:this._nextCharacterJoinerId++,handler:e};return this._characterJoiners.push(t),t.id}deregister(e){for(let t=0;t<this._characterJoiners.length;t++)if(this._characterJoiners[t].id===e)return this._characterJoiners.splice(t,1),!0;return!1}getJoinedCharacters(e){if(this._characterJoiners.length===0)return[];let t=this._bufferService.buffer.lines.get(e);if(!t||t.length===0)return[];let n=[],r=t.translateToString(!0),i=0,a=0,s=0,c=t.getFg(0),l=t.getBg(0);for(let e=0;e<t.getTrimmedLength();e++)if(t.loadCell(e,this._workCell),this._workCell.getWidth()!==0){if(this._workCell.fg!==c||this._workCell.bg!==l){if(e-i>1){let e=this._getJoinedRanges(r,s,a,t,i);for(let t=0;t<e.length;t++)n.push(e[t])}i=e,s=a,c=this._workCell.fg,l=this._workCell.bg}a+=this._workCell.getChars().length||o.WHITESPACE_CELL_CHAR.length}if(this._bufferService.cols-i>1){let e=this._getJoinedRanges(r,s,a,t,i);for(let t=0;t<e.length;t++)n.push(e[t])}return n}_getJoinedRanges(t,n,r,i,a){let o=t.substring(n,r),s=[];try{s=this._characterJoiners[0].handler(o)}catch(e){console.error(e)}for(let t=1;t<this._characterJoiners.length;t++)try{let n=this._characterJoiners[t].handler(o);for(let t=0;t<n.length;t++)e._mergeRanges(s,n[t])}catch(e){console.error(e)}return this._stringRangesToCellRanges(s,i,a),s}_stringRangesToCellRanges(e,t,n){let r=0,i=!1,a=0,s=e[r];if(s){for(let c=n;c<this._bufferService.cols;c++){let n=t.getWidth(c),l=t.getString(c).length||o.WHITESPACE_CELL_CHAR.length;if(n!==0){if(!i&&s[0]<=a&&(s[0]=c,i=!0),s[1]<=a){if(s[1]=c,s=e[++r],!s)break;s[0]<=a?(s[0]=c,i=!0):i=!1}a+=l}}s&&(s[1]=this._bufferService.cols)}}static _mergeRanges(e,t){let n=!1;for(let r=0;r<e.length;r++){let i=e[r];if(n){if(t[1]<=i[0])return e[r-1][1]=t[1],e;if(t[1]<=i[1])return e[r-1][1]=Math.max(t[1],i[1]),e.splice(r,1),e;e.splice(r,1),r--}else{if(t[1]<=i[0])return e.splice(r,0,t),e;if(t[1]<=i[1])return i[0]=Math.min(t[0],i[0]),e;t[0]<i[1]&&(i[0]=Math.min(t[0],i[0]),n=!0)}}return n?e[e.length-1][1]=t[1]:e.push(t),e}};t.CharacterJoinerService=u=r([i(0,c.IBufferService)],u)},5114:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.CoreBrowserService=void 0;let r=n(844),i=n(8460),a=n(3656);class o extends r.Disposable{constructor(e,t,n){super(),this._textarea=e,this._window=t,this.mainDocument=n,this._isFocused=!1,this._cachedIsFocused=void 0,this._screenDprMonitor=new s(this._window),this._onDprChange=this.register(new i.EventEmitter),this.onDprChange=this._onDprChange.event,this._onWindowChange=this.register(new i.EventEmitter),this.onWindowChange=this._onWindowChange.event,this.register(this.onWindowChange((e=>this._screenDprMonitor.setWindow(e)))),this.register((0,i.forwardEvent)(this._screenDprMonitor.onDprChange,this._onDprChange)),this._textarea.addEventListener(`focus`,(()=>this._isFocused=!0)),this._textarea.addEventListener(`blur`,(()=>this._isFocused=!1))}get window(){return this._window}set window(e){this._window!==e&&(this._window=e,this._onWindowChange.fire(this._window))}get dpr(){return this.window.devicePixelRatio}get isFocused(){return this._cachedIsFocused===void 0&&(this._cachedIsFocused=this._isFocused&&this._textarea.ownerDocument.hasFocus(),queueMicrotask((()=>this._cachedIsFocused=void 0))),this._cachedIsFocused}}t.CoreBrowserService=o;class s extends r.Disposable{constructor(e){super(),this._parentWindow=e,this._windowResizeListener=this.register(new r.MutableDisposable),this._onDprChange=this.register(new i.EventEmitter),this.onDprChange=this._onDprChange.event,this._outerListener=()=>this._setDprAndFireIfDiffers(),this._currentDevicePixelRatio=this._parentWindow.devicePixelRatio,this._updateDpr(),this._setWindowResizeListener(),this.register((0,r.toDisposable)((()=>this.clearListener())))}setWindow(e){this._parentWindow=e,this._setWindowResizeListener(),this._setDprAndFireIfDiffers()}_setWindowResizeListener(){this._windowResizeListener.value=(0,a.addDisposableDomListener)(this._parentWindow,`resize`,(()=>this._setDprAndFireIfDiffers()))}_setDprAndFireIfDiffers(){this._parentWindow.devicePixelRatio!==this._currentDevicePixelRatio&&this._onDprChange.fire(this._parentWindow.devicePixelRatio),this._updateDpr()}_updateDpr(){this._outerListener&&(this._resolutionMediaMatchList?.removeListener(this._outerListener),this._currentDevicePixelRatio=this._parentWindow.devicePixelRatio,this._resolutionMediaMatchList=this._parentWindow.matchMedia(`screen and (resolution: ${this._parentWindow.devicePixelRatio}dppx)`),this._resolutionMediaMatchList.addListener(this._outerListener))}clearListener(){this._resolutionMediaMatchList&&this._outerListener&&(this._resolutionMediaMatchList.removeListener(this._outerListener),this._resolutionMediaMatchList=void 0,this._outerListener=void 0)}}},779:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.LinkProviderService=void 0;let r=n(844);class i extends r.Disposable{constructor(){super(),this.linkProviders=[],this.register((0,r.toDisposable)((()=>this.linkProviders.length=0)))}registerLinkProvider(e){return this.linkProviders.push(e),{dispose:()=>{let t=this.linkProviders.indexOf(e);t!==-1&&this.linkProviders.splice(t,1)}}}}t.LinkProviderService=i},8934:function(e,t,n){var r=this&&this.__decorate||function(e,t,n,r){var i,a=arguments.length,o=a<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,n):r;if(typeof Reflect==`object`&&typeof Reflect.decorate==`function`)o=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(o=(a<3?i(o):a>3?i(t,n,o):i(t,n))||o);return a>3&&o&&Object.defineProperty(t,n,o),o},i=this&&this.__param||function(e,t){return function(n,r){t(n,r,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.MouseService=void 0;let a=n(4725),o=n(9806),s=t.MouseService=class{constructor(e,t){this._renderService=e,this._charSizeService=t}getCoords(e,t,n,r,i){return(0,o.getCoords)(window,e,t,n,r,this._charSizeService.hasValidSize,this._renderService.dimensions.css.cell.width,this._renderService.dimensions.css.cell.height,i)}getMouseReportCoords(e,t){let n=(0,o.getCoordsRelativeToElement)(window,e,t);if(this._charSizeService.hasValidSize)return n[0]=Math.min(Math.max(n[0],0),this._renderService.dimensions.css.canvas.width-1),n[1]=Math.min(Math.max(n[1],0),this._renderService.dimensions.css.canvas.height-1),{col:Math.floor(n[0]/this._renderService.dimensions.css.cell.width),row:Math.floor(n[1]/this._renderService.dimensions.css.cell.height),x:Math.floor(n[0]),y:Math.floor(n[1])}}};t.MouseService=s=r([i(0,a.IRenderService),i(1,a.ICharSizeService)],s)},3230:function(e,t,n){var r=this&&this.__decorate||function(e,t,n,r){var i,a=arguments.length,o=a<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,n):r;if(typeof Reflect==`object`&&typeof Reflect.decorate==`function`)o=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(o=(a<3?i(o):a>3?i(t,n,o):i(t,n))||o);return a>3&&o&&Object.defineProperty(t,n,o),o},i=this&&this.__param||function(e,t){return function(n,r){t(n,r,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.RenderService=void 0;let a=n(6193),o=n(4725),s=n(8460),c=n(844),l=n(7226),u=n(2585),d=t.RenderService=class extends c.Disposable{get dimensions(){return this._renderer.value.dimensions}constructor(e,t,n,r,i,o,u,d){super(),this._rowCount=e,this._charSizeService=r,this._renderer=this.register(new c.MutableDisposable),this._pausedResizeTask=new l.DebouncedIdleTask,this._observerDisposable=this.register(new c.MutableDisposable),this._isPaused=!1,this._needsFullRefresh=!1,this._isNextRenderRedrawOnly=!0,this._needsSelectionRefresh=!1,this._canvasWidth=0,this._canvasHeight=0,this._selectionState={start:void 0,end:void 0,columnSelectMode:!1},this._onDimensionsChange=this.register(new s.EventEmitter),this.onDimensionsChange=this._onDimensionsChange.event,this._onRenderedViewportChange=this.register(new s.EventEmitter),this.onRenderedViewportChange=this._onRenderedViewportChange.event,this._onRender=this.register(new s.EventEmitter),this.onRender=this._onRender.event,this._onRefreshRequest=this.register(new s.EventEmitter),this.onRefreshRequest=this._onRefreshRequest.event,this._renderDebouncer=new a.RenderDebouncer(((e,t)=>this._renderRows(e,t)),u),this.register(this._renderDebouncer),this.register(u.onDprChange((()=>this.handleDevicePixelRatioChange()))),this.register(o.onResize((()=>this._fullRefresh()))),this.register(o.buffers.onBufferActivate((()=>this._renderer.value?.clear()))),this.register(n.onOptionChange((()=>this._handleOptionsChanged()))),this.register(this._charSizeService.onCharSizeChange((()=>this.handleCharSizeChanged()))),this.register(i.onDecorationRegistered((()=>this._fullRefresh()))),this.register(i.onDecorationRemoved((()=>this._fullRefresh()))),this.register(n.onMultipleOptionChange([`customGlyphs`,`drawBoldTextInBrightColors`,`letterSpacing`,`lineHeight`,`fontFamily`,`fontSize`,`fontWeight`,`fontWeightBold`,`minimumContrastRatio`,`rescaleOverlappingGlyphs`],(()=>{this.clear(),this.handleResize(o.cols,o.rows),this._fullRefresh()}))),this.register(n.onMultipleOptionChange([`cursorBlink`,`cursorStyle`],(()=>this.refreshRows(o.buffer.y,o.buffer.y,!0)))),this.register(d.onChangeColors((()=>this._fullRefresh()))),this._registerIntersectionObserver(u.window,t),this.register(u.onWindowChange((e=>this._registerIntersectionObserver(e,t))))}_registerIntersectionObserver(e,t){if(`IntersectionObserver`in e){let n=new e.IntersectionObserver((e=>this._handleIntersectionChange(e[e.length-1])),{threshold:0});n.observe(t),this._observerDisposable.value=(0,c.toDisposable)((()=>n.disconnect()))}}_handleIntersectionChange(e){this._isPaused=e.isIntersecting===void 0?e.intersectionRatio===0:!e.isIntersecting,this._isPaused||this._charSizeService.hasValidSize||this._charSizeService.measure(),!this._isPaused&&this._needsFullRefresh&&(this._pausedResizeTask.flush(),this.refreshRows(0,this._rowCount-1),this._needsFullRefresh=!1)}refreshRows(e,t,n=!1){this._isPaused?this._needsFullRefresh=!0:(n||(this._isNextRenderRedrawOnly=!1),this._renderDebouncer.refresh(e,t,this._rowCount))}_renderRows(e,t){this._renderer.value&&(e=Math.min(e,this._rowCount-1),t=Math.min(t,this._rowCount-1),this._renderer.value.renderRows(e,t),this._needsSelectionRefresh&&=(this._renderer.value.handleSelectionChanged(this._selectionState.start,this._selectionState.end,this._selectionState.columnSelectMode),!1),this._isNextRenderRedrawOnly||this._onRenderedViewportChange.fire({start:e,end:t}),this._onRender.fire({start:e,end:t}),this._isNextRenderRedrawOnly=!0)}resize(e,t){this._rowCount=t,this._fireOnCanvasResize()}_handleOptionsChanged(){this._renderer.value&&(this.refreshRows(0,this._rowCount-1),this._fireOnCanvasResize())}_fireOnCanvasResize(){this._renderer.value&&(this._renderer.value.dimensions.css.canvas.width===this._canvasWidth&&this._renderer.value.dimensions.css.canvas.height===this._canvasHeight||this._onDimensionsChange.fire(this._renderer.value.dimensions))}hasRenderer(){return!!this._renderer.value}setRenderer(e){this._renderer.value=e,this._renderer.value&&(this._renderer.value.onRequestRedraw((e=>this.refreshRows(e.start,e.end,!0))),this._needsSelectionRefresh=!0,this._fullRefresh())}addRefreshCallback(e){return this._renderDebouncer.addRefreshCallback(e)}_fullRefresh(){this._isPaused?this._needsFullRefresh=!0:this.refreshRows(0,this._rowCount-1)}clearTextureAtlas(){this._renderer.value&&(this._renderer.value.clearTextureAtlas?.(),this._fullRefresh())}handleDevicePixelRatioChange(){this._charSizeService.measure(),this._renderer.value&&(this._renderer.value.handleDevicePixelRatioChange(),this.refreshRows(0,this._rowCount-1))}handleResize(e,t){this._renderer.value&&(this._isPaused?this._pausedResizeTask.set((()=>this._renderer.value?.handleResize(e,t))):this._renderer.value.handleResize(e,t),this._fullRefresh())}handleCharSizeChanged(){this._renderer.value?.handleCharSizeChanged()}handleBlur(){this._renderer.value?.handleBlur()}handleFocus(){this._renderer.value?.handleFocus()}handleSelectionChanged(e,t,n){this._selectionState.start=e,this._selectionState.end=t,this._selectionState.columnSelectMode=n,this._renderer.value?.handleSelectionChanged(e,t,n)}handleCursorMove(){this._renderer.value?.handleCursorMove()}clear(){this._renderer.value?.clear()}};t.RenderService=d=r([i(2,u.IOptionsService),i(3,o.ICharSizeService),i(4,u.IDecorationService),i(5,u.IBufferService),i(6,o.ICoreBrowserService),i(7,o.IThemeService)],d)},9312:function(e,t,n){var r=this&&this.__decorate||function(e,t,n,r){var i,a=arguments.length,o=a<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,n):r;if(typeof Reflect==`object`&&typeof Reflect.decorate==`function`)o=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(o=(a<3?i(o):a>3?i(t,n,o):i(t,n))||o);return a>3&&o&&Object.defineProperty(t,n,o),o},i=this&&this.__param||function(e,t){return function(n,r){t(n,r,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.SelectionService=void 0;let a=n(9806),o=n(9504),s=n(456),c=n(4725),l=n(8460),u=n(844),d=n(6114),f=n(4841),p=n(511),m=n(2585),h=RegExp(`\xA0`,`g`),g=t.SelectionService=class extends u.Disposable{constructor(e,t,n,r,i,a,o,c,d){super(),this._element=e,this._screenElement=t,this._linkifier=n,this._bufferService=r,this._coreService=i,this._mouseService=a,this._optionsService=o,this._renderService=c,this._coreBrowserService=d,this._dragScrollAmount=0,this._enabled=!0,this._workCell=new p.CellData,this._mouseDownTimeStamp=0,this._oldHasSelection=!1,this._oldSelectionStart=void 0,this._oldSelectionEnd=void 0,this._onLinuxMouseSelection=this.register(new l.EventEmitter),this.onLinuxMouseSelection=this._onLinuxMouseSelection.event,this._onRedrawRequest=this.register(new l.EventEmitter),this.onRequestRedraw=this._onRedrawRequest.event,this._onSelectionChange=this.register(new l.EventEmitter),this.onSelectionChange=this._onSelectionChange.event,this._onRequestScrollLines=this.register(new l.EventEmitter),this.onRequestScrollLines=this._onRequestScrollLines.event,this._mouseMoveListener=e=>this._handleMouseMove(e),this._mouseUpListener=e=>this._handleMouseUp(e),this._coreService.onUserInput((()=>{this.hasSelection&&this.clearSelection()})),this._trimListener=this._bufferService.buffer.lines.onTrim((e=>this._handleTrim(e))),this.register(this._bufferService.buffers.onBufferActivate((e=>this._handleBufferActivate(e)))),this.enable(),this._model=new s.SelectionModel(this._bufferService),this._activeSelectionMode=0,this.register((0,u.toDisposable)((()=>{this._removeMouseDownListeners()})))}reset(){this.clearSelection()}disable(){this.clearSelection(),this._enabled=!1}enable(){this._enabled=!0}get selectionStart(){return this._model.finalSelectionStart}get selectionEnd(){return this._model.finalSelectionEnd}get hasSelection(){let e=this._model.finalSelectionStart,t=this._model.finalSelectionEnd;return!(!e||!t||e[0]===t[0]&&e[1]===t[1])}get selectionText(){let e=this._model.finalSelectionStart,t=this._model.finalSelectionEnd;if(!e||!t)return``;let n=this._bufferService.buffer,r=[];if(this._activeSelectionMode===3){if(e[0]===t[0])return``;let i=e[0]<t[0]?e[0]:t[0],a=e[0]<t[0]?t[0]:e[0];for(let o=e[1];o<=t[1];o++){let e=n.translateBufferLineToString(o,!0,i,a);r.push(e)}}else{let i=e[1]===t[1]?t[0]:void 0;r.push(n.translateBufferLineToString(e[1],!0,e[0],i));for(let i=e[1]+1;i<=t[1]-1;i++){let e=n.lines.get(i),t=n.translateBufferLineToString(i,!0);e?.isWrapped?r[r.length-1]+=t:r.push(t)}if(e[1]!==t[1]){let e=n.lines.get(t[1]),i=n.translateBufferLineToString(t[1],!0,0,t[0]);e&&e.isWrapped?r[r.length-1]+=i:r.push(i)}}return r.map((e=>e.replace(h,` `))).join(d.isWindows?`\r
|
|
4
4
|
`:`
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./virtual_mf-REMOTE_ENTRY_ID___mfe_internal__admin_ui_host__remoteEntry-_hash_-
|
|
1
|
+
import"./virtual_mf-REMOTE_ENTRY_ID___mfe_internal__admin_ui_host__remoteEntry-_hash_-n8H5TlEC.js";import{t as e}from"./vite-preload-helper-kNaey6uv.js";var t={"@camstack/sdk":async()=>await e(()=>import(`./dist-D1Haydhz.js`),[],import.meta.url),"@camstack/types":async()=>await e(()=>import(`./dist-BN-a8jMo.js`),[],import.meta.url),"@camstack/ui-library":async()=>await e(()=>import(`./src-BJmgjR4B.js`).then(e=>e.n),[],import.meta.url),"@tanstack/react-query":async()=>await e(()=>import(`./_virtual_mf___mfe_internal__admin_ui_host__loadShare___mf_0_tanstack_mf_1_react_mf_2_query__loadShare__.js-DhP-Lgiq.js`).then(e=>e.y),[],import.meta.url),"@trpc/client":async()=>await e(()=>import(`./_virtual_mf___mfe_internal__admin_ui_host__loadShare___mf_0_trpc_mf_1_client__loadShare__.js-8kv6pj9W.js`).then(e=>e.A),[],import.meta.url),"@trpc/react-query":async()=>await e(()=>import(`./_virtual_mf___mfe_internal__admin_ui_host__loadShare___mf_0_trpc_mf_1_react_mf_2_query__loadShare__.js-DX7sYWrs.js`).then(e=>e.i),[],import.meta.url),konva:async()=>await e(()=>import(`./_virtual_mf___mfe_internal__admin_ui_host__loadShare__konva__loadShare__.js-B7XYY0cV.js`).then(e=>e.n),[],import.meta.url),react:async()=>await e(()=>import(`./_virtual_mf___mfe_internal__admin_ui_host__loadShare___mf_0_tanstack_mf_1_react_mf_2_query__loadShare__.js-DhP-Lgiq.js`).then(e=>(e.et(),e.$)),[],import.meta.url),"react-dom":async()=>await e(()=>import(`./_virtual_mf___mfe_internal__admin_ui_host__loadShare__react_mf_2_dom__loadShare__.js-BsvPG3BX.js`).then(e=>(e.a(),e.i)),[],import.meta.url),"react-dom/client":async()=>await e(()=>import(`./_virtual_mf___mfe_internal__admin_ui_host__loadShare__react_mf_2_dom_mf_1_client__loadShare__.js-DtoGixA1.js`).then(e=>e.r),[],import.meta.url),"react-konva":async()=>await e(()=>import(`./_virtual_mf___mfe_internal__admin_ui_host__loadShare__react_mf_2_konva__loadShare__.js-PmiLsYEK.js`).then(e=>e.u),[],import.meta.url),"react/jsx-runtime":async()=>await e(()=>import(`./_virtual_mf___mfe_internal__admin_ui_host__loadShare___mf_0_tanstack_mf_1_react_mf_2_query__loadShare__.js-DhP-Lgiq.js`).then(e=>e.w),[],import.meta.url)},n={"@camstack/sdk":{name:`@camstack/sdk`,version:`1.2.89`,scope:[`default`],loaded:!1,from:`admin_ui_host`,async get(){n[`@camstack/sdk`].loaded=!0;let{"@camstack/sdk":e}=t,r={...await e()};return Object.defineProperty(r,"__esModule",{value:!0,enumerable:!1}),function(){return r}},shareConfig:{singleton:!0,requiredVersion:`^1.2.89`}},"@camstack/types":{name:`@camstack/types`,version:`1.2.169`,scope:[`default`],loaded:!1,from:`admin_ui_host`,async get(){n[`@camstack/types`].loaded=!0;let{"@camstack/types":e}=t,r={...await e()};return Object.defineProperty(r,"__esModule",{value:!0,enumerable:!1}),function(){return r}},shareConfig:{singleton:!0,requiredVersion:`^1.2.169`}},"@camstack/ui-library":{name:`@camstack/ui-library`,version:`1.2.137`,scope:[`default`],loaded:!1,from:`admin_ui_host`,async get(){n[`@camstack/ui-library`].loaded=!0;let{"@camstack/ui-library":e}=t,r={...await e()};return Object.defineProperty(r,"__esModule",{value:!0,enumerable:!1}),function(){return r}},shareConfig:{singleton:!0,requiredVersion:`^1.2.137`}},"@tanstack/react-query":{name:`@tanstack/react-query`,version:`5.101.0`,scope:[`default`],loaded:!1,from:`admin_ui_host`,async get(){n[`@tanstack/react-query`].loaded=!0;let{"@tanstack/react-query":e}=t,r={...await e()};return Object.defineProperty(r,"__esModule",{value:!0,enumerable:!1}),function(){return r}},shareConfig:{singleton:!0,requiredVersion:`^5.101.0`}},"@trpc/client":{name:`@trpc/client`,version:`11.18.0`,scope:[`default`],loaded:!1,from:`admin_ui_host`,async get(){n[`@trpc/client`].loaded=!0;let{"@trpc/client":e}=t,r={...await e()};return Object.defineProperty(r,"__esModule",{value:!0,enumerable:!1}),function(){return r}},shareConfig:{singleton:!0,requiredVersion:`^11.18.0`}},"@trpc/react-query":{name:`@trpc/react-query`,version:`11.18.0`,scope:[`default`],loaded:!1,from:`admin_ui_host`,async get(){n[`@trpc/react-query`].loaded=!0;let{"@trpc/react-query":e}=t,r={...await e()};return Object.defineProperty(r,"__esModule",{value:!0,enumerable:!1}),function(){return r}},shareConfig:{singleton:!0,requiredVersion:`^11.18.0`}},konva:{name:`konva`,version:`10.3.0`,scope:[`default`],loaded:!1,from:`admin_ui_host`,async get(){n.konva.loaded=!0;let{konva:e}=t,r={...await e()};return Object.defineProperty(r,"__esModule",{value:!0,enumerable:!1}),function(){return r}},shareConfig:{singleton:!0,requiredVersion:`^10.3.0`}},react:{name:`react`,version:`19.2.7`,scope:[`default`],loaded:!1,from:`admin_ui_host`,async get(){n.react.loaded=!0;let{react:e}=t,r={...await e()};return Object.defineProperty(r,"__esModule",{value:!0,enumerable:!1}),function(){return r}},shareConfig:{singleton:!0,requiredVersion:`^19.2.7`}},"react-dom":{name:`react-dom`,version:`19.2.7`,scope:[`default`],loaded:!1,from:`admin_ui_host`,async get(){n[`react-dom`].loaded=!0;let{"react-dom":e}=t,r={...await e()};return Object.defineProperty(r,"__esModule",{value:!0,enumerable:!1}),function(){return r}},shareConfig:{singleton:!0,requiredVersion:`^19.2.7`}},"react-dom/client":{name:`react-dom/client`,version:`19.2.7`,scope:[`default`],loaded:!1,from:`admin_ui_host`,async get(){n[`react-dom/client`].loaded=!0;let{"react-dom/client":e}=t,r={...await e()};return Object.defineProperty(r,"__esModule",{value:!0,enumerable:!1}),function(){return r}},shareConfig:{singleton:!0,requiredVersion:`^19.2.7`}},"react-konva":{name:`react-konva`,version:`19.2.5`,scope:[`default`],loaded:!1,from:`admin_ui_host`,async get(){n[`react-konva`].loaded=!0;let{"react-konva":e}=t,r={...await e()};return Object.defineProperty(r,"__esModule",{value:!0,enumerable:!1}),function(){return r}},shareConfig:{singleton:!0,requiredVersion:`^19.2.5`}},"react/jsx-runtime":{name:`react/jsx-runtime`,version:`19.2.7`,scope:[`default`],loaded:!1,from:`admin_ui_host`,async get(){n[`react/jsx-runtime`].loaded=!0;let{"react/jsx-runtime":e}=t,r={...await e()};return Object.defineProperty(r,"__esModule",{value:!0,enumerable:!1}),function(){return r}},shareConfig:{singleton:!0,requiredVersion:`^19.2.7`}}},r=[];export{r as usedRemotes,n as usedShared};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{Q as e,q as t,z as n}from"./_virtual_mf___mfe_internal__admin_ui_host__loadShare___mf_0_tanstack_mf_1_react_mf_2_query__loadShare__.js-DhP-Lgiq.js";import{Z as r}from"./player-overlays-
|
|
1
|
+
import{Q as e,q as t,z as n}from"./_virtual_mf___mfe_internal__admin_ui_host__loadShare___mf_0_tanstack_mf_1_react_mf_2_query__loadShare__.js-DhP-Lgiq.js";import{Z as r}from"./player-overlays-CxkGdXT-.js";import"./index-CWmgzFYA.js";e();var i=`/addon/pipeline-analytics/event-media`,a=r(i),o=`camstack_admin_token`;async function s(e){let t=localStorage.getItem(o),n={};t&&(n.Authorization=`Bearer ${t}`);let r=await fetch(e,{headers:n});if(!r.ok)throw Error(`media fetch failed: ${String(r.status)}`);return r.blob()}function c(e){if(e===null)return null;let t=/filename\*=UTF-8''([^;]+)/i.exec(e);if(t?.[1]!==void 0)try{return decodeURIComponent(t[1].trim())}catch{}return/filename="?([^";]+)"?/i.exec(e)?.[1]?.trim()??null}var l=6e4;async function u(e,t){let n=localStorage.getItem(o),r={};n&&(r.Authorization=`Bearer ${n}`);let i=await fetch(e,{headers:r});if(!i.ok)throw Error(`download failed: ${String(i.status)}`);let a=await i.blob(),s=c(i.headers.get(`content-disposition`))??t,u=URL.createObjectURL(a),d=document.createElement(`a`);d.href=u,d.download=s,d.click(),setTimeout(()=>{URL.revokeObjectURL(u)},l)}function d(e){let[r,i]=t(null),[a,o]=t(!1);return n(()=>{if(i(null),o(!1),!e)return;let t=!1,n=null;return(async()=>{try{let r=await s(e);if(t)return;n=URL.createObjectURL(r),i(n)}catch{t||o(!0)}})(),()=>{t=!0,n&&URL.revokeObjectURL(n)}},[e]),{src:r,failed:a}}export{d as a,s as i,i as n,u as r,a as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{J as e}from"./index-
|
|
1
|
+
import{J as e}from"./index-CWmgzFYA.js";var t=e(`bell-off`,[[`path`,{d:`M10.268 21a2 2 0 0 0 3.464 0`,key:`vwvbt9`}],[`path`,{d:`M17 17H4a1 1 0 0 1-.74-1.673C4.59 13.956 6 12.499 6 8a6 6 0 0 1 .258-1.742`,key:`178tsu`}],[`path`,{d:`m2 2 20 20`,key:`1ooewy`}],[`path`,{d:`M8.668 3.01A6 6 0 0 1 18 8c0 2.687.77 4.653 1.707 6.05`,key:`1hqiys`}]]);export{t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{J as e}from"./index-
|
|
1
|
+
import{J as e}from"./index-CWmgzFYA.js";var t=e(`bell-ring`,[[`path`,{d:`M10.268 21a2 2 0 0 0 3.464 0`,key:`vwvbt9`}],[`path`,{d:`M22 8c0-2.3-.8-4.3-2-6`,key:`5bb3ad`}],[`path`,{d:`M3.262 15.326A1 1 0 0 0 4 17h16a1 1 0 0 0 .74-1.673C19.41 13.956 18 12.499 18 8A6 6 0 0 0 6 8c0 4.499-1.411 5.956-2.738 7.326`,key:`11g9vi`}],[`path`,{d:`M4 2C2.8 3.7 2 5.7 2 8`,key:`tap9e0`}]]);export{t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{J as e}from"./index-
|
|
1
|
+
import{J as e}from"./index-CWmgzFYA.js";var t=e(`boxes`,[[`path`,{d:`M2.97 12.92A2 2 0 0 0 2 14.63v3.24a2 2 0 0 0 .97 1.71l3 1.8a2 2 0 0 0 2.06 0L12 19v-5.5l-5-3-4.03 2.42Z`,key:`lc1i9w`}],[`path`,{d:`m7 16.5-4.74-2.85`,key:`1o9zyk`}],[`path`,{d:`m7 16.5 5-3`,key:`va8pkn`}],[`path`,{d:`M7 16.5v5.17`,key:`jnp8gn`}],[`path`,{d:`M12 13.5V19l3.97 2.38a2 2 0 0 0 2.06 0l3-1.8a2 2 0 0 0 .97-1.71v-3.24a2 2 0 0 0-.97-1.71L17 10.5l-5 3Z`,key:`8zsnat`}],[`path`,{d:`m17 16.5-5-3`,key:`8arw3v`}],[`path`,{d:`m17 16.5 4.74-2.85`,key:`8rfmw`}],[`path`,{d:`M17 16.5v5.17`,key:`k6z78m`}],[`path`,{d:`M7.97 4.42A2 2 0 0 0 7 6.13v4.37l5 3 5-3V6.13a2 2 0 0 0-.97-1.71l-3-1.8a2 2 0 0 0-2.06 0l-3 1.8Z`,key:`1xygjf`}],[`path`,{d:`M12 8 7.26 5.15`,key:`1vbdud`}],[`path`,{d:`m12 8 4.74-2.85`,key:`3rx089`}],[`path`,{d:`M12 13.5V8`,key:`1io7kd`}]]);export{t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{J as e}from"./index-CWmgzFYA.js";var t=e(`circle-check-big`,[[`path`,{d:`M21.801 10A10 10 0 1 1 17 3.335`,key:`yps3ct`}],[`path`,{d:`m9 11 3 3L22 4`,key:`1pflzl`}]]);export{t};
|