attraverso 0.6.1 → 0.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -11,35 +11,42 @@ Error generating stack: `+e.message+`
11
11
  `,`
12
12
  +`).split(`
13
13
  `));return[t,t.reduce((e,t)=>e.concat(...t),[])]}return[[],[]]},[e]);return(0,_.useEffect)(()=>{let n=t?.target??ql,c=t?.actInsideInputWithModifier??!0;if(e!==null){let e=e=>{if(i.current=e.ctrlKey||e.metaKey||e.shiftKey||e.altKey,(!i.current||i.current&&!c)&&Ss(e))return!1;let n=Xl(e.code,s);if(a.current.add(e[n]),Yl(o,a.current,!1)){let n=e.composedPath?.()?.[0]||e.target,a=n?.nodeName===`BUTTON`||n?.nodeName===`A`;t.preventDefault!==!1&&(i.current||!a)&&e.preventDefault(),r(!0)}},l=e=>{let t=Xl(e.code,s);Yl(o,a.current,!0)?(r(!1),a.current.clear()):a.current.delete(e[t]),e.key===`Meta`&&a.current.clear(),i.current=!1},u=()=>{a.current.clear(),r(!1)};return n?.addEventListener(`keydown`,e),n?.addEventListener(`keyup`,l),window.addEventListener(`blur`,u),window.addEventListener(`contextmenu`,u),()=>{n?.removeEventListener(`keydown`,e),n?.removeEventListener(`keyup`,l),window.removeEventListener(`blur`,u),window.removeEventListener(`contextmenu`,u)}}},[e,r]),n}function Yl(e,t,n){return e.filter(e=>n||e.length===t.size).some(e=>e.every(e=>t.has(e)))}function Xl(e,t){return t.includes(e)?`code`:`key`}var Zl=()=>{let e=G();return(0,_.useMemo)(()=>({zoomIn:async t=>{let{panZoom:n}=e.getState();return n?n.scaleBy(1.2,t):!1},zoomOut:async t=>{let{panZoom:n}=e.getState();return n?n.scaleBy(1/1.2,t):!1},zoomTo:async(t,n)=>{let{panZoom:r}=e.getState();return r?r.scaleTo(t,n):!1},getZoom:()=>e.getState().transform[2],setViewport:async(t,n)=>{let{transform:[r,i,a],panZoom:o}=e.getState();return o?(await o.setViewport({x:t.x??r,y:t.y??i,zoom:t.zoom??a},n),!0):!1},getViewport:()=>{let[t,n,r]=e.getState().transform;return{x:t,y:n,zoom:r}},setCenter:async(t,n,r)=>e.getState().setCenter(t,n,r),fitBounds:async(t,n)=>{let{width:r,height:i,minZoom:a,maxZoom:o,panZoom:s}=e.getState(),c=cs(t,r,i,a,o,n?.padding??.1);return s?(await s.setViewport(c,{duration:n?.duration,ease:n?.ease,interpolate:n?.interpolate}),!0):!1},screenToFlowPosition:(t,n={})=>{let{transform:r,snapGrid:i,snapToGrid:a,domNode:o}=e.getState();if(!o)return t;let{x:s,y:c}=o.getBoundingClientRect(),l={x:t.x-s,y:t.y-c},u=n.snapGrid??i;return rs(l,r,n.snapToGrid??a,u)},flowToScreenPosition:t=>{let{transform:n,domNode:r}=e.getState();if(!r)return t;let{x:i,y:a}=r.getBoundingClientRect(),o=is(t,n);return{x:o.x+i,y:o.y+a}}}),[])};function Ql(e,t){let n=[],r=new Map,i=[];for(let t of e)if(t.type===`add`){i.push(t);continue}else if(t.type===`remove`||t.type===`replace`)r.set(t.id,[t]);else{let e=r.get(t.id);e?e.push(t):r.set(t.id,[t])}for(let e of t){let t=r.get(e.id);if(!t){n.push(e);continue}if(t[0].type===`remove`)continue;if(t[0].type===`replace`){n.push({...t[0].item});continue}let i={...e};for(let e of t)$l(e,i);n.push(i)}return i.length&&i.forEach(e=>{e.index===void 0?n.push({...e.item}):n.splice(e.index,0,{...e.item})}),n}function $l(e,t){switch(e.type){case`select`:t.selected=e.selected;break;case`position`:e.position!==void 0&&(t.position=e.position),e.dragging!==void 0&&(t.dragging=e.dragging);break;case`dimensions`:e.dimensions!==void 0&&(t.measured={...e.dimensions},e.setAttributes&&((e.setAttributes===!0||e.setAttributes===`width`)&&(t.width=e.dimensions.width),(e.setAttributes===!0||e.setAttributes===`height`)&&(t.height=e.dimensions.height))),typeof e.resizing==`boolean`&&(t.resizing=e.resizing)}}function eu(e,t){return Ql(e,t)}function tu(e,t){return Ql(e,t)}function nu(e,t){return{id:e,type:`select`,selected:t}}function ru(e,t=new Set){let n=[];for(let[r,i]of e){let e=t.has(r);(i.selected!==void 0||e)&&i.selected!==e&&n.push(nu(i.id,e))}return n}function iu({items:e=[],lookup:t}){let n=[],r=new Map(e.map(e=>[e.id,e]));for(let[r,i]of e.entries()){let e=t.get(i.id),a=e?.internals?.userNode??e;a!==void 0&&a!==i&&n.push({id:i.id,item:i,type:`replace`}),a===void 0&&n.push({item:i,type:`add`,index:r})}for(let[e]of t)r.get(e)===void 0&&n.push({id:e,type:`remove`});return n}function au(e){return{id:e.id,type:`remove`}}var ou=ts(`React Flow`,`https://reactflow.dev/`);function su(e,t,n={}){return Fs(e,t,{...n,onError:n.onError??ou})}var cu=e=>ko(e),lu=e=>Oo(e);function uu(e){return(0,_.forwardRef)(e)}var du=typeof window<`u`?_.useLayoutEffect:_.useEffect;function fu(e){let[t,n]=(0,_.useState)(BigInt(0)),[r]=(0,_.useState)(()=>pu(()=>n(e=>e+BigInt(1))));return du(()=>{let t=r.get();t.length&&(e(t),r.reset())},[t]),r}function pu(e){let t=[];return{get:()=>t,reset:()=>{t=[]},push:n=>{t.push(n),e()}}}var mu=(0,_.createContext)(null);function hu({children:e}){let t=G(),n=fu((0,_.useCallback)(e=>{let{nodes:n=[],setNodes:r,hasDefaultNodes:i,onNodesChange:a,nodeLookup:o,fitViewQueued:s,onNodesChangeMiddlewareMap:c}=t.getState(),l=n;for(let t of e)l=typeof t==`function`?t(l):t;let u=iu({items:l,lookup:o});for(let e of c.values())u=e(u);i&&r(l),u.length>0?a?.(u):s&&window.requestAnimationFrame(()=>{let{fitViewQueued:e,nodes:n,setNodes:r}=t.getState();e&&r(n)})},[])),r=fu((0,_.useCallback)(e=>{let{edges:n=[],setEdges:r,hasDefaultEdges:i,onEdgesChange:a,edgeLookup:o}=t.getState(),s=n;for(let t of e)s=typeof t==`function`?t(s):t;i?r(s):a&&a(iu({items:s,lookup:o}))},[])),i=(0,_.useMemo)(()=>({nodeQueue:n,edgeQueue:r}),[]);return(0,b.jsx)(mu.Provider,{value:i,children:e})}function gu(){let e=(0,_.useContext)(mu);if(!e)throw Error(`useBatchContext must be used within a BatchProvider`);return e}var _u=e=>!!e.panZoom;function vu(){let e=Zl(),t=G(),n=gu(),r=W(_u),i=(0,_.useMemo)(()=>{let e=e=>t.getState().nodeLookup.get(e),r=e=>{n.nodeQueue.push(e)},i=e=>{n.edgeQueue.push(e)},a=e=>{let{nodeLookup:n,nodeOrigin:r}=t.getState(),i=cu(e)?e:n.get(e.id),a=i.parentId?ps(i.position,i.measured,i.parentId,n,r):i.position;return Jo({...i,position:a,width:i.measured?.width??i.width,height:i.measured?.height??i.height},i.parentId?void 0:r)},o=(e,t,n={replace:!1})=>{r(r=>r.map(r=>{if(r.id===e){let e=typeof t==`function`?t(r):t;return n.replace&&cu(e)?e:{...r,...e}}return r}))},s=(e,t,n={replace:!1})=>{i(r=>r.map(r=>{if(r.id===e){let e=typeof t==`function`?t(r):t;return n.replace&&lu(e)?e:{...r,...e}}return r}))};return{getNodes:()=>t.getState().nodes.map(e=>({...e})),getNode:t=>e(t)?.internals.userNode,getInternalNode:e,getEdges:()=>{let{edges:e=[]}=t.getState();return e.map(e=>({...e}))},getEdge:e=>t.getState().edgeLookup.get(e),setNodes:r,setEdges:i,addNodes:e=>{let t=Array.isArray(e)?e:[e];n.nodeQueue.push(e=>[...e,...t])},addEdges:e=>{let t=Array.isArray(e)?e:[e];n.edgeQueue.push(e=>[...e,...t])},toObject:()=>{let{nodes:e=[],edges:n=[],transform:r}=t.getState(),[i,a,o]=r;return{nodes:e.map(e=>({...e})),edges:n.map(e=>({...e})),viewport:{x:i,y:a,zoom:o}}},deleteElements:async({nodes:e=[],edges:n=[]})=>{let{nodes:r,edges:i,onNodesDelete:a,onEdgesDelete:o,triggerNodeChanges:s,triggerEdgeChanges:c,onDelete:l,onBeforeDelete:u}=t.getState(),{nodes:d,edges:f}=await zo({nodesToRemove:e,edgesToRemove:n,nodes:r,edges:i,onBeforeDelete:u}),p=f.length>0,m=d.length>0;if(p){let e=f.map(au);o?.(f),c(e)}if(m){let e=d.map(au);a?.(d),s(e)}return(m||p)&&l?.({nodes:d,edges:f}),{deletedNodes:d,deletedEdges:f}},getIntersectingNodes:(e,n=!0,r)=>{let i=$o(e),o=i?e:a(e),s=r!==void 0;if(!o)return[];let{nodeOrigin:c}=t.getState();return(r||t.getState().nodes).filter(r=>{let a=t.getState().nodeLookup.get(r.id);if(a&&!i&&(r.id===e.id||!a.internals.positionAbsolute))return!1;let l=Jo(s?r:a,c),u=Qo(l,o);return n&&u>0||u>=l.width*l.height||u>=o.width*o.height})},isNodeIntersecting:(e,t,n=!0)=>{let r=$o(e)?e:a(e);if(!r)return!1;let i=Qo(r,t);return n&&i>0||i>=t.width*t.height||i>=r.width*r.height},updateNode:o,updateNodeData:(e,t,n={replace:!1})=>{o(e,e=>{let r=typeof t==`function`?t(e):t;return n.replace?{...e,data:r}:{...e,data:{...e.data,...r}}},n)},updateEdge:s,updateEdgeData:(e,t,n={replace:!1})=>{s(e,e=>{let r=typeof t==`function`?t(e):t;return n.replace?{...e,data:r}:{...e,data:{...e.data,...r}}},n)},getNodesBounds:e=>{let{nodeLookup:n,nodeOrigin:r}=t.getState();return Mo(e,{nodeLookup:n,nodeOrigin:r})},getHandleConnections:({type:e,id:n,nodeId:r})=>Array.from(t.getState().connectionLookup.get(`${r}-${e}${n?`-${n}`:``}`)?.values()??[]),getNodeConnections:({type:e,handleId:n,nodeId:r})=>Array.from(t.getState().connectionLookup.get(`${r}${e?n?`-${e}-${n}`:`-${e}`:``}`)?.values()??[]),fitView:async e=>{let r=t.getState().fitViewResolver??hs();return t.setState({fitViewQueued:!0,fitViewOptions:e,fitViewResolver:r}),n.nodeQueue.push(e=>[...e]),r.promise}}},[]);return(0,_.useMemo)(()=>({...i,...e,viewportInitialized:r}),[r])}var yu=e=>e.selected,bu=typeof window<`u`?window:void 0;function xu({deleteKeyCode:e,multiSelectionKeyCode:t}){let n=G(),{deleteElements:r}=vu(),i=Jl(e,{actInsideInputWithModifier:!1}),a=Jl(t,{target:bu});(0,_.useEffect)(()=>{if(i){let{edges:e,nodes:t}=n.getState();r({nodes:t.filter(yu),edges:e.filter(yu)}),n.setState({nodesSelectionActive:!1})}},[i]),(0,_.useEffect)(()=>{n.setState({multiSelectionActive:a})},[a])}function Su(e){let t=G();(0,_.useEffect)(()=>{let n=()=>{if(!e.current||!(e.current.checkVisibility?.()??!0))return!1;let n=ys(e.current);(n.height===0||n.width===0)&&t.getState().onError?.(`004`,_o.error004()),t.setState({width:n.width||500,height:n.height||500})};if(e.current){n(),window.addEventListener(`resize`,n);let t=new ResizeObserver(()=>n());return t.observe(e.current),()=>{window.removeEventListener(`resize`,n),t.disconnect()}}},[])}var Cu={position:`absolute`,width:`100%`,height:`100%`,top:0,left:0},wu=e=>({userSelectionActive:e.userSelectionActive,lib:e.lib,connectionInProgress:e.connection.inProgress});function Tu({onPaneContextMenu:e,zoomOnScroll:t=!0,zoomOnPinch:n=!0,panOnScroll:r=!1,panActivationKeyPressed:i,panOnScrollSpeed:a=.5,panOnScrollMode:o=So.Free,zoomOnDoubleClick:s=!0,panOnDrag:c=!0,defaultViewport:l,translateExtent:u,minZoom:d,maxZoom:f,zoomActivationKeyCode:p,preventScrolling:m=!0,children:h,noWheelClassName:g,noPanClassName:v,onViewportChange:y,isControlledViewport:x,paneClickDistance:S,selectionOnDrag:C}){let w=G(),T=(0,_.useRef)(null),{userSelectionActive:E,lib:D,connectionInProgress:O}=W(wu,gl),k=Jl(p),A=(0,_.useRef)();Su(T);let j=(0,_.useCallback)(e=>{y?.({x:e[0],y:e[1],zoom:e[2]}),x||w.setState({transform:e})},[y,x]);return(0,_.useEffect)(()=>{if(T.current){A.current=Wc({domNode:T.current,minZoom:d,maxZoom:f,translateExtent:u,viewport:l,onDraggingChange:e=>w.setState(t=>t.paneDragging===e?t:{paneDragging:e}),onPanZoomStart:(e,t)=>{let{onViewportChangeStart:n,onMoveStart:r}=w.getState();r?.(e,t),n?.(t)},onPanZoom:(e,t)=>{let{onViewportChange:n,onMove:r}=w.getState();r?.(e,t),n?.(t)},onPanZoomEnd:(e,t)=>{let{onViewportChangeEnd:n,onMoveEnd:r}=w.getState();r?.(e,t),n?.(t)}});let{x:e,y:t,zoom:n}=A.current.getViewport();return w.setState({panZoom:A.current,transform:[e,t,n],domNode:T.current.closest(`.react-flow`)}),()=>{A.current?.destroy()}}},[]),(0,_.useEffect)(()=>{A.current?.update({onPaneContextMenu:e,zoomOnScroll:t,zoomOnPinch:n,panOnScroll:r,panActivationKeyPressed:i,panOnScrollSpeed:a,panOnScrollMode:o,zoomOnDoubleClick:s,panOnDrag:c,zoomActivationKeyPressed:k,preventScrolling:m,noPanClassName:v,userSelectionActive:E,noWheelClassName:g,lib:D,onTransformChange:j,connectionInProgress:O,selectionOnDrag:C,paneClickDistance:S})},[e,t,n,r,i,a,o,s,c,k,m,v,E,g,D,j,O,C,S]),(0,b.jsx)(`div`,{className:`react-flow__renderer`,ref:T,style:Cu,children:h})}var Eu=e=>({userSelectionActive:e.userSelectionActive,userSelectionRect:e.userSelectionRect});function Du(){let{userSelectionActive:e,userSelectionRect:t}=W(Eu,gl);return e&&t?(0,b.jsx)(`div`,{className:`react-flow__selection react-flow__container`,style:{width:t.width,height:t.height,transform:`translate(${t.x}px, ${t.y}px)`}}):null}var Ou=(e,t)=>n=>{n.target===t.current&&e?.(n)},ku=e=>({userSelectionActive:e.userSelectionActive,elementsSelectable:e.elementsSelectable,dragging:e.paneDragging,panBy:e.panBy,autoPanSpeed:e.autoPanSpeed});function Au({isSelecting:e,selectionKeyPressed:t,selectionMode:n=Co.Full,panOnDrag:r,autoPanOnSelection:i,paneClickDistance:a,selectionOnDrag:o,onSelectionStart:s,onSelectionEnd:c,onPaneClick:l,onPaneContextMenu:u,onPaneScroll:d,onPaneMouseEnter:f,onPaneMouseMove:p,onPaneMouseLeave:m,children:h}){let g=(0,_.useRef)(0),v=G(),{userSelectionActive:y,elementsSelectable:S,dragging:C,panBy:w,autoPanSpeed:T}=W(ku,gl),E=S&&(e||y),D=(0,_.useRef)(null),O=(0,_.useRef)(),k=(0,_.useRef)(new Set),A=(0,_.useRef)(new Set),j=(0,_.useRef)(!1),M=(0,_.useRef)(!1),N=(0,_.useRef)({x:0,y:0}),P=(0,_.useRef)(!1),F=e=>{if(M.current||j.current||v.getState().connection.inProgress){M.current=!1,j.current=!1;return}let{connectionClickStartHandle:t,connection:n,onClickConnectEnd:r,resetSelectedElements:i}=v.getState();if(t){let t=structuredClone(n);delete t.inProgress,t.toPosition=t.toHandle?t.toHandle.position:null,r?.(e.nativeEvent,t),v.setState({connectionClickStartHandle:null})}l?.(e),i(),v.setState({nodesSelectionActive:!1})},I=e=>{Array.isArray(r)&&r?.includes(2)?e.preventDefault():u?.(e)},L=d?e=>d(e):void 0,ee=e=>{M.current&&=(e.stopPropagation(),!1)},R=n=>{if(n.pointerType===`touch`&&r!==!1&&!t)return;let{domNode:i,transform:a}=v.getState();if(O.current=i?.getBoundingClientRect(),!O.current)return;let s=n.target===D.current;if(!s&&n.target.closest(`.nokey`)||!e||!(o&&s||t)||n.button!==0||!n.isPrimary)return;n.target?.setPointerCapture?.(n.pointerId),M.current=!1;let{x:c,y:l}=ws(n.nativeEvent,O.current),u=rs({x:c,y:l},a);v.setState({userSelectionRect:{width:0,height:0,startX:u.x,startY:u.y,x:c,y:l}}),s||(n.stopPropagation(),n.preventDefault())};function te(e,t){let{userSelectionRect:r}=v.getState();if(!r)return;let{transform:i,nodeLookup:a,edgeLookup:o,connectionLookup:s,triggerNodeChanges:c,triggerEdgeChanges:l,defaultEdgeOptions:u}=v.getState(),d={x:r.startX,y:r.startY},{x:f,y:p}=is(d,i),m={startX:d.x,startY:d.y,x:e<f?e:f,y:t<p?t:p,width:Math.abs(e-f),height:Math.abs(t-p)},h=k.current,g=A.current;k.current=new Set(Po(a,m,i,n===Co.Partial,!0).map(e=>e.id)),A.current=new Set;let _=u?.selectable??!0;for(let e of k.current){let t=s.get(e);if(t)for(let{edgeId:e}of t.values()){let t=o.get(e);t&&(t.selectable??_)&&A.current.add(e)}}ms(h,k.current)||c(ru(a,k.current)),ms(g,A.current)||l(ru(o,A.current)),v.setState({userSelectionRect:m,userSelectionActive:!0,nodesSelectionActive:!1})}function ne(){if(!i||!O.current)return;let[e,t]=Wo(N.current,O.current,T);w({x:e,y:t}).then(e=>{if(!M.current||!e){g.current=requestAnimationFrame(ne);return}let{x:t,y:n}=N.current;te(t,n),g.current=requestAnimationFrame(ne)})}let re=()=>{cancelAnimationFrame(g.current),g.current=0,P.current=!1};(0,_.useEffect)(()=>()=>re(),[]);let ie=e=>{let{userSelectionRect:n,transform:r,resetSelectedElements:i}=v.getState();if(!O.current||!n)return;let{x:o,y:c}=ws(e.nativeEvent,O.current);N.current={x:o,y:c};let l=is({x:n.startX,y:n.startY},r);if(!M.current){let n=t?0:a;if(Math.hypot(o-l.x,c-l.y)<=n)return;i(),s?.(e)}M.current=!0,P.current||=(ne(),!0),te(o,c)},ae=e=>{E?e.button===0&&(e.target?.releasePointerCapture?.(e.pointerId),!y&&e.target===D.current&&v.getState().userSelectionRect&&F?.(e),v.setState({userSelectionActive:!1,userSelectionRect:null}),M.current&&(c?.(e),v.setState({nodesSelectionActive:k.current.size>0})),re()):e.target===D.current&&v.getState().connection.inProgress&&(j.current=!0)},oe=e=>{e.target?.releasePointerCapture?.(e.pointerId),re()},se=r===!0||Array.isArray(r)&&r.includes(0);return(0,b.jsxs)(`div`,{className:x([`react-flow__pane`,{draggable:se,dragging:C,selection:e}]),onClick:E?void 0:Ou(F,D),onContextMenu:Ou(I,D),onWheel:Ou(L,D),onPointerEnter:E?void 0:f,onPointerMove:E?ie:p,onPointerUp:ae,onPointerCancel:E?oe:void 0,onPointerDownCapture:E?R:void 0,onClickCapture:E?ee:void 0,onPointerLeave:m,ref:D,style:Cu,children:[h,(0,b.jsx)(Du,{})]})}function ju({id:e,store:t,unselect:n=!1,nodeRef:r}){let{addSelectedNodes:i,unselectNodesAndEdges:a,multiSelectionActive:o,nodeLookup:s,onError:c}=t.getState(),l=s.get(e);l?(t.setState({nodesSelectionActive:!1}),l.selected?(n||l.selected&&o)&&(a({nodes:[l],edges:[]}),requestAnimationFrame(()=>r?.current?.blur())):i([e])):c?.(`012`,_o.error012(e))}function Mu({nodeRef:e,disabled:t=!1,noDragClassName:n,handleSelector:r,nodeId:i,isSelectable:a,nodeClickDistance:o}){let s=G(),[c,l]=(0,_.useState)(!1),u=(0,_.useRef)();return(0,_.useEffect)(()=>{if(!t)return u.current=bc({getStoreItems:()=>s.getState(),onNodeMouseDown:t=>{ju({id:t,store:s,nodeRef:e})},onDragStart:()=>{l(!0)},onDragStop:()=>{l(!1)}}),()=>{u.current?.destroy(),u.current=void 0}},[t,s,e]),(0,_.useEffect)(()=>{!t&&e.current&&u.current&&u.current.update({noDragClassName:n,handleSelector:r,domNode:e.current,isSelectable:a,nodeId:i,nodeClickDistance:o})},[n,r,t,a,e,i,o]),c}var Nu=e=>t=>t.selected&&(t.draggable||e&&t.draggable===void 0);function Pu(){let e=G();return(0,_.useCallback)(t=>{let{nodeExtent:n,snapToGrid:r,snapGrid:i,nodesDraggable:a,onError:o,updateNodePositions:s,nodeLookup:c,nodeOrigin:l}=e.getState(),u=new Map,d=Nu(a),f=r?i[0]:5,p=r?i[1]:5,m=t.direction.x*f*t.factor,h=t.direction.y*p*t.factor;for(let[,e]of c){if(!d(e))continue;let t={x:e.internals.positionAbsolute.x+m,y:e.internals.positionAbsolute.y+h};r&&(t=ns(t,i));let{position:a,positionAbsolute:s}=Ro({nodeId:e.id,nextPosition:t,nodeLookup:c,nodeExtent:n,nodeOrigin:l,onError:o});e.position=a,e.internals.positionAbsolute=s,u.set(e.id,e)}s(u)},[])}var Fu=(0,_.createContext)(null),Iu=Fu.Provider;Fu.Consumer;var Lu=()=>(0,_.useContext)(Fu),Ru=e=>({connectOnClick:e.connectOnClick,noPanClassName:e.noPanClassName,rfId:e.rfId}),zu=(0,_.createContext)(null);function Bu({children:e}){let t=W(Ru,gl);return(0,b.jsx)(zu.Provider,{value:t,children:e})}function Vu(){let e=(0,_.useContext)(zu);if(!e)throw Error(`useHandleConfig must be used within a HandleConfigProvider`);return e}var Hu={connectingFrom:!1,connectingTo:!1,clickConnecting:!1,isPossibleEndHandle:!0,connectionInProcess:!1,clickConnectionInProcess:!1,valid:!1},Uu=(e,t,n)=>r=>{let{connectionClickStartHandle:i,connectionMode:a,connection:o}=r,{fromHandle:s,toHandle:c,isValid:l}=o;if(!s&&!i)return Hu;let u=c?.nodeId===e&&c?.id===t&&c?.type===n;return{connectingFrom:s?.nodeId===e&&s?.id===t&&s?.type===n,connectingTo:u,clickConnecting:i?.nodeId===e&&i?.id===t&&i?.type===n,isPossibleEndHandle:a===xo.Strict?s?.type!==n:e!==s?.nodeId||t!==s?.id,connectionInProcess:!!s,clickConnectionInProcess:!!i,valid:u&&l}};function Wu({type:e=`source`,position:t=V.Top,isValidConnection:n,isConnectable:r=!0,isConnectableStart:i=!0,isConnectableEnd:a=!0,id:o,onConnect:s,children:c,className:l,onMouseDown:u,onTouchStart:d,...f},p){let m=o||null,h=e===`target`,g=G(),_=Lu(),{connectOnClick:v,noPanClassName:y,rfId:S}=Vu(),{connectingFrom:C,connectingTo:w,clickConnecting:T,isPossibleEndHandle:E,connectionInProcess:D,clickConnectionInProcess:O,valid:k}=W(Uu(_,m,e),gl);_||g.getState().onError?.(`010`,_o.error010());let A=e=>{let{defaultEdgeOptions:t,onConnect:n,hasDefaultEdges:r}=g.getState(),i={...t,...e};if(r){let{edges:e,setEdges:t,onError:n}=g.getState();t(su(i,e,{onError:n}))}n?.(i),s?.(i)},j=e=>{if(!_)return;let t=Cs(e.nativeEvent);if(i&&(t&&e.button===0||!t)){let t=g.getState();kc.onPointerDown(e.nativeEvent,{handleDomNode:e.currentTarget,autoPanOnConnect:t.autoPanOnConnect,connectionMode:t.connectionMode,connectionRadius:t.connectionRadius,domNode:t.domNode,nodeLookup:t.nodeLookup,lib:t.lib,isTarget:h,handleId:m,nodeId:_,flowId:t.rfId,panBy:t.panBy,cancelConnection:t.cancelConnection,onConnectStart:t.onConnectStart,onConnectEnd:(...e)=>g.getState().onConnectEnd?.(...e),updateConnection:t.updateConnection,onConnect:A,isValidConnection:n||((...e)=>g.getState().isValidConnection?.(...e)??!0),getTransform:()=>g.getState().transform,getFromHandle:()=>g.getState().connection.fromHandle,autoPanSpeed:t.autoPanSpeed,dragThreshold:t.connectionDragThreshold})}t?u?.(e):d?.(e)};return(0,b.jsx)(`div`,{"data-handleid":m,"data-nodeid":_,"data-handlepos":t,"data-id":`${S}-${_}-${m}-${e}`,className:x([`react-flow__handle`,`react-flow__handle-${t}`,`nodrag`,y,l,{source:!h,target:h,connectable:r,connectablestart:i,connectableend:a,clickconnecting:T,connectingfrom:C,connectingto:w,valid:k,connectionindicator:r&&(!D||E)&&(D||O?a:i)}]),onMouseDown:j,onTouchStart:j,onClick:v?t=>{let{onClickConnectStart:r,onClickConnectEnd:a,connectionClickStartHandle:o,connectionMode:s,isValidConnection:c,lib:l,rfId:u,nodeLookup:d,connection:f}=g.getState();if(!_||!o&&!i)return;if(!o){r?.(t.nativeEvent,{nodeId:_,handleId:m,handleType:e}),g.setState({connectionClickStartHandle:{nodeId:_,type:e,id:m}});return}let p=bs(t.target),h=n||c,{connection:v,isValid:y}=kc.isValid(t.nativeEvent,{handle:{nodeId:_,id:m,type:e},connectionMode:s,fromNodeId:o.nodeId,fromHandleId:o.id||null,fromType:o.type,isValidConnection:h,flowId:u,doc:p,lib:l,nodeLookup:d});y&&v&&A(v);let b=structuredClone(f);delete b.inProgress,b.toPosition=b.toHandle?b.toHandle.position:null,a?.(t,b),g.setState({connectionClickStartHandle:null})}:void 0,ref:p,...f,children:c})}var Gu=(0,_.memo)(uu(Wu));function Ku({data:e,isConnectable:t,sourcePosition:n=V.Bottom}){return(0,b.jsxs)(b.Fragment,{children:[e?.label,(0,b.jsx)(Gu,{type:`source`,position:n,isConnectable:t})]})}function qu({data:e,isConnectable:t,targetPosition:n=V.Top,sourcePosition:r=V.Bottom}){return(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(Gu,{type:`target`,position:n,isConnectable:t}),e?.label,(0,b.jsx)(Gu,{type:`source`,position:r,isConnectable:t})]})}function Ju(){return null}function Yu({data:e,isConnectable:t,targetPosition:n=V.Top}){return(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(Gu,{type:`target`,position:n,isConnectable:t}),e?.label]})}var Xu={ArrowUp:{x:0,y:-1},ArrowDown:{x:0,y:1},ArrowLeft:{x:-1,y:0},ArrowRight:{x:1,y:0}},Zu={input:Ku,default:qu,output:Yu,group:Ju};function Qu(e){return e.internals.handleBounds===void 0?{width:e.width??e.initialWidth??e.style?.width,height:e.height??e.initialHeight??e.style?.height}:{width:e.width??e.style?.width,height:e.height??e.style?.height}}var $u=e=>{let{width:t,height:n,x:r,y:i}=No(e.nodeLookup,{filter:e=>!!e.selected});return{width:es(t)?t:null,height:es(n)?n:null,userSelectionActive:e.userSelectionActive,transformString:`translate(${e.transform[0]}px,${e.transform[1]}px) scale(${e.transform[2]}) translate(${r}px,${i}px)`}};function ed({onSelectionContextMenu:e,noPanClassName:t,disableKeyboardA11y:n}){let r=G(),{width:i,height:a,transformString:o,userSelectionActive:s}=W($u,gl),c=Pu(),l=(0,_.useRef)(null);(0,_.useEffect)(()=>{n||l.current?.focus({preventScroll:!0})},[n]);let u=!s&&i!==null&&a!==null;if(Mu({nodeRef:l,disabled:!u}),!u)return null;let d=e?t=>{e(t,r.getState().nodes.filter(e=>e.selected))}:void 0;return(0,b.jsx)(`div`,{className:x([`react-flow__nodesselection`,`react-flow__container`,t]),style:{transform:o},children:(0,b.jsx)(`div`,{ref:l,className:`react-flow__nodesselection-rect`,onContextMenu:d,tabIndex:n?void 0:-1,onKeyDown:n?void 0:e=>{Object.prototype.hasOwnProperty.call(Xu,e.key)&&(e.preventDefault(),c({direction:Xu[e.key],factor:e.shiftKey?4:1}))},style:{width:i,height:a}})})}var td=typeof window<`u`?window:void 0,nd=e=>({nodesSelectionActive:e.nodesSelectionActive,userSelectionActive:e.userSelectionActive});function rd({children:e,onPaneClick:t,onPaneMouseEnter:n,onPaneMouseMove:r,onPaneMouseLeave:i,onPaneContextMenu:a,onPaneScroll:o,paneClickDistance:s,deleteKeyCode:c,selectionKeyCode:l,selectionOnDrag:u,selectionMode:d,onSelectionStart:f,onSelectionEnd:p,multiSelectionKeyCode:m,panActivationKeyCode:h,zoomActivationKeyCode:g,elementsSelectable:_,zoomOnScroll:v,zoomOnPinch:y,panOnScroll:x,panOnScrollSpeed:S,panOnScrollMode:C,zoomOnDoubleClick:w,panOnDrag:T,autoPanOnSelection:E,defaultViewport:D,translateExtent:O,minZoom:k,maxZoom:A,preventScrolling:j,onSelectionContextMenu:M,noWheelClassName:N,noPanClassName:P,disableKeyboardA11y:F,onViewportChange:I,isControlledViewport:L}){let{nodesSelectionActive:ee,userSelectionActive:R}=W(nd,gl),te=Jl(l,{target:td}),ne=Jl(h,{target:td}),re=ne||T,ie=ne||x,ae=u&&re!==!0,oe=te||R||ae;return xu({deleteKeyCode:c,multiSelectionKeyCode:m}),(0,b.jsx)(Tu,{onPaneContextMenu:a,elementsSelectable:_,zoomOnScroll:v,zoomOnPinch:y,panOnScroll:ie,panActivationKeyPressed:ne,panOnScrollSpeed:S,panOnScrollMode:C,zoomOnDoubleClick:w,panOnDrag:!te&&re,defaultViewport:D,translateExtent:O,minZoom:k,maxZoom:A,zoomActivationKeyCode:g,preventScrolling:j,noWheelClassName:N,noPanClassName:P,onViewportChange:I,isControlledViewport:L,paneClickDistance:s,selectionOnDrag:ae,children:(0,b.jsxs)(Au,{onSelectionStart:f,onSelectionEnd:p,onPaneClick:t,onPaneMouseEnter:n,onPaneMouseMove:r,onPaneMouseLeave:i,onPaneContextMenu:a,onPaneScroll:o,panOnDrag:re,autoPanOnSelection:E,isSelecting:!!oe,selectionMode:d,selectionKeyPressed:te,paneClickDistance:s,selectionOnDrag:ae,children:[e,ee&&(0,b.jsx)(ed,{onSelectionContextMenu:M,noPanClassName:P,disableKeyboardA11y:F})]})})}rd.displayName=`FlowRenderer`;var id=(0,_.memo)(rd),ad=e=>t=>e?Po(t.nodeLookup,{x:0,y:0,width:t.width,height:t.height},t.transform,!0).map(e=>e.id):Array.from(t.nodeLookup.keys());function od(e){return W((0,_.useCallback)(ad(e),[e]),gl)}var sd=e=>e.updateNodeInternals;function cd(){let e=W(sd),[t]=(0,_.useState)(()=>typeof ResizeObserver>`u`?null:new ResizeObserver(t=>{let n=new Map;t.forEach(e=>{let t=e.target.getAttribute(`data-id`);n.set(t,{id:t,nodeElement:e.target,force:!0})}),e(n)}));return(0,_.useEffect)(()=>()=>{t?.disconnect()},[t]),t}function ld({node:e,nodeType:t,hasDimensions:n,resizeObserver:r}){let i=G(),a=(0,_.useRef)(null),o=(0,_.useRef)(null),s=(0,_.useRef)(e.sourcePosition),c=(0,_.useRef)(e.targetPosition),l=(0,_.useRef)(t),u=n&&!!e.internals.handleBounds;return(0,_.useEffect)(()=>{!a.current||e.hidden||u&&o.current===a.current||(o.current&&r?.unobserve(o.current),r?.observe(a.current),o.current=a.current)},[u,e.hidden]),(0,_.useEffect)(()=>()=>{o.current&&=(r?.unobserve(o.current),null)},[]),(0,_.useEffect)(()=>{if(a.current){let n=l.current!==t,r=s.current!==e.sourcePosition,o=c.current!==e.targetPosition;(n||r||o)&&(l.current=t,s.current=e.sourcePosition,c.current=e.targetPosition,i.getState().updateNodeInternals(new Map([[e.id,{id:e.id,nodeElement:a.current,force:!0}]])))}},[e.id,t,e.sourcePosition,e.targetPosition]),a}function ud({id:e,onClick:t,onMouseEnter:n,onMouseMove:r,onMouseLeave:i,onContextMenu:a,onDoubleClick:o,nodesDraggable:s,elementsSelectable:c,nodesConnectable:l,nodesFocusable:u,resizeObserver:d,noDragClassName:f,noPanClassName:p,disableKeyboardA11y:m,rfId:h,nodeTypes:g,nodeClickDistance:_,onError:v}){let{node:y,internals:S,isParent:C}=W(t=>{let n=t.nodeLookup.get(e),r=t.parentLookup.has(e);return{node:n,internals:n.internals,isParent:r}},gl),w=y.type||`default`,T=g?.[w]||Zu[w];T===void 0&&(v?.(`003`,_o.error003(w)),w=`default`,T=g?.default||Zu.default);let E=!!(y.draggable||s&&y.draggable===void 0),D=!!(y.selectable||c&&y.selectable===void 0),O=!!(y.connectable||l&&y.connectable===void 0),k=!!(y.focusable||u&&y.focusable===void 0),A=G(),j=fs(y),M=ld({node:y,nodeType:w,hasDimensions:j,resizeObserver:d}),N=Mu({nodeRef:M,disabled:y.hidden||!E,noDragClassName:f,handleSelector:y.dragHandle,nodeId:e,isSelectable:D,nodeClickDistance:_}),P=Pu();if(y.hidden)return null;let F=ds(y),I=Qu(y),L=D||E||t||n||r||i,ee=n?e=>n(e,{...S.userNode}):void 0,R=r?e=>r(e,{...S.userNode}):void 0,te=i?e=>i(e,{...S.userNode}):void 0,ne=a?e=>a(e,{...S.userNode}):void 0,re=o?e=>o(e,{...S.userNode}):void 0,ie=n=>{let{selectNodesOnDrag:r,nodeDragThreshold:i}=A.getState();D&&(!r||!E||i>0)&&ju({id:e,store:A,nodeRef:M}),t&&t(n,{...S.userNode})},ae=t=>{if(!(Ss(t.nativeEvent)||m)){if(yo.includes(t.key)&&D){let n=t.key===`Escape`;ju({id:e,store:A,unselect:n,nodeRef:M})}else if(E&&y.selected&&Object.prototype.hasOwnProperty.call(Xu,t.key)){t.preventDefault();let{ariaLabelConfig:e}=A.getState();A.setState({ariaLiveMessage:e[`node.a11yDescription.ariaLiveMessage`]({direction:t.key.replace(`Arrow`,``).toLowerCase(),x:~~S.positionAbsolute.x,y:~~S.positionAbsolute.y})}),P({direction:Xu[t.key],factor:t.shiftKey?4:1})}}},oe=()=>{if(m||!M.current?.matches(`:focus-visible`))return;let{transform:t,width:n,height:r,autoPanOnNodeFocus:i,setCenter:a}=A.getState();i&&(Po(new Map([[e,y]]),{x:0,y:0,width:n,height:r},t,!0).length>0||a(y.position.x+F.width/2,y.position.y+F.height/2,{zoom:t[2]}))};return(0,b.jsx)(`div`,{className:x([`react-flow__node`,`react-flow__node-${w}`,{[p]:E},y.className,{selected:y.selected,selectable:D,parent:C,draggable:E,dragging:N}]),ref:M,style:{zIndex:S.z,transform:`translate(${S.positionAbsolute.x}px,${S.positionAbsolute.y}px)`,pointerEvents:L?`all`:`none`,visibility:j?`visible`:`hidden`,...y.style,...I},"data-id":e,"data-testid":`rf__node-${e}`,onMouseEnter:ee,onMouseMove:R,onMouseLeave:te,onContextMenu:ne,onClick:ie,onDoubleClick:re,onKeyDown:k?ae:void 0,tabIndex:k?0:void 0,onFocus:k?oe:void 0,role:y.ariaRole??(k?`group`:void 0),"aria-roledescription":`node`,"aria-describedby":m?void 0:`${Cl}-${h}`,"aria-label":y.ariaLabel,...y.domAttributes,children:(0,b.jsx)(Iu,{value:e,children:(0,b.jsx)(T,{id:e,data:y.data,type:w,positionAbsoluteX:S.positionAbsolute.x,positionAbsoluteY:S.positionAbsolute.y,selected:y.selected??!1,selectable:D,draggable:E,deletable:y.deletable??!0,isConnectable:O,sourcePosition:y.sourcePosition,targetPosition:y.targetPosition,dragging:N,dragHandle:y.dragHandle,zIndex:S.z,parentId:y.parentId,...F})})})}var dd=(0,_.memo)(ud),fd=e=>({nodesConnectable:e.nodesConnectable,nodesFocusable:e.nodesFocusable,elementsSelectable:e.elementsSelectable,onError:e.onError});function pd(e){let{nodesConnectable:t,nodesFocusable:n,elementsSelectable:r,onError:i}=W(fd,gl),a=od(e.onlyRenderVisibleElements),o=cd();return(0,b.jsx)(`div`,{className:`react-flow__nodes`,style:Cu,children:a.map(a=>(0,b.jsx)(dd,{id:a,nodeTypes:e.nodeTypes,nodeExtent:e.nodeExtent,onClick:e.onNodeClick,onMouseEnter:e.onNodeMouseEnter,onMouseMove:e.onNodeMouseMove,onMouseLeave:e.onNodeMouseLeave,onContextMenu:e.onNodeContextMenu,onDoubleClick:e.onNodeDoubleClick,noDragClassName:e.noDragClassName,noPanClassName:e.noPanClassName,rfId:e.rfId,disableKeyboardA11y:e.disableKeyboardA11y,resizeObserver:o,nodesDraggable:e.nodesDraggable??!0,nodesConnectable:t,nodesFocusable:n,elementsSelectable:r,nodeClickDistance:e.nodeClickDistance,onError:i},a))})}pd.displayName=`NodeRenderer`;var md=(0,_.memo)(pd);function hd(e){return W((0,_.useCallback)(t=>{if(!e)return t.edges.map(e=>e.id);let n=[];if(t.width&&t.height)for(let e of t.edges){let r=t.nodeLookup.get(e.source),i=t.nodeLookup.get(e.target);r&&i&&Ms({sourceNode:r,targetNode:i,width:t.width,height:t.height,transform:t.transform})&&n.push(e.id)}return n},[e]),gl)}var gd=({color:e=`none`,strokeWidth:t=1})=>{let n={strokeWidth:t,...e&&{stroke:e}};return(0,b.jsx)(`polyline`,{className:`arrow`,style:n,strokeLinecap:`round`,fill:`none`,strokeLinejoin:`round`,points:`-5,-4 0,0 -5,4`})},_d=({color:e=`none`,strokeWidth:t=1})=>{let n={strokeWidth:t,...e&&{stroke:e,fill:e}};return(0,b.jsx)(`polyline`,{className:`arrowclosed`,style:n,strokeLinecap:`round`,strokeLinejoin:`round`,points:`-5,-4 0,0 -5,4 -5,-4`})},vd={[Eo.Arrow]:gd,[Eo.ArrowClosed]:_d};function yd(e){let t=G();return(0,_.useMemo)(()=>Object.prototype.hasOwnProperty.call(vd,e)?vd[e]:(t.getState().onError?.(`009`,_o.error009(e)),null),[e])}var bd=({id:e,type:t,color:n,width:r=12.5,height:i=12.5,markerUnits:a=`strokeWidth`,strokeWidth:o,orient:s=`auto-start-reverse`})=>{let c=yd(t);return c?(0,b.jsx)(`marker`,{className:`react-flow__arrowhead`,id:e,markerWidth:`${r}`,markerHeight:`${i}`,viewBox:`-10 -10 20 20`,markerUnits:a,orient:s,refX:`0`,refY:`0`,children:(0,b.jsx)(c,{color:n,strokeWidth:o})}):null},xd=({defaultColor:e,rfId:t})=>{let n=W(e=>e.edges),r=W(e=>e.defaultEdgeOptions),i=(0,_.useMemo)(()=>Xs(n,{id:t,defaultColor:e,defaultMarkerStart:r?.markerStart,defaultMarkerEnd:r?.markerEnd}),[n,r,t,e]);return i.length?(0,b.jsx)(`svg`,{className:`react-flow__marker`,"aria-hidden":`true`,children:(0,b.jsx)(`defs`,{children:i.map(e=>(0,b.jsx)(bd,{id:e.id,type:e.type,color:e.color,width:e.width,height:e.height,markerUnits:e.markerUnits,strokeWidth:e.strokeWidth,orient:e.orient},e.id))})}):null};xd.displayName=`MarkerDefinitions`;var Sd=(0,_.memo)(xd);function Cd({x:e,y:t,label:n,labelStyle:r,labelShowBg:i=!0,labelBgStyle:a,labelBgPadding:o=[2,4],labelBgBorderRadius:s=2,children:c,className:l,...u}){let[d,f]=(0,_.useState)({x:1,y:0,width:0,height:0}),p=x([`react-flow__edge-textwrapper`,l]),m=(0,_.useRef)(null);return(0,_.useEffect)(()=>{if(m.current){let e=m.current.getBBox();f({x:e.x,y:e.y,width:e.width,height:e.height})}},[n]),n?(0,b.jsxs)(`g`,{transform:`translate(${e-d.width/2} ${t-d.height/2})`,className:p,visibility:d.width?`visible`:`hidden`,...u,children:[i&&(0,b.jsx)(`rect`,{width:d.width+2*o[0],x:-o[0],y:-o[1],height:d.height+2*o[1],className:`react-flow__edge-textbg`,style:a,rx:s,ry:s}),(0,b.jsx)(`text`,{className:`react-flow__edge-text`,y:d.height/2,dy:`0.3em`,ref:m,style:r,children:n}),c]}):null}Cd.displayName=`EdgeText`;var wd=(0,_.memo)(Cd);function Td({path:e,labelX:t,labelY:n,label:r,labelStyle:i,labelShowBg:a,labelBgStyle:o,labelBgPadding:s,labelBgBorderRadius:c,interactionWidth:l=20,...u}){return(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(`path`,{...u,d:e,fill:`none`,className:x([`react-flow__edge-path`,u.className])}),l?(0,b.jsx)(`path`,{d:e,fill:`none`,strokeOpacity:0,strokeWidth:l,className:`react-flow__edge-interaction`}):null,r&&es(t)&&es(n)?(0,b.jsx)(wd,{x:t,y:n,label:r,labelStyle:i,labelShowBg:a,labelBgStyle:o,labelBgPadding:s,labelBgBorderRadius:c}):null]})}function Ed({pos:e,x1:t,y1:n,x2:r,y2:i}){return e===V.Left||e===V.Right?[.5*(t+r),n]:[t,.5*(n+i)]}function Dd({sourceX:e,sourceY:t,sourcePosition:n=V.Bottom,targetX:r,targetY:i,targetPosition:a=V.Top}){let[o,s]=Ed({pos:n,x1:e,y1:t,x2:r,y2:i}),[c,l]=Ed({pos:a,x1:r,y1:i,x2:e,y2:t}),[u,d,f,p]=Es({sourceX:e,sourceY:t,targetX:r,targetY:i,sourceControlX:o,sourceControlY:s,targetControlX:c,targetControlY:l});return[`M${e},${t} C${o},${s} ${c},${l} ${r},${i}`,u,d,f,p]}function Od(e){return(0,_.memo)(({id:t,sourceX:n,sourceY:r,targetX:i,targetY:a,sourcePosition:o,targetPosition:s,label:c,labelStyle:l,labelShowBg:u,labelBgStyle:d,labelBgPadding:f,labelBgBorderRadius:p,style:m,markerEnd:h,markerStart:g,interactionWidth:_})=>{let[v,y,x]=Dd({sourceX:n,sourceY:r,sourcePosition:o,targetX:i,targetY:a,targetPosition:s}),S=e.isInternal?void 0:t;return(0,b.jsx)(Td,{id:S,path:v,labelX:y,labelY:x,label:c,labelStyle:l,labelShowBg:u,labelBgStyle:d,labelBgPadding:f,labelBgBorderRadius:p,style:m,markerEnd:h,markerStart:g,interactionWidth:_})})}var kd=Od({isInternal:!1}),Ad=Od({isInternal:!0});kd.displayName=`SimpleBezierEdge`,Ad.displayName=`SimpleBezierEdgeInternal`;function jd(e){return(0,_.memo)(({id:t,sourceX:n,sourceY:r,targetX:i,targetY:a,label:o,labelStyle:s,labelShowBg:c,labelBgStyle:l,labelBgPadding:u,labelBgBorderRadius:d,style:f,sourcePosition:p=V.Bottom,targetPosition:m=V.Top,markerEnd:h,markerStart:g,pathOptions:_,interactionWidth:v})=>{let[y,x,S]=Us({sourceX:n,sourceY:r,sourcePosition:p,targetX:i,targetY:a,targetPosition:m,borderRadius:_?.borderRadius,offset:_?.offset,stepPosition:_?.stepPosition}),C=e.isInternal?void 0:t;return(0,b.jsx)(Td,{id:C,path:y,labelX:x,labelY:S,label:o,labelStyle:s,labelShowBg:c,labelBgStyle:l,labelBgPadding:u,labelBgBorderRadius:d,style:f,markerEnd:h,markerStart:g,interactionWidth:v})})}var Md=jd({isInternal:!1}),Nd=jd({isInternal:!0});Md.displayName=`SmoothStepEdge`,Nd.displayName=`SmoothStepEdgeInternal`;function Pd(e){return(0,_.memo)(({id:t,...n})=>{let r=e.isInternal?void 0:t;return(0,b.jsx)(Md,{...n,id:r,pathOptions:(0,_.useMemo)(()=>({borderRadius:0,offset:n.pathOptions?.offset}),[n.pathOptions?.offset])})})}var Fd=Pd({isInternal:!1}),Id=Pd({isInternal:!0});Fd.displayName=`StepEdge`,Id.displayName=`StepEdgeInternal`;function Ld(e){return(0,_.memo)(({id:t,sourceX:n,sourceY:r,targetX:i,targetY:a,label:o,labelStyle:s,labelShowBg:c,labelBgStyle:l,labelBgPadding:u,labelBgBorderRadius:d,style:f,markerEnd:p,markerStart:m,interactionWidth:h})=>{let[g,_,v]=Is({sourceX:n,sourceY:r,targetX:i,targetY:a}),y=e.isInternal?void 0:t;return(0,b.jsx)(Td,{id:y,path:g,labelX:_,labelY:v,label:o,labelStyle:s,labelShowBg:c,labelBgStyle:l,labelBgPadding:u,labelBgBorderRadius:d,style:f,markerEnd:p,markerStart:m,interactionWidth:h})})}var Rd=Ld({isInternal:!1}),zd=Ld({isInternal:!0});Rd.displayName=`StraightEdge`,zd.displayName=`StraightEdgeInternal`;function Bd(e){return(0,_.memo)(({id:t,sourceX:n,sourceY:r,targetX:i,targetY:a,sourcePosition:o=V.Bottom,targetPosition:s=V.Top,label:c,labelStyle:l,labelShowBg:u,labelBgStyle:d,labelBgPadding:f,labelBgBorderRadius:p,style:m,markerEnd:h,markerStart:g,pathOptions:_,interactionWidth:v})=>{let[y,x,S]=ks({sourceX:n,sourceY:r,sourcePosition:o,targetX:i,targetY:a,targetPosition:s,curvature:_?.curvature}),C=e.isInternal?void 0:t;return(0,b.jsx)(Td,{id:C,path:y,labelX:x,labelY:S,label:c,labelStyle:l,labelShowBg:u,labelBgStyle:d,labelBgPadding:f,labelBgBorderRadius:p,style:m,markerEnd:h,markerStart:g,interactionWidth:v})})}var Vd=Bd({isInternal:!1}),Hd=Bd({isInternal:!0});Vd.displayName=`BezierEdge`,Hd.displayName=`BezierEdgeInternal`;var Ud={default:Hd,straight:zd,step:Id,smoothstep:Nd,simplebezier:Ad},Wd={sourceX:null,sourceY:null,targetX:null,targetY:null,sourcePosition:null,targetPosition:null,zIndex:void 0},Gd=(e,t,n)=>n===V.Left?e-t:n===V.Right?e+t:e,Kd=(e,t,n)=>n===V.Top?e-t:n===V.Bottom?e+t:e,qd=`react-flow__edgeupdater`;function Jd({position:e,centerX:t,centerY:n,radius:r=10,onMouseDown:i,onMouseEnter:a,onMouseOut:o,type:s}){return(0,b.jsx)(`circle`,{onMouseDown:i,onMouseEnter:a,onMouseOut:o,className:x([qd,`${qd}-${s}`]),cx:Gd(t,r,e),cy:Kd(n,r,e),r,stroke:`transparent`,fill:`transparent`})}function Yd({isReconnectable:e,reconnectRadius:t,edge:n,sourceX:r,sourceY:i,targetX:a,targetY:o,sourcePosition:s,targetPosition:c,onReconnect:l,onReconnectStart:u,onReconnectEnd:d,setReconnecting:f,setUpdateHover:p}){let m=G(),h=(e,t)=>{if(e.button!==0)return;let{autoPanOnConnect:r,domNode:i,connectionMode:a,connectionRadius:o,lib:s,onConnectStart:c,cancelConnection:p,nodeLookup:h,rfId:g,panBy:_,updateConnection:v}=m.getState(),y=t.type===`target`;kc.onPointerDown(e.nativeEvent,{autoPanOnConnect:r,connectionMode:a,connectionRadius:o,domNode:i,handleId:t.id,nodeId:t.nodeId,nodeLookup:h,isTarget:y,edgeUpdaterType:t.type,lib:s,flowId:g,cancelConnection:p,panBy:_,isValidConnection:(...e)=>m.getState().isValidConnection?.(...e)??!0,onConnect:e=>l?.(n,e),onConnectStart:(r,i)=>{f(!0),u?.(e,n,t.type),c?.(r,i)},onConnectEnd:(...e)=>m.getState().onConnectEnd?.(...e),onReconnectEnd:(e,r)=>{f(!1),d?.(e,n,t.type,r)},updateConnection:v,getTransform:()=>m.getState().transform,getFromHandle:()=>m.getState().connection.fromHandle,dragThreshold:m.getState().connectionDragThreshold,handleDomNode:e.currentTarget})},g=e=>h(e,{nodeId:n.target,id:n.targetHandle??null,type:`target`}),_=e=>h(e,{nodeId:n.source,id:n.sourceHandle??null,type:`source`}),v=()=>p(!0),y=()=>p(!1);return(0,b.jsxs)(b.Fragment,{children:[(e===!0||e===`source`)&&(0,b.jsx)(Jd,{position:s,centerX:r,centerY:i,radius:t,onMouseDown:g,onMouseEnter:v,onMouseOut:y,type:`source`}),(e===!0||e===`target`)&&(0,b.jsx)(Jd,{position:c,centerX:a,centerY:o,radius:t,onMouseDown:_,onMouseEnter:v,onMouseOut:y,type:`target`})]})}function Xd({id:e,edgesFocusable:t,edgesReconnectable:n,elementsSelectable:r,onClick:i,onDoubleClick:a,onContextMenu:o,onMouseEnter:s,onMouseMove:c,onMouseLeave:l,reconnectRadius:u,onReconnect:d,onReconnectStart:f,onReconnectEnd:p,rfId:m,edgeTypes:h,noPanClassName:g,onError:v,disableKeyboardA11y:y}){let S=W(t=>t.edgeLookup.get(e)),C=W(e=>e.defaultEdgeOptions);S=C?{...C,...S}:S;let w=S.type||`default`,T=h?.[w]||Ud[w];T===void 0&&(v?.(`011`,_o.error011(w)),w=`default`,T=h?.default||Ud.default);let E=!!(S.focusable||t&&S.focusable===void 0),D=d!==void 0&&(S.reconnectable||n&&S.reconnectable===void 0),O=!!(S.selectable||r&&S.selectable===void 0),k=(0,_.useRef)(null),[A,j]=(0,_.useState)(!1),[M,N]=(0,_.useState)(!1),P=G(),{zIndex:F=S.zIndex,sourceX:I,sourceY:L,targetX:ee,targetY:R,sourcePosition:te,targetPosition:ne}=W((0,_.useCallback)(t=>{let n=t.nodeLookup.get(S.source),r=t.nodeLookup.get(S.target);if(!n||!r)return Wd;let i=Gs({id:e,sourceNode:n,targetNode:r,sourceHandle:S.sourceHandle||null,targetHandle:S.targetHandle||null,connectionMode:t.connectionMode,onError:v}),a=js({selected:S.selected,zIndex:S.zIndex,sourceNode:n,targetNode:r,elevateOnSelect:t.elevateEdgesOnSelect,zIndexMode:t.zIndexMode});return{...i||Wd,zIndex:a}},[S.source,S.target,S.sourceHandle,S.targetHandle,S.selected,S.zIndex,v]),gl),re=(0,_.useMemo)(()=>S.markerStart?`url('#${Ys(S.markerStart,m)}')`:void 0,[S.markerStart,m]),ie=(0,_.useMemo)(()=>S.markerEnd?`url('#${Ys(S.markerEnd,m)}')`:void 0,[S.markerEnd,m]);if(S.hidden||I===null||L===null||ee===null||R===null)return null;let ae=t=>{let{addSelectedEdges:n,unselectNodesAndEdges:r,multiSelectionActive:a}=P.getState();O&&(P.setState({nodesSelectionActive:!1}),S.selected&&a?(r({nodes:[],edges:[S]}),k.current?.blur()):n([e])),i&&i(t,S)},oe=a?e=>{a(e,{...S})}:void 0,se=o?e=>{o(e,{...S})}:void 0,ce=s?e=>{s(e,{...S})}:void 0,z=c?e=>{c(e,{...S})}:void 0,le=l?e=>{l(e,{...S})}:void 0;return(0,b.jsx)(`svg`,{style:{zIndex:F},children:(0,b.jsxs)(`g`,{className:x([`react-flow__edge`,`react-flow__edge-${w}`,S.className,g,{selected:S.selected,animated:S.animated,inactive:!O&&!i,updating:A,selectable:O}]),onClick:ae,onDoubleClick:oe,onContextMenu:se,onMouseEnter:ce,onMouseMove:z,onMouseLeave:le,onKeyDown:E?t=>{if(!y&&yo.includes(t.key)&&O){let{unselectNodesAndEdges:n,addSelectedEdges:r}=P.getState();t.key===`Escape`?(k.current?.blur(),n({edges:[S]})):r([e])}}:void 0,tabIndex:E?0:void 0,role:S.ariaRole??(E?`group`:`img`),"aria-roledescription":`edge`,"data-id":e,"data-testid":`rf__edge-${e}`,"aria-label":S.ariaLabel===null?void 0:S.ariaLabel||`Edge from ${S.source} to ${S.target}`,"aria-describedby":E?`${wl}-${m}`:void 0,ref:k,...S.domAttributes,children:[!M&&(0,b.jsx)(T,{id:e,source:S.source,target:S.target,type:S.type,selected:S.selected,animated:S.animated,selectable:O,deletable:S.deletable??!0,label:S.label,labelStyle:S.labelStyle,labelShowBg:S.labelShowBg,labelBgStyle:S.labelBgStyle,labelBgPadding:S.labelBgPadding,labelBgBorderRadius:S.labelBgBorderRadius,sourceX:I,sourceY:L,targetX:ee,targetY:R,sourcePosition:te,targetPosition:ne,data:S.data,style:S.style,sourceHandleId:S.sourceHandle,targetHandleId:S.targetHandle,markerStart:re,markerEnd:ie,pathOptions:`pathOptions`in S?S.pathOptions:void 0,interactionWidth:S.interactionWidth}),D&&(0,b.jsx)(Yd,{edge:S,isReconnectable:D,reconnectRadius:u,onReconnect:d,onReconnectStart:f,onReconnectEnd:p,sourceX:I,sourceY:L,targetX:ee,targetY:R,sourcePosition:te,targetPosition:ne,setUpdateHover:j,setReconnecting:N})]})})}var Zd=(0,_.memo)(Xd),Qd=e=>({edgesFocusable:e.edgesFocusable,edgesReconnectable:e.edgesReconnectable,elementsSelectable:e.elementsSelectable,connectionMode:e.connectionMode,onError:e.onError});function $d({defaultMarkerColor:e,onlyRenderVisibleElements:t,rfId:n,edgeTypes:r,noPanClassName:i,onReconnect:a,onEdgeContextMenu:o,onEdgeMouseEnter:s,onEdgeMouseMove:c,onEdgeMouseLeave:l,onEdgeClick:u,reconnectRadius:d,onEdgeDoubleClick:f,onReconnectStart:p,onReconnectEnd:m,disableKeyboardA11y:h}){let{edgesFocusable:g,edgesReconnectable:_,elementsSelectable:v,onError:y}=W(Qd,gl),x=hd(t);return(0,b.jsxs)(`div`,{className:`react-flow__edges`,children:[(0,b.jsx)(Sd,{defaultColor:e,rfId:n}),x.map(e=>(0,b.jsx)(Zd,{id:e,edgesFocusable:g,edgesReconnectable:_,elementsSelectable:v,noPanClassName:i,onReconnect:a,onContextMenu:o,onMouseEnter:s,onMouseMove:c,onMouseLeave:l,onClick:u,reconnectRadius:d,onDoubleClick:f,onReconnectStart:p,onReconnectEnd:m,rfId:n,onError:y,edgeTypes:r,disableKeyboardA11y:h},e))]})}$d.displayName=`EdgeRenderer`;var ef=(0,_.memo)($d),tf=e=>`translate(${e[0]}px,${e[1]}px) scale(${e[2]})`;function nf({children:e}){let t=G(),n=(0,_.useRef)(null),[r]=(0,_.useState)(()=>t.getState().transform);return du(()=>{let e=null,r=()=>{let r=t.getState().transform;e&&r[0]===e[0]&&r[1]===e[1]&&r[2]===e[2]||(e=r,n.current&&(n.current.style.transform=tf(r)))};return r(),t.subscribe(r)},[t]),(0,b.jsx)(`div`,{ref:n,className:`react-flow__viewport xyflow__viewport react-flow__container`,style:{transform:tf(r)},children:e})}function rf(e){let t=vu(),n=(0,_.useRef)(!1);(0,_.useEffect)(()=>{!n.current&&t.viewportInitialized&&e&&(setTimeout(()=>e(t),1),n.current=!0)},[e,t.viewportInitialized])}var af=e=>e.panZoom?.syncViewport;function of(e){let t=W(af),n=G();return(0,_.useEffect)(()=>{e&&(t?.(e),n.setState({transform:[e.x,e.y,e.zoom]}))},[e,t]),null}function sf(e){return e.connection.inProgress?{...e.connection,to:rs(e.connection.to,e.transform)}:{...e.connection}}function cf(e){return e?t=>e(sf(t)):sf}function lf(e){return W(cf(e),gl)}var uf=e=>({nodesConnectable:e.nodesConnectable,isValid:e.connection.isValid,inProgress:e.connection.inProgress,width:e.width,height:e.height});function df({containerStyle:e,style:t,type:n,component:r}){let{nodesConnectable:i,width:a,height:o,isValid:s,inProgress:c}=W(uf,gl);return a&&i&&c?(0,b.jsx)(`svg`,{style:e,width:a,height:o,className:`react-flow__connectionline react-flow__container`,children:(0,b.jsx)(`g`,{className:x([`react-flow__connection`,_s(s)]),children:(0,b.jsx)(ff,{style:t,type:n,CustomComponent:r,isValid:s})})}):null}var ff=({style:e,type:t=To.Bezier,CustomComponent:n,isValid:r})=>{let{inProgress:i,from:a,fromNode:o,fromHandle:s,fromPosition:c,to:l,toNode:u,toHandle:d,toPosition:f,pointer:p}=lf();if(!i)return;if(n)return(0,b.jsx)(n,{connectionLineType:t,connectionLineStyle:e,fromNode:o,fromHandle:s,fromX:a.x,fromY:a.y,toX:l.x,toY:l.y,fromPosition:c,toPosition:f,connectionStatus:_s(r),toNode:u,toHandle:d,pointer:p});let m=``,h={sourceX:a.x,sourceY:a.y,sourcePosition:c,targetX:l.x,targetY:l.y,targetPosition:f};switch(t){case To.Bezier:[m]=ks(h);break;case To.SimpleBezier:[m]=Dd(h);break;case To.Step:[m]=Us({...h,borderRadius:0});break;case To.SmoothStep:[m]=Us(h);break;default:[m]=Is(h)}return(0,b.jsx)(`path`,{d:m,fill:`none`,className:`react-flow__connection-path`,style:e})};ff.displayName=`ConnectionLine`;var pf={};function mf(e=pf){(0,_.useRef)(e),G(),(0,_.useEffect)(()=>{},[e])}function hf(){G(),(0,_.useRef)(!1),(0,_.useEffect)(()=>{},[])}function gf({nodeTypes:e,edgeTypes:t,onInit:n,onNodeClick:r,onEdgeClick:i,onNodeDoubleClick:a,onEdgeDoubleClick:o,onNodeMouseEnter:s,onNodeMouseMove:c,onNodeMouseLeave:l,onNodeContextMenu:u,onSelectionContextMenu:d,onSelectionStart:f,onSelectionEnd:p,connectionLineType:m,connectionLineStyle:h,connectionLineComponent:g,connectionLineContainerStyle:_,selectionKeyCode:v,selectionOnDrag:y,selectionMode:x,multiSelectionKeyCode:S,panActivationKeyCode:C,zoomActivationKeyCode:w,deleteKeyCode:T,onlyRenderVisibleElements:E,elementsSelectable:D,defaultViewport:O,translateExtent:k,minZoom:A,maxZoom:j,preventScrolling:M,defaultMarkerColor:N,zoomOnScroll:P,zoomOnPinch:F,panOnScroll:I,panOnScrollSpeed:L,panOnScrollMode:ee,zoomOnDoubleClick:R,panOnDrag:te,autoPanOnSelection:ne,onPaneClick:re,onPaneMouseEnter:ie,onPaneMouseMove:ae,onPaneMouseLeave:oe,onPaneScroll:se,onPaneContextMenu:ce,paneClickDistance:z,nodeClickDistance:le,onEdgeContextMenu:ue,onEdgeMouseEnter:de,onEdgeMouseMove:fe,onEdgeMouseLeave:pe,reconnectRadius:me,onReconnect:he,onReconnectStart:ge,onReconnectEnd:_e,noDragClassName:ve,noWheelClassName:ye,noPanClassName:be,disableKeyboardA11y:xe,nodeExtent:Se,rfId:Ce,viewport:we,onViewportChange:Te,nodesDraggable:Ee}){return mf(e),mf(t),hf(),rf(n),of(we),(0,b.jsx)(id,{onPaneClick:re,onPaneMouseEnter:ie,onPaneMouseMove:ae,onPaneMouseLeave:oe,onPaneContextMenu:ce,onPaneScroll:se,paneClickDistance:z,deleteKeyCode:T,selectionKeyCode:v,selectionOnDrag:y,selectionMode:x,onSelectionStart:f,onSelectionEnd:p,multiSelectionKeyCode:S,panActivationKeyCode:C,zoomActivationKeyCode:w,elementsSelectable:D,zoomOnScroll:P,zoomOnPinch:F,zoomOnDoubleClick:R,panOnScroll:I,panOnScrollSpeed:L,panOnScrollMode:ee,panOnDrag:te,autoPanOnSelection:ne,defaultViewport:O,translateExtent:k,minZoom:A,maxZoom:j,onSelectionContextMenu:d,preventScrolling:M,noDragClassName:ve,noWheelClassName:ye,noPanClassName:be,disableKeyboardA11y:xe,onViewportChange:Te,isControlledViewport:!!we,children:(0,b.jsxs)(nf,{children:[(0,b.jsx)(ef,{edgeTypes:t,onEdgeClick:i,onEdgeDoubleClick:o,onReconnect:he,onReconnectStart:ge,onReconnectEnd:_e,onlyRenderVisibleElements:E,onEdgeContextMenu:ue,onEdgeMouseEnter:de,onEdgeMouseMove:fe,onEdgeMouseLeave:pe,reconnectRadius:me,defaultMarkerColor:N,noPanClassName:be,disableKeyboardA11y:xe,rfId:Ce}),(0,b.jsx)(df,{style:h,type:m,component:g,containerStyle:_}),(0,b.jsx)(`div`,{className:`react-flow__edgelabel-renderer`}),(0,b.jsx)(md,{nodeTypes:e,onNodeClick:r,onNodeDoubleClick:a,onNodeMouseEnter:s,onNodeMouseMove:c,onNodeMouseLeave:l,onNodeContextMenu:u,nodeClickDistance:le,onlyRenderVisibleElements:E,noPanClassName:be,noDragClassName:ve,disableKeyboardA11y:xe,nodeExtent:Se,rfId:Ce,nodesDraggable:Ee}),(0,b.jsx)(`div`,{className:`react-flow__viewport-portal`})]})})}gf.displayName=`GraphView`;var _f=(0,_.memo)(gf),vf=ts(`React Flow`,`https://reactflow.dev/`),yf=({nodes:e,edges:t,defaultNodes:n,defaultEdges:r,width:i,height:a,fitView:o,fitViewOptions:s,minZoom:c=.5,maxZoom:l=2,nodeOrigin:u,nodeExtent:d,zIndexMode:f=`basic`}={})=>{let p=new Map,m=new Map,h=new Map,g=new Map,_=r??t??[],v=n??e??[],y=u??[0,0],b=d??vo;mc(h,g,_);let{nodesInitialized:x}=ac(v,p,m,{nodeOrigin:y,nodeExtent:b,zIndexMode:f}),S=[0,0,1];if(o&&i&&a){let{x:e,y:t,zoom:n}=cs(No(p,{filter:e=>!(!e.width&&!e.initialWidth||!e.height&&!e.initialHeight)}),i,a,c,l,s?.padding??.1);S=[e,t,n]}return{rfId:`1`,width:i??0,height:a??0,transform:S,nodes:v,nodesInitialized:x,nodeLookup:p,parentLookup:m,edges:_,edgeLookup:g,connectionLookup:h,onNodesChange:null,onEdgesChange:null,hasDefaultNodes:n!==void 0,hasDefaultEdges:r!==void 0,panZoom:null,minZoom:c,maxZoom:l,translateExtent:vo,nodeExtent:b,nodesSelectionActive:!1,userSelectionActive:!1,userSelectionRect:null,connectionMode:xo.Strict,domNode:null,paneDragging:!1,noPanClassName:`nopan`,nodeOrigin:y,nodeDragThreshold:1,connectionDragThreshold:1,snapGrid:[15,15],snapToGrid:!1,nodesDraggable:!0,nodesConnectable:!0,nodesFocusable:!0,edgesFocusable:!0,edgesReconnectable:!0,elementsSelectable:!0,elevateNodesOnSelect:!0,elevateEdgesOnSelect:!0,selectNodesOnDrag:!0,multiSelectionActive:!1,fitViewQueued:o??!1,fitViewOptions:s,fitViewResolver:null,connection:{...wo},connectionClickStartHandle:null,connectOnClick:!0,ariaLiveMessage:``,autoPanOnConnect:!0,autoPanOnNodeDrag:!0,autoPanOnNodeFocus:!0,autoPanSpeed:15,connectionRadius:20,onError:vf,isValidConnection:void 0,onSelectionChangeHandlers:[],lib:`react`,debug:!1,ariaLabelConfig:bo,zIndexMode:f,defaultEdgeOptions:void 0,onNodesChangeMiddlewareMap:new Map,onEdgesChangeMiddlewareMap:new Map,onNodesDelete:void 0,onEdgesDelete:void 0,onDelete:void 0,onBeforeDelete:void 0,onViewportChangeStart:void 0,onViewportChange:void 0,onViewportChangeEnd:void 0,onNodeDragStart:void 0,onNodeDrag:void 0,onNodeDragStop:void 0,onSelectionDragStart:void 0,onSelectionDrag:void 0,onSelectionDragStop:void 0,onMoveStart:void 0,onMove:void 0,onMoveEnd:void 0,onConnect:void 0,onConnectStart:void 0,onConnectEnd:void 0,onClickConnectStart:void 0,onClickConnectEnd:void 0}},bf=({nodes:e,edges:t,defaultNodes:n,defaultEdges:r,width:i,height:a,fitView:o,fitViewOptions:s,minZoom:c,maxZoom:l,nodeOrigin:u,nodeExtent:d,zIndexMode:f})=>hl((p,m)=>{async function h(){let{nodeLookup:e,panZoom:t,fitViewOptions:n,fitViewResolver:r,width:i,height:a,minZoom:o,maxZoom:s}=m();t&&(await Lo({nodes:e,width:i,height:a,panZoom:t,minZoom:o,maxZoom:s},n),r?.resolve(!0),p({fitViewResolver:null}))}return{...yf({nodes:e,edges:t,width:i,height:a,fitView:o,fitViewOptions:s,minZoom:c,maxZoom:l,nodeOrigin:u,nodeExtent:d,defaultNodes:n,defaultEdges:r,zIndexMode:f}),setNodes:e=>{let{nodeLookup:t,parentLookup:n,nodeOrigin:r,nodeExtent:i,elevateNodesOnSelect:a,fitViewQueued:o,zIndexMode:s,nodesSelectionActive:c}=m(),{nodesInitialized:l,hasSelectedNodes:u}=ac(e,t,n,{nodeOrigin:r,nodeExtent:i,elevateNodesOnSelect:a,checkEquality:!0,zIndexMode:s}),d=c&&u;o&&l?(h(),p({nodes:e,nodesInitialized:l,fitViewQueued:!1,fitViewOptions:void 0,nodesSelectionActive:d})):p({nodes:e,nodesInitialized:l,nodesSelectionActive:d})},setEdges:e=>{let{connectionLookup:t,edgeLookup:n}=m();mc(t,n,e),p({edges:e})},setDefaultNodesAndEdges:(e,t)=>{if(e){let{setNodes:t}=m();t(e),p({hasDefaultNodes:!0})}if(t){let{setEdges:e}=m();e(t),p({hasDefaultEdges:!0})}},updateNodeInternals:e=>{let{triggerNodeChanges:t,nodeLookup:n,parentLookup:r,domNode:i,nodeOrigin:a,nodeExtent:o,debug:s,fitViewQueued:c,zIndexMode:l}=m(),{changes:u,updatedInternals:d}=dc(e,n,r,i,a,o,l);d&&(nc(n,r,{nodeOrigin:a,nodeExtent:o,zIndexMode:l}),c?(h(),p({fitViewQueued:!1,fitViewOptions:void 0})):p({}),u?.length>0&&(s&&console.log(`React Flow: trigger node changes`,u),t?.(u)))},updateNodePositions:(e,t=!1)=>{let n=[],r=[],{nodeLookup:i,triggerNodeChanges:a,connection:o,updateConnection:s,onNodesChangeMiddlewareMap:c}=m();for(let[a,c]of e){let e=i.get(a),l=!!(e?.expandParent&&e?.parentId&&c?.position),u={id:a,type:`position`,position:l?{x:Math.max(0,c.position.x),y:Math.max(0,c.position.y)}:c.position,dragging:t};if(e&&o.inProgress&&o.fromNode.id===e.id){let t=qs(e,o.fromHandle,V.Left,!0);s({...o,from:t})}l&&e.parentId&&n.push({id:a,parentId:e.parentId,rect:{...c.internals.positionAbsolute,width:c.measured.width??0,height:c.measured.height??0}}),r.push(u)}if(n.length>0){let{parentLookup:e,nodeOrigin:t}=m(),a=uc(n,i,e,t);r.push(...a)}for(let e of c.values())r=e(r);a(r)},triggerNodeChanges:e=>{let{onNodesChange:t,setNodes:n,nodes:r,hasDefaultNodes:i,debug:a}=m();e?.length&&(i&&n(eu(e,r)),a&&console.log(`React Flow: trigger node changes`,e),t?.(e))},triggerEdgeChanges:e=>{let{onEdgesChange:t,setEdges:n,edges:r,hasDefaultEdges:i,debug:a}=m();e?.length&&(i&&n(tu(e,r)),a&&console.log(`React Flow: trigger edge changes`,e),t?.(e))},addSelectedNodes:e=>{let{multiSelectionActive:t,edgeLookup:n,nodeLookup:r,triggerNodeChanges:i,triggerEdgeChanges:a}=m();t?i(e.map(e=>nu(e,!0))):(i(ru(r,new Set([...e]))),a(ru(n)))},addSelectedEdges:e=>{let{multiSelectionActive:t,edgeLookup:n,nodeLookup:r,triggerNodeChanges:i,triggerEdgeChanges:a}=m();t?a(e.map(e=>nu(e,!0))):(a(ru(n,new Set([...e]))),i(ru(r,new Set)))},unselectNodesAndEdges:({nodes:e,edges:t}={})=>{let{edges:n,nodes:r,nodeLookup:i,triggerNodeChanges:a,triggerEdgeChanges:o}=m(),s=e||r,c=t||n,l=[];for(let e of s)e.selected&&l.push(nu(e.id,!1));let u=[];for(let e of c)e.selected&&u.push(nu(e.id,!1));a(l),o(u)},setMinZoom:e=>{let{panZoom:t,maxZoom:n}=m();t?.setScaleExtent([e,n]),p({minZoom:e})},setMaxZoom:e=>{let{panZoom:t,minZoom:n}=m();t?.setScaleExtent([n,e]),p({maxZoom:e})},setTranslateExtent:e=>{m().panZoom?.setTranslateExtent(e),p({translateExtent:e})},resetSelectedElements:()=>{let{edges:e,nodes:t,triggerNodeChanges:n,triggerEdgeChanges:r,elementsSelectable:i}=m();if(!i)return;let a=t.reduce((e,t)=>t.selected?[...e,nu(t.id,!1)]:e,[]),o=e.reduce((e,t)=>t.selected?[...e,nu(t.id,!1)]:e,[]);n(a),r(o)},setNodeExtent:e=>{let{nodes:t,nodeLookup:n,parentLookup:r,nodeOrigin:i,elevateNodesOnSelect:a,nodeExtent:o,zIndexMode:s}=m();(e[0][0]!==o[0][0]||e[0][1]!==o[0][1]||e[1][0]!==o[1][0]||e[1][1]!==o[1][1])&&(ac(t,n,r,{nodeOrigin:i,nodeExtent:e,elevateNodesOnSelect:a,checkEquality:!1,zIndexMode:s}),p({nodeExtent:e}))},panBy:e=>{let{transform:t,width:n,height:r,panZoom:i,translateExtent:a}=m();return fc({delta:e,panZoom:i,transform:t,translateExtent:a,width:n,height:r})},setCenter:async(e,t,n)=>{let{width:r,height:i,maxZoom:a,panZoom:o}=m();if(!o)return!1;let s=n?.zoom===void 0?a:n.zoom;return await o.setViewport({x:r/2-e*s,y:i/2-t*s,zoom:s},{duration:n?.duration,ease:n?.ease,interpolate:n?.interpolate}),!0},cancelConnection:()=>{p({connection:{...wo}})},updateConnection:e=>{p({connection:e})},reset:()=>p({...yf()})}},Object.is);function xf({initialNodes:e,initialEdges:t,defaultNodes:n,defaultEdges:r,initialWidth:i,initialHeight:a,initialMinZoom:o,initialMaxZoom:s,initialFitViewOptions:c,fitView:l,nodeOrigin:u,nodeExtent:d,zIndexMode:f,children:p}){let[m]=(0,_.useState)(()=>bf({nodes:e,edges:t,defaultNodes:n,defaultEdges:r,width:i,height:a,fitView:l,minZoom:o,maxZoom:s,fitViewOptions:c,nodeOrigin:u,nodeExtent:d,zIndexMode:f}));return(0,b.jsx)(yl,{value:m,children:(0,b.jsx)(hu,{children:(0,b.jsx)(Bu,{children:p})})})}function Sf({children:e,nodes:t,edges:n,defaultNodes:r,defaultEdges:i,width:a,height:o,fitView:s,fitViewOptions:c,minZoom:l,maxZoom:u,nodeOrigin:d,nodeExtent:f,zIndexMode:p}){return(0,_.useContext)(vl)?(0,b.jsx)(b.Fragment,{children:e}):(0,b.jsx)(xf,{initialNodes:t,initialEdges:n,defaultNodes:r,defaultEdges:i,initialWidth:a,initialHeight:o,fitView:s,initialFitViewOptions:c,initialMinZoom:l,initialMaxZoom:u,nodeOrigin:d,nodeExtent:f,zIndexMode:p,children:e})}var Cf={width:`100%`,height:`100%`,overflow:`hidden`,position:`relative`,zIndex:0};function wf({nodes:e,edges:t,defaultNodes:n,defaultEdges:r,className:i,nodeTypes:a,edgeTypes:o,onNodeClick:s,onEdgeClick:c,onInit:l,onMove:u,onMoveStart:d,onMoveEnd:f,onConnect:p,onConnectStart:m,onConnectEnd:h,onClickConnectStart:g,onClickConnectEnd:v,onNodeMouseEnter:y,onNodeMouseMove:S,onNodeMouseLeave:C,onNodeContextMenu:w,onNodeDoubleClick:T,onNodeDragStart:E,onNodeDrag:D,onNodeDragStop:O,onNodesDelete:k,onEdgesDelete:A,onDelete:j,onSelectionChange:M,onSelectionDragStart:N,onSelectionDrag:P,onSelectionDragStop:F,onSelectionContextMenu:I,onSelectionStart:L,onSelectionEnd:ee,onBeforeDelete:R,connectionMode:te,connectionLineType:ne=To.Bezier,connectionLineStyle:re,connectionLineComponent:ie,connectionLineContainerStyle:ae,deleteKeyCode:oe=`Backspace`,selectionKeyCode:se=`Shift`,selectionOnDrag:ce=!1,selectionMode:z=Co.Full,panActivationKeyCode:le=`Space`,multiSelectionKeyCode:ue=ls()?`Meta`:`Control`,zoomActivationKeyCode:de=ls()?`Meta`:`Control`,snapToGrid:fe,snapGrid:pe,onlyRenderVisibleElements:me=!1,selectNodesOnDrag:he,nodesDraggable:ge,autoPanOnNodeFocus:_e,nodesConnectable:ve,nodesFocusable:ye,nodeOrigin:be=zl,edgesFocusable:xe,edgesReconnectable:Se,elementsSelectable:Ce=!0,defaultViewport:we=Bl,minZoom:Te=.5,maxZoom:Ee=2,translateExtent:De=vo,preventScrolling:Oe=!0,nodeExtent:ke,defaultMarkerColor:Ae=`#b1b1b7`,zoomOnScroll:je=!0,zoomOnPinch:Me=!0,panOnScroll:Ne=!1,panOnScrollSpeed:Pe=.5,panOnScrollMode:Fe=So.Free,zoomOnDoubleClick:Ie=!0,panOnDrag:Le=!0,onPaneClick:Re,onPaneMouseEnter:ze,onPaneMouseMove:Be,onPaneMouseLeave:Ve,onPaneScroll:He,onPaneContextMenu:Ue,paneClickDistance:We=1,nodeClickDistance:Ge=0,children:Ke,onReconnect:qe,onReconnectStart:Je,onReconnectEnd:Ye,onEdgeContextMenu:Xe,onEdgeDoubleClick:Ze,onEdgeMouseEnter:Qe,onEdgeMouseMove:$e,onEdgeMouseLeave:et,reconnectRadius:tt=10,onNodesChange:nt,onEdgesChange:rt,noDragClassName:it=`nodrag`,noWheelClassName:at=`nowheel`,noPanClassName:ot=`nopan`,fitView:st,fitViewOptions:ct,connectOnClick:lt,attributionPosition:ut,proOptions:B,defaultEdgeOptions:dt,elevateNodesOnSelect:ft=!0,elevateEdgesOnSelect:pt=!1,disableKeyboardA11y:mt=!1,autoPanOnConnect:ht,autoPanOnNodeDrag:gt,autoPanOnSelection:_t=!0,autoPanSpeed:vt,connectionRadius:yt,isValidConnection:bt,onError:xt,style:St,id:Ct,nodeDragThreshold:wt,connectionDragThreshold:Tt,viewport:Et,onViewportChange:Dt,width:Ot,height:kt,colorMode:At=`light`,debug:jt,onScroll:Mt,ariaLabelConfig:Nt,zIndexMode:Pt=`basic`,...Ft},It){let Lt=Ct||`1`,Rt=Kl(At),zt=(0,_.useCallback)(e=>{e.currentTarget.scrollTo({top:0,left:0,behavior:`instant`}),Mt?.(e)},[Mt]);return(0,b.jsx)(`div`,{"data-testid":`rf__wrapper`,...Ft,onScroll:zt,style:{...St,...Cf},ref:It,className:x([`react-flow`,i,Rt]),id:Ct,role:`application`,children:(0,b.jsxs)(Sf,{nodes:e,edges:t,width:Ot,height:kt,fitView:st,fitViewOptions:ct,minZoom:Te,maxZoom:Ee,nodeOrigin:be,nodeExtent:ke,zIndexMode:Pt,children:[(0,b.jsx)(Wl,{nodes:e,edges:t,defaultNodes:n,defaultEdges:r,onConnect:p,onConnectStart:m,onConnectEnd:h,onClickConnectStart:g,onClickConnectEnd:v,nodesDraggable:ge,autoPanOnNodeFocus:_e,nodesConnectable:ve,nodesFocusable:ye,edgesFocusable:xe,edgesReconnectable:Se,elementsSelectable:Ce,elevateNodesOnSelect:ft,elevateEdgesOnSelect:pt,minZoom:Te,maxZoom:Ee,nodeExtent:ke,onNodesChange:nt,onEdgesChange:rt,snapToGrid:fe,snapGrid:pe,connectionMode:te,translateExtent:De,connectOnClick:lt,defaultEdgeOptions:dt,fitView:st,fitViewOptions:ct,onNodesDelete:k,onEdgesDelete:A,onDelete:j,onNodeDragStart:E,onNodeDrag:D,onNodeDragStop:O,onSelectionDrag:P,onSelectionDragStart:N,onSelectionDragStop:F,onMove:u,onMoveStart:d,onMoveEnd:f,noPanClassName:ot,nodeOrigin:be,rfId:Lt,autoPanOnConnect:ht,autoPanOnNodeDrag:gt,autoPanSpeed:vt,onError:xt,connectionRadius:yt,isValidConnection:bt,selectNodesOnDrag:he,nodeDragThreshold:wt,connectionDragThreshold:Tt,onBeforeDelete:R,debug:jt,ariaLabelConfig:Nt,zIndexMode:Pt}),(0,b.jsx)(_f,{onInit:l,onNodeClick:s,onEdgeClick:c,onNodeMouseEnter:y,onNodeMouseMove:S,onNodeMouseLeave:C,onNodeContextMenu:w,onNodeDoubleClick:T,nodeTypes:a,edgeTypes:o,connectionLineType:ne,connectionLineStyle:re,connectionLineComponent:ie,connectionLineContainerStyle:ae,selectionKeyCode:se,selectionOnDrag:ce,selectionMode:z,deleteKeyCode:oe,multiSelectionKeyCode:ue,panActivationKeyCode:le,zoomActivationKeyCode:de,onlyRenderVisibleElements:me,defaultViewport:we,translateExtent:De,minZoom:Te,maxZoom:Ee,preventScrolling:Oe,zoomOnScroll:je,zoomOnPinch:Me,zoomOnDoubleClick:Ie,panOnScroll:Ne,panOnScrollSpeed:Pe,panOnScrollMode:Fe,panOnDrag:Le,autoPanOnSelection:_t,onPaneClick:Re,onPaneMouseEnter:ze,onPaneMouseMove:Be,onPaneMouseLeave:Ve,onPaneScroll:He,onPaneContextMenu:Ue,paneClickDistance:We,nodeClickDistance:Ge,onSelectionContextMenu:I,onSelectionStart:L,onSelectionEnd:ee,onReconnect:qe,onReconnectStart:Je,onReconnectEnd:Ye,onEdgeContextMenu:Xe,onEdgeDoubleClick:Ze,onEdgeMouseEnter:Qe,onEdgeMouseMove:$e,onEdgeMouseLeave:et,reconnectRadius:tt,defaultMarkerColor:Ae,noDragClassName:it,noWheelClassName:at,noPanClassName:ot,rfId:Lt,disableKeyboardA11y:mt,nodeExtent:ke,viewport:Et,onViewportChange:Dt,nodesDraggable:ge}),(0,b.jsx)(Rl,{onSelectionChange:M}),Ke,(0,b.jsx)(Ml,{proOptions:B,position:ut}),(0,b.jsx)(kl,{rfId:Lt,disableKeyboardA11y:mt})]})})}var Tf=uu(wf);function Ef(e){let[t,n]=(0,_.useState)(e);return[t,n,(0,_.useCallback)(e=>n(t=>eu(e,t)),[])]}function Df(e){let[t,n]=(0,_.useState)(e);return[t,n,(0,_.useCallback)(e=>n(t=>tu(e,t)),[])]}_o.error014();function Of({dimensions:e,lineWidth:t,variant:n,className:r}){return(0,b.jsx)(`path`,{strokeWidth:t,d:`M${e[0]/2} 0 V${e[1]} M0 ${e[1]/2} H${e[0]}`,className:x([`react-flow__background-pattern`,n,r])})}function kf({radius:e,className:t}){return(0,b.jsx)(`circle`,{cx:e,cy:e,r:e,className:x([`react-flow__background-pattern`,`dots`,t])})}var Af;(function(e){e.Lines=`lines`,e.Dots=`dots`,e.Cross=`cross`})(Af||={});var jf={[Af.Dots]:1,[Af.Lines]:1,[Af.Cross]:6},Mf=e=>({transform:e.transform,patternId:`pattern-${e.rfId}`});function Nf({id:e,variant:t=Af.Dots,gap:n=20,size:r,lineWidth:i=1,offset:a=0,color:o,bgColor:s,style:c,className:l,patternClassName:u}){let d=(0,_.useRef)(null),{transform:f,patternId:p}=W(Mf,gl),m=r||jf[t],h=t===Af.Dots,g=t===Af.Cross,v=Array.isArray(n)?n:[n,n],y=[v[0]*f[2]||1,v[1]*f[2]||1],S=m*f[2],C=Array.isArray(a)?a:[a,a],w=g?[S,S]:y,T=[C[0]*f[2]+w[0]/2,C[1]*f[2]+w[1]/2],E=`${p}${e||``}`;return(0,b.jsxs)(`svg`,{className:x([`react-flow__background`,l]),style:{...c,...Cu,"--xy-background-color-props":s,"--xy-background-pattern-color-props":o},ref:d,"data-testid":`rf__background`,children:[(0,b.jsx)(`pattern`,{id:E,x:f[0]%y[0],y:f[1]%y[1],width:y[0],height:y[1],patternUnits:`userSpaceOnUse`,patternTransform:`translate(-${T[0]},-${T[1]})`,children:h?(0,b.jsx)(kf,{radius:S/2,className:u}):(0,b.jsx)(Of,{dimensions:w,lineWidth:i,variant:t,className:u})}),(0,b.jsx)(`rect`,{x:`0`,y:`0`,width:`100%`,height:`100%`,fill:`url(#${E})`})]})}Nf.displayName=`Background`;var Pf=(0,_.memo)(Nf);function Ff(){return(0,b.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 32 32`,children:(0,b.jsx)(`path`,{d:`M32 18.133H18.133V32h-4.266V18.133H0v-4.266h13.867V0h4.266v13.867H32z`})})}function If(){return(0,b.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 32 5`,children:(0,b.jsx)(`path`,{d:`M0 0h32v4.2H0z`})})}function Lf(){return(0,b.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 32 30`,children:(0,b.jsx)(`path`,{d:`M3.692 4.63c0-.53.4-.938.939-.938h5.215V0H4.708C2.13 0 0 2.054 0 4.63v5.216h3.692V4.631zM27.354 0h-5.2v3.692h5.17c.53 0 .984.4.984.939v5.215H32V4.631A4.624 4.624 0 0027.354 0zm.954 24.83c0 .532-.4.94-.939.94h-5.215v3.768h5.215c2.577 0 4.631-2.13 4.631-4.707v-5.139h-3.692v5.139zm-23.677.94c-.531 0-.939-.4-.939-.94v-5.138H0v5.139c0 2.577 2.13 4.707 4.708 4.707h5.138V25.77H4.631z`})})}function Rf(){return(0,b.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 25 32`,children:(0,b.jsx)(`path`,{d:`M21.333 10.667H19.81V7.619C19.81 3.429 16.38 0 12.19 0 8 0 4.571 3.429 4.571 7.619v3.048H3.048A3.056 3.056 0 000 13.714v15.238A3.056 3.056 0 003.048 32h18.285a3.056 3.056 0 003.048-3.048V13.714a3.056 3.056 0 00-3.048-3.047zM12.19 24.533a3.056 3.056 0 01-3.047-3.047 3.056 3.056 0 013.047-3.048 3.056 3.056 0 013.048 3.048 3.056 3.056 0 01-3.048 3.047zm4.724-13.866H7.467V7.619c0-2.59 2.133-4.724 4.723-4.724 2.591 0 4.724 2.133 4.724 4.724v3.048z`})})}function zf(){return(0,b.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 25 32`,children:(0,b.jsx)(`path`,{d:`M21.333 10.667H19.81V7.619C19.81 3.429 16.38 0 12.19 0c-4.114 1.828-1.37 2.133.305 2.438 1.676.305 4.42 2.59 4.42 5.181v3.048H3.047A3.056 3.056 0 000 13.714v15.238A3.056 3.056 0 003.048 32h18.285a3.056 3.056 0 003.048-3.048V13.714a3.056 3.056 0 00-3.048-3.047zM12.19 24.533a3.056 3.056 0 01-3.047-3.047 3.056 3.056 0 013.047-3.048 3.056 3.056 0 013.048 3.048 3.056 3.056 0 01-3.048 3.047z`})})}function Bf({children:e,className:t,...n}){return(0,b.jsx)(`button`,{type:`button`,className:x([`react-flow__controls-button`,t]),...n,children:e})}var Vf=e=>({isInteractive:e.nodesDraggable||e.nodesConnectable||e.elementsSelectable,minZoomReached:e.transform[2]<=e.minZoom,maxZoomReached:e.transform[2]>=e.maxZoom,ariaLabelConfig:e.ariaLabelConfig});function Hf({style:e,showZoom:t=!0,showFitView:n=!0,showInteractive:r=!0,fitViewOptions:i,onZoomIn:a,onZoomOut:o,onFitView:s,onInteractiveChange:c,className:l,children:u,position:d=`bottom-left`,orientation:f=`vertical`,"aria-label":p}){let m=G(),{isInteractive:h,minZoomReached:g,maxZoomReached:_,ariaLabelConfig:v}=W(Vf,gl),{zoomIn:y,zoomOut:S,fitView:C}=vu();return(0,b.jsxs)(Al,{className:x([`react-flow__controls`,f===`horizontal`?`horizontal`:`vertical`,l]),position:d,style:e,"data-testid":`rf__controls`,"aria-label":p??v[`controls.ariaLabel`],children:[t&&(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(Bf,{onClick:()=>{y(),a?.()},className:`react-flow__controls-zoomin`,title:v[`controls.zoomIn.ariaLabel`],"aria-label":v[`controls.zoomIn.ariaLabel`],disabled:_,children:(0,b.jsx)(Ff,{})}),(0,b.jsx)(Bf,{onClick:()=>{S(),o?.()},className:`react-flow__controls-zoomout`,title:v[`controls.zoomOut.ariaLabel`],"aria-label":v[`controls.zoomOut.ariaLabel`],disabled:g,children:(0,b.jsx)(If,{})})]}),n&&(0,b.jsx)(Bf,{className:`react-flow__controls-fitview`,onClick:()=>{C(i),s?.()},title:v[`controls.fitView.ariaLabel`],"aria-label":v[`controls.fitView.ariaLabel`],children:(0,b.jsx)(Lf,{})}),r&&(0,b.jsx)(Bf,{className:`react-flow__controls-interactive`,onClick:()=>{m.setState({nodesDraggable:!h,nodesConnectable:!h,elementsSelectable:!h}),c?.(!h)},title:v[`controls.interactive.ariaLabel`],"aria-label":v[`controls.interactive.ariaLabel`],children:h?(0,b.jsx)(zf,{}):(0,b.jsx)(Rf,{})}),u]})}Hf.displayName=`Controls`;var Uf=(0,_.memo)(Hf);function Wf({id:e,x:t,y:n,width:r,height:i,style:a,color:o,strokeColor:s,strokeWidth:c,className:l,borderRadius:u,shapeRendering:d,selected:f,onClick:p}){let{background:m,backgroundColor:h}=a||{},g=o||m||h;return(0,b.jsx)(`rect`,{className:x([`react-flow__minimap-node`,{selected:f},l]),x:t,y:n,rx:u,ry:u,width:r,height:i,style:{fill:g,stroke:s,strokeWidth:c},shapeRendering:d,onClick:p?t=>p(t,e):void 0})}var Gf=(0,_.memo)(Wf),Kf=e=>e.nodes.map(e=>e.id),qf=e=>e instanceof Function?e:()=>e;function Jf({nodeStrokeColor:e,nodeColor:t,nodeClassName:n=``,nodeBorderRadius:r=5,nodeStrokeWidth:i,nodeComponent:a=Gf,onClick:o}){let s=W(Kf,gl),c=qf(t),l=qf(e),u=qf(n),d=typeof window>`u`||window.chrome?`crispEdges`:`geometricPrecision`;return(0,b.jsx)(b.Fragment,{children:s.map(e=>(0,b.jsx)(Xf,{id:e,nodeColorFunc:c,nodeStrokeColorFunc:l,nodeClassNameFunc:u,nodeBorderRadius:r,nodeStrokeWidth:i,NodeComponent:a,onClick:o,shapeRendering:d},e))})}function Yf({id:e,nodeColorFunc:t,nodeStrokeColorFunc:n,nodeClassNameFunc:r,nodeBorderRadius:i,nodeStrokeWidth:a,shapeRendering:o,NodeComponent:s,onClick:c}){let{node:l,x:u,y:d,width:f,height:p}=W(t=>{let n=t.nodeLookup.get(e);if(!n)return{node:void 0,x:0,y:0,width:0,height:0};let r=n.internals.userNode,{x:i,y:a}=n.internals.positionAbsolute,{width:o,height:s}=ds(r);return{node:r,x:i,y:a,width:o,height:s}},gl);return!l||l.hidden||!fs(l)?null:(0,b.jsx)(s,{x:u,y:d,width:f,height:p,style:l.style,selected:!!l.selected,className:r(l),color:t(l),borderRadius:i,strokeColor:n(l),strokeWidth:a,shapeRendering:o,onClick:c,id:l.id})}var Xf=(0,_.memo)(Yf),Zf=(0,_.memo)(Jf),Qf=200,$f=150,ep=e=>!e.hidden,tp=e=>{let t={x:-e.transform[0]/e.transform[2],y:-e.transform[1]/e.transform[2],width:e.width/e.transform[2],height:e.height/e.transform[2]},n=!1;for(let t of e.nodeLookup.values())if(!t.hidden){n=!0;break}return{viewBB:t,boundingRect:n?Xo(No(e.nodeLookup,{filter:ep}),t):t,rfId:e.rfId,panZoom:e.panZoom,translateExtent:e.translateExtent,flowWidth:e.width,flowHeight:e.height,ariaLabelConfig:e.ariaLabelConfig}},np=(e,t)=>e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height,rp=(e,t)=>np(e.viewBB,t.viewBB)&&np(e.boundingRect,t.boundingRect)&&e.rfId===t.rfId&&e.panZoom===t.panZoom&&e.translateExtent===t.translateExtent&&e.flowWidth===t.flowWidth&&e.flowHeight===t.flowHeight&&e.ariaLabelConfig===t.ariaLabelConfig,ip=`react-flow__minimap-desc`;function ap({style:e,className:t,nodeStrokeColor:n,nodeColor:r,nodeClassName:i=``,nodeBorderRadius:a=5,nodeStrokeWidth:o,nodeComponent:s,bgColor:c,maskColor:l,maskStrokeColor:u,maskStrokeWidth:d,position:f=`bottom-right`,onClick:p,onNodeClick:m,pannable:h=!1,zoomable:g=!1,ariaLabel:v,inversePan:y,zoomStep:S=1,offsetScale:C=5}){let w=G(),T=(0,_.useRef)(null),{boundingRect:E,panZoom:D,viewBB:O,rfId:k,translateExtent:A,flowWidth:j,flowHeight:M,ariaLabelConfig:N}=W(tp,rp),P=e?.width??Qf,F=e?.height??$f,I=E.width/P,L=E.height/F,ee=Math.max(I,L),R=ee*P,te=ee*F,ne=C*ee,re=E.x-(R-E.width)/2-ne,ie=E.y-(te-E.height)/2-ne,ae=R+ne*2,oe=te+ne*2,se=`${ip}-${k}`,ce=(0,_.useRef)(0),z=(0,_.useRef)();ce.current=ee,(0,_.useEffect)(()=>{let e=w.getState().panZoom;if(T.current&&e)return z.current=Ac({domNode:T.current,panZoom:e,getTransform:()=>w.getState().transform,getViewScale:()=>ce.current}),()=>{z.current?.destroy()}},[D]),(0,_.useEffect)(()=>{z.current?.update({translateExtent:A,width:j,height:M,inversePan:y,pannable:h,zoomStep:S,zoomable:g})},[h,g,y,S,A,j,M]);let le=p?e=>{let[t,n]=z.current?.pointer(e)||[0,0];p(e,{x:t,y:n})}:void 0,ue=(0,_.useCallback)((e,t)=>{let n=w.getState().nodeLookup.get(t).internals.userNode;m?.(e,n)},[m]),de=m?ue:void 0,fe=v??N[`minimap.ariaLabel`];return(0,b.jsx)(Al,{position:f,style:{...e,"--xy-minimap-background-color-props":typeof c==`string`?c:void 0,"--xy-minimap-mask-background-color-props":typeof l==`string`?l:void 0,"--xy-minimap-mask-stroke-color-props":typeof u==`string`?u:void 0,"--xy-minimap-mask-stroke-width-props":typeof d==`number`?d*ee:void 0,"--xy-minimap-node-background-color-props":typeof r==`string`?r:void 0,"--xy-minimap-node-stroke-color-props":typeof n==`string`?n:void 0,"--xy-minimap-node-stroke-width-props":typeof o==`number`?o:void 0},className:x([`react-flow__minimap`,t]),"data-testid":`rf__minimap`,children:(0,b.jsxs)(`svg`,{width:P,height:F,viewBox:`${re} ${ie} ${ae} ${oe}`,className:`react-flow__minimap-svg`,role:`img`,"aria-labelledby":se,ref:T,onClick:le,children:[fe&&(0,b.jsx)(`title`,{id:se,children:fe}),(0,b.jsx)(Zf,{onClick:de,nodeColor:r,nodeStrokeColor:n,nodeBorderRadius:a,nodeClassName:i,nodeStrokeWidth:o,nodeComponent:s}),(0,b.jsx)(`path`,{className:`react-flow__minimap-mask`,d:`M${re-ne},${ie-ne}h${ae+ne*2}v${oe+ne*2}h${-ae-ne*2}z
14
- M${O.x},${O.y}h${O.width}v${O.height}h${-O.width}z`,fillRule:`evenodd`,pointerEvents:`none`})]})})}ap.displayName=`MiniMap`;var op=(0,_.memo)(ap),sp=e=>t=>e?`${Math.max(1/t.transform[2],1)}`:void 0,cp={[Gc.Line]:`right`,[Gc.Handle]:`bottom-right`};function lp({nodeId:e,position:t,variant:n=Gc.Handle,className:r,style:i=void 0,children:a,color:o,minWidth:s=10,minHeight:c=10,maxWidth:l=Number.MAX_VALUE,maxHeight:u=Number.MAX_VALUE,keepAspectRatio:d=!1,resizeDirection:f,autoScale:p=!0,shouldResize:m,onResizeStart:h,onResize:g,onResizeEnd:v}){let y=Lu(),S=typeof e==`string`?e:y,C=G(),w=(0,_.useRef)(null),T=n===Gc.Handle,E=W((0,_.useCallback)(sp(T&&p),[T,p]),gl),D=(0,_.useRef)(null),O=t??cp[n];(0,_.useEffect)(()=>{if(w.current&&S)return D.current||=rl({domNode:w.current,nodeId:S,getStoreItems:()=>{let{nodeLookup:e,transform:t,snapGrid:n,snapToGrid:r,nodeOrigin:i,domNode:a}=C.getState();return{nodeLookup:e,transform:t,snapGrid:n,snapToGrid:r,nodeOrigin:i,paneDomNode:a}},onChange:(e,t)=>{let{triggerNodeChanges:n,nodeLookup:r,parentLookup:i,nodeOrigin:a}=C.getState(),o=[],s={x:e.x,y:e.y},c=r.get(S);if(c&&c.expandParent&&c.parentId){let t=c.origin??a,n=e.width??c.measured.width??0,l=e.height??c.measured.height??0,u=uc([{id:c.id,parentId:c.parentId,rect:{width:n,height:l,...ps({x:e.x??c.position.x,y:e.y??c.position.y},{width:n,height:l},c.parentId,r,t)}}],r,i,a);o.push(...u),s.x=e.x?Math.max(t[0]*n,e.x):void 0,s.y=e.y?Math.max(t[1]*l,e.y):void 0}if(s.x!==void 0&&s.y!==void 0){let e={id:S,type:`position`,position:{...s}};o.push(e)}if(e.width!==void 0&&e.height!==void 0){let t={id:S,type:`dimensions`,resizing:!0,setAttributes:f?f===`horizontal`?`width`:`height`:!0,dimensions:{width:e.width,height:e.height}};o.push(t)}for(let e of t){let t={...e,type:`position`};o.push(t)}n(o)},onEnd:({width:e,height:t})=>{let n={id:S,type:`dimensions`,resizing:!1,dimensions:{width:e,height:t}};C.getState().triggerNodeChanges([n])}}),D.current.update({controlPosition:O,boundaries:{minWidth:s,minHeight:c,maxWidth:l,maxHeight:u},keepAspectRatio:d,resizeDirection:f,onResizeStart:h,onResize:g,onResizeEnd:v,shouldResize:m}),()=>{D.current?.destroy()}},[O,s,c,l,u,d,h,g,v,m]);let k=O.split(`-`);return(0,b.jsx)(`div`,{className:x([`react-flow__resize-control`,`nodrag`,...k,n,r]),ref:w,style:{...i,scale:E,...o&&{[T?`backgroundColor`:`borderColor`]:o}},children:a})}var up=(0,_.memo)(lp);function dp({nodeId:e,isVisible:t=!0,handleClassName:n,handleStyle:r,lineClassName:i,lineStyle:a,color:o,minWidth:s=10,minHeight:c=10,maxWidth:l=Number.MAX_VALUE,maxHeight:u=Number.MAX_VALUE,keepAspectRatio:d=!1,autoScale:f=!0,shouldResize:p,onResizeStart:m,onResize:h,onResizeEnd:g}){return t?(0,b.jsxs)(b.Fragment,{children:[qc.map(t=>(0,b.jsx)(up,{className:i,style:a,nodeId:e,position:t,variant:Gc.Line,color:o,minWidth:s,minHeight:c,maxWidth:l,maxHeight:u,onResizeStart:m,keepAspectRatio:d,autoScale:f,shouldResize:p,onResize:h,onResizeEnd:g},t)),Kc.map(t=>(0,b.jsx)(up,{className:n,style:r,nodeId:e,position:t,color:o,minWidth:s,minHeight:c,maxWidth:l,maxHeight:u,onResizeStart:m,keepAspectRatio:d,autoScale:f,shouldResize:p,onResize:h,onResizeEnd:g},t))]}):null}function fp(e,t){let n=t||{};return(e[e.length-1]===``?[...e,``]:e).join((n.padRight?` `:``)+`,`+(n.padLeft===!1?``:` `)).trim()}var pp=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,mp=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,hp={};function gp(e,t){return((t||hp).jsx?mp:pp).test(e)}var _p=/[ \t\n\f\r]/g;function vp(e){return typeof e==`object`?e.type===`text`&&yp(e.value):yp(e)}function yp(e){return e.replace(_p,``)===``}var bp=class{constructor(e,t,n){this.normal=t,this.property=e,n&&(this.space=n)}};bp.prototype.normal={},bp.prototype.property={},bp.prototype.space=void 0;function xp(e,t){let n={},r={};for(let t of e)Object.assign(n,t.property),Object.assign(r,t.normal);return new bp(n,r,t)}function Sp(e){return e.toLowerCase()}var Cp=class{constructor(e,t){this.attribute=t,this.property=e}};Cp.prototype.attribute=``,Cp.prototype.booleanish=!1,Cp.prototype.boolean=!1,Cp.prototype.commaOrSpaceSeparated=!1,Cp.prototype.commaSeparated=!1,Cp.prototype.defined=!1,Cp.prototype.mustUseProperty=!1,Cp.prototype.number=!1,Cp.prototype.overloadedBoolean=!1,Cp.prototype.property=``,Cp.prototype.spaceSeparated=!1,Cp.prototype.space=void 0;var wp=s({boolean:()=>K,booleanish:()=>Ep,commaOrSpaceSeparated:()=>Ap,commaSeparated:()=>kp,number:()=>q,overloadedBoolean:()=>Dp,spaceSeparated:()=>Op}),Tp=0,K=jp(),Ep=jp(),Dp=jp(),q=jp(),Op=jp(),kp=jp(),Ap=jp();function jp(){return 2**++Tp}var Mp=Object.keys(wp),Np=class extends Cp{constructor(e,t,n,r){let i=-1;if(super(e,t),Pp(this,`space`,r),typeof n==`number`)for(;++i<Mp.length;){let e=Mp[i];Pp(this,Mp[i],(n&wp[e])===wp[e])}}};Np.prototype.defined=!0;function Pp(e,t,n){n&&(e[t]=n)}function Fp(e){let t={},n={};for(let[r,i]of Object.entries(e.properties)){let a=new Np(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(a.mustUseProperty=!0),t[r]=a,n[Sp(r)]=r,n[Sp(a.attribute)]=r}return new bp(t,n,e.space)}var Ip=Fp({properties:{ariaActiveDescendant:null,ariaAtomic:Ep,ariaAutoComplete:null,ariaBusy:Ep,ariaChecked:Ep,ariaColCount:q,ariaColIndex:q,ariaColSpan:q,ariaControls:Op,ariaCurrent:null,ariaDescribedBy:Op,ariaDetails:null,ariaDisabled:Ep,ariaDropEffect:Op,ariaErrorMessage:null,ariaExpanded:Ep,ariaFlowTo:Op,ariaGrabbed:Ep,ariaHasPopup:null,ariaHidden:Ep,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:Op,ariaLevel:q,ariaLive:null,ariaModal:Ep,ariaMultiLine:Ep,ariaMultiSelectable:Ep,ariaOrientation:null,ariaOwns:Op,ariaPlaceholder:null,ariaPosInSet:q,ariaPressed:Ep,ariaReadOnly:Ep,ariaRelevant:null,ariaRequired:Ep,ariaRoleDescription:Op,ariaRowCount:q,ariaRowIndex:q,ariaRowSpan:q,ariaSelected:Ep,ariaSetSize:q,ariaSort:null,ariaValueMax:q,ariaValueMin:q,ariaValueNow:q,ariaValueText:null,role:null},transform(e,t){return t===`role`?t:`aria-`+t.slice(4).toLowerCase()}});function Lp(e,t){return t in e?e[t]:t}function Rp(e,t){return Lp(e,t.toLowerCase())}var zp=Fp({attributes:{acceptcharset:`accept-charset`,classname:`class`,htmlfor:`for`,httpequiv:`http-equiv`},mustUseProperty:[`checked`,`multiple`,`muted`,`selected`],properties:{abbr:null,accept:kp,acceptCharset:Op,accessKey:Op,action:null,allow:null,allowFullScreen:K,allowPaymentRequest:K,allowUserMedia:K,alpha:K,alt:null,as:null,async:K,autoCapitalize:null,autoComplete:Op,autoFocus:K,autoPlay:K,blocking:Op,capture:null,charSet:null,checked:K,cite:null,className:Op,closedBy:null,colorSpace:null,cols:q,colSpan:q,command:null,commandFor:null,content:null,contentEditable:Ep,controls:K,controlsList:Op,coords:q|kp,crossOrigin:null,data:null,dateTime:null,decoding:null,default:K,defer:K,dir:null,dirName:null,disabled:K,download:Dp,draggable:Ep,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:K,formTarget:null,headers:Op,height:q,hidden:Dp,high:q,href:null,hrefLang:null,htmlFor:Op,httpEquiv:Op,id:null,imageSizes:null,imageSrcSet:null,inert:K,inputMode:null,integrity:null,is:null,isMap:K,itemId:null,itemProp:Op,itemRef:Op,itemScope:K,itemType:Op,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:K,low:q,manifest:null,max:null,maxLength:q,media:null,method:null,min:null,minLength:q,multiple:K,muted:K,name:null,nonce:null,noModule:K,noValidate:K,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:K,optimum:q,pattern:null,ping:Op,placeholder:null,playsInline:K,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:K,referrerPolicy:null,rel:Op,required:K,reversed:K,rows:q,rowSpan:q,sandbox:Op,scope:null,scoped:K,seamless:K,selected:K,shadowRootClonable:K,shadowRootCustomElementRegistry:K,shadowRootDelegatesFocus:K,shadowRootMode:null,shadowRootSerializable:K,shape:null,size:q,sizes:null,slot:null,span:q,spellCheck:Ep,src:null,srcDoc:null,srcLang:null,srcSet:null,start:q,step:null,style:null,tabIndex:q,target:null,title:null,translate:null,type:null,typeMustMatch:K,useMap:null,value:Ep,width:q,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:Op,axis:null,background:null,bgColor:null,border:q,borderColor:null,bottomMargin:q,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:K,declare:K,event:null,face:null,frame:null,frameBorder:null,hSpace:q,leftMargin:q,link:null,longDesc:null,lowSrc:null,marginHeight:q,marginWidth:q,noResize:K,noHref:K,noShade:K,noWrap:K,object:null,profile:null,prompt:null,rev:null,rightMargin:q,rules:null,scheme:null,scrolling:Ep,standby:null,summary:null,text:null,topMargin:q,valueType:null,version:null,vAlign:null,vLink:null,vSpace:q,allowTransparency:null,autoCorrect:null,autoSave:null,credentialless:K,disablePictureInPicture:K,disableRemotePlayback:K,exportParts:kp,part:Op,prefix:null,property:null,results:q,security:null,unselectable:null},space:`html`,transform:Rp}),Bp=Fp({attributes:{accentHeight:`accent-height`,alignmentBaseline:`alignment-baseline`,arabicForm:`arabic-form`,baselineShift:`baseline-shift`,capHeight:`cap-height`,className:`class`,clipPath:`clip-path`,clipRule:`clip-rule`,colorInterpolation:`color-interpolation`,colorInterpolationFilters:`color-interpolation-filters`,colorProfile:`color-profile`,colorRendering:`color-rendering`,crossOrigin:`crossorigin`,dataType:`datatype`,dominantBaseline:`dominant-baseline`,enableBackground:`enable-background`,fillOpacity:`fill-opacity`,fillRule:`fill-rule`,floodColor:`flood-color`,floodOpacity:`flood-opacity`,fontFamily:`font-family`,fontSize:`font-size`,fontSizeAdjust:`font-size-adjust`,fontStretch:`font-stretch`,fontStyle:`font-style`,fontVariant:`font-variant`,fontWeight:`font-weight`,glyphName:`glyph-name`,glyphOrientationHorizontal:`glyph-orientation-horizontal`,glyphOrientationVertical:`glyph-orientation-vertical`,hrefLang:`hreflang`,horizAdvX:`horiz-adv-x`,horizOriginX:`horiz-origin-x`,horizOriginY:`horiz-origin-y`,imageRendering:`image-rendering`,letterSpacing:`letter-spacing`,lightingColor:`lighting-color`,markerEnd:`marker-end`,markerMid:`marker-mid`,markerStart:`marker-start`,maskType:`mask-type`,navDown:`nav-down`,navDownLeft:`nav-down-left`,navDownRight:`nav-down-right`,navLeft:`nav-left`,navNext:`nav-next`,navPrev:`nav-prev`,navRight:`nav-right`,navUp:`nav-up`,navUpLeft:`nav-up-left`,navUpRight:`nav-up-right`,onAbort:`onabort`,onActivate:`onactivate`,onAfterPrint:`onafterprint`,onBeforePrint:`onbeforeprint`,onBegin:`onbegin`,onCancel:`oncancel`,onCanPlay:`oncanplay`,onCanPlayThrough:`oncanplaythrough`,onChange:`onchange`,onClick:`onclick`,onClose:`onclose`,onCopy:`oncopy`,onCueChange:`oncuechange`,onCut:`oncut`,onDblClick:`ondblclick`,onDrag:`ondrag`,onDragEnd:`ondragend`,onDragEnter:`ondragenter`,onDragExit:`ondragexit`,onDragLeave:`ondragleave`,onDragOver:`ondragover`,onDragStart:`ondragstart`,onDrop:`ondrop`,onDurationChange:`ondurationchange`,onEmptied:`onemptied`,onEnd:`onend`,onEnded:`onended`,onError:`onerror`,onFocus:`onfocus`,onFocusIn:`onfocusin`,onFocusOut:`onfocusout`,onHashChange:`onhashchange`,onInput:`oninput`,onInvalid:`oninvalid`,onKeyDown:`onkeydown`,onKeyPress:`onkeypress`,onKeyUp:`onkeyup`,onLoad:`onload`,onLoadedData:`onloadeddata`,onLoadedMetadata:`onloadedmetadata`,onLoadStart:`onloadstart`,onMessage:`onmessage`,onMouseDown:`onmousedown`,onMouseEnter:`onmouseenter`,onMouseLeave:`onmouseleave`,onMouseMove:`onmousemove`,onMouseOut:`onmouseout`,onMouseOver:`onmouseover`,onMouseUp:`onmouseup`,onMouseWheel:`onmousewheel`,onOffline:`onoffline`,onOnline:`ononline`,onPageHide:`onpagehide`,onPageShow:`onpageshow`,onPaste:`onpaste`,onPause:`onpause`,onPlay:`onplay`,onPlaying:`onplaying`,onPopState:`onpopstate`,onProgress:`onprogress`,onRateChange:`onratechange`,onRepeat:`onrepeat`,onReset:`onreset`,onResize:`onresize`,onScroll:`onscroll`,onSeeked:`onseeked`,onSeeking:`onseeking`,onSelect:`onselect`,onShow:`onshow`,onStalled:`onstalled`,onStorage:`onstorage`,onSubmit:`onsubmit`,onSuspend:`onsuspend`,onTimeUpdate:`ontimeupdate`,onToggle:`ontoggle`,onUnload:`onunload`,onVolumeChange:`onvolumechange`,onWaiting:`onwaiting`,onZoom:`onzoom`,overlinePosition:`overline-position`,overlineThickness:`overline-thickness`,paintOrder:`paint-order`,panose1:`panose-1`,pointerEvents:`pointer-events`,referrerPolicy:`referrerpolicy`,renderingIntent:`rendering-intent`,shapeRendering:`shape-rendering`,stopColor:`stop-color`,stopOpacity:`stop-opacity`,strikethroughPosition:`strikethrough-position`,strikethroughThickness:`strikethrough-thickness`,strokeDashArray:`stroke-dasharray`,strokeDashOffset:`stroke-dashoffset`,strokeLineCap:`stroke-linecap`,strokeLineJoin:`stroke-linejoin`,strokeMiterLimit:`stroke-miterlimit`,strokeOpacity:`stroke-opacity`,strokeWidth:`stroke-width`,tabIndex:`tabindex`,textAnchor:`text-anchor`,textDecoration:`text-decoration`,textRendering:`text-rendering`,transformOrigin:`transform-origin`,typeOf:`typeof`,underlinePosition:`underline-position`,underlineThickness:`underline-thickness`,unicodeBidi:`unicode-bidi`,unicodeRange:`unicode-range`,unitsPerEm:`units-per-em`,vAlphabetic:`v-alphabetic`,vHanging:`v-hanging`,vIdeographic:`v-ideographic`,vMathematical:`v-mathematical`,vectorEffect:`vector-effect`,vertAdvY:`vert-adv-y`,vertOriginX:`vert-origin-x`,vertOriginY:`vert-origin-y`,wordSpacing:`word-spacing`,writingMode:`writing-mode`,xHeight:`x-height`,playbackOrder:`playbackorder`,timelineBegin:`timelinebegin`},properties:{about:Ap,accentHeight:q,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:q,amplitude:q,arabicForm:null,ascent:q,attributeName:null,attributeType:null,azimuth:q,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:q,by:null,calcMode:null,capHeight:q,className:Op,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:q,diffuseConstant:q,direction:null,display:null,dur:null,divisor:q,dominantBaseline:null,download:K,dx:null,dy:null,edgeMode:null,editable:null,elevation:q,enableBackground:null,end:null,event:null,exponent:q,externalResourcesRequired:null,fill:null,fillOpacity:q,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:kp,g2:kp,glyphName:kp,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:q,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:q,horizOriginX:q,horizOriginY:q,id:null,ideographic:q,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:q,k:q,k1:q,k2:q,k3:q,k4:q,kernelMatrix:Ap,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:q,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskType:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:q,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:q,overlineThickness:q,paintOrder:null,panose1:null,path:null,pathLength:q,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:Op,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:q,pointsAtY:q,pointsAtZ:q,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:Ap,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:Ap,rev:Ap,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:Ap,requiredFeatures:Ap,requiredFonts:Ap,requiredFormats:Ap,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:q,specularExponent:q,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:q,strikethroughThickness:q,string:null,stroke:null,strokeDashArray:Ap,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:q,strokeOpacity:q,strokeWidth:null,style:null,surfaceScale:q,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:Ap,tabIndex:q,tableValues:null,target:null,targetX:q,targetY:q,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:Ap,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:q,underlineThickness:q,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:q,values:null,vAlphabetic:q,vMathematical:q,vectorEffect:null,vHanging:q,vIdeographic:q,version:null,vertAdvY:q,vertOriginX:q,vertOriginY:q,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:q,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:`svg`,transform:Lp}),Vp=Fp({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:`xlink`,transform(e,t){return`xlink:`+t.slice(5).toLowerCase()}}),Hp=Fp({attributes:{xmlnsxlink:`xmlns:xlink`},properties:{xmlnsXLink:null,xmlns:null},space:`xmlns`,transform:Rp}),Up=Fp({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:`xml`,transform(e,t){return`xml:`+t.slice(3).toLowerCase()}}),Wp={classId:`classID`,dataType:`datatype`,itemId:`itemID`,strokeDashArray:`strokeDasharray`,strokeDashOffset:`strokeDashoffset`,strokeLineCap:`strokeLinecap`,strokeLineJoin:`strokeLinejoin`,strokeMiterLimit:`strokeMiterlimit`,typeOf:`typeof`,xLinkActuate:`xlinkActuate`,xLinkArcRole:`xlinkArcrole`,xLinkHref:`xlinkHref`,xLinkRole:`xlinkRole`,xLinkShow:`xlinkShow`,xLinkTitle:`xlinkTitle`,xLinkType:`xlinkType`,xmlnsXLink:`xmlnsXlink`},Gp=/[A-Z]/g,Kp=/-[a-z]/g,qp=/^data[-\w.:]+$/i;function Jp(e,t){let n=Sp(t),r=t,i=Cp;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)===`data`&&qp.test(t)){if(t.charAt(4)===`-`){let e=t.slice(5).replace(Kp,Xp);r=`data`+e.charAt(0).toUpperCase()+e.slice(1)}else{let e=t.slice(4);if(!Kp.test(e)){let n=e.replace(Gp,Yp);n.charAt(0)!==`-`&&(n=`-`+n),t=`data`+n}}i=Np}return new i(r,t)}function Yp(e){return`-`+e.toLowerCase()}function Xp(e){return e.charAt(1).toUpperCase()}var Zp=xp([Ip,zp,Vp,Hp,Up],`html`),Qp=xp([Ip,Bp,Vp,Hp,Up],`svg`);function $p(e){return e.join(` `).trim()}var em=/\/\*(?:[^*]|\*(?!\/))*\*\//g,tm=/\n/g,nm=/^\s*/,rm=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,im=/^:\s*/,am=/^((?:'(?:\\.|[^'\\])*'|"(?:\\.|[^"\\])*"|url\((?:'(?:\\.|[^'\\])*'|"(?:\\.|[^"\\])*"|[^)]*)\)|[^};])+)/,om=/^[;\s]*/,sm=`
15
- `,cm=`/`,lm=`*`,um=``,dm=`comment`,fm=`declaration`;function pm(e,t){if(typeof e!=`string`)throw TypeError(`First argument must be a string`);if(!e)return[];t||={};var n=1,r=1;function i(e){var t=e.match(tm);t&&(n+=t.length);var i=e.lastIndexOf(sm);r=~i?e.length-i:r+e.length}function a(){var e={line:n,column:r};return function(t){return t.position=new o(e),l(),t}}function o(e){this.start=e,this.end={line:n,column:r},this.source=t.source}o.prototype.content=e;function s(i){var a=Error(t.source+`:`+n+`:`+r+`: `+i);if(a.reason=i,a.filename=t.source,a.line=n,a.column=r,a.source=e,!t.silent)throw a}function c(t){var n=t.exec(e);if(n){var r=n[0];return i(r),e=e.slice(r.length),n}}function l(){c(nm)}function u(e){for(var t;t=d();)e.push(t);return e}function d(){var t=a();if(cm==e.charAt(0)&&lm==e.charAt(1)){for(var n=2;um!=e.charAt(n)&&(lm!=e.charAt(n)||cm!=e.charAt(n+1));)++n;if(n+=2,um===e.charAt(n-1))return s(`End of comment missing`);var o=e.slice(2,n-2);return r+=2,i(o),e=e.slice(n),r+=2,t({type:dm,comment:o})}}function f(){var e=a(),t=c(rm);if(t){if(d(),!c(im))return s(`property missing ':'`);var n=c(am),r=e({type:fm,property:t[0].replace(em,um).trim(),value:n?n[0].replace(em,um).trim():um});return c(om),r}}function p(){var e=[];u(e);for(var t;t=f();)e.push(t),u(e);return e}return l(),p()}function mm(e,t){let n=null;if(!e||typeof e!=`string`)return n;let r=pm(e),i=typeof t==`function`;return r.forEach(e=>{if(e.type!==`declaration`)return;let{property:r,value:a}=e;i?t(r,a,e):a&&(n??={},n[r]=a)}),n}var hm=_m(`end`),gm=_m(`start`);function _m(e){return t;function t(t){let n=t&&t.position&&t.position[e]||{};if(typeof n.line==`number`&&n.line>0&&typeof n.column==`number`&&n.column>0)return{line:n.line,column:n.column,offset:typeof n.offset==`number`&&n.offset>-1?n.offset:void 0}}}function vm(e){let t=gm(e),n=hm(e);if(t&&n)return{start:t,end:n}}function ym(e){return!e||typeof e!=`object`?``:`position`in e||`type`in e?xm(e.position):`start`in e||`end`in e?xm(e):`line`in e||`column`in e?bm(e):``}function bm(e){return Sm(e&&e.line)+`:`+Sm(e&&e.column)}function xm(e){return bm(e&&e.start)+`-`+bm(e&&e.end)}function Sm(e){return e&&typeof e==`number`?e:1}var Cm=class extends Error{constructor(e,t,n){super(),typeof t==`string`&&(n=t,t=void 0);let r=``,i={},a=!1;if(t&&(i=`line`in t&&`column`in t||`start`in t&&`end`in t?{place:t}:`type`in t?{ancestors:[t],place:t.position}:{...t}),typeof e==`string`?r=e:!i.cause&&e&&(a=!0,r=e.message,i.cause=e),!i.ruleId&&!i.source&&typeof n==`string`){let e=n.indexOf(`:`);e===-1?i.ruleId=n:(i.source=n.slice(0,e),i.ruleId=n.slice(e+1))}if(!i.place&&i.ancestors){let e=i.ancestors[i.ancestors.length-1];e&&(i.place=e.position)}let o=i.place&&`start`in i.place?i.place.start:i.place;this.ancestors=i.ancestors||void 0,this.cause=i.cause||void 0,this.column=o?o.column:void 0,this.fatal=void 0,this.file=``,this.message=r,this.line=o?o.line:void 0,this.name=ym(i.place)||`1:1`,this.place=i.place||void 0,this.reason=this.message,this.ruleId=i.ruleId||void 0,this.source=i.source||void 0,this.stack=a&&i.cause&&typeof i.cause.stack==`string`?i.cause.stack:``,this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}};Object.defineProperties(Cm.prototype,{file:{configurable:!0,enumerable:!0,value:``,writable:!0},name:{configurable:!0,enumerable:!0,value:``,writable:!0},reason:{configurable:!0,enumerable:!0,value:``,writable:!0},message:{configurable:!0,enumerable:!0,value:``,writable:!0},stack:{configurable:!0,enumerable:!0,value:``,writable:!0},column:{configurable:!0,enumerable:!0,writable:!0},line:{configurable:!0,enumerable:!0,writable:!0},ancestors:{configurable:!0,enumerable:!0,writable:!0},cause:{configurable:!0,enumerable:!0,writable:!0},fatal:{configurable:!0,enumerable:!0,writable:!0},place:{configurable:!0,enumerable:!0,writable:!0},ruleId:{configurable:!0,enumerable:!0,writable:!0},source:{configurable:!0,enumerable:!0,writable:!0}});var wm={}.hasOwnProperty,Tm=new Map,Em=/[A-Z]/g,Dm=/-([a-z])/g,Om=new Set([`table`,`tbody`,`thead`,`tfoot`,`tr`]),km=new Set([`td`,`th`]),Am=`https://github.com/syntax-tree/hast-util-to-jsx-runtime`;function jm(e,t){if(!t||t.Fragment===void 0)throw TypeError("Expected `Fragment` in options");let n=t.filePath||void 0,r;if(t.development){if(typeof t.jsxDEV!=`function`)throw TypeError("Expected `jsxDEV` in options when `development: true`");r=Hm(n,t.jsxDEV)}else{if(typeof t.jsx!=`function`)throw TypeError("Expected `jsx` in production options");if(typeof t.jsxs!=`function`)throw TypeError("Expected `jsxs` in production options");r=Vm(n,t.jsx,t.jsxs)}let i={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:r,elementAttributeNameCase:t.elementAttributeNameCase||`react`,evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:n,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:t.passKeys!==!1,passNode:t.passNode||!1,schema:t.space===`svg`?Qp:Zp,stylePropertyNameCase:t.stylePropertyNameCase||`dom`,tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},a=Mm(i,e,void 0);return a&&typeof a!=`string`?a:i.create(e,i.Fragment,{children:a||void 0},void 0)}function Mm(e,t,n){if(t.type===`element`)return Nm(e,t,n);if(t.type===`mdxFlowExpression`||t.type===`mdxTextExpression`)return Pm(e,t);if(t.type===`mdxJsxFlowElement`||t.type===`mdxJsxTextElement`)return Im(e,t,n);if(t.type===`mdxjsEsm`)return Fm(e,t);if(t.type===`root`)return Lm(e,t,n);if(t.type===`text`)return Rm(e,t)}function Nm(e,t,n){let r=e.schema,i=r;t.tagName.toLowerCase()===`svg`&&r.space===`html`&&(i=Qp,e.schema=i),e.ancestors.push(t);let a=Jm(e,t.tagName,!1),o=Um(e,t),s=Gm(e,t);return Om.has(t.tagName)&&(s=s.filter(function(e){return typeof e!=`string`||!vp(e)})),zm(e,o,a,t),Bm(o,s),e.ancestors.pop(),e.schema=r,e.create(t,a,o,n)}function Pm(e,t){if(t.data&&t.data.estree&&e.evaluater){let n=t.data.estree.body[0];return n.type,e.evaluater.evaluateExpression(n.expression)}Ym(e,t.position)}function Fm(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);Ym(e,t.position)}function Im(e,t,n){let r=e.schema,i=r;t.name===`svg`&&r.space===`html`&&(i=Qp,e.schema=i),e.ancestors.push(t);let a=t.name===null?e.Fragment:Jm(e,t.name,!0),o=Wm(e,t),s=Gm(e,t);return zm(e,o,a,t),Bm(o,s),e.ancestors.pop(),e.schema=r,e.create(t,a,o,n)}function Lm(e,t,n){let r={};return Bm(r,Gm(e,t)),e.create(t,e.Fragment,r,n)}function Rm(e,t){return t.value}function zm(e,t,n,r){typeof n!=`string`&&n!==e.Fragment&&e.passNode&&(t.node=r)}function Bm(e,t){if(t.length>0){let n=t.length>1?t:t[0];n&&(e.children=n)}}function Vm(e,t,n){return r;function r(e,r,i,a){let o=Array.isArray(i.children)?n:t;return a?o(r,i,a):o(r,i)}}function Hm(e,t){return n;function n(n,r,i,a){let o=Array.isArray(i.children),s=gm(n);return t(r,i,a,o,{columnNumber:s?s.column-1:void 0,fileName:e,lineNumber:s?s.line:void 0},void 0)}}function Um(e,t){let n={},r,i;for(i in t.properties)if(i!==`children`&&wm.call(t.properties,i)){let a=Km(e,i,t.properties[i]);if(a){let[i,o]=a;e.tableCellAlignToStyle&&i===`align`&&typeof o==`string`&&km.has(t.tagName)?r=o:n[i]=o}}if(r){let t=n.style||={};t[e.stylePropertyNameCase===`css`?`text-align`:`textAlign`]=r}return n}function Wm(e,t){let n={};for(let r of t.attributes)if(r.type===`mdxJsxExpressionAttribute`){if(r.data&&r.data.estree&&e.evaluater){let t=r.data.estree.body[0];t.type;let i=t.expression;i.type;let a=i.properties[0];a.type,Object.assign(n,e.evaluater.evaluateExpression(a.argument))}else Ym(e,t.position)}else{let{name:i}=r,a;if(r.value&&typeof r.value==`object`){if(r.value.data&&r.value.data.estree&&e.evaluater){let t=r.value.data.estree.body[0];t.type,a=e.evaluater.evaluateExpression(t.expression)}else Ym(e,t.position)}else a=r.value===null||r.value;n[i]=a}return n}function Gm(e,t){let n=[],r=-1,i=e.passKeys?new Map:Tm;for(;++r<t.children.length;){let a=t.children[r],o;if(e.passKeys){let e=a.type===`element`?a.tagName:a.type===`mdxJsxFlowElement`||a.type===`mdxJsxTextElement`?a.name:void 0;if(e){let t=i.get(e)||0;o=e+`-`+t,i.set(e,t+1)}}let s=Mm(e,a,o);s!==void 0&&n.push(s)}return n}function Km(e,t,n){if(n==null||typeof n==`number`&&Number.isNaN(n))return;let r=Jp(e.schema,t);return Array.isArray(n)&&(n=r.commaSeparated?fp(n):$p(n)),r.property===`style`?[`style`,typeof n==`object`?e.stylePropertyNameCase===`dom`?n:Xm(n):qm(e,String(n))]:[e.elementAttributeNameCase===`react`&&r.space?Wp[r.property]||r.property:r.attribute,n]}function qm(e,t){let n={};try{mm(t,function(t,r){if(t&&r){let i=t;i.slice(0,2)!==`--`&&(i=i.toLowerCase(),e.stylePropertyNameCase===`dom`&&(i.slice(0,4)===`-ms-`&&(i=i.slice(1)),i=i.replace(Dm,$m))),n[i]=r}})}catch(t){if(e.ignoreInvalidStyle)return{};let n=t,r=new Cm("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:n,ruleId:`style`,source:`hast-util-to-jsx-runtime`});throw r.file=e.filePath||void 0,r.url=Am+`#cannot-parse-style-attribute`,r}return n}function Jm(e,t,n){let r;if(!n)r={type:`Literal`,value:t};else if(t.includes(`.`)){let e=t.split(`.`),n=-1,i;for(;++n<e.length;){let t=gp(e[n])?{type:`Identifier`,name:e[n]}:{type:`Literal`,value:e[n]};i=i?{type:`MemberExpression`,object:i,property:t,computed:!!(n&&t.type===`Literal`),optional:!1}:t}r=i}else r=gp(t)&&!/^[a-z]/.test(t)?{type:`Identifier`,name:t}:{type:`Literal`,value:t};if(r.type===`Literal`){let t=r.value;return wm.call(e.components,t)?e.components[t]:t}if(e.evaluater)return e.evaluater.evaluateExpression(r);Ym(e)}function Ym(e,t){let n=new Cm("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:t,ruleId:`mdx-estree`,source:`hast-util-to-jsx-runtime`});throw n.file=e.filePath||void 0,n.url=Am+`#cannot-handle-mdx-estrees-without-createevaluater`,n}function Xm(e){let t={},n;for(n in e)wm.call(e,n)&&(t[Zm(n)]=e[n]);return t}function Zm(e){if(e.slice(0,2)===`--`)return e;let t=e.replace(Em,Qm);return t.slice(0,3)===`ms-`&&(t=`-`+t),t}function Qm(e){return`-`+e.toLowerCase()}function $m(e,t){return t.toUpperCase()}var eh={action:[`form`],cite:[`blockquote`,`del`,`ins`,`q`],data:[`object`],formAction:[`button`,`input`],href:[`a`,`area`,`base`,`link`],icon:[`menuitem`],itemId:null,manifest:[`html`],ping:[`a`,`area`],poster:[`video`],src:[`audio`,`embed`,`iframe`,`img`,`input`,`script`,`source`,`track`,`video`]},th={};function nh(e,t){let n=t||th;return rh(e,typeof n.includeImageAlt!=`boolean`||n.includeImageAlt,typeof n.includeHtml!=`boolean`||n.includeHtml)}function rh(e,t,n){if(ah(e)){if(`value`in e)return e.type===`html`&&!n?``:e.value;if(t&&`alt`in e&&e.alt)return e.alt;if(`children`in e)return ih(e.children,t,n)}return Array.isArray(e)?ih(e,t,n):``}function ih(e,t,n){let r=[],i=-1;for(;++i<e.length;)r[i]=rh(e[i],t,n);return r.join(``)}function ah(e){return!!(e&&typeof e==`object`)}var oh=document.createElement(`i`);function sh(e){let t=`&`+e+`;`;oh.innerHTML=t;let n=oh.textContent;return n.charCodeAt(n.length-1)===59&&e!==`semi`?!1:n!==t&&n}function ch(e,t,n,r){let i=e.length,a=0,o;if(t=t<0?-t>i?0:i+t:t>i?i:t,n=n>0?n:0,r.length<1e4)o=Array.from(r),o.unshift(t,n),e.splice(...o);else for(n&&e.splice(t,n);a<r.length;)o=r.slice(a,a+1e4),o.unshift(t,0),e.splice(...o),a+=1e4,t+=1e4}function lh(e,t){return e.length>0?(ch(e,e.length,0,t),e):t}var uh={}.hasOwnProperty;function dh(e){let t={},n=-1;for(;++n<e.length;)fh(t,e[n]);return t}function fh(e,t){let n;for(n in t){let r=(uh.call(e,n)?e[n]:void 0)||(e[n]={}),i=t[n],a;if(i)for(a in i){uh.call(r,a)||(r[a]=[]);let e=i[a];ph(r[a],Array.isArray(e)?e:e?[e]:[])}}}function ph(e,t){let n=-1,r=[];for(;++n<t.length;)(t[n].add===`after`?e:r).push(t[n]);ch(e,0,0,r)}function mh(e,t){let n=Number.parseInt(e,t);return n<9||n===11||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||(n&65535)==65535||(n&65535)==65534||n>1114111?`�`:String.fromCodePoint(n)}function hh(e){return e.replace(/[\t\n\r ]+/g,` `).replace(/^ | $/g,``).toLowerCase().toUpperCase()}var gh=Eh(/[A-Za-z]/),_h=Eh(/[\dA-Za-z]/),vh=Eh(/[#-'*+\--9=?A-Z^-~]/);function yh(e){return e!==null&&(e<32||e===127)}var bh=Eh(/\d/),xh=Eh(/[\dA-Fa-f]/),Sh=Eh(/[!-/:-@[-`{-~]/);function J(e){return e!==null&&e<-2}function Ch(e){return e!==null&&(e<0||e===32)}function Y(e){return e===-2||e===-1||e===32}var wh=Eh(/\p{P}|\p{S}/u),Th=Eh(/\s/);function Eh(e){return t;function t(t){return t!==null&&t>-1&&e.test(String.fromCharCode(t))}}function Dh(e){let t=[],n=-1,r=0,i=0;for(;++n<e.length;){let a=e.charCodeAt(n),o=``;if(a===37&&_h(e.charCodeAt(n+1))&&_h(e.charCodeAt(n+2)))i=2;else if(a<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(a))||(o=String.fromCharCode(a));else if(a>55295&&a<57344){let t=e.charCodeAt(n+1);a<56320&&t>56319&&t<57344?(o=String.fromCharCode(a,t),i=1):o=`�`}else o=String.fromCharCode(a);o&&=(t.push(e.slice(r,n),encodeURIComponent(o)),r=n+i+1,``),i&&=(n+=i,0)}return t.join(``)+e.slice(r)}function Oh(e,t,n,r){let i=r?r-1:1/0,a=0;return o;function o(r){return Y(r)?(e.enter(n),s(r)):t(r)}function s(r){return Y(r)&&a++<i?(e.consume(r),s):(e.exit(n),t(r))}}function kh(e,t,n,r,i,a){let o=0;return s;function s(t){return a>0&&Y(t)?(e.enter(r),c(t)):l(t)}function c(t){return Y(t)&&o<a?(e.consume(t),o++,c):(e.exit(r),l(t))}function l(e){return o>=i?t(e):n(e)}}var Ah={tokenize:jh};function jh(e){let t=e.attempt(this.parser.constructs.contentInitial,r,i),n;return t;function r(n){if(n===null)e.consume(n);else return e.enter(`lineEnding`),e.consume(n),e.exit(`lineEnding`),Oh(e,t,`linePrefix`)}function i(t){return e.enter(`paragraph`),a(t)}function a(t){let r=e.enter(`chunkText`,{contentType:`text`,previous:n});return n&&(n.next=r),n=r,o(t)}function o(t){if(t===null)e.exit(`chunkText`),e.exit(`paragraph`),e.consume(t);else return J(t)?(e.consume(t),e.exit(`chunkText`),a):(e.consume(t),o)}}var Mh=class{constructor(){this.index=new Map,this.map=[]}add(e,t,n){Nh(this,e,t,n,!1)}addBefore(e,t,n){Nh(this,e,t,n,!0)}consume(e){if(this.map.sort(function(e,t){return e[0]-t[0]}),this.map.length===0)return;let t=this.map.length,n=[];for(;t>0;)--t,n.push(e.slice(this.map[t][0]+this.map[t][1]),this.map[t][2]),e.length=this.map[t][0];n.push(e.slice()),e.length=0;let r=n.pop();for(;r;){for(let t of r)e.push(t);r=n.pop()}this.map.length=0,this.index.clear()}};function Nh(e,t,n,r,i){if(n===0&&r.length===0)return;let a=e.index.get(t);if(a){a[1]+=n,i?(r.push(...a[2]),a[2]=r):a[2].push(...r);return}let o=[t,n,r];e.map.push(o),e.index.set(t,o)}var Ph={tokenize:Ih},Fh={tokenize:Lh};function Ih(e){let t=this,n=[],r=0,i,a,o;return s;function s(i){if(r<n.length){let a=n[r];return t.containerState=a[1],e.attempt(a[0].continuation,c,l)(i)}return l(i)}function c(e){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,i&&v();let n=t.events.length,a=n,o;for(;a--;)if(t.events[a][0]===`exit`&&t.events[a][1].type===`chunkFlow`){o=t.events[a][1].end;break}_(r);let s=n;for(;s<t.events.length;)t.events[s][1].end={...o},s++;let c=new Mh;return c.add(a+1,0,t.events.slice(n)),c.add(n,s-n,[]),c.consume(t.events),l(e)}return s(e)}function l(a){if(r===n.length){if(!i)return f(a);if(i.currentConstruct&&i.currentConstruct.concrete)return m(a);t.interrupt=!(!i.currentConstruct||i._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(Fh,u,d)(a)}function u(e){return i&&v(),_(r),f(e)}function d(e){return t.parser.lazy[t.now().line]=r!==n.length,o=t.now().offset,m(e)}function f(n){return t.containerState={},e.attempt(Fh,p,m)(n)}function p(e){return r++,n.push([t.currentConstruct,t.containerState]),f(e)}function m(n){if(n===null)i&&v(),_(0),e.consume(n);else return i||=t.parser.flow(t.now()),e.enter(`chunkFlow`,{_tokenizer:i,contentType:`flow`,previous:a}),h(n)}function h(n){if(n===null)g(e.exit(`chunkFlow`),!0),_(0),e.consume(n);else return J(n)?(e.consume(n),g(e.exit(`chunkFlow`)),r=0,t.interrupt=void 0,s):(e.consume(n),h)}function g(e,n){let s=t.sliceStream(e);if(n&&s.push(null),e.previous=a,a&&(a.next=e),a=e,i.defineSkip(e.start),i.write(s),t.parser.lazy[e.start.line]){let e=i.events.length;for(;e--;)if(i.events[e][1].start.offset<o&&(!i.events[e][1].end||i.events[e][1].end.offset>o))return;let n=t.events.length,a=n,s,c;for(;a--;)if(t.events[a][0]===`exit`&&t.events[a][1].type===`chunkFlow`){if(s){c=t.events[a][1].end;break}s=!0}for(_(r),e=n;e<t.events.length;)t.events[e][1].end={...c},e++;let l=new Mh;l.add(a+1,0,t.events.slice(n)),l.add(n,e-n,[]),l.consume(t.events)}}function _(r){let i=n.length;for(;i-->r;){let r=n[i];t.containerState=r[1],r[0].exit.call(t,e)}n.length=r}function v(){i.write([null]),a=void 0,i=void 0,t.containerState._closeFlow=void 0}}function Lh(e,t,n){return Oh(e,e.attempt(this.parser.constructs.document,t,n),`linePrefix`,this.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)}function Rh(e){if(e===null||Ch(e)||Th(e))return 1;if(wh(e))return 2}function zh(e,t,n){let r=[],i=-1;for(;++i<e.length;){let a=e[i].resolveAll;a&&!r.includes(a)&&(t=a(t,n),r.push(a))}return t}var Bh={name:`attention`,resolveAll:Vh,tokenize:Hh};function Vh(e,t){let n=-1,r;for(;++n<e.length;)if(e[n][0]===`enter`&&e[n][1].type===`attentionSequence`&&e[n][1]._close){let i=n;for(;i--;)if(e[i][0]===`exit`&&e[i][1].type===`attentionSequence`&&e[i][1]._open&&t.sliceSerialize(e[i][1]).charCodeAt(0)===t.sliceSerialize(e[n][1]).charCodeAt(0)){if((e[i][1]._close||e[n][1]._open)&&(e[n][1].end.offset-e[n][1].start.offset)%3&&!((e[i][1].end.offset-e[i][1].start.offset+e[n][1].end.offset-e[n][1].start.offset)%3))continue;let a=e[i][1].end.offset-e[i][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1,o={...e[i][1].end},s={...e[n][1].start};Uh(o,-a),Uh(s,a);let c={type:a>1?`strongSequence`:`emphasisSequence`,start:o,end:{...e[i][1].end}},l={type:a>1?`strongSequence`:`emphasisSequence`,start:{...e[n][1].start},end:s},u={type:a>1?`strongText`:`emphasisText`,start:{...e[i][1].end},end:{...e[n][1].start}},d={type:a>1?`strong`:`emphasis`,start:{...c.start},end:{...l.end}};e[i][1].end={...c.start},e[n][1].start={...l.end},r=[],e[i][1].end.offset-e[i][1].start.offset&&(r=lh(r,[[`enter`,e[i][1],t],[`exit`,e[i][1],t]])),r=lh(r,[[`enter`,d,t],[`enter`,c,t],[`exit`,c,t],[`enter`,u,t]]),r=lh(r,zh(t.parser.constructs.insideSpan.null,e.slice(i+1,n),t)),r=lh(r,[[`exit`,u,t],[`enter`,l,t],[`exit`,l,t],[`exit`,d,t]]);let f=0;e[n][1].end.offset-e[n][1].start.offset&&(f=2,r=lh(r,[[`enter`,e[n][1],t],[`exit`,e[n][1],t]])),ch(e,i-1,n-i+3,r),n=i+r.length-f-2;break}}for(n=-1;++n<e.length;)e[n][1].type===`attentionSequence`&&(e[n][1].type=`data`);return e}function Hh(e,t){let n=this.parser.constructs.attentionMarkers.null,r=this.previous,i=Rh(r),a;return o;function o(t){return a=t,e.enter(`attentionSequence`),s(t)}function s(o){if(o===a)return e.consume(o),s;let c=e.exit(`attentionSequence`),l=Rh(o),u=!l||l===2&&i||n.includes(o)&&o!==42&&o!==95,d=!i||i===2&&l||n.includes(r)&&r!==42&&r!==95;return c._open=!!(a===42?u:u&&(i||!d)),c._close=!!(a===42?d:d&&(l||!u)),t(o)}}function Uh(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}var Wh={name:`autolink`,tokenize:Gh};function Gh(e,t,n){let r=0;return i;function i(t){return e.enter(`autolink`),e.enter(`autolinkMarker`),e.consume(t),e.exit(`autolinkMarker`),e.enter(`autolinkProtocol`),a}function a(t){return gh(t)?(e.consume(t),o):t===64?n(t):l(t)}function o(e){return e===43||e===45||e===46||_h(e)?(r=1,s(e)):l(e)}function s(t){return t===58?(e.consume(t),r=0,c):(t===43||t===45||t===46||_h(t))&&r++<32?(e.consume(t),s):(r=0,l(t))}function c(r){return r===62?(e.exit(`autolinkProtocol`),e.enter(`autolinkMarker`),e.consume(r),e.exit(`autolinkMarker`),e.exit(`autolink`),t):r===null||r===32||r===60||yh(r)?n(r):(e.consume(r),c)}function l(t){return t===64?(e.consume(t),u):vh(t)?(e.consume(t),l):n(t)}function u(e){return _h(e)?d(e):n(e)}function d(n){return n===46?(e.consume(n),r=0,u):n===62?(e.exit(`autolinkProtocol`).type=`autolinkEmail`,e.enter(`autolinkMarker`),e.consume(n),e.exit(`autolinkMarker`),e.exit(`autolink`),t):f(n)}function f(t){if((t===45||_h(t))&&r++<63){let n=t===45?f:d;return e.consume(t),n}return n(t)}}var Kh={partial:!0,tokenize:qh};function qh(e,t,n){return r;function r(t){return Y(t)?Oh(e,i,`linePrefix`)(t):i(t)}function i(e){return e===null||J(e)?t(e):n(e)}}var Jh={continuation:{tokenize:Xh},exit:Zh,name:`blockQuote`,tokenize:Yh};function Yh(e,t,n){let r=this;return i;function i(t){if(t===62){let n=r.containerState;return n.open||=(e.enter(`blockQuote`,{_container:!0}),!0),e.enter(`blockQuotePrefix`),e.enter(`blockQuoteMarker`),e.consume(t),e.exit(`blockQuoteMarker`),a}return n(t)}function a(n){return Y(n)?(e.enter(`blockQuotePrefixWhitespace`),e.consume(n),e.exit(`blockQuotePrefixWhitespace`),e.exit(`blockQuotePrefix`),t):(e.exit(`blockQuotePrefix`),t(n))}}function Xh(e,t,n){let r=this;return i;function i(t){return Y(t)?Oh(e,a,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):a(t)}function a(r){return e.attempt(Jh,t,n)(r)}}function Zh(e){e.exit(`blockQuote`)}var Qh={name:`characterEscape`,tokenize:$h};function $h(e,t,n){return r;function r(t){return e.enter(`characterEscape`),e.enter(`escapeMarker`),e.consume(t),e.exit(`escapeMarker`),i}function i(r){return Sh(r)?(e.enter(`characterEscapeValue`),e.consume(r),e.exit(`characterEscapeValue`),e.exit(`characterEscape`),t):n(r)}}var eg={name:`characterReference`,tokenize:tg};function tg(e,t,n){let r=this,i=0,a,o;return s;function s(t){return e.enter(`characterReference`),e.enter(`characterReferenceMarker`),e.consume(t),e.exit(`characterReferenceMarker`),c}function c(t){return t===35?(e.enter(`characterReferenceMarkerNumeric`),e.consume(t),e.exit(`characterReferenceMarkerNumeric`),l):(e.enter(`characterReferenceValue`),a=31,o=_h,u(t))}function l(t){return t===88||t===120?(e.enter(`characterReferenceMarkerHexadecimal`),e.consume(t),e.exit(`characterReferenceMarkerHexadecimal`),e.enter(`characterReferenceValue`),a=6,o=xh,u):(e.enter(`characterReferenceValue`),a=7,o=bh,u(t))}function u(s){if(s===59&&i){let i=e.exit(`characterReferenceValue`);return o===_h&&!sh(r.sliceSerialize(i))?n(s):(e.enter(`characterReferenceMarker`),e.consume(s),e.exit(`characterReferenceMarker`),e.exit(`characterReference`),t)}return o(s)&&i++<a?(e.consume(s),u):n(s)}}var ng={partial:!0,tokenize:rg};function rg(e,t,n){let r=this;return i;function i(t){return t===null?n(t):(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),a)}function a(e){return r.parser.lazy[r.now().line]?n(e):t(e)}}var ig={concrete:!0,name:`codeFenced`,tokenize:ag};function ag(e,t,n){let r=this,i={partial:!0,tokenize:x},a=0,o=0,s;return c;function c(e){return l(e)}function l(t){let n=r.events[r.events.length-1];return a=n&&n[1].type===`linePrefix`?n[2].sliceSerialize(n[1],!0).length:0,s=t,e.enter(`codeFenced`),e.enter(`codeFencedFence`),e.enter(`codeFencedFenceSequence`),u(t)}function u(t){return t===s?(o++,e.consume(t),u):o<3?n(t):(e.exit(`codeFencedFenceSequence`),Y(t)?Oh(e,d,`whitespace`)(t):d(t))}function d(n){return n===null||J(n)?(e.exit(`codeFencedFence`),r.interrupt?t(n):e.check(ng,h,b)(n)):(e.enter(`codeFencedFenceInfo`),e.enter(`chunkString`,{contentType:`string`}),f(n))}function f(t){return t===null||J(t)?(e.exit(`chunkString`),e.exit(`codeFencedFenceInfo`),d(t)):Y(t)?(e.exit(`chunkString`),e.exit(`codeFencedFenceInfo`),Oh(e,p,`whitespace`)(t)):t===96&&t===s?n(t):(e.consume(t),f)}function p(t){return t===null||J(t)?d(t):(e.enter(`codeFencedFenceMeta`),e.enter(`chunkString`,{contentType:`string`}),m(t))}function m(t){return t===null||J(t)?(e.exit(`chunkString`),e.exit(`codeFencedFenceMeta`),d(t)):t===96&&t===s?n(t):(e.consume(t),m)}function h(t){return e.attempt(i,b,g)(t)}function g(t){return e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),_}function _(t){return a>0&&Y(t)?Oh(e,v,`linePrefix`,a+1)(t):v(t)}function v(t){return t===null||J(t)?e.check(ng,h,b)(t):(e.enter(`codeFlowValue`),y(t))}function y(t){return t===null||J(t)?(e.exit(`codeFlowValue`),v(t)):(e.consume(t),y)}function b(n){return e.exit(`codeFenced`),t(n)}function x(e,t,n){let i=0;return a;function a(t){return e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),c}function c(t){return e.enter(`codeFencedFence`),Y(t)?Oh(e,l,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):l(t)}function l(t){return t===s?(e.enter(`codeFencedFenceSequence`),u(t)):n(t)}function u(t){return t===s?(i++,e.consume(t),u):i>=o?(e.exit(`codeFencedFenceSequence`),Y(t)?Oh(e,d,`whitespace`)(t):d(t)):n(t)}function d(r){return r===null||J(r)?(e.exit(`codeFencedFence`),t(r)):n(r)}}}var og={name:`codeIndented`,tokenize:cg},sg={partial:!0,tokenize:lg};function cg(e,t,n){return r;function r(t){return e.enter(`codeIndented`),kh(e,i,n,`linePrefix`,4,4)(t)}function i(t){return t===null?o(t):J(t)?e.attempt(sg,i,o)(t):(e.enter(`codeFlowValue`),a(t))}function a(t){return t===null||J(t)?(e.exit(`codeFlowValue`),i(t)):(e.consume(t),a)}function o(n){return e.exit(`codeIndented`),t(n)}}function lg(e,t,n){let r=this;return i;function i(o){return r.parser.lazy[r.now().line]?n(o):J(o)?(e.enter(`lineEnding`),e.consume(o),e.exit(`lineEnding`),i):kh(e,t,a,`linePrefix`,4,4)(o)}function a(e){return J(e)?i(e):n(e)}}var ug={name:`codeText`,previous:fg,resolve:dg,tokenize:pg};function dg(e){let t=e.length-4,n=3,r,i;if((e[n][1].type===`lineEnding`||e[n][1].type===`space`)&&(e[t][1].type===`lineEnding`||e[t][1].type===`space`)){for(r=n;++r<t;)if(e[r][1].type===`codeTextData`){e[n][1].type=`codeTextPadding`,e[t][1].type=`codeTextPadding`,n+=2,t-=2;break}}for(r=n-1,t++;++r<=t;)i===void 0?r!==t&&e[r][1].type!==`lineEnding`&&(i=r):(r===t||e[r][1].type===`lineEnding`)&&(e[i][1].type=`codeTextData`,r!==i+2&&(e[i][1].end=e[r-1][1].end,e.splice(i+2,r-i-2),t-=r-i-2,r=i+2),i=void 0);return e}function fg(e){return e!==96||this.events[this.events.length-1][1].type===`characterEscape`}function pg(e,t,n){let r=0,i,a;return o;function o(t){return e.enter(`codeText`),e.enter(`codeTextSequence`),s(t)}function s(t){return t===96?(e.consume(t),r++,s):(e.exit(`codeTextSequence`),c(t))}function c(t){return t===null?n(t):t===32?(e.enter(`space`),e.consume(t),e.exit(`space`),c):t===96?(a=e.enter(`codeTextSequence`),i=0,u(t)):J(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),c):(e.enter(`codeTextData`),l(t))}function l(t){return t===null||t===32||t===96||J(t)?(e.exit(`codeTextData`),c(t)):(e.consume(t),l)}function u(n){return n===96?(e.consume(n),i++,u):i===r?(e.exit(`codeTextSequence`),e.exit(`codeText`),t(n)):(a.type=`codeTextData`,l(n))}}var mg=class{constructor(e){this.left=e?[...e]:[],this.right=[]}get(e){if(e<0||e>=this.left.length+this.right.length)throw RangeError("Cannot access index `"+e+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return e<this.left.length?this.left[e]:this.right[this.right.length-e+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(e,t){let n=t??1/0;return n<this.left.length?this.left.slice(e,n):e>this.left.length?this.right.slice(this.right.length-n+this.left.length,this.right.length-e+this.left.length).reverse():this.left.slice(e).concat(this.right.slice(this.right.length-n+this.left.length).reverse())}splice(e,t,n){let r=t||0;this.setCursor(Math.trunc(e));let i=this.right.splice(this.right.length-r,1/0);return n&&hg(this.left,n),i.reverse()}pop(){return this.setCursor(1/0),this.left.pop()}push(e){this.setCursor(1/0),this.left.push(e)}pushMany(e){this.setCursor(1/0),hg(this.left,e)}unshift(e){this.setCursor(0),this.right.push(e)}unshiftMany(e){this.setCursor(0),hg(this.right,e.reverse())}setCursor(e){if(!(e===this.left.length||e>this.left.length&&this.right.length===0||e<0&&this.left.length===0)){if(e<this.left.length){let t=this.left.splice(e,1/0);hg(this.right,t.reverse())}else{let t=this.right.splice(this.left.length+this.right.length-e,1/0);hg(this.left,t.reverse())}}}};function hg(e,t){let n=0;if(t.length<1e4)e.push(...t);else for(;n<t.length;)e.push(...t.slice(n,n+1e4)),n+=1e4}function gg(e){let t={},n=-1,r,i,a,o,s,c,l,u=new mg(e);for(;++n<u.length;){for(;n in t;)n=t[n];if(r=u.get(n),n&&r[1].type===`chunkFlow`&&u.get(n-1)[1].type===`listItemPrefix`&&(c=r[1]._tokenizer.events,a=0,a<c.length&&c[a][1].type===`lineEndingBlank`&&(a+=2),a<c.length&&c[a][1].type===`content`))for(;++a<c.length&&c[a][1].type!==`content`;)c[a][1].type===`chunkText`&&(c[a][1]._isInFirstContentOfListItem=!0,a++);if(r[0]===`enter`)r[1].contentType&&(Object.assign(t,_g(u,n)),n=t[n],l=!0);else if(r[1]._container){for(a=n,i=void 0;a--;)if(o=u.get(a),o[1].type===`lineEnding`||o[1].type===`lineEndingBlank`)o[0]===`enter`&&(i&&(u.get(i)[1].type=`lineEndingBlank`),o[1].type=`lineEnding`,i=a);else if(o[1].type!==`linePrefix`&&o[1].type!==`listItemIndent`)break;i&&(r[1].end={...u.get(i)[1].start},s=u.slice(i,n),s.unshift(r),u.splice(i,n-i+1,s))}}return ch(e,0,1/0,u.slice(0)),!l}function _g(e,t){let n=e.get(t)[1],r=e.get(t)[2],i=t-1,a=[],o=n._tokenizer;o||(o=r.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(o._contentTypeTextTrailing=!0));let s=o.events,c=[],l={},u,d,f=-1,p=n,m=0,h=0,g=[h];for(;p;){for(;e.get(++i)[1]!==p;);a.push(i),p._tokenizer||(u=r.sliceStream(p),p.next||u.push(null),d&&o.defineSkip(p.start),p._isInFirstContentOfListItem&&(o._gfmTasklistFirstContentOfListItem=!0),o.write(u),p._isInFirstContentOfListItem&&(o._gfmTasklistFirstContentOfListItem=void 0)),d=p,p=p.next}for(p=n;++f<s.length;)s[f][0]===`exit`&&s[f-1][0]===`enter`&&s[f][1].type===s[f-1][1].type&&s[f][1].start.line!==s[f][1].end.line&&(h=f+1,g.push(h),p._tokenizer=void 0,p.previous=void 0,p=p.next);for(o.events=[],p?(p._tokenizer=void 0,p.previous=void 0):g.pop(),f=g.length;f--;){let t=s.slice(g[f],g[f+1]),n=a.pop();c.push([n,n+t.length-1]),e.splice(n,2,t)}for(c.reverse(),f=-1;++f<c.length;)l[m+c[f][0]]=m+c[f][1],m+=c[f][1]-c[f][0]-1;return l}var vg={resolve:bg,tokenize:xg},yg={partial:!0,tokenize:Sg};function bg(e){return gg(e),e}function xg(e,t){let n;return r;function r(t){return e.enter(`content`),n=e.enter(`chunkContent`,{contentType:`content`}),i(t)}function i(t){return t===null?a(t):J(t)?e.check(yg,o,a)(t):(e.consume(t),i)}function a(n){return e.exit(`chunkContent`),e.exit(`content`),t(n)}function o(t){return e.consume(t),e.exit(`chunkContent`),n.next=e.enter(`chunkContent`,{contentType:`content`,previous:n}),n=n.next,i}}function Sg(e,t,n){let r=this;return i;function i(t){return e.exit(`chunkContent`),e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),Oh(e,a,`linePrefix`)}function a(i){if(i===null||J(i))return n(i);let a=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes(`codeIndented`)&&a&&a[1].type===`linePrefix`&&a[2].sliceSerialize(a[1],!0).length>=4?t(i):e.interrupt(r.parser.constructs.flow,n,t)(i)}}function Cg(e,t,n,r,i,a,o,s,c){let l=c||1/0,u=0;return d;function d(t){return t===60?(e.enter(r),e.enter(i),e.enter(a),e.consume(t),e.exit(a),f):t===null||t===32||t===41||yh(t)?n(t):(e.enter(r),e.enter(o),e.enter(s),e.enter(`chunkString`,{contentType:`string`}),h(t))}function f(n){return n===62?(e.enter(a),e.consume(n),e.exit(a),e.exit(i),e.exit(r),t):(e.enter(s),e.enter(`chunkString`,{contentType:`string`}),p(n))}function p(t){return t===62?(e.exit(`chunkString`),e.exit(s),f(t)):t===null||t===60||J(t)?n(t):(e.consume(t),t===92?m:p)}function m(t){return t===60||t===62||t===92?(e.consume(t),p):p(t)}function h(i){return!u&&(i===null||i===41||Ch(i))?(e.exit(`chunkString`),e.exit(s),e.exit(o),e.exit(r),t(i)):u<l&&i===40?(e.consume(i),u++,h):i===41?(e.consume(i),u--,h):i===null||i===32||i===40||yh(i)?n(i):(e.consume(i),i===92?g:h)}function g(t){return t===40||t===41||t===92?(e.consume(t),h):h(t)}}function wg(e,t,n,r,i,a){let o=this,s=0,c;return l;function l(t){return e.enter(r),e.enter(i),e.consume(t),e.exit(i),e.enter(a),u}function u(l){return s>999||l===null||l===91||l===93&&!c||l===94&&!s&&`_hiddenFootnoteSupport`in o.parser.constructs?n(l):l===93?(e.exit(a),e.enter(i),e.consume(l),e.exit(i),e.exit(r),t):J(l)?(e.enter(`lineEnding`),e.consume(l),e.exit(`lineEnding`),u):(e.enter(`chunkString`,{contentType:`string`}),d(l))}function d(t){return t===null||t===91||t===93||J(t)||s++>999?(e.exit(`chunkString`),u(t)):(e.consume(t),c||=!Y(t),t===92?f:d)}function f(t){return t===91||t===92||t===93?(e.consume(t),s++,d):d(t)}}function Tg(e,t,n,r,i,a){let o;return s;function s(t){return t===34||t===39||t===40?(e.enter(r),e.enter(i),e.consume(t),e.exit(i),o=t===40?41:t,c):n(t)}function c(n){return n===o?(e.enter(i),e.consume(n),e.exit(i),e.exit(r),t):(e.enter(a),l(n))}function l(t){return t===o?(e.exit(a),c(o)):t===null?n(t):J(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),Oh(e,l,`linePrefix`)):(e.enter(`chunkString`,{contentType:`string`}),u(t))}function u(t){return t===o||t===null||J(t)?(e.exit(`chunkString`),l(t)):(e.consume(t),t===92?d:u)}function d(t){return t===o||t===92?(e.consume(t),u):u(t)}}function Eg(e,t){let n;return r;function r(i){return J(i)?(e.enter(`lineEnding`),e.consume(i),e.exit(`lineEnding`),n=!0,r):Y(i)?Oh(e,r,n?`linePrefix`:`lineSuffix`)(i):t(i)}}var Dg={name:`definition`,tokenize:kg},Og={partial:!0,tokenize:Ag};function kg(e,t,n){let r=this,i;return a;function a(t){return e.enter(`definition`),o(t)}function o(t){return wg.call(r,e,s,n,`definitionLabel`,`definitionLabelMarker`,`definitionLabelString`)(t)}function s(t){return i=hh(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),t===58?(e.enter(`definitionMarker`),e.consume(t),e.exit(`definitionMarker`),c):n(t)}function c(t){return Ch(t)?Eg(e,l)(t):l(t)}function l(t){return Cg(e,u,n,`definitionDestination`,`definitionDestinationLiteral`,`definitionDestinationLiteralMarker`,`definitionDestinationRaw`,`definitionDestinationString`)(t)}function u(t){return e.attempt(Og,d,d)(t)}function d(t){return Y(t)?Oh(e,f,`whitespace`)(t):f(t)}function f(a){return a===null||J(a)?(e.exit(`definition`),r.parser.defined.push(i),t(a)):n(a)}}function Ag(e,t,n){return r;function r(t){return Ch(t)?Eg(e,i)(t):n(t)}function i(t){return Tg(e,a,n,`definitionTitle`,`definitionTitleMarker`,`definitionTitleString`)(t)}function a(t){return Y(t)?Oh(e,o,`whitespace`)(t):o(t)}function o(e){return e===null||J(e)?t(e):n(e)}}var jg={name:`hardBreakEscape`,tokenize:Mg};function Mg(e,t,n){return r;function r(t){return e.enter(`hardBreakEscape`),e.consume(t),i}function i(r){return J(r)?(e.exit(`hardBreakEscape`),t(r)):n(r)}}var Ng={name:`headingAtx`,resolve:Pg,tokenize:Fg};function Pg(e,t){let n=e.length-2,r=3;if(e[r][1].type===`whitespace`&&(r+=2),n-2>r&&e[n][1].type===`whitespace`&&(n-=2),e[n][1].type===`atxHeadingSequence`&&(r===n-1||n-4>r&&e[n-2][1].type===`whitespace`)&&(n-=r+1===n?2:4),n>r){let i={type:`atxHeadingText`,start:e[r][1].start,end:e[n][1].end},a={type:`chunkText`,start:e[r][1].start,end:e[n][1].end,contentType:`text`};ch(e,r,n-r+1,[[`enter`,i,t],[`enter`,a,t],[`exit`,a,t],[`exit`,i,t]])}return e}function Fg(e,t,n){let r=0;return i;function i(t){return e.enter(`atxHeading`),a(t)}function a(t){return e.enter(`atxHeadingSequence`),o(t)}function o(t){return t===35&&r++<6?(e.consume(t),o):t===null||Ch(t)?(e.exit(`atxHeadingSequence`),s(t)):n(t)}function s(n){return n===35?(e.enter(`atxHeadingSequence`),c(n)):n===null||J(n)?(e.exit(`atxHeading`),t(n)):Y(n)?Oh(e,s,`whitespace`)(n):(e.enter(`atxHeadingText`),l(n))}function c(t){return t===35?(e.consume(t),c):(e.exit(`atxHeadingSequence`),s(t))}function l(t){return t===null||t===35||Ch(t)?(e.exit(`atxHeadingText`),s(t)):(e.consume(t),l)}}var Ig=`address.article.aside.base.basefont.blockquote.body.caption.center.col.colgroup.dd.details.dialog.dir.div.dl.dt.fieldset.figcaption.figure.footer.form.frame.frameset.h1.h2.h3.h4.h5.h6.head.header.hr.html.iframe.legend.li.link.main.menu.menuitem.nav.noframes.ol.optgroup.option.p.param.search.section.summary.table.tbody.td.tfoot.th.thead.title.tr.track.ul`.split(`.`),Lg=[`pre`,`script`,`style`,`textarea`],Rg={concrete:!0,name:`htmlFlow`,resolveTo:Bg,tokenize:Vg},zg={partial:!0,tokenize:Hg};function Bg(e){let t=e.length;for(;t--&&(e[t][0]!==`enter`||e[t][1].type!==`htmlFlow`););return t>1&&e[t-2][1].type===`linePrefix`&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e}function Vg(e,t,n){let r=this,i,a,o,s,c;return l;function l(e){return u(e)}function u(t){return e.enter(`htmlFlow`),e.enter(`htmlFlowData`),e.consume(t),d}function d(s){return s===33?(e.consume(s),f):s===47?(e.consume(s),a=!0,h):s===63?(e.consume(s),i=3,r.interrupt?t:I):gh(s)?(e.consume(s),o=String.fromCharCode(s),g):n(s)}function f(a){return a===45?(e.consume(a),i=2,p):a===91?(e.consume(a),i=5,s=0,m):gh(a)?(e.consume(a),i=4,r.interrupt?t:I):n(a)}function p(i){return i===45?(e.consume(i),r.interrupt?t:I):n(i)}function m(i){return i===`CDATA[`.charCodeAt(s++)?(e.consume(i),s===6?r.interrupt?t:O:m):n(i)}function h(t){return gh(t)?(e.consume(t),o=String.fromCharCode(t),g):n(t)}function g(s){if(s===null||s===47||s===62||Ch(s)){let c=s===47,l=o.toLowerCase();return!c&&!a&&Lg.includes(l)?(i=1,r.interrupt?t(s):O(s)):Ig.includes(o.toLowerCase())?(i=6,c?(e.consume(s),_):r.interrupt?t(s):O(s)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(s):a?v(s):y(s))}return s===45||_h(s)?(e.consume(s),o+=String.fromCharCode(s),g):n(s)}function _(i){return i===62?(e.consume(i),r.interrupt?t:O):n(i)}function v(t){return Y(t)?(e.consume(t),v):E(t)}function y(t){return t===47?(e.consume(t),E):t===58||t===95||gh(t)?(e.consume(t),b):Y(t)?(e.consume(t),y):E(t)}function b(t){return t===45||t===46||t===58||t===95||_h(t)?(e.consume(t),b):x(t)}function x(t){return t===61?(e.consume(t),S):Y(t)?(e.consume(t),x):y(t)}function S(t){return t===null||t===60||t===61||t===62||t===96?n(t):t===34||t===39?(e.consume(t),c=t,C):Y(t)?(e.consume(t),S):w(t)}function C(t){return t===c?(e.consume(t),c=null,T):t===null||J(t)?n(t):(e.consume(t),C)}function w(t){return t===null||t===34||t===39||t===47||t===60||t===61||t===62||t===96||Ch(t)?x(t):(e.consume(t),w)}function T(e){return e===47||e===62||Y(e)?y(e):n(e)}function E(t){return t===62?(e.consume(t),D):n(t)}function D(t){return t===null||J(t)?O(t):Y(t)?(e.consume(t),D):n(t)}function O(t){return t===45&&i===2?(e.consume(t),M):t===60&&i===1?(e.consume(t),N):t===62&&i===4?(e.consume(t),L):t===63&&i===3?(e.consume(t),I):t===93&&i===5?(e.consume(t),F):J(t)&&(i===6||i===7)?(e.exit(`htmlFlowData`),e.check(zg,ee,k)(t)):t===null||J(t)?(e.exit(`htmlFlowData`),k(t)):(e.consume(t),O)}function k(t){return e.check(ng,A,ee)(t)}function A(t){return e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),j}function j(t){return t===null||J(t)?k(t):(e.enter(`htmlFlowData`),O(t))}function M(t){return t===45?(e.consume(t),I):O(t)}function N(t){return t===47?(e.consume(t),o=``,P):O(t)}function P(t){if(t===62){let n=o.toLowerCase();return Lg.includes(n)?(e.consume(t),L):O(t)}return gh(t)&&o.length<8?(e.consume(t),o+=String.fromCharCode(t),P):O(t)}function F(t){return t===93?(e.consume(t),I):O(t)}function I(t){return t===62?(e.consume(t),L):t===45&&i===2?(e.consume(t),I):O(t)}function L(t){return t===null||J(t)?(e.exit(`htmlFlowData`),ee(t)):(e.consume(t),L)}function ee(n){return e.exit(`htmlFlow`),t(n)}}function Hg(e,t,n){return r;function r(r){return e.enter(`lineEnding`),e.consume(r),e.exit(`lineEnding`),e.attempt(Kh,t,n)}}var Ug={name:`htmlText`,tokenize:Wg};function Wg(e,t,n){let r=this,i,a,o;return s;function s(t){return e.enter(`htmlText`),e.enter(`htmlTextData`),e.consume(t),c}function c(t){return t===33?(e.consume(t),l):t===47?(e.consume(t),x):t===63?(e.consume(t),y):gh(t)?(e.consume(t),w):n(t)}function l(t){return t===45?(e.consume(t),u):t===91?(e.consume(t),a=0,m):gh(t)?(e.consume(t),v):n(t)}function u(t){return t===45?(e.consume(t),p):n(t)}function d(t){return t===null?n(t):t===45?(e.consume(t),f):J(t)?(o=d,N(t)):(e.consume(t),d)}function f(t){return t===45?(e.consume(t),p):d(t)}function p(e){return e===62?M(e):e===45?f(e):d(e)}function m(t){return t===`CDATA[`.charCodeAt(a++)?(e.consume(t),a===6?h:m):n(t)}function h(t){return t===null?n(t):t===93?(e.consume(t),g):J(t)?(o=h,N(t)):(e.consume(t),h)}function g(t){return t===93?(e.consume(t),_):h(t)}function _(t){return t===62?M(t):t===93?(e.consume(t),_):h(t)}function v(t){return t===null||t===62?M(t):J(t)?(o=v,N(t)):(e.consume(t),v)}function y(t){return t===null?n(t):t===63?(e.consume(t),b):J(t)?(o=y,N(t)):(e.consume(t),y)}function b(e){return e===62?M(e):y(e)}function x(t){return gh(t)?(e.consume(t),S):n(t)}function S(t){return t===45||_h(t)?(e.consume(t),S):C(t)}function C(t){return J(t)?(o=C,N(t)):Y(t)?(e.consume(t),C):M(t)}function w(t){return t===45||_h(t)?(e.consume(t),w):t===47||t===62||Ch(t)?T(t):n(t)}function T(t){return t===47?(e.consume(t),M):t===58||t===95||gh(t)?(e.consume(t),E):J(t)?(o=T,N(t)):Y(t)?(e.consume(t),T):M(t)}function E(t){return t===45||t===46||t===58||t===95||_h(t)?(e.consume(t),E):D(t)}function D(t){return t===61?(e.consume(t),O):J(t)?(o=D,N(t)):Y(t)?(e.consume(t),D):T(t)}function O(t){return t===null||t===60||t===61||t===62||t===96?n(t):t===34||t===39?(e.consume(t),i=t,k):J(t)?(o=O,N(t)):Y(t)?(e.consume(t),O):(e.consume(t),A)}function k(t){return t===i?(e.consume(t),i=void 0,j):t===null?n(t):J(t)?(o=k,N(t)):(e.consume(t),k)}function A(t){return t===null||t===34||t===39||t===60||t===61||t===96?n(t):t===47||t===62||Ch(t)?T(t):(e.consume(t),A)}function j(e){return e===47||e===62||Ch(e)?T(e):n(e)}function M(r){return r===62?(e.consume(r),e.exit(`htmlTextData`),e.exit(`htmlText`),t):n(r)}function N(t){return e.exit(`htmlTextData`),e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),P}function P(t){return Y(t)?Oh(e,F,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):F(t)}function F(t){return e.enter(`htmlTextData`),o(t)}}var Gg={name:`labelEnd`,resolveAll:Yg,resolveTo:Xg,tokenize:Zg},Kg={tokenize:Qg},qg={tokenize:$g},Jg={tokenize:e_};function Yg(e){let t=-1,n=[];for(;++t<e.length;){let r=e[t][1];if(n.push(e[t]),r.type===`labelImage`||r.type===`labelLink`||r.type===`labelEnd`){let e=r.type===`labelImage`?4:2;r.type=`data`,t+=e}}return e.length!==n.length&&ch(e,0,e.length,n),e}function Xg(e,t){let n=e.length,r=0,i,a,o;for(;n--;){let t=e[n][1];if(i){if(t.type===`link`||t.type===`labelLink`&&t._inactive)break;e[n][0]===`enter`&&t.type===`labelLink`&&(t._inactive=!0)}else if(a){if(e[n][0]===`enter`&&(t.type===`labelImage`||t.type===`labelLink`)&&!t._balanced&&(i=n,t.type!==`labelLink`)){r=2;break}}else t.type===`labelEnd`&&(a=n)}let s={type:e[i][1].type===`labelLink`?`link`:`image`,start:{...e[i][1].start},end:{...e[e.length-1][1].end}},c={type:`label`,start:{...e[i][1].start},end:{...e[a][1].end}},l={type:`labelText`,start:{...e[i+r+2][1].end},end:{...e[a-2][1].start}};return o=[[`enter`,s,t],[`enter`,c,t]],o=lh(o,e.slice(i+1,i+r+3)),o=lh(o,[[`enter`,l,t]]),o=lh(o,zh(t.parser.constructs.insideSpan.null,e.slice(i+r+4,a-3),t)),o=lh(o,[[`exit`,l,t],e[a-2],e[a-1],[`exit`,c,t]]),o=lh(o,e.slice(a+1)),o=lh(o,[[`exit`,s,t]]),ch(e,i,e.length,o),e}function Zg(e,t,n){let r=this,i=r._labelStarts,a,o;if(i){for(;i.length>0&&i[i.length-1]._balanced;)i.pop();a=i[i.length-1]}return s;function s(t){return a?a._inactive?d(t):(o=r.parser.defined.includes(hh(r.sliceSerialize({start:a.end,end:r.now()}))),e.enter(`labelEnd`),e.enter(`labelMarker`),e.consume(t),e.exit(`labelMarker`),e.exit(`labelEnd`),c):n(t)}function c(t){return t===40?e.attempt(Kg,u,o?u:d)(t):t===91?e.attempt(qg,u,o?l:d)(t):o?u(t):d(t)}function l(t){return e.attempt(Jg,u,d)(t)}function u(e){return i.pop(),t(e)}function d(e){return a._balanced=!0,n(e)}}function Qg(e,t,n){return r;function r(t){return e.enter(`resource`),e.enter(`resourceMarker`),e.consume(t),e.exit(`resourceMarker`),i}function i(t){return Ch(t)?Eg(e,a)(t):a(t)}function a(t){return t===41?u(t):Cg(e,o,s,`resourceDestination`,`resourceDestinationLiteral`,`resourceDestinationLiteralMarker`,`resourceDestinationRaw`,`resourceDestinationString`,32)(t)}function o(t){return Ch(t)?Eg(e,c)(t):u(t)}function s(e){return n(e)}function c(t){return t===34||t===39||t===40?Tg(e,l,n,`resourceTitle`,`resourceTitleMarker`,`resourceTitleString`)(t):u(t)}function l(t){return Ch(t)?Eg(e,u)(t):u(t)}function u(r){return r===41?(e.enter(`resourceMarker`),e.consume(r),e.exit(`resourceMarker`),e.exit(`resource`),t):n(r)}}function $g(e,t,n){let r=this;return i;function i(t){return wg.call(r,e,a,o,`reference`,`referenceMarker`,`referenceString`)(t)}function a(e){return r.parser.defined.includes(hh(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(e):n(e)}function o(e){return n(e)}}function e_(e,t,n){return r;function r(t){return e.enter(`reference`),e.enter(`referenceMarker`),e.consume(t),e.exit(`referenceMarker`),i}function i(r){return r===93?(e.enter(`referenceMarker`),e.consume(r),e.exit(`referenceMarker`),e.exit(`reference`),t):n(r)}}var t_={name:`labelStartImage`,resolveAll:Gg.resolveAll,tokenize:n_};function n_(e,t,n){let r=this,i;return a;function a(t){return e.enter(`labelImage`),e.enter(`labelImageMarker`),e.consume(t),e.exit(`labelImageMarker`),o}function o(t){return t===91?(e.enter(`labelMarker`),e.consume(t),e.exit(`labelMarker`),i=e.exit(`labelImage`),s):n(t)}function s(e){return e===94&&`_hiddenFootnoteSupport`in r.parser.constructs?n(e):(r._labelStarts=r._labelStarts||[],r._labelStarts.push(i),t(e))}}var r_={name:`labelStartLink`,resolveAll:Gg.resolveAll,tokenize:i_};function i_(e,t,n){let r=this,i;return a;function a(t){return e.enter(`labelLink`),e.enter(`labelMarker`),e.consume(t),e.exit(`labelMarker`),i=e.exit(`labelLink`),o}function o(e){return e===94&&`_hiddenFootnoteSupport`in r.parser.constructs?n(e):(r._labelStarts=r._labelStarts||[],r._labelStarts.push(i),t(e))}}var a_={name:`lineEnding`,tokenize:o_};function o_(e,t){return n;function n(n){return e.enter(`lineEnding`),e.consume(n),e.exit(`lineEnding`),Oh(e,t,`linePrefix`)}}var s_={name:`thematicBreak`,tokenize:c_};function c_(e,t,n){let r=0,i;return a;function a(t){return e.enter(`thematicBreak`),o(t)}function o(e){return i=e,s(e)}function s(a){return a===i?(e.enter(`thematicBreakSequence`),c(a)):r>=3&&(a===null||J(a))?(e.exit(`thematicBreak`),t(a)):n(a)}function c(t){return t===i?(e.consume(t),r++,c):(e.exit(`thematicBreakSequence`),Y(t)?Oh(e,s,`whitespace`)(t):s(t))}}var l_={continuation:{tokenize:p_},exit:h_,name:`list`,tokenize:f_},u_={partial:!0,tokenize:g_},d_={partial:!0,tokenize:m_};function f_(e,t,n){let r=this,i=r.events[r.events.length-1],a=i&&i[1].type===`linePrefix`?i[2].sliceSerialize(i[1],!0).length:0,o=0;return s;function s(t){let i=r.containerState.type||(t===42||t===43||t===45?`listUnordered`:`listOrdered`);if(i===`listUnordered`?!r.containerState.marker||t===r.containerState.marker:bh(t)){if(r.containerState.type||(r.containerState.type=i,e.enter(i,{_container:!0})),i===`listUnordered`)return e.enter(`listItemPrefix`),t===42||t===45?e.check(s_,n,l)(t):l(t);if(!r.interrupt||t===49)return e.enter(`listItemPrefix`),e.enter(`listItemValue`),c(t)}return n(t)}function c(t){return bh(t)&&++o<10?(e.consume(t),c):(!r.interrupt||o<2)&&(r.containerState.marker?t===r.containerState.marker:t===41||t===46)?(e.exit(`listItemValue`),l(t)):n(t)}function l(t){return e.enter(`listItemMarker`),e.consume(t),e.exit(`listItemMarker`),r.containerState.marker=r.containerState.marker||t,e.check(Kh,r.interrupt?n:u,e.attempt(u_,f,d))}function u(e){return r.containerState.initialBlankLine=!0,a++,f(e)}function d(t){return Y(t)?(e.enter(`listItemPrefixWhitespace`),e.consume(t),e.exit(`listItemPrefixWhitespace`),f):n(t)}function f(n){return r.containerState.size=a+r.sliceSerialize(e.exit(`listItemPrefix`),!0).length,t(n)}}function p_(e,t,n){let r=this;return r.containerState._closeFlow=void 0,e.check(Kh,i,a);function i(n){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,Oh(e,t,`listItemIndent`,r.containerState.size+1)(n)}function a(n){return r.containerState.furtherBlankLines||!Y(n)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,o(n)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(d_,t,o)(n))}function o(i){return r.containerState._closeFlow=!0,r.interrupt=void 0,Oh(e,e.attempt(l_,t,n),`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(i)}}function m_(e,t,n){let r=this;return Oh(e,i,`listItemIndent`,r.containerState.size+1);function i(e){let i=r.events[r.events.length-1];return i&&i[1].type===`listItemIndent`&&i[2].sliceSerialize(i[1],!0).length===r.containerState.size?t(e):n(e)}}function h_(e){e.exit(this.containerState.type)}function g_(e,t,n){let r=this;return Oh(e,i,`listItemPrefixWhitespace`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:5);function i(e){let i=r.events[r.events.length-1];return!Y(e)&&i&&i[1].type===`listItemPrefixWhitespace`?t(e):n(e)}}var __={name:`setextUnderline`,resolveTo:v_,tokenize:y_};function v_(e,t){let n=new Mh,r=e.length,i,a,o;for(;r--;)if(e[r][0]===`enter`){if(e[r][1].type===`content`){i=r;break}e[r][1].type===`paragraph`&&(a=r)}else e[r][1].type===`content`&&n.add(r,1,[]),!o&&e[r][1].type===`definition`&&(o=r);let s={type:`setextHeading`,start:{...e[i][1].start},end:{...e[e.length-1][1].end}};return e[a][1].type=`setextHeadingText`,o?(n.add(a,0,[[`enter`,s,t]]),n.add(o+1,0,[[`exit`,e[i][1],t]]),e[i][1].end={...e[o][1].end}):e[i][1]=s,n.add(e.length,0,[[`exit`,s,t]]),n.consume(e),e}function y_(e,t,n){let r=this,i;return a;function a(t){let a=r.events.length,s;for(;a--;)if(r.events[a][1].type!==`lineEnding`&&r.events[a][1].type!==`linePrefix`&&r.events[a][1].type!==`content`){s=r.events[a][1].type===`paragraph`;break}return!r.parser.lazy[r.now().line]&&(r.interrupt||s)?(e.enter(`setextHeadingLine`),i=t,o(t)):n(t)}function o(t){return e.enter(`setextHeadingLineSequence`),s(t)}function s(t){return t===i?(e.consume(t),s):(e.exit(`setextHeadingLineSequence`),Y(t)?Oh(e,c,`lineSuffix`)(t):c(t))}function c(r){return r===null||J(r)?(e.exit(`setextHeadingLine`),t(r)):n(r)}}var b_={tokenize:x_};function x_(e){let t=this,n=e.attempt(Kh,r,e.attempt(this.parser.constructs.flowInitial,i,Oh(e,e.attempt(this.parser.constructs.flow,i,e.attempt(vg,i)),`linePrefix`)));return n;function r(r){if(r===null)e.consume(r);else return e.enter(`lineEndingBlank`),e.consume(r),e.exit(`lineEndingBlank`),t.currentConstruct=void 0,n}function i(r){if(r===null)e.consume(r);else return e.enter(`lineEnding`),e.consume(r),e.exit(`lineEnding`),t.currentConstruct=void 0,n}}var S_={resolveAll:E_()},C_=T_(`string`),w_=T_(`text`);function T_(e){return{resolveAll:E_(e===`text`?D_:void 0),tokenize:t};function t(t){let n=this,r=this.parser.constructs[e],i=t.attempt(r,a,o);return a;function a(e){return c(e)?i(e):o(e)}function o(e){if(e===null)t.consume(e);else return t.enter(`data`),t.consume(e),s}function s(e){return c(e)?(t.exit(`data`),i(e)):(t.consume(e),s)}function c(e){if(e===null)return!0;let t=r[e],i=-1;if(t)for(;++i<t.length;){let e=t[i];if(!e.previous||e.previous.call(n,n.previous))return!0}return!1}}}function E_(e){return t;function t(t,n){let r=-1,i;for(;++r<=t.length;)i===void 0?t[r]&&t[r][1].type===`data`&&(i=r,r++):t[r]&&t[r][1].type===`data`||(r!==i+2&&(t[i][1].end=t[r-1][1].end,t.splice(i+2,r-i-2),r=i+2),i=void 0);return e?e(t,n):t}}function D_(e,t){let n=new Mh,r=0;for(;++r<=e.length;)if((r===e.length||e[r][1].type===`lineEnding`)&&e[r-1][1].type===`data`){let i=e[r-1][1],a=t.sliceStream(i),o=a.length,s=-1,c=0,l;for(;o--;){let e=a[o];if(typeof e==`string`){for(s=e.length;e.charCodeAt(s-1)===32;)c++,s--;if(s)break;s=-1}else if(e===-2)l=!0,c++;else if(e!==-1){o++;break}}if(t._contentTypeTextTrailing&&r===e.length&&(c=0),c){let a={type:r===e.length||l||c<2?`lineSuffix`:`hardBreakTrailing`,start:{_bufferIndex:o?s:i.start._bufferIndex+s,_index:i.start._index+o,line:i.end.line,column:i.end.column-c,offset:i.end.offset-c},end:{...i.end}};i.end={...a.start},i.start.offset===i.end.offset?Object.assign(i,a):n.add(r,0,[[`enter`,a,t],[`exit`,a,t]])}r++}return n.consume(e),e}var O_=s({attentionMarkers:()=>I_,contentInitial:()=>A_,disable:()=>L_,document:()=>k_,flow:()=>M_,flowInitial:()=>j_,insideSpan:()=>F_,string:()=>N_,text:()=>P_}),k_={42:l_,43:l_,45:l_,48:l_,49:l_,50:l_,51:l_,52:l_,53:l_,54:l_,55:l_,56:l_,57:l_,62:Jh},A_={91:Dg},j_={[-2]:og,[-1]:og,32:og},M_={35:Ng,42:s_,45:[__,s_],60:Rg,61:__,95:s_,96:ig,126:ig},N_={38:eg,92:Qh},P_={[-5]:a_,[-4]:a_,[-3]:a_,33:t_,38:eg,42:Bh,60:[Wh,Ug],91:r_,92:[jg,Qh],93:Gg,95:Bh,96:ug},F_={null:[Bh,S_]},I_={null:[42,95]},L_={null:[]};function R_(e,t,n){let r={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0},i={},a=[],o=[],s=[],c={attempt:C(x),check:C(S),consume:v,enter:y,exit:b,interrupt:C(S,{interrupt:!0})},l={code:null,containerState:{},defineSkip:h,events:[],now:m,parser:e,previous:null,sliceSerialize:f,sliceStream:p,write:d},u=t.tokenize.call(l,c);return t.resolveAll&&a.push(t),l;function d(e){return o=lh(o,e),g(),o[o.length-1]===null?(w(t,0),l.events=zh(a,l.events,l),l.events):[]}function f(e,t){return B_(p(e),t)}function p(e){return z_(o,e)}function m(){let{_bufferIndex:e,_index:t,line:n,column:i,offset:a}=r;return{_bufferIndex:e,_index:t,line:n,column:i,offset:a}}function h(e){i[e.line]=e.column,E()}function g(){for(;r._index<o.length;){let e=o[r._index];if(typeof e==`string`){let t=r._index;for(r._bufferIndex<0&&(r._bufferIndex=0);r._index===t&&r._bufferIndex<e.length;)_(e.charCodeAt(r._bufferIndex))}else _(e)}}function _(e){u=u(e)}function v(e){J(e)?(r.line++,r.column=1,r.offset+=e===-3?2:1,E()):e!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===o[r._index].length&&(r._bufferIndex=-1,r._index++)),l.previous=e}function y(e,t){let n=t||{};return n.type=e,n.start=m(),l.events.push([`enter`,n,l]),s.push(n),n}function b(e){let t=s.pop();return t.end=m(),l.events.push([`exit`,t,l]),t}function x(e,t){w(e,t.from)}function S(e,t){t.restore()}function C(e,t){return n;function n(n,r,i){let a,o,s,u;return Array.isArray(n)?f(n):`tokenize`in n?f([n]):d(n);function d(e){return t;function t(t){let n=t!==null&&e[t],r=t!==null&&e.null;return f([...Array.isArray(n)?n:n?[n]:[],...Array.isArray(r)?r:r?[r]:[]])(t)}}function f(e){return a=e,o=0,e.length===0?i:p(e[o])}function p(e){return n;function n(n){return u=T(),s=e,e.partial||(l.currentConstruct=e),e.name&&l.parser.constructs.disable.null.includes(e.name)?h(n):e.tokenize.call(t?Object.assign(Object.create(l),t):l,c,m,h)(n)}}function m(t){return e(s,u),r}function h(e){return u.restore(),++o<a.length?p(a[o]):i}}}function w(e,t){e.resolveAll&&!a.includes(e)&&a.push(e),e.resolve&&ch(l.events,t,l.events.length-t,e.resolve(l.events.slice(t),l)),e.resolveTo&&(l.events=e.resolveTo(l.events,l))}function T(){let e=m(),t=l.previous,n=l.currentConstruct,i=l.events.length,a=Array.from(s);return{from:i,restore:o};function o(){r=e,l.previous=t,l.currentConstruct=n,l.events.length=i,s=a,E()}}function E(){r.line in i&&r.column<2&&(r.column=i[r.line],r.offset+=i[r.line]-1)}}function z_(e,t){let n=t.start._index,r=t.start._bufferIndex,i=t.end._index,a=t.end._bufferIndex,o;if(n===i)o=[e[n].slice(r,a)];else{if(o=e.slice(n,i),r>-1){let e=o[0];typeof e==`string`?o[0]=e.slice(r):o.shift()}a>0&&o.push(e[i].slice(0,a))}return o}function B_(e,t){let n=-1,r=[],i;for(;++n<e.length;){let a=e[n],o;if(typeof a==`string`)o=a;else switch(a){case-5:o=`\r`;break;case-4:o=`
14
+ M${O.x},${O.y}h${O.width}v${O.height}h${-O.width}z`,fillRule:`evenodd`,pointerEvents:`none`})]})})}ap.displayName=`MiniMap`;var op=(0,_.memo)(ap),sp=e=>t=>e?`${Math.max(1/t.transform[2],1)}`:void 0,cp={[Gc.Line]:`right`,[Gc.Handle]:`bottom-right`};function lp({nodeId:e,position:t,variant:n=Gc.Handle,className:r,style:i=void 0,children:a,color:o,minWidth:s=10,minHeight:c=10,maxWidth:l=Number.MAX_VALUE,maxHeight:u=Number.MAX_VALUE,keepAspectRatio:d=!1,resizeDirection:f,autoScale:p=!0,shouldResize:m,onResizeStart:h,onResize:g,onResizeEnd:v}){let y=Lu(),S=typeof e==`string`?e:y,C=G(),w=(0,_.useRef)(null),T=n===Gc.Handle,E=W((0,_.useCallback)(sp(T&&p),[T,p]),gl),D=(0,_.useRef)(null),O=t??cp[n];(0,_.useEffect)(()=>{if(w.current&&S)return D.current||=rl({domNode:w.current,nodeId:S,getStoreItems:()=>{let{nodeLookup:e,transform:t,snapGrid:n,snapToGrid:r,nodeOrigin:i,domNode:a}=C.getState();return{nodeLookup:e,transform:t,snapGrid:n,snapToGrid:r,nodeOrigin:i,paneDomNode:a}},onChange:(e,t)=>{let{triggerNodeChanges:n,nodeLookup:r,parentLookup:i,nodeOrigin:a}=C.getState(),o=[],s={x:e.x,y:e.y},c=r.get(S);if(c&&c.expandParent&&c.parentId){let t=c.origin??a,n=e.width??c.measured.width??0,l=e.height??c.measured.height??0,u=uc([{id:c.id,parentId:c.parentId,rect:{width:n,height:l,...ps({x:e.x??c.position.x,y:e.y??c.position.y},{width:n,height:l},c.parentId,r,t)}}],r,i,a);o.push(...u),s.x=e.x?Math.max(t[0]*n,e.x):void 0,s.y=e.y?Math.max(t[1]*l,e.y):void 0}if(s.x!==void 0&&s.y!==void 0){let e={id:S,type:`position`,position:{...s}};o.push(e)}if(e.width!==void 0&&e.height!==void 0){let t={id:S,type:`dimensions`,resizing:!0,setAttributes:f?f===`horizontal`?`width`:`height`:!0,dimensions:{width:e.width,height:e.height}};o.push(t)}for(let e of t){let t={...e,type:`position`};o.push(t)}n(o)},onEnd:({width:e,height:t})=>{let n={id:S,type:`dimensions`,resizing:!1,dimensions:{width:e,height:t}};C.getState().triggerNodeChanges([n])}}),D.current.update({controlPosition:O,boundaries:{minWidth:s,minHeight:c,maxWidth:l,maxHeight:u},keepAspectRatio:d,resizeDirection:f,onResizeStart:h,onResize:g,onResizeEnd:v,shouldResize:m}),()=>{D.current?.destroy()}},[O,s,c,l,u,d,h,g,v,m]);let k=O.split(`-`);return(0,b.jsx)(`div`,{className:x([`react-flow__resize-control`,`nodrag`,...k,n,r]),ref:w,style:{...i,scale:E,...o&&{[T?`backgroundColor`:`borderColor`]:o}},children:a})}var up=(0,_.memo)(lp);function dp({nodeId:e,isVisible:t=!0,handleClassName:n,handleStyle:r,lineClassName:i,lineStyle:a,color:o,minWidth:s=10,minHeight:c=10,maxWidth:l=Number.MAX_VALUE,maxHeight:u=Number.MAX_VALUE,keepAspectRatio:d=!1,autoScale:f=!0,shouldResize:p,onResizeStart:m,onResize:h,onResizeEnd:g}){return t?(0,b.jsxs)(b.Fragment,{children:[qc.map(t=>(0,b.jsx)(up,{className:i,style:a,nodeId:e,position:t,variant:Gc.Line,color:o,minWidth:s,minHeight:c,maxWidth:l,maxHeight:u,onResizeStart:m,keepAspectRatio:d,autoScale:f,shouldResize:p,onResize:h,onResizeEnd:g},t)),Kc.map(t=>(0,b.jsx)(up,{className:n,style:r,nodeId:e,position:t,color:o,minWidth:s,minHeight:c,maxWidth:l,maxHeight:u,onResizeStart:m,keepAspectRatio:d,autoScale:f,shouldResize:p,onResize:h,onResizeEnd:g},t))]}):null}function fp({title:e,count:t,open:n,onToggle:r,children:i}){return(0,b.jsxs)(`div`,{className:`section`,children:[(0,b.jsxs)(`button`,{className:`section__head`,onClick:r,"aria-expanded":n,children:[(0,b.jsx)(`span`,{className:`section__caret`,"aria-hidden":`true`,children:n?`▾`:`▸`}),e,t!==void 0&&t>0&&(0,b.jsx)(`span`,{className:`section__count`,children:t})]}),n&&(0,b.jsx)(`div`,{className:`section__body`,children:i})]})}var pp=null,mp=()=>pp===null?{}:{authorization:`Bearer ${pp}`};function hp(e,t){return e===void 0?Promise.resolve({mode:`local`}):e.start(t)}var gp=`/api/store`,_p=()=>new URLSearchParams(window.location.search).get(`t`),vp=()=>_p()!==null||Object.keys(mp()).length>0;function yp(e){let t=_p(),n=mp();if(t!==null)return{"x-apm-token":t,...n};if(Object.keys(n).length>0)return n;throw Error(`this viewer is read-only - open it with the open_viewer tool to ${e}`)}async function bp(e,t){let n=await e.text().catch(()=>``);try{let e=JSON.parse(n).error;if(e!==void 0)return e}catch{}return e.status===404?`${t}: this server does not know the request. Restart it on newer code.`:t}async function xp(e,t,n){let r=await fetch(`/api/ticket?project=${encodeURIComponent(e)}&ref=${encodeURIComponent(t)}`,{method:`POST`,headers:{"content-type":`application/json`,...yp(`change a status`)},body:JSON.stringify({status:n})});if(!r.ok)throw Error(await bp(r,`could not change the status (${r.status})`))}async function Sp(e,t,n){let r=await fetch(`/api/next?project=${encodeURIComponent(e)}&ref=${encodeURIComponent(t)}`,{method:`POST`,headers:{"content-type":`application/json`,...yp(`change the next list`)},body:JSON.stringify({listed:n})});if(!r.ok)throw Error(await bp(r,`could not change the next list (${r.status})`))}async function Cp(e,t){let n=await fetch(`/api/layout?project=${encodeURIComponent(e)}`,{method:`POST`,headers:{"content-type":`application/json`,...yp(`save the layout`)},body:JSON.stringify({layout:t})});if(!n.ok)throw Error(await bp(n,`could not save the layout (${n.status})`))}var wp=`/api/changes`;async function Tp(e,t,n){let r=new URLSearchParams({project:e,ref:t}),i=await fetch(`/api/item?${r}`,{headers:mp(),signal:n});if(i.status===404)return null;if(!i.ok)throw Error(`/api/item returned ${i.status} ${i.statusText}`);return await i.json()}async function Ep(e,t,n){let r=new URLSearchParams({project:e,q:t}),i=await fetch(`/api/search?${r}`,{headers:mp(),signal:n});return i.ok?await i.json():null}async function Dp(e,t){let n=await fetch(`/api/media/${t}?project=${encodeURIComponent(e)}`,{method:`DELETE`,headers:yp(`remove an image`)});if(!n.ok)throw Error(await bp(n,`remove failed (${n.status})`))}async function Op(e,t,n){let r=await fetch(`/api/media?project=${encodeURIComponent(e)}&ref=${encodeURIComponent(t)}`,{method:`POST`,headers:{"content-type":n.type,...yp(`upload`)},body:n}),i=await r.json();if(!r.ok)throw Error(i.error??`upload failed (${r.status})`);return{hash:i.hash,mime:i.mime,bytes:i.bytes,at:new Date().toISOString()}}var kp=(e,t={})=>Object.entries(e).map(([e,n])=>({heading:e,content:n,references:Object.entries(t[e]??{}).flatMap(([e,t])=>t.filter(e=>e.retired===void 0).map(t=>({key:e,source:t.source,detail:t.detail,text:t.text,at:t.at})))})).sort((e,t)=>Number(t.heading===`protocol`)-Number(e.heading===`protocol`));function Ap(e,t){let n=new Map;for(let r of e)n.set(t(r),[...n.get(t(r))??[],r]);return n}function jp(e){let t=new Map;for(let n of e){let e=n.created_at??``,r=t.get(n.area);(r===void 0||e<r)&&t.set(n.area,e)}return[...t].sort(([e,t],[n,r])=>t===r?e.localeCompare(n):t<r?-1:1).map(([e])=>e)}async function Mp(){let e=await fetch(gp,{headers:mp()});if(!e.ok)throw Error(`${gp} returned ${e.status} ${e.statusText}`);let{path:t,store:n,metrics:r,uploadsDisabled:i,files:a}=await e.json();return{storePath:t,uploadsDisabled:i??null,projects:(n.projects??[]).map(e=>({key:e.key,name:e.name,items:e.items.map(e=>({id:e.ref,area:e.area,status:e.status,title:e.title,deps:e.deps??[],parent:e.parent??null,start:e.start,due:e.due,closed:e.closed_at,created:e.created_at,updated:e.updated_at})),next:(e.next??[]).filter(t=>e.items.some(e=>e.ref===t)),layout:Object.fromEntries(Object.entries(e.layout??{}).map(([e,t])=>{let[n,r]=t.split(`,`).map(Number);return[e,{x:n,y:r}]})),metrics:Ap(r?.[e.key]??[],e=>e.ref??``),context:kp(e.context??{},e.context_references),file:a?.[e.key]??null,areaInfo:Object.fromEntries((e.areas??[]).map(e=>[e.key,{name:e.name,description:e.description}])),areaOrder:jp(e.items)}))}}function Np(e){let t=decodeURIComponent(e.replace(/^#/,``)),n=t.indexOf(`/`);return{project:(n===-1?t:t.slice(0,n))||null,item:n===-1?null:t.slice(n+1)||null}}var Pp=`context:`,Fp=e=>e?.startsWith(`context:`)?e.slice(8):null;function Ip(e,t){if(e.length===0)return{project:null,notice:`This store has no projects yet. Create one and it will appear here.`};if(t!==null){let n=e.find(e=>e.key===t);return n?{project:n,notice:null}:{project:null,notice:`No project "${t}" in this store. It holds: ${e.map(e=>e.key).join(`, `)}.`}}return{project:e[0],notice:null}}var Lp=e=>e<1048576?`${Math.round(e/1024)} KB`:`${(e/1024/1024).toFixed(1)} MB`;function Rp({projectKey:e,ref_:t,images:n,uploadsDisabled:r,reload:i,open:a,onToggle:o}){let[s,c]=(0,_.useState)(!1),[l,u]=(0,_.useState)(null),[d,f]=(0,_.useState)(!1),p=(0,_.useRef)(null),m=vp(),h=m&&r===null;(0,_.useEffect)(()=>u(null),[t]);async function g(e){c(!0),u(null);try{await e()}catch(e){u(e instanceof Error?e.message:String(e))}finally{c(!1),i()}}let v=n=>n===null||n.length===0?Promise.resolve():g(async()=>{for(let r of Array.from(n))await Op(e,t,r)});return(0,b.jsxs)(fp,{title:`Images`,count:n.length,open:a,onToggle:o,children:[n.length>0&&(0,b.jsx)(`div`,{className:`attachments__grid`,children:n.map(t=>(0,b.jsxs)(`div`,{className:`attachments__item`,children:[(0,b.jsx)(`a`,{href:`/media/${t.hash}`,target:`_blank`,rel:`noreferrer`,children:(0,b.jsx)(`img`,{className:`attachments__thumb`,src:`/media/${t.hash}`,alt:t.caption??`attachment`,loading:`lazy`})}),(0,b.jsx)(`span`,{className:`attachments__meta`,children:Lp(t.bytes)}),m&&(0,b.jsx)(`button`,{className:`attachments__remove`,title:`Remove this image from the ticket`,disabled:s,onClick:()=>void g(()=>Dp(e,t.hash)),children:`x`})]},t.hash))}),h?(0,b.jsxs)(`div`,{className:`attachments__drop${d?` attachments__drop--over`:``}`,onDragOver:e=>{e.preventDefault(),f(!0)},onDragLeave:()=>f(!1),onDrop:e=>{e.preventDefault(),f(!1),v(e.dataTransfer.files)},onClick:()=>p.current?.click(),children:[(0,b.jsx)(`input`,{ref:p,type:`file`,accept:`image/png,image/jpeg,image/webp,image/gif`,multiple:!0,hidden:!0,onChange:e=>{v(e.target.files),e.target.value=``}}),s?`Uploading...`:`Drop an image on ${t}, or click to choose`]}):r===null?n.length===0&&(0,b.jsx)(`p`,{className:`attachments__readonly`,children:`Open the viewer with the open_viewer tool to add images.`}):(0,b.jsx)(`p`,{className:`attachments__readonly`,children:r}),l!==null&&(0,b.jsx)(`p`,{className:`attachments__error`,children:l})]})}var zp=e=>new Date(e).toLocaleDateString(void 0,{day:`numeric`,month:`short`}),Bp=e=>e.latest===null&&e.latestText===null;function Vp(e){if(e.latest!==null){let t=Number.isInteger(e.latest)?String(e.latest):e.latest.toFixed(2).replace(/\.?0+$/,``);return e.units.length>0?`${t} ${e.units.join(`/`)}`:t}if(e.values.length>1){let t=e.values.map(e=>`${e.text} x${e.count}`).join(`, `),n=e.distinctValues-e.values.length;return n>0?`${t}, +${n} more`:t}return e.latestText??``}function Hp({metrics:e,open:t,onToggle:n}){return e.length===0?null:(0,b.jsx)(fp,{title:`Metrics`,count:e.length,open:t,onToggle:n,children:(0,b.jsx)(`table`,{className:`metrics__table`,children:(0,b.jsx)(`tbody`,{children:e.map(e=>(0,b.jsxs)(`tr`,{children:[(0,b.jsx)(`td`,{className:`metrics__name`,children:e.metric}),(0,b.jsx)(`td`,{className:`metrics__value`,"data-mixed":e.units.length>1,"data-wrap":e.values.length>1,children:Vp(e)}),(0,b.jsx)(`td`,{className:`metrics__count`,children:Bp(e)?`${e.count} ${e.count===1?`occurrence`:`occurrences`}, to ${zp(e.latestAt)}`:e.count===1?zp(e.latestAt):`${e.count} readings, to ${zp(e.latestAt)}`})]},e.metric))})})})}var Up=(0,_.createContext)({}),Wp=()=>(0,_.useContext)(Up),K={done:{icon:`✓`,label:`done`,colour:`#34d399`,strike:!0},review:{icon:`◐`,label:`review`,colour:`#a884f3`,strike:!1},"in-progress":{icon:`●`,label:`in-progress`,colour:`#4f9dff`,strike:!1},"to-do":{icon:`○`,label:`to-do`,colour:`#fbbf24`,strike:!1},planning:{icon:`○`,label:`planning`,colour:`#e8590c`,strike:!1}};Object.keys(K);var Gp=/^[A-Z][A-Z0-9]*-[1-9]\d*(\.[1-9]\d*)*$/,Kp=e=>Gp.test(e);function qp(e){let t=e.indexOf(`:`);if(t<=0)return null;let n=e.slice(t+1);return Kp(n)?{project:e.slice(0,t),ref:n}:null}function Jp(e){let t=[];for(let n of e)t.includes(n.area)||t.push(n.area);return t}var Yp=o(((e,t)=>{var n=class{_isDirected=!0;_isMultigraph=!1;_isCompound=!1;_label;_defaultNodeLabelFn=()=>void 0;_defaultEdgeLabelFn=()=>void 0;_nodes={};_in={};_preds={};_out={};_sucs={};_edgeObjs={};_edgeLabels={};_nodeCount=0;_edgeCount=0;_parent;_children;constructor(e){e&&(this._isDirected=!Object.hasOwn(e,`directed`)||e.directed,this._isMultigraph=Object.hasOwn(e,`multigraph`)?e.multigraph:!1,this._isCompound=Object.hasOwn(e,`compound`)?e.compound:!1),this._isCompound&&(this._parent={},this._children={},this._children[`\0`]={})}isDirected(){return this._isDirected}isMultigraph(){return this._isMultigraph}isCompound(){return this._isCompound}setGraph(e){return this._label=e,this}graph(){return this._label}setDefaultNodeLabel(e){return this._defaultNodeLabelFn=e,typeof e!=`function`&&(this._defaultNodeLabelFn=()=>e),this}nodeCount(){return this._nodeCount}nodes(){return Object.keys(this._nodes)}sources(){var e=this;return this.nodes().filter(t=>Object.keys(e._in[t]).length===0)}sinks(){var e=this;return this.nodes().filter(t=>Object.keys(e._out[t]).length===0)}setNodes(e,t){var n=arguments,r=this;return e.forEach(function(e){n.length>1?r.setNode(e,t):r.setNode(e)}),this}setNode(e,t){return Object.hasOwn(this._nodes,e)?(arguments.length>1&&(this._nodes[e]=t),this):(this._nodes[e]=arguments.length>1?t:this._defaultNodeLabelFn(e),this._isCompound&&(this._parent[e]=`\0`,this._children[e]={},this._children[`\0`][e]=!0),this._in[e]={},this._preds[e]={},this._out[e]={},this._sucs[e]={},++this._nodeCount,this)}node(e){return this._nodes[e]}hasNode(e){return Object.hasOwn(this._nodes,e)}removeNode(e){var t=this;if(Object.hasOwn(this._nodes,e)){var n=e=>t.removeEdge(t._edgeObjs[e]);delete this._nodes[e],this._isCompound&&(this._removeFromParentsChildList(e),delete this._parent[e],this.children(e).forEach(function(e){t.setParent(e)}),delete this._children[e]),Object.keys(this._in[e]).forEach(n),delete this._in[e],delete this._preds[e],Object.keys(this._out[e]).forEach(n),delete this._out[e],delete this._sucs[e],--this._nodeCount}return this}setParent(e,t){if(!this._isCompound)throw Error(`Cannot set parent in a non-compound graph`);if(t===void 0)t=`\0`;else{t+=``;for(var n=t;n!==void 0;n=this.parent(n))if(n===e)throw Error(`Setting `+t+` as parent of `+e+` would create a cycle`);this.setNode(t)}return this.setNode(e),this._removeFromParentsChildList(e),this._parent[e]=t,this._children[t][e]=!0,this}_removeFromParentsChildList(e){delete this._children[this._parent[e]][e]}parent(e){if(this._isCompound){var t=this._parent[e];if(t!==`\0`)return t}}children(e=`\0`){if(this._isCompound){var t=this._children[e];if(t)return Object.keys(t)}else if(e===`\0`)return this.nodes();else if(this.hasNode(e))return[]}predecessors(e){var t=this._preds[e];if(t)return Object.keys(t)}successors(e){var t=this._sucs[e];if(t)return Object.keys(t)}neighbors(e){var t=this.predecessors(e);if(t){let r=new Set(t);for(var n of this.successors(e))r.add(n);return Array.from(r.values())}}isLeaf(e){return(this.isDirected()?this.successors(e):this.neighbors(e)).length===0}filterNodes(e){var t=new this.constructor({directed:this._isDirected,multigraph:this._isMultigraph,compound:this._isCompound});t.setGraph(this.graph());var n=this;Object.entries(this._nodes).forEach(function([n,r]){e(n)&&t.setNode(n,r)}),Object.values(this._edgeObjs).forEach(function(e){t.hasNode(e.v)&&t.hasNode(e.w)&&t.setEdge(e,n.edge(e))});var r={};function i(e){var a=n.parent(e);return a===void 0||t.hasNode(a)?(r[e]=a,a):a in r?r[a]:i(a)}return this._isCompound&&t.nodes().forEach(e=>t.setParent(e,i(e))),t}setDefaultEdgeLabel(e){return this._defaultEdgeLabelFn=e,typeof e!=`function`&&(this._defaultEdgeLabelFn=()=>e),this}edgeCount(){return this._edgeCount}edges(){return Object.values(this._edgeObjs)}setPath(e,t){var n=this,r=arguments;return e.reduce(function(e,i){return r.length>1?n.setEdge(e,i,t):n.setEdge(e,i),i}),this}setEdge(){var e,t,n,i,s=!1,c=arguments[0];typeof c==`object`&&c&&`v`in c?(e=c.v,t=c.w,n=c.name,arguments.length===2&&(i=arguments[1],s=!0)):(e=c,t=arguments[1],n=arguments[3],arguments.length>2&&(i=arguments[2],s=!0)),e=``+e,t=``+t,n!==void 0&&(n=``+n);var l=a(this._isDirected,e,t,n);if(Object.hasOwn(this._edgeLabels,l))return s&&(this._edgeLabels[l]=i),this;if(n!==void 0&&!this._isMultigraph)throw Error(`Cannot set a named edge when isMultigraph = false`);this.setNode(e),this.setNode(t),this._edgeLabels[l]=s?i:this._defaultEdgeLabelFn(e,t,n);var u=o(this._isDirected,e,t,n);return e=u.v,t=u.w,Object.freeze(u),this._edgeObjs[l]=u,r(this._preds[t],e),r(this._sucs[e],t),this._in[t][l]=u,this._out[e][l]=u,this._edgeCount++,this}edge(e,t,n){var r=arguments.length===1?s(this._isDirected,arguments[0]):a(this._isDirected,e,t,n);return this._edgeLabels[r]}edgeAsObj(){let e=this.edge(...arguments);return typeof e==`object`?e:{label:e}}hasEdge(e,t,n){var r=arguments.length===1?s(this._isDirected,arguments[0]):a(this._isDirected,e,t,n);return Object.hasOwn(this._edgeLabels,r)}removeEdge(e,t,n){var r=arguments.length===1?s(this._isDirected,arguments[0]):a(this._isDirected,e,t,n),o=this._edgeObjs[r];return o&&(e=o.v,t=o.w,delete this._edgeLabels[r],delete this._edgeObjs[r],i(this._preds[t],e),i(this._sucs[e],t),delete this._in[t][r],delete this._out[e][r],this._edgeCount--),this}inEdges(e,t){var n=this._in[e];if(n){var r=Object.values(n);return t?r.filter(e=>e.v===t):r}}outEdges(e,t){var n=this._out[e];if(n){var r=Object.values(n);return t?r.filter(e=>e.w===t):r}}nodeEdges(e,t){var n=this.inEdges(e,t);if(n)return n.concat(this.outEdges(e,t))}};function r(e,t){e[t]?e[t]++:e[t]=1}function i(e,t){--e[t]||delete e[t]}function a(e,t,n,r){var i=``+t,a=``+n;if(!e&&i>a){var o=i;i=a,a=o}return i+``+a+``+(r===void 0?`\0`:r)}function o(e,t,n,r){var i=``+t,a=``+n;if(!e&&i>a){var o=i;i=a,a=o}var s={v:i,w:a};return r&&(s.name=r),s}function s(e,t){return a(e,t.v,t.w,t.name)}t.exports=n})),Xp=o(((e,t)=>{t.exports=`2.2.4`})),Zp=o(((e,t)=>{t.exports={Graph:Yp(),version:Xp()}})),Qp=o(((e,t)=>{var n=Yp();t.exports={write:r,read:o};function r(e){var t={options:{directed:e.isDirected(),multigraph:e.isMultigraph(),compound:e.isCompound()},nodes:i(e),edges:a(e)};return e.graph()!==void 0&&(t.value=structuredClone(e.graph())),t}function i(e){return e.nodes().map(function(t){var n=e.node(t),r=e.parent(t),i={v:t};return n!==void 0&&(i.value=n),r!==void 0&&(i.parent=r),i})}function a(e){return e.edges().map(function(t){var n=e.edge(t),r={v:t.v,w:t.w};return t.name!==void 0&&(r.name=t.name),n!==void 0&&(r.value=n),r})}function o(e){var t=new n(e.options).setGraph(e.value);return e.nodes.forEach(function(e){t.setNode(e.v,e.value),e.parent&&t.setParent(e.v,e.parent)}),e.edges.forEach(function(e){t.setEdge({v:e.v,w:e.w,name:e.name},e.value)}),t}})),$p=o(((e,t)=>{t.exports=n;function n(e){var t={},n=[],r;function i(n){Object.hasOwn(t,n)||(t[n]=!0,r.push(n),e.successors(n).forEach(i),e.predecessors(n).forEach(i))}return e.nodes().forEach(function(e){r=[],i(e),r.length&&n.push(r)}),n}})),em=o(((e,t)=>{t.exports=class{_arr=[];_keyIndices={};size(){return this._arr.length}keys(){return this._arr.map(function(e){return e.key})}has(e){return Object.hasOwn(this._keyIndices,e)}priority(e){var t=this._keyIndices[e];if(t!==void 0)return this._arr[t].priority}min(){if(this.size()===0)throw Error(`Queue underflow`);return this._arr[0].key}add(e,t){var n=this._keyIndices;if(e=String(e),!Object.hasOwn(n,e)){var r=this._arr,i=r.length;return n[e]=i,r.push({key:e,priority:t}),this._decrease(i),!0}return!1}removeMin(){this._swap(0,this._arr.length-1);var e=this._arr.pop();return delete this._keyIndices[e.key],this._heapify(0),e.key}decrease(e,t){var n=this._keyIndices[e];if(t>this._arr[n].priority)throw Error(`New priority is greater than current priority. Key: `+e+` Old: `+this._arr[n].priority+` New: `+t);this._arr[n].priority=t,this._decrease(n)}_heapify(e){var t=this._arr,n=2*e,r=n+1,i=e;n<t.length&&(i=t[n].priority<t[i].priority?n:i,r<t.length&&(i=t[r].priority<t[i].priority?r:i),i!==e&&(this._swap(e,i),this._heapify(i)))}_decrease(e){for(var t=this._arr,n=t[e].priority,r;e!==0&&(r=e>>1,!(t[r].priority<n));)this._swap(e,r),e=r}_swap(e,t){var n=this._arr,r=this._keyIndices,i=n[e],a=n[t];n[e]=a,n[t]=i,r[a.key]=e,r[i.key]=t}}})),tm=o(((e,t)=>{var n=em();t.exports=i;var r=()=>1;function i(e,t,n,i){return a(e,String(t),n||r,i||function(t){return e.outEdges(t)})}function a(e,t,r,i){var a={},o=new n,s,c,l=function(e){var t=e.v===s?e.w:e.v,n=a[t],i=r(e),l=c.distance+i;if(i<0)throw Error(`dijkstra does not allow negative edge weights. Bad edge: `+e+` Weight: `+i);l<n.distance&&(n.distance=l,n.predecessor=s,o.decrease(t,l))};for(e.nodes().forEach(function(e){var n=e===t?0:1/0;a[e]={distance:n},o.add(e,n)});o.size()>0&&(s=o.removeMin(),c=a[s],c.distance!==1/0);)i(s).forEach(l);return a}})),nm=o(((e,t)=>{var n=tm();t.exports=r;function r(e,t,r){return e.nodes().reduce(function(i,a){return i[a]=n(e,a,t,r),i},{})}})),rm=o(((e,t)=>{t.exports=n;function n(e){var t=0,n=[],r={},i=[];function a(o){var s=r[o]={onStack:!0,lowlink:t,index:t++};if(n.push(o),e.successors(o).forEach(function(e){Object.hasOwn(r,e)?r[e].onStack&&(s.lowlink=Math.min(s.lowlink,r[e].index)):(a(e),s.lowlink=Math.min(s.lowlink,r[e].lowlink))}),s.lowlink===s.index){var c=[],l;do l=n.pop(),r[l].onStack=!1,c.push(l);while(o!==l);i.push(c)}}return e.nodes().forEach(function(e){Object.hasOwn(r,e)||a(e)}),i}})),im=o(((e,t)=>{var n=rm();t.exports=r;function r(e){return n(e).filter(function(t){return t.length>1||t.length===1&&e.hasEdge(t[0],t[0])})}})),am=o(((e,t)=>{t.exports=r;var n=()=>1;function r(e,t,r){return i(e,t||n,r||function(t){return e.outEdges(t)})}function i(e,t,n){var r={},i=e.nodes();return i.forEach(function(e){r[e]={},r[e][e]={distance:0},i.forEach(function(t){e!==t&&(r[e][t]={distance:1/0})}),n(e).forEach(function(n){var i=n.v===e?n.w:n.v,a=t(n);r[e][i]={distance:a,predecessor:e}})}),i.forEach(function(e){var t=r[e];i.forEach(function(n){var a=r[n];i.forEach(function(n){var r=a[e],i=t[n],o=a[n],s=r.distance+i.distance;s<o.distance&&(o.distance=s,o.predecessor=i.predecessor)})})}),r}})),om=o(((e,t)=>{function n(e){var t={},n={},i=[];function a(o){if(Object.hasOwn(n,o))throw new r;Object.hasOwn(t,o)||(n[o]=!0,t[o]=!0,e.predecessors(o).forEach(a),delete n[o],i.push(o))}if(e.sinks().forEach(a),Object.keys(t).length!==e.nodeCount())throw new r;return i}var r=class extends Error{constructor(){super(...arguments)}};t.exports=n,n.CycleException=r})),sm=o(((e,t)=>{var n=om();t.exports=r;function r(e){try{n(e)}catch(e){if(e instanceof n.CycleException)return!1;throw e}return!0}})),cm=o(((e,t)=>{t.exports=n;function n(e,t,n){Array.isArray(t)||(t=[t]);var a=e.isDirected()?t=>e.successors(t):t=>e.neighbors(t),o=n===`post`?r:i,s=[],c={};return t.forEach(t=>{if(!e.hasNode(t))throw Error(`Graph does not have node: `+t);o(t,a,c,s)}),s}function r(e,t,n,r){for(var i=[[e,!1]];i.length>0;){var o=i.pop();o[1]?r.push(o[0]):Object.hasOwn(n,o[0])||(n[o[0]]=!0,i.push([o[0],!0]),a(t(o[0]),e=>i.push([e,!1])))}}function i(e,t,n,r){for(var i=[e];i.length>0;){var o=i.pop();Object.hasOwn(n,o)||(n[o]=!0,r.push(o),a(t(o),e=>i.push(e)))}}function a(e,t){for(var n=e.length;n--;)t(e[n],n,e);return e}})),lm=o(((e,t)=>{var n=cm();t.exports=r;function r(e,t){return n(e,t,`post`)}})),um=o(((e,t)=>{var n=cm();t.exports=r;function r(e,t){return n(e,t,`pre`)}})),dm=o(((e,t)=>{var n=Yp(),r=em();t.exports=i;function i(e,t){var i=new n,a={},o=new r,s;function c(e){var n=e.v===s?e.w:e.v,r=o.priority(n);if(r!==void 0){var i=t(e);i<r&&(a[n]=s,o.decrease(n,i))}}if(e.nodeCount()===0)return i;e.nodes().forEach(function(e){o.add(e,1/0),i.setNode(e)}),o.decrease(e.nodes()[0],0);for(var l=!1;o.size()>0;){if(s=o.removeMin(),Object.hasOwn(a,s))i.setEdge(s,a[s]);else if(l)throw Error(`Input graph is not connected: `+e);else l=!0;e.nodeEdges(s).forEach(c)}return i}})),fm=o(((e,t)=>{t.exports={components:$p(),dijkstra:tm(),dijkstraAll:nm(),findCycles:im(),floydWarshall:am(),isAcyclic:sm(),postorder:lm(),preorder:um(),prim:dm(),tarjan:rm(),topsort:om()}})),pm=o(((e,t)=>{var n=Zp();t.exports={Graph:n.Graph,json:Qp(),alg:fm(),version:n.version}})),mm=o(((e,t)=>{var n=class{constructor(){let e={};e._next=e._prev=e,this._sentinel=e}dequeue(){let e=this._sentinel,t=e._prev;if(t!==e)return r(t),t}enqueue(e){let t=this._sentinel;e._prev&&e._next&&r(e),e._next=t._next,t._next._prev=e,t._next=e,e._prev=t}toString(){let e=[],t=this._sentinel,n=t._prev;for(;n!==t;)e.push(JSON.stringify(n,i)),n=n._prev;return`[`+e.join(`, `)+`]`}};function r(e){e._prev._next=e._next,e._next._prev=e._prev,delete e._next,delete e._prev}function i(e,t){if(e!==`_next`&&e!==`_prev`)return t}t.exports=n})),hm=o(((e,t)=>{var n=pm().Graph,r=mm();t.exports=a;var i=()=>1;function a(e,t){if(e.nodeCount()<=1)return[];let n=c(e,t||i);return o(n.graph,n.buckets,n.zeroIdx).flatMap(t=>e.outEdges(t.v,t.w))}function o(e,t,n){let r=[],i=t[t.length-1],a=t[0],o;for(;e.nodeCount();){for(;o=a.dequeue();)s(e,t,n,o);for(;o=i.dequeue();)s(e,t,n,o);if(e.nodeCount()){for(let i=t.length-2;i>0;--i)if(o=t[i].dequeue(),o){r=r.concat(s(e,t,n,o,!0));break}}}return r}function s(e,t,n,r,i){let a=i?[]:void 0;return e.inEdges(r.v).forEach(r=>{let o=e.edge(r),s=e.node(r.v);i&&a.push({v:r.v,w:r.w}),s.out-=o,l(t,n,s)}),e.outEdges(r.v).forEach(r=>{let i=e.edge(r),a=r.w,o=e.node(a);o.in-=i,l(t,n,o)}),e.removeNode(r.v),a}function c(e,t){let i=new n,a=0,o=0;e.nodes().forEach(e=>{i.setNode(e,{v:e,in:0,out:0})}),e.edges().forEach(e=>{let n=i.edge(e.v,e.w)||0,r=t(e),s=n+r;i.setEdge(e.v,e.w,s),o=Math.max(o,i.node(e.v).out+=r),a=Math.max(a,i.node(e.w).in+=r)});let s=u(o+a+3).map(()=>new r),c=a+1;return i.nodes().forEach(e=>{l(s,c,i.node(e))}),{graph:i,buckets:s,zeroIdx:c}}function l(e,t,n){n.out?n.in?e[n.out-n.in+t].enqueue(n):e[e.length-1].enqueue(n):e[0].enqueue(n)}function u(e){let t=[];for(let n=0;n<e;n++)t.push(n);return t}})),gm=o(((e,t)=>{var n=pm().Graph;t.exports={addBorderNode:f,addDummyNode:r,applyWithChunking:h,asNonCompoundGraph:a,buildLayerMatrix:l,intersectRect:c,mapValues:w,maxRank:g,normalizeRanks:u,notime:y,partition:_,pick:C,predecessorWeights:s,range:S,removeEmptyRanks:d,simplify:i,successorWeights:o,time:v,uniqueId:x,zipObject:T};function r(e,t,n,r){for(var i=r;e.hasNode(i);)i=x(r);return n.dummy=t,e.setNode(i,n),i}function i(e){let t=new n().setGraph(e.graph());return e.nodes().forEach(n=>t.setNode(n,e.node(n))),e.edges().forEach(n=>{let r=t.edge(n.v,n.w)||{weight:0,minlen:1},i=e.edge(n);t.setEdge(n.v,n.w,{weight:r.weight+i.weight,minlen:Math.max(r.minlen,i.minlen)})}),t}function a(e){let t=new n({multigraph:e.isMultigraph()}).setGraph(e.graph());return e.nodes().forEach(n=>{e.children(n).length||t.setNode(n,e.node(n))}),e.edges().forEach(n=>{t.setEdge(n,e.edge(n))}),t}function o(e){let t=e.nodes().map(t=>{let n={};return e.outEdges(t).forEach(t=>{n[t.w]=(n[t.w]||0)+e.edge(t).weight}),n});return T(e.nodes(),t)}function s(e){let t=e.nodes().map(t=>{let n={};return e.inEdges(t).forEach(t=>{n[t.v]=(n[t.v]||0)+e.edge(t).weight}),n});return T(e.nodes(),t)}function c(e,t){let n=e.x,r=e.y,i=t.x-n,a=t.y-r,o=e.width/2,s=e.height/2;if(!i&&!a)throw Error(`Not possible to find intersection inside of the rectangle`);let c,l;return Math.abs(a)*o>Math.abs(i)*s?(a<0&&(s=-s),c=s*i/a,l=s):(i<0&&(o=-o),c=o,l=o*a/i),{x:n+c,y:r+l}}function l(e){let t=S(g(e)+1).map(()=>[]);return e.nodes().forEach(n=>{let r=e.node(n),i=r.rank;i!==void 0&&(t[i][r.order]=n)}),t}function u(e){let t=e.nodes().map(t=>{let n=e.node(t).rank;return n===void 0?Number.MAX_VALUE:n}),n=h(Math.min,t);e.nodes().forEach(t=>{let r=e.node(t);Object.hasOwn(r,`rank`)&&(r.rank-=n)})}function d(e){let t=e.nodes().map(t=>e.node(t).rank),n=h(Math.min,t),r=[];e.nodes().forEach(t=>{let i=e.node(t).rank-n;r[i]||(r[i]=[]),r[i].push(t)});let i=0,a=e.graph().nodeRankFactor;Array.from(r).forEach((t,n)=>{t===void 0&&n%a!==0?--i:t!==void 0&&i&&t.forEach(t=>e.node(t).rank+=i)})}function f(e,t,n,i){let a={width:0,height:0};return arguments.length>=4&&(a.rank=n,a.order=i),r(e,`border`,a,t)}function p(e,t=m){let n=[];for(let r=0;r<e.length;r+=t){let i=e.slice(r,r+t);n.push(i)}return n}var m=65535;function h(e,t){if(t.length>m){let n=p(t);return e.apply(null,n.map(t=>e.apply(null,t)))}return e.apply(null,t)}function g(e){let t=e.nodes().map(t=>{let n=e.node(t).rank;return n===void 0?Number.MIN_VALUE:n});return h(Math.max,t)}function _(e,t){let n={lhs:[],rhs:[]};return e.forEach(e=>{t(e)?n.lhs.push(e):n.rhs.push(e)}),n}function v(e,t){let n=Date.now();try{return t()}finally{console.log(e+` time: `+(Date.now()-n)+`ms`)}}function y(e,t){return t()}var b=0;function x(e){return e+(``+ ++b)}function S(e,t,n=1){t??(t=e,e=0);let r=e=>e<t;n<0&&(r=e=>t<e);let i=[];for(let t=e;r(t);t+=n)i.push(t);return i}function C(e,t){let n={};for(let r of t)e[r]!==void 0&&(n[r]=e[r]);return n}function w(e,t){let n=t;return typeof t==`string`&&(n=e=>e[t]),Object.entries(e).reduce((e,[t,r])=>(e[t]=n(r,t),e),{})}function T(e,t){return e.reduce((e,n,r)=>(e[n]=t[r],e),{})}})),_m=o(((e,t)=>{var n=hm(),r=gm().uniqueId;t.exports={run:i,undo:o};function i(e){(e.graph().acyclicer===`greedy`?n(e,t(e)):a(e)).forEach(t=>{let n=e.edge(t);e.removeEdge(t),n.forwardName=t.name,n.reversed=!0,e.setEdge(t.w,t.v,n,r(`rev`))});function t(e){return t=>e.edge(t).weight}}function a(e){let t=[],n={},r={};function i(a){Object.hasOwn(r,a)||(r[a]=!0,n[a]=!0,e.outEdges(a).forEach(e=>{Object.hasOwn(n,e.w)?t.push(e):i(e.w)}),delete n[a])}return e.nodes().forEach(i),t}function o(e){e.edges().forEach(t=>{let n=e.edge(t);if(n.reversed){e.removeEdge(t);let r=n.forwardName;delete n.reversed,delete n.forwardName,e.setEdge(t.w,t.v,n,r)}})}})),vm=o(((e,t)=>{var n=gm();t.exports={run:r,undo:a};function r(e){e.graph().dummyChains=[],e.edges().forEach(t=>i(e,t))}function i(e,t){let r=t.v,i=e.node(r).rank,a=t.w,o=e.node(a).rank,s=t.name,c=e.edge(t),l=c.labelRank;if(o===i+1)return;e.removeEdge(t);let u,d,f=0;for(++i;i<o;++f,++i)c.points=[],d={width:0,height:0,edgeLabel:c,edgeObj:t,rank:i},u=n.addDummyNode(e,`edge`,d,`_d`),i===l&&(d.width=c.width,d.height=c.height,d.dummy=`edge-label`,d.labelpos=c.labelpos),e.setEdge(r,u,{weight:c.weight},s),f===0&&e.graph().dummyChains.push(u),r=u;e.setEdge(r,a,{weight:c.weight},s)}function a(e){e.graph().dummyChains.forEach(t=>{let n=e.node(t),r=n.edgeLabel,i;for(e.setEdge(n.edgeObj,r);n.dummy;)i=e.successors(t)[0],e.removeNode(t),r.points.push({x:n.x,y:n.y}),n.dummy===`edge-label`&&(r.x=n.x,r.y=n.y,r.width=n.width,r.height=n.height),t=i,n=e.node(t)})}})),ym=o(((e,t)=>{var{applyWithChunking:n}=gm();t.exports={longestPath:r,slack:i};function r(e){var t={};function r(i){var a=e.node(i);if(Object.hasOwn(t,i))return a.rank;t[i]=!0;let o=e.outEdges(i).map(t=>t==null?1/0:r(t.w)-e.edge(t).minlen);var s=n(Math.min,o);return s===1/0&&(s=0),a.rank=s}e.sources().forEach(r)}function i(e,t){return e.node(t.w).rank-e.node(t.v).rank-e.edge(t).minlen}})),bm=o(((e,t)=>{var n=pm().Graph,r=ym().slack;t.exports=i;function i(e){var t=new n({directed:!1}),i=e.nodes()[0],c=e.nodeCount();t.setNode(i,{});for(var l,u;a(t,e)<c;)l=o(t,e),u=t.hasNode(l.v)?r(e,l):-r(e,l),s(t,e,u);return t}function a(e,t){function n(i){t.nodeEdges(i).forEach(a=>{var o=a.v,s=i===o?a.w:o;!e.hasNode(s)&&!r(t,a)&&(e.setNode(s,{}),e.setEdge(i,s,{}),n(s))})}return e.nodes().forEach(n),e.nodeCount()}function o(e,t){return t.edges().reduce((n,i)=>{let a=1/0;return e.hasNode(i.v)!==e.hasNode(i.w)&&(a=r(t,i)),a<n[0]?[a,i]:n},[1/0,null])[1]}function s(e,t,n){e.nodes().forEach(e=>t.node(e).rank+=n)}})),xm=o(((e,t)=>{var n=bm(),r=ym().slack,i=ym().longestPath,a=pm().alg.preorder,o=pm().alg.postorder,s=gm().simplify;t.exports=c,c.initLowLimValues=f,c.initCutValues=l,c.calcCutValue=d,c.leaveEdge=m,c.enterEdge=h,c.exchangeEdges=g;function c(e){e=s(e),i(e);var t=n(e);f(t),l(t,e);for(var r,a;r=m(t);)a=h(t,e,r),g(t,e,r,a)}function l(e,t){var n=o(e,e.nodes());n=n.slice(0,n.length-1),n.forEach(n=>u(e,t,n))}function u(e,t,n){var r=e.node(n).parent;e.edge(n,r).cutvalue=d(e,t,n)}function d(e,t,n){var r=e.node(n).parent,i=!0,a=t.edge(n,r),o=0;return a||=(i=!1,t.edge(r,n)),o=a.weight,t.nodeEdges(n).forEach(a=>{var s=a.v===n,c=s?a.w:a.v;if(c!==r){var l=s===i,u=t.edge(a).weight;if(o+=l?u:-u,v(e,n,c)){var d=e.edge(n,c).cutvalue;o+=l?-d:d}}}),o}function f(e,t){arguments.length<2&&(t=e.nodes()[0]),p(e,{},1,t)}function p(e,t,n,r,i){var a=n,o=e.node(r);return t[r]=!0,e.neighbors(r).forEach(i=>{Object.hasOwn(t,i)||(n=p(e,t,n,i,r))}),o.low=a,o.lim=n++,i?o.parent=i:delete o.parent,n}function m(e){return e.edges().find(t=>e.edge(t).cutvalue<0)}function h(e,t,n){var i=n.v,a=n.w;t.hasEdge(i,a)||(i=n.w,a=n.v);var o=e.node(i),s=e.node(a),c=o,l=!1;return o.lim>s.lim&&(c=s,l=!0),t.edges().filter(t=>l===y(e,e.node(t.v),c)&&l!==y(e,e.node(t.w),c)).reduce((e,n)=>r(t,n)<r(t,e)?n:e)}function g(e,t,n,r){var i=n.v,a=n.w;e.removeEdge(i,a),e.setEdge(r.v,r.w,{}),f(e),l(e,t),_(e,t)}function _(e,t){var n=a(e,e.nodes().find(e=>!t.node(e).parent));n=n.slice(1),n.forEach(n=>{var r=e.node(n).parent,i=t.edge(n,r),a=!1;i||(i=t.edge(r,n),a=!0),t.node(n).rank=t.node(r).rank+(a?i.minlen:-i.minlen)})}function v(e,t,n){return e.hasEdge(t,n)}function y(e,t,n){return n.low<=t.lim&&t.lim<=n.lim}})),Sm=o(((e,t)=>{var n=ym().longestPath,r=bm(),i=xm();t.exports=a;function a(e){var t=e.graph().ranker;if(t instanceof Function)return t(e);switch(e.graph().ranker){case`network-simplex`:c(e);break;case`tight-tree`:s(e);break;case`longest-path`:o(e);break;case`none`:break;default:c(e)}}var o=n;function s(e){n(e),r(e)}function c(e){i(e)}})),Cm=o(((e,t)=>{t.exports=n;function n(e){let t=i(e);e.graph().dummyChains.forEach(n=>{let i=e.node(n),a=i.edgeObj,o=r(e,t,a.v,a.w),s=o.path,c=o.lca,l=0,u=s[l],d=!0;for(;n!==a.w;){if(i=e.node(n),d){for(;(u=s[l])!==c&&e.node(u).maxRank<i.rank;)l++;u===c&&(d=!1)}if(!d){for(;l<s.length-1&&e.node(u=s[l+1]).minRank<=i.rank;)l++;u=s[l]}e.setParent(n,u),n=e.successors(n)[0]}})}function r(e,t,n,r){let i=[],a=[],o=Math.min(t[n].low,t[r].low),s=Math.max(t[n].lim,t[r].lim),c,l;c=n;do c=e.parent(c),i.push(c);while(c&&(t[c].low>o||s>t[c].lim));for(l=c,c=r;(c=e.parent(c))!==l;)a.push(c);return{path:i.concat(a.reverse()),lca:l}}function i(e){let t={},n=0;function r(i){let a=n;e.children(i).forEach(r),t[i]={low:a,lim:n++}}return e.children().forEach(r),t}})),wm=o(((e,t)=>{var n=gm();t.exports={run:r,cleanup:s};function r(e){let t=n.addDummyNode(e,`root`,{},`_root`),r=a(e),s=Object.values(r),c=n.applyWithChunking(Math.max,s)-1,l=2*c+1;e.graph().nestingRoot=t,e.edges().forEach(t=>e.edge(t).minlen*=l);let u=o(e)+1;e.children().forEach(n=>i(e,t,l,u,c,r,n)),e.graph().nodeRankFactor=l}function i(e,t,r,a,o,s,c){let l=e.children(c);if(!l.length){c!==t&&e.setEdge(t,c,{weight:0,minlen:r});return}let u=n.addBorderNode(e,`_bt`),d=n.addBorderNode(e,`_bb`),f=e.node(c);e.setParent(u,c),f.borderTop=u,e.setParent(d,c),f.borderBottom=d,l.forEach(n=>{i(e,t,r,a,o,s,n);let l=e.node(n),f=l.borderTop?l.borderTop:n,p=l.borderBottom?l.borderBottom:n,m=l.borderTop?a:2*a,h=f===p?o-s[c]+1:1;e.setEdge(u,f,{weight:m,minlen:h,nestingEdge:!0}),e.setEdge(p,d,{weight:m,minlen:h,nestingEdge:!0})}),e.parent(c)||e.setEdge(t,u,{weight:0,minlen:o+s[c]})}function a(e){var t={};function n(r,i){var a=e.children(r);a&&a.length&&a.forEach(e=>n(e,i+1)),t[r]=i}return e.children().forEach(e=>n(e,1)),t}function o(e){return e.edges().reduce((t,n)=>t+e.edge(n).weight,0)}function s(e){var t=e.graph();e.removeNode(t.nestingRoot),delete t.nestingRoot,e.edges().forEach(t=>{e.edge(t).nestingEdge&&e.removeEdge(t)})}})),Tm=o(((e,t)=>{var n=gm();t.exports=r;function r(e){function t(n){let r=e.children(n),a=e.node(n);if(r.length&&r.forEach(t),Object.hasOwn(a,`minRank`)){a.borderLeft=[],a.borderRight=[];for(let t=a.minRank,r=a.maxRank+1;t<r;++t)i(e,`borderLeft`,`_bl`,n,a,t),i(e,`borderRight`,`_br`,n,a,t)}}e.children().forEach(t)}function i(e,t,r,i,a,o){let s={width:0,height:0,rank:o,borderType:t},c=a[t][o-1],l=n.addDummyNode(e,`border`,s,r);a[t][o]=l,e.setParent(l,i),c&&e.setEdge(c,l,{weight:1})}})),Em=o(((e,t)=>{t.exports={adjust:n,undo:r};function n(e){let t=e.graph().rankdir.toLowerCase();(t===`lr`||t===`rl`)&&i(e)}function r(e){let t=e.graph().rankdir.toLowerCase();(t===`bt`||t===`rl`)&&o(e),(t===`lr`||t===`rl`)&&(c(e),i(e))}function i(e){e.nodes().forEach(t=>a(e.node(t))),e.edges().forEach(t=>a(e.edge(t)))}function a(e){let t=e.width;e.width=e.height,e.height=t}function o(e){e.nodes().forEach(t=>s(e.node(t))),e.edges().forEach(t=>{let n=e.edge(t);n.points.forEach(s),Object.hasOwn(n,`y`)&&s(n)})}function s(e){e.y=-e.y}function c(e){e.nodes().forEach(t=>l(e.node(t))),e.edges().forEach(t=>{let n=e.edge(t);n.points.forEach(l),Object.hasOwn(n,`x`)&&l(n)})}function l(e){let t=e.x;e.x=e.y,e.y=t}})),Dm=o(((e,t)=>{var n=gm();t.exports=r;function r(e){let t={},r=e.nodes().filter(t=>!e.children(t).length),i=r.map(t=>e.node(t).rank),a=n.applyWithChunking(Math.max,i),o=n.range(a+1).map(()=>[]);function s(n){if(t[n])return;t[n]=!0;let r=e.node(n);o[r.rank].push(n),e.successors(n).forEach(s)}return r.sort((t,n)=>e.node(t).rank-e.node(n).rank).forEach(s),o}})),Om=o(((e,t)=>{var n=gm().zipObject;t.exports=r;function r(e,t){let n=0;for(let r=1;r<t.length;++r)n+=i(e,t[r-1],t[r]);return n}function i(e,t,r){let i=n(r,r.map((e,t)=>t)),a=t.flatMap(t=>e.outEdges(t).map(t=>({pos:i[t.w],weight:e.edge(t).weight})).sort((e,t)=>e.pos-t.pos)),o=1;for(;o<r.length;)o<<=1;let s=2*o-1;--o;let c=Array(s).fill(0),l=0;return a.forEach(e=>{let t=e.pos+o;c[t]+=e.weight;let n=0;for(;t>0;)t%2&&(n+=c[t+1]),t=t-1>>1,c[t]+=e.weight;l+=e.weight*n}),l}})),km=o(((e,t)=>{t.exports=n;function n(e,t=[]){return t.map(t=>{let n=e.inEdges(t);if(n.length){let r=n.reduce((t,n)=>{let r=e.edge(n),i=e.node(n.v);return{sum:t.sum+r.weight*i.order,weight:t.weight+r.weight}},{sum:0,weight:0});return{v:t,barycenter:r.sum/r.weight,weight:r.weight}}return{v:t}})}})),Am=o(((e,t)=>{var n=gm();t.exports=r;function r(e,t){let n={};return e.forEach((e,t)=>{let r=n[e.v]={indegree:0,in:[],out:[],vs:[e.v],i:t};e.barycenter!==void 0&&(r.barycenter=e.barycenter,r.weight=e.weight)}),t.edges().forEach(e=>{let t=n[e.v],r=n[e.w];t!==void 0&&r!==void 0&&(r.indegree++,t.out.push(n[e.w]))}),i(Object.values(n).filter(e=>!e.indegree))}function i(e){let t=[];function r(e){return t=>{t.merged||(t.barycenter===void 0||e.barycenter===void 0||t.barycenter>=e.barycenter)&&a(e,t)}}function i(t){return n=>{n.in.push(t),--n.indegree===0&&e.push(n)}}for(;e.length;){let n=e.pop();t.push(n),n.in.reverse().forEach(r(n)),n.out.forEach(i(n))}return t.filter(e=>!e.merged).map(e=>n.pick(e,[`vs`,`i`,`barycenter`,`weight`]))}function a(e,t){let n=0,r=0;e.weight&&(n+=e.barycenter*e.weight,r+=e.weight),t.weight&&(n+=t.barycenter*t.weight,r+=t.weight),e.vs=t.vs.concat(e.vs),e.barycenter=n/r,e.weight=r,e.i=Math.min(t.i,e.i),t.merged=!0}})),jm=o(((e,t)=>{var n=gm();t.exports=r;function r(e,t){let r=n.partition(e,e=>Object.hasOwn(e,`barycenter`)),o=r.lhs,s=r.rhs.sort((e,t)=>t.i-e.i),c=[],l=0,u=0,d=0;o.sort(a(!!t)),d=i(c,s,d),o.forEach(e=>{d+=e.vs.length,c.push(e.vs),l+=e.barycenter*e.weight,u+=e.weight,d=i(c,s,d)});let f={vs:c.flat(!0)};return u&&(f.barycenter=l/u,f.weight=u),f}function i(e,t,n){let r;for(;t.length&&(r=t[t.length-1]).i<=n;)t.pop(),e.push(r.vs),n++;return n}function a(e){return(t,n)=>t.barycenter<n.barycenter?-1:t.barycenter>n.barycenter?1:e?n.i-t.i:t.i-n.i}})),Mm=o(((e,t)=>{var n=km(),r=Am(),i=jm();t.exports=a;function a(e,t,c,l){let u=e.children(t),d=e.node(t),f=d?d.borderLeft:void 0,p=d?d.borderRight:void 0,m={};f&&(u=u.filter(e=>e!==f&&e!==p));let h=n(e,u);h.forEach(t=>{if(e.children(t.v).length){let n=a(e,t.v,c,l);m[t.v]=n,Object.hasOwn(n,`barycenter`)&&s(t,n)}});let g=r(h,c);o(g,m);let _=i(g,l);if(f&&(_.vs=[f,_.vs,p].flat(!0),e.predecessors(f).length)){let t=e.node(e.predecessors(f)[0]),n=e.node(e.predecessors(p)[0]);Object.hasOwn(_,`barycenter`)||(_.barycenter=0,_.weight=0),_.barycenter=(_.barycenter*_.weight+t.order+n.order)/(_.weight+2),_.weight+=2}return _}function o(e,t){e.forEach(e=>{e.vs=e.vs.flatMap(e=>t[e]?t[e].vs:e)})}function s(e,t){e.barycenter===void 0?(e.barycenter=t.barycenter,e.weight=t.weight):(e.barycenter=(e.barycenter*e.weight+t.barycenter*t.weight)/(e.weight+t.weight),e.weight+=t.weight)}})),Nm=o(((e,t)=>{var n=pm().Graph,r=gm();t.exports=i;function i(e,t,r,i){i||=e.nodes();let o=a(e),s=new n({compound:!0}).setGraph({root:o}).setDefaultNodeLabel(t=>e.node(t));return i.forEach(n=>{let i=e.node(n),a=e.parent(n);(i.rank===t||i.minRank<=t&&t<=i.maxRank)&&(s.setNode(n),s.setParent(n,a||o),e[r](n).forEach(t=>{let r=t.v===n?t.w:t.v,i=s.edge(r,n),a=i===void 0?0:i.weight;s.setEdge(r,n,{weight:e.edge(t).weight+a})}),Object.hasOwn(i,`minRank`)&&s.setNode(n,{borderLeft:i.borderLeft[t],borderRight:i.borderRight[t]}))}),s}function a(e){for(var t;e.hasNode(t=r.uniqueId(`_root`)););return t}})),Pm=o(((e,t)=>{t.exports=n;function n(e,t,n){let r={},i;n.forEach(n=>{let a=e.parent(n),o,s;for(;a;){if(o=e.parent(a),o?(s=r[o],r[o]=a):(s=i,i=a),s&&s!==a){t.setEdge(s,a);return}a=o}})}})),Fm=o(((e,t)=>{var n=Dm(),r=Om(),i=Mm(),a=Nm(),o=Pm(),s=pm().Graph,c=gm();t.exports=l;function l(e,t){if(t&&typeof t.customOrder==`function`){t.customOrder(e,l);return}let i=c.maxRank(e),a=u(e,c.range(1,i+1),`inEdges`),o=u(e,c.range(i-1,-1,-1),`outEdges`),s=n(e);if(f(e,s),t&&t.disableOptimalOrderHeuristic)return;let p=1/0,m;for(let t=0,n=0;n<4;++t,++n){d(t%2?a:o,t%4>=2),s=c.buildLayerMatrix(e);let i=r(e,s);i<p&&(n=0,m=Object.assign({},s),p=i)}f(e,m)}function u(e,t,n){let r=new Map,i=(e,t)=>{r.has(e)||r.set(e,[]),r.get(e).push(t)};for(let t of e.nodes()){let n=e.node(t);if(typeof n.rank==`number`&&i(n.rank,t),typeof n.minRank==`number`&&typeof n.maxRank==`number`)for(let e=n.minRank;e<=n.maxRank;e++)e!==n.rank&&i(e,t)}return t.map(function(t){return a(e,t,n,r.get(t)||[])})}function d(e,t){let n=new s;e.forEach(function(e){let r=e.graph().root,a=i(e,r,n,t);a.vs.forEach((t,n)=>e.node(t).order=n),o(e,n,a.vs)})}function f(e,t){Object.values(t).forEach(t=>t.forEach((t,n)=>e.node(t).order=n))}})),Im=o(((e,t)=>{var n=pm().Graph,r=gm();t.exports={positionX:h,findType1Conflicts:i,findType2Conflicts:a,addConflict:s,hasConflict:c,verticalAlignment:l,horizontalCompaction:u,alignCoordinates:p,findSmallestWidthAlignment:f,balance:m};function i(e,t){let n={};function r(t,r){let i=0,a=0,c=t.length,l=r[r.length-1];return r.forEach((t,u)=>{let d=o(e,t),f=d?e.node(d).order:c;(d||t===l)&&(r.slice(a,u+1).forEach(t=>{e.predecessors(t).forEach(r=>{let a=e.node(r),o=a.order;(o<i||f<o)&&!(a.dummy&&e.node(t).dummy)&&s(n,r,t)})}),a=u+1,i=f)}),r}return t.length&&t.reduce(r),n}function a(e,t){let n={};function i(t,i,a,o,c){let l;r.range(i,a).forEach(r=>{l=t[r],e.node(l).dummy&&e.predecessors(l).forEach(t=>{let r=e.node(t);r.dummy&&(r.order<o||r.order>c)&&s(n,t,l)})})}function a(t,n){let r=-1,a,o=0;return n.forEach((s,c)=>{if(e.node(s).dummy===`border`){let t=e.predecessors(s);t.length&&(a=e.node(t[0]).order,i(n,o,c,r,a),o=c,r=a)}i(n,o,n.length,a,t.length)}),n}return t.length&&t.reduce(a),n}function o(e,t){if(e.node(t).dummy)return e.predecessors(t).find(t=>e.node(t).dummy)}function s(e,t,n){if(t>n){let e=t;t=n,n=e}let r=e[t];r||(e[t]=r={}),r[n]=!0}function c(e,t,n){if(t>n){let e=t;t=n,n=e}return!!e[t]&&Object.hasOwn(e[t],n)}function l(e,t,n,r){let i={},a={},o={};return t.forEach(e=>{e.forEach((e,t)=>{i[e]=e,a[e]=e,o[e]=t})}),t.forEach(e=>{let t=-1;e.forEach(e=>{let s=r(e);if(s.length){s=s.sort((e,t)=>o[e]-o[t]);let r=(s.length-1)/2;for(let l=Math.floor(r),u=Math.ceil(r);l<=u;++l){let r=s[l];a[e]===e&&t<o[r]&&!c(n,e,r)&&(a[r]=e,a[e]=i[e]=i[r],t=o[r])}}})}),{root:i,align:a}}function u(e,t,n,r,i){let a={},o=d(e,t,n,i),s=i?`borderLeft`:`borderRight`;function c(e,t){let n=o.nodes(),r=n.pop(),i={};for(;r;)i[r]?e(r):(i[r]=!0,n.push(r),n=n.concat(t(r))),r=n.pop()}function l(e){a[e]=o.inEdges(e).reduce((e,t)=>Math.max(e,a[t.v]+o.edge(t)),0)}function u(t){let n=o.outEdges(t).reduce((e,t)=>Math.min(e,a[t.w]-o.edge(t)),1/0),r=e.node(t);n!==1/0&&r.borderType!==s&&(a[t]=Math.max(a[t],n))}return c(l,o.predecessors.bind(o)),c(u,o.successors.bind(o)),Object.keys(r).forEach(e=>a[e]=a[n[e]]),a}function d(e,t,r,i){let a=new n,o=e.graph(),s=g(o.nodesep,o.edgesep,i);return t.forEach(t=>{let n;t.forEach(t=>{let i=r[t];if(a.setNode(i),n){var o=r[n],c=a.edge(o,i);a.setEdge(o,i,Math.max(s(e,t,n),c||0))}n=t})}),a}function f(e,t){return Object.values(t).reduce((t,n)=>{let r=-1/0,i=1/0;Object.entries(n).forEach(([t,n])=>{let a=_(e,t)/2;r=Math.max(n+a,r),i=Math.min(n-a,i)});let a=r-i;return a<t[0]&&(t=[a,n]),t},[1/0,null])[1]}function p(e,t){let n=Object.values(t),i=r.applyWithChunking(Math.min,n),a=r.applyWithChunking(Math.max,n);[`u`,`d`].forEach(n=>{[`l`,`r`].forEach(o=>{let s=n+o,c=e[s];if(c===t)return;let l=Object.values(c),u=i-r.applyWithChunking(Math.min,l);o!==`l`&&(u=a-r.applyWithChunking(Math.max,l)),u&&(e[s]=r.mapValues(c,e=>e+u))})})}function m(e,t){return r.mapValues(e.ul,(n,r)=>{if(t)return e[t.toLowerCase()][r];{let t=Object.values(e).map(e=>e[r]).sort((e,t)=>e-t);return(t[1]+t[2])/2}})}function h(e){let t=r.buildLayerMatrix(e),n=Object.assign(i(e,t),a(e,t)),o={},s;return[`u`,`d`].forEach(i=>{s=i===`u`?t:Object.values(t).reverse(),[`l`,`r`].forEach(t=>{t===`r`&&(s=s.map(e=>Object.values(e).reverse()));let a=(i===`u`?e.predecessors:e.successors).bind(e),c=l(e,s,n,a),d=u(e,s,c.root,c.align,t===`r`);t===`r`&&(d=r.mapValues(d,e=>-e)),o[i+t]=d})}),p(o,f(e,o)),m(o,e.graph().align)}function g(e,t,n){return(r,i,a)=>{let o=r.node(i),s=r.node(a),c=0,l;if(c+=o.width/2,Object.hasOwn(o,`labelpos`))switch(o.labelpos.toLowerCase()){case`l`:l=-o.width/2;break;case`r`:l=o.width/2}if(l&&(c+=n?l:-l),l=0,c+=(o.dummy?t:e)/2,c+=(s.dummy?t:e)/2,c+=s.width/2,Object.hasOwn(s,`labelpos`))switch(s.labelpos.toLowerCase()){case`l`:l=s.width/2;break;case`r`:l=-s.width/2}return l&&(c+=n?l:-l),l=0,c}}function _(e,t){return e.node(t).width}})),Lm=o(((e,t)=>{var n=gm(),r=Im().positionX;t.exports=i;function i(e){e=n.asNonCompoundGraph(e),a(e),Object.entries(r(e)).forEach(([t,n])=>e.node(t).x=n)}function a(e){let t=n.buildLayerMatrix(e),r=e.graph().ranksep,i=0;t.forEach(t=>{let n=t.reduce((t,n)=>{let r=e.node(n).height;return t>r?t:r},0);t.forEach(t=>e.node(t).y=i+n/2),i+=n+r})}})),Rm=o(((e,t)=>{var n=_m(),r=vm(),i=Sm(),a=gm().normalizeRanks,o=Cm(),s=gm().removeEmptyRanks,c=wm(),l=Tm(),u=Em(),d=Fm(),f=Lm(),p=gm(),m=pm().Graph;t.exports=h;function h(e,t){let n=t&&t.debugTiming?p.time:p.notime;n(`layout`,()=>{let r=n(` buildLayoutGraph`,()=>E(e));n(` runLayout`,()=>g(r,n,t)),n(` updateInputGraph`,()=>_(e,r))})}function g(e,t,m){t(` makeSpaceForEdgeLabels`,()=>D(e)),t(` removeSelfEdges`,()=>I(e)),t(` acyclic`,()=>n.run(e)),t(` nestingGraph.run`,()=>c.run(e)),t(` rank`,()=>i(p.asNonCompoundGraph(e))),t(` injectEdgeLabelProxies`,()=>O(e)),t(` removeEmptyRanks`,()=>s(e)),t(` nestingGraph.cleanup`,()=>c.cleanup(e)),t(` normalizeRanks`,()=>a(e)),t(` assignRankMinMax`,()=>k(e)),t(` removeEdgeLabelProxies`,()=>A(e)),t(` normalize.run`,()=>r.run(e)),t(` parentDummyChains`,()=>o(e)),t(` addBorderSegments`,()=>l(e)),t(` order`,()=>d(e,m)),t(` insertSelfEdges`,()=>L(e)),t(` adjustCoordinateSystem`,()=>u.adjust(e)),t(` position`,()=>f(e)),t(` positionSelfEdges`,()=>ee(e)),t(` removeBorderNodes`,()=>F(e)),t(` normalize.undo`,()=>r.undo(e)),t(` fixupEdgeLabelCoords`,()=>N(e)),t(` undoCoordinateSystem`,()=>u.undo(e)),t(` translateGraph`,()=>j(e)),t(` assignNodeIntersects`,()=>M(e)),t(` reversePoints`,()=>P(e)),t(` acyclic.undo`,()=>n.undo(e))}function _(e,t){e.nodes().forEach(n=>{let r=e.node(n),i=t.node(n);r&&(r.x=i.x,r.y=i.y,r.rank=i.rank,t.children(n).length&&(r.width=i.width,r.height=i.height))}),e.edges().forEach(n=>{let r=e.edge(n),i=t.edge(n);r.points=i.points,Object.hasOwn(i,`x`)&&(r.x=i.x,r.y=i.y)}),e.graph().width=t.graph().width,e.graph().height=t.graph().height}var v=[`nodesep`,`edgesep`,`ranksep`,`marginx`,`marginy`],y={ranksep:50,edgesep:20,nodesep:50,rankdir:`tb`},b=[`acyclicer`,`ranker`,`rankdir`,`align`],x=[`width`,`height`,`rank`],S={width:0,height:0},C=[`minlen`,`weight`,`width`,`height`,`labeloffset`],w={minlen:1,weight:1,width:0,height:0,labeloffset:10,labelpos:`r`},T=[`labelpos`];function E(e){let t=new m({multigraph:!0,compound:!0}),n=te(e.graph());return t.setGraph(Object.assign({},y,R(n,v),p.pick(n,b))),e.nodes().forEach(n=>{let r=R(te(e.node(n)),x);Object.keys(S).forEach(e=>{r[e]===void 0&&(r[e]=S[e])}),t.setNode(n,r),t.setParent(n,e.parent(n))}),e.edges().forEach(n=>{let r=te(e.edge(n));t.setEdge(n,Object.assign({},w,R(r,C),p.pick(r,T)))}),t}function D(e){let t=e.graph();t.ranksep/=2,e.edges().forEach(n=>{let r=e.edge(n);r.minlen*=2,r.labelpos.toLowerCase()!==`c`&&(t.rankdir===`TB`||t.rankdir===`BT`?r.width+=r.labeloffset:r.height+=r.labeloffset)})}function O(e){e.edges().forEach(t=>{let n=e.edge(t);if(n.width&&n.height){let n=e.node(t.v),r={rank:(e.node(t.w).rank-n.rank)/2+n.rank,e:t};p.addDummyNode(e,`edge-proxy`,r,`_ep`)}})}function k(e){let t=0;e.nodes().forEach(n=>{let r=e.node(n);r.borderTop&&(r.minRank=e.node(r.borderTop).rank,r.maxRank=e.node(r.borderBottom).rank,t=Math.max(t,r.maxRank))}),e.graph().maxRank=t}function A(e){e.nodes().forEach(t=>{let n=e.node(t);n.dummy===`edge-proxy`&&(e.edge(n.e).labelRank=n.rank,e.removeNode(t))})}function j(e){let t=1/0,n=0,r=1/0,i=0,a=e.graph(),o=a.marginx||0,s=a.marginy||0;function c(e){let a=e.x,o=e.y,s=e.width,c=e.height;t=Math.min(t,a-s/2),n=Math.max(n,a+s/2),r=Math.min(r,o-c/2),i=Math.max(i,o+c/2)}e.nodes().forEach(t=>c(e.node(t))),e.edges().forEach(t=>{let n=e.edge(t);Object.hasOwn(n,`x`)&&c(n)}),t-=o,r-=s,e.nodes().forEach(n=>{let i=e.node(n);i.x-=t,i.y-=r}),e.edges().forEach(n=>{let i=e.edge(n);i.points.forEach(e=>{e.x-=t,e.y-=r}),Object.hasOwn(i,`x`)&&(i.x-=t),Object.hasOwn(i,`y`)&&(i.y-=r)}),a.width=n-t+o,a.height=i-r+s}function M(e){e.edges().forEach(t=>{let n=e.edge(t),r=e.node(t.v),i=e.node(t.w),a,o;n.points?(a=n.points[0],o=n.points[n.points.length-1]):(n.points=[],a=i,o=r),n.points.unshift(p.intersectRect(r,a)),n.points.push(p.intersectRect(i,o))})}function N(e){e.edges().forEach(t=>{let n=e.edge(t);if(Object.hasOwn(n,`x`))switch((n.labelpos===`l`||n.labelpos===`r`)&&(n.width-=n.labeloffset),n.labelpos){case`l`:n.x-=n.width/2+n.labeloffset;break;case`r`:n.x+=n.width/2+n.labeloffset}})}function P(e){e.edges().forEach(t=>{let n=e.edge(t);n.reversed&&n.points.reverse()})}function F(e){e.nodes().forEach(t=>{if(e.children(t).length){let n=e.node(t),r=e.node(n.borderTop),i=e.node(n.borderBottom),a=e.node(n.borderLeft[n.borderLeft.length-1]),o=e.node(n.borderRight[n.borderRight.length-1]);n.width=Math.abs(o.x-a.x),n.height=Math.abs(i.y-r.y),n.x=a.x+n.width/2,n.y=r.y+n.height/2}}),e.nodes().forEach(t=>{e.node(t).dummy===`border`&&e.removeNode(t)})}function I(e){e.edges().forEach(t=>{if(t.v===t.w){var n=e.node(t.v);n.selfEdges||=[],n.selfEdges.push({e:t,label:e.edge(t)}),e.removeEdge(t)}})}function L(e){p.buildLayerMatrix(e).forEach(t=>{var n=0;t.forEach((t,r)=>{var i=e.node(t);i.order=r+n,(i.selfEdges||[]).forEach(t=>{p.addDummyNode(e,`selfedge`,{width:t.label.width,height:t.label.height,rank:i.rank,order:r+ ++n,e:t.e,label:t.label},`_se`)}),delete i.selfEdges})})}function ee(e){e.nodes().forEach(t=>{var n=e.node(t);if(n.dummy===`selfedge`){var r=e.node(n.e.v),i=r.x+r.width/2,a=r.y,o=n.x-i,s=r.height/2;e.setEdge(n.e,n.label),e.removeNode(t),n.label.points=[{x:i+2*o/3,y:a-s},{x:i+5*o/6,y:a-s},{x:i+o,y:a},{x:i+5*o/6,y:a+s},{x:i+2*o/3,y:a+s}],n.label.x=n.x,n.label.y=n.y}})}function R(e,t){return p.mapValues(p.pick(e,t),Number)}function te(e){var t={};return e&&Object.entries(e).forEach(([e,n])=>{typeof e==`string`&&(e=e.toLowerCase()),t[e]=n}),t}})),zm=o(((e,t)=>{var n=gm(),r=pm().Graph;t.exports={debugOrdering:i};function i(e){let t=n.buildLayerMatrix(e),i=new r({compound:!0,multigraph:!0}).setGraph({});return e.nodes().forEach(t=>{i.setNode(t,{label:t}),i.setParent(t,`layer`+e.node(t).rank)}),e.edges().forEach(e=>i.setEdge(e.v,e.w,{},e.name)),t.forEach((e,t)=>{let n=`layer`+t;i.setNode(n,{rank:`same`}),e.reduce((e,t)=>(i.setEdge(e,t,{style:`invis`}),t))}),i}})),Bm=o(((e,t)=>{t.exports=`1.1.8`})),Vm=l(o(((e,t)=>{t.exports={graphlib:pm(),layout:Rm(),debug:zm(),util:{time:gm().time,notime:gm().notime},version:Bm()}}))(),1),Hm=e=>`overview:${e}`,Um=(e,t)=>`elsewhere:${e}:${t}`,Wm=e=>`elsewhere:${e}`;function Gm(e){return e.flatMap(e=>e.deps.flatMap(t=>{let n=qp(t);return n===null?[]:[{ghostId:Um(n.project,n.ref),...n,dependent:e.id}]}))}var Km=[`#4f9dff`,`#f472b6`,`#34d399`,`#fb923c`,`#a884f3`,`#22d3ee`,`#fbbf24`,`#f87171`,`#a3e635`,`#e879f9`],qm=[`#9ec9ff`,`#f9b1d7`,`#8fe7c7`,`#fdc394`,`#cfbbf8`,`#85e7f6`,`#fddc87`,`#fbb1b1`,`#ccf190`,`#f2b5fc`];function Jm(e){let t=2166136261;for(let n=0;n<e.length;n++)t=Math.imul(t^e.charCodeAt(n),16777619);return(t>>>0)%Km.length}function Ym(e,t=[]){let n=new Set(e),r=[...t.filter(e=>n.has(e)),...e.filter(e=>!t.includes(e))],i=[...Km,...qm],a=new Set,o={};for(let e of new Set(r)){let t=Jm(e),n=Array.from({length:i.length},(e,n)=>n<Km.length?(t+n)%Km.length:Km.length+(t+n)%Km.length).find(e=>!a.has(e))??t;a.add(n),o[e]=i[n]}return o}var Xm=212,Zm=62,Qm=3,$m=13,eh=17,th=184,nh=42,rh=e=>` `.includes(e)?.28:"iljI.,:;'!|`".includes(e)?.3:`frt()[]{}-/\\"`.includes(e)?.4:`mwMW@%`.includes(e)?.9:e>=`A`&&e<=`Z`?.72:e>=`0`&&e<=`9`?.6:.57,ih=e=>[...e].reduce((e,t)=>e+rh(t),0)*$m*1.06;function ah(e){let t=1,n=0;for(let r of e.split(/\s+/).filter(Boolean)){let e=ih(r),i=n===0?e:n+ih(` `)+e;i<=th?n=i:(t+=n===0?0:1,t+=Math.floor(e/th),n=e%th)}return Math.min(t,Qm)}var oh=e=>Math.max(Zm,nh+ah(e.title)*eh),sh={x:64,y:34},ch=18,lh=46,uh=52,dh=e=>e?.startsWith(`area:`)?uh:lh,fh=20,ph={x:68,y:68},mh={width:248,height:104},hh=e=>`area:${e}`,gh=34,_h=12,vh=92,yh=10,bh=e=>Math.round(e/yh)*yh,xh=e=>Math.ceil(e/yh)*yh,Sh=30,Ch=(e,t)=>e.filter(e=>e.parent===t);function wh(e,t,n){let r=new Map;for(let t of e)t.parent&&r.set(t.parent,[...r.get(t.parent)??[],t]);let i=new Map,a=e=>{let o=i.get(e.id);if(o!==void 0)return o;let s=r.get(e.id)??[],c=(t.has(e.area)||n.has(e.status))&&s.every(a);return i.set(e.id,c),c};return new Set(e.filter(a).map(e=>e.id))}var Th=(e,t)=>e===t||e.startsWith(`${t}.`)||t.startsWith(`${e}.`);function Eh(e,t,n,r){let i=Ch(t,e.id);if(i.length===0)return{width:Xm,height:oh(e)};let a=Nh(i,t,n,r).box;return{width:a.width,height:a.height}}function Dh(e,t,n){let r=new Vm.default.graphlib.Graph;r.setGraph({rankdir:`LR`,nodesep:Sh,ranksep:vh}),r.setDefaultEdgeLabel(()=>({}));for(let t of e){let e=n.get(t.id);r.setNode(t.id,{width:e.width,height:e.height})}for(let[e,n]of t)r.setEdge(e,n);Vm.default.layout(r);let i=new Map,a=1/0,o=1/0;for(let t of e){let e=r.node(t.id),s=n.get(t.id),c=e.x-s.width/2,l=e.y-s.height/2;i.set(t.id,{x:c,y:l,width:s.width,height:s.height}),a=Math.min(a,c),o=Math.min(o,l)}let s=0,c=0;for(let e of i.values())e.x-=a,e.y-=o,s=Math.max(s,e.x+e.width),c=Math.max(c,e.y+e.height);return{placements:i,extent:{width:s,height:c}}}function Oh(e,t,n){let r=new Map,i=0,a=0,o=0,s=0;for(let c of e)i>0&&i+c.width>t&&(a+=o+n.y,i=0,o=0),r.set(c.id,{x:i,y:a,width:c.width,height:c.height}),i+=c.width+n.x,s=Math.max(s,i-n.x),o=Math.max(o,c.height);return{placements:r,extent:{width:s,height:a+o}}}function kh(e,t,n){let r=Math.max(t,...e.map(e=>e.width)),i=[{x:0,y:0,width:r}],a=new Map,o=[...e].sort((e,t)=>t.height-e.height||t.width-e.width);for(let e of o){let t=null;for(let n of i){let a=n.x;if(a+e.width>r)continue;let o=0;for(let t of i)t.x+t.width<=a||t.x>=a+e.width||(o=Math.max(o,t.y));(t===null||o<t.y||o===t.y&&a<t.x)&&(t={x:a,y:o})}let o=t??{x:0,y:0};a.set(e.id,{x:o.x,y:o.y,width:e.width,height:e.height}),i=Ah(i,o.x,e.width+n.x,o.y+e.height+n.y)}let s=0,c=0;for(let e of a.values())s=Math.max(s,e.x+e.width),c=Math.max(c,e.y+e.height);return{placements:a,extent:{width:s,height:c}}}function Ah(e,t,n,r){let i=t+n,a=[];for(let n of e){let e=n.x+n.width;e<=t||n.x>=i?a.push(n):(n.x<t&&a.push({x:n.x,y:n.y,width:t-n.x}),e>i&&a.push({x:i,y:n.y,width:e-i}))}a.push({x:t,y:r,width:n}),a.sort((e,t)=>e.x-t.x);let o=[];for(let e of a){let t=o[o.length-1];t&&t.y===e.y&&t.x+t.width===e.x?t.width+=e.width:o.push({...e})}return o}function jh(e,t,n=2.8){let r=e.reduce((e,n)=>e+(n.width+t.x)*(n.height+t.y),0),i=Math.max(...e.map(e=>e.width));return Math.max(i,Math.sqrt(r*n))}function Mh(e,t){let n=new Set(e.map(e=>e.id)),r=e.flatMap(e=>e.deps.filter(e=>n.has(e)).map(t=>[t,e.id])),i=new Set(r.flat()),a=e.filter(e=>i.has(e.id)),o=e.filter(e=>!i.has(e.id)),s=new Map,c=a.length>0?Dh(a,r,t):{placements:new Map,extent:{width:0,height:0}};for(let[e,t]of c.placements)s.set(e,t);if(o.length>0){let e=o.map(e=>({id:e.id,...t.get(e.id)})),n=Oh(e,Math.max(c.extent.width,jh(e,sh)),sh),r=a.length>0?c.extent.height+sh.y:0;for(let[e,t]of n.placements)s.set(e,{...t,y:t.y+r})}return s}function Nh(e,t,n,r){let i=new Map(e.map(e=>[e.id,Eh(e,t,n,r)])),a=new Set(e.map(e=>e.id)),o=Lh(e.map(e=>({id:e.id,...i.get(e.id),deps:e.deps.filter(e=>a.has(e))})),e=>n[e],sh,2.8,()=>Mh(e,i),`after-previous`,r);return{placements:o,box:Uh(o)}}var Ph=e=>e===`x`?`width`:`height`,Fh=e=>e===`x`?`y`:`x`,Ih=(e,t,n,r)=>e[n]+e[Ph(n)]+r[n]>t[n]&&t[n]+t[Ph(n)]+r[n]>e[n];function Lh(e,t,n,r,i,a=`after-previous`,o=`every-pair`){let s=e.some(e=>t(e.id)!==void 0)?null:i(),c=new Map;for(let n of e){let e=s?s.get(n.id):t(n.id);e&&c.set(n.id,{id:n.id,x:bh(e.x),y:bh(e.y),width:n.width,height:n.height})}let l=new Set,u=jh(e,n,r);e.forEach((t,r)=>{if(c.has(t.id))return;l.add(t.id);let i=a===`best-fit`?zh(t,c,n,u):Rh(t,e.slice(0,r),c,n,u);c.set(t.id,{id:t.id,x:xh(i.x),y:xh(i.y),width:t.width,height:t.height})});let d=[...c.values()];return Bh(d,n,l),Vh(d,n,o),new Map(d.map(({id:e,...t})=>[e,t]))}function Rh(e,t,n,r,i){let a=e.deps.flatMap(e=>n.get(e)??[]);if(a.length>0){let e=a.reduce((e,t)=>t.x+t.width>e.x+e.width?t:e);return{x:e.x+e.width+r.x,y:e.y}}let o=[...t].reverse().flatMap(e=>n.get(e.id)??[])[0];return o&&o.x+o.width+r.x+e.width<=i?{x:o.x+o.width+r.x,y:o.y}:{x:0,y:Math.max(-r.y,...[...n.values()].map(e=>e.y+e.height))+r.y}}function zh(e,t,n,r){let i=[...t.values()],a=Math.max(0,...i.map(e=>e.x+e.width)),o=Math.max(0,...i.map(e=>e.y+e.height)),s=[{x:0,y:0},...i.flatMap(e=>[{x:e.x+e.width+n.x,y:e.y},{x:e.x,y:e.y+e.height+n.y}])],c=null;for(let t of s){let s={id:e.id,...t,width:e.width,height:e.height};if(i.some(e=>Ih(s,e,`x`,n)&&Ih(s,e,`y`,n)))continue;let l=Math.max(a,t.x+e.width),u=l*Math.max(o,t.y+e.height)*(l>r?4:1);(c===null||u<c.score||u===c.score&&(t.y<c.y||t.y===c.y&&t.x<c.x))&&(c={...t,score:u})}return c??{x:0,y:o+n.y}}function Bh(e,t,n){for(let r=0;r<=e.length*e.length;r++){let r=null;search:for(let n=0;n<e.length;n++)for(let i=n+1;i<e.length;i++)if(Ih(e[n],e[i],`x`,t)&&Ih(e[n],e[i],`y`,t)){r=[e[n],e[i]];break search}if(r===null)return;let[i,a]=r,o=e=>{let[r,o]=i[e]<a[e]||i[e]===a[e]&&(n.has(i.id)||!n.has(a.id))?[i,a]:[a,i];return{axis:e,stays:r,moves:o,by:xh(r[e]+r[Ph(e)]+t[e]-o[e])}},s=e=>(Math.min(i[e]+i[Ph(e)],a[e]+a[Ph(e)])+t[e]-Math.max(i[e],a[e]))/(Math.min(i[Ph(e)],a[Ph(e)])+t[e]),{axis:c,stays:l,moves:u,by:d}=s(`x`)<=s(`y`)?o(`x`):o(`y`),f=u[c];for(let t of e)t!==l&&t[c]>=f&&(t[c]+=d)}}function Vh(e,t,n){let r=new Map(e.map(e=>[e,{...e}]));for(let i=0;i<32;i++){let i=e.map(e=>e.x+e.y*1e6);if(Hh(e,`x`,t,n,r),Hh(e,`y`,t,n,r),e.every((e,t)=>e.x+e.y*1e6===i[t]))return}}function Hh(e,t,n,r,i){let a=Fh(t),o=[...e].sort((e,n)=>e[t]-n[t]),s=new Map(o.map(e=>[e,e[t]])),c=[];for(let e of o){let o=0;for(let l of c)(r===`every-pair`||Ih(i.get(e),i.get(l),a,n))&&(o=Math.max(o,l[t]+(s.get(l)<s.get(e)?yh:0))),Ih(e,l,a,n)&&(o=Math.max(o,l[t]+l[Ph(t)]+n[t]));e[t]=xh(o),c.push(e)}}function Uh(e){let t=0,n=0;for(let r of e.values())t=Math.max(t,r.x+r.width),n=Math.max(n,r.y+r.height);return{width:t+36,height:n+lh+fh}}function Wh(e,t){let n=e=>e.split(`-`)[0]??e,r=new Map;for(let e of t)for(let t of e.deps){let i=qp(t),[a,o]=[i===null?n(t):Wm(i.project),n(e.id)];if(a!==o){let e=r.get(o)??new Set;e.add(a),r.set(o,e)}}let i=new Map(e.map(e=>[e.area,e])),a=new Set,o=[],s=e=>{let t=i.get(e);if(t&&!a.has(e)){a.add(e);for(let t of r.get(e)??[])s(t);o.push(t)}};for(let t of e)s(t.area);return o}function Gh(e,t,n,r,i,a,o={},s=new Set,c=`every-pair`){let l=new Set(e.map(e=>e.id)),u=e.flatMap(e=>e.deps.filter(t=>l.has(t)&&!Th(t,e.id)).map(t=>({id:`${t}->${e.id}`,source:t,target:e.id}))),d=new Map;for(let t of Gm(e))l.has(t.dependent)&&d.set(t.ghostId,[...d.get(t.ghostId)??[],t.dependent]);let f=[...d].flatMap(([e,t])=>t.map(t=>({source:e,target:t}))),p=new Map(e.map(e=>[e.id,e.parent])),m=i?new Set([i,...[...u,...f].filter(e=>e.source===i||e.target===i).flatMap(e=>[e.source,e.target])].flatMap(e=>{let t=[e];for(let n=p.get(e);n;n=p.get(n))t.push(n);return t})):null,h=e=>e.split(`-`)[0]??e,g=new Set(e.filter(e=>e.status===`done`).map(e=>e.id)),_=new Set,v=new Set;for(let e of u){let t=a.has(e.source)||a.has(e.target),n=h(e.source)!==h(e.target)&&g.has(e.source);(t||n)&&(a.has(e.source)||v.add(e.source),a.has(e.target)||_.add(e.target))}let y=e=>r===`area`?n[e.area]??`#94a3b8`:K[e.status]?.colour??`#94a3b8`,b=e=>({item:e,colour:y(e),statusColour:K[e.status]?.colour??`#94a3b8`,selected:e.id===i,dimmed:m?!m.has(e.id):!1,hiddenLinkIn:_.has(e.id),hiddenLinkOut:v.has(e.id)}),x=(t,n)=>{let{placements:r,box:i}=Nh(n,e,o,c);return{nodes:n.flatMap(n=>{let i=r.get(n.id),o={x:ch+i.x,y:dh(t)+i.y},s=Ch(e,n.id);if(s.length>0){let e=x(n.id,s);return[{id:n.id,type:`ticket`,parentId:t,position:o,hidden:a.has(n.id),style:{width:e.box.width,height:e.box.height},data:{...b(n),count:s.length},zIndex:1},...e.nodes]}return[{id:n.id,type:`item`,parentId:t,position:o,hidden:a.has(n.id),style:{width:Xm,height:oh(n)},data:b(n),zIndex:3}]}),box:i}},S=t.flatMap(t=>{let n=e.filter(e=>e.area===t&&e.parent===null);if(n.length===0)return[];if(s.has(t))return[{area:t,inner:{nodes:[],box:mh},size:mh}];let r=x(`area:${t}`,n),i={...r.box,height:r.box.height+uh-lh};return[{area:t,inner:{...r,box:i},size:i}]}),C=Wh([...[...new Set([...d.keys()].map(e=>e.split(`:`)[1]))].sort().map(e=>{let t=[...d.keys()].filter(t=>t.startsWith(`elsewhere:${e}:`)).map(t=>t.slice(`elsewhere:${e}:`.length)).sort(),n=t.map((t,n)=>{let r=Um(e,t);return{id:r,type:`ghost`,parentId:`area:${Wm(e)}`,position:{x:ch,y:uh+n*46},hidden:(d.get(r)??[]).every(e=>a.has(e)),data:{project:e,ref:t,dimmed:m?!m.has(r):!1},style:{width:Xm,height:gh},zIndex:3}}),r={width:248,height:uh+t.length*gh+(t.length-1)*_h+fh};return{area:Wm(e),foreign:e,inner:{nodes:n,box:r},size:r}}),...S],e),w=C.map(e=>({id:e.area,...e.size})),T={placements:Lh(w.map(e=>({...e,deps:[]})),e=>o[`area:${e}`],ph,1.6,()=>kh(w,jh(w,ph,1.6),ph).placements,`best-fit`,c)};return C.flatMap(t=>{let r=T.placements.get(t.area);if(t.foreign!==void 0)return[{id:`area:${t.area}`,type:`area`,position:{x:r.x,y:r.y},hidden:t.inner.nodes.every(e=>e.hidden===!0),data:{area:t.foreign,colour:`#64748b`,count:t.inner.nodes.length,foreign:!0},style:{width:t.size.width,height:t.size.height},zIndex:0},...t.inner.nodes];let i=e.filter(e=>e.area===t.area),o=new Map;for(let e of i)o.set(e.status,(o.get(e.status)??0)+1);let c=Object.keys(K).flatMap(e=>o.has(e)?[[e,o.get(e)]]:[]);if(s.has(t.area))return[{id:hh(t.area),type:`area`,position:{x:r.x,y:r.y},hidden:i.every(e=>a.has(e.id)),data:{area:t.area,colour:n[t.area]??`#94a3b8`,count:i.length,collapsed:{byStatus:c}},style:{width:mh.width,height:mh.height},zIndex:3}];let l={id:`area:${t.area}`,type:`area`,position:{x:r.x,y:r.y},hidden:i.every(e=>a.has(e.id)),data:{area:t.area,colour:n[t.area]??`#94a3b8`,count:i.length,byStatus:c},style:{width:t.size.width,height:t.size.height},zIndex:0},u={id:Hm(t.area),type:`overview`,parentId:l.id,position:{x:0,y:0},hidden:l.hidden,data:l.data,style:{width:t.size.width,height:t.size.height},selectable:!1,draggable:!1,focusable:!1,zIndex:1e3};return[l,...t.inner.nodes,u]})}function Kh(e){let t={};for(let n of e)n.type!==`ghost`&&n.type!==`overview`&&(t[n.id]=qh(n.parentId,n.position));return t}var qh=(e,t)=>e?{x:bh(t.x-ch),y:bh(t.y-dh(e))}:{x:bh(t.x),y:bh(t.y)};function Jh(e,t,n,r,i,a,o,s=new Set){let c=new Set(e.map(e=>e.id)),l=e=>s.has(e.split(`-`)[0]??e)?hh(e.split(`-`)[0]??e):e,u=new Set(e.filter(e=>e.status===`done`).map(e=>e.id)),d=e=>e.split(`-`)[0]??e,f=e=>n===`area`?t[e.area]??`#94a3b8`:K[e.status]?.colour??`#94a3b8`,p=Gm(e).filter(e=>c.has(e.dependent)).map(e=>{let t=`${e.ghostId}->${e.dependent}`,n=r===e.ghostId||r===e.dependent,s=i!=null&&(e.ghostId===i||e.dependent===i),c=n||s||t===a,u=o.has(e.dependent);return{id:t,source:e.ghostId,target:l(e.dependent),type:`smoothstep`,pathOptions:{borderRadius:12},hidden:u&&!s,animated:n,zIndex:-1,style:{stroke:c?`#cbd5e1`:`#7c8aa0`,strokeWidth:c?2.5:1.2,strokeDasharray:`6 5`,opacity:c?1:r?.08:.4}}});return[...Yh(e.flatMap(e=>e.deps.filter(t=>c.has(t)&&!Th(t,e.id)).map(t=>{let n=`${t}->${e.id}`,s=r===t||r===e.id,c=i!=null&&(t===i||e.id===i),l=d(t)!==d(e.id),p=s||c||n===a,m=l&&u.has(t),h=o.has(t)||o.has(e.id),g=c&&h;return{id:n,source:t,target:e.id,type:`smoothstep`,pathOptions:{borderRadius:12},hidden:h&&!g||m&&!p,animated:s,zIndex:-1,style:{stroke:p?f(e):`#7c8aa0`,strokeWidth:p?2.5:l?1.2:1.5,strokeDasharray:l?`6 5`:void 0,opacity:p?1:r?l?.08:.12:l?.4:.6}}})),l,s.size>0),...p.filter((e,t,n)=>n.findIndex(t=>t.source===e.source&&t.target===e.target)===t)]}function Yh(e,t,n){if(!n)return e;let r=new Map;for(let n of e){let[e,i]=[t(n.source),t(n.target)];if(e===i)continue;let a=`${e}->${i}`,o=(n.style?.opacity??0)===1,s=r.get(a);s===void 0?r.set(a,{edge:{...n,id:a,source:e,target:i},count:1,allHidden:n.hidden===!0}):(s.count+=1,s.allHidden&&=n.hidden===!0,o&&(s.edge={...n,id:a,source:e,target:i}))}return[...r.values()].map(({edge:e,count:t,allHidden:n})=>({...e,hidden:n,...t>1?{label:String(t),labelBgPadding:[4,2],labelBgBorderRadius:4,labelStyle:{fill:`#dce3ec`,fontSize:11},labelBgStyle:{fill:`#1e2836`}}:{}}))}function Xh({data:e}){let{item:t,colour:n,statusColour:r,selected:i,dimmed:a,hiddenLinkIn:o,hiddenLinkOut:s}=e,c=K[t.status];return(0,b.jsxs)(`div`,{className:`item-node`,"data-selected":i,"data-dimmed":a,style:{"--area":n},children:[(0,b.jsx)(Gu,{type:`target`,position:V.Left,className:o?`handle--hidden-link`:void 0}),(0,b.jsx)(`div`,{className:`item-node__rail`}),(0,b.jsxs)(`div`,{className:`item-node__body`,children:[(0,b.jsxs)(`div`,{className:`item-node__meta`,children:[(0,b.jsx)(`span`,{className:`item-node__id`,children:t.id}),(0,b.jsx)(`span`,{className:`item-node__status`,title:c?.label??t.status,style:{color:r},children:c?.icon??`?`})]}),(0,b.jsx)(`div`,{className:`item-node__title`,"data-strike":c?.strike??!1,children:t.title})]}),(0,b.jsx)(Gu,{type:`source`,position:V.Right,className:s?`handle--hidden-link`:void 0})]})}function Zh({data:e,selected:t}){return e.collapsed===void 0?(0,b.jsxs)(`div`,{className:`area-box`,"data-foreign":e.foreign===!0,style:{"--area":e.colour},children:[(0,b.jsx)(dp,{isVisible:t,minWidth:220,minHeight:120,lineClassName:`box-resize-line`,handleClassName:`box-resize-handle`}),(0,b.jsxs)(`div`,{className:`area-box__title`,children:[(0,b.jsx)(`span`,{className:`area-box__name`,children:Qh(e)?e.name:e.area}),Qh(e)&&(0,b.jsx)(`span`,{className:`area-box__label`,children:e.area}),(0,b.jsx)(`span`,{className:`area-box__count`,children:e.count})]})]}):(0,b.jsxs)(`div`,{className:`area-box area-box--collapsed`,style:{"--area":e.colour},title:`Click to open this area`,children:[(0,b.jsx)(Gu,{type:`target`,position:V.Left}),(0,b.jsxs)(`div`,{className:`area-box__title`,children:[(0,b.jsx)(`span`,{className:`area-box__name`,children:Qh(e)?e.name:e.area}),Qh(e)&&(0,b.jsx)(`span`,{className:`area-box__label`,children:e.area}),(0,b.jsx)(`span`,{className:`area-box__count`,children:e.count})]}),(0,b.jsx)(`div`,{className:`area-box__summary`,children:e.collapsed.byStatus.map(([e,t])=>(0,b.jsxs)(`span`,{className:`area-box__status`,style:{color:K[e].colour},title:e,children:[K[e].icon,` `,t]},e))}),(0,b.jsx)(Gu,{type:`source`,position:V.Right})]})}var Qh=e=>e.name!==void 0&&e.name!==e.area;function $h({data:e}){if(e.byStatus===void 0)return null;let t=Qh(e)?e.name:e.area;return(0,b.jsx)(`div`,{className:`area-overview`,style:{"--area":e.colour},"aria-hidden":`true`,children:(0,b.jsxs)(`div`,{className:`area-box__overview`,children:[(0,b.jsx)(`div`,{className:`area-box__overview-name`,style:{fontSize:`min(${140/Math.max(t.length,3)}cqw, 30cqh, 110px)`},children:t}),Qh(e)&&(0,b.jsx)(`div`,{className:`area-box__overview-key`,children:e.area}),(0,b.jsx)(`div`,{className:`area-box__overview-bar`,children:e.byStatus.map(([e,t])=>(0,b.jsx)(`span`,{style:{flexGrow:t,background:K[e].colour}},e))}),(0,b.jsx)(`div`,{className:`area-box__overview-counts`,children:e.byStatus.map(([e,t])=>(0,b.jsxs)(`span`,{style:{color:K[e].colour},children:[K[e].icon,` `,t]},e))}),e.description!==void 0&&e.description!==null&&(0,b.jsx)(`div`,{className:`area-box__overview-description`,children:e.description})]})})}function eg({data:e}){let{item:t,colour:n,statusColour:r,count:i,selected:a,dimmed:o,hiddenLinkIn:s,hiddenLinkOut:c}=e,l=K[t.status];return(0,b.jsxs)(`div`,{className:`ticket-box`,"data-selected":a,"data-dimmed":o,style:{"--area":n},children:[(0,b.jsx)(dp,{isVisible:a,minWidth:200,minHeight:100,lineClassName:`box-resize-line`,handleClassName:`box-resize-handle`}),(0,b.jsx)(Gu,{type:`target`,position:V.Left,className:s?`handle--hidden-link`:void 0}),(0,b.jsxs)(`div`,{className:`ticket-box__title`,children:[(0,b.jsx)(`span`,{className:`ticket-box__id`,children:t.id}),(0,b.jsx)(`span`,{className:`ticket-box__status`,title:l?.label??t.status,style:{color:r},children:l?.icon??`?`}),(0,b.jsx)(`span`,{className:`ticket-box__label`,"data-strike":l?.strike??!1,children:t.title}),(0,b.jsx)(`span`,{className:`ticket-box__count`,children:i})]}),(0,b.jsx)(Gu,{type:`source`,position:V.Right,className:c?`handle--hidden-link`:void 0})]})}function tg({data:e}){let{project:t,ref:n,dimmed:r}=e;return(0,b.jsxs)(`div`,{className:`ghost-node`,"data-dimmed":r,title:`${n} lives in the ${t} project, which is not open here`,children:[(0,b.jsx)(`span`,{className:`ghost-node__ref`,children:n}),(0,b.jsx)(Gu,{type:`source`,position:V.Right})]})}var ng=`roadmap.positions.v2`,rg=`roadmap.layout.v1`,ig=`roadmap.sizes.v2`,ag=(e,t)=>`${e}:${t}`;function og(e){try{let t=localStorage.getItem(e);return t?JSON.parse(t):{}}catch{return{}}}function sg(e,t){try{localStorage.setItem(e,JSON.stringify(t))}catch{}}var cg=e=>og(ag(rg,e)),lg=(e,t)=>sg(ag(rg,e),t),ug=e=>og(ag(ig,e)),dg=(e,t)=>sg(ag(ig,e),t);function fg(e){try{localStorage.removeItem(ag(rg,e)),localStorage.removeItem(ag(ng,e)),localStorage.removeItem(ag(ig,e))}catch{}}var pg=e=>`${K[e].icon} ${K[e].label}`;function mg({projectKey:e,ref_:t,status:n,reload:r}){let[i,a]=(0,_.useState)(!1),[o,s]=(0,_.useState)(null);if((0,_.useEffect)(()=>s(null),[t]),!vp())return(0,b.jsx)(`span`,{className:`detail__status`,children:pg(n)});async function c(i){if(i!==n){a(!0),s(null);try{await xp(e,t,i)}catch(e){s(e instanceof Error?e.message:String(e))}finally{a(!1),r()}}}return(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(`select`,{className:`detail__status detail__status--edit`,value:n,disabled:i,"aria-label":`Status`,onChange:e=>void c(e.target.value),children:Object.keys(K).map(e=>(0,b.jsx)(`option`,{value:e,children:pg(e)},e))}),o!==null&&(0,b.jsx)(`span`,{className:`detail__status-error`,children:o})]})}var hg,q,gg,_g,vg,yg,bg,xg,Sg,Cg={},wg=[],Tg=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i;function Eg(e,t){for(var n in t)e[n]=t[n];return e}function Dg(e){var t=e.parentNode;t&&t.removeChild(e)}function J(e,t,n){var r,i,a,o={};for(a in t)a==`key`?r=t[a]:a==`ref`?i=t[a]:o[a]=t[a];if(arguments.length>2&&(o.children=arguments.length>3?hg.call(arguments,2):n),typeof e==`function`&&e.defaultProps!=null)for(a in e.defaultProps)o[a]===void 0&&(o[a]=e.defaultProps[a]);return Og(e,o,r,i,null)}function Og(e,t,n,r,i){var a={type:e,props:t,key:n,ref:r,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:i??++gg};return i==null&&q.vnode!=null&&q.vnode(a),a}function kg(){return{current:null}}function Ag(e){return e.children}function jg(e,t,n,r,i){for(var a in n)a===`children`||a===`key`||a in t||Ng(e,a,null,n[a],r);for(a in t)i&&typeof t[a]!=`function`||a===`children`||a===`key`||a===`value`||a===`checked`||n[a]===t[a]||Ng(e,a,t[a],n[a],r)}function Mg(e,t,n){t[0]===`-`?e.setProperty(t,n??``):e[t]=n==null?``:typeof n!=`number`||Tg.test(t)?n:n+`px`}function Ng(e,t,n,r,i){var a;n:if(t===`style`){if(typeof n==`string`)e.style.cssText=n;else{if(typeof r==`string`&&(e.style.cssText=r=``),r)for(t in r)n&&t in n||Mg(e.style,t,``);if(n)for(t in n)r&&n[t]===r[t]||Mg(e.style,t,n[t])}}else if(t[0]===`o`&&t[1]===`n`)a=t!==(t=t.replace(/Capture$/,``)),t=t.toLowerCase()in e?t.toLowerCase().slice(2):t.slice(2),e.l||={},e.l[t+a]=n,n?r||e.addEventListener(t,a?Fg:Pg,a):e.removeEventListener(t,a?Fg:Pg,a);else if(t!==`dangerouslySetInnerHTML`){if(i)t=t.replace(/xlink(H|:h)/,`h`).replace(/sName$/,`s`);else if(t!==`width`&&t!==`height`&&t!==`href`&&t!==`list`&&t!==`form`&&t!==`tabIndex`&&t!==`download`&&t in e)try{e[t]=n??``;break n}catch{}typeof n==`function`||(n==null||!1===n&&t.indexOf(`-`)==-1?e.removeAttribute(t):e.setAttribute(t,n))}}function Pg(e){vg=!0;try{return this.l[e.type+!1](q.event?q.event(e):e)}finally{vg=!1}}function Fg(e){vg=!0;try{return this.l[e.type+!0](q.event?q.event(e):e)}finally{vg=!1}}function Ig(e,t){this.props=e,this.context=t}function Lg(e,t){if(t==null)return e.__?Lg(e.__,e.__.__k.indexOf(e)+1):null;for(var n;t<e.__k.length;t++)if((n=e.__k[t])!=null&&n.__e!=null)return n.__e;return typeof e.type==`function`?Lg(e):null}function Rg(e){var t,n;if((e=e.__)!=null&&e.__c!=null){for(e.__e=e.__c.base=null,t=0;t<e.__k.length;t++)if((n=e.__k[t])!=null&&n.__e!=null){e.__e=e.__c.base=n.__e;break}return Rg(e)}}function zg(e){vg?setTimeout(e):xg(e)}function Bg(e){(!e.__d&&(e.__d=!0)&&yg.push(e)&&!Vg.__r++||bg!==q.debounceRendering)&&((bg=q.debounceRendering)||zg)(Vg)}function Vg(){var e,t,n,r,i,a,o,s;for(yg.sort(function(e,t){return e.__v.__b-t.__v.__b});e=yg.shift();)e.__d&&(t=yg.length,r=void 0,i=void 0,o=(a=(n=e).__v).__e,(s=n.__P)&&(r=[],(i=Eg({},a)).__v=a.__v+1,qg(s,a,i,n.__n,s.ownerSVGElement!==void 0,a.__h==null?null:[o],r,o??Lg(a),a.__h),Jg(r,a),a.__e!=o&&Rg(a)),yg.length>t&&yg.sort(function(e,t){return e.__v.__b-t.__v.__b}));Vg.__r=0}function Hg(e,t,n,r,i,a,o,s,c,l){var u,d,f,p,m,h,g,_=r&&r.__k||wg,v=_.length;for(n.__k=[],u=0;u<t.length;u++)if((p=n.__k[u]=(p=t[u])==null||typeof p==`boolean`?null:typeof p==`string`||typeof p==`number`||typeof p==`bigint`?Og(null,p,null,null,p):Array.isArray(p)?Og(Ag,{children:p},null,null,null):p.__b>0?Og(p.type,p.props,p.key,p.ref?p.ref:null,p.__v):p)!=null){if(p.__=n,p.__b=n.__b+1,(f=_[u])===null||f&&p.key==f.key&&p.type===f.type)_[u]=void 0;else for(d=0;d<v;d++){if((f=_[d])&&p.key==f.key&&p.type===f.type){_[d]=void 0;break}f=null}qg(e,p,f||=Cg,i,a,o,s,c,l),m=p.__e,(d=p.ref)&&f.ref!=d&&(g||=[],f.ref&&g.push(f.ref,null,p),g.push(d,p.__c||m,p)),m==null?c&&f.__e==c&&c.parentNode!=e&&(c=Lg(f)):(h??=m,typeof p.type==`function`&&p.__k===f.__k?p.__d=c=Ug(p,c,e):c=Gg(e,p,f,_,m,c),typeof n.type==`function`&&(n.__d=c))}for(n.__e=h,u=v;u--;)_[u]!=null&&(typeof n.type==`function`&&_[u].__e!=null&&_[u].__e==n.__d&&(n.__d=Kg(r).nextSibling),Zg(_[u],_[u]));if(g)for(u=0;u<g.length;u++)Xg(g[u],g[++u],g[++u])}function Ug(e,t,n){for(var r,i=e.__k,a=0;i&&a<i.length;a++)(r=i[a])&&(r.__=e,t=typeof r.type==`function`?Ug(r,t,n):Gg(n,r,r,i,r.__e,t));return t}function Wg(e,t){return t||=[],e==null||typeof e==`boolean`||(Array.isArray(e)?e.some(function(e){Wg(e,t)}):t.push(e)),t}function Gg(e,t,n,r,i,a){var o,s,c;if(t.__d!==void 0)o=t.__d,t.__d=void 0;else if(n==null||i!=a||i.parentNode==null)n:if(a==null||a.parentNode!==e)e.appendChild(i),o=null;else{for(s=a,c=0;(s=s.nextSibling)&&c<r.length;c+=1)if(s==i)break n;e.insertBefore(i,a),o=a}return o===void 0?i.nextSibling:o}function Kg(e){var t,n,r;if(e.type==null||typeof e.type==`string`)return e.__e;if(e.__k){for(t=e.__k.length-1;t>=0;t--)if((n=e.__k[t])&&(r=Kg(n)))return r}return null}function qg(e,t,n,r,i,a,o,s,c){var l,u,d,f,p,m,h,g,_,v,y,b,x,S,C,w=t.type;if(t.constructor!==void 0)return null;n.__h!=null&&(c=n.__h,s=t.__e=n.__e,t.__h=null,a=[s]),(l=q.__b)&&l(t);try{n:if(typeof w==`function`){if(g=t.props,_=(l=w.contextType)&&r[l.__c],v=l?_?_.props.value:l.__:r,n.__c?h=(u=t.__c=n.__c).__=u.__E:(`prototype`in w&&w.prototype.render?t.__c=u=new w(g,v):(t.__c=u=new Ig(g,v),u.constructor=w,u.render=Qg),_&&_.sub(u),u.props=g,u.state||(u.state={}),u.context=v,u.__n=r,d=u.__d=!0,u.__h=[],u._sb=[]),u.__s??(u.__s=u.state),w.getDerivedStateFromProps!=null&&(u.__s==u.state&&(u.__s=Eg({},u.__s)),Eg(u.__s,w.getDerivedStateFromProps(g,u.__s))),f=u.props,p=u.state,u.__v=t,d)w.getDerivedStateFromProps==null&&u.componentWillMount!=null&&u.componentWillMount(),u.componentDidMount!=null&&u.__h.push(u.componentDidMount);else{if(w.getDerivedStateFromProps==null&&g!==f&&u.componentWillReceiveProps!=null&&u.componentWillReceiveProps(g,v),!u.__e&&u.shouldComponentUpdate!=null&&!1===u.shouldComponentUpdate(g,u.__s,v)||t.__v===n.__v){for(t.__v!==n.__v&&(u.props=g,u.state=u.__s,u.__d=!1),t.__e=n.__e,t.__k=n.__k,t.__k.forEach(function(e){e&&(e.__=t)}),y=0;y<u._sb.length;y++)u.__h.push(u._sb[y]);u._sb=[],u.__h.length&&o.push(u);break n}u.componentWillUpdate!=null&&u.componentWillUpdate(g,u.__s,v),u.componentDidUpdate!=null&&u.__h.push(function(){u.componentDidUpdate(f,p,m)})}if(u.context=v,u.props=g,u.__P=e,b=q.__r,x=0,`prototype`in w&&w.prototype.render){for(u.state=u.__s,u.__d=!1,b&&b(t),l=u.render(u.props,u.state,u.context),S=0;S<u._sb.length;S++)u.__h.push(u._sb[S]);u._sb=[]}else do u.__d=!1,b&&b(t),l=u.render(u.props,u.state,u.context),u.state=u.__s;while(u.__d&&++x<25);u.state=u.__s,u.getChildContext!=null&&(r=Eg(Eg({},r),u.getChildContext())),d||u.getSnapshotBeforeUpdate==null||(m=u.getSnapshotBeforeUpdate(f,p)),C=l!=null&&l.type===Ag&&l.key==null?l.props.children:l,Hg(e,Array.isArray(C)?C:[C],t,n,r,i,a,o,s,c),u.base=t.__e,t.__h=null,u.__h.length&&o.push(u),h&&(u.__E=u.__=null),u.__e=!1}else a==null&&t.__v===n.__v?(t.__k=n.__k,t.__e=n.__e):t.__e=Yg(n.__e,t,n,r,i,a,o,c);(l=q.diffed)&&l(t)}catch(e){t.__v=null,(c||a!=null)&&(t.__e=s,t.__h=!!c,a[a.indexOf(s)]=null),q.__e(e,t,n)}}function Jg(e,t){q.__c&&q.__c(t,e),e.some(function(t){try{e=t.__h,t.__h=[],e.some(function(e){e.call(t)})}catch(e){q.__e(e,t.__v)}})}function Yg(e,t,n,r,i,a,o,s){var c,l,u,d=n.props,f=t.props,p=t.type,m=0;if(p===`svg`&&(i=!0),a!=null){for(;m<a.length;m++)if((c=a[m])&&`setAttribute`in c==!!p&&(p?c.localName===p:c.nodeType===3)){e=c,a[m]=null;break}}if(e==null){if(p===null)return document.createTextNode(f);e=i?document.createElementNS(`http://www.w3.org/2000/svg`,p):document.createElement(p,f.is&&f),a=null,s=!1}if(p===null)d===f||s&&e.data===f||(e.data=f);else{if(a&&=hg.call(e.childNodes),l=(d=n.props||Cg).dangerouslySetInnerHTML,u=f.dangerouslySetInnerHTML,!s){if(a!=null)for(d={},m=0;m<e.attributes.length;m++)d[e.attributes[m].name]=e.attributes[m].value;(u||l)&&(u&&(l&&u.__html==l.__html||u.__html===e.innerHTML)||(e.innerHTML=u&&u.__html||``))}if(jg(e,f,d,i,s),u)t.__k=[];else if(m=t.props.children,Hg(e,Array.isArray(m)?m:[m],t,n,r,i&&p!==`foreignObject`,a,o,a?a[0]:n.__k&&Lg(n,0),s),a!=null)for(m=a.length;m--;)a[m]!=null&&Dg(a[m]);s||(`value`in f&&(m=f.value)!==void 0&&(m!==e.value||p===`progress`&&!m||p===`option`&&m!==d.value)&&Ng(e,`value`,m,d.value,!1),`checked`in f&&(m=f.checked)!==void 0&&m!==e.checked&&Ng(e,`checked`,m,d.checked,!1))}return e}function Xg(e,t,n){try{typeof e==`function`?e(t):e.current=t}catch(e){q.__e(e,n)}}function Zg(e,t,n){var r,i;if(q.unmount&&q.unmount(e),(r=e.ref)&&(r.current&&r.current!==e.__e||Xg(r,null,t)),(r=e.__c)!=null){if(r.componentWillUnmount)try{r.componentWillUnmount()}catch(e){q.__e(e,t)}r.base=r.__P=null,e.__c=void 0}if(r=e.__k)for(i=0;i<r.length;i++)r[i]&&Zg(r[i],t,n||typeof e.type!=`function`);n||e.__e==null||Dg(e.__e),e.__=e.__e=e.__d=void 0}function Qg(e,t,n){return this.constructor(e,n)}function $g(e,t,n){var r,i,a;q.__&&q.__(e,t),i=(r=typeof n==`function`)?null:n&&n.__k||t.__k,a=[],qg(t,e=(!r&&n||t).__k=J(Ag,null,[e]),i||Cg,Cg,t.ownerSVGElement!==void 0,!r&&n?[n]:i?null:t.firstChild?hg.call(t.childNodes):null,a,!r&&n?n:i?i.__e:t.firstChild,r),Jg(a,e)}function e_(e,t){var n={__c:t=`__cC`+Sg++,__:e,Consumer:function(e,t){return e.children(t)},Provider:function(e){var n,r;return this.getChildContext||(n=[],(r={})[t]=this,this.getChildContext=function(){return r},this.shouldComponentUpdate=function(e){this.props.value!==e.value&&n.some(function(e){e.__e=!0,Bg(e)})},this.sub=function(e){n.push(e);var t=e.componentWillUnmount;e.componentWillUnmount=function(){n.splice(n.indexOf(e),1),t&&t.call(e)}}),e.children}};return n.Provider.__=n.Consumer.contextType=n}hg=wg.slice,q={__e:function(e,t,n,r){for(var i,a,o;t=t.__;)if((i=t.__c)&&!i.__)try{if((a=i.constructor)&&a.getDerivedStateFromError!=null&&(i.setState(a.getDerivedStateFromError(e)),o=i.__d),i.componentDidCatch!=null&&(i.componentDidCatch(e,r||{}),o=i.__d),o)return i.__E=i}catch(t){e=t}throw e}},gg=0,_g=function(e){return e!=null&&e.constructor===void 0},vg=!1,Ig.prototype.setState=function(e,t){var n=this.__s!=null&&this.__s!==this.state?this.__s:this.__s=Eg({},this.state);typeof e==`function`&&(e=e(Eg({},n),this.props)),e&&Eg(n,e),e!=null&&this.__v&&(t&&this._sb.push(t),Bg(this))},Ig.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),Bg(this))},Ig.prototype.render=Ag,yg=[],xg=typeof Promise==`function`?Promise.prototype.then.bind(Promise.resolve()):setTimeout,Vg.__r=0,Sg=0;var t_,n_,r_,i_=[],a_=[],o_=q.__b,s_=q.__r,c_=q.diffed,l_=q.__c,u_=q.unmount;function d_(){for(var e;e=i_.shift();)if(e.__P&&e.__H)try{e.__H.__h.forEach(m_),e.__H.__h.forEach(h_),e.__H.__h=[]}catch(t){e.__H.__h=[],q.__e(t,e.__v)}}q.__b=function(e){t_=null,o_&&o_(e)},q.__r=function(e){s_&&s_(e);var t=(t_=e.__c).__H;t&&(n_===t_?(t.__h=[],t_.__h=[],t.__.forEach(function(e){e.__N&&(e.__=e.__N),e.__V=a_,e.__N=e.i=void 0})):(t.__h.forEach(m_),t.__h.forEach(h_),t.__h=[])),n_=t_},q.diffed=function(e){c_&&c_(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(i_.push(t)!==1&&r_===q.requestAnimationFrame||((r_=q.requestAnimationFrame)||p_)(d_)),t.__H.__.forEach(function(e){e.i&&(e.__H=e.i),e.__V!==a_&&(e.__=e.__V),e.i=void 0,e.__V=a_})),n_=t_=null},q.__c=function(e,t){t.some(function(e){try{e.__h.forEach(m_),e.__h=e.__h.filter(function(e){return!e.__||h_(e)})}catch(n){t.some(function(e){e.__h&&=[]}),t=[],q.__e(n,e.__v)}}),l_&&l_(e,t)},q.unmount=function(e){u_&&u_(e);var t,n=e.__c;n&&n.__H&&(n.__H.__.forEach(function(e){try{m_(e)}catch(e){t=e}}),n.__H=void 0,t&&q.__e(t,n.__v))};var f_=typeof requestAnimationFrame==`function`;function p_(e){var t,n=function(){clearTimeout(r),f_&&cancelAnimationFrame(t),setTimeout(e)},r=setTimeout(n,100);f_&&(t=requestAnimationFrame(n))}function m_(e){var t=t_,n=e.__c;typeof n==`function`&&(e.__c=void 0,n()),t_=t}function h_(e){var t=t_;e.__c=e.__(),t_=t}function g_(e,t){for(var n in t)e[n]=t[n];return e}function __(e,t){for(var n in e)if(n!==`__source`&&!(n in t))return!0;for(var r in t)if(r!==`__source`&&e[r]!==t[r])return!0;return!1}function v_(e){this.props=e}(v_.prototype=new Ig).isPureReactComponent=!0,v_.prototype.shouldComponentUpdate=function(e,t){return __(this.props,e)||__(this.state,t)};var y_=q.__b;q.__b=function(e){e.type&&e.type.__f&&e.ref&&(e.props.ref=e.ref,e.ref=null),y_&&y_(e)},typeof Symbol<`u`&&Symbol.for;var b_=q.__e;q.__e=function(e,t,n,r){if(e.then){for(var i,a=t;a=a.__;)if((i=a.__c)&&i.__c)return t.__e??(t.__e=n.__e,t.__k=n.__k),i.__c(e,t)}b_(e,t,n,r)};var x_=q.unmount;function S_(e,t,n){return e&&(e.__c&&e.__c.__H&&(e.__c.__H.__.forEach(function(e){typeof e.__c==`function`&&e.__c()}),e.__c.__H=null),(e=g_({},e)).__c!=null&&(e.__c.__P===n&&(e.__c.__P=t),e.__c=null),e.__k=e.__k&&e.__k.map(function(e){return S_(e,t,n)})),e}function C_(e,t,n){return e&&(e.__v=null,e.__k=e.__k&&e.__k.map(function(e){return C_(e,t,n)}),e.__c&&e.__c.__P===t&&(e.__e&&n.insertBefore(e.__e,e.__d),e.__c.__e=!0,e.__c.__P=n)),e}function w_(){this.__u=0,this.t=null,this.__b=null}function T_(e){var t=e.__.__c;return t&&t.__a&&t.__a(e)}function E_(){this.u=null,this.o=null}q.unmount=function(e){var t=e.__c;t&&t.__R&&t.__R(),t&&!0===e.__h&&(e.type=null),x_&&x_(e)},(w_.prototype=new Ig).__c=function(e,t){var n=t.__c,r=this;r.t??=[],r.t.push(n);var i=T_(r.__v),a=!1,o=function(){a||(a=!0,n.__R=null,i?i(s):s())};n.__R=o;var s=function(){if(!--r.__u){if(r.state.__a){var e=r.state.__a;r.__v.__k[0]=C_(e,e.__c.__P,e.__c.__O)}var t;for(r.setState({__a:r.__b=null});t=r.t.pop();)t.forceUpdate()}},c=!0===t.__h;r.__u++||c||r.setState({__a:r.__b=r.__v.__k[0]}),e.then(o,o)},w_.prototype.componentWillUnmount=function(){this.t=[]},w_.prototype.render=function(e,t){if(this.__b){if(this.__v.__k){var n=document.createElement(`div`),r=this.__v.__k[0].__c;this.__v.__k[0]=S_(this.__b,n,r.__O=r.__P)}this.__b=null}var i=t.__a&&J(Ag,null,e.fallback);return i&&(i.__h=null),[J(Ag,null,t.__a?null:e.children),i]};var D_=function(e,t,n){if(++n[1]===n[0]&&e.o.delete(t),e.props.revealOrder&&(e.props.revealOrder[0]!==`t`||!e.o.size))for(n=e.u;n;){for(;n.length>3;)n.pop()();if(n[1]<n[0])break;e.u=n=n[2]}};function O_(e){return this.getChildContext=function(){return e.context},e.children}function k_(e){var t=this,n=e.i;t.componentWillUnmount=function(){$g(null,t.l),t.l=null,t.i=null},t.i&&t.i!==n&&t.componentWillUnmount(),e.__v?(t.l||=(t.i=n,{nodeType:1,parentNode:n,childNodes:[],appendChild:function(e){this.childNodes.push(e),t.i.appendChild(e)},insertBefore:function(e,n){this.childNodes.push(e),t.i.appendChild(e)},removeChild:function(e){this.childNodes.splice(this.childNodes.indexOf(e)>>>1,1),t.i.removeChild(e)}}),$g(J(O_,{context:t.context},e.__v),t.l)):t.l&&t.componentWillUnmount()}function A_(e,t){var n=J(k_,{__v:e,i:t});return n.containerInfo=t,n}(E_.prototype=new Ig).__a=function(e){var t=this,n=T_(t.__v),r=t.o.get(e);return r[0]++,function(i){var a=function(){t.props.revealOrder?(r.push(i),D_(t,e,r)):i()};n?n(a):a()}},E_.prototype.render=function(e){this.u=null,this.o=new Map;var t=Wg(e.children);e.revealOrder&&e.revealOrder[0]===`b`&&t.reverse();for(var n=t.length;n--;)this.o.set(t[n],this.u=[1,0,this.u]);return e.children},E_.prototype.componentDidUpdate=E_.prototype.componentDidMount=function(){var e=this;this.o.forEach(function(t,n){D_(e,n,t)})};var j_=typeof Symbol<`u`&&Symbol.for&&Symbol.for(`react.element`)||60103,M_=/^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|dominant|fill|flood|font|glyph(?!R)|horiz|image|letter|lighting|marker(?!H|W|U)|overline|paint|pointer|shape|stop|strikethrough|stroke|text(?!L)|transform|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/,N_=typeof document<`u`,P_=function(e){return(typeof Symbol<`u`&&typeof Symbol()==`symbol`?/fil|che|rad/i:/fil|che|ra/i).test(e)};Ig.prototype.isReactComponent={},[`componentWillMount`,`componentWillReceiveProps`,`componentWillUpdate`].forEach(function(e){Object.defineProperty(Ig.prototype,e,{configurable:!0,get:function(){return this[`UNSAFE_`+e]},set:function(t){Object.defineProperty(this,e,{configurable:!0,writable:!0,value:t})}})});var F_=q.event;function I_(){}function L_(){return this.cancelBubble}function R_(){return this.defaultPrevented}q.event=function(e){return F_&&(e=F_(e)),e.persist=I_,e.isPropagationStopped=L_,e.isDefaultPrevented=R_,e.nativeEvent=e};var z_={configurable:!0,get:function(){return this.class}},B_=q.vnode;q.vnode=function(e){var t=e.type,n=e.props,r=n;if(typeof t==`string`){var i=t.indexOf(`-`)===-1;for(var a in r={},n){var o=n[a];N_&&a===`children`&&t===`noscript`||a===`value`&&`defaultValue`in n&&o==null||(a===`defaultValue`&&`value`in n&&n.value==null?a=`value`:a===`download`&&!0===o?o=``:/ondoubleclick/i.test(a)?a=`ondblclick`:/^onchange(textarea|input)/i.test(a+t)&&!P_(n.type)?a=`oninput`:/^onfocus$/i.test(a)?a=`onfocusin`:/^onblur$/i.test(a)?a=`onfocusout`:/^on(Ani|Tra|Tou|BeforeInp|Compo)/.test(a)?a=a.toLowerCase():i&&M_.test(a)?a=a.replace(/[A-Z0-9]/g,`-$&`).toLowerCase():o===null&&(o=void 0),/^oninput$/i.test(a)&&(a=a.toLowerCase(),r[a]&&(a=`oninputCapture`)),r[a]=o)}t==`select`&&r.multiple&&Array.isArray(r.value)&&(r.value=Wg(n.children).forEach(function(e){e.props.selected=r.value.indexOf(e.props.value)!=-1})),t==`select`&&r.defaultValue!=null&&(r.value=Wg(n.children).forEach(function(e){e.props.selected=r.multiple?r.defaultValue.indexOf(e.props.value)!=-1:r.defaultValue==e.props.value})),e.props=r,n.class!=n.className&&(z_.enumerable=`className`in n,n.className!=null&&(r.class=n.className),Object.defineProperty(r,"className",z_))}e.$$typeof=j_,B_&&B_(e)};var V_=q.__r;q.__r=function(e){V_&&V_(e),e.__c};var H_=[],U_=new Map;function W_(e){H_.push(e),U_.forEach(t=>{J_(t,e)})}function G_(e){e.isConnected&&e.getRootNode&&K_(e.getRootNode())}function K_(e){let t=U_.get(e);if(!t||!t.isConnected){if(t=e.querySelector(`style[data-fullcalendar]`),!t){t=document.createElement(`style`),t.setAttribute(`data-fullcalendar`,``);let n=X_();n&&(t.nonce=n);let r=e===document?document.head:e,i=e===document?r.querySelector(`script,link[rel=stylesheet],link[as=style],style`):r.firstChild;r.insertBefore(t,i)}U_.set(e,t),q_(t)}}function q_(e){for(let t of H_)J_(e,t)}function J_(e,t){let{sheet:n}=e,r=n.cssRules.length;t.split(`}`).forEach((e,t)=>{e=e.trim(),e&&n.insertRule(e+`}`,r+t)})}var Y_;function X_(){return Y_===void 0&&(Y_=Z_()),Y_}function Z_(){let e=document.querySelector(`meta[name="csp-nonce"]`);if(e&&e.hasAttribute(`content`))return e.getAttribute(`content`);let t=document.querySelector(`script[nonce]`);return t&&t.nonce||``}typeof document<`u`&&K_(document),W_(`:root{--fc-small-font-size:.85em;--fc-page-bg-color:#fff;--fc-neutral-bg-color:hsla(0,0%,82%,.3);--fc-neutral-text-color:grey;--fc-border-color:#ddd;--fc-button-text-color:#fff;--fc-button-bg-color:#2c3e50;--fc-button-border-color:#2c3e50;--fc-button-hover-bg-color:#1e2b37;--fc-button-hover-border-color:#1a252f;--fc-button-active-bg-color:#1a252f;--fc-button-active-border-color:#151e27;--fc-event-bg-color:#3788d8;--fc-event-border-color:#3788d8;--fc-event-text-color:#fff;--fc-event-selected-overlay-color:rgba(0,0,0,.25);--fc-more-link-bg-color:#d0d0d0;--fc-more-link-text-color:inherit;--fc-event-resizer-thickness:8px;--fc-event-resizer-dot-total-width:8px;--fc-event-resizer-dot-border-width:1px;--fc-non-business-color:hsla(0,0%,84%,.3);--fc-bg-event-color:#8fdf82;--fc-bg-event-opacity:0.3;--fc-highlight-color:rgba(188,232,241,.3);--fc-today-bg-color:rgba(255,220,40,.15);--fc-now-indicator-color:red}.fc-not-allowed,.fc-not-allowed .fc-event{cursor:not-allowed}.fc{display:flex;flex-direction:column;font-size:1em}.fc,.fc *,.fc :after,.fc :before{box-sizing:border-box}.fc table{border-collapse:collapse;border-spacing:0;font-size:1em}.fc th{text-align:center}.fc td,.fc th{padding:0;vertical-align:top}.fc a[data-navlink]{cursor:pointer}.fc a[data-navlink]:hover{text-decoration:underline}.fc-direction-ltr{direction:ltr;text-align:left}.fc-direction-rtl{direction:rtl;text-align:right}.fc-theme-standard td,.fc-theme-standard th{border:1px solid var(--fc-border-color)}.fc-liquid-hack td,.fc-liquid-hack th{position:relative}@font-face{font-family:fcicons;font-style:normal;font-weight:400;src:url("data:application/x-font-ttf;charset=utf-8;base64,AAEAAAALAIAAAwAwT1MvMg8SBfAAAAC8AAAAYGNtYXAXVtKNAAABHAAAAFRnYXNwAAAAEAAAAXAAAAAIZ2x5ZgYydxIAAAF4AAAFNGhlYWQUJ7cIAAAGrAAAADZoaGVhB20DzAAABuQAAAAkaG10eCIABhQAAAcIAAAALGxvY2ED4AU6AAAHNAAAABhtYXhwAA8AjAAAB0wAAAAgbmFtZXsr690AAAdsAAABhnBvc3QAAwAAAAAI9AAAACAAAwPAAZAABQAAApkCzAAAAI8CmQLMAAAB6wAzAQkAAAAAAAAAAAAAAAAAAAABEAAAAAAAAAAAAAAAAAAAAABAAADpBgPA/8AAQAPAAEAAAAABAAAAAAAAAAAAAAAgAAAAAAADAAAAAwAAABwAAQADAAAAHAADAAEAAAAcAAQAOAAAAAoACAACAAIAAQAg6Qb//f//AAAAAAAg6QD//f//AAH/4xcEAAMAAQAAAAAAAAAAAAAAAQAB//8ADwABAAAAAAAAAAAAAgAANzkBAAAAAAEAAAAAAAAAAAACAAA3OQEAAAAAAQAAAAAAAAAAAAIAADc5AQAAAAABAWIAjQKeAskAEwAAJSc3NjQnJiIHAQYUFwEWMjc2NCcCnuLiDQ0MJAz/AA0NAQAMJAwNDcni4gwjDQwM/wANIwz/AA0NDCMNAAAAAQFiAI0CngLJABMAACUBNjQnASYiBwYUHwEHBhQXFjI3AZ4BAA0N/wAMJAwNDeLiDQ0MJAyNAQAMIw0BAAwMDSMM4uINIwwNDQAAAAIA4gC3Ax4CngATACcAACUnNzY0JyYiDwEGFB8BFjI3NjQnISc3NjQnJiIPAQYUHwEWMjc2NCcB87e3DQ0MIw3VDQ3VDSMMDQ0BK7e3DQ0MJAzVDQ3VDCQMDQ3zuLcMJAwNDdUNIwzWDAwNIwy4twwkDA0N1Q0jDNYMDA0jDAAAAgDiALcDHgKeABMAJwAAJTc2NC8BJiIHBhQfAQcGFBcWMjchNzY0LwEmIgcGFB8BBwYUFxYyNwJJ1Q0N1Q0jDA0Nt7cNDQwjDf7V1Q0N1QwkDA0Nt7cNDQwkDLfWDCMN1Q0NDCQMt7gMIw0MDNYMIw3VDQ0MJAy3uAwjDQwMAAADAFUAAAOrA1UAMwBoAHcAABMiBgcOAQcOAQcOARURFBYXHgEXHgEXHgEzITI2Nz4BNz4BNz4BNRE0JicuAScuAScuASMFITIWFx4BFx4BFx4BFREUBgcOAQcOAQcOASMhIiYnLgEnLgEnLgE1ETQ2Nz4BNz4BNz4BMxMhMjY1NCYjISIGFRQWM9UNGAwLFQkJDgUFBQUFBQ4JCRULDBgNAlYNGAwLFQkJDgUFBQUFBQ4JCRULDBgN/aoCVgQIBAQHAwMFAQIBAQIBBQMDBwQECAT9qgQIBAQHAwMFAQIBAQIBBQMDBwQECASAAVYRGRkR/qoRGRkRA1UFBAUOCQkVDAsZDf2rDRkLDBUJCA4FBQUFBQUOCQgVDAsZDQJVDRkLDBUJCQ4FBAVVAgECBQMCBwQECAX9qwQJAwQHAwMFAQICAgIBBQMDBwQDCQQCVQUIBAQHAgMFAgEC/oAZEhEZGRESGQAAAAADAFUAAAOrA1UAMwBoAIkAABMiBgcOAQcOAQcOARURFBYXHgEXHgEXHgEzITI2Nz4BNz4BNz4BNRE0JicuAScuAScuASMFITIWFx4BFx4BFx4BFREUBgcOAQcOAQcOASMhIiYnLgEnLgEnLgE1ETQ2Nz4BNz4BNz4BMxMzFRQWMzI2PQEzMjY1NCYrATU0JiMiBh0BIyIGFRQWM9UNGAwLFQkJDgUFBQUFBQ4JCRULDBgNAlYNGAwLFQkJDgUFBQUFBQ4JCRULDBgN/aoCVgQIBAQHAwMFAQIBAQIBBQMDBwQECAT9qgQIBAQHAwMFAQIBAQIBBQMDBwQECASAgBkSEhmAERkZEYAZEhIZgBEZGREDVQUEBQ4JCRUMCxkN/asNGQsMFQkIDgUFBQUFBQ4JCBUMCxkNAlUNGQsMFQkJDgUEBVUCAQIFAwIHBAQIBf2rBAkDBAcDAwUBAgICAgEFAwMHBAMJBAJVBQgEBAcCAwUCAQL+gIASGRkSgBkSERmAEhkZEoAZERIZAAABAOIAjQMeAskAIAAAExcHBhQXFjI/ARcWMjc2NC8BNzY0JyYiDwEnJiIHBhQX4uLiDQ0MJAzi4gwkDA0N4uINDQwkDOLiDCQMDQ0CjeLiDSMMDQ3h4Q0NDCMN4uIMIw0MDOLiDAwNIwwAAAABAAAAAQAAa5n0y18PPPUACwQAAAAAANivOVsAAAAA2K85WwAAAAADqwNVAAAACAACAAAAAAAAAAEAAAPA/8AAAAQAAAAAAAOrAAEAAAAAAAAAAAAAAAAAAAALBAAAAAAAAAAAAAAAAgAAAAQAAWIEAAFiBAAA4gQAAOIEAABVBAAAVQQAAOIAAAAAAAoAFAAeAEQAagCqAOoBngJkApoAAQAAAAsAigADAAAAAAACAAAAAAAAAAAAAAAAAAAAAAAAAA4ArgABAAAAAAABAAcAAAABAAAAAAACAAcAYAABAAAAAAADAAcANgABAAAAAAAEAAcAdQABAAAAAAAFAAsAFQABAAAAAAAGAAcASwABAAAAAAAKABoAigADAAEECQABAA4ABwADAAEECQACAA4AZwADAAEECQADAA4APQADAAEECQAEAA4AfAADAAEECQAFABYAIAADAAEECQAGAA4AUgADAAEECQAKADQApGZjaWNvbnMAZgBjAGkAYwBvAG4Ac1ZlcnNpb24gMS4wAFYAZQByAHMAaQBvAG4AIAAxAC4AMGZjaWNvbnMAZgBjAGkAYwBvAG4Ac2ZjaWNvbnMAZgBjAGkAYwBvAG4Ac1JlZ3VsYXIAUgBlAGcAdQBsAGEAcmZjaWNvbnMAZgBjAGkAYwBvAG4Ac0ZvbnQgZ2VuZXJhdGVkIGJ5IEljb01vb24uAEYAbwBuAHQAIABnAGUAbgBlAHIAYQB0AGUAZAAgAGIAeQAgAEkAYwBvAE0AbwBvAG4ALgAAAAMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=") format("truetype")}.fc-icon{speak:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;display:inline-block;font-family:fcicons!important;font-style:normal;font-variant:normal;font-weight:400;height:1em;line-height:1;text-align:center;text-transform:none;-webkit-user-select:none;-moz-user-select:none;user-select:none;width:1em}.fc-icon-chevron-left:before{content:"\\e900"}.fc-icon-chevron-right:before{content:"\\e901"}.fc-icon-chevrons-left:before{content:"\\e902"}.fc-icon-chevrons-right:before{content:"\\e903"}.fc-icon-minus-square:before{content:"\\e904"}.fc-icon-plus-square:before{content:"\\e905"}.fc-icon-x:before{content:"\\e906"}.fc .fc-button{border-radius:0;font-family:inherit;font-size:inherit;line-height:inherit;margin:0;overflow:visible;text-transform:none}.fc .fc-button:focus{outline:1px dotted;outline:5px auto -webkit-focus-ring-color}.fc .fc-button{-webkit-appearance:button}.fc .fc-button:not(:disabled){cursor:pointer}.fc .fc-button{background-color:transparent;border:1px solid transparent;border-radius:.25em;display:inline-block;font-size:1em;font-weight:400;line-height:1.5;padding:.4em .65em;text-align:center;-webkit-user-select:none;-moz-user-select:none;user-select:none;vertical-align:middle}.fc .fc-button:hover{text-decoration:none}.fc .fc-button:focus{box-shadow:0 0 0 .2rem rgba(44,62,80,.25);outline:0}.fc .fc-button:disabled{opacity:.65}.fc .fc-button-primary{background-color:var(--fc-button-bg-color);border-color:var(--fc-button-border-color);color:var(--fc-button-text-color)}.fc .fc-button-primary:hover{background-color:var(--fc-button-hover-bg-color);border-color:var(--fc-button-hover-border-color);color:var(--fc-button-text-color)}.fc .fc-button-primary:disabled{background-color:var(--fc-button-bg-color);border-color:var(--fc-button-border-color);color:var(--fc-button-text-color)}.fc .fc-button-primary:focus{box-shadow:0 0 0 .2rem rgba(76,91,106,.5)}.fc .fc-button-primary:not(:disabled).fc-button-active,.fc .fc-button-primary:not(:disabled):active{background-color:var(--fc-button-active-bg-color);border-color:var(--fc-button-active-border-color);color:var(--fc-button-text-color)}.fc .fc-button-primary:not(:disabled).fc-button-active:focus,.fc .fc-button-primary:not(:disabled):active:focus{box-shadow:0 0 0 .2rem rgba(76,91,106,.5)}.fc .fc-button .fc-icon{font-size:1.5em;vertical-align:middle}.fc .fc-button-group{display:inline-flex;position:relative;vertical-align:middle}.fc .fc-button-group>.fc-button{flex:1 1 auto;position:relative}.fc .fc-button-group>.fc-button.fc-button-active,.fc .fc-button-group>.fc-button:active,.fc .fc-button-group>.fc-button:focus,.fc .fc-button-group>.fc-button:hover{z-index:1}.fc-direction-ltr .fc-button-group>.fc-button:not(:first-child){border-bottom-left-radius:0;border-top-left-radius:0;margin-left:-1px}.fc-direction-ltr .fc-button-group>.fc-button:not(:last-child){border-bottom-right-radius:0;border-top-right-radius:0}.fc-direction-rtl .fc-button-group>.fc-button:not(:first-child){border-bottom-right-radius:0;border-top-right-radius:0;margin-right:-1px}.fc-direction-rtl .fc-button-group>.fc-button:not(:last-child){border-bottom-left-radius:0;border-top-left-radius:0}.fc .fc-toolbar{align-items:center;display:flex;justify-content:space-between}.fc .fc-toolbar.fc-header-toolbar{margin-bottom:1.5em}.fc .fc-toolbar.fc-footer-toolbar{margin-top:1.5em}.fc .fc-toolbar-title{font-size:1.75em;margin:0}.fc-direction-ltr .fc-toolbar>*>:not(:first-child){margin-left:.75em}.fc-direction-rtl .fc-toolbar>*>:not(:first-child){margin-right:.75em}.fc-direction-rtl .fc-toolbar-ltr{flex-direction:row-reverse}.fc .fc-scroller{-webkit-overflow-scrolling:touch;position:relative}.fc .fc-scroller-liquid{height:100%}.fc .fc-scroller-liquid-absolute{bottom:0;left:0;position:absolute;right:0;top:0}.fc .fc-scroller-harness{direction:ltr;overflow:hidden;position:relative}.fc .fc-scroller-harness-liquid{height:100%}.fc-direction-rtl .fc-scroller-harness>.fc-scroller{direction:rtl}.fc-theme-standard .fc-scrollgrid{border:1px solid var(--fc-border-color)}.fc .fc-scrollgrid,.fc .fc-scrollgrid table{table-layout:fixed;width:100%}.fc .fc-scrollgrid table{border-left-style:hidden;border-right-style:hidden;border-top-style:hidden}.fc .fc-scrollgrid{border-bottom-width:0;border-collapse:separate;border-right-width:0}.fc .fc-scrollgrid-liquid{height:100%}.fc .fc-scrollgrid-section,.fc .fc-scrollgrid-section table,.fc .fc-scrollgrid-section>td{height:1px}.fc .fc-scrollgrid-section-liquid>td{height:100%}.fc .fc-scrollgrid-section>*{border-left-width:0;border-top-width:0}.fc .fc-scrollgrid-section-footer>*,.fc .fc-scrollgrid-section-header>*{border-bottom-width:0}.fc .fc-scrollgrid-section-body table,.fc .fc-scrollgrid-section-footer table{border-bottom-style:hidden}.fc .fc-scrollgrid-section-sticky>*{background:var(--fc-page-bg-color);position:sticky;z-index:3}.fc .fc-scrollgrid-section-header.fc-scrollgrid-section-sticky>*{top:0}.fc .fc-scrollgrid-section-footer.fc-scrollgrid-section-sticky>*{bottom:0}.fc .fc-scrollgrid-sticky-shim{height:1px;margin-bottom:-1px}.fc-sticky{position:sticky}.fc .fc-view-harness{flex-grow:1;position:relative}.fc .fc-view-harness-active>.fc-view{bottom:0;left:0;position:absolute;right:0;top:0}.fc .fc-col-header-cell-cushion{display:inline-block;padding:2px 4px}.fc .fc-bg-event,.fc .fc-highlight,.fc .fc-non-business{bottom:0;left:0;position:absolute;right:0;top:0}.fc .fc-non-business{background:var(--fc-non-business-color)}.fc .fc-bg-event{background:var(--fc-bg-event-color);opacity:var(--fc-bg-event-opacity)}.fc .fc-bg-event .fc-event-title{font-size:var(--fc-small-font-size);font-style:italic;margin:.5em}.fc .fc-highlight{background:var(--fc-highlight-color)}.fc .fc-cell-shaded,.fc .fc-day-disabled{background:var(--fc-neutral-bg-color)}a.fc-event,a.fc-event:hover{text-decoration:none}.fc-event.fc-event-draggable,.fc-event[href]{cursor:pointer}.fc-event .fc-event-main{position:relative;z-index:2}.fc-event-dragging:not(.fc-event-selected){opacity:.75}.fc-event-dragging.fc-event-selected{box-shadow:0 2px 7px rgba(0,0,0,.3)}.fc-event .fc-event-resizer{display:none;position:absolute;z-index:4}.fc-event-selected .fc-event-resizer,.fc-event:hover .fc-event-resizer{display:block}.fc-event-selected .fc-event-resizer{background:var(--fc-page-bg-color);border-color:inherit;border-radius:calc(var(--fc-event-resizer-dot-total-width)/2);border-style:solid;border-width:var(--fc-event-resizer-dot-border-width);height:var(--fc-event-resizer-dot-total-width);width:var(--fc-event-resizer-dot-total-width)}.fc-event-selected .fc-event-resizer:before{bottom:-20px;content:"";left:-20px;position:absolute;right:-20px;top:-20px}.fc-event-selected,.fc-event:focus{box-shadow:0 2px 5px rgba(0,0,0,.2)}.fc-event-selected:before,.fc-event:focus:before{bottom:0;content:"";left:0;position:absolute;right:0;top:0;z-index:3}.fc-event-selected:after,.fc-event:focus:after{background:var(--fc-event-selected-overlay-color);bottom:-1px;content:"";left:-1px;position:absolute;right:-1px;top:-1px;z-index:1}.fc-h-event{background-color:var(--fc-event-bg-color);border:1px solid var(--fc-event-border-color);display:block}.fc-h-event .fc-event-main{color:var(--fc-event-text-color)}.fc-h-event .fc-event-main-frame{display:flex}.fc-h-event .fc-event-time{max-width:100%;overflow:hidden}.fc-h-event .fc-event-title-container{flex-grow:1;flex-shrink:1;min-width:0}.fc-h-event .fc-event-title{display:inline-block;left:0;max-width:100%;overflow:hidden;right:0;vertical-align:top}.fc-h-event.fc-event-selected:before{bottom:-10px;top:-10px}.fc-direction-ltr .fc-daygrid-block-event:not(.fc-event-start),.fc-direction-rtl .fc-daygrid-block-event:not(.fc-event-end){border-bottom-left-radius:0;border-left-width:0;border-top-left-radius:0}.fc-direction-ltr .fc-daygrid-block-event:not(.fc-event-end),.fc-direction-rtl .fc-daygrid-block-event:not(.fc-event-start){border-bottom-right-radius:0;border-right-width:0;border-top-right-radius:0}.fc-h-event:not(.fc-event-selected) .fc-event-resizer{bottom:0;top:0;width:var(--fc-event-resizer-thickness)}.fc-direction-ltr .fc-h-event:not(.fc-event-selected) .fc-event-resizer-start,.fc-direction-rtl .fc-h-event:not(.fc-event-selected) .fc-event-resizer-end{cursor:w-resize;left:calc(var(--fc-event-resizer-thickness)*-.5)}.fc-direction-ltr .fc-h-event:not(.fc-event-selected) .fc-event-resizer-end,.fc-direction-rtl .fc-h-event:not(.fc-event-selected) .fc-event-resizer-start{cursor:e-resize;right:calc(var(--fc-event-resizer-thickness)*-.5)}.fc-h-event.fc-event-selected .fc-event-resizer{margin-top:calc(var(--fc-event-resizer-dot-total-width)*-.5);top:50%}.fc-direction-ltr .fc-h-event.fc-event-selected .fc-event-resizer-start,.fc-direction-rtl .fc-h-event.fc-event-selected .fc-event-resizer-end{left:calc(var(--fc-event-resizer-dot-total-width)*-.5)}.fc-direction-ltr .fc-h-event.fc-event-selected .fc-event-resizer-end,.fc-direction-rtl .fc-h-event.fc-event-selected .fc-event-resizer-start{right:calc(var(--fc-event-resizer-dot-total-width)*-.5)}.fc .fc-popover{box-shadow:0 2px 6px rgba(0,0,0,.15);position:absolute;z-index:9999}.fc .fc-popover-header{align-items:center;display:flex;flex-direction:row;justify-content:space-between;padding:3px 4px}.fc .fc-popover-title{margin:0 2px}.fc .fc-popover-close{cursor:pointer;font-size:1.1em;opacity:.65}.fc-theme-standard .fc-popover{background:var(--fc-page-bg-color);border:1px solid var(--fc-border-color)}.fc-theme-standard .fc-popover-header{background:var(--fc-neutral-bg-color)}`);var Q_=class{constructor(e){this.drainedOption=e,this.isRunning=!1,this.isDirty=!1,this.pauseDepths={},this.timeoutId=0}request(e){this.isDirty=!0,this.isPaused()||(this.clearTimeout(),e==null?this.tryDrain():this.timeoutId=setTimeout(this.tryDrain.bind(this),e))}pause(e=``){let{pauseDepths:t}=this;t[e]=(t[e]||0)+1,this.clearTimeout()}resume(e=``,t){let{pauseDepths:n}=this;e in n&&(t?delete n[e]:(--n[e],n[e]<=0&&delete n[e]),this.tryDrain())}isPaused(){return Object.keys(this.pauseDepths).length}tryDrain(){if(!this.isRunning&&!this.isPaused()){for(this.isRunning=!0;this.isDirty;)this.isDirty=!1,this.drained();this.isRunning=!1}}clear(){this.clearTimeout(),this.isDirty=!1,this.pauseDepths={}}clearTimeout(){this.timeoutId&&=(clearTimeout(this.timeoutId),0)}drained(){this.drainedOption&&this.drainedOption()}};function $_(e){e.parentNode&&e.parentNode.removeChild(e)}function ev(e,t){if(e.closest)return e.closest(t);if(!document.documentElement.contains(e))return null;do{if(tv(e,t))return e;e=e.parentElement||e.parentNode}while(e!==null&&e.nodeType===1);return null}function tv(e,t){return(e.matches||e.matchesSelector||e.msMatchesSelector).call(e,t)}function nv(e,t){let n=e instanceof HTMLElement?[e]:e,r=[];for(let e=0;e<n.length;e+=1){let i=n[e].querySelectorAll(t);for(let e=0;e<i.length;e+=1)r.push(i[e])}return r}var rv=/(top|left|right|bottom|width|height)$/i;function iv(e,t){for(let n in t)av(e,n,t[n])}function av(e,t,n){n==null?e.style[t]=``:typeof n==`number`&&rv.test(t)?e.style[t]=`${n}px`:e.style[t]=n}function ov(e){return e.composedPath?.call(e)[0]??e.target}var sv=0;function cv(){return sv+=1,`fc-dom-`+sv}function lv(e,t){return n=>{let r=ev(n.target,e);r&&t.call(r,n,r)}}function uv(e,t,n,r){let i=lv(n,r);return e.addEventListener(t,i),()=>{e.removeEventListener(t,i)}}function dv(e,t,n,r){let i;return uv(e,`mouseover`,t,(e,t)=>{if(t!==i){i=t,n(e,t);let a=e=>{i=null,r(e,t),t.removeEventListener(`mouseleave`,a)};t.addEventListener(`mouseleave`,a)}})}function fv(e){return Object.assign({onClick:e},pv(e))}function pv(e){return{tabIndex:0,onKeyDown(t){(t.key===`Enter`||t.key===` `)&&(e(t),t.preventDefault())}}}var mv=0;function hv(){return mv+=1,String(mv)}function gv(e){let t=[],n=[],r,i;for(typeof e==`string`?n=e.split(/\s*,\s*/):typeof e==`function`?n=[e]:Array.isArray(e)&&(n=e),r=0;r<n.length;r+=1)i=n[r],typeof i==`string`?t.push(i.charAt(0)===`-`?{field:i.substring(1),order:-1}:{field:i,order:1}):typeof i==`function`&&t.push({func:i});return t}function _v(e,t,n){let r,i;for(r=0;r<n.length;r+=1)if(i=vv(e,t,n[r]),i)return i;return 0}function vv(e,t,n){return n.func?n.func(e,t):yv(e[n.field],t[n.field])*(n.order||1)}function yv(e,t){return!e&&!t?0:t==null?-1:e==null?1:typeof e==`string`||typeof t==`string`?String(e).localeCompare(String(t)):e-t}function bv(e,t){let n=String(e);return`000`.substr(0,t-n.length)+n}function xv(e,t,n){return typeof e==`function`?e(...t):typeof e==`string`?t.reduce((e,t,n)=>e.replace(`$`+n,t||``),e):n}function Sv(e){return e%1==0}function Cv(e){let t=e.querySelector(`.fc-scrollgrid-shrink-frame`),n=e.querySelector(`.fc-scrollgrid-shrink-cushion`);if(!t)throw Error(`needs fc-scrollgrid-shrink-frame className`);if(!n)throw Error(`needs fc-scrollgrid-shrink-cushion className`);return e.getBoundingClientRect().width-t.getBoundingClientRect().width+n.getBoundingClientRect().width}var wv=/^(-?)(?:(\d+)\.)?(\d+):(\d\d)(?::(\d\d)(?:\.(\d\d\d))?)?/;function Tv(e,t){return typeof e==`string`?Ev(e):typeof e==`object`&&e?Dv(e):typeof e==`number`?Dv({[t||`milliseconds`]:e}):null}function Ev(e){let t=wv.exec(e);if(t){let e=t[1]?-1:1;return{years:0,months:0,days:e*(t[2]?parseInt(t[2],10):0),milliseconds:e*((t[3]?parseInt(t[3],10):0)*60*60*1e3+(t[4]?parseInt(t[4],10):0)*60*1e3+(t[5]?parseInt(t[5],10):0)*1e3+(t[6]?parseInt(t[6],10):0))}}return null}function Dv(e){let t={years:e.years||e.year||0,months:e.months||e.month||0,days:e.days||e.day||0,milliseconds:(e.hours||e.hour||0)*60*60*1e3+(e.minutes||e.minute||0)*60*1e3+(e.seconds||e.second||0)*1e3+(e.milliseconds||e.millisecond||e.ms||0)},n=e.weeks||e.week;return n&&(t.days+=n*7,t.specifiedWeeks=!0),t}function Ov(e,t){return e.years===t.years&&e.months===t.months&&e.days===t.days&&e.milliseconds===t.milliseconds}function kv(e,t){return{years:e.years-t.years,months:e.months-t.months,days:e.days-t.days,milliseconds:e.milliseconds-t.milliseconds}}function Av(e){return Mv(e)/365}function jv(e){return Mv(e)/30}function Mv(e){return Nv(e)/864e5}function Nv(e){return e.years*31536e6+e.months*2592e6+e.days*864e5+e.milliseconds}function Pv(e){let t=e.milliseconds;if(t){if(t%1e3!=0)return{unit:`millisecond`,value:t};if(t%6e4!=0)return{unit:`second`,value:t/1e3};if(t%36e5!=0)return{unit:`minute`,value:t/6e4};if(t)return{unit:`hour`,value:t/36e5}}return e.days?e.specifiedWeeks&&e.days%7==0?{unit:`week`,value:e.days/7}:{unit:`day`,value:e.days}:e.months?{unit:`month`,value:e.months}:e.years?{unit:`year`,value:e.years}:{unit:`millisecond`,value:0}}function Fv(e,t,n){if(e===t)return!0;let r=e.length,i;if(r!==t.length)return!1;for(i=0;i<r;i+=1)if(!(n?n(e[i],t[i]):e[i]===t[i]))return!1;return!0}var Iv=[`sun`,`mon`,`tue`,`wed`,`thu`,`fri`,`sat`];function Lv(e,t){let n=ry(e);return n[2]+=t*7,iy(n)}function Rv(e,t){let n=ry(e);return n[2]+=t,iy(n)}function zv(e,t){let n=ry(e);return n[6]+=t,iy(n)}function Bv(e,t){return Vv(e,t)/7}function Vv(e,t){return(t.valueOf()-e.valueOf())/864e5}function Hv(e,t){return(t.valueOf()-e.valueOf())/36e5}function Uv(e,t){return(t.valueOf()-e.valueOf())/6e4}function Wv(e,t){return(t.valueOf()-e.valueOf())/1e3}function Gv(e,t){let n=Jv(e),r=Jv(t);return{years:0,months:0,days:Math.round(Vv(n,r)),milliseconds:t.valueOf()-r.valueOf()-(e.valueOf()-n.valueOf())}}function Kv(e,t){let n=qv(e,t);return n!==null&&n%7==0?n/7:null}function qv(e,t){return oy(e)===oy(t)?Math.round(Vv(e,t)):null}function Jv(e){return iy([e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate()])}function Yv(e){return iy([e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate(),e.getUTCHours()])}function Xv(e){return iy([e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate(),e.getUTCHours(),e.getUTCMinutes()])}function Zv(e){return iy([e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate(),e.getUTCHours(),e.getUTCMinutes(),e.getUTCSeconds()])}function Qv(e,t,n){let r=e.getUTCFullYear(),i=$v(e,r,t,n);if(i<1)return $v(e,r-1,t,n);let a=$v(e,r+1,t,n);return a>=1?Math.min(i,a):i}function $v(e,t,n,r){let i=iy([t,0,1+ey(t,n,r)]),a=Jv(e),o=Math.round(Vv(i,a));return Math.floor(o/7)+1}function ey(e,t,n){let r=7+t-n;return-((7+iy([e,0,r]).getUTCDay()-t)%7)+r-1}function ty(e){return[e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()]}function ny(e){return new Date(e[0],e[1]||0,e[2]==null?1:e[2],e[3]||0,e[4]||0,e[5]||0)}function ry(e){return[e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate(),e.getUTCHours(),e.getUTCMinutes(),e.getUTCSeconds(),e.getUTCMilliseconds()]}function iy(e){return e.length===1&&(e=e.concat([0])),new Date(Date.UTC(...e))}function ay(e){return!isNaN(e.valueOf())}function oy(e){return e.getUTCHours()*1e3*60*60+e.getUTCMinutes()*1e3*60+e.getUTCSeconds()*1e3+e.getUTCMilliseconds()}function sy(e,t,n=!1){let r=e.toISOString();return r=r.replace(`.000`,``),n&&(r=r.replace(`T00:00:00Z`,``)),r.length>10&&(t==null?r=r.replace(`Z`,``):t!==0&&(r=r.replace(`Z`,uy(t,!0)))),r}function cy(e){return e.toISOString().replace(/T.*$/,``)}function ly(e){return e.toISOString().match(/^\d{4}-\d{2}/)[0]}function uy(e,t=!1){let n=e<0?`-`:`+`,r=Math.abs(e),i=Math.floor(r/60),a=Math.round(r%60);return t?`${n+bv(i,2)}:${bv(a,2)}`:`GMT${n}${i}${a?`:${bv(a,2)}`:``}`}function dy(e,t,n){let r,i;return function(...a){if(!r)i=e.apply(this,a);else if(!Fv(r,a)){n&&n(i);let r=e.apply(this,a);t&&t(r,i)||(i=r)}return r=a,i}}function fy(e,t,n){let r,i;return a=>{if(!r)i=e.call(this,a);else if(!Zy(r,a)){n&&n(i);let r=e.call(this,a);t&&t(r,i)||(i=r)}return r=a,i}}var py={week:3,separator:9,omitZeroMinute:9,meridiem:9,omitCommas:9},my={timeZoneName:7,era:6,year:5,month:4,day:2,weekday:2,hour:1,minute:1,second:1},hy=/\s*([ap])\.?m\.?/i,gy=/,/g,_y=/\s+/g,vy=/\u200e/g,yy=/UTC|GMT/,by=class{constructor(e){let t={},n={},r=9;for(let i in e)i in py?(n[i]=e[i],py[i]<9&&(r=Math.min(py[i],r))):(t[i]=e[i],i in my&&(r=Math.min(my[i],r)));this.standardDateProps=t,this.extendedSettings=n,this.smallestUnitNum=r,this.buildFormattingFunc=dy(xy)}format(e,t){return this.buildFormattingFunc(this.standardDateProps,this.extendedSettings,t)(e)}formatRange(e,t,n,r){let{standardDateProps:i,extendedSettings:a}=this,o=Dy(e.marker,t.marker,n.calendarSystem);if(!o)return this.format(e,n);let s=o;s>1&&(i.year===`numeric`||i.year===`2-digit`)&&(i.month===`numeric`||i.month===`2-digit`)&&(i.day===`numeric`||i.day===`2-digit`)&&(s=1);let c=this.format(e,n),l=this.format(t,n);if(c===l)return c;let u=xy(Oy(i,s),a,n),d=u(e),f=u(t),p=ky(c,d,l,f),m=a.separator||r||n.defaultSeparator||``;return p?p.before+d+m+f+p.after:c+m+l}getSmallestUnit(){switch(this.smallestUnitNum){case 7:case 6:case 5:return`year`;case 4:return`month`;case 3:return`week`;case 2:return`day`;default:return`time`}}};function xy(e,t,n){let r=Object.keys(e).length;return r===1&&e.timeZoneName===`short`?e=>uy(e.timeZoneOffset):r===0&&t.week?e=>Ey(n.computeWeekNumber(e.marker),n.weekText,n.weekTextLong,n.locale,t.week):Sy(e,t,n)}function Sy(e,t,n){e=Object.assign({},e),t=Object.assign({},t),Cy(e,t),e.timeZone=`UTC`;let r=new Intl.DateTimeFormat(n.locale.codes,e),i;if(t.omitZeroMinute){let t=Object.assign({},e);delete t.minute,i=new Intl.DateTimeFormat(n.locale.codes,t)}return a=>{let{marker:o}=a,s;return s=i&&!o.getUTCMinutes()?i:r,wy(s.format(o),a,e,t,n)}}function Cy(e,t){e.timeZoneName&&(e.hour||=`2-digit`,e.minute||=`2-digit`),e.timeZoneName===`long`&&(e.timeZoneName=`short`),t.omitZeroMinute&&(e.second||e.millisecond)&&delete t.omitZeroMinute}function wy(e,t,n,r,i){return e=e.replace(vy,``),n.timeZoneName===`short`&&(e=Ty(e,i.timeZone===`UTC`||t.timeZoneOffset==null?`UTC`:uy(t.timeZoneOffset))),r.omitCommas&&(e=e.replace(gy,``).trim()),r.omitZeroMinute&&(e=e.replace(`:00`,``)),r.meridiem===!1?e=e.replace(hy,``).trim():r.meridiem===`narrow`?e=e.replace(hy,(e,t)=>t.toLocaleLowerCase()):r.meridiem===`short`?e=e.replace(hy,(e,t)=>`${t.toLocaleLowerCase()}m`):r.meridiem===`lowercase`&&(e=e.replace(hy,e=>e.toLocaleLowerCase())),e=e.replace(_y,` `),e=e.trim(),e}function Ty(e,t){let n=!1;return e=e.replace(yy,()=>(n=!0,t)),n||(e+=` ${t}`),e}function Ey(e,t,n,r,i){let a=[];return i===`long`?a.push(n):(i===`short`||i===`narrow`)&&a.push(t),(i===`long`||i===`short`)&&a.push(` `),a.push(r.simpleNumberFormat.format(e)),r.options.direction===`rtl`&&a.reverse(),a.join(``)}function Dy(e,t,n){return n.getMarkerYear(e)===n.getMarkerYear(t)?n.getMarkerMonth(e)===n.getMarkerMonth(t)?n.getMarkerDay(e)===n.getMarkerDay(t)?oy(e)===oy(t)?0:1:2:4:5}function Oy(e,t){let n={};for(let r in e)(!(r in my)||my[r]<=t)&&(n[r]=e[r]);return n}function ky(e,t,n,r){let i=0;for(;i<e.length;){let a=e.indexOf(t,i);if(a===-1)break;let o=e.substr(0,a);i=a+t.length;let s=e.substr(i),c=0;for(;c<n.length;){let e=n.indexOf(r,c);if(e===-1)break;let t=n.substr(0,e);c=e+r.length;let i=n.substr(c);if(o===t&&s===i)return{before:o,after:s}}}return null}function Ay(e,t){let n=t.markerToArray(e.marker);return{marker:e.marker,timeZoneOffset:e.timeZoneOffset,array:n,year:n[0],month:n[1],day:n[2],hour:n[3],minute:n[4],second:n[5],millisecond:n[6]}}function jy(e,t,n,r){let i=Ay(e,n.calendarSystem);return{date:i,start:i,end:t?Ay(t,n.calendarSystem):null,timeZone:n.timeZone,localeCodes:n.locale.codes,defaultSeparator:r||n.defaultSeparator}}var My=class{constructor(e){this.cmdStr=e}format(e,t,n){return t.cmdFormatter(this.cmdStr,jy(e,null,t,n))}formatRange(e,t,n,r){return n.cmdFormatter(this.cmdStr,jy(e,t,n,r))}},Ny=class{constructor(e){this.func=e}format(e,t,n){return this.func(jy(e,null,t,n))}formatRange(e,t,n,r){return this.func(jy(e,t,n,r))}};function Py(e){return typeof e==`object`&&e?new by(e):typeof e==`string`?new My(e):typeof e==`function`?new Ny(e):null}var Fy={navLinkDayClick:Y,navLinkWeekClick:Y,duration:Tv,bootstrapFontAwesome:Y,buttonIcons:Y,customButtons:Y,defaultAllDayEventDuration:Tv,defaultTimedEventDuration:Tv,nextDayThreshold:Tv,scrollTime:Tv,scrollTimeReset:Boolean,slotMinTime:Tv,slotMaxTime:Tv,dayPopoverFormat:Py,slotDuration:Tv,snapDuration:Tv,headerToolbar:Y,footerToolbar:Y,defaultRangeSeparator:String,titleRangeSeparator:String,forceEventDuration:Boolean,dayHeaders:Boolean,dayHeaderFormat:Py,dayHeaderClassNames:Y,dayHeaderContent:Y,dayHeaderDidMount:Y,dayHeaderWillUnmount:Y,dayCellClassNames:Y,dayCellContent:Y,dayCellDidMount:Y,dayCellWillUnmount:Y,initialView:String,aspectRatio:Number,weekends:Boolean,weekNumberCalculation:Y,weekNumbers:Boolean,weekNumberClassNames:Y,weekNumberContent:Y,weekNumberDidMount:Y,weekNumberWillUnmount:Y,editable:Boolean,viewClassNames:Y,viewDidMount:Y,viewWillUnmount:Y,nowIndicator:Boolean,nowIndicatorSnap:Y,nowIndicatorClassNames:Y,nowIndicatorContent:Y,nowIndicatorDidMount:Y,nowIndicatorWillUnmount:Y,showNonCurrentDates:Boolean,lazyFetching:Boolean,startParam:String,endParam:String,timeZoneParam:String,timeZone:String,locales:Y,locale:Y,themeSystem:String,dragRevertDuration:Number,dragScroll:Boolean,allDayMaintainDuration:Boolean,unselectAuto:Boolean,dropAccept:Y,eventOrder:gv,eventOrderStrict:Boolean,handleWindowResize:Boolean,windowResizeDelay:Number,longPressDelay:Number,eventDragMinDistance:Number,expandRows:Boolean,height:Y,contentHeight:Y,direction:String,weekNumberFormat:Py,eventResizableFromStart:Boolean,displayEventTime:Boolean,displayEventEnd:Boolean,weekText:String,weekTextLong:String,progressiveEventRendering:Boolean,businessHours:Y,initialDate:Y,now:Y,eventDataTransform:Y,stickyHeaderDates:Y,stickyFooterScrollbar:Y,viewHeight:Y,defaultAllDay:Boolean,eventSourceFailure:Y,eventSourceSuccess:Y,eventDisplay:String,eventStartEditable:Boolean,eventDurationEditable:Boolean,eventOverlap:Y,eventConstraint:Y,eventAllow:Y,eventBackgroundColor:String,eventBorderColor:String,eventTextColor:String,eventColor:String,eventClassNames:Y,eventContent:Y,eventDidMount:Y,eventWillUnmount:Y,selectConstraint:Y,selectOverlap:Y,selectAllow:Y,droppable:Boolean,unselectCancel:String,slotLabelFormat:Y,slotLaneClassNames:Y,slotLaneContent:Y,slotLaneDidMount:Y,slotLaneWillUnmount:Y,slotLabelClassNames:Y,slotLabelContent:Y,slotLabelDidMount:Y,slotLabelWillUnmount:Y,dayMaxEvents:Y,dayMaxEventRows:Y,dayMinWidth:Number,slotLabelInterval:Tv,allDayText:String,allDayClassNames:Y,allDayContent:Y,allDayDidMount:Y,allDayWillUnmount:Y,slotMinWidth:Number,navLinks:Boolean,eventTimeFormat:Py,rerenderDelay:Number,moreLinkText:Y,moreLinkHint:Y,selectMinDistance:Number,selectable:Boolean,selectLongPressDelay:Number,eventLongPressDelay:Number,selectMirror:Boolean,eventMaxStack:Number,eventMinHeight:Number,eventMinWidth:Number,eventShortHeight:Number,slotEventOverlap:Boolean,plugins:Y,firstDay:Number,dayCount:Number,dateAlignment:String,dateIncrement:Tv,hiddenDays:Y,fixedWeekCount:Boolean,validRange:Y,visibleRange:Y,titleFormat:Y,eventInteractive:Boolean,noEventsText:String,viewHint:Y,navLinkHint:Y,closeHint:String,timeHint:String,eventHint:String,moreLinkClick:Y,moreLinkClassNames:Y,moreLinkContent:Y,moreLinkDidMount:Y,moreLinkWillUnmount:Y,monthStartFormat:Py,handleCustomRendering:Y,customRenderingMetaMap:Y,customRenderingReplaces:Boolean},Iy={eventDisplay:`auto`,defaultRangeSeparator:` - `,titleRangeSeparator:` – `,defaultTimedEventDuration:`01:00:00`,defaultAllDayEventDuration:{day:1},forceEventDuration:!1,nextDayThreshold:`00:00:00`,dayHeaders:!0,initialView:``,aspectRatio:1.35,headerToolbar:{start:`title`,center:``,end:`today prev,next`},weekends:!0,weekNumbers:!1,weekNumberCalculation:`local`,editable:!1,nowIndicator:!1,scrollTime:`06:00:00`,scrollTimeReset:!0,slotMinTime:`00:00:00`,slotMaxTime:`24:00:00`,showNonCurrentDates:!0,lazyFetching:!0,startParam:`start`,endParam:`end`,timeZoneParam:`timeZone`,timeZone:`local`,locales:[],locale:``,themeSystem:`standard`,dragRevertDuration:500,dragScroll:!0,allDayMaintainDuration:!1,unselectAuto:!0,dropAccept:`*`,eventOrder:`start,-duration,allDay,title`,dayPopoverFormat:{month:`long`,day:`numeric`,year:`numeric`},handleWindowResize:!0,windowResizeDelay:100,longPressDelay:1e3,eventDragMinDistance:5,expandRows:!1,navLinks:!1,selectable:!1,eventMinHeight:15,eventMinWidth:30,eventShortHeight:30,monthStartFormat:{month:`long`,day:`numeric`},nowIndicatorSnap:`auto`},Ly={datesSet:Y,eventsSet:Y,eventAdd:Y,eventChange:Y,eventRemove:Y,windowResize:Y,eventClick:Y,eventMouseEnter:Y,eventMouseLeave:Y,select:Y,unselect:Y,loading:Y,_unmount:Y,_beforeprint:Y,_afterprint:Y,_noEventDrop:Y,_noEventResize:Y,_resize:Y,_scrollRequest:Y},Ry={buttonText:Y,buttonHints:Y,views:Y,plugins:Y,initialEvents:Y,events:Y,eventSources:Y},zy={headerToolbar:By,footerToolbar:By,buttonText:By,buttonHints:By,buttonIcons:By,dateIncrement:By,plugins:Vy,events:Vy,eventSources:Vy,resources:Vy};function By(e,t){return typeof e==`object`&&typeof t==`object`&&e&&t?Zy(e,t):e===t}function Vy(e,t){return Array.isArray(e)&&Array.isArray(t)?Fv(e,t):e===t}var Hy={type:String,component:Y,buttonText:String,buttonTextKey:String,dateProfileGeneratorClass:Y,usesMinMaxTime:Boolean,classNames:Y,content:Y,didMount:Y,willUnmount:Y};function Uy(e){return Ky(e,zy)}function Wy(e,t){let n={},r={};for(let r in t)r in e&&(n[r]=t[r](e[r]));for(let n in e)n in t||(r[n]=e[n]);return{refined:n,extra:r}}function Y(e){return e}var{hasOwnProperty:Gy}=Object.prototype;function Ky(e,t){let n={};if(t){for(let r in t)if(t[r]===By){let t=[];for(let i=e.length-1;i>=0;--i){let a=e[i][r];if(typeof a==`object`&&a)t.unshift(a);else if(a!==void 0){n[r]=a;break}}t.length&&(n[r]=Ky(t))}}for(let t=e.length-1;t>=0;--t){let r=e[t];for(let e in r)e in n||(n[e]=r[e])}return n}function qy(e,t){let n={};for(let r in e)t(e[r],r)&&(n[r]=e[r]);return n}function Jy(e,t){let n={};for(let r in e)n[r]=t(e[r],r);return n}function Yy(e){let t={};for(let n of e)t[n]=!0;return t}function Xy(e){let t=[];for(let n in e)t.push(e[n]);return t}function Zy(e,t){if(e===t)return!0;for(let n in e)if(Gy.call(e,n)&&!(n in t))return!1;for(let n in t)if(Gy.call(t,n)&&e[n]!==t[n])return!1;return!0}var Qy=/^on[A-Z]/;function $y(e,t){let n=eb(e,t);for(let e of n)if(!Qy.test(e))return!1;return!0}function eb(e,t){let n=[];for(let r in e)Gy.call(e,r)&&(r in t||n.push(r));for(let r in t)Gy.call(t,r)&&e[r]!==t[r]&&n.push(r);return n}function tb(e,t,n={}){if(e===t)return!0;for(let r in t)if(!(r in e&&nb(e[r],t[r],n[r])))return!1;for(let n in e)if(!(n in t))return!1;return!0}function nb(e,t,n){return e===t||n===!0?!0:n?n(e,t):!1}function rb(e,t=0,n,r=1){let i=[];n??=Object.keys(e).length;for(let a=t;a<n;a+=r){let t=e[a];t!==void 0&&i.push(t)}return i}var ib={};function ab(e,t){ib[e]=t}function ob(e){return new ib[e]}ab(`gregory`,class{getMarkerYear(e){return e.getUTCFullYear()}getMarkerMonth(e){return e.getUTCMonth()}getMarkerDay(e){return e.getUTCDate()}arrayToMarker(e){return iy(e)}markerToArray(e){return ry(e)}});var sb=/^\s*(\d{4})(-?(\d{2})(-?(\d{2})([T ](\d{2}):?(\d{2})(:?(\d{2})(\.(\d+))?)?(Z|(([-+])(\d{2})(:?(\d{2}))?))?)?)?)?$/;function cb(e){let t=sb.exec(e);if(t){let e=new Date(Date.UTC(Number(t[1]),t[3]?Number(t[3])-1:0,Number(t[5]||1),Number(t[7]||0),Number(t[8]||0),Number(t[10]||0),t[12]?Number(`0.${t[12]}`)*1e3:0));if(ay(e)){let n=null;return t[13]&&(n=(t[15]===`-`?-1:1)*(Number(t[16]||0)*60+Number(t[18]||0))),{marker:e,isTimeUnspecified:!t[6],timeZoneOffset:n}}}return null}var lb=class{constructor(e){let t=this.timeZone=e.timeZone,n=t!==`local`&&t!==`UTC`;e.namedTimeZoneImpl&&n&&(this.namedTimeZoneImpl=new e.namedTimeZoneImpl(t)),this.canComputeOffset=!(n&&!this.namedTimeZoneImpl),this.calendarSystem=ob(e.calendarSystem),this.locale=e.locale,this.weekDow=e.locale.week.dow,this.weekDoy=e.locale.week.doy,e.weekNumberCalculation===`ISO`&&(this.weekDow=1,this.weekDoy=4),typeof e.firstDay==`number`&&(this.weekDow=e.firstDay),typeof e.weekNumberCalculation==`function`&&(this.weekNumberFunc=e.weekNumberCalculation),this.weekText=e.weekText==null?e.locale.options.weekText:e.weekText,this.weekTextLong=(e.weekTextLong==null?e.locale.options.weekTextLong:e.weekTextLong)||this.weekText,this.cmdFormatter=e.cmdFormatter,this.defaultSeparator=e.defaultSeparator}createMarker(e){let t=this.createMarkerMeta(e);return t===null?null:t.marker}createNowMarker(){return this.canComputeOffset?this.timestampToMarker(new Date().valueOf()):iy(ty(new Date))}createMarkerMeta(e){if(typeof e==`string`)return this.parse(e);let t=null;return typeof e==`number`?t=this.timestampToMarker(e):e instanceof Date?(e=e.valueOf(),isNaN(e)||(t=this.timestampToMarker(e))):Array.isArray(e)&&(t=iy(e)),t===null||!ay(t)?null:{marker:t,isTimeUnspecified:!1,forcedTzo:null}}parse(e){let t=cb(e);if(t===null)return null;let{marker:n}=t,r=null;return t.timeZoneOffset!==null&&(this.canComputeOffset?n=this.timestampToMarker(n.valueOf()-t.timeZoneOffset*60*1e3):r=t.timeZoneOffset),{marker:n,isTimeUnspecified:t.isTimeUnspecified,forcedTzo:r}}getYear(e){return this.calendarSystem.getMarkerYear(e)}getMonth(e){return this.calendarSystem.getMarkerMonth(e)}getDay(e){return this.calendarSystem.getMarkerDay(e)}add(e,t){let n=this.calendarSystem.markerToArray(e);return n[0]+=t.years,n[1]+=t.months,n[2]+=t.days,n[6]+=t.milliseconds,this.calendarSystem.arrayToMarker(n)}subtract(e,t){let n=this.calendarSystem.markerToArray(e);return n[0]-=t.years,n[1]-=t.months,n[2]-=t.days,n[6]-=t.milliseconds,this.calendarSystem.arrayToMarker(n)}addYears(e,t){let n=this.calendarSystem.markerToArray(e);return n[0]+=t,this.calendarSystem.arrayToMarker(n)}addMonths(e,t){let n=this.calendarSystem.markerToArray(e);return n[1]+=t,this.calendarSystem.arrayToMarker(n)}diffWholeYears(e,t){let{calendarSystem:n}=this;return oy(e)===oy(t)&&n.getMarkerDay(e)===n.getMarkerDay(t)&&n.getMarkerMonth(e)===n.getMarkerMonth(t)?n.getMarkerYear(t)-n.getMarkerYear(e):null}diffWholeMonths(e,t){let{calendarSystem:n}=this;return oy(e)===oy(t)&&n.getMarkerDay(e)===n.getMarkerDay(t)?n.getMarkerMonth(t)-n.getMarkerMonth(e)+(n.getMarkerYear(t)-n.getMarkerYear(e))*12:null}greatestWholeUnit(e,t){let n=this.diffWholeYears(e,t);return n===null?(n=this.diffWholeMonths(e,t),n===null?(n=Kv(e,t),n===null?(n=qv(e,t),n===null?(n=Hv(e,t),Sv(n)?{unit:`hour`,value:n}:(n=Uv(e,t),Sv(n)?{unit:`minute`,value:n}:(n=Wv(e,t),Sv(n)?{unit:`second`,value:n}:{unit:`millisecond`,value:t.valueOf()-e.valueOf()}))):{unit:`day`,value:n}):{unit:`week`,value:n}):{unit:`month`,value:n}):{unit:`year`,value:n}}countDurationsBetween(e,t,n){let r;return n.years&&(r=this.diffWholeYears(e,t),r!==null)?r/Av(n):n.months&&(r=this.diffWholeMonths(e,t),r!==null)?r/jv(n):n.days&&(r=qv(e,t),r!==null)?r/Mv(n):(t.valueOf()-e.valueOf())/Nv(n)}startOf(e,t){return t===`year`?this.startOfYear(e):t===`month`?this.startOfMonth(e):t===`week`?this.startOfWeek(e):t===`day`?Jv(e):t===`hour`?Yv(e):t===`minute`?Xv(e):t===`second`?Zv(e):null}startOfYear(e){return this.calendarSystem.arrayToMarker([this.calendarSystem.getMarkerYear(e)])}startOfMonth(e){return this.calendarSystem.arrayToMarker([this.calendarSystem.getMarkerYear(e),this.calendarSystem.getMarkerMonth(e)])}startOfWeek(e){return this.calendarSystem.arrayToMarker([this.calendarSystem.getMarkerYear(e),this.calendarSystem.getMarkerMonth(e),e.getUTCDate()-(e.getUTCDay()-this.weekDow+7)%7])}computeWeekNumber(e){return this.weekNumberFunc?this.weekNumberFunc(this.toDate(e)):Qv(e,this.weekDow,this.weekDoy)}format(e,t,n={}){return t.format({marker:e,timeZoneOffset:n.forcedTzo==null?this.offsetForMarker(e):n.forcedTzo},this)}formatRange(e,t,n,r={}){return r.isEndExclusive&&(t=zv(t,-1)),n.formatRange({marker:e,timeZoneOffset:r.forcedStartTzo==null?this.offsetForMarker(e):r.forcedStartTzo},{marker:t,timeZoneOffset:r.forcedEndTzo==null?this.offsetForMarker(t):r.forcedEndTzo},this,r.defaultSeparator)}formatIso(e,t={}){let n=null;return t.omitTimeZoneOffset||(n=t.forcedTzo==null?this.offsetForMarker(e):t.forcedTzo),sy(e,n,t.omitTime)}timestampToMarker(e){return this.timeZone===`local`?iy(ty(new Date(e))):this.timeZone===`UTC`||!this.namedTimeZoneImpl?new Date(e):iy(this.namedTimeZoneImpl.timestampToArray(e))}offsetForMarker(e){return this.timeZone===`local`?-ny(ry(e)).getTimezoneOffset():this.timeZone===`UTC`?0:this.namedTimeZoneImpl?this.namedTimeZoneImpl.offsetForArray(ry(e)):null}toDate(e,t){return this.timeZone===`local`?ny(ry(e)):this.timeZone===`UTC`?new Date(e.valueOf()):this.namedTimeZoneImpl?new Date(e.valueOf()-this.namedTimeZoneImpl.offsetForArray(ry(e))*1e3*60):new Date(e.valueOf()-(t||0))}},ub=class{constructor(e){this.iconOverrideOption&&this.setIconOverride(e[this.iconOverrideOption])}setIconOverride(e){let t,n;if(typeof e==`object`&&e){for(n in t=Object.assign({},this.iconClasses),e)t[n]=this.applyIconOverridePrefix(e[n]);this.iconClasses=t}else e===!1&&(this.iconClasses={})}applyIconOverridePrefix(e){let t=this.iconOverridePrefix;return t&&e.indexOf(t)!==0&&(e=t+e),e}getClass(e){return this.classes[e]||``}getIconClass(e,t){let n;return n=t&&this.rtlIconClasses&&this.rtlIconClasses[e]||this.iconClasses[e],n?`${this.baseIconClass} ${n}`:``}getCustomButtonIconClass(e){let t;return this.iconOverrideCustomButtonOption&&(t=e[this.iconOverrideCustomButtonOption],t)?`${this.baseIconClass} ${this.applyIconOverridePrefix(t)}`:``}};ub.prototype.classes={},ub.prototype.iconClasses={},ub.prototype.baseIconClass=``,ub.prototype.iconOverridePrefix=``;function db(e){e();let t=q.debounceRendering,n=[];function r(e){n.push(e)}for(q.debounceRendering=r,$g(J(fb,{}),document.createElement(`div`));n.length;)n.shift()();q.debounceRendering=t}var fb=class extends Ig{render(){return J(`div`,{})}componentDidMount(){this.setState({})}};function pb(e){let t=e_(e),n=t.Provider;return t.Provider=function(){let e=!this.getChildContext,t=n.apply(this,arguments);if(e){let e=[];this.shouldComponentUpdate=t=>{this.props.value!==t.value&&e.forEach(e=>{e.context=t.value,e.forceUpdate()})},this.sub=t=>{e.push(t);let n=t.componentWillUnmount;t.componentWillUnmount=()=>{e.splice(e.indexOf(t),1),n&&n.call(t)}}}return t},t}var mb=class{constructor(e,t,n,r){this.execFunc=e,this.emitter=t,this.scrollTime=n,this.scrollTimeReset=r,this.handleScrollRequest=e=>{this.queuedRequest=Object.assign({},this.queuedRequest||{},e),this.drain()},t.on(`_scrollRequest`,this.handleScrollRequest),this.fireInitialScroll()}detach(){this.emitter.off(`_scrollRequest`,this.handleScrollRequest)}update(e){e&&this.scrollTimeReset?this.fireInitialScroll():this.drain()}fireInitialScroll(){this.handleScrollRequest({time:this.scrollTime})}drain(){this.queuedRequest&&this.execFunc(this.queuedRequest)&&(this.queuedRequest=null)}},hb=pb({});function gb(e,t,n,r,i,a,o,s,c,l,u,d,f,p){return{dateEnv:i,nowManager:a,options:n,pluginHooks:s,emitter:u,dispatch:c,getCurrentData:l,calendarApi:d,viewSpec:e,viewApi:t,dateProfileGenerator:r,theme:o,isRtl:n.direction===`rtl`,addResizeHandler(e){u.on(`_resize`,e)},removeResizeHandler(e){u.off(`_resize`,e)},createScrollResponder(e){return new mb(e,u,Tv(n.scrollTime),n.scrollTimeReset)},registerInteractiveComponent:f,unregisterInteractiveComponent:p}}var _b=class extends Ig{shouldComponentUpdate(e,t){return!tb(this.props,e,this.propEquality)||!tb(this.state,t,this.stateEquality)}safeSetState(e){tb(this.state,Object.assign(Object.assign({},this.state),e),this.stateEquality)||this.setState(e)}};_b.addPropsEquality=yb,_b.addStateEquality=bb,_b.contextType=hb,_b.prototype.propEquality={},_b.prototype.stateEquality={};var vb=class extends _b{};vb.contextType=hb;function yb(e){let t=Object.create(this.prototype.propEquality);Object.assign(t,e),this.prototype.propEquality=t}function bb(e){let t=Object.create(this.prototype.stateEquality);Object.assign(t,e),this.prototype.stateEquality=t}function xb(e,t){typeof e==`function`?e(t):e&&(e.current=t)}var Sb=class extends vb{constructor(){super(...arguments),this.id=hv(),this.queuedDomNodes=[],this.currentDomNodes=[],this.handleEl=e=>{let{options:t}=this.context,{generatorName:n}=this.props;t.customRenderingReplaces&&Cb(n,t)||this.updateElRef(e)},this.updateElRef=e=>{this.props.elRef&&xb(this.props.elRef,e)}}render(){let{props:e,context:t}=this,{options:n}=t,{customGenerator:r,defaultGenerator:i,renderProps:a}=e,o=wb(e,[],this.handleEl),s=!1,c,l=[],u;if(r!=null){let e=typeof r==`function`?r(a,J):r;if(e===!0)s=!0;else{let t=e&&typeof e==`object`;t&&`html`in e?o.dangerouslySetInnerHTML={__html:e.html}:t&&`domNodes`in e?l=Array.prototype.slice.call(e.domNodes):(t?_g(e):typeof e!=`function`)?c=e:u=e}}else s=!Cb(e.generatorName,n);return s&&i&&(c=i(a)),this.queuedDomNodes=l,this.currentGeneratorMeta=u,J(e.elTag,o,c)}componentDidMount(){this.applyQueueudDomNodes(),this.triggerCustomRendering(!0)}componentDidUpdate(){this.applyQueueudDomNodes(),this.triggerCustomRendering(!0)}componentWillUnmount(){this.triggerCustomRendering(!1)}triggerCustomRendering(e){let{props:t,context:n}=this,{handleCustomRendering:r,customRenderingMetaMap:i}=n.options;if(r){let n=this.currentGeneratorMeta??i?.[t.generatorName];n&&r(Object.assign(Object.assign({id:this.id,isActive:e,containerEl:this.base,reportNewContainerEl:this.updateElRef,generatorMeta:n},t),{elClasses:(t.elClasses||[]).filter(Tb)}))}}applyQueueudDomNodes(){let{queuedDomNodes:e,currentDomNodes:t}=this,n=this.base;if(!Fv(e,t)){t.forEach($_);for(let t of e)n.appendChild(t);this.currentDomNodes=e}}};Sb.addPropsEquality({elClasses:Fv,elStyle:Zy,elAttrs:$y,renderProps:Zy});function Cb(e,t){return!!(t.handleCustomRendering&&e&&t.customRenderingMetaMap?.[e])}function wb(e,t,n){let r=Object.assign(Object.assign({},e.elAttrs),{ref:n});return(e.elClasses||t)&&(r.className=(e.elClasses||[]).concat(t||[]).concat(r.className||[]).filter(Boolean).join(` `)),e.elStyle&&(r.style=e.elStyle),r}function Tb(e){return!!e}var Eb=pb(0),Db=class extends Ig{constructor(){super(...arguments),this.InnerContent=Ob.bind(void 0,this),this.handleEl=e=>{this.el=e,this.props.elRef&&(xb(this.props.elRef,e),e&&this.didMountMisfire&&this.componentDidMount())}}render(){let{props:e}=this,t=kb(e.classNameGenerator,e.renderProps);if(e.children){let n=wb(e,t,this.handleEl),r=e.children(this.InnerContent,e.renderProps,n);return e.elTag?J(e.elTag,n,r):r}return J(Sb,Object.assign(Object.assign({},e),{elRef:this.handleEl,elTag:e.elTag||`div`,elClasses:(e.elClasses||[]).concat(t),renderId:this.context}))}componentDidMount(){var e,t;this.el?(t=(e=this.props).didMount)==null||t.call(e,Object.assign(Object.assign({},this.props.renderProps),{el:this.el})):this.didMountMisfire=!0}componentWillUnmount(){var e,t;(t=(e=this.props).willUnmount)==null||t.call(e,Object.assign(Object.assign({},this.props.renderProps),{el:this.el}))}};Db.contextType=Eb;function Ob(e,t){let n=e.props;return J(Sb,Object.assign({renderProps:n.renderProps,generatorName:n.generatorName,customGenerator:n.customGenerator,defaultGenerator:n.defaultGenerator,renderId:e.context},t))}function kb(e,t){let n=typeof e==`function`?e(t):e||[];return typeof n==`string`?[n]:n}var Ab=class extends vb{render(){let{props:e,context:t}=this,{options:n}=t,r={view:t.viewApi};return J(Db,{elRef:e.elRef,elTag:e.elTag||`div`,elAttrs:e.elAttrs,elClasses:[...jb(e.viewSpec),...e.elClasses||[]],elStyle:e.elStyle,renderProps:r,classNameGenerator:n.viewClassNames,generatorName:void 0,didMount:n.viewDidMount,willUnmount:n.viewWillUnmount},()=>e.children)}};function jb(e){return[`fc-${e.type}-view`,`fc-view`]}function Mb(e,t){let n=null,r=null;return e.start&&(n=t.createMarker(e.start)),e.end&&(r=t.createMarker(e.end)),!n&&!r||n&&r&&r<n?null:{start:n,end:r}}function Nb(e,t){let n=[],{start:r}=t,i,a;for(e.sort(Pb),i=0;i<e.length;i+=1)a=e[i],a.start>r&&n.push({start:r,end:a.start}),a.end>r&&(r=a.end);return r<t.end&&n.push({start:r,end:t.end}),n}function Pb(e,t){return e.start.valueOf()-t.start.valueOf()}function Fb(e,t){let{start:n,end:r}=e,i=null;return t.start!==null&&(n=n===null?t.start:new Date(Math.max(n.valueOf(),t.start.valueOf()))),t.end!=null&&(r=r===null?t.end:new Date(Math.min(r.valueOf(),t.end.valueOf()))),(n===null||r===null||n<r)&&(i={start:n,end:r}),i}function Ib(e,t){return(e.end===null||t.start===null||e.end>t.start)&&(e.start===null||t.end===null||e.start<t.end)}function Lb(e,t){return(e.start===null||t>=e.start)&&(e.end===null||t<e.end)}function Rb(e,t){return t.start!=null&&e<t.start?t.start:t.end!=null&&e>=t.end?new Date(t.end.valueOf()-1):e}function zb(e){let t=Math.floor(Vv(e.start,e.end))||1,n=Jv(e.start);return{start:n,end:Rv(n,t)}}function Bb(e,t=Tv(0)){let n=null,r=null;if(e.end){r=Jv(e.end);let n=e.end.valueOf()-r.valueOf();n&&n>=Nv(t)&&(r=Rv(r,1))}return e.start&&(n=Jv(e.start),r&&r<=n&&(r=Rv(n,1))),{start:n,end:r}}function Vb(e,t,n,r){return r===`year`?Tv(n.diffWholeYears(e,t),`year`):r===`month`?Tv(n.diffWholeMonths(e,t),`month`):Gv(e,t)}var Hb=class{constructor(e){this.props=e,this.initHiddenDays()}buildPrev(e,t,n){let{dateEnv:r}=this.props,i=r.subtract(r.startOf(t,e.currentRangeUnit),e.dateIncrement);return this.build(i,-1,n)}buildNext(e,t,n){let{dateEnv:r}=this.props,i=r.add(r.startOf(t,e.currentRangeUnit),e.dateIncrement);return this.build(i,1,n)}build(e,t,n=!0){let{props:r}=this,i,a,o,s,c,l;return i=this.buildValidRange(),i=this.trimHiddenDays(i),n&&(e=Rb(e,i)),a=this.buildCurrentRangeInfo(e,t),o=/^(year|month|week|day)$/.test(a.unit),s=this.buildRenderRange(this.trimHiddenDays(a.range),a.unit,o),s=this.trimHiddenDays(s),c=s,r.showNonCurrentDates||(c=Fb(c,a.range)),c=this.adjustActiveRange(c),c=Fb(c,i),l=Ib(a.range,i),Lb(s,e)||(e=s.start),{currentDate:e,validRange:i,currentRange:a.range,currentRangeUnit:a.unit,isRangeAllDay:o,activeRange:c,renderRange:s,slotMinTime:r.slotMinTime,slotMaxTime:r.slotMaxTime,isValid:l,dateIncrement:this.buildDateIncrement(a.duration)}}buildValidRange(){let e=this.props.validRangeInput,t=typeof e==`function`?e.call(this.props.calendarApi,this.props.dateEnv.toDate(this.props.nowManager.getDateMarker())):e;return this.refineRange(t)||{start:null,end:null}}buildCurrentRangeInfo(e,t){let{props:n}=this,r=null,i=null,a=null,o;return n.duration?(r=n.duration,i=n.durationUnit,a=this.buildRangeFromDuration(e,t,r,i)):(o=this.props.dayCount)?(i=`day`,a=this.buildRangeFromDayCount(e,t,o)):(a=this.buildCustomVisibleRange(e))?i=n.dateEnv.greatestWholeUnit(a.start,a.end).unit:(r=this.getFallbackDuration(),i=Pv(r).unit,a=this.buildRangeFromDuration(e,t,r,i)),{duration:r,unit:i,range:a}}getFallbackDuration(){return Tv({day:1})}adjustActiveRange(e){let{dateEnv:t,usesMinMaxTime:n,slotMinTime:r,slotMaxTime:i}=this.props,{start:a,end:o}=e;return n&&(Mv(r)<0&&(a=Jv(a),a=t.add(a,r)),Mv(i)>1&&(o=Jv(o),o=Rv(o,-1),o=t.add(o,i))),{start:a,end:o}}buildRangeFromDuration(e,t,n,r){let{dateEnv:i,dateAlignment:a}=this.props,o,s,c;if(!a){let{dateIncrement:e}=this.props;a=e&&Nv(e)<Nv(n)?Pv(e).unit:r}Mv(n)<=1&&this.isHiddenDay(o)&&(o=this.skipHiddenDays(o,t),o=Jv(o));function l(){o=i.startOf(e,a),s=i.add(o,n),c={start:o,end:s}}return l(),this.trimHiddenDays(c)||(e=this.skipHiddenDays(e,t),l()),c}buildRangeFromDayCount(e,t,n){let{dateEnv:r,dateAlignment:i}=this.props,a=0,o=e,s;i&&(o=r.startOf(o,i)),o=Jv(o),o=this.skipHiddenDays(o,t),s=o;do s=Rv(s,1),this.isHiddenDay(s)||(a+=1);while(a<n);return{start:o,end:s}}buildCustomVisibleRange(e){let{props:t}=this,n=t.visibleRangeInput,r=typeof n==`function`?n.call(t.calendarApi,t.dateEnv.toDate(e)):n,i=this.refineRange(r);return i&&(i.start==null||i.end==null)?null:i}buildRenderRange(e,t,n){return e}buildDateIncrement(e){let{dateIncrement:t}=this.props,n;return t||((n=this.props.dateAlignment)?Tv(1,n):e||Tv({days:1}))}refineRange(e){if(e){let t=Mb(e,this.props.dateEnv);return t&&=Bb(t),t}return null}initHiddenDays(){let e=this.props.hiddenDays||[],t=[],n=0,r;for(this.props.weekends===!1&&e.push(0,6),r=0;r<7;r+=1)(t[r]=e.indexOf(r)!==-1)||(n+=1);if(!n)throw Error(`invalid hiddenDays`);this.isHiddenDayHash=t}trimHiddenDays(e){let{start:t,end:n}=e;return t&&=this.skipHiddenDays(t),n&&=this.skipHiddenDays(n,-1,!0),t==null||n==null||t<n?{start:t,end:n}:null}isHiddenDay(e){return e instanceof Date&&(e=e.getUTCDay()),this.isHiddenDayHash[e]}skipHiddenDays(e,t=1,n=!1){for(;this.isHiddenDayHash[(e.getUTCDay()+(n?t:0)+7)%7];)e=Rv(e,t);return e}};function Ub(e,t,n,r){return{instanceId:hv(),defId:e,range:t,forcedStartTzo:n??null,forcedEndTzo:r??null}}function Wb(e,t,n,r){for(let i=0;i<r.length;i+=1){let a=r[i].parse(e,n);if(a){let{allDay:n}=e;return n??(n=t,n??(n=a.allDayGuess,n??=!1)),{allDay:n,duration:a.duration,typeData:a.typeData,typeId:i}}}return null}function Gb(e,t,n){let{dateEnv:r,pluginHooks:i,options:a}=n,{defs:o,instances:s}=e;s=qy(s,e=>!o[e.defId].recurringDef);for(let e in o){let n=o[e];if(n.recurringDef){let{duration:o}=n.recurringDef;o||=n.allDay?a.defaultAllDayEventDuration:a.defaultTimedEventDuration;let c=Kb(n,o,t,r,i.recurringTypes);for(let t of c){let n=Ub(e,{start:t,end:r.add(t,o)});s[n.instanceId]=n}}}return{defs:o,instances:s}}function Kb(e,t,n,r,i){let a=i[e.recurringDef.typeId].expand(e.recurringDef.typeData,{start:r.subtract(n.start,t),end:n.end},r);return e.allDay&&(a=a.map(Jv)),a}var qb={id:String,groupId:String,title:String,url:String,interactive:Boolean},Jb={start:Y,end:Y,date:Y,allDay:Boolean},Yb=Object.assign(Object.assign(Object.assign({},qb),Jb),{extendedProps:Y});function Xb(e,t,n,r,i=Qb(n),a,o){let{refined:s,extra:c}=Zb(e,n,i),l=tx(t,n),u=Wb(s,l,n.dateEnv,n.pluginHooks.recurringTypes);if(u){let e=$b(s,c,t?t.sourceId:``,u.allDay,!!u.duration,n,a);return e.recurringDef={typeId:u.typeId,typeData:u.typeData,duration:u.duration},{def:e,instance:null}}let d=ex(s,l,n,r);if(d){let e=$b(s,c,t?t.sourceId:``,d.allDay,d.hasEnd,n,a),r=Ub(e.defId,d.range,d.forcedStartTzo,d.forcedEndTzo);return o&&e.publicId&&o[e.publicId]&&(r.instanceId=o[e.publicId]),{def:e,instance:r}}return null}function Zb(e,t,n=Qb(t)){return Wy(e,n)}function Qb(e){return Object.assign(Object.assign(Object.assign({},fx),Yb),e.pluginHooks.eventRefiners)}function $b(e,t,n,r,i,a,o){let s={title:e.title||``,groupId:e.groupId||``,publicId:e.id||``,url:e.url||``,recurringDef:null,defId:(o&&e.id?o[e.id]:``)||hv(),sourceId:n,allDay:r,hasEnd:i,interactive:e.interactive,ui:mx(e,a),extendedProps:Object.assign(Object.assign({},e.extendedProps||{}),t)};for(let t of a.pluginHooks.eventDefMemberAdders)Object.assign(s,t(e));return Object.freeze(s.ui.classNames),Object.freeze(s.extendedProps),s}function ex(e,t,n,r){let{allDay:i}=e,a,o=null,s=!1,c,l=null,u=e.start==null?e.date:e.start;if(a=n.dateEnv.createMarkerMeta(u),a)o=a.marker;else if(!r)return null;return e.end!=null&&(c=n.dateEnv.createMarkerMeta(e.end)),i??=t??((!a||a.isTimeUnspecified)&&(!c||c.isTimeUnspecified)),i&&o&&(o=Jv(o)),c&&(l=c.marker,i&&(l=Jv(l)),o&&l<=o&&(l=null)),l?s=!0:r||(s=n.options.forceEventDuration||!1,l=n.dateEnv.add(o,i?n.options.defaultAllDayEventDuration:n.options.defaultTimedEventDuration)),{allDay:i,hasEnd:s,range:{start:o,end:l},forcedStartTzo:a?a.forcedTzo:null,forcedEndTzo:c?c.forcedTzo:null}}function tx(e,t){let n=null;return e&&(n=e.defaultAllDay),n??=t.options.defaultAllDay,n}function nx(e,t,n,r,i,a){let o=ox(),s=Qb(n);for(let c of e){let e=Xb(c,t,n,r,s,i,a);e&&rx(e,o)}return o}function rx(e,t=ox()){return t.defs[e.def.defId]=e.def,e.instance&&(t.instances[e.instance.instanceId]=e.instance),t}function ix(e,t){let n=e.instances[t];if(n){let t=e.defs[n.defId],r=cx(e,e=>ax(t,e));return r.defs[t.defId]=t,r.instances[n.instanceId]=n,r}return ox()}function ax(e,t){return!!(e.groupId&&e.groupId===t.groupId)}function ox(){return{defs:{},instances:{}}}function sx(e,t){return{defs:Object.assign(Object.assign({},e.defs),t.defs),instances:Object.assign(Object.assign({},e.instances),t.instances)}}function cx(e,t){let n=qy(e.defs,t);return{defs:n,instances:qy(e.instances,e=>n[e.defId])}}function lx(e,t){let{defs:n,instances:r}=e,i={},a={};for(let e in n)t.defs[e]||(i[e]=n[e]);for(let e in r)!t.instances[e]&&i[r[e].defId]&&(a[e]=r[e]);return{defs:i,instances:a}}function ux(e,t){return Array.isArray(e)?nx(e,null,t,!0):typeof e==`object`&&e?nx([e],null,t,!0):e==null?null:String(e)}function dx(e){return Array.isArray(e)?e:typeof e==`string`?e.split(/\s+/):[]}var fx={display:String,editable:Boolean,startEditable:Boolean,durationEditable:Boolean,constraint:Y,overlap:Y,allow:Y,className:dx,classNames:dx,color:String,backgroundColor:String,borderColor:String,textColor:String},px={display:null,startEditable:null,durationEditable:null,constraints:[],overlap:null,allows:[],backgroundColor:``,borderColor:``,textColor:``,classNames:[]};function mx(e,t){let n=ux(e.constraint,t);return{display:e.display||null,startEditable:e.startEditable==null?e.editable:e.startEditable,durationEditable:e.durationEditable==null?e.editable:e.durationEditable,constraints:n==null?[]:[n],overlap:e.overlap==null?null:e.overlap,allows:e.allow==null?[]:[e.allow],backgroundColor:e.backgroundColor||e.color||``,borderColor:e.borderColor||e.color||``,textColor:e.textColor||``,classNames:(e.className||[]).concat(e.classNames||[])}}function hx(e){return e.reduce(gx,px)}function gx(e,t){return{display:t.display==null?e.display:t.display,startEditable:t.startEditable==null?e.startEditable:t.startEditable,durationEditable:t.durationEditable==null?e.durationEditable:t.durationEditable,constraints:e.constraints.concat(t.constraints),overlap:typeof t.overlap==`boolean`?t.overlap:e.overlap,allows:e.allows.concat(t.allows),backgroundColor:t.backgroundColor||e.backgroundColor,borderColor:t.borderColor||e.borderColor,textColor:t.textColor||e.textColor,classNames:e.classNames.concat(t.classNames)}}var _x={id:String,defaultAllDay:Boolean,url:String,format:String,events:Y,eventDataTransform:Y,success:Y,failure:Y};function vx(e,t,n=yx(t)){let r;if(typeof e==`string`?r={url:e}:typeof e==`function`||Array.isArray(e)?r={events:e}:typeof e==`object`&&e&&(r=e),r){let{refined:i,extra:a}=Wy(r,n),o=bx(i,t);if(o)return{_raw:e,isFetching:!1,latestFetchId:``,fetchRange:null,defaultAllDay:i.defaultAllDay,eventDataTransform:i.eventDataTransform,success:i.success,failure:i.failure,publicId:i.id||``,sourceId:hv(),sourceDefId:o.sourceDefId,meta:o.meta,ui:mx(i,t),extendedProps:a}}return null}function yx(e){return Object.assign(Object.assign(Object.assign({},fx),_x),e.pluginHooks.eventSourceRefiners)}function bx(e,t){let n=t.pluginHooks.eventSourceDefs;for(let t=n.length-1;t>=0;--t){let r=n[t].parseMeta(e);if(r)return{sourceDefId:t,meta:r}}return null}function xx(e,t,n,r,i){switch(t.type){case`RECEIVE_EVENTS`:return Sx(e,n[t.sourceId],t.fetchId,t.fetchRange,t.rawEvents,i);case`RESET_RAW_EVENTS`:return Cx(e,n[t.sourceId],t.rawEvents,r.activeRange,i);case`ADD_EVENTS`:return Ex(e,t.eventStore,r?r.activeRange:null,i);case`RESET_EVENTS`:return t.eventStore;case`MERGE_EVENTS`:return sx(e,t.eventStore);case`PREV`:case`NEXT`:case`CHANGE_DATE`:case`CHANGE_VIEW_TYPE`:return r?Gb(e,r.activeRange,i):e;case`REMOVE_EVENTS`:return lx(e,t.eventStore);case`REMOVE_EVENT_SOURCE`:return Ox(e,t.sourceId);case`REMOVE_ALL_EVENT_SOURCES`:return cx(e,e=>!e.sourceId);case`REMOVE_ALL_EVENTS`:return ox();default:return e}}function Sx(e,t,n,r,i,a){if(t&&n===t.latestFetchId){let n=nx(wx(i,t,a),t,a);return r&&(n=Gb(n,r,a)),sx(Ox(e,t.sourceId),n)}return e}function Cx(e,t,n,r,i){let{defIdMap:a,instanceIdMap:o}=kx(e);return Gb(nx(wx(n,t,i),t,i,!1,a,o),r,i)}function wx(e,t,n){let r=n.options.eventDataTransform,i=t?t.eventDataTransform:null;return i&&(e=Tx(e,i)),r&&(e=Tx(e,r)),e}function Tx(e,t){let n;if(!t)n=e;else{n=[];for(let r of e){let e=t(r);e?n.push(e):e??n.push(r)}}return n}function Ex(e,t,n,r){return n&&(t=Gb(t,n,r)),sx(e,t)}function Dx(e,t,n){let{defs:r}=e;return{defs:r,instances:Jy(e.instances,e=>r[e.defId].allDay?e:Object.assign(Object.assign({},e),{range:{start:n.createMarker(t.toDate(e.range.start,e.forcedStartTzo)),end:n.createMarker(t.toDate(e.range.end,e.forcedEndTzo))},forcedStartTzo:n.canComputeOffset?null:e.forcedStartTzo,forcedEndTzo:n.canComputeOffset?null:e.forcedEndTzo}))}}function Ox(e,t){return cx(e,e=>e.sourceId!==t)}function kx(e){let{defs:t,instances:n}=e,r={},i={};for(let e in t){let{publicId:n}=t[e];n&&(r[n]=e)}for(let e in n){let{publicId:r}=t[n[e].defId];r&&(i[r]=e)}return{defIdMap:r,instanceIdMap:i}}var Ax=class{constructor(){this.handlers={},this.thisContext=null}setThisContext(e){this.thisContext=e}setOptions(e){this.options=e}on(e,t){jx(this.handlers,e,t)}off(e,t){Mx(this.handlers,e,t)}trigger(e,...t){let n=this.handlers[e]||[],r=this.options&&this.options[e],i=[].concat(r||[],n);for(let e of i)e.apply(this.thisContext,t)}hasHandlers(e){return!!(this.handlers[e]&&this.handlers[e].length||this.options&&this.options[e])}};function jx(e,t,n){(e[t]||(e[t]=[])).push(n)}function Mx(e,t,n){n?e[t]&&(e[t]=e[t].filter(e=>e!==n)):delete e[t]}var Nx={startTime:`09:00`,endTime:`17:00`,daysOfWeek:[1,2,3,4,5],display:`inverse-background`,classNames:`fc-non-business`,groupId:`_businessHours`};function Px(e,t){return nx(Fx(e),null,t)}function Fx(e){let t;return t=e===!0?[{}]:Array.isArray(e)?e.filter(e=>e.daysOfWeek):typeof e==`object`&&e?[e]:[],t=t.map(e=>Object.assign(Object.assign({},Nx),e)),t}function Ix(e,t,n){n.emitter.trigger(`select`,Object.assign(Object.assign({},Rx(e,n)),{jsEvent:t?t.origEvent:null,view:n.viewApi||n.calendarApi.view}))}function Lx(e,t){t.emitter.trigger(`unselect`,{jsEvent:e?e.origEvent:null,view:t.viewApi||t.calendarApi.view})}function Rx(e,t){let n={};for(let r of t.pluginHooks.dateSpanTransforms)Object.assign(n,r(e,t));return Object.assign(n,dS(e,t.dateEnv)),n}function zx(e,t,n){let{dateEnv:r,options:i}=n,a=t;return e?(a=Jv(a),a=r.add(a,i.defaultAllDayEventDuration)):a=r.add(a,i.defaultTimedEventDuration),a}function Bx(e,t,n,r){let i=Xx(e.defs,t),a=ox();for(let t in e.defs){let o=e.defs[t];a.defs[t]=Vx(o,i[t],n,r)}for(let t in e.instances){let o=e.instances[t],s=a.defs[o.defId];a.instances[t]=Hx(o,s,i[o.defId],n,r)}return a}function Vx(e,t,n,r){let i=n.standardProps||{};i.hasEnd==null&&t.durationEditable&&(n.startDelta||n.endDelta)&&(i.hasEnd=!0);let a=Object.assign(Object.assign(Object.assign({},e),i),{ui:Object.assign(Object.assign({},e.ui),i.ui)});n.extendedProps&&(a.extendedProps=Object.assign(Object.assign({},a.extendedProps),n.extendedProps));for(let e of r.pluginHooks.eventDefMutationAppliers)e(a,n,r);return!a.hasEnd&&r.options.forceEventDuration&&(a.hasEnd=!0),a}function Hx(e,t,n,r,i){let{dateEnv:a}=i,o=r.standardProps&&r.standardProps.allDay===!0,s=r.standardProps&&r.standardProps.hasEnd===!1,c=Object.assign({},e);return o&&(c.range=zb(c.range)),r.datesDelta&&n.startEditable&&(c.range={start:a.add(c.range.start,r.datesDelta),end:a.add(c.range.end,r.datesDelta)}),r.startDelta&&n.durationEditable&&(c.range={start:a.add(c.range.start,r.startDelta),end:c.range.end}),r.endDelta&&n.durationEditable&&(c.range={start:c.range.start,end:a.add(c.range.end,r.endDelta)}),s&&(c.range={start:c.range.start,end:zx(t.allDay,c.range.start,i)}),t.allDay&&(c.range={start:Jv(c.range.start),end:Jv(c.range.end)}),c.range.end<c.range.start&&(c.range.end=zx(t.allDay,c.range.start,i)),c}var Ux=class{constructor(e,t){this.context=e,this.internalEventSource=t}remove(){this.context.dispatch({type:`REMOVE_EVENT_SOURCE`,sourceId:this.internalEventSource.sourceId})}refetch(){this.context.dispatch({type:`FETCH_EVENT_SOURCES`,sourceIds:[this.internalEventSource.sourceId],isRefetch:!0})}get id(){return this.internalEventSource.publicId}get url(){return this.internalEventSource.meta.url}get format(){return this.internalEventSource.meta.format}},Wx=class e{constructor(e,t,n){this._context=e,this._def=t,this._instance=n||null}setProp(e,t){if(e in Jb)console.warn(`Could not set date-related prop 'name'. Use one of the date-related methods instead.`);else if(e===`id`)t=qb[e](t),this.mutate({standardProps:{publicId:t}});else if(e in qb)t=qb[e](t),this.mutate({standardProps:{[e]:t}});else if(e in fx){let n=fx[e](t);n=e===`color`?{backgroundColor:t,borderColor:t}:e===`editable`?{startEditable:t,durationEditable:t}:{[e]:t},this.mutate({standardProps:{ui:n}})}else console.warn(`Could not set prop '${e}'. Use setExtendedProp instead.`)}setExtendedProp(e,t){this.mutate({extendedProps:{[e]:t}})}setStart(e,t={}){let{dateEnv:n}=this._context,r=n.createMarker(e);if(r&&this._instance){let e=this._instance.range,i=Vb(e.start,r,n,t.granularity);t.maintainDuration?this.mutate({datesDelta:i}):this.mutate({startDelta:i})}}setEnd(e,t={}){let{dateEnv:n}=this._context,r;if(!(e!=null&&(r=n.createMarker(e),!r))&&this._instance){if(r){let e=Vb(this._instance.range.end,r,n,t.granularity);this.mutate({endDelta:e})}else this.mutate({standardProps:{hasEnd:!1}})}}setDates(e,t,n={}){let{dateEnv:r}=this._context,i={allDay:n.allDay},a=r.createMarker(e),o;if(a&&!(t!=null&&(o=r.createMarker(t),!o))&&this._instance){let e=this._instance.range;n.allDay===!0&&(e=zb(e));let t=Vb(e.start,a,r,n.granularity);if(o){let a=Vb(e.end,o,r,n.granularity);Ov(t,a)?this.mutate({datesDelta:t,standardProps:i}):this.mutate({startDelta:t,endDelta:a,standardProps:i})}else i.hasEnd=!1,this.mutate({datesDelta:t,standardProps:i})}}moveStart(e){let t=Tv(e);t&&this.mutate({startDelta:t})}moveEnd(e){let t=Tv(e);t&&this.mutate({endDelta:t})}moveDates(e){let t=Tv(e);t&&this.mutate({datesDelta:t})}setAllDay(e,t={}){let n={allDay:e},{maintainDuration:r}=t;r??=this._context.options.allDayMaintainDuration,this._def.allDay!==e&&(n.hasEnd=r),this.mutate({standardProps:n})}formatRange(e){let{dateEnv:t}=this._context,n=this._instance,r=Py(e);return this._def.hasEnd?t.formatRange(n.range.start,n.range.end,r,{forcedStartTzo:n.forcedStartTzo,forcedEndTzo:n.forcedEndTzo}):t.format(n.range.start,r,{forcedTzo:n.forcedStartTzo})}mutate(t){let n=this._instance;if(n){let r=this._def,i=this._context,{eventStore:a}=i.getCurrentData(),o=ix(a,n.instanceId);o=Bx(o,{"":{display:``,startEditable:!0,durationEditable:!0,constraints:[],overlap:null,allows:[],backgroundColor:``,borderColor:``,textColor:``,classNames:[]}},t,i);let s=new e(i,r,n);this._def=o.defs[r.defId],this._instance=o.instances[n.instanceId],i.dispatch({type:`MERGE_EVENTS`,eventStore:o}),i.emitter.trigger(`eventChange`,{oldEvent:s,event:this,relatedEvents:Kx(o,i,n),revert(){i.dispatch({type:`RESET_EVENTS`,eventStore:a})}})}}remove(){let e=this._context,t=Gx(this);e.dispatch({type:`REMOVE_EVENTS`,eventStore:t}),e.emitter.trigger(`eventRemove`,{event:this,relatedEvents:[],revert(){e.dispatch({type:`MERGE_EVENTS`,eventStore:t})}})}get source(){let{sourceId:e}=this._def;return e?new Ux(this._context,this._context.getCurrentData().eventSources[e]):null}get start(){return this._instance?this._context.dateEnv.toDate(this._instance.range.start):null}get end(){return this._instance&&this._def.hasEnd?this._context.dateEnv.toDate(this._instance.range.end):null}get startStr(){let e=this._instance;return e?this._context.dateEnv.formatIso(e.range.start,{omitTime:this._def.allDay,forcedTzo:e.forcedStartTzo}):``}get endStr(){let e=this._instance;return e&&this._def.hasEnd?this._context.dateEnv.formatIso(e.range.end,{omitTime:this._def.allDay,forcedTzo:e.forcedEndTzo}):``}get id(){return this._def.publicId}get groupId(){return this._def.groupId}get allDay(){return this._def.allDay}get title(){return this._def.title}get url(){return this._def.url}get display(){return this._def.ui.display||`auto`}get startEditable(){return this._def.ui.startEditable}get durationEditable(){return this._def.ui.durationEditable}get constraint(){return this._def.ui.constraints[0]||null}get overlap(){return this._def.ui.overlap}get allow(){return this._def.ui.allows[0]||null}get backgroundColor(){return this._def.ui.backgroundColor}get borderColor(){return this._def.ui.borderColor}get textColor(){return this._def.ui.textColor}get classNames(){return this._def.ui.classNames}get extendedProps(){return this._def.extendedProps}toPlainObject(e={}){let t=this._def,{ui:n}=t,{startStr:r,endStr:i}=this,a={allDay:t.allDay};return t.title&&(a.title=t.title),r&&(a.start=r),i&&(a.end=i),t.publicId&&(a.id=t.publicId),t.groupId&&(a.groupId=t.groupId),t.url&&(a.url=t.url),n.display&&n.display!==`auto`&&(a.display=n.display),e.collapseColor&&n.backgroundColor&&n.backgroundColor===n.borderColor?a.color=n.backgroundColor:(n.backgroundColor&&(a.backgroundColor=n.backgroundColor),n.borderColor&&(a.borderColor=n.borderColor)),n.textColor&&(a.textColor=n.textColor),n.classNames.length&&(a.classNames=n.classNames),Object.keys(t.extendedProps).length&&(e.collapseExtendedProps?Object.assign(a,t.extendedProps):a.extendedProps=t.extendedProps),a}toJSON(){return this.toPlainObject()}};function Gx(e){let t=e._def,n=e._instance;return{defs:{[t.defId]:t},instances:n?{[n.instanceId]:n}:{}}}function Kx(e,t,n){let{defs:r,instances:i}=e,a=[],o=n?n.instanceId:``;for(let e in i){let n=i[e],s=r[n.defId];n.instanceId!==o&&a.push(new Wx(t,s,n))}return a}function qx(e,t,n,r){let i={},a={},o={},s=[],c=[],l=Xx(e.defs,t);for(let t in e.defs){let n=e.defs[t];l[n.defId].display===`inverse-background`&&(n.groupId?(i[n.groupId]=[],o[n.groupId]||(o[n.groupId]=n)):a[t]=[])}for(let t in e.instances){let o=e.instances[t],u=e.defs[o.defId],d=l[u.defId],f=o.range,p=!u.allDay&&r?Bb(f,r):f,m=Fb(p,n);m&&(d.display===`inverse-background`?u.groupId?i[u.groupId].push(m):a[o.defId].push(m):d.display!==`none`&&(d.display===`background`?s:c).push({def:u,ui:d,instance:o,range:m,isStart:p.start&&p.start.valueOf()===m.start.valueOf(),isEnd:p.end&&p.end.valueOf()===m.end.valueOf()}))}for(let e in i){let t=i[e],r=Nb(t,n);for(let t of r){let n=o[e],r=l[n.defId];s.push({def:n,ui:r,instance:null,range:t,isStart:!1,isEnd:!1})}}for(let t in a){let r=a[t],i=Nb(r,n);for(let n of i)s.push({def:e.defs[t],ui:l[t],instance:null,range:n,isStart:!1,isEnd:!1})}return{bg:s,fg:c}}function Jx(e,t){e.fcSeg=t}function Yx(e){return e.fcSeg||e.parentNode.fcSeg||null}function Xx(e,t){return Jy(e,e=>Zx(e,t))}function Zx(e,t){let n=[];return t[``]&&n.push(t[``]),t[e.defId]&&n.push(t[e.defId]),n.push(e.ui),hx(n)}function Qx(e,t){let n=e.map($x);return n.sort((e,n)=>_v(e,n,t)),n.map(e=>e._seg)}function $x(e){let{eventRange:t}=e,n=t.def,r=t.instance?t.instance.range:t.range,i=r.start?r.start.valueOf():0,a=r.end?r.end.valueOf():0;return Object.assign(Object.assign(Object.assign({},n.extendedProps),n),{id:n.publicId,start:i,end:a,duration:a-i,allDay:Number(n.allDay),_seg:e})}function eS(e,t){let{pluginHooks:n}=t,r=n.isDraggableTransformers,{def:i,ui:a}=e.eventRange,o=a.startEditable;for(let e of r)o=e(o,i,a,t);return o}function tS(e,t){return e.isStart&&e.eventRange.ui.durationEditable&&t.options.eventResizableFromStart}function nS(e,t){return e.isEnd&&e.eventRange.ui.durationEditable}function rS(e,t,n,r,i,a,o){let{dateEnv:s,options:c}=n,{displayEventTime:l,displayEventEnd:u}=c,d=e.eventRange.def,f=e.eventRange.instance;l??=r!==!1,u??=i!==!1;let p=f.range.start,m=f.range.end,h=a||e.start||e.eventRange.range.start,g=o||e.end||e.eventRange.range.end,_=Jv(p).valueOf()===Jv(h).valueOf(),v=Jv(zv(m,-1)).valueOf()===Jv(zv(g,-1)).valueOf();return l&&!d.allDay&&(_||v)?(h=_?p:h,g=v?m:g,u&&d.hasEnd?s.formatRange(h,g,t,{forcedStartTzo:a?null:f.forcedStartTzo,forcedEndTzo:o?null:f.forcedEndTzo}):s.format(h,t,{forcedTzo:a?null:f.forcedStartTzo})):``}function iS(e,t,n){let r=e.eventRange.range;return{isPast:r.end<=(n||t.start),isFuture:r.start>=(n||t.end),isToday:t&&Lb(t,r.start)}}function aS(e){let t=[`fc-event`];return e.isMirror&&t.push(`fc-event-mirror`),e.isDraggable&&t.push(`fc-event-draggable`),(e.isStartResizable||e.isEndResizable)&&t.push(`fc-event-resizable`),e.isDragging&&t.push(`fc-event-dragging`),e.isResizing&&t.push(`fc-event-resizing`),e.isSelected&&t.push(`fc-event-selected`),e.isStart&&t.push(`fc-event-start`),e.isEnd&&t.push(`fc-event-end`),e.isPast&&t.push(`fc-event-past`),e.isToday&&t.push(`fc-event-today`),e.isFuture&&t.push(`fc-event-future`),t}function oS(e){return e.instance?e.instance.instanceId:`${e.def.defId}:${e.range.start.toISOString()}`}function sS(e,t){let{def:n,instance:r}=e.eventRange,{url:i}=n;if(i)return{href:i};let{emitter:a,options:o}=t,{eventInteractive:s}=o;return s??(s=n.interactive,s??=!!a.hasHandlers(`eventClick`)),s?pv(e=>{a.trigger(`eventClick`,{el:e.target,event:new Wx(t,n,r),jsEvent:e,view:t.viewApi})}):{}}var cS={start:Y,end:Y,allDay:Boolean};function lS(e,t,n){let r=uS(e,t),{range:i}=r;if(!i.start)return null;if(!i.end){if(n==null)return null;i.end=t.add(i.start,n)}return r}function uS(e,t){let{refined:n,extra:r}=Wy(e,cS),i=n.start?t.createMarkerMeta(n.start):null,a=n.end?t.createMarkerMeta(n.end):null,{allDay:o}=n;return o??=i&&i.isTimeUnspecified&&(!a||a.isTimeUnspecified),Object.assign({range:{start:i?i.marker:null,end:a?a.marker:null},allDay:o},r)}function dS(e,t){return Object.assign(Object.assign({},pS(e.range,t,e.allDay)),{allDay:e.allDay})}function fS(e,t,n){return Object.assign(Object.assign({},pS(e,t,n)),{timeZone:t.timeZone})}function pS(e,t,n){return{start:t.toDate(e.start),end:t.toDate(e.end),startStr:t.formatIso(e.start,{omitTime:n}),endStr:t.formatIso(e.end,{omitTime:n})}}function mS(e,t,n){let r=Zb({editable:!1},n),i=$b(r.refined,r.extra,``,e.allDay,!0,n);return{def:i,ui:Zx(i,t),instance:Ub(i.defId,e.range),range:e.range,isStart:!0,isEnd:!0}}function hS(e,t,n){let r=!1,i=function(e){r||(r=!0,t(e))},a=function(e){r||(r=!0,n(e))},o=e(i,a);o&&typeof o.then==`function`&&o.then(i,a)}var gS=class extends Error{constructor(e,t){super(e),this.response=t}};function _S(e,t,n){e=e.toUpperCase();let r={method:e};return e===`GET`?t+=(t.indexOf(`?`)===-1?`?`:`&`)+new URLSearchParams(n):(r.body=new URLSearchParams(n),r.headers={"Content-Type":`application/x-www-form-urlencoded`}),fetch(t,r).then(e=>{if(e.ok)return e.json().then(t=>[t,e],()=>{throw new gS(`Failure parsing JSON`,e)});throw new gS(`Request failed`,e)})}var vS;function yS(){return vS??=bS(),vS}function bS(){if(typeof document>`u`)return!0;let e=document.createElement(`div`);e.style.position=`absolute`,e.style.top=`0px`,e.style.left=`0px`,e.innerHTML=`<table><tr><td><div></div></td></tr></table>`,e.querySelector(`table`).style.height=`100px`,e.querySelector(`div`).style.height=`100%`,document.body.appendChild(e);let t=e.querySelector(`div`).offsetHeight>0;return document.body.removeChild(e),t}var xS=class extends vb{constructor(){super(...arguments),this.state={forPrint:!1},this.handleBeforePrint=()=>{db(()=>{this.setState({forPrint:!0})})},this.handleAfterPrint=()=>{db(()=>{this.setState({forPrint:!1})})}}render(){let{props:e}=this,{options:t}=e,{forPrint:n}=this.state,r=n||t.height===`auto`||t.contentHeight===`auto`,i=!r&&t.height!=null?t.height:``,a=[`fc`,n?`fc-media-print`:`fc-media-screen`,`fc-direction-${t.direction}`,e.theme.getClass(`root`)];return yS()||a.push(`fc-liquid-hack`),e.children(a,i,r,n)}componentDidMount(){let{emitter:e}=this.props;e.on(`_beforeprint`,this.handleBeforePrint),e.on(`_afterprint`,this.handleAfterPrint)}componentWillUnmount(){let{emitter:e}=this.props;e.off(`_beforeprint`,this.handleBeforePrint),e.off(`_afterprint`,this.handleAfterPrint)}},SS=class{constructor(e){this.component=e.component,this.isHitComboAllowed=e.isHitComboAllowed||null}destroy(){}};function CS(e,t){return{component:e,el:t.el,useEventCenter:t.useEventCenter==null||t.useEventCenter,isHitComboAllowed:t.isHitComboAllowed||null}}var wS={},TS=class extends Ig{constructor(e,t){super(e,t),this.handleRefresh=()=>{let e=this.computeTiming();e.state.nowDate.valueOf()!==this.state.nowDate.valueOf()&&this.setState(e.state),this.clearTimeout(),this.setTimeout(e.waitMs)},this.handleVisibilityChange=()=>{document.hidden||this.handleRefresh()},this.state=this.computeTiming().state}render(){let{props:e,state:t}=this;return e.children(t.nowDate,t.todayRange)}componentDidMount(){this.setTimeout(),this.context.nowManager.addResetListener(this.handleRefresh),document.addEventListener(`visibilitychange`,this.handleVisibilityChange)}componentDidUpdate(e){e.unit!==this.props.unit&&(this.clearTimeout(),this.setTimeout())}componentWillUnmount(){this.clearTimeout(),this.context.nowManager.removeResetListener(this.handleRefresh),document.removeEventListener(`visibilitychange`,this.handleVisibilityChange)}computeTiming(){let{props:e,context:t}=this,n=t.nowManager.getDateMarker(),{nowIndicatorSnap:r}=t.options;r===`auto`&&(r=/year|month|week|day/.test(e.unit)||(e.unitValue||1)===1);let i,a;return r?(i=t.dateEnv.startOf(n,e.unit),a=t.dateEnv.add(i,Tv(1,e.unit)).valueOf()-n.valueOf()):(i=n,a=6e4),a=Math.min(864e5,a),{state:{nowDate:i,todayRange:ES(i)},waitMs:a}}setTimeout(e=this.computeTiming().waitMs){this.timeoutId=setTimeout(()=>{let e=this.computeTiming();this.setState(e.state,()=>{this.setTimeout(e.waitMs)})},e)}clearTimeout(){this.timeoutId&&clearTimeout(this.timeoutId)}};TS.contextType=hb;function ES(e){let t=Jv(e);return{start:t,end:Rv(t,1)}}var DS=class{getCurrentData(){return this.currentDataManager.getCurrentData()}dispatch(e){this.currentDataManager.dispatch(e)}get view(){return this.getCurrentData().viewApi}batchRendering(e){e()}updateSize(){this.trigger(`_resize`,!0)}setOption(e,t){this.dispatch({type:`SET_OPTION`,optionName:e,rawOptionValue:t})}getOption(e){return this.currentDataManager.currentCalendarOptionsInput[e]}getAvailableLocaleCodes(){return Object.keys(this.getCurrentData().availableRawLocales)}on(e,t){let{currentDataManager:n}=this;n.currentCalendarOptionsRefiners[e]?n.emitter.on(e,t):console.warn(`Unknown listener name '${e}'`)}off(e,t){this.currentDataManager.emitter.off(e,t)}trigger(e,...t){this.currentDataManager.emitter.trigger(e,...t)}changeView(e,t){this.batchRendering(()=>{if(this.unselect(),t){if(t.start&&t.end)this.dispatch({type:`CHANGE_VIEW_TYPE`,viewType:e}),this.dispatch({type:`SET_OPTION`,optionName:`visibleRange`,rawOptionValue:t});else{let{dateEnv:n}=this.getCurrentData();this.dispatch({type:`CHANGE_VIEW_TYPE`,viewType:e,dateMarker:n.createMarker(t)})}}else this.dispatch({type:`CHANGE_VIEW_TYPE`,viewType:e})})}zoomTo(e,t){let n=this.getCurrentData(),r;t||=`day`,r=n.viewSpecs[t]||this.getUnitViewSpec(t),this.unselect(),r?this.dispatch({type:`CHANGE_VIEW_TYPE`,viewType:r.type,dateMarker:e}):this.dispatch({type:`CHANGE_DATE`,dateMarker:e})}getUnitViewSpec(e){let{viewSpecs:t,toolbarConfig:n}=this.getCurrentData(),r=[].concat(n.header?n.header.viewsWithButtons:[],n.footer?n.footer.viewsWithButtons:[]),i,a;for(let e in t)r.push(e);for(i=0;i<r.length;i+=1)if(a=t[r[i]],a&&a.singleUnit===e)return a;return null}prev(){this.unselect(),this.dispatch({type:`PREV`})}next(){this.unselect(),this.dispatch({type:`NEXT`})}prevYear(){let e=this.getCurrentData();this.unselect(),this.dispatch({type:`CHANGE_DATE`,dateMarker:e.dateEnv.addYears(e.currentDate,-1)})}nextYear(){let e=this.getCurrentData();this.unselect(),this.dispatch({type:`CHANGE_DATE`,dateMarker:e.dateEnv.addYears(e.currentDate,1)})}today(){let e=this.getCurrentData();this.unselect(),this.dispatch({type:`CHANGE_DATE`,dateMarker:e.nowManager.getDateMarker()})}gotoDate(e){let t=this.getCurrentData();this.unselect(),this.dispatch({type:`CHANGE_DATE`,dateMarker:t.dateEnv.createMarker(e)})}incrementDate(e){let t=this.getCurrentData(),n=Tv(e);n&&(this.unselect(),this.dispatch({type:`CHANGE_DATE`,dateMarker:t.dateEnv.add(t.currentDate,n)}))}getDate(){let e=this.getCurrentData();return e.dateEnv.toDate(e.currentDate)}formatDate(e,t){let{dateEnv:n}=this.getCurrentData();return n.format(n.createMarker(e),Py(t))}formatRange(e,t,n){let{dateEnv:r}=this.getCurrentData();return r.formatRange(r.createMarker(e),r.createMarker(t),Py(n),n)}formatIso(e,t){let{dateEnv:n}=this.getCurrentData();return n.formatIso(n.createMarker(e),{omitTime:t})}select(e,t){let n;n=t==null?e.start==null?{start:e,end:null}:e:{start:e,end:t};let r=this.getCurrentData(),i=lS(n,r.dateEnv,Tv({days:1}));i&&(this.dispatch({type:`SELECT_DATES`,selection:i}),Ix(i,null,r))}unselect(e){let t=this.getCurrentData();t.dateSelection&&(this.dispatch({type:`UNSELECT_DATES`}),Lx(e,t))}addEvent(e,t){if(e instanceof Wx){let t=e._def,n=e._instance;return this.getCurrentData().eventStore.defs[t.defId]||(this.dispatch({type:`ADD_EVENTS`,eventStore:rx({def:t,instance:n})}),this.triggerEventAdd(e)),e}let n=this.getCurrentData(),r;if(t instanceof Ux)r=t.internalEventSource;else if(typeof t==`boolean`)t&&([r]=Xy(n.eventSources));else if(t!=null){let e=this.getEventSourceById(t);if(!e)return console.warn(`Could not find an event source with ID "${t}"`),null;r=e.internalEventSource}let i=Xb(e,r,n,!1);if(i){let e=new Wx(n,i.def,i.def.recurringDef?null:i.instance);return this.dispatch({type:`ADD_EVENTS`,eventStore:rx(i)}),this.triggerEventAdd(e),e}return null}triggerEventAdd(e){let{emitter:t}=this.getCurrentData();t.trigger(`eventAdd`,{event:e,relatedEvents:[],revert:()=>{this.dispatch({type:`REMOVE_EVENTS`,eventStore:Gx(e)})}})}getEventById(e){let t=this.getCurrentData(),{defs:n,instances:r}=t.eventStore;e=String(e);for(let i in n){let a=n[i];if(a.publicId===e){if(a.recurringDef)return new Wx(t,a,null);for(let e in r){let n=r[e];if(n.defId===a.defId)return new Wx(t,a,n)}}}return null}getEvents(){let e=this.getCurrentData();return Kx(e.eventStore,e)}removeAllEvents(){this.dispatch({type:`REMOVE_ALL_EVENTS`})}getEventSources(){let e=this.getCurrentData(),t=e.eventSources,n=[];for(let r in t)n.push(new Ux(e,t[r]));return n}getEventSourceById(e){let t=this.getCurrentData(),n=t.eventSources;e=String(e);for(let r in n)if(n[r].publicId===e)return new Ux(t,n[r]);return null}addEventSource(e){let t=this.getCurrentData();if(e instanceof Ux)return t.eventSources[e.internalEventSource.sourceId]||this.dispatch({type:`ADD_EVENT_SOURCES`,sources:[e.internalEventSource]}),e;let n=vx(e,t);return n?(this.dispatch({type:`ADD_EVENT_SOURCES`,sources:[n]}),new Ux(t,n)):null}removeAllEventSources(){this.dispatch({type:`REMOVE_ALL_EVENT_SOURCES`})}refetchEvents(){this.dispatch({type:`FETCH_EVENT_SOURCES`,isRefetch:!0})}scrollToTime(e){let t=Tv(e);t&&this.trigger(`_scrollRequest`,{time:t})}};function OS(e,t){let n={left:Math.max(e.left,t.left),right:Math.min(e.right,t.right),top:Math.max(e.top,t.top),bottom:Math.min(e.bottom,t.bottom)};return n.left<n.right&&n.top<n.bottom&&n}function kS(e,t,n,r){return{dow:e.getUTCDay(),isDisabled:!(!r||r.activeRange&&Lb(r.activeRange,e)),isOther:!(!r||Lb(r.currentRange,e)),isToday:!!(t&&Lb(t,e)),isPast:!!(n?e<n:t&&e<t.start),isFuture:!!(n?e>n:t&&e>=t.end)}}function AS(e,t){let n=[`fc-day`,`fc-day-${Iv[e.dow]}`];return e.isDisabled?n.push(`fc-day-disabled`):(e.isToday&&(n.push(`fc-day-today`),n.push(t.getClass(`today`))),e.isPast&&n.push(`fc-day-past`),e.isFuture&&n.push(`fc-day-future`),e.isOther&&n.push(`fc-day-other`)),n}var jS=Py({year:`numeric`,month:`long`,day:`numeric`}),MS=Py({week:`long`});function NS(e,t,n=`day`,r=!0){let{dateEnv:i,options:a,calendarApi:o}=e,s=i.format(t,n===`week`?MS:jS);if(a.navLinks){let e=i.toDate(t),c=e=>{let r=n===`day`?a.navLinkDayClick:n===`week`?a.navLinkWeekClick:null;typeof r==`function`?r.call(o,i.toDate(t),e):(typeof r==`string`&&(n=r),o.zoomTo(t,n))};return Object.assign({title:xv(a.navLinkHint,[s,e],s),"data-navlink":``},r?fv(c):{onClick:c})}return{"aria-label":s}}var PS;function FS(){return PS||=IS(),PS}function IS(){let e=document.createElement(`div`);e.style.overflow=`scroll`,e.style.position=`absolute`,e.style.top=`-9999px`,e.style.left=`-9999px`,document.body.appendChild(e);let t=LS(e);return document.body.removeChild(e),t}function LS(e){return{x:e.offsetHeight-e.clientHeight,y:e.offsetWidth-e.clientWidth}}function RS(e){let t=zS(e),n=e.getBoundingClientRect();for(let e of t){let t=OS(n,e.getBoundingClientRect());if(t)n=t;else return null}return n}function zS(e){let t=[];for(;e instanceof HTMLElement;){let n=window.getComputedStyle(e);if(n.position===`fixed`)break;/(auto|scroll)/.test(n.overflow+n.overflowY+n.overflowX)&&t.push(e),e=e.parentNode}return t}var BS=class{constructor(e,t,n,r){this.els=t;let i=this.originClientRect=e.getBoundingClientRect();n&&this.buildElHorizontals(i.left),r&&this.buildElVerticals(i.top)}buildElHorizontals(e){let t=[],n=[];for(let r of this.els){let i=r.getBoundingClientRect();t.push(i.left-e),n.push(i.right-e)}this.lefts=t,this.rights=n}buildElVerticals(e){let t=[],n=[];for(let r of this.els){let i=r.getBoundingClientRect();t.push(i.top-e),n.push(i.bottom-e)}this.tops=t,this.bottoms=n}leftToIndex(e){let{lefts:t,rights:n}=this,r=t.length,i=0;for(;i<r;i+=1)if(e>=t[i]&&e<n[i])return i}topToIndex(e){let{tops:t,bottoms:n}=this,r=t.length,i=0;for(;i<r;i+=1)if(e>=t[i]&&e<n[i])return i}getWidth(e){return this.rights[e]-this.lefts[e]}getHeight(e){return this.bottoms[e]-this.tops[e]}similarTo(e){return VS(this.tops||[],e.tops||[])&&VS(this.bottoms||[],e.bottoms||[])&&VS(this.lefts||[],e.lefts||[])&&VS(this.rights||[],e.rights||[])}};function VS(e,t){let n=e.length;if(n!==t.length)return!1;for(let r=0;r<n;r++)if(Math.round(e[r])!==Math.round(t[r]))return!1;return!0}var HS=class extends vb{constructor(){super(...arguments),this.uid=hv()}prepareHits(){}queryHit(e,t,n,r){return null}isValidSegDownEl(e){return!this.props.eventDrag&&!this.props.eventResize&&!ev(e,`.fc-event-mirror`)}isValidDateDownEl(e){return!ev(e,`.fc-event:not(.fc-bg-event)`)&&!ev(e,`.fc-more-link`)&&!ev(e,`a[data-navlink]`)&&!ev(e,`.fc-popover`)}},US=class{constructor(e=e=>e.thickness||1){this.getEntryThickness=e,this.strictOrder=!1,this.allowReslicing=!1,this.maxCoord=-1,this.maxStackCnt=-1,this.levelCoords=[],this.entriesByLevel=[],this.stackCnts={}}addSegs(e){let t=[];for(let n of e)this.insertEntry(n,t);return t}insertEntry(e,t){let n=this.findInsertion(e);this.isInsertionValid(n,e)?this.insertEntryAt(e,n):this.handleInvalidInsertion(n,e,t)}isInsertionValid(e,t){return(this.maxCoord===-1||e.levelCoord+this.getEntryThickness(t)<=this.maxCoord)&&(this.maxStackCnt===-1||e.stackCnt<this.maxStackCnt)}handleInvalidInsertion(e,t,n){if(this.allowReslicing&&e.touchingEntry){let r=Object.assign(Object.assign({},t),{span:KS(t.span,e.touchingEntry.span)});n.push(r),this.splitEntry(t,e.touchingEntry,n)}else n.push(t)}splitEntry(e,t,n){let r=e.span,i=t.span;r.start<i.start&&this.insertEntry({index:e.index,thickness:e.thickness,span:{start:r.start,end:i.start}},n),r.end>i.end&&this.insertEntry({index:e.index,thickness:e.thickness,span:{start:i.end,end:r.end}},n)}insertEntryAt(e,t){let{entriesByLevel:n,levelCoords:r}=this;t.lateral===-1?(qS(r,t.level,t.levelCoord),qS(n,t.level,[e])):qS(n[t.level],t.lateral,e),this.stackCnts[GS(e)]=t.stackCnt}findInsertion(e){let{levelCoords:t,entriesByLevel:n,strictOrder:r,stackCnts:i}=this,a=t.length,o=0,s=-1,c=-1,l=null,u=0;for(let d=0;d<a;d+=1){let a=t[d];if(!r&&a>=o+this.getEntryThickness(e))break;let f=n[d],p,m=JS(f,e.span.start,WS),h=m[0]+m[1];for(;(p=f[h])&&p.span.start<e.span.end;){let e=a+this.getEntryThickness(p);e>o&&(o=e,l=p,s=d,c=h),e===o&&(u=Math.max(u,i[GS(p)]+1)),h+=1}}let d=0;if(l)for(d=s+1;d<a&&t[d]<o;)d+=1;let f=-1;return d<a&&t[d]===o&&(f=JS(n[d],e.span.end,WS)[0]),{touchingLevel:s,touchingLateral:c,touchingEntry:l,stackCnt:u,levelCoord:o,level:d,lateral:f}}toRects(){let{entriesByLevel:e,levelCoords:t}=this,n=e.length,r=[];for(let i=0;i<n;i+=1){let n=e[i],a=t[i];for(let e of n)r.push(Object.assign(Object.assign({},e),{thickness:this.getEntryThickness(e),levelCoord:a}))}return r}};function WS(e){return e.span.end}function GS(e){return e.index+`:`+e.span.start}function KS(e,t){let n=Math.max(e.start,t.start),r=Math.min(e.end,t.end);return n<r?{start:n,end:r}:null}function qS(e,t,n){e.splice(t,0,n)}function JS(e,t,n){let r=0,i=e.length;if(!i||t<n(e[r]))return[0,0];if(t>n(e[i-1]))return[i,0];for(;r<i;){let a=Math.floor(r+(i-r)/2),o=n(e[a]);if(t<o)i=a;else if(t>o)r=a+1;else return[a,1]}return[r,0]}function YS(e,t){return Py(!e||t>10?{weekday:`short`}:t>1?{weekday:`short`,month:`numeric`,day:`numeric`,omitCommas:!0}:{weekday:`long`})}var XS=`fc-col-header-cell`;function ZS(e){return e.text}var QS=class extends vb{render(){let{dateEnv:e,options:t,theme:n,viewApi:r}=this.context,{props:i}=this,{date:a,dateProfile:o}=i,s=kS(a,i.todayRange,null,o),c=[XS].concat(AS(s,n)),l=e.format(a,i.dayHeaderFormat),u=!s.isDisabled&&i.colCnt>1?NS(this.context,a):{},d=e.toDate(a);e.namedTimeZoneImpl&&(d=zv(d,36e5));let f=Object.assign(Object.assign(Object.assign({date:d,view:r},i.extraRenderProps),{text:l}),s);return J(Db,{elTag:`th`,elClasses:c,elAttrs:Object.assign({role:`columnheader`,colSpan:i.colSpan,"data-date":s.isDisabled?void 0:cy(a)},i.extraDataAttrs),renderProps:f,generatorName:`dayHeaderContent`,customGenerator:t.dayHeaderContent,defaultGenerator:ZS,classNameGenerator:t.dayHeaderClassNames,didMount:t.dayHeaderDidMount,willUnmount:t.dayHeaderWillUnmount},e=>J(`div`,{className:`fc-scrollgrid-sync-inner`},!s.isDisabled&&J(e,{elTag:`a`,elAttrs:u,elClasses:[`fc-col-header-cell-cushion`,i.isSticky&&`fc-sticky`]})))}},$S=Py({weekday:`long`}),eC=class extends vb{render(){let{props:e}=this,{dateEnv:t,theme:n,viewApi:r,options:i}=this.context,a=Rv(new Date(2592e5),e.dow),o={dow:e.dow,isDisabled:!1,isFuture:!1,isPast:!1,isToday:!1,isOther:!1},s=t.format(a,e.dayHeaderFormat),c=Object.assign(Object.assign(Object.assign(Object.assign({date:a},o),{view:r}),e.extraRenderProps),{text:s});return J(Db,{elTag:`th`,elClasses:[XS,...AS(o,n),...e.extraClassNames||[]],elAttrs:Object.assign({role:`columnheader`,colSpan:e.colSpan},e.extraDataAttrs),renderProps:c,generatorName:`dayHeaderContent`,customGenerator:i.dayHeaderContent,defaultGenerator:ZS,classNameGenerator:i.dayHeaderClassNames,didMount:i.dayHeaderDidMount,willUnmount:i.dayHeaderWillUnmount},n=>J(`div`,{className:`fc-scrollgrid-sync-inner`},J(n,{elTag:`a`,elClasses:[`fc-col-header-cell-cushion`,e.isSticky&&`fc-sticky`],elAttrs:{"aria-label":t.format(a,$S)}})))}},tC=class extends vb{constructor(){super(...arguments),this.createDayHeaderFormatter=dy(nC)}render(){let{context:e}=this,{dates:t,dateProfile:n,datesRepDistinctDays:r,renderIntro:i}=this.props,a=this.createDayHeaderFormatter(e.options.dayHeaderFormat,r,t.length);return J(TS,{unit:`day`},(e,o)=>J(`tr`,{role:`row`},i&&i(`day`),t.map(e=>r?J(QS,{key:e.toISOString(),date:e,dateProfile:n,todayRange:o,colCnt:t.length,dayHeaderFormat:a}):J(eC,{key:e.getUTCDay(),dow:e.getUTCDay(),dayHeaderFormat:a}))))}};function nC(e,t,n){return e||YS(t,n)}var rC=class{constructor(e,t){let n=e.start,{end:r}=e,i=[],a=[],o=-1;for(;n<r;)t.isHiddenDay(n)?i.push(o+.5):(o+=1,i.push(o),a.push(n)),n=Rv(n,1);this.dates=a,this.indices=i,this.cnt=a.length}sliceRange(e){let t=this.getDateDayIndex(e.start),n=this.getDateDayIndex(Rv(e.end,-1)),r=Math.max(0,t),i=Math.min(this.cnt-1,n);return r=Math.ceil(r),i=Math.floor(i),r<=i?{firstIndex:r,lastIndex:i,isStart:t===r,isEnd:n===i}:null}getDateDayIndex(e){let{indices:t}=this,n=Math.floor(Vv(this.dates[0],e));return n<0?t[0]-1:n>=t.length?t[t.length-1]+1:t[n]}},iC=class{constructor(e,t){let{dates:n}=e,r,i,a;if(t){for(i=n[0].getUTCDay(),r=1;r<n.length&&n[r].getUTCDay()!==i;r+=1);a=Math.ceil(n.length/r)}else a=1,r=n.length;this.rowCnt=a,this.colCnt=r,this.daySeries=e,this.cells=this.buildCells(),this.headerDates=this.buildHeaderDates()}buildCells(){let e=[];for(let t=0;t<this.rowCnt;t+=1){let n=[];for(let e=0;e<this.colCnt;e+=1)n.push(this.buildCell(t,e));e.push(n)}return e}buildCell(e,t){let n=this.daySeries.dates[e*this.colCnt+t];return{key:n.toISOString(),date:n}}buildHeaderDates(){let e=[];for(let t=0;t<this.colCnt;t+=1)e.push(this.cells[0][t].date);return e}sliceRange(e){let{colCnt:t}=this,n=this.daySeries.sliceRange(e),r=[];if(n){let{firstIndex:e,lastIndex:i}=n,a=e;for(;a<=i;){let o=Math.floor(a/t),s=Math.min((o+1)*t,i+1);r.push({row:o,firstCol:a%t,lastCol:(s-1)%t,isStart:n.isStart&&a===e,isEnd:n.isEnd&&s-1===i}),a=s}}return r}},aC=class{constructor(){this.sliceBusinessHours=dy(this._sliceBusinessHours),this.sliceDateSelection=dy(this._sliceDateSpan),this.sliceEventStore=dy(this._sliceEventStore),this.sliceEventDrag=dy(this._sliceInteraction),this.sliceEventResize=dy(this._sliceInteraction),this.forceDayIfListItem=!1}sliceProps(e,t,n,r,...i){let{eventUiBases:a}=e,o=this.sliceEventStore(e.eventStore,a,t,n,...i);return{dateSelectionSegs:this.sliceDateSelection(e.dateSelection,t,n,a,r,...i),businessHourSegs:this.sliceBusinessHours(e.businessHours,t,n,r,...i),fgEventSegs:o.fg,bgEventSegs:o.bg,eventDrag:this.sliceEventDrag(e.eventDrag,a,t,n,...i),eventResize:this.sliceEventResize(e.eventResize,a,t,n,...i),eventSelection:e.eventSelection}}sliceNowDate(e,t,n,r,...i){return this._sliceDateSpan({range:{start:e,end:zv(e,1)},allDay:!1},t,n,{},r,...i)}_sliceBusinessHours(e,t,n,r,...i){return e?this._sliceEventStore(Gb(e,oC(t,!!n),r),{},t,n,...i).bg:[]}_sliceEventStore(e,t,n,r,...i){if(e){let a=qx(e,t,oC(n,!!r),r);return{bg:this.sliceEventRanges(a.bg,i),fg:this.sliceEventRanges(a.fg,i)}}return{bg:[],fg:[]}}_sliceInteraction(e,t,n,r,...i){if(!e)return null;let a=qx(e.mutatedEvents,t,oC(n,!!r),r);return{segs:this.sliceEventRanges(a.fg,i),affectedInstances:e.affectedEvents.instances,isEvent:e.isEvent}}_sliceDateSpan(e,t,n,r,i,...a){if(!e)return[];let o=oC(t,!!n),s=Fb(e.range,o);if(s){e=Object.assign(Object.assign({},e),{range:s});let t=mS(e,r,i),n=this.sliceRange(e.range,...a);for(let e of n)e.eventRange=t;return n}return[]}sliceEventRanges(e,t){let n=[];for(let r of e)n.push(...this.sliceEventRange(r,t));return n}sliceEventRange(e,t){let n=e.range;this.forceDayIfListItem&&e.ui.display===`list-item`&&(n={start:n.start,end:Rv(n.start,1)});let r=this.sliceRange(n,...t);for(let t of r)t.eventRange=e,t.isStart=e.isStart&&t.isStart,t.isEnd=e.isEnd&&t.isEnd;return r}};function oC(e,t){let n=e.activeRange;return t?n:{start:zv(n.start,e.slotMinTime.milliseconds),end:zv(n.end,e.slotMaxTime.milliseconds-864e5)}}var sC=/^(visible|hidden)$/,cC=class extends vb{constructor(){super(...arguments),this.handleEl=e=>{this.el=e,xb(this.props.elRef,e)}}render(){let{props:e}=this,{liquid:t,liquidIsAbsolute:n}=e,r=t&&n,i=[`fc-scroller`];return t&&(n?i.push(`fc-scroller-liquid-absolute`):i.push(`fc-scroller-liquid`)),J(`div`,{ref:this.handleEl,className:i.join(` `),style:{overflowX:e.overflowX,overflowY:e.overflowY,left:r&&-(e.overcomeLeft||0)||``,right:r&&-(e.overcomeRight||0)||``,bottom:r&&-(e.overcomeBottom||0)||``,marginLeft:!r&&-(e.overcomeLeft||0)||``,marginRight:!r&&-(e.overcomeRight||0)||``,marginBottom:!r&&-(e.overcomeBottom||0)||``,maxHeight:e.maxHeight||``}},e.children)}needsXScrolling(){if(sC.test(this.props.overflowX))return!1;let{el:e}=this,t=this.el.getBoundingClientRect().width-this.getYScrollbarWidth(),{children:n}=e;for(let e=0;e<n.length;e+=1)if(n[e].getBoundingClientRect().width>t)return!0;return!1}needsYScrolling(){if(sC.test(this.props.overflowY))return!1;let{el:e}=this,t=this.el.getBoundingClientRect().height-this.getXScrollbarWidth(),{children:n}=e;for(let e=0;e<n.length;e+=1)if(n[e].getBoundingClientRect().height>t)return!0;return!1}getXScrollbarWidth(){return sC.test(this.props.overflowX)?0:this.el.offsetHeight-this.el.clientHeight}getYScrollbarWidth(){return sC.test(this.props.overflowY)?0:this.el.offsetWidth-this.el.clientWidth}},lC=class{constructor(e){this.masterCallback=e,this.currentMap={},this.depths={},this.callbackMap={},this.handleValue=(e,t)=>{let{depths:n,currentMap:r}=this,i=!1,a=!1;e===null?(--n[t],n[t]||(delete r[t],delete this.callbackMap[t],i=!0)):(i=t in r,r[t]=e,n[t]=(n[t]||0)+1,a=!0),this.masterCallback&&(i&&this.masterCallback(null,String(t)),a&&this.masterCallback(e,String(t)))}}createRef(e){let t=this.callbackMap[e];return t||=this.callbackMap[e]=t=>{this.handleValue(t,String(e))},t}collect(e,t,n){return rb(this.currentMap,e,t,n)}getAll(){return Xy(this.currentMap)}};function uC(e){let t=nv(e,`.fc-scrollgrid-shrink`),n=0;for(let e of t)n=Math.max(n,Cv(e));return Math.ceil(n)}function dC(e,t){return e.liquid&&t.liquid}function fC(e,t){return t.maxHeight!=null||dC(e,t)}function pC(e,t,n,r){let{expandRows:i}=n;return typeof t.content==`function`?t.content(n):J(`table`,{role:`presentation`,className:[t.tableClassName,e.syncRowHeights?`fc-scrollgrid-sync-table`:``].join(` `),style:{minWidth:n.tableMinWidth,width:n.clientWidth,height:i?n.clientHeight:``}},n.tableColGroupNode,J(r?`thead`:`tbody`,{role:`presentation`},typeof t.rowContent==`function`?t.rowContent(n):t.rowContent))}function mC(e,t){return Fv(e,t,Zy)}function hC(e,t){let n=[];for(let r of e){let e=r.span||1;for(let i=0;i<e;i+=1)n.push(J(`col`,{style:{width:r.width===`shrink`?gC(t):r.width||``,minWidth:r.minWidth||``}}))}return J(`colgroup`,{},...n)}function gC(e){return e??4}function _C(e){for(let t of e)if(t.width===`shrink`)return!0;return!1}function vC(e,t){let n=[`fc-scrollgrid`,t.theme.getClass(`table`)];return e&&n.push(`fc-scrollgrid-liquid`),n}function yC(e,t){let n=[`fc-scrollgrid-section`,`fc-scrollgrid-section-${e.type}`,e.className];return t&&e.liquid&&e.maxHeight==null&&n.push(`fc-scrollgrid-section-liquid`),e.isSticky&&n.push(`fc-scrollgrid-section-sticky`),n}function bC(e){return J(`div`,{className:`fc-scrollgrid-sticky-shim`,style:{width:e.clientWidth,minWidth:e.tableMinWidth}})}function xC(e){let{stickyHeaderDates:t}=e;return(t==null||t===`auto`)&&(t=e.height===`auto`||e.viewHeight===`auto`),t}function SC(e){let{stickyFooterScrollbar:t}=e;return(t==null||t===`auto`)&&(t=e.height===`auto`||e.viewHeight===`auto`),t}var CC=class extends vb{constructor(){super(...arguments),this.processCols=dy(e=>e,mC),this.renderMicroColGroup=dy(hC),this.scrollerRefs=new lC,this.scrollerElRefs=new lC(this._handleScrollerEl.bind(this)),this.state={shrinkWidth:null,forceYScrollbars:!1,scrollerClientWidths:{},scrollerClientHeights:{}},this.handleSizing=()=>{this.safeSetState(Object.assign({shrinkWidth:this.computeShrinkWidth()},this.computeScrollerDims()))}}render(){let{props:e,state:t,context:n}=this,r=e.sections||[],i=this.processCols(e.cols),a=this.renderMicroColGroup(i,t.shrinkWidth),o=vC(e.liquid,n);e.collapsibleWidth&&o.push(`fc-scrollgrid-collapsible`);let s=r.length,c=0,l,u=[],d=[],f=[];for(;c<s&&(l=r[c]).type===`header`;)u.push(this.renderSection(l,a,!0)),c+=1;for(;c<s&&(l=r[c]).type===`body`;)d.push(this.renderSection(l,a,!1)),c+=1;for(;c<s&&(l=r[c]).type===`footer`;)f.push(this.renderSection(l,a,!0)),c+=1;let p=!yS(),m={role:`rowgroup`};return J(`table`,{role:`grid`,className:o.join(` `),style:{height:e.height}},!(p||!u.length)&&J(`thead`,m,...u),!(p||!d.length)&&J(`tbody`,m,...d),!(p||!f.length)&&J(`tfoot`,m,...f),p&&J(`tbody`,m,...u,...d,...f))}renderSection(e,t,n){return`outerContent`in e?J(Ag,{key:e.key},e.outerContent):J(`tr`,{key:e.key,role:`presentation`,className:yC(e,this.props.liquid).join(` `)},this.renderChunkTd(e,t,e.chunk,n))}renderChunkTd(e,t,n,r){if(`outerContent`in n)return n.outerContent;let{props:i}=this,{forceYScrollbars:a,scrollerClientWidths:o,scrollerClientHeights:s}=this.state,c=fC(i,e),l=dC(i,e),u=i.liquid?a?`scroll`:c?`auto`:`hidden`:`visible`,d=e.key,f=pC(e,n,{tableColGroupNode:t,tableMinWidth:``,clientWidth:!i.collapsibleWidth&&o[d]!==void 0?o[d]:null,clientHeight:s[d]===void 0?null:s[d],expandRows:e.expandRows,syncRowHeights:!1,rowSyncHeights:[],reportRowHeightChange:()=>{}},r);return J(r?`th`:`td`,{ref:n.elRef,role:`presentation`},J(`div`,{className:`fc-scroller-harness${l?` fc-scroller-harness-liquid`:``}`},J(cC,{ref:this.scrollerRefs.createRef(d),elRef:this.scrollerElRefs.createRef(d),overflowY:u,overflowX:i.liquid?`hidden`:`visible`,maxHeight:e.maxHeight,liquid:l,liquidIsAbsolute:!0},f)))}_handleScrollerEl(e,t){let n=wC(this.props.sections,t);n&&xb(n.chunk.scrollerElRef,e)}componentDidMount(){this.handleSizing(),this.context.addResizeHandler(this.handleSizing)}componentDidUpdate(){this.handleSizing()}componentWillUnmount(){this.context.removeResizeHandler(this.handleSizing)}computeShrinkWidth(){return _C(this.props.cols)?uC(this.scrollerElRefs.getAll()):0}computeScrollerDims(){let e=FS(),{scrollerRefs:t,scrollerElRefs:n}=this,r=!1,i={},a={};for(let e in t.currentMap){let n=t.currentMap[e];if(n&&n.needsYScrolling()){r=!0;break}}for(let t of this.props.sections){let o=t.key,s=n.currentMap[o];if(s){let t=s.parentNode;i[o]=Math.floor(t.getBoundingClientRect().width-(r?e.y:0)),a[o]=Math.floor(t.getBoundingClientRect().height)}}return{forceYScrollbars:r,scrollerClientWidths:i,scrollerClientHeights:a}}};CC.addStateEquality({scrollerClientWidths:Zy,scrollerClientHeights:Zy});function wC(e,t){for(let n of e)if(n.key===t)return n;return null}var TC=class extends vb{constructor(){super(...arguments),this.buildPublicEvent=dy((e,t,n)=>new Wx(e,t,n)),this.handleEl=e=>{this.el=e,xb(this.props.elRef,e),e&&Jx(e,this.props.seg)}}render(){let{props:e,context:t}=this,{options:n}=t,{seg:r}=e,{eventRange:i}=r,{ui:a}=i,o={event:this.buildPublicEvent(t,i.def,i.instance),view:t.viewApi,timeText:e.timeText,textColor:a.textColor,backgroundColor:a.backgroundColor,borderColor:a.borderColor,isDraggable:!e.disableDragging&&eS(r,t),isStartResizable:!e.disableResizing&&tS(r,t),isEndResizable:!e.disableResizing&&nS(r),isMirror:!!(e.isDragging||e.isResizing||e.isDateSelecting),isStart:!!r.isStart,isEnd:!!r.isEnd,isPast:!!e.isPast,isFuture:!!e.isFuture,isToday:!!e.isToday,isSelected:!!e.isSelected,isDragging:!!e.isDragging,isResizing:!!e.isResizing};return J(Db,{elRef:this.handleEl,elTag:e.elTag,elAttrs:e.elAttrs,elClasses:[...aS(o),...r.eventRange.ui.classNames,...e.elClasses||[]],elStyle:e.elStyle,renderProps:o,generatorName:`eventContent`,customGenerator:n.eventContent,defaultGenerator:e.defaultGenerator,classNameGenerator:n.eventClassNames,didMount:n.eventDidMount,willUnmount:n.eventWillUnmount},e.children)}componentDidUpdate(e){this.el&&this.props.seg!==e.seg&&Jx(this.el,this.props.seg)}},EC=class extends vb{render(){let{props:e,context:t}=this,{options:n}=t,{seg:r}=e,{ui:i}=r.eventRange,a=rS(r,n.eventTimeFormat||e.defaultTimeFormat,t,e.defaultDisplayEventTime,e.defaultDisplayEventEnd);return J(TC,Object.assign({},e,{elTag:`a`,elStyle:{borderColor:i.borderColor,backgroundColor:i.backgroundColor},elAttrs:sS(r,t),defaultGenerator:DC,timeText:a}),(e,t)=>J(Ag,null,J(e,{elTag:`div`,elClasses:[`fc-event-main`],elStyle:{color:t.textColor}}),!!t.isStartResizable&&J(`div`,{className:`fc-event-resizer fc-event-resizer-start`}),!!t.isEndResizable&&J(`div`,{className:`fc-event-resizer fc-event-resizer-end`})))}};EC.addPropsEquality({seg:Zy});function DC(e){return J(`div`,{className:`fc-event-main-frame`},e.timeText&&J(`div`,{className:`fc-event-time`},e.timeText),J(`div`,{className:`fc-event-title-container`},J(`div`,{className:`fc-event-title fc-sticky`},e.event.title||J(Ag,null,`\xA0`))))}var OC=Py({day:`numeric`}),kC=class extends vb{constructor(){super(...arguments),this.refineRenderProps=fy(jC)}render(){let{props:e,context:t}=this,{options:n}=t,r=this.refineRenderProps({date:e.date,dateProfile:e.dateProfile,todayRange:e.todayRange,isMonthStart:e.isMonthStart||!1,showDayNumber:e.showDayNumber,extraRenderProps:e.extraRenderProps,viewApi:t.viewApi,dateEnv:t.dateEnv,monthStartFormat:n.monthStartFormat});return J(Db,{elRef:e.elRef,elTag:e.elTag,elAttrs:Object.assign(Object.assign({},e.elAttrs),r.isDisabled?{}:{"data-date":cy(e.date)}),elClasses:[...AS(r,t.theme),...e.elClasses||[]],elStyle:e.elStyle,renderProps:r,generatorName:`dayCellContent`,customGenerator:n.dayCellContent,defaultGenerator:e.defaultGenerator,classNameGenerator:r.isDisabled?void 0:n.dayCellClassNames,didMount:n.dayCellDidMount,willUnmount:n.dayCellWillUnmount},e.children)}};function AC(e){return!!(e.dayCellContent||Cb(`dayCellContent`,e))}function jC(e){let{date:t,dateEnv:n,dateProfile:r,isMonthStart:i}=e,a=kS(t,e.todayRange,null,r),o=e.showDayNumber?n.format(t,i?e.monthStartFormat:OC):``;return Object.assign(Object.assign(Object.assign({date:n.toDate(t),view:e.viewApi},a),{isMonthStart:i,dayNumberText:o}),e.extraRenderProps)}var MC=class extends vb{render(){let{props:e}=this,{seg:t}=e;return J(TC,{elTag:`div`,elClasses:[`fc-bg-event`],elStyle:{backgroundColor:t.eventRange.ui.backgroundColor},defaultGenerator:NC,seg:t,timeText:``,isDragging:!1,isResizing:!1,isDateSelecting:!1,isSelected:!1,isPast:e.isPast,isFuture:e.isFuture,isToday:e.isToday,disableDragging:!0,disableResizing:!0})}};function NC(e){let{title:t}=e.event;return t&&J(`div`,{className:`fc-event-title`},e.event.title)}function PC(e){return J(`div`,{className:`fc-${e}`})}var FC=e=>J(hb.Consumer,null,t=>{let{dateEnv:n,options:r}=t,{date:i}=e,a=r.weekNumberFormat||e.defaultFormat,o={num:n.computeWeekNumber(i),text:n.format(i,a),date:i};return J(Db,{elRef:e.elRef,elTag:e.elTag,elAttrs:e.elAttrs,elClasses:e.elClasses,elStyle:e.elStyle,renderProps:o,generatorName:`weekNumberContent`,customGenerator:r.weekNumberContent,defaultGenerator:IC,classNameGenerator:r.weekNumberClassNames,didMount:r.weekNumberDidMount,willUnmount:r.weekNumberWillUnmount},e.children)});function IC(e){return e.text}var LC=10,RC=class extends vb{constructor(){super(...arguments),this.state={titleId:cv()},this.handleRootEl=e=>{this.rootEl=e,this.props.elRef&&xb(this.props.elRef,e)},this.handleDocumentMouseDown=e=>{let t=ov(e);this.rootEl.contains(t)||this.handleCloseClick()},this.handleDocumentKeyDown=e=>{e.key===`Escape`&&this.handleCloseClick()},this.handleCloseClick=()=>{let{onClose:e}=this.props;e&&e()}}render(){let{theme:e,options:t}=this.context,{props:n,state:r}=this,i=[`fc-popover`,e.getClass(`popover`)].concat(n.extraClassNames||[]);return A_(J(`div`,Object.assign({},n.extraAttrs,{id:n.id,className:i.join(` `),"aria-labelledby":r.titleId,ref:this.handleRootEl}),J(`div`,{className:`fc-popover-header `+e.getClass(`popoverHeader`)},J(`span`,{className:`fc-popover-title`,id:r.titleId},n.title),J(`span`,{className:`fc-popover-close `+e.getIconClass(`close`),title:t.closeHint,onClick:this.handleCloseClick})),J(`div`,{className:`fc-popover-body `+e.getClass(`popoverContent`)},n.children)),n.parentEl)}componentDidMount(){document.addEventListener(`mousedown`,this.handleDocumentMouseDown),document.addEventListener(`keydown`,this.handleDocumentKeyDown),this.updateSize()}componentWillUnmount(){document.removeEventListener(`mousedown`,this.handleDocumentMouseDown),document.removeEventListener(`keydown`,this.handleDocumentKeyDown)}updateSize(){let{isRtl:e}=this.context,{alignmentEl:t,alignGridTop:n}=this.props,{rootEl:r}=this,i=RS(t);if(i){let a=r.getBoundingClientRect(),o=n?ev(t,`.fc-scrollgrid`).getBoundingClientRect().top:i.top,s=e?i.right-a.width:i.left;o=Math.max(o,LC),s=Math.min(s,document.documentElement.clientWidth-LC-a.width),s=Math.max(s,LC);let c=r.offsetParent.getBoundingClientRect();iv(r,{top:o-c.top,left:s-c.left})}}},zC=class extends HS{constructor(){super(...arguments),this.handleRootEl=e=>{this.rootEl=e,e?this.context.registerInteractiveComponent(this,{el:e,useEventCenter:!1}):this.context.unregisterInteractiveComponent(this)}}render(){let{options:e,dateEnv:t}=this.context,{props:n}=this,{startDate:r,todayRange:i,dateProfile:a}=n,o=t.format(r,e.dayPopoverFormat);return J(kC,{elRef:this.handleRootEl,date:r,dateProfile:a,todayRange:i},(t,r,i)=>J(RC,{elRef:i.ref,id:n.id,title:o,extraClassNames:[`fc-more-popover`].concat(i.className||[]),extraAttrs:i,parentEl:n.parentEl,alignmentEl:n.alignmentEl,alignGridTop:n.alignGridTop,onClose:n.onClose},AC(e)&&J(t,{elTag:`div`,elClasses:[`fc-more-popover-misc`]}),n.children))}queryHit(e,t,n,r){let{rootEl:i,props:a}=this;return e>=0&&e<n&&t>=0&&t<r?{dateProfile:a.dateProfile,dateSpan:Object.assign({allDay:!a.forceTimed,range:{start:a.startDate,end:a.endDate}},a.extraDateSpan),dayEl:i,rect:{left:0,top:0,right:n,bottom:r},layer:1}:null}},BC=class extends vb{constructor(){super(...arguments),this.state={isPopoverOpen:!1,popoverId:cv()},this.handleLinkEl=e=>{this.linkEl=e,this.props.elRef&&xb(this.props.elRef,e)},this.handleClick=e=>{let{props:t,context:n}=this,{moreLinkClick:r}=n.options,i=HC(t).start;function a(e){let{def:t,instance:r,range:i}=e.eventRange;return{event:new Wx(n,t,r),start:n.dateEnv.toDate(i.start),end:n.dateEnv.toDate(i.end),isStart:e.isStart,isEnd:e.isEnd}}typeof r==`function`&&(r=r({date:i,allDay:!!t.allDayDate,allSegs:t.allSegs.map(a),hiddenSegs:t.hiddenSegs.map(a),jsEvent:e,view:n.viewApi})),!r||r===`popover`?this.setState({isPopoverOpen:!0}):typeof r==`string`&&n.calendarApi.zoomTo(i,r)},this.handlePopoverClose=()=>{this.setState({isPopoverOpen:!1})}}render(){let{props:e,state:t}=this;return J(hb.Consumer,null,n=>{let{viewApi:r,options:i,calendarApi:a}=n,{moreLinkText:o}=i,{moreCnt:s}=e,c=HC(e),l=typeof o==`function`?o.call(a,s):`+${s} ${o}`,u=xv(i.moreLinkHint,[s],l),d={num:s,shortText:`+${s}`,text:l,view:r};return J(Ag,null,!!e.moreCnt&&J(Db,{elTag:e.elTag||`a`,elRef:this.handleLinkEl,elClasses:[...e.elClasses||[],`fc-more-link`],elStyle:e.elStyle,elAttrs:Object.assign(Object.assign(Object.assign({},e.elAttrs),fv(this.handleClick)),{title:u,"aria-expanded":t.isPopoverOpen,"aria-controls":t.isPopoverOpen?t.popoverId:``}),renderProps:d,generatorName:`moreLinkContent`,customGenerator:i.moreLinkContent,defaultGenerator:e.defaultGenerator||VC,classNameGenerator:i.moreLinkClassNames,didMount:i.moreLinkDidMount,willUnmount:i.moreLinkWillUnmount},e.children),t.isPopoverOpen&&J(zC,{id:t.popoverId,startDate:c.start,endDate:c.end,dateProfile:e.dateProfile,todayRange:e.todayRange,extraDateSpan:e.extraDateSpan,parentEl:this.parentEl,alignmentEl:e.alignmentElRef?e.alignmentElRef.current:this.linkEl,alignGridTop:e.alignGridTop,forceTimed:e.forceTimed,onClose:this.handlePopoverClose},e.popoverContent()))})}componentDidMount(){this.updateParentEl()}componentDidUpdate(){this.updateParentEl()}updateParentEl(){this.linkEl&&(this.parentEl=ev(this.linkEl,`.fc-view-harness`))}};function VC(e){return e.text}function HC(e){if(e.allDayDate)return{start:e.allDayDate,end:Rv(e.allDayDate,1)};let{hiddenSegs:t}=e;return{start:UC(t),end:GC(t)}}function UC(e){return e.reduce(WC).eventRange.range.start}function WC(e,t){return e.eventRange.range.start<t.eventRange.range.start?e:t}function GC(e){return e.reduce(KC).eventRange.range.end}function KC(e,t){return e.eventRange.range.end>t.eventRange.range.end?e:t}var qC=class{constructor(){this.handlers=[]}set(e){this.currentValue=e;for(let t of this.handlers)t(e)}subscribe(e){this.handlers.push(e),this.currentValue!==void 0&&e(this.currentValue)}},JC=class extends qC{constructor(){super(...arguments),this.map=new Map}handle(e){let{map:t}=this,n=!1;e.isActive?(t.set(e.id,e),n=!0):t.has(e.id)&&(t.delete(e.id),n=!0),n&&this.set(t)}},YC=[],XC={code:`en`,week:{dow:0,doy:4},direction:`ltr`,buttonText:{prev:`prev`,next:`next`,prevYear:`prev year`,nextYear:`next year`,year:`year`,today:`today`,month:`month`,week:`week`,day:`day`,list:`list`},weekText:`W`,weekTextLong:`Week`,closeHint:`Close`,timeHint:`Time`,eventHint:`Event`,allDayText:`all-day`,moreLinkText:`more`,noEventsText:`No events to display`},ZC=Object.assign(Object.assign({},XC),{buttonHints:{prev:`Previous $0`,next:`Next $0`,today(e,t){return t===`day`?`Today`:`This ${e}`}},viewHint:`$0 view`,navLinkHint:`Go to $0`,moreLinkHint(e){return`Show ${e} more event${e===1?``:`s`}`}});function QC(e){let t=e.length>0?e[0].code:`en`,n=YC.concat(e),r={en:ZC};for(let e of n)r[e.code]=e;return{map:r,defaultCode:t}}function $C(e,t){return typeof e==`object`&&!Array.isArray(e)?nw(e.code,[e.code],e):ew(e,t)}function ew(e,t){let n=[].concat(e||[]);return nw(e,n,tw(n,t)||ZC)}function tw(e,t){for(let n=0;n<e.length;n+=1){let r=e[n].toLocaleLowerCase().split(`-`);for(let e=r.length;e>0;--e){let n=r.slice(0,e).join(`-`);if(t[n])return t[n]}}return null}function nw(e,t,n){let r=Ky([XC,n],[`buttonText`]);delete r.code;let{week:i}=r;return delete r.week,{codeArg:e,codes:t,week:i,simpleNumberFormat:new Intl.NumberFormat(e),options:r}}function rw(e){return{id:hv(),name:e.name,premiumReleaseDate:e.premiumReleaseDate?new Date(e.premiumReleaseDate):void 0,deps:e.deps||[],reducers:e.reducers||[],isLoadingFuncs:e.isLoadingFuncs||[],contextInit:[].concat(e.contextInit||[]),eventRefiners:e.eventRefiners||{},eventDefMemberAdders:e.eventDefMemberAdders||[],eventSourceRefiners:e.eventSourceRefiners||{},isDraggableTransformers:e.isDraggableTransformers||[],eventDragMutationMassagers:e.eventDragMutationMassagers||[],eventDefMutationAppliers:e.eventDefMutationAppliers||[],dateSelectionTransformers:e.dateSelectionTransformers||[],datePointTransforms:e.datePointTransforms||[],dateSpanTransforms:e.dateSpanTransforms||[],views:e.views||{},viewPropsTransformers:e.viewPropsTransformers||[],isPropsValid:e.isPropsValid||null,externalDefTransforms:e.externalDefTransforms||[],viewContainerAppends:e.viewContainerAppends||[],eventDropTransformers:e.eventDropTransformers||[],componentInteractions:e.componentInteractions||[],calendarInteractions:e.calendarInteractions||[],themeClasses:e.themeClasses||{},eventSourceDefs:e.eventSourceDefs||[],cmdFormatter:e.cmdFormatter,recurringTypes:e.recurringTypes||[],namedTimeZonedImpl:e.namedTimeZonedImpl,initialView:e.initialView||``,elementDraggingImpl:e.elementDraggingImpl,optionChangeHandlers:e.optionChangeHandlers||{},scrollGridImpl:e.scrollGridImpl||null,listenerRefiners:e.listenerRefiners||{},optionRefiners:e.optionRefiners||{},propSetHandlers:e.propSetHandlers||{}}}function iw(e,t){let n={},r={premiumReleaseDate:void 0,reducers:[],isLoadingFuncs:[],contextInit:[],eventRefiners:{},eventDefMemberAdders:[],eventSourceRefiners:{},isDraggableTransformers:[],eventDragMutationMassagers:[],eventDefMutationAppliers:[],dateSelectionTransformers:[],datePointTransforms:[],dateSpanTransforms:[],views:{},viewPropsTransformers:[],isPropsValid:null,externalDefTransforms:[],viewContainerAppends:[],eventDropTransformers:[],componentInteractions:[],calendarInteractions:[],themeClasses:{},eventSourceDefs:[],cmdFormatter:null,recurringTypes:[],namedTimeZonedImpl:null,initialView:``,elementDraggingImpl:null,optionChangeHandlers:{},scrollGridImpl:null,listenerRefiners:{},optionRefiners:{},propSetHandlers:{}};function i(e){for(let t of e){let e=t.name,a=n[e];a===void 0?(n[e]=t.id,i(t.deps),r=ow(r,t)):a!==t.id&&console.warn(`Duplicate plugin '${e}'`)}}return e&&i(e),i(t),r}function aw(){let e=[],t=[],n;return(r,i)=>(n&&Fv(r,e)&&Fv(i,t)||(n=iw(r,i)),e=r,t=i,n)}function ow(e,t){return{premiumReleaseDate:sw(e.premiumReleaseDate,t.premiumReleaseDate),reducers:e.reducers.concat(t.reducers),isLoadingFuncs:e.isLoadingFuncs.concat(t.isLoadingFuncs),contextInit:e.contextInit.concat(t.contextInit),eventRefiners:Object.assign(Object.assign({},e.eventRefiners),t.eventRefiners),eventDefMemberAdders:e.eventDefMemberAdders.concat(t.eventDefMemberAdders),eventSourceRefiners:Object.assign(Object.assign({},e.eventSourceRefiners),t.eventSourceRefiners),isDraggableTransformers:e.isDraggableTransformers.concat(t.isDraggableTransformers),eventDragMutationMassagers:e.eventDragMutationMassagers.concat(t.eventDragMutationMassagers),eventDefMutationAppliers:e.eventDefMutationAppliers.concat(t.eventDefMutationAppliers),dateSelectionTransformers:e.dateSelectionTransformers.concat(t.dateSelectionTransformers),datePointTransforms:e.datePointTransforms.concat(t.datePointTransforms),dateSpanTransforms:e.dateSpanTransforms.concat(t.dateSpanTransforms),views:Object.assign(Object.assign({},e.views),t.views),viewPropsTransformers:e.viewPropsTransformers.concat(t.viewPropsTransformers),isPropsValid:t.isPropsValid||e.isPropsValid,externalDefTransforms:e.externalDefTransforms.concat(t.externalDefTransforms),viewContainerAppends:e.viewContainerAppends.concat(t.viewContainerAppends),eventDropTransformers:e.eventDropTransformers.concat(t.eventDropTransformers),calendarInteractions:e.calendarInteractions.concat(t.calendarInteractions),componentInteractions:e.componentInteractions.concat(t.componentInteractions),themeClasses:Object.assign(Object.assign({},e.themeClasses),t.themeClasses),eventSourceDefs:e.eventSourceDefs.concat(t.eventSourceDefs),cmdFormatter:t.cmdFormatter||e.cmdFormatter,recurringTypes:e.recurringTypes.concat(t.recurringTypes),namedTimeZonedImpl:t.namedTimeZonedImpl||e.namedTimeZonedImpl,initialView:e.initialView||t.initialView,elementDraggingImpl:e.elementDraggingImpl||t.elementDraggingImpl,optionChangeHandlers:Object.assign(Object.assign({},e.optionChangeHandlers),t.optionChangeHandlers),scrollGridImpl:t.scrollGridImpl||e.scrollGridImpl,listenerRefiners:Object.assign(Object.assign({},e.listenerRefiners),t.listenerRefiners),optionRefiners:Object.assign(Object.assign({},e.optionRefiners),t.optionRefiners),propSetHandlers:Object.assign(Object.assign({},e.propSetHandlers),t.propSetHandlers)}}function sw(e,t){return e===void 0?t:t===void 0?e:new Date(Math.max(e.valueOf(),t.valueOf()))}var cw=class extends ub{};cw.prototype.classes={root:`fc-theme-standard`,tableCellShaded:`fc-cell-shaded`,buttonGroup:`fc-button-group`,button:`fc-button fc-button-primary`,buttonActive:`fc-button-active`},cw.prototype.baseIconClass=`fc-icon`,cw.prototype.iconClasses={close:`fc-icon-x`,prev:`fc-icon-chevron-left`,next:`fc-icon-chevron-right`,prevYear:`fc-icon-chevrons-left`,nextYear:`fc-icon-chevrons-right`},cw.prototype.rtlIconClasses={prev:`fc-icon-chevron-right`,next:`fc-icon-chevron-left`,prevYear:`fc-icon-chevrons-right`,nextYear:`fc-icon-chevrons-left`},cw.prototype.iconOverrideOption=`buttonIcons`,cw.prototype.iconOverrideCustomButtonOption=`icon`,cw.prototype.iconOverridePrefix=`fc-icon-`;function lw(e,t){let n={},r;for(r in e)uw(r,n,e,t);for(r in t)uw(r,n,e,t);return n}function uw(e,t,n,r){if(t[e])return t[e];let i=dw(e,t,n,r);return i&&(t[e]=i),i}function dw(e,t,n,r){let i=n[e],a=r[e],o=e=>i&&i[e]!==null?i[e]:a&&a[e]!==null?a[e]:null,s=o(`component`),c=o(`superType`),l=null;if(c){if(c===e)throw Error(`Can't have a custom view type that references itself`);l=uw(c,t,n,r)}return!s&&l&&(s=l.component),s?{type:e,component:s,defaults:Object.assign(Object.assign({},l?l.defaults:{}),i?i.rawOptions:{}),overrides:Object.assign(Object.assign({},l?l.overrides:{}),a?a.rawOptions:{})}:null}function fw(e){return Jy(e,pw)}function pw(e){let t=typeof e==`function`?{component:e}:e,{component:n}=t;return t.content?n=mw(t):n&&!(n.prototype instanceof vb)&&(n=mw(Object.assign(Object.assign({},t),{content:n}))),{superType:t.type,component:n,rawOptions:t}}function mw(e){return t=>J(hb.Consumer,null,n=>J(Db,{elTag:`div`,elClasses:jb(n.viewSpec),renderProps:Object.assign(Object.assign({},t),{nextDayThreshold:n.options.nextDayThreshold}),generatorName:void 0,customGenerator:e.content,classNameGenerator:e.classNames,didMount:e.didMount,willUnmount:e.willUnmount}))}function hw(e,t,n,r){let i=fw(e),a=fw(t.views);return Jy(lw(i,a),e=>gw(e,a,t,n,r))}function gw(e,t,n,r,i){let a=e.overrides.duration||e.defaults.duration||r.duration||n.duration,o=null,s=``,c=``,l={};if(a&&(o=vw(a),o)){let e=Pv(o);s=e.unit,e.value===1&&(c=s,l=t[s]?t[s].rawOptions:{})}let u=t=>{let n=t.buttonText||{},r=e.defaults.buttonTextKey;return r!=null&&n[r]!=null?n[r]:n[e.type]==null?n[c]==null?null:n[c]:n[e.type]},d=t=>{let n=t.buttonHints||{},r=e.defaults.buttonTextKey;return r!=null&&n[r]!=null?n[r]:n[e.type]==null?n[c]==null?null:n[c]:n[e.type]};return{type:e.type,component:e.component,duration:o,durationUnit:s,singleUnit:c,optionDefaults:e.defaults,optionOverrides:Object.assign(Object.assign({},l),e.overrides),buttonTextOverride:u(r)||u(n)||e.overrides.buttonText,buttonTextDefault:u(i)||e.defaults.buttonText||u(Iy)||e.type,buttonTitleOverride:d(r)||d(n)||e.overrides.buttonHint,buttonTitleDefault:d(i)||e.defaults.buttonHint||d(Iy)}}var _w={};function vw(e){let t=JSON.stringify(e),n=_w[t];return n===void 0&&(n=Tv(e),_w[t]=n),n}function yw(e,t){return t.type===`CHANGE_VIEW_TYPE`&&(e=t.viewType),e}function bw(e,t){switch(t.type){case`CHANGE_DATE`:return t.dateMarker;default:return e}}function xw(e,t,n){let r=e.initialDate;return r==null?n.getDateMarker():t.createMarker(r)}function Sw(e,t){switch(t.type){case`SET_OPTION`:return Object.assign(Object.assign({},e),{[t.optionName]:t.rawOptionValue});default:return e}}function Cw(e,t,n,r){let i;switch(t.type){case`CHANGE_VIEW_TYPE`:return r.build(t.dateMarker||n);case`CHANGE_DATE`:return r.build(t.dateMarker);case`PREV`:if(i=r.buildPrev(e,n),i.isValid)return i;break;case`NEXT`:if(i=r.buildNext(e,n),i.isValid)return i}return e}function ww(e,t,n){let r=t?t.activeRange:null;return Ow({},Iw(e,n),r,n)}function Tw(e,t,n,r){let i=n?n.activeRange:null;switch(t.type){case`ADD_EVENT_SOURCES`:return Ow(e,t.sources,i,r);case`REMOVE_EVENT_SOURCE`:return kw(e,t.sourceId);case`PREV`:case`NEXT`:case`CHANGE_DATE`:case`CHANGE_VIEW_TYPE`:return n?Aw(e,i,r):e;case`FETCH_EVENT_SOURCES`:return Mw(e,t.sourceIds?Yy(t.sourceIds):Fw(e,r),i,t.isRefetch||!1,r);case`RECEIVE_EVENTS`:case`RECEIVE_EVENT_ERROR`:return Pw(e,t.sourceId,t.fetchId,t.fetchRange);case`REMOVE_ALL_EVENT_SOURCES`:return{};default:return e}}function Ew(e,t,n){let r=t?t.activeRange:null;return Mw(e,Fw(e,n),r,!0,n)}function Dw(e){for(let t in e)if(e[t].isFetching)return!0;return!1}function Ow(e,t,n,r){let i={};for(let e of t)i[e.sourceId]=e;return n&&(i=Aw(i,n,r)),Object.assign(Object.assign({},e),i)}function kw(e,t){return qy(e,e=>e.sourceId!==t)}function Aw(e,t,n){return Mw(e,qy(e,e=>jw(e,t,n)),t,!1,n)}function jw(e,t,n){return Lw(e,n)?!n.options.lazyFetching||!e.fetchRange||e.isFetching||t.start<e.fetchRange.start||t.end>e.fetchRange.end:!e.latestFetchId}function Mw(e,t,n,r,i){let a={};for(let o in e){let s=e[o];a[o]=t[o]?Nw(s,n,r,i):s}return a}function Nw(e,t,n,r){let{options:i,calendarApi:a}=r,o=r.pluginHooks.eventSourceDefs[e.sourceDefId],s=hv();return o.fetch({eventSource:e,range:t,isRefetch:n,context:r},n=>{let{rawEvents:o}=n;i.eventSourceSuccess&&(o=i.eventSourceSuccess.call(a,o,n.response)||o),e.success&&(o=e.success.call(a,o,n.response)||o),r.dispatch({type:`RECEIVE_EVENTS`,sourceId:e.sourceId,fetchId:s,fetchRange:t,rawEvents:o})},n=>{let o=!1;i.eventSourceFailure&&(i.eventSourceFailure.call(a,n),o=!0),e.failure&&(e.failure(n),o=!0),o||console.warn(n.message,n),r.dispatch({type:`RECEIVE_EVENT_ERROR`,sourceId:e.sourceId,fetchId:s,fetchRange:t,error:n})}),Object.assign(Object.assign({},e),{isFetching:!0,latestFetchId:s})}function Pw(e,t,n,r){let i=e[t];return i&&n===i.latestFetchId?Object.assign(Object.assign({},e),{[t]:Object.assign(Object.assign({},i),{isFetching:!1,fetchRange:r})}):e}function Fw(e,t){return qy(e,e=>Lw(e,t))}function Iw(e,t){let n=yx(t),r=[].concat(e.eventSources||[]),i=[];e.initialEvents&&r.unshift(e.initialEvents),e.events&&r.unshift(e.events);for(let e of r){let r=vx(e,t,n);r&&i.push(r)}return i}function Lw(e,t){return!t.pluginHooks.eventSourceDefs[e.sourceDefId].ignoreRange}function Rw(e,t){switch(t.type){case`UNSELECT_DATES`:return null;case`SELECT_DATES`:return t.selection;default:return e}}function zw(e,t){switch(t.type){case`UNSELECT_EVENT`:return``;case`SELECT_EVENT`:return t.eventInstanceId;default:return e}}function Bw(e,t){let n;switch(t.type){case`UNSET_EVENT_DRAG`:return null;case`SET_EVENT_DRAG`:return n=t.state,{affectedEvents:n.affectedEvents,mutatedEvents:n.mutatedEvents,isEvent:n.isEvent};default:return e}}function Vw(e,t){let n;switch(t.type){case`UNSET_EVENT_RESIZE`:return null;case`SET_EVENT_RESIZE`:return n=t.state,{affectedEvents:n.affectedEvents,mutatedEvents:n.mutatedEvents,isEvent:n.isEvent};default:return e}}function Hw(e,t,n,r,i){return{header:e.headerToolbar?Uw(e.headerToolbar,e,t,n,r,i):null,footer:e.footerToolbar?Uw(e.footerToolbar,e,t,n,r,i):null}}function Uw(e,t,n,r,i,a){let o={},s=[],c=!1;for(let l in e){let u=e[l],d=Ww(u,t,n,r,i,a);o[l]=d.widgets,s.push(...d.viewsWithButtons),c||=d.hasTitle}return{sectionWidgets:o,viewsWithButtons:s,hasTitle:c}}function Ww(e,t,n,r,i,a){let o=t.direction===`rtl`,s=t.customButtons||{},c=n.buttonText||{},l=t.buttonText||{},u=n.buttonHints||{},d=t.buttonHints||{},f=e?e.split(` `):[],p=[],m=!1;return{widgets:f.map(e=>e.split(`,`).map(e=>{if(e===`title`)return m=!0,{buttonName:e};let n,f,h,g,_,v;if(n=s[e])h=e=>{n.click&&n.click.call(e.target,e,e.target)},(g=r.getCustomButtonIconClass(n))||(g=r.getIconClass(e,o))||(_=n.text),v=n.hint||n.text;else if(f=i[e]){p.push(e),h=()=>{a.changeView(e)},(_=f.buttonTextOverride)||(g=r.getIconClass(e,o))||(_=f.buttonTextDefault);let n=f.buttonTextOverride||f.buttonTextDefault;v=xv(f.buttonTitleOverride||f.buttonTitleDefault||t.viewHint,[n,e],n)}else if(a[e]){if(h=()=>{a[e]()},(_=c[e])||(g=r.getIconClass(e,o))||(_=l[e]),e===`prevYear`||e===`nextYear`){let t=e===`prevYear`?`prev`:`next`;v=xv(u[t]||d[t],[l.year||`year`,`year`],l[e])}else v=t=>xv(u[e]||d[e],[l[t]||t,t],l[e])}return{buttonName:e,buttonClick:h,buttonIcon:g,buttonText:_,buttonHint:v}})),viewsWithButtons:p,hasTitle:m}}var Gw=class{constructor(e,t,n){this.type=e,this.getCurrentData=t,this.dateEnv=n}get calendar(){return this.getCurrentData().calendarApi}get title(){return this.getCurrentData().viewTitle}get activeStart(){return this.dateEnv.toDate(this.getCurrentData().dateProfile.activeRange.start)}get activeEnd(){return this.dateEnv.toDate(this.getCurrentData().dateProfile.activeRange.end)}get currentStart(){return this.dateEnv.toDate(this.getCurrentData().dateProfile.currentRange.start)}get currentEnd(){return this.dateEnv.toDate(this.getCurrentData().dateProfile.currentRange.end)}getOption(e){return this.getCurrentData().options[e]}},Kw=rw({name:`array-event-source`,eventSourceDefs:[{ignoreRange:!0,parseMeta(e){return Array.isArray(e.events)?e.events:null},fetch(e,t){t({rawEvents:e.eventSource.meta})}}]}),qw=rw({name:`func-event-source`,eventSourceDefs:[{parseMeta(e){return typeof e.events==`function`?e.events:null},fetch(e,t,n){let{dateEnv:r}=e.context,i=e.eventSource.meta;hS(i.bind(null,fS(e.range,r)),e=>t({rawEvents:e}),n)}}]}),Jw=rw({name:`json-event-source`,eventSourceRefiners:{method:String,extraParams:Y,startParam:String,endParam:String,timeZoneParam:String},eventSourceDefs:[{parseMeta(e){return e.url&&(e.format===`json`||!e.format)?{url:e.url,format:`json`,method:(e.method||`GET`).toUpperCase(),extraParams:e.extraParams,startParam:e.startParam,endParam:e.endParam,timeZoneParam:e.timeZoneParam}:null},fetch(e,t,n){let{meta:r}=e.eventSource,i=Yw(r,e.range,e.context);_S(r.method,r.url,i).then(([e,n])=>{t({rawEvents:e,response:n})},n)}}]});function Yw(e,t,n){let{dateEnv:r,options:i}=n,a,o,s,c,l={};return a=e.startParam,a??=i.startParam,o=e.endParam,o??=i.endParam,s=e.timeZoneParam,s??=i.timeZoneParam,c=typeof e.extraParams==`function`?e.extraParams():e.extraParams||{},Object.assign(l,c),l[a]=r.formatIso(t.start),l[o]=r.formatIso(t.end),r.timeZone!==`local`&&(l[s]=r.timeZone),l}var Xw=rw({name:`simple-recurring-event`,recurringTypes:[{parse(e,t){if(e.daysOfWeek||e.startTime||e.endTime||e.startRecur||e.endRecur){let n={daysOfWeek:e.daysOfWeek||null,startTime:e.startTime||null,endTime:e.endTime||null,startRecur:e.startRecur?t.createMarker(e.startRecur):null,endRecur:e.endRecur?t.createMarker(e.endRecur):null,dateEnv:t},r;return e.duration&&(r=e.duration),!r&&e.startTime&&e.endTime&&(r=kv(e.endTime,e.startTime)),{allDayGuess:!e.startTime&&!e.endTime,duration:r,typeData:n}}return null},expand(e,t,n){let r=Fb(t,{start:e.startRecur,end:e.endRecur});return r?Zw(e.daysOfWeek,e.startTime,e.dateEnv,n,r):[]}}],eventRefiners:{daysOfWeek:Y,startTime:Tv,endTime:Tv,duration:Tv,startRecur:Y,endRecur:Y}});function Zw(e,t,n,r,i){let a=e?Yy(e):null,o=Jv(i.start),s=i.end,c=[];for(t&&(t.milliseconds<0?s=Rv(s,1):t.milliseconds>=864e5&&(o=Rv(o,-1)));o<s;){let e;(!a||a[o.getUTCDay()])&&(e=t?r.add(o,t):o,c.push(r.createMarker(n.toDate(e)))),o=Rv(o,1)}return c}var Qw=rw({name:`change-handler`,optionChangeHandlers:{events(e,t){$w([e],t)},eventSources:$w}});function $w(e,t){let n=Xy(t.getCurrentData().eventSources);if(n.length===1&&e.length===1&&Array.isArray(n[0]._raw)&&Array.isArray(e[0])){t.dispatch({type:`RESET_RAW_EVENTS`,sourceId:n[0].sourceId,rawEvents:e[0]});return}let r=[];for(let t of e){let e=!1;for(let r=0;r<n.length;r+=1)if(n[r]._raw===t){n.splice(r,1),e=!0;break}e||r.push(t)}for(let e of n)t.dispatch({type:`REMOVE_EVENT_SOURCE`,sourceId:e.sourceId});for(let e of r)t.calendarApi.addEventSource(e)}function eT(e,t){t.emitter.trigger(`datesSet`,Object.assign(Object.assign({},fS(e.activeRange,t.dateEnv)),{view:t.viewApi}))}function tT(e,t){let{emitter:n}=t;n.hasHandlers(`eventsSet`)&&n.trigger(`eventsSet`,Kx(e,t))}var nT=[Kw,qw,Jw,Xw,Qw,rw({name:`misc`,isLoadingFuncs:[e=>Dw(e.eventSources)],propSetHandlers:{dateProfile:eT,eventStore:tT}})],rT=class{constructor(e,t){this.runTaskOption=e,this.drainedOption=t,this.queue=[],this.delayedRunner=new Q_(this.drain.bind(this))}request(e,t){this.queue.push(e),this.delayedRunner.request(t)}pause(e){this.delayedRunner.pause(e)}resume(e,t){this.delayedRunner.resume(e,t)}drain(){let{queue:e}=this;for(;e.length;){let t=[],n;for(;n=e.shift();)this.runTask(n),t.push(n);this.drained(t)}}runTask(e){this.runTaskOption&&this.runTaskOption(e)}drained(e){this.drainedOption&&this.drainedOption(e)}};function iT(e,t,n){let r;return r=/^(year|month)$/.test(e.currentRangeUnit)?e.currentRange:e.activeRange,n.formatRange(r.start,r.end,Py(t.titleFormat||aT(e)),{isEndExclusive:e.isRangeAllDay,defaultSeparator:t.titleRangeSeparator})}function aT(e){let{currentRangeUnit:t}=e;if(t===`year`)return{year:`numeric`};if(t===`month`)return{year:`numeric`,month:`long`};let n=qv(e.currentRange.start,e.currentRange.end);return n!==null&&n>1?{year:`numeric`,month:`short`,day:`numeric`}:{year:`numeric`,month:`long`,day:`numeric`}}var oT=class{constructor(){this.resetListeners=new Set}handleInput(e,t){let n=this.dateEnv;if(e!==n&&(typeof t==`function`?this.nowFn=t:n||(this.nowAnchorDate=e.toDate(t?e.createMarker(t):e.createNowMarker()),this.nowAnchorQueried=Date.now()),this.dateEnv=e,n))for(let e of this.resetListeners.values())e()}getDateMarker(){return this.nowAnchorDate?this.dateEnv.timestampToMarker(this.nowAnchorDate.valueOf()+(Date.now()-this.nowAnchorQueried)):this.dateEnv.createMarker(this.nowFn())}addResetListener(e){this.resetListeners.add(e)}removeResetListener(e){this.resetListeners.delete(e)}},sT=class{constructor(e){this.computeCurrentViewData=dy(this._computeCurrentViewData),this.organizeRawLocales=dy(QC),this.buildLocale=dy($C),this.buildPluginHooks=aw(),this.buildDateEnv=dy(cT),this.buildTheme=dy(lT),this.parseToolbars=dy(Hw),this.buildViewSpecs=dy(hw),this.buildDateProfileGenerator=fy(uT),this.buildViewApi=dy(dT),this.buildViewUiProps=fy(mT),this.buildEventUiBySource=dy(fT,Zy),this.buildEventUiBases=dy(pT),this.parseContextBusinessHours=fy(gT),this.buildTitle=dy(iT),this.nowManager=new oT,this.emitter=new Ax,this.actionRunner=new rT(this._handleAction.bind(this),this.updateData.bind(this)),this.currentCalendarOptionsInput={},this.currentCalendarOptionsRefined={},this.currentViewOptionsInput={},this.currentViewOptionsRefined={},this.currentCalendarOptionsRefiners={},this.optionsForRefining=[],this.optionsForHandling=[],this.getCurrentData=()=>this.data,this.dispatch=e=>{this.actionRunner.request(e)},this.props=e,this.actionRunner.pause(),this.nowManager=new oT;let t={},n=this.computeOptionsData(e.optionOverrides,t,e.calendarApi),r=n.calendarOptions.initialView||n.pluginHooks.initialView,i=this.computeCurrentViewData(r,n,e.optionOverrides,t);e.calendarApi.currentDataManager=this,this.emitter.setThisContext(e.calendarApi),this.emitter.setOptions(i.options);let a={nowManager:this.nowManager,dateEnv:n.dateEnv,options:n.calendarOptions,pluginHooks:n.pluginHooks,calendarApi:e.calendarApi,dispatch:this.dispatch,emitter:this.emitter,getCurrentData:this.getCurrentData},o=xw(n.calendarOptions,n.dateEnv,this.nowManager),s=i.dateProfileGenerator.build(o);Lb(s.activeRange,o)||(o=s.currentRange.start);for(let e of n.pluginHooks.contextInit)e(a);let c=ww(n.calendarOptions,s,a),l={dynamicOptionOverrides:t,currentViewType:r,currentDate:o,dateProfile:s,businessHours:this.parseContextBusinessHours(a),eventSources:c,eventUiBases:{},eventStore:ox(),renderableEventStore:ox(),dateSelection:null,eventSelection:``,eventDrag:null,eventResize:null,selectionConfig:this.buildViewUiProps(a).selectionConfig},u=Object.assign(Object.assign({},a),l);for(let e of n.pluginHooks.reducers)Object.assign(l,e(null,null,u));hT(l,a)&&this.emitter.trigger(`loading`,!0),this.state=l,this.updateData(),this.actionRunner.resume()}resetOptions(e,t){let{props:n}=this;t===void 0?n.optionOverrides=e:(n.optionOverrides=Object.assign(Object.assign({},n.optionOverrides||{}),e),this.optionsForRefining.push(...t)),(t===void 0||t.length)&&this.actionRunner.request({type:`NOTHING`})}_handleAction(e){let{props:t,state:n,emitter:r}=this,i=Sw(n.dynamicOptionOverrides,e),a=this.computeOptionsData(t.optionOverrides,i,t.calendarApi),o=yw(n.currentViewType,e),s=this.computeCurrentViewData(o,a,t.optionOverrides,i);t.calendarApi.currentDataManager=this,r.setThisContext(t.calendarApi),r.setOptions(s.options);let c={nowManager:this.nowManager,dateEnv:a.dateEnv,options:a.calendarOptions,pluginHooks:a.pluginHooks,calendarApi:t.calendarApi,dispatch:this.dispatch,emitter:r,getCurrentData:this.getCurrentData},{currentDate:l,dateProfile:u}=n;this.data&&this.data.dateProfileGenerator!==s.dateProfileGenerator&&(u=s.dateProfileGenerator.build(l)),l=bw(l,e),u=Cw(u,e,l,s.dateProfileGenerator),e.type!==`PREV`&&e.type!==`NEXT`&&Lb(u.currentRange,l)||(l=u.currentRange.start);let d=Tw(n.eventSources,e,u,c),f=xx(n.eventStore,e,d,u,c),p=Dw(d)&&!s.options.progressiveEventRendering&&n.renderableEventStore||f,{eventUiSingleBase:m,selectionConfig:h}=this.buildViewUiProps(c),g=this.buildEventUiBySource(d),_=this.buildEventUiBases(p.defs,m,g),v={dynamicOptionOverrides:i,currentViewType:o,currentDate:l,dateProfile:u,eventSources:d,eventStore:f,renderableEventStore:p,selectionConfig:h,eventUiBases:_,businessHours:this.parseContextBusinessHours(c),dateSelection:Rw(n.dateSelection,e),eventSelection:zw(n.eventSelection,e),eventDrag:Bw(n.eventDrag,e),eventResize:Vw(n.eventResize,e)},y=Object.assign(Object.assign({},c),v);for(let t of a.pluginHooks.reducers)Object.assign(v,t(n,e,y));let b=hT(n,c),x=hT(v,c);!b&&x?r.trigger(`loading`,!0):b&&!x&&r.trigger(`loading`,!1),this.state=v,t.onAction&&t.onAction(e)}updateData(){let{props:e,state:t}=this,n=this.data,r=this.computeOptionsData(e.optionOverrides,t.dynamicOptionOverrides,e.calendarApi),i=this.computeCurrentViewData(t.currentViewType,r,e.optionOverrides,t.dynamicOptionOverrides),a=this.data=Object.assign(Object.assign(Object.assign({nowManager:this.nowManager,viewTitle:this.buildTitle(t.dateProfile,i.options,r.dateEnv),calendarApi:e.calendarApi,dispatch:this.dispatch,emitter:this.emitter,getCurrentData:this.getCurrentData},r),i),t),o=r.pluginHooks.optionChangeHandlers,s=n&&n.calendarOptions,c=r.calendarOptions;if(s&&s!==c){s.timeZone!==c.timeZone&&(t.eventSources=a.eventSources=Ew(a.eventSources,t.dateProfile,a),t.eventStore=a.eventStore=Dx(a.eventStore,n.dateEnv,a.dateEnv),t.renderableEventStore=a.renderableEventStore=Dx(a.renderableEventStore,n.dateEnv,a.dateEnv));for(let e in o)(this.optionsForHandling.indexOf(e)!==-1||s[e]!==c[e])&&o[e](c[e],a)}this.optionsForHandling=[],e.onData&&e.onData(a)}computeOptionsData(e,t,n){if(!this.optionsForRefining.length&&e===this.stableOptionOverrides&&t===this.stableDynamicOptionOverrides)return this.stableCalendarOptionsData;let{refinedOptions:r,pluginHooks:i,localeDefaults:a,availableLocaleData:o,extra:s}=this.processRawCalendarOptions(e,t);_T(s);let c=this.buildDateEnv(r.timeZone,r.locale,r.weekNumberCalculation,r.firstDay,r.weekText,i,o,r.defaultRangeSeparator),l=this.buildViewSpecs(i.views,this.stableOptionOverrides,this.stableDynamicOptionOverrides,a),u=this.buildTheme(r,i),d=this.parseToolbars(r,this.stableOptionOverrides,u,l,n);return this.stableCalendarOptionsData={calendarOptions:r,pluginHooks:i,dateEnv:c,viewSpecs:l,theme:u,toolbarConfig:d,localeDefaults:a,availableRawLocales:o.map}}processRawCalendarOptions(e,t){let{locales:n,locale:r}=Uy([Iy,e,t]),i=this.organizeRawLocales(n),a=i.map,o=this.buildLocale(r||i.defaultCode,a).options,s=this.buildPluginHooks(e.plugins||[],nT),c=this.currentCalendarOptionsRefiners=Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},Fy),Ly),Ry),s.listenerRefiners),s.optionRefiners),l={},u=Uy([Iy,o,e,t]),d={},f=this.currentCalendarOptionsInput,p=this.currentCalendarOptionsRefined,m=!1;for(let e in u)this.optionsForRefining.indexOf(e)===-1&&(u[e]===f[e]||zy[e]&&e in f&&zy[e](f[e],u[e]))?d[e]=p[e]:c[e]?(d[e]=c[e](u[e]),m=!0):l[e]=f[e];return m&&(this.currentCalendarOptionsInput=u,this.currentCalendarOptionsRefined=d,this.stableOptionOverrides=e,this.stableDynamicOptionOverrides=t),this.optionsForHandling.push(...this.optionsForRefining),this.optionsForRefining=[],{rawOptions:this.currentCalendarOptionsInput,refinedOptions:this.currentCalendarOptionsRefined,pluginHooks:s,availableLocaleData:i,localeDefaults:o,extra:l}}_computeCurrentViewData(e,t,n,r){let i=t.viewSpecs[e];if(!i)throw Error(`viewType "${e}" is not available. Please make sure you've loaded all neccessary plugins`);let{refinedOptions:a,extra:o}=this.processRawViewOptions(i,t.pluginHooks,t.localeDefaults,n,r);return _T(o),this.nowManager.handleInput(t.dateEnv,a.now),{viewSpec:i,options:a,dateProfileGenerator:this.buildDateProfileGenerator({dateProfileGeneratorClass:i.optionDefaults.dateProfileGeneratorClass,nowManager:this.nowManager,duration:i.duration,durationUnit:i.durationUnit,usesMinMaxTime:i.optionDefaults.usesMinMaxTime,dateEnv:t.dateEnv,calendarApi:this.props.calendarApi,slotMinTime:a.slotMinTime,slotMaxTime:a.slotMaxTime,showNonCurrentDates:a.showNonCurrentDates,dayCount:a.dayCount,dateAlignment:a.dateAlignment,dateIncrement:a.dateIncrement,hiddenDays:a.hiddenDays,weekends:a.weekends,validRangeInput:a.validRange,visibleRangeInput:a.visibleRange,fixedWeekCount:a.fixedWeekCount}),viewApi:this.buildViewApi(e,this.getCurrentData,t.dateEnv)}}processRawViewOptions(e,t,n,r,i){let a=Uy([Iy,e.optionDefaults,n,r,e.optionOverrides,i]),o=Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},Fy),Ly),Ry),Hy),t.listenerRefiners),t.optionRefiners),s={},c=this.currentViewOptionsInput,l=this.currentViewOptionsRefined,u=!1,d={};for(let e in a)a[e]===c[e]||zy[e]&&zy[e](a[e],c[e])?s[e]=l[e]:(a[e]===this.currentCalendarOptionsInput[e]||zy[e]&&zy[e](a[e],this.currentCalendarOptionsInput[e])?e in this.currentCalendarOptionsRefined&&(s[e]=this.currentCalendarOptionsRefined[e]):o[e]?s[e]=o[e](a[e]):d[e]=a[e],u=!0);return u&&(this.currentViewOptionsInput=a,this.currentViewOptionsRefined=s),{rawOptions:this.currentViewOptionsInput,refinedOptions:this.currentViewOptionsRefined,extra:d}}};function cT(e,t,n,r,i,a,o,s){let c=$C(t||o.defaultCode,o.map);return new lb({calendarSystem:`gregory`,timeZone:e,namedTimeZoneImpl:a.namedTimeZonedImpl,locale:c,weekNumberCalculation:n,firstDay:r,weekText:i,cmdFormatter:a.cmdFormatter,defaultSeparator:s})}function lT(e,t){return new(t.themeClasses[e.themeSystem]||cw)(e)}function uT(e){return new(e.dateProfileGeneratorClass||Hb)(e)}function dT(e,t,n){return new Gw(e,t,n)}function fT(e){return Jy(e,e=>e.ui)}function pT(e,t,n){let r={"":t};for(let t in e){let i=e[t];i.sourceId&&n[i.sourceId]&&(r[t]=n[i.sourceId])}return r}function mT(e){let{options:t}=e;return{eventUiSingleBase:mx({display:t.eventDisplay,editable:t.editable,startEditable:t.eventStartEditable,durationEditable:t.eventDurationEditable,constraint:t.eventConstraint,overlap:typeof t.eventOverlap==`boolean`?t.eventOverlap:void 0,allow:t.eventAllow,backgroundColor:t.eventBackgroundColor,borderColor:t.eventBorderColor,textColor:t.eventTextColor,color:t.eventColor},e),selectionConfig:mx({constraint:t.selectConstraint,overlap:typeof t.selectOverlap==`boolean`?t.selectOverlap:void 0,allow:t.selectAllow},e)}}function hT(e,t){for(let n of t.pluginHooks.isLoadingFuncs)if(n(e))return!0;return!1}function gT(e){return Px(e.options.businessHours,e)}function _T(e,t){for(let n in e)console.warn(`Unknown option '${n}'`+(t?` for view '${t}'`:``))}var vT=class extends vb{render(){return J(`div`,{className:`fc-toolbar-chunk`},...this.props.widgetGroups.map(e=>this.renderWidgetGroup(e)))}renderWidgetGroup(e){let{props:t}=this,{theme:n}=this.context,r=[],i=!0;for(let a of e){let{buttonName:e,buttonClick:o,buttonText:s,buttonIcon:c,buttonHint:l}=a;if(e===`title`)i=!1,r.push(J(`h2`,{className:`fc-toolbar-title`,id:t.titleId},t.title));else{let i=e===t.activeButton,a=!t.isTodayEnabled&&e===`today`||!t.isPrevEnabled&&e===`prev`||!t.isNextEnabled&&e===`next`,u=[`fc-${e}-button`,n.getClass(`button`)];i&&u.push(n.getClass(`buttonActive`)),r.push(J(`button`,{type:`button`,title:typeof l==`function`?l(t.navUnit):l,disabled:a,"aria-pressed":i,className:u.join(` `),onClick:o},s||(c?J(`span`,{className:c,role:`img`}):``)))}}return r.length>1?J(`div`,{className:i&&n.getClass(`buttonGroup`)||``},...r):r[0]}},yT=class extends vb{render(){let{model:e,extraClassName:t}=this.props,n=!1,r,i,a=e.sectionWidgets,o=a.center;return a.left?(n=!0,r=a.left):r=a.start,a.right?(n=!0,i=a.right):i=a.end,J(`div`,{className:[t||``,`fc-toolbar`,n?`fc-toolbar-ltr`:``].join(` `)},this.renderSection(`start`,r||[]),this.renderSection(`center`,o||[]),this.renderSection(`end`,i||[]))}renderSection(e,t){let{props:n}=this;return J(vT,{key:e,widgetGroups:t,title:n.title,navUnit:n.navUnit,activeButton:n.activeButton,isTodayEnabled:n.isTodayEnabled,isPrevEnabled:n.isPrevEnabled,isNextEnabled:n.isNextEnabled,titleId:n.titleId})}},bT=class extends vb{constructor(){super(...arguments),this.state={availableWidth:null},this.handleEl=e=>{this.el=e,xb(this.props.elRef,e),this.updateAvailableWidth()},this.handleResize=()=>{this.updateAvailableWidth()}}render(){let{props:e,state:t}=this,{aspectRatio:n}=e,r=[`fc-view-harness`,n||e.liquid||e.height?`fc-view-harness-active`:`fc-view-harness-passive`],i=``,a=``;return n?t.availableWidth===null?a=`${1/n*100}%`:i=t.availableWidth/n:i=e.height||``,J(`div`,{"aria-labelledby":e.labeledById,ref:this.handleEl,className:r.join(` `),style:{height:i,paddingBottom:a}},e.children)}componentDidMount(){this.context.addResizeHandler(this.handleResize)}componentWillUnmount(){this.context.removeResizeHandler(this.handleResize)}updateAvailableWidth(){this.el&&this.props.aspectRatio&&this.setState({availableWidth:this.el.offsetWidth})}},xT=class extends SS{constructor(e){super(e),this.handleSegClick=(e,t)=>{let{component:n}=this,{context:r}=n,i=Yx(t);if(i&&n.isValidSegDownEl(e.target)){let a=ev(e.target,`.fc-event-forced-url`),o=a?a.querySelector(`a[href]`).href:``;r.emitter.trigger(`eventClick`,{el:t,event:new Wx(n.context,i.eventRange.def,i.eventRange.instance),jsEvent:e,view:r.viewApi}),o&&!e.defaultPrevented&&(window.location.href=o)}},this.destroy=uv(e.el,`click`,`.fc-event`,this.handleSegClick)}},ST=class extends SS{constructor(e){super(e),this.handleEventElRemove=e=>{e===this.currentSegEl&&this.handleSegLeave(null,this.currentSegEl)},this.handleSegEnter=(e,t)=>{Yx(t)&&(this.currentSegEl=t,this.triggerEvent(`eventMouseEnter`,e,t))},this.handleSegLeave=(e,t)=>{this.currentSegEl&&(this.currentSegEl=null,this.triggerEvent(`eventMouseLeave`,e,t))},this.removeHoverListeners=dv(e.el,`.fc-event`,this.handleSegEnter,this.handleSegLeave)}destroy(){this.removeHoverListeners()}triggerEvent(e,t,n){let{component:r}=this,{context:i}=r,a=Yx(n);(!t||r.isValidSegDownEl(t.target))&&i.emitter.trigger(e,{el:n,event:new Wx(i,a.eventRange.def,a.eventRange.instance),jsEvent:t,view:i.viewApi})}},CT=class extends _b{constructor(){super(...arguments),this.buildViewContext=dy(gb),this.buildViewPropTransformers=dy(TT),this.buildToolbarProps=dy(wT),this.headerRef=kg(),this.footerRef=kg(),this.interactionsStore={},this.state={viewLabelId:cv()},this.registerInteractiveComponent=(e,t)=>{let n=CS(e,t),r=[xT,ST].concat(this.props.pluginHooks.componentInteractions).map(e=>new e(n));this.interactionsStore[e.uid]=r,wS[e.uid]=n},this.unregisterInteractiveComponent=e=>{let t=this.interactionsStore[e.uid];if(t){for(let e of t)e.destroy();delete this.interactionsStore[e.uid]}delete wS[e.uid]},this.resizeRunner=new Q_(()=>{this.props.emitter.trigger(`_resize`,!0),this.props.emitter.trigger(`windowResize`,{view:this.props.viewApi})}),this.handleWindowResize=e=>{let{options:t}=this.props;t.handleWindowResize&&e.target===window&&this.resizeRunner.request(t.windowResizeDelay)}}render(){let{props:e}=this,{toolbarConfig:t,options:n}=e,r=!1,i=``,a;e.isHeightAuto||e.forPrint?i=``:n.height==null?n.contentHeight==null?a=Math.max(n.aspectRatio,.5):i=n.contentHeight:r=!0;let o=this.buildViewContext(e.viewSpec,e.viewApi,e.options,e.dateProfileGenerator,e.dateEnv,e.nowManager,e.theme,e.pluginHooks,e.dispatch,e.getCurrentData,e.emitter,e.calendarApi,this.registerInteractiveComponent,this.unregisterInteractiveComponent),s=t.header&&t.header.hasTitle?this.state.viewLabelId:void 0;return J(hb.Provider,{value:o},J(TS,{unit:`day`},n=>{let o=this.buildToolbarProps(e.viewSpec,e.dateProfile,e.dateProfileGenerator,e.currentDate,n,e.viewTitle);return J(Ag,null,t.header&&J(yT,Object.assign({ref:this.headerRef,extraClassName:`fc-header-toolbar`,model:t.header,titleId:s},o)),J(bT,{liquid:r,height:i,aspectRatio:a,labeledById:s},this.renderView(e),this.buildAppendContent()),t.footer&&J(yT,Object.assign({ref:this.footerRef,extraClassName:`fc-footer-toolbar`,model:t.footer,titleId:``},o)))}))}componentDidMount(){let{props:e}=this;this.calendarInteractions=e.pluginHooks.calendarInteractions.map(t=>new t(e)),window.addEventListener(`resize`,this.handleWindowResize);let{propSetHandlers:t}=e.pluginHooks;for(let n in t)t[n](e[n],e)}componentDidUpdate(e){let{props:t}=this,{propSetHandlers:n}=t.pluginHooks;for(let r in n)t[r]!==e[r]&&n[r](t[r],t)}componentWillUnmount(){window.removeEventListener(`resize`,this.handleWindowResize),this.resizeRunner.clear();for(let e of this.calendarInteractions)e.destroy();this.props.emitter.trigger(`_unmount`)}buildAppendContent(){let{props:e}=this;return J(Ag,{},...e.pluginHooks.viewContainerAppends.map(t=>t(e)))}renderView(e){let{pluginHooks:t}=e,{viewSpec:n}=e,r={dateProfile:e.dateProfile,businessHours:e.businessHours,eventStore:e.renderableEventStore,eventUiBases:e.eventUiBases,dateSelection:e.dateSelection,eventSelection:e.eventSelection,eventDrag:e.eventDrag,eventResize:e.eventResize,isHeightAuto:e.isHeightAuto,forPrint:e.forPrint},i=this.buildViewPropTransformers(t.viewPropsTransformers);for(let t of i)Object.assign(r,t.transform(r,e));let a=n.component;return J(a,Object.assign({},r))}};function wT(e,t,n,r,i,a){let o=n.build(i,void 0,!1),s=n.buildPrev(t,r,!1),c=n.buildNext(t,r,!1);return{title:a,activeButton:e.type,navUnit:e.singleUnit,isTodayEnabled:o.isValid&&!Lb(t.currentRange,i),isPrevEnabled:s.isValid,isNextEnabled:c.isValid}}function TT(e){return e.map(e=>new e)}var ET=class extends DS{constructor(e,t={}){super(),this.isRendering=!1,this.isRendered=!1,this.currentClassNames=[],this.customContentRenderId=0,this.handleAction=e=>{switch(e.type){case`SET_EVENT_DRAG`:case`SET_EVENT_RESIZE`:this.renderRunner.tryDrain()}},this.handleData=e=>{this.currentData=e,this.renderRunner.request(e.calendarOptions.rerenderDelay)},this.handleRenderRequest=()=>{if(this.isRendering){this.isRendered=!0;let{currentData:e}=this;db(()=>{$g(J(xS,{options:e.calendarOptions,theme:e.theme,emitter:e.emitter},(t,n,r,i)=>(this.setClassNames(t),this.setHeight(n),J(Eb.Provider,{value:this.customContentRenderId},J(CT,Object.assign({isHeightAuto:r,forPrint:i},e))))),this.el)})}else this.isRendered&&(this.isRendered=!1,$g(null,this.el),this.setClassNames([]),this.setHeight(``))},G_(e),this.el=e,this.renderRunner=new Q_(this.handleRenderRequest),new sT({optionOverrides:t,calendarApi:this,onAction:this.handleAction,onData:this.handleData})}render(){let e=this.isRendering;e?this.customContentRenderId+=1:this.isRendering=!0,this.renderRunner.request(),e&&this.updateSize()}destroy(){this.isRendering&&(this.isRendering=!1,this.renderRunner.request())}updateSize(){db(()=>{super.updateSize()})}batchRendering(e){this.renderRunner.pause(`batchRendering`),e(),this.renderRunner.resume(`batchRendering`)}pauseRendering(){this.renderRunner.pause(`pauseRendering`)}resumeRendering(){this.renderRunner.resume(`pauseRendering`,!0)}resetOptions(e,t){this.currentDataManager.resetOptions(e,t)}setClassNames(e){if(!Fv(e,this.currentClassNames)){let{classList:t}=this.el;for(let e of this.currentClassNames)t.remove(e);for(let n of e)t.add(n);this.currentClassNames=e}}setHeight(e){av(this.el,`height`,e)}},DT=parseInt(`18.3.1`.split(`.`)[0])<18,OT=class extends _.Component{constructor(){super(...arguments),this.elRef=(0,_.createRef)(),this.isUpdating=!1,this.isUnmounting=!1,this.state={customRenderingMap:new Map},this.requestResize=()=>{this.isUnmounting||(this.cancelResize(),this.resizeId=requestAnimationFrame(()=>{this.doResize()}))}}render(){let e=[];for(let t of this.state.customRenderingMap.values())e.push(_.createElement(kT,{key:t.id,customRendering:t}));return _.createElement(`div`,{ref:this.elRef},e)}componentDidMount(){this.isUnmounting=!1;let e=new JC;this.handleCustomRendering=e.handle.bind(e),this.calendar=new ET(this.elRef.current,Object.assign(Object.assign({},this.props),{handleCustomRendering:this.handleCustomRendering})),this.calendar.render(),this.calendar.on(`_beforeprint`,()=>{(0,_l.flushSync)(()=>{})});let t;e.subscribe(e=>{let n=Date.now(),r=!t;(DT||r||this.isUpdating||this.isUnmounting||n-t<100?AT:_l.flushSync)(()=>{this.setState({customRenderingMap:e},()=>{t=n,r?this.doResize():this.requestResize()})})})}componentDidUpdate(){this.isUpdating=!0,this.calendar.resetOptions(Object.assign(Object.assign({},this.props),{handleCustomRendering:this.handleCustomRendering})),this.isUpdating=!1}componentWillUnmount(){this.isUnmounting=!0,this.cancelResize(),this.calendar.destroy()}doResize(){this.calendar.updateSize()}cancelResize(){this.resizeId!==void 0&&(cancelAnimationFrame(this.resizeId),this.resizeId=void 0)}getApi(){return this.calendar}};OT.act=AT;var kT=class extends _.PureComponent{render(){let{customRendering:e}=this.props,{generatorMeta:t}=e,n=typeof t==`function`?t(e.renderProps):t;return(0,_l.createPortal)(n,e.containerEl)}};function AT(e){e()}var jT=class extends HS{constructor(){super(...arguments),this.headerElRef=kg()}renderSimpleLayout(e,t){let{props:n,context:r}=this,i=[],a=xC(r.options);return e&&i.push({type:`header`,key:`header`,isSticky:a,chunk:{elRef:this.headerElRef,tableClassName:`fc-col-header`,rowContent:e}}),i.push({type:`body`,key:`body`,liquid:!0,chunk:{content:t}}),J(Ab,{elClasses:[`fc-daygrid`],viewSpec:r.viewSpec},J(CC,{liquid:!n.isHeightAuto&&!n.forPrint,collapsibleWidth:n.forPrint,cols:[],sections:i}))}renderHScrollLayout(e,t,n,r){let i=this.context.pluginHooks.scrollGridImpl;if(!i)throw Error(`No ScrollGrid implementation`);let{props:a,context:o}=this,s=!a.forPrint&&xC(o.options),c=!a.forPrint&&SC(o.options),l=[];return e&&l.push({type:`header`,key:`header`,isSticky:s,chunks:[{key:`main`,elRef:this.headerElRef,tableClassName:`fc-col-header`,rowContent:e}]}),l.push({type:`body`,key:`body`,liquid:!0,chunks:[{key:`main`,content:t}]}),c&&l.push({type:`footer`,key:`footer`,isSticky:!0,chunks:[{key:`main`,content:bC}]}),J(Ab,{elClasses:[`fc-daygrid`],viewSpec:o.viewSpec},J(i,{liquid:!a.isHeightAuto&&!a.forPrint,forPrint:a.forPrint,collapsibleWidth:a.forPrint,colGroups:[{cols:[{span:n,minWidth:r}]}],sections:l}))}};function MT(e,t){let n=[];for(let e=0;e<t;e+=1)n[e]=[];for(let t of e)n[t.row].push(t);return n}function NT(e,t){let n=[];for(let e=0;e<t;e+=1)n[e]=[];for(let t of e)n[t.firstCol].push(t);return n}function PT(e,t){let n=[];if(e){for(let r=0;r<t;r+=1)n[r]={affectedInstances:e.affectedInstances,isEvent:e.isEvent,segs:[]};for(let t of e.segs)n[t.row].segs.push(t)}else for(let e=0;e<t;e+=1)n[e]=null;return n}var FT=Py({hour:`numeric`,minute:`2-digit`,omitZeroMinute:!0,meridiem:`narrow`});function IT(e){let{display:t}=e.eventRange.ui;return t===`list-item`||t===`auto`&&!e.eventRange.def.allDay&&e.firstCol===e.lastCol&&e.isStart&&e.isEnd}var LT=class extends vb{render(){let{props:e}=this;return J(EC,Object.assign({},e,{elClasses:[`fc-daygrid-event`,`fc-daygrid-block-event`,`fc-h-event`],defaultTimeFormat:FT,defaultDisplayEventEnd:e.defaultDisplayEventEnd,disableResizing:!e.seg.eventRange.def.allDay}))}},RT=class extends vb{render(){let{props:e,context:t}=this,{options:n}=t,{seg:r}=e,i=rS(r,n.eventTimeFormat||FT,t,!0,e.defaultDisplayEventEnd);return J(TC,Object.assign({},e,{elTag:`a`,elClasses:[`fc-daygrid-event`,`fc-daygrid-dot-event`],elAttrs:sS(e.seg,t),defaultGenerator:zT,timeText:i,isResizing:!1,isDateSelecting:!1}))}};function zT(e){return J(Ag,null,J(`div`,{className:`fc-daygrid-event-dot`,style:{borderColor:e.borderColor||e.backgroundColor}}),e.timeText&&J(`div`,{className:`fc-event-time`},e.timeText),J(`div`,{className:`fc-event-title`},e.event.title||J(Ag,null,`\xA0`)))}var BT=class extends vb{constructor(){super(...arguments),this.compileSegs=dy(VT)}render(){let{props:e}=this,{allSegs:t,invisibleSegs:n}=this.compileSegs(e.singlePlacements);return J(BC,{elClasses:[`fc-daygrid-more-link`],dateProfile:e.dateProfile,todayRange:e.todayRange,allDayDate:e.allDayDate,moreCnt:e.moreCnt,allSegs:t,hiddenSegs:n,alignmentElRef:e.alignmentElRef,alignGridTop:e.alignGridTop,extraDateSpan:e.extraDateSpan,popoverContent:()=>{let n=(e.eventDrag?e.eventDrag.affectedInstances:null)||(e.eventResize?e.eventResize.affectedInstances:null)||{};return J(Ag,null,t.map(t=>{let r=t.eventRange.instance.instanceId;return J(`div`,{className:`fc-daygrid-event-harness`,key:r,style:{visibility:n[r]?`hidden`:``}},IT(t)?J(RT,Object.assign({seg:t,isDragging:!1,isSelected:r===e.eventSelection,defaultDisplayEventEnd:!1},iS(t,e.todayRange))):J(LT,Object.assign({seg:t,isDragging:!1,isResizing:!1,isDateSelecting:!1,isSelected:r===e.eventSelection,defaultDisplayEventEnd:!1},iS(t,e.todayRange))))}))}})}};function VT(e){let t=[],n=[];for(let r of e)t.push(r.seg),r.isVisible||n.push(r.seg);return{allSegs:t,invisibleSegs:n}}var HT=Py({week:`narrow`}),UT=class extends HS{constructor(){super(...arguments),this.rootElRef=kg(),this.state={dayNumberId:cv()},this.handleRootEl=e=>{xb(this.rootElRef,e),xb(this.props.elRef,e)}}render(){let{context:e,props:t,state:n,rootElRef:r}=this,{options:i,dateEnv:a}=e,{date:o,dateProfile:s}=t,c=t.showDayNumber&&GT(o,s.currentRange,a);return J(kC,{elTag:`td`,elRef:this.handleRootEl,elClasses:[`fc-daygrid-day`,...t.extraClassNames||[]],elAttrs:Object.assign(Object.assign(Object.assign({},t.extraDataAttrs),t.showDayNumber?{"aria-labelledby":n.dayNumberId}:{}),{role:`gridcell`}),defaultGenerator:WT,date:o,dateProfile:s,todayRange:t.todayRange,showDayNumber:t.showDayNumber,isMonthStart:c,extraRenderProps:t.extraRenderProps},(a,s)=>J(`div`,{ref:t.innerElRef,className:`fc-daygrid-day-frame fc-scrollgrid-sync-inner`,style:{minHeight:t.minHeight}},t.showWeekNumber&&J(FC,{elTag:`a`,elClasses:[`fc-daygrid-week-number`],elAttrs:NS(e,o,`week`),date:o,defaultFormat:HT}),!s.isDisabled&&(t.showDayNumber||AC(i)||t.forceDayTop)?J(`div`,{className:`fc-daygrid-day-top`},J(a,{elTag:`a`,elClasses:[`fc-daygrid-day-number`,c&&`fc-daygrid-month-start`],elAttrs:Object.assign(Object.assign({},NS(e,o)),{id:n.dayNumberId})})):t.showDayNumber?J(`div`,{className:`fc-daygrid-day-top`,style:{visibility:`hidden`}},J(`a`,{className:`fc-daygrid-day-number`},`\xA0`)):void 0,J(`div`,{className:`fc-daygrid-day-events`,ref:t.fgContentElRef},t.fgContent,J(`div`,{className:`fc-daygrid-day-bottom`,style:{marginTop:t.moreMarginTop}},J(BT,{allDayDate:o,singlePlacements:t.singlePlacements,moreCnt:t.moreCnt,alignmentElRef:r,alignGridTop:!t.showDayNumber,extraDateSpan:t.extraDateSpan,dateProfile:t.dateProfile,eventSelection:t.eventSelection,eventDrag:t.eventDrag,eventResize:t.eventResize,todayRange:t.todayRange}))),J(`div`,{className:`fc-daygrid-day-bg`},t.bgContent)))}};function WT(e){return e.dayNumberText||J(Ag,null,`\xA0`)}function GT(e,t,n){let{start:r,end:i}=t,a=zv(i,-1),o=n.getYear(r),s=n.getMonth(r),c=n.getYear(a),l=n.getMonth(a);return(o!==c||s!==l)&&(e.valueOf()===r.valueOf()||n.getDay(e)===1&&e.valueOf()<i.valueOf())}function KT(e){return e.eventRange.instance.instanceId+`:`+e.firstCol}function qT(e){return KT(e)+`:`+e.lastCol}function JT(e,t,n,r,i,a,o){let s=new QT(t=>i[e[t.index].eventRange.instance.instanceId+`:`+t.span.start+`:`+(t.span.end-1)]||1);s.allowReslicing=!0,s.strictOrder=r,t===!0||n===!0?(s.maxCoord=a,s.hiddenConsumes=!0):typeof t==`number`?s.maxStackCnt=t:typeof n==`number`&&(s.maxStackCnt=n,s.hiddenConsumes=!0);let c=[],l=[];for(let t=0;t<e.length;t+=1){let n=e[t];i[qT(n)]==null?l.push(n):c.push({index:t,span:{start:n.firstCol,end:n.lastCol+1}})}let u=s.addSegs(c),{singleColPlacements:d,multiColPlacements:f,leftoverMargins:p}=YT(s.toRects(),e,o),m=[],h=[];for(let e of l){f[e.firstCol].push({seg:e,isVisible:!1,isAbsolute:!0,absoluteTop:0,marginTop:0});for(let t=e.firstCol;t<=e.lastCol;t+=1)d[t].push({seg:ZT(e,t,t+1,o),isVisible:!1,isAbsolute:!1,absoluteTop:0,marginTop:0})}for(let e=0;e<o.length;e+=1)m.push(0);for(let t of u){let n=e[t.index],r=t.span;f[r.start].push({seg:ZT(n,r.start,r.end,o),isVisible:!1,isAbsolute:!0,absoluteTop:0,marginTop:0});for(let e=r.start;e<r.end;e+=1)m[e]+=1,d[e].push({seg:ZT(n,e,e+1,o),isVisible:!1,isAbsolute:!1,absoluteTop:0,marginTop:0})}for(let e=0;e<o.length;e+=1)h.push(p[e]);return{singleColPlacements:d,multiColPlacements:f,moreCnts:m,moreMarginTops:h}}function YT(e,t,n){let r=XT(e,n.length),i=[],a=[],o=[];for(let e=0;e<n.length;e+=1){let s=r[e],c=[],l=0,u=0;for(let r of s){let i=t[r.index];c.push({seg:ZT(i,e,e+1,n),isVisible:!0,isAbsolute:!1,absoluteTop:r.levelCoord,marginTop:r.levelCoord-l}),l=r.levelCoord+r.thickness}let d=[];l=0,u=0;for(let r of s){let i=t[r.index],a=r.span.end-r.span.start>1,o=r.span.start===e;u+=r.levelCoord-l,l=r.levelCoord+r.thickness,a?(u+=r.thickness,o&&d.push({seg:ZT(i,r.span.start,r.span.end,n),isVisible:!0,isAbsolute:!0,absoluteTop:r.levelCoord,marginTop:0})):o&&(d.push({seg:ZT(i,r.span.start,r.span.end,n),isVisible:!0,isAbsolute:!1,absoluteTop:r.levelCoord,marginTop:u}),u=0)}i.push(c),a.push(d),o.push(u)}return{singleColPlacements:i,multiColPlacements:a,leftoverMargins:o}}function XT(e,t){let n=[];for(let e=0;e<t;e+=1)n.push([]);for(let t of e)for(let e=t.span.start;e<t.span.end;e+=1)n[e].push(t);return n}function ZT(e,t,n,r){if(e.firstCol===t&&e.lastCol===n-1)return e;let i=e.eventRange,a=i.range,o=Fb(a,{start:r[t].date,end:Rv(r[n-1].date,1)});return Object.assign(Object.assign({},e),{firstCol:t,lastCol:n-1,eventRange:{def:i.def,ui:Object.assign(Object.assign({},i.ui),{durationEditable:!1}),instance:i.instance,range:o},isStart:e.isStart&&o.start.valueOf()===a.start.valueOf(),isEnd:e.isEnd&&o.end.valueOf()===a.end.valueOf()})}var QT=class extends US{constructor(){super(...arguments),this.hiddenConsumes=!1,this.forceHidden={}}addSegs(e){let t=super.addSegs(e),{entriesByLevel:n}=this,r=e=>!this.forceHidden[GS(e)];for(let e=0;e<n.length;e+=1)n[e]=n[e].filter(r);return t}handleInvalidInsertion(e,t,n){let{entriesByLevel:r,forceHidden:i}=this,{touchingEntry:a,touchingLevel:o,touchingLateral:s}=e;if(this.hiddenConsumes&&a){let e=GS(a);if(!i[e]){if(this.allowReslicing){let e=Object.assign(Object.assign({},a),{span:KS(a.span,t.span)}),c=GS(e);i[c]=!0,r[o][s]=e,n.push(e),this.splitEntry(a,t,n)}else i[e]=!0,n.push(a)}}super.handleInvalidInsertion(e,t,n)}},$T=class extends HS{constructor(){super(...arguments),this.cellElRefs=new lC,this.frameElRefs=new lC,this.fgElRefs=new lC,this.segHarnessRefs=new lC,this.rootElRef=kg(),this.state={framePositions:null,maxContentHeight:null,segHeights:{}},this.handleResize=e=>{e&&this.updateSizing(!0)}}render(){let{props:e,state:t,context:n}=this,{options:r}=n,i=e.cells.length,a=NT(e.businessHourSegs,i),o=NT(e.bgEventSegs,i),s=NT(this.getHighlightSegs(),i),c=NT(this.getMirrorSegs(),i),{singleColPlacements:l,multiColPlacements:u,moreCnts:d,moreMarginTops:f}=JT(Qx(e.fgEventSegs,r.eventOrder),e.dayMaxEvents,e.dayMaxEventRows,r.eventOrderStrict,t.segHeights,t.maxContentHeight,e.cells),p=e.eventDrag&&e.eventDrag.affectedInstances||e.eventResize&&e.eventResize.affectedInstances||{};return J(`tr`,{ref:this.rootElRef,role:`row`},e.renderIntro&&e.renderIntro(),e.cells.map((t,n)=>{let r=this.renderFgSegs(n,e.forPrint?l[n]:u[n],e.todayRange,p),i=this.renderFgSegs(n,eE(c[n],u),e.todayRange,{},!!e.eventDrag,!!e.eventResize,!1);return J(UT,{key:t.key,elRef:this.cellElRefs.createRef(t.key),innerElRef:this.frameElRefs.createRef(t.key),dateProfile:e.dateProfile,date:t.date,showDayNumber:e.showDayNumbers,showWeekNumber:e.showWeekNumbers&&n===0,forceDayTop:e.showWeekNumbers,todayRange:e.todayRange,eventSelection:e.eventSelection,eventDrag:e.eventDrag,eventResize:e.eventResize,extraRenderProps:t.extraRenderProps,extraDataAttrs:t.extraDataAttrs,extraClassNames:t.extraClassNames,extraDateSpan:t.extraDateSpan,moreCnt:d[n],moreMarginTop:f[n],singlePlacements:l[n],fgContentElRef:this.fgElRefs.createRef(t.key),fgContent:J(Ag,null,J(Ag,null,r),J(Ag,null,i)),bgContent:J(Ag,null,this.renderFillSegs(s[n],`highlight`),this.renderFillSegs(a[n],`non-business`),this.renderFillSegs(o[n],`bg-event`)),minHeight:e.cellMinHeight})}))}componentDidMount(){this.updateSizing(!0),this.context.addResizeHandler(this.handleResize)}componentDidUpdate(e,t){let n=this.props;this.updateSizing(!Zy(e,n))}componentWillUnmount(){this.context.removeResizeHandler(this.handleResize)}getHighlightSegs(){let{props:e}=this;return e.eventDrag&&e.eventDrag.segs.length?e.eventDrag.segs:e.eventResize&&e.eventResize.segs.length?e.eventResize.segs:e.dateSelectionSegs}getMirrorSegs(){let{props:e}=this;return e.eventResize&&e.eventResize.segs.length?e.eventResize.segs:[]}renderFgSegs(e,t,n,r,i,a,o){let{context:s}=this,{eventSelection:c}=this.props,{framePositions:l}=this.state,u=this.props.cells.length===1,d=i||a||o,f=[];if(l)for(let e of t){let{seg:t}=e,{instanceId:p}=t.eventRange.instance,m=e.isVisible&&!r[p],h=e.isAbsolute,g=``,_=``;h&&(s.isRtl?(_=0,g=l.lefts[t.lastCol]-l.lefts[t.firstCol]):(g=0,_=l.rights[t.firstCol]-l.rights[t.lastCol])),f.push(J(`div`,{className:`fc-daygrid-event-harness`+(h?` fc-daygrid-event-harness-abs`:``),key:KT(t),ref:d?null:this.segHarnessRefs.createRef(qT(t)),style:{visibility:m?``:`hidden`,marginTop:h?``:e.marginTop,top:h?e.absoluteTop:``,left:g,right:_}},IT(t)?J(RT,Object.assign({seg:t,isDragging:i,isSelected:p===c,defaultDisplayEventEnd:u},iS(t,n))):J(LT,Object.assign({seg:t,isDragging:i,isResizing:a,isDateSelecting:o,isSelected:p===c,defaultDisplayEventEnd:u},iS(t,n)))))}return f}renderFillSegs(e,t){let{isRtl:n}=this.context,{todayRange:r}=this.props,{framePositions:i}=this.state,a=[];if(i)for(let o of e){let e=n?{right:0,left:i.lefts[o.lastCol]-i.lefts[o.firstCol]}:{left:0,right:i.rights[o.firstCol]-i.rights[o.lastCol]};a.push(J(`div`,{key:oS(o.eventRange),className:`fc-daygrid-bg-harness`,style:e},t===`bg-event`?J(MC,Object.assign({seg:o},iS(o,r))):PC(t)))}return J(Ag,{},...a)}updateSizing(e){let{props:t,state:n,frameElRefs:r}=this;if(!t.forPrint&&t.clientWidth!==null){if(e){let e=t.cells.map(e=>r.currentMap[e.key]);if(e.length){let t=this.rootElRef.current,r=new BS(t,e,!0,!1);n.framePositions&&n.framePositions.similarTo(r)||this.setState({framePositions:new BS(t,e,!0,!1)})}}let i=this.state.segHeights,a=this.querySegHeights(),o=t.dayMaxEvents===!0||t.dayMaxEventRows===!0;this.safeSetState({segHeights:Object.assign(Object.assign({},i),a),maxContentHeight:o?this.computeMaxContentHeight():null})}}querySegHeights(){let e=this.segHarnessRefs.currentMap,t={};for(let n in e){let r=Math.round(e[n].getBoundingClientRect().height);t[n]=Math.max(t[n]||0,r)}return t}computeMaxContentHeight(){let e=this.props.cells[0].key,t=this.cellElRefs.currentMap[e],n=this.fgElRefs.currentMap[e];return t.getBoundingClientRect().bottom-n.getBoundingClientRect().top}getCellEls(){let e=this.cellElRefs.currentMap;return this.props.cells.map(t=>e[t.key])}};$T.addStateEquality({segHeights:Zy});function eE(e,t){if(!e.length)return[];let n=tE(t);return e.map(e=>({seg:e,isVisible:!0,isAbsolute:!0,absoluteTop:n[e.eventRange.instance.instanceId],marginTop:0}))}function tE(e){let t={};for(let n of e)for(let e of n)t[e.seg.eventRange.instance.instanceId]=e.absoluteTop;return t}var nE=class extends HS{constructor(){super(...arguments),this.splitBusinessHourSegs=dy(MT),this.splitBgEventSegs=dy(rE),this.splitFgEventSegs=dy(MT),this.splitDateSelectionSegs=dy(MT),this.splitEventDrag=dy(PT),this.splitEventResize=dy(PT),this.rowRefs=new lC}render(){let{props:e,context:t}=this,n=e.cells.length,r=this.splitBusinessHourSegs(e.businessHourSegs,n),i=this.splitBgEventSegs(e.bgEventSegs,n),a=this.splitFgEventSegs(e.fgEventSegs,n),o=this.splitDateSelectionSegs(e.dateSelectionSegs,n),s=this.splitEventDrag(e.eventDrag,n),c=this.splitEventResize(e.eventResize,n),l=n>=7&&e.clientWidth?e.clientWidth/t.options.aspectRatio/6:null;return J(TS,{unit:`day`},(t,u)=>J(Ag,null,e.cells.map((t,d)=>J($T,{ref:this.rowRefs.createRef(d),key:t.length?t[0].date.toISOString():d,showDayNumbers:n>1,showWeekNumbers:e.showWeekNumbers,todayRange:u,dateProfile:e.dateProfile,cells:t,renderIntro:e.renderRowIntro,businessHourSegs:r[d],eventSelection:e.eventSelection,bgEventSegs:i[d],fgEventSegs:a[d],dateSelectionSegs:o[d],eventDrag:s[d],eventResize:c[d],dayMaxEvents:e.dayMaxEvents,dayMaxEventRows:e.dayMaxEventRows,clientWidth:e.clientWidth,clientHeight:e.clientHeight,cellMinHeight:l,forPrint:e.forPrint}))))}componentDidMount(){this.registerInteractiveComponent()}componentDidUpdate(){this.registerInteractiveComponent()}registerInteractiveComponent(){if(!this.rootEl){let e=this.rowRefs.currentMap[0].getCellEls()[0],t=e?e.closest(`.fc-daygrid-body`):null;t&&(this.rootEl=t,this.context.registerInteractiveComponent(this,{el:t,isHitComboAllowed:this.props.isHitComboAllowed}))}}componentWillUnmount(){this.rootEl&&=(this.context.unregisterInteractiveComponent(this),null)}prepareHits(){this.rowPositions=new BS(this.rootEl,this.rowRefs.collect().map(e=>e.getCellEls()[0]),!1,!0),this.colPositions=new BS(this.rootEl,this.rowRefs.currentMap[0].getCellEls(),!0,!1)}queryHit(e,t){let{colPositions:n,rowPositions:r}=this,i=n.leftToIndex(e),a=r.topToIndex(t);if(a!=null&&i!=null){let e=this.props.cells[a][i];return{dateProfile:this.props.dateProfile,dateSpan:Object.assign({range:this.getCellRange(a,i),allDay:!0},e.extraDateSpan),dayEl:this.getCellEl(a,i),rect:{left:n.lefts[i],right:n.rights[i],top:r.tops[a],bottom:r.bottoms[a]},layer:0}}return null}getCellEl(e,t){return this.rowRefs.currentMap[e].getCellEls()[t]}getCellRange(e,t){let n=this.props.cells[e][t].date;return{start:n,end:Rv(n,1)}}};function rE(e,t){return MT(e.filter(iE),t)}function iE(e){return e.eventRange.def.allDay}var aE=class extends HS{constructor(){super(...arguments),this.elRef=kg(),this.needsScrollReset=!1}render(){let{props:e}=this,{dayMaxEventRows:t,dayMaxEvents:n,expandRows:r}=e,i=n===!0||t===!0;i&&!r&&(i=!1,t=null,n=null);let a=[`fc-daygrid-body`,i?`fc-daygrid-body-balanced`:`fc-daygrid-body-unbalanced`,r?``:`fc-daygrid-body-natural`];return J(`div`,{ref:this.elRef,className:a.join(` `),style:{width:e.clientWidth,minWidth:e.tableMinWidth}},J(`table`,{role:`presentation`,className:`fc-scrollgrid-sync-table`,style:{width:e.clientWidth,minWidth:e.tableMinWidth,height:r?e.clientHeight:``}},e.colGroupNode,J(`tbody`,{role:`presentation`},J(nE,{dateProfile:e.dateProfile,cells:e.cells,renderRowIntro:e.renderRowIntro,showWeekNumbers:e.showWeekNumbers,clientWidth:e.clientWidth,clientHeight:e.clientHeight,businessHourSegs:e.businessHourSegs,bgEventSegs:e.bgEventSegs,fgEventSegs:e.fgEventSegs,dateSelectionSegs:e.dateSelectionSegs,eventSelection:e.eventSelection,eventDrag:e.eventDrag,eventResize:e.eventResize,dayMaxEvents:n,dayMaxEventRows:t,forPrint:e.forPrint,isHitComboAllowed:e.isHitComboAllowed}))))}componentDidMount(){this.requestScrollReset()}componentDidUpdate(e){e.dateProfile===this.props.dateProfile?this.flushScrollReset():this.requestScrollReset()}requestScrollReset(){this.needsScrollReset=!0,this.flushScrollReset()}flushScrollReset(){if(this.needsScrollReset&&this.props.clientWidth){let e=oE(this.elRef.current,this.props.dateProfile);if(e){let t=e.closest(`.fc-daygrid-body`),n=t.closest(`.fc-scroller`),r=e.getBoundingClientRect().top-t.getBoundingClientRect().top;n.scrollTop=r?r+1:0}this.needsScrollReset=!1}}};function oE(e,t){let n;return t.currentRangeUnit.match(/year|month/)&&(n=e.querySelector(`[data-date="${ly(t.currentDate)}-01"]`)),n||=e.querySelector(`[data-date="${cy(t.currentDate)}"]`),n}var sE=class extends aC{constructor(){super(...arguments),this.forceDayIfListItem=!0}sliceRange(e,t){return t.sliceRange(e)}},cE=class extends HS{constructor(){super(...arguments),this.slicer=new sE,this.tableRef=kg()}render(){let{props:e,context:t}=this;return J(aE,Object.assign({ref:this.tableRef},this.slicer.sliceProps(e,e.dateProfile,e.nextDayThreshold,t,e.dayTableModel),{dateProfile:e.dateProfile,cells:e.dayTableModel.cells,colGroupNode:e.colGroupNode,tableMinWidth:e.tableMinWidth,renderRowIntro:e.renderRowIntro,dayMaxEvents:e.dayMaxEvents,dayMaxEventRows:e.dayMaxEventRows,showWeekNumbers:e.showWeekNumbers,expandRows:e.expandRows,headerAlignElRef:e.headerAlignElRef,clientWidth:e.clientWidth,clientHeight:e.clientHeight,forPrint:e.forPrint}))}},lE=class extends jT{constructor(){super(...arguments),this.buildDayTableModel=dy(uE),this.headerRef=kg(),this.tableRef=kg()}render(){let{options:e,dateProfileGenerator:t}=this.context,{props:n}=this,r=this.buildDayTableModel(n.dateProfile,t),i=e.dayHeaders&&J(tC,{ref:this.headerRef,dateProfile:n.dateProfile,dates:r.headerDates,datesRepDistinctDays:r.rowCnt===1}),a=t=>J(cE,{ref:this.tableRef,dateProfile:n.dateProfile,dayTableModel:r,businessHours:n.businessHours,dateSelection:n.dateSelection,eventStore:n.eventStore,eventUiBases:n.eventUiBases,eventSelection:n.eventSelection,eventDrag:n.eventDrag,eventResize:n.eventResize,nextDayThreshold:e.nextDayThreshold,colGroupNode:t.tableColGroupNode,tableMinWidth:t.tableMinWidth,dayMaxEvents:e.dayMaxEvents,dayMaxEventRows:e.dayMaxEventRows,showWeekNumbers:e.weekNumbers,expandRows:!n.isHeightAuto,headerAlignElRef:this.headerElRef,clientWidth:t.clientWidth,clientHeight:t.clientHeight,forPrint:n.forPrint});return e.dayMinWidth?this.renderHScrollLayout(i,a,r.colCnt,e.dayMinWidth):this.renderSimpleLayout(i,a)}};function uE(e,t){return new iC(new rC(e.renderRange,t),/year|month|week/.test(e.currentRangeUnit))}var dE=class extends Hb{buildRenderRange(e,t,n){let r=super.buildRenderRange(e,t,n),{props:i}=this;return fE({currentRange:r,snapToWeek:/^(year|month)$/.test(t),fixedWeekCount:i.fixedWeekCount,dateEnv:i.dateEnv})}};function fE(e){let{dateEnv:t,currentRange:n}=e,{start:r,end:i}=n,a;if(e.snapToWeek&&(r=t.startOfWeek(r),a=t.startOfWeek(i),a.valueOf()!==i.valueOf()&&(i=Lv(a,1))),e.fixedWeekCount){let e=t.startOfWeek(t.startOfMonth(Rv(n.end,-1))),r=Math.ceil(Bv(e,i));i=Lv(i,6-r)}return{start:r,end:i}}W_(`:root{--fc-daygrid-event-dot-width:8px}.fc-daygrid-day-events:after,.fc-daygrid-day-events:before,.fc-daygrid-day-frame:after,.fc-daygrid-day-frame:before,.fc-daygrid-event-harness:after,.fc-daygrid-event-harness:before{clear:both;content:"";display:table}.fc .fc-daygrid-body{position:relative;z-index:1}.fc .fc-daygrid-day.fc-day-today{background-color:var(--fc-today-bg-color)}.fc .fc-daygrid-day-frame{min-height:100%;position:relative}.fc .fc-daygrid-day-top{display:flex;flex-direction:row-reverse}.fc .fc-day-other .fc-daygrid-day-top{opacity:.3}.fc .fc-daygrid-day-number{padding:4px;position:relative;z-index:4}.fc .fc-daygrid-month-start{font-size:1.1em;font-weight:700}.fc .fc-daygrid-day-events{margin-top:1px}.fc .fc-daygrid-body-balanced .fc-daygrid-day-events{left:0;position:absolute;right:0}.fc .fc-daygrid-body-unbalanced .fc-daygrid-day-events{min-height:2em;position:relative}.fc .fc-daygrid-body-natural .fc-daygrid-day-events{margin-bottom:1em}.fc .fc-daygrid-event-harness{position:relative}.fc .fc-daygrid-event-harness-abs{left:0;position:absolute;right:0;top:0}.fc .fc-daygrid-bg-harness{bottom:0;position:absolute;top:0}.fc .fc-daygrid-day-bg .fc-non-business{z-index:1}.fc .fc-daygrid-day-bg .fc-bg-event{z-index:2}.fc .fc-daygrid-day-bg .fc-highlight{z-index:3}.fc .fc-daygrid-event{margin-top:1px;z-index:6}.fc .fc-daygrid-event.fc-event-mirror{z-index:7}.fc .fc-daygrid-day-bottom{font-size:.85em;margin:0 2px}.fc .fc-daygrid-day-bottom:after,.fc .fc-daygrid-day-bottom:before{clear:both;content:"";display:table}.fc .fc-daygrid-more-link{border-radius:3px;cursor:pointer;line-height:1;margin-top:1px;max-width:100%;overflow:hidden;padding:2px;position:relative;white-space:nowrap;z-index:4}.fc .fc-daygrid-more-link:hover{background-color:rgba(0,0,0,.1)}.fc .fc-daygrid-week-number{background-color:var(--fc-neutral-bg-color);color:var(--fc-neutral-text-color);min-width:1.5em;padding:2px;position:absolute;text-align:center;top:0;z-index:5}.fc .fc-more-popover .fc-popover-body{min-width:220px;padding:10px}.fc-direction-ltr .fc-daygrid-event.fc-event-start,.fc-direction-rtl .fc-daygrid-event.fc-event-end{margin-left:2px}.fc-direction-ltr .fc-daygrid-event.fc-event-end,.fc-direction-rtl .fc-daygrid-event.fc-event-start{margin-right:2px}.fc-direction-ltr .fc-daygrid-more-link{float:left}.fc-direction-ltr .fc-daygrid-week-number{border-radius:0 0 3px 0;left:0}.fc-direction-rtl .fc-daygrid-more-link{float:right}.fc-direction-rtl .fc-daygrid-week-number{border-radius:0 0 0 3px;right:0}.fc-liquid-hack .fc-daygrid-day-frame{position:static}.fc-daygrid-event{border-radius:3px;font-size:var(--fc-small-font-size);position:relative;white-space:nowrap}.fc-daygrid-block-event .fc-event-time{font-weight:700}.fc-daygrid-block-event .fc-event-time,.fc-daygrid-block-event .fc-event-title{padding:1px}.fc-daygrid-dot-event{align-items:center;display:flex;padding:2px 0}.fc-daygrid-dot-event .fc-event-title{flex-grow:1;flex-shrink:1;font-weight:700;min-width:0;overflow:hidden}.fc-daygrid-dot-event.fc-event-mirror,.fc-daygrid-dot-event:hover{background:rgba(0,0,0,.1)}.fc-daygrid-dot-event.fc-event-selected:before{bottom:-10px;top:-10px}.fc-daygrid-event-dot{border:calc(var(--fc-daygrid-event-dot-width)/2) solid var(--fc-event-border-color);border-radius:calc(var(--fc-daygrid-event-dot-width)/2);box-sizing:content-box;height:0;margin:0 4px;width:0}.fc-direction-ltr .fc-daygrid-event .fc-event-time{margin-right:3px}.fc-direction-rtl .fc-daygrid-event .fc-event-time{margin-left:3px}`);var pE=rw({name:`@fullcalendar/daygrid`,initialView:`dayGridMonth`,views:{dayGrid:{component:lE,dateProfileGeneratorClass:dE},dayGridDay:{type:`dayGrid`,duration:{days:1}},dayGridWeek:{type:`dayGrid`,duration:{weeks:1}},dayGridMonth:{type:`dayGrid`,duration:{months:1},fixedWeekCount:!0},dayGridYear:{type:`dayGrid`,duration:{years:1}}}});function mE(e){let t=new Date(`${e}T00:00:00Z`);return t.setUTCDate(t.getUTCDate()+1),t.toISOString().slice(0,10)}function hE(e){let t=new Date(e),n=e=>String(e).padStart(2,`0`);return`${t.getFullYear()}-${n(t.getMonth()+1)}-${n(t.getDate())}`}function gE(e){let t=e.start??e.due,n=e.due??e.start;if(t!==void 0&&n!==void 0)return{start:t,end:mE(n)};if(e.closed===void 0)return null;let r=hE(e.closed);return{start:r,end:mE(r)}}function _E(e,t){if(t===`planned`)return gE(e);let n=t===`created`?e.created:e.updated;if(n===void 0)return null;let r=hE(n);return{start:r,end:mE(r)}}var vE=[{key:`planned`,text:`planned`,hint:`Place items on their start and due dates`},{key:`created`,text:`created`,hint:`Place items on the day they were filed`},{key:`updated`,text:`modified`,hint:`Place items on the day they last changed`}];function yE({entries:e,multiProject:t,selected:n,onSelect:r,focus:i=null,dates:a=`planned`,onDates:o,nextList:s,projects:c}){let l=(0,_.useRef)(null);(0,_.useEffect)(()=>{i!==null&&l.current?.getApi().gotoDate(i.date)},[i]);let u=e.flatMap(({project:e,item:t,colour:n,projectColour:r})=>{let i=_E(t,a);return i===null?[]:[{id:`${e}:${t.id}`,title:t.title,start:i.start,end:i.end,allDay:!0,backgroundColor:n,borderColor:n,extendedProps:{project:e,item:t,projectColour:r}}]}),d=(e,t)=>n?.project===e&&n.ref===t,f=({event:e})=>{let{project:n,item:r,projectColour:i}=e.extendedProps,a=K[r.status];return(0,b.jsxs)(`div`,{className:`cal__event`,"data-project":i!==void 0,style:i===void 0?void 0:{"--project":i},"data-strike":a.strike,"data-on":d(n,r.id),title:`${r.id} [${a.label}] ${r.title}`,children:[(0,b.jsx)(`span`,{className:`cal__icon`,style:{color:a.colour},children:a.icon}),(0,b.jsx)(`span`,{className:`cal__ref`,children:t?`${n}:${r.id}`:r.id}),(0,b.jsx)(`span`,{className:`cal__title`,children:r.title})]})},p=({event:e,jsEvent:t})=>{t.preventDefault();let{project:n,item:i}=e.extendedProps;r(n,i.id)};return(0,b.jsxs)(`div`,{className:`cal`,"data-dates":a,"data-next-open":s?.open===!0,children:[(0,b.jsx)(`div`,{className:`cal__grid`,children:(0,b.jsx)(OT,{ref:l,initialDate:i?.date,plugins:[pE],initialView:`dayGridMonth`,headerToolbar:{left:s===void 0?`prev,next today`:`prev,next today nextList`,center:`title`,right:o===void 0?`dayGridMonth,dayGridWeek,dayGridDay`:`planned,created,updated dayGridMonth,dayGridWeek,dayGridDay`},customButtons:{...Object.fromEntries(vE.map(({key:e,text:t,hint:n})=>[e,{text:t,hint:n,click:()=>o?.(e)}])),...s===void 0?{}:{nextList:{text:`Next ${s.count}`,hint:`The order agreed with set_next`,click:s.toggle}}},views:{dayGridDay:{dayMaxEvents:!1}},moreLinkClick:`dayGridDay`,navLinks:!0,navLinkDayClick:`dayGridDay`,buttonText:{today:`today`,month:`month`,week:`week`,day:`day`},timeZone:`UTC`,firstDay:1,height:`100%`,events:u,eventContent:f,eventClick:p,dayMaxEvents:!0})}),c!==void 0&&(0,b.jsx)(`div`,{className:`cal__key`,role:`group`,"aria-label":`Projects`,children:c.map(e=>(0,b.jsxs)(`button`,{className:`chip`,"data-off":e.hidden,"aria-pressed":!e.hidden,title:e.hidden?`Show ${e.name}`:`Hide ${e.name}`,style:{"--area":e.colour},onClick:e.toggle,children:[(0,b.jsx)(`span`,{className:`chip__dot`}),e.name]},e.key))})]})}var bE=`55.9 59.4 271 154.5`;function xE({className:e,crop:t=`full`}){return t===`icon`?(0,b.jsx)(`svg`,{className:e,viewBox:`0 0 100 100`,"aria-hidden":`true`,focusable:`false`,children:(0,b.jsxs)(`g`,{transform:`translate(50 48) scale(1.3) translate(-50 -48)`,children:[(0,b.jsx)(`path`,{d:`M -5 36 Q 50 64 105 36`,fill:`none`,stroke:`currentColor`,strokeOpacity:`0.45`,strokeWidth:`2.6`}),(0,b.jsx)(`path`,{d:`M -5 56 Q 50 82 105 56`,fill:`none`,stroke:`currentColor`,strokeWidth:`6`,strokeDasharray:`5 2`}),(0,b.jsx)(`path`,{d:`M -5 59.5 Q 50 85.5 105 59.5`,fill:`none`,stroke:`currentColor`,strokeWidth:`1.82`}),(0,b.jsx)(`line`,{x1:`45.24`,y1:`50.5`,x2:`45.24`,y2:`67.5`,stroke:`currentColor`,strokeWidth:`3.2`,strokeLinecap:`round`}),(0,b.jsx)(`line`,{x1:`54.76`,y1:`50.5`,x2:`54.76`,y2:`67.5`,stroke:`currentColor`,strokeWidth:`3.2`,strokeLinecap:`round`}),(0,b.jsx)(`g`,{transform:`translate(33 18.5) scale(0.45) translate(-153.9 -58.7)`,children:(0,b.jsx)(`g`,{transform:`matrix(0.1, 0, 0, -0.1, 62.431001, 269.861486)`,fill:`currentColor`,children:(0,b.jsx)(`path`,{d:`M 1191.17 2095.39 C 1155.17 2079.39 1133.17 2038.39 1142.17 2001.39 C 1150.17 1970.39 1184.17 1929.39 1202.17 1929.39 C 1211.17 1929.39 1236.17 1881.39 1236.17 1863.39 C 1236.17 1861.39 1206.17 1859.39 1169.17 1859.39 C 1053.17 1858.39 976.178 1816.39 936.178 1733.39 C 917.178 1692.39 915.178 1672.39 918.178 1588.39 C 921.178 1498.39 923.178 1488.39 952.178 1447.39 C 975.178 1416.39 999.178 1398.39 1037.17 1382.39 C 1086.17 1362.39 1108.17 1360.39 1273.17 1359.39 C 1486.17 1359.39 1543.17 1369.39 1593.17 1412.39 C 1647.17 1459.39 1666.17 1509.39 1666.17 1606.39 C 1666.17 1719.39 1638.17 1778.39 1562.17 1827.39 C 1526.17 1850.39 1509.17 1854.39 1415.17 1857.39 L 1309.17 1861.39 L 1297.17 1900.39 C 1287.17 1933.39 1288.17 1943.39 1301.17 1961.39 C 1323.17 1994.39 1320.17 2044.39 1294.17 2073.39 C 1265.17 2105.39 1230.17 2112.39 1191.17 2095.39 Z M 1359.17 1799.39 C 1419.17 1798.39 1469.17 1779.39 1452.17 1762.39 C 1448.17 1757.39 1386.17 1753.39 1315.17 1752.39 C 1243.17 1750.39 1176.17 1744.39 1165.17 1739.39 C 1123.17 1716.39 1111.17 1681.39 1110.17 1572.39 C 1110.17 1516.39 1106.17 1466.39 1102.17 1462.39 C 1098.17 1457.39 1086.17 1465.39 1075.17 1478.39 C 1060.17 1496.39 1056.17 1517.39 1056.17 1580.39 C 1056.17 1655.39 1055.17 1660.39 1031.17 1671.39 C 1017.18 1677.39 1006.18 1690.39 1006.18 1699.39 C 1006.18 1726.39 1062.17 1771.39 1108.17 1781.39 C 1167.17 1794.39 1268.17 1807.39 1284.17 1802.39 C 1292.17 1801.39 1325.17 1799.39 1359.17 1799.39 Z M 1314.17 1657.39 C 1321.17 1650.39 1326.17 1624.39 1326.17 1599.39 C 1326.17 1549.39 1313.17 1529.39 1282.17 1529.39 C 1249.17 1529.39 1236.17 1543.39 1230.17 1580.39 C 1221.17 1632.39 1240.17 1669.39 1274.17 1669.39 C 1289.17 1669.39 1307.17 1664.39 1314.17 1657.39 Z M 1545.17 1655.39 C 1552.17 1647.39 1556.17 1620.39 1554.17 1593.39 C 1551.17 1539.39 1528.17 1516.39 1499.17 1535.39 C 1476.17 1549.39 1468.17 1648.39 1488.17 1660.39 C 1508.17 1673.39 1532.17 1671.39 1545.17 1655.39 Z`})})}),(0,b.jsx)(`line`,{x1:`4`,y1:`48.21`,x2:`4`,y2:`59.91`,stroke:`currentColor`,strokeWidth:`1.56`}),(0,b.jsx)(`line`,{x1:`16`,y1:`52.65`,x2:`16`,y2:`64.03`,stroke:`currentColor`,strokeWidth:`1.56`}),(0,b.jsx)(`line`,{x1:`28`,y1:`55.76`,x2:`28`,y2:`66.92`,stroke:`currentColor`,strokeWidth:`1.56`}),(0,b.jsx)(`line`,{x1:`76`,y1:`54.87`,x2:`76`,y2:`66.09`,stroke:`currentColor`,strokeWidth:`1.56`}),(0,b.jsx)(`line`,{x1:`88`,y1:`51.32`,x2:`88`,y2:`62.79`,stroke:`currentColor`,strokeWidth:`1.56`}),(0,b.jsx)(`path`,{d:`M -5 44 Q 50 72 105 44`,fill:`none`,stroke:`var(--logo-disc, #33435a)`,strokeWidth:`5`}),(0,b.jsx)(`path`,{d:`M -5 44 Q 50 72 105 44`,fill:`none`,stroke:`currentColor`,strokeWidth:`2.6`,strokeLinecap:`round`})]})}):(0,b.jsx)(`svg`,{className:e,viewBox:bE,"aria-hidden":`true`,focusable:`false`,children:(0,b.jsxs)(`g`,{transform:`matrix(0.1, 0, 0, -0.1, 62.431001, 269.861486)`,fill:`currentColor`,children:[(0,b.jsx)(`path`,{d:`M 1191.17 2095.39 C 1155.17 2079.39 1133.17 2038.39 1142.17 2001.39 C 1150.17 1970.39 1184.17 1929.39 1202.17 1929.39 C 1211.17 1929.39 1236.17 1881.39 1236.17 1863.39 C 1236.17 1861.39 1206.17 1859.39 1169.17 1859.39 C 1053.17 1858.39 976.178 1816.39 936.178 1733.39 C 917.178 1692.39 915.178 1672.39 918.178 1588.39 C 921.178 1498.39 923.178 1488.39 952.178 1447.39 C 975.178 1416.39 999.178 1398.39 1037.17 1382.39 C 1086.17 1362.39 1108.17 1360.39 1273.17 1359.39 C 1486.17 1359.39 1543.17 1369.39 1593.17 1412.39 C 1647.17 1459.39 1666.17 1509.39 1666.17 1606.39 C 1666.17 1719.39 1638.17 1778.39 1562.17 1827.39 C 1526.17 1850.39 1509.17 1854.39 1415.17 1857.39 L 1309.17 1861.39 L 1297.17 1900.39 C 1287.17 1933.39 1288.17 1943.39 1301.17 1961.39 C 1323.17 1994.39 1320.17 2044.39 1294.17 2073.39 C 1265.17 2105.39 1230.17 2112.39 1191.17 2095.39 Z M 1359.17 1799.39 C 1419.17 1798.39 1469.17 1779.39 1452.17 1762.39 C 1448.17 1757.39 1386.17 1753.39 1315.17 1752.39 C 1243.17 1750.39 1176.17 1744.39 1165.17 1739.39 C 1123.17 1716.39 1111.17 1681.39 1110.17 1572.39 C 1110.17 1516.39 1106.17 1466.39 1102.17 1462.39 C 1098.17 1457.39 1086.17 1465.39 1075.17 1478.39 C 1060.17 1496.39 1056.17 1517.39 1056.17 1580.39 C 1056.17 1655.39 1055.17 1660.39 1031.17 1671.39 C 1017.18 1677.39 1006.18 1690.39 1006.18 1699.39 C 1006.18 1726.39 1062.17 1771.39 1108.17 1781.39 C 1167.17 1794.39 1268.17 1807.39 1284.17 1802.39 C 1292.17 1801.39 1325.17 1799.39 1359.17 1799.39 Z M 1314.17 1657.39 C 1321.17 1650.39 1326.17 1624.39 1326.17 1599.39 C 1326.17 1549.39 1313.17 1529.39 1282.17 1529.39 C 1249.17 1529.39 1236.17 1543.39 1230.17 1580.39 C 1221.17 1632.39 1240.17 1669.39 1274.17 1669.39 C 1289.17 1669.39 1307.17 1664.39 1314.17 1657.39 Z M 1545.17 1655.39 C 1552.17 1647.39 1556.17 1620.39 1554.17 1593.39 C 1551.17 1539.39 1528.17 1516.39 1499.17 1535.39 C 1476.17 1549.39 1468.17 1648.39 1488.17 1660.39 C 1508.17 1673.39 1532.17 1671.39 1545.17 1655.39 Z`}),(0,b.jsx)(`path`,{d:`M -65.514 1330.67 C -65.514 1290.67 -61.514 1279.67 -47.514 1276.67 C -30.514 1271.67 -28.514 1256.67 -26.514 1089.67 C -24.514 912.673 -24.514 908.673 -44.514 908.673 C -64.514 908.673 -65.514 902.673 -65.514 804.673 C -65.514 713.673 -63.514 699.673 -47.514 694.673 C -24.514 687.673 155.486 653.673 274.486 634.673 C 939.486 526.673 1794.49 535.673 2469.49 659.673 C 2557.49 675.673 2632.49 688.673 2637.49 688.673 C 2641.49 688.673 2644.49 738.673 2644.49 798.673 C 2644.49 898.673 2642.49 909.673 2627.49 906.673 C 2610.49 903.673 2609.49 918.673 2606.49 1086.67 C 2604.49 1263.67 2604.49 1270.67 2624.49 1275.67 C 2640.49 1279.67 2644.49 1289.67 2644.49 1324.67 C 2644.49 1348.67 2639.49 1368.67 2633.49 1368.67 C 2628.49 1368.67 2593.49 1361.67 2556.49 1353.67 C 2183.49 1272.67 1745.49 1228.67 1184.49 1217.67 C 1069.49 1215.67 622.486 1255.67 389.486 1289.67 C 252.486 1309.67 -42.514 1365.67 -57.514 1374.67 C -62.514 1377.67 -65.514 1357.67 -65.514 1330.67 Z M 169.486 1234.67 C 213.486 1226.67 278.486 1215.67 314.486 1209.67 C 350.486 1204.67 396.486 1196.67 417.486 1193.67 L 454.486 1187.67 L 454.486 1006.67 L 454.486 826.673 L 397.486 832.673 C 336.486 839.673 119.486 874.673 72.486 884.673 L 44.486 890.673 L 44.486 1043.67 C 44.486 1221.67 49.486 1261.67 73.486 1254.67 C 82.486 1251.67 125.486 1243.67 169.486 1234.67 Z M 2526.49 1123.67 C 2527.49 1054.67 2528.49 972.673 2529.49 941.673 L 2529.49 883.673 L 2394.49 862.673 C 2320.49 850.673 2226.49 837.673 2186.49 833.673 L 2114.49 826.673 L 2116.49 1004.67 L 2119.49 1182.67 L 2154.49 1189.67 C 2173.49 1193.67 2250.49 1206.67 2324.49 1218.67 C 2398.49 1230.67 2461.49 1242.67 2463.49 1244.67 C 2465.49 1246.67 2480.49 1248.67 2496.49 1248.67 L 2524.49 1248.67 L 2526.49 1123.67 Z M 709.486 1158.67 C 759.486 1153.67 829.486 1148.67 866.486 1148.67 C 971.486 1148.67 964.486 1161.67 964.486 962.673 L 964.486 788.673 L 922.486 788.673 C 871.486 788.673 612.486 807.673 567.486 814.673 L 534.486 819.673 L 534.486 992.673 C 534.486 1087.67 537.486 1167.67 540.486 1170.67 C 543.486 1173.67 562.486 1174.67 582.486 1172.67 C 602.486 1170.67 660.486 1164.67 709.486 1158.67 Z M 2042.49 995.673 L 2044.49 819.673 L 2012.49 814.673 C 1956.49 805.673 1739.49 788.673 1680.49 788.673 L 1624.49 788.673 L 1626.49 966.673 L 1629.49 1143.67 L 1744.49 1150.67 C 1807.49 1154.67 1895.49 1162.67 1939.49 1166.67 C 1983.49 1171.67 2024.49 1174.67 2029.49 1173.67 C 2035.49 1172.67 2040.49 1103.67 2042.49 995.673 Z M 1542.49 961.673 L 1539.49 783.673 L 1294.49 783.673 L 1049.49 783.673 L 1046.49 961.673 L 1044.49 1138.67 L 1294.49 1138.67 L 1544.49 1138.67 L 1542.49 961.673 Z`})]})})}function SE({projectKey:e,colours:t,hidden:n,titleOf:r,query:i,onQuery:a,onPick:o,onClose:s}){let[c,l]=(0,_.useState)([]),[u,d]=(0,_.useState)(!1),[f,p]=(0,_.useState)(`idle`),[m,h]=(0,_.useState)(0),g=(0,_.useRef)(null);(0,_.useEffect)(()=>g.current?.focus(),[]),(0,_.useEffect)(()=>{if(i.trim()===``){l([]),p(`idle`);return}let t=new AbortController,n=setTimeout(()=>{p(`searching`),Ep(e,i,t.signal).then(e=>{if(e===null)return p(`unavailable`);l(e.hits),d(e.relaxed),h(0),p(`done`)}).catch(e=>{e.name!==`AbortError`&&p(`unavailable`)})},120);return()=>{clearTimeout(n),t.abort()}},[e,i]);let v=e=>e.source===`context`||e.ref!==null,y=e=>{e!==void 0&&v(e)&&o(e)};return(0,b.jsxs)(`aside`,{className:`detail search`,"aria-label":`Search`,children:[(0,b.jsxs)(`div`,{className:`detail__head`,children:[(0,b.jsx)(`span`,{className:`detail__id`,children:`Search`}),(0,b.jsx)(`button`,{className:`detail__close`,onClick:s,"aria-label":`Close`,children:`×`})]}),(0,b.jsx)(`input`,{ref:g,className:`search__input`,type:`search`,placeholder:`Search items, comments and context, or type a ref`,value:i,onChange:e=>a(e.target.value),onKeyDown:e=>{if(e.key===`Escape`)s();else if(e.key===`ArrowDown`)h(e=>Math.min(e+1,c.length-1));else if(e.key===`ArrowUp`)h(e=>Math.max(e-1,0));else if(e.key===`Enter`)y(c[m]);else return;e.preventDefault()},"aria-label":`Search`}),f===`unavailable`&&(0,b.jsx)(`div`,{className:`search__note`,children:`This server cannot search. Reconnect it to pick up the newer code.`}),f===`done`&&c.length===0&&(0,b.jsx)(`div`,{className:`search__note`,children:`Nothing matches.`}),f===`done`&&u&&c.length>0&&(0,b.jsx)(`div`,{className:`search__note`,children:`Nothing has every word, so these have some of them.`}),c.length>0&&(0,b.jsx)(`ul`,{className:`search__hits`,role:`listbox`,children:c.map((e,i)=>(0,b.jsx)(`li`,{role:`option`,"aria-selected":i===m,children:(0,b.jsxs)(`button`,{className:`search__hit`,"data-active":i===m,disabled:!v(e),onMouseEnter:()=>h(i),onClick:()=>y(e),children:[(0,b.jsxs)(`span`,{className:`search__line`,children:[(0,b.jsx)(`span`,{className:`search__source`,children:e.source===`context`?`context`:e.source===`comment`?e.audience===`agent`?`agent comment`:`comment`:`item`}),e.ref!==null&&(0,b.jsx)(`span`,{className:`search__ref`,style:{color:t[e.ref.split(`-`)[0]??``]},children:e.ref}),(0,b.jsx)(`span`,{className:`search__title`,children:e.source===`context`?e.id:e.title??(e.ref===null?``:r(e.ref))}),e.ref!==null&&n.has(e.ref)&&(0,b.jsx)(`span`,{className:`search__hidden`,children:`hidden`})]}),e.snippet!==``&&(0,b.jsx)(`span`,{className:`search__snippet`,children:CE(e.snippet)})]})},`${e.source}:${e.id}`))})]})}function CE(e){return e.replace(/\*\*|__/g,``).split(/⟦|⟧/).map((e,t)=>t%2==1?(0,b.jsx)(`mark`,{children:e},t):e)}function wE(e,t){let n=t||{};return(e[e.length-1]===``?[...e,``]:e).join((n.padRight?` `:``)+`,`+(n.padLeft===!1?``:` `)).trim()}var TE=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,EE=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,DE={};function OE(e,t){return((t||DE).jsx?EE:TE).test(e)}var kE=/[ \t\n\f\r]/g;function AE(e){return typeof e==`object`?e.type===`text`&&jE(e.value):jE(e)}function jE(e){return e.replace(kE,``)===``}var ME=class{constructor(e,t,n){this.normal=t,this.property=e,n&&(this.space=n)}};ME.prototype.normal={},ME.prototype.property={},ME.prototype.space=void 0;function NE(e,t){let n={},r={};for(let t of e)Object.assign(n,t.property),Object.assign(r,t.normal);return new ME(n,r,t)}function PE(e){return e.toLowerCase()}var FE=class{constructor(e,t){this.attribute=t,this.property=e}};FE.prototype.attribute=``,FE.prototype.booleanish=!1,FE.prototype.boolean=!1,FE.prototype.commaOrSpaceSeparated=!1,FE.prototype.commaSeparated=!1,FE.prototype.defined=!1,FE.prototype.mustUseProperty=!1,FE.prototype.number=!1,FE.prototype.overloadedBoolean=!1,FE.prototype.property=``,FE.prototype.spaceSeparated=!1,FE.prototype.space=void 0;var IE=s({boolean:()=>X,booleanish:()=>RE,commaOrSpaceSeparated:()=>HE,commaSeparated:()=>VE,number:()=>Z,overloadedBoolean:()=>zE,spaceSeparated:()=>BE}),LE=0,X=UE(),RE=UE(),zE=UE(),Z=UE(),BE=UE(),VE=UE(),HE=UE();function UE(){return 2**++LE}var WE=Object.keys(IE),GE=class extends FE{constructor(e,t,n,r){let i=-1;if(super(e,t),KE(this,`space`,r),typeof n==`number`)for(;++i<WE.length;){let e=WE[i];KE(this,WE[i],(n&IE[e])===IE[e])}}};GE.prototype.defined=!0;function KE(e,t,n){n&&(e[t]=n)}function qE(e){let t={},n={};for(let[r,i]of Object.entries(e.properties)){let a=new GE(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(a.mustUseProperty=!0),t[r]=a,n[PE(r)]=r,n[PE(a.attribute)]=r}return new ME(t,n,e.space)}var JE=qE({properties:{ariaActiveDescendant:null,ariaAtomic:RE,ariaAutoComplete:null,ariaBusy:RE,ariaChecked:RE,ariaColCount:Z,ariaColIndex:Z,ariaColSpan:Z,ariaControls:BE,ariaCurrent:null,ariaDescribedBy:BE,ariaDetails:null,ariaDisabled:RE,ariaDropEffect:BE,ariaErrorMessage:null,ariaExpanded:RE,ariaFlowTo:BE,ariaGrabbed:RE,ariaHasPopup:null,ariaHidden:RE,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:BE,ariaLevel:Z,ariaLive:null,ariaModal:RE,ariaMultiLine:RE,ariaMultiSelectable:RE,ariaOrientation:null,ariaOwns:BE,ariaPlaceholder:null,ariaPosInSet:Z,ariaPressed:RE,ariaReadOnly:RE,ariaRelevant:null,ariaRequired:RE,ariaRoleDescription:BE,ariaRowCount:Z,ariaRowIndex:Z,ariaRowSpan:Z,ariaSelected:RE,ariaSetSize:Z,ariaSort:null,ariaValueMax:Z,ariaValueMin:Z,ariaValueNow:Z,ariaValueText:null,role:null},transform(e,t){return t===`role`?t:`aria-`+t.slice(4).toLowerCase()}});function YE(e,t){return t in e?e[t]:t}function XE(e,t){return YE(e,t.toLowerCase())}var ZE=qE({attributes:{acceptcharset:`accept-charset`,classname:`class`,htmlfor:`for`,httpequiv:`http-equiv`},mustUseProperty:[`checked`,`multiple`,`muted`,`selected`],properties:{abbr:null,accept:VE,acceptCharset:BE,accessKey:BE,action:null,allow:null,allowFullScreen:X,allowPaymentRequest:X,allowUserMedia:X,alpha:X,alt:null,as:null,async:X,autoCapitalize:null,autoComplete:BE,autoFocus:X,autoPlay:X,blocking:BE,capture:null,charSet:null,checked:X,cite:null,className:BE,closedBy:null,colorSpace:null,cols:Z,colSpan:Z,command:null,commandFor:null,content:null,contentEditable:RE,controls:X,controlsList:BE,coords:Z|VE,crossOrigin:null,data:null,dateTime:null,decoding:null,default:X,defer:X,dir:null,dirName:null,disabled:X,download:zE,draggable:RE,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:X,formTarget:null,headers:BE,height:Z,hidden:zE,high:Z,href:null,hrefLang:null,htmlFor:BE,httpEquiv:BE,id:null,imageSizes:null,imageSrcSet:null,inert:X,inputMode:null,integrity:null,is:null,isMap:X,itemId:null,itemProp:BE,itemRef:BE,itemScope:X,itemType:BE,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:X,low:Z,manifest:null,max:null,maxLength:Z,media:null,method:null,min:null,minLength:Z,multiple:X,muted:X,name:null,nonce:null,noModule:X,noValidate:X,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:X,optimum:Z,pattern:null,ping:BE,placeholder:null,playsInline:X,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:X,referrerPolicy:null,rel:BE,required:X,reversed:X,rows:Z,rowSpan:Z,sandbox:BE,scope:null,scoped:X,seamless:X,selected:X,shadowRootClonable:X,shadowRootCustomElementRegistry:X,shadowRootDelegatesFocus:X,shadowRootMode:null,shadowRootSerializable:X,shape:null,size:Z,sizes:null,slot:null,span:Z,spellCheck:RE,src:null,srcDoc:null,srcLang:null,srcSet:null,start:Z,step:null,style:null,tabIndex:Z,target:null,title:null,translate:null,type:null,typeMustMatch:X,useMap:null,value:RE,width:Z,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:BE,axis:null,background:null,bgColor:null,border:Z,borderColor:null,bottomMargin:Z,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:X,declare:X,event:null,face:null,frame:null,frameBorder:null,hSpace:Z,leftMargin:Z,link:null,longDesc:null,lowSrc:null,marginHeight:Z,marginWidth:Z,noResize:X,noHref:X,noShade:X,noWrap:X,object:null,profile:null,prompt:null,rev:null,rightMargin:Z,rules:null,scheme:null,scrolling:RE,standby:null,summary:null,text:null,topMargin:Z,valueType:null,version:null,vAlign:null,vLink:null,vSpace:Z,allowTransparency:null,autoCorrect:null,autoSave:null,credentialless:X,disablePictureInPicture:X,disableRemotePlayback:X,exportParts:VE,part:BE,prefix:null,property:null,results:Z,security:null,unselectable:null},space:`html`,transform:XE}),QE=qE({attributes:{accentHeight:`accent-height`,alignmentBaseline:`alignment-baseline`,arabicForm:`arabic-form`,baselineShift:`baseline-shift`,capHeight:`cap-height`,className:`class`,clipPath:`clip-path`,clipRule:`clip-rule`,colorInterpolation:`color-interpolation`,colorInterpolationFilters:`color-interpolation-filters`,colorProfile:`color-profile`,colorRendering:`color-rendering`,crossOrigin:`crossorigin`,dataType:`datatype`,dominantBaseline:`dominant-baseline`,enableBackground:`enable-background`,fillOpacity:`fill-opacity`,fillRule:`fill-rule`,floodColor:`flood-color`,floodOpacity:`flood-opacity`,fontFamily:`font-family`,fontSize:`font-size`,fontSizeAdjust:`font-size-adjust`,fontStretch:`font-stretch`,fontStyle:`font-style`,fontVariant:`font-variant`,fontWeight:`font-weight`,glyphName:`glyph-name`,glyphOrientationHorizontal:`glyph-orientation-horizontal`,glyphOrientationVertical:`glyph-orientation-vertical`,hrefLang:`hreflang`,horizAdvX:`horiz-adv-x`,horizOriginX:`horiz-origin-x`,horizOriginY:`horiz-origin-y`,imageRendering:`image-rendering`,letterSpacing:`letter-spacing`,lightingColor:`lighting-color`,markerEnd:`marker-end`,markerMid:`marker-mid`,markerStart:`marker-start`,maskType:`mask-type`,navDown:`nav-down`,navDownLeft:`nav-down-left`,navDownRight:`nav-down-right`,navLeft:`nav-left`,navNext:`nav-next`,navPrev:`nav-prev`,navRight:`nav-right`,navUp:`nav-up`,navUpLeft:`nav-up-left`,navUpRight:`nav-up-right`,onAbort:`onabort`,onActivate:`onactivate`,onAfterPrint:`onafterprint`,onBeforePrint:`onbeforeprint`,onBegin:`onbegin`,onCancel:`oncancel`,onCanPlay:`oncanplay`,onCanPlayThrough:`oncanplaythrough`,onChange:`onchange`,onClick:`onclick`,onClose:`onclose`,onCopy:`oncopy`,onCueChange:`oncuechange`,onCut:`oncut`,onDblClick:`ondblclick`,onDrag:`ondrag`,onDragEnd:`ondragend`,onDragEnter:`ondragenter`,onDragExit:`ondragexit`,onDragLeave:`ondragleave`,onDragOver:`ondragover`,onDragStart:`ondragstart`,onDrop:`ondrop`,onDurationChange:`ondurationchange`,onEmptied:`onemptied`,onEnd:`onend`,onEnded:`onended`,onError:`onerror`,onFocus:`onfocus`,onFocusIn:`onfocusin`,onFocusOut:`onfocusout`,onHashChange:`onhashchange`,onInput:`oninput`,onInvalid:`oninvalid`,onKeyDown:`onkeydown`,onKeyPress:`onkeypress`,onKeyUp:`onkeyup`,onLoad:`onload`,onLoadedData:`onloadeddata`,onLoadedMetadata:`onloadedmetadata`,onLoadStart:`onloadstart`,onMessage:`onmessage`,onMouseDown:`onmousedown`,onMouseEnter:`onmouseenter`,onMouseLeave:`onmouseleave`,onMouseMove:`onmousemove`,onMouseOut:`onmouseout`,onMouseOver:`onmouseover`,onMouseUp:`onmouseup`,onMouseWheel:`onmousewheel`,onOffline:`onoffline`,onOnline:`ononline`,onPageHide:`onpagehide`,onPageShow:`onpageshow`,onPaste:`onpaste`,onPause:`onpause`,onPlay:`onplay`,onPlaying:`onplaying`,onPopState:`onpopstate`,onProgress:`onprogress`,onRateChange:`onratechange`,onRepeat:`onrepeat`,onReset:`onreset`,onResize:`onresize`,onScroll:`onscroll`,onSeeked:`onseeked`,onSeeking:`onseeking`,onSelect:`onselect`,onShow:`onshow`,onStalled:`onstalled`,onStorage:`onstorage`,onSubmit:`onsubmit`,onSuspend:`onsuspend`,onTimeUpdate:`ontimeupdate`,onToggle:`ontoggle`,onUnload:`onunload`,onVolumeChange:`onvolumechange`,onWaiting:`onwaiting`,onZoom:`onzoom`,overlinePosition:`overline-position`,overlineThickness:`overline-thickness`,paintOrder:`paint-order`,panose1:`panose-1`,pointerEvents:`pointer-events`,referrerPolicy:`referrerpolicy`,renderingIntent:`rendering-intent`,shapeRendering:`shape-rendering`,stopColor:`stop-color`,stopOpacity:`stop-opacity`,strikethroughPosition:`strikethrough-position`,strikethroughThickness:`strikethrough-thickness`,strokeDashArray:`stroke-dasharray`,strokeDashOffset:`stroke-dashoffset`,strokeLineCap:`stroke-linecap`,strokeLineJoin:`stroke-linejoin`,strokeMiterLimit:`stroke-miterlimit`,strokeOpacity:`stroke-opacity`,strokeWidth:`stroke-width`,tabIndex:`tabindex`,textAnchor:`text-anchor`,textDecoration:`text-decoration`,textRendering:`text-rendering`,transformOrigin:`transform-origin`,typeOf:`typeof`,underlinePosition:`underline-position`,underlineThickness:`underline-thickness`,unicodeBidi:`unicode-bidi`,unicodeRange:`unicode-range`,unitsPerEm:`units-per-em`,vAlphabetic:`v-alphabetic`,vHanging:`v-hanging`,vIdeographic:`v-ideographic`,vMathematical:`v-mathematical`,vectorEffect:`vector-effect`,vertAdvY:`vert-adv-y`,vertOriginX:`vert-origin-x`,vertOriginY:`vert-origin-y`,wordSpacing:`word-spacing`,writingMode:`writing-mode`,xHeight:`x-height`,playbackOrder:`playbackorder`,timelineBegin:`timelinebegin`},properties:{about:HE,accentHeight:Z,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:Z,amplitude:Z,arabicForm:null,ascent:Z,attributeName:null,attributeType:null,azimuth:Z,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:Z,by:null,calcMode:null,capHeight:Z,className:BE,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:Z,diffuseConstant:Z,direction:null,display:null,dur:null,divisor:Z,dominantBaseline:null,download:X,dx:null,dy:null,edgeMode:null,editable:null,elevation:Z,enableBackground:null,end:null,event:null,exponent:Z,externalResourcesRequired:null,fill:null,fillOpacity:Z,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:VE,g2:VE,glyphName:VE,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:Z,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:Z,horizOriginX:Z,horizOriginY:Z,id:null,ideographic:Z,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:Z,k:Z,k1:Z,k2:Z,k3:Z,k4:Z,kernelMatrix:HE,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:Z,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskType:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:Z,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:Z,overlineThickness:Z,paintOrder:null,panose1:null,path:null,pathLength:Z,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:BE,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:Z,pointsAtY:Z,pointsAtZ:Z,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:HE,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:HE,rev:HE,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:HE,requiredFeatures:HE,requiredFonts:HE,requiredFormats:HE,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:Z,specularExponent:Z,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:Z,strikethroughThickness:Z,string:null,stroke:null,strokeDashArray:HE,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:Z,strokeOpacity:Z,strokeWidth:null,style:null,surfaceScale:Z,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:HE,tabIndex:Z,tableValues:null,target:null,targetX:Z,targetY:Z,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:HE,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:Z,underlineThickness:Z,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:Z,values:null,vAlphabetic:Z,vMathematical:Z,vectorEffect:null,vHanging:Z,vIdeographic:Z,version:null,vertAdvY:Z,vertOriginX:Z,vertOriginY:Z,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:Z,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:`svg`,transform:YE}),$E=qE({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:`xlink`,transform(e,t){return`xlink:`+t.slice(5).toLowerCase()}}),eD=qE({attributes:{xmlnsxlink:`xmlns:xlink`},properties:{xmlnsXLink:null,xmlns:null},space:`xmlns`,transform:XE}),tD=qE({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:`xml`,transform(e,t){return`xml:`+t.slice(3).toLowerCase()}}),nD={classId:`classID`,dataType:`datatype`,itemId:`itemID`,strokeDashArray:`strokeDasharray`,strokeDashOffset:`strokeDashoffset`,strokeLineCap:`strokeLinecap`,strokeLineJoin:`strokeLinejoin`,strokeMiterLimit:`strokeMiterlimit`,typeOf:`typeof`,xLinkActuate:`xlinkActuate`,xLinkArcRole:`xlinkArcrole`,xLinkHref:`xlinkHref`,xLinkRole:`xlinkRole`,xLinkShow:`xlinkShow`,xLinkTitle:`xlinkTitle`,xLinkType:`xlinkType`,xmlnsXLink:`xmlnsXlink`},rD=/[A-Z]/g,iD=/-[a-z]/g,aD=/^data[-\w.:]+$/i;function oD(e,t){let n=PE(t),r=t,i=FE;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)===`data`&&aD.test(t)){if(t.charAt(4)===`-`){let e=t.slice(5).replace(iD,cD);r=`data`+e.charAt(0).toUpperCase()+e.slice(1)}else{let e=t.slice(4);if(!iD.test(e)){let n=e.replace(rD,sD);n.charAt(0)!==`-`&&(n=`-`+n),t=`data`+n}}i=GE}return new i(r,t)}function sD(e){return`-`+e.toLowerCase()}function cD(e){return e.charAt(1).toUpperCase()}var lD=NE([JE,ZE,$E,eD,tD],`html`),uD=NE([JE,QE,$E,eD,tD],`svg`);function dD(e){return e.join(` `).trim()}var fD=/\/\*(?:[^*]|\*(?!\/))*\*\//g,pD=/\n/g,mD=/^\s*/,hD=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,gD=/^:\s*/,_D=/^((?:'(?:\\.|[^'\\])*'|"(?:\\.|[^"\\])*"|url\((?:'(?:\\.|[^'\\])*'|"(?:\\.|[^"\\])*"|[^)]*)\)|[^};])+)/,vD=/^[;\s]*/,yD=`
15
+ `,bD=`/`,xD=`*`,SD=``,CD=`comment`,wD=`declaration`;function TD(e,t){if(typeof e!=`string`)throw TypeError(`First argument must be a string`);if(!e)return[];t||={};var n=1,r=1;function i(e){var t=e.match(pD);t&&(n+=t.length);var i=e.lastIndexOf(yD);r=~i?e.length-i:r+e.length}function a(){var e={line:n,column:r};return function(t){return t.position=new o(e),l(),t}}function o(e){this.start=e,this.end={line:n,column:r},this.source=t.source}o.prototype.content=e;function s(i){var a=Error(t.source+`:`+n+`:`+r+`: `+i);if(a.reason=i,a.filename=t.source,a.line=n,a.column=r,a.source=e,!t.silent)throw a}function c(t){var n=t.exec(e);if(n){var r=n[0];return i(r),e=e.slice(r.length),n}}function l(){c(mD)}function u(e){for(var t;t=d();)e.push(t);return e}function d(){var t=a();if(bD==e.charAt(0)&&xD==e.charAt(1)){for(var n=2;SD!=e.charAt(n)&&(xD!=e.charAt(n)||bD!=e.charAt(n+1));)++n;if(n+=2,SD===e.charAt(n-1))return s(`End of comment missing`);var o=e.slice(2,n-2);return r+=2,i(o),e=e.slice(n),r+=2,t({type:CD,comment:o})}}function f(){var e=a(),t=c(hD);if(t){if(d(),!c(gD))return s(`property missing ':'`);var n=c(_D),r=e({type:wD,property:t[0].replace(fD,SD).trim(),value:n?n[0].replace(fD,SD).trim():SD});return c(vD),r}}function p(){var e=[];u(e);for(var t;t=f();)e.push(t),u(e);return e}return l(),p()}function ED(e,t){let n=null;if(!e||typeof e!=`string`)return n;let r=TD(e),i=typeof t==`function`;return r.forEach(e=>{if(e.type!==`declaration`)return;let{property:r,value:a}=e;i?t(r,a,e):a&&(n??={},n[r]=a)}),n}var DD=kD(`end`),OD=kD(`start`);function kD(e){return t;function t(t){let n=t&&t.position&&t.position[e]||{};if(typeof n.line==`number`&&n.line>0&&typeof n.column==`number`&&n.column>0)return{line:n.line,column:n.column,offset:typeof n.offset==`number`&&n.offset>-1?n.offset:void 0}}}function AD(e){let t=OD(e),n=DD(e);if(t&&n)return{start:t,end:n}}function jD(e){return!e||typeof e!=`object`?``:`position`in e||`type`in e?ND(e.position):`start`in e||`end`in e?ND(e):`line`in e||`column`in e?MD(e):``}function MD(e){return PD(e&&e.line)+`:`+PD(e&&e.column)}function ND(e){return MD(e&&e.start)+`-`+MD(e&&e.end)}function PD(e){return e&&typeof e==`number`?e:1}var FD=class extends Error{constructor(e,t,n){super(),typeof t==`string`&&(n=t,t=void 0);let r=``,i={},a=!1;if(t&&(i=`line`in t&&`column`in t||`start`in t&&`end`in t?{place:t}:`type`in t?{ancestors:[t],place:t.position}:{...t}),typeof e==`string`?r=e:!i.cause&&e&&(a=!0,r=e.message,i.cause=e),!i.ruleId&&!i.source&&typeof n==`string`){let e=n.indexOf(`:`);e===-1?i.ruleId=n:(i.source=n.slice(0,e),i.ruleId=n.slice(e+1))}if(!i.place&&i.ancestors){let e=i.ancestors[i.ancestors.length-1];e&&(i.place=e.position)}let o=i.place&&`start`in i.place?i.place.start:i.place;this.ancestors=i.ancestors||void 0,this.cause=i.cause||void 0,this.column=o?o.column:void 0,this.fatal=void 0,this.file=``,this.message=r,this.line=o?o.line:void 0,this.name=jD(i.place)||`1:1`,this.place=i.place||void 0,this.reason=this.message,this.ruleId=i.ruleId||void 0,this.source=i.source||void 0,this.stack=a&&i.cause&&typeof i.cause.stack==`string`?i.cause.stack:``,this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}};Object.defineProperties(FD.prototype,{file:{configurable:!0,enumerable:!0,value:``,writable:!0},name:{configurable:!0,enumerable:!0,value:``,writable:!0},reason:{configurable:!0,enumerable:!0,value:``,writable:!0},message:{configurable:!0,enumerable:!0,value:``,writable:!0},stack:{configurable:!0,enumerable:!0,value:``,writable:!0},column:{configurable:!0,enumerable:!0,writable:!0},line:{configurable:!0,enumerable:!0,writable:!0},ancestors:{configurable:!0,enumerable:!0,writable:!0},cause:{configurable:!0,enumerable:!0,writable:!0},fatal:{configurable:!0,enumerable:!0,writable:!0},place:{configurable:!0,enumerable:!0,writable:!0},ruleId:{configurable:!0,enumerable:!0,writable:!0},source:{configurable:!0,enumerable:!0,writable:!0}});var ID={}.hasOwnProperty,LD=new Map,RD=/[A-Z]/g,zD=/-([a-z])/g,BD=new Set([`table`,`tbody`,`thead`,`tfoot`,`tr`]),VD=new Set([`td`,`th`]),HD=`https://github.com/syntax-tree/hast-util-to-jsx-runtime`;function UD(e,t){if(!t||t.Fragment===void 0)throw TypeError("Expected `Fragment` in options");let n=t.filePath||void 0,r;if(t.development){if(typeof t.jsxDEV!=`function`)throw TypeError("Expected `jsxDEV` in options when `development: true`");r=eO(n,t.jsxDEV)}else{if(typeof t.jsx!=`function`)throw TypeError("Expected `jsx` in production options");if(typeof t.jsxs!=`function`)throw TypeError("Expected `jsxs` in production options");r=$D(n,t.jsx,t.jsxs)}let i={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:r,elementAttributeNameCase:t.elementAttributeNameCase||`react`,evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:n,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:t.passKeys!==!1,passNode:t.passNode||!1,schema:t.space===`svg`?uD:lD,stylePropertyNameCase:t.stylePropertyNameCase||`dom`,tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},a=WD(i,e,void 0);return a&&typeof a!=`string`?a:i.create(e,i.Fragment,{children:a||void 0},void 0)}function WD(e,t,n){if(t.type===`element`)return GD(e,t,n);if(t.type===`mdxFlowExpression`||t.type===`mdxTextExpression`)return KD(e,t);if(t.type===`mdxJsxFlowElement`||t.type===`mdxJsxTextElement`)return JD(e,t,n);if(t.type===`mdxjsEsm`)return qD(e,t);if(t.type===`root`)return YD(e,t,n);if(t.type===`text`)return XD(e,t)}function GD(e,t,n){let r=e.schema,i=r;t.tagName.toLowerCase()===`svg`&&r.space===`html`&&(i=uD,e.schema=i),e.ancestors.push(t);let a=oO(e,t.tagName,!1),o=tO(e,t),s=rO(e,t);return BD.has(t.tagName)&&(s=s.filter(function(e){return typeof e!=`string`||!AE(e)})),ZD(e,o,a,t),QD(o,s),e.ancestors.pop(),e.schema=r,e.create(t,a,o,n)}function KD(e,t){if(t.data&&t.data.estree&&e.evaluater){let n=t.data.estree.body[0];return n.type,e.evaluater.evaluateExpression(n.expression)}sO(e,t.position)}function qD(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);sO(e,t.position)}function JD(e,t,n){let r=e.schema,i=r;t.name===`svg`&&r.space===`html`&&(i=uD,e.schema=i),e.ancestors.push(t);let a=t.name===null?e.Fragment:oO(e,t.name,!0),o=nO(e,t),s=rO(e,t);return ZD(e,o,a,t),QD(o,s),e.ancestors.pop(),e.schema=r,e.create(t,a,o,n)}function YD(e,t,n){let r={};return QD(r,rO(e,t)),e.create(t,e.Fragment,r,n)}function XD(e,t){return t.value}function ZD(e,t,n,r){typeof n!=`string`&&n!==e.Fragment&&e.passNode&&(t.node=r)}function QD(e,t){if(t.length>0){let n=t.length>1?t:t[0];n&&(e.children=n)}}function $D(e,t,n){return r;function r(e,r,i,a){let o=Array.isArray(i.children)?n:t;return a?o(r,i,a):o(r,i)}}function eO(e,t){return n;function n(n,r,i,a){let o=Array.isArray(i.children),s=OD(n);return t(r,i,a,o,{columnNumber:s?s.column-1:void 0,fileName:e,lineNumber:s?s.line:void 0},void 0)}}function tO(e,t){let n={},r,i;for(i in t.properties)if(i!==`children`&&ID.call(t.properties,i)){let a=iO(e,i,t.properties[i]);if(a){let[i,o]=a;e.tableCellAlignToStyle&&i===`align`&&typeof o==`string`&&VD.has(t.tagName)?r=o:n[i]=o}}if(r){let t=n.style||={};t[e.stylePropertyNameCase===`css`?`text-align`:`textAlign`]=r}return n}function nO(e,t){let n={};for(let r of t.attributes)if(r.type===`mdxJsxExpressionAttribute`){if(r.data&&r.data.estree&&e.evaluater){let t=r.data.estree.body[0];t.type;let i=t.expression;i.type;let a=i.properties[0];a.type,Object.assign(n,e.evaluater.evaluateExpression(a.argument))}else sO(e,t.position)}else{let{name:i}=r,a;if(r.value&&typeof r.value==`object`){if(r.value.data&&r.value.data.estree&&e.evaluater){let t=r.value.data.estree.body[0];t.type,a=e.evaluater.evaluateExpression(t.expression)}else sO(e,t.position)}else a=r.value===null||r.value;n[i]=a}return n}function rO(e,t){let n=[],r=-1,i=e.passKeys?new Map:LD;for(;++r<t.children.length;){let a=t.children[r],o;if(e.passKeys){let e=a.type===`element`?a.tagName:a.type===`mdxJsxFlowElement`||a.type===`mdxJsxTextElement`?a.name:void 0;if(e){let t=i.get(e)||0;o=e+`-`+t,i.set(e,t+1)}}let s=WD(e,a,o);s!==void 0&&n.push(s)}return n}function iO(e,t,n){if(n==null||typeof n==`number`&&Number.isNaN(n))return;let r=oD(e.schema,t);return Array.isArray(n)&&(n=r.commaSeparated?wE(n):dD(n)),r.property===`style`?[`style`,typeof n==`object`?e.stylePropertyNameCase===`dom`?n:cO(n):aO(e,String(n))]:[e.elementAttributeNameCase===`react`&&r.space?nD[r.property]||r.property:r.attribute,n]}function aO(e,t){let n={};try{ED(t,function(t,r){if(t&&r){let i=t;i.slice(0,2)!==`--`&&(i=i.toLowerCase(),e.stylePropertyNameCase===`dom`&&(i.slice(0,4)===`-ms-`&&(i=i.slice(1)),i=i.replace(zD,dO))),n[i]=r}})}catch(t){if(e.ignoreInvalidStyle)return{};let n=t,r=new FD("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:n,ruleId:`style`,source:`hast-util-to-jsx-runtime`});throw r.file=e.filePath||void 0,r.url=HD+`#cannot-parse-style-attribute`,r}return n}function oO(e,t,n){let r;if(!n)r={type:`Literal`,value:t};else if(t.includes(`.`)){let e=t.split(`.`),n=-1,i;for(;++n<e.length;){let t=OE(e[n])?{type:`Identifier`,name:e[n]}:{type:`Literal`,value:e[n]};i=i?{type:`MemberExpression`,object:i,property:t,computed:!!(n&&t.type===`Literal`),optional:!1}:t}r=i}else r=OE(t)&&!/^[a-z]/.test(t)?{type:`Identifier`,name:t}:{type:`Literal`,value:t};if(r.type===`Literal`){let t=r.value;return ID.call(e.components,t)?e.components[t]:t}if(e.evaluater)return e.evaluater.evaluateExpression(r);sO(e)}function sO(e,t){let n=new FD("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:t,ruleId:`mdx-estree`,source:`hast-util-to-jsx-runtime`});throw n.file=e.filePath||void 0,n.url=HD+`#cannot-handle-mdx-estrees-without-createevaluater`,n}function cO(e){let t={},n;for(n in e)ID.call(e,n)&&(t[lO(n)]=e[n]);return t}function lO(e){if(e.slice(0,2)===`--`)return e;let t=e.replace(RD,uO);return t.slice(0,3)===`ms-`&&(t=`-`+t),t}function uO(e){return`-`+e.toLowerCase()}function dO(e,t){return t.toUpperCase()}var fO={action:[`form`],cite:[`blockquote`,`del`,`ins`,`q`],data:[`object`],formAction:[`button`,`input`],href:[`a`,`area`,`base`,`link`],icon:[`menuitem`],itemId:null,manifest:[`html`],ping:[`a`,`area`],poster:[`video`],src:[`audio`,`embed`,`iframe`,`img`,`input`,`script`,`source`,`track`,`video`]},pO={};function mO(e,t){let n=t||pO;return hO(e,typeof n.includeImageAlt!=`boolean`||n.includeImageAlt,typeof n.includeHtml!=`boolean`||n.includeHtml)}function hO(e,t,n){if(_O(e)){if(`value`in e)return e.type===`html`&&!n?``:e.value;if(t&&`alt`in e&&e.alt)return e.alt;if(`children`in e)return gO(e.children,t,n)}return Array.isArray(e)?gO(e,t,n):``}function gO(e,t,n){let r=[],i=-1;for(;++i<e.length;)r[i]=hO(e[i],t,n);return r.join(``)}function _O(e){return!!(e&&typeof e==`object`)}var vO=document.createElement(`i`);function yO(e){let t=`&`+e+`;`;vO.innerHTML=t;let n=vO.textContent;return n.charCodeAt(n.length-1)===59&&e!==`semi`?!1:n!==t&&n}function bO(e,t,n,r){let i=e.length,a=0,o;if(t=t<0?-t>i?0:i+t:t>i?i:t,n=n>0?n:0,r.length<1e4)o=Array.from(r),o.unshift(t,n),e.splice(...o);else for(n&&e.splice(t,n);a<r.length;)o=r.slice(a,a+1e4),o.unshift(t,0),e.splice(...o),a+=1e4,t+=1e4}function xO(e,t){return e.length>0?(bO(e,e.length,0,t),e):t}var SO={}.hasOwnProperty;function CO(e){let t={},n=-1;for(;++n<e.length;)wO(t,e[n]);return t}function wO(e,t){let n;for(n in t){let r=(SO.call(e,n)?e[n]:void 0)||(e[n]={}),i=t[n],a;if(i)for(a in i){SO.call(r,a)||(r[a]=[]);let e=i[a];TO(r[a],Array.isArray(e)?e:e?[e]:[])}}}function TO(e,t){let n=-1,r=[];for(;++n<t.length;)(t[n].add===`after`?e:r).push(t[n]);bO(e,0,0,r)}function EO(e,t){let n=Number.parseInt(e,t);return n<9||n===11||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||(n&65535)==65535||(n&65535)==65534||n>1114111?`�`:String.fromCodePoint(n)}function DO(e){return e.replace(/[\t\n\r ]+/g,` `).replace(/^ | $/g,``).toLowerCase().toUpperCase()}var OO=RO(/[A-Za-z]/),kO=RO(/[\dA-Za-z]/),AO=RO(/[#-'*+\--9=?A-Z^-~]/);function jO(e){return e!==null&&(e<32||e===127)}var MO=RO(/\d/),NO=RO(/[\dA-Fa-f]/),PO=RO(/[!-/:-@[-`{-~]/);function Q(e){return e!==null&&e<-2}function FO(e){return e!==null&&(e<0||e===32)}function $(e){return e===-2||e===-1||e===32}var IO=RO(/\p{P}|\p{S}/u),LO=RO(/\s/);function RO(e){return t;function t(t){return t!==null&&t>-1&&e.test(String.fromCharCode(t))}}function zO(e){let t=[],n=-1,r=0,i=0;for(;++n<e.length;){let a=e.charCodeAt(n),o=``;if(a===37&&kO(e.charCodeAt(n+1))&&kO(e.charCodeAt(n+2)))i=2;else if(a<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(a))||(o=String.fromCharCode(a));else if(a>55295&&a<57344){let t=e.charCodeAt(n+1);a<56320&&t>56319&&t<57344?(o=String.fromCharCode(a,t),i=1):o=`�`}else o=String.fromCharCode(a);o&&=(t.push(e.slice(r,n),encodeURIComponent(o)),r=n+i+1,``),i&&=(n+=i,0)}return t.join(``)+e.slice(r)}function BO(e,t,n,r){let i=r?r-1:1/0,a=0;return o;function o(r){return $(r)?(e.enter(n),s(r)):t(r)}function s(r){return $(r)&&a++<i?(e.consume(r),s):(e.exit(n),t(r))}}function VO(e,t,n,r,i,a){let o=0;return s;function s(t){return a>0&&$(t)?(e.enter(r),c(t)):l(t)}function c(t){return $(t)&&o<a?(e.consume(t),o++,c):(e.exit(r),l(t))}function l(e){return o>=i?t(e):n(e)}}var HO={tokenize:UO};function UO(e){let t=e.attempt(this.parser.constructs.contentInitial,r,i),n;return t;function r(n){if(n===null)e.consume(n);else return e.enter(`lineEnding`),e.consume(n),e.exit(`lineEnding`),BO(e,t,`linePrefix`)}function i(t){return e.enter(`paragraph`),a(t)}function a(t){let r=e.enter(`chunkText`,{contentType:`text`,previous:n});return n&&(n.next=r),n=r,o(t)}function o(t){if(t===null)e.exit(`chunkText`),e.exit(`paragraph`),e.consume(t);else return Q(t)?(e.consume(t),e.exit(`chunkText`),a):(e.consume(t),o)}}var WO=class{constructor(){this.index=new Map,this.map=[]}add(e,t,n){GO(this,e,t,n,!1)}addBefore(e,t,n){GO(this,e,t,n,!0)}consume(e){if(this.map.sort(function(e,t){return e[0]-t[0]}),this.map.length===0)return;let t=this.map.length,n=[];for(;t>0;)--t,n.push(e.slice(this.map[t][0]+this.map[t][1]),this.map[t][2]),e.length=this.map[t][0];n.push(e.slice()),e.length=0;let r=n.pop();for(;r;){for(let t of r)e.push(t);r=n.pop()}this.map.length=0,this.index.clear()}};function GO(e,t,n,r,i){if(n===0&&r.length===0)return;let a=e.index.get(t);if(a){a[1]+=n,i?(r.push(...a[2]),a[2]=r):a[2].push(...r);return}let o=[t,n,r];e.map.push(o),e.index.set(t,o)}var KO={tokenize:JO},qO={tokenize:YO};function JO(e){let t=this,n=[],r=0,i,a,o;return s;function s(i){if(r<n.length){let a=n[r];return t.containerState=a[1],e.attempt(a[0].continuation,c,l)(i)}return l(i)}function c(e){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,i&&v();let n=t.events.length,a=n,o;for(;a--;)if(t.events[a][0]===`exit`&&t.events[a][1].type===`chunkFlow`){o=t.events[a][1].end;break}_(r);let s=n;for(;s<t.events.length;)t.events[s][1].end={...o},s++;let c=new WO;return c.add(a+1,0,t.events.slice(n)),c.add(n,s-n,[]),c.consume(t.events),l(e)}return s(e)}function l(a){if(r===n.length){if(!i)return f(a);if(i.currentConstruct&&i.currentConstruct.concrete)return m(a);t.interrupt=!(!i.currentConstruct||i._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(qO,u,d)(a)}function u(e){return i&&v(),_(r),f(e)}function d(e){return t.parser.lazy[t.now().line]=r!==n.length,o=t.now().offset,m(e)}function f(n){return t.containerState={},e.attempt(qO,p,m)(n)}function p(e){return r++,n.push([t.currentConstruct,t.containerState]),f(e)}function m(n){if(n===null)i&&v(),_(0),e.consume(n);else return i||=t.parser.flow(t.now()),e.enter(`chunkFlow`,{_tokenizer:i,contentType:`flow`,previous:a}),h(n)}function h(n){if(n===null)g(e.exit(`chunkFlow`),!0),_(0),e.consume(n);else return Q(n)?(e.consume(n),g(e.exit(`chunkFlow`)),r=0,t.interrupt=void 0,s):(e.consume(n),h)}function g(e,n){let s=t.sliceStream(e);if(n&&s.push(null),e.previous=a,a&&(a.next=e),a=e,i.defineSkip(e.start),i.write(s),t.parser.lazy[e.start.line]){let e=i.events.length;for(;e--;)if(i.events[e][1].start.offset<o&&(!i.events[e][1].end||i.events[e][1].end.offset>o))return;let n=t.events.length,a=n,s,c;for(;a--;)if(t.events[a][0]===`exit`&&t.events[a][1].type===`chunkFlow`){if(s){c=t.events[a][1].end;break}s=!0}for(_(r),e=n;e<t.events.length;)t.events[e][1].end={...c},e++;let l=new WO;l.add(a+1,0,t.events.slice(n)),l.add(n,e-n,[]),l.consume(t.events)}}function _(r){let i=n.length;for(;i-->r;){let r=n[i];t.containerState=r[1],r[0].exit.call(t,e)}n.length=r}function v(){i.write([null]),a=void 0,i=void 0,t.containerState._closeFlow=void 0}}function YO(e,t,n){return BO(e,e.attempt(this.parser.constructs.document,t,n),`linePrefix`,this.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)}function XO(e){if(e===null||FO(e)||LO(e))return 1;if(IO(e))return 2}function ZO(e,t,n){let r=[],i=-1;for(;++i<e.length;){let a=e[i].resolveAll;a&&!r.includes(a)&&(t=a(t,n),r.push(a))}return t}var QO={name:`attention`,resolveAll:$O,tokenize:ek};function $O(e,t){let n=-1,r;for(;++n<e.length;)if(e[n][0]===`enter`&&e[n][1].type===`attentionSequence`&&e[n][1]._close){let i=n;for(;i--;)if(e[i][0]===`exit`&&e[i][1].type===`attentionSequence`&&e[i][1]._open&&t.sliceSerialize(e[i][1]).charCodeAt(0)===t.sliceSerialize(e[n][1]).charCodeAt(0)){if((e[i][1]._close||e[n][1]._open)&&(e[n][1].end.offset-e[n][1].start.offset)%3&&!((e[i][1].end.offset-e[i][1].start.offset+e[n][1].end.offset-e[n][1].start.offset)%3))continue;let a=e[i][1].end.offset-e[i][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1,o={...e[i][1].end},s={...e[n][1].start};tk(o,-a),tk(s,a);let c={type:a>1?`strongSequence`:`emphasisSequence`,start:o,end:{...e[i][1].end}},l={type:a>1?`strongSequence`:`emphasisSequence`,start:{...e[n][1].start},end:s},u={type:a>1?`strongText`:`emphasisText`,start:{...e[i][1].end},end:{...e[n][1].start}},d={type:a>1?`strong`:`emphasis`,start:{...c.start},end:{...l.end}};e[i][1].end={...c.start},e[n][1].start={...l.end},r=[],e[i][1].end.offset-e[i][1].start.offset&&(r=xO(r,[[`enter`,e[i][1],t],[`exit`,e[i][1],t]])),r=xO(r,[[`enter`,d,t],[`enter`,c,t],[`exit`,c,t],[`enter`,u,t]]),r=xO(r,ZO(t.parser.constructs.insideSpan.null,e.slice(i+1,n),t)),r=xO(r,[[`exit`,u,t],[`enter`,l,t],[`exit`,l,t],[`exit`,d,t]]);let f=0;e[n][1].end.offset-e[n][1].start.offset&&(f=2,r=xO(r,[[`enter`,e[n][1],t],[`exit`,e[n][1],t]])),bO(e,i-1,n-i+3,r),n=i+r.length-f-2;break}}for(n=-1;++n<e.length;)e[n][1].type===`attentionSequence`&&(e[n][1].type=`data`);return e}function ek(e,t){let n=this.parser.constructs.attentionMarkers.null,r=this.previous,i=XO(r),a;return o;function o(t){return a=t,e.enter(`attentionSequence`),s(t)}function s(o){if(o===a)return e.consume(o),s;let c=e.exit(`attentionSequence`),l=XO(o),u=!l||l===2&&i||n.includes(o)&&o!==42&&o!==95,d=!i||i===2&&l||n.includes(r)&&r!==42&&r!==95;return c._open=!!(a===42?u:u&&(i||!d)),c._close=!!(a===42?d:d&&(l||!u)),t(o)}}function tk(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}var nk={name:`autolink`,tokenize:rk};function rk(e,t,n){let r=0;return i;function i(t){return e.enter(`autolink`),e.enter(`autolinkMarker`),e.consume(t),e.exit(`autolinkMarker`),e.enter(`autolinkProtocol`),a}function a(t){return OO(t)?(e.consume(t),o):t===64?n(t):l(t)}function o(e){return e===43||e===45||e===46||kO(e)?(r=1,s(e)):l(e)}function s(t){return t===58?(e.consume(t),r=0,c):(t===43||t===45||t===46||kO(t))&&r++<32?(e.consume(t),s):(r=0,l(t))}function c(r){return r===62?(e.exit(`autolinkProtocol`),e.enter(`autolinkMarker`),e.consume(r),e.exit(`autolinkMarker`),e.exit(`autolink`),t):r===null||r===32||r===60||jO(r)?n(r):(e.consume(r),c)}function l(t){return t===64?(e.consume(t),u):AO(t)?(e.consume(t),l):n(t)}function u(e){return kO(e)?d(e):n(e)}function d(n){return n===46?(e.consume(n),r=0,u):n===62?(e.exit(`autolinkProtocol`).type=`autolinkEmail`,e.enter(`autolinkMarker`),e.consume(n),e.exit(`autolinkMarker`),e.exit(`autolink`),t):f(n)}function f(t){if((t===45||kO(t))&&r++<63){let n=t===45?f:d;return e.consume(t),n}return n(t)}}var ik={partial:!0,tokenize:ak};function ak(e,t,n){return r;function r(t){return $(t)?BO(e,i,`linePrefix`)(t):i(t)}function i(e){return e===null||Q(e)?t(e):n(e)}}var ok={continuation:{tokenize:ck},exit:lk,name:`blockQuote`,tokenize:sk};function sk(e,t,n){let r=this;return i;function i(t){if(t===62){let n=r.containerState;return n.open||=(e.enter(`blockQuote`,{_container:!0}),!0),e.enter(`blockQuotePrefix`),e.enter(`blockQuoteMarker`),e.consume(t),e.exit(`blockQuoteMarker`),a}return n(t)}function a(n){return $(n)?(e.enter(`blockQuotePrefixWhitespace`),e.consume(n),e.exit(`blockQuotePrefixWhitespace`),e.exit(`blockQuotePrefix`),t):(e.exit(`blockQuotePrefix`),t(n))}}function ck(e,t,n){let r=this;return i;function i(t){return $(t)?BO(e,a,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):a(t)}function a(r){return e.attempt(ok,t,n)(r)}}function lk(e){e.exit(`blockQuote`)}var uk={name:`characterEscape`,tokenize:dk};function dk(e,t,n){return r;function r(t){return e.enter(`characterEscape`),e.enter(`escapeMarker`),e.consume(t),e.exit(`escapeMarker`),i}function i(r){return PO(r)?(e.enter(`characterEscapeValue`),e.consume(r),e.exit(`characterEscapeValue`),e.exit(`characterEscape`),t):n(r)}}var fk={name:`characterReference`,tokenize:pk};function pk(e,t,n){let r=this,i=0,a,o;return s;function s(t){return e.enter(`characterReference`),e.enter(`characterReferenceMarker`),e.consume(t),e.exit(`characterReferenceMarker`),c}function c(t){return t===35?(e.enter(`characterReferenceMarkerNumeric`),e.consume(t),e.exit(`characterReferenceMarkerNumeric`),l):(e.enter(`characterReferenceValue`),a=31,o=kO,u(t))}function l(t){return t===88||t===120?(e.enter(`characterReferenceMarkerHexadecimal`),e.consume(t),e.exit(`characterReferenceMarkerHexadecimal`),e.enter(`characterReferenceValue`),a=6,o=NO,u):(e.enter(`characterReferenceValue`),a=7,o=MO,u(t))}function u(s){if(s===59&&i){let i=e.exit(`characterReferenceValue`);return o===kO&&!yO(r.sliceSerialize(i))?n(s):(e.enter(`characterReferenceMarker`),e.consume(s),e.exit(`characterReferenceMarker`),e.exit(`characterReference`),t)}return o(s)&&i++<a?(e.consume(s),u):n(s)}}var mk={partial:!0,tokenize:hk};function hk(e,t,n){let r=this;return i;function i(t){return t===null?n(t):(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),a)}function a(e){return r.parser.lazy[r.now().line]?n(e):t(e)}}var gk={concrete:!0,name:`codeFenced`,tokenize:_k};function _k(e,t,n){let r=this,i={partial:!0,tokenize:x},a=0,o=0,s;return c;function c(e){return l(e)}function l(t){let n=r.events[r.events.length-1];return a=n&&n[1].type===`linePrefix`?n[2].sliceSerialize(n[1],!0).length:0,s=t,e.enter(`codeFenced`),e.enter(`codeFencedFence`),e.enter(`codeFencedFenceSequence`),u(t)}function u(t){return t===s?(o++,e.consume(t),u):o<3?n(t):(e.exit(`codeFencedFenceSequence`),$(t)?BO(e,d,`whitespace`)(t):d(t))}function d(n){return n===null||Q(n)?(e.exit(`codeFencedFence`),r.interrupt?t(n):e.check(mk,h,b)(n)):(e.enter(`codeFencedFenceInfo`),e.enter(`chunkString`,{contentType:`string`}),f(n))}function f(t){return t===null||Q(t)?(e.exit(`chunkString`),e.exit(`codeFencedFenceInfo`),d(t)):$(t)?(e.exit(`chunkString`),e.exit(`codeFencedFenceInfo`),BO(e,p,`whitespace`)(t)):t===96&&t===s?n(t):(e.consume(t),f)}function p(t){return t===null||Q(t)?d(t):(e.enter(`codeFencedFenceMeta`),e.enter(`chunkString`,{contentType:`string`}),m(t))}function m(t){return t===null||Q(t)?(e.exit(`chunkString`),e.exit(`codeFencedFenceMeta`),d(t)):t===96&&t===s?n(t):(e.consume(t),m)}function h(t){return e.attempt(i,b,g)(t)}function g(t){return e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),_}function _(t){return a>0&&$(t)?BO(e,v,`linePrefix`,a+1)(t):v(t)}function v(t){return t===null||Q(t)?e.check(mk,h,b)(t):(e.enter(`codeFlowValue`),y(t))}function y(t){return t===null||Q(t)?(e.exit(`codeFlowValue`),v(t)):(e.consume(t),y)}function b(n){return e.exit(`codeFenced`),t(n)}function x(e,t,n){let i=0;return a;function a(t){return e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),c}function c(t){return e.enter(`codeFencedFence`),$(t)?BO(e,l,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):l(t)}function l(t){return t===s?(e.enter(`codeFencedFenceSequence`),u(t)):n(t)}function u(t){return t===s?(i++,e.consume(t),u):i>=o?(e.exit(`codeFencedFenceSequence`),$(t)?BO(e,d,`whitespace`)(t):d(t)):n(t)}function d(r){return r===null||Q(r)?(e.exit(`codeFencedFence`),t(r)):n(r)}}}var vk={name:`codeIndented`,tokenize:bk},yk={partial:!0,tokenize:xk};function bk(e,t,n){return r;function r(t){return e.enter(`codeIndented`),VO(e,i,n,`linePrefix`,4,4)(t)}function i(t){return t===null?o(t):Q(t)?e.attempt(yk,i,o)(t):(e.enter(`codeFlowValue`),a(t))}function a(t){return t===null||Q(t)?(e.exit(`codeFlowValue`),i(t)):(e.consume(t),a)}function o(n){return e.exit(`codeIndented`),t(n)}}function xk(e,t,n){let r=this;return i;function i(o){return r.parser.lazy[r.now().line]?n(o):Q(o)?(e.enter(`lineEnding`),e.consume(o),e.exit(`lineEnding`),i):VO(e,t,a,`linePrefix`,4,4)(o)}function a(e){return Q(e)?i(e):n(e)}}var Sk={name:`codeText`,previous:wk,resolve:Ck,tokenize:Tk};function Ck(e){let t=e.length-4,n=3,r,i;if((e[n][1].type===`lineEnding`||e[n][1].type===`space`)&&(e[t][1].type===`lineEnding`||e[t][1].type===`space`)){for(r=n;++r<t;)if(e[r][1].type===`codeTextData`){e[n][1].type=`codeTextPadding`,e[t][1].type=`codeTextPadding`,n+=2,t-=2;break}}for(r=n-1,t++;++r<=t;)i===void 0?r!==t&&e[r][1].type!==`lineEnding`&&(i=r):(r===t||e[r][1].type===`lineEnding`)&&(e[i][1].type=`codeTextData`,r!==i+2&&(e[i][1].end=e[r-1][1].end,e.splice(i+2,r-i-2),t-=r-i-2,r=i+2),i=void 0);return e}function wk(e){return e!==96||this.events[this.events.length-1][1].type===`characterEscape`}function Tk(e,t,n){let r=0,i,a;return o;function o(t){return e.enter(`codeText`),e.enter(`codeTextSequence`),s(t)}function s(t){return t===96?(e.consume(t),r++,s):(e.exit(`codeTextSequence`),c(t))}function c(t){return t===null?n(t):t===32?(e.enter(`space`),e.consume(t),e.exit(`space`),c):t===96?(a=e.enter(`codeTextSequence`),i=0,u(t)):Q(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),c):(e.enter(`codeTextData`),l(t))}function l(t){return t===null||t===32||t===96||Q(t)?(e.exit(`codeTextData`),c(t)):(e.consume(t),l)}function u(n){return n===96?(e.consume(n),i++,u):i===r?(e.exit(`codeTextSequence`),e.exit(`codeText`),t(n)):(a.type=`codeTextData`,l(n))}}var Ek=class{constructor(e){this.left=e?[...e]:[],this.right=[]}get(e){if(e<0||e>=this.left.length+this.right.length)throw RangeError("Cannot access index `"+e+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return e<this.left.length?this.left[e]:this.right[this.right.length-e+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(e,t){let n=t??1/0;return n<this.left.length?this.left.slice(e,n):e>this.left.length?this.right.slice(this.right.length-n+this.left.length,this.right.length-e+this.left.length).reverse():this.left.slice(e).concat(this.right.slice(this.right.length-n+this.left.length).reverse())}splice(e,t,n){let r=t||0;this.setCursor(Math.trunc(e));let i=this.right.splice(this.right.length-r,1/0);return n&&Dk(this.left,n),i.reverse()}pop(){return this.setCursor(1/0),this.left.pop()}push(e){this.setCursor(1/0),this.left.push(e)}pushMany(e){this.setCursor(1/0),Dk(this.left,e)}unshift(e){this.setCursor(0),this.right.push(e)}unshiftMany(e){this.setCursor(0),Dk(this.right,e.reverse())}setCursor(e){if(!(e===this.left.length||e>this.left.length&&this.right.length===0||e<0&&this.left.length===0)){if(e<this.left.length){let t=this.left.splice(e,1/0);Dk(this.right,t.reverse())}else{let t=this.right.splice(this.left.length+this.right.length-e,1/0);Dk(this.left,t.reverse())}}}};function Dk(e,t){let n=0;if(t.length<1e4)e.push(...t);else for(;n<t.length;)e.push(...t.slice(n,n+1e4)),n+=1e4}function Ok(e){let t={},n=-1,r,i,a,o,s,c,l,u=new Ek(e);for(;++n<u.length;){for(;n in t;)n=t[n];if(r=u.get(n),n&&r[1].type===`chunkFlow`&&u.get(n-1)[1].type===`listItemPrefix`&&(c=r[1]._tokenizer.events,a=0,a<c.length&&c[a][1].type===`lineEndingBlank`&&(a+=2),a<c.length&&c[a][1].type===`content`))for(;++a<c.length&&c[a][1].type!==`content`;)c[a][1].type===`chunkText`&&(c[a][1]._isInFirstContentOfListItem=!0,a++);if(r[0]===`enter`)r[1].contentType&&(Object.assign(t,kk(u,n)),n=t[n],l=!0);else if(r[1]._container){for(a=n,i=void 0;a--;)if(o=u.get(a),o[1].type===`lineEnding`||o[1].type===`lineEndingBlank`)o[0]===`enter`&&(i&&(u.get(i)[1].type=`lineEndingBlank`),o[1].type=`lineEnding`,i=a);else if(o[1].type!==`linePrefix`&&o[1].type!==`listItemIndent`)break;i&&(r[1].end={...u.get(i)[1].start},s=u.slice(i,n),s.unshift(r),u.splice(i,n-i+1,s))}}return bO(e,0,1/0,u.slice(0)),!l}function kk(e,t){let n=e.get(t)[1],r=e.get(t)[2],i=t-1,a=[],o=n._tokenizer;o||(o=r.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(o._contentTypeTextTrailing=!0));let s=o.events,c=[],l={},u,d,f=-1,p=n,m=0,h=0,g=[h];for(;p;){for(;e.get(++i)[1]!==p;);a.push(i),p._tokenizer||(u=r.sliceStream(p),p.next||u.push(null),d&&o.defineSkip(p.start),p._isInFirstContentOfListItem&&(o._gfmTasklistFirstContentOfListItem=!0),o.write(u),p._isInFirstContentOfListItem&&(o._gfmTasklistFirstContentOfListItem=void 0)),d=p,p=p.next}for(p=n;++f<s.length;)s[f][0]===`exit`&&s[f-1][0]===`enter`&&s[f][1].type===s[f-1][1].type&&s[f][1].start.line!==s[f][1].end.line&&(h=f+1,g.push(h),p._tokenizer=void 0,p.previous=void 0,p=p.next);for(o.events=[],p?(p._tokenizer=void 0,p.previous=void 0):g.pop(),f=g.length;f--;){let t=s.slice(g[f],g[f+1]),n=a.pop();c.push([n,n+t.length-1]),e.splice(n,2,t)}for(c.reverse(),f=-1;++f<c.length;)l[m+c[f][0]]=m+c[f][1],m+=c[f][1]-c[f][0]-1;return l}var Ak={resolve:Mk,tokenize:Nk},jk={partial:!0,tokenize:Pk};function Mk(e){return Ok(e),e}function Nk(e,t){let n;return r;function r(t){return e.enter(`content`),n=e.enter(`chunkContent`,{contentType:`content`}),i(t)}function i(t){return t===null?a(t):Q(t)?e.check(jk,o,a)(t):(e.consume(t),i)}function a(n){return e.exit(`chunkContent`),e.exit(`content`),t(n)}function o(t){return e.consume(t),e.exit(`chunkContent`),n.next=e.enter(`chunkContent`,{contentType:`content`,previous:n}),n=n.next,i}}function Pk(e,t,n){let r=this;return i;function i(t){return e.exit(`chunkContent`),e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),BO(e,a,`linePrefix`)}function a(i){if(i===null||Q(i))return n(i);let a=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes(`codeIndented`)&&a&&a[1].type===`linePrefix`&&a[2].sliceSerialize(a[1],!0).length>=4?t(i):e.interrupt(r.parser.constructs.flow,n,t)(i)}}function Fk(e,t,n,r,i,a,o,s,c){let l=c||1/0,u=0;return d;function d(t){return t===60?(e.enter(r),e.enter(i),e.enter(a),e.consume(t),e.exit(a),f):t===null||t===32||t===41||jO(t)?n(t):(e.enter(r),e.enter(o),e.enter(s),e.enter(`chunkString`,{contentType:`string`}),h(t))}function f(n){return n===62?(e.enter(a),e.consume(n),e.exit(a),e.exit(i),e.exit(r),t):(e.enter(s),e.enter(`chunkString`,{contentType:`string`}),p(n))}function p(t){return t===62?(e.exit(`chunkString`),e.exit(s),f(t)):t===null||t===60||Q(t)?n(t):(e.consume(t),t===92?m:p)}function m(t){return t===60||t===62||t===92?(e.consume(t),p):p(t)}function h(i){return!u&&(i===null||i===41||FO(i))?(e.exit(`chunkString`),e.exit(s),e.exit(o),e.exit(r),t(i)):u<l&&i===40?(e.consume(i),u++,h):i===41?(e.consume(i),u--,h):i===null||i===32||i===40||jO(i)?n(i):(e.consume(i),i===92?g:h)}function g(t){return t===40||t===41||t===92?(e.consume(t),h):h(t)}}function Ik(e,t,n,r,i,a){let o=this,s=0,c;return l;function l(t){return e.enter(r),e.enter(i),e.consume(t),e.exit(i),e.enter(a),u}function u(l){return s>999||l===null||l===91||l===93&&!c||l===94&&!s&&`_hiddenFootnoteSupport`in o.parser.constructs?n(l):l===93?(e.exit(a),e.enter(i),e.consume(l),e.exit(i),e.exit(r),t):Q(l)?(e.enter(`lineEnding`),e.consume(l),e.exit(`lineEnding`),u):(e.enter(`chunkString`,{contentType:`string`}),d(l))}function d(t){return t===null||t===91||t===93||Q(t)||s++>999?(e.exit(`chunkString`),u(t)):(e.consume(t),c||=!$(t),t===92?f:d)}function f(t){return t===91||t===92||t===93?(e.consume(t),s++,d):d(t)}}function Lk(e,t,n,r,i,a){let o;return s;function s(t){return t===34||t===39||t===40?(e.enter(r),e.enter(i),e.consume(t),e.exit(i),o=t===40?41:t,c):n(t)}function c(n){return n===o?(e.enter(i),e.consume(n),e.exit(i),e.exit(r),t):(e.enter(a),l(n))}function l(t){return t===o?(e.exit(a),c(o)):t===null?n(t):Q(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),BO(e,l,`linePrefix`)):(e.enter(`chunkString`,{contentType:`string`}),u(t))}function u(t){return t===o||t===null||Q(t)?(e.exit(`chunkString`),l(t)):(e.consume(t),t===92?d:u)}function d(t){return t===o||t===92?(e.consume(t),u):u(t)}}function Rk(e,t){let n;return r;function r(i){return Q(i)?(e.enter(`lineEnding`),e.consume(i),e.exit(`lineEnding`),n=!0,r):$(i)?BO(e,r,n?`linePrefix`:`lineSuffix`)(i):t(i)}}var zk={name:`definition`,tokenize:Vk},Bk={partial:!0,tokenize:Hk};function Vk(e,t,n){let r=this,i;return a;function a(t){return e.enter(`definition`),o(t)}function o(t){return Ik.call(r,e,s,n,`definitionLabel`,`definitionLabelMarker`,`definitionLabelString`)(t)}function s(t){return i=DO(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),t===58?(e.enter(`definitionMarker`),e.consume(t),e.exit(`definitionMarker`),c):n(t)}function c(t){return FO(t)?Rk(e,l)(t):l(t)}function l(t){return Fk(e,u,n,`definitionDestination`,`definitionDestinationLiteral`,`definitionDestinationLiteralMarker`,`definitionDestinationRaw`,`definitionDestinationString`)(t)}function u(t){return e.attempt(Bk,d,d)(t)}function d(t){return $(t)?BO(e,f,`whitespace`)(t):f(t)}function f(a){return a===null||Q(a)?(e.exit(`definition`),r.parser.defined.push(i),t(a)):n(a)}}function Hk(e,t,n){return r;function r(t){return FO(t)?Rk(e,i)(t):n(t)}function i(t){return Lk(e,a,n,`definitionTitle`,`definitionTitleMarker`,`definitionTitleString`)(t)}function a(t){return $(t)?BO(e,o,`whitespace`)(t):o(t)}function o(e){return e===null||Q(e)?t(e):n(e)}}var Uk={name:`hardBreakEscape`,tokenize:Wk};function Wk(e,t,n){return r;function r(t){return e.enter(`hardBreakEscape`),e.consume(t),i}function i(r){return Q(r)?(e.exit(`hardBreakEscape`),t(r)):n(r)}}var Gk={name:`headingAtx`,resolve:Kk,tokenize:qk};function Kk(e,t){let n=e.length-2,r=3;if(e[r][1].type===`whitespace`&&(r+=2),n-2>r&&e[n][1].type===`whitespace`&&(n-=2),e[n][1].type===`atxHeadingSequence`&&(r===n-1||n-4>r&&e[n-2][1].type===`whitespace`)&&(n-=r+1===n?2:4),n>r){let i={type:`atxHeadingText`,start:e[r][1].start,end:e[n][1].end},a={type:`chunkText`,start:e[r][1].start,end:e[n][1].end,contentType:`text`};bO(e,r,n-r+1,[[`enter`,i,t],[`enter`,a,t],[`exit`,a,t],[`exit`,i,t]])}return e}function qk(e,t,n){let r=0;return i;function i(t){return e.enter(`atxHeading`),a(t)}function a(t){return e.enter(`atxHeadingSequence`),o(t)}function o(t){return t===35&&r++<6?(e.consume(t),o):t===null||FO(t)?(e.exit(`atxHeadingSequence`),s(t)):n(t)}function s(n){return n===35?(e.enter(`atxHeadingSequence`),c(n)):n===null||Q(n)?(e.exit(`atxHeading`),t(n)):$(n)?BO(e,s,`whitespace`)(n):(e.enter(`atxHeadingText`),l(n))}function c(t){return t===35?(e.consume(t),c):(e.exit(`atxHeadingSequence`),s(t))}function l(t){return t===null||t===35||FO(t)?(e.exit(`atxHeadingText`),s(t)):(e.consume(t),l)}}var Jk=`address.article.aside.base.basefont.blockquote.body.caption.center.col.colgroup.dd.details.dialog.dir.div.dl.dt.fieldset.figcaption.figure.footer.form.frame.frameset.h1.h2.h3.h4.h5.h6.head.header.hr.html.iframe.legend.li.link.main.menu.menuitem.nav.noframes.ol.optgroup.option.p.param.search.section.summary.table.tbody.td.tfoot.th.thead.title.tr.track.ul`.split(`.`),Yk=[`pre`,`script`,`style`,`textarea`],Xk={concrete:!0,name:`htmlFlow`,resolveTo:Qk,tokenize:$k},Zk={partial:!0,tokenize:eA};function Qk(e){let t=e.length;for(;t--&&(e[t][0]!==`enter`||e[t][1].type!==`htmlFlow`););return t>1&&e[t-2][1].type===`linePrefix`&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e}function $k(e,t,n){let r=this,i,a,o,s,c;return l;function l(e){return u(e)}function u(t){return e.enter(`htmlFlow`),e.enter(`htmlFlowData`),e.consume(t),d}function d(s){return s===33?(e.consume(s),f):s===47?(e.consume(s),a=!0,h):s===63?(e.consume(s),i=3,r.interrupt?t:I):OO(s)?(e.consume(s),o=String.fromCharCode(s),g):n(s)}function f(a){return a===45?(e.consume(a),i=2,p):a===91?(e.consume(a),i=5,s=0,m):OO(a)?(e.consume(a),i=4,r.interrupt?t:I):n(a)}function p(i){return i===45?(e.consume(i),r.interrupt?t:I):n(i)}function m(i){return i===`CDATA[`.charCodeAt(s++)?(e.consume(i),s===6?r.interrupt?t:O:m):n(i)}function h(t){return OO(t)?(e.consume(t),o=String.fromCharCode(t),g):n(t)}function g(s){if(s===null||s===47||s===62||FO(s)){let c=s===47,l=o.toLowerCase();return!c&&!a&&Yk.includes(l)?(i=1,r.interrupt?t(s):O(s)):Jk.includes(o.toLowerCase())?(i=6,c?(e.consume(s),_):r.interrupt?t(s):O(s)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(s):a?v(s):y(s))}return s===45||kO(s)?(e.consume(s),o+=String.fromCharCode(s),g):n(s)}function _(i){return i===62?(e.consume(i),r.interrupt?t:O):n(i)}function v(t){return $(t)?(e.consume(t),v):E(t)}function y(t){return t===47?(e.consume(t),E):t===58||t===95||OO(t)?(e.consume(t),b):$(t)?(e.consume(t),y):E(t)}function b(t){return t===45||t===46||t===58||t===95||kO(t)?(e.consume(t),b):x(t)}function x(t){return t===61?(e.consume(t),S):$(t)?(e.consume(t),x):y(t)}function S(t){return t===null||t===60||t===61||t===62||t===96?n(t):t===34||t===39?(e.consume(t),c=t,C):$(t)?(e.consume(t),S):w(t)}function C(t){return t===c?(e.consume(t),c=null,T):t===null||Q(t)?n(t):(e.consume(t),C)}function w(t){return t===null||t===34||t===39||t===47||t===60||t===61||t===62||t===96||FO(t)?x(t):(e.consume(t),w)}function T(e){return e===47||e===62||$(e)?y(e):n(e)}function E(t){return t===62?(e.consume(t),D):n(t)}function D(t){return t===null||Q(t)?O(t):$(t)?(e.consume(t),D):n(t)}function O(t){return t===45&&i===2?(e.consume(t),M):t===60&&i===1?(e.consume(t),N):t===62&&i===4?(e.consume(t),L):t===63&&i===3?(e.consume(t),I):t===93&&i===5?(e.consume(t),F):Q(t)&&(i===6||i===7)?(e.exit(`htmlFlowData`),e.check(Zk,ee,k)(t)):t===null||Q(t)?(e.exit(`htmlFlowData`),k(t)):(e.consume(t),O)}function k(t){return e.check(mk,A,ee)(t)}function A(t){return e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),j}function j(t){return t===null||Q(t)?k(t):(e.enter(`htmlFlowData`),O(t))}function M(t){return t===45?(e.consume(t),I):O(t)}function N(t){return t===47?(e.consume(t),o=``,P):O(t)}function P(t){if(t===62){let n=o.toLowerCase();return Yk.includes(n)?(e.consume(t),L):O(t)}return OO(t)&&o.length<8?(e.consume(t),o+=String.fromCharCode(t),P):O(t)}function F(t){return t===93?(e.consume(t),I):O(t)}function I(t){return t===62?(e.consume(t),L):t===45&&i===2?(e.consume(t),I):O(t)}function L(t){return t===null||Q(t)?(e.exit(`htmlFlowData`),ee(t)):(e.consume(t),L)}function ee(n){return e.exit(`htmlFlow`),t(n)}}function eA(e,t,n){return r;function r(r){return e.enter(`lineEnding`),e.consume(r),e.exit(`lineEnding`),e.attempt(ik,t,n)}}var tA={name:`htmlText`,tokenize:nA};function nA(e,t,n){let r=this,i,a,o;return s;function s(t){return e.enter(`htmlText`),e.enter(`htmlTextData`),e.consume(t),c}function c(t){return t===33?(e.consume(t),l):t===47?(e.consume(t),x):t===63?(e.consume(t),y):OO(t)?(e.consume(t),w):n(t)}function l(t){return t===45?(e.consume(t),u):t===91?(e.consume(t),a=0,m):OO(t)?(e.consume(t),v):n(t)}function u(t){return t===45?(e.consume(t),p):n(t)}function d(t){return t===null?n(t):t===45?(e.consume(t),f):Q(t)?(o=d,N(t)):(e.consume(t),d)}function f(t){return t===45?(e.consume(t),p):d(t)}function p(e){return e===62?M(e):e===45?f(e):d(e)}function m(t){return t===`CDATA[`.charCodeAt(a++)?(e.consume(t),a===6?h:m):n(t)}function h(t){return t===null?n(t):t===93?(e.consume(t),g):Q(t)?(o=h,N(t)):(e.consume(t),h)}function g(t){return t===93?(e.consume(t),_):h(t)}function _(t){return t===62?M(t):t===93?(e.consume(t),_):h(t)}function v(t){return t===null||t===62?M(t):Q(t)?(o=v,N(t)):(e.consume(t),v)}function y(t){return t===null?n(t):t===63?(e.consume(t),b):Q(t)?(o=y,N(t)):(e.consume(t),y)}function b(e){return e===62?M(e):y(e)}function x(t){return OO(t)?(e.consume(t),S):n(t)}function S(t){return t===45||kO(t)?(e.consume(t),S):C(t)}function C(t){return Q(t)?(o=C,N(t)):$(t)?(e.consume(t),C):M(t)}function w(t){return t===45||kO(t)?(e.consume(t),w):t===47||t===62||FO(t)?T(t):n(t)}function T(t){return t===47?(e.consume(t),M):t===58||t===95||OO(t)?(e.consume(t),E):Q(t)?(o=T,N(t)):$(t)?(e.consume(t),T):M(t)}function E(t){return t===45||t===46||t===58||t===95||kO(t)?(e.consume(t),E):D(t)}function D(t){return t===61?(e.consume(t),O):Q(t)?(o=D,N(t)):$(t)?(e.consume(t),D):T(t)}function O(t){return t===null||t===60||t===61||t===62||t===96?n(t):t===34||t===39?(e.consume(t),i=t,k):Q(t)?(o=O,N(t)):$(t)?(e.consume(t),O):(e.consume(t),A)}function k(t){return t===i?(e.consume(t),i=void 0,j):t===null?n(t):Q(t)?(o=k,N(t)):(e.consume(t),k)}function A(t){return t===null||t===34||t===39||t===60||t===61||t===96?n(t):t===47||t===62||FO(t)?T(t):(e.consume(t),A)}function j(e){return e===47||e===62||FO(e)?T(e):n(e)}function M(r){return r===62?(e.consume(r),e.exit(`htmlTextData`),e.exit(`htmlText`),t):n(r)}function N(t){return e.exit(`htmlTextData`),e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),P}function P(t){return $(t)?BO(e,F,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):F(t)}function F(t){return e.enter(`htmlTextData`),o(t)}}var rA={name:`labelEnd`,resolveAll:sA,resolveTo:cA,tokenize:lA},iA={tokenize:uA},aA={tokenize:dA},oA={tokenize:fA};function sA(e){let t=-1,n=[];for(;++t<e.length;){let r=e[t][1];if(n.push(e[t]),r.type===`labelImage`||r.type===`labelLink`||r.type===`labelEnd`){let e=r.type===`labelImage`?4:2;r.type=`data`,t+=e}}return e.length!==n.length&&bO(e,0,e.length,n),e}function cA(e,t){let n=e.length,r=0,i,a,o;for(;n--;){let t=e[n][1];if(i){if(t.type===`link`||t.type===`labelLink`&&t._inactive)break;e[n][0]===`enter`&&t.type===`labelLink`&&(t._inactive=!0)}else if(a){if(e[n][0]===`enter`&&(t.type===`labelImage`||t.type===`labelLink`)&&!t._balanced&&(i=n,t.type!==`labelLink`)){r=2;break}}else t.type===`labelEnd`&&(a=n)}let s={type:e[i][1].type===`labelLink`?`link`:`image`,start:{...e[i][1].start},end:{...e[e.length-1][1].end}},c={type:`label`,start:{...e[i][1].start},end:{...e[a][1].end}},l={type:`labelText`,start:{...e[i+r+2][1].end},end:{...e[a-2][1].start}};return o=[[`enter`,s,t],[`enter`,c,t]],o=xO(o,e.slice(i+1,i+r+3)),o=xO(o,[[`enter`,l,t]]),o=xO(o,ZO(t.parser.constructs.insideSpan.null,e.slice(i+r+4,a-3),t)),o=xO(o,[[`exit`,l,t],e[a-2],e[a-1],[`exit`,c,t]]),o=xO(o,e.slice(a+1)),o=xO(o,[[`exit`,s,t]]),bO(e,i,e.length,o),e}function lA(e,t,n){let r=this,i=r._labelStarts,a,o;if(i){for(;i.length>0&&i[i.length-1]._balanced;)i.pop();a=i[i.length-1]}return s;function s(t){return a?a._inactive?d(t):(o=r.parser.defined.includes(DO(r.sliceSerialize({start:a.end,end:r.now()}))),e.enter(`labelEnd`),e.enter(`labelMarker`),e.consume(t),e.exit(`labelMarker`),e.exit(`labelEnd`),c):n(t)}function c(t){return t===40?e.attempt(iA,u,o?u:d)(t):t===91?e.attempt(aA,u,o?l:d)(t):o?u(t):d(t)}function l(t){return e.attempt(oA,u,d)(t)}function u(e){return i.pop(),t(e)}function d(e){return a._balanced=!0,n(e)}}function uA(e,t,n){return r;function r(t){return e.enter(`resource`),e.enter(`resourceMarker`),e.consume(t),e.exit(`resourceMarker`),i}function i(t){return FO(t)?Rk(e,a)(t):a(t)}function a(t){return t===41?u(t):Fk(e,o,s,`resourceDestination`,`resourceDestinationLiteral`,`resourceDestinationLiteralMarker`,`resourceDestinationRaw`,`resourceDestinationString`,32)(t)}function o(t){return FO(t)?Rk(e,c)(t):u(t)}function s(e){return n(e)}function c(t){return t===34||t===39||t===40?Lk(e,l,n,`resourceTitle`,`resourceTitleMarker`,`resourceTitleString`)(t):u(t)}function l(t){return FO(t)?Rk(e,u)(t):u(t)}function u(r){return r===41?(e.enter(`resourceMarker`),e.consume(r),e.exit(`resourceMarker`),e.exit(`resource`),t):n(r)}}function dA(e,t,n){let r=this;return i;function i(t){return Ik.call(r,e,a,o,`reference`,`referenceMarker`,`referenceString`)(t)}function a(e){return r.parser.defined.includes(DO(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(e):n(e)}function o(e){return n(e)}}function fA(e,t,n){return r;function r(t){return e.enter(`reference`),e.enter(`referenceMarker`),e.consume(t),e.exit(`referenceMarker`),i}function i(r){return r===93?(e.enter(`referenceMarker`),e.consume(r),e.exit(`referenceMarker`),e.exit(`reference`),t):n(r)}}var pA={name:`labelStartImage`,resolveAll:rA.resolveAll,tokenize:mA};function mA(e,t,n){let r=this,i;return a;function a(t){return e.enter(`labelImage`),e.enter(`labelImageMarker`),e.consume(t),e.exit(`labelImageMarker`),o}function o(t){return t===91?(e.enter(`labelMarker`),e.consume(t),e.exit(`labelMarker`),i=e.exit(`labelImage`),s):n(t)}function s(e){return e===94&&`_hiddenFootnoteSupport`in r.parser.constructs?n(e):(r._labelStarts=r._labelStarts||[],r._labelStarts.push(i),t(e))}}var hA={name:`labelStartLink`,resolveAll:rA.resolveAll,tokenize:gA};function gA(e,t,n){let r=this,i;return a;function a(t){return e.enter(`labelLink`),e.enter(`labelMarker`),e.consume(t),e.exit(`labelMarker`),i=e.exit(`labelLink`),o}function o(e){return e===94&&`_hiddenFootnoteSupport`in r.parser.constructs?n(e):(r._labelStarts=r._labelStarts||[],r._labelStarts.push(i),t(e))}}var _A={name:`lineEnding`,tokenize:vA};function vA(e,t){return n;function n(n){return e.enter(`lineEnding`),e.consume(n),e.exit(`lineEnding`),BO(e,t,`linePrefix`)}}var yA={name:`thematicBreak`,tokenize:bA};function bA(e,t,n){let r=0,i;return a;function a(t){return e.enter(`thematicBreak`),o(t)}function o(e){return i=e,s(e)}function s(a){return a===i?(e.enter(`thematicBreakSequence`),c(a)):r>=3&&(a===null||Q(a))?(e.exit(`thematicBreak`),t(a)):n(a)}function c(t){return t===i?(e.consume(t),r++,c):(e.exit(`thematicBreakSequence`),$(t)?BO(e,s,`whitespace`)(t):s(t))}}var xA={continuation:{tokenize:TA},exit:DA,name:`list`,tokenize:wA},SA={partial:!0,tokenize:OA},CA={partial:!0,tokenize:EA};function wA(e,t,n){let r=this,i=r.events[r.events.length-1],a=i&&i[1].type===`linePrefix`?i[2].sliceSerialize(i[1],!0).length:0,o=0;return s;function s(t){let i=r.containerState.type||(t===42||t===43||t===45?`listUnordered`:`listOrdered`);if(i===`listUnordered`?!r.containerState.marker||t===r.containerState.marker:MO(t)){if(r.containerState.type||(r.containerState.type=i,e.enter(i,{_container:!0})),i===`listUnordered`)return e.enter(`listItemPrefix`),t===42||t===45?e.check(yA,n,l)(t):l(t);if(!r.interrupt||t===49)return e.enter(`listItemPrefix`),e.enter(`listItemValue`),c(t)}return n(t)}function c(t){return MO(t)&&++o<10?(e.consume(t),c):(!r.interrupt||o<2)&&(r.containerState.marker?t===r.containerState.marker:t===41||t===46)?(e.exit(`listItemValue`),l(t)):n(t)}function l(t){return e.enter(`listItemMarker`),e.consume(t),e.exit(`listItemMarker`),r.containerState.marker=r.containerState.marker||t,e.check(ik,r.interrupt?n:u,e.attempt(SA,f,d))}function u(e){return r.containerState.initialBlankLine=!0,a++,f(e)}function d(t){return $(t)?(e.enter(`listItemPrefixWhitespace`),e.consume(t),e.exit(`listItemPrefixWhitespace`),f):n(t)}function f(n){return r.containerState.size=a+r.sliceSerialize(e.exit(`listItemPrefix`),!0).length,t(n)}}function TA(e,t,n){let r=this;return r.containerState._closeFlow=void 0,e.check(ik,i,a);function i(n){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,BO(e,t,`listItemIndent`,r.containerState.size+1)(n)}function a(n){return r.containerState.furtherBlankLines||!$(n)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,o(n)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(CA,t,o)(n))}function o(i){return r.containerState._closeFlow=!0,r.interrupt=void 0,BO(e,e.attempt(xA,t,n),`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(i)}}function EA(e,t,n){let r=this;return BO(e,i,`listItemIndent`,r.containerState.size+1);function i(e){let i=r.events[r.events.length-1];return i&&i[1].type===`listItemIndent`&&i[2].sliceSerialize(i[1],!0).length===r.containerState.size?t(e):n(e)}}function DA(e){e.exit(this.containerState.type)}function OA(e,t,n){let r=this;return BO(e,i,`listItemPrefixWhitespace`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:5);function i(e){let i=r.events[r.events.length-1];return!$(e)&&i&&i[1].type===`listItemPrefixWhitespace`?t(e):n(e)}}var kA={name:`setextUnderline`,resolveTo:AA,tokenize:jA};function AA(e,t){let n=new WO,r=e.length,i,a,o;for(;r--;)if(e[r][0]===`enter`){if(e[r][1].type===`content`){i=r;break}e[r][1].type===`paragraph`&&(a=r)}else e[r][1].type===`content`&&n.add(r,1,[]),!o&&e[r][1].type===`definition`&&(o=r);let s={type:`setextHeading`,start:{...e[i][1].start},end:{...e[e.length-1][1].end}};return e[a][1].type=`setextHeadingText`,o?(n.add(a,0,[[`enter`,s,t]]),n.add(o+1,0,[[`exit`,e[i][1],t]]),e[i][1].end={...e[o][1].end}):e[i][1]=s,n.add(e.length,0,[[`exit`,s,t]]),n.consume(e),e}function jA(e,t,n){let r=this,i;return a;function a(t){let a=r.events.length,s;for(;a--;)if(r.events[a][1].type!==`lineEnding`&&r.events[a][1].type!==`linePrefix`&&r.events[a][1].type!==`content`){s=r.events[a][1].type===`paragraph`;break}return!r.parser.lazy[r.now().line]&&(r.interrupt||s)?(e.enter(`setextHeadingLine`),i=t,o(t)):n(t)}function o(t){return e.enter(`setextHeadingLineSequence`),s(t)}function s(t){return t===i?(e.consume(t),s):(e.exit(`setextHeadingLineSequence`),$(t)?BO(e,c,`lineSuffix`)(t):c(t))}function c(r){return r===null||Q(r)?(e.exit(`setextHeadingLine`),t(r)):n(r)}}var MA={tokenize:NA};function NA(e){let t=this,n=e.attempt(ik,r,e.attempt(this.parser.constructs.flowInitial,i,BO(e,e.attempt(this.parser.constructs.flow,i,e.attempt(Ak,i)),`linePrefix`)));return n;function r(r){if(r===null)e.consume(r);else return e.enter(`lineEndingBlank`),e.consume(r),e.exit(`lineEndingBlank`),t.currentConstruct=void 0,n}function i(r){if(r===null)e.consume(r);else return e.enter(`lineEnding`),e.consume(r),e.exit(`lineEnding`),t.currentConstruct=void 0,n}}var PA={resolveAll:RA()},FA=LA(`string`),IA=LA(`text`);function LA(e){return{resolveAll:RA(e===`text`?zA:void 0),tokenize:t};function t(t){let n=this,r=this.parser.constructs[e],i=t.attempt(r,a,o);return a;function a(e){return c(e)?i(e):o(e)}function o(e){if(e===null)t.consume(e);else return t.enter(`data`),t.consume(e),s}function s(e){return c(e)?(t.exit(`data`),i(e)):(t.consume(e),s)}function c(e){if(e===null)return!0;let t=r[e],i=-1;if(t)for(;++i<t.length;){let e=t[i];if(!e.previous||e.previous.call(n,n.previous))return!0}return!1}}}function RA(e){return t;function t(t,n){let r=-1,i;for(;++r<=t.length;)i===void 0?t[r]&&t[r][1].type===`data`&&(i=r,r++):t[r]&&t[r][1].type===`data`||(r!==i+2&&(t[i][1].end=t[r-1][1].end,t.splice(i+2,r-i-2),r=i+2),i=void 0);return e?e(t,n):t}}function zA(e,t){let n=new WO,r=0;for(;++r<=e.length;)if((r===e.length||e[r][1].type===`lineEnding`)&&e[r-1][1].type===`data`){let i=e[r-1][1],a=t.sliceStream(i),o=a.length,s=-1,c=0,l;for(;o--;){let e=a[o];if(typeof e==`string`){for(s=e.length;e.charCodeAt(s-1)===32;)c++,s--;if(s)break;s=-1}else if(e===-2)l=!0,c++;else if(e!==-1){o++;break}}if(t._contentTypeTextTrailing&&r===e.length&&(c=0),c){let a={type:r===e.length||l||c<2?`lineSuffix`:`hardBreakTrailing`,start:{_bufferIndex:o?s:i.start._bufferIndex+s,_index:i.start._index+o,line:i.end.line,column:i.end.column-c,offset:i.end.offset-c},end:{...i.end}};i.end={...a.start},i.start.offset===i.end.offset?Object.assign(i,a):n.add(r,0,[[`enter`,a,t],[`exit`,a,t]])}r++}return n.consume(e),e}var BA=s({attentionMarkers:()=>JA,contentInitial:()=>HA,disable:()=>YA,document:()=>VA,flow:()=>WA,flowInitial:()=>UA,insideSpan:()=>qA,string:()=>GA,text:()=>KA}),VA={42:xA,43:xA,45:xA,48:xA,49:xA,50:xA,51:xA,52:xA,53:xA,54:xA,55:xA,56:xA,57:xA,62:ok},HA={91:zk},UA={[-2]:vk,[-1]:vk,32:vk},WA={35:Gk,42:yA,45:[kA,yA],60:Xk,61:kA,95:yA,96:gk,126:gk},GA={38:fk,92:uk},KA={[-5]:_A,[-4]:_A,[-3]:_A,33:pA,38:fk,42:QO,60:[nk,tA],91:hA,92:[Uk,uk],93:rA,95:QO,96:Sk},qA={null:[QO,PA]},JA={null:[42,95]},YA={null:[]};function XA(e,t,n){let r={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0},i={},a=[],o=[],s=[],c={attempt:C(x),check:C(S),consume:v,enter:y,exit:b,interrupt:C(S,{interrupt:!0})},l={code:null,containerState:{},defineSkip:h,events:[],now:m,parser:e,previous:null,sliceSerialize:f,sliceStream:p,write:d},u=t.tokenize.call(l,c);return t.resolveAll&&a.push(t),l;function d(e){return o=xO(o,e),g(),o[o.length-1]===null?(w(t,0),l.events=ZO(a,l.events,l),l.events):[]}function f(e,t){return QA(p(e),t)}function p(e){return ZA(o,e)}function m(){let{_bufferIndex:e,_index:t,line:n,column:i,offset:a}=r;return{_bufferIndex:e,_index:t,line:n,column:i,offset:a}}function h(e){i[e.line]=e.column,E()}function g(){for(;r._index<o.length;){let e=o[r._index];if(typeof e==`string`){let t=r._index;for(r._bufferIndex<0&&(r._bufferIndex=0);r._index===t&&r._bufferIndex<e.length;)_(e.charCodeAt(r._bufferIndex))}else _(e)}}function _(e){u=u(e)}function v(e){Q(e)?(r.line++,r.column=1,r.offset+=e===-3?2:1,E()):e!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===o[r._index].length&&(r._bufferIndex=-1,r._index++)),l.previous=e}function y(e,t){let n=t||{};return n.type=e,n.start=m(),l.events.push([`enter`,n,l]),s.push(n),n}function b(e){let t=s.pop();return t.end=m(),l.events.push([`exit`,t,l]),t}function x(e,t){w(e,t.from)}function S(e,t){t.restore()}function C(e,t){return n;function n(n,r,i){let a,o,s,u;return Array.isArray(n)?f(n):`tokenize`in n?f([n]):d(n);function d(e){return t;function t(t){let n=t!==null&&e[t],r=t!==null&&e.null;return f([...Array.isArray(n)?n:n?[n]:[],...Array.isArray(r)?r:r?[r]:[]])(t)}}function f(e){return a=e,o=0,e.length===0?i:p(e[o])}function p(e){return n;function n(n){return u=T(),s=e,e.partial||(l.currentConstruct=e),e.name&&l.parser.constructs.disable.null.includes(e.name)?h(n):e.tokenize.call(t?Object.assign(Object.create(l),t):l,c,m,h)(n)}}function m(t){return e(s,u),r}function h(e){return u.restore(),++o<a.length?p(a[o]):i}}}function w(e,t){e.resolveAll&&!a.includes(e)&&a.push(e),e.resolve&&bO(l.events,t,l.events.length-t,e.resolve(l.events.slice(t),l)),e.resolveTo&&(l.events=e.resolveTo(l.events,l))}function T(){let e=m(),t=l.previous,n=l.currentConstruct,i=l.events.length,a=Array.from(s);return{from:i,restore:o};function o(){r=e,l.previous=t,l.currentConstruct=n,l.events.length=i,s=a,E()}}function E(){r.line in i&&r.column<2&&(r.column=i[r.line],r.offset+=i[r.line]-1)}}function ZA(e,t){let n=t.start._index,r=t.start._bufferIndex,i=t.end._index,a=t.end._bufferIndex,o;if(n===i)o=[e[n].slice(r,a)];else{if(o=e.slice(n,i),r>-1){let e=o[0];typeof e==`string`?o[0]=e.slice(r):o.shift()}a>0&&o.push(e[i].slice(0,a))}return o}function QA(e,t){let n=-1,r=[],i;for(;++n<e.length;){let a=e[n],o;if(typeof a==`string`)o=a;else switch(a){case-5:o=`\r`;break;case-4:o=`
16
16
  `;break;case-3:o=`\r
17
- `;break;case-2:o=t?` `:` `;break;case-1:if(!t&&i)continue;o=` `;break;default:o=String.fromCharCode(a)}i=a===-2,r.push(o)}return r.join(``)}function V_(e){let t={constructs:dh([O_,...(e||{}).extensions||[]]),content:n(Ah),defined:[],document:n(Ph),flow:n(b_),lazy:{},string:n(C_),text:n(w_)};return t;function n(e){return n;function n(n){return R_(t,e,n)}}}function H_(e){for(;!gg(e););return e}var U_=/[\0\t\n\r]/g;function W_(){let e=1,t=``,n=!0,r;return i;function i(i,a,o){i=t+(typeof i==`string`?i.toString():new TextDecoder(a||void 0).decode(i));let s=[],c=0;for(t=``,n&&=(i.charCodeAt(0)===65279&&c++,void 0);c<i.length;){U_.lastIndex=c;let n=U_.exec(i),a=n&&n.index!==void 0?n.index:i.length,o=i.charCodeAt(a);if(!n){t=i.slice(c);break}if(o===10&&c===a&&r)s.push(-3),r=void 0;else switch(r&&=(s.push(-5),void 0),c<a&&(s.push(i.slice(c,a)),e+=a-c),o){case 0:s.push(65533),e++;break;case 9:{let t=Math.ceil(e/4)*4;for(s.push(-2);e++<t;)s.push(-1);break}case 10:s.push(-4),e=1;break;default:r=!0,e=1}c=a+1}return o&&(r&&s.push(-5),t&&s.push(t),s.push(null)),s}}var G_=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function K_(e){return e.replace(G_,q_)}function q_(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){let e=n.charCodeAt(1),t=e===120||e===88;return mh(n.slice(t?2:1),t?16:10)}return sh(n)||e}var J_={}.hasOwnProperty;function Y_(e,t,n){return t&&typeof t==`object`&&(n=t,t=void 0),X_(n)(H_(V_(n).document().write(W_()(e,t,!0))))}function X_(e){let t={afterExit:[],beforeEnter:[],transforms:[],canContainEols:[`emphasis`,`fragment`,`heading`,`paragraph`,`strong`],enter:{autolink:o(ge),autolinkProtocol:E,autolinkEmail:E,atxHeading:o(fe),blockQuote:o(ce),characterEscape:E,characterReference:E,codeFenced:o(z),codeFencedFenceInfo:s,codeFencedFenceMeta:s,codeIndented:o(z,s),codeText:o(le,s),codeTextData:E,data:E,codeFlowValue:E,definition:o(ue),definitionDestinationString:s,definitionLabelString:s,definitionTitleString:s,emphasis:o(de),hardBreakEscape:o(pe),hardBreakTrailing:o(pe),htmlFlow:o(me,s),htmlFlowData:E,htmlText:o(me,s),htmlTextData:E,image:o(he),label:s,link:o(ge),listItem:o(ve),listItemValue:p,listOrdered:o(_e,f),listUnordered:o(_e),paragraph:o(ye),reference:te,referenceString:s,resourceDestinationString:s,resourceTitleString:s,setextHeading:o(fe),strong:o(be),thematicBreak:o(Se)},exit:{atxHeading:l(),atxHeadingSequence:S,autolink:l(),autolinkEmail:se,autolinkProtocol:oe,blockQuote:l(),characterEscapeValue:D,characterReferenceMarkerHexadecimal:re,characterReferenceMarkerNumeric:re,characterReferenceValue:ie,characterReference:ae,codeFenced:l(_),codeFencedFence:g,codeFencedFenceInfo:m,codeFencedFenceMeta:h,codeFlowValue:D,codeIndented:l(v),codeText:l(M),codeTextData:D,data:D,definition:l(),definitionDestinationString:x,definitionLabelString:y,definitionTitleString:b,emphasis:l(),hardBreakEscape:l(k),hardBreakTrailing:l(k),htmlFlow:l(A),htmlFlowData:D,htmlText:l(j),htmlTextData:D,image:l(P),label:I,labelText:F,lineEnding:O,link:l(N),listItem:l(),listOrdered:l(),listUnordered:l(),paragraph:l(),referenceString:ne,resourceDestinationString:L,resourceTitleString:ee,resource:R,setextHeading:l(T),setextHeadingLineSequence:w,setextHeadingText:C,strong:l(),thematicBreak:l()}};Q_(t,(e||{}).mdastExtensions||[]);let n={};return r;function r(e){let r={type:`root`,children:[],position:void 0},o={stack:[r],tokenStack:[],config:t,enter:c,exit:u,buffer:s,resume:d,data:n},l=[],f=[],p=-1;for(;++p<e.length;)f.push(e[p]),(e[p][1].type===`listOrdered`||e[p][1].type===`listUnordered`)&&(e[p][0]===`enter`?l.push(f.length-1):a(f,l.pop()));for(e=f,p=-1;++p<e.length;){let n=t[e[p][0]];e[p][0]===`enter`&&t.beforeEnter.length>0&&i(t.beforeEnter,{...o,sliceSerialize:e[p][2].sliceSerialize},e[p][1]),J_.call(n,e[p][1].type)&&n[e[p][1].type].call({...o,sliceSerialize:e[p][2].sliceSerialize},e[p][1]),e[p][0]===`exit`&&t.afterExit.length>0&&i(t.afterExit,{...o,sliceSerialize:e[p][2].sliceSerialize},e[p][1])}if(o.tokenStack.length>0){let e=o.tokenStack[o.tokenStack.length-1];(e[1]||ev).call(o,void 0,e[0])}for(r.position={start:Z_(e.length>0?e[0][1].start:{line:1,column:1,offset:0}),end:Z_(e.length>0?e[e.length-2][1].end:{line:1,column:1,offset:0})},p=-1;++p<t.transforms.length;)r=t.transforms[p](r)||r;return r}function i(e,t,n){let r=-1;for(;++r<e.length;)e[r].call(t,n)}function a(e,t){let n=e.length-1,r=t-1,i=-1,a=!1,o,s,c,l,u=[];for(;++r<=n;){let t=e[r];switch(t[1].type){case`listUnordered`:case`listOrdered`:case`blockQuote`:t[0]===`enter`?i++:i--,l=void 0;break;case`lineEndingBlank`:t[0]===`enter`&&(o&&!l&&!i&&!c&&(c=r),l=void 0);break;case`linePrefix`:case`listItemValue`:case`listItemMarker`:case`listItemPrefix`:case`listItemPrefixWhitespace`:break;default:l=void 0}if(!i&&t[0]===`enter`&&t[1].type===`listItemPrefix`||i===-1&&t[0]===`exit`&&(t[1].type===`listUnordered`||t[1].type===`listOrdered`)){if(o){let n=r;for(s=void 0;n--;){let t=e[n];if(t[1].type===`lineEnding`||t[1].type===`lineEndingBlank`){if(t[0]===`exit`)continue;s&&(e[s][1].type=`lineEndingBlank`,a=!0),t[1].type=`lineEnding`,s=n}else if(t[1].type!==`linePrefix`&&t[1].type!==`blockQuotePrefix`&&t[1].type!==`blockQuotePrefixWhitespace`&&t[1].type!==`blockQuoteMarker`&&t[1].type!==`listItemIndent`)break}c&&(!s||c<s)&&(o._spread=!0),o.end=Object.assign({},s?e[s][1].start:t[1].end),u.push({at:s||r,event:[`exit`,o,t[2]]})}if(t[1].type===`listItemPrefix`){let e={type:`listItem`,_spread:!1,start:Object.assign({},t[1].start),end:void 0};o=e,u.push({at:r,event:[`enter`,e,t[2]]}),c=void 0,l=!0}}}let d=e.splice(t),f=0;for(r=-1;++r<d.length;){for(;f<u.length&&u[f].at===t+r;)e.push(u[f++].event);e.push(d[r])}e[t][1]._spread=a}function o(e,t){return n;function n(n){c.call(this,e(n),n),t&&t.call(this,n)}}function s(){this.stack.push({type:`fragment`,children:[]})}function c(e,t,n){this.stack[this.stack.length-1].children.push(e),this.stack.push(e),this.tokenStack.push([t,n||void 0]),e.position={start:Z_(t.start),end:void 0}}function l(e){return t;function t(t){e&&e.call(this,t),u.call(this,t)}}function u(e,t){let n=this.stack.pop(),r=this.tokenStack.pop();if(!r)throw Error("Cannot close `"+e.type+"` ("+ym({start:e.start,end:e.end})+`): it’s not open`);r[0].type!==e.type&&(t?t.call(this,e,r[0]):(r[1]||ev).call(this,e,r[0])),n.position.end=Z_(e.end)}function d(){return nh(this.stack.pop())}function f(){this.data.expectingFirstListItemValue=!0}function p(e){if(this.data.expectingFirstListItemValue){let t=this.stack[this.stack.length-2];t.start=Number.parseInt(this.sliceSerialize(e),10),this.data.expectingFirstListItemValue=void 0}}function m(){let e=this.resume(),t=this.stack[this.stack.length-1];t.lang=e}function h(){let e=this.resume(),t=this.stack[this.stack.length-1];t.meta=e}function g(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function _(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,``),this.data.flowCodeInside=void 0}function v(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e.replace(/(\r?\n|\r)$/g,``)}function y(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.label=t,n.identifier=hh(this.sliceSerialize(e)).toLowerCase()}function b(){let e=this.resume(),t=this.stack[this.stack.length-1];t.title=e}function x(){let e=this.resume(),t=this.stack[this.stack.length-1];t.url=e}function S(e){let t=this.stack[this.stack.length-1];t.depth||=this.sliceSerialize(e).length}function C(){this.data.setextHeadingSlurpLineEnding=!0}function w(e){let t=this.stack[this.stack.length-1];t.depth=this.sliceSerialize(e).codePointAt(0)===61?1:2}function T(){this.data.setextHeadingSlurpLineEnding=void 0}function E(e){let t=this.stack[this.stack.length-1].children,n=t[t.length-1];n&&n.type===`text`||(n=xe(),n.position={start:Z_(e.start),end:void 0},t.push(n)),this.stack.push(n)}function D(e){let t=this.stack.pop();t.value+=this.sliceSerialize(e),t.position.end=Z_(e.end)}function O(e){let n=this.stack[this.stack.length-1];if(this.data.atHardBreak){let t=n.children[n.children.length-1];t.position.end=Z_(e.end),this.data.atHardBreak=void 0}else!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(n.type)&&(E.call(this,e),D.call(this,e))}function k(){this.data.atHardBreak=!0}function A(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e}function j(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e}function M(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e}function N(){let e=this.stack[this.stack.length-1];if(this.data.inReference){let t=this.data.referenceType||`shortcut`;e.type+=`Reference`,e.referenceType=t,delete e.url,delete e.title}else delete e.identifier,delete e.label;this.data.referenceType=void 0}function P(){let e=this.stack[this.stack.length-1];if(this.data.inReference){let t=this.data.referenceType||`shortcut`;e.type+=`Reference`,e.referenceType=t,delete e.url,delete e.title}else delete e.identifier,delete e.label;this.data.referenceType=void 0}function F(e){let t=this.sliceSerialize(e),n=this.stack[this.stack.length-2];n.label=K_(t),n.identifier=hh(t).toLowerCase()}function I(){let e=this.stack[this.stack.length-1],t=this.resume(),n=this.stack[this.stack.length-1];this.data.inReference=!0,n.type===`link`?n.children=e.children:n.alt=t}function L(){let e=this.resume(),t=this.stack[this.stack.length-1];t.url=e}function ee(){let e=this.resume(),t=this.stack[this.stack.length-1];t.title=e}function R(){this.data.inReference=void 0}function te(){this.data.referenceType=`collapsed`}function ne(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.label=t,n.identifier=hh(this.sliceSerialize(e)).toLowerCase(),this.data.referenceType=`full`}function re(e){this.data.characterReferenceType=e.type}function ie(e){let t=this.sliceSerialize(e),n=this.data.characterReferenceType,r;n?(r=mh(t,n===`characterReferenceMarkerNumeric`?10:16),this.data.characterReferenceType=void 0):r=sh(t);let i=this.stack[this.stack.length-1];i.value+=r}function ae(e){let t=this.stack.pop();t.position.end=Z_(e.end)}function oe(e){D.call(this,e);let t=this.stack[this.stack.length-1];t.url=this.sliceSerialize(e)}function se(e){D.call(this,e);let t=this.stack[this.stack.length-1];t.url=`mailto:`+this.sliceSerialize(e)}function ce(){return{type:`blockquote`,children:[],position:void 0}}function z(){return{type:`code`,lang:null,meta:null,value:``,position:void 0}}function le(){return{type:`inlineCode`,value:``,position:void 0}}function ue(){return{type:`definition`,identifier:``,label:null,title:null,url:``,position:void 0}}function de(){return{type:`emphasis`,children:[],position:void 0}}function fe(){return{type:`heading`,depth:0,children:[],position:void 0}}function pe(){return{type:`break`,position:void 0}}function me(){return{type:`html`,value:``,position:void 0}}function he(){return{type:`image`,title:null,url:``,alt:null,position:void 0}}function ge(){return{type:`link`,title:null,url:``,children:[],position:void 0}}function _e(e){return{type:`list`,ordered:e.type===`listOrdered`,start:null,spread:e._spread,children:[],position:void 0}}function ve(e){return{type:`listItem`,spread:e._spread,checked:null,children:[],position:void 0}}function ye(){return{type:`paragraph`,children:[],position:void 0}}function be(){return{type:`strong`,children:[],position:void 0}}function xe(){return{type:`text`,value:``,position:void 0}}function Se(){return{type:`thematicBreak`,position:void 0}}}function Z_(e){return{line:e.line,column:e.column,offset:e.offset}}function Q_(e,t){let n=-1;for(;++n<t.length;){let r=t[n];Array.isArray(r)?Q_(e,r):$_(e,r)}}function $_(e,t){let n;for(n in t)if(J_.call(t,n))switch(n){case`canContainEols`:{let r=t[n];r&&e[n].push(...r);break}case`transforms`:{let r=t[n];r&&e[n].push(...r);break}case`afterExit`:case`beforeEnter`:{let r=t[n];r&&e[n].push(r);break}case`enter`:case`exit`:{let r=t[n];r&&Object.assign(e[n],r);break}}}function ev(e,t){throw Error(e?"Cannot close `"+e.type+"` ("+ym({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+ym({start:t.start,end:t.end})+`) is open`:"Cannot close document, a token (`"+t.type+"`, "+ym({start:t.start,end:t.end})+`) is still open`)}function tv(e){let t=this;t.parser=n;function n(n){return Y_(n,{...t.data(`settings`),...e,extensions:t.data(`micromarkExtensions`)||[],mdastExtensions:t.data(`fromMarkdownExtensions`)||[]})}}function nv(e,t){let n={type:`element`,tagName:`blockquote`,properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,n),e.applyData(t,n)}function rv(e,t){let n={type:`element`,tagName:`br`,properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:`text`,value:`
18
- `}]}function iv(e,t){let n=t.value?t.value+`
19
- `:``,r={},i=t.lang?t.lang.split(/\s+/):[];i.length>0&&(r.className=[`language-`+i[0]]);let a={type:`element`,tagName:`code`,properties:r,children:[{type:`text`,value:n}]};return t.meta&&(a.data={meta:t.meta}),e.patch(t,a),a=e.applyData(t,a),a={type:`element`,tagName:`pre`,properties:{},children:[a]},e.patch(t,a),a}function av(e,t){let n={type:`element`,tagName:`del`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function ov(e,t){let n={type:`element`,tagName:`em`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function sv(e,t){let n=typeof e.options.clobberPrefix==`string`?e.options.clobberPrefix:`user-content-`,r=String(t.identifier).toUpperCase(),i=Dh(r.toLowerCase()),a=e.footnoteOrder.indexOf(r),o,s=e.footnoteCounts.get(r);s===void 0?(s=0,e.footnoteOrder.push(r),o=e.footnoteOrder.length):o=a+1,s+=1,e.footnoteCounts.set(r,s);let c={type:`element`,tagName:`a`,properties:{href:`#`+n+`fn-`+i,id:n+`fnref-`+i+(s>1?`-`+s:``),dataFootnoteRef:!0,ariaDescribedBy:[`footnote-label`]},children:[{type:`text`,value:String(o)}]};e.patch(t,c);let l={type:`element`,tagName:`sup`,properties:{},children:[c]};return e.patch(t,l),e.applyData(t,l)}function cv(e,t){let n={type:`element`,tagName:`h`+t.depth,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function lv(e,t){if(e.options.allowDangerousHtml){let n={type:`raw`,value:t.value};return e.patch(t,n),e.applyData(t,n)}}function uv(e,t){let n=t.referenceType,r=`]`;if(n===`collapsed`?r+=`[]`:n===`full`&&(r+=`[`+(t.label||t.identifier)+`]`),t.type===`imageReference`)return[{type:`text`,value:`![`+t.alt+r}];let i=e.all(t),a=i[0];a&&a.type===`text`?a.value=`[`+a.value:i.unshift({type:`text`,value:`[`});let o=i[i.length-1];return o&&o.type===`text`?o.value+=r:i.push({type:`text`,value:r}),i}function dv(e,t){let n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return uv(e,t);let i={src:Dh(r.url||``)};t.alt!==null&&t.alt!==void 0&&(i.alt=t.alt),r.title!==null&&r.title!==void 0&&(i.title=r.title);let a={type:`element`,tagName:`img`,properties:i,children:[]};return e.patch(t,a),e.applyData(t,a)}function fv(e,t){let n={src:Dh(t.url)};t.alt!==null&&t.alt!==void 0&&(n.alt=t.alt),t.title!==null&&t.title!==void 0&&(n.title=t.title);let r={type:`element`,tagName:`img`,properties:n,children:[]};return e.patch(t,r),e.applyData(t,r)}function pv(e,t){let n={type:`text`,value:t.value.replace(/\r?\n|\r/g,` `)};e.patch(t,n);let r={type:`element`,tagName:`code`,properties:{},children:[n]};return e.patch(t,r),e.applyData(t,r)}function mv(e,t){let n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return uv(e,t);let i={href:Dh(r.url||``)};r.title!==null&&r.title!==void 0&&(i.title=r.title);let a={type:`element`,tagName:`a`,properties:i,children:e.all(t)};return e.patch(t,a),e.applyData(t,a)}function hv(e,t){let n={href:Dh(t.url)};t.title!==null&&t.title!==void 0&&(n.title=t.title);let r={type:`element`,tagName:`a`,properties:n,children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function gv(e,t,n){let r=e.all(t),i=n?_v(n):vv(t),a={},o=[];if(typeof t.checked==`boolean`){let e=r[0],n;e&&e.type===`element`&&e.tagName===`p`?n=e:(n={type:`element`,tagName:`p`,properties:{},children:[]},r.unshift(n)),n.children.length>0&&n.children.unshift({type:`text`,value:` `}),n.children.unshift({type:`element`,tagName:`input`,properties:{type:`checkbox`,checked:t.checked,disabled:!0},children:[]}),a.className=[`task-list-item`]}let s=-1;for(;++s<r.length;){let e=r[s];(i||s!==0||e.type!==`element`||e.tagName!==`p`)&&o.push({type:`text`,value:`
17
+ `;break;case-2:o=t?` `:` `;break;case-1:if(!t&&i)continue;o=` `;break;default:o=String.fromCharCode(a)}i=a===-2,r.push(o)}return r.join(``)}function $A(e){let t={constructs:CO([BA,...(e||{}).extensions||[]]),content:n(HO),defined:[],document:n(KO),flow:n(MA),lazy:{},string:n(FA),text:n(IA)};return t;function n(e){return n;function n(n){return XA(t,e,n)}}}function ej(e){for(;!Ok(e););return e}var tj=/[\0\t\n\r]/g;function nj(){let e=1,t=``,n=!0,r;return i;function i(i,a,o){i=t+(typeof i==`string`?i.toString():new TextDecoder(a||void 0).decode(i));let s=[],c=0;for(t=``,n&&=(i.charCodeAt(0)===65279&&c++,void 0);c<i.length;){tj.lastIndex=c;let n=tj.exec(i),a=n&&n.index!==void 0?n.index:i.length,o=i.charCodeAt(a);if(!n){t=i.slice(c);break}if(o===10&&c===a&&r)s.push(-3),r=void 0;else switch(r&&=(s.push(-5),void 0),c<a&&(s.push(i.slice(c,a)),e+=a-c),o){case 0:s.push(65533),e++;break;case 9:{let t=Math.ceil(e/4)*4;for(s.push(-2);e++<t;)s.push(-1);break}case 10:s.push(-4),e=1;break;default:r=!0,e=1}c=a+1}return o&&(r&&s.push(-5),t&&s.push(t),s.push(null)),s}}var rj=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function ij(e){return e.replace(rj,aj)}function aj(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){let e=n.charCodeAt(1),t=e===120||e===88;return EO(n.slice(t?2:1),t?16:10)}return yO(n)||e}var oj={}.hasOwnProperty;function sj(e,t,n){return t&&typeof t==`object`&&(n=t,t=void 0),cj(n)(ej($A(n).document().write(nj()(e,t,!0))))}function cj(e){let t={afterExit:[],beforeEnter:[],transforms:[],canContainEols:[`emphasis`,`fragment`,`heading`,`paragraph`,`strong`],enter:{autolink:o(ge),autolinkProtocol:E,autolinkEmail:E,atxHeading:o(fe),blockQuote:o(ce),characterEscape:E,characterReference:E,codeFenced:o(z),codeFencedFenceInfo:s,codeFencedFenceMeta:s,codeIndented:o(z,s),codeText:o(le,s),codeTextData:E,data:E,codeFlowValue:E,definition:o(ue),definitionDestinationString:s,definitionLabelString:s,definitionTitleString:s,emphasis:o(de),hardBreakEscape:o(pe),hardBreakTrailing:o(pe),htmlFlow:o(me,s),htmlFlowData:E,htmlText:o(me,s),htmlTextData:E,image:o(he),label:s,link:o(ge),listItem:o(ve),listItemValue:p,listOrdered:o(_e,f),listUnordered:o(_e),paragraph:o(ye),reference:te,referenceString:s,resourceDestinationString:s,resourceTitleString:s,setextHeading:o(fe),strong:o(be),thematicBreak:o(Se)},exit:{atxHeading:l(),atxHeadingSequence:S,autolink:l(),autolinkEmail:se,autolinkProtocol:oe,blockQuote:l(),characterEscapeValue:D,characterReferenceMarkerHexadecimal:re,characterReferenceMarkerNumeric:re,characterReferenceValue:ie,characterReference:ae,codeFenced:l(_),codeFencedFence:g,codeFencedFenceInfo:m,codeFencedFenceMeta:h,codeFlowValue:D,codeIndented:l(v),codeText:l(M),codeTextData:D,data:D,definition:l(),definitionDestinationString:x,definitionLabelString:y,definitionTitleString:b,emphasis:l(),hardBreakEscape:l(k),hardBreakTrailing:l(k),htmlFlow:l(A),htmlFlowData:D,htmlText:l(j),htmlTextData:D,image:l(P),label:I,labelText:F,lineEnding:O,link:l(N),listItem:l(),listOrdered:l(),listUnordered:l(),paragraph:l(),referenceString:ne,resourceDestinationString:L,resourceTitleString:ee,resource:R,setextHeading:l(T),setextHeadingLineSequence:w,setextHeadingText:C,strong:l(),thematicBreak:l()}};uj(t,(e||{}).mdastExtensions||[]);let n={};return r;function r(e){let r={type:`root`,children:[],position:void 0},o={stack:[r],tokenStack:[],config:t,enter:c,exit:u,buffer:s,resume:d,data:n},l=[],f=[],p=-1;for(;++p<e.length;)f.push(e[p]),(e[p][1].type===`listOrdered`||e[p][1].type===`listUnordered`)&&(e[p][0]===`enter`?l.push(f.length-1):a(f,l.pop()));for(e=f,p=-1;++p<e.length;){let n=t[e[p][0]];e[p][0]===`enter`&&t.beforeEnter.length>0&&i(t.beforeEnter,{...o,sliceSerialize:e[p][2].sliceSerialize},e[p][1]),oj.call(n,e[p][1].type)&&n[e[p][1].type].call({...o,sliceSerialize:e[p][2].sliceSerialize},e[p][1]),e[p][0]===`exit`&&t.afterExit.length>0&&i(t.afterExit,{...o,sliceSerialize:e[p][2].sliceSerialize},e[p][1])}if(o.tokenStack.length>0){let e=o.tokenStack[o.tokenStack.length-1];(e[1]||fj).call(o,void 0,e[0])}for(r.position={start:lj(e.length>0?e[0][1].start:{line:1,column:1,offset:0}),end:lj(e.length>0?e[e.length-2][1].end:{line:1,column:1,offset:0})},p=-1;++p<t.transforms.length;)r=t.transforms[p](r)||r;return r}function i(e,t,n){let r=-1;for(;++r<e.length;)e[r].call(t,n)}function a(e,t){let n=e.length-1,r=t-1,i=-1,a=!1,o,s,c,l,u=[];for(;++r<=n;){let t=e[r];switch(t[1].type){case`listUnordered`:case`listOrdered`:case`blockQuote`:t[0]===`enter`?i++:i--,l=void 0;break;case`lineEndingBlank`:t[0]===`enter`&&(o&&!l&&!i&&!c&&(c=r),l=void 0);break;case`linePrefix`:case`listItemValue`:case`listItemMarker`:case`listItemPrefix`:case`listItemPrefixWhitespace`:break;default:l=void 0}if(!i&&t[0]===`enter`&&t[1].type===`listItemPrefix`||i===-1&&t[0]===`exit`&&(t[1].type===`listUnordered`||t[1].type===`listOrdered`)){if(o){let n=r;for(s=void 0;n--;){let t=e[n];if(t[1].type===`lineEnding`||t[1].type===`lineEndingBlank`){if(t[0]===`exit`)continue;s&&(e[s][1].type=`lineEndingBlank`,a=!0),t[1].type=`lineEnding`,s=n}else if(t[1].type!==`linePrefix`&&t[1].type!==`blockQuotePrefix`&&t[1].type!==`blockQuotePrefixWhitespace`&&t[1].type!==`blockQuoteMarker`&&t[1].type!==`listItemIndent`)break}c&&(!s||c<s)&&(o._spread=!0),o.end=Object.assign({},s?e[s][1].start:t[1].end),u.push({at:s||r,event:[`exit`,o,t[2]]})}if(t[1].type===`listItemPrefix`){let e={type:`listItem`,_spread:!1,start:Object.assign({},t[1].start),end:void 0};o=e,u.push({at:r,event:[`enter`,e,t[2]]}),c=void 0,l=!0}}}let d=e.splice(t),f=0;for(r=-1;++r<d.length;){for(;f<u.length&&u[f].at===t+r;)e.push(u[f++].event);e.push(d[r])}e[t][1]._spread=a}function o(e,t){return n;function n(n){c.call(this,e(n),n),t&&t.call(this,n)}}function s(){this.stack.push({type:`fragment`,children:[]})}function c(e,t,n){this.stack[this.stack.length-1].children.push(e),this.stack.push(e),this.tokenStack.push([t,n||void 0]),e.position={start:lj(t.start),end:void 0}}function l(e){return t;function t(t){e&&e.call(this,t),u.call(this,t)}}function u(e,t){let n=this.stack.pop(),r=this.tokenStack.pop();if(!r)throw Error("Cannot close `"+e.type+"` ("+jD({start:e.start,end:e.end})+`): it’s not open`);r[0].type!==e.type&&(t?t.call(this,e,r[0]):(r[1]||fj).call(this,e,r[0])),n.position.end=lj(e.end)}function d(){return mO(this.stack.pop())}function f(){this.data.expectingFirstListItemValue=!0}function p(e){if(this.data.expectingFirstListItemValue){let t=this.stack[this.stack.length-2];t.start=Number.parseInt(this.sliceSerialize(e),10),this.data.expectingFirstListItemValue=void 0}}function m(){let e=this.resume(),t=this.stack[this.stack.length-1];t.lang=e}function h(){let e=this.resume(),t=this.stack[this.stack.length-1];t.meta=e}function g(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function _(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,``),this.data.flowCodeInside=void 0}function v(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e.replace(/(\r?\n|\r)$/g,``)}function y(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.label=t,n.identifier=DO(this.sliceSerialize(e)).toLowerCase()}function b(){let e=this.resume(),t=this.stack[this.stack.length-1];t.title=e}function x(){let e=this.resume(),t=this.stack[this.stack.length-1];t.url=e}function S(e){let t=this.stack[this.stack.length-1];t.depth||=this.sliceSerialize(e).length}function C(){this.data.setextHeadingSlurpLineEnding=!0}function w(e){let t=this.stack[this.stack.length-1];t.depth=this.sliceSerialize(e).codePointAt(0)===61?1:2}function T(){this.data.setextHeadingSlurpLineEnding=void 0}function E(e){let t=this.stack[this.stack.length-1].children,n=t[t.length-1];n&&n.type===`text`||(n=xe(),n.position={start:lj(e.start),end:void 0},t.push(n)),this.stack.push(n)}function D(e){let t=this.stack.pop();t.value+=this.sliceSerialize(e),t.position.end=lj(e.end)}function O(e){let n=this.stack[this.stack.length-1];if(this.data.atHardBreak){let t=n.children[n.children.length-1];t.position.end=lj(e.end),this.data.atHardBreak=void 0}else!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(n.type)&&(E.call(this,e),D.call(this,e))}function k(){this.data.atHardBreak=!0}function A(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e}function j(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e}function M(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e}function N(){let e=this.stack[this.stack.length-1];if(this.data.inReference){let t=this.data.referenceType||`shortcut`;e.type+=`Reference`,e.referenceType=t,delete e.url,delete e.title}else delete e.identifier,delete e.label;this.data.referenceType=void 0}function P(){let e=this.stack[this.stack.length-1];if(this.data.inReference){let t=this.data.referenceType||`shortcut`;e.type+=`Reference`,e.referenceType=t,delete e.url,delete e.title}else delete e.identifier,delete e.label;this.data.referenceType=void 0}function F(e){let t=this.sliceSerialize(e),n=this.stack[this.stack.length-2];n.label=ij(t),n.identifier=DO(t).toLowerCase()}function I(){let e=this.stack[this.stack.length-1],t=this.resume(),n=this.stack[this.stack.length-1];this.data.inReference=!0,n.type===`link`?n.children=e.children:n.alt=t}function L(){let e=this.resume(),t=this.stack[this.stack.length-1];t.url=e}function ee(){let e=this.resume(),t=this.stack[this.stack.length-1];t.title=e}function R(){this.data.inReference=void 0}function te(){this.data.referenceType=`collapsed`}function ne(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.label=t,n.identifier=DO(this.sliceSerialize(e)).toLowerCase(),this.data.referenceType=`full`}function re(e){this.data.characterReferenceType=e.type}function ie(e){let t=this.sliceSerialize(e),n=this.data.characterReferenceType,r;n?(r=EO(t,n===`characterReferenceMarkerNumeric`?10:16),this.data.characterReferenceType=void 0):r=yO(t);let i=this.stack[this.stack.length-1];i.value+=r}function ae(e){let t=this.stack.pop();t.position.end=lj(e.end)}function oe(e){D.call(this,e);let t=this.stack[this.stack.length-1];t.url=this.sliceSerialize(e)}function se(e){D.call(this,e);let t=this.stack[this.stack.length-1];t.url=`mailto:`+this.sliceSerialize(e)}function ce(){return{type:`blockquote`,children:[],position:void 0}}function z(){return{type:`code`,lang:null,meta:null,value:``,position:void 0}}function le(){return{type:`inlineCode`,value:``,position:void 0}}function ue(){return{type:`definition`,identifier:``,label:null,title:null,url:``,position:void 0}}function de(){return{type:`emphasis`,children:[],position:void 0}}function fe(){return{type:`heading`,depth:0,children:[],position:void 0}}function pe(){return{type:`break`,position:void 0}}function me(){return{type:`html`,value:``,position:void 0}}function he(){return{type:`image`,title:null,url:``,alt:null,position:void 0}}function ge(){return{type:`link`,title:null,url:``,children:[],position:void 0}}function _e(e){return{type:`list`,ordered:e.type===`listOrdered`,start:null,spread:e._spread,children:[],position:void 0}}function ve(e){return{type:`listItem`,spread:e._spread,checked:null,children:[],position:void 0}}function ye(){return{type:`paragraph`,children:[],position:void 0}}function be(){return{type:`strong`,children:[],position:void 0}}function xe(){return{type:`text`,value:``,position:void 0}}function Se(){return{type:`thematicBreak`,position:void 0}}}function lj(e){return{line:e.line,column:e.column,offset:e.offset}}function uj(e,t){let n=-1;for(;++n<t.length;){let r=t[n];Array.isArray(r)?uj(e,r):dj(e,r)}}function dj(e,t){let n;for(n in t)if(oj.call(t,n))switch(n){case`canContainEols`:{let r=t[n];r&&e[n].push(...r);break}case`transforms`:{let r=t[n];r&&e[n].push(...r);break}case`afterExit`:case`beforeEnter`:{let r=t[n];r&&e[n].push(r);break}case`enter`:case`exit`:{let r=t[n];r&&Object.assign(e[n],r);break}}}function fj(e,t){throw Error(e?"Cannot close `"+e.type+"` ("+jD({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+jD({start:t.start,end:t.end})+`) is open`:"Cannot close document, a token (`"+t.type+"`, "+jD({start:t.start,end:t.end})+`) is still open`)}function pj(e){let t=this;t.parser=n;function n(n){return sj(n,{...t.data(`settings`),...e,extensions:t.data(`micromarkExtensions`)||[],mdastExtensions:t.data(`fromMarkdownExtensions`)||[]})}}function mj(e,t){let n={type:`element`,tagName:`blockquote`,properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,n),e.applyData(t,n)}function hj(e,t){let n={type:`element`,tagName:`br`,properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:`text`,value:`
18
+ `}]}function gj(e,t){let n=t.value?t.value+`
19
+ `:``,r={},i=t.lang?t.lang.split(/\s+/):[];i.length>0&&(r.className=[`language-`+i[0]]);let a={type:`element`,tagName:`code`,properties:r,children:[{type:`text`,value:n}]};return t.meta&&(a.data={meta:t.meta}),e.patch(t,a),a=e.applyData(t,a),a={type:`element`,tagName:`pre`,properties:{},children:[a]},e.patch(t,a),a}function _j(e,t){let n={type:`element`,tagName:`del`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function vj(e,t){let n={type:`element`,tagName:`em`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function yj(e,t){let n=typeof e.options.clobberPrefix==`string`?e.options.clobberPrefix:`user-content-`,r=String(t.identifier).toUpperCase(),i=zO(r.toLowerCase()),a=e.footnoteOrder.indexOf(r),o,s=e.footnoteCounts.get(r);s===void 0?(s=0,e.footnoteOrder.push(r),o=e.footnoteOrder.length):o=a+1,s+=1,e.footnoteCounts.set(r,s);let c={type:`element`,tagName:`a`,properties:{href:`#`+n+`fn-`+i,id:n+`fnref-`+i+(s>1?`-`+s:``),dataFootnoteRef:!0,ariaDescribedBy:[`footnote-label`]},children:[{type:`text`,value:String(o)}]};e.patch(t,c);let l={type:`element`,tagName:`sup`,properties:{},children:[c]};return e.patch(t,l),e.applyData(t,l)}function bj(e,t){let n={type:`element`,tagName:`h`+t.depth,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function xj(e,t){if(e.options.allowDangerousHtml){let n={type:`raw`,value:t.value};return e.patch(t,n),e.applyData(t,n)}}function Sj(e,t){let n=t.referenceType,r=`]`;if(n===`collapsed`?r+=`[]`:n===`full`&&(r+=`[`+(t.label||t.identifier)+`]`),t.type===`imageReference`)return[{type:`text`,value:`![`+t.alt+r}];let i=e.all(t),a=i[0];a&&a.type===`text`?a.value=`[`+a.value:i.unshift({type:`text`,value:`[`});let o=i[i.length-1];return o&&o.type===`text`?o.value+=r:i.push({type:`text`,value:r}),i}function Cj(e,t){let n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return Sj(e,t);let i={src:zO(r.url||``)};t.alt!==null&&t.alt!==void 0&&(i.alt=t.alt),r.title!==null&&r.title!==void 0&&(i.title=r.title);let a={type:`element`,tagName:`img`,properties:i,children:[]};return e.patch(t,a),e.applyData(t,a)}function wj(e,t){let n={src:zO(t.url)};t.alt!==null&&t.alt!==void 0&&(n.alt=t.alt),t.title!==null&&t.title!==void 0&&(n.title=t.title);let r={type:`element`,tagName:`img`,properties:n,children:[]};return e.patch(t,r),e.applyData(t,r)}function Tj(e,t){let n={type:`text`,value:t.value.replace(/\r?\n|\r/g,` `)};e.patch(t,n);let r={type:`element`,tagName:`code`,properties:{},children:[n]};return e.patch(t,r),e.applyData(t,r)}function Ej(e,t){let n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return Sj(e,t);let i={href:zO(r.url||``)};r.title!==null&&r.title!==void 0&&(i.title=r.title);let a={type:`element`,tagName:`a`,properties:i,children:e.all(t)};return e.patch(t,a),e.applyData(t,a)}function Dj(e,t){let n={href:zO(t.url)};t.title!==null&&t.title!==void 0&&(n.title=t.title);let r={type:`element`,tagName:`a`,properties:n,children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function Oj(e,t,n){let r=e.all(t),i=n?kj(n):Aj(t),a={},o=[];if(typeof t.checked==`boolean`){let e=r[0],n;e&&e.type===`element`&&e.tagName===`p`?n=e:(n={type:`element`,tagName:`p`,properties:{},children:[]},r.unshift(n)),n.children.length>0&&n.children.unshift({type:`text`,value:` `}),n.children.unshift({type:`element`,tagName:`input`,properties:{type:`checkbox`,checked:t.checked,disabled:!0},children:[]}),a.className=[`task-list-item`]}let s=-1;for(;++s<r.length;){let e=r[s];(i||s!==0||e.type!==`element`||e.tagName!==`p`)&&o.push({type:`text`,value:`
20
20
  `}),e.type===`element`&&e.tagName===`p`&&!i?o.push(...e.children):o.push(e)}let c=r[r.length-1];c&&(i||c.type!==`element`||c.tagName!==`p`)&&o.push({type:`text`,value:`
21
- `});let l={type:`element`,tagName:`li`,properties:a,children:o};return e.patch(t,l),e.applyData(t,l)}function _v(e){let t=!1;if(e.type===`list`){t=e.spread||!1;let{children:n}=e,r=-1;for(;!t&&++r<n.length;)t=vv(n[r])}return t}function vv(e){let{spread:t}=e;return t??e.children.length>1}function yv(e,t){let n={},r=e.all(t),i=-1;for(typeof t.start==`number`&&t.start!==1&&(n.start=t.start);++i<r.length;){let e=r[i];if(e.type===`element`&&e.tagName===`li`&&e.properties&&Array.isArray(e.properties.className)&&e.properties.className.includes(`task-list-item`)){n.className=[`contains-task-list`];break}}let a={type:`element`,tagName:t.ordered?`ol`:`ul`,properties:n,children:e.wrap(r,!0)};return e.patch(t,a),e.applyData(t,a)}function bv(e,t){let n={type:`element`,tagName:`p`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function xv(e,t){let n={type:`root`,children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function Sv(e,t){let n={type:`element`,tagName:`strong`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Cv(e,t){let n=e.all(t),r=n.shift(),i=[];if(r){let n={type:`element`,tagName:`thead`,properties:{},children:e.wrap([r],!0)};e.patch(t.children[0],n),i.push(n)}if(n.length>0){let r={type:`element`,tagName:`tbody`,properties:{},children:e.wrap(n,!0)},a=gm(t.children[1]),o=hm(t.children[t.children.length-1]);a&&o&&(r.position={start:a,end:o}),i.push(r)}let a={type:`element`,tagName:`table`,properties:{},children:e.wrap(i,!0)};return e.patch(t,a),e.applyData(t,a)}function wv(e,t,n){let r=n?n.children:void 0,i=(r?r.indexOf(t):1)===0?`th`:`td`,a=n&&n.type===`table`?n.align:void 0,o=a?a.length:t.children.length,s=-1,c=[];for(;++s<o;){let n=t.children[s],r={},o=a?a[s]:void 0;o&&(r.align=o);let l={type:`element`,tagName:i,properties:r,children:[]};n&&(l.children=e.all(n),e.patch(n,l),l=e.applyData(n,l)),c.push(l)}let l={type:`element`,tagName:`tr`,properties:{},children:e.wrap(c,!0)};return e.patch(t,l),e.applyData(t,l)}function Tv(e,t){let n={type:`element`,tagName:`td`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}var Ev=9,Dv=32;function Ov(e){let t=String(e),n=/\r?\n|\r/g,r=n.exec(t),i=0,a=[];for(;r;)a.push(kv(t.slice(i,r.index),i>0,!0),r[0]),i=r.index+r[0].length,r=n.exec(t);return a.push(kv(t.slice(i),i>0,!1)),a.join(``)}function kv(e,t,n){let r=0,i=e.length;if(t){let t=e.codePointAt(r);for(;t===Ev||t===Dv;)r++,t=e.codePointAt(r)}if(n){let t=e.codePointAt(i-1);for(;t===Ev||t===Dv;)i--,t=e.codePointAt(i-1)}return i>r?e.slice(r,i):``}function Av(e,t){let n={type:`text`,value:Ov(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function jv(e,t){let n={type:`element`,tagName:`hr`,properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}var Mv={blockquote:nv,break:rv,code:iv,delete:av,emphasis:ov,footnoteReference:sv,heading:cv,html:lv,imageReference:dv,image:fv,inlineCode:pv,linkReference:mv,link:hv,listItem:gv,list:yv,paragraph:bv,root:xv,strong:Sv,table:Cv,tableCell:Tv,tableRow:wv,text:Av,thematicBreak:jv,toml:Nv,yaml:Nv,definition:Nv,footnoteDefinition:Nv};function Nv(){}var{defineProperty:Pv}=Object,Fv=typeof self==`object`?self:globalThis,Iv=(e,t)=>{switch(e){case`Function`:case`SharedWorker`:case`Worker`:case`eval`:case`setInterval`:case`setTimeout`:throw TypeError(`unable to deserialize `+e)}return new Fv[e](t)},Lv=(e,t)=>{let n=(t,n)=>(e.set(n,t),t),r=i=>{if(e.has(i))return e.get(i);let[a,o]=t[i];switch(a){case 0:case-1:return n(o,i);case 1:{let e=n([],i);for(let t of o)e.push(r(t));return e}case 2:{let e=n({},i);for(let[t,n]of o){let i=r(t),a=r(n);i===`__proto__`?Pv(e,i,{value:a,configurable:!0,enumerable:!0,writable:!0}):e[i]=a}return e}case 3:return n(new Date(o),i);case 4:{let{source:e,flags:t}=o;return n(new RegExp(e,t),i)}case 5:{let e=n(new Map,i);for(let[t,n]of o)e.set(r(t),r(n));return e}case 6:{let e=n(new Set,i);for(let t of o)e.add(r(t));return e}case 7:{let{name:e,message:t}=o;return n(typeof Fv[e]==`function`?Iv(e,t):Error(t),i)}case 8:return n(BigInt(o),i);case`BigInt`:return n(Object(BigInt(o)),i);case`ArrayBuffer`:return n(new Uint8Array(o).buffer,o);case`DataView`:{let{buffer:e}=new Uint8Array(o);return n(new DataView(e),o)}case`-0`:return-0}return n(Iv(a,o),i)};return r},Rv=e=>Lv(new Map,e)(0),zv=``,{toString:Bv}={},{keys:Vv,is:Hv}=Object,Uv=e=>{let t=typeof e;if(t!==`object`||!e)return[0,t];let n=Bv.call(e).slice(8,-1);switch(n){case`Array`:return[1,zv];case`Object`:return[2,zv];case`Date`:return[3,zv];case`RegExp`:return[4,zv];case`Map`:return[5,zv];case`Set`:return[6,zv];case`DataView`:return[1,n]}return n.includes(`Array`)?[1,n]:e instanceof Error?[7,e.name||`Error`]:[2,n]},Wv=([e,t])=>e===0&&(t===`function`||t===`symbol`),Gv=(e,t,n,r)=>{let i=(e,t)=>{let i=r.push(e)-1;return n.set(t,i),i},a=o=>{if(n.has(o))return n.get(o);let[s,c]=Uv(o);switch(s){case 0:{let t=o;switch(c){case`bigint`:s=8,t=o.toString();break;case`number`:if(!o&&Hv(o,-0))return r.push([`-0`])-1;break;case`function`:case`symbol`:if(e)throw TypeError(`unable to serialize `+c);t=null;break;case`undefined`:return i([-1],o)}return i([s,t],o)}case 1:{if(c){let e=o;return c===`DataView`?e=new Uint8Array(o.buffer):c===`ArrayBuffer`&&(e=new Uint8Array(o)),i([c,[...e]],o)}let e=[],t=i([s,e],o);for(let t of o)e.push(a(t));return t}case 2:{if(c)switch(c){case`BigInt`:return i([c,o.toString()],o);case`Boolean`:case`Number`:case`String`:return i([c,o.valueOf()],o)}if(t&&`toJSON`in o)return a(o.toJSON());let n=[],r=i([s,n],o);for(let t of Vv(o))(e||!Wv(Uv(o[t])))&&n.push([a(t),a(o[t])]);return r}case 3:return i([s,isNaN(o.getTime())?zv:o.toISOString()],o);case 4:{let{source:e,flags:t}=o;return i([s,{source:e,flags:t}],o)}case 5:{let t=[],n=i([s,t],o);for(let[n,r]of o)(e||!(Wv(Uv(n))||Wv(Uv(r))))&&t.push([a(n),a(r)]);return n}case 6:{let t=[],n=i([s,t],o);for(let n of o)(e||!Wv(Uv(n)))&&t.push(a(n));return n}}let{message:l}=o;return i([s,{name:c,message:l}],o)};return a},Kv=(e,{json:t,lossy:n}={})=>{let r=[];return Gv(!(t||n),!!t,new Map,r)(e),r},qv=typeof structuredClone==`function`?(e,t)=>t&&(`json`in t||`lossy`in t)?Rv(Kv(e,t)):structuredClone(e):(e,t)=>Rv(Kv(e,t));function Jv(e,t){let n=[{type:`text`,value:`↩`}];return t>1&&n.push({type:`element`,tagName:`sup`,properties:{},children:[{type:`text`,value:String(t)}]}),n}function Yv(e,t){return`Back to reference `+(e+1)+(t>1?`-`+t:``)}function Xv(e){let t=typeof e.options.clobberPrefix==`string`?e.options.clobberPrefix:`user-content-`,n=e.options.footnoteBackContent||Jv,r=e.options.footnoteBackLabel||Yv,i=e.options.footnoteLabel||`Footnotes`,a=e.options.footnoteLabelTagName||`h2`,o=e.options.footnoteLabelProperties||{className:[`sr-only`]},s=[],c=[],l=-1;for(;++l<e.footnoteOrder.length;){let t=e.footnoteById.get(e.footnoteOrder[l]);t&&(s[l]=e.all(t))}for(l=-1;++l<e.footnoteOrder.length;){let i=e.footnoteById.get(e.footnoteOrder[l]);if(!i)continue;let a=s[l],o=String(i.identifier).toUpperCase(),u=Dh(o.toLowerCase()),d=0,f=[],p=e.footnoteCounts.get(o);for(;p!==void 0&&++d<=p;){f.length>0&&f.push({type:`text`,value:` `});let e=typeof n==`string`?n:n(l,d);typeof e==`string`&&(e={type:`text`,value:e}),f.push({type:`element`,tagName:`a`,properties:{href:`#`+t+`fnref-`+u+(d>1?`-`+d:``),dataFootnoteBackref:``,ariaLabel:typeof r==`string`?r:r(l,d),className:[`data-footnote-backref`]},children:Array.isArray(e)?e:[e]})}let m=a[a.length-1];if(m&&m.type===`element`&&m.tagName===`p`){let e=m.children[m.children.length-1];e&&e.type===`text`?e.value+=` `:m.children.push({type:`text`,value:` `}),m.children.push(...f)}else a.push(...f);let h={type:`element`,tagName:`li`,properties:{id:t+`fn-`+u},children:e.wrap(a,!0)};e.patch(i,h),c.push(h)}if(c.length!==0)return{type:`element`,tagName:`section`,properties:{dataFootnotes:!0,className:[`footnotes`]},children:[{type:`element`,tagName:a,properties:{...qv(o),id:`footnote-label`},children:[{type:`text`,value:i}]},{type:`text`,value:`
21
+ `});let l={type:`element`,tagName:`li`,properties:a,children:o};return e.patch(t,l),e.applyData(t,l)}function kj(e){let t=!1;if(e.type===`list`){t=e.spread||!1;let{children:n}=e,r=-1;for(;!t&&++r<n.length;)t=Aj(n[r])}return t}function Aj(e){let{spread:t}=e;return t??e.children.length>1}function jj(e,t){let n={},r=e.all(t),i=-1;for(typeof t.start==`number`&&t.start!==1&&(n.start=t.start);++i<r.length;){let e=r[i];if(e.type===`element`&&e.tagName===`li`&&e.properties&&Array.isArray(e.properties.className)&&e.properties.className.includes(`task-list-item`)){n.className=[`contains-task-list`];break}}let a={type:`element`,tagName:t.ordered?`ol`:`ul`,properties:n,children:e.wrap(r,!0)};return e.patch(t,a),e.applyData(t,a)}function Mj(e,t){let n={type:`element`,tagName:`p`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Nj(e,t){let n={type:`root`,children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function Pj(e,t){let n={type:`element`,tagName:`strong`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Fj(e,t){let n=e.all(t),r=n.shift(),i=[];if(r){let n={type:`element`,tagName:`thead`,properties:{},children:e.wrap([r],!0)};e.patch(t.children[0],n),i.push(n)}if(n.length>0){let r={type:`element`,tagName:`tbody`,properties:{},children:e.wrap(n,!0)},a=OD(t.children[1]),o=DD(t.children[t.children.length-1]);a&&o&&(r.position={start:a,end:o}),i.push(r)}let a={type:`element`,tagName:`table`,properties:{},children:e.wrap(i,!0)};return e.patch(t,a),e.applyData(t,a)}function Ij(e,t,n){let r=n?n.children:void 0,i=(r?r.indexOf(t):1)===0?`th`:`td`,a=n&&n.type===`table`?n.align:void 0,o=a?a.length:t.children.length,s=-1,c=[];for(;++s<o;){let n=t.children[s],r={},o=a?a[s]:void 0;o&&(r.align=o);let l={type:`element`,tagName:i,properties:r,children:[]};n&&(l.children=e.all(n),e.patch(n,l),l=e.applyData(n,l)),c.push(l)}let l={type:`element`,tagName:`tr`,properties:{},children:e.wrap(c,!0)};return e.patch(t,l),e.applyData(t,l)}function Lj(e,t){let n={type:`element`,tagName:`td`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}var Rj=9,zj=32;function Bj(e){let t=String(e),n=/\r?\n|\r/g,r=n.exec(t),i=0,a=[];for(;r;)a.push(Vj(t.slice(i,r.index),i>0,!0),r[0]),i=r.index+r[0].length,r=n.exec(t);return a.push(Vj(t.slice(i),i>0,!1)),a.join(``)}function Vj(e,t,n){let r=0,i=e.length;if(t){let t=e.codePointAt(r);for(;t===Rj||t===zj;)r++,t=e.codePointAt(r)}if(n){let t=e.codePointAt(i-1);for(;t===Rj||t===zj;)i--,t=e.codePointAt(i-1)}return i>r?e.slice(r,i):``}function Hj(e,t){let n={type:`text`,value:Bj(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function Uj(e,t){let n={type:`element`,tagName:`hr`,properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}var Wj={blockquote:mj,break:hj,code:gj,delete:_j,emphasis:vj,footnoteReference:yj,heading:bj,html:xj,imageReference:Cj,image:wj,inlineCode:Tj,linkReference:Ej,link:Dj,listItem:Oj,list:jj,paragraph:Mj,root:Nj,strong:Pj,table:Fj,tableCell:Lj,tableRow:Ij,text:Hj,thematicBreak:Uj,toml:Gj,yaml:Gj,definition:Gj,footnoteDefinition:Gj};function Gj(){}var{defineProperty:Kj}=Object,qj=typeof self==`object`?self:globalThis,Jj=(e,t)=>{switch(e){case`Function`:case`SharedWorker`:case`Worker`:case`eval`:case`setInterval`:case`setTimeout`:throw TypeError(`unable to deserialize `+e)}return new qj[e](t)},Yj=(e,t)=>{let n=(t,n)=>(e.set(n,t),t),r=i=>{if(e.has(i))return e.get(i);let[a,o]=t[i];switch(a){case 0:case-1:return n(o,i);case 1:{let e=n([],i);for(let t of o)e.push(r(t));return e}case 2:{let e=n({},i);for(let[t,n]of o){let i=r(t),a=r(n);i===`__proto__`?Kj(e,i,{value:a,configurable:!0,enumerable:!0,writable:!0}):e[i]=a}return e}case 3:return n(new Date(o),i);case 4:{let{source:e,flags:t}=o;return n(new RegExp(e,t),i)}case 5:{let e=n(new Map,i);for(let[t,n]of o)e.set(r(t),r(n));return e}case 6:{let e=n(new Set,i);for(let t of o)e.add(r(t));return e}case 7:{let{name:e,message:t}=o;return n(typeof qj[e]==`function`?Jj(e,t):Error(t),i)}case 8:return n(BigInt(o),i);case`BigInt`:return n(Object(BigInt(o)),i);case`ArrayBuffer`:return n(new Uint8Array(o).buffer,o);case`DataView`:{let{buffer:e}=new Uint8Array(o);return n(new DataView(e),o)}case`-0`:return-0}return n(Jj(a,o),i)};return r},Xj=e=>Yj(new Map,e)(0),Zj=``,{toString:Qj}={},{keys:$j,is:eM}=Object,tM=e=>{let t=typeof e;if(t!==`object`||!e)return[0,t];let n=Qj.call(e).slice(8,-1);switch(n){case`Array`:return[1,Zj];case`Object`:return[2,Zj];case`Date`:return[3,Zj];case`RegExp`:return[4,Zj];case`Map`:return[5,Zj];case`Set`:return[6,Zj];case`DataView`:return[1,n]}return n.includes(`Array`)?[1,n]:e instanceof Error?[7,e.name||`Error`]:[2,n]},nM=([e,t])=>e===0&&(t===`function`||t===`symbol`),rM=(e,t,n,r)=>{let i=(e,t)=>{let i=r.push(e)-1;return n.set(t,i),i},a=o=>{if(n.has(o))return n.get(o);let[s,c]=tM(o);switch(s){case 0:{let t=o;switch(c){case`bigint`:s=8,t=o.toString();break;case`number`:if(!o&&eM(o,-0))return r.push([`-0`])-1;break;case`function`:case`symbol`:if(e)throw TypeError(`unable to serialize `+c);t=null;break;case`undefined`:return i([-1],o)}return i([s,t],o)}case 1:{if(c){let e=o;return c===`DataView`?e=new Uint8Array(o.buffer):c===`ArrayBuffer`&&(e=new Uint8Array(o)),i([c,[...e]],o)}let e=[],t=i([s,e],o);for(let t of o)e.push(a(t));return t}case 2:{if(c)switch(c){case`BigInt`:return i([c,o.toString()],o);case`Boolean`:case`Number`:case`String`:return i([c,o.valueOf()],o)}if(t&&`toJSON`in o)return a(o.toJSON());let n=[],r=i([s,n],o);for(let t of $j(o))(e||!nM(tM(o[t])))&&n.push([a(t),a(o[t])]);return r}case 3:return i([s,isNaN(o.getTime())?Zj:o.toISOString()],o);case 4:{let{source:e,flags:t}=o;return i([s,{source:e,flags:t}],o)}case 5:{let t=[],n=i([s,t],o);for(let[n,r]of o)(e||!(nM(tM(n))||nM(tM(r))))&&t.push([a(n),a(r)]);return n}case 6:{let t=[],n=i([s,t],o);for(let n of o)(e||!nM(tM(n)))&&t.push(a(n));return n}}let{message:l}=o;return i([s,{name:c,message:l}],o)};return a},iM=(e,{json:t,lossy:n}={})=>{let r=[];return rM(!(t||n),!!t,new Map,r)(e),r},aM=typeof structuredClone==`function`?(e,t)=>t&&(`json`in t||`lossy`in t)?Xj(iM(e,t)):structuredClone(e):(e,t)=>Xj(iM(e,t));function oM(e,t){let n=[{type:`text`,value:`↩`}];return t>1&&n.push({type:`element`,tagName:`sup`,properties:{},children:[{type:`text`,value:String(t)}]}),n}function sM(e,t){return`Back to reference `+(e+1)+(t>1?`-`+t:``)}function cM(e){let t=typeof e.options.clobberPrefix==`string`?e.options.clobberPrefix:`user-content-`,n=e.options.footnoteBackContent||oM,r=e.options.footnoteBackLabel||sM,i=e.options.footnoteLabel||`Footnotes`,a=e.options.footnoteLabelTagName||`h2`,o=e.options.footnoteLabelProperties||{className:[`sr-only`]},s=[],c=[],l=-1;for(;++l<e.footnoteOrder.length;){let t=e.footnoteById.get(e.footnoteOrder[l]);t&&(s[l]=e.all(t))}for(l=-1;++l<e.footnoteOrder.length;){let i=e.footnoteById.get(e.footnoteOrder[l]);if(!i)continue;let a=s[l],o=String(i.identifier).toUpperCase(),u=zO(o.toLowerCase()),d=0,f=[],p=e.footnoteCounts.get(o);for(;p!==void 0&&++d<=p;){f.length>0&&f.push({type:`text`,value:` `});let e=typeof n==`string`?n:n(l,d);typeof e==`string`&&(e={type:`text`,value:e}),f.push({type:`element`,tagName:`a`,properties:{href:`#`+t+`fnref-`+u+(d>1?`-`+d:``),dataFootnoteBackref:``,ariaLabel:typeof r==`string`?r:r(l,d),className:[`data-footnote-backref`]},children:Array.isArray(e)?e:[e]})}let m=a[a.length-1];if(m&&m.type===`element`&&m.tagName===`p`){let e=m.children[m.children.length-1];e&&e.type===`text`?e.value+=` `:m.children.push({type:`text`,value:` `}),m.children.push(...f)}else a.push(...f);let h={type:`element`,tagName:`li`,properties:{id:t+`fn-`+u},children:e.wrap(a,!0)};e.patch(i,h),c.push(h)}if(c.length!==0)return{type:`element`,tagName:`section`,properties:{dataFootnotes:!0,className:[`footnotes`]},children:[{type:`element`,tagName:a,properties:{...aM(o),id:`footnote-label`},children:[{type:`text`,value:i}]},{type:`text`,value:`
22
22
  `},{type:`element`,tagName:`ol`,properties:{},children:e.wrap(c,!0)},{type:`text`,value:`
23
- `}]}}var Zv=(function(e){if(e==null)return ny;if(typeof e==`function`)return ty(e);if(typeof e==`object`)return Array.isArray(e)?Qv(e):$v(e);if(typeof e==`string`)return ey(e);throw Error(`Expected function, string, or object as test`)});function Qv(e){let t=[],n=-1;for(;++n<e.length;)t[n]=Zv(e[n]);return ty(r);function r(...e){let n=-1;for(;++n<t.length;)if(t[n].apply(this,e))return!0;return!1}}function $v(e){let t=e;return ty(n);function n(n){let r=n,i;for(i in e)if(r[i]!==t[i])return!1;return!0}}function ey(e){return ty(t);function t(t){return t&&t.type===e}}function ty(e){return t;function t(t,n,r){return!!(ry(t)&&e.call(this,t,typeof n==`number`?n:void 0,r||void 0))}}function ny(){return!0}function ry(e){return typeof e==`object`&&!!e&&`type`in e}function iy(e){return e}var ay=[],oy=`skip`;function sy(e,t,n,r){if(!e||typeof e!=`object`)throw Error("Unexpected value `"+e+"` for `tree`, expected node");let i=!0,a,o,s,c;if(typeof n==`function`||n&&typeof n==`object`?(a=t,o=n,r&&(i=!1)):(o=t,n&&(i=!1)),typeof o==`function`)s=o;else if(o&&typeof o==`object`){if(o.enter!==null&&o.enter!==void 0){if(typeof o.enter==`function`)s=o.enter;else throw Error("Unexpected value `"+o.enter+"` for `visitors.enter`, expected optional visitor")}if(typeof o.exit==`function`)c=o.exit;else throw Error("Unexpected value `"+o.exit+"` for `visitors.exit`, expected visitor (pass a visitor directly if you only want an enter visitor)")}else throw Error("Unexpected value `"+o+"` for `enter` or `visitors`, expected visitor or object with visitors");let l=Zv(a),u=i?1:-1;d(e,void 0,[])();function d(e,t,n){let r=e&&typeof e==`object`?e:{};if(typeof r.type==`string`){let t=typeof r.tagName==`string`?r.tagName:typeof r.name==`string`?r.name:void 0;Object.defineProperty(o,"name",{value:`node (`+iy(e.type+(t?`<`+t+`>`:``))+`)`})}return o;function o(){let r=!a||l(e,t,n[n.length-1]||void 0),o=ay;if(s&&r&&(o=cy(s(e,n,t)),o[0]===!1))return o;if(`children`in e&&e.children){let t=e;if(t.children&&o[0]!==`skip`){let e=(i?-1:t.children.length)+u,r=[...n,t];for(;e>-1&&e<t.children.length;){let n=t.children[e],i=d(n,e,r)();if(i[0]===!1)return i;e=typeof i[1]==`number`?i[1]:e+u}}}if(c&&r){let r=cy(c(e,n,t));if(r[0]===`skip`)throw Error("Unexpected value `"+r[0]+"` from `exit`, expected `CONTINUE`, `EXIT`, index, or nothing");if(r[0]===!1||typeof r[1]==`number`)return r}return o}}}function cy(e){return Array.isArray(e)?e:typeof e==`number`?[!0,e]:e==null?ay:[e]}function ly(e,t,n,r){let i,a,o;typeof n==`function`||n&&typeof n==`object`?(i=t,a=n,o=r):(a=t,o=n),typeof a==`function`?sy(e,i,dy(a),o):sy(e,i,uy(a),o)}function uy(e){return!e||typeof e!=`object`?e:{enter:typeof e.enter==`function`?dy(e.enter):e.enter,exit:typeof e.exit==`function`?dy(e.exit):e.exit}}function dy(e){return t;function t(t,n,r){return e(t,r,n[n.length-1])}}var fy={}.hasOwnProperty,py={};function my(e,t){let n=t||py,r=new Map,i=new Map,a={all:s,applyData:gy,definitionById:r,footnoteById:i,footnoteCounts:new Map,footnoteOrder:[],handlers:{...Mv,...n.handlers},one:o,options:n,patch:hy,wrap:vy};return ly(e,function(e){if(e.type===`definition`||e.type===`footnoteDefinition`){let t=String(e.identifier).toUpperCase();e.type===`definition`?r.has(t)||r.set(t,e):i.has(t)||i.set(t,e)}}),a;function o(e,t){let{type:n}=e,r=a.handlers[n];if(fy.call(a.handlers,n)&&r)return r(a,e,t);if(a.options.passThrough&&a.options.passThrough.includes(n)){if(`children`in e){let{children:t,...n}=e;return{...qv(n),children:a.all(e)}}return qv(e)}return(a.options.unknownHandler||_y)(a,e,t)}function s(e){let t=[];if(`children`in e){let n=e.children,r=-1;for(;++r<n.length;){let i=a.one(n[r],e);if(i){if(r&&n[r-1].type===`break`&&(!Array.isArray(i)&&i.type===`text`&&(i.value=yy(i.value)),!Array.isArray(i)&&i.type===`element`)){let e=i.children[0];e&&e.type===`text`&&(e.value=yy(e.value))}Array.isArray(i)?t.push(...i):t.push(i)}}}return t}}function hy(e,t){e.position&&(t.position=vm(e))}function gy(e,t){let n=t;if(e&&e.data){let{hChildren:t,hName:r,hProperties:i}=e.data;typeof r==`string`&&(n.type===`element`?n.tagName=r:n={type:`element`,tagName:r,properties:{},children:`children`in n?n.children:[n]}),n.type===`element`&&i&&Object.assign(n.properties,qv(i)),`children`in n&&n.children&&t!=null&&(n.children=t)}return n}function _y(e,t){let n=t.data||{},r=`value`in t&&!(fy.call(n,`hProperties`)||fy.call(n,`hChildren`))?{type:`text`,value:t.value}:{type:`element`,tagName:`div`,properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function vy(e,t){let n=[],r=-1;for(t&&n.push({type:`text`,value:`
23
+ `}]}}var lM=(function(e){if(e==null)return mM;if(typeof e==`function`)return pM(e);if(typeof e==`object`)return Array.isArray(e)?uM(e):dM(e);if(typeof e==`string`)return fM(e);throw Error(`Expected function, string, or object as test`)});function uM(e){let t=[],n=-1;for(;++n<e.length;)t[n]=lM(e[n]);return pM(r);function r(...e){let n=-1;for(;++n<t.length;)if(t[n].apply(this,e))return!0;return!1}}function dM(e){let t=e;return pM(n);function n(n){let r=n,i;for(i in e)if(r[i]!==t[i])return!1;return!0}}function fM(e){return pM(t);function t(t){return t&&t.type===e}}function pM(e){return t;function t(t,n,r){return!!(hM(t)&&e.call(this,t,typeof n==`number`?n:void 0,r||void 0))}}function mM(){return!0}function hM(e){return typeof e==`object`&&!!e&&`type`in e}function gM(e){return e}var _M=[],vM=`skip`;function yM(e,t,n,r){if(!e||typeof e!=`object`)throw Error("Unexpected value `"+e+"` for `tree`, expected node");let i=!0,a,o,s,c;if(typeof n==`function`||n&&typeof n==`object`?(a=t,o=n,r&&(i=!1)):(o=t,n&&(i=!1)),typeof o==`function`)s=o;else if(o&&typeof o==`object`){if(o.enter!==null&&o.enter!==void 0){if(typeof o.enter==`function`)s=o.enter;else throw Error("Unexpected value `"+o.enter+"` for `visitors.enter`, expected optional visitor")}if(typeof o.exit==`function`)c=o.exit;else throw Error("Unexpected value `"+o.exit+"` for `visitors.exit`, expected visitor (pass a visitor directly if you only want an enter visitor)")}else throw Error("Unexpected value `"+o+"` for `enter` or `visitors`, expected visitor or object with visitors");let l=lM(a),u=i?1:-1;d(e,void 0,[])();function d(e,t,n){let r=e&&typeof e==`object`?e:{};if(typeof r.type==`string`){let t=typeof r.tagName==`string`?r.tagName:typeof r.name==`string`?r.name:void 0;Object.defineProperty(o,"name",{value:`node (`+gM(e.type+(t?`<`+t+`>`:``))+`)`})}return o;function o(){let r=!a||l(e,t,n[n.length-1]||void 0),o=_M;if(s&&r&&(o=bM(s(e,n,t)),o[0]===!1))return o;if(`children`in e&&e.children){let t=e;if(t.children&&o[0]!==`skip`){let e=(i?-1:t.children.length)+u,r=[...n,t];for(;e>-1&&e<t.children.length;){let n=t.children[e],i=d(n,e,r)();if(i[0]===!1)return i;e=typeof i[1]==`number`?i[1]:e+u}}}if(c&&r){let r=bM(c(e,n,t));if(r[0]===`skip`)throw Error("Unexpected value `"+r[0]+"` from `exit`, expected `CONTINUE`, `EXIT`, index, or nothing");if(r[0]===!1||typeof r[1]==`number`)return r}return o}}}function bM(e){return Array.isArray(e)?e:typeof e==`number`?[!0,e]:e==null?_M:[e]}function xM(e,t,n,r){let i,a,o;typeof n==`function`||n&&typeof n==`object`?(i=t,a=n,o=r):(a=t,o=n),typeof a==`function`?yM(e,i,CM(a),o):yM(e,i,SM(a),o)}function SM(e){return!e||typeof e!=`object`?e:{enter:typeof e.enter==`function`?CM(e.enter):e.enter,exit:typeof e.exit==`function`?CM(e.exit):e.exit}}function CM(e){return t;function t(t,n,r){return e(t,r,n[n.length-1])}}var wM={}.hasOwnProperty,TM={};function EM(e,t){let n=t||TM,r=new Map,i=new Map,a={all:s,applyData:OM,definitionById:r,footnoteById:i,footnoteCounts:new Map,footnoteOrder:[],handlers:{...Wj,...n.handlers},one:o,options:n,patch:DM,wrap:AM};return xM(e,function(e){if(e.type===`definition`||e.type===`footnoteDefinition`){let t=String(e.identifier).toUpperCase();e.type===`definition`?r.has(t)||r.set(t,e):i.has(t)||i.set(t,e)}}),a;function o(e,t){let{type:n}=e,r=a.handlers[n];if(wM.call(a.handlers,n)&&r)return r(a,e,t);if(a.options.passThrough&&a.options.passThrough.includes(n)){if(`children`in e){let{children:t,...n}=e;return{...aM(n),children:a.all(e)}}return aM(e)}return(a.options.unknownHandler||kM)(a,e,t)}function s(e){let t=[];if(`children`in e){let n=e.children,r=-1;for(;++r<n.length;){let i=a.one(n[r],e);if(i){if(r&&n[r-1].type===`break`&&(!Array.isArray(i)&&i.type===`text`&&(i.value=jM(i.value)),!Array.isArray(i)&&i.type===`element`)){let e=i.children[0];e&&e.type===`text`&&(e.value=jM(e.value))}Array.isArray(i)?t.push(...i):t.push(i)}}}return t}}function DM(e,t){e.position&&(t.position=AD(e))}function OM(e,t){let n=t;if(e&&e.data){let{hChildren:t,hName:r,hProperties:i}=e.data;typeof r==`string`&&(n.type===`element`?n.tagName=r:n={type:`element`,tagName:r,properties:{},children:`children`in n?n.children:[n]}),n.type===`element`&&i&&Object.assign(n.properties,aM(i)),`children`in n&&n.children&&t!=null&&(n.children=t)}return n}function kM(e,t){let n=t.data||{},r=`value`in t&&!(wM.call(n,`hProperties`)||wM.call(n,`hChildren`))?{type:`text`,value:t.value}:{type:`element`,tagName:`div`,properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function AM(e,t){let n=[],r=-1;for(t&&n.push({type:`text`,value:`
24
24
  `});++r<e.length;)r&&n.push({type:`text`,value:`
25
25
  `}),n.push(e[r]);return t&&e.length>0&&n.push({type:`text`,value:`
26
- `}),n}function yy(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function by(e,t){let n=my(e,t),r=n.one(e,void 0),i=Xv(n),a=Array.isArray(r)?{type:`root`,children:r}:r||{type:`root`,children:[]};return i&&(`children`in a,a.children.push({type:`text`,value:`
27
- `},i)),a}function xy(e,t){return e&&`run`in e?async function(n,r){let i=by(n,{file:r,...t});await e.run(i,r)}:function(n,r){return by(n,{file:r,...e||t})}}function Sy(e){if(e)throw e}var Cy=o(((e,t)=>{var n=Object.prototype.hasOwnProperty,r=Object.prototype.toString,i=Object.defineProperty,a=Object.getOwnPropertyDescriptor,o=function(e){return typeof Array.isArray==`function`?Array.isArray(e):r.call(e)===`[object Array]`},s=function(e){if(!e||r.call(e)!==`[object Object]`)return!1;var t=n.call(e,`constructor`),i=e.constructor&&e.constructor.prototype&&n.call(e.constructor.prototype,`isPrototypeOf`);if(e.constructor&&!t&&!i)return!1;for(var a in e);return a===void 0||n.call(e,a)},c=function(e,t){i&&t.name===`__proto__`?i(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},l=function(e,t){if(t===`__proto__`){if(!n.call(e,t))return;if(a)return a(e,t).value}return e[t]};t.exports=function e(){var t,n,r,i,a,u,d=arguments[0],f=1,p=arguments.length,m=!1;for(typeof d==`boolean`&&(m=d,d=arguments[1]||{},f=2),(d==null||typeof d!=`object`&&typeof d!=`function`)&&(d={});f<p;++f)if(t=arguments[f],t!=null)for(n in t)r=l(d,n),i=l(t,n),d!==i&&(m&&i&&(s(i)||(a=o(i)))?(a?(a=!1,u=r&&o(r)?r:[]):u=r&&s(r)?r:{},c(d,{name:n,newValue:e(m,u,i)})):i!==void 0&&c(d,{name:n,newValue:i}));return d}}));function wy(e){if(typeof e!=`object`||!e)return!1;let t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function Ty(){let e=[],t={run:n,use:r};return t;function n(...t){let n=-1,r=t.pop();if(typeof r!=`function`)throw TypeError(`Expected function as last argument, not `+r);i(null,...t);function i(a,...o){let s=e[++n],c=-1;if(a)r(a);else{for(;++c<t.length;)(o[c]===null||o[c]===void 0)&&(o[c]=t[c]);t=o,s?Ey(s,i)(...o):r(null,...o)}}}function r(n){if(typeof n!=`function`)throw TypeError("Expected `middelware` to be a function, not "+n);return e.push(n),t}}function Ey(e,t){let n;return r;function r(...t){let r=e.length>t.length,o;r&&t.push(i);try{o=e.apply(this,t)}catch(e){let t=e;if(r&&n)throw t;return i(t)}r||(o&&o.then&&typeof o.then==`function`?o.then(a,i):o instanceof Error?i(o):a(o))}function i(e,...r){n||(n=!0,t(e,...r))}function a(e){i(null,e)}}var Dy={basename:Oy,dirname:ky,extname:Ay,join:jy,sep:`/`};function Oy(e,t){if(t!==void 0&&typeof t!=`string`)throw TypeError(`"ext" argument must be a string`);Py(e);let n=0,r=-1,i=e.length,a;if(t===void 0||t.length===0||t.length>e.length){for(;i--;)if(e.codePointAt(i)===47){if(a){n=i+1;break}}else r<0&&(a=!0,r=i+1);return r<0?``:e.slice(n,r)}if(t===e)return``;let o=-1,s=t.length-1;for(;i--;)if(e.codePointAt(i)===47){if(a){n=i+1;break}}else o<0&&(a=!0,o=i+1),s>-1&&(e.codePointAt(i)===t.codePointAt(s--)?s<0&&(r=i):(s=-1,r=o));return n===r?r=o:r<0&&(r=e.length),e.slice(n,r)}function ky(e){if(Py(e),e.length===0)return`.`;let t=-1,n=e.length,r;for(;--n;)if(e.codePointAt(n)===47){if(r){t=n;break}}else r||=!0;return t<0?e.codePointAt(0)===47?`/`:`.`:t===1&&e.codePointAt(0)===47?`//`:e.slice(0,t)}function Ay(e){Py(e);let t=e.length,n=-1,r=0,i=-1,a=0,o;for(;t--;){let s=e.codePointAt(t);if(s===47){if(o){r=t+1;break}}else n<0&&(o=!0,n=t+1),s===46?i<0?i=t:a!==1&&(a=1):i>-1&&(a=-1)}return i<0||n<0||a===0||a===1&&i===n-1&&i===r+1?``:e.slice(i,n)}function jy(...e){let t=-1,n;for(;++t<e.length;)Py(e[t]),e[t]&&(n=n===void 0?e[t]:n+`/`+e[t]);return n===void 0?`.`:My(n)}function My(e){Py(e);let t=e.codePointAt(0)===47,n=Ny(e,!t);return n.length===0&&!t&&(n=`.`),n.length>0&&e.codePointAt(e.length-1)===47&&(n+=`/`),t?`/`+n:n}function Ny(e,t){let n=``,r=0,i=-1,a=0,o=-1,s,c;for(;++o<=e.length;){if(o<e.length)s=e.codePointAt(o);else if(s===47)break;else s=47;if(s===47){if(i!==o-1&&a!==1){if(i!==o-1&&a===2){if(n.length<2||r!==2||n.codePointAt(n.length-1)!==46||n.codePointAt(n.length-2)!==46){if(n.length>2){if(c=n.lastIndexOf(`/`),c!==n.length-1){c<0?(n=``,r=0):(n=n.slice(0,c),r=n.length-1-n.lastIndexOf(`/`)),i=o,a=0;continue}}else if(n.length>0){n=``,r=0,i=o,a=0;continue}}t&&(n=n.length>0?n+`/..`:`..`,r=2)}else n.length>0?n+=`/`+e.slice(i+1,o):n=e.slice(i+1,o),r=o-i-1}i=o,a=0}else s===46&&a>-1?a++:a=-1}return n}function Py(e){if(typeof e!=`string`)throw TypeError(`Path must be a string. Received `+JSON.stringify(e))}var Fy={cwd:Iy};function Iy(){return`/`}function Ly(e){return!!(typeof e==`object`&&e&&`href`in e&&e.href&&`protocol`in e&&e.protocol&&e.auth===void 0)}function Ry(e){if(typeof e==`string`)e=new URL(e);else if(!Ly(e)){let t=TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw t.code=`ERR_INVALID_ARG_TYPE`,t}if(e.protocol!==`file:`){let e=TypeError(`The URL must be of scheme file`);throw e.code=`ERR_INVALID_URL_SCHEME`,e}return zy(e)}function zy(e){if(e.hostname!==``){let e=TypeError(`File URL host must be "localhost" or empty on darwin`);throw e.code=`ERR_INVALID_FILE_URL_HOST`,e}let t=e.pathname,n=-1;for(;++n<t.length;)if(t.codePointAt(n)===37&&t.codePointAt(n+1)===50){let e=t.codePointAt(n+2);if(e===70||e===102){let e=TypeError(`File URL path must not include encoded / characters`);throw e.code=`ERR_INVALID_FILE_URL_PATH`,e}}return decodeURIComponent(t)}var By=[`history`,`path`,`basename`,`stem`,`extname`,`dirname`],Vy=class{constructor(e){let t;t=e?Ly(e)?{path:e}:typeof e==`string`||Gy(e)?{value:e}:e:{},this.cwd=`cwd`in t?``:Fy.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let n=-1;for(;++n<By.length;){let e=By[n];e in t&&t[e]!==void 0&&t[e]!==null&&(this[e]=e===`history`?[...t[e]]:t[e])}let r;for(r in t)By.includes(r)||(this[r]=t[r])}get basename(){return typeof this.path==`string`?Dy.basename(this.path):void 0}set basename(e){Uy(e,`basename`),Hy(e,`basename`),this.path=Dy.join(this.dirname||``,e)}get dirname(){return typeof this.path==`string`?Dy.dirname(this.path):void 0}set dirname(e){Wy(this.basename,`dirname`),this.path=Dy.join(e||``,this.basename)}get extname(){return typeof this.path==`string`?Dy.extname(this.path):void 0}set extname(e){if(Hy(e,`extname`),Wy(this.dirname,`extname`),e){if(e.codePointAt(0)!==46)throw Error("`extname` must start with `.`");if(e.includes(`.`,1))throw Error("`extname` cannot contain multiple dots")}this.path=Dy.join(this.dirname,this.stem+(e||``))}get path(){return this.history[this.history.length-1]}set path(e){Ly(e)&&(e=Ry(e)),Uy(e,`path`),this.path!==e&&this.history.push(e)}get stem(){return typeof this.path==`string`?Dy.basename(this.path,this.extname):void 0}set stem(e){Uy(e,`stem`),Hy(e,`stem`),this.path=Dy.join(this.dirname||``,e+(this.extname||``))}fail(e,t,n){let r=this.message(e,t,n);throw r.fatal=!0,r}info(e,t,n){let r=this.message(e,t,n);return r.fatal=void 0,r}message(e,t,n){let r=new Cm(e,t,n);return this.path&&(r.name=this.path+`:`+r.name,r.file=this.path),r.fatal=!1,this.messages.push(r),r}toString(e){return this.value===void 0?``:typeof this.value==`string`?this.value:new TextDecoder(e||void 0).decode(this.value)}};function Hy(e,t){if(e&&e.includes(Dy.sep))throw Error("`"+t+"` cannot be a path: did not expect `"+Dy.sep+"`")}function Uy(e,t){if(!e)throw Error("`"+t+"` cannot be empty")}function Wy(e,t){if(!e)throw Error("Setting `"+t+"` requires `path` to be set too")}function Gy(e){return!!(e&&typeof e==`object`&&`byteLength`in e&&`byteOffset`in e)}var Ky=(function(e){let t=this.constructor.prototype,n=t[e],r=function(){return n.apply(r,arguments)};return Object.setPrototypeOf(r,t),r}),qy=l(Cy(),1),Jy={}.hasOwnProperty,Yy=new class e extends Ky{constructor(){super(`copy`),this.Compiler=void 0,this.Parser=void 0,this.attachers=[],this.compiler=void 0,this.freezeIndex=-1,this.frozen=void 0,this.namespace={},this.parser=void 0,this.transformers=Ty()}copy(){let t=new e,n=-1;for(;++n<this.attachers.length;){let e=this.attachers[n];t.use(...e)}return t.data((0,qy.default)(!0,{},this.namespace)),t}data(e,t){return typeof e==`string`?arguments.length===2?(Qy(`data`,this.frozen),this.namespace[e]=t,this):Jy.call(this.namespace,e)&&this.namespace[e]||void 0:e?(Qy(`data`,this.frozen),this.namespace=e,this):this.namespace}freeze(){if(this.frozen)return this;let e=this;for(;++this.freezeIndex<this.attachers.length;){let[t,...n]=this.attachers[this.freezeIndex];if(n[0]===!1)continue;n[0]===!0&&(n[0]=void 0);let r=t.call(e,...n);typeof r==`function`&&this.transformers.use(r)}return this.frozen=!0,this.freezeIndex=1/0,this}parse(e){this.freeze();let t=tb(e),n=this.parser||this.Parser;return Xy(`parse`,n),n(String(t),t)}process(e,t){let n=this;return this.freeze(),Xy(`process`,this.parser||this.Parser),Zy(`process`,this.compiler||this.Compiler),t?r(void 0,t):new Promise(r);function r(r,i){let a=tb(e),o=n.parse(a);n.run(o,a,function(e,t,r){if(e||!t||!r)return s(e);let i=t,a=n.stringify(i,r);rb(a)?r.value=a:r.result=a,s(e,r)});function s(e,n){e||!n?i(e):r?r(n):t(void 0,n)}}}processSync(e){let t=!1,n;return this.freeze(),Xy(`processSync`,this.parser||this.Parser),Zy(`processSync`,this.compiler||this.Compiler),this.process(e,r),eb(`processSync`,`process`,t),n;function r(e,r){t=!0,Sy(e),n=r}}run(e,t,n){$y(e),this.freeze();let r=this.transformers;return!n&&typeof t==`function`&&(n=t,t=void 0),n?i(void 0,n):new Promise(i);function i(i,a){let o=tb(t);r.run(e,o,s);function s(t,r,o){let s=r||e;t?a(t):i?i(s):n(void 0,s,o)}}}runSync(e,t){let n=!1,r;return this.run(e,t,i),eb(`runSync`,`run`,n),r;function i(e,t){Sy(e),r=t,n=!0}}stringify(e,t){this.freeze();let n=tb(t),r=this.compiler||this.Compiler;return Zy(`stringify`,r),$y(e),r(e,n)}use(e,...t){let n=this.attachers,r=this.namespace;if(Qy(`use`,this.frozen),e!=null){if(typeof e==`function`)s(e,t);else if(typeof e==`object`)Array.isArray(e)?o(e):a(e);else throw TypeError("Expected usable value, not `"+e+"`")}return this;function i(e){if(typeof e==`function`)s(e,[]);else if(typeof e==`object`){if(Array.isArray(e)){let[t,...n]=e;s(t,n)}else a(e)}else throw TypeError("Expected usable value, not `"+e+"`")}function a(e){if(!(`plugins`in e)&&!(`settings`in e))throw Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");o(e.plugins),e.settings&&(r.settings=(0,qy.default)(!0,r.settings,e.settings))}function o(e){let t=-1;if(e!=null){if(Array.isArray(e))for(;++t<e.length;){let n=e[t];i(n)}else throw TypeError("Expected a list of plugins, not `"+e+"`")}}function s(e,t){let r=-1,i=-1;for(;++r<n.length;)if(n[r][0]===e){i=r;break}if(i===-1)n.push([e,...t]);else if(t.length>0){let[r,...a]=t,o=n[i][1];wy(o)&&wy(r)&&(r=(0,qy.default)(!0,o,r)),n[i]=[e,r,...a]}}}}().freeze();function Xy(e,t){if(typeof t!=`function`)throw TypeError("Cannot `"+e+"` without `parser`")}function Zy(e,t){if(typeof t!=`function`)throw TypeError("Cannot `"+e+"` without `compiler`")}function Qy(e,t){if(t)throw Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function $y(e){if(!wy(e)||typeof e.type!=`string`)throw TypeError("Expected node, got `"+e+"`")}function eb(e,t,n){if(!n)throw Error("`"+e+"` finished async. Use `"+t+"` instead")}function tb(e){return nb(e)?e:new Vy(e)}function nb(e){return!!(e&&typeof e==`object`&&`message`in e&&`messages`in e)}function rb(e){return typeof e==`string`||ib(e)}function ib(e){return!!(e&&typeof e==`object`&&`byteLength`in e&&`byteOffset`in e)}var ab=[],ob={allowDangerousHtml:!0},sb=/^(https?|ircs?|mailto|xmpp)$/i,cb=[{from:`astPlugins`,id:`remove-buggy-html-in-markdown-parser`},{from:`allowDangerousHtml`,id:`remove-buggy-html-in-markdown-parser`},{from:`allowNode`,id:`replace-allownode-allowedtypes-and-disallowedtypes`,to:`allowElement`},{from:`allowedTypes`,id:`replace-allownode-allowedtypes-and-disallowedtypes`,to:`allowedElements`},{from:`disallowedTypes`,id:`replace-allownode-allowedtypes-and-disallowedtypes`,to:`disallowedElements`},{from:`escapeHtml`,id:`remove-buggy-html-in-markdown-parser`},{from:`includeElementIndex`,id:`#remove-includeelementindex`},{from:`includeNodeIndex`,id:`change-includenodeindex-to-includeelementindex`},{from:`linkTarget`,id:`remove-linktarget`},{from:`plugins`,id:`change-plugins-to-remarkplugins`,to:`remarkPlugins`},{from:`rawSourcePos`,id:`#remove-rawsourcepos`},{from:`renderers`,id:`change-renderers-to-components`,to:`components`},{from:`source`,id:`change-source-to-children`,to:`children`},{from:`sourcePos`,id:`#remove-sourcepos`},{from:`transformImageUri`,id:`#add-urltransform`,to:`urlTransform`},{from:`transformLinkUri`,id:`#add-urltransform`,to:`urlTransform`}];function lb(e){let t=ub(e),n=db(e);return fb(t.runSync(t.parse(n),n),e)}function ub(e){let t=e.rehypePlugins||ab,n=e.remarkPlugins||ab,r=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...ob}:ob;return Yy().use(tv).use(n).use(xy,r).use(t)}function db(e){let t=e.children||``,n=new Vy;return typeof t==`string`?n.value=t:``+t,n}function fb(e,t){let n=t.allowedElements,r=t.allowElement,i=t.components,a=t.disallowedElements,o=t.skipHtml,s=t.unwrapDisallowed,c=t.urlTransform||pb;for(let e of cb)Object.hasOwn(t,e.from)&&``+e.from+(e.to?"use `"+e.to+"` instead":`remove it`)+e.id;return t.className&&(e={type:`element`,tagName:`div`,properties:{className:t.className},children:e.type===`root`?e.children:[e]}),ly(e,l),jm(e,{Fragment:b.Fragment,components:i,ignoreInvalidStyle:!0,jsx:b.jsx,jsxs:b.jsxs,passKeys:!0,passNode:!0});function l(e,t,i){if(e.type===`raw`&&i&&typeof t==`number`)return o?i.children.splice(t,1):i.children[t]={type:`text`,value:e.value},t;if(e.type===`element`){let t;for(t in eh)if(Object.hasOwn(eh,t)&&Object.hasOwn(e.properties,t)){let n=e.properties[t],r=eh[t];(r===null||r.includes(e.tagName))&&(e.properties[t]=c(String(n||``),t,e))}}if(e.type===`element`){let o=n?!n.includes(e.tagName):a?a.includes(e.tagName):!1;if(!o&&r&&typeof t==`number`&&(o=!r(e,t,i)),o&&i&&typeof t==`number`)return s&&e.children?i.children.splice(t,1,...e.children):i.children.splice(t,1),t}}}function pb(e){let t=e.indexOf(`:`),n=e.indexOf(`?`),r=e.indexOf(`#`),i=e.indexOf(`/`);return t===-1||i!==-1&&t>i||n!==-1&&t>n||r!==-1&&t>r||sb.test(e.slice(0,t))?e:``}function mb({title:e,count:t,open:n,onToggle:r,children:i}){return(0,b.jsxs)(`div`,{className:`section`,children:[(0,b.jsxs)(`button`,{className:`section__head`,onClick:r,"aria-expanded":n,children:[(0,b.jsx)(`span`,{className:`section__caret`,"aria-hidden":`true`,children:n?`▾`:`▸`}),e,t!==void 0&&t>0&&(0,b.jsx)(`span`,{className:`section__count`,children:t})]}),n&&(0,b.jsx)(`div`,{className:`section__body`,children:i})]})}var hb=null,gb=()=>hb===null?{}:{authorization:`Bearer ${hb}`};function _b(e,t){return e===void 0?Promise.resolve({mode:`local`}):e.start(t)}var vb=`/api/store`,yb=()=>new URLSearchParams(window.location.search).get(`t`),bb=()=>yb()!==null||Object.keys(gb()).length>0;function xb(e){let t=yb(),n=gb();if(t!==null)return{"x-apm-token":t,...n};if(Object.keys(n).length>0)return n;throw Error(`this viewer is read-only - open it with the open_viewer tool to ${e}`)}async function Sb(e,t){let n=await e.text().catch(()=>``);try{let e=JSON.parse(n).error;if(e!==void 0)return e}catch{}return e.status===404?`${t}: this server does not know the request. Restart it on newer code.`:t}async function Cb(e,t,n){let r=await fetch(`/api/ticket?project=${encodeURIComponent(e)}&ref=${encodeURIComponent(t)}`,{method:`POST`,headers:{"content-type":`application/json`,...xb(`change a status`)},body:JSON.stringify({status:n})});if(!r.ok)throw Error(await Sb(r,`could not change the status (${r.status})`))}async function wb(e,t,n){let r=await fetch(`/api/next?project=${encodeURIComponent(e)}&ref=${encodeURIComponent(t)}`,{method:`POST`,headers:{"content-type":`application/json`,...xb(`change the next list`)},body:JSON.stringify({listed:n})});if(!r.ok)throw Error(await Sb(r,`could not change the next list (${r.status})`))}async function Tb(e,t){let n=await fetch(`/api/layout?project=${encodeURIComponent(e)}`,{method:`POST`,headers:{"content-type":`application/json`,...xb(`save the layout`)},body:JSON.stringify({layout:t})});if(!n.ok)throw Error(await Sb(n,`could not save the layout (${n.status})`))}var Eb=`/api/changes`;async function Db(e,t,n){let r=new URLSearchParams({project:e,ref:t}),i=await fetch(`/api/item?${r}`,{headers:gb(),signal:n});if(i.status===404)return null;if(!i.ok)throw Error(`/api/item returned ${i.status} ${i.statusText}`);return await i.json()}async function Ob(e,t,n){let r=new URLSearchParams({project:e,q:t}),i=await fetch(`/api/search?${r}`,{headers:gb(),signal:n});return i.ok?await i.json():null}async function kb(e,t){let n=await fetch(`/api/media/${t}?project=${encodeURIComponent(e)}`,{method:`DELETE`,headers:xb(`remove an image`)});if(!n.ok)throw Error(await Sb(n,`remove failed (${n.status})`))}async function Ab(e,t,n){let r=await fetch(`/api/media?project=${encodeURIComponent(e)}&ref=${encodeURIComponent(t)}`,{method:`POST`,headers:{"content-type":n.type,...xb(`upload`)},body:n}),i=await r.json();if(!r.ok)throw Error(i.error??`upload failed (${r.status})`);return{hash:i.hash,mime:i.mime,bytes:i.bytes,at:new Date().toISOString()}}var jb=e=>Object.entries(e).map(([e,t])=>({heading:e,content:t})).sort((e,t)=>Number(t.heading===`protocol`)-Number(e.heading===`protocol`));function Mb(e,t){let n=new Map;for(let r of e)n.set(t(r),[...n.get(t(r))??[],r]);return n}function Nb(e){let t=new Map;for(let n of e){let e=n.created_at??``,r=t.get(n.area);(r===void 0||e<r)&&t.set(n.area,e)}return[...t].sort(([e,t],[n,r])=>t===r?e.localeCompare(n):t<r?-1:1).map(([e])=>e)}async function Pb(){let e=await fetch(vb,{headers:gb()});if(!e.ok)throw Error(`${vb} returned ${e.status} ${e.statusText}`);let{path:t,store:n,metrics:r,uploadsDisabled:i,files:a}=await e.json();return{storePath:t,uploadsDisabled:i??null,projects:(n.projects??[]).map(e=>({key:e.key,name:e.name,items:e.items.map(e=>({id:e.ref,area:e.area,status:e.status,title:e.title,deps:e.deps??[],parent:e.parent??null,start:e.start,due:e.due,closed:e.closed_at,created:e.created_at,updated:e.updated_at})),next:(e.next??[]).filter(t=>e.items.some(e=>e.ref===t)),layout:Object.fromEntries(Object.entries(e.layout??{}).map(([e,t])=>{let[n,r]=t.split(`,`).map(Number);return[e,{x:n,y:r}]})),metrics:Mb(r?.[e.key]??[],e=>e.ref??``),context:jb(e.context??{}),file:a?.[e.key]??null,areaInfo:Object.fromEntries((e.areas??[]).map(e=>[e.key,{name:e.name,description:e.description}])),areaOrder:Nb(e.items)}))}}function Fb(e){let t=decodeURIComponent(e.replace(/^#/,``)),n=t.indexOf(`/`);return{project:(n===-1?t:t.slice(0,n))||null,item:n===-1?null:t.slice(n+1)||null}}var Ib=`context:`,Lb=e=>e?.startsWith(`context:`)?e.slice(8):null;function Rb(e,t){if(e.length===0)return{project:null,notice:`This store has no projects yet. Create one and it will appear here.`};if(t!==null){let n=e.find(e=>e.key===t);return n?{project:n,notice:null}:{project:null,notice:`No project "${t}" in this store. It holds: ${e.map(e=>e.key).join(`, `)}.`}}return{project:e[0],notice:null}}var zb=e=>e<1048576?`${Math.round(e/1024)} KB`:`${(e/1024/1024).toFixed(1)} MB`;function Bb({projectKey:e,ref_:t,images:n,uploadsDisabled:r,reload:i,open:a,onToggle:o}){let[s,c]=(0,_.useState)(!1),[l,u]=(0,_.useState)(null),[d,f]=(0,_.useState)(!1),p=(0,_.useRef)(null),m=bb(),h=m&&r===null;(0,_.useEffect)(()=>u(null),[t]);async function g(e){c(!0),u(null);try{await e()}catch(e){u(e instanceof Error?e.message:String(e))}finally{c(!1),i()}}let v=n=>n===null||n.length===0?Promise.resolve():g(async()=>{for(let r of Array.from(n))await Ab(e,t,r)});return(0,b.jsxs)(mb,{title:`Images`,count:n.length,open:a,onToggle:o,children:[n.length>0&&(0,b.jsx)(`div`,{className:`attachments__grid`,children:n.map(t=>(0,b.jsxs)(`div`,{className:`attachments__item`,children:[(0,b.jsx)(`a`,{href:`/media/${t.hash}`,target:`_blank`,rel:`noreferrer`,children:(0,b.jsx)(`img`,{className:`attachments__thumb`,src:`/media/${t.hash}`,alt:t.caption??`attachment`,loading:`lazy`})}),(0,b.jsx)(`span`,{className:`attachments__meta`,children:zb(t.bytes)}),m&&(0,b.jsx)(`button`,{className:`attachments__remove`,title:`Remove this image from the ticket`,disabled:s,onClick:()=>void g(()=>kb(e,t.hash)),children:`x`})]},t.hash))}),h?(0,b.jsxs)(`div`,{className:`attachments__drop${d?` attachments__drop--over`:``}`,onDragOver:e=>{e.preventDefault(),f(!0)},onDragLeave:()=>f(!1),onDrop:e=>{e.preventDefault(),f(!1),v(e.dataTransfer.files)},onClick:()=>p.current?.click(),children:[(0,b.jsx)(`input`,{ref:p,type:`file`,accept:`image/png,image/jpeg,image/webp,image/gif`,multiple:!0,hidden:!0,onChange:e=>{v(e.target.files),e.target.value=``}}),s?`Uploading...`:`Drop an image on ${t}, or click to choose`]}):r===null?n.length===0&&(0,b.jsx)(`p`,{className:`attachments__readonly`,children:`Open the viewer with the open_viewer tool to add images.`}):(0,b.jsx)(`p`,{className:`attachments__readonly`,children:r}),l!==null&&(0,b.jsx)(`p`,{className:`attachments__error`,children:l})]})}var Vb=e=>new Date(e).toLocaleDateString(void 0,{day:`numeric`,month:`short`}),Hb=e=>e.latest===null&&e.latestText===null;function Ub(e){if(e.latest!==null){let t=Number.isInteger(e.latest)?String(e.latest):e.latest.toFixed(2).replace(/\.?0+$/,``);return e.units.length>0?`${t} ${e.units.join(`/`)}`:t}if(e.values.length>1){let t=e.values.map(e=>`${e.text} x${e.count}`).join(`, `),n=e.distinctValues-e.values.length;return n>0?`${t}, +${n} more`:t}return e.latestText??``}function Wb({metrics:e,open:t,onToggle:n}){return e.length===0?null:(0,b.jsx)(mb,{title:`Metrics`,count:e.length,open:t,onToggle:n,children:(0,b.jsx)(`table`,{className:`metrics__table`,children:(0,b.jsx)(`tbody`,{children:e.map(e=>(0,b.jsxs)(`tr`,{children:[(0,b.jsx)(`td`,{className:`metrics__name`,children:e.metric}),(0,b.jsx)(`td`,{className:`metrics__value`,"data-mixed":e.units.length>1,"data-wrap":e.values.length>1,children:Ub(e)}),(0,b.jsx)(`td`,{className:`metrics__count`,children:Hb(e)?`${e.count} ${e.count===1?`occurrence`:`occurrences`}, to ${Vb(e.latestAt)}`:e.count===1?Vb(e.latestAt):`${e.count} readings, to ${Vb(e.latestAt)}`})]},e.metric))})})})}function Gb(e,t){let n=String(e);if(typeof t!=`string`)throw TypeError(`Expected character`);let r=0,i=n.indexOf(t);for(;i!==-1;)r++,i=n.indexOf(t,i+t.length);return r}function Kb(e){if(typeof e!=`string`)throw TypeError(`Expected a string`);return e.replace(/[|\\{}()[\]^$+*?.]/g,`\\$&`).replace(/-/g,`\\x2d`)}function qb(e,t,n){let r=Zv((n||{}).ignore||[]),i=Jb(t),a=-1;for(;++a<i.length;)sy(e,o);function o(e,t,n){if(e.type===`text`&&typeof n==`number`)return s(e,t,n);if(r(e,n,t[t.length-1]))return oy}function s(e,t,n){let r=t[t.length-1],o=i[a][0],s=i[a][1],c=0,l=!1,u=[];o.lastIndex=0;let d=o.exec(e.value);for(;d;){let n=d.index,r={index:d.index,input:d.input,stack:[...t,e]},i=s(...d,r);if(typeof i==`string`&&(i=i.length>0?{type:`text`,value:i}:void 0),i===!1)o.lastIndex=n+1;else{if(c!==n&&f({type:`text`,value:e.value.slice(c,n)}),Array.isArray(i))for(let e of i)f(e);else i&&f(i);c=n+d[0].length,l=!0}if(!o.global)break;d=o.exec(e.value)}return l?(c<e.value.length&&f({type:`text`,value:e.value.slice(c)}),r.children.splice(n,1,...u)):u=[e],n+u.length;function f(e){let t=u[u.length-1];t&&t.type===`text`&&e.type===`text`?t.value+=e.value:u.push(e)}}}function Jb(e){if(!Array.isArray(e))throw TypeError(`Expected find and replace tuple or list of tuples`);let t=[],n=!e[0]||Array.isArray(e[0])?e:[e],r=-1;for(;++r<n.length;){let e=n[r];t.push([Yb(e[0]),Xb(e[1])])}return t}function Yb(e){return typeof e==`string`?new RegExp(Kb(e),`g`):e}function Xb(e){return typeof e==`function`?e:function(){return e}}var Zb=`phrasing`,Qb=[`autolink`,`link`,`image`,`label`];function $b(){return{transforms:[sx],enter:{literalAutolink:tx,literalAutolinkEmail:nx,literalAutolinkHttp:nx,literalAutolinkWww:nx},exit:{literalAutolink:ox,literalAutolinkEmail:ax,literalAutolinkHttp:rx,literalAutolinkWww:ix}}}function ex(){return{unsafe:[{character:`@`,before:`[+\\-.\\w]`,after:`[\\-.\\w]`,inConstruct:Zb,notInConstruct:Qb},{character:`.`,before:`[Ww]`,after:`[\\-.\\w]`,inConstruct:Zb,notInConstruct:Qb},{character:`:`,before:`[ps]`,after:`\\/`,inConstruct:Zb,notInConstruct:Qb}]}}function tx(e){this.enter({type:`link`,title:null,url:``,children:[],position:void 0},e)}function nx(e){this.config.enter.autolinkProtocol.call(this,e)}function rx(e){this.config.exit.autolinkProtocol.call(this,e)}function ix(e){this.config.exit.data.call(this,e);let t=this.stack[this.stack.length-1];t.type,t.url=`http://`+this.sliceSerialize(e)}function ax(e){this.config.exit.autolinkEmail.call(this,e)}function ox(e){this.exit(e)}function sx(e){qb(e,[[/(?<![\da-z])(https?:\/\/|www(?=\.))([\w-]*\.[\w\-.]*)([^\t\n\r ]*)/gi,cx],[/(?<![\w+\-.@])xmpp:([\w+\-.]+)@([\w-]+(?:\.[\w-]+)+)(\/(?:[\w\-/]|\.(?=[\dA-Za-z]))*)?/g,dx],[/(?<![\w+\-.@])mailto:([\w+\-.]+)@([\w-]+(?:\.[\w-]+)+)/g,ux],[/(?<![\w+\-.]|(?:^|[^\d@A-Za-z])(?:mailto|xmpp):)([\w+\-.]+)@([\w-]+(?:\.[\w-]+)+)/g,lx]],{ignore:[`link`,`linkReference`]})}function cx(e,t,n,r,i){if(!mx(i))return!1;let a=``;if(/^w/i.test(t)&&(n=t+n,t=``,a=`http://`),wh(n.charCodeAt(0))||!fx(n))return!1;let o=px(n+r),s={type:`link`,title:null,url:a+t+o[0],children:[{type:`text`,value:t+o[0],position:void 0}],position:void 0};return o[1]?[s,{type:`text`,value:o[1],position:void 0}]:s}function lx(e,t,n){return!/[\d\-_]$/.test(n)&&{type:`link`,title:null,url:`mailto:`+t+`@`+n,children:[{type:`text`,value:t+`@`+n,position:void 0}],position:void 0}}function ux(e,t,n){if(/[\d\-_]$/.test(n))return!1;let r=`mailto:`+t+`@`+n;return{type:`link`,title:null,url:r,children:[{type:`text`,value:r,position:void 0}],position:void 0}}function dx(e,t,n,r,i){if(/[\d\-_]$/.test(n)||r&&(!/[A-Za-z]$/.test(r)||i.input.charAt(i.index+e.length)===`@`))return!1;let a=`xmpp:`+t+`@`+n+(r||``);return{type:`link`,title:null,url:a,children:[{type:`text`,value:a,position:void 0}],position:void 0}}function fx(e){let t=e.split(`.`);return!(t.length<2||t[t.length-1]&&(/_/.test(t[t.length-1])||!/[\dA-Za-z]/.test(t[t.length-1]))||t[t.length-2]&&(/_/.test(t[t.length-2])||!/[\dA-Za-z]/.test(t[t.length-2])))}function px(e){let t=e.length;for(;t>0;){let n=e.charCodeAt(t-1);if(n===33||n===34||n===38||n===39||n===41||n===44||n===46||n===58||n===59||n===60||n===62||n===63||n===93||n===125)t--;else break}if(t===e.length)return[e,void 0];let n=e.slice(t);e=e.slice(0,t);let r=n.indexOf(`)`),i=Gb(e,`(`),a=Gb(e,`)`);for(;r!==-1&&i>a;)e+=n.slice(0,r+1),n=n.slice(r+1),r=n.indexOf(`)`),a++;return[e,n]}function mx(e){let t=e.input.charCodeAt(e.index-1);return e.index===0||Th(t)||wh(t)}wx.peek=Cx;function hx(){this.buffer()}function gx(e){this.enter({type:`footnoteReference`,identifier:``,label:``},e)}function _x(){this.buffer()}function vx(e){this.enter({type:`footnoteDefinition`,identifier:``,label:``,children:[]},e)}function yx(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=hh(this.sliceSerialize(e)).toLowerCase(),n.label=t}function bx(e){this.exit(e)}function xx(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=hh(this.sliceSerialize(e)).toLowerCase(),n.label=t}function Sx(e){this.exit(e)}function Cx(){return`[`}function wx(e,t,n,r){let i=n.createTracker(r),a=i.move(`[^`),o=n.enter(`footnoteReference`),s=n.enter(`reference`);return a+=i.move(n.safe(n.associationId(e),{after:`]`,before:a})),s(),o(),a+=i.move(`]`),a}function Tx(){return{enter:{gfmFootnoteCallString:hx,gfmFootnoteCall:gx,gfmFootnoteDefinitionLabelString:_x,gfmFootnoteDefinition:vx},exit:{gfmFootnoteCallString:yx,gfmFootnoteCall:bx,gfmFootnoteDefinitionLabelString:xx,gfmFootnoteDefinition:Sx}}}function Ex(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:n,footnoteReference:wx},unsafe:[{character:`[`,inConstruct:[`label`,`phrasing`,`reference`]}]};function n(e,n,r,i){let a=r.createTracker(i),o=a.move(`[^`),s=r.enter(`footnoteDefinition`),c=r.enter(`label`);return o+=a.move(r.safe(r.associationId(e),{before:o,after:`]`})),c(),o+=a.move(`]:`),e.children&&e.children.length>0&&(a.shift(4),o+=a.move((t?`
28
- `:` `)+r.indentLines(r.containerFlow(e,a.current()),t?Ox:Dx))),s(),o}}function Dx(e,t,n){return t===0?e:Ox(e,t,n)}function Ox(e,t,n){return(n?``:` `)+e}var kx=[`autolink`,`destinationLiteral`,`destinationRaw`,`reference`,`titleQuote`,`titleApostrophe`];Px.attention=Fx,Px.peek=Ix;function Ax(){return{canContainEols:[`delete`],enter:{strikethrough:Mx},exit:{strikethrough:Nx}}}function jx(){return{handlers:{delete:Px},unsafe:[{character:`~`,inConstruct:`phrasing`,notInConstruct:kx}]}}function Mx(e){this.enter({type:`delete`,children:[],position:void 0},e)}function Nx(e){this.exit(e)}function Px(e,t,n,r){let i=n.createTracker(r),a=n.stack.includes(`strikethrough`)?`~`:`~~`,o=n.enter(`strikethrough`),s=i.move(a);return s+=n.containerPhrasing(e,{...i.current(),before:s,after:`~`}),s+=i.move(a),o(),s}function Fx(){return{construct:`strikethrough`,markers:[`~`],sizes:[2,1]}}function Ix(){return`~`}function Lx(e){return e.length}function Rx(e,t){let n=t||{},r=(n.align||[]).concat(),i=n.stringLength||Lx,a=[],o=[],s=[],c=[],l=0,u=-1;for(;++u<e.length;){let t=[],r=[],a=-1;for(e[u].length>l&&(l=e[u].length);++a<e[u].length;){let o=zx(e[u][a]);if(n.alignDelimiters!==!1){let e=i(o);r[a]=e,(c[a]===void 0||e>c[a])&&(c[a]=e)}t.push(o)}o[u]=t,s[u]=r}let d=-1;if(typeof r==`object`&&`length`in r)for(;++d<l;)a[d]=Bx(r[d]);else{let e=Bx(r);for(;++d<l;)a[d]=e}d=-1;let f=[],p=[];for(;++d<l;){let e=a[d],t=``,r=``;e===99?(t=`:`,r=`:`):e===108?t=`:`:e===114&&(r=`:`);let i=n.alignDelimiters===!1?1:Math.max(1,c[d]-t.length-r.length),o=t+`-`.repeat(i)+r;n.alignDelimiters!==!1&&(i=t.length+i+r.length,i>c[d]&&(c[d]=i),p[d]=i),f[d]=o}o.splice(1,0,f),s.splice(1,0,p),u=-1;let m=[];for(;++u<o.length;){let e=o[u],t=s[u],r=n.fillRows===!1?Math.max(1,o[u===1?0:u].length):l;d=-1;let i=[];for(;++d<r;){let o=e[d]||``,s=``,l=``;if(n.alignDelimiters!==!1){let e=c[d]-(t[d]||0),n=a[d];if(n===114)s=` `.repeat(e);else if(n===99){let t=e/2;e%2?(s=` `.repeat(t+.5),l=` `.repeat(t-.5)):(s=` `.repeat(t),l=s)}else l=` `.repeat(e)}n.delimiterStart!==!1&&!d&&i.push(`|`),n.padding===!1||n.alignDelimiters===!1&&o===``||n.delimiterStart===!1&&!d||i.push(` `),n.alignDelimiters!==!1&&i.push(s),i.push(o),n.alignDelimiters!==!1&&i.push(l),n.padding!==!1&&i.push(` `),(n.delimiterEnd!==!1||d!==r-1)&&i.push(`|`)}m.push(n.delimiterEnd===!1?i.join(``).replace(/ +$/,``):i.join(``))}return m.join(`
29
- `)}function zx(e){return e==null?``:String(e)}function Bx(e){let t=typeof e==`string`?e.codePointAt(0):0;return t===67||t===99?99:t===76||t===108?108:t===82||t===114?114:0}var Vx=Zv([`break`,`delete`,`emphasis`,`footnote`,`footnoteReference`,`image`,`imageReference`,`inlineCode`,`inlineMath`,`link`,`linkReference`,`mdxJsxTextElement`,`mdxTextExpression`,`strong`,`text`,`textDirective`]);function Hx(e,t,n,r){let i=n.enter(`blockquote`),a=n.createTracker(r);a.move(`> `),a.shift(2);let o=n.indentLines(n.containerFlow(e,a.current()),Ux);return i(),o}function Ux(e,t,n){return`>`+(n?``:` `)+e}function Wx(e,t){return Gx(e,t.inConstruct,!0)&&!Gx(e,t.notInConstruct,!1)}function Gx(e,t,n){if(typeof t==`string`&&(t=[t]),!t||t.length===0)return n;let r=-1;for(;++r<t.length;)if(e.includes(t[r]))return!0;return!1}function Kx(e,t,n,r){let i=-1;for(;++i<n.unsafe.length;){let e=n.unsafe[i];if(e.character===`
30
- `&&!e.before&&!e.after&&Wx(n.stack,e))return/[\t ]/.test(r.before)?``:` `}return`\\
31
- `}function qx(e,t){let n=String(e),r=n.indexOf(t),i=r,a=0,o=0;if(typeof t!=`string`)throw TypeError(`Expected substring`);for(;r!==-1;)r===i?++a>o&&(o=a):a=1,i=r+t.length,r=n.indexOf(t,i);return o}function Jx(e,t){return!(t.options.fences!==!1||!e.value||e.lang||!/[^\n\r ]/.test(e.value)||/^[\t ]*(?:[\n\r]|$)|(?:^|[\n\r])[\t ]*$/.test(e.value))}function Yx(e){let t=e.options.fence||"`";if(t!=="`"&&t!==`~`)throw Error("Cannot serialize code with `"+t+"` for `options.fence`, expected `` ` `` or `~`");return t}function Xx(e,t,n,r){let i=Yx(n),a=e.value||``;if(Jx(e,n)){let e=n.enter(`codeIndented`),t=n.indentLines(a,Zx);return e(),t}let o=n.createTracker(r),s=i.repeat(Math.max(qx(a,i)+1,3)),c=n.enter(`codeFenced`),l=i==="`"?`GraveAccent`:`Tilde`,u=o.move(s);if(e.lang){let t=n.enter(`codeFencedLang${l}`);u+=o.move(n.safe(e.lang,{before:u,after:` `,encode:["`"],...o.current()})),t()}if(e.lang&&e.meta){let t=n.enter(`codeFencedMeta${l}`);u+=o.move(` `),u+=o.move(n.safe(e.meta,{before:u,after:`
26
+ `}),n}function jM(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function MM(e,t){let n=EM(e,t),r=n.one(e,void 0),i=cM(n),a=Array.isArray(r)?{type:`root`,children:r}:r||{type:`root`,children:[]};return i&&(`children`in a,a.children.push({type:`text`,value:`
27
+ `},i)),a}function NM(e,t){return e&&`run`in e?async function(n,r){let i=MM(n,{file:r,...t});await e.run(i,r)}:function(n,r){return MM(n,{file:r,...e||t})}}function PM(e){if(e)throw e}var FM=o(((e,t)=>{var n=Object.prototype.hasOwnProperty,r=Object.prototype.toString,i=Object.defineProperty,a=Object.getOwnPropertyDescriptor,o=function(e){return typeof Array.isArray==`function`?Array.isArray(e):r.call(e)===`[object Array]`},s=function(e){if(!e||r.call(e)!==`[object Object]`)return!1;var t=n.call(e,`constructor`),i=e.constructor&&e.constructor.prototype&&n.call(e.constructor.prototype,`isPrototypeOf`);if(e.constructor&&!t&&!i)return!1;for(var a in e);return a===void 0||n.call(e,a)},c=function(e,t){i&&t.name===`__proto__`?i(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},l=function(e,t){if(t===`__proto__`){if(!n.call(e,t))return;if(a)return a(e,t).value}return e[t]};t.exports=function e(){var t,n,r,i,a,u,d=arguments[0],f=1,p=arguments.length,m=!1;for(typeof d==`boolean`&&(m=d,d=arguments[1]||{},f=2),(d==null||typeof d!=`object`&&typeof d!=`function`)&&(d={});f<p;++f)if(t=arguments[f],t!=null)for(n in t)r=l(d,n),i=l(t,n),d!==i&&(m&&i&&(s(i)||(a=o(i)))?(a?(a=!1,u=r&&o(r)?r:[]):u=r&&s(r)?r:{},c(d,{name:n,newValue:e(m,u,i)})):i!==void 0&&c(d,{name:n,newValue:i}));return d}}));function IM(e){if(typeof e!=`object`||!e)return!1;let t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function LM(){let e=[],t={run:n,use:r};return t;function n(...t){let n=-1,r=t.pop();if(typeof r!=`function`)throw TypeError(`Expected function as last argument, not `+r);i(null,...t);function i(a,...o){let s=e[++n],c=-1;if(a)r(a);else{for(;++c<t.length;)(o[c]===null||o[c]===void 0)&&(o[c]=t[c]);t=o,s?RM(s,i)(...o):r(null,...o)}}}function r(n){if(typeof n!=`function`)throw TypeError("Expected `middelware` to be a function, not "+n);return e.push(n),t}}function RM(e,t){let n;return r;function r(...t){let r=e.length>t.length,o;r&&t.push(i);try{o=e.apply(this,t)}catch(e){let t=e;if(r&&n)throw t;return i(t)}r||(o&&o.then&&typeof o.then==`function`?o.then(a,i):o instanceof Error?i(o):a(o))}function i(e,...r){n||(n=!0,t(e,...r))}function a(e){i(null,e)}}var zM={basename:BM,dirname:VM,extname:HM,join:UM,sep:`/`};function BM(e,t){if(t!==void 0&&typeof t!=`string`)throw TypeError(`"ext" argument must be a string`);KM(e);let n=0,r=-1,i=e.length,a;if(t===void 0||t.length===0||t.length>e.length){for(;i--;)if(e.codePointAt(i)===47){if(a){n=i+1;break}}else r<0&&(a=!0,r=i+1);return r<0?``:e.slice(n,r)}if(t===e)return``;let o=-1,s=t.length-1;for(;i--;)if(e.codePointAt(i)===47){if(a){n=i+1;break}}else o<0&&(a=!0,o=i+1),s>-1&&(e.codePointAt(i)===t.codePointAt(s--)?s<0&&(r=i):(s=-1,r=o));return n===r?r=o:r<0&&(r=e.length),e.slice(n,r)}function VM(e){if(KM(e),e.length===0)return`.`;let t=-1,n=e.length,r;for(;--n;)if(e.codePointAt(n)===47){if(r){t=n;break}}else r||=!0;return t<0?e.codePointAt(0)===47?`/`:`.`:t===1&&e.codePointAt(0)===47?`//`:e.slice(0,t)}function HM(e){KM(e);let t=e.length,n=-1,r=0,i=-1,a=0,o;for(;t--;){let s=e.codePointAt(t);if(s===47){if(o){r=t+1;break}}else n<0&&(o=!0,n=t+1),s===46?i<0?i=t:a!==1&&(a=1):i>-1&&(a=-1)}return i<0||n<0||a===0||a===1&&i===n-1&&i===r+1?``:e.slice(i,n)}function UM(...e){let t=-1,n;for(;++t<e.length;)KM(e[t]),e[t]&&(n=n===void 0?e[t]:n+`/`+e[t]);return n===void 0?`.`:WM(n)}function WM(e){KM(e);let t=e.codePointAt(0)===47,n=GM(e,!t);return n.length===0&&!t&&(n=`.`),n.length>0&&e.codePointAt(e.length-1)===47&&(n+=`/`),t?`/`+n:n}function GM(e,t){let n=``,r=0,i=-1,a=0,o=-1,s,c;for(;++o<=e.length;){if(o<e.length)s=e.codePointAt(o);else if(s===47)break;else s=47;if(s===47){if(i!==o-1&&a!==1){if(i!==o-1&&a===2){if(n.length<2||r!==2||n.codePointAt(n.length-1)!==46||n.codePointAt(n.length-2)!==46){if(n.length>2){if(c=n.lastIndexOf(`/`),c!==n.length-1){c<0?(n=``,r=0):(n=n.slice(0,c),r=n.length-1-n.lastIndexOf(`/`)),i=o,a=0;continue}}else if(n.length>0){n=``,r=0,i=o,a=0;continue}}t&&(n=n.length>0?n+`/..`:`..`,r=2)}else n.length>0?n+=`/`+e.slice(i+1,o):n=e.slice(i+1,o),r=o-i-1}i=o,a=0}else s===46&&a>-1?a++:a=-1}return n}function KM(e){if(typeof e!=`string`)throw TypeError(`Path must be a string. Received `+JSON.stringify(e))}var qM={cwd:JM};function JM(){return`/`}function YM(e){return!!(typeof e==`object`&&e&&`href`in e&&e.href&&`protocol`in e&&e.protocol&&e.auth===void 0)}function XM(e){if(typeof e==`string`)e=new URL(e);else if(!YM(e)){let t=TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw t.code=`ERR_INVALID_ARG_TYPE`,t}if(e.protocol!==`file:`){let e=TypeError(`The URL must be of scheme file`);throw e.code=`ERR_INVALID_URL_SCHEME`,e}return ZM(e)}function ZM(e){if(e.hostname!==``){let e=TypeError(`File URL host must be "localhost" or empty on darwin`);throw e.code=`ERR_INVALID_FILE_URL_HOST`,e}let t=e.pathname,n=-1;for(;++n<t.length;)if(t.codePointAt(n)===37&&t.codePointAt(n+1)===50){let e=t.codePointAt(n+2);if(e===70||e===102){let e=TypeError(`File URL path must not include encoded / characters`);throw e.code=`ERR_INVALID_FILE_URL_PATH`,e}}return decodeURIComponent(t)}var QM=[`history`,`path`,`basename`,`stem`,`extname`,`dirname`],$M=class{constructor(e){let t;t=e?YM(e)?{path:e}:typeof e==`string`||rN(e)?{value:e}:e:{},this.cwd=`cwd`in t?``:qM.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let n=-1;for(;++n<QM.length;){let e=QM[n];e in t&&t[e]!==void 0&&t[e]!==null&&(this[e]=e===`history`?[...t[e]]:t[e])}let r;for(r in t)QM.includes(r)||(this[r]=t[r])}get basename(){return typeof this.path==`string`?zM.basename(this.path):void 0}set basename(e){tN(e,`basename`),eN(e,`basename`),this.path=zM.join(this.dirname||``,e)}get dirname(){return typeof this.path==`string`?zM.dirname(this.path):void 0}set dirname(e){nN(this.basename,`dirname`),this.path=zM.join(e||``,this.basename)}get extname(){return typeof this.path==`string`?zM.extname(this.path):void 0}set extname(e){if(eN(e,`extname`),nN(this.dirname,`extname`),e){if(e.codePointAt(0)!==46)throw Error("`extname` must start with `.`");if(e.includes(`.`,1))throw Error("`extname` cannot contain multiple dots")}this.path=zM.join(this.dirname,this.stem+(e||``))}get path(){return this.history[this.history.length-1]}set path(e){YM(e)&&(e=XM(e)),tN(e,`path`),this.path!==e&&this.history.push(e)}get stem(){return typeof this.path==`string`?zM.basename(this.path,this.extname):void 0}set stem(e){tN(e,`stem`),eN(e,`stem`),this.path=zM.join(this.dirname||``,e+(this.extname||``))}fail(e,t,n){let r=this.message(e,t,n);throw r.fatal=!0,r}info(e,t,n){let r=this.message(e,t,n);return r.fatal=void 0,r}message(e,t,n){let r=new FD(e,t,n);return this.path&&(r.name=this.path+`:`+r.name,r.file=this.path),r.fatal=!1,this.messages.push(r),r}toString(e){return this.value===void 0?``:typeof this.value==`string`?this.value:new TextDecoder(e||void 0).decode(this.value)}};function eN(e,t){if(e&&e.includes(zM.sep))throw Error("`"+t+"` cannot be a path: did not expect `"+zM.sep+"`")}function tN(e,t){if(!e)throw Error("`"+t+"` cannot be empty")}function nN(e,t){if(!e)throw Error("Setting `"+t+"` requires `path` to be set too")}function rN(e){return!!(e&&typeof e==`object`&&`byteLength`in e&&`byteOffset`in e)}var iN=(function(e){let t=this.constructor.prototype,n=t[e],r=function(){return n.apply(r,arguments)};return Object.setPrototypeOf(r,t),r}),aN=l(FM(),1),oN={}.hasOwnProperty,sN=new class e extends iN{constructor(){super(`copy`),this.Compiler=void 0,this.Parser=void 0,this.attachers=[],this.compiler=void 0,this.freezeIndex=-1,this.frozen=void 0,this.namespace={},this.parser=void 0,this.transformers=LM()}copy(){let t=new e,n=-1;for(;++n<this.attachers.length;){let e=this.attachers[n];t.use(...e)}return t.data((0,aN.default)(!0,{},this.namespace)),t}data(e,t){return typeof e==`string`?arguments.length===2?(uN(`data`,this.frozen),this.namespace[e]=t,this):oN.call(this.namespace,e)&&this.namespace[e]||void 0:e?(uN(`data`,this.frozen),this.namespace=e,this):this.namespace}freeze(){if(this.frozen)return this;let e=this;for(;++this.freezeIndex<this.attachers.length;){let[t,...n]=this.attachers[this.freezeIndex];if(n[0]===!1)continue;n[0]===!0&&(n[0]=void 0);let r=t.call(e,...n);typeof r==`function`&&this.transformers.use(r)}return this.frozen=!0,this.freezeIndex=1/0,this}parse(e){this.freeze();let t=pN(e),n=this.parser||this.Parser;return cN(`parse`,n),n(String(t),t)}process(e,t){let n=this;return this.freeze(),cN(`process`,this.parser||this.Parser),lN(`process`,this.compiler||this.Compiler),t?r(void 0,t):new Promise(r);function r(r,i){let a=pN(e),o=n.parse(a);n.run(o,a,function(e,t,r){if(e||!t||!r)return s(e);let i=t,a=n.stringify(i,r);hN(a)?r.value=a:r.result=a,s(e,r)});function s(e,n){e||!n?i(e):r?r(n):t(void 0,n)}}}processSync(e){let t=!1,n;return this.freeze(),cN(`processSync`,this.parser||this.Parser),lN(`processSync`,this.compiler||this.Compiler),this.process(e,r),fN(`processSync`,`process`,t),n;function r(e,r){t=!0,PM(e),n=r}}run(e,t,n){dN(e),this.freeze();let r=this.transformers;return!n&&typeof t==`function`&&(n=t,t=void 0),n?i(void 0,n):new Promise(i);function i(i,a){let o=pN(t);r.run(e,o,s);function s(t,r,o){let s=r||e;t?a(t):i?i(s):n(void 0,s,o)}}}runSync(e,t){let n=!1,r;return this.run(e,t,i),fN(`runSync`,`run`,n),r;function i(e,t){PM(e),r=t,n=!0}}stringify(e,t){this.freeze();let n=pN(t),r=this.compiler||this.Compiler;return lN(`stringify`,r),dN(e),r(e,n)}use(e,...t){let n=this.attachers,r=this.namespace;if(uN(`use`,this.frozen),e!=null){if(typeof e==`function`)s(e,t);else if(typeof e==`object`)Array.isArray(e)?o(e):a(e);else throw TypeError("Expected usable value, not `"+e+"`")}return this;function i(e){if(typeof e==`function`)s(e,[]);else if(typeof e==`object`){if(Array.isArray(e)){let[t,...n]=e;s(t,n)}else a(e)}else throw TypeError("Expected usable value, not `"+e+"`")}function a(e){if(!(`plugins`in e)&&!(`settings`in e))throw Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");o(e.plugins),e.settings&&(r.settings=(0,aN.default)(!0,r.settings,e.settings))}function o(e){let t=-1;if(e!=null){if(Array.isArray(e))for(;++t<e.length;){let n=e[t];i(n)}else throw TypeError("Expected a list of plugins, not `"+e+"`")}}function s(e,t){let r=-1,i=-1;for(;++r<n.length;)if(n[r][0]===e){i=r;break}if(i===-1)n.push([e,...t]);else if(t.length>0){let[r,...a]=t,o=n[i][1];IM(o)&&IM(r)&&(r=(0,aN.default)(!0,o,r)),n[i]=[e,r,...a]}}}}().freeze();function cN(e,t){if(typeof t!=`function`)throw TypeError("Cannot `"+e+"` without `parser`")}function lN(e,t){if(typeof t!=`function`)throw TypeError("Cannot `"+e+"` without `compiler`")}function uN(e,t){if(t)throw Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function dN(e){if(!IM(e)||typeof e.type!=`string`)throw TypeError("Expected node, got `"+e+"`")}function fN(e,t,n){if(!n)throw Error("`"+e+"` finished async. Use `"+t+"` instead")}function pN(e){return mN(e)?e:new $M(e)}function mN(e){return!!(e&&typeof e==`object`&&`message`in e&&`messages`in e)}function hN(e){return typeof e==`string`||gN(e)}function gN(e){return!!(e&&typeof e==`object`&&`byteLength`in e&&`byteOffset`in e)}var _N=[],vN={allowDangerousHtml:!0},yN=/^(https?|ircs?|mailto|xmpp)$/i,bN=[{from:`astPlugins`,id:`remove-buggy-html-in-markdown-parser`},{from:`allowDangerousHtml`,id:`remove-buggy-html-in-markdown-parser`},{from:`allowNode`,id:`replace-allownode-allowedtypes-and-disallowedtypes`,to:`allowElement`},{from:`allowedTypes`,id:`replace-allownode-allowedtypes-and-disallowedtypes`,to:`allowedElements`},{from:`disallowedTypes`,id:`replace-allownode-allowedtypes-and-disallowedtypes`,to:`disallowedElements`},{from:`escapeHtml`,id:`remove-buggy-html-in-markdown-parser`},{from:`includeElementIndex`,id:`#remove-includeelementindex`},{from:`includeNodeIndex`,id:`change-includenodeindex-to-includeelementindex`},{from:`linkTarget`,id:`remove-linktarget`},{from:`plugins`,id:`change-plugins-to-remarkplugins`,to:`remarkPlugins`},{from:`rawSourcePos`,id:`#remove-rawsourcepos`},{from:`renderers`,id:`change-renderers-to-components`,to:`components`},{from:`source`,id:`change-source-to-children`,to:`children`},{from:`sourcePos`,id:`#remove-sourcepos`},{from:`transformImageUri`,id:`#add-urltransform`,to:`urlTransform`},{from:`transformLinkUri`,id:`#add-urltransform`,to:`urlTransform`}];function xN(e){let t=SN(e),n=CN(e);return wN(t.runSync(t.parse(n),n),e)}function SN(e){let t=e.rehypePlugins||_N,n=e.remarkPlugins||_N,r=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...vN}:vN;return sN().use(pj).use(n).use(NM,r).use(t)}function CN(e){let t=e.children||``,n=new $M;return typeof t==`string`?n.value=t:``+t,n}function wN(e,t){let n=t.allowedElements,r=t.allowElement,i=t.components,a=t.disallowedElements,o=t.skipHtml,s=t.unwrapDisallowed,c=t.urlTransform||TN;for(let e of bN)Object.hasOwn(t,e.from)&&``+e.from+(e.to?"use `"+e.to+"` instead":`remove it`)+e.id;return t.className&&(e={type:`element`,tagName:`div`,properties:{className:t.className},children:e.type===`root`?e.children:[e]}),xM(e,l),UD(e,{Fragment:b.Fragment,components:i,ignoreInvalidStyle:!0,jsx:b.jsx,jsxs:b.jsxs,passKeys:!0,passNode:!0});function l(e,t,i){if(e.type===`raw`&&i&&typeof t==`number`)return o?i.children.splice(t,1):i.children[t]={type:`text`,value:e.value},t;if(e.type===`element`){let t;for(t in fO)if(Object.hasOwn(fO,t)&&Object.hasOwn(e.properties,t)){let n=e.properties[t],r=fO[t];(r===null||r.includes(e.tagName))&&(e.properties[t]=c(String(n||``),t,e))}}if(e.type===`element`){let o=n?!n.includes(e.tagName):a?a.includes(e.tagName):!1;if(!o&&r&&typeof t==`number`&&(o=!r(e,t,i)),o&&i&&typeof t==`number`)return s&&e.children?i.children.splice(t,1,...e.children):i.children.splice(t,1),t}}}function TN(e){let t=e.indexOf(`:`),n=e.indexOf(`?`),r=e.indexOf(`#`),i=e.indexOf(`/`);return t===-1||i!==-1&&t>i||n!==-1&&t>n||r!==-1&&t>r||yN.test(e.slice(0,t))?e:``}function EN(e,t){let n=String(e);if(typeof t!=`string`)throw TypeError(`Expected character`);let r=0,i=n.indexOf(t);for(;i!==-1;)r++,i=n.indexOf(t,i+t.length);return r}function DN(e){if(typeof e!=`string`)throw TypeError(`Expected a string`);return e.replace(/[|\\{}()[\]^$+*?.]/g,`\\$&`).replace(/-/g,`\\x2d`)}function ON(e,t,n){let r=lM((n||{}).ignore||[]),i=kN(t),a=-1;for(;++a<i.length;)yM(e,o);function o(e,t,n){if(e.type===`text`&&typeof n==`number`)return s(e,t,n);if(r(e,n,t[t.length-1]))return vM}function s(e,t,n){let r=t[t.length-1],o=i[a][0],s=i[a][1],c=0,l=!1,u=[];o.lastIndex=0;let d=o.exec(e.value);for(;d;){let n=d.index,r={index:d.index,input:d.input,stack:[...t,e]},i=s(...d,r);if(typeof i==`string`&&(i=i.length>0?{type:`text`,value:i}:void 0),i===!1)o.lastIndex=n+1;else{if(c!==n&&f({type:`text`,value:e.value.slice(c,n)}),Array.isArray(i))for(let e of i)f(e);else i&&f(i);c=n+d[0].length,l=!0}if(!o.global)break;d=o.exec(e.value)}return l?(c<e.value.length&&f({type:`text`,value:e.value.slice(c)}),r.children.splice(n,1,...u)):u=[e],n+u.length;function f(e){let t=u[u.length-1];t&&t.type===`text`&&e.type===`text`?t.value+=e.value:u.push(e)}}}function kN(e){if(!Array.isArray(e))throw TypeError(`Expected find and replace tuple or list of tuples`);let t=[],n=!e[0]||Array.isArray(e[0])?e:[e],r=-1;for(;++r<n.length;){let e=n[r];t.push([AN(e[0]),jN(e[1])])}return t}function AN(e){return typeof e==`string`?new RegExp(DN(e),`g`):e}function jN(e){return typeof e==`function`?e:function(){return e}}var MN=`phrasing`,NN=[`autolink`,`link`,`image`,`label`];function PN(){return{transforms:[HN],enter:{literalAutolink:IN,literalAutolinkEmail:LN,literalAutolinkHttp:LN,literalAutolinkWww:LN},exit:{literalAutolink:VN,literalAutolinkEmail:BN,literalAutolinkHttp:RN,literalAutolinkWww:zN}}}function FN(){return{unsafe:[{character:`@`,before:`[+\\-.\\w]`,after:`[\\-.\\w]`,inConstruct:MN,notInConstruct:NN},{character:`.`,before:`[Ww]`,after:`[\\-.\\w]`,inConstruct:MN,notInConstruct:NN},{character:`:`,before:`[ps]`,after:`\\/`,inConstruct:MN,notInConstruct:NN}]}}function IN(e){this.enter({type:`link`,title:null,url:``,children:[],position:void 0},e)}function LN(e){this.config.enter.autolinkProtocol.call(this,e)}function RN(e){this.config.exit.autolinkProtocol.call(this,e)}function zN(e){this.config.exit.data.call(this,e);let t=this.stack[this.stack.length-1];t.type,t.url=`http://`+this.sliceSerialize(e)}function BN(e){this.config.exit.autolinkEmail.call(this,e)}function VN(e){this.exit(e)}function HN(e){ON(e,[[/(?<![\da-z])(https?:\/\/|www(?=\.))([\w-]*\.[\w\-.]*)([^\t\n\r ]*)/gi,UN],[/(?<![\w+\-.@])xmpp:([\w+\-.]+)@([\w-]+(?:\.[\w-]+)+)(\/(?:[\w\-/]|\.(?=[\dA-Za-z]))*)?/g,KN],[/(?<![\w+\-.@])mailto:([\w+\-.]+)@([\w-]+(?:\.[\w-]+)+)/g,GN],[/(?<![\w+\-.]|(?:^|[^\d@A-Za-z])(?:mailto|xmpp):)([\w+\-.]+)@([\w-]+(?:\.[\w-]+)+)/g,WN]],{ignore:[`link`,`linkReference`]})}function UN(e,t,n,r,i){if(!YN(i))return!1;let a=``;if(/^w/i.test(t)&&(n=t+n,t=``,a=`http://`),IO(n.charCodeAt(0))||!qN(n))return!1;let o=JN(n+r),s={type:`link`,title:null,url:a+t+o[0],children:[{type:`text`,value:t+o[0],position:void 0}],position:void 0};return o[1]?[s,{type:`text`,value:o[1],position:void 0}]:s}function WN(e,t,n){return!/[\d\-_]$/.test(n)&&{type:`link`,title:null,url:`mailto:`+t+`@`+n,children:[{type:`text`,value:t+`@`+n,position:void 0}],position:void 0}}function GN(e,t,n){if(/[\d\-_]$/.test(n))return!1;let r=`mailto:`+t+`@`+n;return{type:`link`,title:null,url:r,children:[{type:`text`,value:r,position:void 0}],position:void 0}}function KN(e,t,n,r,i){if(/[\d\-_]$/.test(n)||r&&(!/[A-Za-z]$/.test(r)||i.input.charAt(i.index+e.length)===`@`))return!1;let a=`xmpp:`+t+`@`+n+(r||``);return{type:`link`,title:null,url:a,children:[{type:`text`,value:a,position:void 0}],position:void 0}}function qN(e){let t=e.split(`.`);return!(t.length<2||t[t.length-1]&&(/_/.test(t[t.length-1])||!/[\dA-Za-z]/.test(t[t.length-1]))||t[t.length-2]&&(/_/.test(t[t.length-2])||!/[\dA-Za-z]/.test(t[t.length-2])))}function JN(e){let t=e.length;for(;t>0;){let n=e.charCodeAt(t-1);if(n===33||n===34||n===38||n===39||n===41||n===44||n===46||n===58||n===59||n===60||n===62||n===63||n===93||n===125)t--;else break}if(t===e.length)return[e,void 0];let n=e.slice(t);e=e.slice(0,t);let r=n.indexOf(`)`),i=EN(e,`(`),a=EN(e,`)`);for(;r!==-1&&i>a;)e+=n.slice(0,r+1),n=n.slice(r+1),r=n.indexOf(`)`),a++;return[e,n]}function YN(e){let t=e.input.charCodeAt(e.index-1);return e.index===0||LO(t)||IO(t)}aP.peek=iP;function XN(){this.buffer()}function ZN(e){this.enter({type:`footnoteReference`,identifier:``,label:``},e)}function QN(){this.buffer()}function $N(e){this.enter({type:`footnoteDefinition`,identifier:``,label:``,children:[]},e)}function eP(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=DO(this.sliceSerialize(e)).toLowerCase(),n.label=t}function tP(e){this.exit(e)}function nP(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=DO(this.sliceSerialize(e)).toLowerCase(),n.label=t}function rP(e){this.exit(e)}function iP(){return`[`}function aP(e,t,n,r){let i=n.createTracker(r),a=i.move(`[^`),o=n.enter(`footnoteReference`),s=n.enter(`reference`);return a+=i.move(n.safe(n.associationId(e),{after:`]`,before:a})),s(),o(),a+=i.move(`]`),a}function oP(){return{enter:{gfmFootnoteCallString:XN,gfmFootnoteCall:ZN,gfmFootnoteDefinitionLabelString:QN,gfmFootnoteDefinition:$N},exit:{gfmFootnoteCallString:eP,gfmFootnoteCall:tP,gfmFootnoteDefinitionLabelString:nP,gfmFootnoteDefinition:rP}}}function sP(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:n,footnoteReference:aP},unsafe:[{character:`[`,inConstruct:[`label`,`phrasing`,`reference`]}]};function n(e,n,r,i){let a=r.createTracker(i),o=a.move(`[^`),s=r.enter(`footnoteDefinition`),c=r.enter(`label`);return o+=a.move(r.safe(r.associationId(e),{before:o,after:`]`})),c(),o+=a.move(`]:`),e.children&&e.children.length>0&&(a.shift(4),o+=a.move((t?`
28
+ `:` `)+r.indentLines(r.containerFlow(e,a.current()),t?lP:cP))),s(),o}}function cP(e,t,n){return t===0?e:lP(e,t,n)}function lP(e,t,n){return(n?``:` `)+e}var uP=[`autolink`,`destinationLiteral`,`destinationRaw`,`reference`,`titleQuote`,`titleApostrophe`];hP.attention=gP,hP.peek=_P;function dP(){return{canContainEols:[`delete`],enter:{strikethrough:pP},exit:{strikethrough:mP}}}function fP(){return{handlers:{delete:hP},unsafe:[{character:`~`,inConstruct:`phrasing`,notInConstruct:uP}]}}function pP(e){this.enter({type:`delete`,children:[],position:void 0},e)}function mP(e){this.exit(e)}function hP(e,t,n,r){let i=n.createTracker(r),a=n.stack.includes(`strikethrough`)?`~`:`~~`,o=n.enter(`strikethrough`),s=i.move(a);return s+=n.containerPhrasing(e,{...i.current(),before:s,after:`~`}),s+=i.move(a),o(),s}function gP(){return{construct:`strikethrough`,markers:[`~`],sizes:[2,1]}}function _P(){return`~`}function vP(e){return e.length}function yP(e,t){let n=t||{},r=(n.align||[]).concat(),i=n.stringLength||vP,a=[],o=[],s=[],c=[],l=0,u=-1;for(;++u<e.length;){let t=[],r=[],a=-1;for(e[u].length>l&&(l=e[u].length);++a<e[u].length;){let o=bP(e[u][a]);if(n.alignDelimiters!==!1){let e=i(o);r[a]=e,(c[a]===void 0||e>c[a])&&(c[a]=e)}t.push(o)}o[u]=t,s[u]=r}let d=-1;if(typeof r==`object`&&`length`in r)for(;++d<l;)a[d]=xP(r[d]);else{let e=xP(r);for(;++d<l;)a[d]=e}d=-1;let f=[],p=[];for(;++d<l;){let e=a[d],t=``,r=``;e===99?(t=`:`,r=`:`):e===108?t=`:`:e===114&&(r=`:`);let i=n.alignDelimiters===!1?1:Math.max(1,c[d]-t.length-r.length),o=t+`-`.repeat(i)+r;n.alignDelimiters!==!1&&(i=t.length+i+r.length,i>c[d]&&(c[d]=i),p[d]=i),f[d]=o}o.splice(1,0,f),s.splice(1,0,p),u=-1;let m=[];for(;++u<o.length;){let e=o[u],t=s[u],r=n.fillRows===!1?Math.max(1,o[u===1?0:u].length):l;d=-1;let i=[];for(;++d<r;){let o=e[d]||``,s=``,l=``;if(n.alignDelimiters!==!1){let e=c[d]-(t[d]||0),n=a[d];if(n===114)s=` `.repeat(e);else if(n===99){let t=e/2;e%2?(s=` `.repeat(t+.5),l=` `.repeat(t-.5)):(s=` `.repeat(t),l=s)}else l=` `.repeat(e)}n.delimiterStart!==!1&&!d&&i.push(`|`),n.padding===!1||n.alignDelimiters===!1&&o===``||n.delimiterStart===!1&&!d||i.push(` `),n.alignDelimiters!==!1&&i.push(s),i.push(o),n.alignDelimiters!==!1&&i.push(l),n.padding!==!1&&i.push(` `),(n.delimiterEnd!==!1||d!==r-1)&&i.push(`|`)}m.push(n.delimiterEnd===!1?i.join(``).replace(/ +$/,``):i.join(``))}return m.join(`
29
+ `)}function bP(e){return e==null?``:String(e)}function xP(e){let t=typeof e==`string`?e.codePointAt(0):0;return t===67||t===99?99:t===76||t===108?108:t===82||t===114?114:0}var SP=lM([`break`,`delete`,`emphasis`,`footnote`,`footnoteReference`,`image`,`imageReference`,`inlineCode`,`inlineMath`,`link`,`linkReference`,`mdxJsxTextElement`,`mdxTextExpression`,`strong`,`text`,`textDirective`]);function CP(e,t,n,r){let i=n.enter(`blockquote`),a=n.createTracker(r);a.move(`> `),a.shift(2);let o=n.indentLines(n.containerFlow(e,a.current()),wP);return i(),o}function wP(e,t,n){return`>`+(n?``:` `)+e}function TP(e,t){return EP(e,t.inConstruct,!0)&&!EP(e,t.notInConstruct,!1)}function EP(e,t,n){if(typeof t==`string`&&(t=[t]),!t||t.length===0)return n;let r=-1;for(;++r<t.length;)if(e.includes(t[r]))return!0;return!1}function DP(e,t,n,r){let i=-1;for(;++i<n.unsafe.length;){let e=n.unsafe[i];if(e.character===`
30
+ `&&!e.before&&!e.after&&TP(n.stack,e))return/[\t ]/.test(r.before)?``:` `}return`\\
31
+ `}function OP(e,t){let n=String(e),r=n.indexOf(t),i=r,a=0,o=0;if(typeof t!=`string`)throw TypeError(`Expected substring`);for(;r!==-1;)r===i?++a>o&&(o=a):a=1,i=r+t.length,r=n.indexOf(t,i);return o}function kP(e,t){return!(t.options.fences!==!1||!e.value||e.lang||!/[^\n\r ]/.test(e.value)||/^[\t ]*(?:[\n\r]|$)|(?:^|[\n\r])[\t ]*$/.test(e.value))}function AP(e){let t=e.options.fence||"`";if(t!=="`"&&t!==`~`)throw Error("Cannot serialize code with `"+t+"` for `options.fence`, expected `` ` `` or `~`");return t}function jP(e,t,n,r){let i=AP(n),a=e.value||``;if(kP(e,n)){let e=n.enter(`codeIndented`),t=n.indentLines(a,MP);return e(),t}let o=n.createTracker(r),s=i.repeat(Math.max(OP(a,i)+1,3)),c=n.enter(`codeFenced`),l=i==="`"?`GraveAccent`:`Tilde`,u=o.move(s);if(e.lang){let t=n.enter(`codeFencedLang${l}`);u+=o.move(n.safe(e.lang,{before:u,after:` `,encode:["`"],...o.current()})),t()}if(e.lang&&e.meta){let t=n.enter(`codeFencedMeta${l}`);u+=o.move(` `),u+=o.move(n.safe(e.meta,{before:u,after:`
32
32
  `,encode:["`"],...o.current()})),t()}return u+=o.move(`
33
33
  `),a&&(u+=o.move(a+`
34
- `)),u+=o.move(s),c(),u}function Zx(e,t,n){return(n?``:` `)+e}function Qx(e){let t=e.options.quote||`"`;if(t!==`"`&&t!==`'`)throw Error("Cannot serialize title with `"+t+"` for `options.quote`, expected `\"`, or `'`");return t}function $x(e,t,n,r){let i=Qx(n),a=i===`"`?`Quote`:`Apostrophe`,o=n.enter(`definition`),s=n.enter(`label`),c=n.createTracker(r),l=c.move(`[`);return l+=c.move(n.safe(n.associationId(e),{before:l,after:`]`,...c.current()})),l+=c.move(`]: `),s(),!e.url||/[\0- \u007F]/.test(e.url)?(s=n.enter(`destinationLiteral`),l+=c.move(`<`),l+=c.move(n.safe(e.url,{before:l,after:`>`,...c.current()})),l+=c.move(`>`)):(s=n.enter(`destinationRaw`),l+=c.move(n.safe(e.url,{before:l,after:e.title?` `:`
35
- `,...c.current()}))),s(),e.title&&(s=n.enter(`title${a}`),l+=c.move(` `+i),l+=c.move(n.safe(e.title,{before:l,after:i,...c.current()})),l+=c.move(i),s()),o(),l}function eS(e){let t=e.options.emphasis||`*`;if(t!==`*`&&t!==`_`)throw Error("Cannot serialize emphasis with `"+t+"` for `options.emphasis`, expected `*`, or `_`");return t}function tS(e){let t=e.codePointAt(0);return t===void 0?``:String.fromCodePoint(t)}function nS(e){let t=e.codePointAt(e.length-2);return t!==void 0&&t>65535?e.slice(-2):e.slice(-1)}function rS(e){return`&#x`+e.toString(16).toUpperCase()+`;`}function iS(e,t,n){let r=Rh(e),i=Rh(t);return r===void 0?i===void 0?n===`_`?{inside:!0,outside:!0}:{inside:!1,outside:!1}:i===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:r===1?i===void 0?{inside:!1,outside:!1}:i===1?{inside:!0,outside:!0}:{inside:!1,outside:!1}:i===void 0?{inside:!1,outside:!1}:i===1?{inside:!0,outside:!1}:{inside:!1,outside:!1}}function aS(e){if(e.charCodeAt(0)!==60)return;let t=e.charCodeAt(1);if(t===33){let t=e.charCodeAt(2);return t===45?2:t===91?5:gh(t)?4:void 0}if(t===63)return 3;let n=t===47,r=n?2:1,i=r,a=e.charCodeAt(i);if(!gh(a))return;for(;a===45||_h(a);)a=e.charCodeAt(++i);let o=e.slice(r,i).toLowerCase();return!n&&a!==47&&Lg.includes(o)?1:Ig.includes(o)?6:7}var oS=new Map([[`*`,!1],[`_`,!0]]);function sS(e,t,n){let r=new Set;for(let i of e){let e=n.get(i);if(e&&i.attention&&t.some(e=>e.attention===i.attention))for(let t of e.tokens)r.add(t.attention)}let i=[];for(let t of e)t.attention&&r.delete(t.attention)&&i.push(t.attention);return i.reverse(),i}function cS(e,t,n){let r=[],i=new Map,a=new Map,o=0;for(;o<e.length;){if(!e[o].attention){o++;continue}let s=e[o].value.charAt(0),c=oS.get(s),l=o+1;for(;l<e.length&&e[l].attention&&e[l].value.charAt(0)===s;)l++;let u=o?e[o-1].value:t,d=Rh(u.charCodeAt(u.length-1)),f=Rh((l<e.length?e[l].value:n).charCodeAt(0)),p=!f||f===2&&!!d,m=!d||d===2&&!!f,h={tokens:e.slice(o,l),markers:[],start:0,end:0,open:c?p&&(!!d||!m):p,close:c?m&&(!!f||!p):m,split:c!==void 0};for(let e of h.tokens){i.set(e,[...h.tokens]),a.set(e,h);let t=e.value.length;for(;t--;)h.markers.push(e)}h.end=h.markers.length,r.push(h),o=l}for(dS(r,i),o=-1;++o<e.length;){let t=i.get(e[o]);if(t)return{attention:sS(e,t,a),index:o}}}function lS(e,t){let n=e[t?0:e.length-1];if(!n||n.attention)return;let r=t?tS(n.value):nS(n.value),i=rS(r.codePointAt(0));if(t)n.value=i+n.value.slice(r.length);else{let e=n.value.slice(0,n.value.length-r.length),t=0;for(;e.charCodeAt(e.length-1-t)===92;)t++;t%2&&(e+=`\\`),n.value=e+i}}function uS(e,t,n,r,i){for(let a of n.attention){let o=t.get(a)||a.sequences[0];for(let s of a.sequences){if(s===o)continue;let c=new Map(t);c.set(a,s);let l=_S(e,c,r,i),u=cS(l,r,i);if(!u||u.index>n.index)return{chosen:c,mistake:u,tokens:l}}}}function dS(e,t){let n=new Map;for(let r of e){let e=r.tokens[0].value.charAt(0),i=n.get(e);i||(i=[],n.set(e,i));let a=r.close?i.length:0;for(;a--&&r.start<r.end;){let e=i[a],n=e.end-e.start,o=r.end-r.start;if(r.split?(e.close||r.open)&&o%3&&!((n+o)%3):n!==e.markers.length||n!==o)continue;let s=r.split?n>1&&o>1?2:1:o,c=e.markers.slice(e.end-s,e.end),l=r.markers.slice(r.start,r.start+s),u=c[0],d=l[0];if(u===c[s-1]&&u.value.length===s&&d===l[s-1]&&d.value.length===s&&u.attention===d.attention)t.delete(u),t.delete(d);else{let e=[...new Set([...c,...l])];for(let n of e){let r=t.get(n);r&&r.push(...e)}}e.end-=s,r.start+=s,e.start===e.end&&i.splice(a,1),a=i.length}r.open&&r.start<r.end&&i.push(r)}}function fS(e,t,n){if(t.length===0)throw Error("Cannot serialize `"+e+"` as attention without markers, expected one or more markers");if(n.length===0)throw Error("Cannot serialize `"+e+"` as attention without sizes, expected one or more sizes");for(let t of n)if(!Number.isSafeInteger(t)||t<1)throw Error("Cannot serialize `"+e+"` as attention with `"+t+"` as size, expected positive integer");let r=[];for(let i of t){if(i.length!==1)throw Error("Cannot serialize `"+e+"` as attention with `"+i+"` as marker, expected a single ascii character");if(!Sh(i.charCodeAt(0)))throw Error("Cannot serialize `"+e+"` as attention with `"+i+"` as marker, expected ascii punctuation");for(let e of n)r.push(i.repeat(e))}return r}function pS(e,t,n){let r=t.indexStack,i=e.children||[],a=[],o=-1,s=n.before;r.push(-1);let c=t.createTracker(n);for(;++o<i.length;){let l=i[o],u;if(r[r.length-1]=o,o+1<i.length){let n=t.handle.handlers[i[o+1].type];n&&n.peek&&(n=n.peek),u=n?tS(n(i[o+1],e,t,{before:``,after:``,...c.current()})):``}else u=n.after;let d=a[a.length-1];typeof d==`string`&&(s===`\r`||s===`
36
- `)&&l.type===`html`&&aS(l.value)!==7&&(a[a.length-1]=d.replace(/(\r?\n|\r)$/,` `),s=` `,c=t.createTracker(n),c.move(vS(a,n.before,n.after)));let f=t.handle.handlers[l.type];if(f&&f.attention){let e=mS(l,f.attention,t,c);if(!e)continue;a.push(e),s=nS(e.sequences[0])}else{let n=t.handle(l,e,t,{...c.current(),after:u,before:s});if(!n)continue;c.move(n),a.push(n),s=nS(n)}}return r.pop(),a}function mS(e,t,n,r){let{construct:i,markers:a,sizes:o}=t(e,n),s=fS(e.type,a,o),c=s[0],l=n.enter(i),u=n.createTracker(r.current());u.move(c);let d=pS(e,n,{...u.current(),before:c,after:c});if(l(),d.length!==0)return r.move(c),r.move(vS(d,c,c)),r.move(c),{children:d,sequences:s}}function hS(e,t,n,r){let i=_S(e,t,n,r),a=cS(i,n,r);for(;a;){let o=uS(e,t,a,n,r);if(!o)return;t=o.chosen,i=o.tokens,a=o.mistake}return i}function gS(e,t,n,r){let i=n,a=-1;for(;++a<e.length;){let o=e[a];if(typeof o==`string`){i=``;continue}let s=a===e.length-1?r:``,c=o.sequences.find(function(t){let r=t.charAt(0);return r!==i.charAt(0)&&r!==s.charAt(0)||e.length===1&&oS.has(r)&&t.length>n.length})||o.sequences[0];c!==o.sequences[0]&&t.set(o,c),gS(o.children,t,c,c),i=c}}function _S(e,t,n,r){let i=[],a,o=nS(n),s=-1;for(;++s<e.length;){let n=e[s];if(typeof n==`string`){let e={value:n,attention:void 0};a&&a===tS(n)&&lS([e],!0),a=void 0,i.push(e),e.value&&(o=nS(e.value));continue}let c=t.get(n)||n.sequences[0],l=c.charAt(0),u=e[s+1],d=o,f=tS(u===void 0?r:typeof u==`string`?u:t.get(u)||u.sequences[0]),p=_S(n.children,t,c,c),m=p[0].value,h=iS(d.charCodeAt(d.length-1),m.charCodeAt(0),l);h.inside&&lS(p,!0);let g=nS(p[p.length-1].value),_=iS(f.charCodeAt(0),g.charCodeAt(g.length-1),l);_.inside&&lS(p,!1),h.outside&&d!==`
37
- `&&d!==`\r`&&lS(i,!1),_.outside&&(a=f),i.push({value:c,attention:n},...p,{value:c,attention:n}),o=c.charAt(c.length-1)}return i}function vS(e,t,n){let r=new Map;gS(e,r,t,n);let i=(r.size>0?hS(e,r,t,n):void 0)||hS(e,new Map,t,n)||_S(e,new Map,t,n),a=``;for(let e of i)a+=e.value;return a}yS.attention=bS,yS.peek=xS;function yS(e,t,n,r){let i=n.enter(`phrasing`),a=mS(e,bS,n,n.createTracker(r)),o=a?vS([a],r.before,r.after):``;return i(),o}function bS(e,t){return{construct:`emphasis`,markers:eS(t)===`*`?[`*`,`_`]:[`_`,`*`],sizes:[1]}}function xS(e,t,n){return n.options.emphasis||`*`}function SS(e,t){let n=!1;return ly(e,function(e){if(`value`in e&&/\r?\n|\r/.test(e.value)||e.type===`break`)return n=!0,!1}),!!((!e.depth||e.depth<3)&&nh(e)&&(t.options.setext||n))}function CS(e,t,n,r){let i=Math.max(Math.min(6,e.depth||1),1),a=n.createTracker(r);if(SS(e,n)){let t=n.enter(`headingSetext`),r=n.enter(`phrasing`),o=n.containerPhrasing(e,{...a.current(),before:`
34
+ `)),u+=o.move(s),c(),u}function MP(e,t,n){return(n?``:` `)+e}function NP(e){let t=e.options.quote||`"`;if(t!==`"`&&t!==`'`)throw Error("Cannot serialize title with `"+t+"` for `options.quote`, expected `\"`, or `'`");return t}function PP(e,t,n,r){let i=NP(n),a=i===`"`?`Quote`:`Apostrophe`,o=n.enter(`definition`),s=n.enter(`label`),c=n.createTracker(r),l=c.move(`[`);return l+=c.move(n.safe(n.associationId(e),{before:l,after:`]`,...c.current()})),l+=c.move(`]: `),s(),!e.url||/[\0- \u007F]/.test(e.url)?(s=n.enter(`destinationLiteral`),l+=c.move(`<`),l+=c.move(n.safe(e.url,{before:l,after:`>`,...c.current()})),l+=c.move(`>`)):(s=n.enter(`destinationRaw`),l+=c.move(n.safe(e.url,{before:l,after:e.title?` `:`
35
+ `,...c.current()}))),s(),e.title&&(s=n.enter(`title${a}`),l+=c.move(` `+i),l+=c.move(n.safe(e.title,{before:l,after:i,...c.current()})),l+=c.move(i),s()),o(),l}function FP(e){let t=e.options.emphasis||`*`;if(t!==`*`&&t!==`_`)throw Error("Cannot serialize emphasis with `"+t+"` for `options.emphasis`, expected `*`, or `_`");return t}function IP(e){let t=e.codePointAt(0);return t===void 0?``:String.fromCodePoint(t)}function LP(e){let t=e.codePointAt(e.length-2);return t!==void 0&&t>65535?e.slice(-2):e.slice(-1)}function RP(e){return`&#x`+e.toString(16).toUpperCase()+`;`}function zP(e,t,n){let r=XO(e),i=XO(t);return r===void 0?i===void 0?n===`_`?{inside:!0,outside:!0}:{inside:!1,outside:!1}:i===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:r===1?i===void 0?{inside:!1,outside:!1}:i===1?{inside:!0,outside:!0}:{inside:!1,outside:!1}:i===void 0?{inside:!1,outside:!1}:i===1?{inside:!0,outside:!1}:{inside:!1,outside:!1}}function BP(e){if(e.charCodeAt(0)!==60)return;let t=e.charCodeAt(1);if(t===33){let t=e.charCodeAt(2);return t===45?2:t===91?5:OO(t)?4:void 0}if(t===63)return 3;let n=t===47,r=n?2:1,i=r,a=e.charCodeAt(i);if(!OO(a))return;for(;a===45||kO(a);)a=e.charCodeAt(++i);let o=e.slice(r,i).toLowerCase();return!n&&a!==47&&Yk.includes(o)?1:Jk.includes(o)?6:7}var VP=new Map([[`*`,!1],[`_`,!0]]);function HP(e,t,n){let r=new Set;for(let i of e){let e=n.get(i);if(e&&i.attention&&t.some(e=>e.attention===i.attention))for(let t of e.tokens)r.add(t.attention)}let i=[];for(let t of e)t.attention&&r.delete(t.attention)&&i.push(t.attention);return i.reverse(),i}function UP(e,t,n){let r=[],i=new Map,a=new Map,o=0;for(;o<e.length;){if(!e[o].attention){o++;continue}let s=e[o].value.charAt(0),c=VP.get(s),l=o+1;for(;l<e.length&&e[l].attention&&e[l].value.charAt(0)===s;)l++;let u=o?e[o-1].value:t,d=XO(u.charCodeAt(u.length-1)),f=XO((l<e.length?e[l].value:n).charCodeAt(0)),p=!f||f===2&&!!d,m=!d||d===2&&!!f,h={tokens:e.slice(o,l),markers:[],start:0,end:0,open:c?p&&(!!d||!m):p,close:c?m&&(!!f||!p):m,split:c!==void 0};for(let e of h.tokens){i.set(e,[...h.tokens]),a.set(e,h);let t=e.value.length;for(;t--;)h.markers.push(e)}h.end=h.markers.length,r.push(h),o=l}for(KP(r,i),o=-1;++o<e.length;){let t=i.get(e[o]);if(t)return{attention:HP(e,t,a),index:o}}}function WP(e,t){let n=e[t?0:e.length-1];if(!n||n.attention)return;let r=t?IP(n.value):LP(n.value),i=RP(r.codePointAt(0));if(t)n.value=i+n.value.slice(r.length);else{let e=n.value.slice(0,n.value.length-r.length),t=0;for(;e.charCodeAt(e.length-1-t)===92;)t++;t%2&&(e+=`\\`),n.value=e+i}}function GP(e,t,n,r,i){for(let a of n.attention){let o=t.get(a)||a.sequences[0];for(let s of a.sequences){if(s===o)continue;let c=new Map(t);c.set(a,s);let l=QP(e,c,r,i),u=UP(l,r,i);if(!u||u.index>n.index)return{chosen:c,mistake:u,tokens:l}}}}function KP(e,t){let n=new Map;for(let r of e){let e=r.tokens[0].value.charAt(0),i=n.get(e);i||(i=[],n.set(e,i));let a=r.close?i.length:0;for(;a--&&r.start<r.end;){let e=i[a],n=e.end-e.start,o=r.end-r.start;if(r.split?(e.close||r.open)&&o%3&&!((n+o)%3):n!==e.markers.length||n!==o)continue;let s=r.split?n>1&&o>1?2:1:o,c=e.markers.slice(e.end-s,e.end),l=r.markers.slice(r.start,r.start+s),u=c[0],d=l[0];if(u===c[s-1]&&u.value.length===s&&d===l[s-1]&&d.value.length===s&&u.attention===d.attention)t.delete(u),t.delete(d);else{let e=[...new Set([...c,...l])];for(let n of e){let r=t.get(n);r&&r.push(...e)}}e.end-=s,r.start+=s,e.start===e.end&&i.splice(a,1),a=i.length}r.open&&r.start<r.end&&i.push(r)}}function qP(e,t,n){if(t.length===0)throw Error("Cannot serialize `"+e+"` as attention without markers, expected one or more markers");if(n.length===0)throw Error("Cannot serialize `"+e+"` as attention without sizes, expected one or more sizes");for(let t of n)if(!Number.isSafeInteger(t)||t<1)throw Error("Cannot serialize `"+e+"` as attention with `"+t+"` as size, expected positive integer");let r=[];for(let i of t){if(i.length!==1)throw Error("Cannot serialize `"+e+"` as attention with `"+i+"` as marker, expected a single ascii character");if(!PO(i.charCodeAt(0)))throw Error("Cannot serialize `"+e+"` as attention with `"+i+"` as marker, expected ascii punctuation");for(let e of n)r.push(i.repeat(e))}return r}function JP(e,t,n){let r=t.indexStack,i=e.children||[],a=[],o=-1,s=n.before;r.push(-1);let c=t.createTracker(n);for(;++o<i.length;){let l=i[o],u;if(r[r.length-1]=o,o+1<i.length){let n=t.handle.handlers[i[o+1].type];n&&n.peek&&(n=n.peek),u=n?IP(n(i[o+1],e,t,{before:``,after:``,...c.current()})):``}else u=n.after;let d=a[a.length-1];typeof d==`string`&&(s===`\r`||s===`
36
+ `)&&l.type===`html`&&BP(l.value)!==7&&(a[a.length-1]=d.replace(/(\r?\n|\r)$/,` `),s=` `,c=t.createTracker(n),c.move($P(a,n.before,n.after)));let f=t.handle.handlers[l.type];if(f&&f.attention){let e=YP(l,f.attention,t,c);if(!e)continue;a.push(e),s=LP(e.sequences[0])}else{let n=t.handle(l,e,t,{...c.current(),after:u,before:s});if(!n)continue;c.move(n),a.push(n),s=LP(n)}}return r.pop(),a}function YP(e,t,n,r){let{construct:i,markers:a,sizes:o}=t(e,n),s=qP(e.type,a,o),c=s[0],l=n.enter(i),u=n.createTracker(r.current());u.move(c);let d=JP(e,n,{...u.current(),before:c,after:c});if(l(),d.length!==0)return r.move(c),r.move($P(d,c,c)),r.move(c),{children:d,sequences:s}}function XP(e,t,n,r){let i=QP(e,t,n,r),a=UP(i,n,r);for(;a;){let o=GP(e,t,a,n,r);if(!o)return;t=o.chosen,i=o.tokens,a=o.mistake}return i}function ZP(e,t,n,r){let i=n,a=-1;for(;++a<e.length;){let o=e[a];if(typeof o==`string`){i=``;continue}let s=a===e.length-1?r:``,c=o.sequences.find(function(t){let r=t.charAt(0);return r!==i.charAt(0)&&r!==s.charAt(0)||e.length===1&&VP.has(r)&&t.length>n.length})||o.sequences[0];c!==o.sequences[0]&&t.set(o,c),ZP(o.children,t,c,c),i=c}}function QP(e,t,n,r){let i=[],a,o=LP(n),s=-1;for(;++s<e.length;){let n=e[s];if(typeof n==`string`){let e={value:n,attention:void 0};a&&a===IP(n)&&WP([e],!0),a=void 0,i.push(e),e.value&&(o=LP(e.value));continue}let c=t.get(n)||n.sequences[0],l=c.charAt(0),u=e[s+1],d=o,f=IP(u===void 0?r:typeof u==`string`?u:t.get(u)||u.sequences[0]),p=QP(n.children,t,c,c),m=p[0].value,h=zP(d.charCodeAt(d.length-1),m.charCodeAt(0),l);h.inside&&WP(p,!0);let g=LP(p[p.length-1].value),_=zP(f.charCodeAt(0),g.charCodeAt(g.length-1),l);_.inside&&WP(p,!1),h.outside&&d!==`
37
+ `&&d!==`\r`&&WP(i,!1),_.outside&&(a=f),i.push({value:c,attention:n},...p,{value:c,attention:n}),o=c.charAt(c.length-1)}return i}function $P(e,t,n){let r=new Map;ZP(e,r,t,n);let i=(r.size>0?XP(e,r,t,n):void 0)||XP(e,new Map,t,n)||QP(e,new Map,t,n),a=``;for(let e of i)a+=e.value;return a}eF.attention=tF,eF.peek=nF;function eF(e,t,n,r){let i=n.enter(`phrasing`),a=YP(e,tF,n,n.createTracker(r)),o=a?$P([a],r.before,r.after):``;return i(),o}function tF(e,t){return{construct:`emphasis`,markers:FP(t)===`*`?[`*`,`_`]:[`_`,`*`],sizes:[1]}}function nF(e,t,n){return n.options.emphasis||`*`}function rF(e,t){let n=!1;return xM(e,function(e){if(`value`in e&&/\r?\n|\r/.test(e.value)||e.type===`break`)return n=!0,!1}),!!((!e.depth||e.depth<3)&&mO(e)&&(t.options.setext||n))}function iF(e,t,n,r){let i=Math.max(Math.min(6,e.depth||1),1),a=n.createTracker(r);if(rF(e,n)){let t=n.enter(`headingSetext`),r=n.enter(`phrasing`),o=n.containerPhrasing(e,{...a.current(),before:`
38
38
  `,after:`
39
39
  `});return r(),t(),o+`
40
40
  `+(i===1?`=`:`-`).repeat(o.length-(Math.max(o.lastIndexOf(`\r`),o.lastIndexOf(`
41
41
  `))+1))}let o=`#`.repeat(i),s=n.enter(`headingAtx`),c=n.enter(`phrasing`);a.move(o+` `);let l=n.containerPhrasing(e,{before:`# `,after:`
42
- `,...a.current()}),u=l.charCodeAt(0);return(u===9||u===32)&&(l=rS(u)+l.slice(1)),l=l?o+` `+l:o,n.options.closeAtx&&(l+=` `+o),c(),s(),l}wS.peek=TS;function wS(e){return e.value||``}function TS(){return`<`}ES.peek=DS;function ES(e,t,n,r){let i=Qx(n),a=i===`"`?`Quote`:`Apostrophe`,o=n.enter(`image`),s=n.enter(`label`),c=n.createTracker(r),l=c.move(`![`);return l+=c.move(n.safe(e.alt,{before:l,after:`]`,...c.current()})),l+=c.move(`](`),s(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(s=n.enter(`destinationLiteral`),l+=c.move(`<`),l+=c.move(n.safe(e.url,{before:l,after:`>`,...c.current()})),l+=c.move(`>`)):(s=n.enter(`destinationRaw`),l+=c.move(n.safe(e.url,{before:l,after:e.title?` `:`)`,...c.current()}))),s(),e.title&&(s=n.enter(`title${a}`),l+=c.move(` `+i),l+=c.move(n.safe(e.title,{before:l,after:i,...c.current()})),l+=c.move(i),s()),l+=c.move(`)`),o(),l}function DS(){return`!`}OS.peek=kS;function OS(e,t,n,r){let i=e.referenceType,a=n.enter(`imageReference`),o=n.enter(`label`),s=n.createTracker(r),c=s.move(`![`),l=n.safe(e.alt,{before:c,after:`]`,...s.current()});c+=s.move(l+`][`),o();let u=n.stack;n.stack=u.filter(function(e){return e!==`phrasing`}),o=n.enter(`reference`);let d=n.safe(n.associationId(e),{before:c,after:`]`,...s.current()});return o(),n.stack=u,a(),i===`full`||!l||l!==d?c+=s.move(d+`]`):i===`shortcut`?c=c.slice(0,-1):c+=s.move(`]`),c}function kS(){return`!`}AS.peek=jS;function AS(e,t,n){let r=e.value||``,i="`",a=-1;for(;RegExp("(^|[^`])"+i+"([^`]|$)").test(r);)i+="`";for(/[^\n\r ]/.test(r)&&(/^[\n\r ]/.test(r)&&/[\n\r ]$/.test(r)||/^`|`$/.test(r))&&(r=` `+r+` `);++a<n.unsafe.length;){let e=n.unsafe[a],t=n.compilePattern(e);if(!e.atBreak)continue;let i;for(;i=t.exec(r);){let e=i.index;r.charCodeAt(e)===10&&r.charCodeAt(e-1)===13&&e--,r=r.slice(0,e)+` `+r.slice(i.index+1)}}return i+r+i}function jS(){return"`"}function MS(e,t){let n=nh(e);return!(t.options.resourceLink||!e.url||e.title||!e.children||e.children.length!==1||e.children[0].type!==`text`||n!==e.url&&`mailto:`+n!==e.url||!/^[a-z][+\-.a-z]+:/i.test(e.url)||/[\0- <>\u007F]/.test(e.url))}NS.peek=PS;function NS(e,t,n,r){let i=Qx(n),a=i===`"`?`Quote`:`Apostrophe`,o=n.createTracker(r);if(MS(e,n)){let t=n.stack;n.stack=t.filter(function(e){return e!==`phrasing`});let r=n.enter(`autolink`),i=o.move(`<`);return i+=o.move(n.containerPhrasing(e,{before:i,after:`>`,...o.current()})),i+=o.move(`>`),r(),n.stack=t,i}let s=n.enter(`link`),c=n.enter(`label`),l=o.move(`[`),u=n.containerPhrasing(e,{before:l,after:`](`,...o.current()});l+=o.move(u),c(),l+=o.move(`](`);let d=/[\0- \u007F]/.test(e.url),f=r.before.charAt(r.before.length-1),p=e.title||void 0;if(!p&&!d&&(f===`
43
- `||f===`\r`)){let e=0;for(;e<u.length&&u.charCodeAt(e)!==93;)e+=u.charCodeAt(e)===92?2:1;u.charCodeAt(e+1)===58&&(p=``)}return!e.url&&typeof p==`string`||d?(c=n.enter(`destinationLiteral`),l+=o.move(`<`),l+=o.move(n.safe(e.url,{before:l,after:`>`,...o.current()})),l+=o.move(`>`)):(c=n.enter(`destinationRaw`),l+=o.move(n.safe(e.url,{before:l,after:typeof p==`string`?` `:`)`,...o.current()}))),c(),typeof p==`string`&&(c=n.enter(`title${a}`),l+=o.move(` `+i),l+=o.move(n.safe(p,{before:l,after:i,...o.current()})),l+=o.move(i),c()),l+=o.move(`)`),s(),l}function PS(e,t,n){return MS(e,n)?`<`:`[`}FS.peek=IS;function FS(e,t,n,r){let i=e.referenceType,a=n.enter(`linkReference`),o=n.enter(`label`),s=n.createTracker(r),c=s.move(`[`),l=n.containerPhrasing(e,{before:c,after:`]`,...s.current()});c+=s.move(l+`][`),o();let u=n.stack;n.stack=u.filter(function(e){return e!==`phrasing`}),o=n.enter(`reference`);let d=n.safe(n.associationId(e),{before:c,after:`]`,...s.current()});return o(),n.stack=u,a(),i===`full`||!l||l!==d?c+=s.move(d+`]`):i===`shortcut`?c=c.slice(0,-1):c+=s.move(`]`),c}function IS(){return`[`}function LS(e){let t=e.options.bullet||`*`;if(t!==`*`&&t!==`+`&&t!==`-`)throw Error("Cannot serialize items with `"+t+"` for `options.bullet`, expected `*`, `+`, or `-`");return t}function RS(e){let t=LS(e),n=e.options.bulletOther;if(!n)return t===`*`?`-`:`*`;if(n!==`*`&&n!==`+`&&n!==`-`)throw Error("Cannot serialize items with `"+n+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(n===t)throw Error("Expected `bullet` (`"+t+"`) and `bulletOther` (`"+n+"`) to be different");return n}function zS(e){let t=e.options.bulletOrdered||`.`;if(t!==`.`&&t!==`)`)throw Error("Cannot serialize items with `"+t+"` for `options.bulletOrdered`, expected `.` or `)`");return t}function BS(e){let t=e.options.rule||`*`;if(t!==`*`&&t!==`-`&&t!==`_`)throw Error("Cannot serialize rules with `"+t+"` for `options.rule`, expected `*`, `-`, or `_`");return t}function VS(e,t,n,r){let i=n.enter(`list`),a=n.bulletCurrent,o=e.ordered?zS(n):LS(n),s=e.ordered?o===`.`?`)`:`.`:RS(n),c=t&&n.bulletLastUsed?o===n.bulletLastUsed:!1;if(!e.ordered){let t=e.children?e.children[0]:void 0;if(o!==`*`&&o!==`-`||!t||t.children&&t.children[0]||n.stack[n.stack.length-1]!==`list`||n.stack[n.stack.length-2]!==`listItem`||n.stack[n.stack.length-3]!==`list`||n.stack[n.stack.length-4]!==`listItem`||n.indexStack[n.indexStack.length-1]!==0||n.indexStack[n.indexStack.length-2]!==0||n.indexStack[n.indexStack.length-3]!==0||(c=!0),BS(n)===o&&t){let t=-1;for(;++t<e.children.length;){let n=e.children[t];if(n&&n.type===`listItem`&&n.children&&n.children[0]&&n.children[0].type===`thematicBreak`){c=!0;break}}}}c&&(o=s),n.bulletCurrent=o;let l=n.containerFlow(e,r);return n.bulletLastUsed=o,n.bulletCurrent=a,i(),l}function HS(e){let t=e.options.listItemIndent||`one`;if(t!==`tab`&&t!==`one`&&t!==`mixed`)throw Error("Cannot serialize items with `"+t+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return t}function US(e,t,n,r){let i=HS(n),a=n.bulletCurrent||LS(n);t&&t.type===`list`&&t.ordered&&(a=(typeof t.start==`number`&&t.start>-1?t.start:1)+(n.options.incrementListMarker===!1?0:t.children.indexOf(e))+a);let o=a.length+1;(i===`tab`||i===`mixed`&&(t&&t.type===`list`&&t.spread||e.spread))&&(o=Math.ceil(o/4)*4);let s=n.createTracker(r);s.move(a+` `.repeat(o-a.length)),s.shift(o);let c=n.enter(`listItem`),l=n.indentLines(n.containerFlow(e,s.current()),u);return c(),l;function u(e,t,n){return t?(n?``:` `.repeat(o))+e:(n?a:a+` `.repeat(o-a.length))+e}}function WS(e,t,n,r){let i=n.enter(`paragraph`),a=n.enter(`phrasing`),o=n.containerPhrasing(e,r);return a(),i(),o}function GS(e,t,n,r){if(!e.children.some(function(e){return Vx(e)}))return n.containerFlow(e,r);let i=n.enter(`phrasing`),a=n.containerPhrasing(e,r);return i(),a}function KS(e){let t=e.options.strong||`*`;if(t!==`*`&&t!==`_`)throw Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}qS.attention=JS,qS.peek=YS;function qS(e,t,n,r){let i=n.enter(`phrasing`),a=mS(e,JS,n,n.createTracker(r)),o=a?vS([a],r.before,r.after):``;return i(),o}function JS(e,t){return{construct:`strong`,markers:KS(t)===`*`?[`*`,`_`]:[`_`,`*`],sizes:[2]}}function YS(e,t,n){return n.options.strong||`*`}function XS(e,t,n,r){let i=t?t.children:[],a=n.indexStack[n.indexStack.length-1];return n.safe(e.value,{...r,afterNode:i[a+1],beforeNode:i[a-1]})}function ZS(e){let t=e.options.ruleRepetition||3;if(t<3)throw Error("Cannot serialize rules with repetition `"+t+"` for `options.ruleRepetition`, expected `3` or more");return t}function QS(e,t,n){let r=(BS(n)+(n.options.ruleSpaces?` `:``)).repeat(ZS(n));return n.options.ruleSpaces?r.slice(0,-1):r}var $S={blockquote:Hx,break:Kx,code:Xx,definition:$x,emphasis:yS,hardBreak:Kx,heading:CS,html:wS,image:ES,imageReference:OS,inlineCode:AS,link:NS,linkReference:FS,list:VS,listItem:US,paragraph:WS,root:GS,strong:qS,text:XS,thematicBreak:QS};function eC(){return{enter:{table:tC,tableData:aC,tableHeader:aC,tableRow:rC},exit:{codeText:oC,table:nC,tableData:iC,tableHeader:iC,tableRow:iC}}}function tC(e){let t=e._align;this.enter({type:`table`,align:t.map(function(e){return e===`none`?null:e}),children:[],position:void 0},e),this.data.inTable=!0}function nC(e){this.exit(e),this.data.inTable=void 0}function rC(e){this.enter({type:`tableRow`,children:[],position:void 0},e)}function iC(e){this.exit(e)}function aC(e){this.enter({type:`tableCell`,children:[],position:void 0},e)}function oC(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,sC));let n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function sC(e,t){return t===`|`?t:e}function cC(e){let{tableCellPadding:t,tablePipeAlign:n,stringLength:r}=e||{},i=t?` `:`|`;return{handlers:{inlineCode:d,table:a,tableCell:s,tableRow:o},join:[lC],unsafe:[{character:`\r`,inConstruct:`tableCell`},{character:`
42
+ `,...a.current()}),u=l.charCodeAt(0);return(u===9||u===32)&&(l=RP(u)+l.slice(1)),l=l?o+` `+l:o,n.options.closeAtx&&(l+=` `+o),c(),s(),l}aF.peek=oF;function aF(e){return e.value||``}function oF(){return`<`}sF.peek=cF;function sF(e,t,n,r){let i=NP(n),a=i===`"`?`Quote`:`Apostrophe`,o=n.enter(`image`),s=n.enter(`label`),c=n.createTracker(r),l=c.move(`![`);return l+=c.move(n.safe(e.alt,{before:l,after:`]`,...c.current()})),l+=c.move(`](`),s(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(s=n.enter(`destinationLiteral`),l+=c.move(`<`),l+=c.move(n.safe(e.url,{before:l,after:`>`,...c.current()})),l+=c.move(`>`)):(s=n.enter(`destinationRaw`),l+=c.move(n.safe(e.url,{before:l,after:e.title?` `:`)`,...c.current()}))),s(),e.title&&(s=n.enter(`title${a}`),l+=c.move(` `+i),l+=c.move(n.safe(e.title,{before:l,after:i,...c.current()})),l+=c.move(i),s()),l+=c.move(`)`),o(),l}function cF(){return`!`}lF.peek=uF;function lF(e,t,n,r){let i=e.referenceType,a=n.enter(`imageReference`),o=n.enter(`label`),s=n.createTracker(r),c=s.move(`![`),l=n.safe(e.alt,{before:c,after:`]`,...s.current()});c+=s.move(l+`][`),o();let u=n.stack;n.stack=u.filter(function(e){return e!==`phrasing`}),o=n.enter(`reference`);let d=n.safe(n.associationId(e),{before:c,after:`]`,...s.current()});return o(),n.stack=u,a(),i===`full`||!l||l!==d?c+=s.move(d+`]`):i===`shortcut`?c=c.slice(0,-1):c+=s.move(`]`),c}function uF(){return`!`}dF.peek=fF;function dF(e,t,n){let r=e.value||``,i="`",a=-1;for(;RegExp("(^|[^`])"+i+"([^`]|$)").test(r);)i+="`";for(/[^\n\r ]/.test(r)&&(/^[\n\r ]/.test(r)&&/[\n\r ]$/.test(r)||/^`|`$/.test(r))&&(r=` `+r+` `);++a<n.unsafe.length;){let e=n.unsafe[a],t=n.compilePattern(e);if(!e.atBreak)continue;let i;for(;i=t.exec(r);){let e=i.index;r.charCodeAt(e)===10&&r.charCodeAt(e-1)===13&&e--,r=r.slice(0,e)+` `+r.slice(i.index+1)}}return i+r+i}function fF(){return"`"}function pF(e,t){let n=mO(e);return!(t.options.resourceLink||!e.url||e.title||!e.children||e.children.length!==1||e.children[0].type!==`text`||n!==e.url&&`mailto:`+n!==e.url||!/^[a-z][+\-.a-z]+:/i.test(e.url)||/[\0- <>\u007F]/.test(e.url))}mF.peek=hF;function mF(e,t,n,r){let i=NP(n),a=i===`"`?`Quote`:`Apostrophe`,o=n.createTracker(r);if(pF(e,n)){let t=n.stack;n.stack=t.filter(function(e){return e!==`phrasing`});let r=n.enter(`autolink`),i=o.move(`<`);return i+=o.move(n.containerPhrasing(e,{before:i,after:`>`,...o.current()})),i+=o.move(`>`),r(),n.stack=t,i}let s=n.enter(`link`),c=n.enter(`label`),l=o.move(`[`),u=n.containerPhrasing(e,{before:l,after:`](`,...o.current()});l+=o.move(u),c(),l+=o.move(`](`);let d=/[\0- \u007F]/.test(e.url),f=r.before.charAt(r.before.length-1),p=e.title||void 0;if(!p&&!d&&(f===`
43
+ `||f===`\r`)){let e=0;for(;e<u.length&&u.charCodeAt(e)!==93;)e+=u.charCodeAt(e)===92?2:1;u.charCodeAt(e+1)===58&&(p=``)}return!e.url&&typeof p==`string`||d?(c=n.enter(`destinationLiteral`),l+=o.move(`<`),l+=o.move(n.safe(e.url,{before:l,after:`>`,...o.current()})),l+=o.move(`>`)):(c=n.enter(`destinationRaw`),l+=o.move(n.safe(e.url,{before:l,after:typeof p==`string`?` `:`)`,...o.current()}))),c(),typeof p==`string`&&(c=n.enter(`title${a}`),l+=o.move(` `+i),l+=o.move(n.safe(p,{before:l,after:i,...o.current()})),l+=o.move(i),c()),l+=o.move(`)`),s(),l}function hF(e,t,n){return pF(e,n)?`<`:`[`}gF.peek=_F;function gF(e,t,n,r){let i=e.referenceType,a=n.enter(`linkReference`),o=n.enter(`label`),s=n.createTracker(r),c=s.move(`[`),l=n.containerPhrasing(e,{before:c,after:`]`,...s.current()});c+=s.move(l+`][`),o();let u=n.stack;n.stack=u.filter(function(e){return e!==`phrasing`}),o=n.enter(`reference`);let d=n.safe(n.associationId(e),{before:c,after:`]`,...s.current()});return o(),n.stack=u,a(),i===`full`||!l||l!==d?c+=s.move(d+`]`):i===`shortcut`?c=c.slice(0,-1):c+=s.move(`]`),c}function _F(){return`[`}function vF(e){let t=e.options.bullet||`*`;if(t!==`*`&&t!==`+`&&t!==`-`)throw Error("Cannot serialize items with `"+t+"` for `options.bullet`, expected `*`, `+`, or `-`");return t}function yF(e){let t=vF(e),n=e.options.bulletOther;if(!n)return t===`*`?`-`:`*`;if(n!==`*`&&n!==`+`&&n!==`-`)throw Error("Cannot serialize items with `"+n+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(n===t)throw Error("Expected `bullet` (`"+t+"`) and `bulletOther` (`"+n+"`) to be different");return n}function bF(e){let t=e.options.bulletOrdered||`.`;if(t!==`.`&&t!==`)`)throw Error("Cannot serialize items with `"+t+"` for `options.bulletOrdered`, expected `.` or `)`");return t}function xF(e){let t=e.options.rule||`*`;if(t!==`*`&&t!==`-`&&t!==`_`)throw Error("Cannot serialize rules with `"+t+"` for `options.rule`, expected `*`, `-`, or `_`");return t}function SF(e,t,n,r){let i=n.enter(`list`),a=n.bulletCurrent,o=e.ordered?bF(n):vF(n),s=e.ordered?o===`.`?`)`:`.`:yF(n),c=t&&n.bulletLastUsed?o===n.bulletLastUsed:!1;if(!e.ordered){let t=e.children?e.children[0]:void 0;if(o!==`*`&&o!==`-`||!t||t.children&&t.children[0]||n.stack[n.stack.length-1]!==`list`||n.stack[n.stack.length-2]!==`listItem`||n.stack[n.stack.length-3]!==`list`||n.stack[n.stack.length-4]!==`listItem`||n.indexStack[n.indexStack.length-1]!==0||n.indexStack[n.indexStack.length-2]!==0||n.indexStack[n.indexStack.length-3]!==0||(c=!0),xF(n)===o&&t){let t=-1;for(;++t<e.children.length;){let n=e.children[t];if(n&&n.type===`listItem`&&n.children&&n.children[0]&&n.children[0].type===`thematicBreak`){c=!0;break}}}}c&&(o=s),n.bulletCurrent=o;let l=n.containerFlow(e,r);return n.bulletLastUsed=o,n.bulletCurrent=a,i(),l}function CF(e){let t=e.options.listItemIndent||`one`;if(t!==`tab`&&t!==`one`&&t!==`mixed`)throw Error("Cannot serialize items with `"+t+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return t}function wF(e,t,n,r){let i=CF(n),a=n.bulletCurrent||vF(n);t&&t.type===`list`&&t.ordered&&(a=(typeof t.start==`number`&&t.start>-1?t.start:1)+(n.options.incrementListMarker===!1?0:t.children.indexOf(e))+a);let o=a.length+1;(i===`tab`||i===`mixed`&&(t&&t.type===`list`&&t.spread||e.spread))&&(o=Math.ceil(o/4)*4);let s=n.createTracker(r);s.move(a+` `.repeat(o-a.length)),s.shift(o);let c=n.enter(`listItem`),l=n.indentLines(n.containerFlow(e,s.current()),u);return c(),l;function u(e,t,n){return t?(n?``:` `.repeat(o))+e:(n?a:a+` `.repeat(o-a.length))+e}}function TF(e,t,n,r){let i=n.enter(`paragraph`),a=n.enter(`phrasing`),o=n.containerPhrasing(e,r);return a(),i(),o}function EF(e,t,n,r){if(!e.children.some(function(e){return SP(e)}))return n.containerFlow(e,r);let i=n.enter(`phrasing`),a=n.containerPhrasing(e,r);return i(),a}function DF(e){let t=e.options.strong||`*`;if(t!==`*`&&t!==`_`)throw Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}OF.attention=kF,OF.peek=AF;function OF(e,t,n,r){let i=n.enter(`phrasing`),a=YP(e,kF,n,n.createTracker(r)),o=a?$P([a],r.before,r.after):``;return i(),o}function kF(e,t){return{construct:`strong`,markers:DF(t)===`*`?[`*`,`_`]:[`_`,`*`],sizes:[2]}}function AF(e,t,n){return n.options.strong||`*`}function jF(e,t,n,r){let i=t?t.children:[],a=n.indexStack[n.indexStack.length-1];return n.safe(e.value,{...r,afterNode:i[a+1],beforeNode:i[a-1]})}function MF(e){let t=e.options.ruleRepetition||3;if(t<3)throw Error("Cannot serialize rules with repetition `"+t+"` for `options.ruleRepetition`, expected `3` or more");return t}function NF(e,t,n){let r=(xF(n)+(n.options.ruleSpaces?` `:``)).repeat(MF(n));return n.options.ruleSpaces?r.slice(0,-1):r}var PF={blockquote:CP,break:DP,code:jP,definition:PP,emphasis:eF,hardBreak:DP,heading:iF,html:aF,image:sF,imageReference:lF,inlineCode:dF,link:mF,linkReference:gF,list:SF,listItem:wF,paragraph:TF,root:EF,strong:OF,text:jF,thematicBreak:NF};function FF(){return{enter:{table:IF,tableData:BF,tableHeader:BF,tableRow:RF},exit:{codeText:VF,table:LF,tableData:zF,tableHeader:zF,tableRow:zF}}}function IF(e){let t=e._align;this.enter({type:`table`,align:t.map(function(e){return e===`none`?null:e}),children:[],position:void 0},e),this.data.inTable=!0}function LF(e){this.exit(e),this.data.inTable=void 0}function RF(e){this.enter({type:`tableRow`,children:[],position:void 0},e)}function zF(e){this.exit(e)}function BF(e){this.enter({type:`tableCell`,children:[],position:void 0},e)}function VF(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,HF));let n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function HF(e,t){return t===`|`?t:e}function UF(e){let{tableCellPadding:t,tablePipeAlign:n,stringLength:r}=e||{},i=t?` `:`|`;return{handlers:{inlineCode:d,table:a,tableCell:s,tableRow:o},join:[WF],unsafe:[{character:`\r`,inConstruct:`tableCell`},{character:`
44
44
  `,inConstruct:`tableCell`},{atBreak:!0,character:`|`,after:`[ :-]`},{character:`|`,inConstruct:`tableCell`},{atBreak:!0,character:`:`,after:`-`},{atBreak:!0,character:`-`,after:`[:|-]`}]};function a(e,t,n,r){let i=l(e,n,r),a=i[0];if(a){let t=e.align?e.align.length:0,n=-1;if(!t)for(;++n<i.length;)i[n].length>t&&(t=i[n].length);for(;a.length<t;)a.push(``)}return c(i,e.align)}function o(e,t,n,r){let i=c([u(e,n,r)]);return i.slice(0,i.indexOf(`
45
- `))}function s(e,t,n,r){let a=n.enter(`tableCell`),o=n.enter(`phrasing`),s=n.containerPhrasing(e,{...r,before:i,after:i});return o(),a(),s}function c(e,i){return Rx(e,{align:i,alignDelimiters:n,fillRows:!1,padding:t,stringLength:r})}function l(e,t,n){let{children:r}=e,i=-1,a=[],o=t.enter(`table`);for(;++i<r.length;)a[i]=u(r[i],t,n);return o(),a}function u(e,t,n){let{children:r}=e,i=-1,a=[],o=t.enter(`tableRow`);for(;++i<r.length;)a[i]=s(r[i],e,t,n);return o(),a}function d(e,t,n){let r=$S.inlineCode(e,t,n);if(!n.stack.includes(`tableCell`))return r;let i=[],a=0,o=r.indexOf(`|`);for(;o!==-1;){let e=o;for(;e>a&&r.charCodeAt(e-1)===92;)e--;i.push(r.slice(a,o)),(o-e)%2==0&&i.push(`\\`),a=o,o=r.indexOf(`|`,o+1)}return i.push(r.slice(a)),i.join(``)}}function lC(e,t,n,r){if(e.type===`table`&&n.type===`listItem`&&n.spread===!1&&(t.type===`definition`||t.type===`heading`&&uC(t,r)||t.type===`paragraph`||t.type===`table`))return 1}function uC(e,t){let n=!1;return ly(e,function(e){if(e.type===`break`||`value`in e&&/\r?\n|\r/.test(e.value))return n=!0,!1}),!!((!e.depth||e.depth<3)&&nh(e)&&(t.options.setext||n))}function dC(){return{exit:{taskListCheckValueChecked:pC,taskListCheckValueUnchecked:pC,paragraph:mC}}}function fC(){return{handlers:{paragraph:hC},join:[gC]}}function pC(e){let t=this.stack[this.stack.length-2];t.type,t.checked=e.type===`taskListCheckValueChecked`}function mC(e){let t=this.stack[this.stack.length-2];if(t&&t.type===`listItem`&&typeof t.checked==`boolean`){let e=this.stack[this.stack.length-1];e.type;let n=e.children[0];if(n&&n.type===`text`){let r=t.children,i=-1,a;for(;++i<r.length;){let e=r[i];if(e.type===`paragraph`){a=e;break}}a===e&&(n.value=n.value.slice(1),n.value.length===0?e.children.shift():e.position&&n.position&&typeof n.position.start.offset==`number`&&(n.position.start.column++,n.position.start.offset++,e.position.start={...n.position.start}))}}this.exit(e)}function hC(e,t,n,r){if(!t||t.type!==`listItem`||_C(t)!==e)return $S.paragraph(e,t,n,r);let i=`[`+(t.checked?`x`:` `)+`] `,a=n.createTracker(r);return a.move(i),i+$S.paragraph(e.children.length>0?e:{type:`paragraph`,children:[{type:`text`,value:` `}]},t,n,{...r,...a.current()})}function gC(e,t,n){if(e.type!==`definition`||n.type!==`listItem`)return;let r=_C(n);if(r&&n.children.indexOf(e)<n.children.indexOf(r))return 0}function _C(e){if(typeof e.checked==`boolean`)for(let t of e.children){if(t.type===`paragraph`)return t;if(t.type!==`definition`)return}}function vC(){return[$b(),Tx(),Ax(),eC(),dC()]}function yC(e){return{extensions:[ex(),Ex(e),jx(),cC(e),fC()]}}var bC={tokenize:PC,partial:!0},xC={tokenize:FC,partial:!0},SC={tokenize:IC,partial:!0},CC={tokenize:LC,partial:!0},wC={tokenize:RC,partial:!0},TC={name:`wwwAutolink`,tokenize:MC,previous:zC},EC={name:`protocolAutolink`,tokenize:NC,previous:BC},DC={name:`emailAutolink`,tokenize:jC,previous:VC},OC={};function kC(){return{text:OC}}for(var AC=48;AC<123;)OC[AC]=DC,AC++,AC===58?AC=65:AC===91&&(AC=97);OC[43]=DC,OC[45]=DC,OC[46]=DC,OC[95]=DC,OC[72]=[DC,EC],OC[104]=[DC,EC],OC[87]=[DC,TC],OC[119]=[DC,TC];function jC(e,t,n){let r=this,i,a;return o;function o(t){return!HC(t)||!VC.call(r,r.previous)||UC(r.events)?n(t):(e.enter(`literalAutolink`),e.enter(`literalAutolinkEmail`),s(t))}function s(t){return HC(t)?(e.consume(t),s):t===64?(e.consume(t),c):n(t)}function c(t){return t===46?e.check(wC,u,l)(t):t===45||t===95||_h(t)?(a=!0,e.consume(t),c):u(t)}function l(t){return e.consume(t),i=!0,c}function u(o){return a&&i&&gh(r.previous)?(e.exit(`literalAutolinkEmail`),e.exit(`literalAutolink`),t(o)):n(o)}}function MC(e,t,n){let r=this;return i;function i(t){return t!==87&&t!==119||!zC.call(r,r.previous)||UC(r.events)?n(t):(e.enter(`literalAutolink`),e.enter(`literalAutolinkWww`),e.check(bC,e.attempt(xC,e.attempt(SC,a),n),n)(t))}function a(n){return e.exit(`literalAutolinkWww`),e.exit(`literalAutolink`),t(n)}}function NC(e,t,n){let r=this,i=``,a=!1;return o;function o(t){return(t===72||t===104)&&BC.call(r,r.previous)&&!UC(r.events)?(e.enter(`literalAutolink`),e.enter(`literalAutolinkHttp`),i+=String.fromCodePoint(t),e.consume(t),s):n(t)}function s(t){if(gh(t)&&i.length<5)return i+=String.fromCodePoint(t),e.consume(t),s;if(t===58){let n=i.toLowerCase();if(n===`http`||n===`https`)return e.consume(t),c}return n(t)}function c(t){return t===47?(e.consume(t),a?l:(a=!0,c)):n(t)}function l(t){return t===null||yh(t)||Ch(t)||Th(t)||wh(t)?n(t):e.attempt(xC,e.attempt(SC,u),n)(t)}function u(n){return e.exit(`literalAutolinkHttp`),e.exit(`literalAutolink`),t(n)}}function PC(e,t,n){let r=0;return i;function i(t){return(t===87||t===119)&&r<3?(r++,e.consume(t),i):t===46&&r===3?(e.consume(t),a):n(t)}function a(e){return e===null?n(e):t(e)}}function FC(e,t,n){let r,i,a;return o;function o(t){return t===46||t===95?e.check(CC,c,s)(t):t===null||Ch(t)||Th(t)||t!==45&&wh(t)?c(t):(a=!0,e.consume(t),o)}function s(t){return t===95?r=!0:(i=r,r=void 0),e.consume(t),o}function c(e){return i||r||!a?n(e):t(e)}}function IC(e,t){let n=0,r=0;return i;function i(o){return o===40?(n++,e.consume(o),i):o===41&&r<n?a(o):o===33||o===34||o===38||o===39||o===41||o===42||o===44||o===46||o===58||o===59||o===60||o===63||o===93||o===95||o===126?e.check(CC,t,a)(o):o===null||Ch(o)||Th(o)?t(o):(e.consume(o),i)}function a(t){return t===41&&r++,e.consume(t),i}}function LC(e,t,n){return r;function r(o){return o===33||o===34||o===39||o===41||o===42||o===44||o===46||o===58||o===59||o===63||o===95||o===126?(e.consume(o),r):o===38?(e.consume(o),a):o===93?(e.consume(o),i):o===60||o===null||Ch(o)||Th(o)?t(o):n(o)}function i(e){return e===null||e===40||e===91||Ch(e)||Th(e)?t(e):r(e)}function a(e){return gh(e)?o(e):n(e)}function o(t){return t===59?(e.consume(t),r):gh(t)?(e.consume(t),o):n(t)}}function RC(e,t,n){return r;function r(t){return e.consume(t),i}function i(e){return _h(e)?n(e):t(e)}}function zC(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||Ch(e)}function BC(e){return!gh(e)}function VC(e){return!(e===47||HC(e))}function HC(e){return e===43||e===45||e===46||e===95||_h(e)}function UC(e){let t=e.length,n=!1;for(;t--;){let r=e[t][1];if((r.type===`labelLink`||r.type===`labelImage`)&&!r._balanced){n=!0;break}if(r._gfmAutolinkLiteralWalkedInto){n=!1;break}}return e.length>0&&!n&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}var WC={tokenize:QC,partial:!0};function GC(){return{document:{91:{name:`gfmFootnoteDefinition`,tokenize:YC,continuation:{tokenize:XC},exit:ZC}},text:{91:{name:`gfmFootnoteCall`,tokenize:JC},93:{name:`gfmPotentialFootnoteCall`,add:`after`,tokenize:KC,resolveTo:qC}}}}function KC(e,t,n){let r=this,i=r.events.length,a=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]),o;for(;i--;){let e=r.events[i][1];if(e.type===`labelImage`){o=e;break}if(e.type===`gfmFootnoteCall`||e.type===`labelLink`||e.type===`label`||e.type===`image`||e.type===`link`)break}return s;function s(i){if(!o||!o._balanced)return n(i);let s=hh(r.sliceSerialize({start:o.end,end:r.now()}));return s.codePointAt(0)!==94||!a.includes(s.slice(1))?n(i):(e.enter(`gfmFootnoteCallLabelMarker`),e.consume(i),e.exit(`gfmFootnoteCallLabelMarker`),t(i))}}function qC(e,t){let n=e.length;for(;n--;)if(e[n][1].type===`labelImage`&&e[n][0]===`enter`){e[n][1];break}e[n+1][1].type=`data`,e[n+3][1].type=`gfmFootnoteCallLabelMarker`;let r={type:`gfmFootnoteCall`,start:Object.assign({},e[n+3][1].start),end:Object.assign({},e[e.length-1][1].end)},i={type:`gfmFootnoteCallMarker`,start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};i.end.column++,i.end.offset++,i.end._bufferIndex++;let a={type:`gfmFootnoteCallString`,start:Object.assign({},i.end),end:Object.assign({},e[e.length-1][1].start)},o={type:`chunkString`,contentType:`string`,start:Object.assign({},a.start),end:Object.assign({},a.end)},s=[e[n+1],e[n+2],[`enter`,r,t],e[n+3],e[n+4],[`enter`,i,t],[`exit`,i,t],[`enter`,a,t],[`enter`,o,t],[`exit`,o,t],[`exit`,a,t],e[e.length-2],e[e.length-1],[`exit`,r,t]];return e.splice(n,e.length-n+1,...s),e}function JC(e,t,n){let r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]),a=0,o;return s;function s(t){return e.enter(`gfmFootnoteCall`),e.enter(`gfmFootnoteCallLabelMarker`),e.consume(t),e.exit(`gfmFootnoteCallLabelMarker`),c}function c(t){return t===94?(e.enter(`gfmFootnoteCallMarker`),e.consume(t),e.exit(`gfmFootnoteCallMarker`),e.enter(`gfmFootnoteCallString`),e.enter(`chunkString`).contentType=`string`,l):n(t)}function l(s){if(a>999||s===93&&!o||s===null||s===91||Ch(s))return n(s);if(s===93){e.exit(`chunkString`);let a=e.exit(`gfmFootnoteCallString`);return i.includes(hh(r.sliceSerialize(a)))?(e.enter(`gfmFootnoteCallLabelMarker`),e.consume(s),e.exit(`gfmFootnoteCallLabelMarker`),e.exit(`gfmFootnoteCall`),t):n(s)}return Ch(s)||(o=!0),a++,e.consume(s),s===92?u:l}function u(t){return t===91||t===92||t===93?(e.consume(t),a++,l):l(t)}}function YC(e,t,n){let r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]),a,o=0,s;return c;function c(t){return e.enter(`gfmFootnoteDefinition`)._container=!0,e.enter(`gfmFootnoteDefinitionLabel`),e.enter(`gfmFootnoteDefinitionLabelMarker`),e.consume(t),e.exit(`gfmFootnoteDefinitionLabelMarker`),l}function l(t){return t===94?(e.enter(`gfmFootnoteDefinitionMarker`),e.consume(t),e.exit(`gfmFootnoteDefinitionMarker`),e.enter(`gfmFootnoteDefinitionLabelString`),e.enter(`chunkString`).contentType=`string`,u):n(t)}function u(t){if(o>999||t===93&&!s||t===null||t===91||Ch(t))return n(t);if(t===93){e.exit(`chunkString`);let n=e.exit(`gfmFootnoteDefinitionLabelString`);return a=hh(r.sliceSerialize(n)),e.enter(`gfmFootnoteDefinitionLabelMarker`),e.consume(t),e.exit(`gfmFootnoteDefinitionLabelMarker`),e.exit(`gfmFootnoteDefinitionLabel`),f}return Ch(t)||(s=!0),o++,e.consume(t),t===92?d:u}function d(t){return t===91||t===92||t===93?(e.consume(t),o++,u):u(t)}function f(t){return t===58?(e.enter(`definitionMarker`),e.consume(t),e.exit(`definitionMarker`),i.includes(a)||i.push(a),Oh(e,p,`gfmFootnoteDefinitionWhitespace`)):n(t)}function p(e){return t(e)}}function XC(e,t,n){return e.check(Kh,t,e.attempt(WC,t,n))}function ZC(e){e.exit(`gfmFootnoteDefinition`)}function QC(e,t,n){let r=this;return Oh(e,i,`gfmFootnoteDefinitionIndent`,5);function i(e){let i=r.events[r.events.length-1];return i&&i[1].type===`gfmFootnoteDefinitionIndent`&&i[2].sliceSerialize(i[1],!0).length===4?t(e):n(e)}}function $C(e){let t=(e||{}).singleTilde,n={name:`strikethrough`,tokenize:i,resolveAll:r};return t??=!0,{text:{126:n},insideSpan:{null:[n]},attentionMarkers:{null:[126]}};function r(e,t){let n=-1;for(;++n<e.length;)if(e[n][0]===`enter`&&e[n][1].type===`strikethroughSequenceTemporary`&&e[n][1]._close){let r=n;for(;r--;)if(e[r][0]===`exit`&&e[r][1].type===`strikethroughSequenceTemporary`&&e[r][1]._open&&e[n][1].end.offset-e[n][1].start.offset===e[r][1].end.offset-e[r][1].start.offset){e[n][1].type=`strikethroughSequence`,e[r][1].type=`strikethroughSequence`;let i={type:`strikethrough`,start:Object.assign({},e[r][1].start),end:Object.assign({},e[n][1].end)},a={type:`strikethroughText`,start:Object.assign({},e[r][1].end),end:Object.assign({},e[n][1].start)},o=[[`enter`,i,t],[`enter`,e[r][1],t],[`exit`,e[r][1],t],[`enter`,a,t]],s=t.parser.constructs.insideSpan.null;s&&ch(o,o.length,0,zh(s,e.slice(r+1,n),t)),ch(o,o.length,0,[[`exit`,a,t],[`enter`,e[n][1],t],[`exit`,e[n][1],t],[`exit`,i,t]]),ch(e,r-1,n-r+3,o),n=r+o.length-2;break}}for(n=-1;++n<e.length;)e[n][1].type===`strikethroughSequenceTemporary`&&(e[n][1].type=`data`);return e}function i(e,n,r){let i=this.previous,a=this.events,o=0;return s;function s(t){return i===126&&a[a.length-1][1].type!==`characterEscape`?r(t):(e.enter(`strikethroughSequenceTemporary`),c(t))}function c(a){let s=Rh(i);if(a===126)return o>1?r(a):(e.consume(a),o++,c);if(o<2&&!t)return r(a);let l=e.exit(`strikethroughSequenceTemporary`),u=Rh(a);return l._open=!u||u===2&&!!s,l._close=!s||s===2&&!!u,n(a)}}}var ew=class{constructor(){this.map=[],this.index=new Map}add(e,t,n){tw(this,e,t,n)}consume(e){if(this.map.sort(function(e,t){return e[0]-t[0]}),this.map.length===0)return;let t=this.map.length,n=[];for(;t>0;)--t,n.push(e.slice(this.map[t][0]+this.map[t][1]),this.map[t][2]),e.length=this.map[t][0];n.push(e.slice()),e.length=0;let r=n.pop();for(;r;){for(let t of r)e.push(t);r=n.pop()}this.map.length=0,this.index.clear()}};function tw(e,t,n,r){if(n===0&&r.length===0)return;let i=e.index.get(t);if(i){i[1]+=n,i[2].push(...r);return}let a=[t,n,r];e.map.push(a),e.index.set(t,a)}function nw(e,t){let n=!1,r=[];for(;t<e.length;){let i=e[t];if(n){if(i[0]===`enter`)i[1].type===`tableContent`&&r.push(e[t+1][1].type===`tableDelimiterMarker`?`left`:`none`);else if(i[1].type===`tableContent`){if(e[t-1][1].type===`tableDelimiterMarker`){let e=r.length-1;r[e]=r[e]===`left`?`center`:`right`}}else if(i[1].type===`tableDelimiterRow`)break}else i[0]===`enter`&&i[1].type===`tableDelimiterRow`&&(n=!0);t+=1}return r}function rw(){return{flow:{null:{name:`table`,tokenize:iw,resolveAll:aw}}}}function iw(e,t,n){let r=this,i=0,a=0,o;return s;function s(e){let t=r.events.length-1;for(;t>-1;){let{type:e}=r.events[t][1];if(e===`lineEnding`||e===`linePrefix`)t--;else break}let i=t>-1?r.events[t][1].type:null,a=i===`tableHead`||i===`tableRow`?S:c;return a===S&&r.parser.lazy[r.now().line]?n(e):a(e)}function c(t){return e.enter(`tableHead`),e.enter(`tableRow`),l(t)}function l(e){return e===124||(o=!0,a+=1),u(e)}function u(t){return t===null?n(t):J(t)?a>1?(a=0,r.interrupt=!0,e.exit(`tableRow`),e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),p):n(t):Y(t)?Oh(e,u,`whitespace`)(t):(a+=1,o&&(o=!1,i+=1),t===124?(e.enter(`tableCellDivider`),e.consume(t),e.exit(`tableCellDivider`),o=!0,u):(e.enter(`data`),d(t)))}function d(t){return t===null||t===124||Ch(t)?(e.exit(`data`),u(t)):(e.consume(t),t===92?f:d)}function f(t){return t===92||t===124?(e.consume(t),d):d(t)}function p(t){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(t):(e.enter(`tableDelimiterRow`),o=!1,Y(t)?Oh(e,m,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):m(t))}function m(t){return t===45||t===58?g(t):t===124?(o=!0,e.enter(`tableCellDivider`),e.consume(t),e.exit(`tableCellDivider`),h):x(t)}function h(t){return Y(t)?Oh(e,g,`whitespace`)(t):g(t)}function g(t){return t===58?(a+=1,o=!0,e.enter(`tableDelimiterMarker`),e.consume(t),e.exit(`tableDelimiterMarker`),_):t===45?(a+=1,_(t)):t===null||J(t)?b(t):x(t)}function _(t){return t===45?(e.enter(`tableDelimiterFiller`),v(t)):x(t)}function v(t){return t===45?(e.consume(t),v):t===58?(o=!0,e.exit(`tableDelimiterFiller`),e.enter(`tableDelimiterMarker`),e.consume(t),e.exit(`tableDelimiterMarker`),y):(e.exit(`tableDelimiterFiller`),y(t))}function y(t){return Y(t)?Oh(e,b,`whitespace`)(t):b(t)}function b(n){return n===124?m(n):n===null||J(n)?!o||i!==a?x(n):(e.exit(`tableDelimiterRow`),e.exit(`tableHead`),t(n)):x(n)}function x(e){return n(e)}function S(t){return e.enter(`tableRow`),C(t)}function C(n){return n===124?(e.enter(`tableCellDivider`),e.consume(n),e.exit(`tableCellDivider`),C):n===null||J(n)?(e.exit(`tableRow`),t(n)):Y(n)?Oh(e,C,`whitespace`)(n):(e.enter(`data`),w(n))}function w(t){return t===null||t===124||Ch(t)?(e.exit(`data`),C(t)):(e.consume(t),t===92?T:w)}function T(t){return t===92||t===124?(e.consume(t),w):w(t)}}function aw(e,t){let n=-1,r=!0,i=0,a=[0,0,0,0],o=[0,0,0,0],s=!1,c=0,l,u,d,f=new ew;for(;++n<e.length;){let p=e[n],m=p[1];p[0]===`enter`?m.type===`tableHead`?(s=!1,c!==0&&(sw(f,t,c,l,u),u=void 0,c=0),l={type:`table`,start:Object.assign({},m.start),end:Object.assign({},m.end)},f.add(n,0,[[`enter`,l,t]])):m.type===`tableRow`||m.type===`tableDelimiterRow`?(r=!0,d=void 0,a=[0,0,0,0],o=[0,n+1,0,0],s&&(s=!1,u={type:`tableBody`,start:Object.assign({},m.start),end:Object.assign({},m.end)},f.add(n,0,[[`enter`,u,t]])),i=m.type===`tableDelimiterRow`?2:u?3:1):i&&(m.type===`data`||m.type===`tableDelimiterMarker`||m.type===`tableDelimiterFiller`)?(r=!1,o[2]===0&&(a[1]!==0&&(o[0]=o[1],d=ow(f,t,a,i,void 0,d),a=[0,0,0,0]),o[2]=n)):m.type===`tableCellDivider`&&(r?r=!1:(a[1]!==0&&(o[0]=o[1],d=ow(f,t,a,i,void 0,d)),a=o,o=[a[1],n,0,0])):m.type===`tableHead`?(s=!0,c=n):m.type===`tableRow`||m.type===`tableDelimiterRow`?(c=n,a[1]===0?o[1]!==0&&(d=ow(f,t,o,i,n,d)):(o[0]=o[1],d=ow(f,t,a,i,n,d)),i=0):i&&(m.type===`data`||m.type===`tableDelimiterMarker`||m.type===`tableDelimiterFiller`)&&(o[3]=n)}for(c!==0&&sw(f,t,c,l,u),f.consume(t.events),n=-1;++n<t.events.length;){let e=t.events[n];e[0]===`enter`&&e[1].type===`table`&&(e[1]._align=nw(t.events,n))}return e}function ow(e,t,n,r,i,a){let o=r===1?`tableHeader`:r===2?`tableDelimiter`:`tableData`;n[0]!==0&&(a.end=Object.assign({},cw(t.events,n[0])),e.add(n[0],0,[[`exit`,a,t]]));let s=cw(t.events,n[1]);if(a={type:o,start:Object.assign({},s),end:Object.assign({},s)},e.add(n[1],0,[[`enter`,a,t]]),n[2]!==0){let i=cw(t.events,n[2]),a=cw(t.events,n[3]),o={type:`tableContent`,start:Object.assign({},i),end:Object.assign({},a)};if(e.add(n[2],0,[[`enter`,o,t]]),r!==2){let r=t.events[n[2]],i=t.events[n[3]];if(r[1].end=Object.assign({},i[1].end),r[1].type=`chunkText`,r[1].contentType=`text`,n[3]>n[2]+1){let t=n[2]+1,r=n[3]-n[2]-1;e.add(t,r,[])}}e.add(n[3]+1,0,[[`exit`,o,t]])}return i!==void 0&&(a.end=Object.assign({},cw(t.events,i)),e.add(i,0,[[`exit`,a,t]]),a=void 0),a}function sw(e,t,n,r,i){let a=[],o=cw(t.events,n);i&&(i.end=Object.assign({},o),a.push([`exit`,i,t])),r.end=Object.assign({},o),a.push([`exit`,r,t]),e.add(n+1,0,a)}function cw(e,t){let n=e[t],r=n[0]===`enter`?`start`:`end`;return n[1][r]}var lw={name:`tasklistCheck`,tokenize:dw};function uw(){return{text:{91:lw}}}function dw(e,t,n){let r=this;return i;function i(t){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?n(t):(e.enter(`taskListCheck`),e.enter(`taskListCheckMarker`),e.consume(t),e.exit(`taskListCheckMarker`),a)}function a(t){return Ch(t)?(e.enter(`taskListCheckValueUnchecked`),e.consume(t),e.exit(`taskListCheckValueUnchecked`),o):t===88||t===120?(e.enter(`taskListCheckValueChecked`),e.consume(t),e.exit(`taskListCheckValueChecked`),o):n(t)}function o(t){return t===93?(e.enter(`taskListCheckMarker`),e.consume(t),e.exit(`taskListCheckMarker`),e.exit(`taskListCheck`),s):n(t)}function s(r){return J(r)?t(r):Y(r)?e.check({tokenize:fw},t,n)(r):n(r)}}function fw(e,t,n){return Oh(e,r,`whitespace`);function r(e){return e===null?n(e):t(e)}}function pw(e){return dh([kC(),GC(),$C(e),rw(),uw()])}var mw={};function hw(e){let t=this,n=e||mw,r=t.data(),i=r.micromarkExtensions||=[],a=r.fromMarkdownExtensions||=[],o=r.toMarkdownExtensions||=[];i.push(pw(n)),a.push(vC()),o.push(yC(n))}var gw=(0,_.createContext)({}),_w=()=>(0,_.useContext)(gw),X={done:{icon:`✓`,label:`done`,colour:`#34d399`,strike:!0},review:{icon:`◐`,label:`review`,colour:`#a884f3`,strike:!1},"in-progress":{icon:`●`,label:`in-progress`,colour:`#4f9dff`,strike:!1},"to-do":{icon:`○`,label:`to-do`,colour:`#fbbf24`,strike:!1},planning:{icon:`○`,label:`planning`,colour:`#e8590c`,strike:!1}};Object.keys(X);var vw=/^[A-Z][A-Z0-9]*-[1-9]\d*(\.[1-9]\d*)*$/,yw=e=>vw.test(e);function bw(e){let t=e.indexOf(`:`);if(t<=0)return null;let n=e.slice(t+1);return yw(n)?{project:e.slice(0,t),ref:n}:null}function xw(e){let t=[];for(let n of e)t.includes(n.area)||t.push(n.area);return t}var Sw=o(((e,t)=>{var n=class{_isDirected=!0;_isMultigraph=!1;_isCompound=!1;_label;_defaultNodeLabelFn=()=>void 0;_defaultEdgeLabelFn=()=>void 0;_nodes={};_in={};_preds={};_out={};_sucs={};_edgeObjs={};_edgeLabels={};_nodeCount=0;_edgeCount=0;_parent;_children;constructor(e){e&&(this._isDirected=!Object.hasOwn(e,`directed`)||e.directed,this._isMultigraph=Object.hasOwn(e,`multigraph`)?e.multigraph:!1,this._isCompound=Object.hasOwn(e,`compound`)?e.compound:!1),this._isCompound&&(this._parent={},this._children={},this._children[`\0`]={})}isDirected(){return this._isDirected}isMultigraph(){return this._isMultigraph}isCompound(){return this._isCompound}setGraph(e){return this._label=e,this}graph(){return this._label}setDefaultNodeLabel(e){return this._defaultNodeLabelFn=e,typeof e!=`function`&&(this._defaultNodeLabelFn=()=>e),this}nodeCount(){return this._nodeCount}nodes(){return Object.keys(this._nodes)}sources(){var e=this;return this.nodes().filter(t=>Object.keys(e._in[t]).length===0)}sinks(){var e=this;return this.nodes().filter(t=>Object.keys(e._out[t]).length===0)}setNodes(e,t){var n=arguments,r=this;return e.forEach(function(e){n.length>1?r.setNode(e,t):r.setNode(e)}),this}setNode(e,t){return Object.hasOwn(this._nodes,e)?(arguments.length>1&&(this._nodes[e]=t),this):(this._nodes[e]=arguments.length>1?t:this._defaultNodeLabelFn(e),this._isCompound&&(this._parent[e]=`\0`,this._children[e]={},this._children[`\0`][e]=!0),this._in[e]={},this._preds[e]={},this._out[e]={},this._sucs[e]={},++this._nodeCount,this)}node(e){return this._nodes[e]}hasNode(e){return Object.hasOwn(this._nodes,e)}removeNode(e){var t=this;if(Object.hasOwn(this._nodes,e)){var n=e=>t.removeEdge(t._edgeObjs[e]);delete this._nodes[e],this._isCompound&&(this._removeFromParentsChildList(e),delete this._parent[e],this.children(e).forEach(function(e){t.setParent(e)}),delete this._children[e]),Object.keys(this._in[e]).forEach(n),delete this._in[e],delete this._preds[e],Object.keys(this._out[e]).forEach(n),delete this._out[e],delete this._sucs[e],--this._nodeCount}return this}setParent(e,t){if(!this._isCompound)throw Error(`Cannot set parent in a non-compound graph`);if(t===void 0)t=`\0`;else{t+=``;for(var n=t;n!==void 0;n=this.parent(n))if(n===e)throw Error(`Setting `+t+` as parent of `+e+` would create a cycle`);this.setNode(t)}return this.setNode(e),this._removeFromParentsChildList(e),this._parent[e]=t,this._children[t][e]=!0,this}_removeFromParentsChildList(e){delete this._children[this._parent[e]][e]}parent(e){if(this._isCompound){var t=this._parent[e];if(t!==`\0`)return t}}children(e=`\0`){if(this._isCompound){var t=this._children[e];if(t)return Object.keys(t)}else if(e===`\0`)return this.nodes();else if(this.hasNode(e))return[]}predecessors(e){var t=this._preds[e];if(t)return Object.keys(t)}successors(e){var t=this._sucs[e];if(t)return Object.keys(t)}neighbors(e){var t=this.predecessors(e);if(t){let r=new Set(t);for(var n of this.successors(e))r.add(n);return Array.from(r.values())}}isLeaf(e){return(this.isDirected()?this.successors(e):this.neighbors(e)).length===0}filterNodes(e){var t=new this.constructor({directed:this._isDirected,multigraph:this._isMultigraph,compound:this._isCompound});t.setGraph(this.graph());var n=this;Object.entries(this._nodes).forEach(function([n,r]){e(n)&&t.setNode(n,r)}),Object.values(this._edgeObjs).forEach(function(e){t.hasNode(e.v)&&t.hasNode(e.w)&&t.setEdge(e,n.edge(e))});var r={};function i(e){var a=n.parent(e);return a===void 0||t.hasNode(a)?(r[e]=a,a):a in r?r[a]:i(a)}return this._isCompound&&t.nodes().forEach(e=>t.setParent(e,i(e))),t}setDefaultEdgeLabel(e){return this._defaultEdgeLabelFn=e,typeof e!=`function`&&(this._defaultEdgeLabelFn=()=>e),this}edgeCount(){return this._edgeCount}edges(){return Object.values(this._edgeObjs)}setPath(e,t){var n=this,r=arguments;return e.reduce(function(e,i){return r.length>1?n.setEdge(e,i,t):n.setEdge(e,i),i}),this}setEdge(){var e,t,n,i,s=!1,c=arguments[0];typeof c==`object`&&c&&`v`in c?(e=c.v,t=c.w,n=c.name,arguments.length===2&&(i=arguments[1],s=!0)):(e=c,t=arguments[1],n=arguments[3],arguments.length>2&&(i=arguments[2],s=!0)),e=``+e,t=``+t,n!==void 0&&(n=``+n);var l=a(this._isDirected,e,t,n);if(Object.hasOwn(this._edgeLabels,l))return s&&(this._edgeLabels[l]=i),this;if(n!==void 0&&!this._isMultigraph)throw Error(`Cannot set a named edge when isMultigraph = false`);this.setNode(e),this.setNode(t),this._edgeLabels[l]=s?i:this._defaultEdgeLabelFn(e,t,n);var u=o(this._isDirected,e,t,n);return e=u.v,t=u.w,Object.freeze(u),this._edgeObjs[l]=u,r(this._preds[t],e),r(this._sucs[e],t),this._in[t][l]=u,this._out[e][l]=u,this._edgeCount++,this}edge(e,t,n){var r=arguments.length===1?s(this._isDirected,arguments[0]):a(this._isDirected,e,t,n);return this._edgeLabels[r]}edgeAsObj(){let e=this.edge(...arguments);return typeof e==`object`?e:{label:e}}hasEdge(e,t,n){var r=arguments.length===1?s(this._isDirected,arguments[0]):a(this._isDirected,e,t,n);return Object.hasOwn(this._edgeLabels,r)}removeEdge(e,t,n){var r=arguments.length===1?s(this._isDirected,arguments[0]):a(this._isDirected,e,t,n),o=this._edgeObjs[r];return o&&(e=o.v,t=o.w,delete this._edgeLabels[r],delete this._edgeObjs[r],i(this._preds[t],e),i(this._sucs[e],t),delete this._in[t][r],delete this._out[e][r],this._edgeCount--),this}inEdges(e,t){var n=this._in[e];if(n){var r=Object.values(n);return t?r.filter(e=>e.v===t):r}}outEdges(e,t){var n=this._out[e];if(n){var r=Object.values(n);return t?r.filter(e=>e.w===t):r}}nodeEdges(e,t){var n=this.inEdges(e,t);if(n)return n.concat(this.outEdges(e,t))}};function r(e,t){e[t]?e[t]++:e[t]=1}function i(e,t){--e[t]||delete e[t]}function a(e,t,n,r){var i=``+t,a=``+n;if(!e&&i>a){var o=i;i=a,a=o}return i+``+a+``+(r===void 0?`\0`:r)}function o(e,t,n,r){var i=``+t,a=``+n;if(!e&&i>a){var o=i;i=a,a=o}var s={v:i,w:a};return r&&(s.name=r),s}function s(e,t){return a(e,t.v,t.w,t.name)}t.exports=n})),Cw=o(((e,t)=>{t.exports=`2.2.4`})),ww=o(((e,t)=>{t.exports={Graph:Sw(),version:Cw()}})),Tw=o(((e,t)=>{var n=Sw();t.exports={write:r,read:o};function r(e){var t={options:{directed:e.isDirected(),multigraph:e.isMultigraph(),compound:e.isCompound()},nodes:i(e),edges:a(e)};return e.graph()!==void 0&&(t.value=structuredClone(e.graph())),t}function i(e){return e.nodes().map(function(t){var n=e.node(t),r=e.parent(t),i={v:t};return n!==void 0&&(i.value=n),r!==void 0&&(i.parent=r),i})}function a(e){return e.edges().map(function(t){var n=e.edge(t),r={v:t.v,w:t.w};return t.name!==void 0&&(r.name=t.name),n!==void 0&&(r.value=n),r})}function o(e){var t=new n(e.options).setGraph(e.value);return e.nodes.forEach(function(e){t.setNode(e.v,e.value),e.parent&&t.setParent(e.v,e.parent)}),e.edges.forEach(function(e){t.setEdge({v:e.v,w:e.w,name:e.name},e.value)}),t}})),Ew=o(((e,t)=>{t.exports=n;function n(e){var t={},n=[],r;function i(n){Object.hasOwn(t,n)||(t[n]=!0,r.push(n),e.successors(n).forEach(i),e.predecessors(n).forEach(i))}return e.nodes().forEach(function(e){r=[],i(e),r.length&&n.push(r)}),n}})),Dw=o(((e,t)=>{t.exports=class{_arr=[];_keyIndices={};size(){return this._arr.length}keys(){return this._arr.map(function(e){return e.key})}has(e){return Object.hasOwn(this._keyIndices,e)}priority(e){var t=this._keyIndices[e];if(t!==void 0)return this._arr[t].priority}min(){if(this.size()===0)throw Error(`Queue underflow`);return this._arr[0].key}add(e,t){var n=this._keyIndices;if(e=String(e),!Object.hasOwn(n,e)){var r=this._arr,i=r.length;return n[e]=i,r.push({key:e,priority:t}),this._decrease(i),!0}return!1}removeMin(){this._swap(0,this._arr.length-1);var e=this._arr.pop();return delete this._keyIndices[e.key],this._heapify(0),e.key}decrease(e,t){var n=this._keyIndices[e];if(t>this._arr[n].priority)throw Error(`New priority is greater than current priority. Key: `+e+` Old: `+this._arr[n].priority+` New: `+t);this._arr[n].priority=t,this._decrease(n)}_heapify(e){var t=this._arr,n=2*e,r=n+1,i=e;n<t.length&&(i=t[n].priority<t[i].priority?n:i,r<t.length&&(i=t[r].priority<t[i].priority?r:i),i!==e&&(this._swap(e,i),this._heapify(i)))}_decrease(e){for(var t=this._arr,n=t[e].priority,r;e!==0&&(r=e>>1,!(t[r].priority<n));)this._swap(e,r),e=r}_swap(e,t){var n=this._arr,r=this._keyIndices,i=n[e],a=n[t];n[e]=a,n[t]=i,r[a.key]=e,r[i.key]=t}}})),Ow=o(((e,t)=>{var n=Dw();t.exports=i;var r=()=>1;function i(e,t,n,i){return a(e,String(t),n||r,i||function(t){return e.outEdges(t)})}function a(e,t,r,i){var a={},o=new n,s,c,l=function(e){var t=e.v===s?e.w:e.v,n=a[t],i=r(e),l=c.distance+i;if(i<0)throw Error(`dijkstra does not allow negative edge weights. Bad edge: `+e+` Weight: `+i);l<n.distance&&(n.distance=l,n.predecessor=s,o.decrease(t,l))};for(e.nodes().forEach(function(e){var n=e===t?0:1/0;a[e]={distance:n},o.add(e,n)});o.size()>0&&(s=o.removeMin(),c=a[s],c.distance!==1/0);)i(s).forEach(l);return a}})),kw=o(((e,t)=>{var n=Ow();t.exports=r;function r(e,t,r){return e.nodes().reduce(function(i,a){return i[a]=n(e,a,t,r),i},{})}})),Aw=o(((e,t)=>{t.exports=n;function n(e){var t=0,n=[],r={},i=[];function a(o){var s=r[o]={onStack:!0,lowlink:t,index:t++};if(n.push(o),e.successors(o).forEach(function(e){Object.hasOwn(r,e)?r[e].onStack&&(s.lowlink=Math.min(s.lowlink,r[e].index)):(a(e),s.lowlink=Math.min(s.lowlink,r[e].lowlink))}),s.lowlink===s.index){var c=[],l;do l=n.pop(),r[l].onStack=!1,c.push(l);while(o!==l);i.push(c)}}return e.nodes().forEach(function(e){Object.hasOwn(r,e)||a(e)}),i}})),jw=o(((e,t)=>{var n=Aw();t.exports=r;function r(e){return n(e).filter(function(t){return t.length>1||t.length===1&&e.hasEdge(t[0],t[0])})}})),Mw=o(((e,t)=>{t.exports=r;var n=()=>1;function r(e,t,r){return i(e,t||n,r||function(t){return e.outEdges(t)})}function i(e,t,n){var r={},i=e.nodes();return i.forEach(function(e){r[e]={},r[e][e]={distance:0},i.forEach(function(t){e!==t&&(r[e][t]={distance:1/0})}),n(e).forEach(function(n){var i=n.v===e?n.w:n.v,a=t(n);r[e][i]={distance:a,predecessor:e}})}),i.forEach(function(e){var t=r[e];i.forEach(function(n){var a=r[n];i.forEach(function(n){var r=a[e],i=t[n],o=a[n],s=r.distance+i.distance;s<o.distance&&(o.distance=s,o.predecessor=i.predecessor)})})}),r}})),Nw=o(((e,t)=>{function n(e){var t={},n={},i=[];function a(o){if(Object.hasOwn(n,o))throw new r;Object.hasOwn(t,o)||(n[o]=!0,t[o]=!0,e.predecessors(o).forEach(a),delete n[o],i.push(o))}if(e.sinks().forEach(a),Object.keys(t).length!==e.nodeCount())throw new r;return i}var r=class extends Error{constructor(){super(...arguments)}};t.exports=n,n.CycleException=r})),Pw=o(((e,t)=>{var n=Nw();t.exports=r;function r(e){try{n(e)}catch(e){if(e instanceof n.CycleException)return!1;throw e}return!0}})),Fw=o(((e,t)=>{t.exports=n;function n(e,t,n){Array.isArray(t)||(t=[t]);var a=e.isDirected()?t=>e.successors(t):t=>e.neighbors(t),o=n===`post`?r:i,s=[],c={};return t.forEach(t=>{if(!e.hasNode(t))throw Error(`Graph does not have node: `+t);o(t,a,c,s)}),s}function r(e,t,n,r){for(var i=[[e,!1]];i.length>0;){var o=i.pop();o[1]?r.push(o[0]):Object.hasOwn(n,o[0])||(n[o[0]]=!0,i.push([o[0],!0]),a(t(o[0]),e=>i.push([e,!1])))}}function i(e,t,n,r){for(var i=[e];i.length>0;){var o=i.pop();Object.hasOwn(n,o)||(n[o]=!0,r.push(o),a(t(o),e=>i.push(e)))}}function a(e,t){for(var n=e.length;n--;)t(e[n],n,e);return e}})),Iw=o(((e,t)=>{var n=Fw();t.exports=r;function r(e,t){return n(e,t,`post`)}})),Lw=o(((e,t)=>{var n=Fw();t.exports=r;function r(e,t){return n(e,t,`pre`)}})),Rw=o(((e,t)=>{var n=Sw(),r=Dw();t.exports=i;function i(e,t){var i=new n,a={},o=new r,s;function c(e){var n=e.v===s?e.w:e.v,r=o.priority(n);if(r!==void 0){var i=t(e);i<r&&(a[n]=s,o.decrease(n,i))}}if(e.nodeCount()===0)return i;e.nodes().forEach(function(e){o.add(e,1/0),i.setNode(e)}),o.decrease(e.nodes()[0],0);for(var l=!1;o.size()>0;){if(s=o.removeMin(),Object.hasOwn(a,s))i.setEdge(s,a[s]);else if(l)throw Error(`Input graph is not connected: `+e);else l=!0;e.nodeEdges(s).forEach(c)}return i}})),zw=o(((e,t)=>{t.exports={components:Ew(),dijkstra:Ow(),dijkstraAll:kw(),findCycles:jw(),floydWarshall:Mw(),isAcyclic:Pw(),postorder:Iw(),preorder:Lw(),prim:Rw(),tarjan:Aw(),topsort:Nw()}})),Bw=o(((e,t)=>{var n=ww();t.exports={Graph:n.Graph,json:Tw(),alg:zw(),version:n.version}})),Vw=o(((e,t)=>{var n=class{constructor(){let e={};e._next=e._prev=e,this._sentinel=e}dequeue(){let e=this._sentinel,t=e._prev;if(t!==e)return r(t),t}enqueue(e){let t=this._sentinel;e._prev&&e._next&&r(e),e._next=t._next,t._next._prev=e,t._next=e,e._prev=t}toString(){let e=[],t=this._sentinel,n=t._prev;for(;n!==t;)e.push(JSON.stringify(n,i)),n=n._prev;return`[`+e.join(`, `)+`]`}};function r(e){e._prev._next=e._next,e._next._prev=e._prev,delete e._next,delete e._prev}function i(e,t){if(e!==`_next`&&e!==`_prev`)return t}t.exports=n})),Hw=o(((e,t)=>{var n=Bw().Graph,r=Vw();t.exports=a;var i=()=>1;function a(e,t){if(e.nodeCount()<=1)return[];let n=c(e,t||i);return o(n.graph,n.buckets,n.zeroIdx).flatMap(t=>e.outEdges(t.v,t.w))}function o(e,t,n){let r=[],i=t[t.length-1],a=t[0],o;for(;e.nodeCount();){for(;o=a.dequeue();)s(e,t,n,o);for(;o=i.dequeue();)s(e,t,n,o);if(e.nodeCount()){for(let i=t.length-2;i>0;--i)if(o=t[i].dequeue(),o){r=r.concat(s(e,t,n,o,!0));break}}}return r}function s(e,t,n,r,i){let a=i?[]:void 0;return e.inEdges(r.v).forEach(r=>{let o=e.edge(r),s=e.node(r.v);i&&a.push({v:r.v,w:r.w}),s.out-=o,l(t,n,s)}),e.outEdges(r.v).forEach(r=>{let i=e.edge(r),a=r.w,o=e.node(a);o.in-=i,l(t,n,o)}),e.removeNode(r.v),a}function c(e,t){let i=new n,a=0,o=0;e.nodes().forEach(e=>{i.setNode(e,{v:e,in:0,out:0})}),e.edges().forEach(e=>{let n=i.edge(e.v,e.w)||0,r=t(e),s=n+r;i.setEdge(e.v,e.w,s),o=Math.max(o,i.node(e.v).out+=r),a=Math.max(a,i.node(e.w).in+=r)});let s=u(o+a+3).map(()=>new r),c=a+1;return i.nodes().forEach(e=>{l(s,c,i.node(e))}),{graph:i,buckets:s,zeroIdx:c}}function l(e,t,n){n.out?n.in?e[n.out-n.in+t].enqueue(n):e[e.length-1].enqueue(n):e[0].enqueue(n)}function u(e){let t=[];for(let n=0;n<e;n++)t.push(n);return t}})),Uw=o(((e,t)=>{var n=Bw().Graph;t.exports={addBorderNode:f,addDummyNode:r,applyWithChunking:h,asNonCompoundGraph:a,buildLayerMatrix:l,intersectRect:c,mapValues:w,maxRank:g,normalizeRanks:u,notime:y,partition:_,pick:C,predecessorWeights:s,range:S,removeEmptyRanks:d,simplify:i,successorWeights:o,time:v,uniqueId:x,zipObject:T};function r(e,t,n,r){for(var i=r;e.hasNode(i);)i=x(r);return n.dummy=t,e.setNode(i,n),i}function i(e){let t=new n().setGraph(e.graph());return e.nodes().forEach(n=>t.setNode(n,e.node(n))),e.edges().forEach(n=>{let r=t.edge(n.v,n.w)||{weight:0,minlen:1},i=e.edge(n);t.setEdge(n.v,n.w,{weight:r.weight+i.weight,minlen:Math.max(r.minlen,i.minlen)})}),t}function a(e){let t=new n({multigraph:e.isMultigraph()}).setGraph(e.graph());return e.nodes().forEach(n=>{e.children(n).length||t.setNode(n,e.node(n))}),e.edges().forEach(n=>{t.setEdge(n,e.edge(n))}),t}function o(e){let t=e.nodes().map(t=>{let n={};return e.outEdges(t).forEach(t=>{n[t.w]=(n[t.w]||0)+e.edge(t).weight}),n});return T(e.nodes(),t)}function s(e){let t=e.nodes().map(t=>{let n={};return e.inEdges(t).forEach(t=>{n[t.v]=(n[t.v]||0)+e.edge(t).weight}),n});return T(e.nodes(),t)}function c(e,t){let n=e.x,r=e.y,i=t.x-n,a=t.y-r,o=e.width/2,s=e.height/2;if(!i&&!a)throw Error(`Not possible to find intersection inside of the rectangle`);let c,l;return Math.abs(a)*o>Math.abs(i)*s?(a<0&&(s=-s),c=s*i/a,l=s):(i<0&&(o=-o),c=o,l=o*a/i),{x:n+c,y:r+l}}function l(e){let t=S(g(e)+1).map(()=>[]);return e.nodes().forEach(n=>{let r=e.node(n),i=r.rank;i!==void 0&&(t[i][r.order]=n)}),t}function u(e){let t=e.nodes().map(t=>{let n=e.node(t).rank;return n===void 0?Number.MAX_VALUE:n}),n=h(Math.min,t);e.nodes().forEach(t=>{let r=e.node(t);Object.hasOwn(r,`rank`)&&(r.rank-=n)})}function d(e){let t=e.nodes().map(t=>e.node(t).rank),n=h(Math.min,t),r=[];e.nodes().forEach(t=>{let i=e.node(t).rank-n;r[i]||(r[i]=[]),r[i].push(t)});let i=0,a=e.graph().nodeRankFactor;Array.from(r).forEach((t,n)=>{t===void 0&&n%a!==0?--i:t!==void 0&&i&&t.forEach(t=>e.node(t).rank+=i)})}function f(e,t,n,i){let a={width:0,height:0};return arguments.length>=4&&(a.rank=n,a.order=i),r(e,`border`,a,t)}function p(e,t=m){let n=[];for(let r=0;r<e.length;r+=t){let i=e.slice(r,r+t);n.push(i)}return n}var m=65535;function h(e,t){if(t.length>m){let n=p(t);return e.apply(null,n.map(t=>e.apply(null,t)))}return e.apply(null,t)}function g(e){let t=e.nodes().map(t=>{let n=e.node(t).rank;return n===void 0?Number.MIN_VALUE:n});return h(Math.max,t)}function _(e,t){let n={lhs:[],rhs:[]};return e.forEach(e=>{t(e)?n.lhs.push(e):n.rhs.push(e)}),n}function v(e,t){let n=Date.now();try{return t()}finally{console.log(e+` time: `+(Date.now()-n)+`ms`)}}function y(e,t){return t()}var b=0;function x(e){return e+(``+ ++b)}function S(e,t,n=1){t??(t=e,e=0);let r=e=>e<t;n<0&&(r=e=>t<e);let i=[];for(let t=e;r(t);t+=n)i.push(t);return i}function C(e,t){let n={};for(let r of t)e[r]!==void 0&&(n[r]=e[r]);return n}function w(e,t){let n=t;return typeof t==`string`&&(n=e=>e[t]),Object.entries(e).reduce((e,[t,r])=>(e[t]=n(r,t),e),{})}function T(e,t){return e.reduce((e,n,r)=>(e[n]=t[r],e),{})}})),Ww=o(((e,t)=>{var n=Hw(),r=Uw().uniqueId;t.exports={run:i,undo:o};function i(e){(e.graph().acyclicer===`greedy`?n(e,t(e)):a(e)).forEach(t=>{let n=e.edge(t);e.removeEdge(t),n.forwardName=t.name,n.reversed=!0,e.setEdge(t.w,t.v,n,r(`rev`))});function t(e){return t=>e.edge(t).weight}}function a(e){let t=[],n={},r={};function i(a){Object.hasOwn(r,a)||(r[a]=!0,n[a]=!0,e.outEdges(a).forEach(e=>{Object.hasOwn(n,e.w)?t.push(e):i(e.w)}),delete n[a])}return e.nodes().forEach(i),t}function o(e){e.edges().forEach(t=>{let n=e.edge(t);if(n.reversed){e.removeEdge(t);let r=n.forwardName;delete n.reversed,delete n.forwardName,e.setEdge(t.w,t.v,n,r)}})}})),Gw=o(((e,t)=>{var n=Uw();t.exports={run:r,undo:a};function r(e){e.graph().dummyChains=[],e.edges().forEach(t=>i(e,t))}function i(e,t){let r=t.v,i=e.node(r).rank,a=t.w,o=e.node(a).rank,s=t.name,c=e.edge(t),l=c.labelRank;if(o===i+1)return;e.removeEdge(t);let u,d,f=0;for(++i;i<o;++f,++i)c.points=[],d={width:0,height:0,edgeLabel:c,edgeObj:t,rank:i},u=n.addDummyNode(e,`edge`,d,`_d`),i===l&&(d.width=c.width,d.height=c.height,d.dummy=`edge-label`,d.labelpos=c.labelpos),e.setEdge(r,u,{weight:c.weight},s),f===0&&e.graph().dummyChains.push(u),r=u;e.setEdge(r,a,{weight:c.weight},s)}function a(e){e.graph().dummyChains.forEach(t=>{let n=e.node(t),r=n.edgeLabel,i;for(e.setEdge(n.edgeObj,r);n.dummy;)i=e.successors(t)[0],e.removeNode(t),r.points.push({x:n.x,y:n.y}),n.dummy===`edge-label`&&(r.x=n.x,r.y=n.y,r.width=n.width,r.height=n.height),t=i,n=e.node(t)})}})),Kw=o(((e,t)=>{var{applyWithChunking:n}=Uw();t.exports={longestPath:r,slack:i};function r(e){var t={};function r(i){var a=e.node(i);if(Object.hasOwn(t,i))return a.rank;t[i]=!0;let o=e.outEdges(i).map(t=>t==null?1/0:r(t.w)-e.edge(t).minlen);var s=n(Math.min,o);return s===1/0&&(s=0),a.rank=s}e.sources().forEach(r)}function i(e,t){return e.node(t.w).rank-e.node(t.v).rank-e.edge(t).minlen}})),qw=o(((e,t)=>{var n=Bw().Graph,r=Kw().slack;t.exports=i;function i(e){var t=new n({directed:!1}),i=e.nodes()[0],c=e.nodeCount();t.setNode(i,{});for(var l,u;a(t,e)<c;)l=o(t,e),u=t.hasNode(l.v)?r(e,l):-r(e,l),s(t,e,u);return t}function a(e,t){function n(i){t.nodeEdges(i).forEach(a=>{var o=a.v,s=i===o?a.w:o;!e.hasNode(s)&&!r(t,a)&&(e.setNode(s,{}),e.setEdge(i,s,{}),n(s))})}return e.nodes().forEach(n),e.nodeCount()}function o(e,t){return t.edges().reduce((n,i)=>{let a=1/0;return e.hasNode(i.v)!==e.hasNode(i.w)&&(a=r(t,i)),a<n[0]?[a,i]:n},[1/0,null])[1]}function s(e,t,n){e.nodes().forEach(e=>t.node(e).rank+=n)}})),Jw=o(((e,t)=>{var n=qw(),r=Kw().slack,i=Kw().longestPath,a=Bw().alg.preorder,o=Bw().alg.postorder,s=Uw().simplify;t.exports=c,c.initLowLimValues=f,c.initCutValues=l,c.calcCutValue=d,c.leaveEdge=m,c.enterEdge=h,c.exchangeEdges=g;function c(e){e=s(e),i(e);var t=n(e);f(t),l(t,e);for(var r,a;r=m(t);)a=h(t,e,r),g(t,e,r,a)}function l(e,t){var n=o(e,e.nodes());n=n.slice(0,n.length-1),n.forEach(n=>u(e,t,n))}function u(e,t,n){var r=e.node(n).parent;e.edge(n,r).cutvalue=d(e,t,n)}function d(e,t,n){var r=e.node(n).parent,i=!0,a=t.edge(n,r),o=0;return a||=(i=!1,t.edge(r,n)),o=a.weight,t.nodeEdges(n).forEach(a=>{var s=a.v===n,c=s?a.w:a.v;if(c!==r){var l=s===i,u=t.edge(a).weight;if(o+=l?u:-u,v(e,n,c)){var d=e.edge(n,c).cutvalue;o+=l?-d:d}}}),o}function f(e,t){arguments.length<2&&(t=e.nodes()[0]),p(e,{},1,t)}function p(e,t,n,r,i){var a=n,o=e.node(r);return t[r]=!0,e.neighbors(r).forEach(i=>{Object.hasOwn(t,i)||(n=p(e,t,n,i,r))}),o.low=a,o.lim=n++,i?o.parent=i:delete o.parent,n}function m(e){return e.edges().find(t=>e.edge(t).cutvalue<0)}function h(e,t,n){var i=n.v,a=n.w;t.hasEdge(i,a)||(i=n.w,a=n.v);var o=e.node(i),s=e.node(a),c=o,l=!1;return o.lim>s.lim&&(c=s,l=!0),t.edges().filter(t=>l===y(e,e.node(t.v),c)&&l!==y(e,e.node(t.w),c)).reduce((e,n)=>r(t,n)<r(t,e)?n:e)}function g(e,t,n,r){var i=n.v,a=n.w;e.removeEdge(i,a),e.setEdge(r.v,r.w,{}),f(e),l(e,t),_(e,t)}function _(e,t){var n=a(e,e.nodes().find(e=>!t.node(e).parent));n=n.slice(1),n.forEach(n=>{var r=e.node(n).parent,i=t.edge(n,r),a=!1;i||(i=t.edge(r,n),a=!0),t.node(n).rank=t.node(r).rank+(a?i.minlen:-i.minlen)})}function v(e,t,n){return e.hasEdge(t,n)}function y(e,t,n){return n.low<=t.lim&&t.lim<=n.lim}})),Yw=o(((e,t)=>{var n=Kw().longestPath,r=qw(),i=Jw();t.exports=a;function a(e){var t=e.graph().ranker;if(t instanceof Function)return t(e);switch(e.graph().ranker){case`network-simplex`:c(e);break;case`tight-tree`:s(e);break;case`longest-path`:o(e);break;case`none`:break;default:c(e)}}var o=n;function s(e){n(e),r(e)}function c(e){i(e)}})),Xw=o(((e,t)=>{t.exports=n;function n(e){let t=i(e);e.graph().dummyChains.forEach(n=>{let i=e.node(n),a=i.edgeObj,o=r(e,t,a.v,a.w),s=o.path,c=o.lca,l=0,u=s[l],d=!0;for(;n!==a.w;){if(i=e.node(n),d){for(;(u=s[l])!==c&&e.node(u).maxRank<i.rank;)l++;u===c&&(d=!1)}if(!d){for(;l<s.length-1&&e.node(u=s[l+1]).minRank<=i.rank;)l++;u=s[l]}e.setParent(n,u),n=e.successors(n)[0]}})}function r(e,t,n,r){let i=[],a=[],o=Math.min(t[n].low,t[r].low),s=Math.max(t[n].lim,t[r].lim),c,l;c=n;do c=e.parent(c),i.push(c);while(c&&(t[c].low>o||s>t[c].lim));for(l=c,c=r;(c=e.parent(c))!==l;)a.push(c);return{path:i.concat(a.reverse()),lca:l}}function i(e){let t={},n=0;function r(i){let a=n;e.children(i).forEach(r),t[i]={low:a,lim:n++}}return e.children().forEach(r),t}})),Zw=o(((e,t)=>{var n=Uw();t.exports={run:r,cleanup:s};function r(e){let t=n.addDummyNode(e,`root`,{},`_root`),r=a(e),s=Object.values(r),c=n.applyWithChunking(Math.max,s)-1,l=2*c+1;e.graph().nestingRoot=t,e.edges().forEach(t=>e.edge(t).minlen*=l);let u=o(e)+1;e.children().forEach(n=>i(e,t,l,u,c,r,n)),e.graph().nodeRankFactor=l}function i(e,t,r,a,o,s,c){let l=e.children(c);if(!l.length){c!==t&&e.setEdge(t,c,{weight:0,minlen:r});return}let u=n.addBorderNode(e,`_bt`),d=n.addBorderNode(e,`_bb`),f=e.node(c);e.setParent(u,c),f.borderTop=u,e.setParent(d,c),f.borderBottom=d,l.forEach(n=>{i(e,t,r,a,o,s,n);let l=e.node(n),f=l.borderTop?l.borderTop:n,p=l.borderBottom?l.borderBottom:n,m=l.borderTop?a:2*a,h=f===p?o-s[c]+1:1;e.setEdge(u,f,{weight:m,minlen:h,nestingEdge:!0}),e.setEdge(p,d,{weight:m,minlen:h,nestingEdge:!0})}),e.parent(c)||e.setEdge(t,u,{weight:0,minlen:o+s[c]})}function a(e){var t={};function n(r,i){var a=e.children(r);a&&a.length&&a.forEach(e=>n(e,i+1)),t[r]=i}return e.children().forEach(e=>n(e,1)),t}function o(e){return e.edges().reduce((t,n)=>t+e.edge(n).weight,0)}function s(e){var t=e.graph();e.removeNode(t.nestingRoot),delete t.nestingRoot,e.edges().forEach(t=>{e.edge(t).nestingEdge&&e.removeEdge(t)})}})),Qw=o(((e,t)=>{var n=Uw();t.exports=r;function r(e){function t(n){let r=e.children(n),a=e.node(n);if(r.length&&r.forEach(t),Object.hasOwn(a,`minRank`)){a.borderLeft=[],a.borderRight=[];for(let t=a.minRank,r=a.maxRank+1;t<r;++t)i(e,`borderLeft`,`_bl`,n,a,t),i(e,`borderRight`,`_br`,n,a,t)}}e.children().forEach(t)}function i(e,t,r,i,a,o){let s={width:0,height:0,rank:o,borderType:t},c=a[t][o-1],l=n.addDummyNode(e,`border`,s,r);a[t][o]=l,e.setParent(l,i),c&&e.setEdge(c,l,{weight:1})}})),$w=o(((e,t)=>{t.exports={adjust:n,undo:r};function n(e){let t=e.graph().rankdir.toLowerCase();(t===`lr`||t===`rl`)&&i(e)}function r(e){let t=e.graph().rankdir.toLowerCase();(t===`bt`||t===`rl`)&&o(e),(t===`lr`||t===`rl`)&&(c(e),i(e))}function i(e){e.nodes().forEach(t=>a(e.node(t))),e.edges().forEach(t=>a(e.edge(t)))}function a(e){let t=e.width;e.width=e.height,e.height=t}function o(e){e.nodes().forEach(t=>s(e.node(t))),e.edges().forEach(t=>{let n=e.edge(t);n.points.forEach(s),Object.hasOwn(n,`y`)&&s(n)})}function s(e){e.y=-e.y}function c(e){e.nodes().forEach(t=>l(e.node(t))),e.edges().forEach(t=>{let n=e.edge(t);n.points.forEach(l),Object.hasOwn(n,`x`)&&l(n)})}function l(e){let t=e.x;e.x=e.y,e.y=t}})),eT=o(((e,t)=>{var n=Uw();t.exports=r;function r(e){let t={},r=e.nodes().filter(t=>!e.children(t).length),i=r.map(t=>e.node(t).rank),a=n.applyWithChunking(Math.max,i),o=n.range(a+1).map(()=>[]);function s(n){if(t[n])return;t[n]=!0;let r=e.node(n);o[r.rank].push(n),e.successors(n).forEach(s)}return r.sort((t,n)=>e.node(t).rank-e.node(n).rank).forEach(s),o}})),tT=o(((e,t)=>{var n=Uw().zipObject;t.exports=r;function r(e,t){let n=0;for(let r=1;r<t.length;++r)n+=i(e,t[r-1],t[r]);return n}function i(e,t,r){let i=n(r,r.map((e,t)=>t)),a=t.flatMap(t=>e.outEdges(t).map(t=>({pos:i[t.w],weight:e.edge(t).weight})).sort((e,t)=>e.pos-t.pos)),o=1;for(;o<r.length;)o<<=1;let s=2*o-1;--o;let c=Array(s).fill(0),l=0;return a.forEach(e=>{let t=e.pos+o;c[t]+=e.weight;let n=0;for(;t>0;)t%2&&(n+=c[t+1]),t=t-1>>1,c[t]+=e.weight;l+=e.weight*n}),l}})),nT=o(((e,t)=>{t.exports=n;function n(e,t=[]){return t.map(t=>{let n=e.inEdges(t);if(n.length){let r=n.reduce((t,n)=>{let r=e.edge(n),i=e.node(n.v);return{sum:t.sum+r.weight*i.order,weight:t.weight+r.weight}},{sum:0,weight:0});return{v:t,barycenter:r.sum/r.weight,weight:r.weight}}return{v:t}})}})),rT=o(((e,t)=>{var n=Uw();t.exports=r;function r(e,t){let n={};return e.forEach((e,t)=>{let r=n[e.v]={indegree:0,in:[],out:[],vs:[e.v],i:t};e.barycenter!==void 0&&(r.barycenter=e.barycenter,r.weight=e.weight)}),t.edges().forEach(e=>{let t=n[e.v],r=n[e.w];t!==void 0&&r!==void 0&&(r.indegree++,t.out.push(n[e.w]))}),i(Object.values(n).filter(e=>!e.indegree))}function i(e){let t=[];function r(e){return t=>{t.merged||(t.barycenter===void 0||e.barycenter===void 0||t.barycenter>=e.barycenter)&&a(e,t)}}function i(t){return n=>{n.in.push(t),--n.indegree===0&&e.push(n)}}for(;e.length;){let n=e.pop();t.push(n),n.in.reverse().forEach(r(n)),n.out.forEach(i(n))}return t.filter(e=>!e.merged).map(e=>n.pick(e,[`vs`,`i`,`barycenter`,`weight`]))}function a(e,t){let n=0,r=0;e.weight&&(n+=e.barycenter*e.weight,r+=e.weight),t.weight&&(n+=t.barycenter*t.weight,r+=t.weight),e.vs=t.vs.concat(e.vs),e.barycenter=n/r,e.weight=r,e.i=Math.min(t.i,e.i),t.merged=!0}})),iT=o(((e,t)=>{var n=Uw();t.exports=r;function r(e,t){let r=n.partition(e,e=>Object.hasOwn(e,`barycenter`)),o=r.lhs,s=r.rhs.sort((e,t)=>t.i-e.i),c=[],l=0,u=0,d=0;o.sort(a(!!t)),d=i(c,s,d),o.forEach(e=>{d+=e.vs.length,c.push(e.vs),l+=e.barycenter*e.weight,u+=e.weight,d=i(c,s,d)});let f={vs:c.flat(!0)};return u&&(f.barycenter=l/u,f.weight=u),f}function i(e,t,n){let r;for(;t.length&&(r=t[t.length-1]).i<=n;)t.pop(),e.push(r.vs),n++;return n}function a(e){return(t,n)=>t.barycenter<n.barycenter?-1:t.barycenter>n.barycenter?1:e?n.i-t.i:t.i-n.i}})),aT=o(((e,t)=>{var n=nT(),r=rT(),i=iT();t.exports=a;function a(e,t,c,l){let u=e.children(t),d=e.node(t),f=d?d.borderLeft:void 0,p=d?d.borderRight:void 0,m={};f&&(u=u.filter(e=>e!==f&&e!==p));let h=n(e,u);h.forEach(t=>{if(e.children(t.v).length){let n=a(e,t.v,c,l);m[t.v]=n,Object.hasOwn(n,`barycenter`)&&s(t,n)}});let g=r(h,c);o(g,m);let _=i(g,l);if(f&&(_.vs=[f,_.vs,p].flat(!0),e.predecessors(f).length)){let t=e.node(e.predecessors(f)[0]),n=e.node(e.predecessors(p)[0]);Object.hasOwn(_,`barycenter`)||(_.barycenter=0,_.weight=0),_.barycenter=(_.barycenter*_.weight+t.order+n.order)/(_.weight+2),_.weight+=2}return _}function o(e,t){e.forEach(e=>{e.vs=e.vs.flatMap(e=>t[e]?t[e].vs:e)})}function s(e,t){e.barycenter===void 0?(e.barycenter=t.barycenter,e.weight=t.weight):(e.barycenter=(e.barycenter*e.weight+t.barycenter*t.weight)/(e.weight+t.weight),e.weight+=t.weight)}})),oT=o(((e,t)=>{var n=Bw().Graph,r=Uw();t.exports=i;function i(e,t,r,i){i||=e.nodes();let o=a(e),s=new n({compound:!0}).setGraph({root:o}).setDefaultNodeLabel(t=>e.node(t));return i.forEach(n=>{let i=e.node(n),a=e.parent(n);(i.rank===t||i.minRank<=t&&t<=i.maxRank)&&(s.setNode(n),s.setParent(n,a||o),e[r](n).forEach(t=>{let r=t.v===n?t.w:t.v,i=s.edge(r,n),a=i===void 0?0:i.weight;s.setEdge(r,n,{weight:e.edge(t).weight+a})}),Object.hasOwn(i,`minRank`)&&s.setNode(n,{borderLeft:i.borderLeft[t],borderRight:i.borderRight[t]}))}),s}function a(e){for(var t;e.hasNode(t=r.uniqueId(`_root`)););return t}})),sT=o(((e,t)=>{t.exports=n;function n(e,t,n){let r={},i;n.forEach(n=>{let a=e.parent(n),o,s;for(;a;){if(o=e.parent(a),o?(s=r[o],r[o]=a):(s=i,i=a),s&&s!==a){t.setEdge(s,a);return}a=o}})}})),cT=o(((e,t)=>{var n=eT(),r=tT(),i=aT(),a=oT(),o=sT(),s=Bw().Graph,c=Uw();t.exports=l;function l(e,t){if(t&&typeof t.customOrder==`function`){t.customOrder(e,l);return}let i=c.maxRank(e),a=u(e,c.range(1,i+1),`inEdges`),o=u(e,c.range(i-1,-1,-1),`outEdges`),s=n(e);if(f(e,s),t&&t.disableOptimalOrderHeuristic)return;let p=1/0,m;for(let t=0,n=0;n<4;++t,++n){d(t%2?a:o,t%4>=2),s=c.buildLayerMatrix(e);let i=r(e,s);i<p&&(n=0,m=Object.assign({},s),p=i)}f(e,m)}function u(e,t,n){let r=new Map,i=(e,t)=>{r.has(e)||r.set(e,[]),r.get(e).push(t)};for(let t of e.nodes()){let n=e.node(t);if(typeof n.rank==`number`&&i(n.rank,t),typeof n.minRank==`number`&&typeof n.maxRank==`number`)for(let e=n.minRank;e<=n.maxRank;e++)e!==n.rank&&i(e,t)}return t.map(function(t){return a(e,t,n,r.get(t)||[])})}function d(e,t){let n=new s;e.forEach(function(e){let r=e.graph().root,a=i(e,r,n,t);a.vs.forEach((t,n)=>e.node(t).order=n),o(e,n,a.vs)})}function f(e,t){Object.values(t).forEach(t=>t.forEach((t,n)=>e.node(t).order=n))}})),lT=o(((e,t)=>{var n=Bw().Graph,r=Uw();t.exports={positionX:h,findType1Conflicts:i,findType2Conflicts:a,addConflict:s,hasConflict:c,verticalAlignment:l,horizontalCompaction:u,alignCoordinates:p,findSmallestWidthAlignment:f,balance:m};function i(e,t){let n={};function r(t,r){let i=0,a=0,c=t.length,l=r[r.length-1];return r.forEach((t,u)=>{let d=o(e,t),f=d?e.node(d).order:c;(d||t===l)&&(r.slice(a,u+1).forEach(t=>{e.predecessors(t).forEach(r=>{let a=e.node(r),o=a.order;(o<i||f<o)&&!(a.dummy&&e.node(t).dummy)&&s(n,r,t)})}),a=u+1,i=f)}),r}return t.length&&t.reduce(r),n}function a(e,t){let n={};function i(t,i,a,o,c){let l;r.range(i,a).forEach(r=>{l=t[r],e.node(l).dummy&&e.predecessors(l).forEach(t=>{let r=e.node(t);r.dummy&&(r.order<o||r.order>c)&&s(n,t,l)})})}function a(t,n){let r=-1,a,o=0;return n.forEach((s,c)=>{if(e.node(s).dummy===`border`){let t=e.predecessors(s);t.length&&(a=e.node(t[0]).order,i(n,o,c,r,a),o=c,r=a)}i(n,o,n.length,a,t.length)}),n}return t.length&&t.reduce(a),n}function o(e,t){if(e.node(t).dummy)return e.predecessors(t).find(t=>e.node(t).dummy)}function s(e,t,n){if(t>n){let e=t;t=n,n=e}let r=e[t];r||(e[t]=r={}),r[n]=!0}function c(e,t,n){if(t>n){let e=t;t=n,n=e}return!!e[t]&&Object.hasOwn(e[t],n)}function l(e,t,n,r){let i={},a={},o={};return t.forEach(e=>{e.forEach((e,t)=>{i[e]=e,a[e]=e,o[e]=t})}),t.forEach(e=>{let t=-1;e.forEach(e=>{let s=r(e);if(s.length){s=s.sort((e,t)=>o[e]-o[t]);let r=(s.length-1)/2;for(let l=Math.floor(r),u=Math.ceil(r);l<=u;++l){let r=s[l];a[e]===e&&t<o[r]&&!c(n,e,r)&&(a[r]=e,a[e]=i[e]=i[r],t=o[r])}}})}),{root:i,align:a}}function u(e,t,n,r,i){let a={},o=d(e,t,n,i),s=i?`borderLeft`:`borderRight`;function c(e,t){let n=o.nodes(),r=n.pop(),i={};for(;r;)i[r]?e(r):(i[r]=!0,n.push(r),n=n.concat(t(r))),r=n.pop()}function l(e){a[e]=o.inEdges(e).reduce((e,t)=>Math.max(e,a[t.v]+o.edge(t)),0)}function u(t){let n=o.outEdges(t).reduce((e,t)=>Math.min(e,a[t.w]-o.edge(t)),1/0),r=e.node(t);n!==1/0&&r.borderType!==s&&(a[t]=Math.max(a[t],n))}return c(l,o.predecessors.bind(o)),c(u,o.successors.bind(o)),Object.keys(r).forEach(e=>a[e]=a[n[e]]),a}function d(e,t,r,i){let a=new n,o=e.graph(),s=g(o.nodesep,o.edgesep,i);return t.forEach(t=>{let n;t.forEach(t=>{let i=r[t];if(a.setNode(i),n){var o=r[n],c=a.edge(o,i);a.setEdge(o,i,Math.max(s(e,t,n),c||0))}n=t})}),a}function f(e,t){return Object.values(t).reduce((t,n)=>{let r=-1/0,i=1/0;Object.entries(n).forEach(([t,n])=>{let a=_(e,t)/2;r=Math.max(n+a,r),i=Math.min(n-a,i)});let a=r-i;return a<t[0]&&(t=[a,n]),t},[1/0,null])[1]}function p(e,t){let n=Object.values(t),i=r.applyWithChunking(Math.min,n),a=r.applyWithChunking(Math.max,n);[`u`,`d`].forEach(n=>{[`l`,`r`].forEach(o=>{let s=n+o,c=e[s];if(c===t)return;let l=Object.values(c),u=i-r.applyWithChunking(Math.min,l);o!==`l`&&(u=a-r.applyWithChunking(Math.max,l)),u&&(e[s]=r.mapValues(c,e=>e+u))})})}function m(e,t){return r.mapValues(e.ul,(n,r)=>{if(t)return e[t.toLowerCase()][r];{let t=Object.values(e).map(e=>e[r]).sort((e,t)=>e-t);return(t[1]+t[2])/2}})}function h(e){let t=r.buildLayerMatrix(e),n=Object.assign(i(e,t),a(e,t)),o={},s;return[`u`,`d`].forEach(i=>{s=i===`u`?t:Object.values(t).reverse(),[`l`,`r`].forEach(t=>{t===`r`&&(s=s.map(e=>Object.values(e).reverse()));let a=(i===`u`?e.predecessors:e.successors).bind(e),c=l(e,s,n,a),d=u(e,s,c.root,c.align,t===`r`);t===`r`&&(d=r.mapValues(d,e=>-e)),o[i+t]=d})}),p(o,f(e,o)),m(o,e.graph().align)}function g(e,t,n){return(r,i,a)=>{let o=r.node(i),s=r.node(a),c=0,l;if(c+=o.width/2,Object.hasOwn(o,`labelpos`))switch(o.labelpos.toLowerCase()){case`l`:l=-o.width/2;break;case`r`:l=o.width/2}if(l&&(c+=n?l:-l),l=0,c+=(o.dummy?t:e)/2,c+=(s.dummy?t:e)/2,c+=s.width/2,Object.hasOwn(s,`labelpos`))switch(s.labelpos.toLowerCase()){case`l`:l=s.width/2;break;case`r`:l=-s.width/2}return l&&(c+=n?l:-l),l=0,c}}function _(e,t){return e.node(t).width}})),uT=o(((e,t)=>{var n=Uw(),r=lT().positionX;t.exports=i;function i(e){e=n.asNonCompoundGraph(e),a(e),Object.entries(r(e)).forEach(([t,n])=>e.node(t).x=n)}function a(e){let t=n.buildLayerMatrix(e),r=e.graph().ranksep,i=0;t.forEach(t=>{let n=t.reduce((t,n)=>{let r=e.node(n).height;return t>r?t:r},0);t.forEach(t=>e.node(t).y=i+n/2),i+=n+r})}})),dT=o(((e,t)=>{var n=Ww(),r=Gw(),i=Yw(),a=Uw().normalizeRanks,o=Xw(),s=Uw().removeEmptyRanks,c=Zw(),l=Qw(),u=$w(),d=cT(),f=uT(),p=Uw(),m=Bw().Graph;t.exports=h;function h(e,t){let n=t&&t.debugTiming?p.time:p.notime;n(`layout`,()=>{let r=n(` buildLayoutGraph`,()=>E(e));n(` runLayout`,()=>g(r,n,t)),n(` updateInputGraph`,()=>_(e,r))})}function g(e,t,m){t(` makeSpaceForEdgeLabels`,()=>D(e)),t(` removeSelfEdges`,()=>I(e)),t(` acyclic`,()=>n.run(e)),t(` nestingGraph.run`,()=>c.run(e)),t(` rank`,()=>i(p.asNonCompoundGraph(e))),t(` injectEdgeLabelProxies`,()=>O(e)),t(` removeEmptyRanks`,()=>s(e)),t(` nestingGraph.cleanup`,()=>c.cleanup(e)),t(` normalizeRanks`,()=>a(e)),t(` assignRankMinMax`,()=>k(e)),t(` removeEdgeLabelProxies`,()=>A(e)),t(` normalize.run`,()=>r.run(e)),t(` parentDummyChains`,()=>o(e)),t(` addBorderSegments`,()=>l(e)),t(` order`,()=>d(e,m)),t(` insertSelfEdges`,()=>L(e)),t(` adjustCoordinateSystem`,()=>u.adjust(e)),t(` position`,()=>f(e)),t(` positionSelfEdges`,()=>ee(e)),t(` removeBorderNodes`,()=>F(e)),t(` normalize.undo`,()=>r.undo(e)),t(` fixupEdgeLabelCoords`,()=>N(e)),t(` undoCoordinateSystem`,()=>u.undo(e)),t(` translateGraph`,()=>j(e)),t(` assignNodeIntersects`,()=>M(e)),t(` reversePoints`,()=>P(e)),t(` acyclic.undo`,()=>n.undo(e))}function _(e,t){e.nodes().forEach(n=>{let r=e.node(n),i=t.node(n);r&&(r.x=i.x,r.y=i.y,r.rank=i.rank,t.children(n).length&&(r.width=i.width,r.height=i.height))}),e.edges().forEach(n=>{let r=e.edge(n),i=t.edge(n);r.points=i.points,Object.hasOwn(i,`x`)&&(r.x=i.x,r.y=i.y)}),e.graph().width=t.graph().width,e.graph().height=t.graph().height}var v=[`nodesep`,`edgesep`,`ranksep`,`marginx`,`marginy`],y={ranksep:50,edgesep:20,nodesep:50,rankdir:`tb`},b=[`acyclicer`,`ranker`,`rankdir`,`align`],x=[`width`,`height`,`rank`],S={width:0,height:0},C=[`minlen`,`weight`,`width`,`height`,`labeloffset`],w={minlen:1,weight:1,width:0,height:0,labeloffset:10,labelpos:`r`},T=[`labelpos`];function E(e){let t=new m({multigraph:!0,compound:!0}),n=te(e.graph());return t.setGraph(Object.assign({},y,R(n,v),p.pick(n,b))),e.nodes().forEach(n=>{let r=R(te(e.node(n)),x);Object.keys(S).forEach(e=>{r[e]===void 0&&(r[e]=S[e])}),t.setNode(n,r),t.setParent(n,e.parent(n))}),e.edges().forEach(n=>{let r=te(e.edge(n));t.setEdge(n,Object.assign({},w,R(r,C),p.pick(r,T)))}),t}function D(e){let t=e.graph();t.ranksep/=2,e.edges().forEach(n=>{let r=e.edge(n);r.minlen*=2,r.labelpos.toLowerCase()!==`c`&&(t.rankdir===`TB`||t.rankdir===`BT`?r.width+=r.labeloffset:r.height+=r.labeloffset)})}function O(e){e.edges().forEach(t=>{let n=e.edge(t);if(n.width&&n.height){let n=e.node(t.v),r={rank:(e.node(t.w).rank-n.rank)/2+n.rank,e:t};p.addDummyNode(e,`edge-proxy`,r,`_ep`)}})}function k(e){let t=0;e.nodes().forEach(n=>{let r=e.node(n);r.borderTop&&(r.minRank=e.node(r.borderTop).rank,r.maxRank=e.node(r.borderBottom).rank,t=Math.max(t,r.maxRank))}),e.graph().maxRank=t}function A(e){e.nodes().forEach(t=>{let n=e.node(t);n.dummy===`edge-proxy`&&(e.edge(n.e).labelRank=n.rank,e.removeNode(t))})}function j(e){let t=1/0,n=0,r=1/0,i=0,a=e.graph(),o=a.marginx||0,s=a.marginy||0;function c(e){let a=e.x,o=e.y,s=e.width,c=e.height;t=Math.min(t,a-s/2),n=Math.max(n,a+s/2),r=Math.min(r,o-c/2),i=Math.max(i,o+c/2)}e.nodes().forEach(t=>c(e.node(t))),e.edges().forEach(t=>{let n=e.edge(t);Object.hasOwn(n,`x`)&&c(n)}),t-=o,r-=s,e.nodes().forEach(n=>{let i=e.node(n);i.x-=t,i.y-=r}),e.edges().forEach(n=>{let i=e.edge(n);i.points.forEach(e=>{e.x-=t,e.y-=r}),Object.hasOwn(i,`x`)&&(i.x-=t),Object.hasOwn(i,`y`)&&(i.y-=r)}),a.width=n-t+o,a.height=i-r+s}function M(e){e.edges().forEach(t=>{let n=e.edge(t),r=e.node(t.v),i=e.node(t.w),a,o;n.points?(a=n.points[0],o=n.points[n.points.length-1]):(n.points=[],a=i,o=r),n.points.unshift(p.intersectRect(r,a)),n.points.push(p.intersectRect(i,o))})}function N(e){e.edges().forEach(t=>{let n=e.edge(t);if(Object.hasOwn(n,`x`))switch((n.labelpos===`l`||n.labelpos===`r`)&&(n.width-=n.labeloffset),n.labelpos){case`l`:n.x-=n.width/2+n.labeloffset;break;case`r`:n.x+=n.width/2+n.labeloffset}})}function P(e){e.edges().forEach(t=>{let n=e.edge(t);n.reversed&&n.points.reverse()})}function F(e){e.nodes().forEach(t=>{if(e.children(t).length){let n=e.node(t),r=e.node(n.borderTop),i=e.node(n.borderBottom),a=e.node(n.borderLeft[n.borderLeft.length-1]),o=e.node(n.borderRight[n.borderRight.length-1]);n.width=Math.abs(o.x-a.x),n.height=Math.abs(i.y-r.y),n.x=a.x+n.width/2,n.y=r.y+n.height/2}}),e.nodes().forEach(t=>{e.node(t).dummy===`border`&&e.removeNode(t)})}function I(e){e.edges().forEach(t=>{if(t.v===t.w){var n=e.node(t.v);n.selfEdges||=[],n.selfEdges.push({e:t,label:e.edge(t)}),e.removeEdge(t)}})}function L(e){p.buildLayerMatrix(e).forEach(t=>{var n=0;t.forEach((t,r)=>{var i=e.node(t);i.order=r+n,(i.selfEdges||[]).forEach(t=>{p.addDummyNode(e,`selfedge`,{width:t.label.width,height:t.label.height,rank:i.rank,order:r+ ++n,e:t.e,label:t.label},`_se`)}),delete i.selfEdges})})}function ee(e){e.nodes().forEach(t=>{var n=e.node(t);if(n.dummy===`selfedge`){var r=e.node(n.e.v),i=r.x+r.width/2,a=r.y,o=n.x-i,s=r.height/2;e.setEdge(n.e,n.label),e.removeNode(t),n.label.points=[{x:i+2*o/3,y:a-s},{x:i+5*o/6,y:a-s},{x:i+o,y:a},{x:i+5*o/6,y:a+s},{x:i+2*o/3,y:a+s}],n.label.x=n.x,n.label.y=n.y}})}function R(e,t){return p.mapValues(p.pick(e,t),Number)}function te(e){var t={};return e&&Object.entries(e).forEach(([e,n])=>{typeof e==`string`&&(e=e.toLowerCase()),t[e]=n}),t}})),fT=o(((e,t)=>{var n=Uw(),r=Bw().Graph;t.exports={debugOrdering:i};function i(e){let t=n.buildLayerMatrix(e),i=new r({compound:!0,multigraph:!0}).setGraph({});return e.nodes().forEach(t=>{i.setNode(t,{label:t}),i.setParent(t,`layer`+e.node(t).rank)}),e.edges().forEach(e=>i.setEdge(e.v,e.w,{},e.name)),t.forEach((e,t)=>{let n=`layer`+t;i.setNode(n,{rank:`same`}),e.reduce((e,t)=>(i.setEdge(e,t,{style:`invis`}),t))}),i}})),pT=o(((e,t)=>{t.exports=`1.1.8`})),mT=l(o(((e,t)=>{t.exports={graphlib:Bw(),layout:dT(),debug:fT(),util:{time:Uw().time,notime:Uw().notime},version:pT()}}))(),1),hT=e=>`overview:${e}`,gT=(e,t)=>`elsewhere:${e}:${t}`,_T=e=>`elsewhere:${e}`;function vT(e){return e.flatMap(e=>e.deps.flatMap(t=>{let n=bw(t);return n===null?[]:[{ghostId:gT(n.project,n.ref),...n,dependent:e.id}]}))}var yT=[`#4f9dff`,`#f472b6`,`#34d399`,`#fb923c`,`#a884f3`,`#22d3ee`,`#fbbf24`,`#f87171`,`#a3e635`,`#e879f9`],bT=[`#9ec9ff`,`#f9b1d7`,`#8fe7c7`,`#fdc394`,`#cfbbf8`,`#85e7f6`,`#fddc87`,`#fbb1b1`,`#ccf190`,`#f2b5fc`];function xT(e){let t=2166136261;for(let n=0;n<e.length;n++)t=Math.imul(t^e.charCodeAt(n),16777619);return(t>>>0)%yT.length}function ST(e,t=[]){let n=new Set(e),r=[...t.filter(e=>n.has(e)),...e.filter(e=>!t.includes(e))],i=[...yT,...bT],a=new Set,o={};for(let e of new Set(r)){let t=xT(e),n=Array.from({length:i.length},(e,n)=>n<yT.length?(t+n)%yT.length:yT.length+(t+n)%yT.length).find(e=>!a.has(e))??t;a.add(n),o[e]=i[n]}return o}var CT=212,wT=62,TT=3,ET=13,DT=17,OT=184,kT=42,AT=e=>` `.includes(e)?.28:"iljI.,:;'!|`".includes(e)?.3:`frt()[]{}-/\\"`.includes(e)?.4:`mwMW@%`.includes(e)?.9:e>=`A`&&e<=`Z`?.72:e>=`0`&&e<=`9`?.6:.57,jT=e=>[...e].reduce((e,t)=>e+AT(t),0)*ET*1.06;function MT(e){let t=1,n=0;for(let r of e.split(/\s+/).filter(Boolean)){let e=jT(r),i=n===0?e:n+jT(` `)+e;i<=OT?n=i:(t+=n===0?0:1,t+=Math.floor(e/OT),n=e%OT)}return Math.min(t,TT)}var NT=e=>Math.max(wT,kT+MT(e.title)*DT),PT={x:64,y:34},FT=18,IT=46,LT=52,RT=e=>e?.startsWith(`area:`)?LT:IT,zT=20,BT={x:68,y:68},VT={width:248,height:104},HT=e=>`area:${e}`,UT=34,WT=12,GT=92,KT=10,qT=e=>Math.round(e/KT)*KT,JT=e=>Math.ceil(e/KT)*KT,YT=30,XT=(e,t)=>e.filter(e=>e.parent===t);function ZT(e,t,n){let r=new Map;for(let t of e)t.parent&&r.set(t.parent,[...r.get(t.parent)??[],t]);let i=new Map,a=e=>{let o=i.get(e.id);if(o!==void 0)return o;let s=r.get(e.id)??[],c=(t.has(e.area)||n.has(e.status))&&s.every(a);return i.set(e.id,c),c};return new Set(e.filter(a).map(e=>e.id))}var QT=(e,t)=>e===t||e.startsWith(`${t}.`)||t.startsWith(`${e}.`);function $T(e,t,n,r){let i=XT(t,e.id);if(i.length===0)return{width:CT,height:NT(e)};let a=oE(i,t,n,r).box;return{width:a.width,height:a.height}}function eE(e,t,n){let r=new mT.default.graphlib.Graph;r.setGraph({rankdir:`LR`,nodesep:YT,ranksep:GT}),r.setDefaultEdgeLabel(()=>({}));for(let t of e){let e=n.get(t.id);r.setNode(t.id,{width:e.width,height:e.height})}for(let[e,n]of t)r.setEdge(e,n);mT.default.layout(r);let i=new Map,a=1/0,o=1/0;for(let t of e){let e=r.node(t.id),s=n.get(t.id),c=e.x-s.width/2,l=e.y-s.height/2;i.set(t.id,{x:c,y:l,width:s.width,height:s.height}),a=Math.min(a,c),o=Math.min(o,l)}let s=0,c=0;for(let e of i.values())e.x-=a,e.y-=o,s=Math.max(s,e.x+e.width),c=Math.max(c,e.y+e.height);return{placements:i,extent:{width:s,height:c}}}function tE(e,t,n){let r=new Map,i=0,a=0,o=0,s=0;for(let c of e)i>0&&i+c.width>t&&(a+=o+n.y,i=0,o=0),r.set(c.id,{x:i,y:a,width:c.width,height:c.height}),i+=c.width+n.x,s=Math.max(s,i-n.x),o=Math.max(o,c.height);return{placements:r,extent:{width:s,height:a+o}}}function nE(e,t,n){let r=Math.max(t,...e.map(e=>e.width)),i=[{x:0,y:0,width:r}],a=new Map,o=[...e].sort((e,t)=>t.height-e.height||t.width-e.width);for(let e of o){let t=null;for(let n of i){let a=n.x;if(a+e.width>r)continue;let o=0;for(let t of i)t.x+t.width<=a||t.x>=a+e.width||(o=Math.max(o,t.y));(t===null||o<t.y||o===t.y&&a<t.x)&&(t={x:a,y:o})}let o=t??{x:0,y:0};a.set(e.id,{x:o.x,y:o.y,width:e.width,height:e.height}),i=rE(i,o.x,e.width+n.x,o.y+e.height+n.y)}let s=0,c=0;for(let e of a.values())s=Math.max(s,e.x+e.width),c=Math.max(c,e.y+e.height);return{placements:a,extent:{width:s,height:c}}}function rE(e,t,n,r){let i=t+n,a=[];for(let n of e){let e=n.x+n.width;e<=t||n.x>=i?a.push(n):(n.x<t&&a.push({x:n.x,y:n.y,width:t-n.x}),e>i&&a.push({x:i,y:n.y,width:e-i}))}a.push({x:t,y:r,width:n}),a.sort((e,t)=>e.x-t.x);let o=[];for(let e of a){let t=o[o.length-1];t&&t.y===e.y&&t.x+t.width===e.x?t.width+=e.width:o.push({...e})}return o}function iE(e,t,n=2.8){let r=e.reduce((e,n)=>e+(n.width+t.x)*(n.height+t.y),0),i=Math.max(...e.map(e=>e.width));return Math.max(i,Math.sqrt(r*n))}function aE(e,t){let n=new Set(e.map(e=>e.id)),r=e.flatMap(e=>e.deps.filter(e=>n.has(e)).map(t=>[t,e.id])),i=new Set(r.flat()),a=e.filter(e=>i.has(e.id)),o=e.filter(e=>!i.has(e.id)),s=new Map,c=a.length>0?eE(a,r,t):{placements:new Map,extent:{width:0,height:0}};for(let[e,t]of c.placements)s.set(e,t);if(o.length>0){let e=o.map(e=>({id:e.id,...t.get(e.id)})),n=tE(e,Math.max(c.extent.width,iE(e,PT)),PT),r=a.length>0?c.extent.height+PT.y:0;for(let[e,t]of n.placements)s.set(e,{...t,y:t.y+r})}return s}function oE(e,t,n,r){let i=new Map(e.map(e=>[e.id,$T(e,t,n,r)])),a=new Set(e.map(e=>e.id)),o=uE(e.map(e=>({id:e.id,...i.get(e.id),deps:e.deps.filter(e=>a.has(e))})),e=>n[e],PT,2.8,()=>aE(e,i),`after-previous`,r);return{placements:o,box:gE(o)}}var sE=e=>e===`x`?`width`:`height`,cE=e=>e===`x`?`y`:`x`,lE=(e,t,n,r)=>e[n]+e[sE(n)]+r[n]>t[n]&&t[n]+t[sE(n)]+r[n]>e[n];function uE(e,t,n,r,i,a=`after-previous`,o=`every-pair`){let s=e.some(e=>t(e.id)!==void 0)?null:i(),c=new Map;for(let n of e){let e=s?s.get(n.id):t(n.id);e&&c.set(n.id,{id:n.id,x:qT(e.x),y:qT(e.y),width:n.width,height:n.height})}let l=new Set,u=iE(e,n,r);e.forEach((t,r)=>{if(c.has(t.id))return;l.add(t.id);let i=a===`best-fit`?fE(t,c,n,u):dE(t,e.slice(0,r),c,n,u);c.set(t.id,{id:t.id,x:JT(i.x),y:JT(i.y),width:t.width,height:t.height})});let d=[...c.values()];return pE(d,n,l),mE(d,n,o),new Map(d.map(({id:e,...t})=>[e,t]))}function dE(e,t,n,r,i){let a=e.deps.flatMap(e=>n.get(e)??[]);if(a.length>0){let e=a.reduce((e,t)=>t.x+t.width>e.x+e.width?t:e);return{x:e.x+e.width+r.x,y:e.y}}let o=[...t].reverse().flatMap(e=>n.get(e.id)??[])[0];return o&&o.x+o.width+r.x+e.width<=i?{x:o.x+o.width+r.x,y:o.y}:{x:0,y:Math.max(-r.y,...[...n.values()].map(e=>e.y+e.height))+r.y}}function fE(e,t,n,r){let i=[...t.values()],a=Math.max(0,...i.map(e=>e.x+e.width)),o=Math.max(0,...i.map(e=>e.y+e.height)),s=[{x:0,y:0},...i.flatMap(e=>[{x:e.x+e.width+n.x,y:e.y},{x:e.x,y:e.y+e.height+n.y}])],c=null;for(let t of s){let s={id:e.id,...t,width:e.width,height:e.height};if(i.some(e=>lE(s,e,`x`,n)&&lE(s,e,`y`,n)))continue;let l=Math.max(a,t.x+e.width),u=l*Math.max(o,t.y+e.height)*(l>r?4:1);(c===null||u<c.score||u===c.score&&(t.y<c.y||t.y===c.y&&t.x<c.x))&&(c={...t,score:u})}return c??{x:0,y:o+n.y}}function pE(e,t,n){for(let r=0;r<=e.length*e.length;r++){let r=null;search:for(let n=0;n<e.length;n++)for(let i=n+1;i<e.length;i++)if(lE(e[n],e[i],`x`,t)&&lE(e[n],e[i],`y`,t)){r=[e[n],e[i]];break search}if(r===null)return;let[i,a]=r,o=e=>{let[r,o]=i[e]<a[e]||i[e]===a[e]&&(n.has(i.id)||!n.has(a.id))?[i,a]:[a,i];return{axis:e,stays:r,moves:o,by:JT(r[e]+r[sE(e)]+t[e]-o[e])}},s=e=>(Math.min(i[e]+i[sE(e)],a[e]+a[sE(e)])+t[e]-Math.max(i[e],a[e]))/(Math.min(i[sE(e)],a[sE(e)])+t[e]),{axis:c,stays:l,moves:u,by:d}=s(`x`)<=s(`y`)?o(`x`):o(`y`),f=u[c];for(let t of e)t!==l&&t[c]>=f&&(t[c]+=d)}}function mE(e,t,n){let r=new Map(e.map(e=>[e,{...e}]));for(let i=0;i<32;i++){let i=e.map(e=>e.x+e.y*1e6);if(hE(e,`x`,t,n,r),hE(e,`y`,t,n,r),e.every((e,t)=>e.x+e.y*1e6===i[t]))return}}function hE(e,t,n,r,i){let a=cE(t),o=[...e].sort((e,n)=>e[t]-n[t]),s=new Map(o.map(e=>[e,e[t]])),c=[];for(let e of o){let o=0;for(let l of c)(r===`every-pair`||lE(i.get(e),i.get(l),a,n))&&(o=Math.max(o,l[t]+(s.get(l)<s.get(e)?KT:0))),lE(e,l,a,n)&&(o=Math.max(o,l[t]+l[sE(t)]+n[t]));e[t]=JT(o),c.push(e)}}function gE(e){let t=0,n=0;for(let r of e.values())t=Math.max(t,r.x+r.width),n=Math.max(n,r.y+r.height);return{width:t+36,height:n+IT+zT}}function _E(e,t){let n=e=>e.split(`-`)[0]??e,r=new Map;for(let e of t)for(let t of e.deps){let i=bw(t),[a,o]=[i===null?n(t):_T(i.project),n(e.id)];if(a!==o){let e=r.get(o)??new Set;e.add(a),r.set(o,e)}}let i=new Map(e.map(e=>[e.area,e])),a=new Set,o=[],s=e=>{let t=i.get(e);if(t&&!a.has(e)){a.add(e);for(let t of r.get(e)??[])s(t);o.push(t)}};for(let t of e)s(t.area);return o}function vE(e,t,n,r,i,a,o={},s=new Set,c=`every-pair`){let l=new Set(e.map(e=>e.id)),u=e.flatMap(e=>e.deps.filter(t=>l.has(t)&&!QT(t,e.id)).map(t=>({id:`${t}->${e.id}`,source:t,target:e.id}))),d=new Map;for(let t of vT(e))l.has(t.dependent)&&d.set(t.ghostId,[...d.get(t.ghostId)??[],t.dependent]);let f=[...d].flatMap(([e,t])=>t.map(t=>({source:e,target:t}))),p=new Map(e.map(e=>[e.id,e.parent])),m=i?new Set([i,...[...u,...f].filter(e=>e.source===i||e.target===i).flatMap(e=>[e.source,e.target])].flatMap(e=>{let t=[e];for(let n=p.get(e);n;n=p.get(n))t.push(n);return t})):null,h=e=>e.split(`-`)[0]??e,g=new Set(e.filter(e=>e.status===`done`).map(e=>e.id)),_=new Set,v=new Set;for(let e of u){let t=a.has(e.source)||a.has(e.target),n=h(e.source)!==h(e.target)&&g.has(e.source);(t||n)&&(a.has(e.source)||v.add(e.source),a.has(e.target)||_.add(e.target))}let y=e=>r===`area`?n[e.area]??`#94a3b8`:X[e.status]?.colour??`#94a3b8`,b=e=>({item:e,colour:y(e),statusColour:X[e.status]?.colour??`#94a3b8`,selected:e.id===i,dimmed:m?!m.has(e.id):!1,hiddenLinkIn:_.has(e.id),hiddenLinkOut:v.has(e.id)}),x=(t,n)=>{let{placements:r,box:i}=oE(n,e,o,c);return{nodes:n.flatMap(n=>{let i=r.get(n.id),o={x:FT+i.x,y:RT(t)+i.y},s=XT(e,n.id);if(s.length>0){let e=x(n.id,s);return[{id:n.id,type:`ticket`,parentId:t,position:o,hidden:a.has(n.id),style:{width:e.box.width,height:e.box.height},data:{...b(n),count:s.length},zIndex:1},...e.nodes]}return[{id:n.id,type:`item`,parentId:t,position:o,hidden:a.has(n.id),style:{width:CT,height:NT(n)},data:b(n),zIndex:3}]}),box:i}},S=t.flatMap(t=>{let n=e.filter(e=>e.area===t&&e.parent===null);if(n.length===0)return[];if(s.has(t))return[{area:t,inner:{nodes:[],box:VT},size:VT}];let r=x(`area:${t}`,n),i={...r.box,height:r.box.height+LT-IT};return[{area:t,inner:{...r,box:i},size:i}]}),C=_E([...[...new Set([...d.keys()].map(e=>e.split(`:`)[1]))].sort().map(e=>{let t=[...d.keys()].filter(t=>t.startsWith(`elsewhere:${e}:`)).map(t=>t.slice(`elsewhere:${e}:`.length)).sort(),n=t.map((t,n)=>{let r=gT(e,t);return{id:r,type:`ghost`,parentId:`area:${_T(e)}`,position:{x:FT,y:LT+n*46},hidden:(d.get(r)??[]).every(e=>a.has(e)),data:{project:e,ref:t,dimmed:m?!m.has(r):!1},style:{width:CT,height:UT},zIndex:3}}),r={width:248,height:LT+t.length*UT+(t.length-1)*WT+zT};return{area:_T(e),foreign:e,inner:{nodes:n,box:r},size:r}}),...S],e),w=C.map(e=>({id:e.area,...e.size})),T={placements:uE(w.map(e=>({...e,deps:[]})),e=>o[`area:${e}`],BT,1.6,()=>nE(w,iE(w,BT,1.6),BT).placements,`best-fit`,c)};return C.flatMap(t=>{let r=T.placements.get(t.area);if(t.foreign!==void 0)return[{id:`area:${t.area}`,type:`area`,position:{x:r.x,y:r.y},hidden:t.inner.nodes.every(e=>e.hidden===!0),data:{area:t.foreign,colour:`#64748b`,count:t.inner.nodes.length,foreign:!0},style:{width:t.size.width,height:t.size.height},zIndex:0},...t.inner.nodes];let i=e.filter(e=>e.area===t.area),o=new Map;for(let e of i)o.set(e.status,(o.get(e.status)??0)+1);let c=Object.keys(X).flatMap(e=>o.has(e)?[[e,o.get(e)]]:[]);if(s.has(t.area))return[{id:HT(t.area),type:`area`,position:{x:r.x,y:r.y},hidden:i.every(e=>a.has(e.id)),data:{area:t.area,colour:n[t.area]??`#94a3b8`,count:i.length,collapsed:{byStatus:c}},style:{width:VT.width,height:VT.height},zIndex:3}];let l={id:`area:${t.area}`,type:`area`,position:{x:r.x,y:r.y},hidden:i.every(e=>a.has(e.id)),data:{area:t.area,colour:n[t.area]??`#94a3b8`,count:i.length,byStatus:c},style:{width:t.size.width,height:t.size.height},zIndex:0},u={id:hT(t.area),type:`overview`,parentId:l.id,position:{x:0,y:0},hidden:l.hidden,data:l.data,style:{width:t.size.width,height:t.size.height},selectable:!1,draggable:!1,focusable:!1,zIndex:1e3};return[l,...t.inner.nodes,u]})}function yE(e){let t={};for(let n of e)n.type!==`ghost`&&n.type!==`overview`&&(t[n.id]=bE(n.parentId,n.position));return t}var bE=(e,t)=>e?{x:qT(t.x-FT),y:qT(t.y-RT(e))}:{x:qT(t.x),y:qT(t.y)};function xE(e,t,n,r,i,a,o,s=new Set){let c=new Set(e.map(e=>e.id)),l=e=>s.has(e.split(`-`)[0]??e)?HT(e.split(`-`)[0]??e):e,u=new Set(e.filter(e=>e.status===`done`).map(e=>e.id)),d=e=>e.split(`-`)[0]??e,f=e=>n===`area`?t[e.area]??`#94a3b8`:X[e.status]?.colour??`#94a3b8`,p=vT(e).filter(e=>c.has(e.dependent)).map(e=>{let t=`${e.ghostId}->${e.dependent}`,n=r===e.ghostId||r===e.dependent,s=i!=null&&(e.ghostId===i||e.dependent===i),c=n||s||t===a,u=o.has(e.dependent);return{id:t,source:e.ghostId,target:l(e.dependent),type:`smoothstep`,pathOptions:{borderRadius:12},hidden:u&&!s,animated:n,zIndex:-1,style:{stroke:c?`#cbd5e1`:`#7c8aa0`,strokeWidth:c?2.5:1.2,strokeDasharray:`6 5`,opacity:c?1:r?.08:.4}}});return[...SE(e.flatMap(e=>e.deps.filter(t=>c.has(t)&&!QT(t,e.id)).map(t=>{let n=`${t}->${e.id}`,s=r===t||r===e.id,c=i!=null&&(t===i||e.id===i),l=d(t)!==d(e.id),p=s||c||n===a,m=l&&u.has(t),h=o.has(t)||o.has(e.id),g=c&&h;return{id:n,source:t,target:e.id,type:`smoothstep`,pathOptions:{borderRadius:12},hidden:h&&!g||m&&!p,animated:s,zIndex:-1,style:{stroke:p?f(e):`#7c8aa0`,strokeWidth:p?2.5:l?1.2:1.5,strokeDasharray:l?`6 5`:void 0,opacity:p?1:r?l?.08:.12:l?.4:.6}}})),l,s.size>0),...p.filter((e,t,n)=>n.findIndex(t=>t.source===e.source&&t.target===e.target)===t)]}function SE(e,t,n){if(!n)return e;let r=new Map;for(let n of e){let[e,i]=[t(n.source),t(n.target)];if(e===i)continue;let a=`${e}->${i}`,o=(n.style?.opacity??0)===1,s=r.get(a);s===void 0?r.set(a,{edge:{...n,id:a,source:e,target:i},count:1,allHidden:n.hidden===!0}):(s.count+=1,s.allHidden&&=n.hidden===!0,o&&(s.edge={...n,id:a,source:e,target:i}))}return[...r.values()].map(({edge:e,count:t,allHidden:n})=>({...e,hidden:n,...t>1?{label:String(t),labelBgPadding:[4,2],labelBgBorderRadius:4,labelStyle:{fill:`#dce3ec`,fontSize:11},labelBgStyle:{fill:`#1e2836`}}:{}}))}function CE({data:e}){let{item:t,colour:n,statusColour:r,selected:i,dimmed:a,hiddenLinkIn:o,hiddenLinkOut:s}=e,c=X[t.status];return(0,b.jsxs)(`div`,{className:`item-node`,"data-selected":i,"data-dimmed":a,style:{"--area":n},children:[(0,b.jsx)(Gu,{type:`target`,position:V.Left,className:o?`handle--hidden-link`:void 0}),(0,b.jsx)(`div`,{className:`item-node__rail`}),(0,b.jsxs)(`div`,{className:`item-node__body`,children:[(0,b.jsxs)(`div`,{className:`item-node__meta`,children:[(0,b.jsx)(`span`,{className:`item-node__id`,children:t.id}),(0,b.jsx)(`span`,{className:`item-node__status`,title:c?.label??t.status,style:{color:r},children:c?.icon??`?`})]}),(0,b.jsx)(`div`,{className:`item-node__title`,"data-strike":c?.strike??!1,children:t.title})]}),(0,b.jsx)(Gu,{type:`source`,position:V.Right,className:s?`handle--hidden-link`:void 0})]})}function wE({data:e,selected:t}){return e.collapsed===void 0?(0,b.jsxs)(`div`,{className:`area-box`,"data-foreign":e.foreign===!0,style:{"--area":e.colour},children:[(0,b.jsx)(dp,{isVisible:t,minWidth:220,minHeight:120,lineClassName:`box-resize-line`,handleClassName:`box-resize-handle`}),(0,b.jsxs)(`div`,{className:`area-box__title`,children:[(0,b.jsx)(`span`,{className:`area-box__name`,children:TE(e)?e.name:e.area}),TE(e)&&(0,b.jsx)(`span`,{className:`area-box__label`,children:e.area}),(0,b.jsx)(`span`,{className:`area-box__count`,children:e.count})]})]}):(0,b.jsxs)(`div`,{className:`area-box area-box--collapsed`,style:{"--area":e.colour},title:`Click to open this area`,children:[(0,b.jsx)(Gu,{type:`target`,position:V.Left}),(0,b.jsxs)(`div`,{className:`area-box__title`,children:[(0,b.jsx)(`span`,{className:`area-box__name`,children:TE(e)?e.name:e.area}),TE(e)&&(0,b.jsx)(`span`,{className:`area-box__label`,children:e.area}),(0,b.jsx)(`span`,{className:`area-box__count`,children:e.count})]}),(0,b.jsx)(`div`,{className:`area-box__summary`,children:e.collapsed.byStatus.map(([e,t])=>(0,b.jsxs)(`span`,{className:`area-box__status`,style:{color:X[e].colour},title:e,children:[X[e].icon,` `,t]},e))}),(0,b.jsx)(Gu,{type:`source`,position:V.Right})]})}var TE=e=>e.name!==void 0&&e.name!==e.area;function EE({data:e}){if(e.byStatus===void 0)return null;let t=TE(e)?e.name:e.area;return(0,b.jsx)(`div`,{className:`area-overview`,style:{"--area":e.colour},"aria-hidden":`true`,children:(0,b.jsxs)(`div`,{className:`area-box__overview`,children:[(0,b.jsx)(`div`,{className:`area-box__overview-name`,style:{fontSize:`min(${140/Math.max(t.length,3)}cqw, 30cqh, 110px)`},children:t}),TE(e)&&(0,b.jsx)(`div`,{className:`area-box__overview-key`,children:e.area}),(0,b.jsx)(`div`,{className:`area-box__overview-bar`,children:e.byStatus.map(([e,t])=>(0,b.jsx)(`span`,{style:{flexGrow:t,background:X[e].colour}},e))}),(0,b.jsx)(`div`,{className:`area-box__overview-counts`,children:e.byStatus.map(([e,t])=>(0,b.jsxs)(`span`,{style:{color:X[e].colour},children:[X[e].icon,` `,t]},e))}),e.description!==void 0&&e.description!==null&&(0,b.jsx)(`div`,{className:`area-box__overview-description`,children:e.description})]})})}function DE({data:e}){let{item:t,colour:n,statusColour:r,count:i,selected:a,dimmed:o,hiddenLinkIn:s,hiddenLinkOut:c}=e,l=X[t.status];return(0,b.jsxs)(`div`,{className:`ticket-box`,"data-selected":a,"data-dimmed":o,style:{"--area":n},children:[(0,b.jsx)(dp,{isVisible:a,minWidth:200,minHeight:100,lineClassName:`box-resize-line`,handleClassName:`box-resize-handle`}),(0,b.jsx)(Gu,{type:`target`,position:V.Left,className:s?`handle--hidden-link`:void 0}),(0,b.jsxs)(`div`,{className:`ticket-box__title`,children:[(0,b.jsx)(`span`,{className:`ticket-box__id`,children:t.id}),(0,b.jsx)(`span`,{className:`ticket-box__status`,title:l?.label??t.status,style:{color:r},children:l?.icon??`?`}),(0,b.jsx)(`span`,{className:`ticket-box__label`,"data-strike":l?.strike??!1,children:t.title}),(0,b.jsx)(`span`,{className:`ticket-box__count`,children:i})]}),(0,b.jsx)(Gu,{type:`source`,position:V.Right,className:c?`handle--hidden-link`:void 0})]})}function OE({data:e}){let{project:t,ref:n,dimmed:r}=e;return(0,b.jsxs)(`div`,{className:`ghost-node`,"data-dimmed":r,title:`${n} lives in the ${t} project, which is not open here`,children:[(0,b.jsx)(`span`,{className:`ghost-node__ref`,children:n}),(0,b.jsx)(Gu,{type:`source`,position:V.Right})]})}var kE=`roadmap.positions.v2`,AE=`roadmap.layout.v1`,jE=`roadmap.sizes.v2`,ME=(e,t)=>`${e}:${t}`;function NE(e){try{let t=localStorage.getItem(e);return t?JSON.parse(t):{}}catch{return{}}}function PE(e,t){try{localStorage.setItem(e,JSON.stringify(t))}catch{}}var FE=e=>NE(ME(AE,e)),IE=(e,t)=>PE(ME(AE,e),t),LE=e=>NE(ME(jE,e)),RE=(e,t)=>PE(ME(jE,e),t);function zE(e){try{localStorage.removeItem(ME(AE,e)),localStorage.removeItem(ME(kE,e)),localStorage.removeItem(ME(jE,e))}catch{}}var BE=e=>`${X[e].icon} ${X[e].label}`;function VE({projectKey:e,ref_:t,status:n,reload:r}){let[i,a]=(0,_.useState)(!1),[o,s]=(0,_.useState)(null);if((0,_.useEffect)(()=>s(null),[t]),!bb())return(0,b.jsx)(`span`,{className:`detail__status`,children:BE(n)});async function c(i){if(i!==n){a(!0),s(null);try{await Cb(e,t,i)}catch(e){s(e instanceof Error?e.message:String(e))}finally{a(!1),r()}}}return(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(`select`,{className:`detail__status detail__status--edit`,value:n,disabled:i,"aria-label":`Status`,onChange:e=>void c(e.target.value),children:Object.keys(X).map(e=>(0,b.jsx)(`option`,{value:e,children:BE(e)},e))}),o!==null&&(0,b.jsx)(`span`,{className:`detail__status-error`,children:o})]})}var HE,Z,UE,WE,GE,KE,qE,JE,YE,XE={},ZE=[],QE=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i;function $E(e,t){for(var n in t)e[n]=t[n];return e}function eD(e){var t=e.parentNode;t&&t.removeChild(e)}function Q(e,t,n){var r,i,a,o={};for(a in t)a==`key`?r=t[a]:a==`ref`?i=t[a]:o[a]=t[a];if(arguments.length>2&&(o.children=arguments.length>3?HE.call(arguments,2):n),typeof e==`function`&&e.defaultProps!=null)for(a in e.defaultProps)o[a]===void 0&&(o[a]=e.defaultProps[a]);return tD(e,o,r,i,null)}function tD(e,t,n,r,i){var a={type:e,props:t,key:n,ref:r,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:i??++UE};return i==null&&Z.vnode!=null&&Z.vnode(a),a}function nD(){return{current:null}}function rD(e){return e.children}function iD(e,t,n,r,i){for(var a in n)a===`children`||a===`key`||a in t||oD(e,a,null,n[a],r);for(a in t)i&&typeof t[a]!=`function`||a===`children`||a===`key`||a===`value`||a===`checked`||n[a]===t[a]||oD(e,a,t[a],n[a],r)}function aD(e,t,n){t[0]===`-`?e.setProperty(t,n??``):e[t]=n==null?``:typeof n!=`number`||QE.test(t)?n:n+`px`}function oD(e,t,n,r,i){var a;n:if(t===`style`){if(typeof n==`string`)e.style.cssText=n;else{if(typeof r==`string`&&(e.style.cssText=r=``),r)for(t in r)n&&t in n||aD(e.style,t,``);if(n)for(t in n)r&&n[t]===r[t]||aD(e.style,t,n[t])}}else if(t[0]===`o`&&t[1]===`n`)a=t!==(t=t.replace(/Capture$/,``)),t=t.toLowerCase()in e?t.toLowerCase().slice(2):t.slice(2),e.l||={},e.l[t+a]=n,n?r||e.addEventListener(t,a?cD:sD,a):e.removeEventListener(t,a?cD:sD,a);else if(t!==`dangerouslySetInnerHTML`){if(i)t=t.replace(/xlink(H|:h)/,`h`).replace(/sName$/,`s`);else if(t!==`width`&&t!==`height`&&t!==`href`&&t!==`list`&&t!==`form`&&t!==`tabIndex`&&t!==`download`&&t in e)try{e[t]=n??``;break n}catch{}typeof n==`function`||(n==null||!1===n&&t.indexOf(`-`)==-1?e.removeAttribute(t):e.setAttribute(t,n))}}function sD(e){GE=!0;try{return this.l[e.type+!1](Z.event?Z.event(e):e)}finally{GE=!1}}function cD(e){GE=!0;try{return this.l[e.type+!0](Z.event?Z.event(e):e)}finally{GE=!1}}function lD(e,t){this.props=e,this.context=t}function uD(e,t){if(t==null)return e.__?uD(e.__,e.__.__k.indexOf(e)+1):null;for(var n;t<e.__k.length;t++)if((n=e.__k[t])!=null&&n.__e!=null)return n.__e;return typeof e.type==`function`?uD(e):null}function dD(e){var t,n;if((e=e.__)!=null&&e.__c!=null){for(e.__e=e.__c.base=null,t=0;t<e.__k.length;t++)if((n=e.__k[t])!=null&&n.__e!=null){e.__e=e.__c.base=n.__e;break}return dD(e)}}function fD(e){GE?setTimeout(e):JE(e)}function pD(e){(!e.__d&&(e.__d=!0)&&KE.push(e)&&!mD.__r++||qE!==Z.debounceRendering)&&((qE=Z.debounceRendering)||fD)(mD)}function mD(){var e,t,n,r,i,a,o,s;for(KE.sort(function(e,t){return e.__v.__b-t.__v.__b});e=KE.shift();)e.__d&&(t=KE.length,r=void 0,i=void 0,o=(a=(n=e).__v).__e,(s=n.__P)&&(r=[],(i=$E({},a)).__v=a.__v+1,bD(s,a,i,n.__n,s.ownerSVGElement!==void 0,a.__h==null?null:[o],r,o??uD(a),a.__h),xD(r,a),a.__e!=o&&dD(a)),KE.length>t&&KE.sort(function(e,t){return e.__v.__b-t.__v.__b}));mD.__r=0}function hD(e,t,n,r,i,a,o,s,c,l){var u,d,f,p,m,h,g,_=r&&r.__k||ZE,v=_.length;for(n.__k=[],u=0;u<t.length;u++)if((p=n.__k[u]=(p=t[u])==null||typeof p==`boolean`?null:typeof p==`string`||typeof p==`number`||typeof p==`bigint`?tD(null,p,null,null,p):Array.isArray(p)?tD(rD,{children:p},null,null,null):p.__b>0?tD(p.type,p.props,p.key,p.ref?p.ref:null,p.__v):p)!=null){if(p.__=n,p.__b=n.__b+1,(f=_[u])===null||f&&p.key==f.key&&p.type===f.type)_[u]=void 0;else for(d=0;d<v;d++){if((f=_[d])&&p.key==f.key&&p.type===f.type){_[d]=void 0;break}f=null}bD(e,p,f||=XE,i,a,o,s,c,l),m=p.__e,(d=p.ref)&&f.ref!=d&&(g||=[],f.ref&&g.push(f.ref,null,p),g.push(d,p.__c||m,p)),m==null?c&&f.__e==c&&c.parentNode!=e&&(c=uD(f)):(h??=m,typeof p.type==`function`&&p.__k===f.__k?p.__d=c=gD(p,c,e):c=vD(e,p,f,_,m,c),typeof n.type==`function`&&(n.__d=c))}for(n.__e=h,u=v;u--;)_[u]!=null&&(typeof n.type==`function`&&_[u].__e!=null&&_[u].__e==n.__d&&(n.__d=yD(r).nextSibling),wD(_[u],_[u]));if(g)for(u=0;u<g.length;u++)CD(g[u],g[++u],g[++u])}function gD(e,t,n){for(var r,i=e.__k,a=0;i&&a<i.length;a++)(r=i[a])&&(r.__=e,t=typeof r.type==`function`?gD(r,t,n):vD(n,r,r,i,r.__e,t));return t}function _D(e,t){return t||=[],e==null||typeof e==`boolean`||(Array.isArray(e)?e.some(function(e){_D(e,t)}):t.push(e)),t}function vD(e,t,n,r,i,a){var o,s,c;if(t.__d!==void 0)o=t.__d,t.__d=void 0;else if(n==null||i!=a||i.parentNode==null)n:if(a==null||a.parentNode!==e)e.appendChild(i),o=null;else{for(s=a,c=0;(s=s.nextSibling)&&c<r.length;c+=1)if(s==i)break n;e.insertBefore(i,a),o=a}return o===void 0?i.nextSibling:o}function yD(e){var t,n,r;if(e.type==null||typeof e.type==`string`)return e.__e;if(e.__k){for(t=e.__k.length-1;t>=0;t--)if((n=e.__k[t])&&(r=yD(n)))return r}return null}function bD(e,t,n,r,i,a,o,s,c){var l,u,d,f,p,m,h,g,_,v,y,b,x,S,C,w=t.type;if(t.constructor!==void 0)return null;n.__h!=null&&(c=n.__h,s=t.__e=n.__e,t.__h=null,a=[s]),(l=Z.__b)&&l(t);try{n:if(typeof w==`function`){if(g=t.props,_=(l=w.contextType)&&r[l.__c],v=l?_?_.props.value:l.__:r,n.__c?h=(u=t.__c=n.__c).__=u.__E:(`prototype`in w&&w.prototype.render?t.__c=u=new w(g,v):(t.__c=u=new lD(g,v),u.constructor=w,u.render=TD),_&&_.sub(u),u.props=g,u.state||(u.state={}),u.context=v,u.__n=r,d=u.__d=!0,u.__h=[],u._sb=[]),u.__s??(u.__s=u.state),w.getDerivedStateFromProps!=null&&(u.__s==u.state&&(u.__s=$E({},u.__s)),$E(u.__s,w.getDerivedStateFromProps(g,u.__s))),f=u.props,p=u.state,u.__v=t,d)w.getDerivedStateFromProps==null&&u.componentWillMount!=null&&u.componentWillMount(),u.componentDidMount!=null&&u.__h.push(u.componentDidMount);else{if(w.getDerivedStateFromProps==null&&g!==f&&u.componentWillReceiveProps!=null&&u.componentWillReceiveProps(g,v),!u.__e&&u.shouldComponentUpdate!=null&&!1===u.shouldComponentUpdate(g,u.__s,v)||t.__v===n.__v){for(t.__v!==n.__v&&(u.props=g,u.state=u.__s,u.__d=!1),t.__e=n.__e,t.__k=n.__k,t.__k.forEach(function(e){e&&(e.__=t)}),y=0;y<u._sb.length;y++)u.__h.push(u._sb[y]);u._sb=[],u.__h.length&&o.push(u);break n}u.componentWillUpdate!=null&&u.componentWillUpdate(g,u.__s,v),u.componentDidUpdate!=null&&u.__h.push(function(){u.componentDidUpdate(f,p,m)})}if(u.context=v,u.props=g,u.__P=e,b=Z.__r,x=0,`prototype`in w&&w.prototype.render){for(u.state=u.__s,u.__d=!1,b&&b(t),l=u.render(u.props,u.state,u.context),S=0;S<u._sb.length;S++)u.__h.push(u._sb[S]);u._sb=[]}else do u.__d=!1,b&&b(t),l=u.render(u.props,u.state,u.context),u.state=u.__s;while(u.__d&&++x<25);u.state=u.__s,u.getChildContext!=null&&(r=$E($E({},r),u.getChildContext())),d||u.getSnapshotBeforeUpdate==null||(m=u.getSnapshotBeforeUpdate(f,p)),C=l!=null&&l.type===rD&&l.key==null?l.props.children:l,hD(e,Array.isArray(C)?C:[C],t,n,r,i,a,o,s,c),u.base=t.__e,t.__h=null,u.__h.length&&o.push(u),h&&(u.__E=u.__=null),u.__e=!1}else a==null&&t.__v===n.__v?(t.__k=n.__k,t.__e=n.__e):t.__e=SD(n.__e,t,n,r,i,a,o,c);(l=Z.diffed)&&l(t)}catch(e){t.__v=null,(c||a!=null)&&(t.__e=s,t.__h=!!c,a[a.indexOf(s)]=null),Z.__e(e,t,n)}}function xD(e,t){Z.__c&&Z.__c(t,e),e.some(function(t){try{e=t.__h,t.__h=[],e.some(function(e){e.call(t)})}catch(e){Z.__e(e,t.__v)}})}function SD(e,t,n,r,i,a,o,s){var c,l,u,d=n.props,f=t.props,p=t.type,m=0;if(p===`svg`&&(i=!0),a!=null){for(;m<a.length;m++)if((c=a[m])&&`setAttribute`in c==!!p&&(p?c.localName===p:c.nodeType===3)){e=c,a[m]=null;break}}if(e==null){if(p===null)return document.createTextNode(f);e=i?document.createElementNS(`http://www.w3.org/2000/svg`,p):document.createElement(p,f.is&&f),a=null,s=!1}if(p===null)d===f||s&&e.data===f||(e.data=f);else{if(a&&=HE.call(e.childNodes),l=(d=n.props||XE).dangerouslySetInnerHTML,u=f.dangerouslySetInnerHTML,!s){if(a!=null)for(d={},m=0;m<e.attributes.length;m++)d[e.attributes[m].name]=e.attributes[m].value;(u||l)&&(u&&(l&&u.__html==l.__html||u.__html===e.innerHTML)||(e.innerHTML=u&&u.__html||``))}if(iD(e,f,d,i,s),u)t.__k=[];else if(m=t.props.children,hD(e,Array.isArray(m)?m:[m],t,n,r,i&&p!==`foreignObject`,a,o,a?a[0]:n.__k&&uD(n,0),s),a!=null)for(m=a.length;m--;)a[m]!=null&&eD(a[m]);s||(`value`in f&&(m=f.value)!==void 0&&(m!==e.value||p===`progress`&&!m||p===`option`&&m!==d.value)&&oD(e,`value`,m,d.value,!1),`checked`in f&&(m=f.checked)!==void 0&&m!==e.checked&&oD(e,`checked`,m,d.checked,!1))}return e}function CD(e,t,n){try{typeof e==`function`?e(t):e.current=t}catch(e){Z.__e(e,n)}}function wD(e,t,n){var r,i;if(Z.unmount&&Z.unmount(e),(r=e.ref)&&(r.current&&r.current!==e.__e||CD(r,null,t)),(r=e.__c)!=null){if(r.componentWillUnmount)try{r.componentWillUnmount()}catch(e){Z.__e(e,t)}r.base=r.__P=null,e.__c=void 0}if(r=e.__k)for(i=0;i<r.length;i++)r[i]&&wD(r[i],t,n||typeof e.type!=`function`);n||e.__e==null||eD(e.__e),e.__=e.__e=e.__d=void 0}function TD(e,t,n){return this.constructor(e,n)}function ED(e,t,n){var r,i,a;Z.__&&Z.__(e,t),i=(r=typeof n==`function`)?null:n&&n.__k||t.__k,a=[],bD(t,e=(!r&&n||t).__k=Q(rD,null,[e]),i||XE,XE,t.ownerSVGElement!==void 0,!r&&n?[n]:i?null:t.firstChild?HE.call(t.childNodes):null,a,!r&&n?n:i?i.__e:t.firstChild,r),xD(a,e)}function DD(e,t){var n={__c:t=`__cC`+YE++,__:e,Consumer:function(e,t){return e.children(t)},Provider:function(e){var n,r;return this.getChildContext||(n=[],(r={})[t]=this,this.getChildContext=function(){return r},this.shouldComponentUpdate=function(e){this.props.value!==e.value&&n.some(function(e){e.__e=!0,pD(e)})},this.sub=function(e){n.push(e);var t=e.componentWillUnmount;e.componentWillUnmount=function(){n.splice(n.indexOf(e),1),t&&t.call(e)}}),e.children}};return n.Provider.__=n.Consumer.contextType=n}HE=ZE.slice,Z={__e:function(e,t,n,r){for(var i,a,o;t=t.__;)if((i=t.__c)&&!i.__)try{if((a=i.constructor)&&a.getDerivedStateFromError!=null&&(i.setState(a.getDerivedStateFromError(e)),o=i.__d),i.componentDidCatch!=null&&(i.componentDidCatch(e,r||{}),o=i.__d),o)return i.__E=i}catch(t){e=t}throw e}},UE=0,WE=function(e){return e!=null&&e.constructor===void 0},GE=!1,lD.prototype.setState=function(e,t){var n=this.__s!=null&&this.__s!==this.state?this.__s:this.__s=$E({},this.state);typeof e==`function`&&(e=e($E({},n),this.props)),e&&$E(n,e),e!=null&&this.__v&&(t&&this._sb.push(t),pD(this))},lD.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),pD(this))},lD.prototype.render=rD,KE=[],JE=typeof Promise==`function`?Promise.prototype.then.bind(Promise.resolve()):setTimeout,mD.__r=0,YE=0;var OD,kD,AD,jD=[],MD=[],ND=Z.__b,PD=Z.__r,FD=Z.diffed,ID=Z.__c,LD=Z.unmount;function RD(){for(var e;e=jD.shift();)if(e.__P&&e.__H)try{e.__H.__h.forEach(VD),e.__H.__h.forEach(HD),e.__H.__h=[]}catch(t){e.__H.__h=[],Z.__e(t,e.__v)}}Z.__b=function(e){OD=null,ND&&ND(e)},Z.__r=function(e){PD&&PD(e);var t=(OD=e.__c).__H;t&&(kD===OD?(t.__h=[],OD.__h=[],t.__.forEach(function(e){e.__N&&(e.__=e.__N),e.__V=MD,e.__N=e.i=void 0})):(t.__h.forEach(VD),t.__h.forEach(HD),t.__h=[])),kD=OD},Z.diffed=function(e){FD&&FD(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(jD.push(t)!==1&&AD===Z.requestAnimationFrame||((AD=Z.requestAnimationFrame)||BD)(RD)),t.__H.__.forEach(function(e){e.i&&(e.__H=e.i),e.__V!==MD&&(e.__=e.__V),e.i=void 0,e.__V=MD})),kD=OD=null},Z.__c=function(e,t){t.some(function(e){try{e.__h.forEach(VD),e.__h=e.__h.filter(function(e){return!e.__||HD(e)})}catch(n){t.some(function(e){e.__h&&=[]}),t=[],Z.__e(n,e.__v)}}),ID&&ID(e,t)},Z.unmount=function(e){LD&&LD(e);var t,n=e.__c;n&&n.__H&&(n.__H.__.forEach(function(e){try{VD(e)}catch(e){t=e}}),n.__H=void 0,t&&Z.__e(t,n.__v))};var zD=typeof requestAnimationFrame==`function`;function BD(e){var t,n=function(){clearTimeout(r),zD&&cancelAnimationFrame(t),setTimeout(e)},r=setTimeout(n,100);zD&&(t=requestAnimationFrame(n))}function VD(e){var t=OD,n=e.__c;typeof n==`function`&&(e.__c=void 0,n()),OD=t}function HD(e){var t=OD;e.__c=e.__(),OD=t}function UD(e,t){for(var n in t)e[n]=t[n];return e}function WD(e,t){for(var n in e)if(n!==`__source`&&!(n in t))return!0;for(var r in t)if(r!==`__source`&&e[r]!==t[r])return!0;return!1}function GD(e){this.props=e}(GD.prototype=new lD).isPureReactComponent=!0,GD.prototype.shouldComponentUpdate=function(e,t){return WD(this.props,e)||WD(this.state,t)};var KD=Z.__b;Z.__b=function(e){e.type&&e.type.__f&&e.ref&&(e.props.ref=e.ref,e.ref=null),KD&&KD(e)},typeof Symbol<`u`&&Symbol.for;var qD=Z.__e;Z.__e=function(e,t,n,r){if(e.then){for(var i,a=t;a=a.__;)if((i=a.__c)&&i.__c)return t.__e??(t.__e=n.__e,t.__k=n.__k),i.__c(e,t)}qD(e,t,n,r)};var JD=Z.unmount;function YD(e,t,n){return e&&(e.__c&&e.__c.__H&&(e.__c.__H.__.forEach(function(e){typeof e.__c==`function`&&e.__c()}),e.__c.__H=null),(e=UD({},e)).__c!=null&&(e.__c.__P===n&&(e.__c.__P=t),e.__c=null),e.__k=e.__k&&e.__k.map(function(e){return YD(e,t,n)})),e}function XD(e,t,n){return e&&(e.__v=null,e.__k=e.__k&&e.__k.map(function(e){return XD(e,t,n)}),e.__c&&e.__c.__P===t&&(e.__e&&n.insertBefore(e.__e,e.__d),e.__c.__e=!0,e.__c.__P=n)),e}function ZD(){this.__u=0,this.t=null,this.__b=null}function QD(e){var t=e.__.__c;return t&&t.__a&&t.__a(e)}function $D(){this.u=null,this.o=null}Z.unmount=function(e){var t=e.__c;t&&t.__R&&t.__R(),t&&!0===e.__h&&(e.type=null),JD&&JD(e)},(ZD.prototype=new lD).__c=function(e,t){var n=t.__c,r=this;r.t??=[],r.t.push(n);var i=QD(r.__v),a=!1,o=function(){a||(a=!0,n.__R=null,i?i(s):s())};n.__R=o;var s=function(){if(!--r.__u){if(r.state.__a){var e=r.state.__a;r.__v.__k[0]=XD(e,e.__c.__P,e.__c.__O)}var t;for(r.setState({__a:r.__b=null});t=r.t.pop();)t.forceUpdate()}},c=!0===t.__h;r.__u++||c||r.setState({__a:r.__b=r.__v.__k[0]}),e.then(o,o)},ZD.prototype.componentWillUnmount=function(){this.t=[]},ZD.prototype.render=function(e,t){if(this.__b){if(this.__v.__k){var n=document.createElement(`div`),r=this.__v.__k[0].__c;this.__v.__k[0]=YD(this.__b,n,r.__O=r.__P)}this.__b=null}var i=t.__a&&Q(rD,null,e.fallback);return i&&(i.__h=null),[Q(rD,null,t.__a?null:e.children),i]};var eO=function(e,t,n){if(++n[1]===n[0]&&e.o.delete(t),e.props.revealOrder&&(e.props.revealOrder[0]!==`t`||!e.o.size))for(n=e.u;n;){for(;n.length>3;)n.pop()();if(n[1]<n[0])break;e.u=n=n[2]}};function tO(e){return this.getChildContext=function(){return e.context},e.children}function nO(e){var t=this,n=e.i;t.componentWillUnmount=function(){ED(null,t.l),t.l=null,t.i=null},t.i&&t.i!==n&&t.componentWillUnmount(),e.__v?(t.l||=(t.i=n,{nodeType:1,parentNode:n,childNodes:[],appendChild:function(e){this.childNodes.push(e),t.i.appendChild(e)},insertBefore:function(e,n){this.childNodes.push(e),t.i.appendChild(e)},removeChild:function(e){this.childNodes.splice(this.childNodes.indexOf(e)>>>1,1),t.i.removeChild(e)}}),ED(Q(tO,{context:t.context},e.__v),t.l)):t.l&&t.componentWillUnmount()}function rO(e,t){var n=Q(nO,{__v:e,i:t});return n.containerInfo=t,n}($D.prototype=new lD).__a=function(e){var t=this,n=QD(t.__v),r=t.o.get(e);return r[0]++,function(i){var a=function(){t.props.revealOrder?(r.push(i),eO(t,e,r)):i()};n?n(a):a()}},$D.prototype.render=function(e){this.u=null,this.o=new Map;var t=_D(e.children);e.revealOrder&&e.revealOrder[0]===`b`&&t.reverse();for(var n=t.length;n--;)this.o.set(t[n],this.u=[1,0,this.u]);return e.children},$D.prototype.componentDidUpdate=$D.prototype.componentDidMount=function(){var e=this;this.o.forEach(function(t,n){eO(e,n,t)})};var iO=typeof Symbol<`u`&&Symbol.for&&Symbol.for(`react.element`)||60103,aO=/^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|dominant|fill|flood|font|glyph(?!R)|horiz|image|letter|lighting|marker(?!H|W|U)|overline|paint|pointer|shape|stop|strikethrough|stroke|text(?!L)|transform|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/,oO=typeof document<`u`,sO=function(e){return(typeof Symbol<`u`&&typeof Symbol()==`symbol`?/fil|che|rad/i:/fil|che|ra/i).test(e)};lD.prototype.isReactComponent={},[`componentWillMount`,`componentWillReceiveProps`,`componentWillUpdate`].forEach(function(e){Object.defineProperty(lD.prototype,e,{configurable:!0,get:function(){return this[`UNSAFE_`+e]},set:function(t){Object.defineProperty(this,e,{configurable:!0,writable:!0,value:t})}})});var cO=Z.event;function lO(){}function uO(){return this.cancelBubble}function dO(){return this.defaultPrevented}Z.event=function(e){return cO&&(e=cO(e)),e.persist=lO,e.isPropagationStopped=uO,e.isDefaultPrevented=dO,e.nativeEvent=e};var fO={configurable:!0,get:function(){return this.class}},pO=Z.vnode;Z.vnode=function(e){var t=e.type,n=e.props,r=n;if(typeof t==`string`){var i=t.indexOf(`-`)===-1;for(var a in r={},n){var o=n[a];oO&&a===`children`&&t===`noscript`||a===`value`&&`defaultValue`in n&&o==null||(a===`defaultValue`&&`value`in n&&n.value==null?a=`value`:a===`download`&&!0===o?o=``:/ondoubleclick/i.test(a)?a=`ondblclick`:/^onchange(textarea|input)/i.test(a+t)&&!sO(n.type)?a=`oninput`:/^onfocus$/i.test(a)?a=`onfocusin`:/^onblur$/i.test(a)?a=`onfocusout`:/^on(Ani|Tra|Tou|BeforeInp|Compo)/.test(a)?a=a.toLowerCase():i&&aO.test(a)?a=a.replace(/[A-Z0-9]/g,`-$&`).toLowerCase():o===null&&(o=void 0),/^oninput$/i.test(a)&&(a=a.toLowerCase(),r[a]&&(a=`oninputCapture`)),r[a]=o)}t==`select`&&r.multiple&&Array.isArray(r.value)&&(r.value=_D(n.children).forEach(function(e){e.props.selected=r.value.indexOf(e.props.value)!=-1})),t==`select`&&r.defaultValue!=null&&(r.value=_D(n.children).forEach(function(e){e.props.selected=r.multiple?r.defaultValue.indexOf(e.props.value)!=-1:r.defaultValue==e.props.value})),e.props=r,n.class!=n.className&&(fO.enumerable=`className`in n,n.className!=null&&(r.class=n.className),Object.defineProperty(r,"className",fO))}e.$$typeof=iO,pO&&pO(e)};var mO=Z.__r;Z.__r=function(e){mO&&mO(e),e.__c};var hO=[],gO=new Map;function _O(e){hO.push(e),gO.forEach(t=>{xO(t,e)})}function vO(e){e.isConnected&&e.getRootNode&&yO(e.getRootNode())}function yO(e){let t=gO.get(e);if(!t||!t.isConnected){if(t=e.querySelector(`style[data-fullcalendar]`),!t){t=document.createElement(`style`),t.setAttribute(`data-fullcalendar`,``);let n=CO();n&&(t.nonce=n);let r=e===document?document.head:e,i=e===document?r.querySelector(`script,link[rel=stylesheet],link[as=style],style`):r.firstChild;r.insertBefore(t,i)}gO.set(e,t),bO(t)}}function bO(e){for(let t of hO)xO(e,t)}function xO(e,t){let{sheet:n}=e,r=n.cssRules.length;t.split(`}`).forEach((e,t)=>{e=e.trim(),e&&n.insertRule(e+`}`,r+t)})}var SO;function CO(){return SO===void 0&&(SO=wO()),SO}function wO(){let e=document.querySelector(`meta[name="csp-nonce"]`);if(e&&e.hasAttribute(`content`))return e.getAttribute(`content`);let t=document.querySelector(`script[nonce]`);return t&&t.nonce||``}typeof document<`u`&&yO(document),_O(`:root{--fc-small-font-size:.85em;--fc-page-bg-color:#fff;--fc-neutral-bg-color:hsla(0,0%,82%,.3);--fc-neutral-text-color:grey;--fc-border-color:#ddd;--fc-button-text-color:#fff;--fc-button-bg-color:#2c3e50;--fc-button-border-color:#2c3e50;--fc-button-hover-bg-color:#1e2b37;--fc-button-hover-border-color:#1a252f;--fc-button-active-bg-color:#1a252f;--fc-button-active-border-color:#151e27;--fc-event-bg-color:#3788d8;--fc-event-border-color:#3788d8;--fc-event-text-color:#fff;--fc-event-selected-overlay-color:rgba(0,0,0,.25);--fc-more-link-bg-color:#d0d0d0;--fc-more-link-text-color:inherit;--fc-event-resizer-thickness:8px;--fc-event-resizer-dot-total-width:8px;--fc-event-resizer-dot-border-width:1px;--fc-non-business-color:hsla(0,0%,84%,.3);--fc-bg-event-color:#8fdf82;--fc-bg-event-opacity:0.3;--fc-highlight-color:rgba(188,232,241,.3);--fc-today-bg-color:rgba(255,220,40,.15);--fc-now-indicator-color:red}.fc-not-allowed,.fc-not-allowed .fc-event{cursor:not-allowed}.fc{display:flex;flex-direction:column;font-size:1em}.fc,.fc *,.fc :after,.fc :before{box-sizing:border-box}.fc table{border-collapse:collapse;border-spacing:0;font-size:1em}.fc th{text-align:center}.fc td,.fc th{padding:0;vertical-align:top}.fc a[data-navlink]{cursor:pointer}.fc a[data-navlink]:hover{text-decoration:underline}.fc-direction-ltr{direction:ltr;text-align:left}.fc-direction-rtl{direction:rtl;text-align:right}.fc-theme-standard td,.fc-theme-standard th{border:1px solid var(--fc-border-color)}.fc-liquid-hack td,.fc-liquid-hack th{position:relative}@font-face{font-family:fcicons;font-style:normal;font-weight:400;src:url("data:application/x-font-ttf;charset=utf-8;base64,AAEAAAALAIAAAwAwT1MvMg8SBfAAAAC8AAAAYGNtYXAXVtKNAAABHAAAAFRnYXNwAAAAEAAAAXAAAAAIZ2x5ZgYydxIAAAF4AAAFNGhlYWQUJ7cIAAAGrAAAADZoaGVhB20DzAAABuQAAAAkaG10eCIABhQAAAcIAAAALGxvY2ED4AU6AAAHNAAAABhtYXhwAA8AjAAAB0wAAAAgbmFtZXsr690AAAdsAAABhnBvc3QAAwAAAAAI9AAAACAAAwPAAZAABQAAApkCzAAAAI8CmQLMAAAB6wAzAQkAAAAAAAAAAAAAAAAAAAABEAAAAAAAAAAAAAAAAAAAAABAAADpBgPA/8AAQAPAAEAAAAABAAAAAAAAAAAAAAAgAAAAAAADAAAAAwAAABwAAQADAAAAHAADAAEAAAAcAAQAOAAAAAoACAACAAIAAQAg6Qb//f//AAAAAAAg6QD//f//AAH/4xcEAAMAAQAAAAAAAAAAAAAAAQAB//8ADwABAAAAAAAAAAAAAgAANzkBAAAAAAEAAAAAAAAAAAACAAA3OQEAAAAAAQAAAAAAAAAAAAIAADc5AQAAAAABAWIAjQKeAskAEwAAJSc3NjQnJiIHAQYUFwEWMjc2NCcCnuLiDQ0MJAz/AA0NAQAMJAwNDcni4gwjDQwM/wANIwz/AA0NDCMNAAAAAQFiAI0CngLJABMAACUBNjQnASYiBwYUHwEHBhQXFjI3AZ4BAA0N/wAMJAwNDeLiDQ0MJAyNAQAMIw0BAAwMDSMM4uINIwwNDQAAAAIA4gC3Ax4CngATACcAACUnNzY0JyYiDwEGFB8BFjI3NjQnISc3NjQnJiIPAQYUHwEWMjc2NCcB87e3DQ0MIw3VDQ3VDSMMDQ0BK7e3DQ0MJAzVDQ3VDCQMDQ3zuLcMJAwNDdUNIwzWDAwNIwy4twwkDA0N1Q0jDNYMDA0jDAAAAgDiALcDHgKeABMAJwAAJTc2NC8BJiIHBhQfAQcGFBcWMjchNzY0LwEmIgcGFB8BBwYUFxYyNwJJ1Q0N1Q0jDA0Nt7cNDQwjDf7V1Q0N1QwkDA0Nt7cNDQwkDLfWDCMN1Q0NDCQMt7gMIw0MDNYMIw3VDQ0MJAy3uAwjDQwMAAADAFUAAAOrA1UAMwBoAHcAABMiBgcOAQcOAQcOARURFBYXHgEXHgEXHgEzITI2Nz4BNz4BNz4BNRE0JicuAScuAScuASMFITIWFx4BFx4BFx4BFREUBgcOAQcOAQcOASMhIiYnLgEnLgEnLgE1ETQ2Nz4BNz4BNz4BMxMhMjY1NCYjISIGFRQWM9UNGAwLFQkJDgUFBQUFBQ4JCRULDBgNAlYNGAwLFQkJDgUFBQUFBQ4JCRULDBgN/aoCVgQIBAQHAwMFAQIBAQIBBQMDBwQECAT9qgQIBAQHAwMFAQIBAQIBBQMDBwQECASAAVYRGRkR/qoRGRkRA1UFBAUOCQkVDAsZDf2rDRkLDBUJCA4FBQUFBQUOCQgVDAsZDQJVDRkLDBUJCQ4FBAVVAgECBQMCBwQECAX9qwQJAwQHAwMFAQICAgIBBQMDBwQDCQQCVQUIBAQHAgMFAgEC/oAZEhEZGRESGQAAAAADAFUAAAOrA1UAMwBoAIkAABMiBgcOAQcOAQcOARURFBYXHgEXHgEXHgEzITI2Nz4BNz4BNz4BNRE0JicuAScuAScuASMFITIWFx4BFx4BFx4BFREUBgcOAQcOAQcOASMhIiYnLgEnLgEnLgE1ETQ2Nz4BNz4BNz4BMxMzFRQWMzI2PQEzMjY1NCYrATU0JiMiBh0BIyIGFRQWM9UNGAwLFQkJDgUFBQUFBQ4JCRULDBgNAlYNGAwLFQkJDgUFBQUFBQ4JCRULDBgN/aoCVgQIBAQHAwMFAQIBAQIBBQMDBwQECAT9qgQIBAQHAwMFAQIBAQIBBQMDBwQECASAgBkSEhmAERkZEYAZEhIZgBEZGREDVQUEBQ4JCRUMCxkN/asNGQsMFQkIDgUFBQUFBQ4JCBUMCxkNAlUNGQsMFQkJDgUEBVUCAQIFAwIHBAQIBf2rBAkDBAcDAwUBAgICAgEFAwMHBAMJBAJVBQgEBAcCAwUCAQL+gIASGRkSgBkSERmAEhkZEoAZERIZAAABAOIAjQMeAskAIAAAExcHBhQXFjI/ARcWMjc2NC8BNzY0JyYiDwEnJiIHBhQX4uLiDQ0MJAzi4gwkDA0N4uINDQwkDOLiDCQMDQ0CjeLiDSMMDQ3h4Q0NDCMN4uIMIw0MDOLiDAwNIwwAAAABAAAAAQAAa5n0y18PPPUACwQAAAAAANivOVsAAAAA2K85WwAAAAADqwNVAAAACAACAAAAAAAAAAEAAAPA/8AAAAQAAAAAAAOrAAEAAAAAAAAAAAAAAAAAAAALBAAAAAAAAAAAAAAAAgAAAAQAAWIEAAFiBAAA4gQAAOIEAABVBAAAVQQAAOIAAAAAAAoAFAAeAEQAagCqAOoBngJkApoAAQAAAAsAigADAAAAAAACAAAAAAAAAAAAAAAAAAAAAAAAAA4ArgABAAAAAAABAAcAAAABAAAAAAACAAcAYAABAAAAAAADAAcANgABAAAAAAAEAAcAdQABAAAAAAAFAAsAFQABAAAAAAAGAAcASwABAAAAAAAKABoAigADAAEECQABAA4ABwADAAEECQACAA4AZwADAAEECQADAA4APQADAAEECQAEAA4AfAADAAEECQAFABYAIAADAAEECQAGAA4AUgADAAEECQAKADQApGZjaWNvbnMAZgBjAGkAYwBvAG4Ac1ZlcnNpb24gMS4wAFYAZQByAHMAaQBvAG4AIAAxAC4AMGZjaWNvbnMAZgBjAGkAYwBvAG4Ac2ZjaWNvbnMAZgBjAGkAYwBvAG4Ac1JlZ3VsYXIAUgBlAGcAdQBsAGEAcmZjaWNvbnMAZgBjAGkAYwBvAG4Ac0ZvbnQgZ2VuZXJhdGVkIGJ5IEljb01vb24uAEYAbwBuAHQAIABnAGUAbgBlAHIAYQB0AGUAZAAgAGIAeQAgAEkAYwBvAE0AbwBvAG4ALgAAAAMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=") format("truetype")}.fc-icon{speak:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;display:inline-block;font-family:fcicons!important;font-style:normal;font-variant:normal;font-weight:400;height:1em;line-height:1;text-align:center;text-transform:none;-webkit-user-select:none;-moz-user-select:none;user-select:none;width:1em}.fc-icon-chevron-left:before{content:"\\e900"}.fc-icon-chevron-right:before{content:"\\e901"}.fc-icon-chevrons-left:before{content:"\\e902"}.fc-icon-chevrons-right:before{content:"\\e903"}.fc-icon-minus-square:before{content:"\\e904"}.fc-icon-plus-square:before{content:"\\e905"}.fc-icon-x:before{content:"\\e906"}.fc .fc-button{border-radius:0;font-family:inherit;font-size:inherit;line-height:inherit;margin:0;overflow:visible;text-transform:none}.fc .fc-button:focus{outline:1px dotted;outline:5px auto -webkit-focus-ring-color}.fc .fc-button{-webkit-appearance:button}.fc .fc-button:not(:disabled){cursor:pointer}.fc .fc-button{background-color:transparent;border:1px solid transparent;border-radius:.25em;display:inline-block;font-size:1em;font-weight:400;line-height:1.5;padding:.4em .65em;text-align:center;-webkit-user-select:none;-moz-user-select:none;user-select:none;vertical-align:middle}.fc .fc-button:hover{text-decoration:none}.fc .fc-button:focus{box-shadow:0 0 0 .2rem rgba(44,62,80,.25);outline:0}.fc .fc-button:disabled{opacity:.65}.fc .fc-button-primary{background-color:var(--fc-button-bg-color);border-color:var(--fc-button-border-color);color:var(--fc-button-text-color)}.fc .fc-button-primary:hover{background-color:var(--fc-button-hover-bg-color);border-color:var(--fc-button-hover-border-color);color:var(--fc-button-text-color)}.fc .fc-button-primary:disabled{background-color:var(--fc-button-bg-color);border-color:var(--fc-button-border-color);color:var(--fc-button-text-color)}.fc .fc-button-primary:focus{box-shadow:0 0 0 .2rem rgba(76,91,106,.5)}.fc .fc-button-primary:not(:disabled).fc-button-active,.fc .fc-button-primary:not(:disabled):active{background-color:var(--fc-button-active-bg-color);border-color:var(--fc-button-active-border-color);color:var(--fc-button-text-color)}.fc .fc-button-primary:not(:disabled).fc-button-active:focus,.fc .fc-button-primary:not(:disabled):active:focus{box-shadow:0 0 0 .2rem rgba(76,91,106,.5)}.fc .fc-button .fc-icon{font-size:1.5em;vertical-align:middle}.fc .fc-button-group{display:inline-flex;position:relative;vertical-align:middle}.fc .fc-button-group>.fc-button{flex:1 1 auto;position:relative}.fc .fc-button-group>.fc-button.fc-button-active,.fc .fc-button-group>.fc-button:active,.fc .fc-button-group>.fc-button:focus,.fc .fc-button-group>.fc-button:hover{z-index:1}.fc-direction-ltr .fc-button-group>.fc-button:not(:first-child){border-bottom-left-radius:0;border-top-left-radius:0;margin-left:-1px}.fc-direction-ltr .fc-button-group>.fc-button:not(:last-child){border-bottom-right-radius:0;border-top-right-radius:0}.fc-direction-rtl .fc-button-group>.fc-button:not(:first-child){border-bottom-right-radius:0;border-top-right-radius:0;margin-right:-1px}.fc-direction-rtl .fc-button-group>.fc-button:not(:last-child){border-bottom-left-radius:0;border-top-left-radius:0}.fc .fc-toolbar{align-items:center;display:flex;justify-content:space-between}.fc .fc-toolbar.fc-header-toolbar{margin-bottom:1.5em}.fc .fc-toolbar.fc-footer-toolbar{margin-top:1.5em}.fc .fc-toolbar-title{font-size:1.75em;margin:0}.fc-direction-ltr .fc-toolbar>*>:not(:first-child){margin-left:.75em}.fc-direction-rtl .fc-toolbar>*>:not(:first-child){margin-right:.75em}.fc-direction-rtl .fc-toolbar-ltr{flex-direction:row-reverse}.fc .fc-scroller{-webkit-overflow-scrolling:touch;position:relative}.fc .fc-scroller-liquid{height:100%}.fc .fc-scroller-liquid-absolute{bottom:0;left:0;position:absolute;right:0;top:0}.fc .fc-scroller-harness{direction:ltr;overflow:hidden;position:relative}.fc .fc-scroller-harness-liquid{height:100%}.fc-direction-rtl .fc-scroller-harness>.fc-scroller{direction:rtl}.fc-theme-standard .fc-scrollgrid{border:1px solid var(--fc-border-color)}.fc .fc-scrollgrid,.fc .fc-scrollgrid table{table-layout:fixed;width:100%}.fc .fc-scrollgrid table{border-left-style:hidden;border-right-style:hidden;border-top-style:hidden}.fc .fc-scrollgrid{border-bottom-width:0;border-collapse:separate;border-right-width:0}.fc .fc-scrollgrid-liquid{height:100%}.fc .fc-scrollgrid-section,.fc .fc-scrollgrid-section table,.fc .fc-scrollgrid-section>td{height:1px}.fc .fc-scrollgrid-section-liquid>td{height:100%}.fc .fc-scrollgrid-section>*{border-left-width:0;border-top-width:0}.fc .fc-scrollgrid-section-footer>*,.fc .fc-scrollgrid-section-header>*{border-bottom-width:0}.fc .fc-scrollgrid-section-body table,.fc .fc-scrollgrid-section-footer table{border-bottom-style:hidden}.fc .fc-scrollgrid-section-sticky>*{background:var(--fc-page-bg-color);position:sticky;z-index:3}.fc .fc-scrollgrid-section-header.fc-scrollgrid-section-sticky>*{top:0}.fc .fc-scrollgrid-section-footer.fc-scrollgrid-section-sticky>*{bottom:0}.fc .fc-scrollgrid-sticky-shim{height:1px;margin-bottom:-1px}.fc-sticky{position:sticky}.fc .fc-view-harness{flex-grow:1;position:relative}.fc .fc-view-harness-active>.fc-view{bottom:0;left:0;position:absolute;right:0;top:0}.fc .fc-col-header-cell-cushion{display:inline-block;padding:2px 4px}.fc .fc-bg-event,.fc .fc-highlight,.fc .fc-non-business{bottom:0;left:0;position:absolute;right:0;top:0}.fc .fc-non-business{background:var(--fc-non-business-color)}.fc .fc-bg-event{background:var(--fc-bg-event-color);opacity:var(--fc-bg-event-opacity)}.fc .fc-bg-event .fc-event-title{font-size:var(--fc-small-font-size);font-style:italic;margin:.5em}.fc .fc-highlight{background:var(--fc-highlight-color)}.fc .fc-cell-shaded,.fc .fc-day-disabled{background:var(--fc-neutral-bg-color)}a.fc-event,a.fc-event:hover{text-decoration:none}.fc-event.fc-event-draggable,.fc-event[href]{cursor:pointer}.fc-event .fc-event-main{position:relative;z-index:2}.fc-event-dragging:not(.fc-event-selected){opacity:.75}.fc-event-dragging.fc-event-selected{box-shadow:0 2px 7px rgba(0,0,0,.3)}.fc-event .fc-event-resizer{display:none;position:absolute;z-index:4}.fc-event-selected .fc-event-resizer,.fc-event:hover .fc-event-resizer{display:block}.fc-event-selected .fc-event-resizer{background:var(--fc-page-bg-color);border-color:inherit;border-radius:calc(var(--fc-event-resizer-dot-total-width)/2);border-style:solid;border-width:var(--fc-event-resizer-dot-border-width);height:var(--fc-event-resizer-dot-total-width);width:var(--fc-event-resizer-dot-total-width)}.fc-event-selected .fc-event-resizer:before{bottom:-20px;content:"";left:-20px;position:absolute;right:-20px;top:-20px}.fc-event-selected,.fc-event:focus{box-shadow:0 2px 5px rgba(0,0,0,.2)}.fc-event-selected:before,.fc-event:focus:before{bottom:0;content:"";left:0;position:absolute;right:0;top:0;z-index:3}.fc-event-selected:after,.fc-event:focus:after{background:var(--fc-event-selected-overlay-color);bottom:-1px;content:"";left:-1px;position:absolute;right:-1px;top:-1px;z-index:1}.fc-h-event{background-color:var(--fc-event-bg-color);border:1px solid var(--fc-event-border-color);display:block}.fc-h-event .fc-event-main{color:var(--fc-event-text-color)}.fc-h-event .fc-event-main-frame{display:flex}.fc-h-event .fc-event-time{max-width:100%;overflow:hidden}.fc-h-event .fc-event-title-container{flex-grow:1;flex-shrink:1;min-width:0}.fc-h-event .fc-event-title{display:inline-block;left:0;max-width:100%;overflow:hidden;right:0;vertical-align:top}.fc-h-event.fc-event-selected:before{bottom:-10px;top:-10px}.fc-direction-ltr .fc-daygrid-block-event:not(.fc-event-start),.fc-direction-rtl .fc-daygrid-block-event:not(.fc-event-end){border-bottom-left-radius:0;border-left-width:0;border-top-left-radius:0}.fc-direction-ltr .fc-daygrid-block-event:not(.fc-event-end),.fc-direction-rtl .fc-daygrid-block-event:not(.fc-event-start){border-bottom-right-radius:0;border-right-width:0;border-top-right-radius:0}.fc-h-event:not(.fc-event-selected) .fc-event-resizer{bottom:0;top:0;width:var(--fc-event-resizer-thickness)}.fc-direction-ltr .fc-h-event:not(.fc-event-selected) .fc-event-resizer-start,.fc-direction-rtl .fc-h-event:not(.fc-event-selected) .fc-event-resizer-end{cursor:w-resize;left:calc(var(--fc-event-resizer-thickness)*-.5)}.fc-direction-ltr .fc-h-event:not(.fc-event-selected) .fc-event-resizer-end,.fc-direction-rtl .fc-h-event:not(.fc-event-selected) .fc-event-resizer-start{cursor:e-resize;right:calc(var(--fc-event-resizer-thickness)*-.5)}.fc-h-event.fc-event-selected .fc-event-resizer{margin-top:calc(var(--fc-event-resizer-dot-total-width)*-.5);top:50%}.fc-direction-ltr .fc-h-event.fc-event-selected .fc-event-resizer-start,.fc-direction-rtl .fc-h-event.fc-event-selected .fc-event-resizer-end{left:calc(var(--fc-event-resizer-dot-total-width)*-.5)}.fc-direction-ltr .fc-h-event.fc-event-selected .fc-event-resizer-end,.fc-direction-rtl .fc-h-event.fc-event-selected .fc-event-resizer-start{right:calc(var(--fc-event-resizer-dot-total-width)*-.5)}.fc .fc-popover{box-shadow:0 2px 6px rgba(0,0,0,.15);position:absolute;z-index:9999}.fc .fc-popover-header{align-items:center;display:flex;flex-direction:row;justify-content:space-between;padding:3px 4px}.fc .fc-popover-title{margin:0 2px}.fc .fc-popover-close{cursor:pointer;font-size:1.1em;opacity:.65}.fc-theme-standard .fc-popover{background:var(--fc-page-bg-color);border:1px solid var(--fc-border-color)}.fc-theme-standard .fc-popover-header{background:var(--fc-neutral-bg-color)}`);var TO=class{constructor(e){this.drainedOption=e,this.isRunning=!1,this.isDirty=!1,this.pauseDepths={},this.timeoutId=0}request(e){this.isDirty=!0,this.isPaused()||(this.clearTimeout(),e==null?this.tryDrain():this.timeoutId=setTimeout(this.tryDrain.bind(this),e))}pause(e=``){let{pauseDepths:t}=this;t[e]=(t[e]||0)+1,this.clearTimeout()}resume(e=``,t){let{pauseDepths:n}=this;e in n&&(t?delete n[e]:(--n[e],n[e]<=0&&delete n[e]),this.tryDrain())}isPaused(){return Object.keys(this.pauseDepths).length}tryDrain(){if(!this.isRunning&&!this.isPaused()){for(this.isRunning=!0;this.isDirty;)this.isDirty=!1,this.drained();this.isRunning=!1}}clear(){this.clearTimeout(),this.isDirty=!1,this.pauseDepths={}}clearTimeout(){this.timeoutId&&=(clearTimeout(this.timeoutId),0)}drained(){this.drainedOption&&this.drainedOption()}};function EO(e){e.parentNode&&e.parentNode.removeChild(e)}function DO(e,t){if(e.closest)return e.closest(t);if(!document.documentElement.contains(e))return null;do{if(OO(e,t))return e;e=e.parentElement||e.parentNode}while(e!==null&&e.nodeType===1);return null}function OO(e,t){return(e.matches||e.matchesSelector||e.msMatchesSelector).call(e,t)}function kO(e,t){let n=e instanceof HTMLElement?[e]:e,r=[];for(let e=0;e<n.length;e+=1){let i=n[e].querySelectorAll(t);for(let e=0;e<i.length;e+=1)r.push(i[e])}return r}var AO=/(top|left|right|bottom|width|height)$/i;function jO(e,t){for(let n in t)MO(e,n,t[n])}function MO(e,t,n){n==null?e.style[t]=``:typeof n==`number`&&AO.test(t)?e.style[t]=`${n}px`:e.style[t]=n}function NO(e){return e.composedPath?.call(e)[0]??e.target}var PO=0;function FO(){return PO+=1,`fc-dom-`+PO}function IO(e,t){return n=>{let r=DO(n.target,e);r&&t.call(r,n,r)}}function LO(e,t,n,r){let i=IO(n,r);return e.addEventListener(t,i),()=>{e.removeEventListener(t,i)}}function RO(e,t,n,r){let i;return LO(e,`mouseover`,t,(e,t)=>{if(t!==i){i=t,n(e,t);let a=e=>{i=null,r(e,t),t.removeEventListener(`mouseleave`,a)};t.addEventListener(`mouseleave`,a)}})}function zO(e){return Object.assign({onClick:e},BO(e))}function BO(e){return{tabIndex:0,onKeyDown(t){(t.key===`Enter`||t.key===` `)&&(e(t),t.preventDefault())}}}var VO=0;function HO(){return VO+=1,String(VO)}function UO(e){let t=[],n=[],r,i;for(typeof e==`string`?n=e.split(/\s*,\s*/):typeof e==`function`?n=[e]:Array.isArray(e)&&(n=e),r=0;r<n.length;r+=1)i=n[r],typeof i==`string`?t.push(i.charAt(0)===`-`?{field:i.substring(1),order:-1}:{field:i,order:1}):typeof i==`function`&&t.push({func:i});return t}function WO(e,t,n){let r,i;for(r=0;r<n.length;r+=1)if(i=GO(e,t,n[r]),i)return i;return 0}function GO(e,t,n){return n.func?n.func(e,t):KO(e[n.field],t[n.field])*(n.order||1)}function KO(e,t){return!e&&!t?0:t==null?-1:e==null?1:typeof e==`string`||typeof t==`string`?String(e).localeCompare(String(t)):e-t}function qO(e,t){let n=String(e);return`000`.substr(0,t-n.length)+n}function JO(e,t,n){return typeof e==`function`?e(...t):typeof e==`string`?t.reduce((e,t,n)=>e.replace(`$`+n,t||``),e):n}function YO(e){return e%1==0}function XO(e){let t=e.querySelector(`.fc-scrollgrid-shrink-frame`),n=e.querySelector(`.fc-scrollgrid-shrink-cushion`);if(!t)throw Error(`needs fc-scrollgrid-shrink-frame className`);if(!n)throw Error(`needs fc-scrollgrid-shrink-cushion className`);return e.getBoundingClientRect().width-t.getBoundingClientRect().width+n.getBoundingClientRect().width}var ZO=/^(-?)(?:(\d+)\.)?(\d+):(\d\d)(?::(\d\d)(?:\.(\d\d\d))?)?/;function QO(e,t){return typeof e==`string`?$O(e):typeof e==`object`&&e?ek(e):typeof e==`number`?ek({[t||`milliseconds`]:e}):null}function $O(e){let t=ZO.exec(e);if(t){let e=t[1]?-1:1;return{years:0,months:0,days:e*(t[2]?parseInt(t[2],10):0),milliseconds:e*((t[3]?parseInt(t[3],10):0)*60*60*1e3+(t[4]?parseInt(t[4],10):0)*60*1e3+(t[5]?parseInt(t[5],10):0)*1e3+(t[6]?parseInt(t[6],10):0))}}return null}function ek(e){let t={years:e.years||e.year||0,months:e.months||e.month||0,days:e.days||e.day||0,milliseconds:(e.hours||e.hour||0)*60*60*1e3+(e.minutes||e.minute||0)*60*1e3+(e.seconds||e.second||0)*1e3+(e.milliseconds||e.millisecond||e.ms||0)},n=e.weeks||e.week;return n&&(t.days+=n*7,t.specifiedWeeks=!0),t}function tk(e,t){return e.years===t.years&&e.months===t.months&&e.days===t.days&&e.milliseconds===t.milliseconds}function nk(e,t){return{years:e.years-t.years,months:e.months-t.months,days:e.days-t.days,milliseconds:e.milliseconds-t.milliseconds}}function rk(e){return ak(e)/365}function ik(e){return ak(e)/30}function ak(e){return ok(e)/864e5}function ok(e){return e.years*31536e6+e.months*2592e6+e.days*864e5+e.milliseconds}function sk(e){let t=e.milliseconds;if(t){if(t%1e3!=0)return{unit:`millisecond`,value:t};if(t%6e4!=0)return{unit:`second`,value:t/1e3};if(t%36e5!=0)return{unit:`minute`,value:t/6e4};if(t)return{unit:`hour`,value:t/36e5}}return e.days?e.specifiedWeeks&&e.days%7==0?{unit:`week`,value:e.days/7}:{unit:`day`,value:e.days}:e.months?{unit:`month`,value:e.months}:e.years?{unit:`year`,value:e.years}:{unit:`millisecond`,value:0}}function ck(e,t,n){if(e===t)return!0;let r=e.length,i;if(r!==t.length)return!1;for(i=0;i<r;i+=1)if(!(n?n(e[i],t[i]):e[i]===t[i]))return!1;return!0}var lk=[`sun`,`mon`,`tue`,`wed`,`thu`,`fri`,`sat`];function uk(e,t){let n=Ak(e);return n[2]+=t*7,jk(n)}function dk(e,t){let n=Ak(e);return n[2]+=t,jk(n)}function fk(e,t){let n=Ak(e);return n[6]+=t,jk(n)}function pk(e,t){return mk(e,t)/7}function mk(e,t){return(t.valueOf()-e.valueOf())/864e5}function hk(e,t){return(t.valueOf()-e.valueOf())/36e5}function gk(e,t){return(t.valueOf()-e.valueOf())/6e4}function _k(e,t){return(t.valueOf()-e.valueOf())/1e3}function vk(e,t){let n=xk(e),r=xk(t);return{years:0,months:0,days:Math.round(mk(n,r)),milliseconds:t.valueOf()-r.valueOf()-(e.valueOf()-n.valueOf())}}function yk(e,t){let n=bk(e,t);return n!==null&&n%7==0?n/7:null}function bk(e,t){return Nk(e)===Nk(t)?Math.round(mk(e,t)):null}function xk(e){return jk([e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate()])}function Sk(e){return jk([e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate(),e.getUTCHours()])}function Ck(e){return jk([e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate(),e.getUTCHours(),e.getUTCMinutes()])}function wk(e){return jk([e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate(),e.getUTCHours(),e.getUTCMinutes(),e.getUTCSeconds()])}function Tk(e,t,n){let r=e.getUTCFullYear(),i=Ek(e,r,t,n);if(i<1)return Ek(e,r-1,t,n);let a=Ek(e,r+1,t,n);return a>=1?Math.min(i,a):i}function Ek(e,t,n,r){let i=jk([t,0,1+Dk(t,n,r)]),a=xk(e),o=Math.round(mk(i,a));return Math.floor(o/7)+1}function Dk(e,t,n){let r=7+t-n;return-((7+jk([e,0,r]).getUTCDay()-t)%7)+r-1}function Ok(e){return[e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()]}function kk(e){return new Date(e[0],e[1]||0,e[2]==null?1:e[2],e[3]||0,e[4]||0,e[5]||0)}function Ak(e){return[e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate(),e.getUTCHours(),e.getUTCMinutes(),e.getUTCSeconds(),e.getUTCMilliseconds()]}function jk(e){return e.length===1&&(e=e.concat([0])),new Date(Date.UTC(...e))}function Mk(e){return!isNaN(e.valueOf())}function Nk(e){return e.getUTCHours()*1e3*60*60+e.getUTCMinutes()*1e3*60+e.getUTCSeconds()*1e3+e.getUTCMilliseconds()}function Pk(e,t,n=!1){let r=e.toISOString();return r=r.replace(`.000`,``),n&&(r=r.replace(`T00:00:00Z`,``)),r.length>10&&(t==null?r=r.replace(`Z`,``):t!==0&&(r=r.replace(`Z`,Lk(t,!0)))),r}function Fk(e){return e.toISOString().replace(/T.*$/,``)}function Ik(e){return e.toISOString().match(/^\d{4}-\d{2}/)[0]}function Lk(e,t=!1){let n=e<0?`-`:`+`,r=Math.abs(e),i=Math.floor(r/60),a=Math.round(r%60);return t?`${n+qO(i,2)}:${qO(a,2)}`:`GMT${n}${i}${a?`:${qO(a,2)}`:``}`}function Rk(e,t,n){let r,i;return function(...a){if(!r)i=e.apply(this,a);else if(!ck(r,a)){n&&n(i);let r=e.apply(this,a);t&&t(r,i)||(i=r)}return r=a,i}}function zk(e,t,n){let r,i;return a=>{if(!r)i=e.call(this,a);else if(!wA(r,a)){n&&n(i);let r=e.call(this,a);t&&t(r,i)||(i=r)}return r=a,i}}var Bk={week:3,separator:9,omitZeroMinute:9,meridiem:9,omitCommas:9},Vk={timeZoneName:7,era:6,year:5,month:4,day:2,weekday:2,hour:1,minute:1,second:1},Hk=/\s*([ap])\.?m\.?/i,Uk=/,/g,Wk=/\s+/g,Gk=/\u200e/g,Kk=/UTC|GMT/,qk=class{constructor(e){let t={},n={},r=9;for(let i in e)i in Bk?(n[i]=e[i],Bk[i]<9&&(r=Math.min(Bk[i],r))):(t[i]=e[i],i in Vk&&(r=Math.min(Vk[i],r)));this.standardDateProps=t,this.extendedSettings=n,this.smallestUnitNum=r,this.buildFormattingFunc=Rk(Jk)}format(e,t){return this.buildFormattingFunc(this.standardDateProps,this.extendedSettings,t)(e)}formatRange(e,t,n,r){let{standardDateProps:i,extendedSettings:a}=this,o=eA(e.marker,t.marker,n.calendarSystem);if(!o)return this.format(e,n);let s=o;s>1&&(i.year===`numeric`||i.year===`2-digit`)&&(i.month===`numeric`||i.month===`2-digit`)&&(i.day===`numeric`||i.day===`2-digit`)&&(s=1);let c=this.format(e,n),l=this.format(t,n);if(c===l)return c;let u=Jk(tA(i,s),a,n),d=u(e),f=u(t),p=nA(c,d,l,f),m=a.separator||r||n.defaultSeparator||``;return p?p.before+d+m+f+p.after:c+m+l}getSmallestUnit(){switch(this.smallestUnitNum){case 7:case 6:case 5:return`year`;case 4:return`month`;case 3:return`week`;case 2:return`day`;default:return`time`}}};function Jk(e,t,n){let r=Object.keys(e).length;return r===1&&e.timeZoneName===`short`?e=>Lk(e.timeZoneOffset):r===0&&t.week?e=>$k(n.computeWeekNumber(e.marker),n.weekText,n.weekTextLong,n.locale,t.week):Yk(e,t,n)}function Yk(e,t,n){e=Object.assign({},e),t=Object.assign({},t),Xk(e,t),e.timeZone=`UTC`;let r=new Intl.DateTimeFormat(n.locale.codes,e),i;if(t.omitZeroMinute){let t=Object.assign({},e);delete t.minute,i=new Intl.DateTimeFormat(n.locale.codes,t)}return a=>{let{marker:o}=a,s;return s=i&&!o.getUTCMinutes()?i:r,Zk(s.format(o),a,e,t,n)}}function Xk(e,t){e.timeZoneName&&(e.hour||=`2-digit`,e.minute||=`2-digit`),e.timeZoneName===`long`&&(e.timeZoneName=`short`),t.omitZeroMinute&&(e.second||e.millisecond)&&delete t.omitZeroMinute}function Zk(e,t,n,r,i){return e=e.replace(Gk,``),n.timeZoneName===`short`&&(e=Qk(e,i.timeZone===`UTC`||t.timeZoneOffset==null?`UTC`:Lk(t.timeZoneOffset))),r.omitCommas&&(e=e.replace(Uk,``).trim()),r.omitZeroMinute&&(e=e.replace(`:00`,``)),r.meridiem===!1?e=e.replace(Hk,``).trim():r.meridiem===`narrow`?e=e.replace(Hk,(e,t)=>t.toLocaleLowerCase()):r.meridiem===`short`?e=e.replace(Hk,(e,t)=>`${t.toLocaleLowerCase()}m`):r.meridiem===`lowercase`&&(e=e.replace(Hk,e=>e.toLocaleLowerCase())),e=e.replace(Wk,` `),e=e.trim(),e}function Qk(e,t){let n=!1;return e=e.replace(Kk,()=>(n=!0,t)),n||(e+=` ${t}`),e}function $k(e,t,n,r,i){let a=[];return i===`long`?a.push(n):(i===`short`||i===`narrow`)&&a.push(t),(i===`long`||i===`short`)&&a.push(` `),a.push(r.simpleNumberFormat.format(e)),r.options.direction===`rtl`&&a.reverse(),a.join(``)}function eA(e,t,n){return n.getMarkerYear(e)===n.getMarkerYear(t)?n.getMarkerMonth(e)===n.getMarkerMonth(t)?n.getMarkerDay(e)===n.getMarkerDay(t)?Nk(e)===Nk(t)?0:1:2:4:5}function tA(e,t){let n={};for(let r in e)(!(r in Vk)||Vk[r]<=t)&&(n[r]=e[r]);return n}function nA(e,t,n,r){let i=0;for(;i<e.length;){let a=e.indexOf(t,i);if(a===-1)break;let o=e.substr(0,a);i=a+t.length;let s=e.substr(i),c=0;for(;c<n.length;){let e=n.indexOf(r,c);if(e===-1)break;let t=n.substr(0,e);c=e+r.length;let i=n.substr(c);if(o===t&&s===i)return{before:o,after:s}}}return null}function rA(e,t){let n=t.markerToArray(e.marker);return{marker:e.marker,timeZoneOffset:e.timeZoneOffset,array:n,year:n[0],month:n[1],day:n[2],hour:n[3],minute:n[4],second:n[5],millisecond:n[6]}}function iA(e,t,n,r){let i=rA(e,n.calendarSystem);return{date:i,start:i,end:t?rA(t,n.calendarSystem):null,timeZone:n.timeZone,localeCodes:n.locale.codes,defaultSeparator:r||n.defaultSeparator}}var aA=class{constructor(e){this.cmdStr=e}format(e,t,n){return t.cmdFormatter(this.cmdStr,iA(e,null,t,n))}formatRange(e,t,n,r){return n.cmdFormatter(this.cmdStr,iA(e,t,n,r))}},oA=class{constructor(e){this.func=e}format(e,t,n){return this.func(iA(e,null,t,n))}formatRange(e,t,n,r){return this.func(iA(e,t,n,r))}};function sA(e){return typeof e==`object`&&e?new qk(e):typeof e==`string`?new aA(e):typeof e==`function`?new oA(e):null}var cA={navLinkDayClick:$,navLinkWeekClick:$,duration:QO,bootstrapFontAwesome:$,buttonIcons:$,customButtons:$,defaultAllDayEventDuration:QO,defaultTimedEventDuration:QO,nextDayThreshold:QO,scrollTime:QO,scrollTimeReset:Boolean,slotMinTime:QO,slotMaxTime:QO,dayPopoverFormat:sA,slotDuration:QO,snapDuration:QO,headerToolbar:$,footerToolbar:$,defaultRangeSeparator:String,titleRangeSeparator:String,forceEventDuration:Boolean,dayHeaders:Boolean,dayHeaderFormat:sA,dayHeaderClassNames:$,dayHeaderContent:$,dayHeaderDidMount:$,dayHeaderWillUnmount:$,dayCellClassNames:$,dayCellContent:$,dayCellDidMount:$,dayCellWillUnmount:$,initialView:String,aspectRatio:Number,weekends:Boolean,weekNumberCalculation:$,weekNumbers:Boolean,weekNumberClassNames:$,weekNumberContent:$,weekNumberDidMount:$,weekNumberWillUnmount:$,editable:Boolean,viewClassNames:$,viewDidMount:$,viewWillUnmount:$,nowIndicator:Boolean,nowIndicatorSnap:$,nowIndicatorClassNames:$,nowIndicatorContent:$,nowIndicatorDidMount:$,nowIndicatorWillUnmount:$,showNonCurrentDates:Boolean,lazyFetching:Boolean,startParam:String,endParam:String,timeZoneParam:String,timeZone:String,locales:$,locale:$,themeSystem:String,dragRevertDuration:Number,dragScroll:Boolean,allDayMaintainDuration:Boolean,unselectAuto:Boolean,dropAccept:$,eventOrder:UO,eventOrderStrict:Boolean,handleWindowResize:Boolean,windowResizeDelay:Number,longPressDelay:Number,eventDragMinDistance:Number,expandRows:Boolean,height:$,contentHeight:$,direction:String,weekNumberFormat:sA,eventResizableFromStart:Boolean,displayEventTime:Boolean,displayEventEnd:Boolean,weekText:String,weekTextLong:String,progressiveEventRendering:Boolean,businessHours:$,initialDate:$,now:$,eventDataTransform:$,stickyHeaderDates:$,stickyFooterScrollbar:$,viewHeight:$,defaultAllDay:Boolean,eventSourceFailure:$,eventSourceSuccess:$,eventDisplay:String,eventStartEditable:Boolean,eventDurationEditable:Boolean,eventOverlap:$,eventConstraint:$,eventAllow:$,eventBackgroundColor:String,eventBorderColor:String,eventTextColor:String,eventColor:String,eventClassNames:$,eventContent:$,eventDidMount:$,eventWillUnmount:$,selectConstraint:$,selectOverlap:$,selectAllow:$,droppable:Boolean,unselectCancel:String,slotLabelFormat:$,slotLaneClassNames:$,slotLaneContent:$,slotLaneDidMount:$,slotLaneWillUnmount:$,slotLabelClassNames:$,slotLabelContent:$,slotLabelDidMount:$,slotLabelWillUnmount:$,dayMaxEvents:$,dayMaxEventRows:$,dayMinWidth:Number,slotLabelInterval:QO,allDayText:String,allDayClassNames:$,allDayContent:$,allDayDidMount:$,allDayWillUnmount:$,slotMinWidth:Number,navLinks:Boolean,eventTimeFormat:sA,rerenderDelay:Number,moreLinkText:$,moreLinkHint:$,selectMinDistance:Number,selectable:Boolean,selectLongPressDelay:Number,eventLongPressDelay:Number,selectMirror:Boolean,eventMaxStack:Number,eventMinHeight:Number,eventMinWidth:Number,eventShortHeight:Number,slotEventOverlap:Boolean,plugins:$,firstDay:Number,dayCount:Number,dateAlignment:String,dateIncrement:QO,hiddenDays:$,fixedWeekCount:Boolean,validRange:$,visibleRange:$,titleFormat:$,eventInteractive:Boolean,noEventsText:String,viewHint:$,navLinkHint:$,closeHint:String,timeHint:String,eventHint:String,moreLinkClick:$,moreLinkClassNames:$,moreLinkContent:$,moreLinkDidMount:$,moreLinkWillUnmount:$,monthStartFormat:sA,handleCustomRendering:$,customRenderingMetaMap:$,customRenderingReplaces:Boolean},lA={eventDisplay:`auto`,defaultRangeSeparator:` - `,titleRangeSeparator:` – `,defaultTimedEventDuration:`01:00:00`,defaultAllDayEventDuration:{day:1},forceEventDuration:!1,nextDayThreshold:`00:00:00`,dayHeaders:!0,initialView:``,aspectRatio:1.35,headerToolbar:{start:`title`,center:``,end:`today prev,next`},weekends:!0,weekNumbers:!1,weekNumberCalculation:`local`,editable:!1,nowIndicator:!1,scrollTime:`06:00:00`,scrollTimeReset:!0,slotMinTime:`00:00:00`,slotMaxTime:`24:00:00`,showNonCurrentDates:!0,lazyFetching:!0,startParam:`start`,endParam:`end`,timeZoneParam:`timeZone`,timeZone:`local`,locales:[],locale:``,themeSystem:`standard`,dragRevertDuration:500,dragScroll:!0,allDayMaintainDuration:!1,unselectAuto:!0,dropAccept:`*`,eventOrder:`start,-duration,allDay,title`,dayPopoverFormat:{month:`long`,day:`numeric`,year:`numeric`},handleWindowResize:!0,windowResizeDelay:100,longPressDelay:1e3,eventDragMinDistance:5,expandRows:!1,navLinks:!1,selectable:!1,eventMinHeight:15,eventMinWidth:30,eventShortHeight:30,monthStartFormat:{month:`long`,day:`numeric`},nowIndicatorSnap:`auto`},uA={datesSet:$,eventsSet:$,eventAdd:$,eventChange:$,eventRemove:$,windowResize:$,eventClick:$,eventMouseEnter:$,eventMouseLeave:$,select:$,unselect:$,loading:$,_unmount:$,_beforeprint:$,_afterprint:$,_noEventDrop:$,_noEventResize:$,_resize:$,_scrollRequest:$},dA={buttonText:$,buttonHints:$,views:$,plugins:$,initialEvents:$,events:$,eventSources:$},fA={headerToolbar:pA,footerToolbar:pA,buttonText:pA,buttonHints:pA,buttonIcons:pA,dateIncrement:pA,plugins:mA,events:mA,eventSources:mA,resources:mA};function pA(e,t){return typeof e==`object`&&typeof t==`object`&&e&&t?wA(e,t):e===t}function mA(e,t){return Array.isArray(e)&&Array.isArray(t)?ck(e,t):e===t}var hA={type:String,component:$,buttonText:String,buttonTextKey:String,dateProfileGeneratorClass:$,usesMinMaxTime:Boolean,classNames:$,content:$,didMount:$,willUnmount:$};function gA(e){return yA(e,fA)}function _A(e,t){let n={},r={};for(let r in t)r in e&&(n[r]=t[r](e[r]));for(let n in e)n in t||(r[n]=e[n]);return{refined:n,extra:r}}function $(e){return e}var{hasOwnProperty:vA}=Object.prototype;function yA(e,t){let n={};if(t){for(let r in t)if(t[r]===pA){let t=[];for(let i=e.length-1;i>=0;--i){let a=e[i][r];if(typeof a==`object`&&a)t.unshift(a);else if(a!==void 0){n[r]=a;break}}t.length&&(n[r]=yA(t))}}for(let t=e.length-1;t>=0;--t){let r=e[t];for(let e in r)e in n||(n[e]=r[e])}return n}function bA(e,t){let n={};for(let r in e)t(e[r],r)&&(n[r]=e[r]);return n}function xA(e,t){let n={};for(let r in e)n[r]=t(e[r],r);return n}function SA(e){let t={};for(let n of e)t[n]=!0;return t}function CA(e){let t=[];for(let n in e)t.push(e[n]);return t}function wA(e,t){if(e===t)return!0;for(let n in e)if(vA.call(e,n)&&!(n in t))return!1;for(let n in t)if(vA.call(t,n)&&e[n]!==t[n])return!1;return!0}var TA=/^on[A-Z]/;function EA(e,t){let n=DA(e,t);for(let e of n)if(!TA.test(e))return!1;return!0}function DA(e,t){let n=[];for(let r in e)vA.call(e,r)&&(r in t||n.push(r));for(let r in t)vA.call(t,r)&&e[r]!==t[r]&&n.push(r);return n}function OA(e,t,n={}){if(e===t)return!0;for(let r in t)if(!(r in e&&kA(e[r],t[r],n[r])))return!1;for(let n in e)if(!(n in t))return!1;return!0}function kA(e,t,n){return e===t||n===!0?!0:n?n(e,t):!1}function AA(e,t=0,n,r=1){let i=[];n??=Object.keys(e).length;for(let a=t;a<n;a+=r){let t=e[a];t!==void 0&&i.push(t)}return i}var jA={};function MA(e,t){jA[e]=t}function NA(e){return new jA[e]}MA(`gregory`,class{getMarkerYear(e){return e.getUTCFullYear()}getMarkerMonth(e){return e.getUTCMonth()}getMarkerDay(e){return e.getUTCDate()}arrayToMarker(e){return jk(e)}markerToArray(e){return Ak(e)}});var PA=/^\s*(\d{4})(-?(\d{2})(-?(\d{2})([T ](\d{2}):?(\d{2})(:?(\d{2})(\.(\d+))?)?(Z|(([-+])(\d{2})(:?(\d{2}))?))?)?)?)?$/;function FA(e){let t=PA.exec(e);if(t){let e=new Date(Date.UTC(Number(t[1]),t[3]?Number(t[3])-1:0,Number(t[5]||1),Number(t[7]||0),Number(t[8]||0),Number(t[10]||0),t[12]?Number(`0.${t[12]}`)*1e3:0));if(Mk(e)){let n=null;return t[13]&&(n=(t[15]===`-`?-1:1)*(Number(t[16]||0)*60+Number(t[18]||0))),{marker:e,isTimeUnspecified:!t[6],timeZoneOffset:n}}}return null}var IA=class{constructor(e){let t=this.timeZone=e.timeZone,n=t!==`local`&&t!==`UTC`;e.namedTimeZoneImpl&&n&&(this.namedTimeZoneImpl=new e.namedTimeZoneImpl(t)),this.canComputeOffset=!(n&&!this.namedTimeZoneImpl),this.calendarSystem=NA(e.calendarSystem),this.locale=e.locale,this.weekDow=e.locale.week.dow,this.weekDoy=e.locale.week.doy,e.weekNumberCalculation===`ISO`&&(this.weekDow=1,this.weekDoy=4),typeof e.firstDay==`number`&&(this.weekDow=e.firstDay),typeof e.weekNumberCalculation==`function`&&(this.weekNumberFunc=e.weekNumberCalculation),this.weekText=e.weekText==null?e.locale.options.weekText:e.weekText,this.weekTextLong=(e.weekTextLong==null?e.locale.options.weekTextLong:e.weekTextLong)||this.weekText,this.cmdFormatter=e.cmdFormatter,this.defaultSeparator=e.defaultSeparator}createMarker(e){let t=this.createMarkerMeta(e);return t===null?null:t.marker}createNowMarker(){return this.canComputeOffset?this.timestampToMarker(new Date().valueOf()):jk(Ok(new Date))}createMarkerMeta(e){if(typeof e==`string`)return this.parse(e);let t=null;return typeof e==`number`?t=this.timestampToMarker(e):e instanceof Date?(e=e.valueOf(),isNaN(e)||(t=this.timestampToMarker(e))):Array.isArray(e)&&(t=jk(e)),t===null||!Mk(t)?null:{marker:t,isTimeUnspecified:!1,forcedTzo:null}}parse(e){let t=FA(e);if(t===null)return null;let{marker:n}=t,r=null;return t.timeZoneOffset!==null&&(this.canComputeOffset?n=this.timestampToMarker(n.valueOf()-t.timeZoneOffset*60*1e3):r=t.timeZoneOffset),{marker:n,isTimeUnspecified:t.isTimeUnspecified,forcedTzo:r}}getYear(e){return this.calendarSystem.getMarkerYear(e)}getMonth(e){return this.calendarSystem.getMarkerMonth(e)}getDay(e){return this.calendarSystem.getMarkerDay(e)}add(e,t){let n=this.calendarSystem.markerToArray(e);return n[0]+=t.years,n[1]+=t.months,n[2]+=t.days,n[6]+=t.milliseconds,this.calendarSystem.arrayToMarker(n)}subtract(e,t){let n=this.calendarSystem.markerToArray(e);return n[0]-=t.years,n[1]-=t.months,n[2]-=t.days,n[6]-=t.milliseconds,this.calendarSystem.arrayToMarker(n)}addYears(e,t){let n=this.calendarSystem.markerToArray(e);return n[0]+=t,this.calendarSystem.arrayToMarker(n)}addMonths(e,t){let n=this.calendarSystem.markerToArray(e);return n[1]+=t,this.calendarSystem.arrayToMarker(n)}diffWholeYears(e,t){let{calendarSystem:n}=this;return Nk(e)===Nk(t)&&n.getMarkerDay(e)===n.getMarkerDay(t)&&n.getMarkerMonth(e)===n.getMarkerMonth(t)?n.getMarkerYear(t)-n.getMarkerYear(e):null}diffWholeMonths(e,t){let{calendarSystem:n}=this;return Nk(e)===Nk(t)&&n.getMarkerDay(e)===n.getMarkerDay(t)?n.getMarkerMonth(t)-n.getMarkerMonth(e)+(n.getMarkerYear(t)-n.getMarkerYear(e))*12:null}greatestWholeUnit(e,t){let n=this.diffWholeYears(e,t);return n===null?(n=this.diffWholeMonths(e,t),n===null?(n=yk(e,t),n===null?(n=bk(e,t),n===null?(n=hk(e,t),YO(n)?{unit:`hour`,value:n}:(n=gk(e,t),YO(n)?{unit:`minute`,value:n}:(n=_k(e,t),YO(n)?{unit:`second`,value:n}:{unit:`millisecond`,value:t.valueOf()-e.valueOf()}))):{unit:`day`,value:n}):{unit:`week`,value:n}):{unit:`month`,value:n}):{unit:`year`,value:n}}countDurationsBetween(e,t,n){let r;return n.years&&(r=this.diffWholeYears(e,t),r!==null)?r/rk(n):n.months&&(r=this.diffWholeMonths(e,t),r!==null)?r/ik(n):n.days&&(r=bk(e,t),r!==null)?r/ak(n):(t.valueOf()-e.valueOf())/ok(n)}startOf(e,t){return t===`year`?this.startOfYear(e):t===`month`?this.startOfMonth(e):t===`week`?this.startOfWeek(e):t===`day`?xk(e):t===`hour`?Sk(e):t===`minute`?Ck(e):t===`second`?wk(e):null}startOfYear(e){return this.calendarSystem.arrayToMarker([this.calendarSystem.getMarkerYear(e)])}startOfMonth(e){return this.calendarSystem.arrayToMarker([this.calendarSystem.getMarkerYear(e),this.calendarSystem.getMarkerMonth(e)])}startOfWeek(e){return this.calendarSystem.arrayToMarker([this.calendarSystem.getMarkerYear(e),this.calendarSystem.getMarkerMonth(e),e.getUTCDate()-(e.getUTCDay()-this.weekDow+7)%7])}computeWeekNumber(e){return this.weekNumberFunc?this.weekNumberFunc(this.toDate(e)):Tk(e,this.weekDow,this.weekDoy)}format(e,t,n={}){return t.format({marker:e,timeZoneOffset:n.forcedTzo==null?this.offsetForMarker(e):n.forcedTzo},this)}formatRange(e,t,n,r={}){return r.isEndExclusive&&(t=fk(t,-1)),n.formatRange({marker:e,timeZoneOffset:r.forcedStartTzo==null?this.offsetForMarker(e):r.forcedStartTzo},{marker:t,timeZoneOffset:r.forcedEndTzo==null?this.offsetForMarker(t):r.forcedEndTzo},this,r.defaultSeparator)}formatIso(e,t={}){let n=null;return t.omitTimeZoneOffset||(n=t.forcedTzo==null?this.offsetForMarker(e):t.forcedTzo),Pk(e,n,t.omitTime)}timestampToMarker(e){return this.timeZone===`local`?jk(Ok(new Date(e))):this.timeZone===`UTC`||!this.namedTimeZoneImpl?new Date(e):jk(this.namedTimeZoneImpl.timestampToArray(e))}offsetForMarker(e){return this.timeZone===`local`?-kk(Ak(e)).getTimezoneOffset():this.timeZone===`UTC`?0:this.namedTimeZoneImpl?this.namedTimeZoneImpl.offsetForArray(Ak(e)):null}toDate(e,t){return this.timeZone===`local`?kk(Ak(e)):this.timeZone===`UTC`?new Date(e.valueOf()):this.namedTimeZoneImpl?new Date(e.valueOf()-this.namedTimeZoneImpl.offsetForArray(Ak(e))*1e3*60):new Date(e.valueOf()-(t||0))}},LA=class{constructor(e){this.iconOverrideOption&&this.setIconOverride(e[this.iconOverrideOption])}setIconOverride(e){let t,n;if(typeof e==`object`&&e){for(n in t=Object.assign({},this.iconClasses),e)t[n]=this.applyIconOverridePrefix(e[n]);this.iconClasses=t}else e===!1&&(this.iconClasses={})}applyIconOverridePrefix(e){let t=this.iconOverridePrefix;return t&&e.indexOf(t)!==0&&(e=t+e),e}getClass(e){return this.classes[e]||``}getIconClass(e,t){let n;return n=t&&this.rtlIconClasses&&this.rtlIconClasses[e]||this.iconClasses[e],n?`${this.baseIconClass} ${n}`:``}getCustomButtonIconClass(e){let t;return this.iconOverrideCustomButtonOption&&(t=e[this.iconOverrideCustomButtonOption],t)?`${this.baseIconClass} ${this.applyIconOverridePrefix(t)}`:``}};LA.prototype.classes={},LA.prototype.iconClasses={},LA.prototype.baseIconClass=``,LA.prototype.iconOverridePrefix=``;function RA(e){e();let t=Z.debounceRendering,n=[];function r(e){n.push(e)}for(Z.debounceRendering=r,ED(Q(zA,{}),document.createElement(`div`));n.length;)n.shift()();Z.debounceRendering=t}var zA=class extends lD{render(){return Q(`div`,{})}componentDidMount(){this.setState({})}};function BA(e){let t=DD(e),n=t.Provider;return t.Provider=function(){let e=!this.getChildContext,t=n.apply(this,arguments);if(e){let e=[];this.shouldComponentUpdate=t=>{this.props.value!==t.value&&e.forEach(e=>{e.context=t.value,e.forceUpdate()})},this.sub=t=>{e.push(t);let n=t.componentWillUnmount;t.componentWillUnmount=()=>{e.splice(e.indexOf(t),1),n&&n.call(t)}}}return t},t}var VA=class{constructor(e,t,n,r){this.execFunc=e,this.emitter=t,this.scrollTime=n,this.scrollTimeReset=r,this.handleScrollRequest=e=>{this.queuedRequest=Object.assign({},this.queuedRequest||{},e),this.drain()},t.on(`_scrollRequest`,this.handleScrollRequest),this.fireInitialScroll()}detach(){this.emitter.off(`_scrollRequest`,this.handleScrollRequest)}update(e){e&&this.scrollTimeReset?this.fireInitialScroll():this.drain()}fireInitialScroll(){this.handleScrollRequest({time:this.scrollTime})}drain(){this.queuedRequest&&this.execFunc(this.queuedRequest)&&(this.queuedRequest=null)}},HA=BA({});function UA(e,t,n,r,i,a,o,s,c,l,u,d,f,p){return{dateEnv:i,nowManager:a,options:n,pluginHooks:s,emitter:u,dispatch:c,getCurrentData:l,calendarApi:d,viewSpec:e,viewApi:t,dateProfileGenerator:r,theme:o,isRtl:n.direction===`rtl`,addResizeHandler(e){u.on(`_resize`,e)},removeResizeHandler(e){u.off(`_resize`,e)},createScrollResponder(e){return new VA(e,u,QO(n.scrollTime),n.scrollTimeReset)},registerInteractiveComponent:f,unregisterInteractiveComponent:p}}var WA=class extends lD{shouldComponentUpdate(e,t){return!OA(this.props,e,this.propEquality)||!OA(this.state,t,this.stateEquality)}safeSetState(e){OA(this.state,Object.assign(Object.assign({},this.state),e),this.stateEquality)||this.setState(e)}};WA.addPropsEquality=KA,WA.addStateEquality=qA,WA.contextType=HA,WA.prototype.propEquality={},WA.prototype.stateEquality={};var GA=class extends WA{};GA.contextType=HA;function KA(e){let t=Object.create(this.prototype.propEquality);Object.assign(t,e),this.prototype.propEquality=t}function qA(e){let t=Object.create(this.prototype.stateEquality);Object.assign(t,e),this.prototype.stateEquality=t}function JA(e,t){typeof e==`function`?e(t):e&&(e.current=t)}var YA=class extends GA{constructor(){super(...arguments),this.id=HO(),this.queuedDomNodes=[],this.currentDomNodes=[],this.handleEl=e=>{let{options:t}=this.context,{generatorName:n}=this.props;t.customRenderingReplaces&&XA(n,t)||this.updateElRef(e)},this.updateElRef=e=>{this.props.elRef&&JA(this.props.elRef,e)}}render(){let{props:e,context:t}=this,{options:n}=t,{customGenerator:r,defaultGenerator:i,renderProps:a}=e,o=ZA(e,[],this.handleEl),s=!1,c,l=[],u;if(r!=null){let e=typeof r==`function`?r(a,Q):r;if(e===!0)s=!0;else{let t=e&&typeof e==`object`;t&&`html`in e?o.dangerouslySetInnerHTML={__html:e.html}:t&&`domNodes`in e?l=Array.prototype.slice.call(e.domNodes):(t?WE(e):typeof e!=`function`)?c=e:u=e}}else s=!XA(e.generatorName,n);return s&&i&&(c=i(a)),this.queuedDomNodes=l,this.currentGeneratorMeta=u,Q(e.elTag,o,c)}componentDidMount(){this.applyQueueudDomNodes(),this.triggerCustomRendering(!0)}componentDidUpdate(){this.applyQueueudDomNodes(),this.triggerCustomRendering(!0)}componentWillUnmount(){this.triggerCustomRendering(!1)}triggerCustomRendering(e){let{props:t,context:n}=this,{handleCustomRendering:r,customRenderingMetaMap:i}=n.options;if(r){let n=this.currentGeneratorMeta??i?.[t.generatorName];n&&r(Object.assign(Object.assign({id:this.id,isActive:e,containerEl:this.base,reportNewContainerEl:this.updateElRef,generatorMeta:n},t),{elClasses:(t.elClasses||[]).filter(QA)}))}}applyQueueudDomNodes(){let{queuedDomNodes:e,currentDomNodes:t}=this,n=this.base;if(!ck(e,t)){t.forEach(EO);for(let t of e)n.appendChild(t);this.currentDomNodes=e}}};YA.addPropsEquality({elClasses:ck,elStyle:wA,elAttrs:EA,renderProps:wA});function XA(e,t){return!!(t.handleCustomRendering&&e&&t.customRenderingMetaMap?.[e])}function ZA(e,t,n){let r=Object.assign(Object.assign({},e.elAttrs),{ref:n});return(e.elClasses||t)&&(r.className=(e.elClasses||[]).concat(t||[]).concat(r.className||[]).filter(Boolean).join(` `)),e.elStyle&&(r.style=e.elStyle),r}function QA(e){return!!e}var $A=BA(0),ej=class extends lD{constructor(){super(...arguments),this.InnerContent=tj.bind(void 0,this),this.handleEl=e=>{this.el=e,this.props.elRef&&(JA(this.props.elRef,e),e&&this.didMountMisfire&&this.componentDidMount())}}render(){let{props:e}=this,t=nj(e.classNameGenerator,e.renderProps);if(e.children){let n=ZA(e,t,this.handleEl),r=e.children(this.InnerContent,e.renderProps,n);return e.elTag?Q(e.elTag,n,r):r}return Q(YA,Object.assign(Object.assign({},e),{elRef:this.handleEl,elTag:e.elTag||`div`,elClasses:(e.elClasses||[]).concat(t),renderId:this.context}))}componentDidMount(){var e,t;this.el?(t=(e=this.props).didMount)==null||t.call(e,Object.assign(Object.assign({},this.props.renderProps),{el:this.el})):this.didMountMisfire=!0}componentWillUnmount(){var e,t;(t=(e=this.props).willUnmount)==null||t.call(e,Object.assign(Object.assign({},this.props.renderProps),{el:this.el}))}};ej.contextType=$A;function tj(e,t){let n=e.props;return Q(YA,Object.assign({renderProps:n.renderProps,generatorName:n.generatorName,customGenerator:n.customGenerator,defaultGenerator:n.defaultGenerator,renderId:e.context},t))}function nj(e,t){let n=typeof e==`function`?e(t):e||[];return typeof n==`string`?[n]:n}var rj=class extends GA{render(){let{props:e,context:t}=this,{options:n}=t,r={view:t.viewApi};return Q(ej,{elRef:e.elRef,elTag:e.elTag||`div`,elAttrs:e.elAttrs,elClasses:[...ij(e.viewSpec),...e.elClasses||[]],elStyle:e.elStyle,renderProps:r,classNameGenerator:n.viewClassNames,generatorName:void 0,didMount:n.viewDidMount,willUnmount:n.viewWillUnmount},()=>e.children)}};function ij(e){return[`fc-${e.type}-view`,`fc-view`]}function aj(e,t){let n=null,r=null;return e.start&&(n=t.createMarker(e.start)),e.end&&(r=t.createMarker(e.end)),!n&&!r||n&&r&&r<n?null:{start:n,end:r}}function oj(e,t){let n=[],{start:r}=t,i,a;for(e.sort(sj),i=0;i<e.length;i+=1)a=e[i],a.start>r&&n.push({start:r,end:a.start}),a.end>r&&(r=a.end);return r<t.end&&n.push({start:r,end:t.end}),n}function sj(e,t){return e.start.valueOf()-t.start.valueOf()}function cj(e,t){let{start:n,end:r}=e,i=null;return t.start!==null&&(n=n===null?t.start:new Date(Math.max(n.valueOf(),t.start.valueOf()))),t.end!=null&&(r=r===null?t.end:new Date(Math.min(r.valueOf(),t.end.valueOf()))),(n===null||r===null||n<r)&&(i={start:n,end:r}),i}function lj(e,t){return(e.end===null||t.start===null||e.end>t.start)&&(e.start===null||t.end===null||e.start<t.end)}function uj(e,t){return(e.start===null||t>=e.start)&&(e.end===null||t<e.end)}function dj(e,t){return t.start!=null&&e<t.start?t.start:t.end!=null&&e>=t.end?new Date(t.end.valueOf()-1):e}function fj(e){let t=Math.floor(mk(e.start,e.end))||1,n=xk(e.start);return{start:n,end:dk(n,t)}}function pj(e,t=QO(0)){let n=null,r=null;if(e.end){r=xk(e.end);let n=e.end.valueOf()-r.valueOf();n&&n>=ok(t)&&(r=dk(r,1))}return e.start&&(n=xk(e.start),r&&r<=n&&(r=dk(n,1))),{start:n,end:r}}function mj(e,t,n,r){return r===`year`?QO(n.diffWholeYears(e,t),`year`):r===`month`?QO(n.diffWholeMonths(e,t),`month`):vk(e,t)}var hj=class{constructor(e){this.props=e,this.initHiddenDays()}buildPrev(e,t,n){let{dateEnv:r}=this.props,i=r.subtract(r.startOf(t,e.currentRangeUnit),e.dateIncrement);return this.build(i,-1,n)}buildNext(e,t,n){let{dateEnv:r}=this.props,i=r.add(r.startOf(t,e.currentRangeUnit),e.dateIncrement);return this.build(i,1,n)}build(e,t,n=!0){let{props:r}=this,i,a,o,s,c,l;return i=this.buildValidRange(),i=this.trimHiddenDays(i),n&&(e=dj(e,i)),a=this.buildCurrentRangeInfo(e,t),o=/^(year|month|week|day)$/.test(a.unit),s=this.buildRenderRange(this.trimHiddenDays(a.range),a.unit,o),s=this.trimHiddenDays(s),c=s,r.showNonCurrentDates||(c=cj(c,a.range)),c=this.adjustActiveRange(c),c=cj(c,i),l=lj(a.range,i),uj(s,e)||(e=s.start),{currentDate:e,validRange:i,currentRange:a.range,currentRangeUnit:a.unit,isRangeAllDay:o,activeRange:c,renderRange:s,slotMinTime:r.slotMinTime,slotMaxTime:r.slotMaxTime,isValid:l,dateIncrement:this.buildDateIncrement(a.duration)}}buildValidRange(){let e=this.props.validRangeInput,t=typeof e==`function`?e.call(this.props.calendarApi,this.props.dateEnv.toDate(this.props.nowManager.getDateMarker())):e;return this.refineRange(t)||{start:null,end:null}}buildCurrentRangeInfo(e,t){let{props:n}=this,r=null,i=null,a=null,o;return n.duration?(r=n.duration,i=n.durationUnit,a=this.buildRangeFromDuration(e,t,r,i)):(o=this.props.dayCount)?(i=`day`,a=this.buildRangeFromDayCount(e,t,o)):(a=this.buildCustomVisibleRange(e))?i=n.dateEnv.greatestWholeUnit(a.start,a.end).unit:(r=this.getFallbackDuration(),i=sk(r).unit,a=this.buildRangeFromDuration(e,t,r,i)),{duration:r,unit:i,range:a}}getFallbackDuration(){return QO({day:1})}adjustActiveRange(e){let{dateEnv:t,usesMinMaxTime:n,slotMinTime:r,slotMaxTime:i}=this.props,{start:a,end:o}=e;return n&&(ak(r)<0&&(a=xk(a),a=t.add(a,r)),ak(i)>1&&(o=xk(o),o=dk(o,-1),o=t.add(o,i))),{start:a,end:o}}buildRangeFromDuration(e,t,n,r){let{dateEnv:i,dateAlignment:a}=this.props,o,s,c;if(!a){let{dateIncrement:e}=this.props;a=e&&ok(e)<ok(n)?sk(e).unit:r}ak(n)<=1&&this.isHiddenDay(o)&&(o=this.skipHiddenDays(o,t),o=xk(o));function l(){o=i.startOf(e,a),s=i.add(o,n),c={start:o,end:s}}return l(),this.trimHiddenDays(c)||(e=this.skipHiddenDays(e,t),l()),c}buildRangeFromDayCount(e,t,n){let{dateEnv:r,dateAlignment:i}=this.props,a=0,o=e,s;i&&(o=r.startOf(o,i)),o=xk(o),o=this.skipHiddenDays(o,t),s=o;do s=dk(s,1),this.isHiddenDay(s)||(a+=1);while(a<n);return{start:o,end:s}}buildCustomVisibleRange(e){let{props:t}=this,n=t.visibleRangeInput,r=typeof n==`function`?n.call(t.calendarApi,t.dateEnv.toDate(e)):n,i=this.refineRange(r);return i&&(i.start==null||i.end==null)?null:i}buildRenderRange(e,t,n){return e}buildDateIncrement(e){let{dateIncrement:t}=this.props,n;return t||((n=this.props.dateAlignment)?QO(1,n):e||QO({days:1}))}refineRange(e){if(e){let t=aj(e,this.props.dateEnv);return t&&=pj(t),t}return null}initHiddenDays(){let e=this.props.hiddenDays||[],t=[],n=0,r;for(this.props.weekends===!1&&e.push(0,6),r=0;r<7;r+=1)(t[r]=e.indexOf(r)!==-1)||(n+=1);if(!n)throw Error(`invalid hiddenDays`);this.isHiddenDayHash=t}trimHiddenDays(e){let{start:t,end:n}=e;return t&&=this.skipHiddenDays(t),n&&=this.skipHiddenDays(n,-1,!0),t==null||n==null||t<n?{start:t,end:n}:null}isHiddenDay(e){return e instanceof Date&&(e=e.getUTCDay()),this.isHiddenDayHash[e]}skipHiddenDays(e,t=1,n=!1){for(;this.isHiddenDayHash[(e.getUTCDay()+(n?t:0)+7)%7];)e=dk(e,t);return e}};function gj(e,t,n,r){return{instanceId:HO(),defId:e,range:t,forcedStartTzo:n??null,forcedEndTzo:r??null}}function _j(e,t,n,r){for(let i=0;i<r.length;i+=1){let a=r[i].parse(e,n);if(a){let{allDay:n}=e;return n??(n=t,n??(n=a.allDayGuess,n??=!1)),{allDay:n,duration:a.duration,typeData:a.typeData,typeId:i}}}return null}function vj(e,t,n){let{dateEnv:r,pluginHooks:i,options:a}=n,{defs:o,instances:s}=e;s=bA(s,e=>!o[e.defId].recurringDef);for(let e in o){let n=o[e];if(n.recurringDef){let{duration:o}=n.recurringDef;o||=n.allDay?a.defaultAllDayEventDuration:a.defaultTimedEventDuration;let c=yj(n,o,t,r,i.recurringTypes);for(let t of c){let n=gj(e,{start:t,end:r.add(t,o)});s[n.instanceId]=n}}}return{defs:o,instances:s}}function yj(e,t,n,r,i){let a=i[e.recurringDef.typeId].expand(e.recurringDef.typeData,{start:r.subtract(n.start,t),end:n.end},r);return e.allDay&&(a=a.map(xk)),a}var bj={id:String,groupId:String,title:String,url:String,interactive:Boolean},xj={start:$,end:$,date:$,allDay:Boolean},Sj=Object.assign(Object.assign(Object.assign({},bj),xj),{extendedProps:$});function Cj(e,t,n,r,i=Tj(n),a,o){let{refined:s,extra:c}=wj(e,n,i),l=Oj(t,n),u=_j(s,l,n.dateEnv,n.pluginHooks.recurringTypes);if(u){let e=Ej(s,c,t?t.sourceId:``,u.allDay,!!u.duration,n,a);return e.recurringDef={typeId:u.typeId,typeData:u.typeData,duration:u.duration},{def:e,instance:null}}let d=Dj(s,l,n,r);if(d){let e=Ej(s,c,t?t.sourceId:``,d.allDay,d.hasEnd,n,a),r=gj(e.defId,d.range,d.forcedStartTzo,d.forcedEndTzo);return o&&e.publicId&&o[e.publicId]&&(r.instanceId=o[e.publicId]),{def:e,instance:r}}return null}function wj(e,t,n=Tj(t)){return _A(e,n)}function Tj(e){return Object.assign(Object.assign(Object.assign({},zj),Sj),e.pluginHooks.eventRefiners)}function Ej(e,t,n,r,i,a,o){let s={title:e.title||``,groupId:e.groupId||``,publicId:e.id||``,url:e.url||``,recurringDef:null,defId:(o&&e.id?o[e.id]:``)||HO(),sourceId:n,allDay:r,hasEnd:i,interactive:e.interactive,ui:Vj(e,a),extendedProps:Object.assign(Object.assign({},e.extendedProps||{}),t)};for(let t of a.pluginHooks.eventDefMemberAdders)Object.assign(s,t(e));return Object.freeze(s.ui.classNames),Object.freeze(s.extendedProps),s}function Dj(e,t,n,r){let{allDay:i}=e,a,o=null,s=!1,c,l=null,u=e.start==null?e.date:e.start;if(a=n.dateEnv.createMarkerMeta(u),a)o=a.marker;else if(!r)return null;return e.end!=null&&(c=n.dateEnv.createMarkerMeta(e.end)),i??=t??((!a||a.isTimeUnspecified)&&(!c||c.isTimeUnspecified)),i&&o&&(o=xk(o)),c&&(l=c.marker,i&&(l=xk(l)),o&&l<=o&&(l=null)),l?s=!0:r||(s=n.options.forceEventDuration||!1,l=n.dateEnv.add(o,i?n.options.defaultAllDayEventDuration:n.options.defaultTimedEventDuration)),{allDay:i,hasEnd:s,range:{start:o,end:l},forcedStartTzo:a?a.forcedTzo:null,forcedEndTzo:c?c.forcedTzo:null}}function Oj(e,t){let n=null;return e&&(n=e.defaultAllDay),n??=t.options.defaultAllDay,n}function kj(e,t,n,r,i,a){let o=Nj(),s=Tj(n);for(let c of e){let e=Cj(c,t,n,r,s,i,a);e&&Aj(e,o)}return o}function Aj(e,t=Nj()){return t.defs[e.def.defId]=e.def,e.instance&&(t.instances[e.instance.instanceId]=e.instance),t}function jj(e,t){let n=e.instances[t];if(n){let t=e.defs[n.defId],r=Fj(e,e=>Mj(t,e));return r.defs[t.defId]=t,r.instances[n.instanceId]=n,r}return Nj()}function Mj(e,t){return!!(e.groupId&&e.groupId===t.groupId)}function Nj(){return{defs:{},instances:{}}}function Pj(e,t){return{defs:Object.assign(Object.assign({},e.defs),t.defs),instances:Object.assign(Object.assign({},e.instances),t.instances)}}function Fj(e,t){let n=bA(e.defs,t);return{defs:n,instances:bA(e.instances,e=>n[e.defId])}}function Ij(e,t){let{defs:n,instances:r}=e,i={},a={};for(let e in n)t.defs[e]||(i[e]=n[e]);for(let e in r)!t.instances[e]&&i[r[e].defId]&&(a[e]=r[e]);return{defs:i,instances:a}}function Lj(e,t){return Array.isArray(e)?kj(e,null,t,!0):typeof e==`object`&&e?kj([e],null,t,!0):e==null?null:String(e)}function Rj(e){return Array.isArray(e)?e:typeof e==`string`?e.split(/\s+/):[]}var zj={display:String,editable:Boolean,startEditable:Boolean,durationEditable:Boolean,constraint:$,overlap:$,allow:$,className:Rj,classNames:Rj,color:String,backgroundColor:String,borderColor:String,textColor:String},Bj={display:null,startEditable:null,durationEditable:null,constraints:[],overlap:null,allows:[],backgroundColor:``,borderColor:``,textColor:``,classNames:[]};function Vj(e,t){let n=Lj(e.constraint,t);return{display:e.display||null,startEditable:e.startEditable==null?e.editable:e.startEditable,durationEditable:e.durationEditable==null?e.editable:e.durationEditable,constraints:n==null?[]:[n],overlap:e.overlap==null?null:e.overlap,allows:e.allow==null?[]:[e.allow],backgroundColor:e.backgroundColor||e.color||``,borderColor:e.borderColor||e.color||``,textColor:e.textColor||``,classNames:(e.className||[]).concat(e.classNames||[])}}function Hj(e){return e.reduce(Uj,Bj)}function Uj(e,t){return{display:t.display==null?e.display:t.display,startEditable:t.startEditable==null?e.startEditable:t.startEditable,durationEditable:t.durationEditable==null?e.durationEditable:t.durationEditable,constraints:e.constraints.concat(t.constraints),overlap:typeof t.overlap==`boolean`?t.overlap:e.overlap,allows:e.allows.concat(t.allows),backgroundColor:t.backgroundColor||e.backgroundColor,borderColor:t.borderColor||e.borderColor,textColor:t.textColor||e.textColor,classNames:e.classNames.concat(t.classNames)}}var Wj={id:String,defaultAllDay:Boolean,url:String,format:String,events:$,eventDataTransform:$,success:$,failure:$};function Gj(e,t,n=Kj(t)){let r;if(typeof e==`string`?r={url:e}:typeof e==`function`||Array.isArray(e)?r={events:e}:typeof e==`object`&&e&&(r=e),r){let{refined:i,extra:a}=_A(r,n),o=qj(i,t);if(o)return{_raw:e,isFetching:!1,latestFetchId:``,fetchRange:null,defaultAllDay:i.defaultAllDay,eventDataTransform:i.eventDataTransform,success:i.success,failure:i.failure,publicId:i.id||``,sourceId:HO(),sourceDefId:o.sourceDefId,meta:o.meta,ui:Vj(i,t),extendedProps:a}}return null}function Kj(e){return Object.assign(Object.assign(Object.assign({},zj),Wj),e.pluginHooks.eventSourceRefiners)}function qj(e,t){let n=t.pluginHooks.eventSourceDefs;for(let t=n.length-1;t>=0;--t){let r=n[t].parseMeta(e);if(r)return{sourceDefId:t,meta:r}}return null}function Jj(e,t,n,r,i){switch(t.type){case`RECEIVE_EVENTS`:return Yj(e,n[t.sourceId],t.fetchId,t.fetchRange,t.rawEvents,i);case`RESET_RAW_EVENTS`:return Xj(e,n[t.sourceId],t.rawEvents,r.activeRange,i);case`ADD_EVENTS`:return $j(e,t.eventStore,r?r.activeRange:null,i);case`RESET_EVENTS`:return t.eventStore;case`MERGE_EVENTS`:return Pj(e,t.eventStore);case`PREV`:case`NEXT`:case`CHANGE_DATE`:case`CHANGE_VIEW_TYPE`:return r?vj(e,r.activeRange,i):e;case`REMOVE_EVENTS`:return Ij(e,t.eventStore);case`REMOVE_EVENT_SOURCE`:return tM(e,t.sourceId);case`REMOVE_ALL_EVENT_SOURCES`:return Fj(e,e=>!e.sourceId);case`REMOVE_ALL_EVENTS`:return Nj();default:return e}}function Yj(e,t,n,r,i,a){if(t&&n===t.latestFetchId){let n=kj(Zj(i,t,a),t,a);return r&&(n=vj(n,r,a)),Pj(tM(e,t.sourceId),n)}return e}function Xj(e,t,n,r,i){let{defIdMap:a,instanceIdMap:o}=nM(e);return vj(kj(Zj(n,t,i),t,i,!1,a,o),r,i)}function Zj(e,t,n){let r=n.options.eventDataTransform,i=t?t.eventDataTransform:null;return i&&(e=Qj(e,i)),r&&(e=Qj(e,r)),e}function Qj(e,t){let n;if(!t)n=e;else{n=[];for(let r of e){let e=t(r);e?n.push(e):e??n.push(r)}}return n}function $j(e,t,n,r){return n&&(t=vj(t,n,r)),Pj(e,t)}function eM(e,t,n){let{defs:r}=e;return{defs:r,instances:xA(e.instances,e=>r[e.defId].allDay?e:Object.assign(Object.assign({},e),{range:{start:n.createMarker(t.toDate(e.range.start,e.forcedStartTzo)),end:n.createMarker(t.toDate(e.range.end,e.forcedEndTzo))},forcedStartTzo:n.canComputeOffset?null:e.forcedStartTzo,forcedEndTzo:n.canComputeOffset?null:e.forcedEndTzo}))}}function tM(e,t){return Fj(e,e=>e.sourceId!==t)}function nM(e){let{defs:t,instances:n}=e,r={},i={};for(let e in t){let{publicId:n}=t[e];n&&(r[n]=e)}for(let e in n){let{publicId:r}=t[n[e].defId];r&&(i[r]=e)}return{defIdMap:r,instanceIdMap:i}}var rM=class{constructor(){this.handlers={},this.thisContext=null}setThisContext(e){this.thisContext=e}setOptions(e){this.options=e}on(e,t){iM(this.handlers,e,t)}off(e,t){aM(this.handlers,e,t)}trigger(e,...t){let n=this.handlers[e]||[],r=this.options&&this.options[e],i=[].concat(r||[],n);for(let e of i)e.apply(this.thisContext,t)}hasHandlers(e){return!!(this.handlers[e]&&this.handlers[e].length||this.options&&this.options[e])}};function iM(e,t,n){(e[t]||(e[t]=[])).push(n)}function aM(e,t,n){n?e[t]&&(e[t]=e[t].filter(e=>e!==n)):delete e[t]}var oM={startTime:`09:00`,endTime:`17:00`,daysOfWeek:[1,2,3,4,5],display:`inverse-background`,classNames:`fc-non-business`,groupId:`_businessHours`};function sM(e,t){return kj(cM(e),null,t)}function cM(e){let t;return t=e===!0?[{}]:Array.isArray(e)?e.filter(e=>e.daysOfWeek):typeof e==`object`&&e?[e]:[],t=t.map(e=>Object.assign(Object.assign({},oM),e)),t}function lM(e,t,n){n.emitter.trigger(`select`,Object.assign(Object.assign({},dM(e,n)),{jsEvent:t?t.origEvent:null,view:n.viewApi||n.calendarApi.view}))}function uM(e,t){t.emitter.trigger(`unselect`,{jsEvent:e?e.origEvent:null,view:t.viewApi||t.calendarApi.view})}function dM(e,t){let n={};for(let r of t.pluginHooks.dateSpanTransforms)Object.assign(n,r(e,t));return Object.assign(n,RM(e,t.dateEnv)),n}function fM(e,t,n){let{dateEnv:r,options:i}=n,a=t;return e?(a=xk(a),a=r.add(a,i.defaultAllDayEventDuration)):a=r.add(a,i.defaultTimedEventDuration),a}function pM(e,t,n,r){let i=CM(e.defs,t),a=Nj();for(let t in e.defs){let o=e.defs[t];a.defs[t]=mM(o,i[t],n,r)}for(let t in e.instances){let o=e.instances[t],s=a.defs[o.defId];a.instances[t]=hM(o,s,i[o.defId],n,r)}return a}function mM(e,t,n,r){let i=n.standardProps||{};i.hasEnd==null&&t.durationEditable&&(n.startDelta||n.endDelta)&&(i.hasEnd=!0);let a=Object.assign(Object.assign(Object.assign({},e),i),{ui:Object.assign(Object.assign({},e.ui),i.ui)});n.extendedProps&&(a.extendedProps=Object.assign(Object.assign({},a.extendedProps),n.extendedProps));for(let e of r.pluginHooks.eventDefMutationAppliers)e(a,n,r);return!a.hasEnd&&r.options.forceEventDuration&&(a.hasEnd=!0),a}function hM(e,t,n,r,i){let{dateEnv:a}=i,o=r.standardProps&&r.standardProps.allDay===!0,s=r.standardProps&&r.standardProps.hasEnd===!1,c=Object.assign({},e);return o&&(c.range=fj(c.range)),r.datesDelta&&n.startEditable&&(c.range={start:a.add(c.range.start,r.datesDelta),end:a.add(c.range.end,r.datesDelta)}),r.startDelta&&n.durationEditable&&(c.range={start:a.add(c.range.start,r.startDelta),end:c.range.end}),r.endDelta&&n.durationEditable&&(c.range={start:c.range.start,end:a.add(c.range.end,r.endDelta)}),s&&(c.range={start:c.range.start,end:fM(t.allDay,c.range.start,i)}),t.allDay&&(c.range={start:xk(c.range.start),end:xk(c.range.end)}),c.range.end<c.range.start&&(c.range.end=fM(t.allDay,c.range.start,i)),c}var gM=class{constructor(e,t){this.context=e,this.internalEventSource=t}remove(){this.context.dispatch({type:`REMOVE_EVENT_SOURCE`,sourceId:this.internalEventSource.sourceId})}refetch(){this.context.dispatch({type:`FETCH_EVENT_SOURCES`,sourceIds:[this.internalEventSource.sourceId],isRefetch:!0})}get id(){return this.internalEventSource.publicId}get url(){return this.internalEventSource.meta.url}get format(){return this.internalEventSource.meta.format}},_M=class e{constructor(e,t,n){this._context=e,this._def=t,this._instance=n||null}setProp(e,t){if(e in xj)console.warn(`Could not set date-related prop 'name'. Use one of the date-related methods instead.`);else if(e===`id`)t=bj[e](t),this.mutate({standardProps:{publicId:t}});else if(e in bj)t=bj[e](t),this.mutate({standardProps:{[e]:t}});else if(e in zj){let n=zj[e](t);n=e===`color`?{backgroundColor:t,borderColor:t}:e===`editable`?{startEditable:t,durationEditable:t}:{[e]:t},this.mutate({standardProps:{ui:n}})}else console.warn(`Could not set prop '${e}'. Use setExtendedProp instead.`)}setExtendedProp(e,t){this.mutate({extendedProps:{[e]:t}})}setStart(e,t={}){let{dateEnv:n}=this._context,r=n.createMarker(e);if(r&&this._instance){let e=this._instance.range,i=mj(e.start,r,n,t.granularity);t.maintainDuration?this.mutate({datesDelta:i}):this.mutate({startDelta:i})}}setEnd(e,t={}){let{dateEnv:n}=this._context,r;if(!(e!=null&&(r=n.createMarker(e),!r))&&this._instance){if(r){let e=mj(this._instance.range.end,r,n,t.granularity);this.mutate({endDelta:e})}else this.mutate({standardProps:{hasEnd:!1}})}}setDates(e,t,n={}){let{dateEnv:r}=this._context,i={allDay:n.allDay},a=r.createMarker(e),o;if(a&&!(t!=null&&(o=r.createMarker(t),!o))&&this._instance){let e=this._instance.range;n.allDay===!0&&(e=fj(e));let t=mj(e.start,a,r,n.granularity);if(o){let a=mj(e.end,o,r,n.granularity);tk(t,a)?this.mutate({datesDelta:t,standardProps:i}):this.mutate({startDelta:t,endDelta:a,standardProps:i})}else i.hasEnd=!1,this.mutate({datesDelta:t,standardProps:i})}}moveStart(e){let t=QO(e);t&&this.mutate({startDelta:t})}moveEnd(e){let t=QO(e);t&&this.mutate({endDelta:t})}moveDates(e){let t=QO(e);t&&this.mutate({datesDelta:t})}setAllDay(e,t={}){let n={allDay:e},{maintainDuration:r}=t;r??=this._context.options.allDayMaintainDuration,this._def.allDay!==e&&(n.hasEnd=r),this.mutate({standardProps:n})}formatRange(e){let{dateEnv:t}=this._context,n=this._instance,r=sA(e);return this._def.hasEnd?t.formatRange(n.range.start,n.range.end,r,{forcedStartTzo:n.forcedStartTzo,forcedEndTzo:n.forcedEndTzo}):t.format(n.range.start,r,{forcedTzo:n.forcedStartTzo})}mutate(t){let n=this._instance;if(n){let r=this._def,i=this._context,{eventStore:a}=i.getCurrentData(),o=jj(a,n.instanceId);o=pM(o,{"":{display:``,startEditable:!0,durationEditable:!0,constraints:[],overlap:null,allows:[],backgroundColor:``,borderColor:``,textColor:``,classNames:[]}},t,i);let s=new e(i,r,n);this._def=o.defs[r.defId],this._instance=o.instances[n.instanceId],i.dispatch({type:`MERGE_EVENTS`,eventStore:o}),i.emitter.trigger(`eventChange`,{oldEvent:s,event:this,relatedEvents:yM(o,i,n),revert(){i.dispatch({type:`RESET_EVENTS`,eventStore:a})}})}}remove(){let e=this._context,t=vM(this);e.dispatch({type:`REMOVE_EVENTS`,eventStore:t}),e.emitter.trigger(`eventRemove`,{event:this,relatedEvents:[],revert(){e.dispatch({type:`MERGE_EVENTS`,eventStore:t})}})}get source(){let{sourceId:e}=this._def;return e?new gM(this._context,this._context.getCurrentData().eventSources[e]):null}get start(){return this._instance?this._context.dateEnv.toDate(this._instance.range.start):null}get end(){return this._instance&&this._def.hasEnd?this._context.dateEnv.toDate(this._instance.range.end):null}get startStr(){let e=this._instance;return e?this._context.dateEnv.formatIso(e.range.start,{omitTime:this._def.allDay,forcedTzo:e.forcedStartTzo}):``}get endStr(){let e=this._instance;return e&&this._def.hasEnd?this._context.dateEnv.formatIso(e.range.end,{omitTime:this._def.allDay,forcedTzo:e.forcedEndTzo}):``}get id(){return this._def.publicId}get groupId(){return this._def.groupId}get allDay(){return this._def.allDay}get title(){return this._def.title}get url(){return this._def.url}get display(){return this._def.ui.display||`auto`}get startEditable(){return this._def.ui.startEditable}get durationEditable(){return this._def.ui.durationEditable}get constraint(){return this._def.ui.constraints[0]||null}get overlap(){return this._def.ui.overlap}get allow(){return this._def.ui.allows[0]||null}get backgroundColor(){return this._def.ui.backgroundColor}get borderColor(){return this._def.ui.borderColor}get textColor(){return this._def.ui.textColor}get classNames(){return this._def.ui.classNames}get extendedProps(){return this._def.extendedProps}toPlainObject(e={}){let t=this._def,{ui:n}=t,{startStr:r,endStr:i}=this,a={allDay:t.allDay};return t.title&&(a.title=t.title),r&&(a.start=r),i&&(a.end=i),t.publicId&&(a.id=t.publicId),t.groupId&&(a.groupId=t.groupId),t.url&&(a.url=t.url),n.display&&n.display!==`auto`&&(a.display=n.display),e.collapseColor&&n.backgroundColor&&n.backgroundColor===n.borderColor?a.color=n.backgroundColor:(n.backgroundColor&&(a.backgroundColor=n.backgroundColor),n.borderColor&&(a.borderColor=n.borderColor)),n.textColor&&(a.textColor=n.textColor),n.classNames.length&&(a.classNames=n.classNames),Object.keys(t.extendedProps).length&&(e.collapseExtendedProps?Object.assign(a,t.extendedProps):a.extendedProps=t.extendedProps),a}toJSON(){return this.toPlainObject()}};function vM(e){let t=e._def,n=e._instance;return{defs:{[t.defId]:t},instances:n?{[n.instanceId]:n}:{}}}function yM(e,t,n){let{defs:r,instances:i}=e,a=[],o=n?n.instanceId:``;for(let e in i){let n=i[e],s=r[n.defId];n.instanceId!==o&&a.push(new _M(t,s,n))}return a}function bM(e,t,n,r){let i={},a={},o={},s=[],c=[],l=CM(e.defs,t);for(let t in e.defs){let n=e.defs[t];l[n.defId].display===`inverse-background`&&(n.groupId?(i[n.groupId]=[],o[n.groupId]||(o[n.groupId]=n)):a[t]=[])}for(let t in e.instances){let o=e.instances[t],u=e.defs[o.defId],d=l[u.defId],f=o.range,p=!u.allDay&&r?pj(f,r):f,m=cj(p,n);m&&(d.display===`inverse-background`?u.groupId?i[u.groupId].push(m):a[o.defId].push(m):d.display!==`none`&&(d.display===`background`?s:c).push({def:u,ui:d,instance:o,range:m,isStart:p.start&&p.start.valueOf()===m.start.valueOf(),isEnd:p.end&&p.end.valueOf()===m.end.valueOf()}))}for(let e in i){let t=i[e],r=oj(t,n);for(let t of r){let n=o[e],r=l[n.defId];s.push({def:n,ui:r,instance:null,range:t,isStart:!1,isEnd:!1})}}for(let t in a){let r=a[t],i=oj(r,n);for(let n of i)s.push({def:e.defs[t],ui:l[t],instance:null,range:n,isStart:!1,isEnd:!1})}return{bg:s,fg:c}}function xM(e,t){e.fcSeg=t}function SM(e){return e.fcSeg||e.parentNode.fcSeg||null}function CM(e,t){return xA(e,e=>wM(e,t))}function wM(e,t){let n=[];return t[``]&&n.push(t[``]),t[e.defId]&&n.push(t[e.defId]),n.push(e.ui),Hj(n)}function TM(e,t){let n=e.map(EM);return n.sort((e,n)=>WO(e,n,t)),n.map(e=>e._seg)}function EM(e){let{eventRange:t}=e,n=t.def,r=t.instance?t.instance.range:t.range,i=r.start?r.start.valueOf():0,a=r.end?r.end.valueOf():0;return Object.assign(Object.assign(Object.assign({},n.extendedProps),n),{id:n.publicId,start:i,end:a,duration:a-i,allDay:Number(n.allDay),_seg:e})}function DM(e,t){let{pluginHooks:n}=t,r=n.isDraggableTransformers,{def:i,ui:a}=e.eventRange,o=a.startEditable;for(let e of r)o=e(o,i,a,t);return o}function OM(e,t){return e.isStart&&e.eventRange.ui.durationEditable&&t.options.eventResizableFromStart}function kM(e,t){return e.isEnd&&e.eventRange.ui.durationEditable}function AM(e,t,n,r,i,a,o){let{dateEnv:s,options:c}=n,{displayEventTime:l,displayEventEnd:u}=c,d=e.eventRange.def,f=e.eventRange.instance;l??=r!==!1,u??=i!==!1;let p=f.range.start,m=f.range.end,h=a||e.start||e.eventRange.range.start,g=o||e.end||e.eventRange.range.end,_=xk(p).valueOf()===xk(h).valueOf(),v=xk(fk(m,-1)).valueOf()===xk(fk(g,-1)).valueOf();return l&&!d.allDay&&(_||v)?(h=_?p:h,g=v?m:g,u&&d.hasEnd?s.formatRange(h,g,t,{forcedStartTzo:a?null:f.forcedStartTzo,forcedEndTzo:o?null:f.forcedEndTzo}):s.format(h,t,{forcedTzo:a?null:f.forcedStartTzo})):``}function jM(e,t,n){let r=e.eventRange.range;return{isPast:r.end<=(n||t.start),isFuture:r.start>=(n||t.end),isToday:t&&uj(t,r.start)}}function MM(e){let t=[`fc-event`];return e.isMirror&&t.push(`fc-event-mirror`),e.isDraggable&&t.push(`fc-event-draggable`),(e.isStartResizable||e.isEndResizable)&&t.push(`fc-event-resizable`),e.isDragging&&t.push(`fc-event-dragging`),e.isResizing&&t.push(`fc-event-resizing`),e.isSelected&&t.push(`fc-event-selected`),e.isStart&&t.push(`fc-event-start`),e.isEnd&&t.push(`fc-event-end`),e.isPast&&t.push(`fc-event-past`),e.isToday&&t.push(`fc-event-today`),e.isFuture&&t.push(`fc-event-future`),t}function NM(e){return e.instance?e.instance.instanceId:`${e.def.defId}:${e.range.start.toISOString()}`}function PM(e,t){let{def:n,instance:r}=e.eventRange,{url:i}=n;if(i)return{href:i};let{emitter:a,options:o}=t,{eventInteractive:s}=o;return s??(s=n.interactive,s??=!!a.hasHandlers(`eventClick`)),s?BO(e=>{a.trigger(`eventClick`,{el:e.target,event:new _M(t,n,r),jsEvent:e,view:t.viewApi})}):{}}var FM={start:$,end:$,allDay:Boolean};function IM(e,t,n){let r=LM(e,t),{range:i}=r;if(!i.start)return null;if(!i.end){if(n==null)return null;i.end=t.add(i.start,n)}return r}function LM(e,t){let{refined:n,extra:r}=_A(e,FM),i=n.start?t.createMarkerMeta(n.start):null,a=n.end?t.createMarkerMeta(n.end):null,{allDay:o}=n;return o??=i&&i.isTimeUnspecified&&(!a||a.isTimeUnspecified),Object.assign({range:{start:i?i.marker:null,end:a?a.marker:null},allDay:o},r)}function RM(e,t){return Object.assign(Object.assign({},BM(e.range,t,e.allDay)),{allDay:e.allDay})}function zM(e,t,n){return Object.assign(Object.assign({},BM(e,t,n)),{timeZone:t.timeZone})}function BM(e,t,n){return{start:t.toDate(e.start),end:t.toDate(e.end),startStr:t.formatIso(e.start,{omitTime:n}),endStr:t.formatIso(e.end,{omitTime:n})}}function VM(e,t,n){let r=wj({editable:!1},n),i=Ej(r.refined,r.extra,``,e.allDay,!0,n);return{def:i,ui:wM(i,t),instance:gj(i.defId,e.range),range:e.range,isStart:!0,isEnd:!0}}function HM(e,t,n){let r=!1,i=function(e){r||(r=!0,t(e))},a=function(e){r||(r=!0,n(e))},o=e(i,a);o&&typeof o.then==`function`&&o.then(i,a)}var UM=class extends Error{constructor(e,t){super(e),this.response=t}};function WM(e,t,n){e=e.toUpperCase();let r={method:e};return e===`GET`?t+=(t.indexOf(`?`)===-1?`?`:`&`)+new URLSearchParams(n):(r.body=new URLSearchParams(n),r.headers={"Content-Type":`application/x-www-form-urlencoded`}),fetch(t,r).then(e=>{if(e.ok)return e.json().then(t=>[t,e],()=>{throw new UM(`Failure parsing JSON`,e)});throw new UM(`Request failed`,e)})}var GM;function KM(){return GM??=qM(),GM}function qM(){if(typeof document>`u`)return!0;let e=document.createElement(`div`);e.style.position=`absolute`,e.style.top=`0px`,e.style.left=`0px`,e.innerHTML=`<table><tr><td><div></div></td></tr></table>`,e.querySelector(`table`).style.height=`100px`,e.querySelector(`div`).style.height=`100%`,document.body.appendChild(e);let t=e.querySelector(`div`).offsetHeight>0;return document.body.removeChild(e),t}var JM=class extends GA{constructor(){super(...arguments),this.state={forPrint:!1},this.handleBeforePrint=()=>{RA(()=>{this.setState({forPrint:!0})})},this.handleAfterPrint=()=>{RA(()=>{this.setState({forPrint:!1})})}}render(){let{props:e}=this,{options:t}=e,{forPrint:n}=this.state,r=n||t.height===`auto`||t.contentHeight===`auto`,i=!r&&t.height!=null?t.height:``,a=[`fc`,n?`fc-media-print`:`fc-media-screen`,`fc-direction-${t.direction}`,e.theme.getClass(`root`)];return KM()||a.push(`fc-liquid-hack`),e.children(a,i,r,n)}componentDidMount(){let{emitter:e}=this.props;e.on(`_beforeprint`,this.handleBeforePrint),e.on(`_afterprint`,this.handleAfterPrint)}componentWillUnmount(){let{emitter:e}=this.props;e.off(`_beforeprint`,this.handleBeforePrint),e.off(`_afterprint`,this.handleAfterPrint)}},YM=class{constructor(e){this.component=e.component,this.isHitComboAllowed=e.isHitComboAllowed||null}destroy(){}};function XM(e,t){return{component:e,el:t.el,useEventCenter:t.useEventCenter==null||t.useEventCenter,isHitComboAllowed:t.isHitComboAllowed||null}}var ZM={},QM=class extends lD{constructor(e,t){super(e,t),this.handleRefresh=()=>{let e=this.computeTiming();e.state.nowDate.valueOf()!==this.state.nowDate.valueOf()&&this.setState(e.state),this.clearTimeout(),this.setTimeout(e.waitMs)},this.handleVisibilityChange=()=>{document.hidden||this.handleRefresh()},this.state=this.computeTiming().state}render(){let{props:e,state:t}=this;return e.children(t.nowDate,t.todayRange)}componentDidMount(){this.setTimeout(),this.context.nowManager.addResetListener(this.handleRefresh),document.addEventListener(`visibilitychange`,this.handleVisibilityChange)}componentDidUpdate(e){e.unit!==this.props.unit&&(this.clearTimeout(),this.setTimeout())}componentWillUnmount(){this.clearTimeout(),this.context.nowManager.removeResetListener(this.handleRefresh),document.removeEventListener(`visibilitychange`,this.handleVisibilityChange)}computeTiming(){let{props:e,context:t}=this,n=t.nowManager.getDateMarker(),{nowIndicatorSnap:r}=t.options;r===`auto`&&(r=/year|month|week|day/.test(e.unit)||(e.unitValue||1)===1);let i,a;return r?(i=t.dateEnv.startOf(n,e.unit),a=t.dateEnv.add(i,QO(1,e.unit)).valueOf()-n.valueOf()):(i=n,a=6e4),a=Math.min(864e5,a),{state:{nowDate:i,todayRange:$M(i)},waitMs:a}}setTimeout(e=this.computeTiming().waitMs){this.timeoutId=setTimeout(()=>{let e=this.computeTiming();this.setState(e.state,()=>{this.setTimeout(e.waitMs)})},e)}clearTimeout(){this.timeoutId&&clearTimeout(this.timeoutId)}};QM.contextType=HA;function $M(e){let t=xk(e);return{start:t,end:dk(t,1)}}var eN=class{getCurrentData(){return this.currentDataManager.getCurrentData()}dispatch(e){this.currentDataManager.dispatch(e)}get view(){return this.getCurrentData().viewApi}batchRendering(e){e()}updateSize(){this.trigger(`_resize`,!0)}setOption(e,t){this.dispatch({type:`SET_OPTION`,optionName:e,rawOptionValue:t})}getOption(e){return this.currentDataManager.currentCalendarOptionsInput[e]}getAvailableLocaleCodes(){return Object.keys(this.getCurrentData().availableRawLocales)}on(e,t){let{currentDataManager:n}=this;n.currentCalendarOptionsRefiners[e]?n.emitter.on(e,t):console.warn(`Unknown listener name '${e}'`)}off(e,t){this.currentDataManager.emitter.off(e,t)}trigger(e,...t){this.currentDataManager.emitter.trigger(e,...t)}changeView(e,t){this.batchRendering(()=>{if(this.unselect(),t){if(t.start&&t.end)this.dispatch({type:`CHANGE_VIEW_TYPE`,viewType:e}),this.dispatch({type:`SET_OPTION`,optionName:`visibleRange`,rawOptionValue:t});else{let{dateEnv:n}=this.getCurrentData();this.dispatch({type:`CHANGE_VIEW_TYPE`,viewType:e,dateMarker:n.createMarker(t)})}}else this.dispatch({type:`CHANGE_VIEW_TYPE`,viewType:e})})}zoomTo(e,t){let n=this.getCurrentData(),r;t||=`day`,r=n.viewSpecs[t]||this.getUnitViewSpec(t),this.unselect(),r?this.dispatch({type:`CHANGE_VIEW_TYPE`,viewType:r.type,dateMarker:e}):this.dispatch({type:`CHANGE_DATE`,dateMarker:e})}getUnitViewSpec(e){let{viewSpecs:t,toolbarConfig:n}=this.getCurrentData(),r=[].concat(n.header?n.header.viewsWithButtons:[],n.footer?n.footer.viewsWithButtons:[]),i,a;for(let e in t)r.push(e);for(i=0;i<r.length;i+=1)if(a=t[r[i]],a&&a.singleUnit===e)return a;return null}prev(){this.unselect(),this.dispatch({type:`PREV`})}next(){this.unselect(),this.dispatch({type:`NEXT`})}prevYear(){let e=this.getCurrentData();this.unselect(),this.dispatch({type:`CHANGE_DATE`,dateMarker:e.dateEnv.addYears(e.currentDate,-1)})}nextYear(){let e=this.getCurrentData();this.unselect(),this.dispatch({type:`CHANGE_DATE`,dateMarker:e.dateEnv.addYears(e.currentDate,1)})}today(){let e=this.getCurrentData();this.unselect(),this.dispatch({type:`CHANGE_DATE`,dateMarker:e.nowManager.getDateMarker()})}gotoDate(e){let t=this.getCurrentData();this.unselect(),this.dispatch({type:`CHANGE_DATE`,dateMarker:t.dateEnv.createMarker(e)})}incrementDate(e){let t=this.getCurrentData(),n=QO(e);n&&(this.unselect(),this.dispatch({type:`CHANGE_DATE`,dateMarker:t.dateEnv.add(t.currentDate,n)}))}getDate(){let e=this.getCurrentData();return e.dateEnv.toDate(e.currentDate)}formatDate(e,t){let{dateEnv:n}=this.getCurrentData();return n.format(n.createMarker(e),sA(t))}formatRange(e,t,n){let{dateEnv:r}=this.getCurrentData();return r.formatRange(r.createMarker(e),r.createMarker(t),sA(n),n)}formatIso(e,t){let{dateEnv:n}=this.getCurrentData();return n.formatIso(n.createMarker(e),{omitTime:t})}select(e,t){let n;n=t==null?e.start==null?{start:e,end:null}:e:{start:e,end:t};let r=this.getCurrentData(),i=IM(n,r.dateEnv,QO({days:1}));i&&(this.dispatch({type:`SELECT_DATES`,selection:i}),lM(i,null,r))}unselect(e){let t=this.getCurrentData();t.dateSelection&&(this.dispatch({type:`UNSELECT_DATES`}),uM(e,t))}addEvent(e,t){if(e instanceof _M){let t=e._def,n=e._instance;return this.getCurrentData().eventStore.defs[t.defId]||(this.dispatch({type:`ADD_EVENTS`,eventStore:Aj({def:t,instance:n})}),this.triggerEventAdd(e)),e}let n=this.getCurrentData(),r;if(t instanceof gM)r=t.internalEventSource;else if(typeof t==`boolean`)t&&([r]=CA(n.eventSources));else if(t!=null){let e=this.getEventSourceById(t);if(!e)return console.warn(`Could not find an event source with ID "${t}"`),null;r=e.internalEventSource}let i=Cj(e,r,n,!1);if(i){let e=new _M(n,i.def,i.def.recurringDef?null:i.instance);return this.dispatch({type:`ADD_EVENTS`,eventStore:Aj(i)}),this.triggerEventAdd(e),e}return null}triggerEventAdd(e){let{emitter:t}=this.getCurrentData();t.trigger(`eventAdd`,{event:e,relatedEvents:[],revert:()=>{this.dispatch({type:`REMOVE_EVENTS`,eventStore:vM(e)})}})}getEventById(e){let t=this.getCurrentData(),{defs:n,instances:r}=t.eventStore;e=String(e);for(let i in n){let a=n[i];if(a.publicId===e){if(a.recurringDef)return new _M(t,a,null);for(let e in r){let n=r[e];if(n.defId===a.defId)return new _M(t,a,n)}}}return null}getEvents(){let e=this.getCurrentData();return yM(e.eventStore,e)}removeAllEvents(){this.dispatch({type:`REMOVE_ALL_EVENTS`})}getEventSources(){let e=this.getCurrentData(),t=e.eventSources,n=[];for(let r in t)n.push(new gM(e,t[r]));return n}getEventSourceById(e){let t=this.getCurrentData(),n=t.eventSources;e=String(e);for(let r in n)if(n[r].publicId===e)return new gM(t,n[r]);return null}addEventSource(e){let t=this.getCurrentData();if(e instanceof gM)return t.eventSources[e.internalEventSource.sourceId]||this.dispatch({type:`ADD_EVENT_SOURCES`,sources:[e.internalEventSource]}),e;let n=Gj(e,t);return n?(this.dispatch({type:`ADD_EVENT_SOURCES`,sources:[n]}),new gM(t,n)):null}removeAllEventSources(){this.dispatch({type:`REMOVE_ALL_EVENT_SOURCES`})}refetchEvents(){this.dispatch({type:`FETCH_EVENT_SOURCES`,isRefetch:!0})}scrollToTime(e){let t=QO(e);t&&this.trigger(`_scrollRequest`,{time:t})}};function tN(e,t){let n={left:Math.max(e.left,t.left),right:Math.min(e.right,t.right),top:Math.max(e.top,t.top),bottom:Math.min(e.bottom,t.bottom)};return n.left<n.right&&n.top<n.bottom&&n}function nN(e,t,n,r){return{dow:e.getUTCDay(),isDisabled:!(!r||r.activeRange&&uj(r.activeRange,e)),isOther:!(!r||uj(r.currentRange,e)),isToday:!!(t&&uj(t,e)),isPast:!!(n?e<n:t&&e<t.start),isFuture:!!(n?e>n:t&&e>=t.end)}}function rN(e,t){let n=[`fc-day`,`fc-day-${lk[e.dow]}`];return e.isDisabled?n.push(`fc-day-disabled`):(e.isToday&&(n.push(`fc-day-today`),n.push(t.getClass(`today`))),e.isPast&&n.push(`fc-day-past`),e.isFuture&&n.push(`fc-day-future`),e.isOther&&n.push(`fc-day-other`)),n}var iN=sA({year:`numeric`,month:`long`,day:`numeric`}),aN=sA({week:`long`});function oN(e,t,n=`day`,r=!0){let{dateEnv:i,options:a,calendarApi:o}=e,s=i.format(t,n===`week`?aN:iN);if(a.navLinks){let e=i.toDate(t),c=e=>{let r=n===`day`?a.navLinkDayClick:n===`week`?a.navLinkWeekClick:null;typeof r==`function`?r.call(o,i.toDate(t),e):(typeof r==`string`&&(n=r),o.zoomTo(t,n))};return Object.assign({title:JO(a.navLinkHint,[s,e],s),"data-navlink":``},r?zO(c):{onClick:c})}return{"aria-label":s}}var sN;function cN(){return sN||=lN(),sN}function lN(){let e=document.createElement(`div`);e.style.overflow=`scroll`,e.style.position=`absolute`,e.style.top=`-9999px`,e.style.left=`-9999px`,document.body.appendChild(e);let t=uN(e);return document.body.removeChild(e),t}function uN(e){return{x:e.offsetHeight-e.clientHeight,y:e.offsetWidth-e.clientWidth}}function dN(e){let t=fN(e),n=e.getBoundingClientRect();for(let e of t){let t=tN(n,e.getBoundingClientRect());if(t)n=t;else return null}return n}function fN(e){let t=[];for(;e instanceof HTMLElement;){let n=window.getComputedStyle(e);if(n.position===`fixed`)break;/(auto|scroll)/.test(n.overflow+n.overflowY+n.overflowX)&&t.push(e),e=e.parentNode}return t}var pN=class{constructor(e,t,n,r){this.els=t;let i=this.originClientRect=e.getBoundingClientRect();n&&this.buildElHorizontals(i.left),r&&this.buildElVerticals(i.top)}buildElHorizontals(e){let t=[],n=[];for(let r of this.els){let i=r.getBoundingClientRect();t.push(i.left-e),n.push(i.right-e)}this.lefts=t,this.rights=n}buildElVerticals(e){let t=[],n=[];for(let r of this.els){let i=r.getBoundingClientRect();t.push(i.top-e),n.push(i.bottom-e)}this.tops=t,this.bottoms=n}leftToIndex(e){let{lefts:t,rights:n}=this,r=t.length,i=0;for(;i<r;i+=1)if(e>=t[i]&&e<n[i])return i}topToIndex(e){let{tops:t,bottoms:n}=this,r=t.length,i=0;for(;i<r;i+=1)if(e>=t[i]&&e<n[i])return i}getWidth(e){return this.rights[e]-this.lefts[e]}getHeight(e){return this.bottoms[e]-this.tops[e]}similarTo(e){return mN(this.tops||[],e.tops||[])&&mN(this.bottoms||[],e.bottoms||[])&&mN(this.lefts||[],e.lefts||[])&&mN(this.rights||[],e.rights||[])}};function mN(e,t){let n=e.length;if(n!==t.length)return!1;for(let r=0;r<n;r++)if(Math.round(e[r])!==Math.round(t[r]))return!1;return!0}var hN=class extends GA{constructor(){super(...arguments),this.uid=HO()}prepareHits(){}queryHit(e,t,n,r){return null}isValidSegDownEl(e){return!this.props.eventDrag&&!this.props.eventResize&&!DO(e,`.fc-event-mirror`)}isValidDateDownEl(e){return!DO(e,`.fc-event:not(.fc-bg-event)`)&&!DO(e,`.fc-more-link`)&&!DO(e,`a[data-navlink]`)&&!DO(e,`.fc-popover`)}},gN=class{constructor(e=e=>e.thickness||1){this.getEntryThickness=e,this.strictOrder=!1,this.allowReslicing=!1,this.maxCoord=-1,this.maxStackCnt=-1,this.levelCoords=[],this.entriesByLevel=[],this.stackCnts={}}addSegs(e){let t=[];for(let n of e)this.insertEntry(n,t);return t}insertEntry(e,t){let n=this.findInsertion(e);this.isInsertionValid(n,e)?this.insertEntryAt(e,n):this.handleInvalidInsertion(n,e,t)}isInsertionValid(e,t){return(this.maxCoord===-1||e.levelCoord+this.getEntryThickness(t)<=this.maxCoord)&&(this.maxStackCnt===-1||e.stackCnt<this.maxStackCnt)}handleInvalidInsertion(e,t,n){if(this.allowReslicing&&e.touchingEntry){let r=Object.assign(Object.assign({},t),{span:yN(t.span,e.touchingEntry.span)});n.push(r),this.splitEntry(t,e.touchingEntry,n)}else n.push(t)}splitEntry(e,t,n){let r=e.span,i=t.span;r.start<i.start&&this.insertEntry({index:e.index,thickness:e.thickness,span:{start:r.start,end:i.start}},n),r.end>i.end&&this.insertEntry({index:e.index,thickness:e.thickness,span:{start:i.end,end:r.end}},n)}insertEntryAt(e,t){let{entriesByLevel:n,levelCoords:r}=this;t.lateral===-1?(bN(r,t.level,t.levelCoord),bN(n,t.level,[e])):bN(n[t.level],t.lateral,e),this.stackCnts[vN(e)]=t.stackCnt}findInsertion(e){let{levelCoords:t,entriesByLevel:n,strictOrder:r,stackCnts:i}=this,a=t.length,o=0,s=-1,c=-1,l=null,u=0;for(let d=0;d<a;d+=1){let a=t[d];if(!r&&a>=o+this.getEntryThickness(e))break;let f=n[d],p,m=xN(f,e.span.start,_N),h=m[0]+m[1];for(;(p=f[h])&&p.span.start<e.span.end;){let e=a+this.getEntryThickness(p);e>o&&(o=e,l=p,s=d,c=h),e===o&&(u=Math.max(u,i[vN(p)]+1)),h+=1}}let d=0;if(l)for(d=s+1;d<a&&t[d]<o;)d+=1;let f=-1;return d<a&&t[d]===o&&(f=xN(n[d],e.span.end,_N)[0]),{touchingLevel:s,touchingLateral:c,touchingEntry:l,stackCnt:u,levelCoord:o,level:d,lateral:f}}toRects(){let{entriesByLevel:e,levelCoords:t}=this,n=e.length,r=[];for(let i=0;i<n;i+=1){let n=e[i],a=t[i];for(let e of n)r.push(Object.assign(Object.assign({},e),{thickness:this.getEntryThickness(e),levelCoord:a}))}return r}};function _N(e){return e.span.end}function vN(e){return e.index+`:`+e.span.start}function yN(e,t){let n=Math.max(e.start,t.start),r=Math.min(e.end,t.end);return n<r?{start:n,end:r}:null}function bN(e,t,n){e.splice(t,0,n)}function xN(e,t,n){let r=0,i=e.length;if(!i||t<n(e[r]))return[0,0];if(t>n(e[i-1]))return[i,0];for(;r<i;){let a=Math.floor(r+(i-r)/2),o=n(e[a]);if(t<o)i=a;else if(t>o)r=a+1;else return[a,1]}return[r,0]}function SN(e,t){return sA(!e||t>10?{weekday:`short`}:t>1?{weekday:`short`,month:`numeric`,day:`numeric`,omitCommas:!0}:{weekday:`long`})}var CN=`fc-col-header-cell`;function wN(e){return e.text}var TN=class extends GA{render(){let{dateEnv:e,options:t,theme:n,viewApi:r}=this.context,{props:i}=this,{date:a,dateProfile:o}=i,s=nN(a,i.todayRange,null,o),c=[CN].concat(rN(s,n)),l=e.format(a,i.dayHeaderFormat),u=!s.isDisabled&&i.colCnt>1?oN(this.context,a):{},d=e.toDate(a);e.namedTimeZoneImpl&&(d=fk(d,36e5));let f=Object.assign(Object.assign(Object.assign({date:d,view:r},i.extraRenderProps),{text:l}),s);return Q(ej,{elTag:`th`,elClasses:c,elAttrs:Object.assign({role:`columnheader`,colSpan:i.colSpan,"data-date":s.isDisabled?void 0:Fk(a)},i.extraDataAttrs),renderProps:f,generatorName:`dayHeaderContent`,customGenerator:t.dayHeaderContent,defaultGenerator:wN,classNameGenerator:t.dayHeaderClassNames,didMount:t.dayHeaderDidMount,willUnmount:t.dayHeaderWillUnmount},e=>Q(`div`,{className:`fc-scrollgrid-sync-inner`},!s.isDisabled&&Q(e,{elTag:`a`,elAttrs:u,elClasses:[`fc-col-header-cell-cushion`,i.isSticky&&`fc-sticky`]})))}},EN=sA({weekday:`long`}),DN=class extends GA{render(){let{props:e}=this,{dateEnv:t,theme:n,viewApi:r,options:i}=this.context,a=dk(new Date(2592e5),e.dow),o={dow:e.dow,isDisabled:!1,isFuture:!1,isPast:!1,isToday:!1,isOther:!1},s=t.format(a,e.dayHeaderFormat),c=Object.assign(Object.assign(Object.assign(Object.assign({date:a},o),{view:r}),e.extraRenderProps),{text:s});return Q(ej,{elTag:`th`,elClasses:[CN,...rN(o,n),...e.extraClassNames||[]],elAttrs:Object.assign({role:`columnheader`,colSpan:e.colSpan},e.extraDataAttrs),renderProps:c,generatorName:`dayHeaderContent`,customGenerator:i.dayHeaderContent,defaultGenerator:wN,classNameGenerator:i.dayHeaderClassNames,didMount:i.dayHeaderDidMount,willUnmount:i.dayHeaderWillUnmount},n=>Q(`div`,{className:`fc-scrollgrid-sync-inner`},Q(n,{elTag:`a`,elClasses:[`fc-col-header-cell-cushion`,e.isSticky&&`fc-sticky`],elAttrs:{"aria-label":t.format(a,EN)}})))}},ON=class extends GA{constructor(){super(...arguments),this.createDayHeaderFormatter=Rk(kN)}render(){let{context:e}=this,{dates:t,dateProfile:n,datesRepDistinctDays:r,renderIntro:i}=this.props,a=this.createDayHeaderFormatter(e.options.dayHeaderFormat,r,t.length);return Q(QM,{unit:`day`},(e,o)=>Q(`tr`,{role:`row`},i&&i(`day`),t.map(e=>r?Q(TN,{key:e.toISOString(),date:e,dateProfile:n,todayRange:o,colCnt:t.length,dayHeaderFormat:a}):Q(DN,{key:e.getUTCDay(),dow:e.getUTCDay(),dayHeaderFormat:a}))))}};function kN(e,t,n){return e||SN(t,n)}var AN=class{constructor(e,t){let n=e.start,{end:r}=e,i=[],a=[],o=-1;for(;n<r;)t.isHiddenDay(n)?i.push(o+.5):(o+=1,i.push(o),a.push(n)),n=dk(n,1);this.dates=a,this.indices=i,this.cnt=a.length}sliceRange(e){let t=this.getDateDayIndex(e.start),n=this.getDateDayIndex(dk(e.end,-1)),r=Math.max(0,t),i=Math.min(this.cnt-1,n);return r=Math.ceil(r),i=Math.floor(i),r<=i?{firstIndex:r,lastIndex:i,isStart:t===r,isEnd:n===i}:null}getDateDayIndex(e){let{indices:t}=this,n=Math.floor(mk(this.dates[0],e));return n<0?t[0]-1:n>=t.length?t[t.length-1]+1:t[n]}},jN=class{constructor(e,t){let{dates:n}=e,r,i,a;if(t){for(i=n[0].getUTCDay(),r=1;r<n.length&&n[r].getUTCDay()!==i;r+=1);a=Math.ceil(n.length/r)}else a=1,r=n.length;this.rowCnt=a,this.colCnt=r,this.daySeries=e,this.cells=this.buildCells(),this.headerDates=this.buildHeaderDates()}buildCells(){let e=[];for(let t=0;t<this.rowCnt;t+=1){let n=[];for(let e=0;e<this.colCnt;e+=1)n.push(this.buildCell(t,e));e.push(n)}return e}buildCell(e,t){let n=this.daySeries.dates[e*this.colCnt+t];return{key:n.toISOString(),date:n}}buildHeaderDates(){let e=[];for(let t=0;t<this.colCnt;t+=1)e.push(this.cells[0][t].date);return e}sliceRange(e){let{colCnt:t}=this,n=this.daySeries.sliceRange(e),r=[];if(n){let{firstIndex:e,lastIndex:i}=n,a=e;for(;a<=i;){let o=Math.floor(a/t),s=Math.min((o+1)*t,i+1);r.push({row:o,firstCol:a%t,lastCol:(s-1)%t,isStart:n.isStart&&a===e,isEnd:n.isEnd&&s-1===i}),a=s}}return r}},MN=class{constructor(){this.sliceBusinessHours=Rk(this._sliceBusinessHours),this.sliceDateSelection=Rk(this._sliceDateSpan),this.sliceEventStore=Rk(this._sliceEventStore),this.sliceEventDrag=Rk(this._sliceInteraction),this.sliceEventResize=Rk(this._sliceInteraction),this.forceDayIfListItem=!1}sliceProps(e,t,n,r,...i){let{eventUiBases:a}=e,o=this.sliceEventStore(e.eventStore,a,t,n,...i);return{dateSelectionSegs:this.sliceDateSelection(e.dateSelection,t,n,a,r,...i),businessHourSegs:this.sliceBusinessHours(e.businessHours,t,n,r,...i),fgEventSegs:o.fg,bgEventSegs:o.bg,eventDrag:this.sliceEventDrag(e.eventDrag,a,t,n,...i),eventResize:this.sliceEventResize(e.eventResize,a,t,n,...i),eventSelection:e.eventSelection}}sliceNowDate(e,t,n,r,...i){return this._sliceDateSpan({range:{start:e,end:fk(e,1)},allDay:!1},t,n,{},r,...i)}_sliceBusinessHours(e,t,n,r,...i){return e?this._sliceEventStore(vj(e,NN(t,!!n),r),{},t,n,...i).bg:[]}_sliceEventStore(e,t,n,r,...i){if(e){let a=bM(e,t,NN(n,!!r),r);return{bg:this.sliceEventRanges(a.bg,i),fg:this.sliceEventRanges(a.fg,i)}}return{bg:[],fg:[]}}_sliceInteraction(e,t,n,r,...i){if(!e)return null;let a=bM(e.mutatedEvents,t,NN(n,!!r),r);return{segs:this.sliceEventRanges(a.fg,i),affectedInstances:e.affectedEvents.instances,isEvent:e.isEvent}}_sliceDateSpan(e,t,n,r,i,...a){if(!e)return[];let o=NN(t,!!n),s=cj(e.range,o);if(s){e=Object.assign(Object.assign({},e),{range:s});let t=VM(e,r,i),n=this.sliceRange(e.range,...a);for(let e of n)e.eventRange=t;return n}return[]}sliceEventRanges(e,t){let n=[];for(let r of e)n.push(...this.sliceEventRange(r,t));return n}sliceEventRange(e,t){let n=e.range;this.forceDayIfListItem&&e.ui.display===`list-item`&&(n={start:n.start,end:dk(n.start,1)});let r=this.sliceRange(n,...t);for(let t of r)t.eventRange=e,t.isStart=e.isStart&&t.isStart,t.isEnd=e.isEnd&&t.isEnd;return r}};function NN(e,t){let n=e.activeRange;return t?n:{start:fk(n.start,e.slotMinTime.milliseconds),end:fk(n.end,e.slotMaxTime.milliseconds-864e5)}}var PN=/^(visible|hidden)$/,FN=class extends GA{constructor(){super(...arguments),this.handleEl=e=>{this.el=e,JA(this.props.elRef,e)}}render(){let{props:e}=this,{liquid:t,liquidIsAbsolute:n}=e,r=t&&n,i=[`fc-scroller`];return t&&(n?i.push(`fc-scroller-liquid-absolute`):i.push(`fc-scroller-liquid`)),Q(`div`,{ref:this.handleEl,className:i.join(` `),style:{overflowX:e.overflowX,overflowY:e.overflowY,left:r&&-(e.overcomeLeft||0)||``,right:r&&-(e.overcomeRight||0)||``,bottom:r&&-(e.overcomeBottom||0)||``,marginLeft:!r&&-(e.overcomeLeft||0)||``,marginRight:!r&&-(e.overcomeRight||0)||``,marginBottom:!r&&-(e.overcomeBottom||0)||``,maxHeight:e.maxHeight||``}},e.children)}needsXScrolling(){if(PN.test(this.props.overflowX))return!1;let{el:e}=this,t=this.el.getBoundingClientRect().width-this.getYScrollbarWidth(),{children:n}=e;for(let e=0;e<n.length;e+=1)if(n[e].getBoundingClientRect().width>t)return!0;return!1}needsYScrolling(){if(PN.test(this.props.overflowY))return!1;let{el:e}=this,t=this.el.getBoundingClientRect().height-this.getXScrollbarWidth(),{children:n}=e;for(let e=0;e<n.length;e+=1)if(n[e].getBoundingClientRect().height>t)return!0;return!1}getXScrollbarWidth(){return PN.test(this.props.overflowX)?0:this.el.offsetHeight-this.el.clientHeight}getYScrollbarWidth(){return PN.test(this.props.overflowY)?0:this.el.offsetWidth-this.el.clientWidth}},IN=class{constructor(e){this.masterCallback=e,this.currentMap={},this.depths={},this.callbackMap={},this.handleValue=(e,t)=>{let{depths:n,currentMap:r}=this,i=!1,a=!1;e===null?(--n[t],n[t]||(delete r[t],delete this.callbackMap[t],i=!0)):(i=t in r,r[t]=e,n[t]=(n[t]||0)+1,a=!0),this.masterCallback&&(i&&this.masterCallback(null,String(t)),a&&this.masterCallback(e,String(t)))}}createRef(e){let t=this.callbackMap[e];return t||=this.callbackMap[e]=t=>{this.handleValue(t,String(e))},t}collect(e,t,n){return AA(this.currentMap,e,t,n)}getAll(){return CA(this.currentMap)}};function LN(e){let t=kO(e,`.fc-scrollgrid-shrink`),n=0;for(let e of t)n=Math.max(n,XO(e));return Math.ceil(n)}function RN(e,t){return e.liquid&&t.liquid}function zN(e,t){return t.maxHeight!=null||RN(e,t)}function BN(e,t,n,r){let{expandRows:i}=n;return typeof t.content==`function`?t.content(n):Q(`table`,{role:`presentation`,className:[t.tableClassName,e.syncRowHeights?`fc-scrollgrid-sync-table`:``].join(` `),style:{minWidth:n.tableMinWidth,width:n.clientWidth,height:i?n.clientHeight:``}},n.tableColGroupNode,Q(r?`thead`:`tbody`,{role:`presentation`},typeof t.rowContent==`function`?t.rowContent(n):t.rowContent))}function VN(e,t){return ck(e,t,wA)}function HN(e,t){let n=[];for(let r of e){let e=r.span||1;for(let i=0;i<e;i+=1)n.push(Q(`col`,{style:{width:r.width===`shrink`?UN(t):r.width||``,minWidth:r.minWidth||``}}))}return Q(`colgroup`,{},...n)}function UN(e){return e??4}function WN(e){for(let t of e)if(t.width===`shrink`)return!0;return!1}function GN(e,t){let n=[`fc-scrollgrid`,t.theme.getClass(`table`)];return e&&n.push(`fc-scrollgrid-liquid`),n}function KN(e,t){let n=[`fc-scrollgrid-section`,`fc-scrollgrid-section-${e.type}`,e.className];return t&&e.liquid&&e.maxHeight==null&&n.push(`fc-scrollgrid-section-liquid`),e.isSticky&&n.push(`fc-scrollgrid-section-sticky`),n}function qN(e){return Q(`div`,{className:`fc-scrollgrid-sticky-shim`,style:{width:e.clientWidth,minWidth:e.tableMinWidth}})}function JN(e){let{stickyHeaderDates:t}=e;return(t==null||t===`auto`)&&(t=e.height===`auto`||e.viewHeight===`auto`),t}function YN(e){let{stickyFooterScrollbar:t}=e;return(t==null||t===`auto`)&&(t=e.height===`auto`||e.viewHeight===`auto`),t}var XN=class extends GA{constructor(){super(...arguments),this.processCols=Rk(e=>e,VN),this.renderMicroColGroup=Rk(HN),this.scrollerRefs=new IN,this.scrollerElRefs=new IN(this._handleScrollerEl.bind(this)),this.state={shrinkWidth:null,forceYScrollbars:!1,scrollerClientWidths:{},scrollerClientHeights:{}},this.handleSizing=()=>{this.safeSetState(Object.assign({shrinkWidth:this.computeShrinkWidth()},this.computeScrollerDims()))}}render(){let{props:e,state:t,context:n}=this,r=e.sections||[],i=this.processCols(e.cols),a=this.renderMicroColGroup(i,t.shrinkWidth),o=GN(e.liquid,n);e.collapsibleWidth&&o.push(`fc-scrollgrid-collapsible`);let s=r.length,c=0,l,u=[],d=[],f=[];for(;c<s&&(l=r[c]).type===`header`;)u.push(this.renderSection(l,a,!0)),c+=1;for(;c<s&&(l=r[c]).type===`body`;)d.push(this.renderSection(l,a,!1)),c+=1;for(;c<s&&(l=r[c]).type===`footer`;)f.push(this.renderSection(l,a,!0)),c+=1;let p=!KM(),m={role:`rowgroup`};return Q(`table`,{role:`grid`,className:o.join(` `),style:{height:e.height}},!(p||!u.length)&&Q(`thead`,m,...u),!(p||!d.length)&&Q(`tbody`,m,...d),!(p||!f.length)&&Q(`tfoot`,m,...f),p&&Q(`tbody`,m,...u,...d,...f))}renderSection(e,t,n){return`outerContent`in e?Q(rD,{key:e.key},e.outerContent):Q(`tr`,{key:e.key,role:`presentation`,className:KN(e,this.props.liquid).join(` `)},this.renderChunkTd(e,t,e.chunk,n))}renderChunkTd(e,t,n,r){if(`outerContent`in n)return n.outerContent;let{props:i}=this,{forceYScrollbars:a,scrollerClientWidths:o,scrollerClientHeights:s}=this.state,c=zN(i,e),l=RN(i,e),u=i.liquid?a?`scroll`:c?`auto`:`hidden`:`visible`,d=e.key,f=BN(e,n,{tableColGroupNode:t,tableMinWidth:``,clientWidth:!i.collapsibleWidth&&o[d]!==void 0?o[d]:null,clientHeight:s[d]===void 0?null:s[d],expandRows:e.expandRows,syncRowHeights:!1,rowSyncHeights:[],reportRowHeightChange:()=>{}},r);return Q(r?`th`:`td`,{ref:n.elRef,role:`presentation`},Q(`div`,{className:`fc-scroller-harness${l?` fc-scroller-harness-liquid`:``}`},Q(FN,{ref:this.scrollerRefs.createRef(d),elRef:this.scrollerElRefs.createRef(d),overflowY:u,overflowX:i.liquid?`hidden`:`visible`,maxHeight:e.maxHeight,liquid:l,liquidIsAbsolute:!0},f)))}_handleScrollerEl(e,t){let n=ZN(this.props.sections,t);n&&JA(n.chunk.scrollerElRef,e)}componentDidMount(){this.handleSizing(),this.context.addResizeHandler(this.handleSizing)}componentDidUpdate(){this.handleSizing()}componentWillUnmount(){this.context.removeResizeHandler(this.handleSizing)}computeShrinkWidth(){return WN(this.props.cols)?LN(this.scrollerElRefs.getAll()):0}computeScrollerDims(){let e=cN(),{scrollerRefs:t,scrollerElRefs:n}=this,r=!1,i={},a={};for(let e in t.currentMap){let n=t.currentMap[e];if(n&&n.needsYScrolling()){r=!0;break}}for(let t of this.props.sections){let o=t.key,s=n.currentMap[o];if(s){let t=s.parentNode;i[o]=Math.floor(t.getBoundingClientRect().width-(r?e.y:0)),a[o]=Math.floor(t.getBoundingClientRect().height)}}return{forceYScrollbars:r,scrollerClientWidths:i,scrollerClientHeights:a}}};XN.addStateEquality({scrollerClientWidths:wA,scrollerClientHeights:wA});function ZN(e,t){for(let n of e)if(n.key===t)return n;return null}var QN=class extends GA{constructor(){super(...arguments),this.buildPublicEvent=Rk((e,t,n)=>new _M(e,t,n)),this.handleEl=e=>{this.el=e,JA(this.props.elRef,e),e&&xM(e,this.props.seg)}}render(){let{props:e,context:t}=this,{options:n}=t,{seg:r}=e,{eventRange:i}=r,{ui:a}=i,o={event:this.buildPublicEvent(t,i.def,i.instance),view:t.viewApi,timeText:e.timeText,textColor:a.textColor,backgroundColor:a.backgroundColor,borderColor:a.borderColor,isDraggable:!e.disableDragging&&DM(r,t),isStartResizable:!e.disableResizing&&OM(r,t),isEndResizable:!e.disableResizing&&kM(r),isMirror:!!(e.isDragging||e.isResizing||e.isDateSelecting),isStart:!!r.isStart,isEnd:!!r.isEnd,isPast:!!e.isPast,isFuture:!!e.isFuture,isToday:!!e.isToday,isSelected:!!e.isSelected,isDragging:!!e.isDragging,isResizing:!!e.isResizing};return Q(ej,{elRef:this.handleEl,elTag:e.elTag,elAttrs:e.elAttrs,elClasses:[...MM(o),...r.eventRange.ui.classNames,...e.elClasses||[]],elStyle:e.elStyle,renderProps:o,generatorName:`eventContent`,customGenerator:n.eventContent,defaultGenerator:e.defaultGenerator,classNameGenerator:n.eventClassNames,didMount:n.eventDidMount,willUnmount:n.eventWillUnmount},e.children)}componentDidUpdate(e){this.el&&this.props.seg!==e.seg&&xM(this.el,this.props.seg)}},$N=class extends GA{render(){let{props:e,context:t}=this,{options:n}=t,{seg:r}=e,{ui:i}=r.eventRange,a=AM(r,n.eventTimeFormat||e.defaultTimeFormat,t,e.defaultDisplayEventTime,e.defaultDisplayEventEnd);return Q(QN,Object.assign({},e,{elTag:`a`,elStyle:{borderColor:i.borderColor,backgroundColor:i.backgroundColor},elAttrs:PM(r,t),defaultGenerator:eP,timeText:a}),(e,t)=>Q(rD,null,Q(e,{elTag:`div`,elClasses:[`fc-event-main`],elStyle:{color:t.textColor}}),!!t.isStartResizable&&Q(`div`,{className:`fc-event-resizer fc-event-resizer-start`}),!!t.isEndResizable&&Q(`div`,{className:`fc-event-resizer fc-event-resizer-end`})))}};$N.addPropsEquality({seg:wA});function eP(e){return Q(`div`,{className:`fc-event-main-frame`},e.timeText&&Q(`div`,{className:`fc-event-time`},e.timeText),Q(`div`,{className:`fc-event-title-container`},Q(`div`,{className:`fc-event-title fc-sticky`},e.event.title||Q(rD,null,`\xA0`))))}var tP=sA({day:`numeric`}),nP=class extends GA{constructor(){super(...arguments),this.refineRenderProps=zk(iP)}render(){let{props:e,context:t}=this,{options:n}=t,r=this.refineRenderProps({date:e.date,dateProfile:e.dateProfile,todayRange:e.todayRange,isMonthStart:e.isMonthStart||!1,showDayNumber:e.showDayNumber,extraRenderProps:e.extraRenderProps,viewApi:t.viewApi,dateEnv:t.dateEnv,monthStartFormat:n.monthStartFormat});return Q(ej,{elRef:e.elRef,elTag:e.elTag,elAttrs:Object.assign(Object.assign({},e.elAttrs),r.isDisabled?{}:{"data-date":Fk(e.date)}),elClasses:[...rN(r,t.theme),...e.elClasses||[]],elStyle:e.elStyle,renderProps:r,generatorName:`dayCellContent`,customGenerator:n.dayCellContent,defaultGenerator:e.defaultGenerator,classNameGenerator:r.isDisabled?void 0:n.dayCellClassNames,didMount:n.dayCellDidMount,willUnmount:n.dayCellWillUnmount},e.children)}};function rP(e){return!!(e.dayCellContent||XA(`dayCellContent`,e))}function iP(e){let{date:t,dateEnv:n,dateProfile:r,isMonthStart:i}=e,a=nN(t,e.todayRange,null,r),o=e.showDayNumber?n.format(t,i?e.monthStartFormat:tP):``;return Object.assign(Object.assign(Object.assign({date:n.toDate(t),view:e.viewApi},a),{isMonthStart:i,dayNumberText:o}),e.extraRenderProps)}var aP=class extends GA{render(){let{props:e}=this,{seg:t}=e;return Q(QN,{elTag:`div`,elClasses:[`fc-bg-event`],elStyle:{backgroundColor:t.eventRange.ui.backgroundColor},defaultGenerator:oP,seg:t,timeText:``,isDragging:!1,isResizing:!1,isDateSelecting:!1,isSelected:!1,isPast:e.isPast,isFuture:e.isFuture,isToday:e.isToday,disableDragging:!0,disableResizing:!0})}};function oP(e){let{title:t}=e.event;return t&&Q(`div`,{className:`fc-event-title`},e.event.title)}function sP(e){return Q(`div`,{className:`fc-${e}`})}var cP=e=>Q(HA.Consumer,null,t=>{let{dateEnv:n,options:r}=t,{date:i}=e,a=r.weekNumberFormat||e.defaultFormat,o={num:n.computeWeekNumber(i),text:n.format(i,a),date:i};return Q(ej,{elRef:e.elRef,elTag:e.elTag,elAttrs:e.elAttrs,elClasses:e.elClasses,elStyle:e.elStyle,renderProps:o,generatorName:`weekNumberContent`,customGenerator:r.weekNumberContent,defaultGenerator:lP,classNameGenerator:r.weekNumberClassNames,didMount:r.weekNumberDidMount,willUnmount:r.weekNumberWillUnmount},e.children)});function lP(e){return e.text}var uP=10,dP=class extends GA{constructor(){super(...arguments),this.state={titleId:FO()},this.handleRootEl=e=>{this.rootEl=e,this.props.elRef&&JA(this.props.elRef,e)},this.handleDocumentMouseDown=e=>{let t=NO(e);this.rootEl.contains(t)||this.handleCloseClick()},this.handleDocumentKeyDown=e=>{e.key===`Escape`&&this.handleCloseClick()},this.handleCloseClick=()=>{let{onClose:e}=this.props;e&&e()}}render(){let{theme:e,options:t}=this.context,{props:n,state:r}=this,i=[`fc-popover`,e.getClass(`popover`)].concat(n.extraClassNames||[]);return rO(Q(`div`,Object.assign({},n.extraAttrs,{id:n.id,className:i.join(` `),"aria-labelledby":r.titleId,ref:this.handleRootEl}),Q(`div`,{className:`fc-popover-header `+e.getClass(`popoverHeader`)},Q(`span`,{className:`fc-popover-title`,id:r.titleId},n.title),Q(`span`,{className:`fc-popover-close `+e.getIconClass(`close`),title:t.closeHint,onClick:this.handleCloseClick})),Q(`div`,{className:`fc-popover-body `+e.getClass(`popoverContent`)},n.children)),n.parentEl)}componentDidMount(){document.addEventListener(`mousedown`,this.handleDocumentMouseDown),document.addEventListener(`keydown`,this.handleDocumentKeyDown),this.updateSize()}componentWillUnmount(){document.removeEventListener(`mousedown`,this.handleDocumentMouseDown),document.removeEventListener(`keydown`,this.handleDocumentKeyDown)}updateSize(){let{isRtl:e}=this.context,{alignmentEl:t,alignGridTop:n}=this.props,{rootEl:r}=this,i=dN(t);if(i){let a=r.getBoundingClientRect(),o=n?DO(t,`.fc-scrollgrid`).getBoundingClientRect().top:i.top,s=e?i.right-a.width:i.left;o=Math.max(o,uP),s=Math.min(s,document.documentElement.clientWidth-uP-a.width),s=Math.max(s,uP);let c=r.offsetParent.getBoundingClientRect();jO(r,{top:o-c.top,left:s-c.left})}}},fP=class extends hN{constructor(){super(...arguments),this.handleRootEl=e=>{this.rootEl=e,e?this.context.registerInteractiveComponent(this,{el:e,useEventCenter:!1}):this.context.unregisterInteractiveComponent(this)}}render(){let{options:e,dateEnv:t}=this.context,{props:n}=this,{startDate:r,todayRange:i,dateProfile:a}=n,o=t.format(r,e.dayPopoverFormat);return Q(nP,{elRef:this.handleRootEl,date:r,dateProfile:a,todayRange:i},(t,r,i)=>Q(dP,{elRef:i.ref,id:n.id,title:o,extraClassNames:[`fc-more-popover`].concat(i.className||[]),extraAttrs:i,parentEl:n.parentEl,alignmentEl:n.alignmentEl,alignGridTop:n.alignGridTop,onClose:n.onClose},rP(e)&&Q(t,{elTag:`div`,elClasses:[`fc-more-popover-misc`]}),n.children))}queryHit(e,t,n,r){let{rootEl:i,props:a}=this;return e>=0&&e<n&&t>=0&&t<r?{dateProfile:a.dateProfile,dateSpan:Object.assign({allDay:!a.forceTimed,range:{start:a.startDate,end:a.endDate}},a.extraDateSpan),dayEl:i,rect:{left:0,top:0,right:n,bottom:r},layer:1}:null}},pP=class extends GA{constructor(){super(...arguments),this.state={isPopoverOpen:!1,popoverId:FO()},this.handleLinkEl=e=>{this.linkEl=e,this.props.elRef&&JA(this.props.elRef,e)},this.handleClick=e=>{let{props:t,context:n}=this,{moreLinkClick:r}=n.options,i=hP(t).start;function a(e){let{def:t,instance:r,range:i}=e.eventRange;return{event:new _M(n,t,r),start:n.dateEnv.toDate(i.start),end:n.dateEnv.toDate(i.end),isStart:e.isStart,isEnd:e.isEnd}}typeof r==`function`&&(r=r({date:i,allDay:!!t.allDayDate,allSegs:t.allSegs.map(a),hiddenSegs:t.hiddenSegs.map(a),jsEvent:e,view:n.viewApi})),!r||r===`popover`?this.setState({isPopoverOpen:!0}):typeof r==`string`&&n.calendarApi.zoomTo(i,r)},this.handlePopoverClose=()=>{this.setState({isPopoverOpen:!1})}}render(){let{props:e,state:t}=this;return Q(HA.Consumer,null,n=>{let{viewApi:r,options:i,calendarApi:a}=n,{moreLinkText:o}=i,{moreCnt:s}=e,c=hP(e),l=typeof o==`function`?o.call(a,s):`+${s} ${o}`,u=JO(i.moreLinkHint,[s],l),d={num:s,shortText:`+${s}`,text:l,view:r};return Q(rD,null,!!e.moreCnt&&Q(ej,{elTag:e.elTag||`a`,elRef:this.handleLinkEl,elClasses:[...e.elClasses||[],`fc-more-link`],elStyle:e.elStyle,elAttrs:Object.assign(Object.assign(Object.assign({},e.elAttrs),zO(this.handleClick)),{title:u,"aria-expanded":t.isPopoverOpen,"aria-controls":t.isPopoverOpen?t.popoverId:``}),renderProps:d,generatorName:`moreLinkContent`,customGenerator:i.moreLinkContent,defaultGenerator:e.defaultGenerator||mP,classNameGenerator:i.moreLinkClassNames,didMount:i.moreLinkDidMount,willUnmount:i.moreLinkWillUnmount},e.children),t.isPopoverOpen&&Q(fP,{id:t.popoverId,startDate:c.start,endDate:c.end,dateProfile:e.dateProfile,todayRange:e.todayRange,extraDateSpan:e.extraDateSpan,parentEl:this.parentEl,alignmentEl:e.alignmentElRef?e.alignmentElRef.current:this.linkEl,alignGridTop:e.alignGridTop,forceTimed:e.forceTimed,onClose:this.handlePopoverClose},e.popoverContent()))})}componentDidMount(){this.updateParentEl()}componentDidUpdate(){this.updateParentEl()}updateParentEl(){this.linkEl&&(this.parentEl=DO(this.linkEl,`.fc-view-harness`))}};function mP(e){return e.text}function hP(e){if(e.allDayDate)return{start:e.allDayDate,end:dk(e.allDayDate,1)};let{hiddenSegs:t}=e;return{start:gP(t),end:vP(t)}}function gP(e){return e.reduce(_P).eventRange.range.start}function _P(e,t){return e.eventRange.range.start<t.eventRange.range.start?e:t}function vP(e){return e.reduce(yP).eventRange.range.end}function yP(e,t){return e.eventRange.range.end>t.eventRange.range.end?e:t}var bP=class{constructor(){this.handlers=[]}set(e){this.currentValue=e;for(let t of this.handlers)t(e)}subscribe(e){this.handlers.push(e),this.currentValue!==void 0&&e(this.currentValue)}},xP=class extends bP{constructor(){super(...arguments),this.map=new Map}handle(e){let{map:t}=this,n=!1;e.isActive?(t.set(e.id,e),n=!0):t.has(e.id)&&(t.delete(e.id),n=!0),n&&this.set(t)}},SP=[],CP={code:`en`,week:{dow:0,doy:4},direction:`ltr`,buttonText:{prev:`prev`,next:`next`,prevYear:`prev year`,nextYear:`next year`,year:`year`,today:`today`,month:`month`,week:`week`,day:`day`,list:`list`},weekText:`W`,weekTextLong:`Week`,closeHint:`Close`,timeHint:`Time`,eventHint:`Event`,allDayText:`all-day`,moreLinkText:`more`,noEventsText:`No events to display`},wP=Object.assign(Object.assign({},CP),{buttonHints:{prev:`Previous $0`,next:`Next $0`,today(e,t){return t===`day`?`Today`:`This ${e}`}},viewHint:`$0 view`,navLinkHint:`Go to $0`,moreLinkHint(e){return`Show ${e} more event${e===1?``:`s`}`}});function TP(e){let t=e.length>0?e[0].code:`en`,n=SP.concat(e),r={en:wP};for(let e of n)r[e.code]=e;return{map:r,defaultCode:t}}function EP(e,t){return typeof e==`object`&&!Array.isArray(e)?kP(e.code,[e.code],e):DP(e,t)}function DP(e,t){let n=[].concat(e||[]);return kP(e,n,OP(n,t)||wP)}function OP(e,t){for(let n=0;n<e.length;n+=1){let r=e[n].toLocaleLowerCase().split(`-`);for(let e=r.length;e>0;--e){let n=r.slice(0,e).join(`-`);if(t[n])return t[n]}}return null}function kP(e,t,n){let r=yA([CP,n],[`buttonText`]);delete r.code;let{week:i}=r;return delete r.week,{codeArg:e,codes:t,week:i,simpleNumberFormat:new Intl.NumberFormat(e),options:r}}function AP(e){return{id:HO(),name:e.name,premiumReleaseDate:e.premiumReleaseDate?new Date(e.premiumReleaseDate):void 0,deps:e.deps||[],reducers:e.reducers||[],isLoadingFuncs:e.isLoadingFuncs||[],contextInit:[].concat(e.contextInit||[]),eventRefiners:e.eventRefiners||{},eventDefMemberAdders:e.eventDefMemberAdders||[],eventSourceRefiners:e.eventSourceRefiners||{},isDraggableTransformers:e.isDraggableTransformers||[],eventDragMutationMassagers:e.eventDragMutationMassagers||[],eventDefMutationAppliers:e.eventDefMutationAppliers||[],dateSelectionTransformers:e.dateSelectionTransformers||[],datePointTransforms:e.datePointTransforms||[],dateSpanTransforms:e.dateSpanTransforms||[],views:e.views||{},viewPropsTransformers:e.viewPropsTransformers||[],isPropsValid:e.isPropsValid||null,externalDefTransforms:e.externalDefTransforms||[],viewContainerAppends:e.viewContainerAppends||[],eventDropTransformers:e.eventDropTransformers||[],componentInteractions:e.componentInteractions||[],calendarInteractions:e.calendarInteractions||[],themeClasses:e.themeClasses||{},eventSourceDefs:e.eventSourceDefs||[],cmdFormatter:e.cmdFormatter,recurringTypes:e.recurringTypes||[],namedTimeZonedImpl:e.namedTimeZonedImpl,initialView:e.initialView||``,elementDraggingImpl:e.elementDraggingImpl,optionChangeHandlers:e.optionChangeHandlers||{},scrollGridImpl:e.scrollGridImpl||null,listenerRefiners:e.listenerRefiners||{},optionRefiners:e.optionRefiners||{},propSetHandlers:e.propSetHandlers||{}}}function jP(e,t){let n={},r={premiumReleaseDate:void 0,reducers:[],isLoadingFuncs:[],contextInit:[],eventRefiners:{},eventDefMemberAdders:[],eventSourceRefiners:{},isDraggableTransformers:[],eventDragMutationMassagers:[],eventDefMutationAppliers:[],dateSelectionTransformers:[],datePointTransforms:[],dateSpanTransforms:[],views:{},viewPropsTransformers:[],isPropsValid:null,externalDefTransforms:[],viewContainerAppends:[],eventDropTransformers:[],componentInteractions:[],calendarInteractions:[],themeClasses:{},eventSourceDefs:[],cmdFormatter:null,recurringTypes:[],namedTimeZonedImpl:null,initialView:``,elementDraggingImpl:null,optionChangeHandlers:{},scrollGridImpl:null,listenerRefiners:{},optionRefiners:{},propSetHandlers:{}};function i(e){for(let t of e){let e=t.name,a=n[e];a===void 0?(n[e]=t.id,i(t.deps),r=NP(r,t)):a!==t.id&&console.warn(`Duplicate plugin '${e}'`)}}return e&&i(e),i(t),r}function MP(){let e=[],t=[],n;return(r,i)=>(n&&ck(r,e)&&ck(i,t)||(n=jP(r,i)),e=r,t=i,n)}function NP(e,t){return{premiumReleaseDate:PP(e.premiumReleaseDate,t.premiumReleaseDate),reducers:e.reducers.concat(t.reducers),isLoadingFuncs:e.isLoadingFuncs.concat(t.isLoadingFuncs),contextInit:e.contextInit.concat(t.contextInit),eventRefiners:Object.assign(Object.assign({},e.eventRefiners),t.eventRefiners),eventDefMemberAdders:e.eventDefMemberAdders.concat(t.eventDefMemberAdders),eventSourceRefiners:Object.assign(Object.assign({},e.eventSourceRefiners),t.eventSourceRefiners),isDraggableTransformers:e.isDraggableTransformers.concat(t.isDraggableTransformers),eventDragMutationMassagers:e.eventDragMutationMassagers.concat(t.eventDragMutationMassagers),eventDefMutationAppliers:e.eventDefMutationAppliers.concat(t.eventDefMutationAppliers),dateSelectionTransformers:e.dateSelectionTransformers.concat(t.dateSelectionTransformers),datePointTransforms:e.datePointTransforms.concat(t.datePointTransforms),dateSpanTransforms:e.dateSpanTransforms.concat(t.dateSpanTransforms),views:Object.assign(Object.assign({},e.views),t.views),viewPropsTransformers:e.viewPropsTransformers.concat(t.viewPropsTransformers),isPropsValid:t.isPropsValid||e.isPropsValid,externalDefTransforms:e.externalDefTransforms.concat(t.externalDefTransforms),viewContainerAppends:e.viewContainerAppends.concat(t.viewContainerAppends),eventDropTransformers:e.eventDropTransformers.concat(t.eventDropTransformers),calendarInteractions:e.calendarInteractions.concat(t.calendarInteractions),componentInteractions:e.componentInteractions.concat(t.componentInteractions),themeClasses:Object.assign(Object.assign({},e.themeClasses),t.themeClasses),eventSourceDefs:e.eventSourceDefs.concat(t.eventSourceDefs),cmdFormatter:t.cmdFormatter||e.cmdFormatter,recurringTypes:e.recurringTypes.concat(t.recurringTypes),namedTimeZonedImpl:t.namedTimeZonedImpl||e.namedTimeZonedImpl,initialView:e.initialView||t.initialView,elementDraggingImpl:e.elementDraggingImpl||t.elementDraggingImpl,optionChangeHandlers:Object.assign(Object.assign({},e.optionChangeHandlers),t.optionChangeHandlers),scrollGridImpl:t.scrollGridImpl||e.scrollGridImpl,listenerRefiners:Object.assign(Object.assign({},e.listenerRefiners),t.listenerRefiners),optionRefiners:Object.assign(Object.assign({},e.optionRefiners),t.optionRefiners),propSetHandlers:Object.assign(Object.assign({},e.propSetHandlers),t.propSetHandlers)}}function PP(e,t){return e===void 0?t:t===void 0?e:new Date(Math.max(e.valueOf(),t.valueOf()))}var FP=class extends LA{};FP.prototype.classes={root:`fc-theme-standard`,tableCellShaded:`fc-cell-shaded`,buttonGroup:`fc-button-group`,button:`fc-button fc-button-primary`,buttonActive:`fc-button-active`},FP.prototype.baseIconClass=`fc-icon`,FP.prototype.iconClasses={close:`fc-icon-x`,prev:`fc-icon-chevron-left`,next:`fc-icon-chevron-right`,prevYear:`fc-icon-chevrons-left`,nextYear:`fc-icon-chevrons-right`},FP.prototype.rtlIconClasses={prev:`fc-icon-chevron-right`,next:`fc-icon-chevron-left`,prevYear:`fc-icon-chevrons-right`,nextYear:`fc-icon-chevrons-left`},FP.prototype.iconOverrideOption=`buttonIcons`,FP.prototype.iconOverrideCustomButtonOption=`icon`,FP.prototype.iconOverridePrefix=`fc-icon-`;function IP(e,t){let n={},r;for(r in e)LP(r,n,e,t);for(r in t)LP(r,n,e,t);return n}function LP(e,t,n,r){if(t[e])return t[e];let i=RP(e,t,n,r);return i&&(t[e]=i),i}function RP(e,t,n,r){let i=n[e],a=r[e],o=e=>i&&i[e]!==null?i[e]:a&&a[e]!==null?a[e]:null,s=o(`component`),c=o(`superType`),l=null;if(c){if(c===e)throw Error(`Can't have a custom view type that references itself`);l=LP(c,t,n,r)}return!s&&l&&(s=l.component),s?{type:e,component:s,defaults:Object.assign(Object.assign({},l?l.defaults:{}),i?i.rawOptions:{}),overrides:Object.assign(Object.assign({},l?l.overrides:{}),a?a.rawOptions:{})}:null}function zP(e){return xA(e,BP)}function BP(e){let t=typeof e==`function`?{component:e}:e,{component:n}=t;return t.content?n=VP(t):n&&!(n.prototype instanceof GA)&&(n=VP(Object.assign(Object.assign({},t),{content:n}))),{superType:t.type,component:n,rawOptions:t}}function VP(e){return t=>Q(HA.Consumer,null,n=>Q(ej,{elTag:`div`,elClasses:ij(n.viewSpec),renderProps:Object.assign(Object.assign({},t),{nextDayThreshold:n.options.nextDayThreshold}),generatorName:void 0,customGenerator:e.content,classNameGenerator:e.classNames,didMount:e.didMount,willUnmount:e.willUnmount}))}function HP(e,t,n,r){let i=zP(e),a=zP(t.views);return xA(IP(i,a),e=>UP(e,a,t,n,r))}function UP(e,t,n,r,i){let a=e.overrides.duration||e.defaults.duration||r.duration||n.duration,o=null,s=``,c=``,l={};if(a&&(o=GP(a),o)){let e=sk(o);s=e.unit,e.value===1&&(c=s,l=t[s]?t[s].rawOptions:{})}let u=t=>{let n=t.buttonText||{},r=e.defaults.buttonTextKey;return r!=null&&n[r]!=null?n[r]:n[e.type]==null?n[c]==null?null:n[c]:n[e.type]},d=t=>{let n=t.buttonHints||{},r=e.defaults.buttonTextKey;return r!=null&&n[r]!=null?n[r]:n[e.type]==null?n[c]==null?null:n[c]:n[e.type]};return{type:e.type,component:e.component,duration:o,durationUnit:s,singleUnit:c,optionDefaults:e.defaults,optionOverrides:Object.assign(Object.assign({},l),e.overrides),buttonTextOverride:u(r)||u(n)||e.overrides.buttonText,buttonTextDefault:u(i)||e.defaults.buttonText||u(lA)||e.type,buttonTitleOverride:d(r)||d(n)||e.overrides.buttonHint,buttonTitleDefault:d(i)||e.defaults.buttonHint||d(lA)}}var WP={};function GP(e){let t=JSON.stringify(e),n=WP[t];return n===void 0&&(n=QO(e),WP[t]=n),n}function KP(e,t){return t.type===`CHANGE_VIEW_TYPE`&&(e=t.viewType),e}function qP(e,t){switch(t.type){case`CHANGE_DATE`:return t.dateMarker;default:return e}}function JP(e,t,n){let r=e.initialDate;return r==null?n.getDateMarker():t.createMarker(r)}function YP(e,t){switch(t.type){case`SET_OPTION`:return Object.assign(Object.assign({},e),{[t.optionName]:t.rawOptionValue});default:return e}}function XP(e,t,n,r){let i;switch(t.type){case`CHANGE_VIEW_TYPE`:return r.build(t.dateMarker||n);case`CHANGE_DATE`:return r.build(t.dateMarker);case`PREV`:if(i=r.buildPrev(e,n),i.isValid)return i;break;case`NEXT`:if(i=r.buildNext(e,n),i.isValid)return i}return e}function ZP(e,t,n){let r=t?t.activeRange:null;return tF({},lF(e,n),r,n)}function QP(e,t,n,r){let i=n?n.activeRange:null;switch(t.type){case`ADD_EVENT_SOURCES`:return tF(e,t.sources,i,r);case`REMOVE_EVENT_SOURCE`:return nF(e,t.sourceId);case`PREV`:case`NEXT`:case`CHANGE_DATE`:case`CHANGE_VIEW_TYPE`:return n?rF(e,i,r):e;case`FETCH_EVENT_SOURCES`:return aF(e,t.sourceIds?SA(t.sourceIds):cF(e,r),i,t.isRefetch||!1,r);case`RECEIVE_EVENTS`:case`RECEIVE_EVENT_ERROR`:return sF(e,t.sourceId,t.fetchId,t.fetchRange);case`REMOVE_ALL_EVENT_SOURCES`:return{};default:return e}}function $P(e,t,n){let r=t?t.activeRange:null;return aF(e,cF(e,n),r,!0,n)}function eF(e){for(let t in e)if(e[t].isFetching)return!0;return!1}function tF(e,t,n,r){let i={};for(let e of t)i[e.sourceId]=e;return n&&(i=rF(i,n,r)),Object.assign(Object.assign({},e),i)}function nF(e,t){return bA(e,e=>e.sourceId!==t)}function rF(e,t,n){return aF(e,bA(e,e=>iF(e,t,n)),t,!1,n)}function iF(e,t,n){return uF(e,n)?!n.options.lazyFetching||!e.fetchRange||e.isFetching||t.start<e.fetchRange.start||t.end>e.fetchRange.end:!e.latestFetchId}function aF(e,t,n,r,i){let a={};for(let o in e){let s=e[o];a[o]=t[o]?oF(s,n,r,i):s}return a}function oF(e,t,n,r){let{options:i,calendarApi:a}=r,o=r.pluginHooks.eventSourceDefs[e.sourceDefId],s=HO();return o.fetch({eventSource:e,range:t,isRefetch:n,context:r},n=>{let{rawEvents:o}=n;i.eventSourceSuccess&&(o=i.eventSourceSuccess.call(a,o,n.response)||o),e.success&&(o=e.success.call(a,o,n.response)||o),r.dispatch({type:`RECEIVE_EVENTS`,sourceId:e.sourceId,fetchId:s,fetchRange:t,rawEvents:o})},n=>{let o=!1;i.eventSourceFailure&&(i.eventSourceFailure.call(a,n),o=!0),e.failure&&(e.failure(n),o=!0),o||console.warn(n.message,n),r.dispatch({type:`RECEIVE_EVENT_ERROR`,sourceId:e.sourceId,fetchId:s,fetchRange:t,error:n})}),Object.assign(Object.assign({},e),{isFetching:!0,latestFetchId:s})}function sF(e,t,n,r){let i=e[t];return i&&n===i.latestFetchId?Object.assign(Object.assign({},e),{[t]:Object.assign(Object.assign({},i),{isFetching:!1,fetchRange:r})}):e}function cF(e,t){return bA(e,e=>uF(e,t))}function lF(e,t){let n=Kj(t),r=[].concat(e.eventSources||[]),i=[];e.initialEvents&&r.unshift(e.initialEvents),e.events&&r.unshift(e.events);for(let e of r){let r=Gj(e,t,n);r&&i.push(r)}return i}function uF(e,t){return!t.pluginHooks.eventSourceDefs[e.sourceDefId].ignoreRange}function dF(e,t){switch(t.type){case`UNSELECT_DATES`:return null;case`SELECT_DATES`:return t.selection;default:return e}}function fF(e,t){switch(t.type){case`UNSELECT_EVENT`:return``;case`SELECT_EVENT`:return t.eventInstanceId;default:return e}}function pF(e,t){let n;switch(t.type){case`UNSET_EVENT_DRAG`:return null;case`SET_EVENT_DRAG`:return n=t.state,{affectedEvents:n.affectedEvents,mutatedEvents:n.mutatedEvents,isEvent:n.isEvent};default:return e}}function mF(e,t){let n;switch(t.type){case`UNSET_EVENT_RESIZE`:return null;case`SET_EVENT_RESIZE`:return n=t.state,{affectedEvents:n.affectedEvents,mutatedEvents:n.mutatedEvents,isEvent:n.isEvent};default:return e}}function hF(e,t,n,r,i){return{header:e.headerToolbar?gF(e.headerToolbar,e,t,n,r,i):null,footer:e.footerToolbar?gF(e.footerToolbar,e,t,n,r,i):null}}function gF(e,t,n,r,i,a){let o={},s=[],c=!1;for(let l in e){let u=e[l],d=_F(u,t,n,r,i,a);o[l]=d.widgets,s.push(...d.viewsWithButtons),c||=d.hasTitle}return{sectionWidgets:o,viewsWithButtons:s,hasTitle:c}}function _F(e,t,n,r,i,a){let o=t.direction===`rtl`,s=t.customButtons||{},c=n.buttonText||{},l=t.buttonText||{},u=n.buttonHints||{},d=t.buttonHints||{},f=e?e.split(` `):[],p=[],m=!1;return{widgets:f.map(e=>e.split(`,`).map(e=>{if(e===`title`)return m=!0,{buttonName:e};let n,f,h,g,_,v;if(n=s[e])h=e=>{n.click&&n.click.call(e.target,e,e.target)},(g=r.getCustomButtonIconClass(n))||(g=r.getIconClass(e,o))||(_=n.text),v=n.hint||n.text;else if(f=i[e]){p.push(e),h=()=>{a.changeView(e)},(_=f.buttonTextOverride)||(g=r.getIconClass(e,o))||(_=f.buttonTextDefault);let n=f.buttonTextOverride||f.buttonTextDefault;v=JO(f.buttonTitleOverride||f.buttonTitleDefault||t.viewHint,[n,e],n)}else if(a[e]){if(h=()=>{a[e]()},(_=c[e])||(g=r.getIconClass(e,o))||(_=l[e]),e===`prevYear`||e===`nextYear`){let t=e===`prevYear`?`prev`:`next`;v=JO(u[t]||d[t],[l.year||`year`,`year`],l[e])}else v=t=>JO(u[e]||d[e],[l[t]||t,t],l[e])}return{buttonName:e,buttonClick:h,buttonIcon:g,buttonText:_,buttonHint:v}})),viewsWithButtons:p,hasTitle:m}}var vF=class{constructor(e,t,n){this.type=e,this.getCurrentData=t,this.dateEnv=n}get calendar(){return this.getCurrentData().calendarApi}get title(){return this.getCurrentData().viewTitle}get activeStart(){return this.dateEnv.toDate(this.getCurrentData().dateProfile.activeRange.start)}get activeEnd(){return this.dateEnv.toDate(this.getCurrentData().dateProfile.activeRange.end)}get currentStart(){return this.dateEnv.toDate(this.getCurrentData().dateProfile.currentRange.start)}get currentEnd(){return this.dateEnv.toDate(this.getCurrentData().dateProfile.currentRange.end)}getOption(e){return this.getCurrentData().options[e]}},yF=AP({name:`array-event-source`,eventSourceDefs:[{ignoreRange:!0,parseMeta(e){return Array.isArray(e.events)?e.events:null},fetch(e,t){t({rawEvents:e.eventSource.meta})}}]}),bF=AP({name:`func-event-source`,eventSourceDefs:[{parseMeta(e){return typeof e.events==`function`?e.events:null},fetch(e,t,n){let{dateEnv:r}=e.context,i=e.eventSource.meta;HM(i.bind(null,zM(e.range,r)),e=>t({rawEvents:e}),n)}}]}),xF=AP({name:`json-event-source`,eventSourceRefiners:{method:String,extraParams:$,startParam:String,endParam:String,timeZoneParam:String},eventSourceDefs:[{parseMeta(e){return e.url&&(e.format===`json`||!e.format)?{url:e.url,format:`json`,method:(e.method||`GET`).toUpperCase(),extraParams:e.extraParams,startParam:e.startParam,endParam:e.endParam,timeZoneParam:e.timeZoneParam}:null},fetch(e,t,n){let{meta:r}=e.eventSource,i=SF(r,e.range,e.context);WM(r.method,r.url,i).then(([e,n])=>{t({rawEvents:e,response:n})},n)}}]});function SF(e,t,n){let{dateEnv:r,options:i}=n,a,o,s,c,l={};return a=e.startParam,a??=i.startParam,o=e.endParam,o??=i.endParam,s=e.timeZoneParam,s??=i.timeZoneParam,c=typeof e.extraParams==`function`?e.extraParams():e.extraParams||{},Object.assign(l,c),l[a]=r.formatIso(t.start),l[o]=r.formatIso(t.end),r.timeZone!==`local`&&(l[s]=r.timeZone),l}var CF=AP({name:`simple-recurring-event`,recurringTypes:[{parse(e,t){if(e.daysOfWeek||e.startTime||e.endTime||e.startRecur||e.endRecur){let n={daysOfWeek:e.daysOfWeek||null,startTime:e.startTime||null,endTime:e.endTime||null,startRecur:e.startRecur?t.createMarker(e.startRecur):null,endRecur:e.endRecur?t.createMarker(e.endRecur):null,dateEnv:t},r;return e.duration&&(r=e.duration),!r&&e.startTime&&e.endTime&&(r=nk(e.endTime,e.startTime)),{allDayGuess:!e.startTime&&!e.endTime,duration:r,typeData:n}}return null},expand(e,t,n){let r=cj(t,{start:e.startRecur,end:e.endRecur});return r?wF(e.daysOfWeek,e.startTime,e.dateEnv,n,r):[]}}],eventRefiners:{daysOfWeek:$,startTime:QO,endTime:QO,duration:QO,startRecur:$,endRecur:$}});function wF(e,t,n,r,i){let a=e?SA(e):null,o=xk(i.start),s=i.end,c=[];for(t&&(t.milliseconds<0?s=dk(s,1):t.milliseconds>=864e5&&(o=dk(o,-1)));o<s;){let e;(!a||a[o.getUTCDay()])&&(e=t?r.add(o,t):o,c.push(r.createMarker(n.toDate(e)))),o=dk(o,1)}return c}var TF=AP({name:`change-handler`,optionChangeHandlers:{events(e,t){EF([e],t)},eventSources:EF}});function EF(e,t){let n=CA(t.getCurrentData().eventSources);if(n.length===1&&e.length===1&&Array.isArray(n[0]._raw)&&Array.isArray(e[0])){t.dispatch({type:`RESET_RAW_EVENTS`,sourceId:n[0].sourceId,rawEvents:e[0]});return}let r=[];for(let t of e){let e=!1;for(let r=0;r<n.length;r+=1)if(n[r]._raw===t){n.splice(r,1),e=!0;break}e||r.push(t)}for(let e of n)t.dispatch({type:`REMOVE_EVENT_SOURCE`,sourceId:e.sourceId});for(let e of r)t.calendarApi.addEventSource(e)}function DF(e,t){t.emitter.trigger(`datesSet`,Object.assign(Object.assign({},zM(e.activeRange,t.dateEnv)),{view:t.viewApi}))}function OF(e,t){let{emitter:n}=t;n.hasHandlers(`eventsSet`)&&n.trigger(`eventsSet`,yM(e,t))}var kF=[yF,bF,xF,CF,TF,AP({name:`misc`,isLoadingFuncs:[e=>eF(e.eventSources)],propSetHandlers:{dateProfile:DF,eventStore:OF}})],AF=class{constructor(e,t){this.runTaskOption=e,this.drainedOption=t,this.queue=[],this.delayedRunner=new TO(this.drain.bind(this))}request(e,t){this.queue.push(e),this.delayedRunner.request(t)}pause(e){this.delayedRunner.pause(e)}resume(e,t){this.delayedRunner.resume(e,t)}drain(){let{queue:e}=this;for(;e.length;){let t=[],n;for(;n=e.shift();)this.runTask(n),t.push(n);this.drained(t)}}runTask(e){this.runTaskOption&&this.runTaskOption(e)}drained(e){this.drainedOption&&this.drainedOption(e)}};function jF(e,t,n){let r;return r=/^(year|month)$/.test(e.currentRangeUnit)?e.currentRange:e.activeRange,n.formatRange(r.start,r.end,sA(t.titleFormat||MF(e)),{isEndExclusive:e.isRangeAllDay,defaultSeparator:t.titleRangeSeparator})}function MF(e){let{currentRangeUnit:t}=e;if(t===`year`)return{year:`numeric`};if(t===`month`)return{year:`numeric`,month:`long`};let n=bk(e.currentRange.start,e.currentRange.end);return n!==null&&n>1?{year:`numeric`,month:`short`,day:`numeric`}:{year:`numeric`,month:`long`,day:`numeric`}}var NF=class{constructor(){this.resetListeners=new Set}handleInput(e,t){let n=this.dateEnv;if(e!==n&&(typeof t==`function`?this.nowFn=t:n||(this.nowAnchorDate=e.toDate(t?e.createMarker(t):e.createNowMarker()),this.nowAnchorQueried=Date.now()),this.dateEnv=e,n))for(let e of this.resetListeners.values())e()}getDateMarker(){return this.nowAnchorDate?this.dateEnv.timestampToMarker(this.nowAnchorDate.valueOf()+(Date.now()-this.nowAnchorQueried)):this.dateEnv.createMarker(this.nowFn())}addResetListener(e){this.resetListeners.add(e)}removeResetListener(e){this.resetListeners.delete(e)}},PF=class{constructor(e){this.computeCurrentViewData=Rk(this._computeCurrentViewData),this.organizeRawLocales=Rk(TP),this.buildLocale=Rk(EP),this.buildPluginHooks=MP(),this.buildDateEnv=Rk(FF),this.buildTheme=Rk(IF),this.parseToolbars=Rk(hF),this.buildViewSpecs=Rk(HP),this.buildDateProfileGenerator=zk(LF),this.buildViewApi=Rk(RF),this.buildViewUiProps=zk(VF),this.buildEventUiBySource=Rk(zF,wA),this.buildEventUiBases=Rk(BF),this.parseContextBusinessHours=zk(UF),this.buildTitle=Rk(jF),this.nowManager=new NF,this.emitter=new rM,this.actionRunner=new AF(this._handleAction.bind(this),this.updateData.bind(this)),this.currentCalendarOptionsInput={},this.currentCalendarOptionsRefined={},this.currentViewOptionsInput={},this.currentViewOptionsRefined={},this.currentCalendarOptionsRefiners={},this.optionsForRefining=[],this.optionsForHandling=[],this.getCurrentData=()=>this.data,this.dispatch=e=>{this.actionRunner.request(e)},this.props=e,this.actionRunner.pause(),this.nowManager=new NF;let t={},n=this.computeOptionsData(e.optionOverrides,t,e.calendarApi),r=n.calendarOptions.initialView||n.pluginHooks.initialView,i=this.computeCurrentViewData(r,n,e.optionOverrides,t);e.calendarApi.currentDataManager=this,this.emitter.setThisContext(e.calendarApi),this.emitter.setOptions(i.options);let a={nowManager:this.nowManager,dateEnv:n.dateEnv,options:n.calendarOptions,pluginHooks:n.pluginHooks,calendarApi:e.calendarApi,dispatch:this.dispatch,emitter:this.emitter,getCurrentData:this.getCurrentData},o=JP(n.calendarOptions,n.dateEnv,this.nowManager),s=i.dateProfileGenerator.build(o);uj(s.activeRange,o)||(o=s.currentRange.start);for(let e of n.pluginHooks.contextInit)e(a);let c=ZP(n.calendarOptions,s,a),l={dynamicOptionOverrides:t,currentViewType:r,currentDate:o,dateProfile:s,businessHours:this.parseContextBusinessHours(a),eventSources:c,eventUiBases:{},eventStore:Nj(),renderableEventStore:Nj(),dateSelection:null,eventSelection:``,eventDrag:null,eventResize:null,selectionConfig:this.buildViewUiProps(a).selectionConfig},u=Object.assign(Object.assign({},a),l);for(let e of n.pluginHooks.reducers)Object.assign(l,e(null,null,u));HF(l,a)&&this.emitter.trigger(`loading`,!0),this.state=l,this.updateData(),this.actionRunner.resume()}resetOptions(e,t){let{props:n}=this;t===void 0?n.optionOverrides=e:(n.optionOverrides=Object.assign(Object.assign({},n.optionOverrides||{}),e),this.optionsForRefining.push(...t)),(t===void 0||t.length)&&this.actionRunner.request({type:`NOTHING`})}_handleAction(e){let{props:t,state:n,emitter:r}=this,i=YP(n.dynamicOptionOverrides,e),a=this.computeOptionsData(t.optionOverrides,i,t.calendarApi),o=KP(n.currentViewType,e),s=this.computeCurrentViewData(o,a,t.optionOverrides,i);t.calendarApi.currentDataManager=this,r.setThisContext(t.calendarApi),r.setOptions(s.options);let c={nowManager:this.nowManager,dateEnv:a.dateEnv,options:a.calendarOptions,pluginHooks:a.pluginHooks,calendarApi:t.calendarApi,dispatch:this.dispatch,emitter:r,getCurrentData:this.getCurrentData},{currentDate:l,dateProfile:u}=n;this.data&&this.data.dateProfileGenerator!==s.dateProfileGenerator&&(u=s.dateProfileGenerator.build(l)),l=qP(l,e),u=XP(u,e,l,s.dateProfileGenerator),e.type!==`PREV`&&e.type!==`NEXT`&&uj(u.currentRange,l)||(l=u.currentRange.start);let d=QP(n.eventSources,e,u,c),f=Jj(n.eventStore,e,d,u,c),p=eF(d)&&!s.options.progressiveEventRendering&&n.renderableEventStore||f,{eventUiSingleBase:m,selectionConfig:h}=this.buildViewUiProps(c),g=this.buildEventUiBySource(d),_=this.buildEventUiBases(p.defs,m,g),v={dynamicOptionOverrides:i,currentViewType:o,currentDate:l,dateProfile:u,eventSources:d,eventStore:f,renderableEventStore:p,selectionConfig:h,eventUiBases:_,businessHours:this.parseContextBusinessHours(c),dateSelection:dF(n.dateSelection,e),eventSelection:fF(n.eventSelection,e),eventDrag:pF(n.eventDrag,e),eventResize:mF(n.eventResize,e)},y=Object.assign(Object.assign({},c),v);for(let t of a.pluginHooks.reducers)Object.assign(v,t(n,e,y));let b=HF(n,c),x=HF(v,c);!b&&x?r.trigger(`loading`,!0):b&&!x&&r.trigger(`loading`,!1),this.state=v,t.onAction&&t.onAction(e)}updateData(){let{props:e,state:t}=this,n=this.data,r=this.computeOptionsData(e.optionOverrides,t.dynamicOptionOverrides,e.calendarApi),i=this.computeCurrentViewData(t.currentViewType,r,e.optionOverrides,t.dynamicOptionOverrides),a=this.data=Object.assign(Object.assign(Object.assign({nowManager:this.nowManager,viewTitle:this.buildTitle(t.dateProfile,i.options,r.dateEnv),calendarApi:e.calendarApi,dispatch:this.dispatch,emitter:this.emitter,getCurrentData:this.getCurrentData},r),i),t),o=r.pluginHooks.optionChangeHandlers,s=n&&n.calendarOptions,c=r.calendarOptions;if(s&&s!==c){s.timeZone!==c.timeZone&&(t.eventSources=a.eventSources=$P(a.eventSources,t.dateProfile,a),t.eventStore=a.eventStore=eM(a.eventStore,n.dateEnv,a.dateEnv),t.renderableEventStore=a.renderableEventStore=eM(a.renderableEventStore,n.dateEnv,a.dateEnv));for(let e in o)(this.optionsForHandling.indexOf(e)!==-1||s[e]!==c[e])&&o[e](c[e],a)}this.optionsForHandling=[],e.onData&&e.onData(a)}computeOptionsData(e,t,n){if(!this.optionsForRefining.length&&e===this.stableOptionOverrides&&t===this.stableDynamicOptionOverrides)return this.stableCalendarOptionsData;let{refinedOptions:r,pluginHooks:i,localeDefaults:a,availableLocaleData:o,extra:s}=this.processRawCalendarOptions(e,t);WF(s);let c=this.buildDateEnv(r.timeZone,r.locale,r.weekNumberCalculation,r.firstDay,r.weekText,i,o,r.defaultRangeSeparator),l=this.buildViewSpecs(i.views,this.stableOptionOverrides,this.stableDynamicOptionOverrides,a),u=this.buildTheme(r,i),d=this.parseToolbars(r,this.stableOptionOverrides,u,l,n);return this.stableCalendarOptionsData={calendarOptions:r,pluginHooks:i,dateEnv:c,viewSpecs:l,theme:u,toolbarConfig:d,localeDefaults:a,availableRawLocales:o.map}}processRawCalendarOptions(e,t){let{locales:n,locale:r}=gA([lA,e,t]),i=this.organizeRawLocales(n),a=i.map,o=this.buildLocale(r||i.defaultCode,a).options,s=this.buildPluginHooks(e.plugins||[],kF),c=this.currentCalendarOptionsRefiners=Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},cA),uA),dA),s.listenerRefiners),s.optionRefiners),l={},u=gA([lA,o,e,t]),d={},f=this.currentCalendarOptionsInput,p=this.currentCalendarOptionsRefined,m=!1;for(let e in u)this.optionsForRefining.indexOf(e)===-1&&(u[e]===f[e]||fA[e]&&e in f&&fA[e](f[e],u[e]))?d[e]=p[e]:c[e]?(d[e]=c[e](u[e]),m=!0):l[e]=f[e];return m&&(this.currentCalendarOptionsInput=u,this.currentCalendarOptionsRefined=d,this.stableOptionOverrides=e,this.stableDynamicOptionOverrides=t),this.optionsForHandling.push(...this.optionsForRefining),this.optionsForRefining=[],{rawOptions:this.currentCalendarOptionsInput,refinedOptions:this.currentCalendarOptionsRefined,pluginHooks:s,availableLocaleData:i,localeDefaults:o,extra:l}}_computeCurrentViewData(e,t,n,r){let i=t.viewSpecs[e];if(!i)throw Error(`viewType "${e}" is not available. Please make sure you've loaded all neccessary plugins`);let{refinedOptions:a,extra:o}=this.processRawViewOptions(i,t.pluginHooks,t.localeDefaults,n,r);return WF(o),this.nowManager.handleInput(t.dateEnv,a.now),{viewSpec:i,options:a,dateProfileGenerator:this.buildDateProfileGenerator({dateProfileGeneratorClass:i.optionDefaults.dateProfileGeneratorClass,nowManager:this.nowManager,duration:i.duration,durationUnit:i.durationUnit,usesMinMaxTime:i.optionDefaults.usesMinMaxTime,dateEnv:t.dateEnv,calendarApi:this.props.calendarApi,slotMinTime:a.slotMinTime,slotMaxTime:a.slotMaxTime,showNonCurrentDates:a.showNonCurrentDates,dayCount:a.dayCount,dateAlignment:a.dateAlignment,dateIncrement:a.dateIncrement,hiddenDays:a.hiddenDays,weekends:a.weekends,validRangeInput:a.validRange,visibleRangeInput:a.visibleRange,fixedWeekCount:a.fixedWeekCount}),viewApi:this.buildViewApi(e,this.getCurrentData,t.dateEnv)}}processRawViewOptions(e,t,n,r,i){let a=gA([lA,e.optionDefaults,n,r,e.optionOverrides,i]),o=Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},cA),uA),dA),hA),t.listenerRefiners),t.optionRefiners),s={},c=this.currentViewOptionsInput,l=this.currentViewOptionsRefined,u=!1,d={};for(let e in a)a[e]===c[e]||fA[e]&&fA[e](a[e],c[e])?s[e]=l[e]:(a[e]===this.currentCalendarOptionsInput[e]||fA[e]&&fA[e](a[e],this.currentCalendarOptionsInput[e])?e in this.currentCalendarOptionsRefined&&(s[e]=this.currentCalendarOptionsRefined[e]):o[e]?s[e]=o[e](a[e]):d[e]=a[e],u=!0);return u&&(this.currentViewOptionsInput=a,this.currentViewOptionsRefined=s),{rawOptions:this.currentViewOptionsInput,refinedOptions:this.currentViewOptionsRefined,extra:d}}};function FF(e,t,n,r,i,a,o,s){let c=EP(t||o.defaultCode,o.map);return new IA({calendarSystem:`gregory`,timeZone:e,namedTimeZoneImpl:a.namedTimeZonedImpl,locale:c,weekNumberCalculation:n,firstDay:r,weekText:i,cmdFormatter:a.cmdFormatter,defaultSeparator:s})}function IF(e,t){return new(t.themeClasses[e.themeSystem]||FP)(e)}function LF(e){return new(e.dateProfileGeneratorClass||hj)(e)}function RF(e,t,n){return new vF(e,t,n)}function zF(e){return xA(e,e=>e.ui)}function BF(e,t,n){let r={"":t};for(let t in e){let i=e[t];i.sourceId&&n[i.sourceId]&&(r[t]=n[i.sourceId])}return r}function VF(e){let{options:t}=e;return{eventUiSingleBase:Vj({display:t.eventDisplay,editable:t.editable,startEditable:t.eventStartEditable,durationEditable:t.eventDurationEditable,constraint:t.eventConstraint,overlap:typeof t.eventOverlap==`boolean`?t.eventOverlap:void 0,allow:t.eventAllow,backgroundColor:t.eventBackgroundColor,borderColor:t.eventBorderColor,textColor:t.eventTextColor,color:t.eventColor},e),selectionConfig:Vj({constraint:t.selectConstraint,overlap:typeof t.selectOverlap==`boolean`?t.selectOverlap:void 0,allow:t.selectAllow},e)}}function HF(e,t){for(let n of t.pluginHooks.isLoadingFuncs)if(n(e))return!0;return!1}function UF(e){return sM(e.options.businessHours,e)}function WF(e,t){for(let n in e)console.warn(`Unknown option '${n}'`+(t?` for view '${t}'`:``))}var GF=class extends GA{render(){return Q(`div`,{className:`fc-toolbar-chunk`},...this.props.widgetGroups.map(e=>this.renderWidgetGroup(e)))}renderWidgetGroup(e){let{props:t}=this,{theme:n}=this.context,r=[],i=!0;for(let a of e){let{buttonName:e,buttonClick:o,buttonText:s,buttonIcon:c,buttonHint:l}=a;if(e===`title`)i=!1,r.push(Q(`h2`,{className:`fc-toolbar-title`,id:t.titleId},t.title));else{let i=e===t.activeButton,a=!t.isTodayEnabled&&e===`today`||!t.isPrevEnabled&&e===`prev`||!t.isNextEnabled&&e===`next`,u=[`fc-${e}-button`,n.getClass(`button`)];i&&u.push(n.getClass(`buttonActive`)),r.push(Q(`button`,{type:`button`,title:typeof l==`function`?l(t.navUnit):l,disabled:a,"aria-pressed":i,className:u.join(` `),onClick:o},s||(c?Q(`span`,{className:c,role:`img`}):``)))}}return r.length>1?Q(`div`,{className:i&&n.getClass(`buttonGroup`)||``},...r):r[0]}},KF=class extends GA{render(){let{model:e,extraClassName:t}=this.props,n=!1,r,i,a=e.sectionWidgets,o=a.center;return a.left?(n=!0,r=a.left):r=a.start,a.right?(n=!0,i=a.right):i=a.end,Q(`div`,{className:[t||``,`fc-toolbar`,n?`fc-toolbar-ltr`:``].join(` `)},this.renderSection(`start`,r||[]),this.renderSection(`center`,o||[]),this.renderSection(`end`,i||[]))}renderSection(e,t){let{props:n}=this;return Q(GF,{key:e,widgetGroups:t,title:n.title,navUnit:n.navUnit,activeButton:n.activeButton,isTodayEnabled:n.isTodayEnabled,isPrevEnabled:n.isPrevEnabled,isNextEnabled:n.isNextEnabled,titleId:n.titleId})}},qF=class extends GA{constructor(){super(...arguments),this.state={availableWidth:null},this.handleEl=e=>{this.el=e,JA(this.props.elRef,e),this.updateAvailableWidth()},this.handleResize=()=>{this.updateAvailableWidth()}}render(){let{props:e,state:t}=this,{aspectRatio:n}=e,r=[`fc-view-harness`,n||e.liquid||e.height?`fc-view-harness-active`:`fc-view-harness-passive`],i=``,a=``;return n?t.availableWidth===null?a=`${1/n*100}%`:i=t.availableWidth/n:i=e.height||``,Q(`div`,{"aria-labelledby":e.labeledById,ref:this.handleEl,className:r.join(` `),style:{height:i,paddingBottom:a}},e.children)}componentDidMount(){this.context.addResizeHandler(this.handleResize)}componentWillUnmount(){this.context.removeResizeHandler(this.handleResize)}updateAvailableWidth(){this.el&&this.props.aspectRatio&&this.setState({availableWidth:this.el.offsetWidth})}},JF=class extends YM{constructor(e){super(e),this.handleSegClick=(e,t)=>{let{component:n}=this,{context:r}=n,i=SM(t);if(i&&n.isValidSegDownEl(e.target)){let a=DO(e.target,`.fc-event-forced-url`),o=a?a.querySelector(`a[href]`).href:``;r.emitter.trigger(`eventClick`,{el:t,event:new _M(n.context,i.eventRange.def,i.eventRange.instance),jsEvent:e,view:r.viewApi}),o&&!e.defaultPrevented&&(window.location.href=o)}},this.destroy=LO(e.el,`click`,`.fc-event`,this.handleSegClick)}},YF=class extends YM{constructor(e){super(e),this.handleEventElRemove=e=>{e===this.currentSegEl&&this.handleSegLeave(null,this.currentSegEl)},this.handleSegEnter=(e,t)=>{SM(t)&&(this.currentSegEl=t,this.triggerEvent(`eventMouseEnter`,e,t))},this.handleSegLeave=(e,t)=>{this.currentSegEl&&(this.currentSegEl=null,this.triggerEvent(`eventMouseLeave`,e,t))},this.removeHoverListeners=RO(e.el,`.fc-event`,this.handleSegEnter,this.handleSegLeave)}destroy(){this.removeHoverListeners()}triggerEvent(e,t,n){let{component:r}=this,{context:i}=r,a=SM(n);(!t||r.isValidSegDownEl(t.target))&&i.emitter.trigger(e,{el:n,event:new _M(i,a.eventRange.def,a.eventRange.instance),jsEvent:t,view:i.viewApi})}},XF=class extends WA{constructor(){super(...arguments),this.buildViewContext=Rk(UA),this.buildViewPropTransformers=Rk(QF),this.buildToolbarProps=Rk(ZF),this.headerRef=nD(),this.footerRef=nD(),this.interactionsStore={},this.state={viewLabelId:FO()},this.registerInteractiveComponent=(e,t)=>{let n=XM(e,t),r=[JF,YF].concat(this.props.pluginHooks.componentInteractions).map(e=>new e(n));this.interactionsStore[e.uid]=r,ZM[e.uid]=n},this.unregisterInteractiveComponent=e=>{let t=this.interactionsStore[e.uid];if(t){for(let e of t)e.destroy();delete this.interactionsStore[e.uid]}delete ZM[e.uid]},this.resizeRunner=new TO(()=>{this.props.emitter.trigger(`_resize`,!0),this.props.emitter.trigger(`windowResize`,{view:this.props.viewApi})}),this.handleWindowResize=e=>{let{options:t}=this.props;t.handleWindowResize&&e.target===window&&this.resizeRunner.request(t.windowResizeDelay)}}render(){let{props:e}=this,{toolbarConfig:t,options:n}=e,r=!1,i=``,a;e.isHeightAuto||e.forPrint?i=``:n.height==null?n.contentHeight==null?a=Math.max(n.aspectRatio,.5):i=n.contentHeight:r=!0;let o=this.buildViewContext(e.viewSpec,e.viewApi,e.options,e.dateProfileGenerator,e.dateEnv,e.nowManager,e.theme,e.pluginHooks,e.dispatch,e.getCurrentData,e.emitter,e.calendarApi,this.registerInteractiveComponent,this.unregisterInteractiveComponent),s=t.header&&t.header.hasTitle?this.state.viewLabelId:void 0;return Q(HA.Provider,{value:o},Q(QM,{unit:`day`},n=>{let o=this.buildToolbarProps(e.viewSpec,e.dateProfile,e.dateProfileGenerator,e.currentDate,n,e.viewTitle);return Q(rD,null,t.header&&Q(KF,Object.assign({ref:this.headerRef,extraClassName:`fc-header-toolbar`,model:t.header,titleId:s},o)),Q(qF,{liquid:r,height:i,aspectRatio:a,labeledById:s},this.renderView(e),this.buildAppendContent()),t.footer&&Q(KF,Object.assign({ref:this.footerRef,extraClassName:`fc-footer-toolbar`,model:t.footer,titleId:``},o)))}))}componentDidMount(){let{props:e}=this;this.calendarInteractions=e.pluginHooks.calendarInteractions.map(t=>new t(e)),window.addEventListener(`resize`,this.handleWindowResize);let{propSetHandlers:t}=e.pluginHooks;for(let n in t)t[n](e[n],e)}componentDidUpdate(e){let{props:t}=this,{propSetHandlers:n}=t.pluginHooks;for(let r in n)t[r]!==e[r]&&n[r](t[r],t)}componentWillUnmount(){window.removeEventListener(`resize`,this.handleWindowResize),this.resizeRunner.clear();for(let e of this.calendarInteractions)e.destroy();this.props.emitter.trigger(`_unmount`)}buildAppendContent(){let{props:e}=this;return Q(rD,{},...e.pluginHooks.viewContainerAppends.map(t=>t(e)))}renderView(e){let{pluginHooks:t}=e,{viewSpec:n}=e,r={dateProfile:e.dateProfile,businessHours:e.businessHours,eventStore:e.renderableEventStore,eventUiBases:e.eventUiBases,dateSelection:e.dateSelection,eventSelection:e.eventSelection,eventDrag:e.eventDrag,eventResize:e.eventResize,isHeightAuto:e.isHeightAuto,forPrint:e.forPrint},i=this.buildViewPropTransformers(t.viewPropsTransformers);for(let t of i)Object.assign(r,t.transform(r,e));let a=n.component;return Q(a,Object.assign({},r))}};function ZF(e,t,n,r,i,a){let o=n.build(i,void 0,!1),s=n.buildPrev(t,r,!1),c=n.buildNext(t,r,!1);return{title:a,activeButton:e.type,navUnit:e.singleUnit,isTodayEnabled:o.isValid&&!uj(t.currentRange,i),isPrevEnabled:s.isValid,isNextEnabled:c.isValid}}function QF(e){return e.map(e=>new e)}var $F=class extends eN{constructor(e,t={}){super(),this.isRendering=!1,this.isRendered=!1,this.currentClassNames=[],this.customContentRenderId=0,this.handleAction=e=>{switch(e.type){case`SET_EVENT_DRAG`:case`SET_EVENT_RESIZE`:this.renderRunner.tryDrain()}},this.handleData=e=>{this.currentData=e,this.renderRunner.request(e.calendarOptions.rerenderDelay)},this.handleRenderRequest=()=>{if(this.isRendering){this.isRendered=!0;let{currentData:e}=this;RA(()=>{ED(Q(JM,{options:e.calendarOptions,theme:e.theme,emitter:e.emitter},(t,n,r,i)=>(this.setClassNames(t),this.setHeight(n),Q($A.Provider,{value:this.customContentRenderId},Q(XF,Object.assign({isHeightAuto:r,forPrint:i},e))))),this.el)})}else this.isRendered&&(this.isRendered=!1,ED(null,this.el),this.setClassNames([]),this.setHeight(``))},vO(e),this.el=e,this.renderRunner=new TO(this.handleRenderRequest),new PF({optionOverrides:t,calendarApi:this,onAction:this.handleAction,onData:this.handleData})}render(){let e=this.isRendering;e?this.customContentRenderId+=1:this.isRendering=!0,this.renderRunner.request(),e&&this.updateSize()}destroy(){this.isRendering&&(this.isRendering=!1,this.renderRunner.request())}updateSize(){RA(()=>{super.updateSize()})}batchRendering(e){this.renderRunner.pause(`batchRendering`),e(),this.renderRunner.resume(`batchRendering`)}pauseRendering(){this.renderRunner.pause(`pauseRendering`)}resumeRendering(){this.renderRunner.resume(`pauseRendering`,!0)}resetOptions(e,t){this.currentDataManager.resetOptions(e,t)}setClassNames(e){if(!ck(e,this.currentClassNames)){let{classList:t}=this.el;for(let e of this.currentClassNames)t.remove(e);for(let n of e)t.add(n);this.currentClassNames=e}}setHeight(e){MO(this.el,`height`,e)}},eI=parseInt(`18.3.1`.split(`.`)[0])<18,tI=class extends _.Component{constructor(){super(...arguments),this.elRef=(0,_.createRef)(),this.isUpdating=!1,this.isUnmounting=!1,this.state={customRenderingMap:new Map},this.requestResize=()=>{this.isUnmounting||(this.cancelResize(),this.resizeId=requestAnimationFrame(()=>{this.doResize()}))}}render(){let e=[];for(let t of this.state.customRenderingMap.values())e.push(_.createElement(nI,{key:t.id,customRendering:t}));return _.createElement(`div`,{ref:this.elRef},e)}componentDidMount(){this.isUnmounting=!1;let e=new xP;this.handleCustomRendering=e.handle.bind(e),this.calendar=new $F(this.elRef.current,Object.assign(Object.assign({},this.props),{handleCustomRendering:this.handleCustomRendering})),this.calendar.render(),this.calendar.on(`_beforeprint`,()=>{(0,_l.flushSync)(()=>{})});let t;e.subscribe(e=>{let n=Date.now(),r=!t;(eI||r||this.isUpdating||this.isUnmounting||n-t<100?rI:_l.flushSync)(()=>{this.setState({customRenderingMap:e},()=>{t=n,r?this.doResize():this.requestResize()})})})}componentDidUpdate(){this.isUpdating=!0,this.calendar.resetOptions(Object.assign(Object.assign({},this.props),{handleCustomRendering:this.handleCustomRendering})),this.isUpdating=!1}componentWillUnmount(){this.isUnmounting=!0,this.cancelResize(),this.calendar.destroy()}doResize(){this.calendar.updateSize()}cancelResize(){this.resizeId!==void 0&&(cancelAnimationFrame(this.resizeId),this.resizeId=void 0)}getApi(){return this.calendar}};tI.act=rI;var nI=class extends _.PureComponent{render(){let{customRendering:e}=this.props,{generatorMeta:t}=e,n=typeof t==`function`?t(e.renderProps):t;return(0,_l.createPortal)(n,e.containerEl)}};function rI(e){e()}var iI=class extends hN{constructor(){super(...arguments),this.headerElRef=nD()}renderSimpleLayout(e,t){let{props:n,context:r}=this,i=[],a=JN(r.options);return e&&i.push({type:`header`,key:`header`,isSticky:a,chunk:{elRef:this.headerElRef,tableClassName:`fc-col-header`,rowContent:e}}),i.push({type:`body`,key:`body`,liquid:!0,chunk:{content:t}}),Q(rj,{elClasses:[`fc-daygrid`],viewSpec:r.viewSpec},Q(XN,{liquid:!n.isHeightAuto&&!n.forPrint,collapsibleWidth:n.forPrint,cols:[],sections:i}))}renderHScrollLayout(e,t,n,r){let i=this.context.pluginHooks.scrollGridImpl;if(!i)throw Error(`No ScrollGrid implementation`);let{props:a,context:o}=this,s=!a.forPrint&&JN(o.options),c=!a.forPrint&&YN(o.options),l=[];return e&&l.push({type:`header`,key:`header`,isSticky:s,chunks:[{key:`main`,elRef:this.headerElRef,tableClassName:`fc-col-header`,rowContent:e}]}),l.push({type:`body`,key:`body`,liquid:!0,chunks:[{key:`main`,content:t}]}),c&&l.push({type:`footer`,key:`footer`,isSticky:!0,chunks:[{key:`main`,content:qN}]}),Q(rj,{elClasses:[`fc-daygrid`],viewSpec:o.viewSpec},Q(i,{liquid:!a.isHeightAuto&&!a.forPrint,forPrint:a.forPrint,collapsibleWidth:a.forPrint,colGroups:[{cols:[{span:n,minWidth:r}]}],sections:l}))}};function aI(e,t){let n=[];for(let e=0;e<t;e+=1)n[e]=[];for(let t of e)n[t.row].push(t);return n}function oI(e,t){let n=[];for(let e=0;e<t;e+=1)n[e]=[];for(let t of e)n[t.firstCol].push(t);return n}function sI(e,t){let n=[];if(e){for(let r=0;r<t;r+=1)n[r]={affectedInstances:e.affectedInstances,isEvent:e.isEvent,segs:[]};for(let t of e.segs)n[t.row].segs.push(t)}else for(let e=0;e<t;e+=1)n[e]=null;return n}var cI=sA({hour:`numeric`,minute:`2-digit`,omitZeroMinute:!0,meridiem:`narrow`});function lI(e){let{display:t}=e.eventRange.ui;return t===`list-item`||t===`auto`&&!e.eventRange.def.allDay&&e.firstCol===e.lastCol&&e.isStart&&e.isEnd}var uI=class extends GA{render(){let{props:e}=this;return Q($N,Object.assign({},e,{elClasses:[`fc-daygrid-event`,`fc-daygrid-block-event`,`fc-h-event`],defaultTimeFormat:cI,defaultDisplayEventEnd:e.defaultDisplayEventEnd,disableResizing:!e.seg.eventRange.def.allDay}))}},dI=class extends GA{render(){let{props:e,context:t}=this,{options:n}=t,{seg:r}=e,i=AM(r,n.eventTimeFormat||cI,t,!0,e.defaultDisplayEventEnd);return Q(QN,Object.assign({},e,{elTag:`a`,elClasses:[`fc-daygrid-event`,`fc-daygrid-dot-event`],elAttrs:PM(e.seg,t),defaultGenerator:fI,timeText:i,isResizing:!1,isDateSelecting:!1}))}};function fI(e){return Q(rD,null,Q(`div`,{className:`fc-daygrid-event-dot`,style:{borderColor:e.borderColor||e.backgroundColor}}),e.timeText&&Q(`div`,{className:`fc-event-time`},e.timeText),Q(`div`,{className:`fc-event-title`},e.event.title||Q(rD,null,`\xA0`)))}var pI=class extends GA{constructor(){super(...arguments),this.compileSegs=Rk(mI)}render(){let{props:e}=this,{allSegs:t,invisibleSegs:n}=this.compileSegs(e.singlePlacements);return Q(pP,{elClasses:[`fc-daygrid-more-link`],dateProfile:e.dateProfile,todayRange:e.todayRange,allDayDate:e.allDayDate,moreCnt:e.moreCnt,allSegs:t,hiddenSegs:n,alignmentElRef:e.alignmentElRef,alignGridTop:e.alignGridTop,extraDateSpan:e.extraDateSpan,popoverContent:()=>{let n=(e.eventDrag?e.eventDrag.affectedInstances:null)||(e.eventResize?e.eventResize.affectedInstances:null)||{};return Q(rD,null,t.map(t=>{let r=t.eventRange.instance.instanceId;return Q(`div`,{className:`fc-daygrid-event-harness`,key:r,style:{visibility:n[r]?`hidden`:``}},lI(t)?Q(dI,Object.assign({seg:t,isDragging:!1,isSelected:r===e.eventSelection,defaultDisplayEventEnd:!1},jM(t,e.todayRange))):Q(uI,Object.assign({seg:t,isDragging:!1,isResizing:!1,isDateSelecting:!1,isSelected:r===e.eventSelection,defaultDisplayEventEnd:!1},jM(t,e.todayRange))))}))}})}};function mI(e){let t=[],n=[];for(let r of e)t.push(r.seg),r.isVisible||n.push(r.seg);return{allSegs:t,invisibleSegs:n}}var hI=sA({week:`narrow`}),gI=class extends hN{constructor(){super(...arguments),this.rootElRef=nD(),this.state={dayNumberId:FO()},this.handleRootEl=e=>{JA(this.rootElRef,e),JA(this.props.elRef,e)}}render(){let{context:e,props:t,state:n,rootElRef:r}=this,{options:i,dateEnv:a}=e,{date:o,dateProfile:s}=t,c=t.showDayNumber&&vI(o,s.currentRange,a);return Q(nP,{elTag:`td`,elRef:this.handleRootEl,elClasses:[`fc-daygrid-day`,...t.extraClassNames||[]],elAttrs:Object.assign(Object.assign(Object.assign({},t.extraDataAttrs),t.showDayNumber?{"aria-labelledby":n.dayNumberId}:{}),{role:`gridcell`}),defaultGenerator:_I,date:o,dateProfile:s,todayRange:t.todayRange,showDayNumber:t.showDayNumber,isMonthStart:c,extraRenderProps:t.extraRenderProps},(a,s)=>Q(`div`,{ref:t.innerElRef,className:`fc-daygrid-day-frame fc-scrollgrid-sync-inner`,style:{minHeight:t.minHeight}},t.showWeekNumber&&Q(cP,{elTag:`a`,elClasses:[`fc-daygrid-week-number`],elAttrs:oN(e,o,`week`),date:o,defaultFormat:hI}),!s.isDisabled&&(t.showDayNumber||rP(i)||t.forceDayTop)?Q(`div`,{className:`fc-daygrid-day-top`},Q(a,{elTag:`a`,elClasses:[`fc-daygrid-day-number`,c&&`fc-daygrid-month-start`],elAttrs:Object.assign(Object.assign({},oN(e,o)),{id:n.dayNumberId})})):t.showDayNumber?Q(`div`,{className:`fc-daygrid-day-top`,style:{visibility:`hidden`}},Q(`a`,{className:`fc-daygrid-day-number`},`\xA0`)):void 0,Q(`div`,{className:`fc-daygrid-day-events`,ref:t.fgContentElRef},t.fgContent,Q(`div`,{className:`fc-daygrid-day-bottom`,style:{marginTop:t.moreMarginTop}},Q(pI,{allDayDate:o,singlePlacements:t.singlePlacements,moreCnt:t.moreCnt,alignmentElRef:r,alignGridTop:!t.showDayNumber,extraDateSpan:t.extraDateSpan,dateProfile:t.dateProfile,eventSelection:t.eventSelection,eventDrag:t.eventDrag,eventResize:t.eventResize,todayRange:t.todayRange}))),Q(`div`,{className:`fc-daygrid-day-bg`},t.bgContent)))}};function _I(e){return e.dayNumberText||Q(rD,null,`\xA0`)}function vI(e,t,n){let{start:r,end:i}=t,a=fk(i,-1),o=n.getYear(r),s=n.getMonth(r),c=n.getYear(a),l=n.getMonth(a);return(o!==c||s!==l)&&(e.valueOf()===r.valueOf()||n.getDay(e)===1&&e.valueOf()<i.valueOf())}function yI(e){return e.eventRange.instance.instanceId+`:`+e.firstCol}function bI(e){return yI(e)+`:`+e.lastCol}function xI(e,t,n,r,i,a,o){let s=new TI(t=>i[e[t.index].eventRange.instance.instanceId+`:`+t.span.start+`:`+(t.span.end-1)]||1);s.allowReslicing=!0,s.strictOrder=r,t===!0||n===!0?(s.maxCoord=a,s.hiddenConsumes=!0):typeof t==`number`?s.maxStackCnt=t:typeof n==`number`&&(s.maxStackCnt=n,s.hiddenConsumes=!0);let c=[],l=[];for(let t=0;t<e.length;t+=1){let n=e[t];i[bI(n)]==null?l.push(n):c.push({index:t,span:{start:n.firstCol,end:n.lastCol+1}})}let u=s.addSegs(c),{singleColPlacements:d,multiColPlacements:f,leftoverMargins:p}=SI(s.toRects(),e,o),m=[],h=[];for(let e of l){f[e.firstCol].push({seg:e,isVisible:!1,isAbsolute:!0,absoluteTop:0,marginTop:0});for(let t=e.firstCol;t<=e.lastCol;t+=1)d[t].push({seg:wI(e,t,t+1,o),isVisible:!1,isAbsolute:!1,absoluteTop:0,marginTop:0})}for(let e=0;e<o.length;e+=1)m.push(0);for(let t of u){let n=e[t.index],r=t.span;f[r.start].push({seg:wI(n,r.start,r.end,o),isVisible:!1,isAbsolute:!0,absoluteTop:0,marginTop:0});for(let e=r.start;e<r.end;e+=1)m[e]+=1,d[e].push({seg:wI(n,e,e+1,o),isVisible:!1,isAbsolute:!1,absoluteTop:0,marginTop:0})}for(let e=0;e<o.length;e+=1)h.push(p[e]);return{singleColPlacements:d,multiColPlacements:f,moreCnts:m,moreMarginTops:h}}function SI(e,t,n){let r=CI(e,n.length),i=[],a=[],o=[];for(let e=0;e<n.length;e+=1){let s=r[e],c=[],l=0,u=0;for(let r of s){let i=t[r.index];c.push({seg:wI(i,e,e+1,n),isVisible:!0,isAbsolute:!1,absoluteTop:r.levelCoord,marginTop:r.levelCoord-l}),l=r.levelCoord+r.thickness}let d=[];l=0,u=0;for(let r of s){let i=t[r.index],a=r.span.end-r.span.start>1,o=r.span.start===e;u+=r.levelCoord-l,l=r.levelCoord+r.thickness,a?(u+=r.thickness,o&&d.push({seg:wI(i,r.span.start,r.span.end,n),isVisible:!0,isAbsolute:!0,absoluteTop:r.levelCoord,marginTop:0})):o&&(d.push({seg:wI(i,r.span.start,r.span.end,n),isVisible:!0,isAbsolute:!1,absoluteTop:r.levelCoord,marginTop:u}),u=0)}i.push(c),a.push(d),o.push(u)}return{singleColPlacements:i,multiColPlacements:a,leftoverMargins:o}}function CI(e,t){let n=[];for(let e=0;e<t;e+=1)n.push([]);for(let t of e)for(let e=t.span.start;e<t.span.end;e+=1)n[e].push(t);return n}function wI(e,t,n,r){if(e.firstCol===t&&e.lastCol===n-1)return e;let i=e.eventRange,a=i.range,o=cj(a,{start:r[t].date,end:dk(r[n-1].date,1)});return Object.assign(Object.assign({},e),{firstCol:t,lastCol:n-1,eventRange:{def:i.def,ui:Object.assign(Object.assign({},i.ui),{durationEditable:!1}),instance:i.instance,range:o},isStart:e.isStart&&o.start.valueOf()===a.start.valueOf(),isEnd:e.isEnd&&o.end.valueOf()===a.end.valueOf()})}var TI=class extends gN{constructor(){super(...arguments),this.hiddenConsumes=!1,this.forceHidden={}}addSegs(e){let t=super.addSegs(e),{entriesByLevel:n}=this,r=e=>!this.forceHidden[vN(e)];for(let e=0;e<n.length;e+=1)n[e]=n[e].filter(r);return t}handleInvalidInsertion(e,t,n){let{entriesByLevel:r,forceHidden:i}=this,{touchingEntry:a,touchingLevel:o,touchingLateral:s}=e;if(this.hiddenConsumes&&a){let e=vN(a);if(!i[e]){if(this.allowReslicing){let e=Object.assign(Object.assign({},a),{span:yN(a.span,t.span)}),c=vN(e);i[c]=!0,r[o][s]=e,n.push(e),this.splitEntry(a,t,n)}else i[e]=!0,n.push(a)}}super.handleInvalidInsertion(e,t,n)}},EI=class extends hN{constructor(){super(...arguments),this.cellElRefs=new IN,this.frameElRefs=new IN,this.fgElRefs=new IN,this.segHarnessRefs=new IN,this.rootElRef=nD(),this.state={framePositions:null,maxContentHeight:null,segHeights:{}},this.handleResize=e=>{e&&this.updateSizing(!0)}}render(){let{props:e,state:t,context:n}=this,{options:r}=n,i=e.cells.length,a=oI(e.businessHourSegs,i),o=oI(e.bgEventSegs,i),s=oI(this.getHighlightSegs(),i),c=oI(this.getMirrorSegs(),i),{singleColPlacements:l,multiColPlacements:u,moreCnts:d,moreMarginTops:f}=xI(TM(e.fgEventSegs,r.eventOrder),e.dayMaxEvents,e.dayMaxEventRows,r.eventOrderStrict,t.segHeights,t.maxContentHeight,e.cells),p=e.eventDrag&&e.eventDrag.affectedInstances||e.eventResize&&e.eventResize.affectedInstances||{};return Q(`tr`,{ref:this.rootElRef,role:`row`},e.renderIntro&&e.renderIntro(),e.cells.map((t,n)=>{let r=this.renderFgSegs(n,e.forPrint?l[n]:u[n],e.todayRange,p),i=this.renderFgSegs(n,DI(c[n],u),e.todayRange,{},!!e.eventDrag,!!e.eventResize,!1);return Q(gI,{key:t.key,elRef:this.cellElRefs.createRef(t.key),innerElRef:this.frameElRefs.createRef(t.key),dateProfile:e.dateProfile,date:t.date,showDayNumber:e.showDayNumbers,showWeekNumber:e.showWeekNumbers&&n===0,forceDayTop:e.showWeekNumbers,todayRange:e.todayRange,eventSelection:e.eventSelection,eventDrag:e.eventDrag,eventResize:e.eventResize,extraRenderProps:t.extraRenderProps,extraDataAttrs:t.extraDataAttrs,extraClassNames:t.extraClassNames,extraDateSpan:t.extraDateSpan,moreCnt:d[n],moreMarginTop:f[n],singlePlacements:l[n],fgContentElRef:this.fgElRefs.createRef(t.key),fgContent:Q(rD,null,Q(rD,null,r),Q(rD,null,i)),bgContent:Q(rD,null,this.renderFillSegs(s[n],`highlight`),this.renderFillSegs(a[n],`non-business`),this.renderFillSegs(o[n],`bg-event`)),minHeight:e.cellMinHeight})}))}componentDidMount(){this.updateSizing(!0),this.context.addResizeHandler(this.handleResize)}componentDidUpdate(e,t){let n=this.props;this.updateSizing(!wA(e,n))}componentWillUnmount(){this.context.removeResizeHandler(this.handleResize)}getHighlightSegs(){let{props:e}=this;return e.eventDrag&&e.eventDrag.segs.length?e.eventDrag.segs:e.eventResize&&e.eventResize.segs.length?e.eventResize.segs:e.dateSelectionSegs}getMirrorSegs(){let{props:e}=this;return e.eventResize&&e.eventResize.segs.length?e.eventResize.segs:[]}renderFgSegs(e,t,n,r,i,a,o){let{context:s}=this,{eventSelection:c}=this.props,{framePositions:l}=this.state,u=this.props.cells.length===1,d=i||a||o,f=[];if(l)for(let e of t){let{seg:t}=e,{instanceId:p}=t.eventRange.instance,m=e.isVisible&&!r[p],h=e.isAbsolute,g=``,_=``;h&&(s.isRtl?(_=0,g=l.lefts[t.lastCol]-l.lefts[t.firstCol]):(g=0,_=l.rights[t.firstCol]-l.rights[t.lastCol])),f.push(Q(`div`,{className:`fc-daygrid-event-harness`+(h?` fc-daygrid-event-harness-abs`:``),key:yI(t),ref:d?null:this.segHarnessRefs.createRef(bI(t)),style:{visibility:m?``:`hidden`,marginTop:h?``:e.marginTop,top:h?e.absoluteTop:``,left:g,right:_}},lI(t)?Q(dI,Object.assign({seg:t,isDragging:i,isSelected:p===c,defaultDisplayEventEnd:u},jM(t,n))):Q(uI,Object.assign({seg:t,isDragging:i,isResizing:a,isDateSelecting:o,isSelected:p===c,defaultDisplayEventEnd:u},jM(t,n)))))}return f}renderFillSegs(e,t){let{isRtl:n}=this.context,{todayRange:r}=this.props,{framePositions:i}=this.state,a=[];if(i)for(let o of e){let e=n?{right:0,left:i.lefts[o.lastCol]-i.lefts[o.firstCol]}:{left:0,right:i.rights[o.firstCol]-i.rights[o.lastCol]};a.push(Q(`div`,{key:NM(o.eventRange),className:`fc-daygrid-bg-harness`,style:e},t===`bg-event`?Q(aP,Object.assign({seg:o},jM(o,r))):sP(t)))}return Q(rD,{},...a)}updateSizing(e){let{props:t,state:n,frameElRefs:r}=this;if(!t.forPrint&&t.clientWidth!==null){if(e){let e=t.cells.map(e=>r.currentMap[e.key]);if(e.length){let t=this.rootElRef.current,r=new pN(t,e,!0,!1);n.framePositions&&n.framePositions.similarTo(r)||this.setState({framePositions:new pN(t,e,!0,!1)})}}let i=this.state.segHeights,a=this.querySegHeights(),o=t.dayMaxEvents===!0||t.dayMaxEventRows===!0;this.safeSetState({segHeights:Object.assign(Object.assign({},i),a),maxContentHeight:o?this.computeMaxContentHeight():null})}}querySegHeights(){let e=this.segHarnessRefs.currentMap,t={};for(let n in e){let r=Math.round(e[n].getBoundingClientRect().height);t[n]=Math.max(t[n]||0,r)}return t}computeMaxContentHeight(){let e=this.props.cells[0].key,t=this.cellElRefs.currentMap[e],n=this.fgElRefs.currentMap[e];return t.getBoundingClientRect().bottom-n.getBoundingClientRect().top}getCellEls(){let e=this.cellElRefs.currentMap;return this.props.cells.map(t=>e[t.key])}};EI.addStateEquality({segHeights:wA});function DI(e,t){if(!e.length)return[];let n=OI(t);return e.map(e=>({seg:e,isVisible:!0,isAbsolute:!0,absoluteTop:n[e.eventRange.instance.instanceId],marginTop:0}))}function OI(e){let t={};for(let n of e)for(let e of n)t[e.seg.eventRange.instance.instanceId]=e.absoluteTop;return t}var kI=class extends hN{constructor(){super(...arguments),this.splitBusinessHourSegs=Rk(aI),this.splitBgEventSegs=Rk(AI),this.splitFgEventSegs=Rk(aI),this.splitDateSelectionSegs=Rk(aI),this.splitEventDrag=Rk(sI),this.splitEventResize=Rk(sI),this.rowRefs=new IN}render(){let{props:e,context:t}=this,n=e.cells.length,r=this.splitBusinessHourSegs(e.businessHourSegs,n),i=this.splitBgEventSegs(e.bgEventSegs,n),a=this.splitFgEventSegs(e.fgEventSegs,n),o=this.splitDateSelectionSegs(e.dateSelectionSegs,n),s=this.splitEventDrag(e.eventDrag,n),c=this.splitEventResize(e.eventResize,n),l=n>=7&&e.clientWidth?e.clientWidth/t.options.aspectRatio/6:null;return Q(QM,{unit:`day`},(t,u)=>Q(rD,null,e.cells.map((t,d)=>Q(EI,{ref:this.rowRefs.createRef(d),key:t.length?t[0].date.toISOString():d,showDayNumbers:n>1,showWeekNumbers:e.showWeekNumbers,todayRange:u,dateProfile:e.dateProfile,cells:t,renderIntro:e.renderRowIntro,businessHourSegs:r[d],eventSelection:e.eventSelection,bgEventSegs:i[d],fgEventSegs:a[d],dateSelectionSegs:o[d],eventDrag:s[d],eventResize:c[d],dayMaxEvents:e.dayMaxEvents,dayMaxEventRows:e.dayMaxEventRows,clientWidth:e.clientWidth,clientHeight:e.clientHeight,cellMinHeight:l,forPrint:e.forPrint}))))}componentDidMount(){this.registerInteractiveComponent()}componentDidUpdate(){this.registerInteractiveComponent()}registerInteractiveComponent(){if(!this.rootEl){let e=this.rowRefs.currentMap[0].getCellEls()[0],t=e?e.closest(`.fc-daygrid-body`):null;t&&(this.rootEl=t,this.context.registerInteractiveComponent(this,{el:t,isHitComboAllowed:this.props.isHitComboAllowed}))}}componentWillUnmount(){this.rootEl&&=(this.context.unregisterInteractiveComponent(this),null)}prepareHits(){this.rowPositions=new pN(this.rootEl,this.rowRefs.collect().map(e=>e.getCellEls()[0]),!1,!0),this.colPositions=new pN(this.rootEl,this.rowRefs.currentMap[0].getCellEls(),!0,!1)}queryHit(e,t){let{colPositions:n,rowPositions:r}=this,i=n.leftToIndex(e),a=r.topToIndex(t);if(a!=null&&i!=null){let e=this.props.cells[a][i];return{dateProfile:this.props.dateProfile,dateSpan:Object.assign({range:this.getCellRange(a,i),allDay:!0},e.extraDateSpan),dayEl:this.getCellEl(a,i),rect:{left:n.lefts[i],right:n.rights[i],top:r.tops[a],bottom:r.bottoms[a]},layer:0}}return null}getCellEl(e,t){return this.rowRefs.currentMap[e].getCellEls()[t]}getCellRange(e,t){let n=this.props.cells[e][t].date;return{start:n,end:dk(n,1)}}};function AI(e,t){return aI(e.filter(jI),t)}function jI(e){return e.eventRange.def.allDay}var MI=class extends hN{constructor(){super(...arguments),this.elRef=nD(),this.needsScrollReset=!1}render(){let{props:e}=this,{dayMaxEventRows:t,dayMaxEvents:n,expandRows:r}=e,i=n===!0||t===!0;i&&!r&&(i=!1,t=null,n=null);let a=[`fc-daygrid-body`,i?`fc-daygrid-body-balanced`:`fc-daygrid-body-unbalanced`,r?``:`fc-daygrid-body-natural`];return Q(`div`,{ref:this.elRef,className:a.join(` `),style:{width:e.clientWidth,minWidth:e.tableMinWidth}},Q(`table`,{role:`presentation`,className:`fc-scrollgrid-sync-table`,style:{width:e.clientWidth,minWidth:e.tableMinWidth,height:r?e.clientHeight:``}},e.colGroupNode,Q(`tbody`,{role:`presentation`},Q(kI,{dateProfile:e.dateProfile,cells:e.cells,renderRowIntro:e.renderRowIntro,showWeekNumbers:e.showWeekNumbers,clientWidth:e.clientWidth,clientHeight:e.clientHeight,businessHourSegs:e.businessHourSegs,bgEventSegs:e.bgEventSegs,fgEventSegs:e.fgEventSegs,dateSelectionSegs:e.dateSelectionSegs,eventSelection:e.eventSelection,eventDrag:e.eventDrag,eventResize:e.eventResize,dayMaxEvents:n,dayMaxEventRows:t,forPrint:e.forPrint,isHitComboAllowed:e.isHitComboAllowed}))))}componentDidMount(){this.requestScrollReset()}componentDidUpdate(e){e.dateProfile===this.props.dateProfile?this.flushScrollReset():this.requestScrollReset()}requestScrollReset(){this.needsScrollReset=!0,this.flushScrollReset()}flushScrollReset(){if(this.needsScrollReset&&this.props.clientWidth){let e=NI(this.elRef.current,this.props.dateProfile);if(e){let t=e.closest(`.fc-daygrid-body`),n=t.closest(`.fc-scroller`),r=e.getBoundingClientRect().top-t.getBoundingClientRect().top;n.scrollTop=r?r+1:0}this.needsScrollReset=!1}}};function NI(e,t){let n;return t.currentRangeUnit.match(/year|month/)&&(n=e.querySelector(`[data-date="${Ik(t.currentDate)}-01"]`)),n||=e.querySelector(`[data-date="${Fk(t.currentDate)}"]`),n}var PI=class extends MN{constructor(){super(...arguments),this.forceDayIfListItem=!0}sliceRange(e,t){return t.sliceRange(e)}},FI=class extends hN{constructor(){super(...arguments),this.slicer=new PI,this.tableRef=nD()}render(){let{props:e,context:t}=this;return Q(MI,Object.assign({ref:this.tableRef},this.slicer.sliceProps(e,e.dateProfile,e.nextDayThreshold,t,e.dayTableModel),{dateProfile:e.dateProfile,cells:e.dayTableModel.cells,colGroupNode:e.colGroupNode,tableMinWidth:e.tableMinWidth,renderRowIntro:e.renderRowIntro,dayMaxEvents:e.dayMaxEvents,dayMaxEventRows:e.dayMaxEventRows,showWeekNumbers:e.showWeekNumbers,expandRows:e.expandRows,headerAlignElRef:e.headerAlignElRef,clientWidth:e.clientWidth,clientHeight:e.clientHeight,forPrint:e.forPrint}))}},II=class extends iI{constructor(){super(...arguments),this.buildDayTableModel=Rk(LI),this.headerRef=nD(),this.tableRef=nD()}render(){let{options:e,dateProfileGenerator:t}=this.context,{props:n}=this,r=this.buildDayTableModel(n.dateProfile,t),i=e.dayHeaders&&Q(ON,{ref:this.headerRef,dateProfile:n.dateProfile,dates:r.headerDates,datesRepDistinctDays:r.rowCnt===1}),a=t=>Q(FI,{ref:this.tableRef,dateProfile:n.dateProfile,dayTableModel:r,businessHours:n.businessHours,dateSelection:n.dateSelection,eventStore:n.eventStore,eventUiBases:n.eventUiBases,eventSelection:n.eventSelection,eventDrag:n.eventDrag,eventResize:n.eventResize,nextDayThreshold:e.nextDayThreshold,colGroupNode:t.tableColGroupNode,tableMinWidth:t.tableMinWidth,dayMaxEvents:e.dayMaxEvents,dayMaxEventRows:e.dayMaxEventRows,showWeekNumbers:e.weekNumbers,expandRows:!n.isHeightAuto,headerAlignElRef:this.headerElRef,clientWidth:t.clientWidth,clientHeight:t.clientHeight,forPrint:n.forPrint});return e.dayMinWidth?this.renderHScrollLayout(i,a,r.colCnt,e.dayMinWidth):this.renderSimpleLayout(i,a)}};function LI(e,t){return new jN(new AN(e.renderRange,t),/year|month|week/.test(e.currentRangeUnit))}var RI=class extends hj{buildRenderRange(e,t,n){let r=super.buildRenderRange(e,t,n),{props:i}=this;return zI({currentRange:r,snapToWeek:/^(year|month)$/.test(t),fixedWeekCount:i.fixedWeekCount,dateEnv:i.dateEnv})}};function zI(e){let{dateEnv:t,currentRange:n}=e,{start:r,end:i}=n,a;if(e.snapToWeek&&(r=t.startOfWeek(r),a=t.startOfWeek(i),a.valueOf()!==i.valueOf()&&(i=uk(a,1))),e.fixedWeekCount){let e=t.startOfWeek(t.startOfMonth(dk(n.end,-1))),r=Math.ceil(pk(e,i));i=uk(i,6-r)}return{start:r,end:i}}_O(`:root{--fc-daygrid-event-dot-width:8px}.fc-daygrid-day-events:after,.fc-daygrid-day-events:before,.fc-daygrid-day-frame:after,.fc-daygrid-day-frame:before,.fc-daygrid-event-harness:after,.fc-daygrid-event-harness:before{clear:both;content:"";display:table}.fc .fc-daygrid-body{position:relative;z-index:1}.fc .fc-daygrid-day.fc-day-today{background-color:var(--fc-today-bg-color)}.fc .fc-daygrid-day-frame{min-height:100%;position:relative}.fc .fc-daygrid-day-top{display:flex;flex-direction:row-reverse}.fc .fc-day-other .fc-daygrid-day-top{opacity:.3}.fc .fc-daygrid-day-number{padding:4px;position:relative;z-index:4}.fc .fc-daygrid-month-start{font-size:1.1em;font-weight:700}.fc .fc-daygrid-day-events{margin-top:1px}.fc .fc-daygrid-body-balanced .fc-daygrid-day-events{left:0;position:absolute;right:0}.fc .fc-daygrid-body-unbalanced .fc-daygrid-day-events{min-height:2em;position:relative}.fc .fc-daygrid-body-natural .fc-daygrid-day-events{margin-bottom:1em}.fc .fc-daygrid-event-harness{position:relative}.fc .fc-daygrid-event-harness-abs{left:0;position:absolute;right:0;top:0}.fc .fc-daygrid-bg-harness{bottom:0;position:absolute;top:0}.fc .fc-daygrid-day-bg .fc-non-business{z-index:1}.fc .fc-daygrid-day-bg .fc-bg-event{z-index:2}.fc .fc-daygrid-day-bg .fc-highlight{z-index:3}.fc .fc-daygrid-event{margin-top:1px;z-index:6}.fc .fc-daygrid-event.fc-event-mirror{z-index:7}.fc .fc-daygrid-day-bottom{font-size:.85em;margin:0 2px}.fc .fc-daygrid-day-bottom:after,.fc .fc-daygrid-day-bottom:before{clear:both;content:"";display:table}.fc .fc-daygrid-more-link{border-radius:3px;cursor:pointer;line-height:1;margin-top:1px;max-width:100%;overflow:hidden;padding:2px;position:relative;white-space:nowrap;z-index:4}.fc .fc-daygrid-more-link:hover{background-color:rgba(0,0,0,.1)}.fc .fc-daygrid-week-number{background-color:var(--fc-neutral-bg-color);color:var(--fc-neutral-text-color);min-width:1.5em;padding:2px;position:absolute;text-align:center;top:0;z-index:5}.fc .fc-more-popover .fc-popover-body{min-width:220px;padding:10px}.fc-direction-ltr .fc-daygrid-event.fc-event-start,.fc-direction-rtl .fc-daygrid-event.fc-event-end{margin-left:2px}.fc-direction-ltr .fc-daygrid-event.fc-event-end,.fc-direction-rtl .fc-daygrid-event.fc-event-start{margin-right:2px}.fc-direction-ltr .fc-daygrid-more-link{float:left}.fc-direction-ltr .fc-daygrid-week-number{border-radius:0 0 3px 0;left:0}.fc-direction-rtl .fc-daygrid-more-link{float:right}.fc-direction-rtl .fc-daygrid-week-number{border-radius:0 0 0 3px;right:0}.fc-liquid-hack .fc-daygrid-day-frame{position:static}.fc-daygrid-event{border-radius:3px;font-size:var(--fc-small-font-size);position:relative;white-space:nowrap}.fc-daygrid-block-event .fc-event-time{font-weight:700}.fc-daygrid-block-event .fc-event-time,.fc-daygrid-block-event .fc-event-title{padding:1px}.fc-daygrid-dot-event{align-items:center;display:flex;padding:2px 0}.fc-daygrid-dot-event .fc-event-title{flex-grow:1;flex-shrink:1;font-weight:700;min-width:0;overflow:hidden}.fc-daygrid-dot-event.fc-event-mirror,.fc-daygrid-dot-event:hover{background:rgba(0,0,0,.1)}.fc-daygrid-dot-event.fc-event-selected:before{bottom:-10px;top:-10px}.fc-daygrid-event-dot{border:calc(var(--fc-daygrid-event-dot-width)/2) solid var(--fc-event-border-color);border-radius:calc(var(--fc-daygrid-event-dot-width)/2);box-sizing:content-box;height:0;margin:0 4px;width:0}.fc-direction-ltr .fc-daygrid-event .fc-event-time{margin-right:3px}.fc-direction-rtl .fc-daygrid-event .fc-event-time{margin-left:3px}`);var BI=AP({name:`@fullcalendar/daygrid`,initialView:`dayGridMonth`,views:{dayGrid:{component:II,dateProfileGeneratorClass:RI},dayGridDay:{type:`dayGrid`,duration:{days:1}},dayGridWeek:{type:`dayGrid`,duration:{weeks:1}},dayGridMonth:{type:`dayGrid`,duration:{months:1},fixedWeekCount:!0},dayGridYear:{type:`dayGrid`,duration:{years:1}}}});function VI(e){let t=new Date(`${e}T00:00:00Z`);return t.setUTCDate(t.getUTCDate()+1),t.toISOString().slice(0,10)}function HI(e){let t=new Date(e),n=e=>String(e).padStart(2,`0`);return`${t.getFullYear()}-${n(t.getMonth()+1)}-${n(t.getDate())}`}function UI(e){let t=e.start??e.due,n=e.due??e.start;if(t!==void 0&&n!==void 0)return{start:t,end:VI(n)};if(e.closed===void 0)return null;let r=HI(e.closed);return{start:r,end:VI(r)}}function WI(e,t){if(t===`planned`)return UI(e);let n=t===`created`?e.created:e.updated;if(n===void 0)return null;let r=HI(n);return{start:r,end:VI(r)}}var GI=[{key:`planned`,text:`planned`,hint:`Place items on their start and due dates`},{key:`created`,text:`created`,hint:`Place items on the day they were filed`},{key:`updated`,text:`modified`,hint:`Place items on the day they last changed`}];function KI({entries:e,multiProject:t,selected:n,onSelect:r,focus:i=null,dates:a=`planned`,onDates:o,nextList:s,projects:c}){let l=(0,_.useRef)(null);(0,_.useEffect)(()=>{i!==null&&l.current?.getApi().gotoDate(i.date)},[i]);let u=e.flatMap(({project:e,item:t,colour:n,projectColour:r})=>{let i=WI(t,a);return i===null?[]:[{id:`${e}:${t.id}`,title:t.title,start:i.start,end:i.end,allDay:!0,backgroundColor:n,borderColor:n,extendedProps:{project:e,item:t,projectColour:r}}]}),d=(e,t)=>n?.project===e&&n.ref===t,f=({event:e})=>{let{project:n,item:r,projectColour:i}=e.extendedProps,a=X[r.status];return(0,b.jsxs)(`div`,{className:`cal__event`,"data-project":i!==void 0,style:i===void 0?void 0:{"--project":i},"data-strike":a.strike,"data-on":d(n,r.id),title:`${r.id} [${a.label}] ${r.title}`,children:[(0,b.jsx)(`span`,{className:`cal__icon`,style:{color:a.colour},children:a.icon}),(0,b.jsx)(`span`,{className:`cal__ref`,children:t?`${n}:${r.id}`:r.id}),(0,b.jsx)(`span`,{className:`cal__title`,children:r.title})]})},p=({event:e,jsEvent:t})=>{t.preventDefault();let{project:n,item:i}=e.extendedProps;r(n,i.id)};return(0,b.jsxs)(`div`,{className:`cal`,"data-dates":a,"data-next-open":s?.open===!0,children:[(0,b.jsx)(`div`,{className:`cal__grid`,children:(0,b.jsx)(tI,{ref:l,initialDate:i?.date,plugins:[BI],initialView:`dayGridMonth`,headerToolbar:{left:s===void 0?`prev,next today`:`prev,next today nextList`,center:`title`,right:o===void 0?`dayGridMonth,dayGridWeek,dayGridDay`:`planned,created,updated dayGridMonth,dayGridWeek,dayGridDay`},customButtons:{...Object.fromEntries(GI.map(({key:e,text:t,hint:n})=>[e,{text:t,hint:n,click:()=>o?.(e)}])),...s===void 0?{}:{nextList:{text:`Next ${s.count}`,hint:`The order agreed with set_next`,click:s.toggle}}},views:{dayGridDay:{dayMaxEvents:!1}},moreLinkClick:`dayGridDay`,navLinks:!0,navLinkDayClick:`dayGridDay`,buttonText:{today:`today`,month:`month`,week:`week`,day:`day`},timeZone:`UTC`,firstDay:1,height:`100%`,events:u,eventContent:f,eventClick:p,dayMaxEvents:!0})}),c!==void 0&&(0,b.jsx)(`div`,{className:`cal__key`,role:`group`,"aria-label":`Projects`,children:c.map(e=>(0,b.jsxs)(`button`,{className:`chip`,"data-off":e.hidden,"aria-pressed":!e.hidden,title:e.hidden?`Show ${e.name}`:`Hide ${e.name}`,style:{"--area":e.colour},onClick:e.toggle,children:[(0,b.jsx)(`span`,{className:`chip__dot`}),e.name]},e.key))})]})}var qI=`55.9 59.4 271 154.5`;function JI({className:e,crop:t=`full`}){return t===`icon`?(0,b.jsx)(`svg`,{className:e,viewBox:`0 0 100 100`,"aria-hidden":`true`,focusable:`false`,children:(0,b.jsxs)(`g`,{transform:`translate(50 48) scale(1.3) translate(-50 -48)`,children:[(0,b.jsx)(`path`,{d:`M -5 36 Q 50 64 105 36`,fill:`none`,stroke:`currentColor`,strokeOpacity:`0.45`,strokeWidth:`2.6`}),(0,b.jsx)(`path`,{d:`M -5 56 Q 50 82 105 56`,fill:`none`,stroke:`currentColor`,strokeWidth:`6`,strokeDasharray:`5 2`}),(0,b.jsx)(`path`,{d:`M -5 59.5 Q 50 85.5 105 59.5`,fill:`none`,stroke:`currentColor`,strokeWidth:`1.82`}),(0,b.jsx)(`line`,{x1:`45.24`,y1:`50.5`,x2:`45.24`,y2:`67.5`,stroke:`currentColor`,strokeWidth:`3.2`,strokeLinecap:`round`}),(0,b.jsx)(`line`,{x1:`54.76`,y1:`50.5`,x2:`54.76`,y2:`67.5`,stroke:`currentColor`,strokeWidth:`3.2`,strokeLinecap:`round`}),(0,b.jsx)(`g`,{transform:`translate(33 18.5) scale(0.45) translate(-153.9 -58.7)`,children:(0,b.jsx)(`g`,{transform:`matrix(0.1, 0, 0, -0.1, 62.431001, 269.861486)`,fill:`currentColor`,children:(0,b.jsx)(`path`,{d:`M 1191.17 2095.39 C 1155.17 2079.39 1133.17 2038.39 1142.17 2001.39 C 1150.17 1970.39 1184.17 1929.39 1202.17 1929.39 C 1211.17 1929.39 1236.17 1881.39 1236.17 1863.39 C 1236.17 1861.39 1206.17 1859.39 1169.17 1859.39 C 1053.17 1858.39 976.178 1816.39 936.178 1733.39 C 917.178 1692.39 915.178 1672.39 918.178 1588.39 C 921.178 1498.39 923.178 1488.39 952.178 1447.39 C 975.178 1416.39 999.178 1398.39 1037.17 1382.39 C 1086.17 1362.39 1108.17 1360.39 1273.17 1359.39 C 1486.17 1359.39 1543.17 1369.39 1593.17 1412.39 C 1647.17 1459.39 1666.17 1509.39 1666.17 1606.39 C 1666.17 1719.39 1638.17 1778.39 1562.17 1827.39 C 1526.17 1850.39 1509.17 1854.39 1415.17 1857.39 L 1309.17 1861.39 L 1297.17 1900.39 C 1287.17 1933.39 1288.17 1943.39 1301.17 1961.39 C 1323.17 1994.39 1320.17 2044.39 1294.17 2073.39 C 1265.17 2105.39 1230.17 2112.39 1191.17 2095.39 Z M 1359.17 1799.39 C 1419.17 1798.39 1469.17 1779.39 1452.17 1762.39 C 1448.17 1757.39 1386.17 1753.39 1315.17 1752.39 C 1243.17 1750.39 1176.17 1744.39 1165.17 1739.39 C 1123.17 1716.39 1111.17 1681.39 1110.17 1572.39 C 1110.17 1516.39 1106.17 1466.39 1102.17 1462.39 C 1098.17 1457.39 1086.17 1465.39 1075.17 1478.39 C 1060.17 1496.39 1056.17 1517.39 1056.17 1580.39 C 1056.17 1655.39 1055.17 1660.39 1031.17 1671.39 C 1017.18 1677.39 1006.18 1690.39 1006.18 1699.39 C 1006.18 1726.39 1062.17 1771.39 1108.17 1781.39 C 1167.17 1794.39 1268.17 1807.39 1284.17 1802.39 C 1292.17 1801.39 1325.17 1799.39 1359.17 1799.39 Z M 1314.17 1657.39 C 1321.17 1650.39 1326.17 1624.39 1326.17 1599.39 C 1326.17 1549.39 1313.17 1529.39 1282.17 1529.39 C 1249.17 1529.39 1236.17 1543.39 1230.17 1580.39 C 1221.17 1632.39 1240.17 1669.39 1274.17 1669.39 C 1289.17 1669.39 1307.17 1664.39 1314.17 1657.39 Z M 1545.17 1655.39 C 1552.17 1647.39 1556.17 1620.39 1554.17 1593.39 C 1551.17 1539.39 1528.17 1516.39 1499.17 1535.39 C 1476.17 1549.39 1468.17 1648.39 1488.17 1660.39 C 1508.17 1673.39 1532.17 1671.39 1545.17 1655.39 Z`})})}),(0,b.jsx)(`line`,{x1:`4`,y1:`48.21`,x2:`4`,y2:`59.91`,stroke:`currentColor`,strokeWidth:`1.56`}),(0,b.jsx)(`line`,{x1:`16`,y1:`52.65`,x2:`16`,y2:`64.03`,stroke:`currentColor`,strokeWidth:`1.56`}),(0,b.jsx)(`line`,{x1:`28`,y1:`55.76`,x2:`28`,y2:`66.92`,stroke:`currentColor`,strokeWidth:`1.56`}),(0,b.jsx)(`line`,{x1:`76`,y1:`54.87`,x2:`76`,y2:`66.09`,stroke:`currentColor`,strokeWidth:`1.56`}),(0,b.jsx)(`line`,{x1:`88`,y1:`51.32`,x2:`88`,y2:`62.79`,stroke:`currentColor`,strokeWidth:`1.56`}),(0,b.jsx)(`path`,{d:`M -5 44 Q 50 72 105 44`,fill:`none`,stroke:`var(--logo-disc, #33435a)`,strokeWidth:`5`}),(0,b.jsx)(`path`,{d:`M -5 44 Q 50 72 105 44`,fill:`none`,stroke:`currentColor`,strokeWidth:`2.6`,strokeLinecap:`round`})]})}):(0,b.jsx)(`svg`,{className:e,viewBox:qI,"aria-hidden":`true`,focusable:`false`,children:(0,b.jsxs)(`g`,{transform:`matrix(0.1, 0, 0, -0.1, 62.431001, 269.861486)`,fill:`currentColor`,children:[(0,b.jsx)(`path`,{d:`M 1191.17 2095.39 C 1155.17 2079.39 1133.17 2038.39 1142.17 2001.39 C 1150.17 1970.39 1184.17 1929.39 1202.17 1929.39 C 1211.17 1929.39 1236.17 1881.39 1236.17 1863.39 C 1236.17 1861.39 1206.17 1859.39 1169.17 1859.39 C 1053.17 1858.39 976.178 1816.39 936.178 1733.39 C 917.178 1692.39 915.178 1672.39 918.178 1588.39 C 921.178 1498.39 923.178 1488.39 952.178 1447.39 C 975.178 1416.39 999.178 1398.39 1037.17 1382.39 C 1086.17 1362.39 1108.17 1360.39 1273.17 1359.39 C 1486.17 1359.39 1543.17 1369.39 1593.17 1412.39 C 1647.17 1459.39 1666.17 1509.39 1666.17 1606.39 C 1666.17 1719.39 1638.17 1778.39 1562.17 1827.39 C 1526.17 1850.39 1509.17 1854.39 1415.17 1857.39 L 1309.17 1861.39 L 1297.17 1900.39 C 1287.17 1933.39 1288.17 1943.39 1301.17 1961.39 C 1323.17 1994.39 1320.17 2044.39 1294.17 2073.39 C 1265.17 2105.39 1230.17 2112.39 1191.17 2095.39 Z M 1359.17 1799.39 C 1419.17 1798.39 1469.17 1779.39 1452.17 1762.39 C 1448.17 1757.39 1386.17 1753.39 1315.17 1752.39 C 1243.17 1750.39 1176.17 1744.39 1165.17 1739.39 C 1123.17 1716.39 1111.17 1681.39 1110.17 1572.39 C 1110.17 1516.39 1106.17 1466.39 1102.17 1462.39 C 1098.17 1457.39 1086.17 1465.39 1075.17 1478.39 C 1060.17 1496.39 1056.17 1517.39 1056.17 1580.39 C 1056.17 1655.39 1055.17 1660.39 1031.17 1671.39 C 1017.18 1677.39 1006.18 1690.39 1006.18 1699.39 C 1006.18 1726.39 1062.17 1771.39 1108.17 1781.39 C 1167.17 1794.39 1268.17 1807.39 1284.17 1802.39 C 1292.17 1801.39 1325.17 1799.39 1359.17 1799.39 Z M 1314.17 1657.39 C 1321.17 1650.39 1326.17 1624.39 1326.17 1599.39 C 1326.17 1549.39 1313.17 1529.39 1282.17 1529.39 C 1249.17 1529.39 1236.17 1543.39 1230.17 1580.39 C 1221.17 1632.39 1240.17 1669.39 1274.17 1669.39 C 1289.17 1669.39 1307.17 1664.39 1314.17 1657.39 Z M 1545.17 1655.39 C 1552.17 1647.39 1556.17 1620.39 1554.17 1593.39 C 1551.17 1539.39 1528.17 1516.39 1499.17 1535.39 C 1476.17 1549.39 1468.17 1648.39 1488.17 1660.39 C 1508.17 1673.39 1532.17 1671.39 1545.17 1655.39 Z`}),(0,b.jsx)(`path`,{d:`M -65.514 1330.67 C -65.514 1290.67 -61.514 1279.67 -47.514 1276.67 C -30.514 1271.67 -28.514 1256.67 -26.514 1089.67 C -24.514 912.673 -24.514 908.673 -44.514 908.673 C -64.514 908.673 -65.514 902.673 -65.514 804.673 C -65.514 713.673 -63.514 699.673 -47.514 694.673 C -24.514 687.673 155.486 653.673 274.486 634.673 C 939.486 526.673 1794.49 535.673 2469.49 659.673 C 2557.49 675.673 2632.49 688.673 2637.49 688.673 C 2641.49 688.673 2644.49 738.673 2644.49 798.673 C 2644.49 898.673 2642.49 909.673 2627.49 906.673 C 2610.49 903.673 2609.49 918.673 2606.49 1086.67 C 2604.49 1263.67 2604.49 1270.67 2624.49 1275.67 C 2640.49 1279.67 2644.49 1289.67 2644.49 1324.67 C 2644.49 1348.67 2639.49 1368.67 2633.49 1368.67 C 2628.49 1368.67 2593.49 1361.67 2556.49 1353.67 C 2183.49 1272.67 1745.49 1228.67 1184.49 1217.67 C 1069.49 1215.67 622.486 1255.67 389.486 1289.67 C 252.486 1309.67 -42.514 1365.67 -57.514 1374.67 C -62.514 1377.67 -65.514 1357.67 -65.514 1330.67 Z M 169.486 1234.67 C 213.486 1226.67 278.486 1215.67 314.486 1209.67 C 350.486 1204.67 396.486 1196.67 417.486 1193.67 L 454.486 1187.67 L 454.486 1006.67 L 454.486 826.673 L 397.486 832.673 C 336.486 839.673 119.486 874.673 72.486 884.673 L 44.486 890.673 L 44.486 1043.67 C 44.486 1221.67 49.486 1261.67 73.486 1254.67 C 82.486 1251.67 125.486 1243.67 169.486 1234.67 Z M 2526.49 1123.67 C 2527.49 1054.67 2528.49 972.673 2529.49 941.673 L 2529.49 883.673 L 2394.49 862.673 C 2320.49 850.673 2226.49 837.673 2186.49 833.673 L 2114.49 826.673 L 2116.49 1004.67 L 2119.49 1182.67 L 2154.49 1189.67 C 2173.49 1193.67 2250.49 1206.67 2324.49 1218.67 C 2398.49 1230.67 2461.49 1242.67 2463.49 1244.67 C 2465.49 1246.67 2480.49 1248.67 2496.49 1248.67 L 2524.49 1248.67 L 2526.49 1123.67 Z M 709.486 1158.67 C 759.486 1153.67 829.486 1148.67 866.486 1148.67 C 971.486 1148.67 964.486 1161.67 964.486 962.673 L 964.486 788.673 L 922.486 788.673 C 871.486 788.673 612.486 807.673 567.486 814.673 L 534.486 819.673 L 534.486 992.673 C 534.486 1087.67 537.486 1167.67 540.486 1170.67 C 543.486 1173.67 562.486 1174.67 582.486 1172.67 C 602.486 1170.67 660.486 1164.67 709.486 1158.67 Z M 2042.49 995.673 L 2044.49 819.673 L 2012.49 814.673 C 1956.49 805.673 1739.49 788.673 1680.49 788.673 L 1624.49 788.673 L 1626.49 966.673 L 1629.49 1143.67 L 1744.49 1150.67 C 1807.49 1154.67 1895.49 1162.67 1939.49 1166.67 C 1983.49 1171.67 2024.49 1174.67 2029.49 1173.67 C 2035.49 1172.67 2040.49 1103.67 2042.49 995.673 Z M 1542.49 961.673 L 1539.49 783.673 L 1294.49 783.673 L 1049.49 783.673 L 1046.49 961.673 L 1044.49 1138.67 L 1294.49 1138.67 L 1544.49 1138.67 L 1542.49 961.673 Z`})]})})}function YI({projectKey:e,colours:t,hidden:n,titleOf:r,query:i,onQuery:a,onPick:o,onClose:s}){let[c,l]=(0,_.useState)([]),[u,d]=(0,_.useState)(!1),[f,p]=(0,_.useState)(`idle`),[m,h]=(0,_.useState)(0),g=(0,_.useRef)(null);(0,_.useEffect)(()=>g.current?.focus(),[]),(0,_.useEffect)(()=>{if(i.trim()===``){l([]),p(`idle`);return}let t=new AbortController,n=setTimeout(()=>{p(`searching`),Ob(e,i,t.signal).then(e=>{if(e===null)return p(`unavailable`);l(e.hits),d(e.relaxed),h(0),p(`done`)}).catch(e=>{e.name!==`AbortError`&&p(`unavailable`)})},120);return()=>{clearTimeout(n),t.abort()}},[e,i]);let v=e=>e.source===`context`||e.ref!==null,y=e=>{e!==void 0&&v(e)&&o(e)};return(0,b.jsxs)(`aside`,{className:`detail search`,"aria-label":`Search`,children:[(0,b.jsxs)(`div`,{className:`detail__head`,children:[(0,b.jsx)(`span`,{className:`detail__id`,children:`Search`}),(0,b.jsx)(`button`,{className:`detail__close`,onClick:s,"aria-label":`Close`,children:`×`})]}),(0,b.jsx)(`input`,{ref:g,className:`search__input`,type:`search`,placeholder:`Search items, comments and context, or type a ref`,value:i,onChange:e=>a(e.target.value),onKeyDown:e=>{if(e.key===`Escape`)s();else if(e.key===`ArrowDown`)h(e=>Math.min(e+1,c.length-1));else if(e.key===`ArrowUp`)h(e=>Math.max(e-1,0));else if(e.key===`Enter`)y(c[m]);else return;e.preventDefault()},"aria-label":`Search`}),f===`unavailable`&&(0,b.jsx)(`div`,{className:`search__note`,children:`This server cannot search. Reconnect it to pick up the newer code.`}),f===`done`&&c.length===0&&(0,b.jsx)(`div`,{className:`search__note`,children:`Nothing matches.`}),f===`done`&&u&&c.length>0&&(0,b.jsx)(`div`,{className:`search__note`,children:`Nothing has every word, so these have some of them.`}),c.length>0&&(0,b.jsx)(`ul`,{className:`search__hits`,role:`listbox`,children:c.map((e,i)=>(0,b.jsx)(`li`,{role:`option`,"aria-selected":i===m,children:(0,b.jsxs)(`button`,{className:`search__hit`,"data-active":i===m,disabled:!v(e),onMouseEnter:()=>h(i),onClick:()=>y(e),children:[(0,b.jsxs)(`span`,{className:`search__line`,children:[(0,b.jsx)(`span`,{className:`search__source`,children:e.source===`context`?`context`:e.source===`comment`?e.audience===`agent`?`agent comment`:`comment`:`item`}),e.ref!==null&&(0,b.jsx)(`span`,{className:`search__ref`,style:{color:t[e.ref.split(`-`)[0]??``]},children:e.ref}),(0,b.jsx)(`span`,{className:`search__title`,children:e.source===`context`?e.id:e.title??(e.ref===null?``:r(e.ref))}),e.ref!==null&&n.has(e.ref)&&(0,b.jsx)(`span`,{className:`search__hidden`,children:`hidden`})]}),e.snippet!==``&&(0,b.jsx)(`span`,{className:`search__snippet`,children:XI(e.snippet)})]})},`${e.source}:${e.id}`))})]})}function XI(e){return e.replace(/\*\*|__/g,``).split(/⟦|⟧/).map((e,t)=>t%2==1?(0,b.jsx)(`mark`,{children:e},t):e)}var ZI=e=>new Date(e).toLocaleDateString(void 0,{day:`numeric`,month:`short`,year:`numeric`});function QI({comments:e,open:t,onToggle:n}){let[r,i]=(0,_.useState)(!1),a=e.filter(e=>e.audience===`agent`).length,o=r?e:e.filter(e=>e.audience!==`agent`);return(0,b.jsxs)(mb,{title:`Comments`,count:e.length,open:t,onToggle:n,children:[o.length===0&&a===0&&(0,b.jsx)(`p`,{className:`comments__empty`,children:`No comments on this item yet.`}),(0,b.jsx)(`ul`,{className:`comments`,children:o.map(e=>(0,b.jsxs)(`li`,{className:`comment`,"data-agent":e.audience===`agent`,children:[(0,b.jsxs)(`div`,{className:`comment__meta`,children:[(0,b.jsx)(`span`,{children:e.actor}),(0,b.jsx)(`span`,{children:ZI(e.at)}),e.audience===`agent`&&(0,b.jsx)(`span`,{className:`comment__tag`,children:`Claude's note`})]}),(0,b.jsx)(`div`,{className:`comment__body`,children:(0,b.jsx)(lb,{remarkPlugins:[hw],children:e.body})})]},e.id))}),a>0&&(0,b.jsx)(`button`,{className:`comments__toggle`,onClick:()=>i(e=>!e),children:r?`Hide Claude's ${a===1?`note`:`${a} notes`}`:`Show Claude's ${a===1?`note`:`${a} notes`}`})]})}var $I=Object.keys(X);function eL({area:e,name:t,description:n,colour:r,items:i,next:a,hidden:o,onPick:s,onZoom:c,onClose:l}){let u=new Map($I.map(e=>[e,i.filter(t=>t.status===e).length])),d=i.filter(e=>e.status!==`done`),f=u.get(`done`)??0,p=(e,t)=>(0,b.jsx)(`li`,{children:(0,b.jsxs)(`button`,{className:`next__item`,"data-hidden":o.has(e.id),onClick:()=>s(e),title:e.title,children:[(0,b.jsx)(`span`,{className:`next__pos`,style:typeof t==`string`?{color:X[e.status].colour}:void 0,children:t}),(0,b.jsx)(`span`,{className:`next__id`,style:{color:r},children:e.id}),(0,b.jsx)(`span`,{className:`next__title`,children:e.title})]})},e.id);return(0,b.jsxs)(`aside`,{className:`detail`,"aria-label":`Area ${e}`,children:[(0,b.jsxs)(`div`,{className:`detail__head`,children:[(0,b.jsx)(`div`,{className:`area-pane__tools`,children:(0,b.jsxs)(`button`,{className:`chip area-pane__zoom`,onClick:c,children:[(0,b.jsxs)(`svg`,{viewBox:`0 0 16 16`,width:`12`,height:`12`,"aria-hidden":`true`,children:[(0,b.jsx)(`circle`,{cx:`8`,cy:`8`,r:`5`,fill:`none`,stroke:`currentColor`,strokeWidth:`1.5`}),(0,b.jsx)(`circle`,{cx:`8`,cy:`8`,r:`1.6`,fill:`currentColor`}),(0,b.jsx)(`path`,{d:`M8 0.5v2.5M8 13v2.5M0.5 8h2.5M13 8h2.5`,stroke:`currentColor`,strokeWidth:`1.5`})]}),`fit to view`]})}),(0,b.jsx)(`button`,{className:`detail__close`,onClick:l,"aria-label":`Close`,children:`×`})]}),(0,b.jsx)(`h2`,{className:`detail__title area-pane__title`,children:t!==void 0&&t!==e?(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(`span`,{style:{color:r},children:t}),(0,b.jsx)(`span`,{className:`area-pane__key`,children:e})]}):(0,b.jsx)(`span`,{style:{color:r},children:e})}),(0,b.jsxs)(`div`,{className:`area-pane__progress`,children:[(0,b.jsx)(`div`,{className:`area-pane__bar`,role:`img`,"aria-label":`${f} of ${i.length} done`,children:$I.map(e=>(u.get(e)??0)>0?(0,b.jsx)(`span`,{style:{flexGrow:u.get(e),background:X[e].colour},title:`${u.get(e)} ${X[e].label}`},e):null)}),(0,b.jsx)(`div`,{className:`area-pane__counts`,children:$I.filter(e=>(u.get(e)??0)>0).map(e=>(0,b.jsxs)(`span`,{children:[(0,b.jsx)(`span`,{style:{color:X[e].colour},children:X[e].icon}),` `,u.get(e),` `,X[e].label]},e))})]}),n!==void 0&&n!==``&&(0,b.jsx)(`div`,{className:`detail__doc area-pane__description`,children:(0,b.jsx)(lb,{remarkPlugins:[hw],children:n})}),a.length>0&&(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(`div`,{className:`settings__label area-pane__label`,children:`In the next list`}),(0,b.jsx)(`ol`,{className:`next__list area-pane__list`,children:a.map(({item:e,position:t})=>p(e,t))})]}),(0,b.jsx)(`div`,{className:`settings__label area-pane__label`,children:d.length===0?`Nothing open`:`Open (${d.length})`}),d.length>0&&(0,b.jsx)(`ul`,{className:`next__list area-pane__list`,children:d.map(e=>p(e,X[e.status].icon))})]})}var tL={cardsFrom:.35,cardsTo:.1,overviewFrom:.35,overviewTo:.1},nL=(e,t,n)=>t===n?+(e<=n):Math.min(Math.max((t-e)/(t-n),0),1);function rL(){let e=W(e=>e.transform[2]),t=W(e=>e.domNode);return(0,_.useEffect)(()=>{if(t===null)return;let n=1-.7*nL(e,tL.cardsFrom,tL.cardsTo);t.style.setProperty(`--cards`,n.toFixed(3)),t.style.setProperty(`--overview`,nL(e,tL.overviewFrom,tL.overviewTo).toFixed(3)),t.dataset.far=String(nL(e,tL.cardsFrom,tL.cardsTo)>.5)},[e,t]),null}var iL=Object.keys(X).reverse();function aL(e,t,n=new Date){let r=new Date(n.getFullYear(),n.getMonth(),n.getDate()).getTime(),i=864e5,a=e=>{if(e===void 0)return{key:`d:none`,name:`No date`,rank:-1/0};let t=new Date(e);if(t.getTime()>=r)return{key:`d:today`,name:`Today`,rank:1/0};if(t.getTime()>=r-6*i)return{key:`d:week`,name:`This week`,rank:1/0};if(t.getTime()>=r-29*i)return{key:`d:month`,name:`Last 30 days`,rank:1/0};let n=`${t.getFullYear()}-${String(t.getMonth()+1).padStart(2,`0`)}`,a=t.toLocaleDateString(void 0,{month:`long`,year:`numeric`});return{key:`d:${n}`,name:a,rank:t.getFullYear()*12+t.getMonth()}},o=e=>t===`created`?e.created:e.updated,s=new Map;for(let t of[...e].sort((e,t)=>(o(t)??``).localeCompare(o(e)??``))){let{key:e,name:n,rank:r}=a(o(t)),i=s.get(e)??{key:e,name:n,colour:`var(--text)`,items:[],rank:r};i.items.push(t),s.set(e,i)}return[...s.values()].sort((e,t)=>t.rank-e.rank).map(({rank:e,...t})=>t)}function oL(e,t,n){let r=new Map(t.map((e,t)=>[e,t])),i=new Map(n.map((e,t)=>[e.id,t]));return[...e].sort((e,t)=>{if(e.status===`done`&&t.status===`done`)return(t.closed??``).localeCompare(e.closed??``);let[n,a]=[r.get(e.id),r.get(t.id)];return n!==void 0||a!==void 0?(n??1/0)-(a??1/0):i.get(e.id)-i.get(t.id)})}var sL=`next`;function cL({items:e,areas:t,hiddenStatuses:n,next:r,colours:i,areaName:a,selectedId:o,reveal:s,onRevealed:c,onSelect:l,corner:u,group:d=`area`}){let f=iL.filter(e=>!n.has(e)),p=new Map(r.map((e,t)=>[e,t+1])),m=r.flatMap(t=>e.find(e=>e.id===t)??[]),h=d===`area`?t.map(t=>({key:t,name:a(t)??t,caption:a(t)===null?void 0:t,colour:i[t],items:e.filter(e=>e.area===t)})).filter(e=>e.items.length>0):aL(e,d),g=[...m.length>0?[{key:sL,name:`Next`,colour:`var(--text)`,items:m}]:[],...h],v=e=>d===`area`?e.area:h.find(t=>t.items.includes(e))?.key??``,y=()=>new Set([sL,...d!==`area`&&h[0]?[h[0].key]:[]]),[x,S]=(0,_.useState)(y);(0,_.useEffect)(()=>S(y()),[d]);let C=e=>S(t=>{let n=new Set(t);return n.delete(e)||n.add(e),n}),w=(0,_.useRef)(null),T=(0,_.useRef)(null);return(0,_.useEffect)(()=>{if(s===null)return;let t=e.find(e=>e.id===s.ref);if(t===void 0)return;let n=p.has(t.id)&&x.has(sL)?sL:v(t);x.has(n)||S(e=>new Set(e).add(n)),T.current={lane:n,ref:t.id},c?.()},[s,e]),(0,_.useEffect)(()=>{let e=T.current;e!==null&&x.has(e.lane)&&(T.current=null,w.current?.querySelector(`[data-lane="${e.lane}"] [data-ref="${CSS.escape(e.ref)}"]`)?.scrollIntoView({block:`center`,inline:`center`,behavior:`smooth`}))}),g.length===0?(0,b.jsx)(`div`,{className:`board board--empty`,children:`Nothing to show with these filters.`}):(0,b.jsxs)(`div`,{ref:w,className:`board`,role:`grid`,"aria-label":`Board`,style:{"--columns":f.length},children:[(0,b.jsx)(`div`,{className:`board__corner`,role:`columnheader`,children:u}),f.map(t=>(0,b.jsxs)(`div`,{className:`board__column`,role:`columnheader`,style:{"--area":X[t].colour},children:[(0,b.jsx)(`span`,{className:`board__column-icon`,children:X[t].icon}),X[t].label,(0,b.jsx)(`span`,{className:`board__count`,children:e.filter(e=>e.status===t).length})]},t)),g.map(t=>{let n=t.key===sL,a=t.name,s=x.has(t.key);return(0,b.jsxs)(`div`,{className:`board__lane`,role:`row`,"data-lane":t.key,"data-open":s,"data-next":n,style:{"--area":t.colour},children:[(0,b.jsxs)(`button`,{className:`board__lane-head`,role:`rowheader`,"aria-expanded":s,title:a,onClick:()=>C(t.key),children:[(0,b.jsxs)(`span`,{className:`board__lane-name`,children:[(0,b.jsx)(`span`,{className:`board__chevron`,"aria-hidden":`true`,children:s?`▾`:`▸`}),(0,b.jsx)(`span`,{className:`board__lane-text`,children:a})]}),(0,b.jsx)(`span`,{className:`board__lane-key`,children:t.caption===void 0?t.items.length:`${t.caption} · ${t.items.length}`})]}),f.map(c=>{let u=t.items.filter(e=>e.status===c);return(0,b.jsx)(`div`,{className:`board__cell`,role:`gridcell`,"aria-label":`${a} ${c}`,onClick:s?void 0:()=>C(t.key),children:s?(n||d!==`area`?u:oL(u,r,e)).map(e=>(0,b.jsxs)(`button`,{"data-ref":e.id,className:`board__card`,"data-on":e.id===o,"data-strike":X[e.status].strike,style:{"--area":i[e.area]},onClick:()=>l(e.id),title:`${e.id} [${X[e.status].label}] ${e.title}`,children:[(0,b.jsxs)(`span`,{className:`board__card-head`,children:[(0,b.jsx)(`span`,{className:`board__ref`,children:e.id}),(0,b.jsx)(`span`,{className:`board__status`,style:{color:X[e.status].colour},children:X[e.status].icon}),p.has(e.id)&&(0,b.jsxs)(`span`,{className:`board__next`,title:`Number ${p.get(e.id)} in the next list`,children:[`#`,p.get(e.id)]})]}),(0,b.jsx)(`span`,{className:`board__title`,children:e.title})]},e.id)):u.length>0&&(0,b.jsx)(`span`,{className:`board__folded`,children:u.length})},c)})]},t.key)})]})}var lL={item:CE,area:wE,ticket:DE,ghost:OE,overview:EE},uL=Object.keys(X),dL=[`status`,`area`],fL=20,pL=[],mL=[],hL=[],gL=[`graph`,`calendar`,`board`],_L=e=>(0,b.jsx)(`svg`,{viewBox:`0 0 24 24`,width:`16`,height:`16`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,"aria-hidden":`true`,children:e}),vL=()=>_L((0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(`rect`,{x:`3`,y:`5`,width:`18`,height:`16`,rx:`2`}),(0,b.jsx)(`path`,{d:`M3 10h18M8 3v4M16 3v4`})]})),yL=()=>_L((0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(`rect`,{x:`3`,y:`4`,width:`5`,height:`16`,rx:`1.5`}),(0,b.jsx)(`rect`,{x:`10`,y:`4`,width:`5`,height:`10`,rx:`1.5`}),(0,b.jsx)(`rect`,{x:`17`,y:`4`,width:`4`,height:`13`,rx:`1.5`})]})),bL={graph:()=>(0,b.jsx)(xL,{}),calendar:()=>(0,b.jsx)(vL,{}),board:()=>(0,b.jsx)(yL,{})},xL=()=>_L((0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(`circle`,{cx:`6`,cy:`6`,r:`2.5`}),(0,b.jsx)(`circle`,{cx:`18`,cy:`8`,r:`2.5`}),(0,b.jsx)(`circle`,{cx:`9`,cy:`18`,r:`2.5`}),(0,b.jsx)(`path`,{d:`M8.3 7.2l7.4 0.6M7 8.4l1.6 7.2`})]})),SL=()=>_L((0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(`circle`,{cx:`11`,cy:`11`,r:`6.5`}),(0,b.jsx)(`path`,{d:`M20 20l-4.2-4.2`})]})),CL=()=>_L((0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(`path`,{d:`M12 3v18M3 12h18`}),(0,b.jsx)(`path`,{d:`M9 6l3-3 3 3M9 18l3 3 3-3M6 9l-3 3 3 3M18 9l3 3-3 3`})]})),wL=()=>_L((0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(`circle`,{cx:`12`,cy:`5`,r:`1.4`}),(0,b.jsx)(`circle`,{cx:`12`,cy:`12`,r:`1.4`}),(0,b.jsx)(`circle`,{cx:`12`,cy:`19`,r:`1.4`})]})),TL=()=>_L((0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(`path`,{d:`M4 7h10M18 7h2M4 17h4M12 17h8`}),(0,b.jsx)(`circle`,{cx:`16`,cy:`7`,r:`2`}),(0,b.jsx)(`circle`,{cx:`10`,cy:`17`,r:`2`})]})),EL=()=>_L((0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(`path`,{d:`M9 4l-6 2v14l6-2 6 2 6-2V4l-6 2-6-2z`}),(0,b.jsx)(`path`,{d:`M9 4v14M15 6v14`})]}));function DL(e,t,n){let[r,i]=(0,_.useState)(()=>{try{let r=localStorage.getItem(e);return n.includes(r)?r:t}catch{return t}});return[r,(0,_.useCallback)(t=>{i(t);try{localStorage.setItem(e,t)}catch{}},[e])]}var OL=e=>new Date(`${e}T00:00:00Z`).toLocaleDateString(void 0,{weekday:`short`,day:`numeric`,month:`short`,year:`numeric`,timeZone:`UTC`});function kL({plan:e,selection:t,focus:n,reload:r}){let i=t.project,{MenuActions:a,EmptyPlan:o}=_w(),s=i?.key??``,c=i?.items??mL,l=(0,_.useMemo)(()=>xw(c),[c]),u=(0,_.useMemo)(()=>ST(l,i?.areaOrder),[l,i?.areaOrder]),d=e=>{let t=i?.areaInfo[e]?.name;return t===void 0||t===e?null:t},[f,p]=(0,_.useState)(new Set),[m,h]=(0,_.useState)(new Set([`done`])),[g,v]=(0,_.useState)(`area`),[y,x]=(0,_.useState)(null),S=y===`view`,C=y===`more`,[w,T]=(0,_.useState)(()=>n===null&&(typeof window>`u`||window.innerWidth>=700)?`next`:null),[E,D]=(0,_.useState)(``),[O,k]=(0,_.useState)(null);(0,_.useEffect)(()=>{let e=e=>{let t=e.target,n=t!==null&&(t.isContentEditable||[`INPUT`,`TEXTAREA`,`SELECT`].includes(t.tagName));!(e.key===`k`&&(e.metaKey||e.ctrlKey)||e.key===`/`&&!n)||n&&e.key===`/`||(e.preventDefault(),re(`search`))};return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},[]),(0,_.useEffect)(()=>{if(y===null)return;let e=e=>e.key===`Escape`&&x(null);return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},[y]);let[A,j]=(0,_.useState)(!1),[M,N]=(0,_.useState)(null),[P,F]=(0,_.useState)(Lb(n)===null?n:null),[I,L]=(0,_.useState)(()=>{let e=Lb(n);return e===null?null:{heading:e}}),ee=(0,_.useCallback)(e=>{F(null),te(null),T(null),L({heading:e})},[]),[R,te]=(0,_.useState)(null),ne=(0,_.useCallback)(e=>{F(null),L(null),T(null),te(e)},[]);function re(e){F(null),L(null),te(null),T(e)}let ie=e=>{k(null),typeof e==`string`?re(e):ne(e.area)};(0,_.useEffect)(()=>{P!==null&&(L(null),te(null),T(null))},[P]);let ae=I?.heading??null;(0,_.useEffect)(()=>{if(i===null)return;let e=`#${encodeURIComponent(i.key)}`,t=ae===null?null:`${e}/${encodeURIComponent(Ib+ae)}`,n=window.location.hash;t!==null&&n!==t&&history.replaceState(null,``,t),t===null&&Lb(decodeURIComponent(n.slice(e.length+1)))!==null&&history.replaceState(null,``,e)},[ae,i]);let[oe,se]=(0,_.useState)(new Set),ce=(0,_.useCallback)(e=>{se(t=>{if(!t.has(e))return t;let n=new Set(t);return n.delete(e),n})},[]);(0,_.useEffect)(()=>{let e=P?.split(`-`)[0];e!==void 0&&ce(e)},[P,ce]),(0,_.useEffect)(()=>{let e=Lb(n);e===null?F(n):ee(e)},[n,ee]);let[z,le]=DL(`attraverso.view`,`graph`,gL),[ue,de]=DL(`attraverso.calendar.dates`,`planned`,[`planned`,`created`,`updated`]),[fe,pe]=DL(`attraverso.board.group`,`area`,[`area`,`created`,`updated`]),me=typeof window<`u`&&window.innerWidth<700,[he,ge]=DL(me?`attraverso.minimap.narrow`:`attraverso.minimap.wide`,me?`hidden`:`shown`,[`shown`,`hidden`]),[_e,ve]=DL(`attraverso.calendar.span`,`all`,[`project`,`all`]),ye=_e===`all`&&e.projects.length>1,[be,xe]=(0,_.useState)(null),[Se,Ce]=(0,_.useState)(null),[we,Te]=(0,_.useState)(0),[Ee,De]=(0,_.useState)(()=>new Set([`images`,`comments`])),Oe=e=>({open:!Ee.has(e),onToggle:()=>De(t=>Ct(t,e))}),ke=(0,_.useMemo)(()=>(i?.next??hL).flatMap(e=>c.find(t=>t.id===e)??[]),[i,c]),Ae=w===`next`&&(ke.length===0||z===`board`)?null:w,[je,Me]=(0,_.useState)(()=>{try{let e=Number(window.localStorage.getItem(AL));return e>=ML?e:jL}catch{return jL}}),Ne=e=>{e.preventDefault();let t=e.clientX,n=je,r=n,i=e=>{r=Math.round(Math.min(Math.max(n+t-e.clientX,ML),window.innerWidth-80)),Me(r)},a=()=>{window.removeEventListener(`pointermove`,i),window.removeEventListener(`pointerup`,a);try{window.localStorage.setItem(AL,String(r))}catch{}};window.addEventListener(`pointermove`,i),window.addEventListener(`pointerup`,a)},Pe=(0,_.useMemo)(()=>{let e=new Set;for(let t of c)for(let n of t.deps)e.add(n).add(t.id);return e},[c]),Fe=(0,_.useMemo)(()=>c.filter(e=>!f.has(e.area)&&!m.has(e.status)),[c,f,m]),Ie=(0,_.useMemo)(()=>ZT(c,f,m),[c,f,m]),Le=(0,_.useMemo)(()=>{let e=(e,t)=>e===t||e.startsWith(`${t}.`)||t.startsWith(`${e}.`),t=new Map,n=(e,n)=>{let r=t.get(e)??new Set;r.add(n),t.set(e,r)};for(let t of c)for(let r of t.deps)e(r,t.id)||(Ie.has(t.id)&&!Ie.has(r)&&n(r,t.id),Ie.has(r)&&!Ie.has(t.id)&&n(t.id,r));return t},[c,Ie]),[Re,ze]=Ef([]),Be=(0,_.useRef)(null),[Ve,He]=(0,_.useState)(null),[Ue,We]=(0,_.useState)(!1),[Ge,Ke]=(0,_.useState)(null);(0,_.useEffect)(()=>We(!1),[P]);let[qe,Je]=(0,_.useState)(!1);(0,_.useEffect)(()=>{z!==`graph`&&Je(!1)},[z]),(0,_.useEffect)(()=>{if(Ve===null||Be.current===null||!qe)return;let e=Re.find(e=>e.id===Ve);if(e===void 0||e.hidden===!0)return;let t=Ve.startsWith(`area:`),n=Be.current;requestAnimationFrame(()=>void n.fitView({nodes:[{id:Ve}],duration:400,maxZoom:t?1.2:1.1,padding:t?.08:.6})),He(null)},[Ve,Re,qe]);let Ye=e=>{p(t=>t.has(e)?Ct(t,e):t),He(`area:${e}`),me&&x(null)},[Xe,Ze,Qe]=Df([]),$e=(0,_.useMemo)(()=>bb(),[]),et=(0,_.useRef)($e?i?.layout??{}:(()=>{let e=FE(s);return Object.keys(e).length>0?e:i?.layout??{}})()),tt=(0,_.useRef)(null),nt=(0,_.useRef)(!1),rt=(0,_.useCallback)(e=>{if(!$e)return IE(s,e);tt.current!==null&&clearTimeout(tt.current),tt.current=setTimeout(()=>{tt.current=null,Tb(s,e).catch(t=>{console.warn(`the layout could not be saved to the plan; keeping it in this browser`,t),IE(s,e)})},400)},[s,$e]),it=(0,_.useRef)(LE(s)),at=(0,_.useRef)(new Map),ot=(0,_.useRef)({}),st=(0,_.useCallback)(e=>{let t=[],n=!1;for(let r of e)r.type===`position`?(r.position&&(ot.current[r.id]=r.position),r.dragging===!1&&t.push(r.id)):r.type===`dimensions`&&r.dimensions&&r.resizing!==void 0&&(it.current[r.id]=r.dimensions,r.resizing===!1&&(n=!0));n&&RE(s,it.current);let r=new Map(e.flatMap(e=>e.type===`dimensions`&&e.resizing!==void 0&&e.dimensions&&e.id.startsWith(`area:`)?[[`overview:${e.id.slice(5)}`,e.dimensions]]:[]));if(ze(t=>{let n=eu(e,t);return r.size===0?n:n.map(e=>{let t=r.get(e.id);return t===void 0?e:{...e,style:{...e.style,width:t.width,height:t.height}}})}),t.length>0){for(let e of t){let t=ot.current[e];t&&(et.current={...et.current,[e]:bE(at.current.get(e),t)}),delete ot.current[e]}nt.current=!0,Te(e=>e+1)}},[s,ze]),ct=(0,_.useCallback)(()=>{window.confirm(`Lay the map out afresh? Everything moves, including anything you arranged by hand.`)&&(zE(s),et.current={},it.current={},nt.current=!0,Te(e=>e+1))},[s]),lt=(0,_.useRef)(i?.layout??{});(0,_.useEffect)(()=>{let e=i?.layout??{};$e&&!NL(e,lt.current)&&(lt.current=e,tt.current!==null||nt.current||NL(e,et.current)||(et.current=e,Te(e=>e+1)))},[i?.layout,$e]),(0,_.useEffect)(()=>{let e=vE(c,l,u,g,P,Ie,et.current);at.current=new Map(e.map(e=>[e.id,e.parentId]));let t=yE(e);(nt.current||!NL(t,et.current))&&(nt.current=!1,et.current=t,rt(t));let n=c.filter(e=>!Ie.has(e.id)),r=e;if(n.length<c.length||oe.size>0){let i=new Map(e.map(e=>[e.id,e])),a=vE(n,xw(n),u,g,P,new Set,t,oe,`neighbours`),o=new Set(a.map(e=>e.id)),s=e=>e.type!==`ghost`&&oe.has(e.type===`overview`?e.data.area:e.id.split(`-`)[0]??``);r=[...a.map(e=>e.type===`area`&&e.data.collapsed!==void 0?e:{...e,data:i.get(e.id)?.data??e.data}),...e.filter(e=>!o.has(e.id)).map(e=>s(e)?{...e,hidden:!0}:e)]}ze(e=>{let t=new Set(e.filter(e=>e.selected===!0).map(e=>e.id));return r.map(e=>{let n=it.current[e.type===`overview`?`area:${e.data.area}`:e.id],r=n?{...e,style:{...e.style,width:n.width,height:n.height}}:e,a=e.type===`area`||e.type===`overview`?i?.areaInfo[e.data.area]:void 0;return a!==void 0&&(r={...r,data:{...r.data,name:a.name,description:a.description}}),t.has(e.id)?{...r,selected:!0}:r})})},[c,l,u,g,P,Ie,oe,we,rt,ze,i?.areaInfo]),(0,_.useEffect)(()=>{Ze(xE(c,u,g,P,be,Se,Ie,oe))},[c,u,g,P,be,Se,Ie,oe,Ze]);let ut=(0,_.useRef)(new Set);(0,_.useEffect)(()=>{let e=(be?Le.get(be):void 0)??new Set,t=ut.current;(e.size!==0||t.size!==0)&&(ze(n=>n.map(n=>{if(e.has(n.id))return{...n,hidden:!1,style:{...n.style,opacity:.42}};if(t.has(n.id)){let e={...n.style};return delete e.opacity,{...n,hidden:Ie.has(n.id),style:e}}return n})),ut.current=e)},[be,Le,Ie,ze]),(0,_.useEffect)(()=>{if(!A)return;let e=e=>e.key===`Escape`&&j(!1);return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},[A]);let B=P?c.find(e=>e.id===P)??null:null,dt=B!==null||I!==null||R!==null||Ae!==null,ft=(0,_.useRef)(null);(0,_.useEffect)(()=>{let e=ft.current;if(!dt||e===null)return;let t=()=>{let t=e.querySelector(`.detail`),n=t!==null&&t.scrollHeight-t.scrollTop-t.clientHeight>2;e.dataset.more=String(n)};t(),e.addEventListener(`scroll`,t,!0);let n=new MutationObserver(t);n.observe(e,{childList:!0,subtree:!0,characterData:!0});let r=new ResizeObserver(t);return r.observe(e),()=>{e.removeEventListener(`scroll`,t,!0),n.disconnect(),r.disconnect()}},[dt]);let pt=(0,_.useMemo)(()=>ST(e.projects.map(e=>e.key)),[e.projects]),[mt,ht]=(0,_.useState)(new Set),gt=(0,_.useMemo)(()=>{let t=(e,t)=>g===`status`?X[e.status].colour:t[e.area];return ye?e.projects.filter(e=>!mt.has(e.key)).flatMap(e=>{let n=e.key===i?.key?u:ST(xw(e.items),e.areaOrder);return e.items.filter(e=>!m.has(e.status)).map(r=>({project:e.key,item:r,colour:t(r,n),projectColour:pt[e.key]}))}):i?Fe.map(e=>({project:i.key,item:e,colour:t(e,u)})):[]},[ye,e.projects,mt,m,pt,i,Fe,g,u]),_t=(0,_.useMemo)(()=>gt.filter(e=>WI(e.item,ue)!==null).length,[gt,ue]),vt=(e,t)=>{e===i?.key?F(t):window.location.hash=`${encodeURIComponent(e)}/${encodeURIComponent(t)}`},[yt,bt]=(0,_.useState)(null),xt=B?.id??null;(0,_.useEffect)(()=>{if(xt===null||i===null)return bt(null);let e=new AbortController;return bt(e=>e!==null&&e.ref===xt?e:{ref:xt,state:`loading`}),Db(i.key,xt,e.signal).then(e=>bt(e??{ref:xt,state:`missing`})).catch(e=>{e.name!==`AbortError`&&bt({ref:xt,state:`failed`})}),()=>e.abort()},[xt,i,e]);let St=yt!==null&&`body`in yt&&yt.ref===xt?yt:null,Ct=(e,t)=>{let n=new Set(e);return n.has(t)?n.delete(t):n.add(t),n},wt=e=>{if(e.source===`context`)return ee(e.id);let t=e.ref===null?void 0:c.find(t=>t.id===e.ref);t!==void 0&&(Et(t),k(`search`))},Tt=(e,t)=>{We(!1),Ie.has(e.id)&&(h(t=>t.has(e.status)?Ct(t,e.status):t),p(t=>t.has(e.area)?Ct(t,e.area):t)),le(t),t===`graph`&&He(e.id),t===`board`&&N({ref:e.id,nonce:Date.now()});let n=WI(e,ue);t===`calendar`&&n!==null&&Ke({date:n.start,nonce:Date.now()})},Et=e=>{Ie.has(e.id)&&(h(t=>t.has(e.status)?Ct(t,e.status):t),p(t=>t.has(e.area)?Ct(t,e.area):t)),z===`board`?N({ref:e.id,nonce:Date.now()}):(le(`graph`),He(e.id)),F(e.id)},Dt=(e,t)=>{(t.type===`item`||t.type===`ticket`)&&(F(t.data.item.id),k(null));let n=t.data;t.type===`area`&&n.area!==void 0&&(n.collapsed===void 0?n.foreign!==!0&&ne(n.area):ce(n.area))},Ot=(e,t)=>{let n=t.data;if(t.type===`area`&&n.collapsed===void 0&&n.foreign!==!0&&n.area!==void 0){let e=n.area;se(t=>new Set(t).add(e)),P?.split(`-`)[0]===e&&F(null)}},kt=(e,t)=>{Pe.has(t.id)&&xe(t.id)},At=()=>xe(null),jt=(e,t)=>Ce(t.id),Mt=()=>Ce(null),Nt=(0,_.useMemo)(()=>{let e=new Map,t=new Map;for(let n of c)e.set(n.area,(e.get(n.area)??0)+1),t.set(n.status,(t.get(n.status)??0)+1);return{byArea:e,byStatus:t}},[c]),Pt=c.length-Fe.length,Ft=i!==null&&i.context.length>0&&(0,b.jsxs)(`button`,{className:`next-fab`,"data-on":I!==null,onClick:()=>I===null?ee(null):L(null),title:`The project's context sections: what it is, and how it is worked on`,children:[(0,b.jsx)(`span`,{className:`next-fab__label`,children:`Context`}),(0,b.jsx)(`span`,{className:`chip__count`,children:i.context.length})]});return(0,b.jsxs)(`div`,{className:`app`,children:[(0,b.jsxs)(`header`,{className:`topbar`,children:[(0,b.jsx)(`div`,{className:`topbar__title`,children:(0,b.jsxs)(`span`,{className:`picker-wrap`,children:[(0,b.jsx)(JI,{className:`picker__logo`,crop:`icon`}),(()=>{let t=i?.file??(e.storePath===null?null:e.storePath.split(`,`)[0].split(`/`).pop()),n=t!==null&&(0,b.jsx)(`span`,{className:`picker__file`,title:e.storePath??void 0,children:t});return e.projects.length<=1?(0,b.jsxs)(`span`,{className:`picker picker--static`,children:[(0,b.jsx)(`strong`,{className:`picker__name`,children:i?.name??`no project`}),n]}):(0,b.jsxs)(`label`,{className:`picker`,title:`Switch project`,children:[(0,b.jsx)(`span`,{className:`picker__name`,children:i?.name??`choose a project`}),n,(0,b.jsxs)(`select`,{className:`picker__native`,"aria-label":`Project`,value:i?.key??``,onChange:e=>{window.location.hash=e.target.value},children:[i===null&&(0,b.jsx)(`option`,{value:``,children:`choose a project`}),e.projects.map(e=>(0,b.jsx)(`option`,{value:e.key,children:e.name},e.key))]})]})})()]})}),(0,b.jsxs)(`div`,{className:`filters`,children:[(0,b.jsx)(`div`,{className:`view-tabs`,role:`tablist`,"aria-label":`View`,children:gL.map(e=>(0,b.jsxs)(`button`,{className:`toolbtn`,role:`tab`,"aria-selected":e===z,"data-on":e===z,title:`Show the ${e}`,onClick:()=>le(e),children:[(0,b.jsx)(`span`,{className:`toolbtn__main`,children:bL[e]()}),(0,b.jsx)(`span`,{className:`toolbtn__sub`,children:e})]},e))}),(0,b.jsxs)(`button`,{className:`toolbtn`,"data-on":Ae===`search`,"aria-label":`Search`,title:`Search (/ or Cmd+K)`,onClick:()=>Ae===`search`?T(null):re(`search`),children:[(0,b.jsx)(`span`,{className:`toolbtn__main`,children:(0,b.jsx)(SL,{})}),(0,b.jsx)(`span`,{className:`toolbtn__sub`,children:`search`})]}),(0,b.jsxs)(`button`,{className:`toolbtn`,"data-on":S,"aria-haspopup":`dialog`,"aria-expanded":S,"aria-label":`View settings`,onClick:()=>x(S?null:`view`),children:[(0,b.jsxs)(`span`,{className:`toolbtn__main`,children:[(0,b.jsx)(TL,{}),(0,b.jsx)(`span`,{className:`toolbtn__text`,children:`view`})]}),(0,b.jsx)(`span`,{className:`toolbtn__sub`,children:Pt>0?`${Pt} hidden`:`all shown`}),Pt>0&&(0,b.jsx)(`span`,{className:`toolbtn__badge`,"aria-hidden":`true`,children:Pt})]}),(0,b.jsx)(`button`,{className:`toolbtn toolbtn--icon`,"data-on":C,"aria-haspopup":`menu`,"aria-expanded":C,"aria-label":`More`,title:`More`,onClick:()=>x(C?null:`more`),children:(0,b.jsx)(wL,{})})]}),S&&(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(`div`,{className:`settings__backdrop`,onClick:()=>x(null)}),(0,b.jsxs)(`div`,{className:`settings`,role:`dialog`,"aria-label":`View settings`,children:[(0,b.jsxs)(`div`,{className:`settings__head`,title:e.storePath??void 0,children:[i?.name??`No project`,e.storePath!==null&&` - ${i?.file??e.storePath.split(`/`).pop()}`]}),!(z===`calendar`&&ye)&&(0,b.jsx)(`div`,{className:`settings__label`,children:`Areas`}),!(z===`calendar`&&ye)&&(0,b.jsx)(`div`,{className:`filters__group`,children:l.map(e=>z===`graph`?(0,b.jsxs)(`span`,{className:`chip-pair`,"data-off":f.has(e),children:[(0,b.jsxs)(`button`,{className:`chip`,style:{"--area":u[e]},onClick:()=>Ye(e),title:f.has(e)?`Show ${e} and zoom to it`:`Zoom to ${e}`,children:[(0,b.jsx)(`span`,{className:`chip__name`,children:d(e)??e}),d(e)!==null&&(0,b.jsx)(`span`,{className:`chip__key`,children:e}),(0,b.jsx)(`span`,{className:`chip__count`,children:Nt.byArea.get(e)})]}),(0,b.jsx)(`button`,{className:`chip chip--eye`,onClick:()=>p(t=>Ct(t,e)),title:f.has(e)?`Show ${e}`:`Hide ${e}`,"aria-label":f.has(e)?`Show ${e}`:`Hide ${e}`,children:(0,b.jsxs)(`svg`,{viewBox:`0 0 16 16`,width:`13`,height:`13`,"aria-hidden":`true`,children:[(0,b.jsx)(`path`,{d:`M1 8s2.6-4.5 7-4.5S15 8 15 8s-2.6 4.5-7 4.5S1 8 1 8z`,fill:`none`,stroke:`currentColor`,strokeWidth:`1.4`}),(0,b.jsx)(`circle`,{cx:`8`,cy:`8`,r:`2`,fill:`currentColor`}),f.has(e)&&(0,b.jsx)(`path`,{d:`M2.5 13.5l11-11`,stroke:`currentColor`,strokeWidth:`1.4`})]})})]},e):(0,b.jsxs)(`button`,{className:`chip`,"data-off":f.has(e),style:{"--area":u[e]},onClick:()=>p(t=>Ct(t,e)),children:[(0,b.jsx)(`span`,{className:`chip__name`,children:d(e)??e}),d(e)!==null&&(0,b.jsx)(`span`,{className:`chip__key`,children:e}),(0,b.jsx)(`span`,{className:`chip__count`,children:Nt.byArea.get(e)})]},e))}),!(z===`calendar`&&ye)&&(0,b.jsxs)(`div`,{className:`settings__row`,children:[(0,b.jsx)(`button`,{className:`chip`,disabled:f.size===0,onClick:()=>p(new Set),children:`show all`}),(0,b.jsx)(`button`,{className:`chip`,disabled:l.every(e=>f.has(e)),onClick:()=>p(new Set(l)),children:`hide all`})]}),(0,b.jsx)(`div`,{className:`settings__label`,children:`Statuses`}),(0,b.jsx)(`div`,{className:`filters__group`,children:uL.map(e=>(0,b.jsxs)(`button`,{className:`chip`,"data-off":m.has(e),style:{"--area":X[e].colour},onClick:()=>h(t=>Ct(t,e)),children:[(0,b.jsx)(`span`,{className:`chip__dot`}),X[e].label,(0,b.jsx)(`span`,{className:`chip__count`,children:Nt.byStatus.get(e)??0})]},e))}),(0,b.jsx)(`div`,{className:`settings__row`,children:z===`calendar`&&e.projects.length>1&&(0,b.jsx)(`button`,{className:`chip`,"data-on":ye,onClick:()=>ve(ye?`project`:`all`),title:`Show every project's dated items on one calendar, coloured by project`,children:`all projects`})}),z===`graph`&&(0,b.jsx)(`div`,{className:`settings__label`,children:`Layout`}),(0,b.jsxs)(`div`,{className:`settings__row`,children:[z===`graph`&&(0,b.jsx)(`button`,{className:`chip`,disabled:oe.size===0,onClick:()=>se(new Set),title:`Open every area. Click a folded area to open just that one`,children:`expand all`}),z===`graph`&&(0,b.jsx)(`button`,{className:`chip`,disabled:l.every(e=>oe.has(e)),onClick:()=>{F(null),se(new Set(l))},title:`Fold every area into a summary. Double-click an open area's frame to fold just that one`,children:`collapse all`})]})]})]}),C&&(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(`div`,{className:`settings__backdrop`,onClick:()=>x(null)}),(0,b.jsxs)(`div`,{className:`settings settings--more`,role:`menu`,"aria-label":`More`,children:[(0,b.jsx)(`div`,{className:`settings__label`,children:`Colour cards by`}),(0,b.jsx)(`div`,{className:`segmented`,role:`group`,"aria-label":`Colour by`,children:dL.map(e=>(0,b.jsx)(`button`,{className:`segmented__btn`,"data-on":g===e,onClick:()=>v(e),children:e},e))}),z===`board`&&(0,b.jsx)(`div`,{className:`settings__label`,children:`Group board by`}),z===`board`&&(0,b.jsx)(`div`,{className:`segmented`,role:`group`,"aria-label":`Group board by`,children:[`area`,`created`,`updated`].map(e=>(0,b.jsx)(`button`,{className:`segmented__btn`,"data-on":fe===e,onClick:()=>pe(e),children:e===`updated`?`modified`:e},e))}),z===`graph`&&(0,b.jsx)(`div`,{className:`settings__label`,children:`Layout`}),z===`graph`&&(0,b.jsx)(`button`,{className:`chip`,onClick:()=>{x(null),ct()},title:`Lay the map out afresh, forgetting where everything was`,children:`reset layout`}),a!==void 0&&(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(`div`,{className:`settings__label`,children:`Plan`}),(0,b.jsx)(`div`,{className:`settings__row`,children:(0,b.jsx)(a,{plan:e,project:i,reload:r})})]})]})]})]}),(0,b.jsxs)(`div`,{className:`body`,"data-pane":dt?`open`:void 0,"data-view":z,children:[(0,b.jsxs)(`div`,{className:`graph`,children:[e.projects.length===0&&o!==void 0?(0,b.jsx)(`div`,{className:`graph__notice`,children:(0,b.jsx)(o,{reload:r})}):t.notice!==null&&!(z===`calendar`&&ye)?(0,b.jsx)(`div`,{className:`graph__notice`,children:t.notice}):z===`calendar`&&_t===0&&(0,b.jsx)(`div`,{className:`graph__notice`,children:ue===`planned`?(0,b.jsxs)(b.Fragment,{children:[`Nothing here has a date yet. Give an item a `,(0,b.jsx)(`code`,{children:`due`}),` (or a `,(0,b.jsx)(`code`,{children:`start`}),`) with`,` `,(0,b.jsx)(`code`,{children:`edit_item`}),` and it appears on the calendar.`,(0,b.jsxs)(`div`,{className:`graph__notice-actions`,children:[(0,b.jsx)(`button`,{className:`chip`,onClick:()=>de(`created`),children:`show when items were filed`}),(0,b.jsx)(`button`,{className:`chip`,onClick:()=>de(`updated`),children:`show when they last changed`})]})]}):(0,b.jsxs)(b.Fragment,{children:[`Nothing here records when it was `,ue===`created`?`filed`:`last changed`,`.`]})}),z===`graph`&&i!==null&&(0,b.jsxs)(`div`,{className:`fabs`,children:[ke.length>0&&(0,b.jsxs)(`button`,{className:`next-fab`,"data-on":Ae===`next`,onClick:()=>Ae===`next`?T(null):re(`next`),title:`The order agreed with set_next`,children:[`Next`,(0,b.jsx)(`span`,{className:`chip__count`,children:ke.length})]}),Ft,z===`graph`&&(0,b.jsxs)(`button`,{className:`next-fab`,"data-on":A,"aria-pressed":A,title:A?`Done moving (Esc)`:`Move and resize cards and areas`,onClick:()=>j(!A),children:[(0,b.jsx)(CL,{}),A?`Done`:`Move`]})]}),z===`board`&&i!==null?(0,b.jsx)(cL,{corner:Ft,group:fe,items:Fe,areas:l,hiddenStatuses:m,next:ke.map(e=>e.id),colours:u,areaName:d,selectedId:P,reveal:M,onRevealed:()=>N(null),onSelect:e=>{F(e),k(null)}}):z===`calendar`?(0,b.jsx)(KI,{entries:gt,multiProject:ye,focus:Ge,projects:ye?e.projects.map(e=>({key:e.key,name:e.name,colour:pt[e.key],hidden:mt.has(e.key),toggle:()=>ht(t=>Ct(t,e.key))})):void 0,dates:ue,onDates:de,nextList:ke.length===0?void 0:{count:ke.length,open:Ae===`next`,toggle:()=>Ae===`next`?T(null):re(`next`)},selected:i&&P?{project:i.key,ref:P}:null,onSelect:vt}):(0,b.jsxs)(Tf,{nodes:Re,edges:Xe,nodeTypes:lL,onNodesChange:st,onEdgesChange:Qe,onInit:e=>{Be.current=e,Je(!0)},onNodeClick:Dt,onNodeDoubleClick:Ot,zoomOnDoubleClick:!1,onNodeMouseEnter:kt,onNodeMouseLeave:At,onEdgeMouseEnter:jt,onEdgeMouseLeave:Mt,onPaneClick:()=>F(null),nodesDraggable:A,className:A?`is-moving`:void 0,nodesConnectable:!1,fitView:!0,snapToGrid:!0,snapGrid:[fL,fL],minZoom:.05,maxZoom:1.75,proOptions:{hideAttribution:!0},children:[(0,b.jsx)(Pf,{gap:fL,color:`#232a33`}),(0,b.jsx)(rL,{}),he===`shown`&&(0,b.jsx)(op,{pannable:!0,zoomable:!0,nodeColor:e=>e.type===`overview`?`transparent`:e.data.colour??`#2b3644`,nodeStrokeColor:`#0b0f14`,nodeBorderRadius:4,maskColor:`rgba(11,15,20,0.6)`}),(0,b.jsx)(Uf,{showInteractive:!1,children:(0,b.jsx)(Bf,{onClick:()=>ge(he===`shown`?`hidden`:`shown`),title:he===`shown`?`Hide the minimap`:`Show the minimap`,"aria-label":he===`shown`?`Hide the minimap`:`Show the minimap`,children:(0,b.jsx)(EL,{})})})]})]}),dt&&(0,b.jsxs)(`div`,{className:`pane`,ref:ft,style:{width:je},children:[(0,b.jsx)(`div`,{className:`pane__resize`,onPointerDown:Ne,title:`Drag to resize`,"aria-hidden":`true`}),B&&(0,b.jsxs)(`aside`,{className:`detail`,children:[(0,b.jsxs)(`div`,{className:`detail__head`,children:[(0,b.jsxs)(`div`,{children:[O!==null&&(0,b.jsx)(`button`,{className:`detail__close detail__back`,onClick:()=>ie(O),"aria-label":`Back to ${typeof O==`string`?O===`next`?`Next`:`Search`:O.area}`,title:`Back to ${typeof O==`string`?O===`next`?`Next`:`Search`:O.area}`,children:`‹`}),(0,b.jsx)(`span`,{className:`detail__id`,style:{color:u[B.area]},children:B.id}),i&&(0,b.jsx)(VE,{projectKey:i.key,ref_:B.id,status:B.status,reload:r})]}),(0,b.jsxs)(`div`,{className:`detail__tools`,children:[(0,b.jsx)(`button`,{className:`detail__icon`,"aria-label":`Show this item in`,"aria-haspopup":`menu`,"aria-expanded":Ue,title:`Show it in the graph, calendar or board`,onClick:()=>We(e=>!e),children:(0,b.jsx)(wL,{})}),(0,b.jsx)(`button`,{className:`detail__close`,onClick:()=>F(null),"aria-label":`Close`,children:`×`}),Ue&&(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(`div`,{className:`settings__backdrop`,onClick:()=>We(!1)}),(0,b.jsxs)(`div`,{className:`item-menu`,role:`menu`,"aria-label":`Show this item in`,children:[i!==null&&bb()&&B.status!==`done`&&(0,b.jsxs)(`button`,{role:`menuitem`,className:`item-menu__row`,onClick:()=>{let e=ke.some(e=>e.id===B.id);We(!1),wb(i.key,B.id,!e).catch(e=>window.alert(e instanceof Error?e.message:String(e))).finally(r)},children:[(0,b.jsx)(`span`,{className:`item-menu__glyph`,"aria-hidden":`true`,children:ke.some(e=>e.id===B.id)?`−`:`+`}),ke.some(e=>e.id===B.id)?`Remove from Next (#${ke.findIndex(e=>e.id===B.id)+1})`:`Add to Next`]}),gL.map(e=>{let t=e===`calendar`&&WI(B,ue)===null;return(0,b.jsxs)(`button`,{role:`menuitem`,className:`item-menu__row`,disabled:t,title:t?`It has no date, so it is not on the calendar`:void 0,onClick:()=>Tt(B,e),children:[bL[e](),e===`graph`?`Show in the graph`:`Show on the ${e}`]},e)})]})]})]})]}),(0,b.jsx)(`h2`,{className:`detail__title`,children:B.title}),(B.start!==void 0||B.due!==void 0)&&(0,b.jsx)(`div`,{className:`detail__deps`,children:[B.start&&`starts ${OL(B.start)}`,B.due&&`due ${OL(B.due)}`].filter(Boolean).join(`, `)}),B.deps.length>0&&(0,b.jsxs)(`div`,{className:`detail__deps`,children:[`depends on:`,` `,B.deps.map((e,t)=>{let n=bw(e);return(0,b.jsxs)(`span`,{children:[t>0&&`, `,n===null?(0,b.jsx)(`button`,{className:`detail__dep`,onClick:()=>F(e),children:e}):(0,b.jsx)(`span`,{className:`detail__dep detail__dep--elsewhere`,title:`${n.ref} in the ${n.project} project, which is not open here`,children:e})]},e)})]}),(0,b.jsx)(`div`,{className:`detail__doc`,children:St===null?(0,b.jsx)(`p`,{className:`detail__pending`,children:yt!==null&&`state`in yt&&yt.state===`missing`?`This item is no longer in the plan.`:yt!==null&&`state`in yt&&yt.state===`failed`?`Could not load this item. Try reopening it.`:`Loading…`}):(0,b.jsx)(lb,{remarkPlugins:[hw],children:St.body})}),i&&(0,b.jsx)(Wb,{metrics:i.metrics.get(B.id)??pL,...Oe(`metrics`)}),i&&(0,b.jsx)(Bb,{...Oe(`images`),projectKey:i.key,ref_:B.id,images:St?.attachments??pL,uploadsDisabled:e.uploadsDisabled,reload:r}),St!==null&&(0,b.jsx)(QI,{comments:St.comments,...Oe(`comments`)})]}),!B&&I===null&&R!==null&&i!==null&&(0,b.jsx)(eL,{area:R,name:i.areaInfo[R]?.name,description:i.areaInfo[R]?.description,colour:u[R],items:c.filter(e=>e.area===R),next:ke.flatMap((e,t)=>e.area===R?[{item:e,position:t+1}]:[]),hidden:Ie,onPick:e=>{Et(e),k({area:R})},onZoom:()=>Ye(R),onClose:()=>te(null)}),!B&&I===null&&R===null&&Ae===`next`&&(0,b.jsxs)(`aside`,{className:`detail`,"aria-label":`Next`,children:[(0,b.jsxs)(`div`,{className:`detail__head`,children:[(0,b.jsx)(`span`,{className:`detail__id`,children:`Next`}),(0,b.jsx)(`button`,{className:`detail__close`,onClick:()=>T(null),"aria-label":`Close`,children:`×`})]}),(0,b.jsx)(`ol`,{className:`next__list area-pane__list`,children:ke.map((e,t)=>(0,b.jsx)(`li`,{children:(0,b.jsxs)(`button`,{className:`next__item`,"data-hidden":Ie.has(e.id),onClick:()=>{Et(e),k(`next`)},children:[(0,b.jsx)(`span`,{className:`next__pos`,children:t+1}),(0,b.jsx)(`span`,{className:`next__id`,style:{color:u[e.area]},children:e.id}),(0,b.jsx)(`span`,{className:`next__title`,children:e.title})]})},e.id))})]}),!B&&I===null&&R===null&&Ae===`search`&&i!==null&&(0,b.jsx)(YI,{projectKey:i.key,colours:u,hidden:Ie,titleOf:e=>c.find(t=>t.id===e)?.title,query:E,onQuery:D,onPick:wt,onClose:()=>T(null)}),!B&&I!==null&&i!==null&&(0,b.jsxs)(`aside`,{className:`detail`,"aria-label":`Context`,children:[(0,b.jsxs)(`div`,{className:`detail__head`,children:[(0,b.jsxs)(`div`,{children:[I.heading!==null&&(0,b.jsx)(`button`,{className:`detail__close detail__back`,onClick:()=>L({heading:null}),"aria-label":`Back to Context`,title:`Back to Context`,children:`‹`}),(0,b.jsx)(`span`,{className:`detail__id`,children:`Context`})]}),(0,b.jsx)(`button`,{className:`detail__close`,onClick:()=>L(null),"aria-label":`Close`,children:`×`})]}),I.heading===null?(0,b.jsx)(`ul`,{className:`context__list`,children:i.context.map(e=>(0,b.jsx)(`li`,{children:(0,b.jsx)(`button`,{className:`context__item`,onClick:()=>L({heading:e.heading}),children:e.heading})},e.heading))}):(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(`h2`,{className:`detail__title`,children:I.heading}),(0,b.jsx)(`div`,{className:`detail__doc`,children:(0,b.jsx)(lb,{remarkPlugins:[hw],children:i.context.find(e=>e.heading===I.heading)?.content??`This section no longer exists.`})})]})]})]})]})]})}var AL=`attraverso.pane.width`,jL=420,ML=300;function NL(e,t){let n=Object.keys(e);return n.length===Object.keys(t).length&&n.every(n=>t[n]!==void 0&&e[n].x===t[n].x&&e[n].y===t[n].y)}function PL({extensions:e}){let[t,n]=(0,_.useState)(null),[r,i]=(0,_.useState)(null),[a,o]=(0,_.useState)(null),s=LL();(0,_.useEffect)(()=>{_b(e.session,o).then(o,()=>o({mode:`local`}))},[e.session]);let c=(0,_.useCallback)(()=>{Pb().then(n,e=>i(e instanceof Error?e.message:String(e)))},[]),l=(0,_.useCallback)(()=>{Pb().then(n,()=>{})},[]);if(IL(t!==null&&e.liveRefresh!==!1,l),(0,_.useEffect)(()=>{a!==null&&a.mode!==`anonymous`&&c()},[a,c]),a===null)return(0,b.jsx)(`div`,{className:`boot`,children:`Starting...`});if(a.mode===`anonymous`)return(0,b.jsxs)(`div`,{className:`boot`,children:[(0,b.jsx)(`strong`,{children:`Sign in to see your projects`}),(0,b.jsx)(`span`,{className:`boot__hint`,children:`This viewer is hosted, so it shows the projects belonging to your account.`}),(0,b.jsx)(`button`,{className:`boot__action`,onClick:a.signIn,children:a.signInLabel})]});if(r)return(0,b.jsxs)(`div`,{className:`boot boot--error`,children:[(0,b.jsx)(`strong`,{children:`Could not load the plan.`}),(0,b.jsx)(`span`,{children:r}),(0,b.jsxs)(`span`,{className:`boot__hint`,children:[`Nothing is serving `,(0,b.jsx)(`code`,{children:vb}),`. Run `,(0,b.jsx)(`code`,{children:`yarn viewer`}),`, or open the viewer from the MCP server so it serves the store it already has loaded.`]})]});if(!t)return(0,b.jsx)(`div`,{className:`boot`,children:`Loading the plan...`});let u=Rb(t.projects,s.project);return(0,b.jsx)(gw.Provider,{value:e,children:(0,b.jsx)(kL,{plan:t,selection:u,focus:s.item,reload:c},u.project?.key??`none`)})}var FL=5;function IL(e,t){(0,_.useEffect)(()=>{if(!e||typeof EventSource>`u`)return;let n,r=null,i=0,a=!1,o=()=>{r?.close(),r=null},s=()=>{if(a||r!==null||document.visibilityState!==`visible`)return;let e=new EventSource(Eb);r=e,e.addEventListener(`open`,()=>i=0),e.addEventListener(`version`,e=>{let r=e.data;n!==void 0&&r!==n&&t(),n=r}),e.addEventListener(`error`,()=>{(e.readyState===EventSource.CLOSED||++i>=FL)&&(a=!0,o())})},c=()=>document.visibilityState===`visible`?s():o();return s(),document.addEventListener(`visibilitychange`,c),()=>{a=!0,o(),document.removeEventListener(`visibilitychange`,c)}},[e,t])}function LL(){let e=()=>Fb(window.location.hash),[t,n]=(0,_.useState)(e);return(0,_.useEffect)(()=>{let t=()=>n(e());return window.addEventListener(`hashchange`,t),()=>window.removeEventListener(`hashchange`,t)},[]),t}function RL(e={}){(0,v.createRoot)(document.getElementById(`root`)).render((0,b.jsx)(_.StrictMode,{children:(0,b.jsx)(PL,{extensions:e})}))}RL();
45
+ `))}function s(e,t,n,r){let a=n.enter(`tableCell`),o=n.enter(`phrasing`),s=n.containerPhrasing(e,{...r,before:i,after:i});return o(),a(),s}function c(e,i){return yP(e,{align:i,alignDelimiters:n,fillRows:!1,padding:t,stringLength:r})}function l(e,t,n){let{children:r}=e,i=-1,a=[],o=t.enter(`table`);for(;++i<r.length;)a[i]=u(r[i],t,n);return o(),a}function u(e,t,n){let{children:r}=e,i=-1,a=[],o=t.enter(`tableRow`);for(;++i<r.length;)a[i]=s(r[i],e,t,n);return o(),a}function d(e,t,n){let r=PF.inlineCode(e,t,n);if(!n.stack.includes(`tableCell`))return r;let i=[],a=0,o=r.indexOf(`|`);for(;o!==-1;){let e=o;for(;e>a&&r.charCodeAt(e-1)===92;)e--;i.push(r.slice(a,o)),(o-e)%2==0&&i.push(`\\`),a=o,o=r.indexOf(`|`,o+1)}return i.push(r.slice(a)),i.join(``)}}function WF(e,t,n,r){if(e.type===`table`&&n.type===`listItem`&&n.spread===!1&&(t.type===`definition`||t.type===`heading`&&GF(t,r)||t.type===`paragraph`||t.type===`table`))return 1}function GF(e,t){let n=!1;return xM(e,function(e){if(e.type===`break`||`value`in e&&/\r?\n|\r/.test(e.value))return n=!0,!1}),!!((!e.depth||e.depth<3)&&mO(e)&&(t.options.setext||n))}function KF(){return{exit:{taskListCheckValueChecked:JF,taskListCheckValueUnchecked:JF,paragraph:YF}}}function qF(){return{handlers:{paragraph:XF},join:[ZF]}}function JF(e){let t=this.stack[this.stack.length-2];t.type,t.checked=e.type===`taskListCheckValueChecked`}function YF(e){let t=this.stack[this.stack.length-2];if(t&&t.type===`listItem`&&typeof t.checked==`boolean`){let e=this.stack[this.stack.length-1];e.type;let n=e.children[0];if(n&&n.type===`text`){let r=t.children,i=-1,a;for(;++i<r.length;){let e=r[i];if(e.type===`paragraph`){a=e;break}}a===e&&(n.value=n.value.slice(1),n.value.length===0?e.children.shift():e.position&&n.position&&typeof n.position.start.offset==`number`&&(n.position.start.column++,n.position.start.offset++,e.position.start={...n.position.start}))}}this.exit(e)}function XF(e,t,n,r){if(!t||t.type!==`listItem`||QF(t)!==e)return PF.paragraph(e,t,n,r);let i=`[`+(t.checked?`x`:` `)+`] `,a=n.createTracker(r);return a.move(i),i+PF.paragraph(e.children.length>0?e:{type:`paragraph`,children:[{type:`text`,value:` `}]},t,n,{...r,...a.current()})}function ZF(e,t,n){if(e.type!==`definition`||n.type!==`listItem`)return;let r=QF(n);if(r&&n.children.indexOf(e)<n.children.indexOf(r))return 0}function QF(e){if(typeof e.checked==`boolean`)for(let t of e.children){if(t.type===`paragraph`)return t;if(t.type!==`definition`)return}}function $F(){return[PN(),oP(),dP(),FF(),KF()]}function eI(e){return{extensions:[FN(),sP(e),fP(),UF(e),qF()]}}var tI={tokenize:hI,partial:!0},nI={tokenize:gI,partial:!0},rI={tokenize:_I,partial:!0},iI={tokenize:vI,partial:!0},aI={tokenize:yI,partial:!0},oI={name:`wwwAutolink`,tokenize:pI,previous:bI},sI={name:`protocolAutolink`,tokenize:mI,previous:xI},cI={name:`emailAutolink`,tokenize:fI,previous:SI},lI={};function uI(){return{text:lI}}for(var dI=48;dI<123;)lI[dI]=cI,dI++,dI===58?dI=65:dI===91&&(dI=97);lI[43]=cI,lI[45]=cI,lI[46]=cI,lI[95]=cI,lI[72]=[cI,sI],lI[104]=[cI,sI],lI[87]=[cI,oI],lI[119]=[cI,oI];function fI(e,t,n){let r=this,i,a;return o;function o(t){return!CI(t)||!SI.call(r,r.previous)||wI(r.events)?n(t):(e.enter(`literalAutolink`),e.enter(`literalAutolinkEmail`),s(t))}function s(t){return CI(t)?(e.consume(t),s):t===64?(e.consume(t),c):n(t)}function c(t){return t===46?e.check(aI,u,l)(t):t===45||t===95||kO(t)?(a=!0,e.consume(t),c):u(t)}function l(t){return e.consume(t),i=!0,c}function u(o){return a&&i&&OO(r.previous)?(e.exit(`literalAutolinkEmail`),e.exit(`literalAutolink`),t(o)):n(o)}}function pI(e,t,n){let r=this;return i;function i(t){return t!==87&&t!==119||!bI.call(r,r.previous)||wI(r.events)?n(t):(e.enter(`literalAutolink`),e.enter(`literalAutolinkWww`),e.check(tI,e.attempt(nI,e.attempt(rI,a),n),n)(t))}function a(n){return e.exit(`literalAutolinkWww`),e.exit(`literalAutolink`),t(n)}}function mI(e,t,n){let r=this,i=``,a=!1;return o;function o(t){return(t===72||t===104)&&xI.call(r,r.previous)&&!wI(r.events)?(e.enter(`literalAutolink`),e.enter(`literalAutolinkHttp`),i+=String.fromCodePoint(t),e.consume(t),s):n(t)}function s(t){if(OO(t)&&i.length<5)return i+=String.fromCodePoint(t),e.consume(t),s;if(t===58){let n=i.toLowerCase();if(n===`http`||n===`https`)return e.consume(t),c}return n(t)}function c(t){return t===47?(e.consume(t),a?l:(a=!0,c)):n(t)}function l(t){return t===null||jO(t)||FO(t)||LO(t)||IO(t)?n(t):e.attempt(nI,e.attempt(rI,u),n)(t)}function u(n){return e.exit(`literalAutolinkHttp`),e.exit(`literalAutolink`),t(n)}}function hI(e,t,n){let r=0;return i;function i(t){return(t===87||t===119)&&r<3?(r++,e.consume(t),i):t===46&&r===3?(e.consume(t),a):n(t)}function a(e){return e===null?n(e):t(e)}}function gI(e,t,n){let r,i,a;return o;function o(t){return t===46||t===95?e.check(iI,c,s)(t):t===null||FO(t)||LO(t)||t!==45&&IO(t)?c(t):(a=!0,e.consume(t),o)}function s(t){return t===95?r=!0:(i=r,r=void 0),e.consume(t),o}function c(e){return i||r||!a?n(e):t(e)}}function _I(e,t){let n=0,r=0;return i;function i(o){return o===40?(n++,e.consume(o),i):o===41&&r<n?a(o):o===33||o===34||o===38||o===39||o===41||o===42||o===44||o===46||o===58||o===59||o===60||o===63||o===93||o===95||o===126?e.check(iI,t,a)(o):o===null||FO(o)||LO(o)?t(o):(e.consume(o),i)}function a(t){return t===41&&r++,e.consume(t),i}}function vI(e,t,n){return r;function r(o){return o===33||o===34||o===39||o===41||o===42||o===44||o===46||o===58||o===59||o===63||o===95||o===126?(e.consume(o),r):o===38?(e.consume(o),a):o===93?(e.consume(o),i):o===60||o===null||FO(o)||LO(o)?t(o):n(o)}function i(e){return e===null||e===40||e===91||FO(e)||LO(e)?t(e):r(e)}function a(e){return OO(e)?o(e):n(e)}function o(t){return t===59?(e.consume(t),r):OO(t)?(e.consume(t),o):n(t)}}function yI(e,t,n){return r;function r(t){return e.consume(t),i}function i(e){return kO(e)?n(e):t(e)}}function bI(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||FO(e)}function xI(e){return!OO(e)}function SI(e){return!(e===47||CI(e))}function CI(e){return e===43||e===45||e===46||e===95||kO(e)}function wI(e){let t=e.length,n=!1;for(;t--;){let r=e[t][1];if((r.type===`labelLink`||r.type===`labelImage`)&&!r._balanced){n=!0;break}if(r._gfmAutolinkLiteralWalkedInto){n=!1;break}}return e.length>0&&!n&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}var TI={tokenize:NI,partial:!0};function EI(){return{document:{91:{name:`gfmFootnoteDefinition`,tokenize:AI,continuation:{tokenize:jI},exit:MI}},text:{91:{name:`gfmFootnoteCall`,tokenize:kI},93:{name:`gfmPotentialFootnoteCall`,add:`after`,tokenize:DI,resolveTo:OI}}}}function DI(e,t,n){let r=this,i=r.events.length,a=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]),o;for(;i--;){let e=r.events[i][1];if(e.type===`labelImage`){o=e;break}if(e.type===`gfmFootnoteCall`||e.type===`labelLink`||e.type===`label`||e.type===`image`||e.type===`link`)break}return s;function s(i){if(!o||!o._balanced)return n(i);let s=DO(r.sliceSerialize({start:o.end,end:r.now()}));return s.codePointAt(0)!==94||!a.includes(s.slice(1))?n(i):(e.enter(`gfmFootnoteCallLabelMarker`),e.consume(i),e.exit(`gfmFootnoteCallLabelMarker`),t(i))}}function OI(e,t){let n=e.length;for(;n--;)if(e[n][1].type===`labelImage`&&e[n][0]===`enter`){e[n][1];break}e[n+1][1].type=`data`,e[n+3][1].type=`gfmFootnoteCallLabelMarker`;let r={type:`gfmFootnoteCall`,start:Object.assign({},e[n+3][1].start),end:Object.assign({},e[e.length-1][1].end)},i={type:`gfmFootnoteCallMarker`,start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};i.end.column++,i.end.offset++,i.end._bufferIndex++;let a={type:`gfmFootnoteCallString`,start:Object.assign({},i.end),end:Object.assign({},e[e.length-1][1].start)},o={type:`chunkString`,contentType:`string`,start:Object.assign({},a.start),end:Object.assign({},a.end)},s=[e[n+1],e[n+2],[`enter`,r,t],e[n+3],e[n+4],[`enter`,i,t],[`exit`,i,t],[`enter`,a,t],[`enter`,o,t],[`exit`,o,t],[`exit`,a,t],e[e.length-2],e[e.length-1],[`exit`,r,t]];return e.splice(n,e.length-n+1,...s),e}function kI(e,t,n){let r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]),a=0,o;return s;function s(t){return e.enter(`gfmFootnoteCall`),e.enter(`gfmFootnoteCallLabelMarker`),e.consume(t),e.exit(`gfmFootnoteCallLabelMarker`),c}function c(t){return t===94?(e.enter(`gfmFootnoteCallMarker`),e.consume(t),e.exit(`gfmFootnoteCallMarker`),e.enter(`gfmFootnoteCallString`),e.enter(`chunkString`).contentType=`string`,l):n(t)}function l(s){if(a>999||s===93&&!o||s===null||s===91||FO(s))return n(s);if(s===93){e.exit(`chunkString`);let a=e.exit(`gfmFootnoteCallString`);return i.includes(DO(r.sliceSerialize(a)))?(e.enter(`gfmFootnoteCallLabelMarker`),e.consume(s),e.exit(`gfmFootnoteCallLabelMarker`),e.exit(`gfmFootnoteCall`),t):n(s)}return FO(s)||(o=!0),a++,e.consume(s),s===92?u:l}function u(t){return t===91||t===92||t===93?(e.consume(t),a++,l):l(t)}}function AI(e,t,n){let r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]),a,o=0,s;return c;function c(t){return e.enter(`gfmFootnoteDefinition`)._container=!0,e.enter(`gfmFootnoteDefinitionLabel`),e.enter(`gfmFootnoteDefinitionLabelMarker`),e.consume(t),e.exit(`gfmFootnoteDefinitionLabelMarker`),l}function l(t){return t===94?(e.enter(`gfmFootnoteDefinitionMarker`),e.consume(t),e.exit(`gfmFootnoteDefinitionMarker`),e.enter(`gfmFootnoteDefinitionLabelString`),e.enter(`chunkString`).contentType=`string`,u):n(t)}function u(t){if(o>999||t===93&&!s||t===null||t===91||FO(t))return n(t);if(t===93){e.exit(`chunkString`);let n=e.exit(`gfmFootnoteDefinitionLabelString`);return a=DO(r.sliceSerialize(n)),e.enter(`gfmFootnoteDefinitionLabelMarker`),e.consume(t),e.exit(`gfmFootnoteDefinitionLabelMarker`),e.exit(`gfmFootnoteDefinitionLabel`),f}return FO(t)||(s=!0),o++,e.consume(t),t===92?d:u}function d(t){return t===91||t===92||t===93?(e.consume(t),o++,u):u(t)}function f(t){return t===58?(e.enter(`definitionMarker`),e.consume(t),e.exit(`definitionMarker`),i.includes(a)||i.push(a),BO(e,p,`gfmFootnoteDefinitionWhitespace`)):n(t)}function p(e){return t(e)}}function jI(e,t,n){return e.check(ik,t,e.attempt(TI,t,n))}function MI(e){e.exit(`gfmFootnoteDefinition`)}function NI(e,t,n){let r=this;return BO(e,i,`gfmFootnoteDefinitionIndent`,5);function i(e){let i=r.events[r.events.length-1];return i&&i[1].type===`gfmFootnoteDefinitionIndent`&&i[2].sliceSerialize(i[1],!0).length===4?t(e):n(e)}}function PI(e){let t=(e||{}).singleTilde,n={name:`strikethrough`,tokenize:i,resolveAll:r};return t??=!0,{text:{126:n},insideSpan:{null:[n]},attentionMarkers:{null:[126]}};function r(e,t){let n=-1;for(;++n<e.length;)if(e[n][0]===`enter`&&e[n][1].type===`strikethroughSequenceTemporary`&&e[n][1]._close){let r=n;for(;r--;)if(e[r][0]===`exit`&&e[r][1].type===`strikethroughSequenceTemporary`&&e[r][1]._open&&e[n][1].end.offset-e[n][1].start.offset===e[r][1].end.offset-e[r][1].start.offset){e[n][1].type=`strikethroughSequence`,e[r][1].type=`strikethroughSequence`;let i={type:`strikethrough`,start:Object.assign({},e[r][1].start),end:Object.assign({},e[n][1].end)},a={type:`strikethroughText`,start:Object.assign({},e[r][1].end),end:Object.assign({},e[n][1].start)},o=[[`enter`,i,t],[`enter`,e[r][1],t],[`exit`,e[r][1],t],[`enter`,a,t]],s=t.parser.constructs.insideSpan.null;s&&bO(o,o.length,0,ZO(s,e.slice(r+1,n),t)),bO(o,o.length,0,[[`exit`,a,t],[`enter`,e[n][1],t],[`exit`,e[n][1],t],[`exit`,i,t]]),bO(e,r-1,n-r+3,o),n=r+o.length-2;break}}for(n=-1;++n<e.length;)e[n][1].type===`strikethroughSequenceTemporary`&&(e[n][1].type=`data`);return e}function i(e,n,r){let i=this.previous,a=this.events,o=0;return s;function s(t){return i===126&&a[a.length-1][1].type!==`characterEscape`?r(t):(e.enter(`strikethroughSequenceTemporary`),c(t))}function c(a){let s=XO(i);if(a===126)return o>1?r(a):(e.consume(a),o++,c);if(o<2&&!t)return r(a);let l=e.exit(`strikethroughSequenceTemporary`),u=XO(a);return l._open=!u||u===2&&!!s,l._close=!s||s===2&&!!u,n(a)}}}var FI=class{constructor(){this.map=[],this.index=new Map}add(e,t,n){II(this,e,t,n)}consume(e){if(this.map.sort(function(e,t){return e[0]-t[0]}),this.map.length===0)return;let t=this.map.length,n=[];for(;t>0;)--t,n.push(e.slice(this.map[t][0]+this.map[t][1]),this.map[t][2]),e.length=this.map[t][0];n.push(e.slice()),e.length=0;let r=n.pop();for(;r;){for(let t of r)e.push(t);r=n.pop()}this.map.length=0,this.index.clear()}};function II(e,t,n,r){if(n===0&&r.length===0)return;let i=e.index.get(t);if(i){i[1]+=n,i[2].push(...r);return}let a=[t,n,r];e.map.push(a),e.index.set(t,a)}function LI(e,t){let n=!1,r=[];for(;t<e.length;){let i=e[t];if(n){if(i[0]===`enter`)i[1].type===`tableContent`&&r.push(e[t+1][1].type===`tableDelimiterMarker`?`left`:`none`);else if(i[1].type===`tableContent`){if(e[t-1][1].type===`tableDelimiterMarker`){let e=r.length-1;r[e]=r[e]===`left`?`center`:`right`}}else if(i[1].type===`tableDelimiterRow`)break}else i[0]===`enter`&&i[1].type===`tableDelimiterRow`&&(n=!0);t+=1}return r}function RI(){return{flow:{null:{name:`table`,tokenize:zI,resolveAll:BI}}}}function zI(e,t,n){let r=this,i=0,a=0,o;return s;function s(e){let t=r.events.length-1;for(;t>-1;){let{type:e}=r.events[t][1];if(e===`lineEnding`||e===`linePrefix`)t--;else break}let i=t>-1?r.events[t][1].type:null,a=i===`tableHead`||i===`tableRow`?S:c;return a===S&&r.parser.lazy[r.now().line]?n(e):a(e)}function c(t){return e.enter(`tableHead`),e.enter(`tableRow`),l(t)}function l(e){return e===124||(o=!0,a+=1),u(e)}function u(t){return t===null?n(t):Q(t)?a>1?(a=0,r.interrupt=!0,e.exit(`tableRow`),e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),p):n(t):$(t)?BO(e,u,`whitespace`)(t):(a+=1,o&&(o=!1,i+=1),t===124?(e.enter(`tableCellDivider`),e.consume(t),e.exit(`tableCellDivider`),o=!0,u):(e.enter(`data`),d(t)))}function d(t){return t===null||t===124||FO(t)?(e.exit(`data`),u(t)):(e.consume(t),t===92?f:d)}function f(t){return t===92||t===124?(e.consume(t),d):d(t)}function p(t){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(t):(e.enter(`tableDelimiterRow`),o=!1,$(t)?BO(e,m,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):m(t))}function m(t){return t===45||t===58?g(t):t===124?(o=!0,e.enter(`tableCellDivider`),e.consume(t),e.exit(`tableCellDivider`),h):x(t)}function h(t){return $(t)?BO(e,g,`whitespace`)(t):g(t)}function g(t){return t===58?(a+=1,o=!0,e.enter(`tableDelimiterMarker`),e.consume(t),e.exit(`tableDelimiterMarker`),_):t===45?(a+=1,_(t)):t===null||Q(t)?b(t):x(t)}function _(t){return t===45?(e.enter(`tableDelimiterFiller`),v(t)):x(t)}function v(t){return t===45?(e.consume(t),v):t===58?(o=!0,e.exit(`tableDelimiterFiller`),e.enter(`tableDelimiterMarker`),e.consume(t),e.exit(`tableDelimiterMarker`),y):(e.exit(`tableDelimiterFiller`),y(t))}function y(t){return $(t)?BO(e,b,`whitespace`)(t):b(t)}function b(n){return n===124?m(n):n===null||Q(n)?!o||i!==a?x(n):(e.exit(`tableDelimiterRow`),e.exit(`tableHead`),t(n)):x(n)}function x(e){return n(e)}function S(t){return e.enter(`tableRow`),C(t)}function C(n){return n===124?(e.enter(`tableCellDivider`),e.consume(n),e.exit(`tableCellDivider`),C):n===null||Q(n)?(e.exit(`tableRow`),t(n)):$(n)?BO(e,C,`whitespace`)(n):(e.enter(`data`),w(n))}function w(t){return t===null||t===124||FO(t)?(e.exit(`data`),C(t)):(e.consume(t),t===92?T:w)}function T(t){return t===92||t===124?(e.consume(t),w):w(t)}}function BI(e,t){let n=-1,r=!0,i=0,a=[0,0,0,0],o=[0,0,0,0],s=!1,c=0,l,u,d,f=new FI;for(;++n<e.length;){let p=e[n],m=p[1];p[0]===`enter`?m.type===`tableHead`?(s=!1,c!==0&&(HI(f,t,c,l,u),u=void 0,c=0),l={type:`table`,start:Object.assign({},m.start),end:Object.assign({},m.end)},f.add(n,0,[[`enter`,l,t]])):m.type===`tableRow`||m.type===`tableDelimiterRow`?(r=!0,d=void 0,a=[0,0,0,0],o=[0,n+1,0,0],s&&(s=!1,u={type:`tableBody`,start:Object.assign({},m.start),end:Object.assign({},m.end)},f.add(n,0,[[`enter`,u,t]])),i=m.type===`tableDelimiterRow`?2:u?3:1):i&&(m.type===`data`||m.type===`tableDelimiterMarker`||m.type===`tableDelimiterFiller`)?(r=!1,o[2]===0&&(a[1]!==0&&(o[0]=o[1],d=VI(f,t,a,i,void 0,d),a=[0,0,0,0]),o[2]=n)):m.type===`tableCellDivider`&&(r?r=!1:(a[1]!==0&&(o[0]=o[1],d=VI(f,t,a,i,void 0,d)),a=o,o=[a[1],n,0,0])):m.type===`tableHead`?(s=!0,c=n):m.type===`tableRow`||m.type===`tableDelimiterRow`?(c=n,a[1]===0?o[1]!==0&&(d=VI(f,t,o,i,n,d)):(o[0]=o[1],d=VI(f,t,a,i,n,d)),i=0):i&&(m.type===`data`||m.type===`tableDelimiterMarker`||m.type===`tableDelimiterFiller`)&&(o[3]=n)}for(c!==0&&HI(f,t,c,l,u),f.consume(t.events),n=-1;++n<t.events.length;){let e=t.events[n];e[0]===`enter`&&e[1].type===`table`&&(e[1]._align=LI(t.events,n))}return e}function VI(e,t,n,r,i,a){let o=r===1?`tableHeader`:r===2?`tableDelimiter`:`tableData`;n[0]!==0&&(a.end=Object.assign({},UI(t.events,n[0])),e.add(n[0],0,[[`exit`,a,t]]));let s=UI(t.events,n[1]);if(a={type:o,start:Object.assign({},s),end:Object.assign({},s)},e.add(n[1],0,[[`enter`,a,t]]),n[2]!==0){let i=UI(t.events,n[2]),a=UI(t.events,n[3]),o={type:`tableContent`,start:Object.assign({},i),end:Object.assign({},a)};if(e.add(n[2],0,[[`enter`,o,t]]),r!==2){let r=t.events[n[2]],i=t.events[n[3]];if(r[1].end=Object.assign({},i[1].end),r[1].type=`chunkText`,r[1].contentType=`text`,n[3]>n[2]+1){let t=n[2]+1,r=n[3]-n[2]-1;e.add(t,r,[])}}e.add(n[3]+1,0,[[`exit`,o,t]])}return i!==void 0&&(a.end=Object.assign({},UI(t.events,i)),e.add(i,0,[[`exit`,a,t]]),a=void 0),a}function HI(e,t,n,r,i){let a=[],o=UI(t.events,n);i&&(i.end=Object.assign({},o),a.push([`exit`,i,t])),r.end=Object.assign({},o),a.push([`exit`,r,t]),e.add(n+1,0,a)}function UI(e,t){let n=e[t],r=n[0]===`enter`?`start`:`end`;return n[1][r]}var WI={name:`tasklistCheck`,tokenize:KI};function GI(){return{text:{91:WI}}}function KI(e,t,n){let r=this;return i;function i(t){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?n(t):(e.enter(`taskListCheck`),e.enter(`taskListCheckMarker`),e.consume(t),e.exit(`taskListCheckMarker`),a)}function a(t){return FO(t)?(e.enter(`taskListCheckValueUnchecked`),e.consume(t),e.exit(`taskListCheckValueUnchecked`),o):t===88||t===120?(e.enter(`taskListCheckValueChecked`),e.consume(t),e.exit(`taskListCheckValueChecked`),o):n(t)}function o(t){return t===93?(e.enter(`taskListCheckMarker`),e.consume(t),e.exit(`taskListCheckMarker`),e.exit(`taskListCheck`),s):n(t)}function s(r){return Q(r)?t(r):$(r)?e.check({tokenize:qI},t,n)(r):n(r)}}function qI(e,t,n){return BO(e,r,`whitespace`);function r(e){return e===null?n(e):t(e)}}function JI(e){return CO([uI(),EI(),PI(e),RI(),GI()])}var YI={};function XI(e){let t=this,n=e||YI,r=t.data(),i=r.micromarkExtensions||=[],a=r.fromMarkdownExtensions||=[],o=r.toMarkdownExtensions||=[];i.push(JI(n)),a.push($F()),o.push(eI(n))}var ZI=`[a-z0-9]+`,QI=`[^\\]\\n]{0,3000}`,$I=RegExp(`(?<!\\\\)\\[ref (${ZI})(?::${QI})?\\](?![(:])`,`g`),eL=RegExp(`(?<!\\\\)\\[ref (?!${ZI}(?:\\]|:${QI}\\]))`,`g`);function tL(e){return e.normalize(`NFC`).replace(/^[ \t]*>[ \t]?/gm,``).replace(/\s+/g,` `).replace(/^\s*(?:[-*+]|\d+[.)]|#{1,6})\s+/,``).replace(/^[\s|.,;:!?)]+/,``).replace(/[\s|]+$/,``).trim()}var nL=e=>/^\s*(`{3,}|~{3,})/.exec(e)?.[1],rL=(e,t)=>t[0]===e[0]&&t.length>=e.length;function iL(e){let t=e.split(`
46
+ `),n;return t.map(e=>{let t=nL(e);return n===void 0&&t!==void 0?(n=t,` `.repeat(e.length)):n===void 0?e:(t!==void 0&&rL(n,t)&&(n=void 0),` `.repeat(e.length))}).join(`
47
+ `).split(/(\n[ \t]*\n)/).map(aL).join(``)}function aL(e){let t=[...e.matchAll(/`+/g)].map(e=>({at:e.index,length:e[0].length})),n=Array(t.length).fill(-1),r=new Map;for(let e=t.length-1;e>=0;e--)n[e]=r.get(t[e].length)??-1,r.set(t[e].length,e);let i=[],a=0;for(let r=0;r<t.length;r++){let o=t[r],s=n[r];if(s===-1)continue;let c=t[s].at+o.length;i.push(e.slice(a,o.at),` `.repeat(c-o.at)),a=c,r=s}return a===0?e:i.join(``)+e.slice(a)}function oL(e){let t=[],n=0,r=0,i=null,a,o=!1;for(let s of e.split(`
48
+ `)){let e=r,c=r+s.length;r=c+1;let l=nL(s);if(a!==void 0){i.end=c,l!==void 0&&rL(a,l)&&(a=void 0,i=null);continue}if(l!==void 0){a=l,i={kind:`code`,group:++n,start:e,end:c},t.push(i);continue}if(s.trim()===``){i=null,o=!0;continue}let u=o;o=!1;let d=/^\s*#{1,6}\s/.test(s)?`heading`:/^\s*\|/.test(s)?`table`:/^\s*(?:[-*+]|\d+[.)])\s/.test(s)?`list`:null;if(d===null&&i!==null&&(i.kind===`paragraph`||i.kind===`list`)){i.end=c;continue}let f=t[t.length-1],p=d!==null&&f!==void 0&&f.kind===d&&(d===`list`||!u),m={kind:d??`paragraph`,group:p?f.group:++n,start:e,end:c};t.push(m),i=m.kind===`heading`||m.kind===`table`?null:m}return t}function sL(e){let t=lL.get(e);if(t!==void 0)return t;let n=Object.freeze(uL(e));return Object.freeze(n.pointers),Object.freeze(n.problems),lL.set(e,n),lL.size>cL&&lL.delete(lL.keys().next().value),n}var cL=16,lL=new Map;function uL(e){let t=iL(e),n=oL(e),r=[],i=[],a=new Set;for(let n of t.matchAll(eL)){let t=e.slice(n.index,n.index+16).split(`
49
+ `)[0];i.push({at:n.index,problem:`"${t}" is not a pointer: write [ref <key>], where a key is lowercase letters and digits`})}let o=(n,r)=>{let i=``,a=n;for(let o of t.slice(n,r).matchAll($I))i+=e.slice(a,n+o.index)+` `,a=n+o.index+o[0].length;return tL(i+e.slice(a,r))};n.forEach((a,s)=>{let c=[...t.slice(a.start,a.end).matchAll($I)].map(e=>({key:e[1],at:a.start+e.index,written:e[0]}));if(c.length===0)return;if(tL(t.slice(a.start,a.end).replace($I,` `))===``){let l=n.slice(0,s).reverse().find(e=>e.kind===`code`||tL(t.slice(e.start,e.end).replace($I,` `))!==``);l!==void 0&&l.kind===`table`&&!/\n\s*\n/.test(e.slice(l.end,a.start))&&i.push({at:c[0].at,problem:`put a blank line between the table and [ref ${c[0].key}], or markdown reads it as another row`});let u=(l===void 0?[]:n.filter(e=>e.group===l.group&&e.end<=a.start)).map(e=>o(e.start,e.end)).filter(Boolean).join(` `);for(let e of c)r.push({...e,covers:tL(u)});return}let l=a.start;for(let n of c){let s=e.lastIndexOf(`
50
+ `,n.at-1)+1,c=e.indexOf(`
51
+ `,n.at)===-1?e.length:e.indexOf(`
52
+ `,n.at);a.kind===`list`&&s>a.start&&tL(t.slice(s,c).replace($I,` `))===``&&i.push({at:n.at,problem:`put a blank line between the list and [ref ${n.key}], or markdown reads it as part of the last item`}),r.push({...n,covers:o(l,n.at)}),l=n.at+n.written.length}});for(let e of r)e.covers===``&&i.push({at:e.at,problem:`[ref ${e.key}] has nothing before it to stand behind: put it straight after its claim`});for(let e of r)a.has(e.key)&&i.push({at:e.at,problem:`[ref ${e.key}] appears twice: a key stands behind one claim`}),a.add(e.key);return{pointers:r,problems:i}}var dL=`ref-claim`,fL=6,pL=e=>{let t=e.cloneNode(!0);return t.querySelectorAll(`.ref-link`).forEach(e=>e.remove()),(t.textContent??``).trim()};function mL(e,t){let n=document.createRange(),r=[...e.querySelectorAll(`.ref-link`)],i=r[r.indexOf(t)-1];i===void 0?n.setStart(e,0):n.setStartAfter(i),n.setEndBefore(t);let a=[],o=document.createTreeWalker(e,NodeFilter.SHOW_TEXT);for(let e=o.nextNode();e!==null;e=o.nextNode())n.intersectsNode(e)&&a.push(e);for(let e of a){let t=e.data,r=e===n.startContainer?n.startOffset:0;for(;r<t.length&&/[\s.,;:!?)]/.test(t[r]);)r++;if(r<t.length){n.setStart(e,r);break}}for(let e of[...a].reverse()){let t=e.data,r=e===n.endContainer?n.endOffset:t.length;for(;r>0&&/\s/.test(t[r-1]);)r--;if(r>0){n.setEnd(e,r);break}}return n}var hL=/\[ref ([a-z0-9]+)(?::[^\]\n]{0,3000})?\](?![(:])/g,gL=e=>()=>t=>{let n=new Map,r=(t,i)=>{if(t.children===void 0)return;let a=i||t.type===`link`||t.type===`linkReference`;t.children=t.children.flatMap(t=>{if(t.type!==`text`||a||t.value===void 0)return r(t,a),[t];let i=[],o=0;for(let r of t.value.matchAll(hL)){let a=r[1];if(!e.has(a))continue;let s=n.get(a)??0;n.set(a,s+1),r.index>o&&i.push({type:`text`,value:t.value.slice(o,r.index)}),i.push({type:`link`,url:`#ref-${a}-${s}`,children:[{type:`text`,value:a}]}),o=r.index+r[0].length}return o===0?[t]:(o<t.value.length&&i.push({type:`text`,value:t.value.slice(o)}),i)})};r(t,!1)},_L=(0,_.createContext)(null),vL=e=>e.slice(0,e.lastIndexOf(`-`));function yL({id:e}){let t=(0,_.useContext)(_L),n=vL(e);return(0,b.jsxs)(`button`,{type:`button`,className:`ref-link`,"data-ref":n,"data-ref-id":e,"data-active":t.active===e,"data-doubt":t.doubt.has(n),"aria-expanded":t.active===e,"aria-controls":t.active===e?`refs-panel`:void 0,"aria-label":`Reference ${t.numbers.get(n)}: ${t.doubt.get(n)??`where this came from`}`,title:t.doubt.get(n),onClick:n=>t.toggle(e,n.currentTarget),children:[`[`,t.numbers.get(n),t.doubt.has(n)&&(0,b.jsx)(`span`,{className:`ref-link__doubt`,children:`?`}),`]`]})}function bL(e){for(let t=e.parentElement;t!==null;t=t.parentElement)if(/(auto|scroll)/.test(getComputedStyle(t).overflowY))return t;return document.documentElement}function xL({body:e,references:t}){let[n,r]=(0,_.useState)(null),i=(0,_.useRef)(null),a=(0,_.useRef)(null),{numbers:o,covers:s,plugins:c}=(0,_.useMemo)(()=>{let{pointers:t}=sL(e),n=new Map,r=new Map,i=new Map;for(let e of[...t].sort((e,t)=>e.at-t.at)){n.has(e.key)||n.set(e.key,n.size+1);let t=i.get(e.key)??0;i.set(e.key,t+1),r.set(`${e.key}-${t}`,e.covers)}return{numbers:n,covers:r,plugins:[XI,gL(new Set(n.keys()))]}},[e]),l=(0,_.useMemo)(()=>{let e=new Map;if(t===void 0)return e;for(let[n,r]of s){let i=vL(n),a=t.filter(e=>e.key===i);a.length===0?e.set(i,`no source is recorded for this claim`):tL(a[a.length-1].text)===r?a.some(e=>e.codeChanged===!0)&&e.set(i,`the code it points at has changed since`):e.set(i,`the claim has changed since its source vouched for it`)}return e},[s,t]),u=(0,_.useCallback)(e=>{r(null),e&&a.current?.focus()},[]),d=(0,_.useCallback)((e,t)=>{a.current=t,r(t=>t===e?null:e)},[]),f=(0,_.useMemo)(()=>({active:n,numbers:o,doubt:l,toggle:d}),[n,o,l,d]);(0,_.useEffect)(()=>{n!==null&&!s.has(n)&&r(null)},[n,s]),(0,_.useEffect)(()=>{let e=i.current;if(e===null||n===null)return;let t=e.querySelector(`[data-ref-id="${n}"]`);if(t===null)return;let r=t.closest(`li, tr, h1, h2, h3, h4, h5, h6, p`);if((r===null||r.tagName!==`P`||pL(r)!==``)&&r!==null&&`highlights`in CSS&&typeof Highlight<`u`){let e=mL(r,t);return CSS.highlights.set(dL,new Highlight(e)),()=>void CSS.highlights.delete(dL)}let a=r;for(;a!==null&&a.tagName===`P`&&pL(a)===``;)a=a.previousElementSibling;return a?.classList.add(`ref-highlight`),()=>a?.classList.remove(`ref-highlight`)},[n,e]);let p=(0,_.useRef)(null),[m,h]=(0,_.useState)(null),g=(0,_.useCallback)(()=>{let e=i.current,t=n===null?null:e?.querySelector(`[data-ref-id="${n}"]`),r=p.current;if(e===null||!t||r===null){h(null);return}let a=t.getBoundingClientRect(),o=e.getBoundingClientRect(),s=bL(e).getBoundingClientRect();r.style.width=`${o.width}px`;let c=r.scrollHeight,l=window.innerHeight-a.bottom-12,u=a.top-12,d=l<c&&u>l,f=Math.max(80,d?u:l),m=Math.min(c,f);h({top:d?Math.max(fL,a.top-fL-m):Math.min(a.bottom+fL,window.innerHeight-fL-m),left:o.left,width:o.width,room:f,above:d,hidden:a.bottom<s.top||a.top>s.bottom})},[n]);(0,_.useLayoutEffect)(g,[g,e,t]),(0,_.useEffect)(()=>{if(n!==null)return window.addEventListener(`scroll`,g,!0),window.addEventListener(`resize`,g),()=>{window.removeEventListener(`scroll`,g,!0),window.removeEventListener(`resize`,g)}},[n,g]);let v=(0,_.useRef)(!1);(0,_.useEffect)(()=>{v.current=n!==null},[n]);let y=m!==null&&!m.hidden;(0,_.useEffect)(()=>{y&&v.current&&(v.current=!1,p.current?.querySelector(`.refs-panel__close`)?.focus({preventScroll:!0}))},[y,n]),(0,_.useEffect)(()=>{if(n===null)return;let e=e=>e.key===`Escape`&&u(!0),t=e=>{e.target instanceof Element&&e.target.closest(`.ref-link, .refs-panel`)!==null||u(!1)};return document.addEventListener(`keydown`,e),document.addEventListener(`pointerdown`,t),()=>{document.removeEventListener(`keydown`,e),document.removeEventListener(`pointerdown`,t)}},[n,u]);let x=(0,_.useMemo)(()=>({a:({href:e,children:t,node:n,...r})=>{let i=e?.startsWith(`#ref-`)?e.slice(5):null;return i===null||!o.has(vL(i))?(0,b.jsx)(`a`,{href:e,...r,children:t}):(0,b.jsx)(yL,{id:i})}}),[o]),S=n===null?null:vL(n),C=S===null?[]:(t??[]).filter(e=>e.key===S),w=n===null?``:s.get(n)??``;return(0,b.jsxs)(`div`,{ref:i,className:`refs-body`,children:[(0,b.jsx)(_L.Provider,{value:f,children:(0,b.jsx)(xN,{remarkPlugins:c,components:x,children:e})}),S!==null&&(0,_l.createPortal)((0,b.jsxs)(`aside`,{ref:p,id:`refs-panel`,role:`dialog`,className:`refs-panel`,"data-above":m?.above??!1,style:{top:m?.top??0,left:m?.left??0,width:m?.width,maxHeight:m?.room,visibility:m===null||m.hidden?`hidden`:`visible`},"aria-label":`Reference ${o.get(S)}`,children:[(0,b.jsxs)(`div`,{className:`refs-panel__head`,children:[(0,b.jsxs)(`span`,{children:[`Reference `,o.get(S)]}),(0,b.jsx)(`button`,{type:`button`,className:`refs-panel__close`,onClick:()=>u(!0),"aria-label":`Close`,children:`✕`})]}),t===void 0?(0,b.jsx)(`p`,{className:`refs-panel__none`,children:`This server does not send sources.`}):C.length===0?(0,b.jsx)(`p`,{className:`refs-panel__none`,children:`No source is recorded for this claim.`}):(0,b.jsx)(`ul`,{className:`refs-panel__list`,children:C.map((e,t)=>(0,b.jsxs)(`li`,{children:[(0,b.jsx)(`span`,{className:`refs-panel__kind`,children:e.source}),(0,b.jsx)(`span`,{className:`refs-panel__date`,children:e.at.slice(0,10)}),(0,b.jsx)(`span`,{className:`refs-panel__detail`,children:/^https?:\/\//.test(e.detail)?(0,b.jsx)(`a`,{href:e.detail,target:`_blank`,rel:`noreferrer`,children:e.detail}):e.source===`user`?(0,b.jsx)(`q`,{children:e.detail}):(0,b.jsx)(`code`,{children:e.detail})}),tL(e.text)!==w&&(0,b.jsxs)(`p`,{className:`refs-panel__changed`,children:[`The claim has changed since. This source vouched for: `,(0,b.jsx)(`q`,{children:e.text})]}),e.codeChanged===!0&&(0,b.jsxs)(`p`,{className:`refs-panel__changed`,children:[`These lines are no longer in the file as they were at that commit: `,(0,b.jsxs)(`code`,{children:[`git diff `,e.detail.split(`@`)[1],` -- `,e.detail.split(`:`)[0]]})]})]},`${e.at}-${t}`))})]}),document.body)]})}var SL=e=>new Date(e).toLocaleDateString(void 0,{day:`numeric`,month:`short`,year:`numeric`});function CL({comments:e,open:t,onToggle:n}){let[r,i]=(0,_.useState)(!1),a=e.filter(e=>e.audience===`agent`).length,o=r?e:e.filter(e=>e.audience!==`agent`);return(0,b.jsxs)(fp,{title:`Comments`,count:e.length,open:t,onToggle:n,children:[o.length===0&&a===0&&(0,b.jsx)(`p`,{className:`comments__empty`,children:`No comments on this item yet.`}),(0,b.jsx)(`ul`,{className:`comments`,children:o.map(e=>(0,b.jsxs)(`li`,{className:`comment`,"data-agent":e.audience===`agent`,children:[(0,b.jsxs)(`div`,{className:`comment__meta`,children:[(0,b.jsx)(`span`,{children:e.actor}),(0,b.jsx)(`span`,{children:SL(e.at)}),e.audience===`agent`&&(0,b.jsx)(`span`,{className:`comment__tag`,children:`Claude's note`})]}),(0,b.jsx)(`div`,{className:`comment__body`,children:(0,b.jsx)(xN,{remarkPlugins:[XI],children:e.body})})]},e.id))}),a>0&&(0,b.jsx)(`button`,{className:`comments__toggle`,onClick:()=>i(e=>!e),children:r?`Hide Claude's ${a===1?`note`:`${a} notes`}`:`Show Claude's ${a===1?`note`:`${a} notes`}`})]})}var wL=Object.keys(K);function TL({area:e,name:t,description:n,colour:r,items:i,next:a,hidden:o,onPick:s,onZoom:c,onClose:l}){let u=new Map(wL.map(e=>[e,i.filter(t=>t.status===e).length])),d=i.filter(e=>e.status!==`done`),f=u.get(`done`)??0,p=(e,t)=>(0,b.jsx)(`li`,{children:(0,b.jsxs)(`button`,{className:`next__item`,"data-hidden":o.has(e.id),onClick:()=>s(e),title:e.title,children:[(0,b.jsx)(`span`,{className:`next__pos`,style:typeof t==`string`?{color:K[e.status].colour}:void 0,children:t}),(0,b.jsx)(`span`,{className:`next__id`,style:{color:r},children:e.id}),(0,b.jsx)(`span`,{className:`next__title`,children:e.title})]})},e.id);return(0,b.jsxs)(`aside`,{className:`detail`,"aria-label":`Area ${e}`,children:[(0,b.jsxs)(`div`,{className:`detail__head`,children:[(0,b.jsx)(`div`,{className:`area-pane__tools`,children:(0,b.jsxs)(`button`,{className:`chip area-pane__zoom`,onClick:c,children:[(0,b.jsxs)(`svg`,{viewBox:`0 0 16 16`,width:`12`,height:`12`,"aria-hidden":`true`,children:[(0,b.jsx)(`circle`,{cx:`8`,cy:`8`,r:`5`,fill:`none`,stroke:`currentColor`,strokeWidth:`1.5`}),(0,b.jsx)(`circle`,{cx:`8`,cy:`8`,r:`1.6`,fill:`currentColor`}),(0,b.jsx)(`path`,{d:`M8 0.5v2.5M8 13v2.5M0.5 8h2.5M13 8h2.5`,stroke:`currentColor`,strokeWidth:`1.5`})]}),`fit to view`]})}),(0,b.jsx)(`button`,{className:`detail__close`,onClick:l,"aria-label":`Close`,children:`×`})]}),(0,b.jsx)(`h2`,{className:`detail__title area-pane__title`,children:t!==void 0&&t!==e?(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(`span`,{style:{color:r},children:t}),(0,b.jsx)(`span`,{className:`area-pane__key`,children:e})]}):(0,b.jsx)(`span`,{style:{color:r},children:e})}),(0,b.jsxs)(`div`,{className:`area-pane__progress`,children:[(0,b.jsx)(`div`,{className:`area-pane__bar`,role:`img`,"aria-label":`${f} of ${i.length} done`,children:wL.map(e=>(u.get(e)??0)>0?(0,b.jsx)(`span`,{style:{flexGrow:u.get(e),background:K[e].colour},title:`${u.get(e)} ${K[e].label}`},e):null)}),(0,b.jsx)(`div`,{className:`area-pane__counts`,children:wL.filter(e=>(u.get(e)??0)>0).map(e=>(0,b.jsxs)(`span`,{children:[(0,b.jsx)(`span`,{style:{color:K[e].colour},children:K[e].icon}),` `,u.get(e),` `,K[e].label]},e))})]}),n!==void 0&&n!==``&&(0,b.jsx)(`div`,{className:`detail__doc area-pane__description`,children:(0,b.jsx)(xN,{remarkPlugins:[XI],children:n})}),a.length>0&&(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(`div`,{className:`settings__label area-pane__label`,children:`In the next list`}),(0,b.jsx)(`ol`,{className:`next__list area-pane__list`,children:a.map(({item:e,position:t})=>p(e,t))})]}),(0,b.jsx)(`div`,{className:`settings__label area-pane__label`,children:d.length===0?`Nothing open`:`Open (${d.length})`}),d.length>0&&(0,b.jsx)(`ul`,{className:`next__list area-pane__list`,children:d.map(e=>p(e,K[e.status].icon))})]})}var EL={cardsFrom:.35,cardsTo:.1,overviewFrom:.35,overviewTo:.1},DL=(e,t,n)=>t===n?+(e<=n):Math.min(Math.max((t-e)/(t-n),0),1);function OL(){let e=W(e=>e.transform[2]),t=W(e=>e.domNode);return(0,_.useEffect)(()=>{if(t===null)return;let n=1-.7*DL(e,EL.cardsFrom,EL.cardsTo);t.style.setProperty(`--cards`,n.toFixed(3)),t.style.setProperty(`--overview`,DL(e,EL.overviewFrom,EL.overviewTo).toFixed(3)),t.dataset.far=String(DL(e,EL.cardsFrom,EL.cardsTo)>.5)},[e,t]),null}var kL=Object.keys(K).reverse();function AL(e,t,n=new Date){let r=new Date(n.getFullYear(),n.getMonth(),n.getDate()).getTime(),i=864e5,a=e=>{if(e===void 0)return{key:`d:none`,name:`No date`,rank:-1/0};let t=new Date(e);if(t.getTime()>=r)return{key:`d:today`,name:`Today`,rank:1/0};if(t.getTime()>=r-6*i)return{key:`d:week`,name:`This week`,rank:1/0};if(t.getTime()>=r-29*i)return{key:`d:month`,name:`Last 30 days`,rank:1/0};let n=`${t.getFullYear()}-${String(t.getMonth()+1).padStart(2,`0`)}`,a=t.toLocaleDateString(void 0,{month:`long`,year:`numeric`});return{key:`d:${n}`,name:a,rank:t.getFullYear()*12+t.getMonth()}},o=e=>t===`created`?e.created:e.updated,s=new Map;for(let t of[...e].sort((e,t)=>(o(t)??``).localeCompare(o(e)??``))){let{key:e,name:n,rank:r}=a(o(t)),i=s.get(e)??{key:e,name:n,colour:`var(--text)`,items:[],rank:r};i.items.push(t),s.set(e,i)}return[...s.values()].sort((e,t)=>t.rank-e.rank).map(({rank:e,...t})=>t)}function jL(e,t,n){let r=new Map(t.map((e,t)=>[e,t])),i=new Map(n.map((e,t)=>[e.id,t]));return[...e].sort((e,t)=>{if(e.status===`done`&&t.status===`done`)return(t.closed??``).localeCompare(e.closed??``);let[n,a]=[r.get(e.id),r.get(t.id)];return n!==void 0||a!==void 0?(n??1/0)-(a??1/0):i.get(e.id)-i.get(t.id)})}var ML=`next`;function NL({items:e,areas:t,hiddenStatuses:n,next:r,colours:i,areaName:a,selectedId:o,reveal:s,onRevealed:c,onSelect:l,corner:u,group:d=`area`}){let f=kL.filter(e=>!n.has(e)),p=new Map(r.map((e,t)=>[e,t+1])),m=r.flatMap(t=>e.find(e=>e.id===t)??[]),h=d===`area`?t.map(t=>({key:t,name:a(t)??t,caption:a(t)===null?void 0:t,colour:i[t],items:e.filter(e=>e.area===t)})).filter(e=>e.items.length>0):AL(e,d),g=[...m.length>0?[{key:ML,name:`Next`,colour:`var(--text)`,items:m}]:[],...h],v=e=>d===`area`?e.area:h.find(t=>t.items.includes(e))?.key??``,y=()=>new Set([ML,...d!==`area`&&h[0]?[h[0].key]:[]]),[x,S]=(0,_.useState)(y);(0,_.useEffect)(()=>S(y()),[d]);let C=e=>S(t=>{let n=new Set(t);return n.delete(e)||n.add(e),n}),w=(0,_.useRef)(null),T=(0,_.useRef)(null);return(0,_.useEffect)(()=>{if(s===null)return;let t=e.find(e=>e.id===s.ref);if(t===void 0)return;let n=p.has(t.id)&&x.has(ML)?ML:v(t);x.has(n)||S(e=>new Set(e).add(n)),T.current={lane:n,ref:t.id},c?.()},[s,e]),(0,_.useEffect)(()=>{let e=T.current;e!==null&&x.has(e.lane)&&(T.current=null,w.current?.querySelector(`[data-lane="${e.lane}"] [data-ref="${CSS.escape(e.ref)}"]`)?.scrollIntoView({block:`center`,inline:`center`,behavior:`smooth`}))}),g.length===0?(0,b.jsx)(`div`,{className:`board board--empty`,children:`Nothing to show with these filters.`}):(0,b.jsxs)(`div`,{ref:w,className:`board`,role:`grid`,"aria-label":`Board`,style:{"--columns":f.length},children:[(0,b.jsx)(`div`,{className:`board__corner`,role:`columnheader`,children:u}),f.map(t=>(0,b.jsxs)(`div`,{className:`board__column`,role:`columnheader`,style:{"--area":K[t].colour},children:[(0,b.jsx)(`span`,{className:`board__column-icon`,children:K[t].icon}),K[t].label,(0,b.jsx)(`span`,{className:`board__count`,children:e.filter(e=>e.status===t).length})]},t)),g.map(t=>{let n=t.key===ML,a=t.name,s=x.has(t.key);return(0,b.jsxs)(`div`,{className:`board__lane`,role:`row`,"data-lane":t.key,"data-open":s,"data-next":n,style:{"--area":t.colour},children:[(0,b.jsxs)(`button`,{className:`board__lane-head`,role:`rowheader`,"aria-expanded":s,title:a,onClick:()=>C(t.key),children:[(0,b.jsxs)(`span`,{className:`board__lane-name`,children:[(0,b.jsx)(`span`,{className:`board__chevron`,"aria-hidden":`true`,children:s?`▾`:`▸`}),(0,b.jsx)(`span`,{className:`board__lane-text`,children:a})]}),(0,b.jsx)(`span`,{className:`board__lane-key`,children:t.caption===void 0?t.items.length:`${t.caption} · ${t.items.length}`})]}),f.map(c=>{let u=t.items.filter(e=>e.status===c);return(0,b.jsx)(`div`,{className:`board__cell`,role:`gridcell`,"aria-label":`${a} ${c}`,onClick:s?void 0:()=>C(t.key),children:s?(n||d!==`area`?u:jL(u,r,e)).map(e=>(0,b.jsxs)(`button`,{"data-ref":e.id,className:`board__card`,"data-on":e.id===o,"data-strike":K[e.status].strike,style:{"--area":i[e.area]},onClick:()=>l(e.id),title:`${e.id} [${K[e.status].label}] ${e.title}`,children:[(0,b.jsxs)(`span`,{className:`board__card-head`,children:[(0,b.jsx)(`span`,{className:`board__ref`,children:e.id}),(0,b.jsx)(`span`,{className:`board__status`,style:{color:K[e.status].colour},children:K[e.status].icon}),p.has(e.id)&&(0,b.jsxs)(`span`,{className:`board__next`,title:`Number ${p.get(e.id)} in the next list`,children:[`#`,p.get(e.id)]})]}),(0,b.jsx)(`span`,{className:`board__title`,children:e.title})]},e.id)):u.length>0&&(0,b.jsx)(`span`,{className:`board__folded`,children:u.length})},c)})]},t.key)})]})}var PL={item:Xh,area:Zh,ticket:eg,ghost:tg,overview:$h},FL=Object.keys(K),IL=[`status`,`area`],LL=20,RL=[],zL=[],BL=[],VL=[`graph`,`calendar`,`board`],HL=e=>(0,b.jsx)(`svg`,{viewBox:`0 0 24 24`,width:`16`,height:`16`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,"aria-hidden":`true`,children:e}),UL=()=>HL((0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(`rect`,{x:`3`,y:`5`,width:`18`,height:`16`,rx:`2`}),(0,b.jsx)(`path`,{d:`M3 10h18M8 3v4M16 3v4`})]})),WL=()=>HL((0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(`rect`,{x:`3`,y:`4`,width:`5`,height:`16`,rx:`1.5`}),(0,b.jsx)(`rect`,{x:`10`,y:`4`,width:`5`,height:`10`,rx:`1.5`}),(0,b.jsx)(`rect`,{x:`17`,y:`4`,width:`4`,height:`13`,rx:`1.5`})]})),GL={graph:()=>(0,b.jsx)(KL,{}),calendar:()=>(0,b.jsx)(UL,{}),board:()=>(0,b.jsx)(WL,{})},KL=()=>HL((0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(`circle`,{cx:`6`,cy:`6`,r:`2.5`}),(0,b.jsx)(`circle`,{cx:`18`,cy:`8`,r:`2.5`}),(0,b.jsx)(`circle`,{cx:`9`,cy:`18`,r:`2.5`}),(0,b.jsx)(`path`,{d:`M8.3 7.2l7.4 0.6M7 8.4l1.6 7.2`})]})),qL=()=>HL((0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(`circle`,{cx:`11`,cy:`11`,r:`6.5`}),(0,b.jsx)(`path`,{d:`M20 20l-4.2-4.2`})]})),JL=()=>HL((0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(`path`,{d:`M12 3v18M3 12h18`}),(0,b.jsx)(`path`,{d:`M9 6l3-3 3 3M9 18l3 3 3-3M6 9l-3 3 3 3M18 9l3 3-3 3`})]})),YL=()=>HL((0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(`circle`,{cx:`12`,cy:`5`,r:`1.4`}),(0,b.jsx)(`circle`,{cx:`12`,cy:`12`,r:`1.4`}),(0,b.jsx)(`circle`,{cx:`12`,cy:`19`,r:`1.4`})]})),XL=()=>HL((0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(`path`,{d:`M4 7h10M18 7h2M4 17h4M12 17h8`}),(0,b.jsx)(`circle`,{cx:`16`,cy:`7`,r:`2`}),(0,b.jsx)(`circle`,{cx:`10`,cy:`17`,r:`2`})]})),ZL=()=>HL((0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(`path`,{d:`M9 4l-6 2v14l6-2 6 2 6-2V4l-6 2-6-2z`}),(0,b.jsx)(`path`,{d:`M9 4v14M15 6v14`})]}));function QL(e,t,n){let[r,i]=(0,_.useState)(()=>{try{let r=localStorage.getItem(e);return n.includes(r)?r:t}catch{return t}});return[r,(0,_.useCallback)(t=>{i(t);try{localStorage.setItem(e,t)}catch{}},[e])]}var $L=e=>new Date(`${e}T00:00:00Z`).toLocaleDateString(void 0,{weekday:`short`,day:`numeric`,month:`short`,year:`numeric`,timeZone:`UTC`});function eR({plan:e,selection:t,focus:n,reload:r}){let i=t.project,{MenuActions:a,EmptyPlan:o}=Wp(),s=i?.key??``,c=i?.items??zL,l=(0,_.useMemo)(()=>Jp(c),[c]),u=(0,_.useMemo)(()=>Ym(l,i?.areaOrder),[l,i?.areaOrder]),d=e=>{let t=i?.areaInfo[e]?.name;return t===void 0||t===e?null:t},[f,p]=(0,_.useState)(new Set),[m,h]=(0,_.useState)(new Set([`done`])),[g,v]=(0,_.useState)(`area`),[y,x]=(0,_.useState)(null),S=y===`view`,C=y===`more`,[w,T]=(0,_.useState)(()=>n===null&&(typeof window>`u`||window.innerWidth>=700)?`next`:null),[E,D]=(0,_.useState)(``),[O,k]=(0,_.useState)(null);(0,_.useEffect)(()=>{let e=e=>{let t=e.target,n=t!==null&&(t.isContentEditable||[`INPUT`,`TEXTAREA`,`SELECT`].includes(t.tagName));!(e.key===`k`&&(e.metaKey||e.ctrlKey)||e.key===`/`&&!n)||n&&e.key===`/`||(e.preventDefault(),re(`search`))};return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},[]),(0,_.useEffect)(()=>{if(y===null)return;let e=e=>e.key===`Escape`&&x(null);return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},[y]);let[A,j]=(0,_.useState)(!1),[M,N]=(0,_.useState)(null),[P,F]=(0,_.useState)(Fp(n)===null?n:null),[I,L]=(0,_.useState)(()=>{let e=Fp(n);return e===null?null:{heading:e}}),ee=(0,_.useCallback)(e=>{F(null),te(null),T(null),L({heading:e})},[]),[R,te]=(0,_.useState)(null),ne=(0,_.useCallback)(e=>{F(null),L(null),T(null),te(e)},[]);function re(e){F(null),L(null),te(null),T(e)}let ie=e=>{k(null),typeof e==`string`?re(e):ne(e.area)};(0,_.useEffect)(()=>{P!==null&&(L(null),te(null),T(null))},[P]);let ae=I?.heading??null;(0,_.useEffect)(()=>{if(i===null)return;let e=`#${encodeURIComponent(i.key)}`,t=ae===null?null:`${e}/${encodeURIComponent(Pp+ae)}`,n=window.location.hash;t!==null&&n!==t&&history.replaceState(null,``,t),t===null&&Fp(decodeURIComponent(n.slice(e.length+1)))!==null&&history.replaceState(null,``,e)},[ae,i]);let[oe,se]=(0,_.useState)(new Set),ce=(0,_.useCallback)(e=>{se(t=>{if(!t.has(e))return t;let n=new Set(t);return n.delete(e),n})},[]);(0,_.useEffect)(()=>{let e=P?.split(`-`)[0];e!==void 0&&ce(e)},[P,ce]),(0,_.useEffect)(()=>{let e=Fp(n);e===null?F(n):ee(e)},[n,ee]);let[z,le]=QL(`attraverso.view`,`graph`,VL),[ue,de]=QL(`attraverso.calendar.dates`,`planned`,[`planned`,`created`,`updated`]),[fe,pe]=QL(`attraverso.board.group`,`area`,[`area`,`created`,`updated`]),me=typeof window<`u`&&window.innerWidth<700,[he,ge]=QL(me?`attraverso.minimap.narrow`:`attraverso.minimap.wide`,me?`hidden`:`shown`,[`shown`,`hidden`]),[_e,ve]=QL(`attraverso.calendar.span`,`all`,[`project`,`all`]),ye=_e===`all`&&e.projects.length>1,[be,xe]=(0,_.useState)(null),[Se,Ce]=(0,_.useState)(null),[we,Te]=(0,_.useState)(0),[Ee,De]=(0,_.useState)(()=>new Set([`images`,`comments`])),Oe=e=>({open:!Ee.has(e),onToggle:()=>De(t=>Ct(t,e))}),ke=(0,_.useMemo)(()=>(i?.next??BL).flatMap(e=>c.find(t=>t.id===e)??[]),[i,c]),Ae=w===`next`&&(ke.length===0||z===`board`)?null:w,[je,Me]=(0,_.useState)(()=>{try{let e=Number(window.localStorage.getItem(tR));return e>=rR?e:nR}catch{return nR}}),Ne=e=>{e.preventDefault();let t=e.clientX,n=je,r=n,i=e=>{r=Math.round(Math.min(Math.max(n+t-e.clientX,rR),window.innerWidth-80)),Me(r)},a=()=>{window.removeEventListener(`pointermove`,i),window.removeEventListener(`pointerup`,a);try{window.localStorage.setItem(tR,String(r))}catch{}};window.addEventListener(`pointermove`,i),window.addEventListener(`pointerup`,a)},Pe=(0,_.useMemo)(()=>{let e=new Set;for(let t of c)for(let n of t.deps)e.add(n).add(t.id);return e},[c]),Fe=(0,_.useMemo)(()=>c.filter(e=>!f.has(e.area)&&!m.has(e.status)),[c,f,m]),Ie=(0,_.useMemo)(()=>wh(c,f,m),[c,f,m]),Le=(0,_.useMemo)(()=>{let e=(e,t)=>e===t||e.startsWith(`${t}.`)||t.startsWith(`${e}.`),t=new Map,n=(e,n)=>{let r=t.get(e)??new Set;r.add(n),t.set(e,r)};for(let t of c)for(let r of t.deps)e(r,t.id)||(Ie.has(t.id)&&!Ie.has(r)&&n(r,t.id),Ie.has(r)&&!Ie.has(t.id)&&n(t.id,r));return t},[c,Ie]),[Re,ze]=Ef([]),Be=(0,_.useRef)(null),[Ve,He]=(0,_.useState)(null),[Ue,We]=(0,_.useState)(!1),[Ge,Ke]=(0,_.useState)(null);(0,_.useEffect)(()=>We(!1),[P]);let[qe,Je]=(0,_.useState)(!1);(0,_.useEffect)(()=>{z!==`graph`&&Je(!1)},[z]),(0,_.useEffect)(()=>{if(Ve===null||Be.current===null||!qe)return;let e=Re.find(e=>e.id===Ve);if(e===void 0||e.hidden===!0)return;let t=Ve.startsWith(`area:`),n=Be.current;requestAnimationFrame(()=>void n.fitView({nodes:[{id:Ve}],duration:400,maxZoom:t?1.2:1.1,padding:t?.08:.6})),He(null)},[Ve,Re,qe]);let Ye=e=>{p(t=>t.has(e)?Ct(t,e):t),He(`area:${e}`),me&&x(null)},[Xe,Ze,Qe]=Df([]),$e=(0,_.useMemo)(()=>vp(),[]),et=(0,_.useRef)($e?i?.layout??{}:(()=>{let e=cg(s);return Object.keys(e).length>0?e:i?.layout??{}})()),tt=(0,_.useRef)(null),nt=(0,_.useRef)(!1),rt=(0,_.useCallback)(e=>{if(!$e)return lg(s,e);tt.current!==null&&clearTimeout(tt.current),tt.current=setTimeout(()=>{tt.current=null,Cp(s,e).catch(t=>{console.warn(`the layout could not be saved to the plan; keeping it in this browser`,t),lg(s,e)})},400)},[s,$e]),it=(0,_.useRef)(ug(s)),at=(0,_.useRef)(new Map),ot=(0,_.useRef)({}),st=(0,_.useCallback)(e=>{let t=[],n=!1;for(let r of e)r.type===`position`?(r.position&&(ot.current[r.id]=r.position),r.dragging===!1&&t.push(r.id)):r.type===`dimensions`&&r.dimensions&&r.resizing!==void 0&&(it.current[r.id]=r.dimensions,r.resizing===!1&&(n=!0));n&&dg(s,it.current);let r=new Map(e.flatMap(e=>e.type===`dimensions`&&e.resizing!==void 0&&e.dimensions&&e.id.startsWith(`area:`)?[[`overview:${e.id.slice(5)}`,e.dimensions]]:[]));if(ze(t=>{let n=eu(e,t);return r.size===0?n:n.map(e=>{let t=r.get(e.id);return t===void 0?e:{...e,style:{...e.style,width:t.width,height:t.height}}})}),t.length>0){for(let e of t){let t=ot.current[e];t&&(et.current={...et.current,[e]:qh(at.current.get(e),t)}),delete ot.current[e]}nt.current=!0,Te(e=>e+1)}},[s,ze]),ct=(0,_.useCallback)(()=>{window.confirm(`Lay the map out afresh? Everything moves, including anything you arranged by hand.`)&&(fg(s),et.current={},it.current={},nt.current=!0,Te(e=>e+1))},[s]),lt=(0,_.useRef)(i?.layout??{});(0,_.useEffect)(()=>{let e=i?.layout??{};$e&&!iR(e,lt.current)&&(lt.current=e,tt.current!==null||nt.current||iR(e,et.current)||(et.current=e,Te(e=>e+1)))},[i?.layout,$e]),(0,_.useEffect)(()=>{let e=Gh(c,l,u,g,P,Ie,et.current);at.current=new Map(e.map(e=>[e.id,e.parentId]));let t=Kh(e);(nt.current||!iR(t,et.current))&&(nt.current=!1,et.current=t,rt(t));let n=c.filter(e=>!Ie.has(e.id)),r=e;if(n.length<c.length||oe.size>0){let i=new Map(e.map(e=>[e.id,e])),a=Gh(n,Jp(n),u,g,P,new Set,t,oe,`neighbours`),o=new Set(a.map(e=>e.id)),s=e=>e.type!==`ghost`&&oe.has(e.type===`overview`?e.data.area:e.id.split(`-`)[0]??``);r=[...a.map(e=>e.type===`area`&&e.data.collapsed!==void 0?e:{...e,data:i.get(e.id)?.data??e.data}),...e.filter(e=>!o.has(e.id)).map(e=>s(e)?{...e,hidden:!0}:e)]}ze(e=>{let t=new Set(e.filter(e=>e.selected===!0).map(e=>e.id));return r.map(e=>{let n=it.current[e.type===`overview`?`area:${e.data.area}`:e.id],r=n?{...e,style:{...e.style,width:n.width,height:n.height}}:e,a=e.type===`area`||e.type===`overview`?i?.areaInfo[e.data.area]:void 0;return a!==void 0&&(r={...r,data:{...r.data,name:a.name,description:a.description}}),t.has(e.id)?{...r,selected:!0}:r})})},[c,l,u,g,P,Ie,oe,we,rt,ze,i?.areaInfo]),(0,_.useEffect)(()=>{Ze(Jh(c,u,g,P,be,Se,Ie,oe))},[c,u,g,P,be,Se,Ie,oe,Ze]);let ut=(0,_.useRef)(new Set);(0,_.useEffect)(()=>{let e=(be?Le.get(be):void 0)??new Set,t=ut.current;(e.size!==0||t.size!==0)&&(ze(n=>n.map(n=>{if(e.has(n.id))return{...n,hidden:!1,style:{...n.style,opacity:.42}};if(t.has(n.id)){let e={...n.style};return delete e.opacity,{...n,hidden:Ie.has(n.id),style:e}}return n})),ut.current=e)},[be,Le,Ie,ze]),(0,_.useEffect)(()=>{if(!A)return;let e=e=>e.key===`Escape`&&j(!1);return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},[A]);let B=P?c.find(e=>e.id===P)??null:null,dt=B!==null||I!==null||R!==null||Ae!==null,ft=(0,_.useRef)(null);(0,_.useEffect)(()=>{let e=ft.current;if(!dt||e===null)return;let t=()=>{let t=e.querySelector(`.detail`),n=t!==null&&t.scrollHeight-t.scrollTop-t.clientHeight>2;e.dataset.more=String(n)};t(),e.addEventListener(`scroll`,t,!0);let n=new MutationObserver(t);n.observe(e,{childList:!0,subtree:!0,characterData:!0});let r=new ResizeObserver(t);return r.observe(e),()=>{e.removeEventListener(`scroll`,t,!0),n.disconnect(),r.disconnect()}},[dt]);let pt=(0,_.useMemo)(()=>Ym(e.projects.map(e=>e.key)),[e.projects]),[mt,ht]=(0,_.useState)(new Set),gt=(0,_.useMemo)(()=>{let t=(e,t)=>g===`status`?K[e.status].colour:t[e.area];return ye?e.projects.filter(e=>!mt.has(e.key)).flatMap(e=>{let n=e.key===i?.key?u:Ym(Jp(e.items),e.areaOrder);return e.items.filter(e=>!m.has(e.status)).map(r=>({project:e.key,item:r,colour:t(r,n),projectColour:pt[e.key]}))}):i?Fe.map(e=>({project:i.key,item:e,colour:t(e,u)})):[]},[ye,e.projects,mt,m,pt,i,Fe,g,u]),_t=(0,_.useMemo)(()=>gt.filter(e=>_E(e.item,ue)!==null).length,[gt,ue]),vt=(e,t)=>{e===i?.key?F(t):window.location.hash=`${encodeURIComponent(e)}/${encodeURIComponent(t)}`},[yt,bt]=(0,_.useState)(null),xt=B?.id??null;(0,_.useEffect)(()=>{if(xt===null||i===null)return bt(null);let e=new AbortController;return bt(e=>e!==null&&e.ref===xt?e:{ref:xt,state:`loading`}),Tp(i.key,xt,e.signal).then(e=>bt(e??{ref:xt,state:`missing`})).catch(e=>{e.name!==`AbortError`&&bt({ref:xt,state:`failed`})}),()=>e.abort()},[xt,i,e]);let St=yt!==null&&`body`in yt&&yt.ref===xt?yt:null,Ct=(e,t)=>{let n=new Set(e);return n.has(t)?n.delete(t):n.add(t),n},wt=e=>{if(e.source===`context`)return ee(e.id);let t=e.ref===null?void 0:c.find(t=>t.id===e.ref);t!==void 0&&(Et(t),k(`search`))},Tt=(e,t)=>{We(!1),Ie.has(e.id)&&(h(t=>t.has(e.status)?Ct(t,e.status):t),p(t=>t.has(e.area)?Ct(t,e.area):t)),le(t),t===`graph`&&He(e.id),t===`board`&&N({ref:e.id,nonce:Date.now()});let n=_E(e,ue);t===`calendar`&&n!==null&&Ke({date:n.start,nonce:Date.now()})},Et=e=>{Ie.has(e.id)&&(h(t=>t.has(e.status)?Ct(t,e.status):t),p(t=>t.has(e.area)?Ct(t,e.area):t)),z===`board`?N({ref:e.id,nonce:Date.now()}):(le(`graph`),He(e.id)),F(e.id)},Dt=(e,t)=>{(t.type===`item`||t.type===`ticket`)&&(F(t.data.item.id),k(null));let n=t.data;t.type===`area`&&n.area!==void 0&&(n.collapsed===void 0?n.foreign!==!0&&ne(n.area):ce(n.area))},Ot=(e,t)=>{let n=t.data;if(t.type===`area`&&n.collapsed===void 0&&n.foreign!==!0&&n.area!==void 0){let e=n.area;se(t=>new Set(t).add(e)),P?.split(`-`)[0]===e&&F(null)}},kt=(e,t)=>{Pe.has(t.id)&&xe(t.id)},At=()=>xe(null),jt=(e,t)=>Ce(t.id),Mt=()=>Ce(null),Nt=(0,_.useMemo)(()=>{let e=new Map,t=new Map;for(let n of c)e.set(n.area,(e.get(n.area)??0)+1),t.set(n.status,(t.get(n.status)??0)+1);return{byArea:e,byStatus:t}},[c]),Pt=c.length-Fe.length,Ft=i!==null&&i.context.length>0&&(0,b.jsxs)(`button`,{className:`next-fab`,"data-on":I!==null,onClick:()=>I===null?ee(null):L(null),title:`The project's context sections: what it is, and how it is worked on`,children:[(0,b.jsx)(`span`,{className:`next-fab__label`,children:`Context`}),(0,b.jsx)(`span`,{className:`chip__count`,children:i.context.length})]});return(0,b.jsxs)(`div`,{className:`app`,children:[(0,b.jsxs)(`header`,{className:`topbar`,children:[(0,b.jsx)(`div`,{className:`topbar__title`,children:(0,b.jsxs)(`span`,{className:`picker-wrap`,children:[(0,b.jsx)(xE,{className:`picker__logo`,crop:`icon`}),(()=>{let t=i?.file??(e.storePath===null?null:e.storePath.split(`,`)[0].split(`/`).pop()),n=t!==null&&(0,b.jsx)(`span`,{className:`picker__file`,title:e.storePath??void 0,children:t});return e.projects.length<=1?(0,b.jsxs)(`span`,{className:`picker picker--static`,children:[(0,b.jsx)(`strong`,{className:`picker__name`,children:i?.name??`no project`}),n]}):(0,b.jsxs)(`label`,{className:`picker`,title:`Switch project`,children:[(0,b.jsx)(`span`,{className:`picker__name`,children:i?.name??`choose a project`}),n,(0,b.jsxs)(`select`,{className:`picker__native`,"aria-label":`Project`,value:i?.key??``,onChange:e=>{window.location.hash=e.target.value},children:[i===null&&(0,b.jsx)(`option`,{value:``,children:`choose a project`}),e.projects.map(e=>(0,b.jsx)(`option`,{value:e.key,children:e.name},e.key))]})]})})()]})}),(0,b.jsxs)(`div`,{className:`filters`,children:[(0,b.jsx)(`div`,{className:`view-tabs`,role:`tablist`,"aria-label":`View`,children:VL.map(e=>(0,b.jsxs)(`button`,{className:`toolbtn`,role:`tab`,"aria-selected":e===z,"data-on":e===z,title:`Show the ${e}`,onClick:()=>le(e),children:[(0,b.jsx)(`span`,{className:`toolbtn__main`,children:GL[e]()}),(0,b.jsx)(`span`,{className:`toolbtn__sub`,children:e})]},e))}),(0,b.jsxs)(`button`,{className:`toolbtn`,"data-on":Ae===`search`,"aria-label":`Search`,title:`Search (/ or Cmd+K)`,onClick:()=>Ae===`search`?T(null):re(`search`),children:[(0,b.jsx)(`span`,{className:`toolbtn__main`,children:(0,b.jsx)(qL,{})}),(0,b.jsx)(`span`,{className:`toolbtn__sub`,children:`search`})]}),(0,b.jsxs)(`button`,{className:`toolbtn`,"data-on":S,"aria-haspopup":`dialog`,"aria-expanded":S,"aria-label":`View settings`,onClick:()=>x(S?null:`view`),children:[(0,b.jsxs)(`span`,{className:`toolbtn__main`,children:[(0,b.jsx)(XL,{}),(0,b.jsx)(`span`,{className:`toolbtn__text`,children:`view`})]}),(0,b.jsx)(`span`,{className:`toolbtn__sub`,children:Pt>0?`${Pt} hidden`:`all shown`}),Pt>0&&(0,b.jsx)(`span`,{className:`toolbtn__badge`,"aria-hidden":`true`,children:Pt})]}),(0,b.jsx)(`button`,{className:`toolbtn toolbtn--icon`,"data-on":C,"aria-haspopup":`menu`,"aria-expanded":C,"aria-label":`More`,title:`More`,onClick:()=>x(C?null:`more`),children:(0,b.jsx)(YL,{})})]}),S&&(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(`div`,{className:`settings__backdrop`,onClick:()=>x(null)}),(0,b.jsxs)(`div`,{className:`settings`,role:`dialog`,"aria-label":`View settings`,children:[(0,b.jsxs)(`div`,{className:`settings__head`,title:e.storePath??void 0,children:[i?.name??`No project`,e.storePath!==null&&` - ${i?.file??e.storePath.split(`/`).pop()}`]}),!(z===`calendar`&&ye)&&(0,b.jsx)(`div`,{className:`settings__label`,children:`Areas`}),!(z===`calendar`&&ye)&&(0,b.jsx)(`div`,{className:`filters__group`,children:l.map(e=>z===`graph`?(0,b.jsxs)(`span`,{className:`chip-pair`,"data-off":f.has(e),children:[(0,b.jsxs)(`button`,{className:`chip`,style:{"--area":u[e]},onClick:()=>Ye(e),title:f.has(e)?`Show ${e} and zoom to it`:`Zoom to ${e}`,children:[(0,b.jsx)(`span`,{className:`chip__name`,children:d(e)??e}),d(e)!==null&&(0,b.jsx)(`span`,{className:`chip__key`,children:e}),(0,b.jsx)(`span`,{className:`chip__count`,children:Nt.byArea.get(e)})]}),(0,b.jsx)(`button`,{className:`chip chip--eye`,onClick:()=>p(t=>Ct(t,e)),title:f.has(e)?`Show ${e}`:`Hide ${e}`,"aria-label":f.has(e)?`Show ${e}`:`Hide ${e}`,children:(0,b.jsxs)(`svg`,{viewBox:`0 0 16 16`,width:`13`,height:`13`,"aria-hidden":`true`,children:[(0,b.jsx)(`path`,{d:`M1 8s2.6-4.5 7-4.5S15 8 15 8s-2.6 4.5-7 4.5S1 8 1 8z`,fill:`none`,stroke:`currentColor`,strokeWidth:`1.4`}),(0,b.jsx)(`circle`,{cx:`8`,cy:`8`,r:`2`,fill:`currentColor`}),f.has(e)&&(0,b.jsx)(`path`,{d:`M2.5 13.5l11-11`,stroke:`currentColor`,strokeWidth:`1.4`})]})})]},e):(0,b.jsxs)(`button`,{className:`chip`,"data-off":f.has(e),style:{"--area":u[e]},onClick:()=>p(t=>Ct(t,e)),children:[(0,b.jsx)(`span`,{className:`chip__name`,children:d(e)??e}),d(e)!==null&&(0,b.jsx)(`span`,{className:`chip__key`,children:e}),(0,b.jsx)(`span`,{className:`chip__count`,children:Nt.byArea.get(e)})]},e))}),!(z===`calendar`&&ye)&&(0,b.jsxs)(`div`,{className:`settings__row`,children:[(0,b.jsx)(`button`,{className:`chip`,disabled:f.size===0,onClick:()=>p(new Set),children:`show all`}),(0,b.jsx)(`button`,{className:`chip`,disabled:l.every(e=>f.has(e)),onClick:()=>p(new Set(l)),children:`hide all`})]}),(0,b.jsx)(`div`,{className:`settings__label`,children:`Statuses`}),(0,b.jsx)(`div`,{className:`filters__group`,children:FL.map(e=>(0,b.jsxs)(`button`,{className:`chip`,"data-off":m.has(e),style:{"--area":K[e].colour},onClick:()=>h(t=>Ct(t,e)),children:[(0,b.jsx)(`span`,{className:`chip__dot`}),K[e].label,(0,b.jsx)(`span`,{className:`chip__count`,children:Nt.byStatus.get(e)??0})]},e))}),(0,b.jsx)(`div`,{className:`settings__row`,children:z===`calendar`&&e.projects.length>1&&(0,b.jsx)(`button`,{className:`chip`,"data-on":ye,onClick:()=>ve(ye?`project`:`all`),title:`Show every project's dated items on one calendar, coloured by project`,children:`all projects`})}),z===`graph`&&(0,b.jsx)(`div`,{className:`settings__label`,children:`Layout`}),(0,b.jsxs)(`div`,{className:`settings__row`,children:[z===`graph`&&(0,b.jsx)(`button`,{className:`chip`,disabled:oe.size===0,onClick:()=>se(new Set),title:`Open every area. Click a folded area to open just that one`,children:`expand all`}),z===`graph`&&(0,b.jsx)(`button`,{className:`chip`,disabled:l.every(e=>oe.has(e)),onClick:()=>{F(null),se(new Set(l))},title:`Fold every area into a summary. Double-click an open area's frame to fold just that one`,children:`collapse all`})]})]})]}),C&&(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(`div`,{className:`settings__backdrop`,onClick:()=>x(null)}),(0,b.jsxs)(`div`,{className:`settings settings--more`,role:`menu`,"aria-label":`More`,children:[(0,b.jsx)(`div`,{className:`settings__label`,children:`Colour cards by`}),(0,b.jsx)(`div`,{className:`segmented`,role:`group`,"aria-label":`Colour by`,children:IL.map(e=>(0,b.jsx)(`button`,{className:`segmented__btn`,"data-on":g===e,onClick:()=>v(e),children:e},e))}),z===`board`&&(0,b.jsx)(`div`,{className:`settings__label`,children:`Group board by`}),z===`board`&&(0,b.jsx)(`div`,{className:`segmented`,role:`group`,"aria-label":`Group board by`,children:[`area`,`created`,`updated`].map(e=>(0,b.jsx)(`button`,{className:`segmented__btn`,"data-on":fe===e,onClick:()=>pe(e),children:e===`updated`?`modified`:e},e))}),z===`graph`&&(0,b.jsx)(`div`,{className:`settings__label`,children:`Layout`}),z===`graph`&&(0,b.jsx)(`button`,{className:`chip`,onClick:()=>{x(null),ct()},title:`Lay the map out afresh, forgetting where everything was`,children:`reset layout`}),a!==void 0&&(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(`div`,{className:`settings__label`,children:`Plan`}),(0,b.jsx)(`div`,{className:`settings__row`,children:(0,b.jsx)(a,{plan:e,project:i,reload:r})})]})]})]})]}),(0,b.jsxs)(`div`,{className:`body`,"data-pane":dt?`open`:void 0,"data-view":z,children:[(0,b.jsxs)(`div`,{className:`graph`,children:[e.projects.length===0&&o!==void 0?(0,b.jsx)(`div`,{className:`graph__notice`,children:(0,b.jsx)(o,{reload:r})}):t.notice!==null&&!(z===`calendar`&&ye)?(0,b.jsx)(`div`,{className:`graph__notice`,children:t.notice}):z===`calendar`&&_t===0&&(0,b.jsx)(`div`,{className:`graph__notice`,children:ue===`planned`?(0,b.jsxs)(b.Fragment,{children:[`Nothing here has a date yet. Give an item a `,(0,b.jsx)(`code`,{children:`due`}),` (or a `,(0,b.jsx)(`code`,{children:`start`}),`) with`,` `,(0,b.jsx)(`code`,{children:`edit_item`}),` and it appears on the calendar.`,(0,b.jsxs)(`div`,{className:`graph__notice-actions`,children:[(0,b.jsx)(`button`,{className:`chip`,onClick:()=>de(`created`),children:`show when items were filed`}),(0,b.jsx)(`button`,{className:`chip`,onClick:()=>de(`updated`),children:`show when they last changed`})]})]}):(0,b.jsxs)(b.Fragment,{children:[`Nothing here records when it was `,ue===`created`?`filed`:`last changed`,`.`]})}),z===`graph`&&i!==null&&(0,b.jsxs)(`div`,{className:`fabs`,children:[ke.length>0&&(0,b.jsxs)(`button`,{className:`next-fab`,"data-on":Ae===`next`,onClick:()=>Ae===`next`?T(null):re(`next`),title:`The order agreed with set_next`,children:[`Next`,(0,b.jsx)(`span`,{className:`chip__count`,children:ke.length})]}),Ft,z===`graph`&&(0,b.jsxs)(`button`,{className:`next-fab`,"data-on":A,"aria-pressed":A,title:A?`Done moving (Esc)`:`Move and resize cards and areas`,onClick:()=>j(!A),children:[(0,b.jsx)(JL,{}),A?`Done`:`Move`]})]}),z===`board`&&i!==null?(0,b.jsx)(NL,{corner:Ft,group:fe,items:Fe,areas:l,hiddenStatuses:m,next:ke.map(e=>e.id),colours:u,areaName:d,selectedId:P,reveal:M,onRevealed:()=>N(null),onSelect:e=>{F(e),k(null)}}):z===`calendar`?(0,b.jsx)(yE,{entries:gt,multiProject:ye,focus:Ge,projects:ye?e.projects.map(e=>({key:e.key,name:e.name,colour:pt[e.key],hidden:mt.has(e.key),toggle:()=>ht(t=>Ct(t,e.key))})):void 0,dates:ue,onDates:de,nextList:ke.length===0?void 0:{count:ke.length,open:Ae===`next`,toggle:()=>Ae===`next`?T(null):re(`next`)},selected:i&&P?{project:i.key,ref:P}:null,onSelect:vt}):(0,b.jsxs)(Tf,{nodes:Re,edges:Xe,nodeTypes:PL,onNodesChange:st,onEdgesChange:Qe,onInit:e=>{Be.current=e,Je(!0)},onNodeClick:Dt,onNodeDoubleClick:Ot,zoomOnDoubleClick:!1,onNodeMouseEnter:kt,onNodeMouseLeave:At,onEdgeMouseEnter:jt,onEdgeMouseLeave:Mt,onPaneClick:()=>F(null),nodesDraggable:A,className:A?`is-moving`:void 0,nodesConnectable:!1,fitView:!0,snapToGrid:!0,snapGrid:[LL,LL],minZoom:.05,maxZoom:1.75,proOptions:{hideAttribution:!0},children:[(0,b.jsx)(Pf,{gap:LL,color:`#232a33`}),(0,b.jsx)(OL,{}),he===`shown`&&(0,b.jsx)(op,{pannable:!0,zoomable:!0,nodeColor:e=>e.type===`overview`?`transparent`:e.data.colour??`#2b3644`,nodeStrokeColor:`#0b0f14`,nodeBorderRadius:4,maskColor:`rgba(11,15,20,0.6)`}),(0,b.jsx)(Uf,{showInteractive:!1,children:(0,b.jsx)(Bf,{onClick:()=>ge(he===`shown`?`hidden`:`shown`),title:he===`shown`?`Hide the minimap`:`Show the minimap`,"aria-label":he===`shown`?`Hide the minimap`:`Show the minimap`,children:(0,b.jsx)(ZL,{})})})]})]}),dt&&(0,b.jsxs)(`div`,{className:`pane`,ref:ft,style:{width:je},children:[(0,b.jsx)(`div`,{className:`pane__resize`,onPointerDown:Ne,title:`Drag to resize`,"aria-hidden":`true`}),B&&(0,b.jsxs)(`aside`,{className:`detail`,children:[(0,b.jsxs)(`div`,{className:`detail__head`,children:[(0,b.jsxs)(`div`,{children:[O!==null&&(0,b.jsx)(`button`,{className:`detail__close detail__back`,onClick:()=>ie(O),"aria-label":`Back to ${typeof O==`string`?O===`next`?`Next`:`Search`:O.area}`,title:`Back to ${typeof O==`string`?O===`next`?`Next`:`Search`:O.area}`,children:`‹`}),(0,b.jsx)(`span`,{className:`detail__id`,style:{color:u[B.area]},children:B.id}),i&&(0,b.jsx)(mg,{projectKey:i.key,ref_:B.id,status:B.status,reload:r})]}),(0,b.jsxs)(`div`,{className:`detail__tools`,children:[(0,b.jsx)(`button`,{className:`detail__icon`,"aria-label":`Show this item in`,"aria-haspopup":`menu`,"aria-expanded":Ue,title:`Show it in the graph, calendar or board`,onClick:()=>We(e=>!e),children:(0,b.jsx)(YL,{})}),(0,b.jsx)(`button`,{className:`detail__close`,onClick:()=>F(null),"aria-label":`Close`,children:`×`}),Ue&&(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(`div`,{className:`settings__backdrop`,onClick:()=>We(!1)}),(0,b.jsxs)(`div`,{className:`item-menu`,role:`menu`,"aria-label":`Show this item in`,children:[i!==null&&vp()&&B.status!==`done`&&(0,b.jsxs)(`button`,{role:`menuitem`,className:`item-menu__row`,onClick:()=>{let e=ke.some(e=>e.id===B.id);We(!1),Sp(i.key,B.id,!e).catch(e=>window.alert(e instanceof Error?e.message:String(e))).finally(r)},children:[(0,b.jsx)(`span`,{className:`item-menu__glyph`,"aria-hidden":`true`,children:ke.some(e=>e.id===B.id)?`−`:`+`}),ke.some(e=>e.id===B.id)?`Remove from Next (#${ke.findIndex(e=>e.id===B.id)+1})`:`Add to Next`]}),VL.map(e=>{let t=e===`calendar`&&_E(B,ue)===null;return(0,b.jsxs)(`button`,{role:`menuitem`,className:`item-menu__row`,disabled:t,title:t?`It has no date, so it is not on the calendar`:void 0,onClick:()=>Tt(B,e),children:[GL[e](),e===`graph`?`Show in the graph`:`Show on the ${e}`]},e)})]})]})]})]}),(0,b.jsx)(`h2`,{className:`detail__title`,children:B.title}),(B.start!==void 0||B.due!==void 0)&&(0,b.jsx)(`div`,{className:`detail__deps`,children:[B.start&&`starts ${$L(B.start)}`,B.due&&`due ${$L(B.due)}`].filter(Boolean).join(`, `)}),B.deps.length>0&&(0,b.jsxs)(`div`,{className:`detail__deps`,children:[`depends on:`,` `,B.deps.map((e,t)=>{let n=qp(e);return(0,b.jsxs)(`span`,{children:[t>0&&`, `,n===null?(0,b.jsx)(`button`,{className:`detail__dep`,onClick:()=>F(e),children:e}):(0,b.jsx)(`span`,{className:`detail__dep detail__dep--elsewhere`,title:`${n.ref} in the ${n.project} project, which is not open here`,children:e})]},e)})]}),(0,b.jsx)(`div`,{className:`detail__doc`,children:St===null?(0,b.jsx)(`p`,{className:`detail__pending`,children:yt!==null&&`state`in yt&&yt.state===`missing`?`This item is no longer in the plan.`:yt!==null&&`state`in yt&&yt.state===`failed`?`Could not load this item. Try reopening it.`:`Loading…`}):(0,b.jsx)(xL,{body:St.body,references:St.references})}),i&&(0,b.jsx)(Hp,{metrics:i.metrics.get(B.id)??RL,...Oe(`metrics`)}),i&&(0,b.jsx)(Rp,{...Oe(`images`),projectKey:i.key,ref_:B.id,images:St?.attachments??RL,uploadsDisabled:e.uploadsDisabled,reload:r}),St!==null&&(0,b.jsx)(CL,{comments:St.comments,...Oe(`comments`)})]}),!B&&I===null&&R!==null&&i!==null&&(0,b.jsx)(TL,{area:R,name:i.areaInfo[R]?.name,description:i.areaInfo[R]?.description,colour:u[R],items:c.filter(e=>e.area===R),next:ke.flatMap((e,t)=>e.area===R?[{item:e,position:t+1}]:[]),hidden:Ie,onPick:e=>{Et(e),k({area:R})},onZoom:()=>Ye(R),onClose:()=>te(null)}),!B&&I===null&&R===null&&Ae===`next`&&(0,b.jsxs)(`aside`,{className:`detail`,"aria-label":`Next`,children:[(0,b.jsxs)(`div`,{className:`detail__head`,children:[(0,b.jsx)(`span`,{className:`detail__id`,children:`Next`}),(0,b.jsx)(`button`,{className:`detail__close`,onClick:()=>T(null),"aria-label":`Close`,children:`×`})]}),(0,b.jsx)(`ol`,{className:`next__list area-pane__list`,children:ke.map((e,t)=>(0,b.jsx)(`li`,{children:(0,b.jsxs)(`button`,{className:`next__item`,"data-hidden":Ie.has(e.id),onClick:()=>{Et(e),k(`next`)},children:[(0,b.jsx)(`span`,{className:`next__pos`,children:t+1}),(0,b.jsx)(`span`,{className:`next__id`,style:{color:u[e.area]},children:e.id}),(0,b.jsx)(`span`,{className:`next__title`,children:e.title})]})},e.id))})]}),!B&&I===null&&R===null&&Ae===`search`&&i!==null&&(0,b.jsx)(SE,{projectKey:i.key,colours:u,hidden:Ie,titleOf:e=>c.find(t=>t.id===e)?.title,query:E,onQuery:D,onPick:wt,onClose:()=>T(null)}),!B&&I!==null&&i!==null&&(0,b.jsxs)(`aside`,{className:`detail`,"aria-label":`Context`,children:[(0,b.jsxs)(`div`,{className:`detail__head`,children:[(0,b.jsxs)(`div`,{children:[I.heading!==null&&(0,b.jsx)(`button`,{className:`detail__close detail__back`,onClick:()=>L({heading:null}),"aria-label":`Back to Context`,title:`Back to Context`,children:`‹`}),(0,b.jsx)(`span`,{className:`detail__id`,children:`Context`})]}),(0,b.jsx)(`button`,{className:`detail__close`,onClick:()=>L(null),"aria-label":`Close`,children:`×`})]}),I.heading===null?(0,b.jsx)(`ul`,{className:`context__list`,children:i.context.map(e=>(0,b.jsx)(`li`,{children:(0,b.jsx)(`button`,{className:`context__item`,onClick:()=>L({heading:e.heading}),children:e.heading})},e.heading))}):(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(`h2`,{className:`detail__title`,children:I.heading}),(0,b.jsx)(`div`,{className:`detail__doc`,children:(()=>{let e=i.context.find(e=>e.heading===I.heading);return e===void 0?(0,b.jsx)(`p`,{children:`This section no longer exists.`}):(0,b.jsx)(xL,{body:e.content,references:e.references})})()})]})]})]})]})]})}var tR=`attraverso.pane.width`,nR=420,rR=300;function iR(e,t){let n=Object.keys(e);return n.length===Object.keys(t).length&&n.every(n=>t[n]!==void 0&&e[n].x===t[n].x&&e[n].y===t[n].y)}function aR({extensions:e}){let[t,n]=(0,_.useState)(null),[r,i]=(0,_.useState)(null),[a,o]=(0,_.useState)(null),s=cR();(0,_.useEffect)(()=>{hp(e.session,o).then(o,()=>o({mode:`local`}))},[e.session]);let c=(0,_.useCallback)(()=>{Mp().then(n,e=>i(e instanceof Error?e.message:String(e)))},[]),l=(0,_.useCallback)(()=>{Mp().then(n,()=>{})},[]);if(sR(t!==null&&e.liveRefresh!==!1,l),(0,_.useEffect)(()=>{a!==null&&a.mode!==`anonymous`&&c()},[a,c]),a===null)return(0,b.jsx)(`div`,{className:`boot`,children:`Starting...`});if(a.mode===`anonymous`)return(0,b.jsxs)(`div`,{className:`boot`,children:[(0,b.jsx)(`strong`,{children:`Sign in to see your projects`}),(0,b.jsx)(`span`,{className:`boot__hint`,children:`This viewer is hosted, so it shows the projects belonging to your account.`}),(0,b.jsx)(`button`,{className:`boot__action`,onClick:a.signIn,children:a.signInLabel})]});if(r)return(0,b.jsxs)(`div`,{className:`boot boot--error`,children:[(0,b.jsx)(`strong`,{children:`Could not load the plan.`}),(0,b.jsx)(`span`,{children:r}),(0,b.jsxs)(`span`,{className:`boot__hint`,children:[`Nothing is serving `,(0,b.jsx)(`code`,{children:gp}),`. Run `,(0,b.jsx)(`code`,{children:`yarn viewer`}),`, or open the viewer from the MCP server so it serves the store it already has loaded.`]})]});if(!t)return(0,b.jsx)(`div`,{className:`boot`,children:`Loading the plan...`});let u=Ip(t.projects,s.project);return(0,b.jsx)(Up.Provider,{value:e,children:(0,b.jsx)(eR,{plan:t,selection:u,focus:s.item,reload:c},u.project?.key??`none`)})}var oR=5;function sR(e,t){(0,_.useEffect)(()=>{if(!e||typeof EventSource>`u`)return;let n,r=null,i=0,a=!1,o=()=>{r?.close(),r=null},s=()=>{if(a||r!==null||document.visibilityState!==`visible`)return;let e=new EventSource(wp);r=e,e.addEventListener(`open`,()=>i=0),e.addEventListener(`version`,e=>{let r=e.data;n!==void 0&&r!==n&&t(),n=r}),e.addEventListener(`error`,()=>{(e.readyState===EventSource.CLOSED||++i>=oR)&&(a=!0,o())})},c=()=>document.visibilityState===`visible`?s():o();return s(),document.addEventListener(`visibilitychange`,c),()=>{a=!0,o(),document.removeEventListener(`visibilitychange`,c)}},[e,t])}function cR(){let e=()=>Np(window.location.hash),[t,n]=(0,_.useState)(e);return(0,_.useEffect)(()=>{let t=()=>n(e());return window.addEventListener(`hashchange`,t),()=>window.removeEventListener(`hashchange`,t)},[]),t}function lR(e={}){(0,v.createRoot)(document.getElementById(`root`)).render((0,b.jsx)(_.StrictMode,{children:(0,b.jsx)(aR,{extensions:e})}))}lR();