1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9567],{79567:(e,a,n)=>{n.r(a),n.d(a,{default:()=>u});var t=n(62050),o=n(26541);let s=(0,o.createServerReference)("7f94c68225a3d74418c82222d0dd08a5a54f65d9bf",o.callServer,void 0,o.findSourceMapURL,"setPerspectiveCookie");var r=n(3311),i=n(7620),l=n(3803),c=n(27745);let d={"handshake/syn":t.Tx,"handshake/syn-ack":t.Rr,"handshake/ack":t.IM,"channel/response":t._K,"channel/heartbeat":t.vd,"channel/disconnect":t.FS,"overlay/focus":"visual-editing/focus","overlay/navigate":"visual-editing/navigate","overlay/toggle":"visual-editing/toggle","presentation/toggleOverlay":"presentation/toggle-overlay"},v={[t.Tx]:"handshake/syn",[t.Rr]:"handshake/syn-ack",[t.IM]:"handshake/ack",[t._K]:"channel/response",[t.vd]:"channel/heartbeat",[t.FS]:"channel/disconnect","visual-editing/focus":"overlay/focus","visual-editing/navigate":"overlay/navigate","visual-editing/toggle":"overlay/toggle","presentation/toggle-overlay":"presentation/toggleOverlay"},p=e=>{let{data:a}=e;return a&&"object"==typeof a&&"domain"in a&&"type"in a&&"from"in a&&"to"in a&&("sanity/channels"===a.domain&&(a.domain=t.V2),"overlays"===a.to&&(a.to="visual-editing"),"overlays"===a.from&&(a.from="visual-editing"),a.type=d[a.type]??a.type),e},h=e=>(e.domain===t.V2&&(e.domain="sanity/channels"),"visual-editing"===e.to&&(e.to="overlays"),"visual-editing"===e.from&&(e.from="overlays"),e.type=v[e.type]??e.type,"channel/response"===e.type&&e.responseTo&&!e.data&&(e.data={responseTo:e.responseTo}),("handshake/syn"===e.type||"handshake/syn-ack"===e.type||"handshake/ack"===e.type)&&(e.data={id:e.connectionId}),e),y=({context:e},a)=>{let{sources:n,targetOrigin:t}=e,o=h(a.message);n.forEach(e=>{e.postMessage(o,{targetOrigin:t})})},g=()=>({listen:(0,t.CC)(p),requestMachine:(0,t.tP)().provide({actions:{"send message":y}})});function u(e){let{draftModeEnabled:a,draftModePerspective:n}=e,o=(0,r.useRouter)(),d=(0,l.J)((e,t)=>{a&&e!==n&&s(e).then(()=>{t.aborted||o.refresh()}).catch(e=>console.error("Failed to set the preview perspective cookie",e))});return(0,i.useEffect)(()=>{let e;let a=(0,t.RM)({name:"loaders",connectTo:"presentation"},(0,t.Uc)().provide({actors:g()}));a.on("loader/perspective",a=>{e?.abort(),e=new AbortController,d(a.perspective,e.signal)});let n=a.start();return(0,c.El)(a),()=>{n()}},[d]),null}u.displayName="PresentationComlink"}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.