PageSourceSearch

https://app.aceable.com/assets/index-CUorTefl.js

js aceable.com collected 2026-09-24 19:21:10 UTC 21,429 bytes, 2 lines download raw bytes

1import{D as l,G as e,x as Q,e0 as je,e1 as Te,e4 as S,T as F,V as k,U as C,a9 as U,bo as le,H as we,M as ye,cg as O,e2 as Le,e3 as Ne,cz as Se,il as ke,cF as H,z as Ie,im as qe}from"./index-BuKyKLFj.js";import{a as K,b as Pe,g as Me,c as Re}from"./index-CD_DLhcr.js";import{c as _e,d as Ze,i as He,u as De,f as $e,m as Ae,l as oe}from"./useCurrentItemPointer-Wh1XTPlQ.js";import{g as Oe,S as Be}from"./clipboard-check-D-DExv1O.js";import{S as Qe}from"./document-lines-OlWc9jIf.js";import{S as ie}from"./lock-Bwf2h30e.js";import{P as Fe}from"./ProgressBar-NG9YwadF.js";import{C as de}from"./ChapterCircleProgress-DMxrx7J9.js";import{S as Ue,g as Ke}from"./index-BbUR0peZ.js";import"./useComponentLog-D6gfCGk9.js";import"./useIdleLogout-tq7p9qBf.js";import"./milestone-bwJSwbmp.js";import"./proctoredFinalNav-DyCA1EEu.js";import"./index-CM9lrt0L.js";import"./progress-test-CHm27QYD.js";import"./utils-C2YeA0OE.js";import"./index-CzC0wjMu.js";import"./index-Cem6eRBK.js";import"./index-ofuN0qm9.js";import"./index-7VB6VvD3.js";import"./Alert-BLYQzm0E.js";import"./useIntersectionObserver-CcQaEvIJ.js";import"./chevron-By5LvXop.js";import"./chevron-left-EiUkbVA9.js";import"./checkmark-line-kiZOXXUl.js";import"./lock-line-BzjFeZHC.js";import"./radio-unselected-DCrGjkkC.js";import"./class-events-DfP50Aov.js";import"./arrow-backward-Dh-4CpSy.js";import"./info-unfilled-9bN_G1bG.js";import"./useAceModeName-DvbJlO0H.js";import"./arrow-right-BR3SqPbT.js";import"./btn-arrow-iRTPxrPq.js";import"./alert-warning-DpbbWhsd.js";import"./lock-solid-xs-CuO9kEai.js";import"./studyPlanAnalytics-BKR-ZtUV.js";import"./x-exit-1q0rIYU0.js";import"./checkmark-rounded-DKJeGBkG.js";import"./index-IOxWpgvR.js";import"./complete-D1QUrnxj.js";import"./calendar-BiYXKDB-.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{};t.SENTRY_RELEASE={id:"[email protected]"};var s=new t.Error().stack;s&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[s]="44181dcf-4704-430e-8c66-2fd8e5375e94",t._sentryDebugIdIdentifier="sentry-dbid-44181dcf-4704-430e-8c66-2fd8e5375e94")}catch{}})();const ue=t=>l.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 -960 960 960",fill:"currentColor",...t},l.createElement("path",{d:"m385-412 36-115-95-74h116l38-119 37 119h117l-95 74 35 115-94-71-95 71ZM244-40v-304q-45-47-64.5-103T160-560q0-136 92-228t228-92q136 0 228 92t92 228q0 57-19.5 113T716-344v304l-236-79-236 79Zm420.5-335.5Q740-451 740-560t-75.5-184.5Q589-820 480-820t-184.5 75.5Q220-669 220-560t75.5 184.5Q371-300 480-300t184.5-75.5ZM304-124l176-55 176 55v-171q-40 29-86 42t-90 13q-44 0-90-13t-86-42v171Zm176-86Z"})),Ve=t=>l.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 -960 960 960",fill:"currentColor",...t},l.createElement("path",{d:"M560-574v-48q33-14 67.5-21t72.5-7q26 0 51 4t49 10v44q-24-9-48.5-13.5T700-610q-38 0-73 9.5T560-574Zm0 220v-49q33-13.5 67.5-20.25T700-430q26 0 51 4t49 10v44q-24-9-48.5-13.5T700-390q-38 0-73 9t-67 27Zm0-110v-48q33-14 67.5-21t72.5-7q26 0 51 4t49 10v44q-24-9-48.5-13.5T700-500q-38 0-73 9.5T560-464ZM248-300q53.57 0 104.28 12.5Q403-275 452-250v-427q-45-30-97.62-46.5Q301.76-740 248-740q-38 0-74.5 9.5T100-707v434q31-14 70.5-20.5T248-300Zm264 50q50-25 98-37.5T712-300q38 0 78.5 6t69.5 16v-429q-34-17-71.82-25-37.82-8-76.18-8-54 0-104.5 16.5T512-677v427Zm-30 90q-51-38-111-58.5T248-239q-36.54 0-71.77 9T106-208q-23.1 11-44.55-3Q40-225 40-251v-463q0-15 7-27.5T68-761q42-20 87.39-29.5 45.4-9.5 92.61-9.5 63 0 122.5 17T482-731q51-35 109.5-52T712-800q46.87 0 91.93 9.5Q849-781 891-761q14 7 21.5 19.5T920-714v463q0 27.89-22.5 42.45Q875-194 853-208q-34-14-69.23-22.5Q748.54-239 712-239q-63 0-121 21t-109 58ZM276-489Z"})),ze=t=>l.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 -960 960 960",fill:"currentColor",...t},l.createElement("path",{d:"M180-80q-24 0-42-18t-18-42v-620q0-24 18-42t42-18h65v-60h65v60h340v-60h65v60h65q24 0 42 18t18 42v620q0 24-18 42t-42 18H180Zm0-60h600v-430H180v430Zm0-490h600v-130H180v130Zm0 0v-130 130Zm300 230q-17 0-28.5-11.5T440-440q0-17 11.5-28.5T480-480q17 0 28.5 11.5T520-440q0 17-11.5 28.5T480-400Zm-188.5-11.5Q280-423 280-440t11.5-28.5Q303-480 320-480t28.5 11.5Q360-457 360-440t-11.5 28.5Q337-400 320-400t-28.5-11.5ZM640-400q-17 0-28.5-11.5T600-440q0-17 11.5-28.5T640-480q17 0 28.5 11.5T680-440q0 17-11.5 28.5T640-400ZM480-240q-17 0-28.5-11.5T440-280q0-17 11.5-28.5T480-320q17 0 28.5 11.5T520-280q0 17-11.5 28.5T480-240Zm-188.5-11.5Q280-263 280-280t11.5-28.5Q303-320 320-320t28.5 11.5Q360-297 360-280t-11.5 28.5Q337-240 320-240t-28.5-11.5ZM640-240q-17 0-28.5-11.5T600-280q0-17 11.5-28.5T640-320q17 0 28.5 11.5T680-280q0 17-11.5 28.5T640-240Z"})),Ge=t=>l.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 -960 960 960",fill:"currentColor",...t},l.createElement("path",{d:"M160-410v-60h300v60H160Zm0-165v-60h470v60H160Zm0-165v-60h470v60H160Zm360 580v-123l221-220q9-9 20-13t22-4q12 0 23 4.5t20 13.5l37 37q9 9 13 20t4 22q0 11-4.5 22.5T862.09-380L643-160H520Zm300-263-37-37 37 37ZM580-220h38l121-122-18-19-19-18-122 121v38Zm141-141-19-18 37 37-18-19Z"})),Ye=t=>l.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 -960 960 960",fill:"currentColor",...t},l.createElement("path",{d:"M479-120 189-279v-240L40-600l439-240 441 240v317h-60v-282l-91 46v240L479-120Zm0-308 315-172-315-169-313 169 313 172Zm0 240 230-127v-168L479-360 249-485v170l230 127Zm1-240Zm-1 74Zm0 0Z"})),Je=t=>l.createElement("svg",{viewBox:"25 25 50 50",fill:"none",xmlns:"http://www.w3.org/2000/svg",...t},l.createElement("circle",{cx:50,cy:50,r:20,fill:"none",stroke:"currentColor",strokeDasharray:"150 200",strokeDashoffset:-10,strokeLinecap:"round",strokeWidth:6})),V=()=>e.jsx("div",{"data-test":"inlineSpinner",className:"flex items-center justify-center py-6",children:e.jsx("div",{className:"size-10 text-status-info-icon",children:e.jsx(Je,{className:"h-full w-full animate-spin"})})}),We=t=>{switch(t){case"COMPLETED":return"text-status-success-text";case"FULFILLED":case"PROCESSING":return"text-status-info-icon";case"PENDING":case"INFO NEEDED":return"text-status-warning-icon";default:return"text-muted"}},Xe=()=>{const{item:t,progressId:s}=q(),r=Q(),{mutate:a}=je(),{cardData:n}=t.data,u=t.data._id??t.data.key,c=t.data.isSeen===!0,p=n!==null;if(l.useEffect(()=>
1{!p||!u||!s||c||a({cardId:u,progressId:s},{onSuccess:()=>{r({type:Te,payload:{cardId:u}})},onError:m=>{console.error(m)}})},[p,u,s,c,a,r]),!p)return e.jsx(S,{className:"overflow-hidden",children:e.jsx(V,{})});const o=n?.statusLabel,d=n?.statusType,f=n?.description,x=n?.linkList??[];return e.jsx(S,{className:"overflow-hidden",children:e.jsxs("div",{className:"flex flex-col gap-4 p-4",children:[e.jsx(ue,{width:40,height:40,className:"text-muted shrink-0","aria-hidden":"true","data-test":"certIcon"}),o&&e.jsx(F,{as:"h4",size:"xxsmall","data-test":"labelCert",className:k("uppercase",We(d)),children:o}),f&&e.jsx(C,{as:"p",variant:"paragraph-small","data-test":"paragraphCert",dangerouslySetInnerHTML:{__html:f}}),x.map(m=>e.jsx(U,{type:"button","data-test":"certButton",onClick:v=>{v.preventDefault(),v.stopPropagation(),r({type:le,payload:{linkObj:m}})},children:m.title||"Confirm"},m.key))]})})},et=(t,s,r,a,n)=>t?"complete":s&&n>0?"in-progress":s?"not-started":r||!a?"locked":"not-started",tt=(t,s)=>t?"locked":s?"complete":"incomplete",st=(t,s)=>t==="CHAPTER"&&s!==void 0?`CHAPTER ${String(s)}`:t==="CHAPTER"?"CHAPTER":"TEST",rt=({item:t,handleChapterItemClick:s,isRandomAccess:r,isCurrentCard:a,chapterNumber:n,isReadOnlyPreview:u=!1})=>{const{isComplete:c,isCurrent:p,isLocked:o,percentProgress:d,durationMessage:f,title:x,type:m,gradePercent:v,state:b}=t;if(m==="SECTION")return e.jsx("div",{className:"px-4 py-2 border-t border-divider-line-light",children:e.jsx(C,{as:"span",variant:"supertitle",weight:"extrabold",className:"text-muted! uppercase",children:x})});const y=et(c,p,o,r,d),j=u&&y!=="complete"?"locked":y,h=j==="locked",i=h||u,g=!!a&&p&&(j==="not-started"||j==="in-progress"),w=m==="TEST"&&b==="PENDING",R=!isNaN(v),T=m==="TEST"&&(w||R&&b!=="INCOMPLETE"),P=w?"-":String(Math.floor(v*100)),_=st(m,n),Z=I=>{i||s(I)};return e.jsx("div",{className:"px-4",children:e.jsxs("button",{"aria-label":`${x}, ${tt(h,c)}${u&&!h?", locked":""}`,onClick:Z,disabled:i,"data-test":`journeyCardChapter-${t._id}`,"data-state":j,"data-current":g,className:k("flex w-full items-center px-4 py-2 gap-4 text-left rounded-lg","bg-background-secondary","focus-visible:shadow-focus-dramatic focus-visible:outline-none",i?"cursor-default":"cursor-pointer hover:bg-panel-hover active:bg-panel-active",g&&"bg-background-accent hover:bg-background-accent"),children:[e.jsx("div",{className:"shrink-0 size-6 flex items-center justify-center",children:e.jsx(de,{state:j,percent:d,isCurrent:g})}),e.jsxs("div",{className:k("flex-1 flex flex-col gap-1 min-w-0",h&&"opacity-60"),children:[e.jsx(C,{as:"span",variant:"supertitle",weight:"semibold",className:"text-content-subtle! uppercase",children:_}),e.jsx(C,{as:"span",variant:"list-chapter-item",weight:"bold",children:x}),f&&e.jsx(C,{as:"span",variant:"paragraph-small",weight:"semibold",className:"text-content-subtle!",children:f}),T&&e.jsx(C,{as:"span",variant:"paragraph-small",weight:"bold",className:"text-content-subtle!",children:w?P:`${P}%`})]}),!u&&e.jsx(K,{width:16,height:16,className:"text-muted shrink-0","aria-hidden":"true"})]})})},at=({onStepClick:t})=>{const{item:s,isCurrentCard:r,isLocked:a}=q(),n=s.data.cardData?.stepList??s.data.stepList??[],u=r&&!a?n.findIndex(c=>!c.isComplete):-1;return e.jsx(S,{className:"overflow-hidden",children:n.length===0?e.jsx("div",{className:"px-8 pt-2 pb-4","data-test":"checkPanelEmpty",children:e.jsx(C,{as:"p",variant:"paragraph-small",className:"text-content-subtle!",children:"Your state hasn't added any required steps for this course. If that changes, they'll show up here."})}):e.jsx("div",{className:"flex flex-col gap-2 pt-2 pb-4","data-test":`checkPanelStepList-${s.data._id}`,children:n.map((c,p)=>{const o=p===u,d=c.isComplete?"complete":o?"current":"not-started",f=c.isComplete?"complete":"incomplete",x=k("flex w-full items-center px-4 py-2 gap-4 text-left rounded-lg","bg-background-secondary",!a&&"cursor-pointer hover:bg-panel-hover active:bg-panel-active",!a&&"focus-visible:shadow-focus-dramatic focus-visible:outline-none",o&&"bg-background-accent hover:bg-background-accent"),m=e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"shrink-0 size-6 flex items-center justify-center",children:e.jsx(de,{state:c.isComplete?"complete":"not-started",isCurrent:o})}),e.jsx("div",{className:"flex-1 min-w-0",children:e.jsx(C,{as:"span",variant:"list-chapter-item",weight:"bold",className:k(a&&"text-content-subtle!"),children:c.title})})]});return a?e.jsx("div",{className:"px-4",children:e.jsxs("div",{"data-test":`checkPanelStep-${c._id}`,"data-state":d,className:x,children:[m,e.jsx("span",{className:"sr-only",children:`, ${f}, locked`})]})},c._id??`step-${p}`):e.jsx("div",{className:"px-4",children:e.jsxs("button",{"aria-label":`${c.title??""}, ${f}`,onClick:()=>t?.(c),"data-test":`checkPanelStep-${c._id}`,"data-state":d,className:x,children:[m,e.jsx(K,{width:16,height:16,className:"text-muted shrink-0","aria-hidden":"true"})]})},c._id??`step-${p}`)})})})},nt=()=>{const{item:t,isLocked:s}=q(),r=Q(),{cardData:a}=t.data;if(a===null)return e.jsx(S,{className:"overflow-hidden",children:e.jsx(V,{})});const n=a?.alertList??[],u=a?.instructionList??[],c=a?.linkList??[],p="isUserEligible"in(a??{})?!a.isUserEligible:s;return e.jsx(S,{className:"overflow-hidden",children:e.jsxs("div",{className:"flex flex-col gap-4 p-4",children:[n.length>0&&e.jsx("div",{className:"flex flex-col gap-2",children:n.map((o,d)=>
1e.jsx(we,{title:o.title,description:o.description,variant:(o.type??"information").toLowerCase()},`${o.title}-${d}`))}),u.length>0&&e.jsx("ul",{className:"flex flex-col gap-4 list-none p-0 m-0",children:u.map((o,d)=>e.jsx(Ue,{iconSize:"small",IconComponent:Ke(o.icon),iconColor:"brand-secondary",title:o.title,description:o.description},`${o.title}-${d}`))}),c.map(o=>e.jsx(U,{type:"button",disabled:p,"data-test":"flkeButton",onClick:d=>{d.preventDefault(),d.stopPropagation(),r({type:le,payload:{linkObj:o}})},children:o.title},o.key))]})})},ot=()=>{const{item:t,levelIdx:s,progressId:r,onLoadJourneyCardData:a}=q(),{cardData:n}=t.data,u=l.useCallback(()=>{r&&t.data._id&&s!==void 0&&a?.(t.data._id,s)},[r,t.data._id,s,a]);if(n===null)return e.jsx(S,{className:"overflow-hidden",children:e.jsx(V,{})});const c=n?.sessionList??[],p=n?.instructorInfoUrl,o=n?.instructorInfoLabel;return e.jsx(S,{className:"overflow-hidden",children:e.jsxs("div",{className:"flex flex-col justify-center pb-2",children:[e.jsx(F,{as:"h4",size:"xlarge","data-test":"scheduleTitle",className:"mx-4 mt-4 mb-0",children:"Schedule your Webinar(s)"}),p&&o&&e.jsx("div",{className:"px-4",children:e.jsx(U,{asChild:!0,variant:"text-secondary","data-test":"scheduleItemInstructorInfoLink",children:e.jsx("a",{href:p,target:"_blank",rel:"noopener noreferrer",children:o})})}),c.map(d=>e.jsx(Pe,{webinarSession:d,getSessionList:u,progressId:r??""},d._id))]})})},it={LEVEL:Ve,CHECK:Be,WELCOME:Qe,FLKE:Ye,CERT:ue,SCHEDULE:ze,PRACTICE_TEST:Ge},ct=(t,s,r=!1)=>{switch(t){case"LEVEL":return r?null:s?`LEVEL ${s}`:"LEVEL";case"CERT":return"CERTIFICATE";case"PRACTICE_TEST":return"PRACTICE TEST";case"FLKE":return"KNOWLEDGE EXAM";case"SCHEDULE":return"SCHEDULE";case"CHECK":return"TO DO";case"JOURNEY":return"JOURNEY";case"TOPIC":return"TOPIC";case"WELCOME":return"INFO";case H:return"STATE EXAM PREP";default:return t}},ce=t=>{const s=t?.trim();return s||null},lt=(t,s,r)=>t!=="LEVEL"||s||r<=0?null:r>=3600?`${Math.round(r/3600*2)/2} hr left`:`${Math.round(r/60)} min left`,dt=(t,s,r,a)=>t==="CHECK"&&s.totalCount>0?s.label:r||(a??null),ut=(t,s,r)=>{const a=t==="CHECK"&&s.totalCount>0,n=a?s.percent:(r??0)*100;return{progressPercent:n,showProgressBar:a||n>0}},pe=l.createContext(null),q=()=>{const t=l.useContext(pe);if(!t)throw new Error("JourneyCardItem context used outside provider");return t},pt=()=>{const{item:t,levelNumber:s,isSingleLevel:r,canExpand:a,showCardNavChevron:n,isLocked:u,lockReason:c}=q(),{listDescription:p,title:o}=t.data,d=ct(t.type,s,r),f=it[t.type],x=u&&a;return e.jsxs("div",{className:"flex w-full gap-4 items-start",children:[e.jsxs("div",{className:"flex-1 flex flex-col gap-2 min-w-0",children:[d!==null&&e.jsxs("div",{className:"self-start inline-flex items-center gap-1.5 rounded-lg bg-background-secondary px-2.5 py-1 text-content-soft",children:[f&&e.jsx(f,{width:16,height:16,"aria-hidden":"true"}),e.jsx(C,{as:"span",variant:"paragraph-xsmall",weight:"bold",className:"text-content-soft! uppercase",children:d})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[x&&e.jsx(ie,{width:20,height:20,className:"text-muted shrink-0",role:"img","aria-label":"Locked","data-test":"journeyCardLockIcon"}),e.jsx(F,{as:"h3",size:"medium","data-test":Me(t),className:k(u&&"text-muted!"),children:t.type==="CHECK"?p:o})]}),c&&e.jsx(C,{as:"p",variant:"paragraph-small","data-test":"journeyCardLockReason",className:"text-content-soft!",children:c})]}),e.jsxs("div",{className:"size-7 flex items-center justify-center shrink-0",children:[a&&e.jsx(Ne,{children:e.jsx(Se,{width:16,height:16,className:"text-muted","aria-hidden":"true"})}),n&&e.jsx(K,{width:16,height:16,className:"text-muted","aria-hidden":"true"}),u&&!a&&e.jsx(ie,{width:24,height:24,className:"text-muted",role:"img","aria-label":"Locked","data-test":"journeyCardLockIcon"})]})]})},ht=()=>{const{progressPercent:t,isComplete:s,subtitle:r,subtext:a,showProgressBar:n}=q();return!n&&!r&&!a?null:e.jsxs("div",{className:"flex flex-col w-full empty:hidden",children:[a&&e.jsx(ke,{className:"overflow-hidden","data-test":"journeyCardSubtext",children:e.jsx(C,{as:"p",variant:"paragraph-small",className:k("text-content-subtle!",(n||r)&&"pb-2"),children:a})}),(n||r)&&e.jsxs("div",{className:"flex flex-col gap-2 w-full",children:[n&&e.jsx(Fe,{percentage:s?100:t}),r&&e.jsx(C,{as:"span",variant:"paragraph-small",className:"text-content-subtle!",children:r})]})]})},B=({isRandomAccess:t,onChapterItemClick:s,onCheckStepClick:r})=>
1{const{canExpand:a,item:n,chapterList:u,chapterIndexMap:c,isCurrentCard:p,isLocked:o}=q();return a?n.type==="SCHEDULE"?e.jsx(ot,{}):n.type==="FLKE"?e.jsx(nt,{}):n.type==="CERT"?e.jsx(Xe,{}):n.type==="CHECK"?e.jsx(at,{onStepClick:r}):e.jsx(S,{className:"overflow-hidden",children:e.jsx("div",{className:"flex flex-col gap-2 pt-2 pb-4","data-test":`journey-card-item-chapter-list-${n.data._id}`,children:u.map((d,f)=>{const x=c.get(d._id)??-1,m=d._id??d.key??d.chapterId??`chapter-${f}`;return e.jsx(rt,{isRandomAccess:t,isCurrentCard:p,item:d,chapterNumber:x!==-1?x+1:void 0,isReadOnlyPreview:o,handleChapterItemClick:()=>s?.(x,d)},m)})})}):null},mt=[],xt=["SCHEDULE","FLKE","CERT"],ft=({cardIdx:t,item:s,onClick:r,onExpand:a,levelNumber:n,isSingleLevel:u,levelIdx:c,defaultExpanded:p,forceExpandKey:o,isCheckExpandEnabled:d,isCheckLockEnabled:f,isCurrentCard:x=!1,precedingLevelNumber:m=0,progressId:v,onLoadJourneyCardData:b,children:y})=>{const j=l.useId(),h=l.useRef(null),{isConcealed:i,percentProgress:g,isComplete:w}=s.data,R=Q(),T=!!(s.data.isLocked??i),P=!!d&&s.type==="CHECK",_=["LEVEL","SCHEDULE","FLKE","CERT"].includes(s.type)||P,Z=s.data.cardData?.stepList??s.data.stepList??[],I=s.data.chapterList??mt,he=!!f&&P&&T&&!i&&Z.length>0,me=!!f&&s.type==="LEVEL"&&T&&!i&&I.length>0,M=he||me,L=!T&&!i&&_||M,[N,z]=l.useState((p??!1)&&L&&!M),D=!T&&!i&&!_&&["CHECK","WELCOME","PRACTICE_TEST"].includes(s.type),xe=l.useRef(o);l.useEffect(()=>{o!=null&&o!==xe.current&&(!L||M||(N||(z(!0),a?.()),h.current?.scrollIntoView({behavior:"smooth",block:"center"})))},[o]);const fe=l.useRef(N),G=l.useRef(!1);l.useEffect(()=>{G.current||fe.current&&xt.includes(s.type)&&s.data.cardData===null&&(!v||!s.data._id||c===void 0||(G.current=!0,b?.(s.data._id,c)))},[v,s.type,s.data.cardData,s.data._id,c,b]);const Y=l.useMemo(()=>I.filter(E=>E.type!=="SECTION"),[I]),J=l.useMemo(()=>new Map(Y.map((E,be)=>[E._id,be])),[Y]),W=Oe(Z),{progressPercent:X,showProgressBar:ee}=ut(s.type,W,g),ge=s.data.secondsLeft??0,ve=T?null:lt(s.type,w??!1,ge),te=dt(s.type,W,ve,s.data.listDescription),se=s.type==="CERT"?null:ce(s.data.description)??ce(s.data.cardData?.description),re=!T||i||m<=0?null:u?"Finish the previous card to unlock":`Finish Level ${m} to unlock`,$=l.useCallback(()=>{!N&&!M&&a?.(),z(E=>!E)},[N,M,a]),A=l.useCallback(()=>{i?R({type:ye,payload:{modal:{message:"This content is unavailable at this time.",title:"Hidden Content",buttonText:"Got It"}}}):r()},[i,R,r]),Ce=l.useMemo(()=>({item:s,levelNumber:n,isSingleLevel:u,levelIdx:c,isCurrentCard:x,isExpanded:N,canExpand:L,showCardNavChevron:D,isLocked:T,lockReason:re,progressPercent:X,showProgressBar:ee,isComplete:w,subtitle:te,subtext:se,chapterList:I,chapterIndexMap:J,progressId:v,onLoadJourneyCardData:b,toggle:$,handleNavClick:A}),[s,n,u,c,x,N,L,D,T,re,X,ee,w,te,se,I,J,v,b,$,A]),ae=O.Children.toArray(y),Ee=ae.find(E=>O.isValidElement(E)&&E.type===B),ne=ae.filter(E=>!(O.isValidElement(E)&&E.type===B));return e.jsx(pe.Provider,{value:Ce,children:e.jsx(Le,{isOpen:N,id:j,children:e.jsxs("div",{ref:h,className:"bg-background-primary rounded-lg",id:`level-list-item${t}`,children:[L||D||i?e.jsx("button",{"data-test":`journey-card-item-trigger-${t}`,onClick:L?$:A,className:k("flex flex-col w-full p-4 gap-2 text-left","bg-background-primary border-none cursor-pointer rounded-lg","active:bg-background-tertiary","focus-visible:shadow-focus-dramatic focus-visible:outline-none"),"aria-expanded":L?N:void 0,"aria-controls":L?j:void 0,children:ne}):e.jsx("button",{disabled:!0,"data-test":`journey-card-item-trigger-${t}`,className:"flex flex-col w-full p-4 gap-2 text-left bg-background-primary border-none rounded-lg cursor-default",children:ne}),Ee]})})})},gt=ft,vt=pt,Ct=ht,Et=B,bt=new Set(["RESOURCE"]),ls=({levelData:t,onLevelListItemClick:s,onChapterItemClick:r,onCheckStepClick:a,isCheckExpandEnabled:n,isCheckLockEnabled:u,isRandomAccess:c,progressId:p,onLoadJourneyCardData:o})=>{const d=l.useMemo(()=>t.map((h,i)=>({item:h,idx:i})).filter(({item:h})=>!bt.has(h.type)),[t]),f=l.useMemo(()=>_e(t),[t]),x=l.useMemo(()=>Ze(t),[t]),m=l.useMemo(()=>He(t),[t]),v=De(),b=l.useMemo(()=>{const h=g=>g.type!==H,i=$e(t,v);return i!==-1&&h(t[i])?i:t.findIndex(g=>g.data.isCurrent&&h(g))},[t,v]),y=Ie(qe),j=l.useMemo(()=>{const{levelPathId:h}=y;return h?t.findIndex(i=>i.type!==H&&Ae(i,h)):-1},[t,y.levelPathId]);return e.jsx("div",{className:"flex flex-col gap-3 p-3",children:d.map(({item:h,idx:i})=>h.type===H?e.jsx(Re,{cardId:oe(h)||void 0,progressId:p},oe(h)||`state-exam-prep-${i}`):e.jsxs(gt,{cardIdx:i.toString(),item:h,defaultExpanded:b===i,isCurrentCard:b===i,forceExpandKey:j===i?y.nonce:null,isCheckExpandEnabled:n,isCheckLockEnabled:u,onExpand:()=>{s(i)},levelNumber:f[i],isSingleLevel:m,precedingLevelNumber:x[i],levelIdx:i,onClick:()=>{s(i)},progressId:p,onLoadJourneyCardData:o,children:[e.jsx(vt,{}),e.jsx(Ct,{}),e.jsx(Et,{isRandomAccess:c,onChapterItemClick:(g,w)=>r?.(i,g,w),onCheckStepClick:g=>a?.(i,g)})]},h.data._id??h.data.key??`level-${i}`))})};export{ls as default};
2//# sourceMappingURL=index-CUorTefl.js.map

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.