feature_map 1.2.2 → 1.2.3

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.
Files changed (43) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +0 -1
  3. data/bin/featuremap +0 -1
  4. data/lib/feature_map/cli.rb +0 -2
  5. data/lib/feature_map/code_features/plugin.rb +2 -21
  6. data/lib/feature_map/code_features/plugins/identity.rb +1 -8
  7. data/lib/feature_map/code_features.rb +1 -31
  8. data/lib/feature_map/commit.rb +0 -19
  9. data/lib/feature_map/configuration.rb +40 -17
  10. data/lib/feature_map/constants.rb +3 -5
  11. data/lib/feature_map/mapper.rb +0 -26
  12. data/lib/feature_map/output_color.rb +0 -11
  13. data/lib/feature_map/private/additional_metrics_file.rb +9 -103
  14. data/lib/feature_map/private/assignment_applicator.rb +0 -12
  15. data/lib/feature_map/private/assignment_mappers/directory_assignment.rb +4 -26
  16. data/lib/feature_map/private/assignment_mappers/feature_definition_assignment.rb +1 -21
  17. data/lib/feature_map/private/assignment_mappers/feature_globs.rb +7 -40
  18. data/lib/feature_map/private/assignment_mappers/file_annotations.rb +20 -44
  19. data/lib/feature_map/private/assignments_file.rb +8 -54
  20. data/lib/feature_map/private/code_cov.rb +2 -29
  21. data/lib/feature_map/private/cyclomatic_complexity_calculator.rb +1 -7
  22. data/lib/feature_map/private/docs/index.html +2 -2
  23. data/lib/feature_map/private/documentation_site.rb +0 -16
  24. data/lib/feature_map/private/extension_loader.rb +0 -3
  25. data/lib/feature_map/private/feature_assigner.rb +0 -4
  26. data/lib/feature_map/private/feature_metrics_calculator.rb +2 -16
  27. data/lib/feature_map/private/feature_plugins/assignment.rb +0 -6
  28. data/lib/feature_map/private/glob_cache.rb +2 -29
  29. data/lib/feature_map/private/health_calculator.rb +122 -0
  30. data/lib/feature_map/private/lines_of_code_calculator.rb +10 -21
  31. data/lib/feature_map/private/metrics_file.rb +1 -25
  32. data/lib/feature_map/private/percentile_metrics_calculator.rb +117 -0
  33. data/lib/feature_map/private/release_notification_builder.rb +1 -13
  34. data/lib/feature_map/private/test_coverage_file.rb +12 -39
  35. data/lib/feature_map/private/test_pyramid_file.rb +0 -41
  36. data/lib/feature_map/private/todo_inspector.rb +16 -30
  37. data/lib/feature_map/private/validations/features_up_to_date.rb +1 -6
  38. data/lib/feature_map/private/validations/files_have_features.rb +2 -7
  39. data/lib/feature_map/private/validations/files_have_unique_features.rb +1 -6
  40. data/lib/feature_map/private.rb +7 -44
  41. data/lib/feature_map/validator.rb +0 -13
  42. data/lib/feature_map.rb +8 -49
  43. metadata +4 -44
@@ -65,7 +65,7 @@ Error generating stack: `+o.message+`
65
65
  * @license MIT
66
66
  */var a1="popstate";function rI(e={}){function t(i,o){let{pathname:a="/",search:l="",hash:s=""}=uo(i.location.hash.substring(1));return!a.startsWith("/")&&!a.startsWith(".")&&(a="/"+a),uv("",{pathname:a,search:l,hash:s},o.state&&o.state.usr||null,o.state&&o.state.key||"default")}function n(i,o){let a=i.document.querySelector("base"),l="";if(a&&a.getAttribute("href")){let s=i.location.href,u=s.indexOf("#");l=u===-1?s:s.slice(0,u)}return l+"#"+(typeof o=="string"?o:ps(o))}function r(i,o){Tn(i.pathname.charAt(0)==="/",`relative pathnames are not supported in hash history.push(${JSON.stringify(o)})`)}return oI(t,n,r,e)}function Fe(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function Tn(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function iI(){return Math.random().toString(36).substring(2,10)}function l1(e,t){return{usr:e.state,key:e.key,idx:t}}function uv(e,t,n=null,r){return{pathname:typeof e=="string"?e:e.pathname,search:"",hash:"",...typeof t=="string"?uo(t):t,state:n,key:t&&t.key||r||iI()}}function ps({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 uo(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 oI(e,t,n,r={}){let{window:i=document.defaultView,v5Compat:o=!1}=r,a=i.history,l="POP",s=null,u=c();u==null&&(u=0,a.replaceState({...a.state,idx:u},""));function c(){return(a.state||{idx:null}).idx}function f(){l="POP";let y=c(),v=y==null?null:y-u;u=y,s&&s({action:l,location:m.location,delta:v})}function d(y,v){l="PUSH";let g=uv(m.location,y,v);n&&n(g,y),u=c()+1;let x=l1(g,u),E=m.createHref(g);try{a.pushState(x,"",E)}catch(_){if(_ instanceof DOMException&&_.name==="DataCloneError")throw _;i.location.assign(E)}o&&s&&s({action:l,location:m.location,delta:1})}function p(y,v){l="REPLACE";let g=uv(m.location,y,v);n&&n(g,y),u=c();let x=l1(g,u),E=m.createHref(g);a.replaceState(x,"",E),o&&s&&s({action:l,location:m.location,delta:0})}function h(y){let v=i.location.origin!=="null"?i.location.origin:i.location.href,g=typeof y=="string"?y:ps(y);return g=g.replace(/ $/,"%20"),Fe(v,`No window.location.(origin|href) available to create URL for href: ${g}`),new URL(g,v)}let m={get action(){return l},get location(){return e(i,a)},listen(y){if(s)throw new Error("A history only accepts one active listener");return i.addEventListener(a1,f),s=y,()=>{i.removeEventListener(a1,f),s=null}},createHref(y){return t(i,y)},createURL:h,encodeLocation(y){let v=h(y);return{pathname:v.pathname,search:v.search,hash:v.hash}},push:d,replace:p,go(y){return a.go(y)}};return m}function _P(e,t,n="/"){return aI(e,t,n,!1)}function aI(e,t,n,r){let i=typeof t=="string"?uo(t):t,o=ci(i.pathname||"/",n);if(o==null)return null;let a=SP(e);lI(a);let l=null;for(let s=0;l==null&&s<a.length;++s){let u=yI(o);l=vI(a[s],u,r)}return l}function SP(e,t=[],n=[],r=""){let i=(o,a,l)=>{let s={relativePath:l===void 0?o.path||"":l,caseSensitive:o.caseSensitive===!0,childrenIndex:a,route:o};s.relativePath.startsWith("/")&&(Fe(s.relativePath.startsWith(r),`Absolute route path "${s.relativePath}" nested under path "${r}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),s.relativePath=s.relativePath.slice(r.length));let u=hr([r,s.relativePath]),c=n.concat(s);o.children&&o.children.length>0&&(Fe(o.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${u}".`),SP(o.children,t,c,u)),!(o.path==null&&!o.index)&&t.push({path:u,score:hI(u,o.index),routesMeta:c})};return e.forEach((o,a)=>{var l;if(o.path===""||!((l=o.path)!=null&&l.includes("?")))i(o,a);else for(let s of EP(o.path))i(o,a,s)}),t}function EP(e){let t=e.split("/");if(t.length===0)return[];let[n,...r]=t,i=n.endsWith("?"),o=n.replace(/\?$/,"");if(r.length===0)return i?[o,""]:[o];let a=EP(r.join("/")),l=[];return l.push(...a.map(s=>s===""?o:[o,s].join("/"))),i&&l.push(...a),l.map(s=>e.startsWith("/")&&s===""?"/":s)}function lI(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:mI(t.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}var sI=/^:[\w-]+$/,uI=3,cI=2,fI=1,dI=10,pI=-2,s1=e=>e==="*";function hI(e,t){let n=e.split("/"),r=n.length;return n.some(s1)&&(r+=pI),t&&(r+=cI),n.filter(i=>!s1(i)).reduce((i,o)=>i+(sI.test(o)?uI:o===""?fI:dI),r)}function mI(e,t){return e.length===t.length&&e.slice(0,-1).every((r,i)=>r===t[i])?e[e.length-1]-t[t.length-1]:0}function vI(e,t,n=!1){let{routesMeta:r}=e,i={},o="/",a=[];for(let l=0;l<r.length;++l){let s=r[l],u=l===r.length-1,c=o==="/"?t:t.slice(o.length)||"/",f=sf({path:s.relativePath,caseSensitive:s.caseSensitive,end:u},c),d=s.route;if(!f&&u&&n&&!r[r.length-1].route.index&&(f=sf({path:s.relativePath,caseSensitive:s.caseSensitive,end:!1},c)),!f)return null;Object.assign(i,f.params),a.push({params:i,pathname:hr([o,f.pathname]),pathnameBase:_I(hr([o,f.pathnameBase])),route:d}),f.pathnameBase!=="/"&&(o=hr([o,f.pathnameBase]))}return a}function sf(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[n,r]=gI(e.path,e.caseSensitive,e.end),i=t.match(n);if(!i)return null;let o=i[0],a=o.replace(/(.)\/+$/,"$1"),l=i.slice(1);return{params:r.reduce((u,{paramName:c,isOptional:f},d)=>{if(c==="*"){let h=l[d]||"";a=o.slice(0,o.length-h.length).replace(/(.)\/+$/,"$1")}const p=l[d];return f&&!p?u[c]=void 0:u[c]=(p||"").replace(/%2F/g,"/"),u},{}),pathname:o,pathnameBase:a,pattern:e}}function gI(e,t=!1,n=!0){Tn(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,(a,l,s)=>(r.push({paramName:l,isOptional:s!=null}),s?"/?([^\\/]+)?":"/([^\\/]+)"));return e.endsWith("*")?(r.push({paramName:"*"}),i+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?i+="\\/*$":e!==""&&e!=="/"&&(i+="(?:(?=\\/|$))"),[new RegExp(i,t?void 0:"i"),r]}function yI(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return Tn(!1,`The URL path "${e}" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent encoding (${t}).`),e}}function ci(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 xI(e,t="/"){let{pathname:n,search:r="",hash:i=""}=typeof e=="string"?uo(e):e;return{pathname:n?n.startsWith("/")?n:bI(n,t):t,search:SI(r),hash:EI(i)}}function bI(e,t){let n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(i=>{i===".."?n.length>1&&n.pop():i!=="."&&n.push(i)}),n.length>1?n.join("/"):"/"}function Eh(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 wI(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function OP(e){let t=wI(e);return t.map((n,r)=>r===t.length-1?n.pathname:n.pathnameBase)}function $P(e,t,n,r=!1){let i;typeof e=="string"?i=uo(e):(i={...e},Fe(!i.pathname||!i.pathname.includes("?"),Eh("?","pathname","search",i)),Fe(!i.pathname||!i.pathname.includes("#"),Eh("#","pathname","hash",i)),Fe(!i.search||!i.search.includes("#"),Eh("#","search","hash",i)));let o=e===""||i.pathname==="",a=o?"/":i.pathname,l;if(a==null)l=n;else{let f=t.length-1;if(!r&&a.startsWith("..")){let d=a.split("/");for(;d[0]==="..";)d.shift(),f-=1;i.pathname=d.join("/")}l=f>=0?t[f]:"/"}let s=xI(i,l),u=a&&a!=="/"&&a.endsWith("/"),c=(o||a===".")&&n.endsWith("/");return!s.pathname.endsWith("/")&&(u||c)&&(s.pathname+="/"),s}var hr=e=>e.join("/").replace(/\/\/+/g,"/"),_I=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),SI=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,EI=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;function OI(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}var PP=["POST","PUT","PATCH","DELETE"];new Set(PP);var $I=["GET",...PP];new Set($I);var Na=w.createContext(null);Na.displayName="DataRouter";var Id=w.createContext(null);Id.displayName="DataRouterState";var AP=w.createContext({isTransitioning:!1});AP.displayName="ViewTransition";var PI=w.createContext(new Map);PI.displayName="Fetchers";var AI=w.createContext(null);AI.displayName="Await";var Zn=w.createContext(null);Zn.displayName="Navigation";var ru=w.createContext(null);ru.displayName="Location";var Cn=w.createContext({outlet:null,matches:[],isDataRoute:!1});Cn.displayName="Route";var Qy=w.createContext(null);Qy.displayName="RouteError";function TI(e,{relative:t}={}){Fe(iu(),"useHref() may be used only in the context of a <Router> component.");let{basename:n,navigator:r}=w.useContext(Zn),{hash:i,pathname:o,search:a}=ou(e,{relative:t}),l=o;return n!=="/"&&(l=o==="/"?n:hr([n,o])),r.createHref({pathname:l,search:a,hash:i})}function iu(){return w.useContext(ru)!=null}function Nr(){return Fe(iu(),"useLocation() may be used only in the context of a <Router> component."),w.useContext(ru).location}var TP="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function jP(e){w.useContext(Zn).static||w.useLayoutEffect(e)}function jI(){let{isDataRoute:e}=w.useContext(Cn);return e?KI():CI()}function CI(){Fe(iu(),"useNavigate() may be used only in the context of a <Router> component.");let e=w.useContext(Na),{basename:t,navigator:n}=w.useContext(Zn),{matches:r}=w.useContext(Cn),{pathname:i}=Nr(),o=JSON.stringify(OP(r)),a=w.useRef(!1);return jP(()=>{a.current=!0}),w.useCallback((s,u={})=>{if(Tn(a.current,TP),!a.current)return;if(typeof s=="number"){n.go(s);return}let c=$P(s,JSON.parse(o),i,u.relative==="path");e==null&&t!=="/"&&(c.pathname=c.pathname==="/"?t:hr([t,c.pathname])),(u.replace?n.replace:n.push)(c,u.state,u)},[t,n,o,i,e])}var kI=w.createContext(null);function NI(e){let t=w.useContext(Cn).outlet;return t&&w.createElement(kI.Provider,{value:e},t)}function MI(){let{matches:e}=w.useContext(Cn),t=e[e.length-1];return t?t.params:{}}function ou(e,{relative:t}={}){let{matches:n}=w.useContext(Cn),{pathname:r}=Nr(),i=JSON.stringify(OP(n));return w.useMemo(()=>$P(e,JSON.parse(i),r,t==="path"),[e,i,r,t])}function II(e,t){return CP(e,t)}function CP(e,t,n,r){var v;Fe(iu(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:i}=w.useContext(Zn),{matches:o}=w.useContext(Cn),a=o[o.length-1],l=a?a.params:{},s=a?a.pathname:"/",u=a?a.pathnameBase:"/",c=a&&a.route;{let g=c&&c.path||"";kP(s,!c||g.endsWith("*")||g.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${s}" (under <Route path="${g}">) 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.
67
67
 
68
- Please change the parent <Route path="${g}"> to <Route path="${g==="/"?"*":`${g}/*`}">.`)}let f=Nr(),d;if(t){let g=typeof t=="string"?uo(t):t;Fe(u==="/"||((v=g.pathname)==null?void 0:v.startsWith(u)),`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 "${u}" but pathname "${g.pathname}" was given in the \`location\` prop.`),d=g}else d=f;let p=d.pathname||"/",h=p;if(u!=="/"){let g=u.replace(/^\//,"").split("/");h="/"+p.replace(/^\//,"").split("/").slice(g.length).join("/")}let m=_P(e,{pathname:h});Tn(c||m!=null,`No routes matched location "${d.pathname}${d.search}${d.hash}" `),Tn(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 y=BI(m&&m.map(g=>Object.assign({},g,{params:Object.assign({},l,g.params),pathname:hr([u,i.encodeLocation?i.encodeLocation(g.pathname).pathname:g.pathname]),pathnameBase:g.pathnameBase==="/"?u:hr([u,i.encodeLocation?i.encodeLocation(g.pathnameBase).pathname:g.pathnameBase])})),o,n,r);return t&&y?w.createElement(ru.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",...d},navigationType:"POP"}},y):y}function RI(){let e=VI(),t=OI(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},o={padding:"2px 4px",backgroundColor:r},a=null;return console.error("Error handled by React Router default ErrorBoundary:",e),a=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:o},"ErrorBoundary")," or"," ",w.createElement("code",{style:o},"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,a)}var LI=w.createElement(RI,null),DI=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?e.error:t.error,location:t.location,revalidation:e.revalidation||t.revalidation}}componentDidCatch(e,t){console.error("React Router caught the following error during render",e,t)}render(){return this.state.error!==void 0?w.createElement(Cn.Provider,{value:this.props.routeContext},w.createElement(Qy.Provider,{value:this.state.error,children:this.props.component})):this.props.children}};function FI({routeContext:e,match:t,children:n}){let r=w.useContext(Na);return r&&r.static&&r.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(r.staticContext._deepestRenderedBoundaryId=t.route.id),w.createElement(Cn.Provider,{value:e},n)}function BI(e,t=[],n=null,r=null){if(e==null){if(!n)return null;if(n.errors)e=n.matches;else if(t.length===0&&!n.initialized&&n.matches.length>0)e=n.matches;else return null}let i=e,o=n==null?void 0:n.errors;if(o!=null){let s=i.findIndex(u=>u.route.id&&(o==null?void 0:o[u.route.id])!==void 0);Fe(s>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(o).join(",")}`),i=i.slice(0,Math.min(i.length,s+1))}let a=!1,l=-1;if(n)for(let s=0;s<i.length;s++){let u=i[s];if((u.route.HydrateFallback||u.route.hydrateFallbackElement)&&(l=s),u.route.id){let{loaderData:c,errors:f}=n,d=u.route.loader&&!c.hasOwnProperty(u.route.id)&&(!f||f[u.route.id]===void 0);if(u.route.lazy||d){a=!0,l>=0?i=i.slice(0,l+1):i=[i[0]];break}}}return i.reduceRight((s,u,c)=>{let f,d=!1,p=null,h=null;n&&(f=o&&u.route.id?o[u.route.id]:void 0,p=u.route.errorElement||LI,a&&(l<0&&c===0?(kP("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),d=!0,h=null):l===c&&(d=!0,h=u.route.hydrateFallbackElement||null)));let m=t.concat(i.slice(0,c+1)),y=()=>{let v;return f?v=p:d?v=h:u.route.Component?v=w.createElement(u.route.Component,null):u.route.element?v=u.route.element:v=s,w.createElement(FI,{match:u,routeContext:{outlet:s,matches:m,isDataRoute:n!=null},children:v})};return n&&(u.route.ErrorBoundary||u.route.errorElement||c===0)?w.createElement(DI,{location:n.location,revalidation:n.revalidation,component:p,error:f,children:y(),routeContext:{outlet:null,matches:m,isDataRoute:!0}}):y()},null)}function Zy(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function zI(e){let t=w.useContext(Na);return Fe(t,Zy(e)),t}function HI(e){let t=w.useContext(Id);return Fe(t,Zy(e)),t}function UI(e){let t=w.useContext(Cn);return Fe(t,Zy(e)),t}function Jy(e){let t=UI(e),n=t.matches[t.matches.length-1];return Fe(n.route.id,`${e} can only be used on routes that contain a unique "id"`),n.route.id}function WI(){return Jy("useRouteId")}function VI(){var r;let e=w.useContext(Qy),t=HI("useRouteError"),n=Jy("useRouteError");return e!==void 0?e:(r=t.errors)==null?void 0:r[n]}function KI(){let{router:e}=zI("useNavigate"),t=Jy("useNavigate"),n=w.useRef(!1);return jP(()=>{n.current=!0}),w.useCallback(async(i,o={})=>{Tn(n.current,TP),n.current&&(typeof i=="number"?e.navigate(i):await e.navigate(i,{fromRouteId:t,...o}))},[e,t])}var u1={};function kP(e,t,n){!t&&!u1[e]&&(u1[e]=!0,Tn(!1,n))}w.memo(qI);function qI({routes:e,future:t,state:n}){return CP(e,void 0,n,t)}function GI(e){return NI(e.context)}function Pl(e){Fe(!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 XI({basename:e="/",children:t=null,location:n,navigationType:r="POP",navigator:i,static:o=!1}){Fe(!iu(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let a=e.replace(/^\/*/,"/"),l=w.useMemo(()=>({basename:a,navigator:i,static:o,future:{}}),[a,i,o]);typeof n=="string"&&(n=uo(n));let{pathname:s="/",search:u="",hash:c="",state:f=null,key:d="default"}=n,p=w.useMemo(()=>{let h=ci(s,a);return h==null?null:{location:{pathname:h,search:u,hash:c,state:f,key:d},navigationType:r}},[a,s,u,c,f,d,r]);return Tn(p!=null,`<Router basename="${a}"> is not able to match the URL "${s}${u}${c}" because it does not start with the basename, so the <Router> won't render anything.`),p==null?null:w.createElement(Zn.Provider,{value:l},w.createElement(ru.Provider,{children:t,value:p}))}function YI({children:e,location:t}){return II(cv(e),t)}function cv(e,t=[]){let n=[];return w.Children.forEach(e,(r,i)=>{if(!w.isValidElement(r))return;let o=[...t,i];if(r.type===w.Fragment){n.push.apply(n,cv(r.props.children,o));return}Fe(r.type===Pl,`[${typeof r.type=="string"?r.type:r.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`),Fe(!r.props.index||!r.props.children,"An index route cannot have child routes.");let a={id:r.props.id||o.join("-"),caseSensitive:r.props.caseSensitive,element:r.props.element,Component:r.props.Component,index:r.props.index,path:r.props.path,loader:r.props.loader,action:r.props.action,hydrateFallbackElement:r.props.hydrateFallbackElement,HydrateFallback:r.props.HydrateFallback,errorElement:r.props.errorElement,ErrorBoundary:r.props.ErrorBoundary,hasErrorBoundary:r.props.hasErrorBoundary===!0||r.props.ErrorBoundary!=null||r.props.errorElement!=null,shouldRevalidate:r.props.shouldRevalidate,handle:r.props.handle,lazy:r.props.lazy};r.props.children&&(a.children=cv(r.props.children,o)),n.push(a)}),n}var Pc="get",Ac="application/x-www-form-urlencoded";function Rd(e){return e!=null&&typeof e.tagName=="string"}function QI(e){return Rd(e)&&e.tagName.toLowerCase()==="button"}function ZI(e){return Rd(e)&&e.tagName.toLowerCase()==="form"}function JI(e){return Rd(e)&&e.tagName.toLowerCase()==="input"}function eR(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function tR(e,t){return e.button===0&&(!t||t==="_self")&&!eR(e)}var Gu=null;function nR(){if(Gu===null)try{new FormData(document.createElement("form"),0),Gu=!1}catch{Gu=!0}return Gu}var rR=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function Oh(e){return e!=null&&!rR.has(e)?(Tn(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${Ac}"`),null):e}function iR(e,t){let n,r,i,o,a;if(ZI(e)){let l=e.getAttribute("action");r=l?ci(l,t):null,n=e.getAttribute("method")||Pc,i=Oh(e.getAttribute("enctype"))||Ac,o=new FormData(e)}else if(QI(e)||JI(e)&&(e.type==="submit"||e.type==="image")){let l=e.form;if(l==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let s=e.getAttribute("formaction")||l.getAttribute("action");if(r=s?ci(s,t):null,n=e.getAttribute("formmethod")||l.getAttribute("method")||Pc,i=Oh(e.getAttribute("formenctype"))||Oh(l.getAttribute("enctype"))||Ac,o=new FormData(l,e),!nR()){let{name:u,type:c,value:f}=e;if(c==="image"){let d=u?`${u}.`:"";o.append(`${d}x`,"0"),o.append(`${d}y`,"0")}else u&&o.append(u,f)}}else{if(Rd(e))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');n=Pc,r=null,i=Ac,a=e}return o&&i==="text/plain"&&(a=o,o=void 0),{action:r,method:n.toLowerCase(),encType:i,formData:o,body:a}}function e0(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}async function oR(e,t){if(e.id in t)return t[e.id];try{let n=await import(e.module);return t[e.id]=n,n}catch(n){return console.error(`Error loading route module \`${e.module}\`, reloading page...`),console.error(n),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function aR(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 lR(e,t,n){let r=await Promise.all(e.map(async i=>{let o=t.routes[i.route.id];if(o){let a=await oR(o,n);return a.links?a.links():[]}return[]}));return fR(r.flat(1).filter(aR).filter(i=>i.rel==="stylesheet"||i.rel==="preload").map(i=>i.rel==="stylesheet"?{...i,rel:"prefetch",as:"style"}:{...i,rel:"prefetch"}))}function c1(e,t,n,r,i,o){let a=(s,u)=>n[u]?s.route.id!==n[u].route.id:!0,l=(s,u)=>{var c;return n[u].pathname!==s.pathname||((c=n[u].route.path)==null?void 0:c.endsWith("*"))&&n[u].params["*"]!==s.params["*"]};return o==="assets"?t.filter((s,u)=>a(s,u)||l(s,u)):o==="data"?t.filter((s,u)=>{var f;let c=r.routes[s.route.id];if(!c||!c.hasLoader)return!1;if(a(s,u)||l(s,u))return!0;if(s.route.shouldRevalidate){let d=s.route.shouldRevalidate({currentUrl:new URL(i.pathname+i.search+i.hash,window.origin),currentParams:((f=n[0])==null?void 0:f.params)||{},nextUrl:new URL(e,window.origin),nextParams:s.params,defaultShouldRevalidate:!0});if(typeof d=="boolean")return d}return!0}):[]}function sR(e,t){return uR(e.map(n=>{let r=t.routes[n.route.id];if(!r)return[];let i=[r.module];return r.imports&&(i=i.concat(r.imports)),i}).flat(1))}function uR(e){return[...new Set(e)]}function cR(e){let t={},n=Object.keys(e).sort();for(let r of n)t[r]=e[r];return t}function fR(e,t){let n=new Set;return new Set(t),e.reduce((r,i)=>{let o=JSON.stringify(cR(i));return n.has(o)||(n.add(o),r.push({key:o,link:i})),r},[])}function dR(e){let t=typeof e=="string"?new URL(e,typeof window>"u"?"server://singlefetch/":window.location.origin):e;return t.pathname==="/"?t.pathname="_root.data":t.pathname=`${t.pathname.replace(/\/$/,"")}.data`,t}function pR(){let e=w.useContext(Na);return e0(e,"You must render this element inside a <DataRouterContext.Provider> element"),e}function hR(){let e=w.useContext(Id);return e0(e,"You must render this element inside a <DataRouterStateContext.Provider> element"),e}var t0=w.createContext(void 0);t0.displayName="FrameworkContext";function NP(){let e=w.useContext(t0);return e0(e,"You must render this element inside a <HydratedRouter> element"),e}function mR(e,t){let n=w.useContext(t0),[r,i]=w.useState(!1),[o,a]=w.useState(!1),{onFocus:l,onBlur:s,onMouseEnter:u,onMouseLeave:c,onTouchStart:f}=t,d=w.useRef(null);w.useEffect(()=>{if(e==="render"&&a(!0),e==="viewport"){let m=v=>{v.forEach(g=>{a(g.isIntersecting)})},y=new IntersectionObserver(m,{threshold:.5});return d.current&&y.observe(d.current),()=>{y.disconnect()}}},[e]),w.useEffect(()=>{if(r){let m=setTimeout(()=>{a(!0)},100);return()=>{clearTimeout(m)}}},[r]);let p=()=>{i(!0)},h=()=>{i(!1),a(!1)};return n?e!=="intent"?[o,d,{}]:[o,d,{onFocus:ul(l,p),onBlur:ul(s,h),onMouseEnter:ul(u,p),onMouseLeave:ul(c,h),onTouchStart:ul(f,p)}]:[!1,d,{}]}function ul(e,t){return n=>{e&&e(n),n.defaultPrevented||t(n)}}function vR({page:e,...t}){let{router:n}=pR(),r=w.useMemo(()=>_P(n.routes,e,n.basename),[n.routes,e,n.basename]);return r?w.createElement(yR,{page:e,matches:r,...t}):(console.warn(`Tried to prefetch ${e} but no routes matched.`),null)}function gR(e){let{manifest:t,routeModules:n}=NP(),[r,i]=w.useState([]);return w.useEffect(()=>{let o=!1;return lR(e,t,n).then(a=>{o||i(a)}),()=>{o=!0}},[e,t,n]),r}function yR({page:e,matches:t,...n}){let r=Nr(),{manifest:i,routeModules:o}=NP(),{loaderData:a,matches:l}=hR(),s=w.useMemo(()=>c1(e,t,l,i,r,"data"),[e,t,l,i,r]),u=w.useMemo(()=>c1(e,t,l,i,r,"assets"),[e,t,l,i,r]),c=w.useMemo(()=>{if(e===r.pathname+r.search+r.hash)return[];let p=new Set,h=!1;if(t.forEach(y=>{var g;let v=i.routes[y.route.id];!v||!v.hasLoader||(!s.some(x=>x.route.id===y.route.id)&&y.route.id in a&&((g=o[y.route.id])!=null&&g.shouldRevalidate)||v.hasClientLoader?h=!0:p.add(y.route.id))}),p.size===0)return[];let m=dR(e);return h&&p.size>0&&m.searchParams.set("_routes",t.filter(y=>p.has(y.route.id)).map(y=>y.route.id).join(",")),[m.pathname+m.search]},[a,r,i,s,t,e,o]),f=w.useMemo(()=>sR(u,i),[u,i]),d=gR(u);return w.createElement(w.Fragment,null,c.map(p=>w.createElement("link",{key:p,rel:"prefetch",as:"fetch",href:p,...n})),f.map(p=>w.createElement("link",{key:p,rel:"modulepreload",href:p,...n})),d.map(({key:p,link:h})=>w.createElement("link",{key:p,...h})))}function xR(...e){return t=>{e.forEach(n=>{typeof n=="function"?n(t):n!=null&&(n.current=t)})}}var MP=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{MP&&(window.__reactRouterVersion="7.0.2")}catch{}function bR({basename:e,children:t,window:n}){let r=w.useRef();r.current==null&&(r.current=rI({window:n,v5Compat:!0}));let i=r.current,[o,a]=w.useState({action:i.action,location:i.location}),l=w.useCallback(s=>{w.startTransition(()=>a(s))},[a]);return w.useLayoutEffect(()=>i.listen(l),[i,l]),w.createElement(XI,{basename:e,children:t,location:o.location,navigationType:o.action,navigator:i})}var IP=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Or=w.forwardRef(function({onClick:t,discover:n="render",prefetch:r="none",relative:i,reloadDocument:o,replace:a,state:l,target:s,to:u,preventScrollReset:c,viewTransition:f,...d},p){let{basename:h}=w.useContext(Zn),m=typeof u=="string"&&IP.test(u),y,v=!1;if(typeof u=="string"&&m&&(y=u,MP))try{let T=new URL(window.location.href),C=u.startsWith("//")?new URL(T.protocol+u):new URL(u),j=ci(C.pathname,h);C.origin===T.origin&&j!=null?u=j+C.search+C.hash:v=!0}catch{Tn(!1,`<Link to="${u}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}let g=TI(u,{relative:i}),[x,E,_]=mR(r,d),S=ER(u,{replace:a,state:l,target:s,preventScrollReset:c,relative:i,viewTransition:f});function O(T){t&&t(T),T.defaultPrevented||S(T)}let $=w.createElement("a",{...d,..._,href:y||g,onClick:v||o?t:O,ref:xR(p,E),target:s,"data-discover":!m&&n==="render"?"true":void 0});return x&&!m?w.createElement(w.Fragment,null,$,w.createElement(vR,{page:g})):$});Or.displayName="Link";var wR=w.forwardRef(function({"aria-current":t="page",caseSensitive:n=!1,className:r="",end:i=!1,style:o,to:a,viewTransition:l,children:s,...u},c){let f=ou(a,{relative:u.relative}),d=Nr(),p=w.useContext(Id),{navigator:h,basename:m}=w.useContext(Zn),y=p!=null&&TR(f)&&l===!0,v=h.encodeLocation?h.encodeLocation(f).pathname:f.pathname,g=d.pathname,x=p&&p.navigation&&p.navigation.location?p.navigation.location.pathname:null;n||(g=g.toLowerCase(),x=x?x.toLowerCase():null,v=v.toLowerCase()),x&&m&&(x=ci(x,m)||x);const E=v!=="/"&&v.endsWith("/")?v.length-1:v.length;let _=g===v||!i&&g.startsWith(v)&&g.charAt(E)==="/",S=x!=null&&(x===v||!i&&x.startsWith(v)&&x.charAt(v.length)==="/"),O={isActive:_,isPending:S,isTransitioning:y},$=_?t:void 0,T;typeof r=="function"?T=r(O):T=[r,_?"active":null,S?"pending":null,y?"transitioning":null].filter(Boolean).join(" ");let C=typeof o=="function"?o(O):o;return w.createElement(Or,{...u,"aria-current":$,className:T,ref:c,style:C,to:a,viewTransition:l},typeof s=="function"?s(O):s)});wR.displayName="NavLink";var _R=w.forwardRef(({discover:e="render",fetcherKey:t,navigate:n,reloadDocument:r,replace:i,state:o,method:a=Pc,action:l,onSubmit:s,relative:u,preventScrollReset:c,viewTransition:f,...d},p)=>{let h=PR(),m=AR(l,{relative:u}),y=a.toLowerCase()==="get"?"get":"post",v=typeof l=="string"&&IP.test(l),g=x=>{if(s&&s(x),x.defaultPrevented)return;x.preventDefault();let E=x.nativeEvent.submitter,_=(E==null?void 0:E.getAttribute("formmethod"))||a;h(E||x.currentTarget,{fetcherKey:t,method:_,navigate:n,replace:i,state:o,relative:u,preventScrollReset:c,viewTransition:f})};return w.createElement("form",{ref:p,method:y,action:m,onSubmit:r?s:g,...d,"data-discover":!v&&e==="render"?"true":void 0})});_R.displayName="Form";function SR(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function RP(e){let t=w.useContext(Na);return Fe(t,SR(e)),t}function ER(e,{target:t,replace:n,state:r,preventScrollReset:i,relative:o,viewTransition:a}={}){let l=jI(),s=Nr(),u=ou(e,{relative:o});return w.useCallback(c=>{if(tR(c,t)){c.preventDefault();let f=n!==void 0?n:ps(s)===ps(u);l(e,{replace:f,state:r,preventScrollReset:i,relative:o,viewTransition:a})}},[s,l,u,n,r,t,e,i,o,a])}var OR=0,$R=()=>`__${String(++OR)}__`;function PR(){let{router:e}=RP("useSubmit"),{basename:t}=w.useContext(Zn),n=WI();return w.useCallback(async(r,i={})=>{let{action:o,method:a,encType:l,formData:s,body:u}=iR(r,t);if(i.navigate===!1){let c=i.fetcherKey||$R();await e.fetch(c,n,i.action||o,{preventScrollReset:i.preventScrollReset,formData:s,body:u,formMethod:i.method||a,formEncType:i.encType||l,flushSync:i.flushSync})}else await e.navigate(i.action||o,{preventScrollReset:i.preventScrollReset,formData:s,body:u,formMethod:i.method||a,formEncType:i.encType||l,replace:i.replace,state:i.state,fromRouteId:n,flushSync:i.flushSync,viewTransition:i.viewTransition})},[e,t,n])}function AR(e,{relative:t}={}){let{basename:n}=w.useContext(Zn),r=w.useContext(Cn);Fe(r,"useFormAction must be used inside a RouteContext");let[i]=r.matches.slice(-1),o={...ou(e||".",{relative:t})},a=Nr();if(e==null){o.search=a.search;let l=new URLSearchParams(o.search),s=l.getAll("index");if(s.some(c=>c==="")){l.delete("index"),s.filter(f=>f).forEach(f=>l.append("index",f));let c=l.toString();o.search=c?`?${c}`:""}}return(!e||e===".")&&i.route.index&&(o.search=o.search?o.search.replace(/^\?/,"?index&"):"?index"),n!=="/"&&(o.pathname=o.pathname==="/"?n:hr([n,o.pathname])),ps(o)}function TR(e,t={}){let n=w.useContext(AP);Fe(n!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:r}=RP("useViewTransitionState"),i=ou(e,{relative:t.relative});if(!n.isTransitioning)return!1;let o=ci(n.currentLocation.pathname,r)||n.currentLocation.pathname,a=ci(n.nextLocation.pathname,r)||n.nextLocation.pathname;return sf(i.pathname,a)!=null||sf(i.pathname,o)!=null}new TextEncoder;const jR={environment:{GITHUB_SHA_URL:"https://example.com/blob/abcd"},features:{Authentication:{assignments:{files:["src/auth/controllers/login_controller.rb","src/auth/services/oauth_service.rb","src/auth/jobs/token_cleanup_job.rb","src/auth/models/user.rb","src/auth/middleware/auth_middleware.rb"],teams:["Identity & Access"]},description:"Core authentication system handling user login, OAuth integration, and session management",documentation_link:"https://internal-docs.company.com/auth/overview",metrics:{abc_size:890.8100000000001,lines_of_code:1200,cyclomatic_complexity:400,todo_locations:{"src/auth/services/oauth_service.rb:124":"Refactor this method","src/auth/middleware/auth_middleware.rb:45":"Add documentation for this class"}},additional_metrics:{cyclomatic_complexity:{percentile:35.5,percent_of_max:80,score:12},encapsulation:{percentile:65.2,percent_of_max:75,score:10},feature_size:{percentile:46.3,percent_of_max:13,score:1500},test_coverage:{percentile:88.4,percent_of_max:95,score:85},health:{test_coverage_component:{awardable_points:70,health_score:66.5,close_to_maximum_score:!0,exceeds_score_threshold:!0},cyclomatic_complexity_component:{awardable_points:15,health_score:12,close_to_maximum_score:!0,exceeds_score_threshold:!0},encapsulation_component:{awardable_points:15,health_score:11.25,close_to_maximum_score:!0,exceeds_score_threshold:!0},overall:89.75}},test_coverage:{lines:1200,hits:1140,misses:60},test_pyramid:{unit_count:100,unit_pending:5,integration_count:20,integration_pending:2,regression_count:5,regression_pending:1}},"Payment Processing":{assignments:{files:["src/payments/controllers/charges_controller.rb","src/payments/services/stripe_service.rb","src/payments/jobs/payment_reconciliation_job.rb","src/payments/models/payment.rb","src/payments/models/refund.rb","src/payments/workers/payment_worker.rb","src/payments/validators/payment_validator.rb"],teams:["Payments","Revenue"]},description:"Payment processing system integrating with Stripe for charges, refunds and reconciliation",documentation_link:"https://internal-docs.company.com/payments/overview",metrics:{abc_size:502.78,lines_of_code:5582,cyclomatic_complexity:500},additional_metrics:{cyclomatic_complexity:{percentile:78.2,percent_of_max:65,score:14},encapsulation:{percentile:92.1,percent_of_max:88,score:13},feature_size:{percentile:82.5,percent_of_max:45,score:2500},test_coverage:{percentile:95.8,percent_of_max:98,score:90},health:{test_coverage_component:{awardable_points:70,health_score:68.6,close_to_maximum_score:!0,exceeds_score_threshold:!0},cyclomatic_complexity_component:{awardable_points:15,health_score:13.2,close_to_maximum_score:!0,exceeds_score_threshold:!0},encapsulation_component:{awardable_points:15,health_score:13.8,close_to_maximum_score:!0,exceeds_score_threshold:!0},overall:95.6}},test_coverage:{lines:2582,hits:2530,misses:52},test_pyramid:{unit_count:100,unit_pending:5,integration_count:20,integration_pending:2,regression_count:5,regression_pending:1}},"User Management":{assignments:{files:["src/users/controllers/users_controller.rb","src/users/services/user_service.rb","src/users/jobs/user_cleanup_job.rb","src/users/models/profile.rb","src/users/workers/profile_worker.rb"],teams:["Identity & Access"]},description:"User profile and account management system",documentation_link:"https://internal-docs.company.com/users/overview",metrics:{abc_size:1202.78,lines_of_code:1582,cyclomatic_complexity:300},additional_metrics:{cyclomatic_complexity:{percentile:45.6,percent_of_max:42,score:10},encapsulation:{percentile:58.3,percent_of_max:55,score:9},feature_size:{percentile:63.2,percent_of_max:28,score:1800},test_coverage:{percentile:70.1,percent_of_max:70,score:75},health:{test_coverage_component:{awardable_points:70,health_score:49,close_to_maximum_score:!1,exceeds_score_threshold:!0},cyclomatic_complexity_component:{awardable_points:15,health_score:8.25,close_to_maximum_score:!1,exceeds_score_threshold:!0},encapsulation_component:{awardable_points:15,health_score:8.25,close_to_maximum_score:!1,exceeds_score_threshold:!0},overall:65.5}},test_coverage:{lines:1582,hits:1108,misses:474},test_pyramid:{unit_count:100,unit_pending:5,integration_count:20,integration_pending:2,regression_count:5,regression_pending:1}},"Email Service":{assignments:{files:["src/email/services/email_service.rb","src/email/jobs/email_sender_job.rb","src/email/templates/welcome_email.rb","src/email/templates/reset_password.rb"],teams:["Communications"]},description:"Transactional email service handling all system notifications",documentation_link:"https://internal-docs.company.com/email/overview",metrics:{abc_size:156.92,lines_of_code:289,cyclomatic_complexity:22},additional_metrics:{cyclomatic_complexity:{percentile:92.3,percent_of_max:95,score:15},encapsulation:{percentile:88.7,percent_of_max:85,score:14},feature_size:{percentile:25.4,percent_of_max:8,score:500},test_coverage:{percentile:98.9,percent_of_max:99,score:95},health:{test_coverage_component:{awardable_points:70,health_score:69.3,close_to_maximum_score:!0,exceeds_score_threshold:!0},cyclomatic_complexity_component:{awardable_points:15,health_score:14.25,close_to_maximum_score:!0,exceeds_score_threshold:!0},encapsulation_component:{awardable_points:15,health_score:13.5,close_to_maximum_score:!0,exceeds_score_threshold:!0},overall:97.05}},test_coverage:{lines:289,hits:286,misses:3},test_pyramid:{unit_count:100,unit_pending:5,integration_count:20,integration_pending:2,regression_count:5,regression_pending:1}},"Data Sync":{assignments:{files:["src/sync/controllers/sync_controller.rb","src/sync/services/sync_service.rb","src/sync/jobs/sync_job.rb","src/sync/models/sync_record.rb","src/sync/workers/sync_worker.rb","src/sync/validators/sync_validator.rb"],teams:["Platform","Data Infrastructure"]},description:"Real-time data synchronization system between services",documentation_link:"https://internal-docs.company.com/sync/overview",metrics:{abc_size:764.23,lines_of_code:1124,cyclomatic_complexity:82},test_coverage:null,additional_metrics:{cyclomatic_complexity:{percentile:68.4,percent_of_max:72,score:13},encapsulation:{percentile:75.6,percent_of_max:70,score:12},feature_size:{percentile:55.8,percent_of_max:35,score:2e3},test_coverage:{percentile:82.3,percent_of_max:85,score:80},health:{test_coverage_component:{awardable_points:70,health_score:59.5,close_to_maximum_score:!0,exceeds_score_threshold:!0},cyclomatic_complexity_component:{awardable_points:15,health_score:10.8,close_to_maximum_score:!0,exceeds_score_threshold:!0},encapsulation_component:{awardable_points:15,health_score:10.5,close_to_maximum_score:!0,exceeds_score_threshold:!0},overall:80.8}}},Analytics:{assignments:{files:["src/analytics/services/tracking_service.rb","src/analytics/jobs/event_processor_job.rb","src/analytics/models/event.rb","src/analytics/workers/analytics_worker.rb"],teams:["Data Science"]},description:"User behavior tracking and analytics processing pipeline",documentation_link:"https://internal-docs.company.com/analytics/overview",metrics:{abc_size:234.56,lines_of_code:412,cyclomatic_complexity:28},test_coverage:{lines:412,hits:324,misses:88},test_pyramid:{unit_count:100,unit_pending:5,integration_count:20,integration_pending:2,regression_count:5,regression_pending:1},additional_metrics:{cyclomatic_complexity:{percentile:85.2,percent_of_max:82,score:14},encapsulation:{percentile:78.9,percent_of_max:75,score:13},feature_size:{percentile:42.1,percent_of_max:25,score:1200},test_coverage:{percentile:78.6,percent_of_max:80,score:70},health:{test_coverage_component:{awardable_points:70,health_score:55,close_to_maximum_score:!0,exceeds_score_threshold:!0},cyclomatic_complexity_component:{awardable_points:15,health_score:12.3,close_to_maximum_score:!0,exceeds_score_threshold:!0},encapsulation_component:{awardable_points:15,health_score:11.25,close_to_maximum_score:!0,exceeds_score_threshold:!0},overall:78.55}}},"API Gateway":{assignments:{files:["src/gateway/controllers/api_controller.rb","src/gateway/services/rate_limiter.rb","src/gateway/middleware/api_middleware.rb","src/gateway/models/api_key.rb"],teams:["Platform"]},description:"API Gateway handling authentication, rate limiting and request routing",documentation_link:"https://internal-docs.company.com/gateway/overview",metrics:{abc_size:423.67,lines_of_code:678,cyclomatic_complexity:52},test_coverage:{lines:678,hits:671,misses:7},test_pyramid:{unit_count:100,unit_pending:5,integration_count:20,integration_pending:2,regression_count:5,regression_pending:1},additional_metrics:{cyclomatic_complexity:{percentile:89.5,percent_of_max:88,score:15},encapsulation:{percentile:92.3,percent_of_max:90,score:14},feature_size:{percentile:58.7,percent_of_max:42,score:2200},test_coverage:{percentile:98.2,percent_of_max:99,score:90},health:{test_coverage_component:{awardable_points:70,health_score:68.6,close_to_maximum_score:!0,exceeds_score_threshold:!0},cyclomatic_complexity_component:{awardable_points:15,health_score:13.5,close_to_maximum_score:!0,exceeds_score_threshold:!0},encapsulation_component:{awardable_points:15,health_score:13.8,close_to_maximum_score:!0,exceeds_score_threshold:!0},overall:95.9}}},"Document Processing":{assignments:{files:["src/documents/services/document_service.rb","src/documents/jobs/document_processor_job.rb","src/documents/models/document.rb","src/documents/workers/pdf_worker.rb","src/documents/validators/document_validator.rb"],teams:["Content Management"]},description:"Document processing system for PDF generation and manipulation",documentation_link:"https://internal-docs.company.com/documents/overview",metrics:{abc_size:534.89,lines_of_code:892,cyclomatic_complexity:64},test_coverage:{lines:892,hits:534,misses:358},test_pyramid:{unit_count:100,unit_pending:5,integration_count:20,integration_pending:2,regression_count:5,regression_pending:1},additional_metrics:{cyclomatic_complexity:{percentile:72.4,percent_of_max:68,score:12},encapsulation:{percentile:65.8,percent_of_max:62,score:11},feature_size:{percentile:68.9,percent_of_max:55,score:2500},test_coverage:{percentile:59.8,percent_of_max:60,score:60},health:{test_coverage_component:{awardable_points:70,health_score:42,close_to_maximum_score:!1,exceeds_score_threshold:!0},cyclomatic_complexity_component:{awardable_points:15,health_score:10.2,close_to_maximum_score:!0,exceeds_score_threshold:!0},encapsulation_component:{awardable_points:15,health_score:9.3,close_to_maximum_score:!1,exceeds_score_threshold:!0},overall:61.5}}},"Notification System":{assignments:{files:["src/notifications/services/notification_service.rb","src/notifications/jobs/notification_sender_job.rb","src/notifications/models/notification.rb","src/notifications/workers/push_notification_worker.rb"],teams:["Communications"]},description:"Push notification system for mobile and web clients",documentation_link:"https://internal-docs.company.com/notifications/overview",metrics:{abc_size:780.34,lines_of_code:1456,cyclomatic_complexity:241},additional_metrics:{cyclomatic_complexity:{percentile:62.8,percent_of_max:58,score:11},encapsulation:{percentile:71.2,percent_of_max:65,score:10},feature_size:{percentile:82.4,percent_of_max:75,score:2700},test_coverage:{percentile:68.5,percent_of_max:70,score:65},health:{test_coverage_component:{awardable_points:70,health_score:49,close_to_maximum_score:!1,exceeds_score_threshold:!0},cyclomatic_complexity_component:{awardable_points:15,health_score:8.7,close_to_maximum_score:!1,exceeds_score_threshold:!0},encapsulation_component:{awardable_points:15,health_score:9.75,close_to_maximum_score:!1,exceeds_score_threshold:!0},overall:67.45}},test_coverage:{lines:1456,hits:998,misses:458},test_pyramid:{unit_count:100,unit_pending:5,integration_count:20,integration_pending:2,regression_count:5,regression_pending:1}},"Search Engine":{assignments:{files:["src/search/controllers/search_controller.rb","src/search/services/elasticsearch_service.rb","src/search/jobs/index_job.rb","src/search/models/search_index.rb","src/search/workers/indexing_worker.rb"],teams:["Search & Discovery","Platform","Communications","Admin"]},description:"Elasticsearch-based full-text search engine",documentation_link:"https://internal-docs.company.com/search/overview",metrics:{abc_size:645.78,lines_of_code:934,cyclomatic_complexity:76},additional_metrics:{cyclomatic_complexity:{percentile:75,percent_of_max:70,score:13},encapsulation:{percentile:80,percent_of_max:75,score:12},feature_size:{percentile:60,percent_of_max:50,score:1800},test_coverage:{percentile:85,percent_of_max:80,score:75},health:{test_coverage_component:{awardable_points:70,health_score:68,close_to_maximum_score:!0,exceeds_score_threshold:!0},cyclomatic_complexity_component:{awardable_points:15,health_score:10.5,close_to_maximum_score:!0,exceeds_score_threshold:!0},encapsulation_component:{awardable_points:15,health_score:11.25,close_to_maximum_score:!0,exceeds_score_threshold:!0},overall:89.75}},test_coverage:{lines:567,hits:489,misses:78},test_pyramid:{unit_count:100,unit_pending:5,integration_count:20,integration_pending:2,regression_count:5,regression_pending:1}},"Cache Management":{assignments:{files:null,teams:null},description:null,documentation_link:null,metrics:{abc_size:null,lines_of_code:null,cyclomatic_complexity:null},additional_metrics:{cyclomatic_complexity:{percentile:0,percent_of_max:0,score:0},encapsulation:{percentile:0,percent_of_max:0,score:0},feature_size:{percentile:0,percent_of_max:0,score:0},test_coverage:{percentile:0,percent_of_max:0,score:0},health:{test_coverage_component:{awardable_points:70,health_score:0,close_to_maximum_score:!1,exceeds_score_threshold:!1},cyclomatic_complexity_component:{awardable_points:15,health_score:0,close_to_maximum_score:!1,exceeds_score_threshold:!1},encapsulation_component:{awardable_points:15,health_score:0,close_to_maximum_score:!1,exceeds_score_threshold:!1},overall:0}},test_coverage:null}}},CR={assigned_globs:["app/**/*.rb"],unassigned_globs:["app/models/**/*","app/controllers/admin/**/*"],require_assignment_for_teams:["Onboarding"],ignore_feature_definitions:!0,skip_code_ownership:!1,skip_features_validation:!1,code_cov:{service:"github",owner:"Example",repo:"example"},repository:{main_branch:"main",url:"https://example.com"},documentation_site_url:"example.github.io/repo",documentation_site:{health:{minimum_thresholds:{good:95,fair:80,poor:0},components:{cyclomatic_complexity:{weight:15,minimum_variance:10,score_threshold:100},encapsulation:{weight:15,minimum_variance:10,score_threshold:100},test_coverage:{weight:70,score_threshold:98}}},linked_sites:[{name:"User Service",url:"https://example.github.io/user-service"},{name:"Gateway Service",url:"https://example.github.io/gateway-service"}],size_percentile:{minimum_thresholds:{xl:95,l:75,m:25,s:5,xs:0}},title:"Example Site",test_coverage:{minimum_thresholds:{good:98,fair:95,poor:0}}}},kR={...jR,project:CR,environment:{git_ref:"main"}},hi=window.FEATURE_MAP_CONFIG||kR;/**
68
+ Please change the parent <Route path="${g}"> to <Route path="${g==="/"?"*":`${g}/*`}">.`)}let f=Nr(),d;if(t){let g=typeof t=="string"?uo(t):t;Fe(u==="/"||((v=g.pathname)==null?void 0:v.startsWith(u)),`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 "${u}" but pathname "${g.pathname}" was given in the \`location\` prop.`),d=g}else d=f;let p=d.pathname||"/",h=p;if(u!=="/"){let g=u.replace(/^\//,"").split("/");h="/"+p.replace(/^\//,"").split("/").slice(g.length).join("/")}let m=_P(e,{pathname:h});Tn(c||m!=null,`No routes matched location "${d.pathname}${d.search}${d.hash}" `),Tn(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 y=BI(m&&m.map(g=>Object.assign({},g,{params:Object.assign({},l,g.params),pathname:hr([u,i.encodeLocation?i.encodeLocation(g.pathname).pathname:g.pathname]),pathnameBase:g.pathnameBase==="/"?u:hr([u,i.encodeLocation?i.encodeLocation(g.pathnameBase).pathname:g.pathnameBase])})),o,n,r);return t&&y?w.createElement(ru.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",...d},navigationType:"POP"}},y):y}function RI(){let e=VI(),t=OI(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},o={padding:"2px 4px",backgroundColor:r},a=null;return console.error("Error handled by React Router default ErrorBoundary:",e),a=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:o},"ErrorBoundary")," or"," ",w.createElement("code",{style:o},"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,a)}var LI=w.createElement(RI,null),DI=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?e.error:t.error,location:t.location,revalidation:e.revalidation||t.revalidation}}componentDidCatch(e,t){console.error("React Router caught the following error during render",e,t)}render(){return this.state.error!==void 0?w.createElement(Cn.Provider,{value:this.props.routeContext},w.createElement(Qy.Provider,{value:this.state.error,children:this.props.component})):this.props.children}};function FI({routeContext:e,match:t,children:n}){let r=w.useContext(Na);return r&&r.static&&r.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(r.staticContext._deepestRenderedBoundaryId=t.route.id),w.createElement(Cn.Provider,{value:e},n)}function BI(e,t=[],n=null,r=null){if(e==null){if(!n)return null;if(n.errors)e=n.matches;else if(t.length===0&&!n.initialized&&n.matches.length>0)e=n.matches;else return null}let i=e,o=n==null?void 0:n.errors;if(o!=null){let s=i.findIndex(u=>u.route.id&&(o==null?void 0:o[u.route.id])!==void 0);Fe(s>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(o).join(",")}`),i=i.slice(0,Math.min(i.length,s+1))}let a=!1,l=-1;if(n)for(let s=0;s<i.length;s++){let u=i[s];if((u.route.HydrateFallback||u.route.hydrateFallbackElement)&&(l=s),u.route.id){let{loaderData:c,errors:f}=n,d=u.route.loader&&!c.hasOwnProperty(u.route.id)&&(!f||f[u.route.id]===void 0);if(u.route.lazy||d){a=!0,l>=0?i=i.slice(0,l+1):i=[i[0]];break}}}return i.reduceRight((s,u,c)=>{let f,d=!1,p=null,h=null;n&&(f=o&&u.route.id?o[u.route.id]:void 0,p=u.route.errorElement||LI,a&&(l<0&&c===0?(kP("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),d=!0,h=null):l===c&&(d=!0,h=u.route.hydrateFallbackElement||null)));let m=t.concat(i.slice(0,c+1)),y=()=>{let v;return f?v=p:d?v=h:u.route.Component?v=w.createElement(u.route.Component,null):u.route.element?v=u.route.element:v=s,w.createElement(FI,{match:u,routeContext:{outlet:s,matches:m,isDataRoute:n!=null},children:v})};return n&&(u.route.ErrorBoundary||u.route.errorElement||c===0)?w.createElement(DI,{location:n.location,revalidation:n.revalidation,component:p,error:f,children:y(),routeContext:{outlet:null,matches:m,isDataRoute:!0}}):y()},null)}function Zy(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function zI(e){let t=w.useContext(Na);return Fe(t,Zy(e)),t}function HI(e){let t=w.useContext(Id);return Fe(t,Zy(e)),t}function UI(e){let t=w.useContext(Cn);return Fe(t,Zy(e)),t}function Jy(e){let t=UI(e),n=t.matches[t.matches.length-1];return Fe(n.route.id,`${e} can only be used on routes that contain a unique "id"`),n.route.id}function WI(){return Jy("useRouteId")}function VI(){var r;let e=w.useContext(Qy),t=HI("useRouteError"),n=Jy("useRouteError");return e!==void 0?e:(r=t.errors)==null?void 0:r[n]}function KI(){let{router:e}=zI("useNavigate"),t=Jy("useNavigate"),n=w.useRef(!1);return jP(()=>{n.current=!0}),w.useCallback(async(i,o={})=>{Tn(n.current,TP),n.current&&(typeof i=="number"?e.navigate(i):await e.navigate(i,{fromRouteId:t,...o}))},[e,t])}var u1={};function kP(e,t,n){!t&&!u1[e]&&(u1[e]=!0,Tn(!1,n))}w.memo(qI);function qI({routes:e,future:t,state:n}){return CP(e,void 0,n,t)}function GI(e){return NI(e.context)}function Pl(e){Fe(!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 XI({basename:e="/",children:t=null,location:n,navigationType:r="POP",navigator:i,static:o=!1}){Fe(!iu(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let a=e.replace(/^\/*/,"/"),l=w.useMemo(()=>({basename:a,navigator:i,static:o,future:{}}),[a,i,o]);typeof n=="string"&&(n=uo(n));let{pathname:s="/",search:u="",hash:c="",state:f=null,key:d="default"}=n,p=w.useMemo(()=>{let h=ci(s,a);return h==null?null:{location:{pathname:h,search:u,hash:c,state:f,key:d},navigationType:r}},[a,s,u,c,f,d,r]);return Tn(p!=null,`<Router basename="${a}"> is not able to match the URL "${s}${u}${c}" because it does not start with the basename, so the <Router> won't render anything.`),p==null?null:w.createElement(Zn.Provider,{value:l},w.createElement(ru.Provider,{children:t,value:p}))}function YI({children:e,location:t}){return II(cv(e),t)}function cv(e,t=[]){let n=[];return w.Children.forEach(e,(r,i)=>{if(!w.isValidElement(r))return;let o=[...t,i];if(r.type===w.Fragment){n.push.apply(n,cv(r.props.children,o));return}Fe(r.type===Pl,`[${typeof r.type=="string"?r.type:r.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`),Fe(!r.props.index||!r.props.children,"An index route cannot have child routes.");let a={id:r.props.id||o.join("-"),caseSensitive:r.props.caseSensitive,element:r.props.element,Component:r.props.Component,index:r.props.index,path:r.props.path,loader:r.props.loader,action:r.props.action,hydrateFallbackElement:r.props.hydrateFallbackElement,HydrateFallback:r.props.HydrateFallback,errorElement:r.props.errorElement,ErrorBoundary:r.props.ErrorBoundary,hasErrorBoundary:r.props.hasErrorBoundary===!0||r.props.ErrorBoundary!=null||r.props.errorElement!=null,shouldRevalidate:r.props.shouldRevalidate,handle:r.props.handle,lazy:r.props.lazy};r.props.children&&(a.children=cv(r.props.children,o)),n.push(a)}),n}var Pc="get",Ac="application/x-www-form-urlencoded";function Rd(e){return e!=null&&typeof e.tagName=="string"}function QI(e){return Rd(e)&&e.tagName.toLowerCase()==="button"}function ZI(e){return Rd(e)&&e.tagName.toLowerCase()==="form"}function JI(e){return Rd(e)&&e.tagName.toLowerCase()==="input"}function eR(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function tR(e,t){return e.button===0&&(!t||t==="_self")&&!eR(e)}var Gu=null;function nR(){if(Gu===null)try{new FormData(document.createElement("form"),0),Gu=!1}catch{Gu=!0}return Gu}var rR=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function Oh(e){return e!=null&&!rR.has(e)?(Tn(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${Ac}"`),null):e}function iR(e,t){let n,r,i,o,a;if(ZI(e)){let l=e.getAttribute("action");r=l?ci(l,t):null,n=e.getAttribute("method")||Pc,i=Oh(e.getAttribute("enctype"))||Ac,o=new FormData(e)}else if(QI(e)||JI(e)&&(e.type==="submit"||e.type==="image")){let l=e.form;if(l==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let s=e.getAttribute("formaction")||l.getAttribute("action");if(r=s?ci(s,t):null,n=e.getAttribute("formmethod")||l.getAttribute("method")||Pc,i=Oh(e.getAttribute("formenctype"))||Oh(l.getAttribute("enctype"))||Ac,o=new FormData(l,e),!nR()){let{name:u,type:c,value:f}=e;if(c==="image"){let d=u?`${u}.`:"";o.append(`${d}x`,"0"),o.append(`${d}y`,"0")}else u&&o.append(u,f)}}else{if(Rd(e))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');n=Pc,r=null,i=Ac,a=e}return o&&i==="text/plain"&&(a=o,o=void 0),{action:r,method:n.toLowerCase(),encType:i,formData:o,body:a}}function e0(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}async function oR(e,t){if(e.id in t)return t[e.id];try{let n=await import(e.module);return t[e.id]=n,n}catch(n){return console.error(`Error loading route module \`${e.module}\`, reloading page...`),console.error(n),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function aR(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 lR(e,t,n){let r=await Promise.all(e.map(async i=>{let o=t.routes[i.route.id];if(o){let a=await oR(o,n);return a.links?a.links():[]}return[]}));return fR(r.flat(1).filter(aR).filter(i=>i.rel==="stylesheet"||i.rel==="preload").map(i=>i.rel==="stylesheet"?{...i,rel:"prefetch",as:"style"}:{...i,rel:"prefetch"}))}function c1(e,t,n,r,i,o){let a=(s,u)=>n[u]?s.route.id!==n[u].route.id:!0,l=(s,u)=>{var c;return n[u].pathname!==s.pathname||((c=n[u].route.path)==null?void 0:c.endsWith("*"))&&n[u].params["*"]!==s.params["*"]};return o==="assets"?t.filter((s,u)=>a(s,u)||l(s,u)):o==="data"?t.filter((s,u)=>{var f;let c=r.routes[s.route.id];if(!c||!c.hasLoader)return!1;if(a(s,u)||l(s,u))return!0;if(s.route.shouldRevalidate){let d=s.route.shouldRevalidate({currentUrl:new URL(i.pathname+i.search+i.hash,window.origin),currentParams:((f=n[0])==null?void 0:f.params)||{},nextUrl:new URL(e,window.origin),nextParams:s.params,defaultShouldRevalidate:!0});if(typeof d=="boolean")return d}return!0}):[]}function sR(e,t){return uR(e.map(n=>{let r=t.routes[n.route.id];if(!r)return[];let i=[r.module];return r.imports&&(i=i.concat(r.imports)),i}).flat(1))}function uR(e){return[...new Set(e)]}function cR(e){let t={},n=Object.keys(e).sort();for(let r of n)t[r]=e[r];return t}function fR(e,t){let n=new Set;return new Set(t),e.reduce((r,i)=>{let o=JSON.stringify(cR(i));return n.has(o)||(n.add(o),r.push({key:o,link:i})),r},[])}function dR(e){let t=typeof e=="string"?new URL(e,typeof window>"u"?"server://singlefetch/":window.location.origin):e;return t.pathname==="/"?t.pathname="_root.data":t.pathname=`${t.pathname.replace(/\/$/,"")}.data`,t}function pR(){let e=w.useContext(Na);return e0(e,"You must render this element inside a <DataRouterContext.Provider> element"),e}function hR(){let e=w.useContext(Id);return e0(e,"You must render this element inside a <DataRouterStateContext.Provider> element"),e}var t0=w.createContext(void 0);t0.displayName="FrameworkContext";function NP(){let e=w.useContext(t0);return e0(e,"You must render this element inside a <HydratedRouter> element"),e}function mR(e,t){let n=w.useContext(t0),[r,i]=w.useState(!1),[o,a]=w.useState(!1),{onFocus:l,onBlur:s,onMouseEnter:u,onMouseLeave:c,onTouchStart:f}=t,d=w.useRef(null);w.useEffect(()=>{if(e==="render"&&a(!0),e==="viewport"){let m=v=>{v.forEach(g=>{a(g.isIntersecting)})},y=new IntersectionObserver(m,{threshold:.5});return d.current&&y.observe(d.current),()=>{y.disconnect()}}},[e]),w.useEffect(()=>{if(r){let m=setTimeout(()=>{a(!0)},100);return()=>{clearTimeout(m)}}},[r]);let p=()=>{i(!0)},h=()=>{i(!1),a(!1)};return n?e!=="intent"?[o,d,{}]:[o,d,{onFocus:ul(l,p),onBlur:ul(s,h),onMouseEnter:ul(u,p),onMouseLeave:ul(c,h),onTouchStart:ul(f,p)}]:[!1,d,{}]}function ul(e,t){return n=>{e&&e(n),n.defaultPrevented||t(n)}}function vR({page:e,...t}){let{router:n}=pR(),r=w.useMemo(()=>_P(n.routes,e,n.basename),[n.routes,e,n.basename]);return r?w.createElement(yR,{page:e,matches:r,...t}):(console.warn(`Tried to prefetch ${e} but no routes matched.`),null)}function gR(e){let{manifest:t,routeModules:n}=NP(),[r,i]=w.useState([]);return w.useEffect(()=>{let o=!1;return lR(e,t,n).then(a=>{o||i(a)}),()=>{o=!0}},[e,t,n]),r}function yR({page:e,matches:t,...n}){let r=Nr(),{manifest:i,routeModules:o}=NP(),{loaderData:a,matches:l}=hR(),s=w.useMemo(()=>c1(e,t,l,i,r,"data"),[e,t,l,i,r]),u=w.useMemo(()=>c1(e,t,l,i,r,"assets"),[e,t,l,i,r]),c=w.useMemo(()=>{if(e===r.pathname+r.search+r.hash)return[];let p=new Set,h=!1;if(t.forEach(y=>{var g;let v=i.routes[y.route.id];!v||!v.hasLoader||(!s.some(x=>x.route.id===y.route.id)&&y.route.id in a&&((g=o[y.route.id])!=null&&g.shouldRevalidate)||v.hasClientLoader?h=!0:p.add(y.route.id))}),p.size===0)return[];let m=dR(e);return h&&p.size>0&&m.searchParams.set("_routes",t.filter(y=>p.has(y.route.id)).map(y=>y.route.id).join(",")),[m.pathname+m.search]},[a,r,i,s,t,e,o]),f=w.useMemo(()=>sR(u,i),[u,i]),d=gR(u);return w.createElement(w.Fragment,null,c.map(p=>w.createElement("link",{key:p,rel:"prefetch",as:"fetch",href:p,...n})),f.map(p=>w.createElement("link",{key:p,rel:"modulepreload",href:p,...n})),d.map(({key:p,link:h})=>w.createElement("link",{key:p,...h})))}function xR(...e){return t=>{e.forEach(n=>{typeof n=="function"?n(t):n!=null&&(n.current=t)})}}var MP=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{MP&&(window.__reactRouterVersion="7.0.2")}catch{}function bR({basename:e,children:t,window:n}){let r=w.useRef();r.current==null&&(r.current=rI({window:n,v5Compat:!0}));let i=r.current,[o,a]=w.useState({action:i.action,location:i.location}),l=w.useCallback(s=>{w.startTransition(()=>a(s))},[a]);return w.useLayoutEffect(()=>i.listen(l),[i,l]),w.createElement(XI,{basename:e,children:t,location:o.location,navigationType:o.action,navigator:i})}var IP=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Or=w.forwardRef(function({onClick:t,discover:n="render",prefetch:r="none",relative:i,reloadDocument:o,replace:a,state:l,target:s,to:u,preventScrollReset:c,viewTransition:f,...d},p){let{basename:h}=w.useContext(Zn),m=typeof u=="string"&&IP.test(u),y,v=!1;if(typeof u=="string"&&m&&(y=u,MP))try{let T=new URL(window.location.href),C=u.startsWith("//")?new URL(T.protocol+u):new URL(u),j=ci(C.pathname,h);C.origin===T.origin&&j!=null?u=j+C.search+C.hash:v=!0}catch{Tn(!1,`<Link to="${u}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}let g=TI(u,{relative:i}),[x,E,_]=mR(r,d),S=ER(u,{replace:a,state:l,target:s,preventScrollReset:c,relative:i,viewTransition:f});function O(T){t&&t(T),T.defaultPrevented||S(T)}let $=w.createElement("a",{...d,..._,href:y||g,onClick:v||o?t:O,ref:xR(p,E),target:s,"data-discover":!m&&n==="render"?"true":void 0});return x&&!m?w.createElement(w.Fragment,null,$,w.createElement(vR,{page:g})):$});Or.displayName="Link";var wR=w.forwardRef(function({"aria-current":t="page",caseSensitive:n=!1,className:r="",end:i=!1,style:o,to:a,viewTransition:l,children:s,...u},c){let f=ou(a,{relative:u.relative}),d=Nr(),p=w.useContext(Id),{navigator:h,basename:m}=w.useContext(Zn),y=p!=null&&TR(f)&&l===!0,v=h.encodeLocation?h.encodeLocation(f).pathname:f.pathname,g=d.pathname,x=p&&p.navigation&&p.navigation.location?p.navigation.location.pathname:null;n||(g=g.toLowerCase(),x=x?x.toLowerCase():null,v=v.toLowerCase()),x&&m&&(x=ci(x,m)||x);const E=v!=="/"&&v.endsWith("/")?v.length-1:v.length;let _=g===v||!i&&g.startsWith(v)&&g.charAt(E)==="/",S=x!=null&&(x===v||!i&&x.startsWith(v)&&x.charAt(v.length)==="/"),O={isActive:_,isPending:S,isTransitioning:y},$=_?t:void 0,T;typeof r=="function"?T=r(O):T=[r,_?"active":null,S?"pending":null,y?"transitioning":null].filter(Boolean).join(" ");let C=typeof o=="function"?o(O):o;return w.createElement(Or,{...u,"aria-current":$,className:T,ref:c,style:C,to:a,viewTransition:l},typeof s=="function"?s(O):s)});wR.displayName="NavLink";var _R=w.forwardRef(({discover:e="render",fetcherKey:t,navigate:n,reloadDocument:r,replace:i,state:o,method:a=Pc,action:l,onSubmit:s,relative:u,preventScrollReset:c,viewTransition:f,...d},p)=>{let h=PR(),m=AR(l,{relative:u}),y=a.toLowerCase()==="get"?"get":"post",v=typeof l=="string"&&IP.test(l),g=x=>{if(s&&s(x),x.defaultPrevented)return;x.preventDefault();let E=x.nativeEvent.submitter,_=(E==null?void 0:E.getAttribute("formmethod"))||a;h(E||x.currentTarget,{fetcherKey:t,method:_,navigate:n,replace:i,state:o,relative:u,preventScrollReset:c,viewTransition:f})};return w.createElement("form",{ref:p,method:y,action:m,onSubmit:r?s:g,...d,"data-discover":!v&&e==="render"?"true":void 0})});_R.displayName="Form";function SR(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function RP(e){let t=w.useContext(Na);return Fe(t,SR(e)),t}function ER(e,{target:t,replace:n,state:r,preventScrollReset:i,relative:o,viewTransition:a}={}){let l=jI(),s=Nr(),u=ou(e,{relative:o});return w.useCallback(c=>{if(tR(c,t)){c.preventDefault();let f=n!==void 0?n:ps(s)===ps(u);l(e,{replace:f,state:r,preventScrollReset:i,relative:o,viewTransition:a})}},[s,l,u,n,r,t,e,i,o,a])}var OR=0,$R=()=>`__${String(++OR)}__`;function PR(){let{router:e}=RP("useSubmit"),{basename:t}=w.useContext(Zn),n=WI();return w.useCallback(async(r,i={})=>{let{action:o,method:a,encType:l,formData:s,body:u}=iR(r,t);if(i.navigate===!1){let c=i.fetcherKey||$R();await e.fetch(c,n,i.action||o,{preventScrollReset:i.preventScrollReset,formData:s,body:u,formMethod:i.method||a,formEncType:i.encType||l,flushSync:i.flushSync})}else await e.navigate(i.action||o,{preventScrollReset:i.preventScrollReset,formData:s,body:u,formMethod:i.method||a,formEncType:i.encType||l,replace:i.replace,state:i.state,fromRouteId:n,flushSync:i.flushSync,viewTransition:i.viewTransition})},[e,t,n])}function AR(e,{relative:t}={}){let{basename:n}=w.useContext(Zn),r=w.useContext(Cn);Fe(r,"useFormAction must be used inside a RouteContext");let[i]=r.matches.slice(-1),o={...ou(e||".",{relative:t})},a=Nr();if(e==null){o.search=a.search;let l=new URLSearchParams(o.search),s=l.getAll("index");if(s.some(c=>c==="")){l.delete("index"),s.filter(f=>f).forEach(f=>l.append("index",f));let c=l.toString();o.search=c?`?${c}`:""}}return(!e||e===".")&&i.route.index&&(o.search=o.search?o.search.replace(/^\?/,"?index&"):"?index"),n!=="/"&&(o.pathname=o.pathname==="/"?n:hr([n,o.pathname])),ps(o)}function TR(e,t={}){let n=w.useContext(AP);Fe(n!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:r}=RP("useViewTransitionState"),i=ou(e,{relative:t.relative});if(!n.isTransitioning)return!1;let o=ci(n.currentLocation.pathname,r)||n.currentLocation.pathname,a=ci(n.nextLocation.pathname,r)||n.nextLocation.pathname;return sf(i.pathname,a)!=null||sf(i.pathname,o)!=null}new TextEncoder;const jR={environment:{GITHUB_SHA_URL:"https://example.com/blob/abcd"},features:{Authentication:{assignments:{files:["src/auth/controllers/login_controller.rb","src/auth/services/oauth_service.rb","src/auth/jobs/token_cleanup_job.rb","src/auth/models/user.rb","src/auth/middleware/auth_middleware.rb"],teams:["Identity & Access"]},description:"Core authentication system handling user login, OAuth integration, and session management",documentation_link:"https://internal-docs.company.com/auth/overview",metrics:{abc_size:890.8100000000001,lines_of_code:1200,cyclomatic_complexity:400,todo_locations:{"src/auth/services/oauth_service.rb:124":"Refactor this method","src/auth/middleware/auth_middleware.rb:45":"Add documentation for this class"}},additional_metrics:{cyclomatic_complexity:{percentile:35.5,percent_of_max:80,score:12},encapsulation:{percentile:65.2,percent_of_max:75,score:10},feature_size:{percentile:46.3,percent_of_max:13,score:1500},test_coverage:{percentile:88.4,percent_of_max:95,score:85},health:{test_coverage_component:{awardable_points:70,health_score:66.5,close_to_maximum_score:!0},cyclomatic_complexity_component:{awardable_points:15,health_score:12,close_to_maximum_score:!0},encapsulation_component:{awardable_points:15,health_score:11.25,close_to_maximum_score:!0},todo_count_component:{awardable_points:15,health_score:9.75,close_to_maximum_score:!1},overall:85.82}},test_coverage:{lines:1200,hits:1140,misses:60},test_pyramid:{unit_count:100,unit_pending:5,integration_count:20,integration_pending:2,regression_count:5,regression_pending:1}},"Payment Processing":{assignments:{files:["src/payments/controllers/charges_controller.rb","src/payments/services/stripe_service.rb","src/payments/jobs/payment_reconciliation_job.rb","src/payments/models/payment.rb","src/payments/models/refund.rb","src/payments/workers/payment_worker.rb","src/payments/validators/payment_validator.rb"],teams:["Payments","Revenue"]},description:"Payment processing system integrating with Stripe for charges, refunds and reconciliation",documentation_link:"https://internal-docs.company.com/payments/overview",metrics:{abc_size:502.78,lines_of_code:5582,cyclomatic_complexity:500},additional_metrics:{cyclomatic_complexity:{percentile:78.2,percent_of_max:65,score:14},encapsulation:{percentile:92.1,percent_of_max:88,score:13},feature_size:{percentile:82.5,percent_of_max:45,score:2500},test_coverage:{percentile:95.8,percent_of_max:98,score:90},health:{test_coverage_component:{awardable_points:70,health_score:68.6,close_to_maximum_score:!0},cyclomatic_complexity_component:{awardable_points:15,health_score:13.2,close_to_maximum_score:!0},encapsulation_component:{awardable_points:15,health_score:13.8,close_to_maximum_score:!0},todo_count_component:{awardable_points:15,health_score:15,close_to_maximum_score:!0},overall:110.6}},test_coverage:{lines:2582,hits:2530,misses:52},test_pyramid:{unit_count:100,unit_pending:5,integration_count:20,integration_pending:2,regression_count:5,regression_pending:1}},"User Management":{assignments:{files:["src/users/controllers/users_controller.rb","src/users/services/user_service.rb","src/users/jobs/user_cleanup_job.rb","src/users/models/profile.rb","src/users/workers/profile_worker.rb"],teams:["Identity & Access"]},description:"User profile and account management system",documentation_link:"https://internal-docs.company.com/users/overview",metrics:{abc_size:1202.78,lines_of_code:1582,cyclomatic_complexity:300},additional_metrics:{cyclomatic_complexity:{percentile:45.6,percent_of_max:42,score:10},encapsulation:{percentile:58.3,percent_of_max:55,score:9},feature_size:{percentile:63.2,percent_of_max:28,score:1800},test_coverage:{percentile:70.1,percent_of_max:70,score:75},health:{test_coverage_component:{awardable_points:70,health_score:49,close_to_maximum_score:!1},cyclomatic_complexity_component:{awardable_points:15,health_score:8.25,close_to_maximum_score:!1},encapsulation_component:{awardable_points:15,health_score:8.25,close_to_maximum_score:!1},todo_count_component:{awardable_points:15,health_score:6.75,close_to_maximum_score:!1},overall:72.25}},test_coverage:{lines:1582,hits:1108,misses:474},test_pyramid:{unit_count:100,unit_pending:5,integration_count:20,integration_pending:2,regression_count:5,regression_pending:1}},"Email Service":{assignments:{files:["src/email/services/email_service.rb","src/email/jobs/email_sender_job.rb","src/email/templates/welcome_email.rb","src/email/templates/reset_password.rb"],teams:["Communications"]},description:"Transactional email service handling all system notifications",documentation_link:"https://internal-docs.company.com/email/overview",metrics:{abc_size:156.92,lines_of_code:289,cyclomatic_complexity:22},additional_metrics:{cyclomatic_complexity:{percentile:92.3,percent_of_max:95,score:15},encapsulation:{percentile:88.7,percent_of_max:85,score:14},feature_size:{percentile:25.4,percent_of_max:8,score:500},test_coverage:{percentile:98.9,percent_of_max:99,score:95},health:{test_coverage_component:{awardable_points:70,health_score:69.3,close_to_maximum_score:!0},cyclomatic_complexity_component:{awardable_points:15,health_score:14.25,close_to_maximum_score:!0},encapsulation_component:{awardable_points:15,health_score:13.5,close_to_maximum_score:!0},todo_count_component:{awardable_points:15,health_score:15,close_to_maximum_score:!0},overall:112.05}},test_coverage:{lines:289,hits:286,misses:3},test_pyramid:{unit_count:100,unit_pending:5,integration_count:20,integration_pending:2,regression_count:5,regression_pending:1}},"Data Sync":{assignments:{files:["src/sync/controllers/sync_controller.rb","src/sync/services/sync_service.rb","src/sync/jobs/sync_job.rb","src/sync/models/sync_record.rb","src/sync/workers/sync_worker.rb","src/sync/validators/sync_validator.rb"],teams:["Platform","Data Infrastructure"]},description:"Real-time data synchronization system between services",documentation_link:"https://internal-docs.company.com/sync/overview",metrics:{abc_size:764.23,lines_of_code:1124,cyclomatic_complexity:82},test_coverage:null,additional_metrics:{cyclomatic_complexity:{percentile:68.4,percent_of_max:72,score:13},encapsulation:{percentile:75.6,percent_of_max:70,score:12},feature_size:{percentile:55.8,percent_of_max:35,score:2e3},test_coverage:{percentile:82.3,percent_of_max:85,score:80},health:{test_coverage_component:{awardable_points:70,health_score:59.5,close_to_maximum_score:!0},cyclomatic_complexity_component:{awardable_points:15,health_score:10.8,close_to_maximum_score:!0},encapsulation_component:{awardable_points:15,health_score:10.5,close_to_maximum_score:!0},todo_count_component:{awardable_points:15,health_score:2.25,close_to_maximum_score:!1},overall:83.05}}},Analytics:{assignments:{files:["src/analytics/services/tracking_service.rb","src/analytics/jobs/event_processor_job.rb","src/analytics/models/event.rb","src/analytics/workers/analytics_worker.rb"],teams:["Data Science"]},description:"User behavior tracking and analytics processing pipeline",documentation_link:"https://internal-docs.company.com/analytics/overview",metrics:{abc_size:234.56,lines_of_code:412,cyclomatic_complexity:28},test_coverage:{lines:412,hits:324,misses:88},test_pyramid:{unit_count:100,unit_pending:5,integration_count:20,integration_pending:2,regression_count:5,regression_pending:1},additional_metrics:{cyclomatic_complexity:{percentile:85.2,percent_of_max:82,score:14},encapsulation:{percentile:78.9,percent_of_max:75,score:13},feature_size:{percentile:42.1,percent_of_max:25,score:1200},test_coverage:{percentile:78.6,percent_of_max:80,score:70},health:{test_coverage_component:{awardable_points:70,health_score:55,close_to_maximum_score:!0},cyclomatic_complexity_component:{awardable_points:15,health_score:12.3,close_to_maximum_score:!0},encapsulation_component:{awardable_points:15,health_score:11.25,close_to_maximum_score:!0},todo_count_component:{awardable_points:15,health_score:12.75,close_to_maximum_score:!1},overall:91.3}}},"API Gateway":{assignments:{files:["src/gateway/controllers/api_controller.rb","src/gateway/services/rate_limiter.rb","src/gateway/middleware/api_middleware.rb","src/gateway/models/api_key.rb"],teams:["Platform"]},description:"API Gateway handling authentication, rate limiting and request routing",documentation_link:"https://internal-docs.company.com/gateway/overview",metrics:{abc_size:423.67,lines_of_code:678,cyclomatic_complexity:52},test_coverage:{lines:678,hits:671,misses:7},test_pyramid:{unit_count:100,unit_pending:5,integration_count:20,integration_pending:2,regression_count:5,regression_pending:1},additional_metrics:{cyclomatic_complexity:{percentile:89.5,percent_of_max:88,score:15},encapsulation:{percentile:92.3,percent_of_max:90,score:14},feature_size:{percentile:58.7,percent_of_max:42,score:2200},test_coverage:{percentile:98.2,percent_of_max:99,score:90},health:{test_coverage_component:{awardable_points:70,health_score:68.6,close_to_maximum_score:!0},cyclomatic_complexity_component:{awardable_points:15,health_score:13.5,close_to_maximum_score:!0},encapsulation_component:{awardable_points:15,health_score:13.8,close_to_maximum_score:!0},todo_count_component:{awardable_points:15,health_score:15,close_to_maximum_score:!0},overall:100}}},"Document Processing":{assignments:{files:["src/documents/services/document_service.rb","src/documents/jobs/document_processor_job.rb","src/documents/models/document.rb","src/documents/workers/pdf_worker.rb","src/documents/validators/document_validator.rb"],teams:["Content Management"]},description:"Document processing system for PDF generation and manipulation",documentation_link:"https://internal-docs.company.com/documents/overview",metrics:{abc_size:534.89,lines_of_code:892,cyclomatic_complexity:64},test_coverage:{lines:892,hits:534,misses:358},test_pyramid:{unit_count:100,unit_pending:5,integration_count:20,integration_pending:2,regression_count:5,regression_pending:1},additional_metrics:{cyclomatic_complexity:{percentile:72.4,percent_of_max:68,score:12},encapsulation:{percentile:65.8,percent_of_max:62,score:11},feature_size:{percentile:68.9,percent_of_max:55,score:2500},test_coverage:{percentile:59.8,percent_of_max:60,score:60},health:{test_coverage_component:{awardable_points:70,health_score:42,close_to_maximum_score:!1},cyclomatic_complexity_component:{awardable_points:15,health_score:10.2,close_to_maximum_score:!0},encapsulation_component:{awardable_points:15,health_score:9.3,close_to_maximum_score:!1},todo_count_component:{awardable_points:15,health_score:3.75,close_to_maximum_score:!1},overall:65.25}}},"Notification System":{assignments:{files:["src/notifications/services/notification_service.rb","src/notifications/jobs/notification_sender_job.rb","src/notifications/models/notification.rb","src/notifications/workers/push_notification_worker.rb"],teams:["Communications"]},description:"Push notification system for mobile and web clients",documentation_link:"https://internal-docs.company.com/notifications/overview",metrics:{abc_size:780.34,lines_of_code:1456,cyclomatic_complexity:241},additional_metrics:{cyclomatic_complexity:{percentile:62.8,percent_of_max:58,score:11},encapsulation:{percentile:71.2,percent_of_max:65,score:10},feature_size:{percentile:82.4,percent_of_max:75,score:2700},test_coverage:{percentile:68.5,percent_of_max:70,score:65},health:{test_coverage_component:{awardable_points:70,health_score:49,close_to_maximum_score:!1},cyclomatic_complexity_component:{awardable_points:15,health_score:8.7,close_to_maximum_score:!1},encapsulation_component:{awardable_points:15,health_score:9.75,close_to_maximum_score:!1},todo_count_component:{awardable_points:15,health_score:3,close_to_maximum_score:!1},overall:70.45}},test_coverage:{lines:1456,hits:998,misses:458},test_pyramid:{unit_count:100,unit_pending:5,integration_count:20,integration_pending:2,regression_count:5,regression_pending:1}},"Search Engine":{assignments:{files:["src/search/controllers/search_controller.rb","src/search/services/elasticsearch_service.rb","src/search/jobs/index_job.rb","src/search/models/search_index.rb","src/search/workers/indexing_worker.rb"],teams:["Search & Discovery","Platform","Communications","Admin"]},description:"Elasticsearch-based full-text search engine",documentation_link:"https://internal-docs.company.com/search/overview",metrics:{abc_size:645.78,lines_of_code:934,cyclomatic_complexity:76},additional_metrics:{cyclomatic_complexity:{percentile:75,percent_of_max:70,score:13},encapsulation:{percentile:80,percent_of_max:75,score:12},feature_size:{percentile:60,percent_of_max:50,score:1800},test_coverage:{percentile:85,percent_of_max:80,score:75},health:{test_coverage_component:{awardable_points:70,health_score:68,close_to_maximum_score:!0},cyclomatic_complexity_component:{awardable_points:15,health_score:10.5,close_to_maximum_score:!0},encapsulation_component:{awardable_points:15,health_score:11.25,close_to_maximum_score:!0},todo_count_component:{awardable_points:15,health_score:11.25,close_to_maximum_score:!1},overall:100}},test_coverage:{lines:567,hits:489,misses:78},test_pyramid:{unit_count:100,unit_pending:5,integration_count:20,integration_pending:2,regression_count:5,regression_pending:1}},"Cache Management":{assignments:{files:null,teams:null},description:null,documentation_link:null,metrics:{abc_size:null,lines_of_code:null,cyclomatic_complexity:null},additional_metrics:{cyclomatic_complexity:{percentile:0,percent_of_max:0,score:0},encapsulation:{percentile:0,percent_of_max:0,score:0},feature_size:{percentile:0,percent_of_max:0,score:0},test_coverage:{percentile:0,percent_of_max:0,score:0},health:{test_coverage_component:{awardable_points:70,health_score:0,close_to_maximum_score:!1},cyclomatic_complexity_component:{awardable_points:15,health_score:0,close_to_maximum_score:!1},encapsulation_component:{awardable_points:15,health_score:0,close_to_maximum_score:!1},todo_count_component:{awardable_points:15,health_score:0,close_to_maximum_score:!1},overall:0}},test_coverage:null}}},CR={assigned_globs:["app/**/*.rb"],unassigned_globs:["app/models/**/*","app/controllers/admin/**/*"],require_assignment_for_teams:["Onboarding"],ignore_feature_definitions:!0,skip_code_ownership:!1,skip_features_validation:!1,code_cov:{service:"github",owner:"Example",repo:"example"},repository:{main_branch:"main",url:"https://example.com"},documentation_site_url:"example.github.io/repo",documentation_site:{health:{minimum_thresholds:{good:95,fair:80,poor:0},components:{cyclomatic_complexity:{weight:5,percent_of_max_threshold:90},encapsulation:{weight:10,percent_of_max_threshold:90},test_coverage:{weight:70,percent_of_max_threshold:95},todo_count:{weight:15,percent_of_max_threshold:95}}},linked_sites:[{name:"User Service",url:"https://example.github.io/user-service"},{name:"Gateway Service",url:"https://example.github.io/gateway-service"}],size_percentile:{minimum_thresholds:{xl:95,l:75,m:25,s:5,xs:0}},title:"Example Site",test_coverage:{minimum_thresholds:{good:98,fair:95,poor:0}}}},kR={...jR,project:CR,environment:{git_ref:"main"}},hi=window.FEATURE_MAP_CONFIG||kR;/**
69
69
  * @license lucide-react v0.468.0 - ISC
70
70
  *
71
71
  * This source code is licensed under the ISC license.
@@ -264,7 +264,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
264
264
  `),"","You can apply a few solutions:",['Add an `as="..."` prop, to ensure that we render an actual element instead of a "Fragment".',"Render a single element as the child so that we can forward the props onto that element."].map(d=>` - ${d}`).join(`
265
265
  `)].join(`
266
266
  `))}else{let d=c.props,p=d==null?void 0:d.className,h=typeof p=="function"?(...v)=>qg(p(...v),s.className):qg(p,s.className),m=h?{className:h}:{},y=lC(c.props,Hr(fm(s,["ref"])));for(let v in f)v in y&&delete f[v];return w.cloneElement(c,Object.assign({},y,f,u,{ref:i(Ase(c),u.ref)},m))}return w.createElement(o,Object.assign({},fm(s,["ref"]),o!==w.Fragment&&u,o!==w.Fragment&&f),c)}function $se(){let e=w.useRef([]),t=w.useCallback(n=>{for(let r of e.current)r!=null&&(typeof r=="function"?r(n):r.current=n)},[]);return(...n)=>{if(!n.every(r=>r==null))return e.current=n,t}}function Pse(...e){return e.every(t=>t==null)?void 0:t=>{for(let n of e)n!=null&&(typeof n=="function"?n(t):n.current=t)}}function lC(...e){if(e.length===0)return{};if(e.length===1)return e[0];let t={},n={};for(let r of e)for(let i in r)i.startsWith("on")&&typeof r[i]=="function"?(n[i]!=null||(n[i]=[]),n[i].push(r[i])):t[i]=r[i];if(t.disabled||t["aria-disabled"])for(let r in n)/^(on(?:Click|Pointer|Mouse|Key)(?:Down|Up|Press)?)$/.test(r)&&(n[r]=[i=>{var o;return(o=i==null?void 0:i.preventDefault)==null?void 0:o.call(i)}]);for(let r in n)Object.assign(t,{[r](i,...o){let a=n[r];for(let l of a){if((i instanceof Event||(i==null?void 0:i.nativeEvent)instanceof Event)&&i.defaultPrevented)return;l(i,...o)}}});return t}function Dp(...e){if(e.length===0)return{};if(e.length===1)return e[0];let t={},n={};for(let r of e)for(let i in r)i.startsWith("on")&&typeof r[i]=="function"?(n[i]!=null||(n[i]=[]),n[i].push(r[i])):t[i]=r[i];for(let r in n)Object.assign(t,{[r](...i){let o=n[r];for(let a of o)a==null||a(...i)}});return t}function Ee(e){var t;return Object.assign(w.forwardRef(e),{displayName:(t=e.displayName)!=null?t:e.name})}function Hr(e){let t=Object.assign({},e);for(let n in t)t[n]===void 0&&delete t[n];return t}function fm(e,t=[]){let n=Object.assign({},e);for(let r of t)r in n&&delete n[r];return n}function Ase(e){return A.version.split(".")[0]>="19"?e.props.ref:e.ref}function Tse(e,t,n){let[r,i]=w.useState(n),o=e!==void 0,a=w.useRef(o),l=w.useRef(!1),s=w.useRef(!1);return o&&!a.current&&!l.current?(l.current=!0,a.current=o,console.error("A component is changing from uncontrolled to controlled. This may be caused by the value changing from undefined to a defined value, which should not happen.")):!o&&a.current&&!s.current&&(s.current=!0,a.current=o,console.error("A component is changing from controlled to uncontrolled. This may be caused by the value changing from a defined value to undefined, which should not happen.")),[o?e:r,Q(u=>(o||i(u),t==null?void 0:t(u)))]}function jse(e){let[t]=w.useState(e);return t}function sC(e={},t=null,n=[]){for(let[r,i]of Object.entries(e))cC(n,uC(t,r),i);return n}function uC(e,t){return e?e+"["+t+"]":t}function cC(e,t,n){if(Array.isArray(n))for(let[r,i]of n.entries())cC(e,uC(t,r.toString()),i);else n instanceof Date?e.push([t,n.toISOString()]):typeof n=="boolean"?e.push([t,n?"1":"0"]):typeof n=="string"?e.push([t,n]):typeof n=="number"?e.push([t,`${n}`]):n==null?e.push([t,""]):sC(n,t,e)}function Cse(e){var t,n;let r=(t=e==null?void 0:e.form)!=null?t:e.closest("form");if(r){for(let i of r.elements)if(i!==e&&(i.tagName==="INPUT"&&i.type==="submit"||i.tagName==="BUTTON"&&i.type==="submit"||i.nodeName==="INPUT"&&i.type==="image")){i.click();return}(n=r.requestSubmit)==null||n.call(r)}}let kse="span";var oo=(e=>(e[e.None=1]="None",e[e.Focusable=2]="Focusable",e[e.Hidden=4]="Hidden",e))(oo||{});function Nse(e,t){var n;let{features:r=1,...i}=e,o={ref:t,"aria-hidden":(r&2)===2?!0:(n=i["aria-hidden"])!=null?n:void 0,hidden:(r&4)===4?!0:void 0,style:{position:"fixed",top:1,left:1,width:1,height:0,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0",...(r&4)===4&&(r&2)!==2&&{display:"none"}}};return Re()({ourProps:o,theirProps:i,slot:{},defaultTag:kse,name:"Hidden"})}let Pa=Ee(Nse),fC=w.createContext(null);function Mse(e){let[t,n]=w.useState(null);return A.createElement(fC.Provider,{value:{target:t}},e.children,A.createElement(Pa,{features:oo.Hidden,ref:n}))}function Ise({children:e}){let t=w.useContext(fC);if(!t)return A.createElement(A.Fragment,null,e);let{target:n}=t;return n?Ut.createPortal(A.createElement(A.Fragment,null,e),n):null}function Rse({data:e,form:t,disabled:n,onReset:r,overrides:i}){let[o,a]=w.useState(null),l=mo();return w.useEffect(()=>{if(r&&o)return l.addEventListener(o,"reset",r)},[o,t,r]),A.createElement(Ise,null,A.createElement(Lse,{setForm:a,formId:t}),sC(e).map(([s,u])=>A.createElement(Pa,{features:oo.Hidden,...Hr({key:s,as:"input",type:"hidden",hidden:!0,readOnly:!0,form:t,disabled:n,name:s,value:u,...i})})))}function Lse({setForm:e,formId:t}){return w.useEffect(()=>{if(t){let n=document.getElementById(t);n&&e(n)}},[e,t]),t?null:A.createElement(Pa,{features:oo.Hidden,as:"input",type:"hidden",hidden:!0,readOnly:!0,ref:n=>{if(!n)return;let r=n.closest("form");r&&e(r)}})}let dC=w.createContext(void 0);function pC(){return w.useContext(dC)}function Dse({id:e,children:t}){return A.createElement(dC.Provider,{value:e},t)}function $x(e){let t=e.parentElement,n=null;for(;t&&!(t instanceof HTMLFieldSetElement);)t instanceof HTMLLegendElement&&(n=t),t=t.parentElement;let r=(t==null?void 0:t.getAttribute("disabled"))==="";return r&&Fse(n)?!1:r}function Fse(e){if(!e)return!1;let t=e.previousElementSibling;for(;t!==null;){if(t instanceof HTMLLegendElement)return!1;t=t.previousElementSibling}return!0}let hC=Symbol();function Bse(e,t=!0){return Object.assign(e,{[hC]:t})}function at(...e){let t=w.useRef(e);w.useEffect(()=>{t.current=e},[e]);let n=Q(r=>{for(let i of t.current)i!=null&&(typeof i=="function"?i(r):i.current=r)});return e.every(r=>r==null||(r==null?void 0:r[hC]))?void 0:n}let Fp=w.createContext(null);Fp.displayName="DescriptionContext";function mC(){let e=w.useContext(Fp);if(e===null){let t=new Error("You used a <Description /> component, but it is not inside a relevant parent.");throw Error.captureStackTrace&&Error.captureStackTrace(t,mC),t}return e}function zse(){var e,t;return(t=(e=w.useContext(Fp))==null?void 0:e.value)!=null?t:void 0}function Eu(){let[e,t]=w.useState([]);return[e.length>0?e.join(" "):void 0,w.useMemo(()=>function(n){let r=Q(o=>(t(a=>[...a,o]),()=>t(a=>{let l=a.slice(),s=l.indexOf(o);return s!==-1&&l.splice(s,1),l}))),i=w.useMemo(()=>({register:r,slot:n.slot,name:n.name,props:n.props,value:n.value}),[r,n.slot,n.name,n.props,n.value]);return A.createElement(Fp.Provider,{value:i},n.children)},[t])]}let Hse="p";function Use(e,t){let n=w.useId(),r=Su(),{id:i=`headlessui-description-${n}`,...o}=e,a=mC(),l=at(t);he(()=>a.register(i),[i,a.register]);let s=r||!1,u=w.useMemo(()=>({...a.slot,disabled:s}),[a.slot,s]),c={ref:l,...a.props,id:i};return Re()({ourProps:c,theirProps:o,slot:u,defaultTag:Hse,name:a.name||"Description"})}let Wse=Ee(Use),vC=Object.assign(Wse,{});var Ne=(e=>(e.Space=" ",e.Enter="Enter",e.Escape="Escape",e.Backspace="Backspace",e.Delete="Delete",e.ArrowLeft="ArrowLeft",e.ArrowUp="ArrowUp",e.ArrowRight="ArrowRight",e.ArrowDown="ArrowDown",e.Home="Home",e.End="End",e.PageUp="PageUp",e.PageDown="PageDown",e.Tab="Tab",e))(Ne||{});let Bp=w.createContext(null);Bp.displayName="LabelContext";function Px(){let e=w.useContext(Bp);if(e===null){let t=new Error("You used a <Label /> component, but it is not inside a relevant parent.");throw Error.captureStackTrace&&Error.captureStackTrace(t,Px),t}return e}function gC(e){var t,n,r;let i=(n=(t=w.useContext(Bp))==null?void 0:t.value)!=null?n:void 0;return((r=void 0)!=null?r:0)>0?[i,...e].filter(Boolean).join(" "):i}function Ou({inherit:e=!1}={}){let t=gC(),[n,r]=w.useState([]),i=e?[t,...n].filter(Boolean):n;return[i.length>0?i.join(" "):void 0,w.useMemo(()=>function(o){let a=Q(s=>(r(u=>[...u,s]),()=>r(u=>{let c=u.slice(),f=c.indexOf(s);return f!==-1&&c.splice(f,1),c}))),l=w.useMemo(()=>({register:a,slot:o.slot,name:o.name,props:o.props,value:o.value}),[a,o.slot,o.name,o.props,o.value]);return A.createElement(Bp.Provider,{value:l},o.children)},[r])]}let Vse="label";function Kse(e,t){var n;let r=w.useId(),i=Px(),o=pC(),a=Su(),{id:l=`headlessui-label-${r}`,htmlFor:s=o??((n=i.props)==null?void 0:n.htmlFor),passive:u=!1,...c}=e,f=at(t);he(()=>i.register(l),[l,i.register]);let d=Q(y=>{let v=y.currentTarget;if(v instanceof HTMLLabelElement&&y.preventDefault(),i.props&&"onClick"in i.props&&typeof i.props.onClick=="function"&&i.props.onClick(y),v instanceof HTMLLabelElement){let g=document.getElementById(v.htmlFor);if(g){let x=g.getAttribute("disabled");if(x==="true"||x==="")return;let E=g.getAttribute("aria-disabled");if(E==="true"||E==="")return;(g instanceof HTMLInputElement&&(g.type==="radio"||g.type==="checkbox")||g.role==="radio"||g.role==="checkbox"||g.role==="switch")&&g.click(),g.focus({preventScroll:!0})}}}),p=a||!1,h=w.useMemo(()=>({...i.slot,disabled:p}),[i.slot,p]),m={ref:f,...i.props,id:l,htmlFor:s,onClick:d};return u&&("onClick"in m&&(delete m.htmlFor,delete m.onClick),"onClick"in c&&delete c.onClick),Re()({ourProps:m,theirProps:c,slot:h,defaultTag:s?Vse:"div",name:i.name||"Label"})}let qse=Ee(Kse),Gse=Object.assign(qse,{}),Xse=w.createContext(()=>{});function Yse({value:e,children:t}){return A.createElement(Xse.Provider,{value:e},t)}function Qse(e,t){return e!==null&&t!==null&&typeof e=="object"&&typeof t=="object"&&"id"in e&&"id"in t?e.id===t.id:e===t}function Zse(e=Qse){return w.useCallback((t,n)=>{if(typeof e=="string"){let r=e;return(t==null?void 0:t[r])===(n==null?void 0:n[r])}return e(t,n)},[e])}function Jse(e){if(e===null)return{width:0,height:0};let{width:t,height:n}=e.getBoundingClientRect();return{width:t,height:n}}function eue(e,t=!1){let[n,r]=w.useReducer(()=>({}),{}),i=w.useMemo(()=>Jse(e),[e,n]);return he(()=>{if(!e)return;let o=new ResizeObserver(r);return o.observe(e),()=>{o.disconnect()}},[e]),t?{width:`${i.width}px`,height:`${i.height}px`}:i}let tue=class extends Map{constructor(t){super(),this.factory=t}get(t){let n=super.get(t);return n===void 0&&(n=this.factory(t),this.set(t,n)),n}};function yC(e,t){let n=e(),r=new Set;return{getSnapshot(){return n},subscribe(i){return r.add(i),()=>r.delete(i)},dispatch(i,...o){let a=t[i].call(n,...o);a&&(n=a,r.forEach(l=>l()))}}}function xC(e){return w.useSyncExternalStore(e.subscribe,e.getSnapshot,e.getSnapshot)}let nue=new tue(()=>yC(()=>[],{ADD(e){return this.includes(e)?this:[...this,e]},REMOVE(e){let t=this.indexOf(e);if(t===-1)return this;let n=this.slice();return n.splice(t,1),n}}));function Za(e,t){let n=nue.get(t),r=w.useId(),i=xC(n);if(he(()=>{if(e)return n.dispatch("ADD",r),()=>n.dispatch("REMOVE",r)},[n,e]),!e)return!1;let o=i.indexOf(r),a=i.length;return o===-1&&(o=a,a+=1),o===a-1}let Gg=new Map,Xl=new Map;function ME(e){var t;let n=(t=Xl.get(e))!=null?t:0;return Xl.set(e,n+1),n!==0?()=>IE(e):(Gg.set(e,{"aria-hidden":e.getAttribute("aria-hidden"),inert:e.inert}),e.setAttribute("aria-hidden","true"),e.inert=!0,()=>IE(e))}function IE(e){var t;let n=(t=Xl.get(e))!=null?t:1;if(n===1?Xl.delete(e):Xl.set(e,n-1),n!==1)return;let r=Gg.get(e);r&&(r["aria-hidden"]===null?e.removeAttribute("aria-hidden"):e.setAttribute("aria-hidden",r["aria-hidden"]),e.inert=r.inert,Gg.delete(e))}function bC(e,{allowed:t,disallowed:n}={}){let r=Za(e,"inert-others");he(()=>{var i,o;if(!r)return;let a=er();for(let s of(i=n==null?void 0:n())!=null?i:[])s&&a.add(ME(s));let l=(o=t==null?void 0:t())!=null?o:[];for(let s of l){if(!s)continue;let u=wi(s);if(!u)continue;let c=s.parentElement;for(;c&&c!==u.body;){for(let f of c.children)l.some(d=>f.contains(d))||a.add(ME(f));c=c.parentElement}}return a.dispose},[r,t,n])}function wC(e,t,n){let r=Rr(i=>{let o=i.getBoundingClientRect();o.x===0&&o.y===0&&o.width===0&&o.height===0&&n()});w.useEffect(()=>{if(!e)return;let i=t===null?null:t instanceof HTMLElement?t:t.current;if(!i)return;let o=er();if(typeof ResizeObserver<"u"){let a=new ResizeObserver(()=>r.current(i));a.observe(i),o.add(()=>a.disconnect())}if(typeof IntersectionObserver<"u"){let a=new IntersectionObserver(()=>r.current(i));a.observe(i),o.add(()=>a.disconnect())}return()=>o.dispose()},[t,r,e])}let pd=["[contentEditable=true]","[tabindex]","a[href]","area[href]","button:not([disabled])","iframe","input:not([disabled])","select:not([disabled])","textarea:not([disabled])"].map(e=>`${e}:not([tabindex='-1'])`).join(","),rue=["[data-autofocus]"].map(e=>`${e}:not([tabindex='-1'])`).join(",");var _t=(e=>(e[e.First=1]="First",e[e.Previous=2]="Previous",e[e.Next=4]="Next",e[e.Last=8]="Last",e[e.WrapAround=16]="WrapAround",e[e.NoScroll=32]="NoScroll",e[e.AutoFocus=64]="AutoFocus",e))(_t||{}),Ys=(e=>(e[e.Error=0]="Error",e[e.Overflow=1]="Overflow",e[e.Success=2]="Success",e[e.Underflow=3]="Underflow",e))(Ys||{}),iue=(e=>(e[e.Previous=-1]="Previous",e[e.Next=1]="Next",e))(iue||{});function _C(e=document.body){return e==null?[]:Array.from(e.querySelectorAll(pd)).sort((t,n)=>Math.sign((t.tabIndex||Number.MAX_SAFE_INTEGER)-(n.tabIndex||Number.MAX_SAFE_INTEGER)))}function oue(e=document.body){return e==null?[]:Array.from(e.querySelectorAll(rue)).sort((t,n)=>Math.sign((t.tabIndex||Number.MAX_SAFE_INTEGER)-(n.tabIndex||Number.MAX_SAFE_INTEGER)))}var Ax=(e=>(e[e.Strict=0]="Strict",e[e.Loose=1]="Loose",e))(Ax||{});function Tx(e,t=0){var n;return e===((n=wi(e))==null?void 0:n.body)?!1:jn(t,{0(){return e.matches(pd)},1(){let r=e;for(;r!==null;){if(r.matches(pd))return!0;r=r.parentElement}return!1}})}function SC(e){let t=wi(e);er().nextFrame(()=>{t&&!Tx(t.activeElement,0)&&Xn(e)})}var aue=(e=>(e[e.Keyboard=0]="Keyboard",e[e.Mouse=1]="Mouse",e))(aue||{});typeof window<"u"&&typeof document<"u"&&(document.addEventListener("keydown",e=>{e.metaKey||e.altKey||e.ctrlKey||(document.documentElement.dataset.headlessuiFocusVisible="")},!0),document.addEventListener("click",e=>{e.detail===1?delete document.documentElement.dataset.headlessuiFocusVisible:e.detail===0&&(document.documentElement.dataset.headlessuiFocusVisible="")},!0));function Xn(e){e==null||e.focus({preventScroll:!0})}let lue=["textarea","input"].join(",");function sue(e){var t,n;return(n=(t=e==null?void 0:e.matches)==null?void 0:t.call(e,lue))!=null?n:!1}function jx(e,t=n=>n){return e.slice().sort((n,r)=>{let i=t(n),o=t(r);if(i===null||o===null)return 0;let a=i.compareDocumentPosition(o);return a&Node.DOCUMENT_POSITION_FOLLOWING?-1:a&Node.DOCUMENT_POSITION_PRECEDING?1:0})}function uue(e,t){return li(_C(),t,{relativeTo:e})}function li(e,t,{sorted:n=!0,relativeTo:r=null,skipElements:i=[]}={}){let o=Array.isArray(e)?e.length>0?e[0].ownerDocument:document:e.ownerDocument,a=Array.isArray(e)?n?jx(e):e:t&64?oue(e):_C(e);i.length>0&&a.length>1&&(a=a.filter(p=>!i.some(h=>h!=null&&"current"in h?(h==null?void 0:h.current)===p:h===p))),r=r??o.activeElement;let l=(()=>{if(t&5)return 1;if(t&10)return-1;throw new Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last")})(),s=(()=>{if(t&1)return 0;if(t&2)return Math.max(0,a.indexOf(r))-1;if(t&4)return Math.max(0,a.indexOf(r))+1;if(t&8)return a.length-1;throw new Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last")})(),u=t&32?{preventScroll:!0}:{},c=0,f=a.length,d;do{if(c>=f||c+f<=0)return 0;let p=s+c;if(t&16)p=(p+f)%f;else{if(p<0)return 3;if(p>=f)return 1}d=a[p],d==null||d.focus(u),c+=l}while(d!==o.activeElement);return t&6&&sue(d)&&d.select(),2}function EC(){return/iPhone/gi.test(window.navigator.platform)||/Mac/gi.test(window.navigator.platform)&&window.navigator.maxTouchPoints>0}function cue(){return/Android/gi.test(window.navigator.userAgent)}function fue(){return EC()||cue()}function xl(e,t,n,r){let i=Rr(n);w.useEffect(()=>{if(!e)return;function o(a){i.current(a)}return document.addEventListener(t,o,r),()=>document.removeEventListener(t,o,r)},[e,t,r])}function OC(e,t,n,r){let i=Rr(n);w.useEffect(()=>{if(!e)return;function o(a){i.current(a)}return window.addEventListener(t,o,r),()=>window.removeEventListener(t,o,r)},[e,t,r])}const RE=30;function $C(e,t,n){let r=Za(e,"outside-click"),i=Rr(n),o=w.useCallback(function(s,u){if(s.defaultPrevented)return;let c=u(s);if(c===null||!c.getRootNode().contains(c)||!c.isConnected)return;let f=function d(p){return typeof p=="function"?d(p()):Array.isArray(p)||p instanceof Set?p:[p]}(t);for(let d of f)if(d!==null&&(d.contains(c)||s.composed&&s.composedPath().includes(d)))return;return!Tx(c,Ax.Loose)&&c.tabIndex!==-1&&s.preventDefault(),i.current(s,c)},[i,t]),a=w.useRef(null);xl(r,"pointerdown",s=>{var u,c;a.current=((c=(u=s.composedPath)==null?void 0:u.call(s))==null?void 0:c[0])||s.target},!0),xl(r,"mousedown",s=>{var u,c;a.current=((c=(u=s.composedPath)==null?void 0:u.call(s))==null?void 0:c[0])||s.target},!0),xl(r,"click",s=>{fue()||a.current&&(o(s,()=>a.current),a.current=null)},!0);let l=w.useRef({x:0,y:0});xl(r,"touchstart",s=>{l.current.x=s.touches[0].clientX,l.current.y=s.touches[0].clientY},!0),xl(r,"touchend",s=>{let u={x:s.changedTouches[0].clientX,y:s.changedTouches[0].clientY};if(!(Math.abs(u.x-l.current.x)>=RE||Math.abs(u.y-l.current.y)>=RE))return o(s,()=>s.target instanceof HTMLElement?s.target:null)},!0),OC(r,"blur",s=>o(s,()=>window.document.activeElement instanceof HTMLIFrameElement?window.document.activeElement:null),!0)}function Ja(...e){return w.useMemo(()=>wi(...e),[...e])}function PC(e,t,n,r){let i=Rr(n);w.useEffect(()=>{e=e??window;function o(a){i.current(a)}return e.addEventListener(t,o,r),()=>e.removeEventListener(t,o,r)},[e,t,r])}function due(e,t){return w.useMemo(()=>{var n;if(e.type)return e.type;let r=(n=e.as)!=null?n:"button";if(typeof r=="string"&&r.toLowerCase()==="button"||(t==null?void 0:t.tagName)==="BUTTON"&&!t.hasAttribute("type"))return"button"},[e.type,e.as,t])}function pue(){let e;return{before({doc:t}){var n;let r=t.documentElement,i=(n=t.defaultView)!=null?n:window;e=Math.max(0,i.innerWidth-r.clientWidth)},after({doc:t,d:n}){let r=t.documentElement,i=Math.max(0,r.clientWidth-r.offsetWidth),o=Math.max(0,e-i);n.style(r,"paddingRight",`${o}px`)}}}function hue(){return EC()?{before({doc:e,d:t,meta:n}){function r(i){return n.containers.flatMap(o=>o()).some(o=>o.contains(i))}t.microTask(()=>{var i;if(window.getComputedStyle(e.documentElement).scrollBehavior!=="auto"){let l=er();l.style(e.documentElement,"scrollBehavior","auto"),t.add(()=>t.microTask(()=>l.dispose()))}let o=(i=window.scrollY)!=null?i:window.pageYOffset,a=null;t.addEventListener(e,"click",l=>{if(l.target instanceof HTMLElement)try{let s=l.target.closest("a");if(!s)return;let{hash:u}=new URL(s.href),c=e.querySelector(u);c&&!r(c)&&(a=c)}catch{}},!0),t.addEventListener(e,"touchstart",l=>{if(l.target instanceof HTMLElement)if(r(l.target)){let s=l.target;for(;s.parentElement&&r(s.parentElement);)s=s.parentElement;t.style(s,"overscrollBehavior","contain")}else t.style(l.target,"touchAction","none")}),t.addEventListener(e,"touchmove",l=>{if(l.target instanceof HTMLElement){if(l.target.tagName==="INPUT")return;if(r(l.target)){let s=l.target;for(;s.parentElement&&s.dataset.headlessuiPortal!==""&&!(s.scrollHeight>s.clientHeight||s.scrollWidth>s.clientWidth);)s=s.parentElement;s.dataset.headlessuiPortal===""&&l.preventDefault()}else l.preventDefault()}},{passive:!1}),t.add(()=>{var l;let s=(l=window.scrollY)!=null?l:window.pageYOffset;o!==s&&window.scrollTo(0,o),a&&a.isConnected&&(a.scrollIntoView({block:"nearest"}),a=null)})})}}:{}}function mue(){return{before({doc:e,d:t}){t.style(e.documentElement,"overflow","hidden")}}}function vue(e){let t={};for(let n of e)Object.assign(t,n(t));return t}let zi=yC(()=>new Map,{PUSH(e,t){var n;let r=(n=this.get(e))!=null?n:{doc:e,count:0,d:er(),meta:new Set};return r.count++,r.meta.add(t),this.set(e,r),this},POP(e,t){let n=this.get(e);return n&&(n.count--,n.meta.delete(t)),this},SCROLL_PREVENT({doc:e,d:t,meta:n}){let r={doc:e,d:t,meta:vue(n)},i=[hue(),pue(),mue()];i.forEach(({before:o})=>o==null?void 0:o(r)),i.forEach(({after:o})=>o==null?void 0:o(r))},SCROLL_ALLOW({d:e}){e.dispose()},TEARDOWN({doc:e}){this.delete(e)}});zi.subscribe(()=>{let e=zi.getSnapshot(),t=new Map;for(let[n]of e)t.set(n,n.documentElement.style.overflow);for(let n of e.values()){let r=t.get(n.doc)==="hidden",i=n.count!==0;(i&&!r||!i&&r)&&zi.dispatch(n.count>0?"SCROLL_PREVENT":"SCROLL_ALLOW",n),n.count===0&&zi.dispatch("TEARDOWN",n)}});function gue(e,t,n=()=>({containers:[]})){let r=xC(zi),i=t?r.get(t):void 0,o=i?i.count>0:!1;return he(()=>{if(!(!t||!e))return zi.dispatch("PUSH",t,n),()=>zi.dispatch("POP",t,n)},[e,t]),o}function AC(e,t,n=()=>[document.body]){let r=Za(e,"scroll-lock");gue(r,t,i=>{var o;return{containers:[...(o=i.containers)!=null?o:[],n]}})}function LE(e){return[e.screenX,e.screenY]}function yue(){let e=w.useRef([-1,-1]);return{wasMoved(t){let n=LE(t);return e.current[0]===n[0]&&e.current[1]===n[1]?!1:(e.current=n,!0)},update(t){e.current=LE(t)}}}function xue(e=0){let[t,n]=w.useState(e),r=w.useCallback(s=>n(s),[t]),i=w.useCallback(s=>n(u=>u|s),[t]),o=w.useCallback(s=>(t&s)===s,[t]),a=w.useCallback(s=>n(u=>u&~s),[n]),l=w.useCallback(s=>n(u=>u^s),[n]);return{flags:t,setFlag:r,addFlag:i,hasFlag:o,removeFlag:a,toggleFlag:l}}var bue={},DE,FE;typeof process<"u"&&typeof globalThis<"u"&&typeof Element<"u"&&((DE=process==null?void 0:bue)==null?void 0:DE.NODE_ENV)==="test"&&typeof((FE=Element==null?void 0:Element.prototype)==null?void 0:FE.getAnimations)>"u"&&(Element.prototype.getAnimations=function(){return console.warn(["Headless UI has polyfilled `Element.prototype.getAnimations` for your tests.","Please install a proper polyfill e.g. `jsdom-testing-mocks`, to silence these warnings.","","Example usage:","```js","import { mockAnimationsApi } from 'jsdom-testing-mocks'","mockAnimationsApi()","```"].join(`
267
- `)),[]});var wue=(e=>(e[e.None=0]="None",e[e.Closed=1]="Closed",e[e.Enter=2]="Enter",e[e.Leave=4]="Leave",e))(wue||{});function TC(e){let t={};for(let n in e)e[n]===!0&&(t[`data-${n}`]="");return t}function jC(e,t,n,r){let[i,o]=w.useState(n),{hasFlag:a,addFlag:l,removeFlag:s}=xue(e&&i?3:0),u=w.useRef(!1),c=w.useRef(!1),f=mo();return he(()=>{var d;if(e){if(n&&o(!0),!t){n&&l(3);return}return(d=r==null?void 0:r.start)==null||d.call(r,n),_ue(t,{inFlight:u,prepare(){c.current?c.current=!1:c.current=u.current,u.current=!0,!c.current&&(n?(l(3),s(4)):(l(4),s(2)))},run(){c.current?n?(s(3),l(4)):(s(4),l(3)):n?s(1):l(1)},done(){var p;c.current&&typeof t.getAnimations=="function"&&t.getAnimations().length>0||(u.current=!1,s(7),n||o(!1),(p=r==null?void 0:r.end)==null||p.call(r,n))}})}},[e,n,t,f]),e?[i,{closed:a(1),enter:a(2),leave:a(4),transition:a(2)||a(4)}]:[n,{closed:void 0,enter:void 0,leave:void 0,transition:void 0}]}function _ue(e,{prepare:t,run:n,done:r,inFlight:i}){let o=er();return Eue(e,{prepare:t,inFlight:i}),o.nextFrame(()=>{n(),o.requestAnimationFrame(()=>{o.add(Sue(e,r))})}),o.dispose}function Sue(e,t){var n,r;let i=er();if(!e)return i.dispose;let o=!1;i.add(()=>{o=!0});let a=(r=(n=e.getAnimations)==null?void 0:n.call(e).filter(l=>l instanceof CSSTransition))!=null?r:[];return a.length===0?(t(),i.dispose):(Promise.allSettled(a.map(l=>l.finished)).then(()=>{o||t()}),i.dispose)}function Eue(e,{inFlight:t,prepare:n}){if(t!=null&&t.current){n();return}let r=e.style.transition;e.style.transition="none",n(),e.offsetHeight,e.style.transition=r}function Oue(e,{container:t,accept:n,walk:r}){let i=w.useRef(n),o=w.useRef(r);w.useEffect(()=>{i.current=n,o.current=r},[n,r]),he(()=>{if(!t||!e)return;let a=wi(t);if(!a)return;let l=i.current,s=o.current,u=Object.assign(f=>l(f),{acceptNode:l}),c=a.createTreeWalker(t,NodeFilter.SHOW_ELEMENT,u,!1);for(;c.nextNode();)s(c.currentNode)},[t,e,i,o])}function Cx(e,t){let n=w.useRef([]),r=Q(e);w.useEffect(()=>{let i=[...n.current];for(let[o,a]of t.entries())if(n.current[o]!==a){let l=r(t,i);return n.current=t,l}},[r,...t])}function $ue(){const e=navigator.userAgentData;return e&&Array.isArray(e.brands)?e.brands.map(t=>{let{brand:n,version:r}=t;return n+"/"+r}).join(" "):navigator.userAgent}const CC={...Rc},Pue=CC.useInsertionEffect,Aue=Pue||(e=>e());function kC(e){const t=w.useRef(()=>{});return Aue(()=>{t.current=e}),w.useCallback(function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return t.current==null?void 0:t.current(...r)},[])}var Xg=typeof document<"u"?w.useLayoutEffect:w.useEffect;let BE=!1,Tue=0;const zE=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+Tue++;function jue(){const[e,t]=w.useState(()=>BE?zE():void 0);return Xg(()=>{e==null&&t(zE())},[]),w.useEffect(()=>{BE=!0},[]),e}const Cue=CC.useId,kue=Cue||jue;function Nue(){const e=new Map;return{emit(t,n){var r;(r=e.get(t))==null||r.forEach(i=>i(n))},on(t,n){e.set(t,[...e.get(t)||[],n])},off(t,n){var r;e.set(t,((r=e.get(t))==null?void 0:r.filter(i=>i!==n))||[])}}}const Mue=w.createContext(null),Iue=w.createContext(null),Rue=()=>{var e;return((e=w.useContext(Mue))==null?void 0:e.id)||null},Lue=()=>w.useContext(Iue),Due="data-floating-ui-focusable";function Fue(e){const{open:t=!1,onOpenChange:n,elements:r}=e,i=kue(),o=w.useRef({}),[a]=w.useState(()=>Nue()),l=Rue()!=null,[s,u]=w.useState(r.reference),c=kC((p,h,m)=>{o.current.openEvent=p?h:void 0,a.emit("openchange",{open:p,event:h,reason:m,nested:l}),n==null||n(p,h,m)}),f=w.useMemo(()=>({setPositionReference:u}),[]),d=w.useMemo(()=>({reference:s||r.reference||null,floating:r.floating||null,domReference:r.reference}),[s,r.reference,r.floating]);return w.useMemo(()=>({dataRef:o,open:t,onOpenChange:c,elements:d,events:a,floatingId:i,refs:f}),[t,c,d,a,i,f])}function Bue(e){e===void 0&&(e={});const{nodeId:t}=e,n=Fue({...e,elements:{reference:null,floating:null,...e.elements}}),r=e.rootContext||n,i=r.elements,[o,a]=w.useState(null),[l,s]=w.useState(null),c=(i==null?void 0:i.domReference)||o,f=w.useRef(null),d=Lue();Xg(()=>{c&&(f.current=c)},[c]);const p=Uj({...e,elements:{...i,...l&&{reference:l}}}),h=w.useCallback(x=>{const E=de(x)?{getBoundingClientRect:()=>x.getBoundingClientRect(),contextElement:x}:x;s(E),p.refs.setReference(E)},[p.refs]),m=w.useCallback(x=>{(de(x)||x===null)&&(f.current=x,a(x)),(de(p.refs.reference.current)||p.refs.reference.current===null||x!==null&&!de(x))&&p.refs.setReference(x)},[p.refs]),y=w.useMemo(()=>({...p.refs,setReference:m,setPositionReference:h,domReference:f}),[p.refs,m,h]),v=w.useMemo(()=>({...p.elements,domReference:c}),[p.elements,c]),g=w.useMemo(()=>({...p,...r,refs:y,elements:v,nodeId:t}),[p,y,v,t,r]);return Xg(()=>{r.dataRef.current.floatingContext=g;const x=d==null?void 0:d.nodesRef.current.find(E=>E.id===t);x&&(x.context=g)}),w.useMemo(()=>({...p,context:g,refs:y,elements:v}),[p,y,v,g])}const HE="active",UE="selected";function dm(e,t,n){const r=new Map,i=n==="item";let o=e;if(i&&e){const{[HE]:a,[UE]:l,...s}=e;o=s}return{...n==="floating"&&{tabIndex:-1,[Due]:""},...o,...t.map(a=>{const l=a?a[n]:null;return typeof l=="function"?e?l(e):null:l}).concat(e).reduce((a,l)=>(l&&Object.entries(l).forEach(s=>{let[u,c]=s;if(!(i&&[HE,UE].includes(u)))if(u.indexOf("on")===0){if(r.has(u)||r.set(u,[]),typeof c=="function"){var f;(f=r.get(u))==null||f.push(c),a[u]=function(){for(var d,p=arguments.length,h=new Array(p),m=0;m<p;m++)h[m]=arguments[m];return(d=r.get(u))==null?void 0:d.map(y=>y(...h)).find(y=>y!==void 0)}}}else a[u]=c}),a),{})}}function zue(e){e===void 0&&(e=[]);const t=e.map(l=>l==null?void 0:l.reference),n=e.map(l=>l==null?void 0:l.floating),r=e.map(l=>l==null?void 0:l.item),i=w.useCallback(l=>dm(l,e,"reference"),t),o=w.useCallback(l=>dm(l,e,"floating"),n),a=w.useCallback(l=>dm(l,e,"item"),r);return w.useMemo(()=>({getReferenceProps:i,getFloatingProps:o,getItemProps:a}),[i,o,a])}function WE(e,t){return{...e,rects:{...e.rects,floating:{...e.rects.floating,height:t}}}}const Hue=e=>({name:"inner",options:e,async fn(t){const{listRef:n,overflowRef:r,onFallbackChange:i,offset:o=0,index:a=0,minItemsVisible:l=4,referenceOverflowThreshold:s=0,scrollRef:u,...c}=ho(e,t),{rects:f,elements:{floating:d}}=t,p=n.current[a],h=(u==null?void 0:u.current)||d,m=d.clientTop||h.clientTop,y=d.clientTop!==0,v=h.clientTop!==0,g=d===h;if(!p)return{};const x={...t,...await xx(-p.offsetTop-d.clientTop-f.reference.height/2-p.offsetHeight/2-o).fn(t)},E=await nm(WE(x,h.scrollHeight+m+d.clientTop),c),_=await nm(x,{...c,elementContext:"reference"}),S=vt(0,E.top),O=x.y+S,C=(h.scrollHeight>h.clientHeight?j=>j:Gs)(vt(0,h.scrollHeight+(y&&g||v?m*2:0)-S-vt(0,E.bottom)));if(h.style.maxHeight=C+"px",h.scrollTop=S,i){const j=h.offsetHeight<p.offsetHeight*to(l,n.current.length)-1||_.top>=-s||_.bottom>=-s;Ut.flushSync(()=>i(j))}return r&&(r.current=await nm(WE({...x,y:O},h.offsetHeight+m+d.clientTop),c)),{y:O}}});function Uue(e,t){const{open:n,elements:r}=e,{enabled:i=!0,overflowRef:o,scrollRef:a,onChange:l}=t,s=kC(l),u=w.useRef(!1),c=w.useRef(null),f=w.useRef(null);w.useEffect(()=>{if(!i)return;function p(m){if(m.ctrlKey||!h||o.current==null)return;const y=m.deltaY,v=o.current.top>=-.5,g=o.current.bottom>=-.5,x=h.scrollHeight-h.clientHeight,E=y<0?-1:1,_=y<0?"max":"min";h.scrollHeight<=h.clientHeight||(!v&&y>0||!g&&y<0?(m.preventDefault(),Ut.flushSync(()=>{s(S=>S+Math[_](y,x*E))})):/firefox/i.test($ue())&&(h.scrollTop+=y))}const h=(a==null?void 0:a.current)||r.floating;if(n&&h)return h.addEventListener("wheel",p),requestAnimationFrame(()=>{c.current=h.scrollTop,o.current!=null&&(f.current={...o.current})}),()=>{c.current=null,f.current=null,h.removeEventListener("wheel",p)}},[i,n,r.floating,o,a,s]);const d=w.useMemo(()=>({onKeyDown(){u.current=!0},onWheel(){u.current=!1},onPointerMove(){u.current=!1},onScroll(){const p=(a==null?void 0:a.current)||r.floating;if(!(!o.current||!p||!u.current)){if(c.current!==null){const h=p.scrollTop-c.current;(o.current.bottom<-.5&&h<-1||o.current.top<-.5&&h>1)&&Ut.flushSync(()=>s(m=>m+h))}requestAnimationFrame(()=>{c.current=p.scrollTop})}}}),[r.floating,s,o,a]);return w.useMemo(()=>i?{floating:d}:{},[i,d])}let el=w.createContext({styles:void 0,setReference:()=>{},setFloating:()=>{},getReferenceProps:()=>({}),getFloatingProps:()=>({}),slot:{}});el.displayName="FloatingContext";let kx=w.createContext(null);kx.displayName="PlacementContext";function Wue(e){return w.useMemo(()=>e?typeof e=="string"?{to:e}:e:null,[e])}function Vue(){return w.useContext(el).setReference}function Kue(){return w.useContext(el).getReferenceProps}function que(){let{getFloatingProps:e,slot:t}=w.useContext(el);return w.useCallback((...n)=>Object.assign({},e(...n),{"data-anchor":t.anchor}),[e,t])}function Gue(e=null){e===!1&&(e=null),typeof e=="string"&&(e={to:e});let t=w.useContext(kx),n=w.useMemo(()=>e,[JSON.stringify(e,(i,o)=>{var a;return(a=o==null?void 0:o.outerHTML)!=null?a:o})]);he(()=>{t==null||t(n??null)},[t,n]);let r=w.useContext(el);return w.useMemo(()=>[r.setFloating,e?r.styles:{}],[r.setFloating,e,r.styles])}let VE=4;function Xue({children:e,enabled:t=!0}){let[n,r]=w.useState(null),[i,o]=w.useState(0),a=w.useRef(null),[l,s]=w.useState(null);Yue(l);let u=t&&n!==null&&l!==null,{to:c="bottom",gap:f=0,offset:d=0,padding:p=0,inner:h}=Que(n,l),[m,y="center"]=c.split(" ");he(()=>{u&&o(0)},[u]);let{refs:v,floatingStyles:g,context:x}=Bue({open:u,placement:m==="selection"?y==="center"?"bottom":`bottom-${y}`:y==="center"?`${m}`:`${m}-${y}`,strategy:"absolute",transform:!1,middleware:[xx({mainAxis:m==="selection"?0:f,crossAxis:d}),Wj({padding:p}),m!=="selection"&&Sle({padding:p}),m==="selection"&&h?Hue({...h,padding:p,overflowRef:a,offset:i,minItemsVisible:VE,referenceOverflowThreshold:p,onFallbackChange(j){var N,I;if(!j)return;let D=x.elements.floating;if(!D)return;let M=parseFloat(getComputedStyle(D).scrollPaddingBottom)||0,F=Math.min(VE,D.childElementCount),R=0,P=0;for(let k of(I=(N=x.elements.floating)==null?void 0:N.childNodes)!=null?I:[])if(k instanceof HTMLElement){let B=k.offsetTop,L=B+k.clientHeight+M,H=D.scrollTop,V=H+D.clientHeight;if(B>=H&&L<=V)F--;else{P=Math.max(0,Math.min(L,V)-Math.max(B,H)),R=k.clientHeight;break}}F>=1&&o(k=>{let B=R*F-P+M;return k>=B?k:B})}}):null,Ele({padding:p,apply({availableWidth:j,availableHeight:N,elements:I}){Object.assign(I.floating.style,{overflow:"auto",maxWidth:`${j}px`,maxHeight:`min(var(--anchor-max-height, 100vh), ${N}px)`})}})].filter(Boolean),whileElementsMounted:zj}),[E=m,_=y]=x.placement.split("-");m==="selection"&&(E="selection");let S=w.useMemo(()=>({anchor:[E,_].filter(Boolean).join(" ")}),[E,_]),O=Uue(x,{overflowRef:a,onChange:o}),{getReferenceProps:$,getFloatingProps:T}=zue([O]),C=Q(j=>{s(j),v.setFloating(j)});return w.createElement(kx.Provider,{value:r},w.createElement(el.Provider,{value:{setFloating:C,setReference:v.setReference,styles:g,getReferenceProps:$,getFloatingProps:T,slot:S}},e))}function Yue(e){he(()=>{if(!e)return;let t=new MutationObserver(()=>{let n=window.getComputedStyle(e).maxHeight,r=parseFloat(n);if(isNaN(r))return;let i=parseInt(n);isNaN(i)||r!==i&&(e.style.maxHeight=`${Math.ceil(r)}px`)});return t.observe(e,{attributes:!0,attributeFilter:["style"]}),()=>{t.disconnect()}},[e])}function Que(e,t){var n,r,i;let o=pm((n=e==null?void 0:e.gap)!=null?n:"var(--anchor-gap, 0)",t),a=pm((r=e==null?void 0:e.offset)!=null?r:"var(--anchor-offset, 0)",t),l=pm((i=e==null?void 0:e.padding)!=null?i:"var(--anchor-padding, 0)",t);return{...e,gap:o,offset:a,padding:l}}function pm(e,t,n=void 0){let r=mo(),i=Q((s,u)=>{if(s==null)return[n,null];if(typeof s=="number")return[s,null];if(typeof s=="string"){if(!u)return[n,null];let c=KE(s,u);return[c,f=>{let d=NC(s);{let p=d.map(h=>window.getComputedStyle(u).getPropertyValue(h));r.requestAnimationFrame(function h(){r.nextFrame(h);let m=!1;for(let[v,g]of d.entries()){let x=window.getComputedStyle(u).getPropertyValue(g);if(p[v]!==x){p[v]=x,m=!0;break}}if(!m)return;let y=KE(s,u);c!==y&&(f(y),c=y)})}return r.dispose}]}return[n,null]}),o=w.useMemo(()=>i(e,t)[0],[e,t]),[a=o,l]=w.useState();return he(()=>{let[s,u]=i(e,t);if(l(s),!!u)return u(l)},[e,t]),a}function NC(e){let t=/var\((.*)\)/.exec(e);if(t){let n=t[1].indexOf(",");if(n===-1)return[t[1]];let r=t[1].slice(0,n).trim(),i=t[1].slice(n+1).trim();return i?[r,...NC(i)]:[r]}return[]}function KE(e,t){let n=document.createElement("div");t.appendChild(n),n.style.setProperty("margin-top","0px","important"),n.style.setProperty("margin-top",e,"important");let r=parseFloat(window.getComputedStyle(n).marginTop)||0;return t.removeChild(n),r}let zp=w.createContext(null);zp.displayName="OpenClosedContext";var Et=(e=>(e[e.Open=1]="Open",e[e.Closed=2]="Closed",e[e.Closing=4]="Closing",e[e.Opening=8]="Opening",e))(Et||{});function $u(){return w.useContext(zp)}function MC({value:e,children:t}){return A.createElement(zp.Provider,{value:e},t)}function Zue({children:e}){return A.createElement(zp.Provider,{value:null},e)}function Jue(e){function t(){document.readyState!=="loading"&&(e(),document.removeEventListener("DOMContentLoaded",t))}typeof window<"u"&&typeof document<"u"&&(document.addEventListener("DOMContentLoaded",t),t())}let Vr=[];Jue(()=>{function e(t){if(!(t.target instanceof HTMLElement)||t.target===document.body||Vr[0]===t.target)return;let n=t.target;n=n.closest(pd),Vr.unshift(n??t.target),Vr=Vr.filter(r=>r!=null&&r.isConnected),Vr.splice(10)}window.addEventListener("click",e,{capture:!0}),window.addEventListener("mousedown",e,{capture:!0}),window.addEventListener("focus",e,{capture:!0}),document.body.addEventListener("click",e,{capture:!0}),document.body.addEventListener("mousedown",e,{capture:!0}),document.body.addEventListener("focus",e,{capture:!0})});function ece(e){throw new Error("Unexpected object: "+e)}var gt=(e=>(e[e.First=0]="First",e[e.Previous=1]="Previous",e[e.Next=2]="Next",e[e.Last=3]="Last",e[e.Specific=4]="Specific",e[e.Nothing=5]="Nothing",e))(gt||{});function hm(e,t){let n=t.resolveItems();if(n.length<=0)return null;let r=t.resolveActiveIndex(),i=r??-1;switch(e.focus){case 0:{for(let o=0;o<n.length;++o)if(!t.resolveDisabled(n[o],o,n))return o;return r}case 1:{i===-1&&(i=n.length);for(let o=i-1;o>=0;--o)if(!t.resolveDisabled(n[o],o,n))return o;return r}case 2:{for(let o=i+1;o<n.length;++o)if(!t.resolveDisabled(n[o],o,n))return o;return r}case 3:{for(let o=n.length-1;o>=0;--o)if(!t.resolveDisabled(n[o],o,n))return o;return r}case 4:{for(let o=0;o<n.length;++o)if(t.resolveId(n[o],o,n)===e.id)return o;return r}case 5:return null;default:ece(e)}}function IC(e){let t=Q(e),n=w.useRef(!1);w.useEffect(()=>(n.current=!1,()=>{n.current=!0,Lp(()=>{n.current&&t()})}),[t])}function tce(){let e=typeof document>"u";return"useSyncExternalStore"in Rc?(t=>t.useSyncExternalStore)(Rc)(()=>()=>{},()=>!1,()=>!e):!1}function Pu(){let e=tce(),[t,n]=w.useState(Ki.isHandoffComplete);return t&&Ki.isHandoffComplete===!1&&n(!1),w.useEffect(()=>{t!==!0&&n(!0)},[t]),w.useEffect(()=>Ki.handoff(),[]),e?!1:t}let RC=w.createContext(!1);function nce(){return w.useContext(RC)}function qE(e){return A.createElement(RC.Provider,{value:e.force},e.children)}function rce(e){let t=nce(),n=w.useContext(DC),r=Ja(e),[i,o]=w.useState(()=>{var a;if(!t&&n!==null)return(a=n.current)!=null?a:null;if(Ki.isServer)return null;let l=r==null?void 0:r.getElementById("headlessui-portal-root");if(l)return l;if(r===null)return null;let s=r.createElement("div");return s.setAttribute("id","headlessui-portal-root"),r.body.appendChild(s)});return w.useEffect(()=>{i!==null&&(r!=null&&r.body.contains(i)||r==null||r.body.appendChild(i))},[i,r]),w.useEffect(()=>{t||n!==null&&o(n.current)},[n,o,t]),i}let LC=w.Fragment,ice=Ee(function(e,t){let n=e,r=w.useRef(null),i=at(Bse(f=>{r.current=f}),t),o=Ja(r),a=rce(r),[l]=w.useState(()=>{var f;return Ki.isServer?null:(f=o==null?void 0:o.createElement("div"))!=null?f:null}),s=w.useContext(Yg),u=Pu();he(()=>{!a||!l||a.contains(l)||(l.setAttribute("data-headlessui-portal",""),a.appendChild(l))},[a,l]),he(()=>{if(l&&s)return s.register(l)},[s,l]),IC(()=>{var f;!a||!l||(l instanceof Node&&a.contains(l)&&a.removeChild(l),a.childNodes.length<=0&&((f=a.parentElement)==null||f.removeChild(a)))});let c=Re();return u?!a||!l?null:Ut.createPortal(c({ourProps:{ref:i},theirProps:n,slot:{},defaultTag:LC,name:"Portal"}),l):null});function oce(e,t){let n=at(t),{enabled:r=!0,...i}=e,o=Re();return r?A.createElement(ice,{...i,ref:n}):o({ourProps:{ref:n},theirProps:i,slot:{},defaultTag:LC,name:"Portal"})}let ace=w.Fragment,DC=w.createContext(null);function lce(e,t){let{target:n,...r}=e,i={ref:at(t)},o=Re();return A.createElement(DC.Provider,{value:n},o({ourProps:i,theirProps:r,defaultTag:ace,name:"Popover.Group"}))}let Yg=w.createContext(null);function sce(){let e=w.useContext(Yg),t=w.useRef([]),n=Q(o=>(t.current.push(o),e&&e.register(o),()=>r(o))),r=Q(o=>{let a=t.current.indexOf(o);a!==-1&&t.current.splice(a,1),e&&e.unregister(o)}),i=w.useMemo(()=>({register:n,unregister:r,portals:t}),[n,r,t]);return[t,w.useMemo(()=>function({children:o}){return A.createElement(Yg.Provider,{value:i},o)},[i])]}let uce=Ee(oce),FC=Ee(lce),BC=Object.assign(uce,{Group:FC});function cce(e,t=typeof document<"u"?document.defaultView:null,n){let r=Za(e,"escape");PC(t,"keydown",i=>{r&&(i.defaultPrevented||i.key===Ne.Escape&&n(i))})}function fce(){var e;let[t]=w.useState(()=>typeof window<"u"&&typeof window.matchMedia=="function"?window.matchMedia("(pointer: coarse)"):null),[n,r]=w.useState((e=t==null?void 0:t.matches)!=null?e:!1);return he(()=>{if(!t)return;function i(o){r(o.matches)}return t.addEventListener("change",i),()=>t.removeEventListener("change",i)},[t]),n}function dce({defaultContainers:e=[],portals:t,mainTreeNode:n}={}){let r=Ja(n),i=Q(()=>{var o,a;let l=[];for(let s of e)s!==null&&(s instanceof HTMLElement?l.push(s):"current"in s&&s.current instanceof HTMLElement&&l.push(s.current));if(t!=null&&t.current)for(let s of t.current)l.push(s);for(let s of(o=r==null?void 0:r.querySelectorAll("html > *, body > *"))!=null?o:[])s!==document.body&&s!==document.head&&s instanceof HTMLElement&&s.id!=="headlessui-portal-root"&&(n&&(s.contains(n)||s.contains((a=n==null?void 0:n.getRootNode())==null?void 0:a.host))||l.some(u=>s.contains(u))||l.push(s));return l});return{resolveContainers:i,contains:Q(o=>i().some(a=>a.contains(o)))}}let zC=w.createContext(null);function GE({children:e,node:t}){let[n,r]=w.useState(null),i=HC(t??n);return A.createElement(zC.Provider,{value:i},e,i===null&&A.createElement(Pa,{features:oo.Hidden,ref:o=>{var a,l;if(o){for(let s of(l=(a=wi(o))==null?void 0:a.querySelectorAll("html > *, body > *"))!=null?l:[])if(s!==document.body&&s!==document.head&&s instanceof HTMLElement&&s!=null&&s.contains(o)){r(s);break}}}}))}function HC(e=null){var t;return(t=w.useContext(zC))!=null?t:e}function Nx(){let e=w.useRef(!1);return he(()=>(e.current=!0,()=>{e.current=!1}),[]),e}var jl=(e=>(e[e.Forwards=0]="Forwards",e[e.Backwards=1]="Backwards",e))(jl||{});function pce(){let e=w.useRef(0);return OC(!0,"keydown",t=>{t.key==="Tab"&&(e.current=t.shiftKey?1:0)},!0),e}function UC(e){if(!e)return new Set;if(typeof e=="function")return new Set(e());let t=new Set;for(let n of e.current)n.current instanceof HTMLElement&&t.add(n.current);return t}let hce="div";var Ni=(e=>(e[e.None=0]="None",e[e.InitialFocus=1]="InitialFocus",e[e.TabLock=2]="TabLock",e[e.FocusLock=4]="FocusLock",e[e.RestoreFocus=8]="RestoreFocus",e[e.AutoFocus=16]="AutoFocus",e))(Ni||{});function mce(e,t){let n=w.useRef(null),r=at(n,t),{initialFocus:i,initialFocusFallback:o,containers:a,features:l=15,...s}=e;Pu()||(l=0);let u=Ja(n);xce(l,{ownerDocument:u});let c=bce(l,{ownerDocument:u,container:n,initialFocus:i,initialFocusFallback:o});wce(l,{ownerDocument:u,container:n,containers:a,previousActiveElement:c});let f=pce(),d=Q(g=>{let x=n.current;x&&(E=>E())(()=>{jn(f.current,{[jl.Forwards]:()=>{li(x,_t.First,{skipElements:[g.relatedTarget,o]})},[jl.Backwards]:()=>{li(x,_t.Last,{skipElements:[g.relatedTarget,o]})}})})}),p=Za(!!(l&2),"focus-trap#tab-lock"),h=mo(),m=w.useRef(!1),y={ref:r,onKeyDown(g){g.key=="Tab"&&(m.current=!0,h.requestAnimationFrame(()=>{m.current=!1}))},onBlur(g){if(!(l&4))return;let x=UC(a);n.current instanceof HTMLElement&&x.add(n.current);let E=g.relatedTarget;E instanceof HTMLElement&&E.dataset.headlessuiFocusGuard!=="true"&&(WC(x,E)||(m.current?li(n.current,jn(f.current,{[jl.Forwards]:()=>_t.Next,[jl.Backwards]:()=>_t.Previous})|_t.WrapAround,{relativeTo:g.target}):g.target instanceof HTMLElement&&Xn(g.target)))}},v=Re();return A.createElement(A.Fragment,null,p&&A.createElement(Pa,{as:"button",type:"button","data-headlessui-focus-guard":!0,onFocus:d,features:oo.Focusable}),v({ourProps:y,theirProps:s,defaultTag:hce,name:"FocusTrap"}),p&&A.createElement(Pa,{as:"button",type:"button","data-headlessui-focus-guard":!0,onFocus:d,features:oo.Focusable}))}let vce=Ee(mce),gce=Object.assign(vce,{features:Ni});function yce(e=!0){let t=w.useRef(Vr.slice());return Cx(([n],[r])=>{r===!0&&n===!1&&Lp(()=>{t.current.splice(0)}),r===!1&&n===!0&&(t.current=Vr.slice())},[e,Vr,t]),Q(()=>{var n;return(n=t.current.find(r=>r!=null&&r.isConnected))!=null?n:null})}function xce(e,{ownerDocument:t}){let n=!!(e&8),r=yce(n);Cx(()=>{n||(t==null?void 0:t.activeElement)===(t==null?void 0:t.body)&&Xn(r())},[n]),IC(()=>{n&&Xn(r())})}function bce(e,{ownerDocument:t,container:n,initialFocus:r,initialFocusFallback:i}){let o=w.useRef(null),a=Za(!!(e&1),"focus-trap#initial-focus"),l=Nx();return Cx(()=>{if(e===0)return;if(!a){i!=null&&i.current&&Xn(i.current);return}let s=n.current;s&&Lp(()=>{if(!l.current)return;let u=t==null?void 0:t.activeElement;if(r!=null&&r.current){if((r==null?void 0:r.current)===u){o.current=u;return}}else if(s.contains(u)){o.current=u;return}if(r!=null&&r.current)Xn(r.current);else{if(e&16){if(li(s,_t.First|_t.AutoFocus)!==Ys.Error)return}else if(li(s,_t.First)!==Ys.Error)return;if(i!=null&&i.current&&(Xn(i.current),(t==null?void 0:t.activeElement)===i.current))return;console.warn("There are no focusable elements inside the <FocusTrap />")}o.current=t==null?void 0:t.activeElement})},[i,a,e]),o}function wce(e,{ownerDocument:t,container:n,containers:r,previousActiveElement:i}){let o=Nx(),a=!!(e&4);PC(t==null?void 0:t.defaultView,"focus",l=>{if(!a||!o.current)return;let s=UC(r);n.current instanceof HTMLElement&&s.add(n.current);let u=i.current;if(!u)return;let c=l.target;c&&c instanceof HTMLElement?WC(s,c)?(i.current=c,Xn(c)):(l.preventDefault(),l.stopPropagation(),Xn(u)):Xn(i.current)},!0)}function WC(e,t){for(let n of e)if(n.contains(t))return!0;return!1}function VC(e){var t;return!!(e.enter||e.enterFrom||e.enterTo||e.leave||e.leaveFrom||e.leaveTo)||((t=e.as)!=null?t:qC)!==w.Fragment||A.Children.count(e.children)===1}let Hp=w.createContext(null);Hp.displayName="TransitionContext";var _ce=(e=>(e.Visible="visible",e.Hidden="hidden",e))(_ce||{});function Sce(){let e=w.useContext(Hp);if(e===null)throw new Error("A <Transition.Child /> is used but it is missing a parent <Transition /> or <Transition.Root />.");return e}function Ece(){let e=w.useContext(Up);if(e===null)throw new Error("A <Transition.Child /> is used but it is missing a parent <Transition /> or <Transition.Root />.");return e}let Up=w.createContext(null);Up.displayName="NestingContext";function Wp(e){return"children"in e?Wp(e.children):e.current.filter(({el:t})=>t.current!==null).filter(({state:t})=>t==="visible").length>0}function KC(e,t){let n=Rr(e),r=w.useRef([]),i=Nx(),o=mo(),a=Q((p,h=Xr.Hidden)=>{let m=r.current.findIndex(({el:y})=>y===p);m!==-1&&(jn(h,{[Xr.Unmount](){r.current.splice(m,1)},[Xr.Hidden](){r.current[m].state="hidden"}}),o.microTask(()=>{var y;!Wp(r)&&i.current&&((y=n.current)==null||y.call(n))}))}),l=Q(p=>{let h=r.current.find(({el:m})=>m===p);return h?h.state!=="visible"&&(h.state="visible"):r.current.push({el:p,state:"visible"}),()=>a(p,Xr.Unmount)}),s=w.useRef([]),u=w.useRef(Promise.resolve()),c=w.useRef({enter:[],leave:[]}),f=Q((p,h,m)=>{s.current.splice(0),t&&(t.chains.current[h]=t.chains.current[h].filter(([y])=>y!==p)),t==null||t.chains.current[h].push([p,new Promise(y=>{s.current.push(y)})]),t==null||t.chains.current[h].push([p,new Promise(y=>{Promise.all(c.current[h].map(([v,g])=>g)).then(()=>y())})]),h==="enter"?u.current=u.current.then(()=>t==null?void 0:t.wait.current).then(()=>m(h)):m(h)}),d=Q((p,h,m)=>{Promise.all(c.current[h].splice(0).map(([y,v])=>v)).then(()=>{var y;(y=s.current.shift())==null||y()}).then(()=>m(h))});return w.useMemo(()=>({children:r,register:l,unregister:a,onStart:f,onStop:d,wait:u,chains:c}),[l,a,r,f,d,c,u])}let qC=w.Fragment,GC=$a.RenderStrategy;function Oce(e,t){var n,r;let{transition:i=!0,beforeEnter:o,afterEnter:a,beforeLeave:l,afterLeave:s,enter:u,enterFrom:c,enterTo:f,entered:d,leave:p,leaveFrom:h,leaveTo:m,...y}=e,[v,g]=w.useState(null),x=w.useRef(null),E=VC(e),_=at(...E?[x,t,g]:t===null?[]:[t]),S=(n=y.unmount)==null||n?Xr.Unmount:Xr.Hidden,{show:O,appear:$,initial:T}=Sce(),[C,j]=w.useState(O?"visible":"hidden"),N=Ece(),{register:I,unregister:D}=N;he(()=>I(x),[I,x]),he(()=>{if(S===Xr.Hidden&&x.current){if(O&&C!=="visible"){j("visible");return}return jn(C,{hidden:()=>D(x),visible:()=>I(x)})}},[C,x,I,D,O,S]);let M=Pu();he(()=>{if(E&&M&&C==="visible"&&x.current===null)throw new Error("Did you forget to passthrough the `ref` to the actual DOM node?")},[x,C,M,E]);let F=T&&!$,R=$&&O&&T,P=w.useRef(!1),k=KC(()=>{P.current||(j("hidden"),D(x))},N),B=Q(Ce=>{P.current=!0;let Oe=Ce?"enter":"leave";k.onStart(x,Oe,K=>{K==="enter"?o==null||o():K==="leave"&&(l==null||l())})}),L=Q(Ce=>{let Oe=Ce?"enter":"leave";P.current=!1,k.onStop(x,Oe,K=>{K==="enter"?a==null||a():K==="leave"&&(s==null||s())}),Oe==="leave"&&!Wp(k)&&(j("hidden"),D(x))});w.useEffect(()=>{E&&i||(B(O),L(O))},[O,E,i]);let H=!(!i||!E||!M||F),[,V]=jC(H,v,O,{start:B,end:L}),re=Hr({ref:_,className:((r=qg(y.className,R&&u,R&&c,V.enter&&u,V.enter&&V.closed&&c,V.enter&&!V.closed&&f,V.leave&&p,V.leave&&!V.closed&&h,V.leave&&V.closed&&m,!V.transition&&O&&d))==null?void 0:r.trim())||void 0,...TC(V)}),ie=0;C==="visible"&&(ie|=Et.Open),C==="hidden"&&(ie|=Et.Closed),V.enter&&(ie|=Et.Opening),V.leave&&(ie|=Et.Closing);let J=Re();return A.createElement(Up.Provider,{value:k},A.createElement(MC,{value:ie},J({ourProps:re,theirProps:y,defaultTag:qC,features:GC,visible:C==="visible",name:"Transition.Child"})))}function $ce(e,t){let{show:n,appear:r=!1,unmount:i=!0,...o}=e,a=w.useRef(null),l=VC(e),s=at(...l?[a,t]:t===null?[]:[t]);Pu();let u=$u();if(n===void 0&&u!==null&&(n=(u&Et.Open)===Et.Open),n===void 0)throw new Error("A <Transition /> is used but it is missing a `show={true | false}` prop.");let[c,f]=w.useState(n?"visible":"hidden"),d=KC(()=>{n||f("hidden")}),[p,h]=w.useState(!0),m=w.useRef([n]);he(()=>{p!==!1&&m.current[m.current.length-1]!==n&&(m.current.push(n),h(!1))},[m,n]);let y=w.useMemo(()=>({show:n,appear:r,initial:p}),[n,r,p]);he(()=>{n?f("visible"):!Wp(d)&&a.current!==null&&f("hidden")},[n,d]);let v={unmount:i},g=Q(()=>{var _;p&&h(!1),(_=e.beforeEnter)==null||_.call(e)}),x=Q(()=>{var _;p&&h(!1),(_=e.beforeLeave)==null||_.call(e)}),E=Re();return A.createElement(Up.Provider,{value:d},A.createElement(Hp.Provider,{value:y},E({ourProps:{...v,as:w.Fragment,children:A.createElement(XC,{ref:s,...v,...o,beforeEnter:g,beforeLeave:x})},theirProps:{},defaultTag:w.Fragment,features:GC,visible:c==="visible",name:"Transition"})))}function Pce(e,t){let n=w.useContext(Hp)!==null,r=$u()!==null;return A.createElement(A.Fragment,null,!n&&r?A.createElement(Qg,{ref:t,...e}):A.createElement(XC,{ref:t,...e}))}let Qg=Ee($ce),XC=Ee(Oce),Vp=Ee(Pce),Ace=Object.assign(Qg,{Child:Vp,Root:Qg});var Tce=(e=>(e[e.Open=0]="Open",e[e.Closed=1]="Closed",e))(Tce||{}),jce=(e=>(e[e.SetTitleId=0]="SetTitleId",e))(jce||{});let Cce={0(e,t){return e.titleId===t.id?e:{...e,titleId:t.id}}},Mx=w.createContext(null);Mx.displayName="DialogContext";function Kp(e){let t=w.useContext(Mx);if(t===null){let n=new Error(`<${e} /> is missing a parent <Dialog /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(n,Kp),n}return t}function kce(e,t){return jn(t.type,Cce,e,t)}let XE=Ee(function(e,t){let n=w.useId(),{id:r=`headlessui-dialog-${n}`,open:i,onClose:o,initialFocus:a,role:l="dialog",autoFocus:s=!0,__demoMode:u=!1,unmount:c=!1,...f}=e,d=w.useRef(!1);l=function(){return l==="dialog"||l==="alertdialog"?l:(d.current||(d.current=!0,console.warn(`Invalid role [${l}] passed to <Dialog />. Only \`dialog\` and and \`alertdialog\` are supported. Using \`dialog\` instead.`)),"dialog")}();let p=$u();i===void 0&&p!==null&&(i=(p&Et.Open)===Et.Open);let h=w.useRef(null),m=at(h,t),y=Ja(h),v=i?0:1,[g,x]=w.useReducer(kce,{titleId:null,descriptionId:null,panelRef:w.createRef()}),E=Q(()=>o(!1)),_=Q(L=>x({type:0,id:L})),S=Pu()?v===0:!1,[O,$]=sce(),T={get current(){var L;return(L=g.panelRef.current)!=null?L:h.current}},C=HC(),{resolveContainers:j}=dce({mainTreeNode:C,portals:O,defaultContainers:[T]}),N=p!==null?(p&Et.Closing)===Et.Closing:!1;bC(u||N?!1:S,{allowed:Q(()=>{var L,H;return[(H=(L=h.current)==null?void 0:L.closest("[data-headlessui-portal]"))!=null?H:null]}),disallowed:Q(()=>{var L;return[(L=C==null?void 0:C.closest("body > *:not(#headlessui-portal-root)"))!=null?L:null]})}),$C(S,j,L=>{L.preventDefault(),E()}),cce(S,y==null?void 0:y.defaultView,L=>{L.preventDefault(),L.stopPropagation(),document.activeElement&&"blur"in document.activeElement&&typeof document.activeElement.blur=="function"&&document.activeElement.blur(),E()}),AC(u||N?!1:S,y,j),wC(S,h,E);let[I,D]=Eu(),M=w.useMemo(()=>[{dialogState:v,close:E,setTitleId:_,unmount:c},g],[v,g,E,_,c]),F=w.useMemo(()=>({open:v===0}),[v]),R={ref:m,id:r,role:l,tabIndex:-1,"aria-modal":u?void 0:v===0?!0:void 0,"aria-labelledby":g.titleId,"aria-describedby":I,unmount:c},P=!fce(),k=Ni.None;S&&!u&&(k|=Ni.RestoreFocus,k|=Ni.TabLock,s&&(k|=Ni.AutoFocus),P&&(k|=Ni.InitialFocus));let B=Re();return A.createElement(Zue,null,A.createElement(qE,{force:!0},A.createElement(BC,null,A.createElement(Mx.Provider,{value:M},A.createElement(FC,{target:h},A.createElement(qE,{force:!1},A.createElement(D,{slot:F},A.createElement($,null,A.createElement(gce,{initialFocus:a,initialFocusFallback:h,containers:j,features:k},A.createElement(Yse,{value:E},B({ourProps:R,theirProps:f,slot:F,defaultTag:Nce,features:Mce,visible:v===0,name:"Dialog"})))))))))))}),Nce="div",Mce=$a.RenderStrategy|$a.Static;function Ice(e,t){let{transition:n=!1,open:r,...i}=e,o=$u(),a=e.hasOwnProperty("open")||o!==null,l=e.hasOwnProperty("onClose");if(!a&&!l)throw new Error("You have to provide an `open` and an `onClose` prop to the `Dialog` component.");if(!a)throw new Error("You provided an `onClose` prop to the `Dialog`, but forgot an `open` prop.");if(!l)throw new Error("You provided an `open` prop to the `Dialog`, but forgot an `onClose` prop.");if(!o&&typeof e.open!="boolean")throw new Error(`You provided an \`open\` prop to the \`Dialog\`, but the value is not a boolean. Received: ${e.open}`);if(typeof e.onClose!="function")throw new Error(`You provided an \`onClose\` prop to the \`Dialog\`, but the value is not a function. Received: ${e.onClose}`);return(r!==void 0||n)&&!i.static?A.createElement(GE,null,A.createElement(Ace,{show:r,transition:n,unmount:i.unmount},A.createElement(XE,{ref:t,...i}))):A.createElement(GE,null,A.createElement(XE,{ref:t,open:r,...i}))}let Rce="div";function Lce(e,t){let n=w.useId(),{id:r=`headlessui-dialog-panel-${n}`,transition:i=!1,...o}=e,[{dialogState:a,unmount:l},s]=Kp("Dialog.Panel"),u=at(t,s.panelRef),c=w.useMemo(()=>({open:a===0}),[a]),f=Q(y=>{y.stopPropagation()}),d={ref:u,id:r,onClick:f},p=i?Vp:w.Fragment,h=i?{unmount:l}:{},m=Re();return A.createElement(p,{...h},m({ourProps:d,theirProps:o,slot:c,defaultTag:Rce,name:"Dialog.Panel"}))}let Dce="div";function Fce(e,t){let{transition:n=!1,...r}=e,[{dialogState:i,unmount:o}]=Kp("Dialog.Backdrop"),a=w.useMemo(()=>({open:i===0}),[i]),l={ref:t,"aria-hidden":!0},s=n?Vp:w.Fragment,u=n?{unmount:o}:{},c=Re();return A.createElement(s,{...u},c({ourProps:l,theirProps:r,slot:a,defaultTag:Dce,name:"Dialog.Backdrop"}))}let Bce="h2";function zce(e,t){let n=w.useId(),{id:r=`headlessui-dialog-title-${n}`,...i}=e,[{dialogState:o,setTitleId:a}]=Kp("Dialog.Title"),l=at(t);w.useEffect(()=>(a(r),()=>a(null)),[r,a]);let s=w.useMemo(()=>({open:o===0}),[o]),u={ref:l,id:r};return Re()({ourProps:u,theirProps:i,slot:s,defaultTag:Bce,name:"Dialog.Title"})}let Hce=Ee(Ice),YC=Ee(Lce),Uce=Ee(Fce),Wce=Ee(zce),Vce=Object.assign(Hce,{Panel:YC,Title:Wce,Description:vC}),Kce="div";function qce(e,t){let n=`headlessui-control-${w.useId()}`,[r,i]=Ou(),[o,a]=Eu(),l=Su(),{disabled:s=l||!1,...u}=e,c=w.useMemo(()=>({disabled:s}),[s]),f={ref:t,disabled:s||void 0,"aria-disabled":s||void 0},d=Re();return A.createElement(Ese,{value:s},A.createElement(i,{value:r},A.createElement(a,{value:o},A.createElement(Dse,{id:n},d({ourProps:f,theirProps:{...u,children:A.createElement(Mse,null,typeof u.children=="function"?u.children(c):u.children)},slot:c,defaultTag:Kce,name:"Field"})))))}let Gce=Ee(qce);function Xce(e,t){let n=w.useRef({left:0,top:0});if(he(()=>{if(!t)return;let i=t.getBoundingClientRect();i&&(n.current=i)},[e,t]),t==null||!e||t===document.activeElement)return!1;let r=t.getBoundingClientRect();return r.top!==n.current.top||r.left!==n.current.left}let YE=/([\u2700-\u27BF]|[\uE000-\uF8FF]|\uD83C[\uDC00-\uDFFF]|\uD83D[\uDC00-\uDFFF]|[\u2011-\u26FF]|\uD83E[\uDD10-\uDDFF])/g;function QE(e){var t,n;let r=(t=e.innerText)!=null?t:"",i=e.cloneNode(!0);if(!(i instanceof HTMLElement))return r;let o=!1;for(let l of i.querySelectorAll('[hidden],[aria-hidden],[role="img"]'))l.remove(),o=!0;let a=o?(n=i.innerText)!=null?n:"":r;return YE.test(a)&&(a=a.replace(YE,"")),a}function Yce(e){let t=e.getAttribute("aria-label");if(typeof t=="string")return t.trim();let n=e.getAttribute("aria-labelledby");if(n){let r=n.split(" ").map(i=>{let o=document.getElementById(i);if(o){let a=o.getAttribute("aria-label");return typeof a=="string"?a.trim():QE(o).trim()}return null}).filter(Boolean);if(r.length>0)return r.join(", ")}return QE(e).trim()}function Qce(e){let t=w.useRef(""),n=w.useRef("");return Q(()=>{let r=e.current;if(!r)return"";let i=r.innerText;if(t.current===i)return n.current;let o=Yce(r).trim().toLowerCase();return t.current=i,n.current=o,o})}var Zce=(e=>(e[e.Open=0]="Open",e[e.Closed=1]="Closed",e))(Zce||{}),Jce=(e=>(e[e.Pointer=0]="Pointer",e[e.Other=1]="Other",e))(Jce||{}),efe=(e=>(e[e.OpenMenu=0]="OpenMenu",e[e.CloseMenu=1]="CloseMenu",e[e.GoToItem=2]="GoToItem",e[e.Search=3]="Search",e[e.ClearSearch=4]="ClearSearch",e[e.RegisterItem=5]="RegisterItem",e[e.UnregisterItem=6]="UnregisterItem",e[e.SetButtonElement=7]="SetButtonElement",e[e.SetItemsElement=8]="SetItemsElement",e))(efe||{});function mm(e,t=n=>n){let n=e.activeItemIndex!==null?e.items[e.activeItemIndex]:null,r=jx(t(e.items.slice()),o=>o.dataRef.current.domRef.current),i=n?r.indexOf(n):null;return i===-1&&(i=null),{items:r,activeItemIndex:i}}let tfe={1(e){return e.menuState===1?e:{...e,activeItemIndex:null,menuState:1}},0(e){return e.menuState===0?e:{...e,__demoMode:!1,menuState:0}},2:(e,t)=>{var n,r,i,o,a;if(e.menuState===1)return e;let l={...e,searchQuery:"",activationTrigger:(n=t.trigger)!=null?n:1,__demoMode:!1};if(t.focus===gt.Nothing)return{...l,activeItemIndex:null};if(t.focus===gt.Specific)return{...l,activeItemIndex:e.items.findIndex(c=>c.id===t.id)};if(t.focus===gt.Previous){let c=e.activeItemIndex;if(c!==null){let f=e.items[c].dataRef.current.domRef,d=hm(t,{resolveItems:()=>e.items,resolveActiveIndex:()=>e.activeItemIndex,resolveId:p=>p.id,resolveDisabled:p=>p.dataRef.current.disabled});if(d!==null){let p=e.items[d].dataRef.current.domRef;if(((r=f.current)==null?void 0:r.previousElementSibling)===p.current||((i=p.current)==null?void 0:i.previousElementSibling)===null)return{...l,activeItemIndex:d}}}}else if(t.focus===gt.Next){let c=e.activeItemIndex;if(c!==null){let f=e.items[c].dataRef.current.domRef,d=hm(t,{resolveItems:()=>e.items,resolveActiveIndex:()=>e.activeItemIndex,resolveId:p=>p.id,resolveDisabled:p=>p.dataRef.current.disabled});if(d!==null){let p=e.items[d].dataRef.current.domRef;if(((o=f.current)==null?void 0:o.nextElementSibling)===p.current||((a=p.current)==null?void 0:a.nextElementSibling)===null)return{...l,activeItemIndex:d}}}}let s=mm(e),u=hm(t,{resolveItems:()=>s.items,resolveActiveIndex:()=>s.activeItemIndex,resolveId:c=>c.id,resolveDisabled:c=>c.dataRef.current.disabled});return{...l,...s,activeItemIndex:u}},3:(e,t)=>{let n=e.searchQuery!==""?0:1,r=e.searchQuery+t.value.toLowerCase(),i=(e.activeItemIndex!==null?e.items.slice(e.activeItemIndex+n).concat(e.items.slice(0,e.activeItemIndex+n)):e.items).find(a=>{var l;return((l=a.dataRef.current.textValue)==null?void 0:l.startsWith(r))&&!a.dataRef.current.disabled}),o=i?e.items.indexOf(i):-1;return o===-1||o===e.activeItemIndex?{...e,searchQuery:r}:{...e,searchQuery:r,activeItemIndex:o,activationTrigger:1}},4(e){return e.searchQuery===""?e:{...e,searchQuery:"",searchActiveItemIndex:null}},5:(e,t)=>{let n=mm(e,r=>[...r,{id:t.id,dataRef:t.dataRef}]);return{...e,...n}},6:(e,t)=>{let n=mm(e,r=>{let i=r.findIndex(o=>o.id===t.id);return i!==-1&&r.splice(i,1),r});return{...e,...n,activationTrigger:1}},7:(e,t)=>e.buttonElement===t.element?e:{...e,buttonElement:t.element},8:(e,t)=>e.itemsElement===t.element?e:{...e,itemsElement:t.element}},Ix=w.createContext(null);Ix.displayName="MenuContext";function qp(e){let t=w.useContext(Ix);if(t===null){let n=new Error(`<${e} /> is missing a parent <Menu /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(n,qp),n}return t}function nfe(e,t){return jn(t.type,tfe,e,t)}let rfe=w.Fragment;function ife(e,t){let{__demoMode:n=!1,...r}=e,i=w.useReducer(nfe,{__demoMode:n,menuState:n?0:1,buttonElement:null,itemsElement:null,items:[],searchQuery:"",activeItemIndex:null,activationTrigger:1}),[{menuState:o,itemsElement:a,buttonElement:l},s]=i,u=at(t);$C(o===0,[l,a],(h,m)=>{s({type:1}),Tx(m,Ax.Loose)||(h.preventDefault(),l==null||l.focus())});let c=Q(()=>{s({type:1})}),f=w.useMemo(()=>({open:o===0,close:c}),[o,c]),d={ref:u},p=Re();return A.createElement(Xue,null,A.createElement(Ix.Provider,{value:i},A.createElement(MC,{value:jn(o,{0:Et.Open,1:Et.Closed})},p({ourProps:d,theirProps:r,slot:f,defaultTag:rfe,name:"Menu"}))))}let ofe="button";function afe(e,t){var n;let r=w.useId(),{id:i=`headlessui-menu-button-${r}`,disabled:o=!1,autoFocus:a=!1,...l}=e,[s,u]=qp("Menu.Button"),c=Kue(),f=at(t,Vue(),Q(O=>u({type:7,element:O}))),d=Q(O=>{switch(O.key){case Ne.Space:case Ne.Enter:case Ne.ArrowDown:O.preventDefault(),O.stopPropagation(),Ut.flushSync(()=>u({type:0})),u({type:2,focus:gt.First});break;case Ne.ArrowUp:O.preventDefault(),O.stopPropagation(),Ut.flushSync(()=>u({type:0})),u({type:2,focus:gt.Last});break}}),p=Q(O=>{switch(O.key){case Ne.Space:O.preventDefault();break}}),h=Q(O=>{var $;if($x(O.currentTarget))return O.preventDefault();o||(s.menuState===0?(Ut.flushSync(()=>u({type:1})),($=s.buttonElement)==null||$.focus({preventScroll:!0})):(O.preventDefault(),u({type:0})))}),{isFocusVisible:m,focusProps:y}=Ox({autoFocus:a}),{isHovered:v,hoverProps:g}=Ex({isDisabled:o}),{pressed:x,pressProps:E}=Sse({disabled:o}),_=w.useMemo(()=>({open:s.menuState===0,active:x||s.menuState===0,disabled:o,hover:v,focus:m,autofocus:a}),[s,v,m,x,o,a]),S=Dp(c(),{ref:f,id:i,type:due(e,s.buttonElement),"aria-haspopup":"menu","aria-controls":(n=s.itemsElement)==null?void 0:n.id,"aria-expanded":s.menuState===0,disabled:o||void 0,autoFocus:a,onKeyDown:d,onKeyUp:p,onClick:h},y,g,E);return Re()({ourProps:S,theirProps:l,slot:_,defaultTag:ofe,name:"Menu.Button"})}let lfe="div",sfe=$a.RenderStrategy|$a.Static;function ufe(e,t){var n,r;let i=w.useId(),{id:o=`headlessui-menu-items-${i}`,anchor:a,portal:l=!1,modal:s=!0,transition:u=!1,...c}=e,f=Wue(a),[d,p]=qp("Menu.Items"),[h,m]=Gue(f),y=que(),[v,g]=w.useState(null),x=at(t,f?h:null,Q(P=>p({type:8,element:P})),g),E=Ja(d.itemsElement);f&&(l=!0);let _=$u(),[S,O]=jC(u,v,_!==null?(_&Et.Open)===Et.Open:d.menuState===0);wC(S,d.buttonElement,()=>{p({type:1})});let $=d.__demoMode?!1:s&&d.menuState===0;AC($,E);let T=d.__demoMode?!1:s&&d.menuState===0;bC(T,{allowed:w.useCallback(()=>[d.buttonElement,d.itemsElement],[d.buttonElement,d.itemsElement])});let C=d.menuState!==0,j=Xce(C,d.buttonElement)?!1:S;w.useEffect(()=>{let P=d.itemsElement;P&&d.menuState===0&&P!==(E==null?void 0:E.activeElement)&&P.focus({preventScroll:!0})},[d.menuState,d.itemsElement,E]),Oue(d.menuState===0,{container:d.itemsElement,accept(P){return P.getAttribute("role")==="menuitem"?NodeFilter.FILTER_REJECT:P.hasAttribute("role")?NodeFilter.FILTER_SKIP:NodeFilter.FILTER_ACCEPT},walk(P){P.setAttribute("role","none")}});let N=mo(),I=Q(P=>{var k,B,L;switch(N.dispose(),P.key){case Ne.Space:if(d.searchQuery!=="")return P.preventDefault(),P.stopPropagation(),p({type:3,value:P.key});case Ne.Enter:if(P.preventDefault(),P.stopPropagation(),p({type:1}),d.activeItemIndex!==null){let{dataRef:H}=d.items[d.activeItemIndex];(B=(k=H.current)==null?void 0:k.domRef.current)==null||B.click()}SC(d.buttonElement);break;case Ne.ArrowDown:return P.preventDefault(),P.stopPropagation(),p({type:2,focus:gt.Next});case Ne.ArrowUp:return P.preventDefault(),P.stopPropagation(),p({type:2,focus:gt.Previous});case Ne.Home:case Ne.PageUp:return P.preventDefault(),P.stopPropagation(),p({type:2,focus:gt.First});case Ne.End:case Ne.PageDown:return P.preventDefault(),P.stopPropagation(),p({type:2,focus:gt.Last});case Ne.Escape:P.preventDefault(),P.stopPropagation(),Ut.flushSync(()=>p({type:1})),(L=d.buttonElement)==null||L.focus({preventScroll:!0});break;case Ne.Tab:P.preventDefault(),P.stopPropagation(),Ut.flushSync(()=>p({type:1})),uue(d.buttonElement,P.shiftKey?_t.Previous:_t.Next);break;default:P.key.length===1&&(p({type:3,value:P.key}),N.setTimeout(()=>p({type:4}),350));break}}),D=Q(P=>{switch(P.key){case Ne.Space:P.preventDefault();break}}),M=w.useMemo(()=>({open:d.menuState===0}),[d.menuState]),F=Dp(f?y():{},{"aria-activedescendant":d.activeItemIndex===null||(n=d.items[d.activeItemIndex])==null?void 0:n.id,"aria-labelledby":(r=d.buttonElement)==null?void 0:r.id,id:o,onKeyDown:I,onKeyUp:D,role:"menu",tabIndex:d.menuState===0?0:void 0,ref:x,style:{...c.style,...m,"--button-width":eue(d.buttonElement,!0).width},...TC(O)}),R=Re();return A.createElement(BC,{enabled:l?e.static||S:!1},R({ourProps:F,theirProps:c,slot:M,defaultTag:lfe,features:sfe,visible:j,name:"Menu.Items"}))}let cfe=w.Fragment;function ffe(e,t){let n=w.useId(),{id:r=`headlessui-menu-item-${n}`,disabled:i=!1,...o}=e,[a,l]=qp("Menu.Item"),s=a.activeItemIndex!==null?a.items[a.activeItemIndex].id===r:!1,u=w.useRef(null),c=at(t,u);he(()=>{if(!a.__demoMode&&a.menuState===0&&s&&a.activationTrigger!==0)return er().requestAnimationFrame(()=>{var j,N;(N=(j=u.current)==null?void 0:j.scrollIntoView)==null||N.call(j,{block:"nearest"})})},[a.__demoMode,u,s,a.menuState,a.activationTrigger,a.activeItemIndex]);let f=Qce(u),d=w.useRef({disabled:i,domRef:u,get textValue(){return f()}});he(()=>{d.current.disabled=i},[d,i]),he(()=>(l({type:5,id:r,dataRef:d}),()=>l({type:6,id:r})),[d,r]);let p=Q(()=>{l({type:1})}),h=Q(j=>{if(i)return j.preventDefault();l({type:1}),SC(a.buttonElement)}),m=Q(()=>{if(i)return l({type:2,focus:gt.Nothing});l({type:2,focus:gt.Specific,id:r})}),y=yue(),v=Q(j=>{y.update(j),!i&&(s||l({type:2,focus:gt.Specific,id:r,trigger:0}))}),g=Q(j=>{y.wasMoved(j)&&(i||s||l({type:2,focus:gt.Specific,id:r,trigger:0}))}),x=Q(j=>{y.wasMoved(j)&&(i||s&&l({type:2,focus:gt.Nothing}))}),[E,_]=Ou(),[S,O]=Eu(),$=w.useMemo(()=>({active:s,focus:s,disabled:i,close:p}),[s,i,p]),T={id:r,ref:c,role:"menuitem",tabIndex:i===!0?void 0:-1,"aria-disabled":i===!0?!0:void 0,"aria-labelledby":E,"aria-describedby":S,disabled:void 0,onClick:h,onFocus:m,onPointerEnter:v,onMouseEnter:v,onPointerMove:g,onMouseMove:g,onPointerLeave:x,onMouseLeave:x},C=Re();return A.createElement(_,null,A.createElement(O,null,C({ourProps:T,theirProps:o,slot:$,defaultTag:cfe,name:"Menu.Item"})))}let dfe="div";function pfe(e,t){let[n,r]=Ou(),i=e,o={ref:t,"aria-labelledby":n,role:"group"},a=Re();return A.createElement(r,null,a({ourProps:o,theirProps:i,slot:{},defaultTag:dfe,name:"Menu.Section"}))}let hfe="header";function mfe(e,t){let n=w.useId(),{id:r=`headlessui-menu-heading-${n}`,...i}=e,o=Px();he(()=>o.register(r),[r,o.register]);let a={id:r,ref:t,role:"presentation",...o.props};return Re()({ourProps:a,theirProps:i,slot:{},defaultTag:hfe,name:"Menu.Heading"})}let vfe="div";function gfe(e,t){let n=e,r={ref:t,role:"separator"};return Re()({ourProps:r,theirProps:n,slot:{},defaultTag:vfe,name:"Menu.Separator"})}let yfe=Ee(ife),QC=Ee(afe),ZC=Ee(ufe),JC=Ee(ffe),xfe=Ee(pfe),bfe=Ee(mfe),wfe=Ee(gfe),_fe=Object.assign(yfe,{Button:QC,Items:ZC,Item:JC,Section:xfe,Heading:bfe,Separator:wfe});var Sfe=(e=>(e[e.RegisterOption=0]="RegisterOption",e[e.UnregisterOption=1]="UnregisterOption",e))(Sfe||{});let Efe={0(e,t){let n=[...e.options,{id:t.id,element:t.element,propsRef:t.propsRef}];return{...e,options:jx(n,r=>r.element.current)}},1(e,t){let n=e.options.slice(),r=e.options.findIndex(i=>i.id===t.id);return r===-1?e:(n.splice(r,1),{...e,options:n})}},Rx=w.createContext(null);Rx.displayName="RadioGroupDataContext";function Lx(e){let t=w.useContext(Rx);if(t===null){let n=new Error(`<${e} /> is missing a parent <RadioGroup /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(n,Lx),n}return t}let Dx=w.createContext(null);Dx.displayName="RadioGroupActionsContext";function Fx(e){let t=w.useContext(Dx);if(t===null){let n=new Error(`<${e} /> is missing a parent <RadioGroup /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(n,Fx),n}return t}function Ofe(e,t){return jn(t.type,Efe,e,t)}let $fe="div";function Pfe(e,t){let n=w.useId(),r=Su(),{id:i=`headlessui-radiogroup-${n}`,value:o,form:a,name:l,onChange:s,by:u,disabled:c=r||!1,defaultValue:f,...d}=e,p=Zse(u),[h,m]=w.useReducer(Ofe,{options:[]}),y=h.options,[v,g]=Ou(),[x,E]=Eu(),_=w.useRef(null),S=at(_,t),O=jse(f),[$,T]=Tse(o,s,O),C=w.useMemo(()=>y.find(L=>!L.propsRef.current.disabled),[y]),j=w.useMemo(()=>y.some(L=>p(L.propsRef.current.value,$)),[y,$]),N=Q(L=>{var H;if(c||p(L,$))return!1;let V=(H=y.find(re=>p(re.propsRef.current.value,L)))==null?void 0:H.propsRef.current;return V!=null&&V.disabled?!1:(T==null||T(L),!0)}),I=Q(L=>{let H=_.current;if(!H)return;let V=wi(H),re=y.filter(ie=>ie.propsRef.current.disabled===!1).map(ie=>ie.element.current);switch(L.key){case Ne.Enter:Cse(L.currentTarget);break;case Ne.ArrowLeft:case Ne.ArrowUp:if(L.preventDefault(),L.stopPropagation(),li(re,_t.Previous|_t.WrapAround)===Ys.Success){let ie=y.find(J=>J.element.current===(V==null?void 0:V.activeElement));ie&&N(ie.propsRef.current.value)}break;case Ne.ArrowRight:case Ne.ArrowDown:if(L.preventDefault(),L.stopPropagation(),li(re,_t.Next|_t.WrapAround)===Ys.Success){let ie=y.find(J=>J.element.current===(V==null?void 0:V.activeElement));ie&&N(ie.propsRef.current.value)}break;case Ne.Space:{L.preventDefault(),L.stopPropagation();let ie=y.find(J=>J.element.current===(V==null?void 0:V.activeElement));ie&&N(ie.propsRef.current.value)}break}}),D=Q(L=>(m({type:0,...L}),()=>m({type:1,id:L.id}))),M=w.useMemo(()=>({value:$,firstOption:C,containsCheckedOption:j,disabled:c,compare:p,...h}),[$,C,j,c,p,h]),F=w.useMemo(()=>({registerOption:D,change:N}),[D,N]),R={ref:S,id:i,role:"radiogroup","aria-labelledby":v,"aria-describedby":x,onKeyDown:I},P=w.useMemo(()=>({value:$}),[$]),k=w.useCallback(()=>{if(O!==void 0)return N(O)},[N,O]),B=Re();return A.createElement(E,{name:"RadioGroup.Description"},A.createElement(g,{name:"RadioGroup.Label"},A.createElement(Dx.Provider,{value:F},A.createElement(Rx.Provider,{value:M},l!=null&&A.createElement(Rse,{disabled:c,data:{[l]:$||"on"},overrides:{type:"radio",checked:$!=null},form:a,onReset:k}),B({ourProps:R,theirProps:d,slot:P,defaultTag:$fe,name:"RadioGroup"})))))}let Afe="div";function Tfe(e,t){var n;let r=Lx("RadioGroup.Option"),i=Fx("RadioGroup.Option"),o=w.useId(),{id:a=`headlessui-radiogroup-option-${o}`,value:l,disabled:s=r.disabled||!1,autoFocus:u=!1,...c}=e,f=w.useRef(null),d=at(f,t),[p,h]=Ou(),[m,y]=Eu(),v=Rr({value:l,disabled:s});he(()=>i.registerOption({id:a,element:f,propsRef:v}),[a,i,f,v]);let g=Q(N=>{var I;if($x(N.currentTarget))return N.preventDefault();i.change(l)&&((I=f.current)==null||I.focus())}),x=((n=r.firstOption)==null?void 0:n.id)===a,{isFocusVisible:E,focusProps:_}=Ox({autoFocus:u}),{isHovered:S,hoverProps:O}=Ex({isDisabled:s}),$=r.compare(r.value,l),T=Dp({ref:d,id:a,role:"radio","aria-checked":$?"true":"false","aria-labelledby":p,"aria-describedby":m,"aria-disabled":s?!0:void 0,tabIndex:s?-1:$||!r.containsCheckedOption&&x?0:-1,onClick:s?void 0:g,autoFocus:u},_,O),C=w.useMemo(()=>({checked:$,disabled:s,active:E,hover:S,focus:E,autofocus:u}),[$,s,S,E,u]),j=Re();return A.createElement(y,{name:"RadioGroup.Description"},A.createElement(h,{name:"RadioGroup.Label"},j({ourProps:T,theirProps:c,slot:C,defaultTag:Afe,name:"RadioGroup.Option"})))}let jfe="span";function Cfe(e,t){var n;let r=Lx("Radio"),i=Fx("Radio"),o=w.useId(),a=pC(),l=Su(),{id:s=a||`headlessui-radio-${o}`,value:u,disabled:c=r.disabled||l||!1,autoFocus:f=!1,...d}=e,p=w.useRef(null),h=at(p,t),m=gC(),y=zse(),v=Rr({value:u,disabled:c});he(()=>i.registerOption({id:s,element:p,propsRef:v}),[s,i,p,v]);let g=Q(j=>{var N;if($x(j.currentTarget))return j.preventDefault();i.change(u)&&((N=p.current)==null||N.focus())}),{isFocusVisible:x,focusProps:E}=Ox({autoFocus:f}),{isHovered:_,hoverProps:S}=Ex({isDisabled:c}),O=((n=r.firstOption)==null?void 0:n.id)===s,$=r.compare(r.value,u),T=Dp({ref:h,id:s,role:"radio","aria-checked":$?"true":"false","aria-labelledby":m,"aria-describedby":y,"aria-disabled":c?!0:void 0,tabIndex:c?-1:$||!r.containsCheckedOption&&O?0:-1,autoFocus:f,onClick:c?void 0:g},E,S),C=w.useMemo(()=>({checked:$,disabled:c,hover:_,focus:x,autofocus:f}),[$,c,_,x,f]);return Re()({ourProps:T,theirProps:d,slot:C,defaultTag:jfe,name:"Radio"})}let kfe=Ee(Pfe),Nfe=Ee(Tfe),ek=Ee(Cfe),Mfe=Gse,Ife=vC,Rfe=Object.assign(kfe,{Option:Nfe,Radio:ek,Label:Mfe,Description:Ife});const Bx=({items:e,selectedItem:t,onItemSelect:n,size:r="sm"})=>b.jsx("div",{className:"relative h-full",children:b.jsxs(_fe,{children:[b.jsxs(QC,{className:`inline-flex h-full w-48 justify-between items-center gap-x-1.5 rounded-md bg-white px-3 text-${r} font-medium text-gray-900 shadow-sm ring-1 ring-gray-300 hover:bg-gray-50`,children:[t,b.jsx(DP,{className:"size-4 text-gray-400","aria-hidden":"true"})]}),b.jsx(ZC,{className:"absolute right-0 z-10 mt-2 w-48 origin-top-right rounded-md bg-white shadow-lg ring-1 ring-black/5 focus:outline-none",children:b.jsx("div",{className:"py-1",children:e.map(i=>b.jsx(JC,{children:b.jsx("button",{onClick:()=>n(i),className:`block w-full px-4 py-2 text-left text-${r} data-[focus]:bg-gray-100 data-[focus]:text-gray-900 text-gray-700`,children:i})},i))})})]})}),Lfe=({items:e,selectedItem:t,onItemSelect:n,size:r="sm"})=>b.jsx(Rfe,{value:t,onChange:n,className:`inline-flex justify-between items-center rounded-md bg-white text-${r} font-medium text-gray-900 shadow-sm ring-1 ring-gray-300`,children:e.map(i=>b.jsx(Gce,{className:"flex h-full first:rounded-l-md last:rounded-r-md overflow-hidden",children:b.jsx(ek,{value:i,className:"cursor-pointer h-full data-[checked]:bg-gray-200 hover:bg-gray-50 flex items-center px-4 shadow-sm",children:i})},i))});function Dfe({onSearch:e}){return b.jsxs("div",{className:"relative w-full md:w-[26rem] rounded-md",children:[b.jsx("div",{className:"absolute inset-y-0 left-0 pl-3 flex items-center pointer-events-none",children:b.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",className:"w-5 h-5 text-gray-400",children:b.jsx("path",{fillRule:"evenodd",d:"M9 3.5a5.5 5.5 0 100 11 5.5 5.5 0 000-11zM2 9a7 7 0 1112.452 4.391l3.328 3.329a.75.75 0 11-1.06 1.06l-3.329-3.328A7 7 0 012 9z",clipRule:"evenodd"})})}),b.jsx("input",{type:"text",className:"block w-full pl-10 px-3 py-3 text-sm font-medium text-gray-900 shadow-sm rounded-md hover:bg-gray-50 outline outline-1 -outline-offset-1 outline-gray-300 placeholder:text-gray-400 focus:outline focus:outline-2 focus:-outline-offset-2 focus:outline-blue-600 w-",placeholder:"Search features...",onChange:t=>e(t.target.value)})]})}const Ffe=({features:e})=>{const[t,n]=w.useState("All Teams"),[r,i]=w.useState(""),o=w.useMemo(()=>{const l=new Set;return l.add("All Teams"),Object.values(e).forEach(s=>{var u;(u=s.assignments)!=null&&u.teams&&s.assignments.teams.forEach(c=>l.add(c))}),Array.from(l)},[e]),a=w.useMemo(()=>t==="All Teams"?e:Object.fromEntries(Object.entries(e).filter(([l,s])=>{var u,c;return(c=(u=s.assignments)==null?void 0:u.teams)==null?void 0:c.includes(t)})),[e,t]);return Object.entries(e).length,o.length-1,b.jsxs("div",{className:"h-screen max-w-7xl mx-auto flex flex-col gap-8 p-4 md:p-8",children:[b.jsxs("div",{className:"flex justify-between items-center",children:[b.jsx("h1",{className:"text-2xl font-bold text-gray-800",children:"Dashboard"}),b.jsx(Bx,{items:o,selectedItem:t,onItemSelect:n})]}),b.jsx("div",{children:b.jsxs("ul",{className:"grid grid-cols-1 md:grid-cols-2 xl:grid-cols-3 gap-6",children:[b.jsx("li",{className:"px-4 py-6 border border-gray-200 shadow-sm bg-white rounded-lg",children:b.jsx(Zle,{features:a})}),b.jsx("li",{className:"px-4 py-6 border border-gray-200 shadow-sm bg-white rounded-lg",children:b.jsx(Jle,{features:a})}),b.jsx("li",{className:"px-4 py-6 border border-gray-200 shadow-sm bg-white rounded-lg",children:b.jsx(ese,{features:a})})]})}),b.jsxs("div",{className:"flex-1 flex flex-col gap-6 h-full overflow-scroll",children:[b.jsxs("div",{className:"flex items-center justify-between gap-12",children:[b.jsxs("div",{className:"flex items-center gap-2",children:[b.jsx(Zi,{className:"w-5 h-5 text-gray-600","aria-hidden":"true"}),b.jsxs("span",{className:"text-sm text-gray-600 font-medium",children:["Features: ",Object.entries(a).length]})]}),b.jsx("div",{children:b.jsx(Dfe,{onSearch:i})})]}),b.jsx(tse,{features:a,searchTerm:r,teamContext:t!=="All Teams"?t:null})]})]})},Bfe=({features:e})=>{const t=Object.values(e).reduce((r,i)=>{const o=i.additional_metrics.health.overall;if(o!=null){const a=Yj(o);r[a]++}return r},{needsAttention:0,needsImprovement:0,healthy:0}),n=Object.entries(t).map(([r,i],o)=>({name:r,value:i,fill:[wt(rt.needsAttention).hex,wt(rt.needsImprovement).hex,wt(rt.healthy).hex][o]})).filter(({value:r})=>r>0);return b.jsxs("div",{className:"flex flex-col gap-6",children:[b.jsxs("div",{className:"flex items-center justify-between",children:[b.jsxs("h3",{className:"flex items-center text-xs font-medium text-gray-600 uppercase",children:[b.jsx("div",{className:"flex-shrink-0 bg-gray-100 rounded-md h-8 w-8 flex items-center justify-center",children:b.jsx(r0,{className:"size-5"})}),b.jsx("span",{className:"flex pl-2",children:"Health Score"})]}),b.jsxs("div",{className:"relative flex-shrink-0 group",children:[b.jsx(mi,{className:"size-4 text-gray-400"}),b.jsx("div",{className:"absolute whitespace-wrap bottom-full left-1/2 transform -translate-x-1/2 mb-2 hidden group-hover:block bg-gray-700 text-white text-xs rounded py-1 px-2 w-48",children:"Health Score distribution by category: shows how many features fall into each level from low (needs attention) to good (healthy)"})]})]}),b.jsxs("div",{className:"flex flex-col items-center gap-6",children:[b.jsx("div",{className:"relative size-48",children:b.jsx(Wa,{width:"100%",height:"100%",children:b.jsx(mu,{children:b.jsx(Xt,{data:n,dataKey:"value",nameKey:"name",innerRadius:"70%",outerRadius:"100%",paddingAngle:2})})})}),b.jsxs("ul",{className:"flex flex-col flex-1 gap-y-2",children:[b.jsxs("li",{className:"flex items-center gap-x-2",children:[b.jsx("div",{className:`flex-shrink-0 rounded size-6 flex items-center justify-center ${wt(rt.needsAttention).class}`,children:b.jsx("span",{className:"font-semibold text-white text-sm",children:t.needsAttention})}),b.jsx("p",{className:"text-sm text-gray-500",children:"Features needing attention"})]}),b.jsxs("li",{className:"flex items-center gap-x-2",children:[b.jsx("div",{className:`flex-shrink-0 rounded size-6 flex items-center justify-center ${wt(rt.needsImprovement).class}`,children:b.jsx("span",{className:"font-semibold text-white text-sm",children:t.needsImprovement})}),b.jsx("p",{className:"text-sm text-gray-500",children:"Features needing improvement"})]}),b.jsxs("li",{className:"flex items-center gap-x-2",children:[b.jsx("div",{className:`flex-shrink-0 rounded size-6 flex items-center justify-center ${wt(rt.healthy).class}`,children:b.jsx("span",{className:"font-semibold text-white text-sm",children:t.healthy})}),b.jsx("p",{className:"text-sm text-gray-500",children:"Healthy Features"})]})]})]})]})},zfe=({features:e})=>{const t=Object.values(e).reduce((i,o)=>{const a=o.additional_metrics.test_coverage.score;if(a!=null){const l=bj(a);i[l]++}return i},{poor:0,fair:0,good:0}),{minimum_thresholds:n}=hi.project.documentation_site.test_coverage,r=Object.entries(t).map(([i,o],a)=>({name:i,value:o,fill:[bt(n.poor).hex,bt(n.fair).hex,bt(n.good).hex][a]})).filter(({value:i})=>i>0);return b.jsxs("div",{className:"flex flex-col gap-6",children:[b.jsxs("div",{className:"flex items-center justify-between",children:[b.jsxs("h3",{className:"flex items-center text-xs font-medium text-gray-600 uppercase",children:[b.jsx("div",{className:"flex-shrink-0 bg-gray-100 rounded-md h-8 w-8 flex items-center justify-center",children:b.jsx(n0,{className:"size-5"})}),b.jsx("span",{className:"flex pl-2",children:"Test Coverage"})]}),b.jsxs("div",{className:"relative flex-shrink-0 group",children:[b.jsx(mi,{className:"size-4 text-gray-400"}),b.jsx("div",{className:"absolute whitespace-wrap bottom-full left-1/2 transform -translate-x-1/2 mb-2 hidden group-hover:block bg-gray-700 text-white text-xs rounded py-1 px-2 w-48",children:"Test Coverage distribution by category: shows how many features fall into each level from poor to good"})]})]}),b.jsxs("div",{className:"flex flex-col items-center gap-6",children:[b.jsx("div",{className:"relative size-48",children:b.jsx(Wa,{width:"100%",height:"100%",children:b.jsx(mu,{children:b.jsx(Xt,{data:r,dataKey:"value",nameKey:"name",innerRadius:"70%",outerRadius:"100%",paddingAngle:2})})})}),b.jsxs("ul",{className:"flex flex-col flex-1 gap-y-2",children:[b.jsxs("li",{className:"flex items-center gap-x-2",children:[b.jsx("div",{className:`flex-shrink-0 rounded size-6 flex items-center justify-center ${bt(n.poor).class}`,children:b.jsx("span",{className:"font-semibold text-white text-sm",children:t.poor})}),b.jsxs("p",{className:"text-sm text-gray-500",children:[b.jsx("span",{className:"",children:"Features with"})," poor coverage"]})]}),b.jsxs("li",{className:"flex items-center gap-x-2",children:[b.jsx("div",{className:`flex-shrink-0 rounded size-6 flex items-center justify-center ${bt(n.fair).class}`,children:b.jsx("span",{className:"font-semibold text-white text-sm",children:t.fair})}),b.jsxs("p",{className:"text-sm text-gray-500",children:[b.jsx("span",{className:"",children:"Features with"})," fair coverage"]})]}),b.jsxs("li",{className:"flex items-center gap-x-2",children:[b.jsx("div",{className:`flex-shrink-0 rounded size-6 flex items-center justify-center ${bt(n.good).class}`,children:b.jsx("span",{className:"font-semibold text-white text-sm",children:t.good})}),b.jsxs("p",{className:"text-sm text-gray-500",children:[b.jsx("span",{className:"",children:"Features with"})," good coverage"]})]})]})]})]})},Hfe=({features:e})=>{const t=Object.entries(e).reduce((r,[i,o])=>{const{integration_count:a,integration_pending:l,regression_count:s,regression_pending:u,unit_count:c,unit_pending:f}=o.test_pyramid||{};return{unit_count:r.unit_count+(c||0),unit_pending:r.unit_pending+(f||0),integration_count:r.integration_count+(a||0),integration_pending:r.integration_pending+(l||0),regression_count:r.regression_count+(s||0),regression_pending:r.regression_pending+(u||0)}},{unit_count:0,unit_pending:0,integration_count:0,integration_pending:0,regression_count:0,regression_pending:0}),n=[{value:Math.max(Math.log(t.unit_count+t.unit_pending),0),fill:"#1d4ed8"},{value:Math.max(Math.log(t.integration_count+t.integration_pending),0),fill:"#2563eb"},{value:Math.max(Math.log(t.regression_count+t.regression_pending),0),fill:"#3b82f6"}];return b.jsxs("div",{className:"flex flex-col gap-6",children:[b.jsxs("div",{className:"flex items-center justify-between",children:[b.jsxs("h3",{className:"flex items-center text-xs font-medium text-gray-600 uppercase",children:[b.jsx("div",{className:"flex-shrink-0 bg-gray-100 rounded-md h-8 w-8 flex items-center justify-center",children:b.jsx(VR,{className:"size-5"})}),b.jsx("span",{className:"flex pl-2",children:"Test Pyramid"})]}),b.jsxs("div",{className:"relative flex-shrink-0 group",children:[b.jsx(mi,{className:"size-4 text-gray-400"}),b.jsx("div",{className:"absolute whitespace-wrap bottom-full left-1/2 transform -translate-x-1/2 mb-2 hidden group-hover:block bg-gray-700 text-white text-xs rounded py-1 px-2 w-48",children:"Test pyramid distribution by category: shows features which are missing coverage in a given level of the pyramid, or which have a large number of pending tests."})]})]}),b.jsxs("div",{className:"flex flex-col items-center gap-6",children:[b.jsx("div",{className:"relative h-48 w-72",children:b.jsx(Wa,{width:"100%",height:"100%",children:b.jsx(fae,{width:730,height:250,children:b.jsx(bi,{dataKey:"value",data:n,reversed:!0,children:b.jsx(yr,{position:"right",fill:"#000",stroke:"none",dataKey:"name"})})})})}),b.jsxs("ul",{className:"flex flex-col flex-1 gap-y-2",children:[b.jsxs("li",{className:"flex items-center gap-x-2",children:[b.jsx("div",{className:"flex-shrink-0 rounded h-6 w-16 size-x-12 flex items-center justify-center bg-blue-500",children:b.jsx("span",{className:"font-semibold text-white text-sm",children:t.regression_count})}),b.jsxs("p",{className:"text-sm text-gray-500",children:["Regression Tests (",t.regression_pending," pending)"]})]}),b.jsxs("li",{className:"flex items-center gap-x-2",children:[b.jsx("div",{className:"flex-shrink-0 rounded h-6 w-16 flex items-center justify-center bg-blue-600",children:b.jsx("span",{className:"font-semibold text-white text-sm",children:t.integration_count})}),b.jsxs("p",{className:"text-sm text-gray-500",children:["Integration Tests (",t.integration_pending," pending)"]})]}),b.jsxs("li",{className:"flex items-center gap-x-2",children:[b.jsx("div",{className:"flex-shrink-0 rounded h-6 w-16 flex items-center justify-center bg-blue-700",children:b.jsx("span",{className:"font-semibold text-white text-sm",children:t.unit_count})}),b.jsxs("p",{className:"text-sm text-gray-500",children:["Unit Tests (",t.unit_pending," pending)"]})]})]})]})]})},pc=({title:e})=>b.jsx("th",{scope:"col",className:"px-4 py-3 text-left text-xs font-medium text-gray-800 uppercase tracking-wider",children:b.jsx("div",{className:"flex items-center gap-x-2",children:e})}),ZE=({features:e,metric:t,sortDirection:n="ASC"})=>Object.entries(e).sort(([r,i],[o,a])=>{const l=i.test_pyramid&&i.test_pyramid[t]||0,s=a.test_pyramid&&a.test_pyramid[t]||0;return l===s?a.additional_metrics.feature_size.score-i.additional_metrics.feature_size.score:n==="ASC"?l-s:s-l}).slice(0,5).map(([r,i])=>({featureName:r,score:i.test_pyramid&&i.test_pyramid[t]||0,feature:i})),JE=["Regression","Integration","Unit"],eO=["Missing","Pending"],tO={Pending:{Unit:"unit_pending",Integration:"integration_pending",Regression:"regression_pending"},Missing:{Unit:"unit_count",Integration:"integration_count",Regression:"regression_count"}},Ufe={Pending:{Unit:"Top 5 features with pending unit tests",Integration:"Top 5 features with pending integration tests",Regression:"Top 5 features with pending regression tests"},Missing:{Unit:"Bottom 5 features missing unit test coverage",Integration:"Bottom 5 features missing integration tests",Regression:"Bottom 5 features missing regression tests"}},Wfe=({features:e})=>{const[t,n]=w.useState(eO[0]),[r,i]=w.useState(JE[0]),[o,a]=w.useState(ZE({features:e,metric:tO[t][r],sortDirection:t==="Missing"?"ASC":""}));return w.useEffect(()=>{a(ZE({features:e,metric:tO[t][r],sortDirection:t==="Missing"?"ASC":""}))},[e,t,r]),b.jsxs(b.Fragment,{children:[b.jsxs("div",{className:"flex items-center justify-between px-4 py-6 bg-gray-50 rounded-md",children:[b.jsx("h3",{className:"flex items-center text-xs font-semibold text-gray-800 uppercase h-8",children:Ufe[t][r]}),b.jsxs("div",{className:"flex h-8",children:[b.jsx(Lfe,{items:eO,selectedItem:t,onItemSelect:n,size:"xs"}),b.jsx("span",{className:"mx-2"}),b.jsx(Bx,{items:JE,selectedItem:r,onItemSelect:i,size:"xs"})]})]}),b.jsx("div",{className:"flow-root",children:b.jsx("div",{className:"min-w-full align-middle",children:b.jsx("div",{className:"overflow-hidden rounded-md",children:b.jsxs("table",{className:"min-w-full",children:[b.jsx("thead",{className:"bg-gray-50 border-b border-gray-200",children:b.jsxs("tr",{children:[b.jsx(pc,{title:"Feature"}),b.jsx(pc,{title:"Team"}),b.jsx(pc,{title:"Size"}),b.jsx(pc,{title:t==="Missing"?`${r} Test Count`:"Pending Test Count"}),b.jsx("th",{scope:"col",className:"px-4 py-3 text-left text-xs font-medium text-gray-800 uppercase tracking-wider"})]})}),b.jsx("tbody",{className:"divide-y divide-gray-200 bg-white",children:o.map(({featureName:l,feature:s,score:u})=>{const c=s.additional_metrics.feature_size.percent_of_max,f=Ea(c);return b.jsxs("tr",{children:[b.jsx("td",{className:"w-full max-w-0 py-4 px-4 text-sm font-medium text-gray-900 sm:w-auto sm:max-w-none",children:b.jsx("div",{className:"",children:l})}),b.jsx("td",{className:"px-4 py-4 text-sm text-gray-500",children:b.jsxs("div",{className:"flex items-center gap-2",children:[b.jsx(Zi,{className:"size-4 text-gray-500"}),id(s.assignments.teams)]})}),b.jsx("td",{className:"px-4 py-4 text-sm text-gray-500",children:b.jsxs("div",{className:"flex items-center gap-x-2",children:[b.jsx("div",{className:"flex gap-1.5 items-center",children:[1,2,3,4,5].map(d=>b.jsx("div",{className:`h-5 w-1.5 rounded ${d<=qs(c)?"bg-blue-500":"bg-gray-200"}`},d))}),b.jsx("span",{className:"text-xs text-gray-500 uppercase",children:f})]})}),b.jsx("td",{className:"px-4 py-4 text-sm",children:b.jsx("div",{className:"flex items-center gap-x-2",children:u})}),b.jsx("td",{className:"px-4 py-4 text-sm text-gray-500",children:b.jsx("div",{className:"flex items-center gap-x-3",children:b.jsx("div",{children:b.jsx(Or,{to:`/${encodeURIComponent(l)}`,className:"flex items-center justify-center flex-shrink-0 font-medium text-gray-900 text-sm mb-1 hover:bg-gray-100 rounded-full h-6 w-6",children:b.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",className:"size-5",children:b.jsx("path",{fillRule:"evenodd",d:"M8.22 5.22a.75.75 0 0 1 1.06 0l4.25 4.25a.75.75 0 0 1 0 1.06l-4.25 4.25a.75.75 0 0 1-1.06-1.06L11.94 10 8.22 6.28a.75.75 0 0 1 0-1.06Z",clipRule:"evenodd"})})})})})})]},l)})})]})})})})]})};function Vfe({features:e}){const[t,n]=w.useState("All Teams"),r=w.useMemo(()=>{const s=new Set;return s.add("All Teams"),Object.values(e).forEach(u=>{var c;(c=u.assignments)!=null&&c.teams&&u.assignments.teams.forEach(f=>s.add(f))}),Array.from(s)},[e]),i=w.useMemo(()=>t==="All Teams"?e:Object.fromEntries(Object.entries(e).filter(([s,u])=>{var c,f;return(f=(c=u.assignments)==null?void 0:c.teams)==null?void 0:f.includes(t)})),[e,t]),o=w.useMemo(()=>Object.entries(i).map(([s,u])=>({name:s,data:u||0,health:u.additional_metrics.health.overall||0})).sort((s,u)=>s.health-u.health).slice(0,5),[i]),a=w.useMemo(()=>Object.entries(i).map(([s,u])=>({name:s,data:u||0,score:u.additional_metrics.test_coverage.score||0})).sort((s,u)=>s.score-u.score).slice(0,5),[i]),l=({title:s})=>b.jsx("th",{scope:"col",className:"px-4 py-3 text-left text-xs font-medium text-gray-800 uppercase tracking-wider",children:b.jsx("div",{className:"flex items-center gap-x-2",children:s})});return b.jsxs("div",{className:"h-screen max-w-7xl mx-auto flex flex-col gap-8 p-4 md:p-8",children:[b.jsxs("div",{className:"flex justify-between items-center",children:[b.jsx("h1",{className:"text-2xl font-bold text-gray-800",children:"Digest"}),b.jsx(Bx,{items:r,selectedItem:t,onItemSelect:n})]}),b.jsx("div",{className:"flow-root",children:b.jsxs("div",{className:"grid grid-cols-3 gap-6",children:[b.jsx("div",{className:"col-span-1 border border-gray-200 shadow-sm bg-white rounded-lg h-full",children:b.jsx("div",{className:"px-4 py-6 h-fit",children:b.jsx(Bfe,{features:i})})}),b.jsxs("div",{className:"col-span-2 h-full shadow-sm border border-gray-200 rounded-lg bg-white",children:[b.jsx("div",{className:"flex items-center justify-between px-4 py-6 bg-gray-50 rounded-md",children:b.jsx("h3",{className:"flex items-center text-xs font-semibold text-gray-800 uppercase h-8",children:"Bottom 5 Features by Health Score"})}),b.jsx("div",{className:"flow-root",children:b.jsx("div",{className:"min-w-full align-middle",children:b.jsx("div",{className:"overflow-hidden rounded-md",children:b.jsxs("table",{className:"min-w-full",children:[b.jsx("thead",{className:"bg-gray-50 border-b border-gray-200",children:b.jsxs("tr",{children:[b.jsx(l,{title:"Feature"}),b.jsx(l,{title:"Team"}),b.jsx(l,{title:"Size"}),b.jsx(l,{title:"Health Score"}),b.jsx("th",{scope:"col",className:"px-4 py-3 text-left text-xs font-medium text-gray-800 uppercase tracking-wider"})]})}),b.jsx("tbody",{className:"divide-y divide-gray-200 bg-white",children:o.map(s=>{const u=s.data.additional_metrics.feature_size.percent_of_max,c=Ea(u),f=s.data.additional_metrics.health.score||0;return b.jsxs("tr",{children:[b.jsx("td",{className:"w-full max-w-0 py-4 px-4 text-sm font-medium text-gray-900 sm:w-auto sm:max-w-none",children:b.jsx("div",{className:"",children:s.name})}),b.jsx("td",{className:"px-4 py-4 text-sm text-gray-500",children:b.jsxs("div",{className:"flex items-center gap-2",children:[b.jsx(Zi,{className:"size-4 text-gray-500"}),id(s.data.assignments.teams)]})}),b.jsx("td",{className:"px-4 py-4 text-sm text-gray-500",children:b.jsxs("div",{className:"flex items-center gap-x-2",children:[b.jsx("div",{className:"flex gap-1.5 items-center",children:[1,2,3,4,5].map(d=>b.jsx("div",{className:`h-5 w-1.5 rounded ${d<=qs(u)?"bg-blue-500":"bg-gray-200"}`},d))}),b.jsx("span",{className:"text-xs text-gray-500 uppercase",children:c})]})}),b.jsx("td",{className:"px-4 py-4 text-sm text-gray-500",children:b.jsxs("div",{className:"flex items-center gap-x-2",children:[b.jsx("div",{className:`w-4 h-4 rounded-full flex items-center justify-center ${Qj(f)}`,children:b.jsx("div",{className:`w-2 h-2 rounded-full ${wt(f).class}`})}),b.jsxs("span",{className:"text-gray-600",children:[f.toFixed(0),"%"]})]})}),b.jsx("td",{className:"px-4 py-4 text-sm text-gray-500",children:b.jsx("div",{className:"flex items-center gap-x-3",children:b.jsx("div",{children:b.jsx(Or,{to:`/${encodeURIComponent(s.name)}`,className:"flex items-center justify-center flex-shrink-0 font-medium text-gray-900 text-sm mb-1 hover:bg-gray-100 rounded-full h-6 w-6",children:b.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",className:"size-5",children:b.jsx("path",{fillRule:"evenodd",d:"M8.22 5.22a.75.75 0 0 1 1.06 0l4.25 4.25a.75.75 0 0 1 0 1.06l-4.25 4.25a.75.75 0 0 1-1.06-1.06L11.94 10 8.22 6.28a.75.75 0 0 1 0-1.06Z",clipRule:"evenodd"})})})})})})]},s.name)})})]})})})})]})]})}),b.jsx("div",{className:"flow-root",children:b.jsxs("div",{className:"grid grid-cols-3 gap-6",children:[b.jsx("div",{className:"col-span-1 border border-gray-200 shadow-sm bg-white rounded-lg",children:b.jsx("div",{className:"px-4 py-6",children:b.jsx(zfe,{features:i})})}),b.jsxs("div",{className:"col-span-2 h-full shadow-sm border border-gray-200 rounded-lg bg-white",children:[b.jsx("div",{className:"flex items-center justify-between px-4 py-6 bg-gray-50 rounded-md",children:b.jsx("h3",{className:"flex items-center text-xs font-semibold text-gray-800 uppercase h-8",children:"Bottom 5 Features by Test Coverage"})}),b.jsx("div",{className:"flow-root",children:b.jsx("div",{className:"min-w-full align-middle",children:b.jsx("div",{className:"overflow-hidden rounded-md",children:b.jsxs("table",{className:"min-w-full",children:[b.jsx("thead",{className:"bg-gray-50 border-b border-gray-200",children:b.jsxs("tr",{children:[b.jsx(l,{title:"Feature"}),b.jsx(l,{title:"Team"}),b.jsx(l,{title:"Size"}),b.jsx(l,{title:"Test Coverage"}),b.jsx("th",{scope:"col",className:"px-4 py-3 text-left text-xs font-medium text-gray-800 uppercase tracking-wider"})]})}),b.jsx("tbody",{className:"divide-y divide-gray-200 bg-white",children:a.map(s=>{const u=s.data.additional_metrics.feature_size.percent_of_max,c=Ea(u),f=s.data.additional_metrics.test_coverage.score||0;return b.jsxs("tr",{children:[b.jsx("td",{className:"w-full max-w-0 py-4 px-4 text-sm font-medium text-gray-900 sm:w-auto sm:max-w-none",children:b.jsx("div",{className:"",children:s.name})}),b.jsx("td",{className:"px-4 py-4 text-sm text-gray-500",children:b.jsxs("div",{className:"flex items-center gap-2",children:[b.jsx(Zi,{className:"size-4 text-gray-500"}),id(s.data.assignments.teams)]})}),b.jsx("td",{className:"px-4 py-4 text-sm text-gray-500",children:b.jsxs("div",{className:"flex items-center gap-x-2",children:[b.jsx("div",{className:"flex gap-1.5 items-center",children:[1,2,3,4,5].map(d=>b.jsx("div",{className:`h-5 w-1.5 rounded ${d<=qs(u)?"bg-blue-500":"bg-gray-200"}`},d))}),b.jsx("span",{className:"text-xs text-gray-500 uppercase",children:c})]})}),b.jsx("td",{className:"px-4 py-4 text-sm",children:b.jsxs("div",{className:"flex items-center gap-x-2",children:[b.jsx("div",{className:"flex-grow h-2 rounded-full bg-gray-100 overflow-hidden",children:b.jsx("div",{className:`h-full rounded-full ${bt(f).class}`,style:{width:`${f}%`}})}),b.jsx("span",{className:"text-sm text-gray-500",children:f?`${f.toFixed(0)}%`:"No Data"})]})}),b.jsx("td",{className:"px-4 py-4 text-sm text-gray-500",children:b.jsx("div",{className:"flex items-center gap-x-3",children:b.jsx("div",{children:b.jsx(Or,{to:`/${encodeURIComponent(s.name)}`,className:"flex items-center justify-center flex-shrink-0 font-medium text-gray-900 text-sm mb-1 hover:bg-gray-100 rounded-full h-6 w-6",children:b.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",className:"size-5",children:b.jsx("path",{fillRule:"evenodd",d:"M8.22 5.22a.75.75 0 0 1 1.06 0l4.25 4.25a.75.75 0 0 1 0 1.06l-4.25 4.25a.75.75 0 0 1-1.06-1.06L11.94 10 8.22 6.28a.75.75 0 0 1 0-1.06Z",clipRule:"evenodd"})})})})})})]},s.name)})})]})})})})]})]})}),b.jsx("div",{className:"flow-root",children:b.jsxs("div",{className:"grid grid-cols-3 gap-6",children:[b.jsx("div",{className:"col-span-1 border border-gray-200 shadow-sm bg-white rounded-lg",children:b.jsx("div",{className:"px-4 py-6",children:b.jsx(Hfe,{features:i})})}),b.jsx("div",{className:"col-span-2 h-full shadow-sm border border-gray-200 rounded-lg bg-white",children:b.jsx(Wfe,{features:i})})]})})]})}const Kfe=({files:e})=>{const{project:t,environment:n}=hi,r=`${t.repository.url}/blob/${n.git_ref}`,i=w.useMemo(()=>{const v=new Set;return e.forEach(g=>{const x=g.split("/");let E="";x.slice(0,-1).forEach(_=>{E=E?`${E}/${_}`:_,v.add(E)})}),v},[e]),[o,a]=w.useState("list"),[l,s]=w.useState(i),[u,c]=w.useState({key:null,direction:"asc"}),f=w.useMemo(()=>{const v={};return e.forEach(g=>{const x=g.split("/");let E=v;x.forEach((_,S)=>{S===x.length-1?E[_]={type:"file",path:g}:(E[_]=E[_]||{type:"directory",children:{}},E=E[_].children)})}),v},[e]),d=w.useMemo(()=>[...e].sort((v,g)=>u.key?v<g?u.direction==="asc"?-1:1:v>g?u.direction==="asc"?1:-1:0:0),[e,u]),p=v=>{s(g=>{const x=new Set(g);return x.has(v)?x.delete(v):x.add(v),x})},h=v=>{c(g=>({key:v,direction:g.key===v&&g.direction==="asc"?"desc":"asc"}))},m=(v,g="",x=0)=>v?Object.entries(v).map(([E,_])=>{const S=g?`${g}/${E}`:E,O=l.has(S);return _.type==="directory"?b.jsxs(A.Fragment,{children:[b.jsx("tr",{className:"hover:bg-gray-50",children:b.jsx("td",{className:"px-4 py-2 text-sm text-gray-900",children:b.jsxs("button",{onClick:()=>p(S),className:"flex items-center w-full group",style:{paddingLeft:`${x*16}px`},children:[O?b.jsx(DP,{className:"size-4 text-gray-400 mr-1 flex-shrink-0"}):b.jsx(RR,{className:"size-4 text-gray-400 mr-1 flex-shrink-0"}),b.jsx(FR,{className:"size-4 text-gray-400 mr-2 flex-shrink-0"}),b.jsx("span",{className:"font-medium text-gray-600 group-hover:text-gray-900",children:E})]})})}),O&&m(_.children,S,x+1)]},S):b.jsx("tr",{className:"",children:b.jsx("td",{className:"px-4 py-2 text-sm text-gray-900",children:b.jsxs("div",{className:"flex items-center",style:{paddingLeft:`${x*16+20}px`},children:[b.jsx(fv,{className:"size-4 text-gray-400 mr-2 flex-shrink-0"}),b.jsx("span",{className:"truncate",children:E})]})})},S)}):null,y=({title:v,sortKey:g,className:x=""})=>b.jsx("th",{scope:"col",className:`px-4 py-3 text-left text-xs font-medium text-gray-800 uppercase tracking-wider cursor-pointer ${x}`,onClick:()=>h(g),children:b.jsxs("div",{className:"flex items-center gap-x-2 group",children:[v,b.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:"1.5",stroke:"currentColor",className:"size-4 text-gray-400 group-hover:text-gray-600",children:b.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M3 7.5 7.5 3m0 0L12 7.5M7.5 3v13.5m13.5 0L16.5 21m0 0L12 16.5m4.5 4.5V7.5"})})]})});return b.jsx("div",{className:"bg-white rounded-lg border border-gray-200",children:b.jsx("div",{className:"overflow-hidden rounded-lg",children:b.jsxs("table",{className:"min-w-full divide-y divide-gray-200",children:[b.jsx("thead",{className:"bg-gray-50",children:b.jsxs("tr",{children:[b.jsx(y,{title:o==="list"?"File Path":"Name",sortKey:"path"}),b.jsx("th",{scope:"col",className:"px-4 py-3 text-center text-xs font-medium text-gray-800 uppercase tracking-wider",children:b.jsxs("div",{className:"flex items-center justify-end gap-2",children:[b.jsx("button",{onClick:()=>a("list"),className:`p-1 rounded ${o==="list"?"text-blue-600 bg-blue-100":"text-gray-500 hover:text-gray-700 hover:bg-gray-50"}`,children:b.jsx(UR,{className:"size-4"})}),b.jsx("button",{onClick:()=>a("tree"),className:`p-1 rounded ${o==="tree"?"text-blue-600 bg-blue-100":"text-gray-500 hover:text-gray-700 hover:bg-gray-50"}`,children:b.jsx(FP,{className:"size-4"})})]})})]})}),b.jsx("tbody",{className:"divide-y divide-gray-200",children:o==="list"?d.map(v=>b.jsx("tr",{className:"",children:b.jsx("td",{className:"px-4 py-3 text-sm font-medium text-gray-900 flex-1",children:b.jsxs("div",{className:"flex items-center",children:[b.jsx(fv,{className:"size-4 text-gray-400 mr-2 flex-shrink-0"}),b.jsx("a",{href:`${r}/${v}`,className:"truncate underline",target:"_blank",children:v})]})})},v)):m(f)})]})})})};function qfe({name:e,feature:t}){const{project:n}=hi,i=`is:pr label:"${`Feature ${e}`}"`,o=encodeURIComponent(i),a=`${n.repository.url}/pulls?q=${o}`;return b.jsxs("div",{className:"bg-white p-4 rounded-lg border border-gray-200 h-fit",children:[b.jsxs("div",{className:"mb-6",children:[b.jsx("h3",{className:"text-sm font-medium text-gray-900 mb-3",children:"Description"}),t.description&&b.jsx("p",{className:"text-sm md:text-base text-gray-600",children:t.description})]}),b.jsx("h3",{className:"text-sm font-medium text-gray-900 mb-3",children:"Metrics"}),b.jsxs("ul",{className:"mb-6 space-y-2",children:[b.jsxs("li",{className:"flex items-center gap-2",children:[b.jsx("div",{className:"flex-shrink-0",children:b.jsx(FP,{className:"size-4 text-gray-500"})}),b.jsxs("p",{className:"text-sm text-gray-700",children:[t.assignments.files?t.assignments.files.length:0," Total Files"]})]}),b.jsxs("li",{className:"flex items-center gap-2",children:[b.jsx("div",{className:"flex-shrink-0",children:b.jsx(KR,{className:"size-4 text-gray-500"})}),b.jsxs("p",{className:"text-sm text-gray-700",children:[(t.metrics.abc_size||0).toFixed(2)," ABC Size"]})]}),b.jsxs("li",{className:"flex items-center gap-2",children:[b.jsx("div",{className:"flex-shrink-0",children:b.jsx(fv,{className:"size-4 text-gray-500"})}),b.jsxs("p",{className:"text-sm text-gray-700",children:[t.metrics.lines_of_code||0," Lines of Code"]})]}),b.jsxs("li",{className:"flex items-center gap-2",children:[b.jsx("div",{className:"flex-shrink-0",children:b.jsx(BR,{className:"size-4 text-gray-500"})}),b.jsxs("p",{className:"text-sm text-gray-700",children:[t.metrics.cyclomatic_complexity||0," Cyclomatic Complexity"]})]}),b.jsxs("li",{className:"flex items-center gap-2",children:[b.jsx("div",{className:"flex-shrink-0",children:b.jsx(zR,{className:"size-4 text-gray-500"})}),b.jsxs("p",{className:"text-sm text-gray-700",children:[t.metrics.todo_locations?Object.keys(t.metrics.todo_locations).length:0," TODO Comments"]})]})]}),b.jsx("div",{className:"space-y-4 mb-6",children:b.jsxs("div",{children:[b.jsx("h3",{className:"text-sm font-medium text-gray-900 mb-3",children:"Teams"}),b.jsx("ul",{className:"flex flex-col gap-y-1",children:t.assignments.teams?t.assignments.teams.map(l=>b.jsxs("li",{className:"text-sm text-gray-700 flex gap-2",children:[b.jsx("div",{className:"flex items-center justify-center flex-shrink-0",children:b.jsx(Zi,{className:"size-4 text-gray-500"})}),l]},l)):b.jsxs("li",{className:"text-sm text-gray-700 flex gap-2",children:[b.jsx("div",{className:"flex items-center justify-center flex-shrink-0",children:b.jsx(Zi,{className:"size-4 text-gray-500"})}),b.jsx("span",{className:"text-gray-400 italic text-sm",children:"No teams assigned"})]})})]})}),b.jsxs("div",{className:"mb",children:[b.jsx("h3",{className:"text-sm font-medium text-gray-900 mb-3",children:"Resources"}),b.jsxs("ul",{className:"mb-6 space-y-2",children:[b.jsxs("li",{className:"flex items-center gap-2",children:[b.jsx("div",{className:"flex-shrink-0",children:b.jsx(Tc,{className:"size-4 text-gray-500"})}),b.jsx("a",{href:a,target:"_blank",className:"text-sm text-gray-700 hover:underline",children:"Feature Pull Requests"})]}),b.jsxs("li",{className:"flex items-center gap-2",children:[b.jsx("div",{className:"flex-shrink-0",children:b.jsx(Tc,{className:"size-4 text-gray-500"})}),t.documentation_link?b.jsx("a",{href:t.documentation_link,target:"_blank",className:"text-sm text-gray-700 hover:underline",children:"Feature Documentation"}):b.jsx("span",{className:"text-gray-400 italic text-sm",children:"Missing documentation link"})]}),b.jsxs("li",{className:"flex items-center gap-2",children:[b.jsx("div",{className:"flex-shrink-0",children:b.jsx(Tc,{className:"size-4 text-gray-500"})}),t.dashboard_link?b.jsx("a",{href:t.dashboard_link,target:"_blank",className:"text-sm text-gray-700 hover:underline",children:"New Relic Dashboard"}):b.jsx("span",{className:"text-gray-400 italic text-sm",children:"Missing New Relic Dashboard"})]})]})]})]})}const Gfe=({value:e,suffix:t="",color:n="#ef4444"})=>{const r=e===0?"transparent":n;return b.jsxs("div",{className:"relative h-20 w-20",children:[b.jsxs("svg",{className:"h-full w-full -rotate-90",viewBox:"0 0 36 36",children:[b.jsx("path",{d:"M18 2.0845 a 15.9155 15.9155 0 0 1 0 31.831 a 15.9155 15.9155 0 0 1 0 -31.831",fill:"none",stroke:"#eee",strokeWidth:"2"}),b.jsx("path",{d:"M18 2.0845 a 15.9155 15.9155 0 0 1 0 31.831 a 15.9155 15.9155 0 0 1 0 -31.831",fill:"none",stroke:r,strokeWidth:"2",strokeDasharray:`${e}, 100`})]}),b.jsxs("div",{className:"absolute inset-0 flex items-center justify-center",children:[b.jsx("span",{className:"text-2xl font-bold",children:Math.round(e)}),b.jsx("span",{className:"text-sm",children:t})]})]})},nO=({children:e,title:t,value:n,suffix:r="",icon:i,tooltip:o,color:a})=>b.jsxs("div",{className:"flex flex-col gap-6 px-4 py-6 border border-gray-200 shadow-sm bg-white rounded-lg",children:[b.jsxs("div",{className:"flex items-center justify-between",children:[b.jsxs("h3",{className:"flex items-center text-xs font-medium text-gray-600 uppercase",children:[b.jsx("div",{className:"flex-shrink-0 bg-gray-100 rounded-md h-8 w-8 flex items-center justify-center",children:i}),b.jsx("span",{className:"flex pl-2",children:t})]}),o&&b.jsxs(bu,{children:[b.jsx(Ya,{children:b.jsx(mi,{className:"size-4 text-gray-400"})}),b.jsx(Qa,{children:o})]})]}),b.jsxs("div",{className:"flex items-center gap-4",children:[b.jsx(Gfe,{value:n,suffix:r,color:a}),b.jsx("div",{className:"flex flex-col flex-1",children:e})]})]});var Xfe={value:()=>{}};function tk(){for(var e=0,t=arguments.length,n={},r;e<t;++e){if(!(r=arguments[e]+"")||r in n||/[\s.]/.test(r))throw new Error("illegal type: "+r);n[r]=[]}return new Nc(n)}function Nc(e){this._=e}function Yfe(e,t){return e.trim().split(/^|\s+/).map(function(n){var r="",i=n.indexOf(".");if(i>=0&&(r=n.slice(i+1),n=n.slice(0,i)),n&&!t.hasOwnProperty(n))throw new Error("unknown type: "+n);return{type:n,name:r}})}Nc.prototype=tk.prototype={constructor:Nc,on:function(e,t){var n=this._,r=Yfe(e+"",n),i,o=-1,a=r.length;if(arguments.length<2){for(;++o<a;)if((i=(e=r[o]).type)&&(i=Qfe(n[i],e.name)))return i;return}if(t!=null&&typeof t!="function")throw new Error("invalid callback: "+t);for(;++o<a;)if(i=(e=r[o]).type)n[i]=rO(n[i],e.name,t);else if(t==null)for(i in n)n[i]=rO(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 Nc(e)},call:function(e,t){if((i=arguments.length-2)>0)for(var n=new Array(i),r=0,i,o;r<i;++r)n[r]=arguments[r+2];if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(o=this._[e],r=0,i=o.length;r<i;++r)o[r].value.apply(t,n)},apply:function(e,t,n){if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(var r=this._[e],i=0,o=r.length;i<o;++i)r[i].value.apply(t,n)}};function Qfe(e,t){for(var n=0,r=e.length,i;n<r;++n)if((i=e[n]).name===t)return i.value}function rO(e,t,n){for(var r=0,i=e.length;r<i;++r)if(e[r].name===t){e[r]=Xfe,e=e.slice(0,r).concat(e.slice(r+1));break}return n!=null&&e.push({name:t,value:n}),e}var Zg="http://www.w3.org/1999/xhtml";const iO={svg:"http://www.w3.org/2000/svg",xhtml:Zg,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function Gp(e){var t=e+="",n=t.indexOf(":");return n>=0&&(t=e.slice(0,n))!=="xmlns"&&(e=e.slice(n+1)),iO.hasOwnProperty(t)?{space:iO[t],local:e}:e}function Zfe(e){return function(){var t=this.ownerDocument,n=this.namespaceURI;return n===Zg&&t.documentElement.namespaceURI===Zg?t.createElement(e):t.createElementNS(n,e)}}function Jfe(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function nk(e){var t=Gp(e);return(t.local?Jfe:Zfe)(t)}function ede(){}function zx(e){return e==null?ede:function(){return this.querySelector(e)}}function tde(e){typeof e!="function"&&(e=zx(e));for(var t=this._groups,n=t.length,r=new Array(n),i=0;i<n;++i)for(var o=t[i],a=o.length,l=r[i]=new Array(a),s,u,c=0;c<a;++c)(s=o[c])&&(u=e.call(s,s.__data__,c,o))&&("__data__"in s&&(u.__data__=s.__data__),l[c]=u);return new Kt(r,this._parents)}function nde(e){return e==null?[]:Array.isArray(e)?e:Array.from(e)}function rde(){return[]}function rk(e){return e==null?rde:function(){return this.querySelectorAll(e)}}function ide(e){return function(){return nde(e.apply(this,arguments))}}function ode(e){typeof e=="function"?e=ide(e):e=rk(e);for(var t=this._groups,n=t.length,r=[],i=[],o=0;o<n;++o)for(var a=t[o],l=a.length,s,u=0;u<l;++u)(s=a[u])&&(r.push(e.call(s,s.__data__,u,a)),i.push(s));return new Kt(r,i)}function ik(e){return function(){return this.matches(e)}}function ok(e){return function(t){return t.matches(e)}}var ade=Array.prototype.find;function lde(e){return function(){return ade.call(this.children,e)}}function sde(){return this.firstElementChild}function ude(e){return this.select(e==null?sde:lde(typeof e=="function"?e:ok(e)))}var cde=Array.prototype.filter;function fde(){return Array.from(this.children)}function dde(e){return function(){return cde.call(this.children,e)}}function pde(e){return this.selectAll(e==null?fde:dde(typeof e=="function"?e:ok(e)))}function hde(e){typeof e!="function"&&(e=ik(e));for(var t=this._groups,n=t.length,r=new Array(n),i=0;i<n;++i)for(var o=t[i],a=o.length,l=r[i]=[],s,u=0;u<a;++u)(s=o[u])&&e.call(s,s.__data__,u,o)&&l.push(s);return new Kt(r,this._parents)}function ak(e){return new Array(e.length)}function mde(){return new Kt(this._enter||this._groups.map(ak),this._parents)}function hd(e,t){this.ownerDocument=e.ownerDocument,this.namespaceURI=e.namespaceURI,this._next=null,this._parent=e,this.__data__=t}hd.prototype={constructor:hd,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 vde(e){return function(){return e}}function gde(e,t,n,r,i,o){for(var a=0,l,s=t.length,u=o.length;a<u;++a)(l=t[a])?(l.__data__=o[a],r[a]=l):n[a]=new hd(e,o[a]);for(;a<s;++a)(l=t[a])&&(i[a]=l)}function yde(e,t,n,r,i,o,a){var l,s,u=new Map,c=t.length,f=o.length,d=new Array(c),p;for(l=0;l<c;++l)(s=t[l])&&(d[l]=p=a.call(s,s.__data__,l,t)+"",u.has(p)?i[l]=s:u.set(p,s));for(l=0;l<f;++l)p=a.call(e,o[l],l,o)+"",(s=u.get(p))?(r[l]=s,s.__data__=o[l],u.delete(p)):n[l]=new hd(e,o[l]);for(l=0;l<c;++l)(s=t[l])&&u.get(d[l])===s&&(i[l]=s)}function xde(e){return e.__data__}function bde(e,t){if(!arguments.length)return Array.from(this,xde);var n=t?yde:gde,r=this._parents,i=this._groups;typeof e!="function"&&(e=vde(e));for(var o=i.length,a=new Array(o),l=new Array(o),s=new Array(o),u=0;u<o;++u){var c=r[u],f=i[u],d=f.length,p=wde(e.call(c,c&&c.__data__,u,r)),h=p.length,m=l[u]=new Array(h),y=a[u]=new Array(h),v=s[u]=new Array(d);n(c,f,m,y,v,p,t);for(var g=0,x=0,E,_;g<h;++g)if(E=m[g]){for(g>=x&&(x=g+1);!(_=y[x])&&++x<h;);E._next=_||null}}return a=new Kt(a,r),a._enter=l,a._exit=s,a}function wde(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function _de(){return new Kt(this._exit||this._groups.map(ak),this._parents)}function Sde(e,t,n){var r=this.enter(),i=this,o=this.exit();return typeof e=="function"?(r=e(r),r&&(r=r.selection())):r=r.append(e+""),t!=null&&(i=t(i),i&&(i=i.selection())),n==null?o.remove():n(o),r&&i?r.merge(i).order():i}function Ede(e){for(var t=e.selection?e.selection():e,n=this._groups,r=t._groups,i=n.length,o=r.length,a=Math.min(i,o),l=new Array(i),s=0;s<a;++s)for(var u=n[s],c=r[s],f=u.length,d=l[s]=new Array(f),p,h=0;h<f;++h)(p=u[h]||c[h])&&(d[h]=p);for(;s<i;++s)l[s]=n[s];return new Kt(l,this._parents)}function Ode(){for(var e=this._groups,t=-1,n=e.length;++t<n;)for(var r=e[t],i=r.length-1,o=r[i],a;--i>=0;)(a=r[i])&&(o&&a.compareDocumentPosition(o)^4&&o.parentNode.insertBefore(a,o),o=a);return this}function $de(e){e||(e=Pde);function t(f,d){return f&&d?e(f.__data__,d.__data__):!f-!d}for(var n=this._groups,r=n.length,i=new Array(r),o=0;o<r;++o){for(var a=n[o],l=a.length,s=i[o]=new Array(l),u,c=0;c<l;++c)(u=a[c])&&(s[c]=u);s.sort(t)}return new Kt(i,this._parents).order()}function Pde(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}function Ade(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}function Tde(){return Array.from(this)}function jde(){for(var e=this._groups,t=0,n=e.length;t<n;++t)for(var r=e[t],i=0,o=r.length;i<o;++i){var a=r[i];if(a)return a}return null}function Cde(){let e=0;for(const t of this)++e;return e}function kde(){return!this.node()}function Nde(e){for(var t=this._groups,n=0,r=t.length;n<r;++n)for(var i=t[n],o=0,a=i.length,l;o<a;++o)(l=i[o])&&e.call(l,l.__data__,o,i);return this}function Mde(e){return function(){this.removeAttribute(e)}}function Ide(e){return function(){this.removeAttributeNS(e.space,e.local)}}function Rde(e,t){return function(){this.setAttribute(e,t)}}function Lde(e,t){return function(){this.setAttributeNS(e.space,e.local,t)}}function Dde(e,t){return function(){var n=t.apply(this,arguments);n==null?this.removeAttribute(e):this.setAttribute(e,n)}}function Fde(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 Bde(e,t){var n=Gp(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?Ide:Mde:typeof t=="function"?n.local?Fde:Dde:n.local?Lde:Rde)(n,t))}function lk(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView}function zde(e){return function(){this.style.removeProperty(e)}}function Hde(e,t,n){return function(){this.style.setProperty(e,t,n)}}function Ude(e,t,n){return function(){var r=t.apply(this,arguments);r==null?this.style.removeProperty(e):this.style.setProperty(e,r,n)}}function Wde(e,t,n){return arguments.length>1?this.each((t==null?zde:typeof t=="function"?Ude:Hde)(e,t,n??"")):Aa(this.node(),e)}function Aa(e,t){return e.style.getPropertyValue(t)||lk(e).getComputedStyle(e,null).getPropertyValue(t)}function Vde(e){return function(){delete this[e]}}function Kde(e,t){return function(){this[e]=t}}function qde(e,t){return function(){var n=t.apply(this,arguments);n==null?delete this[e]:this[e]=n}}function Gde(e,t){return arguments.length>1?this.each((t==null?Vde:typeof t=="function"?qde:Kde)(e,t)):this.node()[e]}function sk(e){return e.trim().split(/^|\s+/)}function Hx(e){return e.classList||new uk(e)}function uk(e){this._node=e,this._names=sk(e.getAttribute("class")||"")}uk.prototype={add:function(e){var t=this._names.indexOf(e);t<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 ck(e,t){for(var n=Hx(e),r=-1,i=t.length;++r<i;)n.add(t[r])}function fk(e,t){for(var n=Hx(e),r=-1,i=t.length;++r<i;)n.remove(t[r])}function Xde(e){return function(){ck(this,e)}}function Yde(e){return function(){fk(this,e)}}function Qde(e,t){return function(){(t.apply(this,arguments)?ck:fk)(this,e)}}function Zde(e,t){var n=sk(e+"");if(arguments.length<2){for(var r=Hx(this.node()),i=-1,o=n.length;++i<o;)if(!r.contains(n[i]))return!1;return!0}return this.each((typeof t=="function"?Qde:t?Xde:Yde)(n,t))}function Jde(){this.textContent=""}function epe(e){return function(){this.textContent=e}}function tpe(e){return function(){var t=e.apply(this,arguments);this.textContent=t??""}}function npe(e){return arguments.length?this.each(e==null?Jde:(typeof e=="function"?tpe:epe)(e)):this.node().textContent}function rpe(){this.innerHTML=""}function ipe(e){return function(){this.innerHTML=e}}function ope(e){return function(){var t=e.apply(this,arguments);this.innerHTML=t??""}}function ape(e){return arguments.length?this.each(e==null?rpe:(typeof e=="function"?ope:ipe)(e)):this.node().innerHTML}function lpe(){this.nextSibling&&this.parentNode.appendChild(this)}function spe(){return this.each(lpe)}function upe(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function cpe(){return this.each(upe)}function fpe(e){var t=typeof e=="function"?e:nk(e);return this.select(function(){return this.appendChild(t.apply(this,arguments))})}function dpe(){return null}function ppe(e,t){var n=typeof e=="function"?e:nk(e),r=t==null?dpe:typeof t=="function"?t:zx(t);return this.select(function(){return this.insertBefore(n.apply(this,arguments),r.apply(this,arguments)||null)})}function hpe(){var e=this.parentNode;e&&e.removeChild(this)}function mpe(){return this.each(hpe)}function vpe(){var e=this.cloneNode(!1),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function gpe(){var e=this.cloneNode(!0),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function ype(e){return this.select(e?gpe:vpe)}function xpe(e){return arguments.length?this.property("__data__",e):this.node().__data__}function bpe(e){return function(t){e.call(this,t,this.__data__)}}function wpe(e){return e.trim().split(/^|\s+/).map(function(t){var n="",r=t.indexOf(".");return r>=0&&(n=t.slice(r+1),t=t.slice(0,r)),{type:t,name:n}})}function _pe(e){return function(){var t=this.__on;if(t){for(var n=0,r=-1,i=t.length,o;n<i;++n)o=t[n],(!e.type||o.type===e.type)&&o.name===e.name?this.removeEventListener(o.type,o.listener,o.options):t[++r]=o;++r?t.length=r:delete this.__on}}}function Spe(e,t,n){return function(){var r=this.__on,i,o=bpe(t);if(r){for(var a=0,l=r.length;a<l;++a)if((i=r[a]).type===e.type&&i.name===e.name){this.removeEventListener(i.type,i.listener,i.options),this.addEventListener(i.type,i.listener=o,i.options=n),i.value=t;return}}this.addEventListener(e.type,o,n),i={type:e.type,name:e.name,value:t,listener:o,options:n},r?r.push(i):this.__on=[i]}}function Epe(e,t,n){var r=wpe(e+""),i,o=r.length,a;if(arguments.length<2){var l=this.node().__on;if(l){for(var s=0,u=l.length,c;s<u;++s)for(i=0,c=l[s];i<o;++i)if((a=r[i]).type===c.type&&a.name===c.name)return c.value}return}for(l=t?Spe:_pe,i=0;i<o;++i)this.each(l(r[i],t,n));return this}function dk(e,t,n){var r=lk(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 Ope(e,t){return function(){return dk(this,e,t)}}function $pe(e,t){return function(){return dk(this,e,t.apply(this,arguments))}}function Ppe(e,t){return this.each((typeof t=="function"?$pe:Ope)(e,t))}function*Ape(){for(var e=this._groups,t=0,n=e.length;t<n;++t)for(var r=e[t],i=0,o=r.length,a;i<o;++i)(a=r[i])&&(yield a)}var pk=[null];function Kt(e,t){this._groups=e,this._parents=t}function Au(){return new Kt([[document.documentElement]],pk)}function Tpe(){return this}Kt.prototype=Au.prototype={constructor:Kt,select:tde,selectAll:ode,selectChild:ude,selectChildren:pde,filter:hde,data:bde,enter:mde,exit:_de,join:Sde,merge:Ede,selection:Tpe,order:Ode,sort:$de,call:Ade,nodes:Tde,node:jde,size:Cde,empty:kde,each:Nde,attr:Bde,style:Wde,property:Gde,classed:Zde,text:npe,html:ape,raise:spe,lower:cpe,append:fpe,insert:ppe,remove:mpe,clone:ype,datum:xpe,on:Epe,dispatch:Ppe,[Symbol.iterator]:Ape};function jpe(e){return typeof e=="string"?new Kt([[document.querySelector(e)]],[document.documentElement]):new Kt([[e]],pk)}var Ta=0,Cl=0,bl=0,hk=1e3,md,kl,vd=0,ao=0,Xp=0,Qs=typeof performance=="object"&&performance.now?performance:Date,mk=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};function Ux(){return ao||(mk(Cpe),ao=Qs.now()+Xp)}function Cpe(){ao=0}function gd(){this._call=this._time=this._next=null}gd.prototype=vk.prototype={constructor:gd,restart:function(e,t,n){if(typeof e!="function")throw new TypeError("callback is not a function");n=(n==null?Ux():+n)+(t==null?0:+t),!this._next&&kl!==this&&(kl?kl._next=this:md=this,kl=this),this._call=e,this._time=n,Jg()},stop:function(){this._call&&(this._call=null,this._time=1/0,Jg())}};function vk(e,t,n){var r=new gd;return r.restart(e,t,n),r}function kpe(){Ux(),++Ta;for(var e=md,t;e;)(t=ao-e._time)>=0&&e._call.call(void 0,t),e=e._next;--Ta}function oO(){ao=(vd=Qs.now())+Xp,Ta=Cl=0;try{kpe()}finally{Ta=0,Mpe(),ao=0}}function Npe(){var e=Qs.now(),t=e-vd;t>hk&&(Xp-=t,vd=e)}function Mpe(){for(var e,t=md,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:md=n);kl=e,Jg(r)}function Jg(e){if(!Ta){Cl&&(Cl=clearTimeout(Cl));var t=e-ao;t>24?(e<1/0&&(Cl=setTimeout(oO,e-Qs.now()-Xp)),bl&&(bl=clearInterval(bl))):(bl||(vd=Qs.now(),bl=setInterval(Npe,hk)),Ta=1,mk(oO))}}function aO(e,t,n){var r=new gd;return t=t==null?0:+t,r.restart(i=>{r.stop(),e(i+t)},t,n),r}var Ipe=tk("start","end","cancel","interrupt"),Rpe=[],gk=0,lO=1,ey=2,Mc=3,sO=4,ty=5,Ic=6;function Yp(e,t,n,r,i,o){var a=e.__transition;if(!a)e.__transition={};else if(n in a)return;Lpe(e,n,{name:t,index:r,group:i,on:Ipe,tween:Rpe,time:o.time,delay:o.delay,duration:o.duration,ease:o.ease,timer:null,state:gk})}function Wx(e,t){var n=Rn(e,t);if(n.state>gk)throw new Error("too late; already scheduled");return n}function tr(e,t){var n=Rn(e,t);if(n.state>Mc)throw new Error("too late; already running");return n}function Rn(e,t){var n=e.__transition;if(!n||!(n=n[t]))throw new Error("transition not found");return n}function Lpe(e,t,n){var r=e.__transition,i;r[t]=n,n.timer=vk(o,0,n.time);function o(u){n.state=lO,n.timer.restart(a,n.delay,n.time),n.delay<=u&&a(u-n.delay)}function a(u){var c,f,d,p;if(n.state!==lO)return s();for(c in r)if(p=r[c],p.name===n.name){if(p.state===Mc)return aO(a);p.state===sO?(p.state=Ic,p.timer.stop(),p.on.call("interrupt",e,e.__data__,p.index,p.group),delete r[c]):+c<t&&(p.state=Ic,p.timer.stop(),p.on.call("cancel",e,e.__data__,p.index,p.group),delete r[c])}if(aO(function(){n.state===Mc&&(n.state=sO,n.timer.restart(l,n.delay,n.time),l(u))}),n.state=ey,n.on.call("start",e,e.__data__,n.index,n.group),n.state===ey){for(n.state=Mc,i=new Array(d=n.tween.length),c=0,f=-1;c<d;++c)(p=n.tween[c].value.call(e,e.__data__,n.index,n.group))&&(i[++f]=p);i.length=f+1}}function l(u){for(var c=u<n.duration?n.ease.call(null,u/n.duration):(n.timer.restart(s),n.state=ty,1),f=-1,d=i.length;++f<d;)i[f].call(e,c);n.state===ty&&(n.on.call("end",e,e.__data__,n.index,n.group),s())}function s(){n.state=Ic,n.timer.stop(),delete r[t];for(var u in r)return;delete e.__transition}}function Dpe(e,t){var n=e.__transition,r,i,o=!0,a;if(n){t=t==null?null:t+"";for(a in n){if((r=n[a]).name!==t){o=!1;continue}i=r.state>ey&&r.state<ty,r.state=Ic,r.timer.stop(),r.on.call(i?"interrupt":"cancel",e,e.__data__,r.index,r.group),delete n[a]}o&&delete e.__transition}}function Fpe(e){return this.each(function(){Dpe(this,e)})}function Bpe(e,t){var n,r;return function(){var i=tr(this,e),o=i.tween;if(o!==n){r=n=o;for(var a=0,l=r.length;a<l;++a)if(r[a].name===t){r=r.slice(),r.splice(a,1);break}}i.tween=r}}function zpe(e,t,n){var r,i;if(typeof n!="function")throw new Error;return function(){var o=tr(this,e),a=o.tween;if(a!==r){i=(r=a).slice();for(var l={name:t,value:n},s=0,u=i.length;s<u;++s)if(i[s].name===t){i[s]=l;break}s===u&&i.push(l)}o.tween=i}}function Hpe(e,t){var n=this._id;if(e+="",arguments.length<2){for(var r=Rn(this.node(),n).tween,i=0,o=r.length,a;i<o;++i)if((a=r[i]).name===e)return a.value;return null}return this.each((t==null?Bpe:zpe)(n,e,t))}function Vx(e,t,n){var r=e._id;return e.each(function(){var i=tr(this,r);(i.value||(i.value={}))[t]=n.apply(this,arguments)}),function(i){return Rn(i,r).value[t]}}function yk(e,t){var n;return(typeof t=="number"?_n:t instanceof Ji?$f:(n=Ji(t))?(t=n,$f):vT)(e,t)}function Upe(e){return function(){this.removeAttribute(e)}}function Wpe(e){return function(){this.removeAttributeNS(e.space,e.local)}}function Vpe(e,t,n){var r,i=n+"",o;return function(){var a=this.getAttribute(e);return a===i?null:a===r?o:o=t(r=a,n)}}function Kpe(e,t,n){var r,i=n+"",o;return function(){var a=this.getAttributeNS(e.space,e.local);return a===i?null:a===r?o:o=t(r=a,n)}}function qpe(e,t,n){var r,i,o;return function(){var a,l=n(this),s;return l==null?void this.removeAttribute(e):(a=this.getAttribute(e),s=l+"",a===s?null:a===r&&s===i?o:(i=s,o=t(r=a,l)))}}function Gpe(e,t,n){var r,i,o;return function(){var a,l=n(this),s;return l==null?void this.removeAttributeNS(e.space,e.local):(a=this.getAttributeNS(e.space,e.local),s=l+"",a===s?null:a===r&&s===i?o:(i=s,o=t(r=a,l)))}}function Xpe(e,t){var n=Gp(e),r=n==="transform"?lV:yk;return this.attrTween(e,typeof t=="function"?(n.local?Gpe:qpe)(n,r,Vx(this,"attr."+e,t)):t==null?(n.local?Wpe:Upe)(n):(n.local?Kpe:Vpe)(n,r,t))}function Ype(e,t){return function(n){this.setAttribute(e,t.call(this,n))}}function Qpe(e,t){return function(n){this.setAttributeNS(e.space,e.local,t.call(this,n))}}function Zpe(e,t){var n,r;function i(){var o=t.apply(this,arguments);return o!==r&&(n=(r=o)&&Qpe(e,o)),n}return i._value=t,i}function Jpe(e,t){var n,r;function i(){var o=t.apply(this,arguments);return o!==r&&(n=(r=o)&&Ype(e,o)),n}return i._value=t,i}function ehe(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 new Error;var r=Gp(e);return this.tween(n,(r.local?Zpe:Jpe)(r,t))}function the(e,t){return function(){Wx(this,e).delay=+t.apply(this,arguments)}}function nhe(e,t){return t=+t,function(){Wx(this,e).delay=t}}function rhe(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?the:nhe)(t,e)):Rn(this.node(),t).delay}function ihe(e,t){return function(){tr(this,e).duration=+t.apply(this,arguments)}}function ohe(e,t){return t=+t,function(){tr(this,e).duration=t}}function ahe(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?ihe:ohe)(t,e)):Rn(this.node(),t).duration}function lhe(e,t){if(typeof t!="function")throw new Error;return function(){tr(this,e).ease=t}}function she(e){var t=this._id;return arguments.length?this.each(lhe(t,e)):Rn(this.node(),t).ease}function uhe(e,t){return function(){var n=t.apply(this,arguments);if(typeof n!="function")throw new Error;tr(this,e).ease=n}}function che(e){if(typeof e!="function")throw new Error;return this.each(uhe(this._id,e))}function fhe(e){typeof e!="function"&&(e=ik(e));for(var t=this._groups,n=t.length,r=new Array(n),i=0;i<n;++i)for(var o=t[i],a=o.length,l=r[i]=[],s,u=0;u<a;++u)(s=o[u])&&e.call(s,s.__data__,u,o)&&l.push(s);return new Cr(r,this._parents,this._name,this._id)}function dhe(e){if(e._id!==this._id)throw new Error;for(var t=this._groups,n=e._groups,r=t.length,i=n.length,o=Math.min(r,i),a=new Array(r),l=0;l<o;++l)for(var s=t[l],u=n[l],c=s.length,f=a[l]=new Array(c),d,p=0;p<c;++p)(d=s[p]||u[p])&&(f[p]=d);for(;l<r;++l)a[l]=t[l];return new Cr(a,this._parents,this._name,this._id)}function phe(e){return(e+"").trim().split(/^|\s+/).every(function(t){var n=t.indexOf(".");return n>=0&&(t=t.slice(0,n)),!t||t==="start"})}function hhe(e,t,n){var r,i,o=phe(t)?Wx:tr;return function(){var a=o(this,e),l=a.on;l!==r&&(i=(r=l).copy()).on(t,n),a.on=i}}function mhe(e,t){var n=this._id;return arguments.length<2?Rn(this.node(),n).on.on(e):this.each(hhe(n,e,t))}function vhe(e){return function(){var t=this.parentNode;for(var n in this.__transition)if(+n!==e)return;t&&t.removeChild(this)}}function ghe(){return this.on("end.remove",vhe(this._id))}function yhe(e){var t=this._name,n=this._id;typeof e!="function"&&(e=zx(e));for(var r=this._groups,i=r.length,o=new Array(i),a=0;a<i;++a)for(var l=r[a],s=l.length,u=o[a]=new Array(s),c,f,d=0;d<s;++d)(c=l[d])&&(f=e.call(c,c.__data__,d,l))&&("__data__"in c&&(f.__data__=c.__data__),u[d]=f,Yp(u[d],t,n,d,u,Rn(c,n)));return new Cr(o,this._parents,t,n)}function xhe(e){var t=this._name,n=this._id;typeof e!="function"&&(e=rk(e));for(var r=this._groups,i=r.length,o=[],a=[],l=0;l<i;++l)for(var s=r[l],u=s.length,c,f=0;f<u;++f)if(c=s[f]){for(var d=e.call(c,c.__data__,f,s),p,h=Rn(c,n),m=0,y=d.length;m<y;++m)(p=d[m])&&Yp(p,t,n,m,d,h);o.push(d),a.push(c)}return new Cr(o,a,t,n)}var bhe=Au.prototype.constructor;function whe(){return new bhe(this._groups,this._parents)}function _he(e,t){var n,r,i;return function(){var o=Aa(this,e),a=(this.style.removeProperty(e),Aa(this,e));return o===a?null:o===n&&a===r?i:i=t(n=o,r=a)}}function xk(e){return function(){this.style.removeProperty(e)}}function She(e,t,n){var r,i=n+"",o;return function(){var a=Aa(this,e);return a===i?null:a===r?o:o=t(r=a,n)}}function Ehe(e,t,n){var r,i,o;return function(){var a=Aa(this,e),l=n(this),s=l+"";return l==null&&(s=l=(this.style.removeProperty(e),Aa(this,e))),a===s?null:a===r&&s===i?o:(i=s,o=t(r=a,l))}}function Ohe(e,t){var n,r,i,o="style."+t,a="end."+o,l;return function(){var s=tr(this,e),u=s.on,c=s.value[o]==null?l||(l=xk(t)):void 0;(u!==n||i!==c)&&(r=(n=u).copy()).on(a,i=c),s.on=r}}function $he(e,t,n){var r=(e+="")=="transform"?aV:yk;return t==null?this.styleTween(e,_he(e,r)).on("end.style."+e,xk(e)):typeof t=="function"?this.styleTween(e,Ehe(e,r,Vx(this,"style."+e,t))).each(Ohe(this._id,e)):this.styleTween(e,She(e,r,t),n).on("end.style."+e,null)}function Phe(e,t,n){return function(r){this.style.setProperty(e,t.call(this,r),n)}}function Ahe(e,t,n){var r,i;function o(){var a=t.apply(this,arguments);return a!==i&&(r=(i=a)&&Phe(e,a,n)),r}return o._value=t,o}function The(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 new Error;return this.tween(r,Ahe(e,t,n??""))}function jhe(e){return function(){this.textContent=e}}function Che(e){return function(){var t=e(this);this.textContent=t??""}}function khe(e){return this.tween("text",typeof e=="function"?Che(Vx(this,"text",e)):jhe(e==null?"":e+""))}function Nhe(e){return function(t){this.textContent=e.call(this,t)}}function Mhe(e){var t,n;function r(){var i=e.apply(this,arguments);return i!==n&&(t=(n=i)&&Nhe(i)),t}return r._value=e,r}function Ihe(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 new Error;return this.tween(t,Mhe(e))}function Rhe(){for(var e=this._name,t=this._id,n=bk(),r=this._groups,i=r.length,o=0;o<i;++o)for(var a=r[o],l=a.length,s,u=0;u<l;++u)if(s=a[u]){var c=Rn(s,t);Yp(s,e,n,u,a,{time:c.time+c.delay+c.duration,delay:0,duration:c.duration,ease:c.ease})}return new Cr(r,this._parents,e,n)}function Lhe(){var e,t,n=this,r=n._id,i=n.size();return new Promise(function(o,a){var l={value:a},s={value:function(){--i===0&&o()}};n.each(function(){var u=tr(this,r),c=u.on;c!==e&&(t=(e=c).copy(),t._.cancel.push(l),t._.interrupt.push(l),t._.end.push(s)),u.on=t}),i===0&&o()})}var Dhe=0;function Cr(e,t,n,r){this._groups=e,this._parents=t,this._name=n,this._id=r}function bk(){return++Dhe}var rr=Au.prototype;Cr.prototype={constructor:Cr,select:yhe,selectAll:xhe,selectChild:rr.selectChild,selectChildren:rr.selectChildren,filter:fhe,merge:dhe,selection:whe,transition:Rhe,call:rr.call,nodes:rr.nodes,node:rr.node,size:rr.size,empty:rr.empty,each:rr.each,on:mhe,attr:Xpe,attrTween:ehe,style:$he,styleTween:The,text:khe,textTween:Ihe,remove:ghe,tween:Hpe,delay:rhe,duration:ahe,ease:she,easeVarying:che,end:Lhe,[Symbol.iterator]:rr[Symbol.iterator]};function Fhe(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}var Bhe={time:null,delay:0,duration:250,ease:Fhe};function zhe(e,t){for(var n;!(n=e.__transition)||!(n=n[t]);)if(!(e=e.parentNode))throw new Error(`transition ${t} not found`);return n}function Hhe(e){var t,n;e instanceof Cr?(t=e._id,e=e._name):(t=bk(),(n=Bhe).time=Ux(),e=e==null?null:e+"");for(var r=this._groups,i=r.length,o=0;o<i;++o)for(var a=r[o],l=a.length,s,u=0;u<l;++u)(s=a[u])&&Yp(s,e,t,u,a,n||zhe(s,t));return new Cr(r,this._parents,e,t)}Au.prototype.interrupt=Fpe;Au.prototype.transition=Hhe;function Uhe(e){var t=0,n=e.children,r=n&&n.length;if(!r)t=1;else for(;--r>=0;)t+=n[r].value;e.value=t}function Whe(){return this.eachAfter(Uhe)}function Vhe(e,t){let n=-1;for(const r of this)e.call(t,r,++n,this);return this}function Khe(e,t){for(var n=this,r=[n],i,o,a=-1;n=r.pop();)if(e.call(t,n,++a,this),i=n.children)for(o=i.length-1;o>=0;--o)r.push(i[o]);return this}function qhe(e,t){for(var n=this,r=[n],i=[],o,a,l,s=-1;n=r.pop();)if(i.push(n),o=n.children)for(a=0,l=o.length;a<l;++a)r.push(o[a]);for(;n=i.pop();)e.call(t,n,++s,this);return this}function Ghe(e,t){let n=-1;for(const r of this)if(e.call(t,r,++n,this))return r}function Xhe(e){return this.eachAfter(function(t){for(var n=+e(t.data)||0,r=t.children,i=r&&r.length;--i>=0;)n+=r[i].value;t.value=n})}function Yhe(e){return this.eachBefore(function(t){t.children&&t.children.sort(e)})}function Qhe(e){for(var t=this,n=Zhe(t,e),r=[t];t!==n;)t=t.parent,r.push(t);for(var i=r.length;e!==n;)r.splice(i,0,e),e=e.parent;return r}function Zhe(e,t){if(e===t)return e;var n=e.ancestors(),r=t.ancestors(),i=null;for(e=n.pop(),t=r.pop();e===t;)i=e,e=n.pop(),t=r.pop();return i}function Jhe(){for(var e=this,t=[e];e=e.parent;)t.push(e);return t}function eme(){return Array.from(this)}function tme(){var e=[];return this.eachBefore(function(t){t.children||e.push(t)}),e}function nme(){var e=this,t=[];return e.each(function(n){n!==e&&t.push({source:n.parent,target:n})}),t}function*rme(){var e=this,t,n=[e],r,i,o;do for(t=n.reverse(),n=[];e=t.pop();)if(yield e,r=e.children)for(i=0,o=r.length;i<o;++i)n.push(r[i]);while(n.length)}function Kx(e,t){e instanceof Map?(e=[void 0,e],t===void 0&&(t=ame)):t===void 0&&(t=ome);for(var n=new yd(e),r,i=[n],o,a,l,s;r=i.pop();)if((a=t(r.data))&&(s=(a=Array.from(a)).length))for(r.children=a,l=s-1;l>=0;--l)i.push(o=a[l]=new yd(a[l])),o.parent=r,o.depth=r.depth+1;return n.eachBefore(sme)}function ime(){return Kx(this).eachBefore(lme)}function ome(e){return e.children}function ame(e){return Array.isArray(e)?e[1]:null}function lme(e){e.data.value!==void 0&&(e.value=e.data.value),e.data=e.data.data}function sme(e){var t=0;do e.height=t;while((e=e.parent)&&e.height<++t)}function yd(e){this.data=e,this.depth=this.height=0,this.parent=null}yd.prototype=Kx.prototype={constructor:yd,count:Whe,each:Vhe,eachAfter:qhe,eachBefore:Khe,find:Ghe,sum:Xhe,sort:Yhe,path:Qhe,ancestors:Jhe,descendants:eme,leaves:tme,links:nme,copy:ime,[Symbol.iterator]:rme};function ume(e){if(typeof e!="function")throw new Error;return e}function wl(){return 0}function _l(e){return function(){return e}}function cme(e){e.x0=Math.round(e.x0),e.y0=Math.round(e.y0),e.x1=Math.round(e.x1),e.y1=Math.round(e.y1)}function fme(e,t,n,r,i){for(var o=e.children,a,l=-1,s=o.length,u=e.value&&(r-t)/e.value;++l<s;)a=o[l],a.y0=n,a.y1=i,a.x0=t,a.x1=t+=a.value*u}function dme(e,t,n,r,i){for(var o=e.children,a,l=-1,s=o.length,u=e.value&&(i-n)/e.value;++l<s;)a=o[l],a.x0=t,a.x1=r,a.y0=n,a.y1=n+=a.value*u}var pme=(1+Math.sqrt(5))/2;function hme(e,t,n,r,i,o){for(var a=[],l=t.children,s,u,c=0,f=0,d=l.length,p,h,m=t.value,y,v,g,x,E,_,S;c<d;){p=i-n,h=o-r;do y=l[f++].value;while(!y&&f<d);for(v=g=y,_=Math.max(h/p,p/h)/(m*e),S=y*y*_,E=Math.max(g/S,S/v);f<d;++f){if(y+=u=l[f].value,u<v&&(v=u),u>g&&(g=u),S=y*y*_,x=Math.max(g/S,S/v),x>E){y-=u;break}E=x}a.push(s={value:y,dice:p<h,children:l.slice(c,f)}),s.dice?fme(s,n,r,i,m?r+=h*y/m:o):dme(s,n,r,m?n+=p*y/m:i,o),m-=y,c=f}return a}const mme=function e(t){function n(r,i,o,a,l){hme(t,r,i,o,a,l)}return n.ratio=function(r){return e((r=+r)>1?r:1)},n}(pme);function vme(){var e=mme,t=!1,n=1,r=1,i=[0],o=wl,a=wl,l=wl,s=wl,u=wl;function c(d){return d.x0=d.y0=0,d.x1=n,d.y1=r,d.eachBefore(f),i=[0],t&&d.eachBefore(cme),d}function f(d){var p=i[d.depth],h=d.x0+p,m=d.y0+p,y=d.x1-p,v=d.y1-p;y<h&&(h=y=(h+y)/2),v<m&&(m=v=(m+v)/2),d.x0=h,d.y0=m,d.x1=y,d.y1=v,d.children&&(p=i[d.depth+1]=o(d)/2,h+=u(d)-p,m+=a(d)-p,y-=l(d)-p,v-=s(d)-p,y<h&&(h=y=(h+y)/2),v<m&&(m=v=(m+v)/2),e(d,h,m,y,v))}return c.round=function(d){return arguments.length?(t=!!d,c):t},c.size=function(d){return arguments.length?(n=+d[0],r=+d[1],c):[n,r]},c.tile=function(d){return arguments.length?(e=ume(d),c):e},c.padding=function(d){return arguments.length?c.paddingInner(d).paddingOuter(d):c.paddingInner()},c.paddingInner=function(d){return arguments.length?(o=typeof d=="function"?d:_l(+d),c):o},c.paddingOuter=function(d){return arguments.length?c.paddingTop(d).paddingRight(d).paddingBottom(d).paddingLeft(d):c.paddingTop()},c.paddingTop=function(d){return arguments.length?(a=typeof d=="function"?d:_l(+d),c):a},c.paddingRight=function(d){return arguments.length?(l=typeof d=="function"?d:_l(+d),c):l},c.paddingBottom=function(d){return arguments.length?(s=typeof d=="function"?d:_l(+d),c):s},c.paddingLeft=function(d){return arguments.length?(u=typeof d=="function"?d:_l(+d),c):u},c}function Nl(e,t,n){this.k=e,this.x=t,this.y=n}Nl.prototype={constructor:Nl,scale:function(e){return e===1?this:new Nl(this.k*e,this.x,this.y)},translate:function(e,t){return e===0&t===0?this:new Nl(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+")"}};Nl.prototype;const gme=({files:e})=>{const t=w.useRef(null),n=w.useRef(null);return w.useEffect(()=>{if(!(e!=null&&e.length)||!t.current)return;const r=t.current,i=r.clientWidth,o=r.clientHeight,a=jpe(n.current);a.selectAll("*").remove(),a.attr("viewBox",`0 0 ${i} ${o}`).attr("preserveAspectRatio","xMidYMid meet");const l={top:10,right:10,bottom:10,left:10},s=()=>{const y={name:"root",children:{}};e.forEach(g=>{const x=g.split("/").filter(Boolean);let E=y;x.forEach((_,S)=>{S===x.length-1?E.children[_]||(E.children[_]={name:_,value:1,type:"file"}):(E.children[_]||(E.children[_]={name:_,children:{},type:"directory"}),E=E.children[_])})});const v=g=>g.type==="file"?g:{...g,children:Object.values(g.children).map(v)};return v(y)},u=y=>y.data.type==="file"?"#eff6ff":y.data.name==="src"||y.depth===1?"#3b82f6":y.depth===2?"#60a5fa":"#93c5fd",c=vme().size([i,o]).paddingOuter(8).paddingTop(24).paddingInner(4).round(!0),f=Kx(s()).sum(y=>y.value||0).sort((y,v)=>v.value-y.value);c(f);const d=a.append("g"),p=f.descendants().filter(y=>{var v;return y.data.name!=="root"&&(y.data.type==="file"||((v=y.children)==null?void 0:v.length)>0)}),h=d.selectAll("g").data(p).join("g").attr("transform",y=>`translate(${y.x0},${y.y0})`);h.append("rect").attr("width",y=>y.x1-y.x0).attr("height",y=>y.y1-y.y0).attr("fill",u).attr("stroke",y=>y.data.type==="file"?"#eff6ff":"transparent").attr("stroke-width",y=>y.data.type==="file"?1:2).attr("rx",2).attr("ry",2),h.filter(y=>y.data.type==="directory").append("text").attr("x",4).attr("y",16).attr("fill","#37474f").attr("font-weight",600).attr("font-size","10px").text(y=>{const v=y.x1-y.x0,g=y.data.name;return v<40?"":g.length>12?g.slice(0,10)+"...":g}),h.filter(y=>y.data.type==="file").append("text").attr("x",y=>(y.x1-y.x0)/2).attr("y",y=>(y.y1-y.y0)/2).attr("text-anchor","middle").attr("dominant-baseline","middle").attr("fill","#666666").attr("font-size","9px").text(y=>{const v=y.x1-y.x0,g=y.y1-y.y0;if(v<40||g<25)return"";const x=y.data.name;return x.length>20?x.slice(0,10)+"...":x});const m=()=>{const y=r.clientWidth,v=r.clientHeight;a.attr("viewBox",`0 0 ${y} ${v}`),c.size([y-l.left-l.right,v-l.top-l.bottom]),c(f),h.attr("transform",g=>`translate(${g.x0},${g.y0})`),h.select("rect").attr("width",g=>g.x1-g.x0).attr("height",g=>g.y1-g.y0),h.select("text").attr("x",g=>g.data.type==="file"?(g.x1-g.x0)/2:4).attr("y",g=>g.data.type==="file"?(g.y1-g.y0)/2:16).text(g=>{const x=g.x1-g.x0,E=g.y1-g.y0,_=g.data.name;return g.data.type==="file"?x<40||E<25?"":_.length>12?_.slice(0,10)+"...":_:x<40?"":_.length>12?_.slice(0,10)+"...":_})};return window.addEventListener("resize",m),()=>{window.removeEventListener("resize",m)}},[e]),b.jsx("div",{className:"flex flex-col h-full -mt-2 py-2 px-2",children:b.jsx("div",{className:"flex-1 relative min-h-0",ref:t,children:b.jsx("svg",{ref:n,className:"absolute inset-0 w-full h-full"})})})};function yme({features:e}){const{name:t}=MI(),n=e[t];if(!n)return b.jsx("div",{className:"max-w-7xl mx-auto p-4 md:p-8",children:b.jsxs("div",{className:"bg-white rounded-lg shadow p-6",children:[b.jsx("h1",{className:"text-xl font-bold text-red-600",children:"Feature Not Found"}),b.jsxs("p",{className:"mt-2",children:["Could not find feature: ",t]}),b.jsx(Or,{to:"/",className:"text-blue-600 hover:text-blue-800 mt-4 inline-block",children:"← Back to Features"})]})});const r=n.additional_metrics.health.overall,i=n.additional_metrics.feature_size.percent_of_max,o=qs(i);return b.jsxs("div",{className:"h-screen max-w-7xl mx-auto flex flex-col gap-8 p-4 md:p-8",children:[b.jsx("div",{className:"flex justify-between items-center",children:b.jsx("h1",{className:"text-2xl font-bold text-gray-800",children:t})}),b.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-12 gap-8",children:[b.jsx("div",{className:"col-span-1 lg:col-span-3",children:b.jsx(qfe,{name:t,feature:n})}),b.jsxs("div",{className:"col-span-1 lg:col-span-9",children:[b.jsxs("div",{className:"grid md:grid-cols-3 gap-4 mb-8",children:[b.jsx(nO,{title:"Health Score",value:r.toFixed(0),suffix:"%",tooltip:"Feature health is determined by combining a weighted score for test coverage, code complexity, and encapsulation into a composite score from 0-100%. Each feature is then grouped into a categories ranging from low (needs attention) to good (healthy), which can be managed via `.feature_map/config.yml`.",icon:b.jsx(r0,{}),color:wt(r).hex,children:b.jsxs("ul",{className:"flex flex-col gap-y-1",children:[b.jsxs("li",{className:"text-xs text-gray-500",children:["Coverage: ",n.additional_metrics.health.test_coverage_component.health_score.toFixed(0)," / ",n.additional_metrics.health.test_coverage_component.awardable_points]}),b.jsxs("li",{className:"text-xs text-gray-500",children:["Complexity: ",n.additional_metrics.health.cyclomatic_complexity_component.health_score.toFixed(0)," / ",n.additional_metrics.health.cyclomatic_complexity_component.awardable_points]}),b.jsxs("li",{className:"text-xs text-gray-500",children:["Encapsulation: ",n.additional_metrics.health.encapsulation_component.health_score.toFixed(0)," / ",n.additional_metrics.health.encapsulation_component.awardable_points]})]})}),b.jsx(nO,{title:"Test Coverage",value:n.additional_metrics.test_coverage.score,suffix:"%",tooltip:"Test coverage is determined by using CodeCov data (lines, hits, misses) to calculate a percentage score, from 0-100%, relative to the other features in the codebase. A qualitative coverage ranking is assigned to each feature, which can be managed which can be managed via `.feature_map/config.yml`.",icon:b.jsx(n0,{}),color:bt(n.additional_metrics.test_coverage.score).hex,children:b.jsxs("ul",{className:"flex flex-col gap-y-1",children:[b.jsxs("li",{className:"text-xs text-gray-500",children:["Hits: ",n.test_coverage?n.test_coverage.hits:0]}),b.jsxs("li",{className:"text-xs text-gray-500",children:["Lines: ",n.test_coverage?n.test_coverage.lines:0]}),b.jsxs("li",{className:"text-xs text-gray-500",children:["Misses: ",n.test_coverage?n.test_coverage.misses:0]})]})}),b.jsxs("div",{className:"flex flex-col gap-6 px-4 py-6 border border-gray-200 shadow-sm bg-white rounded-lg",children:[b.jsxs("div",{className:"flex items-center justify-between",children:[b.jsxs("h3",{className:"flex items-center text-xs font-medium text-gray-600 uppercase",children:[b.jsx("div",{className:"flex-shrink-0 bg-gray-100 rounded-md h-8 w-8 flex items-center justify-center",children:b.jsx(BP,{})}),b.jsx("span",{className:"flex pl-2",children:"Feature Size"})]}),b.jsxs(bu,{children:[b.jsx(Ya,{children:b.jsx(mi,{className:"size-4 text-gray-400"})}),b.jsx(Qa,{children:"Feature size is determined by analyzing the total number of files and lines of code associated with each feature. Each feature is then grouped into different size bins, which can be configured in the config.yaml file."})]})]}),b.jsxs("div",{className:"flex items-center gap-4",children:[b.jsx("div",{className:"relative h-20 flex items-center",children:b.jsx("div",{className:"text-2xl font-bold uppercase",children:Ea(i)})}),b.jsx("div",{className:"flex flex-col gap-y-2",children:b.jsx("div",{className:"flex gap-1.5 items-center",children:[1,2,3,4,5].map(a=>b.jsx("div",{className:`h-6 w-1.5 rounded ${a<=o?"bg-blue-500":"bg-gray-300"}`},a))})}),b.jsxs("div",{children:[b.jsxs("div",{className:"text-[10px] text-gray-500",children:[n.assignments.files?n.assignments.files.length:0," files"]}),b.jsxs("div",{className:"text-[10px] text-gray-500",children:[dae(n.metrics.lines_of_code)," lines"]})]})]})]})]}),n.assignments.files&&n.assignments.files.length>0?b.jsxs(b.Fragment,{children:[b.jsx("div",{className:"h-[600px] bg-white rounded-lg border border-gray-200 shadow-sm mb-8",children:b.jsx(gme,{files:n.assignments.files})}),b.jsx(Kfe,{files:n.assignments.files})]}):b.jsx("div",{className:"h-[300px] bg-white rounded-lg border border-gray-200 shadow-sm mb-8",children:b.jsx("div",{className:"flex items-center justify-center h-full text-gray-500",children:"No files found for this feature"})})]})]})]})}const xme=[{name:"Dashboard",pathname:"",icon:HR},{name:"Digest",pathname:"Digest",icon:DR}];function hc(...e){return e.filter(Boolean).join(" ")}function uO(){const e=Nr(),{linked_sites:t,title:n}=hi.project.documentation_site;return b.jsxs(b.Fragment,{children:[b.jsx("div",{className:"flex h-16 shrink-0 items-center",children:b.jsx(Or,{to:"/",children:"Feature Documentation"})}),b.jsx("nav",{className:"flex flex-1 flex-col",children:b.jsxs("ul",{role:"list",className:"flex flex-1 flex-col gap-y-7",children:[b.jsxs("li",{children:[b.jsx("div",{className:"text-xs/6 font-semibold text-gray-400",children:n}),b.jsx("ul",{role:"list",className:"-mx-2 mt-2 space-y-2",children:xme.map(r=>b.jsx("li",{children:b.jsxs(Or,{to:r.pathname,className:hc(e.pathname===`/${r.pathname}`?"text-blue-600":"text-gray-700 hover:text-blue-600","group flex gap-x-3 rounded-md px-2 text-sm/6 font-semibold items-center"),children:[b.jsx(r.icon,{"aria-hidden":"true",className:hc("text-gray-400 group-hover:text-blue-600","size-5 shrink-0")}),r.name]})},r.name))})]}),t&&t.length>0&&b.jsxs("li",{children:[b.jsx("div",{className:"text-xs/6 font-semibold text-gray-400",children:"Linked Feature Documentation"}),b.jsx("ul",{role:"list",className:"-mx-2 mt-2 space-y-2",children:t.map(r=>b.jsx("li",{children:b.jsxs("a",{href:r.url,target:"_blank",className:hc("text-gray-700 hover:text-blue-600","group flex gap-x-3 rounded-md px-2 text-sm/6 font-semibold items-center"),children:[b.jsx(Tc,{"aria-hidden":"true",className:hc("text-gray-400 group-hover:text-blue-600","size-5 shrink-0")}),r.name]})},r.name))})]})]})})]})}function bme(){const[e,t]=w.useState(!1);return b.jsxs("div",{children:[b.jsxs(Vce,{open:e,onClose:t,className:"relative z-50 lg:hidden",children:[b.jsx(Uce,{transition:!0,className:"fixed inset-0 bg-gray-900/80 transition-opacity duration-300 ease-linear data-[closed]:opacity-0"}),b.jsx("div",{className:"fixed inset-0 flex",children:b.jsxs(YC,{transition:!0,className:"relative mr-16 flex w-full max-w-xs flex-1 transform transition duration-300 ease-in-out data-[closed]:-translate-x-full",children:[b.jsx(Vp,{children:b.jsx("div",{className:"absolute left-full top-0 flex w-16 justify-center pt-5 duration-300 ease-in-out data-[closed]:opacity-0",children:b.jsxs("button",{type:"button",onClick:()=>t(!1),className:"-m-2.5 p-2.5",children:[b.jsx("span",{className:"sr-only",children:"Close sidebar"}),b.jsx(LR,{"aria-hidden":"true",className:"size-6 text-white"})]})})}),b.jsx("div",{className:"flex grow flex-col gap-y-5 overflow-y-auto bg-white px-6 pb-4",children:b.jsx(uO,{})})]})})]}),b.jsx("div",{className:"hidden lg:fixed lg:inset-y-0 lg:z-50 lg:flex lg:w-72 lg:flex-col",children:b.jsx("div",{className:"flex grow flex-col overflow-y-auto border-r border-gray-200 bg-white px-6 pb-4",children:b.jsx(uO,{})})}),b.jsxs("div",{className:"lg:pl-72",children:[b.jsx("div",{className:"sticky top-0 z-40 flex h-16 shrink-0 items-center gap-x-4 border-b border-gray-200 bg-white lg:hidden px-4 shadow-sm sm:gap-x-6 sm:px-6 lg:px-8",children:b.jsxs("button",{type:"button",onClick:()=>t(!0),className:"-m-2.5 p-2.5 text-gray-700 lg:hidden",children:[b.jsx("span",{className:"sr-only",children:"Open sidebar"}),b.jsx(WR,{"aria-hidden":"true",className:"size-6"})]})}),b.jsx("main",{className:"",children:b.jsx("div",{className:"px-4 sm:px-6 lg:px-8",children:b.jsx(GI,{})})})]})]})}function wme(){const{features:e}=hi,t=Nr();return w.useEffect(()=>{window.scrollTo(0,0)},[t]),b.jsx(YI,{children:b.jsxs(Pl,{element:b.jsx(bme,{}),children:[b.jsx(Pl,{path:"",element:b.jsx(Ffe,{features:e})}),b.jsx(Pl,{path:"digest",element:b.jsx(Vfe,{features:e})}),b.jsx(Pl,{path:":name",element:b.jsx(yme,{features:e})})]})})}vm.createRoot(document.getElementById("root")).render(b.jsx(A.StrictMode,{children:b.jsx(bR,{children:b.jsx(wme,{})})}));
267
+ `)),[]});var wue=(e=>(e[e.None=0]="None",e[e.Closed=1]="Closed",e[e.Enter=2]="Enter",e[e.Leave=4]="Leave",e))(wue||{});function TC(e){let t={};for(let n in e)e[n]===!0&&(t[`data-${n}`]="");return t}function jC(e,t,n,r){let[i,o]=w.useState(n),{hasFlag:a,addFlag:l,removeFlag:s}=xue(e&&i?3:0),u=w.useRef(!1),c=w.useRef(!1),f=mo();return he(()=>{var d;if(e){if(n&&o(!0),!t){n&&l(3);return}return(d=r==null?void 0:r.start)==null||d.call(r,n),_ue(t,{inFlight:u,prepare(){c.current?c.current=!1:c.current=u.current,u.current=!0,!c.current&&(n?(l(3),s(4)):(l(4),s(2)))},run(){c.current?n?(s(3),l(4)):(s(4),l(3)):n?s(1):l(1)},done(){var p;c.current&&typeof t.getAnimations=="function"&&t.getAnimations().length>0||(u.current=!1,s(7),n||o(!1),(p=r==null?void 0:r.end)==null||p.call(r,n))}})}},[e,n,t,f]),e?[i,{closed:a(1),enter:a(2),leave:a(4),transition:a(2)||a(4)}]:[n,{closed:void 0,enter:void 0,leave:void 0,transition:void 0}]}function _ue(e,{prepare:t,run:n,done:r,inFlight:i}){let o=er();return Eue(e,{prepare:t,inFlight:i}),o.nextFrame(()=>{n(),o.requestAnimationFrame(()=>{o.add(Sue(e,r))})}),o.dispose}function Sue(e,t){var n,r;let i=er();if(!e)return i.dispose;let o=!1;i.add(()=>{o=!0});let a=(r=(n=e.getAnimations)==null?void 0:n.call(e).filter(l=>l instanceof CSSTransition))!=null?r:[];return a.length===0?(t(),i.dispose):(Promise.allSettled(a.map(l=>l.finished)).then(()=>{o||t()}),i.dispose)}function Eue(e,{inFlight:t,prepare:n}){if(t!=null&&t.current){n();return}let r=e.style.transition;e.style.transition="none",n(),e.offsetHeight,e.style.transition=r}function Oue(e,{container:t,accept:n,walk:r}){let i=w.useRef(n),o=w.useRef(r);w.useEffect(()=>{i.current=n,o.current=r},[n,r]),he(()=>{if(!t||!e)return;let a=wi(t);if(!a)return;let l=i.current,s=o.current,u=Object.assign(f=>l(f),{acceptNode:l}),c=a.createTreeWalker(t,NodeFilter.SHOW_ELEMENT,u,!1);for(;c.nextNode();)s(c.currentNode)},[t,e,i,o])}function Cx(e,t){let n=w.useRef([]),r=Q(e);w.useEffect(()=>{let i=[...n.current];for(let[o,a]of t.entries())if(n.current[o]!==a){let l=r(t,i);return n.current=t,l}},[r,...t])}function $ue(){const e=navigator.userAgentData;return e&&Array.isArray(e.brands)?e.brands.map(t=>{let{brand:n,version:r}=t;return n+"/"+r}).join(" "):navigator.userAgent}const CC={...Rc},Pue=CC.useInsertionEffect,Aue=Pue||(e=>e());function kC(e){const t=w.useRef(()=>{});return Aue(()=>{t.current=e}),w.useCallback(function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return t.current==null?void 0:t.current(...r)},[])}var Xg=typeof document<"u"?w.useLayoutEffect:w.useEffect;let BE=!1,Tue=0;const zE=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+Tue++;function jue(){const[e,t]=w.useState(()=>BE?zE():void 0);return Xg(()=>{e==null&&t(zE())},[]),w.useEffect(()=>{BE=!0},[]),e}const Cue=CC.useId,kue=Cue||jue;function Nue(){const e=new Map;return{emit(t,n){var r;(r=e.get(t))==null||r.forEach(i=>i(n))},on(t,n){e.set(t,[...e.get(t)||[],n])},off(t,n){var r;e.set(t,((r=e.get(t))==null?void 0:r.filter(i=>i!==n))||[])}}}const Mue=w.createContext(null),Iue=w.createContext(null),Rue=()=>{var e;return((e=w.useContext(Mue))==null?void 0:e.id)||null},Lue=()=>w.useContext(Iue),Due="data-floating-ui-focusable";function Fue(e){const{open:t=!1,onOpenChange:n,elements:r}=e,i=kue(),o=w.useRef({}),[a]=w.useState(()=>Nue()),l=Rue()!=null,[s,u]=w.useState(r.reference),c=kC((p,h,m)=>{o.current.openEvent=p?h:void 0,a.emit("openchange",{open:p,event:h,reason:m,nested:l}),n==null||n(p,h,m)}),f=w.useMemo(()=>({setPositionReference:u}),[]),d=w.useMemo(()=>({reference:s||r.reference||null,floating:r.floating||null,domReference:r.reference}),[s,r.reference,r.floating]);return w.useMemo(()=>({dataRef:o,open:t,onOpenChange:c,elements:d,events:a,floatingId:i,refs:f}),[t,c,d,a,i,f])}function Bue(e){e===void 0&&(e={});const{nodeId:t}=e,n=Fue({...e,elements:{reference:null,floating:null,...e.elements}}),r=e.rootContext||n,i=r.elements,[o,a]=w.useState(null),[l,s]=w.useState(null),c=(i==null?void 0:i.domReference)||o,f=w.useRef(null),d=Lue();Xg(()=>{c&&(f.current=c)},[c]);const p=Uj({...e,elements:{...i,...l&&{reference:l}}}),h=w.useCallback(x=>{const E=de(x)?{getBoundingClientRect:()=>x.getBoundingClientRect(),contextElement:x}:x;s(E),p.refs.setReference(E)},[p.refs]),m=w.useCallback(x=>{(de(x)||x===null)&&(f.current=x,a(x)),(de(p.refs.reference.current)||p.refs.reference.current===null||x!==null&&!de(x))&&p.refs.setReference(x)},[p.refs]),y=w.useMemo(()=>({...p.refs,setReference:m,setPositionReference:h,domReference:f}),[p.refs,m,h]),v=w.useMemo(()=>({...p.elements,domReference:c}),[p.elements,c]),g=w.useMemo(()=>({...p,...r,refs:y,elements:v,nodeId:t}),[p,y,v,t,r]);return Xg(()=>{r.dataRef.current.floatingContext=g;const x=d==null?void 0:d.nodesRef.current.find(E=>E.id===t);x&&(x.context=g)}),w.useMemo(()=>({...p,context:g,refs:y,elements:v}),[p,y,v,g])}const HE="active",UE="selected";function dm(e,t,n){const r=new Map,i=n==="item";let o=e;if(i&&e){const{[HE]:a,[UE]:l,...s}=e;o=s}return{...n==="floating"&&{tabIndex:-1,[Due]:""},...o,...t.map(a=>{const l=a?a[n]:null;return typeof l=="function"?e?l(e):null:l}).concat(e).reduce((a,l)=>(l&&Object.entries(l).forEach(s=>{let[u,c]=s;if(!(i&&[HE,UE].includes(u)))if(u.indexOf("on")===0){if(r.has(u)||r.set(u,[]),typeof c=="function"){var f;(f=r.get(u))==null||f.push(c),a[u]=function(){for(var d,p=arguments.length,h=new Array(p),m=0;m<p;m++)h[m]=arguments[m];return(d=r.get(u))==null?void 0:d.map(y=>y(...h)).find(y=>y!==void 0)}}}else a[u]=c}),a),{})}}function zue(e){e===void 0&&(e=[]);const t=e.map(l=>l==null?void 0:l.reference),n=e.map(l=>l==null?void 0:l.floating),r=e.map(l=>l==null?void 0:l.item),i=w.useCallback(l=>dm(l,e,"reference"),t),o=w.useCallback(l=>dm(l,e,"floating"),n),a=w.useCallback(l=>dm(l,e,"item"),r);return w.useMemo(()=>({getReferenceProps:i,getFloatingProps:o,getItemProps:a}),[i,o,a])}function WE(e,t){return{...e,rects:{...e.rects,floating:{...e.rects.floating,height:t}}}}const Hue=e=>({name:"inner",options:e,async fn(t){const{listRef:n,overflowRef:r,onFallbackChange:i,offset:o=0,index:a=0,minItemsVisible:l=4,referenceOverflowThreshold:s=0,scrollRef:u,...c}=ho(e,t),{rects:f,elements:{floating:d}}=t,p=n.current[a],h=(u==null?void 0:u.current)||d,m=d.clientTop||h.clientTop,y=d.clientTop!==0,v=h.clientTop!==0,g=d===h;if(!p)return{};const x={...t,...await xx(-p.offsetTop-d.clientTop-f.reference.height/2-p.offsetHeight/2-o).fn(t)},E=await nm(WE(x,h.scrollHeight+m+d.clientTop),c),_=await nm(x,{...c,elementContext:"reference"}),S=vt(0,E.top),O=x.y+S,C=(h.scrollHeight>h.clientHeight?j=>j:Gs)(vt(0,h.scrollHeight+(y&&g||v?m*2:0)-S-vt(0,E.bottom)));if(h.style.maxHeight=C+"px",h.scrollTop=S,i){const j=h.offsetHeight<p.offsetHeight*to(l,n.current.length)-1||_.top>=-s||_.bottom>=-s;Ut.flushSync(()=>i(j))}return r&&(r.current=await nm(WE({...x,y:O},h.offsetHeight+m+d.clientTop),c)),{y:O}}});function Uue(e,t){const{open:n,elements:r}=e,{enabled:i=!0,overflowRef:o,scrollRef:a,onChange:l}=t,s=kC(l),u=w.useRef(!1),c=w.useRef(null),f=w.useRef(null);w.useEffect(()=>{if(!i)return;function p(m){if(m.ctrlKey||!h||o.current==null)return;const y=m.deltaY,v=o.current.top>=-.5,g=o.current.bottom>=-.5,x=h.scrollHeight-h.clientHeight,E=y<0?-1:1,_=y<0?"max":"min";h.scrollHeight<=h.clientHeight||(!v&&y>0||!g&&y<0?(m.preventDefault(),Ut.flushSync(()=>{s(S=>S+Math[_](y,x*E))})):/firefox/i.test($ue())&&(h.scrollTop+=y))}const h=(a==null?void 0:a.current)||r.floating;if(n&&h)return h.addEventListener("wheel",p),requestAnimationFrame(()=>{c.current=h.scrollTop,o.current!=null&&(f.current={...o.current})}),()=>{c.current=null,f.current=null,h.removeEventListener("wheel",p)}},[i,n,r.floating,o,a,s]);const d=w.useMemo(()=>({onKeyDown(){u.current=!0},onWheel(){u.current=!1},onPointerMove(){u.current=!1},onScroll(){const p=(a==null?void 0:a.current)||r.floating;if(!(!o.current||!p||!u.current)){if(c.current!==null){const h=p.scrollTop-c.current;(o.current.bottom<-.5&&h<-1||o.current.top<-.5&&h>1)&&Ut.flushSync(()=>s(m=>m+h))}requestAnimationFrame(()=>{c.current=p.scrollTop})}}}),[r.floating,s,o,a]);return w.useMemo(()=>i?{floating:d}:{},[i,d])}let el=w.createContext({styles:void 0,setReference:()=>{},setFloating:()=>{},getReferenceProps:()=>({}),getFloatingProps:()=>({}),slot:{}});el.displayName="FloatingContext";let kx=w.createContext(null);kx.displayName="PlacementContext";function Wue(e){return w.useMemo(()=>e?typeof e=="string"?{to:e}:e:null,[e])}function Vue(){return w.useContext(el).setReference}function Kue(){return w.useContext(el).getReferenceProps}function que(){let{getFloatingProps:e,slot:t}=w.useContext(el);return w.useCallback((...n)=>Object.assign({},e(...n),{"data-anchor":t.anchor}),[e,t])}function Gue(e=null){e===!1&&(e=null),typeof e=="string"&&(e={to:e});let t=w.useContext(kx),n=w.useMemo(()=>e,[JSON.stringify(e,(i,o)=>{var a;return(a=o==null?void 0:o.outerHTML)!=null?a:o})]);he(()=>{t==null||t(n??null)},[t,n]);let r=w.useContext(el);return w.useMemo(()=>[r.setFloating,e?r.styles:{}],[r.setFloating,e,r.styles])}let VE=4;function Xue({children:e,enabled:t=!0}){let[n,r]=w.useState(null),[i,o]=w.useState(0),a=w.useRef(null),[l,s]=w.useState(null);Yue(l);let u=t&&n!==null&&l!==null,{to:c="bottom",gap:f=0,offset:d=0,padding:p=0,inner:h}=Que(n,l),[m,y="center"]=c.split(" ");he(()=>{u&&o(0)},[u]);let{refs:v,floatingStyles:g,context:x}=Bue({open:u,placement:m==="selection"?y==="center"?"bottom":`bottom-${y}`:y==="center"?`${m}`:`${m}-${y}`,strategy:"absolute",transform:!1,middleware:[xx({mainAxis:m==="selection"?0:f,crossAxis:d}),Wj({padding:p}),m!=="selection"&&Sle({padding:p}),m==="selection"&&h?Hue({...h,padding:p,overflowRef:a,offset:i,minItemsVisible:VE,referenceOverflowThreshold:p,onFallbackChange(j){var N,I;if(!j)return;let D=x.elements.floating;if(!D)return;let M=parseFloat(getComputedStyle(D).scrollPaddingBottom)||0,F=Math.min(VE,D.childElementCount),R=0,P=0;for(let k of(I=(N=x.elements.floating)==null?void 0:N.childNodes)!=null?I:[])if(k instanceof HTMLElement){let B=k.offsetTop,L=B+k.clientHeight+M,H=D.scrollTop,V=H+D.clientHeight;if(B>=H&&L<=V)F--;else{P=Math.max(0,Math.min(L,V)-Math.max(B,H)),R=k.clientHeight;break}}F>=1&&o(k=>{let B=R*F-P+M;return k>=B?k:B})}}):null,Ele({padding:p,apply({availableWidth:j,availableHeight:N,elements:I}){Object.assign(I.floating.style,{overflow:"auto",maxWidth:`${j}px`,maxHeight:`min(var(--anchor-max-height, 100vh), ${N}px)`})}})].filter(Boolean),whileElementsMounted:zj}),[E=m,_=y]=x.placement.split("-");m==="selection"&&(E="selection");let S=w.useMemo(()=>({anchor:[E,_].filter(Boolean).join(" ")}),[E,_]),O=Uue(x,{overflowRef:a,onChange:o}),{getReferenceProps:$,getFloatingProps:T}=zue([O]),C=Q(j=>{s(j),v.setFloating(j)});return w.createElement(kx.Provider,{value:r},w.createElement(el.Provider,{value:{setFloating:C,setReference:v.setReference,styles:g,getReferenceProps:$,getFloatingProps:T,slot:S}},e))}function Yue(e){he(()=>{if(!e)return;let t=new MutationObserver(()=>{let n=window.getComputedStyle(e).maxHeight,r=parseFloat(n);if(isNaN(r))return;let i=parseInt(n);isNaN(i)||r!==i&&(e.style.maxHeight=`${Math.ceil(r)}px`)});return t.observe(e,{attributes:!0,attributeFilter:["style"]}),()=>{t.disconnect()}},[e])}function Que(e,t){var n,r,i;let o=pm((n=e==null?void 0:e.gap)!=null?n:"var(--anchor-gap, 0)",t),a=pm((r=e==null?void 0:e.offset)!=null?r:"var(--anchor-offset, 0)",t),l=pm((i=e==null?void 0:e.padding)!=null?i:"var(--anchor-padding, 0)",t);return{...e,gap:o,offset:a,padding:l}}function pm(e,t,n=void 0){let r=mo(),i=Q((s,u)=>{if(s==null)return[n,null];if(typeof s=="number")return[s,null];if(typeof s=="string"){if(!u)return[n,null];let c=KE(s,u);return[c,f=>{let d=NC(s);{let p=d.map(h=>window.getComputedStyle(u).getPropertyValue(h));r.requestAnimationFrame(function h(){r.nextFrame(h);let m=!1;for(let[v,g]of d.entries()){let x=window.getComputedStyle(u).getPropertyValue(g);if(p[v]!==x){p[v]=x,m=!0;break}}if(!m)return;let y=KE(s,u);c!==y&&(f(y),c=y)})}return r.dispose}]}return[n,null]}),o=w.useMemo(()=>i(e,t)[0],[e,t]),[a=o,l]=w.useState();return he(()=>{let[s,u]=i(e,t);if(l(s),!!u)return u(l)},[e,t]),a}function NC(e){let t=/var\((.*)\)/.exec(e);if(t){let n=t[1].indexOf(",");if(n===-1)return[t[1]];let r=t[1].slice(0,n).trim(),i=t[1].slice(n+1).trim();return i?[r,...NC(i)]:[r]}return[]}function KE(e,t){let n=document.createElement("div");t.appendChild(n),n.style.setProperty("margin-top","0px","important"),n.style.setProperty("margin-top",e,"important");let r=parseFloat(window.getComputedStyle(n).marginTop)||0;return t.removeChild(n),r}let zp=w.createContext(null);zp.displayName="OpenClosedContext";var Et=(e=>(e[e.Open=1]="Open",e[e.Closed=2]="Closed",e[e.Closing=4]="Closing",e[e.Opening=8]="Opening",e))(Et||{});function $u(){return w.useContext(zp)}function MC({value:e,children:t}){return A.createElement(zp.Provider,{value:e},t)}function Zue({children:e}){return A.createElement(zp.Provider,{value:null},e)}function Jue(e){function t(){document.readyState!=="loading"&&(e(),document.removeEventListener("DOMContentLoaded",t))}typeof window<"u"&&typeof document<"u"&&(document.addEventListener("DOMContentLoaded",t),t())}let Vr=[];Jue(()=>{function e(t){if(!(t.target instanceof HTMLElement)||t.target===document.body||Vr[0]===t.target)return;let n=t.target;n=n.closest(pd),Vr.unshift(n??t.target),Vr=Vr.filter(r=>r!=null&&r.isConnected),Vr.splice(10)}window.addEventListener("click",e,{capture:!0}),window.addEventListener("mousedown",e,{capture:!0}),window.addEventListener("focus",e,{capture:!0}),document.body.addEventListener("click",e,{capture:!0}),document.body.addEventListener("mousedown",e,{capture:!0}),document.body.addEventListener("focus",e,{capture:!0})});function ece(e){throw new Error("Unexpected object: "+e)}var gt=(e=>(e[e.First=0]="First",e[e.Previous=1]="Previous",e[e.Next=2]="Next",e[e.Last=3]="Last",e[e.Specific=4]="Specific",e[e.Nothing=5]="Nothing",e))(gt||{});function hm(e,t){let n=t.resolveItems();if(n.length<=0)return null;let r=t.resolveActiveIndex(),i=r??-1;switch(e.focus){case 0:{for(let o=0;o<n.length;++o)if(!t.resolveDisabled(n[o],o,n))return o;return r}case 1:{i===-1&&(i=n.length);for(let o=i-1;o>=0;--o)if(!t.resolveDisabled(n[o],o,n))return o;return r}case 2:{for(let o=i+1;o<n.length;++o)if(!t.resolveDisabled(n[o],o,n))return o;return r}case 3:{for(let o=n.length-1;o>=0;--o)if(!t.resolveDisabled(n[o],o,n))return o;return r}case 4:{for(let o=0;o<n.length;++o)if(t.resolveId(n[o],o,n)===e.id)return o;return r}case 5:return null;default:ece(e)}}function IC(e){let t=Q(e),n=w.useRef(!1);w.useEffect(()=>(n.current=!1,()=>{n.current=!0,Lp(()=>{n.current&&t()})}),[t])}function tce(){let e=typeof document>"u";return"useSyncExternalStore"in Rc?(t=>t.useSyncExternalStore)(Rc)(()=>()=>{},()=>!1,()=>!e):!1}function Pu(){let e=tce(),[t,n]=w.useState(Ki.isHandoffComplete);return t&&Ki.isHandoffComplete===!1&&n(!1),w.useEffect(()=>{t!==!0&&n(!0)},[t]),w.useEffect(()=>Ki.handoff(),[]),e?!1:t}let RC=w.createContext(!1);function nce(){return w.useContext(RC)}function qE(e){return A.createElement(RC.Provider,{value:e.force},e.children)}function rce(e){let t=nce(),n=w.useContext(DC),r=Ja(e),[i,o]=w.useState(()=>{var a;if(!t&&n!==null)return(a=n.current)!=null?a:null;if(Ki.isServer)return null;let l=r==null?void 0:r.getElementById("headlessui-portal-root");if(l)return l;if(r===null)return null;let s=r.createElement("div");return s.setAttribute("id","headlessui-portal-root"),r.body.appendChild(s)});return w.useEffect(()=>{i!==null&&(r!=null&&r.body.contains(i)||r==null||r.body.appendChild(i))},[i,r]),w.useEffect(()=>{t||n!==null&&o(n.current)},[n,o,t]),i}let LC=w.Fragment,ice=Ee(function(e,t){let n=e,r=w.useRef(null),i=at(Bse(f=>{r.current=f}),t),o=Ja(r),a=rce(r),[l]=w.useState(()=>{var f;return Ki.isServer?null:(f=o==null?void 0:o.createElement("div"))!=null?f:null}),s=w.useContext(Yg),u=Pu();he(()=>{!a||!l||a.contains(l)||(l.setAttribute("data-headlessui-portal",""),a.appendChild(l))},[a,l]),he(()=>{if(l&&s)return s.register(l)},[s,l]),IC(()=>{var f;!a||!l||(l instanceof Node&&a.contains(l)&&a.removeChild(l),a.childNodes.length<=0&&((f=a.parentElement)==null||f.removeChild(a)))});let c=Re();return u?!a||!l?null:Ut.createPortal(c({ourProps:{ref:i},theirProps:n,slot:{},defaultTag:LC,name:"Portal"}),l):null});function oce(e,t){let n=at(t),{enabled:r=!0,...i}=e,o=Re();return r?A.createElement(ice,{...i,ref:n}):o({ourProps:{ref:n},theirProps:i,slot:{},defaultTag:LC,name:"Portal"})}let ace=w.Fragment,DC=w.createContext(null);function lce(e,t){let{target:n,...r}=e,i={ref:at(t)},o=Re();return A.createElement(DC.Provider,{value:n},o({ourProps:i,theirProps:r,defaultTag:ace,name:"Popover.Group"}))}let Yg=w.createContext(null);function sce(){let e=w.useContext(Yg),t=w.useRef([]),n=Q(o=>(t.current.push(o),e&&e.register(o),()=>r(o))),r=Q(o=>{let a=t.current.indexOf(o);a!==-1&&t.current.splice(a,1),e&&e.unregister(o)}),i=w.useMemo(()=>({register:n,unregister:r,portals:t}),[n,r,t]);return[t,w.useMemo(()=>function({children:o}){return A.createElement(Yg.Provider,{value:i},o)},[i])]}let uce=Ee(oce),FC=Ee(lce),BC=Object.assign(uce,{Group:FC});function cce(e,t=typeof document<"u"?document.defaultView:null,n){let r=Za(e,"escape");PC(t,"keydown",i=>{r&&(i.defaultPrevented||i.key===Ne.Escape&&n(i))})}function fce(){var e;let[t]=w.useState(()=>typeof window<"u"&&typeof window.matchMedia=="function"?window.matchMedia("(pointer: coarse)"):null),[n,r]=w.useState((e=t==null?void 0:t.matches)!=null?e:!1);return he(()=>{if(!t)return;function i(o){r(o.matches)}return t.addEventListener("change",i),()=>t.removeEventListener("change",i)},[t]),n}function dce({defaultContainers:e=[],portals:t,mainTreeNode:n}={}){let r=Ja(n),i=Q(()=>{var o,a;let l=[];for(let s of e)s!==null&&(s instanceof HTMLElement?l.push(s):"current"in s&&s.current instanceof HTMLElement&&l.push(s.current));if(t!=null&&t.current)for(let s of t.current)l.push(s);for(let s of(o=r==null?void 0:r.querySelectorAll("html > *, body > *"))!=null?o:[])s!==document.body&&s!==document.head&&s instanceof HTMLElement&&s.id!=="headlessui-portal-root"&&(n&&(s.contains(n)||s.contains((a=n==null?void 0:n.getRootNode())==null?void 0:a.host))||l.some(u=>s.contains(u))||l.push(s));return l});return{resolveContainers:i,contains:Q(o=>i().some(a=>a.contains(o)))}}let zC=w.createContext(null);function GE({children:e,node:t}){let[n,r]=w.useState(null),i=HC(t??n);return A.createElement(zC.Provider,{value:i},e,i===null&&A.createElement(Pa,{features:oo.Hidden,ref:o=>{var a,l;if(o){for(let s of(l=(a=wi(o))==null?void 0:a.querySelectorAll("html > *, body > *"))!=null?l:[])if(s!==document.body&&s!==document.head&&s instanceof HTMLElement&&s!=null&&s.contains(o)){r(s);break}}}}))}function HC(e=null){var t;return(t=w.useContext(zC))!=null?t:e}function Nx(){let e=w.useRef(!1);return he(()=>(e.current=!0,()=>{e.current=!1}),[]),e}var jl=(e=>(e[e.Forwards=0]="Forwards",e[e.Backwards=1]="Backwards",e))(jl||{});function pce(){let e=w.useRef(0);return OC(!0,"keydown",t=>{t.key==="Tab"&&(e.current=t.shiftKey?1:0)},!0),e}function UC(e){if(!e)return new Set;if(typeof e=="function")return new Set(e());let t=new Set;for(let n of e.current)n.current instanceof HTMLElement&&t.add(n.current);return t}let hce="div";var Ni=(e=>(e[e.None=0]="None",e[e.InitialFocus=1]="InitialFocus",e[e.TabLock=2]="TabLock",e[e.FocusLock=4]="FocusLock",e[e.RestoreFocus=8]="RestoreFocus",e[e.AutoFocus=16]="AutoFocus",e))(Ni||{});function mce(e,t){let n=w.useRef(null),r=at(n,t),{initialFocus:i,initialFocusFallback:o,containers:a,features:l=15,...s}=e;Pu()||(l=0);let u=Ja(n);xce(l,{ownerDocument:u});let c=bce(l,{ownerDocument:u,container:n,initialFocus:i,initialFocusFallback:o});wce(l,{ownerDocument:u,container:n,containers:a,previousActiveElement:c});let f=pce(),d=Q(g=>{let x=n.current;x&&(E=>E())(()=>{jn(f.current,{[jl.Forwards]:()=>{li(x,_t.First,{skipElements:[g.relatedTarget,o]})},[jl.Backwards]:()=>{li(x,_t.Last,{skipElements:[g.relatedTarget,o]})}})})}),p=Za(!!(l&2),"focus-trap#tab-lock"),h=mo(),m=w.useRef(!1),y={ref:r,onKeyDown(g){g.key=="Tab"&&(m.current=!0,h.requestAnimationFrame(()=>{m.current=!1}))},onBlur(g){if(!(l&4))return;let x=UC(a);n.current instanceof HTMLElement&&x.add(n.current);let E=g.relatedTarget;E instanceof HTMLElement&&E.dataset.headlessuiFocusGuard!=="true"&&(WC(x,E)||(m.current?li(n.current,jn(f.current,{[jl.Forwards]:()=>_t.Next,[jl.Backwards]:()=>_t.Previous})|_t.WrapAround,{relativeTo:g.target}):g.target instanceof HTMLElement&&Xn(g.target)))}},v=Re();return A.createElement(A.Fragment,null,p&&A.createElement(Pa,{as:"button",type:"button","data-headlessui-focus-guard":!0,onFocus:d,features:oo.Focusable}),v({ourProps:y,theirProps:s,defaultTag:hce,name:"FocusTrap"}),p&&A.createElement(Pa,{as:"button",type:"button","data-headlessui-focus-guard":!0,onFocus:d,features:oo.Focusable}))}let vce=Ee(mce),gce=Object.assign(vce,{features:Ni});function yce(e=!0){let t=w.useRef(Vr.slice());return Cx(([n],[r])=>{r===!0&&n===!1&&Lp(()=>{t.current.splice(0)}),r===!1&&n===!0&&(t.current=Vr.slice())},[e,Vr,t]),Q(()=>{var n;return(n=t.current.find(r=>r!=null&&r.isConnected))!=null?n:null})}function xce(e,{ownerDocument:t}){let n=!!(e&8),r=yce(n);Cx(()=>{n||(t==null?void 0:t.activeElement)===(t==null?void 0:t.body)&&Xn(r())},[n]),IC(()=>{n&&Xn(r())})}function bce(e,{ownerDocument:t,container:n,initialFocus:r,initialFocusFallback:i}){let o=w.useRef(null),a=Za(!!(e&1),"focus-trap#initial-focus"),l=Nx();return Cx(()=>{if(e===0)return;if(!a){i!=null&&i.current&&Xn(i.current);return}let s=n.current;s&&Lp(()=>{if(!l.current)return;let u=t==null?void 0:t.activeElement;if(r!=null&&r.current){if((r==null?void 0:r.current)===u){o.current=u;return}}else if(s.contains(u)){o.current=u;return}if(r!=null&&r.current)Xn(r.current);else{if(e&16){if(li(s,_t.First|_t.AutoFocus)!==Ys.Error)return}else if(li(s,_t.First)!==Ys.Error)return;if(i!=null&&i.current&&(Xn(i.current),(t==null?void 0:t.activeElement)===i.current))return;console.warn("There are no focusable elements inside the <FocusTrap />")}o.current=t==null?void 0:t.activeElement})},[i,a,e]),o}function wce(e,{ownerDocument:t,container:n,containers:r,previousActiveElement:i}){let o=Nx(),a=!!(e&4);PC(t==null?void 0:t.defaultView,"focus",l=>{if(!a||!o.current)return;let s=UC(r);n.current instanceof HTMLElement&&s.add(n.current);let u=i.current;if(!u)return;let c=l.target;c&&c instanceof HTMLElement?WC(s,c)?(i.current=c,Xn(c)):(l.preventDefault(),l.stopPropagation(),Xn(u)):Xn(i.current)},!0)}function WC(e,t){for(let n of e)if(n.contains(t))return!0;return!1}function VC(e){var t;return!!(e.enter||e.enterFrom||e.enterTo||e.leave||e.leaveFrom||e.leaveTo)||((t=e.as)!=null?t:qC)!==w.Fragment||A.Children.count(e.children)===1}let Hp=w.createContext(null);Hp.displayName="TransitionContext";var _ce=(e=>(e.Visible="visible",e.Hidden="hidden",e))(_ce||{});function Sce(){let e=w.useContext(Hp);if(e===null)throw new Error("A <Transition.Child /> is used but it is missing a parent <Transition /> or <Transition.Root />.");return e}function Ece(){let e=w.useContext(Up);if(e===null)throw new Error("A <Transition.Child /> is used but it is missing a parent <Transition /> or <Transition.Root />.");return e}let Up=w.createContext(null);Up.displayName="NestingContext";function Wp(e){return"children"in e?Wp(e.children):e.current.filter(({el:t})=>t.current!==null).filter(({state:t})=>t==="visible").length>0}function KC(e,t){let n=Rr(e),r=w.useRef([]),i=Nx(),o=mo(),a=Q((p,h=Xr.Hidden)=>{let m=r.current.findIndex(({el:y})=>y===p);m!==-1&&(jn(h,{[Xr.Unmount](){r.current.splice(m,1)},[Xr.Hidden](){r.current[m].state="hidden"}}),o.microTask(()=>{var y;!Wp(r)&&i.current&&((y=n.current)==null||y.call(n))}))}),l=Q(p=>{let h=r.current.find(({el:m})=>m===p);return h?h.state!=="visible"&&(h.state="visible"):r.current.push({el:p,state:"visible"}),()=>a(p,Xr.Unmount)}),s=w.useRef([]),u=w.useRef(Promise.resolve()),c=w.useRef({enter:[],leave:[]}),f=Q((p,h,m)=>{s.current.splice(0),t&&(t.chains.current[h]=t.chains.current[h].filter(([y])=>y!==p)),t==null||t.chains.current[h].push([p,new Promise(y=>{s.current.push(y)})]),t==null||t.chains.current[h].push([p,new Promise(y=>{Promise.all(c.current[h].map(([v,g])=>g)).then(()=>y())})]),h==="enter"?u.current=u.current.then(()=>t==null?void 0:t.wait.current).then(()=>m(h)):m(h)}),d=Q((p,h,m)=>{Promise.all(c.current[h].splice(0).map(([y,v])=>v)).then(()=>{var y;(y=s.current.shift())==null||y()}).then(()=>m(h))});return w.useMemo(()=>({children:r,register:l,unregister:a,onStart:f,onStop:d,wait:u,chains:c}),[l,a,r,f,d,c,u])}let qC=w.Fragment,GC=$a.RenderStrategy;function Oce(e,t){var n,r;let{transition:i=!0,beforeEnter:o,afterEnter:a,beforeLeave:l,afterLeave:s,enter:u,enterFrom:c,enterTo:f,entered:d,leave:p,leaveFrom:h,leaveTo:m,...y}=e,[v,g]=w.useState(null),x=w.useRef(null),E=VC(e),_=at(...E?[x,t,g]:t===null?[]:[t]),S=(n=y.unmount)==null||n?Xr.Unmount:Xr.Hidden,{show:O,appear:$,initial:T}=Sce(),[C,j]=w.useState(O?"visible":"hidden"),N=Ece(),{register:I,unregister:D}=N;he(()=>I(x),[I,x]),he(()=>{if(S===Xr.Hidden&&x.current){if(O&&C!=="visible"){j("visible");return}return jn(C,{hidden:()=>D(x),visible:()=>I(x)})}},[C,x,I,D,O,S]);let M=Pu();he(()=>{if(E&&M&&C==="visible"&&x.current===null)throw new Error("Did you forget to passthrough the `ref` to the actual DOM node?")},[x,C,M,E]);let F=T&&!$,R=$&&O&&T,P=w.useRef(!1),k=KC(()=>{P.current||(j("hidden"),D(x))},N),B=Q(Ce=>{P.current=!0;let Oe=Ce?"enter":"leave";k.onStart(x,Oe,K=>{K==="enter"?o==null||o():K==="leave"&&(l==null||l())})}),L=Q(Ce=>{let Oe=Ce?"enter":"leave";P.current=!1,k.onStop(x,Oe,K=>{K==="enter"?a==null||a():K==="leave"&&(s==null||s())}),Oe==="leave"&&!Wp(k)&&(j("hidden"),D(x))});w.useEffect(()=>{E&&i||(B(O),L(O))},[O,E,i]);let H=!(!i||!E||!M||F),[,V]=jC(H,v,O,{start:B,end:L}),re=Hr({ref:_,className:((r=qg(y.className,R&&u,R&&c,V.enter&&u,V.enter&&V.closed&&c,V.enter&&!V.closed&&f,V.leave&&p,V.leave&&!V.closed&&h,V.leave&&V.closed&&m,!V.transition&&O&&d))==null?void 0:r.trim())||void 0,...TC(V)}),ie=0;C==="visible"&&(ie|=Et.Open),C==="hidden"&&(ie|=Et.Closed),V.enter&&(ie|=Et.Opening),V.leave&&(ie|=Et.Closing);let J=Re();return A.createElement(Up.Provider,{value:k},A.createElement(MC,{value:ie},J({ourProps:re,theirProps:y,defaultTag:qC,features:GC,visible:C==="visible",name:"Transition.Child"})))}function $ce(e,t){let{show:n,appear:r=!1,unmount:i=!0,...o}=e,a=w.useRef(null),l=VC(e),s=at(...l?[a,t]:t===null?[]:[t]);Pu();let u=$u();if(n===void 0&&u!==null&&(n=(u&Et.Open)===Et.Open),n===void 0)throw new Error("A <Transition /> is used but it is missing a `show={true | false}` prop.");let[c,f]=w.useState(n?"visible":"hidden"),d=KC(()=>{n||f("hidden")}),[p,h]=w.useState(!0),m=w.useRef([n]);he(()=>{p!==!1&&m.current[m.current.length-1]!==n&&(m.current.push(n),h(!1))},[m,n]);let y=w.useMemo(()=>({show:n,appear:r,initial:p}),[n,r,p]);he(()=>{n?f("visible"):!Wp(d)&&a.current!==null&&f("hidden")},[n,d]);let v={unmount:i},g=Q(()=>{var _;p&&h(!1),(_=e.beforeEnter)==null||_.call(e)}),x=Q(()=>{var _;p&&h(!1),(_=e.beforeLeave)==null||_.call(e)}),E=Re();return A.createElement(Up.Provider,{value:d},A.createElement(Hp.Provider,{value:y},E({ourProps:{...v,as:w.Fragment,children:A.createElement(XC,{ref:s,...v,...o,beforeEnter:g,beforeLeave:x})},theirProps:{},defaultTag:w.Fragment,features:GC,visible:c==="visible",name:"Transition"})))}function Pce(e,t){let n=w.useContext(Hp)!==null,r=$u()!==null;return A.createElement(A.Fragment,null,!n&&r?A.createElement(Qg,{ref:t,...e}):A.createElement(XC,{ref:t,...e}))}let Qg=Ee($ce),XC=Ee(Oce),Vp=Ee(Pce),Ace=Object.assign(Qg,{Child:Vp,Root:Qg});var Tce=(e=>(e[e.Open=0]="Open",e[e.Closed=1]="Closed",e))(Tce||{}),jce=(e=>(e[e.SetTitleId=0]="SetTitleId",e))(jce||{});let Cce={0(e,t){return e.titleId===t.id?e:{...e,titleId:t.id}}},Mx=w.createContext(null);Mx.displayName="DialogContext";function Kp(e){let t=w.useContext(Mx);if(t===null){let n=new Error(`<${e} /> is missing a parent <Dialog /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(n,Kp),n}return t}function kce(e,t){return jn(t.type,Cce,e,t)}let XE=Ee(function(e,t){let n=w.useId(),{id:r=`headlessui-dialog-${n}`,open:i,onClose:o,initialFocus:a,role:l="dialog",autoFocus:s=!0,__demoMode:u=!1,unmount:c=!1,...f}=e,d=w.useRef(!1);l=function(){return l==="dialog"||l==="alertdialog"?l:(d.current||(d.current=!0,console.warn(`Invalid role [${l}] passed to <Dialog />. Only \`dialog\` and and \`alertdialog\` are supported. Using \`dialog\` instead.`)),"dialog")}();let p=$u();i===void 0&&p!==null&&(i=(p&Et.Open)===Et.Open);let h=w.useRef(null),m=at(h,t),y=Ja(h),v=i?0:1,[g,x]=w.useReducer(kce,{titleId:null,descriptionId:null,panelRef:w.createRef()}),E=Q(()=>o(!1)),_=Q(L=>x({type:0,id:L})),S=Pu()?v===0:!1,[O,$]=sce(),T={get current(){var L;return(L=g.panelRef.current)!=null?L:h.current}},C=HC(),{resolveContainers:j}=dce({mainTreeNode:C,portals:O,defaultContainers:[T]}),N=p!==null?(p&Et.Closing)===Et.Closing:!1;bC(u||N?!1:S,{allowed:Q(()=>{var L,H;return[(H=(L=h.current)==null?void 0:L.closest("[data-headlessui-portal]"))!=null?H:null]}),disallowed:Q(()=>{var L;return[(L=C==null?void 0:C.closest("body > *:not(#headlessui-portal-root)"))!=null?L:null]})}),$C(S,j,L=>{L.preventDefault(),E()}),cce(S,y==null?void 0:y.defaultView,L=>{L.preventDefault(),L.stopPropagation(),document.activeElement&&"blur"in document.activeElement&&typeof document.activeElement.blur=="function"&&document.activeElement.blur(),E()}),AC(u||N?!1:S,y,j),wC(S,h,E);let[I,D]=Eu(),M=w.useMemo(()=>[{dialogState:v,close:E,setTitleId:_,unmount:c},g],[v,g,E,_,c]),F=w.useMemo(()=>({open:v===0}),[v]),R={ref:m,id:r,role:l,tabIndex:-1,"aria-modal":u?void 0:v===0?!0:void 0,"aria-labelledby":g.titleId,"aria-describedby":I,unmount:c},P=!fce(),k=Ni.None;S&&!u&&(k|=Ni.RestoreFocus,k|=Ni.TabLock,s&&(k|=Ni.AutoFocus),P&&(k|=Ni.InitialFocus));let B=Re();return A.createElement(Zue,null,A.createElement(qE,{force:!0},A.createElement(BC,null,A.createElement(Mx.Provider,{value:M},A.createElement(FC,{target:h},A.createElement(qE,{force:!1},A.createElement(D,{slot:F},A.createElement($,null,A.createElement(gce,{initialFocus:a,initialFocusFallback:h,containers:j,features:k},A.createElement(Yse,{value:E},B({ourProps:R,theirProps:f,slot:F,defaultTag:Nce,features:Mce,visible:v===0,name:"Dialog"})))))))))))}),Nce="div",Mce=$a.RenderStrategy|$a.Static;function Ice(e,t){let{transition:n=!1,open:r,...i}=e,o=$u(),a=e.hasOwnProperty("open")||o!==null,l=e.hasOwnProperty("onClose");if(!a&&!l)throw new Error("You have to provide an `open` and an `onClose` prop to the `Dialog` component.");if(!a)throw new Error("You provided an `onClose` prop to the `Dialog`, but forgot an `open` prop.");if(!l)throw new Error("You provided an `open` prop to the `Dialog`, but forgot an `onClose` prop.");if(!o&&typeof e.open!="boolean")throw new Error(`You provided an \`open\` prop to the \`Dialog\`, but the value is not a boolean. Received: ${e.open}`);if(typeof e.onClose!="function")throw new Error(`You provided an \`onClose\` prop to the \`Dialog\`, but the value is not a function. Received: ${e.onClose}`);return(r!==void 0||n)&&!i.static?A.createElement(GE,null,A.createElement(Ace,{show:r,transition:n,unmount:i.unmount},A.createElement(XE,{ref:t,...i}))):A.createElement(GE,null,A.createElement(XE,{ref:t,open:r,...i}))}let Rce="div";function Lce(e,t){let n=w.useId(),{id:r=`headlessui-dialog-panel-${n}`,transition:i=!1,...o}=e,[{dialogState:a,unmount:l},s]=Kp("Dialog.Panel"),u=at(t,s.panelRef),c=w.useMemo(()=>({open:a===0}),[a]),f=Q(y=>{y.stopPropagation()}),d={ref:u,id:r,onClick:f},p=i?Vp:w.Fragment,h=i?{unmount:l}:{},m=Re();return A.createElement(p,{...h},m({ourProps:d,theirProps:o,slot:c,defaultTag:Rce,name:"Dialog.Panel"}))}let Dce="div";function Fce(e,t){let{transition:n=!1,...r}=e,[{dialogState:i,unmount:o}]=Kp("Dialog.Backdrop"),a=w.useMemo(()=>({open:i===0}),[i]),l={ref:t,"aria-hidden":!0},s=n?Vp:w.Fragment,u=n?{unmount:o}:{},c=Re();return A.createElement(s,{...u},c({ourProps:l,theirProps:r,slot:a,defaultTag:Dce,name:"Dialog.Backdrop"}))}let Bce="h2";function zce(e,t){let n=w.useId(),{id:r=`headlessui-dialog-title-${n}`,...i}=e,[{dialogState:o,setTitleId:a}]=Kp("Dialog.Title"),l=at(t);w.useEffect(()=>(a(r),()=>a(null)),[r,a]);let s=w.useMemo(()=>({open:o===0}),[o]),u={ref:l,id:r};return Re()({ourProps:u,theirProps:i,slot:s,defaultTag:Bce,name:"Dialog.Title"})}let Hce=Ee(Ice),YC=Ee(Lce),Uce=Ee(Fce),Wce=Ee(zce),Vce=Object.assign(Hce,{Panel:YC,Title:Wce,Description:vC}),Kce="div";function qce(e,t){let n=`headlessui-control-${w.useId()}`,[r,i]=Ou(),[o,a]=Eu(),l=Su(),{disabled:s=l||!1,...u}=e,c=w.useMemo(()=>({disabled:s}),[s]),f={ref:t,disabled:s||void 0,"aria-disabled":s||void 0},d=Re();return A.createElement(Ese,{value:s},A.createElement(i,{value:r},A.createElement(a,{value:o},A.createElement(Dse,{id:n},d({ourProps:f,theirProps:{...u,children:A.createElement(Mse,null,typeof u.children=="function"?u.children(c):u.children)},slot:c,defaultTag:Kce,name:"Field"})))))}let Gce=Ee(qce);function Xce(e,t){let n=w.useRef({left:0,top:0});if(he(()=>{if(!t)return;let i=t.getBoundingClientRect();i&&(n.current=i)},[e,t]),t==null||!e||t===document.activeElement)return!1;let r=t.getBoundingClientRect();return r.top!==n.current.top||r.left!==n.current.left}let YE=/([\u2700-\u27BF]|[\uE000-\uF8FF]|\uD83C[\uDC00-\uDFFF]|\uD83D[\uDC00-\uDFFF]|[\u2011-\u26FF]|\uD83E[\uDD10-\uDDFF])/g;function QE(e){var t,n;let r=(t=e.innerText)!=null?t:"",i=e.cloneNode(!0);if(!(i instanceof HTMLElement))return r;let o=!1;for(let l of i.querySelectorAll('[hidden],[aria-hidden],[role="img"]'))l.remove(),o=!0;let a=o?(n=i.innerText)!=null?n:"":r;return YE.test(a)&&(a=a.replace(YE,"")),a}function Yce(e){let t=e.getAttribute("aria-label");if(typeof t=="string")return t.trim();let n=e.getAttribute("aria-labelledby");if(n){let r=n.split(" ").map(i=>{let o=document.getElementById(i);if(o){let a=o.getAttribute("aria-label");return typeof a=="string"?a.trim():QE(o).trim()}return null}).filter(Boolean);if(r.length>0)return r.join(", ")}return QE(e).trim()}function Qce(e){let t=w.useRef(""),n=w.useRef("");return Q(()=>{let r=e.current;if(!r)return"";let i=r.innerText;if(t.current===i)return n.current;let o=Yce(r).trim().toLowerCase();return t.current=i,n.current=o,o})}var Zce=(e=>(e[e.Open=0]="Open",e[e.Closed=1]="Closed",e))(Zce||{}),Jce=(e=>(e[e.Pointer=0]="Pointer",e[e.Other=1]="Other",e))(Jce||{}),efe=(e=>(e[e.OpenMenu=0]="OpenMenu",e[e.CloseMenu=1]="CloseMenu",e[e.GoToItem=2]="GoToItem",e[e.Search=3]="Search",e[e.ClearSearch=4]="ClearSearch",e[e.RegisterItem=5]="RegisterItem",e[e.UnregisterItem=6]="UnregisterItem",e[e.SetButtonElement=7]="SetButtonElement",e[e.SetItemsElement=8]="SetItemsElement",e))(efe||{});function mm(e,t=n=>n){let n=e.activeItemIndex!==null?e.items[e.activeItemIndex]:null,r=jx(t(e.items.slice()),o=>o.dataRef.current.domRef.current),i=n?r.indexOf(n):null;return i===-1&&(i=null),{items:r,activeItemIndex:i}}let tfe={1(e){return e.menuState===1?e:{...e,activeItemIndex:null,menuState:1}},0(e){return e.menuState===0?e:{...e,__demoMode:!1,menuState:0}},2:(e,t)=>{var n,r,i,o,a;if(e.menuState===1)return e;let l={...e,searchQuery:"",activationTrigger:(n=t.trigger)!=null?n:1,__demoMode:!1};if(t.focus===gt.Nothing)return{...l,activeItemIndex:null};if(t.focus===gt.Specific)return{...l,activeItemIndex:e.items.findIndex(c=>c.id===t.id)};if(t.focus===gt.Previous){let c=e.activeItemIndex;if(c!==null){let f=e.items[c].dataRef.current.domRef,d=hm(t,{resolveItems:()=>e.items,resolveActiveIndex:()=>e.activeItemIndex,resolveId:p=>p.id,resolveDisabled:p=>p.dataRef.current.disabled});if(d!==null){let p=e.items[d].dataRef.current.domRef;if(((r=f.current)==null?void 0:r.previousElementSibling)===p.current||((i=p.current)==null?void 0:i.previousElementSibling)===null)return{...l,activeItemIndex:d}}}}else if(t.focus===gt.Next){let c=e.activeItemIndex;if(c!==null){let f=e.items[c].dataRef.current.domRef,d=hm(t,{resolveItems:()=>e.items,resolveActiveIndex:()=>e.activeItemIndex,resolveId:p=>p.id,resolveDisabled:p=>p.dataRef.current.disabled});if(d!==null){let p=e.items[d].dataRef.current.domRef;if(((o=f.current)==null?void 0:o.nextElementSibling)===p.current||((a=p.current)==null?void 0:a.nextElementSibling)===null)return{...l,activeItemIndex:d}}}}let s=mm(e),u=hm(t,{resolveItems:()=>s.items,resolveActiveIndex:()=>s.activeItemIndex,resolveId:c=>c.id,resolveDisabled:c=>c.dataRef.current.disabled});return{...l,...s,activeItemIndex:u}},3:(e,t)=>{let n=e.searchQuery!==""?0:1,r=e.searchQuery+t.value.toLowerCase(),i=(e.activeItemIndex!==null?e.items.slice(e.activeItemIndex+n).concat(e.items.slice(0,e.activeItemIndex+n)):e.items).find(a=>{var l;return((l=a.dataRef.current.textValue)==null?void 0:l.startsWith(r))&&!a.dataRef.current.disabled}),o=i?e.items.indexOf(i):-1;return o===-1||o===e.activeItemIndex?{...e,searchQuery:r}:{...e,searchQuery:r,activeItemIndex:o,activationTrigger:1}},4(e){return e.searchQuery===""?e:{...e,searchQuery:"",searchActiveItemIndex:null}},5:(e,t)=>{let n=mm(e,r=>[...r,{id:t.id,dataRef:t.dataRef}]);return{...e,...n}},6:(e,t)=>{let n=mm(e,r=>{let i=r.findIndex(o=>o.id===t.id);return i!==-1&&r.splice(i,1),r});return{...e,...n,activationTrigger:1}},7:(e,t)=>e.buttonElement===t.element?e:{...e,buttonElement:t.element},8:(e,t)=>e.itemsElement===t.element?e:{...e,itemsElement:t.element}},Ix=w.createContext(null);Ix.displayName="MenuContext";function qp(e){let t=w.useContext(Ix);if(t===null){let n=new Error(`<${e} /> is missing a parent <Menu /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(n,qp),n}return t}function nfe(e,t){return jn(t.type,tfe,e,t)}let rfe=w.Fragment;function ife(e,t){let{__demoMode:n=!1,...r}=e,i=w.useReducer(nfe,{__demoMode:n,menuState:n?0:1,buttonElement:null,itemsElement:null,items:[],searchQuery:"",activeItemIndex:null,activationTrigger:1}),[{menuState:o,itemsElement:a,buttonElement:l},s]=i,u=at(t);$C(o===0,[l,a],(h,m)=>{s({type:1}),Tx(m,Ax.Loose)||(h.preventDefault(),l==null||l.focus())});let c=Q(()=>{s({type:1})}),f=w.useMemo(()=>({open:o===0,close:c}),[o,c]),d={ref:u},p=Re();return A.createElement(Xue,null,A.createElement(Ix.Provider,{value:i},A.createElement(MC,{value:jn(o,{0:Et.Open,1:Et.Closed})},p({ourProps:d,theirProps:r,slot:f,defaultTag:rfe,name:"Menu"}))))}let ofe="button";function afe(e,t){var n;let r=w.useId(),{id:i=`headlessui-menu-button-${r}`,disabled:o=!1,autoFocus:a=!1,...l}=e,[s,u]=qp("Menu.Button"),c=Kue(),f=at(t,Vue(),Q(O=>u({type:7,element:O}))),d=Q(O=>{switch(O.key){case Ne.Space:case Ne.Enter:case Ne.ArrowDown:O.preventDefault(),O.stopPropagation(),Ut.flushSync(()=>u({type:0})),u({type:2,focus:gt.First});break;case Ne.ArrowUp:O.preventDefault(),O.stopPropagation(),Ut.flushSync(()=>u({type:0})),u({type:2,focus:gt.Last});break}}),p=Q(O=>{switch(O.key){case Ne.Space:O.preventDefault();break}}),h=Q(O=>{var $;if($x(O.currentTarget))return O.preventDefault();o||(s.menuState===0?(Ut.flushSync(()=>u({type:1})),($=s.buttonElement)==null||$.focus({preventScroll:!0})):(O.preventDefault(),u({type:0})))}),{isFocusVisible:m,focusProps:y}=Ox({autoFocus:a}),{isHovered:v,hoverProps:g}=Ex({isDisabled:o}),{pressed:x,pressProps:E}=Sse({disabled:o}),_=w.useMemo(()=>({open:s.menuState===0,active:x||s.menuState===0,disabled:o,hover:v,focus:m,autofocus:a}),[s,v,m,x,o,a]),S=Dp(c(),{ref:f,id:i,type:due(e,s.buttonElement),"aria-haspopup":"menu","aria-controls":(n=s.itemsElement)==null?void 0:n.id,"aria-expanded":s.menuState===0,disabled:o||void 0,autoFocus:a,onKeyDown:d,onKeyUp:p,onClick:h},y,g,E);return Re()({ourProps:S,theirProps:l,slot:_,defaultTag:ofe,name:"Menu.Button"})}let lfe="div",sfe=$a.RenderStrategy|$a.Static;function ufe(e,t){var n,r;let i=w.useId(),{id:o=`headlessui-menu-items-${i}`,anchor:a,portal:l=!1,modal:s=!0,transition:u=!1,...c}=e,f=Wue(a),[d,p]=qp("Menu.Items"),[h,m]=Gue(f),y=que(),[v,g]=w.useState(null),x=at(t,f?h:null,Q(P=>p({type:8,element:P})),g),E=Ja(d.itemsElement);f&&(l=!0);let _=$u(),[S,O]=jC(u,v,_!==null?(_&Et.Open)===Et.Open:d.menuState===0);wC(S,d.buttonElement,()=>{p({type:1})});let $=d.__demoMode?!1:s&&d.menuState===0;AC($,E);let T=d.__demoMode?!1:s&&d.menuState===0;bC(T,{allowed:w.useCallback(()=>[d.buttonElement,d.itemsElement],[d.buttonElement,d.itemsElement])});let C=d.menuState!==0,j=Xce(C,d.buttonElement)?!1:S;w.useEffect(()=>{let P=d.itemsElement;P&&d.menuState===0&&P!==(E==null?void 0:E.activeElement)&&P.focus({preventScroll:!0})},[d.menuState,d.itemsElement,E]),Oue(d.menuState===0,{container:d.itemsElement,accept(P){return P.getAttribute("role")==="menuitem"?NodeFilter.FILTER_REJECT:P.hasAttribute("role")?NodeFilter.FILTER_SKIP:NodeFilter.FILTER_ACCEPT},walk(P){P.setAttribute("role","none")}});let N=mo(),I=Q(P=>{var k,B,L;switch(N.dispose(),P.key){case Ne.Space:if(d.searchQuery!=="")return P.preventDefault(),P.stopPropagation(),p({type:3,value:P.key});case Ne.Enter:if(P.preventDefault(),P.stopPropagation(),p({type:1}),d.activeItemIndex!==null){let{dataRef:H}=d.items[d.activeItemIndex];(B=(k=H.current)==null?void 0:k.domRef.current)==null||B.click()}SC(d.buttonElement);break;case Ne.ArrowDown:return P.preventDefault(),P.stopPropagation(),p({type:2,focus:gt.Next});case Ne.ArrowUp:return P.preventDefault(),P.stopPropagation(),p({type:2,focus:gt.Previous});case Ne.Home:case Ne.PageUp:return P.preventDefault(),P.stopPropagation(),p({type:2,focus:gt.First});case Ne.End:case Ne.PageDown:return P.preventDefault(),P.stopPropagation(),p({type:2,focus:gt.Last});case Ne.Escape:P.preventDefault(),P.stopPropagation(),Ut.flushSync(()=>p({type:1})),(L=d.buttonElement)==null||L.focus({preventScroll:!0});break;case Ne.Tab:P.preventDefault(),P.stopPropagation(),Ut.flushSync(()=>p({type:1})),uue(d.buttonElement,P.shiftKey?_t.Previous:_t.Next);break;default:P.key.length===1&&(p({type:3,value:P.key}),N.setTimeout(()=>p({type:4}),350));break}}),D=Q(P=>{switch(P.key){case Ne.Space:P.preventDefault();break}}),M=w.useMemo(()=>({open:d.menuState===0}),[d.menuState]),F=Dp(f?y():{},{"aria-activedescendant":d.activeItemIndex===null||(n=d.items[d.activeItemIndex])==null?void 0:n.id,"aria-labelledby":(r=d.buttonElement)==null?void 0:r.id,id:o,onKeyDown:I,onKeyUp:D,role:"menu",tabIndex:d.menuState===0?0:void 0,ref:x,style:{...c.style,...m,"--button-width":eue(d.buttonElement,!0).width},...TC(O)}),R=Re();return A.createElement(BC,{enabled:l?e.static||S:!1},R({ourProps:F,theirProps:c,slot:M,defaultTag:lfe,features:sfe,visible:j,name:"Menu.Items"}))}let cfe=w.Fragment;function ffe(e,t){let n=w.useId(),{id:r=`headlessui-menu-item-${n}`,disabled:i=!1,...o}=e,[a,l]=qp("Menu.Item"),s=a.activeItemIndex!==null?a.items[a.activeItemIndex].id===r:!1,u=w.useRef(null),c=at(t,u);he(()=>{if(!a.__demoMode&&a.menuState===0&&s&&a.activationTrigger!==0)return er().requestAnimationFrame(()=>{var j,N;(N=(j=u.current)==null?void 0:j.scrollIntoView)==null||N.call(j,{block:"nearest"})})},[a.__demoMode,u,s,a.menuState,a.activationTrigger,a.activeItemIndex]);let f=Qce(u),d=w.useRef({disabled:i,domRef:u,get textValue(){return f()}});he(()=>{d.current.disabled=i},[d,i]),he(()=>(l({type:5,id:r,dataRef:d}),()=>l({type:6,id:r})),[d,r]);let p=Q(()=>{l({type:1})}),h=Q(j=>{if(i)return j.preventDefault();l({type:1}),SC(a.buttonElement)}),m=Q(()=>{if(i)return l({type:2,focus:gt.Nothing});l({type:2,focus:gt.Specific,id:r})}),y=yue(),v=Q(j=>{y.update(j),!i&&(s||l({type:2,focus:gt.Specific,id:r,trigger:0}))}),g=Q(j=>{y.wasMoved(j)&&(i||s||l({type:2,focus:gt.Specific,id:r,trigger:0}))}),x=Q(j=>{y.wasMoved(j)&&(i||s&&l({type:2,focus:gt.Nothing}))}),[E,_]=Ou(),[S,O]=Eu(),$=w.useMemo(()=>({active:s,focus:s,disabled:i,close:p}),[s,i,p]),T={id:r,ref:c,role:"menuitem",tabIndex:i===!0?void 0:-1,"aria-disabled":i===!0?!0:void 0,"aria-labelledby":E,"aria-describedby":S,disabled:void 0,onClick:h,onFocus:m,onPointerEnter:v,onMouseEnter:v,onPointerMove:g,onMouseMove:g,onPointerLeave:x,onMouseLeave:x},C=Re();return A.createElement(_,null,A.createElement(O,null,C({ourProps:T,theirProps:o,slot:$,defaultTag:cfe,name:"Menu.Item"})))}let dfe="div";function pfe(e,t){let[n,r]=Ou(),i=e,o={ref:t,"aria-labelledby":n,role:"group"},a=Re();return A.createElement(r,null,a({ourProps:o,theirProps:i,slot:{},defaultTag:dfe,name:"Menu.Section"}))}let hfe="header";function mfe(e,t){let n=w.useId(),{id:r=`headlessui-menu-heading-${n}`,...i}=e,o=Px();he(()=>o.register(r),[r,o.register]);let a={id:r,ref:t,role:"presentation",...o.props};return Re()({ourProps:a,theirProps:i,slot:{},defaultTag:hfe,name:"Menu.Heading"})}let vfe="div";function gfe(e,t){let n=e,r={ref:t,role:"separator"};return Re()({ourProps:r,theirProps:n,slot:{},defaultTag:vfe,name:"Menu.Separator"})}let yfe=Ee(ife),QC=Ee(afe),ZC=Ee(ufe),JC=Ee(ffe),xfe=Ee(pfe),bfe=Ee(mfe),wfe=Ee(gfe),_fe=Object.assign(yfe,{Button:QC,Items:ZC,Item:JC,Section:xfe,Heading:bfe,Separator:wfe});var Sfe=(e=>(e[e.RegisterOption=0]="RegisterOption",e[e.UnregisterOption=1]="UnregisterOption",e))(Sfe||{});let Efe={0(e,t){let n=[...e.options,{id:t.id,element:t.element,propsRef:t.propsRef}];return{...e,options:jx(n,r=>r.element.current)}},1(e,t){let n=e.options.slice(),r=e.options.findIndex(i=>i.id===t.id);return r===-1?e:(n.splice(r,1),{...e,options:n})}},Rx=w.createContext(null);Rx.displayName="RadioGroupDataContext";function Lx(e){let t=w.useContext(Rx);if(t===null){let n=new Error(`<${e} /> is missing a parent <RadioGroup /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(n,Lx),n}return t}let Dx=w.createContext(null);Dx.displayName="RadioGroupActionsContext";function Fx(e){let t=w.useContext(Dx);if(t===null){let n=new Error(`<${e} /> is missing a parent <RadioGroup /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(n,Fx),n}return t}function Ofe(e,t){return jn(t.type,Efe,e,t)}let $fe="div";function Pfe(e,t){let n=w.useId(),r=Su(),{id:i=`headlessui-radiogroup-${n}`,value:o,form:a,name:l,onChange:s,by:u,disabled:c=r||!1,defaultValue:f,...d}=e,p=Zse(u),[h,m]=w.useReducer(Ofe,{options:[]}),y=h.options,[v,g]=Ou(),[x,E]=Eu(),_=w.useRef(null),S=at(_,t),O=jse(f),[$,T]=Tse(o,s,O),C=w.useMemo(()=>y.find(L=>!L.propsRef.current.disabled),[y]),j=w.useMemo(()=>y.some(L=>p(L.propsRef.current.value,$)),[y,$]),N=Q(L=>{var H;if(c||p(L,$))return!1;let V=(H=y.find(re=>p(re.propsRef.current.value,L)))==null?void 0:H.propsRef.current;return V!=null&&V.disabled?!1:(T==null||T(L),!0)}),I=Q(L=>{let H=_.current;if(!H)return;let V=wi(H),re=y.filter(ie=>ie.propsRef.current.disabled===!1).map(ie=>ie.element.current);switch(L.key){case Ne.Enter:Cse(L.currentTarget);break;case Ne.ArrowLeft:case Ne.ArrowUp:if(L.preventDefault(),L.stopPropagation(),li(re,_t.Previous|_t.WrapAround)===Ys.Success){let ie=y.find(J=>J.element.current===(V==null?void 0:V.activeElement));ie&&N(ie.propsRef.current.value)}break;case Ne.ArrowRight:case Ne.ArrowDown:if(L.preventDefault(),L.stopPropagation(),li(re,_t.Next|_t.WrapAround)===Ys.Success){let ie=y.find(J=>J.element.current===(V==null?void 0:V.activeElement));ie&&N(ie.propsRef.current.value)}break;case Ne.Space:{L.preventDefault(),L.stopPropagation();let ie=y.find(J=>J.element.current===(V==null?void 0:V.activeElement));ie&&N(ie.propsRef.current.value)}break}}),D=Q(L=>(m({type:0,...L}),()=>m({type:1,id:L.id}))),M=w.useMemo(()=>({value:$,firstOption:C,containsCheckedOption:j,disabled:c,compare:p,...h}),[$,C,j,c,p,h]),F=w.useMemo(()=>({registerOption:D,change:N}),[D,N]),R={ref:S,id:i,role:"radiogroup","aria-labelledby":v,"aria-describedby":x,onKeyDown:I},P=w.useMemo(()=>({value:$}),[$]),k=w.useCallback(()=>{if(O!==void 0)return N(O)},[N,O]),B=Re();return A.createElement(E,{name:"RadioGroup.Description"},A.createElement(g,{name:"RadioGroup.Label"},A.createElement(Dx.Provider,{value:F},A.createElement(Rx.Provider,{value:M},l!=null&&A.createElement(Rse,{disabled:c,data:{[l]:$||"on"},overrides:{type:"radio",checked:$!=null},form:a,onReset:k}),B({ourProps:R,theirProps:d,slot:P,defaultTag:$fe,name:"RadioGroup"})))))}let Afe="div";function Tfe(e,t){var n;let r=Lx("RadioGroup.Option"),i=Fx("RadioGroup.Option"),o=w.useId(),{id:a=`headlessui-radiogroup-option-${o}`,value:l,disabled:s=r.disabled||!1,autoFocus:u=!1,...c}=e,f=w.useRef(null),d=at(f,t),[p,h]=Ou(),[m,y]=Eu(),v=Rr({value:l,disabled:s});he(()=>i.registerOption({id:a,element:f,propsRef:v}),[a,i,f,v]);let g=Q(N=>{var I;if($x(N.currentTarget))return N.preventDefault();i.change(l)&&((I=f.current)==null||I.focus())}),x=((n=r.firstOption)==null?void 0:n.id)===a,{isFocusVisible:E,focusProps:_}=Ox({autoFocus:u}),{isHovered:S,hoverProps:O}=Ex({isDisabled:s}),$=r.compare(r.value,l),T=Dp({ref:d,id:a,role:"radio","aria-checked":$?"true":"false","aria-labelledby":p,"aria-describedby":m,"aria-disabled":s?!0:void 0,tabIndex:s?-1:$||!r.containsCheckedOption&&x?0:-1,onClick:s?void 0:g,autoFocus:u},_,O),C=w.useMemo(()=>({checked:$,disabled:s,active:E,hover:S,focus:E,autofocus:u}),[$,s,S,E,u]),j=Re();return A.createElement(y,{name:"RadioGroup.Description"},A.createElement(h,{name:"RadioGroup.Label"},j({ourProps:T,theirProps:c,slot:C,defaultTag:Afe,name:"RadioGroup.Option"})))}let jfe="span";function Cfe(e,t){var n;let r=Lx("Radio"),i=Fx("Radio"),o=w.useId(),a=pC(),l=Su(),{id:s=a||`headlessui-radio-${o}`,value:u,disabled:c=r.disabled||l||!1,autoFocus:f=!1,...d}=e,p=w.useRef(null),h=at(p,t),m=gC(),y=zse(),v=Rr({value:u,disabled:c});he(()=>i.registerOption({id:s,element:p,propsRef:v}),[s,i,p,v]);let g=Q(j=>{var N;if($x(j.currentTarget))return j.preventDefault();i.change(u)&&((N=p.current)==null||N.focus())}),{isFocusVisible:x,focusProps:E}=Ox({autoFocus:f}),{isHovered:_,hoverProps:S}=Ex({isDisabled:c}),O=((n=r.firstOption)==null?void 0:n.id)===s,$=r.compare(r.value,u),T=Dp({ref:h,id:s,role:"radio","aria-checked":$?"true":"false","aria-labelledby":m,"aria-describedby":y,"aria-disabled":c?!0:void 0,tabIndex:c?-1:$||!r.containsCheckedOption&&O?0:-1,autoFocus:f,onClick:c?void 0:g},E,S),C=w.useMemo(()=>({checked:$,disabled:c,hover:_,focus:x,autofocus:f}),[$,c,_,x,f]);return Re()({ourProps:T,theirProps:d,slot:C,defaultTag:jfe,name:"Radio"})}let kfe=Ee(Pfe),Nfe=Ee(Tfe),ek=Ee(Cfe),Mfe=Gse,Ife=vC,Rfe=Object.assign(kfe,{Option:Nfe,Radio:ek,Label:Mfe,Description:Ife});const Bx=({items:e,selectedItem:t,onItemSelect:n,size:r="sm"})=>b.jsx("div",{className:"relative h-full",children:b.jsxs(_fe,{children:[b.jsxs(QC,{className:`inline-flex h-full w-48 justify-between items-center gap-x-1.5 rounded-md bg-white px-3 text-${r} font-medium text-gray-900 shadow-sm ring-1 ring-gray-300 hover:bg-gray-50`,children:[t,b.jsx(DP,{className:"size-4 text-gray-400","aria-hidden":"true"})]}),b.jsx(ZC,{className:"absolute right-0 z-10 mt-2 w-48 origin-top-right rounded-md bg-white shadow-lg ring-1 ring-black/5 focus:outline-none",children:b.jsx("div",{className:"py-1",children:e.map(i=>b.jsx(JC,{children:b.jsx("button",{onClick:()=>n(i),className:`block w-full px-4 py-2 text-left text-${r} data-[focus]:bg-gray-100 data-[focus]:text-gray-900 text-gray-700`,children:i})},i))})})]})}),Lfe=({items:e,selectedItem:t,onItemSelect:n,size:r="sm"})=>b.jsx(Rfe,{value:t,onChange:n,className:`inline-flex justify-between items-center rounded-md bg-white text-${r} font-medium text-gray-900 shadow-sm ring-1 ring-gray-300`,children:e.map(i=>b.jsx(Gce,{className:"flex h-full first:rounded-l-md last:rounded-r-md overflow-hidden",children:b.jsx(ek,{value:i,className:"cursor-pointer h-full data-[checked]:bg-gray-200 hover:bg-gray-50 flex items-center px-4 shadow-sm",children:i})},i))});function Dfe({onSearch:e}){return b.jsxs("div",{className:"relative w-full md:w-[26rem] rounded-md",children:[b.jsx("div",{className:"absolute inset-y-0 left-0 pl-3 flex items-center pointer-events-none",children:b.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",className:"w-5 h-5 text-gray-400",children:b.jsx("path",{fillRule:"evenodd",d:"M9 3.5a5.5 5.5 0 100 11 5.5 5.5 0 000-11zM2 9a7 7 0 1112.452 4.391l3.328 3.329a.75.75 0 11-1.06 1.06l-3.329-3.328A7 7 0 012 9z",clipRule:"evenodd"})})}),b.jsx("input",{type:"text",className:"block w-full pl-10 px-3 py-3 text-sm font-medium text-gray-900 shadow-sm rounded-md hover:bg-gray-50 outline outline-1 -outline-offset-1 outline-gray-300 placeholder:text-gray-400 focus:outline focus:outline-2 focus:-outline-offset-2 focus:outline-blue-600 w-",placeholder:"Search features...",onChange:t=>e(t.target.value)})]})}const Ffe=({features:e})=>{const[t,n]=w.useState("All Teams"),[r,i]=w.useState(""),o=w.useMemo(()=>{const l=new Set;return l.add("All Teams"),Object.values(e).forEach(s=>{var u;(u=s.assignments)!=null&&u.teams&&s.assignments.teams.forEach(c=>l.add(c))}),Array.from(l)},[e]),a=w.useMemo(()=>t==="All Teams"?e:Object.fromEntries(Object.entries(e).filter(([l,s])=>{var u,c;return(c=(u=s.assignments)==null?void 0:u.teams)==null?void 0:c.includes(t)})),[e,t]);return Object.entries(e).length,o.length-1,b.jsxs("div",{className:"h-screen max-w-7xl mx-auto flex flex-col gap-8 p-4 md:p-8",children:[b.jsxs("div",{className:"flex justify-between items-center",children:[b.jsx("h1",{className:"text-2xl font-bold text-gray-800",children:"Dashboard"}),b.jsx(Bx,{items:o,selectedItem:t,onItemSelect:n})]}),b.jsx("div",{children:b.jsxs("ul",{className:"grid grid-cols-1 md:grid-cols-2 xl:grid-cols-3 gap-6",children:[b.jsx("li",{className:"px-4 py-6 border border-gray-200 shadow-sm bg-white rounded-lg",children:b.jsx(Zle,{features:a})}),b.jsx("li",{className:"px-4 py-6 border border-gray-200 shadow-sm bg-white rounded-lg",children:b.jsx(Jle,{features:a})}),b.jsx("li",{className:"px-4 py-6 border border-gray-200 shadow-sm bg-white rounded-lg",children:b.jsx(ese,{features:a})})]})}),b.jsxs("div",{className:"flex-1 flex flex-col gap-6 h-full overflow-scroll",children:[b.jsxs("div",{className:"flex items-center justify-between gap-12",children:[b.jsxs("div",{className:"flex items-center gap-2",children:[b.jsx(Zi,{className:"w-5 h-5 text-gray-600","aria-hidden":"true"}),b.jsxs("span",{className:"text-sm text-gray-600 font-medium",children:["Features: ",Object.entries(a).length]})]}),b.jsx("div",{children:b.jsx(Dfe,{onSearch:i})})]}),b.jsx(tse,{features:a,searchTerm:r,teamContext:t!=="All Teams"?t:null})]})]})},Bfe=({features:e})=>{const t=Object.values(e).reduce((r,i)=>{const o=i.additional_metrics.health.overall;if(o!=null){const a=Yj(o);r[a]++}return r},{needsAttention:0,needsImprovement:0,healthy:0}),n=Object.entries(t).map(([r,i],o)=>({name:r,value:i,fill:[wt(rt.needsAttention).hex,wt(rt.needsImprovement).hex,wt(rt.healthy).hex][o]})).filter(({value:r})=>r>0);return b.jsxs("div",{className:"flex flex-col gap-6",children:[b.jsxs("div",{className:"flex items-center justify-between",children:[b.jsxs("h3",{className:"flex items-center text-xs font-medium text-gray-600 uppercase",children:[b.jsx("div",{className:"flex-shrink-0 bg-gray-100 rounded-md h-8 w-8 flex items-center justify-center",children:b.jsx(r0,{className:"size-5"})}),b.jsx("span",{className:"flex pl-2",children:"Health Score"})]}),b.jsxs("div",{className:"relative flex-shrink-0 group",children:[b.jsx(mi,{className:"size-4 text-gray-400"}),b.jsx("div",{className:"absolute whitespace-wrap bottom-full left-1/2 transform -translate-x-1/2 mb-2 hidden group-hover:block bg-gray-700 text-white text-xs rounded py-1 px-2 w-48",children:"Health Score distribution by category: shows how many features fall into each level from low (needs attention) to good (healthy)"})]})]}),b.jsxs("div",{className:"flex flex-col items-center gap-6",children:[b.jsx("div",{className:"relative size-48",children:b.jsx(Wa,{width:"100%",height:"100%",children:b.jsx(mu,{children:b.jsx(Xt,{data:n,dataKey:"value",nameKey:"name",innerRadius:"70%",outerRadius:"100%",paddingAngle:2})})})}),b.jsxs("ul",{className:"flex flex-col flex-1 gap-y-2",children:[b.jsxs("li",{className:"flex items-center gap-x-2",children:[b.jsx("div",{className:`flex-shrink-0 rounded size-6 flex items-center justify-center ${wt(rt.needsAttention).class}`,children:b.jsx("span",{className:"font-semibold text-white text-sm",children:t.needsAttention})}),b.jsx("p",{className:"text-sm text-gray-500",children:"Features needing attention"})]}),b.jsxs("li",{className:"flex items-center gap-x-2",children:[b.jsx("div",{className:`flex-shrink-0 rounded size-6 flex items-center justify-center ${wt(rt.needsImprovement).class}`,children:b.jsx("span",{className:"font-semibold text-white text-sm",children:t.needsImprovement})}),b.jsx("p",{className:"text-sm text-gray-500",children:"Features needing improvement"})]}),b.jsxs("li",{className:"flex items-center gap-x-2",children:[b.jsx("div",{className:`flex-shrink-0 rounded size-6 flex items-center justify-center ${wt(rt.healthy).class}`,children:b.jsx("span",{className:"font-semibold text-white text-sm",children:t.healthy})}),b.jsx("p",{className:"text-sm text-gray-500",children:"Healthy Features"})]})]})]})]})},zfe=({features:e})=>{const t=Object.values(e).reduce((i,o)=>{const a=o.additional_metrics.test_coverage.score;if(a!=null){const l=bj(a);i[l]++}return i},{poor:0,fair:0,good:0}),{minimum_thresholds:n}=hi.project.documentation_site.test_coverage,r=Object.entries(t).map(([i,o],a)=>({name:i,value:o,fill:[bt(n.poor).hex,bt(n.fair).hex,bt(n.good).hex][a]})).filter(({value:i})=>i>0);return b.jsxs("div",{className:"flex flex-col gap-6",children:[b.jsxs("div",{className:"flex items-center justify-between",children:[b.jsxs("h3",{className:"flex items-center text-xs font-medium text-gray-600 uppercase",children:[b.jsx("div",{className:"flex-shrink-0 bg-gray-100 rounded-md h-8 w-8 flex items-center justify-center",children:b.jsx(n0,{className:"size-5"})}),b.jsx("span",{className:"flex pl-2",children:"Test Coverage"})]}),b.jsxs("div",{className:"relative flex-shrink-0 group",children:[b.jsx(mi,{className:"size-4 text-gray-400"}),b.jsx("div",{className:"absolute whitespace-wrap bottom-full left-1/2 transform -translate-x-1/2 mb-2 hidden group-hover:block bg-gray-700 text-white text-xs rounded py-1 px-2 w-48",children:"Test Coverage distribution by category: shows how many features fall into each level from poor to good"})]})]}),b.jsxs("div",{className:"flex flex-col items-center gap-6",children:[b.jsx("div",{className:"relative size-48",children:b.jsx(Wa,{width:"100%",height:"100%",children:b.jsx(mu,{children:b.jsx(Xt,{data:r,dataKey:"value",nameKey:"name",innerRadius:"70%",outerRadius:"100%",paddingAngle:2})})})}),b.jsxs("ul",{className:"flex flex-col flex-1 gap-y-2",children:[b.jsxs("li",{className:"flex items-center gap-x-2",children:[b.jsx("div",{className:`flex-shrink-0 rounded size-6 flex items-center justify-center ${bt(n.poor).class}`,children:b.jsx("span",{className:"font-semibold text-white text-sm",children:t.poor})}),b.jsxs("p",{className:"text-sm text-gray-500",children:[b.jsx("span",{className:"",children:"Features with"})," poor coverage"]})]}),b.jsxs("li",{className:"flex items-center gap-x-2",children:[b.jsx("div",{className:`flex-shrink-0 rounded size-6 flex items-center justify-center ${bt(n.fair).class}`,children:b.jsx("span",{className:"font-semibold text-white text-sm",children:t.fair})}),b.jsxs("p",{className:"text-sm text-gray-500",children:[b.jsx("span",{className:"",children:"Features with"})," fair coverage"]})]}),b.jsxs("li",{className:"flex items-center gap-x-2",children:[b.jsx("div",{className:`flex-shrink-0 rounded size-6 flex items-center justify-center ${bt(n.good).class}`,children:b.jsx("span",{className:"font-semibold text-white text-sm",children:t.good})}),b.jsxs("p",{className:"text-sm text-gray-500",children:[b.jsx("span",{className:"",children:"Features with"})," good coverage"]})]})]})]})]})},Hfe=({features:e})=>{const t=Object.entries(e).reduce((r,[i,o])=>{const{integration_count:a,integration_pending:l,regression_count:s,regression_pending:u,unit_count:c,unit_pending:f}=o.test_pyramid||{};return{unit_count:r.unit_count+(c||0),unit_pending:r.unit_pending+(f||0),integration_count:r.integration_count+(a||0),integration_pending:r.integration_pending+(l||0),regression_count:r.regression_count+(s||0),regression_pending:r.regression_pending+(u||0)}},{unit_count:0,unit_pending:0,integration_count:0,integration_pending:0,regression_count:0,regression_pending:0}),n=[{value:Math.max(Math.log(t.unit_count+t.unit_pending),0),fill:"#1d4ed8"},{value:Math.max(Math.log(t.integration_count+t.integration_pending),0),fill:"#2563eb"},{value:Math.max(Math.log(t.regression_count+t.regression_pending),0),fill:"#3b82f6"}];return b.jsxs("div",{className:"flex flex-col gap-6",children:[b.jsxs("div",{className:"flex items-center justify-between",children:[b.jsxs("h3",{className:"flex items-center text-xs font-medium text-gray-600 uppercase",children:[b.jsx("div",{className:"flex-shrink-0 bg-gray-100 rounded-md h-8 w-8 flex items-center justify-center",children:b.jsx(VR,{className:"size-5"})}),b.jsx("span",{className:"flex pl-2",children:"Test Pyramid"})]}),b.jsxs("div",{className:"relative flex-shrink-0 group",children:[b.jsx(mi,{className:"size-4 text-gray-400"}),b.jsx("div",{className:"absolute whitespace-wrap bottom-full left-1/2 transform -translate-x-1/2 mb-2 hidden group-hover:block bg-gray-700 text-white text-xs rounded py-1 px-2 w-48",children:"Test pyramid distribution by category: shows features which are missing coverage in a given level of the pyramid, or which have a large number of pending tests."})]})]}),b.jsxs("div",{className:"flex flex-col items-center gap-6",children:[b.jsx("div",{className:"relative h-48 w-72",children:b.jsx(Wa,{width:"100%",height:"100%",children:b.jsx(fae,{width:730,height:250,children:b.jsx(bi,{dataKey:"value",data:n,reversed:!0,children:b.jsx(yr,{position:"right",fill:"#000",stroke:"none",dataKey:"name"})})})})}),b.jsxs("ul",{className:"flex flex-col flex-1 gap-y-2",children:[b.jsxs("li",{className:"flex items-center gap-x-2",children:[b.jsx("div",{className:"flex-shrink-0 rounded h-6 w-16 size-x-12 flex items-center justify-center bg-blue-500",children:b.jsx("span",{className:"font-semibold text-white text-sm",children:t.regression_count})}),b.jsxs("p",{className:"text-sm text-gray-500",children:["Regression Tests (",t.regression_pending," pending)"]})]}),b.jsxs("li",{className:"flex items-center gap-x-2",children:[b.jsx("div",{className:"flex-shrink-0 rounded h-6 w-16 flex items-center justify-center bg-blue-600",children:b.jsx("span",{className:"font-semibold text-white text-sm",children:t.integration_count})}),b.jsxs("p",{className:"text-sm text-gray-500",children:["Integration Tests (",t.integration_pending," pending)"]})]}),b.jsxs("li",{className:"flex items-center gap-x-2",children:[b.jsx("div",{className:"flex-shrink-0 rounded h-6 w-16 flex items-center justify-center bg-blue-700",children:b.jsx("span",{className:"font-semibold text-white text-sm",children:t.unit_count})}),b.jsxs("p",{className:"text-sm text-gray-500",children:["Unit Tests (",t.unit_pending," pending)"]})]})]})]})]})},pc=({title:e})=>b.jsx("th",{scope:"col",className:"px-4 py-3 text-left text-xs font-medium text-gray-800 uppercase tracking-wider",children:b.jsx("div",{className:"flex items-center gap-x-2",children:e})}),ZE=({features:e,metric:t,sortDirection:n="ASC"})=>Object.entries(e).sort(([r,i],[o,a])=>{const l=i.test_pyramid&&i.test_pyramid[t]||0,s=a.test_pyramid&&a.test_pyramid[t]||0;return l===s?a.additional_metrics.feature_size.score-i.additional_metrics.feature_size.score:n==="ASC"?l-s:s-l}).slice(0,5).map(([r,i])=>({featureName:r,score:i.test_pyramid&&i.test_pyramid[t]||0,feature:i})),JE=["Regression","Integration","Unit"],eO=["Missing","Pending"],tO={Pending:{Unit:"unit_pending",Integration:"integration_pending",Regression:"regression_pending"},Missing:{Unit:"unit_count",Integration:"integration_count",Regression:"regression_count"}},Ufe={Pending:{Unit:"Top 5 features with pending unit tests",Integration:"Top 5 features with pending integration tests",Regression:"Top 5 features with pending regression tests"},Missing:{Unit:"Bottom 5 features missing unit test coverage",Integration:"Bottom 5 features missing integration tests",Regression:"Bottom 5 features missing regression tests"}},Wfe=({features:e})=>{const[t,n]=w.useState(eO[0]),[r,i]=w.useState(JE[0]),[o,a]=w.useState(ZE({features:e,metric:tO[t][r],sortDirection:t==="Missing"?"ASC":""}));return w.useEffect(()=>{a(ZE({features:e,metric:tO[t][r],sortDirection:t==="Missing"?"ASC":""}))},[e,t,r]),b.jsxs(b.Fragment,{children:[b.jsxs("div",{className:"flex items-center justify-between px-4 py-6 bg-gray-50 rounded-md",children:[b.jsx("h3",{className:"flex items-center text-xs font-semibold text-gray-800 uppercase h-8",children:Ufe[t][r]}),b.jsxs("div",{className:"flex h-8",children:[b.jsx(Lfe,{items:eO,selectedItem:t,onItemSelect:n,size:"xs"}),b.jsx("span",{className:"mx-2"}),b.jsx(Bx,{items:JE,selectedItem:r,onItemSelect:i,size:"xs"})]})]}),b.jsx("div",{className:"flow-root",children:b.jsx("div",{className:"min-w-full align-middle",children:b.jsx("div",{className:"overflow-hidden rounded-md",children:b.jsxs("table",{className:"min-w-full",children:[b.jsx("thead",{className:"bg-gray-50 border-b border-gray-200",children:b.jsxs("tr",{children:[b.jsx(pc,{title:"Feature"}),b.jsx(pc,{title:"Team"}),b.jsx(pc,{title:"Size"}),b.jsx(pc,{title:t==="Missing"?`${r} Test Count`:"Pending Test Count"}),b.jsx("th",{scope:"col",className:"px-4 py-3 text-left text-xs font-medium text-gray-800 uppercase tracking-wider"})]})}),b.jsx("tbody",{className:"divide-y divide-gray-200 bg-white",children:o.map(({featureName:l,feature:s,score:u})=>{const c=s.additional_metrics.feature_size.percent_of_max,f=Ea(c);return b.jsxs("tr",{children:[b.jsx("td",{className:"w-full max-w-0 py-4 px-4 text-sm font-medium text-gray-900 sm:w-auto sm:max-w-none",children:b.jsx("div",{className:"",children:l})}),b.jsx("td",{className:"px-4 py-4 text-sm text-gray-500",children:b.jsxs("div",{className:"flex items-center gap-2",children:[b.jsx(Zi,{className:"size-4 text-gray-500"}),id(s.assignments.teams)]})}),b.jsx("td",{className:"px-4 py-4 text-sm text-gray-500",children:b.jsxs("div",{className:"flex items-center gap-x-2",children:[b.jsx("div",{className:"flex gap-1.5 items-center",children:[1,2,3,4,5].map(d=>b.jsx("div",{className:`h-5 w-1.5 rounded ${d<=qs(c)?"bg-blue-500":"bg-gray-200"}`},d))}),b.jsx("span",{className:"text-xs text-gray-500 uppercase",children:f})]})}),b.jsx("td",{className:"px-4 py-4 text-sm",children:b.jsx("div",{className:"flex items-center gap-x-2",children:u})}),b.jsx("td",{className:"px-4 py-4 text-sm text-gray-500",children:b.jsx("div",{className:"flex items-center gap-x-3",children:b.jsx("div",{children:b.jsx(Or,{to:`/${encodeURIComponent(l)}`,className:"flex items-center justify-center flex-shrink-0 font-medium text-gray-900 text-sm mb-1 hover:bg-gray-100 rounded-full h-6 w-6",children:b.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",className:"size-5",children:b.jsx("path",{fillRule:"evenodd",d:"M8.22 5.22a.75.75 0 0 1 1.06 0l4.25 4.25a.75.75 0 0 1 0 1.06l-4.25 4.25a.75.75 0 0 1-1.06-1.06L11.94 10 8.22 6.28a.75.75 0 0 1 0-1.06Z",clipRule:"evenodd"})})})})})})]},l)})})]})})})})]})};function Vfe({features:e}){const[t,n]=w.useState("All Teams"),r=w.useMemo(()=>{const s=new Set;return s.add("All Teams"),Object.values(e).forEach(u=>{var c;(c=u.assignments)!=null&&c.teams&&u.assignments.teams.forEach(f=>s.add(f))}),Array.from(s)},[e]),i=w.useMemo(()=>t==="All Teams"?e:Object.fromEntries(Object.entries(e).filter(([s,u])=>{var c,f;return(f=(c=u.assignments)==null?void 0:c.teams)==null?void 0:f.includes(t)})),[e,t]),o=w.useMemo(()=>Object.entries(i).map(([s,u])=>({name:s,data:u||0,health:u.additional_metrics.health.overall||0})).sort((s,u)=>s.health-u.health).slice(0,5),[i]),a=w.useMemo(()=>Object.entries(i).map(([s,u])=>({name:s,data:u||0,score:u.additional_metrics.test_coverage.score||0})).sort((s,u)=>s.score-u.score).slice(0,5),[i]),l=({title:s})=>b.jsx("th",{scope:"col",className:"px-4 py-3 text-left text-xs font-medium text-gray-800 uppercase tracking-wider",children:b.jsx("div",{className:"flex items-center gap-x-2",children:s})});return b.jsxs("div",{className:"h-screen max-w-7xl mx-auto flex flex-col gap-8 p-4 md:p-8",children:[b.jsxs("div",{className:"flex justify-between items-center",children:[b.jsx("h1",{className:"text-2xl font-bold text-gray-800",children:"Digest"}),b.jsx(Bx,{items:r,selectedItem:t,onItemSelect:n})]}),b.jsx("div",{className:"flow-root",children:b.jsxs("div",{className:"grid grid-cols-3 gap-6",children:[b.jsx("div",{className:"col-span-1 border border-gray-200 shadow-sm bg-white rounded-lg h-full",children:b.jsx("div",{className:"px-4 py-6 h-fit",children:b.jsx(Bfe,{features:i})})}),b.jsxs("div",{className:"col-span-2 h-full shadow-sm border border-gray-200 rounded-lg bg-white",children:[b.jsx("div",{className:"flex items-center justify-between px-4 py-6 bg-gray-50 rounded-md",children:b.jsx("h3",{className:"flex items-center text-xs font-semibold text-gray-800 uppercase h-8",children:"Bottom 5 Features by Health Score"})}),b.jsx("div",{className:"flow-root",children:b.jsx("div",{className:"min-w-full align-middle",children:b.jsx("div",{className:"overflow-hidden rounded-md",children:b.jsxs("table",{className:"min-w-full",children:[b.jsx("thead",{className:"bg-gray-50 border-b border-gray-200",children:b.jsxs("tr",{children:[b.jsx(l,{title:"Feature"}),b.jsx(l,{title:"Team"}),b.jsx(l,{title:"Size"}),b.jsx(l,{title:"Health Score"}),b.jsx("th",{scope:"col",className:"px-4 py-3 text-left text-xs font-medium text-gray-800 uppercase tracking-wider"})]})}),b.jsx("tbody",{className:"divide-y divide-gray-200 bg-white",children:o.map(s=>{const u=s.data.additional_metrics.feature_size.percent_of_max,c=Ea(u),f=s.data.additional_metrics.health.score||0;return b.jsxs("tr",{children:[b.jsx("td",{className:"w-full max-w-0 py-4 px-4 text-sm font-medium text-gray-900 sm:w-auto sm:max-w-none",children:b.jsx("div",{className:"",children:s.name})}),b.jsx("td",{className:"px-4 py-4 text-sm text-gray-500",children:b.jsxs("div",{className:"flex items-center gap-2",children:[b.jsx(Zi,{className:"size-4 text-gray-500"}),id(s.data.assignments.teams)]})}),b.jsx("td",{className:"px-4 py-4 text-sm text-gray-500",children:b.jsxs("div",{className:"flex items-center gap-x-2",children:[b.jsx("div",{className:"flex gap-1.5 items-center",children:[1,2,3,4,5].map(d=>b.jsx("div",{className:`h-5 w-1.5 rounded ${d<=qs(u)?"bg-blue-500":"bg-gray-200"}`},d))}),b.jsx("span",{className:"text-xs text-gray-500 uppercase",children:c})]})}),b.jsx("td",{className:"px-4 py-4 text-sm text-gray-500",children:b.jsxs("div",{className:"flex items-center gap-x-2",children:[b.jsx("div",{className:`w-4 h-4 rounded-full flex items-center justify-center ${Qj(f)}`,children:b.jsx("div",{className:`w-2 h-2 rounded-full ${wt(f).class}`})}),b.jsxs("span",{className:"text-gray-600",children:[f.toFixed(0),"%"]})]})}),b.jsx("td",{className:"px-4 py-4 text-sm text-gray-500",children:b.jsx("div",{className:"flex items-center gap-x-3",children:b.jsx("div",{children:b.jsx(Or,{to:`/${encodeURIComponent(s.name)}`,className:"flex items-center justify-center flex-shrink-0 font-medium text-gray-900 text-sm mb-1 hover:bg-gray-100 rounded-full h-6 w-6",children:b.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",className:"size-5",children:b.jsx("path",{fillRule:"evenodd",d:"M8.22 5.22a.75.75 0 0 1 1.06 0l4.25 4.25a.75.75 0 0 1 0 1.06l-4.25 4.25a.75.75 0 0 1-1.06-1.06L11.94 10 8.22 6.28a.75.75 0 0 1 0-1.06Z",clipRule:"evenodd"})})})})})})]},s.name)})})]})})})})]})]})}),b.jsx("div",{className:"flow-root",children:b.jsxs("div",{className:"grid grid-cols-3 gap-6",children:[b.jsx("div",{className:"col-span-1 border border-gray-200 shadow-sm bg-white rounded-lg",children:b.jsx("div",{className:"px-4 py-6",children:b.jsx(zfe,{features:i})})}),b.jsxs("div",{className:"col-span-2 h-full shadow-sm border border-gray-200 rounded-lg bg-white",children:[b.jsx("div",{className:"flex items-center justify-between px-4 py-6 bg-gray-50 rounded-md",children:b.jsx("h3",{className:"flex items-center text-xs font-semibold text-gray-800 uppercase h-8",children:"Bottom 5 Features by Test Coverage"})}),b.jsx("div",{className:"flow-root",children:b.jsx("div",{className:"min-w-full align-middle",children:b.jsx("div",{className:"overflow-hidden rounded-md",children:b.jsxs("table",{className:"min-w-full",children:[b.jsx("thead",{className:"bg-gray-50 border-b border-gray-200",children:b.jsxs("tr",{children:[b.jsx(l,{title:"Feature"}),b.jsx(l,{title:"Team"}),b.jsx(l,{title:"Size"}),b.jsx(l,{title:"Test Coverage"}),b.jsx("th",{scope:"col",className:"px-4 py-3 text-left text-xs font-medium text-gray-800 uppercase tracking-wider"})]})}),b.jsx("tbody",{className:"divide-y divide-gray-200 bg-white",children:a.map(s=>{const u=s.data.additional_metrics.feature_size.percent_of_max,c=Ea(u),f=s.data.additional_metrics.test_coverage.score||0;return b.jsxs("tr",{children:[b.jsx("td",{className:"w-full max-w-0 py-4 px-4 text-sm font-medium text-gray-900 sm:w-auto sm:max-w-none",children:b.jsx("div",{className:"",children:s.name})}),b.jsx("td",{className:"px-4 py-4 text-sm text-gray-500",children:b.jsxs("div",{className:"flex items-center gap-2",children:[b.jsx(Zi,{className:"size-4 text-gray-500"}),id(s.data.assignments.teams)]})}),b.jsx("td",{className:"px-4 py-4 text-sm text-gray-500",children:b.jsxs("div",{className:"flex items-center gap-x-2",children:[b.jsx("div",{className:"flex gap-1.5 items-center",children:[1,2,3,4,5].map(d=>b.jsx("div",{className:`h-5 w-1.5 rounded ${d<=qs(u)?"bg-blue-500":"bg-gray-200"}`},d))}),b.jsx("span",{className:"text-xs text-gray-500 uppercase",children:c})]})}),b.jsx("td",{className:"px-4 py-4 text-sm",children:b.jsxs("div",{className:"flex items-center gap-x-2",children:[b.jsx("div",{className:"flex-grow h-2 rounded-full bg-gray-100 overflow-hidden",children:b.jsx("div",{className:`h-full rounded-full ${bt(f).class}`,style:{width:`${f}%`}})}),b.jsx("span",{className:"text-sm text-gray-500",children:f?`${f.toFixed(0)}%`:"No Data"})]})}),b.jsx("td",{className:"px-4 py-4 text-sm text-gray-500",children:b.jsx("div",{className:"flex items-center gap-x-3",children:b.jsx("div",{children:b.jsx(Or,{to:`/${encodeURIComponent(s.name)}`,className:"flex items-center justify-center flex-shrink-0 font-medium text-gray-900 text-sm mb-1 hover:bg-gray-100 rounded-full h-6 w-6",children:b.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",className:"size-5",children:b.jsx("path",{fillRule:"evenodd",d:"M8.22 5.22a.75.75 0 0 1 1.06 0l4.25 4.25a.75.75 0 0 1 0 1.06l-4.25 4.25a.75.75 0 0 1-1.06-1.06L11.94 10 8.22 6.28a.75.75 0 0 1 0-1.06Z",clipRule:"evenodd"})})})})})})]},s.name)})})]})})})})]})]})}),b.jsx("div",{className:"flow-root",children:b.jsxs("div",{className:"grid grid-cols-3 gap-6",children:[b.jsx("div",{className:"col-span-1 border border-gray-200 shadow-sm bg-white rounded-lg",children:b.jsx("div",{className:"px-4 py-6",children:b.jsx(Hfe,{features:i})})}),b.jsx("div",{className:"col-span-2 h-full shadow-sm border border-gray-200 rounded-lg bg-white",children:b.jsx(Wfe,{features:i})})]})})]})}const Kfe=({files:e})=>{const{project:t,environment:n}=hi,r=`${t.repository.url}/blob/${n.git_ref}`,i=w.useMemo(()=>{const v=new Set;return e.forEach(g=>{const x=g.split("/");let E="";x.slice(0,-1).forEach(_=>{E=E?`${E}/${_}`:_,v.add(E)})}),v},[e]),[o,a]=w.useState("list"),[l,s]=w.useState(i),[u,c]=w.useState({key:null,direction:"asc"}),f=w.useMemo(()=>{const v={};return e.forEach(g=>{const x=g.split("/");let E=v;x.forEach((_,S)=>{S===x.length-1?E[_]={type:"file",path:g}:(E[_]=E[_]||{type:"directory",children:{}},E=E[_].children)})}),v},[e]),d=w.useMemo(()=>[...e].sort((v,g)=>u.key?v<g?u.direction==="asc"?-1:1:v>g?u.direction==="asc"?1:-1:0:0),[e,u]),p=v=>{s(g=>{const x=new Set(g);return x.has(v)?x.delete(v):x.add(v),x})},h=v=>{c(g=>({key:v,direction:g.key===v&&g.direction==="asc"?"desc":"asc"}))},m=(v,g="",x=0)=>v?Object.entries(v).map(([E,_])=>{const S=g?`${g}/${E}`:E,O=l.has(S);return _.type==="directory"?b.jsxs(A.Fragment,{children:[b.jsx("tr",{className:"hover:bg-gray-50",children:b.jsx("td",{className:"px-4 py-2 text-sm text-gray-900",children:b.jsxs("button",{onClick:()=>p(S),className:"flex items-center w-full group",style:{paddingLeft:`${x*16}px`},children:[O?b.jsx(DP,{className:"size-4 text-gray-400 mr-1 flex-shrink-0"}):b.jsx(RR,{className:"size-4 text-gray-400 mr-1 flex-shrink-0"}),b.jsx(FR,{className:"size-4 text-gray-400 mr-2 flex-shrink-0"}),b.jsx("span",{className:"font-medium text-gray-600 group-hover:text-gray-900",children:E})]})})}),O&&m(_.children,S,x+1)]},S):b.jsx("tr",{className:"",children:b.jsx("td",{className:"px-4 py-2 text-sm text-gray-900",children:b.jsxs("div",{className:"flex items-center",style:{paddingLeft:`${x*16+20}px`},children:[b.jsx(fv,{className:"size-4 text-gray-400 mr-2 flex-shrink-0"}),b.jsx("span",{className:"truncate",children:E})]})})},S)}):null,y=({title:v,sortKey:g,className:x=""})=>b.jsx("th",{scope:"col",className:`px-4 py-3 text-left text-xs font-medium text-gray-800 uppercase tracking-wider cursor-pointer ${x}`,onClick:()=>h(g),children:b.jsxs("div",{className:"flex items-center gap-x-2 group",children:[v,b.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:"1.5",stroke:"currentColor",className:"size-4 text-gray-400 group-hover:text-gray-600",children:b.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M3 7.5 7.5 3m0 0L12 7.5M7.5 3v13.5m13.5 0L16.5 21m0 0L12 16.5m4.5 4.5V7.5"})})]})});return b.jsx("div",{className:"bg-white rounded-lg border border-gray-200",children:b.jsx("div",{className:"overflow-hidden rounded-lg",children:b.jsxs("table",{className:"min-w-full divide-y divide-gray-200",children:[b.jsx("thead",{className:"bg-gray-50",children:b.jsxs("tr",{children:[b.jsx(y,{title:o==="list"?"File Path":"Name",sortKey:"path"}),b.jsx("th",{scope:"col",className:"px-4 py-3 text-center text-xs font-medium text-gray-800 uppercase tracking-wider",children:b.jsxs("div",{className:"flex items-center justify-end gap-2",children:[b.jsx("button",{onClick:()=>a("list"),className:`p-1 rounded ${o==="list"?"text-blue-600 bg-blue-100":"text-gray-500 hover:text-gray-700 hover:bg-gray-50"}`,children:b.jsx(UR,{className:"size-4"})}),b.jsx("button",{onClick:()=>a("tree"),className:`p-1 rounded ${o==="tree"?"text-blue-600 bg-blue-100":"text-gray-500 hover:text-gray-700 hover:bg-gray-50"}`,children:b.jsx(FP,{className:"size-4"})})]})})]})}),b.jsx("tbody",{className:"divide-y divide-gray-200",children:o==="list"?d.map(v=>b.jsx("tr",{className:"",children:b.jsx("td",{className:"px-4 py-3 text-sm font-medium text-gray-900 flex-1",children:b.jsxs("div",{className:"flex items-center",children:[b.jsx(fv,{className:"size-4 text-gray-400 mr-2 flex-shrink-0"}),b.jsx("a",{href:`${r}/${v}`,className:"truncate underline",target:"_blank",children:v})]})})},v)):m(f)})]})})})};function qfe({name:e,feature:t}){const{project:n}=hi,i=`is:pr label:"${`Feature ${e}`}"`,o=encodeURIComponent(i),a=`${n.repository.url}/pulls?q=${o}`;return b.jsxs("div",{className:"bg-white p-4 rounded-lg border border-gray-200 h-fit",children:[b.jsxs("div",{className:"mb-6",children:[b.jsx("h3",{className:"text-sm font-medium text-gray-900 mb-3",children:"Description"}),t.description&&b.jsx("p",{className:"text-sm md:text-base text-gray-600",children:t.description})]}),b.jsx("h3",{className:"text-sm font-medium text-gray-900 mb-3",children:"Metrics"}),b.jsxs("ul",{className:"mb-6 space-y-2",children:[b.jsxs("li",{className:"flex items-center gap-2",children:[b.jsx("div",{className:"flex-shrink-0",children:b.jsx(FP,{className:"size-4 text-gray-500"})}),b.jsxs("p",{className:"text-sm text-gray-700",children:[t.assignments.files?t.assignments.files.length:0," Total Files"]})]}),b.jsxs("li",{className:"flex items-center gap-2",children:[b.jsx("div",{className:"flex-shrink-0",children:b.jsx(KR,{className:"size-4 text-gray-500"})}),b.jsxs("p",{className:"text-sm text-gray-700",children:[(t.metrics.abc_size||0).toFixed(2)," ABC Size"]})]}),b.jsxs("li",{className:"flex items-center gap-2",children:[b.jsx("div",{className:"flex-shrink-0",children:b.jsx(fv,{className:"size-4 text-gray-500"})}),b.jsxs("p",{className:"text-sm text-gray-700",children:[t.metrics.lines_of_code||0," Lines of Code"]})]}),b.jsxs("li",{className:"flex items-center gap-2",children:[b.jsx("div",{className:"flex-shrink-0",children:b.jsx(BR,{className:"size-4 text-gray-500"})}),b.jsxs("p",{className:"text-sm text-gray-700",children:[t.metrics.cyclomatic_complexity||0," Cyclomatic Complexity"]})]}),b.jsxs("li",{className:"flex items-center gap-2",children:[b.jsx("div",{className:"flex-shrink-0",children:b.jsx(zR,{className:"size-4 text-gray-500"})}),b.jsxs("p",{className:"text-sm text-gray-700",children:[t.metrics.todo_locations?Object.keys(t.metrics.todo_locations).length:0," TODO Comments"]})]})]}),b.jsx("div",{className:"space-y-4 mb-6",children:b.jsxs("div",{children:[b.jsx("h3",{className:"text-sm font-medium text-gray-900 mb-3",children:"Teams"}),b.jsx("ul",{className:"flex flex-col gap-y-1",children:t.assignments.teams?t.assignments.teams.map(l=>b.jsxs("li",{className:"text-sm text-gray-700 flex gap-2",children:[b.jsx("div",{className:"flex items-center justify-center flex-shrink-0",children:b.jsx(Zi,{className:"size-4 text-gray-500"})}),l]},l)):b.jsxs("li",{className:"text-sm text-gray-700 flex gap-2",children:[b.jsx("div",{className:"flex items-center justify-center flex-shrink-0",children:b.jsx(Zi,{className:"size-4 text-gray-500"})}),b.jsx("span",{className:"text-gray-400 italic text-sm",children:"No teams assigned"})]})})]})}),b.jsxs("div",{className:"mb",children:[b.jsx("h3",{className:"text-sm font-medium text-gray-900 mb-3",children:"Resources"}),b.jsxs("ul",{className:"mb-6 space-y-2",children:[b.jsxs("li",{className:"flex items-center gap-2",children:[b.jsx("div",{className:"flex-shrink-0",children:b.jsx(Tc,{className:"size-4 text-gray-500"})}),b.jsx("a",{href:a,target:"_blank",className:"text-sm text-gray-700 hover:underline",children:"Feature Pull Requests"})]}),b.jsxs("li",{className:"flex items-center gap-2",children:[b.jsx("div",{className:"flex-shrink-0",children:b.jsx(Tc,{className:"size-4 text-gray-500"})}),t.documentation_link?b.jsx("a",{href:t.documentation_link,target:"_blank",className:"text-sm text-gray-700 hover:underline",children:"Feature Documentation"}):b.jsx("span",{className:"text-gray-400 italic text-sm",children:"Missing documentation link"})]}),b.jsxs("li",{className:"flex items-center gap-2",children:[b.jsx("div",{className:"flex-shrink-0",children:b.jsx(Tc,{className:"size-4 text-gray-500"})}),t.dashboard_link?b.jsx("a",{href:t.dashboard_link,target:"_blank",className:"text-sm text-gray-700 hover:underline",children:"New Relic Dashboard"}):b.jsx("span",{className:"text-gray-400 italic text-sm",children:"Missing New Relic Dashboard"})]})]})]})]})}const Gfe=({value:e,suffix:t="",color:n="#ef4444"})=>{const r=e===0?"transparent":n;return b.jsxs("div",{className:"relative h-20 w-20",children:[b.jsxs("svg",{className:"h-full w-full -rotate-90",viewBox:"0 0 36 36",children:[b.jsx("path",{d:"M18 2.0845 a 15.9155 15.9155 0 0 1 0 31.831 a 15.9155 15.9155 0 0 1 0 -31.831",fill:"none",stroke:"#eee",strokeWidth:"2"}),b.jsx("path",{d:"M18 2.0845 a 15.9155 15.9155 0 0 1 0 31.831 a 15.9155 15.9155 0 0 1 0 -31.831",fill:"none",stroke:r,strokeWidth:"2",strokeDasharray:`${e}, 100`})]}),b.jsxs("div",{className:"absolute inset-0 flex items-center justify-center",children:[b.jsx("span",{className:"text-2xl font-bold",children:Math.round(e)}),b.jsx("span",{className:"text-sm",children:t})]})]})},nO=({children:e,title:t,value:n,suffix:r="",icon:i,tooltip:o,color:a})=>b.jsxs("div",{className:"flex flex-col gap-6 px-4 py-6 border border-gray-200 shadow-sm bg-white rounded-lg",children:[b.jsxs("div",{className:"flex items-center justify-between",children:[b.jsxs("h3",{className:"flex items-center text-xs font-medium text-gray-600 uppercase",children:[b.jsx("div",{className:"flex-shrink-0 bg-gray-100 rounded-md h-8 w-8 flex items-center justify-center",children:i}),b.jsx("span",{className:"flex pl-2",children:t})]}),o&&b.jsxs(bu,{children:[b.jsx(Ya,{children:b.jsx(mi,{className:"size-4 text-gray-400"})}),b.jsx(Qa,{children:o})]})]}),b.jsxs("div",{className:"flex items-center gap-4",children:[b.jsx(Gfe,{value:n,suffix:r,color:a}),b.jsx("div",{className:"flex flex-col flex-1",children:e})]})]});var Xfe={value:()=>{}};function tk(){for(var e=0,t=arguments.length,n={},r;e<t;++e){if(!(r=arguments[e]+"")||r in n||/[\s.]/.test(r))throw new Error("illegal type: "+r);n[r]=[]}return new Nc(n)}function Nc(e){this._=e}function Yfe(e,t){return e.trim().split(/^|\s+/).map(function(n){var r="",i=n.indexOf(".");if(i>=0&&(r=n.slice(i+1),n=n.slice(0,i)),n&&!t.hasOwnProperty(n))throw new Error("unknown type: "+n);return{type:n,name:r}})}Nc.prototype=tk.prototype={constructor:Nc,on:function(e,t){var n=this._,r=Yfe(e+"",n),i,o=-1,a=r.length;if(arguments.length<2){for(;++o<a;)if((i=(e=r[o]).type)&&(i=Qfe(n[i],e.name)))return i;return}if(t!=null&&typeof t!="function")throw new Error("invalid callback: "+t);for(;++o<a;)if(i=(e=r[o]).type)n[i]=rO(n[i],e.name,t);else if(t==null)for(i in n)n[i]=rO(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 Nc(e)},call:function(e,t){if((i=arguments.length-2)>0)for(var n=new Array(i),r=0,i,o;r<i;++r)n[r]=arguments[r+2];if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(o=this._[e],r=0,i=o.length;r<i;++r)o[r].value.apply(t,n)},apply:function(e,t,n){if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(var r=this._[e],i=0,o=r.length;i<o;++i)r[i].value.apply(t,n)}};function Qfe(e,t){for(var n=0,r=e.length,i;n<r;++n)if((i=e[n]).name===t)return i.value}function rO(e,t,n){for(var r=0,i=e.length;r<i;++r)if(e[r].name===t){e[r]=Xfe,e=e.slice(0,r).concat(e.slice(r+1));break}return n!=null&&e.push({name:t,value:n}),e}var Zg="http://www.w3.org/1999/xhtml";const iO={svg:"http://www.w3.org/2000/svg",xhtml:Zg,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function Gp(e){var t=e+="",n=t.indexOf(":");return n>=0&&(t=e.slice(0,n))!=="xmlns"&&(e=e.slice(n+1)),iO.hasOwnProperty(t)?{space:iO[t],local:e}:e}function Zfe(e){return function(){var t=this.ownerDocument,n=this.namespaceURI;return n===Zg&&t.documentElement.namespaceURI===Zg?t.createElement(e):t.createElementNS(n,e)}}function Jfe(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function nk(e){var t=Gp(e);return(t.local?Jfe:Zfe)(t)}function ede(){}function zx(e){return e==null?ede:function(){return this.querySelector(e)}}function tde(e){typeof e!="function"&&(e=zx(e));for(var t=this._groups,n=t.length,r=new Array(n),i=0;i<n;++i)for(var o=t[i],a=o.length,l=r[i]=new Array(a),s,u,c=0;c<a;++c)(s=o[c])&&(u=e.call(s,s.__data__,c,o))&&("__data__"in s&&(u.__data__=s.__data__),l[c]=u);return new Kt(r,this._parents)}function nde(e){return e==null?[]:Array.isArray(e)?e:Array.from(e)}function rde(){return[]}function rk(e){return e==null?rde:function(){return this.querySelectorAll(e)}}function ide(e){return function(){return nde(e.apply(this,arguments))}}function ode(e){typeof e=="function"?e=ide(e):e=rk(e);for(var t=this._groups,n=t.length,r=[],i=[],o=0;o<n;++o)for(var a=t[o],l=a.length,s,u=0;u<l;++u)(s=a[u])&&(r.push(e.call(s,s.__data__,u,a)),i.push(s));return new Kt(r,i)}function ik(e){return function(){return this.matches(e)}}function ok(e){return function(t){return t.matches(e)}}var ade=Array.prototype.find;function lde(e){return function(){return ade.call(this.children,e)}}function sde(){return this.firstElementChild}function ude(e){return this.select(e==null?sde:lde(typeof e=="function"?e:ok(e)))}var cde=Array.prototype.filter;function fde(){return Array.from(this.children)}function dde(e){return function(){return cde.call(this.children,e)}}function pde(e){return this.selectAll(e==null?fde:dde(typeof e=="function"?e:ok(e)))}function hde(e){typeof e!="function"&&(e=ik(e));for(var t=this._groups,n=t.length,r=new Array(n),i=0;i<n;++i)for(var o=t[i],a=o.length,l=r[i]=[],s,u=0;u<a;++u)(s=o[u])&&e.call(s,s.__data__,u,o)&&l.push(s);return new Kt(r,this._parents)}function ak(e){return new Array(e.length)}function mde(){return new Kt(this._enter||this._groups.map(ak),this._parents)}function hd(e,t){this.ownerDocument=e.ownerDocument,this.namespaceURI=e.namespaceURI,this._next=null,this._parent=e,this.__data__=t}hd.prototype={constructor:hd,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 vde(e){return function(){return e}}function gde(e,t,n,r,i,o){for(var a=0,l,s=t.length,u=o.length;a<u;++a)(l=t[a])?(l.__data__=o[a],r[a]=l):n[a]=new hd(e,o[a]);for(;a<s;++a)(l=t[a])&&(i[a]=l)}function yde(e,t,n,r,i,o,a){var l,s,u=new Map,c=t.length,f=o.length,d=new Array(c),p;for(l=0;l<c;++l)(s=t[l])&&(d[l]=p=a.call(s,s.__data__,l,t)+"",u.has(p)?i[l]=s:u.set(p,s));for(l=0;l<f;++l)p=a.call(e,o[l],l,o)+"",(s=u.get(p))?(r[l]=s,s.__data__=o[l],u.delete(p)):n[l]=new hd(e,o[l]);for(l=0;l<c;++l)(s=t[l])&&u.get(d[l])===s&&(i[l]=s)}function xde(e){return e.__data__}function bde(e,t){if(!arguments.length)return Array.from(this,xde);var n=t?yde:gde,r=this._parents,i=this._groups;typeof e!="function"&&(e=vde(e));for(var o=i.length,a=new Array(o),l=new Array(o),s=new Array(o),u=0;u<o;++u){var c=r[u],f=i[u],d=f.length,p=wde(e.call(c,c&&c.__data__,u,r)),h=p.length,m=l[u]=new Array(h),y=a[u]=new Array(h),v=s[u]=new Array(d);n(c,f,m,y,v,p,t);for(var g=0,x=0,E,_;g<h;++g)if(E=m[g]){for(g>=x&&(x=g+1);!(_=y[x])&&++x<h;);E._next=_||null}}return a=new Kt(a,r),a._enter=l,a._exit=s,a}function wde(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function _de(){return new Kt(this._exit||this._groups.map(ak),this._parents)}function Sde(e,t,n){var r=this.enter(),i=this,o=this.exit();return typeof e=="function"?(r=e(r),r&&(r=r.selection())):r=r.append(e+""),t!=null&&(i=t(i),i&&(i=i.selection())),n==null?o.remove():n(o),r&&i?r.merge(i).order():i}function Ede(e){for(var t=e.selection?e.selection():e,n=this._groups,r=t._groups,i=n.length,o=r.length,a=Math.min(i,o),l=new Array(i),s=0;s<a;++s)for(var u=n[s],c=r[s],f=u.length,d=l[s]=new Array(f),p,h=0;h<f;++h)(p=u[h]||c[h])&&(d[h]=p);for(;s<i;++s)l[s]=n[s];return new Kt(l,this._parents)}function Ode(){for(var e=this._groups,t=-1,n=e.length;++t<n;)for(var r=e[t],i=r.length-1,o=r[i],a;--i>=0;)(a=r[i])&&(o&&a.compareDocumentPosition(o)^4&&o.parentNode.insertBefore(a,o),o=a);return this}function $de(e){e||(e=Pde);function t(f,d){return f&&d?e(f.__data__,d.__data__):!f-!d}for(var n=this._groups,r=n.length,i=new Array(r),o=0;o<r;++o){for(var a=n[o],l=a.length,s=i[o]=new Array(l),u,c=0;c<l;++c)(u=a[c])&&(s[c]=u);s.sort(t)}return new Kt(i,this._parents).order()}function Pde(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}function Ade(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}function Tde(){return Array.from(this)}function jde(){for(var e=this._groups,t=0,n=e.length;t<n;++t)for(var r=e[t],i=0,o=r.length;i<o;++i){var a=r[i];if(a)return a}return null}function Cde(){let e=0;for(const t of this)++e;return e}function kde(){return!this.node()}function Nde(e){for(var t=this._groups,n=0,r=t.length;n<r;++n)for(var i=t[n],o=0,a=i.length,l;o<a;++o)(l=i[o])&&e.call(l,l.__data__,o,i);return this}function Mde(e){return function(){this.removeAttribute(e)}}function Ide(e){return function(){this.removeAttributeNS(e.space,e.local)}}function Rde(e,t){return function(){this.setAttribute(e,t)}}function Lde(e,t){return function(){this.setAttributeNS(e.space,e.local,t)}}function Dde(e,t){return function(){var n=t.apply(this,arguments);n==null?this.removeAttribute(e):this.setAttribute(e,n)}}function Fde(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 Bde(e,t){var n=Gp(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?Ide:Mde:typeof t=="function"?n.local?Fde:Dde:n.local?Lde:Rde)(n,t))}function lk(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView}function zde(e){return function(){this.style.removeProperty(e)}}function Hde(e,t,n){return function(){this.style.setProperty(e,t,n)}}function Ude(e,t,n){return function(){var r=t.apply(this,arguments);r==null?this.style.removeProperty(e):this.style.setProperty(e,r,n)}}function Wde(e,t,n){return arguments.length>1?this.each((t==null?zde:typeof t=="function"?Ude:Hde)(e,t,n??"")):Aa(this.node(),e)}function Aa(e,t){return e.style.getPropertyValue(t)||lk(e).getComputedStyle(e,null).getPropertyValue(t)}function Vde(e){return function(){delete this[e]}}function Kde(e,t){return function(){this[e]=t}}function qde(e,t){return function(){var n=t.apply(this,arguments);n==null?delete this[e]:this[e]=n}}function Gde(e,t){return arguments.length>1?this.each((t==null?Vde:typeof t=="function"?qde:Kde)(e,t)):this.node()[e]}function sk(e){return e.trim().split(/^|\s+/)}function Hx(e){return e.classList||new uk(e)}function uk(e){this._node=e,this._names=sk(e.getAttribute("class")||"")}uk.prototype={add:function(e){var t=this._names.indexOf(e);t<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 ck(e,t){for(var n=Hx(e),r=-1,i=t.length;++r<i;)n.add(t[r])}function fk(e,t){for(var n=Hx(e),r=-1,i=t.length;++r<i;)n.remove(t[r])}function Xde(e){return function(){ck(this,e)}}function Yde(e){return function(){fk(this,e)}}function Qde(e,t){return function(){(t.apply(this,arguments)?ck:fk)(this,e)}}function Zde(e,t){var n=sk(e+"");if(arguments.length<2){for(var r=Hx(this.node()),i=-1,o=n.length;++i<o;)if(!r.contains(n[i]))return!1;return!0}return this.each((typeof t=="function"?Qde:t?Xde:Yde)(n,t))}function Jde(){this.textContent=""}function epe(e){return function(){this.textContent=e}}function tpe(e){return function(){var t=e.apply(this,arguments);this.textContent=t??""}}function npe(e){return arguments.length?this.each(e==null?Jde:(typeof e=="function"?tpe:epe)(e)):this.node().textContent}function rpe(){this.innerHTML=""}function ipe(e){return function(){this.innerHTML=e}}function ope(e){return function(){var t=e.apply(this,arguments);this.innerHTML=t??""}}function ape(e){return arguments.length?this.each(e==null?rpe:(typeof e=="function"?ope:ipe)(e)):this.node().innerHTML}function lpe(){this.nextSibling&&this.parentNode.appendChild(this)}function spe(){return this.each(lpe)}function upe(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function cpe(){return this.each(upe)}function fpe(e){var t=typeof e=="function"?e:nk(e);return this.select(function(){return this.appendChild(t.apply(this,arguments))})}function dpe(){return null}function ppe(e,t){var n=typeof e=="function"?e:nk(e),r=t==null?dpe:typeof t=="function"?t:zx(t);return this.select(function(){return this.insertBefore(n.apply(this,arguments),r.apply(this,arguments)||null)})}function hpe(){var e=this.parentNode;e&&e.removeChild(this)}function mpe(){return this.each(hpe)}function vpe(){var e=this.cloneNode(!1),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function gpe(){var e=this.cloneNode(!0),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function ype(e){return this.select(e?gpe:vpe)}function xpe(e){return arguments.length?this.property("__data__",e):this.node().__data__}function bpe(e){return function(t){e.call(this,t,this.__data__)}}function wpe(e){return e.trim().split(/^|\s+/).map(function(t){var n="",r=t.indexOf(".");return r>=0&&(n=t.slice(r+1),t=t.slice(0,r)),{type:t,name:n}})}function _pe(e){return function(){var t=this.__on;if(t){for(var n=0,r=-1,i=t.length,o;n<i;++n)o=t[n],(!e.type||o.type===e.type)&&o.name===e.name?this.removeEventListener(o.type,o.listener,o.options):t[++r]=o;++r?t.length=r:delete this.__on}}}function Spe(e,t,n){return function(){var r=this.__on,i,o=bpe(t);if(r){for(var a=0,l=r.length;a<l;++a)if((i=r[a]).type===e.type&&i.name===e.name){this.removeEventListener(i.type,i.listener,i.options),this.addEventListener(i.type,i.listener=o,i.options=n),i.value=t;return}}this.addEventListener(e.type,o,n),i={type:e.type,name:e.name,value:t,listener:o,options:n},r?r.push(i):this.__on=[i]}}function Epe(e,t,n){var r=wpe(e+""),i,o=r.length,a;if(arguments.length<2){var l=this.node().__on;if(l){for(var s=0,u=l.length,c;s<u;++s)for(i=0,c=l[s];i<o;++i)if((a=r[i]).type===c.type&&a.name===c.name)return c.value}return}for(l=t?Spe:_pe,i=0;i<o;++i)this.each(l(r[i],t,n));return this}function dk(e,t,n){var r=lk(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 Ope(e,t){return function(){return dk(this,e,t)}}function $pe(e,t){return function(){return dk(this,e,t.apply(this,arguments))}}function Ppe(e,t){return this.each((typeof t=="function"?$pe:Ope)(e,t))}function*Ape(){for(var e=this._groups,t=0,n=e.length;t<n;++t)for(var r=e[t],i=0,o=r.length,a;i<o;++i)(a=r[i])&&(yield a)}var pk=[null];function Kt(e,t){this._groups=e,this._parents=t}function Au(){return new Kt([[document.documentElement]],pk)}function Tpe(){return this}Kt.prototype=Au.prototype={constructor:Kt,select:tde,selectAll:ode,selectChild:ude,selectChildren:pde,filter:hde,data:bde,enter:mde,exit:_de,join:Sde,merge:Ede,selection:Tpe,order:Ode,sort:$de,call:Ade,nodes:Tde,node:jde,size:Cde,empty:kde,each:Nde,attr:Bde,style:Wde,property:Gde,classed:Zde,text:npe,html:ape,raise:spe,lower:cpe,append:fpe,insert:ppe,remove:mpe,clone:ype,datum:xpe,on:Epe,dispatch:Ppe,[Symbol.iterator]:Ape};function jpe(e){return typeof e=="string"?new Kt([[document.querySelector(e)]],[document.documentElement]):new Kt([[e]],pk)}var Ta=0,Cl=0,bl=0,hk=1e3,md,kl,vd=0,ao=0,Xp=0,Qs=typeof performance=="object"&&performance.now?performance:Date,mk=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};function Ux(){return ao||(mk(Cpe),ao=Qs.now()+Xp)}function Cpe(){ao=0}function gd(){this._call=this._time=this._next=null}gd.prototype=vk.prototype={constructor:gd,restart:function(e,t,n){if(typeof e!="function")throw new TypeError("callback is not a function");n=(n==null?Ux():+n)+(t==null?0:+t),!this._next&&kl!==this&&(kl?kl._next=this:md=this,kl=this),this._call=e,this._time=n,Jg()},stop:function(){this._call&&(this._call=null,this._time=1/0,Jg())}};function vk(e,t,n){var r=new gd;return r.restart(e,t,n),r}function kpe(){Ux(),++Ta;for(var e=md,t;e;)(t=ao-e._time)>=0&&e._call.call(void 0,t),e=e._next;--Ta}function oO(){ao=(vd=Qs.now())+Xp,Ta=Cl=0;try{kpe()}finally{Ta=0,Mpe(),ao=0}}function Npe(){var e=Qs.now(),t=e-vd;t>hk&&(Xp-=t,vd=e)}function Mpe(){for(var e,t=md,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:md=n);kl=e,Jg(r)}function Jg(e){if(!Ta){Cl&&(Cl=clearTimeout(Cl));var t=e-ao;t>24?(e<1/0&&(Cl=setTimeout(oO,e-Qs.now()-Xp)),bl&&(bl=clearInterval(bl))):(bl||(vd=Qs.now(),bl=setInterval(Npe,hk)),Ta=1,mk(oO))}}function aO(e,t,n){var r=new gd;return t=t==null?0:+t,r.restart(i=>{r.stop(),e(i+t)},t,n),r}var Ipe=tk("start","end","cancel","interrupt"),Rpe=[],gk=0,lO=1,ey=2,Mc=3,sO=4,ty=5,Ic=6;function Yp(e,t,n,r,i,o){var a=e.__transition;if(!a)e.__transition={};else if(n in a)return;Lpe(e,n,{name:t,index:r,group:i,on:Ipe,tween:Rpe,time:o.time,delay:o.delay,duration:o.duration,ease:o.ease,timer:null,state:gk})}function Wx(e,t){var n=Rn(e,t);if(n.state>gk)throw new Error("too late; already scheduled");return n}function tr(e,t){var n=Rn(e,t);if(n.state>Mc)throw new Error("too late; already running");return n}function Rn(e,t){var n=e.__transition;if(!n||!(n=n[t]))throw new Error("transition not found");return n}function Lpe(e,t,n){var r=e.__transition,i;r[t]=n,n.timer=vk(o,0,n.time);function o(u){n.state=lO,n.timer.restart(a,n.delay,n.time),n.delay<=u&&a(u-n.delay)}function a(u){var c,f,d,p;if(n.state!==lO)return s();for(c in r)if(p=r[c],p.name===n.name){if(p.state===Mc)return aO(a);p.state===sO?(p.state=Ic,p.timer.stop(),p.on.call("interrupt",e,e.__data__,p.index,p.group),delete r[c]):+c<t&&(p.state=Ic,p.timer.stop(),p.on.call("cancel",e,e.__data__,p.index,p.group),delete r[c])}if(aO(function(){n.state===Mc&&(n.state=sO,n.timer.restart(l,n.delay,n.time),l(u))}),n.state=ey,n.on.call("start",e,e.__data__,n.index,n.group),n.state===ey){for(n.state=Mc,i=new Array(d=n.tween.length),c=0,f=-1;c<d;++c)(p=n.tween[c].value.call(e,e.__data__,n.index,n.group))&&(i[++f]=p);i.length=f+1}}function l(u){for(var c=u<n.duration?n.ease.call(null,u/n.duration):(n.timer.restart(s),n.state=ty,1),f=-1,d=i.length;++f<d;)i[f].call(e,c);n.state===ty&&(n.on.call("end",e,e.__data__,n.index,n.group),s())}function s(){n.state=Ic,n.timer.stop(),delete r[t];for(var u in r)return;delete e.__transition}}function Dpe(e,t){var n=e.__transition,r,i,o=!0,a;if(n){t=t==null?null:t+"";for(a in n){if((r=n[a]).name!==t){o=!1;continue}i=r.state>ey&&r.state<ty,r.state=Ic,r.timer.stop(),r.on.call(i?"interrupt":"cancel",e,e.__data__,r.index,r.group),delete n[a]}o&&delete e.__transition}}function Fpe(e){return this.each(function(){Dpe(this,e)})}function Bpe(e,t){var n,r;return function(){var i=tr(this,e),o=i.tween;if(o!==n){r=n=o;for(var a=0,l=r.length;a<l;++a)if(r[a].name===t){r=r.slice(),r.splice(a,1);break}}i.tween=r}}function zpe(e,t,n){var r,i;if(typeof n!="function")throw new Error;return function(){var o=tr(this,e),a=o.tween;if(a!==r){i=(r=a).slice();for(var l={name:t,value:n},s=0,u=i.length;s<u;++s)if(i[s].name===t){i[s]=l;break}s===u&&i.push(l)}o.tween=i}}function Hpe(e,t){var n=this._id;if(e+="",arguments.length<2){for(var r=Rn(this.node(),n).tween,i=0,o=r.length,a;i<o;++i)if((a=r[i]).name===e)return a.value;return null}return this.each((t==null?Bpe:zpe)(n,e,t))}function Vx(e,t,n){var r=e._id;return e.each(function(){var i=tr(this,r);(i.value||(i.value={}))[t]=n.apply(this,arguments)}),function(i){return Rn(i,r).value[t]}}function yk(e,t){var n;return(typeof t=="number"?_n:t instanceof Ji?$f:(n=Ji(t))?(t=n,$f):vT)(e,t)}function Upe(e){return function(){this.removeAttribute(e)}}function Wpe(e){return function(){this.removeAttributeNS(e.space,e.local)}}function Vpe(e,t,n){var r,i=n+"",o;return function(){var a=this.getAttribute(e);return a===i?null:a===r?o:o=t(r=a,n)}}function Kpe(e,t,n){var r,i=n+"",o;return function(){var a=this.getAttributeNS(e.space,e.local);return a===i?null:a===r?o:o=t(r=a,n)}}function qpe(e,t,n){var r,i,o;return function(){var a,l=n(this),s;return l==null?void this.removeAttribute(e):(a=this.getAttribute(e),s=l+"",a===s?null:a===r&&s===i?o:(i=s,o=t(r=a,l)))}}function Gpe(e,t,n){var r,i,o;return function(){var a,l=n(this),s;return l==null?void this.removeAttributeNS(e.space,e.local):(a=this.getAttributeNS(e.space,e.local),s=l+"",a===s?null:a===r&&s===i?o:(i=s,o=t(r=a,l)))}}function Xpe(e,t){var n=Gp(e),r=n==="transform"?lV:yk;return this.attrTween(e,typeof t=="function"?(n.local?Gpe:qpe)(n,r,Vx(this,"attr."+e,t)):t==null?(n.local?Wpe:Upe)(n):(n.local?Kpe:Vpe)(n,r,t))}function Ype(e,t){return function(n){this.setAttribute(e,t.call(this,n))}}function Qpe(e,t){return function(n){this.setAttributeNS(e.space,e.local,t.call(this,n))}}function Zpe(e,t){var n,r;function i(){var o=t.apply(this,arguments);return o!==r&&(n=(r=o)&&Qpe(e,o)),n}return i._value=t,i}function Jpe(e,t){var n,r;function i(){var o=t.apply(this,arguments);return o!==r&&(n=(r=o)&&Ype(e,o)),n}return i._value=t,i}function ehe(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 new Error;var r=Gp(e);return this.tween(n,(r.local?Zpe:Jpe)(r,t))}function the(e,t){return function(){Wx(this,e).delay=+t.apply(this,arguments)}}function nhe(e,t){return t=+t,function(){Wx(this,e).delay=t}}function rhe(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?the:nhe)(t,e)):Rn(this.node(),t).delay}function ihe(e,t){return function(){tr(this,e).duration=+t.apply(this,arguments)}}function ohe(e,t){return t=+t,function(){tr(this,e).duration=t}}function ahe(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?ihe:ohe)(t,e)):Rn(this.node(),t).duration}function lhe(e,t){if(typeof t!="function")throw new Error;return function(){tr(this,e).ease=t}}function she(e){var t=this._id;return arguments.length?this.each(lhe(t,e)):Rn(this.node(),t).ease}function uhe(e,t){return function(){var n=t.apply(this,arguments);if(typeof n!="function")throw new Error;tr(this,e).ease=n}}function che(e){if(typeof e!="function")throw new Error;return this.each(uhe(this._id,e))}function fhe(e){typeof e!="function"&&(e=ik(e));for(var t=this._groups,n=t.length,r=new Array(n),i=0;i<n;++i)for(var o=t[i],a=o.length,l=r[i]=[],s,u=0;u<a;++u)(s=o[u])&&e.call(s,s.__data__,u,o)&&l.push(s);return new Cr(r,this._parents,this._name,this._id)}function dhe(e){if(e._id!==this._id)throw new Error;for(var t=this._groups,n=e._groups,r=t.length,i=n.length,o=Math.min(r,i),a=new Array(r),l=0;l<o;++l)for(var s=t[l],u=n[l],c=s.length,f=a[l]=new Array(c),d,p=0;p<c;++p)(d=s[p]||u[p])&&(f[p]=d);for(;l<r;++l)a[l]=t[l];return new Cr(a,this._parents,this._name,this._id)}function phe(e){return(e+"").trim().split(/^|\s+/).every(function(t){var n=t.indexOf(".");return n>=0&&(t=t.slice(0,n)),!t||t==="start"})}function hhe(e,t,n){var r,i,o=phe(t)?Wx:tr;return function(){var a=o(this,e),l=a.on;l!==r&&(i=(r=l).copy()).on(t,n),a.on=i}}function mhe(e,t){var n=this._id;return arguments.length<2?Rn(this.node(),n).on.on(e):this.each(hhe(n,e,t))}function vhe(e){return function(){var t=this.parentNode;for(var n in this.__transition)if(+n!==e)return;t&&t.removeChild(this)}}function ghe(){return this.on("end.remove",vhe(this._id))}function yhe(e){var t=this._name,n=this._id;typeof e!="function"&&(e=zx(e));for(var r=this._groups,i=r.length,o=new Array(i),a=0;a<i;++a)for(var l=r[a],s=l.length,u=o[a]=new Array(s),c,f,d=0;d<s;++d)(c=l[d])&&(f=e.call(c,c.__data__,d,l))&&("__data__"in c&&(f.__data__=c.__data__),u[d]=f,Yp(u[d],t,n,d,u,Rn(c,n)));return new Cr(o,this._parents,t,n)}function xhe(e){var t=this._name,n=this._id;typeof e!="function"&&(e=rk(e));for(var r=this._groups,i=r.length,o=[],a=[],l=0;l<i;++l)for(var s=r[l],u=s.length,c,f=0;f<u;++f)if(c=s[f]){for(var d=e.call(c,c.__data__,f,s),p,h=Rn(c,n),m=0,y=d.length;m<y;++m)(p=d[m])&&Yp(p,t,n,m,d,h);o.push(d),a.push(c)}return new Cr(o,a,t,n)}var bhe=Au.prototype.constructor;function whe(){return new bhe(this._groups,this._parents)}function _he(e,t){var n,r,i;return function(){var o=Aa(this,e),a=(this.style.removeProperty(e),Aa(this,e));return o===a?null:o===n&&a===r?i:i=t(n=o,r=a)}}function xk(e){return function(){this.style.removeProperty(e)}}function She(e,t,n){var r,i=n+"",o;return function(){var a=Aa(this,e);return a===i?null:a===r?o:o=t(r=a,n)}}function Ehe(e,t,n){var r,i,o;return function(){var a=Aa(this,e),l=n(this),s=l+"";return l==null&&(s=l=(this.style.removeProperty(e),Aa(this,e))),a===s?null:a===r&&s===i?o:(i=s,o=t(r=a,l))}}function Ohe(e,t){var n,r,i,o="style."+t,a="end."+o,l;return function(){var s=tr(this,e),u=s.on,c=s.value[o]==null?l||(l=xk(t)):void 0;(u!==n||i!==c)&&(r=(n=u).copy()).on(a,i=c),s.on=r}}function $he(e,t,n){var r=(e+="")=="transform"?aV:yk;return t==null?this.styleTween(e,_he(e,r)).on("end.style."+e,xk(e)):typeof t=="function"?this.styleTween(e,Ehe(e,r,Vx(this,"style."+e,t))).each(Ohe(this._id,e)):this.styleTween(e,She(e,r,t),n).on("end.style."+e,null)}function Phe(e,t,n){return function(r){this.style.setProperty(e,t.call(this,r),n)}}function Ahe(e,t,n){var r,i;function o(){var a=t.apply(this,arguments);return a!==i&&(r=(i=a)&&Phe(e,a,n)),r}return o._value=t,o}function The(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 new Error;return this.tween(r,Ahe(e,t,n??""))}function jhe(e){return function(){this.textContent=e}}function Che(e){return function(){var t=e(this);this.textContent=t??""}}function khe(e){return this.tween("text",typeof e=="function"?Che(Vx(this,"text",e)):jhe(e==null?"":e+""))}function Nhe(e){return function(t){this.textContent=e.call(this,t)}}function Mhe(e){var t,n;function r(){var i=e.apply(this,arguments);return i!==n&&(t=(n=i)&&Nhe(i)),t}return r._value=e,r}function Ihe(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 new Error;return this.tween(t,Mhe(e))}function Rhe(){for(var e=this._name,t=this._id,n=bk(),r=this._groups,i=r.length,o=0;o<i;++o)for(var a=r[o],l=a.length,s,u=0;u<l;++u)if(s=a[u]){var c=Rn(s,t);Yp(s,e,n,u,a,{time:c.time+c.delay+c.duration,delay:0,duration:c.duration,ease:c.ease})}return new Cr(r,this._parents,e,n)}function Lhe(){var e,t,n=this,r=n._id,i=n.size();return new Promise(function(o,a){var l={value:a},s={value:function(){--i===0&&o()}};n.each(function(){var u=tr(this,r),c=u.on;c!==e&&(t=(e=c).copy(),t._.cancel.push(l),t._.interrupt.push(l),t._.end.push(s)),u.on=t}),i===0&&o()})}var Dhe=0;function Cr(e,t,n,r){this._groups=e,this._parents=t,this._name=n,this._id=r}function bk(){return++Dhe}var rr=Au.prototype;Cr.prototype={constructor:Cr,select:yhe,selectAll:xhe,selectChild:rr.selectChild,selectChildren:rr.selectChildren,filter:fhe,merge:dhe,selection:whe,transition:Rhe,call:rr.call,nodes:rr.nodes,node:rr.node,size:rr.size,empty:rr.empty,each:rr.each,on:mhe,attr:Xpe,attrTween:ehe,style:$he,styleTween:The,text:khe,textTween:Ihe,remove:ghe,tween:Hpe,delay:rhe,duration:ahe,ease:she,easeVarying:che,end:Lhe,[Symbol.iterator]:rr[Symbol.iterator]};function Fhe(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}var Bhe={time:null,delay:0,duration:250,ease:Fhe};function zhe(e,t){for(var n;!(n=e.__transition)||!(n=n[t]);)if(!(e=e.parentNode))throw new Error(`transition ${t} not found`);return n}function Hhe(e){var t,n;e instanceof Cr?(t=e._id,e=e._name):(t=bk(),(n=Bhe).time=Ux(),e=e==null?null:e+"");for(var r=this._groups,i=r.length,o=0;o<i;++o)for(var a=r[o],l=a.length,s,u=0;u<l;++u)(s=a[u])&&Yp(s,e,t,u,a,n||zhe(s,t));return new Cr(r,this._parents,e,t)}Au.prototype.interrupt=Fpe;Au.prototype.transition=Hhe;function Uhe(e){var t=0,n=e.children,r=n&&n.length;if(!r)t=1;else for(;--r>=0;)t+=n[r].value;e.value=t}function Whe(){return this.eachAfter(Uhe)}function Vhe(e,t){let n=-1;for(const r of this)e.call(t,r,++n,this);return this}function Khe(e,t){for(var n=this,r=[n],i,o,a=-1;n=r.pop();)if(e.call(t,n,++a,this),i=n.children)for(o=i.length-1;o>=0;--o)r.push(i[o]);return this}function qhe(e,t){for(var n=this,r=[n],i=[],o,a,l,s=-1;n=r.pop();)if(i.push(n),o=n.children)for(a=0,l=o.length;a<l;++a)r.push(o[a]);for(;n=i.pop();)e.call(t,n,++s,this);return this}function Ghe(e,t){let n=-1;for(const r of this)if(e.call(t,r,++n,this))return r}function Xhe(e){return this.eachAfter(function(t){for(var n=+e(t.data)||0,r=t.children,i=r&&r.length;--i>=0;)n+=r[i].value;t.value=n})}function Yhe(e){return this.eachBefore(function(t){t.children&&t.children.sort(e)})}function Qhe(e){for(var t=this,n=Zhe(t,e),r=[t];t!==n;)t=t.parent,r.push(t);for(var i=r.length;e!==n;)r.splice(i,0,e),e=e.parent;return r}function Zhe(e,t){if(e===t)return e;var n=e.ancestors(),r=t.ancestors(),i=null;for(e=n.pop(),t=r.pop();e===t;)i=e,e=n.pop(),t=r.pop();return i}function Jhe(){for(var e=this,t=[e];e=e.parent;)t.push(e);return t}function eme(){return Array.from(this)}function tme(){var e=[];return this.eachBefore(function(t){t.children||e.push(t)}),e}function nme(){var e=this,t=[];return e.each(function(n){n!==e&&t.push({source:n.parent,target:n})}),t}function*rme(){var e=this,t,n=[e],r,i,o;do for(t=n.reverse(),n=[];e=t.pop();)if(yield e,r=e.children)for(i=0,o=r.length;i<o;++i)n.push(r[i]);while(n.length)}function Kx(e,t){e instanceof Map?(e=[void 0,e],t===void 0&&(t=ame)):t===void 0&&(t=ome);for(var n=new yd(e),r,i=[n],o,a,l,s;r=i.pop();)if((a=t(r.data))&&(s=(a=Array.from(a)).length))for(r.children=a,l=s-1;l>=0;--l)i.push(o=a[l]=new yd(a[l])),o.parent=r,o.depth=r.depth+1;return n.eachBefore(sme)}function ime(){return Kx(this).eachBefore(lme)}function ome(e){return e.children}function ame(e){return Array.isArray(e)?e[1]:null}function lme(e){e.data.value!==void 0&&(e.value=e.data.value),e.data=e.data.data}function sme(e){var t=0;do e.height=t;while((e=e.parent)&&e.height<++t)}function yd(e){this.data=e,this.depth=this.height=0,this.parent=null}yd.prototype=Kx.prototype={constructor:yd,count:Whe,each:Vhe,eachAfter:qhe,eachBefore:Khe,find:Ghe,sum:Xhe,sort:Yhe,path:Qhe,ancestors:Jhe,descendants:eme,leaves:tme,links:nme,copy:ime,[Symbol.iterator]:rme};function ume(e){if(typeof e!="function")throw new Error;return e}function wl(){return 0}function _l(e){return function(){return e}}function cme(e){e.x0=Math.round(e.x0),e.y0=Math.round(e.y0),e.x1=Math.round(e.x1),e.y1=Math.round(e.y1)}function fme(e,t,n,r,i){for(var o=e.children,a,l=-1,s=o.length,u=e.value&&(r-t)/e.value;++l<s;)a=o[l],a.y0=n,a.y1=i,a.x0=t,a.x1=t+=a.value*u}function dme(e,t,n,r,i){for(var o=e.children,a,l=-1,s=o.length,u=e.value&&(i-n)/e.value;++l<s;)a=o[l],a.x0=t,a.x1=r,a.y0=n,a.y1=n+=a.value*u}var pme=(1+Math.sqrt(5))/2;function hme(e,t,n,r,i,o){for(var a=[],l=t.children,s,u,c=0,f=0,d=l.length,p,h,m=t.value,y,v,g,x,E,_,S;c<d;){p=i-n,h=o-r;do y=l[f++].value;while(!y&&f<d);for(v=g=y,_=Math.max(h/p,p/h)/(m*e),S=y*y*_,E=Math.max(g/S,S/v);f<d;++f){if(y+=u=l[f].value,u<v&&(v=u),u>g&&(g=u),S=y*y*_,x=Math.max(g/S,S/v),x>E){y-=u;break}E=x}a.push(s={value:y,dice:p<h,children:l.slice(c,f)}),s.dice?fme(s,n,r,i,m?r+=h*y/m:o):dme(s,n,r,m?n+=p*y/m:i,o),m-=y,c=f}return a}const mme=function e(t){function n(r,i,o,a,l){hme(t,r,i,o,a,l)}return n.ratio=function(r){return e((r=+r)>1?r:1)},n}(pme);function vme(){var e=mme,t=!1,n=1,r=1,i=[0],o=wl,a=wl,l=wl,s=wl,u=wl;function c(d){return d.x0=d.y0=0,d.x1=n,d.y1=r,d.eachBefore(f),i=[0],t&&d.eachBefore(cme),d}function f(d){var p=i[d.depth],h=d.x0+p,m=d.y0+p,y=d.x1-p,v=d.y1-p;y<h&&(h=y=(h+y)/2),v<m&&(m=v=(m+v)/2),d.x0=h,d.y0=m,d.x1=y,d.y1=v,d.children&&(p=i[d.depth+1]=o(d)/2,h+=u(d)-p,m+=a(d)-p,y-=l(d)-p,v-=s(d)-p,y<h&&(h=y=(h+y)/2),v<m&&(m=v=(m+v)/2),e(d,h,m,y,v))}return c.round=function(d){return arguments.length?(t=!!d,c):t},c.size=function(d){return arguments.length?(n=+d[0],r=+d[1],c):[n,r]},c.tile=function(d){return arguments.length?(e=ume(d),c):e},c.padding=function(d){return arguments.length?c.paddingInner(d).paddingOuter(d):c.paddingInner()},c.paddingInner=function(d){return arguments.length?(o=typeof d=="function"?d:_l(+d),c):o},c.paddingOuter=function(d){return arguments.length?c.paddingTop(d).paddingRight(d).paddingBottom(d).paddingLeft(d):c.paddingTop()},c.paddingTop=function(d){return arguments.length?(a=typeof d=="function"?d:_l(+d),c):a},c.paddingRight=function(d){return arguments.length?(l=typeof d=="function"?d:_l(+d),c):l},c.paddingBottom=function(d){return arguments.length?(s=typeof d=="function"?d:_l(+d),c):s},c.paddingLeft=function(d){return arguments.length?(u=typeof d=="function"?d:_l(+d),c):u},c}function Nl(e,t,n){this.k=e,this.x=t,this.y=n}Nl.prototype={constructor:Nl,scale:function(e){return e===1?this:new Nl(this.k*e,this.x,this.y)},translate:function(e,t){return e===0&t===0?this:new Nl(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+")"}};Nl.prototype;const gme=({files:e})=>{const t=w.useRef(null),n=w.useRef(null);return w.useEffect(()=>{if(!(e!=null&&e.length)||!t.current)return;const r=t.current,i=r.clientWidth,o=r.clientHeight,a=jpe(n.current);a.selectAll("*").remove(),a.attr("viewBox",`0 0 ${i} ${o}`).attr("preserveAspectRatio","xMidYMid meet");const l={top:10,right:10,bottom:10,left:10},s=()=>{const y={name:"root",children:{}};e.forEach(g=>{const x=g.split("/").filter(Boolean);let E=y;x.forEach((_,S)=>{S===x.length-1?E.children[_]||(E.children[_]={name:_,value:1,type:"file"}):(E.children[_]||(E.children[_]={name:_,children:{},type:"directory"}),E=E.children[_])})});const v=g=>g.type==="file"?g:{...g,children:Object.values(g.children).map(v)};return v(y)},u=y=>y.data.type==="file"?"#eff6ff":y.data.name==="src"||y.depth===1?"#3b82f6":y.depth===2?"#60a5fa":"#93c5fd",c=vme().size([i,o]).paddingOuter(8).paddingTop(24).paddingInner(4).round(!0),f=Kx(s()).sum(y=>y.value||0).sort((y,v)=>v.value-y.value);c(f);const d=a.append("g"),p=f.descendants().filter(y=>{var v;return y.data.name!=="root"&&(y.data.type==="file"||((v=y.children)==null?void 0:v.length)>0)}),h=d.selectAll("g").data(p).join("g").attr("transform",y=>`translate(${y.x0},${y.y0})`);h.append("rect").attr("width",y=>y.x1-y.x0).attr("height",y=>y.y1-y.y0).attr("fill",u).attr("stroke",y=>y.data.type==="file"?"#eff6ff":"transparent").attr("stroke-width",y=>y.data.type==="file"?1:2).attr("rx",2).attr("ry",2),h.filter(y=>y.data.type==="directory").append("text").attr("x",4).attr("y",16).attr("fill","#37474f").attr("font-weight",600).attr("font-size","10px").text(y=>{const v=y.x1-y.x0,g=y.data.name;return v<40?"":g.length>12?g.slice(0,10)+"...":g}),h.filter(y=>y.data.type==="file").append("text").attr("x",y=>(y.x1-y.x0)/2).attr("y",y=>(y.y1-y.y0)/2).attr("text-anchor","middle").attr("dominant-baseline","middle").attr("fill","#666666").attr("font-size","9px").text(y=>{const v=y.x1-y.x0,g=y.y1-y.y0;if(v<40||g<25)return"";const x=y.data.name;return x.length>20?x.slice(0,10)+"...":x});const m=()=>{const y=r.clientWidth,v=r.clientHeight;a.attr("viewBox",`0 0 ${y} ${v}`),c.size([y-l.left-l.right,v-l.top-l.bottom]),c(f),h.attr("transform",g=>`translate(${g.x0},${g.y0})`),h.select("rect").attr("width",g=>g.x1-g.x0).attr("height",g=>g.y1-g.y0),h.select("text").attr("x",g=>g.data.type==="file"?(g.x1-g.x0)/2:4).attr("y",g=>g.data.type==="file"?(g.y1-g.y0)/2:16).text(g=>{const x=g.x1-g.x0,E=g.y1-g.y0,_=g.data.name;return g.data.type==="file"?x<40||E<25?"":_.length>12?_.slice(0,10)+"...":_:x<40?"":_.length>12?_.slice(0,10)+"...":_})};return window.addEventListener("resize",m),()=>{window.removeEventListener("resize",m)}},[e]),b.jsx("div",{className:"flex flex-col h-full -mt-2 py-2 px-2",children:b.jsx("div",{className:"flex-1 relative min-h-0",ref:t,children:b.jsx("svg",{ref:n,className:"absolute inset-0 w-full h-full"})})})};function yme({features:e}){const{name:t}=MI(),n=e[t];if(!n)return b.jsx("div",{className:"max-w-7xl mx-auto p-4 md:p-8",children:b.jsxs("div",{className:"bg-white rounded-lg shadow p-6",children:[b.jsx("h1",{className:"text-xl font-bold text-red-600",children:"Feature Not Found"}),b.jsxs("p",{className:"mt-2",children:["Could not find feature: ",t]}),b.jsx(Or,{to:"/",className:"text-blue-600 hover:text-blue-800 mt-4 inline-block",children:"← Back to Features"})]})});const r=n.additional_metrics.health.overall,i=n.additional_metrics.feature_size.percent_of_max,o=qs(i);return b.jsxs("div",{className:"h-screen max-w-7xl mx-auto flex flex-col gap-8 p-4 md:p-8",children:[b.jsx("div",{className:"flex justify-between items-center",children:b.jsx("h1",{className:"text-2xl font-bold text-gray-800",children:t})}),b.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-12 gap-8",children:[b.jsx("div",{className:"col-span-1 lg:col-span-3",children:b.jsx(qfe,{name:t,feature:n})}),b.jsxs("div",{className:"col-span-1 lg:col-span-9",children:[b.jsxs("div",{className:"grid md:grid-cols-3 gap-4 mb-8",children:[b.jsx(nO,{title:"Health Score",value:r.toFixed(0),suffix:"%",tooltip:"Feature health is determined by combining a weighted score for test coverage, code complexity, and encapsulation into a composite score from 0-100%. Each feature is then grouped into a categories ranging from low (needs attention) to good (healthy), which can be managed via `.feature_map/config.yml`.",icon:b.jsx(r0,{}),color:wt(r).hex,children:b.jsxs("ul",{className:"flex flex-col gap-y-1",children:[b.jsxs("li",{className:"text-xs text-gray-500",children:["Coverage: ",n.additional_metrics.health.test_coverage_component.health_score.toFixed(0)," / ",n.additional_metrics.health.test_coverage_component.awardable_points]}),b.jsxs("li",{className:"text-xs text-gray-500",children:["Complexity: ",n.additional_metrics.health.cyclomatic_complexity_component.health_score.toFixed(0)," / ",n.additional_metrics.health.cyclomatic_complexity_component.awardable_points]}),b.jsxs("li",{className:"text-xs text-gray-500",children:["Encapsulation: ",n.additional_metrics.health.encapsulation_component.health_score.toFixed(0)," / ",n.additional_metrics.health.encapsulation_component.awardable_points]}),b.jsxs("li",{className:"text-xs text-gray-500",children:["Todos: ",n.additional_metrics.health.todo_count_component.health_score.toFixed(0)," / ",n.additional_metrics.health.todo_count_component.awardable_points]})]})}),b.jsx(nO,{title:"Test Coverage",value:n.additional_metrics.test_coverage.score,suffix:"%",tooltip:"Test coverage is determined by using CodeCov data (lines, hits, misses) to calculate a percentage score, from 0-100%, relative to the other features in the codebase. A qualitative coverage ranking is assigned to each feature, which can be managed which can be managed via `.feature_map/config.yml`.",icon:b.jsx(n0,{}),color:bt(n.additional_metrics.test_coverage.score).hex,children:b.jsxs("ul",{className:"flex flex-col gap-y-1",children:[b.jsxs("li",{className:"text-xs text-gray-500",children:["Hits: ",n.test_coverage?n.test_coverage.hits:0]}),b.jsxs("li",{className:"text-xs text-gray-500",children:["Lines: ",n.test_coverage?n.test_coverage.lines:0]}),b.jsxs("li",{className:"text-xs text-gray-500",children:["Misses: ",n.test_coverage?n.test_coverage.misses:0]})]})}),b.jsxs("div",{className:"flex flex-col gap-6 px-4 py-6 border border-gray-200 shadow-sm bg-white rounded-lg",children:[b.jsxs("div",{className:"flex items-center justify-between",children:[b.jsxs("h3",{className:"flex items-center text-xs font-medium text-gray-600 uppercase",children:[b.jsx("div",{className:"flex-shrink-0 bg-gray-100 rounded-md h-8 w-8 flex items-center justify-center",children:b.jsx(BP,{})}),b.jsx("span",{className:"flex pl-2",children:"Feature Size"})]}),b.jsxs(bu,{children:[b.jsx(Ya,{children:b.jsx(mi,{className:"size-4 text-gray-400"})}),b.jsx(Qa,{children:"Feature size is determined by analyzing the total number of files and lines of code associated with each feature. Each feature is then grouped into different size bins, which can be configured in the config.yaml file."})]})]}),b.jsxs("div",{className:"flex items-center gap-4",children:[b.jsx("div",{className:"relative h-20 flex items-center",children:b.jsx("div",{className:"text-2xl font-bold uppercase",children:Ea(i)})}),b.jsx("div",{className:"flex flex-col gap-y-2",children:b.jsx("div",{className:"flex gap-1.5 items-center",children:[1,2,3,4,5].map(a=>b.jsx("div",{className:`h-6 w-1.5 rounded ${a<=o?"bg-blue-500":"bg-gray-300"}`},a))})}),b.jsxs("div",{children:[b.jsxs("div",{className:"text-[10px] text-gray-500",children:[n.assignments.files?n.assignments.files.length:0," files"]}),b.jsxs("div",{className:"text-[10px] text-gray-500",children:[dae(n.metrics.lines_of_code)," lines"]})]})]})]})]}),n.assignments.files&&n.assignments.files.length>0?b.jsxs(b.Fragment,{children:[b.jsx("div",{className:"h-[600px] bg-white rounded-lg border border-gray-200 shadow-sm mb-8",children:b.jsx(gme,{files:n.assignments.files})}),b.jsx(Kfe,{files:n.assignments.files})]}):b.jsx("div",{className:"h-[300px] bg-white rounded-lg border border-gray-200 shadow-sm mb-8",children:b.jsx("div",{className:"flex items-center justify-center h-full text-gray-500",children:"No files found for this feature"})})]})]})]})}const xme=[{name:"Dashboard",pathname:"",icon:HR},{name:"Digest",pathname:"Digest",icon:DR}];function hc(...e){return e.filter(Boolean).join(" ")}function uO(){const e=Nr(),{linked_sites:t,title:n}=hi.project.documentation_site;return b.jsxs(b.Fragment,{children:[b.jsx("div",{className:"flex h-16 shrink-0 items-center",children:b.jsx(Or,{to:"/",children:"Feature Documentation"})}),b.jsx("nav",{className:"flex flex-1 flex-col",children:b.jsxs("ul",{role:"list",className:"flex flex-1 flex-col gap-y-7",children:[b.jsxs("li",{children:[b.jsx("div",{className:"text-xs/6 font-semibold text-gray-400",children:n}),b.jsx("ul",{role:"list",className:"-mx-2 mt-2 space-y-2",children:xme.map(r=>b.jsx("li",{children:b.jsxs(Or,{to:r.pathname,className:hc(e.pathname===`/${r.pathname}`?"text-blue-600":"text-gray-700 hover:text-blue-600","group flex gap-x-3 rounded-md px-2 text-sm/6 font-semibold items-center"),children:[b.jsx(r.icon,{"aria-hidden":"true",className:hc("text-gray-400 group-hover:text-blue-600","size-5 shrink-0")}),r.name]})},r.name))})]}),t&&t.length>0&&b.jsxs("li",{children:[b.jsx("div",{className:"text-xs/6 font-semibold text-gray-400",children:"Linked Feature Documentation"}),b.jsx("ul",{role:"list",className:"-mx-2 mt-2 space-y-2",children:t.map(r=>b.jsx("li",{children:b.jsxs("a",{href:r.url,target:"_blank",className:hc("text-gray-700 hover:text-blue-600","group flex gap-x-3 rounded-md px-2 text-sm/6 font-semibold items-center"),children:[b.jsx(Tc,{"aria-hidden":"true",className:hc("text-gray-400 group-hover:text-blue-600","size-5 shrink-0")}),r.name]})},r.name))})]})]})})]})}function bme(){const[e,t]=w.useState(!1);return b.jsxs("div",{children:[b.jsxs(Vce,{open:e,onClose:t,className:"relative z-50 lg:hidden",children:[b.jsx(Uce,{transition:!0,className:"fixed inset-0 bg-gray-900/80 transition-opacity duration-300 ease-linear data-[closed]:opacity-0"}),b.jsx("div",{className:"fixed inset-0 flex",children:b.jsxs(YC,{transition:!0,className:"relative mr-16 flex w-full max-w-xs flex-1 transform transition duration-300 ease-in-out data-[closed]:-translate-x-full",children:[b.jsx(Vp,{children:b.jsx("div",{className:"absolute left-full top-0 flex w-16 justify-center pt-5 duration-300 ease-in-out data-[closed]:opacity-0",children:b.jsxs("button",{type:"button",onClick:()=>t(!1),className:"-m-2.5 p-2.5",children:[b.jsx("span",{className:"sr-only",children:"Close sidebar"}),b.jsx(LR,{"aria-hidden":"true",className:"size-6 text-white"})]})})}),b.jsx("div",{className:"flex grow flex-col gap-y-5 overflow-y-auto bg-white px-6 pb-4",children:b.jsx(uO,{})})]})})]}),b.jsx("div",{className:"hidden lg:fixed lg:inset-y-0 lg:z-50 lg:flex lg:w-72 lg:flex-col",children:b.jsx("div",{className:"flex grow flex-col overflow-y-auto border-r border-gray-200 bg-white px-6 pb-4",children:b.jsx(uO,{})})}),b.jsxs("div",{className:"lg:pl-72",children:[b.jsx("div",{className:"sticky top-0 z-40 flex h-16 shrink-0 items-center gap-x-4 border-b border-gray-200 bg-white lg:hidden px-4 shadow-sm sm:gap-x-6 sm:px-6 lg:px-8",children:b.jsxs("button",{type:"button",onClick:()=>t(!0),className:"-m-2.5 p-2.5 text-gray-700 lg:hidden",children:[b.jsx("span",{className:"sr-only",children:"Open sidebar"}),b.jsx(WR,{"aria-hidden":"true",className:"size-6"})]})}),b.jsx("main",{className:"",children:b.jsx("div",{className:"px-4 sm:px-6 lg:px-8",children:b.jsx(GI,{})})})]})]})}function wme(){const{features:e}=hi,t=Nr();return w.useEffect(()=>{window.scrollTo(0,0)},[t]),b.jsx(YI,{children:b.jsxs(Pl,{element:b.jsx(bme,{}),children:[b.jsx(Pl,{path:"",element:b.jsx(Ffe,{features:e})}),b.jsx(Pl,{path:"digest",element:b.jsx(Vfe,{features:e})}),b.jsx(Pl,{path:":name",element:b.jsx(yme,{features:e})})]})})}vm.createRoot(document.getElementById("root")).render(b.jsx(A.StrictMode,{children:b.jsx(bR,{children:b.jsx(wme,{})})}));
268
268
  </script>
269
269
  </body>
270
270
  </html>