PageSourceSearch

https://isan.org/_next/static/chunks/ed9a0b66-032bb42534037465.js

js isan.org collected 2026-10-02 04:15:19 UTC 171,563 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[32],{11636:function(e,t,n){let r,o;n.d(t,{$j:function(){return nF},Ct:function(){return nC},EK:function(){return n3},F2:function(){return oX},Fg:function(){return useTheme},J2:function(){return rN},JQ:function(){return aO},Jh:function(){return nx},Kq:function(){return r9},Kx:function(){return oc},Lt:function(){return _responsive},NM:function(){return BoundaryElementProvider},O8:function(){return useClickOutside},OK:function(){return aV},Od:function(){return az},Oo:function(){return oQ},Ph:function(){return r5},Q5:function(){return useArrayProp},Qr:function(){return aC},R:function(){return av},RE:function(){return _raf2},Re:function(){return isHTMLElement},SV:function(){return ErrorBoundary},Tb:function(){return usePrefersReducedMotion},Tu:function(){return DialogProvider},Ur:function(){return useRootTheme},VW:function(){return ToastProvider},Vq:function(){return an},W2:function(){return n7},WB:function(){return rp},X6:function(){return rl},XL:function(){return useElementRect},XZ:function(){return n1},Xp:function(){return PortalProvider},Y8:function(){return rK},Zb:function(){return nK},__:function(){return nz},d2:function(){return useMediaIndex},f6:function(){return ThemeProvider},fo:function(){return focusFirstDescendant},gF:function(){return rd},h4:function(){return useElementSize},hO:function(){return rem},h_:function(){return Portal},iX:function(){return rm},j2:function(){return ab},kC:function(){return nA},kS:function(){return MenuGroup},li:function(){return LayerProvider},m4:function(){return rgba},mh:function(){return rS},oi:function(){return oj},p2:function(){return nb},p8:function(){return al},pm:function(){return useToast},qE:function(){return nc},qh:function(){return useGlobalKeyDown},rj:function(){return re},rs:function(){return oo},sJ:function(){return useLayer},sN:function(){return ak},studioTheme:function(){return tH},sz:function(){return useBoundaryElement},td:function(){return aG},ts:function(){return useForwardedRef},u:function(){return oF},ue:function(){return usePrefersDark},v2:function(){return ah},vI:function(){return usePortal},x4:function(){return aH},xu:function(){return nk},xv:function(){return no},zx:function(){return nW}});var a,i,l,s,d,u,c,f,p,h,b,g,m,v,y,x,w,k,S,_,j,R,E,P,z,$,C,O,A,T,M,V,L,F,B,G,H,I,D,Z,N,W,q,X,U,K,Y,J,Q,ee,et,en,er,eo,ea,ei,el,es,ed,eu,ec,ef,ep,eh,eb,eg,em,ev,ey,ex,ew,ek,eS,e_,ej,eR,eE,eP,ez,e$,eC,eO,eA,eT,eM,eV,eL,eF,eB,eG,eH,eI,eD,eZ,eN,eW,eq,eX,eU,eK,eY,eJ,eQ,e0,e1,e2,e5=n(85893),e4=n(67294),e3=n(59864),e9=n(37946),e6=n(55379),e7=n(40168),e8=n(18612),te=n.n(e8),tt=n(85983),tn=n(18171),tr=n(63853),to=n(73935),ta=n(51526),ti=n(29722);let tl=[],ts={},td={top:"bottom",right:"left",bottom:"top",left:"right"};function rem(e){return 0===e?0:"".concat(e/16,"rem")}function _responsive(e,t,n){let r=(null==t?void 0:t.map(n))||[];return r.map((t,n)=>0===n?t:{["@media screen and (min-width: ".concat(e[n-1],"px)")]:t})}function _getResponsiveSpace(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:tl;if(!Array.isArray(n))throw Error("the property must be array of numbers");return 0===n.length?null:_responsive(e.sanity.media,n,n=>{var r;return r=rem(e.sanity.space[n]),t.reduce((e,t)=>(e[t]=r,e),{})})}function responsiveFont(e,t){let{$size:n,$weight:r,theme:o}=t,{fonts:a,media:i}=o.sanity,{family:l,sizes:s,weights:d}=a[e],u=r&&d[r]||d.regular,c=s[2],f={position:"relative",fontFamily:l,fontWeight:u,padding:"1px 0",margin:0,"&:before":{content:'""',display:"block",height:0},"&:after":{content:'""',display:"block",height:0},"& > code, & > span":{display:"block"},"&:not([hidden])":{display:"block"}};if(!n)return responsiveFont.warned||(console.warn("No size specified for responsive font",{fontKey:e,$size:n,props:t,base:f}),responsiveFont.warned=!0),[f];let p=_responsive(i,n,e=>(function(e){let{ascenderHeight:t,descenderHeight:n,fontSize:r,iconSize:o,letterSpacing:a,lineHeight:i}=e,l=t+n,s=i-l,d=2*Math.floor(1.125*r/2)+1;return{fontSize:rem(r),lineHeight:"calc(".concat(i," / ").concat(r,")"),letterSpacing:rem(
1a),transform:"translateY(".concat(rem(n),")"),"&:before":{marginTop:"calc(".concat(rem(0-l)," - 1px)")},"&:after":{marginBottom:"-1px"},"& svg:not([data-sanity-icon])":{fontSize:"calc(".concat(d," / 16 * 1rem)"),margin:rem((s-d)/2)},"& [data-sanity-icon]":{fontSize:"calc(".concat(o," / 16 * 1rem)"),margin:rem((s-o)/2)}}})(s[e]||c));return[f,...p]}function responsiveTextAlignStyle(e){let{theme:t}=e;return _responsive(t.sanity.media,e.$align,e=>({textAlign:e}))}function useArrayProp(e,t){let n=(0,e4.useMemo)(()=>JSON.stringify(null!=e?e:t),[t,e]);return(0,e4.useMemo)(()=>void 0===e?t||tl:Array.isArray(e)?e:[e],[n])}function _getElements(e,t){let n=[e];for(let e of t)Array.isArray(e)?n.push(...e):n.push(e);return n.filter(Boolean)}function useClickOutside(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:tl,n=arguments.length>2?arguments[2]:void 0,[r,o]=(0,e4.useState)(null),[a,i]=(0,e4.useState)(()=>_getElements(r,t)),l=(0,e4.useRef)(a);return(0,e4.useEffect)(()=>{let e=l.current,n=_getElements(r,t);if(e.length!==n.length){i(n),l.current=n;return}for(let t of e)if(!n.includes(t)){i(n),l.current=n;return}for(let t of n)if(!e.includes(t)){i(n),l.current=n;return}},[r,t]),(0,e4.useEffect)(()=>{if(!e)return;let handleWindowMouseDown=t=>{let r=t.target;if(r instanceof Node&&(!n||n.contains(r))){for(let e of a)if(r===e||e.contains(r))return;e(t)}};return window.addEventListener("mousedown",handleWindowMouseDown),()=>{window.removeEventListener("mousedown",handleWindowMouseDown)}},[n,e,a]),o}var tu=[],tc="ResizeObserver loop completed with undelivered notifications.",deliverResizeLoopError=function(){var e;"function"==typeof ErrorEvent?e=new ErrorEvent("error",{message:tc}):((e=document.createEvent("Event")).initEvent("error",!1,!1),e.message=tc),window.dispatchEvent(e)};(a=y||(y={})).BORDER_BOX="border-box",a.CONTENT_BOX="content-box",a.DEVICE_PIXEL_CONTENT_BOX="device-pixel-content-box";var freeze=function(e){return Object.freeze(e)},ResizeObserverSize=function(e,t){this.inlineSize=e,this.blockSize=t,freeze(this)},tf=function(){function DOMRectReadOnly(e,t,n,r){return this.x=e,this.y=t,this.width=n,this.height=r,this.top=this.y,this.left=this.x,this.bottom=this.top+this.height,this.right=this.left+this.width,freeze(this)}return DOMRectReadOnly.prototype.toJSON=function(){return{x:this.x,y:this.y,top:this.top,right:this.right,bottom:this.bottom,left:this.left,width:this.width,height:this.height}},DOMRectReadOnly.fromRect=function(e){return new DOMRectReadOnly(e.x,e.y,e.width,e.height)},DOMRectReadOnly}(),isSVG=function(e){return e instanceof SVGElement&&"getBBox"in e},isHidden=function(e){if(isSVG(e)){var t=e.getBBox(),n=t.width,r=t.height;return!n&&!r}var o=e.offsetWidth,a=e.offsetHeight;return!(o||a||e.getClientRects().length)},isElement=function(e){if(e instanceof Element)return!0;var t,n=null===(t=null==e?void 0:e.ownerDocument)||void 0===t?void 0:t.defaultView;return!!(n&&e instanceof n.Element)},isReplacedElement=function(e){switch(e.tagName){case"INPUT":if("image"!==e.type)break;case"VIDEO":case"AUDIO":case"EMBED":case"OBJECT":case"CANVAS":case"IFRAME":case"IMG":return!0}return!1},tp="undefined"!=typeof window?window:{},th=new WeakMap,tb=/auto|scroll/,tg=/^tb|vertical/,tm=/msie|trident/i.test(tp.navigator&&tp.navigator.userAgent),parseDimension=function(e){return parseFloat(e||"0")},size$1=function(e,t,n){return void 0===e&&(e=0),void 0===t&&(t=0),void 0===n&&(n=!1),new ResizeObserverSize((n?t:e)||0,(n?e:t)||0)},tv=freeze({devicePixelContentBoxSize:size$1(),borderBoxSize:size$1(),contentBoxSize:size$1(),contentRect:new tf(0,0,0,0)}),calculateBoxSizes=function(e,t){if(void 0===t&&(t=!1),th.has(e)&&!t)return th.get(e);if(isHidden(e))return th.set(e,tv),tv;var n=getComputedStyle(e),r=isSVG(e)&&e.ownerSVGElement&&e.getBBox(),o=!tm&&"border-box"===n.boxSizing,a=tg.test(n.writingMode||""),i=!r&&tb.test(n.overflowY||""),l=!r&&tb.test(n.overflowX||""),s=r?0:parseDimension(n.paddingTop),d=r?0:parseDimension(n.paddingRight),u=r?0:parseDimension(n.paddingBottom),c=r?0:parseDimension(n.paddingLeft),f=r?0:parseDimension(n.borderTopWidth),p=r?0:parseDimension(n.borderRightWidth),h=r?0:parseDimension(n.borderBottomWidth),b=r?0:parseDimension(n.borderLeftWidth),g=c+d,m=s+u,v=b+p,y=f+h,x=l?e.offsetHeight-y-e.clientHeight:0,w=i?e.offsetWidth-v-e.clientWidth:0,k=r?r.width:parseDimension(n.width)-(o?g+v:0)-w,S=r?r.height:parseDimension(n.height)-(o?m+y:0)-x,_=k+g+w+v,j=S+m+x+y,R=freeze({devicePixelContentBoxSize:size$1(Math.round(k*devicePixelRatio),Math.round(S*devicePixelRatio),a),borderBoxSize:size$1(_,j,a),contentBoxSize:size$1(k,S,a),contentRect:new tf(c,s,k,S)});return th.set(e,R),R},calculateBoxSize=function(e,t,n){var r=calculateBoxSizes(e,n),o=r.borderBoxSize,a=r.contentBoxSize,i=r.devicePixelContentBoxSize;switch(t){case y.DEVICE_PIXEL_CONTENT_BOX:return i;case y.BORDER_BOX:return o;default:return a}},ResizeObserverEntry=function(e){var t=calculateBoxSizes(e);this.target=e,this.contentRect=t.contentRect,this.borderBoxSize=freeze([t.borderBoxSize]),this.contentBoxSize=freeze([t.contentBoxSize]),this.devicePixelContentBoxSize=freeze([t.devicePixelContentBoxSize])},calculateDepthForNode=function(e){if(isHidden(e))return 1/0;for(var t=0,n=e.parentNode;n;)t+=1,n=n.parentNode;return t},broadcastActiveObservations=function(){var e=1/0,t=[];tu.forEach(function(n){if(0!==n.activeTargets.length){var r=[];
1n.activeTargets.forEach(function(t){var n=new ResizeObserverEntry(t.target),o=calculateDepthForNode(t.target);r.push(n),t.lastReportedSize=calculateBoxSize(t.target,t.observedBox),o<e&&(e=o)}),t.push(function(){n.callback.call(n.observer,r,n.observer)}),n.activeTargets.splice(0,n.activeTargets.length)}});for(var n=0;n<t.length;n++)(0,t[n])();return e},gatherActiveObservationsAtDepth=function(e){tu.forEach(function(t){t.activeTargets.splice(0,t.activeTargets.length),t.skippedTargets.splice(0,t.skippedTargets.length),t.observationTargets.forEach(function(n){n.isActive()&&(calculateDepthForNode(n.target)>e?t.activeTargets.push(n):t.skippedTargets.push(n))})})},process=function(){var e=0;for(gatherActiveObservationsAtDepth(0);tu.some(function(e){return e.activeTargets.length>0});)gatherActiveObservationsAtDepth(e=broadcastActiveObservations());return tu.some(function(e){return e.skippedTargets.length>0})&&deliverResizeLoopError(),e>0},ty=[],queueMicroTask=function(e){if(!x){var t=0,n=document.createTextNode("");new MutationObserver(function(){return ty.splice(0).forEach(function(e){return e()})}).observe(n,{characterData:!0}),x=function(){n.textContent="".concat(t?t--:t++)}}ty.push(e),x()},queueResizeObserver=function(e){queueMicroTask(function(){requestAnimationFrame(e)})},tx=0,tw={attributes:!0,characterData:!0,childList:!0,subtree:!0},tk=["resize","load","transitionend","animationend","animationstart","animationiteration","keyup","keydown","mouseup","mousedown","mouseover","mouseout","blur","focus"],time=function(e){return void 0===e&&(e=0),Date.now()+e},tS=!1,t_=new(function(){function Scheduler(){var e=this;this.stopped=!0,this.listener=function(){return e.schedule()}}return Scheduler.prototype.run=function(e){var t=this;if(void 0===e&&(e=250),!tS){tS=!0;var n=time(e);queueResizeObserver(function(){var r=!1;try{r=process()}finally{if(tS=!1,e=n-time(),!tx)return;r?t.run(1e3):e>0?t.run(e):t.start()}})}},Scheduler.prototype.schedule=function(){this.stop(),this.run()},Scheduler.prototype.observe=function(){var e=this,cb=function(){return e.observer&&e.observer.observe(document.body,tw)};document.body?cb():tp.addEventListener("DOMContentLoaded",cb)},Scheduler.prototype.start=function(){var e=this;this.stopped&&(this.stopped=!1,this.observer=new MutationObserver(this.listener),this.observe(),tk.forEach(function(t){return tp.addEventListener(t,e.listener,!0)}))},Scheduler.prototype.stop=function(){var e=this;this.stopped||(this.observer&&this.observer.disconnect(),tk.forEach(function(t){return tp.removeEventListener(t,e.listener,!0)}),this.stopped=!0)},Scheduler}()),updateCount=function(e){!tx&&e>0&&t_.start(),(tx+=e)||t_.stop()},tj=function(){function ResizeObservation(e,t){this.target=e,this.observedBox=t||y.CONTENT_BOX,this.lastReportedSize={inlineSize:0,blockSize:0}}return ResizeObservation.prototype.isActive=function(){var e,t=calculateBoxSize(this.target,this.observedBox,!0);return isSVG(e=this.target)||isReplacedElement(e)||"inline"!==getComputedStyle(e).display||(this.lastReportedSize=t),this.lastReportedSize.inlineSize!==t.inlineSize||this.lastReportedSize.blockSize!==t.blockSize},ResizeObservation}(),ResizeObserverDetail=function(e,t){this.activeTargets=[],this.skippedTargets=[],this.observationTargets=[],this.observer=e,this.callback=t},tR=new WeakMap,getObservationIndex=function(e,t){for(var n=0;n<e.length;n+=1)if(e[n].target===t)return n;return -1},tE=function(){function ResizeObserverController(){}return ResizeObserverController.connect=function(e,t){var n=new ResizeObserverDetail(e,t);tR.set(e,n)},ResizeObserverController.observe=function(e,t,n){var r=tR.get(e),o=0===r.observationTargets.length;0>getObservationIndex(r.observationTargets,t)&&(o&&tu.push(r),r.observationTargets.push(new tj(t,n&&n.box)),updateCount(1),t_.schedule())},ResizeObserverController.unobserve=function(e,t){var n=tR.get(e),r=getObservationIndex(n.observationTargets,t),o=1===n.observationTargets.length;r>=0&&(o&&tu.splice(tu.indexOf(n),1),n.observationTargets.splice(r,1),updateCount(-1))},ResizeObserverController.disconnect=function(e){var t=this,n=tR.get(e);
1n.observationTargets.slice().forEach(function(n){return t.unobserve(e,n.target)}),n.activeTargets.splice(0,n.activeTargets.length)},ResizeObserverController}(),tP=function(){function ResizeObserver(e){if(0==arguments.length)throw TypeError("Failed to construct 'ResizeObserver': 1 argument required, but only 0 present.");if("function"!=typeof e)throw TypeError("Failed to construct 'ResizeObserver': The callback provided as parameter 1 is not a function.");tE.connect(this,e)}return ResizeObserver.prototype.observe=function(e,t){if(0==arguments.length)throw TypeError("Failed to execute 'observe' on 'ResizeObserver': 1 argument required, but only 0 present.");if(!isElement(e))throw TypeError("Failed to execute 'observe' on 'ResizeObserver': parameter 1 is not of type 'Element");tE.observe(this,e,t)},ResizeObserver.prototype.unobserve=function(e){if(0==arguments.length)throw TypeError("Failed to execute 'unobserve' on 'ResizeObserver': 1 argument required, but only 0 present.");if(!isElement(e))throw TypeError("Failed to execute 'unobserve' on 'ResizeObserver': parameter 1 is not of type 'Element");tE.unobserve(this,e)},ResizeObserver.prototype.disconnect=function(){tE.disconnect(this)},ResizeObserver.toString=function(){return"function ResizeObserver () { [polyfill code] }"},ResizeObserver}();let tz="undefined"!=typeof document&&"undefined"!=typeof window&&window.ResizeObserver?window.ResizeObserver:tP,t$=function(){let e=new WeakMap,t=new WeakMap;return{subscribe(n,r){let o=t.get(n)||[],a=e.get(n);return t.has(n)||(t.set(n,o),a=({subscribe(e,t){let n=new tz(e=>{let[n]=e;t({_contentRect:n.contentRect,border:{width:n.borderBoxSize[0].inlineSize,height:n.borderBoxSize[0].blockSize},content:{width:n.contentRect.width,height:n.contentRect.height}})});return n.observe(e),()=>{n.unobserve(e),n.disconnect()}}}).subscribe(n,e=>{for(let t of o)t(e)})),o.push(r),()=>{let e=o.indexOf(r);e>-1&&o.splice(e,1),0===o.length&&a&&a()}}}}();function useElementSize(e){let[t,n]=(0,e4.useState)(null);return(0,e4.useEffect)(()=>{if(e)return t$.subscribe(e,n)},[e]),t}function useElementRect(e){let t=useElementSize(e);return(null==t?void 0:t._contentRect)||null}function useGlobalKeyDown(e){return(0,e4.useEffect)(()=>(addEventListener("keydown",e),()=>removeEventListener("keydown",e)),[e])}function clamp$1(e){return Math.max(Math.min(e,255),0)}function clamp(e){return Math.max(Math.min(e,255),0)}function rgbToHex(e){let{r:t,g:n,b:r}=e;return"#"+(16777216+(t<<16)+(n<<8)+r).toString(16).slice(1)}let tC=/hsl\(\s*(\d+)\s*,\s*((\d+(?:\.\d+)?)%)\s*,\s*((\d+(?:\.\d+)?)%)\s*\)/i;function parseColor(e){if(!e)return{r:0,g:0,b:0};if("string"!=typeof e)throw Error("parseColor: expected a string");if("#"===e[0]&&(4===e.length||7===e.length)&&function(e){for(let t of e)if(-1==="0123456789ABCDEFabcdef".indexOf(t))return!1;return!0}(e.slice(1)))return function(e){if(4===e.length){let t=e.slice(1,2),n=e.slice(2,3),r=e.slice(3,4);return{r:parseInt(t+t,16),g:parseInt(n+n,16),b:parseInt(r+r,16)}}return{r:parseInt(e.slice(1,3),16),g:parseInt(e.slice(3,5),16),b:parseInt(e.slice(5,7),16)}}(e);if(e.startsWith("hsl("))return function(e){let t=e.s/100,n=e.l/100,r=(1-Math.abs(2*n-1))*t,o=r*(1-Math.abs(e.h/60%2-1)),a=n-r/2,i=0,l=0,s=0;return 0<=e.h&&e.h<60?(i=r,l=o,s=0):60<=e.h&&e.h<120?(i=o,l=r,s=0):120<=e.h&&e.h<180?(i=0,l=r,s=o):180<=e.h&&e.h<240?(i=0,l=o,s=r):240<=e.h&&e.h<300?(i=o,l=0,s=r):300<=e.h&&e.h<360&&(i=r,l=0,s=o),{r:Math.round((i+a)*255),g:Math.round((l+a)*255),b:Math.round((s+a)*255)}}(function(e){let t=tC.exec(e);if(!t)throw Error('parseHsl: string is not a HSL color: "'.concat(e,'"'));return{h:parseInt(t[1]),s:parseFloat(t[3]),l:parseFloat(t[5])}}(e));throw Error('parseColor: unexpected color format: "'.concat(e,'"'))}function rgba(e,t){let n=parseColor(e);return"rgba(".concat(n.r,",").concat(n.g,",").concat(n.b,",").concat(t,")")}function createButtonTones(e,t,n,r,o,a){return{default:e.button({base:t,dark:n,solid:r.default,muted:o.default,mode:a}),primary:e.button({base:t,dark:n,solid:r.primary,muted:o.primary,mode:a}),positive:e.button({base:t,dark:n,solid:r.positive,muted:o.positive,mode:a}),caution:e.button({base:t,dark:n,solid:r.caution,muted:o.caution,mode:a}),critical:e.button({base:t,dark:n,solid:r.critical,muted:o.critical,mode:a})}}let tO="hsl(0, 0%, 0%)",tA="hsl(0, 0%, 100%)",tT={default:{lightest:"hsl(0, 0%, 95%)",lighter:"hsl(0, 0%, 70%)",light:"hsl(0, 0%, 65%)",base
1:"hsl(0, 0%, 50%)",dark:"hsl(0, 0%, 35%)",darker:"hsl(0, 0%, 20%)",darkest:"hsl(0, 0%, 5%)"},transparent:{lightest:"hsl(240, 100%, 95%)",lighter:"hsl(240, 100%, 70%)",light:"hsl(240, 100%, 65%)",base:"hsl(240, 100%, 50%)",dark:"hsl(240, 100%, 35%)",darker:"hsl(240, 100%, 20%)",darkest:"hsl(240, 100%, 5%)"},primary:{lightest:"hsl(240, 100%, 95%)",lighter:"hsl(240, 100%, 70%)",light:"hsl(240, 100%, 65%)",base:"hsl(240, 100%, 50%)",dark:"hsl(240, 100%, 35%)",darker:"hsl(240, 100%, 20%)",darkest:"hsl(240, 100%, 5%)"},positive:{lightest:"hsl(120, 100%, 95%)",lighter:"hsl(120, 100%, 70%)",light:"hsl(120, 100%, 65%)",base:"hsl(120, 100%, 50%)",dark:"hsl(120, 100%, 35%)",darker:"hsl(120, 100%, 20%)",darkest:"hsl(120, 100%, 5%)"},caution:{lightest:"hsl(60, 100%, 95%)",lighter:"hsl(60, 100%, 70%)",light:"hsl(60, 100%, 65%)",base:"hsl(60, 100%, 50%)",dark:"hsl(60, 100%, 35%)",darker:"hsl(60, 100%, 20%)",darkest:"hsl(60, 100%, 5%)"},critical:{lightest:"hsl(0, 100%, 95%)",lighter:"hsl(0, 100%, 70%)",light:"hsl(0, 100%, 65%)",base:"hsl(0, 100%, 50%)",dark:"hsl(0, 100%, 35%)",darker:"hsl(0, 100%, 20%)",darkest:"hsl(0, 100%, 5%)"}},tM={gray:"hsl(0, 0%, 50%)",red:"hsl(0, 100%, 50%)",orange:"hsl(30, 100%, 50%)",yellow:"hsl(60, 100%, 50%)",green:"hsl(120, 100%, 50%)",cyan:"hsl(180, 100%, 50%)",blue:"hsl(240, 100%, 50%)",purple:"hsl(270, 100%, 50%)",magenta:"hsl(300, 100%, 50%)"},tV={transparent:{bg:[tT.transparent.darkest,tT.transparent.lightest],fg:[tT.transparent.lightest,tT.transparent.darkest],border:[tT.transparent.darker,tT.transparent.lighter],focusRing:[tT.transparent.base,tT.transparent.base]},primary:{bg:[tT.primary.darkest,tT.primary.lightest],fg:[tT.primary.lightest,tT.primary.darkest],border:[tT.primary.darker,tT.primary.lighter],focusRing:[tT.primary.base,tT.primary.base]},positive:{bg:[tT.positive.darkest,tT.positive.lightest],fg:[tT.positive.lightest,tT.positive.darkest],border:[tT.positive.darker,tT.positive.lighter],focusRing:[tT.positive.base,tT.positive.base]},caution:{bg:[tT.caution.darkest,tT.caution.lightest],fg:[tT.caution.lightest,tT.caution.darkest],border:[tT.caution.darker,tT.caution.lighter],focusRing:[tT.caution.base,tT.caution.base]},critical:{bg:[tT.critical.darkest,tT.critical.lightest],fg:[tT.critical.lightest,tT.critical.darkest],border:[tT.critical.darker,tT.critical.lighter],focusRing:[tT.critical.base,tT.critical.base]}},tL={base:e=>{let{dark:t,name:n}=e;return"default"===n?{bg:t?tO:tA,fg:t?tA:tO,border:t?tT.default.darkest:tT.default.lightest,focusRing:tT.primary.base,shadow:{outline:tO,umbra:tO,penumbra:tO,ambient:tO},skeleton:{from:t?tA:tO,to:t?tA:tO}}:{bg:tV[n].bg[t?0:1],fg:tV[n].fg[t?0:1],border:tV[n].border[t?0:1],focusRing:tV[n].focusRing[t?0:1],shadow:{outline:tO,umbra:tO,penumbra:tO,ambient:tO},skeleton:{from:t?tA:tO,to:t?tA:tO}}},solid:e=>{let{base:t,dark:n,state:r,tone:o}=e,a=tT[o];return"hovered"===r?{bg:n?a.light:a.dark,bg2:n?a.light:a.dark,border:n?a.lighter:a.darker,fg:n?a.darkest:a.lightest,muted:{fg:tO},accent:{fg:tO},link:{fg:tO},code:{bg:tO,fg:tO},skeleton:t.skeleton}:{bg:a.base,bg2:a.base,border:n?a.light:a.dark,fg:n?a.darkest:a.lightest,muted:{fg:tO},accent:{fg:tO},link:{fg:tO},code:{bg:tO,fg:tO},skeleton:t.skeleton}},muted:e=>{let{base:t,dark:n,state:r,tone:o}=e,a=tT[o];return"hovered"===r?{bg:n?a.darker:a.lighter,bg2:n?a.darker:a.lighter,border:n?a.lighter:a.darker,fg:n?a.lightest:a.darkest,muted:{fg:tO},accent:{fg:tO},link:{fg:tO},code:{bg:tO,fg:tO},skeleton:t.skeleton}:{bg:n?a.darkest:a.lightest,bg2:n?a.darkest:a.lightest,border:n?a.darker:a.lighter,fg:n?a.lighter:a.darker,muted:{fg:tO},accent:{fg:tO},link:{fg:tO},code:{bg:tO,fg:tO},skeleton:t.skeleton}},button:e=>{let{base:t,mode:n,muted:r,solid:o}=e;return"bleed"===n?{...r,enabled:{bg:"transparent",bg2:"transparent",fg:r.enabled.fg,border:"transparent",muted:{fg:tO},accent:{fg:tO},link:{fg:tO},code:{bg:tO,fg:tO},skeleton:t.skeleton},hovered:{bg:r.enabled.bg,bg2:r.enabled.bg,fg:r.hovered.fg,border:"transparent",muted:{fg:tO},accent:{fg:tO},link:{fg:tO},code:{bg:tO,fg:tO},skeleton:t.skeleton}}:"ghost"===n?{...o,enabled:r.enabled}:o},card:e=>{let{base:t}=e;return{bg:tO,bg2:tO,fg:tO,border:tO,muted:{fg:tO},accent:{fg:tO},link:{fg:tO},code:{bg:tO,fg:tO},skeleton:t.skeleton}},input:()=>({bg:tO,fg:tO,border:tO,placeholder:tO}),selectable:e=>{let{muted:t,state:n,tone:r}=e;return t[r][n]},spot:e=>{let{key:t}=e;return tM[t]},syntax:()=>({atrule:tO,attrName:tO,attrValue:tO,attribute:tO,boolean:tO,builtin:tO,cdata:tO,char:tO,class:tO,className:tO,comment:tO,constant:tO,deleted:tO,doctype:tO,entity:tO,function:tO,hexcode:tO,id:tO,important:tO,inserted:tO,keyword:tO,number:tO,operator:tO,prolog:tO,property:tO,pseudoClass:tO,pseudoElement:tO,punctuation:tO,regex:tO,selector:tO,string:tO,symbol
1:tO,tag:tO,unit:tO,url:tO,variable:tO})};function _createSelectableStates(e,t,n,r,o,a){return{enabled:e.selectable({base:t,dark:n,solid:r,muted:o,state:"enabled",tone:a}),hovered:e.selectable({base:t,dark:n,solid:r,muted:o,state:"hovered",tone:a}),pressed:e.selectable({base:t,dark:n,solid:r,muted:o,state:"pressed",tone:a}),selected:e.selectable({base:t,dark:n,solid:r,muted:o,state:"selected",tone:a}),disabled:e.selectable({base:t,dark:n,solid:r,muted:o,state:"disabled",tone:a})}}function _createColorScheme(e,t){return{default:_createColor(e,t,"default"),transparent:_createColor(e,t,"transparent"),primary:_createColor(e,t,"primary"),positive:_createColor(e,t,"positive"),caution:_createColor(e,t,"caution"),critical:_createColor(e,t,"critical")}}function _createColor(e,t,n){let r=e.base({dark:t,name:n}),o={default:{enabled:e.solid({base:r,dark:t,tone:"default",name:n,state:"enabled"}),disabled:e.solid({base:r,dark:t,tone:"default",name:n,state:"disabled"}),hovered:e.solid({base:r,dark:t,tone:"default",name:n,state:"hovered"}),pressed:e.solid({base:r,dark:t,tone:"default",name:n,state:"pressed"}),selected:e.solid({base:r,dark:t,tone:"default",name:n,state:"selected"})},transparent:{enabled:e.solid({base:r,dark:t,tone:"transparent",name:n,state:"enabled"}),disabled:e.solid({base:r,dark:t,tone:"transparent",name:n,state:"disabled"}),hovered:e.solid({base:r,dark:t,tone:"transparent",name:n,state:"hovered"}),pressed:e.solid({base:r,dark:t,tone:"transparent",name:n,state:"pressed"}),selected:e.solid({base:r,dark:t,tone:"transparent",name:n,state:"selected"})},primary:{enabled:e.solid({base:r,dark:t,tone:"primary",name:n,state:"enabled"}),disabled:e.solid({base:r,dark:t,tone:"primary",name:n,state:"disabled"}),hovered:e.solid({base:r,dark:t,tone:"primary",name:n,state:"hovered"}),pressed:e.solid({base:r,dark:t,tone:"primary",name:n,state:"pressed"}),selected:e.solid({base:r,dark:t,tone:"primary",name:n,state:"selected"})},positive:{enabled:e.solid({base:r,dark:t,tone:"positive",name:n,state:"enabled"}),disabled:e.solid({base:r,dark:t,tone:"positive",name:n,state:"disabled"}),hovered:e.solid({base:r,dark:t,tone:"positive",name:n,state:"hovered"}),pressed:e.solid({base:r,dark:t,tone:"positive",name:n,state:"pressed"}),selected:e.solid({base:r,dark:t,tone:"positive",name:n,state:"selected"})},caution:{enabled:e.solid({base:r,dark:t,tone:"caution",name:n,state:"enabled"}),disabled:e.solid({base:r,dark:t,tone:"caution",name:n,state:"disabled"}),hovered:e.solid({base:r,dark:t,tone:"caution",name:n,state:"hovered"}),pressed:e.solid({base:r,dark:t,tone:"caution",name:n,state:"pressed"}),selected:e.solid({base:r,dark:t,tone:"caution",name:n,state:"selected"})},critical:{enabled:e.solid({base:r,dark:t,tone:"critical",name:n,state:"enabled"}),disabled:e.solid({base:r,dark:t,tone:"critical",name:n,state:"disabled"}),hovered:e.solid({base:r,dark:t,tone:"critical",name:n,state:"hovered"}),pressed:e.solid({base:r,dark:t,tone:"critical",name:n,state:"pressed"}),selected:e.solid({base:r,dark:t,tone:"critical",name:n,state:"selected"})}},a={default:{enabled:e.muted({base:r,dark:t,tone:"default",name:n,state:"enabled"}),disabled:e.muted({base:r,dark:t,tone:"default",name:n,state:"disabled"}),hovered:e.muted({base:r,dark:t,tone:"default",name:n,state:"hovered"}),pressed:e.muted({base:r,dark:t,tone:"default",name:n,state:"pressed"}),selected:e.muted({base:r,dark:t,tone:"default",name:n,state:"selected"})},transparent:{enabled:e.muted({base:r,dark:t,tone:"transparent",name:n,state:"enabled"}),disabled:e.muted({base:r,dark:t,tone:"transparent",name:n,state:"disabled"}),hovered:e.muted({base:r,dark:t,tone:"transparent",name:n,state:"hovered"}),pressed:e.muted({base:r,dark:t,tone:"transparent",name:n,state:"pressed"}),selected:e.muted({base:r,dark:t,tone:"transparent",name:n,state:"selected"})},primary:{enabled:e.muted({base:r,dark:t,tone:"primary",name:n,state:"enabled"}),disabled:e.muted({base:r,dark:t,tone:"primary",name:n,state:"disabled"}),hovered:e.muted({base:r,dark:t,tone:"primary",name:n,state:"hovered"}),pressed:e.muted({base:r,dark:t,tone:"primary",name:n,state:"pressed"}),selected:e.muted({base:r,dark:t,tone:"primary",name:n,state:"selected"})},positive:{enabled:e.muted({base:r,dark:t,tone:"positive",name:n,state:"enabled"}),disabled:e.muted({base:r,dark:t,tone:"positive",name:n,state:"disabled"}),hovered:e.muted({base:r,dark:t,tone:"positive",name:n,state:"hovered"}),pressed:e.muted({base:r,dark:t,tone:"positive",name:n,state:"pressed"}),selected:e.muted({base:r,dark:t,tone:"positive",name:n,state:"selected"})},caution:{enabled:e.muted({base:r,dark:t,tone:"caution",name:n,state:"enabled"}),disabled:e.muted({base:r,dark:t,tone:"caution",name:n,state:"disabled"}),hovered:e.muted({base:r,dark:t,tone:"caution",name:n,state:"hovered"}),pressed:e.muted({base:r,dark:t,tone:"caution",name:n,state:"pressed"}),selected:e.muted({base:r,dark:t,tone:"caution",name:n,state:"selected"})},critical:{enabled:e.muted({base:r,dark:t,tone:"critical",name:n,state:"enabled"}),disabled:e.muted({base:r,dark:t,tone:"critical",name:n,state:"disabled"}),hovered:e.muted({base:r,dark:t,tone:"critical",name:n,state:"hovered"}),pressed:e.muted({base:r,dark:t,tone:"critical",name:n,state:"pressed"}),selected:e.muted({base:r,dark:t,tone:"critical",name:n,state:"selected"})}};
1return{base:r,button:{default:createButtonTones(e,r,t,o,a,"default"),ghost:createButtonTones(e,r,t,o,a,"ghost"),bleed:createButtonTones(e,r,t,o,a,"bleed")},card:{enabled:e.card({base:r,dark:t,name:n,state:"enabled",solid:o,muted:a}),disabled:e.card({base:r,dark:t,name:n,state:"disabled",solid:o,muted:a}),hovered:e.card({base:r,dark:t,name:n,state:"hovered",solid:o,muted:a}),pressed:e.card({base:r,dark:t,name:n,state:"pressed",solid:o,muted:a}),selected:e.card({base:r,dark:t,name:n,state:"selected",solid:o,muted:a})},dark:t,input:{default:{enabled:e.input({base:r,dark:t,mode:"default",state:"enabled",solid:o.default,muted:a.default}),disabled:e.input({base:r,dark:t,mode:"default",state:"disabled",solid:o.default,muted:a.default}),hovered:e.input({base:r,dark:t,mode:"default",state:"hovered",solid:o.default,muted:a.default}),readOnly:e.input({base:r,dark:t,mode:"default",state:"readOnly",solid:o.default,muted:a.default})},invalid:{enabled:e.input({base:r,dark:t,mode:"invalid",state:"enabled",solid:o.default,muted:a.default}),disabled:e.input({base:r,dark:t,mode:"invalid",state:"disabled",solid:o.default,muted:a.default}),hovered:e.input({base:r,dark:t,mode:"invalid",state:"hovered",solid:o.default,muted:a.default}),readOnly:e.input({base:r,dark:t,mode:"invalid",state:"readOnly",solid:o.default,muted:a.default})}},selectable:{default:_createSelectableStates(e,r,t,o,a,"default"),primary:_createSelectableStates(e,r,t,o,a,"primary"),positive:_createSelectableStates(e,r,t,o,a,"positive"),caution:_createSelectableStates(e,r,t,o,a,"caution"),critical:_createSelectableStates(e,r,t,o,a,"critical")},spot:{gray:e.spot({base:r,dark:t,key:"gray"}),blue:e.spot({base:r,dark:t,key:"blue"}),purple:e.spot({base:r,dark:t,key:"purple"}),magenta:e.spot({base:r,dark:t,key:"magenta"}),red:e.spot({base:r,dark:t,key:"red"}),orange:e.spot({base:r,dark:t,key:"orange"}),yellow:e.spot({base:r,dark:t,key:"yellow"}),green:e.spot({base:r,dark:t,key:"green"}),cyan:e.spot({base:r,dark:t,key:"cyan"})},syntax:e.syntax({base:r,dark:t}),solid:o,muted:a}}function multiply(e,t){let n=parseColor(e),r=parseColor(t),o=rgbToHex({r:Math.round(clamp$1(255*(n.r/255*(r.r/255)))),g:Math.round(clamp$1(255*(n.g/255*(r.g/255)))),b:Math.round(clamp$1(255*(n.b/255*(r.b/255))))});return o}function screen(e,t){var n,r,o,a,i,l;let s=parseColor(e),d=parseColor(t),u=rgbToHex({r:Math.round(clamp(255*((n=s.r/255)+(r=d.r/255)-n*r))),g:Math.round(clamp(255*((o=s.g/255)+(a=d.g/255)-o*a))),b:Math.round(clamp(255*((i=s.b/255)+(l=d.b/255)-i*l)))});return u}let tF={default:e6.VG.gray,transparent:e6.VG.gray,primary:e6.VG.blue,positive:e6.VG.green,caution:e6.VG.yellow,critical:e6.VG.red},tB=["default","transparent"],tG=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t={...tL,...e};return{light:_createColorScheme(t,!1),dark:_createColorScheme(t,!0)}}({base:e=>{let{dark:t,name:n}=e;if("default"===n){let e=e6.VG.gray,n=t?e[900].hex:e[100].hex;return{fg:t?e6.ix.hex:e6.Sn.hex,bg:t?e6.Sn.hex:e6.ix.hex,border:e[t?800:200].hex,focusRing:e6.VG.blue[500].hex,shadow:{outline:rgba(e[500].hex,.4),umbra:t?rgba(e[950].hex,.4):rgba(e[500].hex,.2),penumbra:t?rgba(e[950].hex,.28):rgba(e[500].hex,.14),ambient:t?rgba(e[950].hex,.24):rgba(e[500].hex,.12)},skeleton:{from:n,to:rgba(n,.5)}}}if("transparent"===n){let e=tF.default,n=e[t?800:200].hex;return{fg:e[t?100:900].hex,bg:e[t?950:50].hex,border:e[t?800:300].hex,focusRing:e6.VG.blue[500].hex,shadow:{outline:rgba(e[500].hex,.4),umbra:t?rgba(e[900].hex,.4):rgba(e[500].hex,.2),penumbra:t?rgba(e[900].hex,.28):rgba(e[500].hex,.14),ambient:t?rgba(e[900].hex,.24):rgba(e[500].hex,.12)},skeleton:{from:n,to:rgba(n,.5)}}}let r=tF[n]||tF.default,o=r[t?800:200].hex;return{fg:r[t?100:900].hex,bg:r[t?950:50].hex,border:r[t?800:200].hex,focusRing:r[500].hex,shadow:{outline:rgba(r[500].hex,.4),umbra:t?rgba(r[900].hex,.4):rgba(r[500].hex,.2),penumbra:t?rgba(r[900].hex,.28):rgba(r[500].hex,.14),ambient:t?rgba(r[900].hex,.24):rgba(r[500].hex,.12)},skeleton:{from:o,to:rgba(o,.5)}}},solid:e=>{let{base:t,dark:n,name:r,state:o,tone:a}=e,i=n?screen:multiply,l=n?multiply:screen,s=tF[r]||tF.default,d=tB.includes(r)&&tB.includes(a),u=tF["default"===a?r:a]||s;if("disabled"===o){u=s;let e=i(t.bg,u[n?800:200].hex),r=l(e,u[n?200:800].hex);return{bg:e,bg2:l(e,u[n?50:950].hex),border:i(t.bg,u[n?800:200].hex),fg:i(t.bg,n?e6.Sn.hex:e6.ix.hex),muted:{fg:i(t.bg,u[n?950:50].hex)},accent:{fg:i(t.bg,u[n?950:50].hex)},link:{fg:i(t.bg,u[n?950:50].hex)},code:{bg:e,fg:i(t.bg,u[n?950:50].hex)},skeleton:{from:r,to:rgba(r,.5)}}}if("hovered"===o){let e=i(t.bg,u[n?300:600].hex),r=l(e,u[n?200:800].hex);return{bg:e,bg2:l(e,u[n?50:950].hex),border:i(t.bg,u[n?300:600].hex),fg:i(t.bg,n?e6.Sn.hex:e6.ix.hex),muted:{fg:i(t.bg,u[n?800:200].hex)},accent:{fg:l(e,e6.VG.red[n?800:200].hex)},link:{fg:l(e,e6.VG.blue[n?800:200].hex)},code:{bg:i(e,u[n?950:50].hex),fg:i(t.bg,u[n?800:200].hex)},skeleton:{from:r,to:rgba(r,.5)}}}if("pressed"===o){let e=i(t.bg,u[n?200:800].hex),r=l(e,u[n?200:800].hex);return{bg:i(t.bg,u[n?200:800].hex),bg2:l(e,u[n?50:950].hex),border:i(t.bg,u[n?200:800].hex),fg:i(t.bg,n?e6.Sn.hex:e6.ix.hex),muted:{fg:i(t.bg,u[n?800:200].hex)},accent:{fg:l(e,e6.VG.red[n?800:200].hex)},link:{fg:l(e,e6.VG.blue[n?800:200].hex)},code:{bg:i(e,u[n?950:50].hex),fg:i(t.bg,u[n?800:200].hex)},skeleton:{from:r,to:rgba(r,.5)}}}if("selected"===o){d&&(u=tF.primary);let e=i(t.bg,u[n?200:800].hex),r=l(e,u[n?200:800].hex);return{bg:e,bg2:l(e,u[n?50:950].hex),border:i(t.bg,u[n?200:800].hex),fg:i(t.bg,n?e6.Sn.hex:e6.ix.hex),muted:{fg:i(t.bg,u[n?800:200].hex)},accent:{fg:l(e,e6.VG.red[n?800:200].hex)},link:{fg:l(e,e6.VG.blue[n?800:200].hex)},code:{bg:i(e,u[n?950:50].hex),fg:i(t.bg,u[n?800:200].hex)},skeleton:{from:r,to:rgba(r,.5)}}}let c=i(t.bg,u[n?400:500].hex),f=l(c,u[n?200:800].hex);return{bg:c,bg2:l(c,u[n?50:950].hex),border:i(t.bg,u[n?400:500].hex),fg:i(t.bg,n?e6.Sn.hex:e6.ix.hex),muted:{fg:i(t.bg,u[n?900:100].hex)},accent:{fg:l(c,e6.VG.red[n?900:100].hex)},link:{fg:l(c,e6.VG.blue[n?900:100].hex)},code:{bg:i(c,u[n?950:50].hex),fg:i(t.bg,u[n?900:100].hex)},skeleton:{from:f,to:rgba(f,.5)}}},muted:e=>{let{base:t,dark:n,name:r,state:o,tone:a}=e,i=n?screen:multiply,l=tF[r]||tF.default,s=tB.includes(r)&&tB.includes(a),d=tF["default"===a?r:a]||l;if("disabled"===o){d=l;let e=t.bg,r=i(e,d[n?900:100].hex);return{bg:e,bg2:i(e,d[n?950:50].hex),border:i(e,d[n?950:50].hex),fg:i(e,d[n?800:200].hex),muted:{fg:i(e,d[n?900:100].hex)},accent:{fg:i(e,d[n?900:100].hex)},link:{fg:i(e,d[n?900:100].hex)},code:{bg:e,fg:i(e,d[n?900:100].hex)},skeleton:{from:rgba(r,.5),to:rgba(r,.25)}}}if("hovered"===o){let e=i(t.bg,d[n?950:50].hex),r=i(e,d[n?900:100].hex);return{bg:e,bg2:i(e,d[n?950:50].hex),border:i(e,d[n?900:100].hex),fg:i(t.bg,d[n?200:800].hex),muted:{fg:i(t.bg,d[n?400:600].hex)},accent:{fg:i(t.bg,e6.VG.red[n?400:500].hex)},link:{fg:i(t.bg,e6.VG.blue[n?400:600].hex)},code:{bg:i(e,d[n?950:50].hex),fg:i(t.bg,d[n?400:600].hex)},skeleton:{from:r,to:rgba(r,.5)}}}if("pressed"===o){s&&(d=tF.primary);let e=i(t.bg,d[n?900:100].hex),r=i(e,d[n?900:100].hex);return{bg:e,bg2:i(e,d[n?950:50].hex),border:i(e,d[n?900:100].hex),fg:i(t.bg,d[n?200:800].hex),muted:{fg:i(t.bg,d[n?400:600].hex)},accent:{fg:i(e,e6.VG.red[n?400:500].hex)},link:{fg:i(e,e6.VG.blue[n?400:600].hex)},code:{bg:i(e,d[n?950:50].hex),fg:i(t.bg,d[n?400:600].hex)},skeleton:{from:r,to:rgba(r,.5)}}}if("selected"===o){s&&(d=tF.primary);let e=i(t.bg,d[n?900:100].hex),r=i(e,d[n?900:100].hex);return{bg:e,bg2:i(e,d[n?950:50].hex),border:i(e,d[n?900:100].hex),fg:i(t.bg,d[n?200:800].hex),muted:{fg:i(t.bg,d[n?400:600].hex)},accent:{fg:i(e,e6.VG.red[n?400:500].hex)},link:{fg:i(e,e6.VG.blue[n?400:600].hex)},code:{bg:i(e,d[n?950:50].hex),fg:i(t.bg,d[n?400:600].hex)},skeleton:{from:r,to:rgba(r,.5)}}}let u=t.bg,c=i(u,d[n?900:100].hex);return{bg:u,bg2:i(u,d[n?950:50].hex),border:i(u,d[n?900:100].hex),fg:i(t.bg,d[n?300:700].hex),muted:{fg:i(t.bg,d[n?400:600].hex)},accent:{fg:i(t.bg,e6.VG.red[n?400:500].hex)},link:{fg:i(t.bg,e6.VG.blue[n?400:600].hex)},code:{bg:i(t.bg,d[n?950:50].hex),fg:i(t.bg,d[n?400:600].hex)},skeleton:{from:c,to:rgba(c,.5)}}},button:e=>{let{base:t,mode:n,muted:r,solid:o}=e;return"bleed"===n?{enabled:{...r.enabled,border:r.enabled.bg},hovered:{...r.hovered,border:r.hovered.bg},pressed:{...r.pressed,border:r.pressed.bg},selected:{...r.selected,border:r.selected.bg},disabled:{...r.disabled,border:r.disabled.bg}}:"ghost"===n?{...o,enabled:{...r.enabled,border:t.border},disabled:r.disabled}:o},card:e=>{let{base:t,dark:n,muted:r,name:o,solid:a,state:i}=e;if("hovered"===i)return r[o].hovered;if("disabled"===i)return r[o].disabled;let l=tB.includes(o),s=tF[o]||tF.default,d=n?screen:multiply;if("pressed"===i)return l?r.primary.pressed:r[o].pressed;if("selected"===i)return l?a.primary.enabled:a[o].enabled;let u=t.bg,c=d(t.bg,s[n?900:100].hex);return{bg:u,bg2:d(u,s[n?950:50].hex),fg:t.fg,border:t.border,muted:{fg:d(t.bg,s[n?400:600].hex)},accent:{fg:d(t.bg,e6.VG.red[n?400:500].hex)},link:{fg:d(t.bg,e6.VG.blue[n?400:600].hex)},code:{bg:d(t.bg,s[n?950:50].hex),fg:s[n?400:600].hex},skeleton:{from:c,to:rgba(c,.5)}}},input:e=>{let{base:t,dark:n,mode:r,state:o}=e,a=n?screen:multiply;if("invalid"===r){let e=tF.critical;return{bg:a(t.bg,e[n?950:50].hex),fg:a(t.bg,e[n?400:600].hex),border:a(t.bg,e[n?800:200].hex),placeholder:a(t.bg,e[n?600:400].hex)}}return"hovered"===o?{bg:t.bg,fg:t.fg,border:a(t.bg,e6.VG.gray[n?700:300].hex),placeholder:a(t.bg,e6.VG.gray[n?600:400].hex)}:"disabled"===o?{bg:a(t.bg,e6.VG.gray[n?950:50].hex),fg:a(t.bg,e6.VG.gray[n?700:300].hex),border:a(t.bg,e6.VG.gray[n?900:100].hex),placeholder:a(t.bg,e6.VG.gray[n?800:200].hex)}:"readOnly"===o?{bg:a(t.bg,e6.VG.gray[n?950:50].hex),fg:a(t.bg,e6.VG.gray[n?200:800].hex),border:a(t.bg,e6.VG.gray[n?800:200].hex),placeholder:a(t.bg,e6.VG.gray[n?600:400].hex)}:{bg:t.bg,fg:t.fg,border:t.border,placeholder:a(t.bg,e6.VG.gray[n?600:400].hex)}},selectable:e=>{let{base:t,muted:n,tone:r,solid:o,state:a}=e;return"enabled"===a?{...n[r].enabled,bg:t.bg}:"pressed"===a?"default"===r?n.primary.pressed:n[r].pressed:"selected"===a?"default"===r?o.primary.enabled:o[r].enabled:"disabled"===a?{...n[r].disabled,bg:t.bg}:n[r][a]},spot:e=>{let{base:t,dark:n,key:r}=e;return(n?screen:multiply)(t.bg,e6.VG[r][n?400:500].hex)},syntax:e=>{let{base:t,dark:n}=e,r=n?screen:multiply,o=n?400:600,a=n?600:400;return{atrule:r(t.bg,e6.VG.purple[o].hex),attrName:r(t.bg,e6.VG.green[o].hex),attrValue:r(t.bg,e6.VG.yellow[o].hex),attribute:r(t.bg,e6.VG.yellow[o].hex),boolean:r(t.bg,e6.VG.purple[o].hex),builtin:r
1(t.bg,e6.VG.purple[o].hex),cdata:r(t.bg,e6.VG.yellow[o].hex),char:r(t.bg,e6.VG.yellow[o].hex),class:r(t.bg,e6.VG.orange[o].hex),className:r(t.bg,e6.VG.cyan[o].hex),comment:r(t.bg,e6.VG.gray[a].hex),constant:r(t.bg,e6.VG.purple[o].hex),deleted:r(t.bg,e6.VG.red[o].hex),doctype:r(t.bg,e6.VG.gray[a].hex),entity:r(t.bg,e6.VG.red[o].hex),function:r(t.bg,e6.VG.green[o].hex),hexcode:r(t.bg,e6.VG.blue[o].hex),id:r(t.bg,e6.VG.purple[o].hex),important:r(t.bg,e6.VG.purple[o].hex),inserted:r(t.bg,e6.VG.yellow[o].hex),keyword:r(t.bg,e6.VG.magenta[o].hex),number:r(t.bg,e6.VG.purple[o].hex),operator:r(t.bg,e6.VG.magenta[o].hex),prolog:r(t.bg,e6.VG.gray[a].hex),property:r(t.bg,e6.VG.blue[o].hex),pseudoClass:r(t.bg,e6.VG.yellow[o].hex),pseudoElement:r(t.bg,e6.VG.yellow[o].hex),punctuation:r(t.bg,e6.VG.gray[o].hex),regex:r(t.bg,e6.VG.blue[o].hex),selector:r(t.bg,e6.VG.red[o].hex),string:r(t.bg,e6.VG.yellow[o].hex),symbol:r(t.bg,e6.VG.purple[o].hex),tag:r(t.bg,e6.VG.red[o].hex),unit:r(t.bg,e6.VG.orange[o].hex),url:r(t.bg,e6.VG.red[o].hex),variable:r(t.bg,e6.VG.red[o].hex)}}}),tH={avatar:{sizes:[{distance:-3,size:25},{distance:-6,size:35},{distance:-9,size:55}]},button:{textWeight:"medium"},color:tG,container:[320,640,960,1280,1600,1920],focusRing:{offset:1,width:2},fonts:{code:{family:"ui-monospace, SFMono-Regular, SF Mono, Menlo, Consolas, Liberation Mono, monospace",weights:{regular:400,medium:500,semibold:600,bold:700},sizes:[{ascenderHeight:3,descenderHeight:3,fontSize:10,iconSize:17,lineHeight:13,letterSpacing:0},{ascenderHeight:4,descenderHeight:4,fontSize:13,iconSize:21,lineHeight:17,letterSpacing:0},{ascenderHeight:5,descenderHeight:5,fontSize:16,iconSize:25,lineHeight:21,letterSpacing:0},{ascenderHeight:6,descenderHeight:6,fontSize:19,iconSize:29,lineHeight:25,letterSpacing:0},{ascenderHeight:7,descenderHeight:7,fontSize:22,iconSize:33,lineHeight:29,letterSpacing:0}]},heading:{family:'-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", "Liberation Sans", Helvetica, Arial, system-ui, sans-serif',weights:{regular:700,medium:800,semibold:900,bold:900},sizes:[{ascenderHeight:4,descenderHeight:4,fontSize:12,iconSize:17,lineHeight:17,letterSpacing:0},{ascenderHeight:5,descenderHeight:5,fontSize:16,iconSize:25,lineHeight:21,letterSpacing:0},{ascenderHeight:6,descenderHeight:6,fontSize:21,iconSize:33,lineHeight:27,letterSpacing:0},{ascenderHeight:7,descenderHeight:7,fontSize:27,iconSize:41,lineHeight:33,letterSpacing:0},{ascenderHeight:8,descenderHeight:8,fontSize:33,iconSize:49,lineHeight:39,letterSpacing:0},{ascenderHeight:9,descenderHeight:9,fontSize:38,iconSize:53,lineHeight:45,letterSpacing:0}]},label:{family:'-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", "Liberation Sans", system-ui, sans-serif',weights:{regular:600,medium:700,semibold:800,bold:900},sizes:[{ascenderHeight:2,descenderHeight:2,fontSize:9.8,iconSize:15,lineHeight:11,letterSpacing:.5},{ascenderHeight:2,descenderHeight:2,fontSize:11.25,iconSize:17,lineHeight:12,letterSpacing:.5},{ascenderHeight:2,descenderHeight:2,fontSize:12.75,iconSize:19,lineHeight:13,letterSpacing:.5},{ascenderHeight:2,descenderHeight:2,fontSize:14,iconSize:21,lineHeight:14,letterSpacing:.5},{ascenderHeight:2,descenderHeight:2,fontSize:15.5,iconSize:23,lineHeight:15,letterSpacing:.5}]},text:{family:'-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", "Liberation Sans", Helvetica, Arial, system-ui, sans-serif',weights:{regular:400,medium:500,semibold:600,bold:700},sizes:[{ascenderHeight:3,descenderHeight:3,fontSize:10,iconSize:17,lineHeight:13,letterSpacing:0},{ascenderHeight:4,descenderHeight:4,fontSize:13,iconSize:21,lineHeight:17,letterSpacing:0},{ascenderHeight:5,descenderHeight:5,fontSize:16,iconSize:25,lineHeight:21,letterSpacing:0},{ascenderHeight:6,descenderHeight:6,fontSize:19,iconSize:29,lineHeight:25,letterSpacing:0},{ascenderHeight:7,descenderHeight:7,fontSize:22,iconSize:33,lineHeight:29,letterSpacing:0}]}},media:[360,600,900,1200,1800,2400],radius:[0,1,3,6,9,12,21],shadows:[null,{umbra:[0,0,0,0],penumbra:[0,0,0,0],ambient:[0,0,0,0]},{umbra:[0,3,5,-1],penumbra:[0,6,10,0],ambient:[0,1,18,0]},{umbra:[0,7,8,-4],penumbra:[0,12,17,2],ambient:[0,5,22,4]},{umbra:[0,9,11,-5],penumbra:[0,18,28,2],ambient:[0,7,34,6]},{umbra:[0,11,15,-7],penumbra:[0,24,38,3],ambient:[0,9,46,8]}],space:[0,4,8,12,20,32,52,84,136,220],input:{checkbox:{size:17},radio:{size:17,markSize:9},switch:{width:33,height:17,padding:4,transitionDurationMs:150,transitionTimingFunction:"ease-
1out"},border:{width:1}}},tI={dialog:{zOffset:600},popover:{zOffset:400},tooltip:{zOffset:200}},tD=function(){if("undefined"!=typeof globalThis)return globalThis;if("undefined"!=typeof window)return window;if("undefined"!=typeof self)return self;if(void 0!==n.g)return n.g;throw Error("@sanity/ui: could not locate global scope")}(),tZ=Symbol.for("@sanity/ui/context/theme");tD[tZ]=tD[tZ]||(0,e4.createContext)(null);let tN=tD[tZ];function ThemeProvider(e){let t=(0,e4.useContext)(tN),{children:n,scheme:r=(null==t?void 0:t.scheme)||"light",theme:o=(null==t?void 0:t.theme)||null,tone:a=(null==t?void 0:t.tone)||"default"}=e,i=(0,e4.useMemo)(()=>{if(!o)return null;let{color:e,layer:t,...n}=o,i=e[r]||e.light,l=i[a]||i.default,s=t||tI;return{sanity:{...n,color:l,layer:s}}},[r,o,a]),l=(0,e4.useMemo)(()=>o&&{version:0,theme:o,scheme:r,tone:a},[o,r,a]);return i?(0,e5.jsx)(tN.Provider,{value:l,children:(0,e5.jsx)(e9.f6,{theme:i,children:n})}):(0,e5.jsx)("pre",{children:'ThemeProvider: no "theme" property provided'})}function isRecord(e){return!!(e&&"object"==typeof e)}function useRootTheme(){let e=(0,e4.useContext)(tN);if(!e)throw Error("useRootTheme(): missing context value");if(!isRecord(e)||0!==e.version)throw Error("useRootTheme(): the context value is not compatible");return e}function ThemeColorProvider(e){let{children:t,scheme:n,tone:r}=e,o=useRootTheme();return(0,e5.jsx)(ThemeProvider,{scheme:n||o.scheme,theme:o.theme,tone:r,children:t})}function useTheme(){return(0,e9.Fg)()}let tW=new WeakMap;function getServerSnapshot$2(){return 0}function useMediaIndex(){let e=useTheme(),{media:t}=e.sanity,n=tW.get(t);return n||(n=function(e){let t;let n=e.length,getSizes=()=>
1{if(!t){t=[];for(let o=n;o>-1;o-=1){var r;let n=0===(r=o)?"screen and (max-width: ".concat(e[r]-1,"px)"):r===e.length?"screen and (min-width: ".concat(e[r-1],"px)"):"screen and (min-width: ".concat(e[r-1],"px) and (max-width: ").concat(e[r]-1,"px)");t.push({index:o,mq:window.matchMedia(n)})}}return t};return{getSnapshot:()=>{for(let{index:e,mq:t}of getSizes())if(t.matches)return e;return 0},subscribe:e=>{let t=[];for(let{mq:n}of getSizes()){let handleChange=()=>{n.matches&&e()};n.addEventListener("change",handleChange),t.push(()=>n.removeEventListener("change",handleChange))}return()=>{for(let e of t)e()}}}}(t),tW.set(t,n)),(0,e4.useSyncExternalStore)(n.subscribe,n.getSnapshot,getServerSnapshot$2)}function getMatchMedia$1(){return r||(r=window.matchMedia("(prefers-color-scheme: dark)")),r}function subscribe$1(e){let t=getMatchMedia$1();return t.addEventListener("change",e),()=>t.removeEventListener("change",e)}function getSnapshot$1(){return getMatchMedia$1().matches}function getServerSnapshot$1(){return!1}function usePrefersDark(){return(0,e4.useSyncExternalStore)(subscribe$1,getSnapshot$1,getServerSnapshot$1)}function getMatchMedia(){return o||(o=window.matchMedia("(prefers-reduced-motion: reduce)")),o}function subscribe(e){let t=getMatchMedia();return t.addEventListener("change",e),()=>t.removeEventListener("change",e)}function getSnapshot(){return getMatchMedia().matches}function getServerSnapshot(){return!1}function usePrefersReducedMotion(){return(0,e4.useSyncExternalStore)(subscribe,getSnapshot,getServerSnapshot)}let tq="undefined"!=typeof window?e4.useLayoutEffect:e4.useEffect;function useForwardedRef(e){let t=(0,e4.useRef)(null);return tq(()=>{e&&("function"==typeof e?e(t.current):e.current=t.current)}),t}function useCustomValidity(e,t){(0,e4.useEffect)(()=>{e.current&&e.current.setCustomValidity(t||"")},[t,e])}let tX="1px solid var(--card-border-color)";function border(e){let{theme:t}=e,{media:n}=t.sanity;return _responsive(n,e.$border,e=>e?{"&&":{border:tX}}:{"&&":{border:0}})}function borderTop(e){let{theme:t}=e,{media:n}=t.sanity;return _responsive(n,e.$borderTop,e=>e?{"&&":{borderTop:tX}}:{"&&":{borderTop:0}})}function borderRight(e){let{theme:t}=e,{media:n}=t.sanity;return _responsive(n,e.$borderRight,e=>e?{"&&":{borderRight:tX}}:{"&&":{borderRight:0}})}function borderBottom(e){let{theme:t}=e,{media:n}=t.sanity;return _responsive(n,e.$borderBottom,e=>e?{"&&":{borderBottom:tX}}:{"&&":{borderBottom:0}})}function borderLeft(e){let{theme:t}=e,{media:n}=t.sanity;return _responsive(n,e.$borderLeft,e=>e?{"&&":{borderLeft:tX}}:{"&&":{borderLeft:0}})}let tU={'&[data-as="ul"],&[data-as="ol"]':{listStyle:"none"}},tK={content:"content-box",border:"border-box"},tY={stretch:"stretch",fill:"100%"};function responsiveBoxDisplayStyle(e){let{theme:t}=e,{media:n}=t.sanity;return _responsive(n,e.$display,e=>({"&:not([hidden])":{display:e}}))}function responsiveBoxSizingStyle(e){let{theme:t}=e,{media:n}=t.sanity;return _responsive(n,e.$sizing,e=>({boxSizing:tK[e]}))}function responsiveBoxHeightStyle(e){let{theme:t}=e,{media:n}=t.sanity;return _responsive(n,e.$height,e=>({height:tY[e]}))}function responsiveBoxOverflowStyle(e){let{theme:t}=e,{media:n}=t.sanity;return _responsive(n,e.$overflow,e=>({overflow:e}))}let tJ={"&&:not([hidden])":{display:"flex"}};function responsiveFlexAlignStyle(e){let{theme:t}=e,{media:n}=t.sanity;return _responsive(n,e.$align,e=>({alignItems:e}))}function responsiveFlexGapStyle(e){let{theme:t}=e,{media:n,space:r}=t.sanity;return _responsive(n,e.$gap,e=>({gap:e?rem(r[e]):void 0}))}function responsiveFlexWrapStyle(e){let{theme:t}=e,{media:n}=t.sanity;return _responsive(n,e.$wrap,e=>({flexWrap:e}))}function responsiveFlexJustifyStyle(e){let{theme:t}=e,{media:n}=t.sanity;return _responsive(n,e.$justify,e=>({justifyContent:e}))}function responsiveFlexDirectionStyle(e){let{theme:t}=e,{media:n}=t.sanity;return _responsive(n,e.$direction,e=>({flexDirection:e}))}let tQ={minWidth:0,minHeight:0};function flexItemStyle(){return[tQ,responsiveFlexItemStyle]}function responsiveFlexItemStyle(e){let{theme:t}=e,{media:n}=t.sanity;return e.$flex?_responsive(n,e.$flex,e=>({flex:e})):tl}function focusRingBorderStyle(e){return"inset 0 0 0 ".concat(e.width,"px ").concat(e.color)}function focusRingStyle(e){let{base:t,border:n,focusRing:r}=e,o=r.offset+r.width,a=0-r.offset,i=t?t.bg:"var(--card-bg-color)";return[a>0&&"inset 0 0 0 ".concat(a,"px var(--card-focus-ring-color)"),n&&focusRingBorderStyle(n),a<0&&"0 0 0 ".concat(0-a,"px ").concat(i),o>0&&"0 0 0 ".concat(o,"px var(--card-focus-ring-color)")].filter(
1Boolean).join(",")}let t0={"&&:not([hidden])":{display:"grid"},'&[data-as="ul"],&[data-as="ol"]':{listStyle:"none"}},t1={auto:"auto",min:"min-content",max:"max-content",fr:"minmax(0, 1fr)"},t2={auto:"auto",min:"min-content",max:"max-content",fr:"minmax(0, 1fr)"};function responsiveGridAutoFlowStyle(e){let{theme:t}=e,{media:n}=t.sanity;return _responsive(n,e.$autoFlow,e=>({gridAutoFlow:e}))}function responsiveGridAutoRowsStyle(e){let{theme:t}=e,{media:n}=t.sanity;return _responsive(n,e.$autoRows,e=>({gridAutoRows:e&&t2[e]}))}function responsiveGridAutoColsStyle(e){let{theme:t}=e,{media:n}=t.sanity;return _responsive(n,e.$autoCols,e=>({gridAutoColumns:e&&t1[e]}))}function responsiveGridColumnsStyle(e){let{theme:t}=e,{media:n}=t.sanity;return _responsive(n,e.$columns,e=>({gridTemplateColumns:e&&"repeat(".concat(e,",minmax(0,1fr));")}))}function responsiveGridRowsStyle(e){let{theme:t}=e,{media:n}=t.sanity;return _responsive(n,e.$rows,e=>({gridTemplateRows:e&&"repeat(".concat(e,",minmax(0,1fr));")}))}function responsiveGridGapStyle(e){let{theme:t}=e,{media:n,space:r}=t.sanity;return _responsive(n,e.$gap,e=>({gridGap:e?rem(r[e]):void 0}))}function responsiveGridGapXStyle(e){let{theme:t}=e,{media:n,space:r}=t.sanity;return _responsive(n,e.$gapX,e=>({columnGap:e?rem(r[e]):void 0}))}function responsiveGridGapYStyle(e){let{theme:t}=e,{media:n,space:r}=t.sanity;return _responsive(n,e.$gapY,e=>({rowGap:e?rem(r[e]):void 0}))}let t5={auto:"auto",full:"1 / -1"},t4={auto:"auto",full:"1 / -1"};function responsiveGridItemRowStyle(e){let{theme:t}=e,{media:n}=t.sanity;return _responsive(n,e.$row,e=>"number"==typeof e?{gridRow:"span ".concat(e," / span ").concat(e)}:{gridRow:t5[e]})}function responsiveGridItemRowStartStyle(e){let{theme:t}=e,{media:n}=t.sanity;return _responsive(n,e.$rowStart,e=>({gridRowStart:e}))}function responsiveGridItemRowEndStyle(e){let{theme:t}=e,{media:n}=t.sanity;return _responsive(n,e.$rowEnd,e=>({gridRowEnd:e}))}function responsiveGridItemColumnStyle(e){let{theme:t}=e,{media:n}=t.sanity;return _responsive(n,e.$column,e=>"number"==typeof e?{gridColumn:"span ".concat(e," / span ").concat(e)}:{gridColumn:t4[e]})}function responsiveGridItemColumnStartStyle(e){let{theme:t}=e,{media:n}=t.sanity;return _responsive(n,e.$columnStart,e=>({gridColumnStart:e}))}function responsiveGridItemColumnEndStyle(e){let{theme:t}=e,{media:n}=t.sanity;return _responsive(n,e.$columnEnd,e=>({gridColumnEnd:e}))}function responsiveInputPaddingStyle(e){let{$fontSize:t,$iconLeft:n,$iconRight:r,$padding:o,$space:a,theme:i}=e,{fonts:l,media:s,space:d}=i.sanity,u=Math.max(o.length,a.length,t.length),c=[],f=[],p=[];for(let e=0;e<u;e+=1)p[e]=void 0===t[e]?p[e-1]:t[e],c[e]=void 0===o[e]?c[e-1]:o[e],f[e]=void 0===a[e]?f[e-1]:a[e];return _responsive(s,c,(e,t)=>{let o=l.text.sizes[p[t]]||l.text.sizes[2],a=o.lineHeight-o.ascenderHeight-o.descenderHeight,i=d[c[t]],s=d[f[t]],u={paddingTop:rem(i-o.ascenderHeight),paddingRight:rem(i),paddingBottom:rem(i-o.descenderHeight),paddingLeft:rem(i)};return r&&(u.paddingRight=rem(i+a+s)),n&&(u.paddingLeft=rem(i+a+s)),u})}function responsiveInputPaddingIconRightStyle(e){return responsiveInputPaddingStyle({...e,$iconRight:!0})}var t3=Object.freeze,t9=Object.defineProperty,__template$D=(e,t)=>t3(t9(e,"raw",{value:t3(t||e.slice())}));let t6=(0,e9.iv)(w||(w=__template$D(["\n  &:not([hidden]) {\n    display: flex;\n  }\n\n  align-items: center;
1\n"])));function textInputRootStyle(){return t6}function textInputBaseStyle(e){let{theme:t,$scheme:n,$tone:r,$weight:o}=e,a=t.sanity.fonts.text,i=t.sanity.color.input;return(0,e9.iv)(k||(k=__template$D(["\n    appearance: none;\n    background: none;\n    border: 0;\n    border-radius: 0;\n    outline: none;\n    width: 100%;\n    box-sizing: border-box;\n    font-family: ",";\n    font-weight: ",";\n    margin: 0;\n    position: relative;\n    z-index: 1;\n    display: block;\n\n    /* NOTE: This is a hack to disable Chrome’s autofill styles */\n    &:-webkit-autofill,\n    &:-webkit-autofill:hover,\n    &:-webkit-autofill:focus,\n    &:-webkit-autofill:active {\n      -webkit-text-fill-color: var(--input-fg-color) !important;\n      transition: background-color 5000s;\n      transition-delay: 86400s /* 24h */;\n    }\n\n    /* &:is(textarea) */\n    &[data-as='textarea'] {\n      resize: none;\n    }\n\n    color: var(--input-fg-color);\n\n    &::placeholder {\n      color: var(--input-placeholder-color);\n    }\n\n    &[data-scheme='","'][data-tone='","'] {\n      --input-fg-color: ",";\n      --input-placeholder-color: ",";\n\n      /* enabled */\n      &:not(:invalid):not(:disabled):not(:read-only) {\n        --input-fg-color: ",";\n        --input-placeholder-color: ",";\n      }\n\n      /* disabled */\n      &:not(:invalid):disabled {\n        --input-fg-color: ",";\n        --input-placeholder-color: ",";\n      }\n\n      /* invalid */\n      &:invalid {\n        --input-fg-color: ",";\n        --input-placeholder-color: ",";\n      }\n\n      /* readOnly */\n      &:read-only {\n        --input-fg-color: ",";\n        --input-placeholder-color: ",";\n      }\n    }\n  "])),a.family,o&&a.weights[o]||a.weights.regular,n,r,i.default.enabled.fg,i.default.enabled.placeholder,i.default.enabled.fg,i.default.enabled.placeholder,i.default.disabled.fg,i.default.disabled.placeholder,i.invalid.enabled.fg,i.invalid.enabled.placeholder,i.default.readOnly.fg,i.default.readOnly.placeholder)}function textInputFontSizeStyle(e){let{theme:t}=e,{fonts:n,media:r}=t.sanity;return _responsive(r,e.$fontSize,e=>{let t=n.text.sizes[e]||n.text.sizes[2];return{fontSize:rem(t.fontSize),lineHeight:t.lineHeight/t.fontSize}})}function textInputRepresentationStyle(e){let{$hasPrefix:t,$hasSuffix:n,$scheme:r,$tone:o,theme:a}=e,{focusRing:i,input:l}=a.sanity,s=a.sanity.color.input;return(0,e9.iv)(S||(S=__template$D(["\n    --input-box-shadow: none;\n\n    position: absolute;\n    top: 0;\n    left: 0;\n    right: 0;\n    bottom: 0;\n    display: block;\n    pointer-events: none;\n    z-index: 0;\n\n    background-color: var(--card-bg-color);\n    box-shadow: var(--input-box-shadow);\n\n    border-top-left-radius: ",";\n    border-bottom-left-radius: ",";\n    border-top-right-radius: ",";\n    border-bottom-right-radius: ",";\n\n    &[data-scheme='","'][data-tone='","'] {\n      --card-bg-color: ",";\n      --card-fg-color: ",";\n\n      /* enabled */\n      *:not(:disabled) + &[data-border] {\n        --input-box-shadow: ",";\n      }\n\n      /* invalid */\n      *:not(:disabled):invalid + & {\n        --card-bg-color: ",";\n        --card-fg-color: ",";\n\n        &[data-border] {\n          --input-box-shadow: ",";\n        }\n      }\n\n      /* focused */\n      *:not(:disabled):focus + & {\n        &[data-border] {\n          --input-box-shadow: ",";\n        }\n\n        &:not([data-border]) {\n          --input-box-shadow: ",";\n        }\n      }\n\n      /* disabled */\n      *:disabled + & {\n        --card-bg-color: "," !important;\n        --card-fg-color: "," !important;\n\n        &[data-border] {\n          --input-box-shadow: ",";\n        }\n      }\n\n      /* readOnly */\n      *:read-only + & {\n        --card-bg-color: "," !important;\n        --card-fg-color: "," !important;\n      }\n\n      /* hovered */\n      @media (hover: hover) {\n        *:not(:disabled):not(:read-only):not(:invalid):hover + & {\n          --card-bg-color: ",";\n          --card-fg-color: ",";\n        }
1\n\n        *:not(:disabled):not(:read-only):not(:invalid):not(:focus):hover + &[data-border] {\n          --input-box-shadow: ",";\n        }\n      }\n    }\n  "])),t?0:void 0,t?0:void 0,n?0:void 0,n?0:void 0,r,o,s.default.enabled.bg,s.default.enabled.fg,focusRingBorderStyle({color:s.default.enabled.border,width:l.border.width}),s.invalid.enabled.bg,s.invalid.enabled.fg,focusRingBorderStyle({color:s.invalid.enabled.border,width:l.border.width}),focusRingStyle({border:{color:s.default.enabled.border,width:l.border.width},focusRing:i}),focusRingStyle({focusRing:i}),s.default.disabled.bg,s.default.disabled.fg,focusRingBorderStyle({color:s.default.disabled.border,width:l.border.width}),s.default.readOnly.bg,s.default.readOnly.fg,s.default.hovered.bg,s.default.hovered.fg,focusRingBorderStyle({color:s.default.hovered.border,width:l.border.width}))}function responsivePaddingStyle(e){let{theme:t}=e;return[_getResponsiveSpace(t,["padding"],e.$padding),_getResponsiveSpace(t,["paddingLeft","paddingRight"],e.$paddingX),_getResponsiveSpace(t,["paddingTop","paddingBottom"],e.$paddingY),_getResponsiveSpace(t,["paddingTop"],e.$paddingTop),_getResponsiveSpace(t,["paddingRight"],e.$paddingRight),_getResponsiveSpace(t,["paddingBottom"],e.$paddingBottom),_getResponsiveSpace(t,["paddingLeft"],e.$paddingLeft)].filter(Boolean)}function responsiveRadiusStyle(e){let{theme:t}=e,{media:n,radius:r}=t.sanity;return _responsive(n,e.$radius,e=>({borderRadius:rem(r[e])}))}function toBoxShadow(e,t){return"".concat(e.map(rem).join(" ")," ").concat(t)}var t7=Object.freeze,t8=Object.defineProperty,__template$C=(e,t)=>t7(t8(e,"raw",{value:t7(t||e.slice())})),ne=Object.freeze,nt=Object.defineProperty;let nn=e9.ZP.div(function(e){return responsiveFont("text",e)},responsiveTextAlignStyle,function(e){let{$accent:t,$muted:n,theme:r}=e,{weights:o}=r.sanity.fonts.text;return(0,e9.iv)(R||(R=__template$C(["\n    color: var(--card-fg-color);\n\n    ","\n\n    ","\n\n    & code {\n      font-family: ",";\n      border-radius: 1px;\n      background-color: var(--card-code-bg-color);\n      color: var(--card-code-fg-color);\n    }\n\n    & a {\n      text-decoration: none;\n      border-radius: 1px;\n      color: var(--card-link-color);\n      outline: none;\n\n      @media (hover: hover) {\n        &:hover {\n          text-decoration: underline;\n        }\n      }\n\n      &:focus {\n        box-shadow:\n          0 0 0 1px var(--card-bg-color),\n          0 0 0 3px var(--card-focus-ring-color);\n      }\n\n      &:focus:not(:focus-visible) {\n        box-shadow: none;\n      }\n    }\n\n    & strong {\n      font-weight: ",";\n    }\n\n    & svg {\n      /* Certain popular CSS libraries changes the defaults for SVG display */\n      /* Make sure SVGs are rendered as inline elements */\n      display: inline;\n    }\n\n    & [data-sanity-icon] {\n      vertical-align: baseline;\n    }\n  "])),t&&(0,e9.iv)(_||(_=__template$C(["\n      color: var(--card-accent-fg-color);\n    "]))),n&&(0,e9.iv)(j||(j=__template$C(["\n      color: var(--card-muted-fg-color);\n    "]))),r.sanity.fonts.code.family,o.bold)}),nr=e9.ZP.span(E||(E=ne(nt(i=["\n  display: block;\n  white-space: nowrap;\n  text-overflow: ellipsis;\n  overflow: hidden;\n  overflow: clip;\n"],"raw",{value:ne(i.slice())})))),no=(0,e4.forwardRef)(function(e,t){let{accent:n=!1,align:r,children:o,muted:a=!1,size:i=2,textOverflow:l,weight:s,...d}=e,u=o;return"ellipsis"===l&&(u=(0,e5.jsx)(nr,{children:u})),(0,e5.jsx)(nn,{"data-ui":"Text",...d,$accent:n,$align:useArrayProp(r),$muted:a,ref:t,$size:useArrayProp(i),$weight:s,children:(0,e5.jsx)("span",{children:u})})}),na={root:function(e){let{$color:t,theme:n}=e,{focusRing:r}=n.sanity;return{backgroundColor:t,position:"relative",boxSizing:"border-box",userSelect:"none",boxShadow:"0 0 0 1px var(--card-bg-color)",'&[data-status="inactive"]':{opacity:.5},"&>svg":{"&:not([hidden])":{display:"block"}},'&[data-as="button"]':{WebkitFontSmoothing:"inherit",appearance:"none",margin:0,padding:0,border:0,font:"inherit",color:"inherit",outline:"none","&:focus":{boxShadow:focusRingStyle({focusRing:r})},"&:focus:not(:focus-visible)":{boxShadow:"none"}}}},arrow:function(){return{position:"absolute",boxSizing:"border-box",zIndex:0,opacity:0,transition:"all 0.2s linear",transform:"rotate(-90deg) translate3d(0, 6px, 0)",left:0,right:0,top:0,bottom:0,"& > svg":{width:"11px",height:"7px",position:"absolute",top:"-5px",left:"50%",transform:"translateX(-6px)","&:not([hidden])":{display:"block"}},"[data-arrow-position='inside'] > &":{transform:"rotate(-90deg) translate3d(0, 6px, 0)",opacity:0}
1,"[data-arrow-position='top'] > &":{opacity:1,transform:"rotate(0deg)"},"[data-arrow-position='bottom'] > &":{opacity:1,transform:"rotate(-180deg)"}}},bgStroke:function(){return{strokeWidth:"4px",stroke:"var(--card-bg-color)"}},stroke:function(){return{strokeWidth:"3px",'[data-status="editing"] &':{strokeDasharray:"2 4",strokeLinecap:"round"}}},initials:function(e){let{theme:t}=e,{base:n}=t.sanity.color;return{width:"100%",height:"100%",color:n.fg,alignItems:"center",justifyContent:"center",textTransform:"uppercase",textAlign:"center",borderRadius:"50%","&:not([hidden])":{display:"flex"}}}},ni=e9.ZP.div(function(e){let{theme:t}=e,{avatar:n,media:r}=t.sanity;return _responsive(r,e.$size,e=>{let t=n.sizes[e]||n.sizes[0];return{width:rem(t.size),height:rem(t.size),borderRadius:rem(t.size/2),"&>svg":{width:rem(t.size),height:rem(t.size),borderRadius:rem(t.size/2)}}})},na.root),nl=e9.ZP.div(na.arrow),ns=e9.ZP.ellipse(na.bgStroke),nd=e9.ZP.ellipse(na.stroke),nu=e9.ZP.div(na.initials),nc=(0,e4.forwardRef)(function(e,t){let{as:n,color:r="gray",src:o,title:a,initials:i,onImageLoadError:l,arrowPosition:s,animateArrowFrom:d,status:u="online",size:c=0,...f}=e,p=e3.isValidElementType(n)?n:"div",h=useArrayProp(c),b=useTheme(),g=b.sanity.color.spot[r]||b.sanity.color.spot.gray,m=b.sanity.avatar.sizes[h[0]]||b.sanity.avatar.sizes[0],v=m.size,y=v/2,x=(0,e4.useId)(),[w,k]=(0,e4.useState)(d||s||"inside"),[S,_]=(0,e4.useState)(!1),j="avatar-image-".concat(x);(0,e4.useEffect)(()=>{if(w===s)return;let e=requestAnimationFrame(()=>k(s));return()=>cancelAnimationFrame(e)},[w,s]),(0,e4.useEffect)(()=>{o&&_(!1)},[o]);let R=(0,e4.useCallback)(()=>{_(!0),l&&l(Error("Avatar: the image failed to load"))},[l]),E=(0,e4.useMemo)(()=>h.map(e=>0===e?0:e+1),[h]);return(0,e5.jsxs)(ni,{as:p,"data-as":"string"==typeof p?p:void 0,"data-ui":"Avatar",...f,$size:h,$color:g,"aria-label":a,"data-arrow-position":w,"data-status":u,ref:t,title:a,children:[(0,e5.jsx)(nl,{children:(0,e5.jsx)("svg",{width:"11",height:"7",viewBox:"0 0 11 7",fill:"none",children:(0,e5.jsx)("path",{d:"M6.67948 1.50115L11 7L0 7L4.32052 1.50115C4.92109 0.736796 6.07891 0.736795 6.67948 1.50115Z",fill:g})})}),!S&&o&&(0,e5.jsxs)("svg",{viewBox:"0 0 ".concat(v," ").concat(v),fill:"none",children:[(0,e5.jsx)("defs",{children:(0,e5.jsx)("pattern",{id:j,patternContentUnits:"objectBoundingBox",width:"1",height:"1",children:(0,e5.jsx)("image",{href:o,width:"1",height:"1",onError:R})})}),(0,e5.jsx)("circle",{cx:y,cy:y,r:y,fill:"url(#".concat(j,")")}),(0,e5.jsx)(ns,{cx:y,cy:y,rx:y,ry:y,vectorEffect:"non-scaling-stroke"}),(0,e5.jsx)(nd,{cx:y,cy:y,rx:y,ry:y,stroke:g,vectorEffect:"non-scaling-stroke"})]}),(S||!o)&&i&&(0,e5.jsx)(e5.Fragment,{children:(0,e5.jsx)(nu,{children:(0,e5.jsx)(no,{as:"span",size:E,children:(0,e5.jsx)("strong",{children:i})})})})]})});var nf=Object.freeze,np=Object.defineProperty,__template$A=(e,t)=>nf(np(e,"raw",{value:nf(t||e.slice())}));let nh=e9.ZP.div(function(e){let{theme:t}=e,{avatar:n,media:r}=t.sanity;return _responsive(r,e.$size,e=>{let t=n.sizes[e];return t?{borderRadius:rem(t.size/2),minWidth:rem(t.size),height:rem(t.size)}:ts})},function(e){let{theme:t}=e;return(0,e9.iv)(P||(P=__template$A(["\n    align-items: center;\n    justify-content: center;\n    box-sizing: border-box;\n    user-select: none;\n    color: inherit;\n    color: var(--card-fg-color);\n    background: var(--card-bg-color);\n    box-shadow:\n      0 0 0 1px var(--card-bg-color),\n      inset 0 0 0 1.5px var(--card-hairline-hard-color);\n    padding: 0 ",";\n\n    &:not([hidden]) {\n      display: flex;\n    }\n  "])),rem(t.sanity.space[2]))}),nb=(0,e4.forwardRef)(function(e,t){let{count:n,size:r=0}=e,o=useArrayProp(r),a=(0,e4.useMemo)(()=>o.map(e=>0===e?0:e+1),[o]);return(0,e5.jsx)(nh,{$size:o,"data-ui":"AvatarCounter",ref:t,children:(0,e5.jsx)(no,{as:"span",size:a,children:(0,e5.jsx)("strong",{children:n})})})});function childrenToElementArray(e){let t=Array.isArray(e)?e:[e];return t.filter(e=>(0,e3.isElement)(e)||(0,e3.isFragment)(e)||"string"==typeof e)}var ng=Object.freeze,nm=Object.defineProperty;let nv=(0,e9.iv)(z||(z=ng(nm(l=["\n  white-space: nowrap;\n\n  & > div {\n    vertical-align: top;\n\n    &:not([hidden]) {\n      display: inline-block;\n    }\n  }\n"],"raw",{value:ng(l.slice())})))),ny=e9.ZP.div(function(e){let{theme:t}=e,{avatar:n,media:r}=t.sanity;return _responsive(r,e.$size,e=>{let t=n.sizes[e];return t?{"& > div + div":{marginLeft:rem(t.distance)}}:ts})},function(){return nv}),nx=(0,e4.forwardRef)(function(e,t){let{children:n,maxLength:r=4,size:o=0,...a}=e,i=childrenToElementArray(n).filter(e=>"string"!=typeof e),l=useArrayProp(o),s=i.length,d=s-(Math.max(r,0)-1),u=d>1?i.slice(d,s):i;return(0,e5.jsxs)(ny,{"data-ui":"AvatarStack",...a,ref:t,$size:l,children:[0===s&&(0,e5.jsx)("div",{children:(0,e5.jsx)(nb,{count:s})}),0!==s&&d>1&&(0,e5.jsx)("div",{children:(0,e5.jsx)(nb,{count:d,size:l})}),u.map((e,t)=>(0,e5.jsx)("div",{children:(0,e4.cloneElement)(e,{size:l})},String(t)))]})}),nw=e9.ZP.div(function(){return tU},flexItemStyle,function(){return[responsiveBoxSizingStyle,responsiveBoxHeightStyle,responsiveBoxOverflowStyle,responsiveBoxDisplayStyle]},function(){return[responsiveGridItemRowStyle,responsiveGridItemRowStartStyle,responsiveGridItemRowEndStyle,responsiveGridItemColumnStyle,responsiveGridItemColumnStartStyle,responsiveGridItemColumnEndStyle]},function(e){let{theme:t}=e;return[_getResponsiveSpace(t,["margin"],e.$margin),_getResponsiveSpace(t,["marginLeft","marginRight"],e.$marginX),_getResponsiveSpace(t,["marginTop","marginBottom"],e.$marginY),_getResponsiveSpace(t,["marginTop"],e.$marginTop),_getResponsiveSpace(t,["marginRight"],e.$marginRight),_getResponsiveSpace(t,["marginBottom"],e.$marginBottom),_getResponsiveSpace(t,["marginLeft"],e.$marginLeft)].filter(
1Boolean)},responsivePaddingStyle),nk=(0,e4.forwardRef)(function(e,t){let{as:n="div",column:r,columnStart:o,columnEnd:a,display:i="block",flex:l,height:s,margin:d=0,marginX:u,marginY:c,marginTop:f,marginRight:p,marginBottom:h,marginLeft:b,overflow:g,padding:m=0,paddingX:v,paddingY:y,paddingTop:x,paddingRight:w,paddingBottom:k,paddingLeft:S,row:_,rowStart:j,rowEnd:R,sizing:E,...P}=e;return(0,e5.jsx)(nw,{"data-as":"string"==typeof n?n:void 0,"data-ui":"Box",...P,$column:useArrayProp(r),$columnStart:useArrayProp(o),$columnEnd:useArrayProp(a),$display:useArrayProp(i),$flex:useArrayProp(l),$height:useArrayProp(s),$margin:useArrayProp(d),$marginX:useArrayProp(u),$marginY:useArrayProp(c),$marginTop:useArrayProp(f),$marginRight:useArrayProp(p),$marginBottom:useArrayProp(h),$marginLeft:useArrayProp(b),$overflow:useArrayProp(g),$padding:useArrayProp(m),$paddingX:useArrayProp(v),$paddingY:useArrayProp(y),$paddingTop:useArrayProp(x),$paddingRight:useArrayProp(w),$paddingBottom:useArrayProp(k),$paddingLeft:useArrayProp(S),$row:useArrayProp(_),$rowStart:useArrayProp(j),$rowEnd:useArrayProp(R),$sizing:useArrayProp(E),as:n,ref:t,children:e.children})});var nS=Object.freeze,n_=Object.defineProperty,__template$y=(e,t)=>nS(n_(e,"raw",{value:nS(t||e.slice())})),nj=Object.freeze,nR=Object.defineProperty;let nE=e9.ZP.div(function(e){return responsiveFont("label",e)},responsiveTextAlignStyle,function(e){let{$accent:t,$muted:n,theme:r}=e,{fonts:o}=r.sanity;return(0,e9.iv)(O||(O=__template$y(["\n    text-transform: uppercase;\n\n    ","\n\n    ","\n\n    & code {\n      font-family: ",";\n      border-radius: 1px;\n    }\n\n    & a {\n      text-decoration: none;\n      border-radius: 1px;\n    }\n\n    & svg {\n      /* Certain popular CSS libraries changes the defaults for SVG display */\n      /* Make sure SVGs are rendered as inline elements */\n      display: inline;\n    }\n\n    & [data-sanity-icon] {\n      vertical-align: baseline;\n    }\n  "])),t&&(0,e9.iv)($||($=__template$y(["\n      color: var(--card-accent-fg-color);\n    "]))),n&&(0,e9.iv)(C||(C=__template$y(["\n      color: var(--card-muted-fg-color);\n    "]))),o.code.family)}),nP=e9.ZP.span(A||(A=nj(nR(s=["\n  display: block;\n  white-space: nowrap;\n  text-overflow: ellipsis;\n  overflow: hidden;\n  overflow: clip;\n"],"raw",{value:nj(s.slice())})))),nz=(0,e4.forwardRef)(function(e,t){let{accent:n,align:r,children:o,muted:a=!1,size:i=2,textOverflow:l,weight:s,...d}=e,u=o;return u="ellipsis"===l?(0,e5.jsx)(nP,{children:u}):(0,e5.jsx)("span",{children:u}),(0,e5.jsx)(nE,{"data-ui":"Label",...d,$accent:n,$align:useArrayProp(r),$muted:a,$size:useArrayProp(i),$weight:s,ref:t,children:u})}),n$=(0,e9.ZP)(nk)(responsiveRadiusStyle,function(e){let{$mode:t,$tone:n,theme:r}=e,o=r.sanity.color["outline"===t?"muted":"solid"],a=o[n]||o.default;return{backgroundColor:a.enabled.bg,color:a.enabled.fg,boxShadow:"inset 0 0 0 1px ".concat(a.enabled.border),cursor:"default","&:not([hidden])":{display:"inline-block"}}}),nC=(0,e4.forwardRef)(function(e,t){let{children:n,fontSize:r,mode:o="default",padding:a=1,radius:i=2,tone:l="default",...s}=e;return(0,e5.jsx)(n$,{"data-ui":"Badge",...s,$mode:o,$tone:l,$radius:useArrayProp(i),padding:useArrayProp(a),ref:t,children:(0,e5.jsx)(nz,{size:r,children:n})})}),nO=(0,e9.ZP)(nk)(flexItemStyle,function(){return[tJ,responsiveFlexAlignStyle,responsiveFlexGapStyle,responsiveFlexWrapStyle,responsiveFlexJustifyStyle,responsiveFlexDirectionStyle]}),nA=(0,e4.forwardRef)(function(e,t){let{align:n,as:r,direction:o="row",gap:a,justify:i,wrap:l,...s}=e;return(0,e5.jsx)(nO,{"data-ui":"Flex",...s,$align:useArrayProp(n),$direction:useArrayProp(o),$gap:useArrayProp(a),$justify:useArrayProp(i),$wrap:useArrayProp(l),forwardedAs:r,ref:t})});var nT=Object.freeze,nM=Object.defineProperty,__template$w=(e,t)=>nT(nM(e,"raw",{value:nT(t||e.slice())}));let nV=(0,e9.F4)(T||(T=__template$w(["\n  from {\n    transform: rotate(0deg);\n  }\n\n  to {\n    transform: rotate(360deg);\n  }\n"]))),nL=(0,e9.ZP)(no)(M||(M=__template$w(["\n  & > span > svg {\n    animation: "," 500ms linear infinite;\n  }\n"])),nV),nF=(0,e4.forwardRef)(function(e,t){return(0,e5.jsx)(nL,{"data-ui":"Spinner",...e,ref:t,children:(0,e5.jsx)(e7.L4p,{})})});function _colorVarsStyle(e,t){var n,r,o,a,i,l,s,d;let u=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return{"--card-shadow-outline-color":e.shadow.outline,"--card-shadow-umbra-color":e.shadow.umbra,"--card-shadow-penumbra-color":e.shadow.penumbra,"--card-shadow-ambient-color":e.shadow.ambient,"--card-focus-ring-color":e.focusRing,"--card-bg-color":t.bg,"--card-bg-image":u?"repeating-conic-gradient(".concat(t.bg," 0% 25%, ").
1concat(t.bg2||t.bg," 0% 50%)"):void 0,"--card-fg-color":t.fg,"--card-border-color":t.border,"--card-muted-fg-color":null==(n=t.muted)?void 0:n.fg,"--card-accent-fg-color":null==(r=t.accent)?void 0:r.fg,"--card-link-fg-color":null==(o=t.link)?void 0:o.fg,"--card-code-bg-color":null==(a=t.code)?void 0:a.bg,"--card-code-fg-color":null==(i=t.code)?void 0:i.fg,"--card-skeleton-color-from":null==(l=t.skeleton)?void 0:l.from,"--card-skeleton-color-to":null==(s=t.skeleton)?void 0:s.to,"--card-link-color":null==(d=t.link)?void 0:d.fg,"--card-hairline-soft-color":t.border,"--card-hairline-hard-color":t.border}}var nB=Object.freeze,nG=Object.defineProperty,__template$v=(e,t)=>nB(nG(e,"raw",{value:nB(t||e.slice())}));let nH={border:{width:1}};var nI=Object.freeze,nD=Object.defineProperty;let nZ=e9.ZP.button(responsiveRadiusStyle,function(){return(0,e9.iv)(V||(V=__template$v(["\n    -webkit-font-smoothing: inherit;\n    appearance: none;\n    display: inline-flex;\n    align-items: center;\n    font: inherit;\n    border: 0;\n    outline: none;\n    user-select: none;\n    text-decoration: none;\n    border: 0;\n    box-sizing: border-box;\n    padding: 0;\n    margin: 0;\n    white-space: nowrap;\n    text-align: left;\n    position: relative;\n\n    & > span {\n      display: block;\n      flex: 1;\n      min-width: 0;\n      border-radius: inherit;\n    }\n\n    &::-moz-focus-inner {\n      border: 0;\n      padding: 0;\n    }\n  "])))},function(e){var t,n;let{$mode:r,theme:o}=e,{focusRing:a}=o.sanity,i=o.sanity.color.base,l=o.sanity.color.button[r]||o.sanity.color.button.default,s=l[e.$tone]||l.default,d={width:nH.border.width,color:"var(--card-border-color)"};return[_colorVarsStyle(i,s.enabled),{backgroundColor:"var(--card-bg-color)",color:"var(--card-fg-color)",boxShadow:focusRingBorderStyle(d),'&:disabled, &[data-disabled="true"]':_colorVarsStyle(i,s.disabled),"&:not([data-disabled='true'])":{"&:focus":{boxShadow:focusRingStyle({base:i,border:d,focusRing:a})},"&:focus:not(:focus-visible)":{boxShadow:focusRingBorderStyle(d)},"@media (hover: hover)":{"&:hover":_colorVarsStyle(i,s.hovered),"&:active":_colorVarsStyle(i,s.pressed),"&[data-hovered]":_colorVarsStyle(i,s.hovered)},"&[data-selected]":_colorVarsStyle(i,s.pressed)}},null==(n=null==(t=o.sanity.styles)?void 0:t.button)?void 0:n.root].filter(
1Boolean)}),nN=e9.ZP.div(L||(L=nI(nD(d=["\n  position: absolute;\n  top: 0;\n  left: 0;\n  right: 0;\n  bottom: 0;\n  display: flex;\n  align-items: center;\n  justify-content: center;\n  background-color: var(--card-bg-color);\n  border-radius: inherit;\n  z-index: 1;\n  box-shadow: inherit;\n"],"raw",{value:nI(d.slice())})))),nW=(0,e4.forwardRef)(function(e,t){let{children:n,disabled:r,fontSize:o,icon:a,iconRight:i,justify:l="center",loading:s,mode:d="default",padding:u=3,paddingX:c,paddingY:f,paddingTop:p,paddingBottom:h,paddingLeft:b,paddingRight:g,radius:m=2,selected:v,space:y=3,text:x,textAlign:w,tone:k="default",type:S="button",..._}=e,j=useArrayProp(l),R=useArrayProp(u),E=useArrayProp(c),P=useArrayProp(f),z=useArrayProp(p),$=useArrayProp(h),C=useArrayProp(b),O=useArrayProp(g),A=useArrayProp(m),T=useArrayProp(y),M=useTheme(),V=(0,e4.useMemo)(()=>({padding:R,paddingX:E,paddingY:P,paddingTop:z,paddingBottom:$,paddingLeft:C,paddingRight:O}),[R,E,P,z,$,C,O]);return(0,e5.jsxs)(nZ,{"data-ui":"Button",..._,$mode:d,$radius:A,$tone:k,"data-disabled":!!(s||r),"data-selected":v?"":void 0,disabled:!!(s||r),ref:t,type:S,children:[!!s&&(0,e5.jsx)(nN,{children:(0,e5.jsx)(nF,{})}),(a||x||i)&&(0,e5.jsx)(nk,{as:"span",...V,children:(0,e5.jsxs)(nA,{as:"span",justify:j,children:[a&&(0,e5.jsxs)(no,{size:o,children:[(0,e4.isValidElement)(a)&&a,(0,e3.isValidElementType)(a)&&(0,e4.createElement)(a)]}),x&&(0,e5.jsx)(nk,{flex:i?1:void 0,marginLeft:a?T:void 0,marginRight:i?T:void 0,children:(0,e5.jsx)(no,{align:w,size:o,textOverflow:"ellipsis",weight:M.sanity.button.textWeight,children:x})}),i&&(0,e5.jsxs)(no,{size:o,children:[(0,e4.isValidElement)(i)&&i,(0,e3.isValidElementType)(i)&&(0,e4.createElement)(i)]})]})}),n&&(0,e5.jsx)(nk,{as:"span",...V,children:n})]})});var nq=Object.freeze,nX=Object.defineProperty,__template$t=(e,t)=>nq(nX(e,"raw",{value:nq(t||e.slice())}));let nU=(0,e9.ZP)(nk)(function(){return[border,borderTop,borderRight,borderBottom,borderLeft]},responsiveRadiusStyle,function(e){let{theme:t}=e,{media:n,shadows:r}=t.sanity;return _responsive(n,e.$shadow,e=>(function(e){if(!e)return ts;let t="0 0 0 ".concat(rem(1)," var(--card-shadow-outline-color)"),n=toBoxShadow(e.umbra,"var(--card-shadow-umbra-color)"),r=toBoxShadow(e.penumbra,"var(--card-shadow-penumbra-color)"),o=toBoxShadow(e.ambient,"var(--card-shadow-ambient-color)");return{boxShadow:"".concat(t,", ").concat(n,", ").concat(r,", ").concat(o)}})(r[e]))},function(e){return[function(e){let{$checkered:t,theme:n}=e,r=n.sanity.space;return(0,e9.iv)(B||(B=__template$t(["\n    ","\n\n    &[data-as='button'] {\n      -webkit-font-smoothing: inherit;\n      appearance: none;\n      outline: none;\n      font: inherit;\n      text-align: inherit;\n      border: 0;\n      width: stretch;\n    }\n\n    /* &:is(a) */\n    &[data-as='a'] {\n      outline: none;\n      text-decoration: none;\n    }\n\n    /* &:is(pre) */\n    &[data-as='pre'] {\n      font: inherit;\n    }\n  "])),t&&(0,e9.iv)(F||(F=__template$t(["\n      background-size: ","px ","px;\n      background-position: 50% 50%;\n      background-image: var(--card-bg-image);\n    "])),r[3],r[3]))}(e),function(e){var t,n;let{$checkered:r,$focusRing:o,theme:a}=e,{focusRing:i}=a.sanity,{base:l,card:s,dark:d}=a.sanity.color,u={width:0,color:"var(--card-border-color)"};return(0,e9.iv)(G||(G=__template$t(["\n    color-scheme: ",";\n\n    ","\n\n    background-color: var(--card-bg-color);\n    color: var(--card-fg-color);\n\n    /* &:is(button) */\n    &[data-as='button'] {\n      --card-focus-ring-box-shadow: none;\n\n      cursor: default;\n      box-shadow: var(--card-focus-ring-box-shadow);\n\n      &:disabled {\n        ","\n      }\n\n      &:not(:disabled) {\n        &[data-pressed] {\n          ","\n        }\n\n        &[data-selected] {\n          ","\n        }\n\n        @media (hover: hover) {\n          &:not([data-pressed]):not([data-selected]) {\n            &[data-hovered],\n            &:hover {\n              ","\n            }\n\n            &:active {\n              ","\n            }\n          }\n        }\n\n        &:focus {\n          --card-focus-ring-box-shadow: ",";\n        }\n\n        &:focus:not(:focus-visible) {\n          --card-focus-ring-box-shadow: ",";\n        }\n      }\n    }\n\n    /* &:is(a) */\n    &[data-as='a'] {\n      cursor: pointer;\n      box-shadow: var(--card-focus-ring-box-shadow);\n\n      &[data-disabled] {\n        ","\n      }\n\n      &:not([data-disabled]) {\n        &[data-pressed] {\n          ","\n        }\n\n        &[data-selected] {\n          ","\n        }\n\n        @media (hover: hover) {\n          &:not([data-pressed]):not
1([data-selected]) {\n            &[data-hovered],\n            &:hover {\n              ","\n            }\n\n            &:active {\n              ","\n            }\n          }\n        }\n\n        &:focus {\n          --card-focus-ring-box-shadow: ",";\n        }\n\n        &:focus:not(:focus-visible) {\n          --card-focus-ring-box-shadow: ",";\n        }\n      }\n    }\n\n    ","\n  "])),d?"dark":"light",_colorVarsStyle(l,s.enabled,r),_colorVarsStyle(l,s.disabled,r),_colorVarsStyle(l,s.pressed,r),_colorVarsStyle(l,s.selected,r),_colorVarsStyle(l,s.hovered,r),_colorVarsStyle(l,s.pressed,r),o?focusRingStyle({base:l,border:u,focusRing:i}):void 0,o?focusRingBorderStyle(u):void 0,_colorVarsStyle(l,s.disabled,r),_colorVarsStyle(l,s.pressed,r),_colorVarsStyle(l,s.selected,r),_colorVarsStyle(l,s.hovered,r),_colorVarsStyle(l,s.pressed,r),o?focusRingStyle({base:l,border:u,focusRing:i}):void 0,o?focusRingBorderStyle(u):void 0,null==(n=null==(t=a.sanity.styles)?void 0:t.card)?void 0:n.root)}(e)]}),nK=(0,e4.forwardRef)(function(e,t){let{__unstable_checkered:n=!1,__unstable_focusRing:r=!1,as:o,border:a,borderTop:i,borderRight:l,borderBottom:s,borderLeft:d,pressed:u,radius:c=0,scheme:f,selected:p,shadow:h,tone:b="default",...g}=e,m=(0,e3.isValidElementType)(o)?o:"div",v=useRootTheme(),y="inherit"===b?v.tone:b;return(0,e5.jsx)(ThemeColorProvider,{scheme:f,tone:y,children:(0,e5.jsx)(nU,{"data-as":"string"==typeof m?m:void 0,"data-scheme":v.scheme,"data-ui":"Card","data-tone":y,...g,$border:useArrayProp(a),$borderTop:useArrayProp(i),$borderRight:useArrayProp(l),$borderBottom:useArrayProp(s),$borderLeft:useArrayProp(d),$checkered:n,$focusRing:r,$radius:useArrayProp(c),$shadow:useArrayProp(h),$tone:y,"data-checkered":n?"":void 0,"data-pressed":u?"":void 0,"data-selected":p?"":void 0,forwardedAs:m,ref:t,selected:p})})});var nY=Object.freeze,nJ=Object.defineProperty,__template$s=(e,t)=>nY(nJ(e,"raw",{value:nY(t||e.slice())}));let nQ=e9.ZP.div(function(){return(0,e9.iv)(H||(H=__template$s(["\n    position: relative;\n    display: inline-block;\n  "])))}),n0=e9.ZP.input(function(e){let{theme:t}=e,n=t.sanity.color.input,{focusRing:r,input:o,radius:a}=t.sanity;return(0,e9.iv)(I||(I=__template$s(["\n    position: absolute;\n    top: 0;\n    left: 0;\n    width: 100%;\n    height: 100%;\n    outline: none;\n    opacity: 0;\n    z-index: 1;\n    padding: 0;\n    margin: 0;\n\n    & + span {\n      position: relative;\n      display: block;\n      height: ",";\n      width: ",";\n      box-sizing: border-box;\n      box-shadow: ",";\n      border-radius: ",";\n      line-height: 1;\n      background-color: ",";\n\n      & > svg {\n        display: block;\n        position: absolute;\n        opacity: 0;\n        height: 100%;\n        width: 100%;\n\n        & > path {\n          vector-effect: non-scaling-stroke;\n          stroke-width: 2 !important;\n        }\n      }\n    }\n\n    &:not(:disabled):focus + span {\n      box-shadow: ",";\n    }\n\n    &:not(:disabled):focus:not(:focus-visible) + span {\n      box-shadow: ",";\n    }\n\n    &:checked + span > svg:first-child {\n      opacity: 1;\n    }\n\n    &[data-read-only] + span {\n      background-color: ",";\n      box-shadow: ",";\n      color: ",";\n    }\n\n    &:not([data-read-only]):disabled + span {\n      background-color: ",";\n      box-shadow: ",";\n      color: ",";\n    }\n\n    &:indeterminate + span > svg:last-child {\n      opacity: 1;\n    }\n  "])),rem(o.checkbox.size),rem(o.checkbox.size),focusRingBorderStyle({color:n.default.enabled.border,width:o.border.width}),rem(a[2]),n.default.enabled.bg,focusRingStyle({border:{width:o.border.width,color:n.default.enabled.border},focusRing:r}),focusRingBorderStyle({color:n.default.enabled.border,width:o.border.width}),n.default.readOnly.bg,focusRingBorderStyle({width:o.border.width,color:n.default.readOnly.border}),n.default.readOnly.fg,n.default.disabled.bg,focusRingBorderStyle({width:o.border.width,color:n.default.disabled.border}),n.default.disabled.fg)}),n1=(0,e4.forwardRef)(function(e,t){let{checked:n,className:r,disabled:o,indeterminate:a,customValidity:i,readOnly:l,style:s,...d}=e,u=useForwardedRef(t);return useCustomValidity(u,i),(0,e4.useEffect)(()=>{u.current&&(u.current.indeterminate=a||!1)},[a,u]),(0,e5.jsxs)(nQ,{className:r,"data-ui":"Checkbox",style:s,children:[(0,e5.jsx)(n0,{"data-read-only":!o&&l?"":void 0,...d,checked:n,disabled:o||l,type:"checkbox",readOnly:l,ref:u}),(0,e5.jsxs)("span",{children:[(0,e5.jsx)(e7.KML,{}),(0,e5.jsx)(e7.HFL,{})]})]})});var n2=Object.freeze,n5=Object.defineProperty,__template$r=(e,t)=>n2(n5(e,"raw",{value:n2(t||e.slice())}));function codeSyntaxHighlightingStyle(e){let{theme:t}=e,n=t.sanity.color.syntax;return{"&.atrule":{color:n.atrule},"&.attr-name":{color:n.attrName},"&.attr-value":{color:n.attrValue},"&.attribute":{color:n.attribute},"&.boolean":{color:n.boolean},"&.builtin":{color:n.builtin},"&.cdata":{color:n.cdata},"&.char":{color:n.char},"&.class":{color:n.class},"&.class-name":{color:n.className},"&.comment":{color:n.comment},"&.constant":{color:n.constant},"&.deleted":{color:n.deleted},"&.doctype":{color:n.doctype},"&.entity":{color:n.entity},"&.function":{color:n.function},"&.hexcode":{color:n.hexcode},"&.id":{color:n.id},"&.important":{color:n.important},"&.inserted":{color:n.inserted},"&.keyword":{color:n.keyword},"&.number":{color:n.number},"&.operator":{color:n.operator},"&.prolog":{color:n.prolog},"&.property":{color:n.property},"&.pseudo-class":{color:n.pseudoClass},"&.pseudo-element":{color:n.pseudoElement},"&.punctuation":{color:n.punctuation},"&.regex":{color:n.regex},"&.selector":{color:n.selector},"&.string":{color:n.string},"&.symbol":{color:n.symbol},"&.tag":{color:n.tag},"&.unit":{color:n.unit},"&.url":{color:n.url},"&.variable":{color:n.variable}}}let n4=e9.ZP.pre(function(){return(0,e9.iv)(D||(D=__template$r(["\n    color: var(--card-code-fg-color);\n\n    & code {\n      font-family: inherit;\n\n      &.refractor .token {\n        ","\n      }\n    }\n\n    & a {\n      color: inherit;\n      text-decoration: underline;\n      border-radius: 1px;\n    }\n\n    & svg {\n      /* Certain popular CSS libraries changes the defaults for SVG display */\n      /* Make sure SVGs are rendered as inline elements */\n      display: inline;\n    }\n\n    & [data-sanity-icon] {\n      vertical-align: baseline;\n    }\n  "])),codeSyntaxHighlightingStyle)},function(e){return responsiveFont("code",e)}),n3=(0,e4.forwardRef)(function(e,t){let{children:n,language:r,size:o=2,weight:a,...i}=e,l="string"==typeof r?r:void 0,s=!!l&&te().hasLanguage(l);return(0,e5.jsxs)(n4,{"data-ui":"Code",...i,$size:useArrayProp(o),$weight:a,ref:t,children:[!(l&&s)&&(0,e5.jsx)("code",{children:n}),l&&s&&(0,e5.jsx)(te(),{inline:!0,language:l,value:String(n)})]})}),n9={width:"100%",margin:"0 auto"},n6=(0,e9.ZP)(nk)(function(){return n9},function(e){let{theme:t}
1=e,{container:n,media:r}=t.sanity;return _responsive(r,e.$width,e=>({maxWidth:"auto"===e?"none":rem(n[e])}))}),n7=(0,e4.forwardRef)(function(e,t){let{as:n,width:r=2,...o}=e;return(0,e5.jsx)(n6,{"data-ui":"Container",...o,$width:useArrayProp(r),forwardedAs:n,ref:t})}),n8=(0,e9.ZP)(nk)(function(){return[t0,responsiveGridAutoFlowStyle,responsiveGridAutoRowsStyle,responsiveGridAutoColsStyle,responsiveGridColumnsStyle,responsiveGridRowsStyle,responsiveGridGapStyle,responsiveGridGapXStyle,responsiveGridGapYStyle]}),re=(0,e4.forwardRef)(function(e,t){let{as:n,autoRows:r,autoCols:o,autoFlow:a,columns:i,gap:l,gapX:s,gapY:d,rows:u,children:c,...f}=e;return(0,e5.jsx)(n8,{"data-as":"string"==typeof n?n:void 0,"data-ui":"Grid",...f,$autoRows:useArrayProp(r),$autoCols:useArrayProp(o),$autoFlow:useArrayProp(a),$columns:useArrayProp(i),$gap:useArrayProp(l),$gapX:useArrayProp(s),$gapY:useArrayProp(d),$rows:useArrayProp(u),forwardedAs:n,ref:t,children:c})});var rt=Object.freeze,rn=Object.defineProperty,__template$q=(e,t)=>rt(rn(e,"raw",{value:rt(t||e.slice())})),rr=Object.freeze,ro=Object.defineProperty;let ra=e9.ZP.div(function(e){let{$accent:t,$muted:n,theme:r}=e;return(0,e9.iv)(W||(W=__template$q(["\n    ","\n\n    ","\n\n    & code {\n      font-family: ",";\n      border-radius: 1px;\n    }\n\n    & a {\n      text-decoration: none;\n      border-radius: 1px;\n      color: var(--card-link-color);\n      outline: none;\n\n      @media (hover: hover) {\n        &:hover {\n          text-decoration: underline;\n        }\n      }\n\n      &:focus {\n        box-shadow:\n          0 0 0 1px var(--card-bg-color),\n          0 0 0 3px var(--card-focus-ring-color);\n      }\n\n      &:focus:not(:focus-visible) {\n        box-shadow: none;\n      }\n    }\n\n    & svg {\n      /* Certain popular CSS libraries changes the defaults for SVG display */\n      /* Make sure SVGs are rendered as inline elements */\n      display: inline;\n    }\n\n    & [data-sanity-icon] {\n      vertical-align: baseline;\n    }\n  "])),t&&(0,e9.iv)(Z||(Z=__template$q(["\n      color: var(--card-accent-fg-color);\n    "]))),n&&(0,e9.iv)(N||(N=__template$q(["\n      color: var(--card-muted-fg-color);\n    "]))),r.sanity.fonts.code.family)},responsiveTextAlignStyle,function(e){return responsiveFont("heading",e)}),ri=e9.ZP.span(q||(q=rr(ro(u=["\n  display: block;\n  white-space: nowrap;\n  text-overflow: ellipsis;\n  overflow: hidden;\n  overflow: clip;\n"],"raw",{value:rr(u.slice())})))),rl=(0,e4.forwardRef)(function(e,t){let{accent:n=!1,align:r,children:o,muted:a=!1,size:i=2,textOverflow:l,weight:s,...d}=e,u=o;return"ellipsis"===l&&(u=(0,e5.jsx)(ri,{children:u})),(0,e5.jsx)(ra,{"data-ui":"Heading",...d,$accent:n,$align:useArrayProp(r),$muted:a,$size:useArrayProp(i),$weight:s,ref:t,children:(0,e5.jsx)("span",{children:u})})}),rs=(0,e9.ZP)(nk)(function(){return{lineHeight:0,"&&:not([hidden])":{display:"block"},"& > div":{display:"inline-block",verticalAlign:"middle"}}},function(e){let{theme:t}=e;return _responsive(t.sanity.media,e.$space,e=>{let n=rem(t.sanity.space[e]);return{margin:"-".concat(n," 0 0 -").concat(n),"& > div":{padding:"".concat(n," 0 0 ").concat(n)}}})}),rd=(0,e4.forwardRef)(function(e,t){let{as:n,children:r,space:o,...a}=e,i=(0,e4.useMemo)(()=>childrenToElementArray(r).filter(Boolean).map((e,t)=>(0,e5.jsx)("div",{children:e},t)),[r]);return(0,e5.jsx)(rs,{"data-ui":"Inline",...a,$space:useArrayProp(o),forwardedAs:n,ref:t,children:i})});var ru=Object.freeze,rc=Object.defineProperty,__template$o=(e,t)=>ru(rc(e,"raw",{value:ru(t||e.slice())}));let rf=e9.ZP.kbd(responsiveRadiusStyle,function(){return(0,e9.iv)(X||(X=__template$o(["\n    background: var(--card-bg-color);\n    font: inherit;\n    box-shadow: inset 0 0 0 1px var(--card-hairline-hard-color);\n\n    &:not([hidden]) {\n      display: inline-block;\n    }\n  "])))}),rp=(0,e4.forwardRef)(function(e,t){let{children:n,fontSize:r=1,padding:o=1,radius:a=2,...i}=e;return(0,e5.jsx)(rf,{"data-ui":"KBD",...i,$radius:useArrayProp(a),ref:t,children:(0,e5.jsx)(nk,{as:"span",padding:o,children:(0,e5.jsx)(n3,{as:"span",muted:!0,size:r,children:n})})})}),rh=Symbol.for("@sanity/ui/context/boundaryElement");tD[rh]=tD[rh]||(0,e4.createContext)(null);let rb=tD[rh];function BoundaryElementProvider(e){let{children:t,element:n}=e,r=(0,e4.useMemo)(()=>({version:0,element:n}),[n]);return(0,e5.jsx)(rb.Provider,{value:r,children:t})}let rg={version:0,element:null};function useBoundaryElement(){let e=(0,e4.useContext)(rb);
1if(e&&(!isRecord(e)||0!==e.version))throw Error("useBoundaryElement(): the context value is not compatible");return e||rg}let rm=(0,e4.forwardRef)(function(e,t){let n=useTheme(),{children:r,media:o=n.sanity.media,...a}=e,i=useForwardedRef(t),[l,s]=(0,e4.useState)(null),d=useElementSize(l),u=(0,e4.useMemo)(()=>{var e;return null!=(e=null==d?void 0:d.border.width)?e:window.innerWidth},[d]),c=(0,e4.useMemo)(()=>(function(e,t){let n=[];for(let r=0;r<e.length;r+=1){let o=e[r];o>t&&n.push(r)}return n})(o,u),[o,u]),f=(0,e4.useMemo)(()=>(function(e,t){let n=[];for(let r=0;r<e.length;r+=1){let o=e[r];o<=t&&n.push(r)}return n})(o,u),[o,u]),p=(0,e4.useCallback)(e=>{i.current=e,s(e)},[i]);return(0,e5.jsx)("div",{"data-ui":"ElementQuery",...a,"data-eq-max":c.length?c.join(" "):void 0,"data-eq-min":f.length?f.join(" "):void 0,ref:p,children:r})});var rv=Object.defineProperty,__defNormalProp=(e,t,n)=>t in e?rv(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,__publicField=(e,t,n)=>(__defNormalProp(e,"symbol"!=typeof t?t+"":t,n),n);let ErrorBoundary=class ErrorBoundary extends e4.Component{constructor(){super(...arguments),__publicField(this,"state",{error:null})}static getDerivedStateFromError(e){return{error:e}}componentDidCatch(e,t){this.props.onCatch({error:e,info:t})}render(){let{error:e}=this.state;if(e){let t="string"==typeof(null==e?void 0:e.message)?e.message:"Error";return(0,e5.jsx)(n3,{children:t})}return this.props.children}};function getLayerContext(e){if(!isRecord(e)||0!==e.version)throw Error("the context value is not compatible");if(!e)throw Error("components using `useLayer()` should be wrapped in a <LayerProvider>.");if(0===e.version)return e;throw Error("could not get layer context")}let ry=Symbol.for("@sanity/ui/context/layer");tD[ry]=tD[ry]||(0,e4.createContext)(null);let rx=tD[ry];function useLayer(){let e=(0,e4.useContext)(rx);if(!e)throw Error("useLayer(): missing context value");try{return getLayerContext(e)}catch(e){if(e instanceof Error)throw Error("useLayer(): ".concat(e.message));throw Error("useLayer(): ".concat(e))}}function _raf(e){let t=requestAnimationFrame(e);return()=>{cancelAnimationFrame(t)}}function _raf2(e){let t=null,n=_raf(()=>{t=_raf(e)});return()=>{t&&t(),n()}}function isHTMLElement(e){return e instanceof Node&&e.nodeType===Node.ELEMENT_NODE}function isHTMLAnchorElement(e){return isHTMLElement(e)&&"A"===e.nodeName}function isHTMLButtonElement(e){return isHTMLElement(e)&&"BUTTON"===e.nodeName}function containsOrEqualsElement(e,t){return e.contains(t)||e===t}function attemptFocus(e){var t;if(!((t=e).tabIndex>0||0===t.tabIndex&&null!==t.getAttribute("tabIndex")||(isHTMLAnchorElement(t)?!!t.href&&"ignore"!==t.rel:isHTMLElement(t)&&"INPUT"===t.nodeName?"hidden"!==t.type&&"file"!==t.type&&!t.disabled:!!(isHTMLButtonElement(t)||isHTMLElement(t)&&"SELECT"===t.nodeName||isHTMLElement(t)&&"TEXTAREA"===t.nodeName)&&!t.disabled)))return!1;try{e.focus()}catch(e){}return document.activeElement===e}function focusFirstDescendant(e){for(let t=0;t<e.childNodes.length;t++){let n=e.childNodes[t];if(isHTMLElement(n)&&(attemptFocus(n)||focusFirstDescendant(n)))return!0}return!1}function LayerProvider(e){var t;let{children:n,zOffset:r=0}=e,o=(0,e4.useContext)(rx),a=o&&getLayerContext(o),i=null==a?void 0:a.registerChild,l=null!=(t=null==a?void 0:a.level)?t:0,s=l+1,d=useArrayProp(r),u=d.length-1,c=Math.min(useMediaIndex(),u),f=a?a.zIndex+d[c]:d[c],[,p]=(0,e4.useState)({}),[h,b]=(0,e4.useState)(0),g=0===h,m=(0,e4.useCallback)(e=>{let t=null==i?void 0:i(e);return void 0!==e?p(t=>{var n;let r=null!=(n=t[e])?n:0,o={...t,[e]:r+1};return b(Object.keys(o).length),o}):b(e=>e+1),()=>{void 0!==e?p(t=>{let n={...t};return 1===n[e]?(delete n[e],b(Object.keys(n).length)):n[e]-=1,n}):b(e=>e-1),null==t||t()}},[i]);(0,e4.useEffect)(()=>null==i?void 0:i(s),[s,i]);let v=(0,e4.useMemo)(()=>({version:0,isTopLayer:g,level:s,registerChild:m,size:h,zIndex:f}),[g,s,m,h,f]);return(0,e5.jsx)(rx.Provider,{value:v,children:n})}let rw=e9.ZP.div({position:"relative"}),rk=(0,e4.forwardRef)(function(e,t){let{children:n,onActivate:r,onFocus:o,style:a=ts,...i}=e,{zIndex:l,isTopLayer:s}=useLayer(),d=(0,e4.useRef)(null),u=useForwardedRef(t),c=(0,e4.useRef)(s);(0,e4.useEffect)(()=>
1{let e=c.current!==s&&s;e&&(null==r||r({activeElement:d.current})),c.current=s},[s,r]);let f=(0,e4.useCallback)(e=>{null==o||o(e);let t=u.current,n=document.activeElement;s&&t&&n&&isHTMLElement(n)&&containsOrEqualsElement(t,n)&&(d.current=n)},[u,s,o]);return(0,e5.jsx)(rw,{...i,"data-ui":"Layer",onFocus:f,ref:u,style:{...a,zIndex:l},children:n})}),rS=(0,e4.forwardRef)(function(e,t){let{children:n,zOffset:r=1,...o}=e;return(0,e5.jsx)(LayerProvider,{zOffset:r,children:(0,e5.jsx)(rk,{...o,ref:t,children:n})})}),r_=Symbol.for("@sanity/ui/context/portal"),rj=Symbol.for("@sanity/ui/context/portal/element");tD[rj]=null,tD[r_]=tD[r_]||(0,e4.createContext)({version:0,boundaryElement:null,get element(){if("undefined"==typeof document)return null;if(tD[rj])return tD[rj];return tD[rj]=document.createElement("div"),tD[rj].setAttribute("data-portal",""),document.body.appendChild(tD[rj]),tD[rj]}});let rR=tD[r_];function usePortal(){let e=(0,e4.useContext)(rR);if(!e)throw Error("usePortal(): missing context value");if(!isRecord(e)||
10!==e.version)throw Error("usePortal(): the context value is not compatible");return e}function Portal(e){var t;let{children:n,__unstable_name:r}=e,o=usePortal(),a=(r?o.elements&&o.elements[r]:o.element)||(null==(t=o.elements)?void 0:t.default);return a?(0,to.createPortal)(n,a):null}let rE="undefined"!=typeof document;function PortalProvider(e){let{boundaryElement:t,children:n,element:r,__unstable_elements:o}=e,a=function(e){let t=(0,e4.useRef)(e);return!function(e,t){if(!e||!t)return e===t;let n=Object.keys(e),r=Object.keys(t);return n.length===r.length&&n.every(n=>e[n]===t[n])}(t.current,e)&&(t.current=e),t.current}(o),i=(0,e4.useMemo)(()=>({version:0,boundaryElement:t||null,element:r||rE&&document.body||null,elements:a}),[t,r,a]);return(0,e5.jsx)(rR.Provider,{value:i,children:n})}var rP=Object.freeze,rz=Object.defineProperty;let r$=e9.ZP.div(U||(U=rP(rz(c=["\n  display: block;\n  width: 0;\n  height: 0;\n  position: absolute;\n  overflow: hidden;\n  overflow: clip;\n"],"raw",{value:rP(c.slice())}))));(0,e4.forwardRef)(function(e,t){let{as:n,children:r}=e;return(0,e5.jsx)(r$,{"aria-hidden":!0,as:n,"data-ui":"SrOnly",ref:t,children:r})});var rC=Object.freeze,rO=Object.defineProperty,__template$m=(e,t)=>rC(rO(e,"raw",{value:rC(t||e.slice())}));let rA=e9.ZP.div(K||(K=__template$m(["\n  position: relative;\n"]))),rT=e9.ZP.div(Y||(Y=__template$m(["\n  position: absolute;\n  left: 0;\n  right: 0;\n"])));(0,e4.forwardRef)(function(e,t){let{as:n="div",gap:r=0,getItemKey:o,items:a=[],onChange:i,renderItem:l,...s}=e,{space:d}=useTheme().sanity,u=useForwardedRef(t),c=(0,e4.useRef)(null),[f,p]=(0,e4.useState)(0),[h,b]=(0,e4.useState)(0),[g,m]=(0,e4.useState)(-1);(0,e4.useEffect)(()=>{if(!c.current)return;let e=c.current.firstChild;e instanceof HTMLElement&&m(e.offsetHeight)},[l]),(0,e4.useEffect)(()=>{if(!u.current)return;let e=u.current.parentNode;for(;e&&!function(e){if(!(e instanceof Element))return!1;let t=window.getComputedStyle(e);return t.overflowX.includes("auto")||t.overflowX.includes("scroll")||t.overflowY.includes("auto")||t.overflowY.includes("scroll")}(e);)e=e.parentNode;if(e){let t=e;if(!(t instanceof HTMLElement))return;let handleScroll2=()=>{p(t.scrollTop)};t.addEventListener("scroll",handleScroll2,{passive:!0});let n=new tz(e=>{b(e[0].contentRect.height)});return n.observe(t),handleScroll2(),()=>{t.removeEventListener("scroll",handleScroll2),n.unobserve(t),n.disconnect()}}let handleScroll=()=>{p(window.scrollY)},handleResize=()=>{b(window.innerHeight)};return window.addEventListener("scroll",handleScroll,{passive:!0}),window.addEventListener("resize",handleResize),b(window.innerHeight),handleScroll(),()=>{window.removeEventListener("scroll",handleScroll),window.removeEventListener("resize",handleResize)}},[u]);let v=a.length,y=g?v*(g+d[r])-d[r]:0,x=y?Math.max(Math.floor(f/y*v)-2,0):0,w=y?Math.ceil((f+h)/y*v)+1:0;(0,e4.useEffect)(()=>{i&&i({fromIndex:x,gap:d[r],itemHeight:g,scrollHeight:h,scrollTop:f,toIndex:w})},[x,r,g,i,h,f,d,w]);let k=(0,e4.useMemo)(()=>l&&0!==a.length?-1===g?[(0,e5.jsx)(rT,{children:l(a[0])},0)]:a.slice(x,w).map((e,t)=>{let n=x+t,a=l(e),i=o?o(e,n):n;return(0,e5.jsx)(rT,{style:{top:n*(g+d[r])},children:a},i)}):null,[x,r,o,g,a,l,d,w]),S=(0,e4.useMemo)(()=>({height:y}),[y]);return(0,e5.jsx)(rA,{as:n,"data-ui":"VirtualList",...s,ref:u,children:(0,e5.jsx)("div",{ref:c,style:S,children:k})})});let rM=[0,0,0,0],rV={top:["bottom","left","right"],"top-start":["bottom-start","left-start","right-start"],"top-end":["bottom-end","left-end","right-end"],bottom:["top","left","right"],"bottom-start":["top-start","left-start","right-start"],"bottom-end":["top-end","left-end","right-end"],left:["right","top","bottom"],"left-start":["right-start","top-start","bottom-start"],"left-end":["right-end","top-end","bottom-end"],right:["left","top","bottom"],"right-start":["left-start","top-start","bottom-start"],"right-end":["left-end","top-end","bottom-end"]};var rL=Object.freeze,rF=Object.defineProperty,__template$l=(e,t)=>rL(rF(e,"raw",{value:rL(t||e.slice())}));let rB=e9.ZP.div(J||(J=__template$l(["\n  position: absolute;\n  pointer-events: none;\n  width: ","px;\n  height: ","px;\n  fill: none;\n\n  :empty + & {\n    display: none;\n  }\n\n  & > svg {\n    display: block;\n    transform-origin: ","px ","px;\n  }\n\n  [data-placement^='top'] > & {\n    bottom: -","px;\n  }\n\n  [data-placement^='right'] > & {\n    left: -","px;\n\n    & > svg {\n      transform: rotate(90deg);\n    }\n  }\n\n  [data-placement^='left'] > & {\n    right: -","px;\n\n    & > svg {\n      transform: rotate(-90deg);\n    }\n  }\n\n  [data-placement^='bottom'] > & {\n    top: -","px;\n\n    & > svg {\n      transform: rotate(180deg);\n    }\n  }\n"])),27,27,13.5,13.5,27,27,27,27),rG=e9.ZP.path(Q||(Q=__template$l(["\n  fill: var(--card-shadow-outline-color);\n"]))),rH=e9.ZP.path(ee||(ee=__template$l(["\n  fill: var(--card-bg-color);\n"]))),rI=(0,e4.forwardRef)(function(e,t){return(0,e5.jsx)(rB,{"data-ui":"Popover__arrow",...e,ref:t,children:(0,e5.jsxs)("svg",{width:27,height:11,viewBox:"0 0 27 11",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,e5.jsx)(rG,{d:"M1.18708 1C3.29803 1.0011 5.29585 1.95479 6.62414 3.59561L11.1683 9.20895C12.369 10.6922 14.631 10.6922 15.8317 9.20894L20.3759 3.59561C21.7042 1.95478 23.702 1.0011 25.8129 1H21.9436C21.0533 1.49255 20.2545 2.15618 19.5986 2.96641L15.0545 8.57975C14.254 9.56855 12.746 9.56855 11.9455 8.57975L7.40139 2.96642C6.74548 2.15618 5.94673 1.49255 5.05643 1H1.
118708Z"}),(0,e5.jsx)(rH,{d:"M1.18342 0C3.59749 0 5.88246 1.0901 7.40138 2.96642L11.9455 8.57975C12.746 9.56855 14.254 9.56855 15.0545 8.57975L19.5986 2.96641C21.1175 1.0901 23.4025 0 25.8166 0H27H0H1.18342Z"})]})})}),rD=(0,e9.ZP)(nK)({"&:not([hidden])":{display:"flex"},flexDirection:"column",width:"max-content",minWidth:"min-content"}),rZ=(0,e4.memo)((0,e4.forwardRef)(function(e,t){let{__unstable_margins:n,arrow:r,arrowRef:o,arrowX:a,arrowY:i,children:l,padding:s,placement:d,overflow:u,radius:c,scheme:f,shadow:p,strategy:h,style:b,tone:g,width:m,x:v,y:y,...x}=e,{zIndex:w}=useLayer(),k=(0,e4.useMemo)(()=>n||rM,[n]),S=(null!=v?v:0)+k[3],_=(null!=y?y:0)+k[0],j=(0,e4.useMemo)(()=>({position:h,top:_,left:S,width:m,zIndex:w,...b}),[h,b,m,S,_,w]),R=d&&td[d.split("-")[0]],E=(0,e4.useMemo)(()=>{let e={left:null!==a?a:void 0,top:null!==i?i:void 0,right:void 0,bottom:void 0};return R&&(e[R]=-27),e},[a,i,R]);return(0,e5.jsxs)(rD,{"data-ui":"Popover",...x,"data-placement":d,radius:c,ref:t,scheme:f,shadow:p,sizing:"border",style:j,tone:g,children:[(0,e5.jsx)(nA,{"data-ui":"Popover__wrapper",direction:"column",flex:1,overflow:u,children:(0,e5.jsx)(nA,{direction:"column",flex:1,padding:s,children:l})}),r&&(0,e5.jsx)(rI,{ref:o,style:E})]})}));rZ.displayName="PopoverCard";let rN=(0,e4.memo)((0,e4.forwardRef)(function(e,t){var n,r,o,a,i,l,s,d,u;let c=useTheme(),f=useBoundaryElement(),{__unstable_margins:p=rM,arrow:h=!0,boundaryElement:b=f.element,children:g,constrainSize:m=!1,content:v,disabled:y,fallbackPlacements:x=null!=(r=e.fallbackPlacements)?r:rV[null!=(n=e.placement)?n:"bottom"],matchReferenceWidth:w,floatingBoundary:k=null!=(o=e.boundaryElement)?o:f.element,open:S,overflow:_="hidden",padding:j,placement:R="bottom",portal:E,preventOverflow:P=!0,radius:z=3,referenceBoundary:$=null!=(a=e.boundaryElement)?a:f.element,referenceElement:C,scheme:O,shadow:A=3,tone:T="inherit",width:M="auto",zOffset:V=null==(i=c.sanity.layer)?void 0:i.popover.zOffset,updateRef:L,...F}=e,B=null==(l=useElementSize(b))?void 0:l.border,G=useArrayProp(j),H=useArrayProp(z),I=useArrayProp(A),D=useArrayProp(M),Z=useArrayProp(V),N=useForwardedRef(t),W=(0,e4.useRef)(null),q="viewport",X=useMediaIndex(),U=m||P?null==B?void 0:B.width:void 0,K=function(e){let{mediaIndex:t,theme:n,width:r}=e,o=r[t],a=void 0===o?r[r.length-1]:o;return"number"==typeof a?n.sanity.container[a]:void 0}({mediaIndex:X,theme:c,width:D}),Y=(0,e4.useRef)(K);(0,e4.useEffect)(()=>{Y.current=K},[K]);let J=function(e){let{boundaryWidth:t,currentWidth:n}=e;if(void 0!==n||void 0!==t)return Math.min(null!=n?n:1/0,(t||1/0)-8)}({boundaryWidth:U,currentWidth:K}),Q=(0,e4.useRef)(J);(0,e4.useEffect)(()=>{Q.current=J},[J]);let ee=(0,e4.useRef)();(0,e4.useEffect)(()=>{let e=N.current;if(!S||!e)return;let t=ee.current;w?void 0!==t&&(e.style.width="".concat(t,"px")):void 0!==K&&(e.style.width="".concat(K,"px")),"number"==typeof J&&(e.style.maxWidth="".concat(J,"px"))},[K,N,w,J,S]);let et=(0,e4.useMemo)(()=>{let e=[];return(m||P)&&e.push((0,tt.RR)({boundary:k||void 0,fallbackPlacements:x,padding:4,rootBoundary:q})),e.push((0,tt.cv)({mainAxis:h?4:0})),(m||w)&&e.push(function(e){let{apply:t,margins:n,padding:r=0}=e;return{name:"@sanity/ui/size",async fn(o){let{elements:a,placement:i,platform:l,rects:s}=o,{floating:d,reference:u}=s,c=await (0,tt.US)(o,{altBoundary:!0,boundary:e.boundaryElement||void 0,elementContext:"floating",padding:r,rootBoundary:"viewport"}),f=1/0,p=1/0,h=d.width,b=d.height;i.includes("top")&&(f=h-(c.left+c.right),p=b-c.top),i.includes("right")&&(f=h-c.right,p=b-(c.top+c.bottom)),i.includes("bottom")&&(f=h-(c.left+c.right),p=b-c.bottom),i.includes("left")&&(f=h-c.left,p=b-(c.top+c.bottom)),t({availableWidth:f-n[1]-n[3],availableHeight:p-n[0]-n[2],elements:a,referenceWidth:u.width-n[1]-n[3]});let g=await l.getDimensions(a.floating),m=g.height,v=g.width;return h!==v||b!==m?{reset:{rects:!0}}:{}}}}({apply(e){let{availableWidth:t,availableHeight:n,elements:r,referenceWidth:o}=e;ee.current=o;let a=Y.current,i=Q.current;w?r.floating.style.width="".concat(o,"px"):void 0!==a&&(r.floating.style.width="".concat(a,"px")),m&&(r.floating.style.maxWidth="".concat(Math.min(t,null!=i?i:1/0),"px"),r.floating.style.maxHeight="".concat(n,"px"))},boundaryElement:k||void 0,constrainSize:m,margins:p,matchReferenceWidth:w,padding:4})),P&&e.push((0,tt.uY)({boundary:k||void 0,rootBoundary:q,padding:4})),h&&e.push((0,tn.x7)({element:W,padding:4})),e.push((0,tt.Cp)({boundary:$||void 0,padding:4,strategy:"referenceHidden"})),e},[h,m,x,k,p,w,P,$]),{x:en,y:er,middlewareData:eo,placement:ea,refs:ei,strategy:el,update:es}=(0,tn.YF)({middleware:et,placement:R,whileElementsMounted:tr.Me}),ed=null==(s=eo.hide)?void 0:s.referenceHidden,eu=null==(d=eo.arrow)?void 0:d.x,ec=null==(u=eo.arrow)?void 0:u.y,ef=(0,e4.useCallback)(e=>{W.current=e},[]),ep=(0,e4.useCallback)(e=>{N.current=e,ei.setFloating(e)},[N,ei]),eh=(0,e4.useCallback)(e=>{ei.setReference(e);let t=null==g?void 0:g.ref;"function"==typeof t?t(e):t&&(t.current=e)},[g,ei]),eb=(0,e4.useMemo)(()=>!g||C?null:(0,e4.cloneElement)(g,{ref:eh}),[g,C,eh]);if((0,e4.useEffect)(()=>{L&&("function"==typeof L?L(es):L&&(L.current=es))},[es,L]),(0,e4.useEffect)(()=>{ei.setReference(C||null)},[C,ei]),y)return g||(0,e5.jsx)(e5.Fragment,{});let eg=(0,e5.jsx)(LayerProvider,{zOffset:Z,children:(0,e5.jsx)(rZ,{...F,__unstable_margins:p,arrow:h,arrowRef:ef,arrowX:eu,arrowY:ec,hidden:ed,overflow:_,padding:G,placement:ea,radius:H,ref:ep,scheme:O,shadow:I,strategy:el,tone:T,width:w?ee.current:K,x:en,y:er,children:v})});return(0,e5.jsxs)(e5.Fragment,{children:[S&&(0,e5.jsx)(e5.Fragment,{children:E?(0,e5.jsx)(Portal,{__unstable_name:"string"==typeof E?E:void 0,children:eg}):eg}),eb]})}));rN.displayName="Popover";var rW=Object.freeze,rq=Object.defineProperty,__template$k=(e,t)=>rW(rq(e,"raw",{value:rW(t||e.slice())}));let rX=e9.ZP.div(function(){return(0,e9.iv)(et||(et=__template$k(["\n    position: relative;\n\n    &:not([hidden]) {\n      display: inline-block;\n    }\n\n    &[data-read-only] {\n      outline: 1px solid red;\n    }\n  "])))}),rU=e9.ZP.input(function(e){let{theme:t}=e,{focusRing:n,input:r}=t.sanity,o=t.sanity.color.input,a=(r.radio.size-r.radio.markSize)/2;return(0,e9.iv)(en||(en=__template$k(["\n    appearance: none;\n    position: absolute;\n    top: 0;\n    left: 0;\n    opacity: 0;\n    height: 100%;\n    width: 100%;\n    outline: none;\n    z-index: 1;\n    padding: 0;\n    margin: 0;\n    border-radius: ",";\n    border: none;\n\n    /* enabled */\n    & + span {\n      display: block;\n      position: relative;\n      height: ",";\n      width: ",";\n      border-radius: ",";\n      background: ",";\n      box-shadow: ",";\n\n      &::after {\n        content: '';\n        position: absolute;\n        top: ",";\n        left: ",";\n        height: ",";\n        width: ",";\n        border-radius: ",";\n        background: ",";\n        opacity: 0;\n      }\n    }\n\n    /* focused */\n    &:not(:disabled):focus + span {\n      box-shadow: ",";\n    }\n\n    &:not(:disabled):focus:not(:focus-visible) + span {\n      box-shadow: ",";\n    }\n\n    &:checked + span::after {\n      opacity: 1;\n    }\n\n    /* read only */\n    &[data-read-only] + span {\n      box-shadow: 0 0 0 1px ",";\n      background: ",";\n\n      &::after {\n        background: ",";\n      }\n    }\n\n    /* disabled */\n    &:not([data-read-only]):disabled + span {\n      box-shadow: 0 0 0 1px ",";\n      background: ",";\n\n      &::after {\n        background: ",";\n      }\n    }\n  "])),rem(r.radio.size/2),rem(r.radio.size),rem(r.radio.size),rem(r.radio.size/2),o.default.enabled.bg,focusRingBorderStyle({color:o.default.enabled.border,width:r.border.width}),rem(a),rem(a),rem(r.radio.markSize),rem(r.radio.markSize),rem(r.radio.markSize/2),o.default.enabled.fg,focusRingStyle({border:{width:r.border.width,color:o.default.enabled.border},focusRing:n}),focusRingBorderStyle({color:o.default.enabled.border,width:r.border.width}),o.default.readOnly.border,o.default.readOnly.bg,o.default.readOnly.fg,o.default.disabled.border,o.default.disabled.bg,o.default.disabled.fg)}),rK=(0,e4.forwardRef)(function(e,t){let{className:n,disabled:r,style:o,customValidity:a,readOnly:i,...l}=e,s=useForwardedRef(t);return useCustomValidity(s,a),(0,e5.jsxs)(rX,{className:n,"data-ui":"Radio",style:o,children:[(0,e5.jsx)(rU,{"data-read-only":!r&&i?"":void 0,...l,disabled:r||i,readOnly:i,ref:s,t
1ype:"radio"}),(0,e5.jsx)("span",{})]})});var rY=Object.freeze,rJ=Object.defineProperty,__template$j=(e,t)=>rY(rJ(e,"raw",{value:rY(t||e.slice())}));function inputBaseStyle(e){let{theme:t}=e,n=t.sanity.fonts.text;return(0,e9.iv)(eo||(eo=__template$j(["\n    -webkit-font-smoothing: antialiased;\n    appearance: none;\n    border: 0;\n    font-family: ",";\n    color: inherit;\n    width: 100%;\n    outline: none;\n    margin: 0;\n\n    &:disabled {\n      opacity: 1;\n    }\n  "])),n.family)}function inputColorStyle(e){let{theme:t}=e,{focusRing:n,input:r}=t.sanity,o=t.sanity.color.input;return(0,e9.iv)(ea||(ea=__template$j(["\n    /* enabled */\n    background-color: ",";\n    color: ",";\n    box-shadow: ",";\n\n    /* hovered */\n    @media (hover: hover) {\n      &:not(:disabled):hover {\n        background-color: ",";\n        color: ",";\n        box-shadow: ",";\n      }\n    }\n\n    /* focused */\n    &:not(:disabled):focus {\n      box-shadow: ",";\n    }\n\n    /* read-only */\n    &[data-read-only] {\n      background-color: ",";\n      color: ",";\n      box-shadow: ",";\n    }\n\n    /* disabled */\n    &:not([data-read-only]):disabled {\n      background-color: ",";\n      color: ",";\n      box-shadow: ",";\n    }\n  "])),o.default.enabled.bg,o.default.enabled.fg,focusRingBorderStyle({color:o.default.enabled.border,width:r.border.width}),o.default.hovered.bg,o.default.hovered.fg,focusRingBorderStyle({color:o.default.hovered.border,width:r.border.width}),focusRingStyle({border:{width:r.border.width,color:o.default.enabled.border},focusRing:n}),o.default.readOnly.bg,o.default.readOnly.fg,focusRingBorderStyle({color:o.default.readOnly.border,width:r.border.width}),o.default.disabled.bg,o.default.disabled.fg,focusRingBorderStyle({color:o.default.disabled.border,width:r.border.width}))}function inputTextSizeStyle(e){let{theme:t,$fontSize:n}=e,{sizes:r}=t.sanity.fonts.text;return _responsive(t.sanity.media,n,e=>{var t;return{fontSize:rem((t=r[e]||r[2]).fontSize),lineHeight:rem(t.lineHeight)}})}let rQ={root:function(){return(0,e9.iv)(er||(er=__template$j(["\n    position: relative;\n    width: stretch;\n\n    &:not([hidden]) {\n      display: inline-block;\n    }\n  "])))},input:function(){return[responsiveRadiusStyle,inputBaseStyle,inputColorStyle,inputTextSizeStyle,responsiveInputPaddingIconRightStyle]},iconBox:function(e){let{theme:t}=e,n=t.sanity.color.input;return(0,e9.iv)(ei||(ei=__template$j(["\n    pointer-events: none;\n    position: absolute;\n    top: 0;\n    right: 0;\n\n    /* enabled */\n    --card-fg-color: ",";\n\n    /* hover */\n    @media (hover: hover) {\n      select:not(disabled):not(:read-only):hover + && {\n        --card-fg-color: ",";\n      }\n    }\n\n    /* disabled */\n    select:disabled + && {\n      --card-fg-color: ",";\n    }\n\n    /* read-only */\n    select[data-read-only] + && {\n      --card-fg-color: ",";\n    }\n  "])),n.default.enabled.fg,n.default.hovered.fg,n.default.disabled.fg,n.default.readOnly.fg)}},r0=e9.ZP.div(rQ.root),r1=e9.ZP.select(rQ.input),r2=(0,e9.ZP)(nk)(rQ.iconBox),r5=(0,e4.forwardRef)(function(e,t){let{children:n,customValidity:r,disabled:o,fontSize:a=2,padding:i=3,radius:l=1,readOnly:s,space:d=3,...u}=e,c=useForwardedRef(t);return useCustomValidity(c,r),(0,e5.jsxs)(r0,{"data-ui":"Select",children:[(0,e5.jsx)(r1,{"data-read-only":!o&&s?"":void 0,"data-ui":"Select",...u,$fontSize:useArrayProp(a),$padding:useArrayProp(i),$radius:useArrayProp(l),$space:useArrayProp(d),disabled:o||s,ref:c,children:n}),(0,e5.jsx)(r2,{padding:i,children:(0,e5.jsx)(no,{size:a,children:(0,e5.jsx)(e7.GVG,{})})})]})}),r4={"&&:not([hidden])":{display:"grid"},'&[data-as="ul"],&[data-as="ol"]':{listStyle:"none"},gridTemplateColumns:"minmax(0, 1fr)",gridAutoRows:"min-content"},r3=(0,e9.ZP)(nk)(function(){return r4},function(e){let{theme:t}=e,{media:n,space:r}=t.sanity;return _responsive(n,e.$space,e=>({gridGap:rem(r[e])}))}),r9=(0,e4.forwardRef)(function(e,t){let{as:n,space:r,...o}=e;return(0,e5.jsx)(r3,{"data-as":"string"==typeof n?n:void 0,"data-ui":"Stack",...o,$space:useArrayProp(r),forwardedAs:n,ref:t})});var r6=Object.freeze,r7=Object.defineProperty,__template$i=(e,t)=>r6(r7(e,"raw",{value:r6(t||e.slice())}));let r8=e9.ZP.span(function(){return(0,e9.iv)(el||(el=__template$i(["\n    position: relative;\n    &:not([hidden]) {\n      display: inline-block;\n    }\n  "])))}),oe=e9.ZP.input(function(){return(0,e9.iv)(es||(es=__template$i(["\n    position: absolute;\n    top: 0;\n    right: 0;\n    bottom: 0;\n    left: 0;\n    opacity: 0;\n    height: 100%;\n    width: 100%;\n    outline: none;\n    padding: 0;\n    margin: 0;\n\n    /* Place the input element above the representation element */\n    z-index: 1;\n  "])))}),ot=e9.ZP.span(function(e){let{theme:t}=e,{focusRing:n,input:r}=t.sanity,o=t.sanity.color.button.default;return(0,e9.iv)(ed||(ed=__template$i(["\n    --switch-bg-color: ",";\n    --switch-fg-color: ",";
1\n    --switch-box-shadow: none;\n\n    &:not([hidden]) {\n      display: block;\n    }\n    position: relative;\n    width: ",";\n    height: ",";\n    border-radius: ",";\n\n    /* Make sure it’s not possible to interact with the wrapper element */\n    pointer-events: none;\n\n    &:after {\n      content: '';\n      display: block;\n      position: absolute;\n      top: 0;\n      left: 0;\n      right: 0;\n      bottom: 0;\n      z-index: 1;\n      box-shadow: var(--switch-box-shadow);\n      border-radius: inherit;\n    }\n\n    /* Focus styles */\n    input:focus + && {\n      --switch-box-shadow: ",";\n    }\n\n    input:focus:not(:focus-visible) + && {\n      --switch-box-shadow: none;\n    }\n\n    input:checked + && {\n      --switch-bg-color: ",";\n      --switch-fg-color: ",";\n    }\n\n    @media (hover: hover) {\n      input:not(:disabled):hover + && {\n        --switch-bg-color: ",";\n        --switch-fg-color: ",";\n      }\n\n      input:not(:disabled):checked:hover + && {\n        --switch-bg-color: ",";\n        --switch-fg-color: ",";\n      }\n    }\n\n    input:not([data-read-only]):disabled + && {\n      --switch-bg-color: ",";\n      --switch-fg-color: ",";\n    }\n  "])),o.default.enabled.bg,o.default.enabled.fg,rem(r.switch.width),rem(r.switch.height),rem(r.switch.height/2),focusRingStyle({focusRing:n}),o.positive.enabled.bg,o.positive.enabled.fg,o.default.hovered.bg,o.default.hovered.fg,o.positive.hovered.bg,o.positive.hovered.fg,o.default.disabled.bg,o.default.disabled.fg)}),on=e9.ZP.span(function(e){let{theme:t}=e,{input:n}=t.sanity;return(0,e9.iv)(eu||(eu=__template$i(["\n    &:not([hidden]) {\n      display: block;\n    }\n    background-color: var(--switch-bg-color);\n    position: absolute;\n    left: 0;\n    top: 0;\n    width: ",";\n    height: ",";\n    border-radius: ",";\n  "])),rem(n.switch.width),rem(n.switch.height),rem(n.switch.height/2))}),or=e9.ZP.span(function(e){let{$indeterminate:t,theme:n}=e,{input:r}=n.sanity,o=r.switch.width,a=r.switch.height,i=r.switch.padding,l=a-2*r.switch.padding,s=o-2*i-l,d=o/2-l/2-i,u=!0!==t&&!0===e.$checked;return(0,e9.iv)(ep||(ep=__template$i(["\n    &:not([hidden]) {\n      display: block;\n    }\n    position: absolute;\n    left: ",";\n    top: ",";\n    height: ",";\n    width: ",";\n    border-radius: ",";\n    transition-property: transform;\n    transition-duration: ","ms;\n    transition-timing-function: ",";\n    background: var(--switch-fg-color);\n    transform: translate3d(0, 0, 0);\n\n    ","\n\n    ","\n  "])),rem(i),rem(i),rem(l),rem(l),rem(l/2),r.switch.transitionDurationMs,r.switch.transitionTimingFunction,u&&(0,e9.iv)(ec||(ec=__template$i(["\n      transform: translate3d(","px, 0, 0);\n    "])),s),t&&(0,e9.iv)(ef||(ef=__template$i(["\n      transform: translate3d(","px, 0, 0);\n    "])),d))}),oo=(0,e4.forwardRef)(function(e,t){let{checked:n,className:r,disabled:o,indeterminate:a,readOnly:i,style:l,...s}=e,d=useForwardedRef(t);return(0,e4.useEffect)(()=>{d.current&&(d.current.indeterminate=a||!1)},[a,d]),(0,e5.jsxs)(r8,{className:r,"data-ui":"Switch",style:l,children:[(0,e5.jsx)(oe,{"data-read-only":!o&&i?"":void 0,...s,checked:!0!==a&&n,disabled:o||i,type:"checkbox",ref:d}),(0,e5.jsxs)(ot,{"aria-hidden":!0,"data-name":"representation",children:[(0,e5.jsx)(on,{}),(0,e5.jsx)(or,{$checked:n,$indeterminate:a})]})]})});var oa=Object.freeze,oi=Object.defineProperty;let ol=e9.ZP.span(textInputRootStyle),os=e9.ZP.span(eh||(eh=oa(oi(f=["\n  flex: 1;\n  min-width: 0;\n  display: block;\n  position: relative;\n"],"raw",{value:oa(f.slice())})))),od=e9.ZP.textarea(responsiveInputPaddingStyle,textInputBaseStyle,textInputFontSizeStyle),ou=e9.ZP.div(responsiveRadiusStyle,textInputRepresentationStyle),oc=(0,e4.forwardRef)(function(e,t){let{border:n=!0,customValidity:r,disabled:o=!1,fontSize:a=2,padding:i=3,radius:l=1,weight:s,...d}=e,u=useForwardedRef(t),c=useRootTheme();return useCustomValidity(u,r),(0,e5.jsx)(ol,{"data-ui":"TextArea",children:(0,e5.jsxs)(os,{children:[(0,e5.jsx)(od,{"data-as":"textarea","data-scheme":c.scheme,"data-tone":c.tone,...d,$fontSize:useArrayProp(a),$padding:useArrayProp(i),$scheme:c.scheme,$space:useArrayProp(0),$tone:c.tone,$weight:s,disabled:o,ref:u}
1),(0,e5.jsx)(ou,{$radius:useArrayProp(l),$scheme:c.scheme,$tone:c.tone,"data-border":n?"":void 0,"data-scheme":c.scheme,"data-tone":c.tone})]})})});var of=Object.freeze,op=Object.defineProperty,__template$g=(e,t)=>of(op(e,"raw",{value:of(t||e.slice())}));let oh={zIndex:2},ob=(0,e9.ZP)(nK).attrs({forwardedAs:"span"})(textInputRootStyle),og=e9.ZP.span(eb||(eb=__template$g(["\n  flex: 1;\n  min-width: 0;\n  display: block;\n  position: relative;\n"]))),om=(0,e9.ZP)(nK).attrs({forwardedAs:"span"})(eg||(eg=__template$g(["\n  border-top-right-radius: 0;\n  border-bottom-right-radius: 0;\n\n  & > span {\n    display: block;\n    margin: -1px;\n  }\n"]))),ov=(0,e9.ZP)(nK).attrs({forwardedAs:"span"})(em||(em=__template$g(["\n  border-top-left-radius: 0;\n  border-bottom-left-radius: 0;\n\n  & > span {\n    display: block;\n    margin: -1px;\n  }\n"]))),oy=e9.ZP.input(responsiveInputPaddingStyle,textInputBaseStyle,textInputFontSizeStyle),ox=e9.ZP.span(responsiveRadiusStyle,textInputRepresentationStyle),ow=(0,e9.ZP)(nk)(ev||(ev=__template$g(["\n  position: absolute;\n  top: 0;\n  left: 0;\n"]))),ok=(0,e9.ZP)(nk)(ey||(ey=__template$g(["\n  position: absolute;\n  top: 0;\n  right: 0;\n"]))),oS=(0,e9.ZP)(nK)(ex||(ex=__template$g(["\n  background-color: transparent;\n  position: absolute;\n  top: 0;\n  right: 0;\n"]))),o_=(0,e9.ZP)(nW)({"&:not([hidden])":{display:"block"}}),oj=(0,e4.forwardRef)(function(e,t){let{border:n=!0,clearButton:r,disabled:o=!1,fontSize:a=2,icon:i,iconRight:l,onClear:s,padding:d=3,prefix:u,radius:c=1,readOnly:f,space:p=3,suffix:h,customValidity:b,type:g="text",weight:m,...v}=e,y=useForwardedRef(t),x=useRootTheme(),w=useArrayProp(a),k=useArrayProp(d),S=useArrayProp(c),_=useArrayProp(p),j=!!r,R=!!i,E=!!l,P=!!h,z=!!u;useCustomValidity(y,b);let $=(0,e4.useCallback)(e=>{e.preventDefault(),e.stopPropagation()},[]),C=(0,e4.useCallback)(e=>{var t;e.preventDefault(),e.stopPropagation(),s&&s(),null==(t=y.current)||t.focus()},[s,y]),O=(0,e4.useMemo)(()=>u&&(0,e5.jsx)(om,{borderTop:!0,borderLeft:!0,borderBottom:!0,radius:S,sizing:"border",tone:"inherit",children:(0,e5.jsx)("span",{children:u})}),[u,S]),A=(0,e4.useMemo)(()=>(0,e5.jsxs)(ox,{$hasPrefix:z,$hasSuffix:P,$radius:S,$scheme:x.scheme,$tone:x.tone,"data-border":n?"":void 0,"data-scheme":x.scheme,"data-tone":x.tone,children:[i&&(0,e5.jsx)(ow,{padding:k,children:(0,e5.jsxs)(no,{size:w,children:[(0,e4.isValidElement)(i)&&i,(0,e3.isValidElementType)(i)&&(0,e4.createElement)(i)]})}),!j&&l&&(0,e5.jsx)(ok,{padding:k,children:(0,e5.jsxs)(no,{size:w,children:[(0,e4.isValidElement)(l)&&l,(0,e3.isValidElementType)(l)&&(0,e4.createElement)(l)]})})]}),[n,w,i,l,k,S,x,j,z,P]),T=(0,e4.useMemo)(()=>k.map(e=>0===e?0:1===e||2===e?1:e-2),[k]),M=(0,e4.useMemo)(()=>k.map(e=>0===e||1===e?0:2===e?1:e-1),[k]),V=(0,e4.useMemo)(()=>"object"==typeof r?r:ts,[r]),L=(0,e4.useMemo)(()=>!o&&!f&&r&&(0,e5.jsx)(oS,{forwardedAs:"span",padding:T,style:oh,tone:b?"critical":"inherit",children:(0,e5.jsx)(o_,{"aria-label":"Clear","data-qa":"clear-button",fontSize:w,icon:e7.Two,mode:"bleed",padding:M,radius:S,...V,onClick:C,onMouseDown:$})}),[r,T,M,V,b,o,w,C,$,S,f]),F=(0,e4.useMemo)(()=>h&&(0,e5.jsx)(ov,{borderTop:!0,borderRight:!0,borderBottom:!0,radius:S,sizing:"border",tone:"inherit",children:(0,e5.jsx)("span",{children:h})}),[S,h]);
1return(0,e5.jsxs)(ob,{"data-ui":"TextInput",tone:x.tone,children:[O,(0,e5.jsxs)(og,{children:[(0,e5.jsx)(oy,{"data-as":"input","data-scheme":x.scheme,"data-tone":x.tone,...v,$fontSize:w,$iconLeft:R,$iconRight:E||j,$padding:k,$scheme:x.scheme,$space:_,$tone:x.tone,$weight:m,disabled:o,readOnly:f,ref:y,type:g}),A,L]}),F]})}),oR={top:["bottom","left","right"],"top-start":["bottom-start","left-start","right-start"],"top-end":["bottom-end","left-end","right-end"],bottom:["top","left","right"],"bottom-start":["top-start","left-start","right-start"],"bottom-end":["top-end","left-end","right-end"],left:["right","top","bottom"],"left-start":["right-start","top-start","bottom-start"],"left-end":["right-end","top-end","bottom-end"],right:["left","top","bottom"],"right-start":["left-start","top-start","bottom-start"],"right-end":["left-end","top-end","bottom-end"]};var oE=Object.freeze,oP=Object.defineProperty,__template$f=(e,t)=>oE(oP(e,"raw",{value:oE(t||e.slice())}));let oz=e9.ZP.div(ew||(ew=__template$f(["\n  position: absolute;\n  pointer-events: none;\n  width: 15px;\n  height: 15px;\n  fill: none;\n\n  :empty + & {\n    display: none;\n  }\n\n  & > svg {\n    display: block;\n    transform-origin: 7.5px 7.5px;\n  }\n\n  /* position: absolute;\n  width: 15px;\n  height: 15px;\n  fill: none;\n\n  :empty + & {\n    display: none;\n  }\n\n  & > svg {\n    &:not([hidden]) {\n      display: block;\n    }\n    transform-origin: 7.5px 7.5px;\n  } */\n\n  [data-placement^='top'] > & {\n    bottom: -27px;\n  }\n\n  [data-placement^='right'] > & {\n    left: -27px;\n\n    & > svg {\n      transform: rotate(90deg);\n    }\n  }\n\n  [data-placement^='left'] > & {\n    right: -27px;\n\n    & > svg {\n      transform: rotate(-90deg);\n    }\n  }\n\n  [data-placement^='bottom'] > & {\n    top: -27px;\n\n    & > svg {\n      transform: rotate(180deg);\n    }\n  }\n"]))),o$=e9.ZP.path(ek||(ek=__template$f(["\n  fill: var(--card-shadow-outline-color);\n"]))),oC=e9.ZP.path(eS||(eS=__template$f(["\n  fill: var(--card-bg-color);\n"]))),oO=(0,e4.forwardRef)(function(e,t){let{...n}=e;return(0,e5.jsx)(oz,{"data-ui":"Tooltip__arrow",...n,ref:t,children:(0,e5.jsxs)("svg",{width:"15",height:"15",viewBox:"0 0 15 15",children:[(0,e5.jsx)(o$,{d:"M11.5266 1C11.032 1.32802 10.5837 1.73105 10.1995 2.20057L9.04792 3.6081C8.24771 4.58614 6.7523 4.58614 5.95209 3.6081L4.80047 2.20057C4.41632 1.73105 3.96796 1.32802 3.47341 1H0.156727C1.65639 1 3.07687 1.67313 4.02651 2.83381L5.17813 4.24134C6.37844 5.70839 8.62156 5.70839 9.82187 4.24134L10.9735 2.83381C11.9231 1.67313 13.3436 1 14.8433 1H11.5266Z"}),(0,e5.jsx)(oC,{d:"M0.156725 0C1.95632 0 3.66089 0.80776 4.80047 2.20057L5.95209 3.6081C6.75229 4.58614 8.24771 4.58614 9.04791 3.6081L10.1995 2.20057C11.3391 0.80776 13.0437 0 14.8433 0H15H0H0.156725Z"})]})})}),oA=Symbol.for("@sanity/ui/context/tooltipDelayGroup");tD[oA]=tD[oA]||(0,e4.createContext)(null);let oT=tD[oA];var oM=Object.freeze,oV=Object.defineProperty;let oL=(0,e9.ZP)(rS)(e_||(e_=oM(oV(p=["\n  pointer-events: none;\n"],"raw",{value:oM(p.slice())})))),oF=(0,e4.forwardRef)(function(e,t){var n,r,o,a,i;let l=useBoundaryElement(),s=useTheme(),{boundaryElement:d=null==l?void 0:l.element,children:u,content:c,disabled:f,fallbackPlacements:p=null!=(r=e.fallbackPlacements)?r:oR[null!=(n=e.placement)?n:"bottom"],padding:h,placement:b="bottom",portal:g,scheme:m,shadow:v=2,zOffset:y=null==(o=s.sanity.layer)?void 0:o.tooltip.zOffset,delay:x,...w}
1=e,k=useArrayProp(p),S=useForwardedRef(t),[_,j]=(0,e4.useState)(null),R=(0,e4.useRef)(null),E="viewport",P=(0,e4.useMemo)(()=>{let e=[];return e.push((0,tt.RR)({boundary:d||void 0,fallbackPlacements:k,padding:4,rootBoundary:E,mainAxis:!1})),e.push((0,tt.cv)({mainAxis:3})),e.push((0,tt.dp)({apply(e){let{availableWidth:t,availableHeight:n,elements:r}=e;Object.assign(r.floating.style,{maxWidth:"".concat(t-8,"px"),maxHeight:"".concat(n-8,"px")})}})),e.push((0,tt.uY)({boundary:d||void 0,rootBoundary:E,padding:4})),e.push((0,tn.x7)({element:R,padding:2})),e},[d,k]),{floatingStyles:z,placement:$,middlewareData:C,refs:O,update:A}=(0,tn.YF)({middleware:P,placement:b,whileElementsMounted:tr.Me}),T=$&&td[$.split("-")[0]],M=null==(a=C.arrow)?void 0:a.x,V=null==(i=C.arrow)?void 0:i.y,L=(0,e4.useMemo)(()=>{let e={left:null!==M?M:void 0,top:null!==V?V:void 0,right:void 0,bottom:void 0};return T&&(e[T]=-15),e},[M,V,T]),F=(0,e4.useId)(),[B,G]=function(e){let[t,n]=(0,e4.useState)(e),r=(0,e4.useRef)(),o=(0,e4.useCallback)((e,t)=>{let action=()=>{n(e)};if(r.current&&(clearTimeout(r.current),r.current=void 0),!t)return action();r.current=setTimeout(action,t)},[]);return[t,o]}(!1),H=function(){let e=(0,e4.useContext)(oT);return e}(),I=B||(null==H?void 0:H.openTooltipId)===F,D=null!==H,Z="number"==typeof x?x:(null==x?void 0:x.open)||0,N="number"==typeof x?x:(null==x?void 0:x.close)||0,W=D?H.openDelay:Z,q=D?H.closeDelay:N,X=(0,e4.useCallback)(e=>{if(D){if(e)H.setIsGroupActive(e,W),H.setOpenTooltipId(F,W);else{let t=q>200?q:200;H.setIsGroupActive(e,t),H.setOpenTooltipId(null,q)}}else G(e,e?W:q)},[D,H,W,F,q,G]),U=(0,e4.useCallback)(()=>X(!1),[X]),K=(0,e4.useCallback)(()=>X(!0),[X]),Y=(0,e4.useCallback)(()=>X(!0),[X]),J=(0,e4.useCallback)(()=>X(!1),[X]);(0,e4.useEffect)(()=>{if(B)return window.addEventListener("mousemove",handleWindowMouseMove),()=>{window.removeEventListener("mousemove",handleWindowMouseMove)};function handleWindowMouseMove(e){if(!_)return;let t=_===e.target||e.target instanceof Node&&_.contains(e.target);t||(X(!1),window.removeEventListener("mousemove",handleWindowMouseMove))}},[B,_,X]),(0,e4.useEffect)(()=>{f&&X(!1)},[f,X]),(0,e4.useEffect)(()=>{c||X(!1)},[c,X]),(0,e4.useEffect)(()=>O.setReference(_),[_,O]);let Q=(0,e4.useCallback)(e=>{R.current=e,A()},[A]),ee=(0,e4.useCallback)(e=>{S.current=e,O.setFloating(e)},[S,O]),et=null==u?void 0:u.ref,en=(0,e4.useCallback)(e=>{"function"==typeof et?et(e):et&&(et.current=e),j(e)},[et]),er=(0,e4.useMemo)(()=>u?(0,e4.cloneElement)(u,{onBlur:U,onFocus:K,onMouseEnter:Y,onMouseLeave:J,ref:en}):null,[u,U,K,Y,J,en]);if(!er)return(0,e5.jsx)(e5.Fragment,{});if(f)return er;let eo=(0,e5.jsx)(oL,{"data-ui":"Tooltip",...w,ref:ee,style:z,zOffset:y,children:(0,e5.jsxs)(nK,{"data-ui":"Tooltip__card","data-placement":$,padding:h,radius:2,scheme:m,shadow:v,children:[c,(0,e5.jsx)(oO,{ref:Q,style:L})]})});return(0,e5.jsxs)(e5.Fragment,{children:[er,I&&(0,e5.jsx)(e5.Fragment,{children:g?(0,e5.jsx)(Portal,{__unstable_name:"string"==typeof g?g:void 0,children:eo}):eo})]})});var oB=Object.freeze,oG=Object.defineProperty,__template$d=(e,t)=>oB(oG(e,"raw",{value:oB(t||e.slice())}));let oH=e9.ZP.div(ej||(ej=__template$d(["\n  line-height: 0;\n"]))),oI=(0,e9.ZP)(nk)(eR||(eR=__template$d(["\n  & > ul {\n    list-style: none;\n    padding: 0;\n    margin: 0;\n  }\n"]))),oD=(0,e9.F4)(eE||(eE=__template$d(["\n  from {\n    transform: rotate(0deg);\n  }\n\n  to {\n    transform: rotate(360deg);\n  }\n"]))),oZ=(0,e9.ZP)(e7.L4p)(eP||(eP=__template$d(["\n  animation: "," 500ms linear infinite;\n"])),oD);function AutocompleteOption(e){let{children:t,id:n,onSelect:r,selected:o,value:a}=e,i=(0,e4.useCallback)(()=>{setTimeout(()=>{r(a)},0)},[r,a]),l=(0,e4.useCallback)(e=>{var t;"Enter"!==e.key||isHTMLAnchorElement(t=e.currentTarget)||isHTMLButtonElement(t)||i()},[i]);return(0,e5.jsx)("li",{"aria-selected":o,"data-ui":"AutocompleteOption",id:n,role:"option",onClick:i,onKeyDown:l,children:t})}function autocompleteReducer(e,t){return"input/change"===t.type?{...e,activeValue:null,focused:!0,query:t.query}:"input/focus"===t.type?{...e,focused:!0}:"root/blur"===t.type?{...e,focused:!1,query:null}:"root/clear"===t.type?{...e,activeValue:null,query:null,value:null}:"root/escape"===t.type?{...e,focused:!1,query:null}:"root/open"===t.type?{...e,query:e.query||t.query}:"root/setActiveValue"===t.type?{...e,activeValue:t.value,listFocused:t.listFocused||e.listFocused}:"root/setListFocused"===t.type?{...e,listFocused:t.listFocused}:"value/change"===t.type?{...e,activeValue:t.value,query:null,value:t.value}:e}let oN=["Control","Shift","Alt","Enter","Home","End","PageUp","PageDown","Meta","Tab","CapsLock"],oW=["bottom-start","to
1p-start"],DEFAULT_RENDER_VALUE=(e,t)=>t?t.value:e,DEFAULT_FILTER_OPTION=(e,t)=>t.value.toLowerCase().indexOf(e.toLowerCase())>-1,oq=(0,e4.forwardRef)(function(e,t){let{border:n=!0,customValidity:r,disabled:o,filterOption:a,fontSize:i=2,icon:l,id:s,listBox:d=ts,loading:u,onBlur:c,onChange:f,onFocus:p,onQueryChange:h,onSelect:b,openButton:g,options:m,padding:v=3,popover:y=ts,prefix:x,radius:w=3,readOnly:k,relatedElements:S,renderOption:_,renderPopover:j,renderValue:R=DEFAULT_RENDER_VALUE,suffix:E,value:P,...z}=e,[$,C]=(0,e4.useReducer)(autocompleteReducer,{activeValue:P||null,focused:!1,listFocused:!1,query:null,value:P||null}),{activeValue:O,focused:A,listFocused:T,query:M,value:V}=$,L=(0,e4.useCallback)(e=>{let{value:t}=e;return(0,e5.jsx)(nK,{"data-as":"button",padding:v,radius:2,tone:"inherit",children:(0,e5.jsx)(no,{size:i,textOverflow:"ellipsis",children:t})})},[i,v]),F="function"==typeof _?_:L,B="function"==typeof a?a:DEFAULT_FILTER_OPTION,G=(0,e4.useRef)(null),H=(0,e4.useRef)(null),I=(0,e4.useRef)(null),D=(0,e4.useRef)(null),Z=(0,e4.useRef)(!1),N=(0,e4.useRef)(V),W=(0,e4.useRef)(P),q=(0,e4.useRef)(!1),X=useForwardedRef(t),U="".concat(s,"-listbox"),K=Array.isArray(m)?m:tl,Y=useArrayProp(v),J=(0,e4.useMemo)(()=>null!==V?K.find(e=>e.value===V):void 0,[K,V]),Q=(0,e4.useMemo)(()=>K.filter(e=>!M||B(M,e)),[B,K,M]),ee=Q.length,et=O?"".concat(s,"-option-").concat(O):void 0,en=null!==M&&u||A&&null!==M,er=(0,e4.useCallback)(e=>{setTimeout(()=>{if(q.current)return;let t=(S||[]).concat(G.current?[G.current]:[],H.current?[H.current]:[]),n=!1;if(document.activeElement){for(let e of t)if(e===document.activeElement||e.contains(document.activeElement)){n=!0;break}}!1===n&&(C({type:"root/blur"}),q.current=!1,h&&h(null),c&&c(e))},0)},[c,h,S]),eo=(0,e4.useCallback)(e=>{let t=D.current,n=e.target instanceof HTMLElement?e.target:null,r=(null==t?void 0:t.contains(n))||!1;r!==Z.current&&(Z.current=r,C({type:"root/setListFocused",listFocused:r}))},[]),ea=(0,e4.useCallback)(e=>{var t;C({type:"value/change",value:e}),q.current=!1,b&&b(e),N.current=e,f&&f(e),h&&h(null),null==(t=I.current)||t.focus()},[f,b,h]),ei=(0,e4.useCallback)(e=>{var t,n;if("ArrowDown"===e.key){if(e.preventDefault(),!ee)return;let t=Q.find(e=>e.value===O),n=t?Q.indexOf(t):-1,r=Q[(n+1)%ee];r&&C({type:"root/setActiveValue",value:r.value,listFocused:!0});return}if("ArrowUp"===e.key){if(e.preventDefault(),!ee)return;let t=Q.find(e=>e.value===O),n=t?Q.indexOf(t):-1,r=Q[-1===n?ee-1:(ee+n-1)%ee];r&&C({type:"root/setActiveValue",value:r.value,listFocused:!0});return}if("Escape"===e.key){C({type:"root/escape"}),q.current=!1,h&&h(null),null==(t=I.current)||t.focus();return}let r=e.target,o=D.current;if((o===r||(null==o?void 0:o.contains(r)))&&!oN.includes(e.key)){null==(n=I.current)||n.focus();return}},[O,Q,ee,h]),el=(0,e4.useCallback)(e=>{let t=e.currentTarget.value;C({type:"input/change",query:t}),h&&h(t)},[h]),es=(0,e4.useCallback)(e=>{!A&&(C({type:"input/focus"}),p&&p(e))},[A,p]),ed=(0,e4.useCallback)(()=>{q.current=!0},[]),eu=(0,e4.useCallback)(()=>{q.current=!1},[]),ec=(0,e4.useCallback)(()=>{var e;C({type:"root/clear"}),N.current="",f&&f(""),h&&h(null),null==(e=I.current)||e.focus()},[f,h]),ef=(0,e4.useCallback)(()=>{C({type:"input/focus"})},[]);(0,e4.useEffect)(()=>{if(P!==W.current){W.current=P,void 0!==P&&(C({type:"value/change",value:P}),N.current=P);return}P!==N.current&&(N.current=P||null,C({type:"value/change",value:P||null}))},[P]),(0,e4.useEffect)(()=>{!A&&N.current&&C({type:"root/setActiveValue",value:N.current})},[A]),(0,e4.useEffect)(()=>{let e=D.current;if(!e)return;let t=Q.find(e=>e.value===O);if(t){let n=Q.indexOf(t),r=e.childNodes[n];if(r){if(document.activeElement&&r.contains(document.activeElement))return;focusFirstDescendant(r)}}},[O,Q]);let ep=(0,e4.useCallback)(e=>{I.current=e,X.current=e},[X]),eh=(0,e4.useMemo)(()=>{if(!u&&!o&&V)return{"aria-label":"Clear",onFocus:ef}},[o,ef,u,V]),eb=(0,e4.useMemo)(()=>Y.map(e=>0===e?0:1===e||2===e?1:e-2),[Y]),eg=(0,e4.useMemo)(()=>Y.map(e=>Math.max(e-1,0)),[Y]),em=(0,e4.useMemo)(()=>"object"==typeof g?g:ts,[g]),ev=(0,e4.useCallback)(e=>{C({type:"root/open",query:V?R(V,J):""}),em.onClick&&em.onClick(e),_raf(()=>{var e;return null==(e=I.current)?void 0:e.focus()})},[J,em,R,V]),ey=(0,e4.useMemo)(()=>o||k||!g?void 0:(0,e5.jsx)(nk,{"aria-hidden":en,padding:eb,children:(0,e5.jsx)(nW,{"aria-label":"Open",disabled:en,fontSize:i,icon:e7.v4q,mode:"bleed",padding:eg,...em,onClick:ev})}),[o,en,i,ev,g,eb,eg,em,k]),ex=(0,e4.useMemo)(()=>null===M?null!==V?R(V,J):"":M,[J,M,R,V]),ew=(0,e5.jsx)(oj,{...z,"aria-activedescendant":et,"aria-autocomplete":"list","aria-expanded":en,"aria-owns":U,autoCapitalize:"off",autoComplete:"off",autoCorrect:"off",border:n,clearButton:eh,customValidity:r,disabled:o,fontSize:i,icon:l,iconRight:u&&oZ,id:s,inputMode:"search",onChange:el,onClear:ec,onFocus:es,padding:Y,prefix:x,radius:w,readOnly:k,ref:ep,role:"combobox",spell
1Check:!1,suffix:E||ey,value:ex}),ek=(0,e4.useCallback)(e=>{var t;"Tab"===e.key&&T&&(null==(t=I.current)||t.focus())},[T]),eS=(0,e4.useMemo)(()=>0===Q.length?null:(0,e5.jsx)(oI,{"data-ui":"AutoComplete__results",onKeyDown:ek,padding:1,...d,tabIndex:-1,children:(0,e5.jsx)(r9,{as:"ul","aria-multiselectable":!1,"data-ui":"AutoComplete__resultsList",id:U,ref:D,role:"listbox",space:1,children:Q.map(e=>{let t=null!==O?e.value===O:J===e;return(0,e5.jsx)(AutocompleteOption,{id:"".concat(s,"-option-").concat(e.value),onSelect:ea,selected:t,value:e.value,children:(0,e4.cloneElement)(F(e),{disabled:u,selected:t,tabIndex:T&&t?0:-1})},e.value)})})}),[O,J,Q,ea,ek,s,d,U,T,u,F]),e_=(0,e4.useMemo)(()=>j?j({content:eS,hidden:!en,inputElement:I.current,onMouseEnter:ed,onMouseLeave:eu},H):0===ee?null:(0,e5.jsx)(rN,{arrow:!1,constrainSize:!0,content:eS,fallbackPlacements:oW,matchReferenceWidth:!0,onMouseEnter:ed,onMouseLeave:eu,open:en,overflow:"auto",placement:"bottom-start",portal:!0,radius:w,ref:H,referenceElement:I.current,...y}),[eS,en,ee,ed,eu,y,w,j]);return(0,e5.jsxs)(oH,{"data-ui":"Autocomplete",onBlur:er,onFocus:eo,onKeyDown:ei,ref:G,children:[ew,e_]})}),oX=oq;var oU=Object.freeze,oK=Object.defineProperty,__template$c=(e,t)=>oU(oK(e,"raw",{value:oU(t||e.slice())}));let oY=e9.ZP.ol(ez||(ez=__template$c(["\n  margin: 0;\n  padding: 0;\n  display: flex;\n  list-style: none;\n  align-items: center;\n  white-space: nowrap;\n  line-height: 0;\n"]))),oJ=(0,e9.ZP)(nW)(e$||(e$=__template$c(["\n  appearance: none;\n  margin: -4px;\n"]))),oQ=(0,e4.forwardRef)(function(e,t){let{children:n,maxLength:r,separator:o,space:a=2,...i}=e,l=useArrayProp(a),[s,d]=(0,e4.useState)(!1),[u,c]=(0,e4.useState)(null),[f,p]=(0,e4.useState)(null),h=(0,e4.useCallback)(()=>d(!1),[]),b=(0,e4.useCallback)(()=>d(!0),[]);useClickOutside(h,[u,f]);let g=(0,e4.useMemo)(()=>e4.Children.toArray(n).filter(e=>(0,e4.isValidElement)(e)),[n]),m=(0,e4.useMemo)(()=>{let e=g.length;if(r&&e>r){let t=Math.ceil(r/2),n=Math.floor(r/2);return[...g.slice(0,t-1),(0,e5.jsx)(rN,{constrainSize:!0,content:(0,e5.jsx)(r9,{as:"ol",overflow:"auto",padding:l,space:l,children:g.slice(t-1,e-n)}),open:s,placement:"top",portal:!0,ref:p,children:(0,e5.jsx)(oJ,{fontSize:1,mode:"bleed",onClick:s?h:b,padding:1,ref:c,selected:s,text:"…"})},"button"),...g.slice(e-n)]}return g},[h,b,r,s,g,l]);return(0,e5.jsx)(oY,{"data-ui":"Breadcrumbs",...i,ref:t,children:m.map((e,t)=>(0,e5.jsxs)(e4.Fragment,{children:[t>0&&(0,e5.jsx)(nk,{"aria-hidden":!0,as:"li",paddingX:l,children:o||(0,e5.jsx)(no,{muted:!0,children:"/"})}),(0,e5.jsx)(nk,{as:"li",children:e})]},t))})}),o0=Symbol.for("@sanity/ui/context/dialog");tD[o0]=tD[o0]||(0,e4.createContext)({version:0});let o1=tD[o0];var o2=Object.freeze,o5=Object.defineProperty,__template$b=(e,t)=>o2(o5(e,"raw",{value:o2(t||e.slice())}));function isTargetWithinScope(e,t,n){return!e||!t||containsOrEqualsElement(e,n)||containsOrEqualsElement(t,n)}let o4=(0,e9.ZP)(rS)(responsivePaddingStyle,function(e){let{theme:t}=e,n=t.sanity.color.base;return{"&:not([hidden])":{display:"flex"},top:0,left:0,right:0,bottom:0,alignItems:"center",justifyContent:"center",outline:"none",background:n.shadow.umbra}},function(e){let{theme:t}=e,{media:n}=t.sanity;return _responsive(n,e.$position,e=>({"&&":{position:e}}))}),o3=(0,e9.ZP)(n7)(eC||(eC=__template$b(["\n  &:not([hidden]) {\n    display: flex;\n  }\n  width: 100%;\n  height: 100%;\n  flex-direction: column;\n  align-items: center;\n  justify-content: center;
1\n"]))),o9=(0,e9.ZP)(nK)(eO||(eO=__template$b(["\n  &:not([hidden]) {\n    display: flex;\n  }\n  width: 100%;\n  min-height: 0;\n  max-height: 100%;\n  overflow: hidden;\n  overflow: clip;\n"]))),o6=(0,e9.ZP)(nA)(eA||(eA=__template$b(["\n  flex: 1;\n  min-height: 0;\n  width: 100%;\n"]))),o7=(0,e9.ZP)(nK)(eT||(eT=__template$b(["\n  position: relative;\n  z-index: 2;\n\n  &:after {\n    content: '';\n    display: block;\n    position: absolute;\n    left: 0;\n    right: 0;\n    bottom: -1px;\n    border-bottom: 1px solid var(--card-hairline-soft-color);\n  }\n"]))),o8=(0,e9.ZP)(nk)(eM||(eM=__template$b(["\n  position: relative;\n  z-index: 1;\n  overflow: auto;\n  outline: none;\n"]))),ae=(0,e9.ZP)(nk)(eV||(eV=__template$b(["\n  position: relative;\n  z-index: 3;\n  border-top: 1px solid var(--card-hairline-soft-color);\n"]))),at=(0,e4.forwardRef)(function(e,t){var n;let{__unstable_autoFocus:r,__unstable_hideCloseButton:o,children:a,contentRef:i,footer:l,header:s,id:d,onClickOutside:u,onClose:c,portal:f,radius:p,scheme:h,shadow:b,width:g}=e,m=usePortal(),v=f?(null==(n=m.elements)?void 0:n[f])||null:m.element,y=useBoundaryElement().element,x=useArrayProp(p),w=useArrayProp(b),k=useArrayProp(g),S=useForwardedRef(t),[_,j]=(0,e4.useState)(null),R=(0,e4.useRef)(null),E=useLayer(),{isTopLayer:P}=E,z=!!c&&!1===o;(0,e4.useEffect)(()=>{r&&S.current&&focusFirstDescendant(S.current)},[r,S]),useGlobalKeyDown((0,e4.useCallback)(e=>{if(!P||!c)return;let t=document.activeElement;(!t||isTargetWithinScope(y,v,t))&&"Escape"===e.key&&(e.preventDefault(),e.stopPropagation(),c())},[y,P,c,v])),useClickOutside((0,e4.useCallback)(e=>{if(!P||!u)return;let t=e.target;(!t||isTargetWithinScope(y,v,t))&&u()},[y,P,u,v]),[_]);let $=(0,e4.useCallback)(e=>{j(e),S.current=e},[S]),C=(0,e4.useCallback)(e=>{R.current=e,"function"==typeof i?i(e):i&&(i.current=e)},[i]);return(0,e5.jsx)(o3,{"data-ui":"DialogCard",width:k,children:(0,e5.jsx)(o9,{radius:x,ref:$,scheme:h,shadow:w,children:(0,e5.jsxs)(o6,{direction:"column",children:[(!!s||z)&&(0,e5.jsx)(o7,{children:(0,e5.jsxs)(nA,{children:[(0,e5.jsx)(nk,{flex:1,padding:4,children:s&&(0,e5.jsx)(no,{id:"".concat(d,"_label"),weight:"semibold",children:s})}),z&&(0,e5.jsx)(nk,{padding:2,children:(0,e5.jsx)(nW,{"aria-label":"Close dialog",disabled:!c,icon:e7.Two,mode:"bleed",onClick:c,padding:3})})]})}),(0,e5.jsx)(o8,{flex:1,ref:C,tabIndex:-1,children:a}),l&&(0,e5.jsx)(ae,{children:l})]})})})}),an=(0,e4.forwardRef)(function(e,t){var n,r;let o=(0,e4.useContext)(o1),a=useTheme(),{__unstable_autoFocus:i=!0,__unstable_hideCloseButton:l=!1,cardRadius:s=3,cardShadow:d=4,children:u,contentRef:c,footer:f,header:p,id:h,onActivate:b,onClickOutside:g,onClose:m,onFocus:v,padding:y=4,portal:x,position:w=o.position||"fixed",scheme:k,width:S=0,zOffset:_=o.zOffset||(null==(n=a.sanity.layer)?void 0:n.dialog.zOffset),...j}=e,R=usePortal(),E=x?(null==(r=R.elements)?void 0:r[x])||null:R.element,P=useBoundaryElement().element,z=useArrayProp(s),$=useArrayProp(y),C=useArrayProp(w),O=useArrayProp(S),A=useArrayProp(_),T=(0,e4.useRef)(null),M=(0,e4.useRef)(null),V=(0,e4.useRef)(null),L=(0,e4.useRef)(null),F=(0,e4.useCallback)(e=>{null==v||v(e);let t=e.target,n=V.current;if(n&&t===T.current){!function focusLastDescendant(e){for(let t=e.childNodes.length-1;t>=0;t--){let n=e.childNodes[t];if(isHTMLElement(n)&&(attemptFocus(n)||focusLastDescendant(n)))return!0}return!1}(n);return}if(n&&t===M.current){focusFirstDescendant(n);return}isHTMLElement(e.target)&&(L.current=e.target)},[v]),B="".concat(h,"_label"),G=(0,e4.useRef)(),H=(0,e4.useCallback)(()=>{G.current&&clearTimeout(G.current),G.current=setTimeout(()=>{let e=document.activeElement;if(e&&!isTargetWithinScope(P,E,e)){let e=L.current;if(!e||!document.body.contains(e)){let e=V.current;e&&focusFirstDescendant(e);return}
1e.focus()}},0)},[P,E]);return(0,e5.jsx)(Portal,{__unstable_name:x,children:(0,e5.jsxs)(o4,{...j,$padding:$,$position:C,"aria-labelledby":B,"aria-modal":!0,"data-ui":"Dialog",id:h,onActivate:b,onClick:H,onFocus:F,ref:t,role:"dialog",zOffset:A,children:[(0,e5.jsx)("div",{ref:T,tabIndex:0}),(0,e5.jsx)(at,{__unstable_autoFocus:i,__unstable_hideCloseButton:l,contentRef:c,footer:f,header:p,id:h,onClickOutside:g,onClose:m,portal:x,radius:z,ref:V,scheme:k,shadow:d,width:O,children:u}),(0,e5.jsx)("div",{ref:M,tabIndex:0})]})})});function DialogProvider(e){let{children:t,position:n,zOffset:r}=e,o=(0,e4.useMemo)(()=>({version:0,position:n,zOffset:r}),[n,r]);return(0,e5.jsx)(o1.Provider,{value:o,children:t})}var ar=Object.freeze,ao=Object.defineProperty,__template$a=(e,t)=>ar(ao(e,"raw",{value:ar(t||e.slice())}));let aa=e9.ZP.kbd(eL||(eL=__template$a(["\n  &:not([hidden]) {\n    display: block;\n  }\n  font: inherit;\n"]))),ai=(0,e9.ZP)(rp)(eF||(eF=__template$a(["\n  &:not([hidden]) {\n    display: block;\n  }\n"]))),al=(0,e4.forwardRef)(function(e,t){let{fontSize:n,keys:r,padding:o,radius:a,space:i=1,...l}=e,s=useArrayProp(i);return r&&0!==r.length?(0,e5.jsx)(aa,{"data-ui":"Hotkeys",...l,ref:t,children:(0,e5.jsx)(rd,{as:"span",space:s,children:r.map((e,t)=>(0,e5.jsx)(ai,{fontSize:n,padding:o,radius:a,children:e},t))})}):(0,e5.jsx)(e5.Fragment,{})}),as=Symbol.for("@sanity/ui/context/menu");tD[as]=tD[as]||(0,e4.createContext)(null);let ad=tD[as];function _isFocusable(e){return isHTMLAnchorElement(e)&&"true"!==e.getAttribute("data-disabled")||isHTMLButtonElement(e)&&!e.disabled}function _getFocusableElements(e){return e.filter(_isFocusable)}let au=[];var ac=Object.freeze,af=Object.defineProperty;let ap=(0,e9.ZP)(nk)(eB||(eB=ac(af(h=["\n  outline: none;\n  overflow: auto;\n"],"raw",{value:ac(h.slice())})))),ah=(0,e4.forwardRef)(function(e,t){let{children:n,focusFirst:r,focusLast:o,onClickOutside:a,onEscape:i,onItemClick:l,onItemSelect:s,onKeyDown:d,originElement:u,padding:c=1,registerElement:f,shouldFocus:p=e.focusFirst&&"first"||e.focusLast&&"last"||null,space:h=1,...b}=e,g=useForwardedRef(t),{isTopLayer:m}=useLayer(),{activeElement:v,activeIndex:y,handleItemMouseEnter:x,handleItemMouseLeave:w,handleKeyDown:k,mount:S,rootElement:_,setRootElement:j}=function(e){let{onKeyDown:t,originElement:n,shouldFocus:r}=e,o=(0,e4.useRef)([]),[a,i]=(0,e4.useState)(null),[l,s]=(0,e4.useState)(-1),d=(0,e4.useRef)(l),u=o.current[l]||null,c=!!a,f=(0,e4.useCallback)(e=>{s(e),d.current=e},[]),p=(0,e4.useCallback)((e,t)=>{if(!e)return()=>void 0;if(-1===o.current.indexOf(e)&&(o.current.push(e),function(e,t){if(!e)return;let n=new WeakMap;for(let r of t)n.set(r,function(e,t){let n=[],r=t;for(;r!==e;){let t=r.parentElement;if(!t)break;let o=Array.from(t.childNodes),a=o.indexOf(r);if(n.unshift(a),t===e)break;r=t}return n}(e,r));t.sort((e,t)=>{let r=n.get(e)||au,o=n.get(t)||au,a=Math.max(r.length,o.length);for(let e=0;e<a;e+=1){let t=r[e]||-1,n=o[e]||-1;if(t!==n)return t-n}return 0})}(a,o.current)),t){let t=o.current.indexOf(e);f(t)}return()=>{let t=o.current.indexOf(e);t>-1&&o.current.splice(t,1)}},[a,f]),h=(0,e4.useCallback)(e=>{if("Tab"===e.key){n&&n.focus();return}if("Home"===e.key){e.preventDefault(),e.stopPropagation();let t=_getFocusableElements(o.current),n=t[0];if(!n)return;let r=o.current.indexOf(n);f(r);return}if("End"===e.key){e.preventDefault(),e.stopPropagation();let t=_getFocusableElements(o.current),n=t[t.length-1];if(!n)return;let r=o.current.indexOf(n);f(r);return}if("ArrowUp"===e.key){e.preventDefault(),e.stopPropagation();let t=_getFocusableElements(o.current),n=t.length;if(0===n)return;let r=o.current[d.current],a=t.indexOf(r);a=(a-1+n)%n;let i=t[a],l=o.current.indexOf(i);f(l);return}if("ArrowDown"===e.key){e.preventDefault(),e.stopPropagation();let t=_getFocusableElements(o.current),n=t.length;if(0===n)return;let r=o.current[d.current],a=t.indexOf(r);a=(a+1)%n;let i=t[a],l=o.current.indexOf(i);f(l);return}t&&t(e)},[t,n,f]),b=(0,e4.useCallback)(e=>{let t=e.currentTarget,n=o.current.indexOf(t);f(n)},[f]),g=(0,e4.useCallback)(()=>{f(-2),null==a||a.focus()}
1,[f,a]);return(0,e4.useEffect)(()=>{if(!c)return;let e=window.requestAnimationFrame(()=>{let e=d.current;if(-1===e){if("first"===r){let e=_getFocusableElements(o.current),t=e[0];if(t){let e=o.current.indexOf(t);f(e),d.current=e}}if("last"===r){let e=_getFocusableElements(o.current),t=e[e.length-1];if(t){let e=o.current.indexOf(t);f(e),d.current=e}}return}let t=o.current[e]||null;null==t||t.focus()});return()=>{window.cancelAnimationFrame(e)}},[l,c,f,r]),{activeElement:u,activeIndex:l,handleItemMouseEnter:b,handleItemMouseLeave:g,handleKeyDown:h,mount:p,rootElement:a,setRootElement:i}}({onKeyDown:d,originElement:u,shouldFocus:p}),R=(0,e4.useCallback)(e=>{j(e),g.current=e},[g,j]);(0,e4.useEffect)(()=>{s&&s(y)},[y,s]),useClickOutside((0,e4.useCallback)(e=>m&&a&&a(e),[m,a]),[_]),useGlobalKeyDown((0,e4.useCallback)(e=>{m&&"Escape"===e.key&&(e.stopPropagation(),i&&i())},[m,i])),(0,e4.useEffect)(()=>{if(_&&f)return f(_)},[f,_]);let E=(0,e4.useMemo)(()=>({version:0,activeElement:v,activeIndex:y,mount:S,onClickOutside:a,onEscape:i,onItemClick:l,onItemMouseEnter:x,onItemMouseLeave:w,registerElement:f,onMouseEnter:x,onMouseLeave:w}),[v,y,S,x,w,a,i,l,f]);return(0,e5.jsx)(ad.Provider,{value:E,children:(0,e5.jsx)(ap,{"data-ui":"Menu",...b,onKeyDown:k,padding:c,ref:R,role:"menu",tabIndex:-1,children:(0,e5.jsx)(r9,{space:h,children:n})})})}),ab=(0,e4.forwardRef)(function(e,t){let{__unstable_disableRestoreFocusOnClose:n=!1,boundaryElement:r,button:o,id:a,menu:i,onClose:l,onOpen:s,placement:d,popoverScheme:u,portal:c=!0,popover:f,popoverRadius:p,preventOverflow:h}=e,[b,g]=(0,e4.useState)(!1),[m,v]=(0,e4.useState)(null),[y,x]=(0,e4.useState)(null),[w,k]=(0,e4.useState)([]),S=(0,e4.useRef)(b);(0,e4.useEffect)(()=>{s&&b&&!S.current&&s()},[s,b]),(0,e4.useEffect)(()=>{l&&!b&&S.current&&l()},[l,b]),(0,e4.useEffect)(()=>{S.current=b},[b]);let _=(0,e4.useCallback)(()=>{g(e=>!e),v(null)},[]),j=(0,e4.useCallback)(e=>{if("ArrowDown"===e.key||"Enter"===e.key||" "===e.key){e.preventDefault(),g(!0),v("first");return}if("ArrowUp"===e.key){e.preventDefault(),g(!0),v("last");return}},[]),R=(0,e4.useCallback)(e=>{let t=e.target;if(!(!(t instanceof Node)||y&&(t===y||y.contains(t)))){for(let e of w)if(t===e||e.contains(t))return;g(!1)}},[y,w]),E=(0,e4.useCallback)(()=>{g(!1),!n&&y&&y.focus()},[y,n]),P=(0,e4.useCallback)(e=>{let t=e.relatedTarget;if(t instanceof Node){for(let e of w)if(e===t||e.contains(t))return;g(!1)}},[w]),z=(0,e4.useCallback)(()=>{g(!1),!n&&y&&y.focus()},[y,n]),$=(0,e4.useCallback)(e=>(k(t=>t.concat([e])),()=>{k(t=>t.filter(t=>t!==e))}),[]),C=(0,e4.useMemo)(()=>({"aria-labelledby":a,onBlurCapture:P,onClickOutside:R,onEscape:E,onItemClick:z,originElement:y,registerElement:$,shouldFocus:m}),[y,R,E,z,a,P,$,m]),O=(0,e3.isElement)(i)?(0,e4.cloneElement)(i,C):null,A=(0,e4.useCallback)(e=>{"function"==typeof t?t(e):t&&(t.current=e),x(e)},[t]),T=(0,e4.useMemo)(()=>(0,e3.isElement)(o)?(0,e4.cloneElement)(o,{"data-ui":"MenuButton",id:a,onClick:_,onKeyDown:j,"aria-haspopup":!0,"aria-expanded":b,ref:A,selected:b}):null,[o,_,j,a,b,A]),M=(0,e4.useMemo)(()=>({boundaryElement:r,overflow:"auto",placement:d,portal:c,preventOverflow:h,radius:p,scheme:u,...f||{}}),[r,d,p,u,c,h,f]);return(0,e5.jsx)(rN,{"data-ui":"MenuButton__popover",...M,content:O,open:b,children:T||(0,e5.jsx)(e5.Fragment,{})})});var ag=Object.freeze,am=Object.defineProperty;let av=e9.ZP.hr(eG||(eG=ag(am(b=["\n  height: 1px;\n  border: 0;\n  background: var(--card-hairline-soft-color);\n  margin: 0;\n"],"raw",{value:ag(b.slice())}))));var ay=Object.freeze,ax=Object.defineProperty,__template$7=(e,t)=>ay(ax(e,"raw",{value:ay(t||e.slice())}));let aw=(0,e9.ZP)(nk)(responsiveRadiusStyle,function(){return(0,e9.iv)(eH||(eH=__template$7(["\n    background-color: inherit;\n    color: inherit;\n\n    &[data-as='button'] {\n      -webkit-font-smoothing: inherit;\n      appearance: none;\n      outline: none;\n      font: inherit;\n      text-align: inherit;\n      border: 0;\n      width: stretch;\n    }\n\n    /* &:is(a) */\n    &[data-as='a'] {\n      text-decoration: none;\n    }\n  "])))},function(e){var t,n;
1let{$tone:r,theme:o}=e,{base:a,muted:i,selectable:l}=o.sanity.color,s=l?l[r]||l.default:i[r]||i.default;return(0,e9.iv)(eI||(eI=__template$7(["\n    ","\n\n    background-color: var(--card-bg-color);\n    color: var(--card-fg-color);\n    outline: none;\n\n    /* &:is(button) */\n    &[data-as='button'] {\n      &:disabled {\n        ","\n      }\n\n      &:not(:disabled) {\n        &[aria-pressed='true'] {\n          ","\n        }\n\n        &[data-selected],\n        &[aria-selected='true'] > & {\n          ","\n        }\n\n        @media (hover: hover) {\n          &:not([data-selected]) {\n            &[data-hovered],\n            &:hover {\n              ","\n            }\n\n            &:active {\n              ","\n            }\n          }\n        }\n      }\n    }\n\n    /* &:is(a) */\n    &[data-as='a'] {\n      &[data-disabled] {\n        ","\n      }\n\n      &:not([data-disabled]) {\n        &[data-pressed] {\n          ","\n        }\n\n        &[data-selected] {\n          ","\n        }\n\n        @media (hover: hover) {\n          &:not([data-selected]) {\n            &[data-hovered],\n            &:hover {\n              ","\n            }\n\n            &:active {\n              ","\n            }\n          }\n        }\n      }\n    }\n\n    ","\n  "])),_colorVarsStyle(a,s.enabled),_colorVarsStyle(a,s.disabled),_colorVarsStyle(a,s.pressed),_colorVarsStyle(a,s.selected),_colorVarsStyle(a,s.hovered),_colorVarsStyle(a,s.pressed),_colorVarsStyle(a,s.disabled),_colorVarsStyle(a,s.pressed),_colorVarsStyle(a,s.selected),_colorVarsStyle(a,s.hovered),_colorVarsStyle(a,s.pressed),null==(n=null==(t=o.sanity.styles)?void 0:t.card)?void 0:n.root)});function useMenu(){let e=(0,e4.useContext)(ad);if(!e)throw Error("useMenu(): missing context value");if(!isRecord(e)||0!==e.version)throw Error("useMenu(): the context value is not compatible");return e}function MenuGroup(e){let{as:t="button",children:n,fontSize:r,icon:o,onClick:a,padding:i=3,popover:l,radius:s=2,space:d=3,text:u,tone:c="default",...f}=e,p=useMenu(),{activeElement:h,mount:b,onClickOutside:g,onEscape:m,onItemClick:v,onItemMouseEnter:y=p.onMouseEnter,registerElement:x}=p,[w,k]=(0,e4.useState)(null),[S,_]=(0,e4.useState)(!1),j=(0,e4.useRef)(null),R=!!h&&h===w,[E,P]=(0,e4.useState)(!1),z=(0,e4.useCallback)(e=>{P(!1),y(e),_(!0)},[y]),$=(0,e4.useCallback)(e=>{"ArrowLeft"===e.key&&(e.stopPropagation(),_(!1),requestAnimationFrame(()=>{null==w||w.focus()}))},[w]),C=(0,e4.useCallback)(e=>{a&&a(e),j.current="first",_(!0),requestAnimationFrame(()=>{j.current=null})},[a]),O=(0,e4.useCallback)(()=>{_(!1),v&&v()},[v]),A=(0,e4.useCallback)(()=>P(!0),[]);(0,e4.useEffect)(()=>b(w),[b,w]),(0,e4.useEffect)(()=>{R||_(!1)},[R]),(0,e4.useEffect)(()=>{S||P(!1)},[S]);let T=(0,e5.jsx)(ah,{onClickOutside:g,onEscape:m,onItemClick:O,onKeyDown:$,onMouseEnter:A,registerElement:x,shouldFocus:j.current,children:n}),M=(0,e4.useCallback)(e=>{let t=e.currentTarget;if(document.activeElement===t&&"ArrowRight"===e.key){j.current="first",_(!0),P(!0),requestAnimationFrame(()=>{j.current=null});return}},[]);return(0,e5.jsx)(rN,{...l,content:T,"data-ui":"MenuGroup__popover",open:S,children:(0,e5.jsx)(aw,{"data-as":t,"data-ui":"MenuGroup",forwardedAs:t,...f,"aria-pressed":"button"===t?E:void 0,"data-pressed":"button"!==t?E:void 0,"data-selected":!E&&R?"":void 0,$radius:useArrayProp(s),$tone:c,onClick:C,onKeyDown:M,onMouseEnter:z,ref:k,tabIndex:-1,type:"button"===t?"button":void 0,children:(0,e5.jsx)(nk,{padding:i,children:(0,e5.jsxs)(nA,{children:[o&&(0,e5.jsxs)(no,{size:r,children:[(0,e4.isValidElement)(o)&&o,(0,e3.isValidElementType)(o)&&(0,e4.createElement)(o)]}),(0,e5.jsx)(nk,{flex:1,marginLeft:o?d:void 0,children:(0,e5.jsx)(no,{size:r,textOverflow:"ellipsis",children:u})}),(0,e5.jsx)(nk,{marginLeft:d,children:(0,e5.jsx)(no,{size:r,children:(0,e5.jsx)(e7.XCv,{})})})]})})})})}let ak=(0,e4.forwardRef)(function(e,t){let{as:n="button",children:r,disabled:o,fontSize:a=2,hotkeys:i,icon:l,iconRight:s,onClick:d,padding:u=3,paddingX:c,paddingY:f,paddingTop:p,paddingRight:h,paddingBottom:b,paddingLeft:g,pressed:m,radiu
1s:v=2,selected:y,space:x=3,text:w,tone:k="default",...S}=e,_=useMenu(),{activeElement:j,mount:R,onItemClick:E,onItemMouseEnter:P=_.onMouseEnter,onItemMouseLeave:z=_.onMouseLeave}=_,[$,C]=(0,e4.useState)(null),O=!!j&&j===$;(0,e4.useEffect)(()=>R($,y),[R,$,y]);let A=useForwardedRef(t),T=(0,e4.useCallback)(e=>{!o&&(d&&d(e),E&&E())},[o,d,E]),M=(0,e4.useMemo)(()=>({padding:u,paddingX:c,paddingY:f,paddingTop:p,paddingRight:h,paddingBottom:b,paddingLeft:g}),[u,c,f,p,h,b,g]),V=(0,e4.useCallback)(e=>{A.current=e,C(e)},[A]);return(0,e5.jsxs)(aw,{"data-ui":"MenuItem",...S,"aria-pressed":"button"===n&&m,"data-pressed":"button"!==n&&m?"":void 0,"data-selected":O?"":void 0,"data-disabled":o?"":void 0,forwardedAs:n,$radius:useArrayProp(v),$padding:useArrayProp(0),$tone:k,disabled:o,onClick:T,onMouseEnter:P,onMouseLeave:z,ref:V,role:"menuitem",tabIndex:-1,type:"button"===n?"button":void 0,children:[(l||w||s)&&(0,e5.jsx)(nk,{as:"span",...M,children:(0,e5.jsxs)(nA,{as:"span",children:[l&&(0,e5.jsxs)(no,{size:a,children:[(0,e4.isValidElement)(l)&&l,(0,e3.isValidElementType)(l)&&(0,e4.createElement)(l)]}),w&&(0,e5.jsx)(nk,{flex:1,marginLeft:l?x:void 0,marginRight:s?x:void 0,children:(0,e5.jsx)(no,{size:a,textOverflow:"ellipsis",children:w})}),i&&(0,e5.jsx)(nk,{marginLeft:x,style:{marginTop:-4,marginBottom:-4},children:(0,e5.jsx)(al,{fontSize:a,keys:i})}),s&&(0,e5.jsxs)(no,{size:a,children:[(0,e4.isValidElement)(s)&&s,(0,e3.isValidElementType)(s)&&(0,e4.createElement)(s)]})]})}),r&&(0,e5.jsx)(nk,{as:"span",...M,children:r})]})});var aS=Object.freeze,a_=Object.defineProperty,__template$6=(e,t)=>aS(a_(e,"raw",{value:aS(t||e.slice())}));let aj=(0,e9.F4)(eD||(eD=__template$6(["\n  0% {\n    background-position: 100%;\n  }\n  100% {\n    background-position: -100%;\n  }\n"]))),aR=(0,e9.iv)(eZ||(eZ=__template$6(["\n  background-image: linear-gradient(\n    to right,\n    var(--card-skeleton-color-from),\n    var(--card-skeleton-color-to),\n    var(--card-skeleton-color-from),\n    var(--card-skeleton-color-from),\n    var(--card-skeleton-color-from)\n  );\n  background-position: 100%;\n  background-size: 200% 100%;\n  background-attachment: fixed;\n  animation-name: ",";\n  animation-timing-function: ease-in-out;\n  animation-iteration-count: infinite;\n  animation-duration: 2000ms;\n"])),aj),aE=(0,e9.iv)(eW||(eW=__template$6(["\n  opacity: ",";\n  transition: opacity 200ms ease-in;\n\n  @media screen and (prefers-reduced-motion: no-preference) {\n    ","\n  }\n\n  @media screen and (prefers-reduced-motion: reduce) {\n    background-color: var(--card-skeleton-color-from);\n  }\n"])),e=>{let{$visible:t}=e;return t?1:0},e=>{let{$animated:t}=e;return t?aR:(0,e9.iv)(eN||(eN=__template$6(["\n            background-color: var(--card-skeleton-color-from);\n          "])))}),aP=(0,e9.ZP)(nk)(responsiveRadiusStyle,aE),az=(0,e4.forwardRef)(function(e,t){let{animated:n=!1,delay:r,radius:o,...a}=e,[i,l]=(0,e4.useState)(!r);return(0,e4.useEffect)(()=>{if(!r)return l(!0);let e=setTimeout(()=>{l(!0)},r);return()=>{clearTimeout(e)}},[r]),(0,e5.jsx)(aP,{...a,$animated:n,$radius:useArrayProp(o),$visible:i,ref:t})}),a$=(0,e9.ZP)(az)(e=>{let{$size:t,$style:n,theme:r}=e,{media:o}=r.sanity,a=r.sanity.fonts[n],i=_responsive(o,t,e=>{let t=a.sizes[e],n=t.lineHeight-t.ascenderHeight-t.descenderHeight;return{height:n}});return i}),aC=(0,e4.forwardRef)(function(e,t){let{size:n=2,...r}=e,o=useArrayProp(n);return(0,e5.jsx)(a$,{...r,$size:o,ref:t,$style:"text"})}),aO=(0,e4.forwardRef)(function(e,t){let{size:n=2,...r}=e,o=useArrayProp(n);return(0,e5.jsx)(a$,{...r,$size:o,ref:t,$style:"label"})});(0,e4.forwardRef)(function(e,t){let{size:n=2,...r}=e,o=useArrayProp(n);return(0,e5.jsx)(a$,{...r,$size:o,ref:t,$style:"heading"})}),(0,e4.forwardRef)(function(e,t){let{size:n=2,...r}=e,o=useArrayProp(n);return(0,e5.jsx)(a$,{...r,$size:o,ref:t,$style:"code"})});var aA=Object.freeze,aT=Object.defineProperty;let aM=(0,e9.ZP)(nW)(eq||(eq=aA(aT(g=["\n  max-width: 100%;\n"],"raw",{value:aA(g.slice())})))),aV=(0,e4.forwardRef)(function(e,t){let{icon:n,id:r,focused:o,fontSize:a,label:i,onClick:l,onFocus:s,padding:d=2,selected:u,...c}=e,f=(0,e4.useRef)(null),p=(0,e4.useRef)(!1),h=(0,e4.useCallback)(()=>{p.current=!1},[]),b=(0,e4.useCallback)(e=>{p.current=!0,s&&s(e)},[s]),g=useForwardedRef(t);return(0,e4.useEffect)(()=>{o&&!p.current&&(f.current&&f.current.focus(),p.current=!0)},[o]),(0,e5.jsx)(aM,{"data-ui":"Tab",...c,"aria-selected":u?"true":"false",fontSize:a,icon:n,id:r,mode:"bleed",onClick:l,onBlur:h,onFocus:b,padding:d,ref:e=>{f.current=e,g.current=e},role:"tab",selected:u,tabIndex:u?0:-1,text:i,type:"button"})});var aL=Object.freeze,aF=Object.defineProperty;function _isReactElement(e){return!!e}let aB=(0,e9.ZP)(rd)(eX||(eX=aL(aF(m=["\n  & > div {\n    display: inline-block;\n    vertical-align: middle;\n    max-width: 100%;\n    box-sizing: border-box;\n  }\n"],"raw",{value:aL(m.slice())})))),aG=(0,e4.forwardRef)(function(e,t){let{children:n,...r}=e,[o,a]=(0,e4.useState)(-1),i=(0,e4.useMemo)(()=>n.filter(_isReactElement),[n]),l=i.map((e,t)=>(0,e4.cloneElement)(e,{focused:o===t,key:t,onFocus:()=>d(t)})),s=l.length,d=(0,e4.useCallback)(e=>{a(e)},[]),u=(0,e4.useCallback)(e=>{"ArrowLeft"===e.key&&a(e=>(e+s-1)%s),"ArrowRight"===e.key&&a(e=>(e+1)%s)},[s]);return(0,e5.jsx)(aB,{"data-ui":"TabList",...r,onKeyDown:u,ref:t,role:"tablist",children:l})}),aH=(0,e4.forwardRef)(function(e,t){let{flex:n,...r}=e;return(0,e5.jsx)(nk,{"data-ui":"TabPanel",...r,flex:n,ref:t,role:"tabpanel",tabIndex:void 0===e.tabIndex?0:e.tabIndex,children:e.children})});var aI=Object.freeze,aD=Object.defineProperty,__template$3=(e,t)=>
1aI(aD(e,"raw",{value:aI(t||e.slice())}));let aZ={error:"critical",warning:"caution",success:"positive",info:"primary"},aN={error:"alert",warning:"alert",success:"alert",info:"alert"},aW=(0,e9.ZP)(nK)(eU||(eU=__template$3(["\n  pointer-events: all;\n"]))),aq=(0,e9.ZP)(nA)(eK||(eK=__template$3(["\n  overflow-x: auto;\n"])));function Toast(e){let{closable:t,description:n,onClose:r,title:o,status:a,...i}=e,l=a?aZ[a]:"default",s=a?aN[a]:"status";return(0,e5.jsx)(aW,{"data-ui":"Toast",role:s,...i,marginTop:3,radius:2,shadow:2,tone:l,children:(0,e5.jsxs)(nA,{align:"flex-start",children:[(0,e5.jsx)(aq,{flex:1,padding:3,children:(0,e5.jsxs)(r9,{space:3,children:[o&&(0,e5.jsx)(no,{weight:"semibold",children:o}),n&&(0,e5.jsx)(no,{muted:!0,size:1,children:n})]})}),t&&(0,e5.jsx)(nk,{padding:1,children:(0,e5.jsx)(nW,{as:"button",icon:e7.Two,mode:"bleed",padding:2,onClick:r,style:{verticalAlign:"top"}})})]})})}let aX=Symbol.for("@sanity/ui/context/toast");tD[aX]=tD[aX]||(0,e4.createContext)(null);let aU=tD[aX];var aK=Object.freeze,aY=Object.defineProperty,__template$2=(e,t)=>aK(aY(e,"raw",{value:aK(t||e.slice())}));let aJ=(0,e9.ZP)(rS)(eY||(eY=__template$2(["\n  position: fixed;\n  top: 0;\n  left: 0;\n  right: 0;\n  bottom: 0;\n  pointer-events: none;\n"]))),aQ=e9.ZP.div(eJ||(eJ=__template$2(["\n  box-sizing: border-box;\n  position: absolute;\n  right: 0;\n  bottom: 0;\n  max-width: 420px;\n  width: 100%;\n"]))),a0=0;function ToastProvider(e){let{children:t,padding:n=4,paddingX:r,paddingY:o,zOffset:a}=e,[i,l]=(0,e4.useState)([]),s=(0,e4.useRef)({}),d=(0,e4.useCallback)(e=>{let setState=e=>(0,e4.startTransition)(()=>l(e)),t=e.id||String(a0++),n=e.duration||5e3,dismiss=()=>{var e;let n=null==(e=s.current[t])?void 0:e.timeoutId;setState(e=>{let n=e.findIndex(e=>e.id===t);if(n>-1){let t=e.slice(0);return t.splice(n,1),t}return e}),void 0!==n&&(clearTimeout(n),delete s.current[t])};return setState(r=>r.filter(e=>e.id!==t).concat([{dismiss,id:t,params:{...e,duration:n}}])),s.current[t]&&(clearTimeout(s.current[t].timeoutId),delete s.current[t]),s.current[t]={timeoutId:setTimeout(dismiss,n)},t},[]);(0,e4.useEffect)(()=>()=>{for(let{timeoutId:e}of Object.values(s.current))clearTimeout(e);s.current={}},[]);let u=(0,e4.useMemo)(()=>({version:0,push:d}),[d]),c=function(){let[e,t]=(0,e4.useReducer)(()=>!0,!1);return(0,e4.useEffect)(t,[t]),e}();return(0,e5.jsxs)(aU.Provider,{value:u,children:[t,c&&(0,e5.jsx)(aJ,{"data-ui":"ToastProvider",zOffset:a,children:(0,e5.jsx)(aQ,{children:(0,e5.jsx)(nk,{padding:n,paddingX:r,paddingY:o,children:(0,e5.jsx)(ta.M,{initial:!1,children:i.map(e=>{let{dismiss:t,id:n,params:r}=e;return(0,e5.jsx)(ti.E.div,{animate:{opacity:1,y:0,scale:1},exit:{opacity:0,scale:.5,transition:{duration:.2}},initial:{opacity:0,y:32,scale:.25},layout:"position",transition:{type:"spring",damping:30,stiffness:400},children:(0,e5.jsx)(Toast,{closable:r.closable,description:r.description,onClose:t,status:r.status,title:r.title})},n)})})})})})]})}function useToast(){let e=(0,e4.useContext)(aU);if(!e)throw Error("useToast(): missing context value");if(!isRecord(e)||0!==e.version)throw Error("useToast(): the context value is not compatible");return e}function _focusItemElement(e){if("treeitem"===e.getAttribute("role")&&e.focus(),"none"===e.getAttribute("role")){let t=e.firstChild;t&&t instanceof HTMLElement&&t.focus()}}let a1=Symbol.for("@sanity/ui/context/tree");tD[a1]=tD[a1]||(0,e4.createContext)(null);let a2=tD[a1],a5=(0,e4.memo)((0,e4.forwardRef)(function(e,t){let{children:n,space:r=1,onFocus:o,...a}=e,i=useForwardedRef(t),[l,s]=(0,e4.useState)(null),d=(0,e4.useRef)(l),u=(0,e4.useMemo)(()=>[],[]),[c,f]=(0,e4.useState)([]),[p,h]=(0,e4.useState)({}),b=(0,e4.useRef)(p);(0,e4.useEffect)(()=>{d.current=l},[l]),(0,e4.useEffect)(()=>{b.current=p},[p]);let g=(0,e4.useCallback)((e,t,n,r)=>(h(r=>({...r,[t]:{element:e,expanded:n}})),r&&s(e),()=>{h(e=>{let n={...e};return delete n[t],n})}),[]),m=(0,e4.useCallback)((e,t)=>{h(n=>{let r=n[e];return r?{...n,[e]:{...r,expanded:t}}:n})},[]),v=(0,e4.useMemo)(()=>({version:0,focusedElement:l||c[0]||null,level:0,path:u,registerItem:g,setExpanded:m,setFocusedElement:s,space:r,state:p}),[l,c,u,g,m,r,p]),y=(0,e4.useCallback)(e=>{var t;if(d.current){if("ArrowDown"===e.key){e.preventDefault();let t=function(e,t,n){var r;let o=t.indexOf(n),a=t.slice(o),i=t.length;for(let t=1;t<i;t+=1){if(!a[t])continue;let n=a[t].getAttribute("data-tree-key");if(!n)continue;let o=n.split("/");o.pop();let i=[],l=!0;for(let t=0;t<o.length;t+=1){i.push(o[t]);let n=i.join("/");if(!(null==(r=e[n])?void 0:r.expanded)){l=!1;break}}if(l)return a[t]}return null}(b.current,c,d.current);
1t&&(_focusItemElement(t),s(t));return}if("ArrowUp"===e.key){e.preventDefault();let t=function(e,t,n){var r;let o=t.indexOf(n),a=t.slice(0,o),i=a.length;for(let t=i-1;t>=0;t-=1){let n=a[t].getAttribute("data-tree-key");if(!n)continue;let o=n.split("/");o.pop();let i=[],l=!0;for(let t=0;t<o.length;t+=1){i.push(o[t]);let n=i.join("/");if(!(null==(r=e[n])?void 0:r.expanded)){l=!1;break}}if(l)return a[t]}return null}(b.current,c,d.current);t&&(_focusItemElement(t),s(t));return}if("ArrowLeft"===e.key){e.preventDefault();let t=d.current.getAttribute("data-tree-key");if(!t)return;let n=b.current[t];if(!n)return;if(n.expanded)h(e=>{let n=e[t];return n?{...e,[t]:{...n,expanded:!1}}:e});else{let e=t.split("/");e.pop();let n=e.join("/"),r=n&&b.current[n];r&&(r.element.focus(),s(r.element))}return}if("ArrowRight"===e.key){e.preventDefault();let n=d.current.getAttribute("data-tree-key");if(!n)return;(null==(t=b.current[n])?void 0:t.expanded)||h(e=>{let t=e[n];return t?{...e,[n]:{...t,expanded:!0}}:e});return}}},[c]),x=(0,e4.useCallback)(e=>{s(e.target),null==o||o(e)},[o]);return(0,e4.useEffect)(()=>{if(!i.current)return;let e=Array.from(i.current.querySelectorAll('[data-ui="TreeItem"]'));f(e)},[n,i]),(0,e5.jsx)(a2.Provider,{value:v,children:(0,e5.jsx)(r9,{as:"ul","data-ui":"Tree",...a,onFocus:x,onKeyDown:y,ref:i,role:"tree",space:r,children:n})})}));a5.displayName="Tree";var a4=Object.freeze,a3=Object.defineProperty,__template$1=(e,t)=>a4(a3(e,"raw",{value:a4(t||e.slice())}));function useTree(){let e=(0,e4.useContext)(a2);if(!e)throw Error("Tree: missing context value");return e}let a9=(0,e4.memo)(function(e){let{children:t,expanded:n=!1,...r}=e,o=useTree();return(0,e5.jsx)(r9,{as:"ul","data-ui":"TreeGroup",...r,hidden:!n,marginTop:o.space,role:"group",space:o.space,children:t})});var a6=Object.freeze,a7=Object.defineProperty;let a8=(0,e4.memo)(e9.ZP.li(function(){return(0,e9.iv)(eQ||(eQ=__template$1(["\n    &[role='none'] > [role='treeitem'] {\n      outline: none;\n      cursor: default;\n      border-radius: 3px;\n\n      &:focus {\n        position: relative;\n      }\n    }\n\n    &[role='treeitem'] {\n      outline: none;\n\n      & > div {\n        cursor: default;\n        border-radius: 3px;\n      }\n\n      &:focus > div {\n        position: relative;\n      }\n    }\n  "])))},function(e){let{theme:t}=e,n="default",{base:r,muted:o,selectable:a}=t.sanity.color,i=a?a[n]||a.default:o[n]||o.default;return(0,e9.iv)(e0||(e0=__template$1(['\n    /* <div role="none"><a data-ui="TreeItem__box" role="treeitem" tabIndex="0"></div> */\n    &[role=\'none\'] {\n      & > [role=\'treeitem\'] {\n        ',"\n\n        background-color: var(--card-bg-color);\n        color: var(--treeitem-fg-color);\n      }\n\n      &[data-selected] > [role='treeitem'] {\n        ","\n      }\n\n      @media (hover: hover) {\n        &:not([data-selected]) > [role='treeitem']:not(:focus):hover {\n          ","\n        }\n\n        & > [role='treeitem']:focus {\n          ",'\n        }\n      }\n    }\n\n    /* <div role="treeitem" tabIndex="0"><div data-ui="TreeItem__box"></div> */\n    &[role=\'treeitem\'] {\n      & > [data-ui=\'TreeItem__box\'] {\n        ',"\n\n        background-color: var(--card-bg-color);\n        color: var(--card-fg-color);\n      }\n\n      &[data-selected] > [data-ui='TreeItem__box'] {\n        ","\n      }\n\n      @media (hover: hover) {\n        &:not([data-selected]):not(:focus) > [data-ui='TreeItem__box']:hover {\n          ","\n        }\n\n        &:focus > [data-ui='TreeItem__box'] {\n          ","\n        }\n      }\n    }\n  "])),_colorVarsStyle(r,i.enabled),_colorVarsStyle(r,i.pressed),_colorVarsStyle(r,i.hovered),_colorVarsStyle(r,i.selected),_colorVarsStyle(r,i.enabled),_colorVarsStyle(r,i.pressed),_colorVarsStyle(r,i.hovered),_colorVarsStyle(r,i.selected))})),ie=(0,e9.ZP)(nk).attrs({forwardedAs:"a"})(function(e){let{$level:t,theme:n}=e,{space:r}=n.sanity;return(0,e9.iv)(e1||(e1=__template$1(["\n    padding-left: ",";\n\n    &[data-as='a'] {\n      text-decoration: none;\n    }\n  "])),rem(r[2]*t))}),it=(0,e9.ZP)(no)(e2||(e2=a6(a7(v=["\n  & > svg {\n    transition: transform 100ms;\n  }\n"],"raw",{value:a6(v.slice())}))));(0,e4.memo)(function(e){let{children:t,expanded:n=!1,fontSize:r,href:o,icon:a,id:i,linkAs:l,muted:s,onClick:d,padding:u=3,selected:c=!1,space:f=2,text:p,weight:h,...b}=e,g=(0,e4.useRef)(null),m=(0,e4.useRef)(null),v=useTree(),{path:y,registerItem:x,setExpanded:w,setFocusedElement:k}=v,S=(0,e4.useId)(),_=i||S,j=(0,e4.useMemo)(()=>y.concat([_||""]),[_,y]),R=j.join("/"),E=v.state[R],P=v.focusedElement===g.current,z=(null==E?void 0:E.expanded)===void 0?n:(null==E?void 0:E.expanded)||!1,$=v.focusedElement&&v.focusedElement===g.current?0:-1,C=(0,e4.useMemo)(()=>({...v,level:v.level+1,path:j}),[j,v]),O=(0,e4.useCallback)(e=>{d&&d(e);let t=e.target;t instanceof HTMLElement&&("TreeItem"===t.getAttribute("data-ui")||t.closest('[data-ui="TreeItem__box"]'))&&(e.stopPropagation(),w(R,!z),k(g.current))},[z,R,d,w,k]),A=(0,e4.useCallback)(e=>{if(P&&"Enter"===e.key){let e=m.current||g.current;null==e||e.click()}},[P]);(0,e4.useEffect)(()=>
1{if(g.current)return x(g.current,j.join("/"),z,c)},[z,j,x,c]);let T=(0,e5.jsxs)(nA,{padding:u,children:[(0,e5.jsxs)(nk,{marginRight:f,style:{visibility:a||t?"visible":"hidden",pointerEvents:"none"},children:[a&&(0,e5.jsx)(no,{muted:s,size:r,weight:h,children:(0,e4.createElement)(a)}),!a&&(0,e5.jsx)(it,{muted:s,size:r,weight:h,children:(0,e5.jsx)(e7.tgp,{style:{transform:z?"rotate(90deg)":void 0}})})]}),(0,e5.jsx)(nk,{flex:1,children:(0,e5.jsx)(no,{muted:s,size:r,textOverflow:"ellipsis",weight:h,children:p})})]});return o?(0,e5.jsxs)(a8,{"data-selected":c?"":void 0,"data-tree-id":_,"data-tree-key":R,"data-ui":"TreeItem",...b,onClick:O,ref:g,role:"none",children:[(0,e5.jsx)(ie,{$level:v.level,"aria-expanded":z,as:l,"data-ui":"TreeItem__box",href:o,ref:m,role:"treeitem",tabIndex:$,children:T}),(0,e5.jsx)(a2.Provider,{value:C,children:t&&(0,e5.jsx)(a9,{hidden:!z,children:t})})]}):(0,e5.jsxs)(a8,{"data-selected":c?"":void 0,"data-ui":"TreeItem","data-tree-id":_,"data-tree-key":R,...b,"aria-expanded":z,onClick:O,onKeyDown:A,ref:g,role:"treeitem",tabIndex:$,children:[(0,e5.jsx)(ie,{$level:v.level,as:"div","data-ui":"TreeItem__box",children:T}),(0,e5.jsx)(a2.Provider,{value:C,children:t&&(0,e5.jsx)(a9,{expanded:z,children:t})})]})})}}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.