@cerefox/memory 1.11.0 → 1.12.1

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.
@@ -38,7 +38,7 @@ var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=
38
38
  `},fu=function(){var e=parseInt(document.body.getAttribute(`data-scroll-locked`)||`0`,10);return isFinite(e)?e:0},pu=function(){w.useEffect(function(){return document.body.setAttribute(uu,(fu()+1).toString()),function(){var e=fu()-1;e<=0?document.body.removeAttribute(uu):document.body.setAttribute(uu,e.toString())}},[])},mu=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,i=r===void 0?`margin`:r;pu();var a=w.useMemo(function(){return cu(i)},[i]);return w.createElement(lu,{styles:du(a,!t,i,n?``:`!important`)})},hu=!1;if(typeof window<`u`)try{var gu=Object.defineProperty({},"passive",{get:function(){return hu=!0,!0}});window.addEventListener(`test`,gu,gu),window.removeEventListener(`test`,gu,gu)}catch{hu=!1}var _u=hu?{passive:!1}:!1,vu=function(e){return e.tagName===`TEXTAREA`},yu=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!==`hidden`&&!(n.overflowY===n.overflowX&&!vu(e)&&n[t]===`visible`)},bu=function(e){return yu(e,`overflowY`)},xu=function(e){return yu(e,`overflowX`)},Su=function(e,t){var n=t.ownerDocument,r=t;do{if(typeof ShadowRoot<`u`&&r instanceof ShadowRoot&&(r=r.host),Tu(e,r)){var i=Eu(e,r);if(i[1]>i[2])return!0}r=r.parentNode}while(r&&r!==n.body);return!1},Cu=function(e){return[e.scrollTop,e.scrollHeight,e.clientHeight]},wu=function(e){return[e.scrollLeft,e.scrollWidth,e.clientWidth]},Tu=function(e,t){return e===`v`?bu(t):xu(t)},Eu=function(e,t){return e===`v`?Cu(t):wu(t)},Du=function(e,t){return e===`h`&&t===`rtl`?-1:1},Ou=function(e,t,n,r,i){var a=Du(e,window.getComputedStyle(t).direction),o=a*r,s=n.target,c=t.contains(s),l=!1,u=o>0,d=0,f=0;do{if(!s)break;var p=Eu(e,s),m=p[0],h=p[1]-p[2]-a*m;(m||h)&&Tu(e,s)&&(d+=h,f+=m);var g=s.parentNode;s=g&&g.nodeType===Node.DOCUMENT_FRAGMENT_NODE?g.host:g}while(!c&&s!==document.body||c&&(t.contains(s)||t===s));return(u&&(i&&Math.abs(d)<1||!i&&o>d)||!u&&(i&&Math.abs(f)<1||!i&&-o>f))&&(l=!0),l},ku=function(e){return`changedTouches`in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},Au=function(e){return[e.deltaX,e.deltaY]},ju=function(e){return e&&`current`in e?e.current:e},Mu=function(e,t){return e[0]===t[0]&&e[1]===t[1]},Nu=function(e){return`
39
39
  .block-interactivity-${e} {pointer-events: none;}
40
40
  .allow-interactivity-${e} {pointer-events: all;}
41
- `},Pu=0,Fu=[];function Iu(e){var t=w.useRef([]),n=w.useRef([0,0]),r=w.useRef(),i=w.useState(Pu++)[0],a=w.useState(iu)[0],o=w.useRef(e);w.useEffect(function(){o.current=e},[e]),w.useEffect(function(){if(e.inert){document.body.classList.add(`block-interactivity-${i}`);var t=Nl([e.lockRef.current],(e.shards||[]).map(ju),!0).filter(Boolean);return t.forEach(function(e){return e.classList.add(`allow-interactivity-${i}`)}),function(){document.body.classList.remove(`block-interactivity-${i}`),t.forEach(function(e){return e.classList.remove(`allow-interactivity-${i}`)})}}},[e.inert,e.lockRef.current,e.shards]);var s=w.useCallback(function(e,t){if(`touches`in e&&e.touches.length===2||e.type===`wheel`&&e.ctrlKey)return!o.current.allowPinchZoom;var i=ku(e),a=n.current,s=`deltaX`in e?e.deltaX:a[0]-i[0],c=`deltaY`in e?e.deltaY:a[1]-i[1],l,u=e.target,d=Math.abs(s)>Math.abs(c)?`h`:`v`;if(`touches`in e&&d===`h`&&u.type===`range`)return!1;var f=window.getSelection(),p=f&&f.anchorNode;if(p&&(p===u||p.contains(u)))return!1;var m=Su(d,u);if(!m)return!0;if(m?l=d:(l=d===`v`?`h`:`v`,m=Su(d,u)),!m)return!1;if(!r.current&&`changedTouches`in e&&(s||c)&&(r.current=l),!l)return!0;var h=r.current||l;return Ou(h,t,e,h===`h`?s:c,!0)},[]),c=w.useCallback(function(e){var n=e;if(!(!Fu.length||Fu[Fu.length-1]!==a)){var r=`deltaY`in n?Au(n):ku(n),i=t.current.filter(function(e){return e.name===n.type&&(e.target===n.target||n.target===e.shadowParent)&&Mu(e.delta,r)})[0];if(i&&i.should){n.cancelable&&n.preventDefault();return}if(!i){var c=(o.current.shards||[]).map(ju).filter(Boolean).filter(function(e){return e.contains(n.target)});(c.length>0?s(n,c[0]):!o.current.noIsolation)&&n.cancelable&&n.preventDefault()}}},[]),l=w.useCallback(function(e,n,r,i){var a={name:e,delta:n,target:r,should:i,shadowParent:Lu(r)};t.current.push(a),setTimeout(function(){t.current=t.current.filter(function(e){return e!==a})},1)},[]),u=w.useCallback(function(e){n.current=ku(e),r.current=void 0},[]),d=w.useCallback(function(t){l(t.type,Au(t),t.target,s(t,e.lockRef.current))},[]),f=w.useCallback(function(t){l(t.type,ku(t),t.target,s(t,e.lockRef.current))},[]);w.useEffect(function(){return Fu.push(a),e.setCallbacks({onScrollCapture:d,onWheelCapture:d,onTouchMoveCapture:f}),document.addEventListener(`wheel`,c,_u),document.addEventListener(`touchmove`,c,_u),document.addEventListener(`touchstart`,u,_u),function(){Fu=Fu.filter(function(e){return e!==a}),document.removeEventListener(`wheel`,c,_u),document.removeEventListener(`touchmove`,c,_u),document.removeEventListener(`touchstart`,u,_u)}},[]);var p=e.removeScrollBar,m=e.inert;return w.createElement(w.Fragment,null,m?w.createElement(a,{styles:Nu(i)}):null,p?w.createElement(mu,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function Lu(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}var Ru=ql(Jl,Iu),zu=w.forwardRef(function(e,t){return w.createElement(Xl,jl({},e,{ref:t,sideCar:Ru}))});zu.classNames=Xl.classNames;function Bu({keepMounted:e,keepMountedMode:t=`activity`,opened:n,onClose:r,id:i,transitionProps:a,onExitTransitionEnd:o,onEnterTransitionEnd:s,trapFocus:c,closeOnEscape:l,returnFocus:u,closeOnClickOutside:d,withinPortal:f,portalProps:p,lockScroll:m,children:h,zIndex:g,shadow:_,padding:v,__vars:y,unstyled:b,removeScrollProps:x,...S}){let{_id:C,titleMounted:w,bodyMounted:T,shouldLockScroll:E,setTitleMounted:D,setBodyMounted:O}=Al({id:i,transitionProps:a,opened:n,trapFocus:c,closeOnEscape:l,onClose:r,returnFocus:u}),{key:k,...A}=x||{};return(0,G.jsx)(Ac,{...p,withinPortal:f,children:(0,G.jsx)(Dl,{value:{opened:n,onClose:r,closeOnClickOutside:d,onExitTransitionEnd:o,onEnterTransitionEnd:s,transitionProps:{...a,keepMounted:e,keepMountedMode:t},getTitleId:()=>`${C}-title`,getBodyId:()=>`${C}-body`,titleMounted:w,bodyMounted:T,setTitleMounted:D,setBodyMounted:O,trapFocus:c,closeOnEscape:l,zIndex:g,unstyled:b},children:(0,G.jsx)(zu,{enabled:E&&m,...A,children:(0,G.jsx)(J,{...S,id:C,__vars:{...y,"--mb-z-index":(g||N(`modal`)).toString(),"--mb-shadow":V(_),"--mb-padding":L(v)},children:h})},k)})})}Bu.displayName=`@mantine/core/ModalBase`;function Vu(){let e=Ol();return(0,w.useEffect)(()=>(e.setBodyMounted(!0),()=>e.setBodyMounted(!1)),[]),e.getBodyId()}var Hu={title:`m_615af6c9`,header:`m_b5489c3c`,inner:`m_60c222c7`,content:`m_fd1ab0aa`,close:`m_606cb269`,body:`m_5df29311`};function Uu({className:e,...t}){let n=Vu(),r=Ol();return(0,G.jsx)(J,{id:n,className:gt({[Hu.body]:!r.unstyled},e),...t})}Uu.displayName=`@mantine/core/ModalBaseBody`;function Wu({className:e,onClick:t,...n}){let r=Ol();return(0,G.jsx)(xl,{...n,onClick:e=>{r.onClose(),t?.(e)},className:gt({[Hu.close]:!r.unstyled},e),unstyled:r.unstyled})}Wu.displayName=`@mantine/core/ModalBaseCloseButton`;function Gu({transitionProps:e,className:t,innerProps:n,onKeyDown:r,style:i,ref:a,...o}){let s=Ol();return(0,G.jsx)(Ic,{mounted:s.opened,transition:`pop`,...s.transitionProps,onExited:()=>{s.onExitTransitionEnd?.(),s.transitionProps?.onExited?.()},onEntered:()=>{s.onEnterTransitionEnd?.(),s.transitionProps?.onEntered?.()},...e,children:e=>(0,G.jsx)(`div`,{...n,className:gt({[Hu.inner]:!s.unstyled},n.className),children:(0,G.jsx)(Uc,{active:s.opened&&s.trapFocus,innerRef:a,children:(0,G.jsx)(fc,{...o,component:`section`,role:`dialog`,tabIndex:-1,"aria-modal":!0,"aria-describedby":s.bodyMounted?s.getBodyId():void 0,"aria-labelledby":s.titleMounted?s.getTitleId():void 0,style:[i,e],className:gt({[Hu.content]:!s.unstyled},t),unstyled:s.unstyled,children:o.children})})})})}Gu.displayName=`@mantine/core/ModalBaseContent`;function Ku({className:e,...t}){let n=Ol();return(0,G.jsx)(J,{component:`header`,className:gt({[Hu.header]:!n.unstyled},e),...t})}Ku.displayName=`@mantine/core/ModalBaseHeader`;var qu={duration:200,timingFunction:`ease`,transition:`fade`};function Ju(e){let t=Ol();return{...qu,...t.transitionProps,...e}}function Yu({onClick:e,transitionProps:t,style:n,visible:r,...i}){let a=Ol(),o=Ju(t);return(0,G.jsx)(Ic,{mounted:r===void 0?a.opened:r,...o,transition:`fade`,children:t=>(0,G.jsx)(Tc,{fixed:!0,style:[n,t],zIndex:a.zIndex,unstyled:a.unstyled,onClick:t=>{e?.(t),a.closeOnClickOutside&&a.onClose()},...i})})}Yu.displayName=`@mantine/core/ModalBaseOverlay`;function Xu(){let e=Ol();return(0,w.useEffect)(()=>(e.setTitleMounted(!0),()=>e.setTitleMounted(!1)),[]),e.getTitleId()}function Zu({className:e,...t}){let n=Xu(),r=Ol();return(0,G.jsx)(J,{component:`h2`,className:gt({[Hu.title]:!r.unstyled},e),id:n,...t})}Zu.displayName=`@mantine/core/ModalBaseTitle`;function Qu({children:e}){return(0,G.jsx)(G.Fragment,{children:e})}var $u=(0,w.createContext)({size:`sm`}),ed=q(e=>{let t=K(`InputClearButton`,null,e),{size:n,variant:r,vars:i,classNames:a,styles:o,...s}=t,c=(0,w.use)($u),{resolvedClassNames:l,resolvedStyles:u}=Pn({classNames:a,styles:o,props:t});return(0,G.jsx)(xl,{variant:r||`transparent`,size:n||c?.size||`sm`,classNames:l,styles:u,__staticSelector:`InputClearButton`,style:{pointerEvents:`all`,background:`var(--input-bg)`,...s.style},...s})});ed.displayName=`@mantine/core/InputClearButton`;var td={xs:7,sm:8,md:10,lg:12,xl:15};function nd({__clearable:e,__clearSection:t,rightSection:n,__defaultRightSection:r,size:i=`sm`,__clearSectionMode:a=`both`}){let o=e&&t;return a===`rightSection`?n===null?null:n||r:a===`clear`?n===null?null:o||r:o&&(n||r)?(0,G.jsxs)(`div`,{"data-combined-clear-section":!0,style:{display:`flex`,gap:2,alignItems:`center`,paddingInlineEnd:td[i]},children:[o,n||r]}):n===null?null:n||o||r}var rd=(0,w.createContext)({offsetBottom:!1,offsetTop:!1,describedBy:void 0,getStyles:null,inputId:void 0,labelId:void 0}),id={wrapper:`m_6c018570`,input:`m_8fb7ebe7`,bottomSection:`m_93f4ed57`,section:`m_82577fc2`,placeholder:`m_88bacfd0`,root:`m_46b77525`,label:`m_8fdc1311`,required:`m_78a94662`,error:`m_8f816625`,success:`m_9d9d40e0`,description:`m_fe47ce59`},ad=mt((e,{size:t})=>({description:{"--input-description-size":t===void 0?void 0:`calc(${z(t)} - ${v(2)})`}})),od=q(e=>{let t=K(`InputDescription`,null,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,__staticSelector:c,__inheritStyles:l=!0,attributes:u,...d}=K(`InputDescription`,null,t),f=(0,w.use)(rd),p=Jn({name:[`InputWrapper`,c],props:t,classes:id,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:u,rootSelector:`description`,vars:s,varsResolver:ad});return(0,G.jsx)(J,{component:`p`,...(l&&f?.getStyles||p)(`description`,f?.getStyles?{className:r,style:i}:void 0),...d})});od.classes=id,od.varsResolver=ad,od.displayName=`@mantine/core/InputDescription`;var sd=mt((e,{size:t})=>({error:{"--input-error-size":t===void 0?void 0:`calc(${z(t)} - ${v(2)})`}})),cd=q(e=>{let t=K(`InputError`,null,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,attributes:c,__staticSelector:l,__inheritStyles:u=!0,...d}=t,f=Jn({name:[`InputWrapper`,l],props:t,classes:id,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:c,rootSelector:`error`,vars:s,varsResolver:sd}),p=(0,w.use)(rd);return(0,G.jsx)(J,{component:`p`,...(u&&p?.getStyles||f)(`error`,p?.getStyles?{className:r,style:i}:void 0),...d})});cd.classes=id,cd.varsResolver=sd,cd.displayName=`@mantine/core/InputError`;var ld={labelElement:`label`},ud=mt((e,{size:t})=>({label:{"--input-label-size":z(t),"--input-asterisk-color":void 0}})),dd=q(e=>{let t=K(`InputLabel`,ld,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,labelElement:c,required:l,htmlFor:u,onMouseDown:d,children:f,__staticSelector:p,mod:m,attributes:h,...g}=t,_=Jn({name:[`InputWrapper`,p],props:t,classes:id,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:h,rootSelector:`label`,vars:s,varsResolver:ud}),v=(0,w.use)(rd),y=v?.getStyles||_,b=g.component||c,x=typeof b!=`string`||b===`label`;return(0,G.jsxs)(J,{...y(`label`,v?.getStyles?{className:r,style:i}:void 0),component:c,htmlFor:x?u:void 0,mod:[{required:l},m],onMouseDown:e=>{d?.(e),!e.defaultPrevented&&e.detail>1&&e.preventDefault()},...g,children:[f,l&&(0,G.jsx)(`span`,{...y(`required`),"aria-hidden":!0,children:` *`})]})});dd.classes=id,dd.varsResolver=ud,dd.displayName=`@mantine/core/InputLabel`;var fd=q(e=>{let t=K(`InputPlaceholder`,null,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,__staticSelector:c,error:l,mod:u,attributes:d,...f}=t;return(0,G.jsx)(J,{...Jn({name:[`InputPlaceholder`,c],props:t,classes:id,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:d,rootSelector:`placeholder`})(`placeholder`),mod:[{error:!!l},u],component:`span`,...f})});fd.classes=id,fd.displayName=`@mantine/core/InputPlaceholder`;var pd=mt((e,{size:t})=>({success:{"--input-success-size":t===void 0?void 0:`calc(${z(t)} - ${v(2)})`}})),md=q(e=>{let t=K(`InputSuccess`,null,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,attributes:c,__staticSelector:l,__inheritStyles:u=!0,...d}=t,f=Jn({name:[`InputWrapper`,l],props:t,classes:id,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:c,rootSelector:`success`,vars:s,varsResolver:pd}),p=(0,w.use)(rd);return(0,G.jsx)(J,{component:`p`,...(u&&p?.getStyles||f)(`success`,p?.getStyles?{className:r,style:i}:void 0),...d})});md.classes=id,md.varsResolver=pd,md.displayName=`@mantine/core/InputSuccess`;function hd(e,{hasDescription:t,hasError:n}){let r=e.findIndex(e=>e===`input`),i=e.slice(0,r),a=e.slice(r+1),o=t&&i.includes(`description`)||n&&i.includes(`error`);return{offsetBottom:t&&a.includes(`description`)||n&&a.includes(`error`),offsetTop:o}}var gd={labelElement:`label`,inputContainer:e=>e,inputWrapperOrder:[`label`,`description`,`input`,`error`]},_d=mt((e,{size:t})=>({label:{"--input-label-size":z(t),"--input-asterisk-color":void 0},error:{"--input-error-size":t===void 0?void 0:`calc(${z(t)} - ${v(2)})`},success:{"--input-success-size":t===void 0?void 0:`calc(${z(t)} - ${v(2)})`},description:{"--input-description-size":t===void 0?void 0:`calc(${z(t)} - ${v(2)})`}})),vd=q(e=>{let t=K(`InputWrapper`,gd,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,size:c,variant:l,__staticSelector:u,inputContainer:d,inputWrapperOrder:f,label:p,error:m,success:h,description:g,labelProps:_,descriptionProps:v,errorProps:y,successProps:b,labelElement:x,children:S,withAsterisk:C,id:T,required:E,__stylesApiProps:D,mod:O,attributes:k,...A}=t,j=Jn({name:[`InputWrapper`,u],props:D||t,classes:id,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:k,vars:s,varsResolver:_d}),M={size:c,variant:l,__staticSelector:u},N=De(T),P=typeof C==`boolean`?C:E,F=y?.id||`${N}-error`,I=b?.id||`${N}-success`,L=v?.id||`${N}-description`,R=N,z=!!m&&typeof m!=`boolean`,B=!!h&&typeof h!=`boolean`&&!m,V=!!g,H=z&&f.includes(`error`),ee=B&&f.includes(`error`),te=V&&f.includes(`description`),U=`${H?F:``} ${ee?I:``} ${te?L:``}`,ne=U.trim().length>0?U.trim():void 0,re=_?.id||`${N}-label`,ie=p&&(0,G.jsx)(dd,{labelElement:x,id:re,htmlFor:R,required:P,...M,..._,children:p},`label`),ae=V&&(0,G.jsx)(od,{...v,...M,size:v?.size||M.size,id:v?.id||L,children:g},`description`),oe=(0,G.jsx)(w.Fragment,{children:d(S)},`input`),se=z&&(0,w.createElement)(cd,{...y,...M,size:y?.size||M.size,key:`error`,id:y?.id||F},m),ce=B&&(0,w.createElement)(md,{...b,...M,size:b?.size||M.size,key:`success`,id:b?.id||I},h),le=f.map(e=>{switch(e){case`label`:return ie;case`input`:return oe;case`description`:return ae;case`error`:return se||ce;default:return null}});return(0,G.jsx)(rd,{value:{getStyles:j,describedBy:ne,inputId:R,labelId:re,...hd(f,{hasDescription:V,hasError:z||B})},children:(0,G.jsx)(J,{variant:l,size:c,mod:[{error:!!m,success:!!h&&!m},O],id:x===`label`?void 0:T,...j(`root`),...A,children:le})})});vd.classes=id,vd.varsResolver=_d,vd.displayName=`@mantine/core/InputWrapper`;var yd={variant:`default`,leftSectionPointerEvents:`none`,rightSectionPointerEvents:`none`,withAria:!0,withErrorStyles:!0,withSuccessStyles:!0,size:`sm`,loading:!1,loadingPosition:`right`},bd=mt((e,t,n)=>({wrapper:{"--input-margin-top":n.offsetTop?`calc(var(--mantine-spacing-xs) / 2)`:void 0,"--input-margin-bottom":n.offsetBottom?`calc(var(--mantine-spacing-xs) / 2)`:void 0,"--input-height":I(t.size,`input-height`),"--input-fz":z(t.size),"--input-radius":t.radius===void 0?void 0:R(t.radius),"--input-left-section-width":t.leftSectionWidth===void 0?void 0:v(t.leftSectionWidth),"--input-right-section-width":t.rightSectionWidth===void 0?void 0:v(t.rightSectionWidth),"--input-padding-y":t.multiline?I(t.size,`input-padding-y`):void 0,"--input-left-section-pointer-events":t.leftSectionPointerEvents,"--input-right-section-pointer-events":t.rightSectionPointerEvents}})),xd=Ar(e=>{let t=K(`Input`,yd,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,required:s,__staticSelector:c,__stylesApiProps:l,size:u,wrapperProps:d,error:f,success:p,disabled:m,leftSection:h,leftSectionProps:g,leftSectionWidth:_,rightSection:v,rightSectionProps:y,rightSectionWidth:b,rightSectionPointerEvents:x,leftSectionPointerEvents:S,variant:C,vars:T,pointer:E,multiline:D,radius:O,id:k,withAria:A,withErrorStyles:j,withSuccessStyles:M,mod:N,inputSize:P,attributes:F,__clearSection:I,__clearable:L,__clearSectionMode:R,__defaultRightSection:z,loading:B,loadingPosition:V,__bottomSection:H,__bottomSectionProps:ee,rootRef:te,dir:U,...ne}=t,{styleProps:re,rest:ie}=tr(ne),ae=(0,w.use)(rd),oe={offsetBottom:ae?.offsetBottom,offsetTop:ae?.offsetTop},se=Jn({name:[`Input`,c],props:l||t,classes:id,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:F,stylesCtx:oe,rootSelector:`wrapper`,vars:T,varsResolver:bd}),ce=A?{required:s,disabled:m,"aria-invalid":f?!0:void 0,"aria-describedby":ae?.describedBy,id:ae?.inputId||k}:{},le=B?(0,G.jsx)(cl,{size:V===`left`?`calc(var(--input-left-section-size) / 2)`:`calc(var(--input-right-section-size) / 2)`}):null,W=B&&V===`left`?le:h,ue=nd({__clearable:L,__clearSection:I,rightSection:B&&V===`right`?le:v,__defaultRightSection:z,size:u,__clearSectionMode:R});return(0,G.jsx)($u,{value:{size:u||`sm`},children:(0,G.jsxs)(J,{ref:te,dir:U,...se(`wrapper`),...re,...d,mod:[{error:!!f&&j,success:!!p&&!f&&M,pointer:E,disabled:m,multiline:D,"data-with-right-section":!!ue,"data-with-left-section":!!W,"data-with-bottom-section":!!H},N],variant:C,size:u,children:[W&&(0,G.jsx)(`div`,{...g,"data-position":`left`,...se(`section`,{className:g?.className,style:g?.style}),children:W}),(0,G.jsx)(J,{component:`input`,...ie,...ce,required:s,mod:{disabled:m,error:!!f&&j,success:!!p&&!f&&M},variant:C,__size:P,...se(`input`)}),H&&(0,G.jsx)(`div`,{...ee,...se(`bottomSection`,{className:ee?.className,style:ee?.style}),children:H}),ue&&(0,G.jsx)(`div`,{...y,"data-position":`right`,...se(`section`,{className:y?.className,style:y?.style}),children:ue})]})})});xd.classes=id,xd.varsResolver=bd,xd.Wrapper=vd,xd.Label=dd,xd.Error=cd,xd.Success=md,xd.Description=od,xd.Placeholder=fd,xd.ClearButton=ed,xd.displayName=`@mantine/core/Input`;function Sd(e,t,n){let r=K([`Input`,`InputWrapper`,e],t,n),{label:i,description:a,error:o,success:s,required:c,classNames:l,styles:u,className:d,unstyled:f,__staticSelector:p,__stylesApiProps:m,errorProps:h,successProps:g,labelProps:_,descriptionProps:v,wrapperProps:y,id:b,size:x,style:S,inputContainer:C,inputWrapperOrder:w,withAsterisk:T,variant:E,vars:D,mod:O,attributes:k,...A}=r,{styleProps:j,rest:M}=tr(A),N={label:i,description:a,error:o,success:s,required:c,classNames:l,className:d,__staticSelector:p,__stylesApiProps:m||r,errorProps:h,successProps:g,labelProps:_,descriptionProps:v,unstyled:f,styles:u,size:x,style:S,inputContainer:C,inputWrapperOrder:w,withAsterisk:T,variant:E,id:b,mod:O,attributes:k,...y};return{...M,classNames:l,styles:u,unstyled:f,wrapperProps:{...N,...j},inputProps:{required:c,classNames:l,styles:u,unstyled:f,size:x,__staticSelector:p,__stylesApiProps:m||r,error:o,success:s,variant:E,id:b,attributes:k}}}var Cd={__staticSelector:`InputBase`,withAria:!0,size:`sm`},wd=Ar(e=>{let{inputProps:t,wrapperProps:n,...r}=Sd(`InputBase`,Cd,e);return(0,G.jsx)(xd.Wrapper,{...n,children:(0,G.jsx)(xd,{...t,...r})})});wd.classes={...xd.classes,...xd.Wrapper.classes},wd.displayName=`@mantine/core/InputBase`;function Td(e,t){if(!t||!e)return!1;let n=t.parentNode;for(;n!=null;){if(n===e)return!0;n=n.parentNode}return!1}function Ed({target:e,parent:t,ref:n,displayAfterTransitionEnd:r,onTransitionStart:i,onTransitionEnd:a}){let o=(0,w.useRef)(-1),s=(0,w.useRef)(e),[c,l]=(0,w.useState)(!1),[u,d]=(0,w.useState)(typeof r==`boolean`&&r),f=()=>{if(!e||!t||!n.current)return;let r=e.getBoundingClientRect(),i=t.getBoundingClientRect(),a=t.offsetWidth===0?1:i.width/t.offsetWidth,o=t.offsetHeight===0?1:i.height/t.offsetHeight,s=window.getComputedStyle(e),c=window.getComputedStyle(t),l=ti(s.borderTopWidth)+ti(c.borderTopWidth),u=ti(s.borderLeftWidth)+ti(c.borderLeftWidth),d={top:(r.top-i.top)/o-l,left:(r.left-i.left)/a-u,width:r.width/a,height:r.height/o};n.current.style.transform=`translateY(${d.top}px) translateX(${d.left}px)`,n.current.style.width=`${d.width}px`,n.current.style.height=`${d.height}px`},p=()=>{window.clearTimeout(o.current),n.current&&(n.current.style.transitionDuration=`0ms`),f(),o.current=window.setTimeout(()=>{n.current&&(n.current.style.transitionDuration=``)},30)},m=(0,w.useRef)(null),h=(0,w.useRef)(null);return(0,w.useEffect)(()=>{if(c&&s.current!==e&&i&&i(),s.current=e,f(),e)return m.current=new ResizeObserver(p),m.current.observe(e),t&&(h.current=new ResizeObserver(p),h.current.observe(t)),()=>{m.current?.disconnect(),h.current?.disconnect()}},[t,e]),(0,w.useEffect)(()=>{if(t){let e=e=>{Td(e.target,t)&&(p(),d(!1))};return t.addEventListener(`transitionend`,e),()=>{t.removeEventListener(`transitionend`,e)}}},[t]),(0,w.useEffect)(()=>{if(n.current&&a){let e=e=>{e.propertyName===`transform`&&a()};return n.current.addEventListener(`transitionend`,e),()=>{n.current?.removeEventListener(`transitionend`,e)}}},[a]),Le(()=>{st()!==`test`&&l(!0)},20,{autoInvoke:!0}),ze(e=>{e.forEach(e=>{e.type===`attributes`&&e.attributeName===`dir`&&p()})},{attributes:!0,attributeFilter:[`dir`]},()=>document.documentElement),{initialized:c,hidden:u}}var Dd={root:`m_96b553a6`},Od=mt((e,{transitionDuration:t},{shouldReduceMotion:n})=>({root:{"--transition-duration":e.respectReducedMotion&&n?`0ms`:typeof t==`number`?`${t}ms`:t||`150ms`}})),kd=q(e=>{let t=K(`FloatingIndicator`,null,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,target:c,parent:l,transitionDuration:u,mod:d,displayAfterTransitionEnd:f,onTransitionStart:p,onTransitionEnd:m,attributes:h,ref:g,..._}=t,v=Jn({name:`FloatingIndicator`,classes:Dd,props:t,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:h,vars:s,varsResolver:Od,stylesCtx:{shouldReduceMotion:Ne()}}),y=(0,w.useRef)(null),{initialized:b,hidden:x}=Ed({target:c,parent:l,ref:y,displayAfterTransitionEnd:f,onTransitionStart:p,onTransitionEnd:m}),S=je(g,y);return!c||!l?null:(0,G.jsx)(J,{ref:S,mod:[{initialized:b,hidden:x},d],...v(`root`),..._})});kd.displayName=`@mantine/core/FloatingIndicator`,kd.classes=Dd,kd.varsResolver=Od;function Ad({style:e,size:t=16,...n}){return(0,G.jsx)(`svg`,{viewBox:`0 0 15 15`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,style:{...e,width:v(t),height:v(t),display:`block`},...n,children:(0,G.jsx)(`path`,{d:`M3.13523 6.15803C3.3241 5.95657 3.64052 5.94637 3.84197 6.13523L7.5 9.56464L11.158 6.13523C11.3595 5.94637 11.6759 5.95657 11.8648 6.15803C12.0536 6.35949 12.0434 6.67591 11.842 6.86477L7.84197 10.6148C7.64964 10.7951 7.35036 10.7951 7.15803 10.6148L3.15803 6.86477C2.95657 6.67591 2.94637 6.35949 3.13523 6.15803Z`,fill:`currentColor`,fillRule:`evenodd`,clipRule:`evenodd`})})}Ad.displayName=`@mantine/core/AccordionChevron`;var jd={root:`m_66836ed3`,wrapper:`m_a5d60502`,body:`m_667c2793`,title:`m_6a03f287`,label:`m_698f4f23`,icon:`m_667f2a6a`,message:`m_7fa78076`,closeButton:`m_87f54839`},Md=mt((e,{radius:t,color:n,variant:r,autoContrast:i})=>{let a=e.variantColorResolver({color:n||e.primaryColor,theme:e,variant:r||`light`,autoContrast:i});return{root:{"--alert-radius":t===void 0?void 0:R(t),"--alert-bg":n||r?a.background:void 0,"--alert-color":a.color,"--alert-bd":n||r?a.border:void 0}}}),Nd=q(e=>{let t=K(`Alert`,null,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,radius:c,color:l,title:u,children:d,id:f,icon:p,withCloseButton:m,onClose:h,closeButtonLabel:g,variant:_,autoContrast:v,role:y,attributes:b,...x}=t,S=Jn({name:`Alert`,classes:jd,props:t,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:b,vars:s,varsResolver:Md}),C=De(f),w=u&&`${C}-title`||void 0,T=`${C}-body`;return(0,G.jsx)(J,{id:C,...S(`root`,{variant:_}),variant:_,...x,role:y||`alert`,"aria-describedby":d?T:void 0,"aria-labelledby":u?w:void 0,children:(0,G.jsxs)(`div`,{...S(`wrapper`),children:[p&&(0,G.jsx)(`div`,{...S(`icon`),children:p}),(0,G.jsxs)(`div`,{...S(`body`),children:[u&&(0,G.jsx)(`div`,{...S(`title`),"data-with-close-button":m||void 0,children:(0,G.jsx)(`span`,{id:w,...S(`label`),children:u})}),d&&(0,G.jsx)(`div`,{id:T,...S(`message`),"data-variant":_,children:d})]}),m&&(0,G.jsx)(xl,{...S(`closeButton`),onClick:h,variant:`transparent`,size:16,iconSize:16,"aria-label":g,unstyled:o})]})})});Nd.classes=jd,Nd.varsResolver=Md,Nd.displayName=`@mantine/core/Alert`;var Pd={root:`m_b6d8b162`};function Fd(e){if(e===`start`)return`start`;if(e===`end`||e)return`end`}var Id={inherit:!1},Ld=mt((e,{variant:t,lineClamp:n,gradient:r,size:i,textWrap:a})=>({root:{"--text-fz":z(i),"--text-lh":B(i),"--text-gradient":t===`gradient`?Lt(r,e):void 0,"--text-line-clamp":typeof n==`number`?n.toString():void 0,"--text-text-wrap":a}})),Y=Ar(e=>{let t=K(`Text`,Id,e),{lineClamp:n,truncate:r,inline:i,inherit:a,gradient:o,span:s,textWrap:c,__staticSelector:l,vars:u,className:d,style:f,classNames:p,styles:m,unstyled:h,variant:g,mod:_,size:v,attributes:y,...b}=t;return(0,G.jsx)(J,{...Jn({name:[`Text`,l],props:t,classes:Pd,className:d,style:f,classNames:p,styles:m,unstyled:h,attributes:y,vars:u,varsResolver:Ld})(`root`,{focusable:!0}),component:s?`span`:`p`,variant:g,mod:[{"data-truncate":Fd(r),"data-line-clamp":typeof n==`number`,"data-inline":i,"data-inherit":a},_],size:v,...b})});Y.classes=Pd,Y.varsResolver=Ld,Y.displayName=`@mantine/core/Text`;var Rd={root:`m_849cf0da`},zd={underline:`hover`},Bd=Ar(e=>{let{underline:t,className:n,unstyled:r,mod:i,...a}=K(`Anchor`,zd,e);return(0,G.jsx)(Y,{component:`a`,className:gt({[Rd.root]:!r},n),...a,mod:[{underline:t},i],__staticSelector:`Anchor`,unstyled:r})});Bd.classes=Rd,Bd.displayName=`@mantine/core/Anchor`;var[Vd,Hd]=E(`AppShell was not found in tree`),Ud={root:`m_89ab340`,navbar:`m_45252eee`,aside:`m_9cdde9a`,header:`m_3b16f56b`,main:`m_8983817`,footer:`m_3840c879`,section:`m_6dcfc7c7`},Wd=q(e=>{let{classNames:t,className:n,style:r,styles:i,unstyled:a,vars:o,withBorder:s,zIndex:c,mod:l,...u}=K(`AppShellAside`,null,e),d=Hd();return d.disabled?null:(0,G.jsx)(J,{component:`aside`,mod:[{"with-border":s??d.withBorder},l],...d.getStyles(`aside`,{className:gt({[zu.classNames.zeroRight]:d.offsetScrollbars},n),classNames:t,styles:i,style:r}),...u,__vars:{"--app-shell-aside-z-index":`calc(${c??d.zIndex} + 1)`}})});Wd.classes=Ud,Wd.displayName=`@mantine/core/AppShellAside`;var Gd=q(e=>{let{classNames:t,className:n,style:r,styles:i,unstyled:a,vars:o,withBorder:s,zIndex:c,mod:l,...u}=K(`AppShellFooter`,null,e),d=Hd();return d.disabled?null:(0,G.jsx)(J,{component:`footer`,mod:[{"with-border":s??d.withBorder},l],...d.getStyles(`footer`,{className:gt({[zu.classNames.zeroRight]:d.offsetScrollbars},n),classNames:t,styles:i,style:r}),...u,__vars:{"--app-shell-footer-z-index":(c??d.zIndex)?.toString()}})});Gd.classes=Ud,Gd.displayName=`@mantine/core/AppShellFooter`;var Kd=q(e=>{let{classNames:t,className:n,style:r,styles:i,unstyled:a,vars:o,withBorder:s,zIndex:c,mod:l,...u}=K(`AppShellHeader`,null,e),d=Hd();return d.disabled?null:(0,G.jsx)(J,{component:`header`,mod:[{"with-border":s??d.withBorder},l],...d.getStyles(`header`,{className:gt({[zu.classNames.zeroRight]:d.offsetScrollbars},n),classNames:t,styles:i,style:r}),...u,__vars:{"--app-shell-header-z-index":(c??d.zIndex)?.toString()}})});Kd.classes=Ud,Kd.displayName=`@mantine/core/AppShellHeader`;var qd=q(e=>{let{classNames:t,className:n,style:r,styles:i,vars:a,...o}=K(`AppShellMain`,null,e);return(0,G.jsx)(J,{component:`main`,...Hd().getStyles(`main`,{className:n,style:r,classNames:t,styles:i}),...o})});qd.classes=Ud,qd.displayName=`@mantine/core/AppShellMain`;var Jd=q(e=>{let{classNames:t,className:n,style:r,styles:i,unstyled:a,vars:o,withBorder:s,zIndex:c,mod:l,...u}=K(`AppShellNavbar`,null,e),d=Hd();return d.disabled?null:(0,G.jsx)(J,{component:`nav`,mod:[{"with-border":s??d.withBorder},l],...d.getStyles(`navbar`,{className:n,classNames:t,styles:i,style:r}),...u,__vars:{"--app-shell-navbar-z-index":`calc(${c??d.zIndex} + 1)`}})});Jd.classes=Ud,Jd.displayName=`@mantine/core/AppShellNavbar`;var Yd=Ar(e=>{let{classNames:t,className:n,style:r,styles:i,vars:a,grow:o,mod:s,...c}=K(`AppShellSection`,null,e),l=Hd();return(0,G.jsx)(J,{mod:[{grow:o},s],...l.getStyles(`section`,{className:n,style:r,classNames:t,styles:i}),...c})});Yd.classes=Ud,Yd.displayName=`@mantine/core/AppShellSection`;function Xd(e){return typeof e==`object`?e.base:e}function Zd(e){let t=typeof e==`object`&&!!e&&e.base!==void 0&&Object.keys(e).length===1;return typeof e==`number`||typeof e==`string`||t}function Qd(e){return!(typeof e!=`object`||!e||Object.keys(e).length===1&&`base`in e)}function $d({baseStyles:e,minMediaStyles:t,maxMediaStyles:n,aside:r,theme:i,mode:a}){let o=r?.width,s=`translateX(var(--app-shell-aside-width))`,c=`translateX(calc(var(--app-shell-aside-width) * -1))`;if(r?.breakpoint!==void 0&&!r?.collapsed?.mobile&&(n[r?.breakpoint]=n[r?.breakpoint]||{},a===`fixed`?(n[r?.breakpoint][`--app-shell-aside-width`]=`100%`,n[r?.breakpoint][`--app-shell-aside-offset`]=`0px`):(n[r?.breakpoint][`--app-shell-aside-width`]=`0px`,n[r?.breakpoint][`--app-shell-aside-offset`]=`0px`)),Zd(o)){let t=v(Xd(o));e[`--app-shell-aside-width`]=t,e[`--app-shell-aside-offset`]=t}if(Qd(o)&&(o.base!==void 0&&(e[`--app-shell-aside-width`]=v(o.base),e[`--app-shell-aside-offset`]=v(o.base)),u(o).forEach(e=>{e!==`base`&&(t[e]=t[e]||{},t[e][`--app-shell-aside-width`]=v(o[e]),t[e][`--app-shell-aside-offset`]=v(o[e]))})),r?.breakpoint!==void 0&&a===`static`&&(t[r.breakpoint]=t[r.breakpoint]||{},t[r.breakpoint][`--app-shell-aside-position`]=`sticky`,t[r.breakpoint][`--app-shell-aside-grid-row`]=`2`,t[r.breakpoint][`--app-shell-aside-grid-column`]=`3`,t[r.breakpoint][`--app-shell-main-column-end`]=`3`),r?.collapsed?.desktop){let e=r.breakpoint;t[e]=t[e]||{},t[e][`--app-shell-aside-transform`]=s,t[e][`--app-shell-aside-transform-rtl`]=c,a===`fixed`?t[e][`--app-shell-aside-offset`]=`0px !important`:(t[e][`--app-shell-aside-width`]=`0px`,t[e][`--app-shell-aside-display`]=`none`,t[e][`--app-shell-main-column-end`]=`-1`),t[e][`--app-shell-aside-scroll-locked-visibility`]=`hidden`}if(r?.collapsed?.mobile){let e=ee(r.breakpoint,i.breakpoints)-.1;n[e]=n[e]||{},a===`fixed`?(n[e][`--app-shell-aside-width`]=`100%`,n[e][`--app-shell-aside-offset`]=`0px`):n[e][`--app-shell-aside-width`]=`0px`,n[e][`--app-shell-aside-transform`]=s,n[e][`--app-shell-aside-transform-rtl`]=c,n[e][`--app-shell-aside-scroll-locked-visibility`]=`hidden`}}function ef({baseStyles:e,minMediaStyles:t,footer:n,mode:r}){let i=n?.height,a=r===`static`?!0:n?.offset??!0;if(r===`static`&&n&&(e[`--app-shell-footer-position`]=`sticky`,e[`--app-shell-footer-grid-column`]=`1 / -1`,e[`--app-shell-footer-grid-row`]=`3`),Zd(i)){let t=v(Xd(i));e[`--app-shell-footer-height`]=t,a&&(e[`--app-shell-footer-offset`]=t)}Qd(i)&&(i.base!==void 0&&(e[`--app-shell-footer-height`]=v(i.base),a&&(e[`--app-shell-footer-offset`]=v(i.base))),u(i).forEach(e=>{e!==`base`&&(t[e]=t[e]||{},t[e][`--app-shell-footer-height`]=v(i[e]),a&&(t[e][`--app-shell-footer-offset`]=v(i[e])))})),n?.collapsed&&(e[`--app-shell-footer-transform`]=`translateY(var(--app-shell-footer-height))`,r===`fixed`&&(e[`--app-shell-footer-offset`]=`0px !important`))}function tf({baseStyles:e,minMediaStyles:t,header:n,mode:r}){let i=n?.height,a=r===`static`?!0:n?.offset??!0;if(r===`static`&&n&&(e[`--app-shell-header-position`]=`sticky`,e[`--app-shell-header-grid-column`]=`1 / -1`,e[`--app-shell-header-grid-row`]=`1`),Zd(i)){let t=v(Xd(i));e[`--app-shell-header-height`]=t,a&&(e[`--app-shell-header-offset`]=t)}Qd(i)&&(i.base!==void 0&&(e[`--app-shell-header-height`]=v(i.base),a&&(e[`--app-shell-header-offset`]=v(i.base))),u(i).forEach(e=>{e!==`base`&&(t[e]=t[e]||{},t[e][`--app-shell-header-height`]=v(i[e]),a&&(t[e][`--app-shell-header-offset`]=v(i[e])))})),n?.collapsed&&(e[`--app-shell-header-transform`]=`translateY(calc(var(--app-shell-header-height) * -1))`,r===`fixed`&&(e[`--app-shell-header-offset`]=`0px !important`))}function nf({baseStyles:e,minMediaStyles:t,maxMediaStyles:n,navbar:r,theme:i,mode:a}){let o=r?.width,s=`translateX(calc(var(--app-shell-navbar-width) * -1))`,c=`translateX(var(--app-shell-navbar-width))`;if(r?.breakpoint!==void 0&&!r?.collapsed?.mobile&&(n[r?.breakpoint]=n[r?.breakpoint]||{},n[r?.breakpoint][`--app-shell-navbar-offset`]=`0px`,n[r?.breakpoint][`--app-shell-navbar-width`]=`100%`,a===`static`&&(n[r?.breakpoint][`--app-shell-navbar-grid-width`]=`0px`)),Zd(o)){let t=v(Xd(o));e[`--app-shell-navbar-width`]=t,e[`--app-shell-navbar-offset`]=t,a===`static`&&(e[`--app-shell-navbar-grid-width`]=t)}if(Qd(o)&&(o.base!==void 0&&(e[`--app-shell-navbar-width`]=v(o.base),e[`--app-shell-navbar-offset`]=v(o.base),a===`static`&&(e[`--app-shell-navbar-grid-width`]=v(o.base))),u(o).forEach(e=>{e!==`base`&&(t[e]=t[e]||{},t[e][`--app-shell-navbar-width`]=v(o[e]),t[e][`--app-shell-navbar-offset`]=v(o[e]),a===`static`&&(t[e][`--app-shell-navbar-grid-width`]=v(o[e])))})),r?.breakpoint!==void 0&&a===`static`&&(t[r.breakpoint]=t[r.breakpoint]||{},t[r.breakpoint][`--app-shell-navbar-position`]=`sticky`,t[r.breakpoint][`--app-shell-navbar-grid-row`]=`2`,t[r.breakpoint][`--app-shell-navbar-grid-column`]=`1`,t[r.breakpoint][`--app-shell-main-column-start`]=`2`),r?.collapsed?.desktop){let e=r.breakpoint;t[e]=t[e]||{},t[e][`--app-shell-navbar-transform`]=s,t[e][`--app-shell-navbar-transform-rtl`]=c,a===`fixed`?t[e][`--app-shell-navbar-offset`]=`0px !important`:(t[e][`--app-shell-navbar-width`]=`0px`,t[e][`--app-shell-navbar-display`]=`none`,t[e][`--app-shell-main-column-start`]=`1`)}if(r?.collapsed?.mobile){let e=ee(r.breakpoint,i.breakpoints)-.1;n[e]=n[e]||{},n[e][`--app-shell-navbar-width`]=`100%`,n[e][`--app-shell-navbar-offset`]=`0px`,a===`static`&&(n[e][`--app-shell-navbar-grid-width`]=`0px`),n[e][`--app-shell-navbar-transform`]=s,n[e][`--app-shell-navbar-transform-rtl`]=c}}function rf(e){return Number(e)===0?`0px`:L(e)}function af({padding:e,baseStyles:t,minMediaStyles:n}){Zd(e)&&(t[`--app-shell-padding`]=rf(Xd(e))),Qd(e)&&(e.base&&(t[`--app-shell-padding`]=rf(e.base)),u(e).forEach(t=>{t!==`base`&&(n[t]=n[t]||{},n[t][`--app-shell-padding`]=rf(e[t]))}))}function of({navbar:e,header:t,footer:n,aside:r,padding:i,theme:a,mode:o}){let s={},c={},l={};o===`static`&&(l[`--app-shell-main-grid-column`]=`1 / -1`,l[`--app-shell-main-grid-row`]=`2`),nf({baseStyles:l,minMediaStyles:s,maxMediaStyles:c,navbar:e,theme:a,mode:o}),$d({baseStyles:l,minMediaStyles:s,maxMediaStyles:c,aside:r,theme:a,mode:o}),tf({baseStyles:l,minMediaStyles:s,header:t,mode:o}),ef({baseStyles:l,minMediaStyles:s,footer:n,mode:o}),af({baseStyles:l,minMediaStyles:s,padding:i});let d=te(u(s),a.breakpoints).map(e=>({query:`(min-width: ${y(e.px)})`,styles:s[e.value]})),f=te(u(c),a.breakpoints).map(e=>({query:`(max-width: ${y(e.px)})`,styles:c[e.value]}));return{baseStyles:l,media:[...d,...f]}}function sf({navbar:e,header:t,aside:n,footer:r,padding:i,mode:a,selector:o}){let s=vn(),c=Gt(),{media:l,baseStyles:u}=of({navbar:e,header:t,footer:r,aside:n,padding:i,theme:s,mode:a});return(0,G.jsx)(Qn,{media:l,styles:u,selector:o||c.cssVariablesSelector})}function cf({transitionDuration:e,disabled:t}){let[n,r]=(0,w.useState)(!0),i=(0,w.useRef)(-1),a=(0,w.useRef)(-1);return Oe(`resize`,()=>{r(!0),clearTimeout(i.current),i.current=window.setTimeout(()=>(0,w.startTransition)(()=>{r(!1)}),200)}),fe(()=>{r(!0),clearTimeout(a.current),a.current=window.setTimeout(()=>(0,w.startTransition)(()=>{r(!1)}),e||0)},[t,e]),n}var lf={withBorder:!0,padding:0,transitionDuration:200,transitionTimingFunction:`ease`,zIndex:N(`app`),mode:`fixed`},uf=mt((e,{transitionDuration:t,transitionTimingFunction:n})=>({root:{"--app-shell-transition-duration":`${t}ms`,"--app-shell-transition-timing-function":n}})),df=q(e=>{let t=K(`AppShell`,lf,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,navbar:c,withBorder:l,padding:u,transitionDuration:d,transitionTimingFunction:f,header:p,zIndex:m,layout:h,disabled:g,aside:_,footer:v,offsetScrollbars:y=!0,mode:b,mod:x,attributes:S,id:C,...w}=t,T=Jn({name:`AppShell`,classes:Ud,props:t,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:S,vars:s,varsResolver:uf}),E=cf({disabled:g,transitionDuration:d}),D=De(C);return(0,G.jsxs)(Vd,{value:{getStyles:T,withBorder:l,zIndex:m,disabled:g,offsetScrollbars:y,mode:b},children:[(0,G.jsx)(sf,{navbar:c,header:p,aside:_,footer:v,padding:u,mode:b,selector:b===`static`?`#${D}`:void 0}),(0,G.jsx)(J,{...T(`root`),id:D,mod:[{resizing:E,layout:h,disabled:g,mode:b},x],...w})]})});df.classes=Ud,df.varsResolver=uf,df.displayName=`@mantine/core/AppShell`,df.Navbar=Jd,df.Header=Kd,df.Main=qd,df.Aside=Wd,df.Footer=Gd,df.Section=Yd;function ff(e){return typeof e==`string`?{value:e,label:e}:typeof e==`object`&&`value`in e&&!(`label`in e)?{value:e.value,label:`${e.value}`,disabled:e.disabled}:typeof e==`object`&&`group`in e?{group:e.group,items:e.items.map(e=>ff(e))}:typeof e==`number`||typeof e==`bigint`||typeof e==`boolean`?{value:e,label:`${e}`}:e}function pf(e){return e?e.map(e=>ff(e)):[]}function mf(e){return e.reduce((e,t)=>`group`in t?{...e,...mf(t.items)}:(e[`${t.value}`]=t,e),{})}var hf={dropdown:`m_88b62a41`,search:`m_985517d8`,options:`m_b2821a6e`,option:`m_92253aa5`,empty:`m_2530cd1d`,header:`m_858f94bd`,footer:`m_82b967cb`,group:`m_254f3e4f`,groupLabel:`m_2bb2e9e5`,chevron:`m_2943220b`,optionsDropdownOption:`m_390b5f4`,optionsDropdownCheckIcon:`m_8ee53fc2`,optionsDropdownCheckPlaceholder:`m_a530ee0a`},gf={error:null},_f=mt((e,{size:t,color:n})=>({chevron:{"--combobox-chevron-size":I(t,`combobox-chevron-size`),"--combobox-chevron-color":n?Pt(n,e):void 0}})),vf=q(e=>{let t=K(`ComboboxChevron`,gf,e),{size:n,error:r,style:i,className:a,classNames:o,styles:s,unstyled:c,vars:l,attributes:u,mod:d,...f}=t,p=Jn({name:`ComboboxChevron`,classes:hf,props:t,style:i,className:a,classNames:o,styles:s,unstyled:c,vars:l,varsResolver:_f,attributes:u,rootSelector:`chevron`});return(0,G.jsx)(J,{component:`svg`,...f,...p(`chevron`),size:n,viewBox:`0 0 15 15`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,mod:[`combobox-chevron`,{error:r},d],children:(0,G.jsx)(`path`,{d:`M4.93179 5.43179C4.75605 5.60753 4.75605 5.89245 4.93179 6.06819C5.10753 6.24392 5.39245 6.24392 5.56819 6.06819L7.49999 4.13638L9.43179 6.06819C9.60753 6.24392 9.89245 6.24392 10.0682 6.06819C10.2439 5.89245 10.2439 5.60753 10.0682 5.43179L7.81819 3.18179C7.73379 3.0974 7.61933 3.04999 7.49999 3.04999C7.38064 3.04999 7.26618 3.0974 7.18179 3.18179L4.93179 5.43179ZM10.0682 9.56819C10.2439 9.39245 10.2439 9.10753 10.0682 8.93179C9.89245 8.75606 9.60753 8.75606 9.43179 8.93179L7.49999 10.8636L5.56819 8.93179C5.39245 8.75606 5.10753 8.75606 4.93179 8.93179C4.75605 9.10753 4.75605 9.39245 4.93179 9.56819L7.18179 11.8182C7.35753 11.9939 7.64245 11.9939 7.81819 11.8182L10.0682 9.56819Z`,fill:`currentColor`,fillRule:`evenodd`,clipRule:`evenodd`})})});vf.classes=hf,vf.varsResolver=_f,vf.displayName=`@mantine/core/ComboboxChevron`;var[yf,bf]=E(`Combobox component was not found in tree`);function xf({onMouseDown:e,onClick:t,onClear:n,...r}){return(0,G.jsx)(xd.ClearButton,{tabIndex:-1,"aria-hidden":!0,...r,onMouseDown:t=>{t.preventDefault(),e?.(t)},onClick:e=>{n(),t?.(e)}})}xf.displayName=`@mantine/core/ComboboxClearButton`;var Sf=q(e=>{let{classNames:t,styles:n,className:r,style:i,hidden:a,...o}=K(`ComboboxDropdown`,null,e),s=bf();return(0,G.jsx)(el.Dropdown,{...o,role:`presentation`,"data-hidden":a||void 0,"data-floating-height":s.floatingHeight||void 0,...s.getStyles(`dropdown`,{className:r,style:i,classNames:t,styles:n})})});Sf.classes=hf,Sf.displayName=`@mantine/core/ComboboxDropdown`;var Cf={refProp:`ref`},wf=q(e=>{let{children:t,refProp:n,ref:r}=K(`ComboboxDropdownTarget`,Cf,e);if(bf(),!T(t))throw Error(`Combobox.DropdownTarget component children should be an element or a component that accepts ref. Fragments, strings, numbers and other primitive values are not supported`);return(0,G.jsx)(el.Target,{ref:r,refProp:n,children:t})});wf.displayName=`@mantine/core/ComboboxDropdownTarget`;var Tf=q(e=>{let{classNames:t,className:n,style:r,styles:i,vars:a,...o}=K(`ComboboxEmpty`,null,e);return(0,G.jsx)(J,{...bf().getStyles(`empty`,{className:n,classNames:t,styles:i,style:r}),...o})});Tf.classes=hf,Tf.displayName=`@mantine/core/ComboboxEmpty`;function Ef({onKeyDown:e,onClick:t,withKeyboardNavigation:n,withAriaAttributes:r,withExpandedAttribute:i,targetType:a,autoComplete:o}){let s=bf(),[c,l]=(0,w.useState)(null),u=t=>{if(e?.(t),!s.readOnly&&n){if(t.nativeEvent.isComposing)return;if(t.nativeEvent.code===`ArrowDown`&&(t.preventDefault(),s.store.dropdownOpened?l(s.store.selectNextOption()):(s.store.openDropdown(`keyboard`),l(s.store.selectActiveOption()),s.store.updateSelectedOptionIndex(`selected`,{scrollIntoView:!0}))),t.nativeEvent.code===`ArrowUp`&&(t.preventDefault(),s.store.dropdownOpened?l(s.store.selectPreviousOption()):(s.store.openDropdown(`keyboard`),l(s.store.selectActiveOption()),s.store.updateSelectedOptionIndex(`selected`,{scrollIntoView:!0}))),t.nativeEvent.code===`Enter`||t.nativeEvent.code===`NumpadEnter`){if(t.nativeEvent.keyCode===229)return;let e=s.store.getSelectedOptionIndex();s.store.dropdownOpened&&e!==-1?(t.preventDefault(),s.store.clickSelectedOption()):a===`button`&&(t.preventDefault(),s.store.openDropdown(`keyboard`))}t.key===`Escape`&&s.store.closeDropdown(`keyboard`),t.nativeEvent.code===`Space`&&a===`button`&&(t.preventDefault(),s.store.toggleDropdown(`keyboard`))}},d=r?{...i?{role:`combobox`}:{},"aria-haspopup":`listbox`,"aria-expanded":i?!!(s.store.listId&&s.store.dropdownOpened):void 0,"aria-controls":s.store.dropdownOpened&&s.store.listId?s.store.listId:void 0,"aria-activedescendant":s.store.dropdownOpened&&c||void 0,autoComplete:o,"data-expanded":s.store.dropdownOpened||void 0,"data-mantine-stop-propagation":s.store.dropdownOpened||void 0}:{},f=e=>{a===`button`&&e.currentTarget.focus(),t?.(e)};return{...d,onKeyDown:u,onClick:f}}var Df={refProp:`ref`,targetType:`input`,withKeyboardNavigation:!0,withAriaAttributes:!0,withExpandedAttribute:!1,autoComplete:`off`},Of=q(e=>{let{children:t,refProp:n,withKeyboardNavigation:r,withAriaAttributes:i,withExpandedAttribute:a,targetType:o,autoComplete:s,ref:c,...l}=K(`ComboboxEventsTarget`,Df,e),u=pt(t);if(!u)throw Error(`Combobox.EventsTarget component children should be an element or a component that accepts ref. Fragments, strings, numbers and other primitive values are not supported`);let d=bf();return(0,w.cloneElement)(u,{...Ef({targetType:o,withAriaAttributes:i,withKeyboardNavigation:r,withExpandedAttribute:a,onKeyDown:u.props.onKeyDown,onClick:u.props.onClick,autoComplete:s}),...l,[n]:je(c,d.store.targetRef,ct(u))})});Of.displayName=`@mantine/core/ComboboxEventsTarget`;var kf=q(e=>{let{classNames:t,className:n,style:r,styles:i,vars:a,...o}=K(`ComboboxFooter`,null,e);return(0,G.jsx)(J,{...bf().getStyles(`footer`,{className:n,classNames:t,style:r,styles:i}),...o,onMouseDown:e=>{e.preventDefault()}})});kf.classes=hf,kf.displayName=`@mantine/core/ComboboxFooter`;var Af=q(e=>{let{classNames:t,className:n,style:r,styles:i,vars:a,children:o,label:s,id:c,...l}=K(`ComboboxGroup`,null,e),u=bf(),d=De(c),f=s!=null&&s!==!1&&s!==``;return(0,G.jsxs)(J,{role:`group`,"aria-labelledby":f?d:void 0,...u.getStyles(`group`,{className:n,classNames:t,style:r,styles:i}),...l,children:[f&&(0,G.jsx)(`div`,{id:d,...u.getStyles(`groupLabel`,{classNames:t,styles:i}),children:s}),o]})});Af.classes=hf,Af.displayName=`@mantine/core/ComboboxGroup`;var jf=q(e=>{let{classNames:t,className:n,style:r,styles:i,vars:a,...o}=K(`ComboboxHeader`,null,e);return(0,G.jsx)(J,{...bf().getStyles(`header`,{className:n,classNames:t,style:r,styles:i}),...o,onMouseDown:e=>{e.preventDefault()}})});jf.classes=hf,jf.displayName=`@mantine/core/ComboboxHeader`;function Mf({value:e,valuesDivider:t=`,`,...n}){return(0,G.jsx)(`input`,{type:`hidden`,value:Array.isArray(e)?e.join(t):e?`${e}`:``,...n})}Mf.displayName=`@mantine/core/ComboboxHiddenInput`;var Nf=q(e=>{let t=K(`ComboboxOption`,null,e),{classNames:n,className:r,style:i,styles:a,vars:o,onClick:s,id:c,active:l,onMouseDown:u,onMouseOver:d,disabled:f,selected:p,mod:m,...h}=t,g=bf(),_=(0,w.useId)(),v=c||_;return(0,G.jsx)(J,{...g.getStyles(`option`,{className:r,classNames:n,styles:a,style:i}),...h,id:v,mod:[`combobox-option`,{"combobox-active":l,"combobox-disabled":f,"combobox-selected":p},m],role:`option`,onClick:e=>{f?e.preventDefault():(g.onOptionSubmit?.(t.value,t),s?.(e))},onMouseDown:e=>{e.preventDefault(),u?.(e)},onMouseOver:e=>{g.resetSelectionOnOptionHover&&g.store.resetSelectedOption(),d?.(e)}})});Nf.classes=hf,Nf.displayName=`@mantine/core/ComboboxOption`;var Pf=q(e=>{let{classNames:t,className:n,style:r,styles:i,id:a,onMouseDown:o,labelledBy:s,...c}=K(`ComboboxOptions`,null,e),l=bf(),u=De(a);return(0,w.useEffect)(()=>{l.store.setListId(u)},[u]),(0,G.jsx)(J,{...l.getStyles(`options`,{className:n,style:r,classNames:t,styles:i}),...c,id:u,role:`listbox`,"aria-labelledby":s,onMouseDown:e=>{e.preventDefault(),o?.(e)}})});Pf.classes=hf,Pf.displayName=`@mantine/core/ComboboxOptions`;var Ff={withAriaAttributes:!0,withKeyboardNavigation:!0},If=q(e=>{let{classNames:t,styles:n,unstyled:r,vars:i,withAriaAttributes:a,onKeyDown:o,onClick:s,withKeyboardNavigation:c,size:l,ref:u,...d}=K(`ComboboxSearch`,Ff,e),f=bf(),p=f.getStyles(`search`),m=Ef({targetType:`input`,withAriaAttributes:a,withKeyboardNavigation:c,withExpandedAttribute:!1,onKeyDown:o,onClick:s,autoComplete:`off`});return(0,G.jsx)(xd,{ref:je(u,f.store.searchRef),classNames:[{input:p.className},t],styles:[{input:p.style},n],size:l||f.size,...m,...d,__staticSelector:`Combobox`})});If.classes=hf,If.displayName=`@mantine/core/ComboboxSearch`;var Lf={refProp:`ref`,targetType:`input`,withKeyboardNavigation:!0,withAriaAttributes:!0,withExpandedAttribute:!1,autoComplete:`off`},Rf=q(e=>{let{children:t,refProp:n,withKeyboardNavigation:r,withAriaAttributes:i,withExpandedAttribute:a,targetType:o,autoComplete:s,ref:c,...l}=K(`ComboboxTarget`,Lf,e),u=pt(t);if(!u)throw Error(`Combobox.Target component children should be an element or a component that accepts ref. Fragments, strings, numbers and other primitive values are not supported`);let d=bf(),f=(0,w.cloneElement)(u,{...Ef({targetType:o,withAriaAttributes:i,withKeyboardNavigation:r,withExpandedAttribute:a,onKeyDown:u.props.onKeyDown,onClick:u.props.onClick,autoComplete:s}),...l});return(0,G.jsx)(el.Target,{refProp:n,ref:je(c,d.store.targetRef),children:f})});Rf.displayName=`@mantine/core/ComboboxTarget`;function zf(e,t,n){for(let n=e-1;n>=0;--n)if(!t[n].hasAttribute(`data-combobox-disabled`))return n;if(n){for(let e=t.length-1;e>-1;--e)if(!t[e].hasAttribute(`data-combobox-disabled`))return e}return e}function Bf(e,t,n){for(let n=e+1;n<t.length;n+=1)if(!t[n].hasAttribute(`data-combobox-disabled`))return n;if(n){for(let e=0;e<t.length;e+=1)if(!t[e].hasAttribute(`data-combobox-disabled`))return e}return e}function Vf(e){for(let t=0;t<e.length;t+=1)if(!e[t].hasAttribute(`data-combobox-disabled`))return t;return-1}function Hf({defaultOpened:e,opened:t,onOpenedChange:n,onDropdownClose:r,onDropdownOpen:i,loop:a=!0,scrollBehavior:o=`instant`}={}){let[s,c]=Me({value:t,defaultValue:e,finalValue:!1,onChange:n}),l=(0,w.useRef)(null),u=(0,w.useRef)(-1),d=(0,w.useRef)(null),f=(0,w.useRef)(null),p=(0,w.useRef)(-1),m=(0,w.useRef)(-1),h=(0,w.useRef)(-1),g=(0,w.useCallback)((e=`unknown`)=>{s||(c(!0),i?.(e))},[c,i,s]),_=(0,w.useCallback)((e=`unknown`)=>{s&&(c(!1),r?.(e))},[c,r,s]),v=(0,w.useCallback)((e=`unknown`)=>{s?_(e):g(e)},[_,g,s]),y=(0,w.useCallback)(()=>{let e=ft(f.current),t=ut(`#${l.current} [data-combobox-selected]`,e);t?.removeAttribute(`data-combobox-selected`),t?.removeAttribute(`aria-selected`)},[]),b=(0,w.useCallback)(e=>{let t=ft(f.current),n=ut(`#${l.current}`,t),r=n?dt(`[data-combobox-option]`,n):null;if(!r)return null;let i=e>=r.length?0:e<0?r.length-1:e;return u.current=i,r?.[i]&&!r[i].hasAttribute(`data-combobox-disabled`)?(y(),r[i].setAttribute(`data-combobox-selected`,`true`),r[i].setAttribute(`aria-selected`,`true`),r[i].scrollIntoView({block:`nearest`,behavior:o}),r[i].id):null},[o,y]),x=(0,w.useCallback)(()=>{let e=ft(f.current),t=ut(`#${l.current} [data-combobox-active]`,e);if(t){let n=dt(`#${l.current} [data-combobox-option]`,e).findIndex(e=>e===t);return b(n)}return b(0)},[b]),S=(0,w.useCallback)(()=>{let e=ft(f.current),t=dt(`#${l.current} [data-combobox-option]`,e);return b(Bf(u.current,t,a))},[b,a]),C=(0,w.useCallback)(()=>{let e=ft(f.current),t=dt(`#${l.current} [data-combobox-option]`,e);return b(zf(u.current,t,a))},[b,a]),T=(0,w.useCallback)(()=>{let e=ft(f.current),t=dt(`#${l.current} [data-combobox-option]`,e);return b(Vf(t))},[b]),E=(0,w.useCallback)((e=`selected`,t)=>{if(typeof e==`number`){u.current=e;let n=ft(f.current),r=dt(`#${l.current} [data-combobox-option]`,n);t?.scrollIntoView&&r[e]?.scrollIntoView({block:`nearest`,behavior:o});return}h.current=window.setTimeout(()=>{let n=ft(f.current),r=dt(`#${l.current} [data-combobox-option]`,n),i=r.findIndex(t=>t.hasAttribute(`data-combobox-${e}`));u.current=i,t?.scrollIntoView&&r[i]?.scrollIntoView({block:`nearest`,behavior:o})},0)},[]),D=(0,w.useCallback)(()=>{u.current=-1,y()},[y]),O=(0,w.useCallback)(()=>{let e=ft(f.current);(dt(`#${l.current} [data-combobox-option]`,e)?.[u.current])?.click()},[]),k=(0,w.useCallback)(e=>{l.current=e},[]),A=(0,w.useCallback)(()=>{p.current=window.setTimeout(()=>d.current?.focus(),0)},[]),j=(0,w.useCallback)(()=>{m.current=window.setTimeout(()=>f.current?.focus(),0)},[]),M=(0,w.useCallback)(()=>u.current,[]);return(0,w.useEffect)(()=>()=>{window.clearTimeout(p.current),window.clearTimeout(m.current),window.clearTimeout(h.current)},[]),{dropdownOpened:s,openDropdown:g,closeDropdown:_,toggleDropdown:v,selectedOptionIndex:u.current,getSelectedOptionIndex:M,selectOption:b,selectFirstOption:T,selectActiveOption:x,selectNextOption:S,selectPreviousOption:C,resetSelectedOption:D,updateSelectedOptionIndex:E,listId:l.current,setListId:k,clickSelectedOption:O,searchRef:d,focusSearchInput:A,targetRef:f,focusTarget:j}}var Uf={keepMounted:!0,keepMountedMode:`display-none`,withinPortal:!0,resetSelectionOnOptionHover:!1,width:`target`,transitionProps:{transition:`fade`,duration:0},size:`sm`},Wf=mt((e,{size:t,dropdownPadding:n})=>({options:{"--combobox-option-fz":z(t),"--combobox-option-padding":I(t,`combobox-option-padding`)},dropdown:{"--combobox-padding":n===void 0?void 0:v(n),"--combobox-option-fz":z(t),"--combobox-option-padding":I(t,`combobox-option-padding`)}})),Gf=e=>{let t=K(`Combobox`,Uf,e),{classNames:n,styles:r,unstyled:i,children:a,store:o,vars:s,onOptionSubmit:c,onClose:l,size:u,dropdownPadding:d,resetSelectionOnOptionHover:f,__staticSelector:p,readOnly:m,attributes:h,floatingHeight:g,middlewares:_,...v}=t,y=g===`viewport`?{..._,flip:!1,size:{...typeof _?.size==`object`?_.size:{},padding:typeof _?.size==`object`&&_.size.padding!==void 0?_.size.padding:10,apply:({availableHeight:e,availableWidth:t,elements:n,...r})=>{n.floating.style.setProperty(`--combobox-floating-max-height`,`${e}px`);let i=_?.size;typeof i==`object`&&i.apply?i.apply({availableHeight:e,availableWidth:t,elements:n,...r}):i&&Object.assign(n.floating.style,{maxWidth:`${t}px`,maxHeight:`${e}px`})}}}:_,b=Hf(),x=o||b,S=Jn({name:p||`Combobox`,classes:hf,props:t,classNames:n,styles:r,unstyled:i,attributes:h,vars:s,varsResolver:Wf}),C=()=>{l?.(),x.closeDropdown()};return(0,G.jsx)(yf,{value:{getStyles:S,store:x,onOptionSubmit:c,size:u,resetSelectionOnOptionHover:f,readOnly:m,floatingHeight:g},children:(0,G.jsx)(el,{opened:x.dropdownOpened,...v,middlewares:y,onChange:e=>!e&&C(),withRoles:!1,unstyled:i,children:a})})};Gf.extend=e=>e,Gf.classes=hf,Gf.varsResolver=Wf,Gf.displayName=`@mantine/core/Combobox`,Gf.Target=Rf,Gf.Dropdown=Sf,Gf.Options=Pf,Gf.Option=Nf,Gf.Search=If,Gf.Empty=Tf,Gf.Chevron=vf,Gf.Footer=kf,Gf.Header=jf,Gf.EventsTarget=Of,Gf.DropdownTarget=wf,Gf.Group=Af,Gf.ClearButton=xf,Gf.HiddenInput=Mf;function Kf({children:e,role:t}){let n=(0,w.use)(rd);return n?(0,G.jsx)(`div`,{role:t,"aria-labelledby":n.labelId,"aria-describedby":n.describedBy,children:e}):(0,G.jsx)(G.Fragment,{children:e})}function qf({size:e,style:t,...n}){return(0,G.jsx)(`svg`,{viewBox:`0 0 10 7`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,style:e===void 0?t:{width:v(e),height:v(e),...t},"aria-hidden":!0,...n,children:(0,G.jsx)(`path`,{d:`M4 4.586L1.707 2.293A1 1 0 1 0 .293 3.707l3 3a.997.997 0 0 0 1.414 0l5-5A1 1 0 1 0 8.293.293L4 4.586z`,fill:`currentColor`,fillRule:`evenodd`,clipRule:`evenodd`})})}var Jf={root:`m_5f75b09e`,body:`m_5f6e695e`,labelWrapper:`m_d3ea56bb`,label:`m_8ee546b8`,description:`m_328f68c0`,error:`m_8e8a99cc`},Yf=Jf;function Xf({__staticSelector:e,__stylesApiProps:t,className:n,classNames:r,styles:i,unstyled:a,children:o,label:s,description:c,id:l,disabled:u,error:d,size:f,labelPosition:p=`left`,bodyElement:m=`div`,labelElement:h=`label`,variant:g,style:_,vars:v,mod:y,attributes:b,...x}){let S=Jn({name:e,props:t,className:n,style:_,classes:Jf,classNames:r,styles:i,unstyled:a,attributes:b}),C=c?`${l}-description`:void 0,w=d&&typeof d!=`boolean`?`${l}-error`:void 0;return(0,G.jsx)(J,{...S(`root`),__vars:{"--label-fz":z(f),"--label-lh":I(f,`label-lh`)},mod:[{"label-position":p},y],variant:g,size:f,...x,children:(0,G.jsxs)(J,{component:m,htmlFor:m===`label`?l:void 0,...S(`body`),children:[o,(0,G.jsxs)(`div`,{...S(`labelWrapper`),"data-disabled":u||void 0,children:[s&&(0,G.jsx)(J,{component:h,htmlFor:h===`label`?l:void 0,...S(`label`),"data-disabled":u||void 0,children:s}),c&&(0,G.jsx)(xd.Description,{id:C,size:f,__inheritStyles:!1,...S(`description`),children:c}),d&&typeof d!=`boolean`&&(0,G.jsx)(xd.Error,{id:w,size:f,__inheritStyles:!1,...S(`error`),children:d})]})]})})}Xf.displayName=`@mantine/core/InlineInput`;function Zf(e){return`group`in e}function Qf({options:e,search:t,limit:n}){let r=t.trim().toLowerCase(),i=[];for(let a=0;a<e.length;a+=1){let o=e[a];if(i.length===n)return i;Zf(o)&&i.push({group:o.group,items:Qf({options:o.items,search:t,limit:n-i.length})}),Zf(o)||o.label.toLowerCase().includes(r)&&i.push(o)}return i}function $f(e){if(e.length===0)return!0;for(let t of e)if(!(`group`in t)||t.items.length>0)return!1;return!0}function ep(e,t=new Set){if(Array.isArray(e))for(let n of e)if(Zf(n))ep(n.items,t);else{if(n.value===void 0)throw Error(`[@mantine/core] Each option must have value property`);if(t.has(n.value))throw Error(`[@mantine/core] Duplicate options are not supported. Option with value "${n.value}" was provided more than once`);t.add(n.value)}}function tp(e,t){return Array.isArray(e)?e.includes(t):e===t}function np({data:e,withCheckIcon:t,withAlignedLabels:n,value:r,checkIconPosition:i,unstyled:a,renderOption:o}){if(!Zf(e)){let s=tp(r,e.value),c=t&&(s?(0,G.jsx)(qf,{className:hf.optionsDropdownCheckIcon}):n?(0,G.jsx)(`div`,{className:hf.optionsDropdownCheckPlaceholder}):null),l=(0,G.jsxs)(G.Fragment,{children:[i===`left`&&c,(0,G.jsx)(`span`,{children:e.label}),i===`right`&&c]});return(0,G.jsx)(Gf.Option,{value:e.value,disabled:e.disabled,className:gt({[hf.optionsDropdownOption]:!a}),"data-reverse":i===`right`||void 0,"data-checked":s||void 0,"aria-selected":s,active:s,children:typeof o==`function`?o({option:e,checked:s}):l})}let s=e.items.map(e=>(0,G.jsx)(np,{data:e,value:r,unstyled:a,withCheckIcon:t,withAlignedLabels:n,checkIconPosition:i,renderOption:o},`${e.value}`));return(0,G.jsx)(Gf.Group,{label:e.group,children:s})}function rp({data:e,hidden:t,hiddenWhenEmpty:n,filter:r,search:i,limit:a,maxDropdownHeight:o,floatingHeight:s,withScrollArea:c=!0,filterOptions:l=!0,withCheckIcon:u=!1,withAlignedLabels:d=!1,value:f,checkIconPosition:p,nothingFoundMessage:m,unstyled:h,labelId:g,renderOption:_,scrollAreaProps:v,"aria-label":y}){let b=bf();ep(e);let x=typeof i==`string`?(r||Qf)({options:e,search:l?i:``,limit:a??1/0}):e,S=$f(x),C=x.map((e,t)=>(0,G.jsx)(np,{data:e,withCheckIcon:u,withAlignedLabels:d,value:f,checkIconPosition:p,unstyled:h,renderOption:_},Zf(e)?`group-${typeof e.group==`string`?e.group:t}`:`${e.value}`));return(0,G.jsx)(Gf.Dropdown,{hidden:t||n&&S,"data-composed":!0,children:(0,G.jsxs)(Gf.Options,{labelledBy:g,"aria-label":y,children:[c?(0,G.jsx)(rc.Autosize,{mah:(s??b.floatingHeight)===`viewport`?`var(--combobox-floating-options-max-height)`:o??220,type:`scroll`,scrollbarSize:`var(--combobox-padding)`,offsetScrollbars:`y`,...v,children:C}):C,S&&m&&(0,G.jsx)(Gf.Empty,{children:m})]})})}function ip(e,t,n,r){if(t===n||r===`before`&&n===t+1||r===`after`&&n===t-1)return e;let i=e.slice(),[a]=i.splice(t,1),o=t<n?n-1:n;return r===`after`&&(o+=1),i.splice(o,0,a),i}var ap=e=>{let t=e.lastElementChild;return t?t instanceof HTMLInputElement?t:t.querySelector(`input`):null},op=(e,t)=>{if(e===t)return!0;if(e.length!==t.length)return!1;for(let n=0;n<e.length;n+=1)if(e[n]!==t[n])return!1;return!0};function sp({value:e,onChange:t,enabled:n}){let r=(0,w.useRef)({draggedIndex:null,currentDropTarget:null}),i=(0,w.useRef)(null),a=(0,w.useRef)(null),o=(0,w.useRef)(e);o.current=e,(0,w.useEffect)(()=>{let e=i.current;e&&(i.current=null,op(o.current,e.expectedValue)&&e.container?.querySelector(`[data-mantine-pill-index="${e.index}"]`)?.focus())});let s=(0,w.useCallback)(e=>{a.current=e},[]);return{getPillProps:e=>{if(n)return{draggable:!0,tabIndex:-1,"data-mantine-pill-index":e,"aria-keyshortcuts":`Alt+ArrowLeft Alt+ArrowRight`,onMouseDown:e=>{e.button===0&&e.stopPropagation()},onDragStart:t=>{t.stopPropagation(),t.dataTransfer.effectAllowed=`move`,t.dataTransfer.setData(`text/plain`,String(e)),r.current.draggedIndex=e;let n=t.currentTarget,i=n.getBoundingClientRect(),a=n.cloneNode(!0);a.removeAttribute(`data-dragging`),a.removeAttribute(`data-drag-over`),a.style.position=`fixed`,a.style.top=`-9999px`,a.style.left=`-9999px`,a.style.width=`${i.width}px`,a.style.height=`${i.height}px`,a.style.pointerEvents=`none`,document.body.appendChild(a),t.dataTransfer.setDragImage(a,t.clientX-i.left,t.clientY-i.top),setTimeout(()=>a.parentNode?.removeChild(a),0),requestAnimationFrame(()=>{n.setAttribute(`data-dragging`,`true`)})},onDragOver:t=>{let{draggedIndex:n}=r.current;if(n===null||n===e)return;let i=t.currentTarget,a=i.getBoundingClientRect(),o=t.clientX-a.left,s=(getComputedStyle(i).direction===`rtl`?o>a.width/2:o<a.width/2)?`before`:`after`;t.preventDefault(),t.stopPropagation(),t.dataTransfer.dropEffect=`move`;let c=r.current.currentDropTarget;c&&c!==i&&c.removeAttribute(`data-drag-over`),i.setAttribute(`data-drag-over`,s),r.current.currentDropTarget=i},onDragLeave:e=>{let t=e.currentTarget,n=e.relatedTarget;n&&t.contains(n)||(t.removeAttribute(`data-drag-over`),r.current.currentDropTarget===t&&(r.current.currentDropTarget=null))},onDrop:n=>{n.preventDefault(),n.stopPropagation();let i=n.currentTarget,a=i.getAttribute(`data-drag-over`);i.removeAttribute(`data-drag-over`);let{draggedIndex:s}=r.current;if(s!==null&&a&&s!==e){let n=ip(o.current,s,e,a);n!==o.current&&t(n)}r.current.draggedIndex=null,r.current.currentDropTarget=null},onDragEnd:e=>{e.currentTarget.removeAttribute(`data-dragging`);let t=r.current.currentDropTarget;t&&t.removeAttribute(`data-drag-over`),r.current.draggedIndex=null,r.current.currentDropTarget=null},onKeyDown:n=>{if(n.key!==`ArrowLeft`&&n.key!==`ArrowRight`)return;let r=n.currentTarget,a=getComputedStyle(r).direction===`rtl`?n.key===`ArrowLeft`:n.key===`ArrowRight`,s=a?e+1:e-1;if(n.altKey){if(s<0||s>=o.current.length)return;n.preventDefault(),n.stopPropagation();let c=a?`after`:`before`,l=ip(o.current,e,s,c);if(l===o.current)return;i.current={container:r.parentElement,index:s,expectedValue:l},t(l);return}if(s<0)return;let c=r.parentElement;if(c){if(n.preventDefault(),n.stopPropagation(),s>=o.current.length){ap(c)?.focus();return}c.querySelector(`[data-mantine-pill-index="${s}"]`)?.focus()}}}},getListProps:()=>n?{ref:s}:{},handleInputKeyDown:e=>{if(!n||e.key!==`ArrowLeft`)return;let t=e.currentTarget;if(!(t.value.length===0||t.selectionStart===0&&t.selectionEnd===0))return;let r=a.current;if(!r)return;let i=r.querySelectorAll(`[data-mantine-pill-index]`);i.length!==0&&(e.preventDefault(),i[i.length-1].focus())}}}var cp=q(e=>{let t=K([`Input`,`InputWrapper`,`Autocomplete`],{size:`sm`},e),{classNames:n,styles:r,unstyled:i,vars:a,dropdownOpened:o,defaultDropdownOpened:s,onDropdownClose:c,onDropdownOpen:l,onFocus:u,onBlur:d,onClick:f,onChange:p,data:m,value:h,defaultValue:g,selectFirstOptionOnChange:_,selectFirstOptionOnDropdownOpen:v,onOptionSubmit:y,comboboxProps:b,readOnly:x,disabled:S,filter:C,limit:T,withScrollArea:E,maxDropdownHeight:D,floatingHeight:O,size:k,id:A,renderOption:j,autoComplete:M,scrollAreaProps:N,onClear:P,clearButtonProps:F,error:I,clearable:L,clearSectionMode:R,rightSection:z,autoSelectOnBlur:B,openOnFocus:V=!0,attributes:H,...ee}=t,te=De(A),U=pf(m),ne=mf(U),[re,ie]=Me({value:h,defaultValue:g,finalValue:``,onChange:p}),ae=Hf({opened:o,defaultOpened:s,onDropdownOpen:()=>{l?.(),v&&ae.selectFirstOption()},onDropdownClose:()=>{c?.(),setTimeout(ae.resetSelectedOption,0)}}),oe=e=>{ie(e),ae.resetSelectedOption()},{resolvedClassNames:se,resolvedStyles:ce}=Pn({props:t,styles:r,classNames:n});(0,w.useEffect)(()=>{_&&ae.selectFirstOption()},[_,re]);let le=(0,G.jsx)(Gf.ClearButton,{...F,onClear:()=>{oe(``),P?.()}});return(0,G.jsxs)(Gf,{store:ae,__staticSelector:`Autocomplete`,classNames:se,styles:ce,unstyled:i,readOnly:x,size:k,attributes:H,floatingHeight:O,keepMounted:B,onOptionSubmit:e=>{y?.(e),oe(ne[e].label),ae.closeDropdown()},...b,children:[(0,G.jsx)(Gf.Target,{autoComplete:M,withExpandedAttribute:!0,children:(0,G.jsx)(wd,{...ee,size:k,__staticSelector:`Autocomplete`,__clearSection:le,__clearable:L&&!!re&&!S&&!x,__clearSectionMode:R,rightSection:z,disabled:S,readOnly:x,value:re,error:I,onChange:e=>{oe(e.currentTarget.value),ae.openDropdown(),_&&ae.selectFirstOption()},onFocus:e=>{V&&ae.openDropdown(),u?.(e)},onBlur:e=>{B&&ae.clickSelectedOption(),ae.closeDropdown(),d?.(e)},onClick:e=>{ae.openDropdown(),f?.(e)},classNames:se,styles:ce,unstyled:i,attributes:H,id:te})}),(0,G.jsx)(rp,{data:U,hidden:x||S,filter:C,search:re,limit:T,hiddenWhenEmpty:!0,withScrollArea:E,maxDropdownHeight:D,unstyled:i,labelId:ee.label?`${te}-label`:void 0,"aria-label":ee.label?void 0:ee[`aria-label`],renderOption:j,scrollAreaProps:N})]})});cp.classes={...wd.classes,...Gf.classes},cp.displayName=`@mantine/core/Autocomplete`;var lp={root:`m_347db0ec`,"root--dot":`m_fbd81e3d`,label:`m_5add502a`,section:`m_91fdda9b`},up=mt((e,{radius:t,color:n,gradient:r,variant:i,size:a,autoContrast:o,circle:s})=>{let c=e.variantColorResolver({color:n||e.primaryColor,theme:e,gradient:r,variant:i||`filled`,autoContrast:o});return{root:{"--badge-height":I(a,`badge-height`),"--badge-padding-x":I(a,`badge-padding-x`),"--badge-fz":I(a,`badge-fz`),"--badge-radius":s||t===void 0?void 0:R(t),"--badge-bg":n||i?c.background:void 0,"--badge-color":n||i?c.color:void 0,"--badge-bd":n||i?c.border:void 0,"--badge-dot-color":i===`dot`?Pt(n,e):void 0}}}),dp=Ar(e=>{let t=K(`Badge`,null,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,radius:c,color:l,gradient:u,leftSection:d,rightSection:f,children:p,variant:m,fullWidth:h,autoContrast:g,circle:_,mod:v,attributes:y,...b}=t,x=Jn({name:`Badge`,props:t,classes:lp,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:y,vars:s,varsResolver:up});return(0,G.jsxs)(J,{variant:m,mod:[{block:h,circle:_,"with-right-section":!!f,"with-left-section":!!d},v],...x(`root`,{variant:m}),...b,children:[d&&(0,G.jsx)(`span`,{...x(`section`),"data-position":`left`,children:d}),(0,G.jsx)(`span`,{...x(`label`),children:p}),f&&(0,G.jsx)(`span`,{...x(`section`),"data-position":`right`,children:f})]})});dp.classes=lp,dp.varsResolver=up,dp.displayName=`@mantine/core/Badge`;var fp={root:`m_77c9d27d`,inner:`m_80f1301b`,label:`m_811560b9`,section:`m_a74036a`,loader:`m_a25b86ee`,group:`m_80d6d844`,groupSection:`m_70be2a01`},pp={orientation:`horizontal`},mp=mt((e,{borderWidth:t})=>({group:{"--button-border-width":v(t)}})),hp=q(e=>{let t=K(`ButtonGroup`,pp,e),{className:n,style:r,classNames:i,styles:a,unstyled:o,orientation:s,vars:c,borderWidth:l,mod:u,attributes:d,...f}=K(`ButtonGroup`,pp,e);return(0,G.jsx)(J,{...Jn({name:`ButtonGroup`,props:t,classes:fp,className:n,style:r,classNames:i,styles:a,unstyled:o,attributes:d,vars:c,varsResolver:mp,rootSelector:`group`})(`group`),mod:[{"data-orientation":s},u],role:`group`,...f})});hp.classes=fp,hp.varsResolver=mp,hp.displayName=`@mantine/core/ButtonGroup`;var gp=mt((e,{radius:t,color:n,gradient:r,variant:i,autoContrast:a,size:o})=>{let s=e.variantColorResolver({color:n||e.primaryColor,theme:e,gradient:r,variant:i||`filled`,autoContrast:a});return{groupSection:{"--section-height":I(o,`section-height`),"--section-padding-x":I(o,`section-padding-x`),"--section-fz":o?.includes(`compact`)?z(o.replace(`compact-`,``)):z(o),"--section-radius":t===void 0?void 0:R(t),"--section-bg":n||i?s.background:void 0,"--section-color":s.color,"--section-bd":n||i?s.border:void 0}}}),_p=q(e=>{let t=K(`ButtonGroupSection`,null,e),{className:n,style:r,classNames:i,styles:a,unstyled:o,vars:s,gradient:c,radius:l,autoContrast:u,attributes:d,...f}=t;return(0,G.jsx)(J,{...Jn({name:`ButtonGroupSection`,props:t,classes:fp,className:n,style:r,classNames:i,styles:a,unstyled:o,attributes:d,vars:s,varsResolver:gp,rootSelector:`groupSection`})(`groupSection`),...f})});_p.classes=fp,_p.varsResolver=gp,_p.displayName=`@mantine/core/ButtonGroupSection`;var vp={in:{opacity:1,transform:`translate(-50%, calc(-50% + ${v(1)}))`},out:{opacity:0,transform:`translate(-50%, -200%)`},common:{transformOrigin:`center`},transitionProperty:`transform, opacity`},yp=mt((e,{radius:t,color:n,gradient:r,variant:i,size:a,justify:o,autoContrast:s})=>{let c=e.variantColorResolver({color:n||e.primaryColor,theme:e,gradient:r,variant:i||`filled`,autoContrast:s});return{root:{"--button-justify":o,"--button-height":I(a,`button-height`),"--button-padding-x":I(a,`button-padding-x`),"--button-fz":a?.includes(`compact`)?z(a.replace(`compact-`,``)):z(a),"--button-radius":t===void 0?void 0:R(t),"--button-bg":n||i?c.background:void 0,"--button-hover":n||i?c.hover:void 0,"--button-color":c.color,"--button-bd":n||i?c.border:void 0,"--button-hover-color":n||i?c.hoverColor:void 0}}}),bp=Ar(e=>{let t=K(`Button`,null,e),{style:n,vars:r,className:i,color:a,disabled:o,children:s,leftSection:c,rightSection:l,fullWidth:u,variant:d,radius:f,loading:p,loaderProps:m,gradient:h,classNames:g,styles:_,unstyled:v,"data-disabled":y,autoContrast:b,mod:x,attributes:S,...C}=t,w=Jn({name:`Button`,props:t,classes:fp,className:i,style:n,classNames:g,styles:_,unstyled:v,attributes:S,vars:r,varsResolver:yp}),T=!!c,E=!!l;return(0,G.jsxs)(sc,{...w(`root`,{active:!o&&!p&&!y}),unstyled:v,variant:d,disabled:o||p,mod:[{disabled:o||y,loading:p,block:u,"with-left-section":T,"with-right-section":E},x],...C,children:[typeof p==`boolean`&&(0,G.jsx)(Ic,{mounted:p,transition:vp,duration:150,children:e=>(0,G.jsx)(J,{component:`span`,...w(`loader`,{style:e}),"aria-hidden":!0,children:(0,G.jsx)(cl,{color:`var(--button-color)`,size:`calc(var(--button-height) / 1.8)`,...m})})}),(0,G.jsxs)(`span`,{...w(`inner`),children:[c&&(0,G.jsx)(J,{component:`span`,...w(`section`),mod:{position:`left`},children:c}),(0,G.jsx)(J,{component:`span`,mod:{loading:p},...w(`label`),children:s}),l&&(0,G.jsx)(J,{component:`span`,...w(`section`),mod:{position:`right`},children:l})]})]})});bp.classes=fp,bp.varsResolver=yp,bp.displayName=`@mantine/core/Button`,bp.Group=hp,bp.GroupSection=_p;var[xp,Sp]=E(`Card component was not found in tree`),Cp={root:`m_e615b15f`,section:`m_599a2148`},wp=Ar(e=>{let{classNames:t,className:n,style:r,styles:i,vars:a,withBorder:o,inheritPadding:s,mod:c,...l}=K(`CardSection`,null,e),u=Sp();return(0,G.jsx)(J,{mod:[{"with-border":o,"inherit-padding":s},c],...u.getStyles(`section`,{className:n,style:r,styles:i,classNames:t}),...l})});wp.classes=Cp,wp.displayName=`@mantine/core/CardSection`;var Tp=mt((e,{padding:t})=>({root:{"--card-padding":L(t)}})),Ep={orientation:`vertical`},Dp=Ar(e=>{let t=K(`Card`,Ep,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,children:c,padding:l,attributes:u,orientation:d,...f}=t,p=Jn({name:`Card`,props:t,classes:Cp,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:u,vars:s,varsResolver:Tp}),m=w.Children.toArray(c),h=m.map((e,t)=>typeof e==`object`&&e&&`type`in e&&(e.type===wp||e.type?.displayName===`@mantine/core/CardSection`)?(0,w.cloneElement)(e,{"data-orientation":d,"data-first-section":t===0||void 0,"data-last-section":t===m.length-1||void 0}):e);return(0,G.jsx)(xp,{value:{getStyles:p},children:(0,G.jsx)(fc,{unstyled:o,"data-orientation":d,...p(`root`),...f,children:h})})});Dp.classes=Cp,Dp.varsResolver=Tp,Dp.displayName=`@mantine/core/Card`,Dp.Section=wp;var Op={root:`m_b183c0a2`},kp=mt((e,{color:t})=>({root:{"--code-bg":t?Pt(t,e):void 0}})),Ap=q(e=>{let t=K(`Code`,null,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,color:c,block:l,mod:u,attributes:d,...f}=t,p=Jn({name:`Code`,props:t,classes:Op,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:d,vars:s,varsResolver:kp});return(0,G.jsx)(J,{component:l?`pre`:`code`,mod:[{block:l},u],...p(`root`),...f,dir:`ltr`})});Ap.classes=Op,Ap.varsResolver=kp,Ap.displayName=`@mantine/core/Code`;var jp={root:`m_7485cace`},Mp={strategy:`block`},Np=mt((e,{size:t,fluid:n})=>({root:{"--container-size":n?void 0:I(t,`container-size`)}})),Pp=q(e=>{let t=K(`Container`,Mp,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,fluid:c,mod:l,attributes:u,strategy:d,...f}=t,p=Jn({name:`Container`,classes:jp,props:t,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:u,vars:s,varsResolver:Np});return(0,G.jsx)(J,{mod:[{fluid:c,strategy:d},l],...p(`root`),...f})});Pp.classes=jp,Pp.varsResolver=Np,Pp.displayName=`@mantine/core/Container`;var[Fp,Ip]=E(`Grid component was not found in tree`),Lp=(e,t)=>{if(e===`content`)return`auto`;if(e===`auto`)return`0rem`;if(e)return e===t?`100%`:`calc(${100*e/t}% - ${(t-e)/t} * var(--grid-column-gap))`},Rp=(e,t,n)=>n||e===`auto`?`100%`:e===`content`?`unset`:Lp(e,t),zp=(e,t)=>{if(e)return e===`auto`||t?`1`:`auto`},Bp=(e,t)=>{if(e===0)return`0`;if(e)return`calc(${100*e/t}% + ${e/t} * var(--grid-column-gap))`};function Vp({span:e,order:t,offset:n,align:r,selector:i}){let a=vn(),o=Ip(),s=o.breakpoints||a.breakpoints,c=U(e),l=c===void 0?12:c,d=b({"--col-order":U(t)?.toString(),"--col-flex-grow":zp(l,o.grow),"--col-flex-basis":Lp(l,o.columns),"--col-width":l===`content`?`auto`:void 0,"--col-max-width":Rp(l,o.columns,o.grow),"--col-offset":Bp(U(n),o.columns),"--col-align-self":U(r)}),f=u(s).reduce((i,a)=>(i[a]||(i[a]={}),typeof t==`object`&&t[a]!==void 0&&(i[a][`--col-order`]=t[a]?.toString()),typeof e==`object`&&e[a]!==void 0&&(i[a][`--col-flex-grow`]=zp(e[a],o.grow),i[a][`--col-flex-basis`]=Lp(e[a],o.columns),i[a][`--col-width`]=e[a]===`content`?`auto`:void 0,i[a][`--col-max-width`]=Rp(e[a],o.columns,o.grow)),typeof n==`object`&&n[a]!==void 0&&(i[a][`--col-offset`]=Bp(n[a],o.columns)),typeof r==`object`&&r[a]!==void 0&&(i[a][`--col-align-self`]=r[a]),i),{}),p=te(u(f),s).filter(e=>u(f[e.value]).length>0).map(e=>({query:o.type===`container`?`mantine-grid (min-width: ${s[e.value]})`:`(min-width: ${s[e.value]})`,styles:f[e.value]}));return(0,G.jsx)(Qn,{styles:d,media:o.type===`container`?void 0:p,container:o.type===`container`?p:void 0,selector:i})}var Hp={container:`m_8478a6da`,root:`m_410352e9`,inner:`m_dee7bd2f`,col:`m_96bdd299`},Up={span:12},Wp=q(e=>{let{classNames:t,className:n,style:r,styles:i,vars:a,span:o,order:s,offset:c,align:l,...u}=K(`GridCol`,Up,e),d=Ip(),f=wr();return(0,G.jsxs)(G.Fragment,{children:[(0,G.jsx)(Vp,{selector:`.${f}`,span:o,order:s,offset:c,align:l}),(0,G.jsx)(J,{...d.getStyles(`col`,{className:gt(n,f),style:r,classNames:t,styles:i}),...u})]})});Wp.classes=Hp,Wp.displayName=`@mantine/core/GridCol`;function Gp({gap:e,rowGap:t,columnGap:n,selector:r,breakpoints:i,type:a}){let o=vn(),s=i||o.breakpoints,c=b({"--grid-gap":L(U(e)),"--grid-row-gap":L(U(t)),"--grid-column-gap":L(U(n))}),l=u(s).reduce((r,i)=>(r[i]||(r[i]={}),typeof e==`object`&&e[i]!==void 0&&(r[i][`--grid-gap`]=L(e[i])),typeof t==`object`&&t[i]!==void 0&&(r[i][`--grid-row-gap`]=L(t[i])),typeof n==`object`&&n[i]!==void 0&&(r[i][`--grid-column-gap`]=L(n[i])),r),{}),d=te(u(l),s).filter(e=>u(l[e.value]).length>0).map(e=>({query:a===`container`?`mantine-grid (min-width: ${s[e.value]})`:`(min-width: ${s[e.value]})`,styles:l[e.value]}));return(0,G.jsx)(Qn,{styles:c,media:a===`container`?void 0:d,container:a===`container`?d:void 0,selector:r})}var Kp={gap:`md`,columns:12},qp=mt((e,{justify:t,align:n,overflow:r})=>({root:{"--grid-justify":t,"--grid-align":n,"--grid-overflow":r}})),Jp=q(e=>{let t=K(`Grid`,Kp,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,grow:c,gap:l,rowGap:u,columnGap:d,columns:f,align:p,justify:m,children:h,breakpoints:g,type:_,attributes:v,...y}=t,b=Jn({name:`Grid`,classes:Hp,props:t,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:v,vars:s,varsResolver:qp}),x=wr();return _===`container`&&g?(0,G.jsxs)(Fp,{value:{getStyles:b,grow:c,columns:f,breakpoints:g,type:_},children:[(0,G.jsx)(Gp,{selector:`.${x}`,...t}),(0,G.jsx)(`div`,{...b(`container`),children:(0,G.jsx)(J,{...b(`root`,{className:x}),...y,children:(0,G.jsx)(`div`,{...b(`inner`),children:h})})})]}):(0,G.jsxs)(Fp,{value:{getStyles:b,grow:c,columns:f,breakpoints:g,type:_},children:[(0,G.jsx)(Gp,{selector:`.${x}`,...t}),(0,G.jsx)(J,{...b(`root`,{className:x}),...y,children:(0,G.jsx)(`div`,{...b(`inner`),children:h})})]})});Jp.classes=Hp,Jp.varsResolver=qp,Jp.displayName=`@mantine/core/Grid`,Jp.Col=Wp;var Yp=[`borderBottomWidth`,`borderLeftWidth`,`borderRightWidth`,`borderTopWidth`,`boxSizing`,`fontFamily`,`fontSize`,`fontStyle`,`fontWeight`,`letterSpacing`,`lineHeight`,`paddingBottom`,`paddingLeft`,`paddingRight`,`paddingTop`,`tabSize`,`textIndent`,`textRendering`,`textTransform`,`width`,`wordBreak`,`wordSpacing`,`scrollbarGutter`],Xp={"min-height":`0`,"max-height":`none`,height:`0`,visibility:`hidden`,overflow:`hidden`,position:`absolute`,"z-index":`-1000`,top:`0`,right:`0`,display:`block`};function Zp(e){Object.keys(Xp).forEach(t=>{e.style.setProperty(t,Xp[t],`important`)})}function Qp(e){let t=window.getComputedStyle(e);if(t===null)return null;let n={};for(let e of Yp)n[e]=t[e];return n.boxSizing===``?null:{sizingStyle:n,paddingSize:parseFloat(n.paddingBottom)+parseFloat(n.paddingTop),borderSize:parseFloat(n.borderBottomWidth)+parseFloat(n.borderTopWidth)}}var $p=null;function em(e,t,n=1,r=1/0){$p||($p=document.createElement(`textarea`),$p.setAttribute(`tabindex`,`-1`),$p.setAttribute(`aria-hidden`,`true`),$p.setAttribute(`aria-label`,`autosize measurement`),Zp($p)),$p.parentNode===null&&document.body.appendChild($p);let{paddingSize:i,borderSize:a,sizingStyle:o}=e,{boxSizing:s}=o;Object.keys(o).forEach(e=>{$p.style[e]=o[e]}),Zp($p),$p.value=t;let c=s===`border-box`?$p.scrollHeight+a:$p.scrollHeight-i;$p.value=t,c=s===`border-box`?$p.scrollHeight+a:$p.scrollHeight-i,$p.value=`x`;let l=$p.scrollHeight-i,u=l*n;s===`border-box`&&(u=u+i+a),c=Math.max(u,c);let d=l*r;return s===`border-box`&&(d=d+i+a),c=Math.min(d,c),[c,l]}function tm({maxRows:e,minRows:t,onChange:n,ref:r,...i}){let a=i.value!==void 0,o=(0,w.useRef)(null),s=je(o,r),c=(0,w.useRef)(0),l=(0,w.useRef)(0),u=()=>{let n=o.current;if(!n)return;let r=Qp(n);if(!r)return;let[i]=em(r,n.value||n.placeholder||`x`,t,e);c.current!==i&&(c.current=i,n.style.setProperty(`height`,`${i}px`,`important`))},d=e=>{a||u(),n?.(e)};return(0,w.useLayoutEffect)(u),(0,w.useEffect)(()=>{let e=()=>u();return window.addEventListener(`resize`,e),()=>window.removeEventListener(`resize`,e)},[]),(0,w.useEffect)(()=>{let e=o.current;if(!e||typeof ResizeObserver>`u`)return;l.current=e.offsetWidth;let t=new ResizeObserver(()=>{o.current&&o.current.offsetWidth!==l.current&&(l.current=o.current.offsetWidth,u())});return t.observe(e),()=>t.disconnect()},[]),(0,w.useEffect)(()=>{let e=()=>u();return document.fonts.addEventListener(`loadingdone`,e),()=>document.fonts.removeEventListener(`loadingdone`,e)},[]),(0,w.useEffect)(()=>{let e=e=>{if(o.current?.form===e.target&&!a){let e=o.current.value;requestAnimationFrame(()=>{o.current&&e!==o.current.value&&u()})}};return document.body.addEventListener(`reset`,e),()=>document.body.removeEventListener(`reset`,e)},[a]),(0,G.jsx)(`textarea`,{rows:t,...i,onChange:d,ref:s})}var nm=q(e=>{let{autosize:t,maxRows:n,minRows:r,__staticSelector:i,resize:a,bottomSection:o,bottomSectionProps:s,...c}=K([`Input`,`InputWrapper`,`Textarea`],null,e),l=t&&st()!==`test`,u=l?{maxRows:n,minRows:r}:{};return(0,G.jsx)(wd,{component:l?tm:`textarea`,...c,__staticSelector:i||`Textarea`,__bottomSection:o,__bottomSectionProps:s,multiline:!0,"data-no-overflow":t&&n===void 0||void 0,__vars:{"--input-resize":a},...u})});nm.classes=wd.classes,nm.displayName=`@mantine/core/Textarea`;var[rm,im]=E(`List component was not found in tree`),am={root:`m_abbac491`,item:`m_abb6bec2`,itemWrapper:`m_75cd9f71`,itemIcon:`m_60f83e5b`},om=q(e=>{let{classNames:t,className:n,style:r,styles:i,vars:a,icon:o,children:s,mod:c,...l}=K(`ListItem`,null,e),u=im(),d=o||u.icon,f={classNames:t,styles:i};return(0,G.jsx)(J,{...u.getStyles(`item`,{...f,className:n,style:r}),component:`li`,mod:[{"with-icon":!!d,centered:u.center},c],...l,children:(0,G.jsxs)(`div`,{...u.getStyles(`itemWrapper`,f),children:[d&&(0,G.jsx)(`span`,{...u.getStyles(`itemIcon`,f),children:d}),(0,G.jsx)(`span`,{...u.getStyles(`itemLabel`,f),children:s})]})})});om.classes=am,om.displayName=`@mantine/core/ListItem`;var sm={type:`unordered`},cm=mt((e,{size:t,spacing:n})=>({root:{"--list-fz":z(t),"--list-lh":B(t),"--list-spacing":L(n)}})),lm=q(e=>{let t=K(`List`,sm,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,children:c,type:l,withPadding:u,icon:d,spacing:f,center:p,listStyleType:m,mod:h,attributes:g,..._}=t,v=Jn({name:`List`,classes:am,props:t,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:g,vars:s,varsResolver:cm});return(0,G.jsx)(rm,{value:{center:p,icon:d,getStyles:v},children:(0,G.jsx)(J,{...v(`root`,{style:{listStyleType:m}}),component:l===`unordered`?`ul`:`ol`,mod:[{"with-padding":u,type:d?`none`:m},h],..._,children:c})})});lm.classes=am,lm.varsResolver=cm,lm.displayName=`@mantine/core/List`,lm.Item=om;var[um,dm]=E(`Menu component was not found in the tree`),fm=(0,w.createContext)(null);function pm(e){let{value:t,defaultValue:n,onChange:r,children:i}=K(`MenuCheckboxGroup`,null,e),[a,o]=Me({value:t,defaultValue:n,finalValue:[],onChange:r});return(0,G.jsx)(fm,{value:{values:a,onChange:(0,w.useCallback)(e=>{o(a.includes(e)?a.filter(t=>t!==e):[...a,e])},[a,o])},children:i})}pm.displayName=`@mantine/core/MenuCheckboxGroup`;var mm=(0,w.createContext)(null);function hm({role:e,checked:t,indicator:n,onSelect:r,color:i,closeMenuOnClick:a,rightSection:o,children:s,disabled:c,dataDisabled:l,className:u,style:d,styles:f,classNames:p,buttonRef:m,others:h}){let g=dm(),_=(0,w.use)(mm),v=vn(),{dir:y}=Rr(),b=(0,w.useRef)(null),x=H(h.onClick,()=>{l||(r(),a&&g.closeDropdownImmediately())}),S=H(h.onMouseMove,()=>{if(!g.hasSearch)return;let e=b.current?.closest(`[data-menu-dropdown]`);e&&e.querySelectorAll(`[data-menu-active]`).forEach(t=>{t!==b.current&&t.closest(`[data-menu-dropdown]`)===e&&t.removeAttribute(`data-menu-active`)})}),C=H(h.onKeyDown,e=>{e.key===`ArrowLeft`&&_&&(_.close(),_.focusParentItem())}),T=i?v.variantColorResolver({color:i,theme:v,variant:`light`}):void 0,E=i?Nt({color:i,theme:v}):null,D=g.alignItemsLabels!==`none`||t;return(0,G.jsxs)(sc,{onMouseDown:e=>e.preventDefault(),...h,unstyled:g.unstyled,tabIndex:g.menuItemTabIndex,...g.getStyles(`item`,{className:u,style:d,styles:f,classNames:p}),ref:je(b,m),role:e,"aria-checked":t,disabled:c,"data-menu-item":!0,"data-checked":t||void 0,"data-disabled":c||l||void 0,"data-mantine-stop-propagation":!0,onClick:x,onMouseMove:S,onKeyDown:j({siblingSelector:`[data-menu-item]:not([data-disabled])`,parentSelector:`[data-menu-dropdown]`,activateOnFocus:!1,loop:g.loop,dir:y,orientation:`vertical`,onKeyDown:C}),__vars:{"--menu-item-color":E?.isThemeColor&&E?.shade===void 0?`var(--mantine-color-${E.color}-6)`:T?.color,"--menu-item-hover":T?.hover},children:[D&&(0,G.jsx)(`div`,{...g.getStyles(`itemIndicator`,{styles:f,classNames:p}),"data-checked":t||void 0,children:t?n:null}),s&&(0,G.jsx)(`div`,{...g.getStyles(`itemLabel`,{styles:f,classNames:p}),"data-menu-item-label":!0,children:s}),o&&(0,G.jsx)(`div`,{...g.getStyles(`itemSection`,{styles:f,classNames:p}),"data-position":`right`,children:o})]})}var gm={dropdown:`m_dc9b7c9f`,label:`m_9bfac126`,divider:`m_efdf90cb`,item:`m_99ac2aa1`,search:`m_ef8769b6`,itemLabel:`m_5476e0d3`,itemIndicator:`m_8395186e`,itemSection:`m_8b75e504`,chevron:`m_b85b0bed`},_m=q(e=>{let{classNames:t,className:n,style:r,styles:i,vars:a,color:o,closeMenuOnClick:s,rightSection:c,children:l,disabled:u,"data-disabled":d,value:f,checked:p,defaultChecked:m,onChange:h,checkIcon:g,ref:_,...v}=K(`MenuCheckboxItem`,null,e),y=dm(),b=(0,w.use)(fm),x=b&&f!==void 0?b.values.includes(f):void 0,[S,C]=Me({value:p??x,defaultValue:m,finalValue:!1,onChange:h});return(0,G.jsx)(hm,{role:`menuitemcheckbox`,checked:S,indicator:g??y.checkIcon??(0,G.jsx)(qf,{size:10}),onSelect:()=>{h?C(!S):b&&f!==void 0?b.onChange(f):C(!S)},color:o,closeMenuOnClick:s,rightSection:c,disabled:u,dataDisabled:d,className:n,style:r,styles:i,classNames:t,buttonRef:_,others:v,children:l})});_m.classes=gm,_m.displayName=`@mantine/core/MenuCheckboxItem`;function vm(e){let{children:t,disabled:n,longPressDelay:r}=K(`MenuContextMenu`,null,e),i=pt(t);if(!i)throw Error(`Menu.ContextMenu component children should be an element or a component that accepts ref. Fragments, strings, numbers and other primitive values are not supported`);let a=dm(),o=Bc();return(0,w.cloneElement)(i,Vc({childProps:i.props,disabled:n||o.disabled,opened:a.opened,longPressDelay:r,setReference:o.reference,open:()=>a.openDropdown()}))}vm.displayName=`@mantine/core/MenuContextMenu`;var ym=q(e=>{let{classNames:t,className:n,style:r,styles:i,vars:a,...o}=K(`MenuDivider`,null,e);return(0,G.jsx)(J,{...dm().getStyles(`divider`,{className:n,style:r,styles:i,classNames:t}),...o})});ym.classes=gm,ym.displayName=`@mantine/core/MenuDivider`;var bm=500;function xm(e){return((e.querySelector(`[data-menu-item-label]`)??e).textContent??``).trim().toLowerCase()}function Sm(e){return e.length>1&&e.split(``).every(t=>t===e[0])}function Cm({enabled:e,opened:t,getDropdown:n}){let r=(0,w.useRef)({buffer:``,timeoutId:null});return(0,w.useEffect)(()=>{if(t&&e)return;let n=r.current;n.timeoutId!==null&&(window.clearTimeout(n.timeoutId),n.timeoutId=null),n.buffer=``},[t,e]),(0,w.useEffect)(()=>()=>{let{timeoutId:e}=r.current;e!==null&&window.clearTimeout(e)},[]),t=>{if(!e||t.defaultPrevented||t.ctrlKey||t.metaKey||t.altKey||t.key.length!==1||t.key===` `)return;let i=t.target;if(i&&(i.tagName===`INPUT`||i.tagName===`TEXTAREA`||i.tagName===`SELECT`||i.isContentEditable))return;let a=n();if(!a)return;let o=Array.from(a.querySelectorAll(`[data-menu-item]:not([data-disabled])`)).filter(e=>e.closest(`[data-menu-dropdown]`)===a);if(o.length===0)return;let s=r.current;s.buffer=(s.buffer+t.key).toLowerCase(),s.timeoutId!==null&&window.clearTimeout(s.timeoutId),s.timeoutId=window.setTimeout(()=>{s.buffer=``,s.timeoutId=null},bm);let c=document.activeElement,l=c?o.indexOf(c):-1,u=null;if(s.buffer.length===1||Sm(s.buffer)){let e=s.buffer[0],t=l+1;for(let n=0;n<o.length;n+=1){let r=(t+n)%o.length;if(xm(o[r]).startsWith(e)){u=o[r];break}}}else for(let e=0;e<o.length;e+=1)if(xm(o[e]).startsWith(s.buffer)){u=o[e];break}u&&(t.preventDefault(),u.focus())}}var wm=q(e=>{let{classNames:t,className:n,style:r,styles:i,vars:a,onMouseEnter:o,onMouseLeave:s,onKeyDown:c,children:l,ref:u,...d}=K(`MenuDropdown`,null,e),f=(0,w.useRef)(null),p=dm(),m=Cm({enabled:!p.hasSearch,opened:p.opened,getDropdown:()=>f.current}),h=H(c,e=>{m(e),!(e.defaultPrevented||p.hasSearch)&&(e.key===`ArrowUp`||e.key===`ArrowDown`)&&(e.preventDefault(),f.current?.querySelectorAll(`[data-menu-item]:not(:disabled)`)[0]?.focus())}),g=H(o,()=>(p.trigger===`hover`||p.trigger===`click-hover`)&&p.openDropdown()),_=H(s,()=>(p.trigger===`hover`||p.trigger===`click-hover`)&&p.closeDropdown());return(0,G.jsxs)(el.Dropdown,{...d,onMouseEnter:g,onMouseLeave:_,role:`menu`,"aria-orientation":`vertical`,ref:je(u,f),...p.getStyles(`dropdown`,{className:n,style:r,styles:i,classNames:t,withStaticClass:!1}),tabIndex:-1,"data-menu-dropdown":!0,onKeyDown:h,children:[p.withInitialFocusPlaceholder&&!p.hasSearch&&(0,G.jsx)(`div`,{role:`presentation`,tabIndex:-1,"data-autofocus":!0,"data-mantine-stop-propagation":!0,style:{outline:0}}),l]})});wm.classes=gm,wm.displayName=`@mantine/core/MenuDropdown`;var Tm=Ar(e=>{let{classNames:t,className:n,style:r,styles:i,vars:a,color:o,closeMenuOnClick:s,leftSection:c,rightSection:l,children:u,disabled:d,"data-disabled":f,ref:p,...m}=K(`MenuItem`,null,e),h=dm(),g=(0,w.use)(mm),_=vn(),{dir:v}=Rr(),y=(0,w.useRef)(null),b=m,x=H(b.onClick,()=>{f||(typeof s==`boolean`?s&&h.closeDropdownImmediately():h.closeOnItemClick&&h.closeDropdownImmediately())}),S=H(b.onMouseMove,()=>{if(!h.hasSearch)return;let e=y.current?.closest(`[data-menu-dropdown]`);e&&e.querySelectorAll(`[data-menu-active]`).forEach(t=>{t!==y.current&&t.closest(`[data-menu-dropdown]`)===e&&t.removeAttribute(`data-menu-active`)})}),C=o?_.variantColorResolver({color:o,theme:_,variant:`light`}):void 0,T=o?Nt({color:o,theme:_}):null,E=H(b.onKeyDown,e=>{e.key===`ArrowLeft`&&g&&(g.close(),g.focusParentItem())});return(0,G.jsxs)(sc,{onMouseDown:e=>e.preventDefault(),...m,unstyled:h.unstyled,tabIndex:h.menuItemTabIndex,...h.getStyles(`item`,{className:n,style:r,styles:i,classNames:t}),ref:je(y,p),role:`menuitem`,disabled:d,"data-menu-item":!0,"data-disabled":d||f||void 0,"data-mantine-stop-propagation":!0,onClick:x,onMouseMove:S,onKeyDown:j({siblingSelector:`[data-menu-item]:not([data-disabled])`,parentSelector:`[data-menu-dropdown]`,activateOnFocus:!1,loop:h.loop,dir:v,orientation:`vertical`,onKeyDown:E}),__vars:{"--menu-item-color":T?.isThemeColor&&T?.shade===void 0?`var(--mantine-color-${T.color}-6)`:C?.color,"--menu-item-hover":C?.hover},children:[h.alignItemsLabels===`all`&&(0,G.jsx)(`div`,{...h.getStyles(`itemIndicator`,{styles:i,classNames:t}),"data-placeholder":!0}),c&&(0,G.jsx)(`div`,{...h.getStyles(`itemSection`,{styles:i,classNames:t}),"data-position":`left`,children:c}),u&&(0,G.jsx)(`div`,{...h.getStyles(`itemLabel`,{styles:i,classNames:t}),"data-menu-item-label":!0,children:u}),l&&(0,G.jsx)(`div`,{...h.getStyles(`itemSection`,{styles:i,classNames:t}),"data-position":`right`,children:l})]})});Tm.classes=gm,Tm.displayName=`@mantine/core/MenuItem`;var Em=q(e=>{let{classNames:t,className:n,style:r,styles:i,vars:a,...o}=K(`MenuLabel`,null,e);return(0,G.jsx)(J,{...dm().getStyles(`label`,{className:n,style:r,styles:i,classNames:t}),...o})});Em.classes=gm,Em.displayName=`@mantine/core/MenuLabel`;var Dm=(0,w.createContext)(null);function Om(e){let{value:t,defaultValue:n,onChange:r,children:i}=K(`MenuRadioGroup`,null,e),[a,o]=Me({value:t,defaultValue:n,finalValue:null,onChange:r});return(0,G.jsx)(Dm,{value:{value:a,onChange:e=>o(e)},children:i})}Om.displayName=`@mantine/core/MenuRadioGroup`;function km({size:e,style:t,...n}){return(0,G.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,fill:`none`,viewBox:`0 0 5 5`,style:{width:v(e),height:v(e),...t},"aria-hidden":!0,...n,children:(0,G.jsx)(`circle`,{cx:`2.5`,cy:`2.5`,r:`2.5`,fill:`currentColor`})})}var Am=q(e=>{let{classNames:t,className:n,style:r,styles:i,vars:a,color:o,closeMenuOnClick:s,rightSection:c,children:l,disabled:u,"data-disabled":d,value:f,checked:p,onChange:m,checkIcon:h,ref:g,..._}=K(`MenuRadioItem`,null,e),v=dm(),y=(0,w.use)(Dm),b=p??(y?y.value===f:!1);return(0,G.jsx)(hm,{role:`menuitemradio`,checked:b,indicator:h??v.checkIcon??(0,G.jsx)(km,{size:5}),onSelect:()=>{b||(m?m(f):y&&y.onChange(f))},color:o,closeMenuOnClick:s,rightSection:c,disabled:u,dataDisabled:d,className:n,style:r,styles:i,classNames:t,buttonRef:g,others:_,children:l})});Am.classes=gm,Am.displayName=`@mantine/core/MenuRadioItem`;var jm=`[data-menu-item]:not([data-disabled])`,Mm=`[data-menu-active]`;function Nm(e){return e?.closest(`[data-menu-dropdown]`)}function Pm(e){return e?Array.from(e.querySelectorAll(jm)).filter(t=>t.closest(`[data-menu-dropdown]`)===e):[]}function Fm(e){e&&e.querySelectorAll(Mm).forEach(t=>{t.closest(`[data-menu-dropdown]`)===e&&t.removeAttribute(`data-menu-active`)})}function Im(e,t){Fm(t),e&&(e.setAttribute(`data-menu-active`,`true`),e.scrollIntoView({block:`nearest`}))}function Lm(e){return e.findIndex(e=>e.hasAttribute(`data-menu-active`))}var Rm={clearSearchOnClose:!0},zm=q(e=>{let{classNames:t,styles:n,onKeyDown:r,onChange:i,size:a,clearSearchOnClose:o,ref:s,...c}=K(`MenuSearch`,Rm,e),l=dm(),u=(0,w.useRef)(null),d=je(s,u),f=(0,w.useRef)(i);f.current=i,(0,w.useEffect)(()=>l.registerSearch(),[l.registerSearch]),(0,w.useEffect)(()=>{o?l.searchExitClearRef.current=()=>{f.current?.({currentTarget:{value:``}})}:l.searchExitClearRef.current=null},[o,l.searchExitClearRef]),(0,w.useEffect)(()=>{l.opened||Fm(Nm(u.current))},[l.opened]);let p=H(i,e=>{Fm(Nm(e.currentTarget))}),m=H(r,e=>{if(e.defaultPrevented)return;let t=Nm(e.currentTarget),n=Pm(t);if(e.key===`ArrowDown`){if(e.preventDefault(),n.length===0)return;let r=Lm(n);Im(n[r>=n.length-1?l.loop?0:r:r+1]??null,t)}else if(e.key===`ArrowUp`){if(e.preventDefault(),n.length===0)return;let r=Lm(n);Im(n[r<=0?r===-1||l.loop?n.length-1:0:r-1]??null,t)}else if(e.key===`Home`)e.preventDefault(),n.length>0&&Im(n[0],t);else if(e.key===`End`)e.preventDefault(),n.length>0&&Im(n[n.length-1],t);else if(e.key===`Enter`){if(e.nativeEvent.isComposing||e.nativeEvent.keyCode===229)return;let t=n[Lm(n)];t&&(e.preventDefault(),t.hasAttribute(`data-sub-menu-item`)?(t.focus(),t.dispatchEvent(new KeyboardEvent(`keydown`,{key:`ArrowRight`,bubbles:!0}))):t.click())}}),h=l.getStyles(`search`);return(0,G.jsx)(xd,{"data-autofocus":!0,"data-mantine-stop-propagation":!0,type:`search`,size:a,...c,ref:d,classNames:[{input:h.className},t],styles:[{input:h.style},n],onKeyDown:m,onChange:p,__staticSelector:`Menu`})});zm.classes=gm,zm.displayName=`@mantine/core/MenuSearch`;var Bm=q(e=>{let{classNames:t,className:n,style:r,styles:i,vars:a,onMouseEnter:o,onMouseLeave:s,onPointerEnter:c,onPointerLeave:l,onKeyDown:u,children:d,ref:f,...p}=K(`MenuSubDropdown`,null,e),m=(0,w.useRef)(null),h=dm(),g=(0,w.use)(mm),_=Cm({enabled:!h.hasSearch,opened:g?.opened??!1,getDropdown:()=>m.current}),v=H(u,e=>{_(e),!e.ctrlKey&&!e.metaKey&&!e.altKey&&e.key.length===1&&e.key!==` `&&e.stopPropagation()}),y=g?.getFloatingProps({onMouseEnter:o,onMouseLeave:s,onPointerEnter:c,onPointerLeave:l});return(0,G.jsx)(el.Dropdown,{...p,...y,role:`menu`,"aria-orientation":`vertical`,ref:je(f,m,g?.setFloating),...h.getStyles(`dropdown`,{className:n,style:r,styles:i,classNames:t,withStaticClass:!1}),tabIndex:-1,"data-menu-dropdown":!0,onKeyDown:v,children:d})});Bm.classes=gm,Bm.displayName=`@mantine/core/MenuSubDropdown`;var Vm=Ar(e=>{let{classNames:t,className:n,style:r,styles:i,vars:a,color:o,leftSection:s,rightSection:c,children:l,disabled:u,"data-disabled":d,closeMenuOnClick:f,ref:p,...m}=K(`MenuSubItem`,null,e),h=dm(),g=(0,w.use)(mm),_=vn(),{dir:v}=Rr(),y=(0,w.useRef)(null),b=m,x=o?_.variantColorResolver({color:o,theme:_,variant:`light`}):void 0,S=o?Nt({color:o,theme:_}):null,C=H(b.onKeyDown,e=>{e.key===`ArrowRight`&&(g?.open(),g?.focusFirstItem()),e.key===`ArrowLeft`&&g?.parentContext&&(g.parentContext.close(),g.parentContext.focusParentItem())}),T=H(b.onClick,()=>{!d&&f&&h.closeDropdownImmediately()}),E=H(b.onMouseMove,()=>{if(!h.hasSearch)return;let e=y.current?.closest(`[data-menu-dropdown]`);e&&e.querySelectorAll(`[data-menu-active]`).forEach(t=>{t!==y.current&&t.closest(`[data-menu-dropdown]`)===e&&t.removeAttribute(`data-menu-active`)})}),D=g?.getReferenceProps({onMouseEnter:b.onMouseEnter,onMouseLeave:b.onMouseLeave,onPointerEnter:b.onPointerEnter,onPointerLeave:b.onPointerLeave});return(0,G.jsxs)(sc,{onMouseDown:e=>e.preventDefault(),...m,...D,unstyled:h.unstyled,tabIndex:h.menuItemTabIndex,...h.getStyles(`item`,{className:n,style:r,styles:i,classNames:t}),ref:je(y,p,g?.setReference),role:`menuitem`,disabled:u,"data-menu-item":!0,"data-sub-menu-item":!0,"data-disabled":u||d||void 0,"data-mantine-stop-propagation":!0,onClick:T,onMouseMove:E,onKeyDown:j({siblingSelector:`[data-menu-item]:not([data-disabled])`,parentSelector:`[data-menu-dropdown]`,activateOnFocus:!1,loop:h.loop,dir:v,orientation:`vertical`,onKeyDown:C}),__vars:{"--menu-item-color":S?.isThemeColor&&S?.shade===void 0?`var(--mantine-color-${S.color}-6)`:x?.color,"--menu-item-hover":x?.hover},children:[h.alignItemsLabels===`all`&&(0,G.jsx)(`div`,{...h.getStyles(`itemIndicator`,{styles:i,classNames:t}),"data-placeholder":!0}),s&&(0,G.jsx)(`div`,{...h.getStyles(`itemSection`,{styles:i,classNames:t}),"data-position":`left`,children:s}),l&&(0,G.jsx)(`div`,{...h.getStyles(`itemLabel`,{styles:i,classNames:t}),"data-menu-item-label":!0,children:l}),(0,G.jsx)(`div`,{...h.getStyles(`itemSection`,{styles:i,classNames:t}),"data-position":`right`,children:c||(0,G.jsx)(Ad,{...h.getStyles(`chevron`),size:14})})]})});Vm.classes=gm,Vm.displayName=`@mantine/core/MenuSubItem`;function Hm({children:e,refProp:t}){if(!T(e))throw Error(`Menu.Sub.Target component children should be an element or a component that accepts ref. Fragments, strings, numbers and other primitive values are not supported`);return dm(),(0,G.jsx)(el.Target,{refProp:t,popupType:`menu`,children:e})}Hm.displayName=`@mantine/core/MenuSubTarget`;var Um={offset:0,position:`right-start`,safeAreaPolygon:!0,transitionProps:{duration:0},openDelay:0,middlewares:{shift:{crossAxis:!0}}};function Wm(e){let{children:t,closeDelay:n,openDelay:r,position:i,safeAreaPolygon:a,opened:o,onChange:s,...c}=K(`MenuSub`,Um,e),l=De(),[u,d]=Me({value:o,finalValue:!1,onChange:s}),f=(0,w.use)(mm),p=dm(),{dir:m}=Rr(),h=bc(m,i),g=f?.registerOpenSub??p.registerOpenSub,_=(0,w.useRef)(null),v=(0,w.useCallback)(e=>{let t=_.current;return t&&t!==e&&t(),_.current=e,()=>{_.current===e&&(_.current=null)}},[]),y=(0,w.useRef)(d);y.current=d;let b=(0,w.useCallback)(()=>y.current(!0),[]),x=(0,w.useCallback)(()=>y.current(!1),[]);(0,w.useEffect)(()=>{if(u)return g(x)},[u,g,x]);let{context:S,refs:C}=Ws({placement:h,open:u,onOpenChange:e=>{e?b():x()}}),{getReferenceProps:T,getFloatingProps:E}=Js([js(S,{handleClose:a?ec(typeof a==`object`?a:void 0):void 0,delay:{open:r,close:n}})]);return(0,G.jsx)(mm,{value:{opened:u,close:x,open:b,focusFirstItem:()=>window.setTimeout(()=>{document.getElementById(`${l}-dropdown`)?.querySelectorAll(`[data-menu-item]:not([data-disabled])`)[0]?.focus()},16),focusParentItem:()=>window.setTimeout(()=>{document.getElementById(`${l}-target`)?.focus()},16),parentContext:f,setReference:C.setReference,setFloating:C.setFloating,getReferenceProps:T,getFloatingProps:E,registerOpenSub:v},children:(0,G.jsx)(el,{opened:u,onChange:e=>e?b():x(),withinPortal:!1,withArrow:!1,id:l,position:i,...c,children:t})})}Wm.extend=e=>e,Wm.displayName=`@mantine/core/MenuSub`,Wm.Target=Hm,Wm.Dropdown=Bm,Wm.Item=Vm;var Gm={refProp:`ref`};function Km(e){let{children:t,refProp:n,...r}=K(`MenuTarget`,Gm,e),i=pt(t);if(!i)throw Error(`Menu.Target component children should be an element or a component that accepts ref. Fragments, strings, numbers and other primitive values are not supported`);let a=dm(),o=i.props,s=H(o.onClick,()=>{a.trigger===`click`?a.toggleDropdown():a.trigger===`click-hover`&&(a.setOpenedViaClick(!0),a.opened||a.openDropdown())}),c=H(o.onMouseEnter,()=>(a.trigger===`hover`||a.trigger===`click-hover`)&&a.openDropdown()),l=H(o.onMouseLeave,()=>{(a.trigger===`hover`||a.trigger===`click-hover`&&!a.openedViaClick)&&a.closeDropdown()});return(0,G.jsx)(el.Target,{refProp:n,popupType:`menu`,...r,children:(0,w.cloneElement)(i,{onClick:s,onMouseEnter:c,onMouseLeave:l,"data-expanded":a.opened?!0:void 0})})}Km.displayName=`@mantine/core/MenuTarget`;var qm={trapFocus:!0,closeOnItemClick:!0,withInitialFocusPlaceholder:!0,clickOutsideEvents:[`mousedown`,`touchstart`,`keydown`],loop:!0,trigger:`click`,openDelay:0,closeDelay:100,menuItemTabIndex:-1,alignItemsLabels:`with-indicators`},Jm=q(e=>{let t=K(`Menu`,qm,e),{children:n,onOpen:r,onClose:i,opened:a,defaultOpened:o,trapFocus:s,onChange:c,closeOnItemClick:l,loop:u,closeOnEscape:d,trigger:f,openDelay:p,closeDelay:m,classNames:h,styles:g,unstyled:_,variant:v,vars:y,menuItemTabIndex:b,keepMounted:x,withInitialFocusPlaceholder:S,attributes:C,onExitTransitionEnd:T,alignItemsLabels:E,checkIcon:D,...O}=t,k=Jn({name:`Menu`,classes:gm,props:t,classNames:h,styles:g,unstyled:_,attributes:C}),[A,j]=Me({value:a,defaultValue:o,finalValue:!1,onChange:c}),[M,N]=(0,w.useState)(!1),P=()=>{j(!1),N(!1),A&&i?.()},F=()=>{j(!0),!A&&r?.()},I=()=>{A?P():F()},{openDropdown:L,closeDropdown:R}=xc({open:F,close:P,closeDelay:m,openDelay:p}),z=(0,w.useRef)(null),B=(0,w.useCallback)(e=>{let t=z.current;return t&&t!==e&&t(),z.current=e,()=>{z.current===e&&(z.current=null)}},[]),V=(0,w.useRef)(0),[H,ee]=(0,w.useState)(!1),te=(0,w.useCallback)(()=>(V.current+=1,V.current===1&&ee(!0),()=>{--V.current,V.current===0&&ee(!1)}),[]),U=(0,w.useRef)(null),re=()=>{U.current?.(),T?.()},ie=e=>ne(`[data-menu-item]`,`[data-menu-dropdown]`,e),{resolvedClassNames:ae,resolvedStyles:oe}=Pn({classNames:h,styles:g,props:t});return(0,G.jsx)(um,{value:{getStyles:k,opened:A,toggleDropdown:I,getItemIndex:ie,openedViaClick:M,setOpenedViaClick:N,closeOnItemClick:l,closeDropdown:f===`click`?P:R,openDropdown:f===`click`?F:L,closeDropdownImmediately:P,loop:u,trigger:f,unstyled:_,menuItemTabIndex:b,withInitialFocusPlaceholder:S,registerOpenSub:B,hasSearch:H,registerSearch:te,searchExitClearRef:U,alignItemsLabels:E,checkIcon:D},children:(0,G.jsx)(el,{returnFocus:!0,...O,opened:A,onChange:I,defaultOpened:o,trapFocus:!x&&s,closeOnEscape:d,__staticSelector:`Menu`,classNames:ae,styles:oe,unstyled:_,variant:v,keepMounted:x,onExitTransitionEnd:re,children:n})})});Jm.displayName=`@mantine/core/Menu`,Jm.classes=gm,Jm.Item=Tm,Jm.Label=Em,Jm.Dropdown=wm,Jm.Target=Km,Jm.Divider=ym,Jm.Search=zm,Jm.Sub=Wm,Jm.CheckboxItem=_m,Jm.CheckboxGroup=pm,Jm.RadioItem=Am,Jm.RadioGroup=Om,Jm.ContextMenu=vm;var[Ym,Xm]=E(`Modal component was not found in tree`),Zm={root:`m_9df02822`,content:`m_54c44539`,inner:`m_1f958f16`,header:`m_d0e2b9cd`},Qm=q(e=>{let{classNames:t,className:n,style:r,styles:i,vars:a,...o}=K(`ModalBody`,null,e);return(0,G.jsx)(Uu,{...Xm().getStyles(`body`,{classNames:t,style:r,styles:i,className:n}),...o})});Qm.classes=Zm,Qm.displayName=`@mantine/core/ModalBody`;var $m=q(e=>{let{classNames:t,className:n,style:r,styles:i,vars:a,...o}=K(`ModalCloseButton`,null,e);return(0,G.jsx)(Wu,{...Xm().getStyles(`close`,{classNames:t,style:r,styles:i,className:n}),...o})});$m.classes=Zm,$m.displayName=`@mantine/core/ModalCloseButton`;var eh=q(e=>{let{classNames:t,className:n,style:r,styles:i,vars:a,children:o,__hidden:s,...c}=K(`ModalContent`,null,e),l=Xm(),u=l.scrollAreaComponent||Qu;return(0,G.jsx)(Gu,{...l.getStyles(`content`,{className:n,style:r,styles:i,classNames:t}),innerProps:l.getStyles(`inner`,{className:n,style:r,styles:i,classNames:t}),"data-full-screen":l.fullScreen||void 0,"data-modal-content":!0,"data-hidden":s||void 0,...c,children:(0,G.jsx)(u,{style:{maxHeight:l.fullScreen?`100dvh`:`calc(100dvh - (${v(l.yOffset)} * 2))`},children:o})})});eh.classes=Zm,eh.displayName=`@mantine/core/ModalContent`;var th=q(e=>{let{classNames:t,className:n,style:r,styles:i,vars:a,...o}=K(`ModalHeader`,null,e);return(0,G.jsx)(Ku,{...Xm().getStyles(`header`,{classNames:t,style:r,styles:i,className:n}),...o})});th.classes=Zm,th.displayName=`@mantine/core/ModalHeader`;var nh=q(e=>{let{classNames:t,className:n,style:r,styles:i,vars:a,...o}=K(`ModalOverlay`,null,e);return(0,G.jsx)(Yu,{...Xm().getStyles(`overlay`,{classNames:t,style:r,styles:i,className:n}),...o})});nh.classes=Zm,nh.displayName=`@mantine/core/ModalOverlay`;var rh={__staticSelector:`Modal`,closeOnClickOutside:!0,withinPortal:!0,lockScroll:!0,trapFocus:!0,returnFocus:!0,closeOnEscape:!0,keepMounted:!1,zIndex:N(`modal`),transitionProps:{duration:200,transition:`fade-down`},yOffset:`5dvh`},ih=mt((e,{radius:t,size:n,yOffset:r,xOffset:i})=>({root:{"--modal-radius":t===void 0?void 0:R(t),"--modal-size":I(n,`modal-size`),"--modal-y-offset":v(r),"--modal-x-offset":v(i)}})),ah=q(e=>{let t=K(`ModalRoot`,rh,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,yOffset:c,scrollAreaComponent:l,radius:u,fullScreen:d,centered:f,xOffset:p,__staticSelector:m,attributes:h,...g}=t,_=Jn({name:m,classes:Zm,props:t,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:h,vars:s,varsResolver:ih});return(0,G.jsx)(Ym,{value:{yOffset:c,scrollAreaComponent:l,getStyles:_,fullScreen:d},children:(0,G.jsx)(Bu,{..._(`root`),"data-full-screen":d||void 0,"data-centered":f||void 0,"data-offset-scrollbars":l===rc.Autosize||void 0,unstyled:o,...g})})});ah.classes=Zm,ah.varsResolver=ih,ah.displayName=`@mantine/core/ModalRoot`;var oh=(0,w.createContext)(null);function sh({children:e}){let[t,n]=(0,w.useState)([]),[r,i]=(0,w.useState)(N(`modal`));return(0,G.jsx)(oh,{value:{stack:t,addModal:(e,t)=>{n(t=>[...new Set([...t,e])]),i(e=>typeof t==`number`&&typeof e==`number`?Math.max(e,t):e)},removeModal:e=>n(t=>t.filter(t=>t!==e)),getZIndex:e=>`calc(${r} + ${t.indexOf(e)} + 1)`,currentId:t[t.length-1],maxZIndex:r},children:e})}sh.displayName=`@mantine/core/ModalStack`;var ch=q(e=>{let{classNames:t,className:n,style:r,styles:i,vars:a,...o}=K(`ModalTitle`,null,e);return(0,G.jsx)(Zu,{...Xm().getStyles(`title`,{classNames:t,style:r,styles:i,className:n}),...o})});ch.classes=Zm,ch.displayName=`@mantine/core/ModalTitle`;var lh={closeOnClickOutside:!0,withinPortal:!0,lockScroll:!0,trapFocus:!0,returnFocus:!0,closeOnEscape:!0,keepMounted:!1,zIndex:N(`modal`),transitionProps:{duration:200,transition:`fade-down`},withOverlay:!0,withCloseButton:!0},uh=q(e=>{let{title:t,withOverlay:n,overlayProps:r,withCloseButton:i,closeButtonProps:a,children:o,radius:s,opened:c,stackId:l,zIndex:u,...d}=K(`Modal`,lh,e),f=(0,w.use)(oh),p=!!t||i,m=f&&l?{closeOnEscape:f.currentId===l,trapFocus:f.currentId===l,zIndex:f.getZIndex(l)}:{},h=n===!1?!1:l&&f?f.currentId===l:c;return(0,w.useEffect)(()=>{f&&l&&(c?f.addModal(l,u||N(`modal`)):f.removeModal(l))},[c,l,u]),(0,G.jsxs)(ah,{radius:s,opened:c,zIndex:f&&l?f.getZIndex(l):u,...d,...m,children:[n&&(0,G.jsx)(nh,{visible:h,transitionProps:f&&l?{duration:0}:void 0,...r}),(0,G.jsxs)(eh,{radius:s,__hidden:f&&l&&c?l!==f.currentId:!1,children:[p&&(0,G.jsxs)(th,{children:[t&&(0,G.jsx)(ch,{children:t}),i&&(0,G.jsx)($m,{...a})]}),(0,G.jsx)(Qm,{children:o})]})]})});uh.classes=Zm,uh.displayName=`@mantine/core/Modal`,uh.Root=ah,uh.Overlay=nh,uh.Content=eh,uh.Body=Qm,uh.Header=th,uh.Title=ch,uh.CloseButton=$m,uh.Stack=sh;var dh=(0,w.createContext)(null),fh={root:`m_7cda1cd6`,"root--default":`m_44da308b`,"root--contrast":`m_e3a01f8`,label:`m_1e0e6180`,remove:`m_ae386778`,group:`m_1dcfd90b`},ph=(0,w.createContext)(null),mh=mt((e,{gap:t},{size:n})=>({group:{"--pg-gap":t===void 0?I(n,`pg-gap`):I(t)}})),hh=q(e=>{let t=K(`PillGroup`,null,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,size:c,disabled:l,attributes:u,...d}=t,f=(0,w.use)(dh)?.size||c||void 0,p=Jn({name:`PillGroup`,classes:fh,props:t,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:u,vars:s,varsResolver:mh,stylesCtx:{size:f},rootSelector:`group`});return(0,G.jsx)(ph,{value:{size:f,disabled:l},children:(0,G.jsx)(J,{size:f,...p(`group`),...d})})});hh.classes=fh,hh.varsResolver=mh,hh.displayName=`@mantine/core/PillGroup`;var gh={variant:`default`},_h=mt((e,{radius:t},{size:n})=>({root:{"--pill-fz":I(n,`pill-fz`),"--pill-height":I(n,`pill-height`),"--pill-radius":t===void 0?void 0:R(t)}})),vh=q(e=>{let t=K(`Pill`,gh,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,variant:c,children:l,withRemoveButton:u,onRemove:d,removeButtonProps:f,radius:p,size:m,disabled:h,mod:g,attributes:_,...v}=t,y=(0,w.use)(ph),b=(0,w.use)(dh),x=m||y?.size||void 0,S=b?.variant===`filled`?`contrast`:c||`default`,C=Jn({name:`Pill`,classes:fh,props:t,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:_,vars:s,varsResolver:_h,stylesCtx:{size:x}});return(0,G.jsxs)(J,{component:`span`,variant:S,size:x,...C(`root`,{variant:S}),mod:[{"with-remove":u&&!h,disabled:h||y?.disabled},g],...v,children:[(0,G.jsx)(`span`,{...C(`label`),children:l}),u&&(0,G.jsx)(xl,{variant:`transparent`,radius:p,tabIndex:-1,"aria-hidden":!0,unstyled:o,...f,...C(`remove`,{className:f?.className,style:f?.style}),onMouseDown:e=>{e.preventDefault(),e.stopPropagation(),f?.onMouseDown?.(e)},onClick:e=>{e.stopPropagation(),d?.(),f?.onClick?.(e)}})]})});vh.classes=fh,vh.varsResolver=_h,vh.displayName=`@mantine/core/Pill`,vh.Group=hh;var yh={field:`m_45c4369d`},bh={type:`visible`},xh=q(e=>{let t=K(`PillsInputField`,bh,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,type:c,disabled:l,id:u,pointer:d,mod:f,attributes:p,ref:m,...h}=t,g=(0,w.use)(dh),_=(0,w.use)(rd),v=Jn({name:`PillsInputField`,classes:yh,props:t,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:p,rootSelector:`field`}),y=l||g?.disabled;return(0,G.jsx)(J,{component:`input`,ref:je(m,g?.fieldRef),"data-type":c,disabled:y,mod:[{disabled:y,pointer:d},f],...v(`field`),...h,id:_?.inputId||u,"aria-invalid":g?.hasError,"aria-describedby":_?.describedBy,type:`text`,onMouseDown:e=>!d&&e.stopPropagation()})});xh.classes=yh,xh.displayName=`@mantine/core/PillsInputField`;var Sh={size:`sm`},Ch=q(e=>{let{children:t,onMouseDown:n,onClick:r,size:i,disabled:a,__staticSelector:o,error:s,variant:c,...l}=K([`Input`,`InputWrapper`,`PillsInput`],Sh,e),u=(0,w.useRef)(null);return(0,G.jsx)(dh,{value:{fieldRef:u,size:i,disabled:a,hasError:!!s,variant:c},children:(0,G.jsx)(wd,{size:i,error:s,variant:c,component:`div`,"data-no-overflow":!0,onMouseDown:e=>{e.preventDefault(),n?.(e),u.current?.focus()},onClick:e=>{e.preventDefault(),e.currentTarget.closest(`fieldset`)?.disabled||(u.current?.focus(),r?.(e))},...l,multiline:!0,disabled:a,__staticSelector:o||`PillsInput`,withAria:!1,children:t})})});Ch.displayName=`@mantine/core/PillsInput`,Ch.classes=wd.classes,Ch.Field=xh;function wh(e){return typeof e==`string`?e.trim().toLowerCase():e}function Th({data:e,value:t}){let n=t.map(wh);return e.reduce((e,t)=>(Zf(t)?e.push({group:t.group,items:t.items.filter(e=>n.indexOf(wh(e.value))===-1)}):n.indexOf(wh(t.value))===-1&&e.push(t),e),[])}var Eh={xs:41,sm:50,md:60,lg:72,xl:89},Dh={maxValues:1/0,withCheckIcon:!0,checkIconPosition:`left`,hiddenInputValuesDivider:`,`,clearSearchOnChange:!0,openOnFocus:!0,size:`sm`},Oh=kr(e=>{let t=K([`Input`,`InputWrapper`,`MultiSelect`],Dh,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,size:c,value:l,defaultValue:u,onChange:d,onKeyDown:f,variant:p,data:m,dropdownOpened:h,defaultDropdownOpened:g,onDropdownOpen:_,onDropdownClose:v,selectFirstOptionOnChange:y,selectFirstOptionOnDropdownOpen:b,onOptionSubmit:x,comboboxProps:S,filter:C,limit:T,withScrollArea:E,maxDropdownHeight:D,floatingHeight:O,searchValue:k,defaultSearchValue:A,onSearchChange:j,readOnly:M,disabled:N,onFocus:P,onBlur:F,radius:I,rightSection:L,rightSectionWidth:R,rightSectionPointerEvents:z,rightSectionProps:B,leftSection:V,leftSectionWidth:H,leftSectionPointerEvents:ee,leftSectionProps:te,inputContainer:U,inputWrapperOrder:ne,withAsterisk:re,labelProps:ie,descriptionProps:ae,errorProps:oe,successProps:se,wrapperProps:ce,description:le,label:W,error:ue,success:de,maxValues:fe,searchable:pe,nothingFoundMessage:me,withCheckIcon:he,withAlignedLabels:ge,checkIconPosition:_e,hidePickedOptions:ve,withErrorStyles:ye,withSuccessStyles:be,name:xe,form:Se,id:Ce,clearable:we,clearSectionMode:Te,clearButtonProps:Ee,hiddenInputProps:Oe,placeholder:ke,hiddenInputValuesDivider:Ae,required:je,mod:Ne,renderOption:Pe,renderPill:Fe,onRemove:Ie,onClear:Le,onMaxValues:Re,scrollAreaProps:ze,chevronColor:Be,attributes:Ve,clearSearchOnChange:He,openOnFocus:Ue,loading:We,loadingPosition:Ge,withPillsReorder:Ke,...qe}=t,Je=De(Ce),Ye=pf(m),Xe=mf(Ye),Ze=(0,w.useRef)({}),Qe=Hf({opened:h,defaultOpened:g,onDropdownOpen:()=>{_?.(),b&&Qe.selectFirstOption()},onDropdownClose:()=>{v?.(),Qe.resetSelectedOption()}}),{styleProps:$e,rest:{type:et,autoComplete:tt,...nt}}=tr(qe),[rt,it]=Me({value:l,defaultValue:u,finalValue:[],onChange:d}),{getPillProps:at,getListProps:ot,handleInputKeyDown:st}=sp({value:rt,onChange:it,enabled:Ke&&!N&&!M}),[ct,lt]=Me({value:k,defaultValue:A,finalValue:``,onChange:j}),ut=e=>{lt(e),Qe.resetSelectedOption()},dt=Jn({name:`MultiSelect`,classes:{},props:t,classNames:n,styles:a,unstyled:o,attributes:Ve}),{resolvedClassNames:ft,resolvedStyles:pt}=Pn({props:t,styles:a,classNames:n}),mt=e=>{f?.(e),!e.defaultPrevented&&(e.key===` `&&!pe&&(e.preventDefault(),Qe.toggleDropdown()),e.key===`Backspace`&&ct.length===0&&rt.length>0&&(Ie?.(rt[rt.length-1]),it(rt.slice(0,rt.length-1))),st(e))},ht=rt.map((e,t)=>{let n=Xe[`${e}`]||Ze.current[`${e}`],r=at(t);return Fe?(0,G.jsx)(w.Fragment,{children:Fe({option:n,value:e,onRemove:()=>{it(rt.filter(t=>e!==t)),Ie?.(e)},disabled:N,reorderProps:r})},`${e}-${t}`):(0,G.jsx)(vh,{withRemoveButton:!M&&!Xe[`${e}`]?.disabled,onRemove:()=>{it(rt.filter(t=>e!==t)),Ie?.(e)},unstyled:o,disabled:N,...dt(`pill`),...r,children:n?.label||e},`${e}-${t}`)});(0,w.useEffect)(()=>{y&&Qe.selectFirstOption()},[y,ct]),(0,w.useEffect)(()=>{rt.forEach(e=>{`${e}`in Xe&&(Ze.current[`${e}`]=Xe[`${e}`])})},[Xe,rt]);let gt=(0,G.jsx)(Gf.ClearButton,{...Ee,onClear:()=>{Le?.(),it([]),ut(``)}}),_t=Th({data:Ye,value:rt}),vt=we&&rt.length>0&&!N&&!M,yt=vt?{paddingInlineEnd:Eh[c]??Eh.sm}:void 0;return(0,G.jsxs)(G.Fragment,{children:[(0,G.jsxs)(Gf,{store:Qe,classNames:ft,styles:pt,unstyled:o,size:c,readOnly:M,__staticSelector:`MultiSelect`,attributes:Ve,floatingHeight:O,onOptionSubmit:e=>{x?.(e),He&&ut(``),Qe.updateSelectedOptionIndex(`selected`),rt.includes(Xe[`${e}`].value)?(it(rt.filter(t=>t!==Xe[`${e}`].value)),Ie?.(Xe[`${e}`].value)):rt.length<fe?it([...rt,Xe[`${e}`].value]):Re?.()},...S,children:[(0,G.jsx)(Gf.DropdownTarget,{children:(0,G.jsx)(Ch,{...$e,__staticSelector:`MultiSelect`,classNames:ft,styles:pt,unstyled:o,size:c,className:r,style:i,variant:p,disabled:N,radius:I,__defaultRightSection:(0,G.jsx)(Gf.Chevron,{size:c,error:ue,unstyled:o,color:Be}),__clearSection:gt,__clearable:vt,__clearSectionMode:Te,rightSection:L,rightSectionPointerEvents:z||`none`,rightSectionWidth:R,rightSectionProps:B,leftSection:V,leftSectionWidth:H,leftSectionPointerEvents:ee,leftSectionProps:te,loading:We,loadingPosition:Ge,inputContainer:U,inputWrapperOrder:ne,withAsterisk:re,labelProps:ie,descriptionProps:ae,errorProps:oe,successProps:se,wrapperProps:ce,description:le,label:W,error:ue,success:de,withErrorStyles:ye,withSuccessStyles:be,__stylesApiProps:{...t,rightSectionPointerEvents:z||`none`,multiline:!0},pointer:!pe,onClick:()=>pe?Qe.openDropdown():Qe.toggleDropdown(),"data-expanded":Qe.dropdownOpened||void 0,id:Je,required:je,mod:Ne,attributes:Ve,children:(0,G.jsxs)(vh.Group,{attributes:Ve,disabled:N,unstyled:o,...dt(`pillsList`,{style:yt}),...ot(),children:[ht,(0,G.jsx)(Gf.EventsTarget,{autoComplete:tt,withExpandedAttribute:!0,children:(0,G.jsx)(Ch.Field,{...nt,id:Je,placeholder:ke,type:!pe&&!ke?`hidden`:`visible`,...dt(`inputField`),unstyled:o,onFocus:e=>{P?.(e),Ue&&pe&&Qe.openDropdown()},onBlur:e=>{F?.(e),Qe.closeDropdown(),ut(``)},onKeyDown:mt,value:ct,onChange:e=>{ut(e.currentTarget.value),pe&&Qe.openDropdown(),y&&Qe.selectFirstOption()},disabled:N,readOnly:M||!pe,pointer:!pe})})]})})}),(0,G.jsx)(rp,{data:ve?_t:Ye,hidden:M||N,filter:C,search:ct,limit:T,hiddenWhenEmpty:!me,withScrollArea:E,maxDropdownHeight:D,filterOptions:pe,value:rt,checkIconPosition:_e,withCheckIcon:he,withAlignedLabels:ge,nothingFoundMessage:me,unstyled:o,labelId:W?`${Je}-label`:void 0,"aria-label":W?void 0:qe[`aria-label`],renderOption:Pe,scrollAreaProps:ze})]}),(0,G.jsx)(Gf.HiddenInput,{name:xe,valuesDivider:Ae,value:rt,form:Se,disabled:N,...Oe})]})});Oh.classes={...wd.classes,...Gf.classes},Oh.displayName=`@mantine/core/MultiSelect`;var kh={root:`m_f0824112`,description:`m_57492dcc`,section:`m_690090b5`,label:`m_1f6ac4c4`,body:`m_f07af9d2`,children:`m_e17b862f`,chevron:`m_1fd8a00b`},Ah=mt((e,{variant:t,color:n,childrenOffset:r,autoContrast:i})=>{let a=e.variantColorResolver({color:n||e.primaryColor,theme:e,variant:t||`light`,autoContrast:i});return{root:{"--nl-bg":n||t?a.background:void 0,"--nl-hover":n||t?a.hover:void 0,"--nl-color":n||t?a.color:void 0},children:{"--nl-offset":L(r)}}}),jh=Ar(e=>{let t=K(`NavLink`,null,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,opened:c,defaultOpened:l,onChange:u,children:d,active:f,disabled:p,leftSection:m,rightSection:h,label:g,description:_,disableRightSectionRotation:v,noWrap:y,childrenOffset:b,autoContrast:x,mod:S,attributes:C,onClick:w,onKeyDown:T,keepMounted:E,...D}=t,O=Jn({name:`NavLink`,props:t,classes:kh,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:C,vars:s,varsResolver:Ah}),[k,A]=Me({value:c,defaultValue:l,finalValue:!1,onChange:u}),j=!!d,M=e=>{w?.(e),j&&(e.preventDefault(),A(!k))};return(0,G.jsxs)(G.Fragment,{children:[(0,G.jsxs)(sc,{...O(`root`),component:`a`,onClick:M,onKeyDown:e=>{T?.(e),e.nativeEvent.code===`Space`&&j&&(e.preventDefault(),A(!k))},unstyled:o,mod:[{disabled:p,active:f,expanded:k},S],...D,children:[m&&(0,G.jsx)(J,{component:`span`,...O(`section`),mod:{position:`left`},children:m}),(0,G.jsxs)(J,{...O(`body`),mod:{"no-wrap":y},children:[(0,G.jsx)(J,{component:`span`,...O(`label`),children:g}),(0,G.jsx)(J,{component:`span`,mod:{active:f},...O(`description`),children:_})]}),(j||h!==void 0)&&(0,G.jsx)(J,{...O(`section`),component:`span`,mod:{rotate:k&&!v,position:`right`},children:j&&h===void 0?(0,G.jsx)(Ad,{...O(`chevron`)}):h})]}),j&&(0,G.jsx)(Br,{expanded:k,keepMounted:E,...O(`collapse`),children:(0,G.jsx)(`div`,{...O(`children`),children:d})})]})});jh.classes=kh,jh.varsResolver=Ah,jh.displayName=`@mantine/core/NavLink`;var Mh={root:`m_a513464`,icon:`m_a4ceffb`,loader:`m_b0920b15`,body:`m_a49ed24`,title:`m_3feedf16`,description:`m_3d733a3a`,closeButton:`m_919a4d88`},Nh={withCloseButton:!0},Ph=mt((e,{radius:t,color:n})=>({root:{"--notification-radius":t===void 0?void 0:R(t),"--notification-color":n?Pt(n,e):void 0}})),Fh=q(e=>{let t=K(`Notification`,Nh,e),{className:n,color:r,radius:i,loading:a,withCloseButton:o,withBorder:s,title:c,icon:l,children:u,onClose:d,closeButtonProps:f,classNames:p,style:m,styles:h,unstyled:g,vars:_,mod:v,loaderProps:y,role:b,attributes:x,...S}=t,C=Jn({name:`Notification`,classes:Mh,props:t,className:n,style:m,classNames:p,styles:h,unstyled:g,attributes:x,vars:_,varsResolver:Ph});return(0,G.jsxs)(J,{...C(`root`),mod:[{"data-with-icon":!!l||a,"data-with-border":s},v],role:b||`alert`,...S,children:[l&&!a&&(0,G.jsx)(`div`,{...C(`icon`),children:l}),a&&(0,G.jsx)(cl,{size:28,color:r,...C(`loader`),...y}),(0,G.jsxs)(`div`,{...C(`body`),children:[c&&(0,G.jsx)(`div`,{...C(`title`),children:c}),(0,G.jsx)(J,{...C(`description`),mod:{"data-with-title":!!c},children:u})]}),o&&(0,G.jsx)(xl,{iconSize:16,color:`gray`,...f,unstyled:g,onClick:e=>{f?.onClick?.(e),d?.()},...C(`closeButton`)})]})});Fh.classes=Mh,Fh.varsResolver=Ph,Fh.displayName=`@mantine/core/Notification`;function Ih(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols==`function`)for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n}var Lh;(function(e){e.event=`event`,e.props=`prop`})(Lh||={});function Rh(){}function zh(e){var t,n=void 0;return function(){for(var r=[],i=arguments.length;i--;)r[i]=arguments[i];return t&&r.length===t.length&&r.every(function(e,n){return e===t[n]})?n:(t=r,n=e.apply(void 0,r),n)}}function Bh(e){return!!(e||``).match(/\d/)}function Vh(e){return e==null}function Hh(e){return typeof e==`number`&&isNaN(e)}function Uh(e){return Vh(e)||Hh(e)||typeof e==`number`&&!isFinite(e)}function Wh(e){return e.replace(/[-[\]/{}()*+?.\\^$|]/g,`\\$&`)}function Gh(e){switch(e){case`lakh`:return/(\d+?)(?=(\d\d)+(\d)(?!\d))(\.\d+)?/g;case`wan`:return/(\d)(?=(\d{4})+(?!\d))/g;default:return/(\d)(?=(\d{3})+(?!\d))/g}}function Kh(e,t,n){var r=Gh(n),i=e.search(/[1-9]/);return i=i===-1?e.length:i,e.substring(0,i)+e.substring(i,e.length).replace(r,`$1`+t)}function qh(e){var t=(0,w.useRef)(e);return t.current=e,(0,w.useRef)(function(){for(var e=[],n=arguments.length;n--;)e[n]=arguments[n];return t.current.apply(t,e)}).current}function Jh(e,t){t===void 0&&(t=!0);var n=e[0]===`-`,r=n&&t;e=e.replace(`-`,``);var i=e.split(`.`);return{beforeDecimal:i[0],afterDecimal:i[1]||``,hasNegation:n,addNegation:r}}function Yh(e){if(!e)return e;var t=e[0]===`-`;t&&(e=e.substring(1,e.length));var n=e.split(`.`),r=n[0].replace(/^0+/,``)||`0`,i=n[1]||``;return(t?`-`:``)+r+(i?`.`+i:``)}function Xh(e,t,n){for(var r=``,i=n?`0`:``,a=0;a<=t-1;a++)r+=e[a]||i;return r}function Zh(e,t){return Array(t+1).join(e)}function Qh(e){var t=e+``,n=t[0]===`-`?`-`:``;n&&(t=t.substring(1));var r=t.split(/[eE]/g),i=r[0],a=r[1];if(a=Number(a),!a)return n+i;i=i.replace(`.`,``);var o=1+a,s=i.length;return o<0?i=`0.`+Zh(`0`,Math.abs(o))+i:o>=s?i+=Zh(`0`,o-s):i=(i.substring(0,o)||`0`)+`.`+i.substring(o),n+i}function $h(e,t,n){if([``,`-`].indexOf(e)!==-1)return e;var r=(e.indexOf(`.`)!==-1||n)&&t,i=Jh(e),a=i.beforeDecimal,o=i.afterDecimal,s=i.hasNegation,c=parseFloat(`0.`+(o||`0`)),l=(o.length<=t?`0.`+o:c.toFixed(t)).split(`.`),u=a;a&&Number(l[0])&&(u=a.split(``).reverse().reduce(function(e,t,n){return e.length>n?(Number(e[0])+Number(t)).toString()+e.substring(1,e.length):t+e},l[0]));var d=Xh(l[1]||``,t,n),f=s?`-`:``,p=r?`.`:``;return``+f+u+p+d}function eg(e,t){if(e.value=e.value,e!==null){if(e.createTextRange){var n=e.createTextRange();return n.move(`character`,t),n.select(),!0}return e.selectionStart||e.selectionStart===0?(e.focus(),e.setSelectionRange(t,t),!0):(e.focus(),!1)}}var tg=zh(function(e,t){for(var n=0,r=0,i=e.length,a=t.length;e[n]===t[n]&&n<i;)n++;for(;e[i-1-r]===t[a-1-r]&&a-r>n&&i-r>n;)r++;return{from:{start:n,end:i-r},to:{start:n,end:a-r}}}),ng=function(e,t){var n=Math.min(e.selectionStart,t);return{from:{start:n,end:e.selectionEnd},to:{start:n,end:t}}};function rg(e,t,n){return Math.min(Math.max(e,t),n)}function ig(e){return Math.max(e.selectionStart,e.selectionEnd)}function ag(){return typeof navigator<`u`&&!(navigator.platform&&/iPhone|iPod/.test(navigator.platform))}function og(e){return{from:{start:0,end:0},to:{start:0,end:e.length},lastValue:``}}function sg(e){var t=e.currentValue,n=e.formattedValue,r=e.currentValueIndex,i=e.formattedValueIndex;return t[r]===n[i]}function cg(e,t,n,r,i,a,o){o===void 0&&(o=sg);var s=i.findIndex(function(e){return e}),c=e.slice(0,s);!t&&!n.startsWith(c)&&(t=c,n=c+n,r+=c.length);for(var l=n.length,u=e.length,d={},f=Array(l),p=0;p<l;p++){f[p]=-1;for(var m=0,h=u;m<h;m++)if(o({currentValue:n,lastValue:t,formattedValue:e,currentValueIndex:p,formattedValueIndex:m})&&d[m]!==!0){f[p]=m,d[m]=!0;break}}for(var g=r;g<l&&(f[g]===-1||!a(n[g]));)g++;var _=g===l||f[g]===-1?u:f[g];for(g=r-1;g>0&&f[g]===-1;)g--;var v=g===-1||f[g]===-1?0:f[g]+1;return v>_?_:r-v<_-r?v:_}function lg(e,t,n,r){var i=e.length;if(t=rg(t,0,i),r===`left`){for(;t>=0&&!n[t];)t--;t===-1&&(t=n.indexOf(!0))}else{for(;t<=i&&!n[t];)t++;t>i&&(t=n.lastIndexOf(!0))}return t===-1&&(t=i),t}function ug(e){for(var t=Array.from({length:e.length+1}).map(function(){return!0}),n=0,r=t.length;n<r;n++)t[n]=!!(Bh(e[n])||Bh(e[n-1]));return t}function dg(e,t,n,r,i,a){a===void 0&&(a=Rh);var o=qh(function(e,t){var n,a;return Uh(e)?(a=``,n=``):typeof e==`number`||t?(a=typeof e==`number`?Qh(e):e,n=r(a)):(a=i(e,void 0),n=r(a)),{formattedValue:n,numAsString:a}}),s=(0,w.useState)(function(){return o(Vh(e)?t:e,n)}),c=s[0],l=s[1],u=qh(function(e,t){e.formattedValue!==c.formattedValue&&l({formattedValue:e.formattedValue,numAsString:e.value}),a(e,t)}),d=e,f=n;Vh(e)&&(d=c.numAsString,f=!0);var p=o(d,f);return(0,w.useMemo)(function(){l(p)},[p.formattedValue]),(0,w.useEffect)(function(){if(!Vh(t)&&Vh(e)&&c.formattedValue!==``){var n=parseFloat(c.numAsString);u({formattedValue:c.formattedValue,value:c.numAsString,floatValue:isNaN(n)?void 0:n},{event:void 0,source:Lh.props})}},[]),[c,u]}function fg(e){return e.replace(/[^0-9]/g,``)}function pg(e){return e}function mg(e){var t=e.type;t===void 0&&(t=`text`);var n=e.displayType;n===void 0&&(n=`input`);var r=e.customInput,i=e.renderText,a=e.getInputRef,o=e.format;o===void 0&&(o=pg);var s=e.removeFormatting;s===void 0&&(s=fg);var c=e.defaultValue,l=e.valueIsNumericString,u=e.onValueChange,d=e.isAllowed,f=e.onChange;f===void 0&&(f=Rh);var p=e.onKeyDown;p===void 0&&(p=Rh);var m=e.onMouseUp;m===void 0&&(m=Rh);var h=e.onFocus;h===void 0&&(h=Rh);var g=e.onBlur;g===void 0&&(g=Rh);var _=e.value,v=e.getCaretBoundary;v===void 0&&(v=ug);var y=e.isValidInputCharacter;y===void 0&&(y=Bh);var b=e.isCharacterSame,x=Ih(e,[`type`,`displayType`,`customInput`,`renderText`,`getInputRef`,`format`,`removeFormatting`,`defaultValue`,`valueIsNumericString`,`onValueChange`,`isAllowed`,`onChange`,`onKeyDown`,`onMouseUp`,`onFocus`,`onBlur`,`value`,`getCaretBoundary`,`isValidInputCharacter`,`isCharacterSame`]),S=dg(_,c,!!l,o,s,u),C=S[0],T=C.formattedValue,E=C.numAsString,D=S[1],O=(0,w.useRef)(),k=(0,w.useRef)({formattedValue:T,numAsString:E}),A=function(e,t){k.current={formattedValue:e.formattedValue,numAsString:e.value},D(e,t)},j=(0,w.useState)(!1),M=j[0],N=j[1],P=(0,w.useRef)(null),F=(0,w.useRef)({setCaretTimeout:null,focusTimeout:null});(0,w.useEffect)(function(){return N(!0),function(){clearTimeout(F.current.setCaretTimeout),clearTimeout(F.current.focusTimeout)}},[]);var I=o,L=function(e,t){var n=parseFloat(t);return{formattedValue:e,value:t,floatValue:isNaN(n)?void 0:n}},R=function(e,t,n){(e.selectionStart!==0||e.selectionEnd!==e.value.length)&&(eg(e,t),F.current.setCaretTimeout=setTimeout(function(){e.value===n&&e.selectionStart!==t&&eg(e,t)},0))},z=function(e,t,n){return lg(e,t,v(e),n)},B=function(e,t,n){var r=v(t),i=cg(t,T,e,n,r,y,b);return i=lg(t,i,r),i},V=function(e){var t=e.formattedValue;t===void 0&&(t=``);var n=e.input,r=e.source,i=e.event,a=e.numAsString,o;if(n){var s=e.inputValue||n.value,c=ig(n);n.value=t,o=B(s,t,c),o!==void 0&&R(n,o,t)}t!==T&&A(L(t,a),{event:i,source:r})};(0,w.useEffect)(function(){var e=k.current,t=e.formattedValue,n=e.numAsString;(T!==t||E!==n)&&A(L(T,E),{event:void 0,source:Lh.props})},[T,E]);var H=P.current?ig(P.current):void 0;(typeof window<`u`?w.useLayoutEffect:w.useEffect)(function(){var e=P.current;if(T!==k.current.formattedValue&&e){var t=B(k.current.formattedValue,T,H);e.value=T,R(e,t,T)}},[T]);var ee=function(e,t,n){var r=t.target,i=O.current?ng(O.current,r.selectionEnd):tg(T,e),a=Object.assign(Object.assign({},i),{lastValue:T}),o=s(e,a),c=I(o);if(o=s(c,void 0),d&&!d(L(c,o))){var l=t.target,u=B(e,T,ig(l));return l.value=T,R(l,u,T),!1}return V({formattedValue:c,numAsString:o,inputValue:e,event:t,source:n,input:t.target}),!0},te=function(e,t){t===void 0&&(t=0),O.current={selectionStart:e.selectionStart,selectionEnd:e.selectionEnd+t}},U=function(e){var t=e.target.value;ee(t,e,Lh.event)&&f(e),O.current=void 0},ne=function(e){var t=e.target,n=e.key,r=t.selectionStart,i=t.selectionEnd,a=t.value;a===void 0&&(a=``);var o;n===`ArrowLeft`||n===`Backspace`?o=Math.max(r-1,0):n===`ArrowRight`?o=Math.min(r+1,a.length):n===`Delete`&&(o=r);var s=0;n===`Delete`&&r===i&&(s=1);var c=n===`ArrowLeft`||n===`ArrowRight`;if(o===void 0||r!==i&&!c){p(e),te(t,s);return}var l=o;c?(l=z(a,o,n===`ArrowLeft`?`left`:`right`),l!==o&&e.preventDefault()):n===`Delete`&&!y(a[o])?l=z(a,o,`right`):n===`Backspace`&&!y(a[o])&&(l=z(a,o,`left`)),l!==o&&R(t,l,a),p(e),te(t,s)},re=function(e){var t=e.target,n=function(){var e=t.selectionStart,n=t.selectionEnd,r=t.value;if(r===void 0&&(r=``),e===n){var i=z(r,e);i!==e&&R(t,i,r)}};n(),requestAnimationFrame(function(){n()}),m(e),te(t)},ie=function(e){e.persist&&e.persist();var t=e.target,n=e.currentTarget;P.current=t,F.current.focusTimeout=setTimeout(function(){var r=t.selectionStart,i=t.selectionEnd,a=t.value;a===void 0&&(a=``);var o=z(a,r);o!==r&&(r!==0||i!==a.length)&&R(t,o,a),h(Object.assign(Object.assign({},e),{currentTarget:n}))},0)},ae=function(e){P.current=null,clearTimeout(F.current.focusTimeout),clearTimeout(F.current.setCaretTimeout),g(e)},oe=M&&ag()?`numeric`:void 0,se=Object.assign({inputMode:oe},x,{type:t,value:T,onChange:U,onKeyDown:ne,onMouseUp:re,onFocus:ie,onBlur:ae});if(n===`text`)return i?w.createElement(w.Fragment,null,i(T,x)||null):w.createElement(`span`,Object.assign({},x,{ref:a}),T);if(r){var ce=r;return w.createElement(ce,Object.assign({},se,{ref:a}))}return w.createElement(`input`,Object.assign({},se,{ref:a}))}function hg(e,t){var n=t.decimalScale,r=t.fixedDecimalScale,i=t.prefix;i===void 0&&(i=``);var a=t.suffix;a===void 0&&(a=``);var o=t.allowNegative,s=t.thousandsGroupStyle;if(s===void 0&&(s=`thousand`),e===``||e===`-`)return e;var c=gg(t),l=c.thousandSeparator,u=c.decimalSeparator,d=n!==0&&e.indexOf(`.`)!==-1||n&&r,f=Jh(e,o),p=f.beforeDecimal,m=f.afterDecimal,h=f.addNegation;return n!==void 0&&(m=Xh(m,n,!!r)),l&&(p=Kh(p,l,s)),i&&(p=i+p),a&&(m+=a),h&&(p=`-`+p),e=p+(d&&u||``)+m,e}function gg(e){var t=e.decimalSeparator;t===void 0&&(t=`.`);var n=e.thousandSeparator,r=e.allowedDecimalSeparators;return n===!0&&(n=`,`),r||=[t,`.`],{decimalSeparator:t,thousandSeparator:n,allowedDecimalSeparators:r}}function _g(e,t){e===void 0&&(e=``);var n=RegExp(`(-)`),r=RegExp(`(-)(.)*(-)`),i=n.test(e),a=r.test(e);return e=e.replace(/-/g,``),i&&!a&&t&&(e=`-`+e),e}function vg(e,t){return RegExp(`(^-)|[0-9]|`+Wh(e),t?`g`:void 0)}function yg(e,t,n){return e===``||!t?.match(/\d/)&&!n?.match(/\d/)&&typeof e==`string`&&!isNaN(Number(e))}function bg(e,t,n){var r;t===void 0&&(t=og(e));var i=n.allowNegative,a=n.prefix;a===void 0&&(a=``);var o=n.suffix;o===void 0&&(o=``);var s=n.decimalScale,c=t.from,l=t.to,u=l.start,d=l.end,f=gg(n),p=f.allowedDecimalSeparators,m=f.decimalSeparator,h=e[d]===m;if(Bh(e)&&(e===a||e===o)&&t.lastValue===``)return e;if(d-u===1&&p.indexOf(e[u])!==-1){var g=s===0?``:m;e=e.substring(0,u)+g+e.substring(u+1,e.length)}var _=function(e,t,n){var r=!1,i=!1;a.startsWith(`-`)?r=!1:e.startsWith(`--`)?(r=!1,i=!0):o.startsWith(`-`)&&e.length===o.length?r=!1:e[0]===`-`&&(r=!0);var s=+!!r;return i&&(s=2),s&&(e=e.substring(s),t-=s,n-=s),{value:e,start:t,end:n,hasNegation:r}},v=_(e,u,d),y=v.hasNegation;r=v,e=r.value,u=r.start,d=r.end;var b=_(t.lastValue,c.start,c.end),x=b.start,S=b.end,C=b.value,w=e.substring(u,d);e.length&&C.length&&(x>C.length-o.length||S<a.length)&&!(w&&o.startsWith(w))&&(e=C);var T=0;e.startsWith(a)?T+=a.length:u<a.length&&(T=u),e=e.substring(T),d-=T;var E=e.length,D=e.length-o.length;e.endsWith(o)?E=D:(d>D||d>e.length-o.length)&&(E=d),e=e.substring(0,E),e=_g(y?`-`+e:e,i),e=(e.match(vg(m,!0))||[]).join(``);var O=e.indexOf(m);e=e.replace(new RegExp(Wh(m),`g`),function(e,t){return t===O?`.`:``});var k=Jh(e,i),A=k.beforeDecimal,j=k.afterDecimal,M=k.addNegation;return l.end-l.start<c.end-c.start&&A===``&&h&&!parseFloat(j)&&(e=M?`-`:``),e}function xg(e,t){var n=t.prefix;n===void 0&&(n=``);var r=t.suffix;r===void 0&&(r=``);var i=Array.from({length:e.length+1}).map(function(){return!0}),a=e[0]===`-`;i.fill(!1,0,Math.min(n.length+ +!!a,e.length));var o=e.length;return i.fill(!1,o-r.length+1,o+1),i}function Sg(e){var t=gg(e),n=t.thousandSeparator,r=t.decimalSeparator,i=e.prefix;i===void 0&&(i=``);var a=e.allowNegative;if(a===void 0&&(a=!0),n===r)throw Error(`
41
+ `},Pu=0,Fu=[];function Iu(e){var t=w.useRef([]),n=w.useRef([0,0]),r=w.useRef(),i=w.useState(Pu++)[0],a=w.useState(iu)[0],o=w.useRef(e);w.useEffect(function(){o.current=e},[e]),w.useEffect(function(){if(e.inert){document.body.classList.add(`block-interactivity-${i}`);var t=Nl([e.lockRef.current],(e.shards||[]).map(ju),!0).filter(Boolean);return t.forEach(function(e){return e.classList.add(`allow-interactivity-${i}`)}),function(){document.body.classList.remove(`block-interactivity-${i}`),t.forEach(function(e){return e.classList.remove(`allow-interactivity-${i}`)})}}},[e.inert,e.lockRef.current,e.shards]);var s=w.useCallback(function(e,t){if(`touches`in e&&e.touches.length===2||e.type===`wheel`&&e.ctrlKey)return!o.current.allowPinchZoom;var i=ku(e),a=n.current,s=`deltaX`in e?e.deltaX:a[0]-i[0],c=`deltaY`in e?e.deltaY:a[1]-i[1],l,u=e.target,d=Math.abs(s)>Math.abs(c)?`h`:`v`;if(`touches`in e&&d===`h`&&u.type===`range`)return!1;var f=window.getSelection(),p=f&&f.anchorNode;if(p&&(p===u||p.contains(u)))return!1;var m=Su(d,u);if(!m)return!0;if(m?l=d:(l=d===`v`?`h`:`v`,m=Su(d,u)),!m)return!1;if(!r.current&&`changedTouches`in e&&(s||c)&&(r.current=l),!l)return!0;var h=r.current||l;return Ou(h,t,e,h===`h`?s:c,!0)},[]),c=w.useCallback(function(e){var n=e;if(!(!Fu.length||Fu[Fu.length-1]!==a)){var r=`deltaY`in n?Au(n):ku(n),i=t.current.filter(function(e){return e.name===n.type&&(e.target===n.target||n.target===e.shadowParent)&&Mu(e.delta,r)})[0];if(i&&i.should){n.cancelable&&n.preventDefault();return}if(!i){var c=(o.current.shards||[]).map(ju).filter(Boolean).filter(function(e){return e.contains(n.target)});(c.length>0?s(n,c[0]):!o.current.noIsolation)&&n.cancelable&&n.preventDefault()}}},[]),l=w.useCallback(function(e,n,r,i){var a={name:e,delta:n,target:r,should:i,shadowParent:Lu(r)};t.current.push(a),setTimeout(function(){t.current=t.current.filter(function(e){return e!==a})},1)},[]),u=w.useCallback(function(e){n.current=ku(e),r.current=void 0},[]),d=w.useCallback(function(t){l(t.type,Au(t),t.target,s(t,e.lockRef.current))},[]),f=w.useCallback(function(t){l(t.type,ku(t),t.target,s(t,e.lockRef.current))},[]);w.useEffect(function(){return Fu.push(a),e.setCallbacks({onScrollCapture:d,onWheelCapture:d,onTouchMoveCapture:f}),document.addEventListener(`wheel`,c,_u),document.addEventListener(`touchmove`,c,_u),document.addEventListener(`touchstart`,u,_u),function(){Fu=Fu.filter(function(e){return e!==a}),document.removeEventListener(`wheel`,c,_u),document.removeEventListener(`touchmove`,c,_u),document.removeEventListener(`touchstart`,u,_u)}},[]);var p=e.removeScrollBar,m=e.inert;return w.createElement(w.Fragment,null,m?w.createElement(a,{styles:Nu(i)}):null,p?w.createElement(mu,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function Lu(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}var Ru=ql(Jl,Iu),zu=w.forwardRef(function(e,t){return w.createElement(Xl,jl({},e,{ref:t,sideCar:Ru}))});zu.classNames=Xl.classNames;function Bu({keepMounted:e,keepMountedMode:t=`activity`,opened:n,onClose:r,id:i,transitionProps:a,onExitTransitionEnd:o,onEnterTransitionEnd:s,trapFocus:c,closeOnEscape:l,returnFocus:u,closeOnClickOutside:d,withinPortal:f,portalProps:p,lockScroll:m,children:h,zIndex:g,shadow:_,padding:v,__vars:y,unstyled:b,removeScrollProps:x,...S}){let{_id:C,titleMounted:w,bodyMounted:T,shouldLockScroll:E,setTitleMounted:D,setBodyMounted:O}=Al({id:i,transitionProps:a,opened:n,trapFocus:c,closeOnEscape:l,onClose:r,returnFocus:u}),{key:k,...A}=x||{};return(0,G.jsx)(Ac,{...p,withinPortal:f,children:(0,G.jsx)(Dl,{value:{opened:n,onClose:r,closeOnClickOutside:d,onExitTransitionEnd:o,onEnterTransitionEnd:s,transitionProps:{...a,keepMounted:e,keepMountedMode:t},getTitleId:()=>`${C}-title`,getBodyId:()=>`${C}-body`,titleMounted:w,bodyMounted:T,setTitleMounted:D,setBodyMounted:O,trapFocus:c,closeOnEscape:l,zIndex:g,unstyled:b},children:(0,G.jsx)(zu,{enabled:E&&m,...A,children:(0,G.jsx)(J,{...S,id:C,__vars:{...y,"--mb-z-index":(g||N(`modal`)).toString(),"--mb-shadow":V(_),"--mb-padding":L(v)},children:h})},k)})})}Bu.displayName=`@mantine/core/ModalBase`;function Vu(){let e=Ol();return(0,w.useEffect)(()=>(e.setBodyMounted(!0),()=>e.setBodyMounted(!1)),[]),e.getBodyId()}var Hu={title:`m_615af6c9`,header:`m_b5489c3c`,inner:`m_60c222c7`,content:`m_fd1ab0aa`,close:`m_606cb269`,body:`m_5df29311`};function Uu({className:e,...t}){let n=Vu(),r=Ol();return(0,G.jsx)(J,{id:n,className:gt({[Hu.body]:!r.unstyled},e),...t})}Uu.displayName=`@mantine/core/ModalBaseBody`;function Wu({className:e,onClick:t,...n}){let r=Ol();return(0,G.jsx)(xl,{...n,onClick:e=>{r.onClose(),t?.(e)},className:gt({[Hu.close]:!r.unstyled},e),unstyled:r.unstyled})}Wu.displayName=`@mantine/core/ModalBaseCloseButton`;function Gu({transitionProps:e,className:t,innerProps:n,onKeyDown:r,style:i,ref:a,...o}){let s=Ol();return(0,G.jsx)(Ic,{mounted:s.opened,transition:`pop`,...s.transitionProps,onExited:()=>{s.onExitTransitionEnd?.(),s.transitionProps?.onExited?.()},onEntered:()=>{s.onEnterTransitionEnd?.(),s.transitionProps?.onEntered?.()},...e,children:e=>(0,G.jsx)(`div`,{...n,className:gt({[Hu.inner]:!s.unstyled},n.className),children:(0,G.jsx)(Uc,{active:s.opened&&s.trapFocus,innerRef:a,children:(0,G.jsx)(fc,{...o,component:`section`,role:`dialog`,tabIndex:-1,"aria-modal":!0,"aria-describedby":s.bodyMounted?s.getBodyId():void 0,"aria-labelledby":s.titleMounted?s.getTitleId():void 0,style:[i,e],className:gt({[Hu.content]:!s.unstyled},t),unstyled:s.unstyled,children:o.children})})})})}Gu.displayName=`@mantine/core/ModalBaseContent`;function Ku({className:e,...t}){let n=Ol();return(0,G.jsx)(J,{component:`header`,className:gt({[Hu.header]:!n.unstyled},e),...t})}Ku.displayName=`@mantine/core/ModalBaseHeader`;var qu={duration:200,timingFunction:`ease`,transition:`fade`};function Ju(e){let t=Ol();return{...qu,...t.transitionProps,...e}}function Yu({onClick:e,transitionProps:t,style:n,visible:r,...i}){let a=Ol(),o=Ju(t);return(0,G.jsx)(Ic,{mounted:r===void 0?a.opened:r,...o,transition:`fade`,children:t=>(0,G.jsx)(Tc,{fixed:!0,style:[n,t],zIndex:a.zIndex,unstyled:a.unstyled,onClick:t=>{e?.(t),a.closeOnClickOutside&&a.onClose()},...i})})}Yu.displayName=`@mantine/core/ModalBaseOverlay`;function Xu(){let e=Ol();return(0,w.useEffect)(()=>(e.setTitleMounted(!0),()=>e.setTitleMounted(!1)),[]),e.getTitleId()}function Zu({className:e,...t}){let n=Xu(),r=Ol();return(0,G.jsx)(J,{component:`h2`,className:gt({[Hu.title]:!r.unstyled},e),id:n,...t})}Zu.displayName=`@mantine/core/ModalBaseTitle`;function Qu({children:e}){return(0,G.jsx)(G.Fragment,{children:e})}var $u=(0,w.createContext)({size:`sm`}),ed=q(e=>{let t=K(`InputClearButton`,null,e),{size:n,variant:r,vars:i,classNames:a,styles:o,...s}=t,c=(0,w.use)($u),{resolvedClassNames:l,resolvedStyles:u}=Pn({classNames:a,styles:o,props:t});return(0,G.jsx)(xl,{variant:r||`transparent`,size:n||c?.size||`sm`,classNames:l,styles:u,__staticSelector:`InputClearButton`,style:{pointerEvents:`all`,background:`var(--input-bg)`,...s.style},...s})});ed.displayName=`@mantine/core/InputClearButton`;var td={xs:7,sm:8,md:10,lg:12,xl:15};function nd({__clearable:e,__clearSection:t,rightSection:n,__defaultRightSection:r,size:i=`sm`,__clearSectionMode:a=`both`}){let o=e&&t;return a===`rightSection`?n===null?null:n||r:a===`clear`?n===null?null:o||r:o&&(n||r)?(0,G.jsxs)(`div`,{"data-combined-clear-section":!0,style:{display:`flex`,gap:2,alignItems:`center`,paddingInlineEnd:td[i]},children:[o,n||r]}):n===null?null:n||o||r}var rd=(0,w.createContext)({offsetBottom:!1,offsetTop:!1,describedBy:void 0,getStyles:null,inputId:void 0,labelId:void 0}),id={wrapper:`m_6c018570`,input:`m_8fb7ebe7`,bottomSection:`m_93f4ed57`,section:`m_82577fc2`,placeholder:`m_88bacfd0`,root:`m_46b77525`,label:`m_8fdc1311`,required:`m_78a94662`,error:`m_8f816625`,success:`m_9d9d40e0`,description:`m_fe47ce59`},ad=mt((e,{size:t})=>({description:{"--input-description-size":t===void 0?void 0:`calc(${z(t)} - ${v(2)})`}})),od=q(e=>{let t=K(`InputDescription`,null,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,__staticSelector:c,__inheritStyles:l=!0,attributes:u,...d}=K(`InputDescription`,null,t),f=(0,w.use)(rd),p=Jn({name:[`InputWrapper`,c],props:t,classes:id,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:u,rootSelector:`description`,vars:s,varsResolver:ad});return(0,G.jsx)(J,{component:`p`,...(l&&f?.getStyles||p)(`description`,f?.getStyles?{className:r,style:i}:void 0),...d})});od.classes=id,od.varsResolver=ad,od.displayName=`@mantine/core/InputDescription`;var sd=mt((e,{size:t})=>({error:{"--input-error-size":t===void 0?void 0:`calc(${z(t)} - ${v(2)})`}})),cd=q(e=>{let t=K(`InputError`,null,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,attributes:c,__staticSelector:l,__inheritStyles:u=!0,...d}=t,f=Jn({name:[`InputWrapper`,l],props:t,classes:id,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:c,rootSelector:`error`,vars:s,varsResolver:sd}),p=(0,w.use)(rd);return(0,G.jsx)(J,{component:`p`,...(u&&p?.getStyles||f)(`error`,p?.getStyles?{className:r,style:i}:void 0),...d})});cd.classes=id,cd.varsResolver=sd,cd.displayName=`@mantine/core/InputError`;var ld={labelElement:`label`},ud=mt((e,{size:t})=>({label:{"--input-label-size":z(t),"--input-asterisk-color":void 0}})),dd=q(e=>{let t=K(`InputLabel`,ld,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,labelElement:c,required:l,htmlFor:u,onMouseDown:d,children:f,__staticSelector:p,mod:m,attributes:h,...g}=t,_=Jn({name:[`InputWrapper`,p],props:t,classes:id,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:h,rootSelector:`label`,vars:s,varsResolver:ud}),v=(0,w.use)(rd),y=v?.getStyles||_,b=g.component||c,x=typeof b!=`string`||b===`label`;return(0,G.jsxs)(J,{...y(`label`,v?.getStyles?{className:r,style:i}:void 0),component:c,htmlFor:x?u:void 0,mod:[{required:l},m],onMouseDown:e=>{d?.(e),!e.defaultPrevented&&e.detail>1&&e.preventDefault()},...g,children:[f,l&&(0,G.jsx)(`span`,{...y(`required`),"aria-hidden":!0,children:` *`})]})});dd.classes=id,dd.varsResolver=ud,dd.displayName=`@mantine/core/InputLabel`;var fd=q(e=>{let t=K(`InputPlaceholder`,null,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,__staticSelector:c,error:l,mod:u,attributes:d,...f}=t;return(0,G.jsx)(J,{...Jn({name:[`InputPlaceholder`,c],props:t,classes:id,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:d,rootSelector:`placeholder`})(`placeholder`),mod:[{error:!!l},u],component:`span`,...f})});fd.classes=id,fd.displayName=`@mantine/core/InputPlaceholder`;var pd=mt((e,{size:t})=>({success:{"--input-success-size":t===void 0?void 0:`calc(${z(t)} - ${v(2)})`}})),md=q(e=>{let t=K(`InputSuccess`,null,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,attributes:c,__staticSelector:l,__inheritStyles:u=!0,...d}=t,f=Jn({name:[`InputWrapper`,l],props:t,classes:id,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:c,rootSelector:`success`,vars:s,varsResolver:pd}),p=(0,w.use)(rd);return(0,G.jsx)(J,{component:`p`,...(u&&p?.getStyles||f)(`success`,p?.getStyles?{className:r,style:i}:void 0),...d})});md.classes=id,md.varsResolver=pd,md.displayName=`@mantine/core/InputSuccess`;function hd(e,{hasDescription:t,hasError:n}){let r=e.findIndex(e=>e===`input`),i=e.slice(0,r),a=e.slice(r+1),o=t&&i.includes(`description`)||n&&i.includes(`error`);return{offsetBottom:t&&a.includes(`description`)||n&&a.includes(`error`),offsetTop:o}}var gd={labelElement:`label`,inputContainer:e=>e,inputWrapperOrder:[`label`,`description`,`input`,`error`]},_d=mt((e,{size:t})=>({label:{"--input-label-size":z(t),"--input-asterisk-color":void 0},error:{"--input-error-size":t===void 0?void 0:`calc(${z(t)} - ${v(2)})`},success:{"--input-success-size":t===void 0?void 0:`calc(${z(t)} - ${v(2)})`},description:{"--input-description-size":t===void 0?void 0:`calc(${z(t)} - ${v(2)})`}})),vd=q(e=>{let t=K(`InputWrapper`,gd,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,size:c,variant:l,__staticSelector:u,inputContainer:d,inputWrapperOrder:f,label:p,error:m,success:h,description:g,labelProps:_,descriptionProps:v,errorProps:y,successProps:b,labelElement:x,children:S,withAsterisk:C,id:T,required:E,__stylesApiProps:D,mod:O,attributes:k,...A}=t,j=Jn({name:[`InputWrapper`,u],props:D||t,classes:id,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:k,vars:s,varsResolver:_d}),M={size:c,variant:l,__staticSelector:u},N=De(T),P=typeof C==`boolean`?C:E,F=y?.id||`${N}-error`,I=b?.id||`${N}-success`,L=v?.id||`${N}-description`,R=N,z=!!m&&typeof m!=`boolean`,B=!!h&&typeof h!=`boolean`&&!m,V=!!g,H=z&&f.includes(`error`),ee=B&&f.includes(`error`),te=V&&f.includes(`description`),U=`${H?F:``} ${ee?I:``} ${te?L:``}`,ne=U.trim().length>0?U.trim():void 0,re=_?.id||`${N}-label`,ie=p&&(0,G.jsx)(dd,{labelElement:x,id:re,htmlFor:R,required:P,...M,..._,children:p},`label`),ae=V&&(0,G.jsx)(od,{...v,...M,size:v?.size||M.size,id:v?.id||L,children:g},`description`),oe=(0,G.jsx)(w.Fragment,{children:d(S)},`input`),se=z&&(0,w.createElement)(cd,{...y,...M,size:y?.size||M.size,key:`error`,id:y?.id||F},m),ce=B&&(0,w.createElement)(md,{...b,...M,size:b?.size||M.size,key:`success`,id:b?.id||I},h),le=f.map(e=>{switch(e){case`label`:return ie;case`input`:return oe;case`description`:return ae;case`error`:return se||ce;default:return null}});return(0,G.jsx)(rd,{value:{getStyles:j,describedBy:ne,inputId:R,labelId:re,...hd(f,{hasDescription:V,hasError:z||B})},children:(0,G.jsx)(J,{variant:l,size:c,mod:[{error:!!m,success:!!h&&!m},O],id:x===`label`?void 0:T,...j(`root`),...A,children:le})})});vd.classes=id,vd.varsResolver=_d,vd.displayName=`@mantine/core/InputWrapper`;var yd={variant:`default`,leftSectionPointerEvents:`none`,rightSectionPointerEvents:`none`,withAria:!0,withErrorStyles:!0,withSuccessStyles:!0,size:`sm`,loading:!1,loadingPosition:`right`},bd=mt((e,t,n)=>({wrapper:{"--input-margin-top":n.offsetTop?`calc(var(--mantine-spacing-xs) / 2)`:void 0,"--input-margin-bottom":n.offsetBottom?`calc(var(--mantine-spacing-xs) / 2)`:void 0,"--input-height":I(t.size,`input-height`),"--input-fz":z(t.size),"--input-radius":t.radius===void 0?void 0:R(t.radius),"--input-left-section-width":t.leftSectionWidth===void 0?void 0:v(t.leftSectionWidth),"--input-right-section-width":t.rightSectionWidth===void 0?void 0:v(t.rightSectionWidth),"--input-padding-y":t.multiline?I(t.size,`input-padding-y`):void 0,"--input-left-section-pointer-events":t.leftSectionPointerEvents,"--input-right-section-pointer-events":t.rightSectionPointerEvents}})),xd=Ar(e=>{let t=K(`Input`,yd,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,required:s,__staticSelector:c,__stylesApiProps:l,size:u,wrapperProps:d,error:f,success:p,disabled:m,leftSection:h,leftSectionProps:g,leftSectionWidth:_,rightSection:v,rightSectionProps:y,rightSectionWidth:b,rightSectionPointerEvents:x,leftSectionPointerEvents:S,variant:C,vars:T,pointer:E,multiline:D,radius:O,id:k,withAria:A,withErrorStyles:j,withSuccessStyles:M,mod:N,inputSize:P,attributes:F,__clearSection:I,__clearable:L,__clearSectionMode:R,__defaultRightSection:z,loading:B,loadingPosition:V,__bottomSection:H,__bottomSectionProps:ee,rootRef:te,dir:U,...ne}=t,{styleProps:re,rest:ie}=tr(ne),ae=(0,w.use)(rd),oe={offsetBottom:ae?.offsetBottom,offsetTop:ae?.offsetTop},se=Jn({name:[`Input`,c],props:l||t,classes:id,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:F,stylesCtx:oe,rootSelector:`wrapper`,vars:T,varsResolver:bd}),ce=A?{required:s,disabled:m,"aria-invalid":f?!0:void 0,"aria-describedby":ae?.describedBy,id:ae?.inputId||k}:{},le=B?(0,G.jsx)(cl,{size:V===`left`?`calc(var(--input-left-section-size) / 2)`:`calc(var(--input-right-section-size) / 2)`}):null,W=B&&V===`left`?le:h,ue=nd({__clearable:L,__clearSection:I,rightSection:B&&V===`right`?le:v,__defaultRightSection:z,size:u,__clearSectionMode:R});return(0,G.jsx)($u,{value:{size:u||`sm`},children:(0,G.jsxs)(J,{ref:te,dir:U,...se(`wrapper`),...re,...d,mod:[{error:!!f&&j,success:!!p&&!f&&M,pointer:E,disabled:m,multiline:D,"data-with-right-section":!!ue,"data-with-left-section":!!W,"data-with-bottom-section":!!H},N],variant:C,size:u,children:[W&&(0,G.jsx)(`div`,{...g,"data-position":`left`,...se(`section`,{className:g?.className,style:g?.style}),children:W}),(0,G.jsx)(J,{component:`input`,...ie,...ce,required:s,mod:{disabled:m,error:!!f&&j,success:!!p&&!f&&M},variant:C,__size:P,...se(`input`)}),H&&(0,G.jsx)(`div`,{...ee,...se(`bottomSection`,{className:ee?.className,style:ee?.style}),children:H}),ue&&(0,G.jsx)(`div`,{...y,"data-position":`right`,...se(`section`,{className:y?.className,style:y?.style}),children:ue})]})})});xd.classes=id,xd.varsResolver=bd,xd.Wrapper=vd,xd.Label=dd,xd.Error=cd,xd.Success=md,xd.Description=od,xd.Placeholder=fd,xd.ClearButton=ed,xd.displayName=`@mantine/core/Input`;function Sd(e,t,n){let r=K([`Input`,`InputWrapper`,e],t,n),{label:i,description:a,error:o,success:s,required:c,classNames:l,styles:u,className:d,unstyled:f,__staticSelector:p,__stylesApiProps:m,errorProps:h,successProps:g,labelProps:_,descriptionProps:v,wrapperProps:y,id:b,size:x,style:S,inputContainer:C,inputWrapperOrder:w,withAsterisk:T,variant:E,vars:D,mod:O,attributes:k,...A}=r,{styleProps:j,rest:M}=tr(A),N={label:i,description:a,error:o,success:s,required:c,classNames:l,className:d,__staticSelector:p,__stylesApiProps:m||r,errorProps:h,successProps:g,labelProps:_,descriptionProps:v,unstyled:f,styles:u,size:x,style:S,inputContainer:C,inputWrapperOrder:w,withAsterisk:T,variant:E,id:b,mod:O,attributes:k,...y};return{...M,classNames:l,styles:u,unstyled:f,wrapperProps:{...N,...j},inputProps:{required:c,classNames:l,styles:u,unstyled:f,size:x,__staticSelector:p,__stylesApiProps:m||r,error:o,success:s,variant:E,id:b,attributes:k}}}var Cd={__staticSelector:`InputBase`,withAria:!0,size:`sm`},wd=Ar(e=>{let{inputProps:t,wrapperProps:n,...r}=Sd(`InputBase`,Cd,e);return(0,G.jsx)(xd.Wrapper,{...n,children:(0,G.jsx)(xd,{...t,...r})})});wd.classes={...xd.classes,...xd.Wrapper.classes},wd.displayName=`@mantine/core/InputBase`;function Td(e,t){if(!t||!e)return!1;let n=t.parentNode;for(;n!=null;){if(n===e)return!0;n=n.parentNode}return!1}function Ed({target:e,parent:t,ref:n,displayAfterTransitionEnd:r,onTransitionStart:i,onTransitionEnd:a}){let o=(0,w.useRef)(-1),s=(0,w.useRef)(e),[c,l]=(0,w.useState)(!1),[u,d]=(0,w.useState)(typeof r==`boolean`&&r),f=()=>{if(!e||!t||!n.current)return;let r=e.getBoundingClientRect(),i=t.getBoundingClientRect(),a=t.offsetWidth===0?1:i.width/t.offsetWidth,o=t.offsetHeight===0?1:i.height/t.offsetHeight,s=window.getComputedStyle(e),c=window.getComputedStyle(t),l=ti(s.borderTopWidth)+ti(c.borderTopWidth),u=ti(s.borderLeftWidth)+ti(c.borderLeftWidth),d={top:(r.top-i.top)/o-l,left:(r.left-i.left)/a-u,width:r.width/a,height:r.height/o};n.current.style.transform=`translateY(${d.top}px) translateX(${d.left}px)`,n.current.style.width=`${d.width}px`,n.current.style.height=`${d.height}px`},p=()=>{window.clearTimeout(o.current),n.current&&(n.current.style.transitionDuration=`0ms`),f(),o.current=window.setTimeout(()=>{n.current&&(n.current.style.transitionDuration=``)},30)},m=(0,w.useRef)(null),h=(0,w.useRef)(null);return(0,w.useEffect)(()=>{if(c&&s.current!==e&&i&&i(),s.current=e,f(),e)return m.current=new ResizeObserver(p),m.current.observe(e),t&&(h.current=new ResizeObserver(p),h.current.observe(t)),()=>{m.current?.disconnect(),h.current?.disconnect()}},[t,e]),(0,w.useEffect)(()=>{if(t){let e=e=>{Td(e.target,t)&&(p(),d(!1))};return t.addEventListener(`transitionend`,e),()=>{t.removeEventListener(`transitionend`,e)}}},[t]),(0,w.useEffect)(()=>{if(n.current&&a){let e=e=>{e.propertyName===`transform`&&a()};return n.current.addEventListener(`transitionend`,e),()=>{n.current?.removeEventListener(`transitionend`,e)}}},[a]),Le(()=>{st()!==`test`&&l(!0)},20,{autoInvoke:!0}),ze(e=>{e.forEach(e=>{e.type===`attributes`&&e.attributeName===`dir`&&p()})},{attributes:!0,attributeFilter:[`dir`]},()=>document.documentElement),{initialized:c,hidden:u}}var Dd={root:`m_96b553a6`},Od=mt((e,{transitionDuration:t},{shouldReduceMotion:n})=>({root:{"--transition-duration":e.respectReducedMotion&&n?`0ms`:typeof t==`number`?`${t}ms`:t||`150ms`}})),kd=q(e=>{let t=K(`FloatingIndicator`,null,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,target:c,parent:l,transitionDuration:u,mod:d,displayAfterTransitionEnd:f,onTransitionStart:p,onTransitionEnd:m,attributes:h,ref:g,..._}=t,v=Jn({name:`FloatingIndicator`,classes:Dd,props:t,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:h,vars:s,varsResolver:Od,stylesCtx:{shouldReduceMotion:Ne()}}),y=(0,w.useRef)(null),{initialized:b,hidden:x}=Ed({target:c,parent:l,ref:y,displayAfterTransitionEnd:f,onTransitionStart:p,onTransitionEnd:m}),S=je(g,y);return!c||!l?null:(0,G.jsx)(J,{ref:S,mod:[{initialized:b,hidden:x},d],...v(`root`),..._})});kd.displayName=`@mantine/core/FloatingIndicator`,kd.classes=Dd,kd.varsResolver=Od;function Ad({style:e,size:t=16,...n}){return(0,G.jsx)(`svg`,{viewBox:`0 0 15 15`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,style:{...e,width:v(t),height:v(t),display:`block`},...n,children:(0,G.jsx)(`path`,{d:`M3.13523 6.15803C3.3241 5.95657 3.64052 5.94637 3.84197 6.13523L7.5 9.56464L11.158 6.13523C11.3595 5.94637 11.6759 5.95657 11.8648 6.15803C12.0536 6.35949 12.0434 6.67591 11.842 6.86477L7.84197 10.6148C7.64964 10.7951 7.35036 10.7951 7.15803 10.6148L3.15803 6.86477C2.95657 6.67591 2.94637 6.35949 3.13523 6.15803Z`,fill:`currentColor`,fillRule:`evenodd`,clipRule:`evenodd`})})}Ad.displayName=`@mantine/core/AccordionChevron`;var jd={root:`m_66836ed3`,wrapper:`m_a5d60502`,body:`m_667c2793`,title:`m_6a03f287`,label:`m_698f4f23`,icon:`m_667f2a6a`,message:`m_7fa78076`,closeButton:`m_87f54839`},Md=mt((e,{radius:t,color:n,variant:r,autoContrast:i})=>{let a=e.variantColorResolver({color:n||e.primaryColor,theme:e,variant:r||`light`,autoContrast:i});return{root:{"--alert-radius":t===void 0?void 0:R(t),"--alert-bg":n||r?a.background:void 0,"--alert-color":a.color,"--alert-bd":n||r?a.border:void 0}}}),Nd=q(e=>{let t=K(`Alert`,null,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,radius:c,color:l,title:u,children:d,id:f,icon:p,withCloseButton:m,onClose:h,closeButtonLabel:g,variant:_,autoContrast:v,role:y,attributes:b,...x}=t,S=Jn({name:`Alert`,classes:jd,props:t,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:b,vars:s,varsResolver:Md}),C=De(f),w=u&&`${C}-title`||void 0,T=`${C}-body`;return(0,G.jsx)(J,{id:C,...S(`root`,{variant:_}),variant:_,...x,role:y||`alert`,"aria-describedby":d?T:void 0,"aria-labelledby":u?w:void 0,children:(0,G.jsxs)(`div`,{...S(`wrapper`),children:[p&&(0,G.jsx)(`div`,{...S(`icon`),children:p}),(0,G.jsxs)(`div`,{...S(`body`),children:[u&&(0,G.jsx)(`div`,{...S(`title`),"data-with-close-button":m||void 0,children:(0,G.jsx)(`span`,{id:w,...S(`label`),children:u})}),d&&(0,G.jsx)(`div`,{id:T,...S(`message`),"data-variant":_,children:d})]}),m&&(0,G.jsx)(xl,{...S(`closeButton`),onClick:h,variant:`transparent`,size:16,iconSize:16,"aria-label":g,unstyled:o})]})})});Nd.classes=jd,Nd.varsResolver=Md,Nd.displayName=`@mantine/core/Alert`;var Pd={root:`m_b6d8b162`};function Fd(e){if(e===`start`)return`start`;if(e===`end`||e)return`end`}var Id={inherit:!1},Ld=mt((e,{variant:t,lineClamp:n,gradient:r,size:i,textWrap:a})=>({root:{"--text-fz":z(i),"--text-lh":B(i),"--text-gradient":t===`gradient`?Lt(r,e):void 0,"--text-line-clamp":typeof n==`number`?n.toString():void 0,"--text-text-wrap":a}})),Y=Ar(e=>{let t=K(`Text`,Id,e),{lineClamp:n,truncate:r,inline:i,inherit:a,gradient:o,span:s,textWrap:c,__staticSelector:l,vars:u,className:d,style:f,classNames:p,styles:m,unstyled:h,variant:g,mod:_,size:v,attributes:y,...b}=t;return(0,G.jsx)(J,{...Jn({name:[`Text`,l],props:t,classes:Pd,className:d,style:f,classNames:p,styles:m,unstyled:h,attributes:y,vars:u,varsResolver:Ld})(`root`,{focusable:!0}),component:s?`span`:`p`,variant:g,mod:[{"data-truncate":Fd(r),"data-line-clamp":typeof n==`number`,"data-inline":i,"data-inherit":a},_],size:v,...b})});Y.classes=Pd,Y.varsResolver=Ld,Y.displayName=`@mantine/core/Text`;var Rd={root:`m_849cf0da`},zd={underline:`hover`},Bd=Ar(e=>{let{underline:t,className:n,unstyled:r,mod:i,...a}=K(`Anchor`,zd,e);return(0,G.jsx)(Y,{component:`a`,className:gt({[Rd.root]:!r},n),...a,mod:[{underline:t},i],__staticSelector:`Anchor`,unstyled:r})});Bd.classes=Rd,Bd.displayName=`@mantine/core/Anchor`;var[Vd,Hd]=E(`AppShell was not found in tree`),Ud={root:`m_89ab340`,navbar:`m_45252eee`,aside:`m_9cdde9a`,header:`m_3b16f56b`,main:`m_8983817`,footer:`m_3840c879`,section:`m_6dcfc7c7`},Wd=q(e=>{let{classNames:t,className:n,style:r,styles:i,unstyled:a,vars:o,withBorder:s,zIndex:c,mod:l,...u}=K(`AppShellAside`,null,e),d=Hd();return d.disabled?null:(0,G.jsx)(J,{component:`aside`,mod:[{"with-border":s??d.withBorder},l],...d.getStyles(`aside`,{className:gt({[zu.classNames.zeroRight]:d.offsetScrollbars},n),classNames:t,styles:i,style:r}),...u,__vars:{"--app-shell-aside-z-index":`calc(${c??d.zIndex} + 1)`}})});Wd.classes=Ud,Wd.displayName=`@mantine/core/AppShellAside`;var Gd=q(e=>{let{classNames:t,className:n,style:r,styles:i,unstyled:a,vars:o,withBorder:s,zIndex:c,mod:l,...u}=K(`AppShellFooter`,null,e),d=Hd();return d.disabled?null:(0,G.jsx)(J,{component:`footer`,mod:[{"with-border":s??d.withBorder},l],...d.getStyles(`footer`,{className:gt({[zu.classNames.zeroRight]:d.offsetScrollbars},n),classNames:t,styles:i,style:r}),...u,__vars:{"--app-shell-footer-z-index":(c??d.zIndex)?.toString()}})});Gd.classes=Ud,Gd.displayName=`@mantine/core/AppShellFooter`;var Kd=q(e=>{let{classNames:t,className:n,style:r,styles:i,unstyled:a,vars:o,withBorder:s,zIndex:c,mod:l,...u}=K(`AppShellHeader`,null,e),d=Hd();return d.disabled?null:(0,G.jsx)(J,{component:`header`,mod:[{"with-border":s??d.withBorder},l],...d.getStyles(`header`,{className:gt({[zu.classNames.zeroRight]:d.offsetScrollbars},n),classNames:t,styles:i,style:r}),...u,__vars:{"--app-shell-header-z-index":(c??d.zIndex)?.toString()}})});Kd.classes=Ud,Kd.displayName=`@mantine/core/AppShellHeader`;var qd=q(e=>{let{classNames:t,className:n,style:r,styles:i,vars:a,...o}=K(`AppShellMain`,null,e);return(0,G.jsx)(J,{component:`main`,...Hd().getStyles(`main`,{className:n,style:r,classNames:t,styles:i}),...o})});qd.classes=Ud,qd.displayName=`@mantine/core/AppShellMain`;var Jd=q(e=>{let{classNames:t,className:n,style:r,styles:i,unstyled:a,vars:o,withBorder:s,zIndex:c,mod:l,...u}=K(`AppShellNavbar`,null,e),d=Hd();return d.disabled?null:(0,G.jsx)(J,{component:`nav`,mod:[{"with-border":s??d.withBorder},l],...d.getStyles(`navbar`,{className:n,classNames:t,styles:i,style:r}),...u,__vars:{"--app-shell-navbar-z-index":`calc(${c??d.zIndex} + 1)`}})});Jd.classes=Ud,Jd.displayName=`@mantine/core/AppShellNavbar`;var Yd=Ar(e=>{let{classNames:t,className:n,style:r,styles:i,vars:a,grow:o,mod:s,...c}=K(`AppShellSection`,null,e),l=Hd();return(0,G.jsx)(J,{mod:[{grow:o},s],...l.getStyles(`section`,{className:n,style:r,classNames:t,styles:i}),...c})});Yd.classes=Ud,Yd.displayName=`@mantine/core/AppShellSection`;function Xd(e){return typeof e==`object`?e.base:e}function Zd(e){let t=typeof e==`object`&&!!e&&e.base!==void 0&&Object.keys(e).length===1;return typeof e==`number`||typeof e==`string`||t}function Qd(e){return!(typeof e!=`object`||!e||Object.keys(e).length===1&&`base`in e)}function $d({baseStyles:e,minMediaStyles:t,maxMediaStyles:n,aside:r,theme:i,mode:a}){let o=r?.width,s=`translateX(var(--app-shell-aside-width))`,c=`translateX(calc(var(--app-shell-aside-width) * -1))`;if(r?.breakpoint!==void 0&&!r?.collapsed?.mobile&&(n[r?.breakpoint]=n[r?.breakpoint]||{},a===`fixed`?(n[r?.breakpoint][`--app-shell-aside-width`]=`100%`,n[r?.breakpoint][`--app-shell-aside-offset`]=`0px`):(n[r?.breakpoint][`--app-shell-aside-width`]=`0px`,n[r?.breakpoint][`--app-shell-aside-offset`]=`0px`)),Zd(o)){let t=v(Xd(o));e[`--app-shell-aside-width`]=t,e[`--app-shell-aside-offset`]=t}if(Qd(o)&&(o.base!==void 0&&(e[`--app-shell-aside-width`]=v(o.base),e[`--app-shell-aside-offset`]=v(o.base)),u(o).forEach(e=>{e!==`base`&&(t[e]=t[e]||{},t[e][`--app-shell-aside-width`]=v(o[e]),t[e][`--app-shell-aside-offset`]=v(o[e]))})),r?.breakpoint!==void 0&&a===`static`&&(t[r.breakpoint]=t[r.breakpoint]||{},t[r.breakpoint][`--app-shell-aside-position`]=`sticky`,t[r.breakpoint][`--app-shell-aside-grid-row`]=`2`,t[r.breakpoint][`--app-shell-aside-grid-column`]=`3`,t[r.breakpoint][`--app-shell-main-column-end`]=`3`),r?.collapsed?.desktop){let e=r.breakpoint;t[e]=t[e]||{},t[e][`--app-shell-aside-transform`]=s,t[e][`--app-shell-aside-transform-rtl`]=c,a===`fixed`?t[e][`--app-shell-aside-offset`]=`0px !important`:(t[e][`--app-shell-aside-width`]=`0px`,t[e][`--app-shell-aside-display`]=`none`,t[e][`--app-shell-main-column-end`]=`-1`),t[e][`--app-shell-aside-scroll-locked-visibility`]=`hidden`}if(r?.collapsed?.mobile){let e=ee(r.breakpoint,i.breakpoints)-.1;n[e]=n[e]||{},a===`fixed`?(n[e][`--app-shell-aside-width`]=`100%`,n[e][`--app-shell-aside-offset`]=`0px`):n[e][`--app-shell-aside-width`]=`0px`,n[e][`--app-shell-aside-transform`]=s,n[e][`--app-shell-aside-transform-rtl`]=c,n[e][`--app-shell-aside-scroll-locked-visibility`]=`hidden`}}function ef({baseStyles:e,minMediaStyles:t,footer:n,mode:r}){let i=n?.height,a=r===`static`?!0:n?.offset??!0;if(r===`static`&&n&&(e[`--app-shell-footer-position`]=`sticky`,e[`--app-shell-footer-grid-column`]=`1 / -1`,e[`--app-shell-footer-grid-row`]=`3`),Zd(i)){let t=v(Xd(i));e[`--app-shell-footer-height`]=t,a&&(e[`--app-shell-footer-offset`]=t)}Qd(i)&&(i.base!==void 0&&(e[`--app-shell-footer-height`]=v(i.base),a&&(e[`--app-shell-footer-offset`]=v(i.base))),u(i).forEach(e=>{e!==`base`&&(t[e]=t[e]||{},t[e][`--app-shell-footer-height`]=v(i[e]),a&&(t[e][`--app-shell-footer-offset`]=v(i[e])))})),n?.collapsed&&(e[`--app-shell-footer-transform`]=`translateY(var(--app-shell-footer-height))`,r===`fixed`&&(e[`--app-shell-footer-offset`]=`0px !important`))}function tf({baseStyles:e,minMediaStyles:t,header:n,mode:r}){let i=n?.height,a=r===`static`?!0:n?.offset??!0;if(r===`static`&&n&&(e[`--app-shell-header-position`]=`sticky`,e[`--app-shell-header-grid-column`]=`1 / -1`,e[`--app-shell-header-grid-row`]=`1`),Zd(i)){let t=v(Xd(i));e[`--app-shell-header-height`]=t,a&&(e[`--app-shell-header-offset`]=t)}Qd(i)&&(i.base!==void 0&&(e[`--app-shell-header-height`]=v(i.base),a&&(e[`--app-shell-header-offset`]=v(i.base))),u(i).forEach(e=>{e!==`base`&&(t[e]=t[e]||{},t[e][`--app-shell-header-height`]=v(i[e]),a&&(t[e][`--app-shell-header-offset`]=v(i[e])))})),n?.collapsed&&(e[`--app-shell-header-transform`]=`translateY(calc(var(--app-shell-header-height) * -1))`,r===`fixed`&&(e[`--app-shell-header-offset`]=`0px !important`))}function nf({baseStyles:e,minMediaStyles:t,maxMediaStyles:n,navbar:r,theme:i,mode:a}){let o=r?.width,s=`translateX(calc(var(--app-shell-navbar-width) * -1))`,c=`translateX(var(--app-shell-navbar-width))`;if(r?.breakpoint!==void 0&&!r?.collapsed?.mobile&&(n[r?.breakpoint]=n[r?.breakpoint]||{},n[r?.breakpoint][`--app-shell-navbar-offset`]=`0px`,n[r?.breakpoint][`--app-shell-navbar-width`]=`100%`,a===`static`&&(n[r?.breakpoint][`--app-shell-navbar-grid-width`]=`0px`)),Zd(o)){let t=v(Xd(o));e[`--app-shell-navbar-width`]=t,e[`--app-shell-navbar-offset`]=t,a===`static`&&(e[`--app-shell-navbar-grid-width`]=t)}if(Qd(o)&&(o.base!==void 0&&(e[`--app-shell-navbar-width`]=v(o.base),e[`--app-shell-navbar-offset`]=v(o.base),a===`static`&&(e[`--app-shell-navbar-grid-width`]=v(o.base))),u(o).forEach(e=>{e!==`base`&&(t[e]=t[e]||{},t[e][`--app-shell-navbar-width`]=v(o[e]),t[e][`--app-shell-navbar-offset`]=v(o[e]),a===`static`&&(t[e][`--app-shell-navbar-grid-width`]=v(o[e])))})),r?.breakpoint!==void 0&&a===`static`&&(t[r.breakpoint]=t[r.breakpoint]||{},t[r.breakpoint][`--app-shell-navbar-position`]=`sticky`,t[r.breakpoint][`--app-shell-navbar-grid-row`]=`2`,t[r.breakpoint][`--app-shell-navbar-grid-column`]=`1`,t[r.breakpoint][`--app-shell-main-column-start`]=`2`),r?.collapsed?.desktop){let e=r.breakpoint;t[e]=t[e]||{},t[e][`--app-shell-navbar-transform`]=s,t[e][`--app-shell-navbar-transform-rtl`]=c,a===`fixed`?t[e][`--app-shell-navbar-offset`]=`0px !important`:(t[e][`--app-shell-navbar-width`]=`0px`,t[e][`--app-shell-navbar-display`]=`none`,t[e][`--app-shell-main-column-start`]=`1`)}if(r?.collapsed?.mobile){let e=ee(r.breakpoint,i.breakpoints)-.1;n[e]=n[e]||{},n[e][`--app-shell-navbar-width`]=`100%`,n[e][`--app-shell-navbar-offset`]=`0px`,a===`static`&&(n[e][`--app-shell-navbar-grid-width`]=`0px`),n[e][`--app-shell-navbar-transform`]=s,n[e][`--app-shell-navbar-transform-rtl`]=c}}function rf(e){return Number(e)===0?`0px`:L(e)}function af({padding:e,baseStyles:t,minMediaStyles:n}){Zd(e)&&(t[`--app-shell-padding`]=rf(Xd(e))),Qd(e)&&(e.base&&(t[`--app-shell-padding`]=rf(e.base)),u(e).forEach(t=>{t!==`base`&&(n[t]=n[t]||{},n[t][`--app-shell-padding`]=rf(e[t]))}))}function of({navbar:e,header:t,footer:n,aside:r,padding:i,theme:a,mode:o}){let s={},c={},l={};o===`static`&&(l[`--app-shell-main-grid-column`]=`1 / -1`,l[`--app-shell-main-grid-row`]=`2`),nf({baseStyles:l,minMediaStyles:s,maxMediaStyles:c,navbar:e,theme:a,mode:o}),$d({baseStyles:l,minMediaStyles:s,maxMediaStyles:c,aside:r,theme:a,mode:o}),tf({baseStyles:l,minMediaStyles:s,header:t,mode:o}),ef({baseStyles:l,minMediaStyles:s,footer:n,mode:o}),af({baseStyles:l,minMediaStyles:s,padding:i});let d=te(u(s),a.breakpoints).map(e=>({query:`(min-width: ${y(e.px)})`,styles:s[e.value]})),f=te(u(c),a.breakpoints).map(e=>({query:`(max-width: ${y(e.px)})`,styles:c[e.value]}));return{baseStyles:l,media:[...d,...f]}}function sf({navbar:e,header:t,aside:n,footer:r,padding:i,mode:a,selector:o}){let s=vn(),c=Gt(),{media:l,baseStyles:u}=of({navbar:e,header:t,footer:r,aside:n,padding:i,theme:s,mode:a});return(0,G.jsx)(Qn,{media:l,styles:u,selector:o||c.cssVariablesSelector})}function cf({transitionDuration:e,disabled:t}){let[n,r]=(0,w.useState)(!0),i=(0,w.useRef)(-1),a=(0,w.useRef)(-1);return Oe(`resize`,()=>{r(!0),clearTimeout(i.current),i.current=window.setTimeout(()=>(0,w.startTransition)(()=>{r(!1)}),200)}),fe(()=>{r(!0),clearTimeout(a.current),a.current=window.setTimeout(()=>(0,w.startTransition)(()=>{r(!1)}),e||0)},[t,e]),n}var lf={withBorder:!0,padding:0,transitionDuration:200,transitionTimingFunction:`ease`,zIndex:N(`app`),mode:`fixed`},uf=mt((e,{transitionDuration:t,transitionTimingFunction:n})=>({root:{"--app-shell-transition-duration":`${t}ms`,"--app-shell-transition-timing-function":n}})),df=q(e=>{let t=K(`AppShell`,lf,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,navbar:c,withBorder:l,padding:u,transitionDuration:d,transitionTimingFunction:f,header:p,zIndex:m,layout:h,disabled:g,aside:_,footer:v,offsetScrollbars:y=!0,mode:b,mod:x,attributes:S,id:C,...w}=t,T=Jn({name:`AppShell`,classes:Ud,props:t,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:S,vars:s,varsResolver:uf}),E=cf({disabled:g,transitionDuration:d}),D=De(C);return(0,G.jsxs)(Vd,{value:{getStyles:T,withBorder:l,zIndex:m,disabled:g,offsetScrollbars:y,mode:b},children:[(0,G.jsx)(sf,{navbar:c,header:p,aside:_,footer:v,padding:u,mode:b,selector:b===`static`?`#${D}`:void 0}),(0,G.jsx)(J,{...T(`root`),id:D,mod:[{resizing:E,layout:h,disabled:g,mode:b},x],...w})]})});df.classes=Ud,df.varsResolver=uf,df.displayName=`@mantine/core/AppShell`,df.Navbar=Jd,df.Header=Kd,df.Main=qd,df.Aside=Wd,df.Footer=Gd,df.Section=Yd;function ff(e){return typeof e==`string`?{value:e,label:e}:typeof e==`object`&&`value`in e&&!(`label`in e)?{value:e.value,label:`${e.value}`,disabled:e.disabled}:typeof e==`object`&&`group`in e?{group:e.group,items:e.items.map(e=>ff(e))}:typeof e==`number`||typeof e==`bigint`||typeof e==`boolean`?{value:e,label:`${e}`}:e}function pf(e){return e?e.map(e=>ff(e)):[]}function mf(e){return e.reduce((e,t)=>`group`in t?{...e,...mf(t.items)}:(e[`${t.value}`]=t,e),{})}var hf={dropdown:`m_88b62a41`,search:`m_985517d8`,options:`m_b2821a6e`,option:`m_92253aa5`,empty:`m_2530cd1d`,header:`m_858f94bd`,footer:`m_82b967cb`,group:`m_254f3e4f`,groupLabel:`m_2bb2e9e5`,chevron:`m_2943220b`,optionsDropdownOption:`m_390b5f4`,optionsDropdownCheckIcon:`m_8ee53fc2`,optionsDropdownCheckPlaceholder:`m_a530ee0a`},gf={error:null},_f=mt((e,{size:t,color:n})=>({chevron:{"--combobox-chevron-size":I(t,`combobox-chevron-size`),"--combobox-chevron-color":n?Pt(n,e):void 0}})),vf=q(e=>{let t=K(`ComboboxChevron`,gf,e),{size:n,error:r,style:i,className:a,classNames:o,styles:s,unstyled:c,vars:l,attributes:u,mod:d,...f}=t,p=Jn({name:`ComboboxChevron`,classes:hf,props:t,style:i,className:a,classNames:o,styles:s,unstyled:c,vars:l,varsResolver:_f,attributes:u,rootSelector:`chevron`});return(0,G.jsx)(J,{component:`svg`,...f,...p(`chevron`),size:n,viewBox:`0 0 15 15`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,mod:[`combobox-chevron`,{error:r},d],children:(0,G.jsx)(`path`,{d:`M4.93179 5.43179C4.75605 5.60753 4.75605 5.89245 4.93179 6.06819C5.10753 6.24392 5.39245 6.24392 5.56819 6.06819L7.49999 4.13638L9.43179 6.06819C9.60753 6.24392 9.89245 6.24392 10.0682 6.06819C10.2439 5.89245 10.2439 5.60753 10.0682 5.43179L7.81819 3.18179C7.73379 3.0974 7.61933 3.04999 7.49999 3.04999C7.38064 3.04999 7.26618 3.0974 7.18179 3.18179L4.93179 5.43179ZM10.0682 9.56819C10.2439 9.39245 10.2439 9.10753 10.0682 8.93179C9.89245 8.75606 9.60753 8.75606 9.43179 8.93179L7.49999 10.8636L5.56819 8.93179C5.39245 8.75606 5.10753 8.75606 4.93179 8.93179C4.75605 9.10753 4.75605 9.39245 4.93179 9.56819L7.18179 11.8182C7.35753 11.9939 7.64245 11.9939 7.81819 11.8182L10.0682 9.56819Z`,fill:`currentColor`,fillRule:`evenodd`,clipRule:`evenodd`})})});vf.classes=hf,vf.varsResolver=_f,vf.displayName=`@mantine/core/ComboboxChevron`;var[yf,bf]=E(`Combobox component was not found in tree`);function xf({onMouseDown:e,onClick:t,onClear:n,...r}){return(0,G.jsx)(xd.ClearButton,{tabIndex:-1,"aria-hidden":!0,...r,onMouseDown:t=>{t.preventDefault(),e?.(t)},onClick:e=>{n(),t?.(e)}})}xf.displayName=`@mantine/core/ComboboxClearButton`;var Sf=q(e=>{let{classNames:t,styles:n,className:r,style:i,hidden:a,...o}=K(`ComboboxDropdown`,null,e),s=bf();return(0,G.jsx)(el.Dropdown,{...o,role:`presentation`,"data-hidden":a||void 0,"data-floating-height":s.floatingHeight||void 0,...s.getStyles(`dropdown`,{className:r,style:i,classNames:t,styles:n})})});Sf.classes=hf,Sf.displayName=`@mantine/core/ComboboxDropdown`;var Cf={refProp:`ref`},wf=q(e=>{let{children:t,refProp:n,ref:r}=K(`ComboboxDropdownTarget`,Cf,e);if(bf(),!T(t))throw Error(`Combobox.DropdownTarget component children should be an element or a component that accepts ref. Fragments, strings, numbers and other primitive values are not supported`);return(0,G.jsx)(el.Target,{ref:r,refProp:n,children:t})});wf.displayName=`@mantine/core/ComboboxDropdownTarget`;var Tf=q(e=>{let{classNames:t,className:n,style:r,styles:i,vars:a,...o}=K(`ComboboxEmpty`,null,e);return(0,G.jsx)(J,{...bf().getStyles(`empty`,{className:n,classNames:t,styles:i,style:r}),...o})});Tf.classes=hf,Tf.displayName=`@mantine/core/ComboboxEmpty`;function Ef({onKeyDown:e,onClick:t,withKeyboardNavigation:n,withAriaAttributes:r,withExpandedAttribute:i,targetType:a,autoComplete:o}){let s=bf(),[c,l]=(0,w.useState)(null),u=t=>{if(e?.(t),!s.readOnly&&n){if(t.nativeEvent.isComposing)return;if(t.nativeEvent.code===`ArrowDown`&&(t.preventDefault(),s.store.dropdownOpened?l(s.store.selectNextOption()):(s.store.openDropdown(`keyboard`),l(s.store.selectActiveOption()),s.store.updateSelectedOptionIndex(`selected`,{scrollIntoView:!0}))),t.nativeEvent.code===`ArrowUp`&&(t.preventDefault(),s.store.dropdownOpened?l(s.store.selectPreviousOption()):(s.store.openDropdown(`keyboard`),l(s.store.selectActiveOption()),s.store.updateSelectedOptionIndex(`selected`,{scrollIntoView:!0}))),t.nativeEvent.code===`Enter`||t.nativeEvent.code===`NumpadEnter`){if(t.nativeEvent.keyCode===229)return;let e=s.store.getSelectedOptionIndex();s.store.dropdownOpened&&e!==-1?(t.preventDefault(),s.store.clickSelectedOption()):a===`button`&&(t.preventDefault(),s.store.openDropdown(`keyboard`))}t.key===`Escape`&&s.store.closeDropdown(`keyboard`),t.nativeEvent.code===`Space`&&a===`button`&&(t.preventDefault(),s.store.toggleDropdown(`keyboard`))}},d=r?{...i?{role:`combobox`}:{},"aria-haspopup":`listbox`,"aria-expanded":i?!!(s.store.listId&&s.store.dropdownOpened):void 0,"aria-controls":s.store.dropdownOpened&&s.store.listId?s.store.listId:void 0,"aria-activedescendant":s.store.dropdownOpened&&c||void 0,autoComplete:o,"data-expanded":s.store.dropdownOpened||void 0,"data-mantine-stop-propagation":s.store.dropdownOpened||void 0}:{},f=e=>{a===`button`&&e.currentTarget.focus(),t?.(e)};return{...d,onKeyDown:u,onClick:f}}var Df={refProp:`ref`,targetType:`input`,withKeyboardNavigation:!0,withAriaAttributes:!0,withExpandedAttribute:!1,autoComplete:`off`},Of=q(e=>{let{children:t,refProp:n,withKeyboardNavigation:r,withAriaAttributes:i,withExpandedAttribute:a,targetType:o,autoComplete:s,ref:c,...l}=K(`ComboboxEventsTarget`,Df,e),u=pt(t);if(!u)throw Error(`Combobox.EventsTarget component children should be an element or a component that accepts ref. Fragments, strings, numbers and other primitive values are not supported`);let d=bf();return(0,w.cloneElement)(u,{...Ef({targetType:o,withAriaAttributes:i,withKeyboardNavigation:r,withExpandedAttribute:a,onKeyDown:u.props.onKeyDown,onClick:u.props.onClick,autoComplete:s}),...l,[n]:je(c,d.store.targetRef,ct(u))})});Of.displayName=`@mantine/core/ComboboxEventsTarget`;var kf=q(e=>{let{classNames:t,className:n,style:r,styles:i,vars:a,...o}=K(`ComboboxFooter`,null,e);return(0,G.jsx)(J,{...bf().getStyles(`footer`,{className:n,classNames:t,style:r,styles:i}),...o,onMouseDown:e=>{e.preventDefault()}})});kf.classes=hf,kf.displayName=`@mantine/core/ComboboxFooter`;var Af=q(e=>{let{classNames:t,className:n,style:r,styles:i,vars:a,children:o,label:s,id:c,...l}=K(`ComboboxGroup`,null,e),u=bf(),d=De(c),f=s!=null&&s!==!1&&s!==``;return(0,G.jsxs)(J,{role:`group`,"aria-labelledby":f?d:void 0,...u.getStyles(`group`,{className:n,classNames:t,style:r,styles:i}),...l,children:[f&&(0,G.jsx)(`div`,{id:d,...u.getStyles(`groupLabel`,{classNames:t,styles:i}),children:s}),o]})});Af.classes=hf,Af.displayName=`@mantine/core/ComboboxGroup`;var jf=q(e=>{let{classNames:t,className:n,style:r,styles:i,vars:a,...o}=K(`ComboboxHeader`,null,e);return(0,G.jsx)(J,{...bf().getStyles(`header`,{className:n,classNames:t,style:r,styles:i}),...o,onMouseDown:e=>{e.preventDefault()}})});jf.classes=hf,jf.displayName=`@mantine/core/ComboboxHeader`;function Mf({value:e,valuesDivider:t=`,`,...n}){return(0,G.jsx)(`input`,{type:`hidden`,value:Array.isArray(e)?e.join(t):e?`${e}`:``,...n})}Mf.displayName=`@mantine/core/ComboboxHiddenInput`;var Nf=q(e=>{let t=K(`ComboboxOption`,null,e),{classNames:n,className:r,style:i,styles:a,vars:o,onClick:s,id:c,active:l,onMouseDown:u,onMouseOver:d,disabled:f,selected:p,mod:m,...h}=t,g=bf(),_=(0,w.useId)(),v=c||_;return(0,G.jsx)(J,{...g.getStyles(`option`,{className:r,classNames:n,styles:a,style:i}),...h,id:v,mod:[`combobox-option`,{"combobox-active":l,"combobox-disabled":f,"combobox-selected":p},m],role:`option`,onClick:e=>{f?e.preventDefault():(g.onOptionSubmit?.(t.value,t),s?.(e))},onMouseDown:e=>{e.preventDefault(),u?.(e)},onMouseOver:e=>{g.resetSelectionOnOptionHover&&g.store.resetSelectedOption(),d?.(e)}})});Nf.classes=hf,Nf.displayName=`@mantine/core/ComboboxOption`;var Pf=q(e=>{let{classNames:t,className:n,style:r,styles:i,id:a,onMouseDown:o,labelledBy:s,...c}=K(`ComboboxOptions`,null,e),l=bf(),u=De(a);return(0,w.useEffect)(()=>{l.store.setListId(u)},[u]),(0,G.jsx)(J,{...l.getStyles(`options`,{className:n,style:r,classNames:t,styles:i}),...c,id:u,role:`listbox`,"aria-labelledby":s,onMouseDown:e=>{e.preventDefault(),o?.(e)}})});Pf.classes=hf,Pf.displayName=`@mantine/core/ComboboxOptions`;var Ff={withAriaAttributes:!0,withKeyboardNavigation:!0},If=q(e=>{let{classNames:t,styles:n,unstyled:r,vars:i,withAriaAttributes:a,onKeyDown:o,onClick:s,withKeyboardNavigation:c,size:l,ref:u,...d}=K(`ComboboxSearch`,Ff,e),f=bf(),p=f.getStyles(`search`),m=Ef({targetType:`input`,withAriaAttributes:a,withKeyboardNavigation:c,withExpandedAttribute:!1,onKeyDown:o,onClick:s,autoComplete:`off`});return(0,G.jsx)(xd,{ref:je(u,f.store.searchRef),classNames:[{input:p.className},t],styles:[{input:p.style},n],size:l||f.size,...m,...d,__staticSelector:`Combobox`})});If.classes=hf,If.displayName=`@mantine/core/ComboboxSearch`;var Lf={refProp:`ref`,targetType:`input`,withKeyboardNavigation:!0,withAriaAttributes:!0,withExpandedAttribute:!1,autoComplete:`off`},Rf=q(e=>{let{children:t,refProp:n,withKeyboardNavigation:r,withAriaAttributes:i,withExpandedAttribute:a,targetType:o,autoComplete:s,ref:c,...l}=K(`ComboboxTarget`,Lf,e),u=pt(t);if(!u)throw Error(`Combobox.Target component children should be an element or a component that accepts ref. Fragments, strings, numbers and other primitive values are not supported`);let d=bf(),f=(0,w.cloneElement)(u,{...Ef({targetType:o,withAriaAttributes:i,withKeyboardNavigation:r,withExpandedAttribute:a,onKeyDown:u.props.onKeyDown,onClick:u.props.onClick,autoComplete:s}),...l});return(0,G.jsx)(el.Target,{refProp:n,ref:je(c,d.store.targetRef),children:f})});Rf.displayName=`@mantine/core/ComboboxTarget`;function zf(e,t,n){for(let n=e-1;n>=0;--n)if(!t[n].hasAttribute(`data-combobox-disabled`))return n;if(n){for(let e=t.length-1;e>-1;--e)if(!t[e].hasAttribute(`data-combobox-disabled`))return e}return e}function Bf(e,t,n){for(let n=e+1;n<t.length;n+=1)if(!t[n].hasAttribute(`data-combobox-disabled`))return n;if(n){for(let e=0;e<t.length;e+=1)if(!t[e].hasAttribute(`data-combobox-disabled`))return e}return e}function Vf(e){for(let t=0;t<e.length;t+=1)if(!e[t].hasAttribute(`data-combobox-disabled`))return t;return-1}function Hf({defaultOpened:e,opened:t,onOpenedChange:n,onDropdownClose:r,onDropdownOpen:i,loop:a=!0,scrollBehavior:o=`instant`}={}){let[s,c]=Me({value:t,defaultValue:e,finalValue:!1,onChange:n}),l=(0,w.useRef)(null),u=(0,w.useRef)(-1),d=(0,w.useRef)(null),f=(0,w.useRef)(null),p=(0,w.useRef)(-1),m=(0,w.useRef)(-1),h=(0,w.useRef)(-1),g=(0,w.useCallback)((e=`unknown`)=>{s||(c(!0),i?.(e))},[c,i,s]),_=(0,w.useCallback)((e=`unknown`)=>{s&&(c(!1),r?.(e))},[c,r,s]),v=(0,w.useCallback)((e=`unknown`)=>{s?_(e):g(e)},[_,g,s]),y=(0,w.useCallback)(()=>{let e=ft(f.current),t=ut(`#${l.current} [data-combobox-selected]`,e);t?.removeAttribute(`data-combobox-selected`),t?.removeAttribute(`aria-selected`)},[]),b=(0,w.useCallback)(e=>{let t=ft(f.current),n=ut(`#${l.current}`,t),r=n?dt(`[data-combobox-option]`,n):null;if(!r)return null;let i=e>=r.length?0:e<0?r.length-1:e;return u.current=i,r?.[i]&&!r[i].hasAttribute(`data-combobox-disabled`)?(y(),r[i].setAttribute(`data-combobox-selected`,`true`),r[i].setAttribute(`aria-selected`,`true`),r[i].scrollIntoView({block:`nearest`,behavior:o}),r[i].id):null},[o,y]),x=(0,w.useCallback)(()=>{let e=ft(f.current),t=ut(`#${l.current} [data-combobox-active]`,e);if(t){let n=dt(`#${l.current} [data-combobox-option]`,e).findIndex(e=>e===t);return b(n)}return b(0)},[b]),S=(0,w.useCallback)(()=>{let e=ft(f.current),t=dt(`#${l.current} [data-combobox-option]`,e);return b(Bf(u.current,t,a))},[b,a]),C=(0,w.useCallback)(()=>{let e=ft(f.current),t=dt(`#${l.current} [data-combobox-option]`,e);return b(zf(u.current,t,a))},[b,a]),T=(0,w.useCallback)(()=>{let e=ft(f.current),t=dt(`#${l.current} [data-combobox-option]`,e);return b(Vf(t))},[b]),E=(0,w.useCallback)((e=`selected`,t)=>{if(typeof e==`number`){u.current=e;let n=ft(f.current),r=dt(`#${l.current} [data-combobox-option]`,n);t?.scrollIntoView&&r[e]?.scrollIntoView({block:`nearest`,behavior:o});return}h.current=window.setTimeout(()=>{let n=ft(f.current),r=dt(`#${l.current} [data-combobox-option]`,n),i=r.findIndex(t=>t.hasAttribute(`data-combobox-${e}`));u.current=i,t?.scrollIntoView&&r[i]?.scrollIntoView({block:`nearest`,behavior:o})},0)},[]),D=(0,w.useCallback)(()=>{u.current=-1,y()},[y]),O=(0,w.useCallback)(()=>{let e=ft(f.current);(dt(`#${l.current} [data-combobox-option]`,e)?.[u.current])?.click()},[]),k=(0,w.useCallback)(e=>{l.current=e},[]),A=(0,w.useCallback)(()=>{p.current=window.setTimeout(()=>d.current?.focus(),0)},[]),j=(0,w.useCallback)(()=>{m.current=window.setTimeout(()=>f.current?.focus(),0)},[]),M=(0,w.useCallback)(()=>u.current,[]);return(0,w.useEffect)(()=>()=>{window.clearTimeout(p.current),window.clearTimeout(m.current),window.clearTimeout(h.current)},[]),{dropdownOpened:s,openDropdown:g,closeDropdown:_,toggleDropdown:v,selectedOptionIndex:u.current,getSelectedOptionIndex:M,selectOption:b,selectFirstOption:T,selectActiveOption:x,selectNextOption:S,selectPreviousOption:C,resetSelectedOption:D,updateSelectedOptionIndex:E,listId:l.current,setListId:k,clickSelectedOption:O,searchRef:d,focusSearchInput:A,targetRef:f,focusTarget:j}}var Uf={keepMounted:!0,keepMountedMode:`display-none`,withinPortal:!0,resetSelectionOnOptionHover:!1,width:`target`,transitionProps:{transition:`fade`,duration:0},size:`sm`},Wf=mt((e,{size:t,dropdownPadding:n})=>({options:{"--combobox-option-fz":z(t),"--combobox-option-padding":I(t,`combobox-option-padding`)},dropdown:{"--combobox-padding":n===void 0?void 0:v(n),"--combobox-option-fz":z(t),"--combobox-option-padding":I(t,`combobox-option-padding`)}})),Gf=e=>{let t=K(`Combobox`,Uf,e),{classNames:n,styles:r,unstyled:i,children:a,store:o,vars:s,onOptionSubmit:c,onClose:l,size:u,dropdownPadding:d,resetSelectionOnOptionHover:f,__staticSelector:p,readOnly:m,attributes:h,floatingHeight:g,middlewares:_,...v}=t,y=g===`viewport`?{..._,flip:!1,size:{...typeof _?.size==`object`?_.size:{},padding:typeof _?.size==`object`&&_.size.padding!==void 0?_.size.padding:10,apply:({availableHeight:e,availableWidth:t,elements:n,...r})=>{n.floating.style.setProperty(`--combobox-floating-max-height`,`${e}px`);let i=_?.size;typeof i==`object`&&i.apply?i.apply({availableHeight:e,availableWidth:t,elements:n,...r}):i&&Object.assign(n.floating.style,{maxWidth:`${t}px`,maxHeight:`${e}px`})}}}:_,b=Hf(),x=o||b,S=Jn({name:p||`Combobox`,classes:hf,props:t,classNames:n,styles:r,unstyled:i,attributes:h,vars:s,varsResolver:Wf}),C=()=>{l?.(),x.closeDropdown()};return(0,G.jsx)(yf,{value:{getStyles:S,store:x,onOptionSubmit:c,size:u,resetSelectionOnOptionHover:f,readOnly:m,floatingHeight:g},children:(0,G.jsx)(el,{opened:x.dropdownOpened,...v,middlewares:y,onChange:e=>!e&&C(),withRoles:!1,unstyled:i,children:a})})};Gf.extend=e=>e,Gf.classes=hf,Gf.varsResolver=Wf,Gf.displayName=`@mantine/core/Combobox`,Gf.Target=Rf,Gf.Dropdown=Sf,Gf.Options=Pf,Gf.Option=Nf,Gf.Search=If,Gf.Empty=Tf,Gf.Chevron=vf,Gf.Footer=kf,Gf.Header=jf,Gf.EventsTarget=Of,Gf.DropdownTarget=wf,Gf.Group=Af,Gf.ClearButton=xf,Gf.HiddenInput=Mf;function Kf({children:e,role:t}){let n=(0,w.use)(rd);return n?(0,G.jsx)(`div`,{role:t,"aria-labelledby":n.labelId,"aria-describedby":n.describedBy,children:e}):(0,G.jsx)(G.Fragment,{children:e})}function qf({size:e,style:t,...n}){return(0,G.jsx)(`svg`,{viewBox:`0 0 10 7`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,style:e===void 0?t:{width:v(e),height:v(e),...t},"aria-hidden":!0,...n,children:(0,G.jsx)(`path`,{d:`M4 4.586L1.707 2.293A1 1 0 1 0 .293 3.707l3 3a.997.997 0 0 0 1.414 0l5-5A1 1 0 1 0 8.293.293L4 4.586z`,fill:`currentColor`,fillRule:`evenodd`,clipRule:`evenodd`})})}var Jf={root:`m_5f75b09e`,body:`m_5f6e695e`,labelWrapper:`m_d3ea56bb`,label:`m_8ee546b8`,description:`m_328f68c0`,error:`m_8e8a99cc`},Yf=Jf;function Xf({__staticSelector:e,__stylesApiProps:t,className:n,classNames:r,styles:i,unstyled:a,children:o,label:s,description:c,id:l,disabled:u,error:d,size:f,labelPosition:p=`left`,bodyElement:m=`div`,labelElement:h=`label`,variant:g,style:_,vars:v,mod:y,attributes:b,...x}){let S=Jn({name:e,props:t,className:n,style:_,classes:Jf,classNames:r,styles:i,unstyled:a,attributes:b}),C=c?`${l}-description`:void 0,w=d&&typeof d!=`boolean`?`${l}-error`:void 0;return(0,G.jsx)(J,{...S(`root`),__vars:{"--label-fz":z(f),"--label-lh":I(f,`label-lh`)},mod:[{"label-position":p},y],variant:g,size:f,...x,children:(0,G.jsxs)(J,{component:m,htmlFor:m===`label`?l:void 0,...S(`body`),children:[o,(0,G.jsxs)(`div`,{...S(`labelWrapper`),"data-disabled":u||void 0,children:[s&&(0,G.jsx)(J,{component:h,htmlFor:h===`label`?l:void 0,...S(`label`),"data-disabled":u||void 0,children:s}),c&&(0,G.jsx)(xd.Description,{id:C,size:f,__inheritStyles:!1,...S(`description`),children:c}),d&&typeof d!=`boolean`&&(0,G.jsx)(xd.Error,{id:w,size:f,__inheritStyles:!1,...S(`error`),children:d})]})]})})}Xf.displayName=`@mantine/core/InlineInput`;function Zf(e){return`group`in e}function Qf({options:e,search:t,limit:n}){let r=t.trim().toLowerCase(),i=[];for(let a=0;a<e.length;a+=1){let o=e[a];if(i.length===n)return i;Zf(o)&&i.push({group:o.group,items:Qf({options:o.items,search:t,limit:n-i.length})}),Zf(o)||o.label.toLowerCase().includes(r)&&i.push(o)}return i}function $f(e){if(e.length===0)return!0;for(let t of e)if(!(`group`in t)||t.items.length>0)return!1;return!0}function ep(e,t=new Set){if(Array.isArray(e))for(let n of e)if(Zf(n))ep(n.items,t);else{if(n.value===void 0)throw Error(`[@mantine/core] Each option must have value property`);if(t.has(n.value))throw Error(`[@mantine/core] Duplicate options are not supported. Option with value "${n.value}" was provided more than once`);t.add(n.value)}}function tp(e,t){return Array.isArray(e)?e.includes(t):e===t}function np({data:e,withCheckIcon:t,withAlignedLabels:n,value:r,checkIconPosition:i,unstyled:a,renderOption:o}){if(!Zf(e)){let s=tp(r,e.value),c=t&&(s?(0,G.jsx)(qf,{className:hf.optionsDropdownCheckIcon}):n?(0,G.jsx)(`div`,{className:hf.optionsDropdownCheckPlaceholder}):null),l=(0,G.jsxs)(G.Fragment,{children:[i===`left`&&c,(0,G.jsx)(`span`,{children:e.label}),i===`right`&&c]});return(0,G.jsx)(Gf.Option,{value:e.value,disabled:e.disabled,className:gt({[hf.optionsDropdownOption]:!a}),"data-reverse":i===`right`||void 0,"data-checked":s||void 0,"aria-selected":s,active:s,children:typeof o==`function`?o({option:e,checked:s}):l})}let s=e.items.map(e=>(0,G.jsx)(np,{data:e,value:r,unstyled:a,withCheckIcon:t,withAlignedLabels:n,checkIconPosition:i,renderOption:o},`${e.value}`));return(0,G.jsx)(Gf.Group,{label:e.group,children:s})}function rp({data:e,hidden:t,hiddenWhenEmpty:n,filter:r,search:i,limit:a,maxDropdownHeight:o,floatingHeight:s,withScrollArea:c=!0,filterOptions:l=!0,withCheckIcon:u=!1,withAlignedLabels:d=!1,value:f,checkIconPosition:p,nothingFoundMessage:m,unstyled:h,labelId:g,renderOption:_,scrollAreaProps:v,"aria-label":y}){let b=bf();ep(e);let x=typeof i==`string`?(r||Qf)({options:e,search:l?i:``,limit:a??1/0}):e,S=$f(x),C=x.map((e,t)=>(0,G.jsx)(np,{data:e,withCheckIcon:u,withAlignedLabels:d,value:f,checkIconPosition:p,unstyled:h,renderOption:_},Zf(e)?`group-${typeof e.group==`string`?e.group:t}`:`${e.value}`));return(0,G.jsx)(Gf.Dropdown,{hidden:t||n&&S,"data-composed":!0,children:(0,G.jsxs)(Gf.Options,{labelledBy:g,"aria-label":y,children:[c?(0,G.jsx)(rc.Autosize,{mah:(s??b.floatingHeight)===`viewport`?`var(--combobox-floating-options-max-height)`:o??220,type:`scroll`,scrollbarSize:`var(--combobox-padding)`,offsetScrollbars:`y`,...v,children:C}):C,S&&m&&(0,G.jsx)(Gf.Empty,{children:m})]})})}function ip(e,t,n,r){if(t===n||r===`before`&&n===t+1||r===`after`&&n===t-1)return e;let i=e.slice(),[a]=i.splice(t,1),o=t<n?n-1:n;return r===`after`&&(o+=1),i.splice(o,0,a),i}var ap=e=>{let t=e.lastElementChild;return t?t instanceof HTMLInputElement?t:t.querySelector(`input`):null},op=(e,t)=>{if(e===t)return!0;if(e.length!==t.length)return!1;for(let n=0;n<e.length;n+=1)if(e[n]!==t[n])return!1;return!0};function sp({value:e,onChange:t,enabled:n}){let r=(0,w.useRef)({draggedIndex:null,currentDropTarget:null}),i=(0,w.useRef)(null),a=(0,w.useRef)(null),o=(0,w.useRef)(e);o.current=e,(0,w.useEffect)(()=>{let e=i.current;e&&(i.current=null,op(o.current,e.expectedValue)&&e.container?.querySelector(`[data-mantine-pill-index="${e.index}"]`)?.focus())});let s=(0,w.useCallback)(e=>{a.current=e},[]);return{getPillProps:e=>{if(n)return{draggable:!0,tabIndex:-1,"data-mantine-pill-index":e,"aria-keyshortcuts":`Alt+ArrowLeft Alt+ArrowRight`,onMouseDown:e=>{e.button===0&&e.stopPropagation()},onDragStart:t=>{t.stopPropagation(),t.dataTransfer.effectAllowed=`move`,t.dataTransfer.setData(`text/plain`,String(e)),r.current.draggedIndex=e;let n=t.currentTarget,i=n.getBoundingClientRect(),a=n.cloneNode(!0);a.removeAttribute(`data-dragging`),a.removeAttribute(`data-drag-over`),a.style.position=`fixed`,a.style.top=`-9999px`,a.style.left=`-9999px`,a.style.width=`${i.width}px`,a.style.height=`${i.height}px`,a.style.pointerEvents=`none`,document.body.appendChild(a),t.dataTransfer.setDragImage(a,t.clientX-i.left,t.clientY-i.top),setTimeout(()=>a.parentNode?.removeChild(a),0),requestAnimationFrame(()=>{n.setAttribute(`data-dragging`,`true`)})},onDragOver:t=>{let{draggedIndex:n}=r.current;if(n===null||n===e)return;let i=t.currentTarget,a=i.getBoundingClientRect(),o=t.clientX-a.left,s=(getComputedStyle(i).direction===`rtl`?o>a.width/2:o<a.width/2)?`before`:`after`;t.preventDefault(),t.stopPropagation(),t.dataTransfer.dropEffect=`move`;let c=r.current.currentDropTarget;c&&c!==i&&c.removeAttribute(`data-drag-over`),i.setAttribute(`data-drag-over`,s),r.current.currentDropTarget=i},onDragLeave:e=>{let t=e.currentTarget,n=e.relatedTarget;n&&t.contains(n)||(t.removeAttribute(`data-drag-over`),r.current.currentDropTarget===t&&(r.current.currentDropTarget=null))},onDrop:n=>{n.preventDefault(),n.stopPropagation();let i=n.currentTarget,a=i.getAttribute(`data-drag-over`);i.removeAttribute(`data-drag-over`);let{draggedIndex:s}=r.current;if(s!==null&&a&&s!==e){let n=ip(o.current,s,e,a);n!==o.current&&t(n)}r.current.draggedIndex=null,r.current.currentDropTarget=null},onDragEnd:e=>{e.currentTarget.removeAttribute(`data-dragging`);let t=r.current.currentDropTarget;t&&t.removeAttribute(`data-drag-over`),r.current.draggedIndex=null,r.current.currentDropTarget=null},onKeyDown:n=>{if(n.key!==`ArrowLeft`&&n.key!==`ArrowRight`)return;let r=n.currentTarget,a=getComputedStyle(r).direction===`rtl`?n.key===`ArrowLeft`:n.key===`ArrowRight`,s=a?e+1:e-1;if(n.altKey){if(s<0||s>=o.current.length)return;n.preventDefault(),n.stopPropagation();let c=a?`after`:`before`,l=ip(o.current,e,s,c);if(l===o.current)return;i.current={container:r.parentElement,index:s,expectedValue:l},t(l);return}if(s<0)return;let c=r.parentElement;if(c){if(n.preventDefault(),n.stopPropagation(),s>=o.current.length){ap(c)?.focus();return}c.querySelector(`[data-mantine-pill-index="${s}"]`)?.focus()}}}},getListProps:()=>n?{ref:s}:{},handleInputKeyDown:e=>{if(!n||e.key!==`ArrowLeft`)return;let t=e.currentTarget;if(!(t.value.length===0||t.selectionStart===0&&t.selectionEnd===0))return;let r=a.current;if(!r)return;let i=r.querySelectorAll(`[data-mantine-pill-index]`);i.length!==0&&(e.preventDefault(),i[i.length-1].focus())}}}var cp=q(e=>{let t=K([`Input`,`InputWrapper`,`Autocomplete`],{size:`sm`},e),{classNames:n,styles:r,unstyled:i,vars:a,dropdownOpened:o,defaultDropdownOpened:s,onDropdownClose:c,onDropdownOpen:l,onFocus:u,onBlur:d,onClick:f,onChange:p,data:m,value:h,defaultValue:g,selectFirstOptionOnChange:_,selectFirstOptionOnDropdownOpen:v,onOptionSubmit:y,comboboxProps:b,readOnly:x,disabled:S,filter:C,limit:T,withScrollArea:E,maxDropdownHeight:D,floatingHeight:O,size:k,id:A,renderOption:j,autoComplete:M,scrollAreaProps:N,onClear:P,clearButtonProps:F,error:I,clearable:L,clearSectionMode:R,rightSection:z,autoSelectOnBlur:B,openOnFocus:V=!0,attributes:H,...ee}=t,te=De(A),U=pf(m),ne=mf(U),[re,ie]=Me({value:h,defaultValue:g,finalValue:``,onChange:p}),ae=Hf({opened:o,defaultOpened:s,onDropdownOpen:()=>{l?.(),v&&ae.selectFirstOption()},onDropdownClose:()=>{c?.(),setTimeout(ae.resetSelectedOption,0)}}),oe=e=>{ie(e),ae.resetSelectedOption()},{resolvedClassNames:se,resolvedStyles:ce}=Pn({props:t,styles:r,classNames:n});(0,w.useEffect)(()=>{_&&ae.selectFirstOption()},[_,re]);let le=(0,G.jsx)(Gf.ClearButton,{...F,onClear:()=>{oe(``),P?.()}});return(0,G.jsxs)(Gf,{store:ae,__staticSelector:`Autocomplete`,classNames:se,styles:ce,unstyled:i,readOnly:x,size:k,attributes:H,floatingHeight:O,keepMounted:B,onOptionSubmit:e=>{y?.(e),oe(ne[e].label),ae.closeDropdown()},...b,children:[(0,G.jsx)(Gf.Target,{autoComplete:M,withExpandedAttribute:!0,children:(0,G.jsx)(wd,{...ee,size:k,__staticSelector:`Autocomplete`,__clearSection:le,__clearable:L&&!!re&&!S&&!x,__clearSectionMode:R,rightSection:z,disabled:S,readOnly:x,value:re,error:I,onChange:e=>{oe(e.currentTarget.value),ae.openDropdown(),_&&ae.selectFirstOption()},onFocus:e=>{V&&ae.openDropdown(),u?.(e)},onBlur:e=>{B&&ae.clickSelectedOption(),ae.closeDropdown(),d?.(e)},onClick:e=>{ae.openDropdown(),f?.(e)},classNames:se,styles:ce,unstyled:i,attributes:H,id:te})}),(0,G.jsx)(rp,{data:U,hidden:x||S,filter:C,search:re,limit:T,hiddenWhenEmpty:!0,withScrollArea:E,maxDropdownHeight:D,unstyled:i,labelId:ee.label?`${te}-label`:void 0,"aria-label":ee.label?void 0:ee[`aria-label`],renderOption:j,scrollAreaProps:N})]})});cp.classes={...wd.classes,...Gf.classes},cp.displayName=`@mantine/core/Autocomplete`;var lp={root:`m_347db0ec`,"root--dot":`m_fbd81e3d`,label:`m_5add502a`,section:`m_91fdda9b`},up=mt((e,{radius:t,color:n,gradient:r,variant:i,size:a,autoContrast:o,circle:s})=>{let c=e.variantColorResolver({color:n||e.primaryColor,theme:e,gradient:r,variant:i||`filled`,autoContrast:o});return{root:{"--badge-height":I(a,`badge-height`),"--badge-padding-x":I(a,`badge-padding-x`),"--badge-fz":I(a,`badge-fz`),"--badge-radius":s||t===void 0?void 0:R(t),"--badge-bg":n||i?c.background:void 0,"--badge-color":n||i?c.color:void 0,"--badge-bd":n||i?c.border:void 0,"--badge-dot-color":i===`dot`?Pt(n,e):void 0}}}),dp=Ar(e=>{let t=K(`Badge`,null,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,radius:c,color:l,gradient:u,leftSection:d,rightSection:f,children:p,variant:m,fullWidth:h,autoContrast:g,circle:_,mod:v,attributes:y,...b}=t,x=Jn({name:`Badge`,props:t,classes:lp,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:y,vars:s,varsResolver:up});return(0,G.jsxs)(J,{variant:m,mod:[{block:h,circle:_,"with-right-section":!!f,"with-left-section":!!d},v],...x(`root`,{variant:m}),...b,children:[d&&(0,G.jsx)(`span`,{...x(`section`),"data-position":`left`,children:d}),(0,G.jsx)(`span`,{...x(`label`),children:p}),f&&(0,G.jsx)(`span`,{...x(`section`),"data-position":`right`,children:f})]})});dp.classes=lp,dp.varsResolver=up,dp.displayName=`@mantine/core/Badge`;var fp={root:`m_77c9d27d`,inner:`m_80f1301b`,label:`m_811560b9`,section:`m_a74036a`,loader:`m_a25b86ee`,group:`m_80d6d844`,groupSection:`m_70be2a01`},pp={orientation:`horizontal`},mp=mt((e,{borderWidth:t})=>({group:{"--button-border-width":v(t)}})),hp=q(e=>{let t=K(`ButtonGroup`,pp,e),{className:n,style:r,classNames:i,styles:a,unstyled:o,orientation:s,vars:c,borderWidth:l,mod:u,attributes:d,...f}=K(`ButtonGroup`,pp,e);return(0,G.jsx)(J,{...Jn({name:`ButtonGroup`,props:t,classes:fp,className:n,style:r,classNames:i,styles:a,unstyled:o,attributes:d,vars:c,varsResolver:mp,rootSelector:`group`})(`group`),mod:[{"data-orientation":s},u],role:`group`,...f})});hp.classes=fp,hp.varsResolver=mp,hp.displayName=`@mantine/core/ButtonGroup`;var gp=mt((e,{radius:t,color:n,gradient:r,variant:i,autoContrast:a,size:o})=>{let s=e.variantColorResolver({color:n||e.primaryColor,theme:e,gradient:r,variant:i||`filled`,autoContrast:a});return{groupSection:{"--section-height":I(o,`section-height`),"--section-padding-x":I(o,`section-padding-x`),"--section-fz":o?.includes(`compact`)?z(o.replace(`compact-`,``)):z(o),"--section-radius":t===void 0?void 0:R(t),"--section-bg":n||i?s.background:void 0,"--section-color":s.color,"--section-bd":n||i?s.border:void 0}}}),_p=q(e=>{let t=K(`ButtonGroupSection`,null,e),{className:n,style:r,classNames:i,styles:a,unstyled:o,vars:s,gradient:c,radius:l,autoContrast:u,attributes:d,...f}=t;return(0,G.jsx)(J,{...Jn({name:`ButtonGroupSection`,props:t,classes:fp,className:n,style:r,classNames:i,styles:a,unstyled:o,attributes:d,vars:s,varsResolver:gp,rootSelector:`groupSection`})(`groupSection`),...f})});_p.classes=fp,_p.varsResolver=gp,_p.displayName=`@mantine/core/ButtonGroupSection`;var vp={in:{opacity:1,transform:`translate(-50%, calc(-50% + ${v(1)}))`},out:{opacity:0,transform:`translate(-50%, -200%)`},common:{transformOrigin:`center`},transitionProperty:`transform, opacity`},yp=mt((e,{radius:t,color:n,gradient:r,variant:i,size:a,justify:o,autoContrast:s})=>{let c=e.variantColorResolver({color:n||e.primaryColor,theme:e,gradient:r,variant:i||`filled`,autoContrast:s});return{root:{"--button-justify":o,"--button-height":I(a,`button-height`),"--button-padding-x":I(a,`button-padding-x`),"--button-fz":a?.includes(`compact`)?z(a.replace(`compact-`,``)):z(a),"--button-radius":t===void 0?void 0:R(t),"--button-bg":n||i?c.background:void 0,"--button-hover":n||i?c.hover:void 0,"--button-color":c.color,"--button-bd":n||i?c.border:void 0,"--button-hover-color":n||i?c.hoverColor:void 0}}}),bp=Ar(e=>{let t=K(`Button`,null,e),{style:n,vars:r,className:i,color:a,disabled:o,children:s,leftSection:c,rightSection:l,fullWidth:u,variant:d,radius:f,loading:p,loaderProps:m,gradient:h,classNames:g,styles:_,unstyled:v,"data-disabled":y,autoContrast:b,mod:x,attributes:S,...C}=t,w=Jn({name:`Button`,props:t,classes:fp,className:i,style:n,classNames:g,styles:_,unstyled:v,attributes:S,vars:r,varsResolver:yp}),T=!!c,E=!!l;return(0,G.jsxs)(sc,{...w(`root`,{active:!o&&!p&&!y}),unstyled:v,variant:d,disabled:o||p,mod:[{disabled:o||y,loading:p,block:u,"with-left-section":T,"with-right-section":E},x],...C,children:[typeof p==`boolean`&&(0,G.jsx)(Ic,{mounted:p,transition:vp,duration:150,children:e=>(0,G.jsx)(J,{component:`span`,...w(`loader`,{style:e}),"aria-hidden":!0,children:(0,G.jsx)(cl,{color:`var(--button-color)`,size:`calc(var(--button-height) / 1.8)`,...m})})}),(0,G.jsxs)(`span`,{...w(`inner`),children:[c&&(0,G.jsx)(J,{component:`span`,...w(`section`),mod:{position:`left`},children:c}),(0,G.jsx)(J,{component:`span`,mod:{loading:p},...w(`label`),children:s}),l&&(0,G.jsx)(J,{component:`span`,...w(`section`),mod:{position:`right`},children:l})]})]})});bp.classes=fp,bp.varsResolver=yp,bp.displayName=`@mantine/core/Button`,bp.Group=hp,bp.GroupSection=_p;var[xp,Sp]=E(`Card component was not found in tree`),Cp={root:`m_e615b15f`,section:`m_599a2148`},wp=Ar(e=>{let{classNames:t,className:n,style:r,styles:i,vars:a,withBorder:o,inheritPadding:s,mod:c,...l}=K(`CardSection`,null,e),u=Sp();return(0,G.jsx)(J,{mod:[{"with-border":o,"inherit-padding":s},c],...u.getStyles(`section`,{className:n,style:r,styles:i,classNames:t}),...l})});wp.classes=Cp,wp.displayName=`@mantine/core/CardSection`;var Tp=mt((e,{padding:t})=>({root:{"--card-padding":L(t)}})),Ep={orientation:`vertical`},Dp=Ar(e=>{let t=K(`Card`,Ep,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,children:c,padding:l,attributes:u,orientation:d,...f}=t,p=Jn({name:`Card`,props:t,classes:Cp,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:u,vars:s,varsResolver:Tp}),m=w.Children.toArray(c),h=m.map((e,t)=>typeof e==`object`&&e&&`type`in e&&(e.type===wp||e.type?.displayName===`@mantine/core/CardSection`)?(0,w.cloneElement)(e,{"data-orientation":d,"data-first-section":t===0||void 0,"data-last-section":t===m.length-1||void 0}):e);return(0,G.jsx)(xp,{value:{getStyles:p},children:(0,G.jsx)(fc,{unstyled:o,"data-orientation":d,...p(`root`),...f,children:h})})});Dp.classes=Cp,Dp.varsResolver=Tp,Dp.displayName=`@mantine/core/Card`,Dp.Section=wp;var Op={root:`m_b183c0a2`},kp=mt((e,{color:t})=>({root:{"--code-bg":t?Pt(t,e):void 0}})),Ap=q(e=>{let t=K(`Code`,null,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,color:c,block:l,mod:u,attributes:d,...f}=t,p=Jn({name:`Code`,props:t,classes:Op,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:d,vars:s,varsResolver:kp});return(0,G.jsx)(J,{component:l?`pre`:`code`,mod:[{block:l},u],...p(`root`),...f,dir:`ltr`})});Ap.classes=Op,Ap.varsResolver=kp,Ap.displayName=`@mantine/core/Code`;var jp={root:`m_7485cace`},Mp={strategy:`block`},Np=mt((e,{size:t,fluid:n})=>({root:{"--container-size":n?void 0:I(t,`container-size`)}})),Pp=q(e=>{let t=K(`Container`,Mp,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,fluid:c,mod:l,attributes:u,strategy:d,...f}=t,p=Jn({name:`Container`,classes:jp,props:t,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:u,vars:s,varsResolver:Np});return(0,G.jsx)(J,{mod:[{fluid:c,strategy:d},l],...p(`root`),...f})});Pp.classes=jp,Pp.varsResolver=Np,Pp.displayName=`@mantine/core/Container`;var[Fp,Ip]=E(`Grid component was not found in tree`),Lp=(e,t)=>{if(e===`content`)return`auto`;if(e===`auto`)return`0rem`;if(e)return e===t?`100%`:`calc(${100*e/t}% - ${(t-e)/t} * var(--grid-column-gap))`},Rp=(e,t,n)=>n||e===`auto`?`100%`:e===`content`?`unset`:Lp(e,t),zp=(e,t)=>{if(e)return e===`auto`||t?`1`:`auto`},Bp=(e,t)=>{if(e===0)return`0`;if(e)return`calc(${100*e/t}% + ${e/t} * var(--grid-column-gap))`};function Vp({span:e,order:t,offset:n,align:r,selector:i}){let a=vn(),o=Ip(),s=o.breakpoints||a.breakpoints,c=U(e),l=c===void 0?12:c,d=b({"--col-order":U(t)?.toString(),"--col-flex-grow":zp(l,o.grow),"--col-flex-basis":Lp(l,o.columns),"--col-width":l===`content`?`auto`:void 0,"--col-max-width":Rp(l,o.columns,o.grow),"--col-offset":Bp(U(n),o.columns),"--col-align-self":U(r)}),f=u(s).reduce((i,a)=>(i[a]||(i[a]={}),typeof t==`object`&&t[a]!==void 0&&(i[a][`--col-order`]=t[a]?.toString()),typeof e==`object`&&e[a]!==void 0&&(i[a][`--col-flex-grow`]=zp(e[a],o.grow),i[a][`--col-flex-basis`]=Lp(e[a],o.columns),i[a][`--col-width`]=e[a]===`content`?`auto`:void 0,i[a][`--col-max-width`]=Rp(e[a],o.columns,o.grow)),typeof n==`object`&&n[a]!==void 0&&(i[a][`--col-offset`]=Bp(n[a],o.columns)),typeof r==`object`&&r[a]!==void 0&&(i[a][`--col-align-self`]=r[a]),i),{}),p=te(u(f),s).filter(e=>u(f[e.value]).length>0).map(e=>({query:o.type===`container`?`mantine-grid (min-width: ${s[e.value]})`:`(min-width: ${s[e.value]})`,styles:f[e.value]}));return(0,G.jsx)(Qn,{styles:d,media:o.type===`container`?void 0:p,container:o.type===`container`?p:void 0,selector:i})}var Hp={container:`m_8478a6da`,root:`m_410352e9`,inner:`m_dee7bd2f`,col:`m_96bdd299`},Up={span:12},Wp=q(e=>{let{classNames:t,className:n,style:r,styles:i,vars:a,span:o,order:s,offset:c,align:l,...u}=K(`GridCol`,Up,e),d=Ip(),f=wr();return(0,G.jsxs)(G.Fragment,{children:[(0,G.jsx)(Vp,{selector:`.${f}`,span:o,order:s,offset:c,align:l}),(0,G.jsx)(J,{...d.getStyles(`col`,{className:gt(n,f),style:r,classNames:t,styles:i}),...u})]})});Wp.classes=Hp,Wp.displayName=`@mantine/core/GridCol`;function Gp({gap:e,rowGap:t,columnGap:n,selector:r,breakpoints:i,type:a}){let o=vn(),s=i||o.breakpoints,c=b({"--grid-gap":L(U(e)),"--grid-row-gap":L(U(t)),"--grid-column-gap":L(U(n))}),l=u(s).reduce((r,i)=>(r[i]||(r[i]={}),typeof e==`object`&&e[i]!==void 0&&(r[i][`--grid-gap`]=L(e[i])),typeof t==`object`&&t[i]!==void 0&&(r[i][`--grid-row-gap`]=L(t[i])),typeof n==`object`&&n[i]!==void 0&&(r[i][`--grid-column-gap`]=L(n[i])),r),{}),d=te(u(l),s).filter(e=>u(l[e.value]).length>0).map(e=>({query:a===`container`?`mantine-grid (min-width: ${s[e.value]})`:`(min-width: ${s[e.value]})`,styles:l[e.value]}));return(0,G.jsx)(Qn,{styles:c,media:a===`container`?void 0:d,container:a===`container`?d:void 0,selector:r})}var Kp={gap:`md`,columns:12},qp=mt((e,{justify:t,align:n,overflow:r})=>({root:{"--grid-justify":t,"--grid-align":n,"--grid-overflow":r}})),Jp=q(e=>{let t=K(`Grid`,Kp,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,grow:c,gap:l,rowGap:u,columnGap:d,columns:f,align:p,justify:m,children:h,breakpoints:g,type:_,attributes:v,...y}=t,b=Jn({name:`Grid`,classes:Hp,props:t,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:v,vars:s,varsResolver:qp}),x=wr();return _===`container`&&g?(0,G.jsxs)(Fp,{value:{getStyles:b,grow:c,columns:f,breakpoints:g,type:_},children:[(0,G.jsx)(Gp,{selector:`.${x}`,...t}),(0,G.jsx)(`div`,{...b(`container`),children:(0,G.jsx)(J,{...b(`root`,{className:x}),...y,children:(0,G.jsx)(`div`,{...b(`inner`),children:h})})})]}):(0,G.jsxs)(Fp,{value:{getStyles:b,grow:c,columns:f,breakpoints:g,type:_},children:[(0,G.jsx)(Gp,{selector:`.${x}`,...t}),(0,G.jsx)(J,{...b(`root`,{className:x}),...y,children:(0,G.jsx)(`div`,{...b(`inner`),children:h})})]})});Jp.classes=Hp,Jp.varsResolver=qp,Jp.displayName=`@mantine/core/Grid`,Jp.Col=Wp;var Yp=[`borderBottomWidth`,`borderLeftWidth`,`borderRightWidth`,`borderTopWidth`,`boxSizing`,`fontFamily`,`fontSize`,`fontStyle`,`fontWeight`,`letterSpacing`,`lineHeight`,`paddingBottom`,`paddingLeft`,`paddingRight`,`paddingTop`,`tabSize`,`textIndent`,`textRendering`,`textTransform`,`width`,`wordBreak`,`wordSpacing`,`scrollbarGutter`],Xp={"min-height":`0`,"max-height":`none`,height:`0`,visibility:`hidden`,overflow:`hidden`,position:`absolute`,"z-index":`-1000`,top:`0`,right:`0`,display:`block`};function Zp(e){Object.keys(Xp).forEach(t=>{e.style.setProperty(t,Xp[t],`important`)})}function Qp(e){let t=window.getComputedStyle(e);if(t===null)return null;let n={};for(let e of Yp)n[e]=t[e];return n.boxSizing===``?null:{sizingStyle:n,paddingSize:parseFloat(n.paddingBottom)+parseFloat(n.paddingTop),borderSize:parseFloat(n.borderBottomWidth)+parseFloat(n.borderTopWidth)}}var $p=null;function em(e,t,n=1,r=1/0){$p||($p=document.createElement(`textarea`),$p.setAttribute(`tabindex`,`-1`),$p.setAttribute(`aria-hidden`,`true`),$p.setAttribute(`aria-label`,`autosize measurement`),Zp($p)),$p.parentNode===null&&document.body.appendChild($p);let{paddingSize:i,borderSize:a,sizingStyle:o}=e,{boxSizing:s}=o;Object.keys(o).forEach(e=>{$p.style[e]=o[e]}),Zp($p),$p.value=t;let c=s===`border-box`?$p.scrollHeight+a:$p.scrollHeight-i;$p.value=t,c=s===`border-box`?$p.scrollHeight+a:$p.scrollHeight-i,$p.value=`x`;let l=$p.scrollHeight-i,u=l*n;s===`border-box`&&(u=u+i+a),c=Math.max(u,c);let d=l*r;return s===`border-box`&&(d=d+i+a),c=Math.min(d,c),[c,l]}function tm({maxRows:e,minRows:t,onChange:n,ref:r,...i}){let a=i.value!==void 0,o=(0,w.useRef)(null),s=je(o,r),c=(0,w.useRef)(0),l=(0,w.useRef)(0),u=()=>{let n=o.current;if(!n)return;let r=Qp(n);if(!r)return;let[i]=em(r,n.value||n.placeholder||`x`,t,e);c.current!==i&&(c.current=i,n.style.setProperty(`height`,`${i}px`,`important`))},d=e=>{a||u(),n?.(e)};return(0,w.useLayoutEffect)(u),(0,w.useEffect)(()=>{let e=()=>u();return window.addEventListener(`resize`,e),()=>window.removeEventListener(`resize`,e)},[]),(0,w.useEffect)(()=>{let e=o.current;if(!e||typeof ResizeObserver>`u`)return;l.current=e.offsetWidth;let t=new ResizeObserver(()=>{o.current&&o.current.offsetWidth!==l.current&&(l.current=o.current.offsetWidth,u())});return t.observe(e),()=>t.disconnect()},[]),(0,w.useEffect)(()=>{let e=()=>u();return document.fonts.addEventListener(`loadingdone`,e),()=>document.fonts.removeEventListener(`loadingdone`,e)},[]),(0,w.useEffect)(()=>{let e=e=>{if(o.current?.form===e.target&&!a){let e=o.current.value;requestAnimationFrame(()=>{o.current&&e!==o.current.value&&u()})}};return document.body.addEventListener(`reset`,e),()=>document.body.removeEventListener(`reset`,e)},[a]),(0,G.jsx)(`textarea`,{rows:t,...i,onChange:d,ref:s})}var nm=q(e=>{let{autosize:t,maxRows:n,minRows:r,__staticSelector:i,resize:a,bottomSection:o,bottomSectionProps:s,...c}=K([`Input`,`InputWrapper`,`Textarea`],null,e),l=t&&st()!==`test`,u=l?{maxRows:n,minRows:r}:{};return(0,G.jsx)(wd,{component:l?tm:`textarea`,...c,__staticSelector:i||`Textarea`,__bottomSection:o,__bottomSectionProps:s,multiline:!0,"data-no-overflow":t&&n===void 0||void 0,__vars:{"--input-resize":a},...u})});nm.classes=wd.classes,nm.displayName=`@mantine/core/Textarea`;var[rm,im]=E(`List component was not found in tree`),am={root:`m_abbac491`,item:`m_abb6bec2`,itemWrapper:`m_75cd9f71`,itemIcon:`m_60f83e5b`},om=q(e=>{let{classNames:t,className:n,style:r,styles:i,vars:a,icon:o,children:s,mod:c,...l}=K(`ListItem`,null,e),u=im(),d=o||u.icon,f={classNames:t,styles:i};return(0,G.jsx)(J,{...u.getStyles(`item`,{...f,className:n,style:r}),component:`li`,mod:[{"with-icon":!!d,centered:u.center},c],...l,children:(0,G.jsxs)(`div`,{...u.getStyles(`itemWrapper`,f),children:[d&&(0,G.jsx)(`span`,{...u.getStyles(`itemIcon`,f),children:d}),(0,G.jsx)(`span`,{...u.getStyles(`itemLabel`,f),children:s})]})})});om.classes=am,om.displayName=`@mantine/core/ListItem`;var sm={type:`unordered`},cm=mt((e,{size:t,spacing:n})=>({root:{"--list-fz":z(t),"--list-lh":B(t),"--list-spacing":L(n)}})),lm=q(e=>{let t=K(`List`,sm,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,children:c,type:l,withPadding:u,icon:d,spacing:f,center:p,listStyleType:m,mod:h,attributes:g,..._}=t,v=Jn({name:`List`,classes:am,props:t,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:g,vars:s,varsResolver:cm});return(0,G.jsx)(rm,{value:{center:p,icon:d,getStyles:v},children:(0,G.jsx)(J,{...v(`root`,{style:{listStyleType:m}}),component:l===`unordered`?`ul`:`ol`,mod:[{"with-padding":u,type:d?`none`:m},h],..._,children:c})})});lm.classes=am,lm.varsResolver=cm,lm.displayName=`@mantine/core/List`,lm.Item=om;var[um,dm]=E(`Menu component was not found in the tree`),fm=(0,w.createContext)(null);function pm(e){let{value:t,defaultValue:n,onChange:r,children:i}=K(`MenuCheckboxGroup`,null,e),[a,o]=Me({value:t,defaultValue:n,finalValue:[],onChange:r});return(0,G.jsx)(fm,{value:{values:a,onChange:(0,w.useCallback)(e=>{o(a.includes(e)?a.filter(t=>t!==e):[...a,e])},[a,o])},children:i})}pm.displayName=`@mantine/core/MenuCheckboxGroup`;var mm=(0,w.createContext)(null);function hm({role:e,checked:t,indicator:n,onSelect:r,color:i,closeMenuOnClick:a,rightSection:o,children:s,disabled:c,dataDisabled:l,className:u,style:d,styles:f,classNames:p,buttonRef:m,others:h}){let g=dm(),_=(0,w.use)(mm),v=vn(),{dir:y}=Rr(),b=(0,w.useRef)(null),x=H(h.onClick,()=>{l||(r(),a&&g.closeDropdownImmediately())}),S=H(h.onMouseMove,()=>{if(!g.hasSearch)return;let e=b.current?.closest(`[data-menu-dropdown]`);e&&e.querySelectorAll(`[data-menu-active]`).forEach(t=>{t!==b.current&&t.closest(`[data-menu-dropdown]`)===e&&t.removeAttribute(`data-menu-active`)})}),C=H(h.onKeyDown,e=>{e.key===`ArrowLeft`&&_&&(_.close(),_.focusParentItem())}),T=i?v.variantColorResolver({color:i,theme:v,variant:`light`}):void 0,E=i?Nt({color:i,theme:v}):null,D=g.alignItemsLabels!==`none`||t;return(0,G.jsxs)(sc,{onMouseDown:e=>e.preventDefault(),...h,unstyled:g.unstyled,tabIndex:g.menuItemTabIndex,...g.getStyles(`item`,{className:u,style:d,styles:f,classNames:p}),ref:je(b,m),role:e,"aria-checked":t,disabled:c,"data-menu-item":!0,"data-checked":t||void 0,"data-disabled":c||l||void 0,"data-mantine-stop-propagation":!0,onClick:x,onMouseMove:S,onKeyDown:j({siblingSelector:`[data-menu-item]:not([data-disabled])`,parentSelector:`[data-menu-dropdown]`,activateOnFocus:!1,loop:g.loop,dir:y,orientation:`vertical`,onKeyDown:C}),__vars:{"--menu-item-color":E?.isThemeColor&&E?.shade===void 0?`var(--mantine-color-${E.color}-6)`:T?.color,"--menu-item-hover":T?.hover},children:[D&&(0,G.jsx)(`div`,{...g.getStyles(`itemIndicator`,{styles:f,classNames:p}),"data-checked":t||void 0,children:t?n:null}),s&&(0,G.jsx)(`div`,{...g.getStyles(`itemLabel`,{styles:f,classNames:p}),"data-menu-item-label":!0,children:s}),o&&(0,G.jsx)(`div`,{...g.getStyles(`itemSection`,{styles:f,classNames:p}),"data-position":`right`,children:o})]})}var gm={dropdown:`m_dc9b7c9f`,label:`m_9bfac126`,divider:`m_efdf90cb`,item:`m_99ac2aa1`,search:`m_ef8769b6`,itemLabel:`m_5476e0d3`,itemIndicator:`m_8395186e`,itemSection:`m_8b75e504`,chevron:`m_b85b0bed`},_m=q(e=>{let{classNames:t,className:n,style:r,styles:i,vars:a,color:o,closeMenuOnClick:s,rightSection:c,children:l,disabled:u,"data-disabled":d,value:f,checked:p,defaultChecked:m,onChange:h,checkIcon:g,ref:_,...v}=K(`MenuCheckboxItem`,null,e),y=dm(),b=(0,w.use)(fm),x=b&&f!==void 0?b.values.includes(f):void 0,[S,C]=Me({value:p??x,defaultValue:m,finalValue:!1,onChange:h});return(0,G.jsx)(hm,{role:`menuitemcheckbox`,checked:S,indicator:g??y.checkIcon??(0,G.jsx)(qf,{size:10}),onSelect:()=>{h?C(!S):b&&f!==void 0?b.onChange(f):C(!S)},color:o,closeMenuOnClick:s,rightSection:c,disabled:u,dataDisabled:d,className:n,style:r,styles:i,classNames:t,buttonRef:_,others:v,children:l})});_m.classes=gm,_m.displayName=`@mantine/core/MenuCheckboxItem`;function vm(e){let{children:t,disabled:n,longPressDelay:r}=K(`MenuContextMenu`,null,e),i=pt(t);if(!i)throw Error(`Menu.ContextMenu component children should be an element or a component that accepts ref. Fragments, strings, numbers and other primitive values are not supported`);let a=dm(),o=Bc();return(0,w.cloneElement)(i,Vc({childProps:i.props,disabled:n||o.disabled,opened:a.opened,longPressDelay:r,setReference:o.reference,open:()=>a.openDropdown()}))}vm.displayName=`@mantine/core/MenuContextMenu`;var ym=q(e=>{let{classNames:t,className:n,style:r,styles:i,vars:a,...o}=K(`MenuDivider`,null,e);return(0,G.jsx)(J,{...dm().getStyles(`divider`,{className:n,style:r,styles:i,classNames:t}),...o})});ym.classes=gm,ym.displayName=`@mantine/core/MenuDivider`;var bm=500;function xm(e){return((e.querySelector(`[data-menu-item-label]`)??e).textContent??``).trim().toLowerCase()}function Sm(e){return e.length>1&&e.split(``).every(t=>t===e[0])}function Cm({enabled:e,opened:t,getDropdown:n}){let r=(0,w.useRef)({buffer:``,timeoutId:null});return(0,w.useEffect)(()=>{if(t&&e)return;let n=r.current;n.timeoutId!==null&&(window.clearTimeout(n.timeoutId),n.timeoutId=null),n.buffer=``},[t,e]),(0,w.useEffect)(()=>()=>{let{timeoutId:e}=r.current;e!==null&&window.clearTimeout(e)},[]),t=>{if(!e||t.defaultPrevented||t.ctrlKey||t.metaKey||t.altKey||t.key.length!==1||t.key===` `)return;let i=t.target;if(i&&(i.tagName===`INPUT`||i.tagName===`TEXTAREA`||i.tagName===`SELECT`||i.isContentEditable))return;let a=n();if(!a)return;let o=Array.from(a.querySelectorAll(`[data-menu-item]:not([data-disabled])`)).filter(e=>e.closest(`[data-menu-dropdown]`)===a);if(o.length===0)return;let s=r.current;s.buffer=(s.buffer+t.key).toLowerCase(),s.timeoutId!==null&&window.clearTimeout(s.timeoutId),s.timeoutId=window.setTimeout(()=>{s.buffer=``,s.timeoutId=null},bm);let c=document.activeElement,l=c?o.indexOf(c):-1,u=null;if(s.buffer.length===1||Sm(s.buffer)){let e=s.buffer[0],t=l+1;for(let n=0;n<o.length;n+=1){let r=(t+n)%o.length;if(xm(o[r]).startsWith(e)){u=o[r];break}}}else for(let e=0;e<o.length;e+=1)if(xm(o[e]).startsWith(s.buffer)){u=o[e];break}u&&(t.preventDefault(),u.focus())}}var wm=q(e=>{let{classNames:t,className:n,style:r,styles:i,vars:a,onMouseEnter:o,onMouseLeave:s,onKeyDown:c,children:l,ref:u,...d}=K(`MenuDropdown`,null,e),f=(0,w.useRef)(null),p=dm(),m=Cm({enabled:!p.hasSearch,opened:p.opened,getDropdown:()=>f.current}),h=H(c,e=>{m(e),!(e.defaultPrevented||p.hasSearch)&&(e.key===`ArrowUp`||e.key===`ArrowDown`)&&(e.preventDefault(),f.current?.querySelectorAll(`[data-menu-item]:not(:disabled)`)[0]?.focus())}),g=H(o,()=>(p.trigger===`hover`||p.trigger===`click-hover`)&&p.openDropdown()),_=H(s,()=>(p.trigger===`hover`||p.trigger===`click-hover`)&&p.closeDropdown());return(0,G.jsxs)(el.Dropdown,{...d,onMouseEnter:g,onMouseLeave:_,role:`menu`,"aria-orientation":`vertical`,ref:je(u,f),...p.getStyles(`dropdown`,{className:n,style:r,styles:i,classNames:t,withStaticClass:!1}),tabIndex:-1,"data-menu-dropdown":!0,onKeyDown:h,children:[p.withInitialFocusPlaceholder&&!p.hasSearch&&(0,G.jsx)(`div`,{role:`presentation`,tabIndex:-1,"data-autofocus":!0,"data-mantine-stop-propagation":!0,style:{outline:0}}),l]})});wm.classes=gm,wm.displayName=`@mantine/core/MenuDropdown`;var Tm=Ar(e=>{let{classNames:t,className:n,style:r,styles:i,vars:a,color:o,closeMenuOnClick:s,leftSection:c,rightSection:l,children:u,disabled:d,"data-disabled":f,ref:p,...m}=K(`MenuItem`,null,e),h=dm(),g=(0,w.use)(mm),_=vn(),{dir:v}=Rr(),y=(0,w.useRef)(null),b=m,x=H(b.onClick,()=>{f||(typeof s==`boolean`?s&&h.closeDropdownImmediately():h.closeOnItemClick&&h.closeDropdownImmediately())}),S=H(b.onMouseMove,()=>{if(!h.hasSearch)return;let e=y.current?.closest(`[data-menu-dropdown]`);e&&e.querySelectorAll(`[data-menu-active]`).forEach(t=>{t!==y.current&&t.closest(`[data-menu-dropdown]`)===e&&t.removeAttribute(`data-menu-active`)})}),C=o?_.variantColorResolver({color:o,theme:_,variant:`light`}):void 0,T=o?Nt({color:o,theme:_}):null,E=H(b.onKeyDown,e=>{e.key===`ArrowLeft`&&g&&(g.close(),g.focusParentItem())});return(0,G.jsxs)(sc,{onMouseDown:e=>e.preventDefault(),...m,unstyled:h.unstyled,tabIndex:h.menuItemTabIndex,...h.getStyles(`item`,{className:n,style:r,styles:i,classNames:t}),ref:je(y,p),role:`menuitem`,disabled:d,"data-menu-item":!0,"data-disabled":d||f||void 0,"data-mantine-stop-propagation":!0,onClick:x,onMouseMove:S,onKeyDown:j({siblingSelector:`[data-menu-item]:not([data-disabled])`,parentSelector:`[data-menu-dropdown]`,activateOnFocus:!1,loop:h.loop,dir:v,orientation:`vertical`,onKeyDown:E}),__vars:{"--menu-item-color":T?.isThemeColor&&T?.shade===void 0?`var(--mantine-color-${T.color}-6)`:C?.color,"--menu-item-hover":C?.hover},children:[h.alignItemsLabels===`all`&&(0,G.jsx)(`div`,{...h.getStyles(`itemIndicator`,{styles:i,classNames:t}),"data-placeholder":!0}),c&&(0,G.jsx)(`div`,{...h.getStyles(`itemSection`,{styles:i,classNames:t}),"data-position":`left`,children:c}),u&&(0,G.jsx)(`div`,{...h.getStyles(`itemLabel`,{styles:i,classNames:t}),"data-menu-item-label":!0,children:u}),l&&(0,G.jsx)(`div`,{...h.getStyles(`itemSection`,{styles:i,classNames:t}),"data-position":`right`,children:l})]})});Tm.classes=gm,Tm.displayName=`@mantine/core/MenuItem`;var Em=q(e=>{let{classNames:t,className:n,style:r,styles:i,vars:a,...o}=K(`MenuLabel`,null,e);return(0,G.jsx)(J,{...dm().getStyles(`label`,{className:n,style:r,styles:i,classNames:t}),...o})});Em.classes=gm,Em.displayName=`@mantine/core/MenuLabel`;var Dm=(0,w.createContext)(null);function Om(e){let{value:t,defaultValue:n,onChange:r,children:i}=K(`MenuRadioGroup`,null,e),[a,o]=Me({value:t,defaultValue:n,finalValue:null,onChange:r});return(0,G.jsx)(Dm,{value:{value:a,onChange:e=>o(e)},children:i})}Om.displayName=`@mantine/core/MenuRadioGroup`;function km({size:e,style:t,...n}){return(0,G.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,fill:`none`,viewBox:`0 0 5 5`,style:{width:v(e),height:v(e),...t},"aria-hidden":!0,...n,children:(0,G.jsx)(`circle`,{cx:`2.5`,cy:`2.5`,r:`2.5`,fill:`currentColor`})})}var Am=q(e=>{let{classNames:t,className:n,style:r,styles:i,vars:a,color:o,closeMenuOnClick:s,rightSection:c,children:l,disabled:u,"data-disabled":d,value:f,checked:p,onChange:m,checkIcon:h,ref:g,..._}=K(`MenuRadioItem`,null,e),v=dm(),y=(0,w.use)(Dm),b=p??(y?y.value===f:!1);return(0,G.jsx)(hm,{role:`menuitemradio`,checked:b,indicator:h??v.checkIcon??(0,G.jsx)(km,{size:5}),onSelect:()=>{b||(m?m(f):y&&y.onChange(f))},color:o,closeMenuOnClick:s,rightSection:c,disabled:u,dataDisabled:d,className:n,style:r,styles:i,classNames:t,buttonRef:g,others:_,children:l})});Am.classes=gm,Am.displayName=`@mantine/core/MenuRadioItem`;var jm=`[data-menu-item]:not([data-disabled])`,Mm=`[data-menu-active]`;function Nm(e){return e?.closest(`[data-menu-dropdown]`)}function Pm(e){return e?Array.from(e.querySelectorAll(jm)).filter(t=>t.closest(`[data-menu-dropdown]`)===e):[]}function Fm(e){e&&e.querySelectorAll(Mm).forEach(t=>{t.closest(`[data-menu-dropdown]`)===e&&t.removeAttribute(`data-menu-active`)})}function Im(e,t){Fm(t),e&&(e.setAttribute(`data-menu-active`,`true`),e.scrollIntoView({block:`nearest`}))}function Lm(e){return e.findIndex(e=>e.hasAttribute(`data-menu-active`))}var Rm={clearSearchOnClose:!0},zm=q(e=>{let{classNames:t,styles:n,onKeyDown:r,onChange:i,size:a,clearSearchOnClose:o,ref:s,...c}=K(`MenuSearch`,Rm,e),l=dm(),u=(0,w.useRef)(null),d=je(s,u),f=(0,w.useRef)(i);f.current=i,(0,w.useEffect)(()=>l.registerSearch(),[l.registerSearch]),(0,w.useEffect)(()=>{o?l.searchExitClearRef.current=()=>{f.current?.({currentTarget:{value:``}})}:l.searchExitClearRef.current=null},[o,l.searchExitClearRef]),(0,w.useEffect)(()=>{l.opened||Fm(Nm(u.current))},[l.opened]);let p=H(i,e=>{Fm(Nm(e.currentTarget))}),m=H(r,e=>{if(e.defaultPrevented)return;let t=Nm(e.currentTarget),n=Pm(t);if(e.key===`ArrowDown`){if(e.preventDefault(),n.length===0)return;let r=Lm(n);Im(n[r>=n.length-1?l.loop?0:r:r+1]??null,t)}else if(e.key===`ArrowUp`){if(e.preventDefault(),n.length===0)return;let r=Lm(n);Im(n[r<=0?r===-1||l.loop?n.length-1:0:r-1]??null,t)}else if(e.key===`Home`)e.preventDefault(),n.length>0&&Im(n[0],t);else if(e.key===`End`)e.preventDefault(),n.length>0&&Im(n[n.length-1],t);else if(e.key===`Enter`){if(e.nativeEvent.isComposing||e.nativeEvent.keyCode===229)return;let t=n[Lm(n)];t&&(e.preventDefault(),t.hasAttribute(`data-sub-menu-item`)?(t.focus(),t.dispatchEvent(new KeyboardEvent(`keydown`,{key:`ArrowRight`,bubbles:!0}))):t.click())}}),h=l.getStyles(`search`);return(0,G.jsx)(xd,{"data-autofocus":!0,"data-mantine-stop-propagation":!0,type:`search`,size:a,...c,ref:d,classNames:[{input:h.className},t],styles:[{input:h.style},n],onKeyDown:m,onChange:p,__staticSelector:`Menu`})});zm.classes=gm,zm.displayName=`@mantine/core/MenuSearch`;var Bm=q(e=>{let{classNames:t,className:n,style:r,styles:i,vars:a,onMouseEnter:o,onMouseLeave:s,onPointerEnter:c,onPointerLeave:l,onKeyDown:u,children:d,ref:f,...p}=K(`MenuSubDropdown`,null,e),m=(0,w.useRef)(null),h=dm(),g=(0,w.use)(mm),_=Cm({enabled:!h.hasSearch,opened:g?.opened??!1,getDropdown:()=>m.current}),v=H(u,e=>{_(e),!e.ctrlKey&&!e.metaKey&&!e.altKey&&e.key.length===1&&e.key!==` `&&e.stopPropagation()}),y=g?.getFloatingProps({onMouseEnter:o,onMouseLeave:s,onPointerEnter:c,onPointerLeave:l});return(0,G.jsx)(el.Dropdown,{...p,...y,role:`menu`,"aria-orientation":`vertical`,ref:je(f,m,g?.setFloating),...h.getStyles(`dropdown`,{className:n,style:r,styles:i,classNames:t,withStaticClass:!1}),tabIndex:-1,"data-menu-dropdown":!0,onKeyDown:v,children:d})});Bm.classes=gm,Bm.displayName=`@mantine/core/MenuSubDropdown`;var Vm=Ar(e=>{let{classNames:t,className:n,style:r,styles:i,vars:a,color:o,leftSection:s,rightSection:c,children:l,disabled:u,"data-disabled":d,closeMenuOnClick:f,ref:p,...m}=K(`MenuSubItem`,null,e),h=dm(),g=(0,w.use)(mm),_=vn(),{dir:v}=Rr(),y=(0,w.useRef)(null),b=m,x=o?_.variantColorResolver({color:o,theme:_,variant:`light`}):void 0,S=o?Nt({color:o,theme:_}):null,C=H(b.onKeyDown,e=>{e.key===`ArrowRight`&&(g?.open(),g?.focusFirstItem()),e.key===`ArrowLeft`&&g?.parentContext&&(g.parentContext.close(),g.parentContext.focusParentItem())}),T=H(b.onClick,()=>{!d&&f&&h.closeDropdownImmediately()}),E=H(b.onMouseMove,()=>{if(!h.hasSearch)return;let e=y.current?.closest(`[data-menu-dropdown]`);e&&e.querySelectorAll(`[data-menu-active]`).forEach(t=>{t!==y.current&&t.closest(`[data-menu-dropdown]`)===e&&t.removeAttribute(`data-menu-active`)})}),D=g?.getReferenceProps({onMouseEnter:b.onMouseEnter,onMouseLeave:b.onMouseLeave,onPointerEnter:b.onPointerEnter,onPointerLeave:b.onPointerLeave});return(0,G.jsxs)(sc,{onMouseDown:e=>e.preventDefault(),...m,...D,unstyled:h.unstyled,tabIndex:h.menuItemTabIndex,...h.getStyles(`item`,{className:n,style:r,styles:i,classNames:t}),ref:je(y,p,g?.setReference),role:`menuitem`,disabled:u,"data-menu-item":!0,"data-sub-menu-item":!0,"data-disabled":u||d||void 0,"data-mantine-stop-propagation":!0,onClick:T,onMouseMove:E,onKeyDown:j({siblingSelector:`[data-menu-item]:not([data-disabled])`,parentSelector:`[data-menu-dropdown]`,activateOnFocus:!1,loop:h.loop,dir:v,orientation:`vertical`,onKeyDown:C}),__vars:{"--menu-item-color":S?.isThemeColor&&S?.shade===void 0?`var(--mantine-color-${S.color}-6)`:x?.color,"--menu-item-hover":x?.hover},children:[h.alignItemsLabels===`all`&&(0,G.jsx)(`div`,{...h.getStyles(`itemIndicator`,{styles:i,classNames:t}),"data-placeholder":!0}),s&&(0,G.jsx)(`div`,{...h.getStyles(`itemSection`,{styles:i,classNames:t}),"data-position":`left`,children:s}),l&&(0,G.jsx)(`div`,{...h.getStyles(`itemLabel`,{styles:i,classNames:t}),"data-menu-item-label":!0,children:l}),(0,G.jsx)(`div`,{...h.getStyles(`itemSection`,{styles:i,classNames:t}),"data-position":`right`,children:c||(0,G.jsx)(Ad,{...h.getStyles(`chevron`),size:14})})]})});Vm.classes=gm,Vm.displayName=`@mantine/core/MenuSubItem`;function Hm({children:e,refProp:t}){if(!T(e))throw Error(`Menu.Sub.Target component children should be an element or a component that accepts ref. Fragments, strings, numbers and other primitive values are not supported`);return dm(),(0,G.jsx)(el.Target,{refProp:t,popupType:`menu`,children:e})}Hm.displayName=`@mantine/core/MenuSubTarget`;var Um={offset:0,position:`right-start`,safeAreaPolygon:!0,transitionProps:{duration:0},openDelay:0,middlewares:{shift:{crossAxis:!0}}};function Wm(e){let{children:t,closeDelay:n,openDelay:r,position:i,safeAreaPolygon:a,opened:o,onChange:s,...c}=K(`MenuSub`,Um,e),l=De(),[u,d]=Me({value:o,finalValue:!1,onChange:s}),f=(0,w.use)(mm),p=dm(),{dir:m}=Rr(),h=bc(m,i),g=f?.registerOpenSub??p.registerOpenSub,_=(0,w.useRef)(null),v=(0,w.useCallback)(e=>{let t=_.current;return t&&t!==e&&t(),_.current=e,()=>{_.current===e&&(_.current=null)}},[]),y=(0,w.useRef)(d);y.current=d;let b=(0,w.useCallback)(()=>y.current(!0),[]),x=(0,w.useCallback)(()=>y.current(!1),[]);(0,w.useEffect)(()=>{if(u)return g(x)},[u,g,x]);let{context:S,refs:C}=Ws({placement:h,open:u,onOpenChange:e=>{e?b():x()}}),{getReferenceProps:T,getFloatingProps:E}=Js([js(S,{handleClose:a?ec(typeof a==`object`?a:void 0):void 0,delay:{open:r,close:n}})]);return(0,G.jsx)(mm,{value:{opened:u,close:x,open:b,focusFirstItem:()=>window.setTimeout(()=>{document.getElementById(`${l}-dropdown`)?.querySelectorAll(`[data-menu-item]:not([data-disabled])`)[0]?.focus()},16),focusParentItem:()=>window.setTimeout(()=>{document.getElementById(`${l}-target`)?.focus()},16),parentContext:f,setReference:C.setReference,setFloating:C.setFloating,getReferenceProps:T,getFloatingProps:E,registerOpenSub:v},children:(0,G.jsx)(el,{opened:u,onChange:e=>e?b():x(),withinPortal:!1,withArrow:!1,id:l,position:i,...c,children:t})})}Wm.extend=e=>e,Wm.displayName=`@mantine/core/MenuSub`,Wm.Target=Hm,Wm.Dropdown=Bm,Wm.Item=Vm;var Gm={refProp:`ref`};function Km(e){let{children:t,refProp:n,...r}=K(`MenuTarget`,Gm,e),i=pt(t);if(!i)throw Error(`Menu.Target component children should be an element or a component that accepts ref. Fragments, strings, numbers and other primitive values are not supported`);let a=dm(),o=i.props,s=H(o.onClick,()=>{a.trigger===`click`?a.toggleDropdown():a.trigger===`click-hover`&&(a.setOpenedViaClick(!0),a.opened||a.openDropdown())}),c=H(o.onMouseEnter,()=>(a.trigger===`hover`||a.trigger===`click-hover`)&&a.openDropdown()),l=H(o.onMouseLeave,()=>{(a.trigger===`hover`||a.trigger===`click-hover`&&!a.openedViaClick)&&a.closeDropdown()});return(0,G.jsx)(el.Target,{refProp:n,popupType:`menu`,...r,children:(0,w.cloneElement)(i,{onClick:s,onMouseEnter:c,onMouseLeave:l,"data-expanded":a.opened?!0:void 0})})}Km.displayName=`@mantine/core/MenuTarget`;var qm={trapFocus:!0,closeOnItemClick:!0,withInitialFocusPlaceholder:!0,clickOutsideEvents:[`mousedown`,`touchstart`,`keydown`],loop:!0,trigger:`click`,openDelay:0,closeDelay:100,menuItemTabIndex:-1,alignItemsLabels:`with-indicators`},Jm=q(e=>{let t=K(`Menu`,qm,e),{children:n,onOpen:r,onClose:i,opened:a,defaultOpened:o,trapFocus:s,onChange:c,closeOnItemClick:l,loop:u,closeOnEscape:d,trigger:f,openDelay:p,closeDelay:m,classNames:h,styles:g,unstyled:_,variant:v,vars:y,menuItemTabIndex:b,keepMounted:x,withInitialFocusPlaceholder:S,attributes:C,onExitTransitionEnd:T,alignItemsLabels:E,checkIcon:D,...O}=t,k=Jn({name:`Menu`,classes:gm,props:t,classNames:h,styles:g,unstyled:_,attributes:C}),[A,j]=Me({value:a,defaultValue:o,finalValue:!1,onChange:c}),[M,N]=(0,w.useState)(!1),P=()=>{j(!1),N(!1),A&&i?.()},F=()=>{j(!0),!A&&r?.()},I=()=>{A?P():F()},{openDropdown:L,closeDropdown:R}=xc({open:F,close:P,closeDelay:m,openDelay:p}),z=(0,w.useRef)(null),B=(0,w.useCallback)(e=>{let t=z.current;return t&&t!==e&&t(),z.current=e,()=>{z.current===e&&(z.current=null)}},[]),V=(0,w.useRef)(0),[H,ee]=(0,w.useState)(!1),te=(0,w.useCallback)(()=>(V.current+=1,V.current===1&&ee(!0),()=>{--V.current,V.current===0&&ee(!1)}),[]),U=(0,w.useRef)(null),re=()=>{U.current?.(),T?.()},ie=e=>ne(`[data-menu-item]`,`[data-menu-dropdown]`,e),{resolvedClassNames:ae,resolvedStyles:oe}=Pn({classNames:h,styles:g,props:t});return(0,G.jsx)(um,{value:{getStyles:k,opened:A,toggleDropdown:I,getItemIndex:ie,openedViaClick:M,setOpenedViaClick:N,closeOnItemClick:l,closeDropdown:f===`click`?P:R,openDropdown:f===`click`?F:L,closeDropdownImmediately:P,loop:u,trigger:f,unstyled:_,menuItemTabIndex:b,withInitialFocusPlaceholder:S,registerOpenSub:B,hasSearch:H,registerSearch:te,searchExitClearRef:U,alignItemsLabels:E,checkIcon:D},children:(0,G.jsx)(el,{returnFocus:!0,...O,opened:A,onChange:I,defaultOpened:o,trapFocus:!x&&s,closeOnEscape:d,__staticSelector:`Menu`,classNames:ae,styles:oe,unstyled:_,variant:v,keepMounted:x,onExitTransitionEnd:re,children:n})})});Jm.displayName=`@mantine/core/Menu`,Jm.classes=gm,Jm.Item=Tm,Jm.Label=Em,Jm.Dropdown=wm,Jm.Target=Km,Jm.Divider=ym,Jm.Search=zm,Jm.Sub=Wm,Jm.CheckboxItem=_m,Jm.CheckboxGroup=pm,Jm.RadioItem=Am,Jm.RadioGroup=Om,Jm.ContextMenu=vm;var[Ym,Xm]=E(`Modal component was not found in tree`),Zm={root:`m_9df02822`,content:`m_54c44539`,inner:`m_1f958f16`,header:`m_d0e2b9cd`},Qm=q(e=>{let{classNames:t,className:n,style:r,styles:i,vars:a,...o}=K(`ModalBody`,null,e);return(0,G.jsx)(Uu,{...Xm().getStyles(`body`,{classNames:t,style:r,styles:i,className:n}),...o})});Qm.classes=Zm,Qm.displayName=`@mantine/core/ModalBody`;var $m=q(e=>{let{classNames:t,className:n,style:r,styles:i,vars:a,...o}=K(`ModalCloseButton`,null,e);return(0,G.jsx)(Wu,{...Xm().getStyles(`close`,{classNames:t,style:r,styles:i,className:n}),...o})});$m.classes=Zm,$m.displayName=`@mantine/core/ModalCloseButton`;var eh=q(e=>{let{classNames:t,className:n,style:r,styles:i,vars:a,children:o,__hidden:s,...c}=K(`ModalContent`,null,e),l=Xm(),u=l.scrollAreaComponent||Qu;return(0,G.jsx)(Gu,{...l.getStyles(`content`,{className:n,style:r,styles:i,classNames:t}),innerProps:l.getStyles(`inner`,{className:n,style:r,styles:i,classNames:t}),"data-full-screen":l.fullScreen||void 0,"data-modal-content":!0,"data-hidden":s||void 0,...c,children:(0,G.jsx)(u,{style:{maxHeight:l.fullScreen?`100dvh`:`calc(100dvh - (${v(l.yOffset)} * 2))`},children:o})})});eh.classes=Zm,eh.displayName=`@mantine/core/ModalContent`;var th=q(e=>{let{classNames:t,className:n,style:r,styles:i,vars:a,...o}=K(`ModalHeader`,null,e);return(0,G.jsx)(Ku,{...Xm().getStyles(`header`,{classNames:t,style:r,styles:i,className:n}),...o})});th.classes=Zm,th.displayName=`@mantine/core/ModalHeader`;var nh=q(e=>{let{classNames:t,className:n,style:r,styles:i,vars:a,...o}=K(`ModalOverlay`,null,e);return(0,G.jsx)(Yu,{...Xm().getStyles(`overlay`,{classNames:t,style:r,styles:i,className:n}),...o})});nh.classes=Zm,nh.displayName=`@mantine/core/ModalOverlay`;var eee={__staticSelector:`Modal`,closeOnClickOutside:!0,withinPortal:!0,lockScroll:!0,trapFocus:!0,returnFocus:!0,closeOnEscape:!0,keepMounted:!1,zIndex:N(`modal`),transitionProps:{duration:200,transition:`fade-down`},yOffset:`5dvh`},rh=mt((e,{radius:t,size:n,yOffset:r,xOffset:i})=>({root:{"--modal-radius":t===void 0?void 0:R(t),"--modal-size":I(n,`modal-size`),"--modal-y-offset":v(r),"--modal-x-offset":v(i)}})),ih=q(e=>{let t=K(`ModalRoot`,eee,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,yOffset:c,scrollAreaComponent:l,radius:u,fullScreen:d,centered:f,xOffset:p,__staticSelector:m,attributes:h,...g}=t,_=Jn({name:m,classes:Zm,props:t,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:h,vars:s,varsResolver:rh});return(0,G.jsx)(Ym,{value:{yOffset:c,scrollAreaComponent:l,getStyles:_,fullScreen:d},children:(0,G.jsx)(Bu,{..._(`root`),"data-full-screen":d||void 0,"data-centered":f||void 0,"data-offset-scrollbars":l===rc.Autosize||void 0,unstyled:o,...g})})});ih.classes=Zm,ih.varsResolver=rh,ih.displayName=`@mantine/core/ModalRoot`;var ah=(0,w.createContext)(null);function oh({children:e}){let[t,n]=(0,w.useState)([]),[r,i]=(0,w.useState)(N(`modal`));return(0,G.jsx)(ah,{value:{stack:t,addModal:(e,t)=>{n(t=>[...new Set([...t,e])]),i(e=>typeof t==`number`&&typeof e==`number`?Math.max(e,t):e)},removeModal:e=>n(t=>t.filter(t=>t!==e)),getZIndex:e=>`calc(${r} + ${t.indexOf(e)} + 1)`,currentId:t[t.length-1],maxZIndex:r},children:e})}oh.displayName=`@mantine/core/ModalStack`;var sh=q(e=>{let{classNames:t,className:n,style:r,styles:i,vars:a,...o}=K(`ModalTitle`,null,e);return(0,G.jsx)(Zu,{...Xm().getStyles(`title`,{classNames:t,style:r,styles:i,className:n}),...o})});sh.classes=Zm,sh.displayName=`@mantine/core/ModalTitle`;var ch={closeOnClickOutside:!0,withinPortal:!0,lockScroll:!0,trapFocus:!0,returnFocus:!0,closeOnEscape:!0,keepMounted:!1,zIndex:N(`modal`),transitionProps:{duration:200,transition:`fade-down`},withOverlay:!0,withCloseButton:!0},lh=q(e=>{let{title:t,withOverlay:n,overlayProps:r,withCloseButton:i,closeButtonProps:a,children:o,radius:s,opened:c,stackId:l,zIndex:u,...d}=K(`Modal`,ch,e),f=(0,w.use)(ah),p=!!t||i,m=f&&l?{closeOnEscape:f.currentId===l,trapFocus:f.currentId===l,zIndex:f.getZIndex(l)}:{},h=n===!1?!1:l&&f?f.currentId===l:c;return(0,w.useEffect)(()=>{f&&l&&(c?f.addModal(l,u||N(`modal`)):f.removeModal(l))},[c,l,u]),(0,G.jsxs)(ih,{radius:s,opened:c,zIndex:f&&l?f.getZIndex(l):u,...d,...m,children:[n&&(0,G.jsx)(nh,{visible:h,transitionProps:f&&l?{duration:0}:void 0,...r}),(0,G.jsxs)(eh,{radius:s,__hidden:f&&l&&c?l!==f.currentId:!1,children:[p&&(0,G.jsxs)(th,{children:[t&&(0,G.jsx)(sh,{children:t}),i&&(0,G.jsx)($m,{...a})]}),(0,G.jsx)(Qm,{children:o})]})]})});lh.classes=Zm,lh.displayName=`@mantine/core/Modal`,lh.Root=ih,lh.Overlay=nh,lh.Content=eh,lh.Body=Qm,lh.Header=th,lh.Title=sh,lh.CloseButton=$m,lh.Stack=oh;var uh=(0,w.createContext)(null),dh={root:`m_7cda1cd6`,"root--default":`m_44da308b`,"root--contrast":`m_e3a01f8`,label:`m_1e0e6180`,remove:`m_ae386778`,group:`m_1dcfd90b`},fh=(0,w.createContext)(null),ph=mt((e,{gap:t},{size:n})=>({group:{"--pg-gap":t===void 0?I(n,`pg-gap`):I(t)}})),mh=q(e=>{let t=K(`PillGroup`,null,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,size:c,disabled:l,attributes:u,...d}=t,f=(0,w.use)(uh)?.size||c||void 0,p=Jn({name:`PillGroup`,classes:dh,props:t,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:u,vars:s,varsResolver:ph,stylesCtx:{size:f},rootSelector:`group`});return(0,G.jsx)(fh,{value:{size:f,disabled:l},children:(0,G.jsx)(J,{size:f,...p(`group`),...d})})});mh.classes=dh,mh.varsResolver=ph,mh.displayName=`@mantine/core/PillGroup`;var hh={variant:`default`},gh=mt((e,{radius:t},{size:n})=>({root:{"--pill-fz":I(n,`pill-fz`),"--pill-height":I(n,`pill-height`),"--pill-radius":t===void 0?void 0:R(t)}})),_h=q(e=>{let t=K(`Pill`,hh,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,variant:c,children:l,withRemoveButton:u,onRemove:d,removeButtonProps:f,radius:p,size:m,disabled:h,mod:g,attributes:_,...v}=t,y=(0,w.use)(fh),b=(0,w.use)(uh),x=m||y?.size||void 0,S=b?.variant===`filled`?`contrast`:c||`default`,C=Jn({name:`Pill`,classes:dh,props:t,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:_,vars:s,varsResolver:gh,stylesCtx:{size:x}});return(0,G.jsxs)(J,{component:`span`,variant:S,size:x,...C(`root`,{variant:S}),mod:[{"with-remove":u&&!h,disabled:h||y?.disabled},g],...v,children:[(0,G.jsx)(`span`,{...C(`label`),children:l}),u&&(0,G.jsx)(xl,{variant:`transparent`,radius:p,tabIndex:-1,"aria-hidden":!0,unstyled:o,...f,...C(`remove`,{className:f?.className,style:f?.style}),onMouseDown:e=>{e.preventDefault(),e.stopPropagation(),f?.onMouseDown?.(e)},onClick:e=>{e.stopPropagation(),d?.(),f?.onClick?.(e)}})]})});_h.classes=dh,_h.varsResolver=gh,_h.displayName=`@mantine/core/Pill`,_h.Group=mh;var vh={field:`m_45c4369d`},yh={type:`visible`},bh=q(e=>{let t=K(`PillsInputField`,yh,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,type:c,disabled:l,id:u,pointer:d,mod:f,attributes:p,ref:m,...h}=t,g=(0,w.use)(uh),_=(0,w.use)(rd),v=Jn({name:`PillsInputField`,classes:vh,props:t,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:p,rootSelector:`field`}),y=l||g?.disabled;return(0,G.jsx)(J,{component:`input`,ref:je(m,g?.fieldRef),"data-type":c,disabled:y,mod:[{disabled:y,pointer:d},f],...v(`field`),...h,id:_?.inputId||u,"aria-invalid":g?.hasError,"aria-describedby":_?.describedBy,type:`text`,onMouseDown:e=>!d&&e.stopPropagation()})});bh.classes=vh,bh.displayName=`@mantine/core/PillsInputField`;var xh={size:`sm`},Sh=q(e=>{let{children:t,onMouseDown:n,onClick:r,size:i,disabled:a,__staticSelector:o,error:s,variant:c,...l}=K([`Input`,`InputWrapper`,`PillsInput`],xh,e),u=(0,w.useRef)(null);return(0,G.jsx)(uh,{value:{fieldRef:u,size:i,disabled:a,hasError:!!s,variant:c},children:(0,G.jsx)(wd,{size:i,error:s,variant:c,component:`div`,"data-no-overflow":!0,onMouseDown:e=>{e.preventDefault(),n?.(e),u.current?.focus()},onClick:e=>{e.preventDefault(),e.currentTarget.closest(`fieldset`)?.disabled||(u.current?.focus(),r?.(e))},...l,multiline:!0,disabled:a,__staticSelector:o||`PillsInput`,withAria:!1,children:t})})});Sh.displayName=`@mantine/core/PillsInput`,Sh.classes=wd.classes,Sh.Field=bh;function Ch(e){return typeof e==`string`?e.trim().toLowerCase():e}function wh({data:e,value:t}){let n=t.map(Ch);return e.reduce((e,t)=>(Zf(t)?e.push({group:t.group,items:t.items.filter(e=>n.indexOf(Ch(e.value))===-1)}):n.indexOf(Ch(t.value))===-1&&e.push(t),e),[])}var Th={xs:41,sm:50,md:60,lg:72,xl:89},Eh={maxValues:1/0,withCheckIcon:!0,checkIconPosition:`left`,hiddenInputValuesDivider:`,`,clearSearchOnChange:!0,openOnFocus:!0,size:`sm`},Dh=kr(e=>{let t=K([`Input`,`InputWrapper`,`MultiSelect`],Eh,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,size:c,value:l,defaultValue:u,onChange:d,onKeyDown:f,variant:p,data:m,dropdownOpened:h,defaultDropdownOpened:g,onDropdownOpen:_,onDropdownClose:v,selectFirstOptionOnChange:y,selectFirstOptionOnDropdownOpen:b,onOptionSubmit:x,comboboxProps:S,filter:C,limit:T,withScrollArea:E,maxDropdownHeight:D,floatingHeight:O,searchValue:k,defaultSearchValue:A,onSearchChange:j,readOnly:M,disabled:N,onFocus:P,onBlur:F,radius:I,rightSection:L,rightSectionWidth:R,rightSectionPointerEvents:z,rightSectionProps:B,leftSection:V,leftSectionWidth:H,leftSectionPointerEvents:ee,leftSectionProps:te,inputContainer:U,inputWrapperOrder:ne,withAsterisk:re,labelProps:ie,descriptionProps:ae,errorProps:oe,successProps:se,wrapperProps:ce,description:le,label:W,error:ue,success:de,maxValues:fe,searchable:pe,nothingFoundMessage:me,withCheckIcon:he,withAlignedLabels:ge,checkIconPosition:_e,hidePickedOptions:ve,withErrorStyles:ye,withSuccessStyles:be,name:xe,form:Se,id:Ce,clearable:we,clearSectionMode:Te,clearButtonProps:Ee,hiddenInputProps:Oe,placeholder:ke,hiddenInputValuesDivider:Ae,required:je,mod:Ne,renderOption:Pe,renderPill:Fe,onRemove:Ie,onClear:Le,onMaxValues:Re,scrollAreaProps:ze,chevronColor:Be,attributes:Ve,clearSearchOnChange:He,openOnFocus:Ue,loading:We,loadingPosition:Ge,withPillsReorder:Ke,...qe}=t,Je=De(Ce),Ye=pf(m),Xe=mf(Ye),Ze=(0,w.useRef)({}),Qe=Hf({opened:h,defaultOpened:g,onDropdownOpen:()=>{_?.(),b&&Qe.selectFirstOption()},onDropdownClose:()=>{v?.(),Qe.resetSelectedOption()}}),{styleProps:$e,rest:{type:et,autoComplete:tt,...nt}}=tr(qe),[rt,it]=Me({value:l,defaultValue:u,finalValue:[],onChange:d}),{getPillProps:at,getListProps:ot,handleInputKeyDown:st}=sp({value:rt,onChange:it,enabled:Ke&&!N&&!M}),[ct,lt]=Me({value:k,defaultValue:A,finalValue:``,onChange:j}),ut=e=>{lt(e),Qe.resetSelectedOption()},dt=Jn({name:`MultiSelect`,classes:{},props:t,classNames:n,styles:a,unstyled:o,attributes:Ve}),{resolvedClassNames:ft,resolvedStyles:pt}=Pn({props:t,styles:a,classNames:n}),mt=e=>{f?.(e),!e.defaultPrevented&&(e.key===` `&&!pe&&(e.preventDefault(),Qe.toggleDropdown()),e.key===`Backspace`&&ct.length===0&&rt.length>0&&(Ie?.(rt[rt.length-1]),it(rt.slice(0,rt.length-1))),st(e))},ht=rt.map((e,t)=>{let n=Xe[`${e}`]||Ze.current[`${e}`],r=at(t);return Fe?(0,G.jsx)(w.Fragment,{children:Fe({option:n,value:e,onRemove:()=>{it(rt.filter(t=>e!==t)),Ie?.(e)},disabled:N,reorderProps:r})},`${e}-${t}`):(0,G.jsx)(_h,{withRemoveButton:!M&&!Xe[`${e}`]?.disabled,onRemove:()=>{it(rt.filter(t=>e!==t)),Ie?.(e)},unstyled:o,disabled:N,...dt(`pill`),...r,children:n?.label||e},`${e}-${t}`)});(0,w.useEffect)(()=>{y&&Qe.selectFirstOption()},[y,ct]),(0,w.useEffect)(()=>{rt.forEach(e=>{`${e}`in Xe&&(Ze.current[`${e}`]=Xe[`${e}`])})},[Xe,rt]);let gt=(0,G.jsx)(Gf.ClearButton,{...Ee,onClear:()=>{Le?.(),it([]),ut(``)}}),_t=wh({data:Ye,value:rt}),vt=we&&rt.length>0&&!N&&!M,yt=vt?{paddingInlineEnd:Th[c]??Th.sm}:void 0;return(0,G.jsxs)(G.Fragment,{children:[(0,G.jsxs)(Gf,{store:Qe,classNames:ft,styles:pt,unstyled:o,size:c,readOnly:M,__staticSelector:`MultiSelect`,attributes:Ve,floatingHeight:O,onOptionSubmit:e=>{x?.(e),He&&ut(``),Qe.updateSelectedOptionIndex(`selected`),rt.includes(Xe[`${e}`].value)?(it(rt.filter(t=>t!==Xe[`${e}`].value)),Ie?.(Xe[`${e}`].value)):rt.length<fe?it([...rt,Xe[`${e}`].value]):Re?.()},...S,children:[(0,G.jsx)(Gf.DropdownTarget,{children:(0,G.jsx)(Sh,{...$e,__staticSelector:`MultiSelect`,classNames:ft,styles:pt,unstyled:o,size:c,className:r,style:i,variant:p,disabled:N,radius:I,__defaultRightSection:(0,G.jsx)(Gf.Chevron,{size:c,error:ue,unstyled:o,color:Be}),__clearSection:gt,__clearable:vt,__clearSectionMode:Te,rightSection:L,rightSectionPointerEvents:z||`none`,rightSectionWidth:R,rightSectionProps:B,leftSection:V,leftSectionWidth:H,leftSectionPointerEvents:ee,leftSectionProps:te,loading:We,loadingPosition:Ge,inputContainer:U,inputWrapperOrder:ne,withAsterisk:re,labelProps:ie,descriptionProps:ae,errorProps:oe,successProps:se,wrapperProps:ce,description:le,label:W,error:ue,success:de,withErrorStyles:ye,withSuccessStyles:be,__stylesApiProps:{...t,rightSectionPointerEvents:z||`none`,multiline:!0},pointer:!pe,onClick:()=>pe?Qe.openDropdown():Qe.toggleDropdown(),"data-expanded":Qe.dropdownOpened||void 0,id:Je,required:je,mod:Ne,attributes:Ve,children:(0,G.jsxs)(_h.Group,{attributes:Ve,disabled:N,unstyled:o,...dt(`pillsList`,{style:yt}),...ot(),children:[ht,(0,G.jsx)(Gf.EventsTarget,{autoComplete:tt,withExpandedAttribute:!0,children:(0,G.jsx)(Sh.Field,{...nt,id:Je,placeholder:ke,type:!pe&&!ke?`hidden`:`visible`,...dt(`inputField`),unstyled:o,onFocus:e=>{P?.(e),Ue&&pe&&Qe.openDropdown()},onBlur:e=>{F?.(e),Qe.closeDropdown(),ut(``)},onKeyDown:mt,value:ct,onChange:e=>{ut(e.currentTarget.value),pe&&Qe.openDropdown(),y&&Qe.selectFirstOption()},disabled:N,readOnly:M||!pe,pointer:!pe})})]})})}),(0,G.jsx)(rp,{data:ve?_t:Ye,hidden:M||N,filter:C,search:ct,limit:T,hiddenWhenEmpty:!me,withScrollArea:E,maxDropdownHeight:D,filterOptions:pe,value:rt,checkIconPosition:_e,withCheckIcon:he,withAlignedLabels:ge,nothingFoundMessage:me,unstyled:o,labelId:W?`${Je}-label`:void 0,"aria-label":W?void 0:qe[`aria-label`],renderOption:Pe,scrollAreaProps:ze})]}),(0,G.jsx)(Gf.HiddenInput,{name:xe,valuesDivider:Ae,value:rt,form:Se,disabled:N,...Oe})]})});Dh.classes={...wd.classes,...Gf.classes},Dh.displayName=`@mantine/core/MultiSelect`;var Oh={root:`m_f0824112`,description:`m_57492dcc`,section:`m_690090b5`,label:`m_1f6ac4c4`,body:`m_f07af9d2`,children:`m_e17b862f`,chevron:`m_1fd8a00b`},kh=mt((e,{variant:t,color:n,childrenOffset:r,autoContrast:i})=>{let a=e.variantColorResolver({color:n||e.primaryColor,theme:e,variant:t||`light`,autoContrast:i});return{root:{"--nl-bg":n||t?a.background:void 0,"--nl-hover":n||t?a.hover:void 0,"--nl-color":n||t?a.color:void 0},children:{"--nl-offset":L(r)}}}),Ah=Ar(e=>{let t=K(`NavLink`,null,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,opened:c,defaultOpened:l,onChange:u,children:d,active:f,disabled:p,leftSection:m,rightSection:h,label:g,description:_,disableRightSectionRotation:v,noWrap:y,childrenOffset:b,autoContrast:x,mod:S,attributes:C,onClick:w,onKeyDown:T,keepMounted:E,...D}=t,O=Jn({name:`NavLink`,props:t,classes:Oh,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:C,vars:s,varsResolver:kh}),[k,A]=Me({value:c,defaultValue:l,finalValue:!1,onChange:u}),j=!!d,M=e=>{w?.(e),j&&(e.preventDefault(),A(!k))};return(0,G.jsxs)(G.Fragment,{children:[(0,G.jsxs)(sc,{...O(`root`),component:`a`,onClick:M,onKeyDown:e=>{T?.(e),e.nativeEvent.code===`Space`&&j&&(e.preventDefault(),A(!k))},unstyled:o,mod:[{disabled:p,active:f,expanded:k},S],...D,children:[m&&(0,G.jsx)(J,{component:`span`,...O(`section`),mod:{position:`left`},children:m}),(0,G.jsxs)(J,{...O(`body`),mod:{"no-wrap":y},children:[(0,G.jsx)(J,{component:`span`,...O(`label`),children:g}),(0,G.jsx)(J,{component:`span`,mod:{active:f},...O(`description`),children:_})]}),(j||h!==void 0)&&(0,G.jsx)(J,{...O(`section`),component:`span`,mod:{rotate:k&&!v,position:`right`},children:j&&h===void 0?(0,G.jsx)(Ad,{...O(`chevron`)}):h})]}),j&&(0,G.jsx)(Br,{expanded:k,keepMounted:E,...O(`collapse`),children:(0,G.jsx)(`div`,{...O(`children`),children:d})})]})});Ah.classes=Oh,Ah.varsResolver=kh,Ah.displayName=`@mantine/core/NavLink`;var jh={root:`m_a513464`,icon:`m_a4ceffb`,loader:`m_b0920b15`,body:`m_a49ed24`,title:`m_3feedf16`,description:`m_3d733a3a`,closeButton:`m_919a4d88`},Mh={withCloseButton:!0},Nh=mt((e,{radius:t,color:n})=>({root:{"--notification-radius":t===void 0?void 0:R(t),"--notification-color":n?Pt(n,e):void 0}})),Ph=q(e=>{let t=K(`Notification`,Mh,e),{className:n,color:r,radius:i,loading:a,withCloseButton:o,withBorder:s,title:c,icon:l,children:u,onClose:d,closeButtonProps:f,classNames:p,style:m,styles:h,unstyled:g,vars:_,mod:v,loaderProps:y,role:b,attributes:x,...S}=t,C=Jn({name:`Notification`,classes:jh,props:t,className:n,style:m,classNames:p,styles:h,unstyled:g,attributes:x,vars:_,varsResolver:Nh});return(0,G.jsxs)(J,{...C(`root`),mod:[{"data-with-icon":!!l||a,"data-with-border":s},v],role:b||`alert`,...S,children:[l&&!a&&(0,G.jsx)(`div`,{...C(`icon`),children:l}),a&&(0,G.jsx)(cl,{size:28,color:r,...C(`loader`),...y}),(0,G.jsxs)(`div`,{...C(`body`),children:[c&&(0,G.jsx)(`div`,{...C(`title`),children:c}),(0,G.jsx)(J,{...C(`description`),mod:{"data-with-title":!!c},children:u})]}),o&&(0,G.jsx)(xl,{iconSize:16,color:`gray`,...f,unstyled:g,onClick:e=>{f?.onClick?.(e),d?.()},...C(`closeButton`)})]})});Ph.classes=jh,Ph.varsResolver=Nh,Ph.displayName=`@mantine/core/Notification`;function Fh(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols==`function`)for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n}var Ih;(function(e){e.event=`event`,e.props=`prop`})(Ih||={});function Lh(){}function Rh(e){var t,n=void 0;return function(){for(var r=[],i=arguments.length;i--;)r[i]=arguments[i];return t&&r.length===t.length&&r.every(function(e,n){return e===t[n]})?n:(t=r,n=e.apply(void 0,r),n)}}function zh(e){return!!(e||``).match(/\d/)}function Bh(e){return e==null}function Vh(e){return typeof e==`number`&&isNaN(e)}function Hh(e){return Bh(e)||Vh(e)||typeof e==`number`&&!isFinite(e)}function Uh(e){return e.replace(/[-[\]/{}()*+?.\\^$|]/g,`\\$&`)}function Wh(e){switch(e){case`lakh`:return/(\d+?)(?=(\d\d)+(\d)(?!\d))(\.\d+)?/g;case`wan`:return/(\d)(?=(\d{4})+(?!\d))/g;default:return/(\d)(?=(\d{3})+(?!\d))/g}}function Gh(e,t,n){var r=Wh(n),i=e.search(/[1-9]/);return i=i===-1?e.length:i,e.substring(0,i)+e.substring(i,e.length).replace(r,`$1`+t)}function Kh(e){var t=(0,w.useRef)(e);return t.current=e,(0,w.useRef)(function(){for(var e=[],n=arguments.length;n--;)e[n]=arguments[n];return t.current.apply(t,e)}).current}function qh(e,t){t===void 0&&(t=!0);var n=e[0]===`-`,r=n&&t;e=e.replace(`-`,``);var i=e.split(`.`);return{beforeDecimal:i[0],afterDecimal:i[1]||``,hasNegation:n,addNegation:r}}function Jh(e){if(!e)return e;var t=e[0]===`-`;t&&(e=e.substring(1,e.length));var n=e.split(`.`),r=n[0].replace(/^0+/,``)||`0`,i=n[1]||``;return(t?`-`:``)+r+(i?`.`+i:``)}function Yh(e,t,n){for(var r=``,i=n?`0`:``,a=0;a<=t-1;a++)r+=e[a]||i;return r}function Xh(e,t){return Array(t+1).join(e)}function Zh(e){var t=e+``,n=t[0]===`-`?`-`:``;n&&(t=t.substring(1));var r=t.split(/[eE]/g),i=r[0],a=r[1];if(a=Number(a),!a)return n+i;i=i.replace(`.`,``);var o=1+a,s=i.length;return o<0?i=`0.`+Xh(`0`,Math.abs(o))+i:o>=s?i+=Xh(`0`,o-s):i=(i.substring(0,o)||`0`)+`.`+i.substring(o),n+i}function Qh(e,t,n){if([``,`-`].indexOf(e)!==-1)return e;var r=(e.indexOf(`.`)!==-1||n)&&t,i=qh(e),a=i.beforeDecimal,o=i.afterDecimal,s=i.hasNegation,c=parseFloat(`0.`+(o||`0`)),l=(o.length<=t?`0.`+o:c.toFixed(t)).split(`.`),u=a;a&&Number(l[0])&&(u=a.split(``).reverse().reduce(function(e,t,n){return e.length>n?(Number(e[0])+Number(t)).toString()+e.substring(1,e.length):t+e},l[0]));var d=Yh(l[1]||``,t,n),f=s?`-`:``,p=r?`.`:``;return``+f+u+p+d}function $h(e,t){if(e.value=e.value,e!==null){if(e.createTextRange){var n=e.createTextRange();return n.move(`character`,t),n.select(),!0}return e.selectionStart||e.selectionStart===0?(e.focus(),e.setSelectionRange(t,t),!0):(e.focus(),!1)}}var eg=Rh(function(e,t){for(var n=0,r=0,i=e.length,a=t.length;e[n]===t[n]&&n<i;)n++;for(;e[i-1-r]===t[a-1-r]&&a-r>n&&i-r>n;)r++;return{from:{start:n,end:i-r},to:{start:n,end:a-r}}}),tg=function(e,t){var n=Math.min(e.selectionStart,t);return{from:{start:n,end:e.selectionEnd},to:{start:n,end:t}}};function ng(e,t,n){return Math.min(Math.max(e,t),n)}function rg(e){return Math.max(e.selectionStart,e.selectionEnd)}function ig(){return typeof navigator<`u`&&!(navigator.platform&&/iPhone|iPod/.test(navigator.platform))}function ag(e){return{from:{start:0,end:0},to:{start:0,end:e.length},lastValue:``}}function og(e){var t=e.currentValue,n=e.formattedValue,r=e.currentValueIndex,i=e.formattedValueIndex;return t[r]===n[i]}function sg(e,t,n,r,i,a,o){o===void 0&&(o=og);var s=i.findIndex(function(e){return e}),c=e.slice(0,s);!t&&!n.startsWith(c)&&(t=c,n=c+n,r+=c.length);for(var l=n.length,u=e.length,d={},f=Array(l),p=0;p<l;p++){f[p]=-1;for(var m=0,h=u;m<h;m++)if(o({currentValue:n,lastValue:t,formattedValue:e,currentValueIndex:p,formattedValueIndex:m})&&d[m]!==!0){f[p]=m,d[m]=!0;break}}for(var g=r;g<l&&(f[g]===-1||!a(n[g]));)g++;var _=g===l||f[g]===-1?u:f[g];for(g=r-1;g>0&&f[g]===-1;)g--;var v=g===-1||f[g]===-1?0:f[g]+1;return v>_?_:r-v<_-r?v:_}function cg(e,t,n,r){var i=e.length;if(t=ng(t,0,i),r===`left`){for(;t>=0&&!n[t];)t--;t===-1&&(t=n.indexOf(!0))}else{for(;t<=i&&!n[t];)t++;t>i&&(t=n.lastIndexOf(!0))}return t===-1&&(t=i),t}function lg(e){for(var t=Array.from({length:e.length+1}).map(function(){return!0}),n=0,r=t.length;n<r;n++)t[n]=!!(zh(e[n])||zh(e[n-1]));return t}function ug(e,t,n,r,i,a){a===void 0&&(a=Lh);var o=Kh(function(e,t){var n,a;return Hh(e)?(a=``,n=``):typeof e==`number`||t?(a=typeof e==`number`?Zh(e):e,n=r(a)):(a=i(e,void 0),n=r(a)),{formattedValue:n,numAsString:a}}),s=(0,w.useState)(function(){return o(Bh(e)?t:e,n)}),c=s[0],l=s[1],u=Kh(function(e,t){e.formattedValue!==c.formattedValue&&l({formattedValue:e.formattedValue,numAsString:e.value}),a(e,t)}),d=e,f=n;Bh(e)&&(d=c.numAsString,f=!0);var p=o(d,f);return(0,w.useMemo)(function(){l(p)},[p.formattedValue]),(0,w.useEffect)(function(){if(!Bh(t)&&Bh(e)&&c.formattedValue!==``){var n=parseFloat(c.numAsString);u({formattedValue:c.formattedValue,value:c.numAsString,floatValue:isNaN(n)?void 0:n},{event:void 0,source:Ih.props})}},[]),[c,u]}function dg(e){return e.replace(/[^0-9]/g,``)}function fg(e){return e}function pg(e){var t=e.type;t===void 0&&(t=`text`);var n=e.displayType;n===void 0&&(n=`input`);var r=e.customInput,i=e.renderText,a=e.getInputRef,o=e.format;o===void 0&&(o=fg);var s=e.removeFormatting;s===void 0&&(s=dg);var c=e.defaultValue,l=e.valueIsNumericString,u=e.onValueChange,d=e.isAllowed,f=e.onChange;f===void 0&&(f=Lh);var p=e.onKeyDown;p===void 0&&(p=Lh);var m=e.onMouseUp;m===void 0&&(m=Lh);var h=e.onFocus;h===void 0&&(h=Lh);var g=e.onBlur;g===void 0&&(g=Lh);var _=e.value,v=e.getCaretBoundary;v===void 0&&(v=lg);var y=e.isValidInputCharacter;y===void 0&&(y=zh);var b=e.isCharacterSame,x=Fh(e,[`type`,`displayType`,`customInput`,`renderText`,`getInputRef`,`format`,`removeFormatting`,`defaultValue`,`valueIsNumericString`,`onValueChange`,`isAllowed`,`onChange`,`onKeyDown`,`onMouseUp`,`onFocus`,`onBlur`,`value`,`getCaretBoundary`,`isValidInputCharacter`,`isCharacterSame`]),S=ug(_,c,!!l,o,s,u),C=S[0],T=C.formattedValue,E=C.numAsString,D=S[1],O=(0,w.useRef)(),k=(0,w.useRef)({formattedValue:T,numAsString:E}),A=function(e,t){k.current={formattedValue:e.formattedValue,numAsString:e.value},D(e,t)},j=(0,w.useState)(!1),M=j[0],N=j[1],P=(0,w.useRef)(null),F=(0,w.useRef)({setCaretTimeout:null,focusTimeout:null});(0,w.useEffect)(function(){return N(!0),function(){clearTimeout(F.current.setCaretTimeout),clearTimeout(F.current.focusTimeout)}},[]);var I=o,L=function(e,t){var n=parseFloat(t);return{formattedValue:e,value:t,floatValue:isNaN(n)?void 0:n}},R=function(e,t,n){(e.selectionStart!==0||e.selectionEnd!==e.value.length)&&($h(e,t),F.current.setCaretTimeout=setTimeout(function(){e.value===n&&e.selectionStart!==t&&$h(e,t)},0))},z=function(e,t,n){return cg(e,t,v(e),n)},B=function(e,t,n){var r=v(t),i=sg(t,T,e,n,r,y,b);return i=cg(t,i,r),i},V=function(e){var t=e.formattedValue;t===void 0&&(t=``);var n=e.input,r=e.source,i=e.event,a=e.numAsString,o;if(n){var s=e.inputValue||n.value,c=rg(n);n.value=t,o=B(s,t,c),o!==void 0&&R(n,o,t)}t!==T&&A(L(t,a),{event:i,source:r})};(0,w.useEffect)(function(){var e=k.current,t=e.formattedValue,n=e.numAsString;(T!==t||E!==n)&&A(L(T,E),{event:void 0,source:Ih.props})},[T,E]);var H=P.current?rg(P.current):void 0;(typeof window<`u`?w.useLayoutEffect:w.useEffect)(function(){var e=P.current;if(T!==k.current.formattedValue&&e){var t=B(k.current.formattedValue,T,H);e.value=T,R(e,t,T)}},[T]);var ee=function(e,t,n){var r=t.target,i=O.current?tg(O.current,r.selectionEnd):eg(T,e),a=Object.assign(Object.assign({},i),{lastValue:T}),o=s(e,a),c=I(o);if(o=s(c,void 0),d&&!d(L(c,o))){var l=t.target,u=B(e,T,rg(l));return l.value=T,R(l,u,T),!1}return V({formattedValue:c,numAsString:o,inputValue:e,event:t,source:n,input:t.target}),!0},te=function(e,t){t===void 0&&(t=0),O.current={selectionStart:e.selectionStart,selectionEnd:e.selectionEnd+t}},U=function(e){var t=e.target.value;ee(t,e,Ih.event)&&f(e),O.current=void 0},ne=function(e){var t=e.target,n=e.key,r=t.selectionStart,i=t.selectionEnd,a=t.value;a===void 0&&(a=``);var o;n===`ArrowLeft`||n===`Backspace`?o=Math.max(r-1,0):n===`ArrowRight`?o=Math.min(r+1,a.length):n===`Delete`&&(o=r);var s=0;n===`Delete`&&r===i&&(s=1);var c=n===`ArrowLeft`||n===`ArrowRight`;if(o===void 0||r!==i&&!c){p(e),te(t,s);return}var l=o;c?(l=z(a,o,n===`ArrowLeft`?`left`:`right`),l!==o&&e.preventDefault()):n===`Delete`&&!y(a[o])?l=z(a,o,`right`):n===`Backspace`&&!y(a[o])&&(l=z(a,o,`left`)),l!==o&&R(t,l,a),p(e),te(t,s)},re=function(e){var t=e.target,n=function(){var e=t.selectionStart,n=t.selectionEnd,r=t.value;if(r===void 0&&(r=``),e===n){var i=z(r,e);i!==e&&R(t,i,r)}};n(),requestAnimationFrame(function(){n()}),m(e),te(t)},ie=function(e){e.persist&&e.persist();var t=e.target,n=e.currentTarget;P.current=t,F.current.focusTimeout=setTimeout(function(){var r=t.selectionStart,i=t.selectionEnd,a=t.value;a===void 0&&(a=``);var o=z(a,r);o!==r&&(r!==0||i!==a.length)&&R(t,o,a),h(Object.assign(Object.assign({},e),{currentTarget:n}))},0)},ae=function(e){P.current=null,clearTimeout(F.current.focusTimeout),clearTimeout(F.current.setCaretTimeout),g(e)},oe=M&&ig()?`numeric`:void 0,se=Object.assign({inputMode:oe},x,{type:t,value:T,onChange:U,onKeyDown:ne,onMouseUp:re,onFocus:ie,onBlur:ae});if(n===`text`)return i?w.createElement(w.Fragment,null,i(T,x)||null):w.createElement(`span`,Object.assign({},x,{ref:a}),T);if(r){var ce=r;return w.createElement(ce,Object.assign({},se,{ref:a}))}return w.createElement(`input`,Object.assign({},se,{ref:a}))}function mg(e,t){var n=t.decimalScale,r=t.fixedDecimalScale,i=t.prefix;i===void 0&&(i=``);var a=t.suffix;a===void 0&&(a=``);var o=t.allowNegative,s=t.thousandsGroupStyle;if(s===void 0&&(s=`thousand`),e===``||e===`-`)return e;var c=hg(t),l=c.thousandSeparator,u=c.decimalSeparator,d=n!==0&&e.indexOf(`.`)!==-1||n&&r,f=qh(e,o),p=f.beforeDecimal,m=f.afterDecimal,h=f.addNegation;return n!==void 0&&(m=Yh(m,n,!!r)),l&&(p=Gh(p,l,s)),i&&(p=i+p),a&&(m+=a),h&&(p=`-`+p),e=p+(d&&u||``)+m,e}function hg(e){var t=e.decimalSeparator;t===void 0&&(t=`.`);var n=e.thousandSeparator,r=e.allowedDecimalSeparators;return n===!0&&(n=`,`),r||=[t,`.`],{decimalSeparator:t,thousandSeparator:n,allowedDecimalSeparators:r}}function gg(e,t){e===void 0&&(e=``);var n=RegExp(`(-)`),r=RegExp(`(-)(.)*(-)`),i=n.test(e),a=r.test(e);return e=e.replace(/-/g,``),i&&!a&&t&&(e=`-`+e),e}function _g(e,t){return RegExp(`(^-)|[0-9]|`+Uh(e),t?`g`:void 0)}function vg(e,t,n){return e===``||!t?.match(/\d/)&&!n?.match(/\d/)&&typeof e==`string`&&!isNaN(Number(e))}function yg(e,t,n){var r;t===void 0&&(t=ag(e));var i=n.allowNegative,a=n.prefix;a===void 0&&(a=``);var o=n.suffix;o===void 0&&(o=``);var s=n.decimalScale,c=t.from,l=t.to,u=l.start,d=l.end,f=hg(n),p=f.allowedDecimalSeparators,m=f.decimalSeparator,h=e[d]===m;if(zh(e)&&(e===a||e===o)&&t.lastValue===``)return e;if(d-u===1&&p.indexOf(e[u])!==-1){var g=s===0?``:m;e=e.substring(0,u)+g+e.substring(u+1,e.length)}var _=function(e,t,n){var r=!1,i=!1;a.startsWith(`-`)?r=!1:e.startsWith(`--`)?(r=!1,i=!0):o.startsWith(`-`)&&e.length===o.length?r=!1:e[0]===`-`&&(r=!0);var s=+!!r;return i&&(s=2),s&&(e=e.substring(s),t-=s,n-=s),{value:e,start:t,end:n,hasNegation:r}},v=_(e,u,d),y=v.hasNegation;r=v,e=r.value,u=r.start,d=r.end;var b=_(t.lastValue,c.start,c.end),x=b.start,S=b.end,C=b.value,w=e.substring(u,d);e.length&&C.length&&(x>C.length-o.length||S<a.length)&&!(w&&o.startsWith(w))&&(e=C);var T=0;e.startsWith(a)?T+=a.length:u<a.length&&(T=u),e=e.substring(T),d-=T;var E=e.length,D=e.length-o.length;e.endsWith(o)?E=D:(d>D||d>e.length-o.length)&&(E=d),e=e.substring(0,E),e=gg(y?`-`+e:e,i),e=(e.match(_g(m,!0))||[]).join(``);var O=e.indexOf(m);e=e.replace(new RegExp(Uh(m),`g`),function(e,t){return t===O?`.`:``});var k=qh(e,i),A=k.beforeDecimal,j=k.afterDecimal,M=k.addNegation;return l.end-l.start<c.end-c.start&&A===``&&h&&!parseFloat(j)&&(e=M?`-`:``),e}function bg(e,t){var n=t.prefix;n===void 0&&(n=``);var r=t.suffix;r===void 0&&(r=``);var i=Array.from({length:e.length+1}).map(function(){return!0}),a=e[0]===`-`;i.fill(!1,0,Math.min(n.length+ +!!a,e.length));var o=e.length;return i.fill(!1,o-r.length+1,o+1),i}function xg(e){var t=hg(e),n=t.thousandSeparator,r=t.decimalSeparator,i=e.prefix;i===void 0&&(i=``);var a=e.allowNegative;if(a===void 0&&(a=!0),n===r)throw Error(`
42
42
  Decimal separator can't be same as thousand separator.
43
43
  thousandSeparator: `+n+` (thousandSeparator = {true} is same as thousandSeparator = ",")
44
44
  decimalSeparator: `+r+` (default value for decimalSeparator is .)
@@ -46,7 +46,7 @@ var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=
46
46
  Prefix can't start with '-' when allowNegative is true.
47
47
  prefix: `+i+`
48
48
  allowNegative: `+a+`
49
- `),a=!1),Object.assign(Object.assign({},e),{allowNegative:a})}function Cg(e){e=Sg(e),e.decimalSeparator,e.allowedDecimalSeparators,e.thousandsGroupStyle;var t=e.suffix,n=e.allowNegative,r=e.allowLeadingZeros,i=e.onKeyDown;i===void 0&&(i=Rh);var a=e.onBlur;a===void 0&&(a=Rh);var o=e.thousandSeparator,s=e.decimalScale,c=e.fixedDecimalScale,l=e.prefix;l===void 0&&(l=``);var u=e.defaultValue,d=e.value,f=e.valueIsNumericString,p=e.onValueChange,m=Ih(e,[`decimalSeparator`,`allowedDecimalSeparators`,`thousandsGroupStyle`,`suffix`,`allowNegative`,`allowLeadingZeros`,`onKeyDown`,`onBlur`,`thousandSeparator`,`decimalScale`,`fixedDecimalScale`,`prefix`,`defaultValue`,`value`,`valueIsNumericString`,`onValueChange`]),h=gg(e),g=h.decimalSeparator,_=h.allowedDecimalSeparators,v=function(t){return hg(t,e)},y=function(t,n){return bg(t,n,e)},b=Vh(d)?u:d,x=f??yg(b,l,t);Vh(d)?Vh(u)||(x||=typeof u==`number`):x||=typeof d==`number`;var S=function(e){return Uh(e)?e:(typeof e==`number`&&(e=Qh(e)),x&&typeof s==`number`?$h(e,s,!!c):e)},C=dg(S(d),S(u),!!x,v,y,p),w=C[0],T=w.numAsString,E=w.formattedValue,D=C[1];return Object.assign(Object.assign({},m),{value:E,valueIsNumericString:!1,isValidInputCharacter:function(e){return e===g||Bh(e)},isCharacterSame:function(e){var t=e.currentValue,n=e.lastValue,r=e.formattedValue,i=e.currentValueIndex,a=e.formattedValueIndex,o=t[i],u=r[a],f=tg(n,t).to,p=function(e){return y(e).indexOf(`.`)+l.length};return d===0&&c&&s&&t[f.start]===g&&p(t)<i&&p(r)>a?!1:i>=f.start&&i<f.end&&_&&_.includes(o)&&u===g?!0:o===u},onValueChange:D,format:v,removeFormatting:y,getCaretBoundary:function(t){return xg(t,e)},onKeyDown:function(e){var t=e.target,r=e.key,a=t.selectionStart,u=t.selectionEnd,d=t.value;if(d===void 0&&(d=``),(r===`Backspace`||r===`Delete`)&&u<l.length&&d!==`-`){e.preventDefault();return}if(a!==u){i(e);return}r===`Backspace`&&d[0]===`-`&&a===l.length+1&&n&&eg(t,1),s&&c&&(r===`Backspace`&&d[a-1]===g?(eg(t,a-1),e.preventDefault()):r===`Delete`&&d[a]===g&&e.preventDefault()),_?.includes(r)&&d[a]===g&&eg(t,a+1);var f=o===!0?`,`:o;r===`Backspace`&&d[a-1]===f&&eg(t,a-1),r===`Delete`&&d[a]===f&&eg(t,a+1),i(e)},onBlur:function(t){var n=T;n.match(/\d/g)||(n=``),r||(n=Yh(n)),c&&s&&(n=$h(n,s,c)),n!==T&&D({formattedValue:hg(n,e),value:n,floatValue:parseFloat(n)},{event:t,source:Lh.event}),a(t)}})}function wg(e){var t=Cg(e);return w.createElement(mg,Object.assign({},t))}function Tg({direction:e,style:t,...n}){return(0,G.jsx)(`svg`,{style:{width:`var(--ni-chevron-size)`,height:`var(--ni-chevron-size)`,transform:e===`up`?`rotate(180deg)`:void 0,...t},viewBox:`0 0 15 15`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,...n,children:(0,G.jsx)(`path`,{d:`M3.13523 6.15803C3.3241 5.95657 3.64052 5.94637 3.84197 6.13523L7.5 9.56464L11.158 6.13523C11.3595 5.94637 11.6759 5.95657 11.8648 6.15803C12.0536 6.35949 12.0434 6.67591 11.842 6.86477L7.84197 10.6148C7.64964 10.7951 7.35036 10.7951 7.15803 10.6148L3.15803 6.86477C2.95657 6.67591 2.94637 6.35949 3.13523 6.15803Z`,fill:`currentColor`,fillRule:`evenodd`,clipRule:`evenodd`})})}var Eg={root:`m_e2f5cd4e`,controls:`m_95e17d22`,control:`m_80b4b171`},Dg=/^(0\.0*|-0(\.0*)?)$/,Og=/^-?0\d+(\.\d+)?\.?$/,kg=/\.\d*0$/,Ag=/^-?\d+\.$/;function jg(e){return typeof e==`string`&&e!==``&&!Number.isNaN(Number(e))}function Mg(e){return typeof e==`bigint`}function Ng(e){return typeof e==`number`?e<2**53-1:e===``||jg(e)&&Number(e)<2**53-1}function Pg(e,t){return e===``||e===`-`||!t&&e.startsWith(`-`)?!1:/^-?\d+$/.test(e)}function Fg(e,t){return typeof e==`bigint`||e===``||Pg(e,t)}function Ig(e){if(!/^-?\d+$/.test(e))return null;try{return BigInt(e)}catch{return null}}function Lg(e){if(typeof e==`bigint`)return e;if(typeof e==`number`&&Number.isFinite(e)&&Number.isInteger(e))return BigInt(e)}function Rg(e,t,n){return t!==void 0&&e<t?t:n!==void 0&&e>n?n:e}function zg(e){return e.toString().replace(`.`,``).length}function Bg(e,t){return(typeof e==`number`?e<2**53-1:!Number.isNaN(Number(e)))&&!Number.isNaN(e)&&zg(t)<14&&t!==``}function Vg(e,t,n){return e===void 0||(t===void 0||e>=t)&&(n===void 0||e<=n)}var Hg={size:`sm`,step:1,clampBehavior:`blur`,allowDecimal:!0,allowNegative:!0,withKeyboardEvents:!0,allowLeadingZeros:!0,trimLeadingZeroesOnBlur:!0,startValue:0,allowedDecimalSeparators:[`.`,`,`]},Ug=mt((e,{size:t})=>({controls:{"--ni-chevron-size":I(t,`ni-chevron-size`)}}));function Wg(e,t,n){let r=e.toString(),i=Ag.test(r),a=r.replace(/^0+(?=\d)/,``),o=parseFloat(a);if(Number.isNaN(o))return a;if(o>2**53-1)return t===void 0?a:t;let s=re(o,n,t);return i?`${s.toString().replace(/^0+(?=\d)/,``)}.`:s}function Gg(e,t){if(e===``||e===`-`)return e;let n=Ig(e);return n===null?e:t.clampBehavior===`blur`?Rg(n,t.min,t.max):n}var Kg=kr(e=>{let t=K([`Input`,`InputWrapper`,`NumberInput`],Hg,e),{className:n,classNames:r,styles:i,unstyled:a,vars:o,onChange:s,onValueChange:c,value:l,defaultValue:u,max:d,min:f,step:p,hideControls:m,rightSection:h,isAllowed:g,clampBehavior:_,onBlur:v,allowDecimal:y,decimalScale:b,onKeyDown:x,onKeyDownCapture:S,handlersRef:C,startValue:T,disabled:E,rightSectionPointerEvents:D,allowNegative:O,readOnly:k,size:A,rightSectionWidth:j,stepHoldInterval:M,stepHoldDelay:N,allowLeadingZeros:F,withKeyboardEvents:I,trimLeadingZeroesOnBlur:L,allowedDecimalSeparators:R,selectAllOnFocus:z,onMinReached:B,onMaxReached:V,onFocus:H,attributes:ee,ref:te,...U}=t,ne=O??!0,ie=F??!0,ae=Jn({name:`NumberInput`,classes:Eg,props:t,classNames:r,styles:i,unstyled:a,attributes:ee,vars:o,varsResolver:Ug}),{resolvedClassNames:oe,resolvedStyles:se}=Pn({classNames:r,styles:i,props:t}),ce=(0,w.useRef)(Mg(l)||Mg(u)?`bigint`:`number`);Mg(l)?ce.current=`bigint`:typeof l==`number`&&(ce.current=`number`);let le=ce.current===`bigint`,[W,ue]=Me({value:l,defaultValue:u,finalValue:``,onChange:s}),de=N!==void 0&&M!==void 0,fe=(0,w.useRef)(null),pe=(0,w.useRef)(null),me=(0,w.useRef)(0),he=typeof f==`number`?f:void 0,ge=typeof d==`number`?d:void 0,_e=typeof p==`number`?p:Hg.step,ve=typeof T==`number`?T:Hg.startValue,ye=Lg(f),be=Lg(d),xe=Lg(p)??BigInt(1),Se=Lg(T)??BigInt(0),Ce=e=>!Pg(e,ne)||ie&&Og.test(e)?e:Ig(e)??e,we=e=>{let t=Number(e);return Number.isSafeInteger(t)?t:void 0},Te=(e,t)=>{t.source===`event`&&ue(le?Ce(e.value):Bg(e.floatValue,e.value)&&!Dg.test(e.value)&&!(ie&&Og.test(e.value))&&!kg.test(e.value)&&!Ag.test(e.value)?e.floatValue:e.value),c?.(e,t)},Ee=e=>{let t=String(e).match(/(?:\.(\d+))?(?:[eE]([+-]?\d+))?$/);return t?Math.max(0,(t[1]?t[1].length:0)-(t[2]?+t[2]:0)):0},De=e=>{fe.current&&e!==void 0&&fe.current.setSelectionRange(e,e)},Oe=(0,w.useRef)(P);Oe.current=()=>{if(le){if(!Fg(W,ne))return;let e,t=W;if(typeof t==`bigint`){let n=t+xe;be!==void 0&&n>be&&V?.(),e=be!==void 0&&n>be?be:n}else if(typeof t==`string`&&t!==``){let n=Ig(t);if(n===null)return;let r=n+xe;be!==void 0&&r>be&&V?.(),e=be!==void 0&&r>be?be:r}else e=Rg(Se,ye,be);let n=e.toString();ue(e),c?.({floatValue:we(e),formattedValue:n,value:n},{source:`increment`}),setTimeout(()=>De(fe.current?.value.length),0);return}if(!Ng(W))return;let e,t=Ee(W),n=Ee(_e),r=Math.max(t,n),i=10**r;if(!jg(W)&&(typeof W!=`number`||Number.isNaN(W)))e=re(ve,he,ge);else if(ge!==void 0){let t=(Math.round(Number(W)*i)+Math.round(_e*i))/i;t>ge&&V?.(),e=t<=ge?t:ge}else e=(Math.round(Number(W)*i)+Math.round(_e*i))/i;let a=e.toFixed(r);ue(parseFloat(a)),c?.({floatValue:parseFloat(a),formattedValue:a,value:a},{source:`increment`}),setTimeout(()=>De(fe.current?.value.length),0)};let Ae=(0,w.useRef)(P);Ae.current=()=>{if(le){if(!Fg(W,ne))return;let e,t=ye===void 0?ne?void 0:BigInt(0):ye,n=W;if(typeof n==`bigint`){let r=n-xe;t!==void 0&&r<t&&B?.(),e=t!==void 0&&r<t?t:r}else if(typeof n==`string`&&n!==``){let r=Ig(n);if(r===null)return;let i=r-xe;t!==void 0&&i<t&&B?.(),e=t!==void 0&&i<t?t:i}else e=Rg(Se,t,be);let r=e.toString();ue(e),c?.({floatValue:we(e),formattedValue:r,value:r},{source:`decrement`}),setTimeout(()=>De(fe.current?.value.length),0);return}if(!Ng(W))return;let e,t=he===void 0?ne?-(2**53-1):0:he,n=Ee(W),r=Ee(_e),i=Math.max(n,r),a=10**i;if(!jg(W)&&typeof W!=`number`||Number.isNaN(W))e=re(ve,t,ge);else{let n=(Math.round(Number(W)*a)-Math.round(_e*a))/a;t!==void 0&&n<t&&B?.(),e=t!==void 0&&n<t?t:n}let o=e.toFixed(i);ue(parseFloat(o)),c?.({floatValue:parseFloat(o),formattedValue:o,value:o},{source:`decrement`}),setTimeout(()=>De(fe.current?.value.length),0)};let Ne=e=>{let t=e.clipboardData.getData(`text`),n=U.decimalSeparator||`.`,r=(R||[`.`,`,`]).filter(e=>e!==n);if(r.some(e=>t.includes(e))){e.preventDefault();let i=t;r.forEach(e=>{i=i.split(e).join(n)});let a=fe.current;if(a){let e=a.selectionStart??0,t=a.selectionEnd??0,n=a.value,r=n.substring(0,e)+i+n.substring(t);(Object.getOwnPropertyDescriptor(window.HTMLInputElement.prototype,`value`)?.set)?.call(a,r),a.dispatchEvent(new Event(`change`,{bubbles:!0}));let o=e+i.length;setTimeout(()=>De(o),0)}}U.onPaste?.(e)},Pe=e=>{x?.(e),!(k||!I)&&(e.key===`ArrowUp`&&(e.preventDefault(),Oe.current?.()),e.key===`ArrowDown`&&(e.preventDefault(),Ae.current?.()))},Fe=e=>{if(S?.(e),e.key===`Backspace`){let t=fe.current;t&&t.selectionStart===0&&t.selectionStart===t.selectionEnd&&(e.preventDefault(),window.setTimeout(()=>De(0),0))}},Ie=e=>{z&&setTimeout(()=>e.currentTarget.select(),0),H?.(e)},Le=e=>{let t=W;le?(_===`blur`&&typeof t==`bigint`&&(t=Rg(t,ye,be)),L&&typeof t==`string`&&(t=Gg(t,{min:ye,max:be,clampBehavior:_}))):(_===`blur`&&typeof t==`number`&&(t=re(t,he,ge)),L&&typeof t==`string`&&Ee(t)<15&&(t=Wg(t,ge,he))),W!==t&&ue(t),v?.(e)};ke(C,{increment:Oe.current,decrement:Ae.current});let Re=e=>{e?Oe.current?.():Ae.current?.(),me.current+=1},ze=e=>{if(Re(e),de){let t=typeof M==`number`?M:M(me.current);pe.current=window.setTimeout(()=>ze(e),t)}},Be=(e,t)=>{e.preventDefault(),fe.current?.focus(),Re(t),de&&(pe.current=window.setTimeout(()=>ze(t),N))},Ve=()=>{pe.current&&window.clearTimeout(pe.current),pe.current=null,me.current=0},He=(0,G.jsxs)(`div`,{...ae(`controls`),children:[(0,G.jsx)(sc,{...ae(`control`),tabIndex:-1,"aria-hidden":!0,disabled:E||typeof W==`number`&&ge!==void 0&&W>=ge||typeof W==`bigint`&&be!==void 0&&W>=be,mod:{direction:`up`},onMouseDown:e=>e.preventDefault(),onPointerDown:e=>{Be(e,!0)},onPointerUp:Ve,onPointerLeave:Ve,children:(0,G.jsx)(Tg,{direction:`up`})}),(0,G.jsx)(sc,{...ae(`control`),tabIndex:-1,"aria-hidden":!0,disabled:E||typeof W==`number`&&he!==void 0&&W<=he||typeof W==`bigint`&&ye!==void 0&&W<=ye,mod:{direction:`down`},onMouseDown:e=>e.preventDefault(),onPointerDown:e=>{Be(e,!1)},onPointerUp:Ve,onPointerLeave:Ve,children:(0,G.jsx)(Tg,{direction:`down`})})]});return(0,G.jsx)(wd,{component:wg,allowNegative:O,className:gt(Eg.root,n),size:A,...U,inputMode:le?`numeric`:`decimal`,readOnly:k,disabled:E,value:typeof W==`bigint`?W.toString():W,getInputRef:je(te,fe),onValueChange:Te,rightSection:m||k||!(le?Fg(W,ne):Ng(W))?h:h||He,classNames:oe,styles:se,unstyled:a,__staticSelector:`NumberInput`,decimalScale:le?0:y?b:0,onPaste:Ne,onFocus:Ie,onKeyDown:Pe,onKeyDownCapture:Fe,rightSectionPointerEvents:D??(E?`none`:void 0),rightSectionWidth:j??`var(--ni-right-section-width-${A||`sm`})`,allowLeadingZeros:F,allowedDecimalSeparators:R,onBlur:Le,attributes:ee,isAllowed:e=>{if(!(!g||g(e)))return!1;if(_!==`strict`)return!0;if(!le)return Vg(e.floatValue,he,ge);if(e.value===``||e.value===`-`)return!0;let t=Ig(e.value);return t===null||(ye===void 0||t>=ye)&&(be===void 0||t<=be)}})});Kg.classes={...wd.classes,...Eg},Kg.varsResolver=Ug,Kg.displayName=`@mantine/core/NumberInput`;function qg({offset:e,position:t,defaultOpened:n}){let[r,i]=(0,w.useState)(n),a=(0,w.useRef)(null),{x:o,y:s,elements:c,refs:l,update:u,placement:d}=Ws({placement:t,middleware:[Qo({crossAxis:!0,padding:5,rootBoundary:`document`})]}),f=d.includes(`right`)?e:t.includes(`left`)?e*-1:0,p=d.includes(`bottom`)?e:t.includes(`top`)?e*-1:0,m=(0,w.useCallback)(({clientX:e,clientY:t})=>{l.setPositionReference({getBoundingClientRect(){return{width:0,height:0,x:e,y:t,left:e+f,top:t+p,right:e,bottom:t}}})},[c.reference]);return(0,w.useEffect)(()=>{if(l.floating.current){let e=a.current;e.addEventListener(`mousemove`,m);let t=Vi(l.floating.current);return t.forEach(e=>{e.addEventListener(`scroll`,u)}),()=>{e.removeEventListener(`mousemove`,m),t.forEach(e=>{e.removeEventListener(`scroll`,u)})}}},[c.reference,l.floating.current,u,m,r]),{handleMouseMove:m,x:o,y:s,opened:r,setOpened:i,boundaryRef:a,floating:l.setFloating}}var Jg={tooltip:`m_1b3c8819`,arrow:`m_f898399f`},Yg={refProp:`ref`,withinPortal:!0,offset:10,position:`right`,zIndex:N(`popover`)},Xg=mt((e,{radius:t,color:n})=>({tooltip:{"--tooltip-radius":t===void 0?void 0:R(t),"--tooltip-bg":n?Pt(n,e):void 0,"--tooltip-color":n?`var(--mantine-color-white)`:void 0}})),Zg=q(e=>{let t=K(`TooltipFloating`,Yg,e),{children:n,refProp:r,withinPortal:i,style:a,className:o,classNames:s,styles:c,unstyled:l,radius:u,color:d,label:f,offset:p,position:m,multiline:h,zIndex:g,disabled:_,defaultOpened:v,variant:y,vars:b,portalProps:x,attributes:S,ref:C,...T}=t,E=vn(),D=Jn({name:`TooltipFloating`,props:t,classes:Jg,className:o,style:a,classNames:s,styles:c,unstyled:l,attributes:S,rootSelector:`tooltip`,vars:b,varsResolver:Xg}),{handleMouseMove:O,x:k,y:A,opened:j,boundaryRef:M,floating:N,setOpened:P}=qg({offset:p,position:m,defaultOpened:v}),F=pt(n);if(!F)throw Error(`[@mantine/core] Tooltip.Floating component children should be an element or a component that accepts ref, fragments, strings, numbers and other primitive values are not supported`);let I=je(M,ct(F),C),L=F.props,R=e=>{L.onMouseEnter?.(e),O(e),P(!0)},z=e=>{L.onMouseLeave?.(e),P(!1)};return(0,G.jsxs)(G.Fragment,{children:[(0,G.jsx)(Ac,{...x,withinPortal:i,children:(0,G.jsx)(J,{...T,...D(`tooltip`,{style:{...Tr(a,E),zIndex:g,display:!_&&j?`block`:`none`,top:(A&&Math.round(A))??``,left:(k&&Math.round(k))??``}}),variant:y,ref:N,mod:{multiline:h},children:f})}),(0,w.cloneElement)(F,{...L,[r]:I,onMouseEnter:R,onMouseLeave:z})]})});Zg.classes=Jg,Zg.varsResolver=Xg,Zg.displayName=`@mantine/core/TooltipFloating`;var Qg=(0,w.createContext)({withinGroup:!1}),eee={openDelay:0,closeDelay:0};function $g(e){let{openDelay:t,closeDelay:n,children:r}=K(`TooltipGroup`,eee,e);return(0,G.jsx)(Qg,{value:{withinGroup:!0},children:(0,G.jsx)(Fs,{delay:{open:t,close:n},children:r})})}$g.displayName=`@mantine/core/TooltipGroup`,$g.extend=e=>e;function tee(e){if(e===void 0)return{shift:!0,flip:!0};let t={...e};return e.shift===void 0&&(t.shift=!0),e.flip===void 0&&(t.flip=!0),t}function e_(e){let t=tee(e.middlewares),n=[Zo(e.offset)];return t.shift&&n.push(Qo(typeof t.shift==`boolean`?{padding:8}:{padding:8,...t.shift})),t.flip&&n.push(typeof t.flip==`boolean`?es():es(t.flip)),n.push(is({element:e.arrowRef,padding:e.arrowOffset})),t.inline?n.push(typeof t.inline==`boolean`?rs():rs(t.inline)):e.inline&&n.push(rs()),n}function t_(e){let[t,n]=(0,w.useState)(e.defaultOpened),r=typeof e.opened==`boolean`?e.opened:t,i=(0,w.use)(Qg).withinGroup,a=De(),o=(0,w.useCallback)(e=>{n(e),e&&g(a)},[a]),{x:s,y:c,context:l,refs:u,placement:d,middlewareData:{arrow:{x:f,y:p}={}}}=Ws({strategy:e.strategy,placement:e.position,open:r,onOpenChange:o,middleware:e_(e),whileElementsMounted:Po}),{delay:m,currentId:h,setCurrentId:g}=Is(l,{id:a}),{getReferenceProps:_,getFloatingProps:v}=Js([js(l,{enabled:e.events?.hover,delay:i?m:{open:e.openDelay,close:e.closeDelay},mouseOnly:!e.events?.touch,handleClose:e.interactive?ec():null}),Ks(l,{enabled:e.events?.focus,visibleOnly:!0}),Xs(l,{role:`tooltip`}),Hs(l,{enabled:e.opened===void 0})]),y=(0,w.useRef)(d);fe(()=>{y.current!==d&&(y.current=d,e.onPositionChange?.(d))},[d]);let b=r&&h&&h!==a;return{x:s,y:c,arrowX:f,arrowY:p,reference:u.setReference,floating:u.setFloating,getFloatingProps:v,getReferenceProps:_,isGroupPhase:b,opened:r,placement:d}}var n_={position:`top`,refProp:`ref`,withinPortal:!0,arrowSize:4,arrowOffset:5,arrowRadius:0,arrowPosition:`side`,offset:5,transitionProps:{duration:100,transition:`fade`},events:{hover:!0,focus:!1,touch:!1},zIndex:N(`popover`),middlewares:{flip:!0,shift:!0,inline:!1}},r_=mt((e,{radius:t,color:n,variant:r,autoContrast:i})=>{let a=e.variantColorResolver({theme:e,color:n||e.primaryColor,autoContrast:i,variant:r||`filled`});return{tooltip:{"--tooltip-radius":t===void 0?void 0:R(t),"--tooltip-bg":n?a.background:void 0,"--tooltip-color":n?a.color:void 0}}}),i_=q(e=>{let t=K(`Tooltip`,n_,e),{children:n,position:r,refProp:i,label:a,openDelay:o,closeDelay:s,onPositionChange:c,opened:l,defaultOpened:u,withinPortal:d,radius:f,color:p,classNames:m,styles:h,unstyled:g,style:_,className:v,withArrow:y,arrowSize:b,arrowOffset:x,arrowRadius:S,arrowPosition:C,offset:T,transitionProps:E,multiline:D,events:O,interactive:k,zIndex:A,disabled:j,onClick:M,onMouseEnter:N,onMouseLeave:P,inline:F,variant:I,keepMounted:L,vars:R,portalProps:z,mod:B,floatingStrategy:V,middlewares:H,autoContrast:ee,attributes:te,target:U,ref:ne,...re}=t,{dir:ie}=Rr(),ae=(0,w.useRef)(null),oe=t_({position:bc(ie,r),closeDelay:s,openDelay:o,onPositionChange:c,opened:l,defaultOpened:u,events:O,interactive:k,arrowRef:ae,arrowOffset:x,offset:typeof T==`number`?T+(y?b/2:0):T,inline:F,strategy:V,middlewares:H});(0,w.useEffect)(()=>{let e=U instanceof HTMLElement?U:typeof U==`string`?document.querySelector(U):U?.current||null;e&&oe.reference(e)},[U,oe]);let se=Jn({name:`Tooltip`,props:t,classes:Jg,className:v,style:_,classNames:m,styles:h,unstyled:g,attributes:te,rootSelector:`tooltip`,vars:R,varsResolver:r_}),ce=pt(n);if(!U&&!ce)throw Error(`[@mantine/core] Tooltip component children should be an element or a component that accepts ref, fragments, strings, numbers and other primitive values are not supported`);let le=se(`tooltip`),W=k&&!j&&!!oe.opened,ue=C===`merge`&&y?vc({position:oe.placement,dir:ie}):void 0;if(U){let e=Rc(E,{duration:100,transition:`fade`});return(0,G.jsx)(G.Fragment,{children:(0,G.jsx)(Ac,{...z,withinPortal:d,children:(0,G.jsx)(Ic,{...e,keepMounted:L,mounted:!j&&!!oe.opened,duration:oe.isGroupPhase?10:e.duration,children:e=>(0,G.jsxs)(J,{...re,"data-fixed":V===`fixed`||void 0,variant:I,mod:[{multiline:D,interactive:W},B],...le,...oe.getFloatingProps({ref:oe.floating,className:le.className,style:{...le.style,...e,...ue,zIndex:A,top:oe.y??0,left:oe.x??0}}),children:[a,(0,G.jsx)(yc,{ref:ae,arrowX:oe.arrowX,arrowY:oe.arrowY,visible:y,position:oe.placement,arrowSize:b,arrowOffset:x,arrowRadius:S,arrowPosition:C,...se(`arrow`)})]})})})})}let de=ce.props,fe=je(oe.reference,ct(ce),ne),pe=Rc(E,{duration:100,transition:`fade`});return(0,G.jsxs)(G.Fragment,{children:[(0,G.jsx)(Ac,{...z,withinPortal:d,children:(0,G.jsx)(Ic,{...pe,keepMounted:L,mounted:!j&&!!oe.opened,duration:oe.isGroupPhase?10:pe.duration,children:e=>(0,G.jsxs)(J,{...re,"data-fixed":V===`fixed`||void 0,variant:I,mod:[{multiline:D,interactive:W},B],...oe.getFloatingProps({ref:oe.floating,className:se(`tooltip`).className,style:{...se(`tooltip`).style,...e,...ue,zIndex:A,top:oe.y??0,left:oe.x??0}}),children:[a,(0,G.jsx)(yc,{ref:ae,arrowX:oe.arrowX,arrowY:oe.arrowY,visible:y,position:oe.placement,arrowSize:b,arrowOffset:x,arrowRadius:S,arrowPosition:C,...se(`arrow`)})]})})}),(0,w.cloneElement)(ce,oe.getReferenceProps({onClick:M,onMouseEnter:N,onMouseLeave:P,onMouseMove:t.onMouseMove,onPointerDown:t.onPointerDown,onPointerEnter:t.onPointerEnter,...de,className:gt(v,de.className),[i]:fe}))]})});i_.classes=Jg,i_.varsResolver=r_,i_.displayName=`@mantine/core/Tooltip`,i_.Floating=Zg,i_.Group=$g;var a_={root:`m_cf365364`,indicator:`m_9e182ccd`,label:`m_1738fcb2`,input:`m_1714d588`,control:`m_69686b9b`,innerLabel:`m_78882f40`},o_={withItemsBorders:!0},s_=mt((e,{radius:t,color:n,transitionDuration:r,size:i,transitionTimingFunction:a})=>({root:{"--sc-radius":t===void 0?void 0:R(t),"--sc-color":n?Pt(n,e):void 0,"--sc-shadow":n?void 0:`var(--mantine-shadow-xs)`,"--sc-transition-duration":r===void 0?void 0:`${r}ms`,"--sc-transition-timing-function":a,"--sc-padding":I(i,`sc-padding`),"--sc-font-size":z(i)}})),c_=kr(e=>{let t=K(`SegmentedControl`,o_,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,data:c,value:l,defaultValue:u,onChange:d,size:f,name:p,disabled:m,readOnly:h,fullWidth:g,orientation:_,radius:v,color:y,transitionDuration:b,transitionTimingFunction:x,variant:S,autoContrast:C,withItemsBorders:T,mod:E,attributes:D,ref:O,...k}=t,A=Jn({name:`SegmentedControl`,props:t,classes:a_,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:D,vars:s,varsResolver:s_}),j=vn(),M=c.map(e=>lt(e)?{label:`${e}`,value:e}:e),N=Be(),[P,F]=(0,w.useState)(ie()),[I,L]=(0,w.useState)(null),[R,z]=(0,w.useState)({}),B=(e,t)=>{R[t]=e,z(R)},[V,H]=Me({value:l,defaultValue:u,finalValue:Array.isArray(c)?M.find(e=>!e.disabled)?.value??c[0]?.value??null:null,onChange:d}),ee=De(p),te=M.map(e=>(0,w.createElement)(J,{...A(`control`),mod:{active:V===e.value,orientation:_},key:`${e.value}`},(0,w.createElement)(`input`,{...A(`input`),disabled:m||e.disabled,type:`radio`,name:ee,value:`${e.value}`,id:`${ee}-${e.value}`,checked:V===e.value,onChange:()=>!h&&H(e.value),"data-focus-ring":j.focusRing,key:`${e.value}-input`}),(0,w.createElement)(J,{component:`label`,...A(`label`),mod:{active:V===e.value&&!(m||e.disabled),disabled:m||e.disabled,"read-only":h},htmlFor:`${ee}-${e.value}`,ref:t=>B(t,`${e.value}`),__vars:{"--sc-label-color":y===void 0?void 0:Vt({color:y,theme:j,autoContrast:C})},key:`${e.value}-label`},(0,G.jsx)(`span`,{...A(`innerLabel`),children:e.label})))),U=je(O,L);return Ie(()=>{F(ie())},[c.length]),c.length===0?null:(0,G.jsxs)(J,{...A(`root`),variant:S,size:f,ref:U,mod:[{"full-width":g,orientation:_,initialized:N,"with-items-borders":T},E],...k,role:`radiogroup`,"data-disabled":m,children:[V!==void 0&&(0,G.jsx)(kd,{target:R[`${V}`],parent:I,component:`span`,transitionDuration:`var(--sc-transition-duration)`,...A(`indicator`)},P),te]})});c_.classes=a_,c_.varsResolver=s_,c_.displayName=`@mantine/core/SegmentedControl`;var l_={size:`sm`,withCheckIcon:!0,allowDeselect:!0,checkIconPosition:`left`,openOnFocus:!0},u_=kr(e=>{let t=K([`Input`,`InputWrapper`,`Select`],l_,e),{classNames:n,styles:r,unstyled:i,vars:a,dropdownOpened:o,defaultDropdownOpened:s,onDropdownClose:c,onDropdownOpen:l,onFocus:u,onBlur:d,onClick:f,onChange:p,data:m,value:h,defaultValue:g,selectFirstOptionOnChange:_,selectFirstOptionOnDropdownOpen:v,onOptionSubmit:y,comboboxProps:b,readOnly:x,disabled:S,filter:C,limit:T,withScrollArea:E,maxDropdownHeight:D,floatingHeight:O,size:k,searchable:A,rightSection:j,checkIconPosition:M,withCheckIcon:N,withAlignedLabels:P,nothingFoundMessage:F,name:I,form:L,searchValue:R,defaultSearchValue:z,onSearchChange:B,allowDeselect:V,error:H,rightSectionPointerEvents:ee,id:te,clearable:U,clearSectionMode:ne,clearButtonProps:re,hiddenInputProps:ie,renderOption:ae,onClear:oe,autoComplete:se,scrollAreaProps:ce,__defaultRightSection:le,__clearSection:W,__clearable:ue,chevronColor:de,autoSelectOnBlur:fe,openOnFocus:pe,attributes:me,...he}=t,ge=(0,w.useMemo)(()=>pf(m),[m]),_e=(0,w.useRef)({}),ve=(0,w.useMemo)(()=>mf(ge),[ge]),ye=De(te),[be,xe,Se]=Me({value:h,defaultValue:g,finalValue:null,onChange:p}),Ce=be==null?void 0:`${be}`in ve?ve[`${be}`]:_e.current[`${be}`],we=Re(Ce),[Te,Ee,Oe]=Me({value:R,defaultValue:z,finalValue:Ce?Ce.label:``,onChange:B}),ke=Hf({opened:o,defaultOpened:s,onDropdownOpen:()=>{l?.(),v?ke.selectFirstOption():ke.updateSelectedOptionIndex(`active`,{scrollIntoView:!0})},onDropdownClose:()=>{c?.(),setTimeout(ke.resetSelectedOption,0)}}),Ae=e=>{Ee(e),ke.resetSelectedOption()},{resolvedClassNames:je,resolvedStyles:Ne}=Pn({props:t,styles:r,classNames:n});(0,w.useEffect)(()=>{_&&ke.selectFirstOption()},[_,Te]),(0,w.useEffect)(()=>{h===null&&Ae(``),h!=null&&Ce&&(we?.value!==Ce.value||we?.label!==Ce.label)&&Ae(Ce.label)},[h,Ce]),(0,w.useEffect)(()=>{!Se&&!Oe&&Ae(be==null?``:`${be}`in ve?ve[`${be}`]?.label:_e.current[`${be}`]?.label||``)},[ve,be]),(0,w.useEffect)(()=>{be&&`${be}`in ve&&(_e.current[`${be}`]=ve[`${be}`])},[ve,be]);let Pe=(0,G.jsx)(Gf.ClearButton,{...re,onClear:()=>{xe(null,null),Ae(``),oe?.()}}),Fe=U&&be!=null&&!S&&!x;return(0,G.jsxs)(G.Fragment,{children:[(0,G.jsxs)(Gf,{store:ke,__staticSelector:`Select`,classNames:je,styles:Ne,unstyled:i,readOnly:x,size:k,attributes:me,floatingHeight:O,keepMounted:fe,onOptionSubmit:e=>{y?.(e);let t=V&&`${ve[e].value}`==`${be}`?null:ve[e],n=t?t.value:null;n!==be&&xe(n,t),!Se&&Ae(n==null?``:t?.label||``),ke.closeDropdown()},...b,children:[(0,G.jsx)(Gf.Target,{targetType:A?`input`:`button`,autoComplete:se,withExpandedAttribute:!0,children:(0,G.jsx)(wd,{id:ye,__defaultRightSection:(0,G.jsx)(Gf.Chevron,{size:k,error:H,unstyled:i,color:de}),__clearSection:Pe,__clearable:Fe,__clearSectionMode:ne,rightSection:j,rightSectionPointerEvents:ee||`none`,...he,size:k,__staticSelector:`Select`,disabled:S,readOnly:x||!A,value:Te,onChange:e=>{Ae(e.currentTarget.value),ke.openDropdown(),_&&ke.selectFirstOption()},onFocus:e=>{pe&&A&&ke.openDropdown(),u?.(e)},onBlur:e=>{fe&&ke.clickSelectedOption(),A&&ke.closeDropdown();let t=be!=null&&(`${be}`in ve?ve[`${be}`]:_e.current[`${be}`]);Ae(t&&t.label||``),d?.(e)},onClick:e=>{A?ke.openDropdown():ke.toggleDropdown(),f?.(e)},classNames:je,styles:Ne,unstyled:i,pointer:!A,error:H,attributes:me})}),(0,G.jsx)(rp,{data:ge,hidden:x||S,filter:C,search:Te,limit:T,hiddenWhenEmpty:!F,withScrollArea:E,maxDropdownHeight:D,filterOptions:!!A&&Ce?.label!==Te,value:be,checkIconPosition:M,withCheckIcon:N,withAlignedLabels:P,nothingFoundMessage:F,unstyled:i,labelId:he.label?`${ye}-label`:void 0,"aria-label":he.label?void 0:he[`aria-label`],renderOption:ae,scrollAreaProps:ce})]}),(0,G.jsx)(Gf.HiddenInput,{value:be,name:I,form:L,disabled:S,...ie})]})});u_.classes={...wd.classes,...Gf.classes},u_.displayName=`@mantine/core/Select`;function d_(e){if(e!==void 0)return typeof e==`number`?v(e):e}function f_({spacing:e,verticalSpacing:t,cols:n,minColWidth:r,autoRows:i,selector:a}){let o=vn(),s=t===void 0?e:t,c=r!==void 0,l=b({"--sg-spacing-x":L(U(e)),"--sg-spacing-y":L(U(s)),"--sg-auto-rows":i,...c?{"--sg-min-col-width":d_(r)}:{"--sg-cols":U(n)?.toString()}}),d=u(o.breakpoints).reduce((t,r)=>(t[r]||(t[r]={}),typeof e==`object`&&e[r]!==void 0&&(t[r][`--sg-spacing-x`]=L(e[r])),typeof s==`object`&&s[r]!==void 0&&(t[r][`--sg-spacing-y`]=L(s[r])),!c&&typeof n==`object`&&n[r]!==void 0&&(t[r][`--sg-cols`]=n[r]),t),{});return(0,G.jsx)(Qn,{styles:l,media:te(u(d),o.breakpoints).filter(e=>u(d[e.value]).length>0).map(e=>({query:`(min-width: ${o.breakpoints[e.value]})`,styles:d[e.value]})),selector:a})}function p_(e){return typeof e==`object`&&e?u(e):[]}function m_(e){return e.sort((e,t)=>h(e)-h(t))}function h_({spacing:e,verticalSpacing:t,cols:n,minColWidth:r}){return m_(Array.from(new Set([...p_(e),...p_(t),...r===void 0?p_(n):[]])))}function g_({spacing:e,verticalSpacing:t,cols:n,minColWidth:r,autoRows:i,selector:a}){let o=t===void 0?e:t,s=r!==void 0,c=b({"--sg-spacing-x":L(U(e)),"--sg-spacing-y":L(U(o)),"--sg-auto-rows":i,...s?{"--sg-min-col-width":d_(r)}:{"--sg-cols":U(n)?.toString()}}),l=h_({spacing:e,verticalSpacing:t,cols:n,minColWidth:r}),u=l.reduce((t,r)=>(t[r]||(t[r]={}),typeof e==`object`&&e[r]!==void 0&&(t[r][`--sg-spacing-x`]=L(e[r])),typeof o==`object`&&o[r]!==void 0&&(t[r][`--sg-spacing-y`]=L(o[r])),!s&&typeof n==`object`&&n[r]!==void 0&&(t[r][`--sg-cols`]=n[r]),t),{});return(0,G.jsx)(Qn,{styles:c,container:l.map(e=>({query:`simple-grid (min-width: ${e})`,styles:u[e]})),selector:a})}var __={container:`m_925c2d2c`,root:`m_2415a157`},v_={cols:1,spacing:`md`,type:`media`},y_=q(e=>{let t=K(`SimpleGrid`,v_,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,cols:c,verticalSpacing:l,spacing:u,type:d,minColWidth:f,autoFlow:p,autoRows:m,attributes:h,...g}=t,_=Jn({name:`SimpleGrid`,classes:__,props:t,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:h,vars:s}),v=wr(),y=f===void 0?void 0:p||`auto-fill`;return d===`container`?(0,G.jsxs)(G.Fragment,{children:[(0,G.jsx)(g_,{...t,selector:`.${v}`}),(0,G.jsx)(`div`,{..._(`container`),children:(0,G.jsx)(J,{..._(`root`,{className:v}),...g,"data-auto-cols":y})})]}):(0,G.jsxs)(G.Fragment,{children:[(0,G.jsx)(f_,{...t,selector:`.${v}`}),(0,G.jsx)(J,{..._(`root`,{className:v}),...g,"data-auto-cols":y})]})});y_.classes=__,y_.displayName=`@mantine/core/SimpleGrid`;var b_={root:`m_6d731127`},x_={gap:`md`,align:`stretch`,justify:`flex-start`},S_=mt((e,{gap:t,align:n,justify:r})=>({root:{"--stack-gap":L(t),"--stack-align":n,"--stack-justify":r}})),C_=q(e=>{let t=K(`Stack`,x_,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,align:c,justify:l,gap:u,variant:d,attributes:f,...p}=t;return(0,G.jsx)(J,{...Jn({name:`Stack`,props:t,classes:b_,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:f,vars:s,varsResolver:S_})(`root`),variant:d,...p})});C_.classes=b_,C_.varsResolver=S_,C_.displayName=`@mantine/core/Stack`;var w_=(0,w.createContext)(null),T_={hiddenInputValuesSeparator:`,`},E_=kr((e=>{let{value:t,defaultValue:n,onChange:r,size:i,wrapperProps:a,children:o,readOnly:s,name:c,hiddenInputValuesSeparator:l,hiddenInputProps:u,maxSelectedValues:d,disabled:f,...p}=K(`SwitchGroup`,T_,e),[m,h]=Me({value:t,defaultValue:n,finalValue:[],onChange:r}),g=e=>{let t=e.currentTarget.value;if(s)return;let n=m.includes(t);!n&&d&&m.length>=d||h(n?m.filter(e=>e!==t):[...m,t])},_=e=>{if(f)return!0;if(!d)return!1;let t=m.includes(e),n=m.length>=d;return!t&&n},v=m.join(l);return(0,G.jsx)(w_,{value:{value:m,onChange:g,size:i,isDisabled:_},children:(0,G.jsxs)(xd.Wrapper,{size:i,...a,...p,labelElement:`div`,__staticSelector:`SwitchGroup`,children:[(0,G.jsx)(Kf,{role:`group`,children:o}),(0,G.jsx)(`input`,{type:`hidden`,name:c,value:v,...u})]})})}));E_.classes=xd.Wrapper.classes,E_.displayName=`@mantine/core/SwitchGroup`;var D_={root:`m_5f93f3bb`,input:`m_926b4011`,track:`m_9307d992`,thumb:`m_93039a1d`,trackLabel:`m_8277e082`},O_={labelPosition:`right`,withThumbIndicator:!0},k_=mt((e,{radius:t,color:n,size:r})=>({root:{"--switch-radius":t===void 0?void 0:R(t),"--switch-height":I(r,`switch-height`),"--switch-width":I(r,`switch-width`),"--switch-thumb-size":I(r,`switch-thumb-size`),"--switch-label-font-size":I(r,`switch-label-font-size`),"--switch-track-label-padding":I(r,`switch-track-label-padding`),"--switch-color":n?Pt(n,e):void 0}})),A_=q(e=>{let t=K(`Switch`,O_,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,color:c,label:l,offLabel:u,onLabel:d,id:f,size:p,radius:m,wrapperProps:h,thumbIcon:g,checked:_,defaultChecked:v,onChange:y,labelPosition:b,description:x,error:S,disabled:C,variant:T,rootRef:E,mod:D,withThumbIndicator:O,attributes:k,...A}=t,j=(0,w.use)(w_),M=p||j?.size,N=Jn({name:`Switch`,props:t,classes:D_,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:k,vars:s,varsResolver:k_}),{styleProps:P,rest:F}=tr(A),I=De(f),L=[x?`${I}-description`:void 0,S&&typeof S!=`boolean`?`${I}-error`:void 0,F[`aria-describedby`]].filter(Boolean).join(` `)||void 0,R={checked:j?.value.includes(F.value)??_,onChange:e=>{j?.onChange(e),y?.(e)}},z=C||j?.isDisabled?.(F.value),[B,V]=Me({value:R.checked??_,defaultValue:v,finalValue:!1});return(0,G.jsxs)(Xf,{...N(`root`),__staticSelector:`Switch`,__stylesApiProps:t,id:I,size:M,labelPosition:b,label:l,description:x,error:S,disabled:z,bodyElement:`label`,labelElement:`span`,classNames:n,styles:a,unstyled:o,"data-checked":R.checked,variant:T,ref:E,mod:D,attributes:k,inert:F.inert,...P,...h,children:[(0,G.jsx)(`input`,{...F,...R,disabled:z,checked:B,"data-checked":R.checked,onChange:e=>{R.onChange?.(e),V(e.currentTarget.checked)},id:I,type:`checkbox`,role:`switch`,inert:F.inert,"aria-describedby":L,...N(`input`)}),(0,G.jsxs)(J,{"aria-hidden":`true`,component:`span`,mod:{error:S,"label-position":b,"without-labels":!d&&!u},...N(`track`),children:[(0,G.jsx)(J,{component:`span`,mod:{"reduce-motion":!0,"with-thumb-indicator":O&&!g},...N(`thumb`),children:g}),(0,G.jsx)(`span`,{...N(`trackLabel`),children:B?d:u})]})]})});A_.classes={...D_,...Yf},A_.varsResolver=k_,A_.displayName=`@mantine/core/Switch`,A_.Group=E_;var j_=q(e=>(0,G.jsx)(wd,{component:`input`,...K([`Input`,`InputWrapper`,`TextInput`],null,e),__staticSelector:`TextInput`}));j_.classes=wd.classes,j_.displayName=`@mantine/core/TextInput`;var M_=[`h1`,`h2`,`h3`,`h4`,`h5`,`h6`],N_=[`xs`,`sm`,`md`,`lg`,`xl`];function P_(e,t){let n=t===void 0?`h${e}`:t;return M_.includes(n)?{fontSize:`var(--mantine-${n}-font-size)`,fontWeight:`var(--mantine-${n}-font-weight)`,lineHeight:`var(--mantine-${n}-line-height)`}:N_.includes(n)?{fontSize:`var(--mantine-font-size-${n})`,fontWeight:`var(--mantine-h${e}-font-weight)`,lineHeight:`var(--mantine-h${e}-line-height)`}:{fontSize:v(n),fontWeight:`var(--mantine-h${e}-font-weight)`,lineHeight:`var(--mantine-h${e}-line-height)`}}var F_={root:`m_8a5d1357`},I_={order:1},L_=mt((e,{order:t,size:n,lineClamp:r,textWrap:i})=>{let a=P_(t||1,n);return{root:{"--title-fw":a.fontWeight,"--title-lh":a.lineHeight,"--title-fz":a.fontSize,"--title-line-clamp":typeof r==`number`?r.toString():void 0,"--title-text-wrap":i}}}),R_=q(e=>{let t=K(`Title`,I_,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,order:s,vars:c,size:l,variant:u,lineClamp:d,textWrap:f,mod:p,attributes:m,...h}=t,g=Jn({name:`Title`,props:t,classes:F_,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:m,vars:c,varsResolver:L_});return[1,2,3,4,5,6].includes(s)?(0,G.jsx)(J,{...g(`root`),component:`h${s}`,variant:u,mod:[{order:s,"data-line-clamp":typeof d==`number`},p],size:l,...h}):null});R_.classes=F_,R_.varsResolver=L_,R_.displayName=`@mantine/core/Title`;function z_(e){let t=e,n=!1,r=new Set;return{getState(){return t},updateState(e){t=typeof e==`function`?e(t):e},setState(e){this.updateState(e),r.forEach(e=>e(t))},initialize(e){n||=(t=e,!0)},subscribe(e){return r.add(e),()=>r.delete(e)}}}function B_(e){return(0,w.useSyncExternalStore)(e.subscribe,()=>e.getState(),()=>e.getState())}var V_=0;function H_(e,t,n){let r=[],i=[],a=new Map;for(let n of e){let e=n.position||t,r=a.get(e);r?r.push(n):a.set(e,[n])}for(let e of a.values())e.sort((e,t)=>(t.priority??0)-(e.priority??0)||(e.__sequence??0)-(t.__sequence??0)),e.forEach((e,t)=>{t<n?i.push(e):r.push(e)});return{notifications:i,queue:r}}var U_=z_({notifications:[],queue:[],defaultPosition:`bottom-right`,limit:5}),W_=(e=U_)=>B_(e);function G_(e,t){let n=e.getState(),r=t([...n.notifications,...n.queue]);for(let e of r)e.__sequence===void 0&&(e.__sequence=V_,V_+=1);let i=H_(r,n.defaultPosition,n.limit);e.setState({notifications:i.notifications,queue:i.queue,limit:n.limit,defaultPosition:n.defaultPosition})}function K_(e,t=U_){let n=e.id||ie();return G_(t,t=>e.id&&t.some(t=>t.id===e.id)?t:[...t,{...e,id:n}]),n}function q_(e,t=U_){return G_(t,t=>t.filter(t=>t.id!==e||(t.onClose?.(t),!1))),e}function J_(e,t=U_){return G_(t,t=>t.map(t=>t.id===e.id?{...t,...e}:t)),e.id}function Y_(e=U_){G_(e,()=>[])}function X_(e=U_){let{defaultPosition:t,limit:n}=e.getState();G_(e,e=>H_(e,t,n).notifications)}var Z_={show:K_,hide:q_,update:J_,clean:Y_,cleanQueue:X_,updateState:G_},Q_=[`bottom-center`,`bottom-left`,`bottom-right`,`top-center`,`top-left`,`top-right`];function $_(e,t){return e.reduce((e,n)=>(e[n.position||t].push(n),e),Q_.reduce((e,t)=>(e[t]=[],e),{}))}var ev={left:`translateX(-100%)`,right:`translateX(100%)`,"top-center":`translateY(-100%)`,"bottom-center":`translateY(100%)`},tv={left:`translateX(0)`,right:`translateX(0)`,"top-center":`translateY(0)`,"bottom-center":`translateY(0)`};function nv({state:e,maxHeight:t,position:n,transitionDuration:r}){let[i,a]=n.split(`-`),o=a===`center`?`${i}-center`:a,s={opacity:0,maxHeight:t,transform:ev[o],transitionDuration:`${r}ms, ${r}ms, ${r}ms`,transitionTimingFunction:`cubic-bezier(.51,.3,0,1.21), cubic-bezier(.51,.3,0,1.21), linear`,transitionProperty:`opacity, transform, max-height`},c={opacity:1,transform:tv[o]},l={opacity:0,maxHeight:0,transform:ev[o]},u={entering:c,entered:c,exiting:l,exited:l};return{...s,...u[e]}}function rv(e,t){return typeof t==`number`?t:t===!1||e===!1?!1:e}var iv=120;function av({data:e,onHide:t,autoClose:n,transitionDuration:r,allowDragDismiss:i,allowScrollDismiss:a,paused:o,onHoverStart:s,onHoverEnd:c,ref:l,style:u,...d}){let[f,p]=(0,w.useState)(0),[m,h]=(0,w.useState)(!1),[g,_]=(0,w.useState)(1),[v,y]=(0,w.useState)(!1),b=vn(),{autoClose:x,message:S,allowClose:C,position:T,style:E,withCloseButton:D,onOpen:O,priority:k,__sequence:A,...j}=e,M=rv(n,e.autoClose),N=(0,w.useRef)(-1),P=(0,w.useRef)(-1),F=(0,w.useRef)(-1),I=(0,w.useRef)(null),L=(0,w.useRef)(!1),R=(0,w.useRef)(0),z=C===!1,B=()=>window.clearTimeout(N.current),V=()=>window.clearTimeout(P.current),H=()=>window.clearTimeout(F.current),ee=e=>{R.current=e,p(e)},te=()=>{t(e.id),B(),V(),H()},U=()=>{m||ce||o||L.current||typeof M!=`number`||(B(),N.current=window.setTimeout(te,M))},ne=e=>e*((I.current?.offsetWidth??440)+40),re=(e,t)=>{let n=I.current?.offsetWidth??440;return Math.abs(e)>n*.35||t>.5},ie=()=>{H(),y(!1),ee(0)},ae=e=>{_(e),h(!0),y(!1),ee(ne(e)),B(),V(),H(),P.current=window.setTimeout(te,r)},oe=()=>{H(),F.current=window.setTimeout(()=>{y(!1),ee(0),U()},iv)},{ref:se,active:ce}=ot(e=>{if(!m)if(e.first&&B(),e.last){if(e.tap||e.canceled){ee(0),U();return}let t=e.movement[0],n=t===0?e.direction[0]===-1?-1:1:t>0?1:-1;re(t,e.velocity[0])?ae(n):(ee(0),U())}else ee(e.movement[0])},{axis:`x`,threshold:5,filterTaps:!0,enabled:i&&!z&&!m}),le=je(l,I,se),W=Tr(u,b),ue=Tr(E,b),de={...W,...ue},fe=typeof de.opacity==`number`?de.opacity:1,pe=m?0:1-Math.min(Math.abs(f)/200,1)*.6,me=de.transitionDuration??`${r}ms, ${r}ms, ${r}ms`,he={...de,"--notifications-state-transform":typeof de.transform==`string`?de.transform:`translateX(0)`,"--notifications-state-opacity":String(fe),"--notifications-swipe-offset":`${f}px`,"--notifications-swipe-opacity":String(pe),transform:`var(--notifications-state-transform) translate3d(var(--notifications-swipe-offset), 0, 0)`,opacity:`calc(var(--notifications-state-opacity) * var(--notifications-swipe-opacity))`,transitionDuration:ce||v?`0ms, 0ms, 0ms`:me,cursor:`default`,touchAction:`pan-y`},ge=()=>{L.current=!0,B(),s?.()},_e=()=>{L.current=!1,v||(ie(),U()),c?.()},ve=(0,w.useEffectEvent)(e=>{if(m||ce)return;let t=e.currentTarget===document;if(!t&&!L.current)return;let{deltaX:n,deltaY:r}=e;if(Math.abs(n)<=Math.abs(r)||n===0||!a||z)return;t||(e.preventDefault(),e.stopPropagation()),B(),y(!0);let i=R.current-n,o=i>0?1:-1;if(re(i,0)){ae(o);return}ee(i),oe()});return(0,w.useEffect)(()=>{if(v)return document.addEventListener(`wheel`,ve,{passive:!1}),()=>document.removeEventListener(`wheel`,ve,{passive:!1})},[v]),(0,w.useEffect)(()=>{let e=()=>{m&&ee(ne(g))};return window.addEventListener(`resize`,e),()=>window.removeEventListener(`resize`,e)},[g,m]),(0,w.useEffect)(()=>{let e=I.current;if(e)return e.addEventListener(`wheel`,ve,{passive:!1}),()=>e.removeEventListener(`wheel`,ve,{passive:!1})},[]),(0,w.useEffect)(()=>()=>{V(),H()},[]),(0,w.useEffect)(()=>{e.onOpen?.(e)},[]),(0,w.useEffect)(()=>(U(),B),[M,ce,m]),(0,w.useEffect)(()=>(o?B():U(),B),[o]),(0,G.jsx)(Fh,{ref:le,...d,style:he,...j,withCloseButton:!z&&D,onClose:te,onMouseEnter:ge,onMouseLeave:_e,children:S})}av.displayName=`@mantine/notifications/NotificationContainer`;var ov={root:`m_b37d9ac7`,notification:`m_5ed0edd0`};function sv(){return sv=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},sv.apply(null,arguments)}function cv(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function lv(e,t){return lv=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},lv(e,t)}function uv(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,lv(e,t)}var dv={disabled:!1},fv=w.createContext(null),pv=function(e){return e.scrollTop},mv=`unmounted`,hv=`exited`,gv=`entering`,_v=`entered`,vv=`exiting`,yv=function(e){uv(t,e);function t(t,n){var r=e.call(this,t,n)||this,i=n,a=i&&!i.isMounting?t.enter:t.appear,o;return r.appearStatus=null,t.in?a?(o=hv,r.appearStatus=gv):o=_v:o=t.unmountOnExit||t.mountOnEnter?mv:hv,r.state={status:o},r.nextCallback=null,r}t.getDerivedStateFromProps=function(e,t){return e.in&&t.status===`unmounted`?{status:hv}:null};var n=t.prototype;return n.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},n.componentDidUpdate=function(e){var t=null;if(e!==this.props){var n=this.state.status;this.props.in?n!==`entering`&&n!==`entered`&&(t=gv):(n===`entering`||n===`entered`)&&(t=vv)}this.updateStatus(!1,t)},n.componentWillUnmount=function(){this.cancelNextCallback()},n.getTimeouts=function(){var e=this.props.timeout,t=n=r=e,n,r;return e!=null&&typeof e!=`number`&&(t=e.exit,n=e.enter,r=e.appear===void 0?n:e.appear),{exit:t,enter:n,appear:r}},n.updateStatus=function(e,t){if(e===void 0&&(e=!1),t!==null)if(this.cancelNextCallback(),t===`entering`){if(this.props.unmountOnExit||this.props.mountOnEnter){var n=this.props.nodeRef?this.props.nodeRef.current:Ye.default.findDOMNode(this);n&&pv(n)}this.performEnter(e)}else this.performExit();else this.props.unmountOnExit&&this.state.status===`exited`&&this.setState({status:mv})},n.performEnter=function(e){var t=this,n=this.props.enter,r=this.context?this.context.isMounting:e,i=this.props.nodeRef?[r]:[Ye.default.findDOMNode(this),r],a=i[0],o=i[1],s=this.getTimeouts(),c=r?s.appear:s.enter;if(!e&&!n||dv.disabled){this.safeSetState({status:_v},function(){t.props.onEntered(a)});return}this.props.onEnter(a,o),this.safeSetState({status:gv},function(){t.props.onEntering(a,o),t.onTransitionEnd(c,function(){t.safeSetState({status:_v},function(){t.props.onEntered(a,o)})})})},n.performExit=function(){var e=this,t=this.props.exit,n=this.getTimeouts(),r=this.props.nodeRef?void 0:Ye.default.findDOMNode(this);if(!t||dv.disabled){this.safeSetState({status:hv},function(){e.props.onExited(r)});return}this.props.onExit(r),this.safeSetState({status:vv},function(){e.props.onExiting(r),e.onTransitionEnd(n.exit,function(){e.safeSetState({status:hv},function(){e.props.onExited(r)})})})},n.cancelNextCallback=function(){this.nextCallback!==null&&(this.nextCallback.cancel(),this.nextCallback=null)},n.safeSetState=function(e,t){t=this.setNextCallback(t),this.setState(e,t)},n.setNextCallback=function(e){var t=this,n=!0;return this.nextCallback=function(r){n&&(n=!1,t.nextCallback=null,e(r))},this.nextCallback.cancel=function(){n=!1},this.nextCallback},n.onTransitionEnd=function(e,t){this.setNextCallback(t);var n=this.props.nodeRef?this.props.nodeRef.current:Ye.default.findDOMNode(this),r=e==null&&!this.props.addEndListener;if(!n||r){setTimeout(this.nextCallback,0);return}if(this.props.addEndListener){var i=this.props.nodeRef?[this.nextCallback]:[n,this.nextCallback],a=i[0],o=i[1];this.props.addEndListener(a,o)}e!=null&&setTimeout(this.nextCallback,e)},n.render=function(){var e=this.state.status;if(e===`unmounted`)return null;var t=this.props,n=t.children;t.in,t.mountOnEnter,t.unmountOnExit,t.appear,t.enter,t.exit,t.timeout,t.addEndListener,t.onEnter,t.onEntering,t.onEntered,t.onExit,t.onExiting,t.onExited,t.nodeRef;var r=cv(t,[`children`,`in`,`mountOnEnter`,`unmountOnExit`,`appear`,`enter`,`exit`,`timeout`,`addEndListener`,`onEnter`,`onEntering`,`onEntered`,`onExit`,`onExiting`,`onExited`,`nodeRef`]);return w.createElement(fv.Provider,{value:null},typeof n==`function`?n(e,r):w.cloneElement(w.Children.only(n),r))},t}(w.Component);yv.contextType=fv,yv.propTypes={};function bv(){}yv.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:bv,onEntering:bv,onEntered:bv,onExit:bv,onExiting:bv,onExited:bv},yv.UNMOUNTED=mv,yv.EXITED=hv,yv.ENTERING=gv,yv.ENTERED=_v,yv.EXITING=vv;function xv(e){if(e===void 0)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return e}function Sv(e,t){var n=function(e){return t&&(0,w.isValidElement)(e)?t(e):e},r=Object.create(null);return e&&w.Children.map(e,function(e){return e}).forEach(function(e){r[e.key]=n(e)}),r}function Cv(e,t){e||={},t||={};function n(n){return n in t?t[n]:e[n]}var r=Object.create(null),i=[];for(var a in e)a in t?i.length&&(r[a]=i,i=[]):i.push(a);var o,s={};for(var c in t){if(r[c])for(o=0;o<r[c].length;o++){var l=r[c][o];s[r[c][o]]=n(l)}s[c]=n(c)}for(o=0;o<i.length;o++)s[i[o]]=n(i[o]);return s}function wv(e,t,n){return n[t]==null?e.props[t]:n[t]}function Tv(e,t){return Sv(e.children,function(n){return(0,w.cloneElement)(n,{onExited:t.bind(null,n),in:!0,appear:wv(n,`appear`,e),enter:wv(n,`enter`,e),exit:wv(n,`exit`,e)})})}function Ev(e,t,n){var r=Sv(e.children),i=Cv(t,r);return Object.keys(i).forEach(function(a){var o=i[a];if((0,w.isValidElement)(o)){var s=a in t,c=a in r,l=t[a],u=(0,w.isValidElement)(l)&&!l.props.in;c&&(!s||u)?i[a]=(0,w.cloneElement)(o,{onExited:n.bind(null,o),in:!0,exit:wv(o,`exit`,e),enter:wv(o,`enter`,e)}):!c&&s&&!u?i[a]=(0,w.cloneElement)(o,{in:!1}):c&&s&&(0,w.isValidElement)(l)&&(i[a]=(0,w.cloneElement)(o,{onExited:n.bind(null,o),in:l.props.in,exit:wv(o,`exit`,e),enter:wv(o,`enter`,e)}))}}),i}var Dv=Object.values||function(e){return Object.keys(e).map(function(t){return e[t]})},Ov={component:`div`,childFactory:function(e){return e}},kv=function(e){uv(t,e);function t(t,n){var r=e.call(this,t,n)||this;return r.state={contextValue:{isMounting:!0},handleExited:r.handleExited.bind(xv(r)),firstRender:!0},r}var n=t.prototype;return n.componentDidMount=function(){this.mounted=!0,this.setState({contextValue:{isMounting:!1}})},n.componentWillUnmount=function(){this.mounted=!1},t.getDerivedStateFromProps=function(e,t){var n=t.children,r=t.handleExited;return{children:t.firstRender?Tv(e,r):Ev(e,n,r),firstRender:!1}},n.handleExited=function(e,t){var n=Sv(this.props.children);e.key in n||(e.props.onExited&&e.props.onExited(t),this.mounted&&this.setState(function(t){var n=sv({},t.children);return delete n[e.key],{children:n}}))},n.render=function(){var e=this.props,t=e.component,n=e.childFactory,r=cv(e,[`component`,`childFactory`]),i=this.state.contextValue,a=Dv(this.state.children).map(n);return delete r.appear,delete r.enter,delete r.exit,t===null?w.createElement(fv.Provider,{value:i},a):w.createElement(fv.Provider,{value:i},w.createElement(t,r,a))},t}(w.Component);kv.propTypes={},kv.defaultProps=Ov;var Av=yv,jv={position:`bottom-right`,autoClose:4e3,transitionDuration:250,allowDragDismiss:!0,allowScrollDismiss:!0,containerWidth:440,notificationMaxHeight:200,limit:5,zIndex:N(`overlay`),store:U_,withinPortal:!0,pauseResetOnHover:`all`},Mv=mt((e,{zIndex:t,containerWidth:n})=>({root:{"--notifications-z-index":t?.toString(),"--notifications-container-width":v(n)}})),Nv=q(e=>{let t=K(`Notifications`,jv,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,attributes:c,position:l,autoClose:u,transitionDuration:d,allowDragDismiss:f,allowScrollDismiss:p,containerWidth:m,notificationMaxHeight:h,limit:g,zIndex:_,store:v,portalProps:y,withinPortal:b,pauseResetOnHover:x,...S}=t,C=vn(),T=W_(v),E=Ee(),D=Ne(),O=(0,w.useRef)({}),k=(0,w.useRef)(0),[A,j]=(0,w.useState)(0),M=(0,w.useCallback)(()=>j(e=>e+1),[]),N=(0,w.useCallback)(()=>j(e=>Math.max(0,e-1)),[]),P=C.respectReducedMotion&&D?1:d,F=Jn({name:`Notifications`,classes:ov,props:t,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:c,vars:s,varsResolver:Mv});(0,w.useEffect)(()=>{v?.updateState(e=>({...e,limit:g||5,defaultPosition:l}))},[g,l]),pe(()=>{T.notifications.length>k.current&&setTimeout(()=>E(),0),k.current=T.notifications.length},[T.notifications]);let I=$_(T.notifications,l),L=Q_.reduce((e,t)=>(e[t]=I[t].map(({style:e,...n})=>(0,G.jsx)(Av,{timeout:P,onEnter:()=>O.current[n.id].offsetHeight,nodeRef:{current:O.current[n.id]},children:r=>(0,G.jsx)(av,{ref:e=>{e?O.current[n.id]=e:delete O.current[n.id]},data:n,onHide:e=>q_(e,v),autoClose:u,transitionDuration:P,allowDragDismiss:f,allowScrollDismiss:p,paused:x===`all`&&A>0,onHoverStart:M,onHoverEnd:N,...F(`notification`,{style:{...nv({state:r,position:t,transitionDuration:P,maxHeight:h}),...e}})})},n.id)),e),{});return(0,G.jsxs)(Ac,{withinPortal:b,...y,children:[(0,G.jsx)(J,{...F(`root`),"data-position":`top-center`,...S,children:(0,G.jsx)(kv,{children:L[`top-center`]})}),(0,G.jsx)(J,{...F(`root`),"data-position":`top-left`,...S,children:(0,G.jsx)(kv,{children:L[`top-left`]})}),(0,G.jsx)(J,{...F(`root`,{className:zu.classNames.fullWidth}),"data-position":`top-right`,...S,children:(0,G.jsx)(kv,{children:L[`top-right`]})}),(0,G.jsx)(J,{...F(`root`,{className:zu.classNames.fullWidth}),"data-position":`bottom-right`,...S,children:(0,G.jsx)(kv,{children:L[`bottom-right`]})}),(0,G.jsx)(J,{...F(`root`),"data-position":`bottom-left`,...S,children:(0,G.jsx)(kv,{children:L[`bottom-left`]})}),(0,G.jsx)(J,{...F(`root`),"data-position":`bottom-center`,...S,children:(0,G.jsx)(kv,{children:L[`bottom-center`]})})]})});Nv.classes=ov,Nv.varsResolver=Mv,Nv.displayName=`@mantine/notifications/Notifications`,Nv.show=Z_.show,Nv.hide=Z_.hide,Nv.update=Z_.update,Nv.clean=Z_.clean,Nv.cleanQueue=Z_.cleanQueue,Nv.updateState=Z_.updateState;var Pv=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},Fv=new class extends Pv{#e;#t;#n;constructor(){super(),this.#n=e=>{if(typeof window<`u`&&window.addEventListener){let t=()=>e();return window.addEventListener(`visibilitychange`,t,!1),()=>{window.removeEventListener(`visibilitychange`,t)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#n=e,this.#t?.(),this.#t=e(e=>{typeof e==`boolean`?this.setFocused(e):this.onFocus()})}setFocused(e){this.#e!==e&&(this.#e=e,this.onFocus())}onFocus(){let e=this.isFocused();this.listeners.forEach(t=>{t(e)})}isFocused(){return typeof this.#e==`boolean`?this.#e:globalThis.document?.visibilityState!==`hidden`}},Iv={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},Lv=new class{#e=Iv;setTimeoutProvider(e){this.#e=e}setTimeout(e,t){return this.#e.setTimeout(e,t)}clearTimeout(e){this.#e.clearTimeout(e)}setInterval(e,t){return this.#e.setInterval(e,t)}clearInterval(e){this.#e.clearInterval(e)}};function Rv(e){setTimeout(e,0)}var zv=typeof window>`u`||`Deno`in globalThis;function Bv(){}function Vv(e,t){return typeof e==`function`?e(t):e}function Hv(e){return typeof e==`number`&&e>=0&&e!==1/0}function Uv(e,t){return Math.max(e+(t||0)-Date.now(),0)}function Wv(e,t){return typeof e==`function`?e(t):e}function Gv(e,t){return typeof e==`function`?e(t):e}function Kv(e,t){let{type:n=`all`,exact:r,fetchStatus:i,predicate:a,queryKey:o,stale:s}=e;if(o){if(r){if(t.queryHash!==Jv(o,t.options))return!1}else if(!Xv(t.queryKey,o))return!1}if(n!==`all`){let e=t.isActive();if(n===`active`&&!e||n===`inactive`&&e)return!1}return!(typeof s==`boolean`&&t.isStale()!==s||i&&i!==t.state.fetchStatus||a&&!a(t))}function qv(e,t){let{exact:n,status:r,predicate:i,mutationKey:a}=e;if(a){if(!t.options.mutationKey)return!1;if(n){if(Yv(t.options.mutationKey)!==Yv(a))return!1}else if(!Xv(t.options.mutationKey,a))return!1}return!(r&&t.state.status!==r||i&&!i(t))}function Jv(e,t){return(t?.queryKeyHashFn||Yv)(e)}function Yv(e){return JSON.stringify(e,(e,t)=>ty(t)?Object.keys(t).sort().reduce((e,n)=>(e[n]=t[n],e),{}):t)}function Xv(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(e&&t&&typeof e==`object`&&typeof t==`object`){if(Array.isArray(e)&&Array.isArray(t)){for(let n=0;n<t.length;n++)if(!Xv(e[n],t[n]))return!1;return!0}let n=Object.keys(t);for(let r of n)if(!Xv(e[r],t[r]))return!1;return!0}return!1}var Zv=Object.prototype.hasOwnProperty;function Qv(e,t,n=0){if(e===t)return e;if(n>500)return t;let r=ey(e)&&ey(t);if(!r&&!(ty(e)&&ty(t)))return t;let i=(r?e:Object.keys(e)).length,a=r?t:Object.keys(t),o=a.length,s=r?Array(o):{},c=0;for(let l=0;l<o;l++){let o=r?l:a[l],u=e[o],d=t[o];if(u===d){s[o]=u,(r?l<i:Zv.call(e,o))&&c++;continue}if(u===null||d===null||typeof u!=`object`||typeof d!=`object`){s[o]=d;continue}let f=Qv(u,d,n+1);s[o]=f,f===u&&c++}return i===o&&c===i?e:s}function $v(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(let n in e)if(e[n]!==t[n])return!1;return!0}function ey(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function ty(e){if(!ny(e))return!1;let t=e.constructor;if(t===void 0)return!0;let n=t.prototype;return!(!ny(n)||!n.hasOwnProperty(`isPrototypeOf`)||Object.getPrototypeOf(e)!==Object.prototype)}function ny(e){return Object.prototype.toString.call(e)===`[object Object]`}function ry(e){return new Promise(t=>{Lv.setTimeout(t,e)})}function iy(e,t,n){return typeof n.structuralSharing==`function`?n.structuralSharing(e,t):n.structuralSharing===!1?t:Qv(e,t)}function ay(e){return e}function oy(e,t,n=0){let r=[...e,t];return n&&r.length>n?r.slice(1):r}function sy(e,t,n=0){let r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var cy=Symbol();function ly(e,t){return!e.queryFn&&t?.initialPromise?()=>t.initialPromise:!e.queryFn||e.queryFn===cy?()=>Promise.reject(Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function uy(e,t){return typeof e==`function`?e(...t):!!e}function dy(e,t,n){let r=!1,i;return Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(i??=t(),r?i:(r=!0,i.aborted?n():i.addEventListener(`abort`,n,{once:!0}),i))}),e}var fy=(()=>{let e=()=>zv;return{isServer(){return e()},setIsServer(t){e=t}}})();function py(){let e,t,n=new Promise((n,r)=>{e=n,t=r});n.status=`pending`,n.catch(()=>{});function r(e){Object.assign(n,e),delete n.resolve,delete n.reject}return n.resolve=t=>{r({status:`fulfilled`,value:t}),e(t)},n.reject=e=>{r({status:`rejected`,reason:e}),t(e)},n}var my=Rv;function hy(){let e=[],t=0,n=e=>{e()},r=e=>{e()},i=my,a=r=>{t?e.push(r):i(()=>{n(r)})},o=()=>{let t=e;e=[],t.length&&i(()=>{r(()=>{t.forEach(e=>{n(e)})})})};return{batch:e=>{let n;t++;try{n=e()}finally{t--,t||o()}return n},batchCalls:e=>(...t)=>{a(()=>{e(...t)})},schedule:a,setNotifyFunction:e=>{n=e},setBatchNotifyFunction:e=>{r=e},setScheduler:e=>{i=e}}}var gy=hy(),_y=new class extends Pv{#e=!0;#t;#n;constructor(){super(),this.#n=e=>{if(typeof window<`u`&&window.addEventListener){let t=()=>e(!0),n=()=>e(!1);return window.addEventListener(`online`,t,!1),window.addEventListener(`offline`,n,!1),()=>{window.removeEventListener(`online`,t),window.removeEventListener(`offline`,n)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#n=e,this.#t?.(),this.#t=e(this.setOnline.bind(this))}setOnline(e){this.#e!==e&&(this.#e=e,this.listeners.forEach(t=>{t(e)}))}isOnline(){return this.#e}};function vy(e){return Math.min(1e3*2**e,3e4)}function yy(e){return(e??`online`)!==`online`||_y.isOnline()}var by=class extends Error{constructor(e){super(`CancelledError`),this.revert=e?.revert,this.silent=e?.silent}};function xy(e){let t=!1,n=0,r,i=py(),a=()=>i.status!==`pending`,o=t=>{if(!a()){let n=new by(t);f(n),e.onCancel?.(n)}},s=()=>{t=!0},c=()=>{t=!1},l=()=>Fv.isFocused()&&(e.networkMode===`always`||_y.isOnline())&&e.canRun(),u=()=>yy(e.networkMode)&&e.canRun(),d=e=>{a()||(r?.(),i.resolve(e))},f=e=>{a()||(r?.(),i.reject(e))},p=()=>new Promise(t=>{r=e=>{(a()||l())&&t(e)},e.onPause?.()}).then(()=>{r=void 0,a()||e.onContinue?.()}),m=()=>{if(a())return;let r,i=n===0?e.initialPromise:void 0;try{r=i??e.fn()}catch(e){r=Promise.reject(e)}Promise.resolve(r).then(d).catch(r=>{if(a())return;let i=e.retry??(fy.isServer()?0:3),o=e.retryDelay??vy,s=typeof o==`function`?o(n,r):o,c=i===!0||typeof i==`number`&&n<i||typeof i==`function`&&i(n,r);if(t||!c){f(r);return}n++,e.onFail?.(n,r),ry(s).then(()=>l()?void 0:p()).then(()=>{t?f(r):m()})})};return{promise:i,status:()=>i.status,cancel:o,continue:()=>(r?.(),i),cancelRetry:s,continueRetry:c,canStart:u,start:()=>(u()?m():p().then(m),i)}}var Sy=class{#e;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),Hv(this.gcTime)&&(this.#e=Lv.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(fy.isServer()?1/0:3e5))}clearGcTimeout(){this.#e!==void 0&&(Lv.clearTimeout(this.#e),this.#e=void 0)}};function Cy(e){return{onFetch:(t,n)=>{let r=t.options,i=t.fetchOptions?.meta?.fetchMore?.direction,a=t.state.data?.pages||[],o=t.state.data?.pageParams||[],s={pages:[],pageParams:[]},c=0,l=async()=>{let n=!1,l=e=>{dy(e,()=>t.signal,()=>n=!0)},u=ly(t.options,t.fetchOptions),d=async(e,r,i)=>{if(n)return Promise.reject(t.signal.reason);if(r==null&&e.pages.length)return Promise.resolve(e);let a=(()=>{let e={client:t.client,queryKey:t.queryKey,pageParam:r,direction:i?`backward`:`forward`,meta:t.options.meta};return l(e),e})(),o=await u(a),{maxPages:s}=t.options,c=i?sy:oy;return{pages:c(e.pages,o,s),pageParams:c(e.pageParams,r,s)}};if(i&&a.length){let e=i===`backward`,t=e?Ty:wy,n={pages:a,pageParams:o};s=await d(n,t(r,n),e)}else{let t=e??a.length;do{let e=c===0?o[0]??r.initialPageParam:wy(r,s);if(c>0&&e==null)break;s=await d(s,e),c++}while(c<t)}return s};t.fetchFn=t.options.persister?()=>t.options.persister?.(l,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n):l}}}function wy(e,{pages:t,pageParams:n}){let r=t.length-1;return t.length>0?e.getNextPageParam(t[r],t,n[r],n):void 0}function Ty(e,{pages:t,pageParams:n}){return t.length>0?e.getPreviousPageParam?.(t[0],t,n[0],n):void 0}var Ey=class extends Sy{#e;#t;#n;#r;#i;#a;#o;#s;constructor(e){super(),this.#s=!1,this.#o=e.defaultOptions,this.setOptions(e.options),this.observers=[],this.#i=e.client,this.#r=this.#i.getQueryCache(),this.queryKey=e.queryKey,this.queryHash=e.queryHash,this.#t=ky(this.options),this.state=e.state??this.#t,this.scheduleGc()}get meta(){return this.options.meta}get queryType(){return this.#e}get promise(){return this.#a?.promise}setOptions(e){if(this.options={...this.#o,...e},e?._type&&(this.#e=e._type),this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){let e=ky(this.options);e.data!==void 0&&(this.setState(Oy(e.data,e.dataUpdatedAt)),this.#t=e)}}optionalRemove(){!this.observers.length&&this.state.fetchStatus===`idle`&&this.#r.remove(this)}setData(e,t){let n=iy(this.state.data,e,this.options);return this.#l({data:n,type:`success`,dataUpdatedAt:t?.updatedAt,manual:t?.manual}),n}setState(e){this.#l({type:`setState`,state:e})}cancel(e){let t=this.#a?.promise;return this.#a?.cancel(e),t?t.then(Bv).catch(Bv):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}get resetState(){return this.#t}reset(){this.destroy(),this.setState(this.resetState)}isActive(){return this.observers.some(e=>Gv(e.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===cy||!this.isFetched()}isFetched(){return this.state.dataUpdateCount+this.state.errorUpdateCount>0}isStatic(){return this.getObserversCount()>0&&this.observers.some(e=>Wv(e.options.staleTime,this)===`static`)}isStale(){return this.getObserversCount()>0?this.observers.some(e=>e.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(e=0){return this.state.data===void 0?!0:e===`static`?!1:this.state.isInvalidated?!0:!Uv(this.state.dataUpdatedAt,e)}onFocus(){this.observers.find(e=>e.shouldFetchOnWindowFocus())?.refetch({cancelRefetch:!1}),this.#a?.continue()}onOnline(){this.observers.find(e=>e.shouldFetchOnReconnect())?.refetch({cancelRefetch:!1}),this.#a?.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),this.#r.notify({type:`observerAdded`,query:this,observer:e}))}removeObserver(e){this.observers.includes(e)&&(this.observers=this.observers.filter(t=>t!==e),this.observers.length||(this.#a&&(this.#s||this.#c()?this.#a.cancel({revert:!0}):this.#a.cancelRetry()),this.scheduleGc()),this.#r.notify({type:`observerRemoved`,query:this,observer:e}))}getObserversCount(){return this.observers.length}#c(){return this.state.fetchStatus===`paused`&&this.state.status===`pending`}invalidate(){this.state.isInvalidated||this.#l({type:`invalidate`})}async fetch(e,t){if(this.state.fetchStatus!==`idle`&&this.#a?.status()!==`rejected`){if(this.state.data!==void 0&&t?.cancelRefetch)this.cancel({silent:!0});else if(this.#a)return this.#a.continueRetry(),this.#a.promise}if(e&&this.setOptions(e),!this.options.queryFn){let e=this.observers.find(e=>e.options.queryFn);e&&this.setOptions(e.options)}let n=new AbortController,r=e=>{Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(this.#s=!0,n.signal)})},i=()=>{let e=ly(this.options,t),n=(()=>{let e={client:this.#i,queryKey:this.queryKey,meta:this.meta};return r(e),e})();return this.#s=!1,this.options.persister?this.options.persister(e,n,this):e(n)},a=(()=>{let e={fetchOptions:t,options:this.options,queryKey:this.queryKey,client:this.#i,state:this.state,fetchFn:i};return r(e),e})();(this.#e===`infinite`?Cy(this.options.pages):this.options.behavior)?.onFetch(a,this),this.#n=this.state,(this.state.fetchStatus===`idle`||this.state.fetchMeta!==a.fetchOptions?.meta)&&this.#l({type:`fetch`,meta:a.fetchOptions?.meta}),this.#a=xy({initialPromise:t?.initialPromise,fn:a.fetchFn,onCancel:e=>{e instanceof by&&e.revert&&this.setState({...this.#n,fetchStatus:`idle`}),n.abort()},onFail:(e,t)=>{this.#l({type:`failed`,failureCount:e,error:t})},onPause:()=>{this.#l({type:`pause`})},onContinue:()=>{this.#l({type:`continue`})},retry:a.options.retry,retryDelay:a.options.retryDelay,networkMode:a.options.networkMode,canRun:()=>!0});try{let e=await this.#a.start();if(e===void 0)throw Error(`${this.queryHash} data is undefined`);return this.setData(e),this.#r.config.onSuccess?.(e,this),this.#r.config.onSettled?.(e,this.state.error,this),e}catch(e){if(e instanceof by){if(e.silent)return this.#a.promise;if(e.revert){if(this.state.data===void 0)throw e;return this.state.data}}throw this.#l({type:`error`,error:e}),this.#r.config.onError?.(e,this),this.#r.config.onSettled?.(this.state.data,e,this),e}finally{this.scheduleGc()}}#l(e){let t=t=>{switch(e.type){case`failed`:return{...t,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case`pause`:return{...t,fetchStatus:`paused`};case`continue`:return{...t,fetchStatus:`fetching`};case`fetch`:return{...t,...Dy(t.data,this.options),fetchMeta:e.meta??null};case`success`:let n={...t,...Oy(e.data,e.dataUpdatedAt),dataUpdateCount:t.dataUpdateCount+1,...!e.manual&&{fetchStatus:`idle`,fetchFailureCount:0,fetchFailureReason:null}};return this.#n=e.manual?n:void 0,n;case`error`:let r=e.error;return{...t,error:r,errorUpdateCount:t.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:t.fetchFailureCount+1,fetchFailureReason:r,fetchStatus:`idle`,status:`error`,isInvalidated:!0};case`invalidate`:return{...t,isInvalidated:!0};case`setState`:return{...t,...e.state}}};this.state=t(this.state),gy.batch(()=>{this.observers.forEach(e=>{e.onQueryUpdate()}),this.#r.notify({query:this,type:`updated`,action:e})})}};function Dy(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:yy(t.networkMode)?`fetching`:`paused`,...e===void 0&&{error:null,status:`pending`}}}function Oy(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:`success`}}function ky(e){let t=typeof e.initialData==`function`?e.initialData():e.initialData,n=t!==void 0,r=n?typeof e.initialDataUpdatedAt==`function`?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:n?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?`success`:`pending`,fetchStatus:`idle`}}var nee=class extends Pv{constructor(e,t){super(),this.options=t,this.#e=e,this.#s=null,this.#o=py(),this.bindMethods(),this.setOptions(t)}#e;#t=void 0;#n=void 0;#r=void 0;#i;#a;#o;#s;#c;#l;#u;#d;#f;#p;#m=new Set;bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(this.#t.addObserver(this),Ay(this.#t,this.options)?this.#h():this.updateResult(),this.#y())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return jy(this.#t,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return jy(this.#t,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.#b(),this.#x(),this.#t.removeObserver(this)}setOptions(e){let t=this.options,n=this.#t;if(this.options=this.#e.defaultQueryOptions(e),this.options.enabled!==void 0&&typeof this.options.enabled!=`boolean`&&typeof this.options.enabled!=`function`&&typeof Gv(this.options.enabled,this.#t)!=`boolean`)throw Error(`Expected enabled to be a boolean or a callback that returns a boolean`);this.#S(),this.#t.setOptions(this.options),t._defaulted&&!$v(this.options,t)&&this.#e.getQueryCache().notify({type:`observerOptionsUpdated`,query:this.#t,observer:this});let r=this.hasListeners();r&&My(this.#t,n,this.options,t)&&this.#h(),this.updateResult(),r&&(this.#t!==n||Gv(this.options.enabled,this.#t)!==Gv(t.enabled,this.#t)||Wv(this.options.staleTime,this.#t)!==Wv(t.staleTime,this.#t))&&this.#g();let i=this.#_();r&&(this.#t!==n||Gv(this.options.enabled,this.#t)!==Gv(t.enabled,this.#t)||i!==this.#p)&&this.#v(i)}getOptimisticResult(e){let t=this.#e.getQueryCache().build(this.#e,e),n=this.createResult(t,e);return Py(this,n)&&(this.#r=n,this.#a=this.options,this.#i=this.#t.state),n}getCurrentResult(){return this.#r}trackResult(e,t){return new Proxy(e,{get:(e,n)=>(this.trackProp(n),t?.(n),n===`promise`&&(this.trackProp(`data`),!this.options.experimental_prefetchInRender&&this.#o.status===`pending`&&this.#o.reject(Error(`experimental_prefetchInRender feature flag is not enabled`))),Reflect.get(e,n))})}trackProp(e){this.#m.add(e)}getCurrentQuery(){return this.#t}refetch({...e}={}){return this.fetch({...e})}fetchOptimistic(e){let t=this.#e.defaultQueryOptions(e),n=this.#e.getQueryCache().build(this.#e,t);return n.fetch().then(()=>this.createResult(n,t))}fetch(e){return this.#h({...e,cancelRefetch:e.cancelRefetch??!0}).then(()=>(this.updateResult(),this.#r))}#h(e){this.#S();let t=this.#t.fetch(this.options,e);return e?.throwOnError||(t=t.catch(Bv)),t}#g(){this.#b();let e=Wv(this.options.staleTime,this.#t);if(fy.isServer()||this.#r.isStale||!Hv(e))return;let t=Uv(this.#r.dataUpdatedAt,e)+1;this.#d=Lv.setTimeout(()=>{this.#r.isStale||this.updateResult()},t)}#_(){return(typeof this.options.refetchInterval==`function`?this.options.refetchInterval(this.#t):this.options.refetchInterval)??!1}#v(e){this.#x(),this.#p=e,!(fy.isServer()||Gv(this.options.enabled,this.#t)===!1||!Hv(this.#p)||this.#p===0)&&(this.#f=Lv.setInterval(()=>{(this.options.refetchIntervalInBackground||Fv.isFocused())&&this.#h()},this.#p))}#y(){this.#g(),this.#v(this.#_())}#b(){this.#d!==void 0&&(Lv.clearTimeout(this.#d),this.#d=void 0)}#x(){this.#f!==void 0&&(Lv.clearInterval(this.#f),this.#f=void 0)}createResult(e,t){let n=this.#t,r=this.options,i=this.#r,a=this.#i,o=this.#a,s=e===n?this.#n:e.state,{state:c}=e,l={...c},u=!1,d;if(t._optimisticResults){let i=this.hasListeners(),a=!i&&Ay(e,t),o=i&&My(e,n,t,r);(a||o)&&(l={...l,...Dy(c.data,e.options)}),t._optimisticResults===`isRestoring`&&(l.fetchStatus=`idle`)}let{error:f,errorUpdatedAt:p,status:m}=l;d=l.data;let h=!1;if(t.placeholderData!==void 0&&d===void 0&&m===`pending`){let e;i?.isPlaceholderData&&t.placeholderData===o?.placeholderData?(e=i.data,h=!0):e=typeof t.placeholderData==`function`?t.placeholderData(this.#u?.state.data,this.#u):t.placeholderData,e!==void 0&&(m=`success`,d=iy(i?.data,e,t),u=!0)}if(t.select&&d!==void 0&&!h)if(i&&d===a?.data&&t.select===this.#c)d=this.#l;else try{this.#c=t.select,d=t.select(d),d=iy(i?.data,d,t),this.#l=d,this.#s=null}catch(e){this.#s=e}this.#s&&(f=this.#s,d=this.#l,p=Date.now(),m=`error`);let g=l.fetchStatus===`fetching`,_=m===`pending`,v=m===`error`,y=_&&g,b=d!==void 0,x={status:m,fetchStatus:l.fetchStatus,isPending:_,isSuccess:m===`success`,isError:v,isInitialLoading:y,isLoading:y,data:d,dataUpdatedAt:l.dataUpdatedAt,error:f,errorUpdatedAt:p,failureCount:l.fetchFailureCount,failureReason:l.fetchFailureReason,errorUpdateCount:l.errorUpdateCount,isFetched:e.isFetched(),isFetchedAfterMount:l.dataUpdateCount>s.dataUpdateCount||l.errorUpdateCount>s.errorUpdateCount,isFetching:g,isRefetching:g&&!_,isLoadingError:v&&!b,isPaused:l.fetchStatus===`paused`,isPlaceholderData:u,isRefetchError:v&&b,isStale:Ny(e,t),refetch:this.refetch,promise:this.#o,isEnabled:Gv(t.enabled,e)!==!1};if(this.options.experimental_prefetchInRender){let t=x.data!==void 0,r=x.status===`error`&&!t,i=e=>{r?e.reject(x.error):t&&e.resolve(x.data)},a=()=>{let e=this.#o=x.promise=py();i(e)},o=this.#o;switch(o.status){case`pending`:e.queryHash===n.queryHash&&i(o);break;case`fulfilled`:(r||x.data!==o.value)&&a();break;case`rejected`:(!r||x.error!==o.reason)&&a()}}return x}updateResult(){let e=this.#r,t=this.createResult(this.#t,this.options);this.#i=this.#t.state,this.#a=this.options,this.#i.data!==void 0&&(this.#u=this.#t),!$v(t,e)&&(this.#r=t,this.#C({listeners:(()=>{if(!e)return!0;let{notifyOnChangeProps:t}=this.options,n=typeof t==`function`?t():t;if(n===`all`||!n&&!this.#m.size)return!0;let r=new Set(n??this.#m);return this.options.throwOnError&&r.add(`error`),Object.keys(this.#r).some(t=>{let n=t;return this.#r[n]!==e[n]&&r.has(n)})})()}))}#S(){let e=this.#e.getQueryCache().build(this.#e,this.options);if(e===this.#t)return;let t=this.#t;this.#t=e,this.#n=e.state,this.hasListeners()&&(t?.removeObserver(this),e.addObserver(this))}onQueryUpdate(){this.updateResult(),this.hasListeners()&&this.#y()}#C(e){gy.batch(()=>{e.listeners&&this.listeners.forEach(e=>{e(this.#r)}),this.#e.getQueryCache().notify({query:this.#t,type:`observerResultsUpdated`})})}};function ree(e,t){return Gv(t.enabled,e)!==!1&&e.state.data===void 0&&(e.state.status!==`error`||Gv(t.retryOnMount,e)!==!1)}function Ay(e,t){return ree(e,t)||e.state.data!==void 0&&jy(e,t,t.refetchOnMount)}function jy(e,t,n){if(Gv(t.enabled,e)!==!1&&Wv(t.staleTime,e)!==`static`){let r=typeof n==`function`?n(e):n;return r===`always`||r!==!1&&Ny(e,t)}return!1}function My(e,t,n,r){return(e!==t||Gv(r.enabled,e)===!1)&&(!n.suspense||e.state.status!==`error`)&&Ny(e,n)}function Ny(e,t){return Gv(t.enabled,e)!==!1&&e.isStaleByTime(Wv(t.staleTime,e))}function Py(e,t){return!$v(e.getCurrentResult(),t)}var Fy=class extends Sy{#e;#t;#n;#r;constructor(e){super(),this.#e=e.client,this.mutationId=e.mutationId,this.#n=e.mutationCache,this.#t=[],this.state=e.state||Iy(),this.setOptions(e.options),this.scheduleGc()}setOptions(e){this.options=e,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(e){this.#t.includes(e)||(this.#t.push(e),this.clearGcTimeout(),this.#n.notify({type:`observerAdded`,mutation:this,observer:e}))}removeObserver(e){this.#t=this.#t.filter(t=>t!==e),this.scheduleGc(),this.#n.notify({type:`observerRemoved`,mutation:this,observer:e})}optionalRemove(){this.#t.length||(this.state.status===`pending`?this.scheduleGc():this.#n.remove(this))}continue(){return this.#r?.continue()??this.execute(this.state.variables)}async execute(e){let t=()=>{this.#i({type:`continue`})},n={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};this.#r=xy({fn:()=>this.options.mutationFn?this.options.mutationFn(e,n):Promise.reject(Error(`No mutationFn found`)),onFail:(e,t)=>{this.#i({type:`failed`,failureCount:e,error:t})},onPause:()=>{this.#i({type:`pause`})},onContinue:t,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#n.canRun(this)});let r=this.state.status===`pending`,i=!this.#r.canStart();try{if(r)t();else{this.#i({type:`pending`,variables:e,isPaused:i}),this.#n.config.onMutate&&await this.#n.config.onMutate(e,this,n);let t=await this.options.onMutate?.(e,n);t!==this.state.context&&this.#i({type:`pending`,context:t,variables:e,isPaused:i})}let a=await this.#r.start();return await this.#n.config.onSuccess?.(a,e,this.state.context,this,n),await this.options.onSuccess?.(a,e,this.state.context,n),await this.#n.config.onSettled?.(a,null,this.state.variables,this.state.context,this,n),await this.options.onSettled?.(a,null,e,this.state.context,n),this.#i({type:`success`,data:a}),a}catch(t){try{await this.#n.config.onError?.(t,e,this.state.context,this,n)}catch(e){Promise.reject(e)}try{await this.options.onError?.(t,e,this.state.context,n)}catch(e){Promise.reject(e)}try{await this.#n.config.onSettled?.(void 0,t,this.state.variables,this.state.context,this,n)}catch(e){Promise.reject(e)}try{await this.options.onSettled?.(void 0,t,e,this.state.context,n)}catch(e){Promise.reject(e)}throw this.#i({type:`error`,error:t}),t}finally{this.#n.runNext(this)}}#i(e){let t=t=>{switch(e.type){case`failed`:return{...t,failureCount:e.failureCount,failureReason:e.error};case`pause`:return{...t,isPaused:!0};case`continue`:return{...t,isPaused:!1};case`pending`:return{...t,context:e.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:e.isPaused,status:`pending`,variables:e.variables,submittedAt:Date.now()};case`success`:return{...t,data:e.data,failureCount:0,failureReason:null,error:null,status:`success`,isPaused:!1};case`error`:return{...t,data:void 0,error:e.error,failureCount:t.failureCount+1,failureReason:e.error,isPaused:!1,status:`error`}}};this.state=t(this.state),gy.batch(()=>{this.#t.forEach(t=>{t.onMutationUpdate(e)}),this.#n.notify({mutation:this,type:`updated`,action:e})})}};function Iy(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:`idle`,variables:void 0,submittedAt:0}}var Ly=class extends Pv{constructor(e={}){super(),this.config=e,this.#e=new Set,this.#t=new Map,this.#n=0}#e;#t;#n;build(e,t,n){let r=new Fy({client:e,mutationCache:this,mutationId:++this.#n,options:e.defaultMutationOptions(t),state:n});return this.add(r),r}add(e){this.#e.add(e);let t=Ry(e);if(typeof t==`string`){let n=this.#t.get(t);n?n.push(e):this.#t.set(t,[e])}this.notify({type:`added`,mutation:e})}remove(e){if(this.#e.delete(e)){let t=Ry(e);if(typeof t==`string`){let n=this.#t.get(t);if(n)if(n.length>1){let t=n.indexOf(e);t!==-1&&n.splice(t,1)}else n[0]===e&&this.#t.delete(t)}}this.notify({type:`removed`,mutation:e})}canRun(e){let t=Ry(e);if(typeof t==`string`){let n=this.#t.get(t)?.find(e=>e.state.status===`pending`);return!n||n===e}return!0}runNext(e){let t=Ry(e);return typeof t==`string`?(this.#t.get(t)?.find(t=>t!==e&&t.state.isPaused))?.continue()??Promise.resolve():Promise.resolve()}clear(){gy.batch(()=>{this.#e.forEach(e=>{this.notify({type:`removed`,mutation:e})}),this.#e.clear(),this.#t.clear()})}getAll(){return Array.from(this.#e)}find(e){let t={exact:!0,...e};return this.getAll().find(e=>qv(t,e))}findAll(e={}){return this.getAll().filter(t=>qv(e,t))}notify(e){gy.batch(()=>{this.listeners.forEach(t=>{t(e)})})}resumePausedMutations(){let e=this.getAll().filter(e=>e.state.isPaused);return gy.batch(()=>Promise.all(e.map(e=>e.continue().catch(Bv))))}};function Ry(e){return e.options.scope?.id}var zy=class extends Pv{#e;#t=void 0;#n;#r;constructor(e,t){super(),this.#e=e,this.setOptions(t),this.bindMethods(),this.#i()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(e){let t=this.options;this.options=this.#e.defaultMutationOptions(e),$v(this.options,t)||this.#e.getMutationCache().notify({type:`observerOptionsUpdated`,mutation:this.#n,observer:this}),t?.mutationKey&&this.options.mutationKey&&Yv(t.mutationKey)!==Yv(this.options.mutationKey)?this.reset():this.#n?.state.status===`pending`&&this.#n.setOptions(this.options)}onUnsubscribe(){this.hasListeners()||this.#n?.removeObserver(this)}onMutationUpdate(e){this.#i(),this.#a(e)}getCurrentResult(){return this.#t}reset(){this.#n?.removeObserver(this),this.#n=void 0,this.#i(),this.#a()}mutate(e,t){return this.#r=t,this.#n?.removeObserver(this),this.#n=this.#e.getMutationCache().build(this.#e,this.options),this.#n.addObserver(this),this.#n.execute(e)}#i(){let e=this.#n?.state??Iy();this.#t={...e,isPending:e.status===`pending`,isSuccess:e.status===`success`,isError:e.status===`error`,isIdle:e.status===`idle`,mutate:this.mutate,reset:this.reset}}#a(e){gy.batch(()=>{if(this.#r&&this.hasListeners()){let t=this.#t.variables,n=this.#t.context,r={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};if(e?.type===`success`){try{this.#r.onSuccess?.(e.data,t,n,r)}catch(e){Promise.reject(e)}try{this.#r.onSettled?.(e.data,null,t,n,r)}catch(e){Promise.reject(e)}}else if(e?.type===`error`){try{this.#r.onError?.(e.error,t,n,r)}catch(e){Promise.reject(e)}try{this.#r.onSettled?.(void 0,e.error,t,n,r)}catch(e){Promise.reject(e)}}}this.listeners.forEach(e=>{e(this.#t)})})}},By=class extends Pv{constructor(e={}){super(),this.config=e,this.#e=new Map}#e;build(e,t,n){let r=t.queryKey,i=t.queryHash??Jv(r,t),a=this.get(i);return a||(a=new Ey({client:e,queryKey:r,queryHash:i,options:e.defaultQueryOptions(t),state:n,defaultOptions:e.getQueryDefaults(r)}),this.add(a)),a}add(e){this.#e.has(e.queryHash)||(this.#e.set(e.queryHash,e),this.notify({type:`added`,query:e}))}remove(e){let t=this.#e.get(e.queryHash);t&&(e.destroy(),t===e&&this.#e.delete(e.queryHash),this.notify({type:`removed`,query:e}))}clear(){gy.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}get(e){return this.#e.get(e)}getAll(){return[...this.#e.values()]}find(e){let t={exact:!0,...e};return this.getAll().find(e=>Kv(t,e))}findAll(e={}){let t=this.getAll();return Object.keys(e).length>0?t.filter(t=>Kv(e,t)):t}notify(e){gy.batch(()=>{this.listeners.forEach(t=>{t(e)})})}onFocus(){gy.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){gy.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},Vy=class{#e;#t;#n;#r;#i;#a;#o;#s;constructor(e={}){this.#e=e.queryCache||new By,this.#t=e.mutationCache||new Ly,this.#n=e.defaultOptions||{},this.#r=new Map,this.#i=new Map,this.#a=0}mount(){this.#a++,this.#a===1&&(this.#o=Fv.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onFocus())}),this.#s=_y.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onOnline())}))}unmount(){this.#a--,this.#a===0&&(this.#o?.(),this.#o=void 0,this.#s?.(),this.#s=void 0)}isFetching(e){return this.#e.findAll({...e,fetchStatus:`fetching`}).length}isMutating(e){return this.#t.findAll({...e,status:`pending`}).length}getQueryData(e){let t=this.defaultQueryOptions({queryKey:e});return this.#e.get(t.queryHash)?.state.data}ensureQueryData(e){let t=this.defaultQueryOptions(e),n=this.#e.build(this,t),r=n.state.data;return r===void 0?this.fetchQuery(e):(e.revalidateIfStale&&n.isStaleByTime(Wv(t.staleTime,n))&&this.prefetchQuery(t),Promise.resolve(r))}getQueriesData(e){return this.#e.findAll(e).map(({queryKey:e,state:t})=>[e,t.data])}setQueryData(e,t,n){let r=this.defaultQueryOptions({queryKey:e}),i=this.#e.get(r.queryHash)?.state.data,a=Vv(t,i);if(a!==void 0)return this.#e.build(this,r).setData(a,{...n,manual:!0})}setQueriesData(e,t,n){return gy.batch(()=>this.#e.findAll(e).map(({queryKey:e})=>[e,this.setQueryData(e,t,n)]))}getQueryState(e){let t=this.defaultQueryOptions({queryKey:e});return this.#e.get(t.queryHash)?.state}removeQueries(e){let t=this.#e;gy.batch(()=>{t.findAll(e).forEach(e=>{t.remove(e)})})}resetQueries(e,t){let n=this.#e;return gy.batch(()=>(n.findAll(e).forEach(e=>{e.reset()}),this.refetchQueries({type:`active`,...e},t)))}cancelQueries(e,t={}){let n={revert:!0,...t},r=gy.batch(()=>this.#e.findAll(e).map(e=>e.cancel(n)));return Promise.all(r).then(Bv).catch(Bv)}invalidateQueries(e,t={}){return gy.batch(()=>(this.#e.findAll(e).forEach(e=>{e.invalidate()}),e?.refetchType===`none`?Promise.resolve():this.refetchQueries({...e,type:e?.refetchType??e?.type??`active`},t)))}refetchQueries(e,t={}){let n={...t,cancelRefetch:t.cancelRefetch??!0},r=gy.batch(()=>this.#e.findAll(e).filter(e=>!e.isDisabled()&&!e.isStatic()).map(e=>{let t=e.fetch(void 0,n);return n.throwOnError||(t=t.catch(Bv)),e.state.fetchStatus===`paused`?Promise.resolve():t}));return Promise.all(r).then(Bv)}fetchQuery(e){let t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);let n=this.#e.build(this,t);return n.isStaleByTime(Wv(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(Bv).catch(Bv)}fetchInfiniteQuery(e){return e._type=`infinite`,this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(Bv).catch(Bv)}ensureInfiniteQueryData(e){return e._type=`infinite`,this.ensureQueryData(e)}resumePausedMutations(){return _y.isOnline()?this.#t.resumePausedMutations():Promise.resolve()}getQueryCache(){return this.#e}getMutationCache(){return this.#t}getDefaultOptions(){return this.#n}setDefaultOptions(e){this.#n=e}setQueryDefaults(e,t){this.#r.set(Yv(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){let t=[...this.#r.values()],n={};return t.forEach(t=>{Xv(e,t.queryKey)&&Object.assign(n,t.defaultOptions)}),n}setMutationDefaults(e,t){this.#i.set(Yv(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){let t=[...this.#i.values()],n={};return t.forEach(t=>{Xv(e,t.mutationKey)&&Object.assign(n,t.defaultOptions)}),n}defaultQueryOptions(e){if(e._defaulted)return e;let t={...this.#n.queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||=Jv(t.queryKey,t),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!==`always`),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode=`offlineFirst`),t.queryFn===cy&&(t.enabled=!1),t}defaultMutationOptions(e){return e?._defaulted?e:{...this.#n.mutations,...e?.mutationKey&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){this.#e.clear(),this.#t.clear()}},Hy=w.createContext(void 0),Uy=e=>{let t=w.useContext(Hy);if(e)return e;if(!t)throw Error(`No QueryClient set, use QueryClientProvider to set one`);return t},Wy=({client:e,children:t})=>(w.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),(0,G.jsx)(Hy.Provider,{value:e,children:t})),Gy=w.createContext(!1),Ky=()=>w.useContext(Gy);Gy.Provider;function qy(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var Jy=w.createContext(qy()),Yy=()=>w.useContext(Jy),Xy=(e,t,n)=>{let r=n?.state.error&&typeof e.throwOnError==`function`?uy(e.throwOnError,[n.state.error,n]):e.throwOnError;(e.suspense||e.experimental_prefetchInRender||r)&&(t.isReset()||(e.retryOnMount=!1))},Zy=e=>{w.useEffect(()=>{e.clearReset()},[e])},Qy=({result:e,errorResetBoundary:t,throwOnError:n,query:r,suspense:i})=>e.isError&&!t.isReset()&&!e.isFetching&&r&&(i&&e.data===void 0||uy(n,[e.error,r])),$y=e=>{if(e.suspense){let t=1e3,n=e=>e===`static`?e:Math.max(e??t,t),r=e.staleTime;e.staleTime=typeof r==`function`?(...e)=>n(r(...e)):n(r),typeof e.gcTime==`number`&&(e.gcTime=Math.max(e.gcTime,t))}},eb=(e,t)=>e.isLoading&&e.isFetching&&!t,tb=(e,t)=>e?.suspense&&t.isPending,nb=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function rb(e,t,n){let r=Ky(),i=Yy(),a=Uy(n),o=a.defaultQueryOptions(e);a.getDefaultOptions().queries?._experimental_beforeQuery?.(o);let s=a.getQueryCache().get(o.queryHash),c=e.subscribed!==!1;o._optimisticResults=r?`isRestoring`:c?`optimistic`:void 0,$y(o),Xy(o,i,s),Zy(i);let l=!a.getQueryCache().get(o.queryHash),[u]=w.useState(()=>new t(a,o)),d=u.getOptimisticResult(o),f=!r&&c;if(w.useSyncExternalStore(w.useCallback(e=>{let t=f?u.subscribe(gy.batchCalls(e)):Bv;return u.updateResult(),t},[u,f]),()=>u.getCurrentResult(),()=>u.getCurrentResult()),w.useEffect(()=>{u.setOptions(o)},[o,u]),tb(o,d))throw nb(o,u,i);if(Qy({result:d,errorResetBoundary:i,throwOnError:o.throwOnError,query:s,suspense:o.suspense}))throw d.error;return a.getDefaultOptions().queries?._experimental_afterQuery?.(o,d),o.experimental_prefetchInRender&&!fy.isServer()&&eb(d,r)&&(l?nb(o,u,i):s?.promise)?.catch(Bv).finally(()=>{u.updateResult()}),o.notifyOnChangeProps?d:u.trackResult(d)}function ib(e,t){return rb(e,nee,t)}function ab(e,t){let n=Uy(t),[r]=w.useState(()=>new zy(n,e));w.useEffect(()=>{r.setOptions(e)},[r,e]);let i=w.useSyncExternalStore(w.useCallback(e=>r.subscribe(gy.batchCalls(e)),[r]),()=>r.getCurrentResult(),()=>r.getCurrentResult()),a=w.useCallback((e,t)=>{r.mutate(e,t).catch(Bv)},[r]);if(i.error&&uy(r.options.throwOnError,[i.error]))throw i.error;return{...i,mutate:a,mutateAsync:i.mutate}}var ob=o((e=>{function t(e,t){var n=e.length;e.push(t);a:for(;0<n;){var r=n-1>>>1,a=e[r];if(0<i(a,t))e[r]=t,e[n]=a,n=r;else break a}}function n(e){return e.length===0?null:e[0]}function r(e){if(e.length===0)return null;var t=e[0],n=e.pop();if(n!==t){e[0]=n;a:for(var r=0,a=e.length,o=a>>>1;r<o;){var s=2*(r+1)-1,c=e[s],l=s+1,u=e[l];if(0>i(c,n))l<a&&0>i(u,c)?(e[r]=u,e[l]=n,r=l):(e[r]=c,e[s]=n,r=s);else if(l<a&&0>i(u,n))e[r]=u,e[l]=n,r=l;else break a}}return t}function i(e,t){var n=e.sortIndex-t.sortIndex;return n===0?e.id-t.id:n}if(e.unstable_now=void 0,typeof performance==`object`&&typeof performance.now==`function`){var a=performance;e.unstable_now=function(){return a.now()}}else{var o=Date,s=o.now();e.unstable_now=function(){return o.now()-s}}var c=[],l=[],u=1,d=null,f=3,p=!1,m=!1,h=!1,g=!1,_=typeof setTimeout==`function`?setTimeout:null,v=typeof clearTimeout==`function`?clearTimeout:null,y=typeof setImmediate<`u`?setImmediate:null;function b(e){for(var i=n(l);i!==null;){if(i.callback===null)r(l);else if(i.startTime<=e)r(l),i.sortIndex=i.expirationTime,t(c,i);else break;i=n(l)}}function x(e){if(h=!1,b(e),!m)if(n(c)!==null)m=!0,S||(S=!0,O());else{var t=n(l);t!==null&&j(x,t.startTime-e)}}var S=!1,C=-1,w=5,T=-1;function E(){return g?!0:!(e.unstable_now()-T<w)}function D(){if(g=!1,S){var t=e.unstable_now();T=t;var i=!0;try{a:{m=!1,h&&(h=!1,v(C),C=-1),p=!0;var a=f;try{b:{for(b(t),d=n(c);d!==null&&!(d.expirationTime>t&&E());){var o=d.callback;if(typeof o==`function`){d.callback=null,f=d.priorityLevel;var s=o(d.expirationTime<=t);if(t=e.unstable_now(),typeof s==`function`){d.callback=s,b(t),i=!0;break b}d===n(c)&&r(c),b(t)}else r(c);d=n(c)}if(d!==null)i=!0;else{var u=n(l);u!==null&&j(x,u.startTime-t),i=!1}}break a}finally{d=null,f=a,p=!1}}}finally{i?O():S=!1}}}var O;if(typeof y==`function`)O=function(){y(D)};else if(typeof MessageChannel<`u`){var k=new MessageChannel,A=k.port2;k.port1.onmessage=D,O=function(){A.postMessage(null)}}else O=function(){_(D,0)};function j(t,n){C=_(function(){t(e.unstable_now())},n)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(e){e.callback=null},e.unstable_forceFrameRate=function(e){0>e||125<e?console.error(`forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported`):w=0<e?Math.floor(1e3/e):5},e.unstable_getCurrentPriorityLevel=function(){return f},e.unstable_next=function(e){switch(f){case 1:case 2:case 3:var t=3;break;default:t=f}var n=f;f=t;try{return e()}finally{f=n}},e.unstable_requestPaint=function(){g=!0},e.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=f;f=e;try{return t()}finally{f=n}},e.unstable_scheduleCallback=function(r,i,a){var o=e.unstable_now();switch(typeof a==`object`&&a?(a=a.delay,a=typeof a==`number`&&0<a?o+a:o):a=o,r){case 1:var s=-1;break;case 2:s=250;break;case 5:s=1073741823;break;case 4:s=1e4;break;default:s=5e3}return s=a+s,r={id:u++,callback:i,priorityLevel:r,startTime:a,expirationTime:s,sortIndex:-1},a>o?(r.sortIndex=a,t(l,r),n(c)===null&&r===n(l)&&(h?(v(C),C=-1):h=!0,j(x,a-o))):(r.sortIndex=s,t(c,r),m||p||(m=!0,S||(S=!0,O()))),r},e.unstable_shouldYield=E,e.unstable_wrapCallback=function(e){var t=f;return function(){var n=f;f=t;try{return e.apply(this,arguments)}finally{f=n}}}})),sb=o(((e,t)=>{t.exports=ob()})),cb=o((e=>{var t=sb(),n=C(),r=Je();function i(e){var t=`https://react.dev/errors/`+e;if(1<arguments.length){t+=`?args[]=`+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+=`&args[]=`+encodeURIComponent(arguments[n])}return`Minified React error #`+e+`; visit `+t+` for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`}function a(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function o(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,t.flags&4098&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function s(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function c(e){if(e.tag===31){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function l(e){if(o(e)!==e)throw Error(i(188))}function u(e){var t=e.alternate;if(!t){if(t=o(e),t===null)throw Error(i(188));return t===e?e:null}for(var n=e,r=t;;){var a=n.return;if(a===null)break;var s=a.alternate;if(s===null){if(r=a.return,r!==null){n=r;continue}break}if(a.child===s.child){for(s=a.child;s;){if(s===n)return l(a),e;if(s===r)return l(a),t;s=s.sibling}throw Error(i(188))}if(n.return!==r.return)n=a,r=s;else{for(var c=!1,u=a.child;u;){if(u===n){c=!0,n=a,r=s;break}if(u===r){c=!0,r=a,n=s;break}u=u.sibling}if(!c){for(u=s.child;u;){if(u===n){c=!0,n=s,r=a;break}if(u===r){c=!0,r=s,n=a;break}u=u.sibling}if(!c)throw Error(i(189))}}if(n.alternate!==r)throw Error(i(190))}if(n.tag!==3)throw Error(i(188));return n.stateNode.current===n?e:t}function d(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=d(e),t!==null)return t;e=e.sibling}return null}var f=Object.assign,p=Symbol.for(`react.element`),m=Symbol.for(`react.transitional.element`),h=Symbol.for(`react.portal`),g=Symbol.for(`react.fragment`),_=Symbol.for(`react.strict_mode`),v=Symbol.for(`react.profiler`),y=Symbol.for(`react.consumer`),b=Symbol.for(`react.context`),x=Symbol.for(`react.forward_ref`),S=Symbol.for(`react.suspense`),w=Symbol.for(`react.suspense_list`),T=Symbol.for(`react.memo`),E=Symbol.for(`react.lazy`),D=Symbol.for(`react.activity`),O=Symbol.for(`react.memo_cache_sentinel`),k=Symbol.iterator;function A(e){return typeof e!=`object`||!e?null:(e=k&&e[k]||e[`@@iterator`],typeof e==`function`?e:null)}var j=Symbol.for(`react.client.reference`);function M(e){if(e==null)return null;if(typeof e==`function`)return e.$$typeof===j?null:e.displayName||e.name||null;if(typeof e==`string`)return e;switch(e){case g:return`Fragment`;case v:return`Profiler`;case _:return`StrictMode`;case S:return`Suspense`;case w:return`SuspenseList`;case D:return`Activity`}if(typeof e==`object`)switch(e.$$typeof){case h:return`Portal`;case b:return e.displayName||`Context`;case y:return(e._context.displayName||`Context`)+`.Consumer`;case x:var t=e.render;return e=e.displayName,e||=(e=t.displayName||t.name||``,e===``?`ForwardRef`:`ForwardRef(`+e+`)`),e;case T:return t=e.displayName||null,t===null?M(e.type)||`Memo`:t;case E:t=e._payload,e=e._init;try{return M(e(t))}catch{}}return null}var N=Array.isArray,P=n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,F=r.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,I={pending:!1,data:null,method:null,action:null},L=[],R=-1;function z(e){return{current:e}}function B(e){0>R||(e.current=L[R],L[R]=null,R--)}function V(e,t){R++,L[R]=e.current,e.current=t}var H=z(null),ee=z(null),te=z(null),U=z(null);function ne(e,t){switch(V(te,t),V(ee,e),V(H,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?Wd(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=Wd(t),e=Gd(t,e);else switch(e){case`svg`:e=1;break;case`math`:e=2;break;default:e=0}}B(H),V(H,e)}function re(){B(H),B(ee),B(te)}function ie(e){e.memoizedState!==null&&V(U,e);var t=H.current,n=Gd(t,e.type);t!==n&&(V(ee,e),V(H,n))}function ae(e){ee.current===e&&(B(H),B(ee)),U.current===e&&(B(U),tp._currentValue=I)}var oe,se;function ce(e){if(oe===void 0)try{throw Error()}catch(e){var t=e.stack.trim().match(/\n( *(at )?)/);oe=t&&t[1]||``,se=-1<e.stack.indexOf(`
49
+ `),a=!1),Object.assign(Object.assign({},e),{allowNegative:a})}function Sg(e){e=xg(e),e.decimalSeparator,e.allowedDecimalSeparators,e.thousandsGroupStyle;var t=e.suffix,n=e.allowNegative,r=e.allowLeadingZeros,i=e.onKeyDown;i===void 0&&(i=Lh);var a=e.onBlur;a===void 0&&(a=Lh);var o=e.thousandSeparator,s=e.decimalScale,c=e.fixedDecimalScale,l=e.prefix;l===void 0&&(l=``);var u=e.defaultValue,d=e.value,f=e.valueIsNumericString,p=e.onValueChange,m=Fh(e,[`decimalSeparator`,`allowedDecimalSeparators`,`thousandsGroupStyle`,`suffix`,`allowNegative`,`allowLeadingZeros`,`onKeyDown`,`onBlur`,`thousandSeparator`,`decimalScale`,`fixedDecimalScale`,`prefix`,`defaultValue`,`value`,`valueIsNumericString`,`onValueChange`]),h=hg(e),g=h.decimalSeparator,_=h.allowedDecimalSeparators,v=function(t){return mg(t,e)},y=function(t,n){return yg(t,n,e)},b=Bh(d)?u:d,x=f??vg(b,l,t);Bh(d)?Bh(u)||(x||=typeof u==`number`):x||=typeof d==`number`;var S=function(e){return Hh(e)?e:(typeof e==`number`&&(e=Zh(e)),x&&typeof s==`number`?Qh(e,s,!!c):e)},C=ug(S(d),S(u),!!x,v,y,p),w=C[0],T=w.numAsString,E=w.formattedValue,D=C[1];return Object.assign(Object.assign({},m),{value:E,valueIsNumericString:!1,isValidInputCharacter:function(e){return e===g||zh(e)},isCharacterSame:function(e){var t=e.currentValue,n=e.lastValue,r=e.formattedValue,i=e.currentValueIndex,a=e.formattedValueIndex,o=t[i],u=r[a],f=eg(n,t).to,p=function(e){return y(e).indexOf(`.`)+l.length};return d===0&&c&&s&&t[f.start]===g&&p(t)<i&&p(r)>a?!1:i>=f.start&&i<f.end&&_&&_.includes(o)&&u===g?!0:o===u},onValueChange:D,format:v,removeFormatting:y,getCaretBoundary:function(t){return bg(t,e)},onKeyDown:function(e){var t=e.target,r=e.key,a=t.selectionStart,u=t.selectionEnd,d=t.value;if(d===void 0&&(d=``),(r===`Backspace`||r===`Delete`)&&u<l.length&&d!==`-`){e.preventDefault();return}if(a!==u){i(e);return}r===`Backspace`&&d[0]===`-`&&a===l.length+1&&n&&$h(t,1),s&&c&&(r===`Backspace`&&d[a-1]===g?($h(t,a-1),e.preventDefault()):r===`Delete`&&d[a]===g&&e.preventDefault()),_?.includes(r)&&d[a]===g&&$h(t,a+1);var f=o===!0?`,`:o;r===`Backspace`&&d[a-1]===f&&$h(t,a-1),r===`Delete`&&d[a]===f&&$h(t,a+1),i(e)},onBlur:function(t){var n=T;n.match(/\d/g)||(n=``),r||(n=Jh(n)),c&&s&&(n=Qh(n,s,c)),n!==T&&D({formattedValue:mg(n,e),value:n,floatValue:parseFloat(n)},{event:t,source:Ih.event}),a(t)}})}function Cg(e){var t=Sg(e);return w.createElement(pg,Object.assign({},t))}function wg({direction:e,style:t,...n}){return(0,G.jsx)(`svg`,{style:{width:`var(--ni-chevron-size)`,height:`var(--ni-chevron-size)`,transform:e===`up`?`rotate(180deg)`:void 0,...t},viewBox:`0 0 15 15`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,...n,children:(0,G.jsx)(`path`,{d:`M3.13523 6.15803C3.3241 5.95657 3.64052 5.94637 3.84197 6.13523L7.5 9.56464L11.158 6.13523C11.3595 5.94637 11.6759 5.95657 11.8648 6.15803C12.0536 6.35949 12.0434 6.67591 11.842 6.86477L7.84197 10.6148C7.64964 10.7951 7.35036 10.7951 7.15803 10.6148L3.15803 6.86477C2.95657 6.67591 2.94637 6.35949 3.13523 6.15803Z`,fill:`currentColor`,fillRule:`evenodd`,clipRule:`evenodd`})})}var Tg={root:`m_e2f5cd4e`,controls:`m_95e17d22`,control:`m_80b4b171`},Eg=/^(0\.0*|-0(\.0*)?)$/,Dg=/^-?0\d+(\.\d+)?\.?$/,Og=/\.\d*0$/,kg=/^-?\d+\.$/;function Ag(e){return typeof e==`string`&&e!==``&&!Number.isNaN(Number(e))}function jg(e){return typeof e==`bigint`}function Mg(e){return typeof e==`number`?e<2**53-1:e===``||Ag(e)&&Number(e)<2**53-1}function Ng(e,t){return e===``||e===`-`||!t&&e.startsWith(`-`)?!1:/^-?\d+$/.test(e)}function Pg(e,t){return typeof e==`bigint`||e===``||Ng(e,t)}function Fg(e){if(!/^-?\d+$/.test(e))return null;try{return BigInt(e)}catch{return null}}function Ig(e){if(typeof e==`bigint`)return e;if(typeof e==`number`&&Number.isFinite(e)&&Number.isInteger(e))return BigInt(e)}function Lg(e,t,n){return t!==void 0&&e<t?t:n!==void 0&&e>n?n:e}function Rg(e){return e.toString().replace(`.`,``).length}function zg(e,t){return(typeof e==`number`?e<2**53-1:!Number.isNaN(Number(e)))&&!Number.isNaN(e)&&Rg(t)<14&&t!==``}function Bg(e,t,n){return e===void 0||(t===void 0||e>=t)&&(n===void 0||e<=n)}var Vg={size:`sm`,step:1,clampBehavior:`blur`,allowDecimal:!0,allowNegative:!0,withKeyboardEvents:!0,allowLeadingZeros:!0,trimLeadingZeroesOnBlur:!0,startValue:0,allowedDecimalSeparators:[`.`,`,`]},Hg=mt((e,{size:t})=>({controls:{"--ni-chevron-size":I(t,`ni-chevron-size`)}}));function Ug(e,t,n){let r=e.toString(),i=kg.test(r),a=r.replace(/^0+(?=\d)/,``),o=parseFloat(a);if(Number.isNaN(o))return a;if(o>2**53-1)return t===void 0?a:t;let s=re(o,n,t);return i?`${s.toString().replace(/^0+(?=\d)/,``)}.`:s}function Wg(e,t){if(e===``||e===`-`)return e;let n=Fg(e);return n===null?e:t.clampBehavior===`blur`?Lg(n,t.min,t.max):n}var Gg=kr(e=>{let t=K([`Input`,`InputWrapper`,`NumberInput`],Vg,e),{className:n,classNames:r,styles:i,unstyled:a,vars:o,onChange:s,onValueChange:c,value:l,defaultValue:u,max:d,min:f,step:p,hideControls:m,rightSection:h,isAllowed:g,clampBehavior:_,onBlur:v,allowDecimal:y,decimalScale:b,onKeyDown:x,onKeyDownCapture:S,handlersRef:C,startValue:T,disabled:E,rightSectionPointerEvents:D,allowNegative:O,readOnly:k,size:A,rightSectionWidth:j,stepHoldInterval:M,stepHoldDelay:N,allowLeadingZeros:F,withKeyboardEvents:I,trimLeadingZeroesOnBlur:L,allowedDecimalSeparators:R,selectAllOnFocus:z,onMinReached:B,onMaxReached:V,onFocus:H,attributes:ee,ref:te,...U}=t,ne=O??!0,ie=F??!0,ae=Jn({name:`NumberInput`,classes:Tg,props:t,classNames:r,styles:i,unstyled:a,attributes:ee,vars:o,varsResolver:Hg}),{resolvedClassNames:oe,resolvedStyles:se}=Pn({classNames:r,styles:i,props:t}),ce=(0,w.useRef)(jg(l)||jg(u)?`bigint`:`number`);jg(l)?ce.current=`bigint`:typeof l==`number`&&(ce.current=`number`);let le=ce.current===`bigint`,[W,ue]=Me({value:l,defaultValue:u,finalValue:``,onChange:s}),de=N!==void 0&&M!==void 0,fe=(0,w.useRef)(null),pe=(0,w.useRef)(null),me=(0,w.useRef)(0),he=typeof f==`number`?f:void 0,ge=typeof d==`number`?d:void 0,_e=typeof p==`number`?p:Vg.step,ve=typeof T==`number`?T:Vg.startValue,ye=Ig(f),be=Ig(d),xe=Ig(p)??BigInt(1),Se=Ig(T)??BigInt(0),Ce=e=>!Ng(e,ne)||ie&&Dg.test(e)?e:Fg(e)??e,we=e=>{let t=Number(e);return Number.isSafeInteger(t)?t:void 0},Te=(e,t)=>{t.source===`event`&&ue(le?Ce(e.value):zg(e.floatValue,e.value)&&!Eg.test(e.value)&&!(ie&&Dg.test(e.value))&&!Og.test(e.value)&&!kg.test(e.value)?e.floatValue:e.value),c?.(e,t)},Ee=e=>{let t=String(e).match(/(?:\.(\d+))?(?:[eE]([+-]?\d+))?$/);return t?Math.max(0,(t[1]?t[1].length:0)-(t[2]?+t[2]:0)):0},De=e=>{fe.current&&e!==void 0&&fe.current.setSelectionRange(e,e)},Oe=(0,w.useRef)(P);Oe.current=()=>{if(le){if(!Pg(W,ne))return;let e,t=W;if(typeof t==`bigint`){let n=t+xe;be!==void 0&&n>be&&V?.(),e=be!==void 0&&n>be?be:n}else if(typeof t==`string`&&t!==``){let n=Fg(t);if(n===null)return;let r=n+xe;be!==void 0&&r>be&&V?.(),e=be!==void 0&&r>be?be:r}else e=Lg(Se,ye,be);let n=e.toString();ue(e),c?.({floatValue:we(e),formattedValue:n,value:n},{source:`increment`}),setTimeout(()=>De(fe.current?.value.length),0);return}if(!Mg(W))return;let e,t=Ee(W),n=Ee(_e),r=Math.max(t,n),i=10**r;if(!Ag(W)&&(typeof W!=`number`||Number.isNaN(W)))e=re(ve,he,ge);else if(ge!==void 0){let t=(Math.round(Number(W)*i)+Math.round(_e*i))/i;t>ge&&V?.(),e=t<=ge?t:ge}else e=(Math.round(Number(W)*i)+Math.round(_e*i))/i;let a=e.toFixed(r);ue(parseFloat(a)),c?.({floatValue:parseFloat(a),formattedValue:a,value:a},{source:`increment`}),setTimeout(()=>De(fe.current?.value.length),0)};let Ae=(0,w.useRef)(P);Ae.current=()=>{if(le){if(!Pg(W,ne))return;let e,t=ye===void 0?ne?void 0:BigInt(0):ye,n=W;if(typeof n==`bigint`){let r=n-xe;t!==void 0&&r<t&&B?.(),e=t!==void 0&&r<t?t:r}else if(typeof n==`string`&&n!==``){let r=Fg(n);if(r===null)return;let i=r-xe;t!==void 0&&i<t&&B?.(),e=t!==void 0&&i<t?t:i}else e=Lg(Se,t,be);let r=e.toString();ue(e),c?.({floatValue:we(e),formattedValue:r,value:r},{source:`decrement`}),setTimeout(()=>De(fe.current?.value.length),0);return}if(!Mg(W))return;let e,t=he===void 0?ne?-(2**53-1):0:he,n=Ee(W),r=Ee(_e),i=Math.max(n,r),a=10**i;if(!Ag(W)&&typeof W!=`number`||Number.isNaN(W))e=re(ve,t,ge);else{let n=(Math.round(Number(W)*a)-Math.round(_e*a))/a;t!==void 0&&n<t&&B?.(),e=t!==void 0&&n<t?t:n}let o=e.toFixed(i);ue(parseFloat(o)),c?.({floatValue:parseFloat(o),formattedValue:o,value:o},{source:`decrement`}),setTimeout(()=>De(fe.current?.value.length),0)};let Ne=e=>{let t=e.clipboardData.getData(`text`),n=U.decimalSeparator||`.`,r=(R||[`.`,`,`]).filter(e=>e!==n);if(r.some(e=>t.includes(e))){e.preventDefault();let i=t;r.forEach(e=>{i=i.split(e).join(n)});let a=fe.current;if(a){let e=a.selectionStart??0,t=a.selectionEnd??0,n=a.value,r=n.substring(0,e)+i+n.substring(t);(Object.getOwnPropertyDescriptor(window.HTMLInputElement.prototype,`value`)?.set)?.call(a,r),a.dispatchEvent(new Event(`change`,{bubbles:!0}));let o=e+i.length;setTimeout(()=>De(o),0)}}U.onPaste?.(e)},Pe=e=>{x?.(e),!(k||!I)&&(e.key===`ArrowUp`&&(e.preventDefault(),Oe.current?.()),e.key===`ArrowDown`&&(e.preventDefault(),Ae.current?.()))},Fe=e=>{if(S?.(e),e.key===`Backspace`){let t=fe.current;t&&t.selectionStart===0&&t.selectionStart===t.selectionEnd&&(e.preventDefault(),window.setTimeout(()=>De(0),0))}},Ie=e=>{z&&setTimeout(()=>e.currentTarget.select(),0),H?.(e)},Le=e=>{let t=W;le?(_===`blur`&&typeof t==`bigint`&&(t=Lg(t,ye,be)),L&&typeof t==`string`&&(t=Wg(t,{min:ye,max:be,clampBehavior:_}))):(_===`blur`&&typeof t==`number`&&(t=re(t,he,ge)),L&&typeof t==`string`&&Ee(t)<15&&(t=Ug(t,ge,he))),W!==t&&ue(t),v?.(e)};ke(C,{increment:Oe.current,decrement:Ae.current});let Re=e=>{e?Oe.current?.():Ae.current?.(),me.current+=1},ze=e=>{if(Re(e),de){let t=typeof M==`number`?M:M(me.current);pe.current=window.setTimeout(()=>ze(e),t)}},Be=(e,t)=>{e.preventDefault(),fe.current?.focus(),Re(t),de&&(pe.current=window.setTimeout(()=>ze(t),N))},Ve=()=>{pe.current&&window.clearTimeout(pe.current),pe.current=null,me.current=0},He=(0,G.jsxs)(`div`,{...ae(`controls`),children:[(0,G.jsx)(sc,{...ae(`control`),tabIndex:-1,"aria-hidden":!0,disabled:E||typeof W==`number`&&ge!==void 0&&W>=ge||typeof W==`bigint`&&be!==void 0&&W>=be,mod:{direction:`up`},onMouseDown:e=>e.preventDefault(),onPointerDown:e=>{Be(e,!0)},onPointerUp:Ve,onPointerLeave:Ve,children:(0,G.jsx)(wg,{direction:`up`})}),(0,G.jsx)(sc,{...ae(`control`),tabIndex:-1,"aria-hidden":!0,disabled:E||typeof W==`number`&&he!==void 0&&W<=he||typeof W==`bigint`&&ye!==void 0&&W<=ye,mod:{direction:`down`},onMouseDown:e=>e.preventDefault(),onPointerDown:e=>{Be(e,!1)},onPointerUp:Ve,onPointerLeave:Ve,children:(0,G.jsx)(wg,{direction:`down`})})]});return(0,G.jsx)(wd,{component:Cg,allowNegative:O,className:gt(Tg.root,n),size:A,...U,inputMode:le?`numeric`:`decimal`,readOnly:k,disabled:E,value:typeof W==`bigint`?W.toString():W,getInputRef:je(te,fe),onValueChange:Te,rightSection:m||k||!(le?Pg(W,ne):Mg(W))?h:h||He,classNames:oe,styles:se,unstyled:a,__staticSelector:`NumberInput`,decimalScale:le?0:y?b:0,onPaste:Ne,onFocus:Ie,onKeyDown:Pe,onKeyDownCapture:Fe,rightSectionPointerEvents:D??(E?`none`:void 0),rightSectionWidth:j??`var(--ni-right-section-width-${A||`sm`})`,allowLeadingZeros:F,allowedDecimalSeparators:R,onBlur:Le,attributes:ee,isAllowed:e=>{if(!(!g||g(e)))return!1;if(_!==`strict`)return!0;if(!le)return Bg(e.floatValue,he,ge);if(e.value===``||e.value===`-`)return!0;let t=Fg(e.value);return t===null||(ye===void 0||t>=ye)&&(be===void 0||t<=be)}})});Gg.classes={...wd.classes,...Tg},Gg.varsResolver=Hg,Gg.displayName=`@mantine/core/NumberInput`;function Kg({offset:e,position:t,defaultOpened:n}){let[r,i]=(0,w.useState)(n),a=(0,w.useRef)(null),{x:o,y:s,elements:c,refs:l,update:u,placement:d}=Ws({placement:t,middleware:[Qo({crossAxis:!0,padding:5,rootBoundary:`document`})]}),f=d.includes(`right`)?e:t.includes(`left`)?e*-1:0,p=d.includes(`bottom`)?e:t.includes(`top`)?e*-1:0,m=(0,w.useCallback)(({clientX:e,clientY:t})=>{l.setPositionReference({getBoundingClientRect(){return{width:0,height:0,x:e,y:t,left:e+f,top:t+p,right:e,bottom:t}}})},[c.reference]);return(0,w.useEffect)(()=>{if(l.floating.current){let e=a.current;e.addEventListener(`mousemove`,m);let t=Vi(l.floating.current);return t.forEach(e=>{e.addEventListener(`scroll`,u)}),()=>{e.removeEventListener(`mousemove`,m),t.forEach(e=>{e.removeEventListener(`scroll`,u)})}}},[c.reference,l.floating.current,u,m,r]),{handleMouseMove:m,x:o,y:s,opened:r,setOpened:i,boundaryRef:a,floating:l.setFloating}}var qg={tooltip:`m_1b3c8819`,arrow:`m_f898399f`},Jg={refProp:`ref`,withinPortal:!0,offset:10,position:`right`,zIndex:N(`popover`)},Yg=mt((e,{radius:t,color:n})=>({tooltip:{"--tooltip-radius":t===void 0?void 0:R(t),"--tooltip-bg":n?Pt(n,e):void 0,"--tooltip-color":n?`var(--mantine-color-white)`:void 0}})),Xg=q(e=>{let t=K(`TooltipFloating`,Jg,e),{children:n,refProp:r,withinPortal:i,style:a,className:o,classNames:s,styles:c,unstyled:l,radius:u,color:d,label:f,offset:p,position:m,multiline:h,zIndex:g,disabled:_,defaultOpened:v,variant:y,vars:b,portalProps:x,attributes:S,ref:C,...T}=t,E=vn(),D=Jn({name:`TooltipFloating`,props:t,classes:qg,className:o,style:a,classNames:s,styles:c,unstyled:l,attributes:S,rootSelector:`tooltip`,vars:b,varsResolver:Yg}),{handleMouseMove:O,x:k,y:A,opened:j,boundaryRef:M,floating:N,setOpened:P}=Kg({offset:p,position:m,defaultOpened:v}),F=pt(n);if(!F)throw Error(`[@mantine/core] Tooltip.Floating component children should be an element or a component that accepts ref, fragments, strings, numbers and other primitive values are not supported`);let I=je(M,ct(F),C),L=F.props,R=e=>{L.onMouseEnter?.(e),O(e),P(!0)},z=e=>{L.onMouseLeave?.(e),P(!1)};return(0,G.jsxs)(G.Fragment,{children:[(0,G.jsx)(Ac,{...x,withinPortal:i,children:(0,G.jsx)(J,{...T,...D(`tooltip`,{style:{...Tr(a,E),zIndex:g,display:!_&&j?`block`:`none`,top:(A&&Math.round(A))??``,left:(k&&Math.round(k))??``}}),variant:y,ref:N,mod:{multiline:h},children:f})}),(0,w.cloneElement)(F,{...L,[r]:I,onMouseEnter:R,onMouseLeave:z})]})});Xg.classes=qg,Xg.varsResolver=Yg,Xg.displayName=`@mantine/core/TooltipFloating`;var Zg=(0,w.createContext)({withinGroup:!1}),Qg={openDelay:0,closeDelay:0};function $g(e){let{openDelay:t,closeDelay:n,children:r}=K(`TooltipGroup`,Qg,e);return(0,G.jsx)(Zg,{value:{withinGroup:!0},children:(0,G.jsx)(Fs,{delay:{open:t,close:n},children:r})})}$g.displayName=`@mantine/core/TooltipGroup`,$g.extend=e=>e;function e_(e){if(e===void 0)return{shift:!0,flip:!0};let t={...e};return e.shift===void 0&&(t.shift=!0),e.flip===void 0&&(t.flip=!0),t}function t_(e){let t=e_(e.middlewares),n=[Zo(e.offset)];return t.shift&&n.push(Qo(typeof t.shift==`boolean`?{padding:8}:{padding:8,...t.shift})),t.flip&&n.push(typeof t.flip==`boolean`?es():es(t.flip)),n.push(is({element:e.arrowRef,padding:e.arrowOffset})),t.inline?n.push(typeof t.inline==`boolean`?rs():rs(t.inline)):e.inline&&n.push(rs()),n}function n_(e){let[t,n]=(0,w.useState)(e.defaultOpened),r=typeof e.opened==`boolean`?e.opened:t,i=(0,w.use)(Zg).withinGroup,a=De(),o=(0,w.useCallback)(e=>{n(e),e&&g(a)},[a]),{x:s,y:c,context:l,refs:u,placement:d,middlewareData:{arrow:{x:f,y:p}={}}}=Ws({strategy:e.strategy,placement:e.position,open:r,onOpenChange:o,middleware:t_(e),whileElementsMounted:Po}),{delay:m,currentId:h,setCurrentId:g}=Is(l,{id:a}),{getReferenceProps:_,getFloatingProps:v}=Js([js(l,{enabled:e.events?.hover,delay:i?m:{open:e.openDelay,close:e.closeDelay},mouseOnly:!e.events?.touch,handleClose:e.interactive?ec():null}),Ks(l,{enabled:e.events?.focus,visibleOnly:!0}),Xs(l,{role:`tooltip`}),Hs(l,{enabled:e.opened===void 0})]),y=(0,w.useRef)(d);fe(()=>{y.current!==d&&(y.current=d,e.onPositionChange?.(d))},[d]);let b=r&&h&&h!==a;return{x:s,y:c,arrowX:f,arrowY:p,reference:u.setReference,floating:u.setFloating,getFloatingProps:v,getReferenceProps:_,isGroupPhase:b,opened:r,placement:d}}var r_={position:`top`,refProp:`ref`,withinPortal:!0,arrowSize:4,arrowOffset:5,arrowRadius:0,arrowPosition:`side`,offset:5,transitionProps:{duration:100,transition:`fade`},events:{hover:!0,focus:!1,touch:!1},zIndex:N(`popover`),middlewares:{flip:!0,shift:!0,inline:!1}},i_=mt((e,{radius:t,color:n,variant:r,autoContrast:i})=>{let a=e.variantColorResolver({theme:e,color:n||e.primaryColor,autoContrast:i,variant:r||`filled`});return{tooltip:{"--tooltip-radius":t===void 0?void 0:R(t),"--tooltip-bg":n?a.background:void 0,"--tooltip-color":n?a.color:void 0}}}),a_=q(e=>{let t=K(`Tooltip`,r_,e),{children:n,position:r,refProp:i,label:a,openDelay:o,closeDelay:s,onPositionChange:c,opened:l,defaultOpened:u,withinPortal:d,radius:f,color:p,classNames:m,styles:h,unstyled:g,style:_,className:v,withArrow:y,arrowSize:b,arrowOffset:x,arrowRadius:S,arrowPosition:C,offset:T,transitionProps:E,multiline:D,events:O,interactive:k,zIndex:A,disabled:j,onClick:M,onMouseEnter:N,onMouseLeave:P,inline:F,variant:I,keepMounted:L,vars:R,portalProps:z,mod:B,floatingStrategy:V,middlewares:H,autoContrast:ee,attributes:te,target:U,ref:ne,...re}=t,{dir:ie}=Rr(),ae=(0,w.useRef)(null),oe=n_({position:bc(ie,r),closeDelay:s,openDelay:o,onPositionChange:c,opened:l,defaultOpened:u,events:O,interactive:k,arrowRef:ae,arrowOffset:x,offset:typeof T==`number`?T+(y?b/2:0):T,inline:F,strategy:V,middlewares:H});(0,w.useEffect)(()=>{let e=U instanceof HTMLElement?U:typeof U==`string`?document.querySelector(U):U?.current||null;e&&oe.reference(e)},[U,oe]);let se=Jn({name:`Tooltip`,props:t,classes:qg,className:v,style:_,classNames:m,styles:h,unstyled:g,attributes:te,rootSelector:`tooltip`,vars:R,varsResolver:i_}),ce=pt(n);if(!U&&!ce)throw Error(`[@mantine/core] Tooltip component children should be an element or a component that accepts ref, fragments, strings, numbers and other primitive values are not supported`);let le=se(`tooltip`),W=k&&!j&&!!oe.opened,ue=C===`merge`&&y?vc({position:oe.placement,dir:ie}):void 0;if(U){let e=Rc(E,{duration:100,transition:`fade`});return(0,G.jsx)(G.Fragment,{children:(0,G.jsx)(Ac,{...z,withinPortal:d,children:(0,G.jsx)(Ic,{...e,keepMounted:L,mounted:!j&&!!oe.opened,duration:oe.isGroupPhase?10:e.duration,children:e=>(0,G.jsxs)(J,{...re,"data-fixed":V===`fixed`||void 0,variant:I,mod:[{multiline:D,interactive:W},B],...le,...oe.getFloatingProps({ref:oe.floating,className:le.className,style:{...le.style,...e,...ue,zIndex:A,top:oe.y??0,left:oe.x??0}}),children:[a,(0,G.jsx)(yc,{ref:ae,arrowX:oe.arrowX,arrowY:oe.arrowY,visible:y,position:oe.placement,arrowSize:b,arrowOffset:x,arrowRadius:S,arrowPosition:C,...se(`arrow`)})]})})})})}let de=ce.props,fe=je(oe.reference,ct(ce),ne),pe=Rc(E,{duration:100,transition:`fade`});return(0,G.jsxs)(G.Fragment,{children:[(0,G.jsx)(Ac,{...z,withinPortal:d,children:(0,G.jsx)(Ic,{...pe,keepMounted:L,mounted:!j&&!!oe.opened,duration:oe.isGroupPhase?10:pe.duration,children:e=>(0,G.jsxs)(J,{...re,"data-fixed":V===`fixed`||void 0,variant:I,mod:[{multiline:D,interactive:W},B],...oe.getFloatingProps({ref:oe.floating,className:se(`tooltip`).className,style:{...se(`tooltip`).style,...e,...ue,zIndex:A,top:oe.y??0,left:oe.x??0}}),children:[a,(0,G.jsx)(yc,{ref:ae,arrowX:oe.arrowX,arrowY:oe.arrowY,visible:y,position:oe.placement,arrowSize:b,arrowOffset:x,arrowRadius:S,arrowPosition:C,...se(`arrow`)})]})})}),(0,w.cloneElement)(ce,oe.getReferenceProps({onClick:M,onMouseEnter:N,onMouseLeave:P,onMouseMove:t.onMouseMove,onPointerDown:t.onPointerDown,onPointerEnter:t.onPointerEnter,...de,className:gt(v,de.className),[i]:fe}))]})});a_.classes=qg,a_.varsResolver=i_,a_.displayName=`@mantine/core/Tooltip`,a_.Floating=Xg,a_.Group=$g;var o_={root:`m_cf365364`,indicator:`m_9e182ccd`,label:`m_1738fcb2`,input:`m_1714d588`,control:`m_69686b9b`,innerLabel:`m_78882f40`},s_={withItemsBorders:!0},c_=mt((e,{radius:t,color:n,transitionDuration:r,size:i,transitionTimingFunction:a})=>({root:{"--sc-radius":t===void 0?void 0:R(t),"--sc-color":n?Pt(n,e):void 0,"--sc-shadow":n?void 0:`var(--mantine-shadow-xs)`,"--sc-transition-duration":r===void 0?void 0:`${r}ms`,"--sc-transition-timing-function":a,"--sc-padding":I(i,`sc-padding`),"--sc-font-size":z(i)}})),l_=kr(e=>{let t=K(`SegmentedControl`,s_,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,data:c,value:l,defaultValue:u,onChange:d,size:f,name:p,disabled:m,readOnly:h,fullWidth:g,orientation:_,radius:v,color:y,transitionDuration:b,transitionTimingFunction:x,variant:S,autoContrast:C,withItemsBorders:T,mod:E,attributes:D,ref:O,...k}=t,A=Jn({name:`SegmentedControl`,props:t,classes:o_,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:D,vars:s,varsResolver:c_}),j=vn(),M=c.map(e=>lt(e)?{label:`${e}`,value:e}:e),N=Be(),[P,F]=(0,w.useState)(ie()),[I,L]=(0,w.useState)(null),[R,z]=(0,w.useState)({}),B=(e,t)=>{R[t]=e,z(R)},[V,H]=Me({value:l,defaultValue:u,finalValue:Array.isArray(c)?M.find(e=>!e.disabled)?.value??c[0]?.value??null:null,onChange:d}),ee=De(p),te=M.map(e=>(0,w.createElement)(J,{...A(`control`),mod:{active:V===e.value,orientation:_},key:`${e.value}`},(0,w.createElement)(`input`,{...A(`input`),disabled:m||e.disabled,type:`radio`,name:ee,value:`${e.value}`,id:`${ee}-${e.value}`,checked:V===e.value,onChange:()=>!h&&H(e.value),"data-focus-ring":j.focusRing,key:`${e.value}-input`}),(0,w.createElement)(J,{component:`label`,...A(`label`),mod:{active:V===e.value&&!(m||e.disabled),disabled:m||e.disabled,"read-only":h},htmlFor:`${ee}-${e.value}`,ref:t=>B(t,`${e.value}`),__vars:{"--sc-label-color":y===void 0?void 0:Vt({color:y,theme:j,autoContrast:C})},key:`${e.value}-label`},(0,G.jsx)(`span`,{...A(`innerLabel`),children:e.label})))),U=je(O,L);return Ie(()=>{F(ie())},[c.length]),c.length===0?null:(0,G.jsxs)(J,{...A(`root`),variant:S,size:f,ref:U,mod:[{"full-width":g,orientation:_,initialized:N,"with-items-borders":T},E],...k,role:`radiogroup`,"data-disabled":m,children:[V!==void 0&&(0,G.jsx)(kd,{target:R[`${V}`],parent:I,component:`span`,transitionDuration:`var(--sc-transition-duration)`,...A(`indicator`)},P),te]})});l_.classes=o_,l_.varsResolver=c_,l_.displayName=`@mantine/core/SegmentedControl`;var u_={size:`sm`,withCheckIcon:!0,allowDeselect:!0,checkIconPosition:`left`,openOnFocus:!0},d_=kr(e=>{let t=K([`Input`,`InputWrapper`,`Select`],u_,e),{classNames:n,styles:r,unstyled:i,vars:a,dropdownOpened:o,defaultDropdownOpened:s,onDropdownClose:c,onDropdownOpen:l,onFocus:u,onBlur:d,onClick:f,onChange:p,data:m,value:h,defaultValue:g,selectFirstOptionOnChange:_,selectFirstOptionOnDropdownOpen:v,onOptionSubmit:y,comboboxProps:b,readOnly:x,disabled:S,filter:C,limit:T,withScrollArea:E,maxDropdownHeight:D,floatingHeight:O,size:k,searchable:A,rightSection:j,checkIconPosition:M,withCheckIcon:N,withAlignedLabels:P,nothingFoundMessage:F,name:I,form:L,searchValue:R,defaultSearchValue:z,onSearchChange:B,allowDeselect:V,error:H,rightSectionPointerEvents:ee,id:te,clearable:U,clearSectionMode:ne,clearButtonProps:re,hiddenInputProps:ie,renderOption:ae,onClear:oe,autoComplete:se,scrollAreaProps:ce,__defaultRightSection:le,__clearSection:W,__clearable:ue,chevronColor:de,autoSelectOnBlur:fe,openOnFocus:pe,attributes:me,...he}=t,ge=(0,w.useMemo)(()=>pf(m),[m]),_e=(0,w.useRef)({}),ve=(0,w.useMemo)(()=>mf(ge),[ge]),ye=De(te),[be,xe,Se]=Me({value:h,defaultValue:g,finalValue:null,onChange:p}),Ce=be==null?void 0:`${be}`in ve?ve[`${be}`]:_e.current[`${be}`],we=Re(Ce),[Te,Ee,Oe]=Me({value:R,defaultValue:z,finalValue:Ce?Ce.label:``,onChange:B}),ke=Hf({opened:o,defaultOpened:s,onDropdownOpen:()=>{l?.(),v?ke.selectFirstOption():ke.updateSelectedOptionIndex(`active`,{scrollIntoView:!0})},onDropdownClose:()=>{c?.(),setTimeout(ke.resetSelectedOption,0)}}),Ae=e=>{Ee(e),ke.resetSelectedOption()},{resolvedClassNames:je,resolvedStyles:Ne}=Pn({props:t,styles:r,classNames:n});(0,w.useEffect)(()=>{_&&ke.selectFirstOption()},[_,Te]),(0,w.useEffect)(()=>{h===null&&Ae(``),h!=null&&Ce&&(we?.value!==Ce.value||we?.label!==Ce.label)&&Ae(Ce.label)},[h,Ce]),(0,w.useEffect)(()=>{!Se&&!Oe&&Ae(be==null?``:`${be}`in ve?ve[`${be}`]?.label:_e.current[`${be}`]?.label||``)},[ve,be]),(0,w.useEffect)(()=>{be&&`${be}`in ve&&(_e.current[`${be}`]=ve[`${be}`])},[ve,be]);let Pe=(0,G.jsx)(Gf.ClearButton,{...re,onClear:()=>{xe(null,null),Ae(``),oe?.()}}),Fe=U&&be!=null&&!S&&!x;return(0,G.jsxs)(G.Fragment,{children:[(0,G.jsxs)(Gf,{store:ke,__staticSelector:`Select`,classNames:je,styles:Ne,unstyled:i,readOnly:x,size:k,attributes:me,floatingHeight:O,keepMounted:fe,onOptionSubmit:e=>{y?.(e);let t=V&&`${ve[e].value}`==`${be}`?null:ve[e],n=t?t.value:null;n!==be&&xe(n,t),!Se&&Ae(n==null?``:t?.label||``),ke.closeDropdown()},...b,children:[(0,G.jsx)(Gf.Target,{targetType:A?`input`:`button`,autoComplete:se,withExpandedAttribute:!0,children:(0,G.jsx)(wd,{id:ye,__defaultRightSection:(0,G.jsx)(Gf.Chevron,{size:k,error:H,unstyled:i,color:de}),__clearSection:Pe,__clearable:Fe,__clearSectionMode:ne,rightSection:j,rightSectionPointerEvents:ee||`none`,...he,size:k,__staticSelector:`Select`,disabled:S,readOnly:x||!A,value:Te,onChange:e=>{Ae(e.currentTarget.value),ke.openDropdown(),_&&ke.selectFirstOption()},onFocus:e=>{pe&&A&&ke.openDropdown(),u?.(e)},onBlur:e=>{fe&&ke.clickSelectedOption(),A&&ke.closeDropdown();let t=be!=null&&(`${be}`in ve?ve[`${be}`]:_e.current[`${be}`]);Ae(t&&t.label||``),d?.(e)},onClick:e=>{A?ke.openDropdown():ke.toggleDropdown(),f?.(e)},classNames:je,styles:Ne,unstyled:i,pointer:!A,error:H,attributes:me})}),(0,G.jsx)(rp,{data:ge,hidden:x||S,filter:C,search:Te,limit:T,hiddenWhenEmpty:!F,withScrollArea:E,maxDropdownHeight:D,filterOptions:!!A&&Ce?.label!==Te,value:be,checkIconPosition:M,withCheckIcon:N,withAlignedLabels:P,nothingFoundMessage:F,unstyled:i,labelId:he.label?`${ye}-label`:void 0,"aria-label":he.label?void 0:he[`aria-label`],renderOption:ae,scrollAreaProps:ce})]}),(0,G.jsx)(Gf.HiddenInput,{value:be,name:I,form:L,disabled:S,...ie})]})});d_.classes={...wd.classes,...Gf.classes},d_.displayName=`@mantine/core/Select`;function f_(e){if(e!==void 0)return typeof e==`number`?v(e):e}function p_({spacing:e,verticalSpacing:t,cols:n,minColWidth:r,autoRows:i,selector:a}){let o=vn(),s=t===void 0?e:t,c=r!==void 0,l=b({"--sg-spacing-x":L(U(e)),"--sg-spacing-y":L(U(s)),"--sg-auto-rows":i,...c?{"--sg-min-col-width":f_(r)}:{"--sg-cols":U(n)?.toString()}}),d=u(o.breakpoints).reduce((t,r)=>(t[r]||(t[r]={}),typeof e==`object`&&e[r]!==void 0&&(t[r][`--sg-spacing-x`]=L(e[r])),typeof s==`object`&&s[r]!==void 0&&(t[r][`--sg-spacing-y`]=L(s[r])),!c&&typeof n==`object`&&n[r]!==void 0&&(t[r][`--sg-cols`]=n[r]),t),{});return(0,G.jsx)(Qn,{styles:l,media:te(u(d),o.breakpoints).filter(e=>u(d[e.value]).length>0).map(e=>({query:`(min-width: ${o.breakpoints[e.value]})`,styles:d[e.value]})),selector:a})}function m_(e){return typeof e==`object`&&e?u(e):[]}function h_(e){return e.sort((e,t)=>h(e)-h(t))}function g_({spacing:e,verticalSpacing:t,cols:n,minColWidth:r}){return h_(Array.from(new Set([...m_(e),...m_(t),...r===void 0?m_(n):[]])))}function __({spacing:e,verticalSpacing:t,cols:n,minColWidth:r,autoRows:i,selector:a}){let o=t===void 0?e:t,s=r!==void 0,c=b({"--sg-spacing-x":L(U(e)),"--sg-spacing-y":L(U(o)),"--sg-auto-rows":i,...s?{"--sg-min-col-width":f_(r)}:{"--sg-cols":U(n)?.toString()}}),l=g_({spacing:e,verticalSpacing:t,cols:n,minColWidth:r}),u=l.reduce((t,r)=>(t[r]||(t[r]={}),typeof e==`object`&&e[r]!==void 0&&(t[r][`--sg-spacing-x`]=L(e[r])),typeof o==`object`&&o[r]!==void 0&&(t[r][`--sg-spacing-y`]=L(o[r])),!s&&typeof n==`object`&&n[r]!==void 0&&(t[r][`--sg-cols`]=n[r]),t),{});return(0,G.jsx)(Qn,{styles:c,container:l.map(e=>({query:`simple-grid (min-width: ${e})`,styles:u[e]})),selector:a})}var v_={container:`m_925c2d2c`,root:`m_2415a157`},y_={cols:1,spacing:`md`,type:`media`},b_=q(e=>{let t=K(`SimpleGrid`,y_,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,cols:c,verticalSpacing:l,spacing:u,type:d,minColWidth:f,autoFlow:p,autoRows:m,attributes:h,...g}=t,_=Jn({name:`SimpleGrid`,classes:v_,props:t,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:h,vars:s}),v=wr(),y=f===void 0?void 0:p||`auto-fill`;return d===`container`?(0,G.jsxs)(G.Fragment,{children:[(0,G.jsx)(__,{...t,selector:`.${v}`}),(0,G.jsx)(`div`,{..._(`container`),children:(0,G.jsx)(J,{..._(`root`,{className:v}),...g,"data-auto-cols":y})})]}):(0,G.jsxs)(G.Fragment,{children:[(0,G.jsx)(p_,{...t,selector:`.${v}`}),(0,G.jsx)(J,{..._(`root`,{className:v}),...g,"data-auto-cols":y})]})});b_.classes=v_,b_.displayName=`@mantine/core/SimpleGrid`;var x_={root:`m_6d731127`},S_={gap:`md`,align:`stretch`,justify:`flex-start`},C_=mt((e,{gap:t,align:n,justify:r})=>({root:{"--stack-gap":L(t),"--stack-align":n,"--stack-justify":r}})),w_=q(e=>{let t=K(`Stack`,S_,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,align:c,justify:l,gap:u,variant:d,attributes:f,...p}=t;return(0,G.jsx)(J,{...Jn({name:`Stack`,props:t,classes:x_,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:f,vars:s,varsResolver:C_})(`root`),variant:d,...p})});w_.classes=x_,w_.varsResolver=C_,w_.displayName=`@mantine/core/Stack`;var T_=(0,w.createContext)(null),E_={hiddenInputValuesSeparator:`,`},D_=kr((e=>{let{value:t,defaultValue:n,onChange:r,size:i,wrapperProps:a,children:o,readOnly:s,name:c,hiddenInputValuesSeparator:l,hiddenInputProps:u,maxSelectedValues:d,disabled:f,...p}=K(`SwitchGroup`,E_,e),[m,h]=Me({value:t,defaultValue:n,finalValue:[],onChange:r}),g=e=>{let t=e.currentTarget.value;if(s)return;let n=m.includes(t);!n&&d&&m.length>=d||h(n?m.filter(e=>e!==t):[...m,t])},_=e=>{if(f)return!0;if(!d)return!1;let t=m.includes(e),n=m.length>=d;return!t&&n},v=m.join(l);return(0,G.jsx)(T_,{value:{value:m,onChange:g,size:i,isDisabled:_},children:(0,G.jsxs)(xd.Wrapper,{size:i,...a,...p,labelElement:`div`,__staticSelector:`SwitchGroup`,children:[(0,G.jsx)(Kf,{role:`group`,children:o}),(0,G.jsx)(`input`,{type:`hidden`,name:c,value:v,...u})]})})}));D_.classes=xd.Wrapper.classes,D_.displayName=`@mantine/core/SwitchGroup`;var O_={root:`m_5f93f3bb`,input:`m_926b4011`,track:`m_9307d992`,thumb:`m_93039a1d`,trackLabel:`m_8277e082`},k_={labelPosition:`right`,withThumbIndicator:!0},A_=mt((e,{radius:t,color:n,size:r})=>({root:{"--switch-radius":t===void 0?void 0:R(t),"--switch-height":I(r,`switch-height`),"--switch-width":I(r,`switch-width`),"--switch-thumb-size":I(r,`switch-thumb-size`),"--switch-label-font-size":I(r,`switch-label-font-size`),"--switch-track-label-padding":I(r,`switch-track-label-padding`),"--switch-color":n?Pt(n,e):void 0}})),j_=q(e=>{let t=K(`Switch`,k_,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,color:c,label:l,offLabel:u,onLabel:d,id:f,size:p,radius:m,wrapperProps:h,thumbIcon:g,checked:_,defaultChecked:v,onChange:y,labelPosition:b,description:x,error:S,disabled:C,variant:T,rootRef:E,mod:D,withThumbIndicator:O,attributes:k,...A}=t,j=(0,w.use)(T_),M=p||j?.size,N=Jn({name:`Switch`,props:t,classes:O_,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:k,vars:s,varsResolver:A_}),{styleProps:P,rest:F}=tr(A),I=De(f),L=[x?`${I}-description`:void 0,S&&typeof S!=`boolean`?`${I}-error`:void 0,F[`aria-describedby`]].filter(Boolean).join(` `)||void 0,R={checked:j?.value.includes(F.value)??_,onChange:e=>{j?.onChange(e),y?.(e)}},z=C||j?.isDisabled?.(F.value),[B,V]=Me({value:R.checked??_,defaultValue:v,finalValue:!1});return(0,G.jsxs)(Xf,{...N(`root`),__staticSelector:`Switch`,__stylesApiProps:t,id:I,size:M,labelPosition:b,label:l,description:x,error:S,disabled:z,bodyElement:`label`,labelElement:`span`,classNames:n,styles:a,unstyled:o,"data-checked":R.checked,variant:T,ref:E,mod:D,attributes:k,inert:F.inert,...P,...h,children:[(0,G.jsx)(`input`,{...F,...R,disabled:z,checked:B,"data-checked":R.checked,onChange:e=>{R.onChange?.(e),V(e.currentTarget.checked)},id:I,type:`checkbox`,role:`switch`,inert:F.inert,"aria-describedby":L,...N(`input`)}),(0,G.jsxs)(J,{"aria-hidden":`true`,component:`span`,mod:{error:S,"label-position":b,"without-labels":!d&&!u},...N(`track`),children:[(0,G.jsx)(J,{component:`span`,mod:{"reduce-motion":!0,"with-thumb-indicator":O&&!g},...N(`thumb`),children:g}),(0,G.jsx)(`span`,{...N(`trackLabel`),children:B?d:u})]})]})});j_.classes={...O_,...Yf},j_.varsResolver=A_,j_.displayName=`@mantine/core/Switch`,j_.Group=D_;var M_=q(e=>(0,G.jsx)(wd,{component:`input`,...K([`Input`,`InputWrapper`,`TextInput`],null,e),__staticSelector:`TextInput`}));M_.classes=wd.classes,M_.displayName=`@mantine/core/TextInput`;var N_=[`h1`,`h2`,`h3`,`h4`,`h5`,`h6`],P_=[`xs`,`sm`,`md`,`lg`,`xl`];function F_(e,t){let n=t===void 0?`h${e}`:t;return N_.includes(n)?{fontSize:`var(--mantine-${n}-font-size)`,fontWeight:`var(--mantine-${n}-font-weight)`,lineHeight:`var(--mantine-${n}-line-height)`}:P_.includes(n)?{fontSize:`var(--mantine-font-size-${n})`,fontWeight:`var(--mantine-h${e}-font-weight)`,lineHeight:`var(--mantine-h${e}-line-height)`}:{fontSize:v(n),fontWeight:`var(--mantine-h${e}-font-weight)`,lineHeight:`var(--mantine-h${e}-line-height)`}}var I_={root:`m_8a5d1357`},L_={order:1},R_=mt((e,{order:t,size:n,lineClamp:r,textWrap:i})=>{let a=F_(t||1,n);return{root:{"--title-fw":a.fontWeight,"--title-lh":a.lineHeight,"--title-fz":a.fontSize,"--title-line-clamp":typeof r==`number`?r.toString():void 0,"--title-text-wrap":i}}}),z_=q(e=>{let t=K(`Title`,L_,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,order:s,vars:c,size:l,variant:u,lineClamp:d,textWrap:f,mod:p,attributes:m,...h}=t,g=Jn({name:`Title`,props:t,classes:I_,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:m,vars:c,varsResolver:R_});return[1,2,3,4,5,6].includes(s)?(0,G.jsx)(J,{...g(`root`),component:`h${s}`,variant:u,mod:[{order:s,"data-line-clamp":typeof d==`number`},p],size:l,...h}):null});z_.classes=I_,z_.varsResolver=R_,z_.displayName=`@mantine/core/Title`;function B_(e){let t=e,n=!1,r=new Set;return{getState(){return t},updateState(e){t=typeof e==`function`?e(t):e},setState(e){this.updateState(e),r.forEach(e=>e(t))},initialize(e){n||=(t=e,!0)},subscribe(e){return r.add(e),()=>r.delete(e)}}}function V_(e){return(0,w.useSyncExternalStore)(e.subscribe,()=>e.getState(),()=>e.getState())}var H_=0;function U_(e,t,n){let r=[],i=[],a=new Map;for(let n of e){let e=n.position||t,r=a.get(e);r?r.push(n):a.set(e,[n])}for(let e of a.values())e.sort((e,t)=>(t.priority??0)-(e.priority??0)||(e.__sequence??0)-(t.__sequence??0)),e.forEach((e,t)=>{t<n?i.push(e):r.push(e)});return{notifications:i,queue:r}}var W_=B_({notifications:[],queue:[],defaultPosition:`bottom-right`,limit:5}),G_=(e=W_)=>V_(e);function K_(e,t){let n=e.getState(),r=t([...n.notifications,...n.queue]);for(let e of r)e.__sequence===void 0&&(e.__sequence=H_,H_+=1);let i=U_(r,n.defaultPosition,n.limit);e.setState({notifications:i.notifications,queue:i.queue,limit:n.limit,defaultPosition:n.defaultPosition})}function q_(e,t=W_){let n=e.id||ie();return K_(t,t=>e.id&&t.some(t=>t.id===e.id)?t:[...t,{...e,id:n}]),n}function J_(e,t=W_){return K_(t,t=>t.filter(t=>t.id!==e||(t.onClose?.(t),!1))),e}function Y_(e,t=W_){return K_(t,t=>t.map(t=>t.id===e.id?{...t,...e}:t)),e.id}function X_(e=W_){K_(e,()=>[])}function Z_(e=W_){let{defaultPosition:t,limit:n}=e.getState();K_(e,e=>U_(e,t,n).notifications)}var Q_={show:q_,hide:J_,update:Y_,clean:X_,cleanQueue:Z_,updateState:K_},$_=[`bottom-center`,`bottom-left`,`bottom-right`,`top-center`,`top-left`,`top-right`];function ev(e,t){return e.reduce((e,n)=>(e[n.position||t].push(n),e),$_.reduce((e,t)=>(e[t]=[],e),{}))}var tv={left:`translateX(-100%)`,right:`translateX(100%)`,"top-center":`translateY(-100%)`,"bottom-center":`translateY(100%)`},nv={left:`translateX(0)`,right:`translateX(0)`,"top-center":`translateY(0)`,"bottom-center":`translateY(0)`};function rv({state:e,maxHeight:t,position:n,transitionDuration:r}){let[i,a]=n.split(`-`),o=a===`center`?`${i}-center`:a,s={opacity:0,maxHeight:t,transform:tv[o],transitionDuration:`${r}ms, ${r}ms, ${r}ms`,transitionTimingFunction:`cubic-bezier(.51,.3,0,1.21), cubic-bezier(.51,.3,0,1.21), linear`,transitionProperty:`opacity, transform, max-height`},c={opacity:1,transform:nv[o]},l={opacity:0,maxHeight:0,transform:tv[o]},u={entering:c,entered:c,exiting:l,exited:l};return{...s,...u[e]}}function iv(e,t){return typeof t==`number`?t:t===!1||e===!1?!1:e}var av=120;function ov({data:e,onHide:t,autoClose:n,transitionDuration:r,allowDragDismiss:i,allowScrollDismiss:a,paused:o,onHoverStart:s,onHoverEnd:c,ref:l,style:u,...d}){let[f,p]=(0,w.useState)(0),[m,h]=(0,w.useState)(!1),[g,_]=(0,w.useState)(1),[v,y]=(0,w.useState)(!1),b=vn(),{autoClose:x,message:S,allowClose:C,position:T,style:E,withCloseButton:D,onOpen:O,priority:k,__sequence:A,...j}=e,M=iv(n,e.autoClose),N=(0,w.useRef)(-1),P=(0,w.useRef)(-1),F=(0,w.useRef)(-1),I=(0,w.useRef)(null),L=(0,w.useRef)(!1),R=(0,w.useRef)(0),z=C===!1,B=()=>window.clearTimeout(N.current),V=()=>window.clearTimeout(P.current),H=()=>window.clearTimeout(F.current),ee=e=>{R.current=e,p(e)},te=()=>{t(e.id),B(),V(),H()},U=()=>{m||ce||o||L.current||typeof M!=`number`||(B(),N.current=window.setTimeout(te,M))},ne=e=>e*((I.current?.offsetWidth??440)+40),re=(e,t)=>{let n=I.current?.offsetWidth??440;return Math.abs(e)>n*.35||t>.5},ie=()=>{H(),y(!1),ee(0)},ae=e=>{_(e),h(!0),y(!1),ee(ne(e)),B(),V(),H(),P.current=window.setTimeout(te,r)},oe=()=>{H(),F.current=window.setTimeout(()=>{y(!1),ee(0),U()},av)},{ref:se,active:ce}=ot(e=>{if(!m)if(e.first&&B(),e.last){if(e.tap||e.canceled){ee(0),U();return}let t=e.movement[0],n=t===0?e.direction[0]===-1?-1:1:t>0?1:-1;re(t,e.velocity[0])?ae(n):(ee(0),U())}else ee(e.movement[0])},{axis:`x`,threshold:5,filterTaps:!0,enabled:i&&!z&&!m}),le=je(l,I,se),W=Tr(u,b),ue=Tr(E,b),de={...W,...ue},fe=typeof de.opacity==`number`?de.opacity:1,pe=m?0:1-Math.min(Math.abs(f)/200,1)*.6,me=de.transitionDuration??`${r}ms, ${r}ms, ${r}ms`,he={...de,"--notifications-state-transform":typeof de.transform==`string`?de.transform:`translateX(0)`,"--notifications-state-opacity":String(fe),"--notifications-swipe-offset":`${f}px`,"--notifications-swipe-opacity":String(pe),transform:`var(--notifications-state-transform) translate3d(var(--notifications-swipe-offset), 0, 0)`,opacity:`calc(var(--notifications-state-opacity) * var(--notifications-swipe-opacity))`,transitionDuration:ce||v?`0ms, 0ms, 0ms`:me,cursor:`default`,touchAction:`pan-y`},ge=()=>{L.current=!0,B(),s?.()},_e=()=>{L.current=!1,v||(ie(),U()),c?.()},ve=(0,w.useEffectEvent)(e=>{if(m||ce)return;let t=e.currentTarget===document;if(!t&&!L.current)return;let{deltaX:n,deltaY:r}=e;if(Math.abs(n)<=Math.abs(r)||n===0||!a||z)return;t||(e.preventDefault(),e.stopPropagation()),B(),y(!0);let i=R.current-n,o=i>0?1:-1;if(re(i,0)){ae(o);return}ee(i),oe()});return(0,w.useEffect)(()=>{if(v)return document.addEventListener(`wheel`,ve,{passive:!1}),()=>document.removeEventListener(`wheel`,ve,{passive:!1})},[v]),(0,w.useEffect)(()=>{let e=()=>{m&&ee(ne(g))};return window.addEventListener(`resize`,e),()=>window.removeEventListener(`resize`,e)},[g,m]),(0,w.useEffect)(()=>{let e=I.current;if(e)return e.addEventListener(`wheel`,ve,{passive:!1}),()=>e.removeEventListener(`wheel`,ve,{passive:!1})},[]),(0,w.useEffect)(()=>()=>{V(),H()},[]),(0,w.useEffect)(()=>{e.onOpen?.(e)},[]),(0,w.useEffect)(()=>(U(),B),[M,ce,m]),(0,w.useEffect)(()=>(o?B():U(),B),[o]),(0,G.jsx)(Ph,{ref:le,...d,style:he,...j,withCloseButton:!z&&D,onClose:te,onMouseEnter:ge,onMouseLeave:_e,children:S})}ov.displayName=`@mantine/notifications/NotificationContainer`;var sv={root:`m_b37d9ac7`,notification:`m_5ed0edd0`};function cv(){return cv=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},cv.apply(null,arguments)}function lv(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function uv(e,t){return uv=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},uv(e,t)}function dv(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,uv(e,t)}var fv={disabled:!1},pv=w.createContext(null),mv=function(e){return e.scrollTop},hv=`unmounted`,gv=`exited`,_v=`entering`,vv=`entered`,yv=`exiting`,bv=function(e){dv(t,e);function t(t,n){var r=e.call(this,t,n)||this,i=n,a=i&&!i.isMounting?t.enter:t.appear,o;return r.appearStatus=null,t.in?a?(o=gv,r.appearStatus=_v):o=vv:o=t.unmountOnExit||t.mountOnEnter?hv:gv,r.state={status:o},r.nextCallback=null,r}t.getDerivedStateFromProps=function(e,t){return e.in&&t.status===`unmounted`?{status:gv}:null};var n=t.prototype;return n.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},n.componentDidUpdate=function(e){var t=null;if(e!==this.props){var n=this.state.status;this.props.in?n!==`entering`&&n!==`entered`&&(t=_v):(n===`entering`||n===`entered`)&&(t=yv)}this.updateStatus(!1,t)},n.componentWillUnmount=function(){this.cancelNextCallback()},n.getTimeouts=function(){var e=this.props.timeout,t=n=r=e,n,r;return e!=null&&typeof e!=`number`&&(t=e.exit,n=e.enter,r=e.appear===void 0?n:e.appear),{exit:t,enter:n,appear:r}},n.updateStatus=function(e,t){if(e===void 0&&(e=!1),t!==null)if(this.cancelNextCallback(),t===`entering`){if(this.props.unmountOnExit||this.props.mountOnEnter){var n=this.props.nodeRef?this.props.nodeRef.current:Ye.default.findDOMNode(this);n&&mv(n)}this.performEnter(e)}else this.performExit();else this.props.unmountOnExit&&this.state.status===`exited`&&this.setState({status:hv})},n.performEnter=function(e){var t=this,n=this.props.enter,r=this.context?this.context.isMounting:e,i=this.props.nodeRef?[r]:[Ye.default.findDOMNode(this),r],a=i[0],o=i[1],s=this.getTimeouts(),c=r?s.appear:s.enter;if(!e&&!n||fv.disabled){this.safeSetState({status:vv},function(){t.props.onEntered(a)});return}this.props.onEnter(a,o),this.safeSetState({status:_v},function(){t.props.onEntering(a,o),t.onTransitionEnd(c,function(){t.safeSetState({status:vv},function(){t.props.onEntered(a,o)})})})},n.performExit=function(){var e=this,t=this.props.exit,n=this.getTimeouts(),r=this.props.nodeRef?void 0:Ye.default.findDOMNode(this);if(!t||fv.disabled){this.safeSetState({status:gv},function(){e.props.onExited(r)});return}this.props.onExit(r),this.safeSetState({status:yv},function(){e.props.onExiting(r),e.onTransitionEnd(n.exit,function(){e.safeSetState({status:gv},function(){e.props.onExited(r)})})})},n.cancelNextCallback=function(){this.nextCallback!==null&&(this.nextCallback.cancel(),this.nextCallback=null)},n.safeSetState=function(e,t){t=this.setNextCallback(t),this.setState(e,t)},n.setNextCallback=function(e){var t=this,n=!0;return this.nextCallback=function(r){n&&(n=!1,t.nextCallback=null,e(r))},this.nextCallback.cancel=function(){n=!1},this.nextCallback},n.onTransitionEnd=function(e,t){this.setNextCallback(t);var n=this.props.nodeRef?this.props.nodeRef.current:Ye.default.findDOMNode(this),r=e==null&&!this.props.addEndListener;if(!n||r){setTimeout(this.nextCallback,0);return}if(this.props.addEndListener){var i=this.props.nodeRef?[this.nextCallback]:[n,this.nextCallback],a=i[0],o=i[1];this.props.addEndListener(a,o)}e!=null&&setTimeout(this.nextCallback,e)},n.render=function(){var e=this.state.status;if(e===`unmounted`)return null;var t=this.props,n=t.children;t.in,t.mountOnEnter,t.unmountOnExit,t.appear,t.enter,t.exit,t.timeout,t.addEndListener,t.onEnter,t.onEntering,t.onEntered,t.onExit,t.onExiting,t.onExited,t.nodeRef;var r=lv(t,[`children`,`in`,`mountOnEnter`,`unmountOnExit`,`appear`,`enter`,`exit`,`timeout`,`addEndListener`,`onEnter`,`onEntering`,`onEntered`,`onExit`,`onExiting`,`onExited`,`nodeRef`]);return w.createElement(pv.Provider,{value:null},typeof n==`function`?n(e,r):w.cloneElement(w.Children.only(n),r))},t}(w.Component);bv.contextType=pv,bv.propTypes={};function xv(){}bv.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:xv,onEntering:xv,onEntered:xv,onExit:xv,onExiting:xv,onExited:xv},bv.UNMOUNTED=hv,bv.EXITED=gv,bv.ENTERING=_v,bv.ENTERED=vv,bv.EXITING=yv;function Sv(e){if(e===void 0)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return e}function Cv(e,t){var n=function(e){return t&&(0,w.isValidElement)(e)?t(e):e},r=Object.create(null);return e&&w.Children.map(e,function(e){return e}).forEach(function(e){r[e.key]=n(e)}),r}function wv(e,t){e||={},t||={};function n(n){return n in t?t[n]:e[n]}var r=Object.create(null),i=[];for(var a in e)a in t?i.length&&(r[a]=i,i=[]):i.push(a);var o,s={};for(var c in t){if(r[c])for(o=0;o<r[c].length;o++){var l=r[c][o];s[r[c][o]]=n(l)}s[c]=n(c)}for(o=0;o<i.length;o++)s[i[o]]=n(i[o]);return s}function Tv(e,t,n){return n[t]==null?e.props[t]:n[t]}function Ev(e,t){return Cv(e.children,function(n){return(0,w.cloneElement)(n,{onExited:t.bind(null,n),in:!0,appear:Tv(n,`appear`,e),enter:Tv(n,`enter`,e),exit:Tv(n,`exit`,e)})})}function Dv(e,t,n){var r=Cv(e.children),i=wv(t,r);return Object.keys(i).forEach(function(a){var o=i[a];if((0,w.isValidElement)(o)){var s=a in t,c=a in r,l=t[a],u=(0,w.isValidElement)(l)&&!l.props.in;c&&(!s||u)?i[a]=(0,w.cloneElement)(o,{onExited:n.bind(null,o),in:!0,exit:Tv(o,`exit`,e),enter:Tv(o,`enter`,e)}):!c&&s&&!u?i[a]=(0,w.cloneElement)(o,{in:!1}):c&&s&&(0,w.isValidElement)(l)&&(i[a]=(0,w.cloneElement)(o,{onExited:n.bind(null,o),in:l.props.in,exit:Tv(o,`exit`,e),enter:Tv(o,`enter`,e)}))}}),i}var Ov=Object.values||function(e){return Object.keys(e).map(function(t){return e[t]})},kv={component:`div`,childFactory:function(e){return e}},Av=function(e){dv(t,e);function t(t,n){var r=e.call(this,t,n)||this;return r.state={contextValue:{isMounting:!0},handleExited:r.handleExited.bind(Sv(r)),firstRender:!0},r}var n=t.prototype;return n.componentDidMount=function(){this.mounted=!0,this.setState({contextValue:{isMounting:!1}})},n.componentWillUnmount=function(){this.mounted=!1},t.getDerivedStateFromProps=function(e,t){var n=t.children,r=t.handleExited;return{children:t.firstRender?Ev(e,r):Dv(e,n,r),firstRender:!1}},n.handleExited=function(e,t){var n=Cv(this.props.children);e.key in n||(e.props.onExited&&e.props.onExited(t),this.mounted&&this.setState(function(t){var n=cv({},t.children);return delete n[e.key],{children:n}}))},n.render=function(){var e=this.props,t=e.component,n=e.childFactory,r=lv(e,[`component`,`childFactory`]),i=this.state.contextValue,a=Ov(this.state.children).map(n);return delete r.appear,delete r.enter,delete r.exit,t===null?w.createElement(pv.Provider,{value:i},a):w.createElement(pv.Provider,{value:i},w.createElement(t,r,a))},t}(w.Component);Av.propTypes={},Av.defaultProps=kv;var jv=bv,Mv={position:`bottom-right`,autoClose:4e3,transitionDuration:250,allowDragDismiss:!0,allowScrollDismiss:!0,containerWidth:440,notificationMaxHeight:200,limit:5,zIndex:N(`overlay`),store:W_,withinPortal:!0,pauseResetOnHover:`all`},Nv=mt((e,{zIndex:t,containerWidth:n})=>({root:{"--notifications-z-index":t?.toString(),"--notifications-container-width":v(n)}})),Pv=q(e=>{let t=K(`Notifications`,Mv,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,attributes:c,position:l,autoClose:u,transitionDuration:d,allowDragDismiss:f,allowScrollDismiss:p,containerWidth:m,notificationMaxHeight:h,limit:g,zIndex:_,store:v,portalProps:y,withinPortal:b,pauseResetOnHover:x,...S}=t,C=vn(),T=G_(v),E=Ee(),D=Ne(),O=(0,w.useRef)({}),k=(0,w.useRef)(0),[A,j]=(0,w.useState)(0),M=(0,w.useCallback)(()=>j(e=>e+1),[]),N=(0,w.useCallback)(()=>j(e=>Math.max(0,e-1)),[]),P=C.respectReducedMotion&&D?1:d,F=Jn({name:`Notifications`,classes:sv,props:t,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:c,vars:s,varsResolver:Nv});(0,w.useEffect)(()=>{v?.updateState(e=>({...e,limit:g||5,defaultPosition:l}))},[g,l]),pe(()=>{T.notifications.length>k.current&&setTimeout(()=>E(),0),k.current=T.notifications.length},[T.notifications]);let I=ev(T.notifications,l),L=$_.reduce((e,t)=>(e[t]=I[t].map(({style:e,...n})=>(0,G.jsx)(jv,{timeout:P,onEnter:()=>O.current[n.id].offsetHeight,nodeRef:{current:O.current[n.id]},children:r=>(0,G.jsx)(ov,{ref:e=>{e?O.current[n.id]=e:delete O.current[n.id]},data:n,onHide:e=>J_(e,v),autoClose:u,transitionDuration:P,allowDragDismiss:f,allowScrollDismiss:p,paused:x===`all`&&A>0,onHoverStart:M,onHoverEnd:N,...F(`notification`,{style:{...rv({state:r,position:t,transitionDuration:P,maxHeight:h}),...e}})})},n.id)),e),{});return(0,G.jsxs)(Ac,{withinPortal:b,...y,children:[(0,G.jsx)(J,{...F(`root`),"data-position":`top-center`,...S,children:(0,G.jsx)(Av,{children:L[`top-center`]})}),(0,G.jsx)(J,{...F(`root`),"data-position":`top-left`,...S,children:(0,G.jsx)(Av,{children:L[`top-left`]})}),(0,G.jsx)(J,{...F(`root`,{className:zu.classNames.fullWidth}),"data-position":`top-right`,...S,children:(0,G.jsx)(Av,{children:L[`top-right`]})}),(0,G.jsx)(J,{...F(`root`,{className:zu.classNames.fullWidth}),"data-position":`bottom-right`,...S,children:(0,G.jsx)(Av,{children:L[`bottom-right`]})}),(0,G.jsx)(J,{...F(`root`),"data-position":`bottom-left`,...S,children:(0,G.jsx)(Av,{children:L[`bottom-left`]})}),(0,G.jsx)(J,{...F(`root`),"data-position":`bottom-center`,...S,children:(0,G.jsx)(Av,{children:L[`bottom-center`]})})]})});Pv.classes=sv,Pv.varsResolver=Nv,Pv.displayName=`@mantine/notifications/Notifications`,Pv.show=Q_.show,Pv.hide=Q_.hide,Pv.update=Q_.update,Pv.clean=Q_.clean,Pv.cleanQueue=Q_.cleanQueue,Pv.updateState=Q_.updateState;var Fv=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},Iv=new class extends Fv{#e;#t;#n;constructor(){super(),this.#n=e=>{if(typeof window<`u`&&window.addEventListener){let t=()=>e();return window.addEventListener(`visibilitychange`,t,!1),()=>{window.removeEventListener(`visibilitychange`,t)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#n=e,this.#t?.(),this.#t=e(e=>{typeof e==`boolean`?this.setFocused(e):this.onFocus()})}setFocused(e){this.#e!==e&&(this.#e=e,this.onFocus())}onFocus(){let e=this.isFocused();this.listeners.forEach(t=>{t(e)})}isFocused(){return typeof this.#e==`boolean`?this.#e:globalThis.document?.visibilityState!==`hidden`}},Lv={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},Rv=new class{#e=Lv;setTimeoutProvider(e){this.#e=e}setTimeout(e,t){return this.#e.setTimeout(e,t)}clearTimeout(e){this.#e.clearTimeout(e)}setInterval(e,t){return this.#e.setInterval(e,t)}clearInterval(e){this.#e.clearInterval(e)}};function zv(e){setTimeout(e,0)}var Bv=typeof window>`u`||`Deno`in globalThis;function Vv(){}function Hv(e,t){return typeof e==`function`?e(t):e}function Uv(e){return typeof e==`number`&&e>=0&&e!==1/0}function Wv(e,t){return Math.max(e+(t||0)-Date.now(),0)}function Gv(e,t){return typeof e==`function`?e(t):e}function Kv(e,t){return typeof e==`function`?e(t):e}function qv(e,t){let{type:n=`all`,exact:r,fetchStatus:i,predicate:a,queryKey:o,stale:s}=e;if(o){if(r){if(t.queryHash!==Yv(o,t.options))return!1}else if(!Zv(t.queryKey,o))return!1}if(n!==`all`){let e=t.isActive();if(n===`active`&&!e||n===`inactive`&&e)return!1}return!(typeof s==`boolean`&&t.isStale()!==s||i&&i!==t.state.fetchStatus||a&&!a(t))}function Jv(e,t){let{exact:n,status:r,predicate:i,mutationKey:a}=e;if(a){if(!t.options.mutationKey)return!1;if(n){if(Xv(t.options.mutationKey)!==Xv(a))return!1}else if(!Zv(t.options.mutationKey,a))return!1}return!(r&&t.state.status!==r||i&&!i(t))}function Yv(e,t){return(t?.queryKeyHashFn||Xv)(e)}function Xv(e){return JSON.stringify(e,(e,t)=>ny(t)?Object.keys(t).sort().reduce((e,n)=>(e[n]=t[n],e),{}):t)}function Zv(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(e&&t&&typeof e==`object`&&typeof t==`object`){if(Array.isArray(e)&&Array.isArray(t)){for(let n=0;n<t.length;n++)if(!Zv(e[n],t[n]))return!1;return!0}let n=Object.keys(t);for(let r of n)if(!Zv(e[r],t[r]))return!1;return!0}return!1}var Qv=Object.prototype.hasOwnProperty;function $v(e,t,n=0){if(e===t)return e;if(n>500)return t;let r=ty(e)&&ty(t);if(!r&&!(ny(e)&&ny(t)))return t;let i=(r?e:Object.keys(e)).length,a=r?t:Object.keys(t),o=a.length,s=r?Array(o):{},c=0;for(let l=0;l<o;l++){let o=r?l:a[l],u=e[o],d=t[o];if(u===d){s[o]=u,(r?l<i:Qv.call(e,o))&&c++;continue}if(u===null||d===null||typeof u!=`object`||typeof d!=`object`){s[o]=d;continue}let f=$v(u,d,n+1);s[o]=f,f===u&&c++}return i===o&&c===i?e:s}function ey(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(let n in e)if(e[n]!==t[n])return!1;return!0}function ty(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function ny(e){if(!ry(e))return!1;let t=e.constructor;if(t===void 0)return!0;let n=t.prototype;return!(!ry(n)||!n.hasOwnProperty(`isPrototypeOf`)||Object.getPrototypeOf(e)!==Object.prototype)}function ry(e){return Object.prototype.toString.call(e)===`[object Object]`}function iy(e){return new Promise(t=>{Rv.setTimeout(t,e)})}function ay(e,t,n){return typeof n.structuralSharing==`function`?n.structuralSharing(e,t):n.structuralSharing===!1?t:$v(e,t)}function oy(e){return e}function sy(e,t,n=0){let r=[...e,t];return n&&r.length>n?r.slice(1):r}function cy(e,t,n=0){let r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var ly=Symbol();function uy(e,t){return!e.queryFn&&t?.initialPromise?()=>t.initialPromise:!e.queryFn||e.queryFn===ly?()=>Promise.reject(Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function dy(e,t){return typeof e==`function`?e(...t):!!e}function fy(e,t,n){let r=!1,i;return Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(i??=t(),r?i:(r=!0,i.aborted?n():i.addEventListener(`abort`,n,{once:!0}),i))}),e}var py=(()=>{let e=()=>Bv;return{isServer(){return e()},setIsServer(t){e=t}}})();function my(){let e,t,n=new Promise((n,r)=>{e=n,t=r});n.status=`pending`,n.catch(()=>{});function r(e){Object.assign(n,e),delete n.resolve,delete n.reject}return n.resolve=t=>{r({status:`fulfilled`,value:t}),e(t)},n.reject=e=>{r({status:`rejected`,reason:e}),t(e)},n}var hy=zv;function gy(){let e=[],t=0,n=e=>{e()},r=e=>{e()},i=hy,a=r=>{t?e.push(r):i(()=>{n(r)})},o=()=>{let t=e;e=[],t.length&&i(()=>{r(()=>{t.forEach(e=>{n(e)})})})};return{batch:e=>{let n;t++;try{n=e()}finally{t--,t||o()}return n},batchCalls:e=>(...t)=>{a(()=>{e(...t)})},schedule:a,setNotifyFunction:e=>{n=e},setBatchNotifyFunction:e=>{r=e},setScheduler:e=>{i=e}}}var _y=gy(),vy=new class extends Fv{#e=!0;#t;#n;constructor(){super(),this.#n=e=>{if(typeof window<`u`&&window.addEventListener){let t=()=>e(!0),n=()=>e(!1);return window.addEventListener(`online`,t,!1),window.addEventListener(`offline`,n,!1),()=>{window.removeEventListener(`online`,t),window.removeEventListener(`offline`,n)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#n=e,this.#t?.(),this.#t=e(this.setOnline.bind(this))}setOnline(e){this.#e!==e&&(this.#e=e,this.listeners.forEach(t=>{t(e)}))}isOnline(){return this.#e}};function yy(e){return Math.min(1e3*2**e,3e4)}function by(e){return(e??`online`)!==`online`||vy.isOnline()}var xy=class extends Error{constructor(e){super(`CancelledError`),this.revert=e?.revert,this.silent=e?.silent}};function Sy(e){let t=!1,n=0,r,i=my(),a=()=>i.status!==`pending`,o=t=>{if(!a()){let n=new xy(t);f(n),e.onCancel?.(n)}},s=()=>{t=!0},c=()=>{t=!1},l=()=>Iv.isFocused()&&(e.networkMode===`always`||vy.isOnline())&&e.canRun(),u=()=>by(e.networkMode)&&e.canRun(),d=e=>{a()||(r?.(),i.resolve(e))},f=e=>{a()||(r?.(),i.reject(e))},p=()=>new Promise(t=>{r=e=>{(a()||l())&&t(e)},e.onPause?.()}).then(()=>{r=void 0,a()||e.onContinue?.()}),m=()=>{if(a())return;let r,i=n===0?e.initialPromise:void 0;try{r=i??e.fn()}catch(e){r=Promise.reject(e)}Promise.resolve(r).then(d).catch(r=>{if(a())return;let i=e.retry??(py.isServer()?0:3),o=e.retryDelay??yy,s=typeof o==`function`?o(n,r):o,c=i===!0||typeof i==`number`&&n<i||typeof i==`function`&&i(n,r);if(t||!c){f(r);return}n++,e.onFail?.(n,r),iy(s).then(()=>l()?void 0:p()).then(()=>{t?f(r):m()})})};return{promise:i,status:()=>i.status,cancel:o,continue:()=>(r?.(),i),cancelRetry:s,continueRetry:c,canStart:u,start:()=>(u()?m():p().then(m),i)}}var Cy=class{#e;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),Uv(this.gcTime)&&(this.#e=Rv.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(py.isServer()?1/0:3e5))}clearGcTimeout(){this.#e!==void 0&&(Rv.clearTimeout(this.#e),this.#e=void 0)}};function wy(e){return{onFetch:(t,n)=>{let r=t.options,i=t.fetchOptions?.meta?.fetchMore?.direction,a=t.state.data?.pages||[],o=t.state.data?.pageParams||[],s={pages:[],pageParams:[]},c=0,l=async()=>{let n=!1,l=e=>{fy(e,()=>t.signal,()=>n=!0)},u=uy(t.options,t.fetchOptions),d=async(e,r,i)=>{if(n)return Promise.reject(t.signal.reason);if(r==null&&e.pages.length)return Promise.resolve(e);let a=(()=>{let e={client:t.client,queryKey:t.queryKey,pageParam:r,direction:i?`backward`:`forward`,meta:t.options.meta};return l(e),e})(),o=await u(a),{maxPages:s}=t.options,c=i?cy:sy;return{pages:c(e.pages,o,s),pageParams:c(e.pageParams,r,s)}};if(i&&a.length){let e=i===`backward`,t=e?Ey:Ty,n={pages:a,pageParams:o};s=await d(n,t(r,n),e)}else{let t=e??a.length;do{let e=c===0?o[0]??r.initialPageParam:Ty(r,s);if(c>0&&e==null)break;s=await d(s,e),c++}while(c<t)}return s};t.fetchFn=t.options.persister?()=>t.options.persister?.(l,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n):l}}}function Ty(e,{pages:t,pageParams:n}){let r=t.length-1;return t.length>0?e.getNextPageParam(t[r],t,n[r],n):void 0}function Ey(e,{pages:t,pageParams:n}){return t.length>0?e.getPreviousPageParam?.(t[0],t,n[0],n):void 0}var Dy=class extends Cy{#e;#t;#n;#r;#i;#a;#o;#s;constructor(e){super(),this.#s=!1,this.#o=e.defaultOptions,this.setOptions(e.options),this.observers=[],this.#i=e.client,this.#r=this.#i.getQueryCache(),this.queryKey=e.queryKey,this.queryHash=e.queryHash,this.#t=Ay(this.options),this.state=e.state??this.#t,this.scheduleGc()}get meta(){return this.options.meta}get queryType(){return this.#e}get promise(){return this.#a?.promise}setOptions(e){if(this.options={...this.#o,...e},e?._type&&(this.#e=e._type),this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){let e=Ay(this.options);e.data!==void 0&&(this.setState(ky(e.data,e.dataUpdatedAt)),this.#t=e)}}optionalRemove(){!this.observers.length&&this.state.fetchStatus===`idle`&&this.#r.remove(this)}setData(e,t){let n=ay(this.state.data,e,this.options);return this.#l({data:n,type:`success`,dataUpdatedAt:t?.updatedAt,manual:t?.manual}),n}setState(e){this.#l({type:`setState`,state:e})}cancel(e){let t=this.#a?.promise;return this.#a?.cancel(e),t?t.then(Vv).catch(Vv):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}get resetState(){return this.#t}reset(){this.destroy(),this.setState(this.resetState)}isActive(){return this.observers.some(e=>Kv(e.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===ly||!this.isFetched()}isFetched(){return this.state.dataUpdateCount+this.state.errorUpdateCount>0}isStatic(){return this.getObserversCount()>0&&this.observers.some(e=>Gv(e.options.staleTime,this)===`static`)}isStale(){return this.getObserversCount()>0?this.observers.some(e=>e.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(e=0){return this.state.data===void 0?!0:e===`static`?!1:this.state.isInvalidated?!0:!Wv(this.state.dataUpdatedAt,e)}onFocus(){this.observers.find(e=>e.shouldFetchOnWindowFocus())?.refetch({cancelRefetch:!1}),this.#a?.continue()}onOnline(){this.observers.find(e=>e.shouldFetchOnReconnect())?.refetch({cancelRefetch:!1}),this.#a?.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),this.#r.notify({type:`observerAdded`,query:this,observer:e}))}removeObserver(e){this.observers.includes(e)&&(this.observers=this.observers.filter(t=>t!==e),this.observers.length||(this.#a&&(this.#s||this.#c()?this.#a.cancel({revert:!0}):this.#a.cancelRetry()),this.scheduleGc()),this.#r.notify({type:`observerRemoved`,query:this,observer:e}))}getObserversCount(){return this.observers.length}#c(){return this.state.fetchStatus===`paused`&&this.state.status===`pending`}invalidate(){this.state.isInvalidated||this.#l({type:`invalidate`})}async fetch(e,t){if(this.state.fetchStatus!==`idle`&&this.#a?.status()!==`rejected`){if(this.state.data!==void 0&&t?.cancelRefetch)this.cancel({silent:!0});else if(this.#a)return this.#a.continueRetry(),this.#a.promise}if(e&&this.setOptions(e),!this.options.queryFn){let e=this.observers.find(e=>e.options.queryFn);e&&this.setOptions(e.options)}let n=new AbortController,r=e=>{Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(this.#s=!0,n.signal)})},i=()=>{let e=uy(this.options,t),n=(()=>{let e={client:this.#i,queryKey:this.queryKey,meta:this.meta};return r(e),e})();return this.#s=!1,this.options.persister?this.options.persister(e,n,this):e(n)},a=(()=>{let e={fetchOptions:t,options:this.options,queryKey:this.queryKey,client:this.#i,state:this.state,fetchFn:i};return r(e),e})();(this.#e===`infinite`?wy(this.options.pages):this.options.behavior)?.onFetch(a,this),this.#n=this.state,(this.state.fetchStatus===`idle`||this.state.fetchMeta!==a.fetchOptions?.meta)&&this.#l({type:`fetch`,meta:a.fetchOptions?.meta}),this.#a=Sy({initialPromise:t?.initialPromise,fn:a.fetchFn,onCancel:e=>{e instanceof xy&&e.revert&&this.setState({...this.#n,fetchStatus:`idle`}),n.abort()},onFail:(e,t)=>{this.#l({type:`failed`,failureCount:e,error:t})},onPause:()=>{this.#l({type:`pause`})},onContinue:()=>{this.#l({type:`continue`})},retry:a.options.retry,retryDelay:a.options.retryDelay,networkMode:a.options.networkMode,canRun:()=>!0});try{let e=await this.#a.start();if(e===void 0)throw Error(`${this.queryHash} data is undefined`);return this.setData(e),this.#r.config.onSuccess?.(e,this),this.#r.config.onSettled?.(e,this.state.error,this),e}catch(e){if(e instanceof xy){if(e.silent)return this.#a.promise;if(e.revert){if(this.state.data===void 0)throw e;return this.state.data}}throw this.#l({type:`error`,error:e}),this.#r.config.onError?.(e,this),this.#r.config.onSettled?.(this.state.data,e,this),e}finally{this.scheduleGc()}}#l(e){let t=t=>{switch(e.type){case`failed`:return{...t,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case`pause`:return{...t,fetchStatus:`paused`};case`continue`:return{...t,fetchStatus:`fetching`};case`fetch`:return{...t,...Oy(t.data,this.options),fetchMeta:e.meta??null};case`success`:let n={...t,...ky(e.data,e.dataUpdatedAt),dataUpdateCount:t.dataUpdateCount+1,...!e.manual&&{fetchStatus:`idle`,fetchFailureCount:0,fetchFailureReason:null}};return this.#n=e.manual?n:void 0,n;case`error`:let r=e.error;return{...t,error:r,errorUpdateCount:t.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:t.fetchFailureCount+1,fetchFailureReason:r,fetchStatus:`idle`,status:`error`,isInvalidated:!0};case`invalidate`:return{...t,isInvalidated:!0};case`setState`:return{...t,...e.state}}};this.state=t(this.state),_y.batch(()=>{this.observers.forEach(e=>{e.onQueryUpdate()}),this.#r.notify({query:this,type:`updated`,action:e})})}};function Oy(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:by(t.networkMode)?`fetching`:`paused`,...e===void 0&&{error:null,status:`pending`}}}function ky(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:`success`}}function Ay(e){let t=typeof e.initialData==`function`?e.initialData():e.initialData,n=t!==void 0,r=n?typeof e.initialDataUpdatedAt==`function`?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:n?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?`success`:`pending`,fetchStatus:`idle`}}var jy=class extends Fv{constructor(e,t){super(),this.options=t,this.#e=e,this.#s=null,this.#o=my(),this.bindMethods(),this.setOptions(t)}#e;#t=void 0;#n=void 0;#r=void 0;#i;#a;#o;#s;#c;#l;#u;#d;#f;#p;#m=new Set;bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(this.#t.addObserver(this),Ny(this.#t,this.options)?this.#h():this.updateResult(),this.#y())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return Py(this.#t,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return Py(this.#t,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.#b(),this.#x(),this.#t.removeObserver(this)}setOptions(e){let t=this.options,n=this.#t;if(this.options=this.#e.defaultQueryOptions(e),this.options.enabled!==void 0&&typeof this.options.enabled!=`boolean`&&typeof this.options.enabled!=`function`&&typeof Kv(this.options.enabled,this.#t)!=`boolean`)throw Error(`Expected enabled to be a boolean or a callback that returns a boolean`);this.#S(),this.#t.setOptions(this.options),t._defaulted&&!ey(this.options,t)&&this.#e.getQueryCache().notify({type:`observerOptionsUpdated`,query:this.#t,observer:this});let r=this.hasListeners();r&&Fy(this.#t,n,this.options,t)&&this.#h(),this.updateResult(),r&&(this.#t!==n||Kv(this.options.enabled,this.#t)!==Kv(t.enabled,this.#t)||Gv(this.options.staleTime,this.#t)!==Gv(t.staleTime,this.#t))&&this.#g();let i=this.#_();r&&(this.#t!==n||Kv(this.options.enabled,this.#t)!==Kv(t.enabled,this.#t)||i!==this.#p)&&this.#v(i)}getOptimisticResult(e){let t=this.#e.getQueryCache().build(this.#e,e),n=this.createResult(t,e);return Ly(this,n)&&(this.#r=n,this.#a=this.options,this.#i=this.#t.state),n}getCurrentResult(){return this.#r}trackResult(e,t){return new Proxy(e,{get:(e,n)=>(this.trackProp(n),t?.(n),n===`promise`&&(this.trackProp(`data`),!this.options.experimental_prefetchInRender&&this.#o.status===`pending`&&this.#o.reject(Error(`experimental_prefetchInRender feature flag is not enabled`))),Reflect.get(e,n))})}trackProp(e){this.#m.add(e)}getCurrentQuery(){return this.#t}refetch({...e}={}){return this.fetch({...e})}fetchOptimistic(e){let t=this.#e.defaultQueryOptions(e),n=this.#e.getQueryCache().build(this.#e,t);return n.fetch().then(()=>this.createResult(n,t))}fetch(e){return this.#h({...e,cancelRefetch:e.cancelRefetch??!0}).then(()=>(this.updateResult(),this.#r))}#h(e){this.#S();let t=this.#t.fetch(this.options,e);return e?.throwOnError||(t=t.catch(Vv)),t}#g(){this.#b();let e=Gv(this.options.staleTime,this.#t);if(py.isServer()||this.#r.isStale||!Uv(e))return;let t=Wv(this.#r.dataUpdatedAt,e)+1;this.#d=Rv.setTimeout(()=>{this.#r.isStale||this.updateResult()},t)}#_(){return(typeof this.options.refetchInterval==`function`?this.options.refetchInterval(this.#t):this.options.refetchInterval)??!1}#v(e){this.#x(),this.#p=e,!(py.isServer()||Kv(this.options.enabled,this.#t)===!1||!Uv(this.#p)||this.#p===0)&&(this.#f=Rv.setInterval(()=>{(this.options.refetchIntervalInBackground||Iv.isFocused())&&this.#h()},this.#p))}#y(){this.#g(),this.#v(this.#_())}#b(){this.#d!==void 0&&(Rv.clearTimeout(this.#d),this.#d=void 0)}#x(){this.#f!==void 0&&(Rv.clearInterval(this.#f),this.#f=void 0)}createResult(e,t){let n=this.#t,r=this.options,i=this.#r,a=this.#i,o=this.#a,s=e===n?this.#n:e.state,{state:c}=e,l={...c},u=!1,d;if(t._optimisticResults){let i=this.hasListeners(),a=!i&&Ny(e,t),o=i&&Fy(e,n,t,r);(a||o)&&(l={...l,...Oy(c.data,e.options)}),t._optimisticResults===`isRestoring`&&(l.fetchStatus=`idle`)}let{error:f,errorUpdatedAt:p,status:m}=l;d=l.data;let h=!1;if(t.placeholderData!==void 0&&d===void 0&&m===`pending`){let e;i?.isPlaceholderData&&t.placeholderData===o?.placeholderData?(e=i.data,h=!0):e=typeof t.placeholderData==`function`?t.placeholderData(this.#u?.state.data,this.#u):t.placeholderData,e!==void 0&&(m=`success`,d=ay(i?.data,e,t),u=!0)}if(t.select&&d!==void 0&&!h)if(i&&d===a?.data&&t.select===this.#c)d=this.#l;else try{this.#c=t.select,d=t.select(d),d=ay(i?.data,d,t),this.#l=d,this.#s=null}catch(e){this.#s=e}this.#s&&(f=this.#s,d=this.#l,p=Date.now(),m=`error`);let g=l.fetchStatus===`fetching`,_=m===`pending`,v=m===`error`,y=_&&g,b=d!==void 0,x={status:m,fetchStatus:l.fetchStatus,isPending:_,isSuccess:m===`success`,isError:v,isInitialLoading:y,isLoading:y,data:d,dataUpdatedAt:l.dataUpdatedAt,error:f,errorUpdatedAt:p,failureCount:l.fetchFailureCount,failureReason:l.fetchFailureReason,errorUpdateCount:l.errorUpdateCount,isFetched:e.isFetched(),isFetchedAfterMount:l.dataUpdateCount>s.dataUpdateCount||l.errorUpdateCount>s.errorUpdateCount,isFetching:g,isRefetching:g&&!_,isLoadingError:v&&!b,isPaused:l.fetchStatus===`paused`,isPlaceholderData:u,isRefetchError:v&&b,isStale:Iy(e,t),refetch:this.refetch,promise:this.#o,isEnabled:Kv(t.enabled,e)!==!1};if(this.options.experimental_prefetchInRender){let t=x.data!==void 0,r=x.status===`error`&&!t,i=e=>{r?e.reject(x.error):t&&e.resolve(x.data)},a=()=>{let e=this.#o=x.promise=my();i(e)},o=this.#o;switch(o.status){case`pending`:e.queryHash===n.queryHash&&i(o);break;case`fulfilled`:(r||x.data!==o.value)&&a();break;case`rejected`:(!r||x.error!==o.reason)&&a()}}return x}updateResult(){let e=this.#r,t=this.createResult(this.#t,this.options);this.#i=this.#t.state,this.#a=this.options,this.#i.data!==void 0&&(this.#u=this.#t),!ey(t,e)&&(this.#r=t,this.#C({listeners:(()=>{if(!e)return!0;let{notifyOnChangeProps:t}=this.options,n=typeof t==`function`?t():t;if(n===`all`||!n&&!this.#m.size)return!0;let r=new Set(n??this.#m);return this.options.throwOnError&&r.add(`error`),Object.keys(this.#r).some(t=>{let n=t;return this.#r[n]!==e[n]&&r.has(n)})})()}))}#S(){let e=this.#e.getQueryCache().build(this.#e,this.options);if(e===this.#t)return;let t=this.#t;this.#t=e,this.#n=e.state,this.hasListeners()&&(t?.removeObserver(this),e.addObserver(this))}onQueryUpdate(){this.updateResult(),this.hasListeners()&&this.#y()}#C(e){_y.batch(()=>{e.listeners&&this.listeners.forEach(e=>{e(this.#r)}),this.#e.getQueryCache().notify({query:this.#t,type:`observerResultsUpdated`})})}};function My(e,t){return Kv(t.enabled,e)!==!1&&e.state.data===void 0&&(e.state.status!==`error`||Kv(t.retryOnMount,e)!==!1)}function Ny(e,t){return My(e,t)||e.state.data!==void 0&&Py(e,t,t.refetchOnMount)}function Py(e,t,n){if(Kv(t.enabled,e)!==!1&&Gv(t.staleTime,e)!==`static`){let r=typeof n==`function`?n(e):n;return r===`always`||r!==!1&&Iy(e,t)}return!1}function Fy(e,t,n,r){return(e!==t||Kv(r.enabled,e)===!1)&&(!n.suspense||e.state.status!==`error`)&&Iy(e,n)}function Iy(e,t){return Kv(t.enabled,e)!==!1&&e.isStaleByTime(Gv(t.staleTime,e))}function Ly(e,t){return!ey(e.getCurrentResult(),t)}var Ry=class extends Cy{#e;#t;#n;#r;constructor(e){super(),this.#e=e.client,this.mutationId=e.mutationId,this.#n=e.mutationCache,this.#t=[],this.state=e.state||zy(),this.setOptions(e.options),this.scheduleGc()}setOptions(e){this.options=e,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(e){this.#t.includes(e)||(this.#t.push(e),this.clearGcTimeout(),this.#n.notify({type:`observerAdded`,mutation:this,observer:e}))}removeObserver(e){this.#t=this.#t.filter(t=>t!==e),this.scheduleGc(),this.#n.notify({type:`observerRemoved`,mutation:this,observer:e})}optionalRemove(){this.#t.length||(this.state.status===`pending`?this.scheduleGc():this.#n.remove(this))}continue(){return this.#r?.continue()??this.execute(this.state.variables)}async execute(e){let t=()=>{this.#i({type:`continue`})},n={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};this.#r=Sy({fn:()=>this.options.mutationFn?this.options.mutationFn(e,n):Promise.reject(Error(`No mutationFn found`)),onFail:(e,t)=>{this.#i({type:`failed`,failureCount:e,error:t})},onPause:()=>{this.#i({type:`pause`})},onContinue:t,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#n.canRun(this)});let r=this.state.status===`pending`,i=!this.#r.canStart();try{if(r)t();else{this.#i({type:`pending`,variables:e,isPaused:i}),this.#n.config.onMutate&&await this.#n.config.onMutate(e,this,n);let t=await this.options.onMutate?.(e,n);t!==this.state.context&&this.#i({type:`pending`,context:t,variables:e,isPaused:i})}let a=await this.#r.start();return await this.#n.config.onSuccess?.(a,e,this.state.context,this,n),await this.options.onSuccess?.(a,e,this.state.context,n),await this.#n.config.onSettled?.(a,null,this.state.variables,this.state.context,this,n),await this.options.onSettled?.(a,null,e,this.state.context,n),this.#i({type:`success`,data:a}),a}catch(t){try{await this.#n.config.onError?.(t,e,this.state.context,this,n)}catch(e){Promise.reject(e)}try{await this.options.onError?.(t,e,this.state.context,n)}catch(e){Promise.reject(e)}try{await this.#n.config.onSettled?.(void 0,t,this.state.variables,this.state.context,this,n)}catch(e){Promise.reject(e)}try{await this.options.onSettled?.(void 0,t,e,this.state.context,n)}catch(e){Promise.reject(e)}throw this.#i({type:`error`,error:t}),t}finally{this.#n.runNext(this)}}#i(e){let t=t=>{switch(e.type){case`failed`:return{...t,failureCount:e.failureCount,failureReason:e.error};case`pause`:return{...t,isPaused:!0};case`continue`:return{...t,isPaused:!1};case`pending`:return{...t,context:e.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:e.isPaused,status:`pending`,variables:e.variables,submittedAt:Date.now()};case`success`:return{...t,data:e.data,failureCount:0,failureReason:null,error:null,status:`success`,isPaused:!1};case`error`:return{...t,data:void 0,error:e.error,failureCount:t.failureCount+1,failureReason:e.error,isPaused:!1,status:`error`}}};this.state=t(this.state),_y.batch(()=>{this.#t.forEach(t=>{t.onMutationUpdate(e)}),this.#n.notify({mutation:this,type:`updated`,action:e})})}};function zy(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:`idle`,variables:void 0,submittedAt:0}}var By=class extends Fv{constructor(e={}){super(),this.config=e,this.#e=new Set,this.#t=new Map,this.#n=0}#e;#t;#n;build(e,t,n){let r=new Ry({client:e,mutationCache:this,mutationId:++this.#n,options:e.defaultMutationOptions(t),state:n});return this.add(r),r}add(e){this.#e.add(e);let t=Vy(e);if(typeof t==`string`){let n=this.#t.get(t);n?n.push(e):this.#t.set(t,[e])}this.notify({type:`added`,mutation:e})}remove(e){if(this.#e.delete(e)){let t=Vy(e);if(typeof t==`string`){let n=this.#t.get(t);if(n)if(n.length>1){let t=n.indexOf(e);t!==-1&&n.splice(t,1)}else n[0]===e&&this.#t.delete(t)}}this.notify({type:`removed`,mutation:e})}canRun(e){let t=Vy(e);if(typeof t==`string`){let n=this.#t.get(t)?.find(e=>e.state.status===`pending`);return!n||n===e}return!0}runNext(e){let t=Vy(e);return typeof t==`string`?(this.#t.get(t)?.find(t=>t!==e&&t.state.isPaused))?.continue()??Promise.resolve():Promise.resolve()}clear(){_y.batch(()=>{this.#e.forEach(e=>{this.notify({type:`removed`,mutation:e})}),this.#e.clear(),this.#t.clear()})}getAll(){return Array.from(this.#e)}find(e){let t={exact:!0,...e};return this.getAll().find(e=>Jv(t,e))}findAll(e={}){return this.getAll().filter(t=>Jv(e,t))}notify(e){_y.batch(()=>{this.listeners.forEach(t=>{t(e)})})}resumePausedMutations(){let e=this.getAll().filter(e=>e.state.isPaused);return _y.batch(()=>Promise.all(e.map(e=>e.continue().catch(Vv))))}};function Vy(e){return e.options.scope?.id}var Hy=class extends Fv{#e;#t=void 0;#n;#r;constructor(e,t){super(),this.#e=e,this.setOptions(t),this.bindMethods(),this.#i()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(e){let t=this.options;this.options=this.#e.defaultMutationOptions(e),ey(this.options,t)||this.#e.getMutationCache().notify({type:`observerOptionsUpdated`,mutation:this.#n,observer:this}),t?.mutationKey&&this.options.mutationKey&&Xv(t.mutationKey)!==Xv(this.options.mutationKey)?this.reset():this.#n?.state.status===`pending`&&this.#n.setOptions(this.options)}onUnsubscribe(){this.hasListeners()||this.#n?.removeObserver(this)}onMutationUpdate(e){this.#i(),this.#a(e)}getCurrentResult(){return this.#t}reset(){this.#n?.removeObserver(this),this.#n=void 0,this.#i(),this.#a()}mutate(e,t){return this.#r=t,this.#n?.removeObserver(this),this.#n=this.#e.getMutationCache().build(this.#e,this.options),this.#n.addObserver(this),this.#n.execute(e)}#i(){let e=this.#n?.state??zy();this.#t={...e,isPending:e.status===`pending`,isSuccess:e.status===`success`,isError:e.status===`error`,isIdle:e.status===`idle`,mutate:this.mutate,reset:this.reset}}#a(e){_y.batch(()=>{if(this.#r&&this.hasListeners()){let t=this.#t.variables,n=this.#t.context,r={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};if(e?.type===`success`){try{this.#r.onSuccess?.(e.data,t,n,r)}catch(e){Promise.reject(e)}try{this.#r.onSettled?.(e.data,null,t,n,r)}catch(e){Promise.reject(e)}}else if(e?.type===`error`){try{this.#r.onError?.(e.error,t,n,r)}catch(e){Promise.reject(e)}try{this.#r.onSettled?.(void 0,e.error,t,n,r)}catch(e){Promise.reject(e)}}}this.listeners.forEach(e=>{e(this.#t)})})}},Uy=class extends Fv{constructor(e={}){super(),this.config=e,this.#e=new Map}#e;build(e,t,n){let r=t.queryKey,i=t.queryHash??Yv(r,t),a=this.get(i);return a||(a=new Dy({client:e,queryKey:r,queryHash:i,options:e.defaultQueryOptions(t),state:n,defaultOptions:e.getQueryDefaults(r)}),this.add(a)),a}add(e){this.#e.has(e.queryHash)||(this.#e.set(e.queryHash,e),this.notify({type:`added`,query:e}))}remove(e){let t=this.#e.get(e.queryHash);t&&(e.destroy(),t===e&&this.#e.delete(e.queryHash),this.notify({type:`removed`,query:e}))}clear(){_y.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}get(e){return this.#e.get(e)}getAll(){return[...this.#e.values()]}find(e){let t={exact:!0,...e};return this.getAll().find(e=>qv(t,e))}findAll(e={}){let t=this.getAll();return Object.keys(e).length>0?t.filter(t=>qv(e,t)):t}notify(e){_y.batch(()=>{this.listeners.forEach(t=>{t(e)})})}onFocus(){_y.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){_y.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},tee=class{#e;#t;#n;#r;#i;#a;#o;#s;constructor(e={}){this.#e=e.queryCache||new Uy,this.#t=e.mutationCache||new By,this.#n=e.defaultOptions||{},this.#r=new Map,this.#i=new Map,this.#a=0}mount(){this.#a++,this.#a===1&&(this.#o=Iv.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onFocus())}),this.#s=vy.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onOnline())}))}unmount(){this.#a--,this.#a===0&&(this.#o?.(),this.#o=void 0,this.#s?.(),this.#s=void 0)}isFetching(e){return this.#e.findAll({...e,fetchStatus:`fetching`}).length}isMutating(e){return this.#t.findAll({...e,status:`pending`}).length}getQueryData(e){let t=this.defaultQueryOptions({queryKey:e});return this.#e.get(t.queryHash)?.state.data}ensureQueryData(e){let t=this.defaultQueryOptions(e),n=this.#e.build(this,t),r=n.state.data;return r===void 0?this.fetchQuery(e):(e.revalidateIfStale&&n.isStaleByTime(Gv(t.staleTime,n))&&this.prefetchQuery(t),Promise.resolve(r))}getQueriesData(e){return this.#e.findAll(e).map(({queryKey:e,state:t})=>[e,t.data])}setQueryData(e,t,n){let r=this.defaultQueryOptions({queryKey:e}),i=this.#e.get(r.queryHash)?.state.data,a=Hv(t,i);if(a!==void 0)return this.#e.build(this,r).setData(a,{...n,manual:!0})}setQueriesData(e,t,n){return _y.batch(()=>this.#e.findAll(e).map(({queryKey:e})=>[e,this.setQueryData(e,t,n)]))}getQueryState(e){let t=this.defaultQueryOptions({queryKey:e});return this.#e.get(t.queryHash)?.state}removeQueries(e){let t=this.#e;_y.batch(()=>{t.findAll(e).forEach(e=>{t.remove(e)})})}resetQueries(e,t){let n=this.#e;return _y.batch(()=>(n.findAll(e).forEach(e=>{e.reset()}),this.refetchQueries({type:`active`,...e},t)))}cancelQueries(e,t={}){let n={revert:!0,...t},r=_y.batch(()=>this.#e.findAll(e).map(e=>e.cancel(n)));return Promise.all(r).then(Vv).catch(Vv)}invalidateQueries(e,t={}){return _y.batch(()=>(this.#e.findAll(e).forEach(e=>{e.invalidate()}),e?.refetchType===`none`?Promise.resolve():this.refetchQueries({...e,type:e?.refetchType??e?.type??`active`},t)))}refetchQueries(e,t={}){let n={...t,cancelRefetch:t.cancelRefetch??!0},r=_y.batch(()=>this.#e.findAll(e).filter(e=>!e.isDisabled()&&!e.isStatic()).map(e=>{let t=e.fetch(void 0,n);return n.throwOnError||(t=t.catch(Vv)),e.state.fetchStatus===`paused`?Promise.resolve():t}));return Promise.all(r).then(Vv)}fetchQuery(e){let t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);let n=this.#e.build(this,t);return n.isStaleByTime(Gv(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(Vv).catch(Vv)}fetchInfiniteQuery(e){return e._type=`infinite`,this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(Vv).catch(Vv)}ensureInfiniteQueryData(e){return e._type=`infinite`,this.ensureQueryData(e)}resumePausedMutations(){return vy.isOnline()?this.#t.resumePausedMutations():Promise.resolve()}getQueryCache(){return this.#e}getMutationCache(){return this.#t}getDefaultOptions(){return this.#n}setDefaultOptions(e){this.#n=e}setQueryDefaults(e,t){this.#r.set(Xv(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){let t=[...this.#r.values()],n={};return t.forEach(t=>{Zv(e,t.queryKey)&&Object.assign(n,t.defaultOptions)}),n}setMutationDefaults(e,t){this.#i.set(Xv(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){let t=[...this.#i.values()],n={};return t.forEach(t=>{Zv(e,t.mutationKey)&&Object.assign(n,t.defaultOptions)}),n}defaultQueryOptions(e){if(e._defaulted)return e;let t={...this.#n.queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||=Yv(t.queryKey,t),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!==`always`),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode=`offlineFirst`),t.queryFn===ly&&(t.enabled=!1),t}defaultMutationOptions(e){return e?._defaulted?e:{...this.#n.mutations,...e?.mutationKey&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){this.#e.clear(),this.#t.clear()}},Wy=w.createContext(void 0),Gy=e=>{let t=w.useContext(Wy);if(e)return e;if(!t)throw Error(`No QueryClient set, use QueryClientProvider to set one`);return t},nee=({client:e,children:t})=>(w.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),(0,G.jsx)(Wy.Provider,{value:e,children:t})),Ky=w.createContext(!1),ree=()=>w.useContext(Ky);Ky.Provider;function iee(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var aee=w.createContext(iee()),oee=()=>w.useContext(aee),see=(e,t,n)=>{let r=n?.state.error&&typeof e.throwOnError==`function`?dy(e.throwOnError,[n.state.error,n]):e.throwOnError;(e.suspense||e.experimental_prefetchInRender||r)&&(t.isReset()||(e.retryOnMount=!1))},cee=e=>{w.useEffect(()=>{e.clearReset()},[e])},lee=({result:e,errorResetBoundary:t,throwOnError:n,query:r,suspense:i})=>e.isError&&!t.isReset()&&!e.isFetching&&r&&(i&&e.data===void 0||dy(n,[e.error,r])),uee=e=>{if(e.suspense){let t=1e3,n=e=>e===`static`?e:Math.max(e??t,t),r=e.staleTime;e.staleTime=typeof r==`function`?(...e)=>n(r(...e)):n(r),typeof e.gcTime==`number`&&(e.gcTime=Math.max(e.gcTime,t))}},dee=(e,t)=>e.isLoading&&e.isFetching&&!t,fee=(e,t)=>e?.suspense&&t.isPending,qy=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function Jy(e,t,n){let r=ree(),i=oee(),a=Gy(n),o=a.defaultQueryOptions(e);a.getDefaultOptions().queries?._experimental_beforeQuery?.(o);let s=a.getQueryCache().get(o.queryHash),c=e.subscribed!==!1;o._optimisticResults=r?`isRestoring`:c?`optimistic`:void 0,uee(o),see(o,i,s),cee(i);let l=!a.getQueryCache().get(o.queryHash),[u]=w.useState(()=>new t(a,o)),d=u.getOptimisticResult(o),f=!r&&c;if(w.useSyncExternalStore(w.useCallback(e=>{let t=f?u.subscribe(_y.batchCalls(e)):Vv;return u.updateResult(),t},[u,f]),()=>u.getCurrentResult(),()=>u.getCurrentResult()),w.useEffect(()=>{u.setOptions(o)},[o,u]),fee(o,d))throw qy(o,u,i);if(lee({result:d,errorResetBoundary:i,throwOnError:o.throwOnError,query:s,suspense:o.suspense}))throw d.error;return a.getDefaultOptions().queries?._experimental_afterQuery?.(o,d),o.experimental_prefetchInRender&&!py.isServer()&&dee(d,r)&&(l?qy(o,u,i):s?.promise)?.catch(Vv).finally(()=>{u.updateResult()}),o.notifyOnChangeProps?d:u.trackResult(d)}function Yy(e,t){return Jy(e,jy,t)}function Xy(e,t){let n=Gy(t),[r]=w.useState(()=>new Hy(n,e));w.useEffect(()=>{r.setOptions(e)},[r,e]);let i=w.useSyncExternalStore(w.useCallback(e=>r.subscribe(_y.batchCalls(e)),[r]),()=>r.getCurrentResult(),()=>r.getCurrentResult()),a=w.useCallback((e,t)=>{r.mutate(e,t).catch(Vv)},[r]);if(i.error&&dy(r.options.throwOnError,[i.error]))throw i.error;return{...i,mutate:a,mutateAsync:i.mutate}}var Zy=o((e=>{function t(e,t){var n=e.length;e.push(t);a:for(;0<n;){var r=n-1>>>1,a=e[r];if(0<i(a,t))e[r]=t,e[n]=a,n=r;else break a}}function n(e){return e.length===0?null:e[0]}function r(e){if(e.length===0)return null;var t=e[0],n=e.pop();if(n!==t){e[0]=n;a:for(var r=0,a=e.length,o=a>>>1;r<o;){var s=2*(r+1)-1,c=e[s],l=s+1,u=e[l];if(0>i(c,n))l<a&&0>i(u,c)?(e[r]=u,e[l]=n,r=l):(e[r]=c,e[s]=n,r=s);else if(l<a&&0>i(u,n))e[r]=u,e[l]=n,r=l;else break a}}return t}function i(e,t){var n=e.sortIndex-t.sortIndex;return n===0?e.id-t.id:n}if(e.unstable_now=void 0,typeof performance==`object`&&typeof performance.now==`function`){var a=performance;e.unstable_now=function(){return a.now()}}else{var o=Date,s=o.now();e.unstable_now=function(){return o.now()-s}}var c=[],l=[],u=1,d=null,f=3,p=!1,m=!1,h=!1,g=!1,_=typeof setTimeout==`function`?setTimeout:null,v=typeof clearTimeout==`function`?clearTimeout:null,y=typeof setImmediate<`u`?setImmediate:null;function b(e){for(var i=n(l);i!==null;){if(i.callback===null)r(l);else if(i.startTime<=e)r(l),i.sortIndex=i.expirationTime,t(c,i);else break;i=n(l)}}function x(e){if(h=!1,b(e),!m)if(n(c)!==null)m=!0,S||(S=!0,O());else{var t=n(l);t!==null&&j(x,t.startTime-e)}}var S=!1,C=-1,w=5,T=-1;function E(){return g?!0:!(e.unstable_now()-T<w)}function D(){if(g=!1,S){var t=e.unstable_now();T=t;var i=!0;try{a:{m=!1,h&&(h=!1,v(C),C=-1),p=!0;var a=f;try{b:{for(b(t),d=n(c);d!==null&&!(d.expirationTime>t&&E());){var o=d.callback;if(typeof o==`function`){d.callback=null,f=d.priorityLevel;var s=o(d.expirationTime<=t);if(t=e.unstable_now(),typeof s==`function`){d.callback=s,b(t),i=!0;break b}d===n(c)&&r(c),b(t)}else r(c);d=n(c)}if(d!==null)i=!0;else{var u=n(l);u!==null&&j(x,u.startTime-t),i=!1}}break a}finally{d=null,f=a,p=!1}}}finally{i?O():S=!1}}}var O;if(typeof y==`function`)O=function(){y(D)};else if(typeof MessageChannel<`u`){var k=new MessageChannel,A=k.port2;k.port1.onmessage=D,O=function(){A.postMessage(null)}}else O=function(){_(D,0)};function j(t,n){C=_(function(){t(e.unstable_now())},n)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(e){e.callback=null},e.unstable_forceFrameRate=function(e){0>e||125<e?console.error(`forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported`):w=0<e?Math.floor(1e3/e):5},e.unstable_getCurrentPriorityLevel=function(){return f},e.unstable_next=function(e){switch(f){case 1:case 2:case 3:var t=3;break;default:t=f}var n=f;f=t;try{return e()}finally{f=n}},e.unstable_requestPaint=function(){g=!0},e.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=f;f=e;try{return t()}finally{f=n}},e.unstable_scheduleCallback=function(r,i,a){var o=e.unstable_now();switch(typeof a==`object`&&a?(a=a.delay,a=typeof a==`number`&&0<a?o+a:o):a=o,r){case 1:var s=-1;break;case 2:s=250;break;case 5:s=1073741823;break;case 4:s=1e4;break;default:s=5e3}return s=a+s,r={id:u++,callback:i,priorityLevel:r,startTime:a,expirationTime:s,sortIndex:-1},a>o?(r.sortIndex=a,t(l,r),n(c)===null&&r===n(l)&&(h?(v(C),C=-1):h=!0,j(x,a-o))):(r.sortIndex=s,t(c,r),m||p||(m=!0,S||(S=!0,O()))),r},e.unstable_shouldYield=E,e.unstable_wrapCallback=function(e){var t=f;return function(){var n=f;f=t;try{return e.apply(this,arguments)}finally{f=n}}}})),Qy=o(((e,t)=>{t.exports=Zy()})),$y=o((e=>{var t=Qy(),n=C(),r=Je();function i(e){var t=`https://react.dev/errors/`+e;if(1<arguments.length){t+=`?args[]=`+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+=`&args[]=`+encodeURIComponent(arguments[n])}return`Minified React error #`+e+`; visit `+t+` for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`}function a(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function o(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,t.flags&4098&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function s(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function c(e){if(e.tag===31){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function l(e){if(o(e)!==e)throw Error(i(188))}function u(e){var t=e.alternate;if(!t){if(t=o(e),t===null)throw Error(i(188));return t===e?e:null}for(var n=e,r=t;;){var a=n.return;if(a===null)break;var s=a.alternate;if(s===null){if(r=a.return,r!==null){n=r;continue}break}if(a.child===s.child){for(s=a.child;s;){if(s===n)return l(a),e;if(s===r)return l(a),t;s=s.sibling}throw Error(i(188))}if(n.return!==r.return)n=a,r=s;else{for(var c=!1,u=a.child;u;){if(u===n){c=!0,n=a,r=s;break}if(u===r){c=!0,r=a,n=s;break}u=u.sibling}if(!c){for(u=s.child;u;){if(u===n){c=!0,n=s,r=a;break}if(u===r){c=!0,r=s,n=a;break}u=u.sibling}if(!c)throw Error(i(189))}}if(n.alternate!==r)throw Error(i(190))}if(n.tag!==3)throw Error(i(188));return n.stateNode.current===n?e:t}function d(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=d(e),t!==null)return t;e=e.sibling}return null}var f=Object.assign,p=Symbol.for(`react.element`),m=Symbol.for(`react.transitional.element`),h=Symbol.for(`react.portal`),g=Symbol.for(`react.fragment`),_=Symbol.for(`react.strict_mode`),v=Symbol.for(`react.profiler`),y=Symbol.for(`react.consumer`),b=Symbol.for(`react.context`),x=Symbol.for(`react.forward_ref`),S=Symbol.for(`react.suspense`),w=Symbol.for(`react.suspense_list`),T=Symbol.for(`react.memo`),E=Symbol.for(`react.lazy`),D=Symbol.for(`react.activity`),O=Symbol.for(`react.memo_cache_sentinel`),k=Symbol.iterator;function A(e){return typeof e!=`object`||!e?null:(e=k&&e[k]||e[`@@iterator`],typeof e==`function`?e:null)}var j=Symbol.for(`react.client.reference`);function M(e){if(e==null)return null;if(typeof e==`function`)return e.$$typeof===j?null:e.displayName||e.name||null;if(typeof e==`string`)return e;switch(e){case g:return`Fragment`;case v:return`Profiler`;case _:return`StrictMode`;case S:return`Suspense`;case w:return`SuspenseList`;case D:return`Activity`}if(typeof e==`object`)switch(e.$$typeof){case h:return`Portal`;case b:return e.displayName||`Context`;case y:return(e._context.displayName||`Context`)+`.Consumer`;case x:var t=e.render;return e=e.displayName,e||=(e=t.displayName||t.name||``,e===``?`ForwardRef`:`ForwardRef(`+e+`)`),e;case T:return t=e.displayName||null,t===null?M(e.type)||`Memo`:t;case E:t=e._payload,e=e._init;try{return M(e(t))}catch{}}return null}var N=Array.isArray,P=n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,F=r.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,I={pending:!1,data:null,method:null,action:null},L=[],R=-1;function z(e){return{current:e}}function B(e){0>R||(e.current=L[R],L[R]=null,R--)}function V(e,t){R++,L[R]=e.current,e.current=t}var H=z(null),ee=z(null),te=z(null),U=z(null);function ne(e,t){switch(V(te,t),V(ee,e),V(H,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?Wd(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=Wd(t),e=Gd(t,e);else switch(e){case`svg`:e=1;break;case`math`:e=2;break;default:e=0}}B(H),V(H,e)}function re(){B(H),B(ee),B(te)}function ie(e){e.memoizedState!==null&&V(U,e);var t=H.current,n=Gd(t,e.type);t!==n&&(V(ee,e),V(H,n))}function ae(e){ee.current===e&&(B(H),B(ee)),U.current===e&&(B(U),tp._currentValue=I)}var oe,se;function ce(e){if(oe===void 0)try{throw Error()}catch(e){var t=e.stack.trim().match(/\n( *(at )?)/);oe=t&&t[1]||``,se=-1<e.stack.indexOf(`
50
50
  at`)?` (<anonymous>)`:-1<e.stack.indexOf(`@`)?`@unknown:0:0`:``}return`
51
51
  `+oe+e+se}var le=!1;function W(e,t){if(!e||le)return``;le=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var r={DetermineComponentFrameRoot:function(){try{if(t){var n=function(){throw Error()};if(Object.defineProperty(n.prototype,"props",{set:function(){throw Error()}}),typeof Reflect==`object`&&Reflect.construct){try{Reflect.construct(n,[])}catch(e){var r=e}Reflect.construct(e,[],n)}else{try{n.call()}catch(e){r=e}e.call(n.prototype)}}else{try{throw Error()}catch(e){r=e}(n=e())&&typeof n.catch==`function`&&n.catch(function(){})}}catch(e){if(e&&r&&typeof e.stack==`string`)return[e.stack,r.stack]}return[null,null]}};r.DetermineComponentFrameRoot.displayName=`DetermineComponentFrameRoot`;var i=Object.getOwnPropertyDescriptor(r.DetermineComponentFrameRoot,`name`);i&&i.configurable&&Object.defineProperty(r.DetermineComponentFrameRoot,"name",{value:`DetermineComponentFrameRoot`});var a=r.DetermineComponentFrameRoot(),o=a[0],s=a[1];if(o&&s){var c=o.split(`
52
52
  `),l=s.split(`
@@ -54,43 +54,43 @@ var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=
54
54
  `+c[r].replace(` at new `,` at `);return e.displayName&&u.includes(`<anonymous>`)&&(u=u.replace(`<anonymous>`,e.displayName)),u}while(1<=r&&0<=i);break}}}finally{le=!1,Error.prepareStackTrace=n}return(n=e?e.displayName||e.name:``)?ce(n):``}function ue(e,t){switch(e.tag){case 26:case 27:case 5:return ce(e.type);case 16:return ce(`Lazy`);case 13:return e.child!==t&&t!==null?ce(`Suspense Fallback`):ce(`Suspense`);case 19:return ce(`SuspenseList`);case 0:case 15:return W(e.type,!1);case 11:return W(e.type.render,!1);case 1:return W(e.type,!0);case 31:return ce(`Activity`);default:return``}}function de(e){try{var t=``,n=null;do t+=ue(e,n),n=e,e=e.return;while(e);return t}catch(e){return`
55
55
  Error generating stack: `+e.message+`
56
56
  `+e.stack}}var fe=Object.prototype.hasOwnProperty,pe=t.unstable_scheduleCallback,me=t.unstable_cancelCallback,he=t.unstable_shouldYield,ge=t.unstable_requestPaint,_e=t.unstable_now,ve=t.unstable_getCurrentPriorityLevel,ye=t.unstable_ImmediatePriority,be=t.unstable_UserBlockingPriority,xe=t.unstable_NormalPriority,Se=t.unstable_LowPriority,Ce=t.unstable_IdlePriority,we=t.log,Te=t.unstable_setDisableYieldValue,Ee=null,De=null;function Oe(e){if(typeof we==`function`&&Te(e),De&&typeof De.setStrictMode==`function`)try{De.setStrictMode(Ee,e)}catch{}}var ke=Math.clz32?Math.clz32:Me,Ae=Math.log,je=Math.LN2;function Me(e){return e>>>=0,e===0?32:31-(Ae(e)/je|0)|0}var Ne=256,Pe=262144,Fe=4194304;function Ie(e){var t=e&42;if(t!==0)return t;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return e&261888;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function Le(e,t,n){var r=e.pendingLanes;if(r===0)return 0;var i=0,a=e.suspendedLanes,o=e.pingedLanes;e=e.warmLanes;var s=r&134217727;return s===0?(s=r&~a,s===0?o===0?n||(n=r&~e,n!==0&&(i=Ie(n))):i=Ie(o):i=Ie(s)):(r=s&~a,r===0?(o&=s,o===0?n||(n=s&~e,n!==0&&(i=Ie(n))):i=Ie(o)):i=Ie(r)),i===0?0:t!==0&&t!==i&&(t&a)===0&&(a=i&-i,n=t&-t,a>=n||a===32&&n&4194048)?t:i}function Re(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function ze(e,t){switch(e){case 1:case 2:case 4:case 8:case 64:return t+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function Be(){var e=Fe;return Fe<<=1,!(Fe&62914560)&&(Fe=4194304),e}function Ve(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function He(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function Ue(e,t,n,r,i,a){var o=e.pendingLanes;e.pendingLanes=n,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=n,e.entangledLanes&=n,e.errorRecoveryDisabledLanes&=n,e.shellSuspendCounter=0;var s=e.entanglements,c=e.expirationTimes,l=e.hiddenUpdates;for(n=o&~n;0<n;){var u=31-ke(n),d=1<<u;s[u]=0,c[u]=-1;var f=l[u];if(f!==null)for(l[u]=null,u=0;u<f.length;u++){var p=f[u];p!==null&&(p.lane&=-536870913)}n&=~d}r!==0&&We(e,r,0),a!==0&&i===0&&e.tag!==0&&(e.suspendedLanes|=a&~(o&~t))}function We(e,t,n){e.pendingLanes|=t,e.suspendedLanes&=~t;var r=31-ke(t);e.entangledLanes|=t,e.entanglements[r]=e.entanglements[r]|1073741824|n&261930}function Ge(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-ke(n),i=1<<r;i&t|e[r]&t&&(e[r]|=t),n&=~i}}function Ke(e,t){var n=t&-t;return n=n&42?1:qe(n),(n&(e.suspendedLanes|t))===0?n:0}function qe(e){switch(e){case 2:e=1;break;case 8:e=4;break;case 32:e=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:e=128;break;case 268435456:e=134217728;break;default:e=0}return e}function Ye(e){return e&=-e,2<e?8<e?e&134217727?32:268435456:8:2}function Xe(){var e=F.p;return e===0?(e=window.event,e===void 0?32:_p(e.type)):e}function Ze(e,t){var n=F.p;try{return F.p=e,t()}finally{F.p=n}}var Qe=Math.random().toString(36).slice(2),$e=`__reactFiber$`+Qe,et=`__reactProps$`+Qe,tt=`__reactContainer$`+Qe,nt=`__reactEvents$`+Qe,rt=`__reactListeners$`+Qe,it=`__reactHandles$`+Qe,at=`__reactResources$`+Qe,ot=`__reactMarker$`+Qe;function st(e){delete e[$e],delete e[et],delete e[nt],delete e[rt],delete e[it]}function ct(e){var t=e[$e];if(t)return t;for(var n=e.parentNode;n;){if(t=n[tt]||n[$e]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=mf(e);e!==null;){if(n=e[$e])return n;e=mf(e)}return t}e=n,n=e.parentNode}return null}function lt(e){if(e=e[$e]||e[tt]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function ut(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(i(33))}function dt(e){var t=e[at];return t||=e[at]={hoistableStyles:new Map,hoistableScripts:new Map},t}function ft(e){e[ot]=!0}var pt=new Set,mt={};function ht(e,t){gt(e,t),gt(e+`Capture`,t)}function gt(e,t){for(mt[e]=t,e=0;e<t.length;e++)pt.add(t[e])}var _t=RegExp(`^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD][:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$`),vt={},yt={};function bt(e){return fe.call(yt,e)?!0:fe.call(vt,e)?!1:_t.test(e)?yt[e]=!0:(vt[e]=!0,!1)}function xt(e,t,n){if(bt(t))if(n===null)e.removeAttribute(t);else{switch(typeof n){case`undefined`:case`function`:case`symbol`:e.removeAttribute(t);return;case`boolean`:var r=t.toLowerCase().slice(0,5);if(r!==`data-`&&r!==`aria-`){e.removeAttribute(t);return}}e.setAttribute(t,``+n)}}function St(e,t,n){if(n===null)e.removeAttribute(t);else{switch(typeof n){case`undefined`:case`function`:case`symbol`:case`boolean`:e.removeAttribute(t);return}e.setAttribute(t,``+n)}}function Ct(e,t,n,r){if(r===null)e.removeAttribute(n);else{switch(typeof r){case`undefined`:case`function`:case`symbol`:case`boolean`:e.removeAttribute(n);return}e.setAttributeNS(t,n,``+r)}}function wt(e){switch(typeof e){case`bigint`:case`boolean`:case`number`:case`string`:case`undefined`:return e;case`object`:return e;default:return``}}function Tt(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()===`input`&&(t===`checkbox`||t===`radio`)}function Et(e,t,n){var r=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&r!==void 0&&typeof r.get==`function`&&typeof r.set==`function`){var i=r.get,a=r.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(e){n=``+e,a.call(this,e)}}),Object.defineProperty(e,t,{enumerable:r.enumerable}),{getValue:function(){return n},setValue:function(e){n=``+e},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Dt(e){if(!e._valueTracker){var t=Tt(e)?`checked`:`value`;e._valueTracker=Et(e,t,``+e[t])}}function Ot(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r=``;return e&&(r=Tt(e)?e.checked?`true`:`false`:e.value),e=r,e!==n&&(t.setValue(e),!0)}function kt(e){if(e||=typeof document<`u`?document:void 0,e===void 0)return null;try{return e.activeElement||e.body}catch{return e.body}}var At=/[\n"\\]/g;function jt(e){return e.replace(At,function(e){return`\\`+e.charCodeAt(0).toString(16)+` `})}function Mt(e,t,n,r,i,a,o,s){e.name=``,o!=null&&typeof o!=`function`&&typeof o!=`symbol`&&typeof o!=`boolean`?e.type=o:e.removeAttribute(`type`),t==null?o!==`submit`&&o!==`reset`||e.removeAttribute(`value`):o===`number`?(t===0&&e.value===``||e.value!=t)&&(e.value=``+wt(t)):e.value!==``+wt(t)&&(e.value=``+wt(t)),t==null?n==null?r!=null&&e.removeAttribute(`value`):Pt(e,o,wt(n)):Pt(e,o,wt(t)),i==null&&a!=null&&(e.defaultChecked=!!a),i!=null&&(e.checked=i&&typeof i!=`function`&&typeof i!=`symbol`),s!=null&&typeof s!=`function`&&typeof s!=`symbol`&&typeof s!=`boolean`?e.name=``+wt(s):e.removeAttribute(`name`)}function Nt(e,t,n,r,i,a,o,s){if(a!=null&&typeof a!=`function`&&typeof a!=`symbol`&&typeof a!=`boolean`&&(e.type=a),t!=null||n!=null){if(!(a!==`submit`&&a!==`reset`||t!=null)){Dt(e);return}n=n==null?``:``+wt(n),t=t==null?n:``+wt(t),s||t===e.value||(e.value=t),e.defaultValue=t}r??=i,r=typeof r!=`function`&&typeof r!=`symbol`&&!!r,e.checked=s?e.checked:!!r,e.defaultChecked=!!r,o!=null&&typeof o!=`function`&&typeof o!=`symbol`&&typeof o!=`boolean`&&(e.name=o),Dt(e)}function Pt(e,t,n){t===`number`&&kt(e.ownerDocument)===e||e.defaultValue===``+n||(e.defaultValue=``+n)}function Ft(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i<n.length;i++)t[`$`+n[i]]=!0;for(n=0;n<e.length;n++)i=t.hasOwnProperty(`$`+e[n].value),e[n].selected!==i&&(e[n].selected=i),i&&r&&(e[n].defaultSelected=!0)}else{for(n=``+wt(n),t=null,i=0;i<e.length;i++){if(e[i].value===n){e[i].selected=!0,r&&(e[i].defaultSelected=!0);return}t!==null||e[i].disabled||(t=e[i])}t!==null&&(t.selected=!0)}}function It(e,t,n){if(t!=null&&(t=``+wt(t),t!==e.value&&(e.value=t),n==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=n==null?``:``+wt(n)}function Lt(e,t,n,r){if(t==null){if(r!=null){if(n!=null)throw Error(i(92));if(N(r)){if(1<r.length)throw Error(i(93));r=r[0]}n=r}n??=``,t=n}n=wt(t),e.defaultValue=n,r=e.textContent,r===n&&r!==``&&r!==null&&(e.value=r),Dt(e)}function Rt(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var zt=new Set(`animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp`.split(` `));function Bt(e,t,n){var r=t.indexOf(`--`)===0;n==null||typeof n==`boolean`||n===``?r?e.setProperty(t,``):t===`float`?e.cssFloat=``:e[t]=``:r?e.setProperty(t,n):typeof n!=`number`||n===0||zt.has(t)?t===`float`?e.cssFloat=n:e[t]=(``+n).trim():e[t]=n+`px`}function Vt(e,t,n){if(t!=null&&typeof t!=`object`)throw Error(i(62));if(e=e.style,n!=null){for(var r in n)!n.hasOwnProperty(r)||t!=null&&t.hasOwnProperty(r)||(r.indexOf(`--`)===0?e.setProperty(r,``):r===`float`?e.cssFloat=``:e[r]=``);for(var a in t)r=t[a],t.hasOwnProperty(a)&&n[a]!==r&&Bt(e,a,r)}else for(var o in t)t.hasOwnProperty(o)&&Bt(e,o,t[o])}function Ht(e){if(e.indexOf(`-`)===-1)return!1;switch(e){case`annotation-xml`:case`color-profile`:case`font-face`:case`font-face-src`:case`font-face-uri`:case`font-face-format`:case`font-face-name`:case`missing-glyph`:return!1;default:return!0}}var Ut=new Map([[`acceptCharset`,`accept-charset`],[`htmlFor`,`for`],[`httpEquiv`,`http-equiv`],[`crossOrigin`,`crossorigin`],[`accentHeight`,`accent-height`],[`alignmentBaseline`,`alignment-baseline`],[`arabicForm`,`arabic-form`],[`baselineShift`,`baseline-shift`],[`capHeight`,`cap-height`],[`clipPath`,`clip-path`],[`clipRule`,`clip-rule`],[`colorInterpolation`,`color-interpolation`],[`colorInterpolationFilters`,`color-interpolation-filters`],[`colorProfile`,`color-profile`],[`colorRendering`,`color-rendering`],[`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`],[`horizAdvX`,`horiz-adv-x`],[`horizOriginX`,`horiz-origin-x`],[`imageRendering`,`image-rendering`],[`letterSpacing`,`letter-spacing`],[`lightingColor`,`lighting-color`],[`markerEnd`,`marker-end`],[`markerMid`,`marker-mid`],[`markerStart`,`marker-start`],[`overlinePosition`,`overline-position`],[`overlineThickness`,`overline-thickness`],[`paintOrder`,`paint-order`],[`panose-1`,`panose-1`],[`pointerEvents`,`pointer-events`],[`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`],[`textAnchor`,`text-anchor`],[`textDecoration`,`text-decoration`],[`textRendering`,`text-rendering`],[`transformOrigin`,`transform-origin`],[`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`],[`xmlnsXlink`,`xmlns:xlink`],[`xHeight`,`x-height`]]),Wt=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;function Gt(e){return Wt.test(``+e)?`javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')`:e}function Kt(){}var qt=null;function Jt(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Yt=null,Xt=null;function Zt(e){var t=lt(e);if(t&&(e=t.stateNode)){var n=e[et]||null;a:switch(e=t.stateNode,t.type){case`input`:if(Mt(e,n.value,n.defaultValue,n.defaultValue,n.checked,n.defaultChecked,n.type,n.name),t=n.name,n.type===`radio`&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll(`input[name="`+jt(``+t)+`"][type="radio"]`),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var a=r[et]||null;if(!a)throw Error(i(90));Mt(r,a.value,a.defaultValue,a.defaultValue,a.checked,a.defaultChecked,a.type,a.name)}}for(t=0;t<n.length;t++)r=n[t],r.form===e.form&&Ot(r)}break a;case`textarea`:It(e,n.value,n.defaultValue);break a;case`select`:t=n.value,t!=null&&Ft(e,!!n.multiple,t,!1)}}}var Qt=!1;function $t(e,t,n){if(Qt)return e(t,n);Qt=!0;try{return e(t)}finally{if(Qt=!1,(Yt!==null||Xt!==null)&&(xu(),Yt&&(t=Yt,e=Xt,Xt=Yt=null,Zt(t),e)))for(t=0;t<e.length;t++)Zt(e[t])}}function en(e,t){var n=e.stateNode;if(n===null)return null;var r=n[et]||null;if(r===null)return null;n=r[t];a:switch(t){case`onClick`:case`onClickCapture`:case`onDoubleClick`:case`onDoubleClickCapture`:case`onMouseDown`:case`onMouseDownCapture`:case`onMouseMove`:case`onMouseMoveCapture`:case`onMouseUp`:case`onMouseUpCapture`:case`onMouseEnter`:(r=!r.disabled)||(e=e.type,r=e!==`button`&&e!==`input`&&e!==`select`&&e!==`textarea`),e=!r;break a;default:e=!1}if(e)return null;if(n&&typeof n!=`function`)throw Error(i(231,t,typeof n));return n}var tn=!(typeof window>`u`||window.document===void 0||window.document.createElement===void 0),nn=!1;if(tn)try{var rn={};Object.defineProperty(rn,"passive",{get:function(){nn=!0}}),window.addEventListener(`test`,rn,rn),window.removeEventListener(`test`,rn,rn)}catch{nn=!1}var an=null,on=null,sn=null;function cn(){if(sn)return sn;var e,t=on,n=t.length,r,i=`value`in an?an.value:an.textContent,a=i.length;for(e=0;e<n&&t[e]===i[e];e++);var o=n-e;for(r=1;r<=o&&t[n-r]===i[a-r];r++);return sn=i.slice(e,1<r?1-r:void 0)}function ln(e){var t=e.keyCode;return`charCode`in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function un(){return!0}function dn(){return!1}function fn(e){function t(t,n,r,i,a){for(var o in this._reactName=t,this._targetInst=r,this.type=n,this.nativeEvent=i,this.target=a,this.currentTarget=null,e)e.hasOwnProperty(o)&&(t=e[o],this[o]=t?t(i):i[o]);return this.isDefaultPrevented=(i.defaultPrevented==null?!1===i.returnValue:i.defaultPrevented)?un:dn,this.isPropagationStopped=dn,this}return f(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var e=this.nativeEvent;e&&(e.preventDefault?e.preventDefault():typeof e.returnValue!=`unknown`&&(e.returnValue=!1),this.isDefaultPrevented=un)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():typeof e.cancelBubble!=`unknown`&&(e.cancelBubble=!0),this.isPropagationStopped=un)},persist:function(){},isPersistent:un}),t}var pn={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},mn=fn(pn),hn=f({},pn,{view:0,detail:0}),G=fn(hn),gn,_n,vn,yn=f({},hn,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:An,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return`movementX`in e?e.movementX:(e!==vn&&(vn&&e.type===`mousemove`?(gn=e.screenX-vn.screenX,_n=e.screenY-vn.screenY):_n=gn=0,vn=e),gn)},movementY:function(e){return`movementY`in e?e.movementY:_n}}),bn=fn(yn),xn=fn(f({},yn,{dataTransfer:0})),Sn=fn(f({},hn,{relatedTarget:0})),Cn=fn(f({},pn,{animationName:0,elapsedTime:0,pseudoElement:0})),wn=fn(f({},pn,{clipboardData:function(e){return`clipboardData`in e?e.clipboardData:window.clipboardData}})),Tn=fn(f({},pn,{data:0})),En={Esc:`Escape`,Spacebar:` `,Left:`ArrowLeft`,Up:`ArrowUp`,Right:`ArrowRight`,Down:`ArrowDown`,Del:`Delete`,Win:`OS`,Menu:`ContextMenu`,Apps:`ContextMenu`,Scroll:`ScrollLock`,MozPrintableKey:`Unidentified`},Dn={8:`Backspace`,9:`Tab`,12:`Clear`,13:`Enter`,16:`Shift`,17:`Control`,18:`Alt`,19:`Pause`,20:`CapsLock`,27:`Escape`,32:` `,33:`PageUp`,34:`PageDown`,35:`End`,36:`Home`,37:`ArrowLeft`,38:`ArrowUp`,39:`ArrowRight`,40:`ArrowDown`,45:`Insert`,46:`Delete`,112:`F1`,113:`F2`,114:`F3`,115:`F4`,116:`F5`,117:`F6`,118:`F7`,119:`F8`,120:`F9`,121:`F10`,122:`F11`,123:`F12`,144:`NumLock`,145:`ScrollLock`,224:`Meta`},On={Alt:`altKey`,Control:`ctrlKey`,Meta:`metaKey`,Shift:`shiftKey`};function kn(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=On[e])?!!t[e]:!1}function An(){return kn}var jn=fn(f({},hn,{key:function(e){if(e.key){var t=En[e.key]||e.key;if(t!==`Unidentified`)return t}return e.type===`keypress`?(e=ln(e),e===13?`Enter`:String.fromCharCode(e)):e.type===`keydown`||e.type===`keyup`?Dn[e.keyCode]||`Unidentified`:``},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:An,charCode:function(e){return e.type===`keypress`?ln(e):0},keyCode:function(e){return e.type===`keydown`||e.type===`keyup`?e.keyCode:0},which:function(e){return e.type===`keypress`?ln(e):e.type===`keydown`||e.type===`keyup`?e.keyCode:0}})),Mn=fn(f({},yn,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0})),K=fn(f({},hn,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:An})),Nn=fn(f({},pn,{propertyName:0,elapsedTime:0,pseudoElement:0})),Pn=fn(f({},yn,{deltaX:function(e){return`deltaX`in e?e.deltaX:`wheelDeltaX`in e?-e.wheelDeltaX:0},deltaY:function(e){return`deltaY`in e?e.deltaY:`wheelDeltaY`in e?-e.wheelDeltaY:`wheelDelta`in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0})),Fn=fn(f({},pn,{newState:0,oldState:0})),In=[9,13,27,32],Ln=tn&&`CompositionEvent`in window,Rn=null;tn&&`documentMode`in document&&(Rn=document.documentMode);var zn=tn&&`TextEvent`in window&&!Rn,Bn=tn&&(!Ln||Rn&&8<Rn&&11>=Rn),Vn=` `,Hn=!1;function Un(e,t){switch(e){case`keyup`:return In.indexOf(t.keyCode)!==-1;case`keydown`:return t.keyCode!==229;case`keypress`:case`mousedown`:case`focusout`:return!0;default:return!1}}function Wn(e){return e=e.detail,typeof e==`object`&&`data`in e?e.data:null}var Gn=!1;function Kn(e,t){switch(e){case`compositionend`:return Wn(t);case`keypress`:return t.which===32?(Hn=!0,Vn):null;case`textInput`:return e=t.data,e===Vn&&Hn?null:e;default:return null}}function qn(e,t){if(Gn)return e===`compositionend`||!Ln&&Un(e,t)?(e=cn(),sn=on=an=null,Gn=!1,e):null;switch(e){case`paste`:return null;case`keypress`:if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case`compositionend`:return Bn&&t.locale!==`ko`?null:t.data;default:return null}}var Jn={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function Yn(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t===`input`?!!Jn[e.type]:t===`textarea`}function Xn(e,t,n,r){Yt?Xt?Xt.push(r):Xt=[r]:Yt=r,t=kd(t,`onChange`),0<t.length&&(n=new mn(`onChange`,`change`,null,n,r),e.push({event:n,listeners:t}))}var Zn=null,Qn=null;function $n(e){xd(e,0)}function er(e){if(Ot(ut(e)))return e}function tr(e,t){if(e===`change`)return t}var nr=!1;if(tn){var rr;if(tn){var ir=`oninput`in document;if(!ir){var ar=document.createElement(`div`);ar.setAttribute(`oninput`,`return;`),ir=typeof ar.oninput==`function`}rr=ir}else rr=!1;nr=rr&&(!document.documentMode||9<document.documentMode)}function or(){Zn&&(Zn.detachEvent(`onpropertychange`,sr),Qn=Zn=null)}function sr(e){if(e.propertyName===`value`&&er(Qn)){var t=[];Xn(t,Qn,e,Jt(e)),$t($n,t)}}function cr(e,t,n){e===`focusin`?(or(),Zn=t,Qn=n,Zn.attachEvent(`onpropertychange`,sr)):e===`focusout`&&or()}function lr(e){if(e===`selectionchange`||e===`keyup`||e===`keydown`)return er(Qn)}function ur(e,t){if(e===`click`)return er(t)}function dr(e,t){if(e===`input`||e===`change`)return er(t)}function fr(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var pr=typeof Object.is==`function`?Object.is:fr;function mr(e,t){if(pr(e,t))return!0;if(typeof e!=`object`||!e||typeof t!=`object`||!t)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var i=n[r];if(!fe.call(t,i)||!pr(e[i],t[i]))return!1}return!0}function hr(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function gr(e,t){var n=hr(e);e=0;for(var r;n;){if(n.nodeType===3){if(r=e+n.textContent.length,e<=t&&r>=t)return{node:n,offset:t-e};e=r}a:{for(;n;){if(n.nextSibling){n=n.nextSibling;break a}n=n.parentNode}n=void 0}n=hr(n)}}function _r(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?_r(e,t.parentNode):`contains`in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function vr(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=kt(e.document);t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href==`string`}catch{n=!1}if(n)e=t.contentWindow;else break;t=kt(e.document)}return t}function yr(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t===`input`&&(e.type===`text`||e.type===`search`||e.type===`tel`||e.type===`url`||e.type===`password`)||t===`textarea`||e.contentEditable===`true`)}var br=tn&&`documentMode`in document&&11>=document.documentMode,xr=null,Sr=null,Cr=null,wr=!1;function Tr(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;wr||xr==null||xr!==kt(r)||(r=xr,`selectionStart`in r&&yr(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),Cr&&mr(Cr,r)||(Cr=r,r=kd(Sr,`onSelect`),0<r.length&&(t=new mn(`onSelect`,`select`,null,t,n),e.push({event:t,listeners:r}),t.target=xr)))}function Er(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n[`Webkit`+e]=`webkit`+t,n[`Moz`+e]=`moz`+t,n}var Dr={animationend:Er(`Animation`,`AnimationEnd`),animationiteration:Er(`Animation`,`AnimationIteration`),animationstart:Er(`Animation`,`AnimationStart`),transitionrun:Er(`Transition`,`TransitionRun`),transitionstart:Er(`Transition`,`TransitionStart`),transitioncancel:Er(`Transition`,`TransitionCancel`),transitionend:Er(`Transition`,`TransitionEnd`)},Or={},q={};tn&&(q=document.createElement(`div`).style,`AnimationEvent`in window||(delete Dr.animationend.animation,delete Dr.animationiteration.animation,delete Dr.animationstart.animation),`TransitionEvent`in window||delete Dr.transitionend.transition);function kr(e){if(Or[e])return Or[e];if(!Dr[e])return e;var t=Dr[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in q)return Or[e]=t[n];return e}var Ar=kr(`animationend`),jr=kr(`animationiteration`),Mr=kr(`animationstart`),Nr=kr(`transitionrun`),Pr=kr(`transitionstart`),Fr=kr(`transitioncancel`),Ir=kr(`transitionend`),J=new Map,Lr=`abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel`.split(` `);Lr.push(`scrollEnd`);function Rr(e,t){J.set(e,t),ht(t,[e])}var zr=typeof reportError==`function`?reportError:function(e){if(typeof window==`object`&&typeof window.ErrorEvent==`function`){var t=new window.ErrorEvent(`error`,{bubbles:!0,cancelable:!0,message:typeof e==`object`&&e&&typeof e.message==`string`?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process==`object`&&typeof process.emit==`function`){process.emit(`uncaughtException`,e);return}console.error(e)},Br=[],Vr=0,Hr=0;function Ur(){for(var e=Vr,t=Hr=Vr=0;t<e;){var n=Br[t];Br[t++]=null;var r=Br[t];Br[t++]=null;var i=Br[t];Br[t++]=null;var a=Br[t];if(Br[t++]=null,r!==null&&i!==null){var o=r.pending;o===null?i.next=i:(i.next=o.next,o.next=i),r.pending=i}a!==0&&qr(n,i,a)}}function Wr(e,t,n,r){Br[Vr++]=e,Br[Vr++]=t,Br[Vr++]=n,Br[Vr++]=r,Hr|=r,e.lanes|=r,e=e.alternate,e!==null&&(e.lanes|=r)}function Gr(e,t,n,r){return Wr(e,t,n,r),Jr(e)}function Kr(e,t){return Wr(e,null,null,t),Jr(e)}function qr(e,t,n){e.lanes|=n;var r=e.alternate;r!==null&&(r.lanes|=n);for(var i=!1,a=e.return;a!==null;)a.childLanes|=n,r=a.alternate,r!==null&&(r.childLanes|=n),a.tag===22&&(e=a.stateNode,e===null||e._visibility&1||(i=!0)),e=a,a=a.return;return e.tag===3?(a=e.stateNode,i&&t!==null&&(i=31-ke(n),e=a.hiddenUpdates,r=e[i],r===null?e[i]=[t]:r.push(t),t.lane=n|536870912),a):null}function Jr(e){if(50<fu)throw fu=0,pu=null,Error(i(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var Yr={};function Xr(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Zr(e,t,n,r){return new Xr(e,t,n,r)}function Qr(e){return e=e.prototype,!(!e||!e.isReactComponent)}function $r(e,t){var n=e.alternate;return n===null?(n=Zr(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&65011712,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n.refCleanup=e.refCleanup,n}function ei(e,t){e.flags&=65011714;var n=e.alternate;return n===null?(e.childLanes=0,e.lanes=t,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null):(e.childLanes=n.childLanes,e.lanes=n.lanes,e.child=n.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=n.memoizedProps,e.memoizedState=n.memoizedState,e.updateQueue=n.updateQueue,e.type=n.type,t=n.dependencies,e.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function ti(e,t,n,r,a,o){var s=0;if(r=e,typeof e==`function`)Qr(e)&&(s=1);else if(typeof e==`string`)s=Kf(e,n,H.current)?26:e===`html`||e===`head`||e===`body`?27:5;else a:switch(e){case D:return e=Zr(31,n,t,a),e.elementType=D,e.lanes=o,e;case g:return ni(n.children,a,o,t);case _:s=8,a|=24;break;case v:return e=Zr(12,n,t,a|2),e.elementType=v,e.lanes=o,e;case S:return e=Zr(13,n,t,a),e.elementType=S,e.lanes=o,e;case w:return e=Zr(19,n,t,a),e.elementType=w,e.lanes=o,e;default:if(typeof e==`object`&&e)switch(e.$$typeof){case b:s=10;break a;case y:s=9;break a;case x:s=11;break a;case T:s=14;break a;case E:s=16,r=null;break a}s=29,n=Error(i(130,e===null?`null`:typeof e,``)),r=null}return t=Zr(s,n,t,a),t.elementType=e,t.type=r,t.lanes=o,t}function ni(e,t,n,r){return e=Zr(7,e,r,t),e.lanes=n,e}function ri(e,t,n){return e=Zr(6,e,null,t),e.lanes=n,e}function ii(e){var t=Zr(18,null,null,0);return t.stateNode=e,t}function ai(e,t,n){return t=Zr(4,e.children===null?[]:e.children,e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var oi=new WeakMap;function si(e,t){if(typeof e==`object`&&e){var n=oi.get(e);return n===void 0?(t={value:e,source:t,stack:de(t)},oi.set(e,t),t):n}return{value:e,source:t,stack:de(t)}}var ci=[],li=0,ui=null,di=0,fi=[],pi=0,mi=null,hi=1,gi=``;function _i(e,t){ci[li++]=di,ci[li++]=ui,ui=e,di=t}function vi(e,t,n){fi[pi++]=hi,fi[pi++]=gi,fi[pi++]=mi,mi=e;var r=hi;e=gi;var i=32-ke(r)-1;r&=~(1<<i),n+=1;var a=32-ke(t)+i;if(30<a){var o=i-i%5;a=(r&(1<<o)-1).toString(32),r>>=o,i-=o,hi=1<<32-ke(t)+i|n<<i|r,gi=a+e}else hi=1<<a|n<<i|r,gi=e}function yi(e){e.return!==null&&(_i(e,1),vi(e,1,0))}function bi(e){for(;e===ui;)ui=ci[--li],ci[li]=null,di=ci[--li],ci[li]=null;for(;e===mi;)mi=fi[--pi],fi[pi]=null,gi=fi[--pi],fi[pi]=null,hi=fi[--pi],fi[pi]=null}function xi(e,t){fi[pi++]=hi,fi[pi++]=gi,fi[pi++]=mi,hi=t.id,gi=t.overflow,mi=e}var Si=null,Ci=null,wi=!1,Ti=null,Ei=!1,Di=Error(i(519));function Oi(e){throw Pi(si(Error(i(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?`text`:`HTML`,``)),e)),Di}function ki(e){var t=e.stateNode,n=e.type,r=e.memoizedProps;switch(t[$e]=e,t[et]=r,n){case`dialog`:Sd(`cancel`,t),Sd(`close`,t);break;case`iframe`:case`object`:case`embed`:Sd(`load`,t);break;case`video`:case`audio`:for(n=0;n<yd.length;n++)Sd(yd[n],t);break;case`source`:Sd(`error`,t);break;case`img`:case`image`:case`link`:Sd(`error`,t),Sd(`load`,t);break;case`details`:Sd(`toggle`,t);break;case`input`:Sd(`invalid`,t),Nt(t,r.value,r.defaultValue,r.checked,r.defaultChecked,r.type,r.name,!0);break;case`select`:Sd(`invalid`,t);break;case`textarea`:Sd(`invalid`,t),Lt(t,r.value,r.defaultValue,r.children)}n=r.children,typeof n!=`string`&&typeof n!=`number`&&typeof n!=`bigint`||t.textContent===``+n||!0===r.suppressHydrationWarning||Fd(t.textContent,n)?(r.popover!=null&&(Sd(`beforetoggle`,t),Sd(`toggle`,t)),r.onScroll!=null&&Sd(`scroll`,t),r.onScrollEnd!=null&&Sd(`scrollend`,t),r.onClick!=null&&(t.onclick=Kt),t=!0):t=!1,t||Oi(e,!0)}function Ai(e){for(Si=e.return;Si;)switch(Si.tag){case 5:case 31:case 13:Ei=!1;return;case 27:case 3:Ei=!0;return;default:Si=Si.return}}function ji(e){if(e!==Si)return!1;if(!wi)return Ai(e),wi=!0,!1;var t=e.tag,n;if((n=t!==3&&t!==27)&&((n=t===5)&&(n=e.type,n=n===`form`||n===`button`||Kd(e.type,e.memoizedProps)),n=!n),n&&Ci&&Oi(e),Ai(e),t===13){if(e=e.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(317));Ci=pf(e)}else if(t===31){if(e=e.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(317));Ci=pf(e)}else t===27?(t=Ci,ef(e.type)?(e=ff,ff=null,Ci=e):Ci=t):Ci=Si?df(e.stateNode.nextSibling):null;return!0}function Mi(){Ci=Si=null,wi=!1}function Ni(){var e=Ti;return e!==null&&(Ql===null?Ql=e:Ql.push.apply(Ql,e),Ti=null),e}function Pi(e){Ti===null?Ti=[e]:Ti.push(e)}var Fi=z(null),Ii=null,Li=null;function Ri(e,t,n){V(Fi,t._currentValue),t._currentValue=n}function zi(e){e._currentValue=Fi.current,B(Fi)}function Bi(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)===t?r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t):(e.childLanes|=t,r!==null&&(r.childLanes|=t)),e===n)break;e=e.return}}function Vi(e,t,n,r){var a=e.child;for(a!==null&&(a.return=e);a!==null;){var o=a.dependencies;if(o!==null){var s=a.child;o=o.firstContext;a:for(;o!==null;){var c=o;o=a;for(var l=0;l<t.length;l++)if(c.context===t[l]){o.lanes|=n,c=o.alternate,c!==null&&(c.lanes|=n),Bi(o.return,n,e),r||(s=null);break a}o=c.next}}else if(a.tag===18){if(s=a.return,s===null)throw Error(i(341));s.lanes|=n,o=s.alternate,o!==null&&(o.lanes|=n),Bi(s,n,e),s=null}else s=a.child;if(s!==null)s.return=a;else for(s=a;s!==null;){if(s===e){s=null;break}if(a=s.sibling,a!==null){a.return=s.return,s=a;break}s=s.return}a=s}}function Hi(e,t,n,r){e=null;for(var a=t,o=!1;a!==null;){if(!o){if(a.flags&524288)o=!0;else if(a.flags&262144)break}if(a.tag===10){var s=a.alternate;if(s===null)throw Error(i(387));if(s=s.memoizedProps,s!==null){var c=a.type;pr(a.pendingProps.value,s.value)||(e===null?e=[c]:e.push(c))}}else if(a===U.current){if(s=a.alternate,s===null)throw Error(i(387));s.memoizedState.memoizedState!==a.memoizedState.memoizedState&&(e===null?e=[tp]:e.push(tp))}a=a.return}e!==null&&Vi(t,e,n,r),t.flags|=262144}function Ui(e){for(e=e.firstContext;e!==null;){if(!pr(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function Wi(e){Ii=e,Li=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function Gi(e){return qi(Ii,e)}function Ki(e,t){return Ii===null&&Wi(e),qi(e,t)}function qi(e,t){var n=t._currentValue;if(t={context:t,memoizedValue:n,next:null},Li===null){if(e===null)throw Error(i(308));Li=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else Li=Li.next=t;return n}var Ji=typeof AbortController<`u`?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(t,n){e.push(n)}};this.abort=function(){t.aborted=!0,e.forEach(function(e){return e()})}},Yi=t.unstable_scheduleCallback,Xi=t.unstable_NormalPriority,Zi={$$typeof:b,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Qi(){return{controller:new Ji,data:new Map,refCount:0}}function $i(e){e.refCount--,e.refCount===0&&Yi(Xi,function(){e.controller.abort()})}var ea=null,ta=0,na=0,ra=null;function ia(e,t){if(ea===null){var n=ea=[];ta=0,na=pd(),ra={status:`pending`,value:void 0,then:function(e){n.push(e)}}}return ta++,t.then(aa,aa),t}function aa(){if(--ta===0&&ea!==null){ra!==null&&(ra.status=`fulfilled`);var e=ea;ea=null,na=0,ra=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function oa(e,t){var n=[],r={status:`pending`,value:null,reason:null,then:function(e){n.push(e)}};return e.then(function(){r.status=`fulfilled`,r.value=t;for(var e=0;e<n.length;e++)(0,n[e])(t)},function(e){for(r.status=`rejected`,r.reason=e,e=0;e<n.length;e++)(0,n[e])(void 0)}),r}var sa=P.S;P.S=function(e,t){tu=_e(),typeof t==`object`&&t&&typeof t.then==`function`&&ia(e,t),sa!==null&&sa(e,t)};var ca=z(null);function la(){var e=ca.current;return e===null?Il.pooledCache:e}function ua(e,t){t===null?V(ca,ca.current):V(ca,t.pool)}function da(){var e=la();return e===null?null:{parent:Zi._currentValue,pool:e}}var fa=Error(i(460)),pa=Error(i(474)),ma=Error(i(542)),ha={then:function(){}};function ga(e){return e=e.status,e===`fulfilled`||e===`rejected`}function _a(e,t,n){switch(n=e[n],n===void 0?e.push(t):n!==t&&(t.then(Kt,Kt),t=n),t.status){case`fulfilled`:return t.value;case`rejected`:throw e=t.reason,xa(e),e;default:if(typeof t.status==`string`)t.then(Kt,Kt);else{if(e=Il,e!==null&&100<e.shellSuspendCounter)throw Error(i(482));e=t,e.status=`pending`,e.then(function(e){if(t.status===`pending`){var n=t;n.status=`fulfilled`,n.value=e}},function(e){if(t.status===`pending`){var n=t;n.status=`rejected`,n.reason=e}})}switch(t.status){case`fulfilled`:return t.value;case`rejected`:throw e=t.reason,xa(e),e}throw ya=t,fa}}function va(e){try{var t=e._init;return t(e._payload)}catch(e){throw typeof e==`object`&&e&&typeof e.then==`function`?(ya=e,fa):e}}var ya=null;function ba(){if(ya===null)throw Error(i(459));var e=ya;return ya=null,e}function xa(e){if(e===fa||e===ma)throw Error(i(483))}var Sa=null,Ca=0;function wa(e){var t=Ca;return Ca+=1,Sa===null&&(Sa=[]),_a(Sa,e,t)}function Ta(e,t){t=t.props.ref,e.ref=t===void 0?null:t}function Ea(e,t){throw t.$$typeof===p?Error(i(525)):(e=Object.prototype.toString.call(t),Error(i(31,e===`[object Object]`?`object with keys {`+Object.keys(t).join(`, `)+`}`:e)))}function Da(e){function t(t,n){if(e){var r=t.deletions;r===null?(t.deletions=[n],t.flags|=16):r.push(n)}}function n(n,r){if(!e)return null;for(;r!==null;)t(n,r),r=r.sibling;return null}function r(e){for(var t=new Map;e!==null;)e.key===null?t.set(e.index,e):t.set(e.key,e),e=e.sibling;return t}function a(e,t){return e=$r(e,t),e.index=0,e.sibling=null,e}function o(t,n,r){return t.index=r,e?(r=t.alternate,r===null?(t.flags|=67108866,n):(r=r.index,r<n?(t.flags|=67108866,n):r)):(t.flags|=1048576,n)}function s(t){return e&&t.alternate===null&&(t.flags|=67108866),t}function c(e,t,n,r){return t===null||t.tag!==6?(t=ri(n,e.mode,r),t.return=e,t):(t=a(t,n),t.return=e,t)}function l(e,t,n,r){var i=n.type;return i===g?d(e,t,n.props.children,r,n.key):t!==null&&(t.elementType===i||typeof i==`object`&&i&&i.$$typeof===E&&va(i)===t.type)?(t=a(t,n.props),Ta(t,n),t.return=e,t):(t=ti(n.type,n.key,n.props,null,e.mode,r),Ta(t,n),t.return=e,t)}function u(e,t,n,r){return t===null||t.tag!==4||t.stateNode.containerInfo!==n.containerInfo||t.stateNode.implementation!==n.implementation?(t=ai(n,e.mode,r),t.return=e,t):(t=a(t,n.children||[]),t.return=e,t)}function d(e,t,n,r,i){return t===null||t.tag!==7?(t=ni(n,e.mode,r,i),t.return=e,t):(t=a(t,n),t.return=e,t)}function f(e,t,n){if(typeof t==`string`&&t!==``||typeof t==`number`||typeof t==`bigint`)return t=ri(``+t,e.mode,n),t.return=e,t;if(typeof t==`object`&&t){switch(t.$$typeof){case m:return n=ti(t.type,t.key,t.props,null,e.mode,n),Ta(n,t),n.return=e,n;case h:return t=ai(t,e.mode,n),t.return=e,t;case E:return t=va(t),f(e,t,n)}if(N(t)||A(t))return t=ni(t,e.mode,n,null),t.return=e,t;if(typeof t.then==`function`)return f(e,wa(t),n);if(t.$$typeof===b)return f(e,Ki(e,t),n);Ea(e,t)}return null}function p(e,t,n,r){var i=t===null?null:t.key;if(typeof n==`string`&&n!==``||typeof n==`number`||typeof n==`bigint`)return i===null?c(e,t,``+n,r):null;if(typeof n==`object`&&n){switch(n.$$typeof){case m:return n.key===i?l(e,t,n,r):null;case h:return n.key===i?u(e,t,n,r):null;case E:return n=va(n),p(e,t,n,r)}if(N(n)||A(n))return i===null?d(e,t,n,r,null):null;if(typeof n.then==`function`)return p(e,t,wa(n),r);if(n.$$typeof===b)return p(e,t,Ki(e,n),r);Ea(e,n)}return null}function _(e,t,n,r,i){if(typeof r==`string`&&r!==``||typeof r==`number`||typeof r==`bigint`)return e=e.get(n)||null,c(t,e,``+r,i);if(typeof r==`object`&&r){switch(r.$$typeof){case m:return e=e.get(r.key===null?n:r.key)||null,l(t,e,r,i);case h:return e=e.get(r.key===null?n:r.key)||null,u(t,e,r,i);case E:return r=va(r),_(e,t,n,r,i)}if(N(r)||A(r))return e=e.get(n)||null,d(t,e,r,i,null);if(typeof r.then==`function`)return _(e,t,n,wa(r),i);if(r.$$typeof===b)return _(e,t,n,Ki(t,r),i);Ea(t,r)}return null}function v(i,a,s,c){for(var l=null,u=null,d=a,m=a=0,h=null;d!==null&&m<s.length;m++){d.index>m?(h=d,d=null):h=d.sibling;var g=p(i,d,s[m],c);if(g===null){d===null&&(d=h);break}e&&d&&g.alternate===null&&t(i,d),a=o(g,a,m),u===null?l=g:u.sibling=g,u=g,d=h}if(m===s.length)return n(i,d),wi&&_i(i,m),l;if(d===null){for(;m<s.length;m++)d=f(i,s[m],c),d!==null&&(a=o(d,a,m),u===null?l=d:u.sibling=d,u=d);return wi&&_i(i,m),l}for(d=r(d);m<s.length;m++)h=_(d,i,m,s[m],c),h!==null&&(e&&h.alternate!==null&&d.delete(h.key===null?m:h.key),a=o(h,a,m),u===null?l=h:u.sibling=h,u=h);return e&&d.forEach(function(e){return t(i,e)}),wi&&_i(i,m),l}function y(a,s,c,l){if(c==null)throw Error(i(151));for(var u=null,d=null,m=s,h=s=0,g=null,v=c.next();m!==null&&!v.done;h++,v=c.next()){m.index>h?(g=m,m=null):g=m.sibling;var y=p(a,m,v.value,l);if(y===null){m===null&&(m=g);break}e&&m&&y.alternate===null&&t(a,m),s=o(y,s,h),d===null?u=y:d.sibling=y,d=y,m=g}if(v.done)return n(a,m),wi&&_i(a,h),u;if(m===null){for(;!v.done;h++,v=c.next())v=f(a,v.value,l),v!==null&&(s=o(v,s,h),d===null?u=v:d.sibling=v,d=v);return wi&&_i(a,h),u}for(m=r(m);!v.done;h++,v=c.next())v=_(m,a,h,v.value,l),v!==null&&(e&&v.alternate!==null&&m.delete(v.key===null?h:v.key),s=o(v,s,h),d===null?u=v:d.sibling=v,d=v);return e&&m.forEach(function(e){return t(a,e)}),wi&&_i(a,h),u}function x(e,r,o,c){if(typeof o==`object`&&o&&o.type===g&&o.key===null&&(o=o.props.children),typeof o==`object`&&o){switch(o.$$typeof){case m:a:{for(var l=o.key;r!==null;){if(r.key===l){if(l=o.type,l===g){if(r.tag===7){n(e,r.sibling),c=a(r,o.props.children),c.return=e,e=c;break a}}else if(r.elementType===l||typeof l==`object`&&l&&l.$$typeof===E&&va(l)===r.type){n(e,r.sibling),c=a(r,o.props),Ta(c,o),c.return=e,e=c;break a}n(e,r);break}t(e,r),r=r.sibling}o.type===g?(c=ni(o.props.children,e.mode,c,o.key),c.return=e,e=c):(c=ti(o.type,o.key,o.props,null,e.mode,c),Ta(c,o),c.return=e,e=c)}return s(e);case h:a:{for(l=o.key;r!==null;){if(r.key===l)if(r.tag===4&&r.stateNode.containerInfo===o.containerInfo&&r.stateNode.implementation===o.implementation){n(e,r.sibling),c=a(r,o.children||[]),c.return=e,e=c;break a}else{n(e,r);break}t(e,r),r=r.sibling}c=ai(o,e.mode,c),c.return=e,e=c}return s(e);case E:return o=va(o),x(e,r,o,c)}if(N(o))return v(e,r,o,c);if(A(o)){if(l=A(o),typeof l!=`function`)throw Error(i(150));return o=l.call(o),y(e,r,o,c)}if(typeof o.then==`function`)return x(e,r,wa(o),c);if(o.$$typeof===b)return x(e,r,Ki(e,o),c);Ea(e,o)}return typeof o==`string`&&o!==``||typeof o==`number`||typeof o==`bigint`?(o=``+o,r!==null&&r.tag===6?(n(e,r.sibling),c=a(r,o),c.return=e,e=c):(n(e,r),c=ri(o,e.mode,c),c.return=e,e=c),s(e)):n(e,r)}return function(e,t,n,r){try{Ca=0;var i=x(e,t,n,r);return Sa=null,i}catch(t){if(t===fa||t===ma)throw t;var a=Zr(29,t,null,e.mode);return a.lanes=r,a.return=e,a}}}var Oa=Da(!0),ka=Da(!1),Aa=!1;function ja(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Ma(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function Na(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function Pa(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,Fl&2){var i=r.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),r.pending=t,t=Jr(e),qr(e,null,n),t}return Wr(e,r,t,n),Jr(e)}function Fa(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,n&4194048)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Ge(e,n)}}function Ia(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var i=null,a=null;if(n=n.firstBaseUpdate,n!==null){do{var o={lane:n.lane,tag:n.tag,payload:n.payload,callback:null,next:null};a===null?i=a=o:a=a.next=o,n=n.next}while(n!==null);a===null?i=a=t:a=a.next=t}else i=a=t;n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:a,shared:r.shared,callbacks:r.callbacks},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}var La=!1;function Ra(){if(La){var e=ra;if(e!==null)throw e}}function za(e,t,n,r){La=!1;var i=e.updateQueue;Aa=!1;var a=i.firstBaseUpdate,o=i.lastBaseUpdate,s=i.shared.pending;if(s!==null){i.shared.pending=null;var c=s,l=c.next;c.next=null,o===null?a=l:o.next=l,o=c;var u=e.alternate;u!==null&&(u=u.updateQueue,s=u.lastBaseUpdate,s!==o&&(s===null?u.firstBaseUpdate=l:s.next=l,u.lastBaseUpdate=c))}if(a!==null){var d=i.baseState;o=0,u=l=c=null,s=a;do{var p=s.lane&-536870913,m=p!==s.lane;if(m?(Rl&p)===p:(r&p)===p){p!==0&&p===na&&(La=!0),u!==null&&(u=u.next={lane:0,tag:s.tag,payload:s.payload,callback:null,next:null});a:{var h=e,g=s;p=t;var _=n;switch(g.tag){case 1:if(h=g.payload,typeof h==`function`){d=h.call(_,d,p);break a}d=h;break a;case 3:h.flags=h.flags&-65537|128;case 0:if(h=g.payload,p=typeof h==`function`?h.call(_,d,p):h,p==null)break a;d=f({},d,p);break a;case 2:Aa=!0}}p=s.callback,p!==null&&(e.flags|=64,m&&(e.flags|=8192),m=i.callbacks,m===null?i.callbacks=[p]:m.push(p))}else m={lane:p,tag:s.tag,payload:s.payload,callback:s.callback,next:null},u===null?(l=u=m,c=d):u=u.next=m,o|=p;if(s=s.next,s===null){if(s=i.shared.pending,s===null)break;m=s,s=m.next,m.next=null,i.lastBaseUpdate=m,i.shared.pending=null}}while(1);u===null&&(c=d),i.baseState=c,i.firstBaseUpdate=l,i.lastBaseUpdate=u,a===null&&(i.shared.lanes=0),Kl|=o,e.lanes=o,e.memoizedState=d}}function Ba(e,t){if(typeof e!=`function`)throw Error(i(191,e));e.call(t)}function Va(e,t){var n=e.callbacks;if(n!==null)for(e.callbacks=null,e=0;e<n.length;e++)Ba(n[e],t)}var Ha=z(null),Ua=z(0);function Wa(e,t){e=Wl,V(Ua,e),V(Ha,t),Wl=e|t.baseLanes}function Ga(){V(Ua,Wl),V(Ha,Ha.current)}function Ka(){Wl=Ua.current,B(Ha),B(Ua)}var qa=z(null),Ja=null;function Ya(e){var t=e.alternate;V(eo,eo.current&1),V(qa,e),Ja===null&&(t===null||Ha.current!==null||t.memoizedState!==null)&&(Ja=e)}function Xa(e){V(eo,eo.current),V(qa,e),Ja===null&&(Ja=e)}function Za(e){e.tag===22?(V(eo,eo.current),V(qa,e),Ja===null&&(Ja=e)):Qa(e)}function Qa(){V(eo,eo.current),V(qa,qa.current)}function $a(e){B(qa),Ja===e&&(Ja=null),B(eo)}var eo=z(0);function to(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||cf(n)||lf(n)))return t}else if(t.tag===19&&(t.memoizedProps.revealOrder===`forwards`||t.memoizedProps.revealOrder===`backwards`||t.memoizedProps.revealOrder===`unstable_legacy-backwards`||t.memoizedProps.revealOrder===`together`)){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var no=0,ro=null,io=null,ao=null,oo=!1,so=!1,co=!1,lo=0,uo=0,fo=null,po=0;function mo(){throw Error(i(321))}function ho(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!pr(e[n],t[n]))return!1;return!0}function go(e,t,n,r,i,a){return no=a,ro=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,P.H=e===null||e.memoizedState===null?Ns:Ps,co=!1,a=n(r,i),co=!1,so&&(a=vo(t,n,r,i)),_o(e),a}function _o(e){P.H=Ms;var t=io!==null&&io.next!==null;if(no=0,ao=io=ro=null,oo=!1,uo=0,fo=null,t)throw Error(i(300));e===null||Zs||(e=e.dependencies,e!==null&&Ui(e)&&(Zs=!0))}function vo(e,t,n,r){ro=e;var a=0;do{if(so&&(fo=null),uo=0,so=!1,25<=a)throw Error(i(301));if(a+=1,ao=io=null,e.updateQueue!=null){var o=e.updateQueue;o.lastEffect=null,o.events=null,o.stores=null,o.memoCache!=null&&(o.memoCache.index=0)}P.H=Fs,o=t(n,r)}while(so);return o}function yo(){var e=P.H,t=e.useState()[0];return t=typeof t.then==`function`?Eo(t):t,e=e.useState()[0],(io===null?null:io.memoizedState)!==e&&(ro.flags|=1024),t}function bo(){var e=lo!==0;return lo=0,e}function xo(e,t,n){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~n}function So(e){if(oo){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}oo=!1}no=0,ao=io=ro=null,so=!1,uo=lo=0,fo=null}function Co(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return ao===null?ro.memoizedState=ao=e:ao=ao.next=e,ao}function wo(){if(io===null){var e=ro.alternate;e=e===null?null:e.memoizedState}else e=io.next;var t=ao===null?ro.memoizedState:ao.next;if(t!==null)ao=t,io=e;else{if(e===null)throw ro.alternate===null?Error(i(467)):Error(i(310));io=e,e={memoizedState:io.memoizedState,baseState:io.baseState,baseQueue:io.baseQueue,queue:io.queue,next:null},ao===null?ro.memoizedState=ao=e:ao=ao.next=e}return ao}function To(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Eo(e){var t=uo;return uo+=1,fo===null&&(fo=[]),e=_a(fo,e,t),t=ro,(ao===null?t.memoizedState:ao.next)===null&&(t=t.alternate,P.H=t===null||t.memoizedState===null?Ns:Ps),e}function Do(e){if(typeof e==`object`&&e){if(typeof e.then==`function`)return Eo(e);if(e.$$typeof===b)return Gi(e)}throw Error(i(438,String(e)))}function Oo(e){var t=null,n=ro.updateQueue;if(n!==null&&(t=n.memoCache),t==null){var r=ro.alternate;r!==null&&(r=r.updateQueue,r!==null&&(r=r.memoCache,r!=null&&(t={data:r.data.map(function(e){return e.slice()}),index:0})))}if(t??={data:[],index:0},n===null&&(n=To(),ro.updateQueue=n),n.memoCache=t,n=t.data[t.index],n===void 0)for(n=t.data[t.index]=Array(e),r=0;r<e;r++)n[r]=O;return t.index++,n}function ko(e,t){return typeof t==`function`?t(e):t}function Ao(e){return jo(wo(),io,e)}function jo(e,t,n){var r=e.queue;if(r===null)throw Error(i(311));r.lastRenderedReducer=n;var a=e.baseQueue,o=r.pending;if(o!==null){if(a!==null){var s=a.next;a.next=o.next,o.next=s}t.baseQueue=a=o,r.pending=null}if(o=e.baseState,a===null)e.memoizedState=o;else{t=a.next;var c=s=null,l=null,u=t,d=!1;do{var f=u.lane&-536870913;if(f===u.lane?(no&f)===f:(Rl&f)===f){var p=u.revertLane;if(p===0)l!==null&&(l=l.next={lane:0,revertLane:0,gesture:null,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null}),f===na&&(d=!0);else if((no&p)===p){u=u.next,p===na&&(d=!0);continue}else f={lane:0,revertLane:u.revertLane,gesture:null,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null},l===null?(c=l=f,s=o):l=l.next=f,ro.lanes|=p,Kl|=p;f=u.action,co&&n(o,f),o=u.hasEagerState?u.eagerState:n(o,f)}else p={lane:f,revertLane:u.revertLane,gesture:u.gesture,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null},l===null?(c=l=p,s=o):l=l.next=p,ro.lanes|=f,Kl|=f;u=u.next}while(u!==null&&u!==t);if(l===null?s=o:l.next=c,!pr(o,e.memoizedState)&&(Zs=!0,d&&(n=ra,n!==null)))throw n;e.memoizedState=o,e.baseState=s,e.baseQueue=l,r.lastRenderedState=o}return a===null&&(r.lanes=0),[e.memoizedState,r.dispatch]}function Mo(e){var t=wo(),n=t.queue;if(n===null)throw Error(i(311));n.lastRenderedReducer=e;var r=n.dispatch,a=n.pending,o=t.memoizedState;if(a!==null){n.pending=null;var s=a=a.next;do o=e(o,s.action),s=s.next;while(s!==a);pr(o,t.memoizedState)||(Zs=!0),t.memoizedState=o,t.baseQueue===null&&(t.baseState=o),n.lastRenderedState=o}return[o,r]}function No(e,t,n){var r=ro,a=wo(),o=wi;if(o){if(n===void 0)throw Error(i(407));n=n()}else n=t();var s=!pr((io||a).memoizedState,n);if(s&&(a.memoizedState=n,Zs=!0),a=a.queue,is(Io.bind(null,r,a,e),[e]),a.getSnapshot!==t||s||ao!==null&&ao.memoizedState.tag&1){if(r.flags|=2048,$o(9,{destroy:void 0},Fo.bind(null,r,a,n,t),null),Il===null)throw Error(i(349));o||no&127||Po(r,t,n)}return n}function Po(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=ro.updateQueue,t===null?(t=To(),ro.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function Fo(e,t,n,r){t.value=n,t.getSnapshot=r,Lo(t)&&Ro(e)}function Io(e,t,n){return n(function(){Lo(t)&&Ro(e)})}function Lo(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!pr(e,n)}catch{return!0}}function Ro(e){var t=Kr(e,2);t!==null&&gu(t,e,2)}function zo(e){var t=Co();if(typeof e==`function`){var n=e;if(e=n(),co){Oe(!0);try{n()}finally{Oe(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:ko,lastRenderedState:e},t}function Bo(e,t,n,r){return e.baseState=n,jo(e,io,typeof r==`function`?r:ko)}function Vo(e,t,n,r,a){if(ks(e))throw Error(i(485));if(e=t.action,e!==null){var o={payload:a,action:e,next:null,isTransition:!0,status:`pending`,value:null,reason:null,listeners:[],then:function(e){o.listeners.push(e)}};P.T===null?o.isTransition=!1:n(!0),r(o),n=t.pending,n===null?(o.next=t.pending=o,Ho(t,o)):(o.next=n.next,t.pending=n.next=o)}}function Ho(e,t){var n=t.action,r=t.payload,i=e.state;if(t.isTransition){var a=P.T,o={};P.T=o;try{var s=n(i,r),c=P.S;c!==null&&c(o,s),Uo(e,t,s)}catch(n){Go(e,t,n)}finally{a!==null&&o.types!==null&&(a.types=o.types),P.T=a}}else try{a=n(i,r),Uo(e,t,a)}catch(n){Go(e,t,n)}}function Uo(e,t,n){typeof n==`object`&&n&&typeof n.then==`function`?n.then(function(n){Wo(e,t,n)},function(n){return Go(e,t,n)}):Wo(e,t,n)}function Wo(e,t,n){t.status=`fulfilled`,t.value=n,Ko(t),e.state=n,t=e.pending,t!==null&&(n=t.next,n===t?e.pending=null:(n=n.next,t.next=n,Ho(e,n)))}function Go(e,t,n){var r=e.pending;if(e.pending=null,r!==null){r=r.next;do t.status=`rejected`,t.reason=n,Ko(t),t=t.next;while(t!==r)}e.action=null}function Ko(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function qo(e,t){return t}function Jo(e,t){if(wi){var n=Il.formState;if(n!==null){a:{var r=ro;if(wi){if(Ci){b:{for(var i=Ci,a=Ei;i.nodeType!==8;){if(!a){i=null;break b}if(i=df(i.nextSibling),i===null){i=null;break b}}a=i.data,i=a===`F!`||a===`F`?i:null}if(i){Ci=df(i.nextSibling),r=i.data===`F!`;break a}}Oi(r)}r=!1}r&&(t=n[0])}}return n=Co(),n.memoizedState=n.baseState=t,r={pending:null,lanes:0,dispatch:null,lastRenderedReducer:qo,lastRenderedState:t},n.queue=r,n=Es.bind(null,ro,r),r.dispatch=n,r=zo(!1),a=Os.bind(null,ro,!1,r.queue),r=Co(),i={state:t,dispatch:null,action:e,pending:null},r.queue=i,n=Vo.bind(null,ro,i,a,n),i.dispatch=n,r.memoizedState=e,[t,n,!1]}function Yo(e){return Xo(wo(),io,e)}function Xo(e,t,n){if(t=jo(e,t,qo)[0],e=Ao(ko)[0],typeof t==`object`&&t&&typeof t.then==`function`)try{var r=Eo(t)}catch(e){throw e===fa?ma:e}else r=t;t=wo();var i=t.queue,a=i.dispatch;return n!==t.memoizedState&&(ro.flags|=2048,$o(9,{destroy:void 0},Zo.bind(null,i,n),null)),[r,a,e]}function Zo(e,t){e.action=t}function Qo(e){var t=wo(),n=io;if(n!==null)return Xo(t,n,e);wo(),t=t.memoizedState,n=wo();var r=n.queue.dispatch;return n.memoizedState=e,[t,r,!1]}function $o(e,t,n,r){return e={tag:e,create:n,deps:r,inst:t,next:null},t=ro.updateQueue,t===null&&(t=To(),ro.updateQueue=t),n=t.lastEffect,n===null?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e),e}function es(){return wo().memoizedState}function ts(e,t,n,r){var i=Co();ro.flags|=e,i.memoizedState=$o(1|t,{destroy:void 0},n,r===void 0?null:r)}function ns(e,t,n,r){var i=wo();r=r===void 0?null:r;var a=i.memoizedState.inst;io!==null&&r!==null&&ho(r,io.memoizedState.deps)?i.memoizedState=$o(t,a,n,r):(ro.flags|=e,i.memoizedState=$o(1|t,a,n,r))}function rs(e,t){ts(8390656,8,e,t)}function is(e,t){ns(2048,8,e,t)}function as(e){ro.flags|=4;var t=ro.updateQueue;if(t===null)t=To(),ro.updateQueue=t,t.events=[e];else{var n=t.events;n===null?t.events=[e]:n.push(e)}}function os(e){var t=wo().memoizedState;return as({ref:t,nextImpl:e}),function(){if(Fl&2)throw Error(i(440));return t.impl.apply(void 0,arguments)}}function ss(e,t){return ns(4,2,e,t)}function cs(e,t){return ns(4,4,e,t)}function ls(e,t){if(typeof t==`function`){e=e();var n=t(e);return function(){typeof n==`function`?n():t(null)}}if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function us(e,t,n){n=n==null?null:n.concat([e]),ns(4,4,ls.bind(null,t,e),n)}function ds(){}function fs(e,t){var n=wo();t=t===void 0?null:t;var r=n.memoizedState;return t!==null&&ho(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function ps(e,t){var n=wo();t=t===void 0?null:t;var r=n.memoizedState;if(t!==null&&ho(t,r[1]))return r[0];if(r=e(),co){Oe(!0);try{e()}finally{Oe(!1)}}return n.memoizedState=[r,t],r}function ms(e,t,n){return n===void 0||no&1073741824&&!(Rl&261930)?e.memoizedState=t:(e.memoizedState=n,e=hu(),ro.lanes|=e,Kl|=e,n)}function hs(e,t,n,r){return pr(n,t)?n:Ha.current===null?!(no&42)||no&1073741824&&!(Rl&261930)?(Zs=!0,e.memoizedState=n):(e=hu(),ro.lanes|=e,Kl|=e,t):(e=ms(e,n,r),pr(e,t)||(Zs=!0),e)}function gs(e,t,n,r,i){var a=F.p;F.p=a!==0&&8>a?a:8;var o=P.T,s={};P.T=s,Os(e,!1,t,n);try{var c=i(),l=P.S;l!==null&&l(s,c),typeof c==`object`&&c&&typeof c.then==`function`?Ds(e,t,oa(c,r),mu(e)):Ds(e,t,r,mu(e))}catch(n){Ds(e,t,{then:function(){},status:`rejected`,reason:n},mu())}finally{F.p=a,o!==null&&s.types!==null&&(o.types=s.types),P.T=o}}function _s(){}function vs(e,t,n,r){if(e.tag!==5)throw Error(i(476));var a=ys(e).queue;gs(e,a,t,I,n===null?_s:function(){return bs(e),n(r)})}function ys(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:I,baseState:I,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ko,lastRenderedState:I},next:null};var n={};return t.next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ko,lastRenderedState:n},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function bs(e){var t=ys(e);t.next===null&&(t=e.alternate.memoizedState),Ds(e,t.next.queue,{},mu())}function xs(){return Gi(tp)}function Ss(){return wo().memoizedState}function Cs(){return wo().memoizedState}function ws(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var n=mu();e=Na(n);var r=Pa(t,e,n);r!==null&&(gu(r,t,n),Fa(r,t,n)),t={cache:Qi()},e.payload=t;return}t=t.return}}function Ts(e,t,n){var r=mu();n={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},ks(e)?As(t,n):(n=Gr(e,t,n,r),n!==null&&(gu(n,e,r),js(n,t,r)))}function Es(e,t,n){Ds(e,t,n,mu())}function Ds(e,t,n,r){var i={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null};if(ks(e))As(t,i);else{var a=e.alternate;if(e.lanes===0&&(a===null||a.lanes===0)&&(a=t.lastRenderedReducer,a!==null))try{var o=t.lastRenderedState,s=a(o,n);if(i.hasEagerState=!0,i.eagerState=s,pr(s,o))return Wr(e,t,i,0),Il===null&&Ur(),!1}catch{}if(n=Gr(e,t,i,r),n!==null)return gu(n,e,r),js(n,t,r),!0}return!1}function Os(e,t,n,r){if(r={lane:2,revertLane:pd(),gesture:null,action:r,hasEagerState:!1,eagerState:null,next:null},ks(e)){if(t)throw Error(i(479))}else t=Gr(e,n,r,2),t!==null&&gu(t,e,2)}function ks(e){var t=e.alternate;return e===ro||t!==null&&t===ro}function As(e,t){so=oo=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function js(e,t,n){if(n&4194048){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Ge(e,n)}}var Ms={readContext:Gi,use:Do,useCallback:mo,useContext:mo,useEffect:mo,useImperativeHandle:mo,useLayoutEffect:mo,useInsertionEffect:mo,useMemo:mo,useReducer:mo,useRef:mo,useState:mo,useDebugValue:mo,useDeferredValue:mo,useTransition:mo,useSyncExternalStore:mo,useId:mo,useHostTransitionStatus:mo,useFormState:mo,useActionState:mo,useOptimistic:mo,useMemoCache:mo,useCacheRefresh:mo};Ms.useEffectEvent=mo;var Ns={readContext:Gi,use:Do,useCallback:function(e,t){return Co().memoizedState=[e,t===void 0?null:t],e},useContext:Gi,useEffect:rs,useImperativeHandle:function(e,t,n){n=n==null?null:n.concat([e]),ts(4194308,4,ls.bind(null,t,e),n)},useLayoutEffect:function(e,t){return ts(4194308,4,e,t)},useInsertionEffect:function(e,t){ts(4,2,e,t)},useMemo:function(e,t){var n=Co();t=t===void 0?null:t;var r=e();if(co){Oe(!0);try{e()}finally{Oe(!1)}}return n.memoizedState=[r,t],r},useReducer:function(e,t,n){var r=Co();if(n!==void 0){var i=n(t);if(co){Oe(!0);try{n(t)}finally{Oe(!1)}}}else i=t;return r.memoizedState=r.baseState=i,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:i},r.queue=e,e=e.dispatch=Ts.bind(null,ro,e),[r.memoizedState,e]},useRef:function(e){var t=Co();return e={current:e},t.memoizedState=e},useState:function(e){e=zo(e);var t=e.queue,n=Es.bind(null,ro,t);return t.dispatch=n,[e.memoizedState,n]},useDebugValue:ds,useDeferredValue:function(e,t){return ms(Co(),e,t)},useTransition:function(){var e=zo(!1);return e=gs.bind(null,ro,e.queue,!0,!1),Co().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,n){var r=ro,a=Co();if(wi){if(n===void 0)throw Error(i(407));n=n()}else{if(n=t(),Il===null)throw Error(i(349));Rl&127||Po(r,t,n)}a.memoizedState=n;var o={value:n,getSnapshot:t};return a.queue=o,rs(Io.bind(null,r,o,e),[e]),r.flags|=2048,$o(9,{destroy:void 0},Fo.bind(null,r,o,n,t),null),n},useId:function(){var e=Co(),t=Il.identifierPrefix;if(wi){var n=gi,r=hi;n=(r&~(1<<32-ke(r)-1)).toString(32)+n,t=`_`+t+`R_`+n,n=lo++,0<n&&(t+=`H`+n.toString(32)),t+=`_`}else n=po++,t=`_`+t+`r_`+n.toString(32)+`_`;return e.memoizedState=t},useHostTransitionStatus:xs,useFormState:Jo,useActionState:Jo,useOptimistic:function(e){var t=Co();t.memoizedState=t.baseState=e;var n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=n,t=Os.bind(null,ro,!0,n),n.dispatch=t,[e,t]},useMemoCache:Oo,useCacheRefresh:function(){return Co().memoizedState=ws.bind(null,ro)},useEffectEvent:function(e){var t=Co(),n={impl:e};return t.memoizedState=n,function(){if(Fl&2)throw Error(i(440));return n.impl.apply(void 0,arguments)}}},Ps={readContext:Gi,use:Do,useCallback:fs,useContext:Gi,useEffect:is,useImperativeHandle:us,useInsertionEffect:ss,useLayoutEffect:cs,useMemo:ps,useReducer:Ao,useRef:es,useState:function(){return Ao(ko)},useDebugValue:ds,useDeferredValue:function(e,t){return hs(wo(),io.memoizedState,e,t)},useTransition:function(){var e=Ao(ko)[0],t=wo().memoizedState;return[typeof e==`boolean`?e:Eo(e),t]},useSyncExternalStore:No,useId:Ss,useHostTransitionStatus:xs,useFormState:Yo,useActionState:Yo,useOptimistic:function(e,t){return Bo(wo(),io,e,t)},useMemoCache:Oo,useCacheRefresh:Cs};Ps.useEffectEvent=os;var Fs={readContext:Gi,use:Do,useCallback:fs,useContext:Gi,useEffect:is,useImperativeHandle:us,useInsertionEffect:ss,useLayoutEffect:cs,useMemo:ps,useReducer:Mo,useRef:es,useState:function(){return Mo(ko)},useDebugValue:ds,useDeferredValue:function(e,t){var n=wo();return io===null?ms(n,e,t):hs(n,io.memoizedState,e,t)},useTransition:function(){var e=Mo(ko)[0],t=wo().memoizedState;return[typeof e==`boolean`?e:Eo(e),t]},useSyncExternalStore:No,useId:Ss,useHostTransitionStatus:xs,useFormState:Qo,useActionState:Qo,useOptimistic:function(e,t){var n=wo();return io===null?(n.baseState=e,[e,n.queue.dispatch]):Bo(n,io,e,t)},useMemoCache:Oo,useCacheRefresh:Cs};Fs.useEffectEvent=os;function Is(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:f({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var Ls={enqueueSetState:function(e,t,n){e=e._reactInternals;var r=mu(),i=Na(r);i.payload=t,n!=null&&(i.callback=n),t=Pa(e,i,r),t!==null&&(gu(t,e,r),Fa(t,e,r))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=mu(),i=Na(r);i.tag=1,i.payload=t,n!=null&&(i.callback=n),t=Pa(e,i,r),t!==null&&(gu(t,e,r),Fa(t,e,r))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=mu(),r=Na(n);r.tag=2,t!=null&&(r.callback=t),t=Pa(e,r,n),t!==null&&(gu(t,e,n),Fa(t,e,n))}};function Rs(e,t,n,r,i,a,o){return e=e.stateNode,typeof e.shouldComponentUpdate==`function`?e.shouldComponentUpdate(r,a,o):t.prototype&&t.prototype.isPureReactComponent?!mr(n,r)||!mr(i,a):!0}function zs(e,t,n,r){e=t.state,typeof t.componentWillReceiveProps==`function`&&t.componentWillReceiveProps(n,r),typeof t.UNSAFE_componentWillReceiveProps==`function`&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&Ls.enqueueReplaceState(t,t.state,null)}function Bs(e,t){var n=t;if(`ref`in t)for(var r in n={},t)r!==`ref`&&(n[r]=t[r]);if(e=e.defaultProps)for(var i in n===t&&(n=f({},n)),e)n[i]===void 0&&(n[i]=e[i]);return n}function Vs(e){zr(e)}function Hs(e){console.error(e)}function Us(e){zr(e)}function Ws(e,t){try{var n=e.onUncaughtError;n(t.value,{componentStack:t.stack})}catch(e){setTimeout(function(){throw e})}}function Gs(e,t,n){try{var r=e.onCaughtError;r(n.value,{componentStack:n.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(e){setTimeout(function(){throw e})}}function Ks(e,t,n){return n=Na(n),n.tag=3,n.payload={element:null},n.callback=function(){Ws(e,t)},n}function qs(e){return e=Na(e),e.tag=3,e}function Js(e,t,n,r){var i=n.type.getDerivedStateFromError;if(typeof i==`function`){var a=r.value;e.payload=function(){return i(a)},e.callback=function(){Gs(t,n,r)}}var o=n.stateNode;o!==null&&typeof o.componentDidCatch==`function`&&(e.callback=function(){Gs(t,n,r),typeof i!=`function`&&(iu===null?iu=new Set([this]):iu.add(this));var e=r.stack;this.componentDidCatch(r.value,{componentStack:e===null?``:e})})}function Ys(e,t,n,r,a){if(n.flags|=32768,typeof r==`object`&&r&&typeof r.then==`function`){if(t=n.alternate,t!==null&&Hi(t,n,a,!0),n=qa.current,n!==null){switch(n.tag){case 31:case 13:return Ja===null?Ou():n.alternate===null&&Gl===0&&(Gl=3),n.flags&=-257,n.flags|=65536,n.lanes=a,r===ha?n.flags|=16384:(t=n.updateQueue,t===null?n.updateQueue=new Set([r]):t.add(r),qu(e,r,a)),!1;case 22:return n.flags|=65536,r===ha?n.flags|=16384:(t=n.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([r])},n.updateQueue=t):(n=t.retryQueue,n===null?t.retryQueue=new Set([r]):n.add(r)),qu(e,r,a)),!1}throw Error(i(435,n.tag))}return qu(e,r,a),Ou(),!1}if(wi)return t=qa.current,t===null?(r!==Di&&(t=Error(i(423),{cause:r}),Pi(si(t,n))),e=e.current.alternate,e.flags|=65536,a&=-a,e.lanes|=a,r=si(r,n),a=Ks(e.stateNode,r,a),Ia(e,a),Gl!==4&&(Gl=2)):(!(t.flags&65536)&&(t.flags|=256),t.flags|=65536,t.lanes=a,r!==Di&&(e=Error(i(422),{cause:r}),Pi(si(e,n)))),!1;var o=Error(i(520),{cause:r});if(o=si(o,n),Zl===null?Zl=[o]:Zl.push(o),Gl!==4&&(Gl=2),t===null)return!0;r=si(r,n),n=t;do{switch(n.tag){case 3:return n.flags|=65536,e=a&-a,n.lanes|=e,e=Ks(n.stateNode,r,e),Ia(n,e),!1;case 1:if(t=n.type,o=n.stateNode,!(n.flags&128)&&(typeof t.getDerivedStateFromError==`function`||o!==null&&typeof o.componentDidCatch==`function`&&(iu===null||!iu.has(o))))return n.flags|=65536,a&=-a,n.lanes|=a,a=qs(a),Js(a,e,n,r),Ia(n,a),!1}n=n.return}while(n!==null);return!1}var Xs=Error(i(461)),Zs=!1;function Qs(e,t,n,r){t.child=e===null?ka(t,null,n,r):Oa(t,e.child,n,r)}function $s(e,t,n,r,i){n=n.render;var a=t.ref;if(`ref`in r){var o={};for(var s in r)s!==`ref`&&(o[s]=r[s])}else o=r;return Wi(t),r=go(e,t,n,o,a,i),s=bo(),e!==null&&!Zs?(xo(e,t,i),Cc(e,t,i)):(wi&&s&&yi(t),t.flags|=1,Qs(e,t,r,i),t.child)}function ec(e,t,n,r,i){if(e===null){var a=n.type;return typeof a==`function`&&!Qr(a)&&a.defaultProps===void 0&&n.compare===null?(t.tag=15,t.type=a,tc(e,t,a,r,i)):(e=ti(n.type,null,r,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}if(a=e.child,!wc(e,i)){var o=a.memoizedProps;if(n=n.compare,n=n===null?mr:n,n(o,r)&&e.ref===t.ref)return Cc(e,t,i)}return t.flags|=1,e=$r(a,r),e.ref=t.ref,e.return=t,t.child=e}function tc(e,t,n,r,i){if(e!==null){var a=e.memoizedProps;if(mr(a,r)&&e.ref===t.ref)if(Zs=!1,t.pendingProps=r=a,wc(e,i))e.flags&131072&&(Zs=!0);else return t.lanes=e.lanes,Cc(e,t,i)}return lc(e,t,n,r,i)}function nc(e,t,n,r){var i=r.children,a=e===null?null:e.memoizedState;if(e===null&&t.stateNode===null&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),r.mode===`hidden`){if(t.flags&128){if(a=a===null?n:a.baseLanes|n,e!==null){for(r=t.child=e.child,i=0;r!==null;)i=i|r.lanes|r.childLanes,r=r.sibling;r=i&~a}else r=0,t.child=null;return ic(e,t,a,n,r)}if(n&536870912)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&ua(t,a===null?null:a.cachePool),a===null?Ga():Wa(t,a),Za(t);else return r=t.lanes=536870912,ic(e,t,a===null?n:a.baseLanes|n,n,r)}else a===null?(e!==null&&ua(t,null),Ga(),Qa(t)):(ua(t,a.cachePool),Wa(t,a),Qa(t),t.memoizedState=null);return Qs(e,t,i,n),t.child}function rc(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function ic(e,t,n,r,i){var a=la();return a=a===null?null:{parent:Zi._currentValue,pool:a},t.memoizedState={baseLanes:n,cachePool:a},e!==null&&ua(t,null),Ga(),Za(t),e!==null&&Hi(e,t,r,!0),t.childLanes=i,null}function ac(e,t){return t=vc({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function oc(e,t,n){return Oa(t,e.child,null,n),e=ac(t,t.pendingProps),e.flags|=2,$a(t),t.memoizedState=null,e}function sc(e,t,n){var r=t.pendingProps,a=!!(t.flags&128);if(t.flags&=-129,e===null){if(wi){if(r.mode===`hidden`)return e=ac(t,r),t.lanes=536870912,rc(null,e);if(Xa(t),(e=Ci)?(e=sf(e,Ei),e=e!==null&&e.data===`&`?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:mi===null?null:{id:hi,overflow:gi},retryLane:536870912,hydrationErrors:null},n=ii(e),n.return=t,t.child=n,Si=t,Ci=null)):e=null,e===null)throw Oi(t);return t.lanes=536870912,null}return ac(t,r)}var o=e.memoizedState;if(o!==null){var s=o.dehydrated;if(Xa(t),a)if(t.flags&256)t.flags&=-257,t=oc(e,t,n);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(i(558));else if(Zs||Hi(e,t,n,!1),a=(n&e.childLanes)!==0,Zs||a){if(r=Il,r!==null&&(s=Ke(r,n),s!==0&&s!==o.retryLane))throw o.retryLane=s,Kr(e,s),gu(r,e,s),Xs;Ou(),t=oc(e,t,n)}else e=o.treeContext,Ci=df(s.nextSibling),Si=t,wi=!0,Ti=null,Ei=!1,e!==null&&xi(t,e),t=ac(t,r),t.flags|=4096;return t}return e=$r(e.child,{mode:r.mode,children:r.children}),e.ref=t.ref,t.child=e,e.return=t,e}function cc(e,t){var n=t.ref;if(n===null)e!==null&&e.ref!==null&&(t.flags|=4194816);else{if(typeof n!=`function`&&typeof n!=`object`)throw Error(i(284));(e===null||e.ref!==n)&&(t.flags|=4194816)}}function lc(e,t,n,r,i){return Wi(t),n=go(e,t,n,r,void 0,i),r=bo(),e!==null&&!Zs?(xo(e,t,i),Cc(e,t,i)):(wi&&r&&yi(t),t.flags|=1,Qs(e,t,n,i),t.child)}function uc(e,t,n,r,i,a){return Wi(t),t.updateQueue=null,n=vo(t,r,n,i),_o(e),r=bo(),e!==null&&!Zs?(xo(e,t,a),Cc(e,t,a)):(wi&&r&&yi(t),t.flags|=1,Qs(e,t,n,a),t.child)}function dc(e,t,n,r,i){if(Wi(t),t.stateNode===null){var a=Yr,o=n.contextType;typeof o==`object`&&o&&(a=Gi(o)),a=new n(r,a),t.memoizedState=a.state!==null&&a.state!==void 0?a.state:null,a.updater=Ls,t.stateNode=a,a._reactInternals=t,a=t.stateNode,a.props=r,a.state=t.memoizedState,a.refs={},ja(t),o=n.contextType,a.context=typeof o==`object`&&o?Gi(o):Yr,a.state=t.memoizedState,o=n.getDerivedStateFromProps,typeof o==`function`&&(Is(t,n,o,r),a.state=t.memoizedState),typeof n.getDerivedStateFromProps==`function`||typeof a.getSnapshotBeforeUpdate==`function`||typeof a.UNSAFE_componentWillMount!=`function`&&typeof a.componentWillMount!=`function`||(o=a.state,typeof a.componentWillMount==`function`&&a.componentWillMount(),typeof a.UNSAFE_componentWillMount==`function`&&a.UNSAFE_componentWillMount(),o!==a.state&&Ls.enqueueReplaceState(a,a.state,null),za(t,r,a,i),Ra(),a.state=t.memoizedState),typeof a.componentDidMount==`function`&&(t.flags|=4194308),r=!0}else if(e===null){a=t.stateNode;var s=t.memoizedProps,c=Bs(n,s);a.props=c;var l=a.context,u=n.contextType;o=Yr,typeof u==`object`&&u&&(o=Gi(u));var d=n.getDerivedStateFromProps;u=typeof d==`function`||typeof a.getSnapshotBeforeUpdate==`function`,s=t.pendingProps!==s,u||typeof a.UNSAFE_componentWillReceiveProps!=`function`&&typeof a.componentWillReceiveProps!=`function`||(s||l!==o)&&zs(t,a,r,o),Aa=!1;var f=t.memoizedState;a.state=f,za(t,r,a,i),Ra(),l=t.memoizedState,s||f!==l||Aa?(typeof d==`function`&&(Is(t,n,d,r),l=t.memoizedState),(c=Aa||Rs(t,n,c,r,f,l,o))?(u||typeof a.UNSAFE_componentWillMount!=`function`&&typeof a.componentWillMount!=`function`||(typeof a.componentWillMount==`function`&&a.componentWillMount(),typeof a.UNSAFE_componentWillMount==`function`&&a.UNSAFE_componentWillMount()),typeof a.componentDidMount==`function`&&(t.flags|=4194308)):(typeof a.componentDidMount==`function`&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=l),a.props=r,a.state=l,a.context=o,r=c):(typeof a.componentDidMount==`function`&&(t.flags|=4194308),r=!1)}else{a=t.stateNode,Ma(e,t),o=t.memoizedProps,u=Bs(n,o),a.props=u,d=t.pendingProps,f=a.context,l=n.contextType,c=Yr,typeof l==`object`&&l&&(c=Gi(l)),s=n.getDerivedStateFromProps,(l=typeof s==`function`||typeof a.getSnapshotBeforeUpdate==`function`)||typeof a.UNSAFE_componentWillReceiveProps!=`function`&&typeof a.componentWillReceiveProps!=`function`||(o!==d||f!==c)&&zs(t,a,r,c),Aa=!1,f=t.memoizedState,a.state=f,za(t,r,a,i),Ra();var p=t.memoizedState;o!==d||f!==p||Aa||e!==null&&e.dependencies!==null&&Ui(e.dependencies)?(typeof s==`function`&&(Is(t,n,s,r),p=t.memoizedState),(u=Aa||Rs(t,n,u,r,f,p,c)||e!==null&&e.dependencies!==null&&Ui(e.dependencies))?(l||typeof a.UNSAFE_componentWillUpdate!=`function`&&typeof a.componentWillUpdate!=`function`||(typeof a.componentWillUpdate==`function`&&a.componentWillUpdate(r,p,c),typeof a.UNSAFE_componentWillUpdate==`function`&&a.UNSAFE_componentWillUpdate(r,p,c)),typeof a.componentDidUpdate==`function`&&(t.flags|=4),typeof a.getSnapshotBeforeUpdate==`function`&&(t.flags|=1024)):(typeof a.componentDidUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=p),a.props=r,a.state=p,a.context=c,r=u):(typeof a.componentDidUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),r=!1)}return a=r,cc(e,t),r=!!(t.flags&128),a||r?(a=t.stateNode,n=r&&typeof n.getDerivedStateFromError!=`function`?null:a.render(),t.flags|=1,e!==null&&r?(t.child=Oa(t,e.child,null,i),t.child=Oa(t,null,n,i)):Qs(e,t,n,i),t.memoizedState=a.state,e=t.child):e=Cc(e,t,i),e}function fc(e,t,n,r){return Mi(),t.flags|=256,Qs(e,t,n,r),t.child}var pc={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function mc(e){return{baseLanes:e,cachePool:da()}}function hc(e,t,n){return e=e===null?0:e.childLanes&~n,t&&(e|=Yl),e}function gc(e,t,n){var r=t.pendingProps,a=!1,o=!!(t.flags&128),s;if((s=o)||(s=e!==null&&e.memoizedState===null?!1:!!(eo.current&2)),s&&(a=!0,t.flags&=-129),s=!!(t.flags&32),t.flags&=-33,e===null){if(wi){if(a?Ya(t):Qa(t),(e=Ci)?(e=sf(e,Ei),e=e!==null&&e.data!==`&`?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:mi===null?null:{id:hi,overflow:gi},retryLane:536870912,hydrationErrors:null},n=ii(e),n.return=t,t.child=n,Si=t,Ci=null)):e=null,e===null)throw Oi(t);return lf(e)?t.lanes=32:t.lanes=536870912,null}var c=r.children;return r=r.fallback,a?(Qa(t),a=t.mode,c=vc({mode:`hidden`,children:c},a),r=ni(r,a,n,null),c.return=t,r.return=t,c.sibling=r,t.child=c,r=t.child,r.memoizedState=mc(n),r.childLanes=hc(e,s,n),t.memoizedState=pc,rc(null,r)):(Ya(t),_c(t,c))}var l=e.memoizedState;if(l!==null&&(c=l.dehydrated,c!==null)){if(o)t.flags&256?(Ya(t),t.flags&=-257,t=yc(e,t,n)):t.memoizedState===null?(Qa(t),c=r.fallback,a=t.mode,r=vc({mode:`visible`,children:r.children},a),c=ni(c,a,n,null),c.flags|=2,r.return=t,c.return=t,r.sibling=c,t.child=r,Oa(t,e.child,null,n),r=t.child,r.memoizedState=mc(n),r.childLanes=hc(e,s,n),t.memoizedState=pc,t=rc(null,r)):(Qa(t),t.child=e.child,t.flags|=128,t=null);else if(Ya(t),lf(c)){if(s=c.nextSibling&&c.nextSibling.dataset,s)var u=s.dgst;s=u,r=Error(i(419)),r.stack=``,r.digest=s,Pi({value:r,source:null,stack:null}),t=yc(e,t,n)}else if(Zs||Hi(e,t,n,!1),s=(n&e.childLanes)!==0,Zs||s){if(s=Il,s!==null&&(r=Ke(s,n),r!==0&&r!==l.retryLane))throw l.retryLane=r,Kr(e,r),gu(s,e,r),Xs;cf(c)||Ou(),t=yc(e,t,n)}else cf(c)?(t.flags|=192,t.child=e.child,t=null):(e=l.treeContext,Ci=df(c.nextSibling),Si=t,wi=!0,Ti=null,Ei=!1,e!==null&&xi(t,e),t=_c(t,r.children),t.flags|=4096);return t}return a?(Qa(t),c=r.fallback,a=t.mode,l=e.child,u=l.sibling,r=$r(l,{mode:`hidden`,children:r.children}),r.subtreeFlags=l.subtreeFlags&65011712,u===null?(c=ni(c,a,n,null),c.flags|=2):c=$r(u,c),c.return=t,r.return=t,r.sibling=c,t.child=r,rc(null,r),r=t.child,c=e.child.memoizedState,c===null?c=mc(n):(a=c.cachePool,a===null?a=da():(l=Zi._currentValue,a=a.parent===l?a:{parent:l,pool:l}),c={baseLanes:c.baseLanes|n,cachePool:a}),r.memoizedState=c,r.childLanes=hc(e,s,n),t.memoizedState=pc,rc(e.child,r)):(Ya(t),n=e.child,e=n.sibling,n=$r(n,{mode:`visible`,children:r.children}),n.return=t,n.sibling=null,e!==null&&(s=t.deletions,s===null?(t.deletions=[e],t.flags|=16):s.push(e)),t.child=n,t.memoizedState=null,n)}function _c(e,t){return t=vc({mode:`visible`,children:t},e.mode),t.return=e,e.child=t}function vc(e,t){return e=Zr(22,e,null,t),e.lanes=0,e}function yc(e,t,n){return Oa(t,e.child,null,n),e=_c(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function bc(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),Bi(e.return,t,n)}function xc(e,t,n,r,i,a){var o=e.memoizedState;o===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:i,treeForkCount:a}:(o.isBackwards=t,o.rendering=null,o.renderingStartTime=0,o.last=r,o.tail=n,o.tailMode=i,o.treeForkCount=a)}function Sc(e,t,n){var r=t.pendingProps,i=r.revealOrder,a=r.tail;r=r.children;var o=eo.current,s=!!(o&2);if(s?(o=o&1|2,t.flags|=128):o&=1,V(eo,o),Qs(e,t,r,n),r=wi?di:0,!s&&e!==null&&e.flags&128)a:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&bc(e,n,t);else if(e.tag===19)bc(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break a;for(;e.sibling===null;){if(e.return===null||e.return===t)break a;e=e.return}e.sibling.return=e.return,e=e.sibling}switch(i){case`forwards`:for(n=t.child,i=null;n!==null;)e=n.alternate,e!==null&&to(e)===null&&(i=n),n=n.sibling;n=i,n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),xc(t,!1,i,n,a,r);break;case`backwards`:case`unstable_legacy-backwards`:for(n=null,i=t.child,t.child=null;i!==null;){if(e=i.alternate,e!==null&&to(e)===null){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}xc(t,!0,n,null,a,r);break;case`together`:xc(t,!1,null,null,void 0,r);break;default:t.memoizedState=null}return t.child}function Cc(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),Kl|=t.lanes,(n&t.childLanes)===0)if(e!==null){if(Hi(e,t,n,!1),(n&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error(i(153));if(t.child!==null){for(e=t.child,n=$r(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=$r(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function wc(e,t){return(e.lanes&t)!==0||(e=e.dependencies,!!(e!==null&&Ui(e)))}function Tc(e,t,n){switch(t.tag){case 3:ne(t,t.stateNode.containerInfo),Ri(t,Zi,e.memoizedState.cache),Mi();break;case 27:case 5:ie(t);break;case 4:ne(t,t.stateNode.containerInfo);break;case 10:Ri(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,Xa(t),null;break;case 13:var r=t.memoizedState;if(r!==null)return r.dehydrated===null?(n&t.child.childLanes)===0?(Ya(t),e=Cc(e,t,n),e===null?null:e.sibling):gc(e,t,n):(Ya(t),t.flags|=128,null);Ya(t);break;case 19:var i=!!(e.flags&128);if(r=(n&t.childLanes)!==0,r||=(Hi(e,t,n,!1),(n&t.childLanes)!==0),i){if(r)return Sc(e,t,n);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),V(eo,eo.current),r)break;return null;case 22:return t.lanes=0,nc(e,t,n,t.pendingProps);case 24:Ri(t,Zi,e.memoizedState.cache)}return Cc(e,t,n)}function Ec(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps)Zs=!0;else{if(!wc(e,n)&&!(t.flags&128))return Zs=!1,Tc(e,t,n);Zs=!!(e.flags&131072)}else Zs=!1,wi&&t.flags&1048576&&vi(t,di,t.index);switch(t.lanes=0,t.tag){case 16:a:{var r=t.pendingProps;if(e=va(t.elementType),t.type=e,typeof e==`function`)Qr(e)?(r=Bs(e,r),t.tag=1,t=dc(null,t,e,r,n)):(t.tag=0,t=lc(null,t,e,r,n));else{if(e!=null){var a=e.$$typeof;if(a===x){t.tag=11,t=$s(null,t,e,r,n);break a}if(a===T){t.tag=14,t=ec(null,t,e,r,n);break a}}throw t=M(e)||e,Error(i(306,t,``))}}return t;case 0:return lc(e,t,t.type,t.pendingProps,n);case 1:return r=t.type,a=Bs(r,t.pendingProps),dc(e,t,r,a,n);case 3:a:{if(ne(t,t.stateNode.containerInfo),e===null)throw Error(i(387));r=t.pendingProps;var o=t.memoizedState;a=o.element,Ma(e,t),za(t,r,null,n);var s=t.memoizedState;if(r=s.cache,Ri(t,Zi,r),r!==o.cache&&Vi(t,[Zi],n,!0),Ra(),r=s.element,o.isDehydrated)if(o={element:r,isDehydrated:!1,cache:s.cache},t.updateQueue.baseState=o,t.memoizedState=o,t.flags&256){t=fc(e,t,r,n);break a}else if(r!==a){a=si(Error(i(424)),t),Pi(a),t=fc(e,t,r,n);break a}else{switch(e=t.stateNode.containerInfo,e.nodeType){case 9:e=e.body;break;default:e=e.nodeName===`HTML`?e.ownerDocument.body:e}for(Ci=df(e.firstChild),Si=t,wi=!0,Ti=null,Ei=!0,n=ka(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling}else{if(Mi(),r===a){t=Cc(e,t,n);break a}Qs(e,t,r,n)}t=t.child}return t;case 26:return cc(e,t),e===null?(n=Mf(t.type,null,t.pendingProps,null))?t.memoizedState=n:wi||(n=t.type,e=t.pendingProps,r=Ud(te.current).createElement(n),r[$e]=t,r[et]=e,Y(r,n,e),ft(r),t.stateNode=r):t.memoizedState=Mf(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return ie(t),e===null&&wi&&(r=t.stateNode=hf(t.type,t.pendingProps,te.current),Si=t,Ei=!0,a=Ci,ef(t.type)?(ff=a,Ci=df(r.firstChild)):Ci=a),Qs(e,t,t.pendingProps.children,n),cc(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&wi&&((a=r=Ci)&&(r=af(r,t.type,t.pendingProps,Ei),r===null?a=!1:(t.stateNode=r,Si=t,Ci=df(r.firstChild),Ei=!1,a=!0)),a||Oi(t)),ie(t),a=t.type,o=t.pendingProps,s=e===null?null:e.memoizedProps,r=o.children,Kd(a,o)?r=null:s!==null&&Kd(a,s)&&(t.flags|=32),t.memoizedState!==null&&(a=go(e,t,yo,null,null,n),tp._currentValue=a),cc(e,t),Qs(e,t,r,n),t.child;case 6:return e===null&&wi&&((e=n=Ci)&&(n=of(n,t.pendingProps,Ei),n===null?e=!1:(t.stateNode=n,Si=t,Ci=null,e=!0)),e||Oi(t)),null;case 13:return gc(e,t,n);case 4:return ne(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=Oa(t,null,r,n):Qs(e,t,r,n),t.child;case 11:return $s(e,t,t.type,t.pendingProps,n);case 7:return Qs(e,t,t.pendingProps,n),t.child;case 8:return Qs(e,t,t.pendingProps.children,n),t.child;case 12:return Qs(e,t,t.pendingProps.children,n),t.child;case 10:return r=t.pendingProps,Ri(t,t.type,r.value),Qs(e,t,r.children,n),t.child;case 9:return a=t.type._context,r=t.pendingProps.children,Wi(t),a=Gi(a),r=r(a),t.flags|=1,Qs(e,t,r,n),t.child;case 14:return ec(e,t,t.type,t.pendingProps,n);case 15:return tc(e,t,t.type,t.pendingProps,n);case 19:return Sc(e,t,n);case 31:return sc(e,t,n);case 22:return nc(e,t,n,t.pendingProps);case 24:return Wi(t),r=Gi(Zi),e===null?(a=la(),a===null&&(a=Il,o=Qi(),a.pooledCache=o,o.refCount++,o!==null&&(a.pooledCacheLanes|=n),a=o),t.memoizedState={parent:r,cache:a},ja(t),Ri(t,Zi,a)):((e.lanes&n)!==0&&(Ma(e,t),za(t,null,null,n),Ra()),a=e.memoizedState,o=t.memoizedState,a.parent===r?(r=o.cache,Ri(t,Zi,r),r!==a.cache&&Vi(t,[Zi],n,!0)):(a={parent:r,cache:r},t.memoizedState=a,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=a),Ri(t,Zi,r))),Qs(e,t,t.pendingProps.children,n),t.child;case 29:throw t.pendingProps}throw Error(i(156,t.tag))}function Dc(e){e.flags|=4}function Oc(e,t,n,r,i){if((t=!!(e.mode&32))&&(t=!1),t){if(e.flags|=16777216,(i&335544128)===i)if(e.stateNode.complete)e.flags|=8192;else if(Tu())e.flags|=8192;else throw ya=ha,pa}else e.flags&=-16777217}function kc(e,t){if(t.type!==`stylesheet`||t.state.loading&4)e.flags&=-16777217;else if(e.flags|=16777216,!qf(t))if(Tu())e.flags|=8192;else throw ya=ha,pa}function Ac(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag===22?536870912:Be(),e.lanes|=t,Xl|=t)}function jc(e,t){if(!wi)switch(e.tailMode){case`hidden`:t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case`collapsed`:n=e.tail;for(var r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null}}function Mc(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags&65011712,r|=i.flags&65011712,i.return=e,i=i.sibling;else for(i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags,r|=i.flags,i.return=e,i=i.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function Nc(e,t,n){var r=t.pendingProps;switch(bi(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Mc(t),null;case 1:return Mc(t),null;case 3:return n=t.stateNode,r=null,e!==null&&(r=e.memoizedState.cache),t.memoizedState.cache!==r&&(t.flags|=2048),zi(Zi),re(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(e===null||e.child===null)&&(ji(t)?Dc(t):e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,Ni())),Mc(t),null;case 26:var a=t.type,o=t.memoizedState;return e===null?(Dc(t),o===null?(Mc(t),Oc(t,a,null,r,n)):(Mc(t),kc(t,o))):o?o===e.memoizedState?(Mc(t),t.flags&=-16777217):(Dc(t),Mc(t),kc(t,o)):(e=e.memoizedProps,e!==r&&Dc(t),Mc(t),Oc(t,a,e,r,n)),null;case 27:if(ae(t),n=te.current,a=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&Dc(t);else{if(!r){if(t.stateNode===null)throw Error(i(166));return Mc(t),null}e=H.current,ji(t)?ki(t,e):(e=hf(a,r,n),t.stateNode=e,Dc(t))}return Mc(t),null;case 5:if(ae(t),a=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&Dc(t);else{if(!r){if(t.stateNode===null)throw Error(i(166));return Mc(t),null}if(o=H.current,ji(t))ki(t,o);else{var s=Ud(te.current);switch(o){case 1:o=s.createElementNS(`http://www.w3.org/2000/svg`,a);break;case 2:o=s.createElementNS(`http://www.w3.org/1998/Math/MathML`,a);break;default:switch(a){case`svg`:o=s.createElementNS(`http://www.w3.org/2000/svg`,a);break;case`math`:o=s.createElementNS(`http://www.w3.org/1998/Math/MathML`,a);break;case`script`:o=s.createElement(`div`),o.innerHTML=`<script><\/script>`,o=o.removeChild(o.firstChild);break;case`select`:o=typeof r.is==`string`?s.createElement(`select`,{is:r.is}):s.createElement(`select`),r.multiple?o.multiple=!0:r.size&&(o.size=r.size);break;default:o=typeof r.is==`string`?s.createElement(a,{is:r.is}):s.createElement(a)}}o[$e]=t,o[et]=r;a:for(s=t.child;s!==null;){if(s.tag===5||s.tag===6)o.appendChild(s.stateNode);else if(s.tag!==4&&s.tag!==27&&s.child!==null){s.child.return=s,s=s.child;continue}if(s===t)break a;for(;s.sibling===null;){if(s.return===null||s.return===t)break a;s=s.return}s.sibling.return=s.return,s=s.sibling}t.stateNode=o;a:switch(Y(o,a,r),a){case`button`:case`input`:case`select`:case`textarea`:r=!!r.autoFocus;break a;case`img`:r=!0;break a;default:r=!1}r&&Dc(t)}}return Mc(t),Oc(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,n),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==r&&Dc(t);else{if(typeof r!=`string`&&t.stateNode===null)throw Error(i(166));if(e=te.current,ji(t)){if(e=t.stateNode,n=t.memoizedProps,r=null,a=Si,a!==null)switch(a.tag){case 27:case 5:r=a.memoizedProps}e[$e]=t,e=!!(e.nodeValue===n||r!==null&&!0===r.suppressHydrationWarning||Fd(e.nodeValue,n)),e||Oi(t,!0)}else e=Ud(e).createTextNode(r),e[$e]=t,t.stateNode=e}return Mc(t),null;case 31:if(n=t.memoizedState,e===null||e.memoizedState!==null){if(r=ji(t),n!==null){if(e===null){if(!r)throw Error(i(318));if(e=t.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(557));e[$e]=t}else Mi(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Mc(t),e=!1}else n=Ni(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=n),e=!0;if(!e)return t.flags&256?($a(t),t):($a(t),null);if(t.flags&128)throw Error(i(558))}return Mc(t),null;case 13:if(r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(a=ji(t),r!==null&&r.dehydrated!==null){if(e===null){if(!a)throw Error(i(318));if(a=t.memoizedState,a=a===null?null:a.dehydrated,!a)throw Error(i(317));a[$e]=t}else Mi(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Mc(t),a=!1}else a=Ni(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=a),a=!0;if(!a)return t.flags&256?($a(t),t):($a(t),null)}return $a(t),t.flags&128?(t.lanes=n,t):(n=r!==null,e=e!==null&&e.memoizedState!==null,n&&(r=t.child,a=null,r.alternate!==null&&r.alternate.memoizedState!==null&&r.alternate.memoizedState.cachePool!==null&&(a=r.alternate.memoizedState.cachePool.pool),o=null,r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(o=r.memoizedState.cachePool.pool),o!==a&&(r.flags|=2048)),n!==e&&n&&(t.child.flags|=8192),Ac(t,t.updateQueue),Mc(t),null);case 4:return re(),e===null&&Td(t.stateNode.containerInfo),Mc(t),null;case 10:return zi(t.type),Mc(t),null;case 19:if(B(eo),r=t.memoizedState,r===null)return Mc(t),null;if(a=!!(t.flags&128),o=r.rendering,o===null)if(a)jc(r,!1);else{if(Gl!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(o=to(e),o!==null){for(t.flags|=128,jc(r,!1),e=o.updateQueue,t.updateQueue=e,Ac(t,e),t.subtreeFlags=0,e=n,n=t.child;n!==null;)ei(n,e),n=n.sibling;return V(eo,eo.current&1|2),wi&&_i(t,r.treeForkCount),t.child}e=e.sibling}r.tail!==null&&_e()>nu&&(t.flags|=128,a=!0,jc(r,!1),t.lanes=4194304)}else{if(!a)if(e=to(o),e!==null){if(t.flags|=128,a=!0,e=e.updateQueue,t.updateQueue=e,Ac(t,e),jc(r,!0),r.tail===null&&r.tailMode===`hidden`&&!o.alternate&&!wi)return Mc(t),null}else 2*_e()-r.renderingStartTime>nu&&n!==536870912&&(t.flags|=128,a=!0,jc(r,!1),t.lanes=4194304);r.isBackwards?(o.sibling=t.child,t.child=o):(e=r.last,e===null?t.child=o:e.sibling=o,r.last=o)}return r.tail===null?(Mc(t),null):(e=r.tail,r.rendering=e,r.tail=e.sibling,r.renderingStartTime=_e(),e.sibling=null,n=eo.current,V(eo,a?n&1|2:n&1),wi&&_i(t,r.treeForkCount),e);case 22:case 23:return $a(t),Ka(),r=t.memoizedState!==null,e===null?r&&(t.flags|=8192):e.memoizedState!==null!==r&&(t.flags|=8192),r?n&536870912&&!(t.flags&128)&&(Mc(t),t.subtreeFlags&6&&(t.flags|=8192)):Mc(t),n=t.updateQueue,n!==null&&Ac(t,n.retryQueue),n=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),r=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(r=t.memoizedState.cachePool.pool),r!==n&&(t.flags|=2048),e!==null&&B(ca),null;case 24:return n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),zi(Zi),Mc(t),null;case 25:return null;case 30:return null}throw Error(i(156,t.tag))}function Pc(e,t){switch(bi(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return zi(Zi),re(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return ae(t),null;case 31:if(t.memoizedState!==null){if($a(t),t.alternate===null)throw Error(i(340));Mi()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if($a(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(i(340));Mi()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return B(eo),null;case 4:return re(),null;case 10:return zi(t.type),null;case 22:case 23:return $a(t),Ka(),e!==null&&B(ca),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return zi(Zi),null;case 25:return null;default:return null}}function Fc(e,t){switch(bi(t),t.tag){case 3:zi(Zi),re();break;case 26:case 27:case 5:ae(t);break;case 4:re();break;case 31:t.memoizedState!==null&&$a(t);break;case 13:$a(t);break;case 19:B(eo);break;case 10:zi(t.type);break;case 22:case 23:$a(t),Ka(),e!==null&&B(ca);break;case 24:zi(Zi)}}function Ic(e,t){try{var n=t.updateQueue,r=n===null?null:n.lastEffect;if(r!==null){var i=r.next;n=i;do{if((n.tag&e)===e){r=void 0;var a=n.create,o=n.inst;r=a(),o.destroy=r}n=n.next}while(n!==i)}}catch(e){Ku(t,t.return,e)}}function Lc(e,t,n){try{var r=t.updateQueue,i=r===null?null:r.lastEffect;if(i!==null){var a=i.next;r=a;do{if((r.tag&e)===e){var o=r.inst,s=o.destroy;if(s!==void 0){o.destroy=void 0,i=t;var c=n,l=s;try{l()}catch(e){Ku(i,c,e)}}}r=r.next}while(r!==a)}}catch(e){Ku(t,t.return,e)}}function Rc(e){var t=e.updateQueue;if(t!==null){var n=e.stateNode;try{Va(t,n)}catch(t){Ku(e,e.return,t)}}}function zc(e,t,n){n.props=Bs(e.type,e.memoizedProps),n.state=e.memoizedState;try{n.componentWillUnmount()}catch(n){Ku(e,t,n)}}function Bc(e,t){try{var n=e.ref;if(n!==null){switch(e.tag){case 26:case 27:case 5:var r=e.stateNode;break;case 30:r=e.stateNode;break;default:r=e.stateNode}typeof n==`function`?e.refCleanup=n(r):n.current=r}}catch(n){Ku(e,t,n)}}function Vc(e,t){var n=e.ref,r=e.refCleanup;if(n!==null)if(typeof r==`function`)try{r()}catch(n){Ku(e,t,n)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof n==`function`)try{n(null)}catch(n){Ku(e,t,n)}else n.current=null}function Hc(e){var t=e.type,n=e.memoizedProps,r=e.stateNode;try{a:switch(t){case`button`:case`input`:case`select`:case`textarea`:n.autoFocus&&r.focus();break a;case`img`:n.src?r.src=n.src:n.srcSet&&(r.srcset=n.srcSet)}}catch(t){Ku(e,e.return,t)}}function Uc(e,t,n){try{var r=e.stateNode;Rd(r,e.type,n,t),r[et]=t}catch(t){Ku(e,e.return,t)}}function Wc(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&ef(e.type)||e.tag===4}function Gc(e){a:for(;;){for(;e.sibling===null;){if(e.return===null||Wc(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.tag===27&&ef(e.type)||e.flags&2||e.child===null||e.tag===4)continue a;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function Kc(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?(n.nodeType===9?n.body:n.nodeName===`HTML`?n.ownerDocument.body:n).insertBefore(e,t):(t=n.nodeType===9?n.body:n.nodeName===`HTML`?n.ownerDocument.body:n,t.appendChild(e),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=Kt));else if(r!==4&&(r===27&&ef(e.type)&&(n=e.stateNode,t=null),e=e.child,e!==null))for(Kc(e,t,n),e=e.sibling;e!==null;)Kc(e,t,n),e=e.sibling}function qc(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(r===27&&ef(e.type)&&(n=e.stateNode),e=e.child,e!==null))for(qc(e,t,n),e=e.sibling;e!==null;)qc(e,t,n),e=e.sibling}function Jc(e){var t=e.stateNode,n=e.memoizedProps;try{for(var r=e.type,i=t.attributes;i.length;)t.removeAttributeNode(i[0]);Y(t,r,n),t[$e]=e,t[et]=n}catch(t){Ku(e,e.return,t)}}var Yc=!1,Xc=!1,Zc=!1,Qc=typeof WeakSet==`function`?WeakSet:Set,$c=null;function el(e,t){if(e=e.containerInfo,Vd=up,e=vr(e),yr(e)){if(`selectionStart`in e)var n={start:e.selectionStart,end:e.selectionEnd};else a:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var a=r.anchorOffset,o=r.focusNode;r=r.focusOffset;try{n.nodeType,o.nodeType}catch{n=null;break a}var s=0,c=-1,l=-1,u=0,d=0,f=e,p=null;b:for(;;){for(var m;f!==n||a!==0&&f.nodeType!==3||(c=s+a),f!==o||r!==0&&f.nodeType!==3||(l=s+r),f.nodeType===3&&(s+=f.nodeValue.length),(m=f.firstChild)!==null;)p=f,f=m;for(;;){if(f===e)break b;if(p===n&&++u===a&&(c=s),p===o&&++d===r&&(l=s),(m=f.nextSibling)!==null)break;f=p,p=f.parentNode}f=m}n=c===-1||l===-1?null:{start:c,end:l}}else n=null}n||={start:0,end:0}}else n=null;for(Hd={focusedElem:e,selectionRange:n},up=!1,$c=t;$c!==null;)if(t=$c,e=t.child,t.subtreeFlags&1028&&e!==null)e.return=t,$c=e;else for(;$c!==null;){switch(t=$c,o=t.alternate,e=t.flags,t.tag){case 0:if(e&4&&(e=t.updateQueue,e=e===null?null:e.events,e!==null))for(n=0;n<e.length;n++)a=e[n],a.ref.impl=a.nextImpl;break;case 11:case 15:break;case 1:if(e&1024&&o!==null){e=void 0,n=t,a=o.memoizedProps,o=o.memoizedState,r=n.stateNode;try{var h=Bs(n.type,a);e=r.getSnapshotBeforeUpdate(h,o),r.__reactInternalSnapshotBeforeUpdate=e}catch(e){Ku(n,n.return,e)}}break;case 3:if(e&1024){if(e=t.stateNode.containerInfo,n=e.nodeType,n===9)rf(e);else if(n===1)switch(e.nodeName){case`HEAD`:case`HTML`:case`BODY`:rf(e);break;default:e.textContent=``}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if(e&1024)throw Error(i(163))}if(e=t.sibling,e!==null){e.return=t.return,$c=e;break}$c=t.return}}function tl(e,t,n){var r=n.flags;switch(n.tag){case 0:case 11:case 15:gl(e,n),r&4&&Ic(5,n);break;case 1:if(gl(e,n),r&4)if(e=n.stateNode,t===null)try{e.componentDidMount()}catch(e){Ku(n,n.return,e)}else{var i=Bs(n.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(i,t,e.__reactInternalSnapshotBeforeUpdate)}catch(e){Ku(n,n.return,e)}}r&64&&Rc(n),r&512&&Bc(n,n.return);break;case 3:if(gl(e,n),r&64&&(e=n.updateQueue,e!==null)){if(t=null,n.child!==null)switch(n.child.tag){case 27:case 5:t=n.child.stateNode;break;case 1:t=n.child.stateNode}try{Va(e,t)}catch(e){Ku(n,n.return,e)}}break;case 27:t===null&&r&4&&Jc(n);case 26:case 5:gl(e,n),t===null&&r&4&&Hc(n),r&512&&Bc(n,n.return);break;case 12:gl(e,n);break;case 31:gl(e,n),r&4&&sl(e,n);break;case 13:gl(e,n),r&4&&cl(e,n),r&64&&(e=n.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(n=Xu.bind(null,n),uf(e,n))));break;case 22:if(r=n.memoizedState!==null||Yc,!r){t=t!==null&&t.memoizedState!==null||Xc,i=Yc;var a=Xc;Yc=r,(Xc=t)&&!a?vl(e,n,!!(n.subtreeFlags&8772)):gl(e,n),Yc=i,Xc=a}break;case 30:break;default:gl(e,n)}}function nl(e){var t=e.alternate;t!==null&&(e.alternate=null,nl(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&st(t)),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}var rl=null,il=!1;function al(e,t,n){for(n=n.child;n!==null;)ol(e,t,n),n=n.sibling}function ol(e,t,n){if(De&&typeof De.onCommitFiberUnmount==`function`)try{De.onCommitFiberUnmount(Ee,n)}catch{}switch(n.tag){case 26:Xc||Vc(n,t),al(e,t,n),n.memoizedState?n.memoizedState.count--:n.stateNode&&(n=n.stateNode,n.parentNode.removeChild(n));break;case 27:Xc||Vc(n,t);var r=rl,i=il;ef(n.type)&&(rl=n.stateNode,il=!1),al(e,t,n),gf(n.stateNode),rl=r,il=i;break;case 5:Xc||Vc(n,t);case 6:if(r=rl,i=il,rl=null,al(e,t,n),rl=r,il=i,rl!==null)if(il)try{(rl.nodeType===9?rl.body:rl.nodeName===`HTML`?rl.ownerDocument.body:rl).removeChild(n.stateNode)}catch(e){Ku(n,t,e)}else try{rl.removeChild(n.stateNode)}catch(e){Ku(n,t,e)}break;case 18:rl!==null&&(il?(e=rl,tf(e.nodeType===9?e.body:e.nodeName===`HTML`?e.ownerDocument.body:e,n.stateNode),Ip(e)):tf(rl,n.stateNode));break;case 4:r=rl,i=il,rl=n.stateNode.containerInfo,il=!0,al(e,t,n),rl=r,il=i;break;case 0:case 11:case 14:case 15:Lc(2,n,t),Xc||Lc(4,n,t),al(e,t,n);break;case 1:Xc||(Vc(n,t),r=n.stateNode,typeof r.componentWillUnmount==`function`&&zc(n,t,r)),al(e,t,n);break;case 21:al(e,t,n);break;case 22:Xc=(r=Xc)||n.memoizedState!==null,al(e,t,n),Xc=r;break;default:al(e,t,n)}}function sl(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{Ip(e)}catch(e){Ku(t,t.return,e)}}}function cl(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{Ip(e)}catch(e){Ku(t,t.return,e)}}function ll(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new Qc),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new Qc),t;default:throw Error(i(435,e.tag))}}function ul(e,t){var n=ll(e);t.forEach(function(t){if(!n.has(t)){n.add(t);var r=Zu.bind(null,e,t);t.then(r,r)}})}function dl(e,t){var n=t.deletions;if(n!==null)for(var r=0;r<n.length;r++){var a=n[r],o=e,s=t,c=s;a:for(;c!==null;){switch(c.tag){case 27:if(ef(c.type)){rl=c.stateNode,il=!1;break a}break;case 5:rl=c.stateNode,il=!1;break a;case 3:case 4:rl=c.stateNode.containerInfo,il=!0;break a}c=c.return}if(rl===null)throw Error(i(160));ol(o,s,a),rl=null,il=!1,o=a.alternate,o!==null&&(o.return=null),a.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)pl(t,e),t=t.sibling}var fl=null;function pl(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:dl(t,e),ml(e),r&4&&(Lc(3,e,e.return),Ic(3,e),Lc(5,e,e.return));break;case 1:dl(t,e),ml(e),r&512&&(Xc||n===null||Vc(n,n.return)),r&64&&Yc&&(e=e.updateQueue,e!==null&&(r=e.callbacks,r!==null&&(n=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=n===null?r:n.concat(r))));break;case 26:var a=fl;if(dl(t,e),ml(e),r&512&&(Xc||n===null||Vc(n,n.return)),r&4){var o=n===null?null:n.memoizedState;if(r=e.memoizedState,n===null)if(r===null)if(e.stateNode===null){a:{r=e.type,n=e.memoizedProps,a=a.ownerDocument||a;b:switch(r){case`title`:o=a.getElementsByTagName(`title`)[0],(!o||o[ot]||o[$e]||o.namespaceURI===`http://www.w3.org/2000/svg`||o.hasAttribute(`itemprop`))&&(o=a.createElement(r),a.head.insertBefore(o,a.querySelector(`head > title`))),Y(o,r,n),o[$e]=e,ft(o),r=o;break a;case`link`:var s=Wf(`link`,`href`,a).get(r+(n.href||``));if(s){for(var c=0;c<s.length;c++)if(o=s[c],o.getAttribute(`href`)===(n.href==null||n.href===``?null:n.href)&&o.getAttribute(`rel`)===(n.rel==null?null:n.rel)&&o.getAttribute(`title`)===(n.title==null?null:n.title)&&o.getAttribute(`crossorigin`)===(n.crossOrigin==null?null:n.crossOrigin)){s.splice(c,1);break b}}o=a.createElement(r),Y(o,r,n),a.head.appendChild(o);break;case`meta`:if(s=Wf(`meta`,`content`,a).get(r+(n.content||``))){for(c=0;c<s.length;c++)if(o=s[c],o.getAttribute(`content`)===(n.content==null?null:``+n.content)&&o.getAttribute(`name`)===(n.name==null?null:n.name)&&o.getAttribute(`property`)===(n.property==null?null:n.property)&&o.getAttribute(`http-equiv`)===(n.httpEquiv==null?null:n.httpEquiv)&&o.getAttribute(`charset`)===(n.charSet==null?null:n.charSet)){s.splice(c,1);break b}}o=a.createElement(r),Y(o,r,n),a.head.appendChild(o);break;default:throw Error(i(468,r))}o[$e]=e,ft(o),r=o}e.stateNode=r}else Gf(a,e.type,e.stateNode);else e.stateNode=zf(a,r,e.memoizedProps);else o===r?r===null&&e.stateNode!==null&&Uc(e,e.memoizedProps,n.memoizedProps):(o===null?n.stateNode!==null&&(n=n.stateNode,n.parentNode.removeChild(n)):o.count--,r===null?Gf(a,e.type,e.stateNode):zf(a,r,e.memoizedProps))}break;case 27:dl(t,e),ml(e),r&512&&(Xc||n===null||Vc(n,n.return)),n!==null&&r&4&&Uc(e,e.memoizedProps,n.memoizedProps);break;case 5:if(dl(t,e),ml(e),r&512&&(Xc||n===null||Vc(n,n.return)),e.flags&32){a=e.stateNode;try{Rt(a,``)}catch(t){Ku(e,e.return,t)}}r&4&&e.stateNode!=null&&(a=e.memoizedProps,Uc(e,a,n===null?a:n.memoizedProps)),r&1024&&(Zc=!0);break;case 6:if(dl(t,e),ml(e),r&4){if(e.stateNode===null)throw Error(i(162));r=e.memoizedProps,n=e.stateNode;try{n.nodeValue=r}catch(t){Ku(e,e.return,t)}}break;case 3:if(Uf=null,a=fl,fl=yf(t.containerInfo),dl(t,e),fl=a,ml(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{Ip(t.containerInfo)}catch(t){Ku(e,e.return,t)}Zc&&(Zc=!1,hl(e));break;case 4:r=fl,fl=yf(e.stateNode.containerInfo),dl(t,e),ml(e),fl=r;break;case 12:dl(t,e),ml(e);break;case 31:dl(t,e),ml(e),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,ul(e,r)));break;case 13:dl(t,e),ml(e),e.child.flags&8192&&e.memoizedState!==null!=(n!==null&&n.memoizedState!==null)&&(eu=_e()),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,ul(e,r)));break;case 22:a=e.memoizedState!==null;var l=n!==null&&n.memoizedState!==null,u=Yc,d=Xc;if(Yc=u||a,Xc=d||l,dl(t,e),Xc=d,Yc=u,ml(e),r&8192)a:for(t=e.stateNode,t._visibility=a?t._visibility&-2:t._visibility|1,a&&(n===null||l||Yc||Xc||_l(e)),n=null,t=e;;){if(t.tag===5||t.tag===26){if(n===null){l=n=t;try{if(o=l.stateNode,a)s=o.style,typeof s.setProperty==`function`?s.setProperty(`display`,`none`,`important`):s.display=`none`;else{c=l.stateNode;var f=l.memoizedProps.style,p=f!=null&&f.hasOwnProperty(`display`)?f.display:null;c.style.display=p==null||typeof p==`boolean`?``:(``+p).trim()}}catch(e){Ku(l,l.return,e)}}}else if(t.tag===6){if(n===null){l=t;try{l.stateNode.nodeValue=a?``:l.memoizedProps}catch(e){Ku(l,l.return,e)}}}else if(t.tag===18){if(n===null){l=t;try{var m=l.stateNode;a?nf(m,!0):nf(l.stateNode,!1)}catch(e){Ku(l,l.return,e)}}}else if((t.tag!==22&&t.tag!==23||t.memoizedState===null||t===e)&&t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break a;for(;t.sibling===null;){if(t.return===null||t.return===e)break a;n===t&&(n=null),t=t.return}n===t&&(n=null),t.sibling.return=t.return,t=t.sibling}r&4&&(r=e.updateQueue,r!==null&&(n=r.retryQueue,n!==null&&(r.retryQueue=null,ul(e,n))));break;case 19:dl(t,e),ml(e),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,ul(e,r)));break;case 30:break;case 21:break;default:dl(t,e),ml(e)}}function ml(e){var t=e.flags;if(t&2){try{for(var n,r=e.return;r!==null;){if(Wc(r)){n=r;break}r=r.return}if(n==null)throw Error(i(160));switch(n.tag){case 27:var a=n.stateNode;qc(e,Gc(e),a);break;case 5:var o=n.stateNode;n.flags&32&&(Rt(o,``),n.flags&=-33),qc(e,Gc(e),o);break;case 3:case 4:var s=n.stateNode.containerInfo;Kc(e,Gc(e),s);break;default:throw Error(i(161))}}catch(t){Ku(e,e.return,t)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function hl(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;hl(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function gl(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)tl(e,t.alternate,t),t=t.sibling}function _l(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:Lc(4,t,t.return),_l(t);break;case 1:Vc(t,t.return);var n=t.stateNode;typeof n.componentWillUnmount==`function`&&zc(t,t.return,n),_l(t);break;case 27:gf(t.stateNode);case 26:case 5:Vc(t,t.return),_l(t);break;case 22:t.memoizedState===null&&_l(t);break;case 30:_l(t);break;default:_l(t)}e=e.sibling}}function vl(e,t,n){for(n&&=!!(t.subtreeFlags&8772),t=t.child;t!==null;){var r=t.alternate,i=e,a=t,o=a.flags;switch(a.tag){case 0:case 11:case 15:vl(i,a,n),Ic(4,a);break;case 1:if(vl(i,a,n),r=a,i=r.stateNode,typeof i.componentDidMount==`function`)try{i.componentDidMount()}catch(e){Ku(r,r.return,e)}if(r=a,i=r.updateQueue,i!==null){var s=r.stateNode;try{var c=i.shared.hiddenCallbacks;if(c!==null)for(i.shared.hiddenCallbacks=null,i=0;i<c.length;i++)Ba(c[i],s)}catch(e){Ku(r,r.return,e)}}n&&o&64&&Rc(a),Bc(a,a.return);break;case 27:Jc(a);case 26:case 5:vl(i,a,n),n&&r===null&&o&4&&Hc(a),Bc(a,a.return);break;case 12:vl(i,a,n);break;case 31:vl(i,a,n),n&&o&4&&sl(i,a);break;case 13:vl(i,a,n),n&&o&4&&cl(i,a);break;case 22:a.memoizedState===null&&vl(i,a,n),Bc(a,a.return);break;case 30:break;default:vl(i,a,n)}t=t.sibling}}function yl(e,t){var n=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),e=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(e=t.memoizedState.cachePool.pool),e!==n&&(e!=null&&e.refCount++,n!=null&&$i(n))}function bl(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&$i(e))}function xl(e,t,n,r){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)Sl(e,t,n,r),t=t.sibling}function Sl(e,t,n,r){var i=t.flags;switch(t.tag){case 0:case 11:case 15:xl(e,t,n,r),i&2048&&Ic(9,t);break;case 1:xl(e,t,n,r);break;case 3:xl(e,t,n,r),i&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&$i(e)));break;case 12:if(i&2048){xl(e,t,n,r),e=t.stateNode;try{var a=t.memoizedProps,o=a.id,s=a.onPostCommit;typeof s==`function`&&s(o,t.alternate===null?`mount`:`update`,e.passiveEffectDuration,-0)}catch(e){Ku(t,t.return,e)}}else xl(e,t,n,r);break;case 31:xl(e,t,n,r);break;case 13:xl(e,t,n,r);break;case 23:break;case 22:a=t.stateNode,o=t.alternate,t.memoizedState===null?a._visibility&2?xl(e,t,n,r):(a._visibility|=2,Cl(e,t,n,r,!!(t.subtreeFlags&10256)||!1)):a._visibility&2?xl(e,t,n,r):wl(e,t),i&2048&&yl(o,t);break;case 24:xl(e,t,n,r),i&2048&&bl(t.alternate,t);break;default:xl(e,t,n,r)}}function Cl(e,t,n,r,i){for(i&&=!!(t.subtreeFlags&10256)||!1,t=t.child;t!==null;){var a=e,o=t,s=n,c=r,l=o.flags;switch(o.tag){case 0:case 11:case 15:Cl(a,o,s,c,i),Ic(8,o);break;case 23:break;case 22:var u=o.stateNode;o.memoizedState===null?(u._visibility|=2,Cl(a,o,s,c,i)):u._visibility&2?Cl(a,o,s,c,i):wl(a,o),i&&l&2048&&yl(o.alternate,o);break;case 24:Cl(a,o,s,c,i),i&&l&2048&&bl(o.alternate,o);break;default:Cl(a,o,s,c,i)}t=t.sibling}}function wl(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var n=e,r=t,i=r.flags;switch(r.tag){case 22:wl(n,r),i&2048&&yl(r.alternate,r);break;case 24:wl(n,r),i&2048&&bl(r.alternate,r);break;default:wl(n,r)}t=t.sibling}}var Tl=8192;function El(e,t,n){if(e.subtreeFlags&Tl)for(e=e.child;e!==null;)Dl(e,t,n),e=e.sibling}function Dl(e,t,n){switch(e.tag){case 26:El(e,t,n),e.flags&Tl&&e.memoizedState!==null&&Jf(n,fl,e.memoizedState,e.memoizedProps);break;case 5:El(e,t,n);break;case 3:case 4:var r=fl;fl=yf(e.stateNode.containerInfo),El(e,t,n),fl=r;break;case 22:e.memoizedState===null&&(r=e.alternate,r!==null&&r.memoizedState!==null?(r=Tl,Tl=16777216,El(e,t,n),Tl=r):El(e,t,n));break;default:El(e,t,n)}}function Ol(e){var t=e.alternate;if(t!==null&&(e=t.child,e!==null)){t.child=null;do t=e.sibling,e.sibling=null,e=t;while(e!==null)}}function kl(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var n=0;n<t.length;n++){var r=t[n];$c=r,Ml(r,e)}Ol(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)Al(e),e=e.sibling}function Al(e){switch(e.tag){case 0:case 11:case 15:kl(e),e.flags&2048&&Lc(9,e,e.return);break;case 3:kl(e);break;case 12:kl(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,jl(e)):kl(e);break;default:kl(e)}}function jl(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var n=0;n<t.length;n++){var r=t[n];$c=r,Ml(r,e)}Ol(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:Lc(8,t,t.return),jl(t);break;case 22:n=t.stateNode,n._visibility&2&&(n._visibility&=-3,jl(t));break;default:jl(t)}e=e.sibling}}function Ml(e,t){for(;$c!==null;){var n=$c;switch(n.tag){case 0:case 11:case 15:Lc(8,n,t);break;case 23:case 22:if(n.memoizedState!==null&&n.memoizedState.cachePool!==null){var r=n.memoizedState.cachePool.pool;r!=null&&r.refCount++}break;case 24:$i(n.memoizedState.cache)}if(r=n.child,r!==null)r.return=n,$c=r;else a:for(n=e;$c!==null;){r=$c;var i=r.sibling,a=r.return;if(nl(r),r===n){$c=null;break a}if(i!==null){i.return=a,$c=i;break a}$c=a}}}var Nl={getCacheForType:function(e){var t=Gi(Zi),n=t.data.get(e);return n===void 0&&(n=e(),t.data.set(e,n)),n},cacheSignal:function(){return Gi(Zi).controller.signal}},Pl=typeof WeakMap==`function`?WeakMap:Map,Fl=0,Il=null,Ll=null,Rl=0,zl=0,Bl=null,Vl=!1,Hl=!1,Ul=!1,Wl=0,Gl=0,Kl=0,ql=0,Jl=0,Yl=0,Xl=0,Zl=null,Ql=null,$l=!1,eu=0,tu=0,nu=1/0,ru=null,iu=null,au=0,ou=null,su=null,cu=0,lu=0,uu=null,du=null,fu=0,pu=null;function mu(){return Fl&2&&Rl!==0?Rl&-Rl:P.T===null?Xe():pd()}function hu(){if(Yl===0)if(!(Rl&536870912)||wi){var e=Pe;Pe<<=1,!(Pe&3932160)&&(Pe=262144),Yl=e}else Yl=536870912;return e=qa.current,e!==null&&(e.flags|=32),Yl}function gu(e,t,n){(e===Il&&(zl===2||zl===9)||e.cancelPendingCommit!==null)&&(Cu(e,0),bu(e,Rl,Yl,!1)),He(e,n),(!(Fl&2)||e!==Il)&&(e===Il&&(!(Fl&2)&&(ql|=n),Gl===4&&bu(e,Rl,Yl,!1)),ad(e))}function _u(e,t,n){if(Fl&6)throw Error(i(327));var r=!n&&!(t&127)&&(t&e.expiredLanes)===0||Re(e,t),a=r?ju(e,t):ku(e,t,!0),o=r;do{if(a===0){Hl&&!r&&bu(e,t,0,!1);break}if(n=e.current.alternate,o&&!yu(n)){a=ku(e,t,!1),o=!1;continue}if(a===2){if(o=t,e.errorRecoveryDisabledLanes&o)var s=0;else s=e.pendingLanes&-536870913,s=s===0?s&536870912?536870912:0:s;if(s!==0){t=s;a:{var c=e;a=Zl;var l=c.current.memoizedState.isDehydrated;if(l&&(Cu(c,s).flags|=256),s=ku(c,s,!1),s!==2){if(Ul&&!l){c.errorRecoveryDisabledLanes|=o,ql|=o,a=4;break a}o=Ql,Ql=a,o!==null&&(Ql===null?Ql=o:Ql.push.apply(Ql,o))}a=s}if(o=!1,a!==2)continue}}if(a===1){Cu(e,0),bu(e,t,0,!0);break}a:{switch(r=e,o=a,o){case 0:case 1:throw Error(i(345));case 4:if((t&4194048)!==t)break;case 6:bu(r,t,Yl,!Vl);break a;case 2:Ql=null;break;case 3:case 5:break;default:throw Error(i(329))}if((t&62914560)===t&&(a=eu+300-_e(),10<a)){if(bu(r,t,Yl,!Vl),Le(r,0,!0)!==0)break a;cu=t,r.timeoutHandle=Yd(vu.bind(null,r,n,Ql,ru,$l,t,Yl,ql,Xl,Vl,o,`Throttled`,-0,0),a);break a}vu(r,n,Ql,ru,$l,t,Yl,ql,Xl,Vl,o,null,-0,0)}break}while(1);ad(e)}function vu(e,t,n,r,i,a,o,s,c,l,u,d,f,p){if(e.timeoutHandle=-1,d=t.subtreeFlags,d&8192||(d&16785408)==16785408){d={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Kt},Dl(t,a,d);var m=(a&62914560)===a?eu-_e():(a&4194048)===a?tu-_e():0;if(m=Xf(d,m),m!==null){cu=a,e.cancelPendingCommit=m(Ru.bind(null,e,t,a,n,r,i,o,s,c,u,d,null,f,p)),bu(e,a,o,!l);return}}Ru(e,t,a,n,r,i,o,s,c)}function yu(e){for(var t=e;;){var n=t.tag;if((n===0||n===11||n===15)&&t.flags&16384&&(n=t.updateQueue,n!==null&&(n=n.stores,n!==null)))for(var r=0;r<n.length;r++){var i=n[r],a=i.getSnapshot;i=i.value;try{if(!pr(a(),i))return!1}catch{return!1}}if(n=t.child,t.subtreeFlags&16384&&n!==null)n.return=t,t=n;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function bu(e,t,n,r){t&=~Jl,t&=~ql,e.suspendedLanes|=t,e.pingedLanes&=~t,r&&(e.warmLanes|=t),r=e.expirationTimes;for(var i=t;0<i;){var a=31-ke(i),o=1<<a;r[a]=-1,i&=~o}n!==0&&We(e,n,t)}function xu(){return Fl&6?!0:(od(0,!1),!1)}function Su(){if(Ll!==null){if(zl===0)var e=Ll.return;else e=Ll,Li=Ii=null,So(e),Sa=null,Ca=0,e=Ll;for(;e!==null;)Fc(e.alternate,e),e=e.return;Ll=null}}function Cu(e,t){var n=e.timeoutHandle;n!==-1&&(e.timeoutHandle=-1,Xd(n)),n=e.cancelPendingCommit,n!==null&&(e.cancelPendingCommit=null,n()),cu=0,Su(),Il=e,Ll=n=$r(e.current,null),Rl=t,zl=0,Bl=null,Vl=!1,Hl=Re(e,t),Ul=!1,Xl=Yl=Jl=ql=Kl=Gl=0,Ql=Zl=null,$l=!1,t&8&&(t|=t&32);var r=e.entangledLanes;if(r!==0)for(e=e.entanglements,r&=t;0<r;){var i=31-ke(r),a=1<<i;t|=e[i],r&=~a}return Wl=t,Ur(),n}function wu(e,t){ro=null,P.H=Ms,t===fa||t===ma?(t=ba(),zl=3):t===pa?(t=ba(),zl=4):zl=t===Xs?8:typeof t==`object`&&t&&typeof t.then==`function`?6:1,Bl=t,Ll===null&&(Gl=1,Ws(e,si(t,e.current)))}function Tu(){var e=qa.current;return e===null?!0:(Rl&4194048)===Rl?Ja===null:(Rl&62914560)===Rl||Rl&536870912?e===Ja:!1}function Eu(){var e=P.H;return P.H=Ms,e===null?Ms:e}function Du(){var e=P.A;return P.A=Nl,e}function Ou(){Gl=4,Vl||(Rl&4194048)!==Rl&&qa.current!==null||(Hl=!0),!(Kl&134217727)&&!(ql&134217727)||Il===null||bu(Il,Rl,Yl,!1)}function ku(e,t,n){var r=Fl;Fl|=2;var i=Eu(),a=Du();(Il!==e||Rl!==t)&&(ru=null,Cu(e,t)),t=!1;var o=Gl;a:do try{if(zl!==0&&Ll!==null){var s=Ll,c=Bl;switch(zl){case 8:Su(),o=6;break a;case 3:case 2:case 9:case 6:qa.current===null&&(t=!0);var l=zl;if(zl=0,Bl=null,Fu(e,s,c,l),n&&Hl){o=0;break a}break;default:l=zl,zl=0,Bl=null,Fu(e,s,c,l)}}Au(),o=Gl;break}catch(t){wu(e,t)}while(1);return t&&e.shellSuspendCounter++,Li=Ii=null,Fl=r,P.H=i,P.A=a,Ll===null&&(Il=null,Rl=0,Ur()),o}function Au(){for(;Ll!==null;)Nu(Ll)}function ju(e,t){var n=Fl;Fl|=2;var r=Eu(),a=Du();Il!==e||Rl!==t?(ru=null,nu=_e()+500,Cu(e,t)):Hl=Re(e,t);a:do try{if(zl!==0&&Ll!==null){t=Ll;var o=Bl;b:switch(zl){case 1:zl=0,Bl=null,Fu(e,t,o,1);break;case 2:case 9:if(ga(o)){zl=0,Bl=null,Pu(t);break}t=function(){zl!==2&&zl!==9||Il!==e||(zl=7),ad(e)},o.then(t,t);break a;case 3:zl=7;break a;case 4:zl=5;break a;case 7:ga(o)?(zl=0,Bl=null,Pu(t)):(zl=0,Bl=null,Fu(e,t,o,7));break;case 5:var s=null;switch(Ll.tag){case 26:s=Ll.memoizedState;case 5:case 27:var c=Ll;if(s?qf(s):c.stateNode.complete){zl=0,Bl=null;var l=c.sibling;if(l!==null)Ll=l;else{var u=c.return;u===null?Ll=null:(Ll=u,Iu(u))}break b}}zl=0,Bl=null,Fu(e,t,o,5);break;case 6:zl=0,Bl=null,Fu(e,t,o,6);break;case 8:Su(),Gl=6;break a;default:throw Error(i(462))}}Mu();break}catch(t){wu(e,t)}while(1);return Li=Ii=null,P.H=r,P.A=a,Fl=n,Ll===null?(Il=null,Rl=0,Ur(),Gl):0}function Mu(){for(;Ll!==null&&!he();)Nu(Ll)}function Nu(e){var t=Ec(e.alternate,e,Wl);e.memoizedProps=e.pendingProps,t===null?Iu(e):Ll=t}function Pu(e){var t=e,n=t.alternate;switch(t.tag){case 15:case 0:t=uc(n,t,t.pendingProps,t.type,void 0,Rl);break;case 11:t=uc(n,t,t.pendingProps,t.type.render,t.ref,Rl);break;case 5:So(t);default:Fc(n,t),t=Ll=ei(t,Wl),t=Ec(n,t,Wl)}e.memoizedProps=e.pendingProps,t===null?Iu(e):Ll=t}function Fu(e,t,n,r){Li=Ii=null,So(t),Sa=null,Ca=0;var i=t.return;try{if(Ys(e,i,t,n,Rl)){Gl=1,Ws(e,si(n,e.current)),Ll=null;return}}catch(t){if(i!==null)throw Ll=i,t;Gl=1,Ws(e,si(n,e.current)),Ll=null;return}t.flags&32768?(wi||r===1?e=!0:Hl||Rl&536870912?e=!1:(Vl=e=!0,(r===2||r===9||r===3||r===6)&&(r=qa.current,r!==null&&r.tag===13&&(r.flags|=16384))),Lu(t,e)):Iu(t)}function Iu(e){var t=e;do{if(t.flags&32768){Lu(t,Vl);return}e=t.return;var n=Nc(t.alternate,t,Wl);if(n!==null){Ll=n;return}if(t=t.sibling,t!==null){Ll=t;return}Ll=t=e}while(t!==null);Gl===0&&(Gl=5)}function Lu(e,t){do{var n=Pc(e.alternate,e);if(n!==null){n.flags&=32767,Ll=n;return}if(n=e.return,n!==null&&(n.flags|=32768,n.subtreeFlags=0,n.deletions=null),!t&&(e=e.sibling,e!==null)){Ll=e;return}Ll=e=n}while(e!==null);Gl=6,Ll=null}function Ru(e,t,n,r,a,o,s,c,l){e.cancelPendingCommit=null;do Uu();while(au!==0);if(Fl&6)throw Error(i(327));if(t!==null){if(t===e.current)throw Error(i(177));if(o=t.lanes|t.childLanes,o|=Hr,Ue(e,n,o,s,c,l),e===Il&&(Ll=Il=null,Rl=0),su=t,ou=e,cu=n,lu=o,uu=a,du=r,t.subtreeFlags&10256||t.flags&10256?(e.callbackNode=null,e.callbackPriority=0,Qu(xe,function(){return Wu(),null})):(e.callbackNode=null,e.callbackPriority=0),r=!!(t.flags&13878),t.subtreeFlags&13878||r){r=P.T,P.T=null,a=F.p,F.p=2,s=Fl,Fl|=4;try{el(e,t,n)}finally{Fl=s,F.p=a,P.T=r}}au=1,zu(),Bu(),Vu()}}function zu(){if(au===1){au=0;var e=ou,t=su,n=!!(t.flags&13878);if(t.subtreeFlags&13878||n){n=P.T,P.T=null;var r=F.p;F.p=2;var i=Fl;Fl|=4;try{pl(t,e);var a=Hd,o=vr(e.containerInfo),s=a.focusedElem,c=a.selectionRange;if(o!==s&&s&&s.ownerDocument&&_r(s.ownerDocument.documentElement,s)){if(c!==null&&yr(s)){var l=c.start,u=c.end;if(u===void 0&&(u=l),`selectionStart`in s)s.selectionStart=l,s.selectionEnd=Math.min(u,s.value.length);else{var d=s.ownerDocument||document,f=d&&d.defaultView||window;if(f.getSelection){var p=f.getSelection(),m=s.textContent.length,h=Math.min(c.start,m),g=c.end===void 0?h:Math.min(c.end,m);!p.extend&&h>g&&(o=g,g=h,h=o);var _=gr(s,h),v=gr(s,g);if(_&&v&&(p.rangeCount!==1||p.anchorNode!==_.node||p.anchorOffset!==_.offset||p.focusNode!==v.node||p.focusOffset!==v.offset)){var y=d.createRange();y.setStart(_.node,_.offset),p.removeAllRanges(),h>g?(p.addRange(y),p.extend(v.node,v.offset)):(y.setEnd(v.node,v.offset),p.addRange(y))}}}}for(d=[],p=s;p=p.parentNode;)p.nodeType===1&&d.push({element:p,left:p.scrollLeft,top:p.scrollTop});for(typeof s.focus==`function`&&s.focus(),s=0;s<d.length;s++){var b=d[s];b.element.scrollLeft=b.left,b.element.scrollTop=b.top}}up=!!Vd,Hd=Vd=null}finally{Fl=i,F.p=r,P.T=n}}e.current=t,au=2}}function Bu(){if(au===2){au=0;var e=ou,t=su,n=!!(t.flags&8772);if(t.subtreeFlags&8772||n){n=P.T,P.T=null;var r=F.p;F.p=2;var i=Fl;Fl|=4;try{tl(e,t.alternate,t)}finally{Fl=i,F.p=r,P.T=n}}au=3}}function Vu(){if(au===4||au===3){au=0,ge();var e=ou,t=su,n=cu,r=du;t.subtreeFlags&10256||t.flags&10256?au=5:(au=0,su=ou=null,Hu(e,e.pendingLanes));var i=e.pendingLanes;if(i===0&&(iu=null),Ye(n),t=t.stateNode,De&&typeof De.onCommitFiberRoot==`function`)try{De.onCommitFiberRoot(Ee,t,void 0,(t.current.flags&128)==128)}catch{}if(r!==null){t=P.T,i=F.p,F.p=2,P.T=null;try{for(var a=e.onRecoverableError,o=0;o<r.length;o++){var s=r[o];a(s.value,{componentStack:s.stack})}}finally{P.T=t,F.p=i}}cu&3&&Uu(),ad(e),i=e.pendingLanes,n&261930&&i&42?e===pu?fu++:(fu=0,pu=e):fu=0,od(0,!1)}}function Hu(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,$i(t)))}function Uu(){return zu(),Bu(),Vu(),Wu()}function Wu(){if(au!==5)return!1;var e=ou,t=lu;lu=0;var n=Ye(cu),r=P.T,a=F.p;try{F.p=32>n?32:n,P.T=null,n=uu,uu=null;var o=ou,s=cu;if(au=0,su=ou=null,cu=0,Fl&6)throw Error(i(331));var c=Fl;if(Fl|=4,Al(o.current),Sl(o,o.current,s,n),Fl=c,od(0,!1),De&&typeof De.onPostCommitFiberRoot==`function`)try{De.onPostCommitFiberRoot(Ee,o)}catch{}return!0}finally{F.p=a,P.T=r,Hu(e,t)}}function Gu(e,t,n){t=si(n,t),t=Ks(e.stateNode,t,2),e=Pa(e,t,2),e!==null&&(He(e,2),ad(e))}function Ku(e,t,n){if(e.tag===3)Gu(e,e,n);else for(;t!==null;){if(t.tag===3){Gu(t,e,n);break}if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError==`function`||typeof r.componentDidCatch==`function`&&(iu===null||!iu.has(r))){e=si(n,e),n=qs(2),r=Pa(t,n,2),r!==null&&(Js(n,r,t,e),He(r,2),ad(r));break}}t=t.return}}function qu(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new Pl;var i=new Set;r.set(t,i)}else i=r.get(t),i===void 0&&(i=new Set,r.set(t,i));i.has(n)||(Ul=!0,i.add(n),e=Ju.bind(null,e,t,n),t.then(e,e))}function Ju(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),e.pingedLanes|=e.suspendedLanes&n,e.warmLanes&=~n,Il===e&&(Rl&n)===n&&(Gl===4||Gl===3&&(Rl&62914560)===Rl&&300>_e()-eu?!(Fl&2)&&Cu(e,0):Jl|=n,Xl===Rl&&(Xl=0)),ad(e)}function Yu(e,t){t===0&&(t=Be()),e=Kr(e,t),e!==null&&(He(e,t),ad(e))}function Xu(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),Yu(e,n)}function Zu(e,t){var n=0;switch(e.tag){case 31:case 13:var r=e.stateNode,a=e.memoizedState;a!==null&&(n=a.retryLane);break;case 19:r=e.stateNode;break;case 22:r=e.stateNode._retryCache;break;default:throw Error(i(314))}r!==null&&r.delete(t),Yu(e,n)}function Qu(e,t){return pe(e,t)}var $u=null,ed=null,td=!1,nd=!1,rd=!1,id=0;function ad(e){e!==ed&&e.next===null&&(ed===null?$u=ed=e:ed=ed.next=e),nd=!0,td||(td=!0,fd())}function od(e,t){if(!rd&&nd){rd=!0;do for(var n=!1,r=$u;r!==null;){if(!t)if(e!==0){var i=r.pendingLanes;if(i===0)var a=0;else{var o=r.suspendedLanes,s=r.pingedLanes;a=(1<<31-ke(42|e)+1)-1,a&=i&~(o&~s),a=a&201326741?a&201326741|1:a?a|2:0}a!==0&&(n=!0,dd(r,a))}else a=Rl,a=Le(r,r===Il?a:0,r.cancelPendingCommit!==null||r.timeoutHandle!==-1),!(a&3)||Re(r,a)||(n=!0,dd(r,a));r=r.next}while(n);rd=!1}}function sd(){cd()}function cd(){nd=td=!1;var e=0;id!==0&&Jd()&&(e=id);for(var t=_e(),n=null,r=$u;r!==null;){var i=r.next,a=ld(r,t);a===0?(r.next=null,n===null?$u=i:n.next=i,i===null&&(ed=n)):(n=r,(e!==0||a&3)&&(nd=!0)),r=i}au!==0&&au!==5||od(e,!1),id!==0&&(id=0)}function ld(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,a=e.pendingLanes&-62914561;0<a;){var o=31-ke(a),s=1<<o,c=i[o];c===-1?((s&n)===0||(s&r)!==0)&&(i[o]=ze(s,t)):c<=t&&(e.expiredLanes|=s),a&=~s}if(t=Il,n=Rl,n=Le(e,e===t?n:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r=e.callbackNode,n===0||e===t&&(zl===2||zl===9)||e.cancelPendingCommit!==null)return r!==null&&r!==null&&me(r),e.callbackNode=null,e.callbackPriority=0;if(!(n&3)||Re(e,n)){if(t=n&-n,t===e.callbackPriority)return t;switch(r!==null&&me(r),Ye(n)){case 2:case 8:n=be;break;case 32:n=xe;break;case 268435456:n=Ce;break;default:n=xe}return r=ud.bind(null,e),n=pe(n,r),e.callbackPriority=t,e.callbackNode=n,t}return r!==null&&r!==null&&me(r),e.callbackPriority=2,e.callbackNode=null,2}function ud(e,t){if(au!==0&&au!==5)return e.callbackNode=null,e.callbackPriority=0,null;var n=e.callbackNode;if(Uu()&&e.callbackNode!==n)return null;var r=Rl;return r=Le(e,e===Il?r:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r===0?null:(_u(e,r,t),ld(e,_e()),e.callbackNode!=null&&e.callbackNode===n?ud.bind(null,e):null)}function dd(e,t){if(Uu())return null;_u(e,t,!0)}function fd(){Qd(function(){Fl&6?pe(ye,sd):cd()})}function pd(){if(id===0){var e=na;e===0&&(e=Ne,Ne<<=1,!(Ne&261888)&&(Ne=256)),id=e}return id}function md(e){return e==null||typeof e==`symbol`||typeof e==`boolean`?null:typeof e==`function`?e:Gt(``+e)}function hd(e,t){var n=t.ownerDocument.createElement(`input`);return n.name=t.name,n.value=t.value,e.id&&n.setAttribute(`form`,e.id),t.parentNode.insertBefore(n,t),e=new FormData(e),n.parentNode.removeChild(n),e}function gd(e,t,n,r,i){if(t===`submit`&&n&&n.stateNode===i){var a=md((i[et]||null).action),o=r.submitter;o&&(t=(t=o[et]||null)?md(t.formAction):o.getAttribute(`formAction`),t!==null&&(a=t,o=null));var s=new mn(`action`,`action`,null,r,i);e.push({event:s,listeners:[{instance:null,listener:function(){if(r.defaultPrevented){if(id!==0){var e=o?hd(i,o):new FormData(i);vs(n,{pending:!0,data:e,method:i.method,action:a},null,e)}}else typeof a==`function`&&(s.preventDefault(),e=o?hd(i,o):new FormData(i),vs(n,{pending:!0,data:e,method:i.method,action:a},a,e))},currentTarget:i}]})}}for(var _d=0;_d<Lr.length;_d++){var vd=Lr[_d];Rr(vd.toLowerCase(),`on`+(vd[0].toUpperCase()+vd.slice(1)))}Rr(Ar,`onAnimationEnd`),Rr(jr,`onAnimationIteration`),Rr(Mr,`onAnimationStart`),Rr(`dblclick`,`onDoubleClick`),Rr(`focusin`,`onFocus`),Rr(`focusout`,`onBlur`),Rr(Nr,`onTransitionRun`),Rr(Pr,`onTransitionStart`),Rr(Fr,`onTransitionCancel`),Rr(Ir,`onTransitionEnd`),gt(`onMouseEnter`,[`mouseout`,`mouseover`]),gt(`onMouseLeave`,[`mouseout`,`mouseover`]),gt(`onPointerEnter`,[`pointerout`,`pointerover`]),gt(`onPointerLeave`,[`pointerout`,`pointerover`]),ht(`onChange`,`change click focusin focusout input keydown keyup selectionchange`.split(` `)),ht(`onSelect`,`focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange`.split(` `)),ht(`onBeforeInput`,[`compositionend`,`keypress`,`textInput`,`paste`]),ht(`onCompositionEnd`,`compositionend focusout keydown keypress keyup mousedown`.split(` `)),ht(`onCompositionStart`,`compositionstart focusout keydown keypress keyup mousedown`.split(` `)),ht(`onCompositionUpdate`,`compositionupdate focusout keydown keypress keyup mousedown`.split(` `));var yd=`abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting`.split(` `),bd=new Set(`beforetoggle cancel close invalid load scroll scrollend toggle`.split(` `).concat(yd));function xd(e,t){t=!!(t&4);for(var n=0;n<e.length;n++){var r=e[n],i=r.event;r=r.listeners;a:{var a=void 0;if(t)for(var o=r.length-1;0<=o;o--){var s=r[o],c=s.instance,l=s.currentTarget;if(s=s.listener,c!==a&&i.isPropagationStopped())break a;a=s,i.currentTarget=l;try{a(i)}catch(e){zr(e)}i.currentTarget=null,a=c}else for(o=0;o<r.length;o++){if(s=r[o],c=s.instance,l=s.currentTarget,s=s.listener,c!==a&&i.isPropagationStopped())break a;a=s,i.currentTarget=l;try{a(i)}catch(e){zr(e)}i.currentTarget=null,a=c}}}}function Sd(e,t){var n=t[nt];n===void 0&&(n=t[nt]=new Set);var r=e+`__bubble`;n.has(r)||(Ed(t,e,2,!1),n.add(r))}function Cd(e,t,n){var r=0;t&&(r|=4),Ed(n,e,r,t)}var wd=`_reactListening`+Math.random().toString(36).slice(2);function Td(e){if(!e[wd]){e[wd]=!0,pt.forEach(function(t){t!==`selectionchange`&&(bd.has(t)||Cd(t,!1,e),Cd(t,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[wd]||(t[wd]=!0,Cd(`selectionchange`,!1,t))}}function Ed(e,t,n,r){switch(_p(t)){case 2:var i=dp;break;case 8:i=fp;break;default:i=pp}n=i.bind(null,t,n,e),i=void 0,!nn||t!==`touchstart`&&t!==`touchmove`&&t!==`wheel`||(i=!0),r?i===void 0?e.addEventListener(t,n,!0):e.addEventListener(t,n,{capture:!0,passive:i}):i===void 0?e.addEventListener(t,n,!1):e.addEventListener(t,n,{passive:i})}function Dd(e,t,n,r,i){var a=r;if(!(t&1)&&!(t&2)&&r!==null)a:for(;;){if(r===null)return;var s=r.tag;if(s===3||s===4){var c=r.stateNode.containerInfo;if(c===i)break;if(s===4)for(s=r.return;s!==null;){var l=s.tag;if((l===3||l===4)&&s.stateNode.containerInfo===i)return;s=s.return}for(;c!==null;){if(s=ct(c),s===null)return;if(l=s.tag,l===5||l===6||l===26||l===27){r=a=s;continue a}c=c.parentNode}}r=r.return}$t(function(){var r=a,i=Jt(n),s=[];a:{var c=J.get(e);if(c!==void 0){var l=mn,u=e;switch(e){case`keypress`:if(ln(n)===0)break a;case`keydown`:case`keyup`:l=jn;break;case`focusin`:u=`focus`,l=Sn;break;case`focusout`:u=`blur`,l=Sn;break;case`beforeblur`:case`afterblur`:l=Sn;break;case`click`:if(n.button===2)break a;case`auxclick`:case`dblclick`:case`mousedown`:case`mousemove`:case`mouseup`:case`mouseout`:case`mouseover`:case`contextmenu`:l=bn;break;case`drag`:case`dragend`:case`dragenter`:case`dragexit`:case`dragleave`:case`dragover`:case`dragstart`:case`drop`:l=xn;break;case`touchcancel`:case`touchend`:case`touchmove`:case`touchstart`:l=K;break;case Ar:case jr:case Mr:l=Cn;break;case Ir:l=Nn;break;case`scroll`:case`scrollend`:l=G;break;case`wheel`:l=Pn;break;case`copy`:case`cut`:case`paste`:l=wn;break;case`gotpointercapture`:case`lostpointercapture`:case`pointercancel`:case`pointerdown`:case`pointermove`:case`pointerout`:case`pointerover`:case`pointerup`:l=Mn;break;case`toggle`:case`beforetoggle`:l=Fn}var d=!!(t&4),f=!d&&(e===`scroll`||e===`scrollend`),p=d?c===null?null:c+`Capture`:c;d=[];for(var m=r,h;m!==null;){var g=m;if(h=g.stateNode,g=g.tag,g!==5&&g!==26&&g!==27||h===null||p===null||(g=en(m,p),g!=null&&d.push(Od(m,g,h))),f)break;m=m.return}0<d.length&&(c=new l(c,u,null,n,i),s.push({event:c,listeners:d}))}}if(!(t&7)){a:{if(c=e===`mouseover`||e===`pointerover`,l=e===`mouseout`||e===`pointerout`,c&&n!==qt&&(u=n.relatedTarget||n.fromElement)&&(ct(u)||u[tt]))break a;if((l||c)&&(c=i.window===i?i:(c=i.ownerDocument)?c.defaultView||c.parentWindow:window,l?(u=n.relatedTarget||n.toElement,l=r,u=u?ct(u):null,u!==null&&(f=o(u),d=u.tag,u!==f||d!==5&&d!==27&&d!==6)&&(u=null)):(l=null,u=r),l!==u)){if(d=bn,g=`onMouseLeave`,p=`onMouseEnter`,m=`mouse`,(e===`pointerout`||e===`pointerover`)&&(d=Mn,g=`onPointerLeave`,p=`onPointerEnter`,m=`pointer`),f=l==null?c:ut(l),h=u==null?c:ut(u),c=new d(g,m+`leave`,l,n,i),c.target=f,c.relatedTarget=h,g=null,ct(i)===r&&(d=new d(p,m+`enter`,u,n,i),d.target=h,d.relatedTarget=f,g=d),f=g,l&&u)b:{for(d=Ad,p=l,m=u,h=0,g=p;g;g=d(g))h++;g=0;for(var _=m;_;_=d(_))g++;for(;0<h-g;)p=d(p),h--;for(;0<g-h;)m=d(m),g--;for(;h--;){if(p===m||m!==null&&p===m.alternate){d=p;break b}p=d(p),m=d(m)}d=null}else d=null;l!==null&&jd(s,c,l,d,!1),u!==null&&f!==null&&jd(s,f,u,d,!0)}}a:{if(c=r?ut(r):window,l=c.nodeName&&c.nodeName.toLowerCase(),l===`select`||l===`input`&&c.type===`file`)var v=tr;else if(Yn(c))if(nr)v=dr;else{v=lr;var y=cr}else l=c.nodeName,!l||l.toLowerCase()!==`input`||c.type!==`checkbox`&&c.type!==`radio`?r&&Ht(r.elementType)&&(v=tr):v=ur;if(v&&=v(e,r)){Xn(s,v,n,i);break a}y&&y(e,c,r),e===`focusout`&&r&&c.type===`number`&&r.memoizedProps.value!=null&&Pt(c,`number`,c.value)}switch(y=r?ut(r):window,e){case`focusin`:(Yn(y)||y.contentEditable===`true`)&&(xr=y,Sr=r,Cr=null);break;case`focusout`:Cr=Sr=xr=null;break;case`mousedown`:wr=!0;break;case`contextmenu`:case`mouseup`:case`dragend`:wr=!1,Tr(s,n,i);break;case`selectionchange`:if(br)break;case`keydown`:case`keyup`:Tr(s,n,i)}var b;if(Ln)b:{switch(e){case`compositionstart`:var x=`onCompositionStart`;break b;case`compositionend`:x=`onCompositionEnd`;break b;case`compositionupdate`:x=`onCompositionUpdate`;break b}x=void 0}else Gn?Un(e,n)&&(x=`onCompositionEnd`):e===`keydown`&&n.keyCode===229&&(x=`onCompositionStart`);x&&(Bn&&n.locale!==`ko`&&(Gn||x!==`onCompositionStart`?x===`onCompositionEnd`&&Gn&&(b=cn()):(an=i,on=`value`in an?an.value:an.textContent,Gn=!0)),y=kd(r,x),0<y.length&&(x=new Tn(x,e,null,n,i),s.push({event:x,listeners:y}),b?x.data=b:(b=Wn(n),b!==null&&(x.data=b)))),(b=zn?Kn(e,n):qn(e,n))&&(x=kd(r,`onBeforeInput`),0<x.length&&(y=new Tn(`onBeforeInput`,`beforeinput`,null,n,i),s.push({event:y,listeners:x}),y.data=b)),gd(s,e,r,n,i)}xd(s,t)})}function Od(e,t,n){return{instance:e,listener:t,currentTarget:n}}function kd(e,t){for(var n=t+`Capture`,r=[];e!==null;){var i=e,a=i.stateNode;if(i=i.tag,i!==5&&i!==26&&i!==27||a===null||(i=en(e,n),i!=null&&r.unshift(Od(e,i,a)),i=en(e,t),i!=null&&r.push(Od(e,i,a))),e.tag===3)return r;e=e.return}return[]}function Ad(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function jd(e,t,n,r,i){for(var a=t._reactName,o=[];n!==null&&n!==r;){var s=n,c=s.alternate,l=s.stateNode;if(s=s.tag,c!==null&&c===r)break;s!==5&&s!==26&&s!==27||l===null||(c=l,i?(l=en(n,a),l!=null&&o.unshift(Od(n,l,c))):i||(l=en(n,a),l!=null&&o.push(Od(n,l,c)))),n=n.return}o.length!==0&&e.push({event:t,listeners:o})}var Md=/\r\n?/g,Nd=/\u0000|\uFFFD/g;function Pd(e){return(typeof e==`string`?e:``+e).replace(Md,`
57
- `).replace(Nd,``)}function Fd(e,t){return t=Pd(t),Pd(e)===t}function Id(e,t,n,r,a,o){switch(n){case`children`:typeof r==`string`?t===`body`||t===`textarea`&&r===``||Rt(e,r):(typeof r==`number`||typeof r==`bigint`)&&t!==`body`&&Rt(e,``+r);break;case`className`:St(e,`class`,r);break;case`tabIndex`:St(e,`tabindex`,r);break;case`dir`:case`role`:case`viewBox`:case`width`:case`height`:St(e,n,r);break;case`style`:Vt(e,r,o);break;case`data`:if(t!==`object`){St(e,`data`,r);break}case`src`:case`href`:if(r===``&&(t!==`a`||n!==`href`)){e.removeAttribute(n);break}if(r==null||typeof r==`function`||typeof r==`symbol`||typeof r==`boolean`){e.removeAttribute(n);break}r=Gt(``+r),e.setAttribute(n,r);break;case`action`:case`formAction`:if(typeof r==`function`){e.setAttribute(n,`javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')`);break}if(typeof o==`function`&&(n===`formAction`?(t!==`input`&&Id(e,t,`name`,a.name,a,null),Id(e,t,`formEncType`,a.formEncType,a,null),Id(e,t,`formMethod`,a.formMethod,a,null),Id(e,t,`formTarget`,a.formTarget,a,null)):(Id(e,t,`encType`,a.encType,a,null),Id(e,t,`method`,a.method,a,null),Id(e,t,`target`,a.target,a,null))),r==null||typeof r==`symbol`||typeof r==`boolean`){e.removeAttribute(n);break}r=Gt(``+r),e.setAttribute(n,r);break;case`onClick`:r!=null&&(e.onclick=Kt);break;case`onScroll`:r!=null&&Sd(`scroll`,e);break;case`onScrollEnd`:r!=null&&Sd(`scrollend`,e);break;case`dangerouslySetInnerHTML`:if(r!=null){if(typeof r!=`object`||!(`__html`in r))throw Error(i(61));if(n=r.__html,n!=null){if(a.children!=null)throw Error(i(60));e.innerHTML=n}}break;case`multiple`:e.multiple=r&&typeof r!=`function`&&typeof r!=`symbol`;break;case`muted`:e.muted=r&&typeof r!=`function`&&typeof r!=`symbol`;break;case`suppressContentEditableWarning`:case`suppressHydrationWarning`:case`defaultValue`:case`defaultChecked`:case`innerHTML`:case`ref`:break;case`autoFocus`:break;case`xlinkHref`:if(r==null||typeof r==`function`||typeof r==`boolean`||typeof r==`symbol`){e.removeAttribute(`xlink:href`);break}n=Gt(``+r),e.setAttributeNS(`http://www.w3.org/1999/xlink`,`xlink:href`,n);break;case`contentEditable`:case`spellCheck`:case`draggable`:case`value`:case`autoReverse`:case`externalResourcesRequired`:case`focusable`:case`preserveAlpha`:r!=null&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,``+r):e.removeAttribute(n);break;case`inert`:case`allowFullScreen`:case`async`:case`autoPlay`:case`controls`:case`default`:case`defer`:case`disabled`:case`disablePictureInPicture`:case`disableRemotePlayback`:case`formNoValidate`:case`hidden`:case`loop`:case`noModule`:case`noValidate`:case`open`:case`playsInline`:case`readOnly`:case`required`:case`reversed`:case`scoped`:case`seamless`:case`itemScope`:r&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,``):e.removeAttribute(n);break;case`capture`:case`download`:!0===r?e.setAttribute(n,``):!1!==r&&r!=null&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,r):e.removeAttribute(n);break;case`cols`:case`rows`:case`size`:case`span`:r!=null&&typeof r!=`function`&&typeof r!=`symbol`&&!isNaN(r)&&1<=r?e.setAttribute(n,r):e.removeAttribute(n);break;case`rowSpan`:case`start`:r==null||typeof r==`function`||typeof r==`symbol`||isNaN(r)?e.removeAttribute(n):e.setAttribute(n,r);break;case`popover`:Sd(`beforetoggle`,e),Sd(`toggle`,e),xt(e,`popover`,r);break;case`xlinkActuate`:Ct(e,`http://www.w3.org/1999/xlink`,`xlink:actuate`,r);break;case`xlinkArcrole`:Ct(e,`http://www.w3.org/1999/xlink`,`xlink:arcrole`,r);break;case`xlinkRole`:Ct(e,`http://www.w3.org/1999/xlink`,`xlink:role`,r);break;case`xlinkShow`:Ct(e,`http://www.w3.org/1999/xlink`,`xlink:show`,r);break;case`xlinkTitle`:Ct(e,`http://www.w3.org/1999/xlink`,`xlink:title`,r);break;case`xlinkType`:Ct(e,`http://www.w3.org/1999/xlink`,`xlink:type`,r);break;case`xmlBase`:Ct(e,`http://www.w3.org/XML/1998/namespace`,`xml:base`,r);break;case`xmlLang`:Ct(e,`http://www.w3.org/XML/1998/namespace`,`xml:lang`,r);break;case`xmlSpace`:Ct(e,`http://www.w3.org/XML/1998/namespace`,`xml:space`,r);break;case`is`:xt(e,`is`,r);break;case`innerText`:case`textContent`:break;default:(!(2<n.length)||n[0]!==`o`&&n[0]!==`O`||n[1]!==`n`&&n[1]!==`N`)&&(n=Ut.get(n)||n,xt(e,n,r))}}function Ld(e,t,n,r,a,o){switch(n){case`style`:Vt(e,r,o);break;case`dangerouslySetInnerHTML`:if(r!=null){if(typeof r!=`object`||!(`__html`in r))throw Error(i(61));if(n=r.__html,n!=null){if(a.children!=null)throw Error(i(60));e.innerHTML=n}}break;case`children`:typeof r==`string`?Rt(e,r):(typeof r==`number`||typeof r==`bigint`)&&Rt(e,``+r);break;case`onScroll`:r!=null&&Sd(`scroll`,e);break;case`onScrollEnd`:r!=null&&Sd(`scrollend`,e);break;case`onClick`:r!=null&&(e.onclick=Kt);break;case`suppressContentEditableWarning`:case`suppressHydrationWarning`:case`innerHTML`:case`ref`:break;case`innerText`:case`textContent`:break;default:if(!mt.hasOwnProperty(n))a:{if(n[0]===`o`&&n[1]===`n`&&(a=n.endsWith(`Capture`),t=n.slice(2,a?n.length-7:void 0),o=e[et]||null,o=o==null?null:o[n],typeof o==`function`&&e.removeEventListener(t,o,a),typeof r==`function`)){typeof o!=`function`&&o!==null&&(n in e?e[n]=null:e.hasAttribute(n)&&e.removeAttribute(n)),e.addEventListener(t,r,a);break a}n in e?e[n]=r:!0===r?e.setAttribute(n,``):xt(e,n,r)}}}function Y(e,t,n){switch(t){case`div`:case`span`:case`svg`:case`path`:case`a`:case`g`:case`p`:case`li`:break;case`img`:Sd(`error`,e),Sd(`load`,e);var r=!1,a=!1,o;for(o in n)if(n.hasOwnProperty(o)){var s=n[o];if(s!=null)switch(o){case`src`:r=!0;break;case`srcSet`:a=!0;break;case`children`:case`dangerouslySetInnerHTML`:throw Error(i(137,t));default:Id(e,t,o,s,n,null)}}a&&Id(e,t,`srcSet`,n.srcSet,n,null),r&&Id(e,t,`src`,n.src,n,null);return;case`input`:Sd(`invalid`,e);var c=o=s=a=null,l=null,u=null;for(r in n)if(n.hasOwnProperty(r)){var d=n[r];if(d!=null)switch(r){case`name`:a=d;break;case`type`:s=d;break;case`checked`:l=d;break;case`defaultChecked`:u=d;break;case`value`:o=d;break;case`defaultValue`:c=d;break;case`children`:case`dangerouslySetInnerHTML`:if(d!=null)throw Error(i(137,t));break;default:Id(e,t,r,d,n,null)}}Nt(e,o,c,l,u,s,a,!1);return;case`select`:for(a in Sd(`invalid`,e),r=s=o=null,n)if(n.hasOwnProperty(a)&&(c=n[a],c!=null))switch(a){case`value`:o=c;break;case`defaultValue`:s=c;break;case`multiple`:r=c;default:Id(e,t,a,c,n,null)}t=o,n=s,e.multiple=!!r,t==null?n!=null&&Ft(e,!!r,n,!0):Ft(e,!!r,t,!1);return;case`textarea`:for(s in Sd(`invalid`,e),o=a=r=null,n)if(n.hasOwnProperty(s)&&(c=n[s],c!=null))switch(s){case`value`:r=c;break;case`defaultValue`:a=c;break;case`children`:o=c;break;case`dangerouslySetInnerHTML`:if(c!=null)throw Error(i(91));break;default:Id(e,t,s,c,n,null)}Lt(e,r,a,o);return;case`option`:for(l in n)if(n.hasOwnProperty(l)&&(r=n[l],r!=null))switch(l){case`selected`:e.selected=r&&typeof r!=`function`&&typeof r!=`symbol`;break;default:Id(e,t,l,r,n,null)}return;case`dialog`:Sd(`beforetoggle`,e),Sd(`toggle`,e),Sd(`cancel`,e),Sd(`close`,e);break;case`iframe`:case`object`:Sd(`load`,e);break;case`video`:case`audio`:for(r=0;r<yd.length;r++)Sd(yd[r],e);break;case`image`:Sd(`error`,e),Sd(`load`,e);break;case`details`:Sd(`toggle`,e);break;case`embed`:case`source`:case`link`:Sd(`error`,e),Sd(`load`,e);case`area`:case`base`:case`br`:case`col`:case`hr`:case`keygen`:case`meta`:case`param`:case`track`:case`wbr`:case`menuitem`:for(u in n)if(n.hasOwnProperty(u)&&(r=n[u],r!=null))switch(u){case`children`:case`dangerouslySetInnerHTML`:throw Error(i(137,t));default:Id(e,t,u,r,n,null)}return;default:if(Ht(t)){for(d in n)n.hasOwnProperty(d)&&(r=n[d],r!==void 0&&Ld(e,t,d,r,n,void 0));return}}for(c in n)n.hasOwnProperty(c)&&(r=n[c],r!=null&&Id(e,t,c,r,n,null))}function Rd(e,t,n,r){switch(t){case`div`:case`span`:case`svg`:case`path`:case`a`:case`g`:case`p`:case`li`:break;case`input`:var a=null,o=null,s=null,c=null,l=null,u=null,d=null;for(m in n){var f=n[m];if(n.hasOwnProperty(m)&&f!=null)switch(m){case`checked`:break;case`value`:break;case`defaultValue`:l=f;default:r.hasOwnProperty(m)||Id(e,t,m,null,r,f)}}for(var p in r){var m=r[p];if(f=n[p],r.hasOwnProperty(p)&&(m!=null||f!=null))switch(p){case`type`:o=m;break;case`name`:a=m;break;case`checked`:u=m;break;case`defaultChecked`:d=m;break;case`value`:s=m;break;case`defaultValue`:c=m;break;case`children`:case`dangerouslySetInnerHTML`:if(m!=null)throw Error(i(137,t));break;default:m!==f&&Id(e,t,p,m,r,f)}}Mt(e,s,c,l,u,d,o,a);return;case`select`:for(o in m=s=c=p=null,n)if(l=n[o],n.hasOwnProperty(o)&&l!=null)switch(o){case`value`:break;case`multiple`:m=l;default:r.hasOwnProperty(o)||Id(e,t,o,null,r,l)}for(a in r)if(o=r[a],l=n[a],r.hasOwnProperty(a)&&(o!=null||l!=null))switch(a){case`value`:p=o;break;case`defaultValue`:c=o;break;case`multiple`:s=o;default:o!==l&&Id(e,t,a,o,r,l)}t=c,n=s,r=m,p==null?!!r!=!!n&&(t==null?Ft(e,!!n,n?[]:``,!1):Ft(e,!!n,t,!0)):Ft(e,!!n,p,!1);return;case`textarea`:for(c in m=p=null,n)if(a=n[c],n.hasOwnProperty(c)&&a!=null&&!r.hasOwnProperty(c))switch(c){case`value`:break;case`children`:break;default:Id(e,t,c,null,r,a)}for(s in r)if(a=r[s],o=n[s],r.hasOwnProperty(s)&&(a!=null||o!=null))switch(s){case`value`:p=a;break;case`defaultValue`:m=a;break;case`children`:break;case`dangerouslySetInnerHTML`:if(a!=null)throw Error(i(91));break;default:a!==o&&Id(e,t,s,a,r,o)}It(e,p,m);return;case`option`:for(var h in n)if(p=n[h],n.hasOwnProperty(h)&&p!=null&&!r.hasOwnProperty(h))switch(h){case`selected`:e.selected=!1;break;default:Id(e,t,h,null,r,p)}for(l in r)if(p=r[l],m=n[l],r.hasOwnProperty(l)&&p!==m&&(p!=null||m!=null))switch(l){case`selected`:e.selected=p&&typeof p!=`function`&&typeof p!=`symbol`;break;default:Id(e,t,l,p,r,m)}return;case`img`:case`link`:case`area`:case`base`:case`br`:case`col`:case`embed`:case`hr`:case`keygen`:case`meta`:case`param`:case`source`:case`track`:case`wbr`:case`menuitem`:for(var g in n)p=n[g],n.hasOwnProperty(g)&&p!=null&&!r.hasOwnProperty(g)&&Id(e,t,g,null,r,p);for(u in r)if(p=r[u],m=n[u],r.hasOwnProperty(u)&&p!==m&&(p!=null||m!=null))switch(u){case`children`:case`dangerouslySetInnerHTML`:if(p!=null)throw Error(i(137,t));break;default:Id(e,t,u,p,r,m)}return;default:if(Ht(t)){for(var _ in n)p=n[_],n.hasOwnProperty(_)&&p!==void 0&&!r.hasOwnProperty(_)&&Ld(e,t,_,void 0,r,p);for(d in r)p=r[d],m=n[d],!r.hasOwnProperty(d)||p===m||p===void 0&&m===void 0||Ld(e,t,d,p,r,m);return}}for(var v in n)p=n[v],n.hasOwnProperty(v)&&p!=null&&!r.hasOwnProperty(v)&&Id(e,t,v,null,r,p);for(f in r)p=r[f],m=n[f],!r.hasOwnProperty(f)||p===m||p==null&&m==null||Id(e,t,f,p,r,m)}function zd(e){switch(e){case`css`:case`script`:case`font`:case`img`:case`image`:case`input`:case`link`:return!0;default:return!1}}function Bd(){if(typeof performance.getEntriesByType==`function`){for(var e=0,t=0,n=performance.getEntriesByType(`resource`),r=0;r<n.length;r++){var i=n[r],a=i.transferSize,o=i.initiatorType,s=i.duration;if(a&&s&&zd(o)){for(o=0,s=i.responseEnd,r+=1;r<n.length;r++){var c=n[r],l=c.startTime;if(l>s)break;var u=c.transferSize,d=c.initiatorType;u&&zd(d)&&(c=c.responseEnd,o+=u*(c<s?1:(s-l)/(c-l)))}if(--r,t+=8*(a+o)/(i.duration/1e3),e++,10<e)break}}if(0<e)return t/e/1e6}return navigator.connection&&(e=navigator.connection.downlink,typeof e==`number`)?e:5}var Vd=null,Hd=null;function Ud(e){return e.nodeType===9?e:e.ownerDocument}function Wd(e){switch(e){case`http://www.w3.org/2000/svg`:return 1;case`http://www.w3.org/1998/Math/MathML`:return 2;default:return 0}}function Gd(e,t){if(e===0)switch(t){case`svg`:return 1;case`math`:return 2;default:return 0}return e===1&&t===`foreignObject`?0:e}function Kd(e,t){return e===`textarea`||e===`noscript`||typeof t.children==`string`||typeof t.children==`number`||typeof t.children==`bigint`||typeof t.dangerouslySetInnerHTML==`object`&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var qd=null;function Jd(){var e=window.event;return e&&e.type===`popstate`?e!==qd&&(qd=e,!0):(qd=null,!1)}var Yd=typeof setTimeout==`function`?setTimeout:void 0,Xd=typeof clearTimeout==`function`?clearTimeout:void 0,Zd=typeof Promise==`function`?Promise:void 0,Qd=typeof queueMicrotask==`function`?queueMicrotask:Zd===void 0?Yd:function(e){return Zd.resolve(null).then(e).catch($d)};function $d(e){setTimeout(function(){throw e})}function ef(e){return e===`head`}function tf(e,t){var n=t,r=0;do{var i=n.nextSibling;if(e.removeChild(n),i&&i.nodeType===8)if(n=i.data,n===`/$`||n===`/&`){if(r===0){e.removeChild(i),Ip(t);return}r--}else if(n===`$`||n===`$?`||n===`$~`||n===`$!`||n===`&`)r++;else if(n===`html`)gf(e.ownerDocument.documentElement);else if(n===`head`){n=e.ownerDocument.head,gf(n);for(var a=n.firstChild;a;){var o=a.nextSibling,s=a.nodeName;a[ot]||s===`SCRIPT`||s===`STYLE`||s===`LINK`&&a.rel.toLowerCase()===`stylesheet`||n.removeChild(a),a=o}}else n===`body`&&gf(e.ownerDocument.body);n=i}while(n);Ip(t)}function nf(e,t){var n=e;e=0;do{var r=n.nextSibling;if(n.nodeType===1?t?(n._stashedDisplay=n.style.display,n.style.display=`none`):(n.style.display=n._stashedDisplay||``,n.getAttribute(`style`)===``&&n.removeAttribute(`style`)):n.nodeType===3&&(t?(n._stashedText=n.nodeValue,n.nodeValue=``):n.nodeValue=n._stashedText||``),r&&r.nodeType===8)if(n=r.data,n===`/$`){if(e===0)break;e--}else n!==`$`&&n!==`$?`&&n!==`$~`&&n!==`$!`||e++;n=r}while(n)}function rf(e){var t=e.firstChild;for(t&&t.nodeType===10&&(t=t.nextSibling);t;){var n=t;switch(t=t.nextSibling,n.nodeName){case`HTML`:case`HEAD`:case`BODY`:rf(n),st(n);continue;case`SCRIPT`:case`STYLE`:continue;case`LINK`:if(n.rel.toLowerCase()===`stylesheet`)continue}e.removeChild(n)}}function af(e,t,n,r){for(;e.nodeType===1;){var i=n;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!r&&(e.nodeName!==`INPUT`||e.type!==`hidden`))break}else if(!r)if(t===`input`&&e.type===`hidden`){var a=i.name==null?null:``+i.name;if(i.type===`hidden`&&e.getAttribute(`name`)===a)return e}else return e;else if(!e[ot])switch(t){case`meta`:if(!e.hasAttribute(`itemprop`))break;return e;case`link`:if(a=e.getAttribute(`rel`),a===`stylesheet`&&e.hasAttribute(`data-precedence`)||a!==i.rel||e.getAttribute(`href`)!==(i.href==null||i.href===``?null:i.href)||e.getAttribute(`crossorigin`)!==(i.crossOrigin==null?null:i.crossOrigin)||e.getAttribute(`title`)!==(i.title==null?null:i.title))break;return e;case`style`:if(e.hasAttribute(`data-precedence`))break;return e;case`script`:if(a=e.getAttribute(`src`),(a!==(i.src==null?null:i.src)||e.getAttribute(`type`)!==(i.type==null?null:i.type)||e.getAttribute(`crossorigin`)!==(i.crossOrigin==null?null:i.crossOrigin))&&a&&e.hasAttribute(`async`)&&!e.hasAttribute(`itemprop`))break;return e;default:return e}if(e=df(e.nextSibling),e===null)break}return null}function of(e,t,n){if(t===``)return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!==`INPUT`||e.type!==`hidden`)&&!n||(e=df(e.nextSibling),e===null))return null;return e}function sf(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!==`INPUT`||e.type!==`hidden`)&&!t||(e=df(e.nextSibling),e===null))return null;return e}function cf(e){return e.data===`$?`||e.data===`$~`}function lf(e){return e.data===`$!`||e.data===`$?`&&e.ownerDocument.readyState!==`loading`}function uf(e,t){var n=e.ownerDocument;if(e.data===`$~`)e._reactRetry=t;else if(e.data!==`$?`||n.readyState!==`loading`)t();else{var r=function(){t(),n.removeEventListener(`DOMContentLoaded`,r)};n.addEventListener(`DOMContentLoaded`,r),e._reactRetry=r}}function df(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t===`$`||t===`$!`||t===`$?`||t===`$~`||t===`&`||t===`F!`||t===`F`)break;if(t===`/$`||t===`/&`)return null}}return e}var ff=null;function pf(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n===`/$`||n===`/&`){if(t===0)return df(e.nextSibling);t--}else n!==`$`&&n!==`$!`&&n!==`$?`&&n!==`$~`&&n!==`&`||t++}e=e.nextSibling}return null}function mf(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n===`$`||n===`$!`||n===`$?`||n===`$~`||n===`&`){if(t===0)return e;t--}else n!==`/$`&&n!==`/&`||t++}e=e.previousSibling}return null}function hf(e,t,n){switch(t=Ud(n),e){case`html`:if(e=t.documentElement,!e)throw Error(i(452));return e;case`head`:if(e=t.head,!e)throw Error(i(453));return e;case`body`:if(e=t.body,!e)throw Error(i(454));return e;default:throw Error(i(451))}}function gf(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);st(e)}var _f=new Map,vf=new Set;function yf(e){return typeof e.getRootNode==`function`?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var bf=F.d;F.d={f:xf,r:Sf,D:Tf,C:Ef,L:Df,m:Of,X:Af,S:kf,M:jf};function xf(){var e=bf.f(),t=xu();return e||t}function Sf(e){var t=lt(e);t!==null&&t.tag===5&&t.type===`form`?bs(t):bf.r(e)}var Cf=typeof document>`u`?null:document;function wf(e,t,n){var r=Cf;if(r&&typeof t==`string`&&t){var i=jt(t);i=`link[rel="`+e+`"][href="`+i+`"]`,typeof n==`string`&&(i+=`[crossorigin="`+n+`"]`),vf.has(i)||(vf.add(i),e={rel:e,crossOrigin:n,href:t},r.querySelector(i)===null&&(t=r.createElement(`link`),Y(t,`link`,e),ft(t),r.head.appendChild(t)))}}function Tf(e){bf.D(e),wf(`dns-prefetch`,e,null)}function Ef(e,t){bf.C(e,t),wf(`preconnect`,e,t)}function Df(e,t,n){bf.L(e,t,n);var r=Cf;if(r&&e&&t){var i=`link[rel="preload"][as="`+jt(t)+`"]`;t===`image`&&n&&n.imageSrcSet?(i+=`[imagesrcset="`+jt(n.imageSrcSet)+`"]`,typeof n.imageSizes==`string`&&(i+=`[imagesizes="`+jt(n.imageSizes)+`"]`)):i+=`[href="`+jt(e)+`"]`;var a=i;switch(t){case`style`:a=Nf(e);break;case`script`:a=Lf(e)}_f.has(a)||(e=f({rel:`preload`,href:t===`image`&&n&&n.imageSrcSet?void 0:e,as:t},n),_f.set(a,e),r.querySelector(i)!==null||t===`style`&&r.querySelector(Pf(a))||t===`script`&&r.querySelector(Rf(a))||(t=r.createElement(`link`),Y(t,`link`,e),ft(t),r.head.appendChild(t)))}}function Of(e,t){bf.m(e,t);var n=Cf;if(n&&e){var r=t&&typeof t.as==`string`?t.as:`script`,i=`link[rel="modulepreload"][as="`+jt(r)+`"][href="`+jt(e)+`"]`,a=i;switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:a=Lf(e)}if(!_f.has(a)&&(e=f({rel:`modulepreload`,href:e},t),_f.set(a,e),n.querySelector(i)===null)){switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:if(n.querySelector(Rf(a)))return}r=n.createElement(`link`),Y(r,`link`,e),ft(r),n.head.appendChild(r)}}}function kf(e,t,n){bf.S(e,t,n);var r=Cf;if(r&&e){var i=dt(r).hoistableStyles,a=Nf(e);t||=`default`;var o=i.get(a);if(!o){var s={loading:0,preload:null};if(o=r.querySelector(Pf(a)))s.loading=5;else{e=f({rel:`stylesheet`,href:e,"data-precedence":t},n),(n=_f.get(a))&&Vf(e,n);var c=o=r.createElement(`link`);ft(c),Y(c,`link`,e),c._p=new Promise(function(e,t){c.onload=e,c.onerror=t}),c.addEventListener(`load`,function(){s.loading|=1}),c.addEventListener(`error`,function(){s.loading|=2}),s.loading|=4,Bf(o,t,r)}o={type:`stylesheet`,instance:o,count:1,state:s},i.set(a,o)}}}function Af(e,t){bf.X(e,t);var n=Cf;if(n&&e){var r=dt(n).hoistableScripts,i=Lf(e),a=r.get(i);a||(a=n.querySelector(Rf(i)),a||(e=f({src:e,async:!0},t),(t=_f.get(i))&&Hf(e,t),a=n.createElement(`script`),ft(a),Y(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function jf(e,t){bf.M(e,t);var n=Cf;if(n&&e){var r=dt(n).hoistableScripts,i=Lf(e),a=r.get(i);a||(a=n.querySelector(Rf(i)),a||(e=f({src:e,async:!0,type:`module`},t),(t=_f.get(i))&&Hf(e,t),a=n.createElement(`script`),ft(a),Y(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function Mf(e,t,n,r){var a=(a=te.current)?yf(a):null;if(!a)throw Error(i(446));switch(e){case`meta`:case`title`:return null;case`style`:return typeof n.precedence==`string`&&typeof n.href==`string`?(t=Nf(n.href),n=dt(a).hoistableStyles,r=n.get(t),r||(r={type:`style`,instance:null,count:0,state:null},n.set(t,r)),r):{type:`void`,instance:null,count:0,state:null};case`link`:if(n.rel===`stylesheet`&&typeof n.href==`string`&&typeof n.precedence==`string`){e=Nf(n.href);var o=dt(a).hoistableStyles,s=o.get(e);if(s||(a=a.ownerDocument||a,s={type:`stylesheet`,instance:null,count:0,state:{loading:0,preload:null}},o.set(e,s),(o=a.querySelector(Pf(e)))&&!o._p&&(s.instance=o,s.state.loading=5),_f.has(e)||(n={rel:`preload`,as:`style`,href:n.href,crossOrigin:n.crossOrigin,integrity:n.integrity,media:n.media,hrefLang:n.hrefLang,referrerPolicy:n.referrerPolicy},_f.set(e,n),o||If(a,e,n,s.state))),t&&r===null)throw Error(i(528,``));return s}if(t&&r!==null)throw Error(i(529,``));return null;case`script`:return t=n.async,n=n.src,typeof n==`string`&&t&&typeof t!=`function`&&typeof t!=`symbol`?(t=Lf(n),n=dt(a).hoistableScripts,r=n.get(t),r||(r={type:`script`,instance:null,count:0,state:null},n.set(t,r)),r):{type:`void`,instance:null,count:0,state:null};default:throw Error(i(444,e))}}function Nf(e){return`href="`+jt(e)+`"`}function Pf(e){return`link[rel="stylesheet"][`+e+`]`}function Ff(e){return f({},e,{"data-precedence":e.precedence,precedence:null})}function If(e,t,n,r){e.querySelector(`link[rel="preload"][as="style"][`+t+`]`)?r.loading=1:(t=e.createElement(`link`),r.preload=t,t.addEventListener(`load`,function(){return r.loading|=1}),t.addEventListener(`error`,function(){return r.loading|=2}),Y(t,`link`,n),ft(t),e.head.appendChild(t))}function Lf(e){return`[src="`+jt(e)+`"]`}function Rf(e){return`script[async]`+e}function zf(e,t,n){if(t.count++,t.instance===null)switch(t.type){case`style`:var r=e.querySelector(`style[data-href~="`+jt(n.href)+`"]`);if(r)return t.instance=r,ft(r),r;var a=f({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return r=(e.ownerDocument||e).createElement(`style`),ft(r),Y(r,`style`,a),Bf(r,n.precedence,e),t.instance=r;case`stylesheet`:a=Nf(n.href);var o=e.querySelector(Pf(a));if(o)return t.state.loading|=4,t.instance=o,ft(o),o;r=Ff(n),(a=_f.get(a))&&Vf(r,a),o=(e.ownerDocument||e).createElement(`link`),ft(o);var s=o;return s._p=new Promise(function(e,t){s.onload=e,s.onerror=t}),Y(o,`link`,r),t.state.loading|=4,Bf(o,n.precedence,e),t.instance=o;case`script`:return o=Lf(n.src),(a=e.querySelector(Rf(o)))?(t.instance=a,ft(a),a):(r=n,(a=_f.get(o))&&(r=f({},n),Hf(r,a)),e=e.ownerDocument||e,a=e.createElement(`script`),ft(a),Y(a,`link`,r),e.head.appendChild(a),t.instance=a);case`void`:return null;default:throw Error(i(443,t.type))}else t.type===`stylesheet`&&!(t.state.loading&4)&&(r=t.instance,t.state.loading|=4,Bf(r,n.precedence,e));return t.instance}function Bf(e,t,n){for(var r=n.querySelectorAll(`link[rel="stylesheet"][data-precedence],style[data-precedence]`),i=r.length?r[r.length-1]:null,a=i,o=0;o<r.length;o++){var s=r[o];if(s.dataset.precedence===t)a=s;else if(a!==i)break}a?a.parentNode.insertBefore(e,a.nextSibling):(t=n.nodeType===9?n.head:n,t.insertBefore(e,t.firstChild))}function Vf(e,t){e.crossOrigin??=t.crossOrigin,e.referrerPolicy??=t.referrerPolicy,e.title??=t.title}function Hf(e,t){e.crossOrigin??=t.crossOrigin,e.referrerPolicy??=t.referrerPolicy,e.integrity??=t.integrity}var Uf=null;function Wf(e,t,n){if(Uf===null){var r=new Map,i=Uf=new Map;i.set(n,r)}else i=Uf,r=i.get(n),r||(r=new Map,i.set(n,r));if(r.has(e))return r;for(r.set(e,null),n=n.getElementsByTagName(e),i=0;i<n.length;i++){var a=n[i];if(!(a[ot]||a[$e]||e===`link`&&a.getAttribute(`rel`)===`stylesheet`)&&a.namespaceURI!==`http://www.w3.org/2000/svg`){var o=a.getAttribute(t)||``;o=e+o;var s=r.get(o);s?s.push(a):r.set(o,[a])}}return r}function Gf(e,t,n){e=e.ownerDocument||e,e.head.insertBefore(n,t===`title`?e.querySelector(`head > title`):null)}function Kf(e,t,n){if(n===1||t.itemProp!=null)return!1;switch(e){case`meta`:case`title`:return!0;case`style`:if(typeof t.precedence!=`string`||typeof t.href!=`string`||t.href===``)break;return!0;case`link`:if(typeof t.rel!=`string`||typeof t.href!=`string`||t.href===``||t.onLoad||t.onError)break;switch(t.rel){case`stylesheet`:return e=t.disabled,typeof t.precedence==`string`&&e==null;default:return!0}case`script`:if(t.async&&typeof t.async!=`function`&&typeof t.async!=`symbol`&&!t.onLoad&&!t.onError&&t.src&&typeof t.src==`string`)return!0}return!1}function qf(e){return!(e.type===`stylesheet`&&!(e.state.loading&3))}function Jf(e,t,n,r){if(n.type===`stylesheet`&&(typeof r.media!=`string`||!1!==matchMedia(r.media).matches)&&!(n.state.loading&4)){if(n.instance===null){var i=Nf(r.href),a=t.querySelector(Pf(i));if(a){t=a._p,typeof t==`object`&&t&&typeof t.then==`function`&&(e.count++,e=Zf.bind(e),t.then(e,e)),n.state.loading|=4,n.instance=a,ft(a);return}a=t.ownerDocument||t,r=Ff(r),(i=_f.get(i))&&Vf(r,i),a=a.createElement(`link`),ft(a);var o=a;o._p=new Promise(function(e,t){o.onload=e,o.onerror=t}),Y(a,`link`,r),n.instance=a}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(n,t),(t=n.state.preload)&&!(n.state.loading&3)&&(e.count++,n=Zf.bind(e),t.addEventListener(`load`,n),t.addEventListener(`error`,n))}}var Yf=0;function Xf(e,t){return e.stylesheets&&e.count===0&&$f(e,e.stylesheets),0<e.count||0<e.imgCount?function(n){var r=setTimeout(function(){if(e.stylesheets&&$f(e,e.stylesheets),e.unsuspend){var t=e.unsuspend;e.unsuspend=null,t()}},6e4+t);0<e.imgBytes&&Yf===0&&(Yf=62500*Bd());var i=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&$f(e,e.stylesheets),e.unsuspend)){var t=e.unsuspend;e.unsuspend=null,t()}},(e.imgBytes>Yf?50:800)+t);return e.unsuspend=n,function(){e.unsuspend=null,clearTimeout(r),clearTimeout(i)}}:null}function Zf(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)$f(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var Qf=null;function $f(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,Qf=new Map,t.forEach(ep,e),Qf=null,Zf.call(e))}function ep(e,t){if(!(t.state.loading&4)){var n=Qf.get(e);if(n)var r=n.get(null);else{n=new Map,Qf.set(e,n);for(var i=e.querySelectorAll(`link[data-precedence],style[data-precedence]`),a=0;a<i.length;a++){var o=i[a];(o.nodeName===`LINK`||o.getAttribute(`media`)!==`not all`)&&(n.set(o.dataset.precedence,o),r=o)}r&&n.set(null,r)}i=t.instance,o=i.getAttribute(`data-precedence`),a=n.get(o)||r,a===r&&n.set(null,i),n.set(o,i),this.count++,r=Zf.bind(this),i.addEventListener(`load`,r),i.addEventListener(`error`,r),a?a.parentNode.insertBefore(i,a.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(i,e.firstChild)),t.state.loading|=4}}var tp={$$typeof:b,Provider:null,Consumer:null,_currentValue:I,_currentValue2:I,_threadCount:0};function np(e,t,n,r,i,a,o,s,c){this.tag=1,this.containerInfo=e,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=Ve(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Ve(0),this.hiddenUpdates=Ve(null),this.identifierPrefix=r,this.onUncaughtError=i,this.onCaughtError=a,this.onRecoverableError=o,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=c,this.incompleteTransitions=new Map}function rp(e,t,n,r,i,a,o,s,c,l,u,d){return e=new np(e,t,n,o,c,l,u,d,s),t=1,!0===a&&(t|=24),a=Zr(3,null,null,t),e.current=a,a.stateNode=e,t=Qi(),t.refCount++,e.pooledCache=t,t.refCount++,a.memoizedState={element:r,isDehydrated:n,cache:t},ja(a),e}function ip(e){return e?(e=Yr,e):Yr}function ap(e,t,n,r,i,a){i=ip(i),r.context===null?r.context=i:r.pendingContext=i,r=Na(t),r.payload={element:n},a=a===void 0?null:a,a!==null&&(r.callback=a),n=Pa(e,r,t),n!==null&&(gu(n,e,t),Fa(n,e,t))}function op(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function sp(e,t){op(e,t),(e=e.alternate)&&op(e,t)}function cp(e){if(e.tag===13||e.tag===31){var t=Kr(e,67108864);t!==null&&gu(t,e,67108864),sp(e,67108864)}}function lp(e){if(e.tag===13||e.tag===31){var t=mu();t=qe(t);var n=Kr(e,t);n!==null&&gu(n,e,t),sp(e,t)}}var up=!0;function dp(e,t,n,r){var i=P.T;P.T=null;var a=F.p;try{F.p=2,pp(e,t,n,r)}finally{F.p=a,P.T=i}}function fp(e,t,n,r){var i=P.T;P.T=null;var a=F.p;try{F.p=8,pp(e,t,n,r)}finally{F.p=a,P.T=i}}function pp(e,t,n,r){if(up){var i=mp(r);if(i===null)Dd(e,t,r,hp,n),Ep(e,r);else if(Op(i,e,t,n,r))r.stopPropagation();else if(Ep(e,r),t&4&&-1<Tp.indexOf(e)){for(;i!==null;){var a=lt(i);if(a!==null)switch(a.tag){case 3:if(a=a.stateNode,a.current.memoizedState.isDehydrated){var o=Ie(a.pendingLanes);if(o!==0){var s=a;for(s.pendingLanes|=2,s.entangledLanes|=2;o;){var c=1<<31-ke(o);s.entanglements[1]|=c,o&=~c}ad(a),!(Fl&6)&&(nu=_e()+500,od(0,!1))}}break;case 31:case 13:s=Kr(a,2),s!==null&&gu(s,a,2),xu(),sp(a,2)}if(a=mp(r),a===null&&Dd(e,t,r,hp,n),a===i)break;i=a}i!==null&&r.stopPropagation()}else Dd(e,t,r,null,n)}}function mp(e){return e=Jt(e),gp(e)}var hp=null;function gp(e){if(hp=null,e=ct(e),e!==null){var t=o(e);if(t===null)e=null;else{var n=t.tag;if(n===13){if(e=s(t),e!==null)return e;e=null}else if(n===31){if(e=c(t),e!==null)return e;e=null}else if(n===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return hp=e,null}function _p(e){switch(e){case`beforetoggle`:case`cancel`:case`click`:case`close`:case`contextmenu`:case`copy`:case`cut`:case`auxclick`:case`dblclick`:case`dragend`:case`dragstart`:case`drop`:case`focusin`:case`focusout`:case`input`:case`invalid`:case`keydown`:case`keypress`:case`keyup`:case`mousedown`:case`mouseup`:case`paste`:case`pause`:case`play`:case`pointercancel`:case`pointerdown`:case`pointerup`:case`ratechange`:case`reset`:case`resize`:case`seeked`:case`submit`:case`toggle`:case`touchcancel`:case`touchend`:case`touchstart`:case`volumechange`:case`change`:case`selectionchange`:case`textInput`:case`compositionstart`:case`compositionend`:case`compositionupdate`:case`beforeblur`:case`afterblur`:case`beforeinput`:case`blur`:case`fullscreenchange`:case`focus`:case`hashchange`:case`popstate`:case`select`:case`selectstart`:return 2;case`drag`:case`dragenter`:case`dragexit`:case`dragleave`:case`dragover`:case`mousemove`:case`mouseout`:case`mouseover`:case`pointermove`:case`pointerout`:case`pointerover`:case`scroll`:case`touchmove`:case`wheel`:case`mouseenter`:case`mouseleave`:case`pointerenter`:case`pointerleave`:return 8;case`message`:switch(ve()){case ye:return 2;case be:return 8;case xe:case Se:return 32;case Ce:return 268435456;default:return 32}default:return 32}}var vp=!1,yp=null,bp=null,xp=null,Sp=new Map,Cp=new Map,wp=[],Tp=`mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset`.split(` `);function Ep(e,t){switch(e){case`focusin`:case`focusout`:yp=null;break;case`dragenter`:case`dragleave`:bp=null;break;case`mouseover`:case`mouseout`:xp=null;break;case`pointerover`:case`pointerout`:Sp.delete(t.pointerId);break;case`gotpointercapture`:case`lostpointercapture`:Cp.delete(t.pointerId)}}function Dp(e,t,n,r,i,a){return e===null||e.nativeEvent!==a?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:a,targetContainers:[i]},t!==null&&(t=lt(t),t!==null&&cp(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,i!==null&&t.indexOf(i)===-1&&t.push(i),e)}function Op(e,t,n,r,i){switch(t){case`focusin`:return yp=Dp(yp,e,t,n,r,i),!0;case`dragenter`:return bp=Dp(bp,e,t,n,r,i),!0;case`mouseover`:return xp=Dp(xp,e,t,n,r,i),!0;case`pointerover`:var a=i.pointerId;return Sp.set(a,Dp(Sp.get(a)||null,e,t,n,r,i)),!0;case`gotpointercapture`:return a=i.pointerId,Cp.set(a,Dp(Cp.get(a)||null,e,t,n,r,i)),!0}return!1}function kp(e){var t=ct(e.target);if(t!==null){var n=o(t);if(n!==null){if(t=n.tag,t===13){if(t=s(n),t!==null){e.blockedOn=t,Ze(e.priority,function(){lp(n)});return}}else if(t===31){if(t=c(n),t!==null){e.blockedOn=t,Ze(e.priority,function(){lp(n)});return}}else if(t===3&&n.stateNode.current.memoizedState.isDehydrated){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Ap(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=mp(e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);qt=r,n.target.dispatchEvent(r),qt=null}else return t=lt(n),t!==null&&cp(t),e.blockedOn=n,!1;t.shift()}return!0}function jp(e,t,n){Ap(e)&&n.delete(t)}function Mp(){vp=!1,yp!==null&&Ap(yp)&&(yp=null),bp!==null&&Ap(bp)&&(bp=null),xp!==null&&Ap(xp)&&(xp=null),Sp.forEach(jp),Cp.forEach(jp)}function Np(e,n){e.blockedOn===n&&(e.blockedOn=null,vp||(vp=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,Mp)))}var Pp=null;function Fp(e){Pp!==e&&(Pp=e,t.unstable_scheduleCallback(t.unstable_NormalPriority,function(){Pp===e&&(Pp=null);for(var t=0;t<e.length;t+=3){var n=e[t],r=e[t+1],i=e[t+2];if(typeof r!=`function`){if(gp(r||n)===null)continue;break}var a=lt(n);a!==null&&(e.splice(t,3),t-=3,vs(a,{pending:!0,data:i,method:n.method,action:r},r,i))}}))}function Ip(e){function t(t){return Np(t,e)}yp!==null&&Np(yp,e),bp!==null&&Np(bp,e),xp!==null&&Np(xp,e),Sp.forEach(t),Cp.forEach(t);for(var n=0;n<wp.length;n++){var r=wp[n];r.blockedOn===e&&(r.blockedOn=null)}for(;0<wp.length&&(n=wp[0],n.blockedOn===null);)kp(n),n.blockedOn===null&&wp.shift();if(n=(e.ownerDocument||e).$$reactFormReplay,n!=null)for(r=0;r<n.length;r+=3){var i=n[r],a=n[r+1],o=i[et]||null;if(typeof a==`function`)o||Fp(n);else if(o){var s=null;if(a&&a.hasAttribute(`formAction`)){if(i=a,o=a[et]||null)s=o.formAction;else if(gp(i)!==null)continue}else s=o.action;typeof s==`function`?n[r+1]=s:(n.splice(r,3),r-=3),Fp(n)}}}function Lp(){function e(e){e.canIntercept&&e.info===`react-transition`&&e.intercept({handler:function(){return new Promise(function(e){return i=e})},focusReset:`manual`,scroll:`manual`})}function t(){i!==null&&(i(),i=null),r||setTimeout(n,20)}function n(){if(!r&&!navigation.transition){var e=navigation.currentEntry;e&&e.url!=null&&navigation.navigate(e.url,{state:e.getState(),info:`react-transition`,history:`replace`})}}if(typeof navigation==`object`){var r=!1,i=null;return navigation.addEventListener(`navigate`,e),navigation.addEventListener(`navigatesuccess`,t),navigation.addEventListener(`navigateerror`,t),setTimeout(n,100),function(){r=!0,navigation.removeEventListener(`navigate`,e),navigation.removeEventListener(`navigatesuccess`,t),navigation.removeEventListener(`navigateerror`,t),i!==null&&(i(),i=null)}}}function Rp(e){this._internalRoot=e}zp.prototype.render=Rp.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(i(409));var n=t.current;ap(n,mu(),e,t,null,null)},zp.prototype.unmount=Rp.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;ap(e.current,2,null,e,null,null),xu(),t[tt]=null}};function zp(e){this._internalRoot=e}zp.prototype.unstable_scheduleHydration=function(e){if(e){var t=Xe();e={blockedOn:null,target:e,priority:t};for(var n=0;n<wp.length&&t!==0&&t<wp[n].priority;n++);wp.splice(n,0,e),n===0&&kp(e)}};var Bp=n.version;if(Bp!==`19.2.8`)throw Error(i(527,Bp,`19.2.8`));F.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render==`function`?Error(i(188)):(e=Object.keys(e).join(`,`),Error(i(268,e)));return e=u(t),e=e===null?null:d(e),e=e===null?null:e.stateNode,e};var Vp={bundleType:0,version:`19.2.8`,rendererPackageName:`react-dom`,currentDispatcherRef:P,reconcilerVersion:`19.2.8`};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<`u`){var Hp=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Hp.isDisabled&&Hp.supportsFiber)try{Ee=Hp.inject(Vp),De=Hp}catch{}}e.createRoot=function(e,t){if(!a(e))throw Error(i(299));var n=!1,r=``,o=Vs,s=Hs,c=Us;return t!=null&&(!0===t.unstable_strictMode&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onUncaughtError!==void 0&&(o=t.onUncaughtError),t.onCaughtError!==void 0&&(s=t.onCaughtError),t.onRecoverableError!==void 0&&(c=t.onRecoverableError)),t=rp(e,1,!1,null,null,n,r,null,o,s,c,Lp),e[tt]=t.current,Td(e),new Rp(t)}})),lb=o(((e,t)=>{function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>`u`||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!=`function`))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}n(),t.exports=cb()})),ub=`modulepreload`,db=function(e){return`/app/`+e},fb={},pb=function(e,t,n){let r=Promise.resolve();if(t&&t.length>0){let e=document.getElementsByTagName(`link`),i=document.querySelector(`meta[property=csp-nonce]`),a=i?.nonce||i?.getAttribute(`nonce`);function o(e){return Promise.all(e.map(e=>Promise.resolve(e).then(e=>({status:`fulfilled`,value:e}),e=>({status:`rejected`,reason:e}))))}function s(e){return import.meta.resolve?import.meta.resolve(e):new URL(e,import.meta.url).href}r=o(t.map(t=>{if(t=db(t,n),t=s(t),t in fb)return;fb[t]=!0;let r=t.endsWith(`.css`);for(let n=e.length-1;n>=0;n--){let i=e[n];if(i.href===t&&(!r||i.rel===`stylesheet`))return}let i=document.createElement(`link`);if(i.rel=r?`stylesheet`:ub,r||(i.as=`script`),i.crossOrigin=``,i.href=t,a&&i.setAttribute(`nonce`,a),document.head.appendChild(i),r)return new Promise((e,n)=>{i.addEventListener(`load`,e),i.addEventListener(`error`,()=>n(Error(`Unable to preload CSS for ${t}`)))})}))}function i(e){let t=new Event(`vite:preloadError`,{cancelable:!0});if(t.payload=e,window.dispatchEvent(t),!t.defaultPrevented)throw e}return r.then(t=>{for(let e of t||[])e.status===`rejected`&&i(e.reason);return e().catch(i)})},mb=/^(?:[a-z][a-z0-9+.-]*:|[\\/]{2})/i,hb=/^[\\/]{2}/;function gb(e,t){return t+e.replace(/\\/g,`/`)}var _b=`popstate`;function vb(e){return typeof e==`object`&&!!e&&`pathname`in e&&`search`in e&&`hash`in e&&`state`in e&&`key`in e}function yb(e={}){function t(e,t){let n=t.state?.masked,{pathname:r,search:i,hash:a}=n||e.location;return wb(``,{pathname:r,search:i,hash:a},t.state&&t.state.usr||null,t.state&&t.state.key||`default`,n?{pathname:e.location.pathname,search:e.location.search,hash:e.location.hash}:void 0)}function n(e,t){return typeof t==`string`?t:Tb(t)}return Db(t,n,null,e)}function bb(e,t){if(e===!1||e==null)throw Error(t)}function xb(e,t){if(!e){typeof console<`u`&&console.warn(t);try{throw Error(t)}catch{}}}function Sb(){return Math.random().toString(36).substring(2,10)}function Cb(e,t){return{usr:e.state,key:e.key,idx:t,masked:e.mask?{pathname:e.pathname,search:e.search,hash:e.hash}:void 0}}function wb(e,t,n=null,r,i){return{pathname:typeof e==`string`?e:e.pathname,search:``,hash:``,...typeof t==`string`?Eb(t):t,state:n,key:t&&t.key||r||Sb(),mask:i}}function Tb({pathname:e=`/`,search:t=``,hash:n=``}){return t&&t!==`?`&&(e+=t.charAt(0)===`?`?t:`?`+t),n&&n!==`#`&&(e+=n.charAt(0)===`#`?n:`#`+n),e}function Eb(e){let t={};if(e){let n=e.indexOf(`#`);n>=0&&(t.hash=e.substring(n),e=e.substring(0,n));let r=e.indexOf(`?`);r>=0&&(t.search=e.substring(r),e=e.substring(0,r)),e&&(t.pathname=e)}return t}function Db(e,t,n,r={}){let{window:i=document.defaultView,v5Compat:a=!1}=r,o=i.history,s=`POP`,c=null,l=u();l??(l=0,o.replaceState({...o.state,idx:l},``));function u(){return(o.state||{idx:null}).idx}function d(){s=`POP`;let e=u(),t=e==null?null:e-l;l=e,c&&c({action:s,location:h.location,delta:t})}function f(e,t){s=`PUSH`;let r=vb(e)?e:wb(h.location,e,t);n&&n(r,e),l=u()+1;let d=Cb(r,l),f=h.createHref(r.mask||r);try{o.pushState(d,``,f)}catch(e){if(e instanceof DOMException&&e.name===`DataCloneError`)throw e;i.location.assign(f)}a&&c&&c({action:s,location:h.location,delta:1})}function p(e,t){s=`REPLACE`;let r=vb(e)?e:wb(h.location,e,t);n&&n(r,e),l=u();let i=Cb(r,l),d=h.createHref(r.mask||r);o.replaceState(i,``,d),a&&c&&c({action:s,location:h.location,delta:0})}function m(e){return Ob(i,e)}let h={get action(){return s},get location(){return e(i,o)},listen(e){if(c)throw Error(`A history only accepts one active listener`);return i.addEventListener(_b,d),c=e,()=>{i.removeEventListener(_b,d),c=null}},createHref(e){return t(i,e)},createURL:m,encodeLocation(e){let t=m(e);return{pathname:t.pathname,search:t.search,hash:t.hash}},push:f,replace:p,go(e){return o.go(e)}};return h}function Ob(e,t,n=!1){let r=`http://localhost`;e&&(r=e.location.origin===`null`?e.location.href:e.location.origin),bb(r,`No window.location.(origin|href) available to create URL`);let i=typeof t==`string`?t:Tb(t);return i=i.replace(/ $/,`%20`),!n&&hb.test(i)&&(i=r+i),new URL(i,r)}function kb(e,t,n=`/`){return Ab(e,t,n,!1)}function Ab(e,t,n,r,i){let a=Yb((typeof t==`string`?Eb(t):t).pathname||`/`,n);if(a==null)return null;let o=i??jb(e),s=null,c=Jb(a);for(let e=0;s==null&&e<o.length;++e)s=Wb(o[e],c,r);return s}function jb(e){let t=Mb(e);return Pb(t),t}function Mb(e,t=[],n=[],r=``,i=!1){let a=(e,a,o=i,s)=>{let c={relativePath:s===void 0?e.path||``:s,caseSensitive:e.caseSensitive===!0,childrenIndex:a,route:e};if(c.relativePath.startsWith(`/`)){if(!c.relativePath.startsWith(r)&&o)return;bb(c.relativePath.startsWith(r),`Absolute route path "${c.relativePath}" nested under path "${r}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),c.relativePath=c.relativePath.slice(r.length)}let l=rx([r,c.relativePath]),u=n.concat(c);e.children&&e.children.length>0&&(bb(e.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${l}".`),Mb(e.children,t,u,l,o)),!(e.path==null&&!e.index)&&t.push({path:l,score:Hb(l,e.index),routesMeta:u.map((e,t)=>{let[n,r]=qb(e.relativePath,e.caseSensitive,t===u.length-1);return{...e,matcher:n,compiledParams:r}})})};return e.forEach((e,t)=>{if(e.path===``||!e.path?.includes(`?`))a(e,t);else for(let n of Nb(e.path))a(e,t,!0,n)}),t}function Nb(e){let t=e.split(`/`);if(t.length===0)return[];let[n,...r]=t,i=n.endsWith(`?`),a=n.replace(/\?$/,``);if(r.length===0)return i?[a,``]:[a];let o=Nb(r.join(`/`)),s=[];return s.push(...o.map(e=>e===``?a:[a,e].join(`/`))),i&&s.push(...o),s.map(t=>e.startsWith(`/`)&&t===``?`/`:t)}function Pb(e){e.sort((e,t)=>e.score===t.score?Ub(e.routesMeta.map(e=>e.childrenIndex),t.routesMeta.map(e=>e.childrenIndex)):t.score-e.score)}var Fb=/^:[\w-]+$/,Ib=3,Lb=2,Rb=1,zb=10,Bb=-2,Vb=e=>e===`*`;function Hb(e,t){let n=e.split(`/`),r=n.length;return n.some(Vb)&&(r+=Bb),t&&(r+=Lb),n.filter(e=>!Vb(e)).reduce((e,t)=>e+(Fb.test(t)?Ib:t===``?Rb:zb),r)}function Ub(e,t){return e.length===t.length&&e.slice(0,-1).every((e,n)=>e===t[n])?e[e.length-1]-t[t.length-1]:0}function Wb(e,t,n=!1){let{routesMeta:r}=e,i={},a=`/`,o=[];for(let e=0;e<r.length;++e){let s=r[e],c=e===r.length-1,l=a===`/`?t:t.slice(a.length)||`/`,u={path:s.relativePath,caseSensitive:s.caseSensitive,end:c},d=s.matcher&&s.compiledParams?Kb(u,l,s.matcher,s.compiledParams):Gb(u,l),f=s.route;if(!d&&c&&n&&!r[r.length-1].route.index&&(d=Gb({path:s.relativePath,caseSensitive:s.caseSensitive,end:!1},l)),!d)return null;Object.assign(i,d.params),o.push({params:i,pathname:rx([a,d.pathname]),pathnameBase:ax(rx([a,d.pathnameBase])),route:f}),d.pathnameBase!==`/`&&(a=rx([a,d.pathnameBase]))}return o}function Gb(e,t){typeof e==`string`&&(e={path:e,caseSensitive:!1,end:!0});let[n,r]=qb(e.path,e.caseSensitive,e.end);return Kb(e,t,n,r)}function Kb(e,t,n,r){let i=t.match(n);if(!i)return null;let a=i[0],o=a.replace(/(.)\/+$/,`$1`),s=i.slice(1);return{params:r.reduce((e,{paramName:t,isOptional:n},r)=>{if(t===`*`){let e=s[r]||``;o=a.slice(0,a.length-e.length).replace(/(.)\/+$/,`$1`)}let i=s[r];return e[t]=n&&!i?void 0:(i||``).replace(/%2F/g,`/`),e},{}),pathname:a,pathnameBase:o,pattern:e}}function qb(e,t=!1,n=!0){xb(e===`*`||!e.endsWith(`*`)||e.endsWith(`/*`),`Route path "${e}" will be treated as if it were "${e.replace(/\*$/,`/*`)}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${e.replace(/\*$/,`/*`)}".`);let r=[],i=`^`+e.replace(/\/*\*?$/,``).replace(/^\/*/,`/`).replace(/[\\.*+^${}|()[\]]/g,`\\$&`).replace(/\/:([\w-]+)(\?)?/g,(e,t,n,i,a)=>{if(r.push({paramName:t,isOptional:n!=null}),n){let t=a.charAt(i+e.length);return t&&t!==`/`?`/([^\\/]*)`:`(?:/([^\\/]*))?`}return`/([^\\/]+)`}).replace(/\/([\w-]+)\?(\/|$)/g,`(/$1)?$2`);return e.endsWith(`*`)?(r.push({paramName:`*`}),i+=e===`*`||e===`/*`?`(.*)$`:`(?:\\/(.+)|\\/*)$`):n?i+=`\\/*$`:e!==``&&e!==`/`&&(i+=`(?:(?=\\/|$))`),[new RegExp(i,t?void 0:`i`),r]}function Jb(e){try{return e.split(`/`).map(e=>decodeURIComponent(e).replace(/\//g,`%2F`)).join(`/`)}catch(t){return xb(!1,`The URL path "${e}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${t}).`),e}}function Yb(e,t){if(t===`/`)return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith(`/`)?t.length-1:t.length,r=e.charAt(n);return r&&r!==`/`?null:e.slice(n)||`/`}function Xb(e,t=`/`){let{pathname:n,search:r=``,hash:i=``}=typeof e==`string`?Eb(e):e,a;return n?(n=nx(n),a=n.startsWith(`/`)?Zb(n.substring(1),`/`):Zb(n,t)):a=t,{pathname:a,search:ox(r),hash:sx(i)}}function Zb(e,t){let n=ix(t).split(`/`);return e.split(`/`).forEach(e=>{e===`..`?n.length>1&&n.pop():e!==`.`&&n.push(e)}),n.length>1?n.join(`/`):`/`}function Qb(e,t,n,r){return`Cannot include a '${e}' character in a manually specified \`to.${t}\` field [${JSON.stringify(r)}]. Please separate it out to the \`to.${n}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function $b(e){return e.filter((e,t)=>t===0||e.route.path&&e.route.path.length>0)}function ex(e){let t=$b(e);return t.map((e,n)=>n===t.length-1?e.pathname:e.pathnameBase)}function tx(e,t,n,r=!1){let i;typeof e==`string`?i=Eb(e):(i={...e},bb(!i.pathname||!i.pathname.includes(`?`),Qb(`?`,`pathname`,`search`,i)),bb(!i.pathname||!i.pathname.includes(`#`),Qb(`#`,`pathname`,`hash`,i)),bb(!i.search||!i.search.includes(`#`),Qb(`#`,`search`,`hash`,i)));let a=e===``||i.pathname===``,o=a?`/`:i.pathname,s;if(o==null)s=n;else{let e=t.length-1;if(!r&&o.startsWith(`..`)){let t=o.split(`/`);for(;t[0]===`..`;)t.shift(),--e;i.pathname=t.join(`/`)}s=e>=0?t[e]:`/`}let c=Xb(i,s),l=o&&o!==`/`&&o.endsWith(`/`),u=(a||o===`.`)&&n.endsWith(`/`);return!c.pathname.endsWith(`/`)&&(l||u)&&(c.pathname+=`/`),c}var nx=e=>e.replace(/[\\/]{2,}/g,`/`),rx=e=>nx(e.join(`/`)),ix=e=>e.replace(/\/+$/,``),ax=e=>ix(e).replace(/^\/*/,`/`),ox=e=>!e||e===`?`?``:e.startsWith(`?`)?e:`?`+e,sx=e=>!e||e===`#`?``:e.startsWith(`#`)?e:`#`+e,cx=class{constructor(e,t,n,r=!1){this.status=e,this.statusText=t||``,this.internal=r,n instanceof Error?(this.data=n.toString(),this.error=n):this.data=n}};function lx(e){return e!=null&&typeof e.status==`number`&&typeof e.statusText==`string`&&typeof e.internal==`boolean`&&`data`in e}function ux(e){return rx(e.map(e=>e.route.path).filter(Boolean))||`/`}var dx=typeof window<`u`&&window.document!==void 0&&window.document.createElement!==void 0;function fx(e,t){let n=e;if(typeof n!=`string`||!mb.test(n))return{absoluteURL:void 0,isExternal:!1,to:n};let r=n,i=!1;if(dx)try{let e=new URL(window.location.href),r=hb.test(n)?new URL(gb(n,e.protocol)):new URL(n),a=Yb(r.pathname,t);r.origin===e.origin&&a!=null?n=a+r.search+r.hash:i=!0}catch{xb(!1,`<Link to="${n}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:r,isExternal:i,to:n}}Object.getOwnPropertyNames(Object.prototype).sort().join(`\0`);var px=[`POST`,`PUT`,`PATCH`,`DELETE`];new Set(px);var mx=[`GET`,...px];new Set(mx);var hx=[`about:`,`blob:`,`chrome:`,`chrome-untrusted:`,`content:`,`data:`,`devtools:`,`file:`,`filesystem:`,`javascript:`];function gx(e){try{return hx.includes(new URL(e).protocol)}catch{return!1}}var _x=w.createContext(null);_x.displayName=`DataRouter`;var vx=w.createContext(null);vx.displayName=`DataRouterState`;var yx=w.createContext(!1);function bx(){return w.useContext(yx)}var xx=w.createContext({isTransitioning:!1});xx.displayName=`ViewTransition`;var Sx=w.createContext(new Map);Sx.displayName=`Fetchers`;var Cx=w.createContext(null);Cx.displayName=`Await`;var wx=w.createContext(null);wx.displayName=`Navigation`;var Tx=w.createContext(null);Tx.displayName=`Location`;var Ex=w.createContext({outlet:null,matches:[],isDataRoute:!1});Ex.displayName=`Route`;var Dx=w.createContext(null);Dx.displayName=`RouteError`;var Ox=`REACT_ROUTER_ERROR`,kx=`REDIRECT`,Ax=`ROUTE_ERROR_RESPONSE`;function jx(e){if(e.startsWith(`${Ox}:${kx}:{`))try{let t=JSON.parse(e.slice(28));if(typeof t==`object`&&t&&typeof t.status==`number`&&typeof t.statusText==`string`&&typeof t.location==`string`&&typeof t.reloadDocument==`boolean`&&typeof t.replace==`boolean`)return t}catch{}}function Mx(e){if(e.startsWith(`${Ox}:${Ax}:{`))try{let t=JSON.parse(e.slice(40));if(typeof t==`object`&&t&&typeof t.status==`number`&&typeof t.statusText==`string`)return new cx(t.status,t.statusText,t.data)}catch{}}function Nx(e,{relative:t}={}){bb(Px(),`useHref() may be used only in the context of a <Router> component.`);let{basename:n,navigator:r}=w.useContext(wx),{hash:i,pathname:a,search:o}=Ux(e,{relative:t}),s=a;return n!==`/`&&(s=a===`/`?n:rx([n,a])),r.createHref({pathname:s,search:o,hash:i})}function Px(){return w.useContext(Tx)!=null}function Fx(){return bb(Px(),`useLocation() may be used only in the context of a <Router> component.`),w.useContext(Tx).location}var Ix=`You should call navigate() in a React.useEffect(), not when your component is first rendered.`;function Lx(e){w.useContext(wx).static||w.useLayoutEffect(e)}function Rx(){let{isDataRoute:e}=w.useContext(Ex);return e?oS():zx()}function zx(){bb(Px(),`useNavigate() may be used only in the context of a <Router> component.`);let e=w.useContext(_x),{basename:t,navigator:n}=w.useContext(wx),{matches:r}=w.useContext(Ex),{pathname:i}=Fx(),a=JSON.stringify(ex(r)),o=w.useRef(!1);return Lx(()=>{o.current=!0}),w.useCallback((r,s={})=>{if(xb(o.current,Ix),!o.current)return;if(typeof r==`number`){n.go(r);return}let c=tx(r,JSON.parse(a),i,s.relative===`path`);e==null&&t!==`/`&&(c.pathname=c.pathname===`/`?t:rx([t,c.pathname])),(s.replace?n.replace:n.push)(c,s.state,s)},[t,n,a,i,e])}var Bx=w.createContext(null);function Vx(e){let t=w.useContext(Ex).outlet;return w.useMemo(()=>t&&w.createElement(Bx.Provider,{value:e},t),[t,e])}function Hx(){let{matches:e}=w.useContext(Ex);return e[e.length-1]?.params??{}}function Ux(e,{relative:t}={}){let{matches:n}=w.useContext(Ex),{pathname:r}=Fx(),i=JSON.stringify(ex(n));return w.useMemo(()=>tx(e,JSON.parse(i),r,t===`path`),[e,i,r,t])}function Wx(e,t){return Gx(e,t)}function Gx(e,t,n){bb(Px(),`useRoutes() may be used only in the context of a <Router> component.`);let{navigator:r}=w.useContext(wx),{matches:i}=w.useContext(Ex),a=i[i.length-1],o=a?a.params:{},s=a?a.pathname:`/`,c=a?a.pathnameBase:`/`,l=a&&a.route;{let e=l&&l.path||``;cS(s,!l||e.endsWith(`*`)||e.endsWith(`*?`),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${s}" (under <Route path="${e}">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.
57
+ `).replace(Nd,``)}function Fd(e,t){return t=Pd(t),Pd(e)===t}function Id(e,t,n,r,a,o){switch(n){case`children`:typeof r==`string`?t===`body`||t===`textarea`&&r===``||Rt(e,r):(typeof r==`number`||typeof r==`bigint`)&&t!==`body`&&Rt(e,``+r);break;case`className`:St(e,`class`,r);break;case`tabIndex`:St(e,`tabindex`,r);break;case`dir`:case`role`:case`viewBox`:case`width`:case`height`:St(e,n,r);break;case`style`:Vt(e,r,o);break;case`data`:if(t!==`object`){St(e,`data`,r);break}case`src`:case`href`:if(r===``&&(t!==`a`||n!==`href`)){e.removeAttribute(n);break}if(r==null||typeof r==`function`||typeof r==`symbol`||typeof r==`boolean`){e.removeAttribute(n);break}r=Gt(``+r),e.setAttribute(n,r);break;case`action`:case`formAction`:if(typeof r==`function`){e.setAttribute(n,`javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')`);break}if(typeof o==`function`&&(n===`formAction`?(t!==`input`&&Id(e,t,`name`,a.name,a,null),Id(e,t,`formEncType`,a.formEncType,a,null),Id(e,t,`formMethod`,a.formMethod,a,null),Id(e,t,`formTarget`,a.formTarget,a,null)):(Id(e,t,`encType`,a.encType,a,null),Id(e,t,`method`,a.method,a,null),Id(e,t,`target`,a.target,a,null))),r==null||typeof r==`symbol`||typeof r==`boolean`){e.removeAttribute(n);break}r=Gt(``+r),e.setAttribute(n,r);break;case`onClick`:r!=null&&(e.onclick=Kt);break;case`onScroll`:r!=null&&Sd(`scroll`,e);break;case`onScrollEnd`:r!=null&&Sd(`scrollend`,e);break;case`dangerouslySetInnerHTML`:if(r!=null){if(typeof r!=`object`||!(`__html`in r))throw Error(i(61));if(n=r.__html,n!=null){if(a.children!=null)throw Error(i(60));e.innerHTML=n}}break;case`multiple`:e.multiple=r&&typeof r!=`function`&&typeof r!=`symbol`;break;case`muted`:e.muted=r&&typeof r!=`function`&&typeof r!=`symbol`;break;case`suppressContentEditableWarning`:case`suppressHydrationWarning`:case`defaultValue`:case`defaultChecked`:case`innerHTML`:case`ref`:break;case`autoFocus`:break;case`xlinkHref`:if(r==null||typeof r==`function`||typeof r==`boolean`||typeof r==`symbol`){e.removeAttribute(`xlink:href`);break}n=Gt(``+r),e.setAttributeNS(`http://www.w3.org/1999/xlink`,`xlink:href`,n);break;case`contentEditable`:case`spellCheck`:case`draggable`:case`value`:case`autoReverse`:case`externalResourcesRequired`:case`focusable`:case`preserveAlpha`:r!=null&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,``+r):e.removeAttribute(n);break;case`inert`:case`allowFullScreen`:case`async`:case`autoPlay`:case`controls`:case`default`:case`defer`:case`disabled`:case`disablePictureInPicture`:case`disableRemotePlayback`:case`formNoValidate`:case`hidden`:case`loop`:case`noModule`:case`noValidate`:case`open`:case`playsInline`:case`readOnly`:case`required`:case`reversed`:case`scoped`:case`seamless`:case`itemScope`:r&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,``):e.removeAttribute(n);break;case`capture`:case`download`:!0===r?e.setAttribute(n,``):!1!==r&&r!=null&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,r):e.removeAttribute(n);break;case`cols`:case`rows`:case`size`:case`span`:r!=null&&typeof r!=`function`&&typeof r!=`symbol`&&!isNaN(r)&&1<=r?e.setAttribute(n,r):e.removeAttribute(n);break;case`rowSpan`:case`start`:r==null||typeof r==`function`||typeof r==`symbol`||isNaN(r)?e.removeAttribute(n):e.setAttribute(n,r);break;case`popover`:Sd(`beforetoggle`,e),Sd(`toggle`,e),xt(e,`popover`,r);break;case`xlinkActuate`:Ct(e,`http://www.w3.org/1999/xlink`,`xlink:actuate`,r);break;case`xlinkArcrole`:Ct(e,`http://www.w3.org/1999/xlink`,`xlink:arcrole`,r);break;case`xlinkRole`:Ct(e,`http://www.w3.org/1999/xlink`,`xlink:role`,r);break;case`xlinkShow`:Ct(e,`http://www.w3.org/1999/xlink`,`xlink:show`,r);break;case`xlinkTitle`:Ct(e,`http://www.w3.org/1999/xlink`,`xlink:title`,r);break;case`xlinkType`:Ct(e,`http://www.w3.org/1999/xlink`,`xlink:type`,r);break;case`xmlBase`:Ct(e,`http://www.w3.org/XML/1998/namespace`,`xml:base`,r);break;case`xmlLang`:Ct(e,`http://www.w3.org/XML/1998/namespace`,`xml:lang`,r);break;case`xmlSpace`:Ct(e,`http://www.w3.org/XML/1998/namespace`,`xml:space`,r);break;case`is`:xt(e,`is`,r);break;case`innerText`:case`textContent`:break;default:(!(2<n.length)||n[0]!==`o`&&n[0]!==`O`||n[1]!==`n`&&n[1]!==`N`)&&(n=Ut.get(n)||n,xt(e,n,r))}}function Ld(e,t,n,r,a,o){switch(n){case`style`:Vt(e,r,o);break;case`dangerouslySetInnerHTML`:if(r!=null){if(typeof r!=`object`||!(`__html`in r))throw Error(i(61));if(n=r.__html,n!=null){if(a.children!=null)throw Error(i(60));e.innerHTML=n}}break;case`children`:typeof r==`string`?Rt(e,r):(typeof r==`number`||typeof r==`bigint`)&&Rt(e,``+r);break;case`onScroll`:r!=null&&Sd(`scroll`,e);break;case`onScrollEnd`:r!=null&&Sd(`scrollend`,e);break;case`onClick`:r!=null&&(e.onclick=Kt);break;case`suppressContentEditableWarning`:case`suppressHydrationWarning`:case`innerHTML`:case`ref`:break;case`innerText`:case`textContent`:break;default:if(!mt.hasOwnProperty(n))a:{if(n[0]===`o`&&n[1]===`n`&&(a=n.endsWith(`Capture`),t=n.slice(2,a?n.length-7:void 0),o=e[et]||null,o=o==null?null:o[n],typeof o==`function`&&e.removeEventListener(t,o,a),typeof r==`function`)){typeof o!=`function`&&o!==null&&(n in e?e[n]=null:e.hasAttribute(n)&&e.removeAttribute(n)),e.addEventListener(t,r,a);break a}n in e?e[n]=r:!0===r?e.setAttribute(n,``):xt(e,n,r)}}}function Y(e,t,n){switch(t){case`div`:case`span`:case`svg`:case`path`:case`a`:case`g`:case`p`:case`li`:break;case`img`:Sd(`error`,e),Sd(`load`,e);var r=!1,a=!1,o;for(o in n)if(n.hasOwnProperty(o)){var s=n[o];if(s!=null)switch(o){case`src`:r=!0;break;case`srcSet`:a=!0;break;case`children`:case`dangerouslySetInnerHTML`:throw Error(i(137,t));default:Id(e,t,o,s,n,null)}}a&&Id(e,t,`srcSet`,n.srcSet,n,null),r&&Id(e,t,`src`,n.src,n,null);return;case`input`:Sd(`invalid`,e);var c=o=s=a=null,l=null,u=null;for(r in n)if(n.hasOwnProperty(r)){var d=n[r];if(d!=null)switch(r){case`name`:a=d;break;case`type`:s=d;break;case`checked`:l=d;break;case`defaultChecked`:u=d;break;case`value`:o=d;break;case`defaultValue`:c=d;break;case`children`:case`dangerouslySetInnerHTML`:if(d!=null)throw Error(i(137,t));break;default:Id(e,t,r,d,n,null)}}Nt(e,o,c,l,u,s,a,!1);return;case`select`:for(a in Sd(`invalid`,e),r=s=o=null,n)if(n.hasOwnProperty(a)&&(c=n[a],c!=null))switch(a){case`value`:o=c;break;case`defaultValue`:s=c;break;case`multiple`:r=c;default:Id(e,t,a,c,n,null)}t=o,n=s,e.multiple=!!r,t==null?n!=null&&Ft(e,!!r,n,!0):Ft(e,!!r,t,!1);return;case`textarea`:for(s in Sd(`invalid`,e),o=a=r=null,n)if(n.hasOwnProperty(s)&&(c=n[s],c!=null))switch(s){case`value`:r=c;break;case`defaultValue`:a=c;break;case`children`:o=c;break;case`dangerouslySetInnerHTML`:if(c!=null)throw Error(i(91));break;default:Id(e,t,s,c,n,null)}Lt(e,r,a,o);return;case`option`:for(l in n)if(n.hasOwnProperty(l)&&(r=n[l],r!=null))switch(l){case`selected`:e.selected=r&&typeof r!=`function`&&typeof r!=`symbol`;break;default:Id(e,t,l,r,n,null)}return;case`dialog`:Sd(`beforetoggle`,e),Sd(`toggle`,e),Sd(`cancel`,e),Sd(`close`,e);break;case`iframe`:case`object`:Sd(`load`,e);break;case`video`:case`audio`:for(r=0;r<yd.length;r++)Sd(yd[r],e);break;case`image`:Sd(`error`,e),Sd(`load`,e);break;case`details`:Sd(`toggle`,e);break;case`embed`:case`source`:case`link`:Sd(`error`,e),Sd(`load`,e);case`area`:case`base`:case`br`:case`col`:case`hr`:case`keygen`:case`meta`:case`param`:case`track`:case`wbr`:case`menuitem`:for(u in n)if(n.hasOwnProperty(u)&&(r=n[u],r!=null))switch(u){case`children`:case`dangerouslySetInnerHTML`:throw Error(i(137,t));default:Id(e,t,u,r,n,null)}return;default:if(Ht(t)){for(d in n)n.hasOwnProperty(d)&&(r=n[d],r!==void 0&&Ld(e,t,d,r,n,void 0));return}}for(c in n)n.hasOwnProperty(c)&&(r=n[c],r!=null&&Id(e,t,c,r,n,null))}function Rd(e,t,n,r){switch(t){case`div`:case`span`:case`svg`:case`path`:case`a`:case`g`:case`p`:case`li`:break;case`input`:var a=null,o=null,s=null,c=null,l=null,u=null,d=null;for(m in n){var f=n[m];if(n.hasOwnProperty(m)&&f!=null)switch(m){case`checked`:break;case`value`:break;case`defaultValue`:l=f;default:r.hasOwnProperty(m)||Id(e,t,m,null,r,f)}}for(var p in r){var m=r[p];if(f=n[p],r.hasOwnProperty(p)&&(m!=null||f!=null))switch(p){case`type`:o=m;break;case`name`:a=m;break;case`checked`:u=m;break;case`defaultChecked`:d=m;break;case`value`:s=m;break;case`defaultValue`:c=m;break;case`children`:case`dangerouslySetInnerHTML`:if(m!=null)throw Error(i(137,t));break;default:m!==f&&Id(e,t,p,m,r,f)}}Mt(e,s,c,l,u,d,o,a);return;case`select`:for(o in m=s=c=p=null,n)if(l=n[o],n.hasOwnProperty(o)&&l!=null)switch(o){case`value`:break;case`multiple`:m=l;default:r.hasOwnProperty(o)||Id(e,t,o,null,r,l)}for(a in r)if(o=r[a],l=n[a],r.hasOwnProperty(a)&&(o!=null||l!=null))switch(a){case`value`:p=o;break;case`defaultValue`:c=o;break;case`multiple`:s=o;default:o!==l&&Id(e,t,a,o,r,l)}t=c,n=s,r=m,p==null?!!r!=!!n&&(t==null?Ft(e,!!n,n?[]:``,!1):Ft(e,!!n,t,!0)):Ft(e,!!n,p,!1);return;case`textarea`:for(c in m=p=null,n)if(a=n[c],n.hasOwnProperty(c)&&a!=null&&!r.hasOwnProperty(c))switch(c){case`value`:break;case`children`:break;default:Id(e,t,c,null,r,a)}for(s in r)if(a=r[s],o=n[s],r.hasOwnProperty(s)&&(a!=null||o!=null))switch(s){case`value`:p=a;break;case`defaultValue`:m=a;break;case`children`:break;case`dangerouslySetInnerHTML`:if(a!=null)throw Error(i(91));break;default:a!==o&&Id(e,t,s,a,r,o)}It(e,p,m);return;case`option`:for(var h in n)if(p=n[h],n.hasOwnProperty(h)&&p!=null&&!r.hasOwnProperty(h))switch(h){case`selected`:e.selected=!1;break;default:Id(e,t,h,null,r,p)}for(l in r)if(p=r[l],m=n[l],r.hasOwnProperty(l)&&p!==m&&(p!=null||m!=null))switch(l){case`selected`:e.selected=p&&typeof p!=`function`&&typeof p!=`symbol`;break;default:Id(e,t,l,p,r,m)}return;case`img`:case`link`:case`area`:case`base`:case`br`:case`col`:case`embed`:case`hr`:case`keygen`:case`meta`:case`param`:case`source`:case`track`:case`wbr`:case`menuitem`:for(var g in n)p=n[g],n.hasOwnProperty(g)&&p!=null&&!r.hasOwnProperty(g)&&Id(e,t,g,null,r,p);for(u in r)if(p=r[u],m=n[u],r.hasOwnProperty(u)&&p!==m&&(p!=null||m!=null))switch(u){case`children`:case`dangerouslySetInnerHTML`:if(p!=null)throw Error(i(137,t));break;default:Id(e,t,u,p,r,m)}return;default:if(Ht(t)){for(var _ in n)p=n[_],n.hasOwnProperty(_)&&p!==void 0&&!r.hasOwnProperty(_)&&Ld(e,t,_,void 0,r,p);for(d in r)p=r[d],m=n[d],!r.hasOwnProperty(d)||p===m||p===void 0&&m===void 0||Ld(e,t,d,p,r,m);return}}for(var v in n)p=n[v],n.hasOwnProperty(v)&&p!=null&&!r.hasOwnProperty(v)&&Id(e,t,v,null,r,p);for(f in r)p=r[f],m=n[f],!r.hasOwnProperty(f)||p===m||p==null&&m==null||Id(e,t,f,p,r,m)}function zd(e){switch(e){case`css`:case`script`:case`font`:case`img`:case`image`:case`input`:case`link`:return!0;default:return!1}}function Bd(){if(typeof performance.getEntriesByType==`function`){for(var e=0,t=0,n=performance.getEntriesByType(`resource`),r=0;r<n.length;r++){var i=n[r],a=i.transferSize,o=i.initiatorType,s=i.duration;if(a&&s&&zd(o)){for(o=0,s=i.responseEnd,r+=1;r<n.length;r++){var c=n[r],l=c.startTime;if(l>s)break;var u=c.transferSize,d=c.initiatorType;u&&zd(d)&&(c=c.responseEnd,o+=u*(c<s?1:(s-l)/(c-l)))}if(--r,t+=8*(a+o)/(i.duration/1e3),e++,10<e)break}}if(0<e)return t/e/1e6}return navigator.connection&&(e=navigator.connection.downlink,typeof e==`number`)?e:5}var Vd=null,Hd=null;function Ud(e){return e.nodeType===9?e:e.ownerDocument}function Wd(e){switch(e){case`http://www.w3.org/2000/svg`:return 1;case`http://www.w3.org/1998/Math/MathML`:return 2;default:return 0}}function Gd(e,t){if(e===0)switch(t){case`svg`:return 1;case`math`:return 2;default:return 0}return e===1&&t===`foreignObject`?0:e}function Kd(e,t){return e===`textarea`||e===`noscript`||typeof t.children==`string`||typeof t.children==`number`||typeof t.children==`bigint`||typeof t.dangerouslySetInnerHTML==`object`&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var qd=null;function Jd(){var e=window.event;return e&&e.type===`popstate`?e!==qd&&(qd=e,!0):(qd=null,!1)}var Yd=typeof setTimeout==`function`?setTimeout:void 0,Xd=typeof clearTimeout==`function`?clearTimeout:void 0,Zd=typeof Promise==`function`?Promise:void 0,Qd=typeof queueMicrotask==`function`?queueMicrotask:Zd===void 0?Yd:function(e){return Zd.resolve(null).then(e).catch($d)};function $d(e){setTimeout(function(){throw e})}function ef(e){return e===`head`}function tf(e,t){var n=t,r=0;do{var i=n.nextSibling;if(e.removeChild(n),i&&i.nodeType===8)if(n=i.data,n===`/$`||n===`/&`){if(r===0){e.removeChild(i),Ip(t);return}r--}else if(n===`$`||n===`$?`||n===`$~`||n===`$!`||n===`&`)r++;else if(n===`html`)gf(e.ownerDocument.documentElement);else if(n===`head`){n=e.ownerDocument.head,gf(n);for(var a=n.firstChild;a;){var o=a.nextSibling,s=a.nodeName;a[ot]||s===`SCRIPT`||s===`STYLE`||s===`LINK`&&a.rel.toLowerCase()===`stylesheet`||n.removeChild(a),a=o}}else n===`body`&&gf(e.ownerDocument.body);n=i}while(n);Ip(t)}function nf(e,t){var n=e;e=0;do{var r=n.nextSibling;if(n.nodeType===1?t?(n._stashedDisplay=n.style.display,n.style.display=`none`):(n.style.display=n._stashedDisplay||``,n.getAttribute(`style`)===``&&n.removeAttribute(`style`)):n.nodeType===3&&(t?(n._stashedText=n.nodeValue,n.nodeValue=``):n.nodeValue=n._stashedText||``),r&&r.nodeType===8)if(n=r.data,n===`/$`){if(e===0)break;e--}else n!==`$`&&n!==`$?`&&n!==`$~`&&n!==`$!`||e++;n=r}while(n)}function rf(e){var t=e.firstChild;for(t&&t.nodeType===10&&(t=t.nextSibling);t;){var n=t;switch(t=t.nextSibling,n.nodeName){case`HTML`:case`HEAD`:case`BODY`:rf(n),st(n);continue;case`SCRIPT`:case`STYLE`:continue;case`LINK`:if(n.rel.toLowerCase()===`stylesheet`)continue}e.removeChild(n)}}function af(e,t,n,r){for(;e.nodeType===1;){var i=n;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!r&&(e.nodeName!==`INPUT`||e.type!==`hidden`))break}else if(!r)if(t===`input`&&e.type===`hidden`){var a=i.name==null?null:``+i.name;if(i.type===`hidden`&&e.getAttribute(`name`)===a)return e}else return e;else if(!e[ot])switch(t){case`meta`:if(!e.hasAttribute(`itemprop`))break;return e;case`link`:if(a=e.getAttribute(`rel`),a===`stylesheet`&&e.hasAttribute(`data-precedence`)||a!==i.rel||e.getAttribute(`href`)!==(i.href==null||i.href===``?null:i.href)||e.getAttribute(`crossorigin`)!==(i.crossOrigin==null?null:i.crossOrigin)||e.getAttribute(`title`)!==(i.title==null?null:i.title))break;return e;case`style`:if(e.hasAttribute(`data-precedence`))break;return e;case`script`:if(a=e.getAttribute(`src`),(a!==(i.src==null?null:i.src)||e.getAttribute(`type`)!==(i.type==null?null:i.type)||e.getAttribute(`crossorigin`)!==(i.crossOrigin==null?null:i.crossOrigin))&&a&&e.hasAttribute(`async`)&&!e.hasAttribute(`itemprop`))break;return e;default:return e}if(e=df(e.nextSibling),e===null)break}return null}function of(e,t,n){if(t===``)return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!==`INPUT`||e.type!==`hidden`)&&!n||(e=df(e.nextSibling),e===null))return null;return e}function sf(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!==`INPUT`||e.type!==`hidden`)&&!t||(e=df(e.nextSibling),e===null))return null;return e}function cf(e){return e.data===`$?`||e.data===`$~`}function lf(e){return e.data===`$!`||e.data===`$?`&&e.ownerDocument.readyState!==`loading`}function uf(e,t){var n=e.ownerDocument;if(e.data===`$~`)e._reactRetry=t;else if(e.data!==`$?`||n.readyState!==`loading`)t();else{var r=function(){t(),n.removeEventListener(`DOMContentLoaded`,r)};n.addEventListener(`DOMContentLoaded`,r),e._reactRetry=r}}function df(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t===`$`||t===`$!`||t===`$?`||t===`$~`||t===`&`||t===`F!`||t===`F`)break;if(t===`/$`||t===`/&`)return null}}return e}var ff=null;function pf(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n===`/$`||n===`/&`){if(t===0)return df(e.nextSibling);t--}else n!==`$`&&n!==`$!`&&n!==`$?`&&n!==`$~`&&n!==`&`||t++}e=e.nextSibling}return null}function mf(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n===`$`||n===`$!`||n===`$?`||n===`$~`||n===`&`){if(t===0)return e;t--}else n!==`/$`&&n!==`/&`||t++}e=e.previousSibling}return null}function hf(e,t,n){switch(t=Ud(n),e){case`html`:if(e=t.documentElement,!e)throw Error(i(452));return e;case`head`:if(e=t.head,!e)throw Error(i(453));return e;case`body`:if(e=t.body,!e)throw Error(i(454));return e;default:throw Error(i(451))}}function gf(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);st(e)}var _f=new Map,vf=new Set;function yf(e){return typeof e.getRootNode==`function`?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var bf=F.d;F.d={f:xf,r:Sf,D:Tf,C:Ef,L:Df,m:Of,X:Af,S:kf,M:jf};function xf(){var e=bf.f(),t=xu();return e||t}function Sf(e){var t=lt(e);t!==null&&t.tag===5&&t.type===`form`?bs(t):bf.r(e)}var Cf=typeof document>`u`?null:document;function wf(e,t,n){var r=Cf;if(r&&typeof t==`string`&&t){var i=jt(t);i=`link[rel="`+e+`"][href="`+i+`"]`,typeof n==`string`&&(i+=`[crossorigin="`+n+`"]`),vf.has(i)||(vf.add(i),e={rel:e,crossOrigin:n,href:t},r.querySelector(i)===null&&(t=r.createElement(`link`),Y(t,`link`,e),ft(t),r.head.appendChild(t)))}}function Tf(e){bf.D(e),wf(`dns-prefetch`,e,null)}function Ef(e,t){bf.C(e,t),wf(`preconnect`,e,t)}function Df(e,t,n){bf.L(e,t,n);var r=Cf;if(r&&e&&t){var i=`link[rel="preload"][as="`+jt(t)+`"]`;t===`image`&&n&&n.imageSrcSet?(i+=`[imagesrcset="`+jt(n.imageSrcSet)+`"]`,typeof n.imageSizes==`string`&&(i+=`[imagesizes="`+jt(n.imageSizes)+`"]`)):i+=`[href="`+jt(e)+`"]`;var a=i;switch(t){case`style`:a=Nf(e);break;case`script`:a=Lf(e)}_f.has(a)||(e=f({rel:`preload`,href:t===`image`&&n&&n.imageSrcSet?void 0:e,as:t},n),_f.set(a,e),r.querySelector(i)!==null||t===`style`&&r.querySelector(Pf(a))||t===`script`&&r.querySelector(Rf(a))||(t=r.createElement(`link`),Y(t,`link`,e),ft(t),r.head.appendChild(t)))}}function Of(e,t){bf.m(e,t);var n=Cf;if(n&&e){var r=t&&typeof t.as==`string`?t.as:`script`,i=`link[rel="modulepreload"][as="`+jt(r)+`"][href="`+jt(e)+`"]`,a=i;switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:a=Lf(e)}if(!_f.has(a)&&(e=f({rel:`modulepreload`,href:e},t),_f.set(a,e),n.querySelector(i)===null)){switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:if(n.querySelector(Rf(a)))return}r=n.createElement(`link`),Y(r,`link`,e),ft(r),n.head.appendChild(r)}}}function kf(e,t,n){bf.S(e,t,n);var r=Cf;if(r&&e){var i=dt(r).hoistableStyles,a=Nf(e);t||=`default`;var o=i.get(a);if(!o){var s={loading:0,preload:null};if(o=r.querySelector(Pf(a)))s.loading=5;else{e=f({rel:`stylesheet`,href:e,"data-precedence":t},n),(n=_f.get(a))&&Vf(e,n);var c=o=r.createElement(`link`);ft(c),Y(c,`link`,e),c._p=new Promise(function(e,t){c.onload=e,c.onerror=t}),c.addEventListener(`load`,function(){s.loading|=1}),c.addEventListener(`error`,function(){s.loading|=2}),s.loading|=4,Bf(o,t,r)}o={type:`stylesheet`,instance:o,count:1,state:s},i.set(a,o)}}}function Af(e,t){bf.X(e,t);var n=Cf;if(n&&e){var r=dt(n).hoistableScripts,i=Lf(e),a=r.get(i);a||(a=n.querySelector(Rf(i)),a||(e=f({src:e,async:!0},t),(t=_f.get(i))&&Hf(e,t),a=n.createElement(`script`),ft(a),Y(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function jf(e,t){bf.M(e,t);var n=Cf;if(n&&e){var r=dt(n).hoistableScripts,i=Lf(e),a=r.get(i);a||(a=n.querySelector(Rf(i)),a||(e=f({src:e,async:!0,type:`module`},t),(t=_f.get(i))&&Hf(e,t),a=n.createElement(`script`),ft(a),Y(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function Mf(e,t,n,r){var a=(a=te.current)?yf(a):null;if(!a)throw Error(i(446));switch(e){case`meta`:case`title`:return null;case`style`:return typeof n.precedence==`string`&&typeof n.href==`string`?(t=Nf(n.href),n=dt(a).hoistableStyles,r=n.get(t),r||(r={type:`style`,instance:null,count:0,state:null},n.set(t,r)),r):{type:`void`,instance:null,count:0,state:null};case`link`:if(n.rel===`stylesheet`&&typeof n.href==`string`&&typeof n.precedence==`string`){e=Nf(n.href);var o=dt(a).hoistableStyles,s=o.get(e);if(s||(a=a.ownerDocument||a,s={type:`stylesheet`,instance:null,count:0,state:{loading:0,preload:null}},o.set(e,s),(o=a.querySelector(Pf(e)))&&!o._p&&(s.instance=o,s.state.loading=5),_f.has(e)||(n={rel:`preload`,as:`style`,href:n.href,crossOrigin:n.crossOrigin,integrity:n.integrity,media:n.media,hrefLang:n.hrefLang,referrerPolicy:n.referrerPolicy},_f.set(e,n),o||If(a,e,n,s.state))),t&&r===null)throw Error(i(528,``));return s}if(t&&r!==null)throw Error(i(529,``));return null;case`script`:return t=n.async,n=n.src,typeof n==`string`&&t&&typeof t!=`function`&&typeof t!=`symbol`?(t=Lf(n),n=dt(a).hoistableScripts,r=n.get(t),r||(r={type:`script`,instance:null,count:0,state:null},n.set(t,r)),r):{type:`void`,instance:null,count:0,state:null};default:throw Error(i(444,e))}}function Nf(e){return`href="`+jt(e)+`"`}function Pf(e){return`link[rel="stylesheet"][`+e+`]`}function Ff(e){return f({},e,{"data-precedence":e.precedence,precedence:null})}function If(e,t,n,r){e.querySelector(`link[rel="preload"][as="style"][`+t+`]`)?r.loading=1:(t=e.createElement(`link`),r.preload=t,t.addEventListener(`load`,function(){return r.loading|=1}),t.addEventListener(`error`,function(){return r.loading|=2}),Y(t,`link`,n),ft(t),e.head.appendChild(t))}function Lf(e){return`[src="`+jt(e)+`"]`}function Rf(e){return`script[async]`+e}function zf(e,t,n){if(t.count++,t.instance===null)switch(t.type){case`style`:var r=e.querySelector(`style[data-href~="`+jt(n.href)+`"]`);if(r)return t.instance=r,ft(r),r;var a=f({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return r=(e.ownerDocument||e).createElement(`style`),ft(r),Y(r,`style`,a),Bf(r,n.precedence,e),t.instance=r;case`stylesheet`:a=Nf(n.href);var o=e.querySelector(Pf(a));if(o)return t.state.loading|=4,t.instance=o,ft(o),o;r=Ff(n),(a=_f.get(a))&&Vf(r,a),o=(e.ownerDocument||e).createElement(`link`),ft(o);var s=o;return s._p=new Promise(function(e,t){s.onload=e,s.onerror=t}),Y(o,`link`,r),t.state.loading|=4,Bf(o,n.precedence,e),t.instance=o;case`script`:return o=Lf(n.src),(a=e.querySelector(Rf(o)))?(t.instance=a,ft(a),a):(r=n,(a=_f.get(o))&&(r=f({},n),Hf(r,a)),e=e.ownerDocument||e,a=e.createElement(`script`),ft(a),Y(a,`link`,r),e.head.appendChild(a),t.instance=a);case`void`:return null;default:throw Error(i(443,t.type))}else t.type===`stylesheet`&&!(t.state.loading&4)&&(r=t.instance,t.state.loading|=4,Bf(r,n.precedence,e));return t.instance}function Bf(e,t,n){for(var r=n.querySelectorAll(`link[rel="stylesheet"][data-precedence],style[data-precedence]`),i=r.length?r[r.length-1]:null,a=i,o=0;o<r.length;o++){var s=r[o];if(s.dataset.precedence===t)a=s;else if(a!==i)break}a?a.parentNode.insertBefore(e,a.nextSibling):(t=n.nodeType===9?n.head:n,t.insertBefore(e,t.firstChild))}function Vf(e,t){e.crossOrigin??=t.crossOrigin,e.referrerPolicy??=t.referrerPolicy,e.title??=t.title}function Hf(e,t){e.crossOrigin??=t.crossOrigin,e.referrerPolicy??=t.referrerPolicy,e.integrity??=t.integrity}var Uf=null;function Wf(e,t,n){if(Uf===null){var r=new Map,i=Uf=new Map;i.set(n,r)}else i=Uf,r=i.get(n),r||(r=new Map,i.set(n,r));if(r.has(e))return r;for(r.set(e,null),n=n.getElementsByTagName(e),i=0;i<n.length;i++){var a=n[i];if(!(a[ot]||a[$e]||e===`link`&&a.getAttribute(`rel`)===`stylesheet`)&&a.namespaceURI!==`http://www.w3.org/2000/svg`){var o=a.getAttribute(t)||``;o=e+o;var s=r.get(o);s?s.push(a):r.set(o,[a])}}return r}function Gf(e,t,n){e=e.ownerDocument||e,e.head.insertBefore(n,t===`title`?e.querySelector(`head > title`):null)}function Kf(e,t,n){if(n===1||t.itemProp!=null)return!1;switch(e){case`meta`:case`title`:return!0;case`style`:if(typeof t.precedence!=`string`||typeof t.href!=`string`||t.href===``)break;return!0;case`link`:if(typeof t.rel!=`string`||typeof t.href!=`string`||t.href===``||t.onLoad||t.onError)break;switch(t.rel){case`stylesheet`:return e=t.disabled,typeof t.precedence==`string`&&e==null;default:return!0}case`script`:if(t.async&&typeof t.async!=`function`&&typeof t.async!=`symbol`&&!t.onLoad&&!t.onError&&t.src&&typeof t.src==`string`)return!0}return!1}function qf(e){return!(e.type===`stylesheet`&&!(e.state.loading&3))}function Jf(e,t,n,r){if(n.type===`stylesheet`&&(typeof r.media!=`string`||!1!==matchMedia(r.media).matches)&&!(n.state.loading&4)){if(n.instance===null){var i=Nf(r.href),a=t.querySelector(Pf(i));if(a){t=a._p,typeof t==`object`&&t&&typeof t.then==`function`&&(e.count++,e=Zf.bind(e),t.then(e,e)),n.state.loading|=4,n.instance=a,ft(a);return}a=t.ownerDocument||t,r=Ff(r),(i=_f.get(i))&&Vf(r,i),a=a.createElement(`link`),ft(a);var o=a;o._p=new Promise(function(e,t){o.onload=e,o.onerror=t}),Y(a,`link`,r),n.instance=a}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(n,t),(t=n.state.preload)&&!(n.state.loading&3)&&(e.count++,n=Zf.bind(e),t.addEventListener(`load`,n),t.addEventListener(`error`,n))}}var Yf=0;function Xf(e,t){return e.stylesheets&&e.count===0&&$f(e,e.stylesheets),0<e.count||0<e.imgCount?function(n){var r=setTimeout(function(){if(e.stylesheets&&$f(e,e.stylesheets),e.unsuspend){var t=e.unsuspend;e.unsuspend=null,t()}},6e4+t);0<e.imgBytes&&Yf===0&&(Yf=62500*Bd());var i=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&$f(e,e.stylesheets),e.unsuspend)){var t=e.unsuspend;e.unsuspend=null,t()}},(e.imgBytes>Yf?50:800)+t);return e.unsuspend=n,function(){e.unsuspend=null,clearTimeout(r),clearTimeout(i)}}:null}function Zf(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)$f(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var Qf=null;function $f(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,Qf=new Map,t.forEach(ep,e),Qf=null,Zf.call(e))}function ep(e,t){if(!(t.state.loading&4)){var n=Qf.get(e);if(n)var r=n.get(null);else{n=new Map,Qf.set(e,n);for(var i=e.querySelectorAll(`link[data-precedence],style[data-precedence]`),a=0;a<i.length;a++){var o=i[a];(o.nodeName===`LINK`||o.getAttribute(`media`)!==`not all`)&&(n.set(o.dataset.precedence,o),r=o)}r&&n.set(null,r)}i=t.instance,o=i.getAttribute(`data-precedence`),a=n.get(o)||r,a===r&&n.set(null,i),n.set(o,i),this.count++,r=Zf.bind(this),i.addEventListener(`load`,r),i.addEventListener(`error`,r),a?a.parentNode.insertBefore(i,a.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(i,e.firstChild)),t.state.loading|=4}}var tp={$$typeof:b,Provider:null,Consumer:null,_currentValue:I,_currentValue2:I,_threadCount:0};function np(e,t,n,r,i,a,o,s,c){this.tag=1,this.containerInfo=e,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=Ve(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Ve(0),this.hiddenUpdates=Ve(null),this.identifierPrefix=r,this.onUncaughtError=i,this.onCaughtError=a,this.onRecoverableError=o,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=c,this.incompleteTransitions=new Map}function rp(e,t,n,r,i,a,o,s,c,l,u,d){return e=new np(e,t,n,o,c,l,u,d,s),t=1,!0===a&&(t|=24),a=Zr(3,null,null,t),e.current=a,a.stateNode=e,t=Qi(),t.refCount++,e.pooledCache=t,t.refCount++,a.memoizedState={element:r,isDehydrated:n,cache:t},ja(a),e}function ip(e){return e?(e=Yr,e):Yr}function ap(e,t,n,r,i,a){i=ip(i),r.context===null?r.context=i:r.pendingContext=i,r=Na(t),r.payload={element:n},a=a===void 0?null:a,a!==null&&(r.callback=a),n=Pa(e,r,t),n!==null&&(gu(n,e,t),Fa(n,e,t))}function op(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function sp(e,t){op(e,t),(e=e.alternate)&&op(e,t)}function cp(e){if(e.tag===13||e.tag===31){var t=Kr(e,67108864);t!==null&&gu(t,e,67108864),sp(e,67108864)}}function lp(e){if(e.tag===13||e.tag===31){var t=mu();t=qe(t);var n=Kr(e,t);n!==null&&gu(n,e,t),sp(e,t)}}var up=!0;function dp(e,t,n,r){var i=P.T;P.T=null;var a=F.p;try{F.p=2,pp(e,t,n,r)}finally{F.p=a,P.T=i}}function fp(e,t,n,r){var i=P.T;P.T=null;var a=F.p;try{F.p=8,pp(e,t,n,r)}finally{F.p=a,P.T=i}}function pp(e,t,n,r){if(up){var i=mp(r);if(i===null)Dd(e,t,r,hp,n),Ep(e,r);else if(Op(i,e,t,n,r))r.stopPropagation();else if(Ep(e,r),t&4&&-1<Tp.indexOf(e)){for(;i!==null;){var a=lt(i);if(a!==null)switch(a.tag){case 3:if(a=a.stateNode,a.current.memoizedState.isDehydrated){var o=Ie(a.pendingLanes);if(o!==0){var s=a;for(s.pendingLanes|=2,s.entangledLanes|=2;o;){var c=1<<31-ke(o);s.entanglements[1]|=c,o&=~c}ad(a),!(Fl&6)&&(nu=_e()+500,od(0,!1))}}break;case 31:case 13:s=Kr(a,2),s!==null&&gu(s,a,2),xu(),sp(a,2)}if(a=mp(r),a===null&&Dd(e,t,r,hp,n),a===i)break;i=a}i!==null&&r.stopPropagation()}else Dd(e,t,r,null,n)}}function mp(e){return e=Jt(e),gp(e)}var hp=null;function gp(e){if(hp=null,e=ct(e),e!==null){var t=o(e);if(t===null)e=null;else{var n=t.tag;if(n===13){if(e=s(t),e!==null)return e;e=null}else if(n===31){if(e=c(t),e!==null)return e;e=null}else if(n===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return hp=e,null}function _p(e){switch(e){case`beforetoggle`:case`cancel`:case`click`:case`close`:case`contextmenu`:case`copy`:case`cut`:case`auxclick`:case`dblclick`:case`dragend`:case`dragstart`:case`drop`:case`focusin`:case`focusout`:case`input`:case`invalid`:case`keydown`:case`keypress`:case`keyup`:case`mousedown`:case`mouseup`:case`paste`:case`pause`:case`play`:case`pointercancel`:case`pointerdown`:case`pointerup`:case`ratechange`:case`reset`:case`resize`:case`seeked`:case`submit`:case`toggle`:case`touchcancel`:case`touchend`:case`touchstart`:case`volumechange`:case`change`:case`selectionchange`:case`textInput`:case`compositionstart`:case`compositionend`:case`compositionupdate`:case`beforeblur`:case`afterblur`:case`beforeinput`:case`blur`:case`fullscreenchange`:case`focus`:case`hashchange`:case`popstate`:case`select`:case`selectstart`:return 2;case`drag`:case`dragenter`:case`dragexit`:case`dragleave`:case`dragover`:case`mousemove`:case`mouseout`:case`mouseover`:case`pointermove`:case`pointerout`:case`pointerover`:case`scroll`:case`touchmove`:case`wheel`:case`mouseenter`:case`mouseleave`:case`pointerenter`:case`pointerleave`:return 8;case`message`:switch(ve()){case ye:return 2;case be:return 8;case xe:case Se:return 32;case Ce:return 268435456;default:return 32}default:return 32}}var vp=!1,yp=null,bp=null,xp=null,Sp=new Map,Cp=new Map,wp=[],Tp=`mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset`.split(` `);function Ep(e,t){switch(e){case`focusin`:case`focusout`:yp=null;break;case`dragenter`:case`dragleave`:bp=null;break;case`mouseover`:case`mouseout`:xp=null;break;case`pointerover`:case`pointerout`:Sp.delete(t.pointerId);break;case`gotpointercapture`:case`lostpointercapture`:Cp.delete(t.pointerId)}}function Dp(e,t,n,r,i,a){return e===null||e.nativeEvent!==a?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:a,targetContainers:[i]},t!==null&&(t=lt(t),t!==null&&cp(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,i!==null&&t.indexOf(i)===-1&&t.push(i),e)}function Op(e,t,n,r,i){switch(t){case`focusin`:return yp=Dp(yp,e,t,n,r,i),!0;case`dragenter`:return bp=Dp(bp,e,t,n,r,i),!0;case`mouseover`:return xp=Dp(xp,e,t,n,r,i),!0;case`pointerover`:var a=i.pointerId;return Sp.set(a,Dp(Sp.get(a)||null,e,t,n,r,i)),!0;case`gotpointercapture`:return a=i.pointerId,Cp.set(a,Dp(Cp.get(a)||null,e,t,n,r,i)),!0}return!1}function kp(e){var t=ct(e.target);if(t!==null){var n=o(t);if(n!==null){if(t=n.tag,t===13){if(t=s(n),t!==null){e.blockedOn=t,Ze(e.priority,function(){lp(n)});return}}else if(t===31){if(t=c(n),t!==null){e.blockedOn=t,Ze(e.priority,function(){lp(n)});return}}else if(t===3&&n.stateNode.current.memoizedState.isDehydrated){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Ap(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=mp(e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);qt=r,n.target.dispatchEvent(r),qt=null}else return t=lt(n),t!==null&&cp(t),e.blockedOn=n,!1;t.shift()}return!0}function jp(e,t,n){Ap(e)&&n.delete(t)}function Mp(){vp=!1,yp!==null&&Ap(yp)&&(yp=null),bp!==null&&Ap(bp)&&(bp=null),xp!==null&&Ap(xp)&&(xp=null),Sp.forEach(jp),Cp.forEach(jp)}function Np(e,n){e.blockedOn===n&&(e.blockedOn=null,vp||(vp=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,Mp)))}var Pp=null;function Fp(e){Pp!==e&&(Pp=e,t.unstable_scheduleCallback(t.unstable_NormalPriority,function(){Pp===e&&(Pp=null);for(var t=0;t<e.length;t+=3){var n=e[t],r=e[t+1],i=e[t+2];if(typeof r!=`function`){if(gp(r||n)===null)continue;break}var a=lt(n);a!==null&&(e.splice(t,3),t-=3,vs(a,{pending:!0,data:i,method:n.method,action:r},r,i))}}))}function Ip(e){function t(t){return Np(t,e)}yp!==null&&Np(yp,e),bp!==null&&Np(bp,e),xp!==null&&Np(xp,e),Sp.forEach(t),Cp.forEach(t);for(var n=0;n<wp.length;n++){var r=wp[n];r.blockedOn===e&&(r.blockedOn=null)}for(;0<wp.length&&(n=wp[0],n.blockedOn===null);)kp(n),n.blockedOn===null&&wp.shift();if(n=(e.ownerDocument||e).$$reactFormReplay,n!=null)for(r=0;r<n.length;r+=3){var i=n[r],a=n[r+1],o=i[et]||null;if(typeof a==`function`)o||Fp(n);else if(o){var s=null;if(a&&a.hasAttribute(`formAction`)){if(i=a,o=a[et]||null)s=o.formAction;else if(gp(i)!==null)continue}else s=o.action;typeof s==`function`?n[r+1]=s:(n.splice(r,3),r-=3),Fp(n)}}}function Lp(){function e(e){e.canIntercept&&e.info===`react-transition`&&e.intercept({handler:function(){return new Promise(function(e){return i=e})},focusReset:`manual`,scroll:`manual`})}function t(){i!==null&&(i(),i=null),r||setTimeout(n,20)}function n(){if(!r&&!navigation.transition){var e=navigation.currentEntry;e&&e.url!=null&&navigation.navigate(e.url,{state:e.getState(),info:`react-transition`,history:`replace`})}}if(typeof navigation==`object`){var r=!1,i=null;return navigation.addEventListener(`navigate`,e),navigation.addEventListener(`navigatesuccess`,t),navigation.addEventListener(`navigateerror`,t),setTimeout(n,100),function(){r=!0,navigation.removeEventListener(`navigate`,e),navigation.removeEventListener(`navigatesuccess`,t),navigation.removeEventListener(`navigateerror`,t),i!==null&&(i(),i=null)}}}function Rp(e){this._internalRoot=e}zp.prototype.render=Rp.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(i(409));var n=t.current;ap(n,mu(),e,t,null,null)},zp.prototype.unmount=Rp.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;ap(e.current,2,null,e,null,null),xu(),t[tt]=null}};function zp(e){this._internalRoot=e}zp.prototype.unstable_scheduleHydration=function(e){if(e){var t=Xe();e={blockedOn:null,target:e,priority:t};for(var n=0;n<wp.length&&t!==0&&t<wp[n].priority;n++);wp.splice(n,0,e),n===0&&kp(e)}};var Bp=n.version;if(Bp!==`19.2.8`)throw Error(i(527,Bp,`19.2.8`));F.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render==`function`?Error(i(188)):(e=Object.keys(e).join(`,`),Error(i(268,e)));return e=u(t),e=e===null?null:d(e),e=e===null?null:e.stateNode,e};var Vp={bundleType:0,version:`19.2.8`,rendererPackageName:`react-dom`,currentDispatcherRef:P,reconcilerVersion:`19.2.8`};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<`u`){var Hp=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Hp.isDisabled&&Hp.supportsFiber)try{Ee=Hp.inject(Vp),De=Hp}catch{}}e.createRoot=function(e,t){if(!a(e))throw Error(i(299));var n=!1,r=``,o=Vs,s=Hs,c=Us;return t!=null&&(!0===t.unstable_strictMode&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onUncaughtError!==void 0&&(o=t.onUncaughtError),t.onCaughtError!==void 0&&(s=t.onCaughtError),t.onRecoverableError!==void 0&&(c=t.onRecoverableError)),t=rp(e,1,!1,null,null,n,r,null,o,s,c,Lp),e[tt]=t.current,Td(e),new Rp(t)}})),eb=o(((e,t)=>{function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>`u`||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!=`function`))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}n(),t.exports=$y()})),tb=`modulepreload`,nb=function(e){return`/app/`+e},rb={},ib=function(e,t,n){let r=Promise.resolve();if(t&&t.length>0){let e=document.getElementsByTagName(`link`),i=document.querySelector(`meta[property=csp-nonce]`),a=i?.nonce||i?.getAttribute(`nonce`);function o(e){return Promise.all(e.map(e=>Promise.resolve(e).then(e=>({status:`fulfilled`,value:e}),e=>({status:`rejected`,reason:e}))))}function s(e){return import.meta.resolve?import.meta.resolve(e):new URL(e,import.meta.url).href}r=o(t.map(t=>{if(t=nb(t,n),t=s(t),t in rb)return;rb[t]=!0;let r=t.endsWith(`.css`);for(let n=e.length-1;n>=0;n--){let i=e[n];if(i.href===t&&(!r||i.rel===`stylesheet`))return}let i=document.createElement(`link`);if(i.rel=r?`stylesheet`:tb,r||(i.as=`script`),i.crossOrigin=``,i.href=t,a&&i.setAttribute(`nonce`,a),document.head.appendChild(i),r)return new Promise((e,n)=>{i.addEventListener(`load`,e),i.addEventListener(`error`,()=>n(Error(`Unable to preload CSS for ${t}`)))})}))}function i(e){let t=new Event(`vite:preloadError`,{cancelable:!0});if(t.payload=e,window.dispatchEvent(t),!t.defaultPrevented)throw e}return r.then(t=>{for(let e of t||[])e.status===`rejected`&&i(e.reason);return e().catch(i)})},ab=/^(?:[a-z][a-z0-9+.-]*:|[\\/]{2})/i,ob=/^[\\/]{2}/;function sb(e,t){return t+e.replace(/\\/g,`/`)}var cb=`popstate`;function lb(e){return typeof e==`object`&&!!e&&`pathname`in e&&`search`in e&&`hash`in e&&`state`in e&&`key`in e}function ub(e={}){function t(e,t){let n=t.state?.masked,{pathname:r,search:i,hash:a}=n||e.location;return hb(``,{pathname:r,search:i,hash:a},t.state&&t.state.usr||null,t.state&&t.state.key||`default`,n?{pathname:e.location.pathname,search:e.location.search,hash:e.location.hash}:void 0)}function n(e,t){return typeof t==`string`?t:gb(t)}return vb(t,n,null,e)}function db(e,t){if(e===!1||e==null)throw Error(t)}function fb(e,t){if(!e){typeof console<`u`&&console.warn(t);try{throw Error(t)}catch{}}}function pb(){return Math.random().toString(36).substring(2,10)}function mb(e,t){return{usr:e.state,key:e.key,idx:t,masked:e.mask?{pathname:e.pathname,search:e.search,hash:e.hash}:void 0}}function hb(e,t,n=null,r,i){return{pathname:typeof e==`string`?e:e.pathname,search:``,hash:``,...typeof t==`string`?_b(t):t,state:n,key:t&&t.key||r||pb(),mask:i}}function gb({pathname:e=`/`,search:t=``,hash:n=``}){return t&&t!==`?`&&(e+=t.charAt(0)===`?`?t:`?`+t),n&&n!==`#`&&(e+=n.charAt(0)===`#`?n:`#`+n),e}function _b(e){let t={};if(e){let n=e.indexOf(`#`);n>=0&&(t.hash=e.substring(n),e=e.substring(0,n));let r=e.indexOf(`?`);r>=0&&(t.search=e.substring(r),e=e.substring(0,r)),e&&(t.pathname=e)}return t}function vb(e,t,n,r={}){let{window:i=document.defaultView,v5Compat:a=!1}=r,o=i.history,s=`POP`,c=null,l=u();l??(l=0,o.replaceState({...o.state,idx:l},``));function u(){return(o.state||{idx:null}).idx}function d(){s=`POP`;let e=u(),t=e==null?null:e-l;l=e,c&&c({action:s,location:h.location,delta:t})}function f(e,t){s=`PUSH`;let r=lb(e)?e:hb(h.location,e,t);n&&n(r,e),l=u()+1;let d=mb(r,l),f=h.createHref(r.mask||r);try{o.pushState(d,``,f)}catch(e){if(e instanceof DOMException&&e.name===`DataCloneError`)throw e;i.location.assign(f)}a&&c&&c({action:s,location:h.location,delta:1})}function p(e,t){s=`REPLACE`;let r=lb(e)?e:hb(h.location,e,t);n&&n(r,e),l=u();let i=mb(r,l),d=h.createHref(r.mask||r);o.replaceState(i,``,d),a&&c&&c({action:s,location:h.location,delta:0})}function m(e){return yb(i,e)}let h={get action(){return s},get location(){return e(i,o)},listen(e){if(c)throw Error(`A history only accepts one active listener`);return i.addEventListener(cb,d),c=e,()=>{i.removeEventListener(cb,d),c=null}},createHref(e){return t(i,e)},createURL:m,encodeLocation(e){let t=m(e);return{pathname:t.pathname,search:t.search,hash:t.hash}},push:f,replace:p,go(e){return o.go(e)}};return h}function yb(e,t,n=!1){let r=`http://localhost`;e&&(r=e.location.origin===`null`?e.location.href:e.location.origin),db(r,`No window.location.(origin|href) available to create URL`);let i=typeof t==`string`?t:gb(t);return i=i.replace(/ $/,`%20`),!n&&ob.test(i)&&(i=r+i),new URL(i,r)}function bb(e,t,n=`/`){return xb(e,t,n,!1)}function xb(e,t,n,r,i){let a=zb((typeof t==`string`?_b(t):t).pathname||`/`,n);if(a==null)return null;let o=i??Sb(e),s=null,c=Rb(a);for(let e=0;s==null&&e<o.length;++e)s=Pb(o[e],c,r);return s}function Sb(e){let t=Cb(e);return Tb(t),t}function Cb(e,t=[],n=[],r=``,i=!1){let a=(e,a,o=i,s)=>{let c={relativePath:s===void 0?e.path||``:s,caseSensitive:e.caseSensitive===!0,childrenIndex:a,route:e};if(c.relativePath.startsWith(`/`)){if(!c.relativePath.startsWith(r)&&o)return;db(c.relativePath.startsWith(r),`Absolute route path "${c.relativePath}" nested under path "${r}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),c.relativePath=c.relativePath.slice(r.length)}let l=qb([r,c.relativePath]),u=n.concat(c);e.children&&e.children.length>0&&(db(e.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${l}".`),Cb(e.children,t,u,l,o)),!(e.path==null&&!e.index)&&t.push({path:l,score:Nb(l,e.index),routesMeta:u.map((e,t)=>{let[n,r]=Lb(e.relativePath,e.caseSensitive,t===u.length-1);return{...e,matcher:n,compiledParams:r}})})};return e.forEach((e,t)=>{if(e.path===``||!e.path?.includes(`?`))a(e,t);else for(let n of wb(e.path))a(e,t,!0,n)}),t}function wb(e){let t=e.split(`/`);if(t.length===0)return[];let[n,...r]=t,i=n.endsWith(`?`),a=n.replace(/\?$/,``);if(r.length===0)return i?[a,``]:[a];let o=wb(r.join(`/`)),s=[];return s.push(...o.map(e=>e===``?a:[a,e].join(`/`))),i&&s.push(...o),s.map(t=>e.startsWith(`/`)&&t===``?`/`:t)}function Tb(e){e.sort((e,t)=>e.score===t.score?pee(e.routesMeta.map(e=>e.childrenIndex),t.routesMeta.map(e=>e.childrenIndex)):t.score-e.score)}var Eb=/^:[\w-]+$/,Db=3,Ob=2,kb=1,Ab=10,jb=-2,Mb=e=>e===`*`;function Nb(e,t){let n=e.split(`/`),r=n.length;return n.some(Mb)&&(r+=jb),t&&(r+=Ob),n.filter(e=>!Mb(e)).reduce((e,t)=>e+(Eb.test(t)?Db:t===``?kb:Ab),r)}function pee(e,t){return e.length===t.length&&e.slice(0,-1).every((e,n)=>e===t[n])?e[e.length-1]-t[t.length-1]:0}function Pb(e,t,n=!1){let{routesMeta:r}=e,i={},a=`/`,o=[];for(let e=0;e<r.length;++e){let s=r[e],c=e===r.length-1,l=a===`/`?t:t.slice(a.length)||`/`,u={path:s.relativePath,caseSensitive:s.caseSensitive,end:c},d=s.matcher&&s.compiledParams?Ib(u,l,s.matcher,s.compiledParams):Fb(u,l),f=s.route;if(!d&&c&&n&&!r[r.length-1].route.index&&(d=Fb({path:s.relativePath,caseSensitive:s.caseSensitive,end:!1},l)),!d)return null;Object.assign(i,d.params),o.push({params:i,pathname:qb([a,d.pathname]),pathnameBase:Yb(qb([a,d.pathnameBase])),route:f}),d.pathnameBase!==`/`&&(a=qb([a,d.pathnameBase]))}return o}function Fb(e,t){typeof e==`string`&&(e={path:e,caseSensitive:!1,end:!0});let[n,r]=Lb(e.path,e.caseSensitive,e.end);return Ib(e,t,n,r)}function Ib(e,t,n,r){let i=t.match(n);if(!i)return null;let a=i[0],o=a.replace(/(.)\/+$/,`$1`),s=i.slice(1);return{params:r.reduce((e,{paramName:t,isOptional:n},r)=>{if(t===`*`){let e=s[r]||``;o=a.slice(0,a.length-e.length).replace(/(.)\/+$/,`$1`)}let i=s[r];return e[t]=n&&!i?void 0:(i||``).replace(/%2F/g,`/`),e},{}),pathname:a,pathnameBase:o,pattern:e}}function Lb(e,t=!1,n=!0){fb(e===`*`||!e.endsWith(`*`)||e.endsWith(`/*`),`Route path "${e}" will be treated as if it were "${e.replace(/\*$/,`/*`)}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${e.replace(/\*$/,`/*`)}".`);let r=[],i=`^`+e.replace(/\/*\*?$/,``).replace(/^\/*/,`/`).replace(/[\\.*+^${}|()[\]]/g,`\\$&`).replace(/\/:([\w-]+)(\?)?/g,(e,t,n,i,a)=>{if(r.push({paramName:t,isOptional:n!=null}),n){let t=a.charAt(i+e.length);return t&&t!==`/`?`/([^\\/]*)`:`(?:/([^\\/]*))?`}return`/([^\\/]+)`}).replace(/\/([\w-]+)\?(\/|$)/g,`(/$1)?$2`);return e.endsWith(`*`)?(r.push({paramName:`*`}),i+=e===`*`||e===`/*`?`(.*)$`:`(?:\\/(.+)|\\/*)$`):n?i+=`\\/*$`:e!==``&&e!==`/`&&(i+=`(?:(?=\\/|$))`),[new RegExp(i,t?void 0:`i`),r]}function Rb(e){try{return e.split(`/`).map(e=>decodeURIComponent(e).replace(/\//g,`%2F`)).join(`/`)}catch(t){return fb(!1,`The URL path "${e}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${t}).`),e}}function zb(e,t){if(t===`/`)return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith(`/`)?t.length-1:t.length,r=e.charAt(n);return r&&r!==`/`?null:e.slice(n)||`/`}function Bb(e,t=`/`){let{pathname:n,search:r=``,hash:i=``}=typeof e==`string`?_b(e):e,a;return n?(n=Kb(n),a=n.startsWith(`/`)?Vb(n.substring(1),`/`):Vb(n,t)):a=t,{pathname:a,search:Xb(r),hash:Zb(i)}}function Vb(e,t){let n=Jb(t).split(`/`);return e.split(`/`).forEach(e=>{e===`..`?n.length>1&&n.pop():e!==`.`&&n.push(e)}),n.length>1?n.join(`/`):`/`}function Hb(e,t,n,r){return`Cannot include a '${e}' character in a manually specified \`to.${t}\` field [${JSON.stringify(r)}]. Please separate it out to the \`to.${n}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function Ub(e){return e.filter((e,t)=>t===0||e.route.path&&e.route.path.length>0)}function Wb(e){let t=Ub(e);return t.map((e,n)=>n===t.length-1?e.pathname:e.pathnameBase)}function Gb(e,t,n,r=!1){let i;typeof e==`string`?i=_b(e):(i={...e},db(!i.pathname||!i.pathname.includes(`?`),Hb(`?`,`pathname`,`search`,i)),db(!i.pathname||!i.pathname.includes(`#`),Hb(`#`,`pathname`,`hash`,i)),db(!i.search||!i.search.includes(`#`),Hb(`#`,`search`,`hash`,i)));let a=e===``||i.pathname===``,o=a?`/`:i.pathname,s;if(o==null)s=n;else{let e=t.length-1;if(!r&&o.startsWith(`..`)){let t=o.split(`/`);for(;t[0]===`..`;)t.shift(),--e;i.pathname=t.join(`/`)}s=e>=0?t[e]:`/`}let c=Bb(i,s),l=o&&o!==`/`&&o.endsWith(`/`),u=(a||o===`.`)&&n.endsWith(`/`);return!c.pathname.endsWith(`/`)&&(l||u)&&(c.pathname+=`/`),c}var Kb=e=>e.replace(/[\\/]{2,}/g,`/`),qb=e=>Kb(e.join(`/`)),Jb=e=>e.replace(/\/+$/,``),Yb=e=>Jb(e).replace(/^\/*/,`/`),Xb=e=>!e||e===`?`?``:e.startsWith(`?`)?e:`?`+e,Zb=e=>!e||e===`#`?``:e.startsWith(`#`)?e:`#`+e,Qb=class{constructor(e,t,n,r=!1){this.status=e,this.statusText=t||``,this.internal=r,n instanceof Error?(this.data=n.toString(),this.error=n):this.data=n}};function $b(e){return e!=null&&typeof e.status==`number`&&typeof e.statusText==`string`&&typeof e.internal==`boolean`&&`data`in e}function ex(e){return qb(e.map(e=>e.route.path).filter(Boolean))||`/`}var tx=typeof window<`u`&&window.document!==void 0&&window.document.createElement!==void 0;function nx(e,t){let n=e;if(typeof n!=`string`||!ab.test(n))return{absoluteURL:void 0,isExternal:!1,to:n};let r=n,i=!1;if(tx)try{let e=new URL(window.location.href),r=ob.test(n)?new URL(sb(n,e.protocol)):new URL(n),a=zb(r.pathname,t);r.origin===e.origin&&a!=null?n=a+r.search+r.hash:i=!0}catch{fb(!1,`<Link to="${n}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:r,isExternal:i,to:n}}Object.getOwnPropertyNames(Object.prototype).sort().join(`\0`);var rx=[`POST`,`PUT`,`PATCH`,`DELETE`];new Set(rx);var ix=[`GET`,...rx];new Set(ix);var ax=[`about:`,`blob:`,`chrome:`,`chrome-untrusted:`,`content:`,`data:`,`devtools:`,`file:`,`filesystem:`,`javascript:`];function ox(e){try{return ax.includes(new URL(e).protocol)}catch{return!1}}var sx=w.createContext(null);sx.displayName=`DataRouter`;var cx=w.createContext(null);cx.displayName=`DataRouterState`;var lx=w.createContext(!1);function ux(){return w.useContext(lx)}var dx=w.createContext({isTransitioning:!1});dx.displayName=`ViewTransition`;var fx=w.createContext(new Map);fx.displayName=`Fetchers`;var px=w.createContext(null);px.displayName=`Await`;var mx=w.createContext(null);mx.displayName=`Navigation`;var hx=w.createContext(null);hx.displayName=`Location`;var gx=w.createContext({outlet:null,matches:[],isDataRoute:!1});gx.displayName=`Route`;var _x=w.createContext(null);_x.displayName=`RouteError`;var vx=`REACT_ROUTER_ERROR`,mee=`REDIRECT`,hee=`ROUTE_ERROR_RESPONSE`;function yx(e){if(e.startsWith(`${vx}:${mee}:{`))try{let t=JSON.parse(e.slice(28));if(typeof t==`object`&&t&&typeof t.status==`number`&&typeof t.statusText==`string`&&typeof t.location==`string`&&typeof t.reloadDocument==`boolean`&&typeof t.replace==`boolean`)return t}catch{}}function bx(e){if(e.startsWith(`${vx}:${hee}:{`))try{let t=JSON.parse(e.slice(40));if(typeof t==`object`&&t&&typeof t.status==`number`&&typeof t.statusText==`string`)return new Qb(t.status,t.statusText,t.data)}catch{}}function xx(e,{relative:t}={}){db(Sx(),`useHref() may be used only in the context of a <Router> component.`);let{basename:n,navigator:r}=w.useContext(mx),{hash:i,pathname:a,search:o}=jx(e,{relative:t}),s=a;return n!==`/`&&(s=a===`/`?n:qb([n,a])),r.createHref({pathname:s,search:o,hash:i})}function Sx(){return w.useContext(hx)!=null}function Cx(){return db(Sx(),`useLocation() may be used only in the context of a <Router> component.`),w.useContext(hx).location}var wx=`You should call navigate() in a React.useEffect(), not when your component is first rendered.`;function Tx(e){w.useContext(mx).static||w.useLayoutEffect(e)}function Ex(){let{isDataRoute:e}=w.useContext(gx);return e?Jx():Dx()}function Dx(){db(Sx(),`useNavigate() may be used only in the context of a <Router> component.`);let e=w.useContext(sx),{basename:t,navigator:n}=w.useContext(mx),{matches:r}=w.useContext(gx),{pathname:i}=Cx(),a=JSON.stringify(Wb(r)),o=w.useRef(!1);return Tx(()=>{o.current=!0}),w.useCallback((r,s={})=>{if(fb(o.current,wx),!o.current)return;if(typeof r==`number`){n.go(r);return}let c=Gb(r,JSON.parse(a),i,s.relative===`path`);e==null&&t!==`/`&&(c.pathname=c.pathname===`/`?t:qb([t,c.pathname])),(s.replace?n.replace:n.push)(c,s.state,s)},[t,n,a,i,e])}var Ox=w.createContext(null);function kx(e){let t=w.useContext(gx).outlet;return w.useMemo(()=>t&&w.createElement(Ox.Provider,{value:e},t),[t,e])}function Ax(){let{matches:e}=w.useContext(gx);return e[e.length-1]?.params??{}}function jx(e,{relative:t}={}){let{matches:n}=w.useContext(gx),{pathname:r}=Cx(),i=JSON.stringify(Wb(n));return w.useMemo(()=>Gb(e,JSON.parse(i),r,t===`path`),[e,i,r,t])}function Mx(e,t){return Nx(e,t)}function Nx(e,t,n){db(Sx(),`useRoutes() may be used only in the context of a <Router> component.`);let{navigator:r}=w.useContext(mx),{matches:i}=w.useContext(gx),a=i[i.length-1],o=a?a.params:{},s=a?a.pathname:`/`,c=a?a.pathnameBase:`/`,l=a&&a.route;{let e=l&&l.path||``;Xx(s,!l||e.endsWith(`*`)||e.endsWith(`*?`),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${s}" (under <Route path="${e}">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.
58
58
 
59
- Please change the parent <Route path="${e}"> to <Route path="${e===`/`?`*`:`${e}/*`}">.`)}let u=Fx(),d;if(t){let e=typeof t==`string`?Eb(t):t;bb(c===`/`||e.pathname?.startsWith(c),`When overriding the location using \`<Routes location>\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${c}" but pathname "${e.pathname}" was given in the \`location\` prop.`),d=e}else d=u;let f=d.pathname||`/`,p=f;if(c!==`/`){let e=c.replace(/^\//,``).split(`/`);p=`/`+f.replace(/^\//,``).split(`/`).slice(e.length).join(`/`)}let m=n&&n.state.matches.length?n.state.matches.map(e=>Object.assign(e,{route:n.manifest[e.route.id]||e.route})):kb(e,{pathname:p});xb(l||m!=null,`No routes matched location "${d.pathname}${d.search}${d.hash}" `),xb(m==null||m[m.length-1].route.element!==void 0||m[m.length-1].route.Component!==void 0||m[m.length-1].route.lazy!==void 0,`Matched leaf route at location "${d.pathname}${d.search}${d.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`);let h=Qx(m&&m.map(e=>Object.assign({},e,{params:Object.assign({},o,e.params),pathname:rx([c,r.encodeLocation?r.encodeLocation(e.pathname.replace(/%/g,`%25`).replace(/\?/g,`%3F`).replace(/#/g,`%23`)).pathname:e.pathname]),pathnameBase:e.pathnameBase===`/`?c:rx([c,r.encodeLocation?r.encodeLocation(e.pathnameBase.replace(/%/g,`%25`).replace(/\?/g,`%3F`).replace(/#/g,`%23`)).pathname:e.pathnameBase])})),i,n);return t&&h?w.createElement(Tx.Provider,{value:{location:{pathname:`/`,search:``,hash:``,state:null,key:`default`,mask:void 0,...d},navigationType:`POP`}},h):h}function Kx(){let e=aS(),t=lx(e)?`${e.status} ${e.statusText}`:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,r=`rgba(200,200,200, 0.5)`,i={padding:`0.5rem`,backgroundColor:r},a={padding:`2px 4px`,backgroundColor:r},o=null;return console.error(`Error handled by React Router default ErrorBoundary:`,e),o=w.createElement(w.Fragment,null,w.createElement(`p`,null,`💿 Hey developer 👋`),w.createElement(`p`,null,`You can provide a way better UX than this when your app throws errors by providing your own `,w.createElement(`code`,{style:a},`ErrorBoundary`),` or`,` `,w.createElement(`code`,{style:a},`errorElement`),` prop on your route.`)),w.createElement(w.Fragment,null,w.createElement(`h2`,null,`Unexpected Application Error!`),w.createElement(`h3`,{style:{fontStyle:`italic`}},t),n?w.createElement(`pre`,{style:i},n):null,o)}var qx=w.createElement(Kx,null),Jx=class extends w.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){return t.location!==e.location||t.revalidation!==`idle`&&e.revalidation===`idle`?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error===void 0?t.error:e.error,location:t.location,revalidation:e.revalidation||t.revalidation}}componentDidCatch(e,t){this.props.onError?this.props.onError(e,t):console.error(`React Router caught the following error during render`,e)}render(){let e=this.state.error;if(this.context&&typeof e==`object`&&e&&`digest`in e&&typeof e.digest==`string`){let t=Mx(e.digest);t&&(e=t)}let t=e===void 0?this.props.children:w.createElement(Ex.Provider,{value:this.props.routeContext},w.createElement(Dx.Provider,{value:e,children:this.props.component}));return this.context?w.createElement(Xx,{error:e},t):t}};Jx.contextType=yx;var Yx=new WeakMap;function Xx({children:e,error:t}){let{basename:n}=w.useContext(wx);if(typeof t==`object`&&t&&`digest`in t&&typeof t.digest==`string`){let e=jx(t.digest);if(e){let r=Yx.get(t);if(r)throw r;let i=fx(e.location,n),a=i.absoluteURL||i.to;if(gx(a))throw Error(`Invalid redirect location`);if(dx&&!Yx.get(t))if(i.isExternal||e.reloadDocument)window.location.href=a;else{let n=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(i.to,{replace:e.replace}));throw Yx.set(t,n),n}return w.createElement(`meta`,{httpEquiv:`refresh`,content:`0;url=${a}`})}}return e}function Zx({routeContext:e,match:t,children:n}){let r=w.useContext(_x);return r&&r.static&&r.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(r.staticContext._deepestRenderedBoundaryId=t.route.id),w.createElement(Ex.Provider,{value:e},n)}function Qx(e,t=[],n){let r=n?.state;if(e==null){if(!r)return null;if(r.errors)e=r.matches;else if(t.length===0&&!r.initialized&&r.matches.length>0)e=r.matches;else return null}let i=e,a=r?.errors;if(a!=null){let e=i.findIndex(e=>e.route.id&&a?.[e.route.id]!==void 0);bb(e>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(a).join(`,`)}`),i=i.slice(0,Math.min(i.length,e+1))}let o=!1,s=-1;if(n&&r){o=r.renderFallback;for(let e=0;e<i.length;e++){let t=i[e];if((t.route.HydrateFallback||t.route.hydrateFallbackElement)&&(s=e),t.route.id){let{loaderData:e,errors:a}=r,c=t.route.loader&&!e.hasOwnProperty(t.route.id)&&(!a||a[t.route.id]===void 0);if(t.route.lazy||c){n.isStatic&&(o=!0),i=s>=0?i.slice(0,s+1):[i[0]];break}}}}let c=n?.onError,l=r&&c?(e,t)=>{c(e,{location:r.location,params:r.matches?.[0]?.params??{},pattern:ux(r.matches),errorInfo:t})}:void 0;return i.reduceRight((e,n,c)=>{let u,d=!1,f=null,p=null;r&&(u=a&&n.route.id?a[n.route.id]:void 0,f=n.route.errorElement||qx,o&&(s<0&&c===0?(cS(`route-fallback`,!1,"No `HydrateFallback` element provided to render during initial hydration"),d=!0,p=null):s===c&&(d=!0,p=n.route.hydrateFallbackElement||null)));let m=t.concat(i.slice(0,c+1)),h=()=>{let t;return t=u?f:d?p:n.route.Component?w.createElement(n.route.Component,null):n.route.element?n.route.element:e,w.createElement(Zx,{match:n,routeContext:{outlet:e,matches:m,isDataRoute:r!=null},children:t})};return r&&(n.route.ErrorBoundary||n.route.errorElement||c===0)?w.createElement(Jx,{location:r.location,revalidation:r.revalidation,component:f,error:u,children:h(),routeContext:{outlet:null,matches:m,isDataRoute:!0},onError:l}):h()},null)}function $x(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function eS(e){let t=w.useContext(_x);return bb(t,$x(e)),t}function tS(e){let t=w.useContext(vx);return bb(t,$x(e)),t}function nS(e){let t=w.useContext(Ex);return bb(t,$x(e)),t}function rS(e){let t=nS(e),n=t.matches[t.matches.length-1];return bb(n.route.id,`${e} can only be used on routes that contain a unique "id"`),n.route.id}function iS(){return rS(`useRouteId`)}function aS(){let e=w.useContext(Dx),t=tS(`useRouteError`),n=rS(`useRouteError`);return e===void 0?t.errors?.[n]:e}function oS(){let{router:e}=eS(`useNavigate`),t=rS(`useNavigate`),n=w.useRef(!1);return Lx(()=>{n.current=!0}),w.useCallback(async(r,i={})=>{xb(n.current,Ix),n.current&&(typeof r==`number`?await e.navigate(r):await e.navigate(r,{fromRouteId:t,...i}))},[e,t])}var sS={};function cS(e,t,n){!t&&!sS[e]&&(sS[e]=!0,xb(!1,n))}w.memo(lS);function lS({routes:e,manifest:t,future:n,state:r,isStatic:i,onError:a}){return Gx(e,void 0,{manifest:t,state:r,isStatic:i,onError:a,future:n})}function uS(e){return Vx(e.context)}function dS(e){bb(!1,`A <Route> is only ever to be used as the child of <Routes> element, never rendered directly. Please wrap your <Route> in a <Routes>.`)}function fS({basename:e=`/`,children:t=null,location:n,navigationType:r=`POP`,navigator:i,static:a=!1,useTransitions:o}){bb(!Px(),`You cannot render a <Router> inside another <Router>. You should never have more than one in your app.`);let s=e.replace(/^\/*/,`/`),c=w.useMemo(()=>({basename:s,navigator:i,static:a,useTransitions:o,future:{}}),[s,i,a,o]);typeof n==`string`&&(n=Eb(n));let{pathname:l=`/`,search:u=``,hash:d=``,state:f=null,key:p=`default`,mask:m}=n,h=w.useMemo(()=>{let e=Yb(l,s);return e==null?null:{location:{pathname:e,search:u,hash:d,state:f,key:p,mask:m},navigationType:r}},[s,l,u,d,f,p,r,m]);return xb(h!=null,`<Router basename="${s}"> is not able to match the URL "${l}${u}${d}" because it does not start with the basename, so the <Router> won't render anything.`),h==null?null:w.createElement(wx.Provider,{value:c},w.createElement(Tx.Provider,{children:t,value:h}))}function pS({children:e,location:t}){return Wx(mS(e),t)}w.Component;function mS(e,t=[]){let n=[];return w.Children.forEach(e,(e,r)=>{if(!w.isValidElement(e))return;let i=[...t,r];if(e.type===w.Fragment){n.push.apply(n,mS(e.props.children,i));return}bb(e.type===dS,`[${typeof e.type==`string`?e.type:e.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`),bb(!e.props.index||!e.props.children,`An index route cannot have child routes.`);let a={id:e.props.id||i.join(`-`),caseSensitive:e.props.caseSensitive,element:e.props.element,Component:e.props.Component,index:e.props.index,path:e.props.path,middleware:e.props.middleware,loader:e.props.loader,action:e.props.action,hydrateFallbackElement:e.props.hydrateFallbackElement,HydrateFallback:e.props.HydrateFallback,errorElement:e.props.errorElement,ErrorBoundary:e.props.ErrorBoundary,hasErrorBoundary:e.props.hasErrorBoundary===!0||e.props.ErrorBoundary!=null||e.props.errorElement!=null,shouldRevalidate:e.props.shouldRevalidate,handle:e.props.handle,lazy:e.props.lazy};e.props.children&&(a.children=mS(e.props.children,i)),n.push(a)}),n}var hS=`get`,gS=`application/x-www-form-urlencoded`;function _S(e){return typeof HTMLElement<`u`&&e instanceof HTMLElement}function vS(e){return _S(e)&&e.tagName.toLowerCase()===`button`}function yS(e){return _S(e)&&e.tagName.toLowerCase()===`form`}function bS(e){return _S(e)&&e.tagName.toLowerCase()===`input`}function xS(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function SS(e,t){return e.button===0&&(!t||t===`_self`)&&!xS(e)}function CS(e=``){return new URLSearchParams(typeof e==`string`||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce((t,n)=>{let r=e[n];return t.concat(Array.isArray(r)?r.map(e=>[n,e]):[[n,r]])},[]))}function wS(e,t){let n=CS(e);return t&&t.forEach((e,r)=>{n.has(r)||t.getAll(r).forEach(e=>{n.append(r,e)})}),n}var TS=null;function ES(){if(TS===null)try{new FormData(document.createElement(`form`),0),TS=!1}catch{TS=!0}return TS}var DS=new Set([`application/x-www-form-urlencoded`,`multipart/form-data`,`text/plain`]);function OS(e){return e!=null&&!DS.has(e)?(xb(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${gS}"`),null):e}function kS(e,t){let n,r,i,a,o;if(yS(e)){let o=e.getAttribute(`action`);r=o?Yb(o,t):null,n=e.getAttribute(`method`)||hS,i=OS(e.getAttribute(`enctype`))||gS,a=new FormData(e)}else if(vS(e)||bS(e)&&(e.type===`submit`||e.type===`image`)){let o=e.form;if(o==null)throw Error(`Cannot submit a <button> or <input type="submit"> without a <form>`);let s=e.getAttribute(`formaction`)||o.getAttribute(`action`);if(r=s?Yb(s,t):null,n=e.getAttribute(`formmethod`)||o.getAttribute(`method`)||hS,i=OS(e.getAttribute(`formenctype`))||OS(o.getAttribute(`enctype`))||gS,a=new FormData(o,e),!ES()){let{name:t,type:n,value:r}=e;if(n===`image`){let e=t?`${t}.`:``;a.append(`${e}x`,`0`),a.append(`${e}y`,`0`)}else t&&a.append(t,r)}}else if(_S(e))throw Error(`Cannot submit element that is not <form>, <button>, or <input type="submit|image">`);else n=hS,r=null,i=gS,o=e;return a&&i===`text/plain`&&(o=a,a=void 0),{action:r,method:n.toLowerCase(),encType:i,formData:a,body:o}}Object.getOwnPropertyNames(Object.prototype).sort().join(`\0`);function AS(e,t){if(e===!1||e==null)throw Error(t)}function jS(e,t,n,r){let i=typeof e==`string`?new URL(e,typeof window>`u`?`server://singlefetch/`:window.location.origin):e;return i.pathname=n?i.pathname.endsWith(`/`)?`${i.pathname}_.${r}`:`${i.pathname}.${r}`:i.pathname===`/`?`_root.${r}`:t&&Yb(i.pathname,t)===`/`?`${ix(t)}/_root.${r}`:`${ix(i.pathname)}.${r}`,i}async function MS(e,t){if(e.id in t)return t[e.id];try{let n=await pb(()=>import(e.module),[]);return t[e.id]=n,n}catch(t){return console.error(`Error loading route module \`${e.module}\`, reloading page...`),console.error(t),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function NS(e){return e!=null&&typeof e.page==`string`}function PS(e){return e==null?!1:e.href==null?e.rel===`preload`&&typeof e.imageSrcSet==`string`&&typeof e.imageSizes==`string`:typeof e.rel==`string`&&typeof e.href==`string`}async function FS(e,t,n){return BS((await Promise.all(e.map(async e=>{let r=t.routes[e.route.id];if(r){let e=await MS(r,n);return e.links?e.links():[]}return[]}))).flat(1).filter(PS).filter(e=>e.rel===`stylesheet`||e.rel===`preload`).map(e=>e.rel===`stylesheet`?{...e,rel:`prefetch`,as:`style`}:{...e,rel:`prefetch`}))}function IS(e,t,n,r,i,a){let o=(e,t)=>!n[t]||e.route.id!==n[t].route.id,s=(e,t)=>n[t].pathname!==e.pathname||n[t].route.path?.endsWith(`*`)&&n[t].params[`*`]!==e.params[`*`];return a===`assets`?t.filter((e,t)=>o(e,t)||s(e,t)):a===`data`?t.filter((t,a)=>{let c=r.routes[t.route.id];if(!c||!c.hasLoader)return!1;if(o(t,a)||s(t,a))return!0;if(t.route.shouldRevalidate){let r=t.route.shouldRevalidate({currentUrl:new URL(i.pathname+i.search+i.hash,window.origin),currentParams:n[0]?.params||{},nextUrl:new URL(e,window.origin),nextParams:t.params,defaultShouldRevalidate:!0});if(typeof r==`boolean`)return r}return!0}):[]}function LS(e,t,{includeHydrateFallback:n}={}){return RS(e.map(e=>{let r=t.routes[e.route.id];if(!r)return[];let i=[r.module];return r.clientActionModule&&(i=i.concat(r.clientActionModule)),r.clientLoaderModule&&(i=i.concat(r.clientLoaderModule)),n&&r.hydrateFallbackModule&&(i=i.concat(r.hydrateFallbackModule)),r.imports&&(i=i.concat(r.imports)),i}).flat(1))}function RS(e){return[...new Set(e)]}function zS(e){let t={},n=Object.keys(e).sort();for(let r of n)t[r]=e[r];return t}function BS(e,t){let n=new Set,r=new Set(t);return e.reduce((e,i)=>{if(t&&!NS(i)&&i.as===`script`&&i.href&&r.has(i.href))return e;let a=JSON.stringify(zS(i));return n.has(a)||(n.add(a),e.push({key:a,link:i})),e},[])}function VS(){let e=w.useContext(_x);return AS(e,`You must render this element inside a <DataRouterContext.Provider> element`),e}function HS(){let e=w.useContext(vx);return AS(e,`You must render this element inside a <DataRouterStateContext.Provider> element`),e}var US=w.createContext(void 0);US.displayName=`FrameworkContext`;function WS(){let e=w.useContext(US);return AS(e,`You must render this element inside a <HydratedRouter> element`),e}function GS(e,t){let n=w.useContext(US),[r,i]=w.useState(!1),[a,o]=w.useState(!1),{onFocus:s,onBlur:c,onMouseEnter:l,onMouseLeave:u,onTouchStart:d}=t,f=w.useRef(null);w.useEffect(()=>{if(e===`render`&&o(!0),e===`viewport`){let e=new IntersectionObserver(e=>{e.forEach(e=>{o(e.isIntersecting)})},{threshold:.5});return f.current&&e.observe(f.current),()=>{e.disconnect()}}},[e]),w.useEffect(()=>{if(r){let e=setTimeout(()=>{o(!0)},100);return()=>{clearTimeout(e)}}},[r]);let p=()=>{i(!0)},m=()=>{i(!1),o(!1)};return n?e===`intent`?[a,f,{onFocus:KS(s,p),onBlur:KS(c,m),onMouseEnter:KS(l,p),onMouseLeave:KS(u,m),onTouchStart:KS(d,p)}]:[a,f,{}]:[!1,f,{}]}function KS(e,t){return n=>{e&&e(n),n.defaultPrevented||t(n)}}function qS({page:e,...t}){let n=bx(),{nonce:r}=WS(),{router:i}=VS(),a=w.useMemo(()=>kb(i.routes,e,i.basename),[i.routes,e,i.basename]);return a?(t.nonce==null&&r&&(t={...t,nonce:r}),n?w.createElement(YS,{page:e,matches:a,...t}):w.createElement(XS,{page:e,matches:a,...t})):null}function JS(e){let{manifest:t,routeModules:n}=WS(),[r,i]=w.useState([]);return w.useEffect(()=>{let r=!1;return FS(e,t,n).then(e=>{r||i(e)}),()=>{r=!0}},[e,t,n]),r}function YS({page:e,matches:t,...n}){let r=Fx(),{future:i}=WS(),{basename:a}=VS(),o=w.useMemo(()=>{if(e===r.pathname+r.search+r.hash)return[];let n=jS(e,a,i.v8_trailingSlashAwareDataRequests,`rsc`),o=!1,s=[];for(let e of t)typeof e.route.shouldRevalidate==`function`?o=!0:s.push(e.route.id);return o&&s.length>0&&n.searchParams.set(`_routes`,s.join(`,`)),[n.pathname+n.search]},[a,i.v8_trailingSlashAwareDataRequests,e,r,t]);return w.createElement(w.Fragment,null,o.map(e=>w.createElement(`link`,{key:e,rel:`prefetch`,as:`fetch`,href:e,...n})))}function XS({page:e,matches:t,...n}){let r=Fx(),{future:i,manifest:a,routeModules:o}=WS(),{basename:s}=VS(),{loaderData:c,matches:l}=HS(),u=w.useMemo(()=>IS(e,t,l,a,r,`data`),[e,t,l,a,r]),d=w.useMemo(()=>IS(e,t,l,a,r,`assets`),[e,t,l,a,r]),f=w.useMemo(()=>{if(e===r.pathname+r.search+r.hash)return[];let n=new Set,l=!1;if(t.forEach(e=>{let t=a.routes[e.route.id];!t||!t.hasLoader||(!u.some(t=>t.route.id===e.route.id)&&e.route.id in c&&o[e.route.id]?.shouldRevalidate||t.hasClientLoader?l=!0:n.add(e.route.id))}),n.size===0)return[];let d=jS(e,s,i.v8_trailingSlashAwareDataRequests,`data`);return l&&n.size>0&&d.searchParams.set(`_routes`,t.filter(e=>n.has(e.route.id)).map(e=>e.route.id).join(`,`)),[d.pathname+d.search]},[s,i.v8_trailingSlashAwareDataRequests,c,r,a,u,t,e,o]),p=w.useMemo(()=>LS(d,a),[d,a]),m=JS(d);return w.createElement(w.Fragment,null,f.map(e=>w.createElement(`link`,{key:e,rel:`prefetch`,as:`fetch`,href:e,...n})),p.map(e=>w.createElement(`link`,{key:e,rel:`modulepreload`,href:e,...n})),m.map(({key:e,link:t})=>w.createElement(`link`,{key:e,nonce:n.nonce,...t,crossOrigin:t.crossOrigin??n.crossOrigin})))}function ZS(...e){return t=>{e.forEach(e=>{typeof e==`function`?e(t):e!=null&&(e.current=t)})}}w.Component;var QS=typeof window<`u`&&window.document!==void 0&&window.document.createElement!==void 0;try{QS&&(window.__reactRouterVersion=`7.18.2`)}catch{}function $S({basename:e,children:t,useTransitions:n,window:r}){let i=w.useRef();i.current??=yb({window:r,v5Compat:!0});let a=i.current,[o,s]=w.useState({action:a.action,location:a.location}),c=w.useCallback(e=>{n===!1?s(e):w.startTransition(()=>s(e))},[n]);return w.useLayoutEffect(()=>a.listen(c),[a,c]),w.createElement(fS,{basename:e,children:t,location:o.location,navigationType:o.action,navigator:a,useTransitions:n})}var eC=w.forwardRef(function({onClick:e,discover:t=`render`,prefetch:n=`none`,relative:r,reloadDocument:i,replace:a,mask:o,state:s,target:c,to:l,preventScrollReset:u,viewTransition:d,defaultShouldRevalidate:f,...p},m){let{basename:h,navigator:g,useTransitions:_}=w.useContext(wx),v=typeof l==`string`&&mb.test(l),y=fx(l,h);l=y.to;let b=Nx(l,{relative:r}),x=Fx(),S=null;if(o){let e=tx(o,[],x.mask?x.mask.pathname:`/`,!0);h!==`/`&&(e.pathname=e.pathname===`/`?h:rx([h,e.pathname])),S=g.createHref(e)}let[C,T,E]=GS(n,p),D=aC(l,{replace:a,mask:o,state:s,target:c,preventScrollReset:u,relative:r,viewTransition:d,defaultShouldRevalidate:f,useTransitions:_});function O(t){e&&e(t),t.defaultPrevented||D(t)}let k=!(y.isExternal||i),A=w.createElement(`a`,{...p,...E,href:(k?S:void 0)||y.absoluteURL||b,onClick:k?O:e,ref:ZS(m,T),target:c,"data-discover":!v&&t===`render`?`true`:void 0});return C&&!v?w.createElement(w.Fragment,null,A,w.createElement(qS,{page:b})):A});eC.displayName=`Link`;var tC=w.forwardRef(function({"aria-current":e=`page`,caseSensitive:t=!1,className:n=``,end:r=!1,style:i,to:a,viewTransition:o,children:s,...c},l){let u=Ux(a,{relative:c.relative}),d=Fx(),f=w.useContext(vx),{navigator:p,basename:m}=w.useContext(wx),h=f!=null&&dC(u)&&o===!0,g=p.encodeLocation?p.encodeLocation(u).pathname:u.pathname,_=d.pathname,v=f&&f.navigation&&f.navigation.location?f.navigation.location.pathname:null;t||(_=_.toLowerCase(),v=v?v.toLowerCase():null,g=g.toLowerCase()),v&&m&&(v=Yb(v,m)||v);let y=g!==`/`&&g.endsWith(`/`)?g.length-1:g.length,b=_===g||!r&&_.startsWith(g)&&_.charAt(y)===`/`,x=v!=null&&(v===g||!r&&v.startsWith(g)&&v.charAt(g.length)===`/`),S={isActive:b,isPending:x,isTransitioning:h},C=b?e:void 0,T;T=typeof n==`function`?n(S):[n,b?`active`:null,x?`pending`:null,h?`transitioning`:null].filter(Boolean).join(` `);let E=typeof i==`function`?i(S):i;return w.createElement(eC,{...c,"aria-current":C,className:T,ref:l,style:E,to:a,viewTransition:o},typeof s==`function`?s(S):s)});tC.displayName=`NavLink`;var nC=w.forwardRef(({discover:e=`render`,fetcherKey:t,navigate:n,reloadDocument:r,replace:i,state:a,method:o=hS,action:s,onSubmit:c,relative:l,preventScrollReset:u,viewTransition:d,defaultShouldRevalidate:f,...p},m)=>{let{useTransitions:h}=w.useContext(wx),g=lC(),_=uC(s,{relative:l}),v=o.toLowerCase()===`get`?`get`:`post`,y=typeof s==`string`&&mb.test(s);return w.createElement(`form`,{ref:m,method:v,action:_,onSubmit:r?c:e=>{if(c&&c(e),e.defaultPrevented)return;e.preventDefault();let r=e.nativeEvent.submitter,s=r?.getAttribute(`formmethod`)||o,p=()=>g(r||e.currentTarget,{fetcherKey:t,method:s,navigate:n,replace:i,state:a,relative:l,preventScrollReset:u,viewTransition:d,defaultShouldRevalidate:f});h&&n!==!1?w.startTransition(()=>p()):p()},...p,"data-discover":!y&&e===`render`?`true`:void 0})});nC.displayName=`Form`;function rC(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function iC(e){let t=w.useContext(_x);return bb(t,rC(e)),t}function aC(e,{target:t,replace:n,mask:r,state:i,preventScrollReset:a,relative:o,viewTransition:s,defaultShouldRevalidate:c,useTransitions:l}={}){let u=Rx(),d=Fx(),f=Ux(e,{relative:o});return w.useCallback(p=>{if(SS(p,t)){p.preventDefault();let t=n===void 0?Tb(d)===Tb(f):n,m=()=>u(e,{replace:t,mask:r,state:i,preventScrollReset:a,relative:o,viewTransition:s,defaultShouldRevalidate:c});l?w.startTransition(()=>m()):m()}},[d,u,f,n,r,i,t,e,a,o,s,c,l])}function oC(e){xb(typeof URLSearchParams<`u`,"You cannot use the `useSearchParams` hook in a browser that does not support the URLSearchParams API. If you need to support Internet Explorer 11, we recommend you load a polyfill such as https://github.com/ungap/url-search-params.");let t=w.useRef(CS(e)),n=w.useRef(!1),r=Fx(),i=w.useMemo(()=>wS(r.search,n.current?null:t.current),[r.search]),a=Rx();return[i,w.useCallback((e,t)=>{let r=CS(typeof e==`function`?e(new URLSearchParams(i)):e);n.current=!0,a(`?`+r,t)},[a,i])]}var sC=0,cC=()=>`__${String(++sC)}__`;function lC(){let{router:e}=iC(`useSubmit`),{basename:t}=w.useContext(wx),n=iS(),r=e.fetch,i=e.navigate;return w.useCallback(async(e,a={})=>{let{action:o,method:s,encType:c,formData:l,body:u}=kS(e,t);if(a.navigate===!1){let e=a.fetcherKey||cC();await r(e,n,a.action||o,{defaultShouldRevalidate:a.defaultShouldRevalidate,preventScrollReset:a.preventScrollReset,formData:l,body:u,formMethod:a.method||s,formEncType:a.encType||c,flushSync:a.flushSync})}else await i(a.action||o,{defaultShouldRevalidate:a.defaultShouldRevalidate,preventScrollReset:a.preventScrollReset,formData:l,body:u,formMethod:a.method||s,formEncType:a.encType||c,replace:a.replace,state:a.state,fromRouteId:n,flushSync:a.flushSync,viewTransition:a.viewTransition})},[r,i,t,n])}function uC(e,{relative:t}={}){let{basename:n}=w.useContext(wx),r=w.useContext(Ex);bb(r,`useFormAction must be used inside a RouteContext`);let[i]=r.matches.slice(-1),a={...Ux(e||`.`,{relative:t})},o=Fx();if(e==null){a.search=o.search;let e=new URLSearchParams(a.search),t=e.getAll(`index`);if(t.some(e=>e===``)){e.delete(`index`),t.filter(e=>e).forEach(t=>e.append(`index`,t));let n=e.toString();a.search=n?`?${n}`:``}}return(!e||e===`.`)&&i.route.index&&(a.search=a.search?a.search.replace(/^\?/,`?index&`):`?index`),n!==`/`&&(a.pathname=a.pathname===`/`?n:rx([n,a.pathname])),Tb(a)}function dC(e,{relative:t}={}){let n=w.useContext(xx);bb(n!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:r}=iC(`useViewTransitionState`),i=Ux(e,{relative:t});if(!n.isTransitioning)return!1;let a=Yb(n.currentLocation.pathname,r)||n.currentLocation.pathname,o=Yb(n.nextLocation.pathname,r)||n.nextLocation.pathname;return Gb(i.pathname,o)!=null||Gb(i.pathname,a)!=null}var fC={outline:{xmlns:`http://www.w3.org/2000/svg`,width:24,height:24,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:2,strokeLinecap:`round`,strokeLinejoin:`round`},filled:{xmlns:`http://www.w3.org/2000/svg`,width:24,height:24,viewBox:`0 0 24 24`,fill:`currentColor`,stroke:`none`}},pC=(e,t,n,r)=>{let i=(0,w.forwardRef)(({color:n=`currentColor`,size:i=24,stroke:a=2,title:o,className:s,children:c,...l},u)=>(0,w.createElement)(`svg`,{ref:u,...fC[e],width:i,height:i,className:[`tabler-icon`,`tabler-icon-${t}`,s].join(` `),...e===`filled`?{fill:n}:{strokeWidth:a,stroke:n},...l},[o&&(0,w.createElement)(`title`,{key:`svg-title`},o),...r.map(([e,t])=>(0,w.createElement)(e,t)),...Array.isArray(c)?c:[c]]));return i.displayName=`${n}`,i},mC=pC(`outline`,`adjustments-horizontal`,`AdjustmentsHorizontal`,[[`path`,{d:`M12 6a2 2 0 1 0 4 0a2 2 0 1 0 -4 0`,key:`svg-0`}],[`path`,{d:`M4 6l8 0`,key:`svg-1`}],[`path`,{d:`M16 6l4 0`,key:`svg-2`}],[`path`,{d:`M6 12a2 2 0 1 0 4 0a2 2 0 1 0 -4 0`,key:`svg-3`}],[`path`,{d:`M4 12l2 0`,key:`svg-4`}],[`path`,{d:`M10 12l10 0`,key:`svg-5`}],[`path`,{d:`M15 18a2 2 0 1 0 4 0a2 2 0 1 0 -4 0`,key:`svg-6`}],[`path`,{d:`M4 18l11 0`,key:`svg-7`}],[`path`,{d:`M19 18l1 0`,key:`svg-8`}]]),hC=pC(`outline`,`alert-circle`,`AlertCircle`,[[`path`,{d:`M3 12a9 9 0 1 0 18 0a9 9 0 0 0 -18 0`,key:`svg-0`}],[`path`,{d:`M12 8v4`,key:`svg-1`}],[`path`,{d:`M12 16h.01`,key:`svg-2`}]]),gC=pC(`outline`,`alert-triangle`,`AlertTriangle`,[[`path`,{d:`M12 9v4`,key:`svg-0`}],[`path`,{d:`M10.363 3.591l-8.106 13.534a1.914 1.914 0 0 0 1.636 2.871h16.214a1.914 1.914 0 0 0 1.636 -2.87l-8.106 -13.536a1.914 1.914 0 0 0 -3.274 0`,key:`svg-1`}],[`path`,{d:`M12 16h.01`,key:`svg-2`}]]),_C=pC(`outline`,`arrow-back-up`,`ArrowBackUp`,[[`path`,{d:`M9 14l-4 -4l4 -4`,key:`svg-0`}],[`path`,{d:`M5 10h11a4 4 0 1 1 0 8h-1`,key:`svg-1`}]]),vC=pC(`outline`,`arrow-left`,`ArrowLeft`,[[`path`,{d:`M5 12l14 0`,key:`svg-0`}],[`path`,{d:`M5 12l6 6`,key:`svg-1`}],[`path`,{d:`M5 12l6 -6`,key:`svg-2`}]]),yC=pC(`outline`,`arrow-right`,`ArrowRight`,[[`path`,{d:`M5 12l14 0`,key:`svg-0`}],[`path`,{d:`M13 18l6 -6`,key:`svg-1`}],[`path`,{d:`M13 6l6 6`,key:`svg-2`}]]),bC=pC(`outline`,`arrows-diff`,`ArrowsDiff`,[[`path`,{d:`M11 16h10`,key:`svg-0`}],[`path`,{d:`M11 16l4 4`,key:`svg-1`}],[`path`,{d:`M11 16l4 -4`,key:`svg-2`}],[`path`,{d:`M13 8h-10`,key:`svg-3`}],[`path`,{d:`M13 8l-4 4`,key:`svg-4`}],[`path`,{d:`M13 8l-4 -4`,key:`svg-5`}]]),xC=pC(`outline`,`book`,`Book`,[[`path`,{d:`M3 19a9 9 0 0 1 9 0a9 9 0 0 1 9 0`,key:`svg-0`}],[`path`,{d:`M3 6a9 9 0 0 1 9 0a9 9 0 0 1 9 0`,key:`svg-1`}],[`path`,{d:`M3 6l0 13`,key:`svg-2`}],[`path`,{d:`M12 6l0 13`,key:`svg-3`}],[`path`,{d:`M21 6l0 13`,key:`svg-4`}]]),SC=pC(`outline`,`check`,`Check`,[[`path`,{d:`M5 12l5 5l10 -10`,key:`svg-0`}]]),CC=pC(`outline`,`chevron-down`,`ChevronDown`,[[`path`,{d:`M6 9l6 6l6 -6`,key:`svg-0`}]]),wC=pC(`outline`,`chevron-left`,`ChevronLeft`,[[`path`,{d:`M15 6l-6 6l6 6`,key:`svg-0`}]]),TC=pC(`outline`,`chevron-right`,`ChevronRight`,[[`path`,{d:`M9 6l6 6l-6 6`,key:`svg-0`}]]),EC=pC(`outline`,`chevrons-left`,`ChevronsLeft`,[[`path`,{d:`M11 7l-5 5l5 5`,key:`svg-0`}],[`path`,{d:`M17 7l-5 5l5 5`,key:`svg-1`}]]),DC=pC(`outline`,`chevrons-right`,`ChevronsRight`,[[`path`,{d:`M7 7l5 5l-5 5`,key:`svg-0`}],[`path`,{d:`M13 7l5 5l-5 5`,key:`svg-1`}]]),OC=pC(`outline`,`clock`,`Clock`,[[`path`,{d:`M3 12a9 9 0 1 0 18 0a9 9 0 0 0 -18 0`,key:`svg-0`}],[`path`,{d:`M12 7v5l3 3`,key:`svg-1`}]]),kC=pC(`outline`,`copy`,`Copy`,[[`path`,{d:`M7 9.667a2.667 2.667 0 0 1 2.667 -2.667h8.666a2.667 2.667 0 0 1 2.667 2.667v8.666a2.667 2.667 0 0 1 -2.667 2.667h-8.666a2.667 2.667 0 0 1 -2.667 -2.667l0 -8.666`,key:`svg-0`}],[`path`,{d:`M4.012 16.737a2.005 2.005 0 0 1 -1.012 -1.737v-10c0 -1.1 .9 -2 2 -2h10c.75 0 1.158 .385 1.5 1`,key:`svg-1`}]]),AC=pC(`outline`,`database`,`Database`,[[`path`,{d:`M4 6a8 3 0 1 0 16 0a8 3 0 1 0 -16 0`,key:`svg-0`}],[`path`,{d:`M4 6v6a8 3 0 0 0 16 0v-6`,key:`svg-1`}],[`path`,{d:`M4 12v6a8 3 0 0 0 16 0v-6`,key:`svg-2`}]]),jC=pC(`outline`,`device-desktop`,`DeviceDesktop`,[[`path`,{d:`M3 5a1 1 0 0 1 1 -1h16a1 1 0 0 1 1 1v10a1 1 0 0 1 -1 1h-16a1 1 0 0 1 -1 -1v-10`,key:`svg-0`}],[`path`,{d:`M7 20h10`,key:`svg-1`}],[`path`,{d:`M9 16v4`,key:`svg-2`}],[`path`,{d:`M15 16v4`,key:`svg-3`}]]),MC=pC(`outline`,`dots`,`Dots`,[[`path`,{d:`M4 12a1 1 0 1 0 2 0a1 1 0 1 0 -2 0`,key:`svg-0`}],[`path`,{d:`M11 12a1 1 0 1 0 2 0a1 1 0 1 0 -2 0`,key:`svg-1`}],[`path`,{d:`M18 12a1 1 0 1 0 2 0a1 1 0 1 0 -2 0`,key:`svg-2`}]]),NC=pC(`outline`,`download`,`Download`,[[`path`,{d:`M4 17v2a2 2 0 0 0 2 2h12a2 2 0 0 0 2 -2v-2`,key:`svg-0`}],[`path`,{d:`M7 11l5 5l5 -5`,key:`svg-1`}],[`path`,{d:`M12 4l0 12`,key:`svg-2`}]]),PC=pC(`outline`,`edit`,`Edit`,[[`path`,{d:`M7 7h-1a2 2 0 0 0 -2 2v9a2 2 0 0 0 2 2h9a2 2 0 0 0 2 -2v-1`,key:`svg-0`}],[`path`,{d:`M20.385 6.585a2.1 2.1 0 0 0 -2.97 -2.97l-8.415 8.385v3h3l8.385 -8.415`,key:`svg-1`}],[`path`,{d:`M16 5l3 3`,key:`svg-2`}]]),FC=pC(`outline`,`file-text`,`FileText`,[[`path`,{d:`M14 3v4a1 1 0 0 0 1 1h4`,key:`svg-0`}],[`path`,{d:`M17 21h-10a2 2 0 0 1 -2 -2v-14a2 2 0 0 1 2 -2h7l5 5v11a2 2 0 0 1 -2 2`,key:`svg-1`}],[`path`,{d:`M9 9l1 0`,key:`svg-2`}],[`path`,{d:`M9 13l6 0`,key:`svg-3`}],[`path`,{d:`M9 17l6 0`,key:`svg-4`}]]),IC=pC(`outline`,`flask`,`Flask`,[[`path`,{d:`M9 3l6 0`,key:`svg-0`}],[`path`,{d:`M10 9l4 0`,key:`svg-1`}],[`path`,{d:`M10 3v6l-4 11a.7 .7 0 0 0 .5 1h11a.7 .7 0 0 0 .5 -1l-4 -11v-6`,key:`svg-2`}]]),LC=pC(`outline`,`folder`,`Folder`,[[`path`,{d:`M5 4h4l3 3h7a2 2 0 0 1 2 2v8a2 2 0 0 1 -2 2h-14a2 2 0 0 1 -2 -2v-11a2 2 0 0 1 2 -2`,key:`svg-0`}]]),RC=pC(`outline`,`history`,`History`,[[`path`,{d:`M12 8l0 4l2 2`,key:`svg-0`}],[`path`,{d:`M3.05 11a9 9 0 1 1 .5 4m-.5 5v-5h5`,key:`svg-1`}]]),zC=pC(`outline`,`link`,`Link`,[[`path`,{d:`M9 15l6 -6`,key:`svg-0`}],[`path`,{d:`M11 6l.463 -.536a5 5 0 0 1 7.071 7.072l-.534 .464`,key:`svg-1`}],[`path`,{d:`M13 18l-.397 .534a5.068 5.068 0 0 1 -7.127 0a4.972 4.972 0 0 1 0 -7.071l.524 -.463`,key:`svg-2`}]]),BC=pC(`outline`,`list`,`List`,[[`path`,{d:`M9 6l11 0`,key:`svg-0`}],[`path`,{d:`M9 12l11 0`,key:`svg-1`}],[`path`,{d:`M9 18l11 0`,key:`svg-2`}],[`path`,{d:`M5 6l0 .01`,key:`svg-3`}],[`path`,{d:`M5 12l0 .01`,key:`svg-4`}],[`path`,{d:`M5 18l0 .01`,key:`svg-5`}]]),VC=pC(`outline`,`lock-open`,`LockOpen`,[[`path`,{d:`M5 13a2 2 0 0 1 2 -2h10a2 2 0 0 1 2 2v6a2 2 0 0 1 -2 2h-10a2 2 0 0 1 -2 -2l0 -6`,key:`svg-0`}],[`path`,{d:`M11 16a1 1 0 1 0 2 0a1 1 0 1 0 -2 0`,key:`svg-1`}],[`path`,{d:`M8 11v-5a4 4 0 0 1 8 0`,key:`svg-2`}]]),HC=pC(`outline`,`lock`,`Lock`,[[`path`,{d:`M5 13a2 2 0 0 1 2 -2h10a2 2 0 0 1 2 2v6a2 2 0 0 1 -2 2h-10a2 2 0 0 1 -2 -2v-6`,key:`svg-0`}],[`path`,{d:`M11 16a1 1 0 1 0 2 0a1 1 0 0 0 -2 0`,key:`svg-1`}],[`path`,{d:`M8 11v-4a4 4 0 1 1 8 0v4`,key:`svg-2`}]]),UC=pC(`outline`,`map-pin`,`MapPin`,[[`path`,{d:`M9 11a3 3 0 1 0 6 0a3 3 0 0 0 -6 0`,key:`svg-0`}],[`path`,{d:`M17.657 16.657l-4.243 4.243a2 2 0 0 1 -2.827 0l-4.244 -4.243a8 8 0 1 1 11.314 0`,key:`svg-1`}]]),WC=pC(`outline`,`moon`,`Moon`,[[`path`,{d:`M12 3c.132 0 .263 0 .393 0a7.5 7.5 0 0 0 7.92 12.446a9 9 0 1 1 -8.313 -12.454l0 .008`,key:`svg-0`}]]),GC=pC(`outline`,`player-play`,`PlayerPlay`,[[`path`,{d:`M7 4v16l13 -8l-13 -8`,key:`svg-0`}]]),KC=pC(`outline`,`plus`,`Plus`,[[`path`,{d:`M12 5l0 14`,key:`svg-0`}],[`path`,{d:`M5 12l14 0`,key:`svg-1`}]]),qC=pC(`outline`,`robot`,`Robot`,[[`path`,{d:`M6 6a2 2 0 0 1 2 -2h8a2 2 0 0 1 2 2v4a2 2 0 0 1 -2 2h-8a2 2 0 0 1 -2 -2l0 -4`,key:`svg-0`}],[`path`,{d:`M12 2v2`,key:`svg-1`}],[`path`,{d:`M9 12v9`,key:`svg-2`}],[`path`,{d:`M15 12v9`,key:`svg-3`}],[`path`,{d:`M5 16l4 -2`,key:`svg-4`}],[`path`,{d:`M15 14l4 2`,key:`svg-5`}],[`path`,{d:`M9 18h6`,key:`svg-6`}],[`path`,{d:`M10 8v.01`,key:`svg-7`}],[`path`,{d:`M14 8v.01`,key:`svg-8`}]]),JC=pC(`outline`,`search`,`Search`,[[`path`,{d:`M3 10a7 7 0 1 0 14 0a7 7 0 1 0 -14 0`,key:`svg-0`}],[`path`,{d:`M21 21l-6 -6`,key:`svg-1`}]]),YC=pC(`outline`,`sparkles`,`Sparkles`,[[`path`,{d:`M16 18a2 2 0 0 1 2 2a2 2 0 0 1 2 -2a2 2 0 0 1 -2 -2a2 2 0 0 1 -2 2m0 -12a2 2 0 0 1 2 2a2 2 0 0 1 2 -2a2 2 0 0 1 -2 -2a2 2 0 0 1 -2 2m-7 12a6 6 0 0 1 6 -6a6 6 0 0 1 -6 -6a6 6 0 0 1 -6 6a6 6 0 0 1 6 6`,key:`svg-0`}]]),XC=pC(`outline`,`stack-2`,`Stack2`,[[`path`,{d:`M12 4l-8 4l8 4l8 -4l-8 -4`,key:`svg-0`}],[`path`,{d:`M4 12l8 4l8 -4`,key:`svg-1`}],[`path`,{d:`M4 16l8 4l8 -4`,key:`svg-2`}]]),ZC=pC(`outline`,`sun`,`Sun`,[[`path`,{d:`M8 12a4 4 0 1 0 8 0a4 4 0 1 0 -8 0`,key:`svg-0`}],[`path`,{d:`M3 12h1m8 -9v1m8 8h1m-9 8v1m-6.4 -15.4l.7 .7m12.1 -.7l-.7 .7m0 11.4l.7 .7m-12.1 -.7l-.7 .7`,key:`svg-1`}]]),QC=pC(`outline`,`terminal-2`,`Terminal2`,[[`path`,{d:`M8 9l3 3l-3 3`,key:`svg-0`}],[`path`,{d:`M13 15l3 0`,key:`svg-1`}],[`path`,{d:`M3 6a2 2 0 0 1 2 -2h14a2 2 0 0 1 2 2v12a2 2 0 0 1 -2 2h-14a2 2 0 0 1 -2 -2l0 -12`,key:`svg-2`}]]),$C=pC(`outline`,`trash`,`Trash`,[[`path`,{d:`M4 7l16 0`,key:`svg-0`}],[`path`,{d:`M10 11l0 6`,key:`svg-1`}],[`path`,{d:`M14 11l0 6`,key:`svg-2`}],[`path`,{d:`M5 7l1 12a2 2 0 0 0 2 2h8a2 2 0 0 0 2 -2l1 -12`,key:`svg-3`}],[`path`,{d:`M9 7v-3a1 1 0 0 1 1 -1h4a1 1 0 0 1 1 1v3`,key:`svg-4`}]]),ew=pC(`outline`,`upload`,`Upload`,[[`path`,{d:`M4 17v2a2 2 0 0 0 2 2h12a2 2 0 0 0 2 -2v-2`,key:`svg-0`}],[`path`,{d:`M7 9l5 -5l5 5`,key:`svg-1`}],[`path`,{d:`M12 4l0 12`,key:`svg-2`}]]),tw=pC(`outline`,`x`,`X`,[[`path`,{d:`M18 6l-12 12`,key:`svg-0`}],[`path`,{d:`M6 6l12 12`,key:`svg-1`}]]),nw=lb(),rw=`/api/v1`,iw=class extends Error{status;statusText;body;constructor(e,t,n){let r=``;try{let e=JSON.parse(n);typeof e.detail==`string`&&e.detail&&(r=e.detail)}catch{}super(r?`${r} (HTTP ${e})`:`API error ${e}: ${t}`),this.name=`ApiError`,this.status=e,this.statusText=t,this.body=n}},aw=class extends iw{errorMessage;see;note;constructor(e,t){super(503,`Service Unavailable`,e),this.name=`V07IngestionDeferredError`,this.errorMessage=t.error,this.see=t.see??null,this.note=t.note??null}};function ow(e){try{let t=JSON.parse(e),n=t.error;return typeof n!=`string`||!n.toLowerCase().includes(`v0.7`)?null:{error:n,see:typeof t.see==`string`?t.see:void 0,note:typeof t.note==`string`?t.note:void 0}}catch{}return null}async function sw(e,t){let n=`${rw}${e}`,r=await fetch(n,{...t,headers:{"Content-Type":`application/json`,...t?.headers}});if(!r.ok){let e=await r.text();if(r.status===503){let t=ow(e);if(t)throw new aw(e,t)}throw new iw(r.status,r.statusText,e)}return r.json()}async function cw(e){if(e.status!==503)return null;let t=await e.text(),n=ow(t);return n?new aw(t,n):null}function lw(e){let t=Object.entries(e).filter(([,e])=>e!==void 0&&e!==``);return t.length===0?``:`?`+new URLSearchParams(t.map(([e,t])=>[e,String(t)])).toString()}async function uw(){return sw(`/preferences`)}async function dw(e){await sw(`/preferences`,{method:`PUT`,body:JSON.stringify(e)})}function fw(){let{colorScheme:e,setColorScheme:t}=nn();return(0,w.useEffect)(()=>{let n=!1;return uw().then(r=>{!n&&r.theme&&r.theme!==e&&t(r.theme)}).catch(()=>{}),()=>{n=!0}},[]),{theme:e,setTheme:e=>{t(e),dw({theme:e}).catch(()=>{})}}}async function pw(){return sw(`/version`)}function mw(){let{data:e}=ib({queryKey:[`version`],queryFn:pw,staleTime:1/0,retry:!1}),t=e?.env_label?.trim();return t?(0,G.jsxs)(Nd,{icon:(0,G.jsx)(IC,{size:18}),color:`grape`,withCloseButton:!1,mb:`md`,"data-testid":`environment-banner`,children:[(0,G.jsxs)(Y,{size:`sm`,fw:600,children:[t.toUpperCase(),` environment — not production.`]}),(0,G.jsxs)(Y,{size:`xs`,c:`dimmed`,children:[`This server is running against the `,(0,G.jsx)(Y,{span:!0,fw:600,children:t}),` `,`database. Changes made here do not affect production.`]})]}):null}var hw=`/api/v1`;async function gw(){let e=await fetch(`${hw}/docs`);if(!e.ok)throw Error(`Failed to load docs index: ${e.status}`);return e.json()}async function _w(e){let t=await fetch(`${hw}/docs/${e.split(`/`).map(encodeURIComponent).join(`/`)}`);if(!t.ok)throw Error(`Failed to load doc '${e}': ${t.status}`);return t.text()}async function vw(){let e=await fetch(`${hw}/schema-version`);if(!e.ok)throw Error(`Failed to load schema version: ${e.status}`);return e.json()}function yw(){let{data:e}=ib({queryKey:[`schema-version`],queryFn:vw,refetchInterval:6e4,staleTime:3e4,retry:!1}),t=e?.level===`below-min`;return!e||!t&&!e.mismatch?null:(0,G.jsxs)(Nd,{icon:(0,G.jsx)(gC,{size:18}),color:t?`red`:`yellow`,title:t?`Database schema is incompatible`:`Database schema out of date`,withCloseButton:!1,mb:`md`,children:[(0,G.jsx)(Y,{size:`sm`,children:t?(0,G.jsxs)(G.Fragment,{children:[`This Cerefox client (v`,e.bundled,`) requires schema v`,e.min,` or newer, but your Supabase has v`,e.deployed??`unknown`,`. Features will not work correctly until you redeploy.`]}):(0,G.jsxs)(G.Fragment,{children:[`Cerefox v`,e.bundled,` ships a newer schema than what is currently deployed to your Supabase (v`,e.deployed??`unknown`,`). Some features may behave incorrectly until you redeploy.`]})}),(0,G.jsx)(Y,{size:`sm`,mt:`xs`,children:`Redeploy with the Cerefox CLI:`}),(0,G.jsx)(Ap,{block:!0,mt:`xs`,children:`cerefox deploy-server --schema-only`})]})}var bw=`https://github.com/fstamatelopoulos/cerefox/releases`;function xw(){let{data:e}=ib({queryKey:[`version`],queryFn:pw,staleTime:1/0,retry:!1});if(!e)return null;let t=`${bw}/tag/v${e.version}`,n=e.git_commit_short?` (${e.git_commit_short})`:``;return(0,G.jsx)(El,{justify:`center`,py:`sm`,gap:`xs`,children:(0,G.jsxs)(Y,{size:`xs`,c:`dimmed`,children:[`Cerefox`,` `,(0,G.jsxs)(Bd,{href:t,target:`_blank`,rel:`noopener noreferrer`,size:`xs`,c:`dimmed`,underline:`hover`,children:[`v`,e.version]}),n]})})}var Sw=[{label:`Dashboard`,path:`/`},{label:`Search`,path:`/search`},{label:`Metadata Search`,path:`/metadata-search`},{label:`Ingest`,path:`/ingest`},{label:`Projects`,path:`/projects`},{label:`Audit Log`,path:`/audit-log`},{label:`Trash`,path:`/trash`},{label:`Analytics`,path:`/analytics`},{label:`Settings`,path:`/settings`},{label:`Help`,path:`/help`}],Cw=[{value:`light`,label:`Light`,icon:ZC},{value:`dark`,label:`Dark`,icon:WC},{value:`auto`,label:`System`,icon:jC}];function ww(){let e=Rx(),t=Fx(),{theme:n,setTheme:r}=fw(),i=n===`light`?ZC:n===`dark`?WC:jC;return(0,G.jsxs)(df,{header:{height:56},padding:`xs`,children:[(0,G.jsxs)(df.Header,{style:{position:`relative`},children:[(0,G.jsxs)(El,{h:`100%`,px:`md`,justify:`space-between`,children:[(0,G.jsxs)(El,{gap:`sm`,children:[(0,G.jsx)(`img`,{src:`/app/cerefox_icon.png`,alt:`Cerefox`,height:32,width:32,style:{borderRadius:4}}),(0,G.jsxs)(Y,{component:`span`,onClick:()=>e(`/`),style:{fontFamily:`var(--font-display)`,fontSize:18,fontWeight:600,letterSpacing:`-0.01em`,cursor:`pointer`},children:[`Cere`,(0,G.jsx)(`span`,{style:{color:`var(--primary)`},children:`fox`})]})]}),(0,G.jsxs)(El,{gap:`lg`,children:[Sw.map(n=>(0,G.jsx)(sc,{onClick:()=>e(n.path),children:(0,G.jsx)(Y,{size:`sm`,fw:t.pathname===n.path?700:400,c:t.pathname===n.path?void 0:`dimmed`,children:n.label})},n.label)),(0,G.jsxs)(Jm,{position:`bottom-end`,withArrow:!0,shadow:`md`,width:150,children:[(0,G.jsx)(Jm.Target,{children:(0,G.jsx)(gl,{variant:`subtle`,size:`lg`,title:`Color theme`,"aria-label":`Color theme`,children:(0,G.jsx)(i,{size:18})})}),(0,G.jsxs)(Jm.Dropdown,{children:[(0,G.jsx)(Jm.Label,{children:`Theme`}),Cw.map(e=>{let t=e.icon;return(0,G.jsx)(Jm.Item,{leftSection:(0,G.jsx)(t,{size:16}),rightSection:n===e.value?(0,G.jsx)(SC,{size:14}):null,onClick:()=>r(e.value),children:e.label},e.value)})]})]})]})]}),(0,G.jsx)(`div`,{style:{position:`absolute`,left:0,right:0,bottom:0,height:2,background:`linear-gradient(90deg, var(--primary), var(--violet) 60%, transparent)`}})]}),(0,G.jsxs)(df.Main,{children:[(0,G.jsx)(mw,{}),(0,G.jsx)(yw,{}),(0,G.jsx)(uS,{}),(0,G.jsx)(xw,{})]})]})}async function Tw(e){return sw(`/audit-log${lw(e??{})}`)}async function Ew(e,t){return sw(`/documents/${e}/review-status`,{method:`POST`,body:JSON.stringify({status:t})})}async function Dw(e,t,n){return sw(`/documents/${e}/versions/${t}/archive`,{method:`POST`,body:JSON.stringify({archived:n})})}var X={eyebrow:`_eyebrow_jg14y_6`,pageTitle:`_pageTitle_jg14y_25`,pageSub:`_pageSub_jg14y_34`,mono:`_mono_jg14y_44`,dim:`_dim_jg14y_45`,faint:`_faint_jg14y_46`,col:`_col_jg14y_47`,row:`_row_jg14y_48`,link:`_link_jg14y_49`,btn:`_btn_jg14y_59`,btnPrimary:`_btnPrimary_jg14y_74`,btnGhost:`_btnGhost_jg14y_84`,btnSubtle:`_btnSubtle_jg14y_93`,btnDanger:`_btnDanger_jg14y_105`,btnWarn:`_btnWarn_jg14y_111`,card:`_card_jg14y_121`,cardPad:`_cardPad_jg14y_127`,badge:`_badge_jg14y_130`,bPrimary:`_bPrimary_jg14y_142`,bViolet:`_bViolet_jg14y_143`,bBlue:`_bBlue_jg14y_144`,bGreen:`_bGreen_jg14y_145`,bYellow:`_bYellow_jg14y_146`,bRed:`_bRed_jg14y_147`,bNeutral:`_bNeutral_jg14y_148`,secHead:`_secHead_jg14y_151`,secTitle:`_secTitle_jg14y_157`,countPill:`_countPill_jg14y_168`,srcChip:`_srcChip_jg14y_180`,srcChipAgent:`_srcChipAgent_jg14y_193`,whatis:`_whatis_jg14y_200`,pageHead:`_pageHead_jg14y_219`,divider:`_divider_jg14y_228`,iconBtn:`_iconBtn_jg14y_104`,iconBtnSm:`_iconBtnSm_jg14y_253`,iconBtnDanger:`_iconBtnDanger_jg14y_104`,seg:`_seg_jg14y_277`,segBtn:`_segBtn_jg14y_285`,segBtnOn:`_segBtnOn_jg14y_304`,chip:`_chip_jg14y_311`,chipOn:`_chipOn_jg14y_330`,selectWrap:`_selectWrap_jg14y_337`,selectEl:`_selectEl_jg14y_351`,cliCard:`_cliCard_jg14y_370`,cliBlock:`_cliBlock_jg14y_374`,cliP:`_cliP_jg14y_383`,cliS:`_cliS_jg14y_387`,cliOut:`_cliOut_jg14y_390`,cliLine:`_cliLine_jg14y_396`,cliLineCmd:`_cliLineCmd_jg14y_404`,cliCopyBtn:`_cliCopyBtn_jg14y_411`,cliHintBlock:`_cliHintBlock_jg14y_427`,cliHintArgs:`_cliHintArgs_jg14y_445`,rise:`_rise_jg14y_453`};function Ow({cmd:e,args:t,docPath:n=`guides/cli.md`}){let r=Rx(),[i,a]=(0,w.useState)(!1),o=(0,w.useRef)(null),s=t?`${e} ${t}`:e;return(0,w.useEffect)(()=>()=>{o.current&&clearTimeout(o.current)},[]),(0,G.jsxs)(`span`,{style:{display:`inline-flex`,alignItems:`center`,gap:8,flexWrap:`wrap`,justifyContent:`flex-end`},children:[(0,G.jsxs)(`button`,{type:`button`,className:X.cliHintBlock,title:i?`Copied!`:`Copy command to clipboard`,onClick:()=>{navigator.clipboard?.writeText(s),a(!0),o.current&&clearTimeout(o.current),o.current=setTimeout(()=>a(!1),1200)},children:[(0,G.jsx)(`span`,{style:{color:`var(--primary)`},children:`$`}),(0,G.jsx)(`span`,{children:e}),t&&(0,G.jsx)(`span`,{className:X.cliHintArgs,children:t}),i?(0,G.jsx)(SC,{size:12,style:{color:`var(--green)`,flexShrink:0}}):(0,G.jsx)(kC,{size:12,style:{color:`var(--text-faint)`,flexShrink:0}})]}),(0,G.jsx)(`button`,{type:`button`,className:X.whatis,onClick:()=>r(`/help/${n}`),children:`cli docs`})]})}var kw=`cerefox:rowsPerPage`,Aw=[10,25,50,100],jw=10;function Mw(){try{let e=Number(localStorage.getItem(kw));if(Aw.includes(e))return e}catch{}return jw}function Nw(){let[e,t]=(0,w.useState)(Mw);return[e,e=>{t(e);try{localStorage.setItem(kw,String(e))}catch{}}]}var Pw={wrap:`_wrap_17ha0_4`,toolbar:`_toolbar_17ha0_11`,search:`_search_17ha0_18`,count:`_count_17ha0_49`,tbl:`_tbl_17ha0_58`,actions:`_actions_17ha0_92`,foot:`_foot_17ha0_99`,pgBtn:`_pgBtn_17ha0_110`,emptyRow:`_emptyRow_17ha0_130`,faint:`_faint_17ha0_135`};function Fw({page:e,pageCount:t,total:n,pageSize:r,onPage:i,onPageSize:a,loading:o=!1}){let s=n===0?0:(e-1)*r+1,c=Math.min(n,(e-1)*r+r),l=e<=1,u=e>=t;return(0,G.jsxs)(`div`,{className:Pw.foot,children:[(0,G.jsxs)(`span`,{className:Pw.faint,children:[n===0?`0`:`${s}–${c}`,` of `,n,o?` · loading…`:``]}),(0,G.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:8},children:[(0,G.jsx)(`span`,{className:Pw.faint,style:{fontSize:11.5},children:`Rows`}),(0,G.jsx)(`span`,{className:X.selectWrap,style:{height:28},children:(0,G.jsx)(`select`,{className:X.selectEl,value:r,onChange:e=>a(Number(e.currentTarget.value)),"aria-label":`Rows per page`,children:Aw.map(e=>(0,G.jsx)(`option`,{value:e,children:e},e))})}),(0,G.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:6},children:[(0,G.jsx)(`button`,{type:`button`,className:Pw.pgBtn,disabled:l,onClick:()=>i(1),"aria-label":`First page`,children:(0,G.jsx)(EC,{size:14})}),(0,G.jsx)(`button`,{type:`button`,className:Pw.pgBtn,disabled:l,onClick:()=>i(e-1),"aria-label":`Previous page`,children:(0,G.jsx)(wC,{size:14})}),(0,G.jsxs)(`span`,{className:Pw.faint,children:[`page `,e,` / `,t]}),(0,G.jsx)(`button`,{type:`button`,className:Pw.pgBtn,disabled:u,onClick:()=>i(e+1),"aria-label":`Next page`,children:(0,G.jsx)(TC,{size:14})}),(0,G.jsx)(`button`,{type:`button`,className:Pw.pgBtn,disabled:u,onClick:()=>i(t),"aria-label":`Last page`,children:(0,G.jsx)(DC,{size:14})})]})]})]})}function Iw({eyebrow:e,title:t,subtitle:n,headerRight:r,toolbarExtra:i,searchValue:a,onSearchChange:o,searchPlaceholder:s=`Filter…`,searchText:c,columns:l,rows:u,rowKey:d,rowClick:f,actions:p,loading:m=!1,emptyText:h=`No matching rows.`}){let[g,_]=(0,w.useState)(0),[v,y]=Nw(),b=(0,w.useMemo)(()=>{let e=a.trim().toLowerCase();return!e||!c?u:u.filter(t=>c(t).toLowerCase().includes(e))},[u,a,c]),x=b.length,S=Math.max(1,Math.ceil(x/v)),C=Math.min(g,S-1),T=b.slice(C*v,C*v+v),E=!!p,D=l.length+ +!!E;return(0,G.jsxs)(`div`,{className:Pw.wrap,children:[(0,G.jsxs)(`div`,{className:X.pageHead,children:[(0,G.jsxs)(`div`,{children:[(0,G.jsx)(`p`,{className:X.eyebrow,children:e}),(0,G.jsx)(`h1`,{className:X.pageTitle,"data-testid":`page-title`,children:t}),n&&(0,G.jsx)(`p`,{className:X.pageSub,children:n})]}),r]}),(0,G.jsxs)(`div`,{className:Pw.toolbar,children:[(0,G.jsxs)(`span`,{className:Pw.search,children:[(0,G.jsx)(JC,{size:16}),(0,G.jsx)(`input`,{value:a,onChange:e=>{o(e.currentTarget.value),_(0)},placeholder:s})]}),i,(0,G.jsxs)(`span`,{className:Pw.count,children:[x,` `,x===1?`row`:`rows`]})]}),(0,G.jsxs)(`div`,{className:`${X.card} ${X.rise}`,style:{overflow:`hidden`},children:[(0,G.jsxs)(`table`,{className:Pw.tbl,children:[(0,G.jsx)(`thead`,{children:(0,G.jsxs)(`tr`,{children:[l.map(e=>(0,G.jsx)(`th`,{style:{width:e.width,textAlign:e.align??`left`},children:e.label},e.key)),E&&(0,G.jsx)(`th`,{style:{width:1}})]})}),(0,G.jsx)(`tbody`,{children:m?(0,G.jsx)(`tr`,{children:(0,G.jsx)(`td`,{colSpan:D,className:Pw.emptyRow,children:`Loading…`})}):T.length===0?(0,G.jsx)(`tr`,{children:(0,G.jsx)(`td`,{colSpan:D,className:Pw.emptyRow,children:h})}):T.map(e=>(0,G.jsxs)(`tr`,{style:f?{cursor:`pointer`}:void 0,onClick:f?()=>f(e):void 0,children:[l.map(t=>(0,G.jsx)(`td`,{style:{textAlign:t.align??`left`},children:t.render(e)},t.key)),E&&(0,G.jsx)(`td`,{onClick:e=>e.stopPropagation(),children:(0,G.jsx)(`div`,{className:Pw.actions,children:p(e)})})]},d(e)))})]}),(0,G.jsx)(Fw,{page:C+1,pageCount:S,total:x,pageSize:v,onPage:e=>_(e-1),onPageSize:e=>{y(e),_(0)}})]})]})}function Lw(e){return e?new Date(e).toLocaleDateString():``}function Rw(e){if(!e)return``;let t=new Date(e);return t.toLocaleDateString()+` `+t.toLocaleTimeString([],{hour:`2-digit`,minute:`2-digit`})}var zw=[`config-change`,`project-create`,`project-edit`,`project-delete`];[...zw];var Bw=[{value:`config-change`,label:`Config change`,tone:`yellow`},{value:`project-create`,label:`Project create`,tone:`green`},{value:`project-edit`,label:`Project edit`,tone:`violet`},{value:`project-delete`,label:`Project delete`,tone:`red`}],Vw=new Set(zw),Hw=[{value:``,label:`All operations`},{value:`create`,label:`Create`},{value:`update-content`,label:`Update content`},{value:`update-metadata`,label:`Update metadata`},{value:`insert`,label:`Insert (partial edit)`},{value:`replace-section`,label:`Replace section`},{value:`delete-section`,label:`Delete section`},{value:`rename-section`,label:`Rename section`},{value:`delete`,label:`Delete`},{value:`restore`,label:`Restore`},{value:`status-change`,label:`Status change`},{value:`archive`,label:`Archive`},{value:`unarchive`,label:`Unarchive`},...Bw.map(e=>({value:e.value,label:e.label}))],Uw={create:X.bGreen,"update-content":X.bBlue,"update-metadata":X.bViolet,insert:X.bBlue,"replace-section":X.bBlue,"delete-section":X.bRed,"rename-section":X.bViolet,"status-change":X.bYellow,archive:X.bPrimary,unarchive:X.bPrimary,restore:X.bGreen,delete:X.bRed,...Object.fromEntries(Bw.map(e=>[e.value,{yellow:X.bYellow,green:X.bGreen,violet:X.bViolet,red:X.bRed}[e.tone]]))};function Ww(){let e=Rx(),[t]=oC(),[n,r]=(0,w.useState)(t.get(`operation`)||``),[i]=(0,w.useState)(t.get(`document_id`)||``),[a,o]=(0,w.useState)(``),[s,c]=(0,w.useState)(``),[l,u]=(0,w.useState)(`100`),[d,f]=(0,w.useState)(``),{data:p,isLoading:m}=ib({queryKey:[`audit-log`,n,i,a,s,l],queryFn:()=>Tw({operation:n||void 0,document_id:i||void 0,since:a?`${a}T00:00:00`:void 0,until:s?`${s}T23:59:59`:void 0,limit:Number(l)})});return(0,G.jsx)(Iw,{eyebrow:`Every read & write`,title:`Audit Log`,subtitle:`A complete trail of changes — by human and agent alike.`,headerRight:(0,G.jsx)(Ow,{cmd:`cerefox audit list`}),searchValue:d,onSearchChange:f,searchPlaceholder:`Filter by document or description…`,searchText:e=>`${e.doc_title??``} ${e.description??``} ${e.author??``}`,toolbarExtra:(0,G.jsxs)(G.Fragment,{children:[(0,G.jsx)(u_,{data:Hw,value:n,onChange:e=>r(e||``),placeholder:`All operations`,size:`sm`,w:170,clearable:!0}),(0,G.jsx)(j_,{type:`date`,"aria-label":`From`,value:a,onChange:e=>o(e.currentTarget.value),size:`sm`,w:150}),(0,G.jsx)(j_,{type:`date`,"aria-label":`To`,value:s,onChange:e=>c(e.currentTarget.value),size:`sm`,w:150}),(0,G.jsx)(u_,{data:[`100`,`250`,`500`,`1000`],value:l,onChange:e=>u(e||`100`),size:`sm`,w:100})]}),columns:[{key:`time`,label:`Time`,width:150,render:e=>(0,G.jsx)(`span`,{className:`${X.faint} ${X.mono}`,style:{fontSize:12,whiteSpace:`nowrap`},children:Rw(e.created_at)})},{key:`op`,label:`Operation`,width:150,render:e=>(0,G.jsx)(`span`,{className:`${X.badge} ${Uw[e.operation]??X.bNeutral}`,children:e.operation})},{key:`author`,label:`Author`,width:170,render:e=>(0,G.jsxs)(`span`,{className:`${X.srcChip} ${e.author_type===`agent`?X.srcChipAgent:``}`,children:[e.author_type===`agent`?(0,G.jsx)(YC,{size:12}):(0,G.jsx)(UC,{size:12}),e.author]})},{key:`doc`,label:`Document`,render:e=>e.document_id?(0,G.jsx)(`span`,{className:`${X.link}`,style:{fontSize:13},children:e.doc_title||`${e.document_id.slice(0,8)}…`}):(0,G.jsx)(`span`,{className:X.faint,style:{fontSize:12},children:Vw.has(e.operation)?`(store)`:`(deleted)`})},{key:`delta`,label:`Change`,width:110,align:`right`,render:e=>{if(e.size_before==null&&e.size_after==null)return(0,G.jsx)(`span`,{className:`${X.faint} ${X.mono}`,style:{fontSize:12},children:`—`});let t=(e.size_after??0)-(e.size_before??0),n=t>0?`var(--green)`:t<0?`var(--red)`:`var(--text-faint)`;return(0,G.jsxs)(`span`,{className:X.mono,style:{fontSize:12,color:n},children:[t>0?`+`:``,t.toLocaleString()]})}}],rows:p??[],rowKey:e=>e.id,rowClick:t=>t.document_id&&e(`/document/${t.document_id}`),loading:m,emptyText:`No audit log entries found.`})}async function Gw(e={}){return sw(`/usage-log/summary${lw({...e})}`)}async function Kw(e={}){return sw(`/usage-log${lw({...e,limit:e.limit??100})}`)}function qw(e={}){return`/api/v1/usage-log/export.csv${lw({...e})}`}async function Jw(e){return(await sw(`/config/${e}`)).value}async function Yw(e,t){await sw(`/config/${e}`,{method:`PUT`,body:JSON.stringify({value:t})})}function Xw(e){let t=t=>e?.find(e=>e.access_path===t)?.count??0,n=t(`local-mcp`),r=t(`remote-mcp`),i=t(`edge-function`),a=t(`api`);return{localMcpOps:n,remoteMcpOps:r,efOps:i,apiOps:a,agentOps:n+r+i+a,cliOps:t(`cli`),webOps:t(`webapp`)}}function Zw({title:e,commands:t,docPath:n=`guides/cli.md`}){let r=Rx(),[i,a]=(0,w.useState)(null),o=(0,w.useRef)(null);(0,w.useEffect)(()=>()=>{o.current&&clearTimeout(o.current)},[]);let s=(e,t)=>{navigator.clipboard?.writeText(t.args?`${t.cmd} ${t.args}`:t.cmd),a(e),o.current&&clearTimeout(o.current),o.current=setTimeout(()=>a(null),1200)};return(0,G.jsxs)(`div`,{className:`${X.card} ${X.cliCard} ${X.rise}`,children:[(0,G.jsxs)(`div`,{className:X.row,style:{gap:8,marginBottom:10},children:[(0,G.jsx)(QC,{size:15}),(0,G.jsx)(`span`,{style:{fontWeight:600,fontSize:13.5},children:e}),(0,G.jsx)(`button`,{type:`button`,className:X.whatis,style:{marginLeft:`auto`},onClick:()=>r(`/help/${n}`),children:`cli docs`})]}),(0,G.jsx)(`div`,{className:X.cliBlock,children:t.map((e,t)=>(0,G.jsxs)(`div`,{className:X.cliLine,children:[(0,G.jsxs)(`span`,{className:X.cliLineCmd,children:[(0,G.jsx)(`span`,{className:X.cliP,children:`$`}),e.cmd,e.args&&(0,G.jsxs)(G.Fragment,{children:[` `,(0,G.jsx)(`span`,{className:X.cliS,children:e.args})]})]}),(0,G.jsx)(`button`,{type:`button`,className:X.cliCopyBtn,title:i===t?`Copied!`:`Copy command to clipboard`,onClick:()=>s(t,e),children:i===t?(0,G.jsx)(SC,{size:13,style:{color:`var(--green)`}}):(0,G.jsx)(kC,{size:13})})]},t))})]})}async function Qw(){return sw(`/dashboard`)}async function $w(e){return sw(`/dashboard/recent-docs${e?`?project_id=${encodeURIComponent(e)}`:``}`)}var eT={wrap:`_wrap_nzwkl_5`,dashHero:`_dashHero_nzwkl_12`,dashHeroActions:`_dashHeroActions_nzwkl_20`,quickSearch:`_quickSearch_nzwkl_24`,qsGo:`_qsGo_nzwkl_52`,statGrid:`_statGrid_nzwkl_66`,statTile:`_statTile_nzwkl_72`,statTop:`_statTop_nzwkl_78`,statIco:`_statIco_nzwkl_84`,statValue:`_statValue_nzwkl_91`,statLabel:`_statLabel_nzwkl_99`,statSub:`_statSub_nzwkl_106`,emptyVal:`_emptyVal_nzwkl_112`,dashSplit:`_dashSplit_nzwkl_121`,dashRail:`_dashRail_nzwkl_133`,tbl:`_tbl_nzwkl_140`,colDoc:`_colDoc_nzwkl_157`,colAuthor:`_colAuthor_nzwkl_158`,colChunks:`_colChunks_nzwkl_159`,colSize:`_colSize_nzwkl_160`,colUpdated:`_colUpdated_nzwkl_161`,authorCell:`_authorCell_nzwkl_163`,alignRight:`_alignRight_nzwkl_191`,docCell:`_docCell_nzwkl_193`,docDot:`_docDot_nzwkl_198`,docTitle:`_docTitle_nzwkl_204`,docBadges:`_docBadges_nzwkl_216`,projList:`_projList_nzwkl_231`,projScroll:`_projScroll_nzwkl_236`,projRow:`_projRow_nzwkl_245`,projDot:`_projDot_nzwkl_259`,projName:`_projName_nzwkl_265`,projCounts:`_projCounts_nzwkl_276`,trashCount:`_trashCount_nzwkl_285`,projBar:`_projBar_nzwkl_291`,projChev:`_projChev_nzwkl_304`,projFoot:`_projFoot_nzwkl_311`},tT=[`--primary`,`--violet`,`--blue`,`--green`,`--yellow`,`--red`];function nT(e){return e>=1e6?`${(e/1e6).toFixed(2)}M`:e>=1e3?`${(e/1e3).toFixed(1)}k`:String(e)}function rT(){let e=new Date().getHours();return e<12?`Good morning`:e<18?`Good afternoon`:`Good evening`}function iT(e){let t=(e??`manual`).toLowerCase();switch(t){case`agent`:return{icon:YC,label:`agent`,agent:!0};case`cli`:return{icon:QC,label:`cli`,agent:!1};case`file`:return{icon:FC,label:`file`,agent:!1};case`paste`:return{icon:FC,label:`paste`,agent:!1};case`url`:return{icon:zC,label:`url`,agent:!1};default:return{icon:UC,label:t,agent:!1}}}var aT=new Date(Date.now()-2592e6).toISOString();function oT(){let e=Rx(),[t,n]=(0,w.useState)(``),[r,i]=(0,w.useState)(``),{data:a}=ib({queryKey:[`dashboard`],queryFn:Qw}),{data:o}=ib({queryKey:[`dashboard-recent`,r],queryFn:()=>$w(r||void 0),placeholderData:ay}),s=aT,{data:c}=ib({queryKey:[`usage-summary-30d`,s],queryFn:()=>Gw({start:s}),staleTime:6e4}),{localMcpOps:l,remoteMcpOps:u,efOps:d,apiOps:f,agentOps:p,cliOps:m,webOps:h}=Xw(c?.ops_by_access_path),g=new Map((a?.projects??[]).map(e=>[e.id,e.name])),_=new Map((a?.projects??[]).map((e,t)=>[e.id,tT[t%tT.length]])),v=a?.project_doc_counts??{},y=a?.project_deleted_doc_counts??{},b=Object.values(y).reduce((e,t)=>e+t,0),x=Math.max(1,...Object.values(v)),S=()=>{let n=t.trim();e(n?`/search?q=${encodeURIComponent(n)}&mode=docs`:`/search`)},C=e=>`var(${_.get(e.project_ids[0])??`--border`})`;return(0,G.jsxs)(`div`,{className:eT.wrap,children:[(0,G.jsxs)(`div`,{className:`${eT.dashHero} ${X.rise}`,children:[(0,G.jsxs)(`div`,{style:{minWidth:0},children:[(0,G.jsx)(`p`,{className:X.eyebrow,children:`Memory layer · online`}),(0,G.jsxs)(`h1`,{className:X.pageTitle,"data-testid":`page-title`,children:[rT(),`, operator.`]})]}),(0,G.jsxs)(`div`,{className:eT.dashHeroActions,children:[(0,G.jsxs)(`form`,{className:eT.quickSearch,onSubmit:e=>{e.preventDefault(),S()},children:[(0,G.jsx)(JC,{size:16}),(0,G.jsx)(`input`,{value:t,onChange:e=>n(e.currentTarget.value),placeholder:`Quick search…`}),(0,G.jsx)(`button`,{type:`submit`,className:eT.qsGo,"aria-label":`Search`,children:(0,G.jsx)(yC,{size:15})})]}),(0,G.jsxs)(`button`,{type:`button`,className:`${X.btn} ${X.btnPrimary}`,onClick:()=>e(`/ingest`),children:[(0,G.jsx)(KC,{size:16}),`Ingest content`]})]})]}),(0,G.jsxs)(`div`,{className:eT.statGrid,children:[(0,G.jsxs)(`div`,{className:`${X.card} ${eT.statTile} ${X.rise}`,children:[(0,G.jsxs)(`div`,{className:eT.statTop,children:[(0,G.jsx)(`span`,{className:`${eT.statIco} ${X.bPrimary}`,children:(0,G.jsx)(AC,{size:18})}),b>0&&(0,G.jsxs)(`span`,{className:`${X.badge} ${X.bNeutral}`,children:[b,` docs in trash`]})]}),(0,G.jsx)(`div`,{className:eT.statValue,children:(a?.doc_count??0).toLocaleString()}),(0,G.jsx)(`div`,{className:eT.statLabel,children:`Documents`})]}),(0,G.jsxs)(`div`,{className:`${X.card} ${eT.statTile} ${X.rise}`,children:[(0,G.jsxs)(`div`,{className:eT.statTop,children:[(0,G.jsx)(`span`,{className:`${eT.statIco} ${X.bViolet}`,children:(0,G.jsx)(XC,{size:18})}),(0,G.jsxs)(`span`,{className:`${X.badge} ${X.bViolet}`,children:[nT(a?.total_chars??0),` chars`]})]}),(0,G.jsx)(`div`,{className:eT.statValue,children:(a?.total_chunks??0).toLocaleString()}),(0,G.jsx)(`div`,{className:eT.statLabel,children:`Indexed chunks`})]}),(0,G.jsxs)(`div`,{className:`${X.card} ${eT.statTile} ${X.rise}`,children:[(0,G.jsx)(`div`,{className:eT.statTop,children:(0,G.jsx)(`span`,{className:`${eT.statIco} ${X.bBlue}`,children:(0,G.jsx)(LC,{size:18})})}),(0,G.jsx)(`div`,{className:eT.statValue,children:a?.project_count??0}),(0,G.jsx)(`div`,{className:eT.statLabel,children:`Projects`})]}),(0,G.jsxs)(`div`,{className:`${X.card} ${eT.statTile} ${X.rise}`,children:[(0,G.jsxs)(`div`,{className:eT.statTop,children:[(0,G.jsx)(`span`,{className:`${eT.statIco} ${X.bGreen}`,children:(0,G.jsx)(YC,{size:18})}),p>0?(0,G.jsxs)(`span`,{className:`${X.badge} ${X.bGreen}`,title:`MCP transports, last 30 days. Other paths are listed below the count.`,children:[l.toLocaleString(),` local · `,u.toLocaleString(),` remote`]}):(0,G.jsxs)(el,{width:260,position:`bottom-end`,withArrow:!0,shadow:`md`,children:[(0,G.jsx)(el.Target,{children:(0,G.jsx)(`button`,{type:`button`,className:X.whatis,children:`Why no data?`})}),(0,G.jsx)(el.Dropdown,{children:(0,G.jsxs)(Y,{size:`xs`,c:`dimmed`,children:[`No agent activity on the MCP or Edge Function paths in the last 30 days. That is not the same as "no agents" — CLI and web operations are counted separately below, and the Edge Function path is only used by ChatGPT Actions, so a zero there is normal unless you run a Custom GPT. Agent ops are recorded in the usage log, which is `,(0,G.jsx)(`b`,{children:`opt-in`}),` — enable it with`,` `,(0,G.jsx)(`code`,{children:`cerefox config set usage_tracking_enabled true`}),` if it's off.`]})})]})]}),(0,G.jsx)(`div`,{className:p>0?eT.statValue:eT.emptyVal,children:p>0?p.toLocaleString():`—`}),(0,G.jsx)(`div`,{className:eT.statLabel,children:`Agent operations · 30d`}),(d>0||f>0||m>0||h>0)&&(0,G.jsxs)(`div`,{className:eT.statSub,title:`edge = ChatGPT Actions and api = an /api/v1 client that identified itself (both counted in the total above). cli and web are NOT counted as agent operations: the usage summary cannot separate an agent's CLI use from a person's, and web is the bundled UI.`,children:[d.toLocaleString(),` edge · `,f.toLocaleString(),` api ·`,` `,m.toLocaleString(),` cli · `,h.toLocaleString(),` web`]})]})]}),(0,G.jsxs)(`div`,{className:eT.dashSplit,children:[(0,G.jsxs)(`section`,{className:X.rise,children:[(0,G.jsxs)(`div`,{className:X.secHead,children:[(0,G.jsxs)(`h2`,{className:X.secTitle,children:[(0,G.jsx)(OC,{size:16}),`Recently changed documents`]}),(0,G.jsxs)(`span`,{className:X.selectWrap,title:`Scope recent documents to a project`,children:[(0,G.jsx)(LC,{size:14}),(0,G.jsxs)(`select`,{className:X.selectEl,value:r,"data-testid":`recent-project-select`,onChange:e=>i(e.currentTarget.value),children:[(0,G.jsx)(`option`,{value:``,children:`All projects`}),(a?.projects??[]).map(e=>(0,G.jsx)(`option`,{value:e.id,children:e.name},e.id))]}),(0,G.jsx)(CC,{size:14})]})]}),(0,G.jsx)(`div`,{className:X.card,style:{overflow:`hidden`},children:(0,G.jsxs)(`table`,{className:eT.tbl,children:[(0,G.jsx)(`thead`,{children:(0,G.jsxs)(`tr`,{children:[(0,G.jsx)(`th`,{className:eT.colDoc,children:`Document`}),(0,G.jsx)(`th`,{className:`${eT.colAuthor} ${eT.authorCell}`,children:`Author`}),(0,G.jsx)(`th`,{className:`${eT.colChunks} ${eT.alignRight}`,children:`Chunks`}),(0,G.jsx)(`th`,{className:`${eT.colSize} ${eT.alignRight}`,children:`Size`}),(0,G.jsx)(`th`,{className:`${eT.colUpdated} ${eT.alignRight}`,children:`Updated`})]})}),(0,G.jsx)(`tbody`,{children:(r?o?.recent_docs??[]:o?.recent_docs??a?.recent_docs??[]).map(t=>{let n=t.author?{icon:t.author_type===`agent`?YC:UC,label:t.author,agent:t.author_type===`agent`}:iT(t.source),r=n.icon,i=t.review_status!==`approved`;return(0,G.jsxs)(`tr`,{"data-testid":`recent-doc-row`,onClick:()=>e(`/document/${t.id}`),children:[(0,G.jsx)(`td`,{children:(0,G.jsxs)(`div`,{className:eT.docCell,children:[(0,G.jsx)(`span`,{className:eT.docDot,style:{background:C(t)}}),(0,G.jsxs)(`div`,{className:X.col,style:{gap:3,minWidth:0},children:[(0,G.jsx)(eC,{to:`/document/${t.id}`,className:`${X.link} ${eT.docTitle}`,onClick:e=>e.stopPropagation(),children:t.title||`Untitled`}),(0,G.jsxs)(`div`,{className:eT.docBadges,children:[t.project_ids.filter(e=>g.has(e)).slice(0,1).map(e=>(0,G.jsx)(`span`,{className:`${X.badge} ${X.bNeutral}`,children:g.get(e)},e)),i&&(0,G.jsxs)(`span`,{className:`${X.badge} ${X.bYellow}`,children:[(0,G.jsx)(`span`,{style:{width:6,height:6,borderRadius:`50%`,background:`currentColor`}}),`pending review`]})]})]})]})}),(0,G.jsx)(`td`,{className:eT.authorCell,title:n.label,children:(0,G.jsxs)(`span`,{className:`${X.srcChip} ${n.agent?X.srcChipAgent:``}`,children:[(0,G.jsx)(r,{size:12}),n.label]})}),(0,G.jsx)(`td`,{className:`${eT.alignRight} ${X.mono} ${X.dim}`,children:t.chunk_count}),(0,G.jsx)(`td`,{className:`${eT.alignRight} ${X.mono} ${X.dim}`,children:t.total_chars.toLocaleString()}),(0,G.jsx)(`td`,{className:`${eT.alignRight} ${X.faint}`,children:Rw(t.updated_at)})]},t.id)})})]})})]}),(0,G.jsxs)(`aside`,{className:eT.dashRail,children:[(0,G.jsxs)(`section`,{className:X.rise,style:{minHeight:0},children:[(0,G.jsxs)(`div`,{className:X.secHead,children:[(0,G.jsxs)(`h2`,{className:X.secTitle,children:[(0,G.jsx)(XC,{size:16}),`Projects `,(0,G.jsx)(`span`,{className:X.countPill,children:a?.project_count??0})]}),(0,G.jsx)(`button`,{type:`button`,className:`${X.btn} ${X.btnSubtle}`,onClick:()=>e(`/projects`),children:`Manage`})]}),(0,G.jsxs)(`div`,{className:`${X.card} ${eT.projList}`,children:[(0,G.jsx)(`div`,{className:eT.projScroll,children:(a?.projects??[]).map(t=>{let n=v[t.id]??0,r=y[t.id]??0,i=`var(${_.get(t.id)??`--border`})`;return(0,G.jsxs)(`button`,{type:`button`,className:eT.projRow,onClick:()=>e(`/projects/${t.id}/documents`),children:[(0,G.jsx)(`span`,{className:eT.projDot,style:{background:i}}),(0,G.jsxs)(`div`,{className:X.col,style:{gap:5,minWidth:0,flex:1},children:[(0,G.jsxs)(`div`,{className:X.row,style:{justifyContent:`space-between`,gap:8},children:[(0,G.jsx)(eC,{to:`/projects/${t.id}/documents`,className:eT.projName,onClick:e=>e.stopPropagation(),children:t.name}),(0,G.jsxs)(`span`,{className:eT.projCounts,children:[(0,G.jsx)(`span`,{children:n}),r>0&&(0,G.jsxs)(`span`,{className:eT.trashCount,title:`${r} in trash`,children:[(0,G.jsx)($C,{size:11}),r]})]})]}),(0,G.jsx)(`div`,{className:eT.projBar,children:(0,G.jsx)(`span`,{style:{width:`${n/x*100}%`,background:i}})})]}),(0,G.jsx)(`span`,{className:eT.projChev,children:(0,G.jsx)(TC,{size:15})})]},t.id)})}),(0,G.jsxs)(`div`,{className:eT.projFoot,children:[(0,G.jsxs)(`span`,{children:[a?.project_count??0,` projects`]}),(0,G.jsxs)(`span`,{className:X.faint,children:[b,` docs in trash`]})]})]})]}),(0,G.jsx)(Zw,{title:`Same memory, your terminal`,commands:[{cmd:`cerefox search`,args:`"retry backoff" --mode hybrid`},{cmd:`cerefox document ingest`,args:`./rfc-018.md --project-name infra`}]})]})]})]})}async function sT(e,t){return sw(`/documents/${e}${lw({version_id:t})}`)}async function cT(e){return sw(`/documents/${e}/chunks`)}async function lT(e,t){return sw(`/documents/${e}/edit`,{method:`POST`,body:JSON.stringify(t)})}async function uT(e){return sw(`/documents/${e}`,{method:`DELETE`})}async function dT(e){return sw(`/ingest`,{method:`POST`,body:JSON.stringify({mode:`paste`,...e})})}async function fT(e){return sw(`/check-filename${lw({filename:e})}`)}async function pT(e,t){return sw(`/documents/${e}?version_id=${t}`)}function mT(e,t){let n=`/api/v1/documents/${e}/download`;return t?`${n}?version_id=${t}`:n}function hT(e,t){let n=t||{};return(e[e.length-1]===``?[...e,``]:e).join((n.padRight?` `:``)+`,`+(n.padLeft===!1?``:` `)).trim()}var gT=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,_T=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,vT={};function yT(e,t){return((t||vT).jsx?_T:gT).test(e)}var bT=/[ \t\n\f\r]/g;function xT(e){return typeof e==`object`?e.type===`text`&&ST(e.value):ST(e)}function ST(e){return e.replace(bT,``)===``}var CT=class{constructor(e,t,n){this.normal=t,this.property=e,n&&(this.space=n)}};CT.prototype.normal={},CT.prototype.property={},CT.prototype.space=void 0;function wT(e,t){let n={},r={};for(let t of e)Object.assign(n,t.property),Object.assign(r,t.normal);return new CT(n,r,t)}function TT(e){return e.toLowerCase()}var ET=class{constructor(e,t){this.attribute=t,this.property=e}};ET.prototype.attribute=``,ET.prototype.booleanish=!1,ET.prototype.boolean=!1,ET.prototype.commaOrSpaceSeparated=!1,ET.prototype.commaSeparated=!1,ET.prototype.defined=!1,ET.prototype.mustUseProperty=!1,ET.prototype.number=!1,ET.prototype.overloadedBoolean=!1,ET.prototype.property=``,ET.prototype.spaceSeparated=!1,ET.prototype.space=void 0;var DT=s({boolean:()=>kT,booleanish:()=>AT,commaOrSpaceSeparated:()=>PT,commaSeparated:()=>NT,number:()=>Z,overloadedBoolean:()=>jT,spaceSeparated:()=>MT}),OT=0,kT=FT(),AT=FT(),jT=FT(),Z=FT(),MT=FT(),NT=FT(),PT=FT();function FT(){return 2**++OT}var IT=Object.keys(DT),LT=class extends ET{constructor(e,t,n,r){let i=-1;if(super(e,t),RT(this,`space`,r),typeof n==`number`)for(;++i<IT.length;){let e=IT[i];RT(this,IT[i],(n&DT[e])===DT[e])}}};LT.prototype.defined=!0;function RT(e,t,n){n&&(e[t]=n)}function zT(e){let t={},n={};for(let[r,i]of Object.entries(e.properties)){let a=new LT(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(a.mustUseProperty=!0),t[r]=a,n[TT(r)]=r,n[TT(a.attribute)]=r}return new CT(t,n,e.space)}var BT=zT({properties:{ariaActiveDescendant:null,ariaAtomic:AT,ariaAutoComplete:null,ariaBusy:AT,ariaChecked:AT,ariaColCount:Z,ariaColIndex:Z,ariaColSpan:Z,ariaControls:MT,ariaCurrent:null,ariaDescribedBy:MT,ariaDetails:null,ariaDisabled:AT,ariaDropEffect:MT,ariaErrorMessage:null,ariaExpanded:AT,ariaFlowTo:MT,ariaGrabbed:AT,ariaHasPopup:null,ariaHidden:AT,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:MT,ariaLevel:Z,ariaLive:null,ariaModal:AT,ariaMultiLine:AT,ariaMultiSelectable:AT,ariaOrientation:null,ariaOwns:MT,ariaPlaceholder:null,ariaPosInSet:Z,ariaPressed:AT,ariaReadOnly:AT,ariaRelevant:null,ariaRequired:AT,ariaRoleDescription:MT,ariaRowCount:Z,ariaRowIndex:Z,ariaRowSpan:Z,ariaSelected:AT,ariaSetSize:Z,ariaSort:null,ariaValueMax:Z,ariaValueMin:Z,ariaValueNow:Z,ariaValueText:null,role:null},transform(e,t){return t===`role`?t:`aria-`+t.slice(4).toLowerCase()}});function VT(e,t){return t in e?e[t]:t}function HT(e,t){return VT(e,t.toLowerCase())}var UT=zT({attributes:{acceptcharset:`accept-charset`,classname:`class`,htmlfor:`for`,httpequiv:`http-equiv`},mustUseProperty:[`checked`,`multiple`,`muted`,`selected`],properties:{abbr:null,accept:NT,acceptCharset:MT,accessKey:MT,action:null,allow:null,allowFullScreen:kT,allowPaymentRequest:kT,allowUserMedia:kT,alpha:kT,alt:null,as:null,async:kT,autoCapitalize:null,autoComplete:MT,autoFocus:kT,autoPlay:kT,blocking:MT,capture:null,charSet:null,checked:kT,cite:null,className:MT,closedBy:null,colorSpace:null,cols:Z,colSpan:Z,command:null,commandFor:null,content:null,contentEditable:AT,controls:kT,controlsList:MT,coords:Z|NT,crossOrigin:null,data:null,dateTime:null,decoding:null,default:kT,defer:kT,dir:null,dirName:null,disabled:kT,download:jT,draggable:AT,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:kT,formTarget:null,headers:MT,height:Z,hidden:jT,high:Z,href:null,hrefLang:null,htmlFor:MT,httpEquiv:MT,id:null,imageSizes:null,imageSrcSet:null,inert:kT,inputMode:null,integrity:null,is:null,isMap:kT,itemId:null,itemProp:MT,itemRef:MT,itemScope:kT,itemType:MT,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:kT,low:Z,manifest:null,max:null,maxLength:Z,media:null,method:null,min:null,minLength:Z,multiple:kT,muted:kT,name:null,nonce:null,noModule:kT,noValidate:kT,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:kT,optimum:Z,pattern:null,ping:MT,placeholder:null,playsInline:kT,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:kT,referrerPolicy:null,rel:MT,required:kT,reversed:kT,rows:Z,rowSpan:Z,sandbox:MT,scope:null,scoped:kT,seamless:kT,selected:kT,shadowRootClonable:kT,shadowRootCustomElementRegistry:kT,shadowRootDelegatesFocus:kT,shadowRootMode:null,shadowRootSerializable:kT,shape:null,size:Z,sizes:null,slot:null,span:Z,spellCheck:AT,src:null,srcDoc:null,srcLang:null,srcSet:null,start:Z,step:null,style:null,tabIndex:Z,target:null,title:null,translate:null,type:null,typeMustMatch:kT,useMap:null,value:AT,width:Z,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:MT,axis:null,background:null,bgColor:null,border:Z,borderColor:null,bottomMargin:Z,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:kT,declare:kT,event:null,face:null,frame:null,frameBorder:null,hSpace:Z,leftMargin:Z,link:null,longDesc:null,lowSrc:null,marginHeight:Z,marginWidth:Z,noResize:kT,noHref:kT,noShade:kT,noWrap:kT,object:null,profile:null,prompt:null,rev:null,rightMargin:Z,rules:null,scheme:null,scrolling:AT,standby:null,summary:null,text:null,topMargin:Z,valueType:null,version:null,vAlign:null,vLink:null,vSpace:Z,allowTransparency:null,autoCorrect:null,autoSave:null,credentialless:kT,disablePictureInPicture:kT,disableRemotePlayback:kT,exportParts:NT,part:MT,prefix:null,property:null,results:Z,security:null,unselectable:null},space:`html`,transform:HT}),WT=zT({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:PT,accentHeight:Z,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:Z,amplitude:Z,arabicForm:null,ascent:Z,attributeName:null,attributeType:null,azimuth:Z,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:Z,by:null,calcMode:null,capHeight:Z,className:MT,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:Z,diffuseConstant:Z,direction:null,display:null,dur:null,divisor:Z,dominantBaseline:null,download:kT,dx:null,dy:null,edgeMode:null,editable:null,elevation:Z,enableBackground:null,end:null,event:null,exponent:Z,externalResourcesRequired:null,fill:null,fillOpacity:Z,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:NT,g2:NT,glyphName:NT,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:Z,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:Z,horizOriginX:Z,horizOriginY:Z,id:null,ideographic:Z,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:Z,k:Z,k1:Z,k2:Z,k3:Z,k4:Z,kernelMatrix:PT,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:Z,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskType:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:Z,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:Z,overlineThickness:Z,paintOrder:null,panose1:null,path:null,pathLength:Z,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:MT,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:Z,pointsAtY:Z,pointsAtZ:Z,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:PT,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:PT,rev:PT,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:PT,requiredFeatures:PT,requiredFonts:PT,requiredFormats:PT,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:Z,specularExponent:Z,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:Z,strikethroughThickness:Z,string:null,stroke:null,strokeDashArray:PT,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:Z,strokeOpacity:Z,strokeWidth:null,style:null,surfaceScale:Z,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:PT,tabIndex:Z,tableValues:null,target:null,targetX:Z,targetY:Z,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:PT,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:Z,underlineThickness:Z,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:Z,values:null,vAlphabetic:Z,vMathematical:Z,vectorEffect:null,vHanging:Z,vIdeographic:Z,version:null,vertAdvY:Z,vertOriginX:Z,vertOriginY:Z,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:Z,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:`svg`,transform:VT}),GT=zT({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()}}),KT=zT({attributes:{xmlnsxlink:`xmlns:xlink`},properties:{xmlnsXLink:null,xmlns:null},space:`xmlns`,transform:HT}),qT=zT({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:`xml`,transform(e,t){return`xml:`+t.slice(3).toLowerCase()}}),JT={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`},YT=/[A-Z]/g,XT=/-[a-z]/g,ZT=/^data[-\w.:]+$/i;function QT(e,t){let n=TT(t),r=t,i=ET;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)===`data`&&ZT.test(t)){if(t.charAt(4)===`-`){let e=t.slice(5).replace(XT,eE);r=`data`+e.charAt(0).toUpperCase()+e.slice(1)}else{let e=t.slice(4);if(!XT.test(e)){let n=e.replace(YT,$T);n.charAt(0)!==`-`&&(n=`-`+n),t=`data`+n}}i=LT}return new i(r,t)}function $T(e){return`-`+e.toLowerCase()}function eE(e){return e.charAt(1).toUpperCase()}var tE=wT([BT,UT,GT,KT,qT],`html`),nE=wT([BT,WT,GT,KT,qT],`svg`);function rE(e){return e.join(` `).trim()}var iE=o(((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;function u(e,t){if(typeof e!=`string`)throw TypeError(`First argument must be a string`);if(!e)return[];t||={};var l=1,u=1;function f(e){var t=e.match(r);t&&(l+=t.length);var n=e.lastIndexOf(`
60
- `);u=~n?e.length-n:u+e.length}function p(){var e={line:l,column:u};return function(t){return t.position=new m(e),_(),t}}function m(e){this.start=e,this.end={line:l,column:u},this.source=t.source}m.prototype.content=e;function h(n){var r=Error(t.source+`:`+l+`:`+u+`: `+n);if(r.reason=n,r.filename=t.source,r.line=l,r.column=u,r.source=e,!t.silent)throw r}function g(t){var n=t.exec(e);if(n){var r=n[0];return f(r),e=e.slice(r.length),n}}function _(){g(i)}function v(e){var t;for(e||=[];t=y();)t!==!1&&e.push(t);return e}function y(){var t=p();if(e.charAt(0)==`/`&&e.charAt(1)==`*`){for(var n=2;e.charAt(n)!=``&&(e.charAt(n)!=`*`||e.charAt(n+1)!=`/`);)++n;if(n+=2,e.charAt(n-1)===``)return h(`End of comment missing`);var r=e.slice(2,n-2);return u+=2,f(r),e=e.slice(n),u+=2,t({type:`comment`,comment:r})}}function b(){var e=p(),t=g(a);if(t){if(y(),!g(o))return h(`property missing ':'`);var r=g(s),i=e({type:`declaration`,property:d(t[0].replace(n,``)),value:r?d(r[0].replace(n,``)):``});return g(c),i}}function x(){var e=[];v(e);for(var t;t=b();)t!==!1&&(e.push(t),v(e));return e}return _(),x()}function d(e){return e?e.replace(l,``):``}t.exports=u})),aE=o((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(iE());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}})),oE=o((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))}})),sE=o(((e,t)=>{var n=(e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}})(aE()),r=oE();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})),cE=uE(`end`),lE=uE(`start`);function uE(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 dE(e){let t=lE(e),n=cE(e);if(t&&n)return{start:t,end:n}}function fE(e){return!e||typeof e!=`object`?``:`position`in e||`type`in e?mE(e.position):`start`in e||`end`in e?mE(e):`line`in e||`column`in e?pE(e):``}function pE(e){return hE(e&&e.line)+`:`+hE(e&&e.column)}function mE(e){return pE(e&&e.start)+`-`+pE(e&&e.end)}function hE(e){return e&&typeof e==`number`?e:1}var gE=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=fE(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}};gE.prototype.file=``,gE.prototype.name=``,gE.prototype.reason=``,gE.prototype.message=``,gE.prototype.stack=``,gE.prototype.column=void 0,gE.prototype.line=void 0,gE.prototype.ancestors=void 0,gE.prototype.cause=void 0,gE.prototype.fatal=void 0,gE.prototype.place=void 0,gE.prototype.ruleId=void 0,gE.prototype.source=void 0;var _E=l(sE(),1),vE={}.hasOwnProperty,yE=new Map,bE=/[A-Z]/g,xE=new Set([`table`,`tbody`,`thead`,`tfoot`,`tr`]),SE=new Set([`td`,`th`]);function CE(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=dee(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=uee(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`?nE:tE,stylePropertyNameCase:t.stylePropertyNameCase||`dom`,tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},a=wE(i,e,void 0);return a&&typeof a!=`string`?a:i.create(e,i.Fragment,{children:a||void 0},void 0)}function wE(e,t,n){if(t.type===`element`)return iee(e,t,n);if(t.type===`mdxFlowExpression`||t.type===`mdxTextExpression`)return aee(e,t);if(t.type===`mdxJsxFlowElement`||t.type===`mdxJsxTextElement`)return see(e,t,n);if(t.type===`mdxjsEsm`)return oee(e,t);if(t.type===`root`)return cee(e,t,n);if(t.type===`text`)return lee(e,t)}function iee(e,t,n){let r=e.schema,i=r;t.tagName.toLowerCase()===`svg`&&r.space===`html`&&(i=nE,e.schema=i),e.ancestors.push(t);let a=OE(e,t.tagName,!1),o=fee(e,t),s=DE(e,t);return xE.has(t.tagName)&&(s=s.filter(function(e){return typeof e!=`string`||!xT(e)})),TE(e,o,a,t),EE(o,s),e.ancestors.pop(),e.schema=r,e.create(t,a,o,n)}function aee(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)}kE(e,t.position)}function oee(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);kE(e,t.position)}function see(e,t,n){let r=e.schema,i=r;t.name===`svg`&&r.space===`html`&&(i=nE,e.schema=i),e.ancestors.push(t);let a=t.name===null?e.Fragment:OE(e,t.name,!0),o=pee(e,t),s=DE(e,t);return TE(e,o,a,t),EE(o,s),e.ancestors.pop(),e.schema=r,e.create(t,a,o,n)}function cee(e,t,n){let r={};return EE(r,DE(e,t)),e.create(t,e.Fragment,r,n)}function lee(e,t){return t.value}function TE(e,t,n,r){typeof n!=`string`&&n!==e.Fragment&&e.passNode&&(t.node=r)}function EE(e,t){if(t.length>0){let n=t.length>1?t:t[0];n&&(e.children=n)}}function uee(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 dee(e,t){return n;function n(n,r,i,a){let o=Array.isArray(i.children),s=lE(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 fee(e,t){let n={},r,i;for(i in t.properties)if(i!==`children`&&vE.call(t.properties,i)){let a=mee(e,i,t.properties[i]);if(a){let[i,o]=a;e.tableCellAlignToStyle&&i===`align`&&typeof o==`string`&&SE.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 pee(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 kE(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 kE(e,t.position);else a=r.value===null||r.value;n[i]=a}return n}function DE(e,t){let n=[],r=-1,i=e.passKeys?new Map:yE;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=wE(e,a,o);s!==void 0&&n.push(s)}return n}function mee(e,t,n){let r=QT(e.schema,t);if(!(n==null||typeof n==`number`&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?hT(n):rE(n)),r.property===`style`){let t=typeof n==`object`?n:hee(e,String(n));return e.stylePropertyNameCase===`css`&&(t=gee(t)),[`style`,t]}return[e.elementAttributeNameCase===`react`&&r.space?JT[r.property]||r.property:r.attribute,n]}}function hee(e,t){try{return(0,_E.default)(t,{reactCompat:!0})}catch(t){if(e.ignoreInvalidStyle)return{};let n=t,r=new gE("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=`https://github.com/syntax-tree/hast-util-to-jsx-runtime#cannot-parse-style-attribute`,r}}function OE(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=yT(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=yT(t)&&!/^[a-z]/.test(t)?{type:`Identifier`,name:t}:{type:`Literal`,value:t};if(r.type===`Literal`){let t=r.value;return vE.call(e.components,t)?e.components[t]:t}if(e.evaluater)return e.evaluater.evaluateExpression(r);kE(e)}function kE(e,t){let n=new gE("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=`https://github.com/syntax-tree/hast-util-to-jsx-runtime#cannot-handle-mdx-estrees-without-createevaluater`,n}function gee(e){let t={},n;for(n in e)vE.call(e,n)&&(t[_ee(n)]=e[n]);return t}function _ee(e){let t=e.replace(bE,AE);return t.slice(0,3)===`ms-`&&(t=`-`+t),t}function AE(e){return`-`+e.toLowerCase()}var jE={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`]},ME={};function NE(e,t){let n=t||ME;return PE(e,typeof n.includeImageAlt!=`boolean`||n.includeImageAlt,typeof n.includeHtml!=`boolean`||n.includeHtml)}function PE(e,t,n){if(IE(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 FE(e.children,t,n)}return Array.isArray(e)?FE(e,t,n):``}function FE(e,t,n){let r=[],i=-1;for(;++i<e.length;)r[i]=PE(e[i],t,n);return r.join(``)}function IE(e){return!!(e&&typeof e==`object`)}var LE=document.createElement(`i`);function RE(e){let t=`&`+e+`;`;LE.innerHTML=t;let n=LE.textContent;return n.charCodeAt(n.length-1)===59&&e!==`semi`?!1:n!==t&&n}function zE(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 BE(e,t){return e.length>0?(zE(e,e.length,0,t),e):t}var VE={}.hasOwnProperty;function HE(e){let t={},n=-1;for(;++n<e.length;)UE(t,e[n]);return t}function UE(e,t){let n;for(n in t){let r=(VE.call(e,n)?e[n]:void 0)||(e[n]={}),i=t[n],a;if(i)for(a in i){VE.call(r,a)||(r[a]=[]);let e=i[a];WE(r[a],Array.isArray(e)?e:e?[e]:[])}}}function WE(e,t){let n=-1,r=[];for(;++n<t.length;)(t[n].add===`after`?e:r).push(t[n]);zE(e,0,0,r)}function GE(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 KE(e){return e.replace(/[\t\n\r ]+/g,` `).replace(/^ | $/g,``).toLowerCase().toUpperCase()}var qE=aD(/[A-Za-z]/),JE=aD(/[\dA-Za-z]/),YE=aD(/[#-'*+\--9=?A-Z^-~]/);function XE(e){return e!==null&&(e<32||e===127)}var ZE=aD(/\d/),QE=aD(/[\dA-Fa-f]/),$E=aD(/[!-/:-@[-`{-~]/);function eD(e){return e!==null&&e<-2}function tD(e){return e!==null&&(e<0||e===32)}function nD(e){return e===-2||e===-1||e===32}var rD=aD(/\p{P}|\p{S}/u),iD=aD(/\s/);function aD(e){return t;function t(t){return t!==null&&t>-1&&e.test(String.fromCharCode(t))}}function oD(e){let t=[],n=-1,r=0,i=0;for(;++n<e.length;){let a=e.charCodeAt(n),o=``;if(a===37&&JE(e.charCodeAt(n+1))&&JE(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 sD(e,t,n,r){let i=r?r-1:1/0,a=0;return o;function o(r){return nD(r)?(e.enter(n),s(r)):t(r)}function s(r){return nD(r)&&a++<i?(e.consume(r),s):(e.exit(n),t(r))}}var cD={tokenize:lD};function lD(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`),sD(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 eD(t)?(e.consume(t),e.exit(`chunkText`),a):(e.consume(t),o)}}var uD={tokenize:fD},dD={tokenize:pD};function fD(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 zE(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(dD,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(dD,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 eD(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++;zE(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 pD(e,t,n){return sD(e,e.attempt(this.parser.constructs.document,t,n),`linePrefix`,this.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)}function mD(e){if(e===null||tD(e)||iD(e))return 1;if(rD(e))return 2}function hD(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 gD={name:`attention`,resolveAll:_D,tokenize:vD};function _D(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};yD(d,-c),yD(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=BE(l,[[`enter`,e[r][1],t],[`exit`,e[r][1],t]])),l=BE(l,[[`enter`,i,t],[`enter`,o,t],[`exit`,o,t],[`enter`,a,t]]),l=BE(l,hD(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),l=BE(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=BE(l,[[`enter`,e[n][1],t],[`exit`,e[n][1],t]])):u=0,zE(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 vD(e,t){let n=this.parser.constructs.attentionMarkers.null,r=this.previous,i=mD(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=mD(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 yD(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}var bD={name:`autolink`,tokenize:vee};function vee(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 qE(t)?(e.consume(t),o):t===64?n(t):l(t)}function o(e){return e===43||e===45||e===46||JE(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||JE(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||XE(r)?n(r):(e.consume(r),c)}function l(t){return t===64?(e.consume(t),u):YE(t)?(e.consume(t),l):n(t)}function u(e){return JE(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||JE(t))&&r++<63){let n=t===45?f:d;return e.consume(t),n}return n(t)}}var xD={partial:!0,tokenize:SD};function SD(e,t,n){return r;function r(t){return nD(t)?sD(e,i,`linePrefix`)(t):i(t)}function i(e){return e===null||eD(e)?t(e):n(e)}}var CD={continuation:{tokenize:TD},exit:ED,name:`blockQuote`,tokenize:wD};function wD(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 nD(n)?(e.enter(`blockQuotePrefixWhitespace`),e.consume(n),e.exit(`blockQuotePrefixWhitespace`),e.exit(`blockQuotePrefix`),t):(e.exit(`blockQuotePrefix`),t(n))}}function TD(e,t,n){let r=this;return i;function i(t){return nD(t)?sD(e,a,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):a(t)}function a(r){return e.attempt(CD,t,n)(r)}}function ED(e){e.exit(`blockQuote`)}var DD={name:`characterEscape`,tokenize:OD};function OD(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 $E(r)?(e.enter(`characterEscapeValue`),e.consume(r),e.exit(`characterEscapeValue`),e.exit(`characterEscape`),t):n(r)}}var kD={name:`characterReference`,tokenize:AD};function AD(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=JE,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=QE,u):(e.enter(`characterReferenceValue`),a=7,o=ZE,u(t))}function u(s){if(s===59&&i){let i=e.exit(`characterReferenceValue`);return o===JE&&!RE(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 jD={partial:!0,tokenize:PD},MD={concrete:!0,name:`codeFenced`,tokenize:ND};function ND(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`),nD(t)?sD(e,d,`whitespace`)(t):d(t))}function d(n){return n===null||eD(n)?(e.exit(`codeFencedFence`),r.interrupt?t(n):e.check(jD,h,b)(n)):(e.enter(`codeFencedFenceInfo`),e.enter(`chunkString`,{contentType:`string`}),f(n))}function f(t){return t===null||eD(t)?(e.exit(`chunkString`),e.exit(`codeFencedFenceInfo`),d(t)):nD(t)?(e.exit(`chunkString`),e.exit(`codeFencedFenceInfo`),sD(e,p,`whitespace`)(t)):t===96&&t===s?n(t):(e.consume(t),f)}function p(t){return t===null||eD(t)?d(t):(e.enter(`codeFencedFenceMeta`),e.enter(`chunkString`,{contentType:`string`}),m(t))}function m(t){return t===null||eD(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&&nD(t)?sD(e,v,`linePrefix`,a+1)(t):v(t)}function v(t){return t===null||eD(t)?e.check(jD,h,b)(t):(e.enter(`codeFlowValue`),y(t))}function y(t){return t===null||eD(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`),nD(t)?sD(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`),nD(t)?sD(e,d,`whitespace`)(t):d(t)):n(t)}function d(r){return r===null||eD(r)?(e.exit(`codeFencedFence`),t(r)):n(r)}}}function PD(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 FD={name:`codeIndented`,tokenize:LD},ID={partial:!0,tokenize:RD};function LD(e,t,n){let r=this;return i;function i(t){return e.enter(`codeIndented`),sD(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):eD(t)?e.attempt(ID,o,c)(t):(e.enter(`codeFlowValue`),s(t))}function s(t){return t===null||eD(t)?(e.exit(`codeFlowValue`),o(t)):(e.consume(t),s)}function c(n){return e.exit(`codeIndented`),t(n)}}function RD(e,t,n){let r=this;return i;function i(t){return r.parser.lazy[r.now().line]?n(t):eD(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),i):sD(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):eD(e)?i(e):n(e)}}var zD={name:`codeText`,previous:VD,resolve:BD,tokenize:HD};function BD(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 VD(e){return e!==96||this.events[this.events.length-1][1].type===`characterEscape`}function HD(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)):eD(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||eD(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 UD=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&&WD(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),WD(this.left,e)}unshift(e){this.setCursor(0),this.right.push(e)}unshiftMany(e){this.setCursor(0),WD(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);WD(this.right,t.reverse())}else{let t=this.right.splice(this.left.length+this.right.length-e,1/0);WD(this.left,t.reverse())}}};function WD(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 GD(e){let t={},n=-1,r,i,a,o,s,c,l,u=new UD(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,KD(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 zE(e,0,1/0,u.slice(0)),!l}function KD(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 qD={resolve:YD,tokenize:XD},JD={partial:!0,tokenize:ZD};function YD(e){return GD(e),e}function XD(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):eD(t)?e.check(JD,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 ZD(e,t,n){let r=this;return i;function i(t){return e.exit(`chunkContent`),e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),sD(e,a,`linePrefix`)}function a(i){if(i===null||eD(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 QD(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||XE(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||eD(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||tD(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||XE(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 $D(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):eD(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||eD(t)||s++>999?(e.exit(`chunkString`),u(t)):(e.consume(t),c||=!nD(t),t===92?f:d)}function f(t){return t===91||t===92||t===93?(e.consume(t),s++,d):d(t)}}function eO(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):eD(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),sD(e,l,`linePrefix`)):(e.enter(`chunkString`,{contentType:`string`}),u(t))}function u(t){return t===o||t===null||eD(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 tO(e,t){let n;return r;function r(i){return eD(i)?(e.enter(`lineEnding`),e.consume(i),e.exit(`lineEnding`),n=!0,r):nD(i)?sD(e,r,n?`linePrefix`:`lineSuffix`)(i):t(i)}}var nO={name:`definition`,tokenize:iO},rO={partial:!0,tokenize:aO};function iO(e,t,n){let r=this,i;return a;function a(t){return e.enter(`definition`),o(t)}function o(t){return $D.call(r,e,s,n,`definitionLabel`,`definitionLabelMarker`,`definitionLabelString`)(t)}function s(t){return i=KE(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 tD(t)?tO(e,l)(t):l(t)}function l(t){return QD(e,u,n,`definitionDestination`,`definitionDestinationLiteral`,`definitionDestinationLiteralMarker`,`definitionDestinationRaw`,`definitionDestinationString`)(t)}function u(t){return e.attempt(rO,d,d)(t)}function d(t){return nD(t)?sD(e,f,`whitespace`)(t):f(t)}function f(a){return a===null||eD(a)?(e.exit(`definition`),r.parser.defined.push(i),t(a)):n(a)}}function aO(e,t,n){return r;function r(t){return tD(t)?tO(e,i)(t):n(t)}function i(t){return eO(e,a,n,`definitionTitle`,`definitionTitleMarker`,`definitionTitleString`)(t)}function a(t){return nD(t)?sD(e,o,`whitespace`)(t):o(t)}function o(e){return e===null||eD(e)?t(e):n(e)}}var oO={name:`hardBreakEscape`,tokenize:sO};function sO(e,t,n){return r;function r(t){return e.enter(`hardBreakEscape`),e.consume(t),i}function i(r){return eD(r)?(e.exit(`hardBreakEscape`),t(r)):n(r)}}var cO={name:`headingAtx`,resolve:lO,tokenize:uO};function lO(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`},zE(e,r,n-r+1,[[`enter`,i,t],[`enter`,a,t],[`exit`,a,t],[`exit`,i,t]])),e}function uO(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||tD(t)?(e.exit(`atxHeadingSequence`),s(t)):n(t)}function s(n){return n===35?(e.enter(`atxHeadingSequence`),c(n)):n===null||eD(n)?(e.exit(`atxHeading`),t(n)):nD(n)?sD(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||tD(t)?(e.exit(`atxHeadingText`),s(t)):(e.consume(t),l)}}var dO=`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(`.`),fO=[`pre`,`script`,`style`,`textarea`],pO={concrete:!0,name:`htmlFlow`,resolveTo:gO,tokenize:_O},mO={partial:!0,tokenize:yO},hO={partial:!0,tokenize:vO};function gO(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 _O(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):qE(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):qE(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 qE(t)?(e.consume(t),o=String.fromCharCode(t),g):n(t)}function g(s){if(s===null||s===47||s===62||tD(s)){let c=s===47,l=o.toLowerCase();return!c&&!a&&fO.includes(l)?(i=1,r.interrupt?t(s):O(s)):dO.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||JE(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 nD(t)?(e.consume(t),v):E(t)}function y(t){return t===47?(e.consume(t),E):t===58||t===95||qE(t)?(e.consume(t),b):nD(t)?(e.consume(t),y):E(t)}function b(t){return t===45||t===46||t===58||t===95||JE(t)?(e.consume(t),b):x(t)}function x(t){return t===61?(e.consume(t),S):nD(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):nD(t)?(e.consume(t),S):w(t)}function C(t){return t===c?(e.consume(t),c=null,T):t===null||eD(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||tD(t)?x(t):(e.consume(t),w)}function T(e){return e===47||e===62||nD(e)?y(e):n(e)}function E(t){return t===62?(e.consume(t),D):n(t)}function D(t){return t===null||eD(t)?O(t):nD(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):eD(t)&&(i===6||i===7)?(e.exit(`htmlFlowData`),e.check(mO,R,k)(t)):t===null||eD(t)?(e.exit(`htmlFlowData`),k(t)):(e.consume(t),O)}function k(t){return e.check(hO,A,R)(t)}function A(t){return e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),j}function j(t){return t===null||eD(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 fO.includes(n)?(e.consume(t),L):O(t)}return qE(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||eD(t)?(e.exit(`htmlFlowData`),R(t)):(e.consume(t),L)}function R(n){return e.exit(`htmlFlow`),t(n)}}function vO(e,t,n){let r=this;return i;function i(t){return eD(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 yO(e,t,n){return r;function r(r){return e.enter(`lineEnding`),e.consume(r),e.exit(`lineEnding`),e.attempt(xD,t,n)}}var bO={name:`htmlText`,tokenize:xO};function xO(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):qE(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):qE(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):eD(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):eD(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):eD(t)?(o=v,N(t)):(e.consume(t),v)}function y(t){return t===null?n(t):t===63?(e.consume(t),b):eD(t)?(o=y,N(t)):(e.consume(t),y)}function b(e){return e===62?M(e):y(e)}function x(t){return qE(t)?(e.consume(t),S):n(t)}function S(t){return t===45||JE(t)?(e.consume(t),S):C(t)}function C(t){return eD(t)?(o=C,N(t)):nD(t)?(e.consume(t),C):M(t)}function w(t){return t===45||JE(t)?(e.consume(t),w):t===47||t===62||tD(t)?T(t):n(t)}function T(t){return t===47?(e.consume(t),M):t===58||t===95||qE(t)?(e.consume(t),E):eD(t)?(o=T,N(t)):nD(t)?(e.consume(t),T):M(t)}function E(t){return t===45||t===46||t===58||t===95||JE(t)?(e.consume(t),E):D(t)}function D(t){return t===61?(e.consume(t),O):eD(t)?(o=D,N(t)):nD(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):eD(t)?(o=O,N(t)):nD(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):eD(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||tD(t)?T(t):(e.consume(t),A)}function j(e){return e===47||e===62||tD(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 nD(t)?sD(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 SO={name:`labelEnd`,resolveAll:EO,resolveTo:DO,tokenize:OO},CO={tokenize:kO},wO={tokenize:AO},TO={tokenize:jO};function EO(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&&zE(e,0,e.length,n),e}function DO(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=BE(s,e.slice(a+1,a+r+3)),s=BE(s,[[`enter`,u,t]]),s=BE(s,hD(t.parser.constructs.insideSpan.null,e.slice(a+r+4,o-3),t)),s=BE(s,[[`exit`,u,t],e[o-2],e[o-1],[`exit`,l,t]]),s=BE(s,e.slice(o+1)),s=BE(s,[[`exit`,c,t]]),zE(e,a,e.length,s),e}function OO(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(KE(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(CO,u,o?u:d)(t):t===91?e.attempt(wO,u,o?l:d)(t):o?u(t):d(t)}function l(t){return e.attempt(TO,u,d)(t)}function u(e){return t(e)}function d(e){return a._balanced=!0,n(e)}}function kO(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 tD(t)?tO(e,a)(t):a(t)}function a(t){return t===41?u(t):QD(e,o,s,`resourceDestination`,`resourceDestinationLiteral`,`resourceDestinationLiteralMarker`,`resourceDestinationRaw`,`resourceDestinationString`,32)(t)}function o(t){return tD(t)?tO(e,c)(t):u(t)}function s(e){return n(e)}function c(t){return t===34||t===39||t===40?eO(e,l,n,`resourceTitle`,`resourceTitleMarker`,`resourceTitleString`)(t):u(t)}function l(t){return tD(t)?tO(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 AO(e,t,n){let r=this;return i;function i(t){return $D.call(r,e,a,o,`reference`,`referenceMarker`,`referenceString`)(t)}function a(e){return r.parser.defined.includes(KE(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(e):n(e)}function o(e){return n(e)}}function jO(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 MO={name:`labelStartImage`,resolveAll:SO.resolveAll,tokenize:NO};function NO(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 PO={name:`labelStartLink`,resolveAll:SO.resolveAll,tokenize:FO};function FO(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 IO={name:`lineEnding`,tokenize:LO};function LO(e,t){return n;function n(n){return e.enter(`lineEnding`),e.consume(n),e.exit(`lineEnding`),sD(e,t,`linePrefix`)}}var RO={name:`thematicBreak`,tokenize:zO};function zO(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||eD(a))?(e.exit(`thematicBreak`),t(a)):n(a)}function c(t){return t===i?(e.consume(t),r++,c):(e.exit(`thematicBreakSequence`),nD(t)?sD(e,s,`whitespace`)(t):s(t))}}var BO={continuation:{tokenize:WO},exit:KO,name:`list`,tokenize:UO},VO={partial:!0,tokenize:qO},HO={partial:!0,tokenize:GO};function UO(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:ZE(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(RO,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 ZE(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(xD,r.interrupt?n:u,e.attempt(VO,f,d))}function u(e){return r.containerState.initialBlankLine=!0,a++,f(e)}function d(t){return nD(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 WO(e,t,n){let r=this;return r.containerState._closeFlow=void 0,e.check(xD,i,a);function i(n){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,sD(e,t,`listItemIndent`,r.containerState.size+1)(n)}function a(n){return r.containerState.furtherBlankLines||!nD(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(HO,t,o)(n))}function o(i){return r.containerState._closeFlow=!0,r.interrupt=void 0,sD(e,e.attempt(BO,t,n),`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(i)}}function GO(e,t,n){let r=this;return sD(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 KO(e){e.exit(this.containerState.type)}function qO(e,t,n){let r=this;return sD(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!nD(e)&&i&&i[1].type===`listItemPrefixWhitespace`?t(e):n(e)}}var JO={name:`setextUnderline`,resolveTo:YO,tokenize:XO};function YO(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 XO(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`),nD(t)?sD(e,c,`lineSuffix`)(t):c(t))}function c(r){return r===null||eD(r)?(e.exit(`setextHeadingLine`),t(r)):n(r)}}var ZO={tokenize:QO};function QO(e){let t=this,n=e.attempt(xD,r,e.attempt(this.parser.constructs.flowInitial,i,sD(e,e.attempt(this.parser.constructs.flow,i,e.attempt(qD,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 $O={resolveAll:rk()},ek=nk(`string`),tk=nk(`text`);function nk(e){return{resolveAll:rk(e===`text`?ik: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 rk(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 ik(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 ak=s({attentionMarkers:()=>pk,contentInitial:()=>sk,disable:()=>mk,document:()=>ok,flow:()=>lk,flowInitial:()=>ck,insideSpan:()=>fk,string:()=>uk,text:()=>dk}),ok={42:BO,43:BO,45:BO,48:BO,49:BO,50:BO,51:BO,52:BO,53:BO,54:BO,55:BO,56:BO,57:BO,62:CD},sk={91:nO},ck={[-2]:FD,[-1]:FD,32:FD},lk={35:cO,42:RO,45:[JO,RO],60:pO,61:JO,95:RO,96:MD,126:MD},uk={38:kD,92:DD},dk={[-5]:IO,[-4]:IO,[-3]:IO,33:MO,38:kD,42:gD,60:[bD,bO],91:PO,92:[oO,DD],93:SO,95:gD,96:zD},fk={null:[gD,$O]},pk={null:[42,95]},mk={null:[]};function hk(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=BE(o,e),g(),o[o.length-1]===null?(w(t,0),l.events=hD(a,l.events,l),l.events):[]}function f(e,t){return _k(p(e),t)}function p(e){return gk(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){eD(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&&zE(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 gk(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 _k(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=`
59
+ Please change the parent <Route path="${e}"> to <Route path="${e===`/`?`*`:`${e}/*`}">.`)}let u=Cx(),d;if(t){let e=typeof t==`string`?_b(t):t;db(c===`/`||e.pathname?.startsWith(c),`When overriding the location using \`<Routes location>\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${c}" but pathname "${e.pathname}" was given in the \`location\` prop.`),d=e}else d=u;let f=d.pathname||`/`,p=f;if(c!==`/`){let e=c.replace(/^\//,``).split(`/`);p=`/`+f.replace(/^\//,``).split(`/`).slice(e.length).join(`/`)}let m=n&&n.state.matches.length?n.state.matches.map(e=>Object.assign(e,{route:n.manifest[e.route.id]||e.route})):bb(e,{pathname:p});fb(l||m!=null,`No routes matched location "${d.pathname}${d.search}${d.hash}" `),fb(m==null||m[m.length-1].route.element!==void 0||m[m.length-1].route.Component!==void 0||m[m.length-1].route.lazy!==void 0,`Matched leaf route at location "${d.pathname}${d.search}${d.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`);let h=Bx(m&&m.map(e=>Object.assign({},e,{params:Object.assign({},o,e.params),pathname:qb([c,r.encodeLocation?r.encodeLocation(e.pathname.replace(/%/g,`%25`).replace(/\?/g,`%3F`).replace(/#/g,`%23`)).pathname:e.pathname]),pathnameBase:e.pathnameBase===`/`?c:qb([c,r.encodeLocation?r.encodeLocation(e.pathnameBase.replace(/%/g,`%25`).replace(/\?/g,`%3F`).replace(/#/g,`%23`)).pathname:e.pathnameBase])})),i,n);return t&&h?w.createElement(hx.Provider,{value:{location:{pathname:`/`,search:``,hash:``,state:null,key:`default`,mask:void 0,...d},navigationType:`POP`}},h):h}function Px(){let e=qx(),t=$b(e)?`${e.status} ${e.statusText}`:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,r=`rgba(200,200,200, 0.5)`,i={padding:`0.5rem`,backgroundColor:r},a={padding:`2px 4px`,backgroundColor:r},o=null;return console.error(`Error handled by React Router default ErrorBoundary:`,e),o=w.createElement(w.Fragment,null,w.createElement(`p`,null,`💿 Hey developer 👋`),w.createElement(`p`,null,`You can provide a way better UX than this when your app throws errors by providing your own `,w.createElement(`code`,{style:a},`ErrorBoundary`),` or`,` `,w.createElement(`code`,{style:a},`errorElement`),` prop on your route.`)),w.createElement(w.Fragment,null,w.createElement(`h2`,null,`Unexpected Application Error!`),w.createElement(`h3`,{style:{fontStyle:`italic`}},t),n?w.createElement(`pre`,{style:i},n):null,o)}var Fx=w.createElement(Px,null),Ix=class extends w.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){return t.location!==e.location||t.revalidation!==`idle`&&e.revalidation===`idle`?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error===void 0?t.error:e.error,location:t.location,revalidation:e.revalidation||t.revalidation}}componentDidCatch(e,t){this.props.onError?this.props.onError(e,t):console.error(`React Router caught the following error during render`,e)}render(){let e=this.state.error;if(this.context&&typeof e==`object`&&e&&`digest`in e&&typeof e.digest==`string`){let t=bx(e.digest);t&&(e=t)}let t=e===void 0?this.props.children:w.createElement(gx.Provider,{value:this.props.routeContext},w.createElement(_x.Provider,{value:e,children:this.props.component}));return this.context?w.createElement(Rx,{error:e},t):t}};Ix.contextType=lx;var Lx=new WeakMap;function Rx({children:e,error:t}){let{basename:n}=w.useContext(mx);if(typeof t==`object`&&t&&`digest`in t&&typeof t.digest==`string`){let e=yx(t.digest);if(e){let r=Lx.get(t);if(r)throw r;let i=nx(e.location,n),a=i.absoluteURL||i.to;if(ox(a))throw Error(`Invalid redirect location`);if(tx&&!Lx.get(t))if(i.isExternal||e.reloadDocument)window.location.href=a;else{let n=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(i.to,{replace:e.replace}));throw Lx.set(t,n),n}return w.createElement(`meta`,{httpEquiv:`refresh`,content:`0;url=${a}`})}}return e}function zx({routeContext:e,match:t,children:n}){let r=w.useContext(sx);return r&&r.static&&r.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(r.staticContext._deepestRenderedBoundaryId=t.route.id),w.createElement(gx.Provider,{value:e},n)}function Bx(e,t=[],n){let r=n?.state;if(e==null){if(!r)return null;if(r.errors)e=r.matches;else if(t.length===0&&!r.initialized&&r.matches.length>0)e=r.matches;else return null}let i=e,a=r?.errors;if(a!=null){let e=i.findIndex(e=>e.route.id&&a?.[e.route.id]!==void 0);db(e>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(a).join(`,`)}`),i=i.slice(0,Math.min(i.length,e+1))}let o=!1,s=-1;if(n&&r){o=r.renderFallback;for(let e=0;e<i.length;e++){let t=i[e];if((t.route.HydrateFallback||t.route.hydrateFallbackElement)&&(s=e),t.route.id){let{loaderData:e,errors:a}=r,c=t.route.loader&&!e.hasOwnProperty(t.route.id)&&(!a||a[t.route.id]===void 0);if(t.route.lazy||c){n.isStatic&&(o=!0),i=s>=0?i.slice(0,s+1):[i[0]];break}}}}let c=n?.onError,l=r&&c?(e,t)=>{c(e,{location:r.location,params:r.matches?.[0]?.params??{},pattern:ex(r.matches),errorInfo:t})}:void 0;return i.reduceRight((e,n,c)=>{let u,d=!1,f=null,p=null;r&&(u=a&&n.route.id?a[n.route.id]:void 0,f=n.route.errorElement||Fx,o&&(s<0&&c===0?(Xx(`route-fallback`,!1,"No `HydrateFallback` element provided to render during initial hydration"),d=!0,p=null):s===c&&(d=!0,p=n.route.hydrateFallbackElement||null)));let m=t.concat(i.slice(0,c+1)),h=()=>{let t;return t=u?f:d?p:n.route.Component?w.createElement(n.route.Component,null):n.route.element?n.route.element:e,w.createElement(zx,{match:n,routeContext:{outlet:e,matches:m,isDataRoute:r!=null},children:t})};return r&&(n.route.ErrorBoundary||n.route.errorElement||c===0)?w.createElement(Ix,{location:r.location,revalidation:r.revalidation,component:f,error:u,children:h(),routeContext:{outlet:null,matches:m,isDataRoute:!0},onError:l}):h()},null)}function Vx(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function Hx(e){let t=w.useContext(sx);return db(t,Vx(e)),t}function Ux(e){let t=w.useContext(cx);return db(t,Vx(e)),t}function Wx(e){let t=w.useContext(gx);return db(t,Vx(e)),t}function Gx(e){let t=Wx(e),n=t.matches[t.matches.length-1];return db(n.route.id,`${e} can only be used on routes that contain a unique "id"`),n.route.id}function Kx(){return Gx(`useRouteId`)}function qx(){let e=w.useContext(_x),t=Ux(`useRouteError`),n=Gx(`useRouteError`);return e===void 0?t.errors?.[n]:e}function Jx(){let{router:e}=Hx(`useNavigate`),t=Gx(`useNavigate`),n=w.useRef(!1);return Tx(()=>{n.current=!0}),w.useCallback(async(r,i={})=>{fb(n.current,wx),n.current&&(typeof r==`number`?await e.navigate(r):await e.navigate(r,{fromRouteId:t,...i}))},[e,t])}var Yx={};function Xx(e,t,n){!t&&!Yx[e]&&(Yx[e]=!0,fb(!1,n))}w.memo(Zx);function Zx({routes:e,manifest:t,future:n,state:r,isStatic:i,onError:a}){return Nx(e,void 0,{manifest:t,state:r,isStatic:i,onError:a,future:n})}function Qx(e){return kx(e.context)}function $x(e){db(!1,`A <Route> is only ever to be used as the child of <Routes> element, never rendered directly. Please wrap your <Route> in a <Routes>.`)}function eS({basename:e=`/`,children:t=null,location:n,navigationType:r=`POP`,navigator:i,static:a=!1,useTransitions:o}){db(!Sx(),`You cannot render a <Router> inside another <Router>. You should never have more than one in your app.`);let s=e.replace(/^\/*/,`/`),c=w.useMemo(()=>({basename:s,navigator:i,static:a,useTransitions:o,future:{}}),[s,i,a,o]);typeof n==`string`&&(n=_b(n));let{pathname:l=`/`,search:u=``,hash:d=``,state:f=null,key:p=`default`,mask:m}=n,h=w.useMemo(()=>{let e=zb(l,s);return e==null?null:{location:{pathname:e,search:u,hash:d,state:f,key:p,mask:m},navigationType:r}},[s,l,u,d,f,p,r,m]);return fb(h!=null,`<Router basename="${s}"> is not able to match the URL "${l}${u}${d}" because it does not start with the basename, so the <Router> won't render anything.`),h==null?null:w.createElement(mx.Provider,{value:c},w.createElement(hx.Provider,{children:t,value:h}))}function tS({children:e,location:t}){return Mx(nS(e),t)}w.Component;function nS(e,t=[]){let n=[];return w.Children.forEach(e,(e,r)=>{if(!w.isValidElement(e))return;let i=[...t,r];if(e.type===w.Fragment){n.push.apply(n,nS(e.props.children,i));return}db(e.type===$x,`[${typeof e.type==`string`?e.type:e.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`),db(!e.props.index||!e.props.children,`An index route cannot have child routes.`);let a={id:e.props.id||i.join(`-`),caseSensitive:e.props.caseSensitive,element:e.props.element,Component:e.props.Component,index:e.props.index,path:e.props.path,middleware:e.props.middleware,loader:e.props.loader,action:e.props.action,hydrateFallbackElement:e.props.hydrateFallbackElement,HydrateFallback:e.props.HydrateFallback,errorElement:e.props.errorElement,ErrorBoundary:e.props.ErrorBoundary,hasErrorBoundary:e.props.hasErrorBoundary===!0||e.props.ErrorBoundary!=null||e.props.errorElement!=null,shouldRevalidate:e.props.shouldRevalidate,handle:e.props.handle,lazy:e.props.lazy};e.props.children&&(a.children=nS(e.props.children,i)),n.push(a)}),n}var rS=`get`,iS=`application/x-www-form-urlencoded`;function aS(e){return typeof HTMLElement<`u`&&e instanceof HTMLElement}function oS(e){return aS(e)&&e.tagName.toLowerCase()===`button`}function sS(e){return aS(e)&&e.tagName.toLowerCase()===`form`}function cS(e){return aS(e)&&e.tagName.toLowerCase()===`input`}function lS(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function uS(e,t){return e.button===0&&(!t||t===`_self`)&&!lS(e)}function dS(e=``){return new URLSearchParams(typeof e==`string`||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce((t,n)=>{let r=e[n];return t.concat(Array.isArray(r)?r.map(e=>[n,e]):[[n,r]])},[]))}function fS(e,t){let n=dS(e);return t&&t.forEach((e,r)=>{n.has(r)||t.getAll(r).forEach(e=>{n.append(r,e)})}),n}var pS=null;function mS(){if(pS===null)try{new FormData(document.createElement(`form`),0),pS=!1}catch{pS=!0}return pS}var hS=new Set([`application/x-www-form-urlencoded`,`multipart/form-data`,`text/plain`]);function gS(e){return e!=null&&!hS.has(e)?(fb(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${iS}"`),null):e}function _S(e,t){let n,r,i,a,o;if(sS(e)){let o=e.getAttribute(`action`);r=o?zb(o,t):null,n=e.getAttribute(`method`)||rS,i=gS(e.getAttribute(`enctype`))||iS,a=new FormData(e)}else if(oS(e)||cS(e)&&(e.type===`submit`||e.type===`image`)){let o=e.form;if(o==null)throw Error(`Cannot submit a <button> or <input type="submit"> without a <form>`);let s=e.getAttribute(`formaction`)||o.getAttribute(`action`);if(r=s?zb(s,t):null,n=e.getAttribute(`formmethod`)||o.getAttribute(`method`)||rS,i=gS(e.getAttribute(`formenctype`))||gS(o.getAttribute(`enctype`))||iS,a=new FormData(o,e),!mS()){let{name:t,type:n,value:r}=e;if(n===`image`){let e=t?`${t}.`:``;a.append(`${e}x`,`0`),a.append(`${e}y`,`0`)}else t&&a.append(t,r)}}else if(aS(e))throw Error(`Cannot submit element that is not <form>, <button>, or <input type="submit|image">`);else n=rS,r=null,i=iS,o=e;return a&&i===`text/plain`&&(o=a,a=void 0),{action:r,method:n.toLowerCase(),encType:i,formData:a,body:o}}Object.getOwnPropertyNames(Object.prototype).sort().join(`\0`);function vS(e,t){if(e===!1||e==null)throw Error(t)}function yS(e,t,n,r){let i=typeof e==`string`?new URL(e,typeof window>`u`?`server://singlefetch/`:window.location.origin):e;return i.pathname=n?i.pathname.endsWith(`/`)?`${i.pathname}_.${r}`:`${i.pathname}.${r}`:i.pathname===`/`?`_root.${r}`:t&&zb(i.pathname,t)===`/`?`${Jb(t)}/_root.${r}`:`${Jb(i.pathname)}.${r}`,i}async function bS(e,t){if(e.id in t)return t[e.id];try{let n=await ib(()=>import(e.module),[]);return t[e.id]=n,n}catch(t){return console.error(`Error loading route module \`${e.module}\`, reloading page...`),console.error(t),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function xS(e){return e!=null&&typeof e.page==`string`}function SS(e){return e==null?!1:e.href==null?e.rel===`preload`&&typeof e.imageSrcSet==`string`&&typeof e.imageSizes==`string`:typeof e.rel==`string`&&typeof e.href==`string`}async function CS(e,t,n){return OS((await Promise.all(e.map(async e=>{let r=t.routes[e.route.id];if(r){let e=await bS(r,n);return e.links?e.links():[]}return[]}))).flat(1).filter(SS).filter(e=>e.rel===`stylesheet`||e.rel===`preload`).map(e=>e.rel===`stylesheet`?{...e,rel:`prefetch`,as:`style`}:{...e,rel:`prefetch`}))}function wS(e,t,n,r,i,a){let o=(e,t)=>!n[t]||e.route.id!==n[t].route.id,s=(e,t)=>n[t].pathname!==e.pathname||n[t].route.path?.endsWith(`*`)&&n[t].params[`*`]!==e.params[`*`];return a===`assets`?t.filter((e,t)=>o(e,t)||s(e,t)):a===`data`?t.filter((t,a)=>{let c=r.routes[t.route.id];if(!c||!c.hasLoader)return!1;if(o(t,a)||s(t,a))return!0;if(t.route.shouldRevalidate){let r=t.route.shouldRevalidate({currentUrl:new URL(i.pathname+i.search+i.hash,window.origin),currentParams:n[0]?.params||{},nextUrl:new URL(e,window.origin),nextParams:t.params,defaultShouldRevalidate:!0});if(typeof r==`boolean`)return r}return!0}):[]}function TS(e,t,{includeHydrateFallback:n}={}){return ES(e.map(e=>{let r=t.routes[e.route.id];if(!r)return[];let i=[r.module];return r.clientActionModule&&(i=i.concat(r.clientActionModule)),r.clientLoaderModule&&(i=i.concat(r.clientLoaderModule)),n&&r.hydrateFallbackModule&&(i=i.concat(r.hydrateFallbackModule)),r.imports&&(i=i.concat(r.imports)),i}).flat(1))}function ES(e){return[...new Set(e)]}function DS(e){let t={},n=Object.keys(e).sort();for(let r of n)t[r]=e[r];return t}function OS(e,t){let n=new Set,r=new Set(t);return e.reduce((e,i)=>{if(t&&!xS(i)&&i.as===`script`&&i.href&&r.has(i.href))return e;let a=JSON.stringify(DS(i));return n.has(a)||(n.add(a),e.push({key:a,link:i})),e},[])}function kS(){let e=w.useContext(sx);return vS(e,`You must render this element inside a <DataRouterContext.Provider> element`),e}function AS(){let e=w.useContext(cx);return vS(e,`You must render this element inside a <DataRouterStateContext.Provider> element`),e}var jS=w.createContext(void 0);jS.displayName=`FrameworkContext`;function MS(){let e=w.useContext(jS);return vS(e,`You must render this element inside a <HydratedRouter> element`),e}function NS(e,t){let n=w.useContext(jS),[r,i]=w.useState(!1),[a,o]=w.useState(!1),{onFocus:s,onBlur:c,onMouseEnter:l,onMouseLeave:u,onTouchStart:d}=t,f=w.useRef(null);w.useEffect(()=>{if(e===`render`&&o(!0),e===`viewport`){let e=new IntersectionObserver(e=>{e.forEach(e=>{o(e.isIntersecting)})},{threshold:.5});return f.current&&e.observe(f.current),()=>{e.disconnect()}}},[e]),w.useEffect(()=>{if(r){let e=setTimeout(()=>{o(!0)},100);return()=>{clearTimeout(e)}}},[r]);let p=()=>{i(!0)},m=()=>{i(!1),o(!1)};return n?e===`intent`?[a,f,{onFocus:PS(s,p),onBlur:PS(c,m),onMouseEnter:PS(l,p),onMouseLeave:PS(u,m),onTouchStart:PS(d,p)}]:[a,f,{}]:[!1,f,{}]}function PS(e,t){return n=>{e&&e(n),n.defaultPrevented||t(n)}}function FS({page:e,...t}){let n=ux(),{nonce:r}=MS(),{router:i}=kS(),a=w.useMemo(()=>bb(i.routes,e,i.basename),[i.routes,e,i.basename]);return a?(t.nonce==null&&r&&(t={...t,nonce:r}),n?w.createElement(LS,{page:e,matches:a,...t}):w.createElement(RS,{page:e,matches:a,...t})):null}function IS(e){let{manifest:t,routeModules:n}=MS(),[r,i]=w.useState([]);return w.useEffect(()=>{let r=!1;return CS(e,t,n).then(e=>{r||i(e)}),()=>{r=!0}},[e,t,n]),r}function LS({page:e,matches:t,...n}){let r=Cx(),{future:i}=MS(),{basename:a}=kS(),o=w.useMemo(()=>{if(e===r.pathname+r.search+r.hash)return[];let n=yS(e,a,i.v8_trailingSlashAwareDataRequests,`rsc`),o=!1,s=[];for(let e of t)typeof e.route.shouldRevalidate==`function`?o=!0:s.push(e.route.id);return o&&s.length>0&&n.searchParams.set(`_routes`,s.join(`,`)),[n.pathname+n.search]},[a,i.v8_trailingSlashAwareDataRequests,e,r,t]);return w.createElement(w.Fragment,null,o.map(e=>w.createElement(`link`,{key:e,rel:`prefetch`,as:`fetch`,href:e,...n})))}function RS({page:e,matches:t,...n}){let r=Cx(),{future:i,manifest:a,routeModules:o}=MS(),{basename:s}=kS(),{loaderData:c,matches:l}=AS(),u=w.useMemo(()=>wS(e,t,l,a,r,`data`),[e,t,l,a,r]),d=w.useMemo(()=>wS(e,t,l,a,r,`assets`),[e,t,l,a,r]),f=w.useMemo(()=>{if(e===r.pathname+r.search+r.hash)return[];let n=new Set,l=!1;if(t.forEach(e=>{let t=a.routes[e.route.id];!t||!t.hasLoader||(!u.some(t=>t.route.id===e.route.id)&&e.route.id in c&&o[e.route.id]?.shouldRevalidate||t.hasClientLoader?l=!0:n.add(e.route.id))}),n.size===0)return[];let d=yS(e,s,i.v8_trailingSlashAwareDataRequests,`data`);return l&&n.size>0&&d.searchParams.set(`_routes`,t.filter(e=>n.has(e.route.id)).map(e=>e.route.id).join(`,`)),[d.pathname+d.search]},[s,i.v8_trailingSlashAwareDataRequests,c,r,a,u,t,e,o]),p=w.useMemo(()=>TS(d,a),[d,a]),m=IS(d);return w.createElement(w.Fragment,null,f.map(e=>w.createElement(`link`,{key:e,rel:`prefetch`,as:`fetch`,href:e,...n})),p.map(e=>w.createElement(`link`,{key:e,rel:`modulepreload`,href:e,...n})),m.map(({key:e,link:t})=>w.createElement(`link`,{key:e,nonce:n.nonce,...t,crossOrigin:t.crossOrigin??n.crossOrigin})))}function zS(...e){return t=>{e.forEach(e=>{typeof e==`function`?e(t):e!=null&&(e.current=t)})}}w.Component;var BS=typeof window<`u`&&window.document!==void 0&&window.document.createElement!==void 0;try{BS&&(window.__reactRouterVersion=`7.18.2`)}catch{}function VS({basename:e,children:t,useTransitions:n,window:r}){let i=w.useRef();i.current??=ub({window:r,v5Compat:!0});let a=i.current,[o,s]=w.useState({action:a.action,location:a.location}),c=w.useCallback(e=>{n===!1?s(e):w.startTransition(()=>s(e))},[n]);return w.useLayoutEffect(()=>a.listen(c),[a,c]),w.createElement(eS,{basename:e,children:t,location:o.location,navigationType:o.action,navigator:a,useTransitions:n})}var HS=w.forwardRef(function({onClick:e,discover:t=`render`,prefetch:n=`none`,relative:r,reloadDocument:i,replace:a,mask:o,state:s,target:c,to:l,preventScrollReset:u,viewTransition:d,defaultShouldRevalidate:f,...p},m){let{basename:h,navigator:g,useTransitions:_}=w.useContext(mx),v=typeof l==`string`&&ab.test(l),y=nx(l,h);l=y.to;let b=xx(l,{relative:r}),x=Cx(),S=null;if(o){let e=Gb(o,[],x.mask?x.mask.pathname:`/`,!0);h!==`/`&&(e.pathname=e.pathname===`/`?h:qb([h,e.pathname])),S=g.createHref(e)}let[C,T,E]=NS(n,p),D=qS(l,{replace:a,mask:o,state:s,target:c,preventScrollReset:u,relative:r,viewTransition:d,defaultShouldRevalidate:f,useTransitions:_});function O(t){e&&e(t),t.defaultPrevented||D(t)}let k=!(y.isExternal||i),A=w.createElement(`a`,{...p,...E,href:(k?S:void 0)||y.absoluteURL||b,onClick:k?O:e,ref:zS(m,T),target:c,"data-discover":!v&&t===`render`?`true`:void 0});return C&&!v?w.createElement(w.Fragment,null,A,w.createElement(FS,{page:b})):A});HS.displayName=`Link`;var US=w.forwardRef(function({"aria-current":e=`page`,caseSensitive:t=!1,className:n=``,end:r=!1,style:i,to:a,viewTransition:o,children:s,...c},l){let u=jx(a,{relative:c.relative}),d=Cx(),f=w.useContext(cx),{navigator:p,basename:m}=w.useContext(mx),h=f!=null&&$S(u)&&o===!0,g=p.encodeLocation?p.encodeLocation(u).pathname:u.pathname,_=d.pathname,v=f&&f.navigation&&f.navigation.location?f.navigation.location.pathname:null;t||(_=_.toLowerCase(),v=v?v.toLowerCase():null,g=g.toLowerCase()),v&&m&&(v=zb(v,m)||v);let y=g!==`/`&&g.endsWith(`/`)?g.length-1:g.length,b=_===g||!r&&_.startsWith(g)&&_.charAt(y)===`/`,x=v!=null&&(v===g||!r&&v.startsWith(g)&&v.charAt(g.length)===`/`),S={isActive:b,isPending:x,isTransitioning:h},C=b?e:void 0,T;T=typeof n==`function`?n(S):[n,b?`active`:null,x?`pending`:null,h?`transitioning`:null].filter(Boolean).join(` `);let E=typeof i==`function`?i(S):i;return w.createElement(HS,{...c,"aria-current":C,className:T,ref:l,style:E,to:a,viewTransition:o},typeof s==`function`?s(S):s)});US.displayName=`NavLink`;var WS=w.forwardRef(({discover:e=`render`,fetcherKey:t,navigate:n,reloadDocument:r,replace:i,state:a,method:o=rS,action:s,onSubmit:c,relative:l,preventScrollReset:u,viewTransition:d,defaultShouldRevalidate:f,...p},m)=>{let{useTransitions:h}=w.useContext(mx),g=ZS(),_=QS(s,{relative:l}),v=o.toLowerCase()===`get`?`get`:`post`,y=typeof s==`string`&&ab.test(s);return w.createElement(`form`,{ref:m,method:v,action:_,onSubmit:r?c:e=>{if(c&&c(e),e.defaultPrevented)return;e.preventDefault();let r=e.nativeEvent.submitter,s=r?.getAttribute(`formmethod`)||o,p=()=>g(r||e.currentTarget,{fetcherKey:t,method:s,navigate:n,replace:i,state:a,relative:l,preventScrollReset:u,viewTransition:d,defaultShouldRevalidate:f});h&&n!==!1?w.startTransition(()=>p()):p()},...p,"data-discover":!y&&e===`render`?`true`:void 0})});WS.displayName=`Form`;function GS(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function KS(e){let t=w.useContext(sx);return db(t,GS(e)),t}function qS(e,{target:t,replace:n,mask:r,state:i,preventScrollReset:a,relative:o,viewTransition:s,defaultShouldRevalidate:c,useTransitions:l}={}){let u=Ex(),d=Cx(),f=jx(e,{relative:o});return w.useCallback(p=>{if(uS(p,t)){p.preventDefault();let t=n===void 0?gb(d)===gb(f):n,m=()=>u(e,{replace:t,mask:r,state:i,preventScrollReset:a,relative:o,viewTransition:s,defaultShouldRevalidate:c});l?w.startTransition(()=>m()):m()}},[d,u,f,n,r,i,t,e,a,o,s,c,l])}function JS(e){fb(typeof URLSearchParams<`u`,"You cannot use the `useSearchParams` hook in a browser that does not support the URLSearchParams API. If you need to support Internet Explorer 11, we recommend you load a polyfill such as https://github.com/ungap/url-search-params.");let t=w.useRef(dS(e)),n=w.useRef(!1),r=Cx(),i=w.useMemo(()=>fS(r.search,n.current?null:t.current),[r.search]),a=Ex();return[i,w.useCallback((e,t)=>{let r=dS(typeof e==`function`?e(new URLSearchParams(i)):e);n.current=!0,a(`?`+r,t)},[a,i])]}var YS=0,XS=()=>`__${String(++YS)}__`;function ZS(){let{router:e}=KS(`useSubmit`),{basename:t}=w.useContext(mx),n=Kx(),r=e.fetch,i=e.navigate;return w.useCallback(async(e,a={})=>{let{action:o,method:s,encType:c,formData:l,body:u}=_S(e,t);if(a.navigate===!1){let e=a.fetcherKey||XS();await r(e,n,a.action||o,{defaultShouldRevalidate:a.defaultShouldRevalidate,preventScrollReset:a.preventScrollReset,formData:l,body:u,formMethod:a.method||s,formEncType:a.encType||c,flushSync:a.flushSync})}else await i(a.action||o,{defaultShouldRevalidate:a.defaultShouldRevalidate,preventScrollReset:a.preventScrollReset,formData:l,body:u,formMethod:a.method||s,formEncType:a.encType||c,replace:a.replace,state:a.state,fromRouteId:n,flushSync:a.flushSync,viewTransition:a.viewTransition})},[r,i,t,n])}function QS(e,{relative:t}={}){let{basename:n}=w.useContext(mx),r=w.useContext(gx);db(r,`useFormAction must be used inside a RouteContext`);let[i]=r.matches.slice(-1),a={...jx(e||`.`,{relative:t})},o=Cx();if(e==null){a.search=o.search;let e=new URLSearchParams(a.search),t=e.getAll(`index`);if(t.some(e=>e===``)){e.delete(`index`),t.filter(e=>e).forEach(t=>e.append(`index`,t));let n=e.toString();a.search=n?`?${n}`:``}}return(!e||e===`.`)&&i.route.index&&(a.search=a.search?a.search.replace(/^\?/,`?index&`):`?index`),n!==`/`&&(a.pathname=a.pathname===`/`?n:qb([n,a.pathname])),gb(a)}function $S(e,{relative:t}={}){let n=w.useContext(dx);db(n!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:r}=KS(`useViewTransitionState`),i=jx(e,{relative:t});if(!n.isTransitioning)return!1;let a=zb(n.currentLocation.pathname,r)||n.currentLocation.pathname,o=zb(n.nextLocation.pathname,r)||n.nextLocation.pathname;return Fb(i.pathname,o)!=null||Fb(i.pathname,a)!=null}var eC={outline:{xmlns:`http://www.w3.org/2000/svg`,width:24,height:24,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:2,strokeLinecap:`round`,strokeLinejoin:`round`},filled:{xmlns:`http://www.w3.org/2000/svg`,width:24,height:24,viewBox:`0 0 24 24`,fill:`currentColor`,stroke:`none`}},tC=(e,t,n,r)=>{let i=(0,w.forwardRef)(({color:n=`currentColor`,size:i=24,stroke:a=2,title:o,className:s,children:c,...l},u)=>(0,w.createElement)(`svg`,{ref:u,...eC[e],width:i,height:i,className:[`tabler-icon`,`tabler-icon-${t}`,s].join(` `),...e===`filled`?{fill:n}:{strokeWidth:a,stroke:n},...l},[o&&(0,w.createElement)(`title`,{key:`svg-title`},o),...r.map(([e,t])=>(0,w.createElement)(e,t)),...Array.isArray(c)?c:[c]]));return i.displayName=`${n}`,i},nC=tC(`outline`,`adjustments-horizontal`,`AdjustmentsHorizontal`,[[`path`,{d:`M12 6a2 2 0 1 0 4 0a2 2 0 1 0 -4 0`,key:`svg-0`}],[`path`,{d:`M4 6l8 0`,key:`svg-1`}],[`path`,{d:`M16 6l4 0`,key:`svg-2`}],[`path`,{d:`M6 12a2 2 0 1 0 4 0a2 2 0 1 0 -4 0`,key:`svg-3`}],[`path`,{d:`M4 12l2 0`,key:`svg-4`}],[`path`,{d:`M10 12l10 0`,key:`svg-5`}],[`path`,{d:`M15 18a2 2 0 1 0 4 0a2 2 0 1 0 -4 0`,key:`svg-6`}],[`path`,{d:`M4 18l11 0`,key:`svg-7`}],[`path`,{d:`M19 18l1 0`,key:`svg-8`}]]),rC=tC(`outline`,`alert-circle`,`AlertCircle`,[[`path`,{d:`M3 12a9 9 0 1 0 18 0a9 9 0 0 0 -18 0`,key:`svg-0`}],[`path`,{d:`M12 8v4`,key:`svg-1`}],[`path`,{d:`M12 16h.01`,key:`svg-2`}]]),iC=tC(`outline`,`alert-triangle`,`AlertTriangle`,[[`path`,{d:`M12 9v4`,key:`svg-0`}],[`path`,{d:`M10.363 3.591l-8.106 13.534a1.914 1.914 0 0 0 1.636 2.871h16.214a1.914 1.914 0 0 0 1.636 -2.87l-8.106 -13.536a1.914 1.914 0 0 0 -3.274 0`,key:`svg-1`}],[`path`,{d:`M12 16h.01`,key:`svg-2`}]]),aC=tC(`outline`,`arrow-back-up`,`ArrowBackUp`,[[`path`,{d:`M9 14l-4 -4l4 -4`,key:`svg-0`}],[`path`,{d:`M5 10h11a4 4 0 1 1 0 8h-1`,key:`svg-1`}]]),oC=tC(`outline`,`arrow-left`,`ArrowLeft`,[[`path`,{d:`M5 12l14 0`,key:`svg-0`}],[`path`,{d:`M5 12l6 6`,key:`svg-1`}],[`path`,{d:`M5 12l6 -6`,key:`svg-2`}]]),sC=tC(`outline`,`arrow-right`,`ArrowRight`,[[`path`,{d:`M5 12l14 0`,key:`svg-0`}],[`path`,{d:`M13 18l6 -6`,key:`svg-1`}],[`path`,{d:`M13 6l6 6`,key:`svg-2`}]]),cC=tC(`outline`,`arrows-diff`,`ArrowsDiff`,[[`path`,{d:`M11 16h10`,key:`svg-0`}],[`path`,{d:`M11 16l4 4`,key:`svg-1`}],[`path`,{d:`M11 16l4 -4`,key:`svg-2`}],[`path`,{d:`M13 8h-10`,key:`svg-3`}],[`path`,{d:`M13 8l-4 4`,key:`svg-4`}],[`path`,{d:`M13 8l-4 -4`,key:`svg-5`}]]),lC=tC(`outline`,`book`,`Book`,[[`path`,{d:`M3 19a9 9 0 0 1 9 0a9 9 0 0 1 9 0`,key:`svg-0`}],[`path`,{d:`M3 6a9 9 0 0 1 9 0a9 9 0 0 1 9 0`,key:`svg-1`}],[`path`,{d:`M3 6l0 13`,key:`svg-2`}],[`path`,{d:`M12 6l0 13`,key:`svg-3`}],[`path`,{d:`M21 6l0 13`,key:`svg-4`}]]),uC=tC(`outline`,`check`,`Check`,[[`path`,{d:`M5 12l5 5l10 -10`,key:`svg-0`}]]),dC=tC(`outline`,`chevron-down`,`ChevronDown`,[[`path`,{d:`M6 9l6 6l6 -6`,key:`svg-0`}]]),gee=tC(`outline`,`chevron-left`,`ChevronLeft`,[[`path`,{d:`M15 6l-6 6l6 6`,key:`svg-0`}]]),fC=tC(`outline`,`chevron-right`,`ChevronRight`,[[`path`,{d:`M9 6l6 6l-6 6`,key:`svg-0`}]]),_ee=tC(`outline`,`chevrons-left`,`ChevronsLeft`,[[`path`,{d:`M11 7l-5 5l5 5`,key:`svg-0`}],[`path`,{d:`M17 7l-5 5l5 5`,key:`svg-1`}]]),vee=tC(`outline`,`chevrons-right`,`ChevronsRight`,[[`path`,{d:`M7 7l5 5l-5 5`,key:`svg-0`}],[`path`,{d:`M13 7l5 5l-5 5`,key:`svg-1`}]]),yee=tC(`outline`,`clock`,`Clock`,[[`path`,{d:`M3 12a9 9 0 1 0 18 0a9 9 0 0 0 -18 0`,key:`svg-0`}],[`path`,{d:`M12 7v5l3 3`,key:`svg-1`}]]),pC=tC(`outline`,`copy`,`Copy`,[[`path`,{d:`M7 9.667a2.667 2.667 0 0 1 2.667 -2.667h8.666a2.667 2.667 0 0 1 2.667 2.667v8.666a2.667 2.667 0 0 1 -2.667 2.667h-8.666a2.667 2.667 0 0 1 -2.667 -2.667l0 -8.666`,key:`svg-0`}],[`path`,{d:`M4.012 16.737a2.005 2.005 0 0 1 -1.012 -1.737v-10c0 -1.1 .9 -2 2 -2h10c.75 0 1.158 .385 1.5 1`,key:`svg-1`}]]),bee=tC(`outline`,`database`,`Database`,[[`path`,{d:`M4 6a8 3 0 1 0 16 0a8 3 0 1 0 -16 0`,key:`svg-0`}],[`path`,{d:`M4 6v6a8 3 0 0 0 16 0v-6`,key:`svg-1`}],[`path`,{d:`M4 12v6a8 3 0 0 0 16 0v-6`,key:`svg-2`}]]),mC=tC(`outline`,`device-desktop`,`DeviceDesktop`,[[`path`,{d:`M3 5a1 1 0 0 1 1 -1h16a1 1 0 0 1 1 1v10a1 1 0 0 1 -1 1h-16a1 1 0 0 1 -1 -1v-10`,key:`svg-0`}],[`path`,{d:`M7 20h10`,key:`svg-1`}],[`path`,{d:`M9 16v4`,key:`svg-2`}],[`path`,{d:`M15 16v4`,key:`svg-3`}]]),hC=tC(`outline`,`dots`,`Dots`,[[`path`,{d:`M4 12a1 1 0 1 0 2 0a1 1 0 1 0 -2 0`,key:`svg-0`}],[`path`,{d:`M11 12a1 1 0 1 0 2 0a1 1 0 1 0 -2 0`,key:`svg-1`}],[`path`,{d:`M18 12a1 1 0 1 0 2 0a1 1 0 1 0 -2 0`,key:`svg-2`}]]),gC=tC(`outline`,`download`,`Download`,[[`path`,{d:`M4 17v2a2 2 0 0 0 2 2h12a2 2 0 0 0 2 -2v-2`,key:`svg-0`}],[`path`,{d:`M7 11l5 5l5 -5`,key:`svg-1`}],[`path`,{d:`M12 4l0 12`,key:`svg-2`}]]),_C=tC(`outline`,`edit`,`Edit`,[[`path`,{d:`M7 7h-1a2 2 0 0 0 -2 2v9a2 2 0 0 0 2 2h9a2 2 0 0 0 2 -2v-1`,key:`svg-0`}],[`path`,{d:`M20.385 6.585a2.1 2.1 0 0 0 -2.97 -2.97l-8.415 8.385v3h3l8.385 -8.415`,key:`svg-1`}],[`path`,{d:`M16 5l3 3`,key:`svg-2`}]]),vC=tC(`outline`,`file-text`,`FileText`,[[`path`,{d:`M14 3v4a1 1 0 0 0 1 1h4`,key:`svg-0`}],[`path`,{d:`M17 21h-10a2 2 0 0 1 -2 -2v-14a2 2 0 0 1 2 -2h7l5 5v11a2 2 0 0 1 -2 2`,key:`svg-1`}],[`path`,{d:`M9 9l1 0`,key:`svg-2`}],[`path`,{d:`M9 13l6 0`,key:`svg-3`}],[`path`,{d:`M9 17l6 0`,key:`svg-4`}]]),yC=tC(`outline`,`flask`,`Flask`,[[`path`,{d:`M9 3l6 0`,key:`svg-0`}],[`path`,{d:`M10 9l4 0`,key:`svg-1`}],[`path`,{d:`M10 3v6l-4 11a.7 .7 0 0 0 .5 1h11a.7 .7 0 0 0 .5 -1l-4 -11v-6`,key:`svg-2`}]]),bC=tC(`outline`,`folder`,`Folder`,[[`path`,{d:`M5 4h4l3 3h7a2 2 0 0 1 2 2v8a2 2 0 0 1 -2 2h-14a2 2 0 0 1 -2 -2v-11a2 2 0 0 1 2 -2`,key:`svg-0`}]]),xC=tC(`outline`,`history`,`History`,[[`path`,{d:`M12 8l0 4l2 2`,key:`svg-0`}],[`path`,{d:`M3.05 11a9 9 0 1 1 .5 4m-.5 5v-5h5`,key:`svg-1`}]]),SC=tC(`outline`,`link`,`Link`,[[`path`,{d:`M9 15l6 -6`,key:`svg-0`}],[`path`,{d:`M11 6l.463 -.536a5 5 0 0 1 7.071 7.072l-.534 .464`,key:`svg-1`}],[`path`,{d:`M13 18l-.397 .534a5.068 5.068 0 0 1 -7.127 0a4.972 4.972 0 0 1 0 -7.071l.524 -.463`,key:`svg-2`}]]),CC=tC(`outline`,`list`,`List`,[[`path`,{d:`M9 6l11 0`,key:`svg-0`}],[`path`,{d:`M9 12l11 0`,key:`svg-1`}],[`path`,{d:`M9 18l11 0`,key:`svg-2`}],[`path`,{d:`M5 6l0 .01`,key:`svg-3`}],[`path`,{d:`M5 12l0 .01`,key:`svg-4`}],[`path`,{d:`M5 18l0 .01`,key:`svg-5`}]]),wC=tC(`outline`,`lock-open`,`LockOpen`,[[`path`,{d:`M5 13a2 2 0 0 1 2 -2h10a2 2 0 0 1 2 2v6a2 2 0 0 1 -2 2h-10a2 2 0 0 1 -2 -2l0 -6`,key:`svg-0`}],[`path`,{d:`M11 16a1 1 0 1 0 2 0a1 1 0 1 0 -2 0`,key:`svg-1`}],[`path`,{d:`M8 11v-5a4 4 0 0 1 8 0`,key:`svg-2`}]]),TC=tC(`outline`,`lock`,`Lock`,[[`path`,{d:`M5 13a2 2 0 0 1 2 -2h10a2 2 0 0 1 2 2v6a2 2 0 0 1 -2 2h-10a2 2 0 0 1 -2 -2v-6`,key:`svg-0`}],[`path`,{d:`M11 16a1 1 0 1 0 2 0a1 1 0 0 0 -2 0`,key:`svg-1`}],[`path`,{d:`M8 11v-4a4 4 0 1 1 8 0v4`,key:`svg-2`}]]),EC=tC(`outline`,`map-pin`,`MapPin`,[[`path`,{d:`M9 11a3 3 0 1 0 6 0a3 3 0 0 0 -6 0`,key:`svg-0`}],[`path`,{d:`M17.657 16.657l-4.243 4.243a2 2 0 0 1 -2.827 0l-4.244 -4.243a8 8 0 1 1 11.314 0`,key:`svg-1`}]]),DC=tC(`outline`,`moon`,`Moon`,[[`path`,{d:`M12 3c.132 0 .263 0 .393 0a7.5 7.5 0 0 0 7.92 12.446a9 9 0 1 1 -8.313 -12.454l0 .008`,key:`svg-0`}]]),OC=tC(`outline`,`player-play`,`PlayerPlay`,[[`path`,{d:`M7 4v16l13 -8l-13 -8`,key:`svg-0`}]]),kC=tC(`outline`,`plus`,`Plus`,[[`path`,{d:`M12 5l0 14`,key:`svg-0`}],[`path`,{d:`M5 12l14 0`,key:`svg-1`}]]),AC=tC(`outline`,`robot`,`Robot`,[[`path`,{d:`M6 6a2 2 0 0 1 2 -2h8a2 2 0 0 1 2 2v4a2 2 0 0 1 -2 2h-8a2 2 0 0 1 -2 -2l0 -4`,key:`svg-0`}],[`path`,{d:`M12 2v2`,key:`svg-1`}],[`path`,{d:`M9 12v9`,key:`svg-2`}],[`path`,{d:`M15 12v9`,key:`svg-3`}],[`path`,{d:`M5 16l4 -2`,key:`svg-4`}],[`path`,{d:`M15 14l4 2`,key:`svg-5`}],[`path`,{d:`M9 18h6`,key:`svg-6`}],[`path`,{d:`M10 8v.01`,key:`svg-7`}],[`path`,{d:`M14 8v.01`,key:`svg-8`}]]),jC=tC(`outline`,`search`,`Search`,[[`path`,{d:`M3 10a7 7 0 1 0 14 0a7 7 0 1 0 -14 0`,key:`svg-0`}],[`path`,{d:`M21 21l-6 -6`,key:`svg-1`}]]),MC=tC(`outline`,`sparkles`,`Sparkles`,[[`path`,{d:`M16 18a2 2 0 0 1 2 2a2 2 0 0 1 2 -2a2 2 0 0 1 -2 -2a2 2 0 0 1 -2 2m0 -12a2 2 0 0 1 2 2a2 2 0 0 1 2 -2a2 2 0 0 1 -2 -2a2 2 0 0 1 -2 2m-7 12a6 6 0 0 1 6 -6a6 6 0 0 1 -6 -6a6 6 0 0 1 -6 6a6 6 0 0 1 6 6`,key:`svg-0`}]]),NC=tC(`outline`,`stack-2`,`Stack2`,[[`path`,{d:`M12 4l-8 4l8 4l8 -4l-8 -4`,key:`svg-0`}],[`path`,{d:`M4 12l8 4l8 -4`,key:`svg-1`}],[`path`,{d:`M4 16l8 4l8 -4`,key:`svg-2`}]]),PC=tC(`outline`,`sun`,`Sun`,[[`path`,{d:`M8 12a4 4 0 1 0 8 0a4 4 0 1 0 -8 0`,key:`svg-0`}],[`path`,{d:`M3 12h1m8 -9v1m8 8h1m-9 8v1m-6.4 -15.4l.7 .7m12.1 -.7l-.7 .7m0 11.4l.7 .7m-12.1 -.7l-.7 .7`,key:`svg-1`}]]),FC=tC(`outline`,`terminal-2`,`Terminal2`,[[`path`,{d:`M8 9l3 3l-3 3`,key:`svg-0`}],[`path`,{d:`M13 15l3 0`,key:`svg-1`}],[`path`,{d:`M3 6a2 2 0 0 1 2 -2h14a2 2 0 0 1 2 2v12a2 2 0 0 1 -2 2h-14a2 2 0 0 1 -2 -2l0 -12`,key:`svg-2`}]]),IC=tC(`outline`,`trash`,`Trash`,[[`path`,{d:`M4 7l16 0`,key:`svg-0`}],[`path`,{d:`M10 11l0 6`,key:`svg-1`}],[`path`,{d:`M14 11l0 6`,key:`svg-2`}],[`path`,{d:`M5 7l1 12a2 2 0 0 0 2 2h8a2 2 0 0 0 2 -2l1 -12`,key:`svg-3`}],[`path`,{d:`M9 7v-3a1 1 0 0 1 1 -1h4a1 1 0 0 1 1 1v3`,key:`svg-4`}]]),LC=tC(`outline`,`upload`,`Upload`,[[`path`,{d:`M4 17v2a2 2 0 0 0 2 2h12a2 2 0 0 0 2 -2v-2`,key:`svg-0`}],[`path`,{d:`M7 9l5 -5l5 5`,key:`svg-1`}],[`path`,{d:`M12 4l0 12`,key:`svg-2`}]]),RC=tC(`outline`,`x`,`X`,[[`path`,{d:`M18 6l-12 12`,key:`svg-0`}],[`path`,{d:`M6 6l12 12`,key:`svg-1`}]]),zC=eb(),BC=`/api/v1`,VC=class extends Error{status;statusText;body;constructor(e,t,n){let r=``;try{let e=JSON.parse(n);typeof e.detail==`string`&&e.detail&&(r=e.detail)}catch{}super(r?`${r} (HTTP ${e})`:`API error ${e}: ${t}`),this.name=`ApiError`,this.status=e,this.statusText=t,this.body=n}},HC=class extends VC{errorMessage;see;note;constructor(e,t){super(503,`Service Unavailable`,e),this.name=`V07IngestionDeferredError`,this.errorMessage=t.error,this.see=t.see??null,this.note=t.note??null}};function UC(e){try{let t=JSON.parse(e),n=t.error;return typeof n!=`string`||!n.toLowerCase().includes(`v0.7`)?null:{error:n,see:typeof t.see==`string`?t.see:void 0,note:typeof t.note==`string`?t.note:void 0}}catch{}return null}async function WC(e,t){let n=`${BC}${e}`,r=await fetch(n,{...t,headers:{"Content-Type":`application/json`,...t?.headers}});if(!r.ok){let e=await r.text();if(r.status===503){let t=UC(e);if(t)throw new HC(e,t)}throw new VC(r.status,r.statusText,e)}return r.json()}async function GC(e){if(e.status!==503)return null;let t=await e.text(),n=UC(t);return n?new HC(t,n):null}async function KC(e){let t=``;try{t=await e.text()}catch{}try{let e=JSON.parse(t);for(let t of[e.detail,e.error])if(typeof t==`string`&&t.trim())return t}catch{}return`Upload failed: ${e.status}`}function qC(e){let t=Object.entries(e).filter(([,e])=>e!==void 0&&e!==``);return t.length===0?``:`?`+new URLSearchParams(t.map(([e,t])=>[e,String(t)])).toString()}async function JC(){return WC(`/preferences`)}async function YC(e){await WC(`/preferences`,{method:`PUT`,body:JSON.stringify(e)})}function XC(){let{colorScheme:e,setColorScheme:t}=nn();return(0,w.useEffect)(()=>{let n=!1;return JC().then(r=>{!n&&r.theme&&r.theme!==e&&t(r.theme)}).catch(()=>{}),()=>{n=!0}},[]),{theme:e,setTheme:e=>{t(e),YC({theme:e}).catch(()=>{})}}}async function ZC(){return WC(`/version`)}function QC(){let{data:e}=Yy({queryKey:[`version`],queryFn:ZC,staleTime:1/0,retry:!1}),t=e?.env_label?.trim();return t?(0,G.jsxs)(Nd,{icon:(0,G.jsx)(yC,{size:18}),color:`grape`,withCloseButton:!1,mb:`md`,"data-testid":`environment-banner`,children:[(0,G.jsxs)(Y,{size:`sm`,fw:600,children:[t.toUpperCase(),` environment — not production.`]}),(0,G.jsxs)(Y,{size:`xs`,c:`dimmed`,children:[`This server is running against the `,(0,G.jsx)(Y,{span:!0,fw:600,children:t}),` `,`database. Changes made here do not affect production.`]})]}):null}var $C=`/api/v1`;async function ew(){let e=await fetch(`${$C}/docs`);if(!e.ok)throw Error(`Failed to load docs index: ${e.status}`);return e.json()}async function tw(e){let t=await fetch(`${$C}/docs/${e.split(`/`).map(encodeURIComponent).join(`/`)}`);if(!t.ok)throw Error(`Failed to load doc '${e}': ${t.status}`);return t.text()}async function nw(){let e=await fetch(`${$C}/schema-version`);if(!e.ok)throw Error(`Failed to load schema version: ${e.status}`);return e.json()}function rw(){let{data:e}=Yy({queryKey:[`schema-version`],queryFn:nw,refetchInterval:6e4,staleTime:3e4,retry:!1}),t=e?.level===`below-min`;return!e||!t&&!e.mismatch?null:(0,G.jsxs)(Nd,{icon:(0,G.jsx)(iC,{size:18}),color:t?`red`:`yellow`,title:t?`Database schema is incompatible`:`Database schema out of date`,withCloseButton:!1,mb:`md`,children:[(0,G.jsx)(Y,{size:`sm`,children:t?(0,G.jsxs)(G.Fragment,{children:[`This Cerefox client (v`,e.bundled,`) requires schema v`,e.min,` or newer, but your Supabase has v`,e.deployed??`unknown`,`. Features will not work correctly until you redeploy.`]}):(0,G.jsxs)(G.Fragment,{children:[`Cerefox v`,e.bundled,` ships a newer schema than what is currently deployed to your Supabase (v`,e.deployed??`unknown`,`). Some features may behave incorrectly until you redeploy.`]})}),(0,G.jsx)(Y,{size:`sm`,mt:`xs`,children:`Redeploy with the Cerefox CLI:`}),(0,G.jsx)(Ap,{block:!0,mt:`xs`,children:`cerefox deploy-server --schema-only`})]})}var iw=`https://github.com/fstamatelopoulos/cerefox/releases`;function aw(){let{data:e}=Yy({queryKey:[`version`],queryFn:ZC,staleTime:1/0,retry:!1});if(!e)return null;let t=`${iw}/tag/v${e.version}`,n=e.git_commit_short?` (${e.git_commit_short})`:``;return(0,G.jsx)(El,{justify:`center`,py:`sm`,gap:`xs`,children:(0,G.jsxs)(Y,{size:`xs`,c:`dimmed`,children:[`Cerefox`,` `,(0,G.jsxs)(Bd,{href:t,target:`_blank`,rel:`noopener noreferrer`,size:`xs`,c:`dimmed`,underline:`hover`,children:[`v`,e.version]}),n]})})}var ow=[{label:`Dashboard`,path:`/`},{label:`Search`,path:`/search`},{label:`Metadata Search`,path:`/metadata-search`},{label:`Ingest`,path:`/ingest`},{label:`Projects`,path:`/projects`},{label:`Audit Log`,path:`/audit-log`},{label:`Trash`,path:`/trash`},{label:`Analytics`,path:`/analytics`},{label:`Settings`,path:`/settings`},{label:`Help`,path:`/help`}],sw=[{value:`light`,label:`Light`,icon:PC},{value:`dark`,label:`Dark`,icon:DC},{value:`auto`,label:`System`,icon:mC}];function cw(){let e=Ex(),t=Cx(),{theme:n,setTheme:r}=XC(),i=n===`light`?PC:n===`dark`?DC:mC;return(0,G.jsxs)(df,{header:{height:56},padding:`xs`,children:[(0,G.jsxs)(df.Header,{style:{position:`relative`},children:[(0,G.jsxs)(El,{h:`100%`,px:`md`,justify:`space-between`,children:[(0,G.jsxs)(El,{gap:`sm`,children:[(0,G.jsx)(`img`,{src:`/app/cerefox_icon.png`,alt:`Cerefox`,height:32,width:32,style:{borderRadius:4}}),(0,G.jsxs)(Y,{component:`span`,onClick:()=>e(`/`),style:{fontFamily:`var(--font-display)`,fontSize:18,fontWeight:600,letterSpacing:`-0.01em`,cursor:`pointer`},children:[`Cere`,(0,G.jsx)(`span`,{style:{color:`var(--primary)`},children:`fox`})]})]}),(0,G.jsxs)(El,{gap:`lg`,children:[ow.map(n=>(0,G.jsx)(sc,{onClick:()=>e(n.path),children:(0,G.jsx)(Y,{size:`sm`,fw:t.pathname===n.path?700:400,c:t.pathname===n.path?void 0:`dimmed`,children:n.label})},n.label)),(0,G.jsxs)(Jm,{position:`bottom-end`,withArrow:!0,shadow:`md`,width:150,children:[(0,G.jsx)(Jm.Target,{children:(0,G.jsx)(gl,{variant:`subtle`,size:`lg`,title:`Color theme`,"aria-label":`Color theme`,children:(0,G.jsx)(i,{size:18})})}),(0,G.jsxs)(Jm.Dropdown,{children:[(0,G.jsx)(Jm.Label,{children:`Theme`}),sw.map(e=>{let t=e.icon;return(0,G.jsx)(Jm.Item,{leftSection:(0,G.jsx)(t,{size:16}),rightSection:n===e.value?(0,G.jsx)(uC,{size:14}):null,onClick:()=>r(e.value),children:e.label},e.value)})]})]})]})]}),(0,G.jsx)(`div`,{style:{position:`absolute`,left:0,right:0,bottom:0,height:2,background:`linear-gradient(90deg, var(--primary), var(--violet) 60%, transparent)`}})]}),(0,G.jsxs)(df.Main,{children:[(0,G.jsx)(QC,{}),(0,G.jsx)(rw,{}),(0,G.jsx)(Qx,{}),(0,G.jsx)(aw,{})]})]})}async function lw(e){return WC(`/audit-log${qC(e??{})}`)}async function uw(e,t){return WC(`/documents/${e}/review-status`,{method:`POST`,body:JSON.stringify({status:t})})}async function dw(e,t,n){return WC(`/documents/${e}/versions/${t}/archive`,{method:`POST`,body:JSON.stringify({archived:n})})}var X={eyebrow:`_eyebrow_jg14y_6`,pageTitle:`_pageTitle_jg14y_25`,pageSub:`_pageSub_jg14y_34`,mono:`_mono_jg14y_44`,dim:`_dim_jg14y_45`,faint:`_faint_jg14y_46`,col:`_col_jg14y_47`,row:`_row_jg14y_48`,link:`_link_jg14y_49`,btn:`_btn_jg14y_59`,btnPrimary:`_btnPrimary_jg14y_74`,btnGhost:`_btnGhost_jg14y_84`,btnSubtle:`_btnSubtle_jg14y_93`,btnDanger:`_btnDanger_jg14y_105`,btnWarn:`_btnWarn_jg14y_111`,card:`_card_jg14y_121`,cardPad:`_cardPad_jg14y_127`,badge:`_badge_jg14y_130`,bPrimary:`_bPrimary_jg14y_142`,bViolet:`_bViolet_jg14y_143`,bBlue:`_bBlue_jg14y_144`,bGreen:`_bGreen_jg14y_145`,bYellow:`_bYellow_jg14y_146`,bRed:`_bRed_jg14y_147`,bNeutral:`_bNeutral_jg14y_148`,secHead:`_secHead_jg14y_151`,secTitle:`_secTitle_jg14y_157`,countPill:`_countPill_jg14y_168`,srcChip:`_srcChip_jg14y_180`,srcChipAgent:`_srcChipAgent_jg14y_193`,whatis:`_whatis_jg14y_200`,pageHead:`_pageHead_jg14y_219`,divider:`_divider_jg14y_228`,iconBtn:`_iconBtn_jg14y_104`,iconBtnSm:`_iconBtnSm_jg14y_253`,iconBtnDanger:`_iconBtnDanger_jg14y_104`,seg:`_seg_jg14y_277`,segBtn:`_segBtn_jg14y_285`,segBtnOn:`_segBtnOn_jg14y_304`,chip:`_chip_jg14y_311`,chipOn:`_chipOn_jg14y_330`,selectWrap:`_selectWrap_jg14y_337`,selectEl:`_selectEl_jg14y_351`,cliCard:`_cliCard_jg14y_370`,cliBlock:`_cliBlock_jg14y_374`,cliP:`_cliP_jg14y_383`,cliS:`_cliS_jg14y_387`,cliOut:`_cliOut_jg14y_390`,cliLine:`_cliLine_jg14y_396`,cliLineCmd:`_cliLineCmd_jg14y_404`,cliCopyBtn:`_cliCopyBtn_jg14y_411`,cliHintBlock:`_cliHintBlock_jg14y_427`,cliHintArgs:`_cliHintArgs_jg14y_445`,rise:`_rise_jg14y_453`};function fw({cmd:e,args:t,docPath:n=`guides/cli.md`}){let r=Ex(),[i,a]=(0,w.useState)(!1),o=(0,w.useRef)(null),s=t?`${e} ${t}`:e;return(0,w.useEffect)(()=>()=>{o.current&&clearTimeout(o.current)},[]),(0,G.jsxs)(`span`,{style:{display:`inline-flex`,alignItems:`center`,gap:8,flexWrap:`wrap`,justifyContent:`flex-end`},children:[(0,G.jsxs)(`button`,{type:`button`,className:X.cliHintBlock,title:i?`Copied!`:`Copy command to clipboard`,onClick:()=>{navigator.clipboard?.writeText(s),a(!0),o.current&&clearTimeout(o.current),o.current=setTimeout(()=>a(!1),1200)},children:[(0,G.jsx)(`span`,{style:{color:`var(--primary)`},children:`$`}),(0,G.jsx)(`span`,{children:e}),t&&(0,G.jsx)(`span`,{className:X.cliHintArgs,children:t}),i?(0,G.jsx)(uC,{size:12,style:{color:`var(--green)`,flexShrink:0}}):(0,G.jsx)(pC,{size:12,style:{color:`var(--text-faint)`,flexShrink:0}})]}),(0,G.jsx)(`button`,{type:`button`,className:X.whatis,onClick:()=>r(`/help/${n}`),children:`cli docs`})]})}var pw=`cerefox:rowsPerPage`,mw=[10,25,50,100],hw=10;function gw(){try{let e=Number(localStorage.getItem(pw));if(mw.includes(e))return e}catch{}return hw}function _w(){let[e,t]=(0,w.useState)(gw);return[e,e=>{t(e);try{localStorage.setItem(pw,String(e))}catch{}}]}var vw={wrap:`_wrap_17ha0_4`,toolbar:`_toolbar_17ha0_11`,search:`_search_17ha0_18`,count:`_count_17ha0_49`,tbl:`_tbl_17ha0_58`,actions:`_actions_17ha0_92`,foot:`_foot_17ha0_99`,pgBtn:`_pgBtn_17ha0_110`,emptyRow:`_emptyRow_17ha0_130`,faint:`_faint_17ha0_135`};function yw({page:e,pageCount:t,total:n,pageSize:r,onPage:i,onPageSize:a,loading:o=!1}){let s=n===0?0:(e-1)*r+1,c=Math.min(n,(e-1)*r+r),l=e<=1,u=e>=t;return(0,G.jsxs)(`div`,{className:vw.foot,children:[(0,G.jsxs)(`span`,{className:vw.faint,children:[n===0?`0`:`${s}–${c}`,` of `,n,o?` · loading…`:``]}),(0,G.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:8},children:[(0,G.jsx)(`span`,{className:vw.faint,style:{fontSize:11.5},children:`Rows`}),(0,G.jsx)(`span`,{className:X.selectWrap,style:{height:28},children:(0,G.jsx)(`select`,{className:X.selectEl,value:r,onChange:e=>a(Number(e.currentTarget.value)),"aria-label":`Rows per page`,children:mw.map(e=>(0,G.jsx)(`option`,{value:e,children:e},e))})}),(0,G.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:6},children:[(0,G.jsx)(`button`,{type:`button`,className:vw.pgBtn,disabled:l,onClick:()=>i(1),"aria-label":`First page`,children:(0,G.jsx)(_ee,{size:14})}),(0,G.jsx)(`button`,{type:`button`,className:vw.pgBtn,disabled:l,onClick:()=>i(e-1),"aria-label":`Previous page`,children:(0,G.jsx)(gee,{size:14})}),(0,G.jsxs)(`span`,{className:vw.faint,children:[`page `,e,` / `,t]}),(0,G.jsx)(`button`,{type:`button`,className:vw.pgBtn,disabled:u,onClick:()=>i(e+1),"aria-label":`Next page`,children:(0,G.jsx)(fC,{size:14})}),(0,G.jsx)(`button`,{type:`button`,className:vw.pgBtn,disabled:u,onClick:()=>i(t),"aria-label":`Last page`,children:(0,G.jsx)(vee,{size:14})})]})]})]})}function bw({eyebrow:e,title:t,subtitle:n,headerRight:r,toolbarExtra:i,searchValue:a,onSearchChange:o,searchPlaceholder:s=`Filter…`,searchText:c,columns:l,rows:u,rowKey:d,rowClick:f,actions:p,loading:m=!1,emptyText:h=`No matching rows.`}){let[g,_]=(0,w.useState)(0),[v,y]=_w(),b=(0,w.useMemo)(()=>{let e=a.trim().toLowerCase();return!e||!c?u:u.filter(t=>c(t).toLowerCase().includes(e))},[u,a,c]),x=b.length,S=Math.max(1,Math.ceil(x/v)),C=Math.min(g,S-1),T=b.slice(C*v,C*v+v),E=!!p,D=l.length+ +!!E;return(0,G.jsxs)(`div`,{className:vw.wrap,children:[(0,G.jsxs)(`div`,{className:X.pageHead,children:[(0,G.jsxs)(`div`,{children:[(0,G.jsx)(`p`,{className:X.eyebrow,children:e}),(0,G.jsx)(`h1`,{className:X.pageTitle,"data-testid":`page-title`,children:t}),n&&(0,G.jsx)(`p`,{className:X.pageSub,children:n})]}),r]}),(0,G.jsxs)(`div`,{className:vw.toolbar,children:[(0,G.jsxs)(`span`,{className:vw.search,children:[(0,G.jsx)(jC,{size:16}),(0,G.jsx)(`input`,{value:a,onChange:e=>{o(e.currentTarget.value),_(0)},placeholder:s})]}),i,(0,G.jsxs)(`span`,{className:vw.count,children:[x,` `,x===1?`row`:`rows`]})]}),(0,G.jsxs)(`div`,{className:`${X.card} ${X.rise}`,style:{overflow:`hidden`},children:[(0,G.jsxs)(`table`,{className:vw.tbl,children:[(0,G.jsx)(`thead`,{children:(0,G.jsxs)(`tr`,{children:[l.map(e=>(0,G.jsx)(`th`,{style:{width:e.width,textAlign:e.align??`left`},children:e.label},e.key)),E&&(0,G.jsx)(`th`,{style:{width:1}})]})}),(0,G.jsx)(`tbody`,{children:m?(0,G.jsx)(`tr`,{children:(0,G.jsx)(`td`,{colSpan:D,className:vw.emptyRow,children:`Loading…`})}):T.length===0?(0,G.jsx)(`tr`,{children:(0,G.jsx)(`td`,{colSpan:D,className:vw.emptyRow,children:h})}):T.map(e=>(0,G.jsxs)(`tr`,{style:f?{cursor:`pointer`}:void 0,onClick:f?()=>f(e):void 0,children:[l.map(t=>(0,G.jsx)(`td`,{style:{textAlign:t.align??`left`},children:t.render(e)},t.key)),E&&(0,G.jsx)(`td`,{onClick:e=>e.stopPropagation(),children:(0,G.jsx)(`div`,{className:vw.actions,children:p(e)})})]},d(e)))})]}),(0,G.jsx)(yw,{page:C+1,pageCount:S,total:x,pageSize:v,onPage:e=>_(e-1),onPageSize:e=>{y(e),_(0)}})]})]})}function xw(e){return e?new Date(e).toLocaleDateString():``}function Sw(e){if(!e)return``;let t=new Date(e);return t.toLocaleDateString()+` `+t.toLocaleTimeString([],{hour:`2-digit`,minute:`2-digit`})}var Cw=[`config-change`,`project-create`,`project-edit`,`project-delete`];[...Cw];var ww=[{value:`config-change`,label:`Config change`,tone:`yellow`},{value:`project-create`,label:`Project create`,tone:`green`},{value:`project-edit`,label:`Project edit`,tone:`violet`},{value:`project-delete`,label:`Project delete`,tone:`red`}],Tw=new Set(Cw),Ew=[{value:``,label:`All operations`},{value:`create`,label:`Create`},{value:`update-content`,label:`Update content`},{value:`update-metadata`,label:`Update metadata`},{value:`insert`,label:`Insert (partial edit)`},{value:`replace-section`,label:`Replace section`},{value:`delete-section`,label:`Delete section`},{value:`rename-section`,label:`Rename section`},{value:`delete`,label:`Delete`},{value:`restore`,label:`Restore`},{value:`status-change`,label:`Status change`},{value:`archive`,label:`Archive`},{value:`unarchive`,label:`Unarchive`},...ww.map(e=>({value:e.value,label:e.label}))],Dw={create:X.bGreen,"update-content":X.bBlue,"update-metadata":X.bViolet,insert:X.bBlue,"replace-section":X.bBlue,"delete-section":X.bRed,"rename-section":X.bViolet,"status-change":X.bYellow,archive:X.bPrimary,unarchive:X.bPrimary,restore:X.bGreen,delete:X.bRed,...Object.fromEntries(ww.map(e=>[e.value,{yellow:X.bYellow,green:X.bGreen,violet:X.bViolet,red:X.bRed}[e.tone]]))};function Ow(){let e=Ex(),[t]=JS(),[n,r]=(0,w.useState)(t.get(`operation`)||``),[i]=(0,w.useState)(t.get(`document_id`)||``),[a,o]=(0,w.useState)(``),[s,c]=(0,w.useState)(``),[l,u]=(0,w.useState)(`100`),[d,f]=(0,w.useState)(``),{data:p,isLoading:m}=Yy({queryKey:[`audit-log`,n,i,a,s,l],queryFn:()=>lw({operation:n||void 0,document_id:i||void 0,since:a?`${a}T00:00:00`:void 0,until:s?`${s}T23:59:59`:void 0,limit:Number(l)})});return(0,G.jsx)(bw,{eyebrow:`Every read & write`,title:`Audit Log`,subtitle:`A complete trail of changes — by human and agent alike.`,headerRight:(0,G.jsx)(fw,{cmd:`cerefox audit list`}),searchValue:d,onSearchChange:f,searchPlaceholder:`Filter by document or description…`,searchText:e=>`${e.doc_title??``} ${e.description??``} ${e.author??``}`,toolbarExtra:(0,G.jsxs)(G.Fragment,{children:[(0,G.jsx)(d_,{data:Ew,value:n,onChange:e=>r(e||``),placeholder:`All operations`,size:`sm`,w:170,clearable:!0}),(0,G.jsx)(M_,{type:`date`,"aria-label":`From`,value:a,onChange:e=>o(e.currentTarget.value),size:`sm`,w:150}),(0,G.jsx)(M_,{type:`date`,"aria-label":`To`,value:s,onChange:e=>c(e.currentTarget.value),size:`sm`,w:150}),(0,G.jsx)(d_,{data:[`100`,`250`,`500`,`1000`],value:l,onChange:e=>u(e||`100`),size:`sm`,w:100})]}),columns:[{key:`time`,label:`Time`,width:150,render:e=>(0,G.jsx)(`span`,{className:`${X.faint} ${X.mono}`,style:{fontSize:12,whiteSpace:`nowrap`},children:Sw(e.created_at)})},{key:`op`,label:`Operation`,width:150,render:e=>(0,G.jsx)(`span`,{className:`${X.badge} ${Dw[e.operation]??X.bNeutral}`,children:e.operation})},{key:`author`,label:`Author`,width:170,render:e=>(0,G.jsxs)(`span`,{className:`${X.srcChip} ${e.author_type===`agent`?X.srcChipAgent:``}`,children:[e.author_type===`agent`?(0,G.jsx)(MC,{size:12}):(0,G.jsx)(EC,{size:12}),e.author]})},{key:`doc`,label:`Document`,render:e=>e.document_id?(0,G.jsx)(`span`,{className:`${X.link}`,style:{fontSize:13},children:e.doc_title||`${e.document_id.slice(0,8)}…`}):(0,G.jsx)(`span`,{className:X.faint,style:{fontSize:12},children:Tw.has(e.operation)?`(store)`:`(deleted)`})},{key:`delta`,label:`Change`,width:110,align:`right`,render:e=>{if(e.size_before==null&&e.size_after==null)return(0,G.jsx)(`span`,{className:`${X.faint} ${X.mono}`,style:{fontSize:12},children:`—`});let t=(e.size_after??0)-(e.size_before??0),n=t>0?`var(--green)`:t<0?`var(--red)`:`var(--text-faint)`;return(0,G.jsxs)(`span`,{className:X.mono,style:{fontSize:12,color:n},children:[t>0?`+`:``,t.toLocaleString()]})}}],rows:p??[],rowKey:e=>e.id,rowClick:t=>t.document_id&&e(`/document/${t.document_id}`),loading:m,emptyText:`No audit log entries found.`})}async function kw(e={}){return WC(`/usage-log/summary${qC({...e})}`)}async function Aw(e={}){return WC(`/usage-log${qC({...e,limit:e.limit??100})}`)}function jw(e={}){return`/api/v1/usage-log/export.csv${qC({...e})}`}async function Mw(e){return(await WC(`/config/${e}`)).value}async function Nw(e,t){await WC(`/config/${e}`,{method:`PUT`,body:JSON.stringify({value:t})})}function Pw(e){let t=t=>e?.find(e=>e.access_path===t)?.count??0,n=t(`local-mcp`),r=t(`remote-mcp`),i=t(`edge-function`),a=t(`api`);return{localMcpOps:n,remoteMcpOps:r,efOps:i,apiOps:a,agentOps:n+r+i+a,cliOps:t(`cli`),webOps:t(`webapp`)}}function Fw({title:e,commands:t,docPath:n=`guides/cli.md`}){let r=Ex(),[i,a]=(0,w.useState)(null),o=(0,w.useRef)(null);(0,w.useEffect)(()=>()=>{o.current&&clearTimeout(o.current)},[]);let s=(e,t)=>{navigator.clipboard?.writeText(t.args?`${t.cmd} ${t.args}`:t.cmd),a(e),o.current&&clearTimeout(o.current),o.current=setTimeout(()=>a(null),1200)};return(0,G.jsxs)(`div`,{className:`${X.card} ${X.cliCard} ${X.rise}`,children:[(0,G.jsxs)(`div`,{className:X.row,style:{gap:8,marginBottom:10},children:[(0,G.jsx)(FC,{size:15}),(0,G.jsx)(`span`,{style:{fontWeight:600,fontSize:13.5},children:e}),(0,G.jsx)(`button`,{type:`button`,className:X.whatis,style:{marginLeft:`auto`},onClick:()=>r(`/help/${n}`),children:`cli docs`})]}),(0,G.jsx)(`div`,{className:X.cliBlock,children:t.map((e,t)=>(0,G.jsxs)(`div`,{className:X.cliLine,children:[(0,G.jsxs)(`span`,{className:X.cliLineCmd,children:[(0,G.jsx)(`span`,{className:X.cliP,children:`$`}),e.cmd,e.args&&(0,G.jsxs)(G.Fragment,{children:[` `,(0,G.jsx)(`span`,{className:X.cliS,children:e.args})]})]}),(0,G.jsx)(`button`,{type:`button`,className:X.cliCopyBtn,title:i===t?`Copied!`:`Copy command to clipboard`,onClick:()=>s(t,e),children:i===t?(0,G.jsx)(uC,{size:13,style:{color:`var(--green)`}}):(0,G.jsx)(pC,{size:13})})]},t))})]})}async function Iw(){return WC(`/dashboard`)}async function Lw(e){return WC(`/dashboard/recent-docs${e?`?project_id=${encodeURIComponent(e)}`:``}`)}var Rw={wrap:`_wrap_nzwkl_5`,dashHero:`_dashHero_nzwkl_12`,dashHeroActions:`_dashHeroActions_nzwkl_20`,quickSearch:`_quickSearch_nzwkl_24`,qsGo:`_qsGo_nzwkl_52`,statGrid:`_statGrid_nzwkl_66`,statTile:`_statTile_nzwkl_72`,statTop:`_statTop_nzwkl_78`,statIco:`_statIco_nzwkl_84`,statValue:`_statValue_nzwkl_91`,statLabel:`_statLabel_nzwkl_99`,statSub:`_statSub_nzwkl_106`,emptyVal:`_emptyVal_nzwkl_112`,dashSplit:`_dashSplit_nzwkl_121`,dashRail:`_dashRail_nzwkl_133`,tbl:`_tbl_nzwkl_140`,colDoc:`_colDoc_nzwkl_157`,colAuthor:`_colAuthor_nzwkl_158`,colChunks:`_colChunks_nzwkl_159`,colSize:`_colSize_nzwkl_160`,colUpdated:`_colUpdated_nzwkl_161`,authorCell:`_authorCell_nzwkl_163`,alignRight:`_alignRight_nzwkl_191`,docCell:`_docCell_nzwkl_193`,docDot:`_docDot_nzwkl_198`,docTitle:`_docTitle_nzwkl_204`,docBadges:`_docBadges_nzwkl_216`,projList:`_projList_nzwkl_231`,projScroll:`_projScroll_nzwkl_236`,projRow:`_projRow_nzwkl_245`,projDot:`_projDot_nzwkl_259`,projName:`_projName_nzwkl_265`,projCounts:`_projCounts_nzwkl_276`,trashCount:`_trashCount_nzwkl_285`,projBar:`_projBar_nzwkl_291`,projChev:`_projChev_nzwkl_304`,projFoot:`_projFoot_nzwkl_311`},zw=[`--primary`,`--violet`,`--blue`,`--green`,`--yellow`,`--red`];function Bw(e){return e>=1e6?`${(e/1e6).toFixed(2)}M`:e>=1e3?`${(e/1e3).toFixed(1)}k`:String(e)}function Vw(){let e=new Date().getHours();return e<12?`Good morning`:e<18?`Good afternoon`:`Good evening`}function Hw(e){let t=(e??`manual`).toLowerCase();switch(t){case`agent`:return{icon:MC,label:`agent`,agent:!0};case`cli`:return{icon:FC,label:`cli`,agent:!1};case`file`:return{icon:vC,label:`file`,agent:!1};case`paste`:return{icon:vC,label:`paste`,agent:!1};case`url`:return{icon:SC,label:`url`,agent:!1};default:return{icon:EC,label:t,agent:!1}}}var Uw=new Date(Date.now()-2592e6).toISOString();function Ww(){let e=Ex(),[t,n]=(0,w.useState)(``),[r,i]=(0,w.useState)(``),{data:a}=Yy({queryKey:[`dashboard`],queryFn:Iw}),{data:o}=Yy({queryKey:[`dashboard-recent`,r],queryFn:()=>Lw(r||void 0),placeholderData:oy}),s=Uw,{data:c}=Yy({queryKey:[`usage-summary-30d`,s],queryFn:()=>kw({start:s}),staleTime:6e4}),{localMcpOps:l,remoteMcpOps:u,efOps:d,apiOps:f,agentOps:p,cliOps:m,webOps:h}=Pw(c?.ops_by_access_path),g=new Map((a?.projects??[]).map(e=>[e.id,e.name])),_=new Map((a?.projects??[]).map((e,t)=>[e.id,zw[t%zw.length]])),v=a?.project_doc_counts??{},y=a?.project_deleted_doc_counts??{},b=Object.values(y).reduce((e,t)=>e+t,0),x=Math.max(1,...Object.values(v)),S=()=>{let n=t.trim();e(n?`/search?q=${encodeURIComponent(n)}&mode=docs`:`/search`)},C=e=>`var(${_.get(e.project_ids[0])??`--border`})`;return(0,G.jsxs)(`div`,{className:Rw.wrap,children:[(0,G.jsxs)(`div`,{className:`${Rw.dashHero} ${X.rise}`,children:[(0,G.jsxs)(`div`,{style:{minWidth:0},children:[(0,G.jsx)(`p`,{className:X.eyebrow,children:`Memory layer · online`}),(0,G.jsxs)(`h1`,{className:X.pageTitle,"data-testid":`page-title`,children:[Vw(),`, operator.`]})]}),(0,G.jsxs)(`div`,{className:Rw.dashHeroActions,children:[(0,G.jsxs)(`form`,{className:Rw.quickSearch,onSubmit:e=>{e.preventDefault(),S()},children:[(0,G.jsx)(jC,{size:16}),(0,G.jsx)(`input`,{value:t,onChange:e=>n(e.currentTarget.value),placeholder:`Quick search…`}),(0,G.jsx)(`button`,{type:`submit`,className:Rw.qsGo,"aria-label":`Search`,children:(0,G.jsx)(sC,{size:15})})]}),(0,G.jsxs)(`button`,{type:`button`,className:`${X.btn} ${X.btnPrimary}`,onClick:()=>e(`/ingest`),children:[(0,G.jsx)(kC,{size:16}),`Ingest content`]})]})]}),(0,G.jsxs)(`div`,{className:Rw.statGrid,children:[(0,G.jsxs)(`div`,{className:`${X.card} ${Rw.statTile} ${X.rise}`,children:[(0,G.jsxs)(`div`,{className:Rw.statTop,children:[(0,G.jsx)(`span`,{className:`${Rw.statIco} ${X.bPrimary}`,children:(0,G.jsx)(bee,{size:18})}),b>0&&(0,G.jsxs)(`span`,{className:`${X.badge} ${X.bNeutral}`,children:[b,` docs in trash`]})]}),(0,G.jsx)(`div`,{className:Rw.statValue,children:(a?.doc_count??0).toLocaleString()}),(0,G.jsx)(`div`,{className:Rw.statLabel,children:`Documents`})]}),(0,G.jsxs)(`div`,{className:`${X.card} ${Rw.statTile} ${X.rise}`,children:[(0,G.jsxs)(`div`,{className:Rw.statTop,children:[(0,G.jsx)(`span`,{className:`${Rw.statIco} ${X.bViolet}`,children:(0,G.jsx)(NC,{size:18})}),(0,G.jsxs)(`span`,{className:`${X.badge} ${X.bViolet}`,children:[Bw(a?.total_chars??0),` chars`]})]}),(0,G.jsx)(`div`,{className:Rw.statValue,children:(a?.total_chunks??0).toLocaleString()}),(0,G.jsx)(`div`,{className:Rw.statLabel,children:`Indexed chunks`})]}),(0,G.jsxs)(`div`,{className:`${X.card} ${Rw.statTile} ${X.rise}`,children:[(0,G.jsx)(`div`,{className:Rw.statTop,children:(0,G.jsx)(`span`,{className:`${Rw.statIco} ${X.bBlue}`,children:(0,G.jsx)(bC,{size:18})})}),(0,G.jsx)(`div`,{className:Rw.statValue,children:a?.project_count??0}),(0,G.jsx)(`div`,{className:Rw.statLabel,children:`Projects`})]}),(0,G.jsxs)(`div`,{className:`${X.card} ${Rw.statTile} ${X.rise}`,children:[(0,G.jsxs)(`div`,{className:Rw.statTop,children:[(0,G.jsx)(`span`,{className:`${Rw.statIco} ${X.bGreen}`,children:(0,G.jsx)(MC,{size:18})}),p>0?(0,G.jsxs)(`span`,{className:`${X.badge} ${X.bGreen}`,title:`MCP transports, last 30 days. Other paths are listed below the count.`,children:[l.toLocaleString(),` local · `,u.toLocaleString(),` remote`]}):(0,G.jsxs)(el,{width:260,position:`bottom-end`,withArrow:!0,shadow:`md`,children:[(0,G.jsx)(el.Target,{children:(0,G.jsx)(`button`,{type:`button`,className:X.whatis,children:`Why no data?`})}),(0,G.jsx)(el.Dropdown,{children:(0,G.jsxs)(Y,{size:`xs`,c:`dimmed`,children:[`No agent activity on the MCP or Edge Function paths in the last 30 days. That is not the same as "no agents" — CLI and web operations are counted separately below, and the Edge Function path is only used by ChatGPT Actions, so a zero there is normal unless you run a Custom GPT. Agent ops are recorded in the usage log, which is `,(0,G.jsx)(`b`,{children:`opt-in`}),` — enable it with`,` `,(0,G.jsx)(`code`,{children:`cerefox config set usage_tracking_enabled true`}),` if it's off.`]})})]})]}),(0,G.jsx)(`div`,{className:p>0?Rw.statValue:Rw.emptyVal,children:p>0?p.toLocaleString():`—`}),(0,G.jsx)(`div`,{className:Rw.statLabel,children:`Agent operations · 30d`}),(d>0||f>0||m>0||h>0)&&(0,G.jsxs)(`div`,{className:Rw.statSub,title:`edge = ChatGPT Actions and api = an /api/v1 client that identified itself (both counted in the total above). cli and web are NOT counted as agent operations: the usage summary cannot separate an agent's CLI use from a person's, and web is the bundled UI.`,children:[d.toLocaleString(),` edge · `,f.toLocaleString(),` api ·`,` `,m.toLocaleString(),` cli · `,h.toLocaleString(),` web`]})]})]}),(0,G.jsxs)(`div`,{className:Rw.dashSplit,children:[(0,G.jsxs)(`section`,{className:X.rise,children:[(0,G.jsxs)(`div`,{className:X.secHead,children:[(0,G.jsxs)(`h2`,{className:X.secTitle,children:[(0,G.jsx)(yee,{size:16}),`Recently changed documents`]}),(0,G.jsxs)(`span`,{className:X.selectWrap,title:`Scope recent documents to a project`,children:[(0,G.jsx)(bC,{size:14}),(0,G.jsxs)(`select`,{className:X.selectEl,value:r,"data-testid":`recent-project-select`,onChange:e=>i(e.currentTarget.value),children:[(0,G.jsx)(`option`,{value:``,children:`All projects`}),(a?.projects??[]).map(e=>(0,G.jsx)(`option`,{value:e.id,children:e.name},e.id))]}),(0,G.jsx)(dC,{size:14})]})]}),(0,G.jsx)(`div`,{className:X.card,style:{overflow:`hidden`},children:(0,G.jsxs)(`table`,{className:Rw.tbl,children:[(0,G.jsx)(`thead`,{children:(0,G.jsxs)(`tr`,{children:[(0,G.jsx)(`th`,{className:Rw.colDoc,children:`Document`}),(0,G.jsx)(`th`,{className:`${Rw.colAuthor} ${Rw.authorCell}`,children:`Author`}),(0,G.jsx)(`th`,{className:`${Rw.colChunks} ${Rw.alignRight}`,children:`Chunks`}),(0,G.jsx)(`th`,{className:`${Rw.colSize} ${Rw.alignRight}`,children:`Size`}),(0,G.jsx)(`th`,{className:`${Rw.colUpdated} ${Rw.alignRight}`,children:`Updated`})]})}),(0,G.jsx)(`tbody`,{children:(r?o?.recent_docs??[]:o?.recent_docs??a?.recent_docs??[]).map(t=>{let n=t.author?{icon:t.author_type===`agent`?MC:EC,label:t.author,agent:t.author_type===`agent`}:Hw(t.source),r=n.icon,i=t.review_status!==`approved`;return(0,G.jsxs)(`tr`,{"data-testid":`recent-doc-row`,onClick:()=>e(`/document/${t.id}`),children:[(0,G.jsx)(`td`,{children:(0,G.jsxs)(`div`,{className:Rw.docCell,children:[(0,G.jsx)(`span`,{className:Rw.docDot,style:{background:C(t)}}),(0,G.jsxs)(`div`,{className:X.col,style:{gap:3,minWidth:0},children:[(0,G.jsx)(HS,{to:`/document/${t.id}`,className:`${X.link} ${Rw.docTitle}`,onClick:e=>e.stopPropagation(),children:t.title||`Untitled`}),(0,G.jsxs)(`div`,{className:Rw.docBadges,children:[t.project_ids.filter(e=>g.has(e)).slice(0,1).map(e=>(0,G.jsx)(`span`,{className:`${X.badge} ${X.bNeutral}`,children:g.get(e)},e)),i&&(0,G.jsxs)(`span`,{className:`${X.badge} ${X.bYellow}`,children:[(0,G.jsx)(`span`,{style:{width:6,height:6,borderRadius:`50%`,background:`currentColor`}}),`pending review`]})]})]})]})}),(0,G.jsx)(`td`,{className:Rw.authorCell,title:n.label,children:(0,G.jsxs)(`span`,{className:`${X.srcChip} ${n.agent?X.srcChipAgent:``}`,children:[(0,G.jsx)(r,{size:12}),n.label]})}),(0,G.jsx)(`td`,{className:`${Rw.alignRight} ${X.mono} ${X.dim}`,children:t.chunk_count}),(0,G.jsx)(`td`,{className:`${Rw.alignRight} ${X.mono} ${X.dim}`,children:t.total_chars.toLocaleString()}),(0,G.jsx)(`td`,{className:`${Rw.alignRight} ${X.faint}`,children:Sw(t.updated_at)})]},t.id)})})]})})]}),(0,G.jsxs)(`aside`,{className:Rw.dashRail,children:[(0,G.jsxs)(`section`,{className:X.rise,style:{minHeight:0},children:[(0,G.jsxs)(`div`,{className:X.secHead,children:[(0,G.jsxs)(`h2`,{className:X.secTitle,children:[(0,G.jsx)(NC,{size:16}),`Projects `,(0,G.jsx)(`span`,{className:X.countPill,children:a?.project_count??0})]}),(0,G.jsx)(`button`,{type:`button`,className:`${X.btn} ${X.btnSubtle}`,onClick:()=>e(`/projects`),children:`Manage`})]}),(0,G.jsxs)(`div`,{className:`${X.card} ${Rw.projList}`,children:[(0,G.jsx)(`div`,{className:Rw.projScroll,children:(a?.projects??[]).map(t=>{let n=v[t.id]??0,r=y[t.id]??0,i=`var(${_.get(t.id)??`--border`})`;return(0,G.jsxs)(`button`,{type:`button`,className:Rw.projRow,onClick:()=>e(`/projects/${t.id}/documents`),children:[(0,G.jsx)(`span`,{className:Rw.projDot,style:{background:i}}),(0,G.jsxs)(`div`,{className:X.col,style:{gap:5,minWidth:0,flex:1},children:[(0,G.jsxs)(`div`,{className:X.row,style:{justifyContent:`space-between`,gap:8},children:[(0,G.jsx)(HS,{to:`/projects/${t.id}/documents`,className:Rw.projName,onClick:e=>e.stopPropagation(),children:t.name}),(0,G.jsxs)(`span`,{className:Rw.projCounts,children:[(0,G.jsx)(`span`,{children:n}),r>0&&(0,G.jsxs)(`span`,{className:Rw.trashCount,title:`${r} in trash`,children:[(0,G.jsx)(IC,{size:11}),r]})]})]}),(0,G.jsx)(`div`,{className:Rw.projBar,children:(0,G.jsx)(`span`,{style:{width:`${n/x*100}%`,background:i}})})]}),(0,G.jsx)(`span`,{className:Rw.projChev,children:(0,G.jsx)(fC,{size:15})})]},t.id)})}),(0,G.jsxs)(`div`,{className:Rw.projFoot,children:[(0,G.jsxs)(`span`,{children:[a?.project_count??0,` projects`]}),(0,G.jsxs)(`span`,{className:X.faint,children:[b,` docs in trash`]})]})]})]}),(0,G.jsx)(Fw,{title:`Same memory, your terminal`,commands:[{cmd:`cerefox search`,args:`"retry backoff" --mode hybrid`},{cmd:`cerefox document ingest`,args:`./rfc-018.md --project-name infra`}]})]})]})]})}async function Gw(e,t){return WC(`/documents/${e}${qC({version_id:t})}`)}async function Kw(e){return WC(`/documents/${e}/chunks`)}async function qw(e,t){return WC(`/documents/${e}/edit`,{method:`POST`,body:JSON.stringify(t)})}async function Jw(e){return WC(`/documents/${e}`,{method:`DELETE`})}async function Yw(e){return WC(`/ingest`,{method:`POST`,body:JSON.stringify({mode:`paste`,...e})})}async function Xw(e){return WC(`/check-filename${qC({filename:e})}`)}async function Zw(e,t){return WC(`/documents/${e}?version_id=${t}`)}function Qw(e,t){let n=`/api/v1/documents/${e}/download`;return t?`${n}?version_id=${t}`:n}function $w(e,t){let n=t||{};return(e[e.length-1]===``?[...e,``]:e).join((n.padRight?` `:``)+`,`+(n.padLeft===!1?``:` `)).trim()}var eT=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,tT=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,nT={};function rT(e,t){return((t||nT).jsx?tT:eT).test(e)}var iT=/[ \t\n\f\r]/g;function aT(e){return typeof e==`object`?e.type===`text`&&oT(e.value):oT(e)}function oT(e){return e.replace(iT,``)===``}var sT=class{constructor(e,t,n){this.normal=t,this.property=e,n&&(this.space=n)}};sT.prototype.normal={},sT.prototype.property={},sT.prototype.space=void 0;function cT(e,t){let n={},r={};for(let t of e)Object.assign(n,t.property),Object.assign(r,t.normal);return new sT(n,r,t)}function lT(e){return e.toLowerCase()}var uT=class{constructor(e,t){this.attribute=t,this.property=e}};uT.prototype.attribute=``,uT.prototype.booleanish=!1,uT.prototype.boolean=!1,uT.prototype.commaOrSpaceSeparated=!1,uT.prototype.commaSeparated=!1,uT.prototype.defined=!1,uT.prototype.mustUseProperty=!1,uT.prototype.number=!1,uT.prototype.overloadedBoolean=!1,uT.prototype.property=``,uT.prototype.spaceSeparated=!1,uT.prototype.space=void 0;var dT=s({boolean:()=>pT,booleanish:()=>mT,commaOrSpaceSeparated:()=>vT,commaSeparated:()=>_T,number:()=>Z,overloadedBoolean:()=>hT,spaceSeparated:()=>gT}),fT=0,pT=yT(),mT=yT(),hT=yT(),Z=yT(),gT=yT(),_T=yT(),vT=yT();function yT(){return 2**++fT}var bT=Object.keys(dT),xT=class extends uT{constructor(e,t,n,r){let i=-1;if(super(e,t),ST(this,`space`,r),typeof n==`number`)for(;++i<bT.length;){let e=bT[i];ST(this,bT[i],(n&dT[e])===dT[e])}}};xT.prototype.defined=!0;function ST(e,t,n){n&&(e[t]=n)}function CT(e){let t={},n={};for(let[r,i]of Object.entries(e.properties)){let a=new xT(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(a.mustUseProperty=!0),t[r]=a,n[lT(r)]=r,n[lT(a.attribute)]=r}return new sT(t,n,e.space)}var wT=CT({properties:{ariaActiveDescendant:null,ariaAtomic:mT,ariaAutoComplete:null,ariaBusy:mT,ariaChecked:mT,ariaColCount:Z,ariaColIndex:Z,ariaColSpan:Z,ariaControls:gT,ariaCurrent:null,ariaDescribedBy:gT,ariaDetails:null,ariaDisabled:mT,ariaDropEffect:gT,ariaErrorMessage:null,ariaExpanded:mT,ariaFlowTo:gT,ariaGrabbed:mT,ariaHasPopup:null,ariaHidden:mT,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:gT,ariaLevel:Z,ariaLive:null,ariaModal:mT,ariaMultiLine:mT,ariaMultiSelectable:mT,ariaOrientation:null,ariaOwns:gT,ariaPlaceholder:null,ariaPosInSet:Z,ariaPressed:mT,ariaReadOnly:mT,ariaRelevant:null,ariaRequired:mT,ariaRoleDescription:gT,ariaRowCount:Z,ariaRowIndex:Z,ariaRowSpan:Z,ariaSelected:mT,ariaSetSize:Z,ariaSort:null,ariaValueMax:Z,ariaValueMin:Z,ariaValueNow:Z,ariaValueText:null,role:null},transform(e,t){return t===`role`?t:`aria-`+t.slice(4).toLowerCase()}});function TT(e,t){return t in e?e[t]:t}function ET(e,t){return TT(e,t.toLowerCase())}var DT=CT({attributes:{acceptcharset:`accept-charset`,classname:`class`,htmlfor:`for`,httpequiv:`http-equiv`},mustUseProperty:[`checked`,`multiple`,`muted`,`selected`],properties:{abbr:null,accept:_T,acceptCharset:gT,accessKey:gT,action:null,allow:null,allowFullScreen:pT,allowPaymentRequest:pT,allowUserMedia:pT,alpha:pT,alt:null,as:null,async:pT,autoCapitalize:null,autoComplete:gT,autoFocus:pT,autoPlay:pT,blocking:gT,capture:null,charSet:null,checked:pT,cite:null,className:gT,closedBy:null,colorSpace:null,cols:Z,colSpan:Z,command:null,commandFor:null,content:null,contentEditable:mT,controls:pT,controlsList:gT,coords:Z|_T,crossOrigin:null,data:null,dateTime:null,decoding:null,default:pT,defer:pT,dir:null,dirName:null,disabled:pT,download:hT,draggable:mT,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:pT,formTarget:null,headers:gT,height:Z,hidden:hT,high:Z,href:null,hrefLang:null,htmlFor:gT,httpEquiv:gT,id:null,imageSizes:null,imageSrcSet:null,inert:pT,inputMode:null,integrity:null,is:null,isMap:pT,itemId:null,itemProp:gT,itemRef:gT,itemScope:pT,itemType:gT,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:pT,low:Z,manifest:null,max:null,maxLength:Z,media:null,method:null,min:null,minLength:Z,multiple:pT,muted:pT,name:null,nonce:null,noModule:pT,noValidate:pT,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:pT,optimum:Z,pattern:null,ping:gT,placeholder:null,playsInline:pT,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:pT,referrerPolicy:null,rel:gT,required:pT,reversed:pT,rows:Z,rowSpan:Z,sandbox:gT,scope:null,scoped:pT,seamless:pT,selected:pT,shadowRootClonable:pT,shadowRootCustomElementRegistry:pT,shadowRootDelegatesFocus:pT,shadowRootMode:null,shadowRootSerializable:pT,shape:null,size:Z,sizes:null,slot:null,span:Z,spellCheck:mT,src:null,srcDoc:null,srcLang:null,srcSet:null,start:Z,step:null,style:null,tabIndex:Z,target:null,title:null,translate:null,type:null,typeMustMatch:pT,useMap:null,value:mT,width:Z,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:gT,axis:null,background:null,bgColor:null,border:Z,borderColor:null,bottomMargin:Z,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:pT,declare:pT,event:null,face:null,frame:null,frameBorder:null,hSpace:Z,leftMargin:Z,link:null,longDesc:null,lowSrc:null,marginHeight:Z,marginWidth:Z,noResize:pT,noHref:pT,noShade:pT,noWrap:pT,object:null,profile:null,prompt:null,rev:null,rightMargin:Z,rules:null,scheme:null,scrolling:mT,standby:null,summary:null,text:null,topMargin:Z,valueType:null,version:null,vAlign:null,vLink:null,vSpace:Z,allowTransparency:null,autoCorrect:null,autoSave:null,credentialless:pT,disablePictureInPicture:pT,disableRemotePlayback:pT,exportParts:_T,part:gT,prefix:null,property:null,results:Z,security:null,unselectable:null},space:`html`,transform:ET}),OT=CT({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:vT,accentHeight:Z,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:Z,amplitude:Z,arabicForm:null,ascent:Z,attributeName:null,attributeType:null,azimuth:Z,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:Z,by:null,calcMode:null,capHeight:Z,className:gT,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:Z,diffuseConstant:Z,direction:null,display:null,dur:null,divisor:Z,dominantBaseline:null,download:pT,dx:null,dy:null,edgeMode:null,editable:null,elevation:Z,enableBackground:null,end:null,event:null,exponent:Z,externalResourcesRequired:null,fill:null,fillOpacity:Z,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:_T,g2:_T,glyphName:_T,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:Z,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:Z,horizOriginX:Z,horizOriginY:Z,id:null,ideographic:Z,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:Z,k:Z,k1:Z,k2:Z,k3:Z,k4:Z,kernelMatrix:vT,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:Z,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskType:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:Z,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:Z,overlineThickness:Z,paintOrder:null,panose1:null,path:null,pathLength:Z,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:gT,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:Z,pointsAtY:Z,pointsAtZ:Z,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:vT,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:vT,rev:vT,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:vT,requiredFeatures:vT,requiredFonts:vT,requiredFormats:vT,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:Z,specularExponent:Z,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:Z,strikethroughThickness:Z,string:null,stroke:null,strokeDashArray:vT,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:Z,strokeOpacity:Z,strokeWidth:null,style:null,surfaceScale:Z,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:vT,tabIndex:Z,tableValues:null,target:null,targetX:Z,targetY:Z,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:vT,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:Z,underlineThickness:Z,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:Z,values:null,vAlphabetic:Z,vMathematical:Z,vectorEffect:null,vHanging:Z,vIdeographic:Z,version:null,vertAdvY:Z,vertOriginX:Z,vertOriginY:Z,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:Z,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:`svg`,transform:TT}),kT=CT({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()}}),AT=CT({attributes:{xmlnsxlink:`xmlns:xlink`},properties:{xmlnsXLink:null,xmlns:null},space:`xmlns`,transform:ET}),jT=CT({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:`xml`,transform(e,t){return`xml:`+t.slice(3).toLowerCase()}}),MT={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`},NT=/[A-Z]/g,PT=/-[a-z]/g,FT=/^data[-\w.:]+$/i;function IT(e,t){let n=lT(t),r=t,i=uT;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)===`data`&&FT.test(t)){if(t.charAt(4)===`-`){let e=t.slice(5).replace(PT,RT);r=`data`+e.charAt(0).toUpperCase()+e.slice(1)}else{let e=t.slice(4);if(!PT.test(e)){let n=e.replace(NT,LT);n.charAt(0)!==`-`&&(n=`-`+n),t=`data`+n}}i=xT}return new i(r,t)}function LT(e){return`-`+e.toLowerCase()}function RT(e){return e.charAt(1).toUpperCase()}var zT=cT([wT,DT,kT,AT,jT],`html`),BT=cT([wT,OT,kT,AT,jT],`svg`);function VT(e){return e.join(` `).trim()}var HT=o(((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;function u(e,t){if(typeof e!=`string`)throw TypeError(`First argument must be a string`);if(!e)return[];t||={};var l=1,u=1;function f(e){var t=e.match(r);t&&(l+=t.length);var n=e.lastIndexOf(`
60
+ `);u=~n?e.length-n:u+e.length}function p(){var e={line:l,column:u};return function(t){return t.position=new m(e),_(),t}}function m(e){this.start=e,this.end={line:l,column:u},this.source=t.source}m.prototype.content=e;function h(n){var r=Error(t.source+`:`+l+`:`+u+`: `+n);if(r.reason=n,r.filename=t.source,r.line=l,r.column=u,r.source=e,!t.silent)throw r}function g(t){var n=t.exec(e);if(n){var r=n[0];return f(r),e=e.slice(r.length),n}}function _(){g(i)}function v(e){var t;for(e||=[];t=y();)t!==!1&&e.push(t);return e}function y(){var t=p();if(e.charAt(0)==`/`&&e.charAt(1)==`*`){for(var n=2;e.charAt(n)!=``&&(e.charAt(n)!=`*`||e.charAt(n+1)!=`/`);)++n;if(n+=2,e.charAt(n-1)===``)return h(`End of comment missing`);var r=e.slice(2,n-2);return u+=2,f(r),e=e.slice(n),u+=2,t({type:`comment`,comment:r})}}function b(){var e=p(),t=g(a);if(t){if(y(),!g(o))return h(`property missing ':'`);var r=g(s),i=e({type:`declaration`,property:d(t[0].replace(n,``)),value:r?d(r[0].replace(n,``)):``});return g(c),i}}function x(){var e=[];v(e);for(var t;t=b();)t!==!1&&(e.push(t),v(e));return e}return _(),x()}function d(e){return e?e.replace(l,``):``}t.exports=u})),UT=o((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(HT());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}})),WT=o((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))}})),GT=o(((e,t)=>{var n=(e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}})(UT()),r=WT();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})),KT=JT(`end`),qT=JT(`start`);function JT(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 YT(e){let t=qT(e),n=KT(e);if(t&&n)return{start:t,end:n}}function XT(e){return!e||typeof e!=`object`?``:`position`in e||`type`in e?QT(e.position):`start`in e||`end`in e?QT(e):`line`in e||`column`in e?ZT(e):``}function ZT(e){return $T(e&&e.line)+`:`+$T(e&&e.column)}function QT(e){return ZT(e&&e.start)+`-`+ZT(e&&e.end)}function $T(e){return e&&typeof e==`number`?e:1}var eE=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=XT(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}};eE.prototype.file=``,eE.prototype.name=``,eE.prototype.reason=``,eE.prototype.message=``,eE.prototype.stack=``,eE.prototype.column=void 0,eE.prototype.line=void 0,eE.prototype.ancestors=void 0,eE.prototype.cause=void 0,eE.prototype.fatal=void 0,eE.prototype.place=void 0,eE.prototype.ruleId=void 0,eE.prototype.source=void 0;var tE=l(GT(),1),nE={}.hasOwnProperty,rE=new Map,iE=/[A-Z]/g,aE=new Set([`table`,`tbody`,`thead`,`tfoot`,`tr`]),oE=new Set([`td`,`th`]);function sE(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=vE(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=_E(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`?BT:zT,stylePropertyNameCase:t.stylePropertyNameCase||`dom`,tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},a=cE(i,e,void 0);return a&&typeof a!=`string`?a:i.create(e,i.Fragment,{children:a||void 0},void 0)}function cE(e,t,n){if(t.type===`element`)return lE(e,t,n);if(t.type===`mdxFlowExpression`||t.type===`mdxTextExpression`)return uE(e,t);if(t.type===`mdxJsxFlowElement`||t.type===`mdxJsxTextElement`)return fE(e,t,n);if(t.type===`mdxjsEsm`)return dE(e,t);if(t.type===`root`)return pE(e,t,n);if(t.type===`text`)return mE(e,t)}function lE(e,t,n){let r=e.schema,i=r;t.tagName.toLowerCase()===`svg`&&r.space===`html`&&(i=BT,e.schema=i),e.ancestors.push(t);let a=wE(e,t.tagName,!1),o=yE(e,t),s=xE(e,t);return aE.has(t.tagName)&&(s=s.filter(function(e){return typeof e!=`string`||!aT(e)})),hE(e,o,a,t),gE(o,s),e.ancestors.pop(),e.schema=r,e.create(t,a,o,n)}function uE(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)}TE(e,t.position)}function dE(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);TE(e,t.position)}function fE(e,t,n){let r=e.schema,i=r;t.name===`svg`&&r.space===`html`&&(i=BT,e.schema=i),e.ancestors.push(t);let a=t.name===null?e.Fragment:wE(e,t.name,!0),o=bE(e,t),s=xE(e,t);return hE(e,o,a,t),gE(o,s),e.ancestors.pop(),e.schema=r,e.create(t,a,o,n)}function pE(e,t,n){let r={};return gE(r,xE(e,t)),e.create(t,e.Fragment,r,n)}function mE(e,t){return t.value}function hE(e,t,n,r){typeof n!=`string`&&n!==e.Fragment&&e.passNode&&(t.node=r)}function gE(e,t){if(t.length>0){let n=t.length>1?t:t[0];n&&(e.children=n)}}function _E(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 vE(e,t){return n;function n(n,r,i,a){let o=Array.isArray(i.children),s=qT(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 yE(e,t){let n={},r,i;for(i in t.properties)if(i!==`children`&&nE.call(t.properties,i)){let a=SE(e,i,t.properties[i]);if(a){let[i,o]=a;e.tableCellAlignToStyle&&i===`align`&&typeof o==`string`&&oE.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 bE(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 TE(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 TE(e,t.position);else a=r.value===null||r.value;n[i]=a}return n}function xE(e,t){let n=[],r=-1,i=e.passKeys?new Map:rE;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=cE(e,a,o);s!==void 0&&n.push(s)}return n}function SE(e,t,n){let r=IT(e.schema,t);if(!(n==null||typeof n==`number`&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?$w(n):VT(n)),r.property===`style`){let t=typeof n==`object`?n:CE(e,String(n));return e.stylePropertyNameCase===`css`&&(t=EE(t)),[`style`,t]}return[e.elementAttributeNameCase===`react`&&r.space?MT[r.property]||r.property:r.attribute,n]}}function CE(e,t){try{return(0,tE.default)(t,{reactCompat:!0})}catch(t){if(e.ignoreInvalidStyle)return{};let n=t,r=new eE("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=`https://github.com/syntax-tree/hast-util-to-jsx-runtime#cannot-parse-style-attribute`,r}}function wE(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=rT(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=rT(t)&&!/^[a-z]/.test(t)?{type:`Identifier`,name:t}:{type:`Literal`,value:t};if(r.type===`Literal`){let t=r.value;return nE.call(e.components,t)?e.components[t]:t}if(e.evaluater)return e.evaluater.evaluateExpression(r);TE(e)}function TE(e,t){let n=new eE("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=`https://github.com/syntax-tree/hast-util-to-jsx-runtime#cannot-handle-mdx-estrees-without-createevaluater`,n}function EE(e){let t={},n;for(n in e)nE.call(e,n)&&(t[DE(n)]=e[n]);return t}function DE(e){let t=e.replace(iE,OE);return t.slice(0,3)===`ms-`&&(t=`-`+t),t}function OE(e){return`-`+e.toLowerCase()}var kE={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`]},AE={};function jE(e,t){let n=t||AE;return ME(e,typeof n.includeImageAlt!=`boolean`||n.includeImageAlt,typeof n.includeHtml!=`boolean`||n.includeHtml)}function ME(e,t,n){if(PE(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 NE(e.children,t,n)}return Array.isArray(e)?NE(e,t,n):``}function NE(e,t,n){let r=[],i=-1;for(;++i<e.length;)r[i]=ME(e[i],t,n);return r.join(``)}function PE(e){return!!(e&&typeof e==`object`)}var FE=document.createElement(`i`);function IE(e){let t=`&`+e+`;`;FE.innerHTML=t;let n=FE.textContent;return n.charCodeAt(n.length-1)===59&&e!==`semi`?!1:n!==t&&n}function LE(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 RE(e,t){return e.length>0?(LE(e,e.length,0,t),e):t}var zE={}.hasOwnProperty;function BE(e){let t={},n=-1;for(;++n<e.length;)VE(t,e[n]);return t}function VE(e,t){let n;for(n in t){let r=(zE.call(e,n)?e[n]:void 0)||(e[n]={}),i=t[n],a;if(i)for(a in i){zE.call(r,a)||(r[a]=[]);let e=i[a];HE(r[a],Array.isArray(e)?e:e?[e]:[])}}}function HE(e,t){let n=-1,r=[];for(;++n<t.length;)(t[n].add===`after`?e:r).push(t[n]);LE(e,0,0,r)}function UE(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 WE(e){return e.replace(/[\t\n\r ]+/g,` `).replace(/^ | $/g,``).toLowerCase().toUpperCase()}var GE=tD(/[A-Za-z]/),KE=tD(/[\dA-Za-z]/),qE=tD(/[#-'*+\--9=?A-Z^-~]/);function JE(e){return e!==null&&(e<32||e===127)}var YE=tD(/\d/),xee=tD(/[\dA-Fa-f]/),See=tD(/[!-/:-@[-`{-~]/);function XE(e){return e!==null&&e<-2}function ZE(e){return e!==null&&(e<0||e===32)}function QE(e){return e===-2||e===-1||e===32}var $E=tD(/\p{P}|\p{S}/u),eD=tD(/\s/);function tD(e){return t;function t(t){return t!==null&&t>-1&&e.test(String.fromCharCode(t))}}function nD(e){let t=[],n=-1,r=0,i=0;for(;++n<e.length;){let a=e.charCodeAt(n),o=``;if(a===37&&KE(e.charCodeAt(n+1))&&KE(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 rD(e,t,n,r){let i=r?r-1:1/0,a=0;return o;function o(r){return QE(r)?(e.enter(n),s(r)):t(r)}function s(r){return QE(r)&&a++<i?(e.consume(r),s):(e.exit(n),t(r))}}var iD={tokenize:aD};function aD(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`),rD(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 XE(t)?(e.consume(t),e.exit(`chunkText`),a):(e.consume(t),o)}}var oD={tokenize:cD},sD={tokenize:lD};function cD(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 LE(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(sD,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(sD,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 XE(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++;LE(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 lD(e,t,n){return rD(e,e.attempt(this.parser.constructs.document,t,n),`linePrefix`,this.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)}function uD(e){if(e===null||ZE(e)||eD(e))return 1;if($E(e))return 2}function dD(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 fD={name:`attention`,resolveAll:pD,tokenize:mD};function pD(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};hD(d,-c),hD(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=RE(l,[[`enter`,e[r][1],t],[`exit`,e[r][1],t]])),l=RE(l,[[`enter`,i,t],[`enter`,o,t],[`exit`,o,t],[`enter`,a,t]]),l=RE(l,dD(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),l=RE(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=RE(l,[[`enter`,e[n][1],t],[`exit`,e[n][1],t]])):u=0,LE(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 mD(e,t){let n=this.parser.constructs.attentionMarkers.null,r=this.previous,i=uD(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=uD(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 hD(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}var gD={name:`autolink`,tokenize:_D};function _D(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 GE(t)?(e.consume(t),o):t===64?n(t):l(t)}function o(e){return e===43||e===45||e===46||KE(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||KE(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||JE(r)?n(r):(e.consume(r),c)}function l(t){return t===64?(e.consume(t),u):qE(t)?(e.consume(t),l):n(t)}function u(e){return KE(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||KE(t))&&r++<63){let n=t===45?f:d;return e.consume(t),n}return n(t)}}var vD={partial:!0,tokenize:yD};function yD(e,t,n){return r;function r(t){return QE(t)?rD(e,i,`linePrefix`)(t):i(t)}function i(e){return e===null||XE(e)?t(e):n(e)}}var bD={continuation:{tokenize:SD},exit:CD,name:`blockQuote`,tokenize:xD};function xD(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 QE(n)?(e.enter(`blockQuotePrefixWhitespace`),e.consume(n),e.exit(`blockQuotePrefixWhitespace`),e.exit(`blockQuotePrefix`),t):(e.exit(`blockQuotePrefix`),t(n))}}function SD(e,t,n){let r=this;return i;function i(t){return QE(t)?rD(e,a,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):a(t)}function a(r){return e.attempt(bD,t,n)(r)}}function CD(e){e.exit(`blockQuote`)}var wD={name:`characterEscape`,tokenize:TD};function TD(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 See(r)?(e.enter(`characterEscapeValue`),e.consume(r),e.exit(`characterEscapeValue`),e.exit(`characterEscape`),t):n(r)}}var ED={name:`characterReference`,tokenize:DD};function DD(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=KE,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=xee,u):(e.enter(`characterReferenceValue`),a=7,o=YE,u(t))}function u(s){if(s===59&&i){let i=e.exit(`characterReferenceValue`);return o===KE&&!IE(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 OD={partial:!0,tokenize:jD},kD={concrete:!0,name:`codeFenced`,tokenize:AD};function AD(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`),QE(t)?rD(e,d,`whitespace`)(t):d(t))}function d(n){return n===null||XE(n)?(e.exit(`codeFencedFence`),r.interrupt?t(n):e.check(OD,h,b)(n)):(e.enter(`codeFencedFenceInfo`),e.enter(`chunkString`,{contentType:`string`}),f(n))}function f(t){return t===null||XE(t)?(e.exit(`chunkString`),e.exit(`codeFencedFenceInfo`),d(t)):QE(t)?(e.exit(`chunkString`),e.exit(`codeFencedFenceInfo`),rD(e,p,`whitespace`)(t)):t===96&&t===s?n(t):(e.consume(t),f)}function p(t){return t===null||XE(t)?d(t):(e.enter(`codeFencedFenceMeta`),e.enter(`chunkString`,{contentType:`string`}),m(t))}function m(t){return t===null||XE(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&&QE(t)?rD(e,v,`linePrefix`,a+1)(t):v(t)}function v(t){return t===null||XE(t)?e.check(OD,h,b)(t):(e.enter(`codeFlowValue`),y(t))}function y(t){return t===null||XE(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`),QE(t)?rD(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`),QE(t)?rD(e,d,`whitespace`)(t):d(t)):n(t)}function d(r){return r===null||XE(r)?(e.exit(`codeFencedFence`),t(r)):n(r)}}}function jD(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 MD={name:`codeIndented`,tokenize:PD},ND={partial:!0,tokenize:FD};function PD(e,t,n){let r=this;return i;function i(t){return e.enter(`codeIndented`),rD(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):XE(t)?e.attempt(ND,o,c)(t):(e.enter(`codeFlowValue`),s(t))}function s(t){return t===null||XE(t)?(e.exit(`codeFlowValue`),o(t)):(e.consume(t),s)}function c(n){return e.exit(`codeIndented`),t(n)}}function FD(e,t,n){let r=this;return i;function i(t){return r.parser.lazy[r.now().line]?n(t):XE(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),i):rD(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):XE(e)?i(e):n(e)}}var ID={name:`codeText`,previous:RD,resolve:LD,tokenize:zD};function LD(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 RD(e){return e!==96||this.events[this.events.length-1][1].type===`characterEscape`}function zD(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)):XE(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||XE(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 BD=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&&VD(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),VD(this.left,e)}unshift(e){this.setCursor(0),this.right.push(e)}unshiftMany(e){this.setCursor(0),VD(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);VD(this.right,t.reverse())}else{let t=this.right.splice(this.left.length+this.right.length-e,1/0);VD(this.left,t.reverse())}}};function VD(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 HD(e){let t={},n=-1,r,i,a,o,s,c,l,u=new BD(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,UD(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 LE(e,0,1/0,u.slice(0)),!l}function UD(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 WD={resolve:KD,tokenize:qD},GD={partial:!0,tokenize:JD};function KD(e){return HD(e),e}function qD(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):XE(t)?e.check(GD,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 JD(e,t,n){let r=this;return i;function i(t){return e.exit(`chunkContent`),e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),rD(e,a,`linePrefix`)}function a(i){if(i===null||XE(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 YD(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||JE(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||XE(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||ZE(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||JE(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 XD(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):XE(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||XE(t)||s++>999?(e.exit(`chunkString`),u(t)):(e.consume(t),c||=!QE(t),t===92?f:d)}function f(t){return t===91||t===92||t===93?(e.consume(t),s++,d):d(t)}}function ZD(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):XE(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),rD(e,l,`linePrefix`)):(e.enter(`chunkString`,{contentType:`string`}),u(t))}function u(t){return t===o||t===null||XE(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 QD(e,t){let n;return r;function r(i){return XE(i)?(e.enter(`lineEnding`),e.consume(i),e.exit(`lineEnding`),n=!0,r):QE(i)?rD(e,r,n?`linePrefix`:`lineSuffix`)(i):t(i)}}var $D={name:`definition`,tokenize:tO},eO={partial:!0,tokenize:nO};function tO(e,t,n){let r=this,i;return a;function a(t){return e.enter(`definition`),o(t)}function o(t){return XD.call(r,e,s,n,`definitionLabel`,`definitionLabelMarker`,`definitionLabelString`)(t)}function s(t){return i=WE(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 ZE(t)?QD(e,l)(t):l(t)}function l(t){return YD(e,u,n,`definitionDestination`,`definitionDestinationLiteral`,`definitionDestinationLiteralMarker`,`definitionDestinationRaw`,`definitionDestinationString`)(t)}function u(t){return e.attempt(eO,d,d)(t)}function d(t){return QE(t)?rD(e,f,`whitespace`)(t):f(t)}function f(a){return a===null||XE(a)?(e.exit(`definition`),r.parser.defined.push(i),t(a)):n(a)}}function nO(e,t,n){return r;function r(t){return ZE(t)?QD(e,i)(t):n(t)}function i(t){return ZD(e,a,n,`definitionTitle`,`definitionTitleMarker`,`definitionTitleString`)(t)}function a(t){return QE(t)?rD(e,o,`whitespace`)(t):o(t)}function o(e){return e===null||XE(e)?t(e):n(e)}}var rO={name:`hardBreakEscape`,tokenize:iO};function iO(e,t,n){return r;function r(t){return e.enter(`hardBreakEscape`),e.consume(t),i}function i(r){return XE(r)?(e.exit(`hardBreakEscape`),t(r)):n(r)}}var aO={name:`headingAtx`,resolve:oO,tokenize:sO};function oO(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`},LE(e,r,n-r+1,[[`enter`,i,t],[`enter`,a,t],[`exit`,a,t],[`exit`,i,t]])),e}function sO(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||ZE(t)?(e.exit(`atxHeadingSequence`),s(t)):n(t)}function s(n){return n===35?(e.enter(`atxHeadingSequence`),c(n)):n===null||XE(n)?(e.exit(`atxHeading`),t(n)):QE(n)?rD(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||ZE(t)?(e.exit(`atxHeadingText`),s(t)):(e.consume(t),l)}}var cO=`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(`.`),lO=[`pre`,`script`,`style`,`textarea`],uO={concrete:!0,name:`htmlFlow`,resolveTo:pO,tokenize:mO},dO={partial:!0,tokenize:gO},fO={partial:!0,tokenize:hO};function pO(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 mO(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):GE(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):GE(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 GE(t)?(e.consume(t),o=String.fromCharCode(t),g):n(t)}function g(s){if(s===null||s===47||s===62||ZE(s)){let c=s===47,l=o.toLowerCase();return!c&&!a&&lO.includes(l)?(i=1,r.interrupt?t(s):O(s)):cO.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||KE(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 QE(t)?(e.consume(t),v):E(t)}function y(t){return t===47?(e.consume(t),E):t===58||t===95||GE(t)?(e.consume(t),b):QE(t)?(e.consume(t),y):E(t)}function b(t){return t===45||t===46||t===58||t===95||KE(t)?(e.consume(t),b):x(t)}function x(t){return t===61?(e.consume(t),S):QE(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):QE(t)?(e.consume(t),S):w(t)}function C(t){return t===c?(e.consume(t),c=null,T):t===null||XE(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||ZE(t)?x(t):(e.consume(t),w)}function T(e){return e===47||e===62||QE(e)?y(e):n(e)}function E(t){return t===62?(e.consume(t),D):n(t)}function D(t){return t===null||XE(t)?O(t):QE(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):XE(t)&&(i===6||i===7)?(e.exit(`htmlFlowData`),e.check(dO,R,k)(t)):t===null||XE(t)?(e.exit(`htmlFlowData`),k(t)):(e.consume(t),O)}function k(t){return e.check(fO,A,R)(t)}function A(t){return e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),j}function j(t){return t===null||XE(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 lO.includes(n)?(e.consume(t),L):O(t)}return GE(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||XE(t)?(e.exit(`htmlFlowData`),R(t)):(e.consume(t),L)}function R(n){return e.exit(`htmlFlow`),t(n)}}function hO(e,t,n){let r=this;return i;function i(t){return XE(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 gO(e,t,n){return r;function r(r){return e.enter(`lineEnding`),e.consume(r),e.exit(`lineEnding`),e.attempt(vD,t,n)}}var _O={name:`htmlText`,tokenize:vO};function vO(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):GE(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):GE(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):XE(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):XE(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):XE(t)?(o=v,N(t)):(e.consume(t),v)}function y(t){return t===null?n(t):t===63?(e.consume(t),b):XE(t)?(o=y,N(t)):(e.consume(t),y)}function b(e){return e===62?M(e):y(e)}function x(t){return GE(t)?(e.consume(t),S):n(t)}function S(t){return t===45||KE(t)?(e.consume(t),S):C(t)}function C(t){return XE(t)?(o=C,N(t)):QE(t)?(e.consume(t),C):M(t)}function w(t){return t===45||KE(t)?(e.consume(t),w):t===47||t===62||ZE(t)?T(t):n(t)}function T(t){return t===47?(e.consume(t),M):t===58||t===95||GE(t)?(e.consume(t),E):XE(t)?(o=T,N(t)):QE(t)?(e.consume(t),T):M(t)}function E(t){return t===45||t===46||t===58||t===95||KE(t)?(e.consume(t),E):D(t)}function D(t){return t===61?(e.consume(t),O):XE(t)?(o=D,N(t)):QE(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):XE(t)?(o=O,N(t)):QE(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):XE(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||ZE(t)?T(t):(e.consume(t),A)}function j(e){return e===47||e===62||ZE(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 QE(t)?rD(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 yO={name:`labelEnd`,resolveAll:CO,resolveTo:wO,tokenize:TO},bO={tokenize:EO},xO={tokenize:DO},SO={tokenize:OO};function CO(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&&LE(e,0,e.length,n),e}function wO(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=RE(s,e.slice(a+1,a+r+3)),s=RE(s,[[`enter`,u,t]]),s=RE(s,dD(t.parser.constructs.insideSpan.null,e.slice(a+r+4,o-3),t)),s=RE(s,[[`exit`,u,t],e[o-2],e[o-1],[`exit`,l,t]]),s=RE(s,e.slice(o+1)),s=RE(s,[[`exit`,c,t]]),LE(e,a,e.length,s),e}function TO(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(WE(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(bO,u,o?u:d)(t):t===91?e.attempt(xO,u,o?l:d)(t):o?u(t):d(t)}function l(t){return e.attempt(SO,u,d)(t)}function u(e){return t(e)}function d(e){return a._balanced=!0,n(e)}}function EO(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 ZE(t)?QD(e,a)(t):a(t)}function a(t){return t===41?u(t):YD(e,o,s,`resourceDestination`,`resourceDestinationLiteral`,`resourceDestinationLiteralMarker`,`resourceDestinationRaw`,`resourceDestinationString`,32)(t)}function o(t){return ZE(t)?QD(e,c)(t):u(t)}function s(e){return n(e)}function c(t){return t===34||t===39||t===40?ZD(e,l,n,`resourceTitle`,`resourceTitleMarker`,`resourceTitleString`)(t):u(t)}function l(t){return ZE(t)?QD(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 DO(e,t,n){let r=this;return i;function i(t){return XD.call(r,e,a,o,`reference`,`referenceMarker`,`referenceString`)(t)}function a(e){return r.parser.defined.includes(WE(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(e):n(e)}function o(e){return n(e)}}function OO(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 kO={name:`labelStartImage`,resolveAll:yO.resolveAll,tokenize:AO};function AO(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 jO={name:`labelStartLink`,resolveAll:yO.resolveAll,tokenize:MO};function MO(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 NO={name:`lineEnding`,tokenize:PO};function PO(e,t){return n;function n(n){return e.enter(`lineEnding`),e.consume(n),e.exit(`lineEnding`),rD(e,t,`linePrefix`)}}var FO={name:`thematicBreak`,tokenize:IO};function IO(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||XE(a))?(e.exit(`thematicBreak`),t(a)):n(a)}function c(t){return t===i?(e.consume(t),r++,c):(e.exit(`thematicBreakSequence`),QE(t)?rD(e,s,`whitespace`)(t):s(t))}}var LO={continuation:{tokenize:VO},exit:UO,name:`list`,tokenize:BO},RO={partial:!0,tokenize:WO},zO={partial:!0,tokenize:HO};function BO(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:YE(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(FO,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 YE(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(vD,r.interrupt?n:u,e.attempt(RO,f,d))}function u(e){return r.containerState.initialBlankLine=!0,a++,f(e)}function d(t){return QE(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 VO(e,t,n){let r=this;return r.containerState._closeFlow=void 0,e.check(vD,i,a);function i(n){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,rD(e,t,`listItemIndent`,r.containerState.size+1)(n)}function a(n){return r.containerState.furtherBlankLines||!QE(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(zO,t,o)(n))}function o(i){return r.containerState._closeFlow=!0,r.interrupt=void 0,rD(e,e.attempt(LO,t,n),`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(i)}}function HO(e,t,n){let r=this;return rD(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 UO(e){e.exit(this.containerState.type)}function WO(e,t,n){let r=this;return rD(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!QE(e)&&i&&i[1].type===`listItemPrefixWhitespace`?t(e):n(e)}}var GO={name:`setextUnderline`,resolveTo:KO,tokenize:qO};function KO(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 qO(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`),QE(t)?rD(e,c,`lineSuffix`)(t):c(t))}function c(r){return r===null||XE(r)?(e.exit(`setextHeadingLine`),t(r)):n(r)}}var JO={tokenize:YO};function YO(e){let t=this,n=e.attempt(vD,r,e.attempt(this.parser.constructs.flowInitial,i,rD(e,e.attempt(this.parser.constructs.flow,i,e.attempt(WD,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 XO={resolveAll:ek()},ZO=$O(`string`),QO=$O(`text`);function $O(e){return{resolveAll:ek(e===`text`?tk: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 ek(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 tk(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 nk=s({attentionMarkers:()=>uk,contentInitial:()=>ik,disable:()=>dk,document:()=>rk,flow:()=>ok,flowInitial:()=>ak,insideSpan:()=>lk,string:()=>sk,text:()=>ck}),rk={42:LO,43:LO,45:LO,48:LO,49:LO,50:LO,51:LO,52:LO,53:LO,54:LO,55:LO,56:LO,57:LO,62:bD},ik={91:$D},ak={[-2]:MD,[-1]:MD,32:MD},ok={35:aO,42:FO,45:[GO,FO],60:uO,61:GO,95:FO,96:kD,126:kD},sk={38:ED,92:wD},ck={[-5]:NO,[-4]:NO,[-3]:NO,33:kO,38:ED,42:fD,60:[gD,_O],91:jO,92:[rO,wD],93:yO,95:fD,96:ID},lk={null:[fD,XO]},uk={null:[42,95]},dk={null:[]};function fk(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=RE(o,e),g(),o[o.length-1]===null?(w(t,0),l.events=dD(a,l.events,l),l.events):[]}function f(e,t){return mk(p(e),t)}function p(e){return pk(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){XE(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&&LE(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 pk(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 mk(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=`
61
61
  `;break;case-3:o=`\r
62
- `;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 vk(e){let t={constructs:HE([ak,...(e||{}).extensions||[]]),content:n(cD),defined:[],document:n(uD),flow:n(ZO),lazy:{},string:n(ek),text:n(tk)};return t;function n(e){return n;function n(n){return hk(t,e,n)}}}function yk(e){for(;!GD(e););return e}var bk=/[\0\t\n\r]/g;function xk(){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(bk.lastIndex=u,c=bk.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 Sk=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function Ck(e){return e.replace(Sk,wk)}function wk(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){let e=n.charCodeAt(1),t=e===120||e===88;return GE(n.slice(t?2:1),t?16:10)}return RE(n)||e}var Tk={}.hasOwnProperty;function Ek(e,t,n){return t&&typeof t==`object`&&(n=t,t=void 0),Dk(n)(yk(vk(n).document().write(xk()(e,t,!0))))}function Dk(e){let t={transforms:[],canContainEols:[`emphasis`,`fragment`,`heading`,`paragraph`,`strong`],enter:{autolink:a(ue),autolinkProtocol:T,autolinkEmail:T,atxHeading:a(se),blockQuote:a(ne),characterEscape:T,characterReference:T,codeFenced:a(re),codeFencedFenceInfo:o,codeFencedFenceMeta:o,codeIndented:a(re,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(W),label:o,link:a(ue),listItem:a(fe),listItemValue:f,listOrdered:a(de,d),listUnordered:a(de),paragraph:a(pe),reference:z,referenceString:o,resourceDestinationString:o,resourceTitleString:o,setextHeading:a(se),strong:a(me),thematicBreak:a(ge)},exit:{atxHeading:c(),atxHeadingSequence:x,autolink:c(),autolinkEmail:U,autolinkProtocol:te,blockQuote:c(),characterEscapeValue:E,characterReferenceMarkerHexadecimal:V,characterReferenceMarkerNumeric:V,characterReferenceValue:H,characterReference:ee,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:B,resourceDestinationString:I,resourceTitleString:L,resource:R,setextHeading:c(w),setextHeadingLineSequence:C,setextHeadingText:S,strong:c(),thematicBreak:c()}};kk(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]];Tk.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]||jk).call(a,void 0,e[0])}for(r.position={start:Ok(e.length>0?e[0][1].start:{line:1,column:1,offset:0}),end:Ok(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:Ok(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]||jk).call(this,e,r[0]));else throw Error("Cannot close `"+e.type+"` ("+fE({start:e.start,end:e.end})+`): it’s not open`);n.position.end=Ok(e.end)}function u(){return NE(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=KE(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=he(),n.position={start:Ok(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=Ok(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=Ok(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=Ck(t),n.identifier=KE(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 R(){this.data.inReference=void 0}function z(){this.data.referenceType=`collapsed`}function B(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.label=t,n.identifier=KE(this.sliceSerialize(e)).toLowerCase(),this.data.referenceType=`full`}function V(e){this.data.characterReferenceType=e.type}function H(e){let t=this.sliceSerialize(e),n=this.data.characterReferenceType,r;n?(r=GE(t,n===`characterReferenceMarkerNumeric`?10:16),this.data.characterReferenceType=void 0):r=RE(t);let i=this.stack[this.stack.length-1];i.value+=r}function ee(e){let t=this.stack.pop();t.position.end=Ok(e.end)}function te(e){E.call(this,e);let t=this.stack[this.stack.length-1];t.url=this.sliceSerialize(e)}function U(e){E.call(this,e);let t=this.stack[this.stack.length-1];t.url=`mailto:`+this.sliceSerialize(e)}function ne(){return{type:`blockquote`,children:[]}}function re(){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 W(){return{type:`image`,title:null,url:``,alt:null}}function ue(){return{type:`link`,title:null,url:``,children:[]}}function de(e){return{type:`list`,ordered:e.type===`listOrdered`,start:null,spread:e._spread,children:[]}}function fe(e){return{type:`listItem`,spread:e._spread,checked:null,children:[]}}function pe(){return{type:`paragraph`,children:[]}}function me(){return{type:`strong`,children:[]}}function he(){return{type:`text`,value:``}}function ge(){return{type:`thematicBreak`}}}function Ok(e){return{line:e.line,column:e.column,offset:e.offset}}function kk(e,t){let n=-1;for(;++n<t.length;){let r=t[n];Array.isArray(r)?kk(e,r):Ak(e,r)}}function Ak(e,t){let n;for(n in t)if(Tk.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 jk(e,t){throw Error(e?"Cannot close `"+e.type+"` ("+fE({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+fE({start:t.start,end:t.end})+`) is open`:"Cannot close document, a token (`"+t.type+"`, "+fE({start:t.start,end:t.end})+`) is still open`)}function Mk(e){let t=this;t.parser=n;function n(n){return Ek(n,{...t.data(`settings`),...e,extensions:t.data(`micromarkExtensions`)||[],mdastExtensions:t.data(`fromMarkdownExtensions`)||[]})}}function Nk(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 Pk(e,t){let n={type:`element`,tagName:`br`,properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:`text`,value:`
63
- `}]}function Fk(e,t){let n=t.value?t.value+`
64
- `:``,r={},i=t.lang?t.lang.split(/\s+/):[];i.length>0&&(r.className=[`language-`+i[0]]);let a={type:`element`,tagName:`code`,properties:r,children:[{type:`text`,value:n}]};return t.meta&&(a.data={meta:t.meta}),e.patch(t,a),a=e.applyData(t,a),a={type:`element`,tagName:`pre`,properties:{},children:[a]},e.patch(t,a),a}function Ik(e,t){let n={type:`element`,tagName:`del`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Lk(e,t){let n={type:`element`,tagName:`em`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Rk(e,t){let n=typeof e.options.clobberPrefix==`string`?e.options.clobberPrefix:`user-content-`,r=String(t.identifier).toUpperCase(),i=oD(r.toLowerCase()),a=e.footnoteOrder.indexOf(r),o,s=e.footnoteCounts.get(r);s===void 0?(s=0,e.footnoteOrder.push(r),o=e.footnoteOrder.length):o=a+1,s+=1,e.footnoteCounts.set(r,s);let c={type:`element`,tagName:`a`,properties:{href:`#`+n+`fn-`+i,id:n+`fnref-`+i+(s>1?`-`+s:``),dataFootnoteRef:!0,ariaDescribedBy:[`footnote-label`]},children:[{type:`text`,value:String(o)}]};e.patch(t,c);let l={type:`element`,tagName:`sup`,properties:{},children:[c]};return e.patch(t,l),e.applyData(t,l)}function zk(e,t){let n={type:`element`,tagName:`h`+t.depth,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Bk(e,t){if(e.options.allowDangerousHtml){let n={type:`raw`,value:t.value};return e.patch(t,n),e.applyData(t,n)}}function Vk(e,t){let n=t.referenceType,r=`]`;if(n===`collapsed`?r+=`[]`:n===`full`&&(r+=`[`+(t.label||t.identifier)+`]`),t.type===`imageReference`)return[{type:`text`,value:`![`+t.alt+r}];let i=e.all(t),a=i[0];a&&a.type===`text`?a.value=`[`+a.value:i.unshift({type:`text`,value:`[`});let o=i[i.length-1];return o&&o.type===`text`?o.value+=r:i.push({type:`text`,value:r}),i}function Hk(e,t){let n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return Vk(e,t);let i={src:oD(r.url||``),alt:t.alt};r.title!==null&&r.title!==void 0&&(i.title=r.title);let a={type:`element`,tagName:`img`,properties:i,children:[]};return e.patch(t,a),e.applyData(t,a)}function Uk(e,t){let n={src:oD(t.url)};t.alt!==null&&t.alt!==void 0&&(n.alt=t.alt),t.title!==null&&t.title!==void 0&&(n.title=t.title);let r={type:`element`,tagName:`img`,properties:n,children:[]};return e.patch(t,r),e.applyData(t,r)}function Wk(e,t){let n={type:`text`,value:t.value.replace(/\r?\n|\r/g,` `)};e.patch(t,n);let r={type:`element`,tagName:`code`,properties:{},children:[n]};return e.patch(t,r),e.applyData(t,r)}function Gk(e,t){let n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return Vk(e,t);let i={href:oD(r.url||``)};r.title!==null&&r.title!==void 0&&(i.title=r.title);let a={type:`element`,tagName:`a`,properties:i,children:e.all(t)};return e.patch(t,a),e.applyData(t,a)}function Kk(e,t){let n={href:oD(t.url)};t.title!==null&&t.title!==void 0&&(n.title=t.title);let r={type:`element`,tagName:`a`,properties:n,children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function qk(e,t,n){let r=e.all(t),i=n?Jk(n):Yk(t),a={},o=[];if(typeof t.checked==`boolean`){let e=r[0],n;e&&e.type===`element`&&e.tagName===`p`?n=e:(n={type:`element`,tagName:`p`,properties:{},children:[]},r.unshift(n)),n.children.length>0&&n.children.unshift({type:`text`,value:` `}),n.children.unshift({type:`element`,tagName:`input`,properties:{type:`checkbox`,checked:t.checked,disabled:!0},children:[]}),a.className=[`task-list-item`]}let s=-1;for(;++s<r.length;){let e=r[s];(i||s!==0||e.type!==`element`||e.tagName!==`p`)&&o.push({type:`text`,value:`
62
+ `;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 hk(e){let t={constructs:BE([nk,...(e||{}).extensions||[]]),content:n(iD),defined:[],document:n(oD),flow:n(JO),lazy:{},string:n(ZO),text:n(QO)};return t;function n(e){return n;function n(n){return fk(t,e,n)}}}function gk(e){for(;!HD(e););return e}var _k=/[\0\t\n\r]/g;function vk(){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(_k.lastIndex=u,c=_k.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 yk=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function bk(e){return e.replace(yk,xk)}function xk(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){let e=n.charCodeAt(1),t=e===120||e===88;return UE(n.slice(t?2:1),t?16:10)}return IE(n)||e}var Sk={}.hasOwnProperty;function Ck(e,t,n){return t&&typeof t==`object`&&(n=t,t=void 0),wk(n)(gk(hk(n).document().write(vk()(e,t,!0))))}function wk(e){let t={transforms:[],canContainEols:[`emphasis`,`fragment`,`heading`,`paragraph`,`strong`],enter:{autolink:a(ue),autolinkProtocol:T,autolinkEmail:T,atxHeading:a(se),blockQuote:a(ne),characterEscape:T,characterReference:T,codeFenced:a(re),codeFencedFenceInfo:o,codeFencedFenceMeta:o,codeIndented:a(re,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(W),label:o,link:a(ue),listItem:a(fe),listItemValue:f,listOrdered:a(de,d),listUnordered:a(de),paragraph:a(pe),reference:z,referenceString:o,resourceDestinationString:o,resourceTitleString:o,setextHeading:a(se),strong:a(me),thematicBreak:a(ge)},exit:{atxHeading:c(),atxHeadingSequence:x,autolink:c(),autolinkEmail:U,autolinkProtocol:te,blockQuote:c(),characterEscapeValue:E,characterReferenceMarkerHexadecimal:V,characterReferenceMarkerNumeric:V,characterReferenceValue:H,characterReference:ee,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:B,resourceDestinationString:I,resourceTitleString:L,resource:R,setextHeading:c(w),setextHeadingLineSequence:C,setextHeadingText:S,strong:c(),thematicBreak:c()}};Ek(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]];Sk.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]||Ok).call(a,void 0,e[0])}for(r.position={start:Tk(e.length>0?e[0][1].start:{line:1,column:1,offset:0}),end:Tk(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:Tk(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]||Ok).call(this,e,r[0]));else throw Error("Cannot close `"+e.type+"` ("+XT({start:e.start,end:e.end})+`): it’s not open`);n.position.end=Tk(e.end)}function u(){return jE(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=WE(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=he(),n.position={start:Tk(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=Tk(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=Tk(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=bk(t),n.identifier=WE(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 R(){this.data.inReference=void 0}function z(){this.data.referenceType=`collapsed`}function B(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.label=t,n.identifier=WE(this.sliceSerialize(e)).toLowerCase(),this.data.referenceType=`full`}function V(e){this.data.characterReferenceType=e.type}function H(e){let t=this.sliceSerialize(e),n=this.data.characterReferenceType,r;n?(r=UE(t,n===`characterReferenceMarkerNumeric`?10:16),this.data.characterReferenceType=void 0):r=IE(t);let i=this.stack[this.stack.length-1];i.value+=r}function ee(e){let t=this.stack.pop();t.position.end=Tk(e.end)}function te(e){E.call(this,e);let t=this.stack[this.stack.length-1];t.url=this.sliceSerialize(e)}function U(e){E.call(this,e);let t=this.stack[this.stack.length-1];t.url=`mailto:`+this.sliceSerialize(e)}function ne(){return{type:`blockquote`,children:[]}}function re(){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 W(){return{type:`image`,title:null,url:``,alt:null}}function ue(){return{type:`link`,title:null,url:``,children:[]}}function de(e){return{type:`list`,ordered:e.type===`listOrdered`,start:null,spread:e._spread,children:[]}}function fe(e){return{type:`listItem`,spread:e._spread,checked:null,children:[]}}function pe(){return{type:`paragraph`,children:[]}}function me(){return{type:`strong`,children:[]}}function he(){return{type:`text`,value:``}}function ge(){return{type:`thematicBreak`}}}function Tk(e){return{line:e.line,column:e.column,offset:e.offset}}function Ek(e,t){let n=-1;for(;++n<t.length;){let r=t[n];Array.isArray(r)?Ek(e,r):Dk(e,r)}}function Dk(e,t){let n;for(n in t)if(Sk.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 Ok(e,t){throw Error(e?"Cannot close `"+e.type+"` ("+XT({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+XT({start:t.start,end:t.end})+`) is open`:"Cannot close document, a token (`"+t.type+"`, "+XT({start:t.start,end:t.end})+`) is still open`)}function kk(e){let t=this;t.parser=n;function n(n){return Ck(n,{...t.data(`settings`),...e,extensions:t.data(`micromarkExtensions`)||[],mdastExtensions:t.data(`fromMarkdownExtensions`)||[]})}}function Ak(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 jk(e,t){let n={type:`element`,tagName:`br`,properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:`text`,value:`
63
+ `}]}function Mk(e,t){let n=t.value?t.value+`
64
+ `:``,r={},i=t.lang?t.lang.split(/\s+/):[];i.length>0&&(r.className=[`language-`+i[0]]);let a={type:`element`,tagName:`code`,properties:r,children:[{type:`text`,value:n}]};return t.meta&&(a.data={meta:t.meta}),e.patch(t,a),a=e.applyData(t,a),a={type:`element`,tagName:`pre`,properties:{},children:[a]},e.patch(t,a),a}function Nk(e,t){let n={type:`element`,tagName:`del`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Pk(e,t){let n={type:`element`,tagName:`em`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Fk(e,t){let n=typeof e.options.clobberPrefix==`string`?e.options.clobberPrefix:`user-content-`,r=String(t.identifier).toUpperCase(),i=nD(r.toLowerCase()),a=e.footnoteOrder.indexOf(r),o,s=e.footnoteCounts.get(r);s===void 0?(s=0,e.footnoteOrder.push(r),o=e.footnoteOrder.length):o=a+1,s+=1,e.footnoteCounts.set(r,s);let c={type:`element`,tagName:`a`,properties:{href:`#`+n+`fn-`+i,id:n+`fnref-`+i+(s>1?`-`+s:``),dataFootnoteRef:!0,ariaDescribedBy:[`footnote-label`]},children:[{type:`text`,value:String(o)}]};e.patch(t,c);let l={type:`element`,tagName:`sup`,properties:{},children:[c]};return e.patch(t,l),e.applyData(t,l)}function Ik(e,t){let n={type:`element`,tagName:`h`+t.depth,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Lk(e,t){if(e.options.allowDangerousHtml){let n={type:`raw`,value:t.value};return e.patch(t,n),e.applyData(t,n)}}function Rk(e,t){let n=t.referenceType,r=`]`;if(n===`collapsed`?r+=`[]`:n===`full`&&(r+=`[`+(t.label||t.identifier)+`]`),t.type===`imageReference`)return[{type:`text`,value:`![`+t.alt+r}];let i=e.all(t),a=i[0];a&&a.type===`text`?a.value=`[`+a.value:i.unshift({type:`text`,value:`[`});let o=i[i.length-1];return o&&o.type===`text`?o.value+=r:i.push({type:`text`,value:r}),i}function zk(e,t){let n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return Rk(e,t);let i={src:nD(r.url||``),alt:t.alt};r.title!==null&&r.title!==void 0&&(i.title=r.title);let a={type:`element`,tagName:`img`,properties:i,children:[]};return e.patch(t,a),e.applyData(t,a)}function Bk(e,t){let n={src:nD(t.url)};t.alt!==null&&t.alt!==void 0&&(n.alt=t.alt),t.title!==null&&t.title!==void 0&&(n.title=t.title);let r={type:`element`,tagName:`img`,properties:n,children:[]};return e.patch(t,r),e.applyData(t,r)}function Vk(e,t){let n={type:`text`,value:t.value.replace(/\r?\n|\r/g,` `)};e.patch(t,n);let r={type:`element`,tagName:`code`,properties:{},children:[n]};return e.patch(t,r),e.applyData(t,r)}function Hk(e,t){let n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return Rk(e,t);let i={href:nD(r.url||``)};r.title!==null&&r.title!==void 0&&(i.title=r.title);let a={type:`element`,tagName:`a`,properties:i,children:e.all(t)};return e.patch(t,a),e.applyData(t,a)}function Uk(e,t){let n={href:nD(t.url)};t.title!==null&&t.title!==void 0&&(n.title=t.title);let r={type:`element`,tagName:`a`,properties:n,children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function Wk(e,t,n){let r=e.all(t),i=n?Gk(n):Kk(t),a={},o=[];if(typeof t.checked==`boolean`){let e=r[0],n;e&&e.type===`element`&&e.tagName===`p`?n=e:(n={type:`element`,tagName:`p`,properties:{},children:[]},r.unshift(n)),n.children.length>0&&n.children.unshift({type:`text`,value:` `}),n.children.unshift({type:`element`,tagName:`input`,properties:{type:`checkbox`,checked:t.checked,disabled:!0},children:[]}),a.className=[`task-list-item`]}let s=-1;for(;++s<r.length;){let e=r[s];(i||s!==0||e.type!==`element`||e.tagName!==`p`)&&o.push({type:`text`,value:`
65
65
  `}),e.type===`element`&&e.tagName===`p`&&!i?o.push(...e.children):o.push(e)}let c=r[r.length-1];c&&(i||c.type!==`element`||c.tagName!==`p`)&&o.push({type:`text`,value:`
66
- `});let l={type:`element`,tagName:`li`,properties:a,children:o};return e.patch(t,l),e.applyData(t,l)}function Jk(e){let t=!1;if(e.type===`list`){t=e.spread||!1;let n=e.children,r=-1;for(;!t&&++r<n.length;)t=Yk(n[r])}return t}function Yk(e){return e.spread??e.children.length>1}function Xk(e,t){let n={},r=e.all(t),i=-1;for(typeof t.start==`number`&&t.start!==1&&(n.start=t.start);++i<r.length;){let e=r[i];if(e.type===`element`&&e.tagName===`li`&&e.properties&&Array.isArray(e.properties.className)&&e.properties.className.includes(`task-list-item`)){n.className=[`contains-task-list`];break}}let a={type:`element`,tagName:t.ordered?`ol`:`ul`,properties:n,children:e.wrap(r,!0)};return e.patch(t,a),e.applyData(t,a)}function Zk(e,t){let n={type:`element`,tagName:`p`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function yee(e,t){let n={type:`root`,children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function bee(e,t){let n={type:`element`,tagName:`strong`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function xee(e,t){let n=e.all(t),r=n.shift(),i=[];if(r){let n={type:`element`,tagName:`thead`,properties:{},children:e.wrap([r],!0)};e.patch(t.children[0],n),i.push(n)}if(n.length>0){let r={type:`element`,tagName:`tbody`,properties:{},children:e.wrap(n,!0)},a=lE(t.children[1]),o=cE(t.children[t.children.length-1]);a&&o&&(r.position={start:a,end:o}),i.push(r)}let a={type:`element`,tagName:`table`,properties:{},children:e.wrap(i,!0)};return e.patch(t,a),e.applyData(t,a)}function See(e,t,n){let r=n?n.children:void 0,i=(r?r.indexOf(t):1)===0?`th`:`td`,a=n&&n.type===`table`?n.align:void 0,o=a?a.length:t.children.length,s=-1,c=[];for(;++s<o;){let n=t.children[s],r={},o=a?a[s]:void 0;o&&(r.align=o);let l={type:`element`,tagName:i,properties:r,children:[]};n&&(l.children=e.all(n),e.patch(n,l),l=e.applyData(n,l)),c.push(l)}let l={type:`element`,tagName:`tr`,properties:{},children:e.wrap(c,!0)};return e.patch(t,l),e.applyData(t,l)}function Cee(e,t){let n={type:`element`,tagName:`td`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}var Qk=9,$k=32;function eA(e){let t=String(e),n=/\r?\n|\r/g,r=n.exec(t),i=0,a=[];for(;r;)a.push(tA(t.slice(i,r.index),i>0,!0),r[0]),i=r.index+r[0].length,r=n.exec(t);return a.push(tA(t.slice(i),i>0,!1)),a.join(``)}function tA(e,t,n){let r=0,i=e.length;if(t){let t=e.codePointAt(r);for(;t===Qk||t===$k;)r++,t=e.codePointAt(r)}if(n){let t=e.codePointAt(i-1);for(;t===Qk||t===$k;)i--,t=e.codePointAt(i-1)}return i>r?e.slice(r,i):``}function nA(e,t){let n={type:`text`,value:eA(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function rA(e,t){let n={type:`element`,tagName:`hr`,properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}var iA={blockquote:Nk,break:Pk,code:Fk,delete:Ik,emphasis:Lk,footnoteReference:Rk,heading:zk,html:Bk,imageReference:Hk,image:Uk,inlineCode:Wk,linkReference:Gk,link:Kk,listItem:qk,list:Xk,paragraph:Zk,root:yee,strong:bee,table:xee,tableCell:Cee,tableRow:See,text:nA,thematicBreak:rA,toml:aA,yaml:aA,definition:aA,footnoteDefinition:aA};function aA(){}var oA=typeof self==`object`?self:globalThis,sA=(e,t)=>{switch(e){case`Function`:case`SharedWorker`:case`Worker`:case`eval`:case`setInterval`:case`setTimeout`:throw TypeError(`unable to deserialize `+e)}return new oA[e](t)},cA=(e,t)=>{let n=(t,n)=>(e.set(n,t),t),r=i=>{if(e.has(i))return e.get(i);let[a,o]=t[i];switch(a){case 0:case-1:return n(o,i);case 1:{let e=n([],i);for(let t of o)e.push(r(t));return e}case 2:{let e=n({},i);for(let[t,n]of o)e[r(t)]=r(n);return e}case 3:return n(new Date(o),i);case 4:{let{source:e,flags:t}=o;return n(new RegExp(e,t),i)}case 5:{let e=n(new Map,i);for(let[t,n]of o)e.set(r(t),r(n));return e}case 6:{let e=n(new Set,i);for(let t of o)e.add(r(t));return e}case 7:{let{name:e,message:t}=o;return n(typeof oA[e]==`function`?sA(e,t):Error(t),i)}case 8:return n(BigInt(o),i);case`BigInt`:return n(Object(BigInt(o)),i);case`ArrayBuffer`:return n(new Uint8Array(o).buffer,o);case`DataView`:{let{buffer:e}=new Uint8Array(o);return n(new DataView(e),o)}}return n(sA(a,o),i)};return r},lA=e=>cA(new Map,e)(0),uA=``,{toString:dA}={},{keys:fA}=Object,pA=e=>{let t=typeof e;if(t!==`object`||!e)return[0,t];let n=dA.call(e).slice(8,-1);switch(n){case`Array`:return[1,uA];case`Object`:return[2,uA];case`Date`:return[3,uA];case`RegExp`:return[4,uA];case`Map`:return[5,uA];case`Set`:return[6,uA];case`DataView`:return[1,n]}return n.includes(`Array`)?[1,n]:e instanceof Error?[7,e.name||`Error`]:[2,n]},mA=([e,t])=>e===0&&(t===`function`||t===`symbol`),hA=(e,t,n,r)=>{let i=(e,t)=>{let i=r.push(e)-1;return n.set(t,i),i},a=r=>{if(n.has(r))return n.get(r);let[o,s]=pA(r);switch(o){case 0:{let t=r;switch(s){case`bigint`:o=8,t=r.toString();break;case`function`:case`symbol`:if(e)throw TypeError(`unable to serialize `+s);t=null;break;case`undefined`:return i([-1],r)}return i([o,t],r)}case 1:{if(s){let e=r;return s===`DataView`?e=new Uint8Array(r.buffer):s===`ArrayBuffer`&&(e=new Uint8Array(r)),i([s,[...e]],r)}let e=[],t=i([o,e],r);for(let t of r)e.push(a(t));return t}case 2:{if(s)switch(s){case`BigInt`:return i([s,r.toString()],r);case`Boolean`:case`Number`:case`String`:return i([s,r.valueOf()],r)}if(t&&`toJSON`in r)return a(r.toJSON());let n=[],c=i([o,n],r);for(let t of fA(r))(e||!mA(pA(r[t])))&&n.push([a(t),a(r[t])]);return c}case 3:return i([o,isNaN(r.getTime())?uA:r.toISOString()],r);case 4:{let{source:e,flags:t}=r;return i([o,{source:e,flags:t}],r)}case 5:{let t=[],n=i([o,t],r);for(let[n,i]of r)(e||!(mA(pA(n))||mA(pA(i))))&&t.push([a(n),a(i)]);return n}case 6:{let t=[],n=i([o,t],r);for(let n of r)(e||!mA(pA(n)))&&t.push(a(n));return n}}let{message:c}=r;return i([o,{name:s,message:c}],r)};return a},gA=(e,{json:t,lossy:n}={})=>{let r=[];return hA(!(t||n),!!t,new Map,r)(e),r},_A=typeof structuredClone==`function`?(e,t)=>t&&(`json`in t||`lossy`in t)?lA(gA(e,t)):structuredClone(e):(e,t)=>lA(gA(e,t));function vA(e,t){let n=[{type:`text`,value:`↩`}];return t>1&&n.push({type:`element`,tagName:`sup`,properties:{},children:[{type:`text`,value:String(t)}]}),n}function yA(e,t){return`Back to reference `+(e+1)+(t>1?`-`+t:``)}function bA(e){let t=typeof e.options.clobberPrefix==`string`?e.options.clobberPrefix:`user-content-`,n=e.options.footnoteBackContent||vA,r=e.options.footnoteBackLabel||yA,i=e.options.footnoteLabel||`Footnotes`,a=e.options.footnoteLabelTagName||`h2`,o=e.options.footnoteLabelProperties||{className:[`sr-only`]},s=[],c=-1;for(;++c<e.footnoteOrder.length;){let i=e.footnoteById.get(e.footnoteOrder[c]);if(!i)continue;let a=e.all(i),o=String(i.identifier).toUpperCase(),l=oD(o.toLowerCase()),u=0,d=[],f=e.footnoteCounts.get(o);for(;f!==void 0&&++u<=f;){d.length>0&&d.push({type:`text`,value:` `});let e=typeof n==`string`?n:n(c,u);typeof e==`string`&&(e={type:`text`,value:e}),d.push({type:`element`,tagName:`a`,properties:{href:`#`+t+`fnref-`+l+(u>1?`-`+u:``),dataFootnoteBackref:``,ariaLabel:typeof r==`string`?r:r(c,u),className:[`data-footnote-backref`]},children:Array.isArray(e)?e:[e]})}let p=a[a.length-1];if(p&&p.type===`element`&&p.tagName===`p`){let e=p.children[p.children.length-1];e&&e.type===`text`?e.value+=` `:p.children.push({type:`text`,value:` `}),p.children.push(...d)}else a.push(...d);let m={type:`element`,tagName:`li`,properties:{id:t+`fn-`+l},children:e.wrap(a,!0)};e.patch(i,m),s.push(m)}if(s.length!==0)return{type:`element`,tagName:`section`,properties:{dataFootnotes:!0,className:[`footnotes`]},children:[{type:`element`,tagName:a,properties:{..._A(o),id:`footnote-label`},children:[{type:`text`,value:i}]},{type:`text`,value:`
66
+ `});let l={type:`element`,tagName:`li`,properties:a,children:o};return e.patch(t,l),e.applyData(t,l)}function Gk(e){let t=!1;if(e.type===`list`){t=e.spread||!1;let n=e.children,r=-1;for(;!t&&++r<n.length;)t=Kk(n[r])}return t}function Kk(e){return e.spread??e.children.length>1}function qk(e,t){let n={},r=e.all(t),i=-1;for(typeof t.start==`number`&&t.start!==1&&(n.start=t.start);++i<r.length;){let e=r[i];if(e.type===`element`&&e.tagName===`li`&&e.properties&&Array.isArray(e.properties.className)&&e.properties.className.includes(`task-list-item`)){n.className=[`contains-task-list`];break}}let a={type:`element`,tagName:t.ordered?`ol`:`ul`,properties:n,children:e.wrap(r,!0)};return e.patch(t,a),e.applyData(t,a)}function Jk(e,t){let n={type:`element`,tagName:`p`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Yk(e,t){let n={type:`root`,children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function Xk(e,t){let n={type:`element`,tagName:`strong`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Zk(e,t){let n=e.all(t),r=n.shift(),i=[];if(r){let n={type:`element`,tagName:`thead`,properties:{},children:e.wrap([r],!0)};e.patch(t.children[0],n),i.push(n)}if(n.length>0){let r={type:`element`,tagName:`tbody`,properties:{},children:e.wrap(n,!0)},a=qT(t.children[1]),o=KT(t.children[t.children.length-1]);a&&o&&(r.position={start:a,end:o}),i.push(r)}let a={type:`element`,tagName:`table`,properties:{},children:e.wrap(i,!0)};return e.patch(t,a),e.applyData(t,a)}function Qk(e,t,n){let r=n?n.children:void 0,i=(r?r.indexOf(t):1)===0?`th`:`td`,a=n&&n.type===`table`?n.align:void 0,o=a?a.length:t.children.length,s=-1,c=[];for(;++s<o;){let n=t.children[s],r={},o=a?a[s]:void 0;o&&(r.align=o);let l={type:`element`,tagName:i,properties:r,children:[]};n&&(l.children=e.all(n),e.patch(n,l),l=e.applyData(n,l)),c.push(l)}let l={type:`element`,tagName:`tr`,properties:{},children:e.wrap(c,!0)};return e.patch(t,l),e.applyData(t,l)}function $k(e,t){let n={type:`element`,tagName:`td`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}var eA=9,tA=32;function nA(e){let t=String(e),n=/\r?\n|\r/g,r=n.exec(t),i=0,a=[];for(;r;)a.push(rA(t.slice(i,r.index),i>0,!0),r[0]),i=r.index+r[0].length,r=n.exec(t);return a.push(rA(t.slice(i),i>0,!1)),a.join(``)}function rA(e,t,n){let r=0,i=e.length;if(t){let t=e.codePointAt(r);for(;t===eA||t===tA;)r++,t=e.codePointAt(r)}if(n){let t=e.codePointAt(i-1);for(;t===eA||t===tA;)i--,t=e.codePointAt(i-1)}return i>r?e.slice(r,i):``}function iA(e,t){let n={type:`text`,value:nA(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function aA(e,t){let n={type:`element`,tagName:`hr`,properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}var oA={blockquote:Ak,break:jk,code:Mk,delete:Nk,emphasis:Pk,footnoteReference:Fk,heading:Ik,html:Lk,imageReference:zk,image:Bk,inlineCode:Vk,linkReference:Hk,link:Uk,listItem:Wk,list:qk,paragraph:Jk,root:Yk,strong:Xk,table:Zk,tableCell:$k,tableRow:Qk,text:iA,thematicBreak:aA,toml:sA,yaml:sA,definition:sA,footnoteDefinition:sA};function sA(){}var cA=typeof self==`object`?self:globalThis,lA=(e,t)=>{switch(e){case`Function`:case`SharedWorker`:case`Worker`:case`eval`:case`setInterval`:case`setTimeout`:throw TypeError(`unable to deserialize `+e)}return new cA[e](t)},uA=(e,t)=>{let n=(t,n)=>(e.set(n,t),t),r=i=>{if(e.has(i))return e.get(i);let[a,o]=t[i];switch(a){case 0:case-1:return n(o,i);case 1:{let e=n([],i);for(let t of o)e.push(r(t));return e}case 2:{let e=n({},i);for(let[t,n]of o)e[r(t)]=r(n);return e}case 3:return n(new Date(o),i);case 4:{let{source:e,flags:t}=o;return n(new RegExp(e,t),i)}case 5:{let e=n(new Map,i);for(let[t,n]of o)e.set(r(t),r(n));return e}case 6:{let e=n(new Set,i);for(let t of o)e.add(r(t));return e}case 7:{let{name:e,message:t}=o;return n(typeof cA[e]==`function`?lA(e,t):Error(t),i)}case 8:return n(BigInt(o),i);case`BigInt`:return n(Object(BigInt(o)),i);case`ArrayBuffer`:return n(new Uint8Array(o).buffer,o);case`DataView`:{let{buffer:e}=new Uint8Array(o);return n(new DataView(e),o)}}return n(lA(a,o),i)};return r},dA=e=>uA(new Map,e)(0),fA=``,{toString:pA}={},{keys:mA}=Object,hA=e=>{let t=typeof e;if(t!==`object`||!e)return[0,t];let n=pA.call(e).slice(8,-1);switch(n){case`Array`:return[1,fA];case`Object`:return[2,fA];case`Date`:return[3,fA];case`RegExp`:return[4,fA];case`Map`:return[5,fA];case`Set`:return[6,fA];case`DataView`:return[1,n]}return n.includes(`Array`)?[1,n]:e instanceof Error?[7,e.name||`Error`]:[2,n]},gA=([e,t])=>e===0&&(t===`function`||t===`symbol`),_A=(e,t,n,r)=>{let i=(e,t)=>{let i=r.push(e)-1;return n.set(t,i),i},a=r=>{if(n.has(r))return n.get(r);let[o,s]=hA(r);switch(o){case 0:{let t=r;switch(s){case`bigint`:o=8,t=r.toString();break;case`function`:case`symbol`:if(e)throw TypeError(`unable to serialize `+s);t=null;break;case`undefined`:return i([-1],r)}return i([o,t],r)}case 1:{if(s){let e=r;return s===`DataView`?e=new Uint8Array(r.buffer):s===`ArrayBuffer`&&(e=new Uint8Array(r)),i([s,[...e]],r)}let e=[],t=i([o,e],r);for(let t of r)e.push(a(t));return t}case 2:{if(s)switch(s){case`BigInt`:return i([s,r.toString()],r);case`Boolean`:case`Number`:case`String`:return i([s,r.valueOf()],r)}if(t&&`toJSON`in r)return a(r.toJSON());let n=[],c=i([o,n],r);for(let t of mA(r))(e||!gA(hA(r[t])))&&n.push([a(t),a(r[t])]);return c}case 3:return i([o,isNaN(r.getTime())?fA:r.toISOString()],r);case 4:{let{source:e,flags:t}=r;return i([o,{source:e,flags:t}],r)}case 5:{let t=[],n=i([o,t],r);for(let[n,i]of r)(e||!(gA(hA(n))||gA(hA(i))))&&t.push([a(n),a(i)]);return n}case 6:{let t=[],n=i([o,t],r);for(let n of r)(e||!gA(hA(n)))&&t.push(a(n));return n}}let{message:c}=r;return i([o,{name:s,message:c}],r)};return a},vA=(e,{json:t,lossy:n}={})=>{let r=[];return _A(!(t||n),!!t,new Map,r)(e),r},yA=typeof structuredClone==`function`?(e,t)=>t&&(`json`in t||`lossy`in t)?dA(vA(e,t)):structuredClone(e):(e,t)=>dA(vA(e,t));function bA(e,t){let n=[{type:`text`,value:`↩`}];return t>1&&n.push({type:`element`,tagName:`sup`,properties:{},children:[{type:`text`,value:String(t)}]}),n}function xA(e,t){return`Back to reference `+(e+1)+(t>1?`-`+t:``)}function SA(e){let t=typeof e.options.clobberPrefix==`string`?e.options.clobberPrefix:`user-content-`,n=e.options.footnoteBackContent||bA,r=e.options.footnoteBackLabel||xA,i=e.options.footnoteLabel||`Footnotes`,a=e.options.footnoteLabelTagName||`h2`,o=e.options.footnoteLabelProperties||{className:[`sr-only`]},s=[],c=-1;for(;++c<e.footnoteOrder.length;){let i=e.footnoteById.get(e.footnoteOrder[c]);if(!i)continue;let a=e.all(i),o=String(i.identifier).toUpperCase(),l=nD(o.toLowerCase()),u=0,d=[],f=e.footnoteCounts.get(o);for(;f!==void 0&&++u<=f;){d.length>0&&d.push({type:`text`,value:` `});let e=typeof n==`string`?n:n(c,u);typeof e==`string`&&(e={type:`text`,value:e}),d.push({type:`element`,tagName:`a`,properties:{href:`#`+t+`fnref-`+l+(u>1?`-`+u:``),dataFootnoteBackref:``,ariaLabel:typeof r==`string`?r:r(c,u),className:[`data-footnote-backref`]},children:Array.isArray(e)?e:[e]})}let p=a[a.length-1];if(p&&p.type===`element`&&p.tagName===`p`){let e=p.children[p.children.length-1];e&&e.type===`text`?e.value+=` `:p.children.push({type:`text`,value:` `}),p.children.push(...d)}else a.push(...d);let m={type:`element`,tagName:`li`,properties:{id:t+`fn-`+l},children:e.wrap(a,!0)};e.patch(i,m),s.push(m)}if(s.length!==0)return{type:`element`,tagName:`section`,properties:{dataFootnotes:!0,className:[`footnotes`]},children:[{type:`element`,tagName:a,properties:{...yA(o),id:`footnote-label`},children:[{type:`text`,value:i}]},{type:`text`,value:`
67
67
  `},{type:`element`,tagName:`ol`,properties:{},children:e.wrap(s,!0)},{type:`text`,value:`
68
- `}]}}var xA=(function(e){if(e==null)return EA;if(typeof e==`function`)return TA(e);if(typeof e==`object`)return Array.isArray(e)?SA(e):CA(e);if(typeof e==`string`)return wA(e);throw Error(`Expected function, string, or object as test`)});function SA(e){let t=[],n=-1;for(;++n<e.length;)t[n]=xA(e[n]);return TA(r);function r(...e){let n=-1;for(;++n<t.length;)if(t[n].apply(this,e))return!0;return!1}}function CA(e){let t=e;return TA(n);function n(n){let r=n,i;for(i in e)if(r[i]!==t[i])return!1;return!0}}function wA(e){return TA(t);function t(t){return t&&t.type===e}}function TA(e){return t;function t(t,n,r){return!!(DA(t)&&e.call(this,t,typeof n==`number`?n:void 0,r||void 0))}}function EA(){return!0}function DA(e){return typeof e==`object`&&!!e&&`type`in e}function OA(e){return e}var kA=[];function AA(e,t,n,r){let i;typeof t==`function`&&typeof n!=`function`?(r=n,n=t):i=t;let a=xA(i),o=r?-1:1;s(e,void 0,[])();function s(e,i,c){let l=e&&typeof e==`object`?e:{};if(typeof l.type==`string`){let t=typeof l.tagName==`string`?l.tagName:typeof l.name==`string`?l.name:void 0;Object.defineProperty(u,"name",{value:`node (`+OA(e.type+(t?`<`+t+`>`:``))+`)`})}return u;function u(){let l=kA,u,d,f;if((!t||a(e,i,c[c.length-1]||void 0))&&(l=jA(n(e,c)),l[0]===!1))return l;if(`children`in e&&e.children){let t=e;if(t.children&&l[0]!==`skip`)for(d=(r?t.children.length:-1)+o,f=c.concat(t);d>-1&&d<t.children.length;){let e=t.children[d];if(u=s(e,d,f)(),u[0]===!1)return u;d=typeof u[1]==`number`?u[1]:d+o}}return l}}}function jA(e){return Array.isArray(e)?e:typeof e==`number`?[!0,e]:e==null?kA:[e]}function MA(e,t,n,r){let i,a,o;typeof t==`function`&&typeof n!=`function`?(a=void 0,o=t,i=n):(a=t,o=n,i=r),AA(e,a,s,i);function s(e,t){let n=t[t.length-1],r=n?n.children.indexOf(e):void 0;return o(e,r,n)}}var NA={}.hasOwnProperty,PA={};function FA(e,t){let n=t||PA,r=new Map,i=new Map,a={all:s,applyData:LA,definitionById:r,footnoteById:i,footnoteCounts:new Map,footnoteOrder:[],handlers:{...iA,...n.handlers},one:o,options:n,patch:IA,wrap:zA};return MA(e,function(e){if(e.type===`definition`||e.type===`footnoteDefinition`){let t=e.type===`definition`?r:i,n=String(e.identifier).toUpperCase();t.has(n)||t.set(n,e)}}),a;function o(e,t){let n=e.type,r=a.handlers[n];if(NA.call(a.handlers,n)&&r)return r(a,e,t);if(a.options.passThrough&&a.options.passThrough.includes(n)){if(`children`in e){let{children:t,...n}=e,r=_A(n);return r.children=a.all(e),r}return _A(e)}return(a.options.unknownHandler||RA)(a,e,t)}function s(e){let t=[];if(`children`in e){let n=e.children,r=-1;for(;++r<n.length;){let i=a.one(n[r],e);if(i){if(r&&n[r-1].type===`break`&&(!Array.isArray(i)&&i.type===`text`&&(i.value=BA(i.value)),!Array.isArray(i)&&i.type===`element`)){let e=i.children[0];e&&e.type===`text`&&(e.value=BA(e.value))}Array.isArray(i)?t.push(...i):t.push(i)}}}return t}}function IA(e,t){e.position&&(t.position=dE(e))}function LA(e,t){let n=t;if(e&&e.data){let t=e.data.hName,r=e.data.hChildren,i=e.data.hProperties;typeof t==`string`&&(n.type===`element`?n.tagName=t:n={type:`element`,tagName:t,properties:{},children:`children`in n?n.children:[n]}),n.type===`element`&&i&&Object.assign(n.properties,_A(i)),`children`in n&&n.children&&r!=null&&(n.children=r)}return n}function RA(e,t){let n=t.data||{},r=`value`in t&&!(NA.call(n,`hProperties`)||NA.call(n,`hChildren`))?{type:`text`,value:t.value}:{type:`element`,tagName:`div`,properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function zA(e,t){let n=[],r=-1;for(t&&n.push({type:`text`,value:`
68
+ `}]}}var CA=(function(e){if(e==null)return OA;if(typeof e==`function`)return DA(e);if(typeof e==`object`)return Array.isArray(e)?wA(e):TA(e);if(typeof e==`string`)return EA(e);throw Error(`Expected function, string, or object as test`)});function wA(e){let t=[],n=-1;for(;++n<e.length;)t[n]=CA(e[n]);return DA(r);function r(...e){let n=-1;for(;++n<t.length;)if(t[n].apply(this,e))return!0;return!1}}function TA(e){let t=e;return DA(n);function n(n){let r=n,i;for(i in e)if(r[i]!==t[i])return!1;return!0}}function EA(e){return DA(t);function t(t){return t&&t.type===e}}function DA(e){return t;function t(t,n,r){return!!(kA(t)&&e.call(this,t,typeof n==`number`?n:void 0,r||void 0))}}function OA(){return!0}function kA(e){return typeof e==`object`&&!!e&&`type`in e}function AA(e){return e}var jA=[];function MA(e,t,n,r){let i;typeof t==`function`&&typeof n!=`function`?(r=n,n=t):i=t;let a=CA(i),o=r?-1:1;s(e,void 0,[])();function s(e,i,c){let l=e&&typeof e==`object`?e:{};if(typeof l.type==`string`){let t=typeof l.tagName==`string`?l.tagName:typeof l.name==`string`?l.name:void 0;Object.defineProperty(u,"name",{value:`node (`+AA(e.type+(t?`<`+t+`>`:``))+`)`})}return u;function u(){let l=jA,u,d,f;if((!t||a(e,i,c[c.length-1]||void 0))&&(l=NA(n(e,c)),l[0]===!1))return l;if(`children`in e&&e.children){let t=e;if(t.children&&l[0]!==`skip`)for(d=(r?t.children.length:-1)+o,f=c.concat(t);d>-1&&d<t.children.length;){let e=t.children[d];if(u=s(e,d,f)(),u[0]===!1)return u;d=typeof u[1]==`number`?u[1]:d+o}}return l}}}function NA(e){return Array.isArray(e)?e:typeof e==`number`?[!0,e]:e==null?jA:[e]}function PA(e,t,n,r){let i,a,o;typeof t==`function`&&typeof n!=`function`?(a=void 0,o=t,i=n):(a=t,o=n,i=r),MA(e,a,s,i);function s(e,t){let n=t[t.length-1],r=n?n.children.indexOf(e):void 0;return o(e,r,n)}}var FA={}.hasOwnProperty,IA={};function LA(e,t){let n=t||IA,r=new Map,i=new Map,a={all:s,applyData:zA,definitionById:r,footnoteById:i,footnoteCounts:new Map,footnoteOrder:[],handlers:{...oA,...n.handlers},one:o,options:n,patch:RA,wrap:VA};return PA(e,function(e){if(e.type===`definition`||e.type===`footnoteDefinition`){let t=e.type===`definition`?r:i,n=String(e.identifier).toUpperCase();t.has(n)||t.set(n,e)}}),a;function o(e,t){let n=e.type,r=a.handlers[n];if(FA.call(a.handlers,n)&&r)return r(a,e,t);if(a.options.passThrough&&a.options.passThrough.includes(n)){if(`children`in e){let{children:t,...n}=e,r=yA(n);return r.children=a.all(e),r}return yA(e)}return(a.options.unknownHandler||BA)(a,e,t)}function s(e){let t=[];if(`children`in e){let n=e.children,r=-1;for(;++r<n.length;){let i=a.one(n[r],e);if(i){if(r&&n[r-1].type===`break`&&(!Array.isArray(i)&&i.type===`text`&&(i.value=HA(i.value)),!Array.isArray(i)&&i.type===`element`)){let e=i.children[0];e&&e.type===`text`&&(e.value=HA(e.value))}Array.isArray(i)?t.push(...i):t.push(i)}}}return t}}function RA(e,t){e.position&&(t.position=YT(e))}function zA(e,t){let n=t;if(e&&e.data){let t=e.data.hName,r=e.data.hChildren,i=e.data.hProperties;typeof t==`string`&&(n.type===`element`?n.tagName=t:n={type:`element`,tagName:t,properties:{},children:`children`in n?n.children:[n]}),n.type===`element`&&i&&Object.assign(n.properties,yA(i)),`children`in n&&n.children&&r!=null&&(n.children=r)}return n}function BA(e,t){let n=t.data||{},r=`value`in t&&!(FA.call(n,`hProperties`)||FA.call(n,`hChildren`))?{type:`text`,value:t.value}:{type:`element`,tagName:`div`,properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function VA(e,t){let n=[],r=-1;for(t&&n.push({type:`text`,value:`
69
69
  `});++r<e.length;)r&&n.push({type:`text`,value:`
70
70
  `}),n.push(e[r]);return t&&e.length>0&&n.push({type:`text`,value:`
71
- `}),n}function BA(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function VA(e,t){let n=FA(e,t),r=n.one(e,void 0),i=bA(n),a=Array.isArray(r)?{type:`root`,children:r}:r||{type:`root`,children:[]};return i&&(`children`in a,a.children.push({type:`text`,value:`
72
- `},i)),a}function HA(e,t){return e&&`run`in e?async function(n,r){let i=VA(n,{file:r,...t});await e.run(i,r)}:function(n,r){return VA(n,{file:r,...e||t})}}function UA(e){if(e)throw e}var WA=o(((e,t)=>{var n=Object.prototype.hasOwnProperty,r=Object.prototype.toString,i=Object.defineProperty,a=Object.getOwnPropertyDescriptor,o=function(e){return typeof Array.isArray==`function`?Array.isArray(e):r.call(e)===`[object Array]`},s=function(e){if(!e||r.call(e)!==`[object Object]`)return!1;var t=n.call(e,`constructor`),i=e.constructor&&e.constructor.prototype&&n.call(e.constructor.prototype,`isPrototypeOf`);if(e.constructor&&!t&&!i)return!1;for(var a in e);return a===void 0||n.call(e,a)},c=function(e,t){i&&t.name===`__proto__`?i(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},l=function(e,t){if(t===`__proto__`){if(!n.call(e,t))return;if(a)return a(e,t).value}return e[t]};t.exports=function e(){var t,n,r,i,a,u,d=arguments[0],f=1,p=arguments.length,m=!1;for(typeof d==`boolean`&&(m=d,d=arguments[1]||{},f=2),(d==null||typeof d!=`object`&&typeof d!=`function`)&&(d={});f<p;++f)if(t=arguments[f],t!=null)for(n in t)r=l(d,n),i=l(t,n),d!==i&&(m&&i&&(s(i)||(a=o(i)))?(a?(a=!1,u=r&&o(r)?r:[]):u=r&&s(r)?r:{},c(d,{name:n,newValue:e(m,u,i)})):i!==void 0&&c(d,{name:n,newValue:i}));return d}}));function GA(e){if(typeof e!=`object`||!e)return!1;let t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function KA(){let e=[],t={run:n,use:r};return t;function n(...t){let n=-1,r=t.pop();if(typeof r!=`function`)throw TypeError(`Expected function as last argument, not `+r);i(null,...t);function i(a,...o){let s=e[++n],c=-1;if(a){r(a);return}for(;++c<t.length;)(o[c]===null||o[c]===void 0)&&(o[c]=t[c]);t=o,s?qA(s,i)(...o):r(null,...o)}}function r(n){if(typeof n!=`function`)throw TypeError("Expected `middelware` to be a function, not "+n);return e.push(n),t}}function qA(e,t){let n;return r;function r(...t){let r=e.length>t.length,o;r&&t.push(i);try{o=e.apply(this,t)}catch(e){let t=e;if(r&&n)throw t;return i(t)}r||(o&&o.then&&typeof o.then==`function`?o.then(a,i):o instanceof Error?i(o):a(o))}function i(e,...r){n||(n=!0,t(e,...r))}function a(e){i(null,e)}}var JA={basename:YA,dirname:XA,extname:ZA,join:QA,sep:`/`};function YA(e,t){if(t!==void 0&&typeof t!=`string`)throw TypeError(`"ext" argument must be a string`);tj(e);let n=0,r=-1,i=e.length,a;if(t===void 0||t.length===0||t.length>e.length){for(;i--;)if(e.codePointAt(i)===47){if(a){n=i+1;break}}else r<0&&(a=!0,r=i+1);return r<0?``:e.slice(n,r)}if(t===e)return``;let o=-1,s=t.length-1;for(;i--;)if(e.codePointAt(i)===47){if(a){n=i+1;break}}else o<0&&(a=!0,o=i+1),s>-1&&(e.codePointAt(i)===t.codePointAt(s--)?s<0&&(r=i):(s=-1,r=o));return n===r?r=o:r<0&&(r=e.length),e.slice(n,r)}function XA(e){if(tj(e),e.length===0)return`.`;let t=-1,n=e.length,r;for(;--n;)if(e.codePointAt(n)===47){if(r){t=n;break}}else r||=!0;return t<0?e.codePointAt(0)===47?`/`:`.`:t===1&&e.codePointAt(0)===47?`//`:e.slice(0,t)}function ZA(e){tj(e);let t=e.length,n=-1,r=0,i=-1,a=0,o;for(;t--;){let s=e.codePointAt(t);if(s===47){if(o){r=t+1;break}continue}n<0&&(o=!0,n=t+1),s===46?i<0?i=t:a!==1&&(a=1):i>-1&&(a=-1)}return i<0||n<0||a===0||a===1&&i===n-1&&i===r+1?``:e.slice(i,n)}function QA(...e){let t=-1,n;for(;++t<e.length;)tj(e[t]),e[t]&&(n=n===void 0?e[t]:n+`/`+e[t]);return n===void 0?`.`:$A(n)}function $A(e){tj(e);let t=e.codePointAt(0)===47,n=ej(e,!t);return n.length===0&&!t&&(n=`.`),n.length>0&&e.codePointAt(e.length-1)===47&&(n+=`/`),t?`/`+n:n}function ej(e,t){let n=``,r=0,i=-1,a=0,o=-1,s,c;for(;++o<=e.length;){if(o<e.length)s=e.codePointAt(o);else if(s===47)break;else s=47;if(s===47){if(i!==o-1&&a!==1)if(i!==o-1&&a===2){if(n.length<2||r!==2||n.codePointAt(n.length-1)!==46||n.codePointAt(n.length-2)!==46){if(n.length>2){if(c=n.lastIndexOf(`/`),c!==n.length-1){c<0?(n=``,r=0):(n=n.slice(0,c),r=n.length-1-n.lastIndexOf(`/`)),i=o,a=0;continue}}else if(n.length>0){n=``,r=0,i=o,a=0;continue}}t&&(n=n.length>0?n+`/..`:`..`,r=2)}else n.length>0?n+=`/`+e.slice(i+1,o):n=e.slice(i+1,o),r=o-i-1;i=o,a=0}else s===46&&a>-1?a++:a=-1}return n}function tj(e){if(typeof e!=`string`)throw TypeError(`Path must be a string. Received `+JSON.stringify(e))}var nj={cwd:rj};function rj(){return`/`}function ij(e){return!!(typeof e==`object`&&e&&`href`in e&&e.href&&`protocol`in e&&e.protocol&&e.auth===void 0)}function aj(e){if(typeof e==`string`)e=new URL(e);else if(!ij(e)){let t=TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw t.code=`ERR_INVALID_ARG_TYPE`,t}if(e.protocol!==`file:`){let e=TypeError(`The URL must be of scheme file`);throw e.code=`ERR_INVALID_URL_SCHEME`,e}return oj(e)}function oj(e){if(e.hostname!==``){let e=TypeError(`File URL host must be "localhost" or empty on darwin`);throw e.code=`ERR_INVALID_FILE_URL_HOST`,e}let t=e.pathname,n=-1;for(;++n<t.length;)if(t.codePointAt(n)===37&&t.codePointAt(n+1)===50){let e=t.codePointAt(n+2);if(e===70||e===102){let e=TypeError(`File URL path must not include encoded / characters`);throw e.code=`ERR_INVALID_FILE_URL_PATH`,e}}return decodeURIComponent(t)}var sj=[`history`,`path`,`basename`,`stem`,`extname`,`dirname`],cj=class{constructor(e){let t;t=e?ij(e)?{path:e}:typeof e==`string`||fj(e)?{value:e}:e:{},this.cwd=`cwd`in t?``:nj.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let n=-1;for(;++n<sj.length;){let e=sj[n];e in t&&t[e]!==void 0&&t[e]!==null&&(this[e]=e===`history`?[...t[e]]:t[e])}let r;for(r in t)sj.includes(r)||(this[r]=t[r])}get basename(){return typeof this.path==`string`?JA.basename(this.path):void 0}set basename(e){uj(e,`basename`),lj(e,`basename`),this.path=JA.join(this.dirname||``,e)}get dirname(){return typeof this.path==`string`?JA.dirname(this.path):void 0}set dirname(e){dj(this.basename,`dirname`),this.path=JA.join(e||``,this.basename)}get extname(){return typeof this.path==`string`?JA.extname(this.path):void 0}set extname(e){if(lj(e,`extname`),dj(this.dirname,`extname`),e){if(e.codePointAt(0)!==46)throw Error("`extname` must start with `.`");if(e.includes(`.`,1))throw Error("`extname` cannot contain multiple dots")}this.path=JA.join(this.dirname,this.stem+(e||``))}get path(){return this.history[this.history.length-1]}set path(e){ij(e)&&(e=aj(e)),uj(e,`path`),this.path!==e&&this.history.push(e)}get stem(){return typeof this.path==`string`?JA.basename(this.path,this.extname):void 0}set stem(e){uj(e,`stem`),lj(e,`stem`),this.path=JA.join(this.dirname||``,e+(this.extname||``))}fail(e,t,n){let r=this.message(e,t,n);throw r.fatal=!0,r}info(e,t,n){let r=this.message(e,t,n);return r.fatal=void 0,r}message(e,t,n){let r=new gE(e,t,n);return this.path&&(r.name=this.path+`:`+r.name,r.file=this.path),r.fatal=!1,this.messages.push(r),r}toString(e){return this.value===void 0?``:typeof this.value==`string`?this.value:new TextDecoder(e||void 0).decode(this.value)}};function lj(e,t){if(e&&e.includes(JA.sep))throw Error("`"+t+"` cannot be a path: did not expect `"+JA.sep+"`")}function uj(e,t){if(!e)throw Error("`"+t+"` cannot be empty")}function dj(e,t){if(!e)throw Error("Setting `"+t+"` requires `path` to be set too")}function fj(e){return!!(e&&typeof e==`object`&&`byteLength`in e&&`byteOffset`in e)}var pj=(function(e){let t=this.constructor.prototype,n=t[e],r=function(){return n.apply(r,arguments)};return Object.setPrototypeOf(r,t),r}),mj=l(WA(),1),hj={}.hasOwnProperty,gj=new class e extends pj{constructor(){super(`copy`),this.Compiler=void 0,this.Parser=void 0,this.attachers=[],this.compiler=void 0,this.freezeIndex=-1,this.frozen=void 0,this.namespace={},this.parser=void 0,this.transformers=KA()}copy(){let t=new e,n=-1;for(;++n<this.attachers.length;){let e=this.attachers[n];t.use(...e)}return t.data((0,mj.default)(!0,{},this.namespace)),t}data(e,t){return typeof e==`string`?arguments.length===2?(yj(`data`,this.frozen),this.namespace[e]=t,this):hj.call(this.namespace,e)&&this.namespace[e]||void 0:e?(yj(`data`,this.frozen),this.namespace=e,this):this.namespace}freeze(){if(this.frozen)return this;let e=this;for(;++this.freezeIndex<this.attachers.length;){let[t,...n]=this.attachers[this.freezeIndex];if(n[0]===!1)continue;n[0]===!0&&(n[0]=void 0);let r=t.call(e,...n);typeof r==`function`&&this.transformers.use(r)}return this.frozen=!0,this.freezeIndex=1/0,this}parse(e){this.freeze();let t=Sj(e),n=this.parser||this.Parser;return _j(`parse`,n),n(String(t),t)}process(e,t){let n=this;return this.freeze(),_j(`process`,this.parser||this.Parser),vj(`process`,this.compiler||this.Compiler),t?r(void 0,t):new Promise(r);function r(r,i){let a=Sj(e),o=n.parse(a);n.run(o,a,function(e,t,r){if(e||!t||!r)return s(e);let i=t,a=n.stringify(i,r);wj(a)?r.value=a:r.result=a,s(e,r)});function s(e,n){e||!n?i(e):r?r(n):t(void 0,n)}}}processSync(e){let t=!1,n;return this.freeze(),_j(`processSync`,this.parser||this.Parser),vj(`processSync`,this.compiler||this.Compiler),this.process(e,r),xj(`processSync`,`process`,t),n;function r(e,r){t=!0,UA(e),n=r}}run(e,t,n){bj(e),this.freeze();let r=this.transformers;return!n&&typeof t==`function`&&(n=t,t=void 0),n?i(void 0,n):new Promise(i);function i(i,a){let o=Sj(t);r.run(e,o,s);function s(t,r,o){let s=r||e;t?a(t):i?i(s):n(void 0,s,o)}}}runSync(e,t){let n=!1,r;return this.run(e,t,i),xj(`runSync`,`run`,n),r;function i(e,t){UA(e),r=t,n=!0}}stringify(e,t){this.freeze();let n=Sj(t),r=this.compiler||this.Compiler;return vj(`stringify`,r),bj(e),r(e,n)}use(e,...t){let n=this.attachers,r=this.namespace;if(yj(`use`,this.frozen),e!=null)if(typeof e==`function`)s(e,t);else if(typeof e==`object`)Array.isArray(e)?o(e):a(e);else throw TypeError("Expected usable value, not `"+e+"`");return this;function i(e){if(typeof e==`function`)s(e,[]);else if(typeof e==`object`)if(Array.isArray(e)){let[t,...n]=e;s(t,n)}else a(e);else throw TypeError("Expected usable value, not `"+e+"`")}function a(e){if(!(`plugins`in e)&&!(`settings`in e))throw Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");o(e.plugins),e.settings&&(r.settings=(0,mj.default)(!0,r.settings,e.settings))}function o(e){let t=-1;if(e!=null)if(Array.isArray(e))for(;++t<e.length;){let n=e[t];i(n)}else throw TypeError("Expected a list of plugins, not `"+e+"`")}function s(e,t){let r=-1,i=-1;for(;++r<n.length;)if(n[r][0]===e){i=r;break}if(i===-1)n.push([e,...t]);else if(t.length>0){let[r,...a]=t,o=n[i][1];GA(o)&&GA(r)&&(r=(0,mj.default)(!0,o,r)),n[i]=[e,r,...a]}}}}().freeze();function _j(e,t){if(typeof t!=`function`)throw TypeError("Cannot `"+e+"` without `parser`")}function vj(e,t){if(typeof t!=`function`)throw TypeError("Cannot `"+e+"` without `compiler`")}function yj(e,t){if(t)throw Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function bj(e){if(!GA(e)||typeof e.type!=`string`)throw TypeError("Expected node, got `"+e+"`")}function xj(e,t,n){if(!n)throw Error("`"+e+"` finished async. Use `"+t+"` instead")}function Sj(e){return Cj(e)?e:new cj(e)}function Cj(e){return!!(e&&typeof e==`object`&&`message`in e&&`messages`in e)}function wj(e){return typeof e==`string`||Tj(e)}function Tj(e){return!!(e&&typeof e==`object`&&`byteLength`in e&&`byteOffset`in e)}var Ej=[],Dj={allowDangerousHtml:!0},Oj=/^(https?|ircs?|mailto|xmpp)$/i,kj=[{from:`astPlugins`,id:`remove-buggy-html-in-markdown-parser`},{from:`allowDangerousHtml`,id:`remove-buggy-html-in-markdown-parser`},{from:`allowNode`,id:`replace-allownode-allowedtypes-and-disallowedtypes`,to:`allowElement`},{from:`allowedTypes`,id:`replace-allownode-allowedtypes-and-disallowedtypes`,to:`allowedElements`},{from:`className`,id:`remove-classname`},{from:`disallowedTypes`,id:`replace-allownode-allowedtypes-and-disallowedtypes`,to:`disallowedElements`},{from:`escapeHtml`,id:`remove-buggy-html-in-markdown-parser`},{from:`includeElementIndex`,id:`#remove-includeelementindex`},{from:`includeNodeIndex`,id:`change-includenodeindex-to-includeelementindex`},{from:`linkTarget`,id:`remove-linktarget`},{from:`plugins`,id:`change-plugins-to-remarkplugins`,to:`remarkPlugins`},{from:`rawSourcePos`,id:`#remove-rawsourcepos`},{from:`renderers`,id:`change-renderers-to-components`,to:`components`},{from:`source`,id:`change-source-to-children`,to:`children`},{from:`sourcePos`,id:`#remove-sourcepos`},{from:`transformImageUri`,id:`#add-urltransform`,to:`urlTransform`},{from:`transformLinkUri`,id:`#add-urltransform`,to:`urlTransform`}];function Aj(e){let t=jj(e),n=Mj(e);return Nj(t.runSync(t.parse(n),n),e)}function jj(e){let t=e.rehypePlugins||Ej,n=e.remarkPlugins||Ej,r=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...Dj}:Dj;return gj().use(Mk).use(n).use(HA,r).use(t)}function Mj(e){let t=e.children||``,n=new cj;return typeof t==`string`?n.value=t:``+t,n}function Nj(e,t){let n=t.allowedElements,r=t.allowElement,i=t.components,a=t.disallowedElements,o=t.skipHtml,s=t.unwrapDisallowed,c=t.urlTransform||Pj;for(let e of kj)Object.hasOwn(t,e.from)&&``+e.from+(e.to?"use `"+e.to+"` instead":`remove it`)+e.id;return MA(e,l),CE(e,{Fragment:G.Fragment,components:i,ignoreInvalidStyle:!0,jsx:G.jsx,jsxs:G.jsxs,passKeys:!0,passNode:!0});function l(e,t,i){if(e.type===`raw`&&i&&typeof t==`number`)return o?i.children.splice(t,1):i.children[t]={type:`text`,value:e.value},t;if(e.type===`element`){let t;for(t in jE)if(Object.hasOwn(jE,t)&&Object.hasOwn(e.properties,t)){let n=e.properties[t],r=jE[t];(r===null||r.includes(e.tagName))&&(e.properties[t]=c(String(n||``),t,e))}}if(e.type===`element`){let o=n?!n.includes(e.tagName):a?a.includes(e.tagName):!1;if(!o&&r&&typeof t==`number`&&(o=!r(e,t,i)),o&&i&&typeof t==`number`)return s&&e.children?i.children.splice(t,1,...e.children):i.children.splice(t,1),t}}}function Pj(e){let t=e.indexOf(`:`),n=e.indexOf(`?`),r=e.indexOf(`#`),i=e.indexOf(`/`);return t===-1||i!==-1&&t>i||n!==-1&&t>n||r!==-1&&t>r||Oj.test(e.slice(0,t))?e:``}function Fj(e,t){let n=String(e);if(typeof t!=`string`)throw TypeError(`Expected character`);let r=0,i=n.indexOf(t);for(;i!==-1;)r++,i=n.indexOf(t,i+t.length);return r}function Ij(e){if(typeof e!=`string`)throw TypeError(`Expected a string`);return e.replace(/[|\\{}()[\]^$+*?.]/g,`\\$&`).replace(/-/g,`\\x2d`)}function Lj(e,t,n){let r=xA((n||{}).ignore||[]),i=Rj(t),a=-1;for(;++a<i.length;)AA(e,`text`,o);function o(e,t){let n=-1,i;for(;++n<t.length;){let e=t[n],a=i?i.children:void 0;if(r(e,a?a.indexOf(e):void 0,i))return;i=e}if(i)return s(e,t)}function s(e,t){let n=t[t.length-1],r=i[a][0],o=i[a][1],s=0,c=n.children.indexOf(e),l=!1,u=[];r.lastIndex=0;let d=r.exec(e.value);for(;d;){let n=d.index,i={index:d.index,input:d.input,stack:[...t,e]},a=o(...d,i);if(typeof a==`string`&&(a=a.length>0?{type:`text`,value:a}:void 0),a===!1?r.lastIndex=n+1:(s!==n&&u.push({type:`text`,value:e.value.slice(s,n)}),Array.isArray(a)?u.push(...a):a&&u.push(a),s=n+d[0].length,l=!0),!r.global)break;d=r.exec(e.value)}return l?(s<e.value.length&&u.push({type:`text`,value:e.value.slice(s)}),n.children.splice(c,1,...u)):u=[e],c+u.length}}function Rj(e){let t=[];if(!Array.isArray(e))throw TypeError(`Expected find and replace tuple or list of tuples`);let n=!e[0]||Array.isArray(e[0])?e:[e],r=-1;for(;++r<n.length;){let e=n[r];t.push([zj(e[0]),Bj(e[1])])}return t}function zj(e){return typeof e==`string`?new RegExp(Ij(e),`g`):e}function Bj(e){return typeof e==`function`?e:function(){return e}}var Vj=`phrasing`,Hj=[`autolink`,`link`,`image`,`label`];function Uj(){return{transforms:[Zj],enter:{literalAutolink:Gj,literalAutolinkEmail:Kj,literalAutolinkHttp:Kj,literalAutolinkWww:Kj},exit:{literalAutolink:Xj,literalAutolinkEmail:Yj,literalAutolinkHttp:qj,literalAutolinkWww:Jj}}}function Wj(){return{unsafe:[{character:`@`,before:`[+\\-.\\w]`,after:`[\\-.\\w]`,inConstruct:Vj,notInConstruct:Hj},{character:`.`,before:`[Ww]`,after:`[\\-.\\w]`,inConstruct:Vj,notInConstruct:Hj},{character:`:`,before:`[ps]`,after:`\\/`,inConstruct:Vj,notInConstruct:Hj}]}}function Gj(e){this.enter({type:`link`,title:null,url:``,children:[]},e)}function Kj(e){this.config.enter.autolinkProtocol.call(this,e)}function qj(e){this.config.exit.autolinkProtocol.call(this,e)}function Jj(e){this.config.exit.data.call(this,e);let t=this.stack[this.stack.length-1];t.type,t.url=`http://`+this.sliceSerialize(e)}function Yj(e){this.config.exit.autolinkEmail.call(this,e)}function Xj(e){this.exit(e)}function Zj(e){Lj(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,Qj],[/(?<=^|\s|\p{P}|\p{S})([-.\w+]+)@([-\w]+(?:\.[-\w]+)+)/gu,$j]],{ignore:[`link`,`linkReference`]})}function Qj(e,t,n,r,i){let a=``;if(!nM(i)||(/^w/i.test(t)&&(n=t+n,t=``,a=`http://`),!eM(n)))return!1;let o=tM(n+r);if(!o[0])return!1;let s={type:`link`,title:null,url:a+t+o[0],children:[{type:`text`,value:t+o[0]}]};return o[1]?[s,{type:`text`,value:o[1]}]:s}function $j(e,t,n,r){return!nM(r,!0)||/[-\d_]$/.test(n)?!1:{type:`link`,title:null,url:`mailto:`+t+`@`+n,children:[{type:`text`,value:t+`@`+n}]}}function eM(e){let t=e.split(`.`);return!(t.length<2||t[t.length-1]&&(/_/.test(t[t.length-1])||!/[a-zA-Z\d]/.test(t[t.length-1]))||t[t.length-2]&&(/_/.test(t[t.length-2])||!/[a-zA-Z\d]/.test(t[t.length-2])))}function tM(e){let t=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!t)return[e,void 0];e=e.slice(0,t.index);let n=t[0],r=n.indexOf(`)`),i=Fj(e,`(`),a=Fj(e,`)`);for(;r!==-1&&i>a;)e+=n.slice(0,r+1),n=n.slice(r+1),r=n.indexOf(`)`),a++;return[e,n]}function nM(e,t){let n=e.input.charCodeAt(e.index-1);return(e.index===0||iD(n)||rD(n))&&(!t||n!==47)}fM.peek=dM;function rM(){this.buffer()}function iM(e){this.enter({type:`footnoteReference`,identifier:``,label:``},e)}function aM(){this.buffer()}function oM(e){this.enter({type:`footnoteDefinition`,identifier:``,label:``,children:[]},e)}function sM(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=KE(this.sliceSerialize(e)).toLowerCase(),n.label=t}function cM(e){this.exit(e)}function lM(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=KE(this.sliceSerialize(e)).toLowerCase(),n.label=t}function uM(e){this.exit(e)}function dM(){return`[`}function fM(e,t,n,r){let i=n.createTracker(r),a=i.move(`[^`),o=n.enter(`footnoteReference`),s=n.enter(`reference`);return a+=i.move(n.safe(n.associationId(e),{after:`]`,before:a})),s(),o(),a+=i.move(`]`),a}function pM(){return{enter:{gfmFootnoteCallString:rM,gfmFootnoteCall:iM,gfmFootnoteDefinitionLabelString:aM,gfmFootnoteDefinition:oM},exit:{gfmFootnoteCallString:sM,gfmFootnoteCall:cM,gfmFootnoteDefinitionLabelString:lM,gfmFootnoteDefinition:uM}}}function mM(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:n,footnoteReference:fM},unsafe:[{character:`[`,inConstruct:[`label`,`phrasing`,`reference`]}]};function n(e,n,r,i){let a=r.createTracker(i),o=a.move(`[^`),s=r.enter(`footnoteDefinition`),c=r.enter(`label`);return o+=a.move(r.safe(r.associationId(e),{before:o,after:`]`})),c(),o+=a.move(`]:`),e.children&&e.children.length>0&&(a.shift(4),o+=a.move((t?`
73
- `:` `)+r.indentLines(r.containerFlow(e,a.current()),t?gM:hM))),s(),o}}function hM(e,t,n){return t===0?e:gM(e,t,n)}function gM(e,t,n){return(n?``:` `)+e}var _M=[`autolink`,`destinationLiteral`,`destinationRaw`,`reference`,`titleQuote`,`titleApostrophe`];SM.peek=CM;function vM(){return{canContainEols:[`delete`],enter:{strikethrough:bM},exit:{strikethrough:xM}}}function yM(){return{unsafe:[{character:`~`,inConstruct:`phrasing`,notInConstruct:_M}],handlers:{delete:SM}}}function bM(e){this.enter({type:`delete`,children:[]},e)}function xM(e){this.exit(e)}function SM(e,t,n,r){let i=n.createTracker(r),a=n.enter(`strikethrough`),o=i.move(`~~`);return o+=n.containerPhrasing(e,{...i.current(),before:o,after:`~`}),o+=i.move(`~~`),a(),o}function CM(){return`~`}function wM(e){return e.length}function TM(e,t){let n=t||{},r=(n.align||[]).concat(),i=n.stringLength||wM,a=[],o=[],s=[],c=[],l=0,u=-1;for(;++u<e.length;){let t=[],r=[],a=-1;for(e[u].length>l&&(l=e[u].length);++a<e[u].length;){let o=EM(e[u][a]);if(n.alignDelimiters!==!1){let e=i(o);r[a]=e,(c[a]===void 0||e>c[a])&&(c[a]=e)}t.push(o)}o[u]=t,s[u]=r}let d=-1;if(typeof r==`object`&&`length`in r)for(;++d<l;)a[d]=DM(r[d]);else{let e=DM(r);for(;++d<l;)a[d]=e}d=-1;let f=[],p=[];for(;++d<l;){let e=a[d],t=``,r=``;e===99?(t=`:`,r=`:`):e===108?t=`:`:e===114&&(r=`:`);let i=n.alignDelimiters===!1?1:Math.max(1,c[d]-t.length-r.length),o=t+`-`.repeat(i)+r;n.alignDelimiters!==!1&&(i=t.length+i+r.length,i>c[d]&&(c[d]=i),p[d]=i),f[d]=o}o.splice(1,0,f),s.splice(1,0,p),u=-1;let m=[];for(;++u<o.length;){let e=o[u],t=s[u];d=-1;let r=[];for(;++d<l;){let i=e[d]||``,o=``,s=``;if(n.alignDelimiters!==!1){let e=c[d]-(t[d]||0),n=a[d];n===114?o=` `.repeat(e):n===99?e%2?(o=` `.repeat(e/2+.5),s=` `.repeat(e/2-.5)):(o=` `.repeat(e/2),s=o):s=` `.repeat(e)}n.delimiterStart!==!1&&!d&&r.push(`|`),n.padding!==!1&&(n.alignDelimiters!==!1||i!==``)&&(n.delimiterStart!==!1||d)&&r.push(` `),n.alignDelimiters!==!1&&r.push(o),r.push(i),n.alignDelimiters!==!1&&r.push(s),n.padding!==!1&&r.push(` `),(n.delimiterEnd!==!1||d!==l-1)&&r.push(`|`)}m.push(n.delimiterEnd===!1?r.join(``).replace(/ +$/,``):r.join(``))}return m.join(`
74
- `)}function EM(e){return e==null?``:String(e)}function DM(e){let t=typeof e==`string`?e.codePointAt(0):0;return t===67||t===99?99:t===76||t===108?108:t===82||t===114?114:0}function OM(e,t,n,r){let i=n.enter(`blockquote`),a=n.createTracker(r);a.move(`> `),a.shift(2);let o=n.indentLines(n.containerFlow(e,a.current()),kM);return i(),o}function kM(e,t,n){return`>`+(n?``:` `)+e}function AM(e,t){return jM(e,t.inConstruct,!0)&&!jM(e,t.notInConstruct,!1)}function jM(e,t,n){if(typeof t==`string`&&(t=[t]),!t||t.length===0)return n;let r=-1;for(;++r<t.length;)if(e.includes(t[r]))return!0;return!1}function MM(e,t,n,r){let i=-1;for(;++i<n.unsafe.length;)if(n.unsafe[i].character===`
75
- `&&AM(n.stack,n.unsafe[i]))return/[ \t]/.test(r.before)?``:` `;return`\\
76
- `}function NM(e,t){let n=String(e),r=n.indexOf(t),i=r,a=0,o=0;if(typeof t!=`string`)throw TypeError(`Expected substring`);for(;r!==-1;)r===i?++a>o&&(o=a):a=1,i=r+t.length,r=n.indexOf(t,i);return o}function PM(e,t){return!!(t.options.fences===!1&&e.value&&!e.lang&&/[^ \r\n]/.test(e.value)&&!/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(e.value))}function FM(e){let t=e.options.fence||"`";if(t!=="`"&&t!==`~`)throw Error("Cannot serialize code with `"+t+"` for `options.fence`, expected `` ` `` or `~`");return t}function IM(e,t,n,r){let i=FM(n),a=e.value||``,o=i==="`"?`GraveAccent`:`Tilde`;if(PM(e,n)){let e=n.enter(`codeIndented`),t=n.indentLines(a,LM);return e(),t}let s=n.createTracker(r),c=i.repeat(Math.max(NM(a,i)+1,3)),l=n.enter(`codeFenced`),u=s.move(c);if(e.lang){let t=n.enter(`codeFencedLang${o}`);u+=s.move(n.safe(e.lang,{before:u,after:` `,encode:["`"],...s.current()})),t()}if(e.lang&&e.meta){let t=n.enter(`codeFencedMeta${o}`);u+=s.move(` `),u+=s.move(n.safe(e.meta,{before:u,after:`
71
+ `}),n}function HA(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function UA(e,t){let n=LA(e,t),r=n.one(e,void 0),i=SA(n),a=Array.isArray(r)?{type:`root`,children:r}:r||{type:`root`,children:[]};return i&&(`children`in a,a.children.push({type:`text`,value:`
72
+ `},i)),a}function WA(e,t){return e&&`run`in e?async function(n,r){let i=UA(n,{file:r,...t});await e.run(i,r)}:function(n,r){return UA(n,{file:r,...e||t})}}function GA(e){if(e)throw e}var KA=o(((e,t)=>{var n=Object.prototype.hasOwnProperty,r=Object.prototype.toString,i=Object.defineProperty,a=Object.getOwnPropertyDescriptor,o=function(e){return typeof Array.isArray==`function`?Array.isArray(e):r.call(e)===`[object Array]`},s=function(e){if(!e||r.call(e)!==`[object Object]`)return!1;var t=n.call(e,`constructor`),i=e.constructor&&e.constructor.prototype&&n.call(e.constructor.prototype,`isPrototypeOf`);if(e.constructor&&!t&&!i)return!1;for(var a in e);return a===void 0||n.call(e,a)},c=function(e,t){i&&t.name===`__proto__`?i(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},l=function(e,t){if(t===`__proto__`){if(!n.call(e,t))return;if(a)return a(e,t).value}return e[t]};t.exports=function e(){var t,n,r,i,a,u,d=arguments[0],f=1,p=arguments.length,m=!1;for(typeof d==`boolean`&&(m=d,d=arguments[1]||{},f=2),(d==null||typeof d!=`object`&&typeof d!=`function`)&&(d={});f<p;++f)if(t=arguments[f],t!=null)for(n in t)r=l(d,n),i=l(t,n),d!==i&&(m&&i&&(s(i)||(a=o(i)))?(a?(a=!1,u=r&&o(r)?r:[]):u=r&&s(r)?r:{},c(d,{name:n,newValue:e(m,u,i)})):i!==void 0&&c(d,{name:n,newValue:i}));return d}}));function qA(e){if(typeof e!=`object`||!e)return!1;let t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function JA(){let e=[],t={run:n,use:r};return t;function n(...t){let n=-1,r=t.pop();if(typeof r!=`function`)throw TypeError(`Expected function as last argument, not `+r);i(null,...t);function i(a,...o){let s=e[++n],c=-1;if(a){r(a);return}for(;++c<t.length;)(o[c]===null||o[c]===void 0)&&(o[c]=t[c]);t=o,s?YA(s,i)(...o):r(null,...o)}}function r(n){if(typeof n!=`function`)throw TypeError("Expected `middelware` to be a function, not "+n);return e.push(n),t}}function YA(e,t){let n;return r;function r(...t){let r=e.length>t.length,o;r&&t.push(i);try{o=e.apply(this,t)}catch(e){let t=e;if(r&&n)throw t;return i(t)}r||(o&&o.then&&typeof o.then==`function`?o.then(a,i):o instanceof Error?i(o):a(o))}function i(e,...r){n||(n=!0,t(e,...r))}function a(e){i(null,e)}}var XA={basename:ZA,dirname:QA,extname:$A,join:ej,sep:`/`};function ZA(e,t){if(t!==void 0&&typeof t!=`string`)throw TypeError(`"ext" argument must be a string`);rj(e);let n=0,r=-1,i=e.length,a;if(t===void 0||t.length===0||t.length>e.length){for(;i--;)if(e.codePointAt(i)===47){if(a){n=i+1;break}}else r<0&&(a=!0,r=i+1);return r<0?``:e.slice(n,r)}if(t===e)return``;let o=-1,s=t.length-1;for(;i--;)if(e.codePointAt(i)===47){if(a){n=i+1;break}}else o<0&&(a=!0,o=i+1),s>-1&&(e.codePointAt(i)===t.codePointAt(s--)?s<0&&(r=i):(s=-1,r=o));return n===r?r=o:r<0&&(r=e.length),e.slice(n,r)}function QA(e){if(rj(e),e.length===0)return`.`;let t=-1,n=e.length,r;for(;--n;)if(e.codePointAt(n)===47){if(r){t=n;break}}else r||=!0;return t<0?e.codePointAt(0)===47?`/`:`.`:t===1&&e.codePointAt(0)===47?`//`:e.slice(0,t)}function $A(e){rj(e);let t=e.length,n=-1,r=0,i=-1,a=0,o;for(;t--;){let s=e.codePointAt(t);if(s===47){if(o){r=t+1;break}continue}n<0&&(o=!0,n=t+1),s===46?i<0?i=t:a!==1&&(a=1):i>-1&&(a=-1)}return i<0||n<0||a===0||a===1&&i===n-1&&i===r+1?``:e.slice(i,n)}function ej(...e){let t=-1,n;for(;++t<e.length;)rj(e[t]),e[t]&&(n=n===void 0?e[t]:n+`/`+e[t]);return n===void 0?`.`:tj(n)}function tj(e){rj(e);let t=e.codePointAt(0)===47,n=nj(e,!t);return n.length===0&&!t&&(n=`.`),n.length>0&&e.codePointAt(e.length-1)===47&&(n+=`/`),t?`/`+n:n}function nj(e,t){let n=``,r=0,i=-1,a=0,o=-1,s,c;for(;++o<=e.length;){if(o<e.length)s=e.codePointAt(o);else if(s===47)break;else s=47;if(s===47){if(i!==o-1&&a!==1)if(i!==o-1&&a===2){if(n.length<2||r!==2||n.codePointAt(n.length-1)!==46||n.codePointAt(n.length-2)!==46){if(n.length>2){if(c=n.lastIndexOf(`/`),c!==n.length-1){c<0?(n=``,r=0):(n=n.slice(0,c),r=n.length-1-n.lastIndexOf(`/`)),i=o,a=0;continue}}else if(n.length>0){n=``,r=0,i=o,a=0;continue}}t&&(n=n.length>0?n+`/..`:`..`,r=2)}else n.length>0?n+=`/`+e.slice(i+1,o):n=e.slice(i+1,o),r=o-i-1;i=o,a=0}else s===46&&a>-1?a++:a=-1}return n}function rj(e){if(typeof e!=`string`)throw TypeError(`Path must be a string. Received `+JSON.stringify(e))}var ij={cwd:aj};function aj(){return`/`}function oj(e){return!!(typeof e==`object`&&e&&`href`in e&&e.href&&`protocol`in e&&e.protocol&&e.auth===void 0)}function sj(e){if(typeof e==`string`)e=new URL(e);else if(!oj(e)){let t=TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw t.code=`ERR_INVALID_ARG_TYPE`,t}if(e.protocol!==`file:`){let e=TypeError(`The URL must be of scheme file`);throw e.code=`ERR_INVALID_URL_SCHEME`,e}return cj(e)}function cj(e){if(e.hostname!==``){let e=TypeError(`File URL host must be "localhost" or empty on darwin`);throw e.code=`ERR_INVALID_FILE_URL_HOST`,e}let t=e.pathname,n=-1;for(;++n<t.length;)if(t.codePointAt(n)===37&&t.codePointAt(n+1)===50){let e=t.codePointAt(n+2);if(e===70||e===102){let e=TypeError(`File URL path must not include encoded / characters`);throw e.code=`ERR_INVALID_FILE_URL_PATH`,e}}return decodeURIComponent(t)}var lj=[`history`,`path`,`basename`,`stem`,`extname`,`dirname`],uj=class{constructor(e){let t;t=e?oj(e)?{path:e}:typeof e==`string`||mj(e)?{value:e}:e:{},this.cwd=`cwd`in t?``:ij.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let n=-1;for(;++n<lj.length;){let e=lj[n];e in t&&t[e]!==void 0&&t[e]!==null&&(this[e]=e===`history`?[...t[e]]:t[e])}let r;for(r in t)lj.includes(r)||(this[r]=t[r])}get basename(){return typeof this.path==`string`?XA.basename(this.path):void 0}set basename(e){fj(e,`basename`),dj(e,`basename`),this.path=XA.join(this.dirname||``,e)}get dirname(){return typeof this.path==`string`?XA.dirname(this.path):void 0}set dirname(e){pj(this.basename,`dirname`),this.path=XA.join(e||``,this.basename)}get extname(){return typeof this.path==`string`?XA.extname(this.path):void 0}set extname(e){if(dj(e,`extname`),pj(this.dirname,`extname`),e){if(e.codePointAt(0)!==46)throw Error("`extname` must start with `.`");if(e.includes(`.`,1))throw Error("`extname` cannot contain multiple dots")}this.path=XA.join(this.dirname,this.stem+(e||``))}get path(){return this.history[this.history.length-1]}set path(e){oj(e)&&(e=sj(e)),fj(e,`path`),this.path!==e&&this.history.push(e)}get stem(){return typeof this.path==`string`?XA.basename(this.path,this.extname):void 0}set stem(e){fj(e,`stem`),dj(e,`stem`),this.path=XA.join(this.dirname||``,e+(this.extname||``))}fail(e,t,n){let r=this.message(e,t,n);throw r.fatal=!0,r}info(e,t,n){let r=this.message(e,t,n);return r.fatal=void 0,r}message(e,t,n){let r=new eE(e,t,n);return this.path&&(r.name=this.path+`:`+r.name,r.file=this.path),r.fatal=!1,this.messages.push(r),r}toString(e){return this.value===void 0?``:typeof this.value==`string`?this.value:new TextDecoder(e||void 0).decode(this.value)}};function dj(e,t){if(e&&e.includes(XA.sep))throw Error("`"+t+"` cannot be a path: did not expect `"+XA.sep+"`")}function fj(e,t){if(!e)throw Error("`"+t+"` cannot be empty")}function pj(e,t){if(!e)throw Error("Setting `"+t+"` requires `path` to be set too")}function mj(e){return!!(e&&typeof e==`object`&&`byteLength`in e&&`byteOffset`in e)}var hj=(function(e){let t=this.constructor.prototype,n=t[e],r=function(){return n.apply(r,arguments)};return Object.setPrototypeOf(r,t),r}),gj=l(KA(),1),_j={}.hasOwnProperty,vj=new class e extends hj{constructor(){super(`copy`),this.Compiler=void 0,this.Parser=void 0,this.attachers=[],this.compiler=void 0,this.freezeIndex=-1,this.frozen=void 0,this.namespace={},this.parser=void 0,this.transformers=JA()}copy(){let t=new e,n=-1;for(;++n<this.attachers.length;){let e=this.attachers[n];t.use(...e)}return t.data((0,gj.default)(!0,{},this.namespace)),t}data(e,t){return typeof e==`string`?arguments.length===2?(xj(`data`,this.frozen),this.namespace[e]=t,this):_j.call(this.namespace,e)&&this.namespace[e]||void 0:e?(xj(`data`,this.frozen),this.namespace=e,this):this.namespace}freeze(){if(this.frozen)return this;let e=this;for(;++this.freezeIndex<this.attachers.length;){let[t,...n]=this.attachers[this.freezeIndex];if(n[0]===!1)continue;n[0]===!0&&(n[0]=void 0);let r=t.call(e,...n);typeof r==`function`&&this.transformers.use(r)}return this.frozen=!0,this.freezeIndex=1/0,this}parse(e){this.freeze();let t=wj(e),n=this.parser||this.Parser;return yj(`parse`,n),n(String(t),t)}process(e,t){let n=this;return this.freeze(),yj(`process`,this.parser||this.Parser),bj(`process`,this.compiler||this.Compiler),t?r(void 0,t):new Promise(r);function r(r,i){let a=wj(e),o=n.parse(a);n.run(o,a,function(e,t,r){if(e||!t||!r)return s(e);let i=t,a=n.stringify(i,r);Ej(a)?r.value=a:r.result=a,s(e,r)});function s(e,n){e||!n?i(e):r?r(n):t(void 0,n)}}}processSync(e){let t=!1,n;return this.freeze(),yj(`processSync`,this.parser||this.Parser),bj(`processSync`,this.compiler||this.Compiler),this.process(e,r),Cj(`processSync`,`process`,t),n;function r(e,r){t=!0,GA(e),n=r}}run(e,t,n){Sj(e),this.freeze();let r=this.transformers;return!n&&typeof t==`function`&&(n=t,t=void 0),n?i(void 0,n):new Promise(i);function i(i,a){let o=wj(t);r.run(e,o,s);function s(t,r,o){let s=r||e;t?a(t):i?i(s):n(void 0,s,o)}}}runSync(e,t){let n=!1,r;return this.run(e,t,i),Cj(`runSync`,`run`,n),r;function i(e,t){GA(e),r=t,n=!0}}stringify(e,t){this.freeze();let n=wj(t),r=this.compiler||this.Compiler;return bj(`stringify`,r),Sj(e),r(e,n)}use(e,...t){let n=this.attachers,r=this.namespace;if(xj(`use`,this.frozen),e!=null)if(typeof e==`function`)s(e,t);else if(typeof e==`object`)Array.isArray(e)?o(e):a(e);else throw TypeError("Expected usable value, not `"+e+"`");return this;function i(e){if(typeof e==`function`)s(e,[]);else if(typeof e==`object`)if(Array.isArray(e)){let[t,...n]=e;s(t,n)}else a(e);else throw TypeError("Expected usable value, not `"+e+"`")}function a(e){if(!(`plugins`in e)&&!(`settings`in e))throw Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");o(e.plugins),e.settings&&(r.settings=(0,gj.default)(!0,r.settings,e.settings))}function o(e){let t=-1;if(e!=null)if(Array.isArray(e))for(;++t<e.length;){let n=e[t];i(n)}else throw TypeError("Expected a list of plugins, not `"+e+"`")}function s(e,t){let r=-1,i=-1;for(;++r<n.length;)if(n[r][0]===e){i=r;break}if(i===-1)n.push([e,...t]);else if(t.length>0){let[r,...a]=t,o=n[i][1];qA(o)&&qA(r)&&(r=(0,gj.default)(!0,o,r)),n[i]=[e,r,...a]}}}}().freeze();function yj(e,t){if(typeof t!=`function`)throw TypeError("Cannot `"+e+"` without `parser`")}function bj(e,t){if(typeof t!=`function`)throw TypeError("Cannot `"+e+"` without `compiler`")}function xj(e,t){if(t)throw Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function Sj(e){if(!qA(e)||typeof e.type!=`string`)throw TypeError("Expected node, got `"+e+"`")}function Cj(e,t,n){if(!n)throw Error("`"+e+"` finished async. Use `"+t+"` instead")}function wj(e){return Tj(e)?e:new uj(e)}function Tj(e){return!!(e&&typeof e==`object`&&`message`in e&&`messages`in e)}function Ej(e){return typeof e==`string`||Dj(e)}function Dj(e){return!!(e&&typeof e==`object`&&`byteLength`in e&&`byteOffset`in e)}var Oj=[],kj={allowDangerousHtml:!0},Aj=/^(https?|ircs?|mailto|xmpp)$/i,jj=[{from:`astPlugins`,id:`remove-buggy-html-in-markdown-parser`},{from:`allowDangerousHtml`,id:`remove-buggy-html-in-markdown-parser`},{from:`allowNode`,id:`replace-allownode-allowedtypes-and-disallowedtypes`,to:`allowElement`},{from:`allowedTypes`,id:`replace-allownode-allowedtypes-and-disallowedtypes`,to:`allowedElements`},{from:`className`,id:`remove-classname`},{from:`disallowedTypes`,id:`replace-allownode-allowedtypes-and-disallowedtypes`,to:`disallowedElements`},{from:`escapeHtml`,id:`remove-buggy-html-in-markdown-parser`},{from:`includeElementIndex`,id:`#remove-includeelementindex`},{from:`includeNodeIndex`,id:`change-includenodeindex-to-includeelementindex`},{from:`linkTarget`,id:`remove-linktarget`},{from:`plugins`,id:`change-plugins-to-remarkplugins`,to:`remarkPlugins`},{from:`rawSourcePos`,id:`#remove-rawsourcepos`},{from:`renderers`,id:`change-renderers-to-components`,to:`components`},{from:`source`,id:`change-source-to-children`,to:`children`},{from:`sourcePos`,id:`#remove-sourcepos`},{from:`transformImageUri`,id:`#add-urltransform`,to:`urlTransform`},{from:`transformLinkUri`,id:`#add-urltransform`,to:`urlTransform`}];function Mj(e){let t=Nj(e),n=Pj(e);return Fj(t.runSync(t.parse(n),n),e)}function Nj(e){let t=e.rehypePlugins||Oj,n=e.remarkPlugins||Oj,r=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...kj}:kj;return vj().use(kk).use(n).use(WA,r).use(t)}function Pj(e){let t=e.children||``,n=new uj;return typeof t==`string`?n.value=t:``+t,n}function Fj(e,t){let n=t.allowedElements,r=t.allowElement,i=t.components,a=t.disallowedElements,o=t.skipHtml,s=t.unwrapDisallowed,c=t.urlTransform||Ij;for(let e of jj)Object.hasOwn(t,e.from)&&``+e.from+(e.to?"use `"+e.to+"` instead":`remove it`)+e.id;return PA(e,l),sE(e,{Fragment:G.Fragment,components:i,ignoreInvalidStyle:!0,jsx:G.jsx,jsxs:G.jsxs,passKeys:!0,passNode:!0});function l(e,t,i){if(e.type===`raw`&&i&&typeof t==`number`)return o?i.children.splice(t,1):i.children[t]={type:`text`,value:e.value},t;if(e.type===`element`){let t;for(t in kE)if(Object.hasOwn(kE,t)&&Object.hasOwn(e.properties,t)){let n=e.properties[t],r=kE[t];(r===null||r.includes(e.tagName))&&(e.properties[t]=c(String(n||``),t,e))}}if(e.type===`element`){let o=n?!n.includes(e.tagName):a?a.includes(e.tagName):!1;if(!o&&r&&typeof t==`number`&&(o=!r(e,t,i)),o&&i&&typeof t==`number`)return s&&e.children?i.children.splice(t,1,...e.children):i.children.splice(t,1),t}}}function Ij(e){let t=e.indexOf(`:`),n=e.indexOf(`?`),r=e.indexOf(`#`),i=e.indexOf(`/`);return t===-1||i!==-1&&t>i||n!==-1&&t>n||r!==-1&&t>r||Aj.test(e.slice(0,t))?e:``}function Lj(e,t){let n=String(e);if(typeof t!=`string`)throw TypeError(`Expected character`);let r=0,i=n.indexOf(t);for(;i!==-1;)r++,i=n.indexOf(t,i+t.length);return r}function Rj(e){if(typeof e!=`string`)throw TypeError(`Expected a string`);return e.replace(/[|\\{}()[\]^$+*?.]/g,`\\$&`).replace(/-/g,`\\x2d`)}function zj(e,t,n){let r=CA((n||{}).ignore||[]),i=Bj(t),a=-1;for(;++a<i.length;)MA(e,`text`,o);function o(e,t){let n=-1,i;for(;++n<t.length;){let e=t[n],a=i?i.children:void 0;if(r(e,a?a.indexOf(e):void 0,i))return;i=e}if(i)return s(e,t)}function s(e,t){let n=t[t.length-1],r=i[a][0],o=i[a][1],s=0,c=n.children.indexOf(e),l=!1,u=[];r.lastIndex=0;let d=r.exec(e.value);for(;d;){let n=d.index,i={index:d.index,input:d.input,stack:[...t,e]},a=o(...d,i);if(typeof a==`string`&&(a=a.length>0?{type:`text`,value:a}:void 0),a===!1?r.lastIndex=n+1:(s!==n&&u.push({type:`text`,value:e.value.slice(s,n)}),Array.isArray(a)?u.push(...a):a&&u.push(a),s=n+d[0].length,l=!0),!r.global)break;d=r.exec(e.value)}return l?(s<e.value.length&&u.push({type:`text`,value:e.value.slice(s)}),n.children.splice(c,1,...u)):u=[e],c+u.length}}function Bj(e){let t=[];if(!Array.isArray(e))throw TypeError(`Expected find and replace tuple or list of tuples`);let n=!e[0]||Array.isArray(e[0])?e:[e],r=-1;for(;++r<n.length;){let e=n[r];t.push([Vj(e[0]),Hj(e[1])])}return t}function Vj(e){return typeof e==`string`?new RegExp(Rj(e),`g`):e}function Hj(e){return typeof e==`function`?e:function(){return e}}var Uj=`phrasing`,Wj=[`autolink`,`link`,`image`,`label`];function Gj(){return{transforms:[$j],enter:{literalAutolink:qj,literalAutolinkEmail:Jj,literalAutolinkHttp:Jj,literalAutolinkWww:Jj},exit:{literalAutolink:Qj,literalAutolinkEmail:Zj,literalAutolinkHttp:Yj,literalAutolinkWww:Xj}}}function Kj(){return{unsafe:[{character:`@`,before:`[+\\-.\\w]`,after:`[\\-.\\w]`,inConstruct:Uj,notInConstruct:Wj},{character:`.`,before:`[Ww]`,after:`[\\-.\\w]`,inConstruct:Uj,notInConstruct:Wj},{character:`:`,before:`[ps]`,after:`\\/`,inConstruct:Uj,notInConstruct:Wj}]}}function qj(e){this.enter({type:`link`,title:null,url:``,children:[]},e)}function Jj(e){this.config.enter.autolinkProtocol.call(this,e)}function Yj(e){this.config.exit.autolinkProtocol.call(this,e)}function Xj(e){this.config.exit.data.call(this,e);let t=this.stack[this.stack.length-1];t.type,t.url=`http://`+this.sliceSerialize(e)}function Zj(e){this.config.exit.autolinkEmail.call(this,e)}function Qj(e){this.exit(e)}function $j(e){zj(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,eM],[/(?<=^|\s|\p{P}|\p{S})([-.\w+]+)@([-\w]+(?:\.[-\w]+)+)/gu,tM]],{ignore:[`link`,`linkReference`]})}function eM(e,t,n,r,i){let a=``;if(!iM(i)||(/^w/i.test(t)&&(n=t+n,t=``,a=`http://`),!nM(n)))return!1;let o=rM(n+r);if(!o[0])return!1;let s={type:`link`,title:null,url:a+t+o[0],children:[{type:`text`,value:t+o[0]}]};return o[1]?[s,{type:`text`,value:o[1]}]:s}function tM(e,t,n,r){return!iM(r,!0)||/[-\d_]$/.test(n)?!1:{type:`link`,title:null,url:`mailto:`+t+`@`+n,children:[{type:`text`,value:t+`@`+n}]}}function nM(e){let t=e.split(`.`);return!(t.length<2||t[t.length-1]&&(/_/.test(t[t.length-1])||!/[a-zA-Z\d]/.test(t[t.length-1]))||t[t.length-2]&&(/_/.test(t[t.length-2])||!/[a-zA-Z\d]/.test(t[t.length-2])))}function rM(e){let t=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!t)return[e,void 0];e=e.slice(0,t.index);let n=t[0],r=n.indexOf(`)`),i=Lj(e,`(`),a=Lj(e,`)`);for(;r!==-1&&i>a;)e+=n.slice(0,r+1),n=n.slice(r+1),r=n.indexOf(`)`),a++;return[e,n]}function iM(e,t){let n=e.input.charCodeAt(e.index-1);return(e.index===0||eD(n)||$E(n))&&(!t||n!==47)}mM.peek=pM;function aM(){this.buffer()}function oM(e){this.enter({type:`footnoteReference`,identifier:``,label:``},e)}function sM(){this.buffer()}function cM(e){this.enter({type:`footnoteDefinition`,identifier:``,label:``,children:[]},e)}function lM(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=WE(this.sliceSerialize(e)).toLowerCase(),n.label=t}function uM(e){this.exit(e)}function dM(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=WE(this.sliceSerialize(e)).toLowerCase(),n.label=t}function fM(e){this.exit(e)}function pM(){return`[`}function mM(e,t,n,r){let i=n.createTracker(r),a=i.move(`[^`),o=n.enter(`footnoteReference`),s=n.enter(`reference`);return a+=i.move(n.safe(n.associationId(e),{after:`]`,before:a})),s(),o(),a+=i.move(`]`),a}function hM(){return{enter:{gfmFootnoteCallString:aM,gfmFootnoteCall:oM,gfmFootnoteDefinitionLabelString:sM,gfmFootnoteDefinition:cM},exit:{gfmFootnoteCallString:lM,gfmFootnoteCall:uM,gfmFootnoteDefinitionLabelString:dM,gfmFootnoteDefinition:fM}}}function gM(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:n,footnoteReference:mM},unsafe:[{character:`[`,inConstruct:[`label`,`phrasing`,`reference`]}]};function n(e,n,r,i){let a=r.createTracker(i),o=a.move(`[^`),s=r.enter(`footnoteDefinition`),c=r.enter(`label`);return o+=a.move(r.safe(r.associationId(e),{before:o,after:`]`})),c(),o+=a.move(`]:`),e.children&&e.children.length>0&&(a.shift(4),o+=a.move((t?`
73
+ `:` `)+r.indentLines(r.containerFlow(e,a.current()),t?vM:_M))),s(),o}}function _M(e,t,n){return t===0?e:vM(e,t,n)}function vM(e,t,n){return(n?``:` `)+e}var yM=[`autolink`,`destinationLiteral`,`destinationRaw`,`reference`,`titleQuote`,`titleApostrophe`];wM.peek=TM;function bM(){return{canContainEols:[`delete`],enter:{strikethrough:SM},exit:{strikethrough:CM}}}function xM(){return{unsafe:[{character:`~`,inConstruct:`phrasing`,notInConstruct:yM}],handlers:{delete:wM}}}function SM(e){this.enter({type:`delete`,children:[]},e)}function CM(e){this.exit(e)}function wM(e,t,n,r){let i=n.createTracker(r),a=n.enter(`strikethrough`),o=i.move(`~~`);return o+=n.containerPhrasing(e,{...i.current(),before:o,after:`~`}),o+=i.move(`~~`),a(),o}function TM(){return`~`}function EM(e){return e.length}function DM(e,t){let n=t||{},r=(n.align||[]).concat(),i=n.stringLength||EM,a=[],o=[],s=[],c=[],l=0,u=-1;for(;++u<e.length;){let t=[],r=[],a=-1;for(e[u].length>l&&(l=e[u].length);++a<e[u].length;){let o=OM(e[u][a]);if(n.alignDelimiters!==!1){let e=i(o);r[a]=e,(c[a]===void 0||e>c[a])&&(c[a]=e)}t.push(o)}o[u]=t,s[u]=r}let d=-1;if(typeof r==`object`&&`length`in r)for(;++d<l;)a[d]=kM(r[d]);else{let e=kM(r);for(;++d<l;)a[d]=e}d=-1;let f=[],p=[];for(;++d<l;){let e=a[d],t=``,r=``;e===99?(t=`:`,r=`:`):e===108?t=`:`:e===114&&(r=`:`);let i=n.alignDelimiters===!1?1:Math.max(1,c[d]-t.length-r.length),o=t+`-`.repeat(i)+r;n.alignDelimiters!==!1&&(i=t.length+i+r.length,i>c[d]&&(c[d]=i),p[d]=i),f[d]=o}o.splice(1,0,f),s.splice(1,0,p),u=-1;let m=[];for(;++u<o.length;){let e=o[u],t=s[u];d=-1;let r=[];for(;++d<l;){let i=e[d]||``,o=``,s=``;if(n.alignDelimiters!==!1){let e=c[d]-(t[d]||0),n=a[d];n===114?o=` `.repeat(e):n===99?e%2?(o=` `.repeat(e/2+.5),s=` `.repeat(e/2-.5)):(o=` `.repeat(e/2),s=o):s=` `.repeat(e)}n.delimiterStart!==!1&&!d&&r.push(`|`),n.padding!==!1&&(n.alignDelimiters!==!1||i!==``)&&(n.delimiterStart!==!1||d)&&r.push(` `),n.alignDelimiters!==!1&&r.push(o),r.push(i),n.alignDelimiters!==!1&&r.push(s),n.padding!==!1&&r.push(` `),(n.delimiterEnd!==!1||d!==l-1)&&r.push(`|`)}m.push(n.delimiterEnd===!1?r.join(``).replace(/ +$/,``):r.join(``))}return m.join(`
74
+ `)}function OM(e){return e==null?``:String(e)}function kM(e){let t=typeof e==`string`?e.codePointAt(0):0;return t===67||t===99?99:t===76||t===108?108:t===82||t===114?114:0}function AM(e,t,n,r){let i=n.enter(`blockquote`),a=n.createTracker(r);a.move(`> `),a.shift(2);let o=n.indentLines(n.containerFlow(e,a.current()),jM);return i(),o}function jM(e,t,n){return`>`+(n?``:` `)+e}function MM(e,t){return NM(e,t.inConstruct,!0)&&!NM(e,t.notInConstruct,!1)}function NM(e,t,n){if(typeof t==`string`&&(t=[t]),!t||t.length===0)return n;let r=-1;for(;++r<t.length;)if(e.includes(t[r]))return!0;return!1}function PM(e,t,n,r){let i=-1;for(;++i<n.unsafe.length;)if(n.unsafe[i].character===`
75
+ `&&MM(n.stack,n.unsafe[i]))return/[ \t]/.test(r.before)?``:` `;return`\\
76
+ `}function FM(e,t){let n=String(e),r=n.indexOf(t),i=r,a=0,o=0;if(typeof t!=`string`)throw TypeError(`Expected substring`);for(;r!==-1;)r===i?++a>o&&(o=a):a=1,i=r+t.length,r=n.indexOf(t,i);return o}function IM(e,t){return!!(t.options.fences===!1&&e.value&&!e.lang&&/[^ \r\n]/.test(e.value)&&!/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(e.value))}function LM(e){let t=e.options.fence||"`";if(t!=="`"&&t!==`~`)throw Error("Cannot serialize code with `"+t+"` for `options.fence`, expected `` ` `` or `~`");return t}function RM(e,t,n,r){let i=LM(n),a=e.value||``,o=i==="`"?`GraveAccent`:`Tilde`;if(IM(e,n)){let e=n.enter(`codeIndented`),t=n.indentLines(a,zM);return e(),t}let s=n.createTracker(r),c=i.repeat(Math.max(FM(a,i)+1,3)),l=n.enter(`codeFenced`),u=s.move(c);if(e.lang){let t=n.enter(`codeFencedLang${o}`);u+=s.move(n.safe(e.lang,{before:u,after:` `,encode:["`"],...s.current()})),t()}if(e.lang&&e.meta){let t=n.enter(`codeFencedMeta${o}`);u+=s.move(` `),u+=s.move(n.safe(e.meta,{before:u,after:`
77
77
  `,encode:["`"],...s.current()})),t()}return u+=s.move(`
78
78
  `),a&&(u+=s.move(a+`
79
- `)),u+=s.move(c),l(),u}function LM(e,t,n){return(n?``:` `)+e}function RM(e){let t=e.options.quote||`"`;if(t!==`"`&&t!==`'`)throw Error("Cannot serialize title with `"+t+"` for `options.quote`, expected `\"`, or `'`");return t}function zM(e,t,n,r){let i=RM(n),a=i===`"`?`Quote`:`Apostrophe`,o=n.enter(`definition`),s=n.enter(`label`),c=n.createTracker(r),l=c.move(`[`);return l+=c.move(n.safe(n.associationId(e),{before:l,after:`]`,...c.current()})),l+=c.move(`]: `),s(),!e.url||/[\0- \u007F]/.test(e.url)?(s=n.enter(`destinationLiteral`),l+=c.move(`<`),l+=c.move(n.safe(e.url,{before:l,after:`>`,...c.current()})),l+=c.move(`>`)):(s=n.enter(`destinationRaw`),l+=c.move(n.safe(e.url,{before:l,after:e.title?` `:`
80
- `,...c.current()}))),s(),e.title&&(s=n.enter(`title${a}`),l+=c.move(` `+i),l+=c.move(n.safe(e.title,{before:l,after:i,...c.current()})),l+=c.move(i),s()),o(),l}function BM(e){let t=e.options.emphasis||`*`;if(t!==`*`&&t!==`_`)throw Error("Cannot serialize emphasis with `"+t+"` for `options.emphasis`, expected `*`, or `_`");return t}function VM(e){return`&#x`+e.toString(16).toUpperCase()+`;`}function HM(e,t,n){let r=mD(e),i=mD(t);return r===void 0?i===void 0?n===`_`?{inside:!0,outside:!0}:{inside:!1,outside:!1}:i===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:r===1?i===void 0?{inside:!1,outside:!1}:i===1?{inside:!0,outside:!0}:{inside:!1,outside:!1}:i===void 0?{inside:!1,outside:!1}:i===1?{inside:!0,outside:!1}:{inside:!1,outside:!1}}UM.peek=WM;function UM(e,t,n,r){let i=BM(n),a=n.enter(`emphasis`),o=n.createTracker(r),s=o.move(i),c=o.move(n.containerPhrasing(e,{after:i,before:s,...o.current()})),l=c.charCodeAt(0),u=HM(r.before.charCodeAt(r.before.length-1),l,i);u.inside&&(c=VM(l)+c.slice(1));let d=c.charCodeAt(c.length-1),f=HM(r.after.charCodeAt(0),d,i);f.inside&&(c=c.slice(0,-1)+VM(d));let p=o.move(i);return a(),n.attentionEncodeSurroundingInfo={after:f.outside,before:u.outside},s+c+p}function WM(e,t,n){return n.options.emphasis||`*`}function GM(e,t){let n=!1;return MA(e,function(e){if(`value`in e&&/\r?\n|\r/.test(e.value)||e.type===`break`)return n=!0,!1}),!!((!e.depth||e.depth<3)&&NE(e)&&(t.options.setext||n))}function KM(e,t,n,r){let i=Math.max(Math.min(6,e.depth||1),1),a=n.createTracker(r);if(GM(e,n)){let t=n.enter(`headingSetext`),r=n.enter(`phrasing`),o=n.containerPhrasing(e,{...a.current(),before:`
79
+ `)),u+=s.move(c),l(),u}function zM(e,t,n){return(n?``:` `)+e}function BM(e){let t=e.options.quote||`"`;if(t!==`"`&&t!==`'`)throw Error("Cannot serialize title with `"+t+"` for `options.quote`, expected `\"`, or `'`");return t}function VM(e,t,n,r){let i=BM(n),a=i===`"`?`Quote`:`Apostrophe`,o=n.enter(`definition`),s=n.enter(`label`),c=n.createTracker(r),l=c.move(`[`);return l+=c.move(n.safe(n.associationId(e),{before:l,after:`]`,...c.current()})),l+=c.move(`]: `),s(),!e.url||/[\0- \u007F]/.test(e.url)?(s=n.enter(`destinationLiteral`),l+=c.move(`<`),l+=c.move(n.safe(e.url,{before:l,after:`>`,...c.current()})),l+=c.move(`>`)):(s=n.enter(`destinationRaw`),l+=c.move(n.safe(e.url,{before:l,after:e.title?` `:`
80
+ `,...c.current()}))),s(),e.title&&(s=n.enter(`title${a}`),l+=c.move(` `+i),l+=c.move(n.safe(e.title,{before:l,after:i,...c.current()})),l+=c.move(i),s()),o(),l}function HM(e){let t=e.options.emphasis||`*`;if(t!==`*`&&t!==`_`)throw Error("Cannot serialize emphasis with `"+t+"` for `options.emphasis`, expected `*`, or `_`");return t}function UM(e){return`&#x`+e.toString(16).toUpperCase()+`;`}function WM(e,t,n){let r=uD(e),i=uD(t);return r===void 0?i===void 0?n===`_`?{inside:!0,outside:!0}:{inside:!1,outside:!1}:i===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:r===1?i===void 0?{inside:!1,outside:!1}:i===1?{inside:!0,outside:!0}:{inside:!1,outside:!1}:i===void 0?{inside:!1,outside:!1}:i===1?{inside:!0,outside:!1}:{inside:!1,outside:!1}}GM.peek=KM;function GM(e,t,n,r){let i=HM(n),a=n.enter(`emphasis`),o=n.createTracker(r),s=o.move(i),c=o.move(n.containerPhrasing(e,{after:i,before:s,...o.current()})),l=c.charCodeAt(0),u=WM(r.before.charCodeAt(r.before.length-1),l,i);u.inside&&(c=UM(l)+c.slice(1));let d=c.charCodeAt(c.length-1),f=WM(r.after.charCodeAt(0),d,i);f.inside&&(c=c.slice(0,-1)+UM(d));let p=o.move(i);return a(),n.attentionEncodeSurroundingInfo={after:f.outside,before:u.outside},s+c+p}function KM(e,t,n){return n.options.emphasis||`*`}function qM(e,t){let n=!1;return PA(e,function(e){if(`value`in e&&/\r?\n|\r/.test(e.value)||e.type===`break`)return n=!0,!1}),!!((!e.depth||e.depth<3)&&jE(e)&&(t.options.setext||n))}function JM(e,t,n,r){let i=Math.max(Math.min(6,e.depth||1),1),a=n.createTracker(r);if(qM(e,n)){let t=n.enter(`headingSetext`),r=n.enter(`phrasing`),o=n.containerPhrasing(e,{...a.current(),before:`
81
81
  `,after:`
82
82
  `});return r(),t(),o+`
83
83
  `+(i===1?`=`:`-`).repeat(o.length-(Math.max(o.lastIndexOf(`\r`),o.lastIndexOf(`
84
84
  `))+1))}let o=`#`.repeat(i),s=n.enter(`headingAtx`),c=n.enter(`phrasing`);a.move(o+` `);let l=n.containerPhrasing(e,{before:`# `,after:`
85
- `,...a.current()});return/^[\t ]/.test(l)&&(l=VM(l.charCodeAt(0))+l.slice(1)),l=l?o+` `+l:o,n.options.closeAtx&&(l+=` `+o),c(),s(),l}qM.peek=JM;function qM(e){return e.value||``}function JM(){return`<`}YM.peek=XM;function YM(e,t,n,r){let i=RM(n),a=i===`"`?`Quote`:`Apostrophe`,o=n.enter(`image`),s=n.enter(`label`),c=n.createTracker(r),l=c.move(`![`);return l+=c.move(n.safe(e.alt,{before:l,after:`]`,...c.current()})),l+=c.move(`](`),s(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(s=n.enter(`destinationLiteral`),l+=c.move(`<`),l+=c.move(n.safe(e.url,{before:l,after:`>`,...c.current()})),l+=c.move(`>`)):(s=n.enter(`destinationRaw`),l+=c.move(n.safe(e.url,{before:l,after:e.title?` `:`)`,...c.current()}))),s(),e.title&&(s=n.enter(`title${a}`),l+=c.move(` `+i),l+=c.move(n.safe(e.title,{before:l,after:i,...c.current()})),l+=c.move(i),s()),l+=c.move(`)`),o(),l}function XM(){return`!`}ZM.peek=QM;function ZM(e,t,n,r){let i=e.referenceType,a=n.enter(`imageReference`),o=n.enter(`label`),s=n.createTracker(r),c=s.move(`![`),l=n.safe(e.alt,{before:c,after:`]`,...s.current()});c+=s.move(l+`][`),o();let u=n.stack;n.stack=[],o=n.enter(`reference`);let d=n.safe(n.associationId(e),{before:c,after:`]`,...s.current()});return o(),n.stack=u,a(),i===`full`||!l||l!==d?c+=s.move(d+`]`):i===`shortcut`?c=c.slice(0,-1):c+=s.move(`]`),c}function QM(){return`!`}$M.peek=eN;function $M(e,t,n){let r=e.value||``,i="`",a=-1;for(;RegExp("(^|[^`])"+i+"([^`]|$)").test(r);)i+="`";for(/[^ \r\n]/.test(r)&&(/^[ \r\n]/.test(r)&&/[ \r\n]$/.test(r)||/^`|`$/.test(r))&&(r=` `+r+` `);++a<n.unsafe.length;){let e=n.unsafe[a],t=n.compilePattern(e),i;if(e.atBreak)for(;i=t.exec(r);){let e=i.index;r.charCodeAt(e)===10&&r.charCodeAt(e-1)===13&&e--,r=r.slice(0,e)+` `+r.slice(i.index+1)}}return i+r+i}function eN(){return"`"}function tN(e,t){let n=NE(e);return!!(!t.options.resourceLink&&e.url&&!e.title&&e.children&&e.children.length===1&&e.children[0].type===`text`&&(n===e.url||`mailto:`+n===e.url)&&/^[a-z][a-z+.-]+:/i.test(e.url)&&!/[\0- <>\u007F]/.test(e.url))}nN.peek=rN;function nN(e,t,n,r){let i=RM(n),a=i===`"`?`Quote`:`Apostrophe`,o=n.createTracker(r),s,c;if(tN(e,n)){let t=n.stack;n.stack=[],s=n.enter(`autolink`);let r=o.move(`<`);return r+=o.move(n.containerPhrasing(e,{before:r,after:`>`,...o.current()})),r+=o.move(`>`),s(),n.stack=t,r}s=n.enter(`link`),c=n.enter(`label`);let l=o.move(`[`);return l+=o.move(n.containerPhrasing(e,{before:l,after:`](`,...o.current()})),l+=o.move(`](`),c(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(c=n.enter(`destinationLiteral`),l+=o.move(`<`),l+=o.move(n.safe(e.url,{before:l,after:`>`,...o.current()})),l+=o.move(`>`)):(c=n.enter(`destinationRaw`),l+=o.move(n.safe(e.url,{before:l,after:e.title?` `:`)`,...o.current()}))),c(),e.title&&(c=n.enter(`title${a}`),l+=o.move(` `+i),l+=o.move(n.safe(e.title,{before:l,after:i,...o.current()})),l+=o.move(i),c()),l+=o.move(`)`),s(),l}function rN(e,t,n){return tN(e,n)?`<`:`[`}iN.peek=aN;function iN(e,t,n,r){let i=e.referenceType,a=n.enter(`linkReference`),o=n.enter(`label`),s=n.createTracker(r),c=s.move(`[`),l=n.containerPhrasing(e,{before:c,after:`]`,...s.current()});c+=s.move(l+`][`),o();let u=n.stack;n.stack=[],o=n.enter(`reference`);let d=n.safe(n.associationId(e),{before:c,after:`]`,...s.current()});return o(),n.stack=u,a(),i===`full`||!l||l!==d?c+=s.move(d+`]`):i===`shortcut`?c=c.slice(0,-1):c+=s.move(`]`),c}function aN(){return`[`}function oN(e){let t=e.options.bullet||`*`;if(t!==`*`&&t!==`+`&&t!==`-`)throw Error("Cannot serialize items with `"+t+"` for `options.bullet`, expected `*`, `+`, or `-`");return t}function sN(e){let t=oN(e),n=e.options.bulletOther;if(!n)return t===`*`?`-`:`*`;if(n!==`*`&&n!==`+`&&n!==`-`)throw Error("Cannot serialize items with `"+n+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(n===t)throw Error("Expected `bullet` (`"+t+"`) and `bulletOther` (`"+n+"`) to be different");return n}function cN(e){let t=e.options.bulletOrdered||`.`;if(t!==`.`&&t!==`)`)throw Error("Cannot serialize items with `"+t+"` for `options.bulletOrdered`, expected `.` or `)`");return t}function lN(e){let t=e.options.rule||`*`;if(t!==`*`&&t!==`-`&&t!==`_`)throw Error("Cannot serialize rules with `"+t+"` for `options.rule`, expected `*`, `-`, or `_`");return t}function uN(e,t,n,r){let i=n.enter(`list`),a=n.bulletCurrent,o=e.ordered?cN(n):oN(n),s=e.ordered?o===`.`?`)`:`.`:sN(n),c=t&&n.bulletLastUsed?o===n.bulletLastUsed:!1;if(!e.ordered){let t=e.children?e.children[0]:void 0;if((o===`*`||o===`-`)&&t&&(!t.children||!t.children[0])&&n.stack[n.stack.length-1]===`list`&&n.stack[n.stack.length-2]===`listItem`&&n.stack[n.stack.length-3]===`list`&&n.stack[n.stack.length-4]===`listItem`&&n.indexStack[n.indexStack.length-1]===0&&n.indexStack[n.indexStack.length-2]===0&&n.indexStack[n.indexStack.length-3]===0&&(c=!0),lN(n)===o&&t){let t=-1;for(;++t<e.children.length;){let n=e.children[t];if(n&&n.type===`listItem`&&n.children&&n.children[0]&&n.children[0].type===`thematicBreak`){c=!0;break}}}}c&&(o=s),n.bulletCurrent=o;let l=n.containerFlow(e,r);return n.bulletLastUsed=o,n.bulletCurrent=a,i(),l}function dN(e){let t=e.options.listItemIndent||`one`;if(t!==`tab`&&t!==`one`&&t!==`mixed`)throw Error("Cannot serialize items with `"+t+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return t}function fN(e,t,n,r){let i=dN(n),a=n.bulletCurrent||oN(n);t&&t.type===`list`&&t.ordered&&(a=(typeof t.start==`number`&&t.start>-1?t.start:1)+(n.options.incrementListMarker===!1?0:t.children.indexOf(e))+a);let o=a.length+1;(i===`tab`||i===`mixed`&&(t&&t.type===`list`&&t.spread||e.spread))&&(o=Math.ceil(o/4)*4);let s=n.createTracker(r);s.move(a+` `.repeat(o-a.length)),s.shift(o);let c=n.enter(`listItem`),l=n.indentLines(n.containerFlow(e,s.current()),u);return c(),l;function u(e,t,n){return t?(n?``:` `.repeat(o))+e:(n?a:a+` `.repeat(o-a.length))+e}}function pN(e,t,n,r){let i=n.enter(`paragraph`),a=n.enter(`phrasing`),o=n.containerPhrasing(e,r);return a(),i(),o}var mN=xA([`break`,`delete`,`emphasis`,`footnote`,`footnoteReference`,`image`,`imageReference`,`inlineCode`,`inlineMath`,`link`,`linkReference`,`mdxJsxTextElement`,`mdxTextExpression`,`strong`,`text`,`textDirective`]);function hN(e,t,n,r){return(e.children.some(function(e){return mN(e)})?n.containerPhrasing:n.containerFlow).call(n,e,r)}function gN(e){let t=e.options.strong||`*`;if(t!==`*`&&t!==`_`)throw Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}_N.peek=vN;function _N(e,t,n,r){let i=gN(n),a=n.enter(`strong`),o=n.createTracker(r),s=o.move(i+i),c=o.move(n.containerPhrasing(e,{after:i,before:s,...o.current()})),l=c.charCodeAt(0),u=HM(r.before.charCodeAt(r.before.length-1),l,i);u.inside&&(c=VM(l)+c.slice(1));let d=c.charCodeAt(c.length-1),f=HM(r.after.charCodeAt(0),d,i);f.inside&&(c=c.slice(0,-1)+VM(d));let p=o.move(i+i);return a(),n.attentionEncodeSurroundingInfo={after:f.outside,before:u.outside},s+c+p}function vN(e,t,n){return n.options.strong||`*`}function yN(e,t,n,r){return n.safe(e.value,r)}function bN(e){let t=e.options.ruleRepetition||3;if(t<3)throw Error("Cannot serialize rules with repetition `"+t+"` for `options.ruleRepetition`, expected `3` or more");return t}function xN(e,t,n){let r=(lN(n)+(n.options.ruleSpaces?` `:``)).repeat(bN(n));return n.options.ruleSpaces?r.slice(0,-1):r}var SN={blockquote:OM,break:MM,code:IM,definition:zM,emphasis:UM,hardBreak:MM,heading:KM,html:qM,image:YM,imageReference:ZM,inlineCode:$M,link:nN,linkReference:iN,list:uN,listItem:fN,paragraph:pN,root:hN,strong:_N,text:yN,thematicBreak:xN};function CN(){return{enter:{table:wN,tableData:ON,tableHeader:ON,tableRow:EN},exit:{codeText:kN,table:TN,tableData:DN,tableHeader:DN,tableRow:DN}}}function wN(e){let t=e._align;this.enter({type:`table`,align:t.map(function(e){return e===`none`?null:e}),children:[]},e),this.data.inTable=!0}function TN(e){this.exit(e),this.data.inTable=void 0}function EN(e){this.enter({type:`tableRow`,children:[]},e)}function DN(e){this.exit(e)}function ON(e){this.enter({type:`tableCell`,children:[]},e)}function kN(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,AN));let n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function AN(e,t){return t===`|`?t:e}function jN(e){let t=e||{},n=t.tableCellPadding,r=t.tablePipeAlign,i=t.stringLength,a=n?` `:`|`;return{unsafe:[{character:`\r`,inConstruct:`tableCell`},{character:`
85
+ `,...a.current()});return/^[\t ]/.test(l)&&(l=UM(l.charCodeAt(0))+l.slice(1)),l=l?o+` `+l:o,n.options.closeAtx&&(l+=` `+o),c(),s(),l}YM.peek=XM;function YM(e){return e.value||``}function XM(){return`<`}ZM.peek=QM;function ZM(e,t,n,r){let i=BM(n),a=i===`"`?`Quote`:`Apostrophe`,o=n.enter(`image`),s=n.enter(`label`),c=n.createTracker(r),l=c.move(`![`);return l+=c.move(n.safe(e.alt,{before:l,after:`]`,...c.current()})),l+=c.move(`](`),s(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(s=n.enter(`destinationLiteral`),l+=c.move(`<`),l+=c.move(n.safe(e.url,{before:l,after:`>`,...c.current()})),l+=c.move(`>`)):(s=n.enter(`destinationRaw`),l+=c.move(n.safe(e.url,{before:l,after:e.title?` `:`)`,...c.current()}))),s(),e.title&&(s=n.enter(`title${a}`),l+=c.move(` `+i),l+=c.move(n.safe(e.title,{before:l,after:i,...c.current()})),l+=c.move(i),s()),l+=c.move(`)`),o(),l}function QM(){return`!`}$M.peek=eN;function $M(e,t,n,r){let i=e.referenceType,a=n.enter(`imageReference`),o=n.enter(`label`),s=n.createTracker(r),c=s.move(`![`),l=n.safe(e.alt,{before:c,after:`]`,...s.current()});c+=s.move(l+`][`),o();let u=n.stack;n.stack=[],o=n.enter(`reference`);let d=n.safe(n.associationId(e),{before:c,after:`]`,...s.current()});return o(),n.stack=u,a(),i===`full`||!l||l!==d?c+=s.move(d+`]`):i===`shortcut`?c=c.slice(0,-1):c+=s.move(`]`),c}function eN(){return`!`}tN.peek=nN;function tN(e,t,n){let r=e.value||``,i="`",a=-1;for(;RegExp("(^|[^`])"+i+"([^`]|$)").test(r);)i+="`";for(/[^ \r\n]/.test(r)&&(/^[ \r\n]/.test(r)&&/[ \r\n]$/.test(r)||/^`|`$/.test(r))&&(r=` `+r+` `);++a<n.unsafe.length;){let e=n.unsafe[a],t=n.compilePattern(e),i;if(e.atBreak)for(;i=t.exec(r);){let e=i.index;r.charCodeAt(e)===10&&r.charCodeAt(e-1)===13&&e--,r=r.slice(0,e)+` `+r.slice(i.index+1)}}return i+r+i}function nN(){return"`"}function rN(e,t){let n=jE(e);return!!(!t.options.resourceLink&&e.url&&!e.title&&e.children&&e.children.length===1&&e.children[0].type===`text`&&(n===e.url||`mailto:`+n===e.url)&&/^[a-z][a-z+.-]+:/i.test(e.url)&&!/[\0- <>\u007F]/.test(e.url))}iN.peek=aN;function iN(e,t,n,r){let i=BM(n),a=i===`"`?`Quote`:`Apostrophe`,o=n.createTracker(r),s,c;if(rN(e,n)){let t=n.stack;n.stack=[],s=n.enter(`autolink`);let r=o.move(`<`);return r+=o.move(n.containerPhrasing(e,{before:r,after:`>`,...o.current()})),r+=o.move(`>`),s(),n.stack=t,r}s=n.enter(`link`),c=n.enter(`label`);let l=o.move(`[`);return l+=o.move(n.containerPhrasing(e,{before:l,after:`](`,...o.current()})),l+=o.move(`](`),c(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(c=n.enter(`destinationLiteral`),l+=o.move(`<`),l+=o.move(n.safe(e.url,{before:l,after:`>`,...o.current()})),l+=o.move(`>`)):(c=n.enter(`destinationRaw`),l+=o.move(n.safe(e.url,{before:l,after:e.title?` `:`)`,...o.current()}))),c(),e.title&&(c=n.enter(`title${a}`),l+=o.move(` `+i),l+=o.move(n.safe(e.title,{before:l,after:i,...o.current()})),l+=o.move(i),c()),l+=o.move(`)`),s(),l}function aN(e,t,n){return rN(e,n)?`<`:`[`}oN.peek=sN;function oN(e,t,n,r){let i=e.referenceType,a=n.enter(`linkReference`),o=n.enter(`label`),s=n.createTracker(r),c=s.move(`[`),l=n.containerPhrasing(e,{before:c,after:`]`,...s.current()});c+=s.move(l+`][`),o();let u=n.stack;n.stack=[],o=n.enter(`reference`);let d=n.safe(n.associationId(e),{before:c,after:`]`,...s.current()});return o(),n.stack=u,a(),i===`full`||!l||l!==d?c+=s.move(d+`]`):i===`shortcut`?c=c.slice(0,-1):c+=s.move(`]`),c}function sN(){return`[`}function cN(e){let t=e.options.bullet||`*`;if(t!==`*`&&t!==`+`&&t!==`-`)throw Error("Cannot serialize items with `"+t+"` for `options.bullet`, expected `*`, `+`, or `-`");return t}function lN(e){let t=cN(e),n=e.options.bulletOther;if(!n)return t===`*`?`-`:`*`;if(n!==`*`&&n!==`+`&&n!==`-`)throw Error("Cannot serialize items with `"+n+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(n===t)throw Error("Expected `bullet` (`"+t+"`) and `bulletOther` (`"+n+"`) to be different");return n}function uN(e){let t=e.options.bulletOrdered||`.`;if(t!==`.`&&t!==`)`)throw Error("Cannot serialize items with `"+t+"` for `options.bulletOrdered`, expected `.` or `)`");return t}function dN(e){let t=e.options.rule||`*`;if(t!==`*`&&t!==`-`&&t!==`_`)throw Error("Cannot serialize rules with `"+t+"` for `options.rule`, expected `*`, `-`, or `_`");return t}function fN(e,t,n,r){let i=n.enter(`list`),a=n.bulletCurrent,o=e.ordered?uN(n):cN(n),s=e.ordered?o===`.`?`)`:`.`:lN(n),c=t&&n.bulletLastUsed?o===n.bulletLastUsed:!1;if(!e.ordered){let t=e.children?e.children[0]:void 0;if((o===`*`||o===`-`)&&t&&(!t.children||!t.children[0])&&n.stack[n.stack.length-1]===`list`&&n.stack[n.stack.length-2]===`listItem`&&n.stack[n.stack.length-3]===`list`&&n.stack[n.stack.length-4]===`listItem`&&n.indexStack[n.indexStack.length-1]===0&&n.indexStack[n.indexStack.length-2]===0&&n.indexStack[n.indexStack.length-3]===0&&(c=!0),dN(n)===o&&t){let t=-1;for(;++t<e.children.length;){let n=e.children[t];if(n&&n.type===`listItem`&&n.children&&n.children[0]&&n.children[0].type===`thematicBreak`){c=!0;break}}}}c&&(o=s),n.bulletCurrent=o;let l=n.containerFlow(e,r);return n.bulletLastUsed=o,n.bulletCurrent=a,i(),l}function pN(e){let t=e.options.listItemIndent||`one`;if(t!==`tab`&&t!==`one`&&t!==`mixed`)throw Error("Cannot serialize items with `"+t+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return t}function mN(e,t,n,r){let i=pN(n),a=n.bulletCurrent||cN(n);t&&t.type===`list`&&t.ordered&&(a=(typeof t.start==`number`&&t.start>-1?t.start:1)+(n.options.incrementListMarker===!1?0:t.children.indexOf(e))+a);let o=a.length+1;(i===`tab`||i===`mixed`&&(t&&t.type===`list`&&t.spread||e.spread))&&(o=Math.ceil(o/4)*4);let s=n.createTracker(r);s.move(a+` `.repeat(o-a.length)),s.shift(o);let c=n.enter(`listItem`),l=n.indentLines(n.containerFlow(e,s.current()),u);return c(),l;function u(e,t,n){return t?(n?``:` `.repeat(o))+e:(n?a:a+` `.repeat(o-a.length))+e}}function hN(e,t,n,r){let i=n.enter(`paragraph`),a=n.enter(`phrasing`),o=n.containerPhrasing(e,r);return a(),i(),o}var gN=CA([`break`,`delete`,`emphasis`,`footnote`,`footnoteReference`,`image`,`imageReference`,`inlineCode`,`inlineMath`,`link`,`linkReference`,`mdxJsxTextElement`,`mdxTextExpression`,`strong`,`text`,`textDirective`]);function _N(e,t,n,r){return(e.children.some(function(e){return gN(e)})?n.containerPhrasing:n.containerFlow).call(n,e,r)}function vN(e){let t=e.options.strong||`*`;if(t!==`*`&&t!==`_`)throw Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}yN.peek=bN;function yN(e,t,n,r){let i=vN(n),a=n.enter(`strong`),o=n.createTracker(r),s=o.move(i+i),c=o.move(n.containerPhrasing(e,{after:i,before:s,...o.current()})),l=c.charCodeAt(0),u=WM(r.before.charCodeAt(r.before.length-1),l,i);u.inside&&(c=UM(l)+c.slice(1));let d=c.charCodeAt(c.length-1),f=WM(r.after.charCodeAt(0),d,i);f.inside&&(c=c.slice(0,-1)+UM(d));let p=o.move(i+i);return a(),n.attentionEncodeSurroundingInfo={after:f.outside,before:u.outside},s+c+p}function bN(e,t,n){return n.options.strong||`*`}function xN(e,t,n,r){return n.safe(e.value,r)}function SN(e){let t=e.options.ruleRepetition||3;if(t<3)throw Error("Cannot serialize rules with repetition `"+t+"` for `options.ruleRepetition`, expected `3` or more");return t}function CN(e,t,n){let r=(dN(n)+(n.options.ruleSpaces?` `:``)).repeat(SN(n));return n.options.ruleSpaces?r.slice(0,-1):r}var wN={blockquote:AM,break:PM,code:RM,definition:VM,emphasis:GM,hardBreak:PM,heading:JM,html:YM,image:ZM,imageReference:$M,inlineCode:tN,link:iN,linkReference:oN,list:fN,listItem:mN,paragraph:hN,root:_N,strong:yN,text:xN,thematicBreak:CN};function TN(){return{enter:{table:EN,tableData:AN,tableHeader:AN,tableRow:ON},exit:{codeText:jN,table:DN,tableData:kN,tableHeader:kN,tableRow:kN}}}function EN(e){let t=e._align;this.enter({type:`table`,align:t.map(function(e){return e===`none`?null:e}),children:[]},e),this.data.inTable=!0}function DN(e){this.exit(e),this.data.inTable=void 0}function ON(e){this.enter({type:`tableRow`,children:[]},e)}function kN(e){this.exit(e)}function AN(e){this.enter({type:`tableCell`,children:[]},e)}function jN(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,MN));let n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function MN(e,t){return t===`|`?t:e}function NN(e){let t=e||{},n=t.tableCellPadding,r=t.tablePipeAlign,i=t.stringLength,a=n?` `:`|`;return{unsafe:[{character:`\r`,inConstruct:`tableCell`},{character:`
86
86
  `,inConstruct:`tableCell`},{atBreak:!0,character:`|`,after:`[ :-]`},{character:`|`,inConstruct:`tableCell`},{atBreak:!0,character:`:`,after:`-`},{atBreak:!0,character:`-`,after:`[:|-]`}],handlers:{inlineCode:f,table:o,tableCell:c,tableRow:s}};function o(e,t,n,r){return l(u(e,n,r),e.align)}function s(e,t,n,r){let i=l([d(e,n,r)]);return i.slice(0,i.indexOf(`
87
- `))}function c(e,t,n,r){let i=n.enter(`tableCell`),o=n.enter(`phrasing`),s=n.containerPhrasing(e,{...r,before:a,after:a});return o(),i(),s}function l(e,t){return TM(e,{align:t,alignDelimiters:r,padding:n,stringLength:i})}function u(e,t,n){let r=e.children,i=-1,a=[],o=t.enter(`table`);for(;++i<r.length;)a[i]=d(r[i],t,n);return o(),a}function d(e,t,n){let r=e.children,i=-1,a=[],o=t.enter(`tableRow`);for(;++i<r.length;)a[i]=c(r[i],e,t,n);return o(),a}function f(e,t,n){let r=SN.inlineCode(e,t,n);return n.stack.includes(`tableCell`)&&(r=r.replace(/\|/g,`\\$&`)),r}}function MN(){return{exit:{taskListCheckValueChecked:PN,taskListCheckValueUnchecked:PN,paragraph:FN}}}function NN(){return{unsafe:[{atBreak:!0,character:`-`,after:`[:|-]`}],handlers:{listItem:IN}}}function PN(e){let t=this.stack[this.stack.length-2];t.type,t.checked=e.type===`taskListCheckValueChecked`}function FN(e){let t=this.stack[this.stack.length-2];if(t&&t.type===`listItem`&&typeof t.checked==`boolean`){let e=this.stack[this.stack.length-1];e.type;let n=e.children[0];if(n&&n.type===`text`){let r=t.children,i=-1,a;for(;++i<r.length;){let e=r[i];if(e.type===`paragraph`){a=e;break}}a===e&&(n.value=n.value.slice(1),n.value.length===0?e.children.shift():e.position&&n.position&&typeof n.position.start.offset==`number`&&(n.position.start.column++,n.position.start.offset++,e.position.start=Object.assign({},n.position.start)))}}this.exit(e)}function IN(e,t,n,r){let i=e.children[0],a=typeof e.checked==`boolean`&&i&&i.type===`paragraph`,o=`[`+(e.checked?`x`:` `)+`] `,s=n.createTracker(r);a&&s.move(o);let c=SN.listItem(e,t,n,{...r,...s.current()});return a&&(c=c.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,l)),c;function l(e){return e+o}}function LN(){return[Uj(),pM(),vM(),CN(),MN()]}function RN(e){return{extensions:[Wj(),mM(e),yM(),jN(e),NN()]}}var zN={tokenize:$N,partial:!0},BN={tokenize:eP,partial:!0},VN={tokenize:tP,partial:!0},HN={tokenize:nP,partial:!0},UN={tokenize:rP,partial:!0},WN={name:`wwwAutolink`,tokenize:ZN,previous:iP},GN={name:`protocolAutolink`,tokenize:QN,previous:aP},KN={name:`emailAutolink`,tokenize:XN,previous:oP},qN={};function JN(){return{text:qN}}for(var YN=48;YN<123;)qN[YN]=KN,YN++,YN===58?YN=65:YN===91&&(YN=97);qN[43]=KN,qN[45]=KN,qN[46]=KN,qN[95]=KN,qN[72]=[KN,GN],qN[104]=[KN,GN],qN[87]=[KN,WN],qN[119]=[KN,WN];function XN(e,t,n){let r=this,i,a;return o;function o(t){return!sP(t)||!oP.call(r,r.previous)||cP(r.events)?n(t):(e.enter(`literalAutolink`),e.enter(`literalAutolinkEmail`),s(t))}function s(t){return sP(t)?(e.consume(t),s):t===64?(e.consume(t),c):n(t)}function c(t){return t===46?e.check(UN,u,l)(t):t===45||t===95||JE(t)?(a=!0,e.consume(t),c):u(t)}function l(t){return e.consume(t),i=!0,c}function u(o){return a&&i&&qE(r.previous)?(e.exit(`literalAutolinkEmail`),e.exit(`literalAutolink`),t(o)):n(o)}}function ZN(e,t,n){let r=this;return i;function i(t){return t!==87&&t!==119||!iP.call(r,r.previous)||cP(r.events)?n(t):(e.enter(`literalAutolink`),e.enter(`literalAutolinkWww`),e.check(zN,e.attempt(BN,e.attempt(VN,a),n),n)(t))}function a(n){return e.exit(`literalAutolinkWww`),e.exit(`literalAutolink`),t(n)}}function QN(e,t,n){let r=this,i=``,a=!1;return o;function o(t){return(t===72||t===104)&&aP.call(r,r.previous)&&!cP(r.events)?(e.enter(`literalAutolink`),e.enter(`literalAutolinkHttp`),i+=String.fromCodePoint(t),e.consume(t),s):n(t)}function s(t){if(qE(t)&&i.length<5)return i+=String.fromCodePoint(t),e.consume(t),s;if(t===58){let n=i.toLowerCase();if(n===`http`||n===`https`)return e.consume(t),c}return n(t)}function c(t){return t===47?(e.consume(t),a?l:(a=!0,c)):n(t)}function l(t){return t===null||XE(t)||tD(t)||iD(t)||rD(t)?n(t):e.attempt(BN,e.attempt(VN,u),n)(t)}function u(n){return e.exit(`literalAutolinkHttp`),e.exit(`literalAutolink`),t(n)}}function $N(e,t,n){let r=0;return i;function i(t){return(t===87||t===119)&&r<3?(r++,e.consume(t),i):t===46&&r===3?(e.consume(t),a):n(t)}function a(e){return e===null?n(e):t(e)}}function eP(e,t,n){let r,i,a;return o;function o(t){return t===46||t===95?e.check(HN,c,s)(t):t===null||tD(t)||iD(t)||t!==45&&rD(t)?c(t):(a=!0,e.consume(t),o)}function s(t){return t===95?r=!0:(i=r,r=void 0),e.consume(t),o}function c(e){return i||r||!a?n(e):t(e)}}function tP(e,t){let n=0,r=0;return i;function i(o){return o===40?(n++,e.consume(o),i):o===41&&r<n?a(o):o===33||o===34||o===38||o===39||o===41||o===42||o===44||o===46||o===58||o===59||o===60||o===63||o===93||o===95||o===126?e.check(HN,t,a)(o):o===null||tD(o)||iD(o)?t(o):(e.consume(o),i)}function a(t){return t===41&&r++,e.consume(t),i}}function nP(e,t,n){return r;function r(o){return o===33||o===34||o===39||o===41||o===42||o===44||o===46||o===58||o===59||o===63||o===95||o===126?(e.consume(o),r):o===38?(e.consume(o),a):o===93?(e.consume(o),i):o===60||o===null||tD(o)||iD(o)?t(o):n(o)}function i(e){return e===null||e===40||e===91||tD(e)||iD(e)?t(e):r(e)}function a(e){return qE(e)?o(e):n(e)}function o(t){return t===59?(e.consume(t),r):qE(t)?(e.consume(t),o):n(t)}}function rP(e,t,n){return r;function r(t){return e.consume(t),i}function i(e){return JE(e)?n(e):t(e)}}function iP(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||tD(e)}function aP(e){return!qE(e)}function oP(e){return!(e===47||sP(e))}function sP(e){return e===43||e===45||e===46||e===95||JE(e)}function cP(e){let t=e.length,n=!1;for(;t--;){let r=e[t][1];if((r.type===`labelLink`||r.type===`labelImage`)&&!r._balanced){n=!0;break}if(r._gfmAutolinkLiteralWalkedInto){n=!1;break}}return e.length>0&&!n&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}var lP={tokenize:_P,partial:!0};function uP(){return{document:{91:{name:`gfmFootnoteDefinition`,tokenize:mP,continuation:{tokenize:hP},exit:gP}},text:{91:{name:`gfmFootnoteCall`,tokenize:pP},93:{name:`gfmPotentialFootnoteCall`,add:`after`,tokenize:dP,resolveTo:fP}}}}function dP(e,t,n){let r=this,i=r.events.length,a=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]),o;for(;i--;){let e=r.events[i][1];if(e.type===`labelImage`){o=e;break}if(e.type===`gfmFootnoteCall`||e.type===`labelLink`||e.type===`label`||e.type===`image`||e.type===`link`)break}return s;function s(i){if(!o||!o._balanced)return n(i);let s=KE(r.sliceSerialize({start:o.end,end:r.now()}));return s.codePointAt(0)!==94||!a.includes(s.slice(1))?n(i):(e.enter(`gfmFootnoteCallLabelMarker`),e.consume(i),e.exit(`gfmFootnoteCallLabelMarker`),t(i))}}function fP(e,t){let n=e.length;for(;n--;)if(e[n][1].type===`labelImage`&&e[n][0]===`enter`){e[n][1];break}e[n+1][1].type=`data`,e[n+3][1].type=`gfmFootnoteCallLabelMarker`;let r={type:`gfmFootnoteCall`,start:Object.assign({},e[n+3][1].start),end:Object.assign({},e[e.length-1][1].end)},i={type:`gfmFootnoteCallMarker`,start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};i.end.column++,i.end.offset++,i.end._bufferIndex++;let a={type:`gfmFootnoteCallString`,start:Object.assign({},i.end),end:Object.assign({},e[e.length-1][1].start)},o={type:`chunkString`,contentType:`string`,start:Object.assign({},a.start),end:Object.assign({},a.end)},s=[e[n+1],e[n+2],[`enter`,r,t],e[n+3],e[n+4],[`enter`,i,t],[`exit`,i,t],[`enter`,a,t],[`enter`,o,t],[`exit`,o,t],[`exit`,a,t],e[e.length-2],e[e.length-1],[`exit`,r,t]];return e.splice(n,e.length-n+1,...s),e}function pP(e,t,n){let r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]),a=0,o;return s;function s(t){return e.enter(`gfmFootnoteCall`),e.enter(`gfmFootnoteCallLabelMarker`),e.consume(t),e.exit(`gfmFootnoteCallLabelMarker`),c}function c(t){return t===94?(e.enter(`gfmFootnoteCallMarker`),e.consume(t),e.exit(`gfmFootnoteCallMarker`),e.enter(`gfmFootnoteCallString`),e.enter(`chunkString`).contentType=`string`,l):n(t)}function l(s){if(a>999||s===93&&!o||s===null||s===91||tD(s))return n(s);if(s===93){e.exit(`chunkString`);let a=e.exit(`gfmFootnoteCallString`);return i.includes(KE(r.sliceSerialize(a)))?(e.enter(`gfmFootnoteCallLabelMarker`),e.consume(s),e.exit(`gfmFootnoteCallLabelMarker`),e.exit(`gfmFootnoteCall`),t):n(s)}return tD(s)||(o=!0),a++,e.consume(s),s===92?u:l}function u(t){return t===91||t===92||t===93?(e.consume(t),a++,l):l(t)}}function mP(e,t,n){let r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]),a,o=0,s;return c;function c(t){return e.enter(`gfmFootnoteDefinition`)._container=!0,e.enter(`gfmFootnoteDefinitionLabel`),e.enter(`gfmFootnoteDefinitionLabelMarker`),e.consume(t),e.exit(`gfmFootnoteDefinitionLabelMarker`),l}function l(t){return t===94?(e.enter(`gfmFootnoteDefinitionMarker`),e.consume(t),e.exit(`gfmFootnoteDefinitionMarker`),e.enter(`gfmFootnoteDefinitionLabelString`),e.enter(`chunkString`).contentType=`string`,u):n(t)}function u(t){if(o>999||t===93&&!s||t===null||t===91||tD(t))return n(t);if(t===93){e.exit(`chunkString`);let n=e.exit(`gfmFootnoteDefinitionLabelString`);return a=KE(r.sliceSerialize(n)),e.enter(`gfmFootnoteDefinitionLabelMarker`),e.consume(t),e.exit(`gfmFootnoteDefinitionLabelMarker`),e.exit(`gfmFootnoteDefinitionLabel`),f}return tD(t)||(s=!0),o++,e.consume(t),t===92?d:u}function d(t){return t===91||t===92||t===93?(e.consume(t),o++,u):u(t)}function f(t){return t===58?(e.enter(`definitionMarker`),e.consume(t),e.exit(`definitionMarker`),i.includes(a)||i.push(a),sD(e,p,`gfmFootnoteDefinitionWhitespace`)):n(t)}function p(e){return t(e)}}function hP(e,t,n){return e.check(xD,t,e.attempt(lP,t,n))}function gP(e){e.exit(`gfmFootnoteDefinition`)}function _P(e,t,n){let r=this;return sD(e,i,`gfmFootnoteDefinitionIndent`,5);function i(e){let i=r.events[r.events.length-1];return i&&i[1].type===`gfmFootnoteDefinitionIndent`&&i[2].sliceSerialize(i[1],!0).length===4?t(e):n(e)}}function vP(e){let t=(e||{}).singleTilde,n={name:`strikethrough`,tokenize:i,resolveAll:r};return t??=!0,{text:{126:n},insideSpan:{null:[n]},attentionMarkers:{null:[126]}};function r(e,t){let n=-1;for(;++n<e.length;)if(e[n][0]===`enter`&&e[n][1].type===`strikethroughSequenceTemporary`&&e[n][1]._close){let r=n;for(;r--;)if(e[r][0]===`exit`&&e[r][1].type===`strikethroughSequenceTemporary`&&e[r][1]._open&&e[n][1].end.offset-e[n][1].start.offset===e[r][1].end.offset-e[r][1].start.offset){e[n][1].type=`strikethroughSequence`,e[r][1].type=`strikethroughSequence`;let i={type:`strikethrough`,start:Object.assign({},e[r][1].start),end:Object.assign({},e[n][1].end)},a={type:`strikethroughText`,start:Object.assign({},e[r][1].end),end:Object.assign({},e[n][1].start)},o=[[`enter`,i,t],[`enter`,e[r][1],t],[`exit`,e[r][1],t],[`enter`,a,t]],s=t.parser.constructs.insideSpan.null;s&&zE(o,o.length,0,hD(s,e.slice(r+1,n),t)),zE(o,o.length,0,[[`exit`,a,t],[`enter`,e[n][1],t],[`exit`,e[n][1],t],[`exit`,i,t]]),zE(e,r-1,n-r+3,o),n=r+o.length-2;break}}for(n=-1;++n<e.length;)e[n][1].type===`strikethroughSequenceTemporary`&&(e[n][1].type=`data`);return e}function i(e,n,r){let i=this.previous,a=this.events,o=0;return s;function s(t){return i===126&&a[a.length-1][1].type!==`characterEscape`?r(t):(e.enter(`strikethroughSequenceTemporary`),c(t))}function c(a){let s=mD(i);if(a===126)return o>1?r(a):(e.consume(a),o++,c);if(o<2&&!t)return r(a);let l=e.exit(`strikethroughSequenceTemporary`),u=mD(a);return l._open=!u||u===2&&!!s,l._close=!s||s===2&&!!u,n(a)}}}var yP=class{constructor(){this.map=[]}add(e,t,n){bP(this,e,t,n)}consume(e){if(this.map.sort(function(e,t){return e[0]-t[0]}),this.map.length===0)return;let t=this.map.length,n=[];for(;t>0;)--t,n.push(e.slice(this.map[t][0]+this.map[t][1]),this.map[t][2]),e.length=this.map[t][0];n.push(e.slice()),e.length=0;let r=n.pop();for(;r;){for(let t of r)e.push(t);r=n.pop()}this.map.length=0}};function bP(e,t,n,r){let i=0;if(n!==0||r.length!==0){for(;i<e.map.length;){if(e.map[i][0]===t){e.map[i][1]+=n,e.map[i][2].push(...r);return}i+=1}e.map.push([t,n,r])}}function xP(e,t){let n=!1,r=[];for(;t<e.length;){let i=e[t];if(n){if(i[0]===`enter`)i[1].type===`tableContent`&&r.push(e[t+1][1].type===`tableDelimiterMarker`?`left`:`none`);else if(i[1].type===`tableContent`){if(e[t-1][1].type===`tableDelimiterMarker`){let e=r.length-1;r[e]=r[e]===`left`?`center`:`right`}}else if(i[1].type===`tableDelimiterRow`)break}else i[0]===`enter`&&i[1].type===`tableDelimiterRow`&&(n=!0);t+=1}return r}function SP(){return{flow:{null:{name:`table`,tokenize:CP,resolveAll:wP}}}}function CP(e,t,n){let r=this,i=0,a=0,o;return s;function s(e){let t=r.events.length-1;for(;t>-1;){let e=r.events[t][1].type;if(e===`lineEnding`||e===`linePrefix`)t--;else break}let i=t>-1?r.events[t][1].type:null,a=i===`tableHead`||i===`tableRow`?S:c;return a===S&&r.parser.lazy[r.now().line]?n(e):a(e)}function c(t){return e.enter(`tableHead`),e.enter(`tableRow`),l(t)}function l(e){return e===124?u(e):(o=!0,a+=1,u(e))}function u(t){return t===null?n(t):eD(t)?a>1?(a=0,r.interrupt=!0,e.exit(`tableRow`),e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),p):n(t):nD(t)?sD(e,u,`whitespace`)(t):(a+=1,o&&(o=!1,i+=1),t===124?(e.enter(`tableCellDivider`),e.consume(t),e.exit(`tableCellDivider`),o=!0,u):(e.enter(`data`),d(t)))}function d(t){return t===null||t===124||tD(t)?(e.exit(`data`),u(t)):(e.consume(t),t===92?f:d)}function f(t){return t===92||t===124?(e.consume(t),d):d(t)}function p(t){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(t):(e.enter(`tableDelimiterRow`),o=!1,nD(t)?sD(e,m,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):m(t))}function m(t){return t===45||t===58?g(t):t===124?(o=!0,e.enter(`tableCellDivider`),e.consume(t),e.exit(`tableCellDivider`),h):x(t)}function h(t){return nD(t)?sD(e,g,`whitespace`)(t):g(t)}function g(t){return t===58?(a+=1,o=!0,e.enter(`tableDelimiterMarker`),e.consume(t),e.exit(`tableDelimiterMarker`),_):t===45?(a+=1,_(t)):t===null||eD(t)?b(t):x(t)}function _(t){return t===45?(e.enter(`tableDelimiterFiller`),v(t)):x(t)}function v(t){return t===45?(e.consume(t),v):t===58?(o=!0,e.exit(`tableDelimiterFiller`),e.enter(`tableDelimiterMarker`),e.consume(t),e.exit(`tableDelimiterMarker`),y):(e.exit(`tableDelimiterFiller`),y(t))}function y(t){return nD(t)?sD(e,b,`whitespace`)(t):b(t)}function b(n){return n===124?m(n):n===null||eD(n)?!o||i!==a?x(n):(e.exit(`tableDelimiterRow`),e.exit(`tableHead`),t(n)):x(n)}function x(e){return n(e)}function S(t){return e.enter(`tableRow`),C(t)}function C(n){return n===124?(e.enter(`tableCellDivider`),e.consume(n),e.exit(`tableCellDivider`),C):n===null||eD(n)?(e.exit(`tableRow`),t(n)):nD(n)?sD(e,C,`whitespace`)(n):(e.enter(`data`),w(n))}function w(t){return t===null||t===124||tD(t)?(e.exit(`data`),C(t)):(e.consume(t),t===92?T:w)}function T(t){return t===92||t===124?(e.consume(t),w):w(t)}}function wP(e,t){let n=-1,r=!0,i=0,a=[0,0,0,0],o=[0,0,0,0],s=!1,c=0,l,u,d,f=new yP;for(;++n<e.length;){let p=e[n],m=p[1];p[0]===`enter`?m.type===`tableHead`?(s=!1,c!==0&&(EP(f,t,c,l,u),u=void 0,c=0),l={type:`table`,start:Object.assign({},m.start),end:Object.assign({},m.end)},f.add(n,0,[[`enter`,l,t]])):m.type===`tableRow`||m.type===`tableDelimiterRow`?(r=!0,d=void 0,a=[0,0,0,0],o=[0,n+1,0,0],s&&(s=!1,u={type:`tableBody`,start:Object.assign({},m.start),end:Object.assign({},m.end)},f.add(n,0,[[`enter`,u,t]])),i=m.type===`tableDelimiterRow`?2:u?3:1):i&&(m.type===`data`||m.type===`tableDelimiterMarker`||m.type===`tableDelimiterFiller`)?(r=!1,o[2]===0&&(a[1]!==0&&(o[0]=o[1],d=TP(f,t,a,i,void 0,d),a=[0,0,0,0]),o[2]=n)):m.type===`tableCellDivider`&&(r?r=!1:(a[1]!==0&&(o[0]=o[1],d=TP(f,t,a,i,void 0,d)),a=o,o=[a[1],n,0,0])):m.type===`tableHead`?(s=!0,c=n):m.type===`tableRow`||m.type===`tableDelimiterRow`?(c=n,a[1]===0?o[1]!==0&&(d=TP(f,t,o,i,n,d)):(o[0]=o[1],d=TP(f,t,a,i,n,d)),i=0):i&&(m.type===`data`||m.type===`tableDelimiterMarker`||m.type===`tableDelimiterFiller`)&&(o[3]=n)}for(c!==0&&EP(f,t,c,l,u),f.consume(t.events),n=-1;++n<t.events.length;){let e=t.events[n];e[0]===`enter`&&e[1].type===`table`&&(e[1]._align=xP(t.events,n))}return e}function TP(e,t,n,r,i,a){let o=r===1?`tableHeader`:r===2?`tableDelimiter`:`tableData`;n[0]!==0&&(a.end=Object.assign({},DP(t.events,n[0])),e.add(n[0],0,[[`exit`,a,t]]));let s=DP(t.events,n[1]);if(a={type:o,start:Object.assign({},s),end:Object.assign({},s)},e.add(n[1],0,[[`enter`,a,t]]),n[2]!==0){let i=DP(t.events,n[2]),a=DP(t.events,n[3]),o={type:`tableContent`,start:Object.assign({},i),end:Object.assign({},a)};if(e.add(n[2],0,[[`enter`,o,t]]),r!==2){let r=t.events[n[2]],i=t.events[n[3]];if(r[1].end=Object.assign({},i[1].end),r[1].type=`chunkText`,r[1].contentType=`text`,n[3]>n[2]+1){let t=n[2]+1,r=n[3]-n[2]-1;e.add(t,r,[])}}e.add(n[3]+1,0,[[`exit`,o,t]])}return i!==void 0&&(a.end=Object.assign({},DP(t.events,i)),e.add(i,0,[[`exit`,a,t]]),a=void 0),a}function EP(e,t,n,r,i){let a=[],o=DP(t.events,n);i&&(i.end=Object.assign({},o),a.push([`exit`,i,t])),r.end=Object.assign({},o),a.push([`exit`,r,t]),e.add(n+1,0,a)}function DP(e,t){let n=e[t],r=n[0]===`enter`?`start`:`end`;return n[1][r]}var OP={name:`tasklistCheck`,tokenize:AP};function kP(){return{text:{91:OP}}}function AP(e,t,n){let r=this;return i;function i(t){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?n(t):(e.enter(`taskListCheck`),e.enter(`taskListCheckMarker`),e.consume(t),e.exit(`taskListCheckMarker`),a)}function a(t){return tD(t)?(e.enter(`taskListCheckValueUnchecked`),e.consume(t),e.exit(`taskListCheckValueUnchecked`),o):t===88||t===120?(e.enter(`taskListCheckValueChecked`),e.consume(t),e.exit(`taskListCheckValueChecked`),o):n(t)}function o(t){return t===93?(e.enter(`taskListCheckMarker`),e.consume(t),e.exit(`taskListCheckMarker`),e.exit(`taskListCheck`),s):n(t)}function s(r){return eD(r)?t(r):nD(r)?e.check({tokenize:jP},t,n)(r):n(r)}}function jP(e,t,n){return sD(e,r,`whitespace`);function r(e){return e===null?n(e):t(e)}}function MP(e){return HE([JN(),uP(),vP(e),SP(),kP()])}var NP={};function PP(e){let t=this,n=e||NP,r=t.data(),i=r.micromarkExtensions||=[],a=r.fromMarkdownExtensions||=[],o=r.toMarkdownExtensions||=[];i.push(MP(n)),a.push(LN()),o.push(RN(n))}async function FP(e,t){return sw(`/resolve-link${lw({path:e,from_doc_id:t})}`)}function IP(e){if(!e||e.trim()===``)return`empty`;let t=e.trim();return/^[a-z][a-z0-9+.-]*:/i.test(t)?`external`:t.startsWith(`#`)?`anchor`:t.startsWith(`/`)?`absolute`:`relative`}function LP({href:e,children:t,fromDocId:n,...r}){let i=Rx(),a=IP(e),[o,s]=(0,w.useState)(!1),[c,l]=(0,w.useState)(!1),[u,d]=(0,w.useState)(null),[f,p]=(0,w.useState)(null);if(a===`external`)return(0,G.jsx)(`a`,{href:e,target:`_blank`,rel:`noopener noreferrer`,...r,children:t});if(a===`anchor`||a===`absolute`||a===`empty`)return(0,G.jsx)(`a`,{href:e,...r,children:t});let m=(0,G.jsxs)(Bd,{href:e,onClick:async t=>{if(t.preventDefault(),c)return;if(u&&u.matches.length===1){let e=`/document/${u.matches[0].document_id}${u.anchor??``}`;i(e),s(!1);return}let r=e;try{r=decodeURIComponent(e)}catch{}l(!0),p(null);try{let e=await FP(r,n);if(d(e),e.matches.length===1){let t=e.matches[0];i(`/document/${t.document_id}${e.anchor??``}`);return}s(!0)}catch(e){p(e instanceof Error?e.message:String(e)),s(!0)}finally{l(!1)}},style:{cursor:c?`wait`:`pointer`},...r,children:[t,c&&(0,G.jsx)(cl,{size:`xs`,style:{marginLeft:4,verticalAlign:`middle`}})]});return!o||!u||u.matches.length===1&&!f?m:(0,G.jsxs)(el,{opened:o,onChange:s,position:`bottom-start`,withArrow:!0,shadow:`md`,width:360,children:[(0,G.jsx)(el.Target,{children:m}),(0,G.jsx)(el.Dropdown,{children:f?(0,G.jsxs)(C_,{gap:`xs`,children:[(0,G.jsx)(Y,{size:`sm`,c:`red`,children:`Couldn't resolve link`}),(0,G.jsx)(Y,{size:`xs`,c:`dimmed`,children:f}),(0,G.jsx)(bp,{size:`xs`,variant:`subtle`,onClick:()=>s(!1),children:`Dismiss`})]}):u.matches.length===0?(0,G.jsxs)(C_,{gap:`xs`,children:[(0,G.jsxs)(Y,{size:`sm`,fw:500,children:[`No document found for `,(0,G.jsx)(Y,{component:`span`,ff:`monospace`,children:u.tried_path})]}),(0,G.jsx)(Y,{size:`xs`,c:`dimmed`,children:`The path didn't match a source file or document title in the knowledge base.`}),(0,G.jsxs)(Y,{size:`xs`,c:`dimmed`,children:[`For reliable cross-references, link by ID: `,(0,G.jsx)(Y,{component:`span`,ff:`monospace`,children:`[Text](document-uuid)`}),`. Search results show the UUID after each title.`]}),(0,G.jsxs)(bp,{size:`xs`,variant:`light`,onClick:()=>{let e=u.tried_path.split(`/`).pop()??u.tried_path;i(`/search?q=${encodeURIComponent(e)}`),s(!1)},children:[`Search for "`,u.tried_path.split(`/`).pop(),`" instead`]})]}):(0,G.jsxs)(C_,{gap:`xs`,children:[(0,G.jsxs)(Y,{size:`sm`,fw:500,children:[u.matches.length,` possible matches for `,(0,G.jsx)(Y,{component:`span`,ff:`monospace`,children:u.tried_path})]}),(0,G.jsx)(lm,{size:`sm`,spacing:`xs`,children:u.matches.map(e=>(0,G.jsxs)(lm.Item,{children:[(0,G.jsx)(Bd,{onClick:t=>{t.preventDefault(),i(`/document/${e.document_id}${u.anchor??``}`),s(!1)},style:{cursor:`pointer`},children:e.title}),e.source_path&&(0,G.jsx)(Y,{size:`xs`,c:`dimmed`,ff:`monospace`,children:e.source_path}),(0,G.jsxs)(Y,{size:`xs`,c:`dimmed`,children:[`matched by: `,e.match_method.replace(`_`,` `)]})]},e.document_id))})]})})]})}var RP={markdown:`_markdown_i11gl_1`};function zP({content:e,defaultView:t=`rendered`,maxHeight:n=600,showToggle:r=!0,documentId:i}){let[a,o]=(0,w.useState)(t),s=(0,w.useMemo)(()=>({a:e=>(0,G.jsx)(LP,{...e,fromDocId:i})}),[i]);return(0,G.jsxs)(C_,{gap:`xs`,children:[r&&(0,G.jsx)(c_,{size:`xs`,value:a,onChange:o,data:[{label:`Rendered`,value:`rendered`},{label:`Raw`,value:`raw`}],w:200}),a===`rendered`?(0,G.jsx)(`div`,{className:RP.markdown,style:{maxHeight:n,overflow:`auto`},children:(0,G.jsx)(Aj,{remarkPlugins:[PP],components:s,children:e||`*(empty)*`})}):(0,G.jsx)(Ap,{block:!0,style:{whiteSpace:`pre-wrap`,maxHeight:n,overflow:`auto`},children:e||`(empty)`})]})}function BP(e,t){e.invalidateQueries({queryKey:t?[`document`,t]:[`document`]}),e.invalidateQueries({queryKey:t?[`document-audit`,t]:[`document-audit`]}),e.invalidateQueries({queryKey:[`dashboard`]}),e.invalidateQueries({queryKey:[`dashboard-recent`]}),e.invalidateQueries({queryKey:[`search`]}),e.invalidateQueries({queryKey:[`trash`]}),e.invalidateQueries({queryKey:[`project-documents`]})}async function VP(){return sw(`/projects`)}async function HP(){return sw(`/metadata-keys`)}async function UP(e,t){return sw(`/projects`,{method:`POST`,body:JSON.stringify({name:e,description:t})})}async function wee(e,t,n){return sw(`/projects/${e}`,{method:`PUT`,body:JSON.stringify({name:t,description:n})})}async function WP(e){return sw(`/projects/${e}`,{method:`DELETE`})}function GP(){return ib({queryKey:[`projects`],queryFn:VP,staleTime:6e4})}function KP(){return ib({queryKey:[`metadata-keys`],queryFn:HP,staleTime:6e4})}function qP(e,t){Z_.show({title:e,message:t||``,color:`green`,autoClose:4e3})}function JP(e,t){Z_.show({title:e,message:t||``,color:`red`,autoClose:6e3})}function YP(e){return e instanceof aw&&(Z_.show({title:`Ingestion lands in v0.7`,message:e.note??"Use `cerefox ingest <file>` from the CLI for now — it still works against your Cerefox.",color:`yellow`,autoClose:8e3}),!0)}function XP(e){if(typeof e!=`string`)return JSON.stringify(e);try{return JSON.parse(e),JSON.stringify(e)}catch{return e}}function ZP(){let{id:e}=Hx(),t=Rx(),n=Uy(),{data:r,isLoading:i}=ib({queryKey:[`document`,e],queryFn:()=>sT(e),enabled:!!e}),{data:a}=GP(),{data:o}=KP(),[s,c]=(0,w.useState)(``),[l,u]=(0,w.useState)(``),[d,f]=(0,w.useState)([]),[p,m]=(0,w.useState)([]),[h,g]=(0,w.useState)(!1),[_,v]=(0,w.useState)(`edit`);r&&!h&&(c(r.doc_title||``),u(r.full_content||``),f(r.project_ids||[]),m(Object.entries(r.doc_metadata||{}).map(([e,t])=>({key:e,value:XP(t)}))),g(!0));let y=ab({mutationFn:()=>{let t={};for(let e of p)if(e.key.trim()&&e.value.trim()){let n=e.value.trim(),r=n;try{r=JSON.parse(n)}catch{}t[e.key.trim()]=r}return lT(e,{title:s,content:l,project_ids:d,metadata:t,expected_content_hash:r?.content_hash??null})},onSuccess:r=>{r.success?(BP(n,e),qP(`Document saved`,r.reindexed?`Content re-indexed`:`Metadata updated`),t(`/document/${e}`)):r.error&&JP(`Save failed`,r.error)},onError:e=>{if(e instanceof iw){let t={};try{t=JSON.parse(e.body)}catch{}if(e.status===409&&t.error===`document is in the trash`){JP(`Document is in the trash`,t.message??`Restore it from the Trash page first, then save again.`);return}if(e.status===422){JP(`Broken document links`,t.message??`The content links document id(s) that don't exist — fix or remove them.`);return}if(e.status===409){JP(`Edit conflict`,`This document changed while you were editing it (another writer saved a newer version). Open the document in a new tab, merge your changes, then save again.`);return}}YP(e)||JP(`Save failed`,e instanceof Error?e.message:String(e))}}),b=a?.map(e=>({value:e.id,label:e.name}))||[],x=new Map((o??[]).map(e=>[e.key,e.doc_count])),S=o?.map(e=>e.key)||[];if(i||!h)return(0,G.jsx)(Pp,{size:`lg`,children:(0,G.jsx)(Y,{c:`dimmed`,mt:`xl`,children:`Loading...`})});let C=(0,G.jsxs)(El,{children:[(0,G.jsx)(bp,{type:`submit`,loading:y.isPending,children:`Save`}),(0,G.jsx)(bp,{type:`button`,variant:`subtle`,onClick:()=>t(`/document/${e}`),children:`Cancel`})]});return(0,G.jsxs)(Pp,{size:`lg`,children:[(0,G.jsx)(R_,{order:2,mb:`md`,children:`Edit Document`}),(0,G.jsx)(Y,{size:`sm`,c:`dimmed`,mb:`md`,children:`If content changes, the document will be re-chunked and re-embedded.`}),(0,G.jsx)(`form`,{onSubmit:e=>{e.preventDefault(),y.mutate()},children:(0,G.jsxs)(C_,{gap:`md`,children:[(0,G.jsx)(j_,{label:`Title`,value:s,onChange:e=>c(e.currentTarget.value),required:!0}),b.length>0&&(0,G.jsx)(Oh,{label:`Projects`,data:b,value:d,onChange:f,clearable:!0,searchable:!0}),(0,G.jsxs)(`div`,{children:[(0,G.jsx)(Y,{size:`sm`,fw:500,mb:`xs`,children:`Metadata`}),(0,G.jsxs)(C_,{gap:`xs`,children:[p.map((e,t)=>(0,G.jsxs)(El,{gap:`xs`,children:[(0,G.jsx)(cp,{placeholder:`Key`,data:S,value:e.key,onChange:n=>{let r=[...p];r[t]={...e,key:n},m(r)},renderOption:({option:e})=>(0,G.jsxs)(El,{justify:`space-between`,w:`100%`,wrap:`nowrap`,children:[(0,G.jsx)(`span`,{children:e.value}),(0,G.jsxs)(Y,{size:`xs`,c:`dimmed`,children:[x.get(e.value),` docs`]})]}),w:200,size:`sm`}),(0,G.jsx)(j_,{placeholder:`Value`,value:e.value,onChange:n=>{let r=[...p];r[t]={...e,value:n.currentTarget.value},m(r)},w:250,size:`sm`}),(0,G.jsx)(gl,{variant:`subtle`,color:`red`,onClick:()=>m(p.filter((e,n)=>n!==t)),children:(0,G.jsx)(tw,{size:14})})]},t)),(0,G.jsx)(bp,{variant:`light`,size:`xs`,w:140,leftSection:(0,G.jsx)(KC,{size:14}),onClick:()=>m([...p,{key:``,value:``}]),children:`Add field`})]})]}),C,(0,G.jsxs)(`div`,{children:[(0,G.jsxs)(El,{justify:`space-between`,mb:`xs`,children:[(0,G.jsx)(Y,{size:`sm`,fw:500,children:`Content`}),(0,G.jsx)(c_,{size:`xs`,value:_,onChange:v,data:[{label:`Edit`,value:`edit`},{label:`Preview`,value:`preview`}],w:160})]}),_===`edit`?(0,G.jsx)(nm,{value:l,onChange:e=>u(e.currentTarget.value),minRows:15,autosize:!0,required:!0,styles:{input:{fontFamily:`monospace`,fontSize:13}}}):(0,G.jsx)(`div`,{style:{border:`1px solid var(--mantine-color-gray-3)`,borderRadius:8,padding:12,minHeight:300},children:(0,G.jsx)(zP,{content:l,defaultView:`rendered`,maxHeight:500,showToggle:!1})})]}),(0,G.jsxs)(C_,{gap:`xs`,children:[C,y.data&&!y.data.success&&(0,G.jsx)(Y,{c:`red`,size:`sm`,children:y.data.error})]})]})})]})}async function QP(e=50){return sw(`/documents/trash?limit=${e}`)}async function $P(e){await sw(`/documents/${e}/restore`,{method:`POST`})}async function eF(e){await sw(`/documents/${e}/purge`,{method:`DELETE`})}var tF=class{diff(e,t,n={}){let r;typeof n==`function`?(r=n,n={}):`callback`in n&&(r=n.callback);let i=this.castInput(e,n),a=this.castInput(t,n),o=this.removeEmpty(this.tokenize(i,n)),s=this.removeEmpty(this.tokenize(a,n));return this.diffWithOptionsObj(o,s,n,r)}diffWithOptionsObj(e,t,n,r){let i=e=>{if(e=this.postProcess(e,n),r){setTimeout(function(){r(e)},0);return}return e},a=t.length,o=e.length,s=1,c=a+o;n.maxEditLength!=null&&(c=Math.min(c,n.maxEditLength));let l=n.timeout??1/0,u=Date.now()+l,d=[{oldPos:-1,lastComponent:void 0}],f=this.extractCommon(d[0],t,e,0,n);if(d[0].oldPos+1>=o&&f+1>=a)return i(this.buildValues(d[0].lastComponent,t,e));let p=-1/0,m=1/0,h=()=>{for(let r=Math.max(p,-s);r<=Math.min(m,s);r+=2){let s,c=d[r-1],l=d[r+1];c&&(d[r-1]=void 0);let u=!1;if(l){let e=l.oldPos-r;u=l&&0<=e&&e<a}let h=c&&c.oldPos+1<o;if(!u&&!h){d[r]=void 0;continue}if(s=!h||u&&c.oldPos<l.oldPos?this.addToPath(l,!0,!1,0,n):this.addToPath(c,!1,!0,1,n),f=this.extractCommon(s,t,e,r,n),s.oldPos+1>=o&&f+1>=a)return i(this.buildValues(s.lastComponent,t,e))||!0;d[r]=s,s.oldPos+1>=o&&(m=Math.min(m,r-1)),f+1>=a&&(p=Math.max(p,r+1))}s++};if(r)(function e(){setTimeout(function(){if(s>c||Date.now()>u)return r(void 0);h()||e()},0)})();else for(;s<=c&&Date.now()<=u;){let e=h();if(e)return e}}addToPath(e,t,n,r,i){let a=e.lastComponent;return a&&!i.oneChangePerToken&&a.added===t&&a.removed===n?{oldPos:e.oldPos+r,lastComponent:{count:a.count+1,added:t,removed:n,previousComponent:a.previousComponent}}:{oldPos:e.oldPos+r,lastComponent:{count:1,added:t,removed:n,previousComponent:a}}}extractCommon(e,t,n,r,i){let a=t.length,o=n.length,s=e.oldPos,c=s-r,l=0;for(;c+1<a&&s+1<o&&this.equals(n[s+1],t[c+1],i);)c++,s++,l++,i.oneChangePerToken&&(e.lastComponent={count:1,previousComponent:e.lastComponent,added:!1,removed:!1});return l&&!i.oneChangePerToken&&(e.lastComponent={count:l,previousComponent:e.lastComponent,added:!1,removed:!1}),e.oldPos=s,c}equals(e,t,n){return n.comparator?n.comparator(e,t):e===t||!!n.ignoreCase&&e.toLowerCase()===t.toLowerCase()}removeEmpty(e){let t=[];for(let n=0;n<e.length;n++)e[n]&&t.push(e[n]);return t}castInput(e,t){return e}tokenize(e,t){return Array.from(e)}join(e){return e.join(``)}postProcess(e,t){return e}get useLongestToken(){return!1}buildValues(e,t,n){let r=[],i;for(;e;)r.push(e),i=e.previousComponent,delete e.previousComponent,e=i;r.reverse();let a=r.length,o=0,s=0,c=0;for(;o<a;o++){let e=r[o];if(e.removed)e.value=this.join(n.slice(c,c+e.count)),c+=e.count;else{if(!e.added&&this.useLongestToken){let r=t.slice(s,s+e.count);r=r.map(function(e,t){let r=n[c+t];return r.length>e.length?r:e}),e.value=this.join(r)}else e.value=this.join(t.slice(s,s+e.count));s+=e.count,e.added||(c+=e.count)}}return r}};new class extends tF{};function nF(e,t){let n;for(n=0;n<e.length&&n<t.length;n++)if(e[n]!=t[n])return e.slice(0,n);return e.slice(0,n)}function rF(e,t){let n;if(!e||!t||e[e.length-1]!=t[t.length-1])return``;for(n=0;n<e.length&&n<t.length;n++)if(e[e.length-(n+1)]!=t[t.length-(n+1)])return e.slice(-n);return e.slice(-n)}function iF(e,t,n){if(e.slice(0,t.length)!=t)throw Error(`string ${JSON.stringify(e)} doesn't start with prefix ${JSON.stringify(t)}; this is a bug`);return n+e.slice(t.length)}function aF(e,t,n){if(!t)return e+n;if(e.slice(-t.length)!=t)throw Error(`string ${JSON.stringify(e)} doesn't end with suffix ${JSON.stringify(t)}; this is a bug`);return e.slice(0,-t.length)+n}function oF(e,t){return iF(e,t,``)}function sF(e,t){return aF(e,t,``)}function cF(e,t){return t.slice(0,lF(e,t))}function lF(e,t){let n=0;e.length>t.length&&(n=e.length-t.length);let r=t.length;e.length<t.length&&(r=e.length);let i=Array(r),a=0;i[0]=0;for(let e=1;e<r;e++){for(t[e]==t[a]?i[e]=i[a]:i[e]=a;a>0&&t[e]!=t[a];)a=i[a];t[e]==t[a]&&a++}a=0;for(let r=n;r<e.length;r++){for(;a>0&&e[r]!=t[a];)a=i[a];e[r]==t[a]&&a++}return a}function uF(e,t){let n=[];for(let r of Array.from(t.segment(e))){let e=r.segment;n.length&&/\s/.test(n[n.length-1])&&/\s/.test(e)?n[n.length-1]+=e:n.push(e)}return n}function dF(e,t){if(t)return pF(e,t)[1];let n;for(n=e.length-1;n>=0&&e[n].match(/\s/);n--);return e.substring(n+1)}function fF(e,t){if(t)return pF(e,t)[0];let n=e.match(/^\s*/);return n?n[0]:``}function pF(e,t){if(!t)return[fF(e),dF(e)];if(t.resolvedOptions().granularity!=`word`)throw Error(`The segmenter passed must have a granularity of "word"`);let n=uF(e,t),r=n[0],i=n[n.length-1];return[/\s/.test(r)?r:``,/\s/.test(i)?i:``]}var mF=`a-zA-Z0-9_\\u{AD}\\u{C0}-\\u{D6}\\u{D8}-\\u{F6}\\u{F8}-\\u{2C6}\\u{2C8}-\\u{2D7}\\u{2DE}-\\u{2FF}\\u{1E00}-\\u{1EFF}`,hF=RegExp(`[${mF}]+|\\s+|[^${mF}]`,`ug`);new class extends tF{equals(e,t,n){return n.ignoreCase&&(e=e.toLowerCase(),t=t.toLowerCase()),e.trim()===t.trim()}tokenize(e,t={}){let n;if(t.intlSegmenter){let r=t.intlSegmenter;if(r.resolvedOptions().granularity!=`word`)throw Error(`The segmenter passed must have a granularity of "word"`);n=uF(e,r)}else n=e.match(hF)||[];let r=[],i=null;return n.forEach(e=>{/\s/.test(e)?i==null?r.push(e):r.push(r.pop()+e):i!=null&&/\s/.test(i)?r[r.length-1]==i?r.push(r.pop()+e):r.push(i+e):r.push(e),i=e}),r}join(e){return e.map((e,t)=>t==0?e:e.replace(/^\s+/,``)).join(``)}postProcess(e,t){if(!e||t.oneChangePerToken)return e;let n=null,r=null,i=null;return e.forEach(e=>{e.added?r=e:e.removed?i=e:((r||i)&&gF(n,i,r,e,t.intlSegmenter),n=e,r=null,i=null)}),(r||i)&&gF(n,i,r,null,t.intlSegmenter),e}};function gF(e,t,n,r,i){if(t&&n){let[a,o]=pF(t.value,i),[s,c]=pF(n.value,i);if(e){let r=nF(a,s);e.value=aF(e.value,s,r),t.value=oF(t.value,r),n.value=oF(n.value,r)}if(r){let e=rF(o,c);r.value=iF(r.value,c,e),t.value=sF(t.value,e),n.value=sF(n.value,e)}}else if(n){if(e){let e=fF(n.value,i);n.value=n.value.substring(e.length)}if(r){let e=fF(r.value,i);r.value=r.value.substring(e.length)}}else if(e&&r){let n=fF(r.value,i),[a,o]=pF(t.value,i),s=nF(n,a);t.value=oF(t.value,s);let c=rF(oF(n,s),o);t.value=sF(t.value,c),r.value=iF(r.value,n,c),e.value=aF(e.value,n,n.slice(0,n.length-c.length))}else if(r){let e=fF(r.value,i),n=cF(dF(t.value,i),e);t.value=sF(t.value,n)}else if(e){let n=cF(dF(e.value,i),fF(t.value,i));t.value=oF(t.value,n)}}new class extends tF{tokenize(e){let t=RegExp(`(\\r?\\n)|[${mF}]+|[^\\S\\n\\r]+|[^${mF}]`,`ug`);return e.match(t)||[]}};var _F=new class extends tF{constructor(){super(...arguments),this.tokenize=yF}equals(e,t,n){return n.ignoreWhitespace?((!n.newlineIsToken||!e.includes(`
87
+ `))}function c(e,t,n,r){let i=n.enter(`tableCell`),o=n.enter(`phrasing`),s=n.containerPhrasing(e,{...r,before:a,after:a});return o(),i(),s}function l(e,t){return DM(e,{align:t,alignDelimiters:r,padding:n,stringLength:i})}function u(e,t,n){let r=e.children,i=-1,a=[],o=t.enter(`table`);for(;++i<r.length;)a[i]=d(r[i],t,n);return o(),a}function d(e,t,n){let r=e.children,i=-1,a=[],o=t.enter(`tableRow`);for(;++i<r.length;)a[i]=c(r[i],e,t,n);return o(),a}function f(e,t,n){let r=wN.inlineCode(e,t,n);return n.stack.includes(`tableCell`)&&(r=r.replace(/\|/g,`\\$&`)),r}}function PN(){return{exit:{taskListCheckValueChecked:IN,taskListCheckValueUnchecked:IN,paragraph:LN}}}function FN(){return{unsafe:[{atBreak:!0,character:`-`,after:`[:|-]`}],handlers:{listItem:RN}}}function IN(e){let t=this.stack[this.stack.length-2];t.type,t.checked=e.type===`taskListCheckValueChecked`}function LN(e){let t=this.stack[this.stack.length-2];if(t&&t.type===`listItem`&&typeof t.checked==`boolean`){let e=this.stack[this.stack.length-1];e.type;let n=e.children[0];if(n&&n.type===`text`){let r=t.children,i=-1,a;for(;++i<r.length;){let e=r[i];if(e.type===`paragraph`){a=e;break}}a===e&&(n.value=n.value.slice(1),n.value.length===0?e.children.shift():e.position&&n.position&&typeof n.position.start.offset==`number`&&(n.position.start.column++,n.position.start.offset++,e.position.start=Object.assign({},n.position.start)))}}this.exit(e)}function RN(e,t,n,r){let i=e.children[0],a=typeof e.checked==`boolean`&&i&&i.type===`paragraph`,o=`[`+(e.checked?`x`:` `)+`] `,s=n.createTracker(r);a&&s.move(o);let c=wN.listItem(e,t,n,{...r,...s.current()});return a&&(c=c.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,l)),c;function l(e){return e+o}}function zN(){return[Gj(),hM(),bM(),TN(),PN()]}function BN(e){return{extensions:[Kj(),gM(e),xM(),NN(e),FN()]}}var VN={tokenize:tP,partial:!0},HN={tokenize:nP,partial:!0},UN={tokenize:Cee,partial:!0},WN={tokenize:rP,partial:!0},GN={tokenize:iP,partial:!0},KN={name:`wwwAutolink`,tokenize:$N,previous:aP},qN={name:`protocolAutolink`,tokenize:eP,previous:oP},JN={name:`emailAutolink`,tokenize:QN,previous:sP},YN={};function XN(){return{text:YN}}for(var ZN=48;ZN<123;)YN[ZN]=JN,ZN++,ZN===58?ZN=65:ZN===91&&(ZN=97);YN[43]=JN,YN[45]=JN,YN[46]=JN,YN[95]=JN,YN[72]=[JN,qN],YN[104]=[JN,qN],YN[87]=[JN,KN],YN[119]=[JN,KN];function QN(e,t,n){let r=this,i,a;return o;function o(t){return!cP(t)||!sP.call(r,r.previous)||lP(r.events)?n(t):(e.enter(`literalAutolink`),e.enter(`literalAutolinkEmail`),s(t))}function s(t){return cP(t)?(e.consume(t),s):t===64?(e.consume(t),c):n(t)}function c(t){return t===46?e.check(GN,u,l)(t):t===45||t===95||KE(t)?(a=!0,e.consume(t),c):u(t)}function l(t){return e.consume(t),i=!0,c}function u(o){return a&&i&&GE(r.previous)?(e.exit(`literalAutolinkEmail`),e.exit(`literalAutolink`),t(o)):n(o)}}function $N(e,t,n){let r=this;return i;function i(t){return t!==87&&t!==119||!aP.call(r,r.previous)||lP(r.events)?n(t):(e.enter(`literalAutolink`),e.enter(`literalAutolinkWww`),e.check(VN,e.attempt(HN,e.attempt(UN,a),n),n)(t))}function a(n){return e.exit(`literalAutolinkWww`),e.exit(`literalAutolink`),t(n)}}function eP(e,t,n){let r=this,i=``,a=!1;return o;function o(t){return(t===72||t===104)&&oP.call(r,r.previous)&&!lP(r.events)?(e.enter(`literalAutolink`),e.enter(`literalAutolinkHttp`),i+=String.fromCodePoint(t),e.consume(t),s):n(t)}function s(t){if(GE(t)&&i.length<5)return i+=String.fromCodePoint(t),e.consume(t),s;if(t===58){let n=i.toLowerCase();if(n===`http`||n===`https`)return e.consume(t),c}return n(t)}function c(t){return t===47?(e.consume(t),a?l:(a=!0,c)):n(t)}function l(t){return t===null||JE(t)||ZE(t)||eD(t)||$E(t)?n(t):e.attempt(HN,e.attempt(UN,u),n)(t)}function u(n){return e.exit(`literalAutolinkHttp`),e.exit(`literalAutolink`),t(n)}}function tP(e,t,n){let r=0;return i;function i(t){return(t===87||t===119)&&r<3?(r++,e.consume(t),i):t===46&&r===3?(e.consume(t),a):n(t)}function a(e){return e===null?n(e):t(e)}}function nP(e,t,n){let r,i,a;return o;function o(t){return t===46||t===95?e.check(WN,c,s)(t):t===null||ZE(t)||eD(t)||t!==45&&$E(t)?c(t):(a=!0,e.consume(t),o)}function s(t){return t===95?r=!0:(i=r,r=void 0),e.consume(t),o}function c(e){return i||r||!a?n(e):t(e)}}function Cee(e,t){let n=0,r=0;return i;function i(o){return o===40?(n++,e.consume(o),i):o===41&&r<n?a(o):o===33||o===34||o===38||o===39||o===41||o===42||o===44||o===46||o===58||o===59||o===60||o===63||o===93||o===95||o===126?e.check(WN,t,a)(o):o===null||ZE(o)||eD(o)?t(o):(e.consume(o),i)}function a(t){return t===41&&r++,e.consume(t),i}}function rP(e,t,n){return r;function r(o){return o===33||o===34||o===39||o===41||o===42||o===44||o===46||o===58||o===59||o===63||o===95||o===126?(e.consume(o),r):o===38?(e.consume(o),a):o===93?(e.consume(o),i):o===60||o===null||ZE(o)||eD(o)?t(o):n(o)}function i(e){return e===null||e===40||e===91||ZE(e)||eD(e)?t(e):r(e)}function a(e){return GE(e)?o(e):n(e)}function o(t){return t===59?(e.consume(t),r):GE(t)?(e.consume(t),o):n(t)}}function iP(e,t,n){return r;function r(t){return e.consume(t),i}function i(e){return KE(e)?n(e):t(e)}}function aP(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||ZE(e)}function oP(e){return!GE(e)}function sP(e){return!(e===47||cP(e))}function cP(e){return e===43||e===45||e===46||e===95||KE(e)}function lP(e){let t=e.length,n=!1;for(;t--;){let r=e[t][1];if((r.type===`labelLink`||r.type===`labelImage`)&&!r._balanced){n=!0;break}if(r._gfmAutolinkLiteralWalkedInto){n=!1;break}}return e.length>0&&!n&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}var uP={tokenize:vP,partial:!0};function dP(){return{document:{91:{name:`gfmFootnoteDefinition`,tokenize:hP,continuation:{tokenize:gP},exit:_P}},text:{91:{name:`gfmFootnoteCall`,tokenize:mP},93:{name:`gfmPotentialFootnoteCall`,add:`after`,tokenize:fP,resolveTo:pP}}}}function fP(e,t,n){let r=this,i=r.events.length,a=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]),o;for(;i--;){let e=r.events[i][1];if(e.type===`labelImage`){o=e;break}if(e.type===`gfmFootnoteCall`||e.type===`labelLink`||e.type===`label`||e.type===`image`||e.type===`link`)break}return s;function s(i){if(!o||!o._balanced)return n(i);let s=WE(r.sliceSerialize({start:o.end,end:r.now()}));return s.codePointAt(0)!==94||!a.includes(s.slice(1))?n(i):(e.enter(`gfmFootnoteCallLabelMarker`),e.consume(i),e.exit(`gfmFootnoteCallLabelMarker`),t(i))}}function pP(e,t){let n=e.length;for(;n--;)if(e[n][1].type===`labelImage`&&e[n][0]===`enter`){e[n][1];break}e[n+1][1].type=`data`,e[n+3][1].type=`gfmFootnoteCallLabelMarker`;let r={type:`gfmFootnoteCall`,start:Object.assign({},e[n+3][1].start),end:Object.assign({},e[e.length-1][1].end)},i={type:`gfmFootnoteCallMarker`,start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};i.end.column++,i.end.offset++,i.end._bufferIndex++;let a={type:`gfmFootnoteCallString`,start:Object.assign({},i.end),end:Object.assign({},e[e.length-1][1].start)},o={type:`chunkString`,contentType:`string`,start:Object.assign({},a.start),end:Object.assign({},a.end)},s=[e[n+1],e[n+2],[`enter`,r,t],e[n+3],e[n+4],[`enter`,i,t],[`exit`,i,t],[`enter`,a,t],[`enter`,o,t],[`exit`,o,t],[`exit`,a,t],e[e.length-2],e[e.length-1],[`exit`,r,t]];return e.splice(n,e.length-n+1,...s),e}function mP(e,t,n){let r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]),a=0,o;return s;function s(t){return e.enter(`gfmFootnoteCall`),e.enter(`gfmFootnoteCallLabelMarker`),e.consume(t),e.exit(`gfmFootnoteCallLabelMarker`),c}function c(t){return t===94?(e.enter(`gfmFootnoteCallMarker`),e.consume(t),e.exit(`gfmFootnoteCallMarker`),e.enter(`gfmFootnoteCallString`),e.enter(`chunkString`).contentType=`string`,l):n(t)}function l(s){if(a>999||s===93&&!o||s===null||s===91||ZE(s))return n(s);if(s===93){e.exit(`chunkString`);let a=e.exit(`gfmFootnoteCallString`);return i.includes(WE(r.sliceSerialize(a)))?(e.enter(`gfmFootnoteCallLabelMarker`),e.consume(s),e.exit(`gfmFootnoteCallLabelMarker`),e.exit(`gfmFootnoteCall`),t):n(s)}return ZE(s)||(o=!0),a++,e.consume(s),s===92?u:l}function u(t){return t===91||t===92||t===93?(e.consume(t),a++,l):l(t)}}function hP(e,t,n){let r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]),a,o=0,s;return c;function c(t){return e.enter(`gfmFootnoteDefinition`)._container=!0,e.enter(`gfmFootnoteDefinitionLabel`),e.enter(`gfmFootnoteDefinitionLabelMarker`),e.consume(t),e.exit(`gfmFootnoteDefinitionLabelMarker`),l}function l(t){return t===94?(e.enter(`gfmFootnoteDefinitionMarker`),e.consume(t),e.exit(`gfmFootnoteDefinitionMarker`),e.enter(`gfmFootnoteDefinitionLabelString`),e.enter(`chunkString`).contentType=`string`,u):n(t)}function u(t){if(o>999||t===93&&!s||t===null||t===91||ZE(t))return n(t);if(t===93){e.exit(`chunkString`);let n=e.exit(`gfmFootnoteDefinitionLabelString`);return a=WE(r.sliceSerialize(n)),e.enter(`gfmFootnoteDefinitionLabelMarker`),e.consume(t),e.exit(`gfmFootnoteDefinitionLabelMarker`),e.exit(`gfmFootnoteDefinitionLabel`),f}return ZE(t)||(s=!0),o++,e.consume(t),t===92?d:u}function d(t){return t===91||t===92||t===93?(e.consume(t),o++,u):u(t)}function f(t){return t===58?(e.enter(`definitionMarker`),e.consume(t),e.exit(`definitionMarker`),i.includes(a)||i.push(a),rD(e,p,`gfmFootnoteDefinitionWhitespace`)):n(t)}function p(e){return t(e)}}function gP(e,t,n){return e.check(vD,t,e.attempt(uP,t,n))}function _P(e){e.exit(`gfmFootnoteDefinition`)}function vP(e,t,n){let r=this;return rD(e,i,`gfmFootnoteDefinitionIndent`,5);function i(e){let i=r.events[r.events.length-1];return i&&i[1].type===`gfmFootnoteDefinitionIndent`&&i[2].sliceSerialize(i[1],!0).length===4?t(e):n(e)}}function yP(e){let t=(e||{}).singleTilde,n={name:`strikethrough`,tokenize:i,resolveAll:r};return t??=!0,{text:{126:n},insideSpan:{null:[n]},attentionMarkers:{null:[126]}};function r(e,t){let n=-1;for(;++n<e.length;)if(e[n][0]===`enter`&&e[n][1].type===`strikethroughSequenceTemporary`&&e[n][1]._close){let r=n;for(;r--;)if(e[r][0]===`exit`&&e[r][1].type===`strikethroughSequenceTemporary`&&e[r][1]._open&&e[n][1].end.offset-e[n][1].start.offset===e[r][1].end.offset-e[r][1].start.offset){e[n][1].type=`strikethroughSequence`,e[r][1].type=`strikethroughSequence`;let i={type:`strikethrough`,start:Object.assign({},e[r][1].start),end:Object.assign({},e[n][1].end)},a={type:`strikethroughText`,start:Object.assign({},e[r][1].end),end:Object.assign({},e[n][1].start)},o=[[`enter`,i,t],[`enter`,e[r][1],t],[`exit`,e[r][1],t],[`enter`,a,t]],s=t.parser.constructs.insideSpan.null;s&&LE(o,o.length,0,dD(s,e.slice(r+1,n),t)),LE(o,o.length,0,[[`exit`,a,t],[`enter`,e[n][1],t],[`exit`,e[n][1],t],[`exit`,i,t]]),LE(e,r-1,n-r+3,o),n=r+o.length-2;break}}for(n=-1;++n<e.length;)e[n][1].type===`strikethroughSequenceTemporary`&&(e[n][1].type=`data`);return e}function i(e,n,r){let i=this.previous,a=this.events,o=0;return s;function s(t){return i===126&&a[a.length-1][1].type!==`characterEscape`?r(t):(e.enter(`strikethroughSequenceTemporary`),c(t))}function c(a){let s=uD(i);if(a===126)return o>1?r(a):(e.consume(a),o++,c);if(o<2&&!t)return r(a);let l=e.exit(`strikethroughSequenceTemporary`),u=uD(a);return l._open=!u||u===2&&!!s,l._close=!s||s===2&&!!u,n(a)}}}var bP=class{constructor(){this.map=[]}add(e,t,n){xP(this,e,t,n)}consume(e){if(this.map.sort(function(e,t){return e[0]-t[0]}),this.map.length===0)return;let t=this.map.length,n=[];for(;t>0;)--t,n.push(e.slice(this.map[t][0]+this.map[t][1]),this.map[t][2]),e.length=this.map[t][0];n.push(e.slice()),e.length=0;let r=n.pop();for(;r;){for(let t of r)e.push(t);r=n.pop()}this.map.length=0}};function xP(e,t,n,r){let i=0;if(n!==0||r.length!==0){for(;i<e.map.length;){if(e.map[i][0]===t){e.map[i][1]+=n,e.map[i][2].push(...r);return}i+=1}e.map.push([t,n,r])}}function SP(e,t){let n=!1,r=[];for(;t<e.length;){let i=e[t];if(n){if(i[0]===`enter`)i[1].type===`tableContent`&&r.push(e[t+1][1].type===`tableDelimiterMarker`?`left`:`none`);else if(i[1].type===`tableContent`){if(e[t-1][1].type===`tableDelimiterMarker`){let e=r.length-1;r[e]=r[e]===`left`?`center`:`right`}}else if(i[1].type===`tableDelimiterRow`)break}else i[0]===`enter`&&i[1].type===`tableDelimiterRow`&&(n=!0);t+=1}return r}function CP(){return{flow:{null:{name:`table`,tokenize:wP,resolveAll:TP}}}}function wP(e,t,n){let r=this,i=0,a=0,o;return s;function s(e){let t=r.events.length-1;for(;t>-1;){let e=r.events[t][1].type;if(e===`lineEnding`||e===`linePrefix`)t--;else break}let i=t>-1?r.events[t][1].type:null,a=i===`tableHead`||i===`tableRow`?S:c;return a===S&&r.parser.lazy[r.now().line]?n(e):a(e)}function c(t){return e.enter(`tableHead`),e.enter(`tableRow`),l(t)}function l(e){return e===124?u(e):(o=!0,a+=1,u(e))}function u(t){return t===null?n(t):XE(t)?a>1?(a=0,r.interrupt=!0,e.exit(`tableRow`),e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),p):n(t):QE(t)?rD(e,u,`whitespace`)(t):(a+=1,o&&(o=!1,i+=1),t===124?(e.enter(`tableCellDivider`),e.consume(t),e.exit(`tableCellDivider`),o=!0,u):(e.enter(`data`),d(t)))}function d(t){return t===null||t===124||ZE(t)?(e.exit(`data`),u(t)):(e.consume(t),t===92?f:d)}function f(t){return t===92||t===124?(e.consume(t),d):d(t)}function p(t){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(t):(e.enter(`tableDelimiterRow`),o=!1,QE(t)?rD(e,m,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):m(t))}function m(t){return t===45||t===58?g(t):t===124?(o=!0,e.enter(`tableCellDivider`),e.consume(t),e.exit(`tableCellDivider`),h):x(t)}function h(t){return QE(t)?rD(e,g,`whitespace`)(t):g(t)}function g(t){return t===58?(a+=1,o=!0,e.enter(`tableDelimiterMarker`),e.consume(t),e.exit(`tableDelimiterMarker`),_):t===45?(a+=1,_(t)):t===null||XE(t)?b(t):x(t)}function _(t){return t===45?(e.enter(`tableDelimiterFiller`),v(t)):x(t)}function v(t){return t===45?(e.consume(t),v):t===58?(o=!0,e.exit(`tableDelimiterFiller`),e.enter(`tableDelimiterMarker`),e.consume(t),e.exit(`tableDelimiterMarker`),y):(e.exit(`tableDelimiterFiller`),y(t))}function y(t){return QE(t)?rD(e,b,`whitespace`)(t):b(t)}function b(n){return n===124?m(n):n===null||XE(n)?!o||i!==a?x(n):(e.exit(`tableDelimiterRow`),e.exit(`tableHead`),t(n)):x(n)}function x(e){return n(e)}function S(t){return e.enter(`tableRow`),C(t)}function C(n){return n===124?(e.enter(`tableCellDivider`),e.consume(n),e.exit(`tableCellDivider`),C):n===null||XE(n)?(e.exit(`tableRow`),t(n)):QE(n)?rD(e,C,`whitespace`)(n):(e.enter(`data`),w(n))}function w(t){return t===null||t===124||ZE(t)?(e.exit(`data`),C(t)):(e.consume(t),t===92?T:w)}function T(t){return t===92||t===124?(e.consume(t),w):w(t)}}function TP(e,t){let n=-1,r=!0,i=0,a=[0,0,0,0],o=[0,0,0,0],s=!1,c=0,l,u,d,f=new bP;for(;++n<e.length;){let p=e[n],m=p[1];p[0]===`enter`?m.type===`tableHead`?(s=!1,c!==0&&(DP(f,t,c,l,u),u=void 0,c=0),l={type:`table`,start:Object.assign({},m.start),end:Object.assign({},m.end)},f.add(n,0,[[`enter`,l,t]])):m.type===`tableRow`||m.type===`tableDelimiterRow`?(r=!0,d=void 0,a=[0,0,0,0],o=[0,n+1,0,0],s&&(s=!1,u={type:`tableBody`,start:Object.assign({},m.start),end:Object.assign({},m.end)},f.add(n,0,[[`enter`,u,t]])),i=m.type===`tableDelimiterRow`?2:u?3:1):i&&(m.type===`data`||m.type===`tableDelimiterMarker`||m.type===`tableDelimiterFiller`)?(r=!1,o[2]===0&&(a[1]!==0&&(o[0]=o[1],d=EP(f,t,a,i,void 0,d),a=[0,0,0,0]),o[2]=n)):m.type===`tableCellDivider`&&(r?r=!1:(a[1]!==0&&(o[0]=o[1],d=EP(f,t,a,i,void 0,d)),a=o,o=[a[1],n,0,0])):m.type===`tableHead`?(s=!0,c=n):m.type===`tableRow`||m.type===`tableDelimiterRow`?(c=n,a[1]===0?o[1]!==0&&(d=EP(f,t,o,i,n,d)):(o[0]=o[1],d=EP(f,t,a,i,n,d)),i=0):i&&(m.type===`data`||m.type===`tableDelimiterMarker`||m.type===`tableDelimiterFiller`)&&(o[3]=n)}for(c!==0&&DP(f,t,c,l,u),f.consume(t.events),n=-1;++n<t.events.length;){let e=t.events[n];e[0]===`enter`&&e[1].type===`table`&&(e[1]._align=SP(t.events,n))}return e}function EP(e,t,n,r,i,a){let o=r===1?`tableHeader`:r===2?`tableDelimiter`:`tableData`;n[0]!==0&&(a.end=Object.assign({},OP(t.events,n[0])),e.add(n[0],0,[[`exit`,a,t]]));let s=OP(t.events,n[1]);if(a={type:o,start:Object.assign({},s),end:Object.assign({},s)},e.add(n[1],0,[[`enter`,a,t]]),n[2]!==0){let i=OP(t.events,n[2]),a=OP(t.events,n[3]),o={type:`tableContent`,start:Object.assign({},i),end:Object.assign({},a)};if(e.add(n[2],0,[[`enter`,o,t]]),r!==2){let r=t.events[n[2]],i=t.events[n[3]];if(r[1].end=Object.assign({},i[1].end),r[1].type=`chunkText`,r[1].contentType=`text`,n[3]>n[2]+1){let t=n[2]+1,r=n[3]-n[2]-1;e.add(t,r,[])}}e.add(n[3]+1,0,[[`exit`,o,t]])}return i!==void 0&&(a.end=Object.assign({},OP(t.events,i)),e.add(i,0,[[`exit`,a,t]]),a=void 0),a}function DP(e,t,n,r,i){let a=[],o=OP(t.events,n);i&&(i.end=Object.assign({},o),a.push([`exit`,i,t])),r.end=Object.assign({},o),a.push([`exit`,r,t]),e.add(n+1,0,a)}function OP(e,t){let n=e[t],r=n[0]===`enter`?`start`:`end`;return n[1][r]}var kP={name:`tasklistCheck`,tokenize:jP};function AP(){return{text:{91:kP}}}function jP(e,t,n){let r=this;return i;function i(t){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?n(t):(e.enter(`taskListCheck`),e.enter(`taskListCheckMarker`),e.consume(t),e.exit(`taskListCheckMarker`),a)}function a(t){return ZE(t)?(e.enter(`taskListCheckValueUnchecked`),e.consume(t),e.exit(`taskListCheckValueUnchecked`),o):t===88||t===120?(e.enter(`taskListCheckValueChecked`),e.consume(t),e.exit(`taskListCheckValueChecked`),o):n(t)}function o(t){return t===93?(e.enter(`taskListCheckMarker`),e.consume(t),e.exit(`taskListCheckMarker`),e.exit(`taskListCheck`),s):n(t)}function s(r){return XE(r)?t(r):QE(r)?e.check({tokenize:MP},t,n)(r):n(r)}}function MP(e,t,n){return rD(e,r,`whitespace`);function r(e){return e===null?n(e):t(e)}}function NP(e){return BE([XN(),dP(),yP(e),CP(),AP()])}var PP={};function FP(e){let t=this,n=e||PP,r=t.data(),i=r.micromarkExtensions||=[],a=r.fromMarkdownExtensions||=[],o=r.toMarkdownExtensions||=[];i.push(NP(n)),a.push(zN()),o.push(BN(n))}async function IP(e,t){return WC(`/resolve-link${qC({path:e,from_doc_id:t})}`)}function LP(e){if(!e||e.trim()===``)return`empty`;let t=e.trim();return/^[a-z][a-z0-9+.-]*:/i.test(t)?`external`:t.startsWith(`#`)?`anchor`:t.startsWith(`/`)?`absolute`:`relative`}function RP({href:e,children:t,fromDocId:n,...r}){let i=Ex(),a=LP(e),[o,s]=(0,w.useState)(!1),[c,l]=(0,w.useState)(!1),[u,d]=(0,w.useState)(null),[f,p]=(0,w.useState)(null);if(a===`external`)return(0,G.jsx)(`a`,{href:e,target:`_blank`,rel:`noopener noreferrer`,...r,children:t});if(a===`anchor`||a===`absolute`||a===`empty`)return(0,G.jsx)(`a`,{href:e,...r,children:t});let m=(0,G.jsxs)(Bd,{href:e,onClick:async t=>{if(t.preventDefault(),c)return;if(u&&u.matches.length===1){let e=`/document/${u.matches[0].document_id}${u.anchor??``}`;i(e),s(!1);return}let r=e;try{r=decodeURIComponent(e)}catch{}l(!0),p(null);try{let e=await IP(r,n);if(d(e),e.matches.length===1){let t=e.matches[0];i(`/document/${t.document_id}${e.anchor??``}`);return}s(!0)}catch(e){p(e instanceof Error?e.message:String(e)),s(!0)}finally{l(!1)}},style:{cursor:c?`wait`:`pointer`},...r,children:[t,c&&(0,G.jsx)(cl,{size:`xs`,style:{marginLeft:4,verticalAlign:`middle`}})]});return!o||!u||u.matches.length===1&&!f?m:(0,G.jsxs)(el,{opened:o,onChange:s,position:`bottom-start`,withArrow:!0,shadow:`md`,width:360,children:[(0,G.jsx)(el.Target,{children:m}),(0,G.jsx)(el.Dropdown,{children:f?(0,G.jsxs)(w_,{gap:`xs`,children:[(0,G.jsx)(Y,{size:`sm`,c:`red`,children:`Couldn't resolve link`}),(0,G.jsx)(Y,{size:`xs`,c:`dimmed`,children:f}),(0,G.jsx)(bp,{size:`xs`,variant:`subtle`,onClick:()=>s(!1),children:`Dismiss`})]}):u.matches.length===0?(0,G.jsxs)(w_,{gap:`xs`,children:[(0,G.jsxs)(Y,{size:`sm`,fw:500,children:[`No document found for `,(0,G.jsx)(Y,{component:`span`,ff:`monospace`,children:u.tried_path})]}),(0,G.jsx)(Y,{size:`xs`,c:`dimmed`,children:`The path didn't match a source file or document title in the knowledge base.`}),(0,G.jsxs)(Y,{size:`xs`,c:`dimmed`,children:[`For reliable cross-references, link by ID: `,(0,G.jsx)(Y,{component:`span`,ff:`monospace`,children:`[Text](document-uuid)`}),`. Search results show the UUID after each title.`]}),(0,G.jsxs)(bp,{size:`xs`,variant:`light`,onClick:()=>{let e=u.tried_path.split(`/`).pop()??u.tried_path;i(`/search?q=${encodeURIComponent(e)}`),s(!1)},children:[`Search for "`,u.tried_path.split(`/`).pop(),`" instead`]})]}):(0,G.jsxs)(w_,{gap:`xs`,children:[(0,G.jsxs)(Y,{size:`sm`,fw:500,children:[u.matches.length,` possible matches for `,(0,G.jsx)(Y,{component:`span`,ff:`monospace`,children:u.tried_path})]}),(0,G.jsx)(lm,{size:`sm`,spacing:`xs`,children:u.matches.map(e=>(0,G.jsxs)(lm.Item,{children:[(0,G.jsx)(Bd,{onClick:t=>{t.preventDefault(),i(`/document/${e.document_id}${u.anchor??``}`),s(!1)},style:{cursor:`pointer`},children:e.title}),e.source_path&&(0,G.jsx)(Y,{size:`xs`,c:`dimmed`,ff:`monospace`,children:e.source_path}),(0,G.jsxs)(Y,{size:`xs`,c:`dimmed`,children:[`matched by: `,e.match_method.replace(`_`,` `)]})]},e.document_id))})]})})]})}var zP={markdown:`_markdown_i11gl_1`};function BP({content:e,defaultView:t=`rendered`,maxHeight:n=600,showToggle:r=!0,documentId:i}){let[a,o]=(0,w.useState)(t),s=(0,w.useMemo)(()=>({a:e=>(0,G.jsx)(RP,{...e,fromDocId:i})}),[i]);return(0,G.jsxs)(w_,{gap:`xs`,children:[r&&(0,G.jsx)(l_,{size:`xs`,value:a,onChange:o,data:[{label:`Rendered`,value:`rendered`},{label:`Raw`,value:`raw`}],w:200}),a===`rendered`?(0,G.jsx)(`div`,{className:zP.markdown,style:{maxHeight:n,overflow:`auto`},children:(0,G.jsx)(Mj,{remarkPlugins:[FP],components:s,children:e||`*(empty)*`})}):(0,G.jsx)(Ap,{block:!0,style:{whiteSpace:`pre-wrap`,maxHeight:n,overflow:`auto`},children:e||`(empty)`})]})}function VP(e,t){e.invalidateQueries({queryKey:t?[`document`,t]:[`document`]}),e.invalidateQueries({queryKey:t?[`document-audit`,t]:[`document-audit`]}),e.invalidateQueries({queryKey:[`dashboard`]}),e.invalidateQueries({queryKey:[`dashboard-recent`]}),e.invalidateQueries({queryKey:[`search`]}),e.invalidateQueries({queryKey:[`trash`]}),e.invalidateQueries({queryKey:[`project-documents`]})}async function HP(){return WC(`/projects`)}async function UP(){return WC(`/metadata-keys`)}async function WP(e,t){return WC(`/projects`,{method:`POST`,body:JSON.stringify({name:e,description:t})})}async function GP(e,t,n){return WC(`/projects/${e}`,{method:`PUT`,body:JSON.stringify({name:t,description:n})})}async function KP(e){return WC(`/projects/${e}`,{method:`DELETE`})}function qP(){return Yy({queryKey:[`projects`],queryFn:HP,staleTime:6e4})}function JP(){return Yy({queryKey:[`metadata-keys`],queryFn:UP,staleTime:6e4})}function YP(e,t){Q_.show({title:e,message:t||``,color:`green`,autoClose:4e3})}function XP(e,t){Q_.show({title:e,message:t||``,color:`red`,autoClose:6e3})}function ZP(e){return e instanceof HC&&(Q_.show({title:`Ingestion lands in v0.7`,message:e.note??"Use `cerefox ingest <file>` from the CLI for now — it still works against your Cerefox.",color:`yellow`,autoClose:8e3}),!0)}function QP(e){if(typeof e!=`string`)return JSON.stringify(e);try{return JSON.parse(e),JSON.stringify(e)}catch{return e}}function $P(){let{id:e}=Ax(),t=Ex(),n=Gy(),{data:r,isLoading:i}=Yy({queryKey:[`document`,e],queryFn:()=>Gw(e),enabled:!!e}),{data:a}=qP(),{data:o}=JP(),[s,c]=(0,w.useState)(``),[l,u]=(0,w.useState)(``),[d,f]=(0,w.useState)([]),[p,m]=(0,w.useState)([]),[h,g]=(0,w.useState)(!1),[_,v]=(0,w.useState)(`edit`);r&&!h&&(c(r.doc_title||``),u(r.full_content||``),f(r.project_ids||[]),m(Object.entries(r.doc_metadata||{}).map(([e,t])=>({key:e,value:QP(t)}))),g(!0));let y=Xy({mutationFn:()=>{let t={};for(let e of p)if(e.key.trim()&&e.value.trim()){let n=e.value.trim(),r=n;try{r=JSON.parse(n)}catch{}t[e.key.trim()]=r}return qw(e,{title:s,content:l,project_ids:d,metadata:t,expected_content_hash:r?.content_hash??null})},onSuccess:r=>{r.success?(VP(n,e),YP(`Document saved`,r.reindexed?`Content re-indexed`:`Metadata updated`),t(`/document/${e}`)):r.error&&XP(`Save failed`,r.error)},onError:e=>{if(e instanceof VC){let t={};try{t=JSON.parse(e.body)}catch{}if(e.status===409&&t.error===`document is in the trash`){XP(`Document is in the trash`,t.message??`Restore it from the Trash page first, then save again.`);return}if(e.status===422){XP(`Broken document links`,t.message??`The content links document id(s) that don't exist — fix or remove them.`);return}if(e.status===409){XP(`Edit conflict`,`This document changed while you were editing it (another writer saved a newer version). Open the document in a new tab, merge your changes, then save again.`);return}}ZP(e)||XP(`Save failed`,e instanceof Error?e.message:String(e))}}),b=a?.map(e=>({value:e.id,label:e.name}))||[],x=new Map((o??[]).map(e=>[e.key,e.doc_count])),S=o?.map(e=>e.key)||[];if(i||!h)return(0,G.jsx)(Pp,{size:`lg`,children:(0,G.jsx)(Y,{c:`dimmed`,mt:`xl`,children:`Loading...`})});let C=(0,G.jsxs)(El,{children:[(0,G.jsx)(bp,{type:`submit`,loading:y.isPending,children:`Save`}),(0,G.jsx)(bp,{type:`button`,variant:`subtle`,onClick:()=>t(`/document/${e}`),children:`Cancel`})]});return(0,G.jsxs)(Pp,{size:`lg`,children:[(0,G.jsx)(z_,{order:2,mb:`md`,children:`Edit Document`}),(0,G.jsx)(Y,{size:`sm`,c:`dimmed`,mb:`md`,children:`If content changes, the document will be re-chunked and re-embedded.`}),(0,G.jsx)(`form`,{onSubmit:e=>{e.preventDefault(),y.mutate()},children:(0,G.jsxs)(w_,{gap:`md`,children:[(0,G.jsx)(M_,{label:`Title`,value:s,onChange:e=>c(e.currentTarget.value),required:!0}),b.length>0&&(0,G.jsx)(Dh,{label:`Projects`,data:b,value:d,onChange:f,clearable:!0,searchable:!0}),(0,G.jsxs)(`div`,{children:[(0,G.jsx)(Y,{size:`sm`,fw:500,mb:`xs`,children:`Metadata`}),(0,G.jsxs)(w_,{gap:`xs`,children:[p.map((e,t)=>(0,G.jsxs)(El,{gap:`xs`,children:[(0,G.jsx)(cp,{placeholder:`Key`,data:S,value:e.key,onChange:n=>{let r=[...p];r[t]={...e,key:n},m(r)},renderOption:({option:e})=>(0,G.jsxs)(El,{justify:`space-between`,w:`100%`,wrap:`nowrap`,children:[(0,G.jsx)(`span`,{children:e.value}),(0,G.jsxs)(Y,{size:`xs`,c:`dimmed`,children:[x.get(e.value),` docs`]})]}),w:200,size:`sm`}),(0,G.jsx)(M_,{placeholder:`Value`,value:e.value,onChange:n=>{let r=[...p];r[t]={...e,value:n.currentTarget.value},m(r)},w:250,size:`sm`}),(0,G.jsx)(gl,{variant:`subtle`,color:`red`,onClick:()=>m(p.filter((e,n)=>n!==t)),children:(0,G.jsx)(RC,{size:14})})]},t)),(0,G.jsx)(bp,{variant:`light`,size:`xs`,w:140,leftSection:(0,G.jsx)(kC,{size:14}),onClick:()=>m([...p,{key:``,value:``}]),children:`Add field`})]})]}),C,(0,G.jsxs)(`div`,{children:[(0,G.jsxs)(El,{justify:`space-between`,mb:`xs`,children:[(0,G.jsx)(Y,{size:`sm`,fw:500,children:`Content`}),(0,G.jsx)(l_,{size:`xs`,value:_,onChange:v,data:[{label:`Edit`,value:`edit`},{label:`Preview`,value:`preview`}],w:160})]}),_===`edit`?(0,G.jsx)(nm,{value:l,onChange:e=>u(e.currentTarget.value),minRows:15,autosize:!0,required:!0,styles:{input:{fontFamily:`monospace`,fontSize:13}}}):(0,G.jsx)(`div`,{style:{border:`1px solid var(--mantine-color-gray-3)`,borderRadius:8,padding:12,minHeight:300},children:(0,G.jsx)(BP,{content:l,defaultView:`rendered`,maxHeight:500,showToggle:!1})})]}),(0,G.jsxs)(w_,{gap:`xs`,children:[C,y.data&&!y.data.success&&(0,G.jsx)(Y,{c:`red`,size:`sm`,children:y.data.error})]})]})})]})}async function eF(e=50){return WC(`/documents/trash?limit=${e}`)}async function tF(e){await WC(`/documents/${e}/restore`,{method:`POST`})}async function nF(e){await WC(`/documents/${e}/purge`,{method:`DELETE`})}var rF=class{diff(e,t,n={}){let r;typeof n==`function`?(r=n,n={}):`callback`in n&&(r=n.callback);let i=this.castInput(e,n),a=this.castInput(t,n),o=this.removeEmpty(this.tokenize(i,n)),s=this.removeEmpty(this.tokenize(a,n));return this.diffWithOptionsObj(o,s,n,r)}diffWithOptionsObj(e,t,n,r){let i=e=>{if(e=this.postProcess(e,n),r){setTimeout(function(){r(e)},0);return}return e},a=t.length,o=e.length,s=1,c=a+o;n.maxEditLength!=null&&(c=Math.min(c,n.maxEditLength));let l=n.timeout??1/0,u=Date.now()+l,d=[{oldPos:-1,lastComponent:void 0}],f=this.extractCommon(d[0],t,e,0,n);if(d[0].oldPos+1>=o&&f+1>=a)return i(this.buildValues(d[0].lastComponent,t,e));let p=-1/0,m=1/0,h=()=>{for(let r=Math.max(p,-s);r<=Math.min(m,s);r+=2){let s,c=d[r-1],l=d[r+1];c&&(d[r-1]=void 0);let u=!1;if(l){let e=l.oldPos-r;u=l&&0<=e&&e<a}let h=c&&c.oldPos+1<o;if(!u&&!h){d[r]=void 0;continue}if(s=!h||u&&c.oldPos<l.oldPos?this.addToPath(l,!0,!1,0,n):this.addToPath(c,!1,!0,1,n),f=this.extractCommon(s,t,e,r,n),s.oldPos+1>=o&&f+1>=a)return i(this.buildValues(s.lastComponent,t,e))||!0;d[r]=s,s.oldPos+1>=o&&(m=Math.min(m,r-1)),f+1>=a&&(p=Math.max(p,r+1))}s++};if(r)(function e(){setTimeout(function(){if(s>c||Date.now()>u)return r(void 0);h()||e()},0)})();else for(;s<=c&&Date.now()<=u;){let e=h();if(e)return e}}addToPath(e,t,n,r,i){let a=e.lastComponent;return a&&!i.oneChangePerToken&&a.added===t&&a.removed===n?{oldPos:e.oldPos+r,lastComponent:{count:a.count+1,added:t,removed:n,previousComponent:a.previousComponent}}:{oldPos:e.oldPos+r,lastComponent:{count:1,added:t,removed:n,previousComponent:a}}}extractCommon(e,t,n,r,i){let a=t.length,o=n.length,s=e.oldPos,c=s-r,l=0;for(;c+1<a&&s+1<o&&this.equals(n[s+1],t[c+1],i);)c++,s++,l++,i.oneChangePerToken&&(e.lastComponent={count:1,previousComponent:e.lastComponent,added:!1,removed:!1});return l&&!i.oneChangePerToken&&(e.lastComponent={count:l,previousComponent:e.lastComponent,added:!1,removed:!1}),e.oldPos=s,c}equals(e,t,n){return n.comparator?n.comparator(e,t):e===t||!!n.ignoreCase&&e.toLowerCase()===t.toLowerCase()}removeEmpty(e){let t=[];for(let n=0;n<e.length;n++)e[n]&&t.push(e[n]);return t}castInput(e,t){return e}tokenize(e,t){return Array.from(e)}join(e){return e.join(``)}postProcess(e,t){return e}get useLongestToken(){return!1}buildValues(e,t,n){let r=[],i;for(;e;)r.push(e),i=e.previousComponent,delete e.previousComponent,e=i;r.reverse();let a=r.length,o=0,s=0,c=0;for(;o<a;o++){let e=r[o];if(e.removed)e.value=this.join(n.slice(c,c+e.count)),c+=e.count;else{if(!e.added&&this.useLongestToken){let r=t.slice(s,s+e.count);r=r.map(function(e,t){let r=n[c+t];return r.length>e.length?r:e}),e.value=this.join(r)}else e.value=this.join(t.slice(s,s+e.count));s+=e.count,e.added||(c+=e.count)}}return r}};new class extends rF{};function iF(e,t){let n;for(n=0;n<e.length&&n<t.length;n++)if(e[n]!=t[n])return e.slice(0,n);return e.slice(0,n)}function aF(e,t){let n;if(!e||!t||e[e.length-1]!=t[t.length-1])return``;for(n=0;n<e.length&&n<t.length;n++)if(e[e.length-(n+1)]!=t[t.length-(n+1)])return e.slice(-n);return e.slice(-n)}function oF(e,t,n){if(e.slice(0,t.length)!=t)throw Error(`string ${JSON.stringify(e)} doesn't start with prefix ${JSON.stringify(t)}; this is a bug`);return n+e.slice(t.length)}function sF(e,t,n){if(!t)return e+n;if(e.slice(-t.length)!=t)throw Error(`string ${JSON.stringify(e)} doesn't end with suffix ${JSON.stringify(t)}; this is a bug`);return e.slice(0,-t.length)+n}function cF(e,t){return oF(e,t,``)}function lF(e,t){return sF(e,t,``)}function uF(e,t){return t.slice(0,dF(e,t))}function dF(e,t){let n=0;e.length>t.length&&(n=e.length-t.length);let r=t.length;e.length<t.length&&(r=e.length);let i=Array(r),a=0;i[0]=0;for(let e=1;e<r;e++){for(t[e]==t[a]?i[e]=i[a]:i[e]=a;a>0&&t[e]!=t[a];)a=i[a];t[e]==t[a]&&a++}a=0;for(let r=n;r<e.length;r++){for(;a>0&&e[r]!=t[a];)a=i[a];e[r]==t[a]&&a++}return a}function fF(e,t){let n=[];for(let r of Array.from(t.segment(e))){let e=r.segment;n.length&&/\s/.test(n[n.length-1])&&/\s/.test(e)?n[n.length-1]+=e:n.push(e)}return n}function pF(e,t){if(t)return hF(e,t)[1];let n;for(n=e.length-1;n>=0&&e[n].match(/\s/);n--);return e.substring(n+1)}function mF(e,t){if(t)return hF(e,t)[0];let n=e.match(/^\s*/);return n?n[0]:``}function hF(e,t){if(!t)return[mF(e),pF(e)];if(t.resolvedOptions().granularity!=`word`)throw Error(`The segmenter passed must have a granularity of "word"`);let n=fF(e,t),r=n[0],i=n[n.length-1];return[/\s/.test(r)?r:``,/\s/.test(i)?i:``]}var gF=`a-zA-Z0-9_\\u{AD}\\u{C0}-\\u{D6}\\u{D8}-\\u{F6}\\u{F8}-\\u{2C6}\\u{2C8}-\\u{2D7}\\u{2DE}-\\u{2FF}\\u{1E00}-\\u{1EFF}`,_F=RegExp(`[${gF}]+|\\s+|[^${gF}]`,`ug`);new class extends rF{equals(e,t,n){return n.ignoreCase&&(e=e.toLowerCase(),t=t.toLowerCase()),e.trim()===t.trim()}tokenize(e,t={}){let n;if(t.intlSegmenter){let r=t.intlSegmenter;if(r.resolvedOptions().granularity!=`word`)throw Error(`The segmenter passed must have a granularity of "word"`);n=fF(e,r)}else n=e.match(_F)||[];let r=[],i=null;return n.forEach(e=>{/\s/.test(e)?i==null?r.push(e):r.push(r.pop()+e):i!=null&&/\s/.test(i)?r[r.length-1]==i?r.push(r.pop()+e):r.push(i+e):r.push(e),i=e}),r}join(e){return e.map((e,t)=>t==0?e:e.replace(/^\s+/,``)).join(``)}postProcess(e,t){if(!e||t.oneChangePerToken)return e;let n=null,r=null,i=null;return e.forEach(e=>{e.added?r=e:e.removed?i=e:((r||i)&&vF(n,i,r,e,t.intlSegmenter),n=e,r=null,i=null)}),(r||i)&&vF(n,i,r,null,t.intlSegmenter),e}};function vF(e,t,n,r,i){if(t&&n){let[a,o]=hF(t.value,i),[s,c]=hF(n.value,i);if(e){let r=iF(a,s);e.value=sF(e.value,s,r),t.value=cF(t.value,r),n.value=cF(n.value,r)}if(r){let e=aF(o,c);r.value=oF(r.value,c,e),t.value=lF(t.value,e),n.value=lF(n.value,e)}}else if(n){if(e){let e=mF(n.value,i);n.value=n.value.substring(e.length)}if(r){let e=mF(r.value,i);r.value=r.value.substring(e.length)}}else if(e&&r){let n=mF(r.value,i),[a,o]=hF(t.value,i),s=iF(n,a);t.value=cF(t.value,s);let c=aF(cF(n,s),o);t.value=lF(t.value,c),r.value=oF(r.value,n,c),e.value=sF(e.value,n,n.slice(0,n.length-c.length))}else if(r){let e=mF(r.value,i),n=uF(pF(t.value,i),e);t.value=lF(t.value,n)}else if(e){let n=uF(pF(e.value,i),mF(t.value,i));t.value=cF(t.value,n)}}new class extends rF{tokenize(e){let t=RegExp(`(\\r?\\n)|[${gF}]+|[^\\S\\n\\r]+|[^${gF}]`,`ug`);return e.match(t)||[]}};var yF=new class extends rF{constructor(){super(...arguments),this.tokenize=xF}equals(e,t,n){return n.ignoreWhitespace?((!n.newlineIsToken||!e.includes(`
88
88
  `))&&(e=e.trim()),(!n.newlineIsToken||!t.includes(`
89
89
  `))&&(t=t.trim())):n.ignoreNewlineAtEof&&!n.newlineIsToken&&(e.endsWith(`
90
90
  `)&&(e=e.slice(0,-1)),t.endsWith(`
91
- `)&&(t=t.slice(0,-1))),super.equals(e,t,n)}};function vF(e,t,n){return _F.diff(e,t,n)}function yF(e,t){t.stripTrailingCr&&(e=e.replace(/\r\n/g,`
92
- `));let n=[],r=e.split(/(\n|\r\n)/);r[r.length-1]||r.pop();for(let e=0;e<r.length;e++){let i=r[e];e%2&&!t.newlineIsToken?n[n.length-1]+=i:n.push(i)}return n}function bF(e){return e==`.`||e==`!`||e==`?`}new class extends tF{tokenize(e){let t=[],n=0;for(let r=0;r<e.length;r++){if(r==e.length-1){t.push(e.slice(n));break}if(bF(e[r])&&e[r+1].match(/\s/)){for(t.push(e.slice(n,r+1)),r=n=r+1;e[r+1]?.match(/\s/);)r++;t.push(e.slice(n,r+1)),n=r+1}}return t}},new class extends tF{tokenize(e){return e.split(/([{}:;,]|\s+)/)}},new class extends tF{constructor(){super(...arguments),this.tokenize=yF}get useLongestToken(){return!0}castInput(e,t){let{undefinedReplacement:n,stringifyReplacer:r=(e,t)=>t===void 0?n:t}=t;return typeof e==`string`?e:JSON.stringify(xF(e,null,null,r),null,` `)}equals(e,t,n){return super.equals(e.replace(/,([\r\n])/g,`$1`),t.replace(/,([\r\n])/g,`$1`),n)}};function xF(e,t,n,r,i){t||=[],n||=[],r&&(e=r(i===void 0?``:i,e));let a;for(a=0;a<t.length;a+=1)if(t[a]===e)return n[a];let o;if(Object.prototype.toString.call(e)===`[object Array]`){for(t.push(e),o=Array(e.length),n.push(o),a=0;a<e.length;a+=1)o[a]=xF(e[a],t,n,r,String(a));return t.pop(),n.pop(),o}if(e&&e.toJSON&&(e=e.toJSON()),typeof e==`object`&&e){t.push(e),o={},n.push(o);let i=[],s;for(s in e)Object.prototype.hasOwnProperty.call(e,s)&&i.push(s);for(i.sort(),a=0;a<i.length;a+=1)s=i[a],o[s]=xF(e[s],t,n,r,s);t.pop(),n.pop()}else o=e;return o}new class extends tF{tokenize(e){return e.slice()}join(e){return e}removeEmpty(e){return e}};var SF={diffPre:`_diffPre_1gs1p_1`,added:`_added_1gs1p_15`,removed:`_removed_1gs1p_20`,context:`_context_1gs1p_25`};function CF({oldContent:e,newContent:t}){let n=(0,w.useMemo)(()=>vF(e,t),[e,t]),r=(0,w.useMemo)(()=>{let e=0,t=0;for(let r of n){let n=(r.value.match(/\n/g)||[]).length;r.added&&(e+=n||1),r.removed&&(t+=n||1)}return{added:e,removed:t}},[n]);return(0,G.jsxs)(`div`,{children:[(0,G.jsxs)(El,{gap:`sm`,mb:`xs`,children:[(0,G.jsxs)(Y,{size:`xs`,c:`green`,fw:600,children:[`+`,r.added,` added`]}),(0,G.jsxs)(Y,{size:`xs`,c:`red`,fw:600,children:[`-`,r.removed,` removed`]})]}),(0,G.jsx)(`pre`,{className:SF.diffPre,children:n.map((e,t)=>{let n=e.added?SF.added:e.removed?SF.removed:SF.context;return(0,G.jsx)(`span`,{className:n,children:e.value},t)})})]})}var wF={wrap:`_wrap_816rm_4`,backBtn:`_backBtn_816rm_10`,docHeader:`_docHeader_816rm_16`,docTitle:`_docTitle_816rm_23`,docMeta:`_docMeta_816rm_32`,reviewPill:`_reviewPill_816rm_40`,dot:`_dot_816rm_54`,trashBanner:`_trashBanner_816rm_61`,docSplit:`_docSplit_816rm_75`,docRail:`_docRail_816rm_81`,contentHead:`_contentHead_816rm_90`,contentScroll:`_contentScroll_816rm_99`,docSource:`_docSource_816rm_103`,mdBody:`_mdBody_816rm_112`,chunkList:`_chunkList_816rm_117`,chunkItem:`_chunkItem_816rm_123`,chunkHead:`_chunkHead_816rm_129`,chunkBody:`_chunkBody_816rm_136`,railTitle:`_railTitle_816rm_146`,toc:`_toc_816rm_159`,tocLink:`_tocLink_816rm_166`,tocLvl2:`_tocLvl2_816rm_188`,tocLvl3:`_tocLvl3_816rm_192`,metaDl:`_metaDl_816rm_198`,metaTags:`_metaTags_816rm_214`,metaTag:`_metaTag_816rm_214`,verList:`_verList_816rm_237`,verRow:`_verRow_816rm_242`,verRowActive:`_verRowActive_816rm_250`,verRowTop:`_verRowTop_816rm_254`,verLink:`_verLink_816rm_259`,verMeta:`_verMeta_816rm_268`,verLock:`_verLock_816rm_274`,versionBanner:`_versionBanner_816rm_280`,actList:`_actList_816rm_285`,actRow:`_actRow_816rm_292`,actDot:`_actDot_816rm_297`,actAgent:`_actAgent_816rm_304`};function TF(e){return e.toLowerCase().replace(/[^a-z0-9]+/g,`-`).replace(/(^-|-$)/g,``)}function EF(e){return typeof e==`string`||typeof e==`number`?String(e):Array.isArray(e)?e.map(EF).join(``):e&&typeof e==`object`&&`props`in e?EF(e.props.children):``}function DF(e){let t=[],n=!1;for(let r of e.split(`
93
- `)){if(r.startsWith("```")){n=!n;continue}if(n)continue;let e=r.match(/^(#{1,3})\s+(.+?)\s*#*$/);e&&t.push({level:e[1].length,text:e[2],id:TF(e[2])})}return t}function OF(e){switch(e){case`create`:return`var(--green)`;case`update-content`:return`var(--blue)`;case`update-metadata`:return`var(--blue)`;case`delete`:return`var(--red)`;case`status-change`:return`var(--yellow)`;case`archive`:return`var(--violet)`;case`unarchive`:return`var(--primary)`;default:return`var(--text-faint)`}}function kF(e){let t=(e??`manual`).toLowerCase();return t===`agent`?{icon:YC,label:`agent`,agent:!0}:t===`cli`?{icon:QC,label:`cli`,agent:!1}:t===`url`?{icon:FC,label:`url`,agent:!1}:{icon:UC,label:t,agent:!1}}function AF(){let{id:e}=Hx(),[t]=oC(),n=t.get(`version`),r=Rx(),i=Uy(),[a,o]=(0,w.useState)(!1),[s,c]=(0,w.useState)(!1),[l,u]=(0,w.useState)(`rendered`),{data:d,isLoading:f,error:p}=ib({queryKey:[`document`,e,n],queryFn:()=>sT(e,n??void 0),enabled:!!e}),{data:m,isLoading:h}=ib({queryKey:[`document-chunks`,e],queryFn:()=>cT(e),enabled:!!e}),{data:g}=ib({queryKey:[`document-audit`,e],queryFn:()=>Tw({document_id:e,limit:50}),enabled:!!e}),{data:_}=GP(),v=new Map(_?.map(e=>[e.id,e.name])??[]),y=()=>BP(i,e),b=ab({mutationFn:()=>uT(e),onSuccess:()=>{y(),qP(`Document moved to trash`),r(`/`)},onError:e=>JP(`Delete failed`,String(e))}),x=ab({mutationFn:()=>$P(e),onSuccess:()=>{y(),qP(`Document restored`)},onError:e=>JP(`Restore failed`,String(e))}),S=ab({mutationFn:()=>eF(e),onSuccess:()=>{y(),qP(`Document permanently deleted`),r(`/trash`)},onError:e=>JP(`Purge failed`,String(e))}),C=ab({mutationFn:t=>Ew(e,t),onSuccess:(e,t)=>{y(),qP(`Review status updated`,t===`approved`?`Approved`:`Pending review`)},onError:e=>JP(`Status update failed`,String(e))}),T=ab({mutationFn:({versionId:t,archived:n})=>Dw(e,t,n),onSuccess:(t,{archived:n})=>{i.invalidateQueries({queryKey:[`document`,e]}),qP(n?`Version archived`:`Protection removed`)},onError:e=>JP(`Archive update failed`,String(e))}),[E,D]=(0,w.useState)(null),[O,k]=(0,w.useState)(null),[A,j]=(0,w.useState)(``),M=async(t,n)=>{D(t),j(`v${n}`);try{let n=await pT(e,t);k(n.full_content)}catch{JP(`Failed to load version content`),D(null)}},N=(0,w.useMemo)(()=>d?DF(d.full_content):[],[d]),P=(0,w.useMemo)(()=>({a:e=>(0,G.jsx)(LP,{...e,fromDocId:d?.document_id}),h1:({children:e})=>(0,G.jsx)(`h1`,{id:TF(EF(e)),children:e}),h2:({children:e})=>(0,G.jsx)(`h2`,{id:TF(EF(e)),children:e}),h3:({children:e})=>(0,G.jsx)(`h3`,{id:TF(EF(e)),children:e})}),[d?.document_id]),F=e=>{u(`rendered`),setTimeout(()=>{document.getElementById(e)?.scrollIntoView({behavior:`smooth`,block:`start`})},50)};if(f)return(0,G.jsx)(`div`,{className:wF.wrap,children:(0,G.jsx)(`div`,{style:{display:`flex`,justifyContent:`center`,marginTop:60},children:(0,G.jsx)(cl,{})})});if(p||!d)return(0,G.jsx)(`div`,{className:wF.wrap,children:(0,G.jsx)(`p`,{style:{color:`var(--red)`,marginTop:40},children:p?String(p):`Document not found.`})});let I=Object.entries(d.doc_metadata||{}),L=d.review_status===`approved`,R=kF(d.doc_source),z=R.icon,B=n?d.versions.find(e=>e.version_id===n):void 0,V=!!B,H=V&&l===`chunks`?`rendered`:l;return(0,G.jsxs)(`div`,{className:wF.wrap,children:[(0,G.jsxs)(`button`,{type:`button`,className:`${X.btn} ${X.btnSubtle} ${wF.backBtn}`,onClick:()=>r(-1),children:[(0,G.jsx)(vC,{size:15}),`Back`]}),(0,G.jsxs)(`div`,{className:`${wF.docHeader} ${X.rise}`,children:[(0,G.jsxs)(`div`,{style:{minWidth:0,flex:1},children:[(0,G.jsx)(`p`,{className:X.eyebrow,children:`Document`}),(0,G.jsx)(`div`,{className:X.row,style:{gap:8,marginBottom:8,flexWrap:`wrap`},children:d.project_ids.filter(e=>v.has(e)).map(e=>(0,G.jsx)(`button`,{type:`button`,className:`${X.badge} ${X.bNeutral}`,style:{cursor:`pointer`,border:`1px solid transparent`},title:`View documents in ${v.get(e)}`,onClick:()=>r(`/projects/${e}/documents`),children:v.get(e)},e))}),(0,G.jsx)(`h1`,{className:wF.docTitle,children:d.doc_title||`Untitled`}),(0,G.jsxs)(`div`,{className:wF.docMeta,children:[(0,G.jsx)(i_,{label:`Origin — how this document was added`,openDelay:120,withArrow:!0,position:`top`,children:(0,G.jsxs)(`span`,{className:`${X.srcChip} ${R.agent?X.srcChipAgent:``}`,children:[(0,G.jsx)(z,{size:12}),R.label]})}),(0,G.jsxs)(`span`,{className:`${X.mono} ${X.faint}`,children:[d.chunk_count,` chunks`]}),(0,G.jsxs)(`span`,{className:`${X.mono} ${X.faint}`,children:[d.total_chars.toLocaleString(),` chars`]}),d.updated_at&&(0,G.jsxs)(`span`,{className:`${X.mono} ${X.faint}`,children:[`updated `,Rw(d.updated_at)]}),!d.deleted_at&&!V&&(0,G.jsxs)(`button`,{type:`button`,className:wF.reviewPill,title:`Click to toggle review status`,onClick:()=>C.mutate(L?`pending_review`:`approved`),disabled:C.isPending,children:[(0,G.jsx)(`span`,{className:`dot`,style:{width:7,height:7,borderRadius:`50%`,background:L?`var(--green)`:`var(--yellow)`}}),L?`Approved`:`Pending`]})]})]}),(0,G.jsx)(`div`,{className:X.row,style:{gap:8,flexShrink:0},children:V?(0,G.jsxs)(G.Fragment,{children:[(0,G.jsxs)(`a`,{className:`${X.btn} ${X.btnGhost}`,href:mT(e,B.version_id),children:[(0,G.jsx)(NC,{size:14}),`Download`]}),(0,G.jsxs)(`button`,{type:`button`,className:`${X.btn} ${X.btnGhost} ${B.archived?X.btnWarn:``}`,title:B.archived?`Remove protection — this version becomes eligible for cleanup`:`Protect this version from automatic cleanup`,onClick:()=>T.mutate({versionId:B.version_id,archived:!B.archived}),disabled:T.isPending,children:[B.archived?(0,G.jsx)(VC,{size:14}):(0,G.jsx)(HC,{size:14}),B.archived?`Unprotect`:`Protect`]})]}):(0,G.jsxs)(G.Fragment,{children:[(0,G.jsxs)(`a`,{className:`${X.btn} ${X.btnGhost}`,href:mT(e),children:[(0,G.jsx)(NC,{size:14}),`Download`]}),d.deleted_at?(0,G.jsxs)(G.Fragment,{children:[(0,G.jsxs)(`button`,{type:`button`,className:`${X.btn} ${X.btnGhost} ${X.btnWarn}`,title:`Restore from trash`,onClick:()=>x.mutate(),children:[(0,G.jsx)(_C,{size:14}),`Restore`]}),s?(0,G.jsxs)(`div`,{className:X.row,style:{gap:6},children:[(0,G.jsx)(`button`,{type:`button`,className:X.btn,style:{background:`var(--red)`,color:`#fff`},onClick:()=>S.mutate(),children:`Confirm purge`}),(0,G.jsx)(`button`,{type:`button`,className:`${X.btn} ${X.btnSubtle}`,onClick:()=>c(!1),children:`Cancel`})]}):(0,G.jsxs)(`button`,{type:`button`,className:`${X.btn} ${X.btnGhost} ${X.btnDanger}`,title:`Permanently delete (cannot be undone)`,onClick:()=>c(!0),children:[(0,G.jsx)($C,{size:14}),`Purge`]})]}):(0,G.jsxs)(G.Fragment,{children:[(0,G.jsxs)(`button`,{type:`button`,className:`${X.btn} ${X.btnGhost}`,onClick:()=>r(`/document/${e}/edit`),children:[(0,G.jsx)(PC,{size:14}),`Edit`]}),a?(0,G.jsxs)(`div`,{className:X.row,style:{gap:6},children:[(0,G.jsx)(`button`,{type:`button`,className:X.btn,style:{background:`var(--red)`,color:`#fff`},onClick:()=>b.mutate(),children:`Confirm`}),(0,G.jsx)(`button`,{type:`button`,className:`${X.btn} ${X.btnSubtle}`,onClick:()=>o(!1),children:`Cancel`})]}):(0,G.jsxs)(`button`,{type:`button`,className:`${X.btn} ${X.btnGhost} ${X.btnDanger}`,title:`Delete document`,onClick:()=>o(!0),children:[(0,G.jsx)($C,{size:14}),`Delete`]})]})]})})]}),V&&(0,G.jsxs)(`div`,{className:`${wF.trashBanner} ${wF.versionBanner}`,children:[(0,G.jsxs)(`div`,{className:X.row,style:{gap:8},children:[(0,G.jsxs)(`span`,{className:`${X.badge} ${X.bBlue}`,children:[(0,G.jsx)(RC,{size:12}),`This is a previous version: v`,B.version_number]}),(0,G.jsxs)(`span`,{style:{fontSize:13},children:[`Read-only snapshot from `,new Date(B.created_at).toLocaleDateString(),`.`,B.archived?` Protected from cleanup.`:``]})]}),(0,G.jsx)(`button`,{type:`button`,className:`${X.btn} ${X.btnSubtle}`,onClick:()=>r(`/document/${e}`),children:`View current version`})]}),d.deleted_at&&(0,G.jsx)(`div`,{className:wF.trashBanner,children:(0,G.jsxs)(`div`,{className:X.row,style:{gap:8},children:[(0,G.jsx)(`span`,{className:`${X.badge} ${X.bNeutral}`,style:{background:`var(--red)`,color:`#fff`},children:`In trash`}),(0,G.jsxs)(`span`,{style:{fontSize:13},children:[`Deleted `,d.deleted_at.slice(0,10),` — excluded from search until restored. Use Restore or Purge above.`]})]})}),(0,G.jsxs)(`div`,{className:wF.docSplit,children:[(0,G.jsx)(`div`,{className:X.rise,style:{minWidth:0},children:(0,G.jsxs)(`div`,{className:X.card,children:[(0,G.jsxs)(`div`,{className:wF.contentHead,children:[(0,G.jsxs)(`div`,{className:X.seg,children:[(0,G.jsxs)(`button`,{type:`button`,className:`${X.segBtn} ${H===`rendered`?X.segBtnOn:``}`,onClick:()=>u(`rendered`),children:[(0,G.jsx)(FC,{size:14}),`Rendered`]}),(0,G.jsxs)(`button`,{type:`button`,className:`${X.segBtn} ${H===`source`?X.segBtnOn:``}`,onClick:()=>u(`source`),children:[(0,G.jsx)(QC,{size:14}),`Source`]}),!V&&(0,G.jsxs)(`button`,{type:`button`,className:`${X.segBtn} ${H===`chunks`?X.segBtnOn:``}`,onClick:()=>u(`chunks`),children:[(0,G.jsx)(XC,{size:14}),`Chunks`]})]}),(0,G.jsxs)(`span`,{className:`${X.mono} ${X.faint}`,style:{fontSize:12},children:[d.total_chars.toLocaleString(),` chars`]})]}),(0,G.jsx)(`div`,{className:X.divider}),(0,G.jsxs)(`div`,{className:wF.contentScroll,children:[H===`rendered`&&(0,G.jsx)(`div`,{className:wF.mdBody,children:(0,G.jsx)(`div`,{className:RP.markdown,children:(0,G.jsx)(Aj,{remarkPlugins:[PP],components:P,children:d.full_content||`*(empty)*`})})}),H===`source`&&(0,G.jsx)(`pre`,{className:wF.docSource,children:d.full_content}),H===`chunks`&&(0,G.jsx)(`div`,{className:wF.chunkList,children:h?(0,G.jsx)(`div`,{style:{padding:18},children:(0,G.jsx)(cl,{size:`sm`})}):m?.map((e,t)=>(0,G.jsxs)(`div`,{className:wF.chunkItem,children:[(0,G.jsxs)(`div`,{className:`${wF.chunkHead} ${X.mono}`,children:[(0,G.jsxs)(`span`,{className:`${X.badge} ${X.bNeutral}`,children:[`chunk `,t+1]}),(0,G.jsx)(`span`,{className:X.faint,children:e.heading_path.length>0?e.heading_path.join(` › `):`(preamble)`})]}),(0,G.jsx)(`p`,{className:wF.chunkBody,children:e.content})]},e.chunk_id))})]})]})}),(0,G.jsxs)(`aside`,{className:wF.docRail,children:[N.length>0&&(0,G.jsxs)(`div`,{className:`${X.card} ${X.cardPad} ${X.rise}`,children:[(0,G.jsx)(`div`,{className:wF.railTitle,children:`Contents`}),(0,G.jsx)(`div`,{className:wF.toc,children:N.map((e,t)=>(0,G.jsx)(`button`,{type:`button`,className:`${wF.tocLink} ${e.level===2?wF.tocLvl2:``} ${e.level===3?wF.tocLvl3:``}`,onClick:()=>F(e.id),children:e.text},t))})]}),(0,G.jsxs)(`div`,{className:`${X.card} ${X.cardPad} ${X.rise}`,children:[(0,G.jsx)(`div`,{className:wF.railTitle,children:`Details`}),(0,G.jsxs)(`dl`,{className:wF.metaDl,children:[d.created_at&&(0,G.jsxs)(G.Fragment,{children:[(0,G.jsx)(`dt`,{children:`Created`}),(0,G.jsx)(`dd`,{children:new Date(d.created_at).toLocaleDateString()})]}),d.updated_at&&(0,G.jsxs)(G.Fragment,{children:[(0,G.jsx)(`dt`,{children:`Updated`}),(0,G.jsx)(`dd`,{children:new Date(d.updated_at).toLocaleDateString()})]}),(0,G.jsx)(`dt`,{children:`Origin`}),(0,G.jsx)(`dd`,{className:X.mono,children:d.doc_source??`manual`})]}),I.length>0&&(0,G.jsxs)(G.Fragment,{children:[(0,G.jsx)(`div`,{className:X.divider,style:{margin:`12px 0`}}),(0,G.jsx)(`div`,{className:wF.railTitle,style:{marginBottom:8},children:`Metadata`}),(0,G.jsx)(`div`,{className:wF.metaTags,children:I.map(([e,t])=>(0,G.jsxs)(`span`,{className:wF.metaTag,children:[(0,G.jsxs)(`b`,{children:[e,`:`]}),String(t)]},e))})]})]}),d.versions.length>0&&(0,G.jsxs)(`div`,{className:`${X.card} ${X.cardPad} ${X.rise}`,children:[(0,G.jsxs)(`div`,{className:wF.railTitle,children:[`Versions `,(0,G.jsx)(`span`,{className:X.countPill,children:d.versions.length}),(0,G.jsxs)(el,{width:240,position:`bottom-end`,withArrow:!0,shadow:`md`,children:[(0,G.jsx)(el.Target,{children:(0,G.jsx)(`button`,{type:`button`,className:X.whatis,style:{marginLeft:`auto`},children:`what's protection?`})}),(0,G.jsx)(el.Dropdown,{children:(0,G.jsx)(Y,{size:`xs`,c:`dimmed`,children:`Archived (protected) versions are kept indefinitely and excluded from automatic cleanup. Unprotected older versions may be pruned by retention. Toggle protection from a version's ⋯ menu.`})})]})]}),(0,G.jsx)(`div`,{className:wF.verList,children:d.versions.map(t=>{let i=t.version_id===n;return(0,G.jsxs)(`div`,{className:`${wF.verRow} ${i?wF.verRowActive:``}`,children:[(0,G.jsxs)(`div`,{className:wF.verRowTop,children:[(0,G.jsxs)(`button`,{type:`button`,className:`${X.badge} ${i?X.bPrimary:X.bNeutral} ${X.mono} ${wF.verLink}`,title:i?`Currently viewing this version`:`View version v${t.version_number}`,onClick:()=>r(`/document/${e}?version=${t.version_id}`),children:[`v`,t.version_number]}),(0,G.jsx)(`span`,{className:`${X.faint} ${X.mono}`,style:{fontSize:11},children:new Date(t.created_at).toLocaleDateString()}),t.archived&&(0,G.jsx)(`span`,{className:wF.verLock,title:`Archived — protected from cleanup`,children:(0,G.jsx)(HC,{size:12})}),(0,G.jsxs)(Jm,{position:`bottom-end`,withinPortal:!0,shadow:`md`,width:180,children:[(0,G.jsx)(Jm.Target,{children:(0,G.jsx)(`button`,{type:`button`,className:X.iconBtn,style:{width:26,height:26,marginLeft:`auto`},"aria-label":`Version actions`,children:(0,G.jsx)(MC,{size:14})})}),(0,G.jsxs)(Jm.Dropdown,{children:[(0,G.jsx)(Jm.Item,{leftSection:(0,G.jsx)(RC,{size:14}),onClick:()=>r(`/document/${e}?version=${t.version_id}`),children:`Open this version`}),(0,G.jsx)(Jm.Item,{leftSection:(0,G.jsx)(bC,{size:14}),onClick:()=>M(t.version_id,t.version_number),children:`Diff vs current`}),(0,G.jsx)(Jm.Item,{leftSection:(0,G.jsx)(NC,{size:14}),component:`a`,href:mT(e,t.version_id),children:`Download`}),(0,G.jsx)(Jm.Item,{leftSection:(0,G.jsx)(HC,{size:14}),color:t.archived?`yellow`:void 0,onClick:()=>T.mutate({versionId:t.version_id,archived:!t.archived}),children:t.archived?`Remove protection`:`Archive (protect)`})]})]})]}),(0,G.jsxs)(`span`,{className:wF.verMeta,children:[t.chunk_count,` chunks · `,t.total_chars.toLocaleString(),` chars`]})]},t.version_id)})})]}),(0,G.jsxs)(`div`,{className:`${X.card} ${X.cardPad} ${X.rise}`,children:[(0,G.jsx)(`div`,{className:wF.railTitle,children:`Activity`}),g?.length?(0,G.jsx)(`div`,{className:wF.actList,children:g.map(e=>{let t=e.size_before!=null&&e.size_after!=null?e.size_after-e.size_before:0;return(0,G.jsxs)(`div`,{className:wF.actRow,children:[(0,G.jsx)(`span`,{className:wF.actDot,style:{background:OF(e.operation)}}),(0,G.jsxs)(`div`,{className:X.col,style:{gap:2,minWidth:0},children:[(0,G.jsx)(`span`,{style:{fontSize:12.5},children:e.description||e.operation}),(0,G.jsxs)(`span`,{className:X.faint,style:{fontSize:11},children:[(0,G.jsx)(`span`,{className:e.author_type===`agent`?wF.actAgent:``,children:e.author}),` `,`· `,new Date(e.created_at).toLocaleDateString(),t>0&&(0,G.jsxs)(`span`,{className:X.mono,style:{color:`var(--green)`},children:[` `,`+`,t.toLocaleString()]})]})]})]},e.id)})}):(0,G.jsx)(`span`,{className:X.faint,style:{fontSize:12},children:`No recorded activity.`})]})]})]}),(0,G.jsx)(uh,{opened:E!==null&&O!==null,onClose:()=>{D(null),k(null)},title:`Diff: ${A} vs current`,size:`xl`,children:O!==null&&(0,G.jsx)(CF,{oldContent:O,newContent:d.full_content,oldLabel:A,newLabel:`Current`})})]})}var jF={readme:`Project overview`,"agent-guide":`Agent integration`,guide:`Guides`},MF=[`readme`,`agent-guide`,`guide`],NF={readme:(0,G.jsx)(FC,{size:16}),"agent-guide":(0,G.jsx)(qC,{size:16}),guide:(0,G.jsx)(xC,{size:16})};function PF(){let e=Rx(),{"*":t}=Hx(),n=ib({queryKey:[`docs`,`index`],queryFn:gw,staleTime:1/0}),r=n.data??[],[i,a]=(0,w.useState)(``),o=(0,w.useMemo)(()=>{let e=i.trim().toLowerCase();return e?r.filter(t=>t.title.toLowerCase().includes(e)||t.path.toLowerCase().includes(e)):r},[r,i]),s=t&&t.length>0?t:r[0]?.path,c=ib({queryKey:[`docs`,`content`,s],queryFn:()=>_w(s),staleTime:1/0,enabled:!!s}),l=(0,w.useMemo)(()=>{let e={};for(let t of o)(e[t.category]??=[]).push(t);return e},[o]);return n.isLoading?(0,G.jsx)(Pp,{py:`xl`,children:(0,G.jsx)(cl,{})}):n.isError?(0,G.jsx)(Pp,{py:`xl`,children:(0,G.jsx)(Nd,{color:`red`,title:`Could not load documentation`,children:n.error.message})}):r.length===0?(0,G.jsx)(Pp,{py:`xl`,children:(0,G.jsxs)(Nd,{color:`yellow`,title:`No bundled docs available`,children:[`This Cerefox install did not ship with bundled documentation. Check that the wheel was built with the`,` `,(0,G.jsx)(`code`,{children:`[tool.hatch.build.targets.wheel.force-include]`}),` block intact, or run from a repo checkout.`]})}):(0,G.jsxs)(Pp,{fluid:!0,py:`xs`,children:[(0,G.jsx)(`p`,{className:X.eyebrow,children:`Reference`}),(0,G.jsxs)(Jp,{gap:`md`,children:[(0,G.jsx)(Jp.Col,{span:{base:12,md:3},children:(0,G.jsxs)(C_,{gap:2,children:[(0,G.jsx)(R_,{order:5,mb:`xs`,children:`Help`}),(0,G.jsx)(j_,{placeholder:`Filter guides…`,value:i,onChange:e=>a(e.currentTarget.value),leftSection:(0,G.jsx)(JC,{size:14}),size:`xs`,mb:`sm`}),o.length===0&&(0,G.jsxs)(Y,{size:`xs`,c:`dimmed`,children:[`No guides match "`,i,`".`]}),MF.filter(e=>l[e]?.length).map(t=>(0,G.jsxs)(C_,{gap:0,mb:`sm`,children:[(0,G.jsxs)(El,{gap:6,mb:4,mt:6,children:[NF[t],(0,G.jsx)(Y,{size:`xs`,c:`dimmed`,tt:`uppercase`,fw:600,children:jF[t]??t})]}),l[t].map(t=>(0,G.jsx)(jh,{label:t.title,description:t.path,active:t.path===s,onClick:()=>e(`/help/${t.path}`)},t.path))]},t))]})}),(0,G.jsxs)(Jp.Col,{span:{base:12,md:9},children:[c.isLoading&&(0,G.jsx)(cl,{}),c.isError&&(0,G.jsx)(Nd,{color:`red`,title:`Could not load ${s}`,children:c.error.message}),c.data&&(0,G.jsxs)(C_,{gap:`sm`,children:[(0,G.jsxs)(El,{justify:`space-between`,align:`flex-end`,wrap:`nowrap`,children:[(0,G.jsx)(R_,{order:3,children:r.find(e=>e.path===s)?.title??s}),(0,G.jsxs)(El,{gap:`sm`,wrap:`nowrap`,children:[(0,G.jsx)(Ow,{cmd:`cerefox guides show`,args:s}),(0,G.jsx)(Bd,{size:`xs`,c:`dimmed`,href:`/api/v1/docs/${s}`,target:`_blank`,rel:`noopener noreferrer`,children:`raw`})]})]}),(0,G.jsx)(zP,{content:c.data,showToggle:!1,maxHeight:`calc(100vh - 170px)`})]})]})]})]})}var FF={wrap:`_wrap_1arvn_4`,split:`_split_1arvn_10`,col:`_col_1arvn_16`,field:`_field_1arvn_23`,input:`_input_1arvn_30`,textarea:`_textarea_1arvn_49`,preview:`_preview_1arvn_56`,dropZone:`_dropZone_1arvn_61`,dropZoneOver:`_dropZoneOver_1arvn_75`,dropZoneHas:`_dropZoneHas_1arvn_79`,dropIco:`_dropIco_1arvn_83`,toggleRow:`_toggleRow_1arvn_94`,toggle:`_toggle_1arvn_94`,toggleOn:`_toggleOn_1arvn_119`,steps:`_steps_1arvn_128`,faint:`_faint_1arvn_149`,stepN:`_stepN_1arvn_154`,actions:`_actions_1arvn_168`},IF=[`--primary`,`--violet`,`--blue`,`--green`,`--yellow`,`--red`];function LF(){let e=Rx(),t=Uy(),{data:n}=GP(),{data:r}=KP(),i=(0,w.useRef)(null),[a,o]=(0,w.useState)(`paste`),[s,c]=(0,w.useState)(``),[l,u]=(0,w.useState)([]),[d,f]=(0,w.useState)(``),[p,m]=(0,w.useState)([]),[h,g]=(0,w.useState)(!1),[_,v]=(0,w.useState)(``),[y,b]=(0,w.useState)(`edit`),[x,S]=(0,w.useState)(null),[C,T]=(0,w.useState)(!1),[E,D]=(0,w.useState)(null),[O,k]=(0,w.useState)(null),A=()=>{let e={};for(let t of p)t.key.trim()&&t.value.trim()&&(e[t.key.trim()]=t.value.trim());return e},j=e=>{k(e),e.success&&BP(t),e.skipped&&e.note&&JP(`Ingest skipped`,e.note)},M=e=>{YP(e)||JP(`Ingest failed`,e instanceof Error?e.message:String(e))},N=ab({mutationFn:()=>dT({title:s,content:_,update_existing:h,project_ids:l,metadata:A()}),onSuccess:j,onError:M}),P=ab({mutationFn:async()=>{if(!x)throw Error(`No file selected`);let e=new FormData;e.append(`file`,x),s.trim()&&e.append(`title`,s.trim()),e.append(`update_existing`,String(h)),l.length>0&&e.append(`project_ids`,l.join(`,`));let t=A();Object.keys(t).length>0&&e.append(`metadata`,JSON.stringify(t));let n=await fetch(`/api/v1/ingest/file`,{method:`POST`,body:e});if(!n.ok)throw await cw(n)||Error(`Upload failed: ${n.status}`);return n.json()},onSuccess:j,onError:M}),F=async e=>{if(S(e),D(null),e?.name)try{let t=await fT(e.name);D(t),t.exists&&g(!0)}catch{}},I=e=>u(t=>t.includes(e)?t.filter(t=>t!==e):[...t,e]),L=()=>a===`file`?P.mutate():N.mutate(),R=N.isPending||P.isPending,z=a===`file`?!!x:s.trim().length>0&&_.trim().length>0,B=a===`paste`?Math.round(_.length/700):x?Math.round(x.size/700):0,V=n?.find(e=>e.id===l[0])?.name??`core-platform`,H=n??[],ee=d?H.filter(e=>e.name.toLowerCase().includes(d.toLowerCase())):H;return(0,G.jsxs)(`div`,{className:FF.wrap,children:[(0,G.jsx)(`div`,{className:X.pageHead,children:(0,G.jsxs)(`div`,{children:[(0,G.jsx)(`p`,{className:X.eyebrow,children:`Add to memory`}),(0,G.jsx)(`h1`,{className:X.pageTitle,"data-testid":`page-title`,children:`Ingest content`})]})}),O?.success&&(0,G.jsxs)(Nd,{icon:(0,G.jsx)(SC,{size:16}),title:O.updated?`Updated`:`Ingested`,color:`green`,mb:`md`,withCloseButton:!0,onClose:()=>k(null),children:[O.updated?`"${O.title}" updated and re-indexed.`:`"${O.title}" ingested successfully.`,` `,O.document_id&&(0,G.jsx)(`span`,{style:{cursor:`pointer`,textDecoration:`underline`,color:`var(--primary)`},onClick:()=>e(`/document/${O.document_id}`),children:`View document`})]}),O&&!O.success&&O.error&&(0,G.jsx)(Nd,{icon:(0,G.jsx)(tw,{size:16}),title:`Error`,color:`red`,mb:`md`,withCloseButton:!0,onClose:()=>k(null),children:O.error}),(0,G.jsxs)(`div`,{className:X.seg,style:{marginBottom:20},children:[(0,G.jsxs)(`button`,{type:`button`,className:`${X.segBtn} ${a===`paste`?X.segBtnOn:``}`,onClick:()=>o(`paste`),children:[(0,G.jsx)(FC,{size:14}),`Paste content`]}),(0,G.jsxs)(`button`,{type:`button`,className:`${X.segBtn} ${a===`file`?X.segBtnOn:``}`,onClick:()=>o(`file`),children:[(0,G.jsx)(ew,{size:14}),`Upload file`]})]}),(0,G.jsxs)(`form`,{className:FF.split,onSubmit:e=>{e.preventDefault(),z&&L()},children:[(0,G.jsxs)(`div`,{className:FF.col,children:[(0,G.jsxs)(`div`,{className:FF.field,children:[(0,G.jsxs)(`label`,{children:[`Title`,a===`file`&&(0,G.jsx)(`span`,{className:X.faint,children:` (optional — defaults to filename)`})]}),(0,G.jsx)(`input`,{className:FF.input,value:s,onChange:e=>c(e.currentTarget.value),placeholder:`Document title`})]}),H.length>0&&(0,G.jsxs)(`div`,{className:FF.field,children:[(0,G.jsx)(`label`,{children:`Projects`}),H.length>8&&(0,G.jsxs)(`div`,{className:X.selectWrap,style:{width:`100%`,marginBottom:8,height:34},children:[(0,G.jsx)(JC,{size:14}),(0,G.jsx)(`input`,{className:X.selectEl,style:{maxWidth:`none`,flex:1},placeholder:`Filter ${H.length} projects…`,value:d,onChange:e=>f(e.currentTarget.value)})]}),(0,G.jsxs)(`div`,{className:X.row,style:{gap:7,flexWrap:`wrap`},children:[ee.map(e=>{let t=H.indexOf(e);return(0,G.jsxs)(`button`,{type:`button`,className:`${X.chip} ${l.includes(e.id)?X.chipOn:``}`,onClick:()=>I(e.id),children:[(0,G.jsx)(`span`,{style:{width:7,height:7,borderRadius:`50%`,background:`var(${IF[t%IF.length]})`}}),e.name]},e.id)}),ee.length===0&&(0,G.jsxs)(`span`,{className:X.faint,style:{fontSize:12.5},children:[`No projects match "`,d,`".`]})]})]}),(0,G.jsxs)(`div`,{className:FF.field,children:[(0,G.jsxs)(`label`,{children:[`Metadata `,(0,G.jsx)(`span`,{className:X.faint,children:`(optional)`})]}),(0,G.jsx)(`datalist`,{id:`cerefox-meta-keys`,children:r?.map(e=>(0,G.jsx)(`option`,{value:e.key},e.key))}),(0,G.jsxs)(`div`,{className:X.col,style:{gap:8},children:[p.map((e,t)=>(0,G.jsxs)(`div`,{className:X.row,style:{gap:8},children:[(0,G.jsx)(`input`,{className:FF.input,style:{flex:1},list:`cerefox-meta-keys`,placeholder:`key`,value:e.key,onChange:e=>m(n=>n.map((n,r)=>r===t?{...n,key:e.currentTarget.value}:n))}),(0,G.jsx)(`input`,{className:FF.input,style:{flex:1},placeholder:`value`,value:e.value,onChange:e=>m(n=>n.map((n,r)=>r===t?{...n,value:e.currentTarget.value}:n))}),(0,G.jsx)(`button`,{type:`button`,className:X.iconBtn,"aria-label":`Remove`,onClick:()=>m(e=>e.filter((e,n)=>n!==t)),children:(0,G.jsx)(tw,{size:15})})]},t)),(0,G.jsxs)(`button`,{type:`button`,className:`${X.btn} ${X.btnSubtle}`,style:{alignSelf:`flex-start`},onClick:()=>m(e=>[...e,{key:``,value:``}]),children:[(0,G.jsx)(KC,{size:14}),`Add field`]})]})]}),a===`file`?(0,G.jsxs)(`div`,{className:FF.field,children:[(0,G.jsx)(`label`,{children:`File`}),(0,G.jsx)(`input`,{ref:i,type:`file`,accept:`.md,.txt,.docx`,style:{display:`none`},onChange:e=>F(e.currentTarget.files?.[0]??null)}),(0,G.jsxs)(`div`,{className:`${FF.dropZone} ${C?FF.dropZoneOver:``} ${x?FF.dropZoneHas:``}`,onClick:()=>i.current?.click(),onDragOver:e=>{e.preventDefault(),T(!0)},onDragLeave:()=>T(!1),onDrop:e=>{e.preventDefault(),T(!1);let t=e.dataTransfer.files?.[0];t&&F(t)},children:[(0,G.jsx)(`span`,{className:FF.dropIco,children:(0,G.jsx)(ew,{size:20})}),x?(0,G.jsxs)(G.Fragment,{children:[(0,G.jsx)(`div`,{className:X.mono,style:{fontWeight:600,fontSize:14,marginTop:10},children:x.name}),(0,G.jsx)(`span`,{className:X.faint,style:{fontSize:12.5},children:`Ready to ingest · click to replace`})]}):(0,G.jsxs)(G.Fragment,{children:[(0,G.jsx)(`div`,{style:{fontWeight:600,fontSize:14,marginTop:10},children:`Drop a file or click to browse`}),(0,G.jsx)(`span`,{className:X.faint,style:{fontSize:12.5},children:`.md · .txt · .docx`})]})]}),E?.exists&&(0,G.jsxs)(Nd,{color:`blue`,variant:`light`,mt:`sm`,children:[`A document named "`,E.title,`" already exists (updated`,` `,E.updated_at?new Date(E.updated_at).toLocaleDateString():`unknown`,`). Enable "Update existing" to overwrite it.`]})]}):(0,G.jsxs)(`div`,{className:FF.field,children:[(0,G.jsxs)(`div`,{className:X.row,style:{justifyContent:`space-between`,marginBottom:8},children:[(0,G.jsx)(`label`,{style:{margin:0},children:`Content`}),(0,G.jsxs)(`div`,{className:X.seg,style:{padding:2},children:[(0,G.jsx)(`button`,{type:`button`,className:`${X.segBtn} ${y===`edit`?X.segBtnOn:``}`,style:{padding:`4px 10px`},onClick:()=>b(`edit`),children:`Edit`}),(0,G.jsx)(`button`,{type:`button`,className:`${X.segBtn} ${y===`preview`?X.segBtnOn:``}`,style:{padding:`4px 10px`},onClick:()=>b(`preview`),children:`Preview`})]})]}),y===`edit`?(0,G.jsx)(`textarea`,{className:`${FF.input} ${FF.textarea}`,value:_,onChange:e=>v(e.currentTarget.value),placeholder:`# Paste your Markdown here…`}):(0,G.jsx)(`div`,{className:`${X.card} ${X.cardPad} ${FF.preview}`,children:_.trim()?(0,G.jsx)(zP,{content:_,defaultView:`rendered`,maxHeight:400,showToggle:!1}):(0,G.jsx)(`span`,{className:X.faint,children:`Nothing to preview yet.`})})]}),(0,G.jsxs)(`div`,{className:FF.actions,children:[(0,G.jsxs)(`button`,{type:`submit`,className:`${X.btn} ${X.btnPrimary}`,disabled:!z||R,children:[(0,G.jsx)(SC,{size:16}),a===`file`?`Upload & ingest`:`Ingest`]}),(0,G.jsxs)(`label`,{className:FF.toggleRow,children:[(0,G.jsx)(`button`,{type:`button`,className:`${FF.toggle} ${h?FF.toggleOn:``}`,role:`switch`,"aria-checked":h,onClick:()=>g(e=>!e),children:(0,G.jsx)(`span`,{})}),(0,G.jsx)(`span`,{style:{fontSize:13},children:`Update existing if title matches`})]})]})]}),(0,G.jsxs)(`aside`,{className:FF.col,children:[(0,G.jsxs)(`div`,{className:`${X.card} ${X.cardPad} ${X.rise}`,children:[(0,G.jsx)(`div`,{className:X.mono,style:{fontSize:10.5,letterSpacing:`0.1em`,textTransform:`uppercase`,color:`var(--text-faint)`,marginBottom:12},children:`Pipeline`}),(0,G.jsxs)(`ol`,{className:FF.steps,children:[(0,G.jsxs)(`li`,{children:[(0,G.jsx)(`span`,{className:FF.stepN,children:`1`}),(0,G.jsxs)(`div`,{children:[(0,G.jsx)(`b`,{children:`Chunked`}),(0,G.jsxs)(`span`,{className:`faint`,children:[`Split on headings into ~`,B||`—`,` semantic chunks.`]})]})]}),(0,G.jsxs)(`li`,{children:[(0,G.jsx)(`span`,{className:FF.stepN,children:`2`}),(0,G.jsxs)(`div`,{children:[(0,G.jsx)(`b`,{children:`Embedded`}),(0,G.jsx)(`span`,{className:`faint`,children:`Each chunk vectorized for semantic search.`})]})]}),(0,G.jsxs)(`li`,{children:[(0,G.jsx)(`span`,{className:FF.stepN,children:`3`}),(0,G.jsxs)(`div`,{children:[(0,G.jsx)(`b`,{children:`Staged`}),(0,G.jsx)(`span`,{className:`faint`,children:`Indexed and discoverable by your agents.`})]})]})]})]}),(0,G.jsx)(Zw,{title:`CLI equivalent`,commands:[{cmd:`cerefox document ingest`,args:`./${x?.name??`doc.md`} --project-name ${V}`}]})]})]})]})}function RF(){let{id:e}=Hx(),t=Rx(),{data:n}=GP(),r=n?.find(t=>t.id===e),i=new Map(n?.map(e=>[e.id,e.name])??[]),[a,o]=(0,w.useState)(1),[s,c]=Nw(),l=(a-1)*s,{data:u,isLoading:d,isFetching:f}=ib({queryKey:[`project-documents`,e,a,s],queryFn:()=>sw(`/projects/${e}/documents?limit=${s}&offset=${l}`),enabled:!!e,placeholderData:ay}),p=u?.documents??[],m=u?.total??0,h=Math.max(1,Math.ceil(m/s));return(0,G.jsxs)(`div`,{className:Pw.wrap,children:[(0,G.jsxs)(`button`,{type:`button`,className:`${X.btn} ${X.btnSubtle}`,style:{marginBottom:12,paddingLeft:6},onClick:()=>t(`/projects`),children:[(0,G.jsx)(vC,{size:15}),`Projects`]}),(0,G.jsxs)(`div`,{className:X.pageHead,children:[(0,G.jsxs)(`div`,{children:[(0,G.jsx)(`p`,{className:X.eyebrow,children:`Memory space`}),(0,G.jsx)(`h1`,{className:X.pageTitle,children:r?.name||`Project`}),r?.description&&(0,G.jsx)(`p`,{className:X.pageSub,children:r.description})]}),(0,G.jsx)(Ow,{cmd:`cerefox document list`,args:`--project "${r?.name??`<name>`}"`})]}),d?(0,G.jsx)(`div`,{style:{display:`flex`,justifyContent:`center`,marginTop:40},children:(0,G.jsx)(cl,{})}):m===0?(0,G.jsx)(`div`,{className:`${X.card} ${Pw.emptyRow}`,children:`No documents in this project.`}):(0,G.jsxs)(`div`,{className:`${X.card} ${X.rise}`,style:{overflow:`hidden`},children:[(0,G.jsxs)(`table`,{className:Pw.tbl,children:[(0,G.jsx)(`thead`,{children:(0,G.jsxs)(`tr`,{children:[(0,G.jsx)(`th`,{children:`Document`}),(0,G.jsx)(`th`,{style:{width:90,textAlign:`right`},children:`Chunks`}),(0,G.jsx)(`th`,{style:{width:110,textAlign:`right`},children:`Size`}),(0,G.jsx)(`th`,{style:{width:120,textAlign:`right`},children:`Updated`})]})}),(0,G.jsx)(`tbody`,{children:p.map(n=>{let r=n.review_status!==`approved`;return(0,G.jsxs)(`tr`,{style:{cursor:`pointer`},onClick:()=>t(`/document/${n.id}`),children:[(0,G.jsx)(`td`,{children:(0,G.jsxs)(`span`,{style:{display:`inline-flex`,alignItems:`center`,gap:8,flexWrap:`wrap`},children:[(0,G.jsx)(`span`,{className:X.link,style:{fontSize:13.5},children:n.title||`Untitled`}),n.project_ids.filter(t=>t!==e&&i.has(t)).map(e=>(0,G.jsx)(`span`,{className:`${X.badge} ${X.bNeutral}`,children:i.get(e)},e)),r&&(0,G.jsxs)(`span`,{className:`${X.badge} ${X.bYellow}`,children:[(0,G.jsx)(`span`,{style:{width:6,height:6,borderRadius:`50%`,background:`currentColor`}}),`pending review`]})]})}),(0,G.jsx)(`td`,{className:`${X.mono} ${X.dim}`,style:{textAlign:`right`},children:n.chunk_count}),(0,G.jsx)(`td`,{className:`${X.mono} ${X.dim}`,style:{textAlign:`right`},children:n.total_chars.toLocaleString()}),(0,G.jsx)(`td`,{className:`${X.faint}`,style:{textAlign:`right`},children:Lw(n.updated_at)})]},n.id)})})]}),(0,G.jsx)(Fw,{page:a,pageCount:h,total:m,pageSize:s,onPage:o,onPageSize:e=>{c(e),o(1)},loading:f&&!d})]})]})}var zF=[`--primary`,`--violet`,`--blue`,`--green`,`--yellow`,`--red`];function BF(){let e=Rx(),t=Uy(),{data:n,isLoading:r}=GP(),{data:i}=ib({queryKey:[`dashboard`],queryFn:()=>Qw()}),a=i?.project_doc_counts??{},o=i?.project_deleted_doc_counts??{},s=Math.max(1,...Object.values(a)),c=new Map((n??[]).map((e,t)=>[e.id,zF[t%zF.length]])),[l,u]=(0,w.useState)(``),[d,f]=(0,w.useState)(!1),[p,m]=(0,w.useState)(``),[h,g]=(0,w.useState)(``),[_,v]=(0,w.useState)(null),[y,b]=(0,w.useState)(``),[x,S]=(0,w.useState)(``),[C,T]=(0,w.useState)(null),E=ab({mutationFn:()=>UP(p.trim(),h.trim()),onSuccess:()=>{t.invalidateQueries({queryKey:[`projects`]}),qP(`Project created`),m(``),g(``),f(!1)},onError:e=>JP(`Create failed`,String(e))}),D=ab({mutationFn:()=>wee(_,y.trim(),x.trim()),onSuccess:()=>{t.invalidateQueries({queryKey:[`projects`]}),qP(`Project updated`),v(null)},onError:e=>JP(`Update failed`,String(e))}),O=ab({mutationFn:e=>WP(e),onSuccess:()=>{t.invalidateQueries({queryKey:[`projects`]}),t.invalidateQueries({queryKey:[`dashboard`]}),qP(`Project deleted`),T(null)},onError:e=>{if(e instanceof iw&&e.status===404){t.invalidateQueries({queryKey:[`projects`]}),t.invalidateQueries({queryKey:[`dashboard`]}),T(null);return}JP(`Delete failed`,String(e))}});return(0,G.jsxs)(G.Fragment,{children:[(0,G.jsx)(Iw,{eyebrow:`Memory spaces`,title:`Projects`,subtitle:`Scoped collections your agents read from and write to.`,headerRight:(0,G.jsxs)(`div`,{style:{display:`flex`,flexDirection:`column`,alignItems:`flex-end`,gap:8,width:400,maxWidth:`100%`},children:[(0,G.jsxs)(`button`,{type:`button`,className:`${X.btn} ${X.btnPrimary}`,style:{alignSelf:`flex-end`},onClick:()=>f(!0),children:[(0,G.jsx)(KC,{size:16}),`New project`]}),(0,G.jsx)(Zw,{title:`CLI equivalent`,commands:[{cmd:`cerefox project list`},{cmd:`cerefox project create`,args:`<name>`}]})]}),searchValue:l,onSearchChange:u,searchPlaceholder:`Filter projects…`,searchText:e=>`${e.name} ${e.description??``}`,columns:[{key:`name`,label:`Project`,render:e=>(0,G.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:11},children:[(0,G.jsx)(`span`,{style:{width:9,height:9,borderRadius:`50%`,flexShrink:0,background:`var(${c.get(e.id)??`--border`})`}}),(0,G.jsxs)(`div`,{style:{display:`flex`,flexDirection:`column`,gap:2,minWidth:0},children:[(0,G.jsx)(`span`,{className:X.mono,style:{fontWeight:600,fontSize:13},children:e.name}),e.description&&(0,G.jsx)(`span`,{className:X.faint,style:{fontSize:12},children:e.description})]})]})},{key:`docs`,label:`Documents`,width:180,render:e=>{let t=a[e.id]??0;return(0,G.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:10},children:[(0,G.jsx)(`span`,{className:X.mono,style:{fontSize:13},children:t}),(0,G.jsx)(`span`,{style:{flex:1,maxWidth:90,height:5,borderRadius:3,background:`var(--surface-2)`,overflow:`hidden`},children:(0,G.jsx)(`span`,{style:{display:`block`,height:`100%`,width:`${t/s*100}%`,background:`var(${c.get(e.id)??`--border`})`}})})]})}},{key:`trash`,label:`In trash`,width:90,align:`right`,render:e=>{let t=o[e.id]??0;return t>0?(0,G.jsx)(`span`,{className:`${X.mono} ${X.faint}`,style:{fontSize:12},children:t}):(0,G.jsx)(`span`,{className:`${X.mono} ${X.faint}`,style:{fontSize:12},children:`—`})}}],rows:n??[],rowKey:e=>e.id,rowClick:t=>e(`/projects/${t.id}/documents`),loading:r,emptyText:`No projects yet. Create one to get started.`,actions:e=>C===e.id?(0,G.jsxs)(G.Fragment,{children:[(0,G.jsx)(`button`,{type:`button`,className:`${X.btn} ${X.btnSubtle}`,style:{color:`var(--red)`},disabled:O.isPending,onClick:()=>O.mutate(e.id),children:`Delete`}),(0,G.jsx)(`button`,{type:`button`,className:`${X.btn} ${X.btnSubtle}`,onClick:()=>T(null),children:`Cancel`})]}):(0,G.jsxs)(G.Fragment,{children:[(0,G.jsx)(`button`,{type:`button`,className:X.iconBtnSm,title:`Edit`,onClick:()=>{v(e.id),b(e.name),S(e.description||``)},children:(0,G.jsx)(PC,{size:14})}),(0,G.jsx)(`button`,{type:`button`,className:`${X.iconBtnSm} ${X.iconBtnDanger}`,title:`Delete`,onClick:()=>T(e.id),children:(0,G.jsx)($C,{size:14})})]})}),(0,G.jsx)(uh,{opened:d,onClose:()=>f(!1),title:`New project`,children:(0,G.jsx)(`form`,{onSubmit:e=>{e.preventDefault(),p.trim()&&E.mutate()},children:(0,G.jsxs)(C_,{gap:`sm`,children:[(0,G.jsx)(j_,{label:`Name`,value:p,onChange:e=>m(e.currentTarget.value),required:!0,placeholder:`Project name`,"data-autofocus":!0}),(0,G.jsx)(j_,{label:`Description`,value:h,onChange:e=>g(e.currentTarget.value),placeholder:`Optional description`}),(0,G.jsx)(bp,{type:`submit`,loading:E.isPending,children:`Create`})]})})}),(0,G.jsx)(uh,{opened:_!==null,onClose:()=>v(null),title:`Edit project`,children:(0,G.jsx)(`form`,{onSubmit:e=>{e.preventDefault(),D.mutate()},children:(0,G.jsxs)(C_,{gap:`sm`,children:[(0,G.jsx)(j_,{label:`Name`,value:y,onChange:e=>b(e.currentTarget.value),required:!0}),(0,G.jsx)(j_,{label:`Description`,value:x,onChange:e=>S(e.currentTarget.value)}),(0,G.jsxs)(El,{gap:`sm`,children:[(0,G.jsx)(bp,{type:`submit`,loading:D.isPending,children:`Save`}),(0,G.jsx)(bp,{variant:`subtle`,onClick:()=>v(null),children:`Cancel`})]})]})})})]})}var VF=[`remote-mcp`,`local-mcp`,`cli`,`webapp`,`edge-function`,`api`],HF=aI(),UF=e=>eI(e,HF),WF=aI();UF.write=e=>eI(e,WF);var GF=aI();UF.onStart=e=>eI(e,GF);var KF=aI();UF.onFrame=e=>eI(e,KF);var qF=aI();UF.onFinish=e=>eI(e,qF);var JF=[];UF.setTimeout=(e,t)=>{let n=UF.now()+t,r=()=>{let e=JF.findIndex(e=>e.cancel==r);~e&&JF.splice(e,1),QF-=+!!~e},i={time:n,handler:e,cancel:r};return JF.splice(YF(n),0,i),QF+=1,tI(),i};var YF=e=>~(~JF.findIndex(t=>t.time>e)||~JF.length);UF.cancel=e=>{GF.delete(e),KF.delete(e),HF.delete(e),WF.delete(e),qF.delete(e)},UF.sync=e=>{$F=!0,UF.batchedUpdates(e),$F=!1},UF.throttle=e=>{let t;function n(){try{e(...t)}finally{t=null}}function r(...e){t=e,UF.onStart(n)}return r.handler=e,r.cancel=()=>{GF.delete(n),t=null},r};var XF=typeof window<`u`?window.requestAnimationFrame:()=>{};UF.use=e=>XF=e,UF.now=typeof performance<`u`?()=>performance.now():Date.now,UF.batchedUpdates=e=>e(),UF.catch=console.error,UF.frameLoop=`always`,UF.advance=()=>{UF.frameLoop===`demand`?iI():console.warn(`Cannot call the manual advancement of rafz whilst frameLoop is not set as demand`)};var ZF=-1,QF=0,$F=!1;function eI(e,t){$F?(t.delete(e),e(0)):(t.add(e),tI())}function tI(){ZF<0&&(ZF=0,UF.frameLoop!==`demand`&&XF(rI))}function nI(){ZF=-1}function rI(){~ZF&&(XF(rI),UF.batchedUpdates(iI))}function iI(){let e=ZF;ZF=UF.now();let t=YF(ZF);t&&(oI(JF.splice(0,t),e=>e.handler()),QF-=t),GF.flush(),HF.flush(e?Math.min(64,ZF-e):16.667),KF.flush(),WF.flush(),qF.flush(),QF||nI()}function aI(){let e=new Set,t=e;return{add(n){QF+=+(t==e&&!e.has(n)),e.add(n)},delete(n){return QF-=t==e&&e.has(n)?1:0,e.delete(n)},flush(n){t.size&&(e=new Set,QF-=t.size,oI(t,t=>t(n)&&e.add(t)),QF+=e.size,t=e)}}}function oI(e,t){e.forEach(e=>{try{t(e)}catch(e){UF.catch(e)}})}function sI(){}var cI=(e,t,n)=>Object.defineProperty(e,t,{value:n,writable:!0,configurable:!0}),Q={arr:Array.isArray,obj:e=>!!e&&e.constructor.name===`Object`,fun:e=>typeof e==`function`,str:e=>typeof e==`string`,num:e=>typeof e==`number`,und:e=>e===void 0};function lI(e,t){if(Q.arr(e)){if(!Q.arr(t)||e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}return e===t}var uI=(e,t)=>e.forEach(t);function dI(e,t,n){if(Q.arr(e)){for(let r=0;r<e.length;r++)t.call(n,e[r],`${r}`);return}for(let r in e)e.hasOwnProperty(r)&&t.call(n,e[r],r)}var fI=e=>Q.und(e)?[]:Q.arr(e)?e:[e];function pI(e,t){if(e.size){let n=Array.from(e);e.clear(),uI(n,t)}}var mI=(e,...t)=>pI(e,e=>e(...t)),hI=()=>typeof window>`u`||!window.navigator||/ServerSideRendering|^Deno\//.test(window.navigator.userAgent),gI,_I,vI=null,yI=!1,bI=sI,xI=Object.freeze({__proto__:null,get createStringInterpolator(){return gI},get to(){return _I},get colors(){return vI},get skipAnimation(){return yI},get willAdvance(){return bI},assign:e=>{e.to&&(_I=e.to),e.now&&(UF.now=e.now),e.colors!==void 0&&(vI=e.colors),e.skipAnimation!=null&&(yI=e.skipAnimation),e.createStringInterpolator&&(gI=e.createStringInterpolator),e.requestAnimationFrame&&UF.use(e.requestAnimationFrame),e.batchedUpdates&&(UF.batchedUpdates=e.batchedUpdates),e.willAdvance&&(bI=e.willAdvance),e.frameLoop&&(UF.frameLoop=e.frameLoop)}}),SI=new Set,CI=[],wI=[],TI=0,EI={get idle(){return!SI.size&&!CI.length},start(e){TI>e.priority?(SI.add(e),UF.onStart(DI)):(OI(e),UF(AI))},advance:AI,sort(e){if(TI)UF.onFrame(()=>EI.sort(e));else{let t=CI.indexOf(e);~t&&(CI.splice(t,1),kI(e))}},clear(){CI=[],SI.clear()}};function DI(){SI.forEach(OI),SI.clear(),UF(AI)}function OI(e){CI.includes(e)||kI(e)}function kI(e){CI.splice(jI(CI,t=>t.priority>e.priority),0,e)}function AI(e){let t=wI;for(let n=0;n<CI.length;n++){let r=CI[n];TI=r.priority,r.idle||(bI(r),r.advance(e),r.idle||t.push(r))}return TI=0,wI=CI,wI.length=0,CI=t,CI.length>0}function jI(e,t){let n=e.findIndex(t);return n<0?e.length:n}var MI={transparent:0,aliceblue:4042850303,antiquewhite:4209760255,aqua:16777215,aquamarine:2147472639,azure:4043309055,beige:4126530815,bisque:4293182719,black:255,blanchedalmond:4293643775,blue:65535,blueviolet:2318131967,brown:2771004159,burlywood:3736635391,burntsienna:3934150143,cadetblue:1604231423,chartreuse:2147418367,chocolate:3530104575,coral:4286533887,cornflowerblue:1687547391,cornsilk:4294499583,crimson:3692313855,cyan:16777215,darkblue:35839,darkcyan:9145343,darkgoldenrod:3095792639,darkgray:2846468607,darkgreen:6553855,darkgrey:2846468607,darkkhaki:3182914559,darkmagenta:2332068863,darkolivegreen:1433087999,darkorange:4287365375,darkorchid:2570243327,darkred:2332033279,darksalmon:3918953215,darkseagreen:2411499519,darkslateblue:1211993087,darkslategray:793726975,darkslategrey:793726975,darkturquoise:13554175,darkviolet:2483082239,deeppink:4279538687,deepskyblue:12582911,dimgray:1768516095,dimgrey:1768516095,dodgerblue:512819199,firebrick:2988581631,floralwhite:4294635775,forestgreen:579543807,fuchsia:4278255615,gainsboro:3705462015,ghostwhite:4177068031,gold:4292280575,goldenrod:3668254975,gray:2155905279,green:8388863,greenyellow:2919182335,grey:2155905279,honeydew:4043305215,hotpink:4285117695,indianred:3445382399,indigo:1258324735,ivory:4294963455,khaki:4041641215,lavender:3873897215,lavenderblush:4293981695,lawngreen:2096890111,lemonchiffon:4294626815,lightblue:2916673279,lightcoral:4034953471,lightcyan:3774873599,lightgoldenrodyellow:4210742015,lightgray:3553874943,lightgreen:2431553791,lightgrey:3553874943,lightpink:4290167295,lightsalmon:4288707327,lightseagreen:548580095,lightskyblue:2278488831,lightslategray:2005441023,lightslategrey:2005441023,lightsteelblue:2965692159,lightyellow:4294959359,lime:16711935,limegreen:852308735,linen:4210091775,magenta:4278255615,maroon:2147483903,mediumaquamarine:1724754687,mediumblue:52735,mediumorchid:3126187007,mediumpurple:2473647103,mediumseagreen:1018393087,mediumslateblue:2070474495,mediumspringgreen:16423679,mediumturquoise:1221709055,mediumvioletred:3340076543,midnightblue:421097727,mintcream:4127193855,mistyrose:4293190143,moccasin:4293178879,navajowhite:4292783615,navy:33023,oldlace:4260751103,olive:2155872511,olivedrab:1804477439,orange:4289003775,orangered:4282712319,orchid:3664828159,palegoldenrod:4008225535,palegreen:2566625535,paleturquoise:2951671551,palevioletred:3681588223,papayawhip:4293907967,peachpuff:4292524543,peru:3448061951,pink:4290825215,plum:3718307327,powderblue:2967529215,purple:2147516671,rebeccapurple:1714657791,red:4278190335,rosybrown:3163525119,royalblue:1097458175,saddlebrown:2336560127,salmon:4202722047,sandybrown:4104413439,seagreen:780883967,seashell:4294307583,sienna:2689740287,silver:3233857791,skyblue:2278484991,slateblue:1784335871,slategray:1887473919,slategrey:1887473919,snow:4294638335,springgreen:16744447,steelblue:1182971135,tan:3535047935,teal:8421631,thistle:3636451583,tomato:4284696575,turquoise:1088475391,violet:4001558271,wheat:4125012991,white:4294967295,whitesmoke:4126537215,yellow:4294902015,yellowgreen:2597139199},NI=`[-+]?\\d*\\.?\\d+`,PI=`[-+]?\\d*\\.?\\d+%`;function FI(...e){return`\\(\\s*(`+e.join(`)\\s*,\\s*(`)+`)\\s*\\)`}var II=RegExp(`rgb`+FI(NI,NI,NI)),LI=RegExp(`rgba`+FI(NI,NI,NI,NI)),RI=RegExp(`hsl`+FI(NI,PI,PI)),zI=RegExp(`hsla`+FI(NI,PI,PI,NI)),BI=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,VI=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,HI=/^#([0-9a-fA-F]{6})$/,UI=/^#([0-9a-fA-F]{8})$/;function WI(e){let t;return typeof e==`number`?e>>>0===e&&e>=0&&e<=4294967295?e:null:(t=HI.exec(e))?parseInt(t[1]+`ff`,16)>>>0:vI&&vI[e]!==void 0?vI[e]:(t=II.exec(e))?(qI(t[1])<<24|qI(t[2])<<16|qI(t[3])<<8|255)>>>0:(t=LI.exec(e))?(qI(t[1])<<24|qI(t[2])<<16|qI(t[3])<<8|YI(t[4]))>>>0:(t=BI.exec(e))?parseInt(t[1]+t[1]+t[2]+t[2]+t[3]+t[3]+`ff`,16)>>>0:(t=UI.exec(e))?parseInt(t[1],16)>>>0:(t=VI.exec(e))?parseInt(t[1]+t[1]+t[2]+t[2]+t[3]+t[3]+t[4]+t[4],16)>>>0:(t=RI.exec(e))?(KI(JI(t[1]),XI(t[2]),XI(t[3]))|255)>>>0:(t=zI.exec(e))?(KI(JI(t[1]),XI(t[2]),XI(t[3]))|YI(t[4]))>>>0:null}function GI(e,t,n){return n<0&&(n+=1),n>1&&--n,n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function KI(e,t,n){let r=n<.5?n*(1+t):n+t-n*t,i=2*n-r,a=GI(i,r,e+1/3),o=GI(i,r,e),s=GI(i,r,e-1/3);return Math.round(a*255)<<24|Math.round(o*255)<<16|Math.round(s*255)<<8}function qI(e){let t=parseInt(e,10);return t<0?0:t>255?255:t}function JI(e){return(parseFloat(e)%360+360)%360/360}function YI(e){let t=parseFloat(e);return t<0?0:t>1?255:Math.round(t*255)}function XI(e){let t=parseFloat(e);return t<0?0:t>100?1:t/100}function ZI(e){let t=WI(e);return t===null?e:(t||=0,`rgba(${(t&4278190080)>>>24}, ${(t&16711680)>>>16}, ${(t&65280)>>>8}, ${(t&255)/255})`)}var QI=(e,t,n)=>{if(Q.fun(e))return e;if(Q.arr(e))return QI({range:e,output:t,extrapolate:n});if(Q.str(e.output[0]))return gI(e);let r=e,i=r.output,a=r.range||[0,1],o=r.extrapolateLeft||r.extrapolate||`extend`,s=r.extrapolateRight||r.extrapolate||`extend`,c=r.easing||(e=>e);return e=>{let t=eL(e,a);return $I(e,a[t],a[t+1],i[t],i[t+1],c,o,s,r.map)}};function $I(e,t,n,r,i,a,o,s,c){let l=c?c(e):e;if(l<t){if(o===`identity`)return l;o===`clamp`&&(l=t)}if(l>n){if(s===`identity`)return l;s===`clamp`&&(l=n)}return r===i?r:t===n?e<=t?r:i:(t===-1/0?l=-l:n===1/0?l-=t:l=(l-t)/(n-t),l=a(l),r===-1/0?l=-l:i===1/0?l+=r:l=l*(i-r)+r,l)}function eL(e,t){for(var n=1;n<t.length-1&&!(t[n]>=e);++n);return n-1}function tL(){return tL=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},tL.apply(this,arguments)}var nL=Symbol.for(`FluidValue.get`),rL=Symbol.for(`FluidValue.observers`),iL=e=>!!(e&&e[nL]),aL=e=>e&&e[nL]?e[nL]():e,oL=e=>e[rL]||null;function sL(e,t){e.eventObserved?e.eventObserved(t):e(t)}function cL(e,t){let n=e[rL];n&&n.forEach(e=>{sL(e,t)})}var lL=class{constructor(e){if(this[nL]=void 0,this[rL]=void 0,!e&&!(e=this.get))throw Error(`Unknown getter`);uL(this,e)}},uL=(e,t)=>pL(e,nL,t);function dL(e,t){if(e[nL]){let n=e[rL];n||pL(e,rL,n=new Set),n.has(t)||(n.add(t),e.observerAdded&&e.observerAdded(n.size,t))}return t}function fL(e,t){let n=e[rL];if(n&&n.has(t)){let r=n.size-1;r?n.delete(t):e[rL]=null,e.observerRemoved&&e.observerRemoved(r,t)}}var pL=(e,t,n)=>Object.defineProperty(e,t,{value:n,writable:!0,configurable:!0}),mL=/[+\-]?(?:0|[1-9]\d*)(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,hL=/(#(?:[0-9a-f]{2}){2,4}|(#[0-9a-f]{3})|(rgb|hsl)a?\((-?\d+%?[,\s]+){2,3}\s*[\d\.]+%?\))/gi,gL=RegExp(`(${mL.source})(%|[a-z]+)`,`i`),_L=/rgba\(([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+)\)/gi,vL=/var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/,yL=e=>{let[t,n]=bL(e);if(!t||hI())return e;let r=window.getComputedStyle(document.documentElement).getPropertyValue(t);return r?r.trim():n&&n.startsWith(`--`)?window.getComputedStyle(document.documentElement).getPropertyValue(n)||e:n&&vL.test(n)?yL(n):n||e},bL=e=>{let t=vL.exec(e);if(!t)return[,];let[,n,r]=t;return[n,r]},xL,SL=(e,t,n,r,i)=>`rgba(${Math.round(t)}, ${Math.round(n)}, ${Math.round(r)}, ${i})`,CL=e=>{xL||=vI?RegExp(`(${Object.keys(vI).join(`|`)})(?!\\w)`,`g`):/^\b$/;let t=e.output.map(e=>aL(e).replace(vL,yL).replace(hL,ZI).replace(xL,ZI)),n=t.map(e=>e.match(mL).map(Number)),r=n[0].map((e,t)=>n.map(e=>{if(!(t in e))throw Error(`The arity of each "output" value must be equal`);return e[t]})).map(t=>QI(tL({},e,{output:t})));return e=>{let n=!gL.test(t[0])&&t.find(e=>gL.test(e))?.replace(mL,``),i=0;return t[0].replace(mL,()=>`${r[i++](e)}${n||``}`).replace(_L,SL)}},wL=`react-spring: `,TL=e=>{let t=e,n=!1;if(typeof t!=`function`)throw TypeError(`${wL}once requires a function parameter`);return(...e)=>{n||=(t(...e),!0)}},Tee=TL(console.warn);function Eee(){Tee(`${wL}The "interpolate" function is deprecated in v9 (use "to" instead)`)}var Dee=TL(console.warn);function Oee(){Dee(`${wL}Directly calling start instead of using the api object is deprecated in v9 (use ".start" instead), this will be removed in later 0.X.0 versions`)}function EL(e){return Q.str(e)&&(e[0]==`#`||/\d/.test(e)||!hI()&&vL.test(e)||e in(vI||{}))}var DL=typeof window<`u`&&window.document&&window.document.createElement?w.useLayoutEffect:w.useEffect,kee=()=>{let e=(0,w.useRef)(!1);return DL(()=>(e.current=!0,()=>{e.current=!1}),[]),e};function OL(){let e=(0,w.useState)()[1],t=kee();return()=>{t.current&&e(Math.random())}}function Aee(e,t){let[n]=(0,w.useState)(()=>({inputs:t,result:e()})),r=(0,w.useRef)(),i=r.current,a=i;return a?t&&a.inputs&&jee(t,a.inputs)||(a={inputs:t,result:e()}):a=n,(0,w.useEffect)(()=>{r.current=a,i==n&&(n.inputs=n.result=void 0)},[a]),a.result}function jee(e,t){if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}var kL=e=>(0,w.useEffect)(e,Mee),Mee=[];function AL(e){let t=(0,w.useRef)();return(0,w.useEffect)(()=>{t.current=e}),t.current}var jL=Symbol.for(`Animated:node`),ML=e=>!!e&&e[jL]===e,NL=e=>e&&e[jL],PL=(e,t)=>cI(e,jL,t),FL=e=>e&&e[jL]&&e[jL].getPayload(),IL=class{constructor(){this.payload=void 0,PL(this,this)}getPayload(){return this.payload||[]}},LL=class e extends IL{constructor(e){super(),this.done=!0,this.elapsedTime=void 0,this.lastPosition=void 0,this.lastVelocity=void 0,this.v0=void 0,this.durationProgress=0,this._value=e,Q.num(this._value)&&(this.lastPosition=this._value)}static create(t){return new e(t)}getPayload(){return[this]}getValue(){return this._value}setValue(e,t){return Q.num(e)&&(this.lastPosition=e,t&&(e=Math.round(e/t)*t,this.done&&(this.lastPosition=e))),this._value!==e&&(this._value=e,!0)}reset(){let{done:e}=this;this.done=!1,Q.num(this._value)&&(this.elapsedTime=0,this.durationProgress=0,this.lastPosition=this._value,e&&(this.lastVelocity=null),this.v0=null)}},RL=class e extends LL{constructor(e){super(0),this._string=null,this._toString=void 0,this._toString=QI({output:[e,e]})}static create(t){return new e(t)}getValue(){return this._string??=this._toString(this._value)}setValue(e){if(Q.str(e)){if(e==this._string)return!1;this._string=e,this._value=1}else if(super.setValue(e))this._string=null;else return!1;return!0}reset(e){e&&(this._toString=QI({output:[this.getValue(),e]})),this._value=0,super.reset()}},zL={dependencies:null},BL=class extends IL{constructor(e){super(),this.source=e,this.setValue(e)}getValue(e){let t={};return dI(this.source,(n,r)=>{ML(n)?t[r]=n.getValue(e):iL(n)?t[r]=aL(n):e||(t[r]=n)}),t}setValue(e){this.source=e,this.payload=this._makePayload(e)}reset(){this.payload&&uI(this.payload,e=>e.reset())}_makePayload(e){if(e){let t=new Set;return dI(e,this._addToPayload,t),Array.from(t)}}_addToPayload(e){zL.dependencies&&iL(e)&&zL.dependencies.add(e);let t=FL(e);t&&uI(t,e=>this.add(e))}},VL=class e extends BL{constructor(e){super(e)}static create(t){return new e(t)}getValue(){return this.source.map(e=>e.getValue())}setValue(e){let t=this.getPayload();return e.length==t.length?t.map((t,n)=>t.setValue(e[n])).some(Boolean):(super.setValue(e.map(HL)),!0)}};function HL(e){return(EL(e)?RL:LL).create(e)}function UL(e){let t=NL(e);return t?t.constructor:Q.arr(e)?VL:EL(e)?RL:LL}function WL(){return WL=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},WL.apply(this,arguments)}var GL=(e,t)=>{let n=!Q.fun(e)||e.prototype&&e.prototype.isReactComponent;return(0,w.forwardRef)((r,i)=>{let a=(0,w.useRef)(null),o=n&&(0,w.useCallback)(e=>{a.current=JL(i,e)},[i]),[s,c]=qL(r,t),l=OL(),u=()=>{let e=a.current;n&&!e||(e?t.applyAnimatedValues(e,s.getValue(!0)):!1)===!1&&l()},d=new KL(u,c),f=(0,w.useRef)();DL(()=>(f.current=d,uI(c,e=>dL(e,d)),()=>{f.current&&(uI(f.current.deps,e=>fL(e,f.current)),UF.cancel(f.current.update))})),(0,w.useEffect)(u,[]),kL(()=>()=>{let e=f.current;uI(e.deps,t=>fL(t,e))});let p=t.getComponentProps(s.getValue());return w.createElement(e,WL({},p,{ref:o}))})},KL=class{constructor(e,t){this.update=e,this.deps=t}eventObserved(e){e.type==`change`&&UF.write(this.update)}};function qL(e,t){let n=new Set;return zL.dependencies=n,e.style&&(e=WL({},e,{style:t.createAnimatedStyle(e.style)})),e=new BL(e),zL.dependencies=null,[e,n]}function JL(e,t){return e&&(Q.fun(e)?e(t):e.current=t),t}var YL=Symbol.for(`AnimatedComponent`),XL=(e,{applyAnimatedValues:t=()=>!1,createAnimatedStyle:n=e=>new BL(e),getComponentProps:r=e=>e}={})=>{let i={applyAnimatedValues:t,createAnimatedStyle:n,getComponentProps:r},a=e=>{let t=ZL(e)||`Anonymous`;return e=Q.str(e)?a[e]||(a[e]=GL(e,i)):e[YL]||(e[YL]=GL(e,i)),e.displayName=`Animated(${t})`,e};return dI(e,(t,n)=>{Q.arr(e)&&(n=ZL(t)),a[n]=a(t)}),{animated:a}},ZL=e=>Q.str(e)?e:e&&Q.str(e.displayName)?e.displayName:Q.fun(e)&&e.name||null;function QL(){return QL=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},QL.apply(this,arguments)}function $L(e,...t){return Q.fun(e)?e(...t):e}var eR=(e,t)=>e===!0||!!(t&&e&&(Q.fun(e)?e(t):fI(e).includes(t))),tR=(e,t)=>Q.obj(e)?t&&e[t]:e,nR=(e,t)=>e.default===!0?e[t]:e.default?e.default[t]:void 0,rR=e=>e,iR=(e,t=rR)=>{let n=aR;e.default&&e.default!==!0&&(e=e.default,n=Object.keys(e));let r={};for(let i of n){let n=t(e[i],i);Q.und(n)||(r[i]=n)}return r},aR=[`config`,`onProps`,`onStart`,`onChange`,`onPause`,`onResume`,`onRest`],oR={config:1,from:1,to:1,ref:1,loop:1,reset:1,pause:1,cancel:1,reverse:1,immediate:1,default:1,delay:1,onProps:1,onStart:1,onChange:1,onPause:1,onResume:1,onRest:1,onResolve:1,items:1,trail:1,sort:1,expires:1,initial:1,enter:1,update:1,leave:1,children:1,onDestroyed:1,keys:1,callId:1,parentId:1};function sR(e){let t={},n=0;if(dI(e,(e,r)=>{oR[r]||(t[r]=e,n++)}),n)return t}function cR(e){let t=sR(e);if(t){let n={to:t};return dI(e,(e,r)=>r in t||(n[r]=e)),n}return QL({},e)}function lR(e){return e=aL(e),Q.arr(e)?e.map(lR):EL(e)?xI.createStringInterpolator({range:[0,1],output:[e,e]})(1):e}function uR(e){for(let t in e)return!0;return!1}function dR(e){return Q.fun(e)||Q.arr(e)&&Q.obj(e[0])}function fR(e,t){var n;(n=e.ref)==null||n.delete(e),t?.delete(e)}function pR(e,t){if(t&&e.ref!==t){var n;(n=e.ref)==null||n.delete(e),t.add(e),e.ref=t}}var mR={default:{tension:170,friction:26},gentle:{tension:120,friction:14},wobbly:{tension:180,friction:12},stiff:{tension:210,friction:20},slow:{tension:280,friction:60},molasses:{tension:280,friction:120}},hR=1.70158,gR=hR*1.525,_R=2.70158,vR=2*Math.PI/3,yR=2*Math.PI/4.5,bR=e=>{let t=7.5625,n=2.75;return e<1/n?t*e*e:e<2/n?t*(e-=1.5/n)*e+.75:e<2.5/n?t*(e-=2.25/n)*e+.9375:t*(e-=2.625/n)*e+.984375},xR={linear:e=>e,easeInQuad:e=>e*e,easeOutQuad:e=>1-(1-e)*(1-e),easeInOutQuad:e=>e<.5?2*e*e:1-(-2*e+2)**2/2,easeInCubic:e=>e*e*e,easeOutCubic:e=>1-(1-e)**3,easeInOutCubic:e=>e<.5?4*e*e*e:1-(-2*e+2)**3/2,easeInQuart:e=>e*e*e*e,easeOutQuart:e=>1-(1-e)**4,easeInOutQuart:e=>e<.5?8*e*e*e*e:1-(-2*e+2)**4/2,easeInQuint:e=>e*e*e*e*e,easeOutQuint:e=>1-(1-e)**5,easeInOutQuint:e=>e<.5?16*e*e*e*e*e:1-(-2*e+2)**5/2,easeInSine:e=>1-Math.cos(e*Math.PI/2),easeOutSine:e=>Math.sin(e*Math.PI/2),easeInOutSine:e=>-(Math.cos(Math.PI*e)-1)/2,easeInExpo:e=>e===0?0:2**(10*e-10),easeOutExpo:e=>e===1?1:1-2**(-10*e),easeInOutExpo:e=>e===0?0:e===1?1:e<.5?2**(20*e-10)/2:(2-2**(-20*e+10))/2,easeInCirc:e=>1-Math.sqrt(1-e**2),easeOutCirc:e=>Math.sqrt(1-(e-1)**2),easeInOutCirc:e=>e<.5?(1-Math.sqrt(1-(2*e)**2))/2:(Math.sqrt(1-(-2*e+2)**2)+1)/2,easeInBack:e=>_R*e*e*e-hR*e*e,easeOutBack:e=>1+_R*(e-1)**3+hR*(e-1)**2,easeInOutBack:e=>e<.5?(2*e)**2*(7.189819*e-gR)/2:((2*e-2)**2*(3.5949095*(e*2-2)+gR)+2)/2,easeInElastic:e=>e===0?0:e===1?1:-(2**(10*e-10))*Math.sin((e*10-10.75)*vR),easeOutElastic:e=>e===0?0:e===1?1:2**(-10*e)*Math.sin((e*10-.75)*vR)+1,easeInOutElastic:e=>e===0?0:e===1?1:e<.5?-(2**(20*e-10)*Math.sin((20*e-11.125)*yR))/2:2**(-20*e+10)*Math.sin((20*e-11.125)*yR)/2+1,easeInBounce:e=>1-bR(1-e),easeOutBounce:bR,easeInOutBounce:e=>e<.5?(1-bR(1-2*e))/2:(1+bR(2*e-1))/2},SR=QL({},mR.default,{mass:1,damping:1,easing:xR.linear,clamp:!1}),CR=class{constructor(){this.tension=void 0,this.friction=void 0,this.frequency=void 0,this.damping=void 0,this.mass=void 0,this.velocity=0,this.restVelocity=void 0,this.precision=void 0,this.progress=void 0,this.duration=void 0,this.easing=void 0,this.clamp=void 0,this.bounce=void 0,this.decay=void 0,this.round=void 0,Object.assign(this,SR)}};function wR(e,t,n){n&&(n=QL({},n),TR(n,t),t=QL({},n,t)),TR(e,t),Object.assign(e,t);for(let t in SR)e[t]??(e[t]=SR[t]);let{mass:r,frequency:i,damping:a}=e;return Q.und(i)||(i<.01&&(i=.01),a<0&&(a=0),e.tension=(2*Math.PI/i)**2*r,e.friction=4*Math.PI*a*r/i),e}function TR(e,t){if(!Q.und(t.decay))e.duration=void 0;else{let n=!Q.und(t.tension)||!Q.und(t.friction);(n||!Q.und(t.frequency)||!Q.und(t.damping)||!Q.und(t.mass))&&(e.duration=void 0,e.decay=void 0),n&&(e.frequency=void 0)}}var ER=[],DR=class{constructor(){this.changed=!1,this.values=ER,this.toValues=null,this.fromValues=ER,this.to=void 0,this.from=void 0,this.config=new CR,this.immediate=!1}};function OR(e,{key:t,props:n,defaultProps:r,state:i,actions:a}){return new Promise((o,s)=>{let c,l,u=eR(n.cancel??r?.cancel,t);if(u)p();else{Q.und(n.pause)||(i.paused=eR(n.pause,t));let e=r?.pause;e!==!0&&(e=i.paused||eR(e,t)),c=$L(n.delay||0,t),e?(i.resumeQueue.add(f),a.pause()):(a.resume(),f())}function d(){i.resumeQueue.add(f),i.timeouts.delete(l),l.cancel(),c=l.time-UF.now()}function f(){c>0&&!xI.skipAnimation?(i.delayed=!0,l=UF.setTimeout(p,c),i.pauseQueue.add(d),i.timeouts.add(l)):p()}function p(){i.delayed&&=!1,i.pauseQueue.delete(d),i.timeouts.delete(l),e<=(i.cancelId||0)&&(u=!0);try{a.start(QL({},n,{callId:e,cancel:u}),o)}catch(e){s(e)}}})}var kR=(e,t)=>t.length==1?t[0]:t.some(e=>e.cancelled)?MR(e.get()):t.every(e=>e.noop)?AR(e.get()):jR(e.get(),t.every(e=>e.finished)),AR=e=>({value:e,noop:!0,finished:!0,cancelled:!1}),jR=(e,t,n=!1)=>({value:e,finished:t,cancelled:n}),MR=e=>({value:e,cancelled:!0,finished:!1});function NR(e,t,n,r){let{callId:i,parentId:a,onRest:o}=t,{asyncTo:s,promise:c}=n;return!a&&e===s&&!t.reset?c:n.promise=(async()=>{n.asyncId=i,n.asyncTo=e;let l=iR(t,(e,t)=>t===`onRest`?void 0:e),u,d,f=new Promise((e,t)=>(u=e,d=t)),p=e=>{let t=i<=(n.cancelId||0)&&MR(r)||i!==n.asyncId&&jR(r,!1);if(t)throw e.result=t,d(e),e},m=(e,t)=>{let a=new FR,o=new IR;return(async()=>{if(xI.skipAnimation)throw PR(n),o.result=jR(r,!1),d(o),o;p(a);let s=Q.obj(e)?QL({},e):QL({},t,{to:e});s.parentId=i,dI(l,(e,t)=>{Q.und(s[t])&&(s[t]=e)});let c=await r.start(s);return p(a),n.paused&&await new Promise(e=>{n.resumeQueue.add(e)}),c})()},h;if(xI.skipAnimation)return PR(n),jR(r,!1);try{let t;t=Q.arr(e)?(async e=>{for(let t of e)await m(t)})(e):Promise.resolve(e(m,r.stop.bind(r))),await Promise.all([t.then(u),f]),h=jR(r.get(),!0,!1)}catch(e){if(e instanceof FR)h=e.result;else if(e instanceof IR)h=e.result;else throw e}finally{i==n.asyncId&&(n.asyncId=a,n.asyncTo=a?s:void 0,n.promise=a?c:void 0)}return Q.fun(o)&&UF.batchedUpdates(()=>{o(h,r,r.item)}),h})()}function PR(e,t){pI(e.timeouts,e=>e.cancel()),e.pauseQueue.clear(),e.resumeQueue.clear(),e.asyncId=e.asyncTo=e.promise=void 0,t&&(e.cancelId=t)}var FR=class extends Error{constructor(){super("An async animation has been interrupted. You see this error because you forgot to use `await` or `.catch(...)` on its returned promise."),this.result=void 0}},IR=class extends Error{constructor(){super(`SkipAnimationSignal`),this.result=void 0}},LR=e=>e instanceof zR,RR=1,zR=class extends lL{constructor(...e){super(...e),this.id=RR++,this.key=void 0,this._priority=0}get priority(){return this._priority}set priority(e){this._priority!=e&&(this._priority=e,this._onPriorityChange(e))}get(){let e=NL(this);return e&&e.getValue()}to(...e){return xI.to(this,e)}interpolate(...e){return Eee(),xI.to(this,e)}toJSON(){return this.get()}observerAdded(e){e==1&&this._attach()}observerRemoved(e){e==0&&this._detach()}_attach(){}_detach(){}_onChange(e,t=!1){cL(this,{type:`change`,parent:this,value:e,idle:t})}_onPriorityChange(e){this.idle||EI.sort(this),cL(this,{type:`priority`,parent:this,priority:e})}},BR=Symbol.for(`SpringPhase`),VR=1,HR=2,UR=4,WR=e=>(e[BR]&VR)>0,GR=e=>(e[BR]&HR)>0,KR=e=>(e[BR]&UR)>0,qR=(e,t)=>t?e[BR]|=3:e[BR]&=-3,JR=(e,t)=>t?e[BR]|=UR:e[BR]&=-5,YR=class extends zR{constructor(e,t){if(super(),this.key=void 0,this.animation=new DR,this.queue=void 0,this.defaultProps={},this._state={paused:!1,delayed:!1,pauseQueue:new Set,resumeQueue:new Set,timeouts:new Set},this._pendingCalls=new Set,this._lastCallId=0,this._lastToId=0,this._memoizedDuration=0,!Q.und(e)||!Q.und(t)){let n=Q.obj(e)?QL({},e):QL({},t,{from:e});Q.und(n.default)&&(n.default=!0),this.start(n)}}get idle(){return!(GR(this)||this._state.asyncTo)||KR(this)}get goal(){return aL(this.animation.to)}get velocity(){let e=NL(this);return e instanceof LL?e.lastVelocity||0:e.getPayload().map(e=>e.lastVelocity||0)}get hasAnimated(){return WR(this)}get isAnimating(){return GR(this)}get isPaused(){return KR(this)}get isDelayed(){return this._state.delayed}advance(e){let t=!0,n=!1,r=this.animation,{config:i,toValues:a}=r,o=FL(r.to);!o&&iL(r.to)&&(a=fI(aL(r.to))),r.values.forEach((s,c)=>{if(s.done)return;let l=s.constructor==RL?1:o?o[c].lastPosition:a[c],u=r.immediate,d=l;if(!u){if(d=s.lastPosition,i.tension<=0){s.done=!0;return}let t=s.elapsedTime+=e,n=r.fromValues[c],a=s.v0==null?s.v0=Q.arr(i.velocity)?i.velocity[c]:i.velocity:s.v0,o;if(!Q.und(i.duration)){let r=1;i.duration>0&&(this._memoizedDuration!==i.duration&&(this._memoizedDuration=i.duration,s.durationProgress>0&&(s.elapsedTime=i.duration*s.durationProgress,t=s.elapsedTime+=e)),r=(i.progress||0)+t/this._memoizedDuration,r=r>1?1:r<0?0:r,s.durationProgress=r),d=n+i.easing(r)*(l-n),o=(d-s.lastPosition)/e,u=r==1}else if(i.decay){let e=i.decay===!0?.998:i.decay,r=Math.exp(-(1-e)*t);d=n+a/(1-e)*(1-r),u=Math.abs(s.lastPosition-d)<.1,o=a*r}else{o=s.lastVelocity==null?a:s.lastVelocity;let t=i.precision||(n==l?.005:Math.min(1,Math.abs(l-n)*.001)),r=i.restVelocity||t/10,c=i.clamp?0:i.bounce,f=!Q.und(c),p=n==l?s.v0>0:n<l,m,h=!1,g=Math.ceil(e/1);for(let e=0;e<g&&(m=Math.abs(o)>r,!(!m&&(u=Math.abs(l-d)<=t,u)));++e){f&&(h=d==l||d>l==p,h&&(o=-o*c,d=l));let e=(-i.tension*1e-6*(d-l)+-i.friction*.001*o)/i.mass;o+=e*1,d+=o*1}}s.lastVelocity=o,Number.isNaN(d)&&(console.warn(`Got NaN while animating:`,this),u=!0)}o&&!o[c].done&&(u=!1),u?s.done=!0:t=!1,s.setValue(d,i.round)&&(n=!0)});let s=NL(this),c=s.getValue();if(t){let e=aL(r.to);(c!==e||n)&&!i.decay?(s.setValue(e),this._onChange(e)):n&&i.decay&&this._onChange(c),this._stop()}else n&&this._onChange(c)}set(e){return UF.batchedUpdates(()=>{this._stop(),this._focus(e),this._set(e)}),this}pause(){this._update({pause:!0})}resume(){this._update({pause:!1})}finish(){if(GR(this)){let{to:e,config:t}=this.animation;UF.batchedUpdates(()=>{this._onStart(),t.decay||this._set(e,!1),this._stop()})}return this}update(e){return(this.queue||=[]).push(e),this}start(e,t){let n;return Q.und(e)?(n=this.queue||[],this.queue=[]):n=[Q.obj(e)?e:QL({},t,{to:e})],Promise.all(n.map(e=>this._update(e))).then(e=>kR(this,e))}stop(e){let{to:t}=this.animation;return this._focus(this.get()),PR(this._state,e&&this._lastCallId),UF.batchedUpdates(()=>this._stop(t,e)),this}reset(){this._update({reset:!0})}eventObserved(e){e.type==`change`?this._start():e.type==`priority`&&(this.priority=e.priority+1)}_prepareNode(e){let t=this.key||``,{to:n,from:r}=e;n=Q.obj(n)?n[t]:n,(n==null||dR(n))&&(n=void 0),r=Q.obj(r)?r[t]:r,r??=void 0;let i={to:n,from:r};return WR(this)||(e.reverse&&([n,r]=[r,n]),r=aL(r),Q.und(r)?NL(this)||this._set(n):this._set(r)),i}_update(e,t){let n=QL({},e),{key:r,defaultProps:i}=this;n.default&&Object.assign(i,iR(n,(e,t)=>/^on/.test(t)?tR(e,r):e)),nz(this,n,`onProps`),rz(this,`onProps`,n,this);let a=this._prepareNode(n);if(Object.isFrozen(this))throw Error("Cannot animate a `SpringValue` object that is frozen. Did you forget to pass your component to `animated(...)` before animating its props?");let o=this._state;return OR(++this._lastCallId,{key:r,props:n,defaultProps:i,state:o,actions:{pause:()=>{KR(this)||(JR(this,!0),mI(o.pauseQueue),rz(this,`onPause`,jR(this,XR(this,this.animation.to)),this))},resume:()=>{KR(this)&&(JR(this,!1),GR(this)&&this._resume(),mI(o.resumeQueue),rz(this,`onResume`,jR(this,XR(this,this.animation.to)),this))},start:this._merge.bind(this,a)}}).then(e=>{if(n.loop&&e.finished&&!(t&&e.noop)){let e=ZR(n);if(e)return this._update(e,!0)}return e})}_merge(e,t,n){if(t.cancel)return this.stop(!0),n(MR(this));let r=!Q.und(e.to),i=!Q.und(e.from);if(r||i)if(t.callId>this._lastToId)this._lastToId=t.callId;else return n(MR(this));let{key:a,defaultProps:o,animation:s}=this,{to:c,from:l}=s,{to:u=c,from:d=l}=e;i&&!r&&(!t.default||Q.und(u))&&(u=d),t.reverse&&([u,d]=[d,u]);let f=!lI(d,l);f&&(s.from=d),d=aL(d);let p=!lI(u,c);p&&this._focus(u);let m=dR(t.to),{config:h}=s,{decay:g,velocity:_}=h;(r||i)&&(h.velocity=0),t.config&&!m&&wR(h,$L(t.config,a),t.config===o.config?void 0:$L(o.config,a));let v=NL(this);if(!v||Q.und(u))return n(jR(this,!0));let y=Q.und(t.reset)?i&&!t.default:!Q.und(d)&&eR(t.reset,a),b=y?d:this.get(),x=lR(u),S=Q.num(x)||Q.arr(x)||EL(x),C=!m&&(!S||eR(o.immediate||t.immediate,a));if(p){let e=UL(u);if(e!==v.constructor)if(C)v=this._set(x);else throw Error(`Cannot animate between ${v.constructor.name} and ${e.name}, as the "to" prop suggests`)}let w=v.constructor,T=iL(u),E=!1;if(!T){let e=y||!WR(this)&&f;(p||e)&&(E=lI(lR(b),x),T=!E),(!lI(s.immediate,C)&&!C||!lI(h.decay,g)||!lI(h.velocity,_))&&(T=!0)}if(E&&GR(this)&&(s.changed&&!y?T=!0:T||this._stop(c)),!m&&((T||iL(c))&&(s.values=v.getPayload(),s.toValues=iL(u)?null:w==RL?[1]:fI(x)),s.immediate!=C&&(s.immediate=C,!C&&!y&&this._set(c)),T)){let{onRest:e}=s;uI(tz,e=>nz(this,t,e));let r=jR(this,XR(this,c));mI(this._pendingCalls,r),this._pendingCalls.add(n),s.changed&&UF.batchedUpdates(()=>{s.changed=!y,e?.(r,this),y?$L(o.onRest,r):s.onStart==null||s.onStart(r,this)})}y&&this._set(b),m?n(NR(t.to,t,this._state,this)):T?this._start():GR(this)&&!p?this._pendingCalls.add(n):n(AR(b))}_focus(e){let t=this.animation;e!==t.to&&(oL(this)&&this._detach(),t.to=e,oL(this)&&this._attach())}_attach(){let e=0,{to:t}=this.animation;iL(t)&&(dL(t,this),LR(t)&&(e=t.priority+1)),this.priority=e}_detach(){let{to:e}=this.animation;iL(e)&&fL(e,this)}_set(e,t=!0){let n=aL(e);if(!Q.und(n)){let e=NL(this);if(!e||!lI(n,e.getValue())){let r=UL(n);!e||e.constructor!=r?PL(this,r.create(n)):e.setValue(n),e&&UF.batchedUpdates(()=>{this._onChange(n,t)})}}return NL(this)}_onStart(){let e=this.animation;e.changed||(e.changed=!0,rz(this,`onStart`,jR(this,XR(this,e.to)),this))}_onChange(e,t){t||(this._onStart(),$L(this.animation.onChange,e,this)),$L(this.defaultProps.onChange,e,this),super._onChange(e,t)}_start(){let e=this.animation;NL(this).reset(aL(e.to)),e.immediate||(e.fromValues=e.values.map(e=>e.lastPosition)),GR(this)||(qR(this,!0),KR(this)||this._resume())}_resume(){xI.skipAnimation?this.finish():EI.start(this)}_stop(e,t){if(GR(this)){qR(this,!1);let n=this.animation;uI(n.values,e=>{e.done=!0}),n.toValues&&(n.onChange=n.onPause=n.onResume=void 0),cL(this,{type:`idle`,parent:this});let r=t?MR(this.get()):jR(this.get(),XR(this,e??n.to));mI(this._pendingCalls,r),n.changed&&(n.changed=!1,rz(this,`onRest`,r,this))}}};function XR(e,t){let n=lR(t);return lI(lR(e.get()),n)}function ZR(e,t=e.loop,n=e.to){let r=$L(t);if(r){let i=r!==!0&&cR(r),a=(i||e).reverse,o=!i||i.reset;return QR(QL({},e,{loop:t,default:!1,pause:void 0,to:!a||dR(n)?n:void 0,from:o?e.from:void 0,reset:o},i))}}function QR(e){let{to:t,from:n}=e=cR(e),r=new Set;return Q.obj(t)&&ez(t,r),Q.obj(n)&&ez(n,r),e.keys=r.size?Array.from(r):null,e}function $R(e){let t=QR(e);return Q.und(t.default)&&(t.default=iR(t)),t}function ez(e,t){dI(e,(e,n)=>e!=null&&t.add(n))}var tz=[`onStart`,`onRest`,`onChange`,`onPause`,`onResume`];function nz(e,t,n){e.animation[n]=t[n]===nR(t,n)?void 0:tR(t[n],e.key)}function rz(e,t,...n){var r,i,a,o;(r=(i=e.animation)[t])==null||r.call(i,...n),(a=(o=e.defaultProps)[t])==null||a.call(o,...n)}var iz=[`onStart`,`onChange`,`onRest`],az=1,oz=class{constructor(e,t){this.id=az++,this.springs={},this.queue=[],this.ref=void 0,this._flush=void 0,this._initialProps=void 0,this._lastAsyncId=0,this._active=new Set,this._changed=new Set,this._started=!1,this._item=void 0,this._state={paused:!1,pauseQueue:new Set,resumeQueue:new Set,timeouts:new Set},this._events={onStart:new Map,onChange:new Map,onRest:new Map},this._onFrame=this._onFrame.bind(this),t&&(this._flush=t),e&&this.start(QL({default:!0},e))}get idle(){return!this._state.asyncTo&&Object.values(this.springs).every(e=>e.idle&&!e.isDelayed&&!e.isPaused)}get item(){return this._item}set item(e){this._item=e}get(){let e={};return this.each((t,n)=>e[n]=t.get()),e}set(e){for(let t in e){let n=e[t];Q.und(n)||this.springs[t].set(n)}}update(e){return e&&this.queue.push(QR(e)),this}start(e){let{queue:t}=this;return e?t=fI(e).map(QR):this.queue=[],this._flush?this._flush(this,t):(pz(this,t),sz(this,t))}stop(e,t){if(e!==!!e&&(t=e),t){let n=this.springs;uI(fI(t),t=>n[t].stop(!!e))}else PR(this._state,this._lastAsyncId),this.each(t=>t.stop(!!e));return this}pause(e){if(Q.und(e))this.start({pause:!0});else{let t=this.springs;uI(fI(e),e=>t[e].pause())}return this}resume(e){if(Q.und(e))this.start({pause:!1});else{let t=this.springs;uI(fI(e),e=>t[e].resume())}return this}each(e){dI(this.springs,e)}_onFrame(){let{onStart:e,onChange:t,onRest:n}=this._events,r=this._active.size>0,i=this._changed.size>0;(r&&!this._started||i&&!this._started)&&(this._started=!0,pI(e,([e,t])=>{t.value=this.get(),e(t,this,this._item)}));let a=!r&&this._started,o=i||a&&n.size?this.get():null;i&&t.size&&pI(t,([e,t])=>{t.value=o,e(t,this,this._item)}),a&&(this._started=!1,pI(n,([e,t])=>{t.value=o,e(t,this,this._item)}))}eventObserved(e){if(e.type==`change`)this._changed.add(e.parent),e.idle||this._active.add(e.parent);else if(e.type==`idle`)this._active.delete(e.parent);else return;UF.onFrame(this._onFrame)}};function sz(e,t){return Promise.all(t.map(t=>cz(e,t))).then(t=>kR(e,t))}async function cz(e,t,n){let{keys:r,to:i,from:a,loop:o,onRest:s,onResolve:c}=t,l=Q.obj(t.default)&&t.default;o&&(t.loop=!1),i===!1&&(t.to=null),a===!1&&(t.from=null);let u=Q.arr(i)||Q.fun(i)?i:void 0;u?(t.to=void 0,t.onRest=void 0,l&&(l.onRest=void 0)):uI(iz,n=>{let r=t[n];if(Q.fun(r)){let i=e._events[n];t[n]=({finished:e,cancelled:t})=>{let n=i.get(r);n?(e||(n.finished=!1),t&&(n.cancelled=!0)):i.set(r,{value:null,finished:e||!1,cancelled:t||!1})},l&&(l[n]=t[n])}});let d=e._state;t.pause===!d.paused?(d.paused=t.pause,mI(t.pause?d.pauseQueue:d.resumeQueue)):d.paused&&(t.pause=!0);let f=(r||Object.keys(e.springs)).map(n=>e.springs[n].start(t)),p=t.cancel===!0||nR(t,`cancel`)===!0;(u||p&&d.asyncId)&&f.push(OR(++e._lastAsyncId,{props:t,state:d,actions:{pause:sI,resume:sI,start(t,n){p?(PR(d,e._lastAsyncId),n(MR(e))):(t.onRest=s,n(NR(u,t,d,e)))}}})),d.paused&&await new Promise(e=>{d.resumeQueue.add(e)});let m=kR(e,await Promise.all(f));if(o&&m.finished&&!(n&&m.noop)){let n=ZR(t,o,i);if(n)return pz(e,[n]),cz(e,n,!0)}return c&&UF.batchedUpdates(()=>c(m,e,e.item)),m}function lz(e,t){let n=QL({},e.springs);return t&&uI(fI(t),e=>{Q.und(e.keys)&&(e=QR(e)),Q.obj(e.to)||(e=QL({},e,{to:void 0})),fz(n,e,e=>dz(e))}),uz(e,n),n}function uz(e,t){dI(t,(t,n)=>{e.springs[n]||(e.springs[n]=t,dL(t,e))})}function dz(e,t){let n=new YR;return n.key=e,t&&dL(n,t),n}function fz(e,t,n){t.keys&&uI(t.keys,r=>{(e[r]||(e[r]=n(r)))._prepareNode(t)})}function pz(e,t){uI(t,t=>{fz(e.springs,t,t=>dz(t,e))})}function mz(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,a;for(a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}var hz=[`children`],gz=e=>{let{children:t}=e,n=mz(e,hz),r=(0,w.useContext)(_z),i=n.pause||!!r.pause,a=n.immediate||!!r.immediate;n=Aee(()=>({pause:i,immediate:a}),[i,a]);let{Provider:o}=_z;return w.createElement(o,{value:n},t)},_z=vz(gz,{});gz.Provider=_z.Provider,gz.Consumer=_z.Consumer;function vz(e,t){return Object.assign(e,w.createContext(t)),e.Provider._context=e,e.Consumer._context=e,e}var yz=()=>{let e=[],t=function(t){Oee();let r=[];return uI(e,(e,i)=>{if(Q.und(t))r.push(e.start());else{let a=n(t,e,i);a&&r.push(e.start(a))}}),r};t.current=e,t.add=function(t){e.includes(t)||e.push(t)},t.delete=function(t){let n=e.indexOf(t);~n&&e.splice(n,1)},t.pause=function(){return uI(e,e=>e.pause(...arguments)),this},t.resume=function(){return uI(e,e=>e.resume(...arguments)),this},t.set=function(t){uI(e,e=>e.set(t))},t.start=function(t){let n=[];return uI(e,(e,r)=>{if(Q.und(t))n.push(e.start());else{let i=this._getProps(t,e,r);i&&n.push(e.start(i))}}),n},t.stop=function(){return uI(e,e=>e.stop(...arguments)),this},t.update=function(t){return uI(e,(e,n)=>e.update(this._getProps(t,e,n))),this};let n=function(e,t,n){return Q.fun(e)?e(n,t):e};return t._getProps=n,t};function bz(e,t,n){let r=Q.fun(t)&&t;r&&!n&&(n=[]);let i=(0,w.useMemo)(()=>r||arguments.length==3?yz():void 0,[]),a=(0,w.useRef)(0),o=OL(),s=(0,w.useMemo)(()=>({ctrls:[],queue:[],flush(e,t){let n=lz(e,t);return a.current>0&&!s.queue.length&&!Object.keys(n).some(t=>!e.springs[t])?sz(e,t):new Promise(r=>{uz(e,n),s.queue.push(()=>{r(sz(e,t))}),o()})}}),[]),c=(0,w.useRef)([...s.ctrls]),l=[],u=AL(e)||0;(0,w.useMemo)(()=>{uI(c.current.slice(e,u),e=>{fR(e,i),e.stop(!0)}),c.current.length=e,d(u,e)},[e]),(0,w.useMemo)(()=>{d(0,Math.min(u,e))},n);function d(e,n){for(let i=e;i<n;i++){let e=c.current[i]||(c.current[i]=new oz(null,s.flush)),n=r?r(i,e):t[i];n&&(l[i]=$R(n))}}let f=c.current.map((e,t)=>lz(e,l[t])),p=(0,w.useContext)(gz),m=p!==AL(p)&&uR(p);DL(()=>{a.current++,s.ctrls=c.current;let{queue:e}=s;e.length&&(s.queue=[],uI(e,e=>e())),uI(c.current,(e,t)=>{i?.add(e),m&&e.start({default:p});let n=l[t];n&&(pR(e,n.ref),e.ref?e.queue.push(n):e.start(n))})}),kL(()=>()=>{uI(s.ctrls,e=>e.stop(!0))});let h=f.map(e=>QL({},e));return i?[h,i]:h}function xz(e,t){let n=Q.fun(e),[[r],i]=bz(1,n?e:[e],n?t||[]:t);return n||arguments.length==2?[r,i]:r}var Sz;(function(e){e.MOUNT=`mount`,e.ENTER=`enter`,e.UPDATE=`update`,e.LEAVE=`leave`})(Sz||={});function Cz(e,t,n){let r=Q.fun(t)&&t,{reset:i,sort:a,trail:o=0,expires:s=!0,exitBeforeEnter:c=!1,onDestroyed:l,ref:u,config:d}=r?r():t,f=(0,w.useMemo)(()=>r||arguments.length==3?yz():void 0,[]),p=fI(e),m=[],h=(0,w.useRef)(null),g=i?null:h.current;DL(()=>{h.current=m}),kL(()=>(uI(h.current,e=>{var t;(t=e.ctrl.ref)==null||t.add(e.ctrl);let n=C.get(e);n&&e.ctrl.start(n.payload)}),()=>{uI(h.current,e=>{e.expired&&clearTimeout(e.expirationId),fR(e.ctrl,f),e.ctrl.stop(!0)})}));let _=Tz(p,r?r():t,g),v=i&&h.current||[];DL(()=>uI(v,({ctrl:e,item:t,key:n})=>{fR(e,f),$L(l,t,n)}));let y=[];if(g&&uI(g,(e,t)=>{e.expired?(clearTimeout(e.expirationId),v.push(e)):(t=y[t]=_.indexOf(e.key),~t&&(m[t]=e))}),uI(p,(e,t)=>{m[t]||(m[t]={key:_[t],item:e,phase:Sz.MOUNT,ctrl:new oz},m[t].ctrl.item=e)}),y.length){let e=-1,{leave:n}=r?r():t;uI(y,(t,r)=>{let i=g[r];~t?(e=m.indexOf(i),m[e]=QL({},i,{item:p[t]})):n&&m.splice(++e,0,i)})}Q.fun(a)&&m.sort((e,t)=>a(e.item,t.item));let b=-o,x=OL(),S=iR(t),C=new Map,T=(0,w.useRef)(new Map),E=(0,w.useRef)(!1);uI(m,(e,n)=>{let i=e.key,a=e.phase,l=r?r():t,f,p,m=$L(l.delay||0,i);if(a==Sz.MOUNT)f=l.enter,p=Sz.ENTER;else{let e=_.indexOf(i)<0;if(a!=Sz.LEAVE)if(e)f=l.leave,p=Sz.LEAVE;else if(f=l.update)p=Sz.UPDATE;else return;else if(!e)f=l.enter,p=Sz.ENTER;else return}if(f=$L(f,e.item,n),f=Q.obj(f)?cR(f):{to:f},!f.config){let t=d||S.config;f.config=$L(t,e.item,n,p)}b+=o;let v=QL({},S,{delay:m+b,ref:u,immediate:l.immediate,reset:!1},f);if(p==Sz.ENTER&&Q.und(v.from)){let i=r?r():t;v.from=$L(Q.und(i.initial)||g?i.from:i.initial,e.item,n)}let{onResolve:y}=v;v.onResolve=e=>{$L(y,e);let t=h.current,n=t.find(e=>e.key===i);if(n&&!(e.cancelled&&n.phase!=Sz.UPDATE)&&n.ctrl.idle){let e=t.every(e=>e.ctrl.idle);if(n.phase==Sz.LEAVE){let t=$L(s,n.item);if(t!==!1){let r=t===!0?0:t;if(n.expired=!0,!e&&r>0){r<=2147483647&&(n.expirationId=setTimeout(x,r));return}}}e&&t.some(e=>e.expired)&&(T.current.delete(n),c&&(E.current=!0),x())}};let w=lz(e.ctrl,v);p===Sz.LEAVE&&c?T.current.set(e,{phase:p,springs:w,payload:v}):C.set(e,{phase:p,springs:w,payload:v})});let D=(0,w.useContext)(gz),O=D!==AL(D)&&uR(D);DL(()=>{O&&uI(m,e=>{e.ctrl.start({default:D})})},[D]),uI(C,(e,t)=>{if(T.current.size){let e=m.findIndex(e=>e.key===t.key);m.splice(e,1)}}),DL(()=>{uI(T.current.size?T.current:C,({phase:e,payload:t},n)=>{let{ctrl:r}=n;n.phase=e,f?.add(r),O&&e==Sz.ENTER&&r.start({default:D}),t&&(pR(r,t.ref),r.ref&&!E.current?r.update(t):(r.start(t),E.current&&=!1))})},i?void 0:n);let k=e=>w.createElement(w.Fragment,null,m.map((t,n)=>{let{springs:r}=C.get(t)||t.ctrl,i=e(QL({},r),t.item,t,n);return i&&i.type?w.createElement(i.type,QL({},i.props,{key:Q.str(t.key)||Q.num(t.key)?t.key:t.ctrl.id,ref:i.ref})):i}));return f?[k,f]:k}var wz=1;function Tz(e,{key:t,keys:n=t},r){if(n===null){let t=new Set;return e.map(e=>{let n=r&&r.find(n=>n.item===e&&n.phase!==Sz.LEAVE&&!t.has(n));return n?(t.add(n),n.key):wz++})}return Q.und(n)?e:Q.fun(n)?e.map(n):fI(n)}var Ez=class extends zR{constructor(e,t){super(),this.key=void 0,this.idle=!0,this.calc=void 0,this._active=new Set,this.source=e,this.calc=QI(...t);let n=this._get(),r=UL(n);PL(this,r.create(n))}advance(e){let t=this._get();lI(t,this.get())||(NL(this).setValue(t),this._onChange(t,this.idle)),!this.idle&&Oz(this._active)&&kz(this)}_get(){let e=Q.arr(this.source)?this.source.map(aL):fI(aL(this.source));return this.calc(...e)}_start(){this.idle&&!Oz(this._active)&&(this.idle=!1,uI(FL(this),e=>{e.done=!1}),xI.skipAnimation?(UF.batchedUpdates(()=>this.advance()),kz(this)):EI.start(this))}_attach(){let e=1;uI(fI(this.source),t=>{iL(t)&&dL(t,this),LR(t)&&(t.idle||this._active.add(t),e=Math.max(e,t.priority+1))}),this.priority=e,this._start()}_detach(){uI(fI(this.source),e=>{iL(e)&&fL(e,this)}),this._active.clear(),kz(this)}eventObserved(e){e.type==`change`?e.idle?this.advance():(this._active.add(e.parent),this._start()):e.type==`idle`?this._active.delete(e.parent):e.type==`priority`&&(this.priority=fI(this.source).reduce((e,t)=>Math.max(e,(LR(t)?t.priority:0)+1),0))}};function Dz(e){return e.idle!==!1}function Oz(e){return!e.size||Array.from(e).every(Dz)}function kz(e){e.idle||(e.idle=!0,uI(FL(e),e=>{e.done=!0}),cL(e,{type:`idle`,parent:e}))}var Az=(e,...t)=>new Ez(e,t);xI.assign({createStringInterpolator:CL,to:(e,t)=>new Ez(e,t)}),EI.advance;function jz(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,a;for(a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}var Mz=[`style`,`children`,`scrollTop`,`scrollLeft`],Nz=/^--/;function Pz(e,t){return t==null||typeof t==`boolean`||t===``?``:typeof t==`number`&&t!==0&&!Nz.test(e)&&!(Lz.hasOwnProperty(e)&&Lz[e])?t+`px`:(``+t).trim()}var Fz={};function Iz(e,t){if(!e.nodeType||!e.setAttribute)return!1;let n=e.nodeName===`filter`||e.parentNode&&e.parentNode.nodeName===`filter`,r=t,{style:i,children:a,scrollTop:o,scrollLeft:s}=r,c=jz(r,Mz),l=Object.values(c),u=Object.keys(c).map(t=>n||e.hasAttribute(t)?t:Fz[t]||(Fz[t]=t.replace(/([A-Z])/g,e=>`-`+e.toLowerCase())));a!==void 0&&(e.textContent=a);for(let t in i)if(i.hasOwnProperty(t)){let n=Pz(t,i[t]);Nz.test(t)?e.style.setProperty(t,n):e.style[t]=n}u.forEach((t,n)=>{e.setAttribute(t,l[n])}),o!==void 0&&(e.scrollTop=o),s!==void 0&&(e.scrollLeft=s)}var Lz={animationIterationCount:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},Rz=(e,t)=>e+t.charAt(0).toUpperCase()+t.substring(1),zz=[`Webkit`,`Ms`,`Moz`,`O`];Lz=Object.keys(Lz).reduce((e,t)=>(zz.forEach(n=>e[Rz(n,t)]=e[t]),e),Lz);var Bz=[`x`,`y`,`z`],Vz=/^(matrix|translate|scale|rotate|skew)/,Hz=/^(translate)/,Uz=/^(rotate|skew)/,Wz=(e,t)=>Q.num(e)&&e!==0?e+t:e,Gz=(e,t)=>Q.arr(e)?e.every(e=>Gz(e,t)):Q.num(e)?e===t:parseFloat(e)===t,Kz=class extends BL{constructor(e){let{x:t,y:n,z:r}=e,i=jz(e,Bz),a=[],o=[];(t||n||r)&&(a.push([t||0,n||0,r||0]),o.push(e=>[`translate3d(${e.map(e=>Wz(e,`px`)).join(`,`)})`,Gz(e,0)])),dI(i,(e,t)=>{if(t===`transform`)a.push([e||``]),o.push(e=>[e,e===``]);else if(Vz.test(t)){if(delete i[t],Q.und(e))return;let n=Hz.test(t)?`px`:Uz.test(t)?`deg`:``;a.push(fI(e)),o.push(t===`rotate3d`?([e,t,r,i])=>[`rotate3d(${e},${t},${r},${Wz(i,n)})`,Gz(i,0)]:e=>[`${t}(${e.map(e=>Wz(e,n)).join(`,`)})`,Gz(e,+!!t.startsWith(`scale`))])}}),a.length&&(i.transform=new qz(a,o)),super(i)}},qz=class extends lL{constructor(e,t){super(),this._value=null,this.inputs=e,this.transforms=t}get(){return this._value||=this._get()}_get(){let e=``,t=!0;return uI(this.inputs,(n,r)=>{let i=aL(n[0]),[a,o]=this.transforms[r](Q.arr(i)?i:n.map(aL));e+=` `+a,t&&=o}),t?`none`:e}observerAdded(e){e==1&&uI(this.inputs,e=>uI(e,e=>iL(e)&&dL(e,this)))}observerRemoved(e){e==0&&uI(this.inputs,e=>uI(e,e=>iL(e)&&fL(e,this)))}eventObserved(e){e.type==`change`&&(this._value=null),cL(this,e)}},Jz=`a.abbr.address.area.article.aside.audio.b.base.bdi.bdo.big.blockquote.body.br.button.canvas.caption.cite.code.col.colgroup.data.datalist.dd.del.details.dfn.dialog.div.dl.dt.em.embed.fieldset.figcaption.figure.footer.form.h1.h2.h3.h4.h5.h6.head.header.hgroup.hr.html.i.iframe.img.input.ins.kbd.keygen.label.legend.li.link.main.map.mark.menu.menuitem.meta.meter.nav.noscript.object.ol.optgroup.option.output.p.param.picture.pre.progress.q.rp.rt.ruby.s.samp.script.section.select.small.source.span.strong.style.sub.summary.sup.table.tbody.td.textarea.tfoot.th.thead.time.title.tr.track.u.ul.var.video.wbr.circle.clipPath.defs.ellipse.foreignObject.g.image.line.linearGradient.mask.path.pattern.polygon.polyline.radialGradient.rect.stop.svg.text.tspan`.split(`.`),Yz=[`scrollTop`,`scrollLeft`];xI.assign({batchedUpdates:Ye.unstable_batchedUpdates,createStringInterpolator:CL,colors:MI});var Xz=XL(Jz,{applyAnimatedValues:Iz,createAnimatedStyle:e=>new Kz(e),getComponentProps:e=>jz(e,Yz)}).animated,Zz=o(((e,t)=>{function n(){this.__data__=[],this.size=0}t.exports=n})),Qz=o(((e,t)=>{function n(e,t){return e===t||e!==e&&t!==t}t.exports=n})),$z=o(((e,t)=>{var n=Qz();function r(e,t){for(var r=e.length;r--;)if(n(e[r][0],t))return r;return-1}t.exports=r})),eB=o(((e,t)=>{var n=$z(),r=Array.prototype.splice;function i(e){var t=this.__data__,i=n(t,e);return i<0?!1:(i==t.length-1?t.pop():r.call(t,i,1),--this.size,!0)}t.exports=i})),tB=o(((e,t)=>{var n=$z();function r(e){var t=this.__data__,r=n(t,e);return r<0?void 0:t[r][1]}t.exports=r})),nB=o(((e,t)=>{var n=$z();function r(e){return n(this.__data__,e)>-1}t.exports=r})),rB=o(((e,t)=>{var n=$z();function r(e,t){var r=this.__data__,i=n(r,e);return i<0?(++this.size,r.push([e,t])):r[i][1]=t,this}t.exports=r})),iB=o(((e,t)=>{var n=Zz(),r=eB(),i=tB(),a=nB(),o=rB();function s(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}s.prototype.clear=n,s.prototype.delete=r,s.prototype.get=i,s.prototype.has=a,s.prototype.set=o,t.exports=s})),aB=o(((e,t)=>{var n=iB();function r(){this.__data__=new n,this.size=0}t.exports=r})),oB=o(((e,t)=>{function n(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}t.exports=n})),sB=o(((e,t)=>{function n(e){return this.__data__.get(e)}t.exports=n})),cB=o(((e,t)=>{function n(e){return this.__data__.has(e)}t.exports=n})),lB=o(((e,t)=>{t.exports=typeof global==`object`&&global&&global.Object===Object&&global})),uB=o(((e,t)=>{var n=lB(),r=typeof self==`object`&&self&&self.Object===Object&&self;t.exports=n||r||Function(`return this`)()})),dB=o(((e,t)=>{t.exports=uB().Symbol})),fB=o(((e,t)=>{var n=dB(),r=Object.prototype,i=r.hasOwnProperty,a=r.toString,o=n?n.toStringTag:void 0;function s(e){var t=i.call(e,o),n=e[o];try{e[o]=void 0;var r=!0}catch{}var s=a.call(e);return r&&(t?e[o]=n:delete e[o]),s}t.exports=s})),pB=o(((e,t)=>{var n=Object.prototype.toString;function r(e){return n.call(e)}t.exports=r})),mB=o(((e,t)=>{var n=dB(),r=fB(),i=pB(),a=`[object Null]`,o=`[object Undefined]`,s=n?n.toStringTag:void 0;function c(e){return e==null?e===void 0?o:a:s&&s in Object(e)?r(e):i(e)}t.exports=c})),hB=o(((e,t)=>{function n(e){var t=typeof e;return e!=null&&(t==`object`||t==`function`)}t.exports=n})),gB=o(((e,t)=>{var n=mB(),r=hB(),i=`[object AsyncFunction]`,a=`[object Function]`,o=`[object GeneratorFunction]`,s=`[object Proxy]`;function c(e){if(!r(e))return!1;var t=n(e);return t==a||t==o||t==i||t==s}t.exports=c})),_B=o(((e,t)=>{t.exports=uB()[`__core-js_shared__`]})),vB=o(((e,t)=>{var n=_B(),r=function(){var e=/[^.]+$/.exec(n&&n.keys&&n.keys.IE_PROTO||``);return e?`Symbol(src)_1.`+e:``}();function i(e){return!!r&&r in e}t.exports=i})),yB=o(((e,t)=>{var n=Function.prototype.toString;function r(e){if(e!=null){try{return n.call(e)}catch{}try{return e+``}catch{}}return``}t.exports=r})),bB=o(((e,t)=>{var n=gB(),r=vB(),i=hB(),a=yB(),o=/[\\^$.*+?()[\]{}|]/g,s=/^\[object .+?Constructor\]$/,c=Function.prototype,l=Object.prototype,u=c.toString,d=l.hasOwnProperty,f=RegExp(`^`+u.call(d).replace(o,`\\$&`).replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,`$1.*?`)+`$`);function p(e){return!i(e)||r(e)?!1:(n(e)?f:s).test(a(e))}t.exports=p})),xB=o(((e,t)=>{function n(e,t){return e?.[t]}t.exports=n})),SB=o(((e,t)=>{var n=bB(),r=xB();function i(e,t){var i=r(e,t);return n(i)?i:void 0}t.exports=i})),CB=o(((e,t)=>{t.exports=SB()(uB(),`Map`)})),wB=o(((e,t)=>{t.exports=SB()(Object,`create`)})),TB=o(((e,t)=>{var n=wB();function r(){this.__data__=n?n(null):{},this.size=0}t.exports=r})),EB=o(((e,t)=>{function n(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=+!!t,t}t.exports=n})),DB=o(((e,t)=>{var n=wB(),r=`__lodash_hash_undefined__`,i=Object.prototype.hasOwnProperty;function a(e){var t=this.__data__;if(n){var a=t[e];return a===r?void 0:a}return i.call(t,e)?t[e]:void 0}t.exports=a})),OB=o(((e,t)=>{var n=wB(),r=Object.prototype.hasOwnProperty;function i(e){var t=this.__data__;return n?t[e]!==void 0:r.call(t,e)}t.exports=i})),kB=o(((e,t)=>{var n=wB(),r=`__lodash_hash_undefined__`;function i(e,t){var i=this.__data__;return this.size+=+!this.has(e),i[e]=n&&t===void 0?r:t,this}t.exports=i})),AB=o(((e,t)=>{var n=TB(),r=EB(),i=DB(),a=OB(),o=kB();function s(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}s.prototype.clear=n,s.prototype.delete=r,s.prototype.get=i,s.prototype.has=a,s.prototype.set=o,t.exports=s})),jB=o(((e,t)=>{var n=AB(),r=iB(),i=CB();function a(){this.size=0,this.__data__={hash:new n,map:new(i||r),string:new n}}t.exports=a})),MB=o(((e,t)=>{function n(e){var t=typeof e;return t==`string`||t==`number`||t==`symbol`||t==`boolean`?e!==`__proto__`:e===null}t.exports=n})),NB=o(((e,t)=>{var n=MB();function r(e,t){var r=e.__data__;return n(t)?r[typeof t==`string`?`string`:`hash`]:r.map}t.exports=r})),PB=o(((e,t)=>{var n=NB();function r(e){var t=n(this,e).delete(e);return this.size-=+!!t,t}t.exports=r})),FB=o(((e,t)=>{var n=NB();function r(e){return n(this,e).get(e)}t.exports=r})),IB=o(((e,t)=>{var n=NB();function r(e){return n(this,e).has(e)}t.exports=r})),LB=o(((e,t)=>{var n=NB();function r(e,t){var r=n(this,e),i=r.size;return r.set(e,t),this.size+=r.size==i?0:1,this}t.exports=r})),RB=o(((e,t)=>{var n=jB(),r=PB(),i=FB(),a=IB(),o=LB();function s(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}s.prototype.clear=n,s.prototype.delete=r,s.prototype.get=i,s.prototype.has=a,s.prototype.set=o,t.exports=s})),zB=o(((e,t)=>{var n=iB(),r=CB(),i=RB(),a=200;function o(e,t){var o=this.__data__;if(o instanceof n){var s=o.__data__;if(!r||s.length<a-1)return s.push([e,t]),this.size=++o.size,this;o=this.__data__=new i(s)}return o.set(e,t),this.size=o.size,this}t.exports=o})),BB=o(((e,t)=>{var n=iB(),r=aB(),i=oB(),a=sB(),o=cB(),s=zB();function c(e){var t=this.__data__=new n(e);this.size=t.size}c.prototype.clear=r,c.prototype.delete=i,c.prototype.get=a,c.prototype.has=o,c.prototype.set=s,t.exports=c})),VB=o(((e,t)=>{var n=SB();t.exports=function(){try{var e=n(Object,`defineProperty`);return e({},``,{}),e}catch{}}()})),HB=o(((e,t)=>{var n=VB();function r(e,t,r){t==`__proto__`&&n?n(e,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[t]=r}t.exports=r})),UB=o(((e,t)=>{var n=HB(),r=Qz();function i(e,t,i){(i!==void 0&&!r(e[t],i)||i===void 0&&!(t in e))&&n(e,t,i)}t.exports=i})),WB=o(((e,t)=>{function n(e){return function(t,n,r){for(var i=-1,a=Object(t),o=r(t),s=o.length;s--;){var c=o[e?s:++i];if(n(a[c],c,a)===!1)break}return t}}t.exports=n})),GB=o(((e,t)=>{t.exports=WB()()})),KB=o(((e,t)=>{var n=uB(),r=typeof e==`object`&&e&&!e.nodeType&&e,i=r&&typeof t==`object`&&t&&!t.nodeType&&t,a=i&&i.exports===r?n.Buffer:void 0,o=a?a.allocUnsafe:void 0;function s(e,t){if(t)return e.slice();var n=e.length,r=o?o(n):new e.constructor(n);return e.copy(r),r}t.exports=s})),qB=o(((e,t)=>{t.exports=uB().Uint8Array})),JB=o(((e,t)=>{var n=qB();function r(e){var t=new e.constructor(e.byteLength);return new n(t).set(new n(e)),t}t.exports=r})),YB=o(((e,t)=>{var n=JB();function r(e,t){var r=t?n(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.length)}t.exports=r})),XB=o(((e,t)=>{function n(e,t){var n=-1,r=e.length;for(t||=Array(r);++n<r;)t[n]=e[n];return t}t.exports=n})),ZB=o(((e,t)=>{var n=hB(),r=Object.create;t.exports=function(){function e(){}return function(t){if(!n(t))return{};if(r)return r(t);e.prototype=t;var i=new e;return e.prototype=void 0,i}}()})),QB=o(((e,t)=>{function n(e,t){return function(n){return e(t(n))}}t.exports=n})),$B=o(((e,t)=>{t.exports=QB()(Object.getPrototypeOf,Object)})),eV=o(((e,t)=>{var n=Object.prototype;function r(e){var t=e&&e.constructor;return e===(typeof t==`function`&&t.prototype||n)}t.exports=r})),tV=o(((e,t)=>{var n=ZB(),r=$B(),i=eV();function a(e){return typeof e.constructor==`function`&&!i(e)?n(r(e)):{}}t.exports=a})),nV=o(((e,t)=>{function n(e){return typeof e==`object`&&!!e}t.exports=n})),rV=o(((e,t)=>{var n=mB(),r=nV(),i=`[object Arguments]`;function a(e){return r(e)&&n(e)==i}t.exports=a})),iV=o(((e,t)=>{var n=rV(),r=nV(),i=Object.prototype,a=i.hasOwnProperty,o=i.propertyIsEnumerable;t.exports=n(function(){return arguments}())?n:function(e){return r(e)&&a.call(e,`callee`)&&!o.call(e,`callee`)}})),aV=o(((e,t)=>{t.exports=Array.isArray})),oV=o(((e,t)=>{function n(e){return typeof e==`number`&&e>-1&&e%1==0&&e<=9007199254740991}t.exports=n})),sV=o(((e,t)=>{var n=gB(),r=oV();function i(e){return e!=null&&r(e.length)&&!n(e)}t.exports=i})),cV=o(((e,t)=>{var n=sV(),r=nV();function i(e){return r(e)&&n(e)}t.exports=i})),lV=o(((e,t)=>{function n(){return!1}t.exports=n})),uV=o(((e,t)=>{var n=uB(),r=lV(),i=typeof e==`object`&&e&&!e.nodeType&&e,a=i&&typeof t==`object`&&t&&!t.nodeType&&t,o=a&&a.exports===i?n.Buffer:void 0;t.exports=(o?o.isBuffer:void 0)||r})),dV=o(((e,t)=>{var n=mB(),r=$B(),i=nV(),a=`[object Object]`,o=Function.prototype,s=Object.prototype,c=o.toString,l=s.hasOwnProperty,u=c.call(Object);function d(e){if(!i(e)||n(e)!=a)return!1;var t=r(e);if(t===null)return!0;var o=l.call(t,`constructor`)&&t.constructor;return typeof o==`function`&&o instanceof o&&c.call(o)==u}t.exports=d})),fV=o(((e,t)=>{var n=mB(),r=oV(),i=nV(),a=`[object Arguments]`,o=`[object Array]`,s=`[object Boolean]`,c=`[object Date]`,l=`[object Error]`,u=`[object Function]`,d=`[object Map]`,f=`[object Number]`,p=`[object Object]`,m=`[object RegExp]`,h=`[object Set]`,g=`[object String]`,_=`[object WeakMap]`,v=`[object ArrayBuffer]`,y=`[object DataView]`,b=`[object Float32Array]`,x=`[object Float64Array]`,S=`[object Int8Array]`,C=`[object Int16Array]`,w=`[object Int32Array]`,T=`[object Uint8Array]`,E=`[object Uint8ClampedArray]`,D=`[object Uint16Array]`,O=`[object Uint32Array]`,k={};k[b]=k[x]=k[S]=k[C]=k[w]=k[T]=k[E]=k[D]=k[O]=!0,k[a]=k[o]=k[v]=k[s]=k[y]=k[c]=k[l]=k[u]=k[d]=k[f]=k[p]=k[m]=k[h]=k[g]=k[_]=!1;function A(e){return i(e)&&r(e.length)&&!!k[n(e)]}t.exports=A})),pV=o(((e,t)=>{function n(e){return function(t){return e(t)}}t.exports=n})),mV=o(((e,t)=>{var n=lB(),r=typeof e==`object`&&e&&!e.nodeType&&e,i=r&&typeof t==`object`&&t&&!t.nodeType&&t,a=i&&i.exports===r&&n.process;t.exports=function(){try{return i&&i.require&&i.require(`util`).types||a&&a.binding&&a.binding(`util`)}catch{}}()})),hV=o(((e,t)=>{var n=fV(),r=pV(),i=mV(),a=i&&i.isTypedArray;t.exports=a?r(a):n})),gV=o(((e,t)=>{function n(e,t){if((t!==`constructor`||typeof e[t]!=`function`)&&t!=`__proto__`)return e[t]}t.exports=n})),_V=o(((e,t)=>{var n=HB(),r=Qz(),i=Object.prototype.hasOwnProperty;function a(e,t,a){var o=e[t];(!(i.call(e,t)&&r(o,a))||a===void 0&&!(t in e))&&n(e,t,a)}t.exports=a})),vV=o(((e,t)=>{var n=_V(),r=HB();function i(e,t,i,a){var o=!i;i||={};for(var s=-1,c=t.length;++s<c;){var l=t[s],u=a?a(i[l],e[l],l,i,e):void 0;u===void 0&&(u=e[l]),o?r(i,l,u):n(i,l,u)}return i}t.exports=i})),yV=o(((e,t)=>{function n(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}t.exports=n})),bV=o(((e,t)=>{var n=/^(?:0|[1-9]\d*)$/;function r(e,t){var r=typeof e;return t??=9007199254740991,!!t&&(r==`number`||r!=`symbol`&&n.test(e))&&e>-1&&e%1==0&&e<t}t.exports=r})),xV=o(((e,t)=>{var n=yV(),r=iV(),i=aV(),a=uV(),o=bV(),s=hV(),c=Object.prototype.hasOwnProperty;function l(e,t){var l=i(e),u=!l&&r(e),d=!l&&!u&&a(e),f=!l&&!u&&!d&&s(e),p=l||u||d||f,m=p?n(e.length,String):[],h=m.length;for(var g in e)(t||c.call(e,g))&&!(p&&(g==`length`||d&&(g==`offset`||g==`parent`)||f&&(g==`buffer`||g==`byteLength`||g==`byteOffset`)||o(g,h)))&&m.push(g);return m}t.exports=l})),SV=o(((e,t)=>{function n(e){var t=[];if(e!=null)for(var n in Object(e))t.push(n);return t}t.exports=n})),CV=o(((e,t)=>{var n=hB(),r=eV(),i=SV(),a=Object.prototype.hasOwnProperty;function o(e){if(!n(e))return i(e);var t=r(e),o=[];for(var s in e)s==`constructor`&&(t||!a.call(e,s))||o.push(s);return o}t.exports=o})),wV=o(((e,t)=>{var n=xV(),r=CV(),i=sV();function a(e){return i(e)?n(e,!0):r(e)}t.exports=a})),TV=o(((e,t)=>{var n=vV(),r=wV();function i(e){return n(e,r(e))}t.exports=i})),EV=o(((e,t)=>{var n=UB(),r=KB(),i=YB(),a=XB(),o=tV(),s=iV(),c=aV(),l=cV(),u=uV(),d=gB(),f=hB(),p=dV(),m=hV(),h=gV(),g=TV();function _(e,t,_,v,y,b,x){var S=h(e,_),C=h(t,_),w=x.get(C);if(w){n(e,_,w);return}var T=b?b(S,C,_+``,e,t,x):void 0,E=T===void 0;if(E){var D=c(C),O=!D&&u(C),k=!D&&!O&&m(C);T=C,D||O||k?c(S)?T=S:l(S)?T=a(S):O?(E=!1,T=r(C,!0)):k?(E=!1,T=i(C,!0)):T=[]:p(C)||s(C)?(T=S,s(S)?T=g(S):(!f(S)||d(S))&&(T=o(C))):E=!1}E&&(x.set(C,T),y(T,C,v,b,x),x.delete(C)),n(e,_,T)}t.exports=_})),DV=o(((e,t)=>{var n=BB(),r=UB(),i=GB(),a=EV(),o=hB(),s=wV(),c=gV();function l(e,t,u,d,f){e!==t&&i(t,function(i,s){if(f||=new n,o(i))a(e,t,s,u,l,d,f);else{var p=d?d(c(e,s),i,s+``,e,t,f):void 0;p===void 0&&(p=i),r(e,s,p)}},s)}t.exports=l})),OV=o(((e,t)=>{function n(e){return e}t.exports=n})),kV=o(((e,t)=>{function n(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}t.exports=n})),AV=o(((e,t)=>{var n=kV(),r=Math.max;function i(e,t,i){return t=r(t===void 0?e.length-1:t,0),function(){for(var a=arguments,o=-1,s=r(a.length-t,0),c=Array(s);++o<s;)c[o]=a[t+o];o=-1;for(var l=Array(t+1);++o<t;)l[o]=a[o];return l[t]=i(c),n(e,this,l)}}t.exports=i})),jV=o(((e,t)=>{function n(e){return function(){return e}}t.exports=n})),MV=o(((e,t)=>{var n=jV(),r=VB(),i=OV();t.exports=r?function(e,t){return r(e,`toString`,{configurable:!0,enumerable:!1,value:n(t),writable:!0})}:i})),NV=o(((e,t)=>{var n=Date.now;function r(e){var t=0,r=0;return function(){var i=n(),a=16-(i-r);if(r=i,a>0){if(++t>=800)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}t.exports=r})),PV=o(((e,t)=>{var n=MV();t.exports=NV()(n)})),FV=o(((e,t)=>{var n=OV(),r=AV(),i=PV();function a(e,t){return i(r(e,t,n),e+``)}t.exports=a})),IV=o(((e,t)=>{var n=Qz(),r=sV(),i=bV(),a=hB();function o(e,t,o){if(!a(o))return!1;var s=typeof t;return(s==`number`?r(o)&&i(t,o.length):s==`string`&&t in o)?n(o[t],e):!1}t.exports=o})),LV=o(((e,t)=>{var n=FV(),r=IV();function i(e){return n(function(t,n){var i=-1,a=n.length,o=a>1?n[a-1]:void 0,s=a>2?n[2]:void 0;for(o=e.length>3&&typeof o==`function`?(a--,o):void 0,s&&r(n[0],n[1],s)&&(o=a<3?void 0:o,a=1),t=Object(t);++i<a;){var c=n[i];c&&e(t,c,i,o)}return t})}t.exports=i})),RV=o(((e,t)=>{var n=DV();t.exports=LV()(function(e,t,r){n(e,t,r)})})),zV=o(((e,t)=>{var n=mB(),r=nV(),i=`[object Symbol]`;function a(e){return typeof e==`symbol`||r(e)&&n(e)==i}t.exports=a})),BV=o(((e,t)=>{var n=aV(),r=zV(),i=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,a=/^\w*$/;function o(e,t){if(n(e))return!1;var o=typeof e;return o==`number`||o==`symbol`||o==`boolean`||e==null||r(e)?!0:a.test(e)||!i.test(e)||t!=null&&e in Object(t)}t.exports=o})),VV=o(((e,t)=>{var n=RB(),r=`Expected a function`;function i(e,t){if(typeof e!=`function`||t!=null&&typeof t!=`function`)throw TypeError(r);var a=function(){var n=arguments,r=t?t.apply(this,n):n[0],i=a.cache;if(i.has(r))return i.get(r);var o=e.apply(this,n);return a.cache=i.set(r,o)||i,o};return a.cache=new(i.Cache||n),a}i.Cache=n,t.exports=i})),HV=o(((e,t)=>{var n=VV(),r=500;function i(e){var t=n(e,function(e){return i.size===r&&i.clear(),e}),i=t.cache;return t}t.exports=i})),UV=o(((e,t)=>{var n=HV(),r=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,i=/\\(\\)?/g;t.exports=n(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(``),e.replace(r,function(e,n,r,a){t.push(r?a.replace(i,`$1`):n||e)}),t})})),WV=o(((e,t)=>{function n(e,t){for(var n=-1,r=e==null?0:e.length,i=Array(r);++n<r;)i[n]=t(e[n],n,e);return i}t.exports=n})),GV=o(((e,t)=>{var n=dB(),r=WV(),i=aV(),a=zV(),o=1/0,s=n?n.prototype:void 0,c=s?s.toString:void 0;function l(e){if(typeof e==`string`)return e;if(i(e))return r(e,l)+``;if(a(e))return c?c.call(e):``;var t=e+``;return t==`0`&&1/e==-o?`-0`:t}t.exports=l})),KV=o(((e,t)=>{var n=GV();function r(e){return e==null?``:n(e)}t.exports=r})),qV=o(((e,t)=>{var n=aV(),r=BV(),i=UV(),a=KV();function o(e,t){return n(e)?e:r(e,t)?[e]:i(a(e))}t.exports=o})),JV=o(((e,t)=>{var n=zV(),r=1/0;function i(e){if(typeof e==`string`||n(e))return e;var t=e+``;return t==`0`&&1/e==-r?`-0`:t}t.exports=i})),YV=o(((e,t)=>{var n=qV(),r=JV();function i(e,t){t=n(t,e);for(var i=0,a=t.length;e!=null&&i<a;)e=e[r(t[i++])];return i&&i==a?e:void 0}t.exports=i})),XV=o(((e,t)=>{var n=YV();function r(e,t,r){var i=e==null?void 0:n(e,t);return i===void 0?r:i}t.exports=r})),ZV=o(((e,t)=>{var n=_V(),r=qV(),i=bV(),a=hB(),o=JV();function s(e,t,s,c){if(!a(e))return e;t=r(t,e);for(var l=-1,u=t.length,d=u-1,f=e;f!=null&&++l<u;){var p=o(t[l]),m=s;if(p===`__proto__`||p===`constructor`||p===`prototype`)return e;if(l!=d){var h=f[p];m=c?c(h,p,f):void 0,m===void 0&&(m=a(h)?h:i(t[l+1])?[]:{})}n(f,p,m),f=f[p]}return e}t.exports=s})),QV=o(((e,t)=>{var n=ZV();function r(e,t,r){return e==null?e:n(e,t,r)}t.exports=r})),$V=l(RV(),1),eH=l(XV(),1),tH=l(QV(),1);function nH(){return nH=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},nH.apply(null,arguments)}function rH(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}var iH=[`outlineWidth`,`outlineColor`,`outlineOpacity`],aH=function(e){return e.outlineWidth,e.outlineColor,e.outlineOpacity,rH(e,iH)},oH=[`axis.ticks.text`,`axis.legend.text`,`legends.title.text`,`legends.text`,`legends.ticks.text`,`legends.title.text`,`labels.text`,`dots.text`,`markers.text`,`annotations.text`],sH=function(e,t){return nH({},t,e)},cH=function(e,t){var n=(0,$V.default)({},e,t);return oH.forEach((function(e){(0,tH.default)(n,e,sH((0,eH.default)(n,e),n.text))})),n},lH=function(e,t){return t?(0,$V.default)({},e,t):e},uH={background:`transparent`,text:{fontFamily:`sans-serif`,fontSize:11,fill:`#333333`,outlineWidth:0,outlineColor:`#ffffff`,outlineOpacity:1},axis:{domain:{line:{stroke:`transparent`,strokeWidth:1}},ticks:{line:{stroke:`#777777`,strokeWidth:1},text:{}},legend:{text:{fontSize:12}}},grid:{line:{stroke:`#dddddd`,strokeWidth:1}},legends:{hidden:{symbol:{fill:`#333333`,opacity:.6},text:{fill:`#333333`,opacity:.6}},text:{},ticks:{line:{stroke:`#777777`,strokeWidth:1},text:{fontSize:10}},title:{text:{}}},labels:{text:{}},markers:{lineColor:`#000000`,lineStrokeWidth:1,text:{}},dots:{text:{}},tooltip:{container:{background:`white`,color:`inherit`,fontSize:`inherit`,borderRadius:`2px`,boxShadow:`0 1px 2px rgba(0, 0, 0, 0.25)`,padding:`5px 9px`},basic:{whiteSpace:`pre`,display:`flex`,alignItems:`center`},chip:{marginRight:7},table:{},tableCell:{padding:`3px 5px`},tableCellValue:{fontWeight:`bold`}},crosshair:{line:{stroke:`#000000`,strokeWidth:1,strokeOpacity:.75,strokeDasharray:`6 6`}},annotations:{text:{fontSize:13,outlineWidth:2,outlineColor:`#ffffff`,outlineOpacity:1},link:{stroke:`#000000`,strokeWidth:1,outlineWidth:2,outlineColor:`#ffffff`,outlineOpacity:1},outline:{fill:`none`,stroke:`#000000`,strokeWidth:2,outlineWidth:2,outlineColor:`#ffffff`,outlineOpacity:1},symbol:{fill:`#000000`,outlineWidth:2,outlineColor:`#ffffff`,outlineOpacity:1}}},dH=function(e){return(0,w.useMemo)((function(){return cH(uH,e)}),[e])},fH=function(e,t){return(0,w.useMemo)((function(){return lH(e,t)}),[e,t])},pH=(0,w.createContext)(null),mH={},hH=function(e){var t=e.theme,n=t===void 0?mH:t,r=e.children,i=dH(n);return(0,G.jsx)(pH.Provider,{value:i,children:r})},gH=function(){var e=(0,w.useContext)(pH);if(e===null)throw Error(`Unable to find the theme, did you forget to wrap your component with ThemeProvider?`);return e};function _H(){return _H=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},_H.apply(null,arguments)}var vH=[`basic`,`chip`,`container`,`table`,`tableCell`,`tableCellValue`],yH={pointerEvents:`none`,position:`absolute`,zIndex:10,top:0,left:0},bH=function(e,t){return`translate(`+e+`px, `+t+`px)`},xH=(0,w.memo)((function(e){var t=e.position,n=e.anchor,r=e.children,i=gH(),a=G1(),o=a.animate,s=a.config,c=O0(),l=c[0],u=c[1],d=(0,w.useRef)(!1),f=void 0,p=!1,m=u.width>0&&u.height>0,h=Math.round(t[0]),g=Math.round(t[1]);m&&(n===`top`?(h-=u.width/2,g-=u.height+14):n===`right`?(h+=14,g-=u.height/2):n===`bottom`?(h-=u.width/2,g+=14):n===`left`?(h-=u.width+14,g-=u.height/2):n===`center`&&(h-=u.width/2,g-=u.height/2),f={transform:bH(h,g)},d.current||(p=!0),d.current=[h,g]);var _=xz({to:f,config:s,immediate:!o||p}),v=i.tooltip;v.basic,v.chip,v.container,v.table,v.tableCell,v.tableCellValue;var y=function(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}(v,vH),b=_H({},yH,y,{transform:_.transform??bH(h,g),opacity:+!!_.transform});return(0,G.jsx)(Xz.div,{ref:l,style:b,children:r})}));xH.displayName=`TooltipWrapper`;var SH=(0,w.memo)((function(e){var t=e.size,n=t===void 0?12:t,r=e.color,i=e.style;return(0,G.jsx)(`span`,{style:_H({display:`block`,width:n,height:n,background:r},i===void 0?{}:i)})})),CH=(0,w.memo)((function(e){var t,n=e.id,r=e.value,i=e.format,a=e.enableChip,o=a!==void 0&&a,s=e.color,c=e.renderContent,l=gH(),u=A0(i);if(typeof c==`function`)t=c();else{var d=r;u!==void 0&&d!==void 0&&(d=u(d)),t=(0,G.jsxs)(`div`,{style:l.tooltip.basic,children:[o&&(0,G.jsx)(SH,{color:s,style:l.tooltip.chip}),d===void 0?n:(0,G.jsxs)(`span`,{children:[n,`: `,(0,G.jsx)(`strong`,{children:``+d})]})]})}return(0,G.jsx)(`div`,{style:l.tooltip.container,role:`tooltip`,children:t})})),wH={width:`100%`,borderCollapse:`collapse`},TH=(0,w.memo)((function(e){var t,n=e.title,r=e.rows,i=r===void 0?[]:r,a=e.renderContent,o=gH();return i.length?(t=typeof a==`function`?a():(0,G.jsxs)(`div`,{children:[n&&n,(0,G.jsx)(`table`,{style:_H({},wH,o.tooltip.table),children:(0,G.jsx)(`tbody`,{children:i.map((function(e,t){return(0,G.jsx)(`tr`,{children:e.map((function(e,t){return(0,G.jsx)(`td`,{style:o.tooltip.tableCell,children:e},t)}))},t)}))})})]}),(0,G.jsx)(`div`,{style:o.tooltip.container,children:t})):null}));TH.displayName=`TableTooltip`;var EH=(0,w.memo)((function(e){var t=e.x0,n=e.x1,r=e.y0,i=e.y1,a=gH(),o=G1(),s=o.animate,c=o.config,l=(0,w.useMemo)((function(){return _H({},a.crosshair.line,{pointerEvents:`none`})}),[a.crosshair.line]),u=xz({x1:t,x2:n,y1:r,y2:i,config:c,immediate:!s});return(0,G.jsx)(Xz.line,_H({},u,{fill:`none`,style:l}))}));EH.displayName=`CrosshairLine`;var DH=(0,w.memo)((function(e){var t,n,r=e.width,i=e.height,a=e.type,o=e.x,s=e.y;return a===`cross`?(t={x0:o,x1:o,y0:0,y1:i},n={x0:0,x1:r,y0:s,y1:s}):a===`top-left`?(t={x0:o,x1:o,y0:0,y1:s},n={x0:0,x1:o,y0:s,y1:s}):a===`top`?t={x0:o,x1:o,y0:0,y1:s}:a===`top-right`?(t={x0:o,x1:o,y0:0,y1:s},n={x0:o,x1:r,y0:s,y1:s}):a===`right`?n={x0:o,x1:r,y0:s,y1:s}:a===`bottom-right`?(t={x0:o,x1:o,y0:s,y1:i},n={x0:o,x1:r,y0:s,y1:s}):a===`bottom`?t={x0:o,x1:o,y0:s,y1:i}:a===`bottom-left`?(t={x0:o,x1:o,y0:s,y1:i},n={x0:0,x1:o,y0:s,y1:s}):a===`left`?n={x0:0,x1:o,y0:s,y1:s}:a===`x`?t={x0:o,x1:o,y0:0,y1:i}:a===`y`&&(n={x0:0,x1:r,y0:s,y1:s}),(0,G.jsxs)(G.Fragment,{children:[t&&(0,G.jsx)(EH,{x0:t.x0,x1:t.x1,y0:t.y0,y1:t.y1}),n&&(0,G.jsx)(EH,{x0:n.x0,x1:n.x1,y0:n.y0,y1:n.y1})]})}));DH.displayName=`Crosshair`;var OH=(0,w.createContext)({showTooltipAt:function(){},showTooltipFromEvent:function(){},hideTooltip:function(){}}),kH={isVisible:!1,position:[null,null],content:null,anchor:null},AH=(0,w.createContext)(kH),jH=function(e){var t=(0,w.useState)(kH),n=t[0],r=t[1],i=(0,w.useCallback)((function(e,t,n){var i=t[0],a=t[1];n===void 0&&(n=`top`),r({isVisible:!0,position:[i,a],anchor:n,content:e})}),[r]),a=(0,w.useCallback)((function(t,n,i){i===void 0&&(i=`top`);var a=e.current.getBoundingClientRect(),o=e.current.offsetWidth,s=o===a.width?1:o/a.width,c=`touches`in n?n.touches[0]:n,l=c.clientX,u=c.clientY,d=(l-a.left)*s,f=(u-a.top)*s;i!==`left`&&i!==`right`||(i=d<a.width/2?`right`:`left`),r({isVisible:!0,position:[d,f],anchor:i,content:t})}),[e,r]),o=(0,w.useCallback)((function(){r(kH)}),[r]);return{actions:(0,w.useMemo)((function(){return{showTooltipAt:i,showTooltipFromEvent:a,hideTooltip:o}}),[i,a,o]),state:n}},MH=function(){var e=(0,w.useContext)(OH);if(e===void 0)throw Error(`useTooltip must be used within a TooltipProvider`);return e},NH=function(){var e=(0,w.useContext)(AH);if(e===void 0)throw Error(`useTooltipState must be used within a TooltipProvider`);return e},PH=function(e){return e.isVisible},FH=function(){var e=NH();return PH(e)?(0,G.jsx)(xH,{position:e.position,anchor:e.anchor,children:e.content}):null},IH=function(e){var t=e.container,n=e.children,r=jH(t),i=r.actions,a=r.state;return(0,G.jsx)(OH.Provider,{value:i,children:(0,G.jsx)(AH.Provider,{value:a,children:n})})},LH=l(o(((e,t)=>{var n=mB(),r=aV(),i=nV(),a=`[object String]`;function o(e){return typeof e==`string`||!r(e)&&i(e)&&n(e)==a}t.exports=o}))(),1),RH=typeof window<`u`?window:typeof self<`u`?self:global,zH=null,BH=null,VH=20,HH=RH.clearTimeout,UH=RH.setTimeout,WH=RH.cancelAnimationFrame||RH.mozCancelAnimationFrame||RH.webkitCancelAnimationFrame,GH=RH.requestAnimationFrame||RH.mozRequestAnimationFrame||RH.webkitRequestAnimationFrame;WH==null||GH==null?(zH=HH,BH=function(e){return UH(e,VH)}):(zH=function([e,t]){WH(e),HH(t)},BH=function(e){let t=GH(function(){HH(n),e()}),n=UH(function(){WH(t),e()},VH);return[t,n]});function KH(e){let t,n,r,i,a,o,s,c=typeof document<`u`&&document.attachEvent;if(!c){o=function(e){let t=e.__resizeTriggers__,n=t.firstElementChild,r=t.lastElementChild,i=n.firstElementChild;r.scrollLeft=r.scrollWidth,r.scrollTop=r.scrollHeight,i.style.width=n.offsetWidth+1+`px`,i.style.height=n.offsetHeight+1+`px`,n.scrollLeft=n.scrollWidth,n.scrollTop=n.scrollHeight},a=function(e){return e.offsetWidth!==e.__resizeLast__.width||e.offsetHeight!==e.__resizeLast__.height},s=function(e){if(e.target.className&&typeof e.target.className.indexOf==`function`&&e.target.className.indexOf(`contract-trigger`)<0&&e.target.className.indexOf(`expand-trigger`)<0)return;let t=this;o(this),this.__resizeRAF__&&zH(this.__resizeRAF__),this.__resizeRAF__=BH(function(){a(t)&&(t.__resizeLast__.width=t.offsetWidth,t.__resizeLast__.height=t.offsetHeight,t.__resizeListeners__.forEach(function(n){n.call(t,e)}))})};let e=!1,c=``;r=`animationstart`;let l=`Webkit Moz O ms`.split(` `),u=`webkitAnimationStart animationstart oAnimationStart MSAnimationStart`.split(` `),d=``;{let t=document.createElement(`fakeelement`);if(t.style.animationName!==void 0&&(e=!0),e===!1){for(let n=0;n<l.length;n++)if(t.style[l[n]+`AnimationName`]!==void 0){d=l[n],c=`-`+d.toLowerCase()+`-`,r=u[n],e=!0;break}}}n=`resizeanim`,t=`@`+c+`keyframes `+n+` { from { opacity: 0; } to { opacity: 0; } } `,i=c+`animation: 1ms `+n+`; `}let l=function(n){if(!n.getElementById(`detectElementResize`)){let r=(t||``)+`.resize-triggers { `+(i||``)+`visibility: hidden; opacity: 0; } .resize-triggers, .resize-triggers > div, .contract-trigger:before { content: " "; display: block; position: absolute; top: 0; left: 0; height: 100%; width: 100%; overflow: hidden; z-index: -1; } .resize-triggers > div { background: #eee; overflow: auto; } .contract-trigger:before { width: 200%; height: 200%; }`,a=n.head||n.getElementsByTagName(`head`)[0],o=n.createElement(`style`);o.id=`detectElementResize`,o.type=`text/css`,e!=null&&o.setAttribute(`nonce`,e),o.styleSheet?o.styleSheet.cssText=r:o.appendChild(n.createTextNode(r)),a.appendChild(o)}};return{addResizeListener:function(e,t){if(c)e.attachEvent(`onresize`,t);else{if(!e.__resizeTriggers__){let t=e.ownerDocument,i=RH.getComputedStyle(e);i&&i.position===`static`&&(e.style.position=`relative`),l(t),e.__resizeLast__={},e.__resizeListeners__=[],(e.__resizeTriggers__=t.createElement(`div`)).className=`resize-triggers`;let a=t.createElement(`div`);a.className=`expand-trigger`,a.appendChild(t.createElement(`div`));let c=t.createElement(`div`);c.className=`contract-trigger`,e.__resizeTriggers__.appendChild(a),e.__resizeTriggers__.appendChild(c),e.appendChild(e.__resizeTriggers__),o(e),e.addEventListener(`scroll`,s,!0),r&&(e.__resizeTriggers__.__animationListener__=function(t){t.animationName===n&&o(e)},e.__resizeTriggers__.addEventListener(r,e.__resizeTriggers__.__animationListener__))}e.__resizeListeners__.push(t)}},removeResizeListener:function(e,t){if(c)e.detachEvent(`onresize`,t);else if(e.__resizeListeners__.splice(e.__resizeListeners__.indexOf(t),1),!e.__resizeListeners__.length){e.removeEventListener(`scroll`,s,!0),e.__resizeTriggers__.__animationListener__&&(e.__resizeTriggers__.removeEventListener(r,e.__resizeTriggers__.__animationListener__),e.__resizeTriggers__.__animationListener__=null);try{e.__resizeTriggers__=!e.removeChild(e.__resizeTriggers__)}catch{}}}}}var qH=class extends w.Component{constructor(...e){super(...e),this.state={height:this.props.defaultHeight||0,width:this.props.defaultWidth||0},this._autoSizer=null,this._detectElementResize=null,this._didLogDeprecationWarning=!1,this._parentNode=null,this._resizeObserver=null,this._timeoutId=null,this._onResize=()=>{this._timeoutId=null;let{disableHeight:e,disableWidth:t,onResize:n}=this.props;if(this._parentNode){let r=window.getComputedStyle(this._parentNode)||{},i=parseFloat(r.paddingLeft||`0`),a=parseFloat(r.paddingRight||`0`),o=parseFloat(r.paddingTop||`0`),s=parseFloat(r.paddingBottom||`0`),c=this._parentNode.getBoundingClientRect(),l=c.height-o-s,u=c.width-i-a;if(!e&&this.state.height!==l||!t&&this.state.width!==u){this.setState({height:l,width:u});let e=()=>{this._didLogDeprecationWarning||(this._didLogDeprecationWarning=!0,console.warn(`scaledWidth and scaledHeight parameters have been deprecated; use width and height instead`))};typeof n==`function`&&n({height:l,width:u,get scaledHeight(){return e(),l},get scaledWidth(){return e(),u}})}}},this._setRef=e=>{this._autoSizer=e}}componentDidMount(){let{nonce:e}=this.props,t=this._autoSizer?this._autoSizer.parentNode:null;if(t!=null&&t.ownerDocument&&t.ownerDocument.defaultView&&t instanceof t.ownerDocument.defaultView.HTMLElement){this._parentNode=t;let n=t.ownerDocument.defaultView.ResizeObserver;n==null?(this._detectElementResize=KH(e),this._detectElementResize.addResizeListener(t,this._onResize)):(this._resizeObserver=new n(()=>{this._timeoutId=setTimeout(this._onResize,0)}),this._resizeObserver.observe(t)),this._onResize()}}componentWillUnmount(){this._parentNode&&(this._detectElementResize&&this._detectElementResize.removeResizeListener(this._parentNode,this._onResize),this._timeoutId!==null&&clearTimeout(this._timeoutId),this._resizeObserver&&this._resizeObserver.disconnect())}render(){let{children:e,defaultHeight:t,defaultWidth:n,disableHeight:r=!1,disableWidth:i=!1,doNotBailOutOnEmptyChildren:a=!1,nonce:o,onResize:s,style:c={},tagName:l=`div`,...u}=this.props,{height:d,width:f}=this.state,p={overflow:`visible`},m={},h=!1;return r||(d===0&&(h=!0),p.height=0,m.height=d,m.scaledHeight=d),i||(f===0&&(h=!0),p.width=0,m.width=f,m.scaledWidth=f),a&&(h=!1),(0,w.createElement)(l,{ref:this._setRef,style:{...p,...c},...u},!h&&e(m))}};function JH(e,t,n,r){var i=this,a=(0,w.useRef)(null),o=(0,w.useRef)(0),s=(0,w.useRef)(0),c=(0,w.useRef)(null),l=(0,w.useRef)([]),u=(0,w.useRef)(),d=(0,w.useRef)(),f=(0,w.useRef)(e),p=(0,w.useRef)(!0),m=(0,w.useRef)(),h=(0,w.useRef)();f.current=e;var g=typeof window<`u`,_=!t&&t!==0&&g;if(typeof e!=`function`)throw TypeError(`Expected a function`);t=+t||0;var v=!!(n||={}).leading,y=!(`trailing`in n)||!!n.trailing,b=!!n.flushOnExit&&y,x=`maxWait`in n,S=`debounceOnServer`in n&&!!n.debounceOnServer,C=x?Math.max(+n.maxWait||0,t):null,T=(0,w.useMemo)(function(){var e=function(e){var t=l.current,n=u.current;return l.current=u.current=null,o.current=e,s.current=s.current||e,d.current=f.current.apply(n,t)},n=function(e,t){_&&cancelAnimationFrame(c.current),c.current=_?requestAnimationFrame(e):setTimeout(e,t)},w=function(e){if(!p.current)return!1;var n=e-a.current;return!a.current||n>=t||n<0||x&&e-o.current>=C},T=function(t){return c.current=null,y&&l.current?e(t):(l.current=u.current=null,d.current)},E=function e(){var r=Date.now();if(v&&s.current===o.current&&D(),w(r))return T(r);if(p.current){var i=t-(r-a.current);n(e,x?Math.min(i,C-(r-o.current)):i)}},D=function(){r&&r({})},O=function(){if(g||S){var r,s=Date.now(),f=w(s);if(l.current=[].slice.call(arguments),u.current=i,a.current=s,b&&!m.current&&(m.current=function(){globalThis.document?.visibilityState===`hidden`&&h.current.flush()},(r=globalThis.document)==null||r.addEventListener==null||r.addEventListener(`visibilitychange`,m.current)),f){if(!c.current&&p.current)return o.current=a.current,n(E,t),v?e(a.current):d.current;if(x)return n(E,t),e(a.current)}return c.current||n(E,t),d.current}};return O.cancel=function(){var e=c.current;e&&(_?cancelAnimationFrame(c.current):clearTimeout(c.current)),o.current=0,l.current=a.current=u.current=c.current=null,e&&r&&r({})},O.isPending=function(){return!!c.current},O.flush=function(){return c.current?T(Date.now()):d.current},O},[v,x,t,C,y,b,_,g,S,r]);return h.current=T,(0,w.useEffect)(function(){return p.current=!0,function(){var e;b&&h.current.flush(),m.current&&=((e=globalThis.document)==null||e.removeEventListener==null||e.removeEventListener(`visibilitychange`,m.current),null),p.current=!1}},[b]),T}function YH(e,t){return e===t}function XH(e,t,n){var r=n&&n.equalityFn||YH,i=(0,w.useRef)(e),a=(0,w.useState)({})[1],o=JH((0,w.useCallback)(function(e){i.current=e,a({})},[a]),t,n,a),s=(0,w.useRef)(e);return r(s.current,e)||(o(e),s.current=e),[i.current,o]}function ZH(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function QH(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function $H(){}var eU=.7,tU=1/eU,nU=`\\s*([+-]?\\d+)\\s*`,rU=`\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*`,iU=`\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*`,aU=/^#([0-9a-f]{3,8})$/,oU=RegExp(`^rgb\\(${nU},${nU},${nU}\\)$`),sU=RegExp(`^rgb\\(${iU},${iU},${iU}\\)$`),cU=RegExp(`^rgba\\(${nU},${nU},${nU},${rU}\\)$`),lU=RegExp(`^rgba\\(${iU},${iU},${iU},${rU}\\)$`),uU=RegExp(`^hsl\\(${rU},${iU},${iU}\\)$`),dU=RegExp(`^hsla\\(${rU},${iU},${iU},${rU}\\)$`),fU={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};ZH($H,_U,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:pU,formatHex:pU,formatHex8:mU,formatHsl:hU,formatRgb:gU,toString:gU});function pU(){return this.rgb().formatHex()}function mU(){return this.rgb().formatHex8()}function hU(){return AU(this).formatHsl()}function gU(){return this.rgb().formatRgb()}function _U(e){var t,n;return e=(e+``).trim().toLowerCase(),(t=aU.exec(e))?(n=t[1].length,t=parseInt(t[1],16),n===6?vU(t):n===3?new SU(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):n===8?yU(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):n===4?yU(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|t&240,((t&15)<<4|t&15)/255):null):(t=oU.exec(e))?new SU(t[1],t[2],t[3],1):(t=sU.exec(e))?new SU(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=cU.exec(e))?yU(t[1],t[2],t[3],t[4]):(t=lU.exec(e))?yU(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=uU.exec(e))?kU(t[1],t[2]/100,t[3]/100,1):(t=dU.exec(e))?kU(t[1],t[2]/100,t[3]/100,t[4]):fU.hasOwnProperty(e)?vU(fU[e]):e===`transparent`?new SU(NaN,NaN,NaN,0):null}function vU(e){return new SU(e>>16&255,e>>8&255,e&255,1)}function yU(e,t,n,r){return r<=0&&(e=t=n=NaN),new SU(e,t,n,r)}function bU(e){return e instanceof $H||(e=_U(e)),e?(e=e.rgb(),new SU(e.r,e.g,e.b,e.opacity)):new SU}function xU(e,t,n,r){return arguments.length===1?bU(e):new SU(e,t,n,r??1)}function SU(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}ZH(SU,xU,QH($H,{brighter(e){return e=e==null?tU:tU**+e,new SU(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?eU:eU**+e,new SU(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new SU(DU(this.r),DU(this.g),DU(this.b),EU(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:CU,formatHex:CU,formatHex8:wU,formatRgb:TU,toString:TU}));function CU(){return`#${OU(this.r)}${OU(this.g)}${OU(this.b)}`}function wU(){return`#${OU(this.r)}${OU(this.g)}${OU(this.b)}${OU((isNaN(this.opacity)?1:this.opacity)*255)}`}function TU(){let e=EU(this.opacity);return`${e===1?`rgb(`:`rgba(`}${DU(this.r)}, ${DU(this.g)}, ${DU(this.b)}${e===1?`)`:`, ${e})`}`}function EU(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function DU(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function OU(e){return e=DU(e),(e<16?`0`:``)+e.toString(16)}function kU(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new MU(e,t,n,r)}function AU(e){if(e instanceof MU)return new MU(e.h,e.s,e.l,e.opacity);if(e instanceof $H||(e=_U(e)),!e)return new MU;if(e instanceof MU)return e;e=e.rgb();var t=e.r/255,n=e.g/255,r=e.b/255,i=Math.min(t,n,r),a=Math.max(t,n,r),o=NaN,s=a-i,c=(a+i)/2;return s?(o=t===a?(n-r)/s+(n<r)*6:n===a?(r-t)/s+2:(t-n)/s+4,s/=c<.5?a+i:2-a-i,o*=60):s=c>0&&c<1?0:o,new MU(o,s,c,e.opacity)}function jU(e,t,n,r){return arguments.length===1?AU(e):new MU(e,t,n,r??1)}function MU(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}ZH(MU,jU,QH($H,{brighter(e){return e=e==null?tU:tU**+e,new MU(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?eU:eU**+e,new MU(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*t,i=2*n-r;return new SU(FU(e>=240?e-240:e+120,i,r),FU(e,i,r),FU(e<120?e+240:e-120,i,r),this.opacity)},clamp(){return new MU(NU(this.h),PU(this.s),PU(this.l),EU(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){let e=EU(this.opacity);return`${e===1?`hsl(`:`hsla(`}${NU(this.h)}, ${PU(this.s)*100}%, ${PU(this.l)*100}%${e===1?`)`:`, ${e})`}`}}));function NU(e){return e=(e||0)%360,e<0?e+360:e}function PU(e){return Math.max(0,Math.min(1,e||0))}function FU(e,t,n){return(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)*255}var IU=Math.PI/180,LU=180/Math.PI,RU=-.14861,zU=1.78277,BU=-.29227,VU=-.90649,HU=1.97294,UU=HU*VU,WU=HU*zU,GU=zU*BU-VU*RU;function KU(e){if(e instanceof JU)return new JU(e.h,e.s,e.l,e.opacity);e instanceof SU||(e=bU(e));var t=e.r/255,n=e.g/255,r=e.b/255,i=(GU*r+UU*t-WU*n)/(GU+UU-WU),a=r-i,o=(HU*(n-i)-BU*a)/VU,s=Math.sqrt(o*o+a*a)/(HU*i*(1-i)),c=s?Math.atan2(o,a)*LU-120:NaN;return new JU(c<0?c+360:c,s,i,e.opacity)}function qU(e,t,n,r){return arguments.length===1?KU(e):new JU(e,t,n,r??1)}function JU(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}ZH(JU,qU,QH($H,{brighter(e){return e=e==null?tU:tU**+e,new JU(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?eU:eU**+e,new JU(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=isNaN(this.h)?0:(this.h+120)*IU,t=+this.l,n=isNaN(this.s)?0:this.s*t*(1-t),r=Math.cos(e),i=Math.sin(e);return new SU(255*(t+n*(RU*r+zU*i)),255*(t+n*(BU*r+VU*i)),255*(t+HU*r*n),this.opacity)}}));function YU(e,t,n,r,i){var a=e*e,o=a*e;return((1-3*e+3*a-o)*t+(4-6*a+3*o)*n+(1+3*e+3*a-3*o)*r+o*i)/6}function XU(e){var t=e.length-1;return function(n){var r=n<=0?n=0:n>=1?(n=1,t-1):Math.floor(n*t),i=e[r],a=e[r+1],o=r>0?e[r-1]:2*i-a,s=r<t-1?e[r+2]:2*a-i;return YU((n-r/t)*t,o,i,a,s)}}var ZU=e=>()=>e;function QU(e,t){return function(n){return e+n*t}}function $U(e,t,n){return e**=+n,t=t**+n-e,n=1/n,function(r){return(e+r*t)**+n}}function eW(e,t){var n=t-e;return n?QU(e,n>180||n<-180?n-360*Math.round(n/360):n):ZU(isNaN(e)?t:e)}function tW(e){return(e=+e)==1?nW:function(t,n){return n-t?$U(t,n,e):ZU(isNaN(t)?n:t)}}function nW(e,t){var n=t-e;return n?QU(e,n):ZU(isNaN(e)?t:e)}var rW=(function e(t){var n=tW(t);function r(e,t){var r=n((e=xU(e)).r,(t=xU(t)).r),i=n(e.g,t.g),a=n(e.b,t.b),o=nW(e.opacity,t.opacity);return function(t){return e.r=r(t),e.g=i(t),e.b=a(t),e.opacity=o(t),e+``}}return r.gamma=e,r})(1);function iW(e){return function(t){var n=t.length,r=Array(n),i=Array(n),a=Array(n),o,s;for(o=0;o<n;++o)s=xU(t[o]),r[o]=s.r||0,i[o]=s.g||0,a[o]=s.b||0;return r=e(r),i=e(i),a=e(a),s.opacity=1,function(e){return s.r=r(e),s.g=i(e),s.b=a(e),s+``}}}var aW=iW(XU);function oW(e,t){t||=[];var n=e?Math.min(t.length,e.length):0,r=t.slice(),i;return function(a){for(i=0;i<n;++i)r[i]=e[i]*(1-a)+t[i]*a;return r}}function sW(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function cW(e,t){var n=t?t.length:0,r=e?Math.min(n,e.length):0,i=Array(r),a=Array(n),o;for(o=0;o<r;++o)i[o]=_W(e[o],t[o]);for(;o<n;++o)a[o]=t[o];return function(e){for(o=0;o<r;++o)a[o]=i[o](e);return a}}function lW(e,t){var n=new Date;return e=+e,t=+t,function(r){return n.setTime(e*(1-r)+t*r),n}}function uW(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}function dW(e,t){var n={},r={},i;for(i in(typeof e!=`object`||!e)&&(e={}),(typeof t!=`object`||!t)&&(t={}),t)i in e?n[i]=_W(e[i],t[i]):r[i]=t[i];return function(e){for(i in n)r[i]=n[i](e);return r}}var fW=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,pW=new RegExp(fW.source,`g`);function mW(e){return function(){return e}}function hW(e){return function(t){return e(t)+``}}function gW(e,t){var n=fW.lastIndex=pW.lastIndex=0,r,i,a,o=-1,s=[],c=[];for(e+=``,t+=``;(r=fW.exec(e))&&(i=pW.exec(t));)(a=i.index)>n&&(a=t.slice(n,a),s[o]?s[o]+=a:s[++o]=a),(r=r[0])===(i=i[0])?s[o]?s[o]+=i:s[++o]=i:(s[++o]=null,c.push({i:o,x:uW(r,i)})),n=pW.lastIndex;return n<t.length&&(a=t.slice(n),s[o]?s[o]+=a:s[++o]=a),s.length<2?c[0]?hW(c[0].x):mW(t):(t=c.length,function(e){for(var n=0,r;n<t;++n)s[(r=c[n]).i]=r.x(e);return s.join(``)})}function _W(e,t){var n=typeof t,r;return t==null||n===`boolean`?ZU(t):(n===`number`?uW:n===`string`?(r=_U(t))?(t=r,rW):gW:t instanceof _U?rW:t instanceof Date?lW:sW(t)?oW:Array.isArray(t)?cW:typeof t.valueOf!=`function`&&typeof t.toString!=`function`||isNaN(t)?dW:uW)(e,t)}function vW(e,t){return e=+e,t=+t,function(n){return Math.round(e*(1-n)+t*n)}}var yW=180/Math.PI,bW={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function xW(e,t,n,r,i,a){var o,s,c;return(o=Math.sqrt(e*e+t*t))&&(e/=o,t/=o),(c=e*n+t*r)&&(n-=e*c,r-=t*c),(s=Math.sqrt(n*n+r*r))&&(n/=s,r/=s,c/=s),e*r<t*n&&(e=-e,t=-t,c=-c,o=-o),{translateX:i,translateY:a,rotate:Math.atan2(t,e)*yW,skewX:Math.atan(c)*yW,scaleX:o,scaleY:s}}var SW;function CW(e){let t=new(typeof DOMMatrix==`function`?DOMMatrix:WebKitCSSMatrix)(e+``);return t.isIdentity?bW:xW(t.a,t.b,t.c,t.d,t.e,t.f)}function wW(e){return e==null||(SW||=document.createElementNS(`http://www.w3.org/2000/svg`,`g`),SW.setAttribute(`transform`,e),!(e=SW.transform.baseVal.consolidate()))?bW:(e=e.matrix,xW(e.a,e.b,e.c,e.d,e.e,e.f))}function TW(e,t,n,r){function i(e){return e.length?e.pop()+` `:``}function a(e,r,i,a,o,s){if(e!==i||r!==a){var c=o.push(`translate(`,null,t,null,n);s.push({i:c-4,x:uW(e,i)},{i:c-2,x:uW(r,a)})}else(i||a)&&o.push(`translate(`+i+t+a+n)}function o(e,t,n,a){e===t?t&&n.push(i(n)+`rotate(`+t+r):(e-t>180?t+=360:t-e>180&&(e+=360),a.push({i:n.push(i(n)+`rotate(`,null,r)-2,x:uW(e,t)}))}function s(e,t,n,a){e===t?t&&n.push(i(n)+`skewX(`+t+r):a.push({i:n.push(i(n)+`skewX(`,null,r)-2,x:uW(e,t)})}function c(e,t,n,r,a,o){if(e!==n||t!==r){var s=a.push(i(a)+`scale(`,null,`,`,null,`)`);o.push({i:s-4,x:uW(e,n)},{i:s-2,x:uW(t,r)})}else(n!==1||r!==1)&&a.push(i(a)+`scale(`+n+`,`+r+`)`)}return function(t,n){var r=[],i=[];return t=e(t),n=e(n),a(t.translateX,t.translateY,n.translateX,n.translateY,r,i),o(t.rotate,n.rotate,r,i),s(t.skewX,n.skewX,r,i),c(t.scaleX,t.scaleY,n.scaleX,n.scaleY,r,i),t=n=null,function(e){for(var t=-1,n=i.length,a;++t<n;)r[(a=i[t]).i]=a.x(e);return r.join(``)}}}var EW=TW(CW,`px, `,`px)`,`deg)`),DW=TW(wW,`, `,`)`,`)`);function OW(e){return(function t(n){n=+n;function r(t,r){var i=e((t=qU(t)).h,(r=qU(r)).h),a=nW(t.s,r.s),o=nW(t.l,r.l),s=nW(t.opacity,r.opacity);return function(e){return t.h=i(e),t.s=a(e),t.l=o(e**+n),t.opacity=s(e),t+``}}return r.gamma=t,r})(1)}OW(eW);var kW=OW(nW),AW=o(((e,t)=>{function n(e){return this.__data__.set(e,`__lodash_hash_undefined__`),this}t.exports=n})),jW=o(((e,t)=>{function n(e){return this.__data__.has(e)}t.exports=n})),MW=o(((e,t)=>{var n=RB(),r=AW(),i=jW();function a(e){var t=-1,r=e==null?0:e.length;for(this.__data__=new n;++t<r;)this.add(e[t])}a.prototype.add=a.prototype.push=r,a.prototype.has=i,t.exports=a})),NW=o(((e,t)=>{function n(e,t,n,r){for(var i=e.length,a=n+(r?1:-1);r?a--:++a<i;)if(t(e[a],a,e))return a;return-1}t.exports=n})),PW=o(((e,t)=>{function n(e){return e!==e}t.exports=n})),FW=o(((e,t)=>{function n(e,t,n){for(var r=n-1,i=e.length;++r<i;)if(e[r]===t)return r;return-1}t.exports=n})),IW=o(((e,t)=>{var n=NW(),r=PW(),i=FW();function a(e,t,a){return t===t?i(e,t,a):n(e,r,a)}t.exports=a})),LW=o(((e,t)=>{var n=IW();function r(e,t){return!!(e!=null&&e.length)&&n(e,t,0)>-1}t.exports=r})),RW=o(((e,t)=>{function n(e,t,n){for(var r=-1,i=e==null?0:e.length;++r<i;)if(n(t,e[r]))return!0;return!1}t.exports=n})),zW=o(((e,t)=>{function n(e,t){return e.has(t)}t.exports=n})),BW=o(((e,t)=>{var n=MW(),r=LW(),i=RW(),a=WV(),o=pV(),s=zW(),c=200;function l(e,t,l,u){var d=-1,f=r,p=!0,m=e.length,h=[],g=t.length;if(!m)return h;l&&(t=a(t,o(l))),u?(f=i,p=!1):t.length>=c&&(f=s,p=!1,t=new n(t));outer:for(;++d<m;){var _=e[d],v=l==null?_:l(_);if(_=u||_!==0?_:0,p&&v===v){for(var y=g;y--;)if(t[y]===v)continue outer;h.push(_)}else f(t,v,u)||h.push(_)}return h}t.exports=l})),VW=o(((e,t)=>{var n=BW(),r=FV(),i=cV();t.exports=r(function(e,t){return i(e)?n(e,t):[]})}));function HW(e){return function(){return e}}var UW=Math.abs,WW=Math.atan2,GW=Math.cos,KW=Math.max,qW=Math.min,JW=Math.sin,YW=Math.sqrt,XW=Math.PI,ZW=XW/2,QW=2*XW;function $W(e){return e>1?0:e<-1?XW:Math.acos(e)}function eG(e){return e>=1?ZW:e<=-1?-ZW:Math.asin(e)}var tG=Math.PI,nG=2*tG,rG=1e-6,iG=nG-rG;function aG(e){this._+=e[0];for(let t=1,n=e.length;t<n;++t)this._+=arguments[t]+e[t]}function oG(e){let t=Math.floor(e);if(!(t>=0))throw Error(`invalid digits: ${e}`);if(t>15)return aG;let n=10**t;return function(e){this._+=e[0];for(let t=1,r=e.length;t<r;++t)this._+=Math.round(arguments[t]*n)/n+e[t]}}var sG=class{constructor(e){this._x0=this._y0=this._x1=this._y1=null,this._=``,this._append=e==null?aG:oG(e)}moveTo(e,t){this._append`M${this._x0=this._x1=+e},${this._y0=this._y1=+t}`}closePath(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(e,t){this._append`L${this._x1=+e},${this._y1=+t}`}quadraticCurveTo(e,t,n,r){this._append`Q${+e},${+t},${this._x1=+n},${this._y1=+r}`}bezierCurveTo(e,t,n,r,i,a){this._append`C${+e},${+t},${+n},${+r},${this._x1=+i},${this._y1=+a}`}arcTo(e,t,n,r,i){if(e=+e,t=+t,n=+n,r=+r,i=+i,i<0)throw Error(`negative radius: ${i}`);let a=this._x1,o=this._y1,s=n-e,c=r-t,l=a-e,u=o-t,d=l*l+u*u;if(this._x1===null)this._append`M${this._x1=e},${this._y1=t}`;else if(d>rG)if(!(Math.abs(u*s-c*l)>rG)||!i)this._append`L${this._x1=e},${this._y1=t}`;else{let f=n-a,p=r-o,m=s*s+c*c,h=f*f+p*p,g=Math.sqrt(m),_=Math.sqrt(d),v=i*Math.tan((tG-Math.acos((m+d-h)/(2*g*_)))/2),y=v/_,b=v/g;Math.abs(y-1)>rG&&this._append`L${e+y*l},${t+y*u}`,this._append`A${i},${i},0,0,${+(u*f>l*p)},${this._x1=e+b*s},${this._y1=t+b*c}`}}arc(e,t,n,r,i,a){if(e=+e,t=+t,n=+n,a=!!a,n<0)throw Error(`negative radius: ${n}`);let o=n*Math.cos(r),s=n*Math.sin(r),c=e+o,l=t+s,u=1^a,d=a?r-i:i-r;this._x1===null?this._append`M${c},${l}`:(Math.abs(this._x1-c)>rG||Math.abs(this._y1-l)>rG)&&this._append`L${c},${l}`,n&&(d<0&&(d=d%nG+nG),d>iG?this._append`A${n},${n},0,1,${u},${e-o},${t-s}A${n},${n},0,1,${u},${this._x1=c},${this._y1=l}`:d>rG&&this._append`A${n},${n},0,${+(d>=tG)},${u},${this._x1=e+n*Math.cos(i)},${this._y1=t+n*Math.sin(i)}`)}rect(e,t,n,r){this._append`M${this._x0=this._x1=+e},${this._y0=this._y1=+t}h${n=+n}v${+r}h${-n}Z`}toString(){return this._}};sG.prototype;function cG(e){let t=3;return e.digits=function(n){if(!arguments.length)return t;if(n==null)t=null;else{let e=Math.floor(n);if(!(e>=0))throw RangeError(`invalid digits: ${n}`);t=e}return e},()=>new sG(t)}function lG(e){return e.innerRadius}function uG(e){return e.outerRadius}function dG(e){return e.startAngle}function fG(e){return e.endAngle}function pG(e){return e&&e.padAngle}function mG(e,t,n,r,i,a,o,s){var c=n-e,l=r-t,u=o-i,d=s-a,f=d*c-u*l;if(!(f*f<1e-12))return f=(u*(t-a)-d*(e-i))/f,[e+f*c,t+f*l]}function hG(e,t,n,r,i,a,o){var s=e-n,c=t-r,l=(o?a:-a)/YW(s*s+c*c),u=l*c,d=-l*s,f=e+u,p=t+d,m=n+u,h=r+d,g=(f+m)/2,_=(p+h)/2,v=m-f,y=h-p,b=v*v+y*y,x=i-a,S=f*h-m*p,C=(y<0?-1:1)*YW(KW(0,x*x*b-S*S)),w=(S*y-v*C)/b,T=(-S*v-y*C)/b,E=(S*y+v*C)/b,D=(-S*v+y*C)/b,O=w-g,k=T-_,A=E-g,j=D-_;return O*O+k*k>A*A+j*j&&(w=E,T=D),{cx:w,cy:T,x01:-u,y01:-d,x11:w*(i/x-1),y11:T*(i/x-1)}}function gG(){var e=lG,t=uG,n=HW(0),r=null,i=dG,a=fG,o=pG,s=null,c=cG(l);function l(){var l,u,d=+e.apply(this,arguments),f=+t.apply(this,arguments),p=i.apply(this,arguments)-ZW,m=a.apply(this,arguments)-ZW,h=UW(m-p),g=m>p;if(s||=l=c(),f<d&&(u=f,f=d,d=u),!(f>1e-12))s.moveTo(0,0);else if(h>QW-1e-12)s.moveTo(f*GW(p),f*JW(p)),s.arc(0,0,f,p,m,!g),d>1e-12&&(s.moveTo(d*GW(m),d*JW(m)),s.arc(0,0,d,m,p,g));else{var _=p,v=m,y=p,b=m,x=h,S=h,C=o.apply(this,arguments)/2,w=C>1e-12&&(r?+r.apply(this,arguments):YW(d*d+f*f)),T=qW(UW(f-d)/2,+n.apply(this,arguments)),E=T,D=T,O,k;if(w>1e-12){var A=eG(w/d*JW(C)),j=eG(w/f*JW(C));(x-=A*2)>1e-12?(A*=g?1:-1,y+=A,b-=A):(x=0,y=b=(p+m)/2),(S-=j*2)>1e-12?(j*=g?1:-1,_+=j,v-=j):(S=0,_=v=(p+m)/2)}var M=f*GW(_),N=f*JW(_),P=d*GW(b),F=d*JW(b);if(T>1e-12){var I=f*GW(v),L=f*JW(v),R=d*GW(y),z=d*JW(y),B;if(h<XW)if(B=mG(M,N,R,z,I,L,P,F)){var V=M-B[0],H=N-B[1],ee=I-B[0],te=L-B[1],U=1/JW($W((V*ee+H*te)/(YW(V*V+H*H)*YW(ee*ee+te*te)))/2),ne=YW(B[0]*B[0]+B[1]*B[1]);E=qW(T,(d-ne)/(U-1)),D=qW(T,(f-ne)/(U+1))}else E=D=0}S>1e-12?D>1e-12?(O=hG(R,z,M,N,f,D,g),k=hG(I,L,P,F,f,D,g),s.moveTo(O.cx+O.x01,O.cy+O.y01),D<T?s.arc(O.cx,O.cy,D,WW(O.y01,O.x01),WW(k.y01,k.x01),!g):(s.arc(O.cx,O.cy,D,WW(O.y01,O.x01),WW(O.y11,O.x11),!g),s.arc(0,0,f,WW(O.cy+O.y11,O.cx+O.x11),WW(k.cy+k.y11,k.cx+k.x11),!g),s.arc(k.cx,k.cy,D,WW(k.y11,k.x11),WW(k.y01,k.x01),!g))):(s.moveTo(M,N),s.arc(0,0,f,_,v,!g)):s.moveTo(M,N),!(d>1e-12)||!(x>1e-12)?s.lineTo(P,F):E>1e-12?(O=hG(P,F,I,L,d,-E,g),k=hG(M,N,R,z,d,-E,g),s.lineTo(O.cx+O.x01,O.cy+O.y01),E<T?s.arc(O.cx,O.cy,E,WW(O.y01,O.x01),WW(k.y01,k.x01),!g):(s.arc(O.cx,O.cy,E,WW(O.y01,O.x01),WW(O.y11,O.x11),!g),s.arc(0,0,d,WW(O.cy+O.y11,O.cx+O.x11),WW(k.cy+k.y11,k.cx+k.x11),g),s.arc(k.cx,k.cy,E,WW(k.y11,k.x11),WW(k.y01,k.x01),!g))):s.arc(0,0,d,b,y,g)}if(s.closePath(),l)return s=null,l+``||null}return l.centroid=function(){var n=(+e.apply(this,arguments)+ +t.apply(this,arguments))/2,r=(+i.apply(this,arguments)+ +a.apply(this,arguments))/2-XW/2;return[GW(r)*n,JW(r)*n]},l.innerRadius=function(t){return arguments.length?(e=typeof t==`function`?t:HW(+t),l):e},l.outerRadius=function(e){return arguments.length?(t=typeof e==`function`?e:HW(+e),l):t},l.cornerRadius=function(e){return arguments.length?(n=typeof e==`function`?e:HW(+e),l):n},l.padRadius=function(e){return arguments.length?(r=e==null?null:typeof e==`function`?e:HW(+e),l):r},l.startAngle=function(e){return arguments.length?(i=typeof e==`function`?e:HW(+e),l):i},l.endAngle=function(e){return arguments.length?(a=typeof e==`function`?e:HW(+e),l):a},l.padAngle=function(e){return arguments.length?(o=typeof e==`function`?e:HW(+e),l):o},l.context=function(e){return arguments.length?(s=e??null,l):s},l}Array.prototype.slice;function _G(e){return typeof e==`object`&&`length`in e?e:Array.from(e)}function vG(e){this._context=e}vG.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._context.lineTo(e,t)}}};function yG(e){return new vG(e)}function bG(e){return e[0]}function xG(e){return e[1]}function SG(e,t){var n=HW(!0),r=null,i=yG,a=null,o=cG(s);e=typeof e==`function`?e:e===void 0?bG:HW(e),t=typeof t==`function`?t:t===void 0?xG:HW(t);function s(s){var c,l=(s=_G(s)).length,u,d=!1,f;for(r??(a=i(f=o())),c=0;c<=l;++c)!(c<l&&n(u=s[c],c,s))===d&&((d=!d)?a.lineStart():a.lineEnd()),d&&a.point(+e(u,c,s),+t(u,c,s));if(f)return a=null,f+``||null}return s.x=function(t){return arguments.length?(e=typeof t==`function`?t:HW(+t),s):e},s.y=function(e){return arguments.length?(t=typeof e==`function`?e:HW(+e),s):t},s.defined=function(e){return arguments.length?(n=typeof e==`function`?e:HW(!!e),s):n},s.curve=function(e){return arguments.length?(i=e,r!=null&&(a=i(r)),s):i},s.context=function(e){return arguments.length?(e==null?r=a=null:a=i(r=e),s):r},s}function CG(e,t){return t<e?-1:t>e?1:t>=e?0:NaN}function wG(e){return e}function TG(){var e=wG,t=CG,n=null,r=HW(0),i=HW(QW),a=HW(0);function o(o){var s,c=(o=_G(o)).length,l,u,d=0,f=Array(c),p=Array(c),m=+r.apply(this,arguments),h=Math.min(QW,Math.max(-QW,i.apply(this,arguments)-m)),g,_=Math.min(Math.abs(h)/c,a.apply(this,arguments)),v=_*(h<0?-1:1),y;for(s=0;s<c;++s)(y=p[f[s]=s]=+e(o[s],s,o))>0&&(d+=y);for(t==null?n!=null&&f.sort(function(e,t){return n(o[e],o[t])}):f.sort(function(e,n){return t(p[e],p[n])}),s=0,u=d?(h-c*v)/d:0;s<c;++s,m=g)l=f[s],y=p[l],g=m+(y>0?y*u:0)+v,p[l]={data:o[l],index:s,value:y,startAngle:m,endAngle:g,padAngle:_};return p}return o.value=function(t){return arguments.length?(e=typeof t==`function`?t:HW(+t),o):e},o.sortValues=function(e){return arguments.length?(t=e,n=null,o):t},o.sort=function(e){return arguments.length?(n=e,t=null,o):n},o.startAngle=function(e){return arguments.length?(r=typeof e==`function`?e:HW(+e),o):r},o.endAngle=function(e){return arguments.length?(i=typeof e==`function`?e:HW(+e),o):i},o.padAngle=function(e){return arguments.length?(a=typeof e==`function`?e:HW(+e),o):a},o}function EG(){}function DG(e,t,n){e._context.bezierCurveTo((2*e._x0+e._x1)/3,(2*e._y0+e._y1)/3,(e._x0+2*e._x1)/3,(e._y0+2*e._y1)/3,(e._x0+4*e._x1+t)/6,(e._y0+4*e._y1+n)/6)}function OG(e){this._context=e}OG.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:DG(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1)}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:DG(this,e,t)}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function kG(e){return new OG(e)}function AG(e){this._context=e}AG.prototype={areaStart:EG,areaEnd:EG,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x2,this._y2),this._context.closePath();break;case 2:this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break;case 3:this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4)}},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x2=e,this._y2=t;break;case 1:this._point=2,this._x3=e,this._y3=t;break;case 2:this._point=3,this._x4=e,this._y4=t,this._context.moveTo((this._x0+4*this._x1+e)/6,(this._y0+4*this._y1+t)/6);break;default:DG(this,e,t)}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function jG(e){return new AG(e)}function MG(e){this._context=e}MG.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var n=(this._x0+4*this._x1+e)/6,r=(this._y0+4*this._y1+t)/6;this._line?this._context.lineTo(n,r):this._context.moveTo(n,r);break;case 3:this._point=4;default:DG(this,e,t)}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function NG(e){return new MG(e)}function PG(e,t){this._basis=new OG(e),this._beta=t}PG.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var e=this._x,t=this._y,n=e.length-1;if(n>0)for(var r=e[0],i=t[0],a=e[n]-r,o=t[n]-i,s=-1,c;++s<=n;)c=s/n,this._basis.point(this._beta*e[s]+(1-this._beta)*(r+c*a),this._beta*t[s]+(1-this._beta)*(i+c*o));this._x=this._y=null,this._basis.lineEnd()},point:function(e,t){this._x.push(+e),this._y.push(+t)}};var FG=(function e(t){function n(e){return t===1?new OG(e):new PG(e,t)}return n.beta=function(t){return e(+t)},n})(.85);function IG(e,t,n){e._context.bezierCurveTo(e._x1+e._k*(e._x2-e._x0),e._y1+e._k*(e._y2-e._y0),e._x2+e._k*(e._x1-t),e._y2+e._k*(e._y1-n),e._x2,e._y2)}function LG(e,t){this._context=e,this._k=(1-t)/6}LG.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:IG(this,this._x1,this._y1)}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2,this._x1=e,this._y1=t;break;case 2:this._point=3;default:IG(this,e,t)}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};var RG=(function e(t){function n(e){return new LG(e,t)}return n.tension=function(t){return e(+t)},n})(0);function zG(e,t){this._context=e,this._k=(1-t)/6}zG.prototype={areaStart:EG,areaEnd:EG,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x3,this._y3),this._context.closePath();break;case 2:this._context.lineTo(this._x3,this._y3),this._context.closePath();break;case 3:this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5)}},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x3=e,this._y3=t;break;case 1:this._point=2,this._context.moveTo(this._x4=e,this._y4=t);break;case 2:this._point=3,this._x5=e,this._y5=t;break;default:IG(this,e,t)}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};var BG=(function e(t){function n(e){return new zG(e,t)}return n.tension=function(t){return e(+t)},n})(0);function VG(e,t){this._context=e,this._k=(1-t)/6}VG.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:IG(this,e,t)}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};var HG=(function e(t){function n(e){return new VG(e,t)}return n.tension=function(t){return e(+t)},n})(0);function UG(e,t,n){var r=e._x1,i=e._y1,a=e._x2,o=e._y2;if(e._l01_a>1e-12){var s=2*e._l01_2a+3*e._l01_a*e._l12_a+e._l12_2a,c=3*e._l01_a*(e._l01_a+e._l12_a);r=(r*s-e._x0*e._l12_2a+e._x2*e._l01_2a)/c,i=(i*s-e._y0*e._l12_2a+e._y2*e._l01_2a)/c}if(e._l23_a>1e-12){var l=2*e._l23_2a+3*e._l23_a*e._l12_a+e._l12_2a,u=3*e._l23_a*(e._l23_a+e._l12_a);a=(a*l+e._x1*e._l23_2a-t*e._l12_2a)/u,o=(o*l+e._y1*e._l23_2a-n*e._l12_2a)/u}e._context.bezierCurveTo(r,i,a,o,e._x2,e._y2)}function WG(e,t){this._context=e,this._alpha=t}WG.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:this.point(this._x2,this._y2)}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){if(e=+e,t=+t,this._point){var n=this._x2-e,r=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=(n*n+r*r)**+this._alpha)}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3;default:UG(this,e,t)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};var GG=(function e(t){function n(e){return t?new WG(e,t):new LG(e,0)}return n.alpha=function(t){return e(+t)},n})(.5);function KG(e,t){this._context=e,this._alpha=t}KG.prototype={areaStart:EG,areaEnd:EG,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x3,this._y3),this._context.closePath();break;case 2:this._context.lineTo(this._x3,this._y3),this._context.closePath();break;case 3:this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5)}},point:function(e,t){if(e=+e,t=+t,this._point){var n=this._x2-e,r=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=(n*n+r*r)**+this._alpha)}switch(this._point){case 0:this._point=1,this._x3=e,this._y3=t;break;case 1:this._point=2,this._context.moveTo(this._x4=e,this._y4=t);break;case 2:this._point=3,this._x5=e,this._y5=t;break;default:UG(this,e,t)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};var qG=(function e(t){function n(e){return t?new KG(e,t):new zG(e,0)}return n.alpha=function(t){return e(+t)},n})(.5);function JG(e,t){this._context=e,this._alpha=t}JG.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){if(e=+e,t=+t,this._point){var n=this._x2-e,r=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=(n*n+r*r)**+this._alpha)}switch(this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:UG(this,e,t)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};var YG=(function e(t){function n(e){return t?new JG(e,t):new VG(e,0)}return n.alpha=function(t){return e(+t)},n})(.5);function XG(e){this._context=e}XG.prototype={areaStart:EG,areaEnd:EG,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(e,t){e=+e,t=+t,this._point?this._context.lineTo(e,t):(this._point=1,this._context.moveTo(e,t))}};function ZG(e){return new XG(e)}function QG(e){return e<0?-1:1}function $G(e,t,n){var r=e._x1-e._x0,i=t-e._x1,a=(e._y1-e._y0)/(r||i<0&&-0),o=(n-e._y1)/(i||r<0&&-0),s=(a*i+o*r)/(r+i);return(QG(a)+QG(o))*Math.min(Math.abs(a),Math.abs(o),.5*Math.abs(s))||0}function eK(e,t){var n=e._x1-e._x0;return n?(3*(e._y1-e._y0)/n-t)/2:t}function tK(e,t,n){var r=e._x0,i=e._y0,a=e._x1,o=e._y1,s=(a-r)/3;e._context.bezierCurveTo(r+s,i+s*t,a-s,o-s*n,a,o)}function nK(e){this._context=e}nK.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:tK(this,this._t0,eK(this,this._t0))}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){var n=NaN;if(e=+e,t=+t,e!==this._x1||t!==this._y1){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,tK(this,eK(this,n=$G(this,e,t)),n);break;default:tK(this,this._t0,n=$G(this,e,t))}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=n}}};function rK(e){this._context=new iK(e)}(rK.prototype=Object.create(nK.prototype)).point=function(e,t){nK.prototype.point.call(this,t,e)};function iK(e){this._context=e}iK.prototype={moveTo:function(e,t){this._context.moveTo(t,e)},closePath:function(){this._context.closePath()},lineTo:function(e,t){this._context.lineTo(t,e)},bezierCurveTo:function(e,t,n,r,i,a){this._context.bezierCurveTo(t,e,r,n,a,i)}};function aK(e){return new nK(e)}function oK(e){return new rK(e)}function sK(e){this._context=e}sK.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var e=this._x,t=this._y,n=e.length;if(n)if(this._line?this._context.lineTo(e[0],t[0]):this._context.moveTo(e[0],t[0]),n===2)this._context.lineTo(e[1],t[1]);else for(var r=cK(e),i=cK(t),a=0,o=1;o<n;++a,++o)this._context.bezierCurveTo(r[0][a],i[0][a],r[1][a],i[1][a],e[o],t[o]);(this._line||this._line!==0&&n===1)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(e,t){this._x.push(+e),this._y.push(+t)}};function cK(e){var t,n=e.length-1,r,i=Array(n),a=Array(n),o=Array(n);for(i[0]=0,a[0]=2,o[0]=e[0]+2*e[1],t=1;t<n-1;++t)i[t]=1,a[t]=4,o[t]=4*e[t]+2*e[t+1];for(i[n-1]=2,a[n-1]=7,o[n-1]=8*e[n-1]+e[n],t=1;t<n;++t)r=i[t]/a[t-1],a[t]-=r,o[t]-=r*o[t-1];for(i[n-1]=o[n-1]/a[n-1],t=n-2;t>=0;--t)i[t]=(o[t]-i[t+1])/a[t];for(a[n-1]=(e[n]+i[n-1])/2,t=0;t<n-1;++t)a[t]=2*e[t+1]-i[t+1];return[i,a]}function lK(e){return new sK(e)}function uK(e,t){this._context=e,this._t=t}uK.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){0<this._t&&this._t<1&&this._point===2&&this._context.lineTo(this._x,this._y),(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line>=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:if(this._t<=0)this._context.lineTo(this._x,t),this._context.lineTo(e,t);else{var n=this._x*(1-this._t)+e*this._t;this._context.lineTo(n,this._y),this._context.lineTo(n,t)}}this._x=e,this._y=t}};function dK(e){return new uK(e,.5)}function fK(e){return new uK(e,0)}function pK(e){return new uK(e,1)}function mK(e,t){if((o=e.length)>1)for(var n=1,r,i,a=e[t[0]],o,s=a.length;n<o;++n)for(i=a,a=e[t[n]],r=0;r<s;++r)a[r][1]+=a[r][0]=isNaN(i[r][1])?i[r][0]:i[r][1]}function hK(e){for(var t=e.length,n=Array(t);--t>=0;)n[t]=t;return n}function gK(e,t){return e[t]}function _K(e){let t=[];return t.key=e,t}function vK(){var e=HW([]),t=hK,n=mK,r=gK;function i(i){var a=Array.from(e.apply(this,arguments),_K),o,s=a.length,c=-1,l;for(let e of i)for(o=0,++c;o<s;++o)(a[o][c]=[0,+r(e,a[o].key,c,i)]).data=e;for(o=0,l=_G(t(a));o<s;++o)a[l[o]].index=o;return n(a,l),a}return i.keys=function(t){return arguments.length?(e=typeof t==`function`?t:HW(Array.from(t)),i):e},i.value=function(e){return arguments.length?(r=typeof e==`function`?e:HW(+e),i):r},i.order=function(e){return arguments.length?(t=e==null?hK:typeof e==`function`?e:HW(Array.from(e)),i):t},i.offset=function(e){return arguments.length?(n=e??mK,i):n},i}function yK(e,t){if((c=e.length)>0)for(var n,r=0,i,a,o,s,c,l=e[t[0]].length;r<l;++r)for(o=s=0,n=0;n<c;++n)(a=(i=e[t[n]][r])[1]-i[0])>0?(i[0]=o,i[1]=o+=a):a<0?(i[1]=s,i[0]=s+=a):(i[0]=0,i[1]=a)}function bK(e,t){return e==null||t==null?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function xK(e,t){return e==null||t==null?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function SK(e){let t,n,r;e.length===2?(t=e===bK||e===xK?e:CK,n=e,r=e):(t=bK,n=(t,n)=>bK(e(t),n),r=(t,n)=>e(t)-n);function i(e,r,i=0,a=e.length){if(i<a){if(t(r,r)!==0)return a;do{let t=i+a>>>1;n(e[t],r)<0?i=t+1:a=t}while(i<a)}return i}function a(e,r,i=0,a=e.length){if(i<a){if(t(r,r)!==0)return a;do{let t=i+a>>>1;n(e[t],r)<=0?i=t+1:a=t}while(i<a)}return i}function o(e,t,n=0,a=e.length){let o=i(e,t,n,a-1);return o>n&&r(e[o-1],t)>-r(e[o],t)?o-1:o}return{left:i,center:o,right:a}}function CK(){return 0}function wK(e){return e===null?NaN:+e}var TK=SK(bK),EK=TK.right;TK.left,SK(wK).center;var DK=class extends Map{constructor(e,t=jK){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:t}}),e!=null)for(let[t,n]of e)this.set(t,n)}get(e){return super.get(OK(this,e))}has(e){return super.has(OK(this,e))}set(e,t){return super.set(kK(this,e),t)}delete(e){return super.delete(AK(this,e))}};function OK({_intern:e,_key:t},n){let r=t(n);return e.has(r)?e.get(r):n}function kK({_intern:e,_key:t},n){let r=t(n);return e.has(r)?e.get(r):(e.set(r,n),n)}function AK({_intern:e,_key:t},n){let r=t(n);return e.has(r)&&(n=e.get(r),e.delete(r)),n}function jK(e){return typeof e==`object`&&e?e.valueOf():e}var MK=Math.sqrt(50),NK=Math.sqrt(10),PK=Math.sqrt(2);function FK(e,t,n){let r=(t-e)/Math.max(0,n),i=Math.floor(Math.log10(r)),a=r/10**i,o=a>=MK?10:a>=NK?5:a>=PK?2:1,s,c,l;return i<0?(l=10**-i/o,s=Math.round(e*l),c=Math.round(t*l),s/l<e&&++s,c/l>t&&--c,l=-l):(l=10**i*o,s=Math.round(e/l),c=Math.round(t/l),s*l<e&&++s,c*l>t&&--c),c<s&&.5<=n&&n<2?FK(e,t,n*2):[s,c,l]}function IK(e,t,n){if(t=+t,e=+e,n=+n,!(n>0))return[];if(e===t)return[e];let r=t<e,[i,a,o]=r?FK(t,e,n):FK(e,t,n);if(!(a>=i))return[];let s=a-i+1,c=Array(s);if(r)if(o<0)for(let e=0;e<s;++e)c[e]=(a-e)/-o;else for(let e=0;e<s;++e)c[e]=(a-e)*o;else if(o<0)for(let e=0;e<s;++e)c[e]=(i+e)/-o;else for(let e=0;e<s;++e)c[e]=(i+e)*o;return c}function LK(e,t,n){return t=+t,e=+e,n=+n,FK(e,t,n)[2]}function RK(e,t,n){t=+t,e=+e,n=+n;let r=t<e,i=r?LK(t,e,n):LK(e,t,n);return(r?-1:1)*(i<0?1/-i:i)}function zK(e,t,n){e=+e,t=+t,n=(i=arguments.length)<2?(t=e,e=0,1):i<3?1:+n;for(var r=-1,i=Math.max(0,Math.ceil((t-e)/n))|0,a=Array(i);++r<i;)a[r]=e+r*n;return a}function BK(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e)}return this}var VK=Symbol(`implicit`);function HK(){var e=new DK,t=[],n=[],r=VK;function i(i){let a=e.get(i);if(a===void 0){if(r!==VK)return r;e.set(i,a=t.push(i)-1)}return n[a%n.length]}return i.domain=function(n){if(!arguments.length)return t.slice();t=[],e=new DK;for(let r of n)e.has(r)||e.set(r,t.push(r)-1);return i},i.range=function(e){return arguments.length?(n=Array.from(e),i):n.slice()},i.unknown=function(e){return arguments.length?(r=e,i):r},i.copy=function(){return HK(t,n).unknown(r)},BK.apply(i,arguments),i}function UK(){var e=HK().unknown(void 0),t=e.domain,n=e.range,r=0,i=1,a,o,s=!1,c=0,l=0,u=.5;delete e.unknown;function d(){var e=t().length,d=i<r,f=d?i:r,p=d?r:i;a=(p-f)/Math.max(1,e-c+l*2),s&&(a=Math.floor(a)),f+=(p-f-a*(e-c))*u,o=a*(1-c),s&&(f=Math.round(f),o=Math.round(o));var m=zK(e).map(function(e){return f+a*e});return n(d?m.reverse():m)}return e.domain=function(e){return arguments.length?(t(e),d()):t()},e.range=function(e){return arguments.length?([r,i]=e,r=+r,i=+i,d()):[r,i]},e.rangeRound=function(e){return[r,i]=e,r=+r,i=+i,s=!0,d()},e.bandwidth=function(){return o},e.step=function(){return a},e.round=function(e){return arguments.length?(s=!!e,d()):s},e.padding=function(e){return arguments.length?(c=Math.min(1,l=+e),d()):c},e.paddingInner=function(e){return arguments.length?(c=Math.min(1,e),d()):c},e.paddingOuter=function(e){return arguments.length?(l=+e,d()):l},e.align=function(e){return arguments.length?(u=Math.max(0,Math.min(1,e)),d()):u},e.copy=function(){return UK(t(),[r,i]).round(s).paddingInner(c).paddingOuter(l).align(u)},BK.apply(d(),arguments)}function WK(e){var t=e.copy;return e.padding=e.paddingOuter,delete e.paddingInner,delete e.paddingOuter,e.copy=function(){return WK(t())},e}function GK(){return WK(UK.apply(null,arguments).paddingInner(1))}function KK(e){return function(){return e}}function qK(e){return+e}var JK=[0,1];function YK(e){return e}function XK(e,t){return(t-=e=+e)?function(n){return(n-e)/t}:KK(isNaN(t)?NaN:.5)}function ZK(e,t){var n;return e>t&&(n=e,e=t,t=n),function(n){return Math.max(e,Math.min(t,n))}}function QK(e,t,n){var r=e[0],i=e[1],a=t[0],o=t[1];return i<r?(r=XK(i,r),a=n(o,a)):(r=XK(r,i),a=n(a,o)),function(e){return a(r(e))}}function $K(e,t,n){var r=Math.min(e.length,t.length)-1,i=Array(r),a=Array(r),o=-1;for(e[r]<e[0]&&(e=e.slice().reverse(),t=t.slice().reverse());++o<r;)i[o]=XK(e[o],e[o+1]),a[o]=n(t[o],t[o+1]);return function(t){var n=EK(e,t,1,r)-1;return a[n](i[n](t))}}function eq(e,t){return t.domain(e.domain()).range(e.range()).interpolate(e.interpolate()).clamp(e.clamp()).unknown(e.unknown())}function tq(){var e=JK,t=JK,n=_W,r,i,a,o=YK,s,c,l;function u(){var n=Math.min(e.length,t.length);return o!==YK&&(o=ZK(e[0],e[n-1])),s=n>2?$K:QK,c=l=null,d}function d(i){return i==null||isNaN(i=+i)?a:(c||=s(e.map(r),t,n))(r(o(i)))}return d.invert=function(n){return o(i((l||=s(t,e.map(r),uW))(n)))},d.domain=function(t){return arguments.length?(e=Array.from(t,qK),u()):e.slice()},d.range=function(e){return arguments.length?(t=Array.from(e),u()):t.slice()},d.rangeRound=function(e){return t=Array.from(e),n=vW,u()},d.clamp=function(e){return arguments.length?(o=e?!0:YK,u()):o!==YK},d.interpolate=function(e){return arguments.length?(n=e,u()):n},d.unknown=function(e){return arguments.length?(a=e,d):a},function(e,t){return r=e,i=t,u()}}function nq(){return tq()(YK,YK)}function rq(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString(`en`).replace(/,/g,``):e.toString(10)}function iq(e,t){if(!isFinite(e)||e===0)return null;var n=(e=t?e.toExponential(t-1):e.toExponential()).indexOf(`e`),r=e.slice(0,n);return[r.length>1?r[0]+r.slice(2):r,+e.slice(n+1)]}function aq(e){return e=iq(Math.abs(e)),e?e[1]:NaN}function oq(e,t){return function(n,r){for(var i=n.length,a=[],o=0,s=e[0],c=0;i>0&&s>0&&(c+s+1>r&&(s=Math.max(1,r-c)),a.push(n.substring(i-=s,i+s)),!((c+=s+1)>r));)s=e[o=(o+1)%e.length];return a.reverse().join(t)}}function sq(e){return function(t){return t.replace(/[0-9]/g,function(t){return e[+t]})}}var cq=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function lq(e){if(!(t=cq.exec(e)))throw Error(`invalid format: `+e);var t;return new uq({fill:t[1],align:t[2],sign:t[3],symbol:t[4],zero:t[5],width:t[6],comma:t[7],precision:t[8]&&t[8].slice(1),trim:t[9],type:t[10]})}lq.prototype=uq.prototype;function uq(e){this.fill=e.fill===void 0?` `:e.fill+``,this.align=e.align===void 0?`>`:e.align+``,this.sign=e.sign===void 0?`-`:e.sign+``,this.symbol=e.symbol===void 0?``:e.symbol+``,this.zero=!!e.zero,this.width=e.width===void 0?void 0:+e.width,this.comma=!!e.comma,this.precision=e.precision===void 0?void 0:+e.precision,this.trim=!!e.trim,this.type=e.type===void 0?``:e.type+``}uq.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?`0`:``)+(this.width===void 0?``:Math.max(1,this.width|0))+(this.comma?`,`:``)+(this.precision===void 0?``:`.`+Math.max(0,this.precision|0))+(this.trim?`~`:``)+this.type};function dq(e){out:for(var t=e.length,n=1,r=-1,i;n<t;++n)switch(e[n]){case`.`:r=i=n;break;case`0`:r===0&&(r=n),i=n;break;default:if(!+e[n])break out;r>0&&(r=0)}return r>0?e.slice(0,r)+e.slice(i+1):e}var fq;function pq(e,t){var n=iq(e,t);if(!n)return fq=void 0,e.toPrecision(t);var r=n[0],i=n[1],a=i-(fq=Math.max(-8,Math.min(8,Math.floor(i/3)))*3)+1,o=r.length;return a===o?r:a>o?r+Array(a-o+1).join(`0`):a>0?r.slice(0,a)+`.`+r.slice(a):`0.`+Array(1-a).join(`0`)+iq(e,Math.max(0,t+a-1))[0]}function mq(e,t){var n=iq(e,t);if(!n)return e+``;var r=n[0],i=n[1];return i<0?`0.`+Array(-i).join(`0`)+r:r.length>i+1?r.slice(0,i+1)+`.`+r.slice(i+1):r+Array(i-r.length+2).join(`0`)}var hq={"%":(e,t)=>(e*100).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+``,d:rq,e:(e,t)=>e.toExponential(t),f:(e,t)=>e.toFixed(t),g:(e,t)=>e.toPrecision(t),o:e=>Math.round(e).toString(8),p:(e,t)=>mq(e*100,t),r:mq,s:pq,X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function gq(e){return e}var _q=Array.prototype.map,vq=[`y`,`z`,`a`,`f`,`p`,`n`,`µ`,`m`,``,`k`,`M`,`G`,`T`,`P`,`E`,`Z`,`Y`];function yq(e){var t=e.grouping===void 0||e.thousands===void 0?gq:oq(_q.call(e.grouping,Number),e.thousands+``),n=e.currency===void 0?``:e.currency[0]+``,r=e.currency===void 0?``:e.currency[1]+``,i=e.decimal===void 0?`.`:e.decimal+``,a=e.numerals===void 0?gq:sq(_q.call(e.numerals,String)),o=e.percent===void 0?`%`:e.percent+``,s=e.minus===void 0?`−`:e.minus+``,c=e.nan===void 0?`NaN`:e.nan+``;function l(e,l){e=lq(e);var u=e.fill,d=e.align,f=e.sign,p=e.symbol,m=e.zero,h=e.width,g=e.comma,_=e.precision,v=e.trim,y=e.type;y===`n`?(g=!0,y=`g`):hq[y]||(_===void 0&&(_=12),v=!0,y=`g`),(m||u===`0`&&d===`=`)&&(m=!0,u=`0`,d=`=`);var b=(l&&l.prefix!==void 0?l.prefix:``)+(p===`$`?n:p===`#`&&/[boxX]/.test(y)?`0`+y.toLowerCase():``),x=(p===`$`?r:/[%p]/.test(y)?o:``)+(l&&l.suffix!==void 0?l.suffix:``),S=hq[y],C=/[defgprs%]/.test(y);_=_===void 0?6:/[gprs]/.test(y)?Math.max(1,Math.min(21,_)):Math.max(0,Math.min(20,_));function w(e){var n=b,r=x,o,l,p;if(y===`c`)r=S(e)+r,e=``;else{e=+e;var w=e<0||1/e<0;if(e=isNaN(e)?c:S(Math.abs(e),_),v&&(e=dq(e)),w&&+e==0&&f!==`+`&&(w=!1),n=(w?f===`(`?f:s:f===`-`||f===`(`?``:f)+n,r=(y===`s`&&!isNaN(e)&&fq!==void 0?vq[8+fq/3]:``)+r+(w&&f===`(`?`)`:``),C){for(o=-1,l=e.length;++o<l;)if(p=e.charCodeAt(o),48>p||p>57){r=(p===46?i+e.slice(o+1):e.slice(o))+r,e=e.slice(0,o);break}}}g&&!m&&(e=t(e,1/0));var T=n.length+e.length+r.length,E=T<h?Array(h-T+1).join(u):``;switch(g&&m&&(e=t(E+e,E.length?h-r.length:1/0),E=``),d){case`<`:e=n+e+r+E;break;case`=`:e=n+E+e+r;break;case`^`:e=E.slice(0,T=E.length>>1)+n+e+r+E.slice(T);break;default:e=E+n+e+r}return a(e)}return w.toString=function(){return e+``},w}function u(e,t){var n=Math.max(-8,Math.min(8,Math.floor(aq(t)/3)))*3,r=10**-n,i=l((e=lq(e),e.type=`f`,e),{suffix:vq[8+n/3]});return function(e){return i(r*e)}}return{format:l,formatPrefix:u}}var bq,xq,Sq;Cq({thousands:`,`,grouping:[3],currency:[`$`,``]});function Cq(e){return bq=yq(e),xq=bq.format,Sq=bq.formatPrefix,bq}function wq(e){return Math.max(0,-aq(Math.abs(e)))}function Tq(e,t){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(aq(t)/3)))*3-aq(Math.abs(e)))}function Eq(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,aq(t)-aq(e))+1}function Dq(e,t,n,r){var i=RK(e,t,n),a;switch(r=lq(r??`,f`),r.type){case`s`:var o=Math.max(Math.abs(e),Math.abs(t));return r.precision==null&&!isNaN(a=Tq(i,o))&&(r.precision=a),Sq(r,o);case``:case`e`:case`g`:case`p`:case`r`:r.precision==null&&!isNaN(a=Eq(i,Math.max(Math.abs(e),Math.abs(t))))&&(r.precision=a-(r.type===`e`));break;case`f`:case`%`:r.precision==null&&!isNaN(a=wq(i))&&(r.precision=a-(r.type===`%`)*2)}return xq(r)}function Oq(e){var t=e.domain;return e.ticks=function(e){var n=t();return IK(n[0],n[n.length-1],e??10)},e.tickFormat=function(e,n){var r=t();return Dq(r[0],r[r.length-1],e??10,n)},e.nice=function(n){n??=10;var r=t(),i=0,a=r.length-1,o=r[i],s=r[a],c,l,u=10;for(s<o&&(l=o,o=s,s=l,l=i,i=a,a=l);u-->0;){if(l=LK(o,s,n),l===c)return r[i]=o,r[a]=s,t(r);if(l>0)o=Math.floor(o/l)*l,s=Math.ceil(s/l)*l;else if(l<0)o=Math.ceil(o*l)/l,s=Math.floor(s*l)/l;else break;c=l}return e},e}function kq(){var e=nq();return e.copy=function(){return eq(e,kq())},BK.apply(e,arguments),Oq(e)}function Aq(e,t){e=e.slice();var n=0,r=e.length-1,i=e[n],a=e[r],o;return a<i&&(o=n,n=r,r=o,o=i,i=a,a=o),e[n]=t.floor(i),e[r]=t.ceil(a),e}function jq(e){return Math.log(e)}function Mq(e){return Math.exp(e)}function Nq(e){return-Math.log(-e)}function Pq(e){return-Math.exp(-e)}function Fq(e){return isFinite(e)?+(`1e`+e):e<0?0:e}function Iq(e){return e===10?Fq:e===Math.E?Math.exp:t=>e**+t}function Lq(e){return e===Math.E?Math.log:e===10&&Math.log10||e===2&&Math.log2||(e=Math.log(e),t=>Math.log(t)/e)}function Rq(e){return(t,n)=>-e(-t,n)}function zq(e){let t=e(jq,Mq),n=t.domain,r=10,i,a;function o(){return i=Lq(r),a=Iq(r),n()[0]<0?(i=Rq(i),a=Rq(a),e(Nq,Pq)):e(jq,Mq),t}return t.base=function(e){return arguments.length?(r=+e,o()):r},t.domain=function(e){return arguments.length?(n(e),o()):n()},t.ticks=e=>{let t=n(),o=t[0],s=t[t.length-1],c=s<o;c&&([o,s]=[s,o]);let l=i(o),u=i(s),d,f,p=e==null?10:+e,m=[];if(!(r%1)&&u-l<p){if(l=Math.floor(l),u=Math.ceil(u),o>0){for(;l<=u;++l)for(d=1;d<r;++d)if(f=l<0?d/a(-l):d*a(l),!(f<o)){if(f>s)break;m.push(f)}}else for(;l<=u;++l)for(d=r-1;d>=1;--d)if(f=l>0?d/a(-l):d*a(l),!(f<o)){if(f>s)break;m.push(f)}m.length*2<p&&(m=IK(o,s,p))}else m=IK(l,u,Math.min(u-l,p)).map(a);return c?m.reverse():m},t.tickFormat=(e,n)=>{if(e??=10,n??=r===10?`s`:`,`,typeof n!=`function`&&(!(r%1)&&(n=lq(n)).precision==null&&(n.trim=!0),n=xq(n)),e===1/0)return n;let o=Math.max(1,r*e/t.ticks().length);return e=>{let t=e/a(Math.round(i(e)));return t*r<r-.5&&(t*=r),t<=o?n(e):``}},t.nice=()=>n(Aq(n(),{floor:e=>a(Math.floor(i(e))),ceil:e=>a(Math.ceil(i(e)))})),t}function Bq(){let e=zq(tq()).domain([1,10]);return e.copy=()=>eq(e,Bq()).base(e.base()),BK.apply(e,arguments),e}function Vq(e){return function(t){return Math.sign(t)*Math.log1p(Math.abs(t/e))}}function Hq(e){return function(t){return Math.sign(t)*Math.expm1(Math.abs(t))*e}}function Uq(e){var t=1,n=e(Vq(t),Hq(t));return n.constant=function(n){return arguments.length?e(Vq(t=+n),Hq(t)):t},Oq(n)}function Wq(){var e=Uq(tq());return e.copy=function(){return eq(e,Wq()).constant(e.constant())},BK.apply(e,arguments)}var Gq=new Date,Kq=new Date;function qq(e,t,n,r){function i(t){return e(t=arguments.length===0?new Date:new Date(+t)),t}return i.floor=t=>(e(t=new Date(+t)),t),i.ceil=n=>(e(n=new Date(n-1)),t(n,1),e(n),n),i.round=e=>{let t=i(e),n=i.ceil(e);return e-t<n-e?t:n},i.offset=(e,n)=>(t(e=new Date(+e),n==null?1:Math.floor(n)),e),i.range=(n,r,a)=>{let o=[];if(n=i.ceil(n),a=a==null?1:Math.floor(a),!(n<r)||!(a>0))return o;let s;do o.push(s=new Date(+n)),t(n,a),e(n);while(s<n&&n<r);return o},i.filter=n=>qq(t=>{if(t>=t)for(;e(t),!n(t);)t.setTime(t-1)},(e,r)=>{if(e>=e)if(r<0)for(;++r<=0;)for(;t(e,-1),!n(e););else for(;--r>=0;)for(;t(e,1),!n(e););}),n&&(i.count=(t,r)=>(Gq.setTime(+t),Kq.setTime(+r),e(Gq),e(Kq),Math.floor(n(Gq,Kq))),i.every=e=>(e=Math.floor(e),!isFinite(e)||!(e>0)?null:e>1?i.filter(r?t=>r(t)%e===0:t=>i.count(0,t)%e===0):i)),i}var Jq=qq(()=>{},(e,t)=>{e.setTime(+e+t)},(e,t)=>t-e);Jq.every=e=>(e=Math.floor(e),!isFinite(e)||!(e>0)?null:e>1?qq(t=>{t.setTime(Math.floor(t/e)*e)},(t,n)=>{t.setTime(+t+n*e)},(t,n)=>(n-t)/e):Jq),Jq.range;var Yq=1e3,Xq=Yq*60,Zq=Xq*60,Qq=Zq*24,$q=Qq*7,eJ=Qq*30,tJ=Qq*365,nJ=qq(e=>{e.setTime(e-e.getMilliseconds())},(e,t)=>{e.setTime(+e+t*Yq)},(e,t)=>(t-e)/Yq,e=>e.getUTCSeconds());nJ.range;var rJ=qq(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*Yq)},(e,t)=>{e.setTime(+e+t*Xq)},(e,t)=>(t-e)/Xq,e=>e.getMinutes());rJ.range;var iJ=qq(e=>{e.setUTCSeconds(0,0)},(e,t)=>{e.setTime(+e+t*Xq)},(e,t)=>(t-e)/Xq,e=>e.getUTCMinutes());iJ.range;var aJ=qq(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*Yq-e.getMinutes()*Xq)},(e,t)=>{e.setTime(+e+t*Zq)},(e,t)=>(t-e)/Zq,e=>e.getHours());aJ.range;var oJ=qq(e=>{e.setUTCMinutes(0,0,0)},(e,t)=>{e.setTime(+e+t*Zq)},(e,t)=>(t-e)/Zq,e=>e.getUTCHours());oJ.range;var sJ=qq(e=>e.setHours(0,0,0,0),(e,t)=>e.setDate(e.getDate()+t),(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*Xq)/Qq,e=>e.getDate()-1);sJ.range;var cJ=qq(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/Qq,e=>e.getUTCDate()-1);cJ.range;var lJ=qq(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/Qq,e=>Math.floor(e/Qq));lJ.range;function uJ(e){return qq(t=>{t.setDate(t.getDate()-(t.getDay()+7-e)%7),t.setHours(0,0,0,0)},(e,t)=>{e.setDate(e.getDate()+t*7)},(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*Xq)/$q)}var dJ=uJ(0),fJ=uJ(1),pJ=uJ(2),mJ=uJ(3),hJ=uJ(4),gJ=uJ(5),_J=uJ(6);dJ.range,fJ.range,pJ.range,mJ.range,hJ.range,gJ.range,_J.range;function vJ(e){return qq(t=>{t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7),t.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t*7)},(e,t)=>(t-e)/$q)}var yJ=vJ(0),bJ=vJ(1),xJ=vJ(2),SJ=vJ(3),CJ=vJ(4),wJ=vJ(5),TJ=vJ(6);yJ.range,bJ.range,xJ.range,SJ.range,CJ.range,wJ.range,TJ.range;var EJ=qq(e=>{e.setDate(1),e.setHours(0,0,0,0)},(e,t)=>{e.setMonth(e.getMonth()+t)},(e,t)=>t.getMonth()-e.getMonth()+(t.getFullYear()-e.getFullYear())*12,e=>e.getMonth());EJ.range;var DJ=qq(e=>{e.setUTCDate(1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCMonth(e.getUTCMonth()+t)},(e,t)=>t.getUTCMonth()-e.getUTCMonth()+(t.getUTCFullYear()-e.getUTCFullYear())*12,e=>e.getUTCMonth());DJ.range;var OJ=qq(e=>{e.setMonth(0,1),e.setHours(0,0,0,0)},(e,t)=>{e.setFullYear(e.getFullYear()+t)},(e,t)=>t.getFullYear()-e.getFullYear(),e=>e.getFullYear());OJ.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:qq(t=>{t.setFullYear(Math.floor(t.getFullYear()/e)*e),t.setMonth(0,1),t.setHours(0,0,0,0)},(t,n)=>{t.setFullYear(t.getFullYear()+n*e)}),OJ.range;var kJ=qq(e=>{e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCFullYear(e.getUTCFullYear()+t)},(e,t)=>t.getUTCFullYear()-e.getUTCFullYear(),e=>e.getUTCFullYear());kJ.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:qq(t=>{t.setUTCFullYear(Math.floor(t.getUTCFullYear()/e)*e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,n)=>{t.setUTCFullYear(t.getUTCFullYear()+n*e)}),kJ.range;function AJ(e,t,n,r,i,a){let o=[[nJ,1,Yq],[nJ,5,5*Yq],[nJ,15,15*Yq],[nJ,30,30*Yq],[a,1,Xq],[a,5,5*Xq],[a,15,15*Xq],[a,30,30*Xq],[i,1,Zq],[i,3,3*Zq],[i,6,6*Zq],[i,12,12*Zq],[r,1,Qq],[r,2,2*Qq],[n,1,$q],[t,1,eJ],[t,3,3*eJ],[e,1,tJ]];function s(e,t,n){let r=t<e;r&&([e,t]=[t,e]);let i=n&&typeof n.range==`function`?n:c(e,t,n),a=i?i.range(e,+t+1):[];return r?a.reverse():a}function c(t,n,r){let i=Math.abs(n-t)/r,a=SK(([,,e])=>e).right(o,i);if(a===o.length)return e.every(RK(t/tJ,n/tJ,r));if(a===0)return Jq.every(Math.max(RK(t,n,r),1));let[s,c]=o[i/o[a-1][2]<o[a][2]/i?a-1:a];return s.every(c)}return[s,c]}var[jJ,MJ]=AJ(kJ,DJ,yJ,lJ,oJ,iJ),[NJ,PJ]=AJ(OJ,EJ,dJ,sJ,aJ,rJ);function FJ(e){if(0<=e.y&&e.y<100){var t=new Date(-1,e.m,e.d,e.H,e.M,e.S,e.L);return t.setFullYear(e.y),t}return new Date(e.y,e.m,e.d,e.H,e.M,e.S,e.L)}function IJ(e){if(0<=e.y&&e.y<100){var t=new Date(Date.UTC(-1,e.m,e.d,e.H,e.M,e.S,e.L));return t.setUTCFullYear(e.y),t}return new Date(Date.UTC(e.y,e.m,e.d,e.H,e.M,e.S,e.L))}function LJ(e,t,n){return{y:e,m:t,d:n,H:0,M:0,S:0,L:0}}function RJ(e){var t=e.dateTime,n=e.date,r=e.time,i=e.periods,a=e.days,o=e.shortDays,s=e.months,c=e.shortMonths,l=GJ(i),u=KJ(i),d=GJ(a),f=KJ(a),p=GJ(o),m=KJ(o),h=GJ(s),g=KJ(s),_=GJ(c),v=KJ(c),y={a:N,A:P,b:F,B:I,c:null,d:pY,e:pY,f:vY,g:kY,G:jY,H:mY,I:hY,j:gY,L:_Y,m:yY,M:bY,p:L,q:R,Q:eX,s:tX,S:xY,u:SY,U:CY,V:TY,w:EY,W:DY,x:null,X:null,y:OY,Y:AY,Z:MY,"%":$Y},b={a:z,A:B,b:V,B:H,c:null,d:NY,e:NY,f:RY,g:YY,G:ZY,H:PY,I:FY,j:IY,L:LY,m:zY,M:BY,p:ee,q:te,Q:eX,s:tX,S:VY,u:HY,U:UY,V:GY,w:KY,W:qY,x:null,X:null,y:JY,Y:XY,Z:QY,"%":$Y},x={a:E,A:D,b:O,B:k,c:A,d:rY,e:rY,f:lY,g:$J,G:QJ,H:aY,I:aY,j:iY,L:cY,m:nY,M:oY,p:T,q:tY,Q:dY,s:fY,S:sY,u:JJ,U:YJ,V:XJ,w:qJ,W:ZJ,x:j,X:M,y:$J,Y:QJ,Z:eY,"%":uY};y.x=S(n,y),y.X=S(r,y),y.c=S(t,y),b.x=S(n,b),b.X=S(r,b),b.c=S(t,b);function S(e,t){return function(n){var r=[],i=-1,a=0,o=e.length,s,c,l;for(n instanceof Date||(n=new Date(+n));++i<o;)e.charCodeAt(i)===37&&(r.push(e.slice(a,i)),(c=zJ[s=e.charAt(++i)])==null?c=s===`e`?` `:`0`:s=e.charAt(++i),(l=t[s])&&(s=l(n,c)),r.push(s),a=i+1);return r.push(e.slice(a,i)),r.join(``)}}function C(e,t){return function(n){var r=LJ(1900,void 0,1),i=w(r,e,n+=``,0),a,o;if(i!=n.length)return null;if(`Q`in r)return new Date(r.Q);if(`s`in r)return new Date(r.s*1e3+(`L`in r?r.L:0));if(t&&!(`Z`in r)&&(r.Z=0),`p`in r&&(r.H=r.H%12+r.p*12),r.m===void 0&&(r.m=`q`in r?r.q:0),`V`in r){if(r.V<1||r.V>53)return null;`w`in r||(r.w=1),`Z`in r?(a=IJ(LJ(r.y,0,1)),o=a.getUTCDay(),a=o>4||o===0?bJ.ceil(a):bJ(a),a=cJ.offset(a,(r.V-1)*7),r.y=a.getUTCFullYear(),r.m=a.getUTCMonth(),r.d=a.getUTCDate()+(r.w+6)%7):(a=FJ(LJ(r.y,0,1)),o=a.getDay(),a=o>4||o===0?fJ.ceil(a):fJ(a),a=sJ.offset(a,(r.V-1)*7),r.y=a.getFullYear(),r.m=a.getMonth(),r.d=a.getDate()+(r.w+6)%7)}else(`W`in r||`U`in r)&&(`w`in r||(r.w=`u`in r?r.u%7:+(`W`in r)),o=`Z`in r?IJ(LJ(r.y,0,1)).getUTCDay():FJ(LJ(r.y,0,1)).getDay(),r.m=0,r.d=`W`in r?(r.w+6)%7+r.W*7-(o+5)%7:r.w+r.U*7-(o+6)%7);return`Z`in r?(r.H+=r.Z/100|0,r.M+=r.Z%100,IJ(r)):FJ(r)}}function w(e,t,n,r){for(var i=0,a=t.length,o=n.length,s,c;i<a;){if(r>=o)return-1;if(s=t.charCodeAt(i++),s===37){if(s=t.charAt(i++),c=x[s in zJ?t.charAt(i++):s],!c||(r=c(e,n,r))<0)return-1}else if(s!=n.charCodeAt(r++))return-1}return r}function T(e,t,n){var r=l.exec(t.slice(n));return r?(e.p=u.get(r[0].toLowerCase()),n+r[0].length):-1}function E(e,t,n){var r=p.exec(t.slice(n));return r?(e.w=m.get(r[0].toLowerCase()),n+r[0].length):-1}function D(e,t,n){var r=d.exec(t.slice(n));return r?(e.w=f.get(r[0].toLowerCase()),n+r[0].length):-1}function O(e,t,n){var r=_.exec(t.slice(n));return r?(e.m=v.get(r[0].toLowerCase()),n+r[0].length):-1}function k(e,t,n){var r=h.exec(t.slice(n));return r?(e.m=g.get(r[0].toLowerCase()),n+r[0].length):-1}function A(e,n,r){return w(e,t,n,r)}function j(e,t,r){return w(e,n,t,r)}function M(e,t,n){return w(e,r,t,n)}function N(e){return o[e.getDay()]}function P(e){return a[e.getDay()]}function F(e){return c[e.getMonth()]}function I(e){return s[e.getMonth()]}function L(e){return i[+(e.getHours()>=12)]}function R(e){return 1+~~(e.getMonth()/3)}function z(e){return o[e.getUTCDay()]}function B(e){return a[e.getUTCDay()]}function V(e){return c[e.getUTCMonth()]}function H(e){return s[e.getUTCMonth()]}function ee(e){return i[+(e.getUTCHours()>=12)]}function te(e){return 1+~~(e.getUTCMonth()/3)}return{format:function(e){var t=S(e+=``,y);return t.toString=function(){return e},t},parse:function(e){var t=C(e+=``,!1);return t.toString=function(){return e},t},utcFormat:function(e){var t=S(e+=``,b);return t.toString=function(){return e},t},utcParse:function(e){var t=C(e+=``,!0);return t.toString=function(){return e},t}}}var zJ={"-":``,_:` `,0:`0`},BJ=/^\s*\d+/,VJ=/^%/,HJ=/[\\^$*+?|[\]().{}]/g;function UJ(e,t,n){var r=e<0?`-`:``,i=(r?-e:e)+``,a=i.length;return r+(a<n?Array(n-a+1).join(t)+i:i)}function WJ(e){return e.replace(HJ,`\\$&`)}function GJ(e){return RegExp(`^(?:`+e.map(WJ).join(`|`)+`)`,`i`)}function KJ(e){return new Map(e.map((e,t)=>[e.toLowerCase(),t]))}function qJ(e,t,n){var r=BJ.exec(t.slice(n,n+1));return r?(e.w=+r[0],n+r[0].length):-1}function JJ(e,t,n){var r=BJ.exec(t.slice(n,n+1));return r?(e.u=+r[0],n+r[0].length):-1}function YJ(e,t,n){var r=BJ.exec(t.slice(n,n+2));return r?(e.U=+r[0],n+r[0].length):-1}function XJ(e,t,n){var r=BJ.exec(t.slice(n,n+2));return r?(e.V=+r[0],n+r[0].length):-1}function ZJ(e,t,n){var r=BJ.exec(t.slice(n,n+2));return r?(e.W=+r[0],n+r[0].length):-1}function QJ(e,t,n){var r=BJ.exec(t.slice(n,n+4));return r?(e.y=+r[0],n+r[0].length):-1}function $J(e,t,n){var r=BJ.exec(t.slice(n,n+2));return r?(e.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function eY(e,t,n){var r=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(t.slice(n,n+6));return r?(e.Z=r[1]?0:-(r[2]+(r[3]||`00`)),n+r[0].length):-1}function tY(e,t,n){var r=BJ.exec(t.slice(n,n+1));return r?(e.q=r[0]*3-3,n+r[0].length):-1}function nY(e,t,n){var r=BJ.exec(t.slice(n,n+2));return r?(e.m=r[0]-1,n+r[0].length):-1}function rY(e,t,n){var r=BJ.exec(t.slice(n,n+2));return r?(e.d=+r[0],n+r[0].length):-1}function iY(e,t,n){var r=BJ.exec(t.slice(n,n+3));return r?(e.m=0,e.d=+r[0],n+r[0].length):-1}function aY(e,t,n){var r=BJ.exec(t.slice(n,n+2));return r?(e.H=+r[0],n+r[0].length):-1}function oY(e,t,n){var r=BJ.exec(t.slice(n,n+2));return r?(e.M=+r[0],n+r[0].length):-1}function sY(e,t,n){var r=BJ.exec(t.slice(n,n+2));return r?(e.S=+r[0],n+r[0].length):-1}function cY(e,t,n){var r=BJ.exec(t.slice(n,n+3));return r?(e.L=+r[0],n+r[0].length):-1}function lY(e,t,n){var r=BJ.exec(t.slice(n,n+6));return r?(e.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function uY(e,t,n){var r=VJ.exec(t.slice(n,n+1));return r?n+r[0].length:-1}function dY(e,t,n){var r=BJ.exec(t.slice(n));return r?(e.Q=+r[0],n+r[0].length):-1}function fY(e,t,n){var r=BJ.exec(t.slice(n));return r?(e.s=+r[0],n+r[0].length):-1}function pY(e,t){return UJ(e.getDate(),t,2)}function mY(e,t){return UJ(e.getHours(),t,2)}function hY(e,t){return UJ(e.getHours()%12||12,t,2)}function gY(e,t){return UJ(1+sJ.count(OJ(e),e),t,3)}function _Y(e,t){return UJ(e.getMilliseconds(),t,3)}function vY(e,t){return _Y(e,t)+`000`}function yY(e,t){return UJ(e.getMonth()+1,t,2)}function bY(e,t){return UJ(e.getMinutes(),t,2)}function xY(e,t){return UJ(e.getSeconds(),t,2)}function SY(e){var t=e.getDay();return t===0?7:t}function CY(e,t){return UJ(dJ.count(OJ(e)-1,e),t,2)}function wY(e){var t=e.getDay();return t>=4||t===0?hJ(e):hJ.ceil(e)}function TY(e,t){return e=wY(e),UJ(hJ.count(OJ(e),e)+(OJ(e).getDay()===4),t,2)}function EY(e){return e.getDay()}function DY(e,t){return UJ(fJ.count(OJ(e)-1,e),t,2)}function OY(e,t){return UJ(e.getFullYear()%100,t,2)}function kY(e,t){return e=wY(e),UJ(e.getFullYear()%100,t,2)}function AY(e,t){return UJ(e.getFullYear()%1e4,t,4)}function jY(e,t){var n=e.getDay();return e=n>=4||n===0?hJ(e):hJ.ceil(e),UJ(e.getFullYear()%1e4,t,4)}function MY(e){var t=e.getTimezoneOffset();return(t>0?`-`:(t*=-1,`+`))+UJ(t/60|0,`0`,2)+UJ(t%60,`0`,2)}function NY(e,t){return UJ(e.getUTCDate(),t,2)}function PY(e,t){return UJ(e.getUTCHours(),t,2)}function FY(e,t){return UJ(e.getUTCHours()%12||12,t,2)}function IY(e,t){return UJ(1+cJ.count(kJ(e),e),t,3)}function LY(e,t){return UJ(e.getUTCMilliseconds(),t,3)}function RY(e,t){return LY(e,t)+`000`}function zY(e,t){return UJ(e.getUTCMonth()+1,t,2)}function BY(e,t){return UJ(e.getUTCMinutes(),t,2)}function VY(e,t){return UJ(e.getUTCSeconds(),t,2)}function HY(e){var t=e.getUTCDay();return t===0?7:t}function UY(e,t){return UJ(yJ.count(kJ(e)-1,e),t,2)}function WY(e){var t=e.getUTCDay();return t>=4||t===0?CJ(e):CJ.ceil(e)}function GY(e,t){return e=WY(e),UJ(CJ.count(kJ(e),e)+(kJ(e).getUTCDay()===4),t,2)}function KY(e){return e.getUTCDay()}function qY(e,t){return UJ(bJ.count(kJ(e)-1,e),t,2)}function JY(e,t){return UJ(e.getUTCFullYear()%100,t,2)}function YY(e,t){return e=WY(e),UJ(e.getUTCFullYear()%100,t,2)}function XY(e,t){return UJ(e.getUTCFullYear()%1e4,t,4)}function ZY(e,t){var n=e.getUTCDay();return e=n>=4||n===0?CJ(e):CJ.ceil(e),UJ(e.getUTCFullYear()%1e4,t,4)}function QY(){return`+0000`}function $Y(){return`%`}function eX(e){return+e}function tX(e){return Math.floor(e/1e3)}var nX,rX,iX;aX({dateTime:`%x, %X`,date:`%-m/%-d/%Y`,time:`%-I:%M:%S %p`,periods:[`AM`,`PM`],days:[`Sunday`,`Monday`,`Tuesday`,`Wednesday`,`Thursday`,`Friday`,`Saturday`],shortDays:[`Sun`,`Mon`,`Tue`,`Wed`,`Thu`,`Fri`,`Sat`],months:[`January`,`February`,`March`,`April`,`May`,`June`,`July`,`August`,`September`,`October`,`November`,`December`],shortMonths:[`Jan`,`Feb`,`Mar`,`Apr`,`May`,`Jun`,`Jul`,`Aug`,`Sep`,`Oct`,`Nov`,`Dec`]});function aX(e){return nX=RJ(e),rX=nX.format,nX.parse,iX=nX.utcFormat,nX.utcParse,nX}function oX(e){return new Date(e)}function sX(e){return e instanceof Date?+e:+new Date(+e)}function cX(e,t,n,r,i,a,o,s,c,l){var u=nq(),d=u.invert,f=u.domain,p=l(`.%L`),m=l(`:%S`),h=l(`%I:%M`),g=l(`%I %p`),_=l(`%a %d`),v=l(`%b %d`),y=l(`%B`),b=l(`%Y`);function x(e){return(c(e)<e?p:s(e)<e?m:o(e)<e?h:a(e)<e?g:r(e)<e?i(e)<e?_:v:n(e)<e?y:b)(e)}return u.invert=function(e){return new Date(d(e))},u.domain=function(e){return arguments.length?f(Array.from(e,sX)):f().map(oX)},u.ticks=function(t){var n=f();return e(n[0],n[n.length-1],t??10)},u.tickFormat=function(e,t){return t==null?x:l(t)},u.nice=function(e){var n=f();return(!e||typeof e.range!=`function`)&&(e=t(n[0],n[n.length-1],e??10)),e?f(Aq(n,e)):u},u.copy=function(){return eq(u,cX(e,t,n,r,i,a,o,s,c,l))},u}function lX(){return BK.apply(cX(NJ,PJ,OJ,EJ,dJ,sJ,aJ,rJ,nJ,rX).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}function uX(){return BK.apply(cX(jJ,MJ,kJ,DJ,yJ,cJ,oJ,iJ,nJ,iX).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)]),arguments)}function dX(e){for(var t=e.length/6|0,n=Array(t),r=0;r<t;)n[r]=`#`+e.slice(r*6,++r*6);return n}var fX=dX(`1f77b4ff7f0e2ca02cd627289467bd8c564be377c27f7f7fbcbd2217becf`),pX=dX(`7fc97fbeaed4fdc086ffff99386cb0f0027fbf5b17666666`),mX=dX(`1b9e77d95f027570b3e7298a66a61ee6ab02a6761d666666`),hX=dX(`a6cee31f78b4b2df8a33a02cfb9a99e31a1cfdbf6fff7f00cab2d66a3d9affff99b15928`),gX=dX(`fbb4aeb3cde3ccebc5decbe4fed9a6ffffcce5d8bdfddaecf2f2f2`),_X=dX(`b3e2cdfdcdaccbd5e8f4cae4e6f5c9fff2aef1e2cccccccc`),vX=dX(`e41a1c377eb84daf4a984ea3ff7f00ffff33a65628f781bf999999`),yX=dX(`66c2a5fc8d628da0cbe78ac3a6d854ffd92fe5c494b3b3b3`),bX=dX(`8dd3c7ffffb3bebadafb807280b1d3fdb462b3de69fccde5d9d9d9bc80bdccebc5ffed6f`),xX=dX(`4e79a7f28e2ce1575976b7b259a14fedc949af7aa1ff9da79c755fbab0ab`),SX=e=>aW(e[e.length-1]),CX=[,,,`d8b365f5f5f55ab4ac`,`a6611adfc27d80cdc1018571`,`a6611adfc27df5f5f580cdc1018571`,`8c510ad8b365f6e8c3c7eae55ab4ac01665e`,`8c510ad8b365f6e8c3f5f5f5c7eae55ab4ac01665e`,`8c510abf812ddfc27df6e8c3c7eae580cdc135978f01665e`,`8c510abf812ddfc27df6e8c3f5f5f5c7eae580cdc135978f01665e`,`5430058c510abf812ddfc27df6e8c3c7eae580cdc135978f01665e003c30`,`5430058c510abf812ddfc27df6e8c3f5f5f5c7eae580cdc135978f01665e003c30`].map(dX),wX=SX(CX),TX=[,,,`af8dc3f7f7f77fbf7b`,`7b3294c2a5cfa6dba0008837`,`7b3294c2a5cff7f7f7a6dba0008837`,`762a83af8dc3e7d4e8d9f0d37fbf7b1b7837`,`762a83af8dc3e7d4e8f7f7f7d9f0d37fbf7b1b7837`,`762a839970abc2a5cfe7d4e8d9f0d3a6dba05aae611b7837`,`762a839970abc2a5cfe7d4e8f7f7f7d9f0d3a6dba05aae611b7837`,`40004b762a839970abc2a5cfe7d4e8d9f0d3a6dba05aae611b783700441b`,`40004b762a839970abc2a5cfe7d4e8f7f7f7d9f0d3a6dba05aae611b783700441b`].map(dX),EX=SX(TX),DX=[,,,`e9a3c9f7f7f7a1d76a`,`d01c8bf1b6dab8e1864dac26`,`d01c8bf1b6daf7f7f7b8e1864dac26`,`c51b7de9a3c9fde0efe6f5d0a1d76a4d9221`,`c51b7de9a3c9fde0eff7f7f7e6f5d0a1d76a4d9221`,`c51b7dde77aef1b6dafde0efe6f5d0b8e1867fbc414d9221`,`c51b7dde77aef1b6dafde0eff7f7f7e6f5d0b8e1867fbc414d9221`,`8e0152c51b7dde77aef1b6dafde0efe6f5d0b8e1867fbc414d9221276419`,`8e0152c51b7dde77aef1b6dafde0eff7f7f7e6f5d0b8e1867fbc414d9221276419`].map(dX),OX=SX(DX),kX=[,,,`998ec3f7f7f7f1a340`,`5e3c99b2abd2fdb863e66101`,`5e3c99b2abd2f7f7f7fdb863e66101`,`542788998ec3d8daebfee0b6f1a340b35806`,`542788998ec3d8daebf7f7f7fee0b6f1a340b35806`,`5427888073acb2abd2d8daebfee0b6fdb863e08214b35806`,`5427888073acb2abd2d8daebf7f7f7fee0b6fdb863e08214b35806`,`2d004b5427888073acb2abd2d8daebfee0b6fdb863e08214b358067f3b08`,`2d004b5427888073acb2abd2d8daebf7f7f7fee0b6fdb863e08214b358067f3b08`].map(dX),AX=SX(kX),jX=[,,,`ef8a62f7f7f767a9cf`,`ca0020f4a58292c5de0571b0`,`ca0020f4a582f7f7f792c5de0571b0`,`b2182bef8a62fddbc7d1e5f067a9cf2166ac`,`b2182bef8a62fddbc7f7f7f7d1e5f067a9cf2166ac`,`b2182bd6604df4a582fddbc7d1e5f092c5de4393c32166ac`,`b2182bd6604df4a582fddbc7f7f7f7d1e5f092c5de4393c32166ac`,`67001fb2182bd6604df4a582fddbc7d1e5f092c5de4393c32166ac053061`,`67001fb2182bd6604df4a582fddbc7f7f7f7d1e5f092c5de4393c32166ac053061`].map(dX),MX=SX(jX),NX=[,,,`ef8a62ffffff999999`,`ca0020f4a582bababa404040`,`ca0020f4a582ffffffbababa404040`,`b2182bef8a62fddbc7e0e0e09999994d4d4d`,`b2182bef8a62fddbc7ffffffe0e0e09999994d4d4d`,`b2182bd6604df4a582fddbc7e0e0e0bababa8787874d4d4d`,`b2182bd6604df4a582fddbc7ffffffe0e0e0bababa8787874d4d4d`,`67001fb2182bd6604df4a582fddbc7e0e0e0bababa8787874d4d4d1a1a1a`,`67001fb2182bd6604df4a582fddbc7ffffffe0e0e0bababa8787874d4d4d1a1a1a`].map(dX),PX=SX(NX),FX=[,,,`fc8d59ffffbf91bfdb`,`d7191cfdae61abd9e92c7bb6`,`d7191cfdae61ffffbfabd9e92c7bb6`,`d73027fc8d59fee090e0f3f891bfdb4575b4`,`d73027fc8d59fee090ffffbfe0f3f891bfdb4575b4`,`d73027f46d43fdae61fee090e0f3f8abd9e974add14575b4`,`d73027f46d43fdae61fee090ffffbfe0f3f8abd9e974add14575b4`,`a50026d73027f46d43fdae61fee090e0f3f8abd9e974add14575b4313695`,`a50026d73027f46d43fdae61fee090ffffbfe0f3f8abd9e974add14575b4313695`].map(dX),IX=SX(FX),LX=[,,,`fc8d59ffffbf91cf60`,`d7191cfdae61a6d96a1a9641`,`d7191cfdae61ffffbfa6d96a1a9641`,`d73027fc8d59fee08bd9ef8b91cf601a9850`,`d73027fc8d59fee08bffffbfd9ef8b91cf601a9850`,`d73027f46d43fdae61fee08bd9ef8ba6d96a66bd631a9850`,`d73027f46d43fdae61fee08bffffbfd9ef8ba6d96a66bd631a9850`,`a50026d73027f46d43fdae61fee08bd9ef8ba6d96a66bd631a9850006837`,`a50026d73027f46d43fdae61fee08bffffbfd9ef8ba6d96a66bd631a9850006837`].map(dX),RX=SX(LX),zX=[,,,`fc8d59ffffbf99d594`,`d7191cfdae61abdda42b83ba`,`d7191cfdae61ffffbfabdda42b83ba`,`d53e4ffc8d59fee08be6f59899d5943288bd`,`d53e4ffc8d59fee08bffffbfe6f59899d5943288bd`,`d53e4ff46d43fdae61fee08be6f598abdda466c2a53288bd`,`d53e4ff46d43fdae61fee08bffffbfe6f598abdda466c2a53288bd`,`9e0142d53e4ff46d43fdae61fee08be6f598abdda466c2a53288bd5e4fa2`,`9e0142d53e4ff46d43fdae61fee08bffffbfe6f598abdda466c2a53288bd5e4fa2`].map(dX),BX=SX(zX),VX=[,,,`e5f5f999d8c92ca25f`,`edf8fbb2e2e266c2a4238b45`,`edf8fbb2e2e266c2a42ca25f006d2c`,`edf8fbccece699d8c966c2a42ca25f006d2c`,`edf8fbccece699d8c966c2a441ae76238b45005824`,`f7fcfde5f5f9ccece699d8c966c2a441ae76238b45005824`,`f7fcfde5f5f9ccece699d8c966c2a441ae76238b45006d2c00441b`].map(dX),HX=SX(VX),UX=[,,,`e0ecf49ebcda8856a7`,`edf8fbb3cde38c96c688419d`,`edf8fbb3cde38c96c68856a7810f7c`,`edf8fbbfd3e69ebcda8c96c68856a7810f7c`,`edf8fbbfd3e69ebcda8c96c68c6bb188419d6e016b`,`f7fcfde0ecf4bfd3e69ebcda8c96c68c6bb188419d6e016b`,`f7fcfde0ecf4bfd3e69ebcda8c96c68c6bb188419d810f7c4d004b`].map(dX),WX=SX(UX),GX=[,,,`e0f3dba8ddb543a2ca`,`f0f9e8bae4bc7bccc42b8cbe`,`f0f9e8bae4bc7bccc443a2ca0868ac`,`f0f9e8ccebc5a8ddb57bccc443a2ca0868ac`,`f0f9e8ccebc5a8ddb57bccc44eb3d32b8cbe08589e`,`f7fcf0e0f3dbccebc5a8ddb57bccc44eb3d32b8cbe08589e`,`f7fcf0e0f3dbccebc5a8ddb57bccc44eb3d32b8cbe0868ac084081`].map(dX),KX=SX(GX),qX=[,,,`fee8c8fdbb84e34a33`,`fef0d9fdcc8afc8d59d7301f`,`fef0d9fdcc8afc8d59e34a33b30000`,`fef0d9fdd49efdbb84fc8d59e34a33b30000`,`fef0d9fdd49efdbb84fc8d59ef6548d7301f990000`,`fff7ecfee8c8fdd49efdbb84fc8d59ef6548d7301f990000`,`fff7ecfee8c8fdd49efdbb84fc8d59ef6548d7301fb300007f0000`].map(dX),JX=SX(qX),YX=[,,,`ece2f0a6bddb1c9099`,`f6eff7bdc9e167a9cf02818a`,`f6eff7bdc9e167a9cf1c9099016c59`,`f6eff7d0d1e6a6bddb67a9cf1c9099016c59`,`f6eff7d0d1e6a6bddb67a9cf3690c002818a016450`,`fff7fbece2f0d0d1e6a6bddb67a9cf3690c002818a016450`,`fff7fbece2f0d0d1e6a6bddb67a9cf3690c002818a016c59014636`].map(dX),XX=SX(YX),ZX=[,,,`ece7f2a6bddb2b8cbe`,`f1eef6bdc9e174a9cf0570b0`,`f1eef6bdc9e174a9cf2b8cbe045a8d`,`f1eef6d0d1e6a6bddb74a9cf2b8cbe045a8d`,`f1eef6d0d1e6a6bddb74a9cf3690c00570b0034e7b`,`fff7fbece7f2d0d1e6a6bddb74a9cf3690c00570b0034e7b`,`fff7fbece7f2d0d1e6a6bddb74a9cf3690c00570b0045a8d023858`].map(dX),QX=SX(ZX),$X=[,,,`e7e1efc994c7dd1c77`,`f1eef6d7b5d8df65b0ce1256`,`f1eef6d7b5d8df65b0dd1c77980043`,`f1eef6d4b9dac994c7df65b0dd1c77980043`,`f1eef6d4b9dac994c7df65b0e7298ace125691003f`,`f7f4f9e7e1efd4b9dac994c7df65b0e7298ace125691003f`,`f7f4f9e7e1efd4b9dac994c7df65b0e7298ace125698004367001f`].map(dX),eZ=SX($X),tZ=[,,,`fde0ddfa9fb5c51b8a`,`feebe2fbb4b9f768a1ae017e`,`feebe2fbb4b9f768a1c51b8a7a0177`,`feebe2fcc5c0fa9fb5f768a1c51b8a7a0177`,`feebe2fcc5c0fa9fb5f768a1dd3497ae017e7a0177`,`fff7f3fde0ddfcc5c0fa9fb5f768a1dd3497ae017e7a0177`,`fff7f3fde0ddfcc5c0fa9fb5f768a1dd3497ae017e7a017749006a`].map(dX),nZ=SX(tZ),rZ=[,,,`edf8b17fcdbb2c7fb8`,`ffffcca1dab441b6c4225ea8`,`ffffcca1dab441b6c42c7fb8253494`,`ffffccc7e9b47fcdbb41b6c42c7fb8253494`,`ffffccc7e9b47fcdbb41b6c41d91c0225ea80c2c84`,`ffffd9edf8b1c7e9b47fcdbb41b6c41d91c0225ea80c2c84`,`ffffd9edf8b1c7e9b47fcdbb41b6c41d91c0225ea8253494081d58`].map(dX),iZ=SX(rZ),aZ=[,,,`f7fcb9addd8e31a354`,`ffffccc2e69978c679238443`,`ffffccc2e69978c67931a354006837`,`ffffccd9f0a3addd8e78c67931a354006837`,`ffffccd9f0a3addd8e78c67941ab5d238443005a32`,`ffffe5f7fcb9d9f0a3addd8e78c67941ab5d238443005a32`,`ffffe5f7fcb9d9f0a3addd8e78c67941ab5d238443006837004529`].map(dX),oZ=SX(aZ),sZ=[,,,`fff7bcfec44fd95f0e`,`ffffd4fed98efe9929cc4c02`,`ffffd4fed98efe9929d95f0e993404`,`ffffd4fee391fec44ffe9929d95f0e993404`,`ffffd4fee391fec44ffe9929ec7014cc4c028c2d04`,`ffffe5fff7bcfee391fec44ffe9929ec7014cc4c028c2d04`,`ffffe5fff7bcfee391fec44ffe9929ec7014cc4c02993404662506`].map(dX),cZ=SX(sZ),lZ=[,,,`ffeda0feb24cf03b20`,`ffffb2fecc5cfd8d3ce31a1c`,`ffffb2fecc5cfd8d3cf03b20bd0026`,`ffffb2fed976feb24cfd8d3cf03b20bd0026`,`ffffb2fed976feb24cfd8d3cfc4e2ae31a1cb10026`,`ffffccffeda0fed976feb24cfd8d3cfc4e2ae31a1cb10026`,`ffffccffeda0fed976feb24cfd8d3cfc4e2ae31a1cbd0026800026`].map(dX),uZ=SX(lZ),dZ=[,,,`deebf79ecae13182bd`,`eff3ffbdd7e76baed62171b5`,`eff3ffbdd7e76baed63182bd08519c`,`eff3ffc6dbef9ecae16baed63182bd08519c`,`eff3ffc6dbef9ecae16baed64292c62171b5084594`,`f7fbffdeebf7c6dbef9ecae16baed64292c62171b5084594`,`f7fbffdeebf7c6dbef9ecae16baed64292c62171b508519c08306b`].map(dX),fZ=SX(dZ),pZ=[,,,`e5f5e0a1d99b31a354`,`edf8e9bae4b374c476238b45`,`edf8e9bae4b374c47631a354006d2c`,`edf8e9c7e9c0a1d99b74c47631a354006d2c`,`edf8e9c7e9c0a1d99b74c47641ab5d238b45005a32`,`f7fcf5e5f5e0c7e9c0a1d99b74c47641ab5d238b45005a32`,`f7fcf5e5f5e0c7e9c0a1d99b74c47641ab5d238b45006d2c00441b`].map(dX),mZ=SX(pZ),hZ=[,,,`f0f0f0bdbdbd636363`,`f7f7f7cccccc969696525252`,`f7f7f7cccccc969696636363252525`,`f7f7f7d9d9d9bdbdbd969696636363252525`,`f7f7f7d9d9d9bdbdbd969696737373525252252525`,`fffffff0f0f0d9d9d9bdbdbd969696737373525252252525`,`fffffff0f0f0d9d9d9bdbdbd969696737373525252252525000000`].map(dX),gZ=SX(hZ),_Z=[,,,`efedf5bcbddc756bb1`,`f2f0f7cbc9e29e9ac86a51a3`,`f2f0f7cbc9e29e9ac8756bb154278f`,`f2f0f7dadaebbcbddc9e9ac8756bb154278f`,`f2f0f7dadaebbcbddc9e9ac8807dba6a51a34a1486`,`fcfbfdefedf5dadaebbcbddc9e9ac8807dba6a51a34a1486`,`fcfbfdefedf5dadaebbcbddc9e9ac8807dba6a51a354278f3f007d`].map(dX),vZ=SX(_Z),yZ=[,,,`fee0d2fc9272de2d26`,`fee5d9fcae91fb6a4acb181d`,`fee5d9fcae91fb6a4ade2d26a50f15`,`fee5d9fcbba1fc9272fb6a4ade2d26a50f15`,`fee5d9fcbba1fc9272fb6a4aef3b2ccb181d99000d`,`fff5f0fee0d2fcbba1fc9272fb6a4aef3b2ccb181d99000d`,`fff5f0fee0d2fcbba1fc9272fb6a4aef3b2ccb181da50f1567000d`].map(dX),bZ=SX(yZ),xZ=[,,,`fee6cefdae6be6550d`,`feeddefdbe85fd8d3cd94701`,`feeddefdbe85fd8d3ce6550da63603`,`feeddefdd0a2fdae6bfd8d3ce6550da63603`,`feeddefdd0a2fdae6bfd8d3cf16913d948018c2d04`,`fff5ebfee6cefdd0a2fdae6bfd8d3cf16913d948018c2d04`,`fff5ebfee6cefdd0a2fdae6bfd8d3cf16913d94801a636037f2704`].map(dX),SZ=SX(xZ);function CZ(e){return e=Math.max(0,Math.min(1,e)),`rgb(`+Math.max(0,Math.min(255,Math.round(-4.54-e*(35.34-e*(2381.73-e*(6402.7-e*(7024.72-e*2710.57)))))))+`, `+Math.max(0,Math.min(255,Math.round(32.49+e*(170.73+e*(52.82-e*(131.46-e*(176.58-e*67.37)))))))+`, `+Math.max(0,Math.min(255,Math.round(81.24+e*(442.36-e*(2482.43-e*(6167.24-e*(6614.94-e*2475.67)))))))+`)`}var wZ=kW(qU(300,.5,0),qU(-240,.5,1)),TZ=kW(qU(-100,.75,.35),qU(80,1.5,.8)),EZ=kW(qU(260,.75,.35),qU(80,1.5,.8)),DZ=qU();function OZ(e){(e<0||e>1)&&(e-=Math.floor(e));var t=Math.abs(e-.5);return DZ.h=360*e-100,DZ.s=1.5-1.5*t,DZ.l=.8-.9*t,DZ+``}var kZ=xU(),AZ=Math.PI/3,jZ=Math.PI*2/3;function MZ(e){var t;return e=(.5-e)*Math.PI,kZ.r=255*(t=Math.sin(e))*t,kZ.g=255*(t=Math.sin(e+AZ))*t,kZ.b=255*(t=Math.sin(e+jZ))*t,kZ+``}function NZ(e){return e=Math.max(0,Math.min(1,e)),`rgb(`+Math.max(0,Math.min(255,Math.round(34.61+e*(1172.33-e*(10793.56-e*(33300.12-e*(38394.49-e*14825.05)))))))+`, `+Math.max(0,Math.min(255,Math.round(23.31+e*(557.33+e*(1225.33-e*(3574.96-e*(1073.77+e*707.56)))))))+`, `+Math.max(0,Math.min(255,Math.round(27.2+e*(3211.1-e*(15327.97-e*(27814-e*(22569.18-e*6838.66)))))))+`)`}function PZ(e){var t=e.length;return function(n){return e[Math.max(0,Math.min(t-1,Math.floor(n*t)))]}}var FZ=PZ(dX(`44015444025645045745055946075a46085c460a5d460b5e470d60470e6147106347116447136548146748166848176948186a481a6c481b6d481c6e481d6f481f70482071482173482374482475482576482677482878482979472a7a472c7a472d7b472e7c472f7d46307e46327e46337f463480453581453781453882443983443a83443b84433d84433e85423f854240864241864142874144874045884046883f47883f48893e49893e4a893e4c8a3d4d8a3d4e8a3c4f8a3c508b3b518b3b528b3a538b3a548c39558c39568c38588c38598c375a8c375b8d365c8d365d8d355e8d355f8d34608d34618d33628d33638d32648e32658e31668e31678e31688e30698e306a8e2f6b8e2f6c8e2e6d8e2e6e8e2e6f8e2d708e2d718e2c718e2c728e2c738e2b748e2b758e2a768e2a778e2a788e29798e297a8e297b8e287c8e287d8e277e8e277f8e27808e26818e26828e26828e25838e25848e25858e24868e24878e23888e23898e238a8d228b8d228c8d228d8d218e8d218f8d21908d21918c20928c20928c20938c1f948c1f958b1f968b1f978b1f988b1f998a1f9a8a1e9b8a1e9c891e9d891f9e891f9f881fa0881fa1881fa1871fa28720a38620a48621a58521a68522a78522a88423a98324aa8325ab8225ac8226ad8127ad8128ae8029af7f2ab07f2cb17e2db27d2eb37c2fb47c31b57b32b67a34b67935b77937b87838b9773aba763bbb753dbc743fbc7340bd7242be7144bf7046c06f48c16e4ac16d4cc26c4ec36b50c46a52c56954c56856c66758c7655ac8645cc8635ec96260ca6063cb5f65cb5e67cc5c69cd5b6ccd5a6ece5870cf5773d05675d05477d1537ad1517cd2507fd34e81d34d84d44b86d54989d5488bd6468ed64590d74393d74195d84098d83e9bd93c9dd93ba0da39a2da37a5db36a8db34aadc32addc30b0dd2fb2dd2db5de2bb8de29bade28bddf26c0df25c2df23c5e021c8e020cae11fcde11dd0e11cd2e21bd5e21ad8e219dae319dde318dfe318e2e418e5e419e7e419eae51aece51befe51cf1e51df4e61ef6e620f8e621fbe723fde725`)),IZ=PZ(dX(`00000401000501010601010802010902020b02020d03030f03031204041405041606051806051a07061c08071e0907200a08220b09240c09260d0a290e0b2b100b2d110c2f120d31130d34140e36150e38160f3b180f3d19103f1a10421c10441d11471e114920114b21114e22115024125325125527125829115a2a115c2c115f2d11612f116331116533106734106936106b38106c390f6e3b0f703d0f713f0f72400f74420f75440f764510774710784910784a10794c117a4e117b4f127b51127c52137c54137d56147d57157e59157e5a167e5c167f5d177f5f187f601880621980641a80651a80671b80681c816a1c816b1d816d1d816e1e81701f81721f817320817521817621817822817922827b23827c23827e24828025828125818326818426818627818827818928818b29818c29818e2a81902a81912b81932b80942c80962c80982d80992d809b2e7f9c2e7f9e2f7fa02f7fa1307ea3307ea5317ea6317da8327daa337dab337cad347cae347bb0357bb2357bb3367ab5367ab73779b83779ba3878bc3978bd3977bf3a77c03a76c23b75c43c75c53c74c73d73c83e73ca3e72cc3f71cd4071cf4070d0416fd2426fd3436ed5446dd6456cd8456cd9466bdb476adc4869de4968df4a68e04c67e24d66e34e65e44f64e55064e75263e85362e95462ea5661eb5760ec5860ed5a5fee5b5eef5d5ef05f5ef1605df2625df2645cf3655cf4675cf4695cf56b5cf66c5cf66e5cf7705cf7725cf8745cf8765cf9785df9795df97b5dfa7d5efa7f5efa815ffb835ffb8560fb8761fc8961fc8a62fc8c63fc8e64fc9065fd9266fd9467fd9668fd9869fd9a6afd9b6bfe9d6cfe9f6dfea16efea36ffea571fea772fea973feaa74feac76feae77feb078feb27afeb47bfeb67cfeb77efeb97ffebb81febd82febf84fec185fec287fec488fec68afec88cfeca8dfecc8ffecd90fecf92fed194fed395fed597fed799fed89afdda9cfddc9efddea0fde0a1fde2a3fde3a5fde5a7fde7a9fde9aafdebacfcecaefceeb0fcf0b2fcf2b4fcf4b6fcf6b8fcf7b9fcf9bbfcfbbdfcfdbf`)),LZ=PZ(dX(`00000401000501010601010802010a02020c02020e03021004031204031405041706041907051b08051d09061f0a07220b07240c08260d08290e092b10092d110a30120a32140b34150b37160b39180c3c190c3e1b0c411c0c431e0c451f0c48210c4a230c4c240c4f260c51280b53290b552b0b572d0b592f0a5b310a5c320a5e340a5f3609613809623909633b09643d09653e0966400a67420a68440a68450a69470b6a490b6a4a0c6b4c0c6b4d0d6c4f0d6c510e6c520e6d540f6d550f6d57106e59106e5a116e5c126e5d126e5f136e61136e62146e64156e65156e67166e69166e6a176e6c186e6d186e6f196e71196e721a6e741a6e751b6e771c6d781c6d7a1d6d7c1d6d7d1e6d7f1e6c801f6c82206c84206b85216b87216b88226a8a226a8c23698d23698f24699025689225689326679526679727669827669a28659b29649d29649f2a63a02a63a22b62a32c61a52c60a62d60a82e5fa92e5eab2f5ead305dae305cb0315bb1325ab3325ab43359b63458b73557b93556ba3655bc3754bd3853bf3952c03a51c13a50c33b4fc43c4ec63d4dc73e4cc83f4bca404acb4149cc4248ce4347cf4446d04545d24644d34743d44842d54a41d74b3fd84c3ed94d3dda4e3cdb503bdd513ade5238df5337e05536e15635e25734e35933e45a31e55c30e65d2fe75e2ee8602de9612bea632aeb6429eb6628ec6726ed6925ee6a24ef6c23ef6e21f06f20f1711ff1731df2741cf3761bf37819f47918f57b17f57d15f67e14f68013f78212f78410f8850ff8870ef8890cf98b0bf98c0af98e09fa9008fa9207fa9407fb9606fb9706fb9906fb9b06fb9d07fc9f07fca108fca309fca50afca60cfca80dfcaa0ffcac11fcae12fcb014fcb216fcb418fbb61afbb81dfbba1ffbbc21fbbe23fac026fac228fac42afac62df9c72ff9c932f9cb35f8cd37f8cf3af7d13df7d340f6d543f6d746f5d949f5db4cf4dd4ff4df53f4e156f3e35af3e55df2e661f2e865f2ea69f1ec6df1ed71f1ef75f1f179f2f27df2f482f3f586f3f68af4f88ef5f992f6fa96f8fb9af9fc9dfafda1fcffa4`)),RZ=PZ(dX(`0d088710078813078916078a19068c1b068d1d068e20068f2206902406912605912805922a05932c05942e05952f059631059733059735049837049938049a3a049a3c049b3e049c3f049c41049d43039e44039e46039f48039f4903a04b03a14c02a14e02a25002a25102a35302a35502a45601a45801a45901a55b01a55c01a65e01a66001a66100a76300a76400a76600a76700a86900a86a00a86c00a86e00a86f00a87100a87201a87401a87501a87701a87801a87a02a87b02a87d03a87e03a88004a88104a78305a78405a78606a68707a68808a68a09a58b0aa58d0ba58e0ca48f0da4910ea3920fa39410a29511a19613a19814a099159f9a169f9c179e9d189d9e199da01a9ca11b9ba21d9aa31e9aa51f99a62098a72197a82296aa2395ab2494ac2694ad2793ae2892b02991b12a90b22b8fb32c8eb42e8db52f8cb6308bb7318ab83289ba3388bb3488bc3587bd3786be3885bf3984c03a83c13b82c23c81c33d80c43e7fc5407ec6417dc7427cc8437bc9447aca457acb4679cc4778cc4977cd4a76ce4b75cf4c74d04d73d14e72d24f71d35171d45270d5536fd5546ed6556dd7566cd8576bd9586ada5a6ada5b69db5c68dc5d67dd5e66de5f65de6164df6263e06363e16462e26561e26660e3685fe4695ee56a5de56b5de66c5ce76e5be76f5ae87059e97158e97257ea7457eb7556eb7655ec7754ed7953ed7a52ee7b51ef7c51ef7e50f07f4ff0804ef1814df1834cf2844bf3854bf3874af48849f48948f58b47f58c46f68d45f68f44f79044f79143f79342f89441f89540f9973ff9983ef99a3efa9b3dfa9c3cfa9e3bfb9f3afba139fba238fca338fca537fca636fca835fca934fdab33fdac33fdae32fdaf31fdb130fdb22ffdb42ffdb52efeb72dfeb82cfeba2cfebb2bfebd2afebe2afec029fdc229fdc328fdc527fdc627fdc827fdca26fdcb26fccd25fcce25fcd025fcd225fbd324fbd524fbd724fad824fada24f9dc24f9dd25f8df25f8e125f7e225f7e425f6e626f6e826f5e926f5eb27f4ed27f3ee27f3f027f2f227f1f426f1f525f0f724f0f921`)),zZ=o(((e,t)=>{function n(e){var t=e==null?0:e.length;return t?e[t-1]:void 0}t.exports=n}));function BZ(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString(`en`).replace(/,/g,``):e.toString(10)}function VZ(e,t){if((n=(e=t?e.toExponential(t-1):e.toExponential()).indexOf(`e`))<0)return null;var n,r=e.slice(0,n);return[r.length>1?r[0]+r.slice(2):r,+e.slice(n+1)]}function HZ(e){return e=VZ(Math.abs(e)),e?e[1]:NaN}function UZ(e,t){return function(n,r){for(var i=n.length,a=[],o=0,s=e[0],c=0;i>0&&s>0&&(c+s+1>r&&(s=Math.max(1,r-c)),a.push(n.substring(i-=s,i+s)),!((c+=s+1)>r));)s=e[o=(o+1)%e.length];return a.reverse().join(t)}}function WZ(e){return function(t){return t.replace(/[0-9]/g,function(t){return e[+t]})}}var GZ=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function KZ(e){if(!(t=GZ.exec(e)))throw Error(`invalid format: `+e);var t;return new qZ({fill:t[1],align:t[2],sign:t[3],symbol:t[4],zero:t[5],width:t[6],comma:t[7],precision:t[8]&&t[8].slice(1),trim:t[9],type:t[10]})}KZ.prototype=qZ.prototype;function qZ(e){this.fill=e.fill===void 0?` `:e.fill+``,this.align=e.align===void 0?`>`:e.align+``,this.sign=e.sign===void 0?`-`:e.sign+``,this.symbol=e.symbol===void 0?``:e.symbol+``,this.zero=!!e.zero,this.width=e.width===void 0?void 0:+e.width,this.comma=!!e.comma,this.precision=e.precision===void 0?void 0:+e.precision,this.trim=!!e.trim,this.type=e.type===void 0?``:e.type+``}qZ.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?`0`:``)+(this.width===void 0?``:Math.max(1,this.width|0))+(this.comma?`,`:``)+(this.precision===void 0?``:`.`+Math.max(0,this.precision|0))+(this.trim?`~`:``)+this.type};function JZ(e){out:for(var t=e.length,n=1,r=-1,i;n<t;++n)switch(e[n]){case`.`:r=i=n;break;case`0`:r===0&&(r=n),i=n;break;default:if(!+e[n])break out;r>0&&(r=0)}return r>0?e.slice(0,r)+e.slice(i+1):e}var YZ;function XZ(e,t){var n=VZ(e,t);if(!n)return e+``;var r=n[0],i=n[1],a=i-(YZ=Math.max(-8,Math.min(8,Math.floor(i/3)))*3)+1,o=r.length;return a===o?r:a>o?r+Array(a-o+1).join(`0`):a>0?r.slice(0,a)+`.`+r.slice(a):`0.`+Array(1-a).join(`0`)+VZ(e,Math.max(0,t+a-1))[0]}function ZZ(e,t){var n=VZ(e,t);if(!n)return e+``;var r=n[0],i=n[1];return i<0?`0.`+Array(-i).join(`0`)+r:r.length>i+1?r.slice(0,i+1)+`.`+r.slice(i+1):r+Array(i-r.length+2).join(`0`)}var QZ={"%":function(e,t){return(e*100).toFixed(t)},b:function(e){return Math.round(e).toString(2)},c:function(e){return e+``},d:BZ,e:function(e,t){return e.toExponential(t)},f:function(e,t){return e.toFixed(t)},g:function(e,t){return e.toPrecision(t)},o:function(e){return Math.round(e).toString(8)},p:function(e,t){return ZZ(e*100,t)},r:ZZ,s:XZ,X:function(e){return Math.round(e).toString(16).toUpperCase()},x:function(e){return Math.round(e).toString(16)}};function $Z(e){return e}var eQ=Array.prototype.map,tQ=[`y`,`z`,`a`,`f`,`p`,`n`,`µ`,`m`,``,`k`,`M`,`G`,`T`,`P`,`E`,`Z`,`Y`];function nQ(e){var t=e.grouping===void 0||e.thousands===void 0?$Z:UZ(eQ.call(e.grouping,Number),e.thousands+``),n=e.currency===void 0?``:e.currency[0]+``,r=e.currency===void 0?``:e.currency[1]+``,i=e.decimal===void 0?`.`:e.decimal+``,a=e.numerals===void 0?$Z:WZ(eQ.call(e.numerals,String)),o=e.percent===void 0?`%`:e.percent+``,s=e.minus===void 0?`-`:e.minus+``,c=e.nan===void 0?`NaN`:e.nan+``;function l(e){e=KZ(e);var l=e.fill,u=e.align,d=e.sign,f=e.symbol,p=e.zero,m=e.width,h=e.comma,g=e.precision,_=e.trim,v=e.type;v===`n`?(h=!0,v=`g`):QZ[v]||(g===void 0&&(g=12),_=!0,v=`g`),(p||l===`0`&&u===`=`)&&(p=!0,l=`0`,u=`=`);var y=f===`$`?n:f===`#`&&/[boxX]/.test(v)?`0`+v.toLowerCase():``,b=f===`$`?r:/[%p]/.test(v)?o:``,x=QZ[v],S=/[defgprs%]/.test(v);g=g===void 0?6:/[gprs]/.test(v)?Math.max(1,Math.min(21,g)):Math.max(0,Math.min(20,g));function C(e){var n=y,r=b,o,f,C;if(v===`c`)r=x(e)+r,e=``;else{e=+e;var w=e<0||1/e<0;if(e=isNaN(e)?c:x(Math.abs(e),g),_&&(e=JZ(e)),w&&+e==0&&d!==`+`&&(w=!1),n=(w?d===`(`?d:s:d===`-`||d===`(`?``:d)+n,r=(v===`s`?tQ[8+YZ/3]:``)+r+(w&&d===`(`?`)`:``),S){for(o=-1,f=e.length;++o<f;)if(C=e.charCodeAt(o),48>C||C>57){r=(C===46?i+e.slice(o+1):e.slice(o))+r,e=e.slice(0,o);break}}}h&&!p&&(e=t(e,1/0));var T=n.length+e.length+r.length,E=T<m?Array(m-T+1).join(l):``;switch(h&&p&&(e=t(E+e,E.length?m-r.length:1/0),E=``),u){case`<`:e=n+e+r+E;break;case`=`:e=n+E+e+r;break;case`^`:e=E.slice(0,T=E.length>>1)+n+e+r+E.slice(T);break;default:e=E+n+e+r}return a(e)}return C.toString=function(){return e+``},C}function u(e,t){var n=l((e=KZ(e),e.type=`f`,e)),r=Math.max(-8,Math.min(8,Math.floor(HZ(t)/3)))*3,i=10**-r,a=tQ[8+r/3];return function(e){return n(i*e)+a}}return{format:l,formatPrefix:u}}var rQ,iQ;aQ({decimal:`.`,thousands:`,`,grouping:[3],currency:[`$`,``],minus:`-`});function aQ(e){return rQ=nQ(e),iQ=rQ.format,rQ.formatPrefix,rQ}var oQ=new Date,sQ=new Date;function cQ(e,t,n,r){function i(t){return e(t=arguments.length===0?new Date:new Date(+t)),t}return i.floor=function(t){return e(t=new Date(+t)),t},i.ceil=function(n){return e(n=new Date(n-1)),t(n,1),e(n),n},i.round=function(e){var t=i(e),n=i.ceil(e);return e-t<n-e?t:n},i.offset=function(e,n){return t(e=new Date(+e),n==null?1:Math.floor(n)),e},i.range=function(n,r,a){var o=[],s;if(n=i.ceil(n),a=a==null?1:Math.floor(a),!(n<r)||!(a>0))return o;do o.push(s=new Date(+n)),t(n,a),e(n);while(s<n&&n<r);return o},i.filter=function(n){return cQ(function(t){if(t>=t)for(;e(t),!n(t);)t.setTime(t-1)},function(e,r){if(e>=e)if(r<0)for(;++r<=0;)for(;t(e,-1),!n(e););else for(;--r>=0;)for(;t(e,1),!n(e););})},n&&(i.count=function(t,r){return oQ.setTime(+t),sQ.setTime(+r),e(oQ),e(sQ),Math.floor(n(oQ,sQ))},i.every=function(e){return e=Math.floor(e),!isFinite(e)||!(e>0)?null:e>1?i.filter(r?function(t){return r(t)%e===0}:function(t){return i.count(0,t)%e===0}):i}),i}var lQ=6e4,uQ=lQ*60*24,dQ=uQ*7;uQ*30,uQ*365;var fQ=cQ(e=>e.setHours(0,0,0,0),(e,t)=>e.setDate(e.getDate()+t),(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*lQ)/uQ,e=>e.getDate()-1);fQ.range;function pQ(e){return cQ(function(t){t.setDate(t.getDate()-(t.getDay()+7-e)%7),t.setHours(0,0,0,0)},function(e,t){e.setDate(e.getDate()+t*7)},function(e,t){return(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*lQ)/dQ})}var mQ=pQ(0),hQ=pQ(1),gQ=pQ(2),_Q=pQ(3),vQ=pQ(4),yQ=pQ(5),bQ=pQ(6);mQ.range,hQ.range,gQ.range,_Q.range,vQ.range,yQ.range,bQ.range;var xQ=cQ(function(e){e.setMonth(0,1),e.setHours(0,0,0,0)},function(e,t){e.setFullYear(e.getFullYear()+t)},function(e,t){return t.getFullYear()-e.getFullYear()},function(e){return e.getFullYear()});xQ.every=function(e){return!isFinite(e=Math.floor(e))||!(e>0)?null:cQ(function(t){t.setFullYear(Math.floor(t.getFullYear()/e)*e),t.setMonth(0,1),t.setHours(0,0,0,0)},function(t,n){t.setFullYear(t.getFullYear()+n*e)})},xQ.range;var SQ=cQ(function(e){e.setUTCHours(0,0,0,0)},function(e,t){e.setUTCDate(e.getUTCDate()+t)},function(e,t){return(t-e)/uQ},function(e){return e.getUTCDate()-1});SQ.range;function CQ(e){return cQ(function(t){t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7),t.setUTCHours(0,0,0,0)},function(e,t){e.setUTCDate(e.getUTCDate()+t*7)},function(e,t){return(t-e)/dQ})}var wQ=CQ(0),TQ=CQ(1),EQ=CQ(2),DQ=CQ(3),OQ=CQ(4),kQ=CQ(5),AQ=CQ(6);wQ.range,TQ.range,EQ.range,DQ.range,OQ.range,kQ.range,AQ.range;var jQ=cQ(function(e){e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},function(e,t){e.setUTCFullYear(e.getUTCFullYear()+t)},function(e,t){return t.getUTCFullYear()-e.getUTCFullYear()},function(e){return e.getUTCFullYear()});jQ.every=function(e){return!isFinite(e=Math.floor(e))||!(e>0)?null:cQ(function(t){t.setUTCFullYear(Math.floor(t.getUTCFullYear()/e)*e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},function(t,n){t.setUTCFullYear(t.getUTCFullYear()+n*e)})},jQ.range;function MQ(e){if(0<=e.y&&e.y<100){var t=new Date(-1,e.m,e.d,e.H,e.M,e.S,e.L);return t.setFullYear(e.y),t}return new Date(e.y,e.m,e.d,e.H,e.M,e.S,e.L)}function NQ(e){if(0<=e.y&&e.y<100){var t=new Date(Date.UTC(-1,e.m,e.d,e.H,e.M,e.S,e.L));return t.setUTCFullYear(e.y),t}return new Date(Date.UTC(e.y,e.m,e.d,e.H,e.M,e.S,e.L))}function PQ(e,t,n){return{y:e,m:t,d:n,H:0,M:0,S:0,L:0}}function FQ(e){var t=e.dateTime,n=e.date,r=e.time,i=e.periods,a=e.days,o=e.shortDays,s=e.months,c=e.shortMonths,l=HQ(i),u=UQ(i),d=HQ(a),f=UQ(a),p=HQ(o),m=UQ(o),h=HQ(s),g=UQ(s),_=HQ(c),v=UQ(c),y={a:N,A:P,b:F,B:I,c:null,d:u$,e:u$,f:h$,g:E$,G:O$,H:d$,I:f$,j:p$,L:m$,m:g$,M:_$,p:L,q:R,Q:Z$,s:Q$,S:v$,u:y$,U:b$,V:S$,w:C$,W:w$,x:null,X:null,y:T$,Y:D$,Z:k$,"%":X$},b={a:z,A:B,b:V,B:H,c:null,d:A$,e:A$,f:F$,g:K$,G:J$,H:j$,I:M$,j:N$,L:P$,m:I$,M:L$,p:ee,q:te,Q:Z$,s:Q$,S:R$,u:z$,U:B$,V:H$,w:U$,W:W$,x:null,X:null,y:G$,Y:q$,Z:Y$,"%":X$},x={a:E,A:D,b:O,B:k,c:A,d:e$,e:e$,f:o$,g:XQ,G:YQ,H:n$,I:n$,j:t$,L:a$,m:$Q,M:r$,p:T,q:QQ,Q:c$,s:l$,S:i$,u:GQ,U:KQ,V:qQ,w:WQ,W:JQ,x:j,X:M,y:XQ,Y:YQ,Z:ZQ,"%":s$};y.x=S(n,y),y.X=S(r,y),y.c=S(t,y),b.x=S(n,b),b.X=S(r,b),b.c=S(t,b);function S(e,t){return function(n){var r=[],i=-1,a=0,o=e.length,s,c,l;for(n instanceof Date||(n=new Date(+n));++i<o;)e.charCodeAt(i)===37&&(r.push(e.slice(a,i)),(c=IQ[s=e.charAt(++i)])==null?c=s===`e`?` `:`0`:s=e.charAt(++i),(l=t[s])&&(s=l(n,c)),r.push(s),a=i+1);return r.push(e.slice(a,i)),r.join(``)}}function C(e,t){return function(n){var r=PQ(1900,void 0,1),i=w(r,e,n+=``,0),a,o;if(i!=n.length)return null;if(`Q`in r)return new Date(r.Q);if(`s`in r)return new Date(r.s*1e3+(`L`in r?r.L:0));if(t&&!(`Z`in r)&&(r.Z=0),`p`in r&&(r.H=r.H%12+r.p*12),r.m===void 0&&(r.m=`q`in r?r.q:0),`V`in r){if(r.V<1||r.V>53)return null;`w`in r||(r.w=1),`Z`in r?(a=NQ(PQ(r.y,0,1)),o=a.getUTCDay(),a=o>4||o===0?TQ.ceil(a):TQ(a),a=SQ.offset(a,(r.V-1)*7),r.y=a.getUTCFullYear(),r.m=a.getUTCMonth(),r.d=a.getUTCDate()+(r.w+6)%7):(a=MQ(PQ(r.y,0,1)),o=a.getDay(),a=o>4||o===0?hQ.ceil(a):hQ(a),a=fQ.offset(a,(r.V-1)*7),r.y=a.getFullYear(),r.m=a.getMonth(),r.d=a.getDate()+(r.w+6)%7)}else(`W`in r||`U`in r)&&(`w`in r||(r.w=`u`in r?r.u%7:+(`W`in r)),o=`Z`in r?NQ(PQ(r.y,0,1)).getUTCDay():MQ(PQ(r.y,0,1)).getDay(),r.m=0,r.d=`W`in r?(r.w+6)%7+r.W*7-(o+5)%7:r.w+r.U*7-(o+6)%7);return`Z`in r?(r.H+=r.Z/100|0,r.M+=r.Z%100,NQ(r)):MQ(r)}}function w(e,t,n,r){for(var i=0,a=t.length,o=n.length,s,c;i<a;){if(r>=o)return-1;if(s=t.charCodeAt(i++),s===37){if(s=t.charAt(i++),c=x[s in IQ?t.charAt(i++):s],!c||(r=c(e,n,r))<0)return-1}else if(s!=n.charCodeAt(r++))return-1}return r}function T(e,t,n){var r=l.exec(t.slice(n));return r?(e.p=u.get(r[0].toLowerCase()),n+r[0].length):-1}function E(e,t,n){var r=p.exec(t.slice(n));return r?(e.w=m.get(r[0].toLowerCase()),n+r[0].length):-1}function D(e,t,n){var r=d.exec(t.slice(n));return r?(e.w=f.get(r[0].toLowerCase()),n+r[0].length):-1}function O(e,t,n){var r=_.exec(t.slice(n));return r?(e.m=v.get(r[0].toLowerCase()),n+r[0].length):-1}function k(e,t,n){var r=h.exec(t.slice(n));return r?(e.m=g.get(r[0].toLowerCase()),n+r[0].length):-1}function A(e,n,r){return w(e,t,n,r)}function j(e,t,r){return w(e,n,t,r)}function M(e,t,n){return w(e,r,t,n)}function N(e){return o[e.getDay()]}function P(e){return a[e.getDay()]}function F(e){return c[e.getMonth()]}function I(e){return s[e.getMonth()]}function L(e){return i[+(e.getHours()>=12)]}function R(e){return 1+~~(e.getMonth()/3)}function z(e){return o[e.getUTCDay()]}function B(e){return a[e.getUTCDay()]}function V(e){return c[e.getUTCMonth()]}function H(e){return s[e.getUTCMonth()]}function ee(e){return i[+(e.getUTCHours()>=12)]}function te(e){return 1+~~(e.getUTCMonth()/3)}return{format:function(e){var t=S(e+=``,y);return t.toString=function(){return e},t},parse:function(e){var t=C(e+=``,!1);return t.toString=function(){return e},t},utcFormat:function(e){var t=S(e+=``,b);return t.toString=function(){return e},t},utcParse:function(e){var t=C(e+=``,!0);return t.toString=function(){return e},t}}}var IQ={"-":``,_:` `,0:`0`},LQ=/^\s*\d+/,RQ=/^%/,zQ=/[\\^$*+?|[\]().{}]/g;function BQ(e,t,n){var r=e<0?`-`:``,i=(r?-e:e)+``,a=i.length;return r+(a<n?Array(n-a+1).join(t)+i:i)}function VQ(e){return e.replace(zQ,`\\$&`)}function HQ(e){return RegExp(`^(?:`+e.map(VQ).join(`|`)+`)`,`i`)}function UQ(e){return new Map(e.map((e,t)=>[e.toLowerCase(),t]))}function WQ(e,t,n){var r=LQ.exec(t.slice(n,n+1));return r?(e.w=+r[0],n+r[0].length):-1}function GQ(e,t,n){var r=LQ.exec(t.slice(n,n+1));return r?(e.u=+r[0],n+r[0].length):-1}function KQ(e,t,n){var r=LQ.exec(t.slice(n,n+2));return r?(e.U=+r[0],n+r[0].length):-1}function qQ(e,t,n){var r=LQ.exec(t.slice(n,n+2));return r?(e.V=+r[0],n+r[0].length):-1}function JQ(e,t,n){var r=LQ.exec(t.slice(n,n+2));return r?(e.W=+r[0],n+r[0].length):-1}function YQ(e,t,n){var r=LQ.exec(t.slice(n,n+4));return r?(e.y=+r[0],n+r[0].length):-1}function XQ(e,t,n){var r=LQ.exec(t.slice(n,n+2));return r?(e.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function ZQ(e,t,n){var r=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(t.slice(n,n+6));return r?(e.Z=r[1]?0:-(r[2]+(r[3]||`00`)),n+r[0].length):-1}function QQ(e,t,n){var r=LQ.exec(t.slice(n,n+1));return r?(e.q=r[0]*3-3,n+r[0].length):-1}function $Q(e,t,n){var r=LQ.exec(t.slice(n,n+2));return r?(e.m=r[0]-1,n+r[0].length):-1}function e$(e,t,n){var r=LQ.exec(t.slice(n,n+2));return r?(e.d=+r[0],n+r[0].length):-1}function t$(e,t,n){var r=LQ.exec(t.slice(n,n+3));return r?(e.m=0,e.d=+r[0],n+r[0].length):-1}function n$(e,t,n){var r=LQ.exec(t.slice(n,n+2));return r?(e.H=+r[0],n+r[0].length):-1}function r$(e,t,n){var r=LQ.exec(t.slice(n,n+2));return r?(e.M=+r[0],n+r[0].length):-1}function i$(e,t,n){var r=LQ.exec(t.slice(n,n+2));return r?(e.S=+r[0],n+r[0].length):-1}function a$(e,t,n){var r=LQ.exec(t.slice(n,n+3));return r?(e.L=+r[0],n+r[0].length):-1}function o$(e,t,n){var r=LQ.exec(t.slice(n,n+6));return r?(e.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function s$(e,t,n){var r=RQ.exec(t.slice(n,n+1));return r?n+r[0].length:-1}function c$(e,t,n){var r=LQ.exec(t.slice(n));return r?(e.Q=+r[0],n+r[0].length):-1}function l$(e,t,n){var r=LQ.exec(t.slice(n));return r?(e.s=+r[0],n+r[0].length):-1}function u$(e,t){return BQ(e.getDate(),t,2)}function d$(e,t){return BQ(e.getHours(),t,2)}function f$(e,t){return BQ(e.getHours()%12||12,t,2)}function p$(e,t){return BQ(1+fQ.count(xQ(e),e),t,3)}function m$(e,t){return BQ(e.getMilliseconds(),t,3)}function h$(e,t){return m$(e,t)+`000`}function g$(e,t){return BQ(e.getMonth()+1,t,2)}function _$(e,t){return BQ(e.getMinutes(),t,2)}function v$(e,t){return BQ(e.getSeconds(),t,2)}function y$(e){var t=e.getDay();return t===0?7:t}function b$(e,t){return BQ(mQ.count(xQ(e)-1,e),t,2)}function x$(e){var t=e.getDay();return t>=4||t===0?vQ(e):vQ.ceil(e)}function S$(e,t){return e=x$(e),BQ(vQ.count(xQ(e),e)+(xQ(e).getDay()===4),t,2)}function C$(e){return e.getDay()}function w$(e,t){return BQ(hQ.count(xQ(e)-1,e),t,2)}function T$(e,t){return BQ(e.getFullYear()%100,t,2)}function E$(e,t){return e=x$(e),BQ(e.getFullYear()%100,t,2)}function D$(e,t){return BQ(e.getFullYear()%1e4,t,4)}function O$(e,t){var n=e.getDay();return e=n>=4||n===0?vQ(e):vQ.ceil(e),BQ(e.getFullYear()%1e4,t,4)}function k$(e){var t=e.getTimezoneOffset();return(t>0?`-`:(t*=-1,`+`))+BQ(t/60|0,`0`,2)+BQ(t%60,`0`,2)}function A$(e,t){return BQ(e.getUTCDate(),t,2)}function j$(e,t){return BQ(e.getUTCHours(),t,2)}function M$(e,t){return BQ(e.getUTCHours()%12||12,t,2)}function N$(e,t){return BQ(1+SQ.count(jQ(e),e),t,3)}function P$(e,t){return BQ(e.getUTCMilliseconds(),t,3)}function F$(e,t){return P$(e,t)+`000`}function I$(e,t){return BQ(e.getUTCMonth()+1,t,2)}function L$(e,t){return BQ(e.getUTCMinutes(),t,2)}function R$(e,t){return BQ(e.getUTCSeconds(),t,2)}function z$(e){var t=e.getUTCDay();return t===0?7:t}function B$(e,t){return BQ(wQ.count(jQ(e)-1,e),t,2)}function V$(e){var t=e.getUTCDay();return t>=4||t===0?OQ(e):OQ.ceil(e)}function H$(e,t){return e=V$(e),BQ(OQ.count(jQ(e),e)+(jQ(e).getUTCDay()===4),t,2)}function U$(e){return e.getUTCDay()}function W$(e,t){return BQ(TQ.count(jQ(e)-1,e),t,2)}function G$(e,t){return BQ(e.getUTCFullYear()%100,t,2)}function K$(e,t){return e=V$(e),BQ(e.getUTCFullYear()%100,t,2)}function q$(e,t){return BQ(e.getUTCFullYear()%1e4,t,4)}function J$(e,t){var n=e.getUTCDay();return e=n>=4||n===0?OQ(e):OQ.ceil(e),BQ(e.getUTCFullYear()%1e4,t,4)}function Y$(){return`+0000`}function X$(){return`%`}function Z$(e){return+e}function Q$(e){return Math.floor(e/1e3)}var $$,e1,t1,n1;r1({dateTime:`%x, %X`,date:`%-m/%-d/%Y`,time:`%-I:%M:%S %p`,periods:[`AM`,`PM`],days:[`Sunday`,`Monday`,`Tuesday`,`Wednesday`,`Thursday`,`Friday`,`Saturday`],shortDays:[`Sun`,`Mon`,`Tue`,`Wed`,`Thu`,`Fri`,`Sat`],months:[`January`,`February`,`March`,`April`,`May`,`June`,`July`,`August`,`September`,`October`,`November`,`December`],shortMonths:[`Jan`,`Feb`,`Mar`,`Apr`,`May`,`Jun`,`Jul`,`Aug`,`Sep`,`Oct`,`Nov`,`Dec`]});function r1(e){return $$=FQ(e),e1=$$.format,t1=$$.parse,$$.utcFormat,n1=$$.utcParse,$$}var i1=o(((e,t)=>{var n=YV(),r=ZV(),i=qV();function a(e,t,a){for(var o=-1,s=t.length,c={};++o<s;){var l=t[o],u=n(e,l);a(u,l)&&r(c,i(l,e),u)}return c}t.exports=a})),a1=o(((e,t)=>{function n(e,t){return e!=null&&t in Object(e)}t.exports=n})),o1=o(((e,t)=>{var n=qV(),r=iV(),i=aV(),a=bV(),o=oV(),s=JV();function c(e,t,c){t=n(t,e);for(var l=-1,u=t.length,d=!1;++l<u;){var f=s(t[l]);if(!(d=e!=null&&c(e,f)))break;e=e[f]}return d||++l!=u?d:(u=e==null?0:e.length,!!u&&o(u)&&a(f,u)&&(i(e)||r(e)))}t.exports=c})),s1=o(((e,t)=>{var n=a1(),r=o1();function i(e,t){return e!=null&&r(e,t,n)}t.exports=i})),c1=o(((e,t)=>{var n=i1(),r=s1();function i(e,t){return n(e,t,function(t,n){return r(e,n)})}t.exports=i})),l1=o(((e,t)=>{function n(e,t){for(var n=-1,r=t.length,i=e.length;++n<r;)e[i+n]=t[n];return e}t.exports=n})),u1=o(((e,t)=>{var n=dB(),r=iV(),i=aV(),a=n?n.isConcatSpreadable:void 0;function o(e){return i(e)||r(e)||!!(a&&e&&e[a])}t.exports=o})),d1=o(((e,t)=>{var n=l1(),r=u1();function i(e,t,a,o,s){var c=-1,l=e.length;for(a||=r,s||=[];++c<l;){var u=e[c];t>0&&a(u)?t>1?i(u,t-1,a,o,s):n(s,u):o||(s[s.length]=u)}return s}t.exports=i})),f1=o(((e,t)=>{var n=d1();function r(e){return e!=null&&e.length?n(e,1):[]}t.exports=r})),p1=o(((e,t)=>{var n=f1(),r=AV(),i=PV();function a(e){return i(r(e,void 0,n),e+``)}t.exports=a})),m1=o(((e,t)=>{var n=c1();t.exports=p1()(function(e,t){return e==null?{}:n(e,t)})})),h1=o(((e,t)=>{function n(e,t){for(var n=-1,r=e==null?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}t.exports=n})),g1=o(((e,t)=>{var n=MW(),r=h1(),i=zW(),a=1,o=2;function s(e,t,s,c,l,u){var d=s&a,f=e.length,p=t.length;if(f!=p&&!(d&&p>f))return!1;var m=u.get(e),h=u.get(t);if(m&&h)return m==t&&h==e;var g=-1,_=!0,v=s&o?new n:void 0;for(u.set(e,t),u.set(t,e);++g<f;){var y=e[g],b=t[g];if(c)var x=d?c(b,y,g,t,e,u):c(y,b,g,e,t,u);if(x!==void 0){if(x)continue;_=!1;break}if(v){if(!r(t,function(e,t){if(!i(v,t)&&(y===e||l(y,e,s,c,u)))return v.push(t)})){_=!1;break}}else if(!(y===b||l(y,b,s,c,u))){_=!1;break}}return u.delete(e),u.delete(t),_}t.exports=s})),_1=o(((e,t)=>{function n(e){var t=-1,n=Array(e.size);return e.forEach(function(e,r){n[++t]=[r,e]}),n}t.exports=n})),v1=o(((e,t)=>{function n(e){var t=-1,n=Array(e.size);return e.forEach(function(e){n[++t]=e}),n}t.exports=n})),y1=o(((e,t)=>{var n=dB(),r=qB(),i=Qz(),a=g1(),o=_1(),s=v1(),c=1,l=2,u=`[object Boolean]`,d=`[object Date]`,f=`[object Error]`,p=`[object Map]`,m=`[object Number]`,h=`[object RegExp]`,g=`[object Set]`,_=`[object String]`,v=`[object Symbol]`,y=`[object ArrayBuffer]`,b=`[object DataView]`,x=n?n.prototype:void 0,S=x?x.valueOf:void 0;function C(e,t,n,x,C,w,T){switch(n){case b:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case y:return!(e.byteLength!=t.byteLength||!w(new r(e),new r(t)));case u:case d:case m:return i(+e,+t);case f:return e.name==t.name&&e.message==t.message;case h:case _:return e==t+``;case p:var E=o;case g:var D=x&c;if(E||=s,e.size!=t.size&&!D)return!1;var O=T.get(e);if(O)return O==t;x|=l,T.set(e,t);var k=a(E(e),E(t),x,C,w,T);return T.delete(e),k;case v:if(S)return S.call(e)==S.call(t)}return!1}t.exports=C})),b1=o(((e,t)=>{var n=l1(),r=aV();function i(e,t,i){var a=t(e);return r(e)?a:n(a,i(e))}t.exports=i})),x1=o(((e,t)=>{function n(e,t){for(var n=-1,r=e==null?0:e.length,i=0,a=[];++n<r;){var o=e[n];t(o,n,e)&&(a[i++]=o)}return a}t.exports=n})),S1=o(((e,t)=>{function n(){return[]}t.exports=n})),C1=o(((e,t)=>{var n=x1(),r=S1(),i=Object.prototype.propertyIsEnumerable,a=Object.getOwnPropertySymbols;t.exports=a?function(e){return e==null?[]:(e=Object(e),n(a(e),function(t){return i.call(e,t)}))}:r})),w1=o(((e,t)=>{t.exports=QB()(Object.keys,Object)})),T1=o(((e,t)=>{var n=eV(),r=w1(),i=Object.prototype.hasOwnProperty;function a(e){if(!n(e))return r(e);var t=[];for(var a in Object(e))i.call(e,a)&&a!=`constructor`&&t.push(a);return t}t.exports=a})),E1=o(((e,t)=>{var n=xV(),r=T1(),i=sV();function a(e){return i(e)?n(e):r(e)}t.exports=a})),D1=o(((e,t)=>{var n=b1(),r=C1(),i=E1();function a(e){return n(e,i,r)}t.exports=a})),O1=o(((e,t)=>{var n=D1(),r=1,i=Object.prototype.hasOwnProperty;function a(e,t,a,o,s,c){var l=a&r,u=n(e),d=u.length;if(d!=n(t).length&&!l)return!1;for(var f=d;f--;){var p=u[f];if(!(l?p in t:i.call(t,p)))return!1}var m=c.get(e),h=c.get(t);if(m&&h)return m==t&&h==e;var g=!0;c.set(e,t),c.set(t,e);for(var _=l;++f<d;){p=u[f];var v=e[p],y=t[p];if(o)var b=l?o(y,v,p,t,e,c):o(v,y,p,e,t,c);if(!(b===void 0?v===y||s(v,y,a,o,c):b)){g=!1;break}_||=p==`constructor`}if(g&&!_){var x=e.constructor,S=t.constructor;x!=S&&`constructor`in e&&`constructor`in t&&!(typeof x==`function`&&x instanceof x&&typeof S==`function`&&S instanceof S)&&(g=!1)}return c.delete(e),c.delete(t),g}t.exports=a})),k1=o(((e,t)=>{t.exports=SB()(uB(),`DataView`)})),A1=o(((e,t)=>{t.exports=SB()(uB(),`Promise`)})),j1=o(((e,t)=>{t.exports=SB()(uB(),`Set`)})),M1=o(((e,t)=>{t.exports=SB()(uB(),`WeakMap`)})),N1=o(((e,t)=>{var n=k1(),r=CB(),i=A1(),a=j1(),o=M1(),s=mB(),c=yB(),l=`[object Map]`,u=`[object Object]`,d=`[object Promise]`,f=`[object Set]`,p=`[object WeakMap]`,m=`[object DataView]`,h=c(n),g=c(r),_=c(i),v=c(a),y=c(o),b=s;(n&&b(new n(new ArrayBuffer(1)))!=m||r&&b(new r)!=l||i&&b(i.resolve())!=d||a&&b(new a)!=f||o&&b(new o)!=p)&&(b=function(e){var t=s(e),n=t==u?e.constructor:void 0,r=n?c(n):``;if(r)switch(r){case h:return m;case g:return l;case _:return d;case v:return f;case y:return p}return t}),t.exports=b})),P1=o(((e,t)=>{var n=BB(),r=g1(),i=y1(),a=O1(),o=N1(),s=aV(),c=uV(),l=hV(),u=1,d=`[object Arguments]`,f=`[object Array]`,p=`[object Object]`,m=Object.prototype.hasOwnProperty;function h(e,t,h,g,_,v){var y=s(e),b=s(t),x=y?f:o(e),S=b?f:o(t);x=x==d?p:x,S=S==d?p:S;var C=x==p,w=S==p,T=x==S;if(T&&c(e)){if(!c(t))return!1;y=!0,C=!1}if(T&&!C)return v||=new n,y||l(e)?r(e,t,h,g,_,v):i(e,t,x,h,g,_,v);if(!(h&u)){var E=C&&m.call(e,`__wrapped__`),D=w&&m.call(t,`__wrapped__`);if(E||D){var O=E?e.value():e,k=D?t.value():t;return v||=new n,_(O,k,h,g,v)}}return T?(v||=new n,a(e,t,h,g,_,v)):!1}t.exports=h})),F1=o(((e,t)=>{var n=P1(),r=nV();function i(e,t,a,o,s){return e===t?!0:e==null||t==null||!r(e)&&!r(t)?e!==e&&t!==t:n(e,t,a,o,i,s)}t.exports=i})),I1=o(((e,t)=>{var n=F1();function r(e,t){return n(e,t)}t.exports=r})),L1=l(VW(),1),R1=l(zZ(),1);aV();var z1=l(gB(),1),B1=l(dV(),1),V1=l(m1(),1),H1=l(I1(),1),U1=(0,w.createContext)(),W1=function(e){var t=e.children,n=e.animate,r=n===void 0||n,i=e.config,a=i===void 0?`default`:i,o=(0,w.useMemo)((function(){return{animate:r,config:(0,LH.default)(a)?mR[a]:a}}),[r,a]);return(0,G.jsx)(U1.Provider,{value:o,children:t})},G1=function(){return(0,w.useContext)(U1)},K1=function(e){var t=e.children,n=e.condition,r=e.wrapper;return n?(0,w.cloneElement)(r,{},t):t},q1={position:`relative`},J1=function(e){var t=e.children,n=e.theme,r=e.renderWrapper,i=r===void 0||r,a=e.isInteractive,o=a===void 0||a,s=e.animate,c=e.motionConfig,l=(0,w.useRef)(null);return(0,G.jsx)(hH,{theme:n,children:(0,G.jsx)(W1,{animate:s,config:c,children:(0,G.jsx)(IH,{container:l,children:(0,G.jsxs)(K1,{condition:i,wrapper:(0,G.jsx)(`div`,{style:q1,ref:l}),children:[t,o&&(0,G.jsx)(FH,{})]})})})})},Y1=function(e,t){return e.width===t.width&&e.height===t.height},X1=function(e){var t=e.children,n=e.width,r=e.height,i=e.onResize,a=e.debounceResize,o=XH({width:n,height:r},a,{equalityFn:Y1})[0];return(0,w.useEffect)((function(){i?.(o)}),[o,i]),(0,G.jsx)(G.Fragment,{children:t(o)})},Z1=function(e){var t=e.children,n=e.defaultWidth,r=e.defaultHeight,i=e.onResize,a=e.debounceResize,o=a===void 0?0:a;return(0,G.jsx)(qH,{defaultWidth:n,defaultHeight:r,children:function(e){var n=e.width,r=e.height;return(0,G.jsx)(X1,{width:n,height:r,onResize:i,debounceResize:o,children:t})}})};function Q1(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function $1(e,t){var n=typeof Symbol<`u`&&e[Symbol.iterator]||e[`@@iterator`];if(n)return(n=n.call(e)).next.bind(n);if(Array.isArray(e)||(n=function(e,t){if(e){if(typeof e==`string`)return Q1(e,t);var n={}.toString.call(e).slice(8,-1);return n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`?Array.from(e):n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Q1(e,t):void 0}}(e))||t&&e&&typeof e.length==`number`){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw TypeError(`Invalid attempt to iterate non-iterable instance.
91
+ `)&&(t=t.slice(0,-1))),super.equals(e,t,n)}};function bF(e,t,n){return yF.diff(e,t,n)}function xF(e,t){t.stripTrailingCr&&(e=e.replace(/\r\n/g,`
92
+ `));let n=[],r=e.split(/(\n|\r\n)/);r[r.length-1]||r.pop();for(let e=0;e<r.length;e++){let i=r[e];e%2&&!t.newlineIsToken?n[n.length-1]+=i:n.push(i)}return n}function SF(e){return e==`.`||e==`!`||e==`?`}new class extends rF{tokenize(e){let t=[],n=0;for(let r=0;r<e.length;r++){if(r==e.length-1){t.push(e.slice(n));break}if(SF(e[r])&&e[r+1].match(/\s/)){for(t.push(e.slice(n,r+1)),r=n=r+1;e[r+1]?.match(/\s/);)r++;t.push(e.slice(n,r+1)),n=r+1}}return t}},new class extends rF{tokenize(e){return e.split(/([{}:;,]|\s+)/)}},new class extends rF{constructor(){super(...arguments),this.tokenize=xF}get useLongestToken(){return!0}castInput(e,t){let{undefinedReplacement:n,stringifyReplacer:r=(e,t)=>t===void 0?n:t}=t;return typeof e==`string`?e:JSON.stringify(CF(e,null,null,r),null,` `)}equals(e,t,n){return super.equals(e.replace(/,([\r\n])/g,`$1`),t.replace(/,([\r\n])/g,`$1`),n)}};function CF(e,t,n,r,i){t||=[],n||=[],r&&(e=r(i===void 0?``:i,e));let a;for(a=0;a<t.length;a+=1)if(t[a]===e)return n[a];let o;if(Object.prototype.toString.call(e)===`[object Array]`){for(t.push(e),o=Array(e.length),n.push(o),a=0;a<e.length;a+=1)o[a]=CF(e[a],t,n,r,String(a));return t.pop(),n.pop(),o}if(e&&e.toJSON&&(e=e.toJSON()),typeof e==`object`&&e){t.push(e),o={},n.push(o);let i=[],s;for(s in e)Object.prototype.hasOwnProperty.call(e,s)&&i.push(s);for(i.sort(),a=0;a<i.length;a+=1)s=i[a],o[s]=CF(e[s],t,n,r,s);t.pop(),n.pop()}else o=e;return o}new class extends rF{tokenize(e){return e.slice()}join(e){return e}removeEmpty(e){return e}};var wF={diffPre:`_diffPre_1gs1p_1`,added:`_added_1gs1p_15`,removed:`_removed_1gs1p_20`,context:`_context_1gs1p_25`};function TF({oldContent:e,newContent:t}){let n=(0,w.useMemo)(()=>bF(e,t),[e,t]),r=(0,w.useMemo)(()=>{let e=0,t=0;for(let r of n){let n=(r.value.match(/\n/g)||[]).length;r.added&&(e+=n||1),r.removed&&(t+=n||1)}return{added:e,removed:t}},[n]);return(0,G.jsxs)(`div`,{children:[(0,G.jsxs)(El,{gap:`sm`,mb:`xs`,children:[(0,G.jsxs)(Y,{size:`xs`,c:`green`,fw:600,children:[`+`,r.added,` added`]}),(0,G.jsxs)(Y,{size:`xs`,c:`red`,fw:600,children:[`-`,r.removed,` removed`]})]}),(0,G.jsx)(`pre`,{className:wF.diffPre,children:n.map((e,t)=>{let n=e.added?wF.added:e.removed?wF.removed:wF.context;return(0,G.jsx)(`span`,{className:n,children:e.value},t)})})]})}var EF={wrap:`_wrap_816rm_4`,backBtn:`_backBtn_816rm_10`,docHeader:`_docHeader_816rm_16`,docTitle:`_docTitle_816rm_23`,docMeta:`_docMeta_816rm_32`,reviewPill:`_reviewPill_816rm_40`,dot:`_dot_816rm_54`,trashBanner:`_trashBanner_816rm_61`,docSplit:`_docSplit_816rm_75`,docRail:`_docRail_816rm_81`,contentHead:`_contentHead_816rm_90`,contentScroll:`_contentScroll_816rm_99`,docSource:`_docSource_816rm_103`,mdBody:`_mdBody_816rm_112`,chunkList:`_chunkList_816rm_117`,chunkItem:`_chunkItem_816rm_123`,chunkHead:`_chunkHead_816rm_129`,chunkBody:`_chunkBody_816rm_136`,railTitle:`_railTitle_816rm_146`,toc:`_toc_816rm_159`,tocLink:`_tocLink_816rm_166`,tocLvl2:`_tocLvl2_816rm_188`,tocLvl3:`_tocLvl3_816rm_192`,metaDl:`_metaDl_816rm_198`,metaTags:`_metaTags_816rm_214`,metaTag:`_metaTag_816rm_214`,verList:`_verList_816rm_237`,verRow:`_verRow_816rm_242`,verRowActive:`_verRowActive_816rm_250`,verRowTop:`_verRowTop_816rm_254`,verLink:`_verLink_816rm_259`,verMeta:`_verMeta_816rm_268`,verLock:`_verLock_816rm_274`,versionBanner:`_versionBanner_816rm_280`,actList:`_actList_816rm_285`,actRow:`_actRow_816rm_292`,actDot:`_actDot_816rm_297`,actAgent:`_actAgent_816rm_304`};function DF(e){return e.toLowerCase().replace(/[^a-z0-9]+/g,`-`).replace(/(^-|-$)/g,``)}function OF(e){return typeof e==`string`||typeof e==`number`?String(e):Array.isArray(e)?e.map(OF).join(``):e&&typeof e==`object`&&`props`in e?OF(e.props.children):``}function kF(e){let t=[],n=!1;for(let r of e.split(`
93
+ `)){if(r.startsWith("```")){n=!n;continue}if(n)continue;let e=r.match(/^(#{1,3})\s+(.+?)\s*#*$/);e&&t.push({level:e[1].length,text:e[2],id:DF(e[2])})}return t}function AF(e){switch(e){case`create`:return`var(--green)`;case`update-content`:return`var(--blue)`;case`update-metadata`:return`var(--blue)`;case`delete`:return`var(--red)`;case`status-change`:return`var(--yellow)`;case`archive`:return`var(--violet)`;case`unarchive`:return`var(--primary)`;default:return`var(--text-faint)`}}function jF(e){let t=(e??`manual`).toLowerCase();return t===`agent`?{icon:MC,label:`agent`,agent:!0}:t===`cli`?{icon:FC,label:`cli`,agent:!1}:t===`url`?{icon:vC,label:`url`,agent:!1}:{icon:EC,label:t,agent:!1}}function MF(){let{id:e}=Ax(),[t]=JS(),n=t.get(`version`),r=Ex(),i=Gy(),[a,o]=(0,w.useState)(!1),[s,c]=(0,w.useState)(!1),[l,u]=(0,w.useState)(`rendered`),{data:d,isLoading:f,error:p}=Yy({queryKey:[`document`,e,n],queryFn:()=>Gw(e,n??void 0),enabled:!!e}),{data:m,isLoading:h}=Yy({queryKey:[`document-chunks`,e],queryFn:()=>Kw(e),enabled:!!e}),{data:g}=Yy({queryKey:[`document-audit`,e],queryFn:()=>lw({document_id:e,limit:50}),enabled:!!e}),{data:_}=qP(),v=new Map(_?.map(e=>[e.id,e.name])??[]),y=()=>VP(i,e),b=Xy({mutationFn:()=>Jw(e),onSuccess:()=>{y(),YP(`Document moved to trash`),r(`/`)},onError:e=>XP(`Delete failed`,String(e))}),x=Xy({mutationFn:()=>tF(e),onSuccess:()=>{y(),YP(`Document restored`)},onError:e=>XP(`Restore failed`,String(e))}),S=Xy({mutationFn:()=>nF(e),onSuccess:()=>{y(),YP(`Document permanently deleted`),r(`/trash`)},onError:e=>XP(`Purge failed`,String(e))}),C=Xy({mutationFn:t=>uw(e,t),onSuccess:(e,t)=>{y(),YP(`Review status updated`,t===`approved`?`Approved`:`Pending review`)},onError:e=>XP(`Status update failed`,String(e))}),T=Xy({mutationFn:({versionId:t,archived:n})=>dw(e,t,n),onSuccess:(t,{archived:n})=>{i.invalidateQueries({queryKey:[`document`,e]}),YP(n?`Version archived`:`Protection removed`)},onError:e=>XP(`Archive update failed`,String(e))}),[E,D]=(0,w.useState)(null),[O,k]=(0,w.useState)(null),[A,j]=(0,w.useState)(``),M=async(t,n)=>{D(t),j(`v${n}`);try{let n=await Zw(e,t);k(n.full_content)}catch{XP(`Failed to load version content`),D(null)}},N=(0,w.useMemo)(()=>d?kF(d.full_content):[],[d]),P=(0,w.useMemo)(()=>({a:e=>(0,G.jsx)(RP,{...e,fromDocId:d?.document_id}),h1:({children:e})=>(0,G.jsx)(`h1`,{id:DF(OF(e)),children:e}),h2:({children:e})=>(0,G.jsx)(`h2`,{id:DF(OF(e)),children:e}),h3:({children:e})=>(0,G.jsx)(`h3`,{id:DF(OF(e)),children:e})}),[d?.document_id]),F=e=>{u(`rendered`),setTimeout(()=>{document.getElementById(e)?.scrollIntoView({behavior:`smooth`,block:`start`})},50)};if(f)return(0,G.jsx)(`div`,{className:EF.wrap,children:(0,G.jsx)(`div`,{style:{display:`flex`,justifyContent:`center`,marginTop:60},children:(0,G.jsx)(cl,{})})});if(p||!d)return(0,G.jsx)(`div`,{className:EF.wrap,children:(0,G.jsx)(`p`,{style:{color:`var(--red)`,marginTop:40},children:p?String(p):`Document not found.`})});let I=Object.entries(d.doc_metadata||{}),L=d.review_status===`approved`,R=jF(d.doc_source),z=R.icon,B=n?d.versions.find(e=>e.version_id===n):void 0,V=!!B,H=V&&l===`chunks`?`rendered`:l;return(0,G.jsxs)(`div`,{className:EF.wrap,children:[(0,G.jsxs)(`button`,{type:`button`,className:`${X.btn} ${X.btnSubtle} ${EF.backBtn}`,onClick:()=>r(-1),children:[(0,G.jsx)(oC,{size:15}),`Back`]}),(0,G.jsxs)(`div`,{className:`${EF.docHeader} ${X.rise}`,children:[(0,G.jsxs)(`div`,{style:{minWidth:0,flex:1},children:[(0,G.jsx)(`p`,{className:X.eyebrow,children:`Document`}),(0,G.jsx)(`div`,{className:X.row,style:{gap:8,marginBottom:8,flexWrap:`wrap`},children:d.project_ids.filter(e=>v.has(e)).map(e=>(0,G.jsx)(`button`,{type:`button`,className:`${X.badge} ${X.bNeutral}`,style:{cursor:`pointer`,border:`1px solid transparent`},title:`View documents in ${v.get(e)}`,onClick:()=>r(`/projects/${e}/documents`),children:v.get(e)},e))}),(0,G.jsx)(`h1`,{className:EF.docTitle,children:d.doc_title||`Untitled`}),(0,G.jsxs)(`div`,{className:EF.docMeta,children:[(0,G.jsx)(a_,{label:`Origin — how this document was added`,openDelay:120,withArrow:!0,position:`top`,children:(0,G.jsxs)(`span`,{className:`${X.srcChip} ${R.agent?X.srcChipAgent:``}`,children:[(0,G.jsx)(z,{size:12}),R.label]})}),(0,G.jsxs)(`span`,{className:`${X.mono} ${X.faint}`,children:[d.chunk_count,` chunks`]}),(0,G.jsxs)(`span`,{className:`${X.mono} ${X.faint}`,children:[d.total_chars.toLocaleString(),` chars`]}),d.updated_at&&(0,G.jsxs)(`span`,{className:`${X.mono} ${X.faint}`,children:[`updated `,Sw(d.updated_at)]}),!d.deleted_at&&!V&&(0,G.jsxs)(`button`,{type:`button`,className:EF.reviewPill,title:`Click to toggle review status`,onClick:()=>C.mutate(L?`pending_review`:`approved`),disabled:C.isPending,children:[(0,G.jsx)(`span`,{className:`dot`,style:{width:7,height:7,borderRadius:`50%`,background:L?`var(--green)`:`var(--yellow)`}}),L?`Approved`:`Pending`]})]})]}),(0,G.jsx)(`div`,{className:X.row,style:{gap:8,flexShrink:0},children:V?(0,G.jsxs)(G.Fragment,{children:[(0,G.jsxs)(`a`,{className:`${X.btn} ${X.btnGhost}`,href:Qw(e,B.version_id),children:[(0,G.jsx)(gC,{size:14}),`Download`]}),(0,G.jsxs)(`button`,{type:`button`,className:`${X.btn} ${X.btnGhost} ${B.archived?X.btnWarn:``}`,title:B.archived?`Remove protection — this version becomes eligible for cleanup`:`Protect this version from automatic cleanup`,onClick:()=>T.mutate({versionId:B.version_id,archived:!B.archived}),disabled:T.isPending,children:[B.archived?(0,G.jsx)(wC,{size:14}):(0,G.jsx)(TC,{size:14}),B.archived?`Unprotect`:`Protect`]})]}):(0,G.jsxs)(G.Fragment,{children:[(0,G.jsxs)(`a`,{className:`${X.btn} ${X.btnGhost}`,href:Qw(e),children:[(0,G.jsx)(gC,{size:14}),`Download`]}),d.deleted_at?(0,G.jsxs)(G.Fragment,{children:[(0,G.jsxs)(`button`,{type:`button`,className:`${X.btn} ${X.btnGhost} ${X.btnWarn}`,title:`Restore from trash`,onClick:()=>x.mutate(),children:[(0,G.jsx)(aC,{size:14}),`Restore`]}),s?(0,G.jsxs)(`div`,{className:X.row,style:{gap:6},children:[(0,G.jsx)(`button`,{type:`button`,className:X.btn,style:{background:`var(--red)`,color:`#fff`},onClick:()=>S.mutate(),children:`Confirm purge`}),(0,G.jsx)(`button`,{type:`button`,className:`${X.btn} ${X.btnSubtle}`,onClick:()=>c(!1),children:`Cancel`})]}):(0,G.jsxs)(`button`,{type:`button`,className:`${X.btn} ${X.btnGhost} ${X.btnDanger}`,title:`Permanently delete (cannot be undone)`,onClick:()=>c(!0),children:[(0,G.jsx)(IC,{size:14}),`Purge`]})]}):(0,G.jsxs)(G.Fragment,{children:[(0,G.jsxs)(`button`,{type:`button`,className:`${X.btn} ${X.btnGhost}`,onClick:()=>r(`/document/${e}/edit`),children:[(0,G.jsx)(_C,{size:14}),`Edit`]}),a?(0,G.jsxs)(`div`,{className:X.row,style:{gap:6},children:[(0,G.jsx)(`button`,{type:`button`,className:X.btn,style:{background:`var(--red)`,color:`#fff`},onClick:()=>b.mutate(),children:`Confirm`}),(0,G.jsx)(`button`,{type:`button`,className:`${X.btn} ${X.btnSubtle}`,onClick:()=>o(!1),children:`Cancel`})]}):(0,G.jsxs)(`button`,{type:`button`,className:`${X.btn} ${X.btnGhost} ${X.btnDanger}`,title:`Delete document`,onClick:()=>o(!0),children:[(0,G.jsx)(IC,{size:14}),`Delete`]})]})]})})]}),V&&(0,G.jsxs)(`div`,{className:`${EF.trashBanner} ${EF.versionBanner}`,children:[(0,G.jsxs)(`div`,{className:X.row,style:{gap:8},children:[(0,G.jsxs)(`span`,{className:`${X.badge} ${X.bBlue}`,children:[(0,G.jsx)(xC,{size:12}),`This is a previous version: v`,B.version_number]}),(0,G.jsxs)(`span`,{style:{fontSize:13},children:[`Read-only snapshot from `,new Date(B.created_at).toLocaleDateString(),`.`,B.archived?` Protected from cleanup.`:``]})]}),(0,G.jsx)(`button`,{type:`button`,className:`${X.btn} ${X.btnSubtle}`,onClick:()=>r(`/document/${e}`),children:`View current version`})]}),d.deleted_at&&(0,G.jsx)(`div`,{className:EF.trashBanner,children:(0,G.jsxs)(`div`,{className:X.row,style:{gap:8},children:[(0,G.jsx)(`span`,{className:`${X.badge} ${X.bNeutral}`,style:{background:`var(--red)`,color:`#fff`},children:`In trash`}),(0,G.jsxs)(`span`,{style:{fontSize:13},children:[`Deleted `,d.deleted_at.slice(0,10),` — excluded from search until restored. Use Restore or Purge above.`]})]})}),(0,G.jsxs)(`div`,{className:EF.docSplit,children:[(0,G.jsx)(`div`,{className:X.rise,style:{minWidth:0},children:(0,G.jsxs)(`div`,{className:X.card,children:[(0,G.jsxs)(`div`,{className:EF.contentHead,children:[(0,G.jsxs)(`div`,{className:X.seg,children:[(0,G.jsxs)(`button`,{type:`button`,className:`${X.segBtn} ${H===`rendered`?X.segBtnOn:``}`,onClick:()=>u(`rendered`),children:[(0,G.jsx)(vC,{size:14}),`Rendered`]}),(0,G.jsxs)(`button`,{type:`button`,className:`${X.segBtn} ${H===`source`?X.segBtnOn:``}`,onClick:()=>u(`source`),children:[(0,G.jsx)(FC,{size:14}),`Source`]}),!V&&(0,G.jsxs)(`button`,{type:`button`,className:`${X.segBtn} ${H===`chunks`?X.segBtnOn:``}`,onClick:()=>u(`chunks`),children:[(0,G.jsx)(NC,{size:14}),`Chunks`]})]}),(0,G.jsxs)(`span`,{className:`${X.mono} ${X.faint}`,style:{fontSize:12},children:[d.total_chars.toLocaleString(),` chars`]})]}),(0,G.jsx)(`div`,{className:X.divider}),(0,G.jsxs)(`div`,{className:EF.contentScroll,children:[H===`rendered`&&(0,G.jsx)(`div`,{className:EF.mdBody,children:(0,G.jsx)(`div`,{className:zP.markdown,children:(0,G.jsx)(Mj,{remarkPlugins:[FP],components:P,children:d.full_content||`*(empty)*`})})}),H===`source`&&(0,G.jsx)(`pre`,{className:EF.docSource,children:d.full_content}),H===`chunks`&&(0,G.jsx)(`div`,{className:EF.chunkList,children:h?(0,G.jsx)(`div`,{style:{padding:18},children:(0,G.jsx)(cl,{size:`sm`})}):m?.map((e,t)=>(0,G.jsxs)(`div`,{className:EF.chunkItem,children:[(0,G.jsxs)(`div`,{className:`${EF.chunkHead} ${X.mono}`,children:[(0,G.jsxs)(`span`,{className:`${X.badge} ${X.bNeutral}`,children:[`chunk `,t+1]}),(0,G.jsx)(`span`,{className:X.faint,children:e.heading_path.length>0?e.heading_path.join(` › `):`(preamble)`})]}),(0,G.jsx)(`p`,{className:EF.chunkBody,children:e.content})]},e.chunk_id))})]})]})}),(0,G.jsxs)(`aside`,{className:EF.docRail,children:[N.length>0&&(0,G.jsxs)(`div`,{className:`${X.card} ${X.cardPad} ${X.rise}`,children:[(0,G.jsx)(`div`,{className:EF.railTitle,children:`Contents`}),(0,G.jsx)(`div`,{className:EF.toc,children:N.map((e,t)=>(0,G.jsx)(`button`,{type:`button`,className:`${EF.tocLink} ${e.level===2?EF.tocLvl2:``} ${e.level===3?EF.tocLvl3:``}`,onClick:()=>F(e.id),children:e.text},t))})]}),(0,G.jsxs)(`div`,{className:`${X.card} ${X.cardPad} ${X.rise}`,children:[(0,G.jsx)(`div`,{className:EF.railTitle,children:`Details`}),(0,G.jsxs)(`dl`,{className:EF.metaDl,children:[d.created_at&&(0,G.jsxs)(G.Fragment,{children:[(0,G.jsx)(`dt`,{children:`Created`}),(0,G.jsx)(`dd`,{children:new Date(d.created_at).toLocaleDateString()})]}),d.updated_at&&(0,G.jsxs)(G.Fragment,{children:[(0,G.jsx)(`dt`,{children:`Updated`}),(0,G.jsx)(`dd`,{children:new Date(d.updated_at).toLocaleDateString()})]}),(0,G.jsx)(`dt`,{children:`Origin`}),(0,G.jsx)(`dd`,{className:X.mono,children:d.doc_source??`manual`})]}),I.length>0&&(0,G.jsxs)(G.Fragment,{children:[(0,G.jsx)(`div`,{className:X.divider,style:{margin:`12px 0`}}),(0,G.jsx)(`div`,{className:EF.railTitle,style:{marginBottom:8},children:`Metadata`}),(0,G.jsx)(`div`,{className:EF.metaTags,children:I.map(([e,t])=>(0,G.jsxs)(`span`,{className:EF.metaTag,children:[(0,G.jsxs)(`b`,{children:[e,`:`]}),String(t)]},e))})]})]}),d.versions.length>0&&(0,G.jsxs)(`div`,{className:`${X.card} ${X.cardPad} ${X.rise}`,children:[(0,G.jsxs)(`div`,{className:EF.railTitle,children:[`Versions `,(0,G.jsx)(`span`,{className:X.countPill,children:d.versions.length}),(0,G.jsxs)(el,{width:240,position:`bottom-end`,withArrow:!0,shadow:`md`,children:[(0,G.jsx)(el.Target,{children:(0,G.jsx)(`button`,{type:`button`,className:X.whatis,style:{marginLeft:`auto`},children:`what's protection?`})}),(0,G.jsx)(el.Dropdown,{children:(0,G.jsx)(Y,{size:`xs`,c:`dimmed`,children:`Archived (protected) versions are kept indefinitely and excluded from automatic cleanup. Unprotected older versions may be pruned by retention. Toggle protection from a version's ⋯ menu.`})})]})]}),(0,G.jsx)(`div`,{className:EF.verList,children:d.versions.map(t=>{let i=t.version_id===n;return(0,G.jsxs)(`div`,{className:`${EF.verRow} ${i?EF.verRowActive:``}`,children:[(0,G.jsxs)(`div`,{className:EF.verRowTop,children:[(0,G.jsxs)(`button`,{type:`button`,className:`${X.badge} ${i?X.bPrimary:X.bNeutral} ${X.mono} ${EF.verLink}`,title:i?`Currently viewing this version`:`View version v${t.version_number}`,onClick:()=>r(`/document/${e}?version=${t.version_id}`),children:[`v`,t.version_number]}),(0,G.jsx)(`span`,{className:`${X.faint} ${X.mono}`,style:{fontSize:11},children:new Date(t.created_at).toLocaleDateString()}),t.archived&&(0,G.jsx)(`span`,{className:EF.verLock,title:`Archived — protected from cleanup`,children:(0,G.jsx)(TC,{size:12})}),(0,G.jsxs)(Jm,{position:`bottom-end`,withinPortal:!0,shadow:`md`,width:180,children:[(0,G.jsx)(Jm.Target,{children:(0,G.jsx)(`button`,{type:`button`,className:X.iconBtn,style:{width:26,height:26,marginLeft:`auto`},"aria-label":`Version actions`,children:(0,G.jsx)(hC,{size:14})})}),(0,G.jsxs)(Jm.Dropdown,{children:[(0,G.jsx)(Jm.Item,{leftSection:(0,G.jsx)(xC,{size:14}),onClick:()=>r(`/document/${e}?version=${t.version_id}`),children:`Open this version`}),(0,G.jsx)(Jm.Item,{leftSection:(0,G.jsx)(cC,{size:14}),onClick:()=>M(t.version_id,t.version_number),children:`Diff vs current`}),(0,G.jsx)(Jm.Item,{leftSection:(0,G.jsx)(gC,{size:14}),component:`a`,href:Qw(e,t.version_id),children:`Download`}),(0,G.jsx)(Jm.Item,{leftSection:(0,G.jsx)(TC,{size:14}),color:t.archived?`yellow`:void 0,onClick:()=>T.mutate({versionId:t.version_id,archived:!t.archived}),children:t.archived?`Remove protection`:`Archive (protect)`})]})]})]}),(0,G.jsxs)(`span`,{className:EF.verMeta,children:[t.chunk_count,` chunks · `,t.total_chars.toLocaleString(),` chars`]})]},t.version_id)})})]}),(0,G.jsxs)(`div`,{className:`${X.card} ${X.cardPad} ${X.rise}`,children:[(0,G.jsx)(`div`,{className:EF.railTitle,children:`Activity`}),g?.length?(0,G.jsx)(`div`,{className:EF.actList,children:g.map(e=>{let t=e.size_before!=null&&e.size_after!=null?e.size_after-e.size_before:0;return(0,G.jsxs)(`div`,{className:EF.actRow,children:[(0,G.jsx)(`span`,{className:EF.actDot,style:{background:AF(e.operation)}}),(0,G.jsxs)(`div`,{className:X.col,style:{gap:2,minWidth:0},children:[(0,G.jsx)(`span`,{style:{fontSize:12.5},children:e.description||e.operation}),(0,G.jsxs)(`span`,{className:X.faint,style:{fontSize:11},children:[(0,G.jsx)(`span`,{className:e.author_type===`agent`?EF.actAgent:``,children:e.author}),` `,`· `,new Date(e.created_at).toLocaleDateString(),t>0&&(0,G.jsxs)(`span`,{className:X.mono,style:{color:`var(--green)`},children:[` `,`+`,t.toLocaleString()]})]})]})]},e.id)})}):(0,G.jsx)(`span`,{className:X.faint,style:{fontSize:12},children:`No recorded activity.`})]})]})]}),(0,G.jsx)(lh,{opened:E!==null&&O!==null,onClose:()=>{D(null),k(null)},title:`Diff: ${A} vs current`,size:`xl`,children:O!==null&&(0,G.jsx)(TF,{oldContent:O,newContent:d.full_content,oldLabel:A,newLabel:`Current`})})]})}var NF={readme:`Project overview`,"agent-guide":`Agent integration`,guide:`Guides`},PF=[`readme`,`agent-guide`,`guide`],FF={readme:(0,G.jsx)(vC,{size:16}),"agent-guide":(0,G.jsx)(AC,{size:16}),guide:(0,G.jsx)(lC,{size:16})};function IF(){let e=Ex(),{"*":t}=Ax(),n=Yy({queryKey:[`docs`,`index`],queryFn:ew,staleTime:1/0}),r=n.data??[],[i,a]=(0,w.useState)(``),o=(0,w.useMemo)(()=>{let e=i.trim().toLowerCase();return e?r.filter(t=>t.title.toLowerCase().includes(e)||t.path.toLowerCase().includes(e)):r},[r,i]),s=t&&t.length>0?t:r[0]?.path,c=Yy({queryKey:[`docs`,`content`,s],queryFn:()=>tw(s),staleTime:1/0,enabled:!!s}),l=(0,w.useMemo)(()=>{let e={};for(let t of o)(e[t.category]??=[]).push(t);return e},[o]);return n.isLoading?(0,G.jsx)(Pp,{py:`xl`,children:(0,G.jsx)(cl,{})}):n.isError?(0,G.jsx)(Pp,{py:`xl`,children:(0,G.jsx)(Nd,{color:`red`,title:`Could not load documentation`,children:n.error.message})}):r.length===0?(0,G.jsx)(Pp,{py:`xl`,children:(0,G.jsxs)(Nd,{color:`yellow`,title:`No bundled docs available`,children:[`This Cerefox install did not ship with bundled documentation. Check that the wheel was built with the`,` `,(0,G.jsx)(`code`,{children:`[tool.hatch.build.targets.wheel.force-include]`}),` block intact, or run from a repo checkout.`]})}):(0,G.jsxs)(Pp,{fluid:!0,py:`xs`,children:[(0,G.jsx)(`p`,{className:X.eyebrow,children:`Reference`}),(0,G.jsxs)(Jp,{gap:`md`,children:[(0,G.jsx)(Jp.Col,{span:{base:12,md:3},children:(0,G.jsxs)(w_,{gap:2,children:[(0,G.jsx)(z_,{order:5,mb:`xs`,children:`Help`}),(0,G.jsx)(M_,{placeholder:`Filter guides…`,value:i,onChange:e=>a(e.currentTarget.value),leftSection:(0,G.jsx)(jC,{size:14}),size:`xs`,mb:`sm`}),o.length===0&&(0,G.jsxs)(Y,{size:`xs`,c:`dimmed`,children:[`No guides match "`,i,`".`]}),PF.filter(e=>l[e]?.length).map(t=>(0,G.jsxs)(w_,{gap:0,mb:`sm`,children:[(0,G.jsxs)(El,{gap:6,mb:4,mt:6,children:[FF[t],(0,G.jsx)(Y,{size:`xs`,c:`dimmed`,tt:`uppercase`,fw:600,children:NF[t]??t})]}),l[t].map(t=>(0,G.jsx)(Ah,{label:t.title,description:t.path,active:t.path===s,onClick:()=>e(`/help/${t.path}`)},t.path))]},t))]})}),(0,G.jsxs)(Jp.Col,{span:{base:12,md:9},children:[c.isLoading&&(0,G.jsx)(cl,{}),c.isError&&(0,G.jsx)(Nd,{color:`red`,title:`Could not load ${s}`,children:c.error.message}),c.data&&(0,G.jsxs)(w_,{gap:`sm`,children:[(0,G.jsxs)(El,{justify:`space-between`,align:`flex-end`,wrap:`nowrap`,children:[(0,G.jsx)(z_,{order:3,children:r.find(e=>e.path===s)?.title??s}),(0,G.jsxs)(El,{gap:`sm`,wrap:`nowrap`,children:[(0,G.jsx)(fw,{cmd:`cerefox guides show`,args:s}),(0,G.jsx)(Bd,{size:`xs`,c:`dimmed`,href:`/api/v1/docs/${s}`,target:`_blank`,rel:`noopener noreferrer`,children:`raw`})]})]}),(0,G.jsx)(BP,{content:c.data,showToggle:!1,maxHeight:`calc(100vh - 170px)`})]})]})]})]})}var LF={wrap:`_wrap_1arvn_4`,split:`_split_1arvn_10`,col:`_col_1arvn_16`,field:`_field_1arvn_23`,input:`_input_1arvn_30`,textarea:`_textarea_1arvn_49`,preview:`_preview_1arvn_56`,dropZone:`_dropZone_1arvn_61`,dropZoneOver:`_dropZoneOver_1arvn_75`,dropZoneHas:`_dropZoneHas_1arvn_79`,dropIco:`_dropIco_1arvn_83`,toggleRow:`_toggleRow_1arvn_94`,toggle:`_toggle_1arvn_94`,toggleOn:`_toggleOn_1arvn_119`,steps:`_steps_1arvn_128`,faint:`_faint_1arvn_149`,stepN:`_stepN_1arvn_154`,actions:`_actions_1arvn_168`},RF=[`--primary`,`--violet`,`--blue`,`--green`,`--yellow`,`--red`];function zF(){let e=Ex(),t=Gy(),{data:n}=qP(),{data:r}=JP(),i=(0,w.useRef)(null),[a,o]=(0,w.useState)(`paste`),[s,c]=(0,w.useState)(``),[l,u]=(0,w.useState)([]),[d,f]=(0,w.useState)(``),[p,m]=(0,w.useState)([]),[h,g]=(0,w.useState)(!1),[_,v]=(0,w.useState)(``),[y,b]=(0,w.useState)(`edit`),[x,S]=(0,w.useState)(null),[C,T]=(0,w.useState)(!1),[E,D]=(0,w.useState)(null),[O,k]=(0,w.useState)(null),A=()=>{let e={};for(let t of p)t.key.trim()&&t.value.trim()&&(e[t.key.trim()]=t.value.trim());return e},j=e=>{k(e),e.success&&VP(t),e.skipped&&e.note&&XP(`Ingest skipped`,e.note)},M=e=>{ZP(e)||XP(`Ingest failed`,e instanceof Error?e.message:String(e))},N=Xy({mutationFn:()=>Yw({title:s,content:_,update_existing:h,project_ids:l,metadata:A()}),onSuccess:j,onError:M}),P=Xy({mutationFn:async()=>{if(!x)throw Error(`No file selected`);let e=new FormData;e.append(`file`,x),s.trim()&&e.append(`title`,s.trim()),e.append(`update_existing`,String(h)),l.length>0&&e.append(`project_ids`,l.join(`,`));let t=A();Object.keys(t).length>0&&e.append(`metadata`,JSON.stringify(t));let n=await fetch(`/api/v1/ingest/file`,{method:`POST`,body:e});if(!n.ok)throw await GC(n)||Error(await KC(n));return n.json()},onSuccess:j,onError:M}),F=async e=>{if(S(e),D(null),e?.name)try{let t=await Xw(e.name);D(t),t.exists&&g(!0)}catch{}},I=e=>u(t=>t.includes(e)?t.filter(t=>t!==e):[...t,e]),L=()=>a===`file`?P.mutate():N.mutate(),R=N.isPending||P.isPending,z=a===`file`?!!x:s.trim().length>0&&_.trim().length>0,B=a===`paste`?Math.round(_.length/700):x?Math.round(x.size/700):0,V=n?.find(e=>e.id===l[0])?.name??`core-platform`,H=n??[],ee=d?H.filter(e=>e.name.toLowerCase().includes(d.toLowerCase())):H;return(0,G.jsxs)(`div`,{className:LF.wrap,children:[(0,G.jsx)(`div`,{className:X.pageHead,children:(0,G.jsxs)(`div`,{children:[(0,G.jsx)(`p`,{className:X.eyebrow,children:`Add to memory`}),(0,G.jsx)(`h1`,{className:X.pageTitle,"data-testid":`page-title`,children:`Ingest content`})]})}),O?.success&&(0,G.jsxs)(Nd,{icon:(0,G.jsx)(uC,{size:16}),title:O.updated?`Updated`:`Ingested`,color:`green`,mb:`md`,withCloseButton:!0,onClose:()=>k(null),children:[O.updated?`"${O.title}" updated and re-indexed.`:`"${O.title}" ingested successfully.`,` `,O.document_id&&(0,G.jsx)(`span`,{style:{cursor:`pointer`,textDecoration:`underline`,color:`var(--primary)`},onClick:()=>e(`/document/${O.document_id}`),children:`View document`})]}),O&&!O.success&&O.error&&(0,G.jsx)(Nd,{icon:(0,G.jsx)(RC,{size:16}),title:`Error`,color:`red`,mb:`md`,withCloseButton:!0,onClose:()=>k(null),children:O.error}),(0,G.jsxs)(`div`,{className:X.seg,style:{marginBottom:20},children:[(0,G.jsxs)(`button`,{type:`button`,className:`${X.segBtn} ${a===`paste`?X.segBtnOn:``}`,onClick:()=>o(`paste`),children:[(0,G.jsx)(vC,{size:14}),`Paste content`]}),(0,G.jsxs)(`button`,{type:`button`,className:`${X.segBtn} ${a===`file`?X.segBtnOn:``}`,onClick:()=>o(`file`),children:[(0,G.jsx)(LC,{size:14}),`Upload file`]})]}),(0,G.jsxs)(`form`,{className:LF.split,onSubmit:e=>{e.preventDefault(),z&&L()},children:[(0,G.jsxs)(`div`,{className:LF.col,children:[(0,G.jsxs)(`div`,{className:LF.field,children:[(0,G.jsxs)(`label`,{children:[`Title`,a===`file`&&(0,G.jsx)(`span`,{className:X.faint,children:` (optional — defaults to filename)`})]}),(0,G.jsx)(`input`,{className:LF.input,value:s,onChange:e=>c(e.currentTarget.value),placeholder:`Document title`})]}),H.length>0&&(0,G.jsxs)(`div`,{className:LF.field,children:[(0,G.jsx)(`label`,{children:`Projects`}),H.length>8&&(0,G.jsxs)(`div`,{className:X.selectWrap,style:{width:`100%`,marginBottom:8,height:34},children:[(0,G.jsx)(jC,{size:14}),(0,G.jsx)(`input`,{className:X.selectEl,style:{maxWidth:`none`,flex:1},placeholder:`Filter ${H.length} projects…`,value:d,onChange:e=>f(e.currentTarget.value)})]}),(0,G.jsxs)(`div`,{className:X.row,style:{gap:7,flexWrap:`wrap`},children:[ee.map(e=>{let t=H.indexOf(e);return(0,G.jsxs)(`button`,{type:`button`,className:`${X.chip} ${l.includes(e.id)?X.chipOn:``}`,onClick:()=>I(e.id),children:[(0,G.jsx)(`span`,{style:{width:7,height:7,borderRadius:`50%`,background:`var(${RF[t%RF.length]})`}}),e.name]},e.id)}),ee.length===0&&(0,G.jsxs)(`span`,{className:X.faint,style:{fontSize:12.5},children:[`No projects match "`,d,`".`]})]})]}),(0,G.jsxs)(`div`,{className:LF.field,children:[(0,G.jsxs)(`label`,{children:[`Metadata `,(0,G.jsx)(`span`,{className:X.faint,children:`(optional)`})]}),(0,G.jsx)(`datalist`,{id:`cerefox-meta-keys`,children:r?.map(e=>(0,G.jsx)(`option`,{value:e.key},e.key))}),(0,G.jsxs)(`div`,{className:X.col,style:{gap:8},children:[p.map((e,t)=>(0,G.jsxs)(`div`,{className:X.row,style:{gap:8},children:[(0,G.jsx)(`input`,{className:LF.input,style:{flex:1},list:`cerefox-meta-keys`,placeholder:`key`,value:e.key,onChange:e=>m(n=>n.map((n,r)=>r===t?{...n,key:e.currentTarget.value}:n))}),(0,G.jsx)(`input`,{className:LF.input,style:{flex:1},placeholder:`value`,value:e.value,onChange:e=>m(n=>n.map((n,r)=>r===t?{...n,value:e.currentTarget.value}:n))}),(0,G.jsx)(`button`,{type:`button`,className:X.iconBtn,"aria-label":`Remove`,onClick:()=>m(e=>e.filter((e,n)=>n!==t)),children:(0,G.jsx)(RC,{size:15})})]},t)),(0,G.jsxs)(`button`,{type:`button`,className:`${X.btn} ${X.btnSubtle}`,style:{alignSelf:`flex-start`},onClick:()=>m(e=>[...e,{key:``,value:``}]),children:[(0,G.jsx)(kC,{size:14}),`Add field`]})]})]}),a===`file`?(0,G.jsxs)(`div`,{className:LF.field,children:[(0,G.jsx)(`label`,{children:`File`}),(0,G.jsx)(`input`,{ref:i,type:`file`,accept:`.md,.txt,.docx`,style:{display:`none`},onChange:e=>F(e.currentTarget.files?.[0]??null)}),(0,G.jsxs)(`div`,{className:`${LF.dropZone} ${C?LF.dropZoneOver:``} ${x?LF.dropZoneHas:``}`,onClick:()=>i.current?.click(),onDragOver:e=>{e.preventDefault(),T(!0)},onDragLeave:()=>T(!1),onDrop:e=>{e.preventDefault(),T(!1);let t=e.dataTransfer.files?.[0];t&&F(t)},children:[(0,G.jsx)(`span`,{className:LF.dropIco,children:(0,G.jsx)(LC,{size:20})}),x?(0,G.jsxs)(G.Fragment,{children:[(0,G.jsx)(`div`,{className:X.mono,style:{fontWeight:600,fontSize:14,marginTop:10},children:x.name}),(0,G.jsx)(`span`,{className:X.faint,style:{fontSize:12.5},children:`Ready to ingest · click to replace`})]}):(0,G.jsxs)(G.Fragment,{children:[(0,G.jsx)(`div`,{style:{fontWeight:600,fontSize:14,marginTop:10},children:`Drop a file or click to browse`}),(0,G.jsx)(`span`,{className:X.faint,style:{fontSize:12.5},children:`.md · .txt · .docx`})]})]}),E?.exists&&(0,G.jsxs)(Nd,{color:`blue`,variant:`light`,mt:`sm`,children:[`A document named "`,E.title,`" already exists (updated`,` `,E.updated_at?new Date(E.updated_at).toLocaleDateString():`unknown`,`). Enable "Update existing" to overwrite it.`]})]}):(0,G.jsxs)(`div`,{className:LF.field,children:[(0,G.jsxs)(`div`,{className:X.row,style:{justifyContent:`space-between`,marginBottom:8},children:[(0,G.jsx)(`label`,{style:{margin:0},children:`Content`}),(0,G.jsxs)(`div`,{className:X.seg,style:{padding:2},children:[(0,G.jsx)(`button`,{type:`button`,className:`${X.segBtn} ${y===`edit`?X.segBtnOn:``}`,style:{padding:`4px 10px`},onClick:()=>b(`edit`),children:`Edit`}),(0,G.jsx)(`button`,{type:`button`,className:`${X.segBtn} ${y===`preview`?X.segBtnOn:``}`,style:{padding:`4px 10px`},onClick:()=>b(`preview`),children:`Preview`})]})]}),y===`edit`?(0,G.jsx)(`textarea`,{className:`${LF.input} ${LF.textarea}`,value:_,onChange:e=>v(e.currentTarget.value),placeholder:`# Paste your Markdown here…`}):(0,G.jsx)(`div`,{className:`${X.card} ${X.cardPad} ${LF.preview}`,children:_.trim()?(0,G.jsx)(BP,{content:_,defaultView:`rendered`,maxHeight:400,showToggle:!1}):(0,G.jsx)(`span`,{className:X.faint,children:`Nothing to preview yet.`})})]}),(0,G.jsxs)(`div`,{className:LF.actions,children:[(0,G.jsxs)(`button`,{type:`submit`,className:`${X.btn} ${X.btnPrimary}`,disabled:!z||R,children:[(0,G.jsx)(uC,{size:16}),a===`file`?`Upload & ingest`:`Ingest`]}),(0,G.jsxs)(`label`,{className:LF.toggleRow,children:[(0,G.jsx)(`button`,{type:`button`,className:`${LF.toggle} ${h?LF.toggleOn:``}`,role:`switch`,"aria-checked":h,onClick:()=>g(e=>!e),children:(0,G.jsx)(`span`,{})}),(0,G.jsx)(`span`,{style:{fontSize:13},children:`Update existing if title matches`})]})]})]}),(0,G.jsxs)(`aside`,{className:LF.col,children:[(0,G.jsxs)(`div`,{className:`${X.card} ${X.cardPad} ${X.rise}`,children:[(0,G.jsx)(`div`,{className:X.mono,style:{fontSize:10.5,letterSpacing:`0.1em`,textTransform:`uppercase`,color:`var(--text-faint)`,marginBottom:12},children:`Pipeline`}),(0,G.jsxs)(`ol`,{className:LF.steps,children:[(0,G.jsxs)(`li`,{children:[(0,G.jsx)(`span`,{className:LF.stepN,children:`1`}),(0,G.jsxs)(`div`,{children:[(0,G.jsx)(`b`,{children:`Chunked`}),(0,G.jsxs)(`span`,{className:`faint`,children:[`Split on headings into ~`,B||`—`,` semantic chunks.`]})]})]}),(0,G.jsxs)(`li`,{children:[(0,G.jsx)(`span`,{className:LF.stepN,children:`2`}),(0,G.jsxs)(`div`,{children:[(0,G.jsx)(`b`,{children:`Embedded`}),(0,G.jsx)(`span`,{className:`faint`,children:`Each chunk vectorized for semantic search.`})]})]}),(0,G.jsxs)(`li`,{children:[(0,G.jsx)(`span`,{className:LF.stepN,children:`3`}),(0,G.jsxs)(`div`,{children:[(0,G.jsx)(`b`,{children:`Staged`}),(0,G.jsx)(`span`,{className:`faint`,children:`Indexed and discoverable by your agents.`})]})]})]})]}),(0,G.jsx)(Fw,{title:`CLI equivalent`,commands:[{cmd:`cerefox document ingest`,args:`./${x?.name??`doc.md`} --project-name ${V}`}]})]})]})]})}function BF(){let{id:e}=Ax(),t=Ex(),{data:n}=qP(),r=n?.find(t=>t.id===e),i=new Map(n?.map(e=>[e.id,e.name])??[]),[a,o]=(0,w.useState)(1),[s,c]=_w(),l=(a-1)*s,{data:u,isLoading:d,isFetching:f}=Yy({queryKey:[`project-documents`,e,a,s],queryFn:()=>WC(`/projects/${e}/documents?limit=${s}&offset=${l}`),enabled:!!e,placeholderData:oy}),p=u?.documents??[],m=u?.total??0,h=Math.max(1,Math.ceil(m/s));return(0,G.jsxs)(`div`,{className:vw.wrap,children:[(0,G.jsxs)(`button`,{type:`button`,className:`${X.btn} ${X.btnSubtle}`,style:{marginBottom:12,paddingLeft:6},onClick:()=>t(`/projects`),children:[(0,G.jsx)(oC,{size:15}),`Projects`]}),(0,G.jsxs)(`div`,{className:X.pageHead,children:[(0,G.jsxs)(`div`,{children:[(0,G.jsx)(`p`,{className:X.eyebrow,children:`Memory space`}),(0,G.jsx)(`h1`,{className:X.pageTitle,children:r?.name||`Project`}),r?.description&&(0,G.jsx)(`p`,{className:X.pageSub,children:r.description})]}),(0,G.jsx)(fw,{cmd:`cerefox document list`,args:`--project "${r?.name??`<name>`}"`})]}),d?(0,G.jsx)(`div`,{style:{display:`flex`,justifyContent:`center`,marginTop:40},children:(0,G.jsx)(cl,{})}):m===0?(0,G.jsx)(`div`,{className:`${X.card} ${vw.emptyRow}`,children:`No documents in this project.`}):(0,G.jsxs)(`div`,{className:`${X.card} ${X.rise}`,style:{overflow:`hidden`},children:[(0,G.jsxs)(`table`,{className:vw.tbl,children:[(0,G.jsx)(`thead`,{children:(0,G.jsxs)(`tr`,{children:[(0,G.jsx)(`th`,{children:`Document`}),(0,G.jsx)(`th`,{style:{width:90,textAlign:`right`},children:`Chunks`}),(0,G.jsx)(`th`,{style:{width:110,textAlign:`right`},children:`Size`}),(0,G.jsx)(`th`,{style:{width:120,textAlign:`right`},children:`Updated`})]})}),(0,G.jsx)(`tbody`,{children:p.map(n=>{let r=n.review_status!==`approved`;return(0,G.jsxs)(`tr`,{style:{cursor:`pointer`},onClick:()=>t(`/document/${n.id}`),children:[(0,G.jsx)(`td`,{children:(0,G.jsxs)(`span`,{style:{display:`inline-flex`,alignItems:`center`,gap:8,flexWrap:`wrap`},children:[(0,G.jsx)(`span`,{className:X.link,style:{fontSize:13.5},children:n.title||`Untitled`}),n.project_ids.filter(t=>t!==e&&i.has(t)).map(e=>(0,G.jsx)(`span`,{className:`${X.badge} ${X.bNeutral}`,children:i.get(e)},e)),r&&(0,G.jsxs)(`span`,{className:`${X.badge} ${X.bYellow}`,children:[(0,G.jsx)(`span`,{style:{width:6,height:6,borderRadius:`50%`,background:`currentColor`}}),`pending review`]})]})}),(0,G.jsx)(`td`,{className:`${X.mono} ${X.dim}`,style:{textAlign:`right`},children:n.chunk_count}),(0,G.jsx)(`td`,{className:`${X.mono} ${X.dim}`,style:{textAlign:`right`},children:n.total_chars.toLocaleString()}),(0,G.jsx)(`td`,{className:`${X.faint}`,style:{textAlign:`right`},children:xw(n.updated_at)})]},n.id)})})]}),(0,G.jsx)(yw,{page:a,pageCount:h,total:m,pageSize:s,onPage:o,onPageSize:e=>{c(e),o(1)},loading:f&&!d})]})]})}var VF=[`--primary`,`--violet`,`--blue`,`--green`,`--yellow`,`--red`];function HF(){let e=Ex(),t=Gy(),{data:n,isLoading:r}=qP(),{data:i}=Yy({queryKey:[`dashboard`],queryFn:()=>Iw()}),a=i?.project_doc_counts??{},o=i?.project_deleted_doc_counts??{},s=Math.max(1,...Object.values(a)),c=new Map((n??[]).map((e,t)=>[e.id,VF[t%VF.length]])),[l,u]=(0,w.useState)(``),[d,f]=(0,w.useState)(!1),[p,m]=(0,w.useState)(``),[h,g]=(0,w.useState)(``),[_,v]=(0,w.useState)(null),[y,b]=(0,w.useState)(``),[x,S]=(0,w.useState)(``),[C,T]=(0,w.useState)(null),E=Xy({mutationFn:()=>WP(p.trim(),h.trim()),onSuccess:()=>{t.invalidateQueries({queryKey:[`projects`]}),YP(`Project created`),m(``),g(``),f(!1)},onError:e=>XP(`Create failed`,String(e))}),D=Xy({mutationFn:()=>GP(_,y.trim(),x.trim()),onSuccess:()=>{t.invalidateQueries({queryKey:[`projects`]}),YP(`Project updated`),v(null)},onError:e=>XP(`Update failed`,String(e))}),O=Xy({mutationFn:e=>KP(e),onSuccess:()=>{t.invalidateQueries({queryKey:[`projects`]}),t.invalidateQueries({queryKey:[`dashboard`]}),YP(`Project deleted`),T(null)},onError:e=>{if(e instanceof VC&&e.status===404){t.invalidateQueries({queryKey:[`projects`]}),t.invalidateQueries({queryKey:[`dashboard`]}),T(null);return}XP(`Delete failed`,String(e))}});return(0,G.jsxs)(G.Fragment,{children:[(0,G.jsx)(bw,{eyebrow:`Memory spaces`,title:`Projects`,subtitle:`Scoped collections your agents read from and write to.`,headerRight:(0,G.jsxs)(`div`,{style:{display:`flex`,flexDirection:`column`,alignItems:`flex-end`,gap:8,width:400,maxWidth:`100%`},children:[(0,G.jsxs)(`button`,{type:`button`,className:`${X.btn} ${X.btnPrimary}`,style:{alignSelf:`flex-end`},onClick:()=>f(!0),children:[(0,G.jsx)(kC,{size:16}),`New project`]}),(0,G.jsx)(Fw,{title:`CLI equivalent`,commands:[{cmd:`cerefox project list`},{cmd:`cerefox project create`,args:`<name>`}]})]}),searchValue:l,onSearchChange:u,searchPlaceholder:`Filter projects…`,searchText:e=>`${e.name} ${e.description??``}`,columns:[{key:`name`,label:`Project`,render:e=>(0,G.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:11},children:[(0,G.jsx)(`span`,{style:{width:9,height:9,borderRadius:`50%`,flexShrink:0,background:`var(${c.get(e.id)??`--border`})`}}),(0,G.jsxs)(`div`,{style:{display:`flex`,flexDirection:`column`,gap:2,minWidth:0},children:[(0,G.jsx)(`span`,{className:X.mono,style:{fontWeight:600,fontSize:13},children:e.name}),e.description&&(0,G.jsx)(`span`,{className:X.faint,style:{fontSize:12},children:e.description})]})]})},{key:`docs`,label:`Documents`,width:180,render:e=>{let t=a[e.id]??0;return(0,G.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:10},children:[(0,G.jsx)(`span`,{className:X.mono,style:{fontSize:13},children:t}),(0,G.jsx)(`span`,{style:{flex:1,maxWidth:90,height:5,borderRadius:3,background:`var(--surface-2)`,overflow:`hidden`},children:(0,G.jsx)(`span`,{style:{display:`block`,height:`100%`,width:`${t/s*100}%`,background:`var(${c.get(e.id)??`--border`})`}})})]})}},{key:`trash`,label:`In trash`,width:90,align:`right`,render:e=>{let t=o[e.id]??0;return t>0?(0,G.jsx)(`span`,{className:`${X.mono} ${X.faint}`,style:{fontSize:12},children:t}):(0,G.jsx)(`span`,{className:`${X.mono} ${X.faint}`,style:{fontSize:12},children:`—`})}}],rows:n??[],rowKey:e=>e.id,rowClick:t=>e(`/projects/${t.id}/documents`),loading:r,emptyText:`No projects yet. Create one to get started.`,actions:e=>C===e.id?(0,G.jsxs)(G.Fragment,{children:[(0,G.jsx)(`button`,{type:`button`,className:`${X.btn} ${X.btnSubtle}`,style:{color:`var(--red)`},disabled:O.isPending,onClick:()=>O.mutate(e.id),children:`Delete`}),(0,G.jsx)(`button`,{type:`button`,className:`${X.btn} ${X.btnSubtle}`,onClick:()=>T(null),children:`Cancel`})]}):(0,G.jsxs)(G.Fragment,{children:[(0,G.jsx)(`button`,{type:`button`,className:X.iconBtnSm,title:`Edit`,onClick:()=>{v(e.id),b(e.name),S(e.description||``)},children:(0,G.jsx)(_C,{size:14})}),(0,G.jsx)(`button`,{type:`button`,className:`${X.iconBtnSm} ${X.iconBtnDanger}`,title:`Delete`,onClick:()=>T(e.id),children:(0,G.jsx)(IC,{size:14})})]})}),(0,G.jsx)(lh,{opened:d,onClose:()=>f(!1),title:`New project`,children:(0,G.jsx)(`form`,{onSubmit:e=>{e.preventDefault(),p.trim()&&E.mutate()},children:(0,G.jsxs)(w_,{gap:`sm`,children:[(0,G.jsx)(M_,{label:`Name`,value:p,onChange:e=>m(e.currentTarget.value),required:!0,placeholder:`Project name`,"data-autofocus":!0}),(0,G.jsx)(M_,{label:`Description`,value:h,onChange:e=>g(e.currentTarget.value),placeholder:`Optional description`}),(0,G.jsx)(bp,{type:`submit`,loading:E.isPending,children:`Create`})]})})}),(0,G.jsx)(lh,{opened:_!==null,onClose:()=>v(null),title:`Edit project`,children:(0,G.jsx)(`form`,{onSubmit:e=>{e.preventDefault(),D.mutate()},children:(0,G.jsxs)(w_,{gap:`sm`,children:[(0,G.jsx)(M_,{label:`Name`,value:y,onChange:e=>b(e.currentTarget.value),required:!0}),(0,G.jsx)(M_,{label:`Description`,value:x,onChange:e=>S(e.currentTarget.value)}),(0,G.jsxs)(El,{gap:`sm`,children:[(0,G.jsx)(bp,{type:`submit`,loading:D.isPending,children:`Save`}),(0,G.jsx)(bp,{variant:`subtle`,onClick:()=>v(null),children:`Cancel`})]})]})})})]})}var UF=[`remote-mcp`,`local-mcp`,`cli`,`webapp`,`edge-function`,`api`],WF=sI(),GF=e=>nI(e,WF),KF=sI();GF.write=e=>nI(e,KF);var qF=sI();GF.onStart=e=>nI(e,qF);var JF=sI();GF.onFrame=e=>nI(e,JF);var YF=sI();GF.onFinish=e=>nI(e,YF);var XF=[];GF.setTimeout=(e,t)=>{let n=GF.now()+t,r=()=>{let e=XF.findIndex(e=>e.cancel==r);~e&&XF.splice(e,1),eI-=+!!~e},i={time:n,handler:e,cancel:r};return XF.splice(ZF(n),0,i),eI+=1,rI(),i};var ZF=e=>~(~XF.findIndex(t=>t.time>e)||~XF.length);GF.cancel=e=>{qF.delete(e),JF.delete(e),WF.delete(e),KF.delete(e),YF.delete(e)},GF.sync=e=>{tI=!0,GF.batchedUpdates(e),tI=!1},GF.throttle=e=>{let t;function n(){try{e(...t)}finally{t=null}}function r(...e){t=e,GF.onStart(n)}return r.handler=e,r.cancel=()=>{qF.delete(n),t=null},r};var QF=typeof window<`u`?window.requestAnimationFrame:()=>{};GF.use=e=>QF=e,GF.now=typeof performance<`u`?()=>performance.now():Date.now,GF.batchedUpdates=e=>e(),GF.catch=console.error,GF.frameLoop=`always`,GF.advance=()=>{GF.frameLoop===`demand`?oI():console.warn(`Cannot call the manual advancement of rafz whilst frameLoop is not set as demand`)};var $F=-1,eI=0,tI=!1;function nI(e,t){tI?(t.delete(e),e(0)):(t.add(e),rI())}function rI(){$F<0&&($F=0,GF.frameLoop!==`demand`&&QF(aI))}function iI(){$F=-1}function aI(){~$F&&(QF(aI),GF.batchedUpdates(oI))}function oI(){let e=$F;$F=GF.now();let t=ZF($F);t&&(cI(XF.splice(0,t),e=>e.handler()),eI-=t),qF.flush(),WF.flush(e?Math.min(64,$F-e):16.667),JF.flush(),KF.flush(),YF.flush(),eI||iI()}function sI(){let e=new Set,t=e;return{add(n){eI+=+(t==e&&!e.has(n)),e.add(n)},delete(n){return eI-=t==e&&e.has(n)?1:0,e.delete(n)},flush(n){t.size&&(e=new Set,eI-=t.size,cI(t,t=>t(n)&&e.add(t)),eI+=e.size,t=e)}}}function cI(e,t){e.forEach(e=>{try{t(e)}catch(e){GF.catch(e)}})}function lI(){}var uI=(e,t,n)=>Object.defineProperty(e,t,{value:n,writable:!0,configurable:!0}),Q={arr:Array.isArray,obj:e=>!!e&&e.constructor.name===`Object`,fun:e=>typeof e==`function`,str:e=>typeof e==`string`,num:e=>typeof e==`number`,und:e=>e===void 0};function dI(e,t){if(Q.arr(e)){if(!Q.arr(t)||e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}return e===t}var fI=(e,t)=>e.forEach(t);function pI(e,t,n){if(Q.arr(e)){for(let r=0;r<e.length;r++)t.call(n,e[r],`${r}`);return}for(let r in e)e.hasOwnProperty(r)&&t.call(n,e[r],r)}var mI=e=>Q.und(e)?[]:Q.arr(e)?e:[e];function hI(e,t){if(e.size){let n=Array.from(e);e.clear(),fI(n,t)}}var gI=(e,...t)=>hI(e,e=>e(...t)),_I=()=>typeof window>`u`||!window.navigator||/ServerSideRendering|^Deno\//.test(window.navigator.userAgent),vI,yI,bI=null,xI=!1,SI=lI,CI=Object.freeze({__proto__:null,get createStringInterpolator(){return vI},get to(){return yI},get colors(){return bI},get skipAnimation(){return xI},get willAdvance(){return SI},assign:e=>{e.to&&(yI=e.to),e.now&&(GF.now=e.now),e.colors!==void 0&&(bI=e.colors),e.skipAnimation!=null&&(xI=e.skipAnimation),e.createStringInterpolator&&(vI=e.createStringInterpolator),e.requestAnimationFrame&&GF.use(e.requestAnimationFrame),e.batchedUpdates&&(GF.batchedUpdates=e.batchedUpdates),e.willAdvance&&(SI=e.willAdvance),e.frameLoop&&(GF.frameLoop=e.frameLoop)}}),wI=new Set,TI=[],EI=[],DI=0,OI={get idle(){return!wI.size&&!TI.length},start(e){DI>e.priority?(wI.add(e),GF.onStart(kI)):(AI(e),GF(MI))},advance:MI,sort(e){if(DI)GF.onFrame(()=>OI.sort(e));else{let t=TI.indexOf(e);~t&&(TI.splice(t,1),jI(e))}},clear(){TI=[],wI.clear()}};function kI(){wI.forEach(AI),wI.clear(),GF(MI)}function AI(e){TI.includes(e)||jI(e)}function jI(e){TI.splice(NI(TI,t=>t.priority>e.priority),0,e)}function MI(e){let t=EI;for(let n=0;n<TI.length;n++){let r=TI[n];DI=r.priority,r.idle||(SI(r),r.advance(e),r.idle||t.push(r))}return DI=0,EI=TI,EI.length=0,TI=t,TI.length>0}function NI(e,t){let n=e.findIndex(t);return n<0?e.length:n}var PI={transparent:0,aliceblue:4042850303,antiquewhite:4209760255,aqua:16777215,aquamarine:2147472639,azure:4043309055,beige:4126530815,bisque:4293182719,black:255,blanchedalmond:4293643775,blue:65535,blueviolet:2318131967,brown:2771004159,burlywood:3736635391,burntsienna:3934150143,cadetblue:1604231423,chartreuse:2147418367,chocolate:3530104575,coral:4286533887,cornflowerblue:1687547391,cornsilk:4294499583,crimson:3692313855,cyan:16777215,darkblue:35839,darkcyan:9145343,darkgoldenrod:3095792639,darkgray:2846468607,darkgreen:6553855,darkgrey:2846468607,darkkhaki:3182914559,darkmagenta:2332068863,darkolivegreen:1433087999,darkorange:4287365375,darkorchid:2570243327,darkred:2332033279,darksalmon:3918953215,darkseagreen:2411499519,darkslateblue:1211993087,darkslategray:793726975,darkslategrey:793726975,darkturquoise:13554175,darkviolet:2483082239,deeppink:4279538687,deepskyblue:12582911,dimgray:1768516095,dimgrey:1768516095,dodgerblue:512819199,firebrick:2988581631,floralwhite:4294635775,forestgreen:579543807,fuchsia:4278255615,gainsboro:3705462015,ghostwhite:4177068031,gold:4292280575,goldenrod:3668254975,gray:2155905279,green:8388863,greenyellow:2919182335,grey:2155905279,honeydew:4043305215,hotpink:4285117695,indianred:3445382399,indigo:1258324735,ivory:4294963455,khaki:4041641215,lavender:3873897215,lavenderblush:4293981695,lawngreen:2096890111,lemonchiffon:4294626815,lightblue:2916673279,lightcoral:4034953471,lightcyan:3774873599,lightgoldenrodyellow:4210742015,lightgray:3553874943,lightgreen:2431553791,lightgrey:3553874943,lightpink:4290167295,lightsalmon:4288707327,lightseagreen:548580095,lightskyblue:2278488831,lightslategray:2005441023,lightslategrey:2005441023,lightsteelblue:2965692159,lightyellow:4294959359,lime:16711935,limegreen:852308735,linen:4210091775,magenta:4278255615,maroon:2147483903,mediumaquamarine:1724754687,mediumblue:52735,mediumorchid:3126187007,mediumpurple:2473647103,mediumseagreen:1018393087,mediumslateblue:2070474495,mediumspringgreen:16423679,mediumturquoise:1221709055,mediumvioletred:3340076543,midnightblue:421097727,mintcream:4127193855,mistyrose:4293190143,moccasin:4293178879,navajowhite:4292783615,navy:33023,oldlace:4260751103,olive:2155872511,olivedrab:1804477439,orange:4289003775,orangered:4282712319,orchid:3664828159,palegoldenrod:4008225535,palegreen:2566625535,paleturquoise:2951671551,palevioletred:3681588223,papayawhip:4293907967,peachpuff:4292524543,peru:3448061951,pink:4290825215,plum:3718307327,powderblue:2967529215,purple:2147516671,rebeccapurple:1714657791,red:4278190335,rosybrown:3163525119,royalblue:1097458175,saddlebrown:2336560127,salmon:4202722047,sandybrown:4104413439,seagreen:780883967,seashell:4294307583,sienna:2689740287,silver:3233857791,skyblue:2278484991,slateblue:1784335871,slategray:1887473919,slategrey:1887473919,snow:4294638335,springgreen:16744447,steelblue:1182971135,tan:3535047935,teal:8421631,thistle:3636451583,tomato:4284696575,turquoise:1088475391,violet:4001558271,wheat:4125012991,white:4294967295,whitesmoke:4126537215,yellow:4294902015,yellowgreen:2597139199},FI=`[-+]?\\d*\\.?\\d+`,II=`[-+]?\\d*\\.?\\d+%`;function LI(...e){return`\\(\\s*(`+e.join(`)\\s*,\\s*(`)+`)\\s*\\)`}var RI=RegExp(`rgb`+LI(FI,FI,FI)),zI=RegExp(`rgba`+LI(FI,FI,FI,FI)),BI=RegExp(`hsl`+LI(FI,II,II)),VI=RegExp(`hsla`+LI(FI,II,II,FI)),HI=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,UI=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,WI=/^#([0-9a-fA-F]{6})$/,GI=/^#([0-9a-fA-F]{8})$/;function KI(e){let t;return typeof e==`number`?e>>>0===e&&e>=0&&e<=4294967295?e:null:(t=WI.exec(e))?parseInt(t[1]+`ff`,16)>>>0:bI&&bI[e]!==void 0?bI[e]:(t=RI.exec(e))?(YI(t[1])<<24|YI(t[2])<<16|YI(t[3])<<8|255)>>>0:(t=zI.exec(e))?(YI(t[1])<<24|YI(t[2])<<16|YI(t[3])<<8|ZI(t[4]))>>>0:(t=HI.exec(e))?parseInt(t[1]+t[1]+t[2]+t[2]+t[3]+t[3]+`ff`,16)>>>0:(t=GI.exec(e))?parseInt(t[1],16)>>>0:(t=UI.exec(e))?parseInt(t[1]+t[1]+t[2]+t[2]+t[3]+t[3]+t[4]+t[4],16)>>>0:(t=BI.exec(e))?(JI(XI(t[1]),QI(t[2]),QI(t[3]))|255)>>>0:(t=VI.exec(e))?(JI(XI(t[1]),QI(t[2]),QI(t[3]))|ZI(t[4]))>>>0:null}function qI(e,t,n){return n<0&&(n+=1),n>1&&--n,n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function JI(e,t,n){let r=n<.5?n*(1+t):n+t-n*t,i=2*n-r,a=qI(i,r,e+1/3),o=qI(i,r,e),s=qI(i,r,e-1/3);return Math.round(a*255)<<24|Math.round(o*255)<<16|Math.round(s*255)<<8}function YI(e){let t=parseInt(e,10);return t<0?0:t>255?255:t}function XI(e){return(parseFloat(e)%360+360)%360/360}function ZI(e){let t=parseFloat(e);return t<0?0:t>1?255:Math.round(t*255)}function QI(e){let t=parseFloat(e);return t<0?0:t>100?1:t/100}function $I(e){let t=KI(e);return t===null?e:(t||=0,`rgba(${(t&4278190080)>>>24}, ${(t&16711680)>>>16}, ${(t&65280)>>>8}, ${(t&255)/255})`)}var eL=(e,t,n)=>{if(Q.fun(e))return e;if(Q.arr(e))return eL({range:e,output:t,extrapolate:n});if(Q.str(e.output[0]))return vI(e);let r=e,i=r.output,a=r.range||[0,1],o=r.extrapolateLeft||r.extrapolate||`extend`,s=r.extrapolateRight||r.extrapolate||`extend`,c=r.easing||(e=>e);return e=>{let t=nL(e,a);return tL(e,a[t],a[t+1],i[t],i[t+1],c,o,s,r.map)}};function tL(e,t,n,r,i,a,o,s,c){let l=c?c(e):e;if(l<t){if(o===`identity`)return l;o===`clamp`&&(l=t)}if(l>n){if(s===`identity`)return l;s===`clamp`&&(l=n)}return r===i?r:t===n?e<=t?r:i:(t===-1/0?l=-l:n===1/0?l-=t:l=(l-t)/(n-t),l=a(l),r===-1/0?l=-l:i===1/0?l+=r:l=l*(i-r)+r,l)}function nL(e,t){for(var n=1;n<t.length-1&&!(t[n]>=e);++n);return n-1}function rL(){return rL=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},rL.apply(this,arguments)}var iL=Symbol.for(`FluidValue.get`),aL=Symbol.for(`FluidValue.observers`),oL=e=>!!(e&&e[iL]),sL=e=>e&&e[iL]?e[iL]():e,cL=e=>e[aL]||null;function lL(e,t){e.eventObserved?e.eventObserved(t):e(t)}function uL(e,t){let n=e[aL];n&&n.forEach(e=>{lL(e,t)})}var dL=class{constructor(e){if(this[iL]=void 0,this[aL]=void 0,!e&&!(e=this.get))throw Error(`Unknown getter`);fL(this,e)}},fL=(e,t)=>hL(e,iL,t);function pL(e,t){if(e[iL]){let n=e[aL];n||hL(e,aL,n=new Set),n.has(t)||(n.add(t),e.observerAdded&&e.observerAdded(n.size,t))}return t}function mL(e,t){let n=e[aL];if(n&&n.has(t)){let r=n.size-1;r?n.delete(t):e[aL]=null,e.observerRemoved&&e.observerRemoved(r,t)}}var hL=(e,t,n)=>Object.defineProperty(e,t,{value:n,writable:!0,configurable:!0}),gL=/[+\-]?(?:0|[1-9]\d*)(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,_L=/(#(?:[0-9a-f]{2}){2,4}|(#[0-9a-f]{3})|(rgb|hsl)a?\((-?\d+%?[,\s]+){2,3}\s*[\d\.]+%?\))/gi,vL=RegExp(`(${gL.source})(%|[a-z]+)`,`i`),wee=/rgba\(([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+)\)/gi,yL=/var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/,bL=e=>{let[t,n]=Tee(e);if(!t||_I())return e;let r=window.getComputedStyle(document.documentElement).getPropertyValue(t);return r?r.trim():n&&n.startsWith(`--`)?window.getComputedStyle(document.documentElement).getPropertyValue(n)||e:n&&yL.test(n)?bL(n):n||e},Tee=e=>{let t=yL.exec(e);if(!t)return[,];let[,n,r]=t;return[n,r]},xL,Eee=(e,t,n,r,i)=>`rgba(${Math.round(t)}, ${Math.round(n)}, ${Math.round(r)}, ${i})`,SL=e=>{xL||=bI?RegExp(`(${Object.keys(bI).join(`|`)})(?!\\w)`,`g`):/^\b$/;let t=e.output.map(e=>sL(e).replace(yL,bL).replace(_L,$I).replace(xL,$I)),n=t.map(e=>e.match(gL).map(Number)),r=n[0].map((e,t)=>n.map(e=>{if(!(t in e))throw Error(`The arity of each "output" value must be equal`);return e[t]})).map(t=>eL(rL({},e,{output:t})));return e=>{let n=!vL.test(t[0])&&t.find(e=>vL.test(e))?.replace(gL,``),i=0;return t[0].replace(gL,()=>`${r[i++](e)}${n||``}`).replace(wee,Eee)}},CL=`react-spring: `,wL=e=>{let t=e,n=!1;if(typeof t!=`function`)throw TypeError(`${CL}once requires a function parameter`);return(...e)=>{n||=(t(...e),!0)}},Dee=wL(console.warn);function Oee(){Dee(`${CL}The "interpolate" function is deprecated in v9 (use "to" instead)`)}var kee=wL(console.warn);function Aee(){kee(`${CL}Directly calling start instead of using the api object is deprecated in v9 (use ".start" instead), this will be removed in later 0.X.0 versions`)}function TL(e){return Q.str(e)&&(e[0]==`#`||/\d/.test(e)||!_I()&&yL.test(e)||e in(bI||{}))}var EL=typeof window<`u`&&window.document&&window.document.createElement?w.useLayoutEffect:w.useEffect,jee=()=>{let e=(0,w.useRef)(!1);return EL(()=>(e.current=!0,()=>{e.current=!1}),[]),e};function DL(){let e=(0,w.useState)()[1],t=jee();return()=>{t.current&&e(Math.random())}}function Mee(e,t){let[n]=(0,w.useState)(()=>({inputs:t,result:e()})),r=(0,w.useRef)(),i=r.current,a=i;return a?t&&a.inputs&&Nee(t,a.inputs)||(a={inputs:t,result:e()}):a=n,(0,w.useEffect)(()=>{r.current=a,i==n&&(n.inputs=n.result=void 0)},[a]),a.result}function Nee(e,t){if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}var OL=e=>(0,w.useEffect)(e,kL),kL=[];function AL(e){let t=(0,w.useRef)();return(0,w.useEffect)(()=>{t.current=e}),t.current}var jL=Symbol.for(`Animated:node`),ML=e=>!!e&&e[jL]===e,NL=e=>e&&e[jL],PL=(e,t)=>uI(e,jL,t),FL=e=>e&&e[jL]&&e[jL].getPayload(),IL=class{constructor(){this.payload=void 0,PL(this,this)}getPayload(){return this.payload||[]}},LL=class e extends IL{constructor(e){super(),this.done=!0,this.elapsedTime=void 0,this.lastPosition=void 0,this.lastVelocity=void 0,this.v0=void 0,this.durationProgress=0,this._value=e,Q.num(this._value)&&(this.lastPosition=this._value)}static create(t){return new e(t)}getPayload(){return[this]}getValue(){return this._value}setValue(e,t){return Q.num(e)&&(this.lastPosition=e,t&&(e=Math.round(e/t)*t,this.done&&(this.lastPosition=e))),this._value!==e&&(this._value=e,!0)}reset(){let{done:e}=this;this.done=!1,Q.num(this._value)&&(this.elapsedTime=0,this.durationProgress=0,this.lastPosition=this._value,e&&(this.lastVelocity=null),this.v0=null)}},RL=class e extends LL{constructor(e){super(0),this._string=null,this._toString=void 0,this._toString=eL({output:[e,e]})}static create(t){return new e(t)}getValue(){return this._string??=this._toString(this._value)}setValue(e){if(Q.str(e)){if(e==this._string)return!1;this._string=e,this._value=1}else if(super.setValue(e))this._string=null;else return!1;return!0}reset(e){e&&(this._toString=eL({output:[this.getValue(),e]})),this._value=0,super.reset()}},zL={dependencies:null},BL=class extends IL{constructor(e){super(),this.source=e,this.setValue(e)}getValue(e){let t={};return pI(this.source,(n,r)=>{ML(n)?t[r]=n.getValue(e):oL(n)?t[r]=sL(n):e||(t[r]=n)}),t}setValue(e){this.source=e,this.payload=this._makePayload(e)}reset(){this.payload&&fI(this.payload,e=>e.reset())}_makePayload(e){if(e){let t=new Set;return pI(e,this._addToPayload,t),Array.from(t)}}_addToPayload(e){zL.dependencies&&oL(e)&&zL.dependencies.add(e);let t=FL(e);t&&fI(t,e=>this.add(e))}},VL=class e extends BL{constructor(e){super(e)}static create(t){return new e(t)}getValue(){return this.source.map(e=>e.getValue())}setValue(e){let t=this.getPayload();return e.length==t.length?t.map((t,n)=>t.setValue(e[n])).some(Boolean):(super.setValue(e.map(HL)),!0)}};function HL(e){return(TL(e)?RL:LL).create(e)}function UL(e){let t=NL(e);return t?t.constructor:Q.arr(e)?VL:TL(e)?RL:LL}function WL(){return WL=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},WL.apply(this,arguments)}var GL=(e,t)=>{let n=!Q.fun(e)||e.prototype&&e.prototype.isReactComponent;return(0,w.forwardRef)((r,i)=>{let a=(0,w.useRef)(null),o=n&&(0,w.useCallback)(e=>{a.current=JL(i,e)},[i]),[s,c]=qL(r,t),l=DL(),u=()=>{let e=a.current;n&&!e||(e?t.applyAnimatedValues(e,s.getValue(!0)):!1)===!1&&l()},d=new KL(u,c),f=(0,w.useRef)();EL(()=>(f.current=d,fI(c,e=>pL(e,d)),()=>{f.current&&(fI(f.current.deps,e=>mL(e,f.current)),GF.cancel(f.current.update))})),(0,w.useEffect)(u,[]),OL(()=>()=>{let e=f.current;fI(e.deps,t=>mL(t,e))});let p=t.getComponentProps(s.getValue());return w.createElement(e,WL({},p,{ref:o}))})},KL=class{constructor(e,t){this.update=e,this.deps=t}eventObserved(e){e.type==`change`&&GF.write(this.update)}};function qL(e,t){let n=new Set;return zL.dependencies=n,e.style&&(e=WL({},e,{style:t.createAnimatedStyle(e.style)})),e=new BL(e),zL.dependencies=null,[e,n]}function JL(e,t){return e&&(Q.fun(e)?e(t):e.current=t),t}var YL=Symbol.for(`AnimatedComponent`),XL=(e,{applyAnimatedValues:t=()=>!1,createAnimatedStyle:n=e=>new BL(e),getComponentProps:r=e=>e}={})=>{let i={applyAnimatedValues:t,createAnimatedStyle:n,getComponentProps:r},a=e=>{let t=ZL(e)||`Anonymous`;return e=Q.str(e)?a[e]||(a[e]=GL(e,i)):e[YL]||(e[YL]=GL(e,i)),e.displayName=`Animated(${t})`,e};return pI(e,(t,n)=>{Q.arr(e)&&(n=ZL(t)),a[n]=a(t)}),{animated:a}},ZL=e=>Q.str(e)?e:e&&Q.str(e.displayName)?e.displayName:Q.fun(e)&&e.name||null;function QL(){return QL=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},QL.apply(this,arguments)}function $L(e,...t){return Q.fun(e)?e(...t):e}var eR=(e,t)=>e===!0||!!(t&&e&&(Q.fun(e)?e(t):mI(e).includes(t))),tR=(e,t)=>Q.obj(e)?t&&e[t]:e,nR=(e,t)=>e.default===!0?e[t]:e.default?e.default[t]:void 0,rR=e=>e,iR=(e,t=rR)=>{let n=aR;e.default&&e.default!==!0&&(e=e.default,n=Object.keys(e));let r={};for(let i of n){let n=t(e[i],i);Q.und(n)||(r[i]=n)}return r},aR=[`config`,`onProps`,`onStart`,`onChange`,`onPause`,`onResume`,`onRest`],oR={config:1,from:1,to:1,ref:1,loop:1,reset:1,pause:1,cancel:1,reverse:1,immediate:1,default:1,delay:1,onProps:1,onStart:1,onChange:1,onPause:1,onResume:1,onRest:1,onResolve:1,items:1,trail:1,sort:1,expires:1,initial:1,enter:1,update:1,leave:1,children:1,onDestroyed:1,keys:1,callId:1,parentId:1};function sR(e){let t={},n=0;if(pI(e,(e,r)=>{oR[r]||(t[r]=e,n++)}),n)return t}function cR(e){let t=sR(e);if(t){let n={to:t};return pI(e,(e,r)=>r in t||(n[r]=e)),n}return QL({},e)}function lR(e){return e=sL(e),Q.arr(e)?e.map(lR):TL(e)?CI.createStringInterpolator({range:[0,1],output:[e,e]})(1):e}function uR(e){for(let t in e)return!0;return!1}function dR(e){return Q.fun(e)||Q.arr(e)&&Q.obj(e[0])}function fR(e,t){var n;(n=e.ref)==null||n.delete(e),t?.delete(e)}function pR(e,t){if(t&&e.ref!==t){var n;(n=e.ref)==null||n.delete(e),t.add(e),e.ref=t}}var mR={default:{tension:170,friction:26},gentle:{tension:120,friction:14},wobbly:{tension:180,friction:12},stiff:{tension:210,friction:20},slow:{tension:280,friction:60},molasses:{tension:280,friction:120}},hR=1.70158,gR=hR*1.525,_R=2.70158,vR=2*Math.PI/3,yR=2*Math.PI/4.5,bR=e=>{let t=7.5625,n=2.75;return e<1/n?t*e*e:e<2/n?t*(e-=1.5/n)*e+.75:e<2.5/n?t*(e-=2.25/n)*e+.9375:t*(e-=2.625/n)*e+.984375},xR={linear:e=>e,easeInQuad:e=>e*e,easeOutQuad:e=>1-(1-e)*(1-e),easeInOutQuad:e=>e<.5?2*e*e:1-(-2*e+2)**2/2,easeInCubic:e=>e*e*e,easeOutCubic:e=>1-(1-e)**3,easeInOutCubic:e=>e<.5?4*e*e*e:1-(-2*e+2)**3/2,easeInQuart:e=>e*e*e*e,easeOutQuart:e=>1-(1-e)**4,easeInOutQuart:e=>e<.5?8*e*e*e*e:1-(-2*e+2)**4/2,easeInQuint:e=>e*e*e*e*e,easeOutQuint:e=>1-(1-e)**5,easeInOutQuint:e=>e<.5?16*e*e*e*e*e:1-(-2*e+2)**5/2,easeInSine:e=>1-Math.cos(e*Math.PI/2),easeOutSine:e=>Math.sin(e*Math.PI/2),easeInOutSine:e=>-(Math.cos(Math.PI*e)-1)/2,easeInExpo:e=>e===0?0:2**(10*e-10),easeOutExpo:e=>e===1?1:1-2**(-10*e),easeInOutExpo:e=>e===0?0:e===1?1:e<.5?2**(20*e-10)/2:(2-2**(-20*e+10))/2,easeInCirc:e=>1-Math.sqrt(1-e**2),easeOutCirc:e=>Math.sqrt(1-(e-1)**2),easeInOutCirc:e=>e<.5?(1-Math.sqrt(1-(2*e)**2))/2:(Math.sqrt(1-(-2*e+2)**2)+1)/2,easeInBack:e=>_R*e*e*e-hR*e*e,easeOutBack:e=>1+_R*(e-1)**3+hR*(e-1)**2,easeInOutBack:e=>e<.5?(2*e)**2*(7.189819*e-gR)/2:((2*e-2)**2*(3.5949095*(e*2-2)+gR)+2)/2,easeInElastic:e=>e===0?0:e===1?1:-(2**(10*e-10))*Math.sin((e*10-10.75)*vR),easeOutElastic:e=>e===0?0:e===1?1:2**(-10*e)*Math.sin((e*10-.75)*vR)+1,easeInOutElastic:e=>e===0?0:e===1?1:e<.5?-(2**(20*e-10)*Math.sin((20*e-11.125)*yR))/2:2**(-20*e+10)*Math.sin((20*e-11.125)*yR)/2+1,easeInBounce:e=>1-bR(1-e),easeOutBounce:bR,easeInOutBounce:e=>e<.5?(1-bR(1-2*e))/2:(1+bR(2*e-1))/2},SR=QL({},mR.default,{mass:1,damping:1,easing:xR.linear,clamp:!1}),CR=class{constructor(){this.tension=void 0,this.friction=void 0,this.frequency=void 0,this.damping=void 0,this.mass=void 0,this.velocity=0,this.restVelocity=void 0,this.precision=void 0,this.progress=void 0,this.duration=void 0,this.easing=void 0,this.clamp=void 0,this.bounce=void 0,this.decay=void 0,this.round=void 0,Object.assign(this,SR)}};function wR(e,t,n){n&&(n=QL({},n),TR(n,t),t=QL({},n,t)),TR(e,t),Object.assign(e,t);for(let t in SR)e[t]??(e[t]=SR[t]);let{mass:r,frequency:i,damping:a}=e;return Q.und(i)||(i<.01&&(i=.01),a<0&&(a=0),e.tension=(2*Math.PI/i)**2*r,e.friction=4*Math.PI*a*r/i),e}function TR(e,t){if(!Q.und(t.decay))e.duration=void 0;else{let n=!Q.und(t.tension)||!Q.und(t.friction);(n||!Q.und(t.frequency)||!Q.und(t.damping)||!Q.und(t.mass))&&(e.duration=void 0,e.decay=void 0),n&&(e.frequency=void 0)}}var ER=[],DR=class{constructor(){this.changed=!1,this.values=ER,this.toValues=null,this.fromValues=ER,this.to=void 0,this.from=void 0,this.config=new CR,this.immediate=!1}};function OR(e,{key:t,props:n,defaultProps:r,state:i,actions:a}){return new Promise((o,s)=>{let c,l,u=eR(n.cancel??r?.cancel,t);if(u)p();else{Q.und(n.pause)||(i.paused=eR(n.pause,t));let e=r?.pause;e!==!0&&(e=i.paused||eR(e,t)),c=$L(n.delay||0,t),e?(i.resumeQueue.add(f),a.pause()):(a.resume(),f())}function d(){i.resumeQueue.add(f),i.timeouts.delete(l),l.cancel(),c=l.time-GF.now()}function f(){c>0&&!CI.skipAnimation?(i.delayed=!0,l=GF.setTimeout(p,c),i.pauseQueue.add(d),i.timeouts.add(l)):p()}function p(){i.delayed&&=!1,i.pauseQueue.delete(d),i.timeouts.delete(l),e<=(i.cancelId||0)&&(u=!0);try{a.start(QL({},n,{callId:e,cancel:u}),o)}catch(e){s(e)}}})}var kR=(e,t)=>t.length==1?t[0]:t.some(e=>e.cancelled)?MR(e.get()):t.every(e=>e.noop)?AR(e.get()):jR(e.get(),t.every(e=>e.finished)),AR=e=>({value:e,noop:!0,finished:!0,cancelled:!1}),jR=(e,t,n=!1)=>({value:e,finished:t,cancelled:n}),MR=e=>({value:e,cancelled:!0,finished:!1});function NR(e,t,n,r){let{callId:i,parentId:a,onRest:o}=t,{asyncTo:s,promise:c}=n;return!a&&e===s&&!t.reset?c:n.promise=(async()=>{n.asyncId=i,n.asyncTo=e;let l=iR(t,(e,t)=>t===`onRest`?void 0:e),u,d,f=new Promise((e,t)=>(u=e,d=t)),p=e=>{let t=i<=(n.cancelId||0)&&MR(r)||i!==n.asyncId&&jR(r,!1);if(t)throw e.result=t,d(e),e},m=(e,t)=>{let a=new FR,o=new IR;return(async()=>{if(CI.skipAnimation)throw PR(n),o.result=jR(r,!1),d(o),o;p(a);let s=Q.obj(e)?QL({},e):QL({},t,{to:e});s.parentId=i,pI(l,(e,t)=>{Q.und(s[t])&&(s[t]=e)});let c=await r.start(s);return p(a),n.paused&&await new Promise(e=>{n.resumeQueue.add(e)}),c})()},h;if(CI.skipAnimation)return PR(n),jR(r,!1);try{let t;t=Q.arr(e)?(async e=>{for(let t of e)await m(t)})(e):Promise.resolve(e(m,r.stop.bind(r))),await Promise.all([t.then(u),f]),h=jR(r.get(),!0,!1)}catch(e){if(e instanceof FR)h=e.result;else if(e instanceof IR)h=e.result;else throw e}finally{i==n.asyncId&&(n.asyncId=a,n.asyncTo=a?s:void 0,n.promise=a?c:void 0)}return Q.fun(o)&&GF.batchedUpdates(()=>{o(h,r,r.item)}),h})()}function PR(e,t){hI(e.timeouts,e=>e.cancel()),e.pauseQueue.clear(),e.resumeQueue.clear(),e.asyncId=e.asyncTo=e.promise=void 0,t&&(e.cancelId=t)}var FR=class extends Error{constructor(){super("An async animation has been interrupted. You see this error because you forgot to use `await` or `.catch(...)` on its returned promise."),this.result=void 0}},IR=class extends Error{constructor(){super(`SkipAnimationSignal`),this.result=void 0}},LR=e=>e instanceof zR,RR=1,zR=class extends dL{constructor(...e){super(...e),this.id=RR++,this.key=void 0,this._priority=0}get priority(){return this._priority}set priority(e){this._priority!=e&&(this._priority=e,this._onPriorityChange(e))}get(){let e=NL(this);return e&&e.getValue()}to(...e){return CI.to(this,e)}interpolate(...e){return Oee(),CI.to(this,e)}toJSON(){return this.get()}observerAdded(e){e==1&&this._attach()}observerRemoved(e){e==0&&this._detach()}_attach(){}_detach(){}_onChange(e,t=!1){uL(this,{type:`change`,parent:this,value:e,idle:t})}_onPriorityChange(e){this.idle||OI.sort(this),uL(this,{type:`priority`,parent:this,priority:e})}},BR=Symbol.for(`SpringPhase`),VR=1,HR=2,UR=4,WR=e=>(e[BR]&VR)>0,GR=e=>(e[BR]&HR)>0,KR=e=>(e[BR]&UR)>0,qR=(e,t)=>t?e[BR]|=3:e[BR]&=-3,JR=(e,t)=>t?e[BR]|=UR:e[BR]&=-5,YR=class extends zR{constructor(e,t){if(super(),this.key=void 0,this.animation=new DR,this.queue=void 0,this.defaultProps={},this._state={paused:!1,delayed:!1,pauseQueue:new Set,resumeQueue:new Set,timeouts:new Set},this._pendingCalls=new Set,this._lastCallId=0,this._lastToId=0,this._memoizedDuration=0,!Q.und(e)||!Q.und(t)){let n=Q.obj(e)?QL({},e):QL({},t,{from:e});Q.und(n.default)&&(n.default=!0),this.start(n)}}get idle(){return!(GR(this)||this._state.asyncTo)||KR(this)}get goal(){return sL(this.animation.to)}get velocity(){let e=NL(this);return e instanceof LL?e.lastVelocity||0:e.getPayload().map(e=>e.lastVelocity||0)}get hasAnimated(){return WR(this)}get isAnimating(){return GR(this)}get isPaused(){return KR(this)}get isDelayed(){return this._state.delayed}advance(e){let t=!0,n=!1,r=this.animation,{config:i,toValues:a}=r,o=FL(r.to);!o&&oL(r.to)&&(a=mI(sL(r.to))),r.values.forEach((s,c)=>{if(s.done)return;let l=s.constructor==RL?1:o?o[c].lastPosition:a[c],u=r.immediate,d=l;if(!u){if(d=s.lastPosition,i.tension<=0){s.done=!0;return}let t=s.elapsedTime+=e,n=r.fromValues[c],a=s.v0==null?s.v0=Q.arr(i.velocity)?i.velocity[c]:i.velocity:s.v0,o;if(!Q.und(i.duration)){let r=1;i.duration>0&&(this._memoizedDuration!==i.duration&&(this._memoizedDuration=i.duration,s.durationProgress>0&&(s.elapsedTime=i.duration*s.durationProgress,t=s.elapsedTime+=e)),r=(i.progress||0)+t/this._memoizedDuration,r=r>1?1:r<0?0:r,s.durationProgress=r),d=n+i.easing(r)*(l-n),o=(d-s.lastPosition)/e,u=r==1}else if(i.decay){let e=i.decay===!0?.998:i.decay,r=Math.exp(-(1-e)*t);d=n+a/(1-e)*(1-r),u=Math.abs(s.lastPosition-d)<.1,o=a*r}else{o=s.lastVelocity==null?a:s.lastVelocity;let t=i.precision||(n==l?.005:Math.min(1,Math.abs(l-n)*.001)),r=i.restVelocity||t/10,c=i.clamp?0:i.bounce,f=!Q.und(c),p=n==l?s.v0>0:n<l,m,h=!1,g=Math.ceil(e/1);for(let e=0;e<g&&(m=Math.abs(o)>r,!(!m&&(u=Math.abs(l-d)<=t,u)));++e){f&&(h=d==l||d>l==p,h&&(o=-o*c,d=l));let e=(-i.tension*1e-6*(d-l)+-i.friction*.001*o)/i.mass;o+=e*1,d+=o*1}}s.lastVelocity=o,Number.isNaN(d)&&(console.warn(`Got NaN while animating:`,this),u=!0)}o&&!o[c].done&&(u=!1),u?s.done=!0:t=!1,s.setValue(d,i.round)&&(n=!0)});let s=NL(this),c=s.getValue();if(t){let e=sL(r.to);(c!==e||n)&&!i.decay?(s.setValue(e),this._onChange(e)):n&&i.decay&&this._onChange(c),this._stop()}else n&&this._onChange(c)}set(e){return GF.batchedUpdates(()=>{this._stop(),this._focus(e),this._set(e)}),this}pause(){this._update({pause:!0})}resume(){this._update({pause:!1})}finish(){if(GR(this)){let{to:e,config:t}=this.animation;GF.batchedUpdates(()=>{this._onStart(),t.decay||this._set(e,!1),this._stop()})}return this}update(e){return(this.queue||=[]).push(e),this}start(e,t){let n;return Q.und(e)?(n=this.queue||[],this.queue=[]):n=[Q.obj(e)?e:QL({},t,{to:e})],Promise.all(n.map(e=>this._update(e))).then(e=>kR(this,e))}stop(e){let{to:t}=this.animation;return this._focus(this.get()),PR(this._state,e&&this._lastCallId),GF.batchedUpdates(()=>this._stop(t,e)),this}reset(){this._update({reset:!0})}eventObserved(e){e.type==`change`?this._start():e.type==`priority`&&(this.priority=e.priority+1)}_prepareNode(e){let t=this.key||``,{to:n,from:r}=e;n=Q.obj(n)?n[t]:n,(n==null||dR(n))&&(n=void 0),r=Q.obj(r)?r[t]:r,r??=void 0;let i={to:n,from:r};return WR(this)||(e.reverse&&([n,r]=[r,n]),r=sL(r),Q.und(r)?NL(this)||this._set(n):this._set(r)),i}_update(e,t){let n=QL({},e),{key:r,defaultProps:i}=this;n.default&&Object.assign(i,iR(n,(e,t)=>/^on/.test(t)?tR(e,r):e)),nz(this,n,`onProps`),rz(this,`onProps`,n,this);let a=this._prepareNode(n);if(Object.isFrozen(this))throw Error("Cannot animate a `SpringValue` object that is frozen. Did you forget to pass your component to `animated(...)` before animating its props?");let o=this._state;return OR(++this._lastCallId,{key:r,props:n,defaultProps:i,state:o,actions:{pause:()=>{KR(this)||(JR(this,!0),gI(o.pauseQueue),rz(this,`onPause`,jR(this,XR(this,this.animation.to)),this))},resume:()=>{KR(this)&&(JR(this,!1),GR(this)&&this._resume(),gI(o.resumeQueue),rz(this,`onResume`,jR(this,XR(this,this.animation.to)),this))},start:this._merge.bind(this,a)}}).then(e=>{if(n.loop&&e.finished&&!(t&&e.noop)){let e=ZR(n);if(e)return this._update(e,!0)}return e})}_merge(e,t,n){if(t.cancel)return this.stop(!0),n(MR(this));let r=!Q.und(e.to),i=!Q.und(e.from);if(r||i)if(t.callId>this._lastToId)this._lastToId=t.callId;else return n(MR(this));let{key:a,defaultProps:o,animation:s}=this,{to:c,from:l}=s,{to:u=c,from:d=l}=e;i&&!r&&(!t.default||Q.und(u))&&(u=d),t.reverse&&([u,d]=[d,u]);let f=!dI(d,l);f&&(s.from=d),d=sL(d);let p=!dI(u,c);p&&this._focus(u);let m=dR(t.to),{config:h}=s,{decay:g,velocity:_}=h;(r||i)&&(h.velocity=0),t.config&&!m&&wR(h,$L(t.config,a),t.config===o.config?void 0:$L(o.config,a));let v=NL(this);if(!v||Q.und(u))return n(jR(this,!0));let y=Q.und(t.reset)?i&&!t.default:!Q.und(d)&&eR(t.reset,a),b=y?d:this.get(),x=lR(u),S=Q.num(x)||Q.arr(x)||TL(x),C=!m&&(!S||eR(o.immediate||t.immediate,a));if(p){let e=UL(u);if(e!==v.constructor)if(C)v=this._set(x);else throw Error(`Cannot animate between ${v.constructor.name} and ${e.name}, as the "to" prop suggests`)}let w=v.constructor,T=oL(u),E=!1;if(!T){let e=y||!WR(this)&&f;(p||e)&&(E=dI(lR(b),x),T=!E),(!dI(s.immediate,C)&&!C||!dI(h.decay,g)||!dI(h.velocity,_))&&(T=!0)}if(E&&GR(this)&&(s.changed&&!y?T=!0:T||this._stop(c)),!m&&((T||oL(c))&&(s.values=v.getPayload(),s.toValues=oL(u)?null:w==RL?[1]:mI(x)),s.immediate!=C&&(s.immediate=C,!C&&!y&&this._set(c)),T)){let{onRest:e}=s;fI(tz,e=>nz(this,t,e));let r=jR(this,XR(this,c));gI(this._pendingCalls,r),this._pendingCalls.add(n),s.changed&&GF.batchedUpdates(()=>{s.changed=!y,e?.(r,this),y?$L(o.onRest,r):s.onStart==null||s.onStart(r,this)})}y&&this._set(b),m?n(NR(t.to,t,this._state,this)):T?this._start():GR(this)&&!p?this._pendingCalls.add(n):n(AR(b))}_focus(e){let t=this.animation;e!==t.to&&(cL(this)&&this._detach(),t.to=e,cL(this)&&this._attach())}_attach(){let e=0,{to:t}=this.animation;oL(t)&&(pL(t,this),LR(t)&&(e=t.priority+1)),this.priority=e}_detach(){let{to:e}=this.animation;oL(e)&&mL(e,this)}_set(e,t=!0){let n=sL(e);if(!Q.und(n)){let e=NL(this);if(!e||!dI(n,e.getValue())){let r=UL(n);!e||e.constructor!=r?PL(this,r.create(n)):e.setValue(n),e&&GF.batchedUpdates(()=>{this._onChange(n,t)})}}return NL(this)}_onStart(){let e=this.animation;e.changed||(e.changed=!0,rz(this,`onStart`,jR(this,XR(this,e.to)),this))}_onChange(e,t){t||(this._onStart(),$L(this.animation.onChange,e,this)),$L(this.defaultProps.onChange,e,this),super._onChange(e,t)}_start(){let e=this.animation;NL(this).reset(sL(e.to)),e.immediate||(e.fromValues=e.values.map(e=>e.lastPosition)),GR(this)||(qR(this,!0),KR(this)||this._resume())}_resume(){CI.skipAnimation?this.finish():OI.start(this)}_stop(e,t){if(GR(this)){qR(this,!1);let n=this.animation;fI(n.values,e=>{e.done=!0}),n.toValues&&(n.onChange=n.onPause=n.onResume=void 0),uL(this,{type:`idle`,parent:this});let r=t?MR(this.get()):jR(this.get(),XR(this,e??n.to));gI(this._pendingCalls,r),n.changed&&(n.changed=!1,rz(this,`onRest`,r,this))}}};function XR(e,t){let n=lR(t);return dI(lR(e.get()),n)}function ZR(e,t=e.loop,n=e.to){let r=$L(t);if(r){let i=r!==!0&&cR(r),a=(i||e).reverse,o=!i||i.reset;return QR(QL({},e,{loop:t,default:!1,pause:void 0,to:!a||dR(n)?n:void 0,from:o?e.from:void 0,reset:o},i))}}function QR(e){let{to:t,from:n}=e=cR(e),r=new Set;return Q.obj(t)&&ez(t,r),Q.obj(n)&&ez(n,r),e.keys=r.size?Array.from(r):null,e}function $R(e){let t=QR(e);return Q.und(t.default)&&(t.default=iR(t)),t}function ez(e,t){pI(e,(e,n)=>e!=null&&t.add(n))}var tz=[`onStart`,`onRest`,`onChange`,`onPause`,`onResume`];function nz(e,t,n){e.animation[n]=t[n]===nR(t,n)?void 0:tR(t[n],e.key)}function rz(e,t,...n){var r,i,a,o;(r=(i=e.animation)[t])==null||r.call(i,...n),(a=(o=e.defaultProps)[t])==null||a.call(o,...n)}var iz=[`onStart`,`onChange`,`onRest`],az=1,oz=class{constructor(e,t){this.id=az++,this.springs={},this.queue=[],this.ref=void 0,this._flush=void 0,this._initialProps=void 0,this._lastAsyncId=0,this._active=new Set,this._changed=new Set,this._started=!1,this._item=void 0,this._state={paused:!1,pauseQueue:new Set,resumeQueue:new Set,timeouts:new Set},this._events={onStart:new Map,onChange:new Map,onRest:new Map},this._onFrame=this._onFrame.bind(this),t&&(this._flush=t),e&&this.start(QL({default:!0},e))}get idle(){return!this._state.asyncTo&&Object.values(this.springs).every(e=>e.idle&&!e.isDelayed&&!e.isPaused)}get item(){return this._item}set item(e){this._item=e}get(){let e={};return this.each((t,n)=>e[n]=t.get()),e}set(e){for(let t in e){let n=e[t];Q.und(n)||this.springs[t].set(n)}}update(e){return e&&this.queue.push(QR(e)),this}start(e){let{queue:t}=this;return e?t=mI(e).map(QR):this.queue=[],this._flush?this._flush(this,t):(pz(this,t),sz(this,t))}stop(e,t){if(e!==!!e&&(t=e),t){let n=this.springs;fI(mI(t),t=>n[t].stop(!!e))}else PR(this._state,this._lastAsyncId),this.each(t=>t.stop(!!e));return this}pause(e){if(Q.und(e))this.start({pause:!0});else{let t=this.springs;fI(mI(e),e=>t[e].pause())}return this}resume(e){if(Q.und(e))this.start({pause:!1});else{let t=this.springs;fI(mI(e),e=>t[e].resume())}return this}each(e){pI(this.springs,e)}_onFrame(){let{onStart:e,onChange:t,onRest:n}=this._events,r=this._active.size>0,i=this._changed.size>0;(r&&!this._started||i&&!this._started)&&(this._started=!0,hI(e,([e,t])=>{t.value=this.get(),e(t,this,this._item)}));let a=!r&&this._started,o=i||a&&n.size?this.get():null;i&&t.size&&hI(t,([e,t])=>{t.value=o,e(t,this,this._item)}),a&&(this._started=!1,hI(n,([e,t])=>{t.value=o,e(t,this,this._item)}))}eventObserved(e){if(e.type==`change`)this._changed.add(e.parent),e.idle||this._active.add(e.parent);else if(e.type==`idle`)this._active.delete(e.parent);else return;GF.onFrame(this._onFrame)}};function sz(e,t){return Promise.all(t.map(t=>cz(e,t))).then(t=>kR(e,t))}async function cz(e,t,n){let{keys:r,to:i,from:a,loop:o,onRest:s,onResolve:c}=t,l=Q.obj(t.default)&&t.default;o&&(t.loop=!1),i===!1&&(t.to=null),a===!1&&(t.from=null);let u=Q.arr(i)||Q.fun(i)?i:void 0;u?(t.to=void 0,t.onRest=void 0,l&&(l.onRest=void 0)):fI(iz,n=>{let r=t[n];if(Q.fun(r)){let i=e._events[n];t[n]=({finished:e,cancelled:t})=>{let n=i.get(r);n?(e||(n.finished=!1),t&&(n.cancelled=!0)):i.set(r,{value:null,finished:e||!1,cancelled:t||!1})},l&&(l[n]=t[n])}});let d=e._state;t.pause===!d.paused?(d.paused=t.pause,gI(t.pause?d.pauseQueue:d.resumeQueue)):d.paused&&(t.pause=!0);let f=(r||Object.keys(e.springs)).map(n=>e.springs[n].start(t)),p=t.cancel===!0||nR(t,`cancel`)===!0;(u||p&&d.asyncId)&&f.push(OR(++e._lastAsyncId,{props:t,state:d,actions:{pause:lI,resume:lI,start(t,n){p?(PR(d,e._lastAsyncId),n(MR(e))):(t.onRest=s,n(NR(u,t,d,e)))}}})),d.paused&&await new Promise(e=>{d.resumeQueue.add(e)});let m=kR(e,await Promise.all(f));if(o&&m.finished&&!(n&&m.noop)){let n=ZR(t,o,i);if(n)return pz(e,[n]),cz(e,n,!0)}return c&&GF.batchedUpdates(()=>c(m,e,e.item)),m}function lz(e,t){let n=QL({},e.springs);return t&&fI(mI(t),e=>{Q.und(e.keys)&&(e=QR(e)),Q.obj(e.to)||(e=QL({},e,{to:void 0})),fz(n,e,e=>dz(e))}),uz(e,n),n}function uz(e,t){pI(t,(t,n)=>{e.springs[n]||(e.springs[n]=t,pL(t,e))})}function dz(e,t){let n=new YR;return n.key=e,t&&pL(n,t),n}function fz(e,t,n){t.keys&&fI(t.keys,r=>{(e[r]||(e[r]=n(r)))._prepareNode(t)})}function pz(e,t){fI(t,t=>{fz(e.springs,t,t=>dz(t,e))})}function mz(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,a;for(a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}var hz=[`children`],gz=e=>{let{children:t}=e,n=mz(e,hz),r=(0,w.useContext)(_z),i=n.pause||!!r.pause,a=n.immediate||!!r.immediate;n=Mee(()=>({pause:i,immediate:a}),[i,a]);let{Provider:o}=_z;return w.createElement(o,{value:n},t)},_z=vz(gz,{});gz.Provider=_z.Provider,gz.Consumer=_z.Consumer;function vz(e,t){return Object.assign(e,w.createContext(t)),e.Provider._context=e,e.Consumer._context=e,e}var yz=()=>{let e=[],t=function(t){Aee();let r=[];return fI(e,(e,i)=>{if(Q.und(t))r.push(e.start());else{let a=n(t,e,i);a&&r.push(e.start(a))}}),r};t.current=e,t.add=function(t){e.includes(t)||e.push(t)},t.delete=function(t){let n=e.indexOf(t);~n&&e.splice(n,1)},t.pause=function(){return fI(e,e=>e.pause(...arguments)),this},t.resume=function(){return fI(e,e=>e.resume(...arguments)),this},t.set=function(t){fI(e,e=>e.set(t))},t.start=function(t){let n=[];return fI(e,(e,r)=>{if(Q.und(t))n.push(e.start());else{let i=this._getProps(t,e,r);i&&n.push(e.start(i))}}),n},t.stop=function(){return fI(e,e=>e.stop(...arguments)),this},t.update=function(t){return fI(e,(e,n)=>e.update(this._getProps(t,e,n))),this};let n=function(e,t,n){return Q.fun(e)?e(n,t):e};return t._getProps=n,t};function bz(e,t,n){let r=Q.fun(t)&&t;r&&!n&&(n=[]);let i=(0,w.useMemo)(()=>r||arguments.length==3?yz():void 0,[]),a=(0,w.useRef)(0),o=DL(),s=(0,w.useMemo)(()=>({ctrls:[],queue:[],flush(e,t){let n=lz(e,t);return a.current>0&&!s.queue.length&&!Object.keys(n).some(t=>!e.springs[t])?sz(e,t):new Promise(r=>{uz(e,n),s.queue.push(()=>{r(sz(e,t))}),o()})}}),[]),c=(0,w.useRef)([...s.ctrls]),l=[],u=AL(e)||0;(0,w.useMemo)(()=>{fI(c.current.slice(e,u),e=>{fR(e,i),e.stop(!0)}),c.current.length=e,d(u,e)},[e]),(0,w.useMemo)(()=>{d(0,Math.min(u,e))},n);function d(e,n){for(let i=e;i<n;i++){let e=c.current[i]||(c.current[i]=new oz(null,s.flush)),n=r?r(i,e):t[i];n&&(l[i]=$R(n))}}let f=c.current.map((e,t)=>lz(e,l[t])),p=(0,w.useContext)(gz),m=p!==AL(p)&&uR(p);EL(()=>{a.current++,s.ctrls=c.current;let{queue:e}=s;e.length&&(s.queue=[],fI(e,e=>e())),fI(c.current,(e,t)=>{i?.add(e),m&&e.start({default:p});let n=l[t];n&&(pR(e,n.ref),e.ref?e.queue.push(n):e.start(n))})}),OL(()=>()=>{fI(s.ctrls,e=>e.stop(!0))});let h=f.map(e=>QL({},e));return i?[h,i]:h}function xz(e,t){let n=Q.fun(e),[[r],i]=bz(1,n?e:[e],n?t||[]:t);return n||arguments.length==2?[r,i]:r}var Sz;(function(e){e.MOUNT=`mount`,e.ENTER=`enter`,e.UPDATE=`update`,e.LEAVE=`leave`})(Sz||={});function Cz(e,t,n){let r=Q.fun(t)&&t,{reset:i,sort:a,trail:o=0,expires:s=!0,exitBeforeEnter:c=!1,onDestroyed:l,ref:u,config:d}=r?r():t,f=(0,w.useMemo)(()=>r||arguments.length==3?yz():void 0,[]),p=mI(e),m=[],h=(0,w.useRef)(null),g=i?null:h.current;EL(()=>{h.current=m}),OL(()=>(fI(h.current,e=>{var t;(t=e.ctrl.ref)==null||t.add(e.ctrl);let n=C.get(e);n&&e.ctrl.start(n.payload)}),()=>{fI(h.current,e=>{e.expired&&clearTimeout(e.expirationId),fR(e.ctrl,f),e.ctrl.stop(!0)})}));let _=Tz(p,r?r():t,g),v=i&&h.current||[];EL(()=>fI(v,({ctrl:e,item:t,key:n})=>{fR(e,f),$L(l,t,n)}));let y=[];if(g&&fI(g,(e,t)=>{e.expired?(clearTimeout(e.expirationId),v.push(e)):(t=y[t]=_.indexOf(e.key),~t&&(m[t]=e))}),fI(p,(e,t)=>{m[t]||(m[t]={key:_[t],item:e,phase:Sz.MOUNT,ctrl:new oz},m[t].ctrl.item=e)}),y.length){let e=-1,{leave:n}=r?r():t;fI(y,(t,r)=>{let i=g[r];~t?(e=m.indexOf(i),m[e]=QL({},i,{item:p[t]})):n&&m.splice(++e,0,i)})}Q.fun(a)&&m.sort((e,t)=>a(e.item,t.item));let b=-o,x=DL(),S=iR(t),C=new Map,T=(0,w.useRef)(new Map),E=(0,w.useRef)(!1);fI(m,(e,n)=>{let i=e.key,a=e.phase,l=r?r():t,f,p,m=$L(l.delay||0,i);if(a==Sz.MOUNT)f=l.enter,p=Sz.ENTER;else{let e=_.indexOf(i)<0;if(a!=Sz.LEAVE)if(e)f=l.leave,p=Sz.LEAVE;else if(f=l.update)p=Sz.UPDATE;else return;else if(!e)f=l.enter,p=Sz.ENTER;else return}if(f=$L(f,e.item,n),f=Q.obj(f)?cR(f):{to:f},!f.config){let t=d||S.config;f.config=$L(t,e.item,n,p)}b+=o;let v=QL({},S,{delay:m+b,ref:u,immediate:l.immediate,reset:!1},f);if(p==Sz.ENTER&&Q.und(v.from)){let i=r?r():t;v.from=$L(Q.und(i.initial)||g?i.from:i.initial,e.item,n)}let{onResolve:y}=v;v.onResolve=e=>{$L(y,e);let t=h.current,n=t.find(e=>e.key===i);if(n&&!(e.cancelled&&n.phase!=Sz.UPDATE)&&n.ctrl.idle){let e=t.every(e=>e.ctrl.idle);if(n.phase==Sz.LEAVE){let t=$L(s,n.item);if(t!==!1){let r=t===!0?0:t;if(n.expired=!0,!e&&r>0){r<=2147483647&&(n.expirationId=setTimeout(x,r));return}}}e&&t.some(e=>e.expired)&&(T.current.delete(n),c&&(E.current=!0),x())}};let w=lz(e.ctrl,v);p===Sz.LEAVE&&c?T.current.set(e,{phase:p,springs:w,payload:v}):C.set(e,{phase:p,springs:w,payload:v})});let D=(0,w.useContext)(gz),O=D!==AL(D)&&uR(D);EL(()=>{O&&fI(m,e=>{e.ctrl.start({default:D})})},[D]),fI(C,(e,t)=>{if(T.current.size){let e=m.findIndex(e=>e.key===t.key);m.splice(e,1)}}),EL(()=>{fI(T.current.size?T.current:C,({phase:e,payload:t},n)=>{let{ctrl:r}=n;n.phase=e,f?.add(r),O&&e==Sz.ENTER&&r.start({default:D}),t&&(pR(r,t.ref),r.ref&&!E.current?r.update(t):(r.start(t),E.current&&=!1))})},i?void 0:n);let k=e=>w.createElement(w.Fragment,null,m.map((t,n)=>{let{springs:r}=C.get(t)||t.ctrl,i=e(QL({},r),t.item,t,n);return i&&i.type?w.createElement(i.type,QL({},i.props,{key:Q.str(t.key)||Q.num(t.key)?t.key:t.ctrl.id,ref:i.ref})):i}));return f?[k,f]:k}var wz=1;function Tz(e,{key:t,keys:n=t},r){if(n===null){let t=new Set;return e.map(e=>{let n=r&&r.find(n=>n.item===e&&n.phase!==Sz.LEAVE&&!t.has(n));return n?(t.add(n),n.key):wz++})}return Q.und(n)?e:Q.fun(n)?e.map(n):mI(n)}var Ez=class extends zR{constructor(e,t){super(),this.key=void 0,this.idle=!0,this.calc=void 0,this._active=new Set,this.source=e,this.calc=eL(...t);let n=this._get(),r=UL(n);PL(this,r.create(n))}advance(e){let t=this._get();dI(t,this.get())||(NL(this).setValue(t),this._onChange(t,this.idle)),!this.idle&&Oz(this._active)&&kz(this)}_get(){let e=Q.arr(this.source)?this.source.map(sL):mI(sL(this.source));return this.calc(...e)}_start(){this.idle&&!Oz(this._active)&&(this.idle=!1,fI(FL(this),e=>{e.done=!1}),CI.skipAnimation?(GF.batchedUpdates(()=>this.advance()),kz(this)):OI.start(this))}_attach(){let e=1;fI(mI(this.source),t=>{oL(t)&&pL(t,this),LR(t)&&(t.idle||this._active.add(t),e=Math.max(e,t.priority+1))}),this.priority=e,this._start()}_detach(){fI(mI(this.source),e=>{oL(e)&&mL(e,this)}),this._active.clear(),kz(this)}eventObserved(e){e.type==`change`?e.idle?this.advance():(this._active.add(e.parent),this._start()):e.type==`idle`?this._active.delete(e.parent):e.type==`priority`&&(this.priority=mI(this.source).reduce((e,t)=>Math.max(e,(LR(t)?t.priority:0)+1),0))}};function Dz(e){return e.idle!==!1}function Oz(e){return!e.size||Array.from(e).every(Dz)}function kz(e){e.idle||(e.idle=!0,fI(FL(e),e=>{e.done=!0}),uL(e,{type:`idle`,parent:e}))}var Az=(e,...t)=>new Ez(e,t);CI.assign({createStringInterpolator:SL,to:(e,t)=>new Ez(e,t)}),OI.advance;function jz(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,a;for(a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}var Mz=[`style`,`children`,`scrollTop`,`scrollLeft`],Nz=/^--/;function Pz(e,t){return t==null||typeof t==`boolean`||t===``?``:typeof t==`number`&&t!==0&&!Nz.test(e)&&!(Lz.hasOwnProperty(e)&&Lz[e])?t+`px`:(``+t).trim()}var Fz={};function Iz(e,t){if(!e.nodeType||!e.setAttribute)return!1;let n=e.nodeName===`filter`||e.parentNode&&e.parentNode.nodeName===`filter`,r=t,{style:i,children:a,scrollTop:o,scrollLeft:s}=r,c=jz(r,Mz),l=Object.values(c),u=Object.keys(c).map(t=>n||e.hasAttribute(t)?t:Fz[t]||(Fz[t]=t.replace(/([A-Z])/g,e=>`-`+e.toLowerCase())));a!==void 0&&(e.textContent=a);for(let t in i)if(i.hasOwnProperty(t)){let n=Pz(t,i[t]);Nz.test(t)?e.style.setProperty(t,n):e.style[t]=n}u.forEach((t,n)=>{e.setAttribute(t,l[n])}),o!==void 0&&(e.scrollTop=o),s!==void 0&&(e.scrollLeft=s)}var Lz={animationIterationCount:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},Rz=(e,t)=>e+t.charAt(0).toUpperCase()+t.substring(1),zz=[`Webkit`,`Ms`,`Moz`,`O`];Lz=Object.keys(Lz).reduce((e,t)=>(zz.forEach(n=>e[Rz(n,t)]=e[t]),e),Lz);var Bz=[`x`,`y`,`z`],Vz=/^(matrix|translate|scale|rotate|skew)/,Hz=/^(translate)/,Uz=/^(rotate|skew)/,Wz=(e,t)=>Q.num(e)&&e!==0?e+t:e,Gz=(e,t)=>Q.arr(e)?e.every(e=>Gz(e,t)):Q.num(e)?e===t:parseFloat(e)===t,Kz=class extends BL{constructor(e){let{x:t,y:n,z:r}=e,i=jz(e,Bz),a=[],o=[];(t||n||r)&&(a.push([t||0,n||0,r||0]),o.push(e=>[`translate3d(${e.map(e=>Wz(e,`px`)).join(`,`)})`,Gz(e,0)])),pI(i,(e,t)=>{if(t===`transform`)a.push([e||``]),o.push(e=>[e,e===``]);else if(Vz.test(t)){if(delete i[t],Q.und(e))return;let n=Hz.test(t)?`px`:Uz.test(t)?`deg`:``;a.push(mI(e)),o.push(t===`rotate3d`?([e,t,r,i])=>[`rotate3d(${e},${t},${r},${Wz(i,n)})`,Gz(i,0)]:e=>[`${t}(${e.map(e=>Wz(e,n)).join(`,`)})`,Gz(e,+!!t.startsWith(`scale`))])}}),a.length&&(i.transform=new qz(a,o)),super(i)}},qz=class extends dL{constructor(e,t){super(),this._value=null,this.inputs=e,this.transforms=t}get(){return this._value||=this._get()}_get(){let e=``,t=!0;return fI(this.inputs,(n,r)=>{let i=sL(n[0]),[a,o]=this.transforms[r](Q.arr(i)?i:n.map(sL));e+=` `+a,t&&=o}),t?`none`:e}observerAdded(e){e==1&&fI(this.inputs,e=>fI(e,e=>oL(e)&&pL(e,this)))}observerRemoved(e){e==0&&fI(this.inputs,e=>fI(e,e=>oL(e)&&mL(e,this)))}eventObserved(e){e.type==`change`&&(this._value=null),uL(this,e)}},Jz=`a.abbr.address.area.article.aside.audio.b.base.bdi.bdo.big.blockquote.body.br.button.canvas.caption.cite.code.col.colgroup.data.datalist.dd.del.details.dfn.dialog.div.dl.dt.em.embed.fieldset.figcaption.figure.footer.form.h1.h2.h3.h4.h5.h6.head.header.hgroup.hr.html.i.iframe.img.input.ins.kbd.keygen.label.legend.li.link.main.map.mark.menu.menuitem.meta.meter.nav.noscript.object.ol.optgroup.option.output.p.param.picture.pre.progress.q.rp.rt.ruby.s.samp.script.section.select.small.source.span.strong.style.sub.summary.sup.table.tbody.td.textarea.tfoot.th.thead.time.title.tr.track.u.ul.var.video.wbr.circle.clipPath.defs.ellipse.foreignObject.g.image.line.linearGradient.mask.path.pattern.polygon.polyline.radialGradient.rect.stop.svg.text.tspan`.split(`.`),Yz=[`scrollTop`,`scrollLeft`];CI.assign({batchedUpdates:Ye.unstable_batchedUpdates,createStringInterpolator:SL,colors:PI});var Xz=XL(Jz,{applyAnimatedValues:Iz,createAnimatedStyle:e=>new Kz(e),getComponentProps:e=>jz(e,Yz)}).animated,Zz=o(((e,t)=>{function n(){this.__data__=[],this.size=0}t.exports=n})),Qz=o(((e,t)=>{function n(e,t){return e===t||e!==e&&t!==t}t.exports=n})),$z=o(((e,t)=>{var n=Qz();function r(e,t){for(var r=e.length;r--;)if(n(e[r][0],t))return r;return-1}t.exports=r})),eB=o(((e,t)=>{var n=$z(),r=Array.prototype.splice;function i(e){var t=this.__data__,i=n(t,e);return i<0?!1:(i==t.length-1?t.pop():r.call(t,i,1),--this.size,!0)}t.exports=i})),tB=o(((e,t)=>{var n=$z();function r(e){var t=this.__data__,r=n(t,e);return r<0?void 0:t[r][1]}t.exports=r})),nB=o(((e,t)=>{var n=$z();function r(e){return n(this.__data__,e)>-1}t.exports=r})),rB=o(((e,t)=>{var n=$z();function r(e,t){var r=this.__data__,i=n(r,e);return i<0?(++this.size,r.push([e,t])):r[i][1]=t,this}t.exports=r})),iB=o(((e,t)=>{var n=Zz(),r=eB(),i=tB(),a=nB(),o=rB();function s(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}s.prototype.clear=n,s.prototype.delete=r,s.prototype.get=i,s.prototype.has=a,s.prototype.set=o,t.exports=s})),aB=o(((e,t)=>{var n=iB();function r(){this.__data__=new n,this.size=0}t.exports=r})),oB=o(((e,t)=>{function n(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}t.exports=n})),sB=o(((e,t)=>{function n(e){return this.__data__.get(e)}t.exports=n})),cB=o(((e,t)=>{function n(e){return this.__data__.has(e)}t.exports=n})),lB=o(((e,t)=>{t.exports=typeof global==`object`&&global&&global.Object===Object&&global})),uB=o(((e,t)=>{var n=lB(),r=typeof self==`object`&&self&&self.Object===Object&&self;t.exports=n||r||Function(`return this`)()})),dB=o(((e,t)=>{t.exports=uB().Symbol})),fB=o(((e,t)=>{var n=dB(),r=Object.prototype,i=r.hasOwnProperty,a=r.toString,o=n?n.toStringTag:void 0;function s(e){var t=i.call(e,o),n=e[o];try{e[o]=void 0;var r=!0}catch{}var s=a.call(e);return r&&(t?e[o]=n:delete e[o]),s}t.exports=s})),pB=o(((e,t)=>{var n=Object.prototype.toString;function r(e){return n.call(e)}t.exports=r})),mB=o(((e,t)=>{var n=dB(),r=fB(),i=pB(),a=`[object Null]`,o=`[object Undefined]`,s=n?n.toStringTag:void 0;function c(e){return e==null?e===void 0?o:a:s&&s in Object(e)?r(e):i(e)}t.exports=c})),hB=o(((e,t)=>{function n(e){var t=typeof e;return e!=null&&(t==`object`||t==`function`)}t.exports=n})),gB=o(((e,t)=>{var n=mB(),r=hB(),i=`[object AsyncFunction]`,a=`[object Function]`,o=`[object GeneratorFunction]`,s=`[object Proxy]`;function c(e){if(!r(e))return!1;var t=n(e);return t==a||t==o||t==i||t==s}t.exports=c})),_B=o(((e,t)=>{t.exports=uB()[`__core-js_shared__`]})),vB=o(((e,t)=>{var n=_B(),r=function(){var e=/[^.]+$/.exec(n&&n.keys&&n.keys.IE_PROTO||``);return e?`Symbol(src)_1.`+e:``}();function i(e){return!!r&&r in e}t.exports=i})),yB=o(((e,t)=>{var n=Function.prototype.toString;function r(e){if(e!=null){try{return n.call(e)}catch{}try{return e+``}catch{}}return``}t.exports=r})),bB=o(((e,t)=>{var n=gB(),r=vB(),i=hB(),a=yB(),o=/[\\^$.*+?()[\]{}|]/g,s=/^\[object .+?Constructor\]$/,c=Function.prototype,l=Object.prototype,u=c.toString,d=l.hasOwnProperty,f=RegExp(`^`+u.call(d).replace(o,`\\$&`).replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,`$1.*?`)+`$`);function p(e){return!i(e)||r(e)?!1:(n(e)?f:s).test(a(e))}t.exports=p})),xB=o(((e,t)=>{function n(e,t){return e?.[t]}t.exports=n})),SB=o(((e,t)=>{var n=bB(),r=xB();function i(e,t){var i=r(e,t);return n(i)?i:void 0}t.exports=i})),CB=o(((e,t)=>{t.exports=SB()(uB(),`Map`)})),wB=o(((e,t)=>{t.exports=SB()(Object,`create`)})),TB=o(((e,t)=>{var n=wB();function r(){this.__data__=n?n(null):{},this.size=0}t.exports=r})),EB=o(((e,t)=>{function n(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=+!!t,t}t.exports=n})),DB=o(((e,t)=>{var n=wB(),r=`__lodash_hash_undefined__`,i=Object.prototype.hasOwnProperty;function a(e){var t=this.__data__;if(n){var a=t[e];return a===r?void 0:a}return i.call(t,e)?t[e]:void 0}t.exports=a})),OB=o(((e,t)=>{var n=wB(),r=Object.prototype.hasOwnProperty;function i(e){var t=this.__data__;return n?t[e]!==void 0:r.call(t,e)}t.exports=i})),kB=o(((e,t)=>{var n=wB(),r=`__lodash_hash_undefined__`;function i(e,t){var i=this.__data__;return this.size+=+!this.has(e),i[e]=n&&t===void 0?r:t,this}t.exports=i})),AB=o(((e,t)=>{var n=TB(),r=EB(),i=DB(),a=OB(),o=kB();function s(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}s.prototype.clear=n,s.prototype.delete=r,s.prototype.get=i,s.prototype.has=a,s.prototype.set=o,t.exports=s})),jB=o(((e,t)=>{var n=AB(),r=iB(),i=CB();function a(){this.size=0,this.__data__={hash:new n,map:new(i||r),string:new n}}t.exports=a})),MB=o(((e,t)=>{function n(e){var t=typeof e;return t==`string`||t==`number`||t==`symbol`||t==`boolean`?e!==`__proto__`:e===null}t.exports=n})),NB=o(((e,t)=>{var n=MB();function r(e,t){var r=e.__data__;return n(t)?r[typeof t==`string`?`string`:`hash`]:r.map}t.exports=r})),PB=o(((e,t)=>{var n=NB();function r(e){var t=n(this,e).delete(e);return this.size-=+!!t,t}t.exports=r})),FB=o(((e,t)=>{var n=NB();function r(e){return n(this,e).get(e)}t.exports=r})),IB=o(((e,t)=>{var n=NB();function r(e){return n(this,e).has(e)}t.exports=r})),LB=o(((e,t)=>{var n=NB();function r(e,t){var r=n(this,e),i=r.size;return r.set(e,t),this.size+=r.size==i?0:1,this}t.exports=r})),RB=o(((e,t)=>{var n=jB(),r=PB(),i=FB(),a=IB(),o=LB();function s(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}s.prototype.clear=n,s.prototype.delete=r,s.prototype.get=i,s.prototype.has=a,s.prototype.set=o,t.exports=s})),zB=o(((e,t)=>{var n=iB(),r=CB(),i=RB(),a=200;function o(e,t){var o=this.__data__;if(o instanceof n){var s=o.__data__;if(!r||s.length<a-1)return s.push([e,t]),this.size=++o.size,this;o=this.__data__=new i(s)}return o.set(e,t),this.size=o.size,this}t.exports=o})),BB=o(((e,t)=>{var n=iB(),r=aB(),i=oB(),a=sB(),o=cB(),s=zB();function c(e){var t=this.__data__=new n(e);this.size=t.size}c.prototype.clear=r,c.prototype.delete=i,c.prototype.get=a,c.prototype.has=o,c.prototype.set=s,t.exports=c})),VB=o(((e,t)=>{var n=SB();t.exports=function(){try{var e=n(Object,`defineProperty`);return e({},``,{}),e}catch{}}()})),HB=o(((e,t)=>{var n=VB();function r(e,t,r){t==`__proto__`&&n?n(e,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[t]=r}t.exports=r})),UB=o(((e,t)=>{var n=HB(),r=Qz();function i(e,t,i){(i!==void 0&&!r(e[t],i)||i===void 0&&!(t in e))&&n(e,t,i)}t.exports=i})),WB=o(((e,t)=>{function n(e){return function(t,n,r){for(var i=-1,a=Object(t),o=r(t),s=o.length;s--;){var c=o[e?s:++i];if(n(a[c],c,a)===!1)break}return t}}t.exports=n})),GB=o(((e,t)=>{t.exports=WB()()})),KB=o(((e,t)=>{var n=uB(),r=typeof e==`object`&&e&&!e.nodeType&&e,i=r&&typeof t==`object`&&t&&!t.nodeType&&t,a=i&&i.exports===r?n.Buffer:void 0,o=a?a.allocUnsafe:void 0;function s(e,t){if(t)return e.slice();var n=e.length,r=o?o(n):new e.constructor(n);return e.copy(r),r}t.exports=s})),qB=o(((e,t)=>{t.exports=uB().Uint8Array})),JB=o(((e,t)=>{var n=qB();function r(e){var t=new e.constructor(e.byteLength);return new n(t).set(new n(e)),t}t.exports=r})),YB=o(((e,t)=>{var n=JB();function r(e,t){var r=t?n(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.length)}t.exports=r})),XB=o(((e,t)=>{function n(e,t){var n=-1,r=e.length;for(t||=Array(r);++n<r;)t[n]=e[n];return t}t.exports=n})),ZB=o(((e,t)=>{var n=hB(),r=Object.create;t.exports=function(){function e(){}return function(t){if(!n(t))return{};if(r)return r(t);e.prototype=t;var i=new e;return e.prototype=void 0,i}}()})),QB=o(((e,t)=>{function n(e,t){return function(n){return e(t(n))}}t.exports=n})),$B=o(((e,t)=>{t.exports=QB()(Object.getPrototypeOf,Object)})),eV=o(((e,t)=>{var n=Object.prototype;function r(e){var t=e&&e.constructor;return e===(typeof t==`function`&&t.prototype||n)}t.exports=r})),tV=o(((e,t)=>{var n=ZB(),r=$B(),i=eV();function a(e){return typeof e.constructor==`function`&&!i(e)?n(r(e)):{}}t.exports=a})),nV=o(((e,t)=>{function n(e){return typeof e==`object`&&!!e}t.exports=n})),rV=o(((e,t)=>{var n=mB(),r=nV(),i=`[object Arguments]`;function a(e){return r(e)&&n(e)==i}t.exports=a})),iV=o(((e,t)=>{var n=rV(),r=nV(),i=Object.prototype,a=i.hasOwnProperty,o=i.propertyIsEnumerable;t.exports=n(function(){return arguments}())?n:function(e){return r(e)&&a.call(e,`callee`)&&!o.call(e,`callee`)}})),aV=o(((e,t)=>{t.exports=Array.isArray})),oV=o(((e,t)=>{function n(e){return typeof e==`number`&&e>-1&&e%1==0&&e<=9007199254740991}t.exports=n})),sV=o(((e,t)=>{var n=gB(),r=oV();function i(e){return e!=null&&r(e.length)&&!n(e)}t.exports=i})),cV=o(((e,t)=>{var n=sV(),r=nV();function i(e){return r(e)&&n(e)}t.exports=i})),lV=o(((e,t)=>{function n(){return!1}t.exports=n})),uV=o(((e,t)=>{var n=uB(),r=lV(),i=typeof e==`object`&&e&&!e.nodeType&&e,a=i&&typeof t==`object`&&t&&!t.nodeType&&t,o=a&&a.exports===i?n.Buffer:void 0;t.exports=(o?o.isBuffer:void 0)||r})),dV=o(((e,t)=>{var n=mB(),r=$B(),i=nV(),a=`[object Object]`,o=Function.prototype,s=Object.prototype,c=o.toString,l=s.hasOwnProperty,u=c.call(Object);function d(e){if(!i(e)||n(e)!=a)return!1;var t=r(e);if(t===null)return!0;var o=l.call(t,`constructor`)&&t.constructor;return typeof o==`function`&&o instanceof o&&c.call(o)==u}t.exports=d})),fV=o(((e,t)=>{var n=mB(),r=oV(),i=nV(),a=`[object Arguments]`,o=`[object Array]`,s=`[object Boolean]`,c=`[object Date]`,l=`[object Error]`,u=`[object Function]`,d=`[object Map]`,f=`[object Number]`,p=`[object Object]`,m=`[object RegExp]`,h=`[object Set]`,g=`[object String]`,_=`[object WeakMap]`,v=`[object ArrayBuffer]`,y=`[object DataView]`,b=`[object Float32Array]`,x=`[object Float64Array]`,S=`[object Int8Array]`,C=`[object Int16Array]`,w=`[object Int32Array]`,T=`[object Uint8Array]`,E=`[object Uint8ClampedArray]`,D=`[object Uint16Array]`,O=`[object Uint32Array]`,k={};k[b]=k[x]=k[S]=k[C]=k[w]=k[T]=k[E]=k[D]=k[O]=!0,k[a]=k[o]=k[v]=k[s]=k[y]=k[c]=k[l]=k[u]=k[d]=k[f]=k[p]=k[m]=k[h]=k[g]=k[_]=!1;function A(e){return i(e)&&r(e.length)&&!!k[n(e)]}t.exports=A})),pV=o(((e,t)=>{function n(e){return function(t){return e(t)}}t.exports=n})),mV=o(((e,t)=>{var n=lB(),r=typeof e==`object`&&e&&!e.nodeType&&e,i=r&&typeof t==`object`&&t&&!t.nodeType&&t,a=i&&i.exports===r&&n.process;t.exports=function(){try{return i&&i.require&&i.require(`util`).types||a&&a.binding&&a.binding(`util`)}catch{}}()})),hV=o(((e,t)=>{var n=fV(),r=pV(),i=mV(),a=i&&i.isTypedArray;t.exports=a?r(a):n})),gV=o(((e,t)=>{function n(e,t){if((t!==`constructor`||typeof e[t]!=`function`)&&t!=`__proto__`)return e[t]}t.exports=n})),_V=o(((e,t)=>{var n=HB(),r=Qz(),i=Object.prototype.hasOwnProperty;function a(e,t,a){var o=e[t];(!(i.call(e,t)&&r(o,a))||a===void 0&&!(t in e))&&n(e,t,a)}t.exports=a})),vV=o(((e,t)=>{var n=_V(),r=HB();function i(e,t,i,a){var o=!i;i||={};for(var s=-1,c=t.length;++s<c;){var l=t[s],u=a?a(i[l],e[l],l,i,e):void 0;u===void 0&&(u=e[l]),o?r(i,l,u):n(i,l,u)}return i}t.exports=i})),yV=o(((e,t)=>{function n(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}t.exports=n})),bV=o(((e,t)=>{var n=/^(?:0|[1-9]\d*)$/;function r(e,t){var r=typeof e;return t??=9007199254740991,!!t&&(r==`number`||r!=`symbol`&&n.test(e))&&e>-1&&e%1==0&&e<t}t.exports=r})),xV=o(((e,t)=>{var n=yV(),r=iV(),i=aV(),a=uV(),o=bV(),s=hV(),c=Object.prototype.hasOwnProperty;function l(e,t){var l=i(e),u=!l&&r(e),d=!l&&!u&&a(e),f=!l&&!u&&!d&&s(e),p=l||u||d||f,m=p?n(e.length,String):[],h=m.length;for(var g in e)(t||c.call(e,g))&&!(p&&(g==`length`||d&&(g==`offset`||g==`parent`)||f&&(g==`buffer`||g==`byteLength`||g==`byteOffset`)||o(g,h)))&&m.push(g);return m}t.exports=l})),SV=o(((e,t)=>{function n(e){var t=[];if(e!=null)for(var n in Object(e))t.push(n);return t}t.exports=n})),CV=o(((e,t)=>{var n=hB(),r=eV(),i=SV(),a=Object.prototype.hasOwnProperty;function o(e){if(!n(e))return i(e);var t=r(e),o=[];for(var s in e)s==`constructor`&&(t||!a.call(e,s))||o.push(s);return o}t.exports=o})),wV=o(((e,t)=>{var n=xV(),r=CV(),i=sV();function a(e){return i(e)?n(e,!0):r(e)}t.exports=a})),TV=o(((e,t)=>{var n=vV(),r=wV();function i(e){return n(e,r(e))}t.exports=i})),EV=o(((e,t)=>{var n=UB(),r=KB(),i=YB(),a=XB(),o=tV(),s=iV(),c=aV(),l=cV(),u=uV(),d=gB(),f=hB(),p=dV(),m=hV(),h=gV(),g=TV();function _(e,t,_,v,y,b,x){var S=h(e,_),C=h(t,_),w=x.get(C);if(w){n(e,_,w);return}var T=b?b(S,C,_+``,e,t,x):void 0,E=T===void 0;if(E){var D=c(C),O=!D&&u(C),k=!D&&!O&&m(C);T=C,D||O||k?c(S)?T=S:l(S)?T=a(S):O?(E=!1,T=r(C,!0)):k?(E=!1,T=i(C,!0)):T=[]:p(C)||s(C)?(T=S,s(S)?T=g(S):(!f(S)||d(S))&&(T=o(C))):E=!1}E&&(x.set(C,T),y(T,C,v,b,x),x.delete(C)),n(e,_,T)}t.exports=_})),DV=o(((e,t)=>{var n=BB(),r=UB(),i=GB(),a=EV(),o=hB(),s=wV(),c=gV();function l(e,t,u,d,f){e!==t&&i(t,function(i,s){if(f||=new n,o(i))a(e,t,s,u,l,d,f);else{var p=d?d(c(e,s),i,s+``,e,t,f):void 0;p===void 0&&(p=i),r(e,s,p)}},s)}t.exports=l})),OV=o(((e,t)=>{function n(e){return e}t.exports=n})),kV=o(((e,t)=>{function n(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}t.exports=n})),AV=o(((e,t)=>{var n=kV(),r=Math.max;function i(e,t,i){return t=r(t===void 0?e.length-1:t,0),function(){for(var a=arguments,o=-1,s=r(a.length-t,0),c=Array(s);++o<s;)c[o]=a[t+o];o=-1;for(var l=Array(t+1);++o<t;)l[o]=a[o];return l[t]=i(c),n(e,this,l)}}t.exports=i})),jV=o(((e,t)=>{function n(e){return function(){return e}}t.exports=n})),MV=o(((e,t)=>{var n=jV(),r=VB(),i=OV();t.exports=r?function(e,t){return r(e,`toString`,{configurable:!0,enumerable:!1,value:n(t),writable:!0})}:i})),NV=o(((e,t)=>{var n=Date.now;function r(e){var t=0,r=0;return function(){var i=n(),a=16-(i-r);if(r=i,a>0){if(++t>=800)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}t.exports=r})),PV=o(((e,t)=>{var n=MV();t.exports=NV()(n)})),FV=o(((e,t)=>{var n=OV(),r=AV(),i=PV();function a(e,t){return i(r(e,t,n),e+``)}t.exports=a})),IV=o(((e,t)=>{var n=Qz(),r=sV(),i=bV(),a=hB();function o(e,t,o){if(!a(o))return!1;var s=typeof t;return(s==`number`?r(o)&&i(t,o.length):s==`string`&&t in o)?n(o[t],e):!1}t.exports=o})),LV=o(((e,t)=>{var n=FV(),r=IV();function i(e){return n(function(t,n){var i=-1,a=n.length,o=a>1?n[a-1]:void 0,s=a>2?n[2]:void 0;for(o=e.length>3&&typeof o==`function`?(a--,o):void 0,s&&r(n[0],n[1],s)&&(o=a<3?void 0:o,a=1),t=Object(t);++i<a;){var c=n[i];c&&e(t,c,i,o)}return t})}t.exports=i})),RV=o(((e,t)=>{var n=DV();t.exports=LV()(function(e,t,r){n(e,t,r)})})),zV=o(((e,t)=>{var n=mB(),r=nV(),i=`[object Symbol]`;function a(e){return typeof e==`symbol`||r(e)&&n(e)==i}t.exports=a})),BV=o(((e,t)=>{var n=aV(),r=zV(),i=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,a=/^\w*$/;function o(e,t){if(n(e))return!1;var o=typeof e;return o==`number`||o==`symbol`||o==`boolean`||e==null||r(e)?!0:a.test(e)||!i.test(e)||t!=null&&e in Object(t)}t.exports=o})),VV=o(((e,t)=>{var n=RB(),r=`Expected a function`;function i(e,t){if(typeof e!=`function`||t!=null&&typeof t!=`function`)throw TypeError(r);var a=function(){var n=arguments,r=t?t.apply(this,n):n[0],i=a.cache;if(i.has(r))return i.get(r);var o=e.apply(this,n);return a.cache=i.set(r,o)||i,o};return a.cache=new(i.Cache||n),a}i.Cache=n,t.exports=i})),HV=o(((e,t)=>{var n=VV(),r=500;function i(e){var t=n(e,function(e){return i.size===r&&i.clear(),e}),i=t.cache;return t}t.exports=i})),UV=o(((e,t)=>{var n=HV(),r=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,i=/\\(\\)?/g;t.exports=n(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(``),e.replace(r,function(e,n,r,a){t.push(r?a.replace(i,`$1`):n||e)}),t})})),WV=o(((e,t)=>{function n(e,t){for(var n=-1,r=e==null?0:e.length,i=Array(r);++n<r;)i[n]=t(e[n],n,e);return i}t.exports=n})),GV=o(((e,t)=>{var n=dB(),r=WV(),i=aV(),a=zV(),o=1/0,s=n?n.prototype:void 0,c=s?s.toString:void 0;function l(e){if(typeof e==`string`)return e;if(i(e))return r(e,l)+``;if(a(e))return c?c.call(e):``;var t=e+``;return t==`0`&&1/e==-o?`-0`:t}t.exports=l})),KV=o(((e,t)=>{var n=GV();function r(e){return e==null?``:n(e)}t.exports=r})),qV=o(((e,t)=>{var n=aV(),r=BV(),i=UV(),a=KV();function o(e,t){return n(e)?e:r(e,t)?[e]:i(a(e))}t.exports=o})),JV=o(((e,t)=>{var n=zV(),r=1/0;function i(e){if(typeof e==`string`||n(e))return e;var t=e+``;return t==`0`&&1/e==-r?`-0`:t}t.exports=i})),YV=o(((e,t)=>{var n=qV(),r=JV();function i(e,t){t=n(t,e);for(var i=0,a=t.length;e!=null&&i<a;)e=e[r(t[i++])];return i&&i==a?e:void 0}t.exports=i})),XV=o(((e,t)=>{var n=YV();function r(e,t,r){var i=e==null?void 0:n(e,t);return i===void 0?r:i}t.exports=r})),ZV=o(((e,t)=>{var n=_V(),r=qV(),i=bV(),a=hB(),o=JV();function s(e,t,s,c){if(!a(e))return e;t=r(t,e);for(var l=-1,u=t.length,d=u-1,f=e;f!=null&&++l<u;){var p=o(t[l]),m=s;if(p===`__proto__`||p===`constructor`||p===`prototype`)return e;if(l!=d){var h=f[p];m=c?c(h,p,f):void 0,m===void 0&&(m=a(h)?h:i(t[l+1])?[]:{})}n(f,p,m),f=f[p]}return e}t.exports=s})),QV=o(((e,t)=>{var n=ZV();function r(e,t,r){return e==null?e:n(e,t,r)}t.exports=r})),$V=l(RV(),1),eH=l(XV(),1),tH=l(QV(),1);function nH(){return nH=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},nH.apply(null,arguments)}function rH(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}var iH=[`outlineWidth`,`outlineColor`,`outlineOpacity`],aH=function(e){return e.outlineWidth,e.outlineColor,e.outlineOpacity,rH(e,iH)},oH=[`axis.ticks.text`,`axis.legend.text`,`legends.title.text`,`legends.text`,`legends.ticks.text`,`legends.title.text`,`labels.text`,`dots.text`,`markers.text`,`annotations.text`],sH=function(e,t){return nH({},t,e)},cH=function(e,t){var n=(0,$V.default)({},e,t);return oH.forEach((function(e){(0,tH.default)(n,e,sH((0,eH.default)(n,e),n.text))})),n},lH=function(e,t){return t?(0,$V.default)({},e,t):e},uH={background:`transparent`,text:{fontFamily:`sans-serif`,fontSize:11,fill:`#333333`,outlineWidth:0,outlineColor:`#ffffff`,outlineOpacity:1},axis:{domain:{line:{stroke:`transparent`,strokeWidth:1}},ticks:{line:{stroke:`#777777`,strokeWidth:1},text:{}},legend:{text:{fontSize:12}}},grid:{line:{stroke:`#dddddd`,strokeWidth:1}},legends:{hidden:{symbol:{fill:`#333333`,opacity:.6},text:{fill:`#333333`,opacity:.6}},text:{},ticks:{line:{stroke:`#777777`,strokeWidth:1},text:{fontSize:10}},title:{text:{}}},labels:{text:{}},markers:{lineColor:`#000000`,lineStrokeWidth:1,text:{}},dots:{text:{}},tooltip:{container:{background:`white`,color:`inherit`,fontSize:`inherit`,borderRadius:`2px`,boxShadow:`0 1px 2px rgba(0, 0, 0, 0.25)`,padding:`5px 9px`},basic:{whiteSpace:`pre`,display:`flex`,alignItems:`center`},chip:{marginRight:7},table:{},tableCell:{padding:`3px 5px`},tableCellValue:{fontWeight:`bold`}},crosshair:{line:{stroke:`#000000`,strokeWidth:1,strokeOpacity:.75,strokeDasharray:`6 6`}},annotations:{text:{fontSize:13,outlineWidth:2,outlineColor:`#ffffff`,outlineOpacity:1},link:{stroke:`#000000`,strokeWidth:1,outlineWidth:2,outlineColor:`#ffffff`,outlineOpacity:1},outline:{fill:`none`,stroke:`#000000`,strokeWidth:2,outlineWidth:2,outlineColor:`#ffffff`,outlineOpacity:1},symbol:{fill:`#000000`,outlineWidth:2,outlineColor:`#ffffff`,outlineOpacity:1}}},dH=function(e){return(0,w.useMemo)((function(){return cH(uH,e)}),[e])},fH=function(e,t){return(0,w.useMemo)((function(){return lH(e,t)}),[e,t])},pH=(0,w.createContext)(null),mH={},hH=function(e){var t=e.theme,n=t===void 0?mH:t,r=e.children,i=dH(n);return(0,G.jsx)(pH.Provider,{value:i,children:r})},gH=function(){var e=(0,w.useContext)(pH);if(e===null)throw Error(`Unable to find the theme, did you forget to wrap your component with ThemeProvider?`);return e};function _H(){return _H=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},_H.apply(null,arguments)}var vH=[`basic`,`chip`,`container`,`table`,`tableCell`,`tableCellValue`],yH={pointerEvents:`none`,position:`absolute`,zIndex:10,top:0,left:0},bH=function(e,t){return`translate(`+e+`px, `+t+`px)`},xH=(0,w.memo)((function(e){var t=e.position,n=e.anchor,r=e.children,i=gH(),a=G1(),o=a.animate,s=a.config,c=O0(),l=c[0],u=c[1],d=(0,w.useRef)(!1),f=void 0,p=!1,m=u.width>0&&u.height>0,h=Math.round(t[0]),g=Math.round(t[1]);m&&(n===`top`?(h-=u.width/2,g-=u.height+14):n===`right`?(h+=14,g-=u.height/2):n===`bottom`?(h-=u.width/2,g+=14):n===`left`?(h-=u.width+14,g-=u.height/2):n===`center`&&(h-=u.width/2,g-=u.height/2),f={transform:bH(h,g)},d.current||(p=!0),d.current=[h,g]);var _=xz({to:f,config:s,immediate:!o||p}),v=i.tooltip;v.basic,v.chip,v.container,v.table,v.tableCell,v.tableCellValue;var y=function(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}(v,vH),b=_H({},yH,y,{transform:_.transform??bH(h,g),opacity:+!!_.transform});return(0,G.jsx)(Xz.div,{ref:l,style:b,children:r})}));xH.displayName=`TooltipWrapper`;var SH=(0,w.memo)((function(e){var t=e.size,n=t===void 0?12:t,r=e.color,i=e.style;return(0,G.jsx)(`span`,{style:_H({display:`block`,width:n,height:n,background:r},i===void 0?{}:i)})})),CH=(0,w.memo)((function(e){var t,n=e.id,r=e.value,i=e.format,a=e.enableChip,o=a!==void 0&&a,s=e.color,c=e.renderContent,l=gH(),u=A0(i);if(typeof c==`function`)t=c();else{var d=r;u!==void 0&&d!==void 0&&(d=u(d)),t=(0,G.jsxs)(`div`,{style:l.tooltip.basic,children:[o&&(0,G.jsx)(SH,{color:s,style:l.tooltip.chip}),d===void 0?n:(0,G.jsxs)(`span`,{children:[n,`: `,(0,G.jsx)(`strong`,{children:``+d})]})]})}return(0,G.jsx)(`div`,{style:l.tooltip.container,role:`tooltip`,children:t})})),wH={width:`100%`,borderCollapse:`collapse`},TH=(0,w.memo)((function(e){var t,n=e.title,r=e.rows,i=r===void 0?[]:r,a=e.renderContent,o=gH();return i.length?(t=typeof a==`function`?a():(0,G.jsxs)(`div`,{children:[n&&n,(0,G.jsx)(`table`,{style:_H({},wH,o.tooltip.table),children:(0,G.jsx)(`tbody`,{children:i.map((function(e,t){return(0,G.jsx)(`tr`,{children:e.map((function(e,t){return(0,G.jsx)(`td`,{style:o.tooltip.tableCell,children:e},t)}))},t)}))})})]}),(0,G.jsx)(`div`,{style:o.tooltip.container,children:t})):null}));TH.displayName=`TableTooltip`;var EH=(0,w.memo)((function(e){var t=e.x0,n=e.x1,r=e.y0,i=e.y1,a=gH(),o=G1(),s=o.animate,c=o.config,l=(0,w.useMemo)((function(){return _H({},a.crosshair.line,{pointerEvents:`none`})}),[a.crosshair.line]),u=xz({x1:t,x2:n,y1:r,y2:i,config:c,immediate:!s});return(0,G.jsx)(Xz.line,_H({},u,{fill:`none`,style:l}))}));EH.displayName=`CrosshairLine`;var DH=(0,w.memo)((function(e){var t,n,r=e.width,i=e.height,a=e.type,o=e.x,s=e.y;return a===`cross`?(t={x0:o,x1:o,y0:0,y1:i},n={x0:0,x1:r,y0:s,y1:s}):a===`top-left`?(t={x0:o,x1:o,y0:0,y1:s},n={x0:0,x1:o,y0:s,y1:s}):a===`top`?t={x0:o,x1:o,y0:0,y1:s}:a===`top-right`?(t={x0:o,x1:o,y0:0,y1:s},n={x0:o,x1:r,y0:s,y1:s}):a===`right`?n={x0:o,x1:r,y0:s,y1:s}:a===`bottom-right`?(t={x0:o,x1:o,y0:s,y1:i},n={x0:o,x1:r,y0:s,y1:s}):a===`bottom`?t={x0:o,x1:o,y0:s,y1:i}:a===`bottom-left`?(t={x0:o,x1:o,y0:s,y1:i},n={x0:0,x1:o,y0:s,y1:s}):a===`left`?n={x0:0,x1:o,y0:s,y1:s}:a===`x`?t={x0:o,x1:o,y0:0,y1:i}:a===`y`&&(n={x0:0,x1:r,y0:s,y1:s}),(0,G.jsxs)(G.Fragment,{children:[t&&(0,G.jsx)(EH,{x0:t.x0,x1:t.x1,y0:t.y0,y1:t.y1}),n&&(0,G.jsx)(EH,{x0:n.x0,x1:n.x1,y0:n.y0,y1:n.y1})]})}));DH.displayName=`Crosshair`;var OH=(0,w.createContext)({showTooltipAt:function(){},showTooltipFromEvent:function(){},hideTooltip:function(){}}),kH={isVisible:!1,position:[null,null],content:null,anchor:null},AH=(0,w.createContext)(kH),jH=function(e){var t=(0,w.useState)(kH),n=t[0],r=t[1],i=(0,w.useCallback)((function(e,t,n){var i=t[0],a=t[1];n===void 0&&(n=`top`),r({isVisible:!0,position:[i,a],anchor:n,content:e})}),[r]),a=(0,w.useCallback)((function(t,n,i){i===void 0&&(i=`top`);var a=e.current.getBoundingClientRect(),o=e.current.offsetWidth,s=o===a.width?1:o/a.width,c=`touches`in n?n.touches[0]:n,l=c.clientX,u=c.clientY,d=(l-a.left)*s,f=(u-a.top)*s;i!==`left`&&i!==`right`||(i=d<a.width/2?`right`:`left`),r({isVisible:!0,position:[d,f],anchor:i,content:t})}),[e,r]),o=(0,w.useCallback)((function(){r(kH)}),[r]);return{actions:(0,w.useMemo)((function(){return{showTooltipAt:i,showTooltipFromEvent:a,hideTooltip:o}}),[i,a,o]),state:n}},MH=function(){var e=(0,w.useContext)(OH);if(e===void 0)throw Error(`useTooltip must be used within a TooltipProvider`);return e},NH=function(){var e=(0,w.useContext)(AH);if(e===void 0)throw Error(`useTooltipState must be used within a TooltipProvider`);return e},PH=function(e){return e.isVisible},FH=function(){var e=NH();return PH(e)?(0,G.jsx)(xH,{position:e.position,anchor:e.anchor,children:e.content}):null},IH=function(e){var t=e.container,n=e.children,r=jH(t),i=r.actions,a=r.state;return(0,G.jsx)(OH.Provider,{value:i,children:(0,G.jsx)(AH.Provider,{value:a,children:n})})},LH=l(o(((e,t)=>{var n=mB(),r=aV(),i=nV(),a=`[object String]`;function o(e){return typeof e==`string`||!r(e)&&i(e)&&n(e)==a}t.exports=o}))(),1),RH=typeof window<`u`?window:typeof self<`u`?self:global,zH=null,BH=null,VH=20,HH=RH.clearTimeout,UH=RH.setTimeout,WH=RH.cancelAnimationFrame||RH.mozCancelAnimationFrame||RH.webkitCancelAnimationFrame,GH=RH.requestAnimationFrame||RH.mozRequestAnimationFrame||RH.webkitRequestAnimationFrame;WH==null||GH==null?(zH=HH,BH=function(e){return UH(e,VH)}):(zH=function([e,t]){WH(e),HH(t)},BH=function(e){let t=GH(function(){HH(n),e()}),n=UH(function(){WH(t),e()},VH);return[t,n]});function KH(e){let t,n,r,i,a,o,s,c=typeof document<`u`&&document.attachEvent;if(!c){o=function(e){let t=e.__resizeTriggers__,n=t.firstElementChild,r=t.lastElementChild,i=n.firstElementChild;r.scrollLeft=r.scrollWidth,r.scrollTop=r.scrollHeight,i.style.width=n.offsetWidth+1+`px`,i.style.height=n.offsetHeight+1+`px`,n.scrollLeft=n.scrollWidth,n.scrollTop=n.scrollHeight},a=function(e){return e.offsetWidth!==e.__resizeLast__.width||e.offsetHeight!==e.__resizeLast__.height},s=function(e){if(e.target.className&&typeof e.target.className.indexOf==`function`&&e.target.className.indexOf(`contract-trigger`)<0&&e.target.className.indexOf(`expand-trigger`)<0)return;let t=this;o(this),this.__resizeRAF__&&zH(this.__resizeRAF__),this.__resizeRAF__=BH(function(){a(t)&&(t.__resizeLast__.width=t.offsetWidth,t.__resizeLast__.height=t.offsetHeight,t.__resizeListeners__.forEach(function(n){n.call(t,e)}))})};let e=!1,c=``;r=`animationstart`;let l=`Webkit Moz O ms`.split(` `),u=`webkitAnimationStart animationstart oAnimationStart MSAnimationStart`.split(` `),d=``;{let t=document.createElement(`fakeelement`);if(t.style.animationName!==void 0&&(e=!0),e===!1){for(let n=0;n<l.length;n++)if(t.style[l[n]+`AnimationName`]!==void 0){d=l[n],c=`-`+d.toLowerCase()+`-`,r=u[n],e=!0;break}}}n=`resizeanim`,t=`@`+c+`keyframes `+n+` { from { opacity: 0; } to { opacity: 0; } } `,i=c+`animation: 1ms `+n+`; `}let l=function(n){if(!n.getElementById(`detectElementResize`)){let r=(t||``)+`.resize-triggers { `+(i||``)+`visibility: hidden; opacity: 0; } .resize-triggers, .resize-triggers > div, .contract-trigger:before { content: " "; display: block; position: absolute; top: 0; left: 0; height: 100%; width: 100%; overflow: hidden; z-index: -1; } .resize-triggers > div { background: #eee; overflow: auto; } .contract-trigger:before { width: 200%; height: 200%; }`,a=n.head||n.getElementsByTagName(`head`)[0],o=n.createElement(`style`);o.id=`detectElementResize`,o.type=`text/css`,e!=null&&o.setAttribute(`nonce`,e),o.styleSheet?o.styleSheet.cssText=r:o.appendChild(n.createTextNode(r)),a.appendChild(o)}};return{addResizeListener:function(e,t){if(c)e.attachEvent(`onresize`,t);else{if(!e.__resizeTriggers__){let t=e.ownerDocument,i=RH.getComputedStyle(e);i&&i.position===`static`&&(e.style.position=`relative`),l(t),e.__resizeLast__={},e.__resizeListeners__=[],(e.__resizeTriggers__=t.createElement(`div`)).className=`resize-triggers`;let a=t.createElement(`div`);a.className=`expand-trigger`,a.appendChild(t.createElement(`div`));let c=t.createElement(`div`);c.className=`contract-trigger`,e.__resizeTriggers__.appendChild(a),e.__resizeTriggers__.appendChild(c),e.appendChild(e.__resizeTriggers__),o(e),e.addEventListener(`scroll`,s,!0),r&&(e.__resizeTriggers__.__animationListener__=function(t){t.animationName===n&&o(e)},e.__resizeTriggers__.addEventListener(r,e.__resizeTriggers__.__animationListener__))}e.__resizeListeners__.push(t)}},removeResizeListener:function(e,t){if(c)e.detachEvent(`onresize`,t);else if(e.__resizeListeners__.splice(e.__resizeListeners__.indexOf(t),1),!e.__resizeListeners__.length){e.removeEventListener(`scroll`,s,!0),e.__resizeTriggers__.__animationListener__&&(e.__resizeTriggers__.removeEventListener(r,e.__resizeTriggers__.__animationListener__),e.__resizeTriggers__.__animationListener__=null);try{e.__resizeTriggers__=!e.removeChild(e.__resizeTriggers__)}catch{}}}}}var qH=class extends w.Component{constructor(...e){super(...e),this.state={height:this.props.defaultHeight||0,width:this.props.defaultWidth||0},this._autoSizer=null,this._detectElementResize=null,this._didLogDeprecationWarning=!1,this._parentNode=null,this._resizeObserver=null,this._timeoutId=null,this._onResize=()=>{this._timeoutId=null;let{disableHeight:e,disableWidth:t,onResize:n}=this.props;if(this._parentNode){let r=window.getComputedStyle(this._parentNode)||{},i=parseFloat(r.paddingLeft||`0`),a=parseFloat(r.paddingRight||`0`),o=parseFloat(r.paddingTop||`0`),s=parseFloat(r.paddingBottom||`0`),c=this._parentNode.getBoundingClientRect(),l=c.height-o-s,u=c.width-i-a;if(!e&&this.state.height!==l||!t&&this.state.width!==u){this.setState({height:l,width:u});let e=()=>{this._didLogDeprecationWarning||(this._didLogDeprecationWarning=!0,console.warn(`scaledWidth and scaledHeight parameters have been deprecated; use width and height instead`))};typeof n==`function`&&n({height:l,width:u,get scaledHeight(){return e(),l},get scaledWidth(){return e(),u}})}}},this._setRef=e=>{this._autoSizer=e}}componentDidMount(){let{nonce:e}=this.props,t=this._autoSizer?this._autoSizer.parentNode:null;if(t!=null&&t.ownerDocument&&t.ownerDocument.defaultView&&t instanceof t.ownerDocument.defaultView.HTMLElement){this._parentNode=t;let n=t.ownerDocument.defaultView.ResizeObserver;n==null?(this._detectElementResize=KH(e),this._detectElementResize.addResizeListener(t,this._onResize)):(this._resizeObserver=new n(()=>{this._timeoutId=setTimeout(this._onResize,0)}),this._resizeObserver.observe(t)),this._onResize()}}componentWillUnmount(){this._parentNode&&(this._detectElementResize&&this._detectElementResize.removeResizeListener(this._parentNode,this._onResize),this._timeoutId!==null&&clearTimeout(this._timeoutId),this._resizeObserver&&this._resizeObserver.disconnect())}render(){let{children:e,defaultHeight:t,defaultWidth:n,disableHeight:r=!1,disableWidth:i=!1,doNotBailOutOnEmptyChildren:a=!1,nonce:o,onResize:s,style:c={},tagName:l=`div`,...u}=this.props,{height:d,width:f}=this.state,p={overflow:`visible`},m={},h=!1;return r||(d===0&&(h=!0),p.height=0,m.height=d,m.scaledHeight=d),i||(f===0&&(h=!0),p.width=0,m.width=f,m.scaledWidth=f),a&&(h=!1),(0,w.createElement)(l,{ref:this._setRef,style:{...p,...c},...u},!h&&e(m))}};function JH(e,t,n,r){var i=this,a=(0,w.useRef)(null),o=(0,w.useRef)(0),s=(0,w.useRef)(0),c=(0,w.useRef)(null),l=(0,w.useRef)([]),u=(0,w.useRef)(),d=(0,w.useRef)(),f=(0,w.useRef)(e),p=(0,w.useRef)(!0),m=(0,w.useRef)(),h=(0,w.useRef)();f.current=e;var g=typeof window<`u`,_=!t&&t!==0&&g;if(typeof e!=`function`)throw TypeError(`Expected a function`);t=+t||0;var v=!!(n||={}).leading,y=!(`trailing`in n)||!!n.trailing,b=!!n.flushOnExit&&y,x=`maxWait`in n,S=`debounceOnServer`in n&&!!n.debounceOnServer,C=x?Math.max(+n.maxWait||0,t):null,T=(0,w.useMemo)(function(){var e=function(e){var t=l.current,n=u.current;return l.current=u.current=null,o.current=e,s.current=s.current||e,d.current=f.current.apply(n,t)},n=function(e,t){_&&cancelAnimationFrame(c.current),c.current=_?requestAnimationFrame(e):setTimeout(e,t)},w=function(e){if(!p.current)return!1;var n=e-a.current;return!a.current||n>=t||n<0||x&&e-o.current>=C},T=function(t){return c.current=null,y&&l.current?e(t):(l.current=u.current=null,d.current)},E=function e(){var r=Date.now();if(v&&s.current===o.current&&D(),w(r))return T(r);if(p.current){var i=t-(r-a.current);n(e,x?Math.min(i,C-(r-o.current)):i)}},D=function(){r&&r({})},O=function(){if(g||S){var r,s=Date.now(),f=w(s);if(l.current=[].slice.call(arguments),u.current=i,a.current=s,b&&!m.current&&(m.current=function(){globalThis.document?.visibilityState===`hidden`&&h.current.flush()},(r=globalThis.document)==null||r.addEventListener==null||r.addEventListener(`visibilitychange`,m.current)),f){if(!c.current&&p.current)return o.current=a.current,n(E,t),v?e(a.current):d.current;if(x)return n(E,t),e(a.current)}return c.current||n(E,t),d.current}};return O.cancel=function(){var e=c.current;e&&(_?cancelAnimationFrame(c.current):clearTimeout(c.current)),o.current=0,l.current=a.current=u.current=c.current=null,e&&r&&r({})},O.isPending=function(){return!!c.current},O.flush=function(){return c.current?T(Date.now()):d.current},O},[v,x,t,C,y,b,_,g,S,r]);return h.current=T,(0,w.useEffect)(function(){return p.current=!0,function(){var e;b&&h.current.flush(),m.current&&=((e=globalThis.document)==null||e.removeEventListener==null||e.removeEventListener(`visibilitychange`,m.current),null),p.current=!1}},[b]),T}function YH(e,t){return e===t}function XH(e,t,n){var r=n&&n.equalityFn||YH,i=(0,w.useRef)(e),a=(0,w.useState)({})[1],o=JH((0,w.useCallback)(function(e){i.current=e,a({})},[a]),t,n,a),s=(0,w.useRef)(e);return r(s.current,e)||(o(e),s.current=e),[i.current,o]}function ZH(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function QH(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function $H(){}var eU=.7,tU=1/eU,nU=`\\s*([+-]?\\d+)\\s*`,rU=`\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*`,iU=`\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*`,aU=/^#([0-9a-f]{3,8})$/,oU=RegExp(`^rgb\\(${nU},${nU},${nU}\\)$`),sU=RegExp(`^rgb\\(${iU},${iU},${iU}\\)$`),cU=RegExp(`^rgba\\(${nU},${nU},${nU},${rU}\\)$`),lU=RegExp(`^rgba\\(${iU},${iU},${iU},${rU}\\)$`),uU=RegExp(`^hsl\\(${rU},${iU},${iU}\\)$`),dU=RegExp(`^hsla\\(${rU},${iU},${iU},${rU}\\)$`),fU={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};ZH($H,_U,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:pU,formatHex:pU,formatHex8:mU,formatHsl:hU,formatRgb:gU,toString:gU});function pU(){return this.rgb().formatHex()}function mU(){return this.rgb().formatHex8()}function hU(){return AU(this).formatHsl()}function gU(){return this.rgb().formatRgb()}function _U(e){var t,n;return e=(e+``).trim().toLowerCase(),(t=aU.exec(e))?(n=t[1].length,t=parseInt(t[1],16),n===6?vU(t):n===3?new SU(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):n===8?yU(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):n===4?yU(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|t&240,((t&15)<<4|t&15)/255):null):(t=oU.exec(e))?new SU(t[1],t[2],t[3],1):(t=sU.exec(e))?new SU(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=cU.exec(e))?yU(t[1],t[2],t[3],t[4]):(t=lU.exec(e))?yU(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=uU.exec(e))?kU(t[1],t[2]/100,t[3]/100,1):(t=dU.exec(e))?kU(t[1],t[2]/100,t[3]/100,t[4]):fU.hasOwnProperty(e)?vU(fU[e]):e===`transparent`?new SU(NaN,NaN,NaN,0):null}function vU(e){return new SU(e>>16&255,e>>8&255,e&255,1)}function yU(e,t,n,r){return r<=0&&(e=t=n=NaN),new SU(e,t,n,r)}function bU(e){return e instanceof $H||(e=_U(e)),e?(e=e.rgb(),new SU(e.r,e.g,e.b,e.opacity)):new SU}function xU(e,t,n,r){return arguments.length===1?bU(e):new SU(e,t,n,r??1)}function SU(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}ZH(SU,xU,QH($H,{brighter(e){return e=e==null?tU:tU**+e,new SU(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?eU:eU**+e,new SU(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new SU(DU(this.r),DU(this.g),DU(this.b),EU(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:CU,formatHex:CU,formatHex8:wU,formatRgb:TU,toString:TU}));function CU(){return`#${OU(this.r)}${OU(this.g)}${OU(this.b)}`}function wU(){return`#${OU(this.r)}${OU(this.g)}${OU(this.b)}${OU((isNaN(this.opacity)?1:this.opacity)*255)}`}function TU(){let e=EU(this.opacity);return`${e===1?`rgb(`:`rgba(`}${DU(this.r)}, ${DU(this.g)}, ${DU(this.b)}${e===1?`)`:`, ${e})`}`}function EU(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function DU(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function OU(e){return e=DU(e),(e<16?`0`:``)+e.toString(16)}function kU(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new MU(e,t,n,r)}function AU(e){if(e instanceof MU)return new MU(e.h,e.s,e.l,e.opacity);if(e instanceof $H||(e=_U(e)),!e)return new MU;if(e instanceof MU)return e;e=e.rgb();var t=e.r/255,n=e.g/255,r=e.b/255,i=Math.min(t,n,r),a=Math.max(t,n,r),o=NaN,s=a-i,c=(a+i)/2;return s?(o=t===a?(n-r)/s+(n<r)*6:n===a?(r-t)/s+2:(t-n)/s+4,s/=c<.5?a+i:2-a-i,o*=60):s=c>0&&c<1?0:o,new MU(o,s,c,e.opacity)}function jU(e,t,n,r){return arguments.length===1?AU(e):new MU(e,t,n,r??1)}function MU(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}ZH(MU,jU,QH($H,{brighter(e){return e=e==null?tU:tU**+e,new MU(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?eU:eU**+e,new MU(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*t,i=2*n-r;return new SU(FU(e>=240?e-240:e+120,i,r),FU(e,i,r),FU(e<120?e+240:e-120,i,r),this.opacity)},clamp(){return new MU(NU(this.h),PU(this.s),PU(this.l),EU(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){let e=EU(this.opacity);return`${e===1?`hsl(`:`hsla(`}${NU(this.h)}, ${PU(this.s)*100}%, ${PU(this.l)*100}%${e===1?`)`:`, ${e})`}`}}));function NU(e){return e=(e||0)%360,e<0?e+360:e}function PU(e){return Math.max(0,Math.min(1,e||0))}function FU(e,t,n){return(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)*255}var IU=Math.PI/180,LU=180/Math.PI,RU=-.14861,zU=1.78277,BU=-.29227,VU=-.90649,HU=1.97294,UU=HU*VU,WU=HU*zU,GU=zU*BU-VU*RU;function KU(e){if(e instanceof JU)return new JU(e.h,e.s,e.l,e.opacity);e instanceof SU||(e=bU(e));var t=e.r/255,n=e.g/255,r=e.b/255,i=(GU*r+UU*t-WU*n)/(GU+UU-WU),a=r-i,o=(HU*(n-i)-BU*a)/VU,s=Math.sqrt(o*o+a*a)/(HU*i*(1-i)),c=s?Math.atan2(o,a)*LU-120:NaN;return new JU(c<0?c+360:c,s,i,e.opacity)}function qU(e,t,n,r){return arguments.length===1?KU(e):new JU(e,t,n,r??1)}function JU(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}ZH(JU,qU,QH($H,{brighter(e){return e=e==null?tU:tU**+e,new JU(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?eU:eU**+e,new JU(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=isNaN(this.h)?0:(this.h+120)*IU,t=+this.l,n=isNaN(this.s)?0:this.s*t*(1-t),r=Math.cos(e),i=Math.sin(e);return new SU(255*(t+n*(RU*r+zU*i)),255*(t+n*(BU*r+VU*i)),255*(t+HU*r*n),this.opacity)}}));function YU(e,t,n,r,i){var a=e*e,o=a*e;return((1-3*e+3*a-o)*t+(4-6*a+3*o)*n+(1+3*e+3*a-3*o)*r+o*i)/6}function XU(e){var t=e.length-1;return function(n){var r=n<=0?n=0:n>=1?(n=1,t-1):Math.floor(n*t),i=e[r],a=e[r+1],o=r>0?e[r-1]:2*i-a,s=r<t-1?e[r+2]:2*a-i;return YU((n-r/t)*t,o,i,a,s)}}var ZU=e=>()=>e;function QU(e,t){return function(n){return e+n*t}}function $U(e,t,n){return e**=+n,t=t**+n-e,n=1/n,function(r){return(e+r*t)**+n}}function eW(e,t){var n=t-e;return n?QU(e,n>180||n<-180?n-360*Math.round(n/360):n):ZU(isNaN(e)?t:e)}function tW(e){return(e=+e)==1?nW:function(t,n){return n-t?$U(t,n,e):ZU(isNaN(t)?n:t)}}function nW(e,t){var n=t-e;return n?QU(e,n):ZU(isNaN(e)?t:e)}var rW=(function e(t){var n=tW(t);function r(e,t){var r=n((e=xU(e)).r,(t=xU(t)).r),i=n(e.g,t.g),a=n(e.b,t.b),o=nW(e.opacity,t.opacity);return function(t){return e.r=r(t),e.g=i(t),e.b=a(t),e.opacity=o(t),e+``}}return r.gamma=e,r})(1);function iW(e){return function(t){var n=t.length,r=Array(n),i=Array(n),a=Array(n),o,s;for(o=0;o<n;++o)s=xU(t[o]),r[o]=s.r||0,i[o]=s.g||0,a[o]=s.b||0;return r=e(r),i=e(i),a=e(a),s.opacity=1,function(e){return s.r=r(e),s.g=i(e),s.b=a(e),s+``}}}var aW=iW(XU);function oW(e,t){t||=[];var n=e?Math.min(t.length,e.length):0,r=t.slice(),i;return function(a){for(i=0;i<n;++i)r[i]=e[i]*(1-a)+t[i]*a;return r}}function sW(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function cW(e,t){var n=t?t.length:0,r=e?Math.min(n,e.length):0,i=Array(r),a=Array(n),o;for(o=0;o<r;++o)i[o]=_W(e[o],t[o]);for(;o<n;++o)a[o]=t[o];return function(e){for(o=0;o<r;++o)a[o]=i[o](e);return a}}function lW(e,t){var n=new Date;return e=+e,t=+t,function(r){return n.setTime(e*(1-r)+t*r),n}}function uW(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}function dW(e,t){var n={},r={},i;for(i in(typeof e!=`object`||!e)&&(e={}),(typeof t!=`object`||!t)&&(t={}),t)i in e?n[i]=_W(e[i],t[i]):r[i]=t[i];return function(e){for(i in n)r[i]=n[i](e);return r}}var fW=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,pW=new RegExp(fW.source,`g`);function mW(e){return function(){return e}}function hW(e){return function(t){return e(t)+``}}function gW(e,t){var n=fW.lastIndex=pW.lastIndex=0,r,i,a,o=-1,s=[],c=[];for(e+=``,t+=``;(r=fW.exec(e))&&(i=pW.exec(t));)(a=i.index)>n&&(a=t.slice(n,a),s[o]?s[o]+=a:s[++o]=a),(r=r[0])===(i=i[0])?s[o]?s[o]+=i:s[++o]=i:(s[++o]=null,c.push({i:o,x:uW(r,i)})),n=pW.lastIndex;return n<t.length&&(a=t.slice(n),s[o]?s[o]+=a:s[++o]=a),s.length<2?c[0]?hW(c[0].x):mW(t):(t=c.length,function(e){for(var n=0,r;n<t;++n)s[(r=c[n]).i]=r.x(e);return s.join(``)})}function _W(e,t){var n=typeof t,r;return t==null||n===`boolean`?ZU(t):(n===`number`?uW:n===`string`?(r=_U(t))?(t=r,rW):gW:t instanceof _U?rW:t instanceof Date?lW:sW(t)?oW:Array.isArray(t)?cW:typeof t.valueOf!=`function`&&typeof t.toString!=`function`||isNaN(t)?dW:uW)(e,t)}function vW(e,t){return e=+e,t=+t,function(n){return Math.round(e*(1-n)+t*n)}}var yW=180/Math.PI,bW={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function xW(e,t,n,r,i,a){var o,s,c;return(o=Math.sqrt(e*e+t*t))&&(e/=o,t/=o),(c=e*n+t*r)&&(n-=e*c,r-=t*c),(s=Math.sqrt(n*n+r*r))&&(n/=s,r/=s,c/=s),e*r<t*n&&(e=-e,t=-t,c=-c,o=-o),{translateX:i,translateY:a,rotate:Math.atan2(t,e)*yW,skewX:Math.atan(c)*yW,scaleX:o,scaleY:s}}var SW;function CW(e){let t=new(typeof DOMMatrix==`function`?DOMMatrix:WebKitCSSMatrix)(e+``);return t.isIdentity?bW:xW(t.a,t.b,t.c,t.d,t.e,t.f)}function wW(e){return e==null||(SW||=document.createElementNS(`http://www.w3.org/2000/svg`,`g`),SW.setAttribute(`transform`,e),!(e=SW.transform.baseVal.consolidate()))?bW:(e=e.matrix,xW(e.a,e.b,e.c,e.d,e.e,e.f))}function TW(e,t,n,r){function i(e){return e.length?e.pop()+` `:``}function a(e,r,i,a,o,s){if(e!==i||r!==a){var c=o.push(`translate(`,null,t,null,n);s.push({i:c-4,x:uW(e,i)},{i:c-2,x:uW(r,a)})}else(i||a)&&o.push(`translate(`+i+t+a+n)}function o(e,t,n,a){e===t?t&&n.push(i(n)+`rotate(`+t+r):(e-t>180?t+=360:t-e>180&&(e+=360),a.push({i:n.push(i(n)+`rotate(`,null,r)-2,x:uW(e,t)}))}function s(e,t,n,a){e===t?t&&n.push(i(n)+`skewX(`+t+r):a.push({i:n.push(i(n)+`skewX(`,null,r)-2,x:uW(e,t)})}function c(e,t,n,r,a,o){if(e!==n||t!==r){var s=a.push(i(a)+`scale(`,null,`,`,null,`)`);o.push({i:s-4,x:uW(e,n)},{i:s-2,x:uW(t,r)})}else(n!==1||r!==1)&&a.push(i(a)+`scale(`+n+`,`+r+`)`)}return function(t,n){var r=[],i=[];return t=e(t),n=e(n),a(t.translateX,t.translateY,n.translateX,n.translateY,r,i),o(t.rotate,n.rotate,r,i),s(t.skewX,n.skewX,r,i),c(t.scaleX,t.scaleY,n.scaleX,n.scaleY,r,i),t=n=null,function(e){for(var t=-1,n=i.length,a;++t<n;)r[(a=i[t]).i]=a.x(e);return r.join(``)}}}var EW=TW(CW,`px, `,`px)`,`deg)`),DW=TW(wW,`, `,`)`,`)`);function OW(e){return(function t(n){n=+n;function r(t,r){var i=e((t=qU(t)).h,(r=qU(r)).h),a=nW(t.s,r.s),o=nW(t.l,r.l),s=nW(t.opacity,r.opacity);return function(e){return t.h=i(e),t.s=a(e),t.l=o(e**+n),t.opacity=s(e),t+``}}return r.gamma=t,r})(1)}OW(eW);var kW=OW(nW),AW=o(((e,t)=>{function n(e){return this.__data__.set(e,`__lodash_hash_undefined__`),this}t.exports=n})),jW=o(((e,t)=>{function n(e){return this.__data__.has(e)}t.exports=n})),MW=o(((e,t)=>{var n=RB(),r=AW(),i=jW();function a(e){var t=-1,r=e==null?0:e.length;for(this.__data__=new n;++t<r;)this.add(e[t])}a.prototype.add=a.prototype.push=r,a.prototype.has=i,t.exports=a})),NW=o(((e,t)=>{function n(e,t,n,r){for(var i=e.length,a=n+(r?1:-1);r?a--:++a<i;)if(t(e[a],a,e))return a;return-1}t.exports=n})),PW=o(((e,t)=>{function n(e){return e!==e}t.exports=n})),FW=o(((e,t)=>{function n(e,t,n){for(var r=n-1,i=e.length;++r<i;)if(e[r]===t)return r;return-1}t.exports=n})),IW=o(((e,t)=>{var n=NW(),r=PW(),i=FW();function a(e,t,a){return t===t?i(e,t,a):n(e,r,a)}t.exports=a})),LW=o(((e,t)=>{var n=IW();function r(e,t){return!!(e!=null&&e.length)&&n(e,t,0)>-1}t.exports=r})),RW=o(((e,t)=>{function n(e,t,n){for(var r=-1,i=e==null?0:e.length;++r<i;)if(n(t,e[r]))return!0;return!1}t.exports=n})),zW=o(((e,t)=>{function n(e,t){return e.has(t)}t.exports=n})),BW=o(((e,t)=>{var n=MW(),r=LW(),i=RW(),a=WV(),o=pV(),s=zW(),c=200;function l(e,t,l,u){var d=-1,f=r,p=!0,m=e.length,h=[],g=t.length;if(!m)return h;l&&(t=a(t,o(l))),u?(f=i,p=!1):t.length>=c&&(f=s,p=!1,t=new n(t));outer:for(;++d<m;){var _=e[d],v=l==null?_:l(_);if(_=u||_!==0?_:0,p&&v===v){for(var y=g;y--;)if(t[y]===v)continue outer;h.push(_)}else f(t,v,u)||h.push(_)}return h}t.exports=l})),VW=o(((e,t)=>{var n=BW(),r=FV(),i=cV();t.exports=r(function(e,t){return i(e)?n(e,t):[]})}));function HW(e){return function(){return e}}var UW=Math.abs,WW=Math.atan2,GW=Math.cos,KW=Math.max,qW=Math.min,JW=Math.sin,YW=Math.sqrt,XW=Math.PI,ZW=XW/2,QW=2*XW;function $W(e){return e>1?0:e<-1?XW:Math.acos(e)}function eG(e){return e>=1?ZW:e<=-1?-ZW:Math.asin(e)}var tG=Math.PI,nG=2*tG,rG=1e-6,iG=nG-rG;function aG(e){this._+=e[0];for(let t=1,n=e.length;t<n;++t)this._+=arguments[t]+e[t]}function oG(e){let t=Math.floor(e);if(!(t>=0))throw Error(`invalid digits: ${e}`);if(t>15)return aG;let n=10**t;return function(e){this._+=e[0];for(let t=1,r=e.length;t<r;++t)this._+=Math.round(arguments[t]*n)/n+e[t]}}var sG=class{constructor(e){this._x0=this._y0=this._x1=this._y1=null,this._=``,this._append=e==null?aG:oG(e)}moveTo(e,t){this._append`M${this._x0=this._x1=+e},${this._y0=this._y1=+t}`}closePath(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(e,t){this._append`L${this._x1=+e},${this._y1=+t}`}quadraticCurveTo(e,t,n,r){this._append`Q${+e},${+t},${this._x1=+n},${this._y1=+r}`}bezierCurveTo(e,t,n,r,i,a){this._append`C${+e},${+t},${+n},${+r},${this._x1=+i},${this._y1=+a}`}arcTo(e,t,n,r,i){if(e=+e,t=+t,n=+n,r=+r,i=+i,i<0)throw Error(`negative radius: ${i}`);let a=this._x1,o=this._y1,s=n-e,c=r-t,l=a-e,u=o-t,d=l*l+u*u;if(this._x1===null)this._append`M${this._x1=e},${this._y1=t}`;else if(d>rG)if(!(Math.abs(u*s-c*l)>rG)||!i)this._append`L${this._x1=e},${this._y1=t}`;else{let f=n-a,p=r-o,m=s*s+c*c,h=f*f+p*p,g=Math.sqrt(m),_=Math.sqrt(d),v=i*Math.tan((tG-Math.acos((m+d-h)/(2*g*_)))/2),y=v/_,b=v/g;Math.abs(y-1)>rG&&this._append`L${e+y*l},${t+y*u}`,this._append`A${i},${i},0,0,${+(u*f>l*p)},${this._x1=e+b*s},${this._y1=t+b*c}`}}arc(e,t,n,r,i,a){if(e=+e,t=+t,n=+n,a=!!a,n<0)throw Error(`negative radius: ${n}`);let o=n*Math.cos(r),s=n*Math.sin(r),c=e+o,l=t+s,u=1^a,d=a?r-i:i-r;this._x1===null?this._append`M${c},${l}`:(Math.abs(this._x1-c)>rG||Math.abs(this._y1-l)>rG)&&this._append`L${c},${l}`,n&&(d<0&&(d=d%nG+nG),d>iG?this._append`A${n},${n},0,1,${u},${e-o},${t-s}A${n},${n},0,1,${u},${this._x1=c},${this._y1=l}`:d>rG&&this._append`A${n},${n},0,${+(d>=tG)},${u},${this._x1=e+n*Math.cos(i)},${this._y1=t+n*Math.sin(i)}`)}rect(e,t,n,r){this._append`M${this._x0=this._x1=+e},${this._y0=this._y1=+t}h${n=+n}v${+r}h${-n}Z`}toString(){return this._}};sG.prototype;function cG(e){let t=3;return e.digits=function(n){if(!arguments.length)return t;if(n==null)t=null;else{let e=Math.floor(n);if(!(e>=0))throw RangeError(`invalid digits: ${n}`);t=e}return e},()=>new sG(t)}function lG(e){return e.innerRadius}function uG(e){return e.outerRadius}function dG(e){return e.startAngle}function fG(e){return e.endAngle}function pG(e){return e&&e.padAngle}function mG(e,t,n,r,i,a,o,s){var c=n-e,l=r-t,u=o-i,d=s-a,f=d*c-u*l;if(!(f*f<1e-12))return f=(u*(t-a)-d*(e-i))/f,[e+f*c,t+f*l]}function hG(e,t,n,r,i,a,o){var s=e-n,c=t-r,l=(o?a:-a)/YW(s*s+c*c),u=l*c,d=-l*s,f=e+u,p=t+d,m=n+u,h=r+d,g=(f+m)/2,_=(p+h)/2,v=m-f,y=h-p,b=v*v+y*y,x=i-a,S=f*h-m*p,C=(y<0?-1:1)*YW(KW(0,x*x*b-S*S)),w=(S*y-v*C)/b,T=(-S*v-y*C)/b,E=(S*y+v*C)/b,D=(-S*v+y*C)/b,O=w-g,k=T-_,A=E-g,j=D-_;return O*O+k*k>A*A+j*j&&(w=E,T=D),{cx:w,cy:T,x01:-u,y01:-d,x11:w*(i/x-1),y11:T*(i/x-1)}}function gG(){var e=lG,t=uG,n=HW(0),r=null,i=dG,a=fG,o=pG,s=null,c=cG(l);function l(){var l,u,d=+e.apply(this,arguments),f=+t.apply(this,arguments),p=i.apply(this,arguments)-ZW,m=a.apply(this,arguments)-ZW,h=UW(m-p),g=m>p;if(s||=l=c(),f<d&&(u=f,f=d,d=u),!(f>1e-12))s.moveTo(0,0);else if(h>QW-1e-12)s.moveTo(f*GW(p),f*JW(p)),s.arc(0,0,f,p,m,!g),d>1e-12&&(s.moveTo(d*GW(m),d*JW(m)),s.arc(0,0,d,m,p,g));else{var _=p,v=m,y=p,b=m,x=h,S=h,C=o.apply(this,arguments)/2,w=C>1e-12&&(r?+r.apply(this,arguments):YW(d*d+f*f)),T=qW(UW(f-d)/2,+n.apply(this,arguments)),E=T,D=T,O,k;if(w>1e-12){var A=eG(w/d*JW(C)),j=eG(w/f*JW(C));(x-=A*2)>1e-12?(A*=g?1:-1,y+=A,b-=A):(x=0,y=b=(p+m)/2),(S-=j*2)>1e-12?(j*=g?1:-1,_+=j,v-=j):(S=0,_=v=(p+m)/2)}var M=f*GW(_),N=f*JW(_),P=d*GW(b),F=d*JW(b);if(T>1e-12){var I=f*GW(v),L=f*JW(v),R=d*GW(y),z=d*JW(y),B;if(h<XW)if(B=mG(M,N,R,z,I,L,P,F)){var V=M-B[0],H=N-B[1],ee=I-B[0],te=L-B[1],U=1/JW($W((V*ee+H*te)/(YW(V*V+H*H)*YW(ee*ee+te*te)))/2),ne=YW(B[0]*B[0]+B[1]*B[1]);E=qW(T,(d-ne)/(U-1)),D=qW(T,(f-ne)/(U+1))}else E=D=0}S>1e-12?D>1e-12?(O=hG(R,z,M,N,f,D,g),k=hG(I,L,P,F,f,D,g),s.moveTo(O.cx+O.x01,O.cy+O.y01),D<T?s.arc(O.cx,O.cy,D,WW(O.y01,O.x01),WW(k.y01,k.x01),!g):(s.arc(O.cx,O.cy,D,WW(O.y01,O.x01),WW(O.y11,O.x11),!g),s.arc(0,0,f,WW(O.cy+O.y11,O.cx+O.x11),WW(k.cy+k.y11,k.cx+k.x11),!g),s.arc(k.cx,k.cy,D,WW(k.y11,k.x11),WW(k.y01,k.x01),!g))):(s.moveTo(M,N),s.arc(0,0,f,_,v,!g)):s.moveTo(M,N),!(d>1e-12)||!(x>1e-12)?s.lineTo(P,F):E>1e-12?(O=hG(P,F,I,L,d,-E,g),k=hG(M,N,R,z,d,-E,g),s.lineTo(O.cx+O.x01,O.cy+O.y01),E<T?s.arc(O.cx,O.cy,E,WW(O.y01,O.x01),WW(k.y01,k.x01),!g):(s.arc(O.cx,O.cy,E,WW(O.y01,O.x01),WW(O.y11,O.x11),!g),s.arc(0,0,d,WW(O.cy+O.y11,O.cx+O.x11),WW(k.cy+k.y11,k.cx+k.x11),g),s.arc(k.cx,k.cy,E,WW(k.y11,k.x11),WW(k.y01,k.x01),!g))):s.arc(0,0,d,b,y,g)}if(s.closePath(),l)return s=null,l+``||null}return l.centroid=function(){var n=(+e.apply(this,arguments)+ +t.apply(this,arguments))/2,r=(+i.apply(this,arguments)+ +a.apply(this,arguments))/2-XW/2;return[GW(r)*n,JW(r)*n]},l.innerRadius=function(t){return arguments.length?(e=typeof t==`function`?t:HW(+t),l):e},l.outerRadius=function(e){return arguments.length?(t=typeof e==`function`?e:HW(+e),l):t},l.cornerRadius=function(e){return arguments.length?(n=typeof e==`function`?e:HW(+e),l):n},l.padRadius=function(e){return arguments.length?(r=e==null?null:typeof e==`function`?e:HW(+e),l):r},l.startAngle=function(e){return arguments.length?(i=typeof e==`function`?e:HW(+e),l):i},l.endAngle=function(e){return arguments.length?(a=typeof e==`function`?e:HW(+e),l):a},l.padAngle=function(e){return arguments.length?(o=typeof e==`function`?e:HW(+e),l):o},l.context=function(e){return arguments.length?(s=e??null,l):s},l}Array.prototype.slice;function _G(e){return typeof e==`object`&&`length`in e?e:Array.from(e)}function vG(e){this._context=e}vG.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._context.lineTo(e,t)}}};function yG(e){return new vG(e)}function bG(e){return e[0]}function xG(e){return e[1]}function SG(e,t){var n=HW(!0),r=null,i=yG,a=null,o=cG(s);e=typeof e==`function`?e:e===void 0?bG:HW(e),t=typeof t==`function`?t:t===void 0?xG:HW(t);function s(s){var c,l=(s=_G(s)).length,u,d=!1,f;for(r??(a=i(f=o())),c=0;c<=l;++c)!(c<l&&n(u=s[c],c,s))===d&&((d=!d)?a.lineStart():a.lineEnd()),d&&a.point(+e(u,c,s),+t(u,c,s));if(f)return a=null,f+``||null}return s.x=function(t){return arguments.length?(e=typeof t==`function`?t:HW(+t),s):e},s.y=function(e){return arguments.length?(t=typeof e==`function`?e:HW(+e),s):t},s.defined=function(e){return arguments.length?(n=typeof e==`function`?e:HW(!!e),s):n},s.curve=function(e){return arguments.length?(i=e,r!=null&&(a=i(r)),s):i},s.context=function(e){return arguments.length?(e==null?r=a=null:a=i(r=e),s):r},s}function CG(e,t){return t<e?-1:t>e?1:t>=e?0:NaN}function wG(e){return e}function TG(){var e=wG,t=CG,n=null,r=HW(0),i=HW(QW),a=HW(0);function o(o){var s,c=(o=_G(o)).length,l,u,d=0,f=Array(c),p=Array(c),m=+r.apply(this,arguments),h=Math.min(QW,Math.max(-QW,i.apply(this,arguments)-m)),g,_=Math.min(Math.abs(h)/c,a.apply(this,arguments)),v=_*(h<0?-1:1),y;for(s=0;s<c;++s)(y=p[f[s]=s]=+e(o[s],s,o))>0&&(d+=y);for(t==null?n!=null&&f.sort(function(e,t){return n(o[e],o[t])}):f.sort(function(e,n){return t(p[e],p[n])}),s=0,u=d?(h-c*v)/d:0;s<c;++s,m=g)l=f[s],y=p[l],g=m+(y>0?y*u:0)+v,p[l]={data:o[l],index:s,value:y,startAngle:m,endAngle:g,padAngle:_};return p}return o.value=function(t){return arguments.length?(e=typeof t==`function`?t:HW(+t),o):e},o.sortValues=function(e){return arguments.length?(t=e,n=null,o):t},o.sort=function(e){return arguments.length?(n=e,t=null,o):n},o.startAngle=function(e){return arguments.length?(r=typeof e==`function`?e:HW(+e),o):r},o.endAngle=function(e){return arguments.length?(i=typeof e==`function`?e:HW(+e),o):i},o.padAngle=function(e){return arguments.length?(a=typeof e==`function`?e:HW(+e),o):a},o}function EG(){}function DG(e,t,n){e._context.bezierCurveTo((2*e._x0+e._x1)/3,(2*e._y0+e._y1)/3,(e._x0+2*e._x1)/3,(e._y0+2*e._y1)/3,(e._x0+4*e._x1+t)/6,(e._y0+4*e._y1+n)/6)}function OG(e){this._context=e}OG.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:DG(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1)}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:DG(this,e,t)}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function kG(e){return new OG(e)}function AG(e){this._context=e}AG.prototype={areaStart:EG,areaEnd:EG,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x2,this._y2),this._context.closePath();break;case 2:this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break;case 3:this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4)}},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x2=e,this._y2=t;break;case 1:this._point=2,this._x3=e,this._y3=t;break;case 2:this._point=3,this._x4=e,this._y4=t,this._context.moveTo((this._x0+4*this._x1+e)/6,(this._y0+4*this._y1+t)/6);break;default:DG(this,e,t)}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function jG(e){return new AG(e)}function MG(e){this._context=e}MG.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var n=(this._x0+4*this._x1+e)/6,r=(this._y0+4*this._y1+t)/6;this._line?this._context.lineTo(n,r):this._context.moveTo(n,r);break;case 3:this._point=4;default:DG(this,e,t)}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function NG(e){return new MG(e)}function PG(e,t){this._basis=new OG(e),this._beta=t}PG.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var e=this._x,t=this._y,n=e.length-1;if(n>0)for(var r=e[0],i=t[0],a=e[n]-r,o=t[n]-i,s=-1,c;++s<=n;)c=s/n,this._basis.point(this._beta*e[s]+(1-this._beta)*(r+c*a),this._beta*t[s]+(1-this._beta)*(i+c*o));this._x=this._y=null,this._basis.lineEnd()},point:function(e,t){this._x.push(+e),this._y.push(+t)}};var FG=(function e(t){function n(e){return t===1?new OG(e):new PG(e,t)}return n.beta=function(t){return e(+t)},n})(.85);function IG(e,t,n){e._context.bezierCurveTo(e._x1+e._k*(e._x2-e._x0),e._y1+e._k*(e._y2-e._y0),e._x2+e._k*(e._x1-t),e._y2+e._k*(e._y1-n),e._x2,e._y2)}function LG(e,t){this._context=e,this._k=(1-t)/6}LG.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:IG(this,this._x1,this._y1)}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2,this._x1=e,this._y1=t;break;case 2:this._point=3;default:IG(this,e,t)}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};var RG=(function e(t){function n(e){return new LG(e,t)}return n.tension=function(t){return e(+t)},n})(0);function zG(e,t){this._context=e,this._k=(1-t)/6}zG.prototype={areaStart:EG,areaEnd:EG,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x3,this._y3),this._context.closePath();break;case 2:this._context.lineTo(this._x3,this._y3),this._context.closePath();break;case 3:this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5)}},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x3=e,this._y3=t;break;case 1:this._point=2,this._context.moveTo(this._x4=e,this._y4=t);break;case 2:this._point=3,this._x5=e,this._y5=t;break;default:IG(this,e,t)}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};var BG=(function e(t){function n(e){return new zG(e,t)}return n.tension=function(t){return e(+t)},n})(0);function VG(e,t){this._context=e,this._k=(1-t)/6}VG.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:IG(this,e,t)}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};var HG=(function e(t){function n(e){return new VG(e,t)}return n.tension=function(t){return e(+t)},n})(0);function UG(e,t,n){var r=e._x1,i=e._y1,a=e._x2,o=e._y2;if(e._l01_a>1e-12){var s=2*e._l01_2a+3*e._l01_a*e._l12_a+e._l12_2a,c=3*e._l01_a*(e._l01_a+e._l12_a);r=(r*s-e._x0*e._l12_2a+e._x2*e._l01_2a)/c,i=(i*s-e._y0*e._l12_2a+e._y2*e._l01_2a)/c}if(e._l23_a>1e-12){var l=2*e._l23_2a+3*e._l23_a*e._l12_a+e._l12_2a,u=3*e._l23_a*(e._l23_a+e._l12_a);a=(a*l+e._x1*e._l23_2a-t*e._l12_2a)/u,o=(o*l+e._y1*e._l23_2a-n*e._l12_2a)/u}e._context.bezierCurveTo(r,i,a,o,e._x2,e._y2)}function WG(e,t){this._context=e,this._alpha=t}WG.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:this.point(this._x2,this._y2)}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){if(e=+e,t=+t,this._point){var n=this._x2-e,r=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=(n*n+r*r)**+this._alpha)}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3;default:UG(this,e,t)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};var GG=(function e(t){function n(e){return t?new WG(e,t):new LG(e,0)}return n.alpha=function(t){return e(+t)},n})(.5);function KG(e,t){this._context=e,this._alpha=t}KG.prototype={areaStart:EG,areaEnd:EG,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x3,this._y3),this._context.closePath();break;case 2:this._context.lineTo(this._x3,this._y3),this._context.closePath();break;case 3:this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5)}},point:function(e,t){if(e=+e,t=+t,this._point){var n=this._x2-e,r=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=(n*n+r*r)**+this._alpha)}switch(this._point){case 0:this._point=1,this._x3=e,this._y3=t;break;case 1:this._point=2,this._context.moveTo(this._x4=e,this._y4=t);break;case 2:this._point=3,this._x5=e,this._y5=t;break;default:UG(this,e,t)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};var qG=(function e(t){function n(e){return t?new KG(e,t):new zG(e,0)}return n.alpha=function(t){return e(+t)},n})(.5);function JG(e,t){this._context=e,this._alpha=t}JG.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){if(e=+e,t=+t,this._point){var n=this._x2-e,r=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=(n*n+r*r)**+this._alpha)}switch(this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:UG(this,e,t)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};var YG=(function e(t){function n(e){return t?new JG(e,t):new VG(e,0)}return n.alpha=function(t){return e(+t)},n})(.5);function XG(e){this._context=e}XG.prototype={areaStart:EG,areaEnd:EG,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(e,t){e=+e,t=+t,this._point?this._context.lineTo(e,t):(this._point=1,this._context.moveTo(e,t))}};function ZG(e){return new XG(e)}function QG(e){return e<0?-1:1}function $G(e,t,n){var r=e._x1-e._x0,i=t-e._x1,a=(e._y1-e._y0)/(r||i<0&&-0),o=(n-e._y1)/(i||r<0&&-0),s=(a*i+o*r)/(r+i);return(QG(a)+QG(o))*Math.min(Math.abs(a),Math.abs(o),.5*Math.abs(s))||0}function eK(e,t){var n=e._x1-e._x0;return n?(3*(e._y1-e._y0)/n-t)/2:t}function tK(e,t,n){var r=e._x0,i=e._y0,a=e._x1,o=e._y1,s=(a-r)/3;e._context.bezierCurveTo(r+s,i+s*t,a-s,o-s*n,a,o)}function nK(e){this._context=e}nK.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:tK(this,this._t0,eK(this,this._t0))}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){var n=NaN;if(e=+e,t=+t,e!==this._x1||t!==this._y1){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,tK(this,eK(this,n=$G(this,e,t)),n);break;default:tK(this,this._t0,n=$G(this,e,t))}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=n}}};function rK(e){this._context=new iK(e)}(rK.prototype=Object.create(nK.prototype)).point=function(e,t){nK.prototype.point.call(this,t,e)};function iK(e){this._context=e}iK.prototype={moveTo:function(e,t){this._context.moveTo(t,e)},closePath:function(){this._context.closePath()},lineTo:function(e,t){this._context.lineTo(t,e)},bezierCurveTo:function(e,t,n,r,i,a){this._context.bezierCurveTo(t,e,r,n,a,i)}};function aK(e){return new nK(e)}function oK(e){return new rK(e)}function sK(e){this._context=e}sK.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var e=this._x,t=this._y,n=e.length;if(n)if(this._line?this._context.lineTo(e[0],t[0]):this._context.moveTo(e[0],t[0]),n===2)this._context.lineTo(e[1],t[1]);else for(var r=cK(e),i=cK(t),a=0,o=1;o<n;++a,++o)this._context.bezierCurveTo(r[0][a],i[0][a],r[1][a],i[1][a],e[o],t[o]);(this._line||this._line!==0&&n===1)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(e,t){this._x.push(+e),this._y.push(+t)}};function cK(e){var t,n=e.length-1,r,i=Array(n),a=Array(n),o=Array(n);for(i[0]=0,a[0]=2,o[0]=e[0]+2*e[1],t=1;t<n-1;++t)i[t]=1,a[t]=4,o[t]=4*e[t]+2*e[t+1];for(i[n-1]=2,a[n-1]=7,o[n-1]=8*e[n-1]+e[n],t=1;t<n;++t)r=i[t]/a[t-1],a[t]-=r,o[t]-=r*o[t-1];for(i[n-1]=o[n-1]/a[n-1],t=n-2;t>=0;--t)i[t]=(o[t]-i[t+1])/a[t];for(a[n-1]=(e[n]+i[n-1])/2,t=0;t<n-1;++t)a[t]=2*e[t+1]-i[t+1];return[i,a]}function lK(e){return new sK(e)}function uK(e,t){this._context=e,this._t=t}uK.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){0<this._t&&this._t<1&&this._point===2&&this._context.lineTo(this._x,this._y),(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line>=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:if(this._t<=0)this._context.lineTo(this._x,t),this._context.lineTo(e,t);else{var n=this._x*(1-this._t)+e*this._t;this._context.lineTo(n,this._y),this._context.lineTo(n,t)}}this._x=e,this._y=t}};function dK(e){return new uK(e,.5)}function fK(e){return new uK(e,0)}function pK(e){return new uK(e,1)}function mK(e,t){if((o=e.length)>1)for(var n=1,r,i,a=e[t[0]],o,s=a.length;n<o;++n)for(i=a,a=e[t[n]],r=0;r<s;++r)a[r][1]+=a[r][0]=isNaN(i[r][1])?i[r][0]:i[r][1]}function hK(e){for(var t=e.length,n=Array(t);--t>=0;)n[t]=t;return n}function gK(e,t){return e[t]}function _K(e){let t=[];return t.key=e,t}function vK(){var e=HW([]),t=hK,n=mK,r=gK;function i(i){var a=Array.from(e.apply(this,arguments),_K),o,s=a.length,c=-1,l;for(let e of i)for(o=0,++c;o<s;++o)(a[o][c]=[0,+r(e,a[o].key,c,i)]).data=e;for(o=0,l=_G(t(a));o<s;++o)a[l[o]].index=o;return n(a,l),a}return i.keys=function(t){return arguments.length?(e=typeof t==`function`?t:HW(Array.from(t)),i):e},i.value=function(e){return arguments.length?(r=typeof e==`function`?e:HW(+e),i):r},i.order=function(e){return arguments.length?(t=e==null?hK:typeof e==`function`?e:HW(Array.from(e)),i):t},i.offset=function(e){return arguments.length?(n=e??mK,i):n},i}function yK(e,t){if((c=e.length)>0)for(var n,r=0,i,a,o,s,c,l=e[t[0]].length;r<l;++r)for(o=s=0,n=0;n<c;++n)(a=(i=e[t[n]][r])[1]-i[0])>0?(i[0]=o,i[1]=o+=a):a<0?(i[1]=s,i[0]=s+=a):(i[0]=0,i[1]=a)}function bK(e,t){return e==null||t==null?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function xK(e,t){return e==null||t==null?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function SK(e){let t,n,r;e.length===2?(t=e===bK||e===xK?e:CK,n=e,r=e):(t=bK,n=(t,n)=>bK(e(t),n),r=(t,n)=>e(t)-n);function i(e,r,i=0,a=e.length){if(i<a){if(t(r,r)!==0)return a;do{let t=i+a>>>1;n(e[t],r)<0?i=t+1:a=t}while(i<a)}return i}function a(e,r,i=0,a=e.length){if(i<a){if(t(r,r)!==0)return a;do{let t=i+a>>>1;n(e[t],r)<=0?i=t+1:a=t}while(i<a)}return i}function o(e,t,n=0,a=e.length){let o=i(e,t,n,a-1);return o>n&&r(e[o-1],t)>-r(e[o],t)?o-1:o}return{left:i,center:o,right:a}}function CK(){return 0}function wK(e){return e===null?NaN:+e}var TK=SK(bK),EK=TK.right;TK.left,SK(wK).center;var DK=class extends Map{constructor(e,t=jK){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:t}}),e!=null)for(let[t,n]of e)this.set(t,n)}get(e){return super.get(OK(this,e))}has(e){return super.has(OK(this,e))}set(e,t){return super.set(kK(this,e),t)}delete(e){return super.delete(AK(this,e))}};function OK({_intern:e,_key:t},n){let r=t(n);return e.has(r)?e.get(r):n}function kK({_intern:e,_key:t},n){let r=t(n);return e.has(r)?e.get(r):(e.set(r,n),n)}function AK({_intern:e,_key:t},n){let r=t(n);return e.has(r)&&(n=e.get(r),e.delete(r)),n}function jK(e){return typeof e==`object`&&e?e.valueOf():e}var MK=Math.sqrt(50),NK=Math.sqrt(10),PK=Math.sqrt(2);function FK(e,t,n){let r=(t-e)/Math.max(0,n),i=Math.floor(Math.log10(r)),a=r/10**i,o=a>=MK?10:a>=NK?5:a>=PK?2:1,s,c,l;return i<0?(l=10**-i/o,s=Math.round(e*l),c=Math.round(t*l),s/l<e&&++s,c/l>t&&--c,l=-l):(l=10**i*o,s=Math.round(e/l),c=Math.round(t/l),s*l<e&&++s,c*l>t&&--c),c<s&&.5<=n&&n<2?FK(e,t,n*2):[s,c,l]}function IK(e,t,n){if(t=+t,e=+e,n=+n,!(n>0))return[];if(e===t)return[e];let r=t<e,[i,a,o]=r?FK(t,e,n):FK(e,t,n);if(!(a>=i))return[];let s=a-i+1,c=Array(s);if(r)if(o<0)for(let e=0;e<s;++e)c[e]=(a-e)/-o;else for(let e=0;e<s;++e)c[e]=(a-e)*o;else if(o<0)for(let e=0;e<s;++e)c[e]=(i+e)/-o;else for(let e=0;e<s;++e)c[e]=(i+e)*o;return c}function LK(e,t,n){return t=+t,e=+e,n=+n,FK(e,t,n)[2]}function RK(e,t,n){t=+t,e=+e,n=+n;let r=t<e,i=r?LK(t,e,n):LK(e,t,n);return(r?-1:1)*(i<0?1/-i:i)}function zK(e,t,n){e=+e,t=+t,n=(i=arguments.length)<2?(t=e,e=0,1):i<3?1:+n;for(var r=-1,i=Math.max(0,Math.ceil((t-e)/n))|0,a=Array(i);++r<i;)a[r]=e+r*n;return a}function BK(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e)}return this}var VK=Symbol(`implicit`);function HK(){var e=new DK,t=[],n=[],r=VK;function i(i){let a=e.get(i);if(a===void 0){if(r!==VK)return r;e.set(i,a=t.push(i)-1)}return n[a%n.length]}return i.domain=function(n){if(!arguments.length)return t.slice();t=[],e=new DK;for(let r of n)e.has(r)||e.set(r,t.push(r)-1);return i},i.range=function(e){return arguments.length?(n=Array.from(e),i):n.slice()},i.unknown=function(e){return arguments.length?(r=e,i):r},i.copy=function(){return HK(t,n).unknown(r)},BK.apply(i,arguments),i}function UK(){var e=HK().unknown(void 0),t=e.domain,n=e.range,r=0,i=1,a,o,s=!1,c=0,l=0,u=.5;delete e.unknown;function d(){var e=t().length,d=i<r,f=d?i:r,p=d?r:i;a=(p-f)/Math.max(1,e-c+l*2),s&&(a=Math.floor(a)),f+=(p-f-a*(e-c))*u,o=a*(1-c),s&&(f=Math.round(f),o=Math.round(o));var m=zK(e).map(function(e){return f+a*e});return n(d?m.reverse():m)}return e.domain=function(e){return arguments.length?(t(e),d()):t()},e.range=function(e){return arguments.length?([r,i]=e,r=+r,i=+i,d()):[r,i]},e.rangeRound=function(e){return[r,i]=e,r=+r,i=+i,s=!0,d()},e.bandwidth=function(){return o},e.step=function(){return a},e.round=function(e){return arguments.length?(s=!!e,d()):s},e.padding=function(e){return arguments.length?(c=Math.min(1,l=+e),d()):c},e.paddingInner=function(e){return arguments.length?(c=Math.min(1,e),d()):c},e.paddingOuter=function(e){return arguments.length?(l=+e,d()):l},e.align=function(e){return arguments.length?(u=Math.max(0,Math.min(1,e)),d()):u},e.copy=function(){return UK(t(),[r,i]).round(s).paddingInner(c).paddingOuter(l).align(u)},BK.apply(d(),arguments)}function WK(e){var t=e.copy;return e.padding=e.paddingOuter,delete e.paddingInner,delete e.paddingOuter,e.copy=function(){return WK(t())},e}function GK(){return WK(UK.apply(null,arguments).paddingInner(1))}function KK(e){return function(){return e}}function qK(e){return+e}var JK=[0,1];function YK(e){return e}function XK(e,t){return(t-=e=+e)?function(n){return(n-e)/t}:KK(isNaN(t)?NaN:.5)}function ZK(e,t){var n;return e>t&&(n=e,e=t,t=n),function(n){return Math.max(e,Math.min(t,n))}}function QK(e,t,n){var r=e[0],i=e[1],a=t[0],o=t[1];return i<r?(r=XK(i,r),a=n(o,a)):(r=XK(r,i),a=n(a,o)),function(e){return a(r(e))}}function $K(e,t,n){var r=Math.min(e.length,t.length)-1,i=Array(r),a=Array(r),o=-1;for(e[r]<e[0]&&(e=e.slice().reverse(),t=t.slice().reverse());++o<r;)i[o]=XK(e[o],e[o+1]),a[o]=n(t[o],t[o+1]);return function(t){var n=EK(e,t,1,r)-1;return a[n](i[n](t))}}function eq(e,t){return t.domain(e.domain()).range(e.range()).interpolate(e.interpolate()).clamp(e.clamp()).unknown(e.unknown())}function tq(){var e=JK,t=JK,n=_W,r,i,a,o=YK,s,c,l;function u(){var n=Math.min(e.length,t.length);return o!==YK&&(o=ZK(e[0],e[n-1])),s=n>2?$K:QK,c=l=null,d}function d(i){return i==null||isNaN(i=+i)?a:(c||=s(e.map(r),t,n))(r(o(i)))}return d.invert=function(n){return o(i((l||=s(t,e.map(r),uW))(n)))},d.domain=function(t){return arguments.length?(e=Array.from(t,qK),u()):e.slice()},d.range=function(e){return arguments.length?(t=Array.from(e),u()):t.slice()},d.rangeRound=function(e){return t=Array.from(e),n=vW,u()},d.clamp=function(e){return arguments.length?(o=e?!0:YK,u()):o!==YK},d.interpolate=function(e){return arguments.length?(n=e,u()):n},d.unknown=function(e){return arguments.length?(a=e,d):a},function(e,t){return r=e,i=t,u()}}function nq(){return tq()(YK,YK)}function rq(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString(`en`).replace(/,/g,``):e.toString(10)}function iq(e,t){if(!isFinite(e)||e===0)return null;var n=(e=t?e.toExponential(t-1):e.toExponential()).indexOf(`e`),r=e.slice(0,n);return[r.length>1?r[0]+r.slice(2):r,+e.slice(n+1)]}function aq(e){return e=iq(Math.abs(e)),e?e[1]:NaN}function oq(e,t){return function(n,r){for(var i=n.length,a=[],o=0,s=e[0],c=0;i>0&&s>0&&(c+s+1>r&&(s=Math.max(1,r-c)),a.push(n.substring(i-=s,i+s)),!((c+=s+1)>r));)s=e[o=(o+1)%e.length];return a.reverse().join(t)}}function sq(e){return function(t){return t.replace(/[0-9]/g,function(t){return e[+t]})}}var cq=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function lq(e){if(!(t=cq.exec(e)))throw Error(`invalid format: `+e);var t;return new uq({fill:t[1],align:t[2],sign:t[3],symbol:t[4],zero:t[5],width:t[6],comma:t[7],precision:t[8]&&t[8].slice(1),trim:t[9],type:t[10]})}lq.prototype=uq.prototype;function uq(e){this.fill=e.fill===void 0?` `:e.fill+``,this.align=e.align===void 0?`>`:e.align+``,this.sign=e.sign===void 0?`-`:e.sign+``,this.symbol=e.symbol===void 0?``:e.symbol+``,this.zero=!!e.zero,this.width=e.width===void 0?void 0:+e.width,this.comma=!!e.comma,this.precision=e.precision===void 0?void 0:+e.precision,this.trim=!!e.trim,this.type=e.type===void 0?``:e.type+``}uq.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?`0`:``)+(this.width===void 0?``:Math.max(1,this.width|0))+(this.comma?`,`:``)+(this.precision===void 0?``:`.`+Math.max(0,this.precision|0))+(this.trim?`~`:``)+this.type};function dq(e){out:for(var t=e.length,n=1,r=-1,i;n<t;++n)switch(e[n]){case`.`:r=i=n;break;case`0`:r===0&&(r=n),i=n;break;default:if(!+e[n])break out;r>0&&(r=0)}return r>0?e.slice(0,r)+e.slice(i+1):e}var fq;function pq(e,t){var n=iq(e,t);if(!n)return fq=void 0,e.toPrecision(t);var r=n[0],i=n[1],a=i-(fq=Math.max(-8,Math.min(8,Math.floor(i/3)))*3)+1,o=r.length;return a===o?r:a>o?r+Array(a-o+1).join(`0`):a>0?r.slice(0,a)+`.`+r.slice(a):`0.`+Array(1-a).join(`0`)+iq(e,Math.max(0,t+a-1))[0]}function mq(e,t){var n=iq(e,t);if(!n)return e+``;var r=n[0],i=n[1];return i<0?`0.`+Array(-i).join(`0`)+r:r.length>i+1?r.slice(0,i+1)+`.`+r.slice(i+1):r+Array(i-r.length+2).join(`0`)}var hq={"%":(e,t)=>(e*100).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+``,d:rq,e:(e,t)=>e.toExponential(t),f:(e,t)=>e.toFixed(t),g:(e,t)=>e.toPrecision(t),o:e=>Math.round(e).toString(8),p:(e,t)=>mq(e*100,t),r:mq,s:pq,X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function gq(e){return e}var _q=Array.prototype.map,vq=[`y`,`z`,`a`,`f`,`p`,`n`,`µ`,`m`,``,`k`,`M`,`G`,`T`,`P`,`E`,`Z`,`Y`];function yq(e){var t=e.grouping===void 0||e.thousands===void 0?gq:oq(_q.call(e.grouping,Number),e.thousands+``),n=e.currency===void 0?``:e.currency[0]+``,r=e.currency===void 0?``:e.currency[1]+``,i=e.decimal===void 0?`.`:e.decimal+``,a=e.numerals===void 0?gq:sq(_q.call(e.numerals,String)),o=e.percent===void 0?`%`:e.percent+``,s=e.minus===void 0?`−`:e.minus+``,c=e.nan===void 0?`NaN`:e.nan+``;function l(e,l){e=lq(e);var u=e.fill,d=e.align,f=e.sign,p=e.symbol,m=e.zero,h=e.width,g=e.comma,_=e.precision,v=e.trim,y=e.type;y===`n`?(g=!0,y=`g`):hq[y]||(_===void 0&&(_=12),v=!0,y=`g`),(m||u===`0`&&d===`=`)&&(m=!0,u=`0`,d=`=`);var b=(l&&l.prefix!==void 0?l.prefix:``)+(p===`$`?n:p===`#`&&/[boxX]/.test(y)?`0`+y.toLowerCase():``),x=(p===`$`?r:/[%p]/.test(y)?o:``)+(l&&l.suffix!==void 0?l.suffix:``),S=hq[y],C=/[defgprs%]/.test(y);_=_===void 0?6:/[gprs]/.test(y)?Math.max(1,Math.min(21,_)):Math.max(0,Math.min(20,_));function w(e){var n=b,r=x,o,l,p;if(y===`c`)r=S(e)+r,e=``;else{e=+e;var w=e<0||1/e<0;if(e=isNaN(e)?c:S(Math.abs(e),_),v&&(e=dq(e)),w&&+e==0&&f!==`+`&&(w=!1),n=(w?f===`(`?f:s:f===`-`||f===`(`?``:f)+n,r=(y===`s`&&!isNaN(e)&&fq!==void 0?vq[8+fq/3]:``)+r+(w&&f===`(`?`)`:``),C){for(o=-1,l=e.length;++o<l;)if(p=e.charCodeAt(o),48>p||p>57){r=(p===46?i+e.slice(o+1):e.slice(o))+r,e=e.slice(0,o);break}}}g&&!m&&(e=t(e,1/0));var T=n.length+e.length+r.length,E=T<h?Array(h-T+1).join(u):``;switch(g&&m&&(e=t(E+e,E.length?h-r.length:1/0),E=``),d){case`<`:e=n+e+r+E;break;case`=`:e=n+E+e+r;break;case`^`:e=E.slice(0,T=E.length>>1)+n+e+r+E.slice(T);break;default:e=E+n+e+r}return a(e)}return w.toString=function(){return e+``},w}function u(e,t){var n=Math.max(-8,Math.min(8,Math.floor(aq(t)/3)))*3,r=10**-n,i=l((e=lq(e),e.type=`f`,e),{suffix:vq[8+n/3]});return function(e){return i(r*e)}}return{format:l,formatPrefix:u}}var bq,xq,Sq;Cq({thousands:`,`,grouping:[3],currency:[`$`,``]});function Cq(e){return bq=yq(e),xq=bq.format,Sq=bq.formatPrefix,bq}function wq(e){return Math.max(0,-aq(Math.abs(e)))}function Tq(e,t){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(aq(t)/3)))*3-aq(Math.abs(e)))}function Eq(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,aq(t)-aq(e))+1}function Dq(e,t,n,r){var i=RK(e,t,n),a;switch(r=lq(r??`,f`),r.type){case`s`:var o=Math.max(Math.abs(e),Math.abs(t));return r.precision==null&&!isNaN(a=Tq(i,o))&&(r.precision=a),Sq(r,o);case``:case`e`:case`g`:case`p`:case`r`:r.precision==null&&!isNaN(a=Eq(i,Math.max(Math.abs(e),Math.abs(t))))&&(r.precision=a-(r.type===`e`));break;case`f`:case`%`:r.precision==null&&!isNaN(a=wq(i))&&(r.precision=a-(r.type===`%`)*2)}return xq(r)}function Oq(e){var t=e.domain;return e.ticks=function(e){var n=t();return IK(n[0],n[n.length-1],e??10)},e.tickFormat=function(e,n){var r=t();return Dq(r[0],r[r.length-1],e??10,n)},e.nice=function(n){n??=10;var r=t(),i=0,a=r.length-1,o=r[i],s=r[a],c,l,u=10;for(s<o&&(l=o,o=s,s=l,l=i,i=a,a=l);u-->0;){if(l=LK(o,s,n),l===c)return r[i]=o,r[a]=s,t(r);if(l>0)o=Math.floor(o/l)*l,s=Math.ceil(s/l)*l;else if(l<0)o=Math.ceil(o*l)/l,s=Math.floor(s*l)/l;else break;c=l}return e},e}function kq(){var e=nq();return e.copy=function(){return eq(e,kq())},BK.apply(e,arguments),Oq(e)}function Aq(e,t){e=e.slice();var n=0,r=e.length-1,i=e[n],a=e[r],o;return a<i&&(o=n,n=r,r=o,o=i,i=a,a=o),e[n]=t.floor(i),e[r]=t.ceil(a),e}function jq(e){return Math.log(e)}function Mq(e){return Math.exp(e)}function Nq(e){return-Math.log(-e)}function Pq(e){return-Math.exp(-e)}function Fq(e){return isFinite(e)?+(`1e`+e):e<0?0:e}function Iq(e){return e===10?Fq:e===Math.E?Math.exp:t=>e**+t}function Lq(e){return e===Math.E?Math.log:e===10&&Math.log10||e===2&&Math.log2||(e=Math.log(e),t=>Math.log(t)/e)}function Rq(e){return(t,n)=>-e(-t,n)}function zq(e){let t=e(jq,Mq),n=t.domain,r=10,i,a;function o(){return i=Lq(r),a=Iq(r),n()[0]<0?(i=Rq(i),a=Rq(a),e(Nq,Pq)):e(jq,Mq),t}return t.base=function(e){return arguments.length?(r=+e,o()):r},t.domain=function(e){return arguments.length?(n(e),o()):n()},t.ticks=e=>{let t=n(),o=t[0],s=t[t.length-1],c=s<o;c&&([o,s]=[s,o]);let l=i(o),u=i(s),d,f,p=e==null?10:+e,m=[];if(!(r%1)&&u-l<p){if(l=Math.floor(l),u=Math.ceil(u),o>0){for(;l<=u;++l)for(d=1;d<r;++d)if(f=l<0?d/a(-l):d*a(l),!(f<o)){if(f>s)break;m.push(f)}}else for(;l<=u;++l)for(d=r-1;d>=1;--d)if(f=l>0?d/a(-l):d*a(l),!(f<o)){if(f>s)break;m.push(f)}m.length*2<p&&(m=IK(o,s,p))}else m=IK(l,u,Math.min(u-l,p)).map(a);return c?m.reverse():m},t.tickFormat=(e,n)=>{if(e??=10,n??=r===10?`s`:`,`,typeof n!=`function`&&(!(r%1)&&(n=lq(n)).precision==null&&(n.trim=!0),n=xq(n)),e===1/0)return n;let o=Math.max(1,r*e/t.ticks().length);return e=>{let t=e/a(Math.round(i(e)));return t*r<r-.5&&(t*=r),t<=o?n(e):``}},t.nice=()=>n(Aq(n(),{floor:e=>a(Math.floor(i(e))),ceil:e=>a(Math.ceil(i(e)))})),t}function Bq(){let e=zq(tq()).domain([1,10]);return e.copy=()=>eq(e,Bq()).base(e.base()),BK.apply(e,arguments),e}function Vq(e){return function(t){return Math.sign(t)*Math.log1p(Math.abs(t/e))}}function Hq(e){return function(t){return Math.sign(t)*Math.expm1(Math.abs(t))*e}}function Uq(e){var t=1,n=e(Vq(t),Hq(t));return n.constant=function(n){return arguments.length?e(Vq(t=+n),Hq(t)):t},Oq(n)}function Wq(){var e=Uq(tq());return e.copy=function(){return eq(e,Wq()).constant(e.constant())},BK.apply(e,arguments)}var Gq=new Date,Kq=new Date;function qq(e,t,n,r){function i(t){return e(t=arguments.length===0?new Date:new Date(+t)),t}return i.floor=t=>(e(t=new Date(+t)),t),i.ceil=n=>(e(n=new Date(n-1)),t(n,1),e(n),n),i.round=e=>{let t=i(e),n=i.ceil(e);return e-t<n-e?t:n},i.offset=(e,n)=>(t(e=new Date(+e),n==null?1:Math.floor(n)),e),i.range=(n,r,a)=>{let o=[];if(n=i.ceil(n),a=a==null?1:Math.floor(a),!(n<r)||!(a>0))return o;let s;do o.push(s=new Date(+n)),t(n,a),e(n);while(s<n&&n<r);return o},i.filter=n=>qq(t=>{if(t>=t)for(;e(t),!n(t);)t.setTime(t-1)},(e,r)=>{if(e>=e)if(r<0)for(;++r<=0;)for(;t(e,-1),!n(e););else for(;--r>=0;)for(;t(e,1),!n(e););}),n&&(i.count=(t,r)=>(Gq.setTime(+t),Kq.setTime(+r),e(Gq),e(Kq),Math.floor(n(Gq,Kq))),i.every=e=>(e=Math.floor(e),!isFinite(e)||!(e>0)?null:e>1?i.filter(r?t=>r(t)%e===0:t=>i.count(0,t)%e===0):i)),i}var Jq=qq(()=>{},(e,t)=>{e.setTime(+e+t)},(e,t)=>t-e);Jq.every=e=>(e=Math.floor(e),!isFinite(e)||!(e>0)?null:e>1?qq(t=>{t.setTime(Math.floor(t/e)*e)},(t,n)=>{t.setTime(+t+n*e)},(t,n)=>(n-t)/e):Jq),Jq.range;var Yq=1e3,Xq=Yq*60,Zq=Xq*60,Qq=Zq*24,$q=Qq*7,eJ=Qq*30,tJ=Qq*365,nJ=qq(e=>{e.setTime(e-e.getMilliseconds())},(e,t)=>{e.setTime(+e+t*Yq)},(e,t)=>(t-e)/Yq,e=>e.getUTCSeconds());nJ.range;var rJ=qq(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*Yq)},(e,t)=>{e.setTime(+e+t*Xq)},(e,t)=>(t-e)/Xq,e=>e.getMinutes());rJ.range;var iJ=qq(e=>{e.setUTCSeconds(0,0)},(e,t)=>{e.setTime(+e+t*Xq)},(e,t)=>(t-e)/Xq,e=>e.getUTCMinutes());iJ.range;var aJ=qq(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*Yq-e.getMinutes()*Xq)},(e,t)=>{e.setTime(+e+t*Zq)},(e,t)=>(t-e)/Zq,e=>e.getHours());aJ.range;var oJ=qq(e=>{e.setUTCMinutes(0,0,0)},(e,t)=>{e.setTime(+e+t*Zq)},(e,t)=>(t-e)/Zq,e=>e.getUTCHours());oJ.range;var sJ=qq(e=>e.setHours(0,0,0,0),(e,t)=>e.setDate(e.getDate()+t),(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*Xq)/Qq,e=>e.getDate()-1);sJ.range;var cJ=qq(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/Qq,e=>e.getUTCDate()-1);cJ.range;var lJ=qq(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/Qq,e=>Math.floor(e/Qq));lJ.range;function uJ(e){return qq(t=>{t.setDate(t.getDate()-(t.getDay()+7-e)%7),t.setHours(0,0,0,0)},(e,t)=>{e.setDate(e.getDate()+t*7)},(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*Xq)/$q)}var dJ=uJ(0),fJ=uJ(1),pJ=uJ(2),mJ=uJ(3),hJ=uJ(4),gJ=uJ(5),_J=uJ(6);dJ.range,fJ.range,pJ.range,mJ.range,hJ.range,gJ.range,_J.range;function vJ(e){return qq(t=>{t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7),t.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t*7)},(e,t)=>(t-e)/$q)}var yJ=vJ(0),bJ=vJ(1),xJ=vJ(2),SJ=vJ(3),CJ=vJ(4),wJ=vJ(5),TJ=vJ(6);yJ.range,bJ.range,xJ.range,SJ.range,CJ.range,wJ.range,TJ.range;var EJ=qq(e=>{e.setDate(1),e.setHours(0,0,0,0)},(e,t)=>{e.setMonth(e.getMonth()+t)},(e,t)=>t.getMonth()-e.getMonth()+(t.getFullYear()-e.getFullYear())*12,e=>e.getMonth());EJ.range;var DJ=qq(e=>{e.setUTCDate(1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCMonth(e.getUTCMonth()+t)},(e,t)=>t.getUTCMonth()-e.getUTCMonth()+(t.getUTCFullYear()-e.getUTCFullYear())*12,e=>e.getUTCMonth());DJ.range;var OJ=qq(e=>{e.setMonth(0,1),e.setHours(0,0,0,0)},(e,t)=>{e.setFullYear(e.getFullYear()+t)},(e,t)=>t.getFullYear()-e.getFullYear(),e=>e.getFullYear());OJ.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:qq(t=>{t.setFullYear(Math.floor(t.getFullYear()/e)*e),t.setMonth(0,1),t.setHours(0,0,0,0)},(t,n)=>{t.setFullYear(t.getFullYear()+n*e)}),OJ.range;var kJ=qq(e=>{e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCFullYear(e.getUTCFullYear()+t)},(e,t)=>t.getUTCFullYear()-e.getUTCFullYear(),e=>e.getUTCFullYear());kJ.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:qq(t=>{t.setUTCFullYear(Math.floor(t.getUTCFullYear()/e)*e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,n)=>{t.setUTCFullYear(t.getUTCFullYear()+n*e)}),kJ.range;function AJ(e,t,n,r,i,a){let o=[[nJ,1,Yq],[nJ,5,5*Yq],[nJ,15,15*Yq],[nJ,30,30*Yq],[a,1,Xq],[a,5,5*Xq],[a,15,15*Xq],[a,30,30*Xq],[i,1,Zq],[i,3,3*Zq],[i,6,6*Zq],[i,12,12*Zq],[r,1,Qq],[r,2,2*Qq],[n,1,$q],[t,1,eJ],[t,3,3*eJ],[e,1,tJ]];function s(e,t,n){let r=t<e;r&&([e,t]=[t,e]);let i=n&&typeof n.range==`function`?n:c(e,t,n),a=i?i.range(e,+t+1):[];return r?a.reverse():a}function c(t,n,r){let i=Math.abs(n-t)/r,a=SK(([,,e])=>e).right(o,i);if(a===o.length)return e.every(RK(t/tJ,n/tJ,r));if(a===0)return Jq.every(Math.max(RK(t,n,r),1));let[s,c]=o[i/o[a-1][2]<o[a][2]/i?a-1:a];return s.every(c)}return[s,c]}var[jJ,MJ]=AJ(kJ,DJ,yJ,lJ,oJ,iJ),[NJ,PJ]=AJ(OJ,EJ,dJ,sJ,aJ,rJ);function FJ(e){if(0<=e.y&&e.y<100){var t=new Date(-1,e.m,e.d,e.H,e.M,e.S,e.L);return t.setFullYear(e.y),t}return new Date(e.y,e.m,e.d,e.H,e.M,e.S,e.L)}function IJ(e){if(0<=e.y&&e.y<100){var t=new Date(Date.UTC(-1,e.m,e.d,e.H,e.M,e.S,e.L));return t.setUTCFullYear(e.y),t}return new Date(Date.UTC(e.y,e.m,e.d,e.H,e.M,e.S,e.L))}function LJ(e,t,n){return{y:e,m:t,d:n,H:0,M:0,S:0,L:0}}function RJ(e){var t=e.dateTime,n=e.date,r=e.time,i=e.periods,a=e.days,o=e.shortDays,s=e.months,c=e.shortMonths,l=GJ(i),u=KJ(i),d=GJ(a),f=KJ(a),p=GJ(o),m=KJ(o),h=GJ(s),g=KJ(s),_=GJ(c),v=KJ(c),y={a:N,A:P,b:F,B:I,c:null,d:pY,e:pY,f:vY,g:kY,G:jY,H:mY,I:hY,j:gY,L:_Y,m:yY,M:bY,p:L,q:R,Q:eX,s:tX,S:xY,u:SY,U:CY,V:TY,w:EY,W:DY,x:null,X:null,y:OY,Y:AY,Z:MY,"%":$Y},b={a:z,A:B,b:V,B:H,c:null,d:NY,e:NY,f:RY,g:YY,G:ZY,H:PY,I:FY,j:IY,L:LY,m:zY,M:BY,p:ee,q:te,Q:eX,s:tX,S:VY,u:HY,U:UY,V:GY,w:KY,W:qY,x:null,X:null,y:JY,Y:XY,Z:QY,"%":$Y},x={a:E,A:D,b:O,B:k,c:A,d:rY,e:rY,f:lY,g:$J,G:QJ,H:aY,I:aY,j:iY,L:cY,m:nY,M:oY,p:T,q:tY,Q:dY,s:fY,S:sY,u:JJ,U:YJ,V:XJ,w:qJ,W:ZJ,x:j,X:M,y:$J,Y:QJ,Z:eY,"%":uY};y.x=S(n,y),y.X=S(r,y),y.c=S(t,y),b.x=S(n,b),b.X=S(r,b),b.c=S(t,b);function S(e,t){return function(n){var r=[],i=-1,a=0,o=e.length,s,c,l;for(n instanceof Date||(n=new Date(+n));++i<o;)e.charCodeAt(i)===37&&(r.push(e.slice(a,i)),(c=zJ[s=e.charAt(++i)])==null?c=s===`e`?` `:`0`:s=e.charAt(++i),(l=t[s])&&(s=l(n,c)),r.push(s),a=i+1);return r.push(e.slice(a,i)),r.join(``)}}function C(e,t){return function(n){var r=LJ(1900,void 0,1),i=w(r,e,n+=``,0),a,o;if(i!=n.length)return null;if(`Q`in r)return new Date(r.Q);if(`s`in r)return new Date(r.s*1e3+(`L`in r?r.L:0));if(t&&!(`Z`in r)&&(r.Z=0),`p`in r&&(r.H=r.H%12+r.p*12),r.m===void 0&&(r.m=`q`in r?r.q:0),`V`in r){if(r.V<1||r.V>53)return null;`w`in r||(r.w=1),`Z`in r?(a=IJ(LJ(r.y,0,1)),o=a.getUTCDay(),a=o>4||o===0?bJ.ceil(a):bJ(a),a=cJ.offset(a,(r.V-1)*7),r.y=a.getUTCFullYear(),r.m=a.getUTCMonth(),r.d=a.getUTCDate()+(r.w+6)%7):(a=FJ(LJ(r.y,0,1)),o=a.getDay(),a=o>4||o===0?fJ.ceil(a):fJ(a),a=sJ.offset(a,(r.V-1)*7),r.y=a.getFullYear(),r.m=a.getMonth(),r.d=a.getDate()+(r.w+6)%7)}else(`W`in r||`U`in r)&&(`w`in r||(r.w=`u`in r?r.u%7:+(`W`in r)),o=`Z`in r?IJ(LJ(r.y,0,1)).getUTCDay():FJ(LJ(r.y,0,1)).getDay(),r.m=0,r.d=`W`in r?(r.w+6)%7+r.W*7-(o+5)%7:r.w+r.U*7-(o+6)%7);return`Z`in r?(r.H+=r.Z/100|0,r.M+=r.Z%100,IJ(r)):FJ(r)}}function w(e,t,n,r){for(var i=0,a=t.length,o=n.length,s,c;i<a;){if(r>=o)return-1;if(s=t.charCodeAt(i++),s===37){if(s=t.charAt(i++),c=x[s in zJ?t.charAt(i++):s],!c||(r=c(e,n,r))<0)return-1}else if(s!=n.charCodeAt(r++))return-1}return r}function T(e,t,n){var r=l.exec(t.slice(n));return r?(e.p=u.get(r[0].toLowerCase()),n+r[0].length):-1}function E(e,t,n){var r=p.exec(t.slice(n));return r?(e.w=m.get(r[0].toLowerCase()),n+r[0].length):-1}function D(e,t,n){var r=d.exec(t.slice(n));return r?(e.w=f.get(r[0].toLowerCase()),n+r[0].length):-1}function O(e,t,n){var r=_.exec(t.slice(n));return r?(e.m=v.get(r[0].toLowerCase()),n+r[0].length):-1}function k(e,t,n){var r=h.exec(t.slice(n));return r?(e.m=g.get(r[0].toLowerCase()),n+r[0].length):-1}function A(e,n,r){return w(e,t,n,r)}function j(e,t,r){return w(e,n,t,r)}function M(e,t,n){return w(e,r,t,n)}function N(e){return o[e.getDay()]}function P(e){return a[e.getDay()]}function F(e){return c[e.getMonth()]}function I(e){return s[e.getMonth()]}function L(e){return i[+(e.getHours()>=12)]}function R(e){return 1+~~(e.getMonth()/3)}function z(e){return o[e.getUTCDay()]}function B(e){return a[e.getUTCDay()]}function V(e){return c[e.getUTCMonth()]}function H(e){return s[e.getUTCMonth()]}function ee(e){return i[+(e.getUTCHours()>=12)]}function te(e){return 1+~~(e.getUTCMonth()/3)}return{format:function(e){var t=S(e+=``,y);return t.toString=function(){return e},t},parse:function(e){var t=C(e+=``,!1);return t.toString=function(){return e},t},utcFormat:function(e){var t=S(e+=``,b);return t.toString=function(){return e},t},utcParse:function(e){var t=C(e+=``,!0);return t.toString=function(){return e},t}}}var zJ={"-":``,_:` `,0:`0`},BJ=/^\s*\d+/,VJ=/^%/,HJ=/[\\^$*+?|[\]().{}]/g;function UJ(e,t,n){var r=e<0?`-`:``,i=(r?-e:e)+``,a=i.length;return r+(a<n?Array(n-a+1).join(t)+i:i)}function WJ(e){return e.replace(HJ,`\\$&`)}function GJ(e){return RegExp(`^(?:`+e.map(WJ).join(`|`)+`)`,`i`)}function KJ(e){return new Map(e.map((e,t)=>[e.toLowerCase(),t]))}function qJ(e,t,n){var r=BJ.exec(t.slice(n,n+1));return r?(e.w=+r[0],n+r[0].length):-1}function JJ(e,t,n){var r=BJ.exec(t.slice(n,n+1));return r?(e.u=+r[0],n+r[0].length):-1}function YJ(e,t,n){var r=BJ.exec(t.slice(n,n+2));return r?(e.U=+r[0],n+r[0].length):-1}function XJ(e,t,n){var r=BJ.exec(t.slice(n,n+2));return r?(e.V=+r[0],n+r[0].length):-1}function ZJ(e,t,n){var r=BJ.exec(t.slice(n,n+2));return r?(e.W=+r[0],n+r[0].length):-1}function QJ(e,t,n){var r=BJ.exec(t.slice(n,n+4));return r?(e.y=+r[0],n+r[0].length):-1}function $J(e,t,n){var r=BJ.exec(t.slice(n,n+2));return r?(e.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function eY(e,t,n){var r=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(t.slice(n,n+6));return r?(e.Z=r[1]?0:-(r[2]+(r[3]||`00`)),n+r[0].length):-1}function tY(e,t,n){var r=BJ.exec(t.slice(n,n+1));return r?(e.q=r[0]*3-3,n+r[0].length):-1}function nY(e,t,n){var r=BJ.exec(t.slice(n,n+2));return r?(e.m=r[0]-1,n+r[0].length):-1}function rY(e,t,n){var r=BJ.exec(t.slice(n,n+2));return r?(e.d=+r[0],n+r[0].length):-1}function iY(e,t,n){var r=BJ.exec(t.slice(n,n+3));return r?(e.m=0,e.d=+r[0],n+r[0].length):-1}function aY(e,t,n){var r=BJ.exec(t.slice(n,n+2));return r?(e.H=+r[0],n+r[0].length):-1}function oY(e,t,n){var r=BJ.exec(t.slice(n,n+2));return r?(e.M=+r[0],n+r[0].length):-1}function sY(e,t,n){var r=BJ.exec(t.slice(n,n+2));return r?(e.S=+r[0],n+r[0].length):-1}function cY(e,t,n){var r=BJ.exec(t.slice(n,n+3));return r?(e.L=+r[0],n+r[0].length):-1}function lY(e,t,n){var r=BJ.exec(t.slice(n,n+6));return r?(e.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function uY(e,t,n){var r=VJ.exec(t.slice(n,n+1));return r?n+r[0].length:-1}function dY(e,t,n){var r=BJ.exec(t.slice(n));return r?(e.Q=+r[0],n+r[0].length):-1}function fY(e,t,n){var r=BJ.exec(t.slice(n));return r?(e.s=+r[0],n+r[0].length):-1}function pY(e,t){return UJ(e.getDate(),t,2)}function mY(e,t){return UJ(e.getHours(),t,2)}function hY(e,t){return UJ(e.getHours()%12||12,t,2)}function gY(e,t){return UJ(1+sJ.count(OJ(e),e),t,3)}function _Y(e,t){return UJ(e.getMilliseconds(),t,3)}function vY(e,t){return _Y(e,t)+`000`}function yY(e,t){return UJ(e.getMonth()+1,t,2)}function bY(e,t){return UJ(e.getMinutes(),t,2)}function xY(e,t){return UJ(e.getSeconds(),t,2)}function SY(e){var t=e.getDay();return t===0?7:t}function CY(e,t){return UJ(dJ.count(OJ(e)-1,e),t,2)}function wY(e){var t=e.getDay();return t>=4||t===0?hJ(e):hJ.ceil(e)}function TY(e,t){return e=wY(e),UJ(hJ.count(OJ(e),e)+(OJ(e).getDay()===4),t,2)}function EY(e){return e.getDay()}function DY(e,t){return UJ(fJ.count(OJ(e)-1,e),t,2)}function OY(e,t){return UJ(e.getFullYear()%100,t,2)}function kY(e,t){return e=wY(e),UJ(e.getFullYear()%100,t,2)}function AY(e,t){return UJ(e.getFullYear()%1e4,t,4)}function jY(e,t){var n=e.getDay();return e=n>=4||n===0?hJ(e):hJ.ceil(e),UJ(e.getFullYear()%1e4,t,4)}function MY(e){var t=e.getTimezoneOffset();return(t>0?`-`:(t*=-1,`+`))+UJ(t/60|0,`0`,2)+UJ(t%60,`0`,2)}function NY(e,t){return UJ(e.getUTCDate(),t,2)}function PY(e,t){return UJ(e.getUTCHours(),t,2)}function FY(e,t){return UJ(e.getUTCHours()%12||12,t,2)}function IY(e,t){return UJ(1+cJ.count(kJ(e),e),t,3)}function LY(e,t){return UJ(e.getUTCMilliseconds(),t,3)}function RY(e,t){return LY(e,t)+`000`}function zY(e,t){return UJ(e.getUTCMonth()+1,t,2)}function BY(e,t){return UJ(e.getUTCMinutes(),t,2)}function VY(e,t){return UJ(e.getUTCSeconds(),t,2)}function HY(e){var t=e.getUTCDay();return t===0?7:t}function UY(e,t){return UJ(yJ.count(kJ(e)-1,e),t,2)}function WY(e){var t=e.getUTCDay();return t>=4||t===0?CJ(e):CJ.ceil(e)}function GY(e,t){return e=WY(e),UJ(CJ.count(kJ(e),e)+(kJ(e).getUTCDay()===4),t,2)}function KY(e){return e.getUTCDay()}function qY(e,t){return UJ(bJ.count(kJ(e)-1,e),t,2)}function JY(e,t){return UJ(e.getUTCFullYear()%100,t,2)}function YY(e,t){return e=WY(e),UJ(e.getUTCFullYear()%100,t,2)}function XY(e,t){return UJ(e.getUTCFullYear()%1e4,t,4)}function ZY(e,t){var n=e.getUTCDay();return e=n>=4||n===0?CJ(e):CJ.ceil(e),UJ(e.getUTCFullYear()%1e4,t,4)}function QY(){return`+0000`}function $Y(){return`%`}function eX(e){return+e}function tX(e){return Math.floor(e/1e3)}var nX,rX,iX;aX({dateTime:`%x, %X`,date:`%-m/%-d/%Y`,time:`%-I:%M:%S %p`,periods:[`AM`,`PM`],days:[`Sunday`,`Monday`,`Tuesday`,`Wednesday`,`Thursday`,`Friday`,`Saturday`],shortDays:[`Sun`,`Mon`,`Tue`,`Wed`,`Thu`,`Fri`,`Sat`],months:[`January`,`February`,`March`,`April`,`May`,`June`,`July`,`August`,`September`,`October`,`November`,`December`],shortMonths:[`Jan`,`Feb`,`Mar`,`Apr`,`May`,`Jun`,`Jul`,`Aug`,`Sep`,`Oct`,`Nov`,`Dec`]});function aX(e){return nX=RJ(e),rX=nX.format,nX.parse,iX=nX.utcFormat,nX.utcParse,nX}function oX(e){return new Date(e)}function sX(e){return e instanceof Date?+e:+new Date(+e)}function cX(e,t,n,r,i,a,o,s,c,l){var u=nq(),d=u.invert,f=u.domain,p=l(`.%L`),m=l(`:%S`),h=l(`%I:%M`),g=l(`%I %p`),_=l(`%a %d`),v=l(`%b %d`),y=l(`%B`),b=l(`%Y`);function x(e){return(c(e)<e?p:s(e)<e?m:o(e)<e?h:a(e)<e?g:r(e)<e?i(e)<e?_:v:n(e)<e?y:b)(e)}return u.invert=function(e){return new Date(d(e))},u.domain=function(e){return arguments.length?f(Array.from(e,sX)):f().map(oX)},u.ticks=function(t){var n=f();return e(n[0],n[n.length-1],t??10)},u.tickFormat=function(e,t){return t==null?x:l(t)},u.nice=function(e){var n=f();return(!e||typeof e.range!=`function`)&&(e=t(n[0],n[n.length-1],e??10)),e?f(Aq(n,e)):u},u.copy=function(){return eq(u,cX(e,t,n,r,i,a,o,s,c,l))},u}function lX(){return BK.apply(cX(NJ,PJ,OJ,EJ,dJ,sJ,aJ,rJ,nJ,rX).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}function uX(){return BK.apply(cX(jJ,MJ,kJ,DJ,yJ,cJ,oJ,iJ,nJ,iX).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)]),arguments)}function dX(e){for(var t=e.length/6|0,n=Array(t),r=0;r<t;)n[r]=`#`+e.slice(r*6,++r*6);return n}var fX=dX(`1f77b4ff7f0e2ca02cd627289467bd8c564be377c27f7f7fbcbd2217becf`),pX=dX(`7fc97fbeaed4fdc086ffff99386cb0f0027fbf5b17666666`),mX=dX(`1b9e77d95f027570b3e7298a66a61ee6ab02a6761d666666`),hX=dX(`a6cee31f78b4b2df8a33a02cfb9a99e31a1cfdbf6fff7f00cab2d66a3d9affff99b15928`),gX=dX(`fbb4aeb3cde3ccebc5decbe4fed9a6ffffcce5d8bdfddaecf2f2f2`),_X=dX(`b3e2cdfdcdaccbd5e8f4cae4e6f5c9fff2aef1e2cccccccc`),vX=dX(`e41a1c377eb84daf4a984ea3ff7f00ffff33a65628f781bf999999`),yX=dX(`66c2a5fc8d628da0cbe78ac3a6d854ffd92fe5c494b3b3b3`),bX=dX(`8dd3c7ffffb3bebadafb807280b1d3fdb462b3de69fccde5d9d9d9bc80bdccebc5ffed6f`),xX=dX(`4e79a7f28e2ce1575976b7b259a14fedc949af7aa1ff9da79c755fbab0ab`),SX=e=>aW(e[e.length-1]),CX=[,,,`d8b365f5f5f55ab4ac`,`a6611adfc27d80cdc1018571`,`a6611adfc27df5f5f580cdc1018571`,`8c510ad8b365f6e8c3c7eae55ab4ac01665e`,`8c510ad8b365f6e8c3f5f5f5c7eae55ab4ac01665e`,`8c510abf812ddfc27df6e8c3c7eae580cdc135978f01665e`,`8c510abf812ddfc27df6e8c3f5f5f5c7eae580cdc135978f01665e`,`5430058c510abf812ddfc27df6e8c3c7eae580cdc135978f01665e003c30`,`5430058c510abf812ddfc27df6e8c3f5f5f5c7eae580cdc135978f01665e003c30`].map(dX),wX=SX(CX),TX=[,,,`af8dc3f7f7f77fbf7b`,`7b3294c2a5cfa6dba0008837`,`7b3294c2a5cff7f7f7a6dba0008837`,`762a83af8dc3e7d4e8d9f0d37fbf7b1b7837`,`762a83af8dc3e7d4e8f7f7f7d9f0d37fbf7b1b7837`,`762a839970abc2a5cfe7d4e8d9f0d3a6dba05aae611b7837`,`762a839970abc2a5cfe7d4e8f7f7f7d9f0d3a6dba05aae611b7837`,`40004b762a839970abc2a5cfe7d4e8d9f0d3a6dba05aae611b783700441b`,`40004b762a839970abc2a5cfe7d4e8f7f7f7d9f0d3a6dba05aae611b783700441b`].map(dX),EX=SX(TX),DX=[,,,`e9a3c9f7f7f7a1d76a`,`d01c8bf1b6dab8e1864dac26`,`d01c8bf1b6daf7f7f7b8e1864dac26`,`c51b7de9a3c9fde0efe6f5d0a1d76a4d9221`,`c51b7de9a3c9fde0eff7f7f7e6f5d0a1d76a4d9221`,`c51b7dde77aef1b6dafde0efe6f5d0b8e1867fbc414d9221`,`c51b7dde77aef1b6dafde0eff7f7f7e6f5d0b8e1867fbc414d9221`,`8e0152c51b7dde77aef1b6dafde0efe6f5d0b8e1867fbc414d9221276419`,`8e0152c51b7dde77aef1b6dafde0eff7f7f7e6f5d0b8e1867fbc414d9221276419`].map(dX),OX=SX(DX),kX=[,,,`998ec3f7f7f7f1a340`,`5e3c99b2abd2fdb863e66101`,`5e3c99b2abd2f7f7f7fdb863e66101`,`542788998ec3d8daebfee0b6f1a340b35806`,`542788998ec3d8daebf7f7f7fee0b6f1a340b35806`,`5427888073acb2abd2d8daebfee0b6fdb863e08214b35806`,`5427888073acb2abd2d8daebf7f7f7fee0b6fdb863e08214b35806`,`2d004b5427888073acb2abd2d8daebfee0b6fdb863e08214b358067f3b08`,`2d004b5427888073acb2abd2d8daebf7f7f7fee0b6fdb863e08214b358067f3b08`].map(dX),AX=SX(kX),jX=[,,,`ef8a62f7f7f767a9cf`,`ca0020f4a58292c5de0571b0`,`ca0020f4a582f7f7f792c5de0571b0`,`b2182bef8a62fddbc7d1e5f067a9cf2166ac`,`b2182bef8a62fddbc7f7f7f7d1e5f067a9cf2166ac`,`b2182bd6604df4a582fddbc7d1e5f092c5de4393c32166ac`,`b2182bd6604df4a582fddbc7f7f7f7d1e5f092c5de4393c32166ac`,`67001fb2182bd6604df4a582fddbc7d1e5f092c5de4393c32166ac053061`,`67001fb2182bd6604df4a582fddbc7f7f7f7d1e5f092c5de4393c32166ac053061`].map(dX),MX=SX(jX),NX=[,,,`ef8a62ffffff999999`,`ca0020f4a582bababa404040`,`ca0020f4a582ffffffbababa404040`,`b2182bef8a62fddbc7e0e0e09999994d4d4d`,`b2182bef8a62fddbc7ffffffe0e0e09999994d4d4d`,`b2182bd6604df4a582fddbc7e0e0e0bababa8787874d4d4d`,`b2182bd6604df4a582fddbc7ffffffe0e0e0bababa8787874d4d4d`,`67001fb2182bd6604df4a582fddbc7e0e0e0bababa8787874d4d4d1a1a1a`,`67001fb2182bd6604df4a582fddbc7ffffffe0e0e0bababa8787874d4d4d1a1a1a`].map(dX),PX=SX(NX),FX=[,,,`fc8d59ffffbf91bfdb`,`d7191cfdae61abd9e92c7bb6`,`d7191cfdae61ffffbfabd9e92c7bb6`,`d73027fc8d59fee090e0f3f891bfdb4575b4`,`d73027fc8d59fee090ffffbfe0f3f891bfdb4575b4`,`d73027f46d43fdae61fee090e0f3f8abd9e974add14575b4`,`d73027f46d43fdae61fee090ffffbfe0f3f8abd9e974add14575b4`,`a50026d73027f46d43fdae61fee090e0f3f8abd9e974add14575b4313695`,`a50026d73027f46d43fdae61fee090ffffbfe0f3f8abd9e974add14575b4313695`].map(dX),IX=SX(FX),LX=[,,,`fc8d59ffffbf91cf60`,`d7191cfdae61a6d96a1a9641`,`d7191cfdae61ffffbfa6d96a1a9641`,`d73027fc8d59fee08bd9ef8b91cf601a9850`,`d73027fc8d59fee08bffffbfd9ef8b91cf601a9850`,`d73027f46d43fdae61fee08bd9ef8ba6d96a66bd631a9850`,`d73027f46d43fdae61fee08bffffbfd9ef8ba6d96a66bd631a9850`,`a50026d73027f46d43fdae61fee08bd9ef8ba6d96a66bd631a9850006837`,`a50026d73027f46d43fdae61fee08bffffbfd9ef8ba6d96a66bd631a9850006837`].map(dX),RX=SX(LX),zX=[,,,`fc8d59ffffbf99d594`,`d7191cfdae61abdda42b83ba`,`d7191cfdae61ffffbfabdda42b83ba`,`d53e4ffc8d59fee08be6f59899d5943288bd`,`d53e4ffc8d59fee08bffffbfe6f59899d5943288bd`,`d53e4ff46d43fdae61fee08be6f598abdda466c2a53288bd`,`d53e4ff46d43fdae61fee08bffffbfe6f598abdda466c2a53288bd`,`9e0142d53e4ff46d43fdae61fee08be6f598abdda466c2a53288bd5e4fa2`,`9e0142d53e4ff46d43fdae61fee08bffffbfe6f598abdda466c2a53288bd5e4fa2`].map(dX),BX=SX(zX),VX=[,,,`e5f5f999d8c92ca25f`,`edf8fbb2e2e266c2a4238b45`,`edf8fbb2e2e266c2a42ca25f006d2c`,`edf8fbccece699d8c966c2a42ca25f006d2c`,`edf8fbccece699d8c966c2a441ae76238b45005824`,`f7fcfde5f5f9ccece699d8c966c2a441ae76238b45005824`,`f7fcfde5f5f9ccece699d8c966c2a441ae76238b45006d2c00441b`].map(dX),HX=SX(VX),UX=[,,,`e0ecf49ebcda8856a7`,`edf8fbb3cde38c96c688419d`,`edf8fbb3cde38c96c68856a7810f7c`,`edf8fbbfd3e69ebcda8c96c68856a7810f7c`,`edf8fbbfd3e69ebcda8c96c68c6bb188419d6e016b`,`f7fcfde0ecf4bfd3e69ebcda8c96c68c6bb188419d6e016b`,`f7fcfde0ecf4bfd3e69ebcda8c96c68c6bb188419d810f7c4d004b`].map(dX),WX=SX(UX),GX=[,,,`e0f3dba8ddb543a2ca`,`f0f9e8bae4bc7bccc42b8cbe`,`f0f9e8bae4bc7bccc443a2ca0868ac`,`f0f9e8ccebc5a8ddb57bccc443a2ca0868ac`,`f0f9e8ccebc5a8ddb57bccc44eb3d32b8cbe08589e`,`f7fcf0e0f3dbccebc5a8ddb57bccc44eb3d32b8cbe08589e`,`f7fcf0e0f3dbccebc5a8ddb57bccc44eb3d32b8cbe0868ac084081`].map(dX),KX=SX(GX),qX=[,,,`fee8c8fdbb84e34a33`,`fef0d9fdcc8afc8d59d7301f`,`fef0d9fdcc8afc8d59e34a33b30000`,`fef0d9fdd49efdbb84fc8d59e34a33b30000`,`fef0d9fdd49efdbb84fc8d59ef6548d7301f990000`,`fff7ecfee8c8fdd49efdbb84fc8d59ef6548d7301f990000`,`fff7ecfee8c8fdd49efdbb84fc8d59ef6548d7301fb300007f0000`].map(dX),JX=SX(qX),YX=[,,,`ece2f0a6bddb1c9099`,`f6eff7bdc9e167a9cf02818a`,`f6eff7bdc9e167a9cf1c9099016c59`,`f6eff7d0d1e6a6bddb67a9cf1c9099016c59`,`f6eff7d0d1e6a6bddb67a9cf3690c002818a016450`,`fff7fbece2f0d0d1e6a6bddb67a9cf3690c002818a016450`,`fff7fbece2f0d0d1e6a6bddb67a9cf3690c002818a016c59014636`].map(dX),XX=SX(YX),ZX=[,,,`ece7f2a6bddb2b8cbe`,`f1eef6bdc9e174a9cf0570b0`,`f1eef6bdc9e174a9cf2b8cbe045a8d`,`f1eef6d0d1e6a6bddb74a9cf2b8cbe045a8d`,`f1eef6d0d1e6a6bddb74a9cf3690c00570b0034e7b`,`fff7fbece7f2d0d1e6a6bddb74a9cf3690c00570b0034e7b`,`fff7fbece7f2d0d1e6a6bddb74a9cf3690c00570b0045a8d023858`].map(dX),QX=SX(ZX),$X=[,,,`e7e1efc994c7dd1c77`,`f1eef6d7b5d8df65b0ce1256`,`f1eef6d7b5d8df65b0dd1c77980043`,`f1eef6d4b9dac994c7df65b0dd1c77980043`,`f1eef6d4b9dac994c7df65b0e7298ace125691003f`,`f7f4f9e7e1efd4b9dac994c7df65b0e7298ace125691003f`,`f7f4f9e7e1efd4b9dac994c7df65b0e7298ace125698004367001f`].map(dX),eZ=SX($X),tZ=[,,,`fde0ddfa9fb5c51b8a`,`feebe2fbb4b9f768a1ae017e`,`feebe2fbb4b9f768a1c51b8a7a0177`,`feebe2fcc5c0fa9fb5f768a1c51b8a7a0177`,`feebe2fcc5c0fa9fb5f768a1dd3497ae017e7a0177`,`fff7f3fde0ddfcc5c0fa9fb5f768a1dd3497ae017e7a0177`,`fff7f3fde0ddfcc5c0fa9fb5f768a1dd3497ae017e7a017749006a`].map(dX),nZ=SX(tZ),rZ=[,,,`edf8b17fcdbb2c7fb8`,`ffffcca1dab441b6c4225ea8`,`ffffcca1dab441b6c42c7fb8253494`,`ffffccc7e9b47fcdbb41b6c42c7fb8253494`,`ffffccc7e9b47fcdbb41b6c41d91c0225ea80c2c84`,`ffffd9edf8b1c7e9b47fcdbb41b6c41d91c0225ea80c2c84`,`ffffd9edf8b1c7e9b47fcdbb41b6c41d91c0225ea8253494081d58`].map(dX),iZ=SX(rZ),aZ=[,,,`f7fcb9addd8e31a354`,`ffffccc2e69978c679238443`,`ffffccc2e69978c67931a354006837`,`ffffccd9f0a3addd8e78c67931a354006837`,`ffffccd9f0a3addd8e78c67941ab5d238443005a32`,`ffffe5f7fcb9d9f0a3addd8e78c67941ab5d238443005a32`,`ffffe5f7fcb9d9f0a3addd8e78c67941ab5d238443006837004529`].map(dX),oZ=SX(aZ),sZ=[,,,`fff7bcfec44fd95f0e`,`ffffd4fed98efe9929cc4c02`,`ffffd4fed98efe9929d95f0e993404`,`ffffd4fee391fec44ffe9929d95f0e993404`,`ffffd4fee391fec44ffe9929ec7014cc4c028c2d04`,`ffffe5fff7bcfee391fec44ffe9929ec7014cc4c028c2d04`,`ffffe5fff7bcfee391fec44ffe9929ec7014cc4c02993404662506`].map(dX),cZ=SX(sZ),lZ=[,,,`ffeda0feb24cf03b20`,`ffffb2fecc5cfd8d3ce31a1c`,`ffffb2fecc5cfd8d3cf03b20bd0026`,`ffffb2fed976feb24cfd8d3cf03b20bd0026`,`ffffb2fed976feb24cfd8d3cfc4e2ae31a1cb10026`,`ffffccffeda0fed976feb24cfd8d3cfc4e2ae31a1cb10026`,`ffffccffeda0fed976feb24cfd8d3cfc4e2ae31a1cbd0026800026`].map(dX),uZ=SX(lZ),dZ=[,,,`deebf79ecae13182bd`,`eff3ffbdd7e76baed62171b5`,`eff3ffbdd7e76baed63182bd08519c`,`eff3ffc6dbef9ecae16baed63182bd08519c`,`eff3ffc6dbef9ecae16baed64292c62171b5084594`,`f7fbffdeebf7c6dbef9ecae16baed64292c62171b5084594`,`f7fbffdeebf7c6dbef9ecae16baed64292c62171b508519c08306b`].map(dX),fZ=SX(dZ),pZ=[,,,`e5f5e0a1d99b31a354`,`edf8e9bae4b374c476238b45`,`edf8e9bae4b374c47631a354006d2c`,`edf8e9c7e9c0a1d99b74c47631a354006d2c`,`edf8e9c7e9c0a1d99b74c47641ab5d238b45005a32`,`f7fcf5e5f5e0c7e9c0a1d99b74c47641ab5d238b45005a32`,`f7fcf5e5f5e0c7e9c0a1d99b74c47641ab5d238b45006d2c00441b`].map(dX),mZ=SX(pZ),hZ=[,,,`f0f0f0bdbdbd636363`,`f7f7f7cccccc969696525252`,`f7f7f7cccccc969696636363252525`,`f7f7f7d9d9d9bdbdbd969696636363252525`,`f7f7f7d9d9d9bdbdbd969696737373525252252525`,`fffffff0f0f0d9d9d9bdbdbd969696737373525252252525`,`fffffff0f0f0d9d9d9bdbdbd969696737373525252252525000000`].map(dX),gZ=SX(hZ),_Z=[,,,`efedf5bcbddc756bb1`,`f2f0f7cbc9e29e9ac86a51a3`,`f2f0f7cbc9e29e9ac8756bb154278f`,`f2f0f7dadaebbcbddc9e9ac8756bb154278f`,`f2f0f7dadaebbcbddc9e9ac8807dba6a51a34a1486`,`fcfbfdefedf5dadaebbcbddc9e9ac8807dba6a51a34a1486`,`fcfbfdefedf5dadaebbcbddc9e9ac8807dba6a51a354278f3f007d`].map(dX),vZ=SX(_Z),yZ=[,,,`fee0d2fc9272de2d26`,`fee5d9fcae91fb6a4acb181d`,`fee5d9fcae91fb6a4ade2d26a50f15`,`fee5d9fcbba1fc9272fb6a4ade2d26a50f15`,`fee5d9fcbba1fc9272fb6a4aef3b2ccb181d99000d`,`fff5f0fee0d2fcbba1fc9272fb6a4aef3b2ccb181d99000d`,`fff5f0fee0d2fcbba1fc9272fb6a4aef3b2ccb181da50f1567000d`].map(dX),bZ=SX(yZ),xZ=[,,,`fee6cefdae6be6550d`,`feeddefdbe85fd8d3cd94701`,`feeddefdbe85fd8d3ce6550da63603`,`feeddefdd0a2fdae6bfd8d3ce6550da63603`,`feeddefdd0a2fdae6bfd8d3cf16913d948018c2d04`,`fff5ebfee6cefdd0a2fdae6bfd8d3cf16913d948018c2d04`,`fff5ebfee6cefdd0a2fdae6bfd8d3cf16913d94801a636037f2704`].map(dX),SZ=SX(xZ);function CZ(e){return e=Math.max(0,Math.min(1,e)),`rgb(`+Math.max(0,Math.min(255,Math.round(-4.54-e*(35.34-e*(2381.73-e*(6402.7-e*(7024.72-e*2710.57)))))))+`, `+Math.max(0,Math.min(255,Math.round(32.49+e*(170.73+e*(52.82-e*(131.46-e*(176.58-e*67.37)))))))+`, `+Math.max(0,Math.min(255,Math.round(81.24+e*(442.36-e*(2482.43-e*(6167.24-e*(6614.94-e*2475.67)))))))+`)`}var wZ=kW(qU(300,.5,0),qU(-240,.5,1)),TZ=kW(qU(-100,.75,.35),qU(80,1.5,.8)),EZ=kW(qU(260,.75,.35),qU(80,1.5,.8)),DZ=qU();function OZ(e){(e<0||e>1)&&(e-=Math.floor(e));var t=Math.abs(e-.5);return DZ.h=360*e-100,DZ.s=1.5-1.5*t,DZ.l=.8-.9*t,DZ+``}var kZ=xU(),AZ=Math.PI/3,jZ=Math.PI*2/3;function MZ(e){var t;return e=(.5-e)*Math.PI,kZ.r=255*(t=Math.sin(e))*t,kZ.g=255*(t=Math.sin(e+AZ))*t,kZ.b=255*(t=Math.sin(e+jZ))*t,kZ+``}function NZ(e){return e=Math.max(0,Math.min(1,e)),`rgb(`+Math.max(0,Math.min(255,Math.round(34.61+e*(1172.33-e*(10793.56-e*(33300.12-e*(38394.49-e*14825.05)))))))+`, `+Math.max(0,Math.min(255,Math.round(23.31+e*(557.33+e*(1225.33-e*(3574.96-e*(1073.77+e*707.56)))))))+`, `+Math.max(0,Math.min(255,Math.round(27.2+e*(3211.1-e*(15327.97-e*(27814-e*(22569.18-e*6838.66)))))))+`)`}function PZ(e){var t=e.length;return function(n){return e[Math.max(0,Math.min(t-1,Math.floor(n*t)))]}}var FZ=PZ(dX(`44015444025645045745055946075a46085c460a5d460b5e470d60470e6147106347116447136548146748166848176948186a481a6c481b6d481c6e481d6f481f70482071482173482374482475482576482677482878482979472a7a472c7a472d7b472e7c472f7d46307e46327e46337f463480453581453781453882443983443a83443b84433d84433e85423f854240864241864142874144874045884046883f47883f48893e49893e4a893e4c8a3d4d8a3d4e8a3c4f8a3c508b3b518b3b528b3a538b3a548c39558c39568c38588c38598c375a8c375b8d365c8d365d8d355e8d355f8d34608d34618d33628d33638d32648e32658e31668e31678e31688e30698e306a8e2f6b8e2f6c8e2e6d8e2e6e8e2e6f8e2d708e2d718e2c718e2c728e2c738e2b748e2b758e2a768e2a778e2a788e29798e297a8e297b8e287c8e287d8e277e8e277f8e27808e26818e26828e26828e25838e25848e25858e24868e24878e23888e23898e238a8d228b8d228c8d228d8d218e8d218f8d21908d21918c20928c20928c20938c1f948c1f958b1f968b1f978b1f988b1f998a1f9a8a1e9b8a1e9c891e9d891f9e891f9f881fa0881fa1881fa1871fa28720a38620a48621a58521a68522a78522a88423a98324aa8325ab8225ac8226ad8127ad8128ae8029af7f2ab07f2cb17e2db27d2eb37c2fb47c31b57b32b67a34b67935b77937b87838b9773aba763bbb753dbc743fbc7340bd7242be7144bf7046c06f48c16e4ac16d4cc26c4ec36b50c46a52c56954c56856c66758c7655ac8645cc8635ec96260ca6063cb5f65cb5e67cc5c69cd5b6ccd5a6ece5870cf5773d05675d05477d1537ad1517cd2507fd34e81d34d84d44b86d54989d5488bd6468ed64590d74393d74195d84098d83e9bd93c9dd93ba0da39a2da37a5db36a8db34aadc32addc30b0dd2fb2dd2db5de2bb8de29bade28bddf26c0df25c2df23c5e021c8e020cae11fcde11dd0e11cd2e21bd5e21ad8e219dae319dde318dfe318e2e418e5e419e7e419eae51aece51befe51cf1e51df4e61ef6e620f8e621fbe723fde725`)),IZ=PZ(dX(`00000401000501010601010802010902020b02020d03030f03031204041405041606051806051a07061c08071e0907200a08220b09240c09260d0a290e0b2b100b2d110c2f120d31130d34140e36150e38160f3b180f3d19103f1a10421c10441d11471e114920114b21114e22115024125325125527125829115a2a115c2c115f2d11612f116331116533106734106936106b38106c390f6e3b0f703d0f713f0f72400f74420f75440f764510774710784910784a10794c117a4e117b4f127b51127c52137c54137d56147d57157e59157e5a167e5c167f5d177f5f187f601880621980641a80651a80671b80681c816a1c816b1d816d1d816e1e81701f81721f817320817521817621817822817922827b23827c23827e24828025828125818326818426818627818827818928818b29818c29818e2a81902a81912b81932b80942c80962c80982d80992d809b2e7f9c2e7f9e2f7fa02f7fa1307ea3307ea5317ea6317da8327daa337dab337cad347cae347bb0357bb2357bb3367ab5367ab73779b83779ba3878bc3978bd3977bf3a77c03a76c23b75c43c75c53c74c73d73c83e73ca3e72cc3f71cd4071cf4070d0416fd2426fd3436ed5446dd6456cd8456cd9466bdb476adc4869de4968df4a68e04c67e24d66e34e65e44f64e55064e75263e85362e95462ea5661eb5760ec5860ed5a5fee5b5eef5d5ef05f5ef1605df2625df2645cf3655cf4675cf4695cf56b5cf66c5cf66e5cf7705cf7725cf8745cf8765cf9785df9795df97b5dfa7d5efa7f5efa815ffb835ffb8560fb8761fc8961fc8a62fc8c63fc8e64fc9065fd9266fd9467fd9668fd9869fd9a6afd9b6bfe9d6cfe9f6dfea16efea36ffea571fea772fea973feaa74feac76feae77feb078feb27afeb47bfeb67cfeb77efeb97ffebb81febd82febf84fec185fec287fec488fec68afec88cfeca8dfecc8ffecd90fecf92fed194fed395fed597fed799fed89afdda9cfddc9efddea0fde0a1fde2a3fde3a5fde5a7fde7a9fde9aafdebacfcecaefceeb0fcf0b2fcf2b4fcf4b6fcf6b8fcf7b9fcf9bbfcfbbdfcfdbf`)),LZ=PZ(dX(`00000401000501010601010802010a02020c02020e03021004031204031405041706041907051b08051d09061f0a07220b07240c08260d08290e092b10092d110a30120a32140b34150b37160b39180c3c190c3e1b0c411c0c431e0c451f0c48210c4a230c4c240c4f260c51280b53290b552b0b572d0b592f0a5b310a5c320a5e340a5f3609613809623909633b09643d09653e0966400a67420a68440a68450a69470b6a490b6a4a0c6b4c0c6b4d0d6c4f0d6c510e6c520e6d540f6d550f6d57106e59106e5a116e5c126e5d126e5f136e61136e62146e64156e65156e67166e69166e6a176e6c186e6d186e6f196e71196e721a6e741a6e751b6e771c6d781c6d7a1d6d7c1d6d7d1e6d7f1e6c801f6c82206c84206b85216b87216b88226a8a226a8c23698d23698f24699025689225689326679526679727669827669a28659b29649d29649f2a63a02a63a22b62a32c61a52c60a62d60a82e5fa92e5eab2f5ead305dae305cb0315bb1325ab3325ab43359b63458b73557b93556ba3655bc3754bd3853bf3952c03a51c13a50c33b4fc43c4ec63d4dc73e4cc83f4bca404acb4149cc4248ce4347cf4446d04545d24644d34743d44842d54a41d74b3fd84c3ed94d3dda4e3cdb503bdd513ade5238df5337e05536e15635e25734e35933e45a31e55c30e65d2fe75e2ee8602de9612bea632aeb6429eb6628ec6726ed6925ee6a24ef6c23ef6e21f06f20f1711ff1731df2741cf3761bf37819f47918f57b17f57d15f67e14f68013f78212f78410f8850ff8870ef8890cf98b0bf98c0af98e09fa9008fa9207fa9407fb9606fb9706fb9906fb9b06fb9d07fc9f07fca108fca309fca50afca60cfca80dfcaa0ffcac11fcae12fcb014fcb216fcb418fbb61afbb81dfbba1ffbbc21fbbe23fac026fac228fac42afac62df9c72ff9c932f9cb35f8cd37f8cf3af7d13df7d340f6d543f6d746f5d949f5db4cf4dd4ff4df53f4e156f3e35af3e55df2e661f2e865f2ea69f1ec6df1ed71f1ef75f1f179f2f27df2f482f3f586f3f68af4f88ef5f992f6fa96f8fb9af9fc9dfafda1fcffa4`)),RZ=PZ(dX(`0d088710078813078916078a19068c1b068d1d068e20068f2206902406912605912805922a05932c05942e05952f059631059733059735049837049938049a3a049a3c049b3e049c3f049c41049d43039e44039e46039f48039f4903a04b03a14c02a14e02a25002a25102a35302a35502a45601a45801a45901a55b01a55c01a65e01a66001a66100a76300a76400a76600a76700a86900a86a00a86c00a86e00a86f00a87100a87201a87401a87501a87701a87801a87a02a87b02a87d03a87e03a88004a88104a78305a78405a78606a68707a68808a68a09a58b0aa58d0ba58e0ca48f0da4910ea3920fa39410a29511a19613a19814a099159f9a169f9c179e9d189d9e199da01a9ca11b9ba21d9aa31e9aa51f99a62098a72197a82296aa2395ab2494ac2694ad2793ae2892b02991b12a90b22b8fb32c8eb42e8db52f8cb6308bb7318ab83289ba3388bb3488bc3587bd3786be3885bf3984c03a83c13b82c23c81c33d80c43e7fc5407ec6417dc7427cc8437bc9447aca457acb4679cc4778cc4977cd4a76ce4b75cf4c74d04d73d14e72d24f71d35171d45270d5536fd5546ed6556dd7566cd8576bd9586ada5a6ada5b69db5c68dc5d67dd5e66de5f65de6164df6263e06363e16462e26561e26660e3685fe4695ee56a5de56b5de66c5ce76e5be76f5ae87059e97158e97257ea7457eb7556eb7655ec7754ed7953ed7a52ee7b51ef7c51ef7e50f07f4ff0804ef1814df1834cf2844bf3854bf3874af48849f48948f58b47f58c46f68d45f68f44f79044f79143f79342f89441f89540f9973ff9983ef99a3efa9b3dfa9c3cfa9e3bfb9f3afba139fba238fca338fca537fca636fca835fca934fdab33fdac33fdae32fdaf31fdb130fdb22ffdb42ffdb52efeb72dfeb82cfeba2cfebb2bfebd2afebe2afec029fdc229fdc328fdc527fdc627fdc827fdca26fdcb26fccd25fcce25fcd025fcd225fbd324fbd524fbd724fad824fada24f9dc24f9dd25f8df25f8e125f7e225f7e425f6e626f6e826f5e926f5eb27f4ed27f3ee27f3f027f2f227f1f426f1f525f0f724f0f921`)),zZ=o(((e,t)=>{function n(e){var t=e==null?0:e.length;return t?e[t-1]:void 0}t.exports=n}));function BZ(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString(`en`).replace(/,/g,``):e.toString(10)}function VZ(e,t){if((n=(e=t?e.toExponential(t-1):e.toExponential()).indexOf(`e`))<0)return null;var n,r=e.slice(0,n);return[r.length>1?r[0]+r.slice(2):r,+e.slice(n+1)]}function HZ(e){return e=VZ(Math.abs(e)),e?e[1]:NaN}function UZ(e,t){return function(n,r){for(var i=n.length,a=[],o=0,s=e[0],c=0;i>0&&s>0&&(c+s+1>r&&(s=Math.max(1,r-c)),a.push(n.substring(i-=s,i+s)),!((c+=s+1)>r));)s=e[o=(o+1)%e.length];return a.reverse().join(t)}}function WZ(e){return function(t){return t.replace(/[0-9]/g,function(t){return e[+t]})}}var GZ=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function KZ(e){if(!(t=GZ.exec(e)))throw Error(`invalid format: `+e);var t;return new qZ({fill:t[1],align:t[2],sign:t[3],symbol:t[4],zero:t[5],width:t[6],comma:t[7],precision:t[8]&&t[8].slice(1),trim:t[9],type:t[10]})}KZ.prototype=qZ.prototype;function qZ(e){this.fill=e.fill===void 0?` `:e.fill+``,this.align=e.align===void 0?`>`:e.align+``,this.sign=e.sign===void 0?`-`:e.sign+``,this.symbol=e.symbol===void 0?``:e.symbol+``,this.zero=!!e.zero,this.width=e.width===void 0?void 0:+e.width,this.comma=!!e.comma,this.precision=e.precision===void 0?void 0:+e.precision,this.trim=!!e.trim,this.type=e.type===void 0?``:e.type+``}qZ.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?`0`:``)+(this.width===void 0?``:Math.max(1,this.width|0))+(this.comma?`,`:``)+(this.precision===void 0?``:`.`+Math.max(0,this.precision|0))+(this.trim?`~`:``)+this.type};function JZ(e){out:for(var t=e.length,n=1,r=-1,i;n<t;++n)switch(e[n]){case`.`:r=i=n;break;case`0`:r===0&&(r=n),i=n;break;default:if(!+e[n])break out;r>0&&(r=0)}return r>0?e.slice(0,r)+e.slice(i+1):e}var YZ;function XZ(e,t){var n=VZ(e,t);if(!n)return e+``;var r=n[0],i=n[1],a=i-(YZ=Math.max(-8,Math.min(8,Math.floor(i/3)))*3)+1,o=r.length;return a===o?r:a>o?r+Array(a-o+1).join(`0`):a>0?r.slice(0,a)+`.`+r.slice(a):`0.`+Array(1-a).join(`0`)+VZ(e,Math.max(0,t+a-1))[0]}function ZZ(e,t){var n=VZ(e,t);if(!n)return e+``;var r=n[0],i=n[1];return i<0?`0.`+Array(-i).join(`0`)+r:r.length>i+1?r.slice(0,i+1)+`.`+r.slice(i+1):r+Array(i-r.length+2).join(`0`)}var QZ={"%":function(e,t){return(e*100).toFixed(t)},b:function(e){return Math.round(e).toString(2)},c:function(e){return e+``},d:BZ,e:function(e,t){return e.toExponential(t)},f:function(e,t){return e.toFixed(t)},g:function(e,t){return e.toPrecision(t)},o:function(e){return Math.round(e).toString(8)},p:function(e,t){return ZZ(e*100,t)},r:ZZ,s:XZ,X:function(e){return Math.round(e).toString(16).toUpperCase()},x:function(e){return Math.round(e).toString(16)}};function $Z(e){return e}var eQ=Array.prototype.map,tQ=[`y`,`z`,`a`,`f`,`p`,`n`,`µ`,`m`,``,`k`,`M`,`G`,`T`,`P`,`E`,`Z`,`Y`];function nQ(e){var t=e.grouping===void 0||e.thousands===void 0?$Z:UZ(eQ.call(e.grouping,Number),e.thousands+``),n=e.currency===void 0?``:e.currency[0]+``,r=e.currency===void 0?``:e.currency[1]+``,i=e.decimal===void 0?`.`:e.decimal+``,a=e.numerals===void 0?$Z:WZ(eQ.call(e.numerals,String)),o=e.percent===void 0?`%`:e.percent+``,s=e.minus===void 0?`-`:e.minus+``,c=e.nan===void 0?`NaN`:e.nan+``;function l(e){e=KZ(e);var l=e.fill,u=e.align,d=e.sign,f=e.symbol,p=e.zero,m=e.width,h=e.comma,g=e.precision,_=e.trim,v=e.type;v===`n`?(h=!0,v=`g`):QZ[v]||(g===void 0&&(g=12),_=!0,v=`g`),(p||l===`0`&&u===`=`)&&(p=!0,l=`0`,u=`=`);var y=f===`$`?n:f===`#`&&/[boxX]/.test(v)?`0`+v.toLowerCase():``,b=f===`$`?r:/[%p]/.test(v)?o:``,x=QZ[v],S=/[defgprs%]/.test(v);g=g===void 0?6:/[gprs]/.test(v)?Math.max(1,Math.min(21,g)):Math.max(0,Math.min(20,g));function C(e){var n=y,r=b,o,f,C;if(v===`c`)r=x(e)+r,e=``;else{e=+e;var w=e<0||1/e<0;if(e=isNaN(e)?c:x(Math.abs(e),g),_&&(e=JZ(e)),w&&+e==0&&d!==`+`&&(w=!1),n=(w?d===`(`?d:s:d===`-`||d===`(`?``:d)+n,r=(v===`s`?tQ[8+YZ/3]:``)+r+(w&&d===`(`?`)`:``),S){for(o=-1,f=e.length;++o<f;)if(C=e.charCodeAt(o),48>C||C>57){r=(C===46?i+e.slice(o+1):e.slice(o))+r,e=e.slice(0,o);break}}}h&&!p&&(e=t(e,1/0));var T=n.length+e.length+r.length,E=T<m?Array(m-T+1).join(l):``;switch(h&&p&&(e=t(E+e,E.length?m-r.length:1/0),E=``),u){case`<`:e=n+e+r+E;break;case`=`:e=n+E+e+r;break;case`^`:e=E.slice(0,T=E.length>>1)+n+e+r+E.slice(T);break;default:e=E+n+e+r}return a(e)}return C.toString=function(){return e+``},C}function u(e,t){var n=l((e=KZ(e),e.type=`f`,e)),r=Math.max(-8,Math.min(8,Math.floor(HZ(t)/3)))*3,i=10**-r,a=tQ[8+r/3];return function(e){return n(i*e)+a}}return{format:l,formatPrefix:u}}var rQ,iQ;aQ({decimal:`.`,thousands:`,`,grouping:[3],currency:[`$`,``],minus:`-`});function aQ(e){return rQ=nQ(e),iQ=rQ.format,rQ.formatPrefix,rQ}var oQ=new Date,sQ=new Date;function cQ(e,t,n,r){function i(t){return e(t=arguments.length===0?new Date:new Date(+t)),t}return i.floor=function(t){return e(t=new Date(+t)),t},i.ceil=function(n){return e(n=new Date(n-1)),t(n,1),e(n),n},i.round=function(e){var t=i(e),n=i.ceil(e);return e-t<n-e?t:n},i.offset=function(e,n){return t(e=new Date(+e),n==null?1:Math.floor(n)),e},i.range=function(n,r,a){var o=[],s;if(n=i.ceil(n),a=a==null?1:Math.floor(a),!(n<r)||!(a>0))return o;do o.push(s=new Date(+n)),t(n,a),e(n);while(s<n&&n<r);return o},i.filter=function(n){return cQ(function(t){if(t>=t)for(;e(t),!n(t);)t.setTime(t-1)},function(e,r){if(e>=e)if(r<0)for(;++r<=0;)for(;t(e,-1),!n(e););else for(;--r>=0;)for(;t(e,1),!n(e););})},n&&(i.count=function(t,r){return oQ.setTime(+t),sQ.setTime(+r),e(oQ),e(sQ),Math.floor(n(oQ,sQ))},i.every=function(e){return e=Math.floor(e),!isFinite(e)||!(e>0)?null:e>1?i.filter(r?function(t){return r(t)%e===0}:function(t){return i.count(0,t)%e===0}):i}),i}var lQ=6e4,uQ=lQ*60*24,dQ=uQ*7;uQ*30,uQ*365;var fQ=cQ(e=>e.setHours(0,0,0,0),(e,t)=>e.setDate(e.getDate()+t),(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*lQ)/uQ,e=>e.getDate()-1);fQ.range;function pQ(e){return cQ(function(t){t.setDate(t.getDate()-(t.getDay()+7-e)%7),t.setHours(0,0,0,0)},function(e,t){e.setDate(e.getDate()+t*7)},function(e,t){return(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*lQ)/dQ})}var mQ=pQ(0),hQ=pQ(1),gQ=pQ(2),_Q=pQ(3),vQ=pQ(4),yQ=pQ(5),bQ=pQ(6);mQ.range,hQ.range,gQ.range,_Q.range,vQ.range,yQ.range,bQ.range;var xQ=cQ(function(e){e.setMonth(0,1),e.setHours(0,0,0,0)},function(e,t){e.setFullYear(e.getFullYear()+t)},function(e,t){return t.getFullYear()-e.getFullYear()},function(e){return e.getFullYear()});xQ.every=function(e){return!isFinite(e=Math.floor(e))||!(e>0)?null:cQ(function(t){t.setFullYear(Math.floor(t.getFullYear()/e)*e),t.setMonth(0,1),t.setHours(0,0,0,0)},function(t,n){t.setFullYear(t.getFullYear()+n*e)})},xQ.range;var SQ=cQ(function(e){e.setUTCHours(0,0,0,0)},function(e,t){e.setUTCDate(e.getUTCDate()+t)},function(e,t){return(t-e)/uQ},function(e){return e.getUTCDate()-1});SQ.range;function CQ(e){return cQ(function(t){t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7),t.setUTCHours(0,0,0,0)},function(e,t){e.setUTCDate(e.getUTCDate()+t*7)},function(e,t){return(t-e)/dQ})}var wQ=CQ(0),TQ=CQ(1),EQ=CQ(2),DQ=CQ(3),OQ=CQ(4),kQ=CQ(5),AQ=CQ(6);wQ.range,TQ.range,EQ.range,DQ.range,OQ.range,kQ.range,AQ.range;var jQ=cQ(function(e){e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},function(e,t){e.setUTCFullYear(e.getUTCFullYear()+t)},function(e,t){return t.getUTCFullYear()-e.getUTCFullYear()},function(e){return e.getUTCFullYear()});jQ.every=function(e){return!isFinite(e=Math.floor(e))||!(e>0)?null:cQ(function(t){t.setUTCFullYear(Math.floor(t.getUTCFullYear()/e)*e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},function(t,n){t.setUTCFullYear(t.getUTCFullYear()+n*e)})},jQ.range;function MQ(e){if(0<=e.y&&e.y<100){var t=new Date(-1,e.m,e.d,e.H,e.M,e.S,e.L);return t.setFullYear(e.y),t}return new Date(e.y,e.m,e.d,e.H,e.M,e.S,e.L)}function NQ(e){if(0<=e.y&&e.y<100){var t=new Date(Date.UTC(-1,e.m,e.d,e.H,e.M,e.S,e.L));return t.setUTCFullYear(e.y),t}return new Date(Date.UTC(e.y,e.m,e.d,e.H,e.M,e.S,e.L))}function PQ(e,t,n){return{y:e,m:t,d:n,H:0,M:0,S:0,L:0}}function FQ(e){var t=e.dateTime,n=e.date,r=e.time,i=e.periods,a=e.days,o=e.shortDays,s=e.months,c=e.shortMonths,l=HQ(i),u=UQ(i),d=HQ(a),f=UQ(a),p=HQ(o),m=UQ(o),h=HQ(s),g=UQ(s),_=HQ(c),v=UQ(c),y={a:N,A:P,b:F,B:I,c:null,d:u$,e:u$,f:h$,g:E$,G:O$,H:d$,I:f$,j:p$,L:m$,m:g$,M:_$,p:L,q:R,Q:Z$,s:Q$,S:v$,u:y$,U:b$,V:S$,w:C$,W:w$,x:null,X:null,y:T$,Y:D$,Z:k$,"%":X$},b={a:z,A:B,b:V,B:H,c:null,d:A$,e:A$,f:F$,g:K$,G:J$,H:j$,I:M$,j:N$,L:P$,m:I$,M:L$,p:ee,q:te,Q:Z$,s:Q$,S:R$,u:z$,U:B$,V:H$,w:U$,W:W$,x:null,X:null,y:G$,Y:q$,Z:Y$,"%":X$},x={a:E,A:D,b:O,B:k,c:A,d:e$,e:e$,f:o$,g:XQ,G:YQ,H:n$,I:n$,j:t$,L:a$,m:$Q,M:r$,p:T,q:QQ,Q:c$,s:l$,S:i$,u:GQ,U:KQ,V:qQ,w:WQ,W:JQ,x:j,X:M,y:XQ,Y:YQ,Z:ZQ,"%":s$};y.x=S(n,y),y.X=S(r,y),y.c=S(t,y),b.x=S(n,b),b.X=S(r,b),b.c=S(t,b);function S(e,t){return function(n){var r=[],i=-1,a=0,o=e.length,s,c,l;for(n instanceof Date||(n=new Date(+n));++i<o;)e.charCodeAt(i)===37&&(r.push(e.slice(a,i)),(c=IQ[s=e.charAt(++i)])==null?c=s===`e`?` `:`0`:s=e.charAt(++i),(l=t[s])&&(s=l(n,c)),r.push(s),a=i+1);return r.push(e.slice(a,i)),r.join(``)}}function C(e,t){return function(n){var r=PQ(1900,void 0,1),i=w(r,e,n+=``,0),a,o;if(i!=n.length)return null;if(`Q`in r)return new Date(r.Q);if(`s`in r)return new Date(r.s*1e3+(`L`in r?r.L:0));if(t&&!(`Z`in r)&&(r.Z=0),`p`in r&&(r.H=r.H%12+r.p*12),r.m===void 0&&(r.m=`q`in r?r.q:0),`V`in r){if(r.V<1||r.V>53)return null;`w`in r||(r.w=1),`Z`in r?(a=NQ(PQ(r.y,0,1)),o=a.getUTCDay(),a=o>4||o===0?TQ.ceil(a):TQ(a),a=SQ.offset(a,(r.V-1)*7),r.y=a.getUTCFullYear(),r.m=a.getUTCMonth(),r.d=a.getUTCDate()+(r.w+6)%7):(a=MQ(PQ(r.y,0,1)),o=a.getDay(),a=o>4||o===0?hQ.ceil(a):hQ(a),a=fQ.offset(a,(r.V-1)*7),r.y=a.getFullYear(),r.m=a.getMonth(),r.d=a.getDate()+(r.w+6)%7)}else(`W`in r||`U`in r)&&(`w`in r||(r.w=`u`in r?r.u%7:+(`W`in r)),o=`Z`in r?NQ(PQ(r.y,0,1)).getUTCDay():MQ(PQ(r.y,0,1)).getDay(),r.m=0,r.d=`W`in r?(r.w+6)%7+r.W*7-(o+5)%7:r.w+r.U*7-(o+6)%7);return`Z`in r?(r.H+=r.Z/100|0,r.M+=r.Z%100,NQ(r)):MQ(r)}}function w(e,t,n,r){for(var i=0,a=t.length,o=n.length,s,c;i<a;){if(r>=o)return-1;if(s=t.charCodeAt(i++),s===37){if(s=t.charAt(i++),c=x[s in IQ?t.charAt(i++):s],!c||(r=c(e,n,r))<0)return-1}else if(s!=n.charCodeAt(r++))return-1}return r}function T(e,t,n){var r=l.exec(t.slice(n));return r?(e.p=u.get(r[0].toLowerCase()),n+r[0].length):-1}function E(e,t,n){var r=p.exec(t.slice(n));return r?(e.w=m.get(r[0].toLowerCase()),n+r[0].length):-1}function D(e,t,n){var r=d.exec(t.slice(n));return r?(e.w=f.get(r[0].toLowerCase()),n+r[0].length):-1}function O(e,t,n){var r=_.exec(t.slice(n));return r?(e.m=v.get(r[0].toLowerCase()),n+r[0].length):-1}function k(e,t,n){var r=h.exec(t.slice(n));return r?(e.m=g.get(r[0].toLowerCase()),n+r[0].length):-1}function A(e,n,r){return w(e,t,n,r)}function j(e,t,r){return w(e,n,t,r)}function M(e,t,n){return w(e,r,t,n)}function N(e){return o[e.getDay()]}function P(e){return a[e.getDay()]}function F(e){return c[e.getMonth()]}function I(e){return s[e.getMonth()]}function L(e){return i[+(e.getHours()>=12)]}function R(e){return 1+~~(e.getMonth()/3)}function z(e){return o[e.getUTCDay()]}function B(e){return a[e.getUTCDay()]}function V(e){return c[e.getUTCMonth()]}function H(e){return s[e.getUTCMonth()]}function ee(e){return i[+(e.getUTCHours()>=12)]}function te(e){return 1+~~(e.getUTCMonth()/3)}return{format:function(e){var t=S(e+=``,y);return t.toString=function(){return e},t},parse:function(e){var t=C(e+=``,!1);return t.toString=function(){return e},t},utcFormat:function(e){var t=S(e+=``,b);return t.toString=function(){return e},t},utcParse:function(e){var t=C(e+=``,!0);return t.toString=function(){return e},t}}}var IQ={"-":``,_:` `,0:`0`},LQ=/^\s*\d+/,RQ=/^%/,zQ=/[\\^$*+?|[\]().{}]/g;function BQ(e,t,n){var r=e<0?`-`:``,i=(r?-e:e)+``,a=i.length;return r+(a<n?Array(n-a+1).join(t)+i:i)}function VQ(e){return e.replace(zQ,`\\$&`)}function HQ(e){return RegExp(`^(?:`+e.map(VQ).join(`|`)+`)`,`i`)}function UQ(e){return new Map(e.map((e,t)=>[e.toLowerCase(),t]))}function WQ(e,t,n){var r=LQ.exec(t.slice(n,n+1));return r?(e.w=+r[0],n+r[0].length):-1}function GQ(e,t,n){var r=LQ.exec(t.slice(n,n+1));return r?(e.u=+r[0],n+r[0].length):-1}function KQ(e,t,n){var r=LQ.exec(t.slice(n,n+2));return r?(e.U=+r[0],n+r[0].length):-1}function qQ(e,t,n){var r=LQ.exec(t.slice(n,n+2));return r?(e.V=+r[0],n+r[0].length):-1}function JQ(e,t,n){var r=LQ.exec(t.slice(n,n+2));return r?(e.W=+r[0],n+r[0].length):-1}function YQ(e,t,n){var r=LQ.exec(t.slice(n,n+4));return r?(e.y=+r[0],n+r[0].length):-1}function XQ(e,t,n){var r=LQ.exec(t.slice(n,n+2));return r?(e.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function ZQ(e,t,n){var r=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(t.slice(n,n+6));return r?(e.Z=r[1]?0:-(r[2]+(r[3]||`00`)),n+r[0].length):-1}function QQ(e,t,n){var r=LQ.exec(t.slice(n,n+1));return r?(e.q=r[0]*3-3,n+r[0].length):-1}function $Q(e,t,n){var r=LQ.exec(t.slice(n,n+2));return r?(e.m=r[0]-1,n+r[0].length):-1}function e$(e,t,n){var r=LQ.exec(t.slice(n,n+2));return r?(e.d=+r[0],n+r[0].length):-1}function t$(e,t,n){var r=LQ.exec(t.slice(n,n+3));return r?(e.m=0,e.d=+r[0],n+r[0].length):-1}function n$(e,t,n){var r=LQ.exec(t.slice(n,n+2));return r?(e.H=+r[0],n+r[0].length):-1}function r$(e,t,n){var r=LQ.exec(t.slice(n,n+2));return r?(e.M=+r[0],n+r[0].length):-1}function i$(e,t,n){var r=LQ.exec(t.slice(n,n+2));return r?(e.S=+r[0],n+r[0].length):-1}function a$(e,t,n){var r=LQ.exec(t.slice(n,n+3));return r?(e.L=+r[0],n+r[0].length):-1}function o$(e,t,n){var r=LQ.exec(t.slice(n,n+6));return r?(e.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function s$(e,t,n){var r=RQ.exec(t.slice(n,n+1));return r?n+r[0].length:-1}function c$(e,t,n){var r=LQ.exec(t.slice(n));return r?(e.Q=+r[0],n+r[0].length):-1}function l$(e,t,n){var r=LQ.exec(t.slice(n));return r?(e.s=+r[0],n+r[0].length):-1}function u$(e,t){return BQ(e.getDate(),t,2)}function d$(e,t){return BQ(e.getHours(),t,2)}function f$(e,t){return BQ(e.getHours()%12||12,t,2)}function p$(e,t){return BQ(1+fQ.count(xQ(e),e),t,3)}function m$(e,t){return BQ(e.getMilliseconds(),t,3)}function h$(e,t){return m$(e,t)+`000`}function g$(e,t){return BQ(e.getMonth()+1,t,2)}function _$(e,t){return BQ(e.getMinutes(),t,2)}function v$(e,t){return BQ(e.getSeconds(),t,2)}function y$(e){var t=e.getDay();return t===0?7:t}function b$(e,t){return BQ(mQ.count(xQ(e)-1,e),t,2)}function x$(e){var t=e.getDay();return t>=4||t===0?vQ(e):vQ.ceil(e)}function S$(e,t){return e=x$(e),BQ(vQ.count(xQ(e),e)+(xQ(e).getDay()===4),t,2)}function C$(e){return e.getDay()}function w$(e,t){return BQ(hQ.count(xQ(e)-1,e),t,2)}function T$(e,t){return BQ(e.getFullYear()%100,t,2)}function E$(e,t){return e=x$(e),BQ(e.getFullYear()%100,t,2)}function D$(e,t){return BQ(e.getFullYear()%1e4,t,4)}function O$(e,t){var n=e.getDay();return e=n>=4||n===0?vQ(e):vQ.ceil(e),BQ(e.getFullYear()%1e4,t,4)}function k$(e){var t=e.getTimezoneOffset();return(t>0?`-`:(t*=-1,`+`))+BQ(t/60|0,`0`,2)+BQ(t%60,`0`,2)}function A$(e,t){return BQ(e.getUTCDate(),t,2)}function j$(e,t){return BQ(e.getUTCHours(),t,2)}function M$(e,t){return BQ(e.getUTCHours()%12||12,t,2)}function N$(e,t){return BQ(1+SQ.count(jQ(e),e),t,3)}function P$(e,t){return BQ(e.getUTCMilliseconds(),t,3)}function F$(e,t){return P$(e,t)+`000`}function I$(e,t){return BQ(e.getUTCMonth()+1,t,2)}function L$(e,t){return BQ(e.getUTCMinutes(),t,2)}function R$(e,t){return BQ(e.getUTCSeconds(),t,2)}function z$(e){var t=e.getUTCDay();return t===0?7:t}function B$(e,t){return BQ(wQ.count(jQ(e)-1,e),t,2)}function V$(e){var t=e.getUTCDay();return t>=4||t===0?OQ(e):OQ.ceil(e)}function H$(e,t){return e=V$(e),BQ(OQ.count(jQ(e),e)+(jQ(e).getUTCDay()===4),t,2)}function U$(e){return e.getUTCDay()}function W$(e,t){return BQ(TQ.count(jQ(e)-1,e),t,2)}function G$(e,t){return BQ(e.getUTCFullYear()%100,t,2)}function K$(e,t){return e=V$(e),BQ(e.getUTCFullYear()%100,t,2)}function q$(e,t){return BQ(e.getUTCFullYear()%1e4,t,4)}function J$(e,t){var n=e.getUTCDay();return e=n>=4||n===0?OQ(e):OQ.ceil(e),BQ(e.getUTCFullYear()%1e4,t,4)}function Y$(){return`+0000`}function X$(){return`%`}function Z$(e){return+e}function Q$(e){return Math.floor(e/1e3)}var $$,e1,t1,n1;r1({dateTime:`%x, %X`,date:`%-m/%-d/%Y`,time:`%-I:%M:%S %p`,periods:[`AM`,`PM`],days:[`Sunday`,`Monday`,`Tuesday`,`Wednesday`,`Thursday`,`Friday`,`Saturday`],shortDays:[`Sun`,`Mon`,`Tue`,`Wed`,`Thu`,`Fri`,`Sat`],months:[`January`,`February`,`March`,`April`,`May`,`June`,`July`,`August`,`September`,`October`,`November`,`December`],shortMonths:[`Jan`,`Feb`,`Mar`,`Apr`,`May`,`Jun`,`Jul`,`Aug`,`Sep`,`Oct`,`Nov`,`Dec`]});function r1(e){return $$=FQ(e),e1=$$.format,t1=$$.parse,$$.utcFormat,n1=$$.utcParse,$$}var i1=o(((e,t)=>{var n=YV(),r=ZV(),i=qV();function a(e,t,a){for(var o=-1,s=t.length,c={};++o<s;){var l=t[o],u=n(e,l);a(u,l)&&r(c,i(l,e),u)}return c}t.exports=a})),a1=o(((e,t)=>{function n(e,t){return e!=null&&t in Object(e)}t.exports=n})),o1=o(((e,t)=>{var n=qV(),r=iV(),i=aV(),a=bV(),o=oV(),s=JV();function c(e,t,c){t=n(t,e);for(var l=-1,u=t.length,d=!1;++l<u;){var f=s(t[l]);if(!(d=e!=null&&c(e,f)))break;e=e[f]}return d||++l!=u?d:(u=e==null?0:e.length,!!u&&o(u)&&a(f,u)&&(i(e)||r(e)))}t.exports=c})),s1=o(((e,t)=>{var n=a1(),r=o1();function i(e,t){return e!=null&&r(e,t,n)}t.exports=i})),c1=o(((e,t)=>{var n=i1(),r=s1();function i(e,t){return n(e,t,function(t,n){return r(e,n)})}t.exports=i})),l1=o(((e,t)=>{function n(e,t){for(var n=-1,r=t.length,i=e.length;++n<r;)e[i+n]=t[n];return e}t.exports=n})),u1=o(((e,t)=>{var n=dB(),r=iV(),i=aV(),a=n?n.isConcatSpreadable:void 0;function o(e){return i(e)||r(e)||!!(a&&e&&e[a])}t.exports=o})),d1=o(((e,t)=>{var n=l1(),r=u1();function i(e,t,a,o,s){var c=-1,l=e.length;for(a||=r,s||=[];++c<l;){var u=e[c];t>0&&a(u)?t>1?i(u,t-1,a,o,s):n(s,u):o||(s[s.length]=u)}return s}t.exports=i})),f1=o(((e,t)=>{var n=d1();function r(e){return e!=null&&e.length?n(e,1):[]}t.exports=r})),p1=o(((e,t)=>{var n=f1(),r=AV(),i=PV();function a(e){return i(r(e,void 0,n),e+``)}t.exports=a})),m1=o(((e,t)=>{var n=c1();t.exports=p1()(function(e,t){return e==null?{}:n(e,t)})})),h1=o(((e,t)=>{function n(e,t){for(var n=-1,r=e==null?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}t.exports=n})),g1=o(((e,t)=>{var n=MW(),r=h1(),i=zW(),a=1,o=2;function s(e,t,s,c,l,u){var d=s&a,f=e.length,p=t.length;if(f!=p&&!(d&&p>f))return!1;var m=u.get(e),h=u.get(t);if(m&&h)return m==t&&h==e;var g=-1,_=!0,v=s&o?new n:void 0;for(u.set(e,t),u.set(t,e);++g<f;){var y=e[g],b=t[g];if(c)var x=d?c(b,y,g,t,e,u):c(y,b,g,e,t,u);if(x!==void 0){if(x)continue;_=!1;break}if(v){if(!r(t,function(e,t){if(!i(v,t)&&(y===e||l(y,e,s,c,u)))return v.push(t)})){_=!1;break}}else if(!(y===b||l(y,b,s,c,u))){_=!1;break}}return u.delete(e),u.delete(t),_}t.exports=s})),_1=o(((e,t)=>{function n(e){var t=-1,n=Array(e.size);return e.forEach(function(e,r){n[++t]=[r,e]}),n}t.exports=n})),v1=o(((e,t)=>{function n(e){var t=-1,n=Array(e.size);return e.forEach(function(e){n[++t]=e}),n}t.exports=n})),y1=o(((e,t)=>{var n=dB(),r=qB(),i=Qz(),a=g1(),o=_1(),s=v1(),c=1,l=2,u=`[object Boolean]`,d=`[object Date]`,f=`[object Error]`,p=`[object Map]`,m=`[object Number]`,h=`[object RegExp]`,g=`[object Set]`,_=`[object String]`,v=`[object Symbol]`,y=`[object ArrayBuffer]`,b=`[object DataView]`,x=n?n.prototype:void 0,S=x?x.valueOf:void 0;function C(e,t,n,x,C,w,T){switch(n){case b:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case y:return!(e.byteLength!=t.byteLength||!w(new r(e),new r(t)));case u:case d:case m:return i(+e,+t);case f:return e.name==t.name&&e.message==t.message;case h:case _:return e==t+``;case p:var E=o;case g:var D=x&c;if(E||=s,e.size!=t.size&&!D)return!1;var O=T.get(e);if(O)return O==t;x|=l,T.set(e,t);var k=a(E(e),E(t),x,C,w,T);return T.delete(e),k;case v:if(S)return S.call(e)==S.call(t)}return!1}t.exports=C})),b1=o(((e,t)=>{var n=l1(),r=aV();function i(e,t,i){var a=t(e);return r(e)?a:n(a,i(e))}t.exports=i})),x1=o(((e,t)=>{function n(e,t){for(var n=-1,r=e==null?0:e.length,i=0,a=[];++n<r;){var o=e[n];t(o,n,e)&&(a[i++]=o)}return a}t.exports=n})),S1=o(((e,t)=>{function n(){return[]}t.exports=n})),C1=o(((e,t)=>{var n=x1(),r=S1(),i=Object.prototype.propertyIsEnumerable,a=Object.getOwnPropertySymbols;t.exports=a?function(e){return e==null?[]:(e=Object(e),n(a(e),function(t){return i.call(e,t)}))}:r})),w1=o(((e,t)=>{t.exports=QB()(Object.keys,Object)})),T1=o(((e,t)=>{var n=eV(),r=w1(),i=Object.prototype.hasOwnProperty;function a(e){if(!n(e))return r(e);var t=[];for(var a in Object(e))i.call(e,a)&&a!=`constructor`&&t.push(a);return t}t.exports=a})),E1=o(((e,t)=>{var n=xV(),r=T1(),i=sV();function a(e){return i(e)?n(e):r(e)}t.exports=a})),D1=o(((e,t)=>{var n=b1(),r=C1(),i=E1();function a(e){return n(e,i,r)}t.exports=a})),O1=o(((e,t)=>{var n=D1(),r=1,i=Object.prototype.hasOwnProperty;function a(e,t,a,o,s,c){var l=a&r,u=n(e),d=u.length;if(d!=n(t).length&&!l)return!1;for(var f=d;f--;){var p=u[f];if(!(l?p in t:i.call(t,p)))return!1}var m=c.get(e),h=c.get(t);if(m&&h)return m==t&&h==e;var g=!0;c.set(e,t),c.set(t,e);for(var _=l;++f<d;){p=u[f];var v=e[p],y=t[p];if(o)var b=l?o(y,v,p,t,e,c):o(v,y,p,e,t,c);if(!(b===void 0?v===y||s(v,y,a,o,c):b)){g=!1;break}_||=p==`constructor`}if(g&&!_){var x=e.constructor,S=t.constructor;x!=S&&`constructor`in e&&`constructor`in t&&!(typeof x==`function`&&x instanceof x&&typeof S==`function`&&S instanceof S)&&(g=!1)}return c.delete(e),c.delete(t),g}t.exports=a})),k1=o(((e,t)=>{t.exports=SB()(uB(),`DataView`)})),A1=o(((e,t)=>{t.exports=SB()(uB(),`Promise`)})),j1=o(((e,t)=>{t.exports=SB()(uB(),`Set`)})),M1=o(((e,t)=>{t.exports=SB()(uB(),`WeakMap`)})),N1=o(((e,t)=>{var n=k1(),r=CB(),i=A1(),a=j1(),o=M1(),s=mB(),c=yB(),l=`[object Map]`,u=`[object Object]`,d=`[object Promise]`,f=`[object Set]`,p=`[object WeakMap]`,m=`[object DataView]`,h=c(n),g=c(r),_=c(i),v=c(a),y=c(o),b=s;(n&&b(new n(new ArrayBuffer(1)))!=m||r&&b(new r)!=l||i&&b(i.resolve())!=d||a&&b(new a)!=f||o&&b(new o)!=p)&&(b=function(e){var t=s(e),n=t==u?e.constructor:void 0,r=n?c(n):``;if(r)switch(r){case h:return m;case g:return l;case _:return d;case v:return f;case y:return p}return t}),t.exports=b})),P1=o(((e,t)=>{var n=BB(),r=g1(),i=y1(),a=O1(),o=N1(),s=aV(),c=uV(),l=hV(),u=1,d=`[object Arguments]`,f=`[object Array]`,p=`[object Object]`,m=Object.prototype.hasOwnProperty;function h(e,t,h,g,_,v){var y=s(e),b=s(t),x=y?f:o(e),S=b?f:o(t);x=x==d?p:x,S=S==d?p:S;var C=x==p,w=S==p,T=x==S;if(T&&c(e)){if(!c(t))return!1;y=!0,C=!1}if(T&&!C)return v||=new n,y||l(e)?r(e,t,h,g,_,v):i(e,t,x,h,g,_,v);if(!(h&u)){var E=C&&m.call(e,`__wrapped__`),D=w&&m.call(t,`__wrapped__`);if(E||D){var O=E?e.value():e,k=D?t.value():t;return v||=new n,_(O,k,h,g,v)}}return T?(v||=new n,a(e,t,h,g,_,v)):!1}t.exports=h})),F1=o(((e,t)=>{var n=P1(),r=nV();function i(e,t,a,o,s){return e===t?!0:e==null||t==null||!r(e)&&!r(t)?e!==e&&t!==t:n(e,t,a,o,i,s)}t.exports=i})),I1=o(((e,t)=>{var n=F1();function r(e,t){return n(e,t)}t.exports=r})),L1=l(VW(),1),R1=l(zZ(),1);aV();var z1=l(gB(),1),B1=l(dV(),1),V1=l(m1(),1),H1=l(I1(),1),U1=(0,w.createContext)(),W1=function(e){var t=e.children,n=e.animate,r=n===void 0||n,i=e.config,a=i===void 0?`default`:i,o=(0,w.useMemo)((function(){return{animate:r,config:(0,LH.default)(a)?mR[a]:a}}),[r,a]);return(0,G.jsx)(U1.Provider,{value:o,children:t})},G1=function(){return(0,w.useContext)(U1)},K1=function(e){var t=e.children,n=e.condition,r=e.wrapper;return n?(0,w.cloneElement)(r,{},t):t},q1={position:`relative`},J1=function(e){var t=e.children,n=e.theme,r=e.renderWrapper,i=r===void 0||r,a=e.isInteractive,o=a===void 0||a,s=e.animate,c=e.motionConfig,l=(0,w.useRef)(null);return(0,G.jsx)(hH,{theme:n,children:(0,G.jsx)(W1,{animate:s,config:c,children:(0,G.jsx)(IH,{container:l,children:(0,G.jsxs)(K1,{condition:i,wrapper:(0,G.jsx)(`div`,{style:q1,ref:l}),children:[t,o&&(0,G.jsx)(FH,{})]})})})})},Y1=function(e,t){return e.width===t.width&&e.height===t.height},X1=function(e){var t=e.children,n=e.width,r=e.height,i=e.onResize,a=e.debounceResize,o=XH({width:n,height:r},a,{equalityFn:Y1})[0];return(0,w.useEffect)((function(){i?.(o)}),[o,i]),(0,G.jsx)(G.Fragment,{children:t(o)})},Z1=function(e){var t=e.children,n=e.defaultWidth,r=e.defaultHeight,i=e.onResize,a=e.debounceResize,o=a===void 0?0:a;return(0,G.jsx)(qH,{defaultWidth:n,defaultHeight:r,children:function(e){var n=e.width,r=e.height;return(0,G.jsx)(X1,{width:n,height:r,onResize:i,debounceResize:o,children:t})}})};function Q1(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function $1(e,t){var n=typeof Symbol<`u`&&e[Symbol.iterator]||e[`@@iterator`];if(n)return(n=n.call(e)).next.bind(n);if(Array.isArray(e)||(n=function(e,t){if(e){if(typeof e==`string`)return Q1(e,t);var n={}.toString.call(e).slice(8,-1);return n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`?Array.from(e):n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Q1(e,t):void 0}}(e))||t&&e&&typeof e.length==`number`){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw TypeError(`Invalid attempt to iterate non-iterable instance.
94
94
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function e0(){return e0=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},e0.apply(null,arguments)}function t0(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}var n0=[`id`,`colors`],r0={linearGradient:function(e){var t=e.id,n=e.colors,r=t0(e,n0);return(0,G.jsx)(`linearGradient`,e0({id:t,x1:0,x2:0,y1:0,y2:1},r,{children:n.map((function(e){var t=e.offset,n=e.color,r=e.opacity;return(0,G.jsx)(`stop`,{offset:t+`%`,stopColor:n,stopOpacity:r===void 0?1:r},t)}))}))}},i0={color:`#000000`,background:`#ffffff`,size:4,padding:4,stagger:!1},a0=(0,w.memo)((function(e){var t=e.id,n=e.background,r=n===void 0?i0.background:n,i=e.color,a=i===void 0?i0.color:i,o=e.size,s=o===void 0?i0.size:o,c=e.padding,l=c===void 0?i0.padding:c,u=e.stagger,d=u===void 0?i0.stagger:u,f=s+l,p=s/2,m=l/2;return!0===d&&(f=2*s+2*l),(0,G.jsxs)(`pattern`,{id:t,width:f,height:f,patternUnits:`userSpaceOnUse`,children:[(0,G.jsx)(`rect`,{width:f,height:f,fill:r}),(0,G.jsx)(`circle`,{cx:m+p,cy:m+p,r:p,fill:a}),d&&(0,G.jsx)(`circle`,{cx:1.5*l+s+p,cy:1.5*l+s+p,r:p,fill:a})]})}));2*Math.PI;var o0=function(e){return e*Math.PI/180},s0=function(e){return 180*e/Math.PI},c0=function(e){return e.startAngle+(e.endAngle-e.startAngle)/2},l0=function(e,t){return{x:Math.cos(e)*t,y:Math.sin(e)*t}},u0=function(e){var t=e%360;return t<0&&(t+=360),t},d0={svg:{align:{left:`start`,center:`middle`,right:`end`,start:`start`,middle:`middle`,end:`end`},baseline:{top:`text-before-edge`,center:`central`,bottom:`alphabetic`}},canvas:{align:{left:`left`,center:`center`,right:`right`,start:`left`,middle:`center`,end:`right`},baseline:{top:`top`,center:`middle`,bottom:`bottom`}}},f0={spacing:5,rotation:0,background:`#000000`,color:`#ffffff`,lineWidth:2},p0=(0,w.memo)((function(e){var t=e.id,n=e.spacing,r=n===void 0?f0.spacing:n,i=e.rotation,a=i===void 0?f0.rotation:i,o=e.background,s=o===void 0?f0.background:o,c=e.color,l=c===void 0?f0.color:c,u=e.lineWidth,d=u===void 0?f0.lineWidth:u,f=Math.round(a)%360,p=Math.abs(r);f>180?f-=360:f>90?f-=180:f<-180?f+=360:f<-90&&(f+=180);var m,h=p,g=p;return f===0?m=`
95
95
  M 0 0 L `+h+` 0
96
96
  M 0 `+g+` L `+h+` `+g+`
@@ -117,5 +117,5 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
117
117
  L`+r+` `+r+`
118
118
  L0 `+r+`
119
119
  L`+r/2+` 0
120
- `,fill:i,opacity:o,strokeWidth:c,stroke:l===void 0?`transparent`:l,style:{pointerEvents:`none`}})})};function o6(){return o6=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},o6.apply(null,arguments)}var s6={translateX:0,translateY:0,padding:0,itemsSpacing:0,itemDirection:`left-to-right`,justify:!1,symbolShape:`square`,symbolSize:16,symbolSpacing:8},c6={top:0,right:0,bottom:0,left:0},l6=function(e){var t,n=e.direction,r=e.itemsSpacing,i=e.padding,a=e.itemCount,o=e.itemWidth,s=e.itemHeight;if(typeof i!=`number`&&(typeof(t=i)!=`object`||Array.isArray(t)||t===null))throw Error(`Invalid property padding, must be one of: number, object`);var c=typeof i==`number`?{top:i,right:i,bottom:i,left:i}:o6({},c6,i),l=c.left+c.right,u=c.top+c.bottom,d=o+l,f=s+u,p=(a-1)*r;return n===`row`?d=o*a+p+l:n===`column`&&(f=s*a+p+u),{width:d,height:f,padding:c}},u6=function(e){var t=e.anchor,n=e.translateX,r=e.translateY,i=e.containerWidth,a=e.containerHeight,o=e.width,s=e.height,c=n,l=r;switch(t){case`top`:c+=(i-o)/2;break;case`top-right`:c+=i-o;break;case`right`:c+=i-o,l+=(a-s)/2;break;case`bottom-right`:c+=i-o,l+=a-s;break;case`bottom`:c+=(i-o)/2,l+=a-s;break;case`bottom-left`:l+=a-s;break;case`left`:l+=(a-s)/2;break;case`center`:c+=(i-o)/2,l+=(a-s)/2}return{x:c,y:l}},d6=function(e){var t,n,r,i,a,o,s=e.direction,c=e.justify,l=e.symbolSize,u=e.symbolSpacing,d=e.width,f=e.height;switch(s){case`left-to-right`:t=0,n=(f-l)/2,i=f/2,o=`central`,c?(r=d,a=`end`):(r=l+u,a=`start`);break;case`right-to-left`:t=d-l,n=(f-l)/2,i=f/2,o=`central`,c?(r=0,a=`start`):(r=d-l-u,a=`end`);break;case`top-to-bottom`:t=(d-l)/2,n=0,r=d/2,a=`middle`,c?(i=f,o=`alphabetic`):(i=l+u,o=`text-before-edge`);break;case`bottom-to-top`:t=(d-l)/2,n=f-l,r=d/2,a=`middle`,c?(i=0,o=`text-before-edge`):(i=f-l-u,o=`alphabetic`)}return{symbolX:t,symbolY:n,labelX:r,labelY:i,labelAnchor:a,labelAlignment:o}},f6={circle:n6,diamond:r6,square:i6,triangle:a6},p6=function(e){var t=e.x,n=e.y,r=e.width,i=e.height,a=e.data,o=e.direction,s=o===void 0?s6.itemDirection:o,c=e.justify,l=c===void 0?s6.justify:c,u=e.textColor,d=e.background,f=d===void 0?`transparent`:d,p=e.opacity,m=p===void 0?1:p,h=e.symbolShape,g=h===void 0?s6.symbolShape:h,_=e.symbolSize,v=_===void 0?s6.symbolSize:_,y=e.symbolSpacing,b=y===void 0?s6.symbolSpacing:y,x=e.symbolBorderWidth,S=x===void 0?0:x,C=e.symbolBorderColor,T=C===void 0?`transparent`:C,E=e.onClick,D=e.onMouseEnter,O=e.onMouseLeave,k=e.toggleSerie,A=e.effects,j=(0,w.useState)({}),M=j[0],N=j[1],P=gH(),F=(0,w.useCallback)((function(e){A&&N(A.filter((function(e){return e.on===`hover`})).reduce((function(e,t){return o6({},e,t.style)}),{})),D?.(a,e)}),[D,a,A]),I=(0,w.useCallback)((function(e){A&&N(A.filter((function(e){return e.on!==`hover`})).reduce((function(e,t){return o6({},e,t.style)}),{})),O?.(a,e)}),[O,a,A]),L=d6({direction:s,justify:l,symbolSize:M.symbolSize??v,symbolSpacing:b,width:r,height:i}),R=L.symbolX,z=L.symbolY,B=L.labelX,V=L.labelY,H=L.labelAnchor,ee=L.labelAlignment,te=[E,D,O,k].some((function(e){return e!==void 0})),U=typeof g==`function`?g:f6[g];return(0,G.jsxs)(`g`,{transform:`translate(`+t+`,`+n+`)`,style:{opacity:M.itemOpacity??m},children:[(0,G.jsx)(`rect`,{width:r,height:i,fill:M.itemBackground??f,style:{cursor:te?`pointer`:`auto`},onClick:function(e){E?.(a,e),k?.(a.id)},onMouseEnter:F,onMouseLeave:I}),w.createElement(U,o6({id:a.id,x:R,y:z,size:M.symbolSize??v,fill:a.fill??a.color??`black`,borderWidth:M.symbolBorderWidth??S,borderColor:M.symbolBorderColor??T},a.hidden?P.legends.hidden.symbol:void 0)),(0,G.jsx)(J0,{textAnchor:H,style:o6({},P.legends.text,{fill:M.itemTextColor??u??P.legends.text.fill??`black`,dominantBaseline:ee,pointerEvents:`none`,userSelect:`none`},a.hidden?P.legends.hidden.text:void 0),x:B,y:V,children:a.label})]})},m6=function(e){var t=e.data,n=e.x,r=e.y,i=e.direction,a=e.padding,o=a===void 0?s6.padding:a,s=e.justify,c=e.effects,l=e.itemWidth,u=e.itemHeight,d=e.itemDirection,f=d===void 0?s6.itemDirection:d,p=e.itemsSpacing,m=p===void 0?s6.itemsSpacing:p,h=e.itemTextColor,g=e.itemBackground,_=g===void 0?`transparent`:g,v=e.itemOpacity,y=v===void 0?1:v,b=e.symbolShape,x=e.symbolSize,S=e.symbolSpacing,C=e.symbolBorderWidth,w=e.symbolBorderColor,T=e.onClick,E=e.onMouseEnter,D=e.onMouseLeave,O=e.toggleSerie,k=l6({itemCount:t.length,itemWidth:l,itemHeight:u,itemsSpacing:m,direction:i,padding:o}).padding,A=i===`row`?l+m:0,j=i===`column`?u+m:0;return(0,G.jsx)(`g`,{transform:`translate(`+n+`,`+r+`)`,children:t.map((function(e,t){return(0,G.jsx)(p6,{data:e,x:t*A+k.left,y:t*j+k.top,width:l,height:u,direction:f,justify:s,effects:c,textColor:h,background:_,opacity:y,symbolShape:b,symbolSize:x,symbolSpacing:S,symbolBorderWidth:C,symbolBorderColor:w,onClick:T,onMouseEnter:E,onMouseLeave:D,toggleSerie:O},t)}))})},h6=function(e){var t=e.data,n=e.containerWidth,r=e.containerHeight,i=e.translateX,a=i===void 0?s6.translateX:i,o=e.translateY,s=o===void 0?s6.translateY:o,c=e.anchor,l=e.direction,u=e.padding,d=u===void 0?s6.padding:u,f=e.justify,p=e.itemsSpacing,m=p===void 0?s6.itemsSpacing:p,h=e.itemWidth,g=e.itemHeight,_=e.itemDirection,v=e.itemTextColor,y=e.itemBackground,b=e.itemOpacity,x=e.symbolShape,S=e.symbolSize,C=e.symbolSpacing,w=e.symbolBorderWidth,T=e.symbolBorderColor,E=e.onClick,D=e.onMouseEnter,O=e.onMouseLeave,k=e.toggleSerie,A=e.effects,j=l6({itemCount:t.length,itemsSpacing:m,itemWidth:h,itemHeight:g,direction:l,padding:d}),M=j.width,N=j.height,P=u6({anchor:c,translateX:a,translateY:s,containerWidth:n,containerHeight:r,width:M,height:N}),F=P.x,I=P.y;return(0,G.jsx)(m6,{data:t,x:F,y:I,direction:l,padding:d,justify:f,effects:A,itemsSpacing:m,itemWidth:h,itemHeight:g,itemDirection:_,itemTextColor:v,itemBackground:y,itemOpacity:b,symbolShape:x,symbolSize:S,symbolSpacing:C,symbolBorderWidth:w,symbolBorderColor:T,onClick:E,onMouseEnter:D,onMouseLeave:O,toggleSerie:typeof k==`boolean`?void 0:k})},g6={start:`left`,middle:`center`,end:`right`},_6=function(e,t){var n=t.data,r=t.containerWidth,i=t.containerHeight,a=t.translateX,o=a===void 0?0:a,s=t.translateY,c=s===void 0?0:s,l=t.anchor,u=t.direction,d=t.padding,f=d===void 0?0:d,p=t.justify,m=p!==void 0&&p,h=t.itemsSpacing,g=h===void 0?0:h,_=t.itemWidth,v=t.itemHeight,y=t.itemDirection,b=y===void 0?`left-to-right`:y,x=t.itemTextColor,S=t.symbolSize,C=S===void 0?16:S,w=t.symbolSpacing,T=w===void 0?8:w,E=t.theme,D=l6({itemCount:n.length,itemWidth:_,itemHeight:v,itemsSpacing:g,direction:u,padding:f}),O=D.width,k=D.height,A=D.padding,j=u6({anchor:l,translateX:o,translateY:c,containerWidth:r,containerHeight:i,width:O,height:k}),M=j.x,N=j.y,P=u===`row`?_+g:0,F=u===`column`?v+g:0;e.save(),e.translate(M,N),H0(e,E.legends.text),n.forEach((function(t,n){var r=n*P+A.left,i=n*F+A.top,a=d6({direction:b,justify:m,symbolSize:C,symbolSpacing:T,width:_,height:v}),o=a.symbolX,s=a.symbolY,c=a.labelX,l=a.labelY,u=a.labelAnchor,d=a.labelAlignment;e.fillStyle=t.color??`black`,e.fillRect(r+o,i+s,C,C),e.textAlign=g6[u],d===`central`&&(e.textBaseline=`middle`),U0(e,o6({},E.legends.text,{fill:x??E.legends.text.fill}),String(t.label),r+c,i+l)})),e.restore()},v6=function(e,t,n,r,i,a){a>0?(e.moveTo(t+a,n),e.lineTo(t+r-a,n),e.quadraticCurveTo(t+r,n,t+r,n+a),e.lineTo(t+r,n+i-a),e.quadraticCurveTo(t+r,n+i,t+r-a,n+i),e.lineTo(t+a,n+i),e.quadraticCurveTo(t,n+i,t,n+i-a),e.lineTo(t,n+a),e.quadraticCurveTo(t,n,t+a,n),e.closePath()):e.rect(t,n,r,i)};function y6(){return y6=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},y6.apply(null,arguments)}function b6(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}var x6,S6=function(e){var t=e.bars,n=e.annotations,r=C3({data:t,annotations:n,getPosition:function(e){return{x:e.x+e.width/2,y:e.y+e.height/2}},getDimensions:function(e){var t=e.height,n=e.width;return{width:n,height:t,size:Math.max(n,t)}}});return(0,G.jsx)(G.Fragment,{children:r.map((function(e,t){return(0,G.jsx)(j3,y6({},e),t)}))})},C6=function(e){var t=e.width,n=e.height,r=e.legends,i=e.toggleSerie;return(0,G.jsx)(G.Fragment,{children:r.map((function(e,r){var a=e[0],o=e[1];return(0,G.jsx)(h6,y6({},a,{containerWidth:t,containerHeight:n,data:a.data??o,toggleSerie:a.toggleSerie&&a.dataFrom===`keys`?i:void 0}),r)}))})},w6=[`data`],T6=function(e){var t=e.bar,n=t.data,r=b6(t,w6),i=e.style,a=i.borderColor,o=i.color,s=i.height,c=i.labelColor,l=i.labelOpacity,u=i.labelX,d=i.labelY,f=i.transform,p=i.width,m=i.textAnchor,h=e.borderRadius,g=e.borderWidth,_=e.label,v=e.shouldRenderLabel,y=e.isInteractive,b=e.onClick,x=e.onMouseEnter,S=e.onMouseLeave,C=e.tooltip,T=e.isFocusable,E=e.ariaLabel,D=e.ariaLabelledBy,O=e.ariaDescribedBy,k=e.ariaDisabled,A=e.ariaHidden,j=gH(),M=MH(),N=M.showTooltipFromEvent,P=M.showTooltipAt,F=M.hideTooltip,I=(0,w.useMemo)((function(){return function(){return(0,w.createElement)(C,y6({},r,n))}}),[C,r,n]),L=(0,w.useCallback)((function(e){b?.(y6({color:r.color},n),e)}),[r,n,b]),R=(0,w.useCallback)((function(e){return N(I(),e)}),[N,I]),z=(0,w.useCallback)((function(e){x?.(n,e),N(I(),e)}),[n,x,N,I]),B=(0,w.useCallback)((function(e){S?.(n,e),F()}),[n,F,S]),V=(0,w.useCallback)((function(){P(I(),[r.absX+r.width/2,r.absY])}),[P,I,r]),H=(0,w.useCallback)((function(){F()}),[F]);return(0,G.jsxs)(Xz.g,{transform:f,children:[(0,G.jsx)(Xz.rect,{width:Az(p,(function(e){return Math.max(e,0)})),height:Az(s,(function(e){return Math.max(e,0)})),rx:h,ry:h,fill:n.fill??o,strokeWidth:g,stroke:a,focusable:T,tabIndex:T?0:void 0,"aria-label":E?E(n):void 0,"aria-labelledby":D?D(n):void 0,"aria-describedby":O?O(n):void 0,"aria-disabled":k?k(n):void 0,"aria-hidden":A?A(n):void 0,onMouseEnter:y?z:void 0,onMouseMove:y?R:void 0,onMouseLeave:y?B:void 0,onClick:y?L:void 0,onFocus:y&&T?V:void 0,onBlur:y&&T?H:void 0,"data-testid":`bar.item.`+n.id+`.`+n.index}),v&&(0,G.jsx)(J0,{x:u,y:d,textAnchor:m,dominantBaseline:`central`,fillOpacity:l,style:y6({},j.labels.text,{pointerEvents:`none`,fill:c}),children:_})]})},E6=[`color`,`label`],D6={indexBy:`id`,keys:[`value`],groupMode:`stacked`,layout:`vertical`,valueScale:{type:`linear`,nice:!0,round:!1},indexScale:{type:`band`,round:!1},padding:.1,innerPadding:0,enableGridX:!1,enableGridY:!0,enableLabel:!0,label:`formattedValue`,labelPosition:`middle`,labelOffset:0,labelSkipWidth:0,labelSkipHeight:0,labelTextColor:{theme:`labels.text.fill`},colorBy:`id`,colors:{scheme:`nivo`},borderRadius:0,borderWidth:0,borderColor:{from:`color`},isInteractive:!0,tooltip:function(e){var t=e.color,n=e.label,r=b6(e,E6);return(0,G.jsx)(CH,{id:n,value:r.formattedValue,enableChip:!0,color:t})},tooltipLabel:function(e){return e.id+` - `+e.indexValue},legends:[],initialHiddenIds:[],annotations:[],enableTotals:!1,totalsOffset:10},O6=y6({},D6,{layers:[`grid`,`axes`,`bars`,`totals`,`markers`,`legends`,`annotations`],axisTop:null,axisRight:null,axisBottom:{},axisLeft:{},barComponent:T6,defs:[],fill:[],markers:[],animate:!0,animateOnMount:!1,motionConfig:`default`,role:`img`,isFocusable:!1}),k6=y6({},D6,{layers:[`grid`,`axes`,`bars`,`totals`,`legends`,`annotations`],axisTop:null,axisRight:null,axisBottom:{},axisLeft:{},renderBar:function(e,t){var n=t.bar,r=n.color,i=n.height,a=n.width,o=n.x,s=n.y,c=t.borderColor,l=t.borderRadius,u=t.borderWidth,d=t.label,f=t.shouldRenderLabel,p=t.labelStyle,m=t.labelX,h=t.labelY,g=t.textAnchor;e.fillStyle=r,u>0&&(e.strokeStyle=c,e.lineWidth=u),e.beginPath(),v6(e,o,s,a,i,Math.min(l,i)),e.fill(),u>0&&e.stroke(),f&&(e.textBaseline=`middle`,e.textAlign=g===`middle`?`center`:g,U0(e,p,d,o+m,s+h))},pixelRatio:typeof window<`u`&&(x6=window.devicePixelRatio)!=null?x6:1}),A6=function(e,t,n,r,i,a){return v4(r,{all:e.map(t),min:0,max:0},i,a).padding(n)},j6=function(e,t){return e.map((function(e){return y6({},t.reduce((function(e,t){return e[t]=null,e}),{}),e)}))},M6=function(e){return Object.keys(e).reduce((function(t,n){return e[n]&&(t[n]=e[n]),t}),{})},N6=function(e){return[e,Number(e)]};function P6(e,t,n,r){return e===void 0&&(e=D6.layout),n===void 0&&(n=D6.labelPosition),r===void 0&&(r=D6.labelOffset),function(i,a){var o=r*(t?-1:1);if(e===`horizontal`){var s=i/2;return n===`start`?s=t?i:0:n===`end`&&(s=t?0:i),{labelX:s+o,labelY:a/2,textAnchor:n===`middle`?`middle`:t?`end`:`start`}}var c=a/2;return n===`start`?c=t?0:a:n===`end`&&(c=t?a:0),{labelX:i/2,labelY:c-o,textAnchor:`middle`}}}var F6=[`layout`,`width`,`height`,`padding`,`innerPadding`,`valueScale`,`indexScale`,`hiddenIds`],I6=function(e,t){return e>t},L6=function(e,t){return e<t},R6=function(e,t){return Array.from(` `.repeat(t-e),(function(t,n){return e+n}))},z6=function(e){return I6(e,0)?0:e},B6=function(e,t,n,r){var i=e.data,a=e.formatValue,o=e.getColor,s=e.getIndex,c=e.getTooltipLabel,l=e.innerPadding,u=l===void 0?0:l,d=e.keys,f=e.xScale,p=e.yScale,m=e.margin,h=n?L6:I6,g=i.map(M6),_=[];return d.forEach((function(e,n){return R6(0,f.domain().length).forEach((function(l){var d,v=N6(i[l][e]),y=v[0],b=v[1],x=s(i[l]),S=(f(x)??0)+t*n+u*n,C=h(d=b,0)?p(d)??0:r,w=function(e,t){return h(e,0)?r-t:(p(e)??0)-r}(b,C),T={id:e,value:y===null?y:b,formattedValue:a(b),hidden:!1,index:l,indexValue:x,data:g[l]};_.push({key:e+`.`+T.indexValue,index:_.length,data:T,x:S,y:C,absX:m.left+S,absY:m.top+C,width:t,height:w,color:o(T),label:c(T)})}))})),_},V6=function(e,t,n,r){var i=e.data,a=e.formatValue,o=e.getIndex,s=e.getColor,c=e.getTooltipLabel,l=e.keys,u=e.innerPadding,d=u===void 0?0:u,f=e.xScale,p=e.yScale,m=e.margin,h=n?L6:I6,g=i.map(M6),_=[];return l.forEach((function(e,n){return R6(0,p.domain().length).forEach((function(l){var u,v=N6(i[l][e]),y=v[0],b=v[1],x=o(i[l]),S=h(u=b,0)?r:f(u)??0,C=(p(x)??0)+t*n+d*n,w=function(e,t){return h(e,0)?(f(e)??0)-r:r-t}(b,S),T={id:e,value:y===null?y:b,formattedValue:a(b),hidden:!1,index:l,indexValue:x,data:g[l]};_.push({key:e+`.`+T.indexValue,index:_.length,data:T,x:S,y:C,absX:m.left+S,absY:m.top+C,width:w,height:t,color:s(T),label:c(T)})}))})),_},H6=function(e){var t,n,r=e.layout,i=e.width,a=e.height,o=e.padding,s=o===void 0?0:o,c=e.innerPadding,l=c===void 0?0:c,u=e.valueScale,d=e.indexScale,f=e.hiddenIds,p=f===void 0?[]:f,m=b6(e,F6),h=m.keys.filter((function(e){return!p.includes(e)})),g=j6(m.data,h),_=r===`vertical`?[`y`,`x`,i]:[`x`,`y`,a],v=_[0],y=_[1],b=_[2],x=A6(g,m.getIndex,s,d,b,y),S=u.min===`auto`?z6:function(e){return e},C=g.reduce((function(e,t){return[].concat(e,h.map((function(e){return t[e]})))}),[]).filter(Boolean),w=v4(u,{all:C,min:S(Math.min.apply(Math,C)),max:(n=Math.max.apply(Math,C),isFinite(n)?n:0)},v===`x`?i:a,v),T=r===`vertical`?[x,w]:[w,x],E=T[0],D=T[1],O=(x.bandwidth()-l*(h.length-1))/h.length,k=[y6({},m,{data:g,keys:h,innerPadding:l,xScale:E,yScale:D}),O,(t=u.reverse)!=null&&t,w(0)??0];return{xScale:E,yScale:D,bars:O>0?r===`vertical`?B6.apply(void 0,k):V6.apply(void 0,k):[]}},U6=[`data`,`layout`,`width`,`height`,`padding`,`valueScale`,`indexScale`,`hiddenIds`],W6=function(e){var t;return e.some(Array.isArray)?W6((t=[]).concat.apply(t,e)):e},G6=function(e,t,n){var r=e.formatValue,i=e.getColor,a=e.getIndex,o=e.getTooltipLabel,s=e.innerPadding,c=e.stackedData,l=e.xScale,u=e.yScale,d=e.margin,f=[];return c.forEach((function(e){return l.domain().forEach((function(c,p){var m=e[p],h=l(a(m.data))??0,g=(function(e){return u(e[+!n])}(m)??0)+.5*s,_=function(e,t){return(u(e[+!!n])??0)-t}(m,g)-s,v=N6(m.data[e.key]),y=v[0],b=v[1],x={id:e.key,value:y===null?y:b,formattedValue:r(b),hidden:!1,index:p,indexValue:c,data:M6(m.data)};f.push({key:e.key+`.`+c,index:f.length,data:x,x:h,y:g,absX:d.left+h,absY:d.top+g,width:t,height:_,color:i(x),label:o(x)})}))})),f},K6=function(e,t,n){var r=e.formatValue,i=e.getColor,a=e.getIndex,o=e.getTooltipLabel,s=e.innerPadding,c=e.stackedData,l=e.xScale,u=e.yScale,d=e.margin,f=[];return c.forEach((function(e){return u.domain().forEach((function(c,p){var m=e[p],h=u(a(m.data))??0,g=(function(e){return l(e[+!!n])}(m)??0)+.5*s,_=function(e,t){return(l(e[+!n])??0)-t}(m,g)-s,v=N6(m.data[e.key]),y=v[0],b=v[1],x={id:e.key,value:y===null?y:b,formattedValue:r(b),hidden:!1,index:p,indexValue:c,data:M6(m.data)};f.push({key:e.key+`.`+c,index:f.length,data:x,x:g,y:h,absX:d.left+g,absY:d.top+h,width:_,height:t,color:i(x),label:o(x)})}))})),f},q6=function(e){var t,n,r=e.data,i=e.layout,a=e.width,o=e.height,s=e.padding,c=s===void 0?0:s,l=e.valueScale,u=e.indexScale,d=e.hiddenIds,f=d===void 0?[]:d,p=b6(e,U6),m=p.keys.filter((function(e){return!f.includes(e)})),h=vK().keys(m).offset(yK)(j6(r,m)),g=i===`vertical`?[`y`,`x`,a]:[`x`,`y`,o],_=g[0],v=g[1],y=g[2],b=A6(r,p.getIndex,c,u,y,v),x=(n=W6(h),l.type===`log`?n.filter((function(e){return e!==0})):n),S=v4(l,{all:x,min:Math.min.apply(Math,x),max:Math.max.apply(Math,x)},_===`x`?a:o,_),C=i===`vertical`?[b,S]:[S,b],w=C[0],T=C[1],E=p.innerPadding>0?p.innerPadding:0,D=b.bandwidth(),O=[y6({},p,{innerPadding:E,stackedData:h,xScale:w,yScale:T}),D,(t=l.reverse)!=null&&t];return{xScale:w,yScale:T,bars:D>0?i===`vertical`?G6.apply(void 0,O):K6.apply(void 0,O):[]}},J6=function(e){var t=e.bars,n=e.direction,r=e.from,i=e.groupMode,a=e.layout,o=e.legendLabel,s=e.reverse,c=j0(o??(r===`indexes`?`indexValue`:`id`));return r===`indexes`?function(e,t,n){var r=(0,e4.default)(e.map((function(e){return{id:e.data.indexValue??``,label:n(e.data),hidden:e.data.hidden,color:e.color??`#000`}})),(function(e){return e.id}));return t===`horizontal`&&r.reverse(),r}(t,a,c):function(e,t,n,r,i,a){var o=(0,e4.default)(e.map((function(e){return{id:e.data.id,label:a(e.data),hidden:e.data.hidden,color:e.color??`#000`}})),(function(e){return e.id}));return(t===`vertical`&&r===`stacked`&&n===`column`&&!0!==i||t===`horizontal`&&r===`stacked`&&!0===i)&&o.reverse(),o}(t,a,n,i,s,c)},Y6=function(e,t,n){var r=e.get(t)||0;e.set(t,r+n)},X6=function(e,t,n){var r=e.get(t)||0;e.set(t,r+(n>0?n:0))},Z6=function(e,t,n){var r=e.get(t)||0;e.set(t,Math.max(r,Number(n)))},Q6=function(e,t){var n=e.get(t)||0;e.set(t,n+1)},$6=function(e){var t,n=e.indexBy,r=n===void 0?D6.indexBy:n,i=e.keys,a=i===void 0?D6.keys:i,o=e.label,s=o===void 0?D6.label:o,c=e.tooltipLabel,l=c===void 0?D6.tooltipLabel:c,u=e.valueFormat,d=e.colors,f=d===void 0?D6.colors:d,p=e.colorBy,m=p===void 0?D6.colorBy:p,h=e.borderColor,g=h===void 0?D6.borderColor:h,_=e.labelTextColor,v=_===void 0?D6.labelTextColor:_,y=e.groupMode,b=y===void 0?D6.groupMode:y,x=e.layout,S=x===void 0?D6.layout:x,C=e.data,T=e.margin,E=e.width,D=e.height,O=e.padding,k=O===void 0?D6.padding:O,A=e.innerPadding,j=A===void 0?D6.innerPadding:A,M=e.valueScale,N=M===void 0?D6.valueScale:M,P=e.indexScale,F=P===void 0?D6.indexScale:P,I=e.initialHiddenIds,L=I===void 0?D6.initialHiddenIds:I,R=e.enableLabel,z=R===void 0?D6.enableLabel:R,B=e.labelSkipWidth,V=B===void 0?D6.labelSkipWidth:B,H=e.labelSkipHeight,ee=H===void 0?D6.labelSkipHeight:H,te=e.legends,U=te===void 0?D6.legends:te,ne=e.legendLabel,re=e.totalsOffset,ie=re===void 0?D6.totalsOffset:re,ae=(0,w.useState)(L??[]),oe=ae[0],se=ae[1],ce=(0,w.useCallback)((function(e){se((function(t){return t.indexOf(e)>-1?t.filter((function(t){return t!==e})):[].concat(t,[e])}))}),[]),le=M0(r),W=M0(s),ue=M0(l),de=A0(u),fe=gH(),pe=t6(f,m),me=$3(g,fe),he=$3(v,fe),ge=(b===`grouped`?H6:q6)({layout:S,data:C,getIndex:le,keys:a,width:E,height:D,getColor:pe,padding:k,innerPadding:j,valueScale:N,indexScale:F,hiddenIds:oe,formatValue:de,getTooltipLabel:ue,margin:T}),_e=ge.bars,ve=ge.xScale,ye=ge.yScale,be=(0,w.useMemo)((function(){return _e.filter((function(e){return e.data.value!==null})).map((function(e,t){return y6({},e,{index:t})}))}),[_e]),xe=(0,w.useCallback)((function(e){var t=e.width,n=e.height;return!!z&&!(V>0&&t<V)&&!(ee>0&&n<ee)}),[z,V,ee]),Se=(0,w.useMemo)((function(){return a.map((function(e){var t=_e.find((function(t){return t.data.id===e}));return y6({},t,{data:y6({id:e},t?.data,{hidden:oe.includes(e)})})}))}),[oe,a,_e]),Ce=(t=N.reverse)!=null&&t;return{bars:_e,barsWithValue:be,xScale:ve,yScale:ye,getIndex:le,getLabel:W,getTooltipLabel:ue,formatValue:de,getColor:pe,getBorderColor:me,getLabelColor:he,shouldRenderBarLabel:xe,hiddenIds:oe,toggleSerie:ce,legendsWithData:(0,w.useMemo)((function(){return U.map((function(e){return[e,J6({bars:e.dataFrom===`keys`?Se:_e,direction:e.direction,from:e.dataFrom,groupMode:b,layout:S,legendLabel:ne,reverse:Ce})]}))}),[U,Se,_e,b,S,ne,Ce]),barTotals:(0,w.useMemo)((function(){return function(e,t,n,r,i,a,o){r===void 0&&(r=D6.layout),i===void 0&&(i=D6.groupMode);var s=[];if(e.length===0)return s;var c=new Map,l=e[0].width,u=e[0].height;if(i===`stacked`){var d=new Map;e.forEach((function(e){var t=e.data,n=t.indexValue,r=t.value;Y6(c,n,Number(r)),X6(d,n,Number(r))})),d.forEach((function(e,i){var d,f,p,m=c.get(i)||0;r===`vertical`?(d=t(i),f=n(e),p=n(e/2)):(d=t(e),f=n(i),p=t(e/2)),d+=r===`vertical`?l/2:a,f+=r===`vertical`?-a:u/2,s.push({key:`total_`+i,x:d,y:f,value:m,formattedValue:o(m),animationOffset:p})}))}else if(i===`grouped`){var f=new Map,p=new Map;e.forEach((function(e){var t=e.data,n=t.indexValue,r=t.value;Y6(c,n,Number(r)),Z6(f,n,Number(r)),Q6(p,n)})),f.forEach((function(e,i){var d,f,m,h=c.get(i)||0,g=p.get(i);r===`vertical`?(d=t(i),f=n(e),m=n(e/2)):(d=t(e),f=n(i),m=t(e/2)),d+=r===`vertical`?g*l/2:a,f+=r===`vertical`?-a:g*u/2,s.push({key:`total_`+i,x:d,y:f,value:h,formattedValue:o(h),animationOffset:m})}))}return s}(_e,ve,ye,S,b,ie,de)}),[_e,ve,ye,S,b,ie,de])}},e8=function(e){var t=e.data,n=e.springConfig,r=e.animate,i=e.layout,a=i===void 0?O6.layout:i,o=gH();return Cz(t,{keys:function(e){return e.key},from:function(e){return{x:a===`vertical`?e.x:e.animationOffset,y:a===`vertical`?e.animationOffset:e.y,labelOpacity:0}},enter:function(e){return{x:e.x,y:e.y,labelOpacity:1}},update:function(e){return{x:e.x,y:e.y,labelOpacity:1}},leave:function(e){return{x:a===`vertical`?e.x:e.animationOffset,y:a===`vertical`?e.animationOffset:e.y,labelOpacity:0}},config:n,immediate:!r,initial:r?void 0:null})((function(e,t){return(0,G.jsx)(Xz.text,{x:e.x,y:e.y,fillOpacity:e.labelOpacity,style:y6({},o.labels.text,{pointerEvents:`none`}),fontWeight:`bold`,fontSize:o.labels.text.fontSize,fontFamily:o.labels.text.fontFamily,textAnchor:a===`vertical`?`middle`:`start`,alignmentBaseline:a===`vertical`?`alphabetic`:`middle`,children:t.formattedValue},t.key)}))},t8=[`isInteractive`,`animate`,`motionConfig`,`theme`,`renderWrapper`],n8=function(e){var t,n=e.data,r=e.indexBy,i=e.keys,a=e.margin,o=e.width,s=e.height,c=e.groupMode,l=e.layout,u=e.valueScale,d=e.indexScale,f=e.padding,p=e.innerPadding,m=e.axisTop,h=e.axisRight,g=e.axisBottom,_=g===void 0?O6.axisBottom:g,v=e.axisLeft,y=v===void 0?O6.axisLeft:v,b=e.enableGridX,x=b===void 0?O6.enableGridX:b,S=e.enableGridY,C=S===void 0?O6.enableGridY:S,T=e.gridXValues,E=e.gridYValues,D=e.layers,O=D===void 0?O6.layers:D,k=e.barComponent,A=k===void 0?O6.barComponent:k,j=e.enableLabel,M=j===void 0?O6.enableLabel:j,N=e.label,P=e.labelSkipWidth,F=P===void 0?O6.labelSkipWidth:P,I=e.labelSkipHeight,L=I===void 0?O6.labelSkipHeight:I,R=e.labelTextColor,z=e.labelPosition,B=z===void 0?O6.labelPosition:z,V=e.labelOffset,H=V===void 0?O6.labelOffset:V,ee=e.markers,te=ee===void 0?O6.markers:ee,U=e.colorBy,ne=e.colors,re=e.defs,ie=re===void 0?O6.defs:re,ae=e.fill,oe=ae===void 0?O6.fill:ae,se=e.borderRadius,ce=se===void 0?O6.borderRadius:se,le=e.borderWidth,W=le===void 0?O6.borderWidth:le,ue=e.borderColor,de=e.annotations,fe=de===void 0?O6.annotations:de,pe=e.legendLabel,me=e.tooltipLabel,he=e.valueFormat,ge=e.isInteractive,_e=ge===void 0?O6.isInteractive:ge,ve=e.tooltip,ye=ve===void 0?O6.tooltip:ve,be=e.onClick,xe=e.onMouseEnter,Se=e.onMouseLeave,Ce=e.legends,we=e.role,Te=we===void 0?O6.role:we,Ee=e.ariaLabel,De=e.ariaLabelledBy,Oe=e.ariaDescribedBy,ke=e.isFocusable,Ae=ke===void 0?O6.isFocusable:ke,je=e.barAriaLabel,Me=e.barAriaLabelledBy,Ne=e.barAriaDescribedBy,Pe=e.barAriaHidden,Fe=e.barAriaDisabled,Ie=e.initialHiddenIds,Le=e.enableTotals,Re=Le===void 0?O6.enableTotals:Le,ze=e.totalsOffset,Be=ze===void 0?O6.totalsOffset:ze,Ve=e.forwardedRef,He=G1(),Ue=He.animate,We=He.config,Ge=D0(o,s,a),Ke=Ge.outerWidth,qe=Ge.outerHeight,Je=Ge.margin,Ye=Ge.innerWidth,Xe=Ge.innerHeight,Ze=$6({indexBy:r,label:N,tooltipLabel:me,valueFormat:he,colors:ne,colorBy:U,borderColor:ue,labelTextColor:R,groupMode:c,layout:l,data:n,keys:i,margin:Je,width:Ye,height:Xe,padding:f,innerPadding:p,valueScale:u,indexScale:d,enableLabel:M,labelSkipWidth:F,labelSkipHeight:L,legends:Ce,legendLabel:pe,initialHiddenIds:Ie,totalsOffset:Be}),Qe=Ze.bars,$e=Ze.barsWithValue,et=Ze.xScale,tt=Ze.yScale,nt=Ze.getLabel,rt=Ze.getTooltipLabel,it=Ze.getBorderColor,at=Ze.getLabelColor,ot=Ze.shouldRenderBarLabel,st=Ze.toggleSerie,ct=Ze.legendsWithData,lt=Ze.barTotals,ut=Ze.getColor,dt=P6(l,(t=u?.reverse)!=null&&t,B,H),ft=Cz($e,{keys:function(e){return e.key},from:function(e){return y6({borderColor:it(e),color:e.color,height:0,labelColor:at(e),labelOpacity:0},dt(e.width,e.height),{transform:`translate(`+e.x+`, `+(e.y+e.height)+`)`,width:e.width},l===`vertical`?{}:{height:e.height,transform:`translate(`+e.x+`, `+e.y+`)`,width:0})},enter:function(e){return y6({borderColor:it(e),color:e.color,height:e.height,labelColor:at(e),labelOpacity:1},dt(e.width,e.height),{transform:`translate(`+e.x+`, `+e.y+`)`,width:e.width})},update:function(e){return y6({borderColor:it(e),color:e.color,height:e.height,labelColor:at(e),labelOpacity:1},dt(e.width,e.height),{transform:`translate(`+e.x+`, `+e.y+`)`,width:e.width})},leave:function(e){return y6({borderColor:it(e),color:e.color,height:0,labelColor:at(e),labelOpacity:0},dt(e.width,e.height),{labelY:0,transform:`translate(`+e.x+`, `+(e.y+e.height)+`)`,width:e.width},l===`vertical`?{}:y6({},dt(e.width,e.height),{labelX:0,height:e.height,transform:`translate(`+e.x+`, `+e.y+`)`,width:0}))},config:We,immediate:!Ue,initial:Ue?void 0:null}),pt=(0,w.useMemo)((function(){return{borderRadius:ce,borderWidth:W,enableLabel:M,isInteractive:_e,labelSkipWidth:F,labelSkipHeight:L,onClick:be,onMouseEnter:xe,onMouseLeave:Se,getTooltipLabel:rt,tooltip:ye,isFocusable:Ae,ariaLabel:je,ariaLabelledBy:Me,ariaDescribedBy:Ne,ariaHidden:Pe,ariaDisabled:Fe}}),[ce,W,M,rt,_e,L,F,be,xe,Se,ye,Ae,je,Me,Ne,Pe,Fe]),mt=B0(ie,Qe,oe,{dataKey:`data`,targetKey:`data.fill`}),ht={annotations:null,axes:null,bars:null,grid:null,legends:null,markers:null,totals:null};O.includes(`annotations`)&&(ht.annotations=(0,G.jsx)(S6,{bars:Qe,annotations:fe},`annotations`)),O.includes(`axes`)&&(ht.axes=(0,G.jsx)(M4,{xScale:et,yScale:tt,width:Ye,height:Xe,top:m,right:h,bottom:_,left:y},`axes`)),O.includes(`bars`)&&(ht.bars=(0,G.jsx)(w.Fragment,{children:ft((function(e,t){return(0,w.createElement)(A,y6({},pt,{bar:t,style:e,shouldRenderLabel:ot(t),label:nt(t.data)}))}))},`bars`)),O.includes(`grid`)&&(ht.grid=(0,G.jsx)(F4,{width:Ye,height:Xe,xScale:x?et:null,yScale:C?tt:null,xValues:T,yValues:E},`grid`)),O.includes(`legends`)&&(ht.legends=(0,G.jsx)(C6,{width:Ye,height:Xe,legends:ct,toggleSerie:st},`legends`)),O.includes(`markers`)&&(ht.markers=(0,G.jsx)(S0,{markers:te,width:Ye,height:Xe,xScale:et,yScale:tt},`markers`)),O.includes(`totals`)&&Re&&(ht.totals=(0,G.jsx)(e8,{data:lt,springConfig:We,animate:Ue,layout:l},`totals`));var gt=y6({},pt,{margin:Je,width:o,height:s,innerWidth:Ye,innerHeight:Xe,bars:Qe,legendData:ct,enableLabel:M,xScale:et,yScale:tt,tooltip:ye,getTooltipLabel:rt,onClick:be,onMouseEnter:xe,onMouseLeave:Se,getColor:ut});return(0,G.jsx)(y0,{width:Ke,height:qe,margin:Je,defs:mt,role:Te,ariaLabel:Ee,ariaLabelledBy:De,ariaDescribedBy:Oe,isFocusable:Ae,ref:Ve,children:O.map((function(e,t){return typeof e==`function`?(0,G.jsx)(w.Fragment,{children:(0,w.createElement)(e,gt)},t):ht?.[e]??null}))})},r8=(0,w.forwardRef)((function(e,t){var n=e.isInteractive,r=n===void 0?O6.isInteractive:n,i=e.animate,a=i===void 0?O6.animate:i,o=e.motionConfig,s=o===void 0?O6.motionConfig:o,c=e.theme,l=e.renderWrapper,u=b6(e,t8);return(0,G.jsx)(J1,{animate:a,isInteractive:r,motionConfig:s,renderWrapper:l,theme:c,children:(0,G.jsx)(n8,y6({},u,{isInteractive:r,forwardedRef:t}))})})),i8=[`isInteractive`,`renderWrapper`,`theme`],a8=function(e,t,n,r){return e.find((function(e){return F0(e.x+t.left,e.y+t.top,e.width,e.height,n,r)}))},o8=function(e){var t,n=e.data,r=e.indexBy,i=e.keys,a=e.margin,o=e.width,s=e.height,c=e.groupMode,l=e.layout,u=e.valueScale,d=e.indexScale,f=e.padding,p=e.innerPadding,m=e.axisTop,h=e.axisRight,g=e.axisBottom,_=g===void 0?k6.axisBottom:g,v=e.axisLeft,y=v===void 0?k6.axisLeft:v,b=e.enableGridX,x=b===void 0?k6.enableGridX:b,S=e.enableGridY,C=S===void 0?k6.enableGridY:S,T=e.gridXValues,E=e.gridYValues,D=e.labelPosition,O=D===void 0?k6.labelPosition:D,k=e.labelOffset,A=k===void 0?k6.labelOffset:k,j=e.layers,M=j===void 0?k6.layers:j,N=e.renderBar,P=N===void 0?k6.renderBar:N,F=e.enableLabel,I=F===void 0?k6.enableLabel:F,L=e.label,R=e.labelSkipWidth,z=R===void 0?k6.labelSkipWidth:R,B=e.labelSkipHeight,V=B===void 0?k6.labelSkipHeight:B,H=e.labelTextColor,ee=e.colorBy,te=e.colors,U=e.borderRadius,ne=U===void 0?k6.borderRadius:U,re=e.borderWidth,ie=re===void 0?k6.borderWidth:re,ae=e.borderColor,oe=e.annotations,se=oe===void 0?k6.annotations:oe,ce=e.legendLabel,le=e.tooltipLabel,W=e.valueFormat,ue=e.isInteractive,de=ue===void 0?k6.isInteractive:ue,fe=e.tooltip,pe=fe===void 0?k6.tooltip:fe,me=e.onClick,he=e.onMouseEnter,ge=e.onMouseLeave,_e=e.legends,ve=e.pixelRatio,ye=ve===void 0?k6.pixelRatio:ve,be=e.role,xe=e.forwardedRef,Se=e.enableTotals,Ce=Se===void 0?k6.enableTotals:Se,we=e.totalsOffset,Te=we===void 0?k6.totalsOffset:we,Ee=(0,w.useRef)(null),De=gH(),Oe=D0(o,s,a),ke=Oe.margin,Ae=Oe.innerWidth,je=Oe.innerHeight,Me=Oe.outerWidth,Ne=Oe.outerHeight,Pe=$6({indexBy:r,label:L,tooltipLabel:le,valueFormat:W,colors:te,colorBy:ee,borderColor:ae,labelTextColor:H,groupMode:c,layout:l,data:n,keys:i,margin:ke,width:Ae,height:je,padding:f,innerPadding:p,valueScale:u,indexScale:d,enableLabel:I,labelSkipWidth:z,labelSkipHeight:V,legends:_e,legendLabel:ce,totalsOffset:Te}),Fe=Pe.bars,Ie=Pe.barsWithValue,Le=Pe.xScale,Re=Pe.yScale,ze=Pe.getLabel,Be=Pe.getTooltipLabel,Ve=Pe.getBorderColor,He=Pe.getLabelColor,Ue=Pe.shouldRenderBarLabel,We=Pe.legendsWithData,Ge=Pe.barTotals,Ke=Pe.getColor,qe=MH(),Je=qe.showTooltipFromEvent,Ye=qe.hideTooltip,Xe=w3({annotations:C3({data:Fe,annotations:se,getPosition:function(e){return{x:e.x,y:e.y}},getDimensions:function(e){var t=e.width,n=e.height;return{width:t,height:n,size:Math.max(t,n)}}})}),Ze=(0,w.useMemo)((function(){return{borderRadius:ne,borderWidth:ie,isInteractive:de,isFocusable:!1,labelSkipWidth:z,labelSkipHeight:V,margin:ke,width:o,height:s,innerWidth:Ae,innerHeight:je,bars:Fe,legendData:We,enableLabel:I,xScale:Le,yScale:Re,tooltip:pe,getTooltipLabel:Be,onClick:me,onMouseEnter:he,onMouseLeave:ge,getColor:Ke}}),[ne,ie,de,z,V,ke,o,s,Ae,je,Fe,We,I,Le,Re,pe,Be,me,he,ge,Ke]),Qe=A0(W),$e=P6(l,(t=u?.reverse)!=null&&t,O,A);(0,w.useEffect)((function(){if(Ee.current){Ee.current.width=Me*ye,Ee.current.height=Ne*ye;var e=Ee.current.getContext(`2d`);e.scale(ye,ye),e.fillStyle=De.background,e.fillRect(0,0,Me,Ne),e.translate(ke.left,ke.top),M.forEach((function(t){t===`grid`?typeof De.grid.line.strokeWidth==`number`&&De.grid.line.strokeWidth>0&&(e.lineWidth=De.grid.line.strokeWidth,e.strokeStyle=De.grid.line.stroke,x&&R4(e,{width:Ae,height:je,scale:Le,axis:`x`,values:T}),C&&R4(e,{width:Ae,height:je,scale:Re,axis:`y`,values:E})):t===`axes`?L4(e,{xScale:Le,yScale:Re,width:Ae,height:je,top:m,right:h,bottom:_,left:y,theme:De}):t===`bars`?(H0(e,De.text),Ie.forEach((function(t){P(e,y6({bar:t,borderColor:Ve(t),borderRadius:ne,borderWidth:ie,label:ze(t.data),shouldRenderLabel:Ue(t),labelStyle:y6({},De.labels.text,{fill:He(t)})},$e(t.width,t.height)))}))):t===`legends`?We.forEach((function(t){var n=t[0],r=t[1];_6(e,y6({},n,{data:r,containerWidth:Ae,containerHeight:je,theme:De}))})):t===`annotations`?N3(e,{annotations:Xe,theme:De}):t===`totals`&&Ce?function(e,t,n,r){r===void 0&&(r=k6.layout),H0(e,n.labels.text),e.textBaseline=r===`vertical`?`alphabetic`:`middle`,e.textAlign=r===`vertical`?`center`:`start`,t.forEach((function(t){U0(e,n.labels.text,t.formattedValue,t.x,t.y)}))}(e,Ge,De,l):typeof t==`function`&&t(e,Ze)})),e.save()}}),[_,y,h,m,Ie,ne,ie,Xe,x,C,Ve,ze,He,T,E,c,s,je,Ae,Ze,M,l,We,ke.left,ke.top,Ne,Me,ye,P,Le,Re,Ue,De,o,Ge,Ce,Qe,$e]);var et=(0,w.useCallback)((function(e){if(Fe&&Ee.current){var t=I0(Ee.current,e),n=t[0],r=t[1],i=a8(Fe,ke,n,r);i===void 0?Ye():(Je((0,w.createElement)(pe,y6({},i.data,{color:i.color,label:i.label,value:Number(i.data.value)})),e),e.type===`mouseenter`&&he?.(i.data,e))}}),[Ye,ke,he,Fe,Je,pe]),tt=(0,w.useCallback)((function(e){if(Fe&&Ee.current){Ye();var t=I0(Ee.current,e),n=t[0],r=t[1],i=a8(Fe,ke,n,r);i&&ge?.(i.data,e)}}),[Ye,ke,ge,Fe]),nt=(0,w.useCallback)((function(e){if(Fe&&Ee.current){var t=I0(Ee.current,e),n=t[0],r=t[1],i=a8(Fe,ke,n,r);i!==void 0&&me?.(y6({},i.data,{color:i.color}),e)}}),[ke,me,Fe]);return(0,G.jsx)(`canvas`,{ref:V0(Ee,xe),width:Me*ye,height:Ne*ye,style:{width:Me,height:Ne,cursor:de?`auto`:`normal`},onMouseEnter:de?et:void 0,onMouseMove:de?et:void 0,onMouseLeave:de?tt:void 0,onClick:de?nt:void 0,role:be})},s8=(0,w.forwardRef)((function(e,t){var n=e.isInteractive,r=e.renderWrapper,i=e.theme,a=b6(e,i8);return(0,G.jsx)(J1,{isInteractive:n,renderWrapper:r,theme:i,animate:!1,children:(0,G.jsx)(o8,y6({},a,{isInteractive:n,forwardedRef:t}))})})),c8=[`defaultWidth`,`defaultHeight`,`onResize`,`debounceResize`],l8=(0,w.forwardRef)((function(e,t){var n=e.defaultWidth,r=e.defaultHeight,i=e.onResize,a=e.debounceResize,o=b6(e,c8);return(0,G.jsx)(Z1,{defaultWidth:n,defaultHeight:r,onResize:i,debounceResize:a,children:function(e){var n=e.width,r=e.height;return(0,G.jsx)(r8,y6({},o,{width:n,height:r,ref:t}))}})})),u8=[`defaultWidth`,`defaultHeight`,`onResize`,`debounceResize`];(0,w.forwardRef)((function(e,t){var n=e.defaultWidth,r=e.defaultHeight,i=e.onResize,a=e.debounceResize,o=b6(e,u8);return(0,G.jsx)(Z1,{defaultWidth:n,defaultHeight:r,onResize:i,debounceResize:a,children:function(e){var n=e.width,r=e.height;return(0,G.jsx)(s8,y6({},o,{width:n,height:r,ref:t}))}})}));function d8(){return d8=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},d8.apply(null,arguments)}var f8={pointerEvents:`none`},p8=function(e){var t=e.label,n=e.style,r=gH();return(0,G.jsx)(Xz.g,{transform:n.transform,opacity:n.progress,style:f8,children:(0,G.jsx)(J0,{textAnchor:`middle`,dominantBaseline:`central`,style:d8({},r.labels.text,{fill:n.textColor}),children:t})})},m8=function(e){var t=e%(2*Math.PI);return t<0&&(t+=2*Math.PI),t},h8=function(e,t){return e.filter((function(e){return Math.abs(s0(e.arc.endAngle-e.arc.startAngle))>=t}))},g8={startAngle:{enter:function(e){return d8({},e,{endAngle:e.startAngle})},update:function(e){return e},leave:function(e){return d8({},e,{startAngle:e.endAngle})}},middleAngle:{enter:function(e){var t=e.startAngle+(e.endAngle-e.startAngle)/2;return d8({},e,{startAngle:t,endAngle:t})},update:function(e){return e},leave:function(e){var t=e.startAngle+(e.endAngle-e.startAngle)/2;return d8({},e,{startAngle:t,endAngle:t})}},endAngle:{enter:function(e){return d8({},e,{startAngle:e.endAngle})},update:function(e){return e},leave:function(e){return d8({},e,{endAngle:e.startAngle})}},innerRadius:{enter:function(e){return d8({},e,{outerRadius:e.innerRadius})},update:function(e){return e},leave:function(e){return d8({},e,{innerRadius:e.outerRadius})}},centerRadius:{enter:function(e){var t=e.innerRadius+(e.outerRadius-e.innerRadius)/2;return d8({},e,{innerRadius:t,outerRadius:t})},update:function(e){return e},leave:function(e){var t=e.innerRadius+(e.outerRadius-e.innerRadius)/2;return d8({},e,{innerRadius:t,outerRadius:t})}},outerRadius:{enter:function(e){return d8({},e,{innerRadius:e.outerRadius})},update:function(e){return e},leave:function(e){return d8({},e,{outerRadius:e.innerRadius})}},pushIn:{enter:function(e){return d8({},e,{innerRadius:e.innerRadius-e.outerRadius+e.innerRadius,outerRadius:e.innerRadius})},update:function(e){return e},leave:function(e){return d8({},e,{innerRadius:e.outerRadius,outerRadius:e.outerRadius+e.outerRadius-e.innerRadius})}},pushOut:{enter:function(e){return d8({},e,{innerRadius:e.outerRadius,outerRadius:e.outerRadius+e.outerRadius-e.innerRadius})},update:function(e){return e},leave:function(e){return d8({},e,{innerRadius:e.innerRadius-e.outerRadius+e.innerRadius,outerRadius:e.innerRadius})}}},_8=function(e,t){return(0,w.useMemo)((function(){var n=g8[e];return{enter:function(e){return d8({progress:0},n.enter(e.arc),t?t.enter(e):{})},update:function(e){return d8({progress:1},n.update(e.arc),t?t.update(e):{})},leave:function(e){return d8({progress:0},n.leave(e.arc),t?t.leave(e):{})}}}),[e,t])},v8=function(e,t){return l0(c0(e)-Math.PI/2,e.innerRadius+(e.outerRadius-e.innerRadius)*t)},y8=function(e){return function(t,n,r,i){return Az([t,n,r,i],(function(t,n,r,i){var a=v8({startAngle:t,endAngle:n,innerRadius:r,outerRadius:i},e);return`translate(`+a.x+`,`+a.y+`)`}))}},b8=function(e,t,n,r){t===void 0&&(t=.5),n===void 0&&(n=`innerRadius`);var i=G1(),a=i.animate,o=i.config,s=_8(n,r);return{transition:Cz(e,{keys:function(e){return e.id},initial:s.update,from:s.enter,enter:s.update,update:s.update,leave:s.leave,config:o,immediate:!a}),interpolate:y8(t)}},x8=function(e){var t=e.data,n=e.offset,r=n===void 0?.5:n,i=e.skipAngle,a=i===void 0?0:i,o=e.computeExtraProps,s=o===void 0?function(){return{}}:o;return(0,w.useMemo)((function(){return h8(t,a).map((function(e){var t=v8(e.arc,r);return d8({},s(e),{x:t.x,y:t.y,data:e})}))}),[t,r,a,s])},S8=function(e){var t=e.center,n=e.data,r=e.transitionMode,i=e.label,a=e.radiusOffset,o=e.skipAngle,s=e.skipRadius,c=e.textColor,l=e.component,u=l===void 0?p8:l,d=M0(i),f=$3(c,gH()),p=b8((0,w.useMemo)((function(){return n.filter((function(e){var t=Math.abs(s0(e.arc.endAngle-e.arc.startAngle)),n=Math.abs(e.arc.outerRadius-e.arc.innerRadius);return t>=o&&n>=s}))}),[n,o,s]),a,r),m=p.transition,h=p.interpolate,g=u;return(0,G.jsx)(`g`,{transform:`translate(`+t[0]+`,`+t[1]+`)`,children:m((function(e,t){return(0,w.createElement)(g,{key:t.id,datum:t,label:d(t),style:{progress:e.progress,transform:h(e.startAngle,e.endAngle,e.innerRadius,e.outerRadius),textColor:f(t)}})}))})},C8=function(e,t,n){H0(e,n.labels.text),e.textAlign=`center`,e.textBaseline=`middle`,t.forEach((function(t){U0(e,d8({},n.labels.text,{fill:t.textColor}),String(t.label),t.x,t.y)}))},w8=function(e){var t=e.data,n=e.offset,r=e.skipAngle,i=e.label,a=e.textColor,o=M0(i),s=$3(a,gH());return x8({data:t,offset:n,skipAngle:r,computeExtraProps:(0,w.useCallback)((function(e){return{label:o(e),textColor:s(e)}}),[o,s])})},T8=function(e){var t=e.label,n=e.style,r=gH();return(0,G.jsxs)(Xz.g,{opacity:n.opacity,children:[(0,G.jsx)(Xz.path,{fill:`none`,stroke:n.linkColor,strokeWidth:n.thickness,d:n.path}),(0,G.jsx)(J0,{transform:n.textPosition,textAnchor:n.textAnchor,dominantBaseline:`central`,style:d8({},r.labels.text,{fill:n.textColor}),children:t})]})},E8=function(e){var t=m8(e.startAngle+(e.endAngle-e.startAngle)/2-Math.PI/2);return t<Math.PI/2||t>1.5*Math.PI?`start`:`end`},D8=function(e,t,n,r){var i,a,o=m8(e.startAngle+(e.endAngle-e.startAngle)/2-Math.PI/2),s=l0(o,e.outerRadius+t),c=l0(o,e.outerRadius+t+n);return o<Math.PI/2||o>1.5*Math.PI?(i=`after`,a={x:c.x+r,y:c.y}):(i=`before`,a={x:c.x-r,y:c.y}),{side:i,points:[s,c,a]}},O8=SG().x((function(e){return e.x})).y((function(e){return e.y})),k8=function(e,t,n,r,i,a,o){return Az([e,t,n,r,i,a,o],(function(e,t,n,r,i,a,o){var s=D8({startAngle:e,endAngle:t,innerRadius:n,outerRadius:r},i,a,o).points;return O8(s)}))},A8=function(e,t,n,r){return Az([e,t,n,r],(function(e,t,n,r){return E8({startAngle:e,endAngle:t,innerRadius:n,outerRadius:r})}))},j8=function(e,t,n,r,i,a,o,s){return Az([e,t,n,r,i,a,o,s],(function(e,t,n,r,i,a,o,s){var c=D8({startAngle:e,endAngle:t,innerRadius:n,outerRadius:r},i,a,o),l=c.points,u=c.side,d=l[2];return u===`before`?d.x-=s:d.x+=s,`translate(`+d.x+`,`+d.y+`)`}))},M8=function(e){var t=e.data,n=e.offset,r=n===void 0?0:n,i=e.diagonalLength,a=e.straightLength,o=e.skipAngle,s=o===void 0?0:o,c=e.textOffset,l=e.linkColor,u=e.textColor,d=G1(),f=d.animate,p=d.config,m=gH(),h=$3(l,m),g=$3(u,m),_=function(e,t){return(0,w.useMemo)((function(){return h8(e,t)}),[e,t])}(t,s),v=function(e){var t=e.offset,n=e.diagonalLength,r=e.straightLength,i=e.textOffset,a=e.getLinkColor,o=e.getTextColor;return(0,w.useMemo)((function(){return{enter:function(e){return{startAngle:e.arc.startAngle,endAngle:e.arc.endAngle,innerRadius:e.arc.innerRadius,outerRadius:e.arc.outerRadius,offset:t,diagonalLength:0,straightLength:0,textOffset:i,linkColor:a(e),textColor:o(e),opacity:0}},update:function(e){return{startAngle:e.arc.startAngle,endAngle:e.arc.endAngle,innerRadius:e.arc.innerRadius,outerRadius:e.arc.outerRadius,offset:t,diagonalLength:n,straightLength:r,textOffset:i,linkColor:a(e),textColor:o(e),opacity:1}},leave:function(e){return{startAngle:e.arc.startAngle,endAngle:e.arc.endAngle,innerRadius:e.arc.innerRadius,outerRadius:e.arc.outerRadius,offset:t,diagonalLength:0,straightLength:0,textOffset:i,linkColor:a(e),textColor:o(e),opacity:0}}}}),[n,r,i,a,o,t])}({offset:r,diagonalLength:i,straightLength:a,textOffset:c,getLinkColor:h,getTextColor:g});return{transition:Cz(_,{keys:function(e){return e.id},initial:v.update,from:v.enter,enter:v.update,update:v.update,leave:v.leave,config:p,immediate:!f}),interpolateLink:k8,interpolateTextAnchor:A8,interpolateTextPosition:j8}},N8=function(e){var t=e.center,n=e.data,r=e.label,i=e.skipAngle,a=e.offset,o=e.diagonalLength,s=e.straightLength,c=e.strokeWidth,l=e.textOffset,u=e.textColor,d=e.linkColor,f=e.component,p=f===void 0?T8:f,m=M0(r),h=M8({data:n,skipAngle:i,offset:a,diagonalLength:o,straightLength:s,textOffset:l,linkColor:d,textColor:u}),g=h.transition,_=h.interpolateLink,v=h.interpolateTextAnchor,y=h.interpolateTextPosition,b=p;return(0,G.jsx)(`g`,{transform:`translate(`+t[0]+`,`+t[1]+`)`,children:g((function(e,t){return(0,w.createElement)(b,{key:t.id,datum:t,label:m(t),style:d8({},e,{thickness:c,path:_(e.startAngle,e.endAngle,e.innerRadius,e.outerRadius,e.offset,e.diagonalLength,e.straightLength),textAnchor:v(e.startAngle,e.endAngle,e.innerRadius,e.outerRadius),textPosition:y(e.startAngle,e.endAngle,e.innerRadius,e.outerRadius,e.offset,e.diagonalLength,e.straightLength,e.textOffset)})})}))})},P8=function(e,t,n,r){e.textBaseline=`middle`,H0(e,n.labels.text),t.forEach((function(t){e.textAlign=d0.canvas.align[t.textAnchor],U0(e,d8({},n.labels.text,{fill:t.textColor}),String(t.label),t.x,t.y),e.beginPath(),e.strokeStyle=t.linkColor,e.lineWidth=r,t.points.forEach((function(t,n){n===0?e.moveTo(t.x,t.y):e.lineTo(t.x,t.y)})),e.stroke()}))},F8=function(e){var t=e.data,n=e.skipAngle,r=n===void 0?0:n,i=e.offset,a=i===void 0?.5:i,o=e.diagonalLength,s=e.straightLength,c=e.computeExtraProps,l=c===void 0?function(){return{}}:c,u=(0,w.useMemo)((function(){return t.filter((function(e){return Math.abs(s0(e.arc.endAngle-e.arc.startAngle))>=r})).map((function(e){return d8({},D8(e.arc,a,o,s),{data:e})}))}),[t,r,a,o,s]);return(0,w.useMemo)((function(){return u.map((function(e){return d8({},l(e),e)}))}),[u,l])},I8=function(e){var t=e.data,n=e.skipAngle,r=e.offset,i=e.diagonalLength,a=e.straightLength,o=e.textOffset,s=o===void 0?0:o,c=e.label,l=e.linkColor,u=e.textColor,d=M0(c),f=gH(),p=$3(l,f),m=$3(u,f);return F8({data:t,skipAngle:n,offset:r,diagonalLength:i,straightLength:a,computeExtraProps:(0,w.useCallback)((function(e){var t,n={x:e.points[2].x,y:e.points[2].y};return e.side===`before`?(n.x-=s,t=`end`):(n.x+=s,t=`start`),d8({},n,{label:d(e.data),linkColor:p(e.data),textAnchor:t,textColor:m(e.data)})}),[d,p,m,s])})},L8=function(e){var t=e.datum,n=e.style,r=e.onClick,i=e.onMouseEnter,a=e.onMouseMove,o=e.onMouseLeave,s=(0,w.useCallback)((function(e){return r?.(t,e)}),[r,t]),c=(0,w.useCallback)((function(e){return i?.(t,e)}),[i,t]),l=(0,w.useCallback)((function(e){return a?.(t,e)}),[a,t]),u=(0,w.useCallback)((function(e){return o?.(t,e)}),[o,t]);return(0,G.jsx)(Xz.path,{d:n.path,opacity:n.opacity,fill:t.fill||n.color,stroke:n.borderColor,strokeWidth:n.borderWidth,onClick:r?s:void 0,onMouseEnter:i?c:void 0,onMouseMove:a?l:void 0,onMouseLeave:o?u:void 0,"data-testid":`arc.`+t.id})},R8=function(e,t,n,r,i){return Az([e,t,n,r],(function(e,t,n,r){return i({startAngle:e,endAngle:t,innerRadius:Math.max(0,n),outerRadius:Math.max(0,r)})}))},z8=function(e,t,n){t===void 0&&(t=`innerRadius`);var r=G1(),i=r.animate,a=r.config,o=_8(t,n);return{transition:Cz(e,{keys:function(e){return e.id},initial:o.update,from:o.enter,enter:o.update,update:o.update,leave:o.leave,config:a,immediate:!i}),interpolate:R8}},B8=function(e){var t=e.center,n=e.data,r=e.arcGenerator,i=e.borderWidth,a=e.borderColor,o=e.onClick,s=e.onMouseEnter,c=e.onMouseMove,l=e.onMouseLeave,u=e.transitionMode,d=e.component,f=d===void 0?L8:d,p=$3(a,gH()),m=z8(n,u,{enter:function(e){return{opacity:0,color:e.color,borderColor:p(e)}},update:function(e){return{opacity:1,color:e.color,borderColor:p(e)}},leave:function(e){return{opacity:0,color:e.color,borderColor:p(e)}}}),h=m.transition,g=m.interpolate,_=f;return(0,G.jsx)(`g`,{transform:`translate(`+t[0]+`,`+t[1]+`)`,children:h((function(e,t){return(0,w.createElement)(_,{key:t.id,datum:t,style:d8({},e,{borderWidth:i,path:g(e.startAngle,e.endAngle,e.innerRadius,e.outerRadius,r)}),onClick:o,onMouseEnter:s,onMouseMove:c,onMouseLeave:l})}))})},V8=function(e,t,n,r,i,a){a===void 0&&(a=!0);var o=[],s=l0(o0(r),n);o.push([s.x,s.y]);var c=l0(o0(i),n);o.push([c.x,c.y]);for(var l=Math.round(Math.min(r,i));l<=Math.round(Math.max(r,i));l++)if(l%90==0){var u=l0(o0(l),n);o.push([u.x,u.y])}o=o.map((function(n){var r=n[0],i=n[1];return[e+r,t+i]})),a&&o.push([e,t]);var d=o.map((function(e){return e[0]})),f=o.map((function(e){return e[1]})),p=Math.min.apply(Math,d),m=Math.max.apply(Math,d),h=Math.min.apply(Math,f);return{points:o,x:p,y:h,width:m-p,height:Math.max.apply(Math,f)-h}},H8=function(e,t,n,r,i,a){var o=N0(i,a,e,t);return o<n&&o>r},U8=function(e,t,n,r,i,a,o){if(H8(e,t,n,r,a,o)){var s=P0(a,o,e,t);return i.find((function(e){var t=e.startAngle,n=e.endAngle;return s>=t&&s<n}))}},W8=function(e){var t=e===void 0?{}:e,n=t.cornerRadius,r=n===void 0?0:n,i=t.padAngle,a=i===void 0?0:i;return(0,w.useMemo)((function(){return gG().innerRadius((function(e){return e.innerRadius})).outerRadius((function(e){return e.outerRadius})).cornerRadius(r).padAngle(a)}),[r,a])};function G8(){return G8=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},G8.apply(null,arguments)}function K8(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}var q8,J8=function(e){var t=e.width,n=e.height,r=e.legends,i=e.data,a=e.toggleSerie;return(0,G.jsx)(G.Fragment,{children:r.map((function(e,r){return(0,G.jsx)(h6,G8({},e,{containerWidth:t,containerHeight:n,data:e.data??i,toggleSerie:e.toggleSerie?a:void 0}),r)}))})},$={id:`id`,value:`value`,sortByValue:!1,innerRadius:0,padAngle:0,cornerRadius:0,layers:[`arcs`,`arcLinkLabels`,`arcLabels`,`legends`],startAngle:0,endAngle:360,fit:!0,activeInnerRadiusOffset:0,activeOuterRadiusOffset:0,borderWidth:0,borderColor:{from:`color`,modifiers:[[`darker`,1]]},enableArcLabels:!0,arcLabel:`formattedValue`,arcLabelsSkipAngle:0,arcLabelsSkipRadius:0,arcLabelsRadiusOffset:.5,arcLabelsTextColor:{theme:`labels.text.fill`},enableArcLinkLabels:!0,arcLinkLabel:`id`,arcLinkLabelsSkipAngle:0,arcLinkLabelsOffset:0,arcLinkLabelsDiagonalLength:16,arcLinkLabelsStraightLength:24,arcLinkLabelsThickness:1,arcLinkLabelsTextOffset:6,arcLinkLabelsTextColor:{theme:`labels.text.fill`},arcLinkLabelsColor:{theme:`axis.ticks.line.stroke`},colors:{scheme:`nivo`},defs:[],fill:[],isInteractive:!0,animate:!0,motionConfig:`gentle`,transitionMode:`innerRadius`,tooltip:function(e){var t=e.datum;return(0,G.jsx)(CH,{id:t.id,value:t.formattedValue,enableChip:!0,color:t.color})},legends:[],role:`img`,pixelRatio:typeof window<`u`&&(q8=window.devicePixelRatio)!=null?q8:1},Y8=[`points`],X8=function(e){var t=e.data,n=e.id,r=n===void 0?$.id:n,i=e.value,a=i===void 0?$.value:i,o=e.valueFormat,s=e.colors,c=s===void 0?$.colors:s,l=M0(r),u=M0(a),d=A0(o),f=t6(c,`id`);return(0,w.useMemo)((function(){return t.map((function(e){var t=l(e),n=u(e),r={id:t,label:e.label??t,hidden:!1,value:n,formattedValue:d(n),data:e};return G8({},r,{color:f(r)})}))}),[t,l,u,d,f])},Z8=function(e){var t=e.data,n=e.startAngle,r=e.endAngle,i=e.innerRadius,a=e.outerRadius,o=e.padAngle,s=e.sortByValue,c=e.activeId,l=e.activeInnerRadiusOffset,u=e.activeOuterRadiusOffset,d=e.hiddenIds,f=e.forwardLegendData,p=(0,w.useMemo)((function(){var e=TG().value((function(e){return e.value})).startAngle(o0(n)).endAngle(o0(r)).padAngle(o0(o));return s||e.sortValues(null),e}),[n,r,o,s]),m=(0,w.useMemo)((function(){return{dataWithArc:p(t.filter((function(e){return!d.includes(e.id)}))).map((function(e){var t=Math.abs(e.endAngle-e.startAngle);return G8({},e.data,{arc:{index:e.index,startAngle:e.startAngle,endAngle:e.endAngle,innerRadius:c===e.data.id?i-l:i,outerRadius:c===e.data.id?a+u:a,thickness:a-i,padAngle:e.padAngle,angle:t,angleDeg:s0(t)}})})),legendData:t.map((function(e){return{id:e.id,label:e.label,color:e.color,hidden:d.includes(e.id),data:e}}))}}),[p,t,d,c,i,l,a,u]),h=m.legendData,g=(0,w.useRef)(f);return(0,w.useEffect)((function(){typeof g.current==`function`&&g.current(h)}),[g,h]),m},Q8=function(e){var t=e.activeId,n=e.onActiveIdChange,r=e.defaultActiveId,i=t!==void 0,a=(0,w.useState)(i||r===void 0?null:r),o=a[0],s=a[1];return{activeId:i?t:o,setActiveId:(0,w.useCallback)((function(e){n&&n(e),i||s(e)}),[i,n,s])}},$8=function(e){var t=e.data,n=e.width,r=e.height,i=e.innerRadius,a=i===void 0?$.innerRadius:i,o=e.startAngle,s=o===void 0?$.startAngle:o,c=e.endAngle,l=c===void 0?$.endAngle:c,u=e.padAngle,d=u===void 0?$.padAngle:u,f=e.sortByValue,p=f===void 0?$.sortByValue:f,m=e.cornerRadius,h=m===void 0?$.cornerRadius:m,g=e.fit,_=g===void 0?$.fit:g,v=e.activeInnerRadiusOffset,y=v===void 0?$.activeInnerRadiusOffset:v,b=e.activeOuterRadiusOffset,x=b===void 0?$.activeOuterRadiusOffset:b,S=e.activeId,C=e.onActiveIdChange,T=e.defaultActiveId,E=e.forwardLegendData,D=Q8({activeId:S,onActiveIdChange:C,defaultActiveId:T}),O=D.activeId,k=D.setActiveId,A=(0,w.useState)([]),j=A[0],M=A[1],N=(0,w.useMemo)((function(){var e,t=Math.min(n,r)/2,i=t*Math.min(a,1),o=n/2,c=r/2;if(_){var u=V8(o,c,t,s-90,l-90),d=u.points,f=K8(u,Y8),p=Math.min(n/f.width,r/f.height),m={width:f.width*p,height:f.height*p};m.x=(n-m.width)/2,m.y=(r-m.height)/2,o=(o-f.x)/f.width*f.width*p+m.x,c=(c-f.y)/f.height*f.height*p+m.y,e={box:f,ratio:p,points:d},t*=p,i*=p}return{centerX:o,centerY:c,radius:t,innerRadius:i,debug:e}}),[n,r,a,s,l,_]),P=Z8({data:t,startAngle:s,endAngle:l,innerRadius:N.innerRadius,outerRadius:N.radius,padAngle:d,sortByValue:p,activeId:O,activeInnerRadiusOffset:y,activeOuterRadiusOffset:x,hiddenIds:j,forwardLegendData:E}),F=(0,w.useCallback)((function(e){M((function(t){return t.indexOf(e)>-1?t.filter((function(t){return t!==e})):[].concat(t,[e])}))}),[]);return G8({arcGenerator:W8({cornerRadius:h,padAngle:o0(d)}),activeId:O,setActiveId:k,toggleSerie:F},P,N)},e5=function(e){var t=e.dataWithArc,n=e.arcGenerator,r=e.centerX,i=e.centerY,a=e.radius,o=e.innerRadius;return(0,w.useMemo)((function(){return{dataWithArc:t,arcGenerator:n,centerX:r,centerY:i,radius:a,innerRadius:o}}),[t,n,r,i,a,o])},t5=function(e){var t=e.center,n=e.data,r=e.arcGenerator,i=e.borderWidth,a=e.borderColor,o=e.isInteractive,s=e.onClick,c=e.onMouseEnter,l=e.onMouseMove,u=e.onMouseLeave,d=e.setActiveId,f=e.tooltip,p=e.transitionMode,m=MH(),h=m.showTooltipFromEvent,g=m.hideTooltip,_=(0,w.useMemo)((function(){if(o)return function(e,t){s?.(e,t)}}),[o,s]),v=(0,w.useMemo)((function(){if(o)return function(e,t){h((0,w.createElement)(f,{datum:e}),t),d(e.id),c?.(e,t)}}),[o,h,d,c,f]),y=(0,w.useMemo)((function(){if(o)return function(e,t){h((0,w.createElement)(f,{datum:e}),t),l?.(e,t)}}),[o,h,l,f]),b=(0,w.useMemo)((function(){if(o)return function(e,t){g(),d(null),u?.(e,t)}}),[o,g,d,u]);return(0,G.jsx)(B8,{center:t,data:n,arcGenerator:r,borderWidth:i,borderColor:a,transitionMode:p,onClick:_,onMouseEnter:v,onMouseMove:y,onMouseLeave:b})},n5=[`isInteractive`,`animate`,`motionConfig`,`theme`,`renderWrapper`],r5=function(e){var t=e.data,n=e.id,r=n===void 0?$.id:n,i=e.value,a=i===void 0?$.value:i,o=e.valueFormat,s=e.sortByValue,c=s===void 0?$.sortByValue:s,l=e.layers,u=l===void 0?$.layers:l,d=e.startAngle,f=d===void 0?$.startAngle:d,p=e.endAngle,m=p===void 0?$.endAngle:p,h=e.padAngle,g=h===void 0?$.padAngle:h,_=e.fit,v=_===void 0?$.fit:_,y=e.innerRadius,b=y===void 0?$.innerRadius:y,x=e.cornerRadius,S=x===void 0?$.cornerRadius:x,C=e.activeInnerRadiusOffset,T=C===void 0?$.activeInnerRadiusOffset:C,E=e.activeOuterRadiusOffset,D=E===void 0?$.activeOuterRadiusOffset:E,O=e.width,k=e.height,A=e.margin,j=e.colors,M=j===void 0?$.colors:j,N=e.borderWidth,P=N===void 0?$.borderWidth:N,F=e.borderColor,I=F===void 0?$.borderColor:F,L=e.enableArcLabels,R=L===void 0?$.enableArcLabels:L,z=e.arcLabel,B=z===void 0?$.arcLabel:z,V=e.arcLabelsSkipAngle,H=V===void 0?$.arcLabelsSkipAngle:V,ee=e.arcLabelsSkipRadius,te=ee===void 0?$.arcLabelsSkipRadius:ee,U=e.arcLabelsTextColor,ne=U===void 0?$.arcLabelsTextColor:U,re=e.arcLabelsRadiusOffset,ie=re===void 0?$.arcLabelsRadiusOffset:re,ae=e.arcLabelsComponent,oe=e.enableArcLinkLabels,se=oe===void 0?$.enableArcLinkLabels:oe,ce=e.arcLinkLabel,le=ce===void 0?$.arcLinkLabel:ce,W=e.arcLinkLabelsSkipAngle,ue=W===void 0?$.arcLinkLabelsSkipAngle:W,de=e.arcLinkLabelsOffset,fe=de===void 0?$.arcLinkLabelsOffset:de,pe=e.arcLinkLabelsDiagonalLength,me=pe===void 0?$.arcLinkLabelsDiagonalLength:pe,he=e.arcLinkLabelsStraightLength,ge=he===void 0?$.arcLinkLabelsStraightLength:he,_e=e.arcLinkLabelsThickness,ve=_e===void 0?$.arcLinkLabelsThickness:_e,ye=e.arcLinkLabelsTextOffset,be=ye===void 0?$.arcLinkLabelsTextOffset:ye,xe=e.arcLinkLabelsTextColor,Se=xe===void 0?$.arcLinkLabelsTextColor:xe,Ce=e.arcLinkLabelsColor,we=Ce===void 0?$.arcLinkLabelsColor:Ce,Te=e.arcLinkLabelComponent,Ee=e.defs,De=Ee===void 0?$.defs:Ee,Oe=e.fill,ke=Oe===void 0?$.fill:Oe,Ae=e.isInteractive,je=Ae===void 0?$.isInteractive:Ae,Me=e.onClick,Ne=e.onMouseEnter,Pe=e.onMouseMove,Fe=e.onMouseLeave,Ie=e.tooltip,Le=Ie===void 0?$.tooltip:Ie,Re=e.activeId,ze=e.onActiveIdChange,Be=e.defaultActiveId,Ve=e.transitionMode,He=Ve===void 0?$.transitionMode:Ve,Ue=e.legends,We=Ue===void 0?$.legends:Ue,Ge=e.forwardLegendData,Ke=e.role,qe=Ke===void 0?$.role:Ke,Je=e.forwardedRef,Ye=D0(O,k,A),Xe=Ye.outerWidth,Ze=Ye.outerHeight,Qe=Ye.margin,$e=Ye.innerWidth,et=Ye.innerHeight,tt=$8({data:X8({data:t,id:r,value:a,valueFormat:o,colors:M}),width:$e,height:et,fit:v,innerRadius:b,startAngle:f,endAngle:m,padAngle:g,sortByValue:c,cornerRadius:S,activeInnerRadiusOffset:T,activeOuterRadiusOffset:D,activeId:Re,onActiveIdChange:ze,defaultActiveId:Be,forwardLegendData:Ge}),nt=tt.dataWithArc,rt=tt.legendData,it=tt.arcGenerator,at=tt.centerX,ot=tt.centerY,st=tt.radius,ct=tt.innerRadius,lt=tt.setActiveId,ut=tt.toggleSerie,dt=B0(De,nt,ke),ft={arcs:null,arcLinkLabels:null,arcLabels:null,legends:null};u.includes(`arcs`)&&(ft.arcs=(0,G.jsx)(t5,{center:[at,ot],data:nt,arcGenerator:it,borderWidth:P,borderColor:I,isInteractive:je,onClick:Me,onMouseEnter:Ne,onMouseMove:Pe,onMouseLeave:Fe,setActiveId:lt,tooltip:Le,transitionMode:He},`arcs`)),se&&u.includes(`arcLinkLabels`)&&(ft.arcLinkLabels=(0,G.jsx)(N8,{center:[at,ot],data:nt,label:le,skipAngle:ue,offset:fe,diagonalLength:me,straightLength:ge,strokeWidth:ve,textOffset:be,textColor:Se,linkColor:we,component:Te},`arcLinkLabels`)),R&&u.includes(`arcLabels`)&&(ft.arcLabels=(0,G.jsx)(S8,{center:[at,ot],data:nt,label:B,radiusOffset:ie,skipAngle:H,skipRadius:te,textColor:ne,transitionMode:He,component:ae},`arcLabels`)),We.length>0&&u.includes(`legends`)&&(ft.legends=(0,G.jsx)(J8,{width:$e,height:et,data:rt,legends:We,toggleSerie:ut},`legends`));var pt=e5({dataWithArc:nt,arcGenerator:it,centerX:at,centerY:ot,radius:st,innerRadius:ct});return(0,G.jsx)(y0,{width:Xe,height:Ze,margin:Qe,defs:dt,role:qe,ref:Je,children:u.map((function(e,t){return ft[e]===void 0?typeof e==`function`?(0,G.jsx)(w.Fragment,{children:(0,w.createElement)(e,pt)},t):null:ft[e]}))})},i5=(0,w.forwardRef)((function(e,t){var n=e.isInteractive,r=n===void 0?$.isInteractive:n,i=e.animate,a=i===void 0?$.animate:i,o=e.motionConfig,s=o===void 0?$.motionConfig:o,c=e.theme,l=e.renderWrapper,u=K8(e,n5);return(0,G.jsx)(J1,{animate:a,isInteractive:r,motionConfig:s,renderWrapper:l,theme:c,children:(0,G.jsx)(r5,G8({isInteractive:r},u,{forwardedRef:t}))})})),a5=[`defaultWidth`,`defaultHeight`,`onResize`,`debounceResize`],o5=(0,w.forwardRef)((function(e,t){var n=e.defaultWidth,r=e.defaultHeight,i=e.onResize,a=e.debounceResize,o=K8(e,a5);return(0,G.jsx)(Z1,{defaultWidth:n,defaultHeight:r,onResize:i,debounceResize:a,children:function(e){var n=e.width,r=e.height;return(0,G.jsx)(i5,G8({width:n,height:r},o,{ref:t}))}})})),s5=[`isInteractive`,`theme`,`renderWrapper`],c5=function(e){var t=e.data,n=e.id,r=n===void 0?$.id:n,i=e.value,a=i===void 0?$.value:i,o=e.valueFormat,s=e.sortByValue,c=s===void 0?$.sortByValue:s,l=e.startAngle,u=l===void 0?$.startAngle:l,d=e.endAngle,f=d===void 0?$.endAngle:d,p=e.padAngle,m=p===void 0?$.padAngle:p,h=e.fit,g=h===void 0?$.fit:h,_=e.innerRadius,v=_===void 0?$.innerRadius:_,y=e.cornerRadius,b=y===void 0?$.cornerRadius:y,x=e.activeInnerRadiusOffset,S=x===void 0?$.activeInnerRadiusOffset:x,C=e.activeOuterRadiusOffset,T=C===void 0?$.activeOuterRadiusOffset:C,E=e.width,D=e.height,O=e.margin,k=e.pixelRatio,A=k===void 0?$.pixelRatio:k,j=e.colors,M=j===void 0?$.colors:j,N=e.borderWidth,P=N===void 0?$.borderWidth:N,F=e.borderColor,I=F===void 0?$.borderColor:F,L=e.enableArcLabels,R=L===void 0?$.enableArcLabels:L,z=e.arcLabel,B=z===void 0?$.arcLabel:z,V=e.arcLabelsSkipAngle,H=V===void 0?$.arcLabelsSkipAngle:V,ee=e.arcLabelsTextColor,te=ee===void 0?$.arcLabelsTextColor:ee,U=e.arcLabelsRadiusOffset,ne=U===void 0?$.arcLabelsRadiusOffset:U,re=e.enableArcLinkLabels,ie=re===void 0?$.enableArcLinkLabels:re,ae=e.arcLinkLabel,oe=ae===void 0?$.arcLinkLabel:ae,se=e.arcLinkLabelsSkipAngle,ce=se===void 0?$.arcLinkLabelsSkipAngle:se,le=e.arcLinkLabelsOffset,W=le===void 0?$.arcLinkLabelsOffset:le,ue=e.arcLinkLabelsDiagonalLength,de=ue===void 0?$.arcLinkLabelsDiagonalLength:ue,fe=e.arcLinkLabelsStraightLength,pe=fe===void 0?$.arcLinkLabelsStraightLength:fe,me=e.arcLinkLabelsThickness,he=me===void 0?$.arcLinkLabelsThickness:me,ge=e.arcLinkLabelsTextOffset,_e=ge===void 0?$.arcLinkLabelsTextOffset:ge,ve=e.arcLinkLabelsTextColor,ye=ve===void 0?$.arcLinkLabelsTextColor:ve,be=e.arcLinkLabelsColor,xe=be===void 0?$.arcLinkLabelsColor:be,Se=e.isInteractive,Ce=Se===void 0?$.isInteractive:Se,we=e.onClick,Te=e.onMouseMove,Ee=e.tooltip,De=Ee===void 0?$.tooltip:Ee,Oe=e.activeId,ke=e.onActiveIdChange,Ae=e.defaultActiveId,je=e.legends,Me=je===void 0?$.legends:je,Ne=e.forwardLegendData,Pe=e.role,Fe=e.forwardedRef,Ie=(0,w.useRef)(null),Le=gH(),Re=D0(E,D,O),ze=Re.margin,Be=Re.innerWidth,Ve=Re.innerHeight,He=Re.outerWidth,Ue=Re.outerHeight,We=$8({data:X8({data:t,id:r,value:a,valueFormat:o,colors:M}),width:Be,height:Ve,fit:g,innerRadius:v,startAngle:u,endAngle:f,padAngle:m,sortByValue:c,cornerRadius:b,activeInnerRadiusOffset:S,activeOuterRadiusOffset:T,activeId:Oe,onActiveIdChange:ke,defaultActiveId:Ae,forwardLegendData:Ne}),Ge=We.dataWithArc,Ke=We.arcGenerator,qe=We.centerX,Je=We.centerY,Ye=We.radius,Xe=We.innerRadius,Ze=We.setActiveId,Qe=$3(I,Le),$e=w8({data:Ge,label:B,skipAngle:H,offset:ne,textColor:te}),et=I8({data:Ge,skipAngle:ce,offset:W,diagonalLength:de,straightLength:pe,label:oe,linkColor:xe,textOffset:_e,textColor:ye});(0,w.useEffect)((function(){if(Ie.current){Ie.current.width=He*A,Ie.current.height=Ue*A;var e=Ie.current.getContext(`2d`);e.scale(A,A),e.fillStyle=Le.background,e.fillRect(0,0,He,Ue),e.save(),e.translate(ze.left,ze.top),Ke.context(e),e.save(),e.translate(qe,Je),Ge.forEach((function(t){e.beginPath(),e.fillStyle=t.color,e.strokeStyle=Qe(t),e.lineWidth=P,Ke(t.arc),e.fill(),P>0&&e.stroke()})),!0===ie&&P8(e,et,Le,he),!0===R&&C8(e,$e,Le),e.restore(),Me.forEach((function(t){_6(e,G8({},t,{data:Ge,containerWidth:Be,containerHeight:Ve,theme:Le}))}))}}),[Ie,Be,Ve,He,Ue,ze.top,ze.left,A,qe,Je,Ke,Ge,P,Qe,R,$e,ie,et,he,Me,Le]);var tt=(0,w.useMemo)((function(){return Ge.map((function(e){return G8({id:e.id},e.arc)}))}),[Ge]),nt=function(e){if(!Ie.current)return null;var t=I0(Ie.current,e),n=t[0],r=t[1],i=U8(ze.left+qe,ze.top+Je,Ye,Xe,tt,n,r);return i?Ge.find((function(e){return e.id===i.id})):null},rt=MH(),it=rt.showTooltipFromEvent,at=rt.hideTooltip,ot=function(e){var t=nt(e);t?(Te?.(t,e),Ze(t.id),it((0,w.createElement)(De,{datum:t}),e)):(Ze(null),at())};return(0,G.jsx)(`canvas`,{ref:V0(Ie,Fe),width:He*A,height:Ue*A,style:{width:He,height:Ue,cursor:Ce?`auto`:`normal`},onMouseEnter:Ce?ot:void 0,onMouseMove:Ce?ot:void 0,onMouseLeave:Ce?function(){at()}:void 0,onClick:Ce?function(e){if(we){var t=nt(e);t&&we(t,e)}}:void 0,role:Pe})},l5=(0,w.forwardRef)((function(e,t){var n=e.isInteractive,r=n===void 0?$.isInteractive:n,i=e.theme,a=e.renderWrapper,o=K8(e,s5);return(0,G.jsx)(J1,{isInteractive:r,renderWrapper:a,theme:i,children:(0,G.jsx)(c5,G8({isInteractive:r},o,{forwardedRef:t}))})})),u5=[`defaultWidth`,`defaultHeight`,`onResize`,`debounceResize`];(0,w.forwardRef)((function(e,t){var n=e.defaultWidth,r=e.defaultHeight,i=e.onResize,a=e.debounceResize,o=K8(e,u5);return(0,G.jsx)(Z1,{defaultWidth:n,defaultHeight:r,onResize:i,debounceResize:a,children:function(e){var n=e.width,r=e.height;return(0,G.jsx)(l5,G8({width:n,height:r},o,{ref:t}))}})}));function d5({data:e}){let{colorScheme:t}=nn(),n=t===`dark`;if(e.length===0)return(0,G.jsx)(Y,{c:`dimmed`,size:`sm`,children:`No reader data available.`});let r=Math.max(...e.map(e=>e.value),1),i=Math.min(...e.map(e=>e.value),0),a=r-i||1,o=n?[`#74c0fc`,`#63e6be`,`#ffa94d`,`#da77f2`,`#66d9e8`,`#ff8787`,`#a9e34b`]:[`#1c7ed6`,`#0ca678`,`#e67700`,`#9c36b5`,`#0c8599`,`#e03131`,`#5c940d`],s=[...e].sort((e,t)=>t.value-e.value);return(0,G.jsx)(`div`,{style:{display:`flex`,flexWrap:`wrap`,justifyContent:`center`,alignItems:`center`,gap:8,padding:16,minHeight:150},children:s.map((e,t)=>{let n=(e.value-i)/a,r=Math.round(14+n*40),s=o[t%o.length];return(0,G.jsx)(`span`,{style:{fontSize:r,fontWeight:n>.5?700:500,color:s,lineHeight:1.2,cursor:`default`},title:`${e.text}: ${e.value} calls`,children:e.text},e.text)})})}var f5={value:()=>{}};function p5(){for(var e=0,t=arguments.length,n={},r;e<t;++e){if(!(r=arguments[e]+``)||r in n||/[\s.]/.test(r))throw Error(`illegal type: `+r);n[r]=[]}return new m5(n)}function m5(e){this._=e}function h5(e,t){return e.trim().split(/^|\s+/).map(function(e){var n=``,r=e.indexOf(`.`);if(r>=0&&(n=e.slice(r+1),e=e.slice(0,r)),e&&!t.hasOwnProperty(e))throw Error(`unknown type: `+e);return{type:e,name:n}})}m5.prototype=p5.prototype={constructor:m5,on:function(e,t){var n=this._,r=h5(e+``,n),i,a=-1,o=r.length;if(arguments.length<2){for(;++a<o;)if((i=(e=r[a]).type)&&(i=g5(n[i],e.name)))return i;return}if(t!=null&&typeof t!=`function`)throw Error(`invalid callback: `+t);for(;++a<o;)if(i=(e=r[a]).type)n[i]=_5(n[i],e.name,t);else if(t==null)for(i in n)n[i]=_5(n[i],e.name,null);return this},copy:function(){var e={},t=this._;for(var n in t)e[n]=t[n].slice();return new m5(e)},call:function(e,t){if((i=arguments.length-2)>0)for(var n=Array(i),r=0,i,a;r<i;++r)n[r]=arguments[r+2];if(!this._.hasOwnProperty(e))throw Error(`unknown type: `+e);for(a=this._[e],r=0,i=a.length;r<i;++r)a[r].value.apply(t,n)},apply:function(e,t,n){if(!this._.hasOwnProperty(e))throw Error(`unknown type: `+e);for(var r=this._[e],i=0,a=r.length;i<a;++i)r[i].value.apply(t,n)}};function g5(e,t){for(var n=0,r=e.length,i;n<r;++n)if((i=e[n]).name===t)return i.value}function _5(e,t,n){for(var r=0,i=e.length;r<i;++r)if(e[r].name===t){e[r]=f5,e=e.slice(0,r).concat(e.slice(r+1));break}return n!=null&&e.push({name:t,value:n}),e}var v5={svg:`http://www.w3.org/2000/svg`,xhtml:`http://www.w3.org/1999/xhtml`,xlink:`http://www.w3.org/1999/xlink`,xml:`http://www.w3.org/XML/1998/namespace`,xmlns:`http://www.w3.org/2000/xmlns/`};function y5(e){var t=e+=``,n=t.indexOf(`:`);return n>=0&&(t=e.slice(0,n))!==`xmlns`&&(e=e.slice(n+1)),v5.hasOwnProperty(t)?{space:v5[t],local:e}:e}function b5(e){return function(){var t=this.ownerDocument,n=this.namespaceURI;return n===`http://www.w3.org/1999/xhtml`&&t.documentElement.namespaceURI===`http://www.w3.org/1999/xhtml`?t.createElement(e):t.createElementNS(n,e)}}function x5(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function S5(e){var t=y5(e);return(t.local?x5:b5)(t)}function C5(){}function w5(e){return e==null?C5:function(){return this.querySelector(e)}}function T5(e){typeof e!=`function`&&(e=w5(e));for(var t=this._groups,n=t.length,r=Array(n),i=0;i<n;++i)for(var a=t[i],o=a.length,s=r[i]=Array(o),c,l,u=0;u<o;++u)(c=a[u])&&(l=e.call(c,c.__data__,u,a))&&(`__data__`in c&&(l.__data__=c.__data__),s[u]=l);return new p9(r,this._parents)}function E5(e){return e==null?[]:Array.isArray(e)?e:Array.from(e)}function D5(){return[]}function O5(e){return e==null?D5:function(){return this.querySelectorAll(e)}}function k5(e){return function(){return E5(e.apply(this,arguments))}}function A5(e){e=typeof e==`function`?k5(e):O5(e);for(var t=this._groups,n=t.length,r=[],i=[],a=0;a<n;++a)for(var o=t[a],s=o.length,c,l=0;l<s;++l)(c=o[l])&&(r.push(e.call(c,c.__data__,l,o)),i.push(c));return new p9(r,i)}function j5(e){return function(){return this.matches(e)}}function M5(e){return function(t){return t.matches(e)}}var N5=Array.prototype.find;function P5(e){return function(){return N5.call(this.children,e)}}function F5(){return this.firstElementChild}function I5(e){return this.select(e==null?F5:P5(typeof e==`function`?e:M5(e)))}var L5=Array.prototype.filter;function R5(){return Array.from(this.children)}function z5(e){return function(){return L5.call(this.children,e)}}function B5(e){return this.selectAll(e==null?R5:z5(typeof e==`function`?e:M5(e)))}function V5(e){typeof e!=`function`&&(e=j5(e));for(var t=this._groups,n=t.length,r=Array(n),i=0;i<n;++i)for(var a=t[i],o=a.length,s=r[i]=[],c,l=0;l<o;++l)(c=a[l])&&e.call(c,c.__data__,l,a)&&s.push(c);return new p9(r,this._parents)}function H5(e){return Array(e.length)}function U5(){return new p9(this._enter||this._groups.map(H5),this._parents)}function W5(e,t){this.ownerDocument=e.ownerDocument,this.namespaceURI=e.namespaceURI,this._next=null,this._parent=e,this.__data__=t}W5.prototype={constructor:W5,appendChild:function(e){return this._parent.insertBefore(e,this._next)},insertBefore:function(e,t){return this._parent.insertBefore(e,t)},querySelector:function(e){return this._parent.querySelector(e)},querySelectorAll:function(e){return this._parent.querySelectorAll(e)}};function G5(e){return function(){return e}}function K5(e,t,n,r,i,a){for(var o=0,s,c=t.length,l=a.length;o<l;++o)(s=t[o])?(s.__data__=a[o],r[o]=s):n[o]=new W5(e,a[o]);for(;o<c;++o)(s=t[o])&&(i[o]=s)}function q5(e,t,n,r,i,a,o){var s,c,l=new Map,u=t.length,d=a.length,f=Array(u),p;for(s=0;s<u;++s)(c=t[s])&&(f[s]=p=o.call(c,c.__data__,s,t)+``,l.has(p)?i[s]=c:l.set(p,c));for(s=0;s<d;++s)p=o.call(e,a[s],s,a)+``,(c=l.get(p))?(r[s]=c,c.__data__=a[s],l.delete(p)):n[s]=new W5(e,a[s]);for(s=0;s<u;++s)(c=t[s])&&l.get(f[s])===c&&(i[s]=c)}function J5(e){return e.__data__}function Y5(e,t){if(!arguments.length)return Array.from(this,J5);var n=t?q5:K5,r=this._parents,i=this._groups;typeof e!=`function`&&(e=G5(e));for(var a=i.length,o=Array(a),s=Array(a),c=Array(a),l=0;l<a;++l){var u=r[l],d=i[l],f=d.length,p=X5(e.call(u,u&&u.__data__,l,r)),m=p.length,h=s[l]=Array(m),g=o[l]=Array(m);n(u,d,h,g,c[l]=Array(f),p,t);for(var _=0,v=0,y,b;_<m;++_)if(y=h[_]){for(_>=v&&(v=_+1);!(b=g[v])&&++v<m;);y._next=b||null}}return o=new p9(o,r),o._enter=s,o._exit=c,o}function X5(e){return typeof e==`object`&&`length`in e?e:Array.from(e)}function Z5(){return new p9(this._exit||this._groups.map(H5),this._parents)}function Q5(e,t,n){var r=this.enter(),i=this,a=this.exit();return typeof e==`function`?(r=e(r),r&&=r.selection()):r=r.append(e+``),t!=null&&(i=t(i),i&&=i.selection()),n==null?a.remove():n(a),r&&i?r.merge(i).order():i}function $5(e){for(var t=e.selection?e.selection():e,n=this._groups,r=t._groups,i=n.length,a=r.length,o=Math.min(i,a),s=Array(i),c=0;c<o;++c)for(var l=n[c],u=r[c],d=l.length,f=s[c]=Array(d),p,m=0;m<d;++m)(p=l[m]||u[m])&&(f[m]=p);for(;c<i;++c)s[c]=n[c];return new p9(s,this._parents)}function e7(){for(var e=this._groups,t=-1,n=e.length;++t<n;)for(var r=e[t],i=r.length-1,a=r[i],o;--i>=0;)(o=r[i])&&(a&&o.compareDocumentPosition(a)^4&&a.parentNode.insertBefore(o,a),a=o);return this}function t7(e){e||=n7;function t(t,n){return t&&n?e(t.__data__,n.__data__):!t-!n}for(var n=this._groups,r=n.length,i=Array(r),a=0;a<r;++a){for(var o=n[a],s=o.length,c=i[a]=Array(s),l,u=0;u<s;++u)(l=o[u])&&(c[u]=l);c.sort(t)}return new p9(i,this._parents).order()}function n7(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}function r7(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}function i7(){return Array.from(this)}function a7(){for(var e=this._groups,t=0,n=e.length;t<n;++t)for(var r=e[t],i=0,a=r.length;i<a;++i){var o=r[i];if(o)return o}return null}function o7(){let e=0;for(let t of this)++e;return e}function s7(){return!this.node()}function c7(e){for(var t=this._groups,n=0,r=t.length;n<r;++n)for(var i=t[n],a=0,o=i.length,s;a<o;++a)(s=i[a])&&e.call(s,s.__data__,a,i);return this}function l7(e){return function(){this.removeAttribute(e)}}function u7(e){return function(){this.removeAttributeNS(e.space,e.local)}}function d7(e,t){return function(){this.setAttribute(e,t)}}function f7(e,t){return function(){this.setAttributeNS(e.space,e.local,t)}}function p7(e,t){return function(){var n=t.apply(this,arguments);n==null?this.removeAttribute(e):this.setAttribute(e,n)}}function m7(e,t){return function(){var n=t.apply(this,arguments);n==null?this.removeAttributeNS(e.space,e.local):this.setAttributeNS(e.space,e.local,n)}}function h7(e,t){var n=y5(e);if(arguments.length<2){var r=this.node();return n.local?r.getAttributeNS(n.space,n.local):r.getAttribute(n)}return this.each((t==null?n.local?u7:l7:typeof t==`function`?n.local?m7:p7:n.local?f7:d7)(n,t))}function g7(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView}function _7(e){return function(){this.style.removeProperty(e)}}function v7(e,t,n){return function(){this.style.setProperty(e,t,n)}}function y7(e,t,n){return function(){var r=t.apply(this,arguments);r==null?this.style.removeProperty(e):this.style.setProperty(e,r,n)}}function b7(e,t,n){return arguments.length>1?this.each((t==null?_7:typeof t==`function`?y7:v7)(e,t,n??``)):x7(this.node(),e)}function x7(e,t){return e.style.getPropertyValue(t)||g7(e).getComputedStyle(e,null).getPropertyValue(t)}function S7(e){return function(){delete this[e]}}function C7(e,t){return function(){this[e]=t}}function w7(e,t){return function(){var n=t.apply(this,arguments);n==null?delete this[e]:this[e]=n}}function T7(e,t){return arguments.length>1?this.each((t==null?S7:typeof t==`function`?w7:C7)(e,t)):this.node()[e]}function E7(e){return e.trim().split(/^|\s+/)}function D7(e){return e.classList||new O7(e)}function O7(e){this._node=e,this._names=E7(e.getAttribute(`class`)||``)}O7.prototype={add:function(e){this._names.indexOf(e)<0&&(this._names.push(e),this._node.setAttribute(`class`,this._names.join(` `)))},remove:function(e){var t=this._names.indexOf(e);t>=0&&(this._names.splice(t,1),this._node.setAttribute(`class`,this._names.join(` `)))},contains:function(e){return this._names.indexOf(e)>=0}};function k7(e,t){for(var n=D7(e),r=-1,i=t.length;++r<i;)n.add(t[r])}function A7(e,t){for(var n=D7(e),r=-1,i=t.length;++r<i;)n.remove(t[r])}function j7(e){return function(){k7(this,e)}}function M7(e){return function(){A7(this,e)}}function N7(e,t){return function(){(t.apply(this,arguments)?k7:A7)(this,e)}}function P7(e,t){var n=E7(e+``);if(arguments.length<2){for(var r=D7(this.node()),i=-1,a=n.length;++i<a;)if(!r.contains(n[i]))return!1;return!0}return this.each((typeof t==`function`?N7:t?j7:M7)(n,t))}function F7(){this.textContent=``}function I7(e){return function(){this.textContent=e}}function L7(e){return function(){var t=e.apply(this,arguments);this.textContent=t??``}}function R7(e){return arguments.length?this.each(e==null?F7:(typeof e==`function`?L7:I7)(e)):this.node().textContent}function z7(){this.innerHTML=``}function B7(e){return function(){this.innerHTML=e}}function V7(e){return function(){var t=e.apply(this,arguments);this.innerHTML=t??``}}function H7(e){return arguments.length?this.each(e==null?z7:(typeof e==`function`?V7:B7)(e)):this.node().innerHTML}function U7(){this.nextSibling&&this.parentNode.appendChild(this)}function W7(){return this.each(U7)}function G7(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function K7(){return this.each(G7)}function q7(e){var t=typeof e==`function`?e:S5(e);return this.select(function(){return this.appendChild(t.apply(this,arguments))})}function J7(){return null}function Y7(e,t){var n=typeof e==`function`?e:S5(e),r=t==null?J7:typeof t==`function`?t:w5(t);return this.select(function(){return this.insertBefore(n.apply(this,arguments),r.apply(this,arguments)||null)})}function X7(){var e=this.parentNode;e&&e.removeChild(this)}function Z7(){return this.each(X7)}function Q7(){var e=this.cloneNode(!1),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function $7(){var e=this.cloneNode(!0),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function e9(e){return this.select(e?$7:Q7)}function t9(e){return arguments.length?this.property(`__data__`,e):this.node().__data__}function n9(e){return function(t){e.call(this,t,this.__data__)}}function r9(e){return e.trim().split(/^|\s+/).map(function(e){var t=``,n=e.indexOf(`.`);return n>=0&&(t=e.slice(n+1),e=e.slice(0,n)),{type:e,name:t}})}function i9(e){return function(){var t=this.__on;if(t){for(var n=0,r=-1,i=t.length,a;n<i;++n)a=t[n],(!e.type||a.type===e.type)&&a.name===e.name?this.removeEventListener(a.type,a.listener,a.options):t[++r]=a;++r?t.length=r:delete this.__on}}}function a9(e,t,n){return function(){var r=this.__on,i,a=n9(t);if(r){for(var o=0,s=r.length;o<s;++o)if((i=r[o]).type===e.type&&i.name===e.name){this.removeEventListener(i.type,i.listener,i.options),this.addEventListener(i.type,i.listener=a,i.options=n),i.value=t;return}}this.addEventListener(e.type,a,n),i={type:e.type,name:e.name,value:t,listener:a,options:n},r?r.push(i):this.__on=[i]}}function o9(e,t,n){var r=r9(e+``),i,a=r.length,o;if(arguments.length<2){var s=this.node().__on;if(s){for(var c=0,l=s.length,u;c<l;++c)for(i=0,u=s[c];i<a;++i)if((o=r[i]).type===u.type&&o.name===u.name)return u.value}return}for(s=t?a9:i9,i=0;i<a;++i)this.each(s(r[i],t,n));return this}function s9(e,t,n){var r=g7(e),i=r.CustomEvent;typeof i==`function`?i=new i(t,n):(i=r.document.createEvent(`Event`),n?(i.initEvent(t,n.bubbles,n.cancelable),i.detail=n.detail):i.initEvent(t,!1,!1)),e.dispatchEvent(i)}function c9(e,t){return function(){return s9(this,e,t)}}function l9(e,t){return function(){return s9(this,e,t.apply(this,arguments))}}function u9(e,t){return this.each((typeof t==`function`?l9:c9)(e,t))}function*d9(){for(var e=this._groups,t=0,n=e.length;t<n;++t)for(var r=e[t],i=0,a=r.length,o;i<a;++i)(o=r[i])&&(yield o)}var f9=[null];function p9(e,t){this._groups=e,this._parents=t}function m9(){return new p9([[document.documentElement]],f9)}function h9(){return this}p9.prototype=m9.prototype={constructor:p9,select:T5,selectAll:A5,selectChild:I5,selectChildren:B5,filter:V5,data:Y5,enter:U5,exit:Z5,join:Q5,merge:$5,selection:h9,order:e7,sort:t7,call:r7,nodes:i7,node:a7,size:o7,empty:s7,each:c7,attr:h7,style:b7,property:T7,classed:P7,text:R7,html:H7,raise:W7,lower:K7,append:q7,insert:Y7,remove:Z7,clone:e9,datum:t9,on:o9,dispatch:u9,[Symbol.iterator]:d9};function g9(e){return typeof e==`string`?new p9([[document.querySelector(e)]],[document.documentElement]):new p9([[e]],f9)}var _9=0,v9=0,y9=0,b9=1e3,x9,S9,C9=0,w9=0,T9=0,E9=typeof performance==`object`&&performance.now?performance:Date,D9=typeof window==`object`&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};function O9(){return w9||=(D9(Nee),E9.now()+T9)}function Nee(){w9=0}function k9(){this._call=this._time=this._next=null}k9.prototype=A9.prototype={constructor:k9,restart:function(e,t,n){if(typeof e!=`function`)throw TypeError(`callback is not a function`);n=(n==null?O9():+n)+(t==null?0:+t),!this._next&&S9!==this&&(S9?S9._next=this:x9=this,S9=this),this._call=e,this._time=n,M9()},stop:function(){this._call&&(this._call=null,this._time=1/0,M9())}};function A9(e,t,n){var r=new k9;return r.restart(e,t,n),r}function Pee(){O9(),++_9;for(var e=x9,t;e;)(t=w9-e._time)>=0&&e._call.call(void 0,t),e=e._next;--_9}function j9(){w9=(C9=E9.now())+T9,_9=v9=0;try{Pee()}finally{_9=0,Iee(),w9=0}}function Fee(){var e=E9.now(),t=e-C9;t>b9&&(T9-=t,C9=e)}function Iee(){for(var e,t=x9,n,r=1/0;t;)t._call?(r>t._time&&(r=t._time),e=t,t=t._next):(n=t._next,t._next=null,t=e?e._next=n:x9=n);S9=e,M9(r)}function M9(e){_9||(v9&&=clearTimeout(v9),e-w9>24?(e<1/0&&(v9=setTimeout(j9,e-E9.now()-T9)),y9&&=clearInterval(y9)):(y9||=(C9=E9.now(),setInterval(Fee,b9)),_9=1,D9(j9)))}function N9(e,t,n){var r=new k9;return t=t==null?0:+t,r.restart(n=>{r.stop(),e(n+t)},t,n),r}var Lee=p5(`start`,`end`,`cancel`,`interrupt`),Ree=[];function P9(e,t,n,r,i,a){var o=e.__transition;if(!o)e.__transition={};else if(n in o)return;zee(e,n,{name:t,index:r,group:i,on:Lee,tween:Ree,time:a.time,delay:a.delay,duration:a.duration,ease:a.ease,timer:null,state:0})}function F9(e,t){var n=L9(e,t);if(n.state>0)throw Error(`too late; already scheduled`);return n}function I9(e,t){var n=L9(e,t);if(n.state>3)throw Error(`too late; already running`);return n}function L9(e,t){var n=e.__transition;if(!n||!(n=n[t]))throw Error(`transition not found`);return n}function zee(e,t,n){var r=e.__transition,i;r[t]=n,n.timer=A9(a,0,n.time);function a(e){n.state=1,n.timer.restart(o,n.delay,n.time),n.delay<=e&&o(e-n.delay)}function o(a){var l,u,d,f;if(n.state!==1)return c();for(l in r)if(f=r[l],f.name===n.name){if(f.state===3)return N9(o);f.state===4?(f.state=6,f.timer.stop(),f.on.call(`interrupt`,e,e.__data__,f.index,f.group),delete r[l]):+l<t&&(f.state=6,f.timer.stop(),f.on.call(`cancel`,e,e.__data__,f.index,f.group),delete r[l])}if(N9(function(){n.state===3&&(n.state=4,n.timer.restart(s,n.delay,n.time),s(a))}),n.state=2,n.on.call(`start`,e,e.__data__,n.index,n.group),n.state===2){for(n.state=3,i=Array(d=n.tween.length),l=0,u=-1;l<d;++l)(f=n.tween[l].value.call(e,e.__data__,n.index,n.group))&&(i[++u]=f);i.length=u+1}}function s(t){for(var r=t<n.duration?n.ease.call(null,t/n.duration):(n.timer.restart(c),n.state=5,1),a=-1,o=i.length;++a<o;)i[a].call(e,r);n.state===5&&(n.on.call(`end`,e,e.__data__,n.index,n.group),c())}function c(){for(var i in n.state=6,n.timer.stop(),delete r[t],r)return;delete e.__transition}}function Bee(e,t){var n=e.__transition,r,i,a=!0,o;if(n){for(o in t=t==null?null:t+``,n){if((r=n[o]).name!==t){a=!1;continue}i=r.state>2&&r.state<5,r.state=6,r.timer.stop(),r.on.call(i?`interrupt`:`cancel`,e,e.__data__,r.index,r.group),delete n[o]}a&&delete e.__transition}}function Vee(e){return this.each(function(){Bee(this,e)})}function Hee(e,t){var n,r;return function(){var i=I9(this,e),a=i.tween;if(a!==n){r=n=a;for(var o=0,s=r.length;o<s;++o)if(r[o].name===t){r=r.slice(),r.splice(o,1);break}}i.tween=r}}function Uee(e,t,n){var r,i;if(typeof n!=`function`)throw Error();return function(){var a=I9(this,e),o=a.tween;if(o!==r){i=(r=o).slice();for(var s={name:t,value:n},c=0,l=i.length;c<l;++c)if(i[c].name===t){i[c]=s;break}c===l&&i.push(s)}a.tween=i}}function Wee(e,t){var n=this._id;if(e+=``,arguments.length<2){for(var r=L9(this.node(),n).tween,i=0,a=r.length,o;i<a;++i)if((o=r[i]).name===e)return o.value;return null}return this.each((t==null?Hee:Uee)(n,e,t))}function R9(e,t,n){var r=e._id;return e.each(function(){var e=I9(this,r);(e.value||={})[t]=n.apply(this,arguments)}),function(e){return L9(e,r).value[t]}}function z9(e,t){var n;return(typeof t==`number`?uW:t instanceof _U?rW:(n=_U(t))?(t=n,rW):gW)(e,t)}function Gee(e){return function(){this.removeAttribute(e)}}function Kee(e){return function(){this.removeAttributeNS(e.space,e.local)}}function qee(e,t,n){var r,i=n+``,a;return function(){var o=this.getAttribute(e);return o===i?null:o===r?a:a=t(r=o,n)}}function Jee(e,t,n){var r,i=n+``,a;return function(){var o=this.getAttributeNS(e.space,e.local);return o===i?null:o===r?a:a=t(r=o,n)}}function Yee(e,t,n){var r,i,a;return function(){var o,s=n(this),c;return s==null?void this.removeAttribute(e):(o=this.getAttribute(e),c=s+``,o===c?null:o===r&&c===i?a:(i=c,a=t(r=o,s)))}}function Xee(e,t,n){var r,i,a;return function(){var o,s=n(this),c;return s==null?void this.removeAttributeNS(e.space,e.local):(o=this.getAttributeNS(e.space,e.local),c=s+``,o===c?null:o===r&&c===i?a:(i=c,a=t(r=o,s)))}}function Zee(e,t){var n=y5(e),r=n===`transform`?DW:z9;return this.attrTween(e,typeof t==`function`?(n.local?Xee:Yee)(n,r,R9(this,`attr.`+e,t)):t==null?(n.local?Kee:Gee)(n):(n.local?Jee:qee)(n,r,t))}function Qee(e,t){return function(n){this.setAttribute(e,t.call(this,n))}}function $ee(e,t){return function(n){this.setAttributeNS(e.space,e.local,t.call(this,n))}}function ete(e,t){var n,r;function i(){var i=t.apply(this,arguments);return i!==r&&(n=(r=i)&&$ee(e,i)),n}return i._value=t,i}function tte(e,t){var n,r;function i(){var i=t.apply(this,arguments);return i!==r&&(n=(r=i)&&Qee(e,i)),n}return i._value=t,i}function nte(e,t){var n=`attr.`+e;if(arguments.length<2)return(n=this.tween(n))&&n._value;if(t==null)return this.tween(n,null);if(typeof t!=`function`)throw Error();var r=y5(e);return this.tween(n,(r.local?ete:tte)(r,t))}function rte(e,t){return function(){F9(this,e).delay=+t.apply(this,arguments)}}function ite(e,t){return t=+t,function(){F9(this,e).delay=t}}function ate(e){var t=this._id;return arguments.length?this.each((typeof e==`function`?rte:ite)(t,e)):L9(this.node(),t).delay}function ote(e,t){return function(){I9(this,e).duration=+t.apply(this,arguments)}}function ste(e,t){return t=+t,function(){I9(this,e).duration=t}}function cte(e){var t=this._id;return arguments.length?this.each((typeof e==`function`?ote:ste)(t,e)):L9(this.node(),t).duration}function lte(e,t){if(typeof t!=`function`)throw Error();return function(){I9(this,e).ease=t}}function ute(e){var t=this._id;return arguments.length?this.each(lte(t,e)):L9(this.node(),t).ease}function dte(e,t){return function(){var n=t.apply(this,arguments);if(typeof n!=`function`)throw Error();I9(this,e).ease=n}}function fte(e){if(typeof e!=`function`)throw Error();return this.each(dte(this._id,e))}function pte(e){typeof e!=`function`&&(e=j5(e));for(var t=this._groups,n=t.length,r=Array(n),i=0;i<n;++i)for(var a=t[i],o=a.length,s=r[i]=[],c,l=0;l<o;++l)(c=a[l])&&e.call(c,c.__data__,l,a)&&s.push(c);return new V9(r,this._parents,this._name,this._id)}function mte(e){if(e._id!==this._id)throw Error();for(var t=this._groups,n=e._groups,r=t.length,i=n.length,a=Math.min(r,i),o=Array(r),s=0;s<a;++s)for(var c=t[s],l=n[s],u=c.length,d=o[s]=Array(u),f,p=0;p<u;++p)(f=c[p]||l[p])&&(d[p]=f);for(;s<r;++s)o[s]=t[s];return new V9(o,this._parents,this._name,this._id)}function hte(e){return(e+``).trim().split(/^|\s+/).every(function(e){var t=e.indexOf(`.`);return t>=0&&(e=e.slice(0,t)),!e||e===`start`})}function gte(e,t,n){var r,i,a=hte(t)?F9:I9;return function(){var o=a(this,e),s=o.on;s!==r&&(i=(r=s).copy()).on(t,n),o.on=i}}function _te(e,t){var n=this._id;return arguments.length<2?L9(this.node(),n).on.on(e):this.each(gte(n,e,t))}function vte(e){return function(){var t=this.parentNode;for(var n in this.__transition)if(+n!==e)return;t&&t.removeChild(this)}}function yte(){return this.on(`end.remove`,vte(this._id))}function bte(e){var t=this._name,n=this._id;typeof e!=`function`&&(e=w5(e));for(var r=this._groups,i=r.length,a=Array(i),o=0;o<i;++o)for(var s=r[o],c=s.length,l=a[o]=Array(c),u,d,f=0;f<c;++f)(u=s[f])&&(d=e.call(u,u.__data__,f,s))&&(`__data__`in u&&(d.__data__=u.__data__),l[f]=d,P9(l[f],t,n,f,l,L9(u,n)));return new V9(a,this._parents,t,n)}function xte(e){var t=this._name,n=this._id;typeof e!=`function`&&(e=O5(e));for(var r=this._groups,i=r.length,a=[],o=[],s=0;s<i;++s)for(var c=r[s],l=c.length,u,d=0;d<l;++d)if(u=c[d]){for(var f=e.call(u,u.__data__,d,c),p,m=L9(u,n),h=0,g=f.length;h<g;++h)(p=f[h])&&P9(p,t,n,h,f,m);a.push(f),o.push(u)}return new V9(a,o,t,n)}var Ste=m9.prototype.constructor;function Cte(){return new Ste(this._groups,this._parents)}function wte(e,t){var n,r,i;return function(){var a=x7(this,e),o=(this.style.removeProperty(e),x7(this,e));return a===o?null:a===n&&o===r?i:i=t(n=a,r=o)}}function B9(e){return function(){this.style.removeProperty(e)}}function Tte(e,t,n){var r,i=n+``,a;return function(){var o=x7(this,e);return o===i?null:o===r?a:a=t(r=o,n)}}function Ete(e,t,n){var r,i,a;return function(){var o=x7(this,e),s=n(this),c=s+``;return s??(c=s=(this.style.removeProperty(e),x7(this,e))),o===c?null:o===r&&c===i?a:(i=c,a=t(r=o,s))}}function Dte(e,t){var n,r,i,a=`style.`+t,o=`end.`+a,s;return function(){var c=I9(this,e),l=c.on,u=c.value[a]==null?s||=B9(t):void 0;(l!==n||i!==u)&&(r=(n=l).copy()).on(o,i=u),c.on=r}}function Ote(e,t,n){var r=(e+=``)==`transform`?EW:z9;return t==null?this.styleTween(e,wte(e,r)).on(`end.style.`+e,B9(e)):typeof t==`function`?this.styleTween(e,Ete(e,r,R9(this,`style.`+e,t))).each(Dte(this._id,e)):this.styleTween(e,Tte(e,r,t),n).on(`end.style.`+e,null)}function kte(e,t,n){return function(r){this.style.setProperty(e,t.call(this,r),n)}}function Ate(e,t,n){var r,i;function a(){var a=t.apply(this,arguments);return a!==i&&(r=(i=a)&&kte(e,a,n)),r}return a._value=t,a}function jte(e,t,n){var r=`style.`+(e+=``);if(arguments.length<2)return(r=this.tween(r))&&r._value;if(t==null)return this.tween(r,null);if(typeof t!=`function`)throw Error();return this.tween(r,Ate(e,t,n??``))}function Mte(e){return function(){this.textContent=e}}function Nte(e){return function(){var t=e(this);this.textContent=t??``}}function Pte(e){return this.tween(`text`,typeof e==`function`?Nte(R9(this,`text`,e)):Mte(e==null?``:e+``))}function Fte(e){return function(t){this.textContent=e.call(this,t)}}function Ite(e){var t,n;function r(){var r=e.apply(this,arguments);return r!==n&&(t=(n=r)&&Fte(r)),t}return r._value=e,r}function Lte(e){var t=`text`;if(arguments.length<1)return(t=this.tween(t))&&t._value;if(e==null)return this.tween(t,null);if(typeof e!=`function`)throw Error();return this.tween(t,Ite(e))}function Rte(){for(var e=this._name,t=this._id,n=H9(),r=this._groups,i=r.length,a=0;a<i;++a)for(var o=r[a],s=o.length,c,l=0;l<s;++l)if(c=o[l]){var u=L9(c,t);P9(c,e,n,l,o,{time:u.time+u.delay+u.duration,delay:0,duration:u.duration,ease:u.ease})}return new V9(r,this._parents,e,n)}function zte(){var e,t,n=this,r=n._id,i=n.size();return new Promise(function(a,o){var s={value:o},c={value:function(){--i===0&&a()}};n.each(function(){var n=I9(this,r),i=n.on;i!==e&&(t=(e=i).copy(),t._.cancel.push(s),t._.interrupt.push(s),t._.end.push(c)),n.on=t}),i===0&&a()})}var Bte=0;function V9(e,t,n,r){this._groups=e,this._parents=t,this._name=n,this._id=r}function H9(){return++Bte}var U9=m9.prototype;V9.prototype={constructor:V9,select:bte,selectAll:xte,selectChild:U9.selectChild,selectChildren:U9.selectChildren,filter:pte,merge:mte,selection:Cte,transition:Rte,call:U9.call,nodes:U9.nodes,node:U9.node,size:U9.size,empty:U9.empty,each:U9.each,on:_te,attr:Zee,attrTween:nte,style:Ote,styleTween:jte,text:Pte,textTween:Lte,remove:yte,tween:Wee,delay:ate,duration:cte,ease:ute,easeVarying:fte,end:zte,[Symbol.iterator]:U9[Symbol.iterator]};function Vte(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}var Hte={time:null,delay:0,duration:250,ease:Vte};function Ute(e,t){for(var n;!(n=e.__transition)||!(n=n[t]);)if(!(e=e.parentNode))throw Error(`transition ${t} not found`);return n}function Wte(e){var t,n;e instanceof V9?(t=e._id,e=e._name):(t=H9(),(n=Hte).time=O9(),e=e==null?null:e+``);for(var r=this._groups,i=r.length,a=0;a<i;++a)for(var o=r[a],s=o.length,c,l=0;l<s;++l)(c=o[l])&&P9(c,e,t,l,o,n||Ute(c,t));return new V9(r,this._parents,e,t)}m9.prototype.interrupt=Vee,m9.prototype.transition=Wte;var{abs:Gte,max:Kte,min:qte}=Math;[`w`,`e`].map(W9),[`n`,`s`].map(W9),[`n`,`w`,`e`,`s`,`nw`,`ne`,`sw`,`se`].map(W9);function W9(e){return{type:e}}function G9(e,t,n){this.k=e,this.x=t,this.y=n}G9.prototype={constructor:G9,scale:function(e){return e===1?this:new G9(this.k*e,this.x,this.y)},translate:function(e,t){return e===0&t===0?this:new G9(this.k,this.x+this.k*e,this.y+this.k*t)},apply:function(e){return[e[0]*this.k+this.x,e[1]*this.k+this.y]},applyX:function(e){return e*this.k+this.x},applyY:function(e){return e*this.k+this.y},invert:function(e){return[(e[0]-this.x)/this.k,(e[1]-this.y)/this.k]},invertX:function(e){return(e-this.x)/this.k},invertY:function(e){return(e-this.y)/this.k},rescaleX:function(e){return e.copy().domain(e.range().map(this.invertX,this).map(e.invert,e))},rescaleY:function(e){return e.copy().domain(e.range().map(this.invertY,this).map(e.invert,e))},toString:function(){return`translate(`+this.x+`,`+this.y+`) scale(`+this.k+`)`}};var Jte=new G9(1,0,0);Yte.prototype=G9.prototype;function Yte(e){for(;!e.__zoom;)if(!(e=e.parentNode))return Jte;return e.__zoom}function Xte({usageLog:e,width:t=400,height:n=400}){let r=(0,w.useRef)(null),{colorScheme:i}=nn(),a=i===`dark`,o=[],s=new Map;for(let t of e){if(!t.requestor||!t.doc_title)continue;let e=`${t.requestor}|||${t.doc_title}`;s.set(e,(s.get(e)??0)+1)}for(let[e,t]of s){let[n,r]=e.split(`|||`);o.push({requestor:n,doc:r,count:t})}let c=[...new Set(o.map(e=>e.requestor))],l=[...new Set(o.map(e=>e.doc))];return(0,w.useEffect)(()=>{if(!r.current||o.length===0)return;let e=g9(r.current);e.selectAll(`*`).remove();let i=[...c.map(e=>({id:e,group:`reader`})),...l.map(e=>({id:e,group:`document`}))];if(i.length===0)return;let s=Math.min(t,n)/2-60,u=t/2,d=n/2,f=Math.PI/Math.max(c.length,1),p=Math.PI/Math.max(l.length,1),m=new Map;c.forEach((e,t)=>{let n=Math.PI/2+f*(t+.5);m.set(e,{x:u+s*Math.cos(n),y:d+s*Math.sin(n)})}),l.forEach((e,t)=>{let n=-Math.PI/2+p*(t+.5);m.set(e,{x:u+s*Math.cos(n),y:d+s*Math.sin(n)})});let h=a?`#c1c2c5`:`#495057`,g=a?`rgba(116, 192, 252, 0.3)`:`rgba(28, 126, 214, 0.2)`,_=a?`rgba(116, 192, 252, 0.8)`:`rgba(28, 126, 214, 0.6)`,v=a?`#74c0fc`:`#1c7ed6`,y=a?`#63e6be`:`#0ca678`,b=Math.max(...o.map(e=>e.count),1),x=e.append(`g`);x.selectAll(`path.link`).data(o).enter().append(`path`).attr(`class`,`link`).attr(`d`,e=>{let t=m.get(e.requestor),n=m.get(e.doc);return`M${t.x},${t.y} Q${u},${d} ${n.x},${n.y}`}).attr(`fill`,`none`).attr(`stroke`,g).attr(`stroke-width`,e=>1+e.count/b*3).on(`mouseenter`,function(){g9(this).attr(`stroke`,_).attr(`stroke-width`,3)}).on(`mouseleave`,function(e,t){g9(this).attr(`stroke`,g).attr(`stroke-width`,1+t.count/b*3)}),x.selectAll(`circle.node`).data(i).enter().append(`circle`).attr(`class`,`node`).attr(`cx`,e=>m.get(e.id).x).attr(`cy`,e=>m.get(e.id).y).attr(`r`,5).attr(`fill`,e=>e.group===`reader`?v:y),x.selectAll(`text.label`).data(i).enter().append(`text`).attr(`class`,`label`).attr(`x`,e=>{let t=m.get(e.id);return t.x<u?t.x-10:t.x+10}).attr(`y`,e=>m.get(e.id).y).attr(`text-anchor`,e=>m.get(e.id).x<u?`end`:`start`).attr(`dominant-baseline`,`middle`).attr(`fill`,h).attr(`font-size`,`11px`).text(e=>e.id.length>35?e.id.slice(0,33)+`...`:e.id)},[o,c,l,t,n,a]),o.length===0?(0,G.jsx)(Y,{c:`dimmed`,size:`sm`,children:`Need reader + document data to show access patterns.`}):(0,G.jsxs)(`div`,{children:[(0,G.jsx)(`svg`,{ref:r,width:t,height:n}),(0,G.jsxs)(`div`,{style:{display:`flex`,gap:16,justifyContent:`center`,marginTop:4},children:[(0,G.jsx)(`span`,{style:{fontSize:11,color:a?`#74c0fc`:`#1c7ed6`},children:`● Readers`}),(0,G.jsx)(`span`,{style:{fontSize:11,color:a?`#63e6be`:`#0ca678`},children:`● Documents`})]})]})}function Zte({usageLog:e,width:t=400,height:n=400}){let r=(0,w.useRef)(null),{colorScheme:i}=nn(),a=i===`dark`,o=[],s=new Map;for(let t of e){if(!t.requestor)continue;let e=`${t.requestor}|||${t.operation}`;s.set(e,(s.get(e)??0)+1)}for(let[e,t]of s){let[n,r]=e.split(`|||`);o.push({requestor:n,operation:r,count:t})}let c=[...new Set(o.map(e=>e.requestor))],l=[...new Set(o.map(e=>e.operation))];return(0,w.useEffect)(()=>{if(!r.current||o.length===0)return;let e=g9(r.current);e.selectAll(`*`).remove();let i=[...c.map(e=>({id:e,group:`requestor`})),...l.map(e=>({id:e,group:`operation`}))];if(i.length===0)return;let s=Math.min(t,n)/2-60,u=t/2,d=n/2,f=Math.PI/Math.max(c.length,1),p=Math.PI/Math.max(l.length,1),m=new Map;c.forEach((e,t)=>{let n=Math.PI/2+f*(t+.5);m.set(e,{x:u+s*Math.cos(n),y:d+s*Math.sin(n)})}),l.forEach((e,t)=>{let n=-Math.PI/2+p*(t+.5);m.set(e,{x:u+s*Math.cos(n),y:d+s*Math.sin(n)})});let h=a?`#c1c2c5`:`#495057`,g=a?`rgba(255, 169, 77, 0.3)`:`rgba(232, 89, 12, 0.2)`,_=a?`rgba(255, 169, 77, 0.8)`:`rgba(232, 89, 12, 0.6)`,v=a?`#74c0fc`:`#1c7ed6`,y=a?`#ffa94d`:`#e8590c`,b=Math.max(...o.map(e=>e.count),1),x=e.append(`g`);x.selectAll(`path.link`).data(o).enter().append(`path`).attr(`class`,`link`).attr(`d`,e=>{let t=m.get(e.requestor),n=m.get(e.operation);return`M${t.x},${t.y} Q${u},${d} ${n.x},${n.y}`}).attr(`fill`,`none`).attr(`stroke`,g).attr(`stroke-width`,e=>1+e.count/b*4).on(`mouseenter`,function(){g9(this).attr(`stroke`,_).attr(`stroke-width`,4)}).on(`mouseleave`,function(e,t){g9(this).attr(`stroke`,g).attr(`stroke-width`,1+t.count/b*4)}),x.selectAll(`circle.node`).data(i).enter().append(`circle`).attr(`class`,`node`).attr(`cx`,e=>m.get(e.id).x).attr(`cy`,e=>m.get(e.id).y).attr(`r`,5).attr(`fill`,e=>e.group===`requestor`?v:y),x.selectAll(`text.label`).data(i).enter().append(`text`).attr(`class`,`label`).attr(`x`,e=>{let t=m.get(e.id);return t.x<u?t.x-10:t.x+10}).attr(`y`,e=>m.get(e.id).y).attr(`text-anchor`,e=>m.get(e.id).x<u?`end`:`start`).attr(`dominant-baseline`,`middle`).attr(`fill`,h).attr(`font-size`,`11px`).text(e=>e.id.length>35?e.id.slice(0,33)+`...`:e.id)},[o,c,l,t,n,a]),o.length===0?(0,G.jsx)(Y,{c:`dimmed`,size:`sm`,children:`Need requestor + operation data to show patterns.`}):(0,G.jsxs)(`div`,{children:[(0,G.jsx)(`svg`,{ref:r,width:t,height:n}),(0,G.jsxs)(`div`,{style:{display:`flex`,gap:16,justifyContent:`center`,marginTop:4},children:[(0,G.jsx)(`span`,{style:{fontSize:11,color:a?`#74c0fc`:`#1c7ed6`},children:`● Requestors`}),(0,G.jsx)(`span`,{style:{fontSize:11,color:a?`#ffa94d`:`#e8590c`},children:`● Operations`})]})]})}var Qte=[{value:`7`,label:`Last 7 days`},{value:`30`,label:`Last 30 days`},{value:`90`,label:`Last 90 days`},{value:`all`,label:`All time`}],$te={"remote-mcp":`Remote MCP`,"local-mcp":`Local MCP`,"edge-function":`Edge Function`,webapp:`Web App`,cli:`CLI`,api:`API (identified)`},ene=[{value:``,label:`All paths`},...VF.map(e=>({value:e,label:$te[e]}))],K9=[`#228be6`,`#12b886`,`#e8590c`,`#9c36b5`,`#15aabf`,`#e03131`,`#74b816`,`#4263eb`],q9={text:{fill:`var(--mantine-color-text)`},axis:{ticks:{text:{fill:`var(--mantine-color-dimmed)`,fontSize:11}},legend:{text:{fill:`var(--mantine-color-text)`,fontSize:12}}},grid:{line:{stroke:`var(--mantine-color-default-border)`,strokeWidth:1}},tooltip:{container:{background:`var(--mantine-color-body)`,color:`var(--mantine-color-text)`,border:`1px solid var(--mantine-color-default-border)`,borderRadius:4,fontSize:12}}};function tne(e){let t=new Date;return t.setDate(t.getDate()-e),t.toISOString()}function J9(e,t,n,r,i){let a={};return e!==`all`&&(a.start=tne(Number(e))),t&&(a.start=t),n&&(a.end=n),r&&(a.project_id=r),i&&(a.access_path=i),a}function nne(){let e=Uy(),[t,n]=(0,w.useState)(`30`),[r,i]=(0,w.useState)(``),[a,o]=(0,w.useState)(``),[s,c]=(0,w.useState)(``),[l,u]=(0,w.useState)(``),[d,f]=(0,w.useState)(null),{data:p}=ib({queryKey:[`projects`],queryFn:VP,staleTime:6e4,retry:1}),{data:m}=ib({queryKey:[`config`,`usage_tracking_enabled`],queryFn:()=>Jw(`usage_tracking_enabled`),staleTime:1e4,retry:1}),{data:h,isLoading:g,error:_}=ib({queryKey:[`usageSummary`,d],queryFn:()=>Gw(d),enabled:d!==null,staleTime:6e4,retry:0}),{data:v,isLoading:y}=ib({queryKey:[`usageLog`,d],queryFn:()=>Kw({...d,limit:200}),enabled:d!==null&&h!==void 0,staleTime:6e4,retry:0}),b=ab({mutationFn:e=>Yw(`usage_tracking_enabled`,e?`true`:`false`),onSuccess:(t,n)=>{e.invalidateQueries({queryKey:[`config`]}),qP(`Usage tracking ${n?`enabled`:`disabled`}`,n?`Reads and writes will now be recorded in the usage log.`:`Operations will no longer be recorded.`)}}),x=[{value:``,label:`All projects`},...(p??[]).map(e=>({value:e.id,label:e.name}))],S=m===`true`,C=g||y,T=_,E=(0,w.useCallback)(()=>{let e=J9(t,s,l,r,a);f(e)},[t,s,l,r,a]),D=d??J9(t,s,l,r,a);return(0,G.jsxs)(Pp,{size:`xl`,children:[(0,G.jsx)(`p`,{className:X.eyebrow,children:`Usage`}),(0,G.jsxs)(El,{justify:`space-between`,mb:`md`,children:[(0,G.jsx)(R_,{order:2,children:`Analytics`}),(0,G.jsxs)(El,{gap:`md`,children:[(0,G.jsx)(i_,{label:`Opt-in. Logs each read/write (operation metadata only — no content) to the usage log, powering these charts and the dashboard's agent-activity card. Same setting as usage_tracking_enabled on the Settings page — either place works.`,multiline:!0,w:300,withArrow:!0,openDelay:120,position:`bottom`,children:(0,G.jsx)(A_,{label:`Usage tracking`,checked:S,onChange:e=>b.mutate(e.currentTarget.checked),size:`sm`,color:`green`,disabled:b.isPending})}),(0,G.jsx)(bp,{variant:`subtle`,leftSection:(0,G.jsx)(NC,{size:16}),component:`a`,href:qw(D),download:!0,size:`sm`,children:`Export CSV`})]})]}),(0,G.jsx)(Dp,{withBorder:!0,mb:`md`,p:`sm`,children:(0,G.jsxs)(El,{gap:`sm`,wrap:`wrap`,children:[(0,G.jsx)(u_,{label:`Period`,data:Qte,value:t,onChange:e=>{n(e??`30`),c(``),u(``)},size:`xs`,w:140}),(0,G.jsx)(j_,{label:`Custom start`,placeholder:`YYYY-MM-DD`,value:s,onChange:e=>{c(e.currentTarget.value),n(`all`)},size:`xs`,w:130}),(0,G.jsx)(j_,{label:`Custom end`,placeholder:`YYYY-MM-DD`,value:l,onChange:e=>{u(e.currentTarget.value),n(`all`)},size:`xs`,w:130}),(0,G.jsx)(u_,{label:`Project`,data:x,value:r,onChange:e=>i(e??``),size:`xs`,w:160,clearable:!0}),(0,G.jsx)(u_,{label:`Access path`,data:ene,value:a,onChange:e=>o(e??``),size:`xs`,w:150,clearable:!0}),(0,G.jsx)(C_,{gap:2,justify:`flex-end`,style:{paddingTop:20},children:(0,G.jsx)(bp,{leftSection:(0,G.jsx)(GC,{size:16}),onClick:E,loading:C,size:`sm`,children:`Run Analysis`})})]})}),C&&(0,G.jsx)(El,{justify:`center`,mt:`xl`,children:(0,G.jsx)(cl,{})}),T&&(0,G.jsxs)(Y,{c:`red`,mt:`md`,children:[`Error loading analytics: `,T.message]}),!d&&!C&&(0,G.jsx)(Dp,{withBorder:!0,p:`xl`,mt:`md`,children:(0,G.jsx)(Y,{ta:`center`,c:`dimmed`,size:`lg`,children:`Select filters and click "Run Analysis" to load usage data.`})}),h&&(0,G.jsx)(rne,{summary:h,usageLog:v??[]})]})}function rne({summary:e,usageLog:t}){let n=e.ops_by_operation[0];return(0,G.jsxs)(C_,{gap:`md`,children:[(0,G.jsxs)(y_,{cols:{base:2,sm:4},children:[(0,G.jsx)(Y9,{label:`Total Calls`,value:e.total_count.toLocaleString()}),(0,G.jsx)(Y9,{label:`Unique Requestors`,value:String(e.top_requestors.length)}),(0,G.jsx)(Y9,{label:`Docs Accessed`,value:String(e.top_documents.length)}),(0,G.jsx)(Y9,{label:`Top Operation`,value:n?n.operation:`--`,sub:n?`${n.count} calls`:``})]}),e.total_count===0?(0,G.jsx)(Dp,{withBorder:!0,p:`xl`,children:(0,G.jsx)(Y,{ta:`center`,c:`dimmed`,size:`lg`,children:`No usage data for the selected period. Enable tracking and use the knowledge base to start collecting analytics.`})}):(0,G.jsxs)(G.Fragment,{children:[(0,G.jsxs)(Dp,{withBorder:!0,p:`md`,children:[(0,G.jsx)(Y,{fw:500,mb:`sm`,children:`Calls per Day`}),(0,G.jsx)(`div`,{style:{height:250},children:(0,G.jsx)(l8,{data:e.ops_by_day.map(e=>({day:e.day.slice(5),calls:e.count})),keys:[`calls`],indexBy:`day`,margin:{top:10,right:20,bottom:40,left:50},padding:.3,colors:[`#228be6`],axisBottom:{tickRotation:e.ops_by_day.length>15?-45:0},axisLeft:{legend:`Calls`,legendPosition:`middle`,legendOffset:-40},enableLabel:!1,theme:q9})})]}),(0,G.jsxs)(Jp,{children:[(0,G.jsx)(Jp.Col,{span:{base:12,md:6},children:(0,G.jsxs)(Dp,{withBorder:!0,p:`md`,h:`100%`,children:[(0,G.jsx)(Y,{fw:500,mb:`sm`,children:`By Access Path`}),(0,G.jsx)(`div`,{style:{height:200},children:(0,G.jsx)(l8,{data:e.ops_by_access_path.map(e=>({path:e.access_path,calls:e.count})),keys:[`calls`],indexBy:`path`,margin:{top:10,right:20,bottom:40,left:50},padding:.4,colors:[`#12b886`],enableLabel:!1,theme:q9})})]})}),(0,G.jsx)(Jp.Col,{span:{base:12,md:6},children:(0,G.jsxs)(Dp,{withBorder:!0,p:`md`,h:`100%`,children:[(0,G.jsx)(Y,{fw:500,mb:`sm`,children:`Operations Breakdown`}),(0,G.jsx)(`div`,{style:{height:200},children:(0,G.jsx)(o5,{data:e.ops_by_operation.map((e,t)=>({id:e.operation,label:e.operation,value:e.count,color:K9[t%K9.length]})),margin:{top:20,right:80,bottom:20,left:80},innerRadius:.5,padAngle:1,cornerRadius:3,colors:{datum:`data.color`},arcLinkLabelsTextColor:`var(--mantine-color-text)`,arcLinkLabelsColor:{from:`color`},arcLabelsTextColor:`#fff`,enableArcLabels:!1,theme:q9})})]})})]}),(0,G.jsxs)(Jp,{children:[(0,G.jsx)(Jp.Col,{span:{base:12,md:6},children:(0,G.jsxs)(Dp,{withBorder:!0,p:`md`,h:`100%`,children:[(0,G.jsx)(Y,{fw:500,mb:`sm`,children:`Most Accessed Documents`}),e.top_documents.length===0?(0,G.jsx)(Y,{c:`dimmed`,size:`sm`,children:`No document-specific access recorded.`}):(0,G.jsx)(`div`,{style:{height:Math.max(150,e.top_documents.length*32)},children:(0,G.jsx)(l8,{data:e.top_documents.map(e=>({doc:e.doc_title.length>25?e.doc_title.slice(0,23)+`...`:e.doc_title,calls:e.count})),keys:[`calls`],indexBy:`doc`,layout:`horizontal`,margin:{top:5,right:30,bottom:30,left:160},padding:.3,colors:[`#e8590c`],enableLabel:!0,labelTextColor:`#fff`,theme:q9})})]})}),(0,G.jsx)(Jp.Col,{span:{base:12,md:6},children:(0,G.jsxs)(Dp,{withBorder:!0,p:`md`,h:`100%`,children:[(0,G.jsx)(Y,{fw:500,mb:`sm`,children:`Most Active Requestors`}),e.top_requestors.length===0?(0,G.jsx)(Y,{c:`dimmed`,size:`sm`,children:`No requestor attribution recorded.`}):(0,G.jsx)(`div`,{style:{height:Math.max(150,e.top_requestors.length*32)},children:(0,G.jsx)(l8,{data:e.top_requestors.map(e=>({requestor:e.requestor,calls:e.count})),keys:[`calls`],indexBy:`requestor`,layout:`horizontal`,margin:{top:5,right:30,bottom:30,left:120},padding:.3,colors:[`#9c36b5`],enableLabel:!0,labelTextColor:`#fff`,theme:q9})})]})})]}),(0,G.jsxs)(Jp,{children:[(0,G.jsx)(Jp.Col,{span:{base:12,md:6},children:(0,G.jsxs)(Dp,{withBorder:!0,p:`md`,h:`100%`,children:[(0,G.jsx)(Y,{fw:500,mb:`sm`,children:`Requestor Activity (Word Cloud)`}),e.top_requestors.length===0?(0,G.jsx)(Y,{c:`dimmed`,size:`sm`,children:`No requestor data available.`}):(0,G.jsx)(d5,{data:e.top_requestors.map(e=>({text:e.requestor,value:e.count}))})]})}),(0,G.jsx)(Jp.Col,{span:{base:12,md:6},children:(0,G.jsxs)(Dp,{withBorder:!0,p:`md`,h:`100%`,children:[(0,G.jsx)(Y,{fw:500,mb:`sm`,children:`Requestor → Document Access Patterns`}),(0,G.jsx)(Xte,{usageLog:t})]})})]}),(0,G.jsxs)(Dp,{withBorder:!0,p:`md`,children:[(0,G.jsx)(Y,{fw:500,mb:`sm`,children:`Requestor → Operation Patterns`}),(0,G.jsx)(Zte,{usageLog:t})]})]})]})}function Y9({label:e,value:t,sub:n}){return(0,G.jsxs)(Dp,{withBorder:!0,p:`sm`,children:[(0,G.jsx)(Y,{size:`xs`,c:`dimmed`,tt:`uppercase`,fw:500,children:e}),(0,G.jsx)(Y,{size:`xl`,fw:700,mt:4,children:t}),n&&(0,G.jsx)(Y,{size:`xs`,c:`dimmed`,children:n})]})}async function ine(e){return sw(`/documents/metadata-search`,{method:`POST`,body:JSON.stringify(e)})}function ane(){let e=Rx(),[t,n]=(0,w.useState)([{key:``,value:``}]),[r,i]=(0,w.useState)(``),[a,o]=(0,w.useState)(``),[s,c]=(0,w.useState)(``),[l,u]=(0,w.useState)(25),{data:d}=ib({queryKey:[`metadataKeys`],queryFn:HP,staleTime:6e4}),{data:f}=ib({queryKey:[`projects`],queryFn:VP,staleTime:6e4}),p=(d??[]).map(e=>({value:e.key,label:`${e.key} (${e.doc_count} docs)`})),m=[{value:``,label:`All projects`},...(f??[]).map(e=>({value:e.id,label:e.name}))],h=()=>n(e=>[...e,{key:``,value:``}]),g=e=>n(t=>t.filter((t,n)=>n!==e)),_=(e,t,r)=>n(n=>n.map((n,i)=>i===e?{...n,[t]:r}:n)),{mutate:v,data:y,isPending:b,error:x,reset:S}=ab({mutationFn:e=>ine(e)}),C=(0,w.useCallback)(()=>{let e={};for(let n of t)n.key.trim()&&n.value.trim()&&(e[n.key.trim()]=n.value.trim());return e},[t]),T=(0,w.useCallback)(()=>{let e=C();if(Object.keys(e).length===0)return;let t={metadata_filter:e,limit:l};r&&(t.project_id=r),a&&(t.updated_since=a),s&&(t.created_since=s),S(),v(t)},[C,r,a,s,l,v,S]),E=t.filter(e=>e.key.trim()&&e.value.trim()).length,D=C(),O=`-f '${JSON.stringify(Object.keys(D).length?D:{key:`value`})}'`;return(0,G.jsxs)(`div`,{className:Pw.wrap,children:[(0,G.jsxs)(`div`,{className:X.pageHead,children:[(0,G.jsxs)(`div`,{children:[(0,G.jsx)(`p`,{className:X.eyebrow,children:`Knowledge base`}),(0,G.jsx)(`h1`,{className:X.pageTitle,"data-testid":`page-title`,children:`Metadata Search`}),(0,G.jsx)(`p`,{className:X.pageSub,children:`Find documents by their metadata keys and values.`})]}),(0,G.jsx)(Ow,{cmd:`cerefox metadata search`,args:O})]}),(0,G.jsx)(Dp,{withBorder:!0,mb:`md`,p:`md`,radius:`lg`,children:(0,G.jsxs)(C_,{gap:`sm`,children:[(0,G.jsxs)(Y,{fw:600,size:`sm`,children:[`Metadata filters `,(0,G.jsx)(`span`,{className:X.faint,children:`(all must match)`})]}),t.map((e,n)=>(0,G.jsxs)(El,{gap:`xs`,align:`flex-end`,children:[(0,G.jsx)(u_,{placeholder:`Key`,data:p,value:e.key||null,onChange:e=>_(n,`key`,e??``),searchable:!0,allowDeselect:!0,style:{flex:1},size:`sm`}),(0,G.jsx)(j_,{placeholder:`Value`,value:e.value,onChange:e=>_(n,`value`,e.currentTarget.value),style:{flex:1},size:`sm`}),t.length>1&&(0,G.jsx)(gl,{variant:`subtle`,color:`red`,onClick:()=>g(n),size:`md`,children:(0,G.jsx)($C,{size:16})})]},n)),(0,G.jsx)(bp,{variant:`subtle`,size:`xs`,leftSection:(0,G.jsx)(KC,{size:14}),onClick:h,style:{alignSelf:`flex-start`},children:`Add filter`}),(0,G.jsxs)(El,{gap:`sm`,grow:!0,children:[(0,G.jsx)(u_,{label:`Project`,data:m,value:r,onChange:e=>i(e??``),size:`sm`,clearable:!0}),(0,G.jsx)(Kg,{label:`Limit`,value:l,onChange:e=>u(Number(e)||25),min:1,max:100,size:`sm`})]}),(0,G.jsxs)(El,{gap:`sm`,grow:!0,children:[(0,G.jsx)(j_,{label:`Updated since`,type:`date`,value:a,onChange:e=>o(e.currentTarget.value),size:`sm`}),(0,G.jsx)(j_,{label:`Created since`,type:`date`,value:s,onChange:e=>c(e.currentTarget.value),size:`sm`})]}),(0,G.jsx)(bp,{"data-testid":`metadata-search-submit`,leftSection:(0,G.jsx)(JC,{size:16}),onClick:T,disabled:E===0,loading:b,style:{alignSelf:`flex-start`},children:`Search`})]})}),x&&(0,G.jsxs)(Y,{c:`red`,mt:`md`,children:[`Error: `,x.message]}),y&&(0,G.jsxs)(`div`,{className:`${X.card} ${X.rise}`,style:{overflow:`hidden`},children:[(0,G.jsxs)(`table`,{className:Pw.tbl,children:[(0,G.jsx)(`thead`,{children:(0,G.jsxs)(`tr`,{children:[(0,G.jsx)(`th`,{children:`Document`}),(0,G.jsx)(`th`,{children:`Metadata`}),(0,G.jsx)(`th`,{style:{width:160},children:`Project`}),(0,G.jsx)(`th`,{style:{width:110,textAlign:`right`},children:`Updated`})]})}),(0,G.jsx)(`tbody`,{children:y.length===0?(0,G.jsx)(`tr`,{children:(0,G.jsx)(`td`,{colSpan:4,className:Pw.emptyRow,children:`No documents match the metadata filter.`})}):y.map(t=>{let n=Object.entries(t.doc_metadata??{});return(0,G.jsxs)(`tr`,{style:{cursor:`pointer`},onClick:()=>e(`/document/${t.document_id}`),children:[(0,G.jsx)(`td`,{children:(0,G.jsx)(`span`,{className:X.link,style:{fontSize:13.5},children:t.title})}),(0,G.jsx)(`td`,{children:(0,G.jsxs)(`span`,{style:{display:`inline-flex`,gap:6,flexWrap:`wrap`},children:[n.slice(0,3).map(([e,t])=>(0,G.jsxs)(`span`,{className:`${X.badge} ${X.bNeutral}`,children:[e,`=`,String(t).length>24?`${String(t).slice(0,22)}…`:String(t)]},e)),n.length>3&&(0,G.jsxs)(`span`,{className:`${X.badge} ${X.bNeutral}`,children:[`+`,n.length-3]})]})}),(0,G.jsx)(`td`,{children:(0,G.jsx)(`span`,{style:{display:`inline-flex`,gap:4,flexWrap:`wrap`},children:t.project_names.map(e=>(0,G.jsx)(`span`,{className:`${X.badge} ${X.bNeutral}`,children:e},e))})}),(0,G.jsx)(`td`,{style:{textAlign:`right`},children:(0,G.jsx)(`span`,{className:`${X.faint} ${X.mono}`,style:{fontSize:12},children:t.updated_at?.slice(0,10)??`?`})})]},t.document_id)})})]}),(0,G.jsx)(`div`,{className:Pw.foot,children:(0,G.jsxs)(`span`,{className:Pw.faint,children:[y.length,` document`,y.length===1?``:`s`]})})]})]})}var X9={wrap:`_wrap_gy5et_4`,searchBar:`_searchBar_gy5et_11`,searchInputRow:`_searchInputRow_gy5et_14`,searchInput:`_searchInput_gy5et_14`,searchControls:`_searchControls_gy5et_34`,controlsRight:`_controlsRight_gy5et_41`,filterRow:`_filterRow_gy5et_48`,resultMeta:`_resultMeta_gy5et_57`,results:`_results_gy5et_67`,resultCard:`_resultCard_gy5et_72`,resultCardOpen:`_resultCardOpen_gy5et_80`,resultHead:`_resultHead_gy5et_83`,resultTitleWrap:`_resultTitleWrap_gy5et_90`,resultTitle:`_resultTitle_gy5et_90`,breadcrumb:`_breadcrumb_gy5et_107`,resultMetaR:`_resultMetaR_gy5et_126`,chev:`_chev_gy5et_132`,chevOpen:`_chevOpen_gy5et_137`,resultSnippet:`_resultSnippet_gy5et_140`,resultSnippetOpen:`_resultSnippetOpen_gy5et_152`,resultExpand:`_resultExpand_gy5et_156`,fade:`_fade_gy5et_1`,resultStats:`_resultStats_gy5et_160`,dot:`_dot_gy5et_169`,emptyState:`_emptyState_gy5et_176`},one=[{v:`hybrid`,label:`Hybrid`,icon:XC,desc:`BM25 + embeddings`},{v:`fts`,label:`Keyword`,icon:JC,desc:`Exact full-text`},{v:`semantic`,label:`Semantic`,icon:YC,desc:`Meaning-based`}],sne=[5,10,20];function cne({query:e,mode:t,projectId:n,count:r,reviewStatus:i,metadataFilter:a,onSearch:o}){let[s,c]=(0,w.useState)(e),[l,u]=(0,w.useState)(t===`docs`?`documents`:`chunks`),[d,f]=(0,w.useState)(t===`docs`?`hybrid`:t),[p,m]=(0,w.useState)(n),[h,g]=(0,w.useState)(r),[_,v]=(0,w.useState)(i),[y,b]=(0,w.useState)(()=>Object.entries(a).map(([e,t])=>({key:e,value:t}))),[x,S]=(0,w.useState)(y.length>0),{data:C}=GP(),{data:T}=KP(),E=(0,w.useCallback)(()=>{let e={};for(let t of y)t.key.trim()&&t.value.trim()&&(e[t.key.trim()]=t.value.trim());return e},[y]),D=(0,w.useCallback)(e=>{o({q:s,mode:l===`documents`?`docs`:d,projectId:p,count:h,reviewStatus:_,metadataFilter:E(),...e})},[s,l,d,p,h,_,E,o]),O=e=>{u(e),D({mode:e===`documents`?`docs`:d})},k=e=>{f(e),u(`chunks`),D({mode:e})},A=e=>{m(e),D({projectId:e})},j=e=>{g(e),D({count:e})},M=()=>{let e=_===`pending_review`?``:`pending_review`;v(e),D({reviewStatus:e})},N=T?.map(e=>({value:e.key,label:`${e.key} (${e.doc_count} docs)`}))??[];return(0,G.jsxs)(`div`,{className:`${X.card} ${X9.searchBar} ${X.rise}`,children:[(0,G.jsxs)(`form`,{className:X9.searchInputRow,onSubmit:e=>{e.preventDefault(),D({})},children:[(0,G.jsx)(JC,{size:20}),(0,G.jsx)(`input`,{className:X9.searchInput,value:s,onChange:e=>c(e.currentTarget.value),placeholder:`Search your knowledge base…`}),s&&(0,G.jsx)(`button`,{type:`button`,className:X.iconBtn,style:{width:30,height:30},"aria-label":`Clear`,onClick:()=>{c(``)},children:(0,G.jsx)(tw,{size:16})}),(0,G.jsx)(`button`,{type:`submit`,className:`${X.btn} ${X.btnPrimary}`,children:`Search`})]}),(0,G.jsx)(`div`,{className:X.divider}),(0,G.jsxs)(`div`,{className:X9.searchControls,children:[(0,G.jsxs)(`div`,{className:X.seg,children:[(0,G.jsxs)(`button`,{type:`button`,title:`Whole documents — one entry per document, hybrid-ranked`,className:`${X.segBtn} ${l===`documents`?X.segBtnOn:``}`,onClick:()=>O(`documents`),children:[(0,G.jsx)(FC,{size:14}),`Documents`]}),(0,G.jsxs)(`button`,{type:`button`,title:`Matching chunks — pick a ranker`,className:`${X.segBtn} ${l===`chunks`?X.segBtnOn:``}`,onClick:()=>O(`chunks`),children:[(0,G.jsx)(BC,{size:14}),`Chunks`]})]}),l===`chunks`?(0,G.jsxs)(`span`,{className:X.selectWrap,title:`Ranking method`,children:[(0,G.jsx)(`select`,{className:X.selectEl,value:d,onChange:e=>k(e.currentTarget.value),children:one.map(e=>(0,G.jsx)(`option`,{value:e.v,children:e.label},e.v))}),(0,G.jsx)(CC,{size:14})]}):(0,G.jsx)(`span`,{className:`${X.faint} ${X.mono}`,style:{fontSize:11.5},children:`whole documents · hybrid-ranked`}),(0,G.jsxs)(`div`,{className:X9.controlsRight,children:[(0,G.jsxs)(`span`,{className:X.selectWrap,children:[(0,G.jsx)(LC,{size:14}),(0,G.jsxs)(`select`,{className:X.selectEl,value:p,onChange:e=>A(e.currentTarget.value),children:[(0,G.jsxs)(`option`,{value:``,children:[`All projects (`,C?.length??0,`)`]}),C?.map(e=>(0,G.jsx)(`option`,{value:e.id,children:e.name},e.id))]}),(0,G.jsx)(CC,{size:14})]}),(0,G.jsxs)(`span`,{className:X.selectWrap,children:[(0,G.jsx)(`select`,{className:X.selectEl,value:String(h),onChange:e=>j(Number(e.currentTarget.value)),children:sne.map(e=>(0,G.jsxs)(`option`,{value:e,children:[e,` results`]},e))}),(0,G.jsx)(CC,{size:14})]}),(0,G.jsxs)(`button`,{type:`button`,className:`${X.chip} ${_===`pending_review`?X.chipOn:``}`,onClick:M,children:[(0,G.jsx)(SC,{size:13}),`Pending review`]}),(0,G.jsxs)(`button`,{type:`button`,className:`${X.chip} ${x?X.chipOn:``}`,onClick:()=>S(e=>!e),children:[(0,G.jsx)(mC,{size:13}),`Filters`,y.length>0?` (${y.length})`:``]})]})]}),x&&(0,G.jsxs)(`div`,{className:X9.filterRow,children:[y.map((e,t)=>(0,G.jsxs)(`div`,{style:{display:`flex`,gap:8,alignItems:`center`},children:[(0,G.jsx)(u_,{placeholder:`Key`,data:N,value:e.key||null,onChange:e=>b(n=>n.map((n,r)=>r===t?{...n,key:e||``}:n)),searchable:!0,size:`xs`,w:190}),(0,G.jsx)(j_,{placeholder:`Value`,value:e.value,onChange:e=>b(n=>n.map((n,r)=>r===t?{...n,value:e.currentTarget.value}:n)),size:`xs`,w:190}),(0,G.jsx)(gl,{variant:`subtle`,color:`red`,size:`sm`,onClick:()=>b(e=>e.filter((e,n)=>n!==t)),children:(0,G.jsx)(tw,{size:14})})]},t)),(0,G.jsx)(`button`,{type:`button`,className:`${X.btn} ${X.btnSubtle}`,onClick:()=>b(e=>[...e,{key:``,value:``}]),children:`+ Add filter`}),(0,G.jsx)(`button`,{type:`button`,className:`${X.btn} ${X.btnGhost}`,onClick:()=>D({}),children:`Apply filters`})]})]})}function Z9(e){return`full_content`in e}function lne({score:e,size:t=38}){let n=Math.max(0,Math.min(1,e)),r=Math.round(n*100),i=(t-5)/2,a=2*Math.PI*i,o=r>=70?`var(--green)`:r>=40?`var(--yellow)`:`var(--text-faint)`;return(0,G.jsxs)(`div`,{style:{position:`relative`,width:t,height:t,flexShrink:0},children:[(0,G.jsxs)(`svg`,{width:t,height:t,style:{transform:`rotate(-90deg)`},children:[(0,G.jsx)(`circle`,{cx:t/2,cy:t/2,r:i,fill:`none`,stroke:`var(--border)`,strokeWidth:2.5}),(0,G.jsx)(`circle`,{cx:t/2,cy:t/2,r:i,fill:`none`,stroke:o,strokeWidth:2.5,strokeLinecap:`round`,strokeDasharray:a,strokeDashoffset:a*(1-n),style:{transition:`stroke-dashoffset .6s cubic-bezier(.2,.7,.3,1)`}})]}),(0,G.jsx)(`span`,{style:{position:`absolute`,inset:0,display:`grid`,placeItems:`center`,fontFamily:`var(--font-mono)`,fontSize:t>34?11:9.5,fontWeight:600,color:o},children:r})]})}var Q9=[`--primary`,`--violet`,`--blue`,`--green`,`--yellow`,`--red`];function une(e){let t=0;for(let n=0;n<e.length;n++)t=t*31+e.charCodeAt(n)>>>0;return`var(${Q9[t%Q9.length]})`}var dne={docs:`documents`,hybrid:`chunks`,fts:`chunks`,semantic:`chunks`},fne={docs:`hybrid`,hybrid:`hybrid`,fts:`keyword`,semantic:`semantic`};function pne({data:e,isLoading:t,error:n,hasQuery:r}){let i=Rx(),[a,o]=(0,w.useState)(null),[s,c]=(0,w.useState)(null),l=(0,w.useRef)(null);(0,w.useEffect)(()=>()=>{l.current&&clearTimeout(l.current)},[]);let u=(e,t)=>{navigator.clipboard?.writeText(t),c(e),l.current&&clearTimeout(l.current),l.current=setTimeout(()=>c(null),1200)};if(!r)return(0,G.jsxs)(`div`,{className:`${X.card} ${X9.emptyState}`,style:{marginTop:22},children:[(0,G.jsx)(JC,{size:28}),(0,G.jsx)(`p`,{style:{marginTop:10},children:`Enter a query or pick a project to browse your memory.`})]});if(t)return(0,G.jsxs)(`div`,{style:{display:`flex`,gap:12,justifyContent:`center`,marginTop:40},children:[(0,G.jsx)(cl,{size:`sm`}),(0,G.jsx)(`span`,{className:X.dim,children:`Searching…`})]});if(n)return(0,G.jsx)(Nd,{icon:(0,G.jsx)(hC,{size:16}),title:`Search failed`,color:`red`,mt:`md`,children:n.message});if(!e||e.results.length===0)return(0,G.jsxs)(`div`,{className:`${X.card} ${X9.emptyState}`,style:{marginTop:22},children:[(0,G.jsx)(JC,{size:28}),(0,G.jsx)(`p`,{style:{marginTop:10},children:`No results. Try widening your search or switching mode.`})]});let d=(e.response_bytes/1024).toFixed(1),f=e.results.map(e=>Z9(e)?e.best_score:e.score),p=Math.max(0,...f),m=e=>p>1?e/p:Math.max(0,Math.min(1,e)),h=e.results.length>0&&e.results.every(e=>e.below_confidence===!0);return(0,G.jsxs)(G.Fragment,{children:[h&&(0,G.jsxs)(`div`,{className:X9.resultMeta,style:{color:`var(--warning, #b58900)`},children:[`⚠ No results cleared the confidence threshold — showing the closest`,` `,e.results.length,` candidate`,e.results.length===1?``:`s`,`; judge relevance by their scores.`]}),(0,G.jsxs)(`div`,{className:X9.resultMeta,children:[(0,G.jsxs)(`span`,{children:[(0,G.jsx)(`b`,{className:X.mono,style:{color:`var(--text)`},children:e.total_found}),` `,`result`,e.total_found===1?``:`s`,` ·`,` `,(0,G.jsx)(`span`,{className:X.mono,style:{color:`var(--primary)`},children:dne[e.mode]}),` `,`ranked by`,` `,(0,G.jsx)(`span`,{className:X.mono,style:{color:`var(--primary)`},children:fne[e.mode]}),` `,`relevance`]}),(0,G.jsxs)(`span`,{className:`${X.faint} ${X.mono}`,style:{fontSize:12},children:[e.truncated?`truncated · `:``,d,` KB`]})]}),(0,G.jsx)(`div`,{className:X9.results,children:e.results.map(e=>{let t=Z9(e),n=t?e.document_id:e.chunk_id,r=e.document_id,c=t?e.best_score:e.score,l=e.doc_title||`Untitled`,d=t?e.best_chunk_heading_path:e.heading_path,f=t?e.full_content:e.content,p=e.doc_project_names??[],h=a===n;return(0,G.jsxs)(`article`,{className:`${X.card} ${X9.resultCard} ${h?X9.resultCardOpen:``} ${X.rise}`,children:[(0,G.jsxs)(`div`,{className:X9.resultHead,onClick:()=>o(h?null:n),children:[(0,G.jsx)(lne,{score:m(c)}),(0,G.jsxs)(`div`,{className:X9.resultTitleWrap,children:[(0,G.jsxs)(`div`,{className:X.row,style:{gap:8,marginBottom:5},children:[(0,G.jsx)(`h3`,{className:X9.resultTitle,children:(0,G.jsx)(`span`,{className:X.link,style:{cursor:`pointer`},onClick:e=>{e.stopPropagation(),i(`/document/${r}`)},children:l})}),t?e.is_partial?(0,G.jsx)(`span`,{className:`${X.badge} ${X.bYellow}`,children:`excerpt`}):(0,G.jsx)(`span`,{className:`${X.badge} ${X.bGreen}`,children:`full`}):(0,G.jsx)(`span`,{className:`${X.badge} ${X.bNeutral}`,children:`chunk`})]}),d.length>0&&(0,G.jsx)(`div`,{className:X9.breadcrumb,children:d.map((e,t)=>(0,G.jsxs)(`span`,{children:[t>0&&(0,G.jsx)(TC,{size:11}),(0,G.jsx)(`span`,{children:e})]},t))})]}),(0,G.jsxs)(`div`,{className:X9.resultMetaR,children:[p.map(e=>(0,G.jsxs)(`span`,{className:`${X.badge} ${X.bNeutral}`,children:[(0,G.jsx)(`span`,{className:X9.dot,style:{background:une(e),width:6,height:6}}),e]},e)),(0,G.jsx)(`span`,{className:`${X9.chev} ${h?X9.chevOpen:``}`,children:(0,G.jsx)(CC,{size:16})})]})]}),(0,G.jsx)(`div`,{className:`${X9.resultSnippet} ${h?X9.resultSnippetOpen:``}`,children:f.slice(0,h?4e3:600)}),h&&(0,G.jsxs)(`div`,{className:X9.resultExpand,children:[(0,G.jsx)(`div`,{className:X9.resultStats,children:t?(0,G.jsxs)(G.Fragment,{children:[(0,G.jsxs)(`span`,{children:[e.chunk_count,` chunks`]}),(0,G.jsx)(`span`,{children:`·`}),(0,G.jsxs)(`span`,{children:[e.total_chars.toLocaleString(),` chars`]}),e.doc_updated_at&&(0,G.jsxs)(G.Fragment,{children:[(0,G.jsx)(`span`,{children:`·`}),(0,G.jsxs)(`span`,{children:[`updated`,` `,new Date(e.doc_updated_at).toLocaleDateString()]})]})]}):(0,G.jsxs)(G.Fragment,{children:[(0,G.jsxs)(`span`,{children:[`chunk #`,e.chunk_index]}),(0,G.jsx)(`span`,{children:`·`}),(0,G.jsxs)(`span`,{children:[e.content.length.toLocaleString(),` chars`]})]})}),(0,G.jsxs)(`div`,{className:X.row,style:{gap:8},children:[(0,G.jsxs)(`button`,{type:`button`,className:`${X.btn} ${X.btnGhost}`,onClick:()=>i(`/document/${r}`),children:[(0,G.jsx)(FC,{size:14}),`Open document`]}),(0,G.jsxs)(`button`,{type:`button`,className:`${X.btn} ${X.btnSubtle}`,style:{marginLeft:`auto`},title:s===n?`Copied!`:`Copy CLI command to clipboard`,onClick:()=>u(n,`cerefox document get ${r}`),children:[(0,G.jsx)(QC,{size:14}),(0,G.jsxs)(`span`,{className:X.mono,style:{fontSize:12},children:[`cerefox document get `,r.slice(0,8),`…`]}),s===n?(0,G.jsx)(SC,{size:13,style:{color:`var(--green)`}}):(0,G.jsx)(kC,{size:13})]})]})]})]},n)})})]})}async function mne(e){let t=e.metadata_filter&&Object.keys(e.metadata_filter).length>0?JSON.stringify(e.metadata_filter):void 0;return sw(`/search${lw({q:e.q,mode:e.mode,project_id:e.project_id,count:e.count===void 0?void 0:e.count,review_status:e.review_status,metadata_filter:t})}`)}function hne(e){if(!e)return{};let t={};for(let n of e.split(`,`)){let e=n.indexOf(`:`);e>0&&(t[n.slice(0,e)]=n.slice(e+1))}return t}function gne(e){return Object.entries(e).filter(([e,t])=>e&&t).map(([e,t])=>`${e}:${t}`).join(`,`)}function _ne(){let[e]=oC();return{q:e.get(`q`)||``,mode:e.get(`mode`)||`docs`,projectId:e.get(`project_id`)||``,count:Number(e.get(`count`))||10,reviewStatus:e.get(`review_status`)||``,metadataFilter:hne(e.get(`mf`)||``)}}function vne(e){let t=!!e.q,n={q:e.q||void 0,mode:e.mode,project_id:e.projectId||void 0,count:e.count,review_status:e.reviewStatus||void 0,metadata_filter:Object.keys(e.metadataFilter).length>0?e.metadataFilter:void 0};return ib({queryKey:[`search`,n],queryFn:()=>mne(n),enabled:t})}function yne(){let[,e]=oC(),t=_ne(),{data:n,isLoading:r,error:i}=vne(t),{data:a}=ib({queryKey:[`dashboard`],queryFn:()=>Qw()}),o=(0,w.useCallback)(t=>{let n=new URLSearchParams;t.q&&n.set(`q`,t.q),t.mode!==`docs`&&n.set(`mode`,t.mode),t.projectId&&n.set(`project_id`,t.projectId),t.count!==10&&n.set(`count`,String(t.count)),t.reviewStatus&&n.set(`review_status`,t.reviewStatus);let r=gne(t.metadataFilter);r&&n.set(`mf`,r),e(n)},[e]);return(0,G.jsxs)(`div`,{className:X9.wrap,children:[(0,G.jsxs)(`div`,{className:X.pageHead,children:[(0,G.jsxs)(`div`,{children:[(0,G.jsx)(`p`,{className:X.eyebrow,children:`Knowledge base`}),(0,G.jsx)(`h1`,{className:X.pageTitle,"data-testid":`page-title`,children:`Search memory`})]}),(0,G.jsxs)(`div`,{style:{display:`flex`,flexDirection:`column`,alignItems:`flex-end`,gap:8},children:[a&&(0,G.jsxs)(`span`,{className:`${X.mono} ${X.faint}`,style:{fontSize:12},children:[a.doc_count.toLocaleString(),` docs · `,a.total_chunks.toLocaleString(),` chunks`]}),(0,G.jsx)(Ow,{cmd:`cerefox search`,args:`"${t.q||`query`}"${t.mode===`docs`?``:` --mode ${t.mode}`}`})]})]}),(0,G.jsx)(cne,{query:t.q,mode:t.mode,projectId:t.projectId,count:t.count,reviewStatus:t.reviewStatus,metadataFilter:t.metadataFilter,onSearch:o}),(0,G.jsx)(pne,{data:n,isLoading:r,error:i,hasQuery:!!t.q})]})}async function bne(){return sw(`/config`)}async function xne(e,t){return sw(`/config/${encodeURIComponent(e)}`,{method:`PUT`,headers:{"Content-Type":`application/json`},body:JSON.stringify({value:t})})}var Sne=[`Retrieval`,`Retention`,`Governance`,`Features`],Cne={Retrieval:`How search ranks and filters results.`,Governance:`Attribution and audit requirements for agent calls.`,Retention:`How long document version history is kept.`,Features:`Optional capabilities, off until you turn them on.`};function wne(){let e=Uy(),{data:t,isLoading:n}=ib({queryKey:[`config`],queryFn:bne}),[r,i]=(0,w.useState)(null),[a,o]=(0,w.useState)({}),s=ab({mutationFn:({key:e,value:t})=>xne(e,t),onSuccess:(t,n)=>{qP(`Saved ${n.key}`),e.invalidateQueries({queryKey:[`config`]}),e.invalidateQueries({queryKey:[`config`,n.key]}),o(e=>{let t={...e};return delete t[n.key],t})},onError:e=>{JP(e instanceof Error?e.message:String(e))}});function c(e,t){if(e.high_impact){i({entry:e,value:t});return}s.mutate({key:e.key,value:t})}if(n)return(0,G.jsx)(Y,{children:`Loading settings…`});let l=t?.keys??[];return(0,G.jsxs)(C_,{gap:`lg`,children:[(0,G.jsxs)(`div`,{children:[(0,G.jsx)(R_,{order:2,"data-testid":`page-title`,children:`Settings`}),(0,G.jsx)(Y,{c:`dimmed`,size:`sm`,children:`Runtime configuration stored in the database. A change here applies to every access path — this app, the CLI, and every connected agent.`})]}),Sne.map(e=>{let t=l.filter(t=>t.group===e);return t.length===0?null:(0,G.jsx)(Dp,{withBorder:!0,padding:`md`,"data-testid":`config-group-${e}`,children:(0,G.jsxs)(C_,{gap:`xs`,children:[(0,G.jsxs)(`div`,{children:[(0,G.jsx)(R_,{order:4,children:e}),(0,G.jsx)(Y,{size:`xs`,c:`dimmed`,children:Cne[e]})]}),t.map(e=>(0,G.jsx)(Tne,{entry:e,draft:a[e.key],onDraft:t=>o(n=>({...n,[e.key]:t})),onSave:t=>c(e,t),saving:s.isPending},e.key))]})},e)}),(0,G.jsx)(Zw,{title:`CLI equivalent`,commands:[{cmd:`cerefox config list`},{cmd:`cerefox config get`,args:`min_search_score`},{cmd:`cerefox config set`,args:`min_search_score 0.6`}]}),(0,G.jsx)(uh,{opened:r!==null,onClose:()=>i(null),title:`Confirm this change`,"data-testid":`config-confirm-modal`,children:r&&(0,G.jsxs)(C_,{gap:`sm`,"data-testid":`config-confirm-body`,children:[(0,G.jsxs)(Y,{size:`sm`,children:[`Set `,(0,G.jsx)(Ap,{children:r.entry.key}),` to `,(0,G.jsx)(Ap,{children:r.value}),`?`]}),r.entry.impact_note&&(0,G.jsx)(Nd,{icon:(0,G.jsx)(gC,{size:16}),color:`yellow`,children:(0,G.jsx)(Y,{size:`sm`,children:r.entry.impact_note})}),(0,G.jsxs)(El,{justify:`flex-end`,children:[(0,G.jsx)(bp,{variant:`default`,onClick:()=>i(null),children:`Cancel`}),(0,G.jsx)(bp,{"data-testid":`config-confirm-apply`,loading:s.isPending,onClick:()=>{s.mutate({key:r.entry.key,value:r.value}),i(null)},children:`Apply`})]})]})})]})}function Tne({entry:e,draft:t,onDraft:n,onSave:r,saving:i}){let a=t??e.effective,o=(()=>{let t=e.retired_env_set?.value;if(t===void 0)return!1;let n=Number(t),r=Number(e.effective);return Number.isFinite(n)&&Number.isFinite(r)?n===r:t.trim()===e.effective.trim()})(),s=t!==void 0&&t!==e.effective;return(0,G.jsx)(Dp,{withBorder:!0,padding:`sm`,radius:`sm`,"data-testid":`config-row-${e.key}`,children:(0,G.jsxs)(El,{justify:`space-between`,align:`flex-start`,wrap:`nowrap`,children:[(0,G.jsxs)(`div`,{style:{flex:1,minWidth:0},children:[(0,G.jsxs)(El,{gap:`xs`,wrap:`nowrap`,align:`baseline`,children:[(0,G.jsx)(Y,{size:`sm`,fw:500,children:e.description}),e.value===null&&(0,G.jsx)(dp,{size:`xs`,variant:`light`,color:`gray`,children:`using default`}),e.high_impact&&(0,G.jsx)(dp,{size:`xs`,variant:`light`,color:`yellow`,children:`affects agents`})]}),(0,G.jsx)(Ap,{style:{fontSize:`0.72rem`},children:e.key}),e.retired_env_set&&(0,G.jsx)(Nd,{icon:(0,G.jsx)(gC,{size:14}),color:o?`gray`:`yellow`,mt:`xs`,p:`xs`,"data-testid":`config-retired-env-${e.key}`,children:(0,G.jsxs)(Y,{size:`xs`,children:[(0,G.jsx)(Ap,{children:e.retired_env_set.name}),` is still set in this server's environment (to `,(0,G.jsx)(Ap,{children:e.retired_env_set.value}),`) but is`,` `,(0,G.jsx)(Y,{span:!0,fw:600,children:`no longer read`}),`. This setting moved into the database in v1.1.0 so one value governs every client.`,` `,o?(0,G.jsxs)(G.Fragment,{children:[`The stored value already matches, so nothing changes: delete that line from your `,(0,G.jsx)(Ap,{children:`.env`}),`.`]}):(0,G.jsxs)(Y,{span:!0,fw:600,children:[`Your .env asked for `,e.retired_env_set.value,`, but`,` `,e.effective,` is what actually runs. Set it here if you want the old value back, then delete the line from your .env.`]})]})})]}),(0,G.jsxs)(`div`,{style:{minWidth:190},children:[e.kind===`boolean`?(0,G.jsx)(A_,{checked:a===`true`,disabled:i,onChange:e=>r(e.currentTarget.checked?`true`:`false`),label:a===`true`?`true`:`false`}):e.kind===`number`?(0,G.jsxs)(El,{gap:`xs`,wrap:`nowrap`,children:[(0,G.jsx)(Kg,{value:a===``?``:Number(a),min:e.min??void 0,max:e.max??void 0,step:.05,decimalScale:3,size:`xs`,style:{width:100},onChange:e=>n(String(e))}),(0,G.jsx)(bp,{size:`xs`,disabled:!s||i,onClick:()=>r(a),children:`Save`})]}):(0,G.jsxs)(El,{gap:`xs`,wrap:`nowrap`,children:[(0,G.jsx)(j_,{value:a,size:`xs`,style:{width:120},placeholder:e.default||`(unset)`,onChange:e=>n(e.currentTarget.value)}),(0,G.jsx)(bp,{size:`xs`,disabled:!s||i,onClick:()=>r(a),children:`Save`})]}),(0,G.jsxs)(Y,{size:`xs`,c:`dimmed`,ta:`right`,mt:4,children:[`default if unset: `,e.default||`(empty)`]})]})]})})}var $9=[`--primary`,`--violet`,`--blue`,`--green`,`--yellow`,`--red`];function Ene(e){let t=0;for(let n=0;n<e.length;n++)t=t*31+e.charCodeAt(n)>>>0;return`var(${$9[t%$9.length]})`}function Dne(){let e=Rx(),t=Uy(),{data:n}=GP(),r=new Map(n?.map(e=>[e.id,e.name])??[]),[i,a]=(0,w.useState)(`50`),[o,s]=(0,w.useState)(``),[c,l]=(0,w.useState)(null),{data:u,isLoading:d}=ib({queryKey:[`trash`,i],queryFn:()=>QP(Number(i)),staleTime:1e4}),f=()=>BP(t),p=ab({mutationFn:$P,onSuccess:()=>{f(),qP(`Document restored`)},onError:e=>JP(`Restore failed`,String(e))}),m=ab({mutationFn:eF,onSuccess:()=>{f(),qP(`Permanently deleted`)},onError:e=>JP(`Purge failed`,String(e))});return(0,G.jsx)(Iw,{eyebrow:`Recoverable`,title:`Trash`,subtitle:`Soft-deleted documents — excluded from search until restored or purged.`,headerRight:(0,G.jsx)(`div`,{style:{width:400,maxWidth:`100%`},children:(0,G.jsx)(Zw,{title:`CLI equivalent`,commands:[{cmd:`cerefox document list`,args:`--deleted`},{cmd:`cerefox document restore`,args:`<id>`}]})}),searchValue:o,onSearchChange:s,searchPlaceholder:`Filter trashed documents…`,searchText:e=>e.title,toolbarExtra:(0,G.jsx)(u_,{data:[`50`,`100`,`200`,`500`],value:i,onChange:e=>a(e||`50`),size:`sm`,w:110,"aria-label":`Max rows`}),columns:[{key:`title`,label:`Document`,render:e=>{let t=e.project_ids.find(e=>r.has(e));return(0,G.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:11},children:[(0,G.jsx)(`span`,{style:{width:8,height:8,borderRadius:`50%`,flexShrink:0,background:t?Ene(r.get(t)):`var(--text-faint)`}}),(0,G.jsx)(`span`,{className:X.link,style:{fontSize:13.5},children:e.title})]})}},{key:`project`,label:`Project`,width:160,render:e=>{let t=e.project_ids.filter(e=>r.has(e)).map(e=>r.get(e));return t.length?(0,G.jsx)(`span`,{style:{display:`inline-flex`,gap:4,flexWrap:`wrap`},children:t.map(e=>(0,G.jsx)(`span`,{className:`${X.badge} ${X.bNeutral}`,children:e},e))}):(0,G.jsx)(`span`,{className:X.faint,style:{fontSize:12},children:`—`})}},{key:`size`,label:`Size`,width:110,align:`right`,render:e=>(0,G.jsx)(`span`,{className:`${X.mono} ${X.dim}`,style:{fontSize:12},children:e.total_chars.toLocaleString()})},{key:`deleted`,label:`Deleted`,width:120,align:`right`,render:e=>(0,G.jsx)(`span`,{className:`${X.faint} ${X.mono}`,style:{fontSize:12},children:e.deleted_at?.slice(0,10)??`?`})}],rows:u??[],rowKey:e=>e.id,rowClick:t=>e(`/document/${t.id}`),loading:d,emptyText:`Trash is empty.`,actions:e=>c===e.id?(0,G.jsxs)(G.Fragment,{children:[(0,G.jsx)(`button`,{type:`button`,className:`${X.btn} ${X.btnSubtle}`,style:{color:`var(--red)`},onClick:()=>{m.mutate(e.id),l(null)},children:`Confirm purge`}),(0,G.jsx)(`button`,{type:`button`,className:`${X.btn} ${X.btnSubtle}`,onClick:()=>l(null),children:`Cancel`})]}):(0,G.jsxs)(G.Fragment,{children:[(0,G.jsxs)(`button`,{type:`button`,className:`${X.btn} ${X.btnGhost} ${X.btnWarn}`,title:`Restore from trash`,onClick:()=>p.mutate(e.id),children:[(0,G.jsx)(_C,{size:14}),`Restore`]}),(0,G.jsxs)(`button`,{type:`button`,className:`${X.btn} ${X.btnGhost} ${X.btnDanger}`,title:`Permanently delete (cannot be undone)`,onClick:()=>l(e.id),children:[(0,G.jsx)($C,{size:14}),`Purge`]})]})})}function One(){return(0,G.jsx)(pS,{children:(0,G.jsxs)(dS,{element:(0,G.jsx)(ww,{}),children:[(0,G.jsx)(dS,{path:`/`,element:(0,G.jsx)(oT,{})}),(0,G.jsx)(dS,{path:`/search`,element:(0,G.jsx)(yne,{})}),(0,G.jsx)(dS,{path:`/metadata-search`,element:(0,G.jsx)(ane,{})}),(0,G.jsx)(dS,{path:`/document/:id`,element:(0,G.jsx)(AF,{})}),(0,G.jsx)(dS,{path:`/document/:id/edit`,element:(0,G.jsx)(ZP,{})}),(0,G.jsx)(dS,{path:`/ingest`,element:(0,G.jsx)(LF,{})}),(0,G.jsx)(dS,{path:`/projects`,element:(0,G.jsx)(BF,{})}),(0,G.jsx)(dS,{path:`/projects/:id/documents`,element:(0,G.jsx)(RF,{})}),(0,G.jsx)(dS,{path:`/audit-log`,element:(0,G.jsx)(Ww,{})}),(0,G.jsx)(dS,{path:`/trash`,element:(0,G.jsx)(Dne,{})}),(0,G.jsx)(dS,{path:`/analytics`,element:(0,G.jsx)(nne,{})}),(0,G.jsx)(dS,{path:`/settings`,element:(0,G.jsx)(wne,{})}),(0,G.jsx)(dS,{path:`/help`,element:(0,G.jsx)(PF,{})}),(0,G.jsx)(dS,{path:`/help/*`,element:(0,G.jsx)(PF,{})})]})})}var kne=Nn({primaryColor:`fox`,primaryShade:{light:6,dark:5},colors:{fox:[`#fff1e8`,`#ffdcc6`,`#fcbd97`,`#f99d66`,`#f78440`,`#f57626`,`#e6641a`,`#bf5115`,`#983f10`,`#722f0b`],dark:[`#f3f1f7`,`#c4c0d4`,`#a6a2b8`,`#756f88`,`#332f49`,`#2b2840`,`#1f1c34`,`#161427`,`#121023`,`#0d0b1c`],violet:[`#f3eefe`,`#e0d3fb`,`#c4aef4`,`#aa8aed`,`#9a76e8`,`#8a62e2`,`#7a45d6`,`#6636bb`,`#522a96`,`#3f2175`],blue:[`#e9f2fd`,`#cbe0fa`,`#9cc6f4`,`#6cabef`,`#5aa9f0`,`#3f8fe0`,`#356fd0`,`#2b5aad`,`#22478a`,`#193668`],green:[`#e6f8ef`,`#c3edd9`,`#8fdcb6`,`#5acf95`,`#4ec98a`,`#36b576`,`#2f9e6a`,`#257e54`,`#1d6242`,`#154731`],yellow:[`#fdf6e3`,`#f8e9bd`,`#f0d585`,`#e8c24f`,`#e6bb45`,`#d6a52f`,`#b88824`,`#8f6a1b`,`#6d5115`,`#4d390e`],red:[`#fdecea`,`#f9cfc9`,`#f1a79c`,`#ea7f70`,`#e8675a`,`#dd4a3b`,`#c43a2c`,`#9d2f24`,`#79251c`,`#591b15`]},fontFamily:`Geist, system-ui, -apple-system, sans-serif`,fontFamilyMonospace:`'JetBrains Mono', ui-monospace, monospace`,headings:{fontFamily:`'Space Grotesk', system-ui, sans-serif`,fontWeight:`600`,sizes:{h1:{fontSize:`30px`,lineHeight:`1.15`,fontWeight:`600`},h2:{fontSize:`22px`,lineHeight:`1.2`,fontWeight:`600`},h3:{fontSize:`16px`,lineHeight:`1.3`,fontWeight:`600`}}},defaultRadius:`md`,radius:{xs:`6px`,sm:`8px`,md:`10px`,lg:`14px`,xl:`16px`},shadows:{sm:`0 1px 2px rgba(0,0,0,.10)`,md:`0 10px 30px -12px rgba(40,40,70,.18)`,lg:`0 28px 64px -20px rgba(35,30,80,.28)`},components:{Card:{defaultProps:{radius:`lg`,withBorder:!0,shadow:`sm`,padding:`lg`}},Button:{defaultProps:{radius:`md`},styles:{root:{fontWeight:600}}},Badge:{defaultProps:{radius:`xl`,variant:`light`},styles:{root:{fontFamily:`'JetBrains Mono', monospace`,fontWeight:500,textTransform:`none`}}},TextInput:{defaultProps:{radius:`md`}},Select:{defaultProps:{radius:`md`}},Table:{styles:{th:{fontFamily:`'JetBrains Mono', monospace`,fontSize:`10.5px`,fontWeight:500,letterSpacing:`0.1em`,textTransform:`uppercase`}}},SegmentedControl:{defaultProps:{radius:`md`}},Modal:{defaultProps:{radius:`lg`}},Tabs:{}},other:{fontDisplay:`'Space Grotesk', sans-serif`,fontMono:`'JetBrains Mono', monospace`}}),Ane=new Vy({defaultOptions:{queries:{staleTime:3e4,retry:1}}});(0,nw.createRoot)(document.getElementById(`root`)).render((0,G.jsx)(w.StrictMode,{children:(0,G.jsx)(Wy,{client:Ane,children:(0,G.jsxs)(Mn,{theme:kne,defaultColorScheme:`auto`,children:[(0,G.jsx)(Nv,{position:`top-right`}),(0,G.jsx)($S,{basename:`/app`,children:(0,G.jsx)(One,{})})]})})}));
121
- //# sourceMappingURL=index-sef54G6W.js.map
120
+ `,fill:i,opacity:o,strokeWidth:c,stroke:l===void 0?`transparent`:l,style:{pointerEvents:`none`}})})};function o6(){return o6=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},o6.apply(null,arguments)}var s6={translateX:0,translateY:0,padding:0,itemsSpacing:0,itemDirection:`left-to-right`,justify:!1,symbolShape:`square`,symbolSize:16,symbolSpacing:8},c6={top:0,right:0,bottom:0,left:0},l6=function(e){var t,n=e.direction,r=e.itemsSpacing,i=e.padding,a=e.itemCount,o=e.itemWidth,s=e.itemHeight;if(typeof i!=`number`&&(typeof(t=i)!=`object`||Array.isArray(t)||t===null))throw Error(`Invalid property padding, must be one of: number, object`);var c=typeof i==`number`?{top:i,right:i,bottom:i,left:i}:o6({},c6,i),l=c.left+c.right,u=c.top+c.bottom,d=o+l,f=s+u,p=(a-1)*r;return n===`row`?d=o*a+p+l:n===`column`&&(f=s*a+p+u),{width:d,height:f,padding:c}},u6=function(e){var t=e.anchor,n=e.translateX,r=e.translateY,i=e.containerWidth,a=e.containerHeight,o=e.width,s=e.height,c=n,l=r;switch(t){case`top`:c+=(i-o)/2;break;case`top-right`:c+=i-o;break;case`right`:c+=i-o,l+=(a-s)/2;break;case`bottom-right`:c+=i-o,l+=a-s;break;case`bottom`:c+=(i-o)/2,l+=a-s;break;case`bottom-left`:l+=a-s;break;case`left`:l+=(a-s)/2;break;case`center`:c+=(i-o)/2,l+=(a-s)/2}return{x:c,y:l}},d6=function(e){var t,n,r,i,a,o,s=e.direction,c=e.justify,l=e.symbolSize,u=e.symbolSpacing,d=e.width,f=e.height;switch(s){case`left-to-right`:t=0,n=(f-l)/2,i=f/2,o=`central`,c?(r=d,a=`end`):(r=l+u,a=`start`);break;case`right-to-left`:t=d-l,n=(f-l)/2,i=f/2,o=`central`,c?(r=0,a=`start`):(r=d-l-u,a=`end`);break;case`top-to-bottom`:t=(d-l)/2,n=0,r=d/2,a=`middle`,c?(i=f,o=`alphabetic`):(i=l+u,o=`text-before-edge`);break;case`bottom-to-top`:t=(d-l)/2,n=f-l,r=d/2,a=`middle`,c?(i=0,o=`text-before-edge`):(i=f-l-u,o=`alphabetic`)}return{symbolX:t,symbolY:n,labelX:r,labelY:i,labelAnchor:a,labelAlignment:o}},f6={circle:n6,diamond:r6,square:i6,triangle:a6},p6=function(e){var t=e.x,n=e.y,r=e.width,i=e.height,a=e.data,o=e.direction,s=o===void 0?s6.itemDirection:o,c=e.justify,l=c===void 0?s6.justify:c,u=e.textColor,d=e.background,f=d===void 0?`transparent`:d,p=e.opacity,m=p===void 0?1:p,h=e.symbolShape,g=h===void 0?s6.symbolShape:h,_=e.symbolSize,v=_===void 0?s6.symbolSize:_,y=e.symbolSpacing,b=y===void 0?s6.symbolSpacing:y,x=e.symbolBorderWidth,S=x===void 0?0:x,C=e.symbolBorderColor,T=C===void 0?`transparent`:C,E=e.onClick,D=e.onMouseEnter,O=e.onMouseLeave,k=e.toggleSerie,A=e.effects,j=(0,w.useState)({}),M=j[0],N=j[1],P=gH(),F=(0,w.useCallback)((function(e){A&&N(A.filter((function(e){return e.on===`hover`})).reduce((function(e,t){return o6({},e,t.style)}),{})),D?.(a,e)}),[D,a,A]),I=(0,w.useCallback)((function(e){A&&N(A.filter((function(e){return e.on!==`hover`})).reduce((function(e,t){return o6({},e,t.style)}),{})),O?.(a,e)}),[O,a,A]),L=d6({direction:s,justify:l,symbolSize:M.symbolSize??v,symbolSpacing:b,width:r,height:i}),R=L.symbolX,z=L.symbolY,B=L.labelX,V=L.labelY,H=L.labelAnchor,ee=L.labelAlignment,te=[E,D,O,k].some((function(e){return e!==void 0})),U=typeof g==`function`?g:f6[g];return(0,G.jsxs)(`g`,{transform:`translate(`+t+`,`+n+`)`,style:{opacity:M.itemOpacity??m},children:[(0,G.jsx)(`rect`,{width:r,height:i,fill:M.itemBackground??f,style:{cursor:te?`pointer`:`auto`},onClick:function(e){E?.(a,e),k?.(a.id)},onMouseEnter:F,onMouseLeave:I}),w.createElement(U,o6({id:a.id,x:R,y:z,size:M.symbolSize??v,fill:a.fill??a.color??`black`,borderWidth:M.symbolBorderWidth??S,borderColor:M.symbolBorderColor??T},a.hidden?P.legends.hidden.symbol:void 0)),(0,G.jsx)(J0,{textAnchor:H,style:o6({},P.legends.text,{fill:M.itemTextColor??u??P.legends.text.fill??`black`,dominantBaseline:ee,pointerEvents:`none`,userSelect:`none`},a.hidden?P.legends.hidden.text:void 0),x:B,y:V,children:a.label})]})},m6=function(e){var t=e.data,n=e.x,r=e.y,i=e.direction,a=e.padding,o=a===void 0?s6.padding:a,s=e.justify,c=e.effects,l=e.itemWidth,u=e.itemHeight,d=e.itemDirection,f=d===void 0?s6.itemDirection:d,p=e.itemsSpacing,m=p===void 0?s6.itemsSpacing:p,h=e.itemTextColor,g=e.itemBackground,_=g===void 0?`transparent`:g,v=e.itemOpacity,y=v===void 0?1:v,b=e.symbolShape,x=e.symbolSize,S=e.symbolSpacing,C=e.symbolBorderWidth,w=e.symbolBorderColor,T=e.onClick,E=e.onMouseEnter,D=e.onMouseLeave,O=e.toggleSerie,k=l6({itemCount:t.length,itemWidth:l,itemHeight:u,itemsSpacing:m,direction:i,padding:o}).padding,A=i===`row`?l+m:0,j=i===`column`?u+m:0;return(0,G.jsx)(`g`,{transform:`translate(`+n+`,`+r+`)`,children:t.map((function(e,t){return(0,G.jsx)(p6,{data:e,x:t*A+k.left,y:t*j+k.top,width:l,height:u,direction:f,justify:s,effects:c,textColor:h,background:_,opacity:y,symbolShape:b,symbolSize:x,symbolSpacing:S,symbolBorderWidth:C,symbolBorderColor:w,onClick:T,onMouseEnter:E,onMouseLeave:D,toggleSerie:O},t)}))})},h6=function(e){var t=e.data,n=e.containerWidth,r=e.containerHeight,i=e.translateX,a=i===void 0?s6.translateX:i,o=e.translateY,s=o===void 0?s6.translateY:o,c=e.anchor,l=e.direction,u=e.padding,d=u===void 0?s6.padding:u,f=e.justify,p=e.itemsSpacing,m=p===void 0?s6.itemsSpacing:p,h=e.itemWidth,g=e.itemHeight,_=e.itemDirection,v=e.itemTextColor,y=e.itemBackground,b=e.itemOpacity,x=e.symbolShape,S=e.symbolSize,C=e.symbolSpacing,w=e.symbolBorderWidth,T=e.symbolBorderColor,E=e.onClick,D=e.onMouseEnter,O=e.onMouseLeave,k=e.toggleSerie,A=e.effects,j=l6({itemCount:t.length,itemsSpacing:m,itemWidth:h,itemHeight:g,direction:l,padding:d}),M=j.width,N=j.height,P=u6({anchor:c,translateX:a,translateY:s,containerWidth:n,containerHeight:r,width:M,height:N}),F=P.x,I=P.y;return(0,G.jsx)(m6,{data:t,x:F,y:I,direction:l,padding:d,justify:f,effects:A,itemsSpacing:m,itemWidth:h,itemHeight:g,itemDirection:_,itemTextColor:v,itemBackground:y,itemOpacity:b,symbolShape:x,symbolSize:S,symbolSpacing:C,symbolBorderWidth:w,symbolBorderColor:T,onClick:E,onMouseEnter:D,onMouseLeave:O,toggleSerie:typeof k==`boolean`?void 0:k})},g6={start:`left`,middle:`center`,end:`right`},_6=function(e,t){var n=t.data,r=t.containerWidth,i=t.containerHeight,a=t.translateX,o=a===void 0?0:a,s=t.translateY,c=s===void 0?0:s,l=t.anchor,u=t.direction,d=t.padding,f=d===void 0?0:d,p=t.justify,m=p!==void 0&&p,h=t.itemsSpacing,g=h===void 0?0:h,_=t.itemWidth,v=t.itemHeight,y=t.itemDirection,b=y===void 0?`left-to-right`:y,x=t.itemTextColor,S=t.symbolSize,C=S===void 0?16:S,w=t.symbolSpacing,T=w===void 0?8:w,E=t.theme,D=l6({itemCount:n.length,itemWidth:_,itemHeight:v,itemsSpacing:g,direction:u,padding:f}),O=D.width,k=D.height,A=D.padding,j=u6({anchor:l,translateX:o,translateY:c,containerWidth:r,containerHeight:i,width:O,height:k}),M=j.x,N=j.y,P=u===`row`?_+g:0,F=u===`column`?v+g:0;e.save(),e.translate(M,N),H0(e,E.legends.text),n.forEach((function(t,n){var r=n*P+A.left,i=n*F+A.top,a=d6({direction:b,justify:m,symbolSize:C,symbolSpacing:T,width:_,height:v}),o=a.symbolX,s=a.symbolY,c=a.labelX,l=a.labelY,u=a.labelAnchor,d=a.labelAlignment;e.fillStyle=t.color??`black`,e.fillRect(r+o,i+s,C,C),e.textAlign=g6[u],d===`central`&&(e.textBaseline=`middle`),U0(e,o6({},E.legends.text,{fill:x??E.legends.text.fill}),String(t.label),r+c,i+l)})),e.restore()},v6=function(e,t,n,r,i,a){a>0?(e.moveTo(t+a,n),e.lineTo(t+r-a,n),e.quadraticCurveTo(t+r,n,t+r,n+a),e.lineTo(t+r,n+i-a),e.quadraticCurveTo(t+r,n+i,t+r-a,n+i),e.lineTo(t+a,n+i),e.quadraticCurveTo(t,n+i,t,n+i-a),e.lineTo(t,n+a),e.quadraticCurveTo(t,n,t+a,n),e.closePath()):e.rect(t,n,r,i)};function y6(){return y6=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},y6.apply(null,arguments)}function b6(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}var x6,S6=function(e){var t=e.bars,n=e.annotations,r=C3({data:t,annotations:n,getPosition:function(e){return{x:e.x+e.width/2,y:e.y+e.height/2}},getDimensions:function(e){var t=e.height,n=e.width;return{width:n,height:t,size:Math.max(n,t)}}});return(0,G.jsx)(G.Fragment,{children:r.map((function(e,t){return(0,G.jsx)(j3,y6({},e),t)}))})},C6=function(e){var t=e.width,n=e.height,r=e.legends,i=e.toggleSerie;return(0,G.jsx)(G.Fragment,{children:r.map((function(e,r){var a=e[0],o=e[1];return(0,G.jsx)(h6,y6({},a,{containerWidth:t,containerHeight:n,data:a.data??o,toggleSerie:a.toggleSerie&&a.dataFrom===`keys`?i:void 0}),r)}))})},w6=[`data`],T6=function(e){var t=e.bar,n=t.data,r=b6(t,w6),i=e.style,a=i.borderColor,o=i.color,s=i.height,c=i.labelColor,l=i.labelOpacity,u=i.labelX,d=i.labelY,f=i.transform,p=i.width,m=i.textAnchor,h=e.borderRadius,g=e.borderWidth,_=e.label,v=e.shouldRenderLabel,y=e.isInteractive,b=e.onClick,x=e.onMouseEnter,S=e.onMouseLeave,C=e.tooltip,T=e.isFocusable,E=e.ariaLabel,D=e.ariaLabelledBy,O=e.ariaDescribedBy,k=e.ariaDisabled,A=e.ariaHidden,j=gH(),M=MH(),N=M.showTooltipFromEvent,P=M.showTooltipAt,F=M.hideTooltip,I=(0,w.useMemo)((function(){return function(){return(0,w.createElement)(C,y6({},r,n))}}),[C,r,n]),L=(0,w.useCallback)((function(e){b?.(y6({color:r.color},n),e)}),[r,n,b]),R=(0,w.useCallback)((function(e){return N(I(),e)}),[N,I]),z=(0,w.useCallback)((function(e){x?.(n,e),N(I(),e)}),[n,x,N,I]),B=(0,w.useCallback)((function(e){S?.(n,e),F()}),[n,F,S]),V=(0,w.useCallback)((function(){P(I(),[r.absX+r.width/2,r.absY])}),[P,I,r]),H=(0,w.useCallback)((function(){F()}),[F]);return(0,G.jsxs)(Xz.g,{transform:f,children:[(0,G.jsx)(Xz.rect,{width:Az(p,(function(e){return Math.max(e,0)})),height:Az(s,(function(e){return Math.max(e,0)})),rx:h,ry:h,fill:n.fill??o,strokeWidth:g,stroke:a,focusable:T,tabIndex:T?0:void 0,"aria-label":E?E(n):void 0,"aria-labelledby":D?D(n):void 0,"aria-describedby":O?O(n):void 0,"aria-disabled":k?k(n):void 0,"aria-hidden":A?A(n):void 0,onMouseEnter:y?z:void 0,onMouseMove:y?R:void 0,onMouseLeave:y?B:void 0,onClick:y?L:void 0,onFocus:y&&T?V:void 0,onBlur:y&&T?H:void 0,"data-testid":`bar.item.`+n.id+`.`+n.index}),v&&(0,G.jsx)(J0,{x:u,y:d,textAnchor:m,dominantBaseline:`central`,fillOpacity:l,style:y6({},j.labels.text,{pointerEvents:`none`,fill:c}),children:_})]})},E6=[`color`,`label`],D6={indexBy:`id`,keys:[`value`],groupMode:`stacked`,layout:`vertical`,valueScale:{type:`linear`,nice:!0,round:!1},indexScale:{type:`band`,round:!1},padding:.1,innerPadding:0,enableGridX:!1,enableGridY:!0,enableLabel:!0,label:`formattedValue`,labelPosition:`middle`,labelOffset:0,labelSkipWidth:0,labelSkipHeight:0,labelTextColor:{theme:`labels.text.fill`},colorBy:`id`,colors:{scheme:`nivo`},borderRadius:0,borderWidth:0,borderColor:{from:`color`},isInteractive:!0,tooltip:function(e){var t=e.color,n=e.label,r=b6(e,E6);return(0,G.jsx)(CH,{id:n,value:r.formattedValue,enableChip:!0,color:t})},tooltipLabel:function(e){return e.id+` - `+e.indexValue},legends:[],initialHiddenIds:[],annotations:[],enableTotals:!1,totalsOffset:10},O6=y6({},D6,{layers:[`grid`,`axes`,`bars`,`totals`,`markers`,`legends`,`annotations`],axisTop:null,axisRight:null,axisBottom:{},axisLeft:{},barComponent:T6,defs:[],fill:[],markers:[],animate:!0,animateOnMount:!1,motionConfig:`default`,role:`img`,isFocusable:!1}),k6=y6({},D6,{layers:[`grid`,`axes`,`bars`,`totals`,`legends`,`annotations`],axisTop:null,axisRight:null,axisBottom:{},axisLeft:{},renderBar:function(e,t){var n=t.bar,r=n.color,i=n.height,a=n.width,o=n.x,s=n.y,c=t.borderColor,l=t.borderRadius,u=t.borderWidth,d=t.label,f=t.shouldRenderLabel,p=t.labelStyle,m=t.labelX,h=t.labelY,g=t.textAnchor;e.fillStyle=r,u>0&&(e.strokeStyle=c,e.lineWidth=u),e.beginPath(),v6(e,o,s,a,i,Math.min(l,i)),e.fill(),u>0&&e.stroke(),f&&(e.textBaseline=`middle`,e.textAlign=g===`middle`?`center`:g,U0(e,p,d,o+m,s+h))},pixelRatio:typeof window<`u`&&(x6=window.devicePixelRatio)!=null?x6:1}),A6=function(e,t,n,r,i,a){return v4(r,{all:e.map(t),min:0,max:0},i,a).padding(n)},j6=function(e,t){return e.map((function(e){return y6({},t.reduce((function(e,t){return e[t]=null,e}),{}),e)}))},M6=function(e){return Object.keys(e).reduce((function(t,n){return e[n]&&(t[n]=e[n]),t}),{})},N6=function(e){return[e,Number(e)]};function P6(e,t,n,r){return e===void 0&&(e=D6.layout),n===void 0&&(n=D6.labelPosition),r===void 0&&(r=D6.labelOffset),function(i,a){var o=r*(t?-1:1);if(e===`horizontal`){var s=i/2;return n===`start`?s=t?i:0:n===`end`&&(s=t?0:i),{labelX:s+o,labelY:a/2,textAnchor:n===`middle`?`middle`:t?`end`:`start`}}var c=a/2;return n===`start`?c=t?0:a:n===`end`&&(c=t?a:0),{labelX:i/2,labelY:c-o,textAnchor:`middle`}}}var F6=[`layout`,`width`,`height`,`padding`,`innerPadding`,`valueScale`,`indexScale`,`hiddenIds`],I6=function(e,t){return e>t},L6=function(e,t){return e<t},R6=function(e,t){return Array.from(` `.repeat(t-e),(function(t,n){return e+n}))},z6=function(e){return I6(e,0)?0:e},B6=function(e,t,n,r){var i=e.data,a=e.formatValue,o=e.getColor,s=e.getIndex,c=e.getTooltipLabel,l=e.innerPadding,u=l===void 0?0:l,d=e.keys,f=e.xScale,p=e.yScale,m=e.margin,h=n?L6:I6,g=i.map(M6),_=[];return d.forEach((function(e,n){return R6(0,f.domain().length).forEach((function(l){var d,v=N6(i[l][e]),y=v[0],b=v[1],x=s(i[l]),S=(f(x)??0)+t*n+u*n,C=h(d=b,0)?p(d)??0:r,w=function(e,t){return h(e,0)?r-t:(p(e)??0)-r}(b,C),T={id:e,value:y===null?y:b,formattedValue:a(b),hidden:!1,index:l,indexValue:x,data:g[l]};_.push({key:e+`.`+T.indexValue,index:_.length,data:T,x:S,y:C,absX:m.left+S,absY:m.top+C,width:t,height:w,color:o(T),label:c(T)})}))})),_},V6=function(e,t,n,r){var i=e.data,a=e.formatValue,o=e.getIndex,s=e.getColor,c=e.getTooltipLabel,l=e.keys,u=e.innerPadding,d=u===void 0?0:u,f=e.xScale,p=e.yScale,m=e.margin,h=n?L6:I6,g=i.map(M6),_=[];return l.forEach((function(e,n){return R6(0,p.domain().length).forEach((function(l){var u,v=N6(i[l][e]),y=v[0],b=v[1],x=o(i[l]),S=h(u=b,0)?r:f(u)??0,C=(p(x)??0)+t*n+d*n,w=function(e,t){return h(e,0)?(f(e)??0)-r:r-t}(b,S),T={id:e,value:y===null?y:b,formattedValue:a(b),hidden:!1,index:l,indexValue:x,data:g[l]};_.push({key:e+`.`+T.indexValue,index:_.length,data:T,x:S,y:C,absX:m.left+S,absY:m.top+C,width:w,height:t,color:s(T),label:c(T)})}))})),_},H6=function(e){var t,n,r=e.layout,i=e.width,a=e.height,o=e.padding,s=o===void 0?0:o,c=e.innerPadding,l=c===void 0?0:c,u=e.valueScale,d=e.indexScale,f=e.hiddenIds,p=f===void 0?[]:f,m=b6(e,F6),h=m.keys.filter((function(e){return!p.includes(e)})),g=j6(m.data,h),_=r===`vertical`?[`y`,`x`,i]:[`x`,`y`,a],v=_[0],y=_[1],b=_[2],x=A6(g,m.getIndex,s,d,b,y),S=u.min===`auto`?z6:function(e){return e},C=g.reduce((function(e,t){return[].concat(e,h.map((function(e){return t[e]})))}),[]).filter(Boolean),w=v4(u,{all:C,min:S(Math.min.apply(Math,C)),max:(n=Math.max.apply(Math,C),isFinite(n)?n:0)},v===`x`?i:a,v),T=r===`vertical`?[x,w]:[w,x],E=T[0],D=T[1],O=(x.bandwidth()-l*(h.length-1))/h.length,k=[y6({},m,{data:g,keys:h,innerPadding:l,xScale:E,yScale:D}),O,(t=u.reverse)!=null&&t,w(0)??0];return{xScale:E,yScale:D,bars:O>0?r===`vertical`?B6.apply(void 0,k):V6.apply(void 0,k):[]}},U6=[`data`,`layout`,`width`,`height`,`padding`,`valueScale`,`indexScale`,`hiddenIds`],W6=function(e){var t;return e.some(Array.isArray)?W6((t=[]).concat.apply(t,e)):e},G6=function(e,t,n){var r=e.formatValue,i=e.getColor,a=e.getIndex,o=e.getTooltipLabel,s=e.innerPadding,c=e.stackedData,l=e.xScale,u=e.yScale,d=e.margin,f=[];return c.forEach((function(e){return l.domain().forEach((function(c,p){var m=e[p],h=l(a(m.data))??0,g=(function(e){return u(e[+!n])}(m)??0)+.5*s,_=function(e,t){return(u(e[+!!n])??0)-t}(m,g)-s,v=N6(m.data[e.key]),y=v[0],b=v[1],x={id:e.key,value:y===null?y:b,formattedValue:r(b),hidden:!1,index:p,indexValue:c,data:M6(m.data)};f.push({key:e.key+`.`+c,index:f.length,data:x,x:h,y:g,absX:d.left+h,absY:d.top+g,width:t,height:_,color:i(x),label:o(x)})}))})),f},K6=function(e,t,n){var r=e.formatValue,i=e.getColor,a=e.getIndex,o=e.getTooltipLabel,s=e.innerPadding,c=e.stackedData,l=e.xScale,u=e.yScale,d=e.margin,f=[];return c.forEach((function(e){return u.domain().forEach((function(c,p){var m=e[p],h=u(a(m.data))??0,g=(function(e){return l(e[+!!n])}(m)??0)+.5*s,_=function(e,t){return(l(e[+!n])??0)-t}(m,g)-s,v=N6(m.data[e.key]),y=v[0],b=v[1],x={id:e.key,value:y===null?y:b,formattedValue:r(b),hidden:!1,index:p,indexValue:c,data:M6(m.data)};f.push({key:e.key+`.`+c,index:f.length,data:x,x:g,y:h,absX:d.left+g,absY:d.top+h,width:_,height:t,color:i(x),label:o(x)})}))})),f},q6=function(e){var t,n,r=e.data,i=e.layout,a=e.width,o=e.height,s=e.padding,c=s===void 0?0:s,l=e.valueScale,u=e.indexScale,d=e.hiddenIds,f=d===void 0?[]:d,p=b6(e,U6),m=p.keys.filter((function(e){return!f.includes(e)})),h=vK().keys(m).offset(yK)(j6(r,m)),g=i===`vertical`?[`y`,`x`,a]:[`x`,`y`,o],_=g[0],v=g[1],y=g[2],b=A6(r,p.getIndex,c,u,y,v),x=(n=W6(h),l.type===`log`?n.filter((function(e){return e!==0})):n),S=v4(l,{all:x,min:Math.min.apply(Math,x),max:Math.max.apply(Math,x)},_===`x`?a:o,_),C=i===`vertical`?[b,S]:[S,b],w=C[0],T=C[1],E=p.innerPadding>0?p.innerPadding:0,D=b.bandwidth(),O=[y6({},p,{innerPadding:E,stackedData:h,xScale:w,yScale:T}),D,(t=l.reverse)!=null&&t];return{xScale:w,yScale:T,bars:D>0?i===`vertical`?G6.apply(void 0,O):K6.apply(void 0,O):[]}},J6=function(e){var t=e.bars,n=e.direction,r=e.from,i=e.groupMode,a=e.layout,o=e.legendLabel,s=e.reverse,c=j0(o??(r===`indexes`?`indexValue`:`id`));return r===`indexes`?function(e,t,n){var r=(0,e4.default)(e.map((function(e){return{id:e.data.indexValue??``,label:n(e.data),hidden:e.data.hidden,color:e.color??`#000`}})),(function(e){return e.id}));return t===`horizontal`&&r.reverse(),r}(t,a,c):function(e,t,n,r,i,a){var o=(0,e4.default)(e.map((function(e){return{id:e.data.id,label:a(e.data),hidden:e.data.hidden,color:e.color??`#000`}})),(function(e){return e.id}));return(t===`vertical`&&r===`stacked`&&n===`column`&&!0!==i||t===`horizontal`&&r===`stacked`&&!0===i)&&o.reverse(),o}(t,a,n,i,s,c)},Y6=function(e,t,n){var r=e.get(t)||0;e.set(t,r+n)},X6=function(e,t,n){var r=e.get(t)||0;e.set(t,r+(n>0?n:0))},Z6=function(e,t,n){var r=e.get(t)||0;e.set(t,Math.max(r,Number(n)))},Q6=function(e,t){var n=e.get(t)||0;e.set(t,n+1)},$6=function(e){var t,n=e.indexBy,r=n===void 0?D6.indexBy:n,i=e.keys,a=i===void 0?D6.keys:i,o=e.label,s=o===void 0?D6.label:o,c=e.tooltipLabel,l=c===void 0?D6.tooltipLabel:c,u=e.valueFormat,d=e.colors,f=d===void 0?D6.colors:d,p=e.colorBy,m=p===void 0?D6.colorBy:p,h=e.borderColor,g=h===void 0?D6.borderColor:h,_=e.labelTextColor,v=_===void 0?D6.labelTextColor:_,y=e.groupMode,b=y===void 0?D6.groupMode:y,x=e.layout,S=x===void 0?D6.layout:x,C=e.data,T=e.margin,E=e.width,D=e.height,O=e.padding,k=O===void 0?D6.padding:O,A=e.innerPadding,j=A===void 0?D6.innerPadding:A,M=e.valueScale,N=M===void 0?D6.valueScale:M,P=e.indexScale,F=P===void 0?D6.indexScale:P,I=e.initialHiddenIds,L=I===void 0?D6.initialHiddenIds:I,R=e.enableLabel,z=R===void 0?D6.enableLabel:R,B=e.labelSkipWidth,V=B===void 0?D6.labelSkipWidth:B,H=e.labelSkipHeight,ee=H===void 0?D6.labelSkipHeight:H,te=e.legends,U=te===void 0?D6.legends:te,ne=e.legendLabel,re=e.totalsOffset,ie=re===void 0?D6.totalsOffset:re,ae=(0,w.useState)(L??[]),oe=ae[0],se=ae[1],ce=(0,w.useCallback)((function(e){se((function(t){return t.indexOf(e)>-1?t.filter((function(t){return t!==e})):[].concat(t,[e])}))}),[]),le=M0(r),W=M0(s),ue=M0(l),de=A0(u),fe=gH(),pe=t6(f,m),me=$3(g,fe),he=$3(v,fe),ge=(b===`grouped`?H6:q6)({layout:S,data:C,getIndex:le,keys:a,width:E,height:D,getColor:pe,padding:k,innerPadding:j,valueScale:N,indexScale:F,hiddenIds:oe,formatValue:de,getTooltipLabel:ue,margin:T}),_e=ge.bars,ve=ge.xScale,ye=ge.yScale,be=(0,w.useMemo)((function(){return _e.filter((function(e){return e.data.value!==null})).map((function(e,t){return y6({},e,{index:t})}))}),[_e]),xe=(0,w.useCallback)((function(e){var t=e.width,n=e.height;return!!z&&!(V>0&&t<V)&&!(ee>0&&n<ee)}),[z,V,ee]),Se=(0,w.useMemo)((function(){return a.map((function(e){var t=_e.find((function(t){return t.data.id===e}));return y6({},t,{data:y6({id:e},t?.data,{hidden:oe.includes(e)})})}))}),[oe,a,_e]),Ce=(t=N.reverse)!=null&&t;return{bars:_e,barsWithValue:be,xScale:ve,yScale:ye,getIndex:le,getLabel:W,getTooltipLabel:ue,formatValue:de,getColor:pe,getBorderColor:me,getLabelColor:he,shouldRenderBarLabel:xe,hiddenIds:oe,toggleSerie:ce,legendsWithData:(0,w.useMemo)((function(){return U.map((function(e){return[e,J6({bars:e.dataFrom===`keys`?Se:_e,direction:e.direction,from:e.dataFrom,groupMode:b,layout:S,legendLabel:ne,reverse:Ce})]}))}),[U,Se,_e,b,S,ne,Ce]),barTotals:(0,w.useMemo)((function(){return function(e,t,n,r,i,a,o){r===void 0&&(r=D6.layout),i===void 0&&(i=D6.groupMode);var s=[];if(e.length===0)return s;var c=new Map,l=e[0].width,u=e[0].height;if(i===`stacked`){var d=new Map;e.forEach((function(e){var t=e.data,n=t.indexValue,r=t.value;Y6(c,n,Number(r)),X6(d,n,Number(r))})),d.forEach((function(e,i){var d,f,p,m=c.get(i)||0;r===`vertical`?(d=t(i),f=n(e),p=n(e/2)):(d=t(e),f=n(i),p=t(e/2)),d+=r===`vertical`?l/2:a,f+=r===`vertical`?-a:u/2,s.push({key:`total_`+i,x:d,y:f,value:m,formattedValue:o(m),animationOffset:p})}))}else if(i===`grouped`){var f=new Map,p=new Map;e.forEach((function(e){var t=e.data,n=t.indexValue,r=t.value;Y6(c,n,Number(r)),Z6(f,n,Number(r)),Q6(p,n)})),f.forEach((function(e,i){var d,f,m,h=c.get(i)||0,g=p.get(i);r===`vertical`?(d=t(i),f=n(e),m=n(e/2)):(d=t(e),f=n(i),m=t(e/2)),d+=r===`vertical`?g*l/2:a,f+=r===`vertical`?-a:g*u/2,s.push({key:`total_`+i,x:d,y:f,value:h,formattedValue:o(h),animationOffset:m})}))}return s}(_e,ve,ye,S,b,ie,de)}),[_e,ve,ye,S,b,ie,de])}},e8=function(e){var t=e.data,n=e.springConfig,r=e.animate,i=e.layout,a=i===void 0?O6.layout:i,o=gH();return Cz(t,{keys:function(e){return e.key},from:function(e){return{x:a===`vertical`?e.x:e.animationOffset,y:a===`vertical`?e.animationOffset:e.y,labelOpacity:0}},enter:function(e){return{x:e.x,y:e.y,labelOpacity:1}},update:function(e){return{x:e.x,y:e.y,labelOpacity:1}},leave:function(e){return{x:a===`vertical`?e.x:e.animationOffset,y:a===`vertical`?e.animationOffset:e.y,labelOpacity:0}},config:n,immediate:!r,initial:r?void 0:null})((function(e,t){return(0,G.jsx)(Xz.text,{x:e.x,y:e.y,fillOpacity:e.labelOpacity,style:y6({},o.labels.text,{pointerEvents:`none`}),fontWeight:`bold`,fontSize:o.labels.text.fontSize,fontFamily:o.labels.text.fontFamily,textAnchor:a===`vertical`?`middle`:`start`,alignmentBaseline:a===`vertical`?`alphabetic`:`middle`,children:t.formattedValue},t.key)}))},t8=[`isInteractive`,`animate`,`motionConfig`,`theme`,`renderWrapper`],n8=function(e){var t,n=e.data,r=e.indexBy,i=e.keys,a=e.margin,o=e.width,s=e.height,c=e.groupMode,l=e.layout,u=e.valueScale,d=e.indexScale,f=e.padding,p=e.innerPadding,m=e.axisTop,h=e.axisRight,g=e.axisBottom,_=g===void 0?O6.axisBottom:g,v=e.axisLeft,y=v===void 0?O6.axisLeft:v,b=e.enableGridX,x=b===void 0?O6.enableGridX:b,S=e.enableGridY,C=S===void 0?O6.enableGridY:S,T=e.gridXValues,E=e.gridYValues,D=e.layers,O=D===void 0?O6.layers:D,k=e.barComponent,A=k===void 0?O6.barComponent:k,j=e.enableLabel,M=j===void 0?O6.enableLabel:j,N=e.label,P=e.labelSkipWidth,F=P===void 0?O6.labelSkipWidth:P,I=e.labelSkipHeight,L=I===void 0?O6.labelSkipHeight:I,R=e.labelTextColor,z=e.labelPosition,B=z===void 0?O6.labelPosition:z,V=e.labelOffset,H=V===void 0?O6.labelOffset:V,ee=e.markers,te=ee===void 0?O6.markers:ee,U=e.colorBy,ne=e.colors,re=e.defs,ie=re===void 0?O6.defs:re,ae=e.fill,oe=ae===void 0?O6.fill:ae,se=e.borderRadius,ce=se===void 0?O6.borderRadius:se,le=e.borderWidth,W=le===void 0?O6.borderWidth:le,ue=e.borderColor,de=e.annotations,fe=de===void 0?O6.annotations:de,pe=e.legendLabel,me=e.tooltipLabel,he=e.valueFormat,ge=e.isInteractive,_e=ge===void 0?O6.isInteractive:ge,ve=e.tooltip,ye=ve===void 0?O6.tooltip:ve,be=e.onClick,xe=e.onMouseEnter,Se=e.onMouseLeave,Ce=e.legends,we=e.role,Te=we===void 0?O6.role:we,Ee=e.ariaLabel,De=e.ariaLabelledBy,Oe=e.ariaDescribedBy,ke=e.isFocusable,Ae=ke===void 0?O6.isFocusable:ke,je=e.barAriaLabel,Me=e.barAriaLabelledBy,Ne=e.barAriaDescribedBy,Pe=e.barAriaHidden,Fe=e.barAriaDisabled,Ie=e.initialHiddenIds,Le=e.enableTotals,Re=Le===void 0?O6.enableTotals:Le,ze=e.totalsOffset,Be=ze===void 0?O6.totalsOffset:ze,Ve=e.forwardedRef,He=G1(),Ue=He.animate,We=He.config,Ge=D0(o,s,a),Ke=Ge.outerWidth,qe=Ge.outerHeight,Je=Ge.margin,Ye=Ge.innerWidth,Xe=Ge.innerHeight,Ze=$6({indexBy:r,label:N,tooltipLabel:me,valueFormat:he,colors:ne,colorBy:U,borderColor:ue,labelTextColor:R,groupMode:c,layout:l,data:n,keys:i,margin:Je,width:Ye,height:Xe,padding:f,innerPadding:p,valueScale:u,indexScale:d,enableLabel:M,labelSkipWidth:F,labelSkipHeight:L,legends:Ce,legendLabel:pe,initialHiddenIds:Ie,totalsOffset:Be}),Qe=Ze.bars,$e=Ze.barsWithValue,et=Ze.xScale,tt=Ze.yScale,nt=Ze.getLabel,rt=Ze.getTooltipLabel,it=Ze.getBorderColor,at=Ze.getLabelColor,ot=Ze.shouldRenderBarLabel,st=Ze.toggleSerie,ct=Ze.legendsWithData,lt=Ze.barTotals,ut=Ze.getColor,dt=P6(l,(t=u?.reverse)!=null&&t,B,H),ft=Cz($e,{keys:function(e){return e.key},from:function(e){return y6({borderColor:it(e),color:e.color,height:0,labelColor:at(e),labelOpacity:0},dt(e.width,e.height),{transform:`translate(`+e.x+`, `+(e.y+e.height)+`)`,width:e.width},l===`vertical`?{}:{height:e.height,transform:`translate(`+e.x+`, `+e.y+`)`,width:0})},enter:function(e){return y6({borderColor:it(e),color:e.color,height:e.height,labelColor:at(e),labelOpacity:1},dt(e.width,e.height),{transform:`translate(`+e.x+`, `+e.y+`)`,width:e.width})},update:function(e){return y6({borderColor:it(e),color:e.color,height:e.height,labelColor:at(e),labelOpacity:1},dt(e.width,e.height),{transform:`translate(`+e.x+`, `+e.y+`)`,width:e.width})},leave:function(e){return y6({borderColor:it(e),color:e.color,height:0,labelColor:at(e),labelOpacity:0},dt(e.width,e.height),{labelY:0,transform:`translate(`+e.x+`, `+(e.y+e.height)+`)`,width:e.width},l===`vertical`?{}:y6({},dt(e.width,e.height),{labelX:0,height:e.height,transform:`translate(`+e.x+`, `+e.y+`)`,width:0}))},config:We,immediate:!Ue,initial:Ue?void 0:null}),pt=(0,w.useMemo)((function(){return{borderRadius:ce,borderWidth:W,enableLabel:M,isInteractive:_e,labelSkipWidth:F,labelSkipHeight:L,onClick:be,onMouseEnter:xe,onMouseLeave:Se,getTooltipLabel:rt,tooltip:ye,isFocusable:Ae,ariaLabel:je,ariaLabelledBy:Me,ariaDescribedBy:Ne,ariaHidden:Pe,ariaDisabled:Fe}}),[ce,W,M,rt,_e,L,F,be,xe,Se,ye,Ae,je,Me,Ne,Pe,Fe]),mt=B0(ie,Qe,oe,{dataKey:`data`,targetKey:`data.fill`}),ht={annotations:null,axes:null,bars:null,grid:null,legends:null,markers:null,totals:null};O.includes(`annotations`)&&(ht.annotations=(0,G.jsx)(S6,{bars:Qe,annotations:fe},`annotations`)),O.includes(`axes`)&&(ht.axes=(0,G.jsx)(M4,{xScale:et,yScale:tt,width:Ye,height:Xe,top:m,right:h,bottom:_,left:y},`axes`)),O.includes(`bars`)&&(ht.bars=(0,G.jsx)(w.Fragment,{children:ft((function(e,t){return(0,w.createElement)(A,y6({},pt,{bar:t,style:e,shouldRenderLabel:ot(t),label:nt(t.data)}))}))},`bars`)),O.includes(`grid`)&&(ht.grid=(0,G.jsx)(F4,{width:Ye,height:Xe,xScale:x?et:null,yScale:C?tt:null,xValues:T,yValues:E},`grid`)),O.includes(`legends`)&&(ht.legends=(0,G.jsx)(C6,{width:Ye,height:Xe,legends:ct,toggleSerie:st},`legends`)),O.includes(`markers`)&&(ht.markers=(0,G.jsx)(S0,{markers:te,width:Ye,height:Xe,xScale:et,yScale:tt},`markers`)),O.includes(`totals`)&&Re&&(ht.totals=(0,G.jsx)(e8,{data:lt,springConfig:We,animate:Ue,layout:l},`totals`));var gt=y6({},pt,{margin:Je,width:o,height:s,innerWidth:Ye,innerHeight:Xe,bars:Qe,legendData:ct,enableLabel:M,xScale:et,yScale:tt,tooltip:ye,getTooltipLabel:rt,onClick:be,onMouseEnter:xe,onMouseLeave:Se,getColor:ut});return(0,G.jsx)(y0,{width:Ke,height:qe,margin:Je,defs:mt,role:Te,ariaLabel:Ee,ariaLabelledBy:De,ariaDescribedBy:Oe,isFocusable:Ae,ref:Ve,children:O.map((function(e,t){return typeof e==`function`?(0,G.jsx)(w.Fragment,{children:(0,w.createElement)(e,gt)},t):ht?.[e]??null}))})},r8=(0,w.forwardRef)((function(e,t){var n=e.isInteractive,r=n===void 0?O6.isInteractive:n,i=e.animate,a=i===void 0?O6.animate:i,o=e.motionConfig,s=o===void 0?O6.motionConfig:o,c=e.theme,l=e.renderWrapper,u=b6(e,t8);return(0,G.jsx)(J1,{animate:a,isInteractive:r,motionConfig:s,renderWrapper:l,theme:c,children:(0,G.jsx)(n8,y6({},u,{isInteractive:r,forwardedRef:t}))})})),i8=[`isInteractive`,`renderWrapper`,`theme`],a8=function(e,t,n,r){return e.find((function(e){return F0(e.x+t.left,e.y+t.top,e.width,e.height,n,r)}))},o8=function(e){var t,n=e.data,r=e.indexBy,i=e.keys,a=e.margin,o=e.width,s=e.height,c=e.groupMode,l=e.layout,u=e.valueScale,d=e.indexScale,f=e.padding,p=e.innerPadding,m=e.axisTop,h=e.axisRight,g=e.axisBottom,_=g===void 0?k6.axisBottom:g,v=e.axisLeft,y=v===void 0?k6.axisLeft:v,b=e.enableGridX,x=b===void 0?k6.enableGridX:b,S=e.enableGridY,C=S===void 0?k6.enableGridY:S,T=e.gridXValues,E=e.gridYValues,D=e.labelPosition,O=D===void 0?k6.labelPosition:D,k=e.labelOffset,A=k===void 0?k6.labelOffset:k,j=e.layers,M=j===void 0?k6.layers:j,N=e.renderBar,P=N===void 0?k6.renderBar:N,F=e.enableLabel,I=F===void 0?k6.enableLabel:F,L=e.label,R=e.labelSkipWidth,z=R===void 0?k6.labelSkipWidth:R,B=e.labelSkipHeight,V=B===void 0?k6.labelSkipHeight:B,H=e.labelTextColor,ee=e.colorBy,te=e.colors,U=e.borderRadius,ne=U===void 0?k6.borderRadius:U,re=e.borderWidth,ie=re===void 0?k6.borderWidth:re,ae=e.borderColor,oe=e.annotations,se=oe===void 0?k6.annotations:oe,ce=e.legendLabel,le=e.tooltipLabel,W=e.valueFormat,ue=e.isInteractive,de=ue===void 0?k6.isInteractive:ue,fe=e.tooltip,pe=fe===void 0?k6.tooltip:fe,me=e.onClick,he=e.onMouseEnter,ge=e.onMouseLeave,_e=e.legends,ve=e.pixelRatio,ye=ve===void 0?k6.pixelRatio:ve,be=e.role,xe=e.forwardedRef,Se=e.enableTotals,Ce=Se===void 0?k6.enableTotals:Se,we=e.totalsOffset,Te=we===void 0?k6.totalsOffset:we,Ee=(0,w.useRef)(null),De=gH(),Oe=D0(o,s,a),ke=Oe.margin,Ae=Oe.innerWidth,je=Oe.innerHeight,Me=Oe.outerWidth,Ne=Oe.outerHeight,Pe=$6({indexBy:r,label:L,tooltipLabel:le,valueFormat:W,colors:te,colorBy:ee,borderColor:ae,labelTextColor:H,groupMode:c,layout:l,data:n,keys:i,margin:ke,width:Ae,height:je,padding:f,innerPadding:p,valueScale:u,indexScale:d,enableLabel:I,labelSkipWidth:z,labelSkipHeight:V,legends:_e,legendLabel:ce,totalsOffset:Te}),Fe=Pe.bars,Ie=Pe.barsWithValue,Le=Pe.xScale,Re=Pe.yScale,ze=Pe.getLabel,Be=Pe.getTooltipLabel,Ve=Pe.getBorderColor,He=Pe.getLabelColor,Ue=Pe.shouldRenderBarLabel,We=Pe.legendsWithData,Ge=Pe.barTotals,Ke=Pe.getColor,qe=MH(),Je=qe.showTooltipFromEvent,Ye=qe.hideTooltip,Xe=w3({annotations:C3({data:Fe,annotations:se,getPosition:function(e){return{x:e.x,y:e.y}},getDimensions:function(e){var t=e.width,n=e.height;return{width:t,height:n,size:Math.max(t,n)}}})}),Ze=(0,w.useMemo)((function(){return{borderRadius:ne,borderWidth:ie,isInteractive:de,isFocusable:!1,labelSkipWidth:z,labelSkipHeight:V,margin:ke,width:o,height:s,innerWidth:Ae,innerHeight:je,bars:Fe,legendData:We,enableLabel:I,xScale:Le,yScale:Re,tooltip:pe,getTooltipLabel:Be,onClick:me,onMouseEnter:he,onMouseLeave:ge,getColor:Ke}}),[ne,ie,de,z,V,ke,o,s,Ae,je,Fe,We,I,Le,Re,pe,Be,me,he,ge,Ke]),Qe=A0(W),$e=P6(l,(t=u?.reverse)!=null&&t,O,A);(0,w.useEffect)((function(){if(Ee.current){Ee.current.width=Me*ye,Ee.current.height=Ne*ye;var e=Ee.current.getContext(`2d`);e.scale(ye,ye),e.fillStyle=De.background,e.fillRect(0,0,Me,Ne),e.translate(ke.left,ke.top),M.forEach((function(t){t===`grid`?typeof De.grid.line.strokeWidth==`number`&&De.grid.line.strokeWidth>0&&(e.lineWidth=De.grid.line.strokeWidth,e.strokeStyle=De.grid.line.stroke,x&&R4(e,{width:Ae,height:je,scale:Le,axis:`x`,values:T}),C&&R4(e,{width:Ae,height:je,scale:Re,axis:`y`,values:E})):t===`axes`?L4(e,{xScale:Le,yScale:Re,width:Ae,height:je,top:m,right:h,bottom:_,left:y,theme:De}):t===`bars`?(H0(e,De.text),Ie.forEach((function(t){P(e,y6({bar:t,borderColor:Ve(t),borderRadius:ne,borderWidth:ie,label:ze(t.data),shouldRenderLabel:Ue(t),labelStyle:y6({},De.labels.text,{fill:He(t)})},$e(t.width,t.height)))}))):t===`legends`?We.forEach((function(t){var n=t[0],r=t[1];_6(e,y6({},n,{data:r,containerWidth:Ae,containerHeight:je,theme:De}))})):t===`annotations`?N3(e,{annotations:Xe,theme:De}):t===`totals`&&Ce?function(e,t,n,r){r===void 0&&(r=k6.layout),H0(e,n.labels.text),e.textBaseline=r===`vertical`?`alphabetic`:`middle`,e.textAlign=r===`vertical`?`center`:`start`,t.forEach((function(t){U0(e,n.labels.text,t.formattedValue,t.x,t.y)}))}(e,Ge,De,l):typeof t==`function`&&t(e,Ze)})),e.save()}}),[_,y,h,m,Ie,ne,ie,Xe,x,C,Ve,ze,He,T,E,c,s,je,Ae,Ze,M,l,We,ke.left,ke.top,Ne,Me,ye,P,Le,Re,Ue,De,o,Ge,Ce,Qe,$e]);var et=(0,w.useCallback)((function(e){if(Fe&&Ee.current){var t=I0(Ee.current,e),n=t[0],r=t[1],i=a8(Fe,ke,n,r);i===void 0?Ye():(Je((0,w.createElement)(pe,y6({},i.data,{color:i.color,label:i.label,value:Number(i.data.value)})),e),e.type===`mouseenter`&&he?.(i.data,e))}}),[Ye,ke,he,Fe,Je,pe]),tt=(0,w.useCallback)((function(e){if(Fe&&Ee.current){Ye();var t=I0(Ee.current,e),n=t[0],r=t[1],i=a8(Fe,ke,n,r);i&&ge?.(i.data,e)}}),[Ye,ke,ge,Fe]),nt=(0,w.useCallback)((function(e){if(Fe&&Ee.current){var t=I0(Ee.current,e),n=t[0],r=t[1],i=a8(Fe,ke,n,r);i!==void 0&&me?.(y6({},i.data,{color:i.color}),e)}}),[ke,me,Fe]);return(0,G.jsx)(`canvas`,{ref:V0(Ee,xe),width:Me*ye,height:Ne*ye,style:{width:Me,height:Ne,cursor:de?`auto`:`normal`},onMouseEnter:de?et:void 0,onMouseMove:de?et:void 0,onMouseLeave:de?tt:void 0,onClick:de?nt:void 0,role:be})},s8=(0,w.forwardRef)((function(e,t){var n=e.isInteractive,r=e.renderWrapper,i=e.theme,a=b6(e,i8);return(0,G.jsx)(J1,{isInteractive:n,renderWrapper:r,theme:i,animate:!1,children:(0,G.jsx)(o8,y6({},a,{isInteractive:n,forwardedRef:t}))})})),c8=[`defaultWidth`,`defaultHeight`,`onResize`,`debounceResize`],l8=(0,w.forwardRef)((function(e,t){var n=e.defaultWidth,r=e.defaultHeight,i=e.onResize,a=e.debounceResize,o=b6(e,c8);return(0,G.jsx)(Z1,{defaultWidth:n,defaultHeight:r,onResize:i,debounceResize:a,children:function(e){var n=e.width,r=e.height;return(0,G.jsx)(r8,y6({},o,{width:n,height:r,ref:t}))}})})),u8=[`defaultWidth`,`defaultHeight`,`onResize`,`debounceResize`];(0,w.forwardRef)((function(e,t){var n=e.defaultWidth,r=e.defaultHeight,i=e.onResize,a=e.debounceResize,o=b6(e,u8);return(0,G.jsx)(Z1,{defaultWidth:n,defaultHeight:r,onResize:i,debounceResize:a,children:function(e){var n=e.width,r=e.height;return(0,G.jsx)(s8,y6({},o,{width:n,height:r,ref:t}))}})}));function d8(){return d8=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},d8.apply(null,arguments)}var f8={pointerEvents:`none`},p8=function(e){var t=e.label,n=e.style,r=gH();return(0,G.jsx)(Xz.g,{transform:n.transform,opacity:n.progress,style:f8,children:(0,G.jsx)(J0,{textAnchor:`middle`,dominantBaseline:`central`,style:d8({},r.labels.text,{fill:n.textColor}),children:t})})},m8=function(e){var t=e%(2*Math.PI);return t<0&&(t+=2*Math.PI),t},h8=function(e,t){return e.filter((function(e){return Math.abs(s0(e.arc.endAngle-e.arc.startAngle))>=t}))},g8={startAngle:{enter:function(e){return d8({},e,{endAngle:e.startAngle})},update:function(e){return e},leave:function(e){return d8({},e,{startAngle:e.endAngle})}},middleAngle:{enter:function(e){var t=e.startAngle+(e.endAngle-e.startAngle)/2;return d8({},e,{startAngle:t,endAngle:t})},update:function(e){return e},leave:function(e){var t=e.startAngle+(e.endAngle-e.startAngle)/2;return d8({},e,{startAngle:t,endAngle:t})}},endAngle:{enter:function(e){return d8({},e,{startAngle:e.endAngle})},update:function(e){return e},leave:function(e){return d8({},e,{endAngle:e.startAngle})}},innerRadius:{enter:function(e){return d8({},e,{outerRadius:e.innerRadius})},update:function(e){return e},leave:function(e){return d8({},e,{innerRadius:e.outerRadius})}},centerRadius:{enter:function(e){var t=e.innerRadius+(e.outerRadius-e.innerRadius)/2;return d8({},e,{innerRadius:t,outerRadius:t})},update:function(e){return e},leave:function(e){var t=e.innerRadius+(e.outerRadius-e.innerRadius)/2;return d8({},e,{innerRadius:t,outerRadius:t})}},outerRadius:{enter:function(e){return d8({},e,{innerRadius:e.outerRadius})},update:function(e){return e},leave:function(e){return d8({},e,{outerRadius:e.innerRadius})}},pushIn:{enter:function(e){return d8({},e,{innerRadius:e.innerRadius-e.outerRadius+e.innerRadius,outerRadius:e.innerRadius})},update:function(e){return e},leave:function(e){return d8({},e,{innerRadius:e.outerRadius,outerRadius:e.outerRadius+e.outerRadius-e.innerRadius})}},pushOut:{enter:function(e){return d8({},e,{innerRadius:e.outerRadius,outerRadius:e.outerRadius+e.outerRadius-e.innerRadius})},update:function(e){return e},leave:function(e){return d8({},e,{innerRadius:e.innerRadius-e.outerRadius+e.innerRadius,outerRadius:e.innerRadius})}}},_8=function(e,t){return(0,w.useMemo)((function(){var n=g8[e];return{enter:function(e){return d8({progress:0},n.enter(e.arc),t?t.enter(e):{})},update:function(e){return d8({progress:1},n.update(e.arc),t?t.update(e):{})},leave:function(e){return d8({progress:0},n.leave(e.arc),t?t.leave(e):{})}}}),[e,t])},v8=function(e,t){return l0(c0(e)-Math.PI/2,e.innerRadius+(e.outerRadius-e.innerRadius)*t)},y8=function(e){return function(t,n,r,i){return Az([t,n,r,i],(function(t,n,r,i){var a=v8({startAngle:t,endAngle:n,innerRadius:r,outerRadius:i},e);return`translate(`+a.x+`,`+a.y+`)`}))}},b8=function(e,t,n,r){t===void 0&&(t=.5),n===void 0&&(n=`innerRadius`);var i=G1(),a=i.animate,o=i.config,s=_8(n,r);return{transition:Cz(e,{keys:function(e){return e.id},initial:s.update,from:s.enter,enter:s.update,update:s.update,leave:s.leave,config:o,immediate:!a}),interpolate:y8(t)}},x8=function(e){var t=e.data,n=e.offset,r=n===void 0?.5:n,i=e.skipAngle,a=i===void 0?0:i,o=e.computeExtraProps,s=o===void 0?function(){return{}}:o;return(0,w.useMemo)((function(){return h8(t,a).map((function(e){var t=v8(e.arc,r);return d8({},s(e),{x:t.x,y:t.y,data:e})}))}),[t,r,a,s])},S8=function(e){var t=e.center,n=e.data,r=e.transitionMode,i=e.label,a=e.radiusOffset,o=e.skipAngle,s=e.skipRadius,c=e.textColor,l=e.component,u=l===void 0?p8:l,d=M0(i),f=$3(c,gH()),p=b8((0,w.useMemo)((function(){return n.filter((function(e){var t=Math.abs(s0(e.arc.endAngle-e.arc.startAngle)),n=Math.abs(e.arc.outerRadius-e.arc.innerRadius);return t>=o&&n>=s}))}),[n,o,s]),a,r),m=p.transition,h=p.interpolate,g=u;return(0,G.jsx)(`g`,{transform:`translate(`+t[0]+`,`+t[1]+`)`,children:m((function(e,t){return(0,w.createElement)(g,{key:t.id,datum:t,label:d(t),style:{progress:e.progress,transform:h(e.startAngle,e.endAngle,e.innerRadius,e.outerRadius),textColor:f(t)}})}))})},C8=function(e,t,n){H0(e,n.labels.text),e.textAlign=`center`,e.textBaseline=`middle`,t.forEach((function(t){U0(e,d8({},n.labels.text,{fill:t.textColor}),String(t.label),t.x,t.y)}))},w8=function(e){var t=e.data,n=e.offset,r=e.skipAngle,i=e.label,a=e.textColor,o=M0(i),s=$3(a,gH());return x8({data:t,offset:n,skipAngle:r,computeExtraProps:(0,w.useCallback)((function(e){return{label:o(e),textColor:s(e)}}),[o,s])})},T8=function(e){var t=e.label,n=e.style,r=gH();return(0,G.jsxs)(Xz.g,{opacity:n.opacity,children:[(0,G.jsx)(Xz.path,{fill:`none`,stroke:n.linkColor,strokeWidth:n.thickness,d:n.path}),(0,G.jsx)(J0,{transform:n.textPosition,textAnchor:n.textAnchor,dominantBaseline:`central`,style:d8({},r.labels.text,{fill:n.textColor}),children:t})]})},E8=function(e){var t=m8(e.startAngle+(e.endAngle-e.startAngle)/2-Math.PI/2);return t<Math.PI/2||t>1.5*Math.PI?`start`:`end`},D8=function(e,t,n,r){var i,a,o=m8(e.startAngle+(e.endAngle-e.startAngle)/2-Math.PI/2),s=l0(o,e.outerRadius+t),c=l0(o,e.outerRadius+t+n);return o<Math.PI/2||o>1.5*Math.PI?(i=`after`,a={x:c.x+r,y:c.y}):(i=`before`,a={x:c.x-r,y:c.y}),{side:i,points:[s,c,a]}},O8=SG().x((function(e){return e.x})).y((function(e){return e.y})),k8=function(e,t,n,r,i,a,o){return Az([e,t,n,r,i,a,o],(function(e,t,n,r,i,a,o){var s=D8({startAngle:e,endAngle:t,innerRadius:n,outerRadius:r},i,a,o).points;return O8(s)}))},A8=function(e,t,n,r){return Az([e,t,n,r],(function(e,t,n,r){return E8({startAngle:e,endAngle:t,innerRadius:n,outerRadius:r})}))},j8=function(e,t,n,r,i,a,o,s){return Az([e,t,n,r,i,a,o,s],(function(e,t,n,r,i,a,o,s){var c=D8({startAngle:e,endAngle:t,innerRadius:n,outerRadius:r},i,a,o),l=c.points,u=c.side,d=l[2];return u===`before`?d.x-=s:d.x+=s,`translate(`+d.x+`,`+d.y+`)`}))},M8=function(e){var t=e.data,n=e.offset,r=n===void 0?0:n,i=e.diagonalLength,a=e.straightLength,o=e.skipAngle,s=o===void 0?0:o,c=e.textOffset,l=e.linkColor,u=e.textColor,d=G1(),f=d.animate,p=d.config,m=gH(),h=$3(l,m),g=$3(u,m),_=function(e,t){return(0,w.useMemo)((function(){return h8(e,t)}),[e,t])}(t,s),v=function(e){var t=e.offset,n=e.diagonalLength,r=e.straightLength,i=e.textOffset,a=e.getLinkColor,o=e.getTextColor;return(0,w.useMemo)((function(){return{enter:function(e){return{startAngle:e.arc.startAngle,endAngle:e.arc.endAngle,innerRadius:e.arc.innerRadius,outerRadius:e.arc.outerRadius,offset:t,diagonalLength:0,straightLength:0,textOffset:i,linkColor:a(e),textColor:o(e),opacity:0}},update:function(e){return{startAngle:e.arc.startAngle,endAngle:e.arc.endAngle,innerRadius:e.arc.innerRadius,outerRadius:e.arc.outerRadius,offset:t,diagonalLength:n,straightLength:r,textOffset:i,linkColor:a(e),textColor:o(e),opacity:1}},leave:function(e){return{startAngle:e.arc.startAngle,endAngle:e.arc.endAngle,innerRadius:e.arc.innerRadius,outerRadius:e.arc.outerRadius,offset:t,diagonalLength:0,straightLength:0,textOffset:i,linkColor:a(e),textColor:o(e),opacity:0}}}}),[n,r,i,a,o,t])}({offset:r,diagonalLength:i,straightLength:a,textOffset:c,getLinkColor:h,getTextColor:g});return{transition:Cz(_,{keys:function(e){return e.id},initial:v.update,from:v.enter,enter:v.update,update:v.update,leave:v.leave,config:p,immediate:!f}),interpolateLink:k8,interpolateTextAnchor:A8,interpolateTextPosition:j8}},N8=function(e){var t=e.center,n=e.data,r=e.label,i=e.skipAngle,a=e.offset,o=e.diagonalLength,s=e.straightLength,c=e.strokeWidth,l=e.textOffset,u=e.textColor,d=e.linkColor,f=e.component,p=f===void 0?T8:f,m=M0(r),h=M8({data:n,skipAngle:i,offset:a,diagonalLength:o,straightLength:s,textOffset:l,linkColor:d,textColor:u}),g=h.transition,_=h.interpolateLink,v=h.interpolateTextAnchor,y=h.interpolateTextPosition,b=p;return(0,G.jsx)(`g`,{transform:`translate(`+t[0]+`,`+t[1]+`)`,children:g((function(e,t){return(0,w.createElement)(b,{key:t.id,datum:t,label:m(t),style:d8({},e,{thickness:c,path:_(e.startAngle,e.endAngle,e.innerRadius,e.outerRadius,e.offset,e.diagonalLength,e.straightLength),textAnchor:v(e.startAngle,e.endAngle,e.innerRadius,e.outerRadius),textPosition:y(e.startAngle,e.endAngle,e.innerRadius,e.outerRadius,e.offset,e.diagonalLength,e.straightLength,e.textOffset)})})}))})},P8=function(e,t,n,r){e.textBaseline=`middle`,H0(e,n.labels.text),t.forEach((function(t){e.textAlign=d0.canvas.align[t.textAnchor],U0(e,d8({},n.labels.text,{fill:t.textColor}),String(t.label),t.x,t.y),e.beginPath(),e.strokeStyle=t.linkColor,e.lineWidth=r,t.points.forEach((function(t,n){n===0?e.moveTo(t.x,t.y):e.lineTo(t.x,t.y)})),e.stroke()}))},F8=function(e){var t=e.data,n=e.skipAngle,r=n===void 0?0:n,i=e.offset,a=i===void 0?.5:i,o=e.diagonalLength,s=e.straightLength,c=e.computeExtraProps,l=c===void 0?function(){return{}}:c,u=(0,w.useMemo)((function(){return t.filter((function(e){return Math.abs(s0(e.arc.endAngle-e.arc.startAngle))>=r})).map((function(e){return d8({},D8(e.arc,a,o,s),{data:e})}))}),[t,r,a,o,s]);return(0,w.useMemo)((function(){return u.map((function(e){return d8({},l(e),e)}))}),[u,l])},I8=function(e){var t=e.data,n=e.skipAngle,r=e.offset,i=e.diagonalLength,a=e.straightLength,o=e.textOffset,s=o===void 0?0:o,c=e.label,l=e.linkColor,u=e.textColor,d=M0(c),f=gH(),p=$3(l,f),m=$3(u,f);return F8({data:t,skipAngle:n,offset:r,diagonalLength:i,straightLength:a,computeExtraProps:(0,w.useCallback)((function(e){var t,n={x:e.points[2].x,y:e.points[2].y};return e.side===`before`?(n.x-=s,t=`end`):(n.x+=s,t=`start`),d8({},n,{label:d(e.data),linkColor:p(e.data),textAnchor:t,textColor:m(e.data)})}),[d,p,m,s])})},L8=function(e){var t=e.datum,n=e.style,r=e.onClick,i=e.onMouseEnter,a=e.onMouseMove,o=e.onMouseLeave,s=(0,w.useCallback)((function(e){return r?.(t,e)}),[r,t]),c=(0,w.useCallback)((function(e){return i?.(t,e)}),[i,t]),l=(0,w.useCallback)((function(e){return a?.(t,e)}),[a,t]),u=(0,w.useCallback)((function(e){return o?.(t,e)}),[o,t]);return(0,G.jsx)(Xz.path,{d:n.path,opacity:n.opacity,fill:t.fill||n.color,stroke:n.borderColor,strokeWidth:n.borderWidth,onClick:r?s:void 0,onMouseEnter:i?c:void 0,onMouseMove:a?l:void 0,onMouseLeave:o?u:void 0,"data-testid":`arc.`+t.id})},R8=function(e,t,n,r,i){return Az([e,t,n,r],(function(e,t,n,r){return i({startAngle:e,endAngle:t,innerRadius:Math.max(0,n),outerRadius:Math.max(0,r)})}))},z8=function(e,t,n){t===void 0&&(t=`innerRadius`);var r=G1(),i=r.animate,a=r.config,o=_8(t,n);return{transition:Cz(e,{keys:function(e){return e.id},initial:o.update,from:o.enter,enter:o.update,update:o.update,leave:o.leave,config:a,immediate:!i}),interpolate:R8}},B8=function(e){var t=e.center,n=e.data,r=e.arcGenerator,i=e.borderWidth,a=e.borderColor,o=e.onClick,s=e.onMouseEnter,c=e.onMouseMove,l=e.onMouseLeave,u=e.transitionMode,d=e.component,f=d===void 0?L8:d,p=$3(a,gH()),m=z8(n,u,{enter:function(e){return{opacity:0,color:e.color,borderColor:p(e)}},update:function(e){return{opacity:1,color:e.color,borderColor:p(e)}},leave:function(e){return{opacity:0,color:e.color,borderColor:p(e)}}}),h=m.transition,g=m.interpolate,_=f;return(0,G.jsx)(`g`,{transform:`translate(`+t[0]+`,`+t[1]+`)`,children:h((function(e,t){return(0,w.createElement)(_,{key:t.id,datum:t,style:d8({},e,{borderWidth:i,path:g(e.startAngle,e.endAngle,e.innerRadius,e.outerRadius,r)}),onClick:o,onMouseEnter:s,onMouseMove:c,onMouseLeave:l})}))})},V8=function(e,t,n,r,i,a){a===void 0&&(a=!0);var o=[],s=l0(o0(r),n);o.push([s.x,s.y]);var c=l0(o0(i),n);o.push([c.x,c.y]);for(var l=Math.round(Math.min(r,i));l<=Math.round(Math.max(r,i));l++)if(l%90==0){var u=l0(o0(l),n);o.push([u.x,u.y])}o=o.map((function(n){var r=n[0],i=n[1];return[e+r,t+i]})),a&&o.push([e,t]);var d=o.map((function(e){return e[0]})),f=o.map((function(e){return e[1]})),p=Math.min.apply(Math,d),m=Math.max.apply(Math,d),h=Math.min.apply(Math,f);return{points:o,x:p,y:h,width:m-p,height:Math.max.apply(Math,f)-h}},H8=function(e,t,n,r,i,a){var o=N0(i,a,e,t);return o<n&&o>r},U8=function(e,t,n,r,i,a,o){if(H8(e,t,n,r,a,o)){var s=P0(a,o,e,t);return i.find((function(e){var t=e.startAngle,n=e.endAngle;return s>=t&&s<n}))}},W8=function(e){var t=e===void 0?{}:e,n=t.cornerRadius,r=n===void 0?0:n,i=t.padAngle,a=i===void 0?0:i;return(0,w.useMemo)((function(){return gG().innerRadius((function(e){return e.innerRadius})).outerRadius((function(e){return e.outerRadius})).cornerRadius(r).padAngle(a)}),[r,a])};function G8(){return G8=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},G8.apply(null,arguments)}function K8(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}var q8,J8=function(e){var t=e.width,n=e.height,r=e.legends,i=e.data,a=e.toggleSerie;return(0,G.jsx)(G.Fragment,{children:r.map((function(e,r){return(0,G.jsx)(h6,G8({},e,{containerWidth:t,containerHeight:n,data:e.data??i,toggleSerie:e.toggleSerie?a:void 0}),r)}))})},$={id:`id`,value:`value`,sortByValue:!1,innerRadius:0,padAngle:0,cornerRadius:0,layers:[`arcs`,`arcLinkLabels`,`arcLabels`,`legends`],startAngle:0,endAngle:360,fit:!0,activeInnerRadiusOffset:0,activeOuterRadiusOffset:0,borderWidth:0,borderColor:{from:`color`,modifiers:[[`darker`,1]]},enableArcLabels:!0,arcLabel:`formattedValue`,arcLabelsSkipAngle:0,arcLabelsSkipRadius:0,arcLabelsRadiusOffset:.5,arcLabelsTextColor:{theme:`labels.text.fill`},enableArcLinkLabels:!0,arcLinkLabel:`id`,arcLinkLabelsSkipAngle:0,arcLinkLabelsOffset:0,arcLinkLabelsDiagonalLength:16,arcLinkLabelsStraightLength:24,arcLinkLabelsThickness:1,arcLinkLabelsTextOffset:6,arcLinkLabelsTextColor:{theme:`labels.text.fill`},arcLinkLabelsColor:{theme:`axis.ticks.line.stroke`},colors:{scheme:`nivo`},defs:[],fill:[],isInteractive:!0,animate:!0,motionConfig:`gentle`,transitionMode:`innerRadius`,tooltip:function(e){var t=e.datum;return(0,G.jsx)(CH,{id:t.id,value:t.formattedValue,enableChip:!0,color:t.color})},legends:[],role:`img`,pixelRatio:typeof window<`u`&&(q8=window.devicePixelRatio)!=null?q8:1},Y8=[`points`],X8=function(e){var t=e.data,n=e.id,r=n===void 0?$.id:n,i=e.value,a=i===void 0?$.value:i,o=e.valueFormat,s=e.colors,c=s===void 0?$.colors:s,l=M0(r),u=M0(a),d=A0(o),f=t6(c,`id`);return(0,w.useMemo)((function(){return t.map((function(e){var t=l(e),n=u(e),r={id:t,label:e.label??t,hidden:!1,value:n,formattedValue:d(n),data:e};return G8({},r,{color:f(r)})}))}),[t,l,u,d,f])},Z8=function(e){var t=e.data,n=e.startAngle,r=e.endAngle,i=e.innerRadius,a=e.outerRadius,o=e.padAngle,s=e.sortByValue,c=e.activeId,l=e.activeInnerRadiusOffset,u=e.activeOuterRadiusOffset,d=e.hiddenIds,f=e.forwardLegendData,p=(0,w.useMemo)((function(){var e=TG().value((function(e){return e.value})).startAngle(o0(n)).endAngle(o0(r)).padAngle(o0(o));return s||e.sortValues(null),e}),[n,r,o,s]),m=(0,w.useMemo)((function(){return{dataWithArc:p(t.filter((function(e){return!d.includes(e.id)}))).map((function(e){var t=Math.abs(e.endAngle-e.startAngle);return G8({},e.data,{arc:{index:e.index,startAngle:e.startAngle,endAngle:e.endAngle,innerRadius:c===e.data.id?i-l:i,outerRadius:c===e.data.id?a+u:a,thickness:a-i,padAngle:e.padAngle,angle:t,angleDeg:s0(t)}})})),legendData:t.map((function(e){return{id:e.id,label:e.label,color:e.color,hidden:d.includes(e.id),data:e}}))}}),[p,t,d,c,i,l,a,u]),h=m.legendData,g=(0,w.useRef)(f);return(0,w.useEffect)((function(){typeof g.current==`function`&&g.current(h)}),[g,h]),m},Q8=function(e){var t=e.activeId,n=e.onActiveIdChange,r=e.defaultActiveId,i=t!==void 0,a=(0,w.useState)(i||r===void 0?null:r),o=a[0],s=a[1];return{activeId:i?t:o,setActiveId:(0,w.useCallback)((function(e){n&&n(e),i||s(e)}),[i,n,s])}},$8=function(e){var t=e.data,n=e.width,r=e.height,i=e.innerRadius,a=i===void 0?$.innerRadius:i,o=e.startAngle,s=o===void 0?$.startAngle:o,c=e.endAngle,l=c===void 0?$.endAngle:c,u=e.padAngle,d=u===void 0?$.padAngle:u,f=e.sortByValue,p=f===void 0?$.sortByValue:f,m=e.cornerRadius,h=m===void 0?$.cornerRadius:m,g=e.fit,_=g===void 0?$.fit:g,v=e.activeInnerRadiusOffset,y=v===void 0?$.activeInnerRadiusOffset:v,b=e.activeOuterRadiusOffset,x=b===void 0?$.activeOuterRadiusOffset:b,S=e.activeId,C=e.onActiveIdChange,T=e.defaultActiveId,E=e.forwardLegendData,D=Q8({activeId:S,onActiveIdChange:C,defaultActiveId:T}),O=D.activeId,k=D.setActiveId,A=(0,w.useState)([]),j=A[0],M=A[1],N=(0,w.useMemo)((function(){var e,t=Math.min(n,r)/2,i=t*Math.min(a,1),o=n/2,c=r/2;if(_){var u=V8(o,c,t,s-90,l-90),d=u.points,f=K8(u,Y8),p=Math.min(n/f.width,r/f.height),m={width:f.width*p,height:f.height*p};m.x=(n-m.width)/2,m.y=(r-m.height)/2,o=(o-f.x)/f.width*f.width*p+m.x,c=(c-f.y)/f.height*f.height*p+m.y,e={box:f,ratio:p,points:d},t*=p,i*=p}return{centerX:o,centerY:c,radius:t,innerRadius:i,debug:e}}),[n,r,a,s,l,_]),P=Z8({data:t,startAngle:s,endAngle:l,innerRadius:N.innerRadius,outerRadius:N.radius,padAngle:d,sortByValue:p,activeId:O,activeInnerRadiusOffset:y,activeOuterRadiusOffset:x,hiddenIds:j,forwardLegendData:E}),F=(0,w.useCallback)((function(e){M((function(t){return t.indexOf(e)>-1?t.filter((function(t){return t!==e})):[].concat(t,[e])}))}),[]);return G8({arcGenerator:W8({cornerRadius:h,padAngle:o0(d)}),activeId:O,setActiveId:k,toggleSerie:F},P,N)},e5=function(e){var t=e.dataWithArc,n=e.arcGenerator,r=e.centerX,i=e.centerY,a=e.radius,o=e.innerRadius;return(0,w.useMemo)((function(){return{dataWithArc:t,arcGenerator:n,centerX:r,centerY:i,radius:a,innerRadius:o}}),[t,n,r,i,a,o])},t5=function(e){var t=e.center,n=e.data,r=e.arcGenerator,i=e.borderWidth,a=e.borderColor,o=e.isInteractive,s=e.onClick,c=e.onMouseEnter,l=e.onMouseMove,u=e.onMouseLeave,d=e.setActiveId,f=e.tooltip,p=e.transitionMode,m=MH(),h=m.showTooltipFromEvent,g=m.hideTooltip,_=(0,w.useMemo)((function(){if(o)return function(e,t){s?.(e,t)}}),[o,s]),v=(0,w.useMemo)((function(){if(o)return function(e,t){h((0,w.createElement)(f,{datum:e}),t),d(e.id),c?.(e,t)}}),[o,h,d,c,f]),y=(0,w.useMemo)((function(){if(o)return function(e,t){h((0,w.createElement)(f,{datum:e}),t),l?.(e,t)}}),[o,h,l,f]),b=(0,w.useMemo)((function(){if(o)return function(e,t){g(),d(null),u?.(e,t)}}),[o,g,d,u]);return(0,G.jsx)(B8,{center:t,data:n,arcGenerator:r,borderWidth:i,borderColor:a,transitionMode:p,onClick:_,onMouseEnter:v,onMouseMove:y,onMouseLeave:b})},n5=[`isInteractive`,`animate`,`motionConfig`,`theme`,`renderWrapper`],r5=function(e){var t=e.data,n=e.id,r=n===void 0?$.id:n,i=e.value,a=i===void 0?$.value:i,o=e.valueFormat,s=e.sortByValue,c=s===void 0?$.sortByValue:s,l=e.layers,u=l===void 0?$.layers:l,d=e.startAngle,f=d===void 0?$.startAngle:d,p=e.endAngle,m=p===void 0?$.endAngle:p,h=e.padAngle,g=h===void 0?$.padAngle:h,_=e.fit,v=_===void 0?$.fit:_,y=e.innerRadius,b=y===void 0?$.innerRadius:y,x=e.cornerRadius,S=x===void 0?$.cornerRadius:x,C=e.activeInnerRadiusOffset,T=C===void 0?$.activeInnerRadiusOffset:C,E=e.activeOuterRadiusOffset,D=E===void 0?$.activeOuterRadiusOffset:E,O=e.width,k=e.height,A=e.margin,j=e.colors,M=j===void 0?$.colors:j,N=e.borderWidth,P=N===void 0?$.borderWidth:N,F=e.borderColor,I=F===void 0?$.borderColor:F,L=e.enableArcLabels,R=L===void 0?$.enableArcLabels:L,z=e.arcLabel,B=z===void 0?$.arcLabel:z,V=e.arcLabelsSkipAngle,H=V===void 0?$.arcLabelsSkipAngle:V,ee=e.arcLabelsSkipRadius,te=ee===void 0?$.arcLabelsSkipRadius:ee,U=e.arcLabelsTextColor,ne=U===void 0?$.arcLabelsTextColor:U,re=e.arcLabelsRadiusOffset,ie=re===void 0?$.arcLabelsRadiusOffset:re,ae=e.arcLabelsComponent,oe=e.enableArcLinkLabels,se=oe===void 0?$.enableArcLinkLabels:oe,ce=e.arcLinkLabel,le=ce===void 0?$.arcLinkLabel:ce,W=e.arcLinkLabelsSkipAngle,ue=W===void 0?$.arcLinkLabelsSkipAngle:W,de=e.arcLinkLabelsOffset,fe=de===void 0?$.arcLinkLabelsOffset:de,pe=e.arcLinkLabelsDiagonalLength,me=pe===void 0?$.arcLinkLabelsDiagonalLength:pe,he=e.arcLinkLabelsStraightLength,ge=he===void 0?$.arcLinkLabelsStraightLength:he,_e=e.arcLinkLabelsThickness,ve=_e===void 0?$.arcLinkLabelsThickness:_e,ye=e.arcLinkLabelsTextOffset,be=ye===void 0?$.arcLinkLabelsTextOffset:ye,xe=e.arcLinkLabelsTextColor,Se=xe===void 0?$.arcLinkLabelsTextColor:xe,Ce=e.arcLinkLabelsColor,we=Ce===void 0?$.arcLinkLabelsColor:Ce,Te=e.arcLinkLabelComponent,Ee=e.defs,De=Ee===void 0?$.defs:Ee,Oe=e.fill,ke=Oe===void 0?$.fill:Oe,Ae=e.isInteractive,je=Ae===void 0?$.isInteractive:Ae,Me=e.onClick,Ne=e.onMouseEnter,Pe=e.onMouseMove,Fe=e.onMouseLeave,Ie=e.tooltip,Le=Ie===void 0?$.tooltip:Ie,Re=e.activeId,ze=e.onActiveIdChange,Be=e.defaultActiveId,Ve=e.transitionMode,He=Ve===void 0?$.transitionMode:Ve,Ue=e.legends,We=Ue===void 0?$.legends:Ue,Ge=e.forwardLegendData,Ke=e.role,qe=Ke===void 0?$.role:Ke,Je=e.forwardedRef,Ye=D0(O,k,A),Xe=Ye.outerWidth,Ze=Ye.outerHeight,Qe=Ye.margin,$e=Ye.innerWidth,et=Ye.innerHeight,tt=$8({data:X8({data:t,id:r,value:a,valueFormat:o,colors:M}),width:$e,height:et,fit:v,innerRadius:b,startAngle:f,endAngle:m,padAngle:g,sortByValue:c,cornerRadius:S,activeInnerRadiusOffset:T,activeOuterRadiusOffset:D,activeId:Re,onActiveIdChange:ze,defaultActiveId:Be,forwardLegendData:Ge}),nt=tt.dataWithArc,rt=tt.legendData,it=tt.arcGenerator,at=tt.centerX,ot=tt.centerY,st=tt.radius,ct=tt.innerRadius,lt=tt.setActiveId,ut=tt.toggleSerie,dt=B0(De,nt,ke),ft={arcs:null,arcLinkLabels:null,arcLabels:null,legends:null};u.includes(`arcs`)&&(ft.arcs=(0,G.jsx)(t5,{center:[at,ot],data:nt,arcGenerator:it,borderWidth:P,borderColor:I,isInteractive:je,onClick:Me,onMouseEnter:Ne,onMouseMove:Pe,onMouseLeave:Fe,setActiveId:lt,tooltip:Le,transitionMode:He},`arcs`)),se&&u.includes(`arcLinkLabels`)&&(ft.arcLinkLabels=(0,G.jsx)(N8,{center:[at,ot],data:nt,label:le,skipAngle:ue,offset:fe,diagonalLength:me,straightLength:ge,strokeWidth:ve,textOffset:be,textColor:Se,linkColor:we,component:Te},`arcLinkLabels`)),R&&u.includes(`arcLabels`)&&(ft.arcLabels=(0,G.jsx)(S8,{center:[at,ot],data:nt,label:B,radiusOffset:ie,skipAngle:H,skipRadius:te,textColor:ne,transitionMode:He,component:ae},`arcLabels`)),We.length>0&&u.includes(`legends`)&&(ft.legends=(0,G.jsx)(J8,{width:$e,height:et,data:rt,legends:We,toggleSerie:ut},`legends`));var pt=e5({dataWithArc:nt,arcGenerator:it,centerX:at,centerY:ot,radius:st,innerRadius:ct});return(0,G.jsx)(y0,{width:Xe,height:Ze,margin:Qe,defs:dt,role:qe,ref:Je,children:u.map((function(e,t){return ft[e]===void 0?typeof e==`function`?(0,G.jsx)(w.Fragment,{children:(0,w.createElement)(e,pt)},t):null:ft[e]}))})},i5=(0,w.forwardRef)((function(e,t){var n=e.isInteractive,r=n===void 0?$.isInteractive:n,i=e.animate,a=i===void 0?$.animate:i,o=e.motionConfig,s=o===void 0?$.motionConfig:o,c=e.theme,l=e.renderWrapper,u=K8(e,n5);return(0,G.jsx)(J1,{animate:a,isInteractive:r,motionConfig:s,renderWrapper:l,theme:c,children:(0,G.jsx)(r5,G8({isInteractive:r},u,{forwardedRef:t}))})})),a5=[`defaultWidth`,`defaultHeight`,`onResize`,`debounceResize`],o5=(0,w.forwardRef)((function(e,t){var n=e.defaultWidth,r=e.defaultHeight,i=e.onResize,a=e.debounceResize,o=K8(e,a5);return(0,G.jsx)(Z1,{defaultWidth:n,defaultHeight:r,onResize:i,debounceResize:a,children:function(e){var n=e.width,r=e.height;return(0,G.jsx)(i5,G8({width:n,height:r},o,{ref:t}))}})})),s5=[`isInteractive`,`theme`,`renderWrapper`],c5=function(e){var t=e.data,n=e.id,r=n===void 0?$.id:n,i=e.value,a=i===void 0?$.value:i,o=e.valueFormat,s=e.sortByValue,c=s===void 0?$.sortByValue:s,l=e.startAngle,u=l===void 0?$.startAngle:l,d=e.endAngle,f=d===void 0?$.endAngle:d,p=e.padAngle,m=p===void 0?$.padAngle:p,h=e.fit,g=h===void 0?$.fit:h,_=e.innerRadius,v=_===void 0?$.innerRadius:_,y=e.cornerRadius,b=y===void 0?$.cornerRadius:y,x=e.activeInnerRadiusOffset,S=x===void 0?$.activeInnerRadiusOffset:x,C=e.activeOuterRadiusOffset,T=C===void 0?$.activeOuterRadiusOffset:C,E=e.width,D=e.height,O=e.margin,k=e.pixelRatio,A=k===void 0?$.pixelRatio:k,j=e.colors,M=j===void 0?$.colors:j,N=e.borderWidth,P=N===void 0?$.borderWidth:N,F=e.borderColor,I=F===void 0?$.borderColor:F,L=e.enableArcLabels,R=L===void 0?$.enableArcLabels:L,z=e.arcLabel,B=z===void 0?$.arcLabel:z,V=e.arcLabelsSkipAngle,H=V===void 0?$.arcLabelsSkipAngle:V,ee=e.arcLabelsTextColor,te=ee===void 0?$.arcLabelsTextColor:ee,U=e.arcLabelsRadiusOffset,ne=U===void 0?$.arcLabelsRadiusOffset:U,re=e.enableArcLinkLabels,ie=re===void 0?$.enableArcLinkLabels:re,ae=e.arcLinkLabel,oe=ae===void 0?$.arcLinkLabel:ae,se=e.arcLinkLabelsSkipAngle,ce=se===void 0?$.arcLinkLabelsSkipAngle:se,le=e.arcLinkLabelsOffset,W=le===void 0?$.arcLinkLabelsOffset:le,ue=e.arcLinkLabelsDiagonalLength,de=ue===void 0?$.arcLinkLabelsDiagonalLength:ue,fe=e.arcLinkLabelsStraightLength,pe=fe===void 0?$.arcLinkLabelsStraightLength:fe,me=e.arcLinkLabelsThickness,he=me===void 0?$.arcLinkLabelsThickness:me,ge=e.arcLinkLabelsTextOffset,_e=ge===void 0?$.arcLinkLabelsTextOffset:ge,ve=e.arcLinkLabelsTextColor,ye=ve===void 0?$.arcLinkLabelsTextColor:ve,be=e.arcLinkLabelsColor,xe=be===void 0?$.arcLinkLabelsColor:be,Se=e.isInteractive,Ce=Se===void 0?$.isInteractive:Se,we=e.onClick,Te=e.onMouseMove,Ee=e.tooltip,De=Ee===void 0?$.tooltip:Ee,Oe=e.activeId,ke=e.onActiveIdChange,Ae=e.defaultActiveId,je=e.legends,Me=je===void 0?$.legends:je,Ne=e.forwardLegendData,Pe=e.role,Fe=e.forwardedRef,Ie=(0,w.useRef)(null),Le=gH(),Re=D0(E,D,O),ze=Re.margin,Be=Re.innerWidth,Ve=Re.innerHeight,He=Re.outerWidth,Ue=Re.outerHeight,We=$8({data:X8({data:t,id:r,value:a,valueFormat:o,colors:M}),width:Be,height:Ve,fit:g,innerRadius:v,startAngle:u,endAngle:f,padAngle:m,sortByValue:c,cornerRadius:b,activeInnerRadiusOffset:S,activeOuterRadiusOffset:T,activeId:Oe,onActiveIdChange:ke,defaultActiveId:Ae,forwardLegendData:Ne}),Ge=We.dataWithArc,Ke=We.arcGenerator,qe=We.centerX,Je=We.centerY,Ye=We.radius,Xe=We.innerRadius,Ze=We.setActiveId,Qe=$3(I,Le),$e=w8({data:Ge,label:B,skipAngle:H,offset:ne,textColor:te}),et=I8({data:Ge,skipAngle:ce,offset:W,diagonalLength:de,straightLength:pe,label:oe,linkColor:xe,textOffset:_e,textColor:ye});(0,w.useEffect)((function(){if(Ie.current){Ie.current.width=He*A,Ie.current.height=Ue*A;var e=Ie.current.getContext(`2d`);e.scale(A,A),e.fillStyle=Le.background,e.fillRect(0,0,He,Ue),e.save(),e.translate(ze.left,ze.top),Ke.context(e),e.save(),e.translate(qe,Je),Ge.forEach((function(t){e.beginPath(),e.fillStyle=t.color,e.strokeStyle=Qe(t),e.lineWidth=P,Ke(t.arc),e.fill(),P>0&&e.stroke()})),!0===ie&&P8(e,et,Le,he),!0===R&&C8(e,$e,Le),e.restore(),Me.forEach((function(t){_6(e,G8({},t,{data:Ge,containerWidth:Be,containerHeight:Ve,theme:Le}))}))}}),[Ie,Be,Ve,He,Ue,ze.top,ze.left,A,qe,Je,Ke,Ge,P,Qe,R,$e,ie,et,he,Me,Le]);var tt=(0,w.useMemo)((function(){return Ge.map((function(e){return G8({id:e.id},e.arc)}))}),[Ge]),nt=function(e){if(!Ie.current)return null;var t=I0(Ie.current,e),n=t[0],r=t[1],i=U8(ze.left+qe,ze.top+Je,Ye,Xe,tt,n,r);return i?Ge.find((function(e){return e.id===i.id})):null},rt=MH(),it=rt.showTooltipFromEvent,at=rt.hideTooltip,ot=function(e){var t=nt(e);t?(Te?.(t,e),Ze(t.id),it((0,w.createElement)(De,{datum:t}),e)):(Ze(null),at())};return(0,G.jsx)(`canvas`,{ref:V0(Ie,Fe),width:He*A,height:Ue*A,style:{width:He,height:Ue,cursor:Ce?`auto`:`normal`},onMouseEnter:Ce?ot:void 0,onMouseMove:Ce?ot:void 0,onMouseLeave:Ce?function(){at()}:void 0,onClick:Ce?function(e){if(we){var t=nt(e);t&&we(t,e)}}:void 0,role:Pe})},l5=(0,w.forwardRef)((function(e,t){var n=e.isInteractive,r=n===void 0?$.isInteractive:n,i=e.theme,a=e.renderWrapper,o=K8(e,s5);return(0,G.jsx)(J1,{isInteractive:r,renderWrapper:a,theme:i,children:(0,G.jsx)(c5,G8({isInteractive:r},o,{forwardedRef:t}))})})),u5=[`defaultWidth`,`defaultHeight`,`onResize`,`debounceResize`];(0,w.forwardRef)((function(e,t){var n=e.defaultWidth,r=e.defaultHeight,i=e.onResize,a=e.debounceResize,o=K8(e,u5);return(0,G.jsx)(Z1,{defaultWidth:n,defaultHeight:r,onResize:i,debounceResize:a,children:function(e){var n=e.width,r=e.height;return(0,G.jsx)(l5,G8({width:n,height:r},o,{ref:t}))}})}));function d5({data:e}){let{colorScheme:t}=nn(),n=t===`dark`;if(e.length===0)return(0,G.jsx)(Y,{c:`dimmed`,size:`sm`,children:`No reader data available.`});let r=Math.max(...e.map(e=>e.value),1),i=Math.min(...e.map(e=>e.value),0),a=r-i||1,o=n?[`#74c0fc`,`#63e6be`,`#ffa94d`,`#da77f2`,`#66d9e8`,`#ff8787`,`#a9e34b`]:[`#1c7ed6`,`#0ca678`,`#e67700`,`#9c36b5`,`#0c8599`,`#e03131`,`#5c940d`],s=[...e].sort((e,t)=>t.value-e.value);return(0,G.jsx)(`div`,{style:{display:`flex`,flexWrap:`wrap`,justifyContent:`center`,alignItems:`center`,gap:8,padding:16,minHeight:150},children:s.map((e,t)=>{let n=(e.value-i)/a,r=Math.round(14+n*40),s=o[t%o.length];return(0,G.jsx)(`span`,{style:{fontSize:r,fontWeight:n>.5?700:500,color:s,lineHeight:1.2,cursor:`default`},title:`${e.text}: ${e.value} calls`,children:e.text},e.text)})})}var f5={value:()=>{}};function p5(){for(var e=0,t=arguments.length,n={},r;e<t;++e){if(!(r=arguments[e]+``)||r in n||/[\s.]/.test(r))throw Error(`illegal type: `+r);n[r]=[]}return new m5(n)}function m5(e){this._=e}function h5(e,t){return e.trim().split(/^|\s+/).map(function(e){var n=``,r=e.indexOf(`.`);if(r>=0&&(n=e.slice(r+1),e=e.slice(0,r)),e&&!t.hasOwnProperty(e))throw Error(`unknown type: `+e);return{type:e,name:n}})}m5.prototype=p5.prototype={constructor:m5,on:function(e,t){var n=this._,r=h5(e+``,n),i,a=-1,o=r.length;if(arguments.length<2){for(;++a<o;)if((i=(e=r[a]).type)&&(i=g5(n[i],e.name)))return i;return}if(t!=null&&typeof t!=`function`)throw Error(`invalid callback: `+t);for(;++a<o;)if(i=(e=r[a]).type)n[i]=_5(n[i],e.name,t);else if(t==null)for(i in n)n[i]=_5(n[i],e.name,null);return this},copy:function(){var e={},t=this._;for(var n in t)e[n]=t[n].slice();return new m5(e)},call:function(e,t){if((i=arguments.length-2)>0)for(var n=Array(i),r=0,i,a;r<i;++r)n[r]=arguments[r+2];if(!this._.hasOwnProperty(e))throw Error(`unknown type: `+e);for(a=this._[e],r=0,i=a.length;r<i;++r)a[r].value.apply(t,n)},apply:function(e,t,n){if(!this._.hasOwnProperty(e))throw Error(`unknown type: `+e);for(var r=this._[e],i=0,a=r.length;i<a;++i)r[i].value.apply(t,n)}};function g5(e,t){for(var n=0,r=e.length,i;n<r;++n)if((i=e[n]).name===t)return i.value}function _5(e,t,n){for(var r=0,i=e.length;r<i;++r)if(e[r].name===t){e[r]=f5,e=e.slice(0,r).concat(e.slice(r+1));break}return n!=null&&e.push({name:t,value:n}),e}var v5={svg:`http://www.w3.org/2000/svg`,xhtml:`http://www.w3.org/1999/xhtml`,xlink:`http://www.w3.org/1999/xlink`,xml:`http://www.w3.org/XML/1998/namespace`,xmlns:`http://www.w3.org/2000/xmlns/`};function y5(e){var t=e+=``,n=t.indexOf(`:`);return n>=0&&(t=e.slice(0,n))!==`xmlns`&&(e=e.slice(n+1)),v5.hasOwnProperty(t)?{space:v5[t],local:e}:e}function b5(e){return function(){var t=this.ownerDocument,n=this.namespaceURI;return n===`http://www.w3.org/1999/xhtml`&&t.documentElement.namespaceURI===`http://www.w3.org/1999/xhtml`?t.createElement(e):t.createElementNS(n,e)}}function x5(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function S5(e){var t=y5(e);return(t.local?x5:b5)(t)}function C5(){}function w5(e){return e==null?C5:function(){return this.querySelector(e)}}function T5(e){typeof e!=`function`&&(e=w5(e));for(var t=this._groups,n=t.length,r=Array(n),i=0;i<n;++i)for(var a=t[i],o=a.length,s=r[i]=Array(o),c,l,u=0;u<o;++u)(c=a[u])&&(l=e.call(c,c.__data__,u,a))&&(`__data__`in c&&(l.__data__=c.__data__),s[u]=l);return new p9(r,this._parents)}function E5(e){return e==null?[]:Array.isArray(e)?e:Array.from(e)}function D5(){return[]}function O5(e){return e==null?D5:function(){return this.querySelectorAll(e)}}function k5(e){return function(){return E5(e.apply(this,arguments))}}function A5(e){e=typeof e==`function`?k5(e):O5(e);for(var t=this._groups,n=t.length,r=[],i=[],a=0;a<n;++a)for(var o=t[a],s=o.length,c,l=0;l<s;++l)(c=o[l])&&(r.push(e.call(c,c.__data__,l,o)),i.push(c));return new p9(r,i)}function j5(e){return function(){return this.matches(e)}}function M5(e){return function(t){return t.matches(e)}}var N5=Array.prototype.find;function P5(e){return function(){return N5.call(this.children,e)}}function F5(){return this.firstElementChild}function I5(e){return this.select(e==null?F5:P5(typeof e==`function`?e:M5(e)))}var L5=Array.prototype.filter;function R5(){return Array.from(this.children)}function z5(e){return function(){return L5.call(this.children,e)}}function B5(e){return this.selectAll(e==null?R5:z5(typeof e==`function`?e:M5(e)))}function V5(e){typeof e!=`function`&&(e=j5(e));for(var t=this._groups,n=t.length,r=Array(n),i=0;i<n;++i)for(var a=t[i],o=a.length,s=r[i]=[],c,l=0;l<o;++l)(c=a[l])&&e.call(c,c.__data__,l,a)&&s.push(c);return new p9(r,this._parents)}function H5(e){return Array(e.length)}function U5(){return new p9(this._enter||this._groups.map(H5),this._parents)}function W5(e,t){this.ownerDocument=e.ownerDocument,this.namespaceURI=e.namespaceURI,this._next=null,this._parent=e,this.__data__=t}W5.prototype={constructor:W5,appendChild:function(e){return this._parent.insertBefore(e,this._next)},insertBefore:function(e,t){return this._parent.insertBefore(e,t)},querySelector:function(e){return this._parent.querySelector(e)},querySelectorAll:function(e){return this._parent.querySelectorAll(e)}};function G5(e){return function(){return e}}function K5(e,t,n,r,i,a){for(var o=0,s,c=t.length,l=a.length;o<l;++o)(s=t[o])?(s.__data__=a[o],r[o]=s):n[o]=new W5(e,a[o]);for(;o<c;++o)(s=t[o])&&(i[o]=s)}function q5(e,t,n,r,i,a,o){var s,c,l=new Map,u=t.length,d=a.length,f=Array(u),p;for(s=0;s<u;++s)(c=t[s])&&(f[s]=p=o.call(c,c.__data__,s,t)+``,l.has(p)?i[s]=c:l.set(p,c));for(s=0;s<d;++s)p=o.call(e,a[s],s,a)+``,(c=l.get(p))?(r[s]=c,c.__data__=a[s],l.delete(p)):n[s]=new W5(e,a[s]);for(s=0;s<u;++s)(c=t[s])&&l.get(f[s])===c&&(i[s]=c)}function J5(e){return e.__data__}function Y5(e,t){if(!arguments.length)return Array.from(this,J5);var n=t?q5:K5,r=this._parents,i=this._groups;typeof e!=`function`&&(e=G5(e));for(var a=i.length,o=Array(a),s=Array(a),c=Array(a),l=0;l<a;++l){var u=r[l],d=i[l],f=d.length,p=X5(e.call(u,u&&u.__data__,l,r)),m=p.length,h=s[l]=Array(m),g=o[l]=Array(m);n(u,d,h,g,c[l]=Array(f),p,t);for(var _=0,v=0,y,b;_<m;++_)if(y=h[_]){for(_>=v&&(v=_+1);!(b=g[v])&&++v<m;);y._next=b||null}}return o=new p9(o,r),o._enter=s,o._exit=c,o}function X5(e){return typeof e==`object`&&`length`in e?e:Array.from(e)}function Z5(){return new p9(this._exit||this._groups.map(H5),this._parents)}function Q5(e,t,n){var r=this.enter(),i=this,a=this.exit();return typeof e==`function`?(r=e(r),r&&=r.selection()):r=r.append(e+``),t!=null&&(i=t(i),i&&=i.selection()),n==null?a.remove():n(a),r&&i?r.merge(i).order():i}function $5(e){for(var t=e.selection?e.selection():e,n=this._groups,r=t._groups,i=n.length,a=r.length,o=Math.min(i,a),s=Array(i),c=0;c<o;++c)for(var l=n[c],u=r[c],d=l.length,f=s[c]=Array(d),p,m=0;m<d;++m)(p=l[m]||u[m])&&(f[m]=p);for(;c<i;++c)s[c]=n[c];return new p9(s,this._parents)}function e7(){for(var e=this._groups,t=-1,n=e.length;++t<n;)for(var r=e[t],i=r.length-1,a=r[i],o;--i>=0;)(o=r[i])&&(a&&o.compareDocumentPosition(a)^4&&a.parentNode.insertBefore(o,a),a=o);return this}function t7(e){e||=n7;function t(t,n){return t&&n?e(t.__data__,n.__data__):!t-!n}for(var n=this._groups,r=n.length,i=Array(r),a=0;a<r;++a){for(var o=n[a],s=o.length,c=i[a]=Array(s),l,u=0;u<s;++u)(l=o[u])&&(c[u]=l);c.sort(t)}return new p9(i,this._parents).order()}function n7(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}function r7(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}function i7(){return Array.from(this)}function a7(){for(var e=this._groups,t=0,n=e.length;t<n;++t)for(var r=e[t],i=0,a=r.length;i<a;++i){var o=r[i];if(o)return o}return null}function o7(){let e=0;for(let t of this)++e;return e}function s7(){return!this.node()}function c7(e){for(var t=this._groups,n=0,r=t.length;n<r;++n)for(var i=t[n],a=0,o=i.length,s;a<o;++a)(s=i[a])&&e.call(s,s.__data__,a,i);return this}function l7(e){return function(){this.removeAttribute(e)}}function u7(e){return function(){this.removeAttributeNS(e.space,e.local)}}function d7(e,t){return function(){this.setAttribute(e,t)}}function f7(e,t){return function(){this.setAttributeNS(e.space,e.local,t)}}function p7(e,t){return function(){var n=t.apply(this,arguments);n==null?this.removeAttribute(e):this.setAttribute(e,n)}}function m7(e,t){return function(){var n=t.apply(this,arguments);n==null?this.removeAttributeNS(e.space,e.local):this.setAttributeNS(e.space,e.local,n)}}function h7(e,t){var n=y5(e);if(arguments.length<2){var r=this.node();return n.local?r.getAttributeNS(n.space,n.local):r.getAttribute(n)}return this.each((t==null?n.local?u7:l7:typeof t==`function`?n.local?m7:p7:n.local?f7:d7)(n,t))}function g7(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView}function _7(e){return function(){this.style.removeProperty(e)}}function v7(e,t,n){return function(){this.style.setProperty(e,t,n)}}function y7(e,t,n){return function(){var r=t.apply(this,arguments);r==null?this.style.removeProperty(e):this.style.setProperty(e,r,n)}}function b7(e,t,n){return arguments.length>1?this.each((t==null?_7:typeof t==`function`?y7:v7)(e,t,n??``)):x7(this.node(),e)}function x7(e,t){return e.style.getPropertyValue(t)||g7(e).getComputedStyle(e,null).getPropertyValue(t)}function S7(e){return function(){delete this[e]}}function C7(e,t){return function(){this[e]=t}}function w7(e,t){return function(){var n=t.apply(this,arguments);n==null?delete this[e]:this[e]=n}}function T7(e,t){return arguments.length>1?this.each((t==null?S7:typeof t==`function`?w7:C7)(e,t)):this.node()[e]}function E7(e){return e.trim().split(/^|\s+/)}function D7(e){return e.classList||new O7(e)}function O7(e){this._node=e,this._names=E7(e.getAttribute(`class`)||``)}O7.prototype={add:function(e){this._names.indexOf(e)<0&&(this._names.push(e),this._node.setAttribute(`class`,this._names.join(` `)))},remove:function(e){var t=this._names.indexOf(e);t>=0&&(this._names.splice(t,1),this._node.setAttribute(`class`,this._names.join(` `)))},contains:function(e){return this._names.indexOf(e)>=0}};function k7(e,t){for(var n=D7(e),r=-1,i=t.length;++r<i;)n.add(t[r])}function A7(e,t){for(var n=D7(e),r=-1,i=t.length;++r<i;)n.remove(t[r])}function j7(e){return function(){k7(this,e)}}function M7(e){return function(){A7(this,e)}}function N7(e,t){return function(){(t.apply(this,arguments)?k7:A7)(this,e)}}function P7(e,t){var n=E7(e+``);if(arguments.length<2){for(var r=D7(this.node()),i=-1,a=n.length;++i<a;)if(!r.contains(n[i]))return!1;return!0}return this.each((typeof t==`function`?N7:t?j7:M7)(n,t))}function F7(){this.textContent=``}function I7(e){return function(){this.textContent=e}}function L7(e){return function(){var t=e.apply(this,arguments);this.textContent=t??``}}function R7(e){return arguments.length?this.each(e==null?F7:(typeof e==`function`?L7:I7)(e)):this.node().textContent}function z7(){this.innerHTML=``}function B7(e){return function(){this.innerHTML=e}}function V7(e){return function(){var t=e.apply(this,arguments);this.innerHTML=t??``}}function H7(e){return arguments.length?this.each(e==null?z7:(typeof e==`function`?V7:B7)(e)):this.node().innerHTML}function U7(){this.nextSibling&&this.parentNode.appendChild(this)}function W7(){return this.each(U7)}function G7(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function K7(){return this.each(G7)}function q7(e){var t=typeof e==`function`?e:S5(e);return this.select(function(){return this.appendChild(t.apply(this,arguments))})}function J7(){return null}function Y7(e,t){var n=typeof e==`function`?e:S5(e),r=t==null?J7:typeof t==`function`?t:w5(t);return this.select(function(){return this.insertBefore(n.apply(this,arguments),r.apply(this,arguments)||null)})}function X7(){var e=this.parentNode;e&&e.removeChild(this)}function Z7(){return this.each(X7)}function Q7(){var e=this.cloneNode(!1),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function $7(){var e=this.cloneNode(!0),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function e9(e){return this.select(e?$7:Q7)}function t9(e){return arguments.length?this.property(`__data__`,e):this.node().__data__}function n9(e){return function(t){e.call(this,t,this.__data__)}}function r9(e){return e.trim().split(/^|\s+/).map(function(e){var t=``,n=e.indexOf(`.`);return n>=0&&(t=e.slice(n+1),e=e.slice(0,n)),{type:e,name:t}})}function i9(e){return function(){var t=this.__on;if(t){for(var n=0,r=-1,i=t.length,a;n<i;++n)a=t[n],(!e.type||a.type===e.type)&&a.name===e.name?this.removeEventListener(a.type,a.listener,a.options):t[++r]=a;++r?t.length=r:delete this.__on}}}function a9(e,t,n){return function(){var r=this.__on,i,a=n9(t);if(r){for(var o=0,s=r.length;o<s;++o)if((i=r[o]).type===e.type&&i.name===e.name){this.removeEventListener(i.type,i.listener,i.options),this.addEventListener(i.type,i.listener=a,i.options=n),i.value=t;return}}this.addEventListener(e.type,a,n),i={type:e.type,name:e.name,value:t,listener:a,options:n},r?r.push(i):this.__on=[i]}}function o9(e,t,n){var r=r9(e+``),i,a=r.length,o;if(arguments.length<2){var s=this.node().__on;if(s){for(var c=0,l=s.length,u;c<l;++c)for(i=0,u=s[c];i<a;++i)if((o=r[i]).type===u.type&&o.name===u.name)return u.value}return}for(s=t?a9:i9,i=0;i<a;++i)this.each(s(r[i],t,n));return this}function s9(e,t,n){var r=g7(e),i=r.CustomEvent;typeof i==`function`?i=new i(t,n):(i=r.document.createEvent(`Event`),n?(i.initEvent(t,n.bubbles,n.cancelable),i.detail=n.detail):i.initEvent(t,!1,!1)),e.dispatchEvent(i)}function c9(e,t){return function(){return s9(this,e,t)}}function l9(e,t){return function(){return s9(this,e,t.apply(this,arguments))}}function u9(e,t){return this.each((typeof t==`function`?l9:c9)(e,t))}function*d9(){for(var e=this._groups,t=0,n=e.length;t<n;++t)for(var r=e[t],i=0,a=r.length,o;i<a;++i)(o=r[i])&&(yield o)}var f9=[null];function p9(e,t){this._groups=e,this._parents=t}function m9(){return new p9([[document.documentElement]],f9)}function h9(){return this}p9.prototype=m9.prototype={constructor:p9,select:T5,selectAll:A5,selectChild:I5,selectChildren:B5,filter:V5,data:Y5,enter:U5,exit:Z5,join:Q5,merge:$5,selection:h9,order:e7,sort:t7,call:r7,nodes:i7,node:a7,size:o7,empty:s7,each:c7,attr:h7,style:b7,property:T7,classed:P7,text:R7,html:H7,raise:W7,lower:K7,append:q7,insert:Y7,remove:Z7,clone:e9,datum:t9,on:o9,dispatch:u9,[Symbol.iterator]:d9};function g9(e){return typeof e==`string`?new p9([[document.querySelector(e)]],[document.documentElement]):new p9([[e]],f9)}var _9=0,v9=0,y9=0,b9=1e3,x9,S9,C9=0,w9=0,T9=0,E9=typeof performance==`object`&&performance.now?performance:Date,D9=typeof window==`object`&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};function O9(){return w9||=(D9(Pee),E9.now()+T9)}function Pee(){w9=0}function k9(){this._call=this._time=this._next=null}k9.prototype=A9.prototype={constructor:k9,restart:function(e,t,n){if(typeof e!=`function`)throw TypeError(`callback is not a function`);n=(n==null?O9():+n)+(t==null?0:+t),!this._next&&S9!==this&&(S9?S9._next=this:x9=this,S9=this),this._call=e,this._time=n,M9()},stop:function(){this._call&&(this._call=null,this._time=1/0,M9())}};function A9(e,t,n){var r=new k9;return r.restart(e,t,n),r}function Fee(){O9(),++_9;for(var e=x9,t;e;)(t=w9-e._time)>=0&&e._call.call(void 0,t),e=e._next;--_9}function j9(){w9=(C9=E9.now())+T9,_9=v9=0;try{Fee()}finally{_9=0,Lee(),w9=0}}function Iee(){var e=E9.now(),t=e-C9;t>b9&&(T9-=t,C9=e)}function Lee(){for(var e,t=x9,n,r=1/0;t;)t._call?(r>t._time&&(r=t._time),e=t,t=t._next):(n=t._next,t._next=null,t=e?e._next=n:x9=n);S9=e,M9(r)}function M9(e){_9||(v9&&=clearTimeout(v9),e-w9>24?(e<1/0&&(v9=setTimeout(j9,e-E9.now()-T9)),y9&&=clearInterval(y9)):(y9||=(C9=E9.now(),setInterval(Iee,b9)),_9=1,D9(j9)))}function N9(e,t,n){var r=new k9;return t=t==null?0:+t,r.restart(n=>{r.stop(),e(n+t)},t,n),r}var Ree=p5(`start`,`end`,`cancel`,`interrupt`),zee=[];function P9(e,t,n,r,i,a){var o=e.__transition;if(!o)e.__transition={};else if(n in o)return;Bee(e,n,{name:t,index:r,group:i,on:Ree,tween:zee,time:a.time,delay:a.delay,duration:a.duration,ease:a.ease,timer:null,state:0})}function F9(e,t){var n=L9(e,t);if(n.state>0)throw Error(`too late; already scheduled`);return n}function I9(e,t){var n=L9(e,t);if(n.state>3)throw Error(`too late; already running`);return n}function L9(e,t){var n=e.__transition;if(!n||!(n=n[t]))throw Error(`transition not found`);return n}function Bee(e,t,n){var r=e.__transition,i;r[t]=n,n.timer=A9(a,0,n.time);function a(e){n.state=1,n.timer.restart(o,n.delay,n.time),n.delay<=e&&o(e-n.delay)}function o(a){var l,u,d,f;if(n.state!==1)return c();for(l in r)if(f=r[l],f.name===n.name){if(f.state===3)return N9(o);f.state===4?(f.state=6,f.timer.stop(),f.on.call(`interrupt`,e,e.__data__,f.index,f.group),delete r[l]):+l<t&&(f.state=6,f.timer.stop(),f.on.call(`cancel`,e,e.__data__,f.index,f.group),delete r[l])}if(N9(function(){n.state===3&&(n.state=4,n.timer.restart(s,n.delay,n.time),s(a))}),n.state=2,n.on.call(`start`,e,e.__data__,n.index,n.group),n.state===2){for(n.state=3,i=Array(d=n.tween.length),l=0,u=-1;l<d;++l)(f=n.tween[l].value.call(e,e.__data__,n.index,n.group))&&(i[++u]=f);i.length=u+1}}function s(t){for(var r=t<n.duration?n.ease.call(null,t/n.duration):(n.timer.restart(c),n.state=5,1),a=-1,o=i.length;++a<o;)i[a].call(e,r);n.state===5&&(n.on.call(`end`,e,e.__data__,n.index,n.group),c())}function c(){for(var i in n.state=6,n.timer.stop(),delete r[t],r)return;delete e.__transition}}function Vee(e,t){var n=e.__transition,r,i,a=!0,o;if(n){for(o in t=t==null?null:t+``,n){if((r=n[o]).name!==t){a=!1;continue}i=r.state>2&&r.state<5,r.state=6,r.timer.stop(),r.on.call(i?`interrupt`:`cancel`,e,e.__data__,r.index,r.group),delete n[o]}a&&delete e.__transition}}function Hee(e){return this.each(function(){Vee(this,e)})}function Uee(e,t){var n,r;return function(){var i=I9(this,e),a=i.tween;if(a!==n){r=n=a;for(var o=0,s=r.length;o<s;++o)if(r[o].name===t){r=r.slice(),r.splice(o,1);break}}i.tween=r}}function Wee(e,t,n){var r,i;if(typeof n!=`function`)throw Error();return function(){var a=I9(this,e),o=a.tween;if(o!==r){i=(r=o).slice();for(var s={name:t,value:n},c=0,l=i.length;c<l;++c)if(i[c].name===t){i[c]=s;break}c===l&&i.push(s)}a.tween=i}}function Gee(e,t){var n=this._id;if(e+=``,arguments.length<2){for(var r=L9(this.node(),n).tween,i=0,a=r.length,o;i<a;++i)if((o=r[i]).name===e)return o.value;return null}return this.each((t==null?Uee:Wee)(n,e,t))}function R9(e,t,n){var r=e._id;return e.each(function(){var e=I9(this,r);(e.value||={})[t]=n.apply(this,arguments)}),function(e){return L9(e,r).value[t]}}function z9(e,t){var n;return(typeof t==`number`?uW:t instanceof _U?rW:(n=_U(t))?(t=n,rW):gW)(e,t)}function Kee(e){return function(){this.removeAttribute(e)}}function qee(e){return function(){this.removeAttributeNS(e.space,e.local)}}function Jee(e,t,n){var r,i=n+``,a;return function(){var o=this.getAttribute(e);return o===i?null:o===r?a:a=t(r=o,n)}}function Yee(e,t,n){var r,i=n+``,a;return function(){var o=this.getAttributeNS(e.space,e.local);return o===i?null:o===r?a:a=t(r=o,n)}}function Xee(e,t,n){var r,i,a;return function(){var o,s=n(this),c;return s==null?void this.removeAttribute(e):(o=this.getAttribute(e),c=s+``,o===c?null:o===r&&c===i?a:(i=c,a=t(r=o,s)))}}function Zee(e,t,n){var r,i,a;return function(){var o,s=n(this),c;return s==null?void this.removeAttributeNS(e.space,e.local):(o=this.getAttributeNS(e.space,e.local),c=s+``,o===c?null:o===r&&c===i?a:(i=c,a=t(r=o,s)))}}function Qee(e,t){var n=y5(e),r=n===`transform`?DW:z9;return this.attrTween(e,typeof t==`function`?(n.local?Zee:Xee)(n,r,R9(this,`attr.`+e,t)):t==null?(n.local?qee:Kee)(n):(n.local?Yee:Jee)(n,r,t))}function $ee(e,t){return function(n){this.setAttribute(e,t.call(this,n))}}function ete(e,t){return function(n){this.setAttributeNS(e.space,e.local,t.call(this,n))}}function tte(e,t){var n,r;function i(){var i=t.apply(this,arguments);return i!==r&&(n=(r=i)&&ete(e,i)),n}return i._value=t,i}function nte(e,t){var n,r;function i(){var i=t.apply(this,arguments);return i!==r&&(n=(r=i)&&$ee(e,i)),n}return i._value=t,i}function rte(e,t){var n=`attr.`+e;if(arguments.length<2)return(n=this.tween(n))&&n._value;if(t==null)return this.tween(n,null);if(typeof t!=`function`)throw Error();var r=y5(e);return this.tween(n,(r.local?tte:nte)(r,t))}function ite(e,t){return function(){F9(this,e).delay=+t.apply(this,arguments)}}function ate(e,t){return t=+t,function(){F9(this,e).delay=t}}function ote(e){var t=this._id;return arguments.length?this.each((typeof e==`function`?ite:ate)(t,e)):L9(this.node(),t).delay}function ste(e,t){return function(){I9(this,e).duration=+t.apply(this,arguments)}}function cte(e,t){return t=+t,function(){I9(this,e).duration=t}}function lte(e){var t=this._id;return arguments.length?this.each((typeof e==`function`?ste:cte)(t,e)):L9(this.node(),t).duration}function ute(e,t){if(typeof t!=`function`)throw Error();return function(){I9(this,e).ease=t}}function dte(e){var t=this._id;return arguments.length?this.each(ute(t,e)):L9(this.node(),t).ease}function fte(e,t){return function(){var n=t.apply(this,arguments);if(typeof n!=`function`)throw Error();I9(this,e).ease=n}}function pte(e){if(typeof e!=`function`)throw Error();return this.each(fte(this._id,e))}function mte(e){typeof e!=`function`&&(e=j5(e));for(var t=this._groups,n=t.length,r=Array(n),i=0;i<n;++i)for(var a=t[i],o=a.length,s=r[i]=[],c,l=0;l<o;++l)(c=a[l])&&e.call(c,c.__data__,l,a)&&s.push(c);return new V9(r,this._parents,this._name,this._id)}function hte(e){if(e._id!==this._id)throw Error();for(var t=this._groups,n=e._groups,r=t.length,i=n.length,a=Math.min(r,i),o=Array(r),s=0;s<a;++s)for(var c=t[s],l=n[s],u=c.length,d=o[s]=Array(u),f,p=0;p<u;++p)(f=c[p]||l[p])&&(d[p]=f);for(;s<r;++s)o[s]=t[s];return new V9(o,this._parents,this._name,this._id)}function gte(e){return(e+``).trim().split(/^|\s+/).every(function(e){var t=e.indexOf(`.`);return t>=0&&(e=e.slice(0,t)),!e||e===`start`})}function _te(e,t,n){var r,i,a=gte(t)?F9:I9;return function(){var o=a(this,e),s=o.on;s!==r&&(i=(r=s).copy()).on(t,n),o.on=i}}function vte(e,t){var n=this._id;return arguments.length<2?L9(this.node(),n).on.on(e):this.each(_te(n,e,t))}function yte(e){return function(){var t=this.parentNode;for(var n in this.__transition)if(+n!==e)return;t&&t.removeChild(this)}}function bte(){return this.on(`end.remove`,yte(this._id))}function xte(e){var t=this._name,n=this._id;typeof e!=`function`&&(e=w5(e));for(var r=this._groups,i=r.length,a=Array(i),o=0;o<i;++o)for(var s=r[o],c=s.length,l=a[o]=Array(c),u,d,f=0;f<c;++f)(u=s[f])&&(d=e.call(u,u.__data__,f,s))&&(`__data__`in u&&(d.__data__=u.__data__),l[f]=d,P9(l[f],t,n,f,l,L9(u,n)));return new V9(a,this._parents,t,n)}function Ste(e){var t=this._name,n=this._id;typeof e!=`function`&&(e=O5(e));for(var r=this._groups,i=r.length,a=[],o=[],s=0;s<i;++s)for(var c=r[s],l=c.length,u,d=0;d<l;++d)if(u=c[d]){for(var f=e.call(u,u.__data__,d,c),p,m=L9(u,n),h=0,g=f.length;h<g;++h)(p=f[h])&&P9(p,t,n,h,f,m);a.push(f),o.push(u)}return new V9(a,o,t,n)}var Cte=m9.prototype.constructor;function wte(){return new Cte(this._groups,this._parents)}function Tte(e,t){var n,r,i;return function(){var a=x7(this,e),o=(this.style.removeProperty(e),x7(this,e));return a===o?null:a===n&&o===r?i:i=t(n=a,r=o)}}function B9(e){return function(){this.style.removeProperty(e)}}function Ete(e,t,n){var r,i=n+``,a;return function(){var o=x7(this,e);return o===i?null:o===r?a:a=t(r=o,n)}}function Dte(e,t,n){var r,i,a;return function(){var o=x7(this,e),s=n(this),c=s+``;return s??(c=s=(this.style.removeProperty(e),x7(this,e))),o===c?null:o===r&&c===i?a:(i=c,a=t(r=o,s))}}function Ote(e,t){var n,r,i,a=`style.`+t,o=`end.`+a,s;return function(){var c=I9(this,e),l=c.on,u=c.value[a]==null?s||=B9(t):void 0;(l!==n||i!==u)&&(r=(n=l).copy()).on(o,i=u),c.on=r}}function kte(e,t,n){var r=(e+=``)==`transform`?EW:z9;return t==null?this.styleTween(e,Tte(e,r)).on(`end.style.`+e,B9(e)):typeof t==`function`?this.styleTween(e,Dte(e,r,R9(this,`style.`+e,t))).each(Ote(this._id,e)):this.styleTween(e,Ete(e,r,t),n).on(`end.style.`+e,null)}function Ate(e,t,n){return function(r){this.style.setProperty(e,t.call(this,r),n)}}function jte(e,t,n){var r,i;function a(){var a=t.apply(this,arguments);return a!==i&&(r=(i=a)&&Ate(e,a,n)),r}return a._value=t,a}function Mte(e,t,n){var r=`style.`+(e+=``);if(arguments.length<2)return(r=this.tween(r))&&r._value;if(t==null)return this.tween(r,null);if(typeof t!=`function`)throw Error();return this.tween(r,jte(e,t,n??``))}function Nte(e){return function(){this.textContent=e}}function Pte(e){return function(){var t=e(this);this.textContent=t??``}}function Fte(e){return this.tween(`text`,typeof e==`function`?Pte(R9(this,`text`,e)):Nte(e==null?``:e+``))}function Ite(e){return function(t){this.textContent=e.call(this,t)}}function Lte(e){var t,n;function r(){var r=e.apply(this,arguments);return r!==n&&(t=(n=r)&&Ite(r)),t}return r._value=e,r}function Rte(e){var t=`text`;if(arguments.length<1)return(t=this.tween(t))&&t._value;if(e==null)return this.tween(t,null);if(typeof e!=`function`)throw Error();return this.tween(t,Lte(e))}function zte(){for(var e=this._name,t=this._id,n=H9(),r=this._groups,i=r.length,a=0;a<i;++a)for(var o=r[a],s=o.length,c,l=0;l<s;++l)if(c=o[l]){var u=L9(c,t);P9(c,e,n,l,o,{time:u.time+u.delay+u.duration,delay:0,duration:u.duration,ease:u.ease})}return new V9(r,this._parents,e,n)}function Bte(){var e,t,n=this,r=n._id,i=n.size();return new Promise(function(a,o){var s={value:o},c={value:function(){--i===0&&a()}};n.each(function(){var n=I9(this,r),i=n.on;i!==e&&(t=(e=i).copy(),t._.cancel.push(s),t._.interrupt.push(s),t._.end.push(c)),n.on=t}),i===0&&a()})}var Vte=0;function V9(e,t,n,r){this._groups=e,this._parents=t,this._name=n,this._id=r}function H9(){return++Vte}var U9=m9.prototype;V9.prototype={constructor:V9,select:xte,selectAll:Ste,selectChild:U9.selectChild,selectChildren:U9.selectChildren,filter:mte,merge:hte,selection:wte,transition:zte,call:U9.call,nodes:U9.nodes,node:U9.node,size:U9.size,empty:U9.empty,each:U9.each,on:vte,attr:Qee,attrTween:rte,style:kte,styleTween:Mte,text:Fte,textTween:Rte,remove:bte,tween:Gee,delay:ote,duration:lte,ease:dte,easeVarying:pte,end:Bte,[Symbol.iterator]:U9[Symbol.iterator]};function Hte(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}var Ute={time:null,delay:0,duration:250,ease:Hte};function Wte(e,t){for(var n;!(n=e.__transition)||!(n=n[t]);)if(!(e=e.parentNode))throw Error(`transition ${t} not found`);return n}function Gte(e){var t,n;e instanceof V9?(t=e._id,e=e._name):(t=H9(),(n=Ute).time=O9(),e=e==null?null:e+``);for(var r=this._groups,i=r.length,a=0;a<i;++a)for(var o=r[a],s=o.length,c,l=0;l<s;++l)(c=o[l])&&P9(c,e,t,l,o,n||Wte(c,t));return new V9(r,this._parents,e,t)}m9.prototype.interrupt=Hee,m9.prototype.transition=Gte;var{abs:Kte,max:qte,min:Jte}=Math;[`w`,`e`].map(W9),[`n`,`s`].map(W9),[`n`,`w`,`e`,`s`,`nw`,`ne`,`sw`,`se`].map(W9);function W9(e){return{type:e}}function G9(e,t,n){this.k=e,this.x=t,this.y=n}G9.prototype={constructor:G9,scale:function(e){return e===1?this:new G9(this.k*e,this.x,this.y)},translate:function(e,t){return e===0&t===0?this:new G9(this.k,this.x+this.k*e,this.y+this.k*t)},apply:function(e){return[e[0]*this.k+this.x,e[1]*this.k+this.y]},applyX:function(e){return e*this.k+this.x},applyY:function(e){return e*this.k+this.y},invert:function(e){return[(e[0]-this.x)/this.k,(e[1]-this.y)/this.k]},invertX:function(e){return(e-this.x)/this.k},invertY:function(e){return(e-this.y)/this.k},rescaleX:function(e){return e.copy().domain(e.range().map(this.invertX,this).map(e.invert,e))},rescaleY:function(e){return e.copy().domain(e.range().map(this.invertY,this).map(e.invert,e))},toString:function(){return`translate(`+this.x+`,`+this.y+`) scale(`+this.k+`)`}};var Yte=new G9(1,0,0);Xte.prototype=G9.prototype;function Xte(e){for(;!e.__zoom;)if(!(e=e.parentNode))return Yte;return e.__zoom}function Zte({usageLog:e,width:t=400,height:n=400}){let r=(0,w.useRef)(null),{colorScheme:i}=nn(),a=i===`dark`,o=[],s=new Map;for(let t of e){if(!t.requestor||!t.doc_title)continue;let e=`${t.requestor}|||${t.doc_title}`;s.set(e,(s.get(e)??0)+1)}for(let[e,t]of s){let[n,r]=e.split(`|||`);o.push({requestor:n,doc:r,count:t})}let c=[...new Set(o.map(e=>e.requestor))],l=[...new Set(o.map(e=>e.doc))];return(0,w.useEffect)(()=>{if(!r.current||o.length===0)return;let e=g9(r.current);e.selectAll(`*`).remove();let i=[...c.map(e=>({id:e,group:`reader`})),...l.map(e=>({id:e,group:`document`}))];if(i.length===0)return;let s=Math.min(t,n)/2-60,u=t/2,d=n/2,f=Math.PI/Math.max(c.length,1),p=Math.PI/Math.max(l.length,1),m=new Map;c.forEach((e,t)=>{let n=Math.PI/2+f*(t+.5);m.set(e,{x:u+s*Math.cos(n),y:d+s*Math.sin(n)})}),l.forEach((e,t)=>{let n=-Math.PI/2+p*(t+.5);m.set(e,{x:u+s*Math.cos(n),y:d+s*Math.sin(n)})});let h=a?`#c1c2c5`:`#495057`,g=a?`rgba(116, 192, 252, 0.3)`:`rgba(28, 126, 214, 0.2)`,_=a?`rgba(116, 192, 252, 0.8)`:`rgba(28, 126, 214, 0.6)`,v=a?`#74c0fc`:`#1c7ed6`,y=a?`#63e6be`:`#0ca678`,b=Math.max(...o.map(e=>e.count),1),x=e.append(`g`);x.selectAll(`path.link`).data(o).enter().append(`path`).attr(`class`,`link`).attr(`d`,e=>{let t=m.get(e.requestor),n=m.get(e.doc);return`M${t.x},${t.y} Q${u},${d} ${n.x},${n.y}`}).attr(`fill`,`none`).attr(`stroke`,g).attr(`stroke-width`,e=>1+e.count/b*3).on(`mouseenter`,function(){g9(this).attr(`stroke`,_).attr(`stroke-width`,3)}).on(`mouseleave`,function(e,t){g9(this).attr(`stroke`,g).attr(`stroke-width`,1+t.count/b*3)}),x.selectAll(`circle.node`).data(i).enter().append(`circle`).attr(`class`,`node`).attr(`cx`,e=>m.get(e.id).x).attr(`cy`,e=>m.get(e.id).y).attr(`r`,5).attr(`fill`,e=>e.group===`reader`?v:y),x.selectAll(`text.label`).data(i).enter().append(`text`).attr(`class`,`label`).attr(`x`,e=>{let t=m.get(e.id);return t.x<u?t.x-10:t.x+10}).attr(`y`,e=>m.get(e.id).y).attr(`text-anchor`,e=>m.get(e.id).x<u?`end`:`start`).attr(`dominant-baseline`,`middle`).attr(`fill`,h).attr(`font-size`,`11px`).text(e=>e.id.length>35?e.id.slice(0,33)+`...`:e.id)},[o,c,l,t,n,a]),o.length===0?(0,G.jsx)(Y,{c:`dimmed`,size:`sm`,children:`Need reader + document data to show access patterns.`}):(0,G.jsxs)(`div`,{children:[(0,G.jsx)(`svg`,{ref:r,width:t,height:n}),(0,G.jsxs)(`div`,{style:{display:`flex`,gap:16,justifyContent:`center`,marginTop:4},children:[(0,G.jsx)(`span`,{style:{fontSize:11,color:a?`#74c0fc`:`#1c7ed6`},children:`● Readers`}),(0,G.jsx)(`span`,{style:{fontSize:11,color:a?`#63e6be`:`#0ca678`},children:`● Documents`})]})]})}function Qte({usageLog:e,width:t=400,height:n=400}){let r=(0,w.useRef)(null),{colorScheme:i}=nn(),a=i===`dark`,o=[],s=new Map;for(let t of e){if(!t.requestor)continue;let e=`${t.requestor}|||${t.operation}`;s.set(e,(s.get(e)??0)+1)}for(let[e,t]of s){let[n,r]=e.split(`|||`);o.push({requestor:n,operation:r,count:t})}let c=[...new Set(o.map(e=>e.requestor))],l=[...new Set(o.map(e=>e.operation))];return(0,w.useEffect)(()=>{if(!r.current||o.length===0)return;let e=g9(r.current);e.selectAll(`*`).remove();let i=[...c.map(e=>({id:e,group:`requestor`})),...l.map(e=>({id:e,group:`operation`}))];if(i.length===0)return;let s=Math.min(t,n)/2-60,u=t/2,d=n/2,f=Math.PI/Math.max(c.length,1),p=Math.PI/Math.max(l.length,1),m=new Map;c.forEach((e,t)=>{let n=Math.PI/2+f*(t+.5);m.set(e,{x:u+s*Math.cos(n),y:d+s*Math.sin(n)})}),l.forEach((e,t)=>{let n=-Math.PI/2+p*(t+.5);m.set(e,{x:u+s*Math.cos(n),y:d+s*Math.sin(n)})});let h=a?`#c1c2c5`:`#495057`,g=a?`rgba(255, 169, 77, 0.3)`:`rgba(232, 89, 12, 0.2)`,_=a?`rgba(255, 169, 77, 0.8)`:`rgba(232, 89, 12, 0.6)`,v=a?`#74c0fc`:`#1c7ed6`,y=a?`#ffa94d`:`#e8590c`,b=Math.max(...o.map(e=>e.count),1),x=e.append(`g`);x.selectAll(`path.link`).data(o).enter().append(`path`).attr(`class`,`link`).attr(`d`,e=>{let t=m.get(e.requestor),n=m.get(e.operation);return`M${t.x},${t.y} Q${u},${d} ${n.x},${n.y}`}).attr(`fill`,`none`).attr(`stroke`,g).attr(`stroke-width`,e=>1+e.count/b*4).on(`mouseenter`,function(){g9(this).attr(`stroke`,_).attr(`stroke-width`,4)}).on(`mouseleave`,function(e,t){g9(this).attr(`stroke`,g).attr(`stroke-width`,1+t.count/b*4)}),x.selectAll(`circle.node`).data(i).enter().append(`circle`).attr(`class`,`node`).attr(`cx`,e=>m.get(e.id).x).attr(`cy`,e=>m.get(e.id).y).attr(`r`,5).attr(`fill`,e=>e.group===`requestor`?v:y),x.selectAll(`text.label`).data(i).enter().append(`text`).attr(`class`,`label`).attr(`x`,e=>{let t=m.get(e.id);return t.x<u?t.x-10:t.x+10}).attr(`y`,e=>m.get(e.id).y).attr(`text-anchor`,e=>m.get(e.id).x<u?`end`:`start`).attr(`dominant-baseline`,`middle`).attr(`fill`,h).attr(`font-size`,`11px`).text(e=>e.id.length>35?e.id.slice(0,33)+`...`:e.id)},[o,c,l,t,n,a]),o.length===0?(0,G.jsx)(Y,{c:`dimmed`,size:`sm`,children:`Need requestor + operation data to show patterns.`}):(0,G.jsxs)(`div`,{children:[(0,G.jsx)(`svg`,{ref:r,width:t,height:n}),(0,G.jsxs)(`div`,{style:{display:`flex`,gap:16,justifyContent:`center`,marginTop:4},children:[(0,G.jsx)(`span`,{style:{fontSize:11,color:a?`#74c0fc`:`#1c7ed6`},children:`● Requestors`}),(0,G.jsx)(`span`,{style:{fontSize:11,color:a?`#ffa94d`:`#e8590c`},children:`● Operations`})]})]})}var $te=[{value:`7`,label:`Last 7 days`},{value:`30`,label:`Last 30 days`},{value:`90`,label:`Last 90 days`},{value:`all`,label:`All time`}],ene={"remote-mcp":`Remote MCP`,"local-mcp":`Local MCP`,"edge-function":`Edge Function`,webapp:`Web App`,cli:`CLI`,api:`API (identified)`},tne=[{value:``,label:`All paths`},...UF.map(e=>({value:e,label:ene[e]}))],K9=[`#228be6`,`#12b886`,`#e8590c`,`#9c36b5`,`#15aabf`,`#e03131`,`#74b816`,`#4263eb`],q9={text:{fill:`var(--mantine-color-text)`},axis:{ticks:{text:{fill:`var(--mantine-color-dimmed)`,fontSize:11}},legend:{text:{fill:`var(--mantine-color-text)`,fontSize:12}}},grid:{line:{stroke:`var(--mantine-color-default-border)`,strokeWidth:1}},tooltip:{container:{background:`var(--mantine-color-body)`,color:`var(--mantine-color-text)`,border:`1px solid var(--mantine-color-default-border)`,borderRadius:4,fontSize:12}}};function nne(e){let t=new Date;return t.setDate(t.getDate()-e),t.toISOString()}function J9(e,t,n,r,i){let a={};return e!==`all`&&(a.start=nne(Number(e))),t&&(a.start=t),n&&(a.end=n),r&&(a.project_id=r),i&&(a.access_path=i),a}function rne(){let e=Gy(),[t,n]=(0,w.useState)(`30`),[r,i]=(0,w.useState)(``),[a,o]=(0,w.useState)(``),[s,c]=(0,w.useState)(``),[l,u]=(0,w.useState)(``),[d,f]=(0,w.useState)(null),{data:p}=Yy({queryKey:[`projects`],queryFn:HP,staleTime:6e4,retry:1}),{data:m}=Yy({queryKey:[`config`,`usage_tracking_enabled`],queryFn:()=>Mw(`usage_tracking_enabled`),staleTime:1e4,retry:1}),{data:h,isLoading:g,error:_}=Yy({queryKey:[`usageSummary`,d],queryFn:()=>kw(d),enabled:d!==null,staleTime:6e4,retry:0}),{data:v,isLoading:y}=Yy({queryKey:[`usageLog`,d],queryFn:()=>Aw({...d,limit:200}),enabled:d!==null&&h!==void 0,staleTime:6e4,retry:0}),b=Xy({mutationFn:e=>Nw(`usage_tracking_enabled`,e?`true`:`false`),onSuccess:(t,n)=>{e.invalidateQueries({queryKey:[`config`]}),YP(`Usage tracking ${n?`enabled`:`disabled`}`,n?`Reads and writes will now be recorded in the usage log.`:`Operations will no longer be recorded.`)}}),x=[{value:``,label:`All projects`},...(p??[]).map(e=>({value:e.id,label:e.name}))],S=m===`true`,C=g||y,T=_,E=(0,w.useCallback)(()=>{let e=J9(t,s,l,r,a);f(e)},[t,s,l,r,a]),D=d??J9(t,s,l,r,a);return(0,G.jsxs)(Pp,{size:`xl`,children:[(0,G.jsx)(`p`,{className:X.eyebrow,children:`Usage`}),(0,G.jsxs)(El,{justify:`space-between`,mb:`md`,children:[(0,G.jsx)(z_,{order:2,children:`Analytics`}),(0,G.jsxs)(El,{gap:`md`,children:[(0,G.jsx)(a_,{label:`Opt-in. Logs each read/write (operation metadata only — no content) to the usage log, powering these charts and the dashboard's agent-activity card. Same setting as usage_tracking_enabled on the Settings page — either place works.`,multiline:!0,w:300,withArrow:!0,openDelay:120,position:`bottom`,children:(0,G.jsx)(j_,{label:`Usage tracking`,checked:S,onChange:e=>b.mutate(e.currentTarget.checked),size:`sm`,color:`green`,disabled:b.isPending})}),(0,G.jsx)(bp,{variant:`subtle`,leftSection:(0,G.jsx)(gC,{size:16}),component:`a`,href:jw(D),download:!0,size:`sm`,children:`Export CSV`})]})]}),(0,G.jsx)(Dp,{withBorder:!0,mb:`md`,p:`sm`,children:(0,G.jsxs)(El,{gap:`sm`,wrap:`wrap`,children:[(0,G.jsx)(d_,{label:`Period`,data:$te,value:t,onChange:e=>{n(e??`30`),c(``),u(``)},size:`xs`,w:140}),(0,G.jsx)(M_,{label:`Custom start`,placeholder:`YYYY-MM-DD`,value:s,onChange:e=>{c(e.currentTarget.value),n(`all`)},size:`xs`,w:130}),(0,G.jsx)(M_,{label:`Custom end`,placeholder:`YYYY-MM-DD`,value:l,onChange:e=>{u(e.currentTarget.value),n(`all`)},size:`xs`,w:130}),(0,G.jsx)(d_,{label:`Project`,data:x,value:r,onChange:e=>i(e??``),size:`xs`,w:160,clearable:!0}),(0,G.jsx)(d_,{label:`Access path`,data:tne,value:a,onChange:e=>o(e??``),size:`xs`,w:150,clearable:!0}),(0,G.jsx)(w_,{gap:2,justify:`flex-end`,style:{paddingTop:20},children:(0,G.jsx)(bp,{leftSection:(0,G.jsx)(OC,{size:16}),onClick:E,loading:C,size:`sm`,children:`Run Analysis`})})]})}),C&&(0,G.jsx)(El,{justify:`center`,mt:`xl`,children:(0,G.jsx)(cl,{})}),T&&(0,G.jsxs)(Y,{c:`red`,mt:`md`,children:[`Error loading analytics: `,T.message]}),!d&&!C&&(0,G.jsx)(Dp,{withBorder:!0,p:`xl`,mt:`md`,children:(0,G.jsx)(Y,{ta:`center`,c:`dimmed`,size:`lg`,children:`Select filters and click "Run Analysis" to load usage data.`})}),h&&(0,G.jsx)(ine,{summary:h,usageLog:v??[]})]})}function ine({summary:e,usageLog:t}){let n=e.ops_by_operation[0];return(0,G.jsxs)(w_,{gap:`md`,children:[(0,G.jsxs)(b_,{cols:{base:2,sm:4},children:[(0,G.jsx)(Y9,{label:`Total Calls`,value:e.total_count.toLocaleString()}),(0,G.jsx)(Y9,{label:`Unique Requestors`,value:String(e.top_requestors.length)}),(0,G.jsx)(Y9,{label:`Docs Accessed`,value:String(e.top_documents.length)}),(0,G.jsx)(Y9,{label:`Top Operation`,value:n?n.operation:`--`,sub:n?`${n.count} calls`:``})]}),e.total_count===0?(0,G.jsx)(Dp,{withBorder:!0,p:`xl`,children:(0,G.jsx)(Y,{ta:`center`,c:`dimmed`,size:`lg`,children:`No usage data for the selected period. Enable tracking and use the knowledge base to start collecting analytics.`})}):(0,G.jsxs)(G.Fragment,{children:[(0,G.jsxs)(Dp,{withBorder:!0,p:`md`,children:[(0,G.jsx)(Y,{fw:500,mb:`sm`,children:`Calls per Day`}),(0,G.jsx)(`div`,{style:{height:250},children:(0,G.jsx)(l8,{data:e.ops_by_day.map(e=>({day:e.day.slice(5),calls:e.count})),keys:[`calls`],indexBy:`day`,margin:{top:10,right:20,bottom:40,left:50},padding:.3,colors:[`#228be6`],axisBottom:{tickRotation:e.ops_by_day.length>15?-45:0},axisLeft:{legend:`Calls`,legendPosition:`middle`,legendOffset:-40},enableLabel:!1,theme:q9})})]}),(0,G.jsxs)(Jp,{children:[(0,G.jsx)(Jp.Col,{span:{base:12,md:6},children:(0,G.jsxs)(Dp,{withBorder:!0,p:`md`,h:`100%`,children:[(0,G.jsx)(Y,{fw:500,mb:`sm`,children:`By Access Path`}),(0,G.jsx)(`div`,{style:{height:200},children:(0,G.jsx)(l8,{data:e.ops_by_access_path.map(e=>({path:e.access_path,calls:e.count})),keys:[`calls`],indexBy:`path`,margin:{top:10,right:20,bottom:40,left:50},padding:.4,colors:[`#12b886`],enableLabel:!1,theme:q9})})]})}),(0,G.jsx)(Jp.Col,{span:{base:12,md:6},children:(0,G.jsxs)(Dp,{withBorder:!0,p:`md`,h:`100%`,children:[(0,G.jsx)(Y,{fw:500,mb:`sm`,children:`Operations Breakdown`}),(0,G.jsx)(`div`,{style:{height:200},children:(0,G.jsx)(o5,{data:e.ops_by_operation.map((e,t)=>({id:e.operation,label:e.operation,value:e.count,color:K9[t%K9.length]})),margin:{top:20,right:80,bottom:20,left:80},innerRadius:.5,padAngle:1,cornerRadius:3,colors:{datum:`data.color`},arcLinkLabelsTextColor:`var(--mantine-color-text)`,arcLinkLabelsColor:{from:`color`},arcLabelsTextColor:`#fff`,enableArcLabels:!1,theme:q9})})]})})]}),(0,G.jsxs)(Jp,{children:[(0,G.jsx)(Jp.Col,{span:{base:12,md:6},children:(0,G.jsxs)(Dp,{withBorder:!0,p:`md`,h:`100%`,children:[(0,G.jsx)(Y,{fw:500,mb:`sm`,children:`Most Accessed Documents`}),e.top_documents.length===0?(0,G.jsx)(Y,{c:`dimmed`,size:`sm`,children:`No document-specific access recorded.`}):(0,G.jsx)(`div`,{style:{height:Math.max(150,e.top_documents.length*32)},children:(0,G.jsx)(l8,{data:e.top_documents.map(e=>({doc:e.doc_title.length>25?e.doc_title.slice(0,23)+`...`:e.doc_title,calls:e.count})),keys:[`calls`],indexBy:`doc`,layout:`horizontal`,margin:{top:5,right:30,bottom:30,left:160},padding:.3,colors:[`#e8590c`],enableLabel:!0,labelTextColor:`#fff`,theme:q9})})]})}),(0,G.jsx)(Jp.Col,{span:{base:12,md:6},children:(0,G.jsxs)(Dp,{withBorder:!0,p:`md`,h:`100%`,children:[(0,G.jsx)(Y,{fw:500,mb:`sm`,children:`Most Active Requestors`}),e.top_requestors.length===0?(0,G.jsx)(Y,{c:`dimmed`,size:`sm`,children:`No requestor attribution recorded.`}):(0,G.jsx)(`div`,{style:{height:Math.max(150,e.top_requestors.length*32)},children:(0,G.jsx)(l8,{data:e.top_requestors.map(e=>({requestor:e.requestor,calls:e.count})),keys:[`calls`],indexBy:`requestor`,layout:`horizontal`,margin:{top:5,right:30,bottom:30,left:120},padding:.3,colors:[`#9c36b5`],enableLabel:!0,labelTextColor:`#fff`,theme:q9})})]})})]}),(0,G.jsxs)(Jp,{children:[(0,G.jsx)(Jp.Col,{span:{base:12,md:6},children:(0,G.jsxs)(Dp,{withBorder:!0,p:`md`,h:`100%`,children:[(0,G.jsx)(Y,{fw:500,mb:`sm`,children:`Requestor Activity (Word Cloud)`}),e.top_requestors.length===0?(0,G.jsx)(Y,{c:`dimmed`,size:`sm`,children:`No requestor data available.`}):(0,G.jsx)(d5,{data:e.top_requestors.map(e=>({text:e.requestor,value:e.count}))})]})}),(0,G.jsx)(Jp.Col,{span:{base:12,md:6},children:(0,G.jsxs)(Dp,{withBorder:!0,p:`md`,h:`100%`,children:[(0,G.jsx)(Y,{fw:500,mb:`sm`,children:`Requestor → Document Access Patterns`}),(0,G.jsx)(Zte,{usageLog:t})]})})]}),(0,G.jsxs)(Dp,{withBorder:!0,p:`md`,children:[(0,G.jsx)(Y,{fw:500,mb:`sm`,children:`Requestor → Operation Patterns`}),(0,G.jsx)(Qte,{usageLog:t})]})]})]})}function Y9({label:e,value:t,sub:n}){return(0,G.jsxs)(Dp,{withBorder:!0,p:`sm`,children:[(0,G.jsx)(Y,{size:`xs`,c:`dimmed`,tt:`uppercase`,fw:500,children:e}),(0,G.jsx)(Y,{size:`xl`,fw:700,mt:4,children:t}),n&&(0,G.jsx)(Y,{size:`xs`,c:`dimmed`,children:n})]})}async function ane(e){return WC(`/documents/metadata-search`,{method:`POST`,body:JSON.stringify(e)})}function one(){let e=Ex(),[t,n]=(0,w.useState)([{key:``,value:``}]),[r,i]=(0,w.useState)(``),[a,o]=(0,w.useState)(``),[s,c]=(0,w.useState)(``),[l,u]=(0,w.useState)(25),{data:d}=Yy({queryKey:[`metadataKeys`],queryFn:UP,staleTime:6e4}),{data:f}=Yy({queryKey:[`projects`],queryFn:HP,staleTime:6e4}),p=(d??[]).map(e=>({value:e.key,label:`${e.key} (${e.doc_count} docs)`})),m=[{value:``,label:`All projects`},...(f??[]).map(e=>({value:e.id,label:e.name}))],h=()=>n(e=>[...e,{key:``,value:``}]),g=e=>n(t=>t.filter((t,n)=>n!==e)),_=(e,t,r)=>n(n=>n.map((n,i)=>i===e?{...n,[t]:r}:n)),{mutate:v,data:y,isPending:b,error:x,reset:S}=Xy({mutationFn:e=>ane(e)}),C=(0,w.useCallback)(()=>{let e={};for(let n of t)n.key.trim()&&n.value.trim()&&(e[n.key.trim()]=n.value.trim());return e},[t]),T=(0,w.useCallback)(()=>{let e=C();if(Object.keys(e).length===0)return;let t={metadata_filter:e,limit:l};r&&(t.project_id=r),a&&(t.updated_since=a),s&&(t.created_since=s),S(),v(t)},[C,r,a,s,l,v,S]),E=t.filter(e=>e.key.trim()&&e.value.trim()).length,D=C(),O=`-f '${JSON.stringify(Object.keys(D).length?D:{key:`value`})}'`;return(0,G.jsxs)(`div`,{className:vw.wrap,children:[(0,G.jsxs)(`div`,{className:X.pageHead,children:[(0,G.jsxs)(`div`,{children:[(0,G.jsx)(`p`,{className:X.eyebrow,children:`Knowledge base`}),(0,G.jsx)(`h1`,{className:X.pageTitle,"data-testid":`page-title`,children:`Metadata Search`}),(0,G.jsx)(`p`,{className:X.pageSub,children:`Find documents by their metadata keys and values.`})]}),(0,G.jsx)(fw,{cmd:`cerefox metadata search`,args:O})]}),(0,G.jsx)(Dp,{withBorder:!0,mb:`md`,p:`md`,radius:`lg`,children:(0,G.jsxs)(w_,{gap:`sm`,children:[(0,G.jsxs)(Y,{fw:600,size:`sm`,children:[`Metadata filters `,(0,G.jsx)(`span`,{className:X.faint,children:`(all must match)`})]}),t.map((e,n)=>(0,G.jsxs)(El,{gap:`xs`,align:`flex-end`,children:[(0,G.jsx)(d_,{placeholder:`Key`,data:p,value:e.key||null,onChange:e=>_(n,`key`,e??``),searchable:!0,allowDeselect:!0,style:{flex:1},size:`sm`}),(0,G.jsx)(M_,{placeholder:`Value`,value:e.value,onChange:e=>_(n,`value`,e.currentTarget.value),style:{flex:1},size:`sm`}),t.length>1&&(0,G.jsx)(gl,{variant:`subtle`,color:`red`,onClick:()=>g(n),size:`md`,children:(0,G.jsx)(IC,{size:16})})]},n)),(0,G.jsx)(bp,{variant:`subtle`,size:`xs`,leftSection:(0,G.jsx)(kC,{size:14}),onClick:h,style:{alignSelf:`flex-start`},children:`Add filter`}),(0,G.jsxs)(El,{gap:`sm`,grow:!0,children:[(0,G.jsx)(d_,{label:`Project`,data:m,value:r,onChange:e=>i(e??``),size:`sm`,clearable:!0}),(0,G.jsx)(Gg,{label:`Limit`,value:l,onChange:e=>u(Number(e)||25),min:1,max:100,size:`sm`})]}),(0,G.jsxs)(El,{gap:`sm`,grow:!0,children:[(0,G.jsx)(M_,{label:`Updated since`,type:`date`,value:a,onChange:e=>o(e.currentTarget.value),size:`sm`}),(0,G.jsx)(M_,{label:`Created since`,type:`date`,value:s,onChange:e=>c(e.currentTarget.value),size:`sm`})]}),(0,G.jsx)(bp,{"data-testid":`metadata-search-submit`,leftSection:(0,G.jsx)(jC,{size:16}),onClick:T,disabled:E===0,loading:b,style:{alignSelf:`flex-start`},children:`Search`})]})}),x&&(0,G.jsxs)(Y,{c:`red`,mt:`md`,children:[`Error: `,x.message]}),y&&(0,G.jsxs)(`div`,{className:`${X.card} ${X.rise}`,style:{overflow:`hidden`},children:[(0,G.jsxs)(`table`,{className:vw.tbl,children:[(0,G.jsx)(`thead`,{children:(0,G.jsxs)(`tr`,{children:[(0,G.jsx)(`th`,{children:`Document`}),(0,G.jsx)(`th`,{children:`Metadata`}),(0,G.jsx)(`th`,{style:{width:160},children:`Project`}),(0,G.jsx)(`th`,{style:{width:110,textAlign:`right`},children:`Updated`})]})}),(0,G.jsx)(`tbody`,{children:y.length===0?(0,G.jsx)(`tr`,{children:(0,G.jsx)(`td`,{colSpan:4,className:vw.emptyRow,children:`No documents match the metadata filter.`})}):y.map(t=>{let n=Object.entries(t.doc_metadata??{});return(0,G.jsxs)(`tr`,{style:{cursor:`pointer`},onClick:()=>e(`/document/${t.document_id}`),children:[(0,G.jsx)(`td`,{children:(0,G.jsx)(`span`,{className:X.link,style:{fontSize:13.5},children:t.title})}),(0,G.jsx)(`td`,{children:(0,G.jsxs)(`span`,{style:{display:`inline-flex`,gap:6,flexWrap:`wrap`},children:[n.slice(0,3).map(([e,t])=>(0,G.jsxs)(`span`,{className:`${X.badge} ${X.bNeutral}`,children:[e,`=`,String(t).length>24?`${String(t).slice(0,22)}…`:String(t)]},e)),n.length>3&&(0,G.jsxs)(`span`,{className:`${X.badge} ${X.bNeutral}`,children:[`+`,n.length-3]})]})}),(0,G.jsx)(`td`,{children:(0,G.jsx)(`span`,{style:{display:`inline-flex`,gap:4,flexWrap:`wrap`},children:t.project_names.map(e=>(0,G.jsx)(`span`,{className:`${X.badge} ${X.bNeutral}`,children:e},e))})}),(0,G.jsx)(`td`,{style:{textAlign:`right`},children:(0,G.jsx)(`span`,{className:`${X.faint} ${X.mono}`,style:{fontSize:12},children:t.updated_at?.slice(0,10)??`?`})})]},t.document_id)})})]}),(0,G.jsx)(`div`,{className:vw.foot,children:(0,G.jsxs)(`span`,{className:vw.faint,children:[y.length,` document`,y.length===1?``:`s`]})})]})]})}var X9={wrap:`_wrap_gy5et_4`,searchBar:`_searchBar_gy5et_11`,searchInputRow:`_searchInputRow_gy5et_14`,searchInput:`_searchInput_gy5et_14`,searchControls:`_searchControls_gy5et_34`,controlsRight:`_controlsRight_gy5et_41`,filterRow:`_filterRow_gy5et_48`,resultMeta:`_resultMeta_gy5et_57`,results:`_results_gy5et_67`,resultCard:`_resultCard_gy5et_72`,resultCardOpen:`_resultCardOpen_gy5et_80`,resultHead:`_resultHead_gy5et_83`,resultTitleWrap:`_resultTitleWrap_gy5et_90`,resultTitle:`_resultTitle_gy5et_90`,breadcrumb:`_breadcrumb_gy5et_107`,resultMetaR:`_resultMetaR_gy5et_126`,chev:`_chev_gy5et_132`,chevOpen:`_chevOpen_gy5et_137`,resultSnippet:`_resultSnippet_gy5et_140`,resultSnippetOpen:`_resultSnippetOpen_gy5et_152`,resultExpand:`_resultExpand_gy5et_156`,fade:`_fade_gy5et_1`,resultStats:`_resultStats_gy5et_160`,dot:`_dot_gy5et_169`,emptyState:`_emptyState_gy5et_176`},sne=[{v:`hybrid`,label:`Hybrid`,icon:NC,desc:`BM25 + embeddings`},{v:`fts`,label:`Keyword`,icon:jC,desc:`Exact full-text`},{v:`semantic`,label:`Semantic`,icon:MC,desc:`Meaning-based`}],cne=[5,10,20];function lne({query:e,mode:t,projectId:n,count:r,reviewStatus:i,metadataFilter:a,onSearch:o}){let[s,c]=(0,w.useState)(e),[l,u]=(0,w.useState)(t===`docs`?`documents`:`chunks`),[d,f]=(0,w.useState)(t===`docs`?`hybrid`:t),[p,m]=(0,w.useState)(n),[h,g]=(0,w.useState)(r),[_,v]=(0,w.useState)(i),[y,b]=(0,w.useState)(()=>Object.entries(a).map(([e,t])=>({key:e,value:t}))),[x,S]=(0,w.useState)(y.length>0),{data:C}=qP(),{data:T}=JP(),E=(0,w.useCallback)(()=>{let e={};for(let t of y)t.key.trim()&&t.value.trim()&&(e[t.key.trim()]=t.value.trim());return e},[y]),D=(0,w.useCallback)(e=>{o({q:s,mode:l===`documents`?`docs`:d,projectId:p,count:h,reviewStatus:_,metadataFilter:E(),...e})},[s,l,d,p,h,_,E,o]),O=e=>{u(e),D({mode:e===`documents`?`docs`:d})},k=e=>{f(e),u(`chunks`),D({mode:e})},A=e=>{m(e),D({projectId:e})},j=e=>{g(e),D({count:e})},M=()=>{let e=_===`pending_review`?``:`pending_review`;v(e),D({reviewStatus:e})},N=T?.map(e=>({value:e.key,label:`${e.key} (${e.doc_count} docs)`}))??[];return(0,G.jsxs)(`div`,{className:`${X.card} ${X9.searchBar} ${X.rise}`,children:[(0,G.jsxs)(`form`,{className:X9.searchInputRow,onSubmit:e=>{e.preventDefault(),D({})},children:[(0,G.jsx)(jC,{size:20}),(0,G.jsx)(`input`,{className:X9.searchInput,value:s,onChange:e=>c(e.currentTarget.value),placeholder:`Search your knowledge base…`}),s&&(0,G.jsx)(`button`,{type:`button`,className:X.iconBtn,style:{width:30,height:30},"aria-label":`Clear`,onClick:()=>{c(``)},children:(0,G.jsx)(RC,{size:16})}),(0,G.jsx)(`button`,{type:`submit`,className:`${X.btn} ${X.btnPrimary}`,children:`Search`})]}),(0,G.jsx)(`div`,{className:X.divider}),(0,G.jsxs)(`div`,{className:X9.searchControls,children:[(0,G.jsxs)(`div`,{className:X.seg,children:[(0,G.jsxs)(`button`,{type:`button`,title:`Whole documents — one entry per document, hybrid-ranked`,className:`${X.segBtn} ${l===`documents`?X.segBtnOn:``}`,onClick:()=>O(`documents`),children:[(0,G.jsx)(vC,{size:14}),`Documents`]}),(0,G.jsxs)(`button`,{type:`button`,title:`Matching chunks — pick a ranker`,className:`${X.segBtn} ${l===`chunks`?X.segBtnOn:``}`,onClick:()=>O(`chunks`),children:[(0,G.jsx)(CC,{size:14}),`Chunks`]})]}),l===`chunks`?(0,G.jsxs)(`span`,{className:X.selectWrap,title:`Ranking method`,children:[(0,G.jsx)(`select`,{className:X.selectEl,value:d,onChange:e=>k(e.currentTarget.value),children:sne.map(e=>(0,G.jsx)(`option`,{value:e.v,children:e.label},e.v))}),(0,G.jsx)(dC,{size:14})]}):(0,G.jsx)(`span`,{className:`${X.faint} ${X.mono}`,style:{fontSize:11.5},children:`whole documents · hybrid-ranked`}),(0,G.jsxs)(`div`,{className:X9.controlsRight,children:[(0,G.jsxs)(`span`,{className:X.selectWrap,children:[(0,G.jsx)(bC,{size:14}),(0,G.jsxs)(`select`,{className:X.selectEl,value:p,onChange:e=>A(e.currentTarget.value),children:[(0,G.jsxs)(`option`,{value:``,children:[`All projects (`,C?.length??0,`)`]}),C?.map(e=>(0,G.jsx)(`option`,{value:e.id,children:e.name},e.id))]}),(0,G.jsx)(dC,{size:14})]}),(0,G.jsxs)(`span`,{className:X.selectWrap,children:[(0,G.jsx)(`select`,{className:X.selectEl,value:String(h),onChange:e=>j(Number(e.currentTarget.value)),children:cne.map(e=>(0,G.jsxs)(`option`,{value:e,children:[e,` results`]},e))}),(0,G.jsx)(dC,{size:14})]}),(0,G.jsxs)(`button`,{type:`button`,className:`${X.chip} ${_===`pending_review`?X.chipOn:``}`,onClick:M,children:[(0,G.jsx)(uC,{size:13}),`Pending review`]}),(0,G.jsxs)(`button`,{type:`button`,className:`${X.chip} ${x?X.chipOn:``}`,onClick:()=>S(e=>!e),children:[(0,G.jsx)(nC,{size:13}),`Filters`,y.length>0?` (${y.length})`:``]})]})]}),x&&(0,G.jsxs)(`div`,{className:X9.filterRow,children:[y.map((e,t)=>(0,G.jsxs)(`div`,{style:{display:`flex`,gap:8,alignItems:`center`},children:[(0,G.jsx)(d_,{placeholder:`Key`,data:N,value:e.key||null,onChange:e=>b(n=>n.map((n,r)=>r===t?{...n,key:e||``}:n)),searchable:!0,size:`xs`,w:190}),(0,G.jsx)(M_,{placeholder:`Value`,value:e.value,onChange:e=>b(n=>n.map((n,r)=>r===t?{...n,value:e.currentTarget.value}:n)),size:`xs`,w:190}),(0,G.jsx)(gl,{variant:`subtle`,color:`red`,size:`sm`,onClick:()=>b(e=>e.filter((e,n)=>n!==t)),children:(0,G.jsx)(RC,{size:14})})]},t)),(0,G.jsx)(`button`,{type:`button`,className:`${X.btn} ${X.btnSubtle}`,onClick:()=>b(e=>[...e,{key:``,value:``}]),children:`+ Add filter`}),(0,G.jsx)(`button`,{type:`button`,className:`${X.btn} ${X.btnGhost}`,onClick:()=>D({}),children:`Apply filters`})]})]})}function Z9(e){return`full_content`in e}function une({score:e,size:t=38}){let n=Math.max(0,Math.min(1,e)),r=Math.round(n*100),i=(t-5)/2,a=2*Math.PI*i,o=r>=70?`var(--green)`:r>=40?`var(--yellow)`:`var(--text-faint)`;return(0,G.jsxs)(`div`,{style:{position:`relative`,width:t,height:t,flexShrink:0},children:[(0,G.jsxs)(`svg`,{width:t,height:t,style:{transform:`rotate(-90deg)`},children:[(0,G.jsx)(`circle`,{cx:t/2,cy:t/2,r:i,fill:`none`,stroke:`var(--border)`,strokeWidth:2.5}),(0,G.jsx)(`circle`,{cx:t/2,cy:t/2,r:i,fill:`none`,stroke:o,strokeWidth:2.5,strokeLinecap:`round`,strokeDasharray:a,strokeDashoffset:a*(1-n),style:{transition:`stroke-dashoffset .6s cubic-bezier(.2,.7,.3,1)`}})]}),(0,G.jsx)(`span`,{style:{position:`absolute`,inset:0,display:`grid`,placeItems:`center`,fontFamily:`var(--font-mono)`,fontSize:t>34?11:9.5,fontWeight:600,color:o},children:r})]})}var Q9=[`--primary`,`--violet`,`--blue`,`--green`,`--yellow`,`--red`];function dne(e){let t=0;for(let n=0;n<e.length;n++)t=t*31+e.charCodeAt(n)>>>0;return`var(${Q9[t%Q9.length]})`}var fne={docs:`documents`,hybrid:`chunks`,fts:`chunks`,semantic:`chunks`},pne={docs:`hybrid`,hybrid:`hybrid`,fts:`keyword`,semantic:`semantic`};function mne({data:e,isLoading:t,error:n,hasQuery:r}){let i=Ex(),[a,o]=(0,w.useState)(null),[s,c]=(0,w.useState)(null),l=(0,w.useRef)(null);(0,w.useEffect)(()=>()=>{l.current&&clearTimeout(l.current)},[]);let u=(e,t)=>{navigator.clipboard?.writeText(t),c(e),l.current&&clearTimeout(l.current),l.current=setTimeout(()=>c(null),1200)};if(!r)return(0,G.jsxs)(`div`,{className:`${X.card} ${X9.emptyState}`,style:{marginTop:22},children:[(0,G.jsx)(jC,{size:28}),(0,G.jsx)(`p`,{style:{marginTop:10},children:`Enter a query or pick a project to browse your memory.`})]});if(t)return(0,G.jsxs)(`div`,{style:{display:`flex`,gap:12,justifyContent:`center`,marginTop:40},children:[(0,G.jsx)(cl,{size:`sm`}),(0,G.jsx)(`span`,{className:X.dim,children:`Searching…`})]});if(n)return(0,G.jsx)(Nd,{icon:(0,G.jsx)(rC,{size:16}),title:`Search failed`,color:`red`,mt:`md`,children:n.message});if(!e||e.results.length===0)return(0,G.jsxs)(`div`,{className:`${X.card} ${X9.emptyState}`,style:{marginTop:22},children:[(0,G.jsx)(jC,{size:28}),(0,G.jsx)(`p`,{style:{marginTop:10},children:`No results. Try widening your search or switching mode.`})]});let d=(e.response_bytes/1024).toFixed(1),f=e.results.map(e=>Z9(e)?e.best_score:e.score),p=Math.max(0,...f),m=e=>p>1?e/p:Math.max(0,Math.min(1,e)),h=e.results.length>0&&e.results.every(e=>e.below_confidence===!0);return(0,G.jsxs)(G.Fragment,{children:[h&&(0,G.jsxs)(`div`,{className:X9.resultMeta,style:{color:`var(--warning, #b58900)`},children:[`⚠ No results cleared the confidence threshold — showing the closest`,` `,e.results.length,` candidate`,e.results.length===1?``:`s`,`; judge relevance by their scores.`]}),(0,G.jsxs)(`div`,{className:X9.resultMeta,children:[(0,G.jsxs)(`span`,{children:[(0,G.jsx)(`b`,{className:X.mono,style:{color:`var(--text)`},children:e.total_found}),` `,`result`,e.total_found===1?``:`s`,` ·`,` `,(0,G.jsx)(`span`,{className:X.mono,style:{color:`var(--primary)`},children:fne[e.mode]}),` `,`ranked by`,` `,(0,G.jsx)(`span`,{className:X.mono,style:{color:`var(--primary)`},children:pne[e.mode]}),` `,`relevance`]}),(0,G.jsxs)(`span`,{className:`${X.faint} ${X.mono}`,style:{fontSize:12},children:[e.truncated?`truncated · `:``,d,` KB`]})]}),(0,G.jsx)(`div`,{className:X9.results,children:e.results.map(e=>{let t=Z9(e),n=t?e.document_id:e.chunk_id,r=e.document_id,c=t?e.best_score:e.score,l=e.doc_title||`Untitled`,d=t?e.best_chunk_heading_path:e.heading_path,f=t?e.full_content:e.content,p=e.doc_project_names??[],h=a===n;return(0,G.jsxs)(`article`,{className:`${X.card} ${X9.resultCard} ${h?X9.resultCardOpen:``} ${X.rise}`,children:[(0,G.jsxs)(`div`,{className:X9.resultHead,onClick:()=>o(h?null:n),children:[(0,G.jsx)(une,{score:m(c)}),(0,G.jsxs)(`div`,{className:X9.resultTitleWrap,children:[(0,G.jsxs)(`div`,{className:X.row,style:{gap:8,marginBottom:5},children:[(0,G.jsx)(`h3`,{className:X9.resultTitle,children:(0,G.jsx)(`span`,{className:X.link,style:{cursor:`pointer`},onClick:e=>{e.stopPropagation(),i(`/document/${r}`)},children:l})}),t?e.is_partial?(0,G.jsx)(`span`,{className:`${X.badge} ${X.bYellow}`,children:`excerpt`}):(0,G.jsx)(`span`,{className:`${X.badge} ${X.bGreen}`,children:`full`}):(0,G.jsx)(`span`,{className:`${X.badge} ${X.bNeutral}`,children:`chunk`})]}),d.length>0&&(0,G.jsx)(`div`,{className:X9.breadcrumb,children:d.map((e,t)=>(0,G.jsxs)(`span`,{children:[t>0&&(0,G.jsx)(fC,{size:11}),(0,G.jsx)(`span`,{children:e})]},t))})]}),(0,G.jsxs)(`div`,{className:X9.resultMetaR,children:[p.map(e=>(0,G.jsxs)(`span`,{className:`${X.badge} ${X.bNeutral}`,children:[(0,G.jsx)(`span`,{className:X9.dot,style:{background:dne(e),width:6,height:6}}),e]},e)),(0,G.jsx)(`span`,{className:`${X9.chev} ${h?X9.chevOpen:``}`,children:(0,G.jsx)(dC,{size:16})})]})]}),(0,G.jsx)(`div`,{className:`${X9.resultSnippet} ${h?X9.resultSnippetOpen:``}`,children:f.slice(0,h?4e3:600)}),h&&(0,G.jsxs)(`div`,{className:X9.resultExpand,children:[(0,G.jsx)(`div`,{className:X9.resultStats,children:t?(0,G.jsxs)(G.Fragment,{children:[(0,G.jsxs)(`span`,{children:[e.chunk_count,` chunks`]}),(0,G.jsx)(`span`,{children:`·`}),(0,G.jsxs)(`span`,{children:[e.total_chars.toLocaleString(),` chars`]}),e.doc_updated_at&&(0,G.jsxs)(G.Fragment,{children:[(0,G.jsx)(`span`,{children:`·`}),(0,G.jsxs)(`span`,{children:[`updated`,` `,new Date(e.doc_updated_at).toLocaleDateString()]})]})]}):(0,G.jsxs)(G.Fragment,{children:[(0,G.jsxs)(`span`,{children:[`chunk #`,e.chunk_index]}),(0,G.jsx)(`span`,{children:`·`}),(0,G.jsxs)(`span`,{children:[e.content.length.toLocaleString(),` chars`]})]})}),(0,G.jsxs)(`div`,{className:X.row,style:{gap:8},children:[(0,G.jsxs)(`button`,{type:`button`,className:`${X.btn} ${X.btnGhost}`,onClick:()=>i(`/document/${r}`),children:[(0,G.jsx)(vC,{size:14}),`Open document`]}),(0,G.jsxs)(`button`,{type:`button`,className:`${X.btn} ${X.btnSubtle}`,style:{marginLeft:`auto`},title:s===n?`Copied!`:`Copy CLI command to clipboard`,onClick:()=>u(n,`cerefox document get ${r}`),children:[(0,G.jsx)(FC,{size:14}),(0,G.jsxs)(`span`,{className:X.mono,style:{fontSize:12},children:[`cerefox document get `,r.slice(0,8),`…`]}),s===n?(0,G.jsx)(uC,{size:13,style:{color:`var(--green)`}}):(0,G.jsx)(pC,{size:13})]})]})]})]},n)})})]})}async function hne(e){let t=e.metadata_filter&&Object.keys(e.metadata_filter).length>0?JSON.stringify(e.metadata_filter):void 0;return WC(`/search${qC({q:e.q,mode:e.mode,project_id:e.project_id,count:e.count===void 0?void 0:e.count,review_status:e.review_status,metadata_filter:t})}`)}function gne(e){if(!e)return{};let t={};for(let n of e.split(`,`)){let e=n.indexOf(`:`);e>0&&(t[n.slice(0,e)]=n.slice(e+1))}return t}function _ne(e){return Object.entries(e).filter(([e,t])=>e&&t).map(([e,t])=>`${e}:${t}`).join(`,`)}function vne(){let[e]=JS();return{q:e.get(`q`)||``,mode:e.get(`mode`)||`docs`,projectId:e.get(`project_id`)||``,count:Number(e.get(`count`))||10,reviewStatus:e.get(`review_status`)||``,metadataFilter:gne(e.get(`mf`)||``)}}function yne(e){let t=!!e.q,n={q:e.q||void 0,mode:e.mode,project_id:e.projectId||void 0,count:e.count,review_status:e.reviewStatus||void 0,metadata_filter:Object.keys(e.metadataFilter).length>0?e.metadataFilter:void 0};return Yy({queryKey:[`search`,n],queryFn:()=>hne(n),enabled:t})}function bne(){let[,e]=JS(),t=vne(),{data:n,isLoading:r,error:i}=yne(t),{data:a}=Yy({queryKey:[`dashboard`],queryFn:()=>Iw()}),o=(0,w.useCallback)(t=>{let n=new URLSearchParams;t.q&&n.set(`q`,t.q),t.mode!==`docs`&&n.set(`mode`,t.mode),t.projectId&&n.set(`project_id`,t.projectId),t.count!==10&&n.set(`count`,String(t.count)),t.reviewStatus&&n.set(`review_status`,t.reviewStatus);let r=_ne(t.metadataFilter);r&&n.set(`mf`,r),e(n)},[e]);return(0,G.jsxs)(`div`,{className:X9.wrap,children:[(0,G.jsxs)(`div`,{className:X.pageHead,children:[(0,G.jsxs)(`div`,{children:[(0,G.jsx)(`p`,{className:X.eyebrow,children:`Knowledge base`}),(0,G.jsx)(`h1`,{className:X.pageTitle,"data-testid":`page-title`,children:`Search memory`})]}),(0,G.jsxs)(`div`,{style:{display:`flex`,flexDirection:`column`,alignItems:`flex-end`,gap:8},children:[a&&(0,G.jsxs)(`span`,{className:`${X.mono} ${X.faint}`,style:{fontSize:12},children:[a.doc_count.toLocaleString(),` docs · `,a.total_chunks.toLocaleString(),` chunks`]}),(0,G.jsx)(fw,{cmd:`cerefox search`,args:`"${t.q||`query`}"${t.mode===`docs`?``:` --mode ${t.mode}`}`})]})]}),(0,G.jsx)(lne,{query:t.q,mode:t.mode,projectId:t.projectId,count:t.count,reviewStatus:t.reviewStatus,metadataFilter:t.metadataFilter,onSearch:o}),(0,G.jsx)(mne,{data:n,isLoading:r,error:i,hasQuery:!!t.q})]})}async function xne(){return WC(`/config`)}async function Sne(e,t){return WC(`/config/${encodeURIComponent(e)}`,{method:`PUT`,headers:{"Content-Type":`application/json`},body:JSON.stringify({value:t})})}var Cne=[`Retrieval`,`Retention`,`Governance`,`Features`],wne={Retrieval:`How search ranks and filters results.`,Governance:`Attribution and audit requirements for agent calls.`,Retention:`How long document version history is kept.`,Features:`Optional capabilities, off until you turn them on.`};function Tne(){let e=Gy(),{data:t,isLoading:n}=Yy({queryKey:[`config`],queryFn:xne}),[r,i]=(0,w.useState)(null),[a,o]=(0,w.useState)({}),s=Xy({mutationFn:({key:e,value:t})=>Sne(e,t),onSuccess:(t,n)=>{YP(`Saved ${n.key}`),e.invalidateQueries({queryKey:[`config`]}),e.invalidateQueries({queryKey:[`config`,n.key]}),o(e=>{let t={...e};return delete t[n.key],t})},onError:e=>{XP(e instanceof Error?e.message:String(e))}});function c(e,t){if(e.high_impact){i({entry:e,value:t});return}s.mutate({key:e.key,value:t})}if(n)return(0,G.jsx)(Y,{children:`Loading settings…`});let l=t?.keys??[];return(0,G.jsxs)(w_,{gap:`lg`,children:[(0,G.jsxs)(`div`,{children:[(0,G.jsx)(z_,{order:2,"data-testid":`page-title`,children:`Settings`}),(0,G.jsx)(Y,{c:`dimmed`,size:`sm`,children:`Runtime configuration stored in the database. A change here applies to every access path — this app, the CLI, and every connected agent.`})]}),Cne.map(e=>{let t=l.filter(t=>t.group===e);return t.length===0?null:(0,G.jsx)(Dp,{withBorder:!0,padding:`md`,"data-testid":`config-group-${e}`,children:(0,G.jsxs)(w_,{gap:`xs`,children:[(0,G.jsxs)(`div`,{children:[(0,G.jsx)(z_,{order:4,children:e}),(0,G.jsx)(Y,{size:`xs`,c:`dimmed`,children:wne[e]})]}),t.map(e=>(0,G.jsx)(Ene,{entry:e,draft:a[e.key],onDraft:t=>o(n=>({...n,[e.key]:t})),onSave:t=>c(e,t),saving:s.isPending},e.key))]})},e)}),(0,G.jsx)(Fw,{title:`CLI equivalent`,commands:[{cmd:`cerefox config list`},{cmd:`cerefox config get`,args:`min_search_score`},{cmd:`cerefox config set`,args:`min_search_score 0.6`}]}),(0,G.jsx)(lh,{opened:r!==null,onClose:()=>i(null),title:`Confirm this change`,"data-testid":`config-confirm-modal`,children:r&&(0,G.jsxs)(w_,{gap:`sm`,"data-testid":`config-confirm-body`,children:[(0,G.jsxs)(Y,{size:`sm`,children:[`Set `,(0,G.jsx)(Ap,{children:r.entry.key}),` to `,(0,G.jsx)(Ap,{children:r.value}),`?`]}),r.entry.impact_note&&(0,G.jsx)(Nd,{icon:(0,G.jsx)(iC,{size:16}),color:`yellow`,children:(0,G.jsx)(Y,{size:`sm`,children:r.entry.impact_note})}),(0,G.jsxs)(El,{justify:`flex-end`,children:[(0,G.jsx)(bp,{variant:`default`,onClick:()=>i(null),children:`Cancel`}),(0,G.jsx)(bp,{"data-testid":`config-confirm-apply`,loading:s.isPending,onClick:()=>{s.mutate({key:r.entry.key,value:r.value}),i(null)},children:`Apply`})]})]})})]})}function Ene({entry:e,draft:t,onDraft:n,onSave:r,saving:i}){let a=t??e.effective,o=(()=>{let t=e.retired_env_set?.value;if(t===void 0)return!1;let n=Number(t),r=Number(e.effective);return Number.isFinite(n)&&Number.isFinite(r)?n===r:t.trim()===e.effective.trim()})(),s=t!==void 0&&t!==e.effective;return(0,G.jsx)(Dp,{withBorder:!0,padding:`sm`,radius:`sm`,"data-testid":`config-row-${e.key}`,children:(0,G.jsxs)(El,{justify:`space-between`,align:`flex-start`,wrap:`nowrap`,children:[(0,G.jsxs)(`div`,{style:{flex:1,minWidth:0},children:[(0,G.jsxs)(El,{gap:`xs`,wrap:`nowrap`,align:`baseline`,children:[(0,G.jsx)(Y,{size:`sm`,fw:500,children:e.description}),e.value===null&&(0,G.jsx)(dp,{size:`xs`,variant:`light`,color:`gray`,children:`using default`}),e.high_impact&&(0,G.jsx)(dp,{size:`xs`,variant:`light`,color:`yellow`,children:`affects agents`})]}),(0,G.jsx)(Ap,{style:{fontSize:`0.72rem`},children:e.key}),e.retired_env_set&&(0,G.jsx)(Nd,{icon:(0,G.jsx)(iC,{size:14}),color:o?`gray`:`yellow`,mt:`xs`,p:`xs`,"data-testid":`config-retired-env-${e.key}`,children:(0,G.jsxs)(Y,{size:`xs`,children:[(0,G.jsx)(Ap,{children:e.retired_env_set.name}),` is still set in this server's environment (to `,(0,G.jsx)(Ap,{children:e.retired_env_set.value}),`) but is`,` `,(0,G.jsx)(Y,{span:!0,fw:600,children:`no longer read`}),`. This setting moved into the database in v1.1.0 so one value governs every client.`,` `,o?(0,G.jsxs)(G.Fragment,{children:[`The stored value already matches, so nothing changes: delete that line from your `,(0,G.jsx)(Ap,{children:`.env`}),`.`]}):(0,G.jsxs)(Y,{span:!0,fw:600,children:[`Your .env asked for `,e.retired_env_set.value,`, but`,` `,e.effective,` is what actually runs. Set it here if you want the old value back, then delete the line from your .env.`]})]})})]}),(0,G.jsxs)(`div`,{style:{minWidth:190},children:[e.kind===`boolean`?(0,G.jsx)(j_,{checked:a===`true`,disabled:i,onChange:e=>r(e.currentTarget.checked?`true`:`false`),label:a===`true`?`true`:`false`}):e.kind===`number`?(0,G.jsxs)(El,{gap:`xs`,wrap:`nowrap`,children:[(0,G.jsx)(Gg,{value:a===``?``:Number(a),min:e.min??void 0,max:e.max??void 0,step:.05,decimalScale:3,size:`xs`,style:{width:100},onChange:e=>n(String(e))}),(0,G.jsx)(bp,{size:`xs`,disabled:!s||i,onClick:()=>r(a),children:`Save`})]}):(0,G.jsxs)(El,{gap:`xs`,wrap:`nowrap`,children:[(0,G.jsx)(M_,{value:a,size:`xs`,style:{width:120},placeholder:e.default||`(unset)`,onChange:e=>n(e.currentTarget.value)}),(0,G.jsx)(bp,{size:`xs`,disabled:!s||i,onClick:()=>r(a),children:`Save`})]}),(0,G.jsxs)(Y,{size:`xs`,c:`dimmed`,ta:`right`,mt:4,children:[`default if unset: `,e.default||`(empty)`]})]})]})})}var $9=[`--primary`,`--violet`,`--blue`,`--green`,`--yellow`,`--red`];function Dne(e){let t=0;for(let n=0;n<e.length;n++)t=t*31+e.charCodeAt(n)>>>0;return`var(${$9[t%$9.length]})`}function One(){let e=Ex(),t=Gy(),{data:n}=qP(),r=new Map(n?.map(e=>[e.id,e.name])??[]),[i,a]=(0,w.useState)(`50`),[o,s]=(0,w.useState)(``),[c,l]=(0,w.useState)(null),{data:u,isLoading:d}=Yy({queryKey:[`trash`,i],queryFn:()=>eF(Number(i)),staleTime:1e4}),f=()=>VP(t),p=Xy({mutationFn:tF,onSuccess:()=>{f(),YP(`Document restored`)},onError:e=>XP(`Restore failed`,String(e))}),m=Xy({mutationFn:nF,onSuccess:()=>{f(),YP(`Permanently deleted`)},onError:e=>XP(`Purge failed`,String(e))});return(0,G.jsx)(bw,{eyebrow:`Recoverable`,title:`Trash`,subtitle:`Soft-deleted documents — excluded from search until restored or purged.`,headerRight:(0,G.jsx)(`div`,{style:{width:400,maxWidth:`100%`},children:(0,G.jsx)(Fw,{title:`CLI equivalent`,commands:[{cmd:`cerefox document list`,args:`--deleted`},{cmd:`cerefox document restore`,args:`<id>`}]})}),searchValue:o,onSearchChange:s,searchPlaceholder:`Filter trashed documents…`,searchText:e=>e.title,toolbarExtra:(0,G.jsx)(d_,{data:[`50`,`100`,`200`,`500`],value:i,onChange:e=>a(e||`50`),size:`sm`,w:110,"aria-label":`Max rows`}),columns:[{key:`title`,label:`Document`,render:e=>{let t=e.project_ids.find(e=>r.has(e));return(0,G.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:11},children:[(0,G.jsx)(`span`,{style:{width:8,height:8,borderRadius:`50%`,flexShrink:0,background:t?Dne(r.get(t)):`var(--text-faint)`}}),(0,G.jsx)(`span`,{className:X.link,style:{fontSize:13.5},children:e.title})]})}},{key:`project`,label:`Project`,width:160,render:e=>{let t=e.project_ids.filter(e=>r.has(e)).map(e=>r.get(e));return t.length?(0,G.jsx)(`span`,{style:{display:`inline-flex`,gap:4,flexWrap:`wrap`},children:t.map(e=>(0,G.jsx)(`span`,{className:`${X.badge} ${X.bNeutral}`,children:e},e))}):(0,G.jsx)(`span`,{className:X.faint,style:{fontSize:12},children:`—`})}},{key:`size`,label:`Size`,width:110,align:`right`,render:e=>(0,G.jsx)(`span`,{className:`${X.mono} ${X.dim}`,style:{fontSize:12},children:e.total_chars.toLocaleString()})},{key:`deleted`,label:`Deleted`,width:120,align:`right`,render:e=>(0,G.jsx)(`span`,{className:`${X.faint} ${X.mono}`,style:{fontSize:12},children:e.deleted_at?.slice(0,10)??`?`})}],rows:u??[],rowKey:e=>e.id,rowClick:t=>e(`/document/${t.id}`),loading:d,emptyText:`Trash is empty.`,actions:e=>c===e.id?(0,G.jsxs)(G.Fragment,{children:[(0,G.jsx)(`button`,{type:`button`,className:`${X.btn} ${X.btnSubtle}`,style:{color:`var(--red)`},onClick:()=>{m.mutate(e.id),l(null)},children:`Confirm purge`}),(0,G.jsx)(`button`,{type:`button`,className:`${X.btn} ${X.btnSubtle}`,onClick:()=>l(null),children:`Cancel`})]}):(0,G.jsxs)(G.Fragment,{children:[(0,G.jsxs)(`button`,{type:`button`,className:`${X.btn} ${X.btnGhost} ${X.btnWarn}`,title:`Restore from trash`,onClick:()=>p.mutate(e.id),children:[(0,G.jsx)(aC,{size:14}),`Restore`]}),(0,G.jsxs)(`button`,{type:`button`,className:`${X.btn} ${X.btnGhost} ${X.btnDanger}`,title:`Permanently delete (cannot be undone)`,onClick:()=>l(e.id),children:[(0,G.jsx)(IC,{size:14}),`Purge`]})]})})}function kne(){return(0,G.jsx)(tS,{children:(0,G.jsxs)($x,{element:(0,G.jsx)(cw,{}),children:[(0,G.jsx)($x,{path:`/`,element:(0,G.jsx)(Ww,{})}),(0,G.jsx)($x,{path:`/search`,element:(0,G.jsx)(bne,{})}),(0,G.jsx)($x,{path:`/metadata-search`,element:(0,G.jsx)(one,{})}),(0,G.jsx)($x,{path:`/document/:id`,element:(0,G.jsx)(MF,{})}),(0,G.jsx)($x,{path:`/document/:id/edit`,element:(0,G.jsx)($P,{})}),(0,G.jsx)($x,{path:`/ingest`,element:(0,G.jsx)(zF,{})}),(0,G.jsx)($x,{path:`/projects`,element:(0,G.jsx)(HF,{})}),(0,G.jsx)($x,{path:`/projects/:id/documents`,element:(0,G.jsx)(BF,{})}),(0,G.jsx)($x,{path:`/audit-log`,element:(0,G.jsx)(Ow,{})}),(0,G.jsx)($x,{path:`/trash`,element:(0,G.jsx)(One,{})}),(0,G.jsx)($x,{path:`/analytics`,element:(0,G.jsx)(rne,{})}),(0,G.jsx)($x,{path:`/settings`,element:(0,G.jsx)(Tne,{})}),(0,G.jsx)($x,{path:`/help`,element:(0,G.jsx)(IF,{})}),(0,G.jsx)($x,{path:`/help/*`,element:(0,G.jsx)(IF,{})})]})})}var Ane=Nn({primaryColor:`fox`,primaryShade:{light:6,dark:5},colors:{fox:[`#fff1e8`,`#ffdcc6`,`#fcbd97`,`#f99d66`,`#f78440`,`#f57626`,`#e6641a`,`#bf5115`,`#983f10`,`#722f0b`],dark:[`#f3f1f7`,`#c4c0d4`,`#a6a2b8`,`#756f88`,`#332f49`,`#2b2840`,`#1f1c34`,`#161427`,`#121023`,`#0d0b1c`],violet:[`#f3eefe`,`#e0d3fb`,`#c4aef4`,`#aa8aed`,`#9a76e8`,`#8a62e2`,`#7a45d6`,`#6636bb`,`#522a96`,`#3f2175`],blue:[`#e9f2fd`,`#cbe0fa`,`#9cc6f4`,`#6cabef`,`#5aa9f0`,`#3f8fe0`,`#356fd0`,`#2b5aad`,`#22478a`,`#193668`],green:[`#e6f8ef`,`#c3edd9`,`#8fdcb6`,`#5acf95`,`#4ec98a`,`#36b576`,`#2f9e6a`,`#257e54`,`#1d6242`,`#154731`],yellow:[`#fdf6e3`,`#f8e9bd`,`#f0d585`,`#e8c24f`,`#e6bb45`,`#d6a52f`,`#b88824`,`#8f6a1b`,`#6d5115`,`#4d390e`],red:[`#fdecea`,`#f9cfc9`,`#f1a79c`,`#ea7f70`,`#e8675a`,`#dd4a3b`,`#c43a2c`,`#9d2f24`,`#79251c`,`#591b15`]},fontFamily:`Geist, system-ui, -apple-system, sans-serif`,fontFamilyMonospace:`'JetBrains Mono', ui-monospace, monospace`,headings:{fontFamily:`'Space Grotesk', system-ui, sans-serif`,fontWeight:`600`,sizes:{h1:{fontSize:`30px`,lineHeight:`1.15`,fontWeight:`600`},h2:{fontSize:`22px`,lineHeight:`1.2`,fontWeight:`600`},h3:{fontSize:`16px`,lineHeight:`1.3`,fontWeight:`600`}}},defaultRadius:`md`,radius:{xs:`6px`,sm:`8px`,md:`10px`,lg:`14px`,xl:`16px`},shadows:{sm:`0 1px 2px rgba(0,0,0,.10)`,md:`0 10px 30px -12px rgba(40,40,70,.18)`,lg:`0 28px 64px -20px rgba(35,30,80,.28)`},components:{Card:{defaultProps:{radius:`lg`,withBorder:!0,shadow:`sm`,padding:`lg`}},Button:{defaultProps:{radius:`md`},styles:{root:{fontWeight:600}}},Badge:{defaultProps:{radius:`xl`,variant:`light`},styles:{root:{fontFamily:`'JetBrains Mono', monospace`,fontWeight:500,textTransform:`none`}}},TextInput:{defaultProps:{radius:`md`}},Select:{defaultProps:{radius:`md`}},Table:{styles:{th:{fontFamily:`'JetBrains Mono', monospace`,fontSize:`10.5px`,fontWeight:500,letterSpacing:`0.1em`,textTransform:`uppercase`}}},SegmentedControl:{defaultProps:{radius:`md`}},Modal:{defaultProps:{radius:`lg`}},Tabs:{}},other:{fontDisplay:`'Space Grotesk', sans-serif`,fontMono:`'JetBrains Mono', monospace`}}),jne=new tee({defaultOptions:{queries:{staleTime:3e4,retry:1}}});(0,zC.createRoot)(document.getElementById(`root`)).render((0,G.jsx)(w.StrictMode,{children:(0,G.jsx)(nee,{client:jne,children:(0,G.jsxs)(Mn,{theme:Ane,defaultColorScheme:`auto`,children:[(0,G.jsx)(Pv,{position:`top-right`}),(0,G.jsx)(VS,{basename:`/app`,children:(0,G.jsx)(kne,{})})]})})}));
121
+ //# sourceMappingURL=index-P1F2Ldl9.js.map