Socket
Socket
Sign inDemoInstall

@sanity/presentation

Package Overview
Dependencies
12
Maintainers
45
Versions
128
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.11.5 to 1.11.6

24

dist/_chunks/PresentationTool.js

@@ -1,4 +0,4 @@

var e=Object.defineProperty,t=(t,n,i)=>(((t,n,i)=>{n in t?e(t,n,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[n]=i})(t,"symbol"!=typeof n?n+"":n,i),i);import{jsx as n,jsxs as i,Fragment as r}from"react/jsx-runtime";import{studioPath as o}from"@sanity/client/csm";import{Card as a,Flex as s,Container as l,Stack as c,Text as d,Inline as u,Box as p,Button as h,Code as f,Label as m,ErrorBoundary as v,TextInput as g,MenuItem as y,useToast as w,Switch as b,usePrefersReducedMotion as x,TooltipDelayGroupProvider as k,Tooltip as E,MenuButton as P,Menu as S,Spinner as I,BoundaryElementProvider as C}from"@sanity/ui";import{useContext as z,forwardRef as D,useCallback as O,useMemo as R,useState as $,useEffect as L,createContext as j,useLayoutEffect as T,useRef as U,memo as A,createElement as _,startTransition as W,useReducer as M,Suspense as N,lazy as F}from"react";import{useUnique as V,getPublishedId as B,useActiveWorkspace as K,useClient as q,useCurrentUser as G,Hotkeys as J,useProjectId as H,useDataset as X,useWorkspace as Z}from"sanity";import{StateLink as Q,useRouter as Y,decodeJsonParams as ee}from"sanity/router";import{PaneRouterContext as te,PaneLayout as ne,StructureToolProvider as ie,DocumentListPane as re,useStructureTool as oe,DocumentPane as ae,CommentsIntentProvider as se}from"sanity/structure";import le from"styled-components";import{P as ce,a as de,b as ue,A as pe,M as he,c as fe,C as me,E as ve,D as ge}from"./index.js";import{D as ye}from"./DisplayedDocumentBroadcaster.js";import{ResetIcon as we,LaunchIcon as be,CopyIcon as xe,PanelLeftIcon as ke,RefreshIcon as Ee,ShareIcon as Pe,ChevronDownIcon as Se,CheckmarkIcon as Ie,DesktopIcon as Ce,MobileDeviceIcon as ze,EditIcon as De,PublishIcon as Oe}from"@sanity/icons";import{hasSecretSearchParams as Re,setSecretSearchParams as $e,withoutSecretSearchParams as Le}from"@sanity/preview-url-secret/without-secret-search-params";import{motion as je,MotionConfig as Te,AnimatePresence as Ue}from"framer-motion";import{createPreviewSecret as Ae}from"@sanity/preview-url-secret/create-secret";import _e from"fast-deep-equal";import{definePreviewUrl as We}from"@sanity/preview-url-secret/define-preview-url";import{suspend as Me}from"suspend-react";let Ne;const Fe=new Uint8Array(16);function Ve(){if(!Ne&&(Ne=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!Ne))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Ne(Fe)}const Be=[];for(let e=0;e<256;++e)Be.push((e+256).toString(16).slice(1));var Ke={randomUUID:typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};function qe(e,t,n){if(Ke.randomUUID&&!t&&!e)return Ke.randomUUID();const i=(e=e||{}).random||(e.rng||Ve)();if(i[6]=15&i[6]|64,i[8]=63&i[8]|128,t){n=n||0;for(let e=0;e<16;++e)t[n+e]=i[e];return t}return function(e,t=0){return Be[e[t+0]]+Be[e[t+1]]+Be[e[t+2]]+Be[e[t+3]]+"-"+Be[e[t+4]]+Be[e[t+5]]+"-"+Be[e[t+6]]+Be[e[t+7]]+"-"+Be[e[t+8]]+Be[e[t+9]]+"-"+Be[e[t+10]]+Be[e[t+11]]+Be[e[t+12]]+Be[e[t+13]]+Be[e[t+14]]+Be[e[t+15]]}(i)}const Ge=1e3,Je=1e3,He=500,Xe=["handshake/syn","handshake/syn-ack","handshake/ack"],Ze=e=>Xe.some((t=>t===e)),Qe=({data:e={}})=>"object"==typeof e&&null!==e&&!Array.isArray(e)&&!("domain"in e)&&["id","type","from","to"].every((t=>t in e))&&e.type.startsWith("handshake/");function Ye(e){const t=e.target,n=e.connectTo.map((e=>({buffer:[],config:e,id:"",handler:r,status:"connecting",interval:void 0,heartbeat:void 0})));function i(e){window.clearInterval(e.interval)}function r(e){const{data:t}=e;if(Ze(t.type)){const e=n.find((e=>e.config.id===t.from));e&&"handshake/syn-ack"===t.type&&(l(e,"connected"),c(e,"handshake/ack",{id:e.id}))}}const o=t=>{var i,r,o;const{data:a}=t;if(!Ze(a.type)&&n.find((e=>e.id===a.connectionId))){const t=n.find((e=>e.config.id===a.from));if(t){const n=[a.type,a.data];null==(r=(i=t.config).onEvent)||r.call(i,...n),null==(o=e.onEvent)||o.call(e,...n),d(t,"channel/response",{responseTo:a.id},!1)}}};function a(t){var i;if(Qe(t))console.error("Visual editing package mismatch detected! Please ensure you are using the latest version of Sanity Studio and any packages listed here:\nhttps://github.com/sanity-io/visual-editing");else if(function(t){const{data:i,origin:r}=t;return"sanity/channels"===i.domain&&i.to==e.id&&n.map((e=>e.config.id)).includes(i.from)&&"channel/response"!==i.type&&r===e.targetOrigin}(t)){const{data:e}=t;null==(i=n.find((t=>t.config.id===e.from)))||i.handler(t)}}function s(e){e.heartbeat&&window.clearInterval(e.heartbeat)}function l(t,n){var a,l,u;t.status=n,null==(l=(a=t.config).onStatusUpdate)||l.call(a,n,t.config.id),null==(u=e.onStatusUpdate)||u.call(e,n,t.config.id),"connecting"===n||"reconnecting"===n?(t.handler=r,s(t),function(e){e.id=qe(),e.interval=window.setInterval((()=>{c(e,"handshake/syn",{id:e.id})}),He)}(t)):"connected"===n?(t.handler=o,i(t),function(e){if(s(e),e.config.heartbeat){const t="number"==typeof e.config.heartbeat?e.config.heartbeat:Je;e.heartbeat=window.setInterval((()=>{d(e,"channel/heartbeat")}),t)}}(t),function(e){const t=[...e.buffer];e.buffer.splice(0,e.buffer.length),t.forEach((({type:t,data:n})=>{d(e,t,n)}))}(t)):"disconnected"===n&&(t.id=null,t.handler=r,i(t),s(t))}function c(n,i,r){if(!n.id)throw new Error("No channel ID set");const o={connectionId:n.id,data:r,domain:"sanity/channels",from:e.id,id:qe(),to:n.config.id,type:i};try{null==t||t.postMessage(o,{targetOrigin:"*"})}catch{throw new Error(`Failed to postMessage '${o.id}' on '${e.id}'`)}}function d(n,i,r,o=!0){const a=qe();if("connecting"===n.status||"reconnecting"===n.status||"disconnected"===n.status)return void n.buffer.push({type:i,data:r});if(!n.id)throw new Error("No channel ID set");const s={connectionId:n.id,data:r,domain:"sanity/channels",from:e.id,id:a,to:n.config.id,type:i};if(o){const t=setTimeout((()=>{s.connectionId===n.id&&(window.removeEventListener("message",o,!1),"channel/heartbeat"!==i&&n.buffer.push({type:i,data:r}),l(n,"reconnecting"),console.warn(`Received no response to message '${s.type}' on client '${e.id}' (ID: '${s.id}').`))}),Ge),o=e=>{var n;const{data:i}=e;"channel/response"===i.type&&null!=(n=i.data)&&n.responseTo&&i.data.responseTo===s.id&&(window.removeEventListener("message",o,!1),clearTimeout(t))};window.addEventListener("message",o,!1)}try{null==t||t.postMessage(s,{targetOrigin:e.targetOrigin})}catch{throw new Error(`Failed to postMessage '${s.id}' on client '${e.id}'`)}}return window.addEventListener("message",a,!1),n.forEach((e=>{l(e,"connecting")})),{destroy:function(){n.forEach((e=>{["disconnected"].includes(e.status)||(d(e,"channel/disconnect",{id:e.id},!1),l(e,"disconnected"))})),window.removeEventListener("message",a,!1),n.forEach((e=>{s(e),i(e)}))},send:function(e,t,i){(e?Array.isArray(e)?[...e]:[e]:n).forEach((e=>{const r=n.find((t=>t.config.id===e));if(!r)throw new Error("Invalid channel ID");d(r,t,i)}))}}}var et,tt,nt,it,rt=class extends Error{constructor(e){super(e[0].message),t(this,"issues"),this.name="ValiError",this.issues=e}};function ot(e,t){return Array.isArray(e)?[void 0,e]:[e,t]}function at(e,t,n,i,r){var o,a,s,l,c;const d=null!=(c=null!=(l=null!=(s=null!=(a=null!=(o=t.message)?o:function(e,t){var n;return null==(n=null==it?void 0:it.get(e))?void 0:n.get(t)}(n,r.lang))?a:e?(u=r.lang,null==nt?void 0:nt.get(u)):null)?s:null==i?void 0:i.message)?l:function(e){return null==tt?void 0:tt.get(e)}(r.lang))?c:r.message;var u;return"function"==typeof d?d(r):d}function st(e,t,n){return{typed:e,output:t,issues:n}}function lt(e){let t=typeof e;return"object"===t&&(t=e?Object.getPrototypeOf(e).constructor.name:"null"),"string"===t?`"${e}"`:"number"===t||"bigint"===t||"boolean"===t?`${e}`:t}function ct(e,t,n){var i;const r=null!=(i=n.received)?i:lt(n.input),o={reason:e.type,context:n.context.type,expected:n.context.expects,received:r,message:`Invalid ${n.label}: ${n.context.expects?`Expected ${n.context.expects} but r`:"R"}eceived ${r}`,input:n.input,requirement:n.context.requirement,path:n.path,lang:null==t?void 0:t.lang,abortEarly:null==t?void 0:t.abortEarly,abortPipeEarly:null==t?void 0:t.abortPipeEarly,skipPipe:null==t?void 0:t.skipPipe};return o.message=at(!1,n.context,n.reference,t,o),o}function dt(e,t,n,i){if(e.pipe&&(null==n||!n.skipPipe))for(const r of e.pipe){const o=r._parse(t);if(o.issues){for(const t of o.issues){const r=ct(e,n,t);i?i.push(r):i=[r]}if(null!=n&&n.abortEarly||null!=n&&n.abortPipeEarly)break}else t=o.output}return st(!0,t,i)}function ut(e,t,n,i,r){var o,a;const s=lt(n),l=null!=(o=null==r?void 0:r.expected)?o:e.expects,c={reason:null!=(a=null==r?void 0:r.reason)?a:"type",context:e.type,expected:l,received:s,message:`Invalid type: Expected ${l} but received ${s}`,input:n,path:null==r?void 0:r.path,issues:null==r?void 0:r.issues,lang:null==i?void 0:i.lang,abortEarly:null==i?void 0:i.abortEarly,abortPipeEarly:null==i?void 0:i.abortPipeEarly,skipPipe:null==i?void 0:i.skipPipe};return c.message=at(!0,e,t,i,c),{typed:!1,output:n,issues:[c]}}function pt(e,t){return{...e,fallback:t,_parse(t,n){const i=e._parse(t,n);return i.issues?st(!0,function(e,t){return"function"==typeof e.fallback?e.fallback(t):e.fallback}(this,{input:t,issues:i.issues})):i}}}function ht(e,t,n,i){const[r,o,a]=function(e,t,n){if(!e||"object"==typeof e&&!Array.isArray(e)){const[i,r]=ot(t,n);return[e,i,r]}const[i,r]=ot(e,t);return[void 0,i,r]}(t,n,i);let s;return{type:"object",expects:"Object",async:!1,entries:e,rest:r,message:o,pipe:a,_parse(e,t){if(e&&"object"==typeof e){s=null!=s?s:Object.entries(this.entries);let n,i=!0;const r={};for(const[o,a]of s){const s=e[o],l=a._parse(s,t);if(l.issues){const r={type:"object",origin:"value",input:e,key:o,value:s};for(const e of l.issues)e.path?e.path.unshift(r):e.path=[r],null==n||n.push(e);if(n||(n=l.issues),null!=t&&t.abortEarly){i=!1;break}}l.typed||(i=!1),(void 0!==l.output||o in e)&&(r[o]=l.output)}if(this.rest&&(null==t||!t.abortEarly||!n))for(const o in e)if(!(o in this.entries)){const a=e[o],s=this.rest._parse(a,t);if(s.issues){const r={type:"object",origin:"value",input:e,key:o,value:a};for(const e of s.issues)e.path?e.path.unshift(r):e.path=[r],null==n||n.push(e);if(n||(n=s.issues),null!=t&&t.abortEarly){i=!1;break}}s.typed||(i=!1),r[o]=s.output}return i?dt(this,r,t,n):st(!1,r,n)}return ut(this,ht,e,t)}}}function ft(e,t){return{type:"picklist",expects:e.map(lt).join(" | "),async:!1,options:e,message:t,_parse(e,t){return this.options.includes(e)?st(!0,e):ut(this,ft,e,t)}}}function mt(e,t,n){const i=e._parse(t,function(e){var t,n,i,r;return{lang:null!=(t=null==e?void 0:e.lang)?t:null==et?void 0:et.lang,message:null==e?void 0:e.message,abortEarly:null!=(n=null==e?void 0:e.abortEarly)?n:null==et?void 0:et.abortEarly,abortPipeEarly:null!=(i=null==e?void 0:e.abortPipeEarly)?i:null==et?void 0:et.abortPipeEarly,skipPipe:null!=(r=null==e?void 0:e.skipPipe)?r:null==et?void 0:et.skipPipe}}(n));if(i.issues)throw new rt(i.issues);return i.output}const vt=/^([A-Za-z]+):([0-9]+)$/,gt=/^([A-Za-z]+):([0-9]+),([0-9]+)$/,yt=/^([A-Za-z]+):([a-z0-9]+)$/;const wt={alt:"altKey",ctrl:"ctrlKey",mod:typeof window<"u"&&/Mac|iPod|iPhone|iPad/.test(window.navigator.platform)?"metaKey":"ctrlKey",shift:"shiftKey"};function bt(e){return"Alt"===e.key}function xt(e){const{children:t,message:r,onRetry:o,onContinueAnyway:f,...m}=e,v=n(h,{fontSize:1,mode:"ghost",onClick:o,text:"Retry"}),g=n(h,{fontSize:1,mode:"ghost",tone:"critical",onClick:f,text:"Continue anyway"});return n(a,{height:"fill",...m,children:n(s,{align:"center",height:"fill",justify:"center",children:n(l,{padding:4,sizing:"border",width:0,children:i(c,{space:4,children:[i(c,{space:3,children:[n(d,{size:1,weight:"semibold",children:"An error occured"}),n(d,{muted:!0,size:1,children:r})]}),t,o&&f?i(u,{space:2,children:[v,g]}):o?n(p,{children:v}):f?n(p,{children:g}):null]})})})})}function kt(){const e=z(ce);if(!e)throw new Error("Presentation context is missing");return e}function Et(e){const t=["comment","inspect","instruction","pathKey","rev","since","template","view"];return function(e={}){const t=Object.entries(e).map((([e,t])=>`${e}=${t}`)).join("&");return t.length?`?${t}`:""}(Object.entries(e).filter((([e])=>t.includes(e))).reduce(((e,[t,n])=>null==n?e:{...e,[t]:n}),{}))}const Pt=D((function(e,t){const{deskParams:i,params:r}=kt();return n(Q,{...e,ref:t,state:{type:void 0,_searchParams:Object.entries({...i,preview:r.preview})},title:void 0})})),St=D((function(e,t){const{documentId:i,documentType:r,parentRefPath:o,template:a,...s}=e;return n(Q,{...s,ref:t,state:{id:i,type:r},title:void 0})}));function It(e){const{children:t,params:i,onDeskParams:o,previewUrl:a,refs:s}=e,{state:l,resolvePathFromState:c}=Y(),d=V(Object.fromEntries(l._searchParams||[])),u=O((e=>`${c(l)}${Et({...d,...e})}`),[c,d,l]),p=R((()=>({index:0,groupIndex:0,siblingIndex:0,payload:{},params:i,hasGroupSiblings:!1,groupLength:1,routerPanesState:[],ChildLink:e=>{const{childId:t,...i}=e,r=null==s?void 0:s.find((e=>e._id===t||B(e._id)===t));return r?n(Q,{...i,state:{id:t,type:r._type,_searchParams:Object.entries({preview:a})}}):n("div",{...i})},BackLink:Pt,ReferenceChildLink:St,ParameterizedLink:()=>n(r,{children:"ParameterizedLink"}),closeCurrentAndAfter:()=>{console.warn("closeCurrentAndAfter")},handleEditReference:e=>{console.warn("handleEditReference",e)},replaceCurrent:e=>{console.warn("replaceCurrent",e)},closeCurrent:()=>{console.warn("closeCurrent")},duplicateCurrent:e=>{console.warn("duplicateCurrent",e)},setView:e=>{console.warn("setView",e)},setParams:e=>{var t;o({...e,inspect:null!=(t=e.inspect)?t:void 0})},setPayload:e=>{console.warn("setPayload",e)},navigateIntent:(e,t,n)=>{console.warn("navigateIntent",e,t,n)},createPathWithParams:u})),[u,o,i,a,s]);return n(te.Provider,{value:p,children:t})}const Ct=le(ne)`
var e=Object.defineProperty,t=(t,n,r)=>(((t,n,r)=>{n in t?e(t,n,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[n]=r})(t,"symbol"!=typeof n?n+"":n,r),r);import{jsx as n,jsxs as r,Fragment as i}from"react/jsx-runtime";import{studioPath as o}from"@sanity/client/csm";import{Card as a,Flex as s,Container as l,Stack as c,Text as d,Inline as u,Box as p,Button as h,Code as f,Label as m,ErrorBoundary as v,TextInput as g,MenuItem as y,useToast as w,Switch as b,usePrefersReducedMotion as x,TooltipDelayGroupProvider as k,Tooltip as P,MenuButton as E,Menu as S,Spinner as I,BoundaryElementProvider as z}from"@sanity/ui";import{useContext as C,forwardRef as D,useCallback as O,useMemo as R,useState as U,useEffect as $,createContext as j,useLayoutEffect as L,useRef as T,memo as A,createElement as _,startTransition as W,useReducer as M,Suspense as N,lazy as F}from"react";import{useUnique as V,getPublishedId as B,useActiveWorkspace as K,useClient as q,useCurrentUser as G,Hotkeys as J,useProjectId as H,useDataset as X,useWorkspace as Z}from"sanity";import{StateLink as Q,useRouter as Y,decodeJsonParams as ee}from"sanity/router";import{PaneRouterContext as te,PaneLayout as ne,StructureToolProvider as re,DocumentListPane as ie,DocumentPane as oe,CommentsIntentProvider as ae}from"sanity/structure";import se from"styled-components";import{P as le,a as ce,b as de,A as ue,M as pe,c as he,C as fe,E as me,D as ve}from"./index.js";import{D as ge}from"./DisplayedDocumentBroadcaster.js";import{ResetIcon as ye,LaunchIcon as we,CopyIcon as be,PanelLeftIcon as xe,RefreshIcon as ke,ShareIcon as Pe,ChevronDownIcon as Ee,CheckmarkIcon as Se,DesktopIcon as Ie,MobileDeviceIcon as ze,EditIcon as Ce,PublishIcon as De}from"@sanity/icons";import{hasSecretSearchParams as Oe,setSecretSearchParams as Re,withoutSecretSearchParams as Ue}from"@sanity/preview-url-secret/without-secret-search-params";import{motion as $e,MotionConfig as je,AnimatePresence as Le}from"framer-motion";import{createPreviewSecret as Te}from"@sanity/preview-url-secret/create-secret";import Ae from"fast-deep-equal";import{definePreviewUrl as _e}from"@sanity/preview-url-secret/define-preview-url";import{suspend as We}from"suspend-react";let Me;const Ne=new Uint8Array(16);function Fe(){if(!Me&&(Me=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!Me))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Me(Ne)}const Ve=[];for(let e=0;e<256;++e)Ve.push((e+256).toString(16).slice(1));var Be={randomUUID:typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};function Ke(e,t,n){if(Be.randomUUID&&!t&&!e)return Be.randomUUID();const r=(e=e||{}).random||(e.rng||Fe)();if(r[6]=15&r[6]|64,r[8]=63&r[8]|128,t){n=n||0;for(let e=0;e<16;++e)t[n+e]=r[e];return t}return function(e,t=0){return Ve[e[t+0]]+Ve[e[t+1]]+Ve[e[t+2]]+Ve[e[t+3]]+"-"+Ve[e[t+4]]+Ve[e[t+5]]+"-"+Ve[e[t+6]]+Ve[e[t+7]]+"-"+Ve[e[t+8]]+Ve[e[t+9]]+"-"+Ve[e[t+10]]+Ve[e[t+11]]+Ve[e[t+12]]+Ve[e[t+13]]+Ve[e[t+14]]+Ve[e[t+15]]}(r)}const qe=1e3,Ge=1e3,Je=500,He=["handshake/syn","handshake/syn-ack","handshake/ack"],Xe=e=>He.some((t=>t===e)),Ze=({data:e={}})=>"object"==typeof e&&null!==e&&!Array.isArray(e)&&!("domain"in e)&&["id","type","from","to"].every((t=>t in e))&&e.type.startsWith("handshake/");function Qe(e){const t=e.target,n=e.connectTo.map((e=>({buffer:[],config:e,id:"",handler:i,status:"connecting",interval:void 0,heartbeat:void 0})));function r(e){window.clearInterval(e.interval)}function i(e){const{data:t}=e;if(Xe(t.type)){const e=n.find((e=>e.config.id===t.from));e&&"handshake/syn-ack"===t.type&&(l(e,"connected"),c(e,"handshake/ack",{id:e.id}))}}const o=t=>{var r,i,o;const{data:a}=t;if(!Xe(a.type)&&n.find((e=>e.id===a.connectionId))){const t=n.find((e=>e.config.id===a.from));if(t){const n=[a.type,a.data];null==(i=(r=t.config).onEvent)||i.call(r,...n),null==(o=e.onEvent)||o.call(e,...n),d(t,"channel/response",{responseTo:a.id},!1)}}};function a(t){var r;if(Ze(t))console.error("Visual editing package mismatch detected! Please ensure you are using the latest version of Sanity Studio and any packages listed here:\nhttps://github.com/sanity-io/visual-editing");else if(function(t){const{data:r,origin:i}=t;return"sanity/channels"===r.domain&&r.to==e.id&&n.map((e=>e.config.id)).includes(r.from)&&"channel/response"!==r.type&&i===e.targetOrigin}(t)){const{data:e}=t;null==(r=n.find((t=>t.config.id===e.from)))||r.handler(t)}}function s(e){e.heartbeat&&window.clearInterval(e.heartbeat)}function l(t,n){var a,l,u;t.status=n,null==(l=(a=t.config).onStatusUpdate)||l.call(a,n,t.config.id),null==(u=e.onStatusUpdate)||u.call(e,n,t.config.id),"connecting"===n||"reconnecting"===n?(t.handler=i,s(t),function(e){e.id=Ke(),e.interval=window.setInterval((()=>{c(e,"handshake/syn",{id:e.id})}),Je)}(t)):"connected"===n?(t.handler=o,r(t),function(e){if(s(e),e.config.heartbeat){const t="number"==typeof e.config.heartbeat?e.config.heartbeat:Ge;e.heartbeat=window.setInterval((()=>{d(e,"channel/heartbeat")}),t)}}(t),function(e){const t=[...e.buffer];e.buffer.splice(0,e.buffer.length),t.forEach((({type:t,data:n})=>{d(e,t,n)}))}(t)):"disconnected"===n&&(t.id=null,t.handler=i,r(t),s(t))}function c(n,r,i){if(!n.id)throw new Error("No channel ID set");const o={connectionId:n.id,data:i,domain:"sanity/channels",from:e.id,id:Ke(),to:n.config.id,type:r};try{null==t||t.postMessage(o,{targetOrigin:"*"})}catch{throw new Error(`Failed to postMessage '${o.id}' on '${e.id}'`)}}function d(n,r,i,o=!0){const a=Ke();if("connecting"===n.status||"reconnecting"===n.status||"disconnected"===n.status)return void n.buffer.push({type:r,data:i});if(!n.id)throw new Error("No channel ID set");const s={connectionId:n.id,data:i,domain:"sanity/channels",from:e.id,id:a,to:n.config.id,type:r};if(o){const t=setTimeout((()=>{s.connectionId===n.id&&(window.removeEventListener("message",o,!1),"channel/heartbeat"!==r&&n.buffer.push({type:r,data:i}),l(n,"reconnecting"),console.warn(`Received no response to message '${s.type}' on client '${e.id}' (ID: '${s.id}').`))}),qe),o=e=>{var n;const{data:r}=e;"channel/response"===r.type&&null!=(n=r.data)&&n.responseTo&&r.data.responseTo===s.id&&(window.removeEventListener("message",o,!1),clearTimeout(t))};window.addEventListener("message",o,!1)}try{null==t||t.postMessage(s,{targetOrigin:e.targetOrigin})}catch{throw new Error(`Failed to postMessage '${s.id}' on client '${e.id}'`)}}return window.addEventListener("message",a,!1),n.forEach((e=>{l(e,"connecting")})),{destroy:function(){n.forEach((e=>{["disconnected"].includes(e.status)||(d(e,"channel/disconnect",{id:e.id},!1),l(e,"disconnected"))})),window.removeEventListener("message",a,!1),n.forEach((e=>{s(e),r(e)}))},send:function(e,t,r){(e?Array.isArray(e)?[...e]:[e]:n).forEach((e=>{const i=n.find((t=>t.config.id===e));if(!i)throw new Error("Invalid channel ID");d(i,t,r)}))}}}var Ye,et,tt,nt,rt=class extends Error{constructor(e){super(e[0].message),t(this,"issues"),this.name="ValiError",this.issues=e}};function it(e,t){return Array.isArray(e)?[void 0,e]:[e,t]}function ot(e,t,n,r,i){var o,a,s,l,c;const d=null!=(c=null!=(l=null!=(s=null!=(a=null!=(o=t.message)?o:function(e,t){var n;return null==(n=null==nt?void 0:nt.get(e))?void 0:n.get(t)}(n,i.lang))?a:e?(u=i.lang,null==tt?void 0:tt.get(u)):null)?s:null==r?void 0:r.message)?l:function(e){return null==et?void 0:et.get(e)}(i.lang))?c:i.message;var u;return"function"==typeof d?d(i):d}function at(e,t,n){return{typed:e,output:t,issues:n}}function st(e){let t=typeof e;return"object"===t&&(t=e?Object.getPrototypeOf(e).constructor.name:"null"),"string"===t?`"${e}"`:"number"===t||"bigint"===t||"boolean"===t?`${e}`:t}function lt(e,t,n){var r;const i=null!=(r=n.received)?r:st(n.input),o={reason:e.type,context:n.context.type,expected:n.context.expects,received:i,message:`Invalid ${n.label}: ${n.context.expects?`Expected ${n.context.expects} but r`:"R"}eceived ${i}`,input:n.input,requirement:n.context.requirement,path:n.path,lang:null==t?void 0:t.lang,abortEarly:null==t?void 0:t.abortEarly,abortPipeEarly:null==t?void 0:t.abortPipeEarly,skipPipe:null==t?void 0:t.skipPipe};return o.message=ot(!1,n.context,n.reference,t,o),o}function ct(e,t,n,r){if(e.pipe&&(null==n||!n.skipPipe))for(const i of e.pipe){const o=i._parse(t);if(o.issues){for(const t of o.issues){const i=lt(e,n,t);r?r.push(i):r=[i]}if(null!=n&&n.abortEarly||null!=n&&n.abortPipeEarly)break}else t=o.output}return at(!0,t,r)}function dt(e,t,n,r,i){var o,a;const s=st(n),l=null!=(o=null==i?void 0:i.expected)?o:e.expects,c={reason:null!=(a=null==i?void 0:i.reason)?a:"type",context:e.type,expected:l,received:s,message:`Invalid type: Expected ${l} but received ${s}`,input:n,path:null==i?void 0:i.path,issues:null==i?void 0:i.issues,lang:null==r?void 0:r.lang,abortEarly:null==r?void 0:r.abortEarly,abortPipeEarly:null==r?void 0:r.abortPipeEarly,skipPipe:null==r?void 0:r.skipPipe};return c.message=ot(!0,e,t,r,c),{typed:!1,output:n,issues:[c]}}function ut(e,t){return{...e,fallback:t,_parse(t,n){const r=e._parse(t,n);return r.issues?at(!0,function(e,t){return"function"==typeof e.fallback?e.fallback(t):e.fallback}(this,{input:t,issues:r.issues})):r}}}function pt(e,t,n,r){const[i,o,a]=function(e,t,n){if(!e||"object"==typeof e&&!Array.isArray(e)){const[r,i]=it(t,n);return[e,r,i]}const[r,i]=it(e,t);return[void 0,r,i]}(t,n,r);let s;return{type:"object",expects:"Object",async:!1,entries:e,rest:i,message:o,pipe:a,_parse(e,t){if(e&&"object"==typeof e){s=null!=s?s:Object.entries(this.entries);let n,r=!0;const i={};for(const[o,a]of s){const s=e[o],l=a._parse(s,t);if(l.issues){const i={type:"object",origin:"value",input:e,key:o,value:s};for(const e of l.issues)e.path?e.path.unshift(i):e.path=[i],null==n||n.push(e);if(n||(n=l.issues),null!=t&&t.abortEarly){r=!1;break}}l.typed||(r=!1),(void 0!==l.output||o in e)&&(i[o]=l.output)}if(this.rest&&(null==t||!t.abortEarly||!n))for(const o in e)if(!(o in this.entries)){const a=e[o],s=this.rest._parse(a,t);if(s.issues){const i={type:"object",origin:"value",input:e,key:o,value:a};for(const e of s.issues)e.path?e.path.unshift(i):e.path=[i],null==n||n.push(e);if(n||(n=s.issues),null!=t&&t.abortEarly){r=!1;break}}s.typed||(r=!1),i[o]=s.output}return r?ct(this,i,t,n):at(!1,i,n)}return dt(this,pt,e,t)}}}function ht(e,t){return{type:"picklist",expects:e.map(st).join(" | "),async:!1,options:e,message:t,_parse(e,t){return this.options.includes(e)?at(!0,e):dt(this,ht,e,t)}}}function ft(e,t,n){const r=e._parse(t,function(e){var t,n,r,i;return{lang:null!=(t=null==e?void 0:e.lang)?t:null==Ye?void 0:Ye.lang,message:null==e?void 0:e.message,abortEarly:null!=(n=null==e?void 0:e.abortEarly)?n:null==Ye?void 0:Ye.abortEarly,abortPipeEarly:null!=(r=null==e?void 0:e.abortPipeEarly)?r:null==Ye?void 0:Ye.abortPipeEarly,skipPipe:null!=(i=null==e?void 0:e.skipPipe)?i:null==Ye?void 0:Ye.skipPipe}}(n));if(r.issues)throw new rt(r.issues);return r.output}const mt=/^([A-Za-z]+):([0-9]+)$/,vt=/^([A-Za-z]+):([0-9]+),([0-9]+)$/,gt=/^([A-Za-z]+):([a-z0-9]+)$/;const yt={alt:"altKey",ctrl:"ctrlKey",mod:typeof window<"u"&&/Mac|iPod|iPhone|iPad/.test(window.navigator.platform)?"metaKey":"ctrlKey",shift:"shiftKey"};function wt(e){return"Alt"===e.key}function bt(e){const{children:t,message:i,onRetry:o,onContinueAnyway:f,...m}=e,v=n(h,{fontSize:1,mode:"ghost",onClick:o,text:"Retry"}),g=n(h,{fontSize:1,mode:"ghost",tone:"critical",onClick:f,text:"Continue anyway"});return n(a,{height:"fill",...m,children:n(s,{align:"center",height:"fill",justify:"center",children:n(l,{padding:4,sizing:"border",width:0,children:r(c,{space:4,children:[r(c,{space:3,children:[n(d,{size:1,weight:"semibold",children:"An error occured"}),n(d,{muted:!0,size:1,children:i})]}),t,o&&f?r(u,{space:2,children:[v,g]}):o?n(p,{children:v}):f?n(p,{children:g}):null]})})})})}function xt(){const e=C(le);if(!e)throw new Error("Presentation context is missing");return e}function kt(e){const t=["comment","inspect","instruction","pathKey","rev","since","template","view"];return function(e={}){const t=Object.entries(e).map((([e,t])=>`${e}=${t}`)).join("&");return t.length?`?${t}`:""}(Object.entries(e).filter((([e])=>t.includes(e))).reduce(((e,[t,n])=>null==n?e:{...e,[t]:n}),{}))}const Pt=D((function(e,t){const{deskParams:r,params:i}=xt();return n(Q,{...e,ref:t,state:{type:void 0,_searchParams:Object.entries({...r,preview:i.preview})},title:void 0})})),Et=D((function(e,t){const{documentId:r,documentType:i,parentRefPath:o,template:a,...s}=e;return n(Q,{...s,ref:t,state:{id:r,type:i,_searchParams:Object.entries({preview:e.previewUrl})},title:void 0})}));function St(e){const{children:t,params:r,onDeskParams:o,previewUrl:a,refs:s}=e,{state:l,resolvePathFromState:c}=Y(),d=V(Object.fromEntries(l._searchParams||[])),u=O((e=>`${c(l)}${kt({...d,...e})}`),[c,d,l]),p=R((()=>({index:0,groupIndex:0,siblingIndex:0,payload:{},params:r,hasGroupSiblings:!1,groupLength:1,routerPanesState:[],ChildLink:e=>{const{childId:t,...r}=e,i=null==s?void 0:s.find((e=>e._id===t||B(e._id)===t));return i?n(Q,{...r,state:{id:t,type:i._type,_searchParams:Object.entries({preview:a})}}):n("div",{...r})},BackLink:Pt,ReferenceChildLink:e=>n(Et,{...e,previewUrl:a}),ParameterizedLink:()=>n(i,{children:"ParameterizedLink"}),closeCurrentAndAfter:()=>{console.warn("closeCurrentAndAfter")},handleEditReference:e=>{console.warn("handleEditReference",e)},replaceCurrent:e=>{console.warn("replaceCurrent",e)},closeCurrent:()=>{console.warn("closeCurrent")},duplicateCurrent:e=>{console.warn("duplicateCurrent",e)},setView:e=>{console.warn("setView",e)},setParams:e=>{var t;o({...e,inspect:null!=(t=e.inspect)?t:void 0})},setPayload:e=>{console.warn("setPayload",e)},navigateIntent:(e,t,n)=>{console.warn("navigateIntent",e,t,n)},createPathWithParams:u})),[u,o,r,a,s]);return n(te.Provider,{value:p,children:t})}const It=se(ne)`
height: 100%;
`,zt=le(s)`
`,zt=se(s)`
& > div {

@@ -8,13 +8,13 @@ min-width: none !important;

}
`,Dt=le(f)`
`,Ct=se(f)`
white-space: pre-wrap;
`;function Ot(e){const{onDeskParams:t,previewUrl:r,refs:o}=e,{devMode:s}=kt(),l=R((()=>({id:"$root",options:{filter:"_id in $ids",params:{ids:o.map((e=>e._id))}},schemaTypeName:"",title:"Documents on this page",type:"documentList"})),[o]),[d,u]=$(null),p=O((()=>u(null)),[]),[h]=$((()=>({})));return L((()=>u(null)),[o]),d?n(xt,{flex:1,message:"Could not render the document list",onRetry:p,children:s&&n(a,{overflow:"auto",padding:3,radius:2,tone:"critical",children:i(c,{space:3,children:[n(m,{muted:!0,size:0,children:"Error message"}),n(Dt,{size:1,children:d.error.message})]})})}):n(v,{onCatch:u,children:n(Ct,{children:n(ie,{children:n(It,{params:h,onDeskParams:t,previewUrl:r,refs:o,children:n(zt,{direction:"column",flex:1,children:n(re,{index:0,itemId:"$root",pane:l,paneKey:"$root"})})})})})})}const Rt=le(f)`
`;function Dt(e){const{onDeskParams:t,previewUrl:i,refs:o}=e,{devMode:s}=xt(),l=R((()=>({id:"$root",options:{filter:"_id in $ids",params:{ids:o.map((e=>e._id))}},schemaTypeName:"",title:"Documents on this page",type:"documentList"})),[o]),[d,u]=U(null),p=O((()=>u(null)),[]),[h]=U((()=>({})));return $((()=>u(null)),[o]),d?n(bt,{flex:1,message:"Could not render the document list",onRetry:p,children:s&&n(a,{overflow:"auto",padding:3,radius:2,tone:"critical",children:r(c,{space:3,children:[n(m,{muted:!0,size:0,children:"Error message"}),n(Ct,{size:1,children:d.error.message})]})})}):n(v,{onCatch:u,children:n(It,{children:n(re,{children:n(St,{params:h,onDeskParams:t,previewUrl:i,refs:o,children:n(zt,{direction:"column",flex:1,children:n(ie,{index:0,itemId:"$root",pane:l,paneKey:"$root"})})})})})})}const Ot=se(f)`
white-space: pre-wrap;
`;function $t(e){const{documentId:t,documentType:r,params:o,onDeskParams:s,onFocusPath:l}=e,{template:d,templateParams:u}=o,{devMode:p}=kt(),h=R((()=>({id:t,options:{id:t,type:r,template:d,templateParameters:ee(u)},title:"",type:"document"})),[t,r,d,u]),[f,g]=$(null),y=O((()=>g(null)),[]);L((()=>{g(null)}),[t,r,o]);const{layoutCollapsed:w,setLayoutCollapsed:b}=oe(),x=O((()=>{b(!0)}),[b]),k=O((()=>{b(!1)}),[b]);return f?n(xt,{flex:1,message:"Could not render the document editor",onRetry:y,children:p&&n(a,{overflow:"auto",padding:3,radius:2,tone:"critical",children:i(c,{space:3,children:[n(m,{muted:!0,size:0,children:"Error message"}),n(Rt,{size:1,children:f.error.message})]})})}):n(v,{onCatch:g,children:n(ne,{style:w?{minHeight:"100%"}:{height:"100%"},onExpand:k,onCollapse:x,minWidth:640,children:n(It,{onDeskParams:s,params:o,children:n(ae,{paneKey:"document",index:1,itemId:"document",pane:h,onFocusPath:l})})})})}function Lt(e){const{deskParams:t,documentId:i,documentType:r,onDeskParams:o,onFocusPath:a}=e;return n(ie,{children:n($t,{documentId:i,documentType:r,params:t,onDeskParams:o,onFocusPath:a})})}function jt(e){const{deskParams:t,documentId:i,documentType:r,onDeskParams:o,onFocusPath:a,previewUrl:s,refs:l}=e;return i&&r?n(Lt,{deskParams:t,documentId:i,documentType:r,onDeskParams:o,onFocusPath:a}):n(Ot,{onDeskParams:o,previewUrl:s,refs:l})}const Tt=j(null);Tt.displayName="PanelsContext";const Ut=le.div`
`;function Rt(e){const{documentId:t,documentType:i,params:o,onDeskParams:s,onFocusPath:l,previewUrl:d}=e,{template:u,templateParams:p}=o,{devMode:h}=xt(),f=R((()=>({id:t,options:{id:t,type:i,template:u,templateParameters:ee(p)},title:"",type:"document"})),[t,i,u,p]),[g,y]=U(null),w=O((()=>y(null)),[]);return $((()=>{y(null)}),[t,i,o]),g?n(bt,{flex:1,message:"Could not render the document editor",onRetry:w,children:h&&n(a,{overflow:"auto",padding:3,radius:2,tone:"critical",children:r(c,{space:3,children:[n(m,{muted:!0,size:0,children:"Error message"}),n(Ot,{size:1,children:g.error.message})]})})}):n(v,{onCatch:y,children:n(ne,{style:{height:"100%"},children:n(St,{onDeskParams:s,params:o,previewUrl:d,children:n(oe,{paneKey:"document",index:1,itemId:"document",pane:f,onFocusPath:l})})})})}function Ut(e){const{deskParams:t,documentId:r,documentType:i,onDeskParams:o,onFocusPath:a,previewUrl:s}=e;return n(re,{children:n(Rt,{documentId:r,documentType:i,params:t,onDeskParams:o,onFocusPath:a,previewUrl:s})})}function $t(e){const{deskParams:t,documentId:r,documentType:i,onDeskParams:o,onFocusPath:a,previewUrl:s,refs:l}=e;return r&&i?n(Ut,{deskParams:t,documentId:r,documentType:i,onDeskParams:o,onFocusPath:a,previewUrl:s}):n(Dt,{onDeskParams:o,previewUrl:s,refs:l})}const jt=j(null);jt.displayName="PanelsContext";const Lt=se.div`
overflow-x: hidden;
flex-basis: 0;
flex-shrink: 1;
`,At=function({children:e,defaultSize:t=null,id:i,minWidth:r,maxWidth:o,order:a=0}){const s=z(Tt);if(null===s)throw Error("Panel components must be rendered within a PanelGroup container");const{getPanelStyle:l,registerElement:c,unregisterElement:d}=s,u=l(i);return T((()=>(c(i,{id:i,type:"panel",defaultSize:t,maxWidth:null!=o?o:null,minWidth:null!=r?r:0,order:a}),()=>{d(i)})),[i,t,a,o,r,c,d]),n(Ut,{style:u,children:e})};const _t=le.div`
`,Tt=function({children:e,defaultSize:t=null,id:r,minWidth:i,maxWidth:o,order:a=0}){const s=C(jt);if(null===s)throw Error("Panel components must be rendered within a PanelGroup container");const{getPanelStyle:l,registerElement:c,unregisterElement:d}=s,u=l(r);return L((()=>(c(r,{id:r,type:"panel",defaultSize:t,maxWidth:null!=o?o:null,minWidth:null!=i?i:0,order:a}),()=>{d(r)})),[r,t,a,o,i,c,d]),n(Lt,{style:u,children:e})};const At=se.div`
position: relative;
`,Wt=le.div`
`,_t=se.div`
position: absolute;

@@ -40,3 +40,3 @@ top: 0;

${({$disabled:e})=>!e&&"\n /* Hover effect */\n & > span:nth-child(2) {\n display: block;\n position: absolute;\n top: 0;\n left: 0;\n width: 9px;\n bottom: 0;\n background-color: var(--card-border-color);\n opacity: 0;\n transition: opacity 150ms;\n }\n\n @media (hover: hover) {\n &:hover > span:nth-child(2) {\n opacity: 0.2;\n }\n }\n "}
`,Mt=function({id:e,order:t,disabled:r=!1}){const o=U(null),a=z(Tt);if(null===a)throw Error("Panel components must be rendered within a PanelGroup container");const s=function(e){return U(e||qe()).current}(e),{activeResizer:l,drag:c,startDragging:d,stopDragging:u,registerElement:p,unregisterElement:h}=a,f=l===s;if(null===a)throw Error("Panel components must be rendered within a PanelGroup container");const m=O((e=>{d(s,e.nativeEvent)}),[s,d]),v=O((e=>{c(s,e)}),[s,c]),g=O((()=>{o.current.blur(),u()}),[u]);return L((()=>{if(f&&!r)return window.addEventListener("mousemove",v),window.addEventListener("mouseup",g),()=>{window.removeEventListener("mousemove",v),window.removeEventListener("mouseup",g)}}),[r,f,v,g]),T((()=>(p(s,{id:s,order:t,type:"resizer",el:o}),()=>{h(s)})),[s,t,p,h]),n(_t,{onMouseDown:m,ref:o,children:i(Wt,{$disabled:r,children:[n("span",{}),n("span",{})]})})};function Nt(e,t){let n;return(...i)=>{clearTimeout(n),n=setTimeout((()=>{e.apply(e,i)}),t)}}const Ft="presentation/panels",Vt=()=>JSON.parse(localStorage.getItem(Ft)||"{}"),Bt=e=>e.map((e=>[e.id,e.order].join(":"))).join(",");function Kt(){return R((()=>{const e=(e,t)=>{(e=>{localStorage.setItem(Ft,JSON.stringify(e))})({...Vt(),[Bt(e)]:t})};return{get:e=>Vt()[Bt(e)],set:e,setDebounced:Nt(e,100)}}),[])}function qt(e,t,n){const{maxWidth:i,minWidth:r}=e,o=null==i?100:i/n*100,a=r/n*100;return Math.min(o,Math.max(a,t))}function Gt(e,t,n){if(1===e.length)return"100";const i=n[e.findIndex((e=>e.id===t))];return null==i?"0":i.toPrecision(10)}function Jt(e,t,n=0,i=null){return e.clientX-(i||t.getBoundingClientRect()).left-n}function Ht(e){return"panel"===e.type}function Xt(e){return"resizer"===e.type}function Zt(e){return Array.from(e.values()).sort((({order:e},{order:t})=>null==e&&null==t?0:null==e?-1:null==t?1:e-t))}function Qt(e,t,n){const i=t.reduce(((e,t)=>e+t),0),r=[...t].map((e=>e/i*100));let o=0;for(let t=0;t<e.length;t++){const i=e[t],a=r[t],s=qt(i,a,n);a!=s&&(o+=a-s,r[t]=s)}if("0.000"!==o.toFixed(3))for(let t=0;t<e.length;t++){const i=e[t];let{maxWidth:a,minWidth:s}=i;s=s/n*100,null!=a&&(a=a/n*100);const l=Math.min(null!=a?a:100,Math.max(s,r[t]+o));if(l!==r[t]&&(o-=l-r[t],r[t]=l,"0.000"===Math.abs(o).toFixed(3)))break}return r}const Yt=le.div`
`,Wt=function({id:e,order:t,disabled:i=!1}){const o=T(null),a=C(jt);if(null===a)throw Error("Panel components must be rendered within a PanelGroup container");const s=function(e){return T(e||Ke()).current}(e),{activeResizer:l,drag:c,startDragging:d,stopDragging:u,registerElement:p,unregisterElement:h}=a,f=l===s;if(null===a)throw Error("Panel components must be rendered within a PanelGroup container");const m=O((e=>{d(s,e.nativeEvent)}),[s,d]),v=O((e=>{c(s,e)}),[s,c]),g=O((()=>{o.current.blur(),u()}),[u]);return $((()=>{if(f&&!i)return window.addEventListener("mousemove",v),window.addEventListener("mouseup",g),()=>{window.removeEventListener("mousemove",v),window.removeEventListener("mouseup",g)}}),[i,f,v,g]),L((()=>(p(s,{id:s,order:t,type:"resizer",el:o}),()=>{h(s)})),[s,t,p,h]),n(At,{onMouseDown:m,ref:o,children:r(_t,{$disabled:i,children:[n("span",{}),n("span",{})]})})};function Mt(e,t){let n;return(...r)=>{clearTimeout(n),n=setTimeout((()=>{e.apply(e,r)}),t)}}const Nt="presentation/panels",Ft=()=>JSON.parse(localStorage.getItem(Nt)||"{}"),Vt=e=>e.map((e=>[e.id,e.order].join(":"))).join(",");function Bt(){return R((()=>{const e=(e,t)=>{(e=>{localStorage.setItem(Nt,JSON.stringify(e))})({...Ft(),[Vt(e)]:t})};return{get:e=>Ft()[Vt(e)],set:e,setDebounced:Mt(e,100)}}),[])}function Kt(e,t,n){const{maxWidth:r,minWidth:i}=e,o=null==r?100:r/n*100,a=i/n*100;return Math.min(o,Math.max(a,t))}function qt(e,t,n){if(1===e.length)return"100";const r=n[e.findIndex((e=>e.id===t))];return null==r?"0":r.toPrecision(10)}function Gt(e,t,n=0,r=null){return e.clientX-(r||t.getBoundingClientRect()).left-n}function Jt(e){return"panel"===e.type}function Ht(e){return"resizer"===e.type}function Xt(e){return Array.from(e.values()).sort((({order:e},{order:t})=>null==e&&null==t?0:null==e?-1:null==t?1:e-t))}function Zt(e,t,n){const r=t.reduce(((e,t)=>e+t),0),i=[...t].map((e=>e/r*100));let o=0;for(let t=0;t<e.length;t++){const r=e[t],a=i[t],s=Kt(r,a,n);a!=s&&(o+=a-s,i[t]=s)}if("0.000"!==o.toFixed(3))for(let t=0;t<e.length;t++){const r=e[t];let{maxWidth:a,minWidth:s}=r;s=s/n*100,null!=a&&(a=a/n*100);const l=Math.min(null!=a?a:100,Math.max(s,i[t]+o));if(l!==i[t]&&(o-=l-i[t],i[t]=l,"0.000"===Math.abs(o).toFixed(3)))break}return i}const Qt=se.div`
display: flex;

@@ -47,3 +47,3 @@ flex-direction: row;

width: 100%;
`,en=function({children:e}){const t=U(null),[i,r]=$(new Map),o=R((()=>Zt(i).filter(Ht)),[i]),[a,s]=$([]),[l,c]=$(null),d=U({elements:i,panels:o,widths:a}),u=O((e=>({flexGrow:Gt(o,e,a),pointerEvents:null===l?void 0:"none"})),[l,o,a]),p=O(((e,t)=>{r((n=>{if(n.has(e))return n;const i=new Map(n);return i.set(e,t),i}))}),[]),h=O((e=>{r((t=>{if(!t.has(e))return t;const n=new Map(t);return n.delete(e),n}))}),[]),f=U({containerWidth:window.innerWidth,dragOffset:0,panelAfter:null,panelBefore:null,resizerIndex:-1,resizerRect:null,startX:0,widths:[]}),m=O(((e,t)=>{const n=Zt(i),r=n.findIndex((t=>t.id===e)),o=i.get(e);if(!o||!Xt(o))return;const a=o.el.current;a&&(f.current={resizerIndex:r,panelBefore:n.reduce(((e,t,n)=>Ht(t)&&n<r?t:e),null),panelAfter:n.reduce(((e,t,n)=>null===e&&Ht(t)&&n>r?t:e),null),containerWidth:window.innerWidth,startX:t.pageX,dragOffset:Jt(t,a),resizerRect:a.getBoundingClientRect(),widths:d.current.widths},c(e))}),[i]),v=O((()=>{c(null)}),[]),g=O(((e,n)=>{n.preventDefault(),n.stopPropagation();const{containerWidth:r,dragOffset:o,panelBefore:a,panelAfter:l,resizerRect:c}=f.current;if(null==a||null==l)return;const u=i.get(e);if(!u||!Xt(u))return;const p=u.el.current;if(!p)return;const h=Jt(n,p,o,c);if(0===h)return;const{widths:m}=d.current,v=function(e,t,n,i,r,o){const{panels:a,widths:s}=r,{widths:l}=o,c=l||s,d=[...c];{const r=e<0?i:n,o=c[a.findIndex((e=>e.id===r.id))],s=qt(r,o+Math.abs(e),t);if(o===s)return c;e=e<0?o-s:s-o}let u=0,p=e<0?n:i,h=a.findIndex((e=>e.id===p.id));for(;;){const n=a[h],i=c[h],r=qt(n,i-(Math.abs(e)-Math.abs(u)),t);if(i!==r&&(u+=i-r,d[h]=r,u.toPrecision(10).localeCompare(Math.abs(e).toPrecision(10),void 0,{numeric:!0})>=0))break;if(e<0){if(--h<0)break}else if(++h>=a.length)break}return 0===u?c:(p=e<0?i:n,h=a.findIndex((e=>e.id===p.id)),d[h]=c[h]+u,d)}(h/t.current.getBoundingClientRect().width*100,r,a,l,d.current,f.current);m.some(((e,t)=>e!==v[t]))&&s(v)}),[i]);T((()=>{d.current.elements=i,d.current.panels=o,d.current.widths=a}),[i,o,a]);const y=Kt();T((()=>{const{widths:e}=d.current;if(e.length===o.length)return;const t=y.get(o);if(t){const e=Qt(o,t,window.innerWidth);return void s(e)}const n=function(e){let t=e.length,n=100;const i=e.map((e=>e.defaultSize?(n-=e.defaultSize,t-=1,e.defaultSize):null)),r=n/t;return i.map((e=>null===e?r:e))}(o);s(n)}),[y,o]),L((()=>{a.length&&y.setDebounced(o,a)}),[y,o,a]),T((()=>{const e=new ResizeObserver((()=>{const{panels:e,widths:t}=d.current,n=Qt(e,t,window.innerWidth);t.some(((e,t)=>e!==n[t]))&&s(n)}));return e.observe(t.current),()=>{e.disconnect()}}),[]);const w=R((()=>({activeResizer:l,drag:g,getPanelStyle:u,registerElement:p,startDragging:m,stopDragging:v,unregisterElement:h})),[l,g,u,p,m,v,h]);return n(Tt.Provider,{value:w,children:n(Yt,{ref:t,children:e})})},tn=function(e){const{children:t,navigate:i}=e,r=O(((e,t=void 0)=>{i(t||{},e?{preview:e}:{})}),[i]);return n(de.Provider,{value:r,children:t})};function nn(e){const{unstable_navigator:t}=e,i=!(null==t||!t.component),[o,a]=function(e,t){const[n,i]=$((()=>{var n;return JSON.parse(null!=(n=localStorage.getItem(e))?n:JSON.stringify(t))}));return L((()=>{localStorage.setItem(e,JSON.stringify(n))}),[e,n]),[n,i]}("presentation/navigator",i),s=!!i&&o,l=R((()=>{if(i)return()=>a((e=>!e))}),[i,a]),c=O((function(){return n(r,{children:s&&n(rn,{...t})})}),[s,t]);return[{navigatorEnabled:s,toggleNavigator:l},c]}const rn=A((function(e){const{minWidth:t,maxWidth:o,component:a}=e,s=null!=t&&null!=o&&t===o;return i(r,{children:[n(At,{id:"navigator",minWidth:t,maxWidth:o,order:1,children:n(a,{})}),n(Mt,{order:2,disabled:s})]})})),on=function(e){const{children:t,params:i}=e,r=R((()=>i),[i]);return n(ue.Provider,{value:r,children:t})},an=function(e){const{children:t,deskParams:i,devMode:r,name:o,navigate:a,params:s}=e,l=R((()=>({deskParams:i,devMode:r,name:o,navigate:a,params:s})),[i,r,o,a,s]);return n(ce.Provider,{value:l,children:t})},sn="ACTION_IFRAME_LOADED",ln="ACTION_IFRAME_REFRESH",cn="ACTION_IFRAME_RELOAD",dn="ACTION_PERSPECTIVE",un="ACTION_VIEWPORT",pn="ACTION_VISUAL_EDITING_OVERLAYS_TOGGLE",hn=(e,t)=>{switch(t.type){case sn:return"loaded"===e.iframe.status?e:{...e,iframe:{...e.iframe,status:"loaded"}};case ln:return"refreshing"===e.iframe.status?e:{...e,iframe:{...e.iframe,status:"refreshing"}};case cn:return"reloading"===e.iframe.status?e:{...e,iframe:{...e.iframe,status:"reloading"}};case dn:return{...e,perspective:mt(vn,t.perspective)};case un:return{...e,viewport:mt(gn,t.viewport)};case pn:return fn(e,t);default:return e}},fn=(e,t)=>e.visualEditing.overlaysEnabled===t.enabled?e:{...e,visualEditing:{...e.visualEditing,overlaysEnabled:t.enabled}},mn=ft(["loading","loaded","refreshing","reloading"]),vn=pt(ft(["published","previewDrafts"]),"previewDrafts"),gn=pt(ft(["desktop","mobile"]),"desktop"),yn=ht({iframe:ht({status:mn}),perspective:vn,viewport:gn,visualEditing:ht({overlaysEnabled:function e(t,n){const[i,r]=ot(t,n);return{type:"boolean",expects:"boolean",async:!1,message:i,pipe:r,_parse(t,n){return"boolean"==typeof t?dt(this,t,n):ut(this,e,t,n)}}}()})}),wn={iframe:{status:"loading"},perspective:"previewDrafts",viewport:"desktop",visualEditing:{overlaysEnabled:!1}};function bn(e){return mt(yn,{...wn,...e})}const xn=je(le.iframe`
`,Yt=function({children:e}){const t=T(null),[r,i]=U(new Map),o=R((()=>Xt(r).filter(Jt)),[r]),[a,s]=U([]),[l,c]=U(null),d=T({elements:r,panels:o,widths:a}),u=O((e=>({flexGrow:qt(o,e,a),pointerEvents:null===l?void 0:"none"})),[l,o,a]),p=O(((e,t)=>{i((n=>{if(n.has(e))return n;const r=new Map(n);return r.set(e,t),r}))}),[]),h=O((e=>{i((t=>{if(!t.has(e))return t;const n=new Map(t);return n.delete(e),n}))}),[]),f=T({containerWidth:window.innerWidth,dragOffset:0,panelAfter:null,panelBefore:null,resizerIndex:-1,resizerRect:null,startX:0,widths:[]}),m=O(((e,t)=>{const n=Xt(r),i=n.findIndex((t=>t.id===e)),o=r.get(e);if(!o||!Ht(o))return;const a=o.el.current;a&&(f.current={resizerIndex:i,panelBefore:n.reduce(((e,t,n)=>Jt(t)&&n<i?t:e),null),panelAfter:n.reduce(((e,t,n)=>null===e&&Jt(t)&&n>i?t:e),null),containerWidth:window.innerWidth,startX:t.pageX,dragOffset:Gt(t,a),resizerRect:a.getBoundingClientRect(),widths:d.current.widths},c(e))}),[r]),v=O((()=>{c(null)}),[]),g=O(((e,n)=>{n.preventDefault(),n.stopPropagation();const{containerWidth:i,dragOffset:o,panelBefore:a,panelAfter:l,resizerRect:c}=f.current;if(null==a||null==l)return;const u=r.get(e);if(!u||!Ht(u))return;const p=u.el.current;if(!p)return;const h=Gt(n,p,o,c);if(0===h)return;const{widths:m}=d.current,v=function(e,t,n,r,i,o){const{panels:a,widths:s}=i,{widths:l}=o,c=l||s,d=[...c];{const i=e<0?r:n,o=c[a.findIndex((e=>e.id===i.id))],s=Kt(i,o+Math.abs(e),t);if(o===s)return c;e=e<0?o-s:s-o}let u=0,p=e<0?n:r,h=a.findIndex((e=>e.id===p.id));for(;;){const n=a[h],r=c[h],i=Kt(n,r-(Math.abs(e)-Math.abs(u)),t);if(r!==i&&(u+=r-i,d[h]=i,u.toPrecision(10).localeCompare(Math.abs(e).toPrecision(10),void 0,{numeric:!0})>=0))break;if(e<0){if(--h<0)break}else if(++h>=a.length)break}return 0===u?c:(p=e<0?r:n,h=a.findIndex((e=>e.id===p.id)),d[h]=c[h]+u,d)}(h/t.current.getBoundingClientRect().width*100,i,a,l,d.current,f.current);m.some(((e,t)=>e!==v[t]))&&s(v)}),[r]);L((()=>{d.current.elements=r,d.current.panels=o,d.current.widths=a}),[r,o,a]);const y=Bt();L((()=>{const{widths:e}=d.current;if(e.length===o.length)return;const t=y.get(o);if(t){const e=Zt(o,t,window.innerWidth);return void s(e)}const n=function(e){let t=e.length,n=100;const r=e.map((e=>e.defaultSize?(n-=e.defaultSize,t-=1,e.defaultSize):null)),i=n/t;return r.map((e=>null===e?i:e))}(o);s(n)}),[y,o]),$((()=>{a.length&&y.setDebounced(o,a)}),[y,o,a]),L((()=>{const e=new ResizeObserver((()=>{const{panels:e,widths:t}=d.current,n=Zt(e,t,window.innerWidth);t.some(((e,t)=>e!==n[t]))&&s(n)}));return e.observe(t.current),()=>{e.disconnect()}}),[]);const w=R((()=>({activeResizer:l,drag:g,getPanelStyle:u,registerElement:p,startDragging:m,stopDragging:v,unregisterElement:h})),[l,g,u,p,m,v,h]);return n(jt.Provider,{value:w,children:n(Qt,{ref:t,children:e})})},en=function(e){const{children:t,navigate:r}=e,i=O(((e,t=void 0)=>{r(t||{},e?{preview:e}:{})}),[r]);return n(ce.Provider,{value:i,children:t})};function tn(e){const{unstable_navigator:t}=e,r=!(null==t||!t.component),[o,a]=function(e,t){const[n,r]=U((()=>{var n;return JSON.parse(null!=(n=localStorage.getItem(e))?n:JSON.stringify(t))}));return $((()=>{localStorage.setItem(e,JSON.stringify(n))}),[e,n]),[n,r]}("presentation/navigator",r),s=!!r&&o,l=R((()=>{if(r)return()=>a((e=>!e))}),[r,a]),c=O((function(){return n(i,{children:s&&n(nn,{...t})})}),[s,t]);return[{navigatorEnabled:s,toggleNavigator:l},c]}const nn=A((function(e){const{minWidth:t,maxWidth:o,component:a}=e,s=null!=t&&null!=o&&t===o;return r(i,{children:[n(Tt,{id:"navigator",minWidth:t,maxWidth:o,order:1,children:n(a,{})}),n(Wt,{order:2,disabled:s})]})})),rn=function(e){const{children:t,params:r}=e,i=R((()=>r),[r]);return n(de.Provider,{value:i,children:t})},on=function(e){const{children:t,deskParams:r,devMode:i,name:o,navigate:a,params:s}=e,l=R((()=>({deskParams:r,devMode:i,name:o,navigate:a,params:s})),[r,i,o,a,s]);return n(le.Provider,{value:l,children:t})},an="ACTION_IFRAME_LOADED",sn="ACTION_IFRAME_REFRESH",ln="ACTION_IFRAME_RELOAD",cn="ACTION_PERSPECTIVE",dn="ACTION_VIEWPORT",un="ACTION_VISUAL_EDITING_OVERLAYS_TOGGLE",pn=(e,t)=>{switch(t.type){case an:return"loaded"===e.iframe.status?e:{...e,iframe:{...e.iframe,status:"loaded"}};case sn:return"refreshing"===e.iframe.status?e:{...e,iframe:{...e.iframe,status:"refreshing"}};case ln:return"reloading"===e.iframe.status?e:{...e,iframe:{...e.iframe,status:"reloading"}};case cn:return{...e,perspective:ft(mn,t.perspective)};case dn:return{...e,viewport:ft(vn,t.viewport)};case un:return hn(e,t);default:return e}},hn=(e,t)=>e.visualEditing.overlaysEnabled===t.enabled?e:{...e,visualEditing:{...e.visualEditing,overlaysEnabled:t.enabled}},fn=ht(["loading","loaded","refreshing","reloading"]),mn=ut(ht(["published","previewDrafts"]),"previewDrafts"),vn=ut(ht(["desktop","mobile"]),"desktop"),gn=pt({iframe:pt({status:fn}),perspective:mn,viewport:vn,visualEditing:pt({overlaysEnabled:function e(t,n){const[r,i]=it(t,n);return{type:"boolean",expects:"boolean",async:!1,message:r,pipe:i,_parse(t,n){return"boolean"==typeof t?ct(this,t,n):dt(this,e,t,n)}}}()})}),yn={iframe:{status:"loading"},perspective:"previewDrafts",viewport:"desktop",visualEditing:{overlaysEnabled:!1}};function wn(e){return ft(gn,{...yn,...e})}const bn=$e(se.iframe`
border: 0;

@@ -53,3 +53,3 @@ max-height: 100%;

display: block;
`),kn=function(e){var t;const{basePath:i="/"}=(null==(t=K())?void 0:t.activeWorkspace)||{},{fontSize:o=1,onChange:a,origin:s,padding:l=3,value:c}=e,d=U(null),[u,p]=$(void 0),[h,f]=$(void 0),m=O((e=>{p(e.currentTarget.value)}),[]),v=O((e=>{var t;if("Enter"===e.key){if(void 0===u)return;const e=u.startsWith("/")||""===u?`${s}${u}`:u;if(!e.startsWith(s+"/")&&e!==s)return void f(`URL must start with ${s}`);if(!s&&(e.startsWith(`${i}/`)||e===i))return void f(`URL can't have the same base path as the Studio ${i}`);const n=e===s?s+"/":e;f(void 0),p(void 0),a(n.slice(s.length)),null==(t=d.current)||t.blur()}"Escape"===e.key&&(f(void 0),p(void 0))}),[i,a,s,u]),y=O((()=>{f(void 0),p(void 0)}),[]);L((()=>{f(void 0),p(void 0)}),[s,c]);const w=R((()=>({icon:we})),[]);return n(r,{children:n(g,{clearButton:h?w:void 0,customValidity:h,fontSize:o,onBlur:y,onClear:()=>{f(void 0),p(s+c)},onChange:m,onKeyDownCapture:v,padding:l,style:{zIndex:1},radius:2,ref:d,space:l,value:void 0===u?`${s}${c}`:u})})};function En(e){const{initialUrl:t,openPopup:o,previewLocationOrigin:a,previewLocationRoute:s}=e,l=O((e=>{e.preventDefault(),o(e.currentTarget.href)}),[o]);return i(r,{children:[n(Pn,{initialUrl:t,previewLocationOrigin:a,previewLocationRoute:s}),n(y,{icon:be,text:"Open preview",as:"a",href:`${a}${s}`,onClick:l,rel:"opener",target:"_blank"})]})}function Pn(e){const{initialUrl:t,previewLocationOrigin:i,previewLocationRoute:r}=e,{push:o}=w(),a=q({apiVersion:pe}),s=G(),[l,c]=$(!1);return n(y,{disabled:l,onClick:()=>{if(null==navigator||!navigator.clipboard)return o({closable:!0,status:"error",title:"Clipboard not supported"}),!1;c(!0);let e,n=`${i}${r}`;const l=()=>{o({id:e,closable:!0,status:"success",title:"The URL is copied to the clipboard"}),c(!1)},d=e=>{o({closable:!0,status:"error",title:"Copy failed",description:e.message||e.toString()}),c(!1)};if(Re(t)&&typeof ClipboardItem<"u"){const i="text/plain",c=new ClipboardItem({[i]:(async()=>{e=o({closable:!0,title:"Copying URL to clipboard…"});const l=await Ae(a,"@sanity/presentation",typeof window>"u"?"":location.href,null==s?void 0:s.id);return n=$e(t,l.secret,r).toString(),new Blob([n],{type:i})})()});navigator.clipboard.write([c]).then(l).catch(d)}else navigator.clipboard.writeText(n).then(l).catch(d)},text:"Copy link",icon:xe})}const Sn=je(s),In=le(b)`
`),xn=function(e){var t;const{basePath:r="/"}=(null==(t=K())?void 0:t.activeWorkspace)||{},{fontSize:o=1,onChange:a,origin:s,padding:l=3,value:c}=e,d=T(null),[u,p]=U(void 0),[h,f]=U(void 0),m=O((e=>{p(e.currentTarget.value)}),[]),v=O((e=>{var t;if("Enter"===e.key){if(void 0===u)return;const e=u.startsWith("/")||""===u?`${s}${u}`:u;if(!e.startsWith(s+"/")&&e!==s)return void f(`URL must start with ${s}`);if(!s&&(e.startsWith(`${r}/`)||e===r))return void f(`URL can't have the same base path as the Studio ${r}`);const n=e===s?s+"/":e;f(void 0),p(void 0),a(n.slice(s.length)),null==(t=d.current)||t.blur()}"Escape"===e.key&&(f(void 0),p(void 0))}),[r,a,s,u]),y=O((()=>{f(void 0),p(void 0)}),[]);$((()=>{f(void 0),p(void 0)}),[s,c]);const w=R((()=>({icon:ye})),[]);return n(i,{children:n(g,{clearButton:h?w:void 0,customValidity:h,fontSize:o,onBlur:y,onClear:()=>{f(void 0),p(s+c)},onChange:m,onKeyDownCapture:v,padding:l,style:{zIndex:1},radius:2,ref:d,space:l,value:void 0===u?`${s}${c}`:u})})};function kn(e){const{initialUrl:t,openPopup:o,previewLocationOrigin:a,previewLocationRoute:s}=e,l=O((e=>{e.preventDefault(),o(e.currentTarget.href)}),[o]);return r(i,{children:[n(Pn,{initialUrl:t,previewLocationOrigin:a,previewLocationRoute:s}),n(y,{icon:we,text:"Open preview",as:"a",href:`${a}${s}`,onClick:l,rel:"opener",target:"_blank"})]})}function Pn(e){const{initialUrl:t,previewLocationOrigin:r,previewLocationRoute:i}=e,{push:o}=w(),a=q({apiVersion:ue}),s=G(),[l,c]=U(!1);return n(y,{disabled:l,onClick:()=>{if(null==navigator||!navigator.clipboard)return o({closable:!0,status:"error",title:"Clipboard not supported"}),!1;c(!0);let e,n=`${r}${i}`;const l=()=>{o({id:e,closable:!0,status:"success",title:"The URL is copied to the clipboard"}),c(!1)},d=e=>{o({closable:!0,status:"error",title:"Copy failed",description:e.message||e.toString()}),c(!1)};if(Oe(t)&&typeof ClipboardItem<"u"){const r="text/plain",c=new ClipboardItem({[r]:(async()=>{e=o({closable:!0,title:"Copying URL to clipboard…"});const l=await Te(a,"@sanity/presentation",typeof window>"u"?"":location.href,null==s?void 0:s.id);return n=Re(t,l.secret,i).toString(),new Blob([n],{type:r})})()});navigator.clipboard.write([c]).then(l).catch(d)}else navigator.clipboard.writeText(n).then(l).catch(d)},text:"Copy link",icon:be})}const En=$e(s),Sn=se(b)`
& > span {

@@ -78,4 +78,4 @@ width: 21px;

}
`,Cn={previewDrafts:"Drafts",published:"Published"},zn="caution",Dn="positive",On={previewDrafts:De,published:Oe},Rn=D((function(e,t){const{dispatch:o,iframe:l,initialUrl:u,loadersConnection:v,navigatorEnabled:g,onPathChange:w,onRefresh:b,openPopup:C,overlaysConnection:z,params:D,perspective:j,targetOrigin:T,toggleNavigator:U,toggleOverlay:A,viewport:W,visualEditing:{overlaysEnabled:M}}=e,{devMode:N}=kt(),F=x(),V=O((()=>o({type:un,viewport:"desktop"})),[o]),B=O((()=>o({type:un,viewport:"mobile"})),[o]),K="loading"===l.status||"reloading"===l.status,[q,G]=$(!1),H="refreshing"===l.status,[X,Z]=$(!1),Q=K||H||"connecting"===z,Y=R((()=>T===location.origin?"":T),[T]),ee=O((()=>{b((()=>{"function"==typeof t||null==t||!t.current||(o({type:cn}),t.current.src=`${T}${D.preview||"/"}`)}))}),[o,b,D.preview,T,t]),te=O((()=>{"function"==typeof t||null==t||!t.current||(t.current.src=u.toString(),o({type:cn}))}),[o,t,u]),ne=O((()=>{re(!0)}),[]),[ie,re]=$(!1),[oe,ae]=$(!1);L((()=>{if(!(K||H||"connecting"!==z&&"reconnecting"!==z)){const e=setTimeout((()=>{ae(!0)}),1e3);return()=>clearTimeout(e)}}),[z,K,H]),L((()=>{if(!K&&!H&&oe){if("connected"===z&&(Z(!1),ae(!1),G(!1),re(!1)),"connecting"===z){const e=setTimeout((()=>{G(!0),console.error("Unable to connect to visual editing. Make sure you've setup '@sanity/visual-editing' correctly")}),he);return()=>clearTimeout(e)}if("reconnecting"===z){const e=setTimeout((()=>{G(!0),Z(!0)}),he);return()=>clearTimeout(e)}"disconnected"===z&&Z(!0)}}),[K,z,H,oe]);const se=R((()=>{const e=new URL(D.preview||"/",T),{pathname:t,search:n}=Le(e);return`${t}${n}`}),[D.preview,T]),le=O((()=>{o({type:sn})}),[o]);return L((()=>{if("function"==typeof t||null==t||!t.current)return;const e=t.current;function n(){e===document.activeElement&&e.dispatchEvent(new MouseEvent("mousedown",{bubbles:!0,cancelable:!0}))}return window.addEventListener("blur",n),()=>{window.removeEventListener("blur",n)}}),[t]),n(Te,{transition:F?{duration:0}:void 0,children:i(k,{delay:1e3,children:[n(a,{flex:"none",padding:2,shadow:1,style:{position:"relative"},children:i(s,{align:"center",gap:2,style:{minHeight:0},children:[U&&n(E,{animate:!0,content:n(d,{size:1,children:"Toggle navigator"}),fallbackPlacements:["bottom-start"],padding:2,placement:"bottom",portal:!0,children:n(h,{"aria-label":"Toggle navigator",fontSize:1,icon:ke,mode:"bleed",onClick:U,padding:3,selected:g})}),n(E,{animate:!0,content:i(s,{align:"center",style:{whiteSpace:"nowrap"},children:[n(p,{padding:1,children:n(d,{size:1,children:M?"Disable edit overlay":"Enable edit overlay"})}),n(p,{paddingY:1,children:n(J,{keys:["Alt"],style:{marginTop:-4,marginBottom:-4}})})]}),fallbackPlacements:["bottom-start"],padding:1,placement:"bottom",portal:!0,children:n(a,{as:"label",flex:"none",padding:3,style:{lineHeight:0,borderRadius:999,userSelect:"none"},tone:M?"positive":void 0,children:i(s,{align:"center",gap:2,children:[n("div",{style:{margin:-2},children:n(In,{checked:M,onChange:A,disabled:"loading"===l.status||"connected"!==z})}),n(p,{children:n(d,{muted:!0,size:1,weight:"medium",children:"Edit"})})]})})}),n(E,{animate:!0,content:n(d,{size:1,children:"loading"===l.status?"Loading…":"reloading"===l.status||"refreshing"===l.status?"Refreshing…":"Refresh preview"}),fallbackPlacements:["bottom-start"],padding:2,placement:"bottom",portal:!0,children:n(h,{"aria-label":"Refresh preview",fontSize:1,icon:Ee,mode:"bleed",loading:"reloading"===l.status||"refreshing"===l.status,onClick:ee,padding:3})}),n(p,{flex:1,children:n(kn,{onChange:w,origin:Y,value:se})}),n(s,{align:"center",flex:"none",gap:1,children:n(P,{button:n(h,{fontSize:1,iconRight:Pe,mode:"bleed",padding:3,space:2}),id:"location-menu",menu:n(S,{children:n(En,{initialUrl:u,openPopup:C,previewLocationOrigin:Y,previewLocationRoute:se})}),popover:{animate:!0,constrainSize:!0,placement:"bottom",portal:!0}})}),n(s,{align:"center",flex:"none",gap:1,children:n(P,{button:n(h,{fontSize:1,iconRight:Se,mode:"bleed",padding:3,space:2,text:Cn["connected"===v?j:"previewDrafts"],loading:"reconnecting"===v&&"loaded"!==l.status,disabled:"connected"!==v}),id:"perspective-menu",menu:i(S,{style:{maxWidth:240},children:[n(y,{fontSize:1,onClick:()=>o({type:dn,perspective:"previewDrafts"}),padding:3,pressed:"previewDrafts"===j,tone:zn,children:i(s,{align:"flex-start",gap:3,children:[n(p,{flex:"none",children:n(d,{size:1,children:_(On.previewDrafts)})}),i(c,{flex:1,space:2,children:[n(d,{size:1,weight:"medium",children:Cn.previewDrafts}),n(d,{muted:!0,size:1,children:"View this page with latest draft content"})]}),n(p,{flex:"none",children:n(d,{muted:!0,size:1,style:{opacity:"previewDrafts"===j?1:0},children:n(Ie,{})})})]})}),n(y,{fontSize:1,onClick:()=>o({type:dn,perspective:"published"}),padding:3,pressed:"published"===j,tone:Dn,children:i(s,{align:"flex-start",gap:3,children:[n(p,{flex:"none",children:n(d,{size:1,children:_(On.published)})}),i(c,{flex:1,space:2,children:[n(d,{size:1,weight:"medium",children:Cn.published}),n(d,{muted:!0,size:1,children:"View this page with published content"})]}),n(p,{flex:"none",children:n(d,{muted:!0,size:1,style:{opacity:"published"===j?1:0},children:n(Ie,{})})})]})})]}),popover:{animate:!0,constrainSize:!0,placement:"bottom",portal:!0}})}),i(s,{align:"center",flex:"none",gap:1,children:[n(E,{animate:!0,content:n(d,{size:1,children:"Full viewport"}),fallbackPlacements:["bottom-start"],padding:2,placement:"bottom",portal:!0,children:n(h,{"aria-label":"Full viewport",fontSize:1,icon:Ce,mode:"bleed",onClick:V,padding:3,selected:"desktop"===W})}),n(E,{animate:!0,content:n(d,{size:1,children:"Narrow viewport"}),padding:2,placement:"bottom",portal:!0,children:n(h,{"aria-label":"Narrow viewport",fontSize:1,icon:ze,mode:"bleed",onClick:B,padding:3,selected:"mobile"===W})})]})]})}),n(a,{flex:1,tone:"transparent",children:i(s,{align:"center",height:"fill",justify:"center",padding:"desktop"===W?0:2,sizing:"border",style:{position:"relative",cursor:Q?"wait":void 0},children:[n(Ue,{children:X||K||H||!oe||ie?(K||"connecting"===z&&"refreshing"!==l.status)&&!ie?n(Sn,{initial:"initial",animate:"animate",exit:"exit",variants:Ln,justify:"center",align:"center",style:{inset:"0",position:"absolute"},children:i(s,{style:{...$n[W]},justify:"center",align:"center",direction:"column",gap:4,children:[n(I,{muted:!0}),n(d,{muted:!0,size:1,children:"Loading…"})]})}):X&&!ie?n(Sn,{initial:"initial",animate:"animate",exit:"exit",variants:jn,justify:"center",align:"center",style:{background:"var(--card-bg-color)",inset:"0",position:"absolute",borderTop:"1px solid transparent",boxShadow:"0 0 0 1px var(--card-border-color)"},children:n(xt,{flex:1,message:"Could not connect to the preview",onRetry:te,onContinueAnyway:ne,children:N&&i(r,{children:["connected"!==z&&n(a,{padding:3,radius:2,tone:"critical",children:i(c,{space:3,children:[n(m,{muted:!0,size:0,children:"Overlay connection status"}),n(f,{size:1,children:z})]})}),"connected"!==v&&n(a,{padding:3,radius:2,tone:"critical",children:i(c,{space:3,children:[n(m,{muted:!0,size:0,children:"Loader connection status"}),n(f,{size:1,children:v})]})})]})})}):null:n(Sn,{initial:"initial",animate:"animate",exit:"exit",variants:Ln,justify:"center",align:"center",style:{inset:"0",position:"absolute",backdropFilter:q?"blur(16px) saturate(0.5) grayscale(0.5)":"blur(2px)",transition:"backdrop-filter 0.2s ease-in-out",WebkitBackdropFilter:q?"blur(16px) saturate(0.5) grayscale(0.5)":"blur(2px)",WebkitTransition:"-webkit-backdrop-filter 0.2s ease-in-out",zIndex:1},children:i(s,{style:{...$n[W]},justify:"center",align:"center",direction:"column",gap:4,children:[q&&n(h,{disabled:!0,fontSize:1,mode:"ghost",text:"Continue anyway",style:{opacity:0}}),n(a,{radius:2,tone:q?"caution":"inherit",padding:4,shadow:1,children:i(s,{justify:"center",align:"center",direction:"column",gap:4,children:[n(I,{muted:!0}),n(d,{muted:!0,size:1,children:q?n(r,{children:"Unable to connect, check the browser console for more information."}):"Connecting…"})]})}),q&&n(h,{fontSize:1,tone:"critical",onClick:ne,text:"Continue anyway"})]})})}),n(xn,{ref:t,style:{pointerEvents:(K||"connecting"===z&&"refreshing"!==l.status)&&!ie?"none":"auto",boxShadow:"0 0 0 1px var(--card-border-color)",borderTop:"1px solid transparent"},src:u.toString(),initial:["background"],variants:Tn,animate:[(K||"connecting"===z&&"refreshing"!==l.status)&&!ie?"background":"active",K?"reloading":"idle",W,oe&&!ie?"timedOut":""],onLoad:le})]})})]})})})),$n={desktop:{width:"100%",height:"100%"},mobile:{width:375,height:650}},Ln={initial:{opacity:1},animate:{opacity:[0,0,1]},exit:{opacity:[1,0,0]}},jn={initial:{opacity:1},animate:{opacity:[0,0,1]},exit:{opacity:[1,0,0]}},Tn={desktop:{...$n.desktop,boxShadow:"0 0 0 0px var(--card-border-color)"},mobile:{...$n.mobile,boxShadow:"0 0 0 1px var(--card-border-color)"},background:{opacity:0,scale:1},idle:{scale:1},reloading:{scale:[1,1,1,.98]},active:{opacity:[0,0,1],scale:1},timedOut:{opacity:[0,0,1]}};let Un=!1;function An(e){var t;if(void 0===e)return;const n=null==(t=decodeURIComponent(e))?void 0:t.split(".");return"drafts"===n[0]&&n.shift(),n.join(".")}function _n(e){if(void 0!==e)return o.toString(function(e){const t=[];for(const n of e.split(".")){const e=vt.exec(n);if(e){t.push(e[1],Number(e[2]));continue}const i=gt.exec(n);if(i){t.push(i[1],[Number(i[2]),Number(i[3])]);continue}const r=yt.exec(n);r?t.push(r[1],{_key:r[2]}):t.push(n)}return t}(decodeURIComponent(e)))}function Wn(e){return Object.fromEntries(Object.entries(e).filter((([,e])=>void 0!==e&&""!==e&&null!==e)))}function Mn({initialPreviewUrl:e,routerNavigate:t,routerState:n,routerSearchParams:i,frameStateRef:r}){const o=R((()=>{const{id:t,path:r,type:o}={id:An((a=n).id),path:_n(a.path),type:a.type};var a;return{id:t,type:o,path:r,preview:i.preview||`${e.pathname}${e.search}`,perspective:i.perspective,viewport:i.viewport,inspect:i.inspect,rev:i.rev,since:i.since,template:i.template,templateParams:i.templateParams,view:i.view,pathKey:i.pathKey,instruction:i.instruction,comment:i.comment}}),[n,i,e]),a=R((()=>Wn({inspect:o.inspect,path:o.path,rev:o.rev,since:o.since,template:o.template,templateParams:o.templateParams,view:o.view,pathKey:o.pathKey,instruction:o.instruction,comment:o.comment})),[o.comment,o.inspect,o.instruction,o.path,o.pathKey,o.rev,o.since,o.template,o.templateParams,o.view]),s=U(n);L((()=>{s.current=n}),[n]);return{deskParams:a,navigate:R((()=>Nt(((e,n={},i)=>{e.id&&(e.id=B(e.id));const{_searchParams:o,...a}=s.current,l=(o||[]).reduce(((e,[t,n])=>(e[t]=n,e)),{}),c=Wn({...a,...e}),d=Wn({...l,...n});a.id!==c.id&&(delete d.template,delete d.templateParams),c._searchParams=Object.entries(d).reduce(((e,[t,n])=>[...e,[t,n]]),[]);const u=null!=i?i:d.preview===r.current.url;t(c,{replace:u})}),50)),[t,r]),params:o}}function Nn(e,t,n){var i,r;const o=q({apiVersion:pe}),a=K(),s=(null==(i=null==a?void 0:a.activeWorkspace)?void 0:i.basePath)||"/",l=(null==(r=null==a?void 0:a.activeWorkspace)?void 0:r.name)||"default",c=function(e,t,n){const i=G();return R((()=>["@sanity/presentation",t,n,e,null==i?void 0:i.id,Fn]),[t,null==i?void 0:i.id,e,n])}(t,s,l),d=function(e,t){const n=q({apiVersion:pe}),i=G(),[r,o]=$(""),a=e?Me((async()=>await Ae(n,"@sanity/presentation",typeof window>"u"?"":location.href,null==i?void 0:i.id)),[...t,r]):null;return L((()=>{if(!a)return;const e=setTimeout((()=>{W((()=>o(a.expiresAt.toString())))}),a.expiresAt.getTime()-Date.now());return()=>clearTimeout(e)}),[a]),(null==a?void 0:a.secret)||null}("object"==typeof e||"function"==typeof e,c);return Me((async()=>{if("string"==typeof e){const t=new URL(e,location.origin);let i=t;try{if(n){const e=new URL(n,t);e.origin===t.origin&&(i=e)}else if(document.referrer){const e=new URL(document.referrer);e.origin===t.origin&&(i=e)}}catch{}return location.origin!==i.origin||!i.pathname.startsWith(`${s}/`)&&i.pathname!==s?i:t}const t=await("object"==typeof e?We(e):e)({client:o,previewUrlSecret:d,previewSearchParam:n,referrer:typeof document>"u"?null:document.referrer,studioBasePath:s});return new URL(t,location.origin)}),[...c,d])}const Fn=Symbol();const Vn=F((()=>import("./LoaderQueries.js"))),Bn=F((()=>import("./PostMessageRefreshMutations.js"))),Kn=le(s)`
`,In={previewDrafts:"Drafts",published:"Published"},zn="caution",Cn="positive",Dn={previewDrafts:Ce,published:De},On=D((function(e,t){const{dispatch:o,iframe:l,initialUrl:u,loadersConnection:v,navigatorEnabled:g,onPathChange:w,onRefresh:b,openPopup:z,overlaysConnection:C,params:D,perspective:j,targetOrigin:L,toggleNavigator:T,toggleOverlay:A,viewport:W,visualEditing:{overlaysEnabled:M}}=e,{devMode:N}=xt(),F=x(),V=O((()=>o({type:dn,viewport:"desktop"})),[o]),B=O((()=>o({type:dn,viewport:"mobile"})),[o]),K="loading"===l.status||"reloading"===l.status,[q,G]=U(!1),H="refreshing"===l.status,[X,Z]=U(!1),Q=K||H||"connecting"===C,Y=R((()=>L===location.origin?"":L),[L]),ee=O((()=>{b((()=>{"function"==typeof t||null==t||!t.current||(o({type:ln}),t.current.src=`${L}${D.preview||"/"}`)}))}),[o,b,D.preview,L,t]),te=O((()=>{"function"==typeof t||null==t||!t.current||(t.current.src=u.toString(),o({type:ln}))}),[o,t,u]),ne=O((()=>{ie(!0)}),[]),[re,ie]=U(!1),[oe,ae]=U(!1);$((()=>{if(!(K||H||"connecting"!==C&&"reconnecting"!==C)){const e=setTimeout((()=>{ae(!0)}),1e3);return()=>clearTimeout(e)}}),[C,K,H]),$((()=>{if(!K&&!H&&oe){if("connected"===C&&(Z(!1),ae(!1),G(!1),ie(!1)),"connecting"===C){const e=setTimeout((()=>{G(!0),console.error("Unable to connect to visual editing. Make sure you've setup '@sanity/visual-editing' correctly")}),pe);return()=>clearTimeout(e)}if("reconnecting"===C){const e=setTimeout((()=>{G(!0),Z(!0)}),pe);return()=>clearTimeout(e)}"disconnected"===C&&Z(!0)}}),[K,C,H,oe]);const se=R((()=>{const e=new URL(D.preview||"/",L),{pathname:t,search:n}=Ue(e);return`${t}${n}`}),[D.preview,L]),le=O((()=>{o({type:an})}),[o]);return $((()=>{if("function"==typeof t||null==t||!t.current)return;const e=t.current;function n(){e===document.activeElement&&e.dispatchEvent(new MouseEvent("mousedown",{bubbles:!0,cancelable:!0}))}return window.addEventListener("blur",n),()=>{window.removeEventListener("blur",n)}}),[t]),n(je,{transition:F?{duration:0}:void 0,children:r(k,{delay:1e3,children:[n(a,{flex:"none",padding:2,shadow:1,style:{position:"relative"},children:r(s,{align:"center",gap:2,style:{minHeight:0},children:[T&&n(P,{animate:!0,content:n(d,{size:1,children:"Toggle navigator"}),fallbackPlacements:["bottom-start"],padding:2,placement:"bottom",portal:!0,children:n(h,{"aria-label":"Toggle navigator",fontSize:1,icon:xe,mode:"bleed",onClick:T,padding:3,selected:g})}),n(P,{animate:!0,content:r(s,{align:"center",style:{whiteSpace:"nowrap"},children:[n(p,{padding:1,children:n(d,{size:1,children:M?"Disable edit overlay":"Enable edit overlay"})}),n(p,{paddingY:1,children:n(J,{keys:["Alt"],style:{marginTop:-4,marginBottom:-4}})})]}),fallbackPlacements:["bottom-start"],padding:1,placement:"bottom",portal:!0,children:n(a,{as:"label",flex:"none",padding:3,style:{lineHeight:0,borderRadius:999,userSelect:"none"},tone:M?"positive":void 0,children:r(s,{align:"center",gap:2,children:[n("div",{style:{margin:-2},children:n(Sn,{checked:M,onChange:A,disabled:"loading"===l.status||"connected"!==C})}),n(p,{children:n(d,{muted:!0,size:1,weight:"medium",children:"Edit"})})]})})}),n(P,{animate:!0,content:n(d,{size:1,children:"loading"===l.status?"Loading…":"reloading"===l.status||"refreshing"===l.status?"Refreshing…":"Refresh preview"}),fallbackPlacements:["bottom-start"],padding:2,placement:"bottom",portal:!0,children:n(h,{"aria-label":"Refresh preview",fontSize:1,icon:ke,mode:"bleed",loading:"reloading"===l.status||"refreshing"===l.status,onClick:ee,padding:3})}),n(p,{flex:1,children:n(xn,{onChange:w,origin:Y,value:se})}),n(s,{align:"center",flex:"none",gap:1,children:n(E,{button:n(h,{fontSize:1,iconRight:Pe,mode:"bleed",padding:3,space:2}),id:"location-menu",menu:n(S,{children:n(kn,{initialUrl:u,openPopup:z,previewLocationOrigin:Y,previewLocationRoute:se})}),popover:{animate:!0,constrainSize:!0,placement:"bottom",portal:!0}})}),n(s,{align:"center",flex:"none",gap:1,children:n(E,{button:n(h,{fontSize:1,iconRight:Ee,mode:"bleed",padding:3,space:2,text:In["connected"===v?j:"previewDrafts"],loading:"reconnecting"===v&&"loaded"!==l.status,disabled:"connected"!==v}),id:"perspective-menu",menu:r(S,{style:{maxWidth:240},children:[n(y,{fontSize:1,onClick:()=>o({type:cn,perspective:"previewDrafts"}),padding:3,pressed:"previewDrafts"===j,tone:zn,children:r(s,{align:"flex-start",gap:3,children:[n(p,{flex:"none",children:n(d,{size:1,children:_(Dn.previewDrafts)})}),r(c,{flex:1,space:2,children:[n(d,{size:1,weight:"medium",children:In.previewDrafts}),n(d,{muted:!0,size:1,children:"View this page with latest draft content"})]}),n(p,{flex:"none",children:n(d,{muted:!0,size:1,style:{opacity:"previewDrafts"===j?1:0},children:n(Se,{})})})]})}),n(y,{fontSize:1,onClick:()=>o({type:cn,perspective:"published"}),padding:3,pressed:"published"===j,tone:Cn,children:r(s,{align:"flex-start",gap:3,children:[n(p,{flex:"none",children:n(d,{size:1,children:_(Dn.published)})}),r(c,{flex:1,space:2,children:[n(d,{size:1,weight:"medium",children:In.published}),n(d,{muted:!0,size:1,children:"View this page with published content"})]}),n(p,{flex:"none",children:n(d,{muted:!0,size:1,style:{opacity:"published"===j?1:0},children:n(Se,{})})})]})})]}),popover:{animate:!0,constrainSize:!0,placement:"bottom",portal:!0}})}),r(s,{align:"center",flex:"none",gap:1,children:[n(P,{animate:!0,content:n(d,{size:1,children:"Full viewport"}),fallbackPlacements:["bottom-start"],padding:2,placement:"bottom",portal:!0,children:n(h,{"aria-label":"Full viewport",fontSize:1,icon:Ie,mode:"bleed",onClick:V,padding:3,selected:"desktop"===W})}),n(P,{animate:!0,content:n(d,{size:1,children:"Narrow viewport"}),padding:2,placement:"bottom",portal:!0,children:n(h,{"aria-label":"Narrow viewport",fontSize:1,icon:ze,mode:"bleed",onClick:B,padding:3,selected:"mobile"===W})})]})]})}),n(a,{flex:1,tone:"transparent",children:r(s,{align:"center",height:"fill",justify:"center",padding:"desktop"===W?0:2,sizing:"border",style:{position:"relative",cursor:Q?"wait":void 0},children:[n(Le,{children:X||K||H||!oe||re?(K||"connecting"===C&&"refreshing"!==l.status)&&!re?n(En,{initial:"initial",animate:"animate",exit:"exit",variants:Un,justify:"center",align:"center",style:{inset:"0",position:"absolute"},children:r(s,{style:{...Rn[W]},justify:"center",align:"center",direction:"column",gap:4,children:[n(I,{muted:!0}),n(d,{muted:!0,size:1,children:"Loading…"})]})}):X&&!re?n(En,{initial:"initial",animate:"animate",exit:"exit",variants:$n,justify:"center",align:"center",style:{background:"var(--card-bg-color)",inset:"0",position:"absolute",borderTop:"1px solid transparent",boxShadow:"0 0 0 1px var(--card-border-color)"},children:n(bt,{flex:1,message:"Could not connect to the preview",onRetry:te,onContinueAnyway:ne,children:N&&r(i,{children:["connected"!==C&&n(a,{padding:3,radius:2,tone:"critical",children:r(c,{space:3,children:[n(m,{muted:!0,size:0,children:"Overlay connection status"}),n(f,{size:1,children:C})]})}),"connected"!==v&&n(a,{padding:3,radius:2,tone:"critical",children:r(c,{space:3,children:[n(m,{muted:!0,size:0,children:"Loader connection status"}),n(f,{size:1,children:v})]})})]})})}):null:n(En,{initial:"initial",animate:"animate",exit:"exit",variants:Un,justify:"center",align:"center",style:{inset:"0",position:"absolute",backdropFilter:q?"blur(16px) saturate(0.5) grayscale(0.5)":"blur(2px)",transition:"backdrop-filter 0.2s ease-in-out",WebkitBackdropFilter:q?"blur(16px) saturate(0.5) grayscale(0.5)":"blur(2px)",WebkitTransition:"-webkit-backdrop-filter 0.2s ease-in-out",zIndex:1},children:r(s,{style:{...Rn[W]},justify:"center",align:"center",direction:"column",gap:4,children:[q&&n(h,{disabled:!0,fontSize:1,mode:"ghost",text:"Continue anyway",style:{opacity:0}}),n(a,{radius:2,tone:q?"caution":"inherit",padding:4,shadow:1,children:r(s,{justify:"center",align:"center",direction:"column",gap:4,children:[n(I,{muted:!0}),n(d,{muted:!0,size:1,children:q?n(i,{children:"Unable to connect, check the browser console for more information."}):"Connecting…"})]})}),q&&n(h,{fontSize:1,tone:"critical",onClick:ne,text:"Continue anyway"})]})})}),n(bn,{ref:t,style:{pointerEvents:(K||"connecting"===C&&"refreshing"!==l.status)&&!re?"none":"auto",boxShadow:"0 0 0 1px var(--card-border-color)",borderTop:"1px solid transparent"},src:u.toString(),initial:["background"],variants:jn,animate:[(K||"connecting"===C&&"refreshing"!==l.status)&&!re?"background":"active",K?"reloading":"idle",W,oe&&!re?"timedOut":""],onLoad:le})]})})]})})})),Rn={desktop:{width:"100%",height:"100%"},mobile:{width:375,height:650}},Un={initial:{opacity:1},animate:{opacity:[0,0,1]},exit:{opacity:[1,0,0]}},$n={initial:{opacity:1},animate:{opacity:[0,0,1]},exit:{opacity:[1,0,0]}},jn={desktop:{...Rn.desktop,boxShadow:"0 0 0 0px var(--card-border-color)"},mobile:{...Rn.mobile,boxShadow:"0 0 0 1px var(--card-border-color)"},background:{opacity:0,scale:1},idle:{scale:1},reloading:{scale:[1,1,1,.98]},active:{opacity:[0,0,1],scale:1},timedOut:{opacity:[0,0,1]}};let Ln=!1;function Tn(e){var t;if(void 0===e)return;const n=null==(t=decodeURIComponent(e))?void 0:t.split(".");return"drafts"===n[0]&&n.shift(),n.join(".")}function An(e){if(void 0!==e)return o.toString(function(e){const t=[];for(const n of e.split(".")){const e=mt.exec(n);if(e){t.push(e[1],Number(e[2]));continue}const r=vt.exec(n);if(r){t.push(r[1],[Number(r[2]),Number(r[3])]);continue}const i=gt.exec(n);i?t.push(i[1],{_key:i[2]}):t.push(n)}return t}(decodeURIComponent(e)))}function _n(e){return Object.fromEntries(Object.entries(e).filter((([,e])=>void 0!==e&&""!==e&&null!==e)))}function Wn({initialPreviewUrl:e,routerNavigate:t,routerState:n,routerSearchParams:r,frameStateRef:i}){const o=R((()=>{const{id:t,path:i,type:o}={id:Tn((a=n).id),path:An(a.path),type:a.type};var a;return{id:t,type:o,path:i,preview:r.preview||`${e.pathname}${e.search}`,perspective:r.perspective,viewport:r.viewport,inspect:r.inspect,rev:r.rev,since:r.since,template:r.template,templateParams:r.templateParams,view:r.view,pathKey:r.pathKey,instruction:r.instruction,comment:r.comment}}),[n,r,e]),a=R((()=>_n({inspect:o.inspect,path:o.path,rev:o.rev,since:o.since,template:o.template,templateParams:o.templateParams,view:o.view,pathKey:o.pathKey,instruction:o.instruction,comment:o.comment})),[o.comment,o.inspect,o.instruction,o.path,o.pathKey,o.rev,o.since,o.template,o.templateParams,o.view]),s=T(n);$((()=>{s.current=n}),[n]);return{deskParams:a,navigate:R((()=>Mt(((e,n={},r)=>{e.id&&(e.id=B(e.id));const{_searchParams:o,...a}=s.current,l=(o||[]).reduce(((e,[t,n])=>(e[t]=n,e)),{}),c=_n({...a,...e}),d=_n({...l,...n});a.id!==c.id&&(delete d.template,delete d.templateParams),c._searchParams=Object.entries(d).reduce(((e,[t,n])=>[...e,[t,n]]),[]);const u=null!=r?r:d.preview===i.current.url;t(c,{replace:u})}),50)),[t,i]),params:o}}function Mn(e,t,n){var r,i;const o=q({apiVersion:ue}),a=K(),s=(null==(r=null==a?void 0:a.activeWorkspace)?void 0:r.basePath)||"/",l=(null==(i=null==a?void 0:a.activeWorkspace)?void 0:i.name)||"default",c=function(e,t,n){const r=G();return R((()=>["@sanity/presentation",t,n,e,null==r?void 0:r.id,Nn]),[t,null==r?void 0:r.id,e,n])}(t,s,l),d=function(e,t){const n=q({apiVersion:ue}),r=G(),[i,o]=U(""),a=e?We((async()=>await Te(n,"@sanity/presentation",typeof window>"u"?"":location.href,null==r?void 0:r.id)),[...t,i]):null;return $((()=>{if(!a)return;const e=setTimeout((()=>{W((()=>o(a.expiresAt.toString())))}),a.expiresAt.getTime()-Date.now());return()=>clearTimeout(e)}),[a]),(null==a?void 0:a.secret)||null}("object"==typeof e||"function"==typeof e,c);return We((async()=>{if("string"==typeof e){const t=new URL(e,location.origin);let r=t;try{if(n){const e=new URL(n,t);e.origin===t.origin&&(r=e)}else if(document.referrer){const e=new URL(document.referrer);e.origin===t.origin&&(r=e)}}catch{}return location.origin!==r.origin||!r.pathname.startsWith(`${s}/`)&&r.pathname!==s?r:t}const t=await("object"==typeof e?_e(e):e)({client:o,previewUrlSecret:d,previewSearchParam:n,referrer:typeof document>"u"?null:document.referrer,studioBasePath:s});return new URL(t,location.origin)}),[...c,d])}const Nn=Symbol();const Fn=F((()=>import("./LoaderQueries.js"))),Vn=F((()=>import("./PostMessageRefreshMutations.js"))),Bn=se(s)`
overflow-x: auto;
`;function qn(e){var t;const{previewUrl:a,components:l}=null!=(t=e.tool.options)?t:{},c=e.tool.name||ge,{unstable_navigator:d}=l||{},{navigate:u,state:p}=Y(),h=V(Object.fromEntries(p._searchParams||[])),f=Nn(a||"/",c,h.preview||null),[m]=$((()=>{var t;const n=null==(t=e.tool.options)?void 0:t.devMode;return"function"==typeof n?n():"boolean"==typeof n?n:typeof window<"u"&&"localhost"===window.location.hostname})),v=R((()=>f.origin),[f.origin]),g=U(null),[y,w]=$(),[b,x]=$({}),k=U({title:void 0,url:void 0}),{params:E,deskParams:P,navigate:S}=Mn({initialPreviewUrl:f,routerNavigate:u,routerState:p,routerSearchParams:h,frameStateRef:k}),[I,z]=M(hn,{perspective:E.perspective,viewport:E.viewport},bn),[D,j]=function(e,t){if("published"!==e&&"previewDrafts"!==e)throw new Error(`Invalid perspective: ${e}`);const[n,i]=$({}),[r,o]=$({}),a=U(""),s=O(((e,n,r=[])=>{const s=r.filter((e=>"_projectId"in e&&e._projectId?(Un||(console.warn("Cross dataset references are not supported yet, ignoring source document",e),Un=!0),!1):e));("published"===n?i:o)((n=>{const i={};for(const e of s)i[e._id]=e;if(a.current!==t.current.url)return a.current=t.current.url,{[e]:i};const r=n[e];return _e(r,i)?n:{...n,[e]:i}}))}),[t]);return[R((()=>{const t=Object.values("published"===e?n:r).reduce(((e,t)=>(Object.values(t).forEach((t=>{e[t._id]=t})),e)),{});return Object.values(t)}),[e,r,n]),s]}(I.perspective,k),T=H(),A=X();L((()=>{(I.perspective!==E.perspective||I.viewport!==E.viewport)&&S({},{perspective:"previewDrafts"===I.perspective?void 0:I.perspective,viewport:"desktop"===I.viewport?void 0:I.viewport})}),[E.perspective,I.perspective,S,I.viewport,E.viewport]);const[_,F]=$("connecting"),[B,K]=$("connecting"),[q,G]=$("connecting"),[J]=$((()=>new Set)),Q=O((e=>{const t=window.open(e,"_blank");t&&J.add(t)}),[J]);L((()=>{if(J.size&&y)for(const e of J)e&&"closed"in e&&!e.closed&&y.addSource(e)}),[y,J,J.size]),L((()=>{var e;const t=null==(e=g.current)?void 0:e.contentWindow;if(!t)return;const n=function(e){const{destroy:t,send:n}=Ye(e),i=new Set,r=new WeakMap,o=new Set;return{destroy:()=>{t();for(const e of o)e()},send:(e,t,o)=>{n(e,t,o);for(const n of i)n&&"closed"in n&&!n.closed&&r.has(n)&&r.get(n)(e,t,o)},addSource(t){if(i.has(t))return;if(!("closed"in t))throw console.warn("Source is unsupported",{source:t}),new Error("Source is unsupported");if(t.closed)throw new Error("Source is closed");const{send:n,destroy:a}=Ye({...e,target:t,connectTo:e.connectTo.map((e=>{const{onStatusUpdate:t,onEvent:n,...i}=e;return{...i,onEvent:n?(e,t)=>{if("preview-kit/documents"!==e&&"overlay/navigate"!==e&&"loader/documents"!==e)return n(e,t)}:void 0}}))});o.add(a),r.set(t,n),i.add(t)}}}({id:"presentation",target:t,targetOrigin:v,connectTo:[{id:"overlays",heartbeat:!0,onStatusUpdate:F,onEvent(e,t){if("visual-editing/focus"!==e&&"overlay/focus"!==e||!("id"in t))if("visual-editing/navigate"===e||"overlay/navigate"===e){const{title:e,url:n}=t;k.current.url!==n&&S({},{preview:n}),k.current={title:e,url:n}}else"visual-editing/meta"===e?k.current.title=t.title:"visual-editing/toggle"===e||"overlay/toggle"===e?z({type:pn,enabled:t.enabled}):"visual-editing/documents"===e?j("visual-editing",t.perspective,t.documents):"visual-editing/refreshing"===e&&"manual"===t.source?clearTimeout(he.current):"visual-editing/refreshing"===e&&"mutation"===t.source?z({type:ln}):"visual-editing/refreshed"===e&&z({type:sn});else S({type:t.type,id:t.id,path:t.path})}},{id:"loaders",heartbeat:!0,onStatusUpdate:K,onEvent(e,t){if("loader/documents"===e&&t.projectId===T&&t.dataset===A)j("loaders",t.perspective,t.documents);else if("loader/query-listen"===e&&t.projectId===T&&t.dataset===A){if("number"==typeof t.heartbeat&&t.heartbeat<fe)throw new Error(`Loader query listen heartbeat interval must be at least ${fe}ms`);x((e=>{var n,i,r;return{...e,[(i=t.query,r=t.params,`${i}-${"string"==typeof r?r:JSON.stringify(r)}`)]:{perspective:t.perspective,query:t.query,params:t.params,receivedAt:Date.now(),heartbeat:null!=(n=t.heartbeat)&&n}}}))}}},{id:"preview-kit",heartbeat:!0,onStatusUpdate:G,onEvent(e,t){"preview-kit/documents"===e&&t.projectId===T&&t.dataset===A&&j("preview-kit",t.perspective,t.documents)}}]});return w(n),()=>{n.destroy(),w(void 0)}}),[A,T,j,S,v]),L((()=>{const e=setInterval((()=>W((()=>x((e=>{if(Object.keys(e).length<1)return e;const t=Date.now();if(!Object.values(e).some((e=>!1!==e.heartbeat&&t>e.receivedAt+e.heartbeat)))return e;const n={};for(const[i,r]of Object.entries(e))!1!==r.heartbeat&&t>r.receivedAt+r.heartbeat||(n[i]=r);return n}))))),fe);return()=>clearInterval(e)}),[]);const ee=O((e=>{S({path:o.toString(e)},{},!0)}),[S]),te=O((e=>{const t=new URL(e,f.origin),n=t.pathname+t.search;t.origin===f.origin&&n!==E.preview&&S({},{preview:n})}),[f,E,S]),ne=O((e=>{S({},e)}),[S]);L((()=>{null==y||y.send("overlays","presentation/perspective",{perspective:I.perspective})}),[y,I.perspective]),L((()=>{E.id&&E.path?null==y||y.send("overlays","presentation/focus",{id:E.id,path:E.path}):null==y||y.send("overlays","presentation/blur",void 0)}),[y,E.id,E.path]),L((()=>{k.current.url&&E.preview&&k.current.url!==E.preview&&(k.current.url=E.preview,"connected"!==_&&g.current?g.current.src=`${v}${E.preview}`:null==y||y.send("overlays","presentation/navigate",{url:E.preview,type:"replace"}))}),[y,_,v,E.preview]);const ie=O((()=>null==y?void 0:y.send("overlays","presentation/toggleOverlay",void 0)),[y]),[re,oe]=$(null);L((()=>{const e=e=>{bt(e)&&ie()},t=e=>{var t;bt(e)&&ie(),t=e,["mod","\\"].every((e=>wt[e]?t[wt[e]]:t.key===e.toUpperCase()))&&ie()};return window.addEventListener("keydown",t),window.addEventListener("keyup",e),()=>{window.removeEventListener("keydown",t),window.removeEventListener("keyup",e)}}),[ie]);const[ae,le]=$(null),[{navigatorEnabled:ce,toggleNavigator:de},ue]=nn({unstable_navigator:d}),pe=U(E.id);L((()=>{E.rev&&pe.current&&E.id!==pe.current&&S({},{rev:void 0}),pe.current=E.id}));const he=U(),we=O((e=>{if(z({type:ln}),y)return he.current=window.setTimeout(e,300),void y.send("overlays","presentation/refresh",{source:"manual",livePreviewEnabled:"connected"===q||"connected"===B});e()}),[y,B,q]),be=Z(),xe=O((({id:e,type:t,path:n})=>{if(k.current.url)return{title:k.current.title||k.current.url,name:"edit",params:{id:e,path:n,type:t,inspect:me,workspace:be.name,mode:ve,preview:E.preview}}}),[E.preview,be.name]);return i(r,{children:[n(an,{deskParams:P,devMode:m,name:c,params:E,navigate:S,children:n(tn,{navigate:S,children:n(on,{params:E,children:n(Kn,{height:"fill",children:i(en,{children:[n(ue,{}),n(At,{id:"preview",minWidth:325,defaultSize:ce?50:75,order:3,children:n(s,{direction:"column",flex:1,height:"fill",ref:le,children:n(C,{element:ae,children:n(Rn,{dispatch:z,iframe:I.iframe,initialUrl:f,loadersConnection:B,navigatorEnabled:ce,onPathChange:te,onRefresh:we,openPopup:Q,overlaysConnection:_,params:E,perspective:I.perspective,ref:g,targetOrigin:v,toggleNavigator:de,toggleOverlay:ie,viewport:I.viewport,visualEditing:I.visualEditing})})})}),n(Mt,{order:4}),n(At,{id:"content",minWidth:325,order:5,children:n(ye,{documentId:E.id,setDisplayedDocument:oe,children:n(se,{getIntent:xe,children:n(jt,{refs:D,deskParams:P,documentId:E.id,documentType:E.type,onDeskParams:ne,onFocusPath:ee,previewUrl:E.preview})})})})]})})})})}),y&&n(N,{children:n(Vn,{channel:y,liveQueries:b,perspective:I.perspective,liveDocument:re,documentsOnPage:D})}),y&&E.id&&E.type&&n(N,{children:n(Bn,{channel:y,id:E.id,type:E.type,loadersConnection:B,previewKitConnection:q})})]})}export{qn as default};//# sourceMappingURL=PresentationTool.js.map
`;function Kn(e){var t;const{previewUrl:a,components:l}=null!=(t=e.tool.options)?t:{},c=e.tool.name||ve,{unstable_navigator:d}=l||{},{navigate:u,state:p}=Y(),h=V(Object.fromEntries(p._searchParams||[])),f=Mn(a||"/",c,h.preview||null),[m]=U((()=>{var t;const n=null==(t=e.tool.options)?void 0:t.devMode;return"function"==typeof n?n():"boolean"==typeof n?n:typeof window<"u"&&"localhost"===window.location.hostname})),v=R((()=>f.origin),[f.origin]),g=T(null),[y,w]=U(),[b,x]=U({}),k=T({title:void 0,url:void 0}),{params:P,deskParams:E,navigate:S}=Wn({initialPreviewUrl:f,routerNavigate:u,routerState:p,routerSearchParams:h,frameStateRef:k}),[I,C]=M(pn,{perspective:P.perspective,viewport:P.viewport},wn),[D,j]=function(e,t){if("published"!==e&&"previewDrafts"!==e)throw new Error(`Invalid perspective: ${e}`);const[n,r]=U({}),[i,o]=U({}),a=T(""),s=O(((e,n,i=[])=>{const s=i.filter((e=>"_projectId"in e&&e._projectId?(Ln||(console.warn("Cross dataset references are not supported yet, ignoring source document",e),Ln=!0),!1):e));("published"===n?r:o)((n=>{const r={};for(const e of s)r[e._id]=e;if(a.current!==t.current.url)return a.current=t.current.url,{[e]:r};const i=n[e];return Ae(i,r)?n:{...n,[e]:r}}))}),[t]);return[R((()=>{const t=Object.values("published"===e?n:i).reduce(((e,t)=>(Object.values(t).forEach((t=>{e[t._id]=t})),e)),{});return Object.values(t)}),[e,i,n]),s]}(I.perspective,k),L=H(),A=X();$((()=>{(I.perspective!==P.perspective||I.viewport!==P.viewport)&&S({},{perspective:"previewDrafts"===I.perspective?void 0:I.perspective,viewport:"desktop"===I.viewport?void 0:I.viewport})}),[P.perspective,I.perspective,S,I.viewport,P.viewport]);const[_,F]=U("connecting"),[B,K]=U("connecting"),[q,G]=U("connecting"),[J]=U((()=>new Set)),Q=O((e=>{const t=window.open(e,"_blank");t&&J.add(t)}),[J]);$((()=>{if(J.size&&y)for(const e of J)e&&"closed"in e&&!e.closed&&y.addSource(e)}),[y,J,J.size]),$((()=>{var e;const t=null==(e=g.current)?void 0:e.contentWindow;if(!t)return;const n=function(e){const{destroy:t,send:n}=Qe(e),r=new Set,i=new WeakMap,o=new Set;return{destroy:()=>{t();for(const e of o)e()},send:(e,t,o)=>{n(e,t,o);for(const n of r)n&&"closed"in n&&!n.closed&&i.has(n)&&i.get(n)(e,t,o)},addSource(t){if(r.has(t))return;if(!("closed"in t))throw console.warn("Source is unsupported",{source:t}),new Error("Source is unsupported");if(t.closed)throw new Error("Source is closed");const{send:n,destroy:a}=Qe({...e,target:t,connectTo:e.connectTo.map((e=>{const{onStatusUpdate:t,onEvent:n,...r}=e;return{...r,onEvent:n?(e,t)=>{if("preview-kit/documents"!==e&&"overlay/navigate"!==e&&"loader/documents"!==e)return n(e,t)}:void 0}}))});o.add(a),i.set(t,n),r.add(t)}}}({id:"presentation",target:t,targetOrigin:v,connectTo:[{id:"overlays",heartbeat:!0,onStatusUpdate:F,onEvent(e,t){if("visual-editing/focus"!==e&&"overlay/focus"!==e||!("id"in t))if("visual-editing/navigate"===e||"overlay/navigate"===e){const{title:e,url:n}=t;k.current.url!==n&&S({},{preview:n}),k.current={title:e,url:n}}else"visual-editing/meta"===e?k.current.title=t.title:"visual-editing/toggle"===e||"overlay/toggle"===e?C({type:un,enabled:t.enabled}):"visual-editing/documents"===e?j("visual-editing",t.perspective,t.documents):"visual-editing/refreshing"===e&&"manual"===t.source?clearTimeout(ye.current):"visual-editing/refreshing"===e&&"mutation"===t.source?C({type:sn}):"visual-editing/refreshed"===e&&C({type:an});else S({type:t.type,id:t.id,path:t.path})}},{id:"loaders",heartbeat:!0,onStatusUpdate:K,onEvent(e,t){if("loader/documents"===e&&t.projectId===L&&t.dataset===A)j("loaders",t.perspective,t.documents);else if("loader/query-listen"===e&&t.projectId===L&&t.dataset===A){if("number"==typeof t.heartbeat&&t.heartbeat<he)throw new Error(`Loader query listen heartbeat interval must be at least ${he}ms`);x((e=>{var n,r,i;return{...e,[(r=t.query,i=t.params,`${r}-${"string"==typeof i?i:JSON.stringify(i)}`)]:{perspective:t.perspective,query:t.query,params:t.params,receivedAt:Date.now(),heartbeat:null!=(n=t.heartbeat)&&n}}}))}}},{id:"preview-kit",heartbeat:!0,onStatusUpdate:G,onEvent(e,t){"preview-kit/documents"===e&&t.projectId===L&&t.dataset===A&&j("preview-kit",t.perspective,t.documents)}}]});return w(n),()=>{n.destroy(),w(void 0)}}),[A,L,j,S,v]),$((()=>{const e=setInterval((()=>W((()=>x((e=>{if(Object.keys(e).length<1)return e;const t=Date.now();if(!Object.values(e).some((e=>!1!==e.heartbeat&&t>e.receivedAt+e.heartbeat)))return e;const n={};for(const[r,i]of Object.entries(e))!1!==i.heartbeat&&t>i.receivedAt+i.heartbeat||(n[r]=i);return n}))))),he);return()=>clearInterval(e)}),[]);const ee=O((e=>{S({path:o.toString(e)},{},!0)}),[S]),te=O((e=>{const t=new URL(e,f.origin),n=t.pathname+t.search;t.origin===f.origin&&n!==P.preview&&S({},{preview:n})}),[f,P,S]),ne=O((e=>{S({},e)}),[S]);$((()=>{null==y||y.send("overlays","presentation/perspective",{perspective:I.perspective})}),[y,I.perspective]),$((()=>{P.id&&P.path?null==y||y.send("overlays","presentation/focus",{id:P.id,path:P.path}):null==y||y.send("overlays","presentation/blur",void 0)}),[y,P.id,P.path]),$((()=>{k.current.url&&P.preview&&k.current.url!==P.preview&&(k.current.url=P.preview,"connected"!==_&&g.current?g.current.src=`${v}${P.preview}`:null==y||y.send("overlays","presentation/navigate",{url:P.preview,type:"replace"}))}),[y,_,v,P.preview]);const re=O((()=>null==y?void 0:y.send("overlays","presentation/toggleOverlay",void 0)),[y]),[ie,oe]=U(null);$((()=>{const e=e=>{wt(e)&&re()},t=e=>{var t;wt(e)&&re(),t=e,["mod","\\"].every((e=>yt[e]?t[yt[e]]:t.key===e.toUpperCase()))&&re()};return window.addEventListener("keydown",t),window.addEventListener("keyup",e),()=>{window.removeEventListener("keydown",t),window.removeEventListener("keyup",e)}}),[re]);const[se,le]=U(null),[{navigatorEnabled:ce,toggleNavigator:de},ue]=tn({unstable_navigator:d}),pe=T(P.id);$((()=>{P.rev&&pe.current&&P.id!==pe.current&&S({},{rev:void 0}),pe.current=P.id}));const ye=T(),we=O((e=>{if(C({type:sn}),y)return ye.current=window.setTimeout(e,300),void y.send("overlays","presentation/refresh",{source:"manual",livePreviewEnabled:"connected"===q||"connected"===B});e()}),[y,B,q]),be=Z(),xe=O((({id:e,type:t,path:n})=>{if(k.current.url)return{title:k.current.title||k.current.url,name:"edit",params:{id:e,path:n,type:t,inspect:fe,workspace:be.name,mode:me,preview:P.preview}}}),[P.preview,be.name]);return r(i,{children:[n(on,{deskParams:E,devMode:m,name:c,params:P,navigate:S,children:n(en,{navigate:S,children:n(rn,{params:P,children:n(Bn,{height:"fill",children:r(Yt,{children:[n(ue,{}),n(Tt,{id:"preview",minWidth:325,defaultSize:ce?50:75,order:3,children:n(s,{direction:"column",flex:1,height:"fill",ref:le,children:n(z,{element:se,children:n(On,{dispatch:C,iframe:I.iframe,initialUrl:f,loadersConnection:B,navigatorEnabled:ce,onPathChange:te,onRefresh:we,openPopup:Q,overlaysConnection:_,params:P,perspective:I.perspective,ref:g,targetOrigin:v,toggleNavigator:de,toggleOverlay:re,viewport:I.viewport,visualEditing:I.visualEditing})})})}),n(Wt,{order:4}),n(Tt,{id:"content",minWidth:325,order:5,children:n(ge,{documentId:P.id,setDisplayedDocument:oe,children:n(ae,{getIntent:xe,children:n($t,{refs:D,deskParams:E,documentId:P.id,documentType:P.type,onDeskParams:ne,onFocusPath:ee,previewUrl:P.preview})})})})]})})})})}),y&&n(N,{children:n(Fn,{channel:y,liveQueries:b,perspective:I.perspective,liveDocument:ie,documentsOnPage:D})}),y&&P.id&&P.type&&n(N,{children:n(Vn,{channel:y,id:P.id,type:P.type,loadersConnection:B,previewKitConnection:q})})]})}export{Kn as default};//# sourceMappingURL=PresentationTool.js.map
{
"name": "@sanity/presentation",
"version": "1.11.5",
"version": "1.11.6",
"homepage": "https://github.com/sanity-io/visual-editing/tree/main/packages/presentation#readme",

@@ -103,3 +103,3 @@ "bugs": {

"@sanity/preview-url-secret": "^1.6.4",
"@sanity/ui": "^2.0.9",
"@sanity/ui": "^2.0.10",
"@sanity/uuid": "3.0.2",

@@ -117,9 +117,9 @@ "@types/lodash.isequal": "^4.5.8",

"@sanity/channels": "0.4.0",
"@sanity/client": "^6.15.3",
"@sanity/client": "^6.15.4",
"@sanity/pkg-utils": "^5.0.1",
"@sanity/visual-editing-helpers": "0.6.1",
"happy-dom": "^13.8.0",
"happy-dom": "^13.8.4",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"sanity": "^3.32.0",
"sanity": "^3.33.0",
"styled-components": "6.1.8",

@@ -130,3 +130,3 @@ "typescript": "^5.3.3",

"peerDependencies": {
"@sanity/client": "^6.15.3"
"@sanity/client": "^6.15.4"
},

@@ -133,0 +133,0 @@ "engines": {

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc