1import{a as e}from"./rolldown-runtime-BEU_UCik.js";import{r as t}from"./vendor-auth-DAuWozuU.js";import{_ as s,h as r,m as a}from"./chunk-62JRHF6Z-D9puh-us.js";import{t as o}from"./index.esm-BEieHnny.js";import{a as n,n as i}from"./vendor-query-Ct_3YD9H.js";import{t as l}from"./index.es-BTkwoywu.js";import{t as c}from"./projectService-D25XshJp.js";import{t as d}from"./FavoriteButton-4en8TqNN.js";import{n as m}from"./ThemeManager-ILkyB1Q0.js";import{t as p}from"./clsx-BUm1h715.js";import{g as h}from"./solid-CofuJNaU.js";import{t as u}from"./ScrollFadeContainer-Dtzq3qC9.js";import{t as x}from"./Loading-XkN6_W9E.js";import{t as g}from"./useProject-_1FGJNGu.js";import{t as b}from"./SortHeader-DnHtNKay.js";import{t as j}from"./Progress-D4la6Gad.js";import{_ as y}from"./vendor-charts-CIrZe8F2.js";import{o as f}from"./chartUtils-BgSJGHV9.js";import{t as v}from"./ChartDashboard-6nGBJd0Q.js";import{t as k}from"./ErrorDisplay-wA_eppWS.js";import{t as N}from"./ProjectInfoHeader-BDab4SZD.js";import{t as C}from"./SlideInHeader-BJJLUhDd.js";/* empty css */var S=e(t()),w=async({queryKey:e,signal:t})=>{const[,s]=e;return c.getProjectData(s,t)};var L=n();function F({type:e}){const[t,s]=(0,S.useState)(!1);return(0,L.jsxs)("div",{className:"relative",onMouseEnter:()=>s(!0),onMouseLeave:()=>s(!1),children:["CheckboxGroup"===e&&(0,L.jsxs)("svg",{className:"w-6 h-6 glow-icon",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,L.jsx)("path",{d:"M19 3H5C3.89543 3 3 3.89543 3 5V19C3 20.1046 3.89543 21 5 21H19C20.1046 21 21 20.1046 21 19V5C21 3.89543 20.1046 3 19 3Z",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),(0,L.jsx)("path",{d:"M9 12L11 14L15 10",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),(0,L.jsx)("path",{d:"M7 7H7.01",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"}),(0,L.jsx)("path",{d:"M17 7H17.01",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"}),(0,L.jsx)("path",{d:"M7 17H7.01",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"}),(0,L.jsx)("path",{d:"M17 17H17.01",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"})]}),"RadioGroup"===e&&(0,L.jsxs)("svg",{className:"w-6 h-6 glow-icon",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,L.jsx)("circle",{cx:"12",cy:"12",r:"9",stroke:"currentColor",strokeWidth:"1.5"}),(0,L.jsx)("circle",{cx:"12",cy:"12",r:"4",fill:"currentColor"}),(0,L.jsx)("path",{d:"M12 2V4",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"}),(0,L.jsx)("path",{d:"M12 20V22",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"}),(0,L.jsx)("path",{d:"M2 12H4",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"}),(0,L.jsx)("path",{d:"M20 12H22",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"})]}),"RadioQuestion"===e&&(0,L.jsxs)("svg",{className:"w-6 h-6 glow-icon",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,L.jsx)("path",{d:"M21 11.5C21 16.7467 16.7467 21 11.5 21C6.25329 21 2 16.7467 2 11.5C2 6.25329 6.25329 2
111.5 2",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"}),(0,L.jsx)("path",{d:"M22 2L20 4",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"}),(0,L.jsx)("path",{d:"M9.09 9C9.3251 8.33167 9.78915 7.76811 10.4 7.40913C11.0108 7.05016 11.7289 6.91894 12.4272 7.03871C13.1255 7.15849 13.7588 7.52152 14.2151 8.06353C14.6713 8.60553 14.9211 9.29152 14.92 10C14.92 12 11.92 13 11.92 13",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),(0,L.jsx)("path",{d:"M12 17H12.01",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"})]}),"YesNoButtons"===e&&(0,L.jsxs)("svg",{className:"w-6 h-6 glow-icon",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,L.jsx)("rect",{x:"2",y:"5",width:"20",height:"14",rx:"7",stroke:"currentColor",strokeWidth:"1.5"}),(0,L.jsx)("circle",{cx:"16",cy:"12",r:"4",fill:"currentColor"}),(0,L.jsx)("path",{d:"M7 10L6 14",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),(0,L.jsx)("path",{d:"M9 10L10 14",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})]}),"BPNumbers"===e&&(0,L.jsxs)("svg",{className:"w-6 h-6 glow-icon",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,L.jsx)("path",{d:"M12 21.35L10.55 20.03C5.4 15.36 2 12.28 2 8.5C2 5.42 4.42 3 7.5 3C9.24 3 10.91 3.81 12 5.09C13.09 3.81 14.76 3 16.5 3C19.58 3 22 5.42 22 8.5C22 12.28 18.6 15.36 13.45 20.04L12 21.35Z",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),(0,L.jsx)("path",{d:"M22 12H18L17 15L15 9L14 12H10",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})]}),e&&!["CheckboxGroup","RadioGroup","RadioQuestion","YesNoButtons","BPNumbers"].includes(e)&&(0,L.jsxs)("svg",{className:"w-6 h-6 glow-icon",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,L.jsx)("path",{d:"M12 21.35L10.55 20.03C5.4 15.36 2 12.28 2 8.5C2 5.42 4.42 3 7.5 3C9.24 3 10.91 3.81 12 5.09C13.09 3.81 14.76 3 16.5 3C19.58 3 22 5.42 22 8.5C22 12.28 18.6 15.36 13.45 20.04L12 21.35Z",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),(0,L.jsx)("path",{d:"M22 12H18L17 15L15 9L14 12H10",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})]}),t&&(0,L.jsx)("div",{className:"absolute top-1/2 left-1/2 transform -translate-x-1/2 -translate-y-1/2 dark:bg-gray-900 dark:text-white bg-white text-black border border-deep-space dark:border-transparent px-2 py-1 rounded-lg z-10 pointer-events-none",children:e})]})}var A=(e=0)=>{const t=Math.round(e),s=Math.floor(t/3600),r=Math.floor(t%3600/60),a=t%60,o=e=>String(e).padStart(2,"0");return s>0?`${o(s)}:${o(r)}:${o(a)}`:r>0?`${o(r)}:${o(a)}`:`00:${o(a)}`};function W({spec:e,screenQuestions:t,screenComponents:s,questions:r,started:o,sortKey:n,setSortKey:i,sortDir:l,setSortDir:c,projectId:d,host:m,isReassessment:p=!1,...h}){const x=a();t.forEach((e,t)=>{e.screenComponent=s.find(t=>t.screen===e.screen)});const g=[...t].sort((e,t)=>{let s=0;if("screen_name"===n)s=e.screen.localeCompare(t.screen);else if("screen_number"===n)s=e.screenNumber-t.screenNumber;else if("question"===n){const a=r[e.questions[0]]?.Question||"",o=r[t.questions[0]]?.Question||"";s=a.localeCompare(o)}else if("type"===n){const a=r[e.questions[0]]?.Type||"",o=r[t.questions[0]]?.Type||"";s=a.localeCompare(o)}else"completion"===n?s=e.completed/o-t.completed/o:"avg_completion_time"===n&&(s=(e.screentime||0)-(t.screentime||0));return"asc"===l?s:-s});function y(e){n===e?c("asc"===l?"desc":"asc"):(i(e),c("asc"))}return(0,L.jsx)("div",{className:"rounded-2xl border border-solar-200 dark:border-white/10 bg-white dark:bg-deep-space overflow-hidden shadow-sm hover:shadow-md transition-shadow duration-300 dark:backdrop-blur-md",children:(0,L.jsx)(u,{className:"w-full overflow-x-auto hide-scrollbar",children:(0,L.jsxs)("table",{className:"assessment-table",children:[(0,L.jsx)("thead",{children:(0,L.jsxs)("tr",{children:[(0,L.jsx)("th",{className:"pl-6 text-left",children:(0,L.jsx)(b,{label:"#",sortKey:"screen_number",activeKey:n,activeDir:l,onSort:y})}),(0,L.jsx)("th",{className:"text-left",children:(0,L.jsx)(b,{label:"Screen Name",sortKey:"screen_name",activeKey:n,activeDir:l,onSort:y})}),(0,L.jsx)("th",{className:"text-left",children:(0,L.jsx)(b,{label:"Type",sort
1Key:"type",activeKey:n,activeDir:l,onSort:y})}),(0,L.jsx)("th",{className:"text-left",children:(0,L.jsx)(b,{label:"Completion",sortKey:"completion",activeKey:n,activeDir:l,onSort:y})}),(0,L.jsx)("th",{className:"pr-4 text-center",children:(0,L.jsx)(b,{label:"Avg. Completion Time",sortKey:"avg_completion_time",activeKey:n,activeDir:l,onSort:y})})]})}),(0,L.jsx)("tbody",{children:g.map((e,t)=>(0,L.jsxs)("tr",{className:"cursor-pointer",onClick:()=>{x(`/project/${d}/acnu/${e.screenNumber}${p?"?reassessment=true":""}`)},children:[(0,L.jsx)("td",{className:"pl-6",children:e.screenNumber}),(0,L.jsx)("td",{children:e.screenName||e.screen||"-"}),(0,L.jsx)("td",{children:(0,L.jsx)("div",{className:"flex gap-2",children:e.questions.map(e=>(0,L.jsx)(F,{type:r[e].Type},e))})}),(0,L.jsx)("td",{children:(0,L.jsx)("div",{children:(0,L.jsx)(j,{height:"24",value:e.completed,max:o})})}),(0,L.jsx)("td",{className:"pr-4 text-center",children:A(e.screentime)})]},e.screen))})]})})})}function D({data:e,type:t}){const s=(0,S.useMemo)(()=>e&&0!==Object.keys(e).length&&Array.isArray(e.percentCompleted)&&0!==e.percentCompleted.length?O(e.percentCompleted,t):{},[e,t]);return e&&0!==Object.keys(e).length&&Array.isArray(e.percentCompleted)&&0!==e.percentCompleted.length?(0,L.jsx)("div",{className:"w-full border border-solar-200 dark:border-trusty-blue/50 rounded",children:(0,L.jsx)(v,{config:s,id:`acnu-completion-chart-${t}`})}):(0,L.jsx)("div",{className:"min-h-[450px] px-4 py-8 font-bold grid place-content-center border border-solar-200 dark:border-trusty-blue/50 rounded",children:(0,L.jsx)("p",{children:"No Completions Data Available"})})}var O=(e,t)=>({gui:{layouts:[{rows:[{cells:[{id:`acnu-completion-chart-${t}-cell`}]}]}]},components:[{type:"Highcharts",cell:`acnu-completion-chart-${t}-cell`,chartOptions:{chart:{type:"line",style:{},spacingTop:20,spacingRight:20,spacingBottom:20,spacingLeft:20},title:{text:"Time to Completion",align:"center",margin:30,style:{fontWeight:"normal",fontSize:"1.4em"}},subtitle:{text:null,align:"center",style:{color:"#020021"}},yAxis:{title:{text:"% of People Completing Quiz",align:"middle",style:{fontSize:"1em"}},labels:{format:"{value}%",style:{fontSize:"1em"}},max:100,gridLineWidth:0,plotLines:[{color:"#FF0000",width:2,value:75,dashStyle:"ShortDash"}]},xAxis:{title:{text:"Time Taken (mins)",style:{fontSize:"1em"}},tickInterval:1,gridLineWidth:1,lineWidth:0,labels:{style:{fontSize:"1em"}}},tooltip:{enabled:!0,headerFormat:"{series.name}:<b> {point.y}%</b><br>",pointFormat:"Time Taken (OK to Use):<b> {point.x} mins</b>",style:{fontSize:"1em"}},legend:{align:"left",verticalAlign:"bottom",layout:"vertical",padding:10,borderWidth:1,borderColor:"#FED7AA",backgroundColor:"#FFFFFF",itemStyle:{color:"#020021",fontSize:"1em"},itemHoverStyle:{color:"#DC2626"},enabled:!1},plotOptions:{line:{dataLabels:{enabled:!1}}},credits:{enabled:!1},series:[{showInLegend:!1,name:"% of People Completing Quiz",data:e,color:"#EA580C",lineWidth:2,marker:{lineWidth:0,fillColor:"#EA580C",states:{hover:{lineWidth:2,lineColor:"#FFFFFF"}}}}]}}]});function M({display:e,setDisplay:t}){return(0,L.jsxs)(L.Fragment,{children:[(0,L.jsxs)("select",{className:"md:hidden w-full p-2 border border-solar-200 dark:border-trusty-blue/50 rounded font-semibold bg-transparent text-sm",value:e,onChange:e=>t(e.target.value),children:[(0,L.jsx)("option",{value:"summary",children:"Summary"}),(0,L.jsx)("option",{value:"assessment",children:"Assessment"}),(0,L.jsx)("option",{value:"reassessment",children:"Reassessment"})]}),(0,L.jsxs)("div",{className:"lb-nav hidden md:flex",children:[(0,L.jsx)("button",{className:p("lb-tab","summary"===e&&"lb-tab--active"),onClick:()=>t("summary"),children:"Summary"}),(0,L.jsx)("button",{className:p("lb-tab","assessment"===e&&"lb-tab--active"),onClick:()=>t("assessment"),children:"Assessment"}),(0,L.jsx)("button",{className:p("lb-tab","reassessment"===e&&"lb-tab--active"),onClick:()=>t("reassessment"),children:"Reassessment"})]})]})}var P=e(y());function z({data:e,type:t}){const{theme:s}=m(),r=(0,S.useMemo)(()=>e&&0!==Object.keys(e).length&&Array.isArray(e.kickoutCounts)&&0!==e.kickoutCounts.length?T(e.kickoutCounts,t,s):{},[e,t,s]);return e&&0!==Object.keys(e).length&&Array.isArray(e.kickoutCounts)&&0!==e.kickoutCounts.length?(0,L.jsx)("div",{className:"w-full border border-solar-200 dark:border-trusty-blue/50 rounded",children:(0,L.jsx)(v,{c
1onfig:r,id:`acnu-kickout-chart-${t}`})}):(0,L.jsx)("div",{className:"min-h-[450px] px-4 py-8 font-bold grid place-content-center border border-solar-200 dark:border-trusty-blue/50 rounded",children:(0,L.jsx)("p",{children:"No Kickout Data Available"})})}var T=(e,t,s)=>({gui:{layouts:[{rows:[{cells:[{id:`acnu-kickout-chart-${t}-cell`}]}]}]},components:[{type:"Highcharts",cell:`acnu-kickout-chart-${t}-cell`,chartOptions:{chart:{type:"bar",styledMode:!1,spacingTop:20,spacingRight:20,spacingBottom:20,spacingLeft:20,colors:["#EA580C"]},title:{text:"Questions Resulting in a Kickout",align:"center",margin:30,style:{fontWeight:"normal",fontSize:"1.4em"}},subtitle:{text:"What Questions Resulted in User Disqualification",align:"center"},xAxis:{categories:e.map(e=>e.screenName||e.Screen),title:{text:null},gridLineWidth:1,lineWidth:0,labels:{style:{fontSize:"1em"}}},yAxis:{min:0,title:{text:"People who took the Quiz",align:"middle",style:{fontSize:"1em"}},gridLineWidth:0,labels:{formatter:function(){return P.default.numberFormat(this.value,0,".",",")},style:{fontSize:"1em"}}},tooltip:{enabled:!1},legend:{align:"left",verticalAlign:"bottom",layout:"vertical",padding:10,borderWidth:1,itemStyle:{fontSize:"1em",fontFamily:"Karla, sans-serif"},itemHoverStyle:{}},plotOptions:{bar:{borderWidth:0,dataLabels:{enabled:!0,formatter:function(){return P.default.numberFormat(this.y,0,".",",")},style:{color:"dark"===s?"#FFFFFF":"#020021",textOutline:"none",fontSize:"1em"}},borderRadius:4,showInLegend:!1}},credits:{enabled:!1},series:[{name:"Said Yes to the following",data:e.map(e=>e.count),color:"#EA580C"}]}}]});function H({data:e}){const[t,s]=(0,S.useState)({}),{theme:r}=m();return(0,S.useEffect)(()=>{e&&0!==Object.keys(e).length&&s(R(e,r))},[e,r]),e&&0!==Object.keys(e).length?(0,L.jsx)("div",{className:"border border-solar-200 dark:border-[#112659] rounded",children:(0,L.jsx)(v,{config:t,id:"acnu-revenue-performance-vs-forecast-chart"})}):(0,L.jsx)("p",{className:"min-h-[450px] px-4 py-8 font-bold grid place-content-center",children:"No Revenue Performance Forecast Data Available"})}var R=(e,t)=>{const s="dark"===t;return{gui:{layouts:[{rows:[{cells:[{id:"acnu-revenue-performance-vs-forecast-cell"}]}]}]},components:[{type:"Highcharts",cell:"acnu-revenue-performance-vs-forecast-cell",chartOptions:{chart:{type:"area",style:{},spacingTop:10,styledMode:!1},responsive:{rules:[{condition:{minWidth:768},chartOptions:{legend:{padding:10,itemStyle:{fontSize:"1rem"}}}}]},title:{text:"ACNU Revenue Performance vs Forecast"},subtitle:{text:"Does our ACNU financial performance meet expectations?"},xAxis:{type:"datetime",accessibility:{rangeDescription:"Range: 12 months."},dateTimeLabelFormats:{month:"%b"},gridLineColor:"rgb(229, 228, 226, 1)",gridLineWidth:1},yAxis:{title:{text:"Total Revenue ($)",style:{fontSize:"18px"},margin:16},gridLineColor:"rgb(229, 228, 226, 1)",gridLineWidth:1},tooltip:{useHTML:!0,shadow:!1,borderWidth:2,headerFormat:'<table><tr><th colspan="2">{point.key:%b}</th></tr>',pointFormatter:function(){return"arearange"===this.series.type?"<tr><td>Projected Revenue Range:</td><td>$"+this.low.toLocaleString("en-US",{minimumFractionDigits:2,maximumFractionDigits:2})+" - $"+this.high.toLocaleString("en-US",{minimumFractionDigits:2,maximumFractionDigits:2})+"</td></tr>":"<tr><td>Total Revenue:</td><td>$"+this.y.toLocaleString("en-US",{minimumFractionDigits:2,maximumFractionDigits:2})+"</td></tr>"},footerFormat:"</table>"},plotOptions:{area:{marker:{enabled:!1,symbol:"circle",radius:8,states:{hover:{enabled:!0}}}},arearange:{marker:{enabled:!1,symbol:"circle",radius:8,states:{hover:{enabled:!0}}}},line:{marker:{enabled:!1,symbol:"circle",radius:8,states:{hover:{enabled:!0}}},lineWidth:2,dataLabels:{enabled:!0,verticalAlign:"top",y:-10,formatter:function(){return"$"+Math.round(this.y/1e3)+"k"},borderWidth:1,borderStyle:"dotted",borderColor:s?"rgb(255, 20, 145)":"#DC2626",padding:4,backgroundColor:"rgba(255, 255, 255, 1)",style:{fontSize:"14px",color:"#333",fontWeight:"normal"}}}},legend:{align:"center",verticalAlign:"top",layout:"horizontal",itemStyle:{fontSize:"0.65rem"},symbolHeight:10},series:[{name:"Projected Revenue",type:"arearange",data:[[42e3,84e3],[50563.2,101126.4],[37677.6,75355.2],[45486.6,90973.2],[54135.6,108271.2],[6e4,12e4],[66e3,132e3],[54135.6,108271.2],[45486.6,90973.2],[37977.6,75955.2],[54272*.6,54272*1.2],[3e4,6e4]],pointStart:Date.UTC(2024,0,1),pointInterval:2630016e3,color:{linearGradient:{x1:0,y1:0,x2:0,y2:1},stops:[[0,"rgba(234, 88, 12, 0.6)"],[.7,"rgba(251, 146, 60, 0.3)"]]},fillOpacity:.3},{name:"Actual Revenue",type:"line",data:[4e4,53272,66796,73811,80226,12e4,1e5,80226,45811,72796,74272,8e4],pointStart:Date.UTC(2024,0,1),pointInterval:2630016e3,color:s?"#F
1F3C6D":"#DC2626",lineWidth:2}]}}]}};function K({data:e}){const{theme:t}=m(),[s,r]=(0,S.useState)({});return(0,S.useEffect)(()=>{e&&0!==Object.keys(e).length&&r(B(e,t))},[t]),e&&0!==Object.keys(e).length?(0,L.jsx)("div",{className:"border border-[#C9D7EB] dark:border-[#112659] rounded",children:(0,L.jsx)(v,{config:s,id:"acnu-sales-projected-vs-actual-chart"})}):(0,L.jsx)("p",{className:"min-h-[450px] px-4 py-8 font-bold grid place-content-center",children:"No Sales Projected vs Actual Data Available"})}var B=(e,t)=>{const s=[["Visits",100],["Starts",60],["Outcomes",30],["Ok to Use",10],["Purchases",8]],r=[["Visits",100],["Starts",50],["Outcomes",30],["Ok to Use",20],["Purchases",1]];return{gui:{layouts:[{rows:[{cells:[{id:"acnu-sales-projected-vs-actual-cell"}]}]}]},components:[{type:"Highcharts",cell:"acnu-sales-projected-vs-actual-cell",chartOptions:{colors:{dark:f("#FCFCFC","#020021",s.length||r.length||5),light:f("#FED7AA","#EA580C",s.length||r.length||5)}[t],chart:{type:"funnel",style:{},spacingTop:10,styledMode:!1,height:600},responsive:{rules:[{condition:{minWidth:768},chartOptions:{chart:{spacingTop:10},legend:{padding:10,itemStyle:{fontSize:".8rem"}}}}]},title:{text:"Sales Funnel: Projected vs Actual",align:"center",margin:30,style:{fontWeight:"normal",fontSize:"1.4em"}},subtitle:{text:"Comparison of Projected vs Actual Conversion Rates",align:"center",style:{fontSize:"1em"}},plotOptions:{funnel:{neckWidth:"18%",neckHeight:"35%",width:"40%",dataLabels:{enabled:!1},center:["25%","50%"],showInLegend:!0}},legend:{align:"center",verticalAlign:"top",layout:"horizontal",padding:4,itemMarginTop:5,itemStyle:{fontSize:".55rem"},labelFormatter:function(){return"Projected"===this.series.name?"Projected: "+this.name:"Actual"===this.series.name?"Actual: "+this.name:this.name}},tooltip:{enabled:!0,format:"<b>{series.name}: {point.name}</b>: {point.y}%",style:{fontSize:"1em"}},credits:{enabled:!1},series:[{name:"Projected",data:[["Visits",100],["Starts",60],["Outcomes",30],["Ok to Use",10],["Purchases",8]],center:["25%","50%"]},{name:"Actual",data:[["Visits",100],["Starts",50],["Outcomes",30],["Ok to Use",20],["Purchases",1]],center:["75%","50%"],dataLabels:{enabled:!0,formatter:function(){var e=this.series.chart.series[0].data.find(function(e){return e.name===this.point.name},this).y,t=this.y-e;return'<span style="display: inline-block; padding: 5px; background-color: rgba(255, 255, 255, 0.8); border: 2px solid '+(t>0?"#3AE500":t<0?"#B2294B":"#000000")+'; border-radius: 3px; color: #000000;">'+(t>0?"+"+t+"%":t<0?t+"%":"0%")+"</span>"},align:"center",verticalAlign:"middle",x:0,y:0,useHTML:!0,padding:0}}]}}]}};function E({data:e,type:t="assessment"}){return(0,L.jsxs)("div",{children:[(0,L.jsxs)("div",{className:"section-header-2 flex flex-col md:flex-row items-center justify-between gap-4",children:[(0,L.jsx)("h2",{className:"sect",children:"Performance Against Revenue Projections"}),(0,L.jsxs)("select",{className:"p-2 disabled:cursor-not-allowed",name:"condition",id:"condition",defaultValue:"",disabled:!0,children:[(0,L.jsx)("option",{value:"",disabled:!0,children:"Select a Condition"}),(0,L.jsx)("option",{value:"asthma",children:"Asthma"}),(0,L.jsx)("option",{value:"migraine",children:"Migraine"}),(0,L.jsx)("option",{value:"pah",children:"Pulmonary Arterial Hypertension"})]})]}),(0,L.jsxs)("div",{className:"p-2 md:p-4 pt-0 space-y-4",children:[(0,L.jsx)(H,{data:e,type:t}),(0,L.jsx)(K,{data:e,type:t})]})]})}function $({data:e}){const{theme:t}=m(),s=(0,S.useMemo)(()=>e&&0!==Object.keys(e).length?I(e,t):{},[e,t]);return e&&0!==Object.keys(e).length?(0,L.jsx)("div",{className:"border border-[#C9D7EB] dark:border-[#112659] rounded",children:(0,L.jsx)(v,{config:s,id:"acnu-purchase-types-chart"})}):(0,L.jsx)("p",{className:"min-h-[450px] px-4 py-8 font-bold grid place-content-center",children:"No Purchase Types Data Available"})}var I=(e,t)=>{const s=[{name:"Initial Order",y:3200},{name:"Reorder",y:2800}];return{gui:{layouts:[{rows:[{cells:[{id:"acnu-purchase-types-cell"}]}]}]},components:[{type:"Highcharts",cell:"acnu-purchase-types-cell",chartOptions:{colors:{dark:f("#FCFCFC","#030117",s.length),light:f("#FED7AA","#EA580C",s.length)}[t],chart:{type:"pie",style:{},spacingTop:0,styledMode:!1},responsive:{rules:[{condition:{minWidth:768},chartOptions:{chart:{spacingTop:-10}}}]},title:{text:"Purchase Types",align:"center",margin:30,style:{fontWeight:"normal",fontSize:"1.4em"}},subtitle:{text:"What are the most popular order types?",align:"center"},tooltip:{useHTML:!0,borderWidth:1,shadow:!1,headerFormat:"<table>",pointFormat:"<tr><th>{point.name}:</th><td>{point.y}</td></tr>",footerFormat:"</table>",style:{fontSize:"1.1em"}},accessibility:{point:{valueSuffix:" bills"}},legend:{align:"center",verticalAlign:"top",layout:"horizontal",padding:10,borderWidth:1,itemStyle:{fontSize:"1em"}},plotOptions:{pie:{allowPointSelect:!0,cursor:"pointer",dataLabels:{enabled:!1},showInLegend:!0}},series:[{name:"Bills",colorByPoint:!0,data:s.map((e,t)=>({name:e.name,y:e.y}))}]}}]}};function U({data:e}){const{theme:t}=m(),s=(0,S.useMemo)(()=>e&&0!==Object.keys(e).length?q(e,t):{},[e,t]);return e&&0!==Object.keys(e).length?(0,L.jsx)("div",{className:"border border-[#C9D7EB] dark:border-[#112659] rounded",children:(0,L.jsx)(v,{c
1onfig:s,id:"acnu-supply-quantity-chart"})}):(0,L.jsx)("p",{className:"min-h-[450px] px-4 py-8 font-bold grid place-content-center",children:"No Purchase Types Data Available"})}var q=(e,t)=>({gui:{layouts:[{rows:[{cells:[{id:"acnu-supply-quantity-cell"}]}]}]},components:[{type:"Highcharts",cell:"acnu-supply-quantity-cell",chartOptions:{colors:{dark:f("#FCFCFC","#030117",2),light:f("#FED7AA","#EA580C",2)}[t],chart:{type:"pie",style:{},spacingTop:0},responsive:{rules:[{condition:{minWidth:768},chartOptions:{chart:{spacingTop:-10}}}]},title:{text:"Supply Quantity Distribution",align:"center",margin:30,style:{fontWeight:"normal",fontSize:"1.4em"}},subtitle:{text:"What supply count do people prefer?",align:"center"},tooltip:{useHTML:!0,borderWidth:1,shadow:!1,headerFormat:"<table>",pointFormat:"<tr><th>{point.name}:</th><td>{point.y}</td></tr>",footerFormat:"</table>",style:{fontSize:"1.1em"}},accessibility:{point:{valueSuffix:" bills"}},legend:{align:"center",verticalAlign:"top",layout:"horizontal",padding:10,itemStyle:{fontSize:"1em"}},plotOptions:{pie:{allowPointSelect:!0,cursor:"pointer",dataLabels:{enabled:!1},showInLegend:!0}},series:[{name:"Bills",colorByPoint:!0,data:[{name:"Single Pack Inhaler",y:3200},{name:"Two Pack",y:2800}]}]}}]});function _({data:e,condition:t}){return(0,L.jsx)(L.Fragment,{children:(0,L.jsxs)("div",{className:"p-4 pt-0 grid md:grid-cols-2 gap-4",children:[(0,L.jsx)($,{data:e,condition:t}),(0,L.jsx)(U,{data:e,condition:t})]})})}function Q(){const{projectId:e}=r(),{project:t,loading:a,error:n}=g(e),{data:c,loading:m,error:p}=function(e,{enabled:t=!0}={}){const{data:s,error:r,isPending:a,isFetching:o}=i({queryKey:["assessmentData",e],queryFn:w,enabled:!!e&&t,staleTime:3e4,gcTime:3e5});return{data:s,loading:a&&!(!e||!t),isFetching:o,error:r??null}}(e,{enabled:!!e}),[u,b]=s(),y=u.get("tab")||"summary",f=e=>{b({tab:e})},[v,F]=(0,S.useState)("screen_rank"),[A,O]=(0,S.useState)("asc"),[P,T]=(0,S.useState)("screen_rank"),[H,R]=(0,S.useState)("asc");if(n||p)return(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(o,{children:(0,L.jsx)("title",{children:"ACNU Dashboard | Idea Evolver"})}),(0,L.jsx)("div",{className:"page-base space-y-4 md:space-y-8",children:(0,L.jsx)(k,{error:n||p})})]});if(a||m)return(0,L.jsx)(x,{});const{reassessment:K,host:B}=c,$=K&&Object.keys(K).length>0,I=B&&B.length>0;return(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(o,{children:(0,L.jsx)("title",{children:"ACNU Dashboard | Idea Evolver"})}),(0,L.jsx)(C,{triggerId:"header-trigger",children:(0,L.jsxs)("div",{className:"flex flex-col md:flex-row gap-2 justify-between md:items-center p-4",children:[(0,L.jsxs)("div",{className:"flex gap-2",children:[(0,L.jsx)(d,{uuid:t.uuid}),(0,L.jsx)("h2",{className:"section-header-2 p-0 capitalize",children:I?(0,L.jsxs)("a",{className:"flex items-center gap-3",href:`https://${c.host}`,target:"_blank",children:[t&&t.name," ",(0,L.jsx)(l,{className:"text-sm",icon:h})]}):t&&t.name})]}),(0,L.jsx)(M,{display:y,setDisplay:f})]})}),(0,L.jsxs)("div",{className:"acnu-dashboard-page page-base",children:[(0,L.jsx)("h1",{className:"sr-only",children:"ACNU Dashboard"}),(0,L.jsx)(N,{className:"mb-8",project:t,showDropdown:!0}),(0,L.jsxs)("section",{className:"page-section-3 mb-4 md:mb-8",children:[(0,L.jsxs)("div",{id:"header-trigger",className:"section-header-2 pb-0 flex flex-col md:flex-row gap-2 justify-between md:items-center",children:[(0,L.jsx)("h2",{className:"section-header-2 p-0 capitalize",children:I?(0,L.jsxs)("a",{className:"flex items-center gap-3",href:`https://${c.host}`,target:"_blank",children:[t&&t.name," ",(0,L.jsx)(l,{className:"text-sm",icon:h})]}):t&&t.name}),(0,L.jsx)(M,{display:y,setDisplay:f})]}),"summary"===y&&(0,L.jsx)(E,{data:c}),"assessment"===y&&(0,L.jsxs)(L.Fragment,{children:[(0,L.jsxs)("div",{className:"p-2 py-4 md:p-4 grid grid-cols-2 md:grid-cols-4 gap-2 md:gap-4",children:[(0,L.jsxs)("div",{className:"page-section-3 bg-stellar-cream relative",children:[(0,L.jsx)("h3",{className:"section-header-2 slim text-center",children:"Starts"}),(0,L.jsx)("div",{className:"p-8 pt-0 text-4xl text-center",children:c.started}),(0,L.jsx)("div",{className:"min-h-6 absolute bottom-[-1px] left-[-1px] right-[-1px] border border-solar-200 dark:border-[#112659] rounded-b-lg text-center font-semibold text-sm !bg-stellar-cream dark:!bg-deep-space",children:"% of Total Starts"})]}),(0,L.jsxs)("div",{className:"page-section-3 bg-stellar-cream relative",children:[(0,L.jsx)("h3",{className:"section-header-2 slim text-center",children:"Outcomes"}),(0,L.jsx)("div",{className:"p-8 pt-0 text-4xl text-center",children:c.outcomes}),(0,L.jsx)("div",{className:"min-h-6 absolute bottom-[-1px] left-[-1px] right-[-1px]",children:(0,L.jsx)(j,{className:"!rounded-t-none !rounded-lg !border-solar-200 dark:!border-[#112659] !bg-stellar-cream dark:!bg-deep-space",height:"24",value:c.outcomes||0,max:c.started||100})})]}),(0,L.jsxs)("div",{className:"page-section-3 bg-stellar-cream relative",children:[(0,L.jsx)("h3",{className:"section-header-2 slim text-center",children:"OK to Use"}),(0,L.jsx)("div",{className:"p-8 pt-0 text-4xl text-center",children:c.ok}),(0,L.jsx)("div",{className:"min-h-6 absolute bottom-[-1px] left-[-1px] right-[-1px]",children:(0,L.jsx)(j,{className:"!rounded-t-none !rounded-lg !border-solar-200 dark:!border-[#112659] !bg-stellar-cream dark:!bg-deep-space",height:"24",value:c.ok||0,max:c.started||100})})]}),(0,L.jsxs)("div",{className:"page-section-3 bg-stellar-cream relative",children:[(0,L.jsx)("h3",{className:"section-header-2 slim text-center",children:"Purchased"}),(0,L.jsx)("div",{className:"p-8 pt-0 text-4xl text-center",children:c.ordered}),(0,L.jsx)("div",{className:"min-h-6 absolute bottom-[-1px] left-[-1px] right-[-1px]",children:(0,L.jsx)(j,{className:"!rounded-t-none !rounded-lg !border-solar-200 dark:!border-[#112659] !bg-stellar-cream dark:!bg-deep-space",height:"24",value:c.ordered||0,max:c.started||100})})]})]}),(0,L.jsxs)("div",{className:"min-h-[416px] px-2 pb-2 md:px-4 md:pb-4 grid xl
1:grid-cols-2 gap-4",children:[(0,L.jsx)(z,{data:c,type:"assessment"}),(0,L.jsx)(D,{data:c,type:"assessment"})]})]}),"reassessment"===y&&$&&(0,L.jsxs)(L.Fragment,{children:[(0,L.jsxs)("div",{className:"p-2 py-4 md:p-4 grid grid-cols-2 md:grid-cols-4 gap-2 md:gap-4",children:[(0,L.jsxs)("div",{className:"page-section-3 bg-stellar-cream relative",children:[(0,L.jsx)("h3",{className:"section-header-2 slim text-center",children:"Starts"}),(0,L.jsx)("div",{className:"p-8 pt-0 text-4xl text-center",children:K.started}),(0,L.jsx)("div",{className:"min-h-6 absolute bottom-[-1px] left-[-1px] right-[-1px] border border-solar-200 dark:border-[#112659] rounded-b-lg text-center font-semibold text-sm !bg-stellar-cream dark:!bg-deep-space",children:"% of Total Starts"})]}),(0,L.jsxs)("div",{className:"page-section-3 bg-stellar-cream relative",children:[(0,L.jsx)("h3",{className:"section-header-2 slim text-center",children:"Outcomes"}),(0,L.jsx)("div",{className:"p-8 pt-0 text-4xl text-center",children:K.outcomes}),(0,L.jsx)("div",{className:"min-h-6 absolute bottom-[-1px] left-[-1px] right-[-1px]",children:(0,L.jsx)(j,{className:"!rounded-t-none !rounded-lg !border-solar-200 dark:!border-[#112659] !bg-stellar-cream dark:!bg-deep-space",height:"24",value:K.outcomes||0,max:K.started||100})})]}),(0,L.jsxs)("div",{className:"page-section-3 bg-stellar-cream relative",children:[(0,L.jsx)("h3",{className:"section-header-2 slim text-center",children:"OK to Use"}),(0,L.jsx)("div",{className:"p-8 pt-0 text-4xl text-center",children:K.ok}),(0,L.jsx)("div",{className:"min-h-6 absolute bottom-[-1px] left-[-1px] right-[-1px]",children:(0,L.jsx)(j,{className:"!rounded-t-none !rounded-lg !border-solar-200 dark:!border-[#112659] !bg-stellar-cream dark:!bg-deep-space",height:"24",value:K.ok||0,max:K.started||100})})]}),(0,L.jsxs)("div",{className:"page-section-3 bg-stellar-cream relative",children:[(0,L.jsx)("h3",{className:"section-header-2 slim text-center",children:"Purchased"}),(0,L.jsx)("div",{className:"p-8 pt-0 text-4xl text-center",children:K.ordered}),(0,L.jsx)("div",{className:"min-h-6 absolute bottom-[-1px] left-[-1px] right-[-1px]",children:(0,L.jsx)(j,{className:"!rounded-t-none !rounded-lg !border-solar-200 dark:!border-[#112659] !bg-stellar-cream dark:!bg-deep-space",height:"24",value:K.ordered||0,max:K.started||100})})]})]}),(0,L.jsxs)("div",{className:"min-h-[416px] px-2 pb-2 md:px-4 md:pb-4 grid xl
1:grid-cols-2 gap-4",children:[(0,L.jsx)(z,{data:K,type:"reassessment"}),(0,L.jsx)(D,{data:K,type:"reassessment"})]})]})]}),(0,L.jsxs)("section",{className:"page-section-3",children:[(0,L.jsx)("h2",{className:"section-header-2",children:y.includes("assessment")?"Questions by Sequence":"Purchase & Supply Summary Preferences"}),(0,L.jsxs)("div",{className:"overflow-x-scroll",children:["assessment"===y&&(0,L.jsx)(W,{spec:c.spec,projectId:e,assessment:c.id,screenComponents:c.screen_components,screenQuestions:c.screenquestions,sortKey:v,setSortKey:F,sortDir:A,setSortDir:O,host:c.host,...c}),"reassessment"===y&&$&&(0,L.jsx)(W,{spec:c.spec,projectId:e,assessment:K.id,screenComponents:K.screen_components,screenQuestions:K.screenquestions,sortKey:P,setSortKey:T,sortDir:H,setSortDir:R,isReassessment:!0,...K,host:c.host})]}),"summary"===y&&(0,L.jsx)(_,{data:c})]})]})]})}export{Q as default};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.