@gbasin/agentboard-linux-arm64 0.9.1 → 0.9.2

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.
@@ -17,7 +17,7 @@ Error generating stack: `+e.message+`
17
17
  To pick up a draggable item, press the space bar.
18
18
  While dragging, use the arrow keys to move the item.
19
19
  Press space again to drop the item in its new position, or press escape to cancel.
20
- `},Xd={onDragStart(e){let{active:t}=e;return`Picked up draggable item `+t.id+`.`},onDragOver(e){let{active:t,over:n}=e;return n?`Draggable item `+t.id+` was moved over droppable area `+n.id+`.`:`Draggable item `+t.id+` is no longer over a droppable area.`},onDragEnd(e){let{active:t,over:n}=e;return n?`Draggable item `+t.id+` was dropped over droppable area `+n.id:`Draggable item `+t.id+` was dropped.`},onDragCancel(e){let{active:t}=e;return`Dragging was cancelled. Draggable item `+t.id+` was dropped.`}};function Zd(e){let{announcements:t=Xd,container:n,hiddenTextDescribedById:r,screenReaderInstructions:i=Yd}=e,{announce:a,announcement:o}=Gd(),s=jd(`DndLiveRegion`),[c,l]=(0,x.useState)(!1);if((0,x.useEffect)(()=>{l(!0)},[]),qd((0,x.useMemo)(()=>({onDragStart(e){let{active:n}=e;a(t.onDragStart({active:n}))},onDragMove(e){let{active:n,over:r}=e;t.onDragMove&&a(t.onDragMove({active:n,over:r}))},onDragOver(e){let{active:n,over:r}=e;a(t.onDragOver({active:n,over:r}))},onDragEnd(e){let{active:n,over:r}=e;a(t.onDragEnd({active:n,over:r}))},onDragCancel(e){let{active:n,over:r}=e;a(t.onDragCancel({active:n,over:r}))}}),[a,t])),!c)return null;let u=x.createElement(x.Fragment,null,x.createElement(Ud,{id:r,value:i.draggable}),x.createElement(Wd,{id:s,announcement:o}));return n?(0,U.createPortal)(u,n):u}var Qd;(function(e){e.DragStart=`dragStart`,e.DragMove=`dragMove`,e.DragEnd=`dragEnd`,e.DragCancel=`dragCancel`,e.DragOver=`dragOver`,e.RegisterDroppable=`registerDroppable`,e.SetDroppableDisabled=`setDroppableDisabled`,e.UnregisterDroppable=`unregisterDroppable`})(Qd||={});function $d(){}function ef(e,t){return(0,x.useMemo)(()=>({sensor:e,options:t??{}}),[e,t])}function tf(){var e=[...arguments];return(0,x.useMemo)(()=>[...e].filter(e=>e!=null),[...e])}var nf=Object.freeze({x:0,y:0});function rf(e,t){return Math.sqrt((e.x-t.x)**2+(e.y-t.y)**2)}function af(e,t){let{data:{value:n}}=e,{data:{value:r}}=t;return n-r}function of(e,t){let{data:{value:n}}=e,{data:{value:r}}=t;return r-n}function sf(e,t){if(!e||e.length===0)return null;let[n]=e;return t?n[t]:n}function cf(e,t,n){return t===void 0&&(t=e.left),n===void 0&&(n=e.top),{x:t+e.width*.5,y:n+e.height*.5}}var lf=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:r}=e,i=cf(t,t.left,t.top),a=[];for(let e of r){let{id:t}=e,r=n.get(t);if(r){let n=rf(cf(r),i);a.push({id:t,data:{droppableContainer:e,value:n}})}}return a.sort(af)};function uf(e,t){let n=Math.max(t.top,e.top),r=Math.max(t.left,e.left),i=Math.min(t.left+t.width,e.left+e.width),a=Math.min(t.top+t.height,e.top+e.height),o=i-r,s=a-n;if(r<i&&n<a){let n=t.width*t.height,r=e.width*e.height,i=o*s,a=i/(n+r-i);return Number(a.toFixed(4))}return 0}var df=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:r}=e,i=[];for(let e of r){let{id:r}=e,a=n.get(r);if(a){let n=uf(a,t);n>0&&i.push({id:r,data:{droppableContainer:e,value:n}})}}return i.sort(of)};function ff(e,t,n){return{...e,scaleX:t&&n?t.width/n.width:1,scaleY:t&&n?t.height/n.height:1}}function pf(e,t){return e&&t?{x:e.left-t.left,y:e.top-t.top}:nf}function mf(e){return function(t){return[...arguments].slice(1).reduce((t,n)=>({...t,top:t.top+e*n.y,bottom:t.bottom+e*n.y,left:t.left+e*n.x,right:t.right+e*n.x}),{...t})}}var hf=mf(1);function gf(e){if(e.startsWith(`matrix3d(`)){let t=e.slice(9,-1).split(/, /);return{x:+t[12],y:+t[13],scaleX:+t[0],scaleY:+t[5]}}else if(e.startsWith(`matrix(`)){let t=e.slice(7,-1).split(/, /);return{x:+t[4],y:+t[5],scaleX:+t[0],scaleY:+t[3]}}return null}function _f(e,t,n){let r=gf(t);if(!r)return e;let{scaleX:i,scaleY:a,x:o,y:s}=r,c=e.left-o-(1-i)*parseFloat(n),l=e.top-s-(1-a)*parseFloat(n.slice(n.indexOf(` `)+1)),u=i?e.width/i:e.width,d=a?e.height/a:e.height;return{width:u,height:d,top:l,right:c+u,bottom:l+d,left:c}}var vf={ignoreTransform:!1};function yf(e,t){t===void 0&&(t=vf);let n=e.getBoundingClientRect();if(t.ignoreTransform){let{transform:t,transformOrigin:r}=vd(e).getComputedStyle(e);t&&(n=_f(n,t,r))}let{top:r,left:i,width:a,height:o,bottom:s,right:c}=n;return{top:r,left:i,width:a,height:o,bottom:s,right:c}}function bf(e){return yf(e,{ignoreTransform:!0})}function xf(e){let t=e.innerWidth,n=e.innerHeight;return{top:0,left:0,right:t,bottom:n,width:t,height:n}}function Sf(e,t){return t===void 0&&(t=vd(e).getComputedStyle(e)),t.position===`fixed`}function Cf(e,t){t===void 0&&(t=vd(e).getComputedStyle(e));let n=/(auto|scroll|overlay)/;return[`overflow`,`overflowX`,`overflowY`].some(e=>{let r=t[e];return typeof r==`string`?n.test(r):!1})}function wf(e,t){let n=[];function r(i){if(t!=null&&n.length>=t||!i)return n;if(yd(i)&&i.scrollingElement!=null&&!n.includes(i.scrollingElement))return n.push(i.scrollingElement),n;if(!bd(i)||xd(i)||n.includes(i))return n;let a=vd(e).getComputedStyle(i);return i!==e&&Cf(i,a)&&n.push(i),Sf(i,a)?n:r(i.parentNode)}return e?r(e):n}function Tf(e){let[t]=wf(e,1);return t??null}function Ef(e){return!hd||!e?null:gd(e)?e:_d(e)?yd(e)||e===Sd(e).scrollingElement?window:bd(e)?e:null:null}function Df(e){return gd(e)?e.scrollX:e.scrollLeft}function Of(e){return gd(e)?e.scrollY:e.scrollTop}function kf(e){return{x:Df(e),y:Of(e)}}var Af;(function(e){e[e.Forward=1]=`Forward`,e[e.Backward=-1]=`Backward`})(Af||={});function jf(e){return!hd||!e?!1:e===document.scrollingElement}function Mf(e){let t={x:0,y:0},n=jf(e)?{height:window.innerHeight,width:window.innerWidth}:{height:e.clientHeight,width:e.clientWidth},r={x:e.scrollWidth-n.width,y:e.scrollHeight-n.height};return{isTop:e.scrollTop<=t.y,isLeft:e.scrollLeft<=t.x,isBottom:e.scrollTop>=r.y,isRight:e.scrollLeft>=r.x,maxScroll:r,minScroll:t}}var Nf={x:.2,y:.2};function Pf(e,t,n,r,i){let{top:a,left:o,right:s,bottom:c}=n;r===void 0&&(r=10),i===void 0&&(i=Nf);let{isTop:l,isBottom:u,isLeft:d,isRight:f}=Mf(e),p={x:0,y:0},m={x:0,y:0},h={height:t.height*i.y,width:t.width*i.x};return!l&&a<=t.top+h.height?(p.y=Af.Backward,m.y=r*Math.abs((t.top+h.height-a)/h.height)):!u&&c>=t.bottom-h.height&&(p.y=Af.Forward,m.y=r*Math.abs((t.bottom-h.height-c)/h.height)),!f&&s>=t.right-h.width?(p.x=Af.Forward,m.x=r*Math.abs((t.right-h.width-s)/h.width)):!d&&o<=t.left+h.width&&(p.x=Af.Backward,m.x=r*Math.abs((t.left+h.width-o)/h.width)),{direction:p,speed:m}}function Ff(e){if(e===document.scrollingElement){let{innerWidth:e,innerHeight:t}=window;return{top:0,left:0,right:e,bottom:t,width:e,height:t}}let{top:t,left:n,right:r,bottom:i}=e.getBoundingClientRect();return{top:t,left:n,right:r,bottom:i,width:e.clientWidth,height:e.clientHeight}}function If(e){return e.reduce((e,t)=>Nd(e,kf(t)),nf)}function Lf(e){return e.reduce((e,t)=>e+Df(t),0)}function Rf(e){return e.reduce((e,t)=>e+Of(t),0)}function zf(e,t){if(t===void 0&&(t=yf),!e)return;let{top:n,left:r,bottom:i,right:a}=t(e);Tf(e)&&(i<=0||a<=0||n>=window.innerHeight||r>=window.innerWidth)&&e.scrollIntoView({block:`center`,inline:`center`})}var Bf=[[`x`,[`left`,`right`],Lf],[`y`,[`top`,`bottom`],Rf]],Vf=class{constructor(e,t){this.rect=void 0,this.width=void 0,this.height=void 0,this.top=void 0,this.bottom=void 0,this.right=void 0,this.left=void 0;let n=wf(t),r=If(n);this.rect={...e},this.width=e.width,this.height=e.height;for(let[e,t,i]of Bf)for(let a of t)Object.defineProperty(this,a,{get:()=>{let t=i(n),o=r[e]-t;return this.rect[a]+o},enumerable:!0});Object.defineProperty(this,`rect`,{enumerable:!1})}},Hf=class{constructor(e){this.target=void 0,this.listeners=[],this.removeAll=()=>{this.listeners.forEach(e=>this.target?.removeEventListener(...e))},this.target=e}add(e,t,n){var r;(r=this.target)==null||r.addEventListener(e,t,n),this.listeners.push([e,t,n])}};function Uf(e){let{EventTarget:t}=vd(e);return e instanceof t?e:Sd(e)}function Wf(e,t){let n=Math.abs(e.x),r=Math.abs(e.y);return typeof t==`number`?Math.sqrt(n**2+r**2)>t:`x`in t&&`y`in t?n>t.x&&r>t.y:`x`in t?n>t.x:`y`in t?r>t.y:!1}var Gf;(function(e){e.Click=`click`,e.DragStart=`dragstart`,e.Keydown=`keydown`,e.ContextMenu=`contextmenu`,e.Resize=`resize`,e.SelectionChange=`selectionchange`,e.VisibilityChange=`visibilitychange`})(Gf||={});function Kf(e){e.preventDefault()}function qf(e){e.stopPropagation()}var Jf;(function(e){e.Space=`Space`,e.Down=`ArrowDown`,e.Right=`ArrowRight`,e.Left=`ArrowLeft`,e.Up=`ArrowUp`,e.Esc=`Escape`,e.Enter=`Enter`,e.Tab=`Tab`})(Jf||={});var Yf={start:[Jf.Space,Jf.Enter],cancel:[Jf.Esc],end:[Jf.Space,Jf.Enter,Jf.Tab]},Xf=(e,t)=>{let{currentCoordinates:n}=t;switch(e.code){case Jf.Right:return{...n,x:n.x+25};case Jf.Left:return{...n,x:n.x-25};case Jf.Down:return{...n,y:n.y+25};case Jf.Up:return{...n,y:n.y-25}}},Zf=class{constructor(e){this.props=void 0,this.autoScrollEnabled=!1,this.referenceCoordinates=void 0,this.listeners=void 0,this.windowListeners=void 0,this.props=e;let{event:{target:t}}=e;this.props=e,this.listeners=new Hf(Sd(t)),this.windowListeners=new Hf(vd(t)),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleCancel=this.handleCancel.bind(this),this.attach()}attach(){this.handleStart(),this.windowListeners.add(Gf.Resize,this.handleCancel),this.windowListeners.add(Gf.VisibilityChange,this.handleCancel),setTimeout(()=>this.listeners.add(Gf.Keydown,this.handleKeyDown))}handleStart(){let{activeNode:e,onStart:t}=this.props,n=e.node.current;n&&zf(n),t(nf)}handleKeyDown(e){if(Id(e)){let{active:t,context:n,options:r}=this.props,{keyboardCodes:i=Yf,coordinateGetter:a=Xf,scrollBehavior:o=`smooth`}=r,{code:s}=e;if(i.end.includes(s)){this.handleEnd(e);return}if(i.cancel.includes(s)){this.handleCancel(e);return}let{collisionRect:c}=n.current,l=c?{x:c.left,y:c.top}:nf;this.referenceCoordinates||=l;let u=a(e,{active:t,context:n.current,currentCoordinates:l});if(u){let t=Pd(u,l),r={x:0,y:0},{scrollableAncestors:i}=n.current;for(let n of i){let i=e.code,{isTop:a,isRight:s,isLeft:c,isBottom:l,maxScroll:d,minScroll:f}=Mf(n),p=Ff(n),m={x:Math.min(i===Jf.Right?p.right-p.width/2:p.right,Math.max(i===Jf.Right?p.left:p.left+p.width/2,u.x)),y:Math.min(i===Jf.Down?p.bottom-p.height/2:p.bottom,Math.max(i===Jf.Down?p.top:p.top+p.height/2,u.y))},h=i===Jf.Right&&!s||i===Jf.Left&&!c,g=i===Jf.Down&&!l||i===Jf.Up&&!a;if(h&&m.x!==u.x){let e=n.scrollLeft+t.x,a=i===Jf.Right&&e<=d.x||i===Jf.Left&&e>=f.x;if(a&&!t.y){n.scrollTo({left:e,behavior:o});return}a?r.x=n.scrollLeft-e:r.x=i===Jf.Right?n.scrollLeft-d.x:n.scrollLeft-f.x,r.x&&n.scrollBy({left:-r.x,behavior:o});break}else if(g&&m.y!==u.y){let e=n.scrollTop+t.y,a=i===Jf.Down&&e<=d.y||i===Jf.Up&&e>=f.y;if(a&&!t.x){n.scrollTo({top:e,behavior:o});return}a?r.y=n.scrollTop-e:r.y=i===Jf.Down?n.scrollTop-d.y:n.scrollTop-f.y,r.y&&n.scrollBy({top:-r.y,behavior:o});break}}this.handleMove(e,Nd(Pd(u,this.referenceCoordinates),r))}}}handleMove(e,t){let{onMove:n}=this.props;e.preventDefault(),n(t)}handleEnd(e){let{onEnd:t}=this.props;e.preventDefault(),this.detach(),t()}handleCancel(e){let{onCancel:t}=this.props;e.preventDefault(),this.detach(),t()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll()}};Zf.activators=[{eventName:`onKeyDown`,handler:(e,t,n)=>{let{keyboardCodes:r=Yf,onActivation:i}=t,{active:a}=n,{code:o}=e.nativeEvent;if(r.start.includes(o)){let t=a.activatorNode.current;return t&&e.target!==t?!1:(e.preventDefault(),i?.({event:e.nativeEvent}),!0)}return!1}}];function Qf(e){return!!(e&&`distance`in e)}function $f(e){return!!(e&&`delay`in e)}var ep=class{constructor(e,t,n){n===void 0&&(n=Uf(e.event.target)),this.props=void 0,this.events=void 0,this.autoScrollEnabled=!0,this.document=void 0,this.activated=!1,this.initialCoordinates=void 0,this.timeoutId=null,this.listeners=void 0,this.documentListeners=void 0,this.windowListeners=void 0,this.props=e,this.events=t;let{event:r}=e,{target:i}=r;this.props=e,this.events=t,this.document=Sd(i),this.documentListeners=new Hf(this.document),this.listeners=new Hf(n),this.windowListeners=new Hf(vd(i)),this.initialCoordinates=Rd(r)??nf,this.handleStart=this.handleStart.bind(this),this.handleMove=this.handleMove.bind(this),this.handleEnd=this.handleEnd.bind(this),this.handleCancel=this.handleCancel.bind(this),this.handleKeydown=this.handleKeydown.bind(this),this.removeTextSelection=this.removeTextSelection.bind(this),this.attach()}attach(){let{events:e,props:{options:{activationConstraint:t,bypassActivationConstraint:n}}}=this;if(this.listeners.add(e.move.name,this.handleMove,{passive:!1}),this.listeners.add(e.end.name,this.handleEnd),e.cancel&&this.listeners.add(e.cancel.name,this.handleCancel),this.windowListeners.add(Gf.Resize,this.handleCancel),this.windowListeners.add(Gf.DragStart,Kf),this.windowListeners.add(Gf.VisibilityChange,this.handleCancel),this.windowListeners.add(Gf.ContextMenu,Kf),this.documentListeners.add(Gf.Keydown,this.handleKeydown),t){if(n!=null&&n({event:this.props.event,activeNode:this.props.activeNode,options:this.props.options}))return this.handleStart();if($f(t)){this.timeoutId=setTimeout(this.handleStart,t.delay),this.handlePending(t);return}if(Qf(t)){this.handlePending(t);return}}this.handleStart()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll(),setTimeout(this.documentListeners.removeAll,50),this.timeoutId!==null&&(clearTimeout(this.timeoutId),this.timeoutId=null)}handlePending(e,t){let{active:n,onPending:r}=this.props;r(n,e,this.initialCoordinates,t)}handleStart(){let{initialCoordinates:e}=this,{onStart:t}=this.props;e&&(this.activated=!0,this.documentListeners.add(Gf.Click,qf,{capture:!0}),this.removeTextSelection(),this.documentListeners.add(Gf.SelectionChange,this.removeTextSelection),t(e))}handleMove(e){let{activated:t,initialCoordinates:n,props:r}=this,{onMove:i,options:{activationConstraint:a}}=r;if(!n)return;let o=Rd(e)??nf,s=Pd(n,o);if(!t&&a){if(Qf(a)){if(a.tolerance!=null&&Wf(s,a.tolerance))return this.handleCancel();if(Wf(s,a.distance))return this.handleStart()}if($f(a)&&Wf(s,a.tolerance))return this.handleCancel();this.handlePending(a,s);return}e.cancelable&&e.preventDefault(),i(o)}handleEnd(){let{onAbort:e,onEnd:t}=this.props;this.detach(),this.activated||e(this.props.active),t()}handleCancel(){let{onAbort:e,onCancel:t}=this.props;this.detach(),this.activated||e(this.props.active),t()}handleKeydown(e){e.code===Jf.Esc&&this.handleCancel()}removeTextSelection(){var e;(e=this.document.getSelection())==null||e.removeAllRanges()}},tp={cancel:{name:`pointercancel`},move:{name:`pointermove`},end:{name:`pointerup`}},np=class extends ep{constructor(e){let{event:t}=e,n=Sd(t.target);super(e,tp,n)}};np.activators=[{eventName:`onPointerDown`,handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t;return!n.isPrimary||n.button!==0?!1:(r?.({event:n}),!0)}}];var rp={move:{name:`mousemove`},end:{name:`mouseup`}},ip;(function(e){e[e.RightClick=2]=`RightClick`})(ip||={});var ap=class extends ep{constructor(e){super(e,rp,Sd(e.event.target))}};ap.activators=[{eventName:`onMouseDown`,handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t;return n.button===ip.RightClick?!1:(r?.({event:n}),!0)}}];var op={cancel:{name:`touchcancel`},move:{name:`touchmove`},end:{name:`touchend`}},sp=class extends ep{constructor(e){super(e,op)}static setup(){return window.addEventListener(op.move.name,e,{capture:!1,passive:!1}),function(){window.removeEventListener(op.move.name,e)};function e(){}}};sp.activators=[{eventName:`onTouchStart`,handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t,{touches:i}=n;return i.length>1?!1:(r?.({event:n}),!0)}}];var cp;(function(e){e[e.Pointer=0]=`Pointer`,e[e.DraggableRect=1]=`DraggableRect`})(cp||={});var lp;(function(e){e[e.TreeOrder=0]=`TreeOrder`,e[e.ReversedTreeOrder=1]=`ReversedTreeOrder`})(lp||={});function up(e){let{acceleration:t,activator:n=cp.Pointer,canScroll:r,draggingRect:i,enabled:a,interval:o=5,order:s=lp.TreeOrder,pointerCoordinates:c,scrollableAncestors:l,scrollableAncestorRects:u,delta:d,threshold:f}=e,p=fp({delta:d,disabled:!a}),[m,h]=Td(),g=(0,x.useRef)({x:0,y:0}),_=(0,x.useRef)({x:0,y:0}),v=(0,x.useMemo)(()=>{switch(n){case cp.Pointer:return c?{top:c.y,bottom:c.y,left:c.x,right:c.x}:null;case cp.DraggableRect:return i}},[n,i,c]),y=(0,x.useRef)(null),b=(0,x.useCallback)(()=>{let e=y.current;if(!e)return;let t=g.current.x*_.current.x,n=g.current.y*_.current.y;e.scrollBy(t,n)},[]),S=(0,x.useMemo)(()=>s===lp.TreeOrder?[...l].reverse():l,[s,l]);(0,x.useEffect)(()=>{if(!a||!l.length||!v){h();return}for(let e of S){if(r?.(e)===!1)continue;let n=u[l.indexOf(e)];if(!n)continue;let{direction:i,speed:a}=Pf(e,n,v,t,f);for(let e of[`x`,`y`])p[e][i[e]]||(a[e]=0,i[e]=0);if(a.x>0||a.y>0){h(),y.current=e,m(b,o),g.current=a,_.current=i;return}}g.current={x:0,y:0},_.current={x:0,y:0},h()},[t,b,r,h,a,o,JSON.stringify(v),JSON.stringify(p),m,l,S,u,JSON.stringify(f)])}var dp={x:{[Af.Backward]:!1,[Af.Forward]:!1},y:{[Af.Backward]:!1,[Af.Forward]:!1}};function fp(e){let{delta:t,disabled:n}=e,r=kd(t);return Dd(e=>{if(n||!r||!e)return dp;let i={x:Math.sign(t.x-r.x),y:Math.sign(t.y-r.y)};return{x:{[Af.Backward]:e.x[Af.Backward]||i.x===-1,[Af.Forward]:e.x[Af.Forward]||i.x===1},y:{[Af.Backward]:e.y[Af.Backward]||i.y===-1,[Af.Forward]:e.y[Af.Forward]||i.y===1}}},[n,t,r])}function pp(e,t){let n=t==null?void 0:e.get(t),r=n?n.node.current:null;return Dd(e=>t==null?null:r??e??null,[r,t])}function mp(e,t){return(0,x.useMemo)(()=>e.reduce((e,n)=>{let{sensor:r}=n,i=r.activators.map(e=>({eventName:e.eventName,handler:t(e.handler,n)}));return[...e,...i]},[]),[e,t])}var hp;(function(e){e[e.Always=0]=`Always`,e[e.BeforeDragging=1]=`BeforeDragging`,e[e.WhileDragging=2]=`WhileDragging`})(hp||={});var gp;(function(e){e.Optimized=`optimized`})(gp||={});var _p=new Map;function vp(e,t){let{dragging:n,dependencies:r,config:i}=t,[a,o]=(0,x.useState)(null),{frequency:s,measure:c,strategy:l}=i,u=(0,x.useRef)(e),d=g(),f=Ed(d),p=(0,x.useCallback)(function(e){e===void 0&&(e=[]),!f.current&&o(t=>t===null?e:t.concat(e.filter(e=>!t.includes(e))))},[f]),m=(0,x.useRef)(null),h=Dd(t=>{if(d&&!n)return _p;if(!t||t===_p||u.current!==e||a!=null){let t=new Map;for(let n of e){if(!n)continue;if(a&&a.length>0&&!a.includes(n.id)&&n.rect.current){t.set(n.id,n.rect.current);continue}let e=n.node.current,r=e?new Vf(c(e),e):null;n.rect.current=r,r&&t.set(n.id,r)}return t}return t},[e,a,n,d,c]);return(0,x.useEffect)(()=>{u.current=e},[e]),(0,x.useEffect)(()=>{d||p()},[n,d]),(0,x.useEffect)(()=>{a&&a.length>0&&o(null)},[JSON.stringify(a)]),(0,x.useEffect)(()=>{d||typeof s!=`number`||m.current!==null||(m.current=setTimeout(()=>{p(),m.current=null},s))},[s,d,p,...r]),{droppableRects:h,measureDroppableContainers:p,measuringScheduled:a!=null};function g(){switch(l){case hp.Always:return!1;case hp.BeforeDragging:return n;default:return!n}}}function yp(e,t){return Dd(n=>e?n||(typeof t==`function`?t(e):e):null,[t,e])}function bp(e,t){return yp(e,t)}function xp(e){let{callback:t,disabled:n}=e,r=wd(t),i=(0,x.useMemo)(()=>{if(n||typeof window>`u`||window.MutationObserver===void 0)return;let{MutationObserver:e}=window;return new e(r)},[r,n]);return(0,x.useEffect)(()=>()=>i?.disconnect(),[i]),i}function Sp(e){let{callback:t,disabled:n}=e,r=wd(t),i=(0,x.useMemo)(()=>{if(n||typeof window>`u`||window.ResizeObserver===void 0)return;let{ResizeObserver:e}=window;return new e(r)},[n]);return(0,x.useEffect)(()=>()=>i?.disconnect(),[i]),i}function Cp(e){return new Vf(yf(e),e)}function wp(e,t,n){t===void 0&&(t=Cp);let[r,i]=(0,x.useState)(null);function a(){i(r=>{if(!e)return null;if(e.isConnected===!1)return r??n??null;let i=t(e);return JSON.stringify(r)===JSON.stringify(i)?r:i})}let o=xp({callback(t){if(e)for(let n of t){let{type:t,target:r}=n;if(t===`childList`&&r instanceof HTMLElement&&r.contains(e)){a();break}}}}),s=Sp({callback:a});return Cd(()=>{a(),e?(s?.observe(e),o?.observe(document.body,{childList:!0,subtree:!0})):(s?.disconnect(),o?.disconnect())},[e]),r}function Tp(e){return pf(e,yp(e))}var Ep=[];function Dp(e){let t=(0,x.useRef)(e),n=Dd(n=>e?n&&n!==Ep&&e&&t.current&&e.parentNode===t.current.parentNode?n:wf(e):Ep,[e]);return(0,x.useEffect)(()=>{t.current=e},[e]),n}function Op(e){let[t,n]=(0,x.useState)(null),r=(0,x.useRef)(e),i=(0,x.useCallback)(e=>{let t=Ef(e.target);t&&n(e=>e?(e.set(t,kf(t)),new Map(e)):null)},[]);return(0,x.useEffect)(()=>{let t=r.current;if(e!==t){a(t);let o=e.map(e=>{let t=Ef(e);return t?(t.addEventListener(`scroll`,i,{passive:!0}),[t,kf(t)]):null}).filter(e=>e!=null);n(o.length?new Map(o):null),r.current=e}return()=>{a(e),a(t)};function a(e){e.forEach(e=>{Ef(e)?.removeEventListener(`scroll`,i)})}},[i,e]),(0,x.useMemo)(()=>e.length?t?Array.from(t.values()).reduce((e,t)=>Nd(e,t),nf):If(e):nf,[e,t])}function kp(e,t){t===void 0&&(t=[]);let n=(0,x.useRef)(null);return(0,x.useEffect)(()=>{n.current=null},t),(0,x.useEffect)(()=>{let t=e!==nf;t&&!n.current&&(n.current=e),!t&&n.current&&(n.current=null)},[e]),n.current?Pd(e,n.current):nf}function Ap(e){(0,x.useEffect)(()=>{if(!hd)return;let t=e.map(e=>{let{sensor:t}=e;return t.setup==null?void 0:t.setup()});return()=>{for(let e of t)e?.()}},e.map(e=>{let{sensor:t}=e;return t}))}function jp(e,t){return(0,x.useMemo)(()=>e.reduce((e,n)=>{let{eventName:r,handler:i}=n;return e[r]=e=>{i(e,t)},e},{}),[e,t])}function Mp(e){return(0,x.useMemo)(()=>e?xf(e):null,[e])}var Np=[];function Pp(e,t){t===void 0&&(t=yf);let[n]=e,r=Mp(n?vd(n):null),[i,a]=(0,x.useState)(Np);function o(){a(()=>e.length?e.map(e=>jf(e)?r:new Vf(t(e),e)):Np)}let s=Sp({callback:o});return Cd(()=>{s?.disconnect(),o(),e.forEach(e=>s?.observe(e))},[e]),i}function Fp(e){if(!e)return null;if(e.children.length>1)return e;let t=e.children[0];return bd(t)?t:e}function Ip(e){let{measure:t}=e,[n,r]=(0,x.useState)(null),i=Sp({callback:(0,x.useCallback)(e=>{for(let{target:n}of e)if(bd(n)){r(e=>{let r=t(n);return e?{...e,width:r.width,height:r.height}:r});break}},[t])}),[a,o]=Od((0,x.useCallback)(e=>{let n=Fp(e);i?.disconnect(),n&&i?.observe(n),r(n?t(n):null)},[t,i]));return(0,x.useMemo)(()=>({nodeRef:a,rect:n,setRef:o}),[n,a,o])}var Lp=[{sensor:np,options:{}},{sensor:Zf,options:{}}],Rp={current:{}},zp={draggable:{measure:bf},droppable:{measure:bf,strategy:hp.WhileDragging,frequency:gp.Optimized},dragOverlay:{measure:yf}},Bp=class extends Map{get(e){return e==null?void 0:super.get(e)??void 0}toArray(){return Array.from(this.values())}getEnabled(){return this.toArray().filter(e=>{let{disabled:t}=e;return!t})}getNodeFor(e){return this.get(e)?.node.current??void 0}},Vp={activatorEvent:null,active:null,activeNode:null,activeNodeRect:null,collisions:null,containerNodeRect:null,draggableNodes:new Map,droppableRects:new Map,droppableContainers:new Bp,over:null,dragOverlay:{nodeRef:{current:null},rect:null,setRef:$d},scrollableAncestors:[],scrollableAncestorRects:[],measuringConfiguration:zp,measureDroppableContainers:$d,windowRect:null,measuringScheduled:!1},Hp={activatorEvent:null,activators:[],active:null,activeNodeRect:null,ariaDescribedById:{draggable:``},dispatch:$d,draggableNodes:new Map,over:null,measureDroppableContainers:$d},Up=(0,x.createContext)(Hp),Wp=(0,x.createContext)(Vp);function Gp(){return{draggable:{active:null,initialCoordinates:{x:0,y:0},nodes:new Map,translate:{x:0,y:0}},droppable:{containers:new Bp}}}function Kp(e,t){switch(t.type){case Qd.DragStart:return{...e,draggable:{...e.draggable,initialCoordinates:t.initialCoordinates,active:t.active}};case Qd.DragMove:return e.draggable.active==null?e:{...e,draggable:{...e.draggable,translate:{x:t.coordinates.x-e.draggable.initialCoordinates.x,y:t.coordinates.y-e.draggable.initialCoordinates.y}}};case Qd.DragEnd:case Qd.DragCancel:return{...e,draggable:{...e.draggable,active:null,initialCoordinates:{x:0,y:0},translate:{x:0,y:0}}};case Qd.RegisterDroppable:{let{element:n}=t,{id:r}=n,i=new Bp(e.droppable.containers);return i.set(r,n),{...e,droppable:{...e.droppable,containers:i}}}case Qd.SetDroppableDisabled:{let{id:n,key:r,disabled:i}=t,a=e.droppable.containers.get(n);if(!a||r!==a.key)return e;let o=new Bp(e.droppable.containers);return o.set(n,{...a,disabled:i}),{...e,droppable:{...e.droppable,containers:o}}}case Qd.UnregisterDroppable:{let{id:n,key:r}=t,i=e.droppable.containers.get(n);if(!i||r!==i.key)return e;let a=new Bp(e.droppable.containers);return a.delete(n),{...e,droppable:{...e.droppable,containers:a}}}default:return e}}function qp(e){let{disabled:t}=e,{active:n,activatorEvent:r,draggableNodes:i}=(0,x.useContext)(Up),a=kd(r),o=kd(n?.id);return(0,x.useEffect)(()=>{if(!t&&!r&&a&&o!=null){if(!Id(a)||document.activeElement===a.target)return;let e=i.get(o);if(!e)return;let{activatorNode:t,node:n}=e;if(!t.current&&!n.current)return;requestAnimationFrame(()=>{for(let e of[t.current,n.current]){if(!e)continue;let t=Vd(e);if(t){t.focus();break}}})}},[r,t,i,o,a]),null}function Jp(e,t){let{transform:n,...r}=t;return e!=null&&e.length?e.reduce((e,t)=>t({transform:e,...r}),n):n}function Yp(e){return(0,x.useMemo)(()=>({draggable:{...zp.draggable,...e?.draggable},droppable:{...zp.droppable,...e?.droppable},dragOverlay:{...zp.dragOverlay,...e?.dragOverlay}}),[e?.draggable,e?.droppable,e?.dragOverlay])}function Xp(e){let{activeNode:t,measure:n,initialRect:r,config:i=!0}=e,a=(0,x.useRef)(!1),{x:o,y:s}=typeof i==`boolean`?{x:i,y:i}:i;Cd(()=>{if(!o&&!s||!t){a.current=!1;return}if(a.current||!r)return;let e=t?.node.current;if(!e||e.isConnected===!1)return;let i=pf(n(e),r);if(o||(i.x=0),s||(i.y=0),a.current=!0,Math.abs(i.x)>0||Math.abs(i.y)>0){let t=Tf(e);t&&t.scrollBy({top:i.y,left:i.x})}},[t,o,s,r,n])}var Zp=(0,x.createContext)({...nf,scaleX:1,scaleY:1}),Qp;(function(e){e[e.Uninitialized=0]=`Uninitialized`,e[e.Initializing=1]=`Initializing`,e[e.Initialized=2]=`Initialized`})(Qp||={});var $p=(0,x.memo)(function(e){let{id:t,accessibility:n,autoScroll:r=!0,children:i,sensors:a=Lp,collisionDetection:o=df,measuring:s,modifiers:c,...l}=e,[u,d]=(0,x.useReducer)(Kp,void 0,Gp),[f,p]=Jd(),[m,h]=(0,x.useState)(Qp.Uninitialized),g=m===Qp.Initialized,{draggable:{active:_,nodes:v,translate:y},droppable:{containers:b}}=u,S=_==null?null:v.get(_),C=(0,x.useRef)({initial:null,translated:null}),w=(0,x.useMemo)(()=>_==null?null:{id:_,data:S?.data??Rp,rect:C},[_,S]),T=(0,x.useRef)(null),[E,D]=(0,x.useState)(null),[O,k]=(0,x.useState)(null),A=Ed(l,Object.values(l)),j=jd(`DndDescribedBy`,t),M=(0,x.useMemo)(()=>b.getEnabled(),[b]),N=Yp(s),{droppableRects:P,measureDroppableContainers:F,measuringScheduled:I}=vp(M,{dragging:g,dependencies:[y.x,y.y],config:N.droppable}),L=pp(v,_),ee=(0,x.useMemo)(()=>O?Rd(O):null,[O]),R=De(),z=bp(L,N.draggable.measure);Xp({activeNode:_==null?null:v.get(_),config:R.layoutShiftCompensation,initialRect:z,measure:N.draggable.measure});let B=wp(L,N.draggable.measure,z),te=wp(L?L.parentElement:null),V=(0,x.useRef)({activatorEvent:null,active:null,activeNode:L,collisionRect:null,collisions:null,droppableRects:P,draggableNodes:v,draggingNode:null,draggingNodeRect:null,droppableContainers:b,over:null,scrollableAncestors:[],scrollAdjustedTranslate:null}),ne=b.getNodeFor(V.current.over?.id),H=Ip({measure:N.dragOverlay.measure}),re=H.nodeRef.current??L,ie=g?H.rect??B:null,ae=!!(H.nodeRef.current&&H.rect),oe=Tp(ae?null:B),se=Mp(re?vd(re):null),ce=Dp(g?ne??L:null),le=Pp(ce),ue=Jp(c,{transform:{x:y.x-oe.x,y:y.y-oe.y,scaleX:1,scaleY:1},activatorEvent:O,active:w,activeNodeRect:B,containerNodeRect:te,draggingNodeRect:ie,over:V.current.over,overlayNodeRect:H.rect,scrollableAncestors:ce,scrollableAncestorRects:le,windowRect:se}),de=ee?Nd(ee,y):null,fe=Op(ce),pe=kp(fe),me=kp(fe,[B]),he=Nd(ue,pe),ge=ie?hf(ie,ue):null,_e=w&&ge?o({active:w,collisionRect:ge,droppableRects:P,droppableContainers:M,pointerCoordinates:de}):null,ve=sf(_e,`id`),[ye,be]=(0,x.useState)(null),xe=ff(ae?ue:Nd(ue,me),ye?.rect??null,B),Se=(0,x.useRef)(null),Ce=(0,x.useCallback)((e,t)=>{let{sensor:n,options:r}=t;if(T.current==null)return;let i=v.get(T.current);if(!i)return;let a=e.nativeEvent;Se.current=new n({active:T.current,activeNode:i,event:a,options:r,context:V,onAbort(e){if(!v.get(e))return;let{onDragAbort:t}=A.current,n={id:e};t?.(n),f({type:`onDragAbort`,event:n})},onPending(e,t,n,r){if(!v.get(e))return;let{onDragPending:i}=A.current,a={id:e,constraint:t,initialCoordinates:n,offset:r};i?.(a),f({type:`onDragPending`,event:a})},onStart(e){let t=T.current;if(t==null)return;let n=v.get(t);if(!n)return;let{onDragStart:r}=A.current,i={activatorEvent:a,active:{id:t,data:n.data,rect:C}};(0,U.unstable_batchedUpdates)(()=>{r?.(i),h(Qp.Initializing),d({type:Qd.DragStart,initialCoordinates:e,active:t}),f({type:`onDragStart`,event:i}),D(Se.current),k(a)})},onMove(e){d({type:Qd.DragMove,coordinates:e})},onEnd:o(Qd.DragEnd),onCancel:o(Qd.DragCancel)});function o(e){return async function(){let{active:t,collisions:n,over:r,scrollAdjustedTranslate:i}=V.current,o=null;if(t&&i){let{cancelDrop:s}=A.current;o={activatorEvent:a,active:t,collisions:n,delta:i,over:r},e===Qd.DragEnd&&typeof s==`function`&&await Promise.resolve(s(o))&&(e=Qd.DragCancel)}T.current=null,(0,U.unstable_batchedUpdates)(()=>{d({type:e}),h(Qp.Uninitialized),be(null),D(null),k(null),Se.current=null;let t=e===Qd.DragEnd?`onDragEnd`:`onDragCancel`;if(o){let e=A.current[t];e?.(o),f({type:t,event:o})}})}}},[v]),we=mp(a,(0,x.useCallback)((e,t)=>(n,r)=>{let i=n.nativeEvent,a=v.get(r);if(T.current!==null||!a||i.dndKit||i.defaultPrevented)return;let o={active:a};e(n,t.options,o)===!0&&(i.dndKit={capturedBy:t.sensor},T.current=r,Ce(n,t))},[v,Ce]));Ap(a),Cd(()=>{B&&m===Qp.Initializing&&h(Qp.Initialized)},[B,m]),(0,x.useEffect)(()=>{let{onDragMove:e}=A.current,{active:t,activatorEvent:n,collisions:r,over:i}=V.current;if(!t||!n)return;let a={active:t,activatorEvent:n,collisions:r,delta:{x:he.x,y:he.y},over:i};(0,U.unstable_batchedUpdates)(()=>{e?.(a),f({type:`onDragMove`,event:a})})},[he.x,he.y]),(0,x.useEffect)(()=>{let{active:e,activatorEvent:t,collisions:n,droppableContainers:r,scrollAdjustedTranslate:i}=V.current;if(!e||T.current==null||!t||!i)return;let{onDragOver:a}=A.current,o=r.get(ve),s=o&&o.rect.current?{id:o.id,rect:o.rect.current,data:o.data,disabled:o.disabled}:null,c={active:e,activatorEvent:t,collisions:n,delta:{x:i.x,y:i.y},over:s};(0,U.unstable_batchedUpdates)(()=>{be(s),a?.(c),f({type:`onDragOver`,event:c})})},[ve]),Cd(()=>{V.current={activatorEvent:O,active:w,activeNode:L,collisionRect:ge,collisions:_e,droppableRects:P,draggableNodes:v,draggingNode:re,draggingNodeRect:ie,droppableContainers:b,over:ye,scrollableAncestors:ce,scrollAdjustedTranslate:he},C.current={initial:ie,translated:ge}},[w,L,_e,ge,v,re,ie,P,b,ye,ce,he]),up({...R,delta:y,draggingRect:ge,pointerCoordinates:de,scrollableAncestors:ce,scrollableAncestorRects:le});let Te=(0,x.useMemo)(()=>({active:w,activeNode:L,activeNodeRect:B,activatorEvent:O,collisions:_e,containerNodeRect:te,dragOverlay:H,draggableNodes:v,droppableContainers:b,droppableRects:P,over:ye,measureDroppableContainers:F,scrollableAncestors:ce,scrollableAncestorRects:le,measuringConfiguration:N,measuringScheduled:I,windowRect:se}),[w,L,B,O,_e,te,H,v,b,P,ye,F,ce,le,N,I,se]),Ee=(0,x.useMemo)(()=>({activatorEvent:O,activators:we,active:w,activeNodeRect:B,ariaDescribedById:{draggable:j},dispatch:d,draggableNodes:v,over:ye,measureDroppableContainers:F}),[O,we,w,B,d,j,v,ye,F]);return x.createElement(Kd.Provider,{value:p},x.createElement(Up.Provider,{value:Ee},x.createElement(Wp.Provider,{value:Te},x.createElement(Zp.Provider,{value:xe},i)),x.createElement(qp,{disabled:n?.restoreFocus===!1})),x.createElement(Zd,{...n,hiddenTextDescribedById:j}));function De(){let e=E?.autoScrollEnabled===!1,t=typeof r==`object`?r.enabled===!1:r===!1,n=g&&!e&&!t;return typeof r==`object`?{...r,enabled:n}:{enabled:n}}}),em=(0,x.createContext)(null),tm=`button`,nm=`Draggable`;function rm(e){let{id:t,data:n,disabled:r=!1,attributes:i}=e,a=jd(nm),{activators:o,activatorEvent:s,active:c,activeNodeRect:l,ariaDescribedById:u,draggableNodes:d,over:f}=(0,x.useContext)(Up),{role:p=tm,roleDescription:m=`draggable`,tabIndex:h=0}=i??{},g=c?.id===t,_=(0,x.useContext)(g?Zp:em),[v,y]=Od(),[b,S]=Od(),C=jp(o,t),w=Ed(n);return Cd(()=>(d.set(t,{id:t,key:a,node:v,activatorNode:b,data:w}),()=>{let e=d.get(t);e&&e.key===a&&d.delete(t)}),[d,t]),{active:c,activatorEvent:s,activeNodeRect:l,attributes:(0,x.useMemo)(()=>({role:p,tabIndex:h,"aria-disabled":r,"aria-pressed":g&&p===tm?!0:void 0,"aria-roledescription":m,"aria-describedby":u.draggable}),[r,p,h,g,m,u.draggable]),isDragging:g,listeners:r?void 0:C,node:v,over:f,setNodeRef:y,setActivatorNodeRef:S,transform:_}}function im(){return(0,x.useContext)(Wp)}var am=`Droppable`,om={timeout:25};function sm(e){let{data:t,disabled:n=!1,id:r,resizeObserverConfig:i}=e,a=jd(am),{active:o,dispatch:s,over:c,measureDroppableContainers:l}=(0,x.useContext)(Up),u=(0,x.useRef)({disabled:n}),d=(0,x.useRef)(!1),f=(0,x.useRef)(null),p=(0,x.useRef)(null),{disabled:m,updateMeasurementsFor:h,timeout:g}={...om,...i},_=Ed(h??r),v=Sp({callback:(0,x.useCallback)(()=>{if(!d.current){d.current=!0;return}p.current!=null&&clearTimeout(p.current),p.current=setTimeout(()=>{l(Array.isArray(_.current)?_.current:[_.current]),p.current=null},g)},[g]),disabled:m||!o}),[y,b]=Od((0,x.useCallback)((e,t)=>{v&&(t&&(v.unobserve(t),d.current=!1),e&&v.observe(e))},[v])),S=Ed(t);return(0,x.useEffect)(()=>{!v||!y.current||(v.disconnect(),d.current=!1,v.observe(y.current))},[y,v]),(0,x.useEffect)(()=>(s({type:Qd.RegisterDroppable,element:{id:r,key:a,disabled:n,node:y,rect:f,data:S}}),()=>s({type:Qd.UnregisterDroppable,key:a,id:r})),[r]),(0,x.useEffect)(()=>{n!==u.current.disabled&&(s({type:Qd.SetDroppableDisabled,id:r,key:a,disabled:n}),u.current.disabled=n)},[r,a,n,s]),{active:o,rect:f,isOver:c?.id===r,node:y,over:c,setNodeRef:b}}function cm(e,t,n){let r=e.slice();return r.splice(n<0?r.length+n:n,0,r.splice(t,1)[0]),r}function lm(e,t){return e.reduce((e,n,r)=>{let i=t.get(n);return i&&(e[r]=i),e},Array(e.length))}function um(e){return e!==null&&e>=0}function dm(e,t){if(e===t)return!0;if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}function fm(e){return typeof e==`boolean`?{draggable:e,droppable:e}:e}var pm=e=>{let{rects:t,activeIndex:n,overIndex:r,index:i}=e,a=cm(t,r,n),o=t[i],s=a[i];return!s||!o?null:{x:s.left-o.left,y:s.top-o.top,scaleX:s.width/o.width,scaleY:s.height/o.height}},mm={scaleX:1,scaleY:1},hm=e=>{let{activeIndex:t,activeNodeRect:n,index:r,rects:i,overIndex:a}=e,o=i[t]??n;if(!o)return null;if(r===t){let e=i[a];return e?{x:0,y:t<a?e.top+e.height-(o.top+o.height):e.top-o.top,...mm}:null}let s=gm(i,r,t);return r>t&&r<=a?{x:0,y:-o.height-s,...mm}:r<t&&r>=a?{x:0,y:o.height+s,...mm}:{x:0,y:0,...mm}};function gm(e,t,n){let r=e[t],i=e[t-1],a=e[t+1];return r?n<t?i?r.top-(i.top+i.height):a?a.top-(r.top+r.height):0:a?a.top-(r.top+r.height):i?r.top-(i.top+i.height):0:0}var _m=`Sortable`,vm=x.createContext({activeIndex:-1,containerId:_m,disableTransforms:!1,items:[],overIndex:-1,useDragOverlay:!1,sortedRects:[],strategy:pm,disabled:{draggable:!1,droppable:!1}});function ym(e){let{children:t,id:n,items:r,strategy:i=pm,disabled:a=!1}=e,{active:o,dragOverlay:s,droppableRects:c,over:l,measureDroppableContainers:u}=im(),d=jd(_m,n),f=s.rect!==null,p=(0,x.useMemo)(()=>r.map(e=>typeof e==`object`&&`id`in e?e.id:e),[r]),m=o!=null,h=o?p.indexOf(o.id):-1,g=l?p.indexOf(l.id):-1,_=(0,x.useRef)(p),v=!dm(p,_.current),y=g!==-1&&h===-1||v,b=fm(a);Cd(()=>{v&&m&&u(p)},[v,p,m,u]),(0,x.useEffect)(()=>{_.current=p},[p]);let S=(0,x.useMemo)(()=>({activeIndex:h,containerId:d,disabled:b,disableTransforms:y,items:p,overIndex:g,useDragOverlay:f,sortedRects:lm(p,c),strategy:i}),[h,d,b.draggable,b.droppable,y,p,g,c,f,i]);return x.createElement(vm.Provider,{value:S},t)}var bm=e=>{let{id:t,items:n,activeIndex:r,overIndex:i}=e;return cm(n,r,i).indexOf(t)},xm=e=>{let{containerId:t,isSorting:n,wasDragging:r,index:i,items:a,newIndex:o,previousItems:s,previousContainerId:c,transition:l}=e;return!l||!r||s!==a&&i===o?!1:n?!0:o!==i&&t===c},Sm={duration:200,easing:`ease`},Cm=`transform`,wm=zd.Transition.toString({property:Cm,duration:0,easing:`linear`}),Tm={roleDescription:`sortable`};function Em(e){let{disabled:t,index:n,node:r,rect:i}=e,[a,o]=(0,x.useState)(null),s=(0,x.useRef)(n);return Cd(()=>{if(!t&&n!==s.current&&r.current){let e=i.current;if(e){let t=yf(r.current,{ignoreTransform:!0}),n={x:e.left-t.left,y:e.top-t.top,scaleX:e.width/t.width,scaleY:e.height/t.height};(n.x||n.y)&&o(n)}}n!==s.current&&(s.current=n)},[t,n,r,i]),(0,x.useEffect)(()=>{a&&o(null)},[a]),a}function Dm(e){let{animateLayoutChanges:t=xm,attributes:n,disabled:r,data:i,getNewIndex:a=bm,id:o,strategy:s,resizeObserverConfig:c,transition:l=Sm}=e,{items:u,containerId:d,activeIndex:f,disabled:p,disableTransforms:m,sortedRects:h,overIndex:g,useDragOverlay:_,strategy:v}=(0,x.useContext)(vm),y=Om(r,p),b=u.indexOf(o),S=(0,x.useMemo)(()=>({sortable:{containerId:d,index:b,items:u},...i}),[d,i,b,u]),C=(0,x.useMemo)(()=>u.slice(u.indexOf(o)),[u,o]),{rect:w,node:T,isOver:E,setNodeRef:D}=sm({id:o,data:S,disabled:y.droppable,resizeObserverConfig:{updateMeasurementsFor:C,...c}}),{active:O,activatorEvent:k,activeNodeRect:A,attributes:j,setNodeRef:M,listeners:N,isDragging:P,over:F,setActivatorNodeRef:I,transform:L}=rm({id:o,data:S,attributes:{...Tm,...n},disabled:y.draggable}),ee=md(D,M),R=!!O,z=R&&!m&&um(f)&&um(g),B=!_&&P,te=z?(B&&z?L:null)??(s??v)({rects:h,activeNodeRect:A,activeIndex:f,overIndex:g,index:b}):null,V=um(f)&&um(g)?a({id:o,items:u,activeIndex:f,overIndex:g}):b,ne=O?.id,H=(0,x.useRef)({activeId:ne,items:u,newIndex:V,containerId:d}),re=u!==H.current.items,U=t({active:O,containerId:d,isDragging:P,isSorting:R,id:o,index:b,items:u,newIndex:H.current.newIndex,previousItems:H.current.items,previousContainerId:H.current.containerId,transition:l,wasDragging:H.current.activeId!=null}),ie=Em({disabled:!U,index:b,node:T,rect:w});return(0,x.useEffect)(()=>{R&&H.current.newIndex!==V&&(H.current.newIndex=V),d!==H.current.containerId&&(H.current.containerId=d),u!==H.current.items&&(H.current.items=u)},[R,V,d,u]),(0,x.useEffect)(()=>{if(ne===H.current.activeId)return;if(ne!=null&&H.current.activeId==null){H.current.activeId=ne;return}let e=setTimeout(()=>{H.current.activeId=ne},50);return()=>clearTimeout(e)},[ne]),{active:O,activeIndex:f,attributes:j,data:S,rect:w,index:b,newIndex:V,items:u,isOver:E,isSorting:R,isDragging:P,listeners:N,node:T,overIndex:g,over:F,setNodeRef:ee,setActivatorNodeRef:I,setDroppableNodeRef:D,setDraggableNodeRef:M,transform:ie??te,transition:ae()};function ae(){if(ie||re&&H.current.newIndex===b)return wm;if(!(B&&!Id(k)||!l)&&(R||U))return zd.Transition.toString({...l,property:Cm})}}function Om(e,t){return typeof e==`boolean`?{draggable:e,droppable:!1}:{draggable:e?.draggable??t.draggable,droppable:e?.droppable??t.droppable}}Jf.Down,Jf.Right,Jf.Up,Jf.Left;var km={permission:0,waiting:1,working:2,unknown:3};function Am(e){let t=e.agentSessionId?.trim();return t&&t.length>0?t:e.id}var jm={mode:`created`,direction:`desc`};function Mm(e,t=jm){let{mode:n,direction:r,manualOrder:i}=t;if(n===`manual`&&i&&i.length>0){let t=new Map(i.map((e,t)=>[e,t]));return e.toSorted((e,n)=>{let r=Am(e),i=Am(n),a=t.get(r)??t.get(e.id)??1/0,o=t.get(i)??t.get(n.id)??1/0;return a===1/0&&o===1/0?Date.parse(n.createdAt)-Date.parse(e.createdAt):a-o})}return e.toSorted((e,t)=>{if(n===`status`){let n=km[e.status]??km.unknown,r=km[t.status]??km.unknown;return n===r?Date.parse(t.lastActivity)-Date.parse(e.lastActivity):n-r}let i=Date.parse(e.createdAt),a=Date.parse(t.createdAt);return r===`desc`?a-i:i-a})}function Nm(e,t){let n=new Map;for(let t of e){let e=t.projectPath?.trim();if(e){let r=Date.parse(t.lastActivity)||0;r>(n.get(e)||0)&&n.set(e,r)}}for(let e of t){let t=e.projectPath?.trim();if(t){let r=Date.parse(e.lastActivityAt)||0;r>(n.get(t)||0)&&n.set(t,r)}}return Array.from(n.keys()).toSorted((e,t)=>{let r=n.get(e)||0;return(n.get(t)||0)-r})}function Pm(e,t){let n=new Map;for(let t of e){let e=t.host?.trim();if(e){let r=Date.parse(t.lastActivity)||0;r>(n.get(e)||0)&&n.set(e,r)}}for(let e of t){let t=e.host?.trim();if(t){let r=Date.parse(e.lastActivityAt)||0;r>(n.get(t)||0)&&n.set(t,r)}}return Array.from(n.keys()).toSorted((e,t)=>{let r=n.get(e)||0;return(n.get(t)||0)-r})}function Fm(e){let t=Date.parse(e);if(Number.isNaN(t))return``;let n=Date.now()-t,r=Math.floor(n/6e4);if(r<1)return`now`;if(r<60)return`${r}m`;let i=Math.floor(r/60);return i<24?`${i}h`:`${Math.floor(i/24)}d`}function Im(e){let t=e.trim();if(!t)return null;let n=t.replace(/[\\/]+$/,``);if(!n)return null;let r=n.split(/[\\/]/);return r[r.length-1]||null}function Lm(e){let t=e.map(e=>{let t=e.trim(),n=t.replace(/[\\/]+$/,``);return{path:e,parts:n.split(/[\\/]/).filter(Boolean),fallback:n||t||e}}),n=new Map;for(let e of t)n.set(e.path,1);let r=!0;for(;r;){r=!1;let e=new Map;for(let r of t){if(r.parts.length===0)continue;let t=n.get(r.path)??1,i=r.parts.slice(-t).join(`/`);e.set(i,(e.get(i)??0)+1)}for(let i of t){if(i.parts.length===0)continue;let t=n.get(i.path)??1,a=i.parts.slice(-t).join(`/`);(e.get(a)??0)>1&&t<i.parts.length&&(n.set(i.path,t+1),r=!0)}}let i=new Map,a=new Map;for(let e of t){let t=e.fallback;if(e.parts.length>0){let r=n.get(e.path)??1;t=e.parts.slice(-r).join(`/`)}i.set(e.path,t),a.set(t,(a.get(t)??0)+1)}let o=new Map;for(let e of t){let t=i.get(e.path)??e.fallback;(a.get(t)??0)>1&&(t=e.fallback),o.set(e.path,t)}return o}function Rm(e){let t=e.trim();return!t||t.length<=6?t:`${t.slice(0,3)}…${t.slice(-3)}`}function zm(e){let t=document.createElement(`textarea`);t.value=e,t.style.position=`fixed`,t.style.left=`-9999px`,document.body.appendChild(t),t.focus(),t.select();try{if(!document.execCommand(`copy`))throw 0}catch{navigator.clipboard?.writeText(e).catch(()=>{})}document.body.removeChild(t)}function Bm({useSafariLayoutFallback:e,isDragging:t,dndTransform:n,generatedTransform:r}){return e&&!t&&!n||!n?r:!r||r===`none`?n:`${n} ${r}`}var Vm=`agentboard-session`,Hm=N(Vm);function Um(e,t){return e.id===t.id&&e.name===t.name&&e.tmuxWindow===t.tmuxWindow&&e.projectPath===t.projectPath&&e.status===t.status&&e.lastActivity===t.lastActivity&&e.createdAt===t.createdAt&&e.source===t.source&&e.host===t.host&&e.remote===t.remote&&e.command===t.command&&e.agentType===t.agentType&&e.agentSessionId===t.agentSessionId&&e.agentSessionName===t.agentSessionName&&e.logFilePath===t.logFilePath&&e.isPinned===t.isPinned&&e.lastUserMessage===t.lastUserMessage}function Wm(e,t){if(e.length!==t.length)return!1;let n=new Map(e.map(e=>[e.id,e]));for(let e of t){let t=n.get(e.id);if(!t||!Um(t,e))return!1}return!0}function Gm(e){return typeof e==`string`&&e.length>0?e:null}function Km(e){return Array.isArray(e)?e:[]}var qm=T()(k((e,t)=>({sessions:[],agentSessions:{active:[],hibernating:[],history:[]},agentSessionsEpoch:-1,hostStatuses:[],exitingSessions:new Map,selectedSessionId:null,selectedHibernatingSessionId:null,hasLoaded:!1,connectionStatus:`connecting`,connectionError:null,connectionEpoch:0,remoteAllowControl:!1,remoteAllowAttach:!1,hostLabel:null,preferWindowName:!1,setSessions:n=>{let r=t(),i=r.selectedSessionId,a=r.selectedHibernatingSessionId,o=r.sessions,s=r.exitingSessions;if(r.hasLoaded&&Wm(o,n))return;let c=new Set(n.map(e=>e.id)),l=o.filter(e=>!c.has(e.id)&&!s.has(e.id)),u=i;if(i!==null&&!n.some(e=>e.id===i))if(a===null){let{sessionSortMode:e,sessionSortDirection:t}=H.getState();u=Mm(n,{mode:e,direction:t})[0]?.id??null}else u=null;if(l.length>0){let t=new Map(s);for(let e of l)t.set(e.id,e);e({sessions:n,hasLoaded:!0,selectedSessionId:u,exitingSessions:t})}else e({sessions:n,hasLoaded:!0,selectedSessionId:u})},setAgentSessions:(t,n,r)=>e(e=>{let i={active:Km(t),hibernating:Km(n),history:Km(r)};return{agentSessions:i,agentSessionsEpoch:e.connectionEpoch,selectedHibernatingSessionId:e.selectedHibernatingSessionId&&!i.hibernating.some(t=>t.sessionId===e.selectedHibernatingSessionId)?null:e.selectedHibernatingSessionId}}),setActiveAgentSessions:t=>e(e=>({agentSessions:{active:Km(t),hibernating:e.agentSessions.hibernating,history:e.agentSessions.history}})),setHostStatuses:t=>e({hostStatuses:t}),updateSession:t=>e(e=>({sessions:e.sessions.map(e=>e.id===t.id?t:e)})),setSelectedSessionId:t=>e({selectedSessionId:t,...t===null?{}:{selectedHibernatingSessionId:null}}),setSelectedHibernatingSessionId:t=>e({selectedHibernatingSessionId:t,...t===null?{}:{selectedSessionId:null}}),setConnectionStatus:t=>e({connectionStatus:t}),setConnectionError:t=>e({connectionError:t}),setConnectionState:(t,n,r)=>e({connectionStatus:t,connectionError:n,connectionEpoch:r}),setRemoteAllowControl:t=>e({remoteAllowControl:t}),setRemoteAllowAttach:t=>e({remoteAllowAttach:t}),setHostLabel:t=>e({hostLabel:t}),setPreferWindowName:t=>e({preferWindowName:t}),markSessionExiting:n=>{let r=t().sessions.find(e=>e.id===n);if(r){let i=new Map(t().exitingSessions);i.set(n,r),e({exitingSessions:i})}},clearExitingSession:n=>{let r=new Map(t().exitingSessions);r.delete(n),e({exitingSessions:r})}}),{name:Vm,storage:D(()=>Hm),partialize:e=>({selectedSessionId:e.selectedSessionId,selectedHibernatingSessionId:e.selectedHibernatingSessionId}),merge:(e,t)=>{let n=e,r=n?.selectedHibernatingSessionId??n?.selectedSleepingSessionId;return{...t,selectedSessionId:Gm(n?.selectedSessionId),selectedHibernatingSessionId:Gm(r)}}}));function Jm(e,t,n=!1){let[r,i]=(0,x.useState)(!1),a=(0,x.useRef)(e),o=(0,x.useRef)(!1);return(0,x.useEffect)(()=>{let r=a.current;if(n?e>r:e!==r){o.current=!0;let n=setTimeout(()=>{o.current&&=(i(!0),!1)},t);return a.current=e,()=>clearTimeout(n)}a.current=e},[e,t,n]),[r,()=>i(!1)]}function Ym(e,t,n,r){let i=(0,x.useRef)(new Map);(0,x.useEffect)(()=>{let a=new Set(e.map(e=>e.id));for(let e of t.keys())if(a.has(e)){let t=i.current.get(e);t&&(clearTimeout(t),i.current.delete(e)),n(e)}else if(!i.current.has(e)){let t=setTimeout(()=>{i.current.delete(e),n(e)},r+100);i.current.set(e,t)}},[e,t,n,r]),(0,x.useEffect)(()=>()=>{for(let e of i.current.values())clearTimeout(e);i.current.clear()},[])}function Xm({className:e}){return(0,W.jsx)(`svg`,{viewBox:`0 0 92.2 92.2`,fill:`currentColor`,className:e,"aria-hidden":`true`,children:(0,W.jsx)(`path`,{d:`M66.5,0H52.4l25.7,65h14.1L66.5,0z M25.7,0L0,65h14.4l5.3-13.6h26.9L51.8,65h14.4L40.5,0C40.5,0,25.7,0,25.7,0z M24.3,39.3l8.8-22.8l8.8,22.8H24.3z`,transform:`translate(0, 13.6)`})})}function Zm({className:e}){return(0,W.jsx)(`svg`,{viewBox:`-1 -1 26 26`,fill:`currentColor`,className:e,"aria-hidden":`true`,children:(0,W.jsx)(`path`,{d:`M22.2819 9.8211a5.9847 5.9847 0 0 0-.5157-4.9108 6.0462 6.0462 0 0 0-6.5098-2.9A6.0651 6.0651 0 0 0 4.9807 4.1818a5.9847 5.9847 0 0 0-3.9977 2.9 6.0462 6.0462 0 0 0 .7427 7.0966 5.98 5.98 0 0 0 .511 4.9107 6.051 6.051 0 0 0 6.5146 2.9001A5.9847 5.9847 0 0 0 13.2599 24a6.0557 6.0557 0 0 0 5.7718-4.2058 5.9894 5.9894 0 0 0 3.9977-2.9001 6.0557 6.0557 0 0 0-.7475-7.0729zm-9.022 12.6081a4.4755 4.4755 0 0 1-2.8764-1.0408l.1419-.0804 4.7783-2.7582a.7948.7948 0 0 0 .3927-.6813v-6.7369l2.02 1.1686a.071.071 0 0 1 .038.052v5.5826a4.504 4.504 0 0 1-4.4945 4.4944zm-9.6607-4.1254a4.4708 4.4708 0 0 1-.5346-3.0137l.142.0852 4.783 2.7582a.7712.7712 0 0 0 .7806 0l5.8428-3.3685v2.3324a.0804.0804 0 0 1-.0332.0615L9.74 19.9502a4.4992 4.4992 0 0 1-6.1408-1.6464zM2.3408 7.8956a4.485 4.485 0 0 1 2.3655-1.9728V11.6a.7664.7664 0 0 0 .3879.6765l5.8144 3.3543-2.0201 1.1685a.0757.0757 0 0 1-.071 0l-4.8303-2.7865A4.504 4.504 0 0 1 2.3408 7.872zm16.5963 3.8558L13.1038 8.364 15.1192 7.2a.0757.0757 0 0 1 .071 0l4.8303 2.7913a4.4944 4.4944 0 0 1-.6765 8.1042v-5.6772a.79.79 0 0 0-.407-.667zm2.0107-3.0231l-.142-.0852-4.7735-2.7818a.7759.7759 0 0 0-.7854 0L9.409 9.2297V6.8974a.0662.0662 0 0 1 .0284-.0615l4.8303-2.7866a4.4992 4.4992 0 0 1 6.6802 4.66zM8.3065 12.863l-2.02-1.1638a.0804.0804 0 0 1-.038-.0567V6.0742a4.4992 4.4992 0 0 1 7.3757-3.4537l-.142.0805L8.704 5.459a.7948.7948 0 0 0-.3927.6813zm1.0976-2.3654l2.602-1.4998 2.6069 1.4998v2.9994l-2.5974 1.4997-2.6067-1.4997Z`})})}function Qm({className:e}){return(0,W.jsx)(`svg`,{viewBox:`0 0 588.42 568.88`,fill:`currentColor`,className:e,"aria-hidden":`true`,children:(0,W.jsx)(`path`,{d:`M 10.499686,177.03840 L 31.174931,178.56990 C 52.615925,154.32116 61.039171,82.595924 187.38789,96.634671 C 182.79339,403.95560 48.021426,436.37234 56.444675,499.41907 C 59.507674,535.15406 87.840417,557.10556 118.47041,558.38181 C 215.21014,555.06356 210.87089,424.63084 240.99038,95.868921 L 365.80760,95.868921 C 359.17110,211.75239 341.04836,327.63586 339.00636,441.22208 C 340.53786,516.77606 386.48285,557.10556 446.97708,557.61606 C 546.52456,560.93431 577.92030,444.79558 577.92030,395.27709 L 556.47931,395.27710 C 554.43731,436.11709 534.78306,465.47083 492.92207,467.25758 C 378.82535,468.78908 441.61683,266.63113 442.38258,97.400421 L 577.92030,98.166171 L 577.15455,11.636437 C 13.807491,8.9075799 85.312284,-2.1366151 10.499686,177.03840 z`})})}function $m({className:e}){return(0,W.jsxs)(`svg`,{viewBox:`0 0 1024 1024`,className:e,"aria-hidden":`true`,children:[(0,W.jsx)(`path`,{d:`M64 302.719C64 333.652 80.64 361.599 106.667 376.532L469.333 585.812V930.772C469.333 945.919 461.227 959.999 448 967.679C434.773 975.359 418.56 975.359 405.333 967.679L85.3333 782.932C72.1067 775.252 64 761.172 64 746.025V302.719Z`,fill:`url(#devin-a)`}),(0,W.jsx)(`path`,{d:`M448 56.3225C461.227 64.0025 469.333 78.0825 469.333 93.2292V585.816L106.667 376.536C80.64 361.603 64 333.656 64 302.723C64 272.216 80.2133 244.056 106.667 228.696L405.333 56.3225C418.56 48.6425 434.773 48.6425 448 56.3225Z`,fill:`url(#devin-b)`}),(0,W.jsx)(`path`,{d:`M618.667 56.3225L938.667 241.069C951.893 248.749 960 262.829 960 277.976V721.283C960 690.349 943.36 662.403 917.333 647.469L554.667 437.976V93.2292C554.667 78.0825 562.773 64.0025 576 56.3225C589.227 48.6425 605.44 48.6425 618.667 56.3225Z`,fill:`url(#devin-c)`}),(0,W.jsx)(`path`,{d:`M554.667 437.974L917.333 647.467C943.36 662.401 960 690.347 960 721.281C960 752.214 943.787 779.947 917.333 795.307L618.667 967.681C605.44 975.361 589.227 975.361 576 967.681C562.773 960.001 554.667 945.921 554.667 930.774V437.974Z`,fill:`url(#devin-d)`}),(0,W.jsxs)(`defs`,{children:[(0,W.jsxs)(`linearGradient`,{id:`devin-a`,x1:`469.333`,y1:`586.667`,x2:`64`,y2:`586.667`,gradientUnits:`userSpaceOnUse`,children:[(0,W.jsx)(`stop`,{stopColor:`#1797D9`}),(0,W.jsx)(`stop`,{offset:`1`,stopColor:`#087CBF`})]}),(0,W.jsxs)(`linearGradient`,{id:`devin-b`,x1:`181.333`,y1:`405.333`,x2:`394.667`,y2:`53.3333`,gradientUnits:`userSpaceOnUse`,children:[(0,W.jsx)(`stop`,{stopColor:`#005B9E`}),(0,W.jsx)(`stop`,{offset:`1`,stopColor:`#087CBF`})]}),(0,W.jsxs)(`linearGradient`,{id:`devin-c`,x1:`970.667`,y1:`166.975`,x2:`554.667`,y2:`166.975`,gradientUnits:`userSpaceOnUse`,children:[(0,W.jsx)(`stop`,{offset:`0.0211942`,stopColor:`#26B2F3`}),(0,W.jsx)(`stop`,{offset:`1`,stopColor:`#3AC6FF`})]}),(0,W.jsxs)(`linearGradient`,{id:`devin-d`,x1:`570.2`,y1:`973.443`,x2:`810.667`,y2:`581.333`,gradientUnits:`userSpaceOnUse`,children:[(0,W.jsx)(`stop`,{stopColor:`#1EA5E6`}),(0,W.jsx)(`stop`,{offset:`1`,stopColor:`#087CBF`})]})]})]})}function eh({className:e}){return(0,W.jsxs)(`svg`,{viewBox:`0 0 512 512`,fill:`currentColor`,className:e,"aria-hidden":`true`,children:[(0,W.jsx)(`path`,{d:`M210.484 312.759L343.465 210.383C349.984 205.364 359.302 207.322 362.408 215.117C378.758 256.231 371.454 305.64 338.925 339.563C306.397 373.487 261.137 380.927 219.768 363.983L174.577 385.803C239.394 432.008 318.104 420.581 367.289 369.251C406.303 328.564 418.386 273.104 407.088 223.091L407.19 223.198C390.807 149.726 411.218 120.359 453.03 60.3072C454.02 58.8833 455.01 57.4595 456 56L400.978 113.382V113.204L210.45 312.794`}),(0,W.jsx)(`path`,{d:`M183.042 337.641C136.519 291.294 144.54 219.567 184.236 178.203C213.59 147.59 261.683 135.096 303.666 153.464L348.755 131.75C340.632 125.627 330.221 119.042 318.275 114.414C264.277 91.2407 199.63 102.774 155.735 148.516C113.513 192.549 100.236 260.254 123.036 318.027C140.069 361.206 112.148 391.748 84.0229 422.575C74.0561 433.503 64.0553 444.431 56 456L183.007 337.677`})]})}var th=[[`claude`,Xm],[`codex`,Zm],[`pi`,Qm],[`devin`,$m],[`grok`,eh]];function nh({agentType:e,command:t,className:n=``}){let r=(e||t?.split(` `)[0]||``).toLowerCase();for(let[e,t]of th)if(r.startsWith(e))return(0,W.jsx)(t,{className:n});return(0,W.jsx)(Ve,{className:n})}var rh=360;function ih(e){let t=0;for(let n=0;n<e.length;n++){let r=e.charCodeAt(n);t=(t<<5)-t+r,t&=t}return Math.abs(t)}function ah(e){return{"--badge-hue":`${ih(e)%rh}`}}function oh({name:e,fullPath:t,className:n=``}){let r=ah(e);return(0,W.jsx)(`span`,{className:`project-badge inline-flex items-center rounded-full px-1.5 py-0.5 text-[10px] font-medium leading-none ${n}`,style:r,title:t,children:e})}var sh=new Map,ch=new Map,lh=new Set,uh=new Set;function dh(e){if(!e||e.error||!e.state||e.isDraft)return`bg-muted`;switch(e.state){case`OPEN`:return`bg-green-500`;case`MERGED`:return`bg-purple-500`;case`CLOSED`:return`bg-red-500`;default:return`bg-muted`}}function fh(e){return!e||!e.state?``:e.isDraft&&e.state===`OPEN`?`Draft`:e.state.charAt(0)+e.state.slice(1).toLowerCase()}function ph(e){return e.status===`COMPLETED`?e.conclusion===`SUCCESS`?{glyph:`✓`,cls:`text-green-500`}:{glyph:`✗`,cls:`text-red-500`}:{glyph:`…`,cls:`text-yellow-500`}}async function mh(e){let t=e.filter(e=>!sh.has(e)&&!lh.has(e));if(t.length===0)return e.map(e=>sh.get(e));t.forEach(e=>lh.add(e));try{let e=await(await fetch(`/api/pr-info`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({urls:t})})).json();for(let t of e)sh.set(t.url,t)}catch{}finally{t.forEach(e=>lh.delete(e))}return e.map(e=>sh.get(e)).filter(Boolean)}function hh({pr:e}){let[t,n]=(0,x.useState)(sh.get(e.url)),[r,i]=(0,x.useState)(ch.get(e.url)),[a,o]=(0,x.useState)(!1),s=(0,x.useRef)(null),[c,l]=(0,x.useState)(null),u=(0,x.useRef)(!0);(0,x.useEffect)(()=>(u.current=!0,()=>{u.current=!1}),[]),(0,x.useEffect)(()=>{sh.has(e.url)||mh([e.url]).then(e=>{u.current&&e[0]&&n(e[0])})},[e.url]),(0,x.useEffect)(()=>{!a||ch.has(e.url)||uh.has(e.url)||(uh.add(e.url),fetch(`/api/pr-checks?url=${encodeURIComponent(e.url)}`).then(e=>e.ok?e.json():null).then(t=>{t&&ch.set(e.url,t),u.current&&t&&i(t)}).catch(()=>{}).finally(()=>uh.delete(e.url)))},[a,e.url]);let d=r??t;return(0,W.jsxs)(`span`,{ref:s,className:`relative inline-flex`,onMouseEnter:()=>{let e=s.current?.getBoundingClientRect();e&&l({left:Math.min(e.left,window.innerWidth-270),bottom:window.innerHeight-e.top}),o(!0)},onMouseLeave:()=>o(!1),children:[(0,W.jsxs)(`a`,{href:e.url,target:`_blank`,rel:`noreferrer`,onClick:e=>e.stopPropagation(),className:`inline-flex items-center gap-1 rounded-full bg-elevated px-1.5 py-0.5 text-[11px] tabular-nums text-muted hover:text-accent`,title:`${e.repo}#${e.number}`,children:[(0,W.jsx)(`span`,{className:`inline-block h-1.5 w-1.5 rounded-full ${dh(t)}`}),`#`,e.number]}),a&&c&&(0,U.createPortal)((0,W.jsxs)(`div`,{className:`fixed z-[100] w-64 rounded-md border border-border bg-elevated p-2 text-left shadow-lg`,style:{left:c.left,bottom:c.bottom},onMouseEnter:()=>o(!0),onMouseLeave:()=>o(!1),children:[(0,W.jsxs)(`div`,{className:`flex items-center gap-1.5 text-[11px]`,children:[(0,W.jsx)(`span`,{className:dh(t)+` inline-block h-1.5 w-1.5 rounded-full`}),(0,W.jsx)(`span`,{className:`text-muted`,children:fh(t)||`PR`}),(0,W.jsx)(`span`,{className:`text-muted`,children:`·`}),(0,W.jsxs)(`span`,{className:`truncate text-muted`,children:[e.repo,`#`,e.number]})]}),d?(0,W.jsxs)(W.Fragment,{children:[(0,W.jsx)(`div`,{className:`mt-1 text-xs text-primary`,children:d.title??`(title unavailable)`}),(0,W.jsx)(`div`,{className:`mt-0.5 text-[11px] text-muted`,children:d.author?`by ${d.author}`:``}),r?.checks&&r.checks.length>0&&(0,W.jsx)(`div`,{className:`mt-1.5 max-h-32 space-y-0.5 overflow-y-auto border-t border-border pt-1.5`,children:r.checks.map((e,t)=>{let n=ph(e);return(0,W.jsxs)(`div`,{className:`flex items-center gap-1.5 text-[11px]`,children:[(0,W.jsx)(`span`,{className:n.cls,children:n.glyph}),(0,W.jsx)(`span`,{className:`truncate text-muted`,children:e.name})]},t)})})]}):(0,W.jsxs)(`div`,{className:`mt-1 space-y-1`,children:[(0,W.jsx)(`div`,{className:`h-3 w-3/4 animate-pulse rounded bg-border`}),(0,W.jsx)(`div`,{className:`h-3 w-1/2 animate-pulse rounded bg-border`})]})]}),document.body)]})}var gh=4;function _h({prs:e}){let[t,n]=(0,x.useState)(!1),[r,i]=(0,x.useState)(null),[a,o]=(0,x.useState)(null),s=(0,x.useRef)(null);return(0,x.useEffect)(()=>{!t||a||mh(e.map(e=>e.url)).then(e=>{o(new Map(e.map(e=>[e.url,e])))})},[t,a,e]),(0,W.jsxs)(`span`,{ref:s,className:`relative inline-flex`,onMouseEnter:()=>{let e=s.current?.getBoundingClientRect();e&&i({left:Math.min(e.left,window.innerWidth-270),bottom:window.innerHeight-e.top}),n(!0)},onMouseLeave:()=>n(!1),children:[(0,W.jsxs)(`span`,{className:`inline-flex cursor-default items-center rounded-full px-1.5 py-0.5 text-[11px] tabular-nums text-muted`,title:`${e.length} more PR${e.length===1?``:`s`}`,children:[`+`,e.length]}),t&&r&&(0,U.createPortal)((0,W.jsxs)(`div`,{className:`fixed z-[100] w-56 rounded-md border border-border bg-elevated p-2 text-left shadow-lg`,style:{left:r.left,bottom:r.bottom},onMouseEnter:()=>n(!0),onMouseLeave:()=>n(!1),children:[(0,W.jsxs)(`div`,{className:`text-[11px] text-muted`,children:[e.length,` more PR`,e.length===1?``:`s`]}),(0,W.jsx)(`div`,{className:`mt-1 max-h-48 space-y-0.5 overflow-y-auto border-t border-border pt-1.5`,children:e.map(e=>(0,W.jsxs)(`a`,{href:e.url,target:`_blank`,rel:`noreferrer`,className:`flex items-center gap-1.5 text-[11px] text-secondary hover:text-accent`,children:[(0,W.jsx)(`span`,{className:`inline-block h-1.5 w-1.5 shrink-0 rounded-full ${dh(a?.get(e.url))}`}),(0,W.jsxs)(`span`,{className:`tabular-nums`,children:[`#`,e.number]}),(0,W.jsx)(`span`,{className:`truncate text-muted`,children:e.repo})]},e.url))})]}),document.body)]})}function vh({prs:e}){if(e.length===0)return null;let t=[...e].reverse(),n=t.slice(0,gh),r=t.slice(gh);return(0,W.jsxs)(`div`,{className:`flex flex-wrap items-center gap-1 pl-[1.375rem]`,children:[n.map(e=>(0,W.jsx)(hh,{pr:e},e.url)),r.length>0&&(0,W.jsx)(_h,{prs:r})]})}var yh=(0,x.memo)(function({session:e,showSessionIdPrefix:t,showProjectName:n,showLastUserMessage:r,onResume:i,onPreview:a}){let o=Fm(e.lastActivityAt),s=Im(e.projectPath),c=e.displayName||s||e.sessionId.slice(0,8),l=n&&!!s,u=r&&!!e.lastUserMessage,d=t?Rm(e.sessionId):``,f=(0,x.useRef)(null),[p,m]=(0,x.useState)(null);return(0,x.useEffect)(()=>{if(!p)return;let e=e=>{f.current&&!f.current.contains(e.target)&&m(null)},t=e=>{e.key===`Escape`&&m(null)};return document.addEventListener(`mousedown`,e),document.addEventListener(`touchstart`,e),document.addEventListener(`keydown`,t),()=>{document.removeEventListener(`mousedown`,e),document.removeEventListener(`touchstart`,e),document.removeEventListener(`keydown`,t)}},[p]),(0,W.jsxs)(`div`,{className:`group relative cursor-pointer px-3 py-2 hover:bg-hover`,role:`button`,tabIndex:0,title:`Click to preview`,onClick:()=>a(e),onKeyDown:t=>{(t.key===`Enter`||t.key===` `)&&(t.preventDefault(),a(e))},onContextMenu:e=>{e.preventDefault(),e.stopPropagation(),m({x:e.clientX,y:e.clientY})},children:[(0,W.jsx)(`button`,{type:`button`,className:`absolute right-3 top-1/2 -translate-y-1/2 text-xs text-muted opacity-0 hover:text-primary group-hover:opacity-100`,title:`Wake directly`,onClick:t=>{t.stopPropagation(),i(e.sessionId)},children:`▶`}),(0,W.jsxs)(`div`,{className:`flex flex-col gap-0.5 pl-2.5 group-hover:pr-4`,children:[(0,W.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,W.jsx)(nh,{agentType:e.agentType,className:`h-3.5 w-3.5 shrink-0 text-muted`}),(0,W.jsx)(`span`,{className:`min-w-0 flex-1 truncate text-sm font-medium text-primary`,children:c}),e.lastResumeError&&(0,W.jsx)(ae,{className:`h-3 w-3 shrink-0 text-amber-500`,"aria-label":`Wake failed`,title:`Last wake failed: ${e.lastResumeError}`}),d&&(0,W.jsx)(`span`,{className:`shrink-0 text-[11px] font-mono text-muted`,title:e.sessionId,children:d}),(0,W.jsx)(`span`,{className:`ml-1 w-8 shrink-0 text-right text-xs tabular-nums text-muted`,children:o})]}),(l||u)&&(0,W.jsxs)(`div`,{className:`flex flex-wrap items-center gap-1 pl-[1.375rem]`,children:[l&&(0,W.jsx)(oh,{name:s,fullPath:e.projectPath}),u&&(0,W.jsxs)(`span`,{className:`truncate text-xs italic text-muted`,children:[`"`,e.lastUserMessage.length>200?e.lastUserMessage.slice(0,200)+`…`:e.lastUserMessage,`"`]})]}),e.prs&&e.prs.length>0&&(0,W.jsx)(vh,{prs:e.prs})]}),p&&(0,W.jsx)(`div`,{ref:f,className:`fixed z-50 min-w-[160px] rounded-md border border-border bg-elevated shadow-lg py-1`,style:{left:p.x,top:p.y},role:`menu`,children:e.logFilePath&&(0,W.jsxs)(`button`,{onClick:t=>{t.stopPropagation(),m(null),e.logFilePath&&zm(e.logFilePath)},className:`w-full px-3 py-2 text-left text-sm text-secondary hover:bg-hover hover:text-primary flex items-center gap-2`,role:`menuitem`,title:e.logFilePath,children:[(0,W.jsx)(ye,{width:14,height:14}),`Copy Log Path`]})})]})});function bh({name:e,className:t=``}){let n=ah(`host:${e}`);return(0,W.jsx)(`span`,{className:`inline-flex items-center rounded-full px-1.5 py-0.5 text-[10px] font-medium uppercase leading-none tracking-wide ${t}`,style:n,title:e,children:e})}function xh({hosts:e,selectedHosts:t,onSelect:n,statuses:r=[]}){let[i,a]=(0,x.useState)(!1),o=(0,x.useId)(),s=(0,x.useRef)(null),c=(0,x.useMemo)(()=>new Set(t),[t]),l=(0,x.useMemo)(()=>new Map(r.map(e=>[e.host,e])),[r]),u=(0,x.useMemo)(()=>t.length===0?`All Hosts`:t.join(`, `),[t]),d=(0,x.useMemo)(()=>t.length===0?`All Hosts`:t.length===1?t[0]:`${t.length} hosts`,[t]);(0,x.useEffect)(()=>{if(!i||typeof document>`u`||!document.addEventListener||!document.removeEventListener)return;let e=e=>{let t=e.target;t&&s.current?.contains(t)||a(!1)},t=e=>{e.key===`Escape`&&a(!1)};return document.addEventListener(`mousedown`,e),document.addEventListener(`touchstart`,e,{passive:!0}),document.addEventListener(`keydown`,t),()=>{document.removeEventListener(`mousedown`,e),document.removeEventListener(`touchstart`,e),document.removeEventListener(`keydown`,t)}},[i]);let f=t=>{let r=new Set(c);r.has(t)?r.delete(t):r.add(t),n(e.filter(e=>r.has(e)))};return(0,W.jsxs)(`div`,{ref:s,className:`relative`,children:[(0,W.jsxs)(`button`,{type:`button`,"aria-haspopup":`menu`,"aria-expanded":i,"aria-controls":o,"aria-label":`Filter by host`,onClick:()=>a(e=>!e),className:`flex h-6 max-w-[9rem] items-center gap-1.5 rounded border border-border bg-base px-2 text-[11px] text-primary hover:bg-hover focus:border-accent focus:outline-none`,title:u,children:[(0,W.jsx)(Fe,{className:`h-3.5 w-3.5 shrink-0`}),(0,W.jsx)(`span`,{className:`truncate leading-none`,children:d}),(0,W.jsx)(se,{className:`h-3 w-3 shrink-0 text-muted`})]}),i&&(0,W.jsxs)(`div`,{id:o,role:`menu`,className:`absolute left-0 z-20 mt-1 w-48 max-w-[calc(100vw-1.5rem)] rounded border border-border bg-surface p-2 text-xs shadow-lg`,children:[(0,W.jsxs)(`label`,{role:`menuitemcheckbox`,"aria-checked":t.length===0,className:`flex cursor-pointer items-center gap-2 rounded px-2 py-1.5 text-primary hover:bg-hover`,children:[(0,W.jsx)(`input`,{type:`checkbox`,checked:t.length===0,onChange:()=>n([]),className:`h-3.5 w-3.5 accent-approval`}),(0,W.jsx)(`span`,{children:`All Hosts`})]}),(0,W.jsx)(`div`,{className:`my-2 h-px bg-border`}),e.length===0?(0,W.jsx)(`div`,{className:`px-2 py-1 text-muted`,children:`No hosts`}):(0,W.jsx)(`div`,{className:`max-h-48 overflow-y-auto pr-1`,children:e.map(e=>{let t=l.get(e),n=t?!t.ok:!1;return(0,W.jsxs)(`label`,{role:`menuitemcheckbox`,"aria-checked":c.has(e),className:`flex cursor-pointer items-center gap-2 rounded px-2 py-1.5 text-primary hover:bg-hover`,title:t?.error?`${e}: ${t.error}`:e,children:[(0,W.jsx)(`input`,{type:`checkbox`,checked:c.has(e),onChange:()=>f(e),className:`h-3.5 w-3.5 accent-approval`}),(0,W.jsx)(`span`,{className:`truncate`,children:e}),n&&(0,W.jsx)(`span`,{className:`ml-auto text-[10px] uppercase text-danger`,children:`offline`})]},e)})})]})]})}function Sh({projects:e,selectedProjects:t,onSelect:n,hasHiddenPermissions:r}){let[i,a]=(0,x.useState)(!1),o=(0,x.useId)(),s=(0,x.useRef)(null),c=(0,x.useMemo)(()=>Lm(e),[e]),l=(0,x.useMemo)(()=>new Set(t),[t]),u=r&&t.length>0,d=(0,x.useMemo)(()=>t.length===0?`All Projects`:t.map(e=>c.get(e)??Im(e)??e).join(`, `),[c,t]),f=(0,x.useMemo)(()=>{if(t.length===0)return`All Projects`;if(t.length===1){let e=t[0];return c.get(e)??Im(e)??e}return`${t.length} projects`},[c,t]);(0,x.useEffect)(()=>{if(!i||typeof document>`u`||!document.addEventListener||!document.removeEventListener)return;let e=e=>{let t=e.target;t&&s.current?.contains(t)||a(!1)},t=e=>{e.key===`Escape`&&a(!1)};return document.addEventListener(`mousedown`,e),document.addEventListener(`touchstart`,e,{passive:!0}),document.addEventListener(`keydown`,t),()=>{document.removeEventListener(`mousedown`,e),document.removeEventListener(`touchstart`,e),document.removeEventListener(`keydown`,t)}},[i]);let p=t=>{let r=new Set(l);r.has(t)?r.delete(t):r.add(t),n(e.filter(e=>r.has(e)))};return(0,W.jsxs)(`div`,{ref:s,className:`relative`,children:[(0,W.jsxs)(`button`,{type:`button`,"aria-haspopup":`menu`,"aria-expanded":i,"aria-controls":o,"aria-label":`Filter by project`,onClick:()=>a(e=>!e),className:`flex h-6 max-w-[11rem] items-center gap-1.5 rounded border border-border bg-base px-2 text-[11px] text-primary hover:bg-hover focus:border-accent focus:outline-none`,title:d,children:[(0,W.jsx)(xe,{className:`h-3.5 w-3.5 shrink-0`}),(0,W.jsx)(`span`,{className:`truncate leading-none`,children:f}),(0,W.jsx)(se,{className:`h-3 w-3 shrink-0 text-muted`})]}),i&&(0,W.jsxs)(`div`,{id:o,role:`menu`,className:`absolute left-0 z-20 mt-1 w-60 max-w-[calc(100vw-1.5rem)] rounded border border-border bg-surface p-2 text-xs shadow-lg`,children:[(0,W.jsxs)(`label`,{className:`flex cursor-pointer items-center gap-2 rounded px-2 py-1.5 text-primary hover:bg-hover`,children:[(0,W.jsx)(`input`,{type:`checkbox`,checked:t.length===0,onChange:()=>n([]),className:`h-3.5 w-3.5 accent-approval`}),(0,W.jsx)(`span`,{children:`All Projects`})]}),(0,W.jsx)(`div`,{className:`my-2 h-px bg-border`}),e.length===0?(0,W.jsx)(`div`,{className:`px-2 py-1 text-muted`,children:`No projects`}):(0,W.jsx)(`div`,{className:`max-h-48 overflow-y-auto pr-1`,children:e.map(e=>{let t=c.get(e)??Im(e)??e;return(0,W.jsxs)(`label`,{className:`flex cursor-pointer items-center gap-2 rounded px-2 py-1.5 text-primary hover:bg-hover`,title:e,children:[(0,W.jsx)(`input`,{type:`checkbox`,checked:l.has(e),onChange:()=>p(e),className:`h-3.5 w-3.5 accent-approval`}),(0,W.jsx)(`span`,{className:`truncate`,children:t})]},e)})})]}),u&&(0,W.jsx)(`button`,{type:`button`,className:`absolute -right-1 -top-1 h-2 w-2 rounded-full bg-approval pulse-approval ring-2 ring-elevated`,title:`Hidden sessions need attention`,"aria-label":`Clear project filters`,onClick:e=>{e.stopPropagation(),n([])},children:(0,W.jsx)(`span`,{className:`sr-only`,children:`Clear project filters`})})]})}function Ch(e){return!e||typeof e!=`object`||Array.isArray(e)?null:e}function wh(e){return typeof e==`string`?e:null}var Th=new Set([`tool_result`,`custom_tool_call_output`]),Eh=new Set([`text`,`input_text`,`output_text`]);function Dh(e){return e===`user`?`user`:e===`assistant`?`assistant`:e===`system`||e===`developer`?`system`:e===`tool`?`tool`:`other`}function Oh(e){let t=wh(e.type)??``,n=Ch(e.payload),r=wh(n?.type)??``,i=wh(e.source)??wh(n?.source)??``,a=wh(e.agent)??``;return i.toLowerCase()===`pi`||a.toLowerCase()===`pi`?`pi`:i.toLowerCase()===`devin`||a.toLowerCase()===`devin`?`devin`:i.toLowerCase()===`grok`||a.toLowerCase()===`grok`||e.synthetic_reason!==void 0||e.prompt_index!==void 0||e.model_fingerprint!==void 0||e.encrypted_content!==void 0?`grok`:t===`response_item`||t===`event_msg`?`codex`:t===`tool_use`||t===`result`||t===`user`||t===`assistant`||t===`system`?`claude`:r===`user_message`||r===`assistant_message`?`codex`:`unknown`}function kh(e){let t=wh(Ch(e.payload)?.type);return{family:Oh(e),rawType:wh(e.type)??`unknown`,...t?{payloadType:t}:{}}}function Ah(e){if(!e)return[];if(typeof e==`string`)return e.trim()?[e]:[];if(Array.isArray(e)){let t=[];for(let n of e){if(typeof n==`string`){n.trim()&&t.push(n);continue}let e=Ch(n);if(!e)continue;let r=wh(e.type);if(r&&Th.has(r)||r&&!Eh.has(r))continue;let i=wh(e.text);i&&i.trim()&&t.push(i)}return t}let t=Ch(e);if(t){let e=wh(t.type);if(e&&Th.has(e))return[];let n=wh(t.text);return n&&n.trim()?[n]:[...Ah(t.content),...Ah(t.message)]}return[]}function jh(e,t){if(e.type!==`response_item`)return[];let n=Ch(e.payload);if(!n||n.type!==`message`)return[];let r=Dh(n.role);return Ah(n.content).map(e=>({kind:`message`,role:r,text:e,source:t}))}function Mh(e,t){if(e.type!==`event_msg`)return[];let n=Ch(e.payload);if(!n)return[];let r=wh(n.type),i=null;if(r===`user_message`?i=`user`:r===`assistant_message`||r===`agent_message`?i=`assistant`:r===`system_message`?i=`system`:r===`message`&&(i=Dh(n.role)),!i||![`user`,`assistant`,`system`].includes(i))return[];let a=Array.from(new Set([...Ah(n.message),...Ah(n.content),...Ah(n.text)]));return a.length===0?[]:a.map(e=>({kind:`message`,role:i,text:e,source:t}))}function Nh(e,t){let n=Dh(e.type),r=Ch(e.message);if(r){let n=Dh(r.role??e.type);return[...Ah(r.content),...Ah(r.text),...Ah(r.message)].map(e=>({kind:`message`,role:n,text:e,source:t}))}return[`user`,`assistant`,`system`].includes(n)?[...Ah(e.content),...Ah(e.text)].map(e=>({kind:`message`,role:n,text:e,source:t})):[]}function Ph(e,t){let n=Dh(e.role);return[`user`,`assistant`,`system`].includes(n)?[...Ah(e.content),...Ah(e.message),...Ah(e.text)].map(e=>({kind:`message`,role:n,text:e,source:t})):[]}function Fh(e,t){let n=wh(e.type),r=wh(e.event);return n!==`tool_use`&&r!==`tool_use`?[]:[{kind:`tool_call`,role:`assistant`,text:`[Tool: ${wh(e.name)??`tool`}]`,source:t}]}function Ih(e,t){if(e.type!==`result`)return[];let n=wh(e.result);return!n||!n.trim()?[]:[{kind:`result`,role:`system`,text:n,source:t}]}function Lh(e,t){let n=Ch(e.payload),r=[...Ah(e.message),...Ah(e.content),...Ah(e.text),...Ah(n?.message),...Ah(n?.content)];return r.length===0?[]:r.map(e=>({kind:`unknown`,role:`other`,text:e,source:t}))}function Rh(e,t){let n=wh(e.type),r=wh(Ch(e.payload)?.type);return n&&Th.has(n)||r&&Th.has(r)?[{kind:`tool_result`,role:`tool`,text:``,source:t}]:[]}function zh(e,t){let n=e.tool_calls;return t.family!==`grok`||!Array.isArray(n)?[]:n.map(e=>Ch(e)).filter(e=>e!==null).map(e=>({kind:`tool_call`,role:`assistant`,text:`[Tool: ${wh(e.name)??`tool`}]`,source:t}))}function Bh(e){let t=Ch(e);if(!t||t.isMeta===!0||t.synthetic_reason!==void 0)return[];let n=kh(t),r=[...jh(t,n),...Mh(t,n),...Nh(t,n),...Fh(t,n),...Ih(t,n),...Rh(t,n),...zh(t,n)];if(r.length>0)return r;let i=Ph(t,n);return i.length>0?i:Lh(t,n)}function Vh(e){let t=e.trim();if(!t)return null;try{let e=JSON.parse(t);return{parsed:!0,events:Bh(e),raw:e}}catch{return{parsed:!1,events:[{kind:`unknown`,role:`other`,text:t,source:{family:`unknown`,rawType:`raw_text`}}],raw:e}}}function Hh(e,t){let n=t||{};return(e[e.length-1]===``?[...e,``]:e).join((n.padRight?` `:``)+`,`+(n.padLeft===!1?``:` `)).trim()}var Uh=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Wh=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Gh={};function Kh(e,t){return((t||Gh).jsx?Wh:Uh).test(e)}var qh=/[ \t\n\f\r]/g;function Jh(e){return typeof e==`object`?e.type===`text`?Yh(e.value):!1:Yh(e)}function Yh(e){return e.replace(qh,``)===``}var Xh=class{constructor(e,t,n){this.normal=t,this.property=e,n&&(this.space=n)}};Xh.prototype.normal={},Xh.prototype.property={},Xh.prototype.space=void 0;function Zh(e,t){let n={},r={};for(let t of e)Object.assign(n,t.property),Object.assign(r,t.normal);return new Xh(n,r,t)}function Qh(e){return e.toLowerCase()}var $h=class{constructor(e,t){this.attribute=t,this.property=e}};$h.prototype.attribute=``,$h.prototype.booleanish=!1,$h.prototype.boolean=!1,$h.prototype.commaOrSpaceSeparated=!1,$h.prototype.commaSeparated=!1,$h.prototype.defined=!1,$h.prototype.mustUseProperty=!1,$h.prototype.number=!1,$h.prototype.overloadedBoolean=!1,$h.prototype.property=``,$h.prototype.spaceSeparated=!1,$h.prototype.space=void 0;var eg=c({boolean:()=>ng,booleanish:()=>rg,commaOrSpaceSeparated:()=>sg,commaSeparated:()=>og,number:()=>q,overloadedBoolean:()=>ig,spaceSeparated:()=>ag}),tg=0,ng=cg(),rg=cg(),ig=cg(),q=cg(),ag=cg(),og=cg(),sg=cg();function cg(){return 2**++tg}var lg=Object.keys(eg),ug=class extends $h{constructor(e,t,n,r){let i=-1;if(super(e,t),dg(this,`space`,r),typeof n==`number`)for(;++i<lg.length;){let e=lg[i];dg(this,lg[i],(n&eg[e])===eg[e])}}};ug.prototype.defined=!0;function dg(e,t,n){n&&(e[t]=n)}function fg(e){let t={},n={};for(let[r,i]of Object.entries(e.properties)){let a=new ug(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(a.mustUseProperty=!0),t[r]=a,n[Qh(r)]=r,n[Qh(a.attribute)]=r}return new Xh(t,n,e.space)}var pg=fg({properties:{ariaActiveDescendant:null,ariaAtomic:rg,ariaAutoComplete:null,ariaBusy:rg,ariaChecked:rg,ariaColCount:q,ariaColIndex:q,ariaColSpan:q,ariaControls:ag,ariaCurrent:null,ariaDescribedBy:ag,ariaDetails:null,ariaDisabled:rg,ariaDropEffect:ag,ariaErrorMessage:null,ariaExpanded:rg,ariaFlowTo:ag,ariaGrabbed:rg,ariaHasPopup:null,ariaHidden:rg,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:ag,ariaLevel:q,ariaLive:null,ariaModal:rg,ariaMultiLine:rg,ariaMultiSelectable:rg,ariaOrientation:null,ariaOwns:ag,ariaPlaceholder:null,ariaPosInSet:q,ariaPressed:rg,ariaReadOnly:rg,ariaRelevant:null,ariaRequired:rg,ariaRoleDescription:ag,ariaRowCount:q,ariaRowIndex:q,ariaRowSpan:q,ariaSelected:rg,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 mg(e,t){return t in e?e[t]:t}function hg(e,t){return mg(e,t.toLowerCase())}var gg=fg({attributes:{acceptcharset:`accept-charset`,classname:`class`,htmlfor:`for`,httpequiv:`http-equiv`},mustUseProperty:[`checked`,`multiple`,`muted`,`selected`],properties:{abbr:null,accept:og,acceptCharset:ag,accessKey:ag,action:null,allow:null,allowFullScreen:ng,allowPaymentRequest:ng,allowUserMedia:ng,alpha:ng,alt:null,as:null,async:ng,autoCapitalize:null,autoComplete:ag,autoFocus:ng,autoPlay:ng,blocking:ag,capture:null,charSet:null,checked:ng,cite:null,className:ag,closedBy:null,colorSpace:null,cols:q,colSpan:q,command:null,commandFor:null,content:null,contentEditable:rg,controls:ng,controlsList:ag,coords:q|og,crossOrigin:null,data:null,dateTime:null,decoding:null,default:ng,defer:ng,dir:null,dirName:null,disabled:ng,download:ig,draggable:rg,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:ng,formTarget:null,headers:ag,height:q,hidden:ig,high:q,href:null,hrefLang:null,htmlFor:ag,httpEquiv:ag,id:null,imageSizes:null,imageSrcSet:null,inert:ng,inputMode:null,integrity:null,is:null,isMap:ng,itemId:null,itemProp:ag,itemRef:ag,itemScope:ng,itemType:ag,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:ng,low:q,manifest:null,max:null,maxLength:q,media:null,method:null,min:null,minLength:q,multiple:ng,muted:ng,name:null,nonce:null,noModule:ng,noValidate:ng,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:ng,optimum:q,pattern:null,ping:ag,placeholder:null,playsInline:ng,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:ng,referrerPolicy:null,rel:ag,required:ng,reversed:ng,rows:q,rowSpan:q,sandbox:ag,scope:null,scoped:ng,seamless:ng,selected:ng,shadowRootClonable:ng,shadowRootCustomElementRegistry:ng,shadowRootDelegatesFocus:ng,shadowRootMode:null,shadowRootSerializable:ng,shape:null,size:q,sizes:null,slot:null,span:q,spellCheck:rg,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:ng,useMap:null,value:rg,width:q,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:ag,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:ng,declare:ng,event:null,face:null,frame:null,frameBorder:null,hSpace:q,leftMargin:q,link:null,longDesc:null,lowSrc:null,marginHeight:q,marginWidth:q,noResize:ng,noHref:ng,noShade:ng,noWrap:ng,object:null,profile:null,prompt:null,rev:null,rightMargin:q,rules:null,scheme:null,scrolling:rg,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:ng,disablePictureInPicture:ng,disableRemotePlayback:ng,exportParts:og,part:ag,prefix:null,property:null,results:q,security:null,unselectable:null},space:`html`,transform:hg}),_g=fg({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:sg,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:ag,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:ng,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:og,g2:og,glyphName:og,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:sg,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:ag,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:q,pointsAtY:q,pointsAtZ:q,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:sg,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:sg,rev:sg,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:sg,requiredFeatures:sg,requiredFonts:sg,requiredFormats:sg,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:sg,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:sg,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:sg,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:mg}),vg=fg({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()}}),yg=fg({attributes:{xmlnsxlink:`xmlns:xlink`},properties:{xmlnsXLink:null,xmlns:null},space:`xmlns`,transform:hg}),bg=fg({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:`xml`,transform(e,t){return`xml:`+t.slice(3).toLowerCase()}}),xg={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`},Sg=/[A-Z]/g,Cg=/-[a-z]/g,wg=/^data[-\w.:]+$/i;function Tg(e,t){let n=Qh(t),r=t,i=$h;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)===`data`&&wg.test(t)){if(t.charAt(4)===`-`){let e=t.slice(5).replace(Cg,Dg);r=`data`+e.charAt(0).toUpperCase()+e.slice(1)}else{let e=t.slice(4);if(!Cg.test(e)){let n=e.replace(Sg,Eg);n.charAt(0)!==`-`&&(n=`-`+n),t=`data`+n}}i=ug}return new i(r,t)}function Eg(e){return`-`+e.toLowerCase()}function Dg(e){return e.charAt(1).toUpperCase()}var Og=Zh([pg,gg,vg,yg,bg],`html`),kg=Zh([pg,_g,vg,yg,bg],`svg`);function Ag(e){return e.join(` `).trim()}var jg=s(((e,t)=>{var n=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,r=/\n/g,i=/^\s*/,a=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,o=/^:\s*/,s=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,c=/^[;\s]*/,l=/^\s+|\s+$/g,u=`
20
+ `},Xd={onDragStart(e){let{active:t}=e;return`Picked up draggable item `+t.id+`.`},onDragOver(e){let{active:t,over:n}=e;return n?`Draggable item `+t.id+` was moved over droppable area `+n.id+`.`:`Draggable item `+t.id+` is no longer over a droppable area.`},onDragEnd(e){let{active:t,over:n}=e;return n?`Draggable item `+t.id+` was dropped over droppable area `+n.id:`Draggable item `+t.id+` was dropped.`},onDragCancel(e){let{active:t}=e;return`Dragging was cancelled. Draggable item `+t.id+` was dropped.`}};function Zd(e){let{announcements:t=Xd,container:n,hiddenTextDescribedById:r,screenReaderInstructions:i=Yd}=e,{announce:a,announcement:o}=Gd(),s=jd(`DndLiveRegion`),[c,l]=(0,x.useState)(!1);if((0,x.useEffect)(()=>{l(!0)},[]),qd((0,x.useMemo)(()=>({onDragStart(e){let{active:n}=e;a(t.onDragStart({active:n}))},onDragMove(e){let{active:n,over:r}=e;t.onDragMove&&a(t.onDragMove({active:n,over:r}))},onDragOver(e){let{active:n,over:r}=e;a(t.onDragOver({active:n,over:r}))},onDragEnd(e){let{active:n,over:r}=e;a(t.onDragEnd({active:n,over:r}))},onDragCancel(e){let{active:n,over:r}=e;a(t.onDragCancel({active:n,over:r}))}}),[a,t])),!c)return null;let u=x.createElement(x.Fragment,null,x.createElement(Ud,{id:r,value:i.draggable}),x.createElement(Wd,{id:s,announcement:o}));return n?(0,U.createPortal)(u,n):u}var Qd;(function(e){e.DragStart=`dragStart`,e.DragMove=`dragMove`,e.DragEnd=`dragEnd`,e.DragCancel=`dragCancel`,e.DragOver=`dragOver`,e.RegisterDroppable=`registerDroppable`,e.SetDroppableDisabled=`setDroppableDisabled`,e.UnregisterDroppable=`unregisterDroppable`})(Qd||={});function $d(){}function ef(e,t){return(0,x.useMemo)(()=>({sensor:e,options:t??{}}),[e,t])}function tf(){var e=[...arguments];return(0,x.useMemo)(()=>[...e].filter(e=>e!=null),[...e])}var nf=Object.freeze({x:0,y:0});function rf(e,t){return Math.sqrt((e.x-t.x)**2+(e.y-t.y)**2)}function af(e,t){let{data:{value:n}}=e,{data:{value:r}}=t;return n-r}function of(e,t){let{data:{value:n}}=e,{data:{value:r}}=t;return r-n}function sf(e,t){if(!e||e.length===0)return null;let[n]=e;return t?n[t]:n}function cf(e,t,n){return t===void 0&&(t=e.left),n===void 0&&(n=e.top),{x:t+e.width*.5,y:n+e.height*.5}}var lf=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:r}=e,i=cf(t,t.left,t.top),a=[];for(let e of r){let{id:t}=e,r=n.get(t);if(r){let n=rf(cf(r),i);a.push({id:t,data:{droppableContainer:e,value:n}})}}return a.sort(af)};function uf(e,t){let n=Math.max(t.top,e.top),r=Math.max(t.left,e.left),i=Math.min(t.left+t.width,e.left+e.width),a=Math.min(t.top+t.height,e.top+e.height),o=i-r,s=a-n;if(r<i&&n<a){let n=t.width*t.height,r=e.width*e.height,i=o*s,a=i/(n+r-i);return Number(a.toFixed(4))}return 0}var df=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:r}=e,i=[];for(let e of r){let{id:r}=e,a=n.get(r);if(a){let n=uf(a,t);n>0&&i.push({id:r,data:{droppableContainer:e,value:n}})}}return i.sort(of)};function ff(e,t,n){return{...e,scaleX:t&&n?t.width/n.width:1,scaleY:t&&n?t.height/n.height:1}}function pf(e,t){return e&&t?{x:e.left-t.left,y:e.top-t.top}:nf}function mf(e){return function(t){return[...arguments].slice(1).reduce((t,n)=>({...t,top:t.top+e*n.y,bottom:t.bottom+e*n.y,left:t.left+e*n.x,right:t.right+e*n.x}),{...t})}}var hf=mf(1);function gf(e){if(e.startsWith(`matrix3d(`)){let t=e.slice(9,-1).split(/, /);return{x:+t[12],y:+t[13],scaleX:+t[0],scaleY:+t[5]}}else if(e.startsWith(`matrix(`)){let t=e.slice(7,-1).split(/, /);return{x:+t[4],y:+t[5],scaleX:+t[0],scaleY:+t[3]}}return null}function _f(e,t,n){let r=gf(t);if(!r)return e;let{scaleX:i,scaleY:a,x:o,y:s}=r,c=e.left-o-(1-i)*parseFloat(n),l=e.top-s-(1-a)*parseFloat(n.slice(n.indexOf(` `)+1)),u=i?e.width/i:e.width,d=a?e.height/a:e.height;return{width:u,height:d,top:l,right:c+u,bottom:l+d,left:c}}var vf={ignoreTransform:!1};function yf(e,t){t===void 0&&(t=vf);let n=e.getBoundingClientRect();if(t.ignoreTransform){let{transform:t,transformOrigin:r}=vd(e).getComputedStyle(e);t&&(n=_f(n,t,r))}let{top:r,left:i,width:a,height:o,bottom:s,right:c}=n;return{top:r,left:i,width:a,height:o,bottom:s,right:c}}function bf(e){return yf(e,{ignoreTransform:!0})}function xf(e){let t=e.innerWidth,n=e.innerHeight;return{top:0,left:0,right:t,bottom:n,width:t,height:n}}function Sf(e,t){return t===void 0&&(t=vd(e).getComputedStyle(e)),t.position===`fixed`}function Cf(e,t){t===void 0&&(t=vd(e).getComputedStyle(e));let n=/(auto|scroll|overlay)/;return[`overflow`,`overflowX`,`overflowY`].some(e=>{let r=t[e];return typeof r==`string`?n.test(r):!1})}function wf(e,t){let n=[];function r(i){if(t!=null&&n.length>=t||!i)return n;if(yd(i)&&i.scrollingElement!=null&&!n.includes(i.scrollingElement))return n.push(i.scrollingElement),n;if(!bd(i)||xd(i)||n.includes(i))return n;let a=vd(e).getComputedStyle(i);return i!==e&&Cf(i,a)&&n.push(i),Sf(i,a)?n:r(i.parentNode)}return e?r(e):n}function Tf(e){let[t]=wf(e,1);return t??null}function Ef(e){return!hd||!e?null:gd(e)?e:_d(e)?yd(e)||e===Sd(e).scrollingElement?window:bd(e)?e:null:null}function Df(e){return gd(e)?e.scrollX:e.scrollLeft}function Of(e){return gd(e)?e.scrollY:e.scrollTop}function kf(e){return{x:Df(e),y:Of(e)}}var Af;(function(e){e[e.Forward=1]=`Forward`,e[e.Backward=-1]=`Backward`})(Af||={});function jf(e){return!hd||!e?!1:e===document.scrollingElement}function Mf(e){let t={x:0,y:0},n=jf(e)?{height:window.innerHeight,width:window.innerWidth}:{height:e.clientHeight,width:e.clientWidth},r={x:e.scrollWidth-n.width,y:e.scrollHeight-n.height};return{isTop:e.scrollTop<=t.y,isLeft:e.scrollLeft<=t.x,isBottom:e.scrollTop>=r.y,isRight:e.scrollLeft>=r.x,maxScroll:r,minScroll:t}}var Nf={x:.2,y:.2};function Pf(e,t,n,r,i){let{top:a,left:o,right:s,bottom:c}=n;r===void 0&&(r=10),i===void 0&&(i=Nf);let{isTop:l,isBottom:u,isLeft:d,isRight:f}=Mf(e),p={x:0,y:0},m={x:0,y:0},h={height:t.height*i.y,width:t.width*i.x};return!l&&a<=t.top+h.height?(p.y=Af.Backward,m.y=r*Math.abs((t.top+h.height-a)/h.height)):!u&&c>=t.bottom-h.height&&(p.y=Af.Forward,m.y=r*Math.abs((t.bottom-h.height-c)/h.height)),!f&&s>=t.right-h.width?(p.x=Af.Forward,m.x=r*Math.abs((t.right-h.width-s)/h.width)):!d&&o<=t.left+h.width&&(p.x=Af.Backward,m.x=r*Math.abs((t.left+h.width-o)/h.width)),{direction:p,speed:m}}function Ff(e){if(e===document.scrollingElement){let{innerWidth:e,innerHeight:t}=window;return{top:0,left:0,right:e,bottom:t,width:e,height:t}}let{top:t,left:n,right:r,bottom:i}=e.getBoundingClientRect();return{top:t,left:n,right:r,bottom:i,width:e.clientWidth,height:e.clientHeight}}function If(e){return e.reduce((e,t)=>Nd(e,kf(t)),nf)}function Lf(e){return e.reduce((e,t)=>e+Df(t),0)}function Rf(e){return e.reduce((e,t)=>e+Of(t),0)}function zf(e,t){if(t===void 0&&(t=yf),!e)return;let{top:n,left:r,bottom:i,right:a}=t(e);Tf(e)&&(i<=0||a<=0||n>=window.innerHeight||r>=window.innerWidth)&&e.scrollIntoView({block:`center`,inline:`center`})}var Bf=[[`x`,[`left`,`right`],Lf],[`y`,[`top`,`bottom`],Rf]],Vf=class{constructor(e,t){this.rect=void 0,this.width=void 0,this.height=void 0,this.top=void 0,this.bottom=void 0,this.right=void 0,this.left=void 0;let n=wf(t),r=If(n);this.rect={...e},this.width=e.width,this.height=e.height;for(let[e,t,i]of Bf)for(let a of t)Object.defineProperty(this,a,{get:()=>{let t=i(n),o=r[e]-t;return this.rect[a]+o},enumerable:!0});Object.defineProperty(this,`rect`,{enumerable:!1})}},Hf=class{constructor(e){this.target=void 0,this.listeners=[],this.removeAll=()=>{this.listeners.forEach(e=>this.target?.removeEventListener(...e))},this.target=e}add(e,t,n){var r;(r=this.target)==null||r.addEventListener(e,t,n),this.listeners.push([e,t,n])}};function Uf(e){let{EventTarget:t}=vd(e);return e instanceof t?e:Sd(e)}function Wf(e,t){let n=Math.abs(e.x),r=Math.abs(e.y);return typeof t==`number`?Math.sqrt(n**2+r**2)>t:`x`in t&&`y`in t?n>t.x&&r>t.y:`x`in t?n>t.x:`y`in t?r>t.y:!1}var Gf;(function(e){e.Click=`click`,e.DragStart=`dragstart`,e.Keydown=`keydown`,e.ContextMenu=`contextmenu`,e.Resize=`resize`,e.SelectionChange=`selectionchange`,e.VisibilityChange=`visibilitychange`})(Gf||={});function Kf(e){e.preventDefault()}function qf(e){e.stopPropagation()}var Jf;(function(e){e.Space=`Space`,e.Down=`ArrowDown`,e.Right=`ArrowRight`,e.Left=`ArrowLeft`,e.Up=`ArrowUp`,e.Esc=`Escape`,e.Enter=`Enter`,e.Tab=`Tab`})(Jf||={});var Yf={start:[Jf.Space,Jf.Enter],cancel:[Jf.Esc],end:[Jf.Space,Jf.Enter,Jf.Tab]},Xf=(e,t)=>{let{currentCoordinates:n}=t;switch(e.code){case Jf.Right:return{...n,x:n.x+25};case Jf.Left:return{...n,x:n.x-25};case Jf.Down:return{...n,y:n.y+25};case Jf.Up:return{...n,y:n.y-25}}},Zf=class{constructor(e){this.props=void 0,this.autoScrollEnabled=!1,this.referenceCoordinates=void 0,this.listeners=void 0,this.windowListeners=void 0,this.props=e;let{event:{target:t}}=e;this.props=e,this.listeners=new Hf(Sd(t)),this.windowListeners=new Hf(vd(t)),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleCancel=this.handleCancel.bind(this),this.attach()}attach(){this.handleStart(),this.windowListeners.add(Gf.Resize,this.handleCancel),this.windowListeners.add(Gf.VisibilityChange,this.handleCancel),setTimeout(()=>this.listeners.add(Gf.Keydown,this.handleKeyDown))}handleStart(){let{activeNode:e,onStart:t}=this.props,n=e.node.current;n&&zf(n),t(nf)}handleKeyDown(e){if(Id(e)){let{active:t,context:n,options:r}=this.props,{keyboardCodes:i=Yf,coordinateGetter:a=Xf,scrollBehavior:o=`smooth`}=r,{code:s}=e;if(i.end.includes(s)){this.handleEnd(e);return}if(i.cancel.includes(s)){this.handleCancel(e);return}let{collisionRect:c}=n.current,l=c?{x:c.left,y:c.top}:nf;this.referenceCoordinates||=l;let u=a(e,{active:t,context:n.current,currentCoordinates:l});if(u){let t=Pd(u,l),r={x:0,y:0},{scrollableAncestors:i}=n.current;for(let n of i){let i=e.code,{isTop:a,isRight:s,isLeft:c,isBottom:l,maxScroll:d,minScroll:f}=Mf(n),p=Ff(n),m={x:Math.min(i===Jf.Right?p.right-p.width/2:p.right,Math.max(i===Jf.Right?p.left:p.left+p.width/2,u.x)),y:Math.min(i===Jf.Down?p.bottom-p.height/2:p.bottom,Math.max(i===Jf.Down?p.top:p.top+p.height/2,u.y))},h=i===Jf.Right&&!s||i===Jf.Left&&!c,g=i===Jf.Down&&!l||i===Jf.Up&&!a;if(h&&m.x!==u.x){let e=n.scrollLeft+t.x,a=i===Jf.Right&&e<=d.x||i===Jf.Left&&e>=f.x;if(a&&!t.y){n.scrollTo({left:e,behavior:o});return}a?r.x=n.scrollLeft-e:r.x=i===Jf.Right?n.scrollLeft-d.x:n.scrollLeft-f.x,r.x&&n.scrollBy({left:-r.x,behavior:o});break}else if(g&&m.y!==u.y){let e=n.scrollTop+t.y,a=i===Jf.Down&&e<=d.y||i===Jf.Up&&e>=f.y;if(a&&!t.x){n.scrollTo({top:e,behavior:o});return}a?r.y=n.scrollTop-e:r.y=i===Jf.Down?n.scrollTop-d.y:n.scrollTop-f.y,r.y&&n.scrollBy({top:-r.y,behavior:o});break}}this.handleMove(e,Nd(Pd(u,this.referenceCoordinates),r))}}}handleMove(e,t){let{onMove:n}=this.props;e.preventDefault(),n(t)}handleEnd(e){let{onEnd:t}=this.props;e.preventDefault(),this.detach(),t()}handleCancel(e){let{onCancel:t}=this.props;e.preventDefault(),this.detach(),t()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll()}};Zf.activators=[{eventName:`onKeyDown`,handler:(e,t,n)=>{let{keyboardCodes:r=Yf,onActivation:i}=t,{active:a}=n,{code:o}=e.nativeEvent;if(r.start.includes(o)){let t=a.activatorNode.current;return t&&e.target!==t?!1:(e.preventDefault(),i?.({event:e.nativeEvent}),!0)}return!1}}];function Qf(e){return!!(e&&`distance`in e)}function $f(e){return!!(e&&`delay`in e)}var ep=class{constructor(e,t,n){n===void 0&&(n=Uf(e.event.target)),this.props=void 0,this.events=void 0,this.autoScrollEnabled=!0,this.document=void 0,this.activated=!1,this.initialCoordinates=void 0,this.timeoutId=null,this.listeners=void 0,this.documentListeners=void 0,this.windowListeners=void 0,this.props=e,this.events=t;let{event:r}=e,{target:i}=r;this.props=e,this.events=t,this.document=Sd(i),this.documentListeners=new Hf(this.document),this.listeners=new Hf(n),this.windowListeners=new Hf(vd(i)),this.initialCoordinates=Rd(r)??nf,this.handleStart=this.handleStart.bind(this),this.handleMove=this.handleMove.bind(this),this.handleEnd=this.handleEnd.bind(this),this.handleCancel=this.handleCancel.bind(this),this.handleKeydown=this.handleKeydown.bind(this),this.removeTextSelection=this.removeTextSelection.bind(this),this.attach()}attach(){let{events:e,props:{options:{activationConstraint:t,bypassActivationConstraint:n}}}=this;if(this.listeners.add(e.move.name,this.handleMove,{passive:!1}),this.listeners.add(e.end.name,this.handleEnd),e.cancel&&this.listeners.add(e.cancel.name,this.handleCancel),this.windowListeners.add(Gf.Resize,this.handleCancel),this.windowListeners.add(Gf.DragStart,Kf),this.windowListeners.add(Gf.VisibilityChange,this.handleCancel),this.windowListeners.add(Gf.ContextMenu,Kf),this.documentListeners.add(Gf.Keydown,this.handleKeydown),t){if(n!=null&&n({event:this.props.event,activeNode:this.props.activeNode,options:this.props.options}))return this.handleStart();if($f(t)){this.timeoutId=setTimeout(this.handleStart,t.delay),this.handlePending(t);return}if(Qf(t)){this.handlePending(t);return}}this.handleStart()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll(),setTimeout(this.documentListeners.removeAll,50),this.timeoutId!==null&&(clearTimeout(this.timeoutId),this.timeoutId=null)}handlePending(e,t){let{active:n,onPending:r}=this.props;r(n,e,this.initialCoordinates,t)}handleStart(){let{initialCoordinates:e}=this,{onStart:t}=this.props;e&&(this.activated=!0,this.documentListeners.add(Gf.Click,qf,{capture:!0}),this.removeTextSelection(),this.documentListeners.add(Gf.SelectionChange,this.removeTextSelection),t(e))}handleMove(e){let{activated:t,initialCoordinates:n,props:r}=this,{onMove:i,options:{activationConstraint:a}}=r;if(!n)return;let o=Rd(e)??nf,s=Pd(n,o);if(!t&&a){if(Qf(a)){if(a.tolerance!=null&&Wf(s,a.tolerance))return this.handleCancel();if(Wf(s,a.distance))return this.handleStart()}if($f(a)&&Wf(s,a.tolerance))return this.handleCancel();this.handlePending(a,s);return}e.cancelable&&e.preventDefault(),i(o)}handleEnd(){let{onAbort:e,onEnd:t}=this.props;this.detach(),this.activated||e(this.props.active),t()}handleCancel(){let{onAbort:e,onCancel:t}=this.props;this.detach(),this.activated||e(this.props.active),t()}handleKeydown(e){e.code===Jf.Esc&&this.handleCancel()}removeTextSelection(){var e;(e=this.document.getSelection())==null||e.removeAllRanges()}},tp={cancel:{name:`pointercancel`},move:{name:`pointermove`},end:{name:`pointerup`}},np=class extends ep{constructor(e){let{event:t}=e,n=Sd(t.target);super(e,tp,n)}};np.activators=[{eventName:`onPointerDown`,handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t;return!n.isPrimary||n.button!==0?!1:(r?.({event:n}),!0)}}];var rp={move:{name:`mousemove`},end:{name:`mouseup`}},ip;(function(e){e[e.RightClick=2]=`RightClick`})(ip||={});var ap=class extends ep{constructor(e){super(e,rp,Sd(e.event.target))}};ap.activators=[{eventName:`onMouseDown`,handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t;return n.button===ip.RightClick?!1:(r?.({event:n}),!0)}}];var op={cancel:{name:`touchcancel`},move:{name:`touchmove`},end:{name:`touchend`}},sp=class extends ep{constructor(e){super(e,op)}static setup(){return window.addEventListener(op.move.name,e,{capture:!1,passive:!1}),function(){window.removeEventListener(op.move.name,e)};function e(){}}};sp.activators=[{eventName:`onTouchStart`,handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t,{touches:i}=n;return i.length>1?!1:(r?.({event:n}),!0)}}];var cp;(function(e){e[e.Pointer=0]=`Pointer`,e[e.DraggableRect=1]=`DraggableRect`})(cp||={});var lp;(function(e){e[e.TreeOrder=0]=`TreeOrder`,e[e.ReversedTreeOrder=1]=`ReversedTreeOrder`})(lp||={});function up(e){let{acceleration:t,activator:n=cp.Pointer,canScroll:r,draggingRect:i,enabled:a,interval:o=5,order:s=lp.TreeOrder,pointerCoordinates:c,scrollableAncestors:l,scrollableAncestorRects:u,delta:d,threshold:f}=e,p=fp({delta:d,disabled:!a}),[m,h]=Td(),g=(0,x.useRef)({x:0,y:0}),_=(0,x.useRef)({x:0,y:0}),v=(0,x.useMemo)(()=>{switch(n){case cp.Pointer:return c?{top:c.y,bottom:c.y,left:c.x,right:c.x}:null;case cp.DraggableRect:return i}},[n,i,c]),y=(0,x.useRef)(null),b=(0,x.useCallback)(()=>{let e=y.current;if(!e)return;let t=g.current.x*_.current.x,n=g.current.y*_.current.y;e.scrollBy(t,n)},[]),S=(0,x.useMemo)(()=>s===lp.TreeOrder?[...l].reverse():l,[s,l]);(0,x.useEffect)(()=>{if(!a||!l.length||!v){h();return}for(let e of S){if(r?.(e)===!1)continue;let n=u[l.indexOf(e)];if(!n)continue;let{direction:i,speed:a}=Pf(e,n,v,t,f);for(let e of[`x`,`y`])p[e][i[e]]||(a[e]=0,i[e]=0);if(a.x>0||a.y>0){h(),y.current=e,m(b,o),g.current=a,_.current=i;return}}g.current={x:0,y:0},_.current={x:0,y:0},h()},[t,b,r,h,a,o,JSON.stringify(v),JSON.stringify(p),m,l,S,u,JSON.stringify(f)])}var dp={x:{[Af.Backward]:!1,[Af.Forward]:!1},y:{[Af.Backward]:!1,[Af.Forward]:!1}};function fp(e){let{delta:t,disabled:n}=e,r=kd(t);return Dd(e=>{if(n||!r||!e)return dp;let i={x:Math.sign(t.x-r.x),y:Math.sign(t.y-r.y)};return{x:{[Af.Backward]:e.x[Af.Backward]||i.x===-1,[Af.Forward]:e.x[Af.Forward]||i.x===1},y:{[Af.Backward]:e.y[Af.Backward]||i.y===-1,[Af.Forward]:e.y[Af.Forward]||i.y===1}}},[n,t,r])}function pp(e,t){let n=t==null?void 0:e.get(t),r=n?n.node.current:null;return Dd(e=>t==null?null:r??e??null,[r,t])}function mp(e,t){return(0,x.useMemo)(()=>e.reduce((e,n)=>{let{sensor:r}=n,i=r.activators.map(e=>({eventName:e.eventName,handler:t(e.handler,n)}));return[...e,...i]},[]),[e,t])}var hp;(function(e){e[e.Always=0]=`Always`,e[e.BeforeDragging=1]=`BeforeDragging`,e[e.WhileDragging=2]=`WhileDragging`})(hp||={});var gp;(function(e){e.Optimized=`optimized`})(gp||={});var _p=new Map;function vp(e,t){let{dragging:n,dependencies:r,config:i}=t,[a,o]=(0,x.useState)(null),{frequency:s,measure:c,strategy:l}=i,u=(0,x.useRef)(e),d=g(),f=Ed(d),p=(0,x.useCallback)(function(e){e===void 0&&(e=[]),!f.current&&o(t=>t===null?e:t.concat(e.filter(e=>!t.includes(e))))},[f]),m=(0,x.useRef)(null),h=Dd(t=>{if(d&&!n)return _p;if(!t||t===_p||u.current!==e||a!=null){let t=new Map;for(let n of e){if(!n)continue;if(a&&a.length>0&&!a.includes(n.id)&&n.rect.current){t.set(n.id,n.rect.current);continue}let e=n.node.current,r=e?new Vf(c(e),e):null;n.rect.current=r,r&&t.set(n.id,r)}return t}return t},[e,a,n,d,c]);return(0,x.useEffect)(()=>{u.current=e},[e]),(0,x.useEffect)(()=>{d||p()},[n,d]),(0,x.useEffect)(()=>{a&&a.length>0&&o(null)},[JSON.stringify(a)]),(0,x.useEffect)(()=>{d||typeof s!=`number`||m.current!==null||(m.current=setTimeout(()=>{p(),m.current=null},s))},[s,d,p,...r]),{droppableRects:h,measureDroppableContainers:p,measuringScheduled:a!=null};function g(){switch(l){case hp.Always:return!1;case hp.BeforeDragging:return n;default:return!n}}}function yp(e,t){return Dd(n=>e?n||(typeof t==`function`?t(e):e):null,[t,e])}function bp(e,t){return yp(e,t)}function xp(e){let{callback:t,disabled:n}=e,r=wd(t),i=(0,x.useMemo)(()=>{if(n||typeof window>`u`||window.MutationObserver===void 0)return;let{MutationObserver:e}=window;return new e(r)},[r,n]);return(0,x.useEffect)(()=>()=>i?.disconnect(),[i]),i}function Sp(e){let{callback:t,disabled:n}=e,r=wd(t),i=(0,x.useMemo)(()=>{if(n||typeof window>`u`||window.ResizeObserver===void 0)return;let{ResizeObserver:e}=window;return new e(r)},[n]);return(0,x.useEffect)(()=>()=>i?.disconnect(),[i]),i}function Cp(e){return new Vf(yf(e),e)}function wp(e,t,n){t===void 0&&(t=Cp);let[r,i]=(0,x.useState)(null);function a(){i(r=>{if(!e)return null;if(e.isConnected===!1)return r??n??null;let i=t(e);return JSON.stringify(r)===JSON.stringify(i)?r:i})}let o=xp({callback(t){if(e)for(let n of t){let{type:t,target:r}=n;if(t===`childList`&&r instanceof HTMLElement&&r.contains(e)){a();break}}}}),s=Sp({callback:a});return Cd(()=>{a(),e?(s?.observe(e),o?.observe(document.body,{childList:!0,subtree:!0})):(s?.disconnect(),o?.disconnect())},[e]),r}function Tp(e){return pf(e,yp(e))}var Ep=[];function Dp(e){let t=(0,x.useRef)(e),n=Dd(n=>e?n&&n!==Ep&&e&&t.current&&e.parentNode===t.current.parentNode?n:wf(e):Ep,[e]);return(0,x.useEffect)(()=>{t.current=e},[e]),n}function Op(e){let[t,n]=(0,x.useState)(null),r=(0,x.useRef)(e),i=(0,x.useCallback)(e=>{let t=Ef(e.target);t&&n(e=>e?(e.set(t,kf(t)),new Map(e)):null)},[]);return(0,x.useEffect)(()=>{let t=r.current;if(e!==t){a(t);let o=e.map(e=>{let t=Ef(e);return t?(t.addEventListener(`scroll`,i,{passive:!0}),[t,kf(t)]):null}).filter(e=>e!=null);n(o.length?new Map(o):null),r.current=e}return()=>{a(e),a(t)};function a(e){e.forEach(e=>{Ef(e)?.removeEventListener(`scroll`,i)})}},[i,e]),(0,x.useMemo)(()=>e.length?t?Array.from(t.values()).reduce((e,t)=>Nd(e,t),nf):If(e):nf,[e,t])}function kp(e,t){t===void 0&&(t=[]);let n=(0,x.useRef)(null);return(0,x.useEffect)(()=>{n.current=null},t),(0,x.useEffect)(()=>{let t=e!==nf;t&&!n.current&&(n.current=e),!t&&n.current&&(n.current=null)},[e]),n.current?Pd(e,n.current):nf}function Ap(e){(0,x.useEffect)(()=>{if(!hd)return;let t=e.map(e=>{let{sensor:t}=e;return t.setup==null?void 0:t.setup()});return()=>{for(let e of t)e?.()}},e.map(e=>{let{sensor:t}=e;return t}))}function jp(e,t){return(0,x.useMemo)(()=>e.reduce((e,n)=>{let{eventName:r,handler:i}=n;return e[r]=e=>{i(e,t)},e},{}),[e,t])}function Mp(e){return(0,x.useMemo)(()=>e?xf(e):null,[e])}var Np=[];function Pp(e,t){t===void 0&&(t=yf);let[n]=e,r=Mp(n?vd(n):null),[i,a]=(0,x.useState)(Np);function o(){a(()=>e.length?e.map(e=>jf(e)?r:new Vf(t(e),e)):Np)}let s=Sp({callback:o});return Cd(()=>{s?.disconnect(),o(),e.forEach(e=>s?.observe(e))},[e]),i}function Fp(e){if(!e)return null;if(e.children.length>1)return e;let t=e.children[0];return bd(t)?t:e}function Ip(e){let{measure:t}=e,[n,r]=(0,x.useState)(null),i=Sp({callback:(0,x.useCallback)(e=>{for(let{target:n}of e)if(bd(n)){r(e=>{let r=t(n);return e?{...e,width:r.width,height:r.height}:r});break}},[t])}),[a,o]=Od((0,x.useCallback)(e=>{let n=Fp(e);i?.disconnect(),n&&i?.observe(n),r(n?t(n):null)},[t,i]));return(0,x.useMemo)(()=>({nodeRef:a,rect:n,setRef:o}),[n,a,o])}var Lp=[{sensor:np,options:{}},{sensor:Zf,options:{}}],Rp={current:{}},zp={draggable:{measure:bf},droppable:{measure:bf,strategy:hp.WhileDragging,frequency:gp.Optimized},dragOverlay:{measure:yf}},Bp=class extends Map{get(e){return e==null?void 0:super.get(e)??void 0}toArray(){return Array.from(this.values())}getEnabled(){return this.toArray().filter(e=>{let{disabled:t}=e;return!t})}getNodeFor(e){return this.get(e)?.node.current??void 0}},Vp={activatorEvent:null,active:null,activeNode:null,activeNodeRect:null,collisions:null,containerNodeRect:null,draggableNodes:new Map,droppableRects:new Map,droppableContainers:new Bp,over:null,dragOverlay:{nodeRef:{current:null},rect:null,setRef:$d},scrollableAncestors:[],scrollableAncestorRects:[],measuringConfiguration:zp,measureDroppableContainers:$d,windowRect:null,measuringScheduled:!1},Hp={activatorEvent:null,activators:[],active:null,activeNodeRect:null,ariaDescribedById:{draggable:``},dispatch:$d,draggableNodes:new Map,over:null,measureDroppableContainers:$d},Up=(0,x.createContext)(Hp),Wp=(0,x.createContext)(Vp);function Gp(){return{draggable:{active:null,initialCoordinates:{x:0,y:0},nodes:new Map,translate:{x:0,y:0}},droppable:{containers:new Bp}}}function Kp(e,t){switch(t.type){case Qd.DragStart:return{...e,draggable:{...e.draggable,initialCoordinates:t.initialCoordinates,active:t.active}};case Qd.DragMove:return e.draggable.active==null?e:{...e,draggable:{...e.draggable,translate:{x:t.coordinates.x-e.draggable.initialCoordinates.x,y:t.coordinates.y-e.draggable.initialCoordinates.y}}};case Qd.DragEnd:case Qd.DragCancel:return{...e,draggable:{...e.draggable,active:null,initialCoordinates:{x:0,y:0},translate:{x:0,y:0}}};case Qd.RegisterDroppable:{let{element:n}=t,{id:r}=n,i=new Bp(e.droppable.containers);return i.set(r,n),{...e,droppable:{...e.droppable,containers:i}}}case Qd.SetDroppableDisabled:{let{id:n,key:r,disabled:i}=t,a=e.droppable.containers.get(n);if(!a||r!==a.key)return e;let o=new Bp(e.droppable.containers);return o.set(n,{...a,disabled:i}),{...e,droppable:{...e.droppable,containers:o}}}case Qd.UnregisterDroppable:{let{id:n,key:r}=t,i=e.droppable.containers.get(n);if(!i||r!==i.key)return e;let a=new Bp(e.droppable.containers);return a.delete(n),{...e,droppable:{...e.droppable,containers:a}}}default:return e}}function qp(e){let{disabled:t}=e,{active:n,activatorEvent:r,draggableNodes:i}=(0,x.useContext)(Up),a=kd(r),o=kd(n?.id);return(0,x.useEffect)(()=>{if(!t&&!r&&a&&o!=null){if(!Id(a)||document.activeElement===a.target)return;let e=i.get(o);if(!e)return;let{activatorNode:t,node:n}=e;if(!t.current&&!n.current)return;requestAnimationFrame(()=>{for(let e of[t.current,n.current]){if(!e)continue;let t=Vd(e);if(t){t.focus();break}}})}},[r,t,i,o,a]),null}function Jp(e,t){let{transform:n,...r}=t;return e!=null&&e.length?e.reduce((e,t)=>t({transform:e,...r}),n):n}function Yp(e){return(0,x.useMemo)(()=>({draggable:{...zp.draggable,...e?.draggable},droppable:{...zp.droppable,...e?.droppable},dragOverlay:{...zp.dragOverlay,...e?.dragOverlay}}),[e?.draggable,e?.droppable,e?.dragOverlay])}function Xp(e){let{activeNode:t,measure:n,initialRect:r,config:i=!0}=e,a=(0,x.useRef)(!1),{x:o,y:s}=typeof i==`boolean`?{x:i,y:i}:i;Cd(()=>{if(!o&&!s||!t){a.current=!1;return}if(a.current||!r)return;let e=t?.node.current;if(!e||e.isConnected===!1)return;let i=pf(n(e),r);if(o||(i.x=0),s||(i.y=0),a.current=!0,Math.abs(i.x)>0||Math.abs(i.y)>0){let t=Tf(e);t&&t.scrollBy({top:i.y,left:i.x})}},[t,o,s,r,n])}var Zp=(0,x.createContext)({...nf,scaleX:1,scaleY:1}),Qp;(function(e){e[e.Uninitialized=0]=`Uninitialized`,e[e.Initializing=1]=`Initializing`,e[e.Initialized=2]=`Initialized`})(Qp||={});var $p=(0,x.memo)(function(e){let{id:t,accessibility:n,autoScroll:r=!0,children:i,sensors:a=Lp,collisionDetection:o=df,measuring:s,modifiers:c,...l}=e,[u,d]=(0,x.useReducer)(Kp,void 0,Gp),[f,p]=Jd(),[m,h]=(0,x.useState)(Qp.Uninitialized),g=m===Qp.Initialized,{draggable:{active:_,nodes:v,translate:y},droppable:{containers:b}}=u,S=_==null?null:v.get(_),C=(0,x.useRef)({initial:null,translated:null}),w=(0,x.useMemo)(()=>_==null?null:{id:_,data:S?.data??Rp,rect:C},[_,S]),T=(0,x.useRef)(null),[E,D]=(0,x.useState)(null),[O,k]=(0,x.useState)(null),A=Ed(l,Object.values(l)),j=jd(`DndDescribedBy`,t),M=(0,x.useMemo)(()=>b.getEnabled(),[b]),N=Yp(s),{droppableRects:P,measureDroppableContainers:F,measuringScheduled:I}=vp(M,{dragging:g,dependencies:[y.x,y.y],config:N.droppable}),L=pp(v,_),ee=(0,x.useMemo)(()=>O?Rd(O):null,[O]),R=De(),z=bp(L,N.draggable.measure);Xp({activeNode:_==null?null:v.get(_),config:R.layoutShiftCompensation,initialRect:z,measure:N.draggable.measure});let B=wp(L,N.draggable.measure,z),te=wp(L?L.parentElement:null),V=(0,x.useRef)({activatorEvent:null,active:null,activeNode:L,collisionRect:null,collisions:null,droppableRects:P,draggableNodes:v,draggingNode:null,draggingNodeRect:null,droppableContainers:b,over:null,scrollableAncestors:[],scrollAdjustedTranslate:null}),ne=b.getNodeFor(V.current.over?.id),H=Ip({measure:N.dragOverlay.measure}),re=H.nodeRef.current??L,ie=g?H.rect??B:null,ae=!!(H.nodeRef.current&&H.rect),oe=Tp(ae?null:B),se=Mp(re?vd(re):null),ce=Dp(g?ne??L:null),le=Pp(ce),ue=Jp(c,{transform:{x:y.x-oe.x,y:y.y-oe.y,scaleX:1,scaleY:1},activatorEvent:O,active:w,activeNodeRect:B,containerNodeRect:te,draggingNodeRect:ie,over:V.current.over,overlayNodeRect:H.rect,scrollableAncestors:ce,scrollableAncestorRects:le,windowRect:se}),de=ee?Nd(ee,y):null,fe=Op(ce),pe=kp(fe),me=kp(fe,[B]),he=Nd(ue,pe),ge=ie?hf(ie,ue):null,_e=w&&ge?o({active:w,collisionRect:ge,droppableRects:P,droppableContainers:M,pointerCoordinates:de}):null,ve=sf(_e,`id`),[ye,be]=(0,x.useState)(null),xe=ff(ae?ue:Nd(ue,me),ye?.rect??null,B),Se=(0,x.useRef)(null),Ce=(0,x.useCallback)((e,t)=>{let{sensor:n,options:r}=t;if(T.current==null)return;let i=v.get(T.current);if(!i)return;let a=e.nativeEvent;Se.current=new n({active:T.current,activeNode:i,event:a,options:r,context:V,onAbort(e){if(!v.get(e))return;let{onDragAbort:t}=A.current,n={id:e};t?.(n),f({type:`onDragAbort`,event:n})},onPending(e,t,n,r){if(!v.get(e))return;let{onDragPending:i}=A.current,a={id:e,constraint:t,initialCoordinates:n,offset:r};i?.(a),f({type:`onDragPending`,event:a})},onStart(e){let t=T.current;if(t==null)return;let n=v.get(t);if(!n)return;let{onDragStart:r}=A.current,i={activatorEvent:a,active:{id:t,data:n.data,rect:C}};(0,U.unstable_batchedUpdates)(()=>{r?.(i),h(Qp.Initializing),d({type:Qd.DragStart,initialCoordinates:e,active:t}),f({type:`onDragStart`,event:i}),D(Se.current),k(a)})},onMove(e){d({type:Qd.DragMove,coordinates:e})},onEnd:o(Qd.DragEnd),onCancel:o(Qd.DragCancel)});function o(e){return async function(){let{active:t,collisions:n,over:r,scrollAdjustedTranslate:i}=V.current,o=null;if(t&&i){let{cancelDrop:s}=A.current;o={activatorEvent:a,active:t,collisions:n,delta:i,over:r},e===Qd.DragEnd&&typeof s==`function`&&await Promise.resolve(s(o))&&(e=Qd.DragCancel)}T.current=null,(0,U.unstable_batchedUpdates)(()=>{d({type:e}),h(Qp.Uninitialized),be(null),D(null),k(null),Se.current=null;let t=e===Qd.DragEnd?`onDragEnd`:`onDragCancel`;if(o){let e=A.current[t];e?.(o),f({type:t,event:o})}})}}},[v]),we=mp(a,(0,x.useCallback)((e,t)=>(n,r)=>{let i=n.nativeEvent,a=v.get(r);if(T.current!==null||!a||i.dndKit||i.defaultPrevented)return;let o={active:a};e(n,t.options,o)===!0&&(i.dndKit={capturedBy:t.sensor},T.current=r,Ce(n,t))},[v,Ce]));Ap(a),Cd(()=>{B&&m===Qp.Initializing&&h(Qp.Initialized)},[B,m]),(0,x.useEffect)(()=>{let{onDragMove:e}=A.current,{active:t,activatorEvent:n,collisions:r,over:i}=V.current;if(!t||!n)return;let a={active:t,activatorEvent:n,collisions:r,delta:{x:he.x,y:he.y},over:i};(0,U.unstable_batchedUpdates)(()=>{e?.(a),f({type:`onDragMove`,event:a})})},[he.x,he.y]),(0,x.useEffect)(()=>{let{active:e,activatorEvent:t,collisions:n,droppableContainers:r,scrollAdjustedTranslate:i}=V.current;if(!e||T.current==null||!t||!i)return;let{onDragOver:a}=A.current,o=r.get(ve),s=o&&o.rect.current?{id:o.id,rect:o.rect.current,data:o.data,disabled:o.disabled}:null,c={active:e,activatorEvent:t,collisions:n,delta:{x:i.x,y:i.y},over:s};(0,U.unstable_batchedUpdates)(()=>{be(s),a?.(c),f({type:`onDragOver`,event:c})})},[ve]),Cd(()=>{V.current={activatorEvent:O,active:w,activeNode:L,collisionRect:ge,collisions:_e,droppableRects:P,draggableNodes:v,draggingNode:re,draggingNodeRect:ie,droppableContainers:b,over:ye,scrollableAncestors:ce,scrollAdjustedTranslate:he},C.current={initial:ie,translated:ge}},[w,L,_e,ge,v,re,ie,P,b,ye,ce,he]),up({...R,delta:y,draggingRect:ge,pointerCoordinates:de,scrollableAncestors:ce,scrollableAncestorRects:le});let Te=(0,x.useMemo)(()=>({active:w,activeNode:L,activeNodeRect:B,activatorEvent:O,collisions:_e,containerNodeRect:te,dragOverlay:H,draggableNodes:v,droppableContainers:b,droppableRects:P,over:ye,measureDroppableContainers:F,scrollableAncestors:ce,scrollableAncestorRects:le,measuringConfiguration:N,measuringScheduled:I,windowRect:se}),[w,L,B,O,_e,te,H,v,b,P,ye,F,ce,le,N,I,se]),Ee=(0,x.useMemo)(()=>({activatorEvent:O,activators:we,active:w,activeNodeRect:B,ariaDescribedById:{draggable:j},dispatch:d,draggableNodes:v,over:ye,measureDroppableContainers:F}),[O,we,w,B,d,j,v,ye,F]);return x.createElement(Kd.Provider,{value:p},x.createElement(Up.Provider,{value:Ee},x.createElement(Wp.Provider,{value:Te},x.createElement(Zp.Provider,{value:xe},i)),x.createElement(qp,{disabled:n?.restoreFocus===!1})),x.createElement(Zd,{...n,hiddenTextDescribedById:j}));function De(){let e=E?.autoScrollEnabled===!1,t=typeof r==`object`?r.enabled===!1:r===!1,n=g&&!e&&!t;return typeof r==`object`?{...r,enabled:n}:{enabled:n}}}),em=(0,x.createContext)(null),tm=`button`,nm=`Draggable`;function rm(e){let{id:t,data:n,disabled:r=!1,attributes:i}=e,a=jd(nm),{activators:o,activatorEvent:s,active:c,activeNodeRect:l,ariaDescribedById:u,draggableNodes:d,over:f}=(0,x.useContext)(Up),{role:p=tm,roleDescription:m=`draggable`,tabIndex:h=0}=i??{},g=c?.id===t,_=(0,x.useContext)(g?Zp:em),[v,y]=Od(),[b,S]=Od(),C=jp(o,t),w=Ed(n);return Cd(()=>(d.set(t,{id:t,key:a,node:v,activatorNode:b,data:w}),()=>{let e=d.get(t);e&&e.key===a&&d.delete(t)}),[d,t]),{active:c,activatorEvent:s,activeNodeRect:l,attributes:(0,x.useMemo)(()=>({role:p,tabIndex:h,"aria-disabled":r,"aria-pressed":g&&p===tm?!0:void 0,"aria-roledescription":m,"aria-describedby":u.draggable}),[r,p,h,g,m,u.draggable]),isDragging:g,listeners:r?void 0:C,node:v,over:f,setNodeRef:y,setActivatorNodeRef:S,transform:_}}function im(){return(0,x.useContext)(Wp)}var am=`Droppable`,om={timeout:25};function sm(e){let{data:t,disabled:n=!1,id:r,resizeObserverConfig:i}=e,a=jd(am),{active:o,dispatch:s,over:c,measureDroppableContainers:l}=(0,x.useContext)(Up),u=(0,x.useRef)({disabled:n}),d=(0,x.useRef)(!1),f=(0,x.useRef)(null),p=(0,x.useRef)(null),{disabled:m,updateMeasurementsFor:h,timeout:g}={...om,...i},_=Ed(h??r),v=Sp({callback:(0,x.useCallback)(()=>{if(!d.current){d.current=!0;return}p.current!=null&&clearTimeout(p.current),p.current=setTimeout(()=>{l(Array.isArray(_.current)?_.current:[_.current]),p.current=null},g)},[g]),disabled:m||!o}),[y,b]=Od((0,x.useCallback)((e,t)=>{v&&(t&&(v.unobserve(t),d.current=!1),e&&v.observe(e))},[v])),S=Ed(t);return(0,x.useEffect)(()=>{!v||!y.current||(v.disconnect(),d.current=!1,v.observe(y.current))},[y,v]),(0,x.useEffect)(()=>(s({type:Qd.RegisterDroppable,element:{id:r,key:a,disabled:n,node:y,rect:f,data:S}}),()=>s({type:Qd.UnregisterDroppable,key:a,id:r})),[r]),(0,x.useEffect)(()=>{n!==u.current.disabled&&(s({type:Qd.SetDroppableDisabled,id:r,key:a,disabled:n}),u.current.disabled=n)},[r,a,n,s]),{active:o,rect:f,isOver:c?.id===r,node:y,over:c,setNodeRef:b}}function cm(e,t,n){let r=e.slice();return r.splice(n<0?r.length+n:n,0,r.splice(t,1)[0]),r}function lm(e,t){return e.reduce((e,n,r)=>{let i=t.get(n);return i&&(e[r]=i),e},Array(e.length))}function um(e){return e!==null&&e>=0}function dm(e,t){if(e===t)return!0;if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}function fm(e){return typeof e==`boolean`?{draggable:e,droppable:e}:e}var pm=e=>{let{rects:t,activeIndex:n,overIndex:r,index:i}=e,a=cm(t,r,n),o=t[i],s=a[i];return!s||!o?null:{x:s.left-o.left,y:s.top-o.top,scaleX:s.width/o.width,scaleY:s.height/o.height}},mm={scaleX:1,scaleY:1},hm=e=>{let{activeIndex:t,activeNodeRect:n,index:r,rects:i,overIndex:a}=e,o=i[t]??n;if(!o)return null;if(r===t){let e=i[a];return e?{x:0,y:t<a?e.top+e.height-(o.top+o.height):e.top-o.top,...mm}:null}let s=gm(i,r,t);return r>t&&r<=a?{x:0,y:-o.height-s,...mm}:r<t&&r>=a?{x:0,y:o.height+s,...mm}:{x:0,y:0,...mm}};function gm(e,t,n){let r=e[t],i=e[t-1],a=e[t+1];return r?n<t?i?r.top-(i.top+i.height):a?a.top-(r.top+r.height):0:a?a.top-(r.top+r.height):i?r.top-(i.top+i.height):0:0}var _m=`Sortable`,vm=x.createContext({activeIndex:-1,containerId:_m,disableTransforms:!1,items:[],overIndex:-1,useDragOverlay:!1,sortedRects:[],strategy:pm,disabled:{draggable:!1,droppable:!1}});function ym(e){let{children:t,id:n,items:r,strategy:i=pm,disabled:a=!1}=e,{active:o,dragOverlay:s,droppableRects:c,over:l,measureDroppableContainers:u}=im(),d=jd(_m,n),f=s.rect!==null,p=(0,x.useMemo)(()=>r.map(e=>typeof e==`object`&&`id`in e?e.id:e),[r]),m=o!=null,h=o?p.indexOf(o.id):-1,g=l?p.indexOf(l.id):-1,_=(0,x.useRef)(p),v=!dm(p,_.current),y=g!==-1&&h===-1||v,b=fm(a);Cd(()=>{v&&m&&u(p)},[v,p,m,u]),(0,x.useEffect)(()=>{_.current=p},[p]);let S=(0,x.useMemo)(()=>({activeIndex:h,containerId:d,disabled:b,disableTransforms:y,items:p,overIndex:g,useDragOverlay:f,sortedRects:lm(p,c),strategy:i}),[h,d,b.draggable,b.droppable,y,p,g,c,f,i]);return x.createElement(vm.Provider,{value:S},t)}var bm=e=>{let{id:t,items:n,activeIndex:r,overIndex:i}=e;return cm(n,r,i).indexOf(t)},xm=e=>{let{containerId:t,isSorting:n,wasDragging:r,index:i,items:a,newIndex:o,previousItems:s,previousContainerId:c,transition:l}=e;return!l||!r||s!==a&&i===o?!1:n?!0:o!==i&&t===c},Sm={duration:200,easing:`ease`},Cm=`transform`,wm=zd.Transition.toString({property:Cm,duration:0,easing:`linear`}),Tm={roleDescription:`sortable`};function Em(e){let{disabled:t,index:n,node:r,rect:i}=e,[a,o]=(0,x.useState)(null),s=(0,x.useRef)(n);return Cd(()=>{if(!t&&n!==s.current&&r.current){let e=i.current;if(e){let t=yf(r.current,{ignoreTransform:!0}),n={x:e.left-t.left,y:e.top-t.top,scaleX:e.width/t.width,scaleY:e.height/t.height};(n.x||n.y)&&o(n)}}n!==s.current&&(s.current=n)},[t,n,r,i]),(0,x.useEffect)(()=>{a&&o(null)},[a]),a}function Dm(e){let{animateLayoutChanges:t=xm,attributes:n,disabled:r,data:i,getNewIndex:a=bm,id:o,strategy:s,resizeObserverConfig:c,transition:l=Sm}=e,{items:u,containerId:d,activeIndex:f,disabled:p,disableTransforms:m,sortedRects:h,overIndex:g,useDragOverlay:_,strategy:v}=(0,x.useContext)(vm),y=Om(r,p),b=u.indexOf(o),S=(0,x.useMemo)(()=>({sortable:{containerId:d,index:b,items:u},...i}),[d,i,b,u]),C=(0,x.useMemo)(()=>u.slice(u.indexOf(o)),[u,o]),{rect:w,node:T,isOver:E,setNodeRef:D}=sm({id:o,data:S,disabled:y.droppable,resizeObserverConfig:{updateMeasurementsFor:C,...c}}),{active:O,activatorEvent:k,activeNodeRect:A,attributes:j,setNodeRef:M,listeners:N,isDragging:P,over:F,setActivatorNodeRef:I,transform:L}=rm({id:o,data:S,attributes:{...Tm,...n},disabled:y.draggable}),ee=md(D,M),R=!!O,z=R&&!m&&um(f)&&um(g),B=!_&&P,te=z?(B&&z?L:null)??(s??v)({rects:h,activeNodeRect:A,activeIndex:f,overIndex:g,index:b}):null,V=um(f)&&um(g)?a({id:o,items:u,activeIndex:f,overIndex:g}):b,ne=O?.id,H=(0,x.useRef)({activeId:ne,items:u,newIndex:V,containerId:d}),re=u!==H.current.items,U=t({active:O,containerId:d,isDragging:P,isSorting:R,id:o,index:b,items:u,newIndex:H.current.newIndex,previousItems:H.current.items,previousContainerId:H.current.containerId,transition:l,wasDragging:H.current.activeId!=null}),ie=Em({disabled:!U,index:b,node:T,rect:w});return(0,x.useEffect)(()=>{R&&H.current.newIndex!==V&&(H.current.newIndex=V),d!==H.current.containerId&&(H.current.containerId=d),u!==H.current.items&&(H.current.items=u)},[R,V,d,u]),(0,x.useEffect)(()=>{if(ne===H.current.activeId)return;if(ne!=null&&H.current.activeId==null){H.current.activeId=ne;return}let e=setTimeout(()=>{H.current.activeId=ne},50);return()=>clearTimeout(e)},[ne]),{active:O,activeIndex:f,attributes:j,data:S,rect:w,index:b,newIndex:V,items:u,isOver:E,isSorting:R,isDragging:P,listeners:N,node:T,overIndex:g,over:F,setNodeRef:ee,setActivatorNodeRef:I,setDroppableNodeRef:D,setDraggableNodeRef:M,transform:ie??te,transition:ae()};function ae(){if(ie||re&&H.current.newIndex===b)return wm;if(!(B&&!Id(k)||!l)&&(R||U))return zd.Transition.toString({...l,property:Cm})}}function Om(e,t){return typeof e==`boolean`?{draggable:e,droppable:!1}:{draggable:e?.draggable??t.draggable,droppable:e?.droppable??t.droppable}}Jf.Down,Jf.Right,Jf.Up,Jf.Left;var km={permission:0,waiting:1,working:2,unknown:3};function Am(e){let t=e.agentSessionId?.trim();return t&&t.length>0?t:e.id}var jm={mode:`created`,direction:`desc`};function Mm(e,t=jm){let{mode:n,direction:r,manualOrder:i}=t;if(n===`manual`&&i&&i.length>0){let t=new Map(i.map((e,t)=>[e,t]));return e.toSorted((e,n)=>{let r=Am(e),i=Am(n),a=t.get(r)??t.get(e.id)??1/0,o=t.get(i)??t.get(n.id)??1/0;return a===1/0&&o===1/0?Date.parse(n.createdAt)-Date.parse(e.createdAt):a-o})}return e.toSorted((e,t)=>{if(n===`status`){let n=km[e.status]??km.unknown,r=km[t.status]??km.unknown;return n===r?Date.parse(t.lastActivity)-Date.parse(e.lastActivity):n-r}let i=Date.parse(e.createdAt),a=Date.parse(t.createdAt);return r===`desc`?a-i:i-a})}function Nm(e,t){let n=new Map;for(let t of e){let e=t.projectPath?.trim();if(e){let r=Date.parse(t.lastActivity)||0;r>(n.get(e)||0)&&n.set(e,r)}}for(let e of t){let t=e.projectPath?.trim();if(t){let r=Date.parse(e.lastActivityAt)||0;r>(n.get(t)||0)&&n.set(t,r)}}return Array.from(n.keys()).toSorted((e,t)=>{let r=n.get(e)||0;return(n.get(t)||0)-r})}function Pm(e,t){let n=new Map;for(let t of e){let e=t.host?.trim();if(e){let r=Date.parse(t.lastActivity)||0;r>(n.get(e)||0)&&n.set(e,r)}}for(let e of t){let t=e.host?.trim();if(t){let r=Date.parse(e.lastActivityAt)||0;r>(n.get(t)||0)&&n.set(t,r)}}return Array.from(n.keys()).toSorted((e,t)=>{let r=n.get(e)||0;return(n.get(t)||0)-r})}function Fm(e){let t=Date.parse(e);if(Number.isNaN(t))return``;let n=Date.now()-t,r=Math.floor(n/6e4);if(r<1)return`now`;if(r<60)return`${r}m`;let i=Math.floor(r/60);return i<24?`${i}h`:`${Math.floor(i/24)}d`}function Im(e){let t=e.trim();if(!t)return null;let n=t.replace(/[\\/]+$/,``);if(!n)return null;let r=n.split(/[\\/]/);return r[r.length-1]||null}function Lm(e){let t=e.map(e=>{let t=e.trim(),n=t.replace(/[\\/]+$/,``);return{path:e,parts:n.split(/[\\/]/).filter(Boolean),fallback:n||t||e}}),n=new Map;for(let e of t)n.set(e.path,1);let r=!0;for(;r;){r=!1;let e=new Map;for(let r of t){if(r.parts.length===0)continue;let t=n.get(r.path)??1,i=r.parts.slice(-t).join(`/`);e.set(i,(e.get(i)??0)+1)}for(let i of t){if(i.parts.length===0)continue;let t=n.get(i.path)??1,a=i.parts.slice(-t).join(`/`);(e.get(a)??0)>1&&t<i.parts.length&&(n.set(i.path,t+1),r=!0)}}let i=new Map,a=new Map;for(let e of t){let t=e.fallback;if(e.parts.length>0){let r=n.get(e.path)??1;t=e.parts.slice(-r).join(`/`)}i.set(e.path,t),a.set(t,(a.get(t)??0)+1)}let o=new Map;for(let e of t){let t=i.get(e.path)??e.fallback;(a.get(t)??0)>1&&(t=e.fallback),o.set(e.path,t)}return o}function Rm(e){let t=e.trim();return!t||t.length<=6?t:`${t.slice(0,3)}…${t.slice(-3)}`}function zm(e){let t=document.createElement(`textarea`);t.value=e,t.style.position=`fixed`,t.style.left=`-9999px`,document.body.appendChild(t),t.focus(),t.select();try{if(!document.execCommand(`copy`))throw 0}catch{navigator.clipboard?.writeText(e).catch(()=>{})}document.body.removeChild(t)}function Bm({useSafariLayoutFallback:e,isDragging:t,dndTransform:n,generatedTransform:r}){return e&&!t&&!n||!n?r:!r||r===`none`?n:`${n} ${r}`}var Vm=`agentboard-session`,Hm=N(Vm);function Um(e,t){return e.id===t.id&&e.name===t.name&&e.tmuxWindow===t.tmuxWindow&&e.projectPath===t.projectPath&&e.status===t.status&&e.lastActivity===t.lastActivity&&e.createdAt===t.createdAt&&e.source===t.source&&e.host===t.host&&e.remote===t.remote&&e.command===t.command&&e.agentType===t.agentType&&e.agentSessionId===t.agentSessionId&&e.agentSessionName===t.agentSessionName&&e.logFilePath===t.logFilePath&&e.isPinned===t.isPinned&&e.lastUserMessage===t.lastUserMessage}function Wm(e,t){if(e.length!==t.length)return!1;let n=new Map(e.map(e=>[e.id,e]));for(let e of t){let t=n.get(e.id);if(!t||!Um(t,e))return!1}return!0}function Gm(e){return typeof e==`string`&&e.length>0?e:null}function Km(e){return Array.isArray(e)?e:[]}var qm=T()(k((e,t)=>({sessions:[],agentSessions:{active:[],hibernating:[],history:[]},agentSessionsEpoch:-1,hostStatuses:[],exitingSessions:new Map,selectedSessionId:null,selectedHibernatingSessionId:null,hasLoaded:!1,connectionStatus:`connecting`,connectionError:null,connectionEpoch:0,remoteAllowControl:!1,remoteAllowAttach:!1,hostLabel:null,preferWindowName:!1,setSessions:n=>{let r=t(),i=r.selectedSessionId,a=r.selectedHibernatingSessionId,o=r.sessions,s=r.exitingSessions;if(r.hasLoaded&&Wm(o,n))return;let c=new Set(n.map(e=>e.id)),l=o.filter(e=>!c.has(e.id)&&!s.has(e.id)),u=i;if(i!==null&&!n.some(e=>e.id===i))if(a===null){let{sessionSortMode:e,sessionSortDirection:t}=H.getState();u=Mm(n,{mode:e,direction:t})[0]?.id??null}else u=null;if(l.length>0){let t=new Map(s);for(let e of l)t.set(e.id,e);e({sessions:n,hasLoaded:!0,selectedSessionId:u,exitingSessions:t})}else e({sessions:n,hasLoaded:!0,selectedSessionId:u})},setAgentSessions:(t,n,r)=>e(e=>{let i={active:Km(t),hibernating:Km(n),history:Km(r)};return{agentSessions:i,agentSessionsEpoch:e.connectionEpoch,selectedHibernatingSessionId:e.selectedHibernatingSessionId&&!i.hibernating.some(t=>t.sessionId===e.selectedHibernatingSessionId)?null:e.selectedHibernatingSessionId}}),setActiveAgentSessions:t=>e(e=>({agentSessions:{active:Km(t),hibernating:e.agentSessions.hibernating,history:e.agentSessions.history}})),setHostStatuses:t=>e({hostStatuses:t}),updateSession:t=>e(e=>({sessions:e.sessions.map(e=>e.id===t.id?t:e)})),setSelectedSessionId:t=>e({selectedSessionId:t,...t===null?{}:{selectedHibernatingSessionId:null}}),setSelectedHibernatingSessionId:t=>e({selectedHibernatingSessionId:t,...t===null?{}:{selectedSessionId:null}}),setConnectionStatus:t=>e({connectionStatus:t}),setConnectionError:t=>e({connectionError:t}),setConnectionState:(t,n,r)=>e({connectionStatus:t,connectionError:n,connectionEpoch:r}),setRemoteAllowControl:t=>e({remoteAllowControl:t}),setRemoteAllowAttach:t=>e({remoteAllowAttach:t}),setHostLabel:t=>e({hostLabel:t}),setPreferWindowName:t=>e({preferWindowName:t}),markSessionExiting:n=>{let r=t().sessions.find(e=>e.id===n);if(r){let i=new Map(t().exitingSessions);i.set(n,r),e({exitingSessions:i})}},clearExitingSession:n=>{let r=new Map(t().exitingSessions);r.delete(n),e({exitingSessions:r})}}),{name:Vm,storage:D(()=>Hm),partialize:e=>({selectedSessionId:e.selectedSessionId,selectedHibernatingSessionId:e.selectedHibernatingSessionId}),merge:(e,t)=>{let n=e,r=n?.selectedHibernatingSessionId??n?.selectedSleepingSessionId;return{...t,selectedSessionId:Gm(n?.selectedSessionId),selectedHibernatingSessionId:Gm(r)}}}));function Jm(e,t,n=!1){let[r,i]=(0,x.useState)(!1),a=(0,x.useRef)(e),o=(0,x.useRef)(!1);return(0,x.useEffect)(()=>{let r=a.current;if(n?e>r:e!==r){o.current=!0;let n=setTimeout(()=>{o.current&&=(i(!0),!1)},t);return a.current=e,()=>clearTimeout(n)}a.current=e},[e,t,n]),[r,()=>i(!1)]}function Ym(e,t,n,r){let i=(0,x.useRef)(new Map);(0,x.useEffect)(()=>{let a=new Set(e.map(e=>e.id));for(let e of t.keys())if(a.has(e)){let t=i.current.get(e);t&&(clearTimeout(t),i.current.delete(e)),n(e)}else if(!i.current.has(e)){let t=setTimeout(()=>{i.current.delete(e),n(e)},r+100);i.current.set(e,t)}},[e,t,n,r]),(0,x.useEffect)(()=>()=>{for(let e of i.current.values())clearTimeout(e);i.current.clear()},[])}function Xm({className:e}){return(0,W.jsx)(`svg`,{viewBox:`0 0 92.2 92.2`,fill:`currentColor`,className:e,"aria-hidden":`true`,children:(0,W.jsx)(`path`,{d:`M66.5,0H52.4l25.7,65h14.1L66.5,0z M25.7,0L0,65h14.4l5.3-13.6h26.9L51.8,65h14.4L40.5,0C40.5,0,25.7,0,25.7,0z M24.3,39.3l8.8-22.8l8.8,22.8H24.3z`,transform:`translate(0, 13.6)`})})}function Zm({className:e}){return(0,W.jsx)(`svg`,{viewBox:`-1 -1 26 26`,fill:`currentColor`,className:e,"aria-hidden":`true`,children:(0,W.jsx)(`path`,{d:`M22.2819 9.8211a5.9847 5.9847 0 0 0-.5157-4.9108 6.0462 6.0462 0 0 0-6.5098-2.9A6.0651 6.0651 0 0 0 4.9807 4.1818a5.9847 5.9847 0 0 0-3.9977 2.9 6.0462 6.0462 0 0 0 .7427 7.0966 5.98 5.98 0 0 0 .511 4.9107 6.051 6.051 0 0 0 6.5146 2.9001A5.9847 5.9847 0 0 0 13.2599 24a6.0557 6.0557 0 0 0 5.7718-4.2058 5.9894 5.9894 0 0 0 3.9977-2.9001 6.0557 6.0557 0 0 0-.7475-7.0729zm-9.022 12.6081a4.4755 4.4755 0 0 1-2.8764-1.0408l.1419-.0804 4.7783-2.7582a.7948.7948 0 0 0 .3927-.6813v-6.7369l2.02 1.1686a.071.071 0 0 1 .038.052v5.5826a4.504 4.504 0 0 1-4.4945 4.4944zm-9.6607-4.1254a4.4708 4.4708 0 0 1-.5346-3.0137l.142.0852 4.783 2.7582a.7712.7712 0 0 0 .7806 0l5.8428-3.3685v2.3324a.0804.0804 0 0 1-.0332.0615L9.74 19.9502a4.4992 4.4992 0 0 1-6.1408-1.6464zM2.3408 7.8956a4.485 4.485 0 0 1 2.3655-1.9728V11.6a.7664.7664 0 0 0 .3879.6765l5.8144 3.3543-2.0201 1.1685a.0757.0757 0 0 1-.071 0l-4.8303-2.7865A4.504 4.504 0 0 1 2.3408 7.872zm16.5963 3.8558L13.1038 8.364 15.1192 7.2a.0757.0757 0 0 1 .071 0l4.8303 2.7913a4.4944 4.4944 0 0 1-.6765 8.1042v-5.6772a.79.79 0 0 0-.407-.667zm2.0107-3.0231l-.142-.0852-4.7735-2.7818a.7759.7759 0 0 0-.7854 0L9.409 9.2297V6.8974a.0662.0662 0 0 1 .0284-.0615l4.8303-2.7866a4.4992 4.4992 0 0 1 6.6802 4.66zM8.3065 12.863l-2.02-1.1638a.0804.0804 0 0 1-.038-.0567V6.0742a4.4992 4.4992 0 0 1 7.3757-3.4537l-.142.0805L8.704 5.459a.7948.7948 0 0 0-.3927.6813zm1.0976-2.3654l2.602-1.4998 2.6069 1.4998v2.9994l-2.5974 1.4997-2.6067-1.4997Z`})})}function Qm({className:e}){return(0,W.jsx)(`svg`,{viewBox:`0 0 588.42 568.88`,fill:`currentColor`,className:e,"aria-hidden":`true`,children:(0,W.jsx)(`path`,{d:`M 10.499686,177.03840 L 31.174931,178.56990 C 52.615925,154.32116 61.039171,82.595924 187.38789,96.634671 C 182.79339,403.95560 48.021426,436.37234 56.444675,499.41907 C 59.507674,535.15406 87.840417,557.10556 118.47041,558.38181 C 215.21014,555.06356 210.87089,424.63084 240.99038,95.868921 L 365.80760,95.868921 C 359.17110,211.75239 341.04836,327.63586 339.00636,441.22208 C 340.53786,516.77606 386.48285,557.10556 446.97708,557.61606 C 546.52456,560.93431 577.92030,444.79558 577.92030,395.27709 L 556.47931,395.27710 C 554.43731,436.11709 534.78306,465.47083 492.92207,467.25758 C 378.82535,468.78908 441.61683,266.63113 442.38258,97.400421 L 577.92030,98.166171 L 577.15455,11.636437 C 13.807491,8.9075799 85.312284,-2.1366151 10.499686,177.03840 z`})})}function $m({className:e}){return(0,W.jsx)(`svg`,{viewBox:`41 41 343 343`,fill:`currentColor`,className:e,"aria-hidden":`true`,children:(0,W.jsx)(`path`,{d:`M70 159.333V91.3471C70 88.3592 71.594 85.5983 74.1816 84.1044L133.043 50.1205C135.631 48.6265 138.819 48.6265 141.407 50.1205L200.269 84.1044C202.856 85.5983 204.45 88.3592 204.45 91.3471V126.068C204.708 137.606 210.806 148.734 221.531 154.926C232.256 161.117 244.942 160.834 255.063 155.289L285.132 137.929C287.719 136.435 290.907 136.435 293.495 137.929L352.357 171.913C354.944 173.406 356.538 176.167 356.538 179.155V247.123C356.538 250.111 354.944 252.872 352.357 254.366L293.495 288.35C290.907 289.844 287.719 289.844 285.132 288.35L255.306 271.13C245.146 265.456 232.344 265.117 221.534 271.358C210.809 277.55 204.711 288.678 204.453 300.215V334.926C204.453 337.914 202.859 340.675 200.271 342.169L141.41 376.153C138.822 377.647 135.634 377.647 133.046 376.153L74.1845 342.169C71.5969 340.675 70.0028 337.914 70.0028 334.926V266.959C70.0029 263.971 71.5969 261.21 74.1845 259.716L133.046 225.732C135.634 224.238 138.822 224.238 141.41 225.732L171.547 243.132C181.656 248.638 194.306 248.906 205.005 242.729C215.815 236.488 221.922 225.231 222.088 213.595C221.83 202.057 215.732 189.737 205.008 183.545C194.283 177.353 181.597 177.636 171.476 183.181L141.269 200.72C138.67 202.229 135.461 202.228 132.864 200.716L74.1576 166.562C71.5835 165.065 70 162.311 70 159.333Z`})})}function eh({className:e}){return(0,W.jsxs)(`svg`,{viewBox:`0 0 512 512`,fill:`currentColor`,className:e,"aria-hidden":`true`,children:[(0,W.jsx)(`path`,{d:`M210.484 312.759L343.465 210.383C349.984 205.364 359.302 207.322 362.408 215.117C378.758 256.231 371.454 305.64 338.925 339.563C306.397 373.487 261.137 380.927 219.768 363.983L174.577 385.803C239.394 432.008 318.104 420.581 367.289 369.251C406.303 328.564 418.386 273.104 407.088 223.091L407.19 223.198C390.807 149.726 411.218 120.359 453.03 60.3072C454.02 58.8833 455.01 57.4595 456 56L400.978 113.382V113.204L210.45 312.794`}),(0,W.jsx)(`path`,{d:`M183.042 337.641C136.519 291.294 144.54 219.567 184.236 178.203C213.59 147.59 261.683 135.096 303.666 153.464L348.755 131.75C340.632 125.627 330.221 119.042 318.275 114.414C264.277 91.2407 199.63 102.774 155.735 148.516C113.513 192.549 100.236 260.254 123.036 318.027C140.069 361.206 112.148 391.748 84.0229 422.575C74.0561 433.503 64.0553 444.431 56 456L183.007 337.677`})]})}var th=[[`claude`,Xm],[`codex`,Zm],[`pi`,Qm],[`devin`,$m],[`grok`,eh]];function nh({agentType:e,command:t,className:n=``}){let r=(e||t?.split(` `)[0]||``).toLowerCase();for(let[e,t]of th)if(r.startsWith(e))return(0,W.jsx)(t,{className:n});return(0,W.jsx)(Ve,{className:n})}var rh=360;function ih(e){let t=0;for(let n=0;n<e.length;n++){let r=e.charCodeAt(n);t=(t<<5)-t+r,t&=t}return Math.abs(t)}function ah(e){return{"--badge-hue":`${ih(e)%rh}`}}function oh({name:e,fullPath:t,className:n=``}){let r=ah(e);return(0,W.jsx)(`span`,{className:`project-badge inline-flex items-center rounded-full px-1.5 py-0.5 text-[10px] font-medium leading-none ${n}`,style:r,title:t,children:e})}var sh=new Map,ch=new Map,lh=new Set,uh=new Set;function dh(e){if(!e||e.error||!e.state||e.isDraft)return`bg-muted`;switch(e.state){case`OPEN`:return`bg-green-500`;case`MERGED`:return`bg-purple-500`;case`CLOSED`:return`bg-red-500`;default:return`bg-muted`}}function fh(e){return!e||!e.state?``:e.isDraft&&e.state===`OPEN`?`Draft`:e.state.charAt(0)+e.state.slice(1).toLowerCase()}function ph(e){return e.status===`COMPLETED`?e.conclusion===`SUCCESS`?{glyph:`✓`,cls:`text-green-500`}:{glyph:`✗`,cls:`text-red-500`}:{glyph:`…`,cls:`text-yellow-500`}}async function mh(e){let t=e.filter(e=>!sh.has(e)&&!lh.has(e));if(t.length===0)return e.map(e=>sh.get(e));t.forEach(e=>lh.add(e));try{let e=await(await fetch(`/api/pr-info`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({urls:t})})).json();for(let t of e)sh.set(t.url,t)}catch{}finally{t.forEach(e=>lh.delete(e))}return e.map(e=>sh.get(e)).filter(Boolean)}function hh({pr:e}){let[t,n]=(0,x.useState)(sh.get(e.url)),[r,i]=(0,x.useState)(ch.get(e.url)),[a,o]=(0,x.useState)(!1),s=(0,x.useRef)(null),[c,l]=(0,x.useState)(null),u=(0,x.useRef)(!0);(0,x.useEffect)(()=>(u.current=!0,()=>{u.current=!1}),[]),(0,x.useEffect)(()=>{sh.has(e.url)||mh([e.url]).then(e=>{u.current&&e[0]&&n(e[0])})},[e.url]),(0,x.useEffect)(()=>{!a||ch.has(e.url)||uh.has(e.url)||(uh.add(e.url),fetch(`/api/pr-checks?url=${encodeURIComponent(e.url)}`).then(e=>e.ok?e.json():null).then(t=>{t&&ch.set(e.url,t),u.current&&t&&i(t)}).catch(()=>{}).finally(()=>uh.delete(e.url)))},[a,e.url]);let d=r??t;return(0,W.jsxs)(`span`,{ref:s,className:`relative inline-flex`,onMouseEnter:()=>{let e=s.current?.getBoundingClientRect();e&&l({left:Math.min(e.left,window.innerWidth-270),bottom:window.innerHeight-e.top}),o(!0)},onMouseLeave:()=>o(!1),children:[(0,W.jsxs)(`a`,{href:e.url,target:`_blank`,rel:`noreferrer`,onClick:e=>e.stopPropagation(),className:`inline-flex items-center gap-1 rounded-full bg-elevated px-1.5 py-0.5 text-[11px] tabular-nums text-muted hover:text-accent`,title:`${e.repo}#${e.number}`,children:[(0,W.jsx)(`span`,{className:`inline-block h-1.5 w-1.5 rounded-full ${dh(t)}`}),`#`,e.number]}),a&&c&&(0,U.createPortal)((0,W.jsxs)(`div`,{className:`fixed z-[100] w-64 rounded-md border border-border bg-elevated p-2 text-left shadow-lg`,style:{left:c.left,bottom:c.bottom},onMouseEnter:()=>o(!0),onMouseLeave:()=>o(!1),children:[(0,W.jsxs)(`div`,{className:`flex items-center gap-1.5 text-[11px]`,children:[(0,W.jsx)(`span`,{className:dh(t)+` inline-block h-1.5 w-1.5 rounded-full`}),(0,W.jsx)(`span`,{className:`text-muted`,children:fh(t)||`PR`}),(0,W.jsx)(`span`,{className:`text-muted`,children:`·`}),(0,W.jsxs)(`span`,{className:`truncate text-muted`,children:[e.repo,`#`,e.number]})]}),d?(0,W.jsxs)(W.Fragment,{children:[(0,W.jsx)(`div`,{className:`mt-1 text-xs text-primary`,children:d.title??`(title unavailable)`}),(0,W.jsx)(`div`,{className:`mt-0.5 text-[11px] text-muted`,children:d.author?`by ${d.author}`:``}),r?.checks&&r.checks.length>0&&(0,W.jsx)(`div`,{className:`mt-1.5 max-h-32 space-y-0.5 overflow-y-auto border-t border-border pt-1.5`,children:r.checks.map((e,t)=>{let n=ph(e);return(0,W.jsxs)(`div`,{className:`flex items-center gap-1.5 text-[11px]`,children:[(0,W.jsx)(`span`,{className:n.cls,children:n.glyph}),(0,W.jsx)(`span`,{className:`truncate text-muted`,children:e.name})]},t)})})]}):(0,W.jsxs)(`div`,{className:`mt-1 space-y-1`,children:[(0,W.jsx)(`div`,{className:`h-3 w-3/4 animate-pulse rounded bg-border`}),(0,W.jsx)(`div`,{className:`h-3 w-1/2 animate-pulse rounded bg-border`})]})]}),document.body)]})}var gh=4;function _h({prs:e}){let[t,n]=(0,x.useState)(!1),[r,i]=(0,x.useState)(null),[a,o]=(0,x.useState)(null),s=(0,x.useRef)(null);return(0,x.useEffect)(()=>{!t||a||mh(e.map(e=>e.url)).then(e=>{o(new Map(e.map(e=>[e.url,e])))})},[t,a,e]),(0,W.jsxs)(`span`,{ref:s,className:`relative inline-flex`,onMouseEnter:()=>{let e=s.current?.getBoundingClientRect();e&&i({left:Math.min(e.left,window.innerWidth-270),bottom:window.innerHeight-e.top}),n(!0)},onMouseLeave:()=>n(!1),children:[(0,W.jsxs)(`span`,{className:`inline-flex cursor-default items-center rounded-full px-1.5 py-0.5 text-[11px] tabular-nums text-muted`,title:`${e.length} more PR${e.length===1?``:`s`}`,children:[`+`,e.length]}),t&&r&&(0,U.createPortal)((0,W.jsxs)(`div`,{className:`fixed z-[100] w-56 rounded-md border border-border bg-elevated p-2 text-left shadow-lg`,style:{left:r.left,bottom:r.bottom},onMouseEnter:()=>n(!0),onMouseLeave:()=>n(!1),children:[(0,W.jsxs)(`div`,{className:`text-[11px] text-muted`,children:[e.length,` more PR`,e.length===1?``:`s`]}),(0,W.jsx)(`div`,{className:`mt-1 max-h-48 space-y-0.5 overflow-y-auto border-t border-border pt-1.5`,children:e.map(e=>(0,W.jsxs)(`a`,{href:e.url,target:`_blank`,rel:`noreferrer`,className:`flex items-center gap-1.5 text-[11px] text-secondary hover:text-accent`,children:[(0,W.jsx)(`span`,{className:`inline-block h-1.5 w-1.5 shrink-0 rounded-full ${dh(a?.get(e.url))}`}),(0,W.jsxs)(`span`,{className:`tabular-nums`,children:[`#`,e.number]}),(0,W.jsx)(`span`,{className:`truncate text-muted`,children:e.repo})]},e.url))})]}),document.body)]})}function vh({prs:e}){if(e.length===0)return null;let t=[...e].reverse(),n=t.slice(0,gh),r=t.slice(gh);return(0,W.jsxs)(`div`,{className:`flex flex-wrap items-center gap-1 pl-[1.375rem]`,children:[n.map(e=>(0,W.jsx)(hh,{pr:e},e.url)),r.length>0&&(0,W.jsx)(_h,{prs:r})]})}var yh=(0,x.memo)(function({session:e,showSessionIdPrefix:t,showProjectName:n,showLastUserMessage:r,onResume:i,onPreview:a}){let o=Fm(e.lastActivityAt),s=Im(e.projectPath),c=e.displayName||s||e.sessionId.slice(0,8),l=n&&!!s,u=r&&!!e.lastUserMessage,d=t?Rm(e.sessionId):``,f=(0,x.useRef)(null),[p,m]=(0,x.useState)(null);return(0,x.useEffect)(()=>{if(!p)return;let e=e=>{f.current&&!f.current.contains(e.target)&&m(null)},t=e=>{e.key===`Escape`&&m(null)};return document.addEventListener(`mousedown`,e),document.addEventListener(`touchstart`,e),document.addEventListener(`keydown`,t),()=>{document.removeEventListener(`mousedown`,e),document.removeEventListener(`touchstart`,e),document.removeEventListener(`keydown`,t)}},[p]),(0,W.jsxs)(`div`,{className:`group relative cursor-pointer px-3 py-2 hover:bg-hover`,role:`button`,tabIndex:0,title:`Click to preview`,onClick:()=>a(e),onKeyDown:t=>{(t.key===`Enter`||t.key===` `)&&(t.preventDefault(),a(e))},onContextMenu:e=>{e.preventDefault(),e.stopPropagation(),m({x:e.clientX,y:e.clientY})},children:[(0,W.jsx)(`button`,{type:`button`,className:`absolute right-3 top-1/2 -translate-y-1/2 text-xs text-muted opacity-0 hover:text-primary group-hover:opacity-100`,title:`Wake directly`,onClick:t=>{t.stopPropagation(),i(e.sessionId)},children:`▶`}),(0,W.jsxs)(`div`,{className:`flex flex-col gap-0.5 pl-2.5 group-hover:pr-4`,children:[(0,W.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,W.jsx)(nh,{agentType:e.agentType,className:`h-3.5 w-3.5 shrink-0 text-muted`}),(0,W.jsx)(`span`,{className:`min-w-0 flex-1 truncate text-sm font-medium text-primary`,children:c}),e.lastResumeError&&(0,W.jsx)(ae,{className:`h-3 w-3 shrink-0 text-amber-500`,"aria-label":`Wake failed`,title:`Last wake failed: ${e.lastResumeError}`}),d&&(0,W.jsx)(`span`,{className:`shrink-0 text-[11px] font-mono text-muted`,title:e.sessionId,children:d}),(0,W.jsx)(`span`,{className:`ml-1 w-8 shrink-0 text-right text-xs tabular-nums text-muted`,children:o})]}),(l||u)&&(0,W.jsxs)(`div`,{className:`flex flex-wrap items-center gap-1 pl-[1.375rem]`,children:[l&&(0,W.jsx)(oh,{name:s,fullPath:e.projectPath}),u&&(0,W.jsxs)(`span`,{className:`truncate text-xs italic text-muted`,children:[`"`,e.lastUserMessage.length>200?e.lastUserMessage.slice(0,200)+`…`:e.lastUserMessage,`"`]})]}),e.prs&&e.prs.length>0&&(0,W.jsx)(vh,{prs:e.prs})]}),p&&(0,W.jsx)(`div`,{ref:f,className:`fixed z-50 min-w-[160px] rounded-md border border-border bg-elevated shadow-lg py-1`,style:{left:p.x,top:p.y},role:`menu`,children:e.logFilePath&&(0,W.jsxs)(`button`,{onClick:t=>{t.stopPropagation(),m(null),e.logFilePath&&zm(e.logFilePath)},className:`w-full px-3 py-2 text-left text-sm text-secondary hover:bg-hover hover:text-primary flex items-center gap-2`,role:`menuitem`,title:e.logFilePath,children:[(0,W.jsx)(ye,{width:14,height:14}),`Copy Log Path`]})})]})});function bh({name:e,className:t=``}){let n=ah(`host:${e}`);return(0,W.jsx)(`span`,{className:`inline-flex items-center rounded-full px-1.5 py-0.5 text-[10px] font-medium uppercase leading-none tracking-wide ${t}`,style:n,title:e,children:e})}function xh({hosts:e,selectedHosts:t,onSelect:n,statuses:r=[]}){let[i,a]=(0,x.useState)(!1),o=(0,x.useId)(),s=(0,x.useRef)(null),c=(0,x.useMemo)(()=>new Set(t),[t]),l=(0,x.useMemo)(()=>new Map(r.map(e=>[e.host,e])),[r]),u=(0,x.useMemo)(()=>t.length===0?`All Hosts`:t.join(`, `),[t]),d=(0,x.useMemo)(()=>t.length===0?`All Hosts`:t.length===1?t[0]:`${t.length} hosts`,[t]);(0,x.useEffect)(()=>{if(!i||typeof document>`u`||!document.addEventListener||!document.removeEventListener)return;let e=e=>{let t=e.target;t&&s.current?.contains(t)||a(!1)},t=e=>{e.key===`Escape`&&a(!1)};return document.addEventListener(`mousedown`,e),document.addEventListener(`touchstart`,e,{passive:!0}),document.addEventListener(`keydown`,t),()=>{document.removeEventListener(`mousedown`,e),document.removeEventListener(`touchstart`,e),document.removeEventListener(`keydown`,t)}},[i]);let f=t=>{let r=new Set(c);r.has(t)?r.delete(t):r.add(t),n(e.filter(e=>r.has(e)))};return(0,W.jsxs)(`div`,{ref:s,className:`relative`,children:[(0,W.jsxs)(`button`,{type:`button`,"aria-haspopup":`menu`,"aria-expanded":i,"aria-controls":o,"aria-label":`Filter by host`,onClick:()=>a(e=>!e),className:`flex h-6 max-w-[9rem] items-center gap-1.5 rounded border border-border bg-base px-2 text-[11px] text-primary hover:bg-hover focus:border-accent focus:outline-none`,title:u,children:[(0,W.jsx)(Fe,{className:`h-3.5 w-3.5 shrink-0`}),(0,W.jsx)(`span`,{className:`truncate leading-none`,children:d}),(0,W.jsx)(se,{className:`h-3 w-3 shrink-0 text-muted`})]}),i&&(0,W.jsxs)(`div`,{id:o,role:`menu`,className:`absolute left-0 z-20 mt-1 w-48 max-w-[calc(100vw-1.5rem)] rounded border border-border bg-surface p-2 text-xs shadow-lg`,children:[(0,W.jsxs)(`label`,{role:`menuitemcheckbox`,"aria-checked":t.length===0,className:`flex cursor-pointer items-center gap-2 rounded px-2 py-1.5 text-primary hover:bg-hover`,children:[(0,W.jsx)(`input`,{type:`checkbox`,checked:t.length===0,onChange:()=>n([]),className:`h-3.5 w-3.5 accent-approval`}),(0,W.jsx)(`span`,{children:`All Hosts`})]}),(0,W.jsx)(`div`,{className:`my-2 h-px bg-border`}),e.length===0?(0,W.jsx)(`div`,{className:`px-2 py-1 text-muted`,children:`No hosts`}):(0,W.jsx)(`div`,{className:`max-h-48 overflow-y-auto pr-1`,children:e.map(e=>{let t=l.get(e),n=t?!t.ok:!1;return(0,W.jsxs)(`label`,{role:`menuitemcheckbox`,"aria-checked":c.has(e),className:`flex cursor-pointer items-center gap-2 rounded px-2 py-1.5 text-primary hover:bg-hover`,title:t?.error?`${e}: ${t.error}`:e,children:[(0,W.jsx)(`input`,{type:`checkbox`,checked:c.has(e),onChange:()=>f(e),className:`h-3.5 w-3.5 accent-approval`}),(0,W.jsx)(`span`,{className:`truncate`,children:e}),n&&(0,W.jsx)(`span`,{className:`ml-auto text-[10px] uppercase text-danger`,children:`offline`})]},e)})})]})]})}function Sh({projects:e,selectedProjects:t,onSelect:n,hasHiddenPermissions:r}){let[i,a]=(0,x.useState)(!1),o=(0,x.useId)(),s=(0,x.useRef)(null),c=(0,x.useMemo)(()=>Lm(e),[e]),l=(0,x.useMemo)(()=>new Set(t),[t]),u=r&&t.length>0,d=(0,x.useMemo)(()=>t.length===0?`All Projects`:t.map(e=>c.get(e)??Im(e)??e).join(`, `),[c,t]),f=(0,x.useMemo)(()=>{if(t.length===0)return`All Projects`;if(t.length===1){let e=t[0];return c.get(e)??Im(e)??e}return`${t.length} projects`},[c,t]);(0,x.useEffect)(()=>{if(!i||typeof document>`u`||!document.addEventListener||!document.removeEventListener)return;let e=e=>{let t=e.target;t&&s.current?.contains(t)||a(!1)},t=e=>{e.key===`Escape`&&a(!1)};return document.addEventListener(`mousedown`,e),document.addEventListener(`touchstart`,e,{passive:!0}),document.addEventListener(`keydown`,t),()=>{document.removeEventListener(`mousedown`,e),document.removeEventListener(`touchstart`,e),document.removeEventListener(`keydown`,t)}},[i]);let p=t=>{let r=new Set(l);r.has(t)?r.delete(t):r.add(t),n(e.filter(e=>r.has(e)))};return(0,W.jsxs)(`div`,{ref:s,className:`relative`,children:[(0,W.jsxs)(`button`,{type:`button`,"aria-haspopup":`menu`,"aria-expanded":i,"aria-controls":o,"aria-label":`Filter by project`,onClick:()=>a(e=>!e),className:`flex h-6 max-w-[11rem] items-center gap-1.5 rounded border border-border bg-base px-2 text-[11px] text-primary hover:bg-hover focus:border-accent focus:outline-none`,title:d,children:[(0,W.jsx)(xe,{className:`h-3.5 w-3.5 shrink-0`}),(0,W.jsx)(`span`,{className:`truncate leading-none`,children:f}),(0,W.jsx)(se,{className:`h-3 w-3 shrink-0 text-muted`})]}),i&&(0,W.jsxs)(`div`,{id:o,role:`menu`,className:`absolute left-0 z-20 mt-1 w-60 max-w-[calc(100vw-1.5rem)] rounded border border-border bg-surface p-2 text-xs shadow-lg`,children:[(0,W.jsxs)(`label`,{className:`flex cursor-pointer items-center gap-2 rounded px-2 py-1.5 text-primary hover:bg-hover`,children:[(0,W.jsx)(`input`,{type:`checkbox`,checked:t.length===0,onChange:()=>n([]),className:`h-3.5 w-3.5 accent-approval`}),(0,W.jsx)(`span`,{children:`All Projects`})]}),(0,W.jsx)(`div`,{className:`my-2 h-px bg-border`}),e.length===0?(0,W.jsx)(`div`,{className:`px-2 py-1 text-muted`,children:`No projects`}):(0,W.jsx)(`div`,{className:`max-h-48 overflow-y-auto pr-1`,children:e.map(e=>{let t=c.get(e)??Im(e)??e;return(0,W.jsxs)(`label`,{className:`flex cursor-pointer items-center gap-2 rounded px-2 py-1.5 text-primary hover:bg-hover`,title:e,children:[(0,W.jsx)(`input`,{type:`checkbox`,checked:l.has(e),onChange:()=>p(e),className:`h-3.5 w-3.5 accent-approval`}),(0,W.jsx)(`span`,{className:`truncate`,children:t})]},e)})})]}),u&&(0,W.jsx)(`button`,{type:`button`,className:`absolute -right-1 -top-1 h-2 w-2 rounded-full bg-approval pulse-approval ring-2 ring-elevated`,title:`Hidden sessions need attention`,"aria-label":`Clear project filters`,onClick:e=>{e.stopPropagation(),n([])},children:(0,W.jsx)(`span`,{className:`sr-only`,children:`Clear project filters`})})]})}function Ch(e){return!e||typeof e!=`object`||Array.isArray(e)?null:e}function wh(e){return typeof e==`string`?e:null}var Th=new Set([`tool_result`,`custom_tool_call_output`]),Eh=new Set([`text`,`input_text`,`output_text`]);function Dh(e){return e===`user`?`user`:e===`assistant`?`assistant`:e===`system`||e===`developer`?`system`:e===`tool`?`tool`:`other`}function Oh(e){let t=wh(e.type)??``,n=Ch(e.payload),r=wh(n?.type)??``,i=wh(e.source)??wh(n?.source)??``,a=wh(e.agent)??``;return i.toLowerCase()===`pi`||a.toLowerCase()===`pi`?`pi`:i.toLowerCase()===`devin`||a.toLowerCase()===`devin`?`devin`:i.toLowerCase()===`grok`||a.toLowerCase()===`grok`||e.synthetic_reason!==void 0||e.prompt_index!==void 0||e.model_fingerprint!==void 0||e.encrypted_content!==void 0?`grok`:t===`response_item`||t===`event_msg`?`codex`:t===`tool_use`||t===`result`||t===`user`||t===`assistant`||t===`system`?`claude`:r===`user_message`||r===`assistant_message`?`codex`:`unknown`}function kh(e){let t=wh(Ch(e.payload)?.type);return{family:Oh(e),rawType:wh(e.type)??`unknown`,...t?{payloadType:t}:{}}}function Ah(e){if(!e)return[];if(typeof e==`string`)return e.trim()?[e]:[];if(Array.isArray(e)){let t=[];for(let n of e){if(typeof n==`string`){n.trim()&&t.push(n);continue}let e=Ch(n);if(!e)continue;let r=wh(e.type);if(r&&Th.has(r)||r&&!Eh.has(r))continue;let i=wh(e.text);i&&i.trim()&&t.push(i)}return t}let t=Ch(e);if(t){let e=wh(t.type);if(e&&Th.has(e))return[];let n=wh(t.text);return n&&n.trim()?[n]:[...Ah(t.content),...Ah(t.message)]}return[]}function jh(e,t){if(e.type!==`response_item`)return[];let n=Ch(e.payload);if(!n||n.type!==`message`)return[];let r=Dh(n.role);return Ah(n.content).map(e=>({kind:`message`,role:r,text:e,source:t}))}function Mh(e,t){if(e.type!==`event_msg`)return[];let n=Ch(e.payload);if(!n)return[];let r=wh(n.type),i=null;if(r===`user_message`?i=`user`:r===`assistant_message`||r===`agent_message`?i=`assistant`:r===`system_message`?i=`system`:r===`message`&&(i=Dh(n.role)),!i||![`user`,`assistant`,`system`].includes(i))return[];let a=Array.from(new Set([...Ah(n.message),...Ah(n.content),...Ah(n.text)]));return a.length===0?[]:a.map(e=>({kind:`message`,role:i,text:e,source:t}))}function Nh(e,t){let n=Dh(e.type),r=Ch(e.message);if(r){let n=Dh(r.role??e.type);return[...Ah(r.content),...Ah(r.text),...Ah(r.message)].map(e=>({kind:`message`,role:n,text:e,source:t}))}return[`user`,`assistant`,`system`].includes(n)?[...Ah(e.content),...Ah(e.text)].map(e=>({kind:`message`,role:n,text:e,source:t})):[]}function Ph(e,t){let n=Dh(e.role);return[`user`,`assistant`,`system`].includes(n)?[...Ah(e.content),...Ah(e.message),...Ah(e.text)].map(e=>({kind:`message`,role:n,text:e,source:t})):[]}function Fh(e,t){let n=wh(e.type),r=wh(e.event);return n!==`tool_use`&&r!==`tool_use`?[]:[{kind:`tool_call`,role:`assistant`,text:`[Tool: ${wh(e.name)??`tool`}]`,source:t}]}function Ih(e,t){if(e.type!==`result`)return[];let n=wh(e.result);return!n||!n.trim()?[]:[{kind:`result`,role:`system`,text:n,source:t}]}function Lh(e,t){let n=Ch(e.payload),r=[...Ah(e.message),...Ah(e.content),...Ah(e.text),...Ah(n?.message),...Ah(n?.content)];return r.length===0?[]:r.map(e=>({kind:`unknown`,role:`other`,text:e,source:t}))}function Rh(e,t){let n=wh(e.type),r=wh(Ch(e.payload)?.type);return n&&Th.has(n)||r&&Th.has(r)?[{kind:`tool_result`,role:`tool`,text:``,source:t}]:[]}function zh(e,t){let n=e.tool_calls;return t.family!==`grok`||!Array.isArray(n)?[]:n.map(e=>Ch(e)).filter(e=>e!==null).map(e=>({kind:`tool_call`,role:`assistant`,text:`[Tool: ${wh(e.name)??`tool`}]`,source:t}))}function Bh(e){let t=Ch(e);if(!t||t.isMeta===!0||t.synthetic_reason!==void 0)return[];let n=kh(t),r=[...jh(t,n),...Mh(t,n),...Nh(t,n),...Fh(t,n),...Ih(t,n),...Rh(t,n),...zh(t,n)];if(r.length>0)return r;let i=Ph(t,n);return i.length>0?i:Lh(t,n)}function Vh(e){let t=e.trim();if(!t)return null;try{let e=JSON.parse(t);return{parsed:!0,events:Bh(e),raw:e}}catch{return{parsed:!1,events:[{kind:`unknown`,role:`other`,text:t,source:{family:`unknown`,rawType:`raw_text`}}],raw:e}}}function Hh(e,t){let n=t||{};return(e[e.length-1]===``?[...e,``]:e).join((n.padRight?` `:``)+`,`+(n.padLeft===!1?``:` `)).trim()}var Uh=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Wh=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Gh={};function Kh(e,t){return((t||Gh).jsx?Wh:Uh).test(e)}var qh=/[ \t\n\f\r]/g;function Jh(e){return typeof e==`object`?e.type===`text`?Yh(e.value):!1:Yh(e)}function Yh(e){return e.replace(qh,``)===``}var Xh=class{constructor(e,t,n){this.normal=t,this.property=e,n&&(this.space=n)}};Xh.prototype.normal={},Xh.prototype.property={},Xh.prototype.space=void 0;function Zh(e,t){let n={},r={};for(let t of e)Object.assign(n,t.property),Object.assign(r,t.normal);return new Xh(n,r,t)}function Qh(e){return e.toLowerCase()}var $h=class{constructor(e,t){this.attribute=t,this.property=e}};$h.prototype.attribute=``,$h.prototype.booleanish=!1,$h.prototype.boolean=!1,$h.prototype.commaOrSpaceSeparated=!1,$h.prototype.commaSeparated=!1,$h.prototype.defined=!1,$h.prototype.mustUseProperty=!1,$h.prototype.number=!1,$h.prototype.overloadedBoolean=!1,$h.prototype.property=``,$h.prototype.spaceSeparated=!1,$h.prototype.space=void 0;var eg=c({boolean:()=>ng,booleanish:()=>rg,commaOrSpaceSeparated:()=>sg,commaSeparated:()=>og,number:()=>q,overloadedBoolean:()=>ig,spaceSeparated:()=>ag}),tg=0,ng=cg(),rg=cg(),ig=cg(),q=cg(),ag=cg(),og=cg(),sg=cg();function cg(){return 2**++tg}var lg=Object.keys(eg),ug=class extends $h{constructor(e,t,n,r){let i=-1;if(super(e,t),dg(this,`space`,r),typeof n==`number`)for(;++i<lg.length;){let e=lg[i];dg(this,lg[i],(n&eg[e])===eg[e])}}};ug.prototype.defined=!0;function dg(e,t,n){n&&(e[t]=n)}function fg(e){let t={},n={};for(let[r,i]of Object.entries(e.properties)){let a=new ug(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(a.mustUseProperty=!0),t[r]=a,n[Qh(r)]=r,n[Qh(a.attribute)]=r}return new Xh(t,n,e.space)}var pg=fg({properties:{ariaActiveDescendant:null,ariaAtomic:rg,ariaAutoComplete:null,ariaBusy:rg,ariaChecked:rg,ariaColCount:q,ariaColIndex:q,ariaColSpan:q,ariaControls:ag,ariaCurrent:null,ariaDescribedBy:ag,ariaDetails:null,ariaDisabled:rg,ariaDropEffect:ag,ariaErrorMessage:null,ariaExpanded:rg,ariaFlowTo:ag,ariaGrabbed:rg,ariaHasPopup:null,ariaHidden:rg,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:ag,ariaLevel:q,ariaLive:null,ariaModal:rg,ariaMultiLine:rg,ariaMultiSelectable:rg,ariaOrientation:null,ariaOwns:ag,ariaPlaceholder:null,ariaPosInSet:q,ariaPressed:rg,ariaReadOnly:rg,ariaRelevant:null,ariaRequired:rg,ariaRoleDescription:ag,ariaRowCount:q,ariaRowIndex:q,ariaRowSpan:q,ariaSelected:rg,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 mg(e,t){return t in e?e[t]:t}function hg(e,t){return mg(e,t.toLowerCase())}var gg=fg({attributes:{acceptcharset:`accept-charset`,classname:`class`,htmlfor:`for`,httpequiv:`http-equiv`},mustUseProperty:[`checked`,`multiple`,`muted`,`selected`],properties:{abbr:null,accept:og,acceptCharset:ag,accessKey:ag,action:null,allow:null,allowFullScreen:ng,allowPaymentRequest:ng,allowUserMedia:ng,alpha:ng,alt:null,as:null,async:ng,autoCapitalize:null,autoComplete:ag,autoFocus:ng,autoPlay:ng,blocking:ag,capture:null,charSet:null,checked:ng,cite:null,className:ag,closedBy:null,colorSpace:null,cols:q,colSpan:q,command:null,commandFor:null,content:null,contentEditable:rg,controls:ng,controlsList:ag,coords:q|og,crossOrigin:null,data:null,dateTime:null,decoding:null,default:ng,defer:ng,dir:null,dirName:null,disabled:ng,download:ig,draggable:rg,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:ng,formTarget:null,headers:ag,height:q,hidden:ig,high:q,href:null,hrefLang:null,htmlFor:ag,httpEquiv:ag,id:null,imageSizes:null,imageSrcSet:null,inert:ng,inputMode:null,integrity:null,is:null,isMap:ng,itemId:null,itemProp:ag,itemRef:ag,itemScope:ng,itemType:ag,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:ng,low:q,manifest:null,max:null,maxLength:q,media:null,method:null,min:null,minLength:q,multiple:ng,muted:ng,name:null,nonce:null,noModule:ng,noValidate:ng,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:ng,optimum:q,pattern:null,ping:ag,placeholder:null,playsInline:ng,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:ng,referrerPolicy:null,rel:ag,required:ng,reversed:ng,rows:q,rowSpan:q,sandbox:ag,scope:null,scoped:ng,seamless:ng,selected:ng,shadowRootClonable:ng,shadowRootCustomElementRegistry:ng,shadowRootDelegatesFocus:ng,shadowRootMode:null,shadowRootSerializable:ng,shape:null,size:q,sizes:null,slot:null,span:q,spellCheck:rg,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:ng,useMap:null,value:rg,width:q,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:ag,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:ng,declare:ng,event:null,face:null,frame:null,frameBorder:null,hSpace:q,leftMargin:q,link:null,longDesc:null,lowSrc:null,marginHeight:q,marginWidth:q,noResize:ng,noHref:ng,noShade:ng,noWrap:ng,object:null,profile:null,prompt:null,rev:null,rightMargin:q,rules:null,scheme:null,scrolling:rg,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:ng,disablePictureInPicture:ng,disableRemotePlayback:ng,exportParts:og,part:ag,prefix:null,property:null,results:q,security:null,unselectable:null},space:`html`,transform:hg}),_g=fg({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:sg,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:ag,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:ng,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:og,g2:og,glyphName:og,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:sg,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:ag,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:q,pointsAtY:q,pointsAtZ:q,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:sg,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:sg,rev:sg,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:sg,requiredFeatures:sg,requiredFonts:sg,requiredFormats:sg,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:sg,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:sg,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:sg,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:mg}),vg=fg({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()}}),yg=fg({attributes:{xmlnsxlink:`xmlns:xlink`},properties:{xmlnsXLink:null,xmlns:null},space:`xmlns`,transform:hg}),bg=fg({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:`xml`,transform(e,t){return`xml:`+t.slice(3).toLowerCase()}}),xg={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`},Sg=/[A-Z]/g,Cg=/-[a-z]/g,wg=/^data[-\w.:]+$/i;function Tg(e,t){let n=Qh(t),r=t,i=$h;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)===`data`&&wg.test(t)){if(t.charAt(4)===`-`){let e=t.slice(5).replace(Cg,Dg);r=`data`+e.charAt(0).toUpperCase()+e.slice(1)}else{let e=t.slice(4);if(!Cg.test(e)){let n=e.replace(Sg,Eg);n.charAt(0)!==`-`&&(n=`-`+n),t=`data`+n}}i=ug}return new i(r,t)}function Eg(e){return`-`+e.toLowerCase()}function Dg(e){return e.charAt(1).toUpperCase()}var Og=Zh([pg,gg,vg,yg,bg],`html`),kg=Zh([pg,_g,vg,yg,bg],`svg`);function Ag(e){return e.join(` `).trim()}var jg=s(((e,t)=>{var n=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,r=/\n/g,i=/^\s*/,a=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,o=/^:\s*/,s=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,c=/^[;\s]*/,l=/^\s+|\s+$/g,u=`
21
21
  `,d=`/`,f=`*`,p=``,m=`comment`,h=`declaration`;function g(e,t){if(typeof e!=`string`)throw TypeError(`First argument must be a string`);if(!e)return[];t||={};var l=1,g=1;function v(e){var t=e.match(r);t&&(l+=t.length);var n=e.lastIndexOf(u);g=~n?e.length-n:g+e.length}function y(){var e={line:l,column:g};return function(t){return t.position=new b(e),C(),t}}function b(e){this.start=e,this.end={line:l,column:g},this.source=t.source}b.prototype.content=e;function x(n){var r=Error(t.source+`:`+l+`:`+g+`: `+n);if(r.reason=n,r.filename=t.source,r.line=l,r.column=g,r.source=e,!t.silent)throw r}function S(t){var n=t.exec(e);if(n){var r=n[0];return v(r),e=e.slice(r.length),n}}function C(){S(i)}function w(e){var t;for(e||=[];t=T();)t!==!1&&e.push(t);return e}function T(){var t=y();if(!(d!=e.charAt(0)||f!=e.charAt(1))){for(var n=2;p!=e.charAt(n)&&(f!=e.charAt(n)||d!=e.charAt(n+1));)++n;if(n+=2,p===e.charAt(n-1))return x(`End of comment missing`);var r=e.slice(2,n-2);return g+=2,v(r),e=e.slice(n),g+=2,t({type:m,comment:r})}}function E(){var e=y(),t=S(a);if(t){if(T(),!S(o))return x(`property missing ':'`);var r=S(s),i=e({type:h,property:_(t[0].replace(n,p)),value:r?_(r[0].replace(n,p)):p});return S(c),i}}function D(){var e=[];w(e);for(var t;t=E();)t!==!1&&(e.push(t),w(e));return e}return C(),D()}function _(e){return e?e.replace(l,p):p}t.exports=g})),Mg=s((e=>{var t=e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,`__esModule`,{value:!0}),e.default=r;var n=t(jg());function r(e,t){let r=null;if(!e||typeof e!=`string`)return r;let i=(0,n.default)(e),a=typeof t==`function`;return i.forEach(e=>{if(e.type!==`declaration`)return;let{property:n,value:i}=e;a?t(n,i,e):i&&(r||={},r[n]=i)}),r}})),Ng=s((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.camelCase=void 0;var t=/^--[a-zA-Z0-9_-]+$/,n=/-([a-z])/g,r=/^[^-]+$/,i=/^-(webkit|moz|ms|o|khtml)-/,a=/^-(ms)-/,o=function(e){return!e||r.test(e)||t.test(e)},s=function(e,t){return t.toUpperCase()},c=function(e,t){return`${t}-`};e.camelCase=function(e,t){return t===void 0&&(t={}),o(e)?e:(e=e.toLowerCase(),e=t.reactCompat?e.replace(a,c):e.replace(i,c),e.replace(n,s))}})),Pg=s(((e,t)=>{var n=(e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}})(Mg()),r=Ng();function i(e,t){var i={};return!e||typeof e!=`string`||(0,n.default)(e,function(e,n){e&&n&&(i[(0,r.camelCase)(e,t)]=n)}),i}i.default=i,t.exports=i})),Fg=Lg(`end`),Ig=Lg(`start`);function Lg(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 Rg(e){let t=Ig(e),n=Fg(e);if(t&&n)return{start:t,end:n}}function zg(e){return!e||typeof e!=`object`?``:`position`in e||`type`in e?Vg(e.position):`start`in e||`end`in e?Vg(e):`line`in e||`column`in e?Bg(e):``}function Bg(e){return Hg(e&&e.line)+`:`+Hg(e&&e.column)}function Vg(e){return Bg(e&&e.start)+`-`+Bg(e&&e.end)}function Hg(e){return e&&typeof e==`number`?e:1}var Ug=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&&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=zg(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}};Ug.prototype.file=``,Ug.prototype.name=``,Ug.prototype.reason=``,Ug.prototype.message=``,Ug.prototype.stack=``,Ug.prototype.column=void 0,Ug.prototype.line=void 0,Ug.prototype.ancestors=void 0,Ug.prototype.cause=void 0,Ug.prototype.fatal=void 0,Ug.prototype.place=void 0,Ug.prototype.ruleId=void 0,Ug.prototype.source=void 0;var Wg=u(Pg(),1),Gg={}.hasOwnProperty,Kg=new Map,qg=/[A-Z]/g,Jg=new Set([`table`,`tbody`,`thead`,`tfoot`,`tr`]),Yg=new Set([`td`,`th`]),Xg=`https://github.com/syntax-tree/hast-util-to-jsx-runtime`;function Zg(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=c_(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=s_(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`?kg:Og,stylePropertyNameCase:t.stylePropertyNameCase||`dom`,tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},a=Qg(i,e,void 0);return a&&typeof a!=`string`?a:i.create(e,i.Fragment,{children:a||void 0},void 0)}function Qg(e,t,n){if(t.type===`element`)return $g(e,t,n);if(t.type===`mdxFlowExpression`||t.type===`mdxTextExpression`)return e_(e,t);if(t.type===`mdxJsxFlowElement`||t.type===`mdxJsxTextElement`)return n_(e,t,n);if(t.type===`mdxjsEsm`)return t_(e,t);if(t.type===`root`)return r_(e,t,n);if(t.type===`text`)return i_(e,t)}function $g(e,t,n){let r=e.schema,i=r;t.tagName.toLowerCase()===`svg`&&r.space===`html`&&(i=kg,e.schema=i),e.ancestors.push(t);let a=m_(e,t.tagName,!1),o=l_(e,t),s=d_(e,t);return Jg.has(t.tagName)&&(s=s.filter(function(e){return typeof e==`string`?!Jh(e):!0})),a_(e,o,a,t),o_(o,s),e.ancestors.pop(),e.schema=r,e.create(t,a,o,n)}function e_(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)}h_(e,t.position)}function t_(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);h_(e,t.position)}function n_(e,t,n){let r=e.schema,i=r;t.name===`svg`&&r.space===`html`&&(i=kg,e.schema=i),e.ancestors.push(t);let a=t.name===null?e.Fragment:m_(e,t.name,!0),o=u_(e,t),s=d_(e,t);return a_(e,o,a,t),o_(o,s),e.ancestors.pop(),e.schema=r,e.create(t,a,o,n)}function r_(e,t,n){let r={};return o_(r,d_(e,t)),e.create(t,e.Fragment,r,n)}function i_(e,t){return t.value}function a_(e,t,n,r){typeof n!=`string`&&n!==e.Fragment&&e.passNode&&(t.node=r)}function o_(e,t){if(t.length>0){let n=t.length>1?t:t[0];n&&(e.children=n)}}function s_(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 c_(e,t){return n;function n(n,r,i,a){let o=Array.isArray(i.children),s=Ig(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 l_(e,t){let n={},r,i;for(i in t.properties)if(i!==`children`&&Gg.call(t.properties,i)){let a=f_(e,i,t.properties[i]);if(a){let[i,o]=a;e.tableCellAlignToStyle&&i===`align`&&typeof o==`string`&&Yg.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 u_(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 h_(e,t.position);else{let i=r.name,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 h_(e,t.position);else a=r.value===null?!0:r.value;n[i]=a}return n}function d_(e,t){let n=[],r=-1,i=e.passKeys?new Map:Kg;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=Qg(e,a,o);s!==void 0&&n.push(s)}return n}function f_(e,t,n){let r=Tg(e.schema,t);if(!(n==null||typeof n==`number`&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?Hh(n):Ag(n)),r.property===`style`){let t=typeof n==`object`?n:p_(e,String(n));return e.stylePropertyNameCase===`css`&&(t=g_(t)),[`style`,t]}return[e.elementAttributeNameCase===`react`&&r.space?xg[r.property]||r.property:r.attribute,n]}}function p_(e,t){try{return(0,Wg.default)(t,{reactCompat:!0})}catch(t){if(e.ignoreInvalidStyle)return{};let n=t,r=new Ug("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=Xg+`#cannot-parse-style-attribute`,r}}function m_(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=Kh(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=Kh(t)&&!/^[a-z]/.test(t)?{type:`Identifier`,name:t}:{type:`Literal`,value:t};if(r.type===`Literal`){let t=r.value;return Gg.call(e.components,t)?e.components[t]:t}if(e.evaluater)return e.evaluater.evaluateExpression(r);h_(e)}function h_(e,t){let n=new Ug("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=Xg+`#cannot-handle-mdx-estrees-without-createevaluater`,n}function g_(e){let t={},n;for(n in e)Gg.call(e,n)&&(t[__(n)]=e[n]);return t}function __(e){let t=e.replace(qg,v_);return t.slice(0,3)===`ms-`&&(t=`-`+t),t}function v_(e){return`-`+e.toLowerCase()}var y_={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`]},b_={};function x_(e,t){let n=t||b_;return S_(e,typeof n.includeImageAlt==`boolean`?n.includeImageAlt:!0,typeof n.includeHtml==`boolean`?n.includeHtml:!0)}function S_(e,t,n){if(w_(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 C_(e.children,t,n)}return Array.isArray(e)?C_(e,t,n):``}function C_(e,t,n){let r=[],i=-1;for(;++i<e.length;)r[i]=S_(e[i],t,n);return r.join(``)}function w_(e){return!!(e&&typeof e==`object`)}var T_=document.createElement(`i`);function E_(e){let t=`&`+e+`;`;T_.innerHTML=t;let n=T_.textContent;return n.charCodeAt(n.length-1)===59&&e!==`semi`||n===t?!1:n}function D_(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 O_(e,t){return e.length>0?(D_(e,e.length,0,t),e):t}var k_={}.hasOwnProperty;function A_(e){let t={},n=-1;for(;++n<e.length;)j_(t,e[n]);return t}function j_(e,t){let n;for(n in t){let r=(k_.call(e,n)?e[n]:void 0)||(e[n]={}),i=t[n],a;if(i)for(a in i){k_.call(r,a)||(r[a]=[]);let e=i[a];M_(r[a],Array.isArray(e)?e:e?[e]:[])}}}function M_(e,t){let n=-1,r=[];for(;++n<t.length;)(t[n].add===`after`?e:r).push(t[n]);D_(e,0,0,r)}function N_(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 P_(e){return e.replace(/[\t\n\r ]+/g,` `).replace(/^ | $/g,``).toLowerCase().toUpperCase()}var F_=K_(/[A-Za-z]/),I_=K_(/[\dA-Za-z]/),L_=K_(/[#-'*+\--9=?A-Z^-~]/);function R_(e){return e!==null&&(e<32||e===127)}var z_=K_(/\d/),B_=K_(/[\dA-Fa-f]/),V_=K_(/[!-/:-@[-`{-~]/);function J(e){return e!==null&&e<-2}function H_(e){return e!==null&&(e<0||e===32)}function U_(e){return e===-2||e===-1||e===32}var W_=K_(/\p{P}|\p{S}/u),G_=K_(/\s/);function K_(e){return t;function t(t){return t!==null&&t>-1&&e.test(String.fromCharCode(t))}}function q_(e){let t=[],n=-1,r=0,i=0;for(;++n<e.length;){let a=e.charCodeAt(n),o=``;if(a===37&&I_(e.charCodeAt(n+1))&&I_(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 J_(e,t,n,r){let i=r?r-1:1/0,a=0;return o;function o(r){return U_(r)?(e.enter(n),s(r)):t(r)}function s(r){return U_(r)&&a++<i?(e.consume(r),s):(e.exit(n),t(r))}}var Y_={tokenize:X_};function X_(e){let t=e.attempt(this.parser.constructs.contentInitial,r,i),n;return t;function r(n){if(n===null){e.consume(n);return}return e.enter(`lineEnding`),e.consume(n),e.exit(`lineEnding`),J_(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);return}return J(t)?(e.consume(t),e.exit(`chunkText`),a):(e.consume(t),o)}}var Z_={tokenize:$_},Q_={tokenize:ev};function $_(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++;return D_(t.events,a+1,0,t.events.slice(n)),t.events.length=s,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(Q_,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(Q_,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);return}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);return}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++;D_(t.events,a+1,0,t.events.slice(n)),t.events.length=e}}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 ev(e,t,n){return J_(e,e.attempt(this.parser.constructs.document,t,n),`linePrefix`,this.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)}function tv(e){if(e===null||H_(e)||G_(e))return 1;if(W_(e))return 2}function nv(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 rv={name:`attention`,resolveAll:iv,tokenize:av};function iv(e,t){let n=-1,r,i,a,o,s,c,l,u;for(;++n<e.length;)if(e[n][0]===`enter`&&e[n][1].type===`attentionSequence`&&e[n][1]._close){for(r=n;r--;)if(e[r][0]===`exit`&&e[r][1].type===`attentionSequence`&&e[r][1]._open&&t.sliceSerialize(e[r][1]).charCodeAt(0)===t.sliceSerialize(e[n][1]).charCodeAt(0)){if((e[r][1]._close||e[n][1]._open)&&(e[n][1].end.offset-e[n][1].start.offset)%3&&!((e[r][1].end.offset-e[r][1].start.offset+e[n][1].end.offset-e[n][1].start.offset)%3))continue;c=e[r][1].end.offset-e[r][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;let d={...e[r][1].end},f={...e[n][1].start};ov(d,-c),ov(f,c),o={type:c>1?`strongSequence`:`emphasisSequence`,start:d,end:{...e[r][1].end}},s={type:c>1?`strongSequence`:`emphasisSequence`,start:{...e[n][1].start},end:f},a={type:c>1?`strongText`:`emphasisText`,start:{...e[r][1].end},end:{...e[n][1].start}},i={type:c>1?`strong`:`emphasis`,start:{...o.start},end:{...s.end}},e[r][1].end={...o.start},e[n][1].start={...s.end},l=[],e[r][1].end.offset-e[r][1].start.offset&&(l=O_(l,[[`enter`,e[r][1],t],[`exit`,e[r][1],t]])),l=O_(l,[[`enter`,i,t],[`enter`,o,t],[`exit`,o,t],[`enter`,a,t]]),l=O_(l,nv(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),l=O_(l,[[`exit`,a,t],[`enter`,s,t],[`exit`,s,t],[`exit`,i,t]]),e[n][1].end.offset-e[n][1].start.offset?(u=2,l=O_(l,[[`enter`,e[n][1],t],[`exit`,e[n][1],t]])):u=0,D_(e,r-1,n-r+3,l),n=r+l.length-u-2;break}}for(n=-1;++n<e.length;)e[n][1].type===`attentionSequence`&&(e[n][1].type=`data`);return e}function av(e,t){let n=this.parser.constructs.attentionMarkers.null,r=this.previous,i=tv(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=tv(o),u=!l||l===2&&i||n.includes(o),d=!i||i===2&&l||n.includes(r);return c._open=!!(a===42?u:u&&(i||!d)),c._close=!!(a===42?d:d&&(l||!u)),t(o)}}function ov(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}var sv={name:`autolink`,tokenize:cv};function cv(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 F_(t)?(e.consume(t),o):t===64?n(t):l(t)}function o(e){return e===43||e===45||e===46||I_(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||I_(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||R_(r)?n(r):(e.consume(r),c)}function l(t){return t===64?(e.consume(t),u):L_(t)?(e.consume(t),l):n(t)}function u(e){return I_(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||I_(t))&&r++<63){let n=t===45?f:d;return e.consume(t),n}return n(t)}}var lv={partial:!0,tokenize:uv};function uv(e,t,n){return r;function r(t){return U_(t)?J_(e,i,`linePrefix`)(t):i(t)}function i(e){return e===null||J(e)?t(e):n(e)}}var dv={continuation:{tokenize:pv},exit:mv,name:`blockQuote`,tokenize:fv};function fv(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 U_(n)?(e.enter(`blockQuotePrefixWhitespace`),e.consume(n),e.exit(`blockQuotePrefixWhitespace`),e.exit(`blockQuotePrefix`),t):(e.exit(`blockQuotePrefix`),t(n))}}function pv(e,t,n){let r=this;return i;function i(t){return U_(t)?J_(e,a,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):a(t)}function a(r){return e.attempt(dv,t,n)(r)}}function mv(e){e.exit(`blockQuote`)}var hv={name:`characterEscape`,tokenize:gv};function gv(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 V_(r)?(e.enter(`characterEscapeValue`),e.consume(r),e.exit(`characterEscapeValue`),e.exit(`characterEscape`),t):n(r)}}var _v={name:`characterReference`,tokenize:vv};function vv(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=I_,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=B_,u):(e.enter(`characterReferenceValue`),a=7,o=z_,u(t))}function u(s){if(s===59&&i){let i=e.exit(`characterReferenceValue`);return o===I_&&!E_(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 yv={partial:!0,tokenize:Sv},bv={concrete:!0,name:`codeFenced`,tokenize:xv};function xv(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`),U_(t)?J_(e,d,`whitespace`)(t):d(t))}function d(n){return n===null||J(n)?(e.exit(`codeFencedFence`),r.interrupt?t(n):e.check(yv,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)):U_(t)?(e.exit(`chunkString`),e.exit(`codeFencedFenceInfo`),J_(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&&U_(t)?J_(e,v,`linePrefix`,a+1)(t):v(t)}function v(t){return t===null||J(t)?e.check(yv,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`),U_(t)?J_(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`),U_(t)?J_(e,d,`whitespace`)(t):d(t)):n(t)}function d(r){return r===null||J(r)?(e.exit(`codeFencedFence`),t(r)):n(r)}}}function Sv(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 Cv={name:`codeIndented`,tokenize:Tv},wv={partial:!0,tokenize:Ev};function Tv(e,t,n){let r=this;return i;function i(t){return e.enter(`codeIndented`),J_(e,a,`linePrefix`,5)(t)}function a(e){let t=r.events[r.events.length-1];return t&&t[1].type===`linePrefix`&&t[2].sliceSerialize(t[1],!0).length>=4?o(e):n(e)}function o(t){return t===null?c(t):J(t)?e.attempt(wv,o,c)(t):(e.enter(`codeFlowValue`),s(t))}function s(t){return t===null||J(t)?(e.exit(`codeFlowValue`),o(t)):(e.consume(t),s)}function c(n){return e.exit(`codeIndented`),t(n)}}function Ev(e,t,n){let r=this;return i;function i(t){return r.parser.lazy[r.now().line]?n(t):J(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),i):J_(e,a,`linePrefix`,5)(t)}function a(e){let a=r.events[r.events.length-1];return a&&a[1].type===`linePrefix`&&a[2].sliceSerialize(a[1],!0).length>=4?t(e):J(e)?i(e):n(e)}}var Dv={name:`codeText`,previous:kv,resolve:Ov,tokenize:Av};function Ov(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 kv(e){return e!==96||this.events[this.events.length-1][1].type===`characterEscape`}function Av(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 jv=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&&Mv(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),Mv(this.left,e)}unshift(e){this.setCursor(0),this.right.push(e)}unshiftMany(e){this.setCursor(0),Mv(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);Mv(this.right,t.reverse())}else{let t=this.right.splice(this.left.length+this.right.length-e,1/0);Mv(this.left,t.reverse())}}};function Mv(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 Nv(e){let t={},n=-1,r,i,a,o,s,c,l,u=new jv(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,Pv(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 D_(e,0,1/0,u.slice(0)),!l}function Pv(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 Fv={resolve:Lv,tokenize:Rv},Iv={partial:!0,tokenize:zv};function Lv(e){return Nv(e),e}function Rv(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(Iv,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 zv(e,t,n){let r=this;return i;function i(t){return e.exit(`chunkContent`),e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),J_(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 Bv(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||R_(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||H_(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||R_(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 Vv(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||=!U_(t),t===92?f:d)}function f(t){return t===91||t===92||t===93?(e.consume(t),s++,d):d(t)}}function Hv(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`),J_(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 Uv(e,t){let n;return r;function r(i){return J(i)?(e.enter(`lineEnding`),e.consume(i),e.exit(`lineEnding`),n=!0,r):U_(i)?J_(e,r,n?`linePrefix`:`lineSuffix`)(i):t(i)}}var Wv={name:`definition`,tokenize:Kv},Gv={partial:!0,tokenize:qv};function Kv(e,t,n){let r=this,i;return a;function a(t){return e.enter(`definition`),o(t)}function o(t){return Vv.call(r,e,s,n,`definitionLabel`,`definitionLabelMarker`,`definitionLabelString`)(t)}function s(t){return i=P_(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 H_(t)?Uv(e,l)(t):l(t)}function l(t){return Bv(e,u,n,`definitionDestination`,`definitionDestinationLiteral`,`definitionDestinationLiteralMarker`,`definitionDestinationRaw`,`definitionDestinationString`)(t)}function u(t){return e.attempt(Gv,d,d)(t)}function d(t){return U_(t)?J_(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 qv(e,t,n){return r;function r(t){return H_(t)?Uv(e,i)(t):n(t)}function i(t){return Hv(e,a,n,`definitionTitle`,`definitionTitleMarker`,`definitionTitleString`)(t)}function a(t){return U_(t)?J_(e,o,`whitespace`)(t):o(t)}function o(e){return e===null||J(e)?t(e):n(e)}}var Jv={name:`hardBreakEscape`,tokenize:Yv};function Yv(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 Xv={name:`headingAtx`,resolve:Zv,tokenize:Qv};function Zv(e,t){let n=e.length-2,r=3,i,a;return 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&&(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`},D_(e,r,n-r+1,[[`enter`,i,t],[`enter`,a,t],[`exit`,a,t],[`exit`,i,t]])),e}function Qv(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||H_(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)):U_(n)?J_(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||H_(t)?(e.exit(`atxHeadingText`),s(t)):(e.consume(t),l)}}var $v=`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(`.`),ey=[`pre`,`script`,`style`,`textarea`],ty={concrete:!0,name:`htmlFlow`,resolveTo:iy,tokenize:ay},ny={partial:!0,tokenize:sy},ry={partial:!0,tokenize:oy};function iy(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 ay(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):F_(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):F_(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 F_(t)?(e.consume(t),o=String.fromCharCode(t),g):n(t)}function g(s){if(s===null||s===47||s===62||H_(s)){let c=s===47,l=o.toLowerCase();return!c&&!a&&ey.includes(l)?(i=1,r.interrupt?t(s):O(s)):$v.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||I_(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 U_(t)?(e.consume(t),v):E(t)}function y(t){return t===47?(e.consume(t),E):t===58||t===95||F_(t)?(e.consume(t),b):U_(t)?(e.consume(t),y):E(t)}function b(t){return t===45||t===46||t===58||t===95||I_(t)?(e.consume(t),b):x(t)}function x(t){return t===61?(e.consume(t),S):U_(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):U_(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||H_(t)?x(t):(e.consume(t),w)}function T(e){return e===47||e===62||U_(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):U_(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(ny,ee,k)(t)):t===null||J(t)?(e.exit(`htmlFlowData`),k(t)):(e.consume(t),O)}function k(t){return e.check(ry,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 ey.includes(n)?(e.consume(t),L):O(t)}return F_(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 oy(e,t,n){let r=this;return i;function i(t){return J(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),a):n(t)}function a(e){return r.parser.lazy[r.now().line]?n(e):t(e)}}function sy(e,t,n){return r;function r(r){return e.enter(`lineEnding`),e.consume(r),e.exit(`lineEnding`),e.attempt(lv,t,n)}}var cy={name:`htmlText`,tokenize:ly};function ly(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):F_(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):F_(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 F_(t)?(e.consume(t),S):n(t)}function S(t){return t===45||I_(t)?(e.consume(t),S):C(t)}function C(t){return J(t)?(o=C,N(t)):U_(t)?(e.consume(t),C):M(t)}function w(t){return t===45||I_(t)?(e.consume(t),w):t===47||t===62||H_(t)?T(t):n(t)}function T(t){return t===47?(e.consume(t),M):t===58||t===95||F_(t)?(e.consume(t),E):J(t)?(o=T,N(t)):U_(t)?(e.consume(t),T):M(t)}function E(t){return t===45||t===46||t===58||t===95||I_(t)?(e.consume(t),E):D(t)}function D(t){return t===61?(e.consume(t),O):J(t)?(o=D,N(t)):U_(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)):U_(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||H_(t)?T(t):(e.consume(t),A)}function j(e){return e===47||e===62||H_(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 U_(t)?J_(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 uy={name:`labelEnd`,resolveAll:my,resolveTo:hy,tokenize:gy},dy={tokenize:_y},fy={tokenize:vy},py={tokenize:yy};function my(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&&D_(e,0,e.length,n),e}function hy(e,t){let n=e.length,r=0,i,a,o,s;for(;n--;)if(i=e[n][1],a){if(i.type===`link`||i.type===`labelLink`&&i._inactive)break;e[n][0]===`enter`&&i.type===`labelLink`&&(i._inactive=!0)}else if(o){if(e[n][0]===`enter`&&(i.type===`labelImage`||i.type===`labelLink`)&&!i._balanced&&(a=n,i.type!==`labelLink`)){r=2;break}}else i.type===`labelEnd`&&(o=n);let c={type:e[a][1].type===`labelLink`?`link`:`image`,start:{...e[a][1].start},end:{...e[e.length-1][1].end}},l={type:`label`,start:{...e[a][1].start},end:{...e[o][1].end}},u={type:`labelText`,start:{...e[a+r+2][1].end},end:{...e[o-2][1].start}};return s=[[`enter`,c,t],[`enter`,l,t]],s=O_(s,e.slice(a+1,a+r+3)),s=O_(s,[[`enter`,u,t]]),s=O_(s,nv(t.parser.constructs.insideSpan.null,e.slice(a+r+4,o-3),t)),s=O_(s,[[`exit`,u,t],e[o-2],e[o-1],[`exit`,l,t]]),s=O_(s,e.slice(o+1)),s=O_(s,[[`exit`,c,t]]),D_(e,a,e.length,s),e}function gy(e,t,n){let r=this,i=r.events.length,a,o;for(;i--;)if((r.events[i][1].type===`labelImage`||r.events[i][1].type===`labelLink`)&&!r.events[i][1]._balanced){a=r.events[i][1];break}return s;function s(t){return a?a._inactive?d(t):(o=r.parser.defined.includes(P_(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(dy,u,o?u:d)(t):t===91?e.attempt(fy,u,o?l:d)(t):o?u(t):d(t)}function l(t){return e.attempt(py,u,d)(t)}function u(e){return t(e)}function d(e){return a._balanced=!0,n(e)}}function _y(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 H_(t)?Uv(e,a)(t):a(t)}function a(t){return t===41?u(t):Bv(e,o,s,`resourceDestination`,`resourceDestinationLiteral`,`resourceDestinationLiteralMarker`,`resourceDestinationRaw`,`resourceDestinationString`,32)(t)}function o(t){return H_(t)?Uv(e,c)(t):u(t)}function s(e){return n(e)}function c(t){return t===34||t===39||t===40?Hv(e,l,n,`resourceTitle`,`resourceTitleMarker`,`resourceTitleString`)(t):u(t)}function l(t){return H_(t)?Uv(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 vy(e,t,n){let r=this;return i;function i(t){return Vv.call(r,e,a,o,`reference`,`referenceMarker`,`referenceString`)(t)}function a(e){return r.parser.defined.includes(P_(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(e):n(e)}function o(e){return n(e)}}function yy(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 by={name:`labelStartImage`,resolveAll:uy.resolveAll,tokenize:xy};function xy(e,t,n){let r=this;return i;function i(t){return e.enter(`labelImage`),e.enter(`labelImageMarker`),e.consume(t),e.exit(`labelImageMarker`),a}function a(t){return t===91?(e.enter(`labelMarker`),e.consume(t),e.exit(`labelMarker`),e.exit(`labelImage`),o):n(t)}function o(e){return e===94&&`_hiddenFootnoteSupport`in r.parser.constructs?n(e):t(e)}}var Sy={name:`labelStartLink`,resolveAll:uy.resolveAll,tokenize:Cy};function Cy(e,t,n){let r=this;return i;function i(t){return e.enter(`labelLink`),e.enter(`labelMarker`),e.consume(t),e.exit(`labelMarker`),e.exit(`labelLink`),a}function a(e){return e===94&&`_hiddenFootnoteSupport`in r.parser.constructs?n(e):t(e)}}var wy={name:`lineEnding`,tokenize:Ty};function Ty(e,t){return n;function n(n){return e.enter(`lineEnding`),e.consume(n),e.exit(`lineEnding`),J_(e,t,`linePrefix`)}}var Ey={name:`thematicBreak`,tokenize:Dy};function Dy(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`),U_(t)?J_(e,s,`whitespace`)(t):s(t))}}var Oy={continuation:{tokenize:My},exit:Py,name:`list`,tokenize:jy},ky={partial:!0,tokenize:Fy},Ay={partial:!0,tokenize:Ny};function jy(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:z_(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(Ey,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 z_(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(lv,r.interrupt?n:u,e.attempt(ky,f,d))}function u(e){return r.containerState.initialBlankLine=!0,a++,f(e)}function d(t){return U_(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 My(e,t,n){let r=this;return r.containerState._closeFlow=void 0,e.check(lv,i,a);function i(n){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,J_(e,t,`listItemIndent`,r.containerState.size+1)(n)}function a(n){return r.containerState.furtherBlankLines||!U_(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(Ay,t,o)(n))}function o(i){return r.containerState._closeFlow=!0,r.interrupt=void 0,J_(e,e.attempt(Oy,t,n),`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(i)}}function Ny(e,t,n){let r=this;return J_(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 Py(e){e.exit(this.containerState.type)}function Fy(e,t,n){let r=this;return J_(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!U_(e)&&i&&i[1].type===`listItemPrefixWhitespace`?t(e):n(e)}}var Iy={name:`setextUnderline`,resolveTo:Ly,tokenize:Ry};function Ly(e,t){let n=e.length,r,i,a;for(;n--;)if(e[n][0]===`enter`){if(e[n][1].type===`content`){r=n;break}e[n][1].type===`paragraph`&&(i=n)}else e[n][1].type===`content`&&e.splice(n,1),!a&&e[n][1].type===`definition`&&(a=n);let o={type:`setextHeading`,start:{...e[r][1].start},end:{...e[e.length-1][1].end}};return e[i][1].type=`setextHeadingText`,a?(e.splice(i,0,[`enter`,o,t]),e.splice(a+1,0,[`exit`,e[r][1],t]),e[r][1].end={...e[a][1].end}):e[r][1]=o,e.push([`exit`,o,t]),e}function Ry(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`),U_(t)?J_(e,c,`lineSuffix`)(t):c(t))}function c(r){return r===null||J(r)?(e.exit(`setextHeadingLine`),t(r)):n(r)}}var zy={tokenize:By};function By(e){let t=this,n=e.attempt(lv,r,e.attempt(this.parser.constructs.flowInitial,i,J_(e,e.attempt(this.parser.constructs.flow,i,e.attempt(Fv,i)),`linePrefix`)));return n;function r(r){if(r===null){e.consume(r);return}return e.enter(`lineEndingBlank`),e.consume(r),e.exit(`lineEndingBlank`),t.currentConstruct=void 0,n}function i(r){if(r===null){e.consume(r);return}return e.enter(`lineEnding`),e.consume(r),e.exit(`lineEnding`),t.currentConstruct=void 0,n}}var Vy={resolveAll:Gy()},Hy=Wy(`string`),Uy=Wy(`text`);function Wy(e){return{resolveAll:Gy(e===`text`?Ky: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);return}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 Gy(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 Ky(e,t){let n=0;for(;++n<=e.length;)if((n===e.length||e[n][1].type===`lineEnding`)&&e[n-1][1].type===`data`){let r=e[n-1][1],i=t.sliceStream(r),a=i.length,o=-1,s=0,c;for(;a--;){let e=i[a];if(typeof e==`string`){for(o=e.length;e.charCodeAt(o-1)===32;)s++,o--;if(o)break;o=-1}else if(e===-2)c=!0,s++;else if(e!==-1){a++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(s=0),s){let i={type:n===e.length||c||s<2?`lineSuffix`:`hardBreakTrailing`,start:{_bufferIndex:a?o:r.start._bufferIndex+o,_index:r.start._index+a,line:r.end.line,column:r.end.column-s,offset:r.end.offset-s},end:{...r.end}};r.end={...i.start},r.start.offset===r.end.offset?Object.assign(r,i):(e.splice(n,0,[`enter`,i,t],[`exit`,i,t]),n+=2)}n++}return e}var qy=c({attentionMarkers:()=>tb,contentInitial:()=>Yy,disable:()=>nb,document:()=>Jy,flow:()=>Zy,flowInitial:()=>Xy,insideSpan:()=>eb,string:()=>Qy,text:()=>$y}),Jy={42:Oy,43:Oy,45:Oy,48:Oy,49:Oy,50:Oy,51:Oy,52:Oy,53:Oy,54:Oy,55:Oy,56:Oy,57:Oy,62:dv},Yy={91:Wv},Xy={[-2]:Cv,[-1]:Cv,32:Cv},Zy={35:Xv,42:Ey,45:[Iy,Ey],60:ty,61:Iy,95:Ey,96:bv,126:bv},Qy={38:_v,92:hv},$y={[-5]:wy,[-4]:wy,[-3]:wy,33:by,38:_v,42:rv,60:[sv,cy],91:Sy,92:[Jv,hv],93:uy,95:rv,96:Dv},eb={null:[rv,Vy]},tb={null:[42,95]},nb={null:[]};function rb(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=O_(o,e),g(),o[o.length-1]===null?(w(t,0),l.events=nv(a,l.events,l),l.events):[]}function f(e,t){return ab(p(e),t)}function p(e){return ib(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(){let e;for(;r._index<o.length;){let t=o[r._index];if(typeof t==`string`)for(e=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===e&&r._bufferIndex<t.length;)_(t.charCodeAt(r._bufferIndex));else _(t)}}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&&D_(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 ib(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 ab(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=`
22
22
  `;break;case-3:o=`\r
23
23
  `;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 ob(e){let t={constructs:A_([qy,...(e||{}).extensions||[]]),content:n(Y_),defined:[],document:n(Z_),flow:n(zy),lazy:{},string:n(Hy),text:n(Uy)};return t;function n(e){return n;function n(n){return rb(t,e,n)}}}function sb(e){for(;!Nv(e););return e}var cb=/[\0\t\n\r]/g;function lb(){let e=1,t=``,n=!0,r;return i;function i(i,a,o){let s=[],c,l,u,d,f;for(i=t+(typeof i==`string`?i.toString():new TextDecoder(a||void 0).decode(i)),u=0,t=``,n&&=(i.charCodeAt(0)===65279&&u++,void 0);u<i.length;){if(cb.lastIndex=u,c=cb.exec(i),d=c&&c.index!==void 0?c.index:i.length,f=i.charCodeAt(d),!c){t=i.slice(u);break}if(f===10&&u===d&&r)s.push(-3),r=void 0;else switch(r&&=(s.push(-5),void 0),u<d&&(s.push(i.slice(u,d)),e+=d-u),f){case 0:s.push(65533),e++;break;case 9:for(l=Math.ceil(e/4)*4,s.push(-2);e++<l;)s.push(-1);break;case 10:s.push(-4),e=1;break;default:r=!0,e=1}u=d+1}return o&&(r&&s.push(-5),t&&s.push(t),s.push(null)),s}}var ub=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function db(e){return e.replace(ub,fb)}function fb(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){let e=n.charCodeAt(1),t=e===120||e===88;return N_(n.slice(t?2:1),t?16:10)}return E_(n)||e}var pb={}.hasOwnProperty;function mb(e,t,n){return t&&typeof t==`object`&&(n=t,t=void 0),hb(n)(sb(ob(n).document().write(lb()(e,t,!0))))}function hb(e){let t={transforms:[],canContainEols:[`emphasis`,`fragment`,`heading`,`paragraph`,`strong`],enter:{autolink:a(de),autolinkProtocol:T,autolinkEmail:T,atxHeading:a(se),blockQuote:a(re),characterEscape:T,characterReference:T,codeFenced:a(U),codeFencedFenceInfo:o,codeFencedFenceMeta:o,codeIndented:a(U,o),codeText:a(ie,o),codeTextData:T,data:T,codeFlowValue:T,definition:a(ae),definitionDestinationString:o,definitionLabelString:o,definitionTitleString:o,emphasis:a(oe),hardBreakEscape:a(ce),hardBreakTrailing:a(ce),htmlFlow:a(le,o),htmlFlowData:T,htmlText:a(le,o),htmlTextData:T,image:a(ue),label:o,link:a(de),listItem:a(pe),listItemValue:f,listOrdered:a(fe,d),listUnordered:a(fe),paragraph:a(me),reference:R,referenceString:o,resourceDestinationString:o,resourceTitleString:o,setextHeading:a(se),strong:a(he),thematicBreak:a(_e)},exit:{atxHeading:c(),atxHeadingSequence:x,autolink:c(),autolinkEmail:H,autolinkProtocol:ne,blockQuote:c(),characterEscapeValue:E,characterReferenceMarkerHexadecimal:B,characterReferenceMarkerNumeric:B,characterReferenceValue:te,characterReference:V,codeFenced:c(g),codeFencedFence:h,codeFencedFenceInfo:p,codeFencedFenceMeta:m,codeFlowValue:E,codeIndented:c(_),codeText:c(j),codeTextData:E,data:E,definition:c(),definitionDestinationString:b,definitionLabelString:v,definitionTitleString:y,emphasis:c(),hardBreakEscape:c(O),hardBreakTrailing:c(O),htmlFlow:c(k),htmlFlowData:E,htmlText:c(A),htmlTextData:E,image:c(N),label:F,labelText:P,lineEnding:D,link:c(M),listItem:c(),listOrdered:c(),listUnordered:c(),paragraph:c(),referenceString:z,resourceDestinationString:I,resourceTitleString:L,resource:ee,setextHeading:c(w),setextHeadingLineSequence:C,setextHeadingText:S,strong:c(),thematicBreak:c()}};_b(t,(e||{}).mdastExtensions||[]);let n={};return r;function r(e){let r={type:`root`,children:[]},a={stack:[r],tokenStack:[],config:t,enter:s,exit:l,buffer:o,resume:u,data:n},c=[],d=-1;for(;++d<e.length;)(e[d][1].type===`listOrdered`||e[d][1].type===`listUnordered`)&&(e[d][0]===`enter`?c.push(d):d=i(e,c.pop(),d));for(d=-1;++d<e.length;){let n=t[e[d][0]];pb.call(n,e[d][1].type)&&n[e[d][1].type].call(Object.assign({sliceSerialize:e[d][2].sliceSerialize},a),e[d][1])}if(a.tokenStack.length>0){let e=a.tokenStack[a.tokenStack.length-1];(e[1]||yb).call(a,void 0,e[0])}for(r.position={start:gb(e.length>0?e[0][1].start:{line:1,column:1,offset:0}),end:gb(e.length>0?e[e.length-2][1].end:{line:1,column:1,offset:0})},d=-1;++d<t.transforms.length;)r=t.transforms[d](r)||r;return r}function i(e,t,n){let r=t-1,i=-1,a=!1,o,s,c,l;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 i=r;for(s=void 0;i--;){let t=e[i];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=i}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),e.splice(s||r,0,[`exit`,o,t[2]]),r++,n++}if(t[1].type===`listItemPrefix`){let i={type:`listItem`,_spread:!1,start:Object.assign({},t[1].start),end:void 0};o=i,e.splice(r,0,[`enter`,i,t[2]]),r++,n++,c=void 0,l=!0}}}return e[t][1]._spread=a,n}function a(e,t){return n;function n(n){s.call(this,e(n),n),t&&t.call(this,n)}}function o(){this.stack.push({type:`fragment`,children:[]})}function s(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:gb(t.start),end:void 0}}function c(e){return t;function t(t){e&&e.call(this,t),l.call(this,t)}}function l(e,t){let n=this.stack.pop(),r=this.tokenStack.pop();if(r)r[0].type!==e.type&&(t?t.call(this,e,r[0]):(r[1]||yb).call(this,e,r[0]));else throw Error("Cannot close `"+e.type+"` ("+zg({start:e.start,end:e.end})+`): it’s not open`);n.position.end=gb(e.end)}function u(){return x_(this.stack.pop())}function d(){this.data.expectingFirstListItemValue=!0}function f(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 p(){let e=this.resume(),t=this.stack[this.stack.length-1];t.lang=e}function m(){let e=this.resume(),t=this.stack[this.stack.length-1];t.meta=e}function h(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function g(){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 _(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e.replace(/(\r?\n|\r)$/g,``)}function v(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.label=t,n.identifier=P_(this.sliceSerialize(e)).toLowerCase()}function y(){let e=this.resume(),t=this.stack[this.stack.length-1];t.title=e}function b(){let e=this.resume(),t=this.stack[this.stack.length-1];t.url=e}function x(e){let t=this.stack[this.stack.length-1];t.depth||=this.sliceSerialize(e).length}function S(){this.data.setextHeadingSlurpLineEnding=!0}function C(e){let t=this.stack[this.stack.length-1];t.depth=this.sliceSerialize(e).codePointAt(0)===61?1:2}function w(){this.data.setextHeadingSlurpLineEnding=void 0}function T(e){let t=this.stack[this.stack.length-1].children,n=t[t.length-1];(!n||n.type!==`text`)&&(n=ge(),n.position={start:gb(e.start),end:void 0},t.push(n)),this.stack.push(n)}function E(e){let t=this.stack.pop();t.value+=this.sliceSerialize(e),t.position.end=gb(e.end)}function D(e){let n=this.stack[this.stack.length-1];if(this.data.atHardBreak){let t=n.children[n.children.length-1];t.position.end=gb(e.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(n.type)&&(T.call(this,e),E.call(this,e))}function O(){this.data.atHardBreak=!0}function k(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e}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.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 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(e){let t=this.sliceSerialize(e),n=this.stack[this.stack.length-2];n.label=db(t),n.identifier=P_(t).toLowerCase()}function F(){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 I(){let e=this.resume(),t=this.stack[this.stack.length-1];t.url=e}function L(){let e=this.resume(),t=this.stack[this.stack.length-1];t.title=e}function ee(){this.data.inReference=void 0}function R(){this.data.referenceType=`collapsed`}function z(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.label=t,n.identifier=P_(this.sliceSerialize(e)).toLowerCase(),this.data.referenceType=`full`}function B(e){this.data.characterReferenceType=e.type}function te(e){let t=this.sliceSerialize(e),n=this.data.characterReferenceType,r;n?(r=N_(t,n===`characterReferenceMarkerNumeric`?10:16),this.data.characterReferenceType=void 0):r=E_(t);let i=this.stack[this.stack.length-1];i.value+=r}function V(e){let t=this.stack.pop();t.position.end=gb(e.end)}function ne(e){E.call(this,e);let t=this.stack[this.stack.length-1];t.url=this.sliceSerialize(e)}function H(e){E.call(this,e);let t=this.stack[this.stack.length-1];t.url=`mailto:`+this.sliceSerialize(e)}function re(){return{type:`blockquote`,children:[]}}function U(){return{type:`code`,lang:null,meta:null,value:``}}function ie(){return{type:`inlineCode`,value:``}}function ae(){return{type:`definition`,identifier:``,label:null,title:null,url:``}}function oe(){return{type:`emphasis`,children:[]}}function se(){return{type:`heading`,depth:0,children:[]}}function ce(){return{type:`break`}}function le(){return{type:`html`,value:``}}function ue(){return{type:`image`,title:null,url:``,alt:null}}function de(){return{type:`link`,title:null,url:``,children:[]}}function fe(e){return{type:`list`,ordered:e.type===`listOrdered`,start:null,spread:e._spread,children:[]}}function pe(e){return{type:`listItem`,spread:e._spread,checked:null,children:[]}}function me(){return{type:`paragraph`,children:[]}}function he(){return{type:`strong`,children:[]}}function ge(){return{type:`text`,value:``}}function _e(){return{type:`thematicBreak`}}}function gb(e){return{line:e.line,column:e.column,offset:e.offset}}function _b(e,t){let n=-1;for(;++n<t.length;){let r=t[n];Array.isArray(r)?_b(e,r):vb(e,r)}}function vb(e,t){let n;for(n in t)if(pb.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`enter`:case`exit`:{let r=t[n];r&&Object.assign(e[n],r);break}}}function yb(e,t){throw Error(e?"Cannot close `"+e.type+"` ("+zg({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+zg({start:t.start,end:t.end})+`) is open`:"Cannot close document, a token (`"+t.type+"`, "+zg({start:t.start,end:t.end})+`) is still open`)}function bb(e){let t=this;t.parser=n;function n(n){return mb(n,{...t.data(`settings`),...e,extensions:t.data(`micromarkExtensions`)||[],mdastExtensions:t.data(`fromMarkdownExtensions`)||[]})}}function xb(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 Sb(e,t){let n={type:`element`,tagName:`br`,properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:`text`,value:`
@@ -8,7 +8,7 @@
8
8
  <title>Agentboard</title>
9
9
  <link rel="apple-touch-icon" href="/icons/pwa-192x192.png" />
10
10
  <meta name="theme-color" content="#0f172a" />
11
- <script type="module" crossorigin src="/assets/index-C8NRuYgE.js"></script>
11
+ <script type="module" crossorigin src="/assets/index-CwBVZ17p.js"></script>
12
12
  <link rel="stylesheet" crossorigin href="/assets/index-D9NZjKbA.css">
13
13
  <link rel="manifest" href="/manifest.webmanifest"></head>
14
14
  <body>
package/dist/client/sw.js CHANGED
@@ -1 +1 @@
1
- if(!self.define){let e,n={};const i=(i,o)=>(i=new URL(i+".js",o).href,n[i]||new Promise(n=>{if("document"in self){const e=document.createElement("script");e.src=i,e.onload=n,document.head.appendChild(e)}else e=i,importScripts(i),n()}).then(()=>{let e=n[i];if(!e)throw new Error(`Module ${i} didn’t register its module`);return e}));self.define=(o,s)=>{const r=e||("document"in self?document.currentScript.src:"")||location.href;if(n[r])return;let f={};const t=e=>i(e,r),d={module:{uri:r},exports:f,require:t};n[r]=Promise.all(o.map(e=>d[e]||t(e))).then(e=>(s(...e),f))}}define(["./workbox-8c29f6e4"],function(e){"use strict";self.skipWaiting(),e.clientsClaim(),e.precacheAndRoute([{url:"index.html",revision:"8ec877e44b22d76610b3be06277ff6c4"},{url:"favicon.svg",revision:"12048a608dedfc53518ddc59c07e41b6"},{url:"icons/pwa-512x512.png",revision:"eb82042b3e4ed505f3efe1b79622d998"},{url:"icons/pwa-192x192.png",revision:"affb57c15619ee7223d1adea372ad514"},{url:"fonts/jetbrains-mono-vietnamese-wght-normal.woff2",revision:"ddf99e6e35c6ee9f00a41d2567b0e77f"},{url:"fonts/jetbrains-mono-latin-wght-normal.woff2",revision:"b058178d7f309414f8f856b99fd80d9b"},{url:"fonts/jetbrains-mono-latin-ext-wght-normal.woff2",revision:"e36841ed93d5bfe6b1d487d18ad7e90b"},{url:"fonts/jetbrains-mono-greek-wght-normal.woff2",revision:"51671ed9eb64e29390d4791ab0023c8e"},{url:"fonts/jetbrains-mono-cyrillic-wght-normal.woff2",revision:"615bf869ebeb5998734d81fc8958116c"},{url:"fonts/jetbrains-mono-cyrillic-ext-wght-normal.woff2",revision:"742dd0628e0118d32dccf0437900670b"},{url:"assets/workbox-window.prod.es5-Bq4GJJid.js",revision:null},{url:"assets/index-D9NZjKbA.css",revision:null},{url:"assets/index-C8NRuYgE.js",revision:null},{url:"icons/pwa-192x192.png",revision:"affb57c15619ee7223d1adea372ad514"},{url:"icons/pwa-512x512.png",revision:"eb82042b3e4ed505f3efe1b79622d998"},{url:"manifest.webmanifest",revision:"b6d4b3666a548fa0f0c6919d31ec2eee"}],{}),e.cleanupOutdatedCaches(),e.registerRoute(new e.NavigationRoute(e.createHandlerBoundToURL("/index.html"),{denylist:[/^\/api(?:\/|$)/,/^\/ws(?:\/|$)/]}))});
1
+ if(!self.define){let e,n={};const i=(i,o)=>(i=new URL(i+".js",o).href,n[i]||new Promise(n=>{if("document"in self){const e=document.createElement("script");e.src=i,e.onload=n,document.head.appendChild(e)}else e=i,importScripts(i),n()}).then(()=>{let e=n[i];if(!e)throw new Error(`Module ${i} didn’t register its module`);return e}));self.define=(o,s)=>{const r=e||("document"in self?document.currentScript.src:"")||location.href;if(n[r])return;let t={};const f=e=>i(e,r),d={module:{uri:r},exports:t,require:f};n[r]=Promise.all(o.map(e=>d[e]||f(e))).then(e=>(s(...e),t))}}define(["./workbox-8c29f6e4"],function(e){"use strict";self.skipWaiting(),e.clientsClaim(),e.precacheAndRoute([{url:"index.html",revision:"fed704b372ce42532112a92acea18220"},{url:"favicon.svg",revision:"12048a608dedfc53518ddc59c07e41b6"},{url:"icons/pwa-512x512.png",revision:"eb82042b3e4ed505f3efe1b79622d998"},{url:"icons/pwa-192x192.png",revision:"affb57c15619ee7223d1adea372ad514"},{url:"fonts/jetbrains-mono-vietnamese-wght-normal.woff2",revision:"ddf99e6e35c6ee9f00a41d2567b0e77f"},{url:"fonts/jetbrains-mono-latin-wght-normal.woff2",revision:"b058178d7f309414f8f856b99fd80d9b"},{url:"fonts/jetbrains-mono-latin-ext-wght-normal.woff2",revision:"e36841ed93d5bfe6b1d487d18ad7e90b"},{url:"fonts/jetbrains-mono-greek-wght-normal.woff2",revision:"51671ed9eb64e29390d4791ab0023c8e"},{url:"fonts/jetbrains-mono-cyrillic-wght-normal.woff2",revision:"615bf869ebeb5998734d81fc8958116c"},{url:"fonts/jetbrains-mono-cyrillic-ext-wght-normal.woff2",revision:"742dd0628e0118d32dccf0437900670b"},{url:"assets/workbox-window.prod.es5-Bq4GJJid.js",revision:null},{url:"assets/index-D9NZjKbA.css",revision:null},{url:"assets/index-CwBVZ17p.js",revision:null},{url:"icons/pwa-192x192.png",revision:"affb57c15619ee7223d1adea372ad514"},{url:"icons/pwa-512x512.png",revision:"eb82042b3e4ed505f3efe1b79622d998"},{url:"manifest.webmanifest",revision:"b6d4b3666a548fa0f0c6919d31ec2eee"}],{}),e.cleanupOutdatedCaches(),e.registerRoute(new e.NavigationRoute(e.createHandlerBoundToURL("/index.html"),{denylist:[/^\/api(?:\/|$)/,/^\/ws(?:\/|$)/]}))});
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gbasin/agentboard-linux-arm64",
3
- "version": "0.9.1",
3
+ "version": "0.9.2",
4
4
  "description": "agentboard binary for linux-arm64",
5
5
  "repository": {
6
6
  "type": "git",