(globalThis.wpRiseJsonp=globalThis.wpRiseJsonp||[]).push([["learn_main_tsx-node_modules_pnpm_moment_2_30_1_node_modules_moment_locale_sync_recursive_en"],{30349(jc){jc.exports=function(qa){qa||(qa={});var __t,__p="";with(qa)__p+=`<style>
  :root {
    --color-theme-contrast-complementary-rgb: `+((__t=colorThemeContrastComplementaryRGB)==null?"":__t)+`;
    --color-theme-contrast-complementary: `+((__t=colorThemeContrastComplementary)==null?"":__t)+`;
    --color-theme-contrast-rgb: `+((__t=colorThemeContrastRGB)==null?"":__t)+`;
    --color-theme-contrast: `+((__t=colorThemeContrast)==null?"":__t)+`;
    --color-theme-rgb: `+((__t=colorThemeRGB)==null?"":__t)+`;
    --color-theme-tint: `+((__t=colorThemeTint)==null?"":__t)+`;
    --color-theme-transparent: `+((__t=colorThemeTransparent)==null?"":__t)+`;
    --color-theme: `+((__t=colorTheme)==null?"":__t)+`;
    --font-family-body: `+((__t=bodyTypeface)==null?"":__t)+`, 'Noto Sans Myanmar', sans-serif;
    --font-family-head: `+((__t=headingTypeface)==null?"":__t)+`, 'Noto Sans Myanmar', sans-serif;
    --font-family-ui: `+((__t=uiTypeface)==null?"":__t)+`, 'Noto Sans Myanmar', sans-serif;

    --mon-theme-font-body: var(--font-family-body);
    --mon-theme-font-heading: var(--font-family-head);
  }

  .brand--ui, .brand--ui * {
    font-family: var(--font-family-ui) !important;
  }

  .brand--beforeHead:before {
    font-family: var(--font-family-ui) !important;
  }

  .brand--afterHead:after {
    font-family: var(--font-family-ui) !important;
  }

  .brand--background {
    background-color: var(--color-theme) !important;
  }

  .brand--background-all * {
    background-color: var(--color-theme) !important;
  }

  .brand--border {
    border-color: var(--color-theme) !important;

    @media (forced-colors: active) {
      border-color: transparent !important;
    }
  }

  .brand--color {
    color: var(--color-theme) !important;
  }

  .brand--color-all * {
    color: var(--color-theme) !important;
  }

  .brand--shadow {
    box-shadow: 0 0 0 0.2rem var(--color-theme) !important;
  }

  .brand--shadow-all * {
    box-shadow: 0 0 0 0.2rem var(--color-theme) !important;
  }

  .brand--fill {
    fill: var(--color-theme) !important;
  }

  .brand--stroke {
    stroke: var(--color-theme) !important;
  }

  .brand--beforeBackground:before {
    background-color: var(--color-theme) !important;
  }

  .brand--beforeBorder:before {
    border-color: var(--color-theme) !important;
  }

  .brand--beforeColor:before {
    color: var(--color-theme) !important;
  }

  .brand--afterBackground:after {
    background-color: var(--color-theme) !important;
  }

  .brand--afterBorder:after {
    border-color: var(--color-theme) !important;
  }

  .brand--afterColor:after {
    color: var(--color-theme) !important;
  }

  /* should be applied to containers where links
     need to appear in brand color */
  .brand--linkColor a {
    color: var(--color-theme) !important;
    fill: var(--color-theme) !important;
  }

  /* should be applied to containers where links
     need to change to brand color on hover */
  .brand--linkColorHover a:hover {
    color: var(--color-theme) !important;
    fill: var(--color-theme) !important;
  }

  /* should be applied to any single element that
     needs to change color on hover */
  .brand--hoverColor:hover {
    color: var(--color-theme) !important;
  }

  .button.brand--background:hover { opacity: .65 !important; }

  .brandHover:hover {
    fill: var(--color-theme) !important;
  }


  @media (min-width: 47.9375em) { /* 768px */
    .brand--min768--background {
      background-color: var(--color-theme) !important;
    }

    .brand--min768--border {
      border-color: var(--color-theme) !important;
    }

    .brand--min768--color {
      color: var(--color-theme) !important;
    }
  }

  @media (max-width: 47.9375em) { /* 768px */
    .brand--max768--background {
      background-color: var(--color-theme) !important;
    }

    .brand--max768--border {
      border-color: var(--color-theme) !important;
    }

    .brand--max768--color {
      color: var(--color-theme) !important;
    }
  }
</style>
`;return __p}},88309(jc,qa,p){"use strict";var Wo={};p.r(Wo),p.d(Wo,{callbackComponent:()=>uS,callbackPath:()=>r0,errorPath:()=>tS,getToken:()=>sS,initAuth:()=>Q1,login:()=>W1,logout:()=>nr,onFetchTokensThunk:()=>hS,onSessionExpired:()=>rS,refreshSession:()=>oS,request:()=>O9});var lo={};p.r(lo),p.d(lo,{CoverDescription:()=>gB,CoverDetailsContentHeading:()=>RH,CoverDueDate:()=>vB,CoverHeader:()=>VF,CoverLayout:()=>_F,LessonHeader:()=>ZF,LessonNavFinish:()=>rH,LessonNavNext:()=>aH,LessonNavPrevious:()=>cH,LessonProgressGraphic:()=>pH,NavCompactHeaderCounter:()=>PH,NavCompactHeaderProgress:()=>MH,NavCompactOutline:()=>OH,OverviewListItem:()=>BH,OverviewListSectionTitle:()=>DH,Progress:()=>AH});var Br={};p.r(Br),p.d(Br,{AlignLeft:()=>$H,ArrowDown:()=>bm,ArrowLeft:()=>FH,ArrowRight:()=>HH,ArrowUp:()=>Nx,Category:()=>wB,ChevronDown:()=>VH,ChevronUp:()=>zH,Favorite:()=>Am,LessonsComplete:()=>ed,LessonsRequirement:()=>Ax,QuestionBox:()=>UH,QuizFailed:()=>wx,QuizPassed:()=>ed,QuizRequirement:()=>X2,Search:()=>_H,ToggleDown:()=>GH,Touch:()=>WH,VideoCamera:()=>KH,X:()=>QH});var Os={};p.r(Os),p.d(Os,{components:()=>lo,icons:()=>Br});var uo={};p.r(uo),p.d(uo,{CoverCourseInfo:()=>XH,CoverDetailsSection:()=>t$,CoverHeader:()=>f$,CoverLayout:()=>v$,LessonHeader:()=>y$,LessonProgressGraphic:()=>N$,NavSidebarHeader:()=>I$,OverviewListItemLinkContent:()=>R$,Progress:()=>P$});var ju={};p.r(ju),p.d(ju,{ArrowDown:()=>$x,ArrowLeft:()=>O$,ArrowRight:()=>M$,ArrowUp:()=>$x,ChevronDown:()=>Vx,ChevronUp:()=>Vx,Favorite:()=>Am,LessonsComplete:()=>zx,LessonsRequirement:()=>Ux,QuizFailed:()=>D$,QuizPassed:()=>zx,QuizRequirement:()=>Ux,Search:()=>B$,ToggleDown:()=>F$,X:()=>H$});var wu={};p.r(wu),p.d(wu,{components:()=>uo,icons:()=>ju});var Au={};p.r(Au),p.d(Au,{CoverDescription:()=>z$,CoverDetails:()=>_$,CoverGraphic:()=>Gi,CoverHeader:()=>J$,CoverLayout:()=>sV,CoverProgress:()=>nV,CoverSVG:()=>yr,LessonHeader:()=>iV,LessonProgressGraphic:()=>hV,NavSidebarHeaderProgress:()=>fV});var Ru={};p.r(Ru),p.d(Ru,{AlignLeft:()=>xV,ArrowDown:()=>pV,ArrowLeft:()=>gV,ArrowRight:()=>vV,ArrowUp:()=>CV,ChevronDown:()=>qx,ChevronUp:()=>bV,Favorite:()=>Am,LessonsComplete:()=>ed,LessonsRequirement:()=>Ax,QuestionBox:()=>yV,QuizFailed:()=>wx,QuizPassed:()=>ed,QuizRequirement:()=>X2,Search:()=>TV,ToggleDown:()=>qx,Touch:()=>LV,VideoCamera:()=>SV,X:()=>kV});var Pu={};p.r(Pu),p.d(Pu,{components:()=>Au,icons:()=>Ru});var n=p(34158),Bie=p(28900),Die=p(19800),Fie=p(46530),Hie=p(53920),$ie=p(94756),Vie=p(53373),zie=p(73853),Uie=p(34555),_ie=p(81258),Gie=p(84381),Wie=p(90460),Kie=p(30803),Qie=p(42247),Yie=p(21855),Zie=p(79302),Xie=p(76032),qie=p(96795),u=p(82920),p4=p(94265),we=p(2422),g4=p(55676),wc=p(18398),ho=p(18442),v4=p(40412),C4=p(36202),x4=p(18484);const Mu=u.createContext(null),Ou=u.createContext(!1),Ko=e=>(0,n.jsx)(Ou.Provider,{value:!0,children:(0,n.jsx)(v4.A,{...e})});function Op(e){return class extends u.Component{static displayName=`withStaleTransitionState(${e.displayName||e.name})`;static defaultProps={onEnter:()=>{},onEntered:()=>{},onEntering:()=>{},onExit:()=>{},onExited:()=>{},onExiting:()=>{}};nodeRef=u.createRef();onEnterDelegate;onEnteringDelegate;onEnteredDelegate;onExitDelegate;onExitingDelegate;onExitedDelegate;constructor(s){super(s),this.state={transitionState:null},this.onEnterDelegate=this.onTransition.bind(this,"enter"),this.onEnteringDelegate=this.onTransition.bind(this,"entering"),this.onEnteredDelegate=this.onTransition.bind(this,"entered"),this.onExitDelegate=this.onTransition.bind(this,"exit"),this.onExitingDelegate=this.onTransition.bind(this,"exiting"),this.onExitedDelegate=this.onTransition.bind(this,"exited")}onTransition=(s,...o)=>{this.setState({transitionState:s});const r="on"+s[0].toUpperCase()+s.slice(1),a=this.props[r];typeof a=="function"&&a(...o)};render(){return(0,n.jsx)(Mu.Provider,{value:this.state.transitionState,children:(0,n.jsx)(e,{nodeRef:this.nodeRef,...this.props,onEnter:this.onEnterDelegate,onEntered:this.onEnteredDelegate,onEntering:this.onEnteringDelegate,onExit:this.onExitDelegate,onExited:this.onExitedDelegate,onExiting:this.onExitingDelegate})})}}}const Ac=Op(C4.Ay),Bn=Op(x4.A);function b4(e){const t=u.useContext(Ou),s=u.useContext(Mu),o=u.useRef(e);return t&&s?.startsWith?.("exit")||(o.current=e),o.current}function y4(e){const t=s=>{const o=b4(s);return(0,n.jsx)(e,{...o,nodeRef:s.ref,ref:s.ref})};return t.displayName=`withTransitionableState(${e.displayName||e.name||"Component"})`,t}const Bp=e=>e!=null&&typeof e=="object"&&"map"in e&&typeof e.map=="function",T4=e=>e!=null&&typeof e=="object"&&"run"in e&&typeof e.run=="function",Dp=e=>e!=null&&typeof e=="object"&&"then"in e&&typeof e.then=="function",L4=e=>e!=null&&typeof e=="object"&&"fork"in e&&typeof e.fork=="function",Fp=e=>e!=null&&typeof e=="function",Hp=(e,t)=>{const s=o=>Hp(o,t);if(typeof e=="object"&&"type"in e&&typeof e.type=="string"){const o="meta"in e&&typeof e.meta=="object"?e.meta:void 0;return{...e,meta:{...o,origin:t}}}if("bimap"in e&&typeof e.bimap=="function")return e.bimap(s,s);if(Bp(e))return e.map(s);if(Dp(e))return e.then(s);if(Fp(e))return function(r,a){return e(i=>r(s(i)),a)}};function S4(){return({dispatch:e,getState:t})=>s=>o=>{if(Fp(o))return o(e,t);if(Dp(o))return o.then(e);if(L4(o)){o.fork(e,e);return}return T4(o)?e(o.run()):Bp(o)?o.map(e):s(o)}}function k4(){return[S4()]}var Rc=p(82920);const N4=wc.Zz;function I4(e,t){const s=(0,wc.y$)(e,t,N4((0,wc.Tw)(...k4()))),o=j4(),r=w4(),a=A4(),i=R4(),c=P4(),l=E4();return{Provider:ho.Kq,connect:o,connectBase:r,dispatch:s.dispatch,store:s,useDispatch:a,useDispatchWithOrigin:i,useSelector:c,useStore:l}}function E4(){return function(){return(0,ho.Pj)()}}function j4(){return function(t,s,o,r){return function(a){return(0,ho.Ng)(t,s,o,r)(y4(a))}}}function w4(){return function(t,s,o,r){return function(a){return(0,ho.Ng)(t,s,o,r)(a)}}}function A4(){return ho.wA}function R4(){return function(t){const s=(0,ho.wA)();return Rc.useCallback(r=>s(Hp(r,t)),[s,t])}}function P4(){return function(t,s=ho.bN){const o=Rc.useContext(Ou),r=Rc.useContext(Mu),a=Rc.useRef(void 0),i=(0,g4.S)(),c=(0,ho.d4)(t,s),l=!i&&o&&r?.startsWith?.("exit");return l||(a.current=c),l&&a.current!==void 0?a.current:c}}var Dr=p(62151),M4=p(81395),Qo=p.n(M4),fe=p(15368),O4;function B4(){return fe.action}function Jie(){return O4}var Yo=p(47371),D4=p(58166),Re=p.n(D4),F4=p(46776),Bu=p.n(F4),H4=p(68325),Ne=p.n(H4),$4=p(94057),Zs=p.n($4),V4=p(42117),Du=p.n(V4);const Pc=Bu()(Du()),$p=["a","b","blockquote","br","div","em","h1","h2","h3","h4","h5","h6","i","img","li","mark","ol","p","table","td","th","tbody","thead","tr","s","strong","span","sub","sup","u","ul","details","summary","rise-image","rise-math"],z4=["align","allow","allowfullscreen","frameborder","height","longdesc","marginheight","marginwidth","name","referrerpolicy","sandbox","scrolling","src","title","width"],U4=Pc({allowedAttributes:{"*":["aria-*","class","colspan","id","rowspan","slot","style"],a:["data-external","data-link-type","data-link-destination","href","target","rel"],img:["alt","src"],ol:["start"],span:["data-*"],"rise-image":["key","src","width","height","originalwidth","originalheight"],"rise-math":["data-translate-attrs","long-description","short-description","tex"]},allowedClasses:["fr-*"],allowedSchemes:["data","http","https","mailto"],allowedTags:$p}),_4=Pc({allowedAttributes:{iframe:z4},allowedTags:["iframe"],allowedSchemes:["http","https"]}),Fu=Zs()(Ne(),U4,Re()("")),Vp=Zs()(Ne(),_4,Re()("")),Ss=Pc({allowedTags:[],allowedAttributes:[]}),ece=Pc({allowedAttributes:{"*":["aria-*","class","colspan","rowspan","style"],a:["data-external","data-link-type","data-link-destination","href","target","rel"],ol:["start"],span:["data-*"],"rise-image":["key","src","width","height","originalwidth","originalheight"],"rise-math":["tex"]},allowedClasses:["fr-*"],allowedSchemes:["data","http","https","mailto"],allowedTags:$p.filter(e=>e!=="img")}),tce=e=>{const t=e.replace(/((<br>)|(<\/[a-z]*>))+/g," ");return Ss(t).replace(/\s{2,}/g," ")},{Runtime:qt}=window,Ie=e=>window.env?.[e],sce=!1,nce=null,zp="Rise 360",G4=e=>`${Ie("CDN_USER_CONTENT_URI")}/${e}`,pt=e=>{const t=e||"",s=qt?.resolvePath!=null?qt.resolvePath.bind(qt):G4;return t.startsWith("http")||t.startsWith("data:")||t.startsWith("//")?t:s(t)||t},W4=e=>qt?.resolveFontPath!=null?qt.resolveFontPath(e):`${e.default?Ie("CDN_URI"):Ie("CDN_USER_CONTENT_URI")}/${e.key}`,Up=()=>{qt?.exit!=null&&qt.exit()},K4=()=>qt?.isComplete!=null?qt.isComplete():null,Ja=()=>qt?.isExport!=null?qt.isExport():!1;function Q4(){if(qt?.isExport!=null){const e=window.partnerContent?.content;return qt.isExport()&&!!e}return!1}const _p=()=>{if(qt?.sendTouch!=null)return qt.sendTouch()};var Y4=p(19086),Dn=p.n(Y4),Z4=p(39405),Fn=p.n(Z4),X4=p(49329),Mc=p.n(X4),q4=p(57065),gt=p.n(q4),J4=p(37223),Cn=p.n(J4),e9=p(21217),Gp=p.n(e9),t9=p(11786),Hu=p.n(t9),s9=p(89658),Ye=p.n(s9),n9=p(2572),Xe=p.n(n9),o9=p(70057),Xs=p.n(o9);const r9=Dn(),Oc=Ye(),a9=Fn(),Wp=e=>Mc()(e),Bc=Zs(),Dc=e=>t=>{const s=e(t);return Ss(s==null?void 0:String(s))},Kp=e=>t=>r9({[e]:s=>Ss(s==null?void 0:String(s))},t),i9=({startTime:e,stopTime:t})=>t-e,c9=e=>{switch(e.type){case"FILL_IN_THE_BLANK":return qp(e);case"MATCHING":return n1(e);default:return Fr(e)}},l9=e=>{switch(e.type){case"FILL_IN_THE_BLANK":return qp(e);case"MATCHING":return n1(e);case"MULTIPLE_CHOICE":return Jp(e);case"MULTIPLE_RESPONSE":return h9(e);default:return Jp(e)}},d9=({isUnfinished:e,item:t,itemProgress:s})=>{switch(t.type){case"FILL_IN_THE_BLANK":return u9(e)(s);case"MATCHING":return g9(t,e)(s);case"MULTIPLE_CHOICE":return e1(t,e)(s);case"MULTIPLE_RESPONSE":return m9(t,e)(s);default:return e1(t,e)(s)}},Qp=e=>[e],Fr=e=>{const t=e.answers||[];if(e.shuffledAnswerIndices&&Array.isArray(e.shuffledAnswerIndices)){const s=e.shuffledAnswerIndices,o=[];return t.forEach((r,a)=>{const i=s[a];typeof i=="number"&&(o[i]=r)}),o.map(Kp("title"))}return t.map(Kp("title"))},$u=Dc(Ye()("id")),Yp=Dc(Ye()("title")),Zp=e=>t=>a9(s=>Xe()("id",t,s),Fr(e)),Xp=e=>t=>Gp()(t,Fr(e)),qp=e=>Hu()("title",Fr(e)),u9=e=>t=>Bc(Re()(e),Re()(""),Dc(s=>Oc("text",s)))(t),Jp=e=>e.correct==null?[]:Zp(e)(e.correct),e1=(e,t)=>s=>Bc(Re()(t),Re()([]),()=>{const o=Oc("selectedIndex",s);return o===void 0?[]:Qp(Xp(e)(o))})(s),h9=e=>Wp(gt()(Zp(e),e.corrects??[])),m9=(e,t)=>s=>Bc(Re()(t),Re()([]),()=>{const o=Oc("selectedIndices",s)||[];return Wp(o.map(r=>Qp(Xp(e)(r))))})(s),t1=({sourceId:e,sourceTitle:t,targetId:s,targetTitle:o})=>({source:{id:`source_${String(e)}`,title:t},target:{id:`target_${String(s)}`,title:o}}),s1=Dc(Ye()("matchTitle")),f9=e=>{const t=$u(e);return t1({sourceId:t,sourceTitle:Yp(e),targetId:t,targetTitle:s1(e)})},p9=e=>(t,s)=>{const o=Fr(e),r=o.find(i=>i?.id===s),a=o.find(i=>i?.id===t);return t1({sourceId:$u(r),sourceTitle:Yp(r),targetId:$u(a),targetTitle:s1(a)})},n1=e=>gt()(f9,Fr(e)),g9=(e,t)=>s=>Bc(Re()(t),Re()([]),()=>{const o=Oc("matches",s);return Xs()(Cn()(p9(e),o??{}))})(s);var v9=p(99552),o1=p.n(v9),C9=p(30208),r1=p.n(C9),x9=p(22775),Zo=p.n(x9),a1,oce;const Vu="_articulate_user_id",b9="_rise_authoring_api_session",i1=()=>"_articulate_rise_",zu=(e,t)=>`${e}=${t}; domain=${Ie("SESSION_COOKIE_DOMAIN")}; path=/; secure=true`,y9=e=>document.cookie=zu(Vu,e),T9=()=>document.cookie=`${zu(Vu,"")}; Max-Age=-99999999`,L9=()=>document.cookie=`${zu(b9,"")}; Max-Age=-99999999`,Xo=()=>r1().load(Vu),vt=()=>r1().load(i1()),S9=()=>vt()?Zo()(vt()).staff:!1,k9=()=>vt()?a1(vt())?.staffRoles||[]:[],N9=()=>vt()?a1(vt())?.content_team_admin:!1,rce=()=>k9().includes("content-team")||N9(),Uu=()=>vt()?Zo()(vt()).riseId||Zo()(vt()).sub||Zo()(vt()).aid:"",I9=()=>vt()?Zo()(vt()).roles:[],E9=()=>vt()?Zo()(vt()).tenantId:"",c1=()=>vt()?Zo()(vt()).subscription||{}:{},j9=()=>c1().plan_id||"",w9=()=>c1().status||"";var A9=p(87266),R9=p(87155),qo=p.n(R9);const P9=qo()(window.env,{ACCESS_COOKIE_NAME:i1(),REDIRECT_URI:window.location.origin+"/auth-callback"}),mo=(0,A9.A)(P9),l1=mo.closeSession,Hr=mo.on,M9=mo.off,O9=mo.request,d1=mo.refreshSession,ei=mo.resetSession,B9=mo.getAuthorizationUrl,ace=mo.fetch;var Hn=p(69476);const Fc=(e,t)=>((...s)=>{try{return e(...s)}catch(o){window.env?.SERVICE_ENV&&window.env?.SERVICE_ENV!=="prod"&&console.error(o),Hn.L2.addError(o),t(o)}}),D9=e=>{const t=e.getResponseHeader("content-type")||"",s=t.includes("application/json");if(!(s||t.includes("text/")))return e.response;try{const r=new TextDecoder("utf-8").decode(e.response);try{return s?JSON.parse(r):r}catch{return r}}catch{return e.response}};function F9(e,t){const s=t.indexOf(":"),o=t.substr(0,s).trim().toLowerCase(),r=t.substr(s+1).trim();return o&&(e[o]=e[o]?e[o]+", "+r:r),e}function H9(e){return e?e.split(`
`).reduce(F9,{}):{}}function u1(e){const t=[];for(const s in e){const o=e[s];if(!Array.isArray(o)){t.push(encodeURIComponent(s)+"="+encodeURIComponent(o));continue}for(const r of o)t.push(u1(r))}return t.join("&")}function _u(e){let t,s=!1;const o=new Promise(function r(a,i){const c=e.signal;if(c?.aborted){i(new DOMException("Aborted","AbortError"));return}const l=w=>{throw i(w),w},d=()=>{t.abort(),i(new DOMException("Aborted","AbortError"))},h=e.data;let m=Fc(e.deserialize??o1(),l);const f=e.headers??{},v=e.json??!1,C=e.jwt??!1,g=e.token??null,x=e.method??"GET",b=e.reviewEnv??!1,T=e.onUploadProgress;let L=Fc(e.serialize??o1(),l),y=e.url;const S=e.withCredentials??!1,k=e.file,N=e.timeout??3e3;t=new XMLHttpRequest;const I=setTimeout(()=>{t.abort(),i({error:"request timed out"})},N);if(v&&(m=Fc(JSON.parse,i),L=Fc(JSON.stringify,i),f["Content-Type"]="application/json"),x==="GET"&&h&&(y+="?"+u1(h)),C){const w=g||vt();f.Authorization="Bearer "+w}c?.addEventListener("abort",d),t.withCredentials=S,t.addEventListener("abort",i),t.addEventListener("error",i),t.addEventListener("load",function(){t.status>=400?[401,403].includes(t.status)?s?i({error:"Unable to resume session",status:t.status}):ei().then(()=>{r(a,i),s=!0}).catch(w=>{Hn.L2.addError(w),i({error:"Unable to resume session",status:t.status})}):e.arrayBuffer?i(D9(t)):i(m(t.response)):(a({body:t.status===204?void 0:m(t.response),headers:H9(t.getAllResponseHeaders()),status:t.status}),c?.removeEventListener("abort",d)),clearTimeout(I)}),t.upload&&typeof T=="function"&&t.upload.addEventListener("progress",T),t.open(x,y),e.arrayBuffer&&(t.responseType="arraybuffer");for(const w in f)t.setRequestHeader(w,f[w]);x!=="GET"&&h?t.send(L(h)):k?t.send(k):t.send()});return o.abort=(...r)=>t.abort(...r),o}function $9(e){return e.status===200||e.status===201?e.body:Promise.reject(e.body)}const h1=(e,t=!0)=>t?`${e}s`:e;var Gu=null;const ice=null,m1=null,cce=(e,t="short")=>{const o=Object.keys(Gu).reverse().find(c=>e>=Gu[c]);if(!o)return`${e} ${h1("byte",e>1)}`;const r=e/Gu[o],a=r%1===0?r.toFixed(0):r.toFixed(2),i=t==="long"?h1(m1[o].long,r>1):m1[o].short;return`${a} ${i}`};var V9=p(12413),z9=p.n(V9);const ms=e=>!!e&&e.type==="quiz",xn=e=>!!e&&e.type==="blocks",Ct=({courseProgress:e,lessonId:t,updatedLessonProgress:s})=>({...e,lessons:{...e.lessons,[t]:s}});function xt({lessonId:e,nextCourseProgress:t,prevCourseProgress:s}){const o=t.lessons[e],r=s.lessons[e];if(o&&!z9()(o,r)&&(u8(o),U9({lessonId:e,courseProgress:t,prevCourseProgress:s})),_9({lessonId:e,prevCourseProgress:s,nextCourseProgress:t})){const a=p1(s),i=p1(t),c=i!==a,l={...t,percentComplete:i};return c&&(G9({courseProgress:l,lessonProgress:o}),l.percentComplete!=null&&m8(l.percentComplete)),l}return t}function U9({courseProgress:e,prevCourseProgress:t,lessonId:s}){const o=e.lessons?.[s],r=t.lessons?.[s];if(o?.percentComplete===100&&r?.percentComplete!==100){const a=f1(o);a&&d8(a)}}function _9({lessonId:e,nextCourseProgress:t,prevCourseProgress:s}){const o=t.lessons?.[e];if(!o)return!1;const r=s.lessons?.[e]?.percentComplete===100,a=o.percentComplete===100,i=r!==a,c=t.currentLesson!=null&&ms(t.lessons[t.currentLesson])&&t.lessons[t.currentLesson]?.percentComplete===100;return i||c}function f1(e){const{id:t}=e;if(!t)throw new Error("Cannot create lesson payload: lesson.id is missing");if(ms(e)){const{passed:s,score:o,passingScore:r=0}=e;return{id:t,...s!==void 0&&{passed:s},...o!==void 0&&{score:o},passingScore:r}}return{id:t}}function p1(e){const{lessons:t={}}=e,s=Object.keys(t).length;if(s===0)return 0;const o=Object.values(t).filter(r=>r.isComplete).length;return Math.round(o/s*100)}function G9({courseProgress:e,lessonProgress:t}){if(!e||!t)return;const s=f1(t);s&&h8(e,s)}const W9=e=>e.reduce((t,s,o)=>("id"in s&&(t[s.id]={id:s.id,index:o}),t),{}),Wu=e=>({...e,percentComplete:Ku({items:e.items,key:"isComplete"})}),g1=e=>({...e,percentComplete:Ku({items:e.items,key:"isComplete"})}),v1=e=>({...e,percentViewed:Ku({items:e.items,key:"isViewed"})});function lce({itemId:e,isCorrect:t,progress:s}){const o={...s,items:{...s.items,[e]:{...s.items?.[e],id:e,index:s.items?.[e]?.index??0,isComplete:t,isViewed:t,...s.items?.[e].isCorrect===void 0?{isCorrect:t}:{}}}};o.items[e]?.isCorrect===!1&&(o.lastIncorrectCardId=e);const r=K9(o),a=r.percentComplete!==100?g1(r):r,i=v1(a);return i.percentComplete===100?{...i,isComplete:!0}:i}function Ku({items:e,key:t}){const s=e??{},o=Object.keys(s).length,r=Object.values(s).filter(a=>a?.[t]).length;return o===0?0:Math.round(r/o*100)}function K9(e){const s=Object.values(e.items||{}).filter(o=>o.isCorrect===!0).length;return{...e,correctlyAnswered:s}}var Qu=p(44944),Q9,Y9;const Jt=e=>!!e&&Object.prototype.toString.call(e)==="[object Object]",C1=Array.isArray,dce=(e,t)=>Object.fromEntries(Object.entries(t).map(e)),x1=(e,t,s)=>{const o={};for(const r in s)o[e(r)]=t(s[r]);return o},Z9=e=>e.map(b1),X9=e=>e.map(y1),q9=e=>x1(Q9,b1,e),J9=e=>x1(Y9,y1,e),b1=e=>Jt(e)?q9(e):C1(e)?Z9(e):e,y1=e=>Jt(e)?J9(e):C1(e)?X9(e):e,$t=(e,t)=>{const s=new Set(t),o={};for(const r in e)s.has(r)||(o[r]=e[r]);return o},fo=(e,t)=>Object.fromEntries(Object.entries(e).map(([s,o])=>t(s,o)));function T1(e,t){const s=e.lessons[t];if(!xn(s))return e;const o={...Yu(s),id:t},r=Ct({courseProgress:e,lessonId:t,updatedLessonProgress:o});return xt({lessonId:t,prevCourseProgress:e,nextCourseProgress:r})}function eT(e,t){const{lessonId:s,blockId:o,itemId:r}=t,a=e.lessons[s];if(!xn(a))return e;const i=a.items[o],c=dT({blockProgress:i,itemId:r}),l=Jo({lessonProgress:a,blockId:o,updatedProgressBlock:c}),d=Wu(l),h=Ct({courseProgress:e,lessonId:s,updatedLessonProgress:d});return xt({lessonId:s,prevCourseProgress:e,nextCourseProgress:h})}function tT(e,t){const s=e.lessons[t];if(!xn(s))return e;const o=hT(s),r=Ct({courseProgress:e,lessonId:t,updatedLessonProgress:o});return xt({lessonId:t,prevCourseProgress:e,nextCourseProgress:r})}function sT(e,{blockId:t,lessonId:s}){const o=e.lessons[s];if(!xn(o))return e;const r=mT(o.items[t]),a=Jo({lessonProgress:o,blockId:t,updatedProgressBlock:r}),i=Ct({courseProgress:e,lessonId:s,updatedLessonProgress:a});return xt({lessonId:s,prevCourseProgress:e,nextCourseProgress:i})}function nT(e,t){const{lessonId:s,blockId:o,items:r}=t,a=e.lessons[s];if(!xn(a))return e;const i=lT({blockId:o,lessonProgress:a,items:r}),c=Ct({courseProgress:e,lessonId:s,updatedLessonProgress:i});return xt({lessonId:s,prevCourseProgress:e,nextCourseProgress:c})}function oT(e,t){const{lessonId:s,blockId:o,itemId:r,audioVideoPlayhead:a}=t,i=e.lessons[s],c=i?.items?.[o];if(!xn(i)||!c||!("items"in c)||!c.items||!c.items[r])return e;const d={...c.items[r],audioVideoPlayhead:a},h={...c,items:{...c.items,[r]:d}},m=Jo({lessonProgress:i,blockId:o,updatedProgressBlock:h}),f=Ct({courseProgress:e,lessonId:s,updatedLessonProgress:m});return xt({lessonId:s,prevCourseProgress:e,nextCourseProgress:f})}function rT(e,t){const{lessonId:s,blockId:o,itemId:r,isCorrect:a}=t,i=e.lessons[s];if(!xn(i))return e;const c=fT({itemId:r,isCorrect:a,blockProgress:i.items[o]}),l=Wu(Jo({lessonProgress:i,blockId:o,updatedProgressBlock:c})),d=Ct({courseProgress:e,lessonId:s,updatedLessonProgress:l});return xt({lessonId:s,prevCourseProgress:e,nextCourseProgress:d})}function aT(e,t){const{lessonId:s,blockId:o,itemId:r,response:a}=t,i=e.lessons[s],c=i?.items?.[o];if(!xn(i)||!c||!("items"in c)||!c.items||!c.items[r])return e;const d={...c.items[r],response:a},h={...c,items:{...c.items,[r]:d}},m=Jo({lessonProgress:i,blockId:o,updatedProgressBlock:h}),f=Ct({courseProgress:e,lessonId:s,updatedLessonProgress:m});return xt({lessonId:s,prevCourseProgress:e,nextCourseProgress:f})}function iT(e,t){const{lessonId:s,blockId:o,isSubmitted:r}=t,a=e.lessons[s];if(!xn(a))return e;const i=a?.items?.[o]??{},c=fo(i?.items??{},(m,f)=>[m,$t(f,["response"])]),l={...i,items:c,isSubmitted:r},d=Jo({lessonProgress:a,blockId:o,updatedProgressBlock:l}),h=Ct({courseProgress:e,lessonId:s,updatedLessonProgress:d});return xt({lessonId:s,prevCourseProgress:e,nextCourseProgress:h})}const cT=e=>Object.values(e).length>0&&Object.values(e).every(t=>t.isComplete),Yu=e=>{const t=fo(e.items,(s,o)=>{const r=fo(o.items??{},(a,i)=>[a,{...i,isComplete:!0,id:i.id,index:i.index}]);return[s,{...o,items:r,isComplete:!0}]});return{...e,isComplete:!0,items:t,percentComplete:100}},lT=({blockId:e,items:t,lessonProgress:s})=>{const o=s.items?.[e]??{items:{}},r=new Set(t.map(d=>String(d.id))),a=fo(o.items??{},(d,h)=>{const m=r.has(d);return[d,{...h,isComplete:h.isComplete||m,id:h.id,index:h.index}]}),c=Object.keys(a).length===0||cT(a),l={...o,id:e,items:a,...c&&{isComplete:!0}};return uT(Jo({lessonProgress:s,blockId:e,updatedProgressBlock:l}))},dT=({blockProgress:e,itemId:t})=>{if(!e.items)return e;const s=e.items[t];return{...e,items:{...e.items,[t]:{...s,retryAttemptCount:(s?.retryAttemptCount??0)+1}}}},uT=e=>{const t=Wu(e);return t.percentComplete===100?{...t,isComplete:!0}:t},Jo=({blockId:e,lessonProgress:t,updatedProgressBlock:s})=>({...t,items:{...t.items,[e]:s}}),hT=e=>{const t=fo(e.items,(s,o)=>{const r=fo(o.items??{},(a,i)=>[a,$t(i,["isComplete","isCorrect","isViewed"])]);return[s,{id:o.id,index:o.index,items:r}]});return{...$t(e,["isComplete","percentComplete"]),items:t}},mT=e=>({...$t(e,["percentViewed","correctlyAnswered"]),id:e.id,index:e.index,items:fo(e.items??{},(t,s)=>[t,$t(s,["isViewed","isCorrect"])]),retryAttempts:(e.retryAttempts??0)+1}),fT=({isCorrect:e,itemId:t,blockProgress:s})=>{if(!s.items)return s;const o=s.items[t],r={...o,isComplete:e,isViewed:e,...o?.isCorrect===void 0&&{isCorrect:e}},a={...s.items,[t]:r},i=Object.values(a).filter(m=>m.isCorrect).length,c={...s,items:a,correctlyAnswered:i,...!e&&{lastIncorrectCardId:t}},l=v1(c),d=g1(l),h=d.percentComplete===100;return{...d,...h&&{isComplete:!0}}};function L1(e){return e.trim()===""}function pT(e,{lessonId:t,progressId:s}){const o=e.lessons[t];if(!ms(o))return e;const r=o.activeIndex??0,a=s?(o.items[s]?.index??r)+1:r+1,i=Object.keys(o.items).length+1,c=Math.min(a,i),l={...o,activeIndex:c},d=Ct({courseProgress:e,lessonId:t,updatedLessonProgress:l});return xt({lessonId:t,prevCourseProgress:e,nextCourseProgress:d})}function gT(e,t){const s=e.lessons[t];if(!ms(s))return e;const o=Object.keys(s?.items)?.length,r={...s,activeIndex:o+1},a=Ct({courseProgress:e,lessonId:t,updatedLessonProgress:r});return xt({lessonId:t,prevCourseProgress:e,nextCourseProgress:a})}function vT(e,{lessonId:t,itemId:s}){const o=e.lessons[t];if(!ms(o))return e;const r=o.items[s];if(!r)return e;const a={...r,selectedIndices:[]},i=ti({lessonProgress:o,itemId:s,updatedProgressQuizItem:a}),c=Ct({courseProgress:e,lessonId:t,updatedLessonProgress:i});return xt({lessonId:t,prevCourseProgress:e,nextCourseProgress:c})}function CT(e,{lessonId:t,lessonProgress:s}){return{...e,lessons:{...e.lessons,[t]:s}}}function xT(e,{lessonId:t,itemId:s,text:o}){const r=e.lessons[t];if(!ms(r))return e;const a=r.items[s];if(!a)return e;const i=typeof o=="string"&&L1(o)?$t(a,["text"]):{...a,text:o},c=ti({lessonProgress:r,itemId:s,updatedProgressQuizItem:i}),l=Ct({courseProgress:e,lessonId:t,updatedLessonProgress:c});return xt({lessonId:t,prevCourseProgress:e,nextCourseProgress:l})}function bT(e,t){const s=e.lessons[t];if(!ms(s))return e;const o=fo(s.items,(c,l)=>{const d={id:l.id,index:l.index};return[c,d]}),a={...$t(s,["activeIndex","originalItemProgress","passed","percentComplete","questionList","questionsDrawn","reportResults","score"]),...s.passed!==!1&&{passed:s.passed},...s.isComplete!==!1&&{isComplete:s.isComplete},retryAttempts:(s.retryAttempts??0)+1,items:o},i=Ct({courseProgress:e,lessonId:t,updatedLessonProgress:a});return xt({lessonId:t,prevCourseProgress:e,nextCourseProgress:i})}function yT(e,{lessonId:t,itemId:s,selectedIndex:o,shuffledAnswerIndices:r}){const a=e.lessons[t];if(!ms(a))return e;const i=a.items[s];if(!i)return e;const c=r??i.shuffledAnswerIndices;if(o==null)return e;const l=Array.isArray(c)&&c[o]!=null?c[o]:o,d={...i,selectedIndex:l,...Array.isArray(c)&&{shuffledAnswerIndices:c}},h=ti({lessonProgress:a,itemId:s,updatedProgressQuizItem:d}),m=Ct({courseProgress:e,lessonId:t,updatedLessonProgress:h});return xt({lessonId:t,prevCourseProgress:e,nextCourseProgress:m})}function TT(e,{lessonId:t,itemId:s,matches:o}){const r=e.lessons[t];if(!ms(r))return e;const a=r.items[s];if(!a)return e;const i={...a,matches:o},c=ti({lessonProgress:r,itemId:s,updatedProgressQuizItem:i}),l=Ct({courseProgress:e,lessonId:t,updatedLessonProgress:c});return xt({lessonId:t,prevCourseProgress:e,nextCourseProgress:l})}function LT(e,{lessonId:t,timeRemaining:s}){const o=e.lessons[t];if(!ms(o))return e;const r={...o,timeRemaining:s},a=Ct({courseProgress:e,lessonId:t,updatedLessonProgress:r});return xt({lessonId:t,prevCourseProgress:e,nextCourseProgress:a})}function ST(e,{lessonId:t,itemId:s,isCorrect:o,finalRetryAttempt:r,passToContinue:a}){const i=e.lessons[t];if(!ms(i))return e;const c=i.passingScore??80,l=i.items[s];if(!l)return e;const d={...l,isCorrect:o,isComplete:!0},h={...i.items,[s]:d},m=Object.keys(h).length,f=Object.values(h).filter(T=>T.isCorrect).length,v=Object.values(h).filter(T=>T.isComplete).length,C=Math.round(f/m*100),g=Math.round(v/m*100);let x={...i,items:h,score:C,percentComplete:g};if(g===100){const T=C>=c,L=a?T:!0;vg(T,C,t,r),x={...x,passed:T,isComplete:L,reportResults:!0}}const b=Ct({courseProgress:e,lessonId:t,updatedLessonProgress:x});return xt({lessonId:t,prevCourseProgress:e,nextCourseProgress:b})}function kT(e,{lessonId:t,itemId:s,selectedIndex:o,shuffledAnswerIndices:r}){const a=e.lessons[t];if(!ms(a))return e;const i=a.items[s];if(!i)return e;const c=r??i.shuffledAnswerIndices;if(o==null)return e;const l=Array.isArray(c)&&c[o]!=null?c[o]:o,d=i.selectedIndices??[],m=d.includes(l)?d.filter(b=>b!==l):[...d,l],{selectedIndices:f,...v}=i,C=m.length>0?{...v,selectedIndices:m,...Array.isArray(c)&&{shuffledAnswerIndices:c}}:{...v,...Array.isArray(c)&&{shuffledAnswerIndices:c}},g=ti({lessonProgress:a,itemId:s,updatedProgressQuizItem:C}),x=Ct({courseProgress:e,lessonId:t,updatedLessonProgress:g});return xt({lessonId:t,prevCourseProgress:e,nextCourseProgress:x})}function ti({itemId:e,lessonProgress:t,updatedProgressQuizItem:s}){return{...t,items:{...t.items,[e]:s}}}function NT(e,t){const{id:s,passed:o,passingScore:r,score:a,retryAttempts:i}=t,c=[o,i,a];if(!(c.length===3&&c.every(C=>C!=null)))return e;const d=e.lessons?.[s]?.items??{},h=Object.keys(d).length+1,m=e.lessons?.[s];if(!m)return e;const f={...m,isComplete:!0,activeIndex:h,reportResults:!0,passed:o,passingScore:r,percentComplete:100,retryAttempts:i,score:a};return{...e,lessons:{...e.lessons,[s]:f}}}function IT(e,{quizId:t,destinationId:s}){const o=Object.keys(e.lessons),r=o.findIndex(c=>c===t),a=o.findIndex(c=>c===s);return r===-1||a===-1||a<=r?e:o.slice(r+1,a).reduce((c,l)=>{const d=c.lessons[l];if(!d||d.isComplete)return c;const h=ms(d)?ET(d):Yu(d),m=Ct({courseProgress:c,lessonId:l,updatedLessonProgress:h});return xt({lessonId:l,prevCourseProgress:c,nextCourseProgress:m})},e)}function ET(e){const t=Object.fromEntries(Object.entries(e.items||{}).map(([s,o])=>[s,{...o,isComplete:!0,isCorrect:!0}]));return vg(!0,100,e.id,!1),{...e,items:t,isComplete:!0,passed:!0,percentComplete:100,reportResults:!0,score:100}}var jT=p(74278),wT=p(43923),Pe=p.n(wT),AT=p(3911),po=p.n(AT);const RT=e=>e!==void 0,S1=po()(RT,Pe()(JSON.parse,jT.Base64.decode)),PT=(e,t)=>window.courseData?e(window.courseData):window.course?{course:e(window.course),media:[]}:t;var MT=p(72231),qs=p.n(MT),OT=p(43396),$n=p.n(OT),BT=p(56724),At=p.n(BT),DT=p(51390),$r=p.n(DT),FT=p(869),HT=p.n(FT),$T=p(62910),k1=p.n($T);const VT=["fromDashboard","locale","embed"];function zT(e,t){const s=typeof e=="function"?e(t):e;return typeof s=="string"?(0,we.Rr)(s):s}function Zu(e,t){const s=zT(e,t),o=new URLSearchParams(t?.search||""),r=new URLSearchParams(s?.search||"");for(const a of VT){const i=o.get(a);i&&!r.has(a)?r.set(a,i):r.has(a)&&!r.get(a)&&r.delete(a)}return{...s,search:r.toString()}}function es(){const e=(0,we.Zp)(),t=(0,we.zy)();return(0,u.useCallback)((s,o)=>{if(typeof s=="number")return e(s);const r=Zu(s,t);return e(r,o)},[e,t])}function UT(e){function t(s){const o=(0,we.zy)(),r=es(),a=(0,we.g)(),[i]=(0,we.ok)();return(0,n.jsx)(e,{...s,location:o,match:{params:a},navigate:r,queryParams:i})}return t.displayName=`withRouter(${e.displayName||e.name})`,t}var _T=p(85547),GT=p.n(_T),N1=p(17734),WT=p(12387),I1=p.n(WT),KT=p(84218),Xu=p.n(KT),QT=p(6778),go=p.n(QT),YT=p(90767),Vr=p.n(YT),ZT=p(63203),Nt=p.n(ZT),XT=p(50306),qT=p.n(XT),JT=p(82247),Hc=p.n(JT),mce=p(12227),eL;function tL(...e){return Pe()(...qT()(1,e))(Hc()(e))}function qu(e,...t){return Nt()(...t)(e)}function fce(e,...t){return eL(...t)(e)}const Kt=()=>{};var sL=p(68294);const pce="datadoghq.com",gce=Ie("SERVICE_ENV"),vce=Ie("RISE_FRONTEND_SHA"),Cce=Ie("RISE_FRONTEND_LOCAL_DEV")==="true"||window.location.hostname==="rise.dev.articulate.zone",xce=window.Cypress!=null,bce=[/https:\/\/(rise(\.dev)?|360)\.articulate\.(com|zone)(?!\/api\/rise-business-content\/).*/],E1={"Content-Type":"application/json"},nL=[(e,t)=>(t.Authorization=`Bearer ${ri()}`,JSON.stringify(e))],oL=Zs()(At(),Ne(),go()(["data","status","statusText"])),rL=Nt()(go()(["name","message","response"]),Dn()({response:oL})),aL=({baseURL:e,...t})=>Pe()(qo()({headers:E1,transformRequest:nL}),qo()(t),Dn()({url:qs()(e)})),iL=({data:e,method:t,url:s})=>fetch(s,{body:JSON.stringify(e),headers:{...E1,Authorization:`Bearer ${ri()}`},keepalive:!0,method:t}).then(o=>o.json()).then(Vr()("data")),cL=Qo().fromPromise(iL),lL=e=>({method:t,url:s})=>`${t}:${e}${s}`,dL=e=>{const t=new Error("Nil token detected");return Hn.L2.addError(t,e),Qo().Rejected(t)},uL=e=>t=>e.preRequest?e.preRequest(t):t,hL=e=>t=>e.postRequest?e.postRequest(t):t,mL=()=>At()(ri()),fL=e=>(t,s)=>I1()(t,lL(s),Ju(ai,e)),Ju=(e,t)=>s=>qu(s,uL(t),aL(t),Zs()(mL,dL,e),Xu()(rL,Ye()("data")),hL(t)),pL=e=>({debounce:fL(e),send:Ju(ai,e),sendWithKeepAlive:Ju(cL,e)}),gL=()=>document.visibilityState==="visible",vL=e=>po()(gL,()=>e()),j1=(e=>{document.addEventListener("visibilitychange",vL(e)),window.addEventListener("focus",()=>e())});p.dn(j1);var CL=p(42431),fs=p.n(CL),xL=p(37159),zr=p.n(xL),bL=p(13758),yL=p.n(bL),TL=p(21435),er=p.n(TL);const LL=e=>({user_role:e?.is_business_creator?"Business Creator":"Creator",is_admin:!!e?.is_team_admin});var SL;const w1=e=>{const t=e.user,s=t?.profile?.user_id,o=t?.subscription?.subscription_id||t?.subscription?.id,{user_role:r,is_admin:a}=LL(t?.subscription);return{application_source:"360_rise",application_service:"authoring",user_role:r,is_admin:a,reach_user_id:void 0,a360_user_id:s,user_permissions:t?.permissions||[],session_id:e?.user?.session,subscription_id:t?.subscription?.subscription_id||o,tenant_id:o,risecom_billing_id:void 0,...t?.subscription?.plan&&{subscription:{plan:t.subscription.plan,trial_type:t.subscription.trial_type??null}},...e.ai?.subscription&&{ai:{plan:e.ai.subscription.plan,start_date:e.ai.subscription.start_date,end_date:e.ai.subscription.end_date,status:e.ai.subscription.status}},...e.l10nAuthoring?.subscription&&{localization:{end_date:e.l10nAuthoring.subscription.end_date,plan:e.l10nAuthoring.subscription.plan,start_date:e.l10nAuthoring.subscription.start_date,status:e.l10nAuthoring.subscription.status,billing_model:e.l10nAuthoring.subscription.billing_model}}}},Tce=e=>{const t=e.course;return{course_id:t?.id,course_locale:t?.locale||e.l10n&&SL(e.l10n)||null,course_created_via:t?.metadata?.createdVia??null,course_snapshot_id:t?.metadata?.restoredFromSnapshotId??null,copied_course_id:t?.copyOf??null}},Lce=(e,t)=>{if(!t)return{};const s=e?.lessons?.[t];if(!s)return{};const o=e?.course?.lessons?.indexOf(t)+1||null;return{lesson_id:t,lesson_type:s.type,lesson_position:o}},Sce=(e,t,s)=>{if(!t||!s)return{};const r=(e.lessons||{})[t];if(!r?.items)return{};const a=r.items.find(l=>l.id===s);if(!a)return{};const c=r.items.map(l=>l.id).indexOf(s)+1;return{block_id:s,block_type:a.type,block_variant:a.variant,block_family:a.family,block_position:c,block_created_via:a?.metadata?.createdVia??"manual"}},kce=({interactionSetId:e,interactionSetWorkflowKey:t,taskType:s,resourceType:o,hasSourceContent:r}={})=>e?{interaction_set_id:e,...t&&{interaction_set_workflow_key:t},interaction_set_task_type:s,interaction_set_task_resource_type:o,interaction_set_has_source_content:r}:{},kL=()=>{if(!navigator.userAgent)return"unknown";const t=new Yo.UAParser(navigator.userAgent).getResult();return t.device?.model?t.device.model:t.os?.name?t.os.name:t.browser?.name?t.browser.name:"unknown"},NL=()=>{if(!navigator.userAgent)return"unknown";const t=new Yo.UAParser(navigator.userAgent).getResult();return t.device?.model&&t.os?.version?t.os.version:t.browser?.version?t.browser.version:"unknown"},IL=()=>{if(!navigator.userAgent)return"desktop";const t=new Yo.UAParser(navigator.userAgent).getResult();return t.device?.type==="mobile"?"mobile":t.device?.type==="tablet"?"tablet":"desktop"},EL=()=>{if(!navigator.userAgent)return"unknown";const t=new Yo.UAParser(navigator.userAgent).getResult();if(t.device?.vendor)return t.device.vendor;if(t.os?.name)switch(t.os.name){case"Mac OS":case"iOS":return"Apple";case"Windows":return"Microsoft";case"Android":return"Google"}return"unknown"},jL=()=>{if(!navigator.userAgent)return"unknown";const t=new Yo.UAParser(navigator.userAgent).getResult();return t.device?.model?t.device.model:"unknown"},A1=()=>{if(!navigator.userAgent)return"browser";const t=new Yo.UAParser(navigator.userAgent).getResult();return t.device?.type==="mobile"?"mobile":t.device?.type==="tablet"?"tablet":"browser"};function wL(e){return"userAgentData"in e}const R1=()=>{if(wL(navigator))return{platform:navigator.userAgentData.platform,mobile:navigator.userAgentData.mobile,brands:navigator.userAgentData.brands}},P1=()=>({name:kL(),version:NL(),type:IL(),manufacturer:EL(),model:jL()}),M1=()=>{const t=new URLSearchParams(window.location.search).get("query");return{referrer:document.referrer||null,search:t||null,url:window.location.href,path:window.location.pathname+window.location.search+window.location.hash}},O1=()=>navigator.userAgent||null,tr=(e,t=null)=>{const s={...e,context:{locale:navigator.language,device:P1(),channel:A1(),userAgentData:R1(),page:M1(),userAgent:O1(),...e.context},properties:{...t?w1(t):{},...e.properties}};return _u({method:"POST",url:`${Ie("RISE_RUNTIME_URI")}/analytics`,json:!0,data:s})},AL=Ie("SUBSCRIPTIONS_ENDPOINT"),RL=Ie("THREESIXTY_FRONTEND_URI"),PL=yL()(["error","status"],404),ML=Pe()(Vr()("error"),Ye()("response")),OL=()=>window.location.href=RL,BL=[(e,t)=>(t.Authorization=`Bearer ${ri()}`,e)],DL=async e=>{const t=`${AL}/users/authorized_status`,s=await ai({transformRequest:BL,url:t}).toPromise().catch(ML),o=Pe()(e,k1()(a=>tr({event:"Unexpected Logout",payload:{category:"auth",data:a,detail:"Subscription Error"}})));return fs()([[PL,OL],[zr()("error"),o],[er(),Ye()("data")]])(s)};var FL=p(61915),Bs=p.n(FL);const B1=e=>e===$1,Vn=e=>B1(e?.type),Ice=(e,t)=>s=>Vn(s)?e:t,HL=null,e0={guide:"Guide",presentation:"Presentation",video:"Video Training",scenario:"Scenario",microlearning:"Microlearning"},D1=e=>Object.prototype.hasOwnProperty.call(e0,e),$c=e=>{const t=e?.outputType;return typeof t=="string"&&D1(t)?t:void 0},Vc=(e,t)=>e===$1&&t!==void 0,F1=e=>{const t=$c(e?.experiments);return Vc(e?.type,t)&&t==="guide"},Ur=e=>{const t=$c(e?.experiments);return Vc(e?.type,t)&&t==="presentation"},t0=e=>{const t=$c(e?.experiments);return Vc(e?.type,t)&&t==="video"},s0=e=>{const t=$c(e?.experiments);return Vc(e?.type,t)&&t==="scenario"},Ece=e=>typeof e=="string"&&D1(e)?e0[e]:e0.microlearning,jce=e=>e?HL.includes(e):!1;var $L,VL;const wce=null,Ds={ARTICLE:"Article",INTERACTION:"Interaction",QUIZ:"Quiz",VIDEO:"Video"},zc={EDITOR:1,MANAGER:2,OWNER:3},zL={[zc.EDITOR]:"Author",[zc.MANAGER]:"Admin",[zc.OWNER]:"Owner"},Ace=Object.values(zc).map(e=>({id:e,title:zL[e]})),Rce=({name:e,isOnePage:t,outputType:s})=>{const o=t?VL(s):null,r={Admin:o?`${o} manager`:"Manager",Author:o?`${o} editor`:"Editor",Owner:o?`${o} owner`:"Owner"},a={Admin:o?`${o} manager`:"Course manager",Author:o?`${o} collaborator`:"Course collaborator",Owner:o?`${o} owner`:"Course owner"};return $L?r[e]:a[e]},Pce="questionBanks",H1="2% 0px 2% 0px",Mce=9,Oce=13,Bce=27,Dce=32,Fce=38,Hce=40,Vce=864e5*3,zce=100,$1="onePage",Js={UP:"up",DOWN:"down"},vo=Bs()({COMPACT:null,COVER:null,OVERLAY:null,SIDEBAR:null}),sr={DESKTOP:"desktop",TABLET_PORTRAIT:"tablet-portrait",TABLET_LANDSCAPE:"tablet-landscape",MOBILE_PORTRAIT:"mobile-portrait",MOBILE_LANDSCAPE:"mobile-landscape"},Uce=Object.values(sr),_ce=null,bt={DARK:"#000",LIGHT:"#fff"},n0={SMALL:{label:"Small",value:1},MEDIUM:{label:"Medium",value:1.5},LARGE:{label:"Large",value:2}},V1=["embed","map","process","sorting","timeline","video","screencast","slidecast"];var UL;const Gce=e=>e.status==="active",_L=e=>e.status==="inactive",Wce=e=>e.plan==="individual",Kce=e=>e.features?.enable_review===!0,GL=e=>e.features?.enable_rise===!0,Qce=e=>e.plan==="trial",WL=e=>e.plan==="trial"&&e.status==="inactive"&&e.is_retrial_eligible===!1,Yce=e=>e.plan==="team"||e.plan==="individual",Zce=e=>e.plan==="team"&&e.is_team_admin===!0,Xce=e=>e.plan==="trial"&&e.is_team_admin===!0,qce=e=>{if(!e.end_date)return 0;const t=new Date(e.end_date);t.setUTCHours(0,0,0,0);const s=t.setDate(t.getDate()+1);return s&&(s.valueOf()-new Date().setUTCHours(0,0,0,0))/UL||0};var KL=p(75928),o0=p.n(KL),QL=p(34370),z1=p.n(QL),YL=p(59783),si=p.n(YL),ZL=p(47951),ks=p.n(ZL);const ni=(e,t)=>`${Ie("ID_MAPPER_URI")}/v1/avatars/${encodeURIComponent(e)}?size=${t}`,XL=e=>({large:ni(e,"large"),medium:ni(e,"medium"),micro:ni(e,"micro"),mini:ni(e,"mini"),small:ni(e,"small")}),qL=z1()({features:ks()({},"features"),subscription:$r()(["features"])}),JL=o0()([WL,_L,si()(GL)]),eS="/auth-callback",U1="/auth-error",Uc=()=>new Promise(e=>{if(!window.Osano)return e();if(window.Osano.cm.dialogOpen){const t=setTimeout(()=>{e()},1e4);window.Osano.cm.addEventListener("osano-cm-ui-changed",(s,o)=>{s==="dialog"&&o==="hide"&&(e(),clearTimeout(t))})}else e()}),r0=eS,tS=U1,sS=vt,_1=()=>window.location.pathname===r0;let G1=!1,a0=!1;const nS=e=>{if(G1)return;const t=(0,N1.A)();G1=!0,window.localStorage.setItem(t,e);const s=B9({client_id:Ie("OKTA_CLIENT_ID"),issuer:Ie("OIDC_ISSUER_URI"),redirect_uri:`${window.location.origin}${r0}`,response_mode:"fragment",scope:Ie("OIDC_SCOPE"),state:t,prompt:null});Uc().then(()=>{window.location.href=s})},W1=()=>{const e=new URLSearchParams(window.location.search),t=e.has("redirect_url")?e.get("redirect_url"):window.location.href;return nS(t)},oS=()=>d1().catch(e=>{e.response?.status===404&&nr({onLogout:()=>window.location.reload(!0),reason:"Session expired"})}),rS=e=>(Hr("unauthorized",e),()=>{M9("unauthorized",e)}),aS=()=>{if(a0)return;const e=Xo(),t=Uu();At()(e)?(tr({event:"Unexpected Logout",payload:{category:"auth",userId:t,detail:"id from cookie was null"}}),Hn.L2.addError(new Error("Unexpected Logout"),{type:"User Meta",idFromToken:t,idFromCookie:e,detail:"id from cookie was null"}),a0=!0,nr({onLogout:()=>window.location.reload(!0),reason:"Unexpected logout: user id/session cookie missing"})):e!==t&&(tr({event:"Unexpected Logout",payload:{category:"auth",userId:e,idFromToken:t,detail:"Session/Token ID Mismatch"}}),Hn.L2.addError(new Error("Unexpected Logout"),{type:"User Meta",idFromToken:t,idFromCookie:e,detail:"Session/Token ID Mismatch"}),a0=!0,ei().then(()=>window.location.reload(!0)))},K1=async e=>{try{const[,t,s,o]=await ei(),{aid:r,content_team_admin:a}=o;if(tr({event:"Setting Session Cookie",payload:{category:"auth",userId:r,detail:"Resuming existing session"}}),y9(r),_1()){e();return}const{first_name:i,last_name:c,launchdarkly:l,staff:d}=t,m={avatars:XL(r),first_name:i,user_id:r,last_name:c,staff:d,content_team_admin:a},f={author:r,profile:m},v=()=>nr({onLogout:Re()(null)}),C=x=>e({...f,...qL(x),launchdarkly:l,token:s}),g=await DL(v).then(k1()(C)).catch(()=>e({...f,token:s}));if(JL(g)){tr({event:"Unexpected Logout",payload:{category:"auth",userId:Xo(),subscription:g,detail:"Invalid Subscription"}}),Hn.L2.addError(new Error("Unexpected Logout"),{type:"User Meta",userId:Xo(),detail:"Invalid Subscription"}),nr({onLogout:()=>window.location=`${Ie("THREESIXTY_FRONTEND_URI")}/rise`});return}j1(aS)}catch(t){tr({event:"Unexpected Logout",payload:{category:"auth",userId:Xo(),error:t,detail:"Error Resuming Session"}}),Hn.L2.addError(t,{type:"User Meta",userId:Xo(),detail:"Error Resuming Session"}),nr({onLogout:()=>window.location.reload(!0)})}},Q1=({onFetchTokens:e})=>{if(_1()){K1(e);return}const t=Xo(),s=Uu();if(At()(t)||t!==s){Uc().then(W1);return}K1(e)},nr=({onLogout:e,reason:t})=>{t&&tr({event:"Logout",payload:{category:"auth",userId:Xo(),detail:t}});const s=Ie("RISE_AUTHORING_URI"),o=()=>pL({baseURL:s}).send({method:"DELETE",url:"/logout"}),r=()=>{T9(),L9(),l1().then(e)};o().fork(a=>{console.error("Failed to log out of rise-authoring-api",a),r()},r)},iS=Pe()(GT().parse,HT()(1,1/0)),cS=(e,t)=>{Uc().then(()=>{const o=window.localStorage.getItem(t)||"/",r=o===e?"/":o;window.localStorage.removeItem(t),window.location.href=r})},lS=e=>()=>window.location.href=`${U1}?description=${e}`,dS=({location:e})=>()=>{const{hash:t,pathname:s}=e,{state:o,error:r,error_description:a}=iS(t);r?(Hn.L2.addError(r,{type:"Logout Error",reason:"Error encountered when parsing auth callback.",error_description:a}),nr({onLogout:lS(a),reason:`Error encountered when parsing auth callback. Error: ${r}; description: ${a}`})):Q1({onFetchTokens:()=>cS(s,o)})},uS=UT(e=>((0,u.useEffect)(dS(e),[]),null)),hS=({dispatch:e,loadProfileOKTA:t})=>s=>{const o=$r()(["token"],s);Pe()(e,t)(o)};var mS=p(49497),fS=p.n(mS),pS=p(77786),Co=p.n(pS),gS=p(93361),yt=p.n(gS),vS=p(29545),Y1=p.n(vS),CS=p(77177),oi=p.n(CS);const _c=async()=>{await Uc();const[e,t]=gt()(encodeURIComponent,Y1()(["hash","pathname"],window.location));window.location.href=`/login#c=${t}${e}`},Z1=()=>{window.location.href="/"},ele=null,tle=null,sle=vt,nle=_c,xS=l1,ole=()=>d1().catch(()=>xS()),rle=()=>Kt,bS=Nt()(ks()([],"roles"),oi()(Co()("author"),Z1)),X1=Nt()(yt()("",["subscription","status"]),oi()(Co()(fS(),["active","in_trial","non_renewing"]),Z1)),yS=()=>window.location.reload(),ale=async({onFetchTokens:e})=>{try{const[t,s]=await ei(),{launchdarkly:o,riseId:r,sub:a,staff:i,subscription:c}=s,l={staff:i,user_id:r||a};return X1(s),e({author:l.user_id,launchdarkly:o,profile:l,subscription:c,token:t}),Hr("change:roles",bS),Hr("change:status",X1),Hr("change:subdomain",yS),Hr("unauthorized",_c),Hr("session:closed",_c),t}catch{_c()}};var ile;const{callbackComponent:cle,callbackPath:lle,getToken:ri,initAuth:dle,login:ule,logout:hle,onSessionExpired:mle,refreshSession:fle,request:ai}=Wo;var q1,J1;const eg=`${Ie("RBC_URI")}/api/partner_content`,TS=null,LS=qs()(`${eg}/`),i0={transformRequest:[(e,t)=>(t.Authorization=`Bearer ${ri()}`,e)],headers:{"Content-Type":"application/json"}},vle=()=>J1({...i0,url:TS}).toPromise().then(q1(["data","types"])),Cle=e=>J1({...i0,url:LS(e)}).toPromise().then(q1(["data","content"])),SS=e=>ai({method:"POST",url:eg,data:JSON.stringify({ids:e}),...i0}).map($n()(["data","content"]));var kS=p(97759),_r=p.n(kS);const tg=Ie("SERVICE_ENV")==="prod",Gc=tg?"com":"zone",NS=Nt()(JSON.stringify,_r()(new RegExp(`https://images.riseusercontent.${Gc}/`,"g"),`${Ie("IMAGES_URI")}/`),_r()(new RegExp(`https://riseusercontent.${Gc}/`,"g"),`${Ie("CDN_USER_CONTENT_URI")}/`),_r()(new RegExp(`https://video.rise.${Gc}/`,"g"),`https://video.riseusercontent.${Gc}/`),po()(Re()(!tg),_r()(new RegExp("https://video.rise.com/","g"),"https://video.riseusercontent.zone/")),JSON.parse);var IS=p(59969),ES=p.n(IS),jS=p(27728),ts=p.n(jS),wS=p(49946),Rt=p.n(wS),AS=p(56187),Wc=p.n(AS),RS=p(77980),sg=p.n(RS);const PS=go(),c0=Cn(),l0=Xs(),d0=sg(),ng=qo(),ii=Ye(),MS=Dn(),u0=gt(),Kc=e=>e!=null&&typeof e=="object",ci=e=>!!e,og={a:["activeIndex",Ne()],vp:["audioVideoPlayhead",Number],c:["isComplete",ci],n:["correctlyAnswered",Ne()],p:["percentComplete",Ne()],r:["retryAttempts",Ne()],s:["score",Ne()],t:["currentTime",Ne()],v:["percentViewed",Ne()],rr:["reportResults",Ne()],pq:["passed",Ne()],ps:["passingScore",Ne()],qd:["questionsDrawn",Ne()],ql:["questionList",gt()(gt()(Ne()))],qt:["timeRemaining",Number]},OS=e=>(t,s)=>{const[o,r]=og[s];return ts()(o,r(t),e)},rg=e=>(t,s)=>{const[o,r]=$S[s],a=s==="i"?h0(t)(ii("items",e)):r(t);return{[o]:a}},BS=e=>t=>{const s=e?.[String(t.index)];if(At()(s))return t;const o=c0(rg(t),Kc(s)?s:{}),r=d0(l0(o).filter(a=>a!=null&&typeof a=="object"));return ng(t,r)},h0=e=>t=>u0(BS(Kc(e)?e:{}),Kc(t)?t:{}),DS=e=>{const t=c0(rg(null),Kc(e)?e:{});return d0(l0(t).filter(s=>s!=null&&typeof s=="object"))},FS=e=>t=>{const s=ii("i",e),o=ii("items",t),r=PS(Wc()(og),e),a=c0(OS(t),r);let i=d0(l0(a).filter(l=>l!=null&&typeof l=="object"));if(Rt()(s)||(i=ts()("items",h0(s??{})(o),i)),i=ng(t,i),!!ES()([zr()("ql"),Xe()("qd",!0),()=>!At()(s)])(e)){const l=u0(DS,s??{});return ts()("originalItemProgress",l,i)}return i},HS=(e,t)=>{const s=ii("lessons",t),o=a=>{const i=ii(String(a.index),s);return At()(i)?a:FS(i??{})(a)};if(Rt()(s))return e;const r=MS({lessons:a=>u0(o,a)},e);return ts()("percentComplete",ks()(0,"p",t),r)},$S={vp:["audioVideoPlayhead",Number],n:["correctlyAnswered",Ne()],c:["isComplete",ci],k:["isCorrect",ci],is:["isSubmitted",ci],v:["isViewed",ci],i:["items",h0],pv:["percentViewed",Ne()],m:["matches",Ne()],sr:["response",Ne()],r:["retryAttemptCount",Number],s:["selectedIndex",Ne()],x:["selectedIndices",Ne()],sa:["shuffledAnswerIndices",Ne()],t:["text",Ne()]};var VS=p(39906),xo=p.n(VS),zS=p(88120),ag=p.n(zS);const ig=go(),US=ag(),cg=Cn(),m0=Xs(),f0=sg(),p0=Ye(),_S=gt(),GS=e=>e!=null&&typeof e=="object",lg=e=>!!xo()(At(),Rt())(e),dg={activeIndex:["a",Ne()],audioVideoPlayhead:["vp",Number],correctlyAnswered:["n",Ne()],currentTime:["t",Ne()],isComplete:["c",Number],passingScore:["ps",Ne()],percentComplete:["p",Ne()],percentViewed:["v",Ne()],retryAttempts:["r",Ne()],score:["s",Ne()],questionsDrawn:["qd",Ne()],questionList:["ql",gt()(gt()(Ne()))],reportResults:["rr",Ne()],passed:["pq",Ne()],timeRemaining:["qt",Number]},WS=(e,t)=>{const[s,o]=hg[t];return{[s]:o(e)}},KS=e=>{const t=ig(Wc()(hg),e),s=US(Rt(),t),o=f0(m0(cg(WS,s)).filter(r=>r!=null&&typeof r=="object"));return Rt()(o)?o:Vr()(String(p0("index",e)),o)},ug=e=>{const t=_S(KS,GS(e)?e:{});return f0(m0(t).filter(s=>s!=null&&typeof s=="object"))},QS=(e,t)=>{const[s,o]=dg[t];return{[s]:o(e)}};function YS(e){const t=p0("items",e),s=p0("index",e),o=lg(t)?t:ug(t??{}),r=f0(m0(cg(QS,ig(Wc()(dg),e))).filter(i=>i!=null&&typeof i=="object")),a=lg(o)?r:ts()("i",o,r);return Vr()(String(s),a)}const ZS=e=>Vr()("p",ks()(0,"percentComplete",e)),hg={audioVideoPlayhead:["vp",Number],correctlyAnswered:["n",Ne()],isComplete:["c",Number],isCorrect:["k",Number],isSubmitted:["is",Ne()],isViewed:["v",Number],items:["i",ug],matches:["m",Ne()],percentViewed:["pv",Ne()],retryAttemptCount:["r",Number],selectedIndex:["s",Ne()],selectedIndices:["x",gt()(Number)],shuffledAnswerIndices:["sa",gt()(Number)],text:["t",Ne()],response:["sr",Ne()]},XS=e=>`${Ie("CDN_USER_CONTENT_URI")}/${e}`,qS=()=>!!window.shareId,mg=()=>!!window.contentId,fg=()=>!!window.snapshotId,JS=()=>!!window.shareId&&!!window.hasPassword,e8=mg()?NS:e=>e,t8={fetch:()=>g0.isExport?.()||window.courseData||window.course?PT(S1,{}):_u({method:"GET",url:window.shareId?`${Ie("RISE_RUNTIME_URI")}/boot/share/${window.shareId}`:mg()?`${Ie("RISE_RUNTIME_URI")}/boot/businessContent/${window.contentId}`:fg()?`${Ie("RISE_RUNTIME_URI")}/boot/snapshot/${window.snapshotId}`:`${Ie("RISE_RUNTIME_URI")}/boot/${window.courseId}`,json:!0,withCredentials:!0,timeout:3e4}).then($9).then(t=>typeof t=="object"?t:S1(t)).then(e8),fetchPartnerContent:e=>g0.isExport?.()||window.partnerContent?window.partnerContent.content:SS(e).toPromise(),getEnv:Ie,isPasswordProtected:JS,isShare:qS,isSnapshotPreview:fg,resolvePath:XS,verifySharePassword:e=>_u({method:"POST",url:`${Ie("RISE_RUNTIME_URI")}/password`,data:{shareId:window.shareId,password:e},json:!0}).then(t=>t.body)},s8=(e,{id:t,type:s,...o})=>s==="quiz"?NT(e,{id:t,...o}):T1(e,t),n8=(e,t)=>e+((t||{}).c||0),o8=(e,t)=>(s,{id:o,type:r,...a})=>t.lessons[o]?{...s,...e(s8(t,{id:o,type:r,...a}).lessons[o])}:s,r8=(e,t,s)=>{const o=t.reduce(o8(e,s),{}),r=Object.keys(s.lessons||{}).length,a=Object.values(o).reduce(n8,0),i=Math.round(a/r*100);return{lessons:o,p:i}};window.Rise=Object.assign(window.Rise||{},{completeLessons:r8,decodeCourseProgress:HS,encodeCourseProgress:ZS,encodeLessonProgress:YS});const g0={...t8,...window.Runtime??{}},Se=g0,a8=e=>Se.getMasteryScore!=null?Se.getMasteryScore(e):e.passingScore,i8=e=>{if(Se.onCreateHistory!=null)return Se.onCreateHistory(e)},pg=(e={},t)=>Se.fetch!=null?Promise.resolve(t==null?Se.fetch():Se.fetch(t)):Promise.resolve(e),c8=(e=[])=>{if(Se.fetchPartnerContent!=null)return Se.fetchPartnerContent(e)},l8=e=>{if(Se.bookmark!=null)return Se.bookmark(e)},gg=e=>Se.getProgress!=null?Se.getProgress(e):e,d8=e=>Se.setLessonComplete!=null?Se.setLessonComplete(e):e,u8=e=>Se.setLessonProgress!=null?Se.setLessonProgress(e):e,h8=(e,t)=>Se.setCourseProgress!=null?Se.setCourseProgress(e,t):e,m8=e=>{if(Se.finish!=null)return Se.finish(e)},vg=(e,t,s,o)=>{Se.finishQuiz!=null&&Se.finishQuiz(e,t,s,o)},f8=(e,t,s,o)=>{Se.finishStoryline!=null&&Se.finishStoryline(e,t,s,o)},Cg=()=>Se.isComplete!=null?Se.isComplete():null,p8=()=>Se.isExport!=null?Se.isExport():!1;function xg(){if(Se.isExport!=null){const e=window.partnerContent?.content;return Se.isExport()&&!!e}return!1}const bg=()=>Se.isShare!=null?Se.isShare():!1,g8=()=>Se.isSnapshotPreview!=null?Se.isSnapshotPreview():!1,yg=()=>Se.isPasswordProtected!=null?Se.isPasswordProtected():!1,Tg=e=>{const t=e||"";return Se.resolvePath!=null?t.startsWith("http")||t.startsWith("data:")||t.startsWith("//")?t:Se.resolvePath(t):t.startsWith("data:")||t.startsWith("http")||t.startsWith("//")?t:`/${t}`},v8=e=>Se.verifySharePassword!=null?Se.verifySharePassword(e):Promise.resolve({isValid:!0}),Lg=e=>{if(Se.reportAnswer!=null){const{id:t,isCorrect:s,isUnfinished:o=!1,item:r,itemProgress:a,duration:i,retryAttempts:c,title:l}=e,{id:d,title:h,type:m}=r;return Se.reportAnswer({id:t,type:m,isCorrect:s,itemId:d,questionTitle:Ss(h),quizTitle:Ss(l),retryAttempts:c,answers:c9(r),correctResponse:l9(r),response:d9({isUnfinished:o,item:r,itemProgress:a}),isUnfinished:o,latency:i9(i)})}return!1},Sg=e=>{if(Se.startLesson!=null)return Se.startLesson(e)},C8=()=>{if(Se.getLocale!=null)return Se.getLocale()},x8=e=>{if(Se.setLocale!=null)return Se.setLocale(e)},{browser:kg,os:Ng}=new Yo.UAParser(window.navigator.userAgent).getResult(),b8=e=>{if(Se.sendTelemetry!=null)return Se.sendTelemetry({...e,browser:{name:kg.name??"",version:kg.version??""},os:{name:Ng.name??"",version:Ng.version??""}})};var Ig=p(70080),y8=p(99931),T8=p(99914),L8=p(35450),S8=p(93063),k8=p(56747),v0=p(29411),C0=p(211),N8=p(47688);Ig.A.register(y8.A),Ig.A.register(T8.A);function Gr(...e){try{return(0,L8.Ay)(...e)}catch{return null}}const en=(e,t)=>{const s=Gr(t);return s==null?null:(0,C0.A)((0,v0.jh)(s,Gr("#ffffff"),e),{format:"hex",collapse:!1})},x0=e=>en(.9,e);var I8=p(51962),ss=p.n(I8),E8=p(23492),j8=p.n(E8),w8=p(78399),b0=p.n(w8),Qt=p(65787);const A8=Pe()(Co()(".svg"),e=>e??"",ks()("","originalUrl")),R8=Zs()(A8,Re()({width:"500rem"}),Re()({})),bo=e=>{if(e){const t=e.trim();if(t!==""&&t!=='""')return e}return""},Eg=e=>bo(e)||void 0,jg=e=>e?"img":void 0,wg=e=>Nt()(ks()("","originalUrl"),t=>t??"",b0()("."),Hc(),ss()(e)),P8=wg("svg"),Lle=wg("gif"),M8=/\.svg$/i,Ag=e=>M8.test(e),O8=null,Sle=e=>O8[e]||"left",B8=(e,t)=>{const s=j8()(e,t);return s.media.image.key===t.media.image.key&&Object.assign(s.media.image,{crushedKey:t.media.image.key,useCrushedKey:!0}),s},D8=({src:e,alpha:t})=>({alpha:t,media:{image:{key:F8(e),src:e}}}),F8=e=>typeof e!="string"?"":e.startsWith("http")?new URL(e).pathname.slice(1):e,H8=(({coverImageAlpha:e,coverImage:t})=>({alpha:e,src:t})),$8=(({lessonHeaderImageAlpha:e,lessonHeaderImage:t})=>({alpha:e,src:t})),Rg=(e,t)=>(s,o)=>{const r=s[t];if(s?.theme){const a=o?o(r?.media):r?.media;if((0,Qt.uW)(a))return r;const i={...r,media:{...a}},c=D8(e(s.theme));return B8(i,c)}else return r},Pg=Rg(H8,"coverImage"),Mg=Rg($8,"lessonHeaderImage"),kle=async e=>{const t=new Image;return t.src=e,await t.decode(),t};function tn(e){return Bs()(e)}class V8 extends Error{constructor(t="Assert Error",s){super(t,s)}}function Nle(e,t="Assertion Error"){if(!e)throw new V8(t)}const Qc={RISE_CLASSIC:"classic",APEX:"organic",HORIZON:"imaginative"},z8="#ff631e",Ile=3,Ele=17,jle=32,wle=24,Ale=50,Rle=.6,Ple="right",U8="rounded",_8=[{color:"#4baaf4",name:"Sky"},{color:"#285f9f",name:"Blueberry"},{color:"#7837a8",name:"Jelly"},{color:"#d84738",name:"Cherry"},{color:"#ff631e",name:"Tangerine"},{color:"#25bb64",name:"Basil"}],Mle="#ffffff",Ole=Hu()("color",_8),Ble="#000",Dle="#fff",Fle="Rise",ne=tn({ACCENT:null,BLACK:null,COLOR:null,DARK:null,GRAY:null,IMAGE:null,LIGHT:null,TINT:null}),li=tn({LARGE:null,MEDIUM:null,SMALL:null}),Yc=tn({STEPPED:null,CONTINOUS:null}),y0=Bs()({NUMBERS:null,DOTS:null,NONE:null}),or=tn({COMPACT:null,OVERLAY:null,SIDEBAR:null}),zn=Bs()({DARK:null,DARK_IMAGE:null,LIGHT:null,LIGHT_IMAGE:null}),rr=Bs()({DARK:null,DARK_ACCENT:null,DARK_IMAGE:null,LIGHT:null,LIGHT_ACCENT:null,LIGHT_IMAGE:null}),yo={FREE:"free",RESTRICTED:"restricted"},ar=Bs()({ACCENT:null,DARK:null,GRAY:null,IMAGE:null,LIGHT:null,TINT:null}),et=Bs()({THEME_DEFAULT:null,CIRCULAR_FILL:null,INCOMPLETE_COMPLETE:null}),di=tn({ACCENT:null,DARK:null,LIGHT:null,TINT:null}),Un=tn({FULL:null,FLOATING:null,FLOATING_FULL:null}),ce=tn({ACCENT:null,CENTERED:null,CENTERED_ACCENT_TINT:null,CENTERED_OVERLAY:null,CENTERED_IMAGE:null,IMAGE:null,LEFT:null,LEFT_OVERLAY:null,SPLIT_LEFT:null,SPLIT_LEFT_IMAGE:null,SPLIT_RIGHT:null,SPLIT_RIGHT_IMAGE:null,TWO_THIRDS_LEFT_IMAGE:null,TWO_THIRDS_RIGHT_IMAGE:null,VIDEO:null,WHITE:null}),ui=tn({TOP_LEFT:null,TOP_RIGHT:null,BOTTOM_LEFT:null,BOTTOM_RIGHT:null}),G8={TOP_LEFT:"top-left",TOP_RIGHT:"top-right",BOTTOM_LEFT:"bottom-left",BOTTOM_RIGHT:"bottom-right"},Hle=!0,W8=ui.BOTTOM_RIGHT,$le=[{text:"Top left",type:ui.TOP_LEFT},{text:"Top right",type:ui.TOP_RIGHT},{text:"Bottom left",type:ui.BOTTOM_LEFT},{text:"Bottom right",type:ui.BOTTOM_RIGHT}],Vle={default:[{text:"Centered",type:ce.CENTERED},{text:"Centered overlay",type:ce.CENTERED_OVERLAY},{text:"Left",type:ce.LEFT},{text:"Left overlay",type:ce.LEFT_OVERLAY},{text:"Split left image",type:ce.SPLIT_LEFT_IMAGE},{text:"Split right image",type:ce.SPLIT_RIGHT_IMAGE},{text:"Two-Thirds left image",type:ce.TWO_THIRDS_LEFT_IMAGE},{text:"Two-Thirds right image",type:ce.TWO_THIRDS_RIGHT_IMAGE}],classic:[{text:"Centered",type:ce.CENTERED},{text:"Centered overlay",type:ce.CENTERED_OVERLAY},{text:"Left",type:ce.LEFT},{text:"Left overlay",type:ce.LEFT_OVERLAY},{text:"Split left image",type:ce.SPLIT_LEFT_IMAGE},{text:"Split right image",type:ce.SPLIT_RIGHT_IMAGE},{text:"Two-Thirds left image",type:ce.TWO_THIRDS_LEFT_IMAGE},{text:"Two-Thirds right image",type:ce.TWO_THIRDS_RIGHT_IMAGE}],organic:[{text:"Centered",type:ce.CENTERED},{text:"Centered overlay",type:ce.CENTERED_OVERLAY},{text:"Left",type:ce.LEFT},{text:"Left overlay",type:ce.LEFT_OVERLAY},{text:"Split left",type:ce.SPLIT_LEFT},{text:"Split right",type:ce.SPLIT_RIGHT},{text:"Split left image",type:ce.SPLIT_LEFT_IMAGE},{text:"Split right image",type:ce.SPLIT_RIGHT_IMAGE}],imaginative:[{text:"Centered",type:ce.CENTERED},{text:"Centered overlay",type:ce.CENTERED_OVERLAY},{text:"Centered image",type:ce.CENTERED_IMAGE},{text:"Centered accent tint",type:ce.CENTERED_ACCENT_TINT},{text:"Split left image",type:ce.SPLIT_LEFT_IMAGE},{text:"Split right image",type:ce.SPLIT_RIGHT_IMAGE},{text:"Two-thirds left image",type:ce.TWO_THIRDS_LEFT_IMAGE},{text:"Two-thirds right image",type:ce.TWO_THIRDS_RIGHT_IMAGE}]},zle=null,Ule=null,_le=[{text:"Image",type:ce.IMAGE},{text:"Accent",type:ce.ACCENT},{text:"White",type:ce.WHITE}],Wr={CLOSED:"closed",HIDDEN:"hidden",OPEN:"open"},Te=tn({AUTO:null,BLACK:null,LIGHT:null,DARK:null}),K8=tn({ROUNDED:null,SQUARED:null}),Q8=Bs()({ROUNDED:null,SQUARED:null}),Y8=Bs()({FLOATING:null,FULL:null}),at=Bs()({ACCENT:null,DARK:null,LIGHT:null}),Gle=[{value:Te.AUTO,label:"Auto"},{value:Te.DARK,label:"Dark"},{value:Te.LIGHT,label:"Light"}],Qe={accentContrast:Te.AUTO,allowSearch:!0,animateBlockEntrance:!0,blockBackgroundColor:null,blockBackgroundColorContrast:Te.AUTO,blockBackgroundType:ne.LIGHT,blockContinueCompletionType:"",blockContinueCompleteHint:"Complete the content above before moving on.",blockContinueLabel:"Continue",blockCorners:K8.ROUNDED,blockPaddingEnd:3,blockPaddingStart:3,blockTextBackgroundColor:null,blockTextBackgroundColorContrast:Te.AUTO,blockTextBackgroundType:ne.LIGHT,blockTextBodyFontSize:17,blockTextHeadingFontSize:32,blockTextPaddingEnd:3,blockTextPaddingStart:3,blockTextSubheadingFontSize:24,buttonInlineStyle:Q8.ROUNDED,buttonNavigationStyle:Y8.FULL,buttonScheme:di.LIGHT,colorAccent:z8,compactShowLessonCount:!0,coverImageAlpha:50,coverPageType:ce.SPLIT_LEFT_IMAGE,customColorLessonHeaderContrast:Te.AUTO,enableVideoPlaybackSpeed:!0,lessonHeaderImageAlpha:.6,lessonHeaderImageColor:at.DARK,lessonHeaderSize:li.MEDIUM,lessonHeaderStyle:ne.LIGHT,markLessonsComplete:!1,navigation:!0,navigationRestricted:!1,navigationSectionsExpanded:!0,navigationStyle:zn.LIGHT,navigationType:or.SIDEBAR,progressIndicatorStyle:et.THEME_DEFAULT,showAuthor:!0,showLessonCount:!0,showNavigationButtons:!0,showStartButton:!0,sidebarStartsOpen:!0,themeId:Qc.RISE_CLASSIC},Wle=null,Z8=["bodyTypeface","coverImage","experiments","headingTypeface","lessonHeaderImage","media","theme","uiTypeface"],X8=e=>e.theme?.colorAccent||e.color||Qe.colorAccent,Og=e=>e.theme?.navigationRestricted??Qe.navigationRestricted?yo.RESTRICTED:yo.FREE,Bg=e=>e.theme?.sidebarStartsOpen??Qe.sidebarStartsOpen?Wr.OPEN:Wr.CLOSED,q8=e=>e.theme?.showLessonCount??e.showLessonCount??Qe.showLessonCount,J8=({sidebarMode:e})=>e!==Wr.HIDDEN,e7=({navigationMode:e})=>e===yo.RESTRICTED,t7=({sidebarMode:e})=>e===Wr.OPEN,s7=e=>e.coverImage?.media?.image?zn.LIGHT_IMAGE:zn.LIGHT,n7=e=>e.coverImage?.media?.image?ce.LEFT_OVERLAY:ce.LEFT,_n=(e,t)=>t[e]??t.theme?.[e]??Qe[e],Dg=e=>{const t=Bg(e),s=Og(e),o={allowSearch:_n("allowSearch",e),animateBlockEntrance:_n("animateBlockEntrance",e),bodyTypefaceId:e.bodyTypefaceId,colorAccent:(e.color||"").toLowerCase(),compactShowLessonCount:_n("compactShowLessonCount",e),coverImageDefault:null,coverPageType:n7(e),enableVideoPlaybackSpeed:_n("enableVideoPlaybackSpeed",e),headingTypefaceId:e.headingTypefaceId,markLessonsComplete:_n("markComplete",e),navigation:J8({sidebarMode:t}),navigationSectionsExpanded:_n("navigationSectionsExpanded",e),navigationRestricted:e7({navigationMode:s}),navigationStyle:s7(e),showAuthor:_n("showAuthor",e),showLessonCount:_n("showLessonCount",e),showNavigationButtons:_n("showNavigationButtons",e),sidebarStartsOpen:t7({sidebarMode:t}),uiTypefaceId:e.uiTypefaceId},r={...Qe,...o};return{...e,theme:{...r,isLegacyCourse:!0}}},T0=e=>{const t=X8(e),s={allowSearch:e.theme?.allowSearch??Qe.allowSearch,animateBlockEntrance:e.theme?.animateBlockEntrance??Qe.animateBlockEntrance,buttonNavigationStyle:e.theme?.buttonNavigationStyle??Qe.buttonNavigationStyle,buttonScheme:e.theme?.buttonScheme??Qe.buttonScheme,color:t,colorAccentTint:t?x0(t):void 0,coverImage:Pg(e),coverPageType:e.theme?.coverPageType??Qe.coverPageType,enableVideoPlaybackSpeed:e.theme?.enableVideoPlaybackSpeed??Qe.enableVideoPlaybackSpeed,lessonHeaderImage:Mg(e),lessonHeaderSize:e.theme?.lessonHeaderSize??Qe.lessonHeaderSize,lessonHeaderStyle:e.theme?.lessonHeaderStyle??Qe.lessonHeaderStyle,markComplete:e.theme?.markLessonsComplete??Qe.markLessonsComplete,navigation:e.theme?.navigation??Qe.navigation,navigationSectionsExpanded:e.theme?.navigationSectionsExpanded??Qe.navigationSectionsExpanded,navigationMode:Og(e),navigationRestricted:e.theme?.navigationRestricted??Qe.navigationRestricted,navigationStyle:e.theme?.navigationStyle??Qe.navigationStyle,navigationType:e.theme?.navigationType??Qe.navigationType,progressIndicatorStyle:e.theme?.progressIndicatorStyle??et.THEME_DEFAULT,themeId:e.theme?.themeId??Qe.themeId,showAuthor:e.theme?.showAuthor??Qe.showAuthor,showLessonCount:q8(e),showStartButton:e.theme?.showStartButton??Qe.showStartButton,sidebarMode:Bg(e),sidebarStartsOpen:e.theme?.sidebarStartsOpen??Qe.sidebarStartsOpen,showNavigationButtons:e.theme?.showNavigationButtons??Qe.showNavigationButtons};return{...e,...s}},o7=({course:e,updates:t})=>{const s=Object.fromEntries(Object.entries(t||{}).filter(([r])=>Z8.includes(r))),o={...e,...s};return T0(o)},r7={padding:"medium",alignment:"left"},a7={embed:{aspectRatio:"16:9"},video:{},labeledgraphic:{hotspotStyle:"numbers"},process:{navigation:"stepped"},sorting:{feedback:"immediate"},timeline:{orientation:"vertical"},paragraph:{fontSize:"medium"}},sn=(e,t=0)=>`item_${e}_${t}`,Fg=(e,t)=>[{id:sn(`${t}_placeholder`,0),placeholder:!0,type:e,title:`Add ${e} content`}],ir=e=>({...r7,...a7[e]??{}}),i7=e=>typeof e=="string"?e.replace(/<p><br><\/p>/g,""):e,Hg=e=>e.map(t=>{if(t&&typeof t=="object"&&!Array.isArray(t)){const s={};for(const[o,r]of Object.entries(t))s[o]=i7(r);return s}return t}),c7=e=>["Introduction","Summary"].map((t,s)=>({id:sn(`${e}_process`,s),title:t,type:t.toLowerCase(),description:null,isHidden:!0})),l7=(e,t)=>[{id:sn(`${t}_text`,0),paragraph:e}],d7=(e,t)=>[...c7(t),...e],u7=(e,t)=>[{id:sn(`${t}_video`,0),caption:"",media:e}],h7=(e=[],t)=>({family:"multimedia",id:sn(`${t}_embed`,0),items:e.length?e:Fg("embed",t),media:{},settings:ir("embed"),type:"multimedia",variant:"embed"}),m7=(e,t,s)=>({family:"interactive-fullscreen",id:sn(`${s}_labeledgraphic`,0),items:e,media:t,settings:ir("labeledgraphic"),type:"interactive",variant:"labeledgraphic"}),f7=(e,t)=>({family:"interactive-fullscreen",id:sn(`${t}_process`,0),items:Hg(e),media:{},settings:ir("process"),type:"interactive",variant:"process"}),p7=({items:e,piles:t},s)=>({family:"interactive-fullscreen",id:sn(`${s}_sorting`,0),items:e,media:{},piles:t,settings:ir("sorting"),type:"interactive",variant:"sorting"}),g7=(e,t)=>({family:"text",id:sn(`${t}_text`,0),items:Hg(e),settings:ir("paragraph"),type:"text",variant:"paragraph"}),v7=(e,t)=>({family:"interactive-fullscreen",id:sn(`${t}_timeline`,0),items:e,media:{},settings:ir("timeline"),type:"interactive",variant:"timeline"}),C7=(e,t={},s)=>({family:"multimedia",id:sn(`${s}_video`,0),items:e?.video?u7(e,s):Fg("video",s),media:{},settings:{...t,...ir("video")},type:"multimedia",variant:"video"}),x7=({items:e=[]},t)=>h7(e.map(({icon:s,...o})=>o),t),b7=({items:e=[],media:t},s)=>m7(e.map(({hasMedia:o,...r})=>r),t,s),y7=({items:e=[]},t)=>{const s=e.map(o=>({...o,isHidden:!1,type:"step"}));return f7(d7(s,t),t)},T7=({items:e=[]},t)=>v7(e.map(({linePosition:s,...o})=>o),t),L7=(e,t)=>g7(l7(e,t),t),S7=(e,t)=>{switch(e.type){case"embed":return x7(e,t);case"map":return b7(e,t);case"process":return y7(e,t);case"sorting":return p7(e,t);case"timeline":return T7(e,t);case"screencast":case"slidecast":case"video":return C7(e.media,e.settings,t);default:throw new Error(`Unknown legacy lesson type: ${e.type}`)}},$g=e=>typeof e?.type=="string"&&V1.includes(e.type),k7=e=>{if(!$g(e))return e;const t=String(e.id),s={description:"",icon:"Article",type:"blocks"},o=[S7(e,t)],r=typeof e.description=="string"?e.description.trim():"";return r&&o.unshift(L7(r,`${t}_desc`)),{...e,...s,items:o,media:{}}},Vg=e=>`rise/rise-com/${e}`,zg=Vg("FAVORITE_ADDED"),Ug=Vg("FAVORITE_REMOVED"),N7=()=>(0,fe.action)(zg,void 0),I7=()=>(0,fe.action)(Ug,void 0),_g=(e=>`rise/partnerContent/${e}`)("SET_ALL_PARTNER_CONTENT"),cr=(e=>`rise/status/${e}`)("SET_LOADED"),E7=(e,t)=>({...e,...t}),j7={connection:"connected",courseLoaded:!1,fatalError:!1,fontsLoaded:!1,notFound:!1,partnerContentLoaded:!1},w7=(0,fe.handle)(j7,{[cr]:E7}),A7=(e=!1)=>(0,fe.action)(cr,{fontsLoaded:e}),R7=(e=!1)=>(0,fe.action)(cr,{courseLoaded:e}),P7=(e=!1)=>(0,fe.action)(cr,{coverLoaded:e}),M7=(e=!1)=>(0,fe.action)(cr,{notFound:e}),O7=(e=!1)=>(0,fe.action)(cr,{fatalError:e}),Gg=(e=!1)=>(0,fe.action)(cr,{partnerContentLoaded:e}),B7=(e=[],t)=>t?.partnerContentId?e.concat(t.partnerContentId):e,D7=(e,t)=>t?.items?.reduce(B7,e)??e,F7=(e,t)=>t?.items?.reduce(D7,e)??e,H7=({course:e,lessons:t})=>{const s=t?.reduce(F7,[])||[],o=e?.partnerContentId||null,r=o?[o]:[],a=new Set([...s,...r]);return Array.from(a)},$7=e=>typeof e=="string"&&e.length>0,Yle=`${Ie("CDN_URI")}/assets/rise/assets/themes/thumbnails/sample-avatar.jpeg`,Zle=Bs()({ACTIVE:null,PREVIEW:null}),Xle=({themeCoverImage:e,coverImageDefault:t})=>$7(t)?t:e,V7=e=>({...e,theme:{...e?.theme,hideLessonHeaders:e?.theme?.hideLessonHeaders??!1,showStartButton:e?.theme?.showStartButton??!0}}),ns={DRAW_FROM_QUESTION_BANK:"DRAW_FROM_QUESTION_BANK",FILL_IN_THE_BLANK:"FILL_IN_THE_BLANK",MATCHING:"MATCHING",MULTIPLE_CHOICE:"MULTIPLE_CHOICE",MULTIPLE_RESPONSE:"MULTIPLE_RESPONSE"},lr={SUMMARY:"SUMMARY",REMAINING:"REMAINING",ELAPSED:"ELAPSED",ELAPSED_TOTAL:"ELAPSED_TOTAL",HIDE_TIMER:"HIDE_TIMER"},z7={CONTINUE:"continue",NONE:""},je={ALL:"all",NONE:"none",INCORRECT:"incorrect"},qle=10,Jle=80,ede=500;var tde;const U7=fs()([[o0()([ss()(!0),ss()(je.ALL)]),Re()(je.ALL)],[o0()([ss()(!1),ss()(je.NONE)]),Re()(je.NONE)],[ss()(je.INCORRECT),Re()(je.INCORRECT)],[er(),Re()(je.ALL)]]),sde="draw from question bank",nde="fillin",ode="matching",rde="multiple choice",ade="multiple response",ide=null;var _7=p(47874),L0=p.n(_7);const S0={LESSON:"lesson",QUIZ:"quiz",SECTION:"section"},Kr={KNOWLEDGE_CHECK:"KNOWLEDGE_CHECK",ORDER:"ORDER",QUIZ:"QUIZ"},Ns=(e,t)=>`/lessons/${encodeURIComponent(e)}${t?`/${encodeURIComponent(t)}`:""}`,Wg="/lessons/progress-summary",k0="lesson:",Zc="#/lessons/",N0="/lessons/",cde=e=>`${Zc}${e}`,lde=e=>e.startsWith(k0)||e.startsWith(Zc)||e.startsWith(N0),dde=e=>e.startsWith(k0)?e.slice(k0.length):e.startsWith(Zc)?e.slice(Zc.length).split("/")[0]:e.startsWith(N0)?e.slice(N0.length).split("/")[0]:e,G7=e=>e.type===S0.SECTION,W7=e=>e.type===S0.QUIZ,K7=e=>e.settings?.passToContinue===!0,Kg=e=>e?.items?.find(t=>t.family==="knowledgeCheck"&&t.settings?.requireCorrectAnswer),dr=e=>e!=null&&(e.type!=="quiz"||e.settings?.asLesson!==!1),Q7=e=>e!=null&&e.type==="blocks",Y7=e=>{const t=L0()(e);return t!=null&&Array.isArray(t.items)&&(t.items=t.items.reduce((s,o)=>(o!=null&&s.push(Z7(o)),s),[])),t},Z7=e=>{const t=L0()(e);return t!=null&&Array.isArray(t.items)&&(t.items=t.items.filter(Boolean)),t};var X7=p(69098),q7=p.n(X7);const Qg="^1.6.0";class I0 extends Error{}function J7(e){try{if(e==null)return;if(typeof e!="object"||!("version"in e)||typeof e.version!="string")throw new I0("Missing Runtime.version");if(!q7()(e.version,Qg))throw new I0(`Runtime.version ${e.version} does not satisfy ${Qg}`)}catch(t){console.warn(t)}}const Qr="rise/course/LOAD_COURSE",ek="rise/course/UPDATE_COMPLETED_AT",Xc="rise/course/UPDATE_COURSE_PREVIEW",Yg="rise/course/UPDATE_LESSON_PREVIEW",E0="rise/course/APPLY_CHANGESET";let j0;(async()=>{try{({applyReviewDataToManifest:j0}=await p.e("webpack_container_remote_mondrian_learn-react").then(p.t.bind(p,4246,23)))}catch{}})();const hi=B4(),tk=e=>{if("settings"in e&&e.settings&&Jt(e.settings)&&"revealAnswers"in e.settings){const s=e.settings;return{...e,settings:{...e.settings,revealAnswers:U7(s.revealAnswers)}}}return e},sk=e=>Q7(e)?Y7(e):e,Zg=e=>sk(tk(e)),nk=e=>({...e,lessons:e.lessons?.map(Zg)||[]}),ok=e=>{const t=e.lessons?.filter(s=>s.type!=="section")||[];return{...e,lessonsOnly:t}},rk=e=>e.theme==null,ak=e=>T0(Dg(e)),ik=e=>rk(e)?ak(e):T0(e),ck=e=>V7(ik(e)),lk=(e,t)=>{let s=(0,Dr.TJ)(["course"],t,e).result;const o=(0,Dr.TJ)(["lessons"],t,s.lessons).result;return t.some(r=>r.path[0]==="mondrian")&&s.mondrian&&j0&&(s={...s,mondrian:j0(s.mondrian,t)}),{...s,lessons:o}},dk=e=>({...e,lessons:e.lessons?.map(k7)||[]}),uk=(e,{completedAt:t,course:s,favoritedAt:o,riseComCurrentUser:r,riseComCourseId:a,riseComEnrollmentType:i,riseComLearningPathId:c})=>{const l=nk(s),d=ok(l),h={...d,theme:d.theme??Dg(d).theme};return{...ck(h),completedAt:t,favoritedAt:o,riseComCourseId:a,riseComEnrollmentType:i,riseComCurrentUser:r,riseComLearningPathId:c}},hk=e=>({...e,favoritedAt:new Date}),mk=e=>({...e,favoritedAt:null}),fk=e=>({...e,completedAt:new Date().toISOString()}),pk={[zg]:hk,[Ug]:mk,[Qr]:uk,[ek]:fk,[Xc]:(e,{course:t})=>t,[Yg]:(e,{lessons:t})=>({...e,lessons:t.map(Zg)}),[E0]:lk},gk=(0,fe.handle)({},pk),Xg=e=>t=>{yk(t)?e(M7(!0)):t instanceof I0&&(e(O7(!0)),console.error(t))},vk=e=>t=>t([{type:_g,payload:e},Gg(!0)]),Ck=Qo().fromPromise(async(...e)=>await c8(...e)),xk=e=>e.length===0?Gg(!0):Ck(e).map(vk),bk=e=>qc(e)===401||w0(e)&&qc(e.response)===401,yk=e=>qc(e)===404||w0(e)&&qc(e.response)===404,qc=e=>w0(e)?e.status??e.statusCode:void 0,w0=e=>e!=null&&typeof e=="object",Tk=e=>t=>{const{course:s}=t,o=dk(s),r=H7({course:o,lessons:o.lessons});e([hi(Qr,{...t,course:o,_originalLessons:s.lessons}),R7(!0),xk(r)])},Lk=e=>async t=>{let s;try{J7(window.Runtime),s=e?.password!=null?await pg(void 0,{password:e.password}):await pg()}catch(o){if(e?.onUnauthorized!=null&&bk(o)){e.onUnauthorized();return}e?.onError?.(),await Xg(t)(o);return}e?.onAuthorized?.();try{Tk(t)(s),b8(s)}catch(o){await Xg(t)(o)}},Sk=hi(Qr),kk=hi(Xc),Nk=hi(Yg),Ik=hi(E0),Ek=(e,{labelSet:t})=>({...e,...t}),jk=(0,fe.handle)({},{[Qr]:Ek}),Gn=e=>`rise/course/${e}`,qg=Gn("BLOCKS_LESSON_COMPLETE"),Jg=Gn("BLOCKS_LESSON_INCREMENT_RETRY_ATTEMPT"),ev=Gn("BLOCKS_LESSON_RESET"),tv=Gn("BLOCKS_LESSON_RETRY_SORTING_ACTIVITY"),sv=Gn("BLOCKS_LESSON_SET_ITEMS_PROGRESS"),nv=Gn("BLOCKS_LESSON_SET_MEDIA_PLAY_PROGRESS"),ov=Gn("BLOCKS_LESSON_SET_SORTING_ITEM_RESULT"),rv=Gn("BLOCKS_LESSON_SET_SURVEY_PARTIAL"),av=Gn("BLOCKS_LESSON_SET_SURVEY_SUBMITTED"),Jc=(0,fe.action)(qg),wk=(0,fe.action)(Jg),Ak=(0,fe.action)(ev),Rk=(0,fe.action)(tv),iv=(0,fe.action)(sv),Pk=(0,fe.action)(nv),Mk=(0,fe.action)(ov),Ok=(0,fe.action)(rv),Bk=(0,fe.action)(av),Fs=e=>`rise/course/${e}`,cv=Fs("QUIZ_LESSON_ADVANCE_STEP"),lv=Fs("QUIZ_LESSON_APPLY_SKIP"),dv=Fs("QUIZ_LESSON_CLEAR_ANSWER_SELECTION"),uv=Fs("QUIZ_LESSON_INITIALIZE_DRAWN_QUESTIONS"),hv=Fs("QUIZ_LESSON_RESTART"),mv=Fs("QUIZ_LESSON_SELECT_QUIZ_ANSWER"),fv=Fs("QUIZ_LESSON_SET_ANSWER_MATCHES"),pv=Fs("QUIZ_LESSON_SET_ANSWER_TEXT"),gv=Fs("QUIZ_LESSON_ADVANCE_TO_END"),vv=Fs("QUIZ_LESSON_SET_TIME_REMAINING"),Cv=Fs("QUIZ_LESSON_SUBMIT_ANSWER"),xv=Fs("QUIZ_LESSON_TOGGLE_ANSWER_SELECTION"),A0=(0,fe.action)(cv),Dk=(0,fe.action)(gv),bv=(0,fe.action)(hv),Fk=(0,fe.action)(lv),yv=(0,fe.action)(mv),Tv=(0,fe.action)(pv),Lv=(0,fe.action)(xv),Hk=(0,fe.action)(vv),Sv=(0,fe.action)(fv),R0=(0,fe.action)(Cv),$k=(0,fe.action)(dv),Vk=(0,fe.action)(uv),P0=e=>e&&typeof e=="object"&&e.type&&V1.includes(e.type),zk=(e,t)=>{const s=new Map;return e.forEach(o=>{if($g(o)){const r=t.find(a=>String(a.id)===String(o.id));r&&r.type==="blocks"&&s.set(String(o.id),String(r.id))}}),s},Uk=(e,t)=>{const s={id:String(e.id),index:e.index,type:"blocks",items:{}};return typeof e.isComplete=="boolean"&&(s.isComplete=e.isComplete),typeof e.percentComplete=="number"&&(s.percentComplete=e.percentComplete),t.type==="blocks"&&t.items&&t.items.forEach((o,r)=>{if(o?.id!=null&&(s.items[o.id]={id:o.id,index:r,isComplete:e.isComplete===!0&&r===0,items:o.items?{}:void 0},o.items&&Array.isArray(o.items))){const a={};o.items.forEach((i,c)=>{i?.id!=null&&(a[i.id]={id:i.id,index:c,isComplete:e.isComplete===!0})}),Object.keys(a).length>0&&(s.items[o.id].items=a)}}),s},_k=(e,t)=>{const s=new Set(t.map(r=>String(r.id))),o=[];return Object.values(e.lessons).forEach(r=>{P0(r)&&(s.has(String(r.id))||o.push(r))}),o},Gk=(e,t,s)=>{const o={totalLegacyLessons:0,successfulMigrations:0,failedMigrations:0},r={...e,lessons:{...e.lessons}},a=_k(e,s);o.totalLegacyLessons=a.length;const i=zk(t,s),c=[];return a.forEach(l=>{try{const d=i.get(String(l.id))||String(l.id),h=s.find(m=>String(m.id)===d);if(h&&h.type==="blocks"){const m=Uk(l,h);r.lessons[String(h.id)]=m,String(l.id)!==String(h.id)&&delete r.lessons[String(l.id)],o.successfulMigrations++}else c.push(String(l.id)),o.failedMigrations++}catch(d){console.warn(`Failed to migrate legacy lesson progress for lesson ${l.id}:`,d),c.push(String(l.id)),o.failedMigrations++}}),{migratedProgress:r,orphanedLessonIds:c,migrationSummary:o}},kv=e=>Object.values(e.lessons).some(P0),ude=e=>{let t=0,s=0;const o=[];return Object.values(e.lessons).forEach(r=>{s++,P0(r)&&(t++,o.includes(r.type)||o.push(r.type))}),{legacyCount:t,totalCount:s,legacyTypes:o,hasLegacyProgress:t>0}},Wk=(e,t,s)=>{if(!kv(e))return e;const o=Gk(e,t,s);return o.orphanedLessonIds.length>0&&console.warn("Some legacy lessons could not be migrated:",o.orphanedLessonIds),o.migratedProgress},M0=e=>`rise/course/${e}`,Nv=M0("BOOKMARK_LESSON"),Kk=M0("LOAD_COURSE"),Iv=M0("PREVIEW_COMPLETE_PRECEDING_LESSONS"),Qk=(0,fe.action)(Nv),Yk=(0,fe.action)(Iv),Zk={lessons:{},percentComplete:0},Xk=(0,fe.handle)(Zk,{[qg]:T1,[Jg]:eT,[ev]:tT,[tv]:sT,[sv]:nT,[nv]:oT,[ov]:rT,[rv]:aT,[av]:iT,[cv]:pT,[gv]:gT,[lv]:IT,[dv]:vT,[uv]:CT,[hv]:bT,[mv]:yT,[fv]:TT,[pv]:xT,[vv]:LT,[Cv]:ST,[xv]:kT,[Nv]:Jk,[Kk]:qk,[Iv]:eN});function qk(e,t){const s=t.course?.lessons??[],o=t._originalLessons??s,r=gg(rN(s));if(typeof r!="object"||r===null)return e;const a={...e,...r};return kv(e)&&o!==s?Wk(a,o,s):a}function Jk(e,t){return l8(t),{...e,currentLesson:t}}function eN(e,{targetLessonId:t,lessons:s}){const o=e.lessons[t];if(!o)return e;let r=o.index;for(const i of s){if(i.type!=="quiz")continue;const c=e.lessons[i.id];if(!c||c.index>=r)continue;const l=i.settings;if(!l?.skipLessonsIfPassed||!l.skipToLessonId)continue;const d=e.lessons[l.skipToLessonId];d&&d.index>r&&(r=d.index)}const a=Object.fromEntries(Object.entries(e.lessons).map(([i,c])=>c.index>=r||c.isComplete?[i,c]:[i,tN(c)]));return{...e,lessons:a}}function tN(e){return xn(e)?Yu(e):ms(e)?sN(e):e}function sN(e){const t=Object.fromEntries(Object.entries(e.items??{}).map(([o,r])=>[o,{...r,isComplete:!0,isCorrect:!0}])),s=Object.keys(t).length;return{...e,items:t,activeIndex:s+1,isComplete:!0,passed:!0,passingScore:e.passingScore??80,percentComplete:100,reportResults:!0,score:100}}const nN=({index:e,lessonId:t,settings:s,type:o})=>o==="quiz"?{id:t,index:e,type:o,items:{},passingScore:Number(s?.passingScore??80)}:{id:t,index:e,type:"blocks",items:{}};function oN(e){return e.type==="quiz"&&"settings"in e}function rN(e){return{lessons:e.reduce((s,o,r)=>oN(o)?Ev({index:r,items:o.items,lessonId:o.id,lessonProgress:s,settings:o.settings,type:o.type}):o.type==="blocks"||o.type==="slide"?Ev({index:r,items:o.items,lessonId:o.id,lessonProgress:s,type:"blocks"}):s,{})}}function Ev(e){const{lessonId:t,index:s,items:o,lessonProgress:r={},settings:a,type:i}=e,c=nN({lessonId:t,index:s,settings:a,type:i});if(o.length===0)return{...r,[t]:c};const l=i==="quiz"?iN(o):aN(o);return{...r,[t]:{...c,items:l}}}function aN(e){return e.reduce((t,s,o)=>{const r=s.id,a=s.items??[],i=W9(a);return t[r]={id:r,index:o,items:i},t},{})}function iN(e){return e.reduce((t,s,o)=>(t[s.id]={id:s.id,index:o},t),{})}var cN=p(65191),Yr=p.n(cN),lN=p(62981),dN=p.n(lN),hde=p(55066),jv,wv;const O0=5e3,uN=gt()(Bu()(qs())(":n3,n4,i4,n7,n9")),hN=Pe()(Yr()(","),Wc()),mN=(e,t)=>{const s=new FontFace(t.name,e,{family:t.name,style:t.style,weight:t.weight});return s.load().then(()=>document.fonts.add(s))},fN=(e,t)=>{const s=document.createElement("style");return s.innerText=`@font-face { font-family: '${t.name}'; src: ${e}; font-weight: ${t.weight}; font-style: ${t.style}; }`,document.head.appendChild(s),new(dN())(t.name,{style:t.style,weight:t.weight}).load()},pN=e=>{const t=`url(${W4(e)}) format('woff')`;return("fonts"in document?mN:fN)(t,e)},Av=(e,t)=>{const s=Promise.all(e.map(pN));let o;const r=new Promise(a=>{o=setTimeout(a,O0)});return Promise.race([s,r]).catch(a=>{console.error("Failed to load learn course fonts:",{fonts:e,error:a.message||a})}).finally(()=>{clearTimeout(o),t()})},fde=({baseUri:e,typefaces:t,onLoad:s,onError:o})=>{const r=jv(t).join(", ");return wv.load({active:s,fontinactive:(a,i)=>{console.error("Individual font failed to load:",{familyName:a,fvd:i,typefaces:t})},inactive:()=>{console.error("Failed to load course fonts:",{typefaces:t,typefaceList:r}),o?.(),s?.()},timeout:O0,custom:{families:uN(jv(t)),urls:[`${e}/course_fonts.css?typefaceIds=${hN(t)}`]}})},pde=()=>wv.load({google:{families:["Noto Sans Myanmar:300,400,500,600,700"]},timeout:O0}),gN=(e,{fonts:t})=>[...e,...t],vN=(e,{fonts:t})=>t,CN=(0,fe.handle)([],{[Qr]:gN,[Xc]:vN}),xN=e=>t=>{Av(e,()=>{t(A7(!0))})},bN={isPreview:window.viewType==="preview"},Rv=((e=bN)=>e);p.dn(Rv);const Pv="rise/l10n/TOGGLE_LOCALE_SELECTOR",Mv=(e,{l10n:t})=>t?{...e,...t}:e,yN=(e,t)=>(0,Dr.TJ)(["l10n"],t,e).result,B0=(0,fe.action)(Pv),TN=(e,t)=>e&&{...e,...!t&&{localeSelectorOptions:void 0},showLocaleSelector:t},LN=(0,fe.handle)(null,{[Qr]:Mv,[Xc]:Mv,[E0]:yN,[Pv]:TN});var SN=p(4051),D0=p.n(SN);const kN=D0()(2,e=>Xu()((0,fe.error)(e),(0,fe.action)(e))),{RiseDotCom:Wn}=window,mi=e=>Wn&&Wn[e],Ov=e=>Promise.reject(new Error(`RiseDotCom.${e} is unavailable`)),NN=()=>{mi("exit")&&Wn?.exit?.()},Bv=(...e)=>{mi("on")&&Wn?.on?.(...e)},Dv=(...e)=>{mi("off")&&Wn?.off?.(...e)},IN=(...e)=>{mi("goToLearn")&&Wn?.goToLearn?.(...e)},EN=(...e)=>Wn?.downloadCertificate?.(...e)??Ov("downloadCertificate"),jN=(...e)=>{if(mi("downloadCertificateCancel"))return Wn?.downloadCertificateCancel?.(...e)},wN=(...e)=>Wn?.fetchLpUpNext?.(...e)??Ov("fetchLpUpNext"),Fv="rise/learningPathUpNext/FETCH_LP_UP_NEXT",Hv="rise/learningPathUpNext/FETCH_LP_UP_NEXT_PENDING",AN={isPending:!1,isSuccess:!1,learningPathComplete:!1,nextCourse:{}},RN=e=>!("id"in e),PN=(e,t)=>{const s=RN(t);return{...e,isPending:!1,isSuccess:!0,learningPathComplete:s,lpHasFailedQuiz:t.lpHasFailedQuiz,nextCourse:s?{}:t}},MN=e=>({...e,isPending:!0}),vde=(0,fe.handle)(AN,{[Fv]:(0,fe.onSuccess)(PN),[Hv]:MN}),ON=e=>[(0,fe.action)(Hv),kN(Fv)(Qo().fromPromise(wN)(e))],BN=(e,t)=>{const s=e.content.findIndex(r=>r.id===t.id),o=[...e.content];return s===-1?o.push(t):o[s]=t,{...e,content:o}},DN=(e,t)=>t.reduce(BN,e),FN={[_g]:DN},HN=(0,fe.handle)({content:[]},FN),$v="rise/search/RESET_SEARCH",Vv="rise/search/SET_SEARCH_ACTIVE",zv="rise/search/SET_SEARCH_ACTIVE_LESSONS",Uv="rise/search/SET_SEARCH_TRANSLATIONS",_v="rise/search/SET_SEARCH_LESSONS",Gv="rise/search/SET_SEARCH_TERM",Wv={active:!1,activeLessons:[],translations:{},lessons:[],term:null},$N=(e,t)=>t?{...Wv,active:e.active}:e,VN=(e,t)=>({...e,active:t}),zN=(e,t)=>({...e,activeLessons:t}),UN=(e,t)=>({...e,translations:t}),_N=(e,t)=>({...e,lessons:t}),GN=(e,t)=>({...e,term:t}),WN=(0,fe.handle)(Wv,{[$v]:$N,[Vv]:VN,[zv]:zN,[Uv]:UN,[_v]:_N,[Gv]:GN}),Zr=e=>(0,fe.action)(e),Kv=Zr($v),fi=Zr(Vv),Qv=Zr(zv),Yv=Zr(Uv),Zv=Zr(_v),ur=Zr(Gv),F0=e=>`rise/sessionPreferences/${e}`,Xv=F0("LOAD_SESSION_PREFERENCES"),qv=F0("SET_PREFERS_KEYBOARD_NAVIGATION"),KN=F0("SET_STARTING_COURSE_LESSON_SELECTED"),QN={prefersKeyboardNavigation:!1,startedCourseWithLessonSelected:!1},YN=(e,t)=>({...e,prefersKeyboardNavigation:t}),ZN=(e,t)=>({...e,startedCourseWithLessonSelected:t}),XN=(0,fe.handle)(QN,{[Xv]:(e,t)=>({...e,...t}),[qv]:YN,[KN]:ZN}),qN=()=>(0,fe.action)(Xv,null),JN=(0,fe.action)(qv),Jv="rise/slidesUI/SET_SLIDE_DIRECTION",eC="rise/slidesUI/SET_EXITING_SLIDE_OFFSET",eI={slideDirection:Js.UP,exitingSlideOffset:0},tI=(0,fe.handle)(eI,{[Jv]:(e,t)=>({...e,slideDirection:t}),[eC]:(e,t)=>({...e,exitingSlideOffset:t})}),hr=(0,fe.action)(Jv),sI=(0,fe.action)(eC),H0=qs()("rise/transcriptPanel/"),tC=H0("OPEN_TRANSCRIPT_PANEL"),sC=H0("CLOSE_TRANSCRIPT_PANEL"),nC=H0("UPDATE_TRANSCRIPT_PANEL"),nI={audioPlayerIdOpen:null,focusing:!1,refocusTarget:null,transcriptMedia:null},oI=(e,t)=>t.audioPlayerId?{...e,audioPlayerIdOpen:t.audioPlayerId,focusing:t.focusing??!1,refocusTarget:t.refocusTarget??null,transcriptMedia:t.transcriptMedia??null}:e,oC=()=>({audioPlayerIdOpen:null,focusing:!1,refocusTarget:null,transcriptMedia:null}),rI=(e,t)=>e.audioPlayerIdOpen?t.audioPlayerId?{...e,audioPlayerIdOpen:t.audioPlayerId,focusing:t.focusing??e.focusing,transcriptMedia:t.transcriptMedia??e.transcriptMedia}:oC():e,aI={[tC]:oI,[sC]:oC,[nC]:rI},iI=(0,fe.handle)(nI,aI),rC=(e=>`rise/ui/${e}`)("SET_SKIP_TO_NAV_BUTTON_UI"),cI={skipToNavButton:null},lI=(0,fe.handle)(cI,{[rC]:(e,t)=>({...e,skipToNavButton:t})}),$0=(0,fe.action)(rC);var xde;const dI={},uI=(0,wc.HY)({course:gk,courseLabels:jk,courseProgress:Xk,fonts:CN,global:Rv,l10n:LN,partnerContent:HN,search:WN,sessionPreferences:XN,slidesUI:tI,status:w7,transcriptPanel:iI,ui:lI,...dI}),{Provider:hI,dispatch:ps,store:aC,useDispatch:ct,useSelector:de}=I4(uI),iC="_course_token",V0=new URLSearchParams(window.location.hash.substr(1)),cC=V0.get(iC);cC&&(V0.delete(iC),window.history.replaceState(null,null,`#${V0.toString()}`));const mI=e=>{const{data:{method:t,id:s,jsonrpc:o}}=e;if(o==="2.0"&&t==="getBearerToken"){const r=cC||vt();navigator.serviceWorker.ready.then(a=>{a.active.postMessage({id:s,jsonrpc:"2.0",method:t,result:{token:r}})})}};navigator.serviceWorker&&navigator.serviceWorker.addEventListener("message",mI);const lC=(0,u.createContext)({});function fI(e,{type:t,message:s}){switch(t){case"polite":return{...e,politeMessage1:e.alternatePolite?s:"",politeMessage2:e.alternatePolite?"":s,alternatePolite:!e.alternatePolite};case"assertive":return{...e,assertiveMessage1:e.alternateAssertive?s:"",assertiveMessage2:e.alternateAssertive?"":s,alternateAssertive:!e.alternateAssertive};default:return{politeMessage1:"",politeMessage2:"",alternatePolite:!1,assertiveMessage1:"",assertiveMessage2:"",alternateAssertive:!1}}}function el({ariaLive:e,message:t}){return(0,n.jsx)("div",{"aria-atomic":"true","aria-live":e,"aria-relevant":"additions text",className:"visually-hidden-always",role:"log",children:t})}function pI({children:e}){const[{politeMessage1:t,politeMessage2:s,assertiveMessage1:o,assertiveMessage2:r},a]=(0,u.useReducer)(fI,{politeMessage1:"",politeMessage2:"",alternatePolite:!1,assertiveMessage1:"",assertiveMessage2:"",alternateAssertive:!1}),i=(0,u.useMemo)(()=>({announcePolite:c=>{a({type:"polite",message:c})},announceAssertive:c=>{a({type:"assertive",message:c})},clearAnnouncements:()=>{a({type:"clear"})}}),[a]);return(0,n.jsxs)(lC.Provider,{value:i,children:[(0,n.jsx)(el,{ariaLive:"polite",id:"polite-announcer1",message:t}),(0,n.jsx)(el,{ariaLive:"polite",id:"polite-announcer2",message:s}),(0,n.jsx)(el,{ariaLive:"assertive",id:"assertive-announcer1",message:o}),(0,n.jsx)(el,{ariaLive:"assertive",id:"assertive-announcer2",message:r}),e]})}function bn(){return(0,u.useContext)(lC)}var Ve=p(12140);const dC={BLOCKS:"blocks",QUIZ:"quiz",SECTION:"section"},uC=e=>e?.type===dC.QUIZ,z0=e=>e?.type===dC.QUIZ,U0=({locales:e,course:t,locale:s})=>!!(e?.find(a=>a.locale===s)?.rightToLeft||t?.experiments?.rtl),hC=(0,u.createContext)({currentLocale:void 0,setCurrentLocale:()=>{}});function gI({children:e,currentLocale:t,setCurrentLocale:s}){const o=(0,u.useMemo)(()=>({currentLocale:t,setCurrentLocale:s}),[t,s]);return(0,n.jsx)(hC.Provider,{value:o,children:e})}function it(){return(0,u.useContext)(hC)}function vI(e){const t=s=>{const o=it();return(0,n.jsx)(e,{...s,...o})};return t.displayName=`withCurrentLocale(${e.displayName||e.name})`,t}const pi=(e,t,s)=>(0,Qt.uW)(e)&&t?s?.[t]?.[e.l10nId]:void 0,tl=(e,t,s,o)=>{if(!(0,Qt.uW)(e))return e;if(!t||!s||!o)return;const r=pi(e,t,o);if(r!==void 0)return r;const a=pi(e,s,o);if(a!==void 0)return a;const i=mC(e,o);return i.length>0?i[0].value:void 0},_0=new WeakMap,G0=(e,t)=>{if(e&&t in e)return e[t]},W0=(e,t,s,o)=>{if(!t||!s||!o||!e)return e;if(typeof e=="object"){const d=_0.get(e)?.get(o);if(d&&d.locale===t&&d.defaultLocale===s)return d.result}const r=o[t],a=o[s],i=Object.values(o).filter(d=>d!==r&&d!==a);function c(d){let h;if(h=G0(r,d),h!==void 0||(h=G0(a,d),h!==void 0))return h;for(const m of i)if(h=G0(m,d),h!==void 0)return h}let l;if(!Array.isArray(e)&&typeof e=="object"&&typeof e.l10nId=="string")l=c(e.l10nId);else{l=structuredClone(e);for(const{mutate:d,l10nId:h}of(0,Dr.pr)(l))d(c(h))}if(typeof e=="object"){let d=_0.get(e);d||(d=new WeakMap,_0.set(e,d)),d.set(o,{locale:t,defaultLocale:s,result:l})}return l},bde=(e,t,s)=>W0(e,t,Xr(s),To(s)),yde=(e,t,s)=>tl(e,t,Xr(s),To(s)),Tde=(e,t,s)=>pi(e,t,To(s));function Lde(e,t){return t?.find(s=>s.locale===e)}function CI(e){return e?.l10n?.locales??[]}function Xr(e){return e?.l10n?.defaultLocale}function xI(e,t){const s=Xr(t);return!!(e&&s&&e!==s)}function To(e){return e?.l10n?.translations??{}}function mC(e,t){return(0,Qt.uW)(e)?Object.keys(t).flatMap(s=>{const o=pi(e,s,t);return o?{locale:s,value:o}:[]}):[]}const Sde=(e,t)=>mC(e,To(t)),Pt=e=>(0,Qt.uW)(e)?e.l10nId:void 0;function bI(e){return e?.l10n?.localeSelectorOptions}function K0(e){return e?.l10n?.languageCodeMetadata}function yI(e){return e?.l10n?.showLocaleSelector}function Q0(e,t="#ffffff"){if(e==null||e.trim()==="")return null;const s=Gr(e);if(s==null)return null;const o=s.alpha??1,r=Gr(t),a=o<1&&r!=null?(0,v0.jh)(r,{...s,alpha:1},o,{space:"srgb"}):s;return(0,N8.A)(a,"srgb")}function TI(e,t){const s=Q0(t);if(s==null)return 1;const o=Q0(e,(0,C0.A)(s));return o==null?1:(0,S8.A)(o,s,"WCAG21")}const Is=e=>e==null?Te.DARK:TI("#fff",e)>=4.5?Te.LIGHT:Te.DARK,Y0=(0,u.createContext)(null);Y0.displayName="CourseContext";const Z0=(0,u.createContext)(!1);Z0.displayName="PresentationContext";function LI({children:e,course:t,courseProgress:s,labels:o,labelsLocale:r,lessons:a,partnerContent:i,search:c}){const l=(0,u.useMemo)(()=>({course:t,courseProgress:s,labels:o,labelsLocale:r,lessons:a,partnerContent:i,search:c}),[t,s,o,r,a,i,c]);return(0,n.jsx)(Y0.Provider,{value:l,children:(0,n.jsx)(Z0.Provider,{value:Ur(t),children:e})})}function qr(){return(0,u.useContext)(Y0)}function X0(){return(0,u.useContext)(Z0)}function De(){return qr()?.course}function fC(){return Ae(De()?.title)}function Mt(){const{labels:e}=qr()??{};return e}function q0(){return qr().search}function pC(e){const o=De()?.theme?.accentContrast;return typeof o!="string"?Te.LIGHT:o===Te.AUTO?Is(e):o}function gi(){const e=De();return e?.theme?.colorAccent??e?.color}function J0(){const{currentLocale:e}=it(),t=sl(),s=De();return s?U0({course:s,locales:t,locale:e}):!1}function kde(){const{lessons:e}=qr();return e}const vi=(0,u.createContext)({l10n:null});vi.displayName="TranslationContext";const eh=(0,u.createContext)({l10n:null});eh.displayName="LocalesContext";function Ot(){const{currentLocale:e}=it(),t=nn(),s=nl();return(0,u.useCallback)(o=>tl(o,e,t,s),[e,t,s])}function gC(){const{currentLocale:e}=it(),t=nn(),s=nl();return(0,u.useCallback)(o=>W0(o,e,t,s),[e,t,s])}function Ae(e,t){const{currentLocale:s}=it(),o=nn();let r=nl();const a=kI();return a&&Object.keys(a).length&&s&&r&&(r={...r,[s]:a}),tl(e,t??s,o,r)}function SI(e){const{currentLocale:t}=it(),s=nn(),o=nl();return(0,u.useMemo)(()=>W0(e,t,s,o),[t,s,e,o])}function Jr(){return(0,u.use)(eh)}function sl(){const e=Jr();return CI(e)}function nn(){const e=Jr();return Xr(e)}function nl(){const e=(0,u.use)(vi);return To(e)}function kI(){return qr()?.search?.translations}function NI(){const e=(0,u.use)(vi);return yI(e)}function II(){const e=(0,u.use)(vi);return bI(e)}const EI=()=>(0,Ve.Mz)(t=>t,(t,s)=>s,(t,s,o)=>Xr(o),(t,s,o)=>To(o),tl);function lt(e){const{currentLocale:t}=it(),s=(0,u.useMemo)(()=>EI(),[]);return de(o=>s(e,t,o))}const jI=(0,Ve.Mz)(e=>e,(e,t)=>To(t),(e,t)=>t?.[e]);function vC(){const{currentLocale:e}=it();return de(t=>jI(e,t))}const wI=(0,Ve.Mz)(e=>e.course?.title,Xr,To,(e,t,s)=>{if(e)return pi(e,t,s)});function AI(){return de(wI)}function ol(){return de(e=>e.l10n)}var RI=p(82920);function CC(e){return e?.search}function Lo(){return de(CC)}function PI(e){return CC(e)?.activeLessons}const MI=(0,Ve.Mz)(PI,e=>e?e.reduce((t,s)=>(s?.id&&(t[s.id]=s),t),{}):{});function OI(){return(0,Ve.Mz)(e=>e,(e,t)=>MI(t),(e,t)=>t?.[e])}function BI(e){const t=RI.useMemo(()=>OI(),[]);return de(s=>t(e,s))}function os(e){return e.course}function re(){return de(os)}function DI(e){return os(e)?.navigationMode}function th(e){return os(e)?.trackingQuizId}function ea(){const e=re();return lt(e?.title)}function FI(e){return os(e)?.type}function HI(){return de(e=>FI(e))}function sh(e){const t=os(e);return Vn(t)}function $I(){return de(sh)}function VI(e){const t=os(e);return t0(t)}function zI(){return de(VI)}const UI=e=>e.filter(t=>t.type!=="section");function Ci(){const e=re(),t=Lo();return(0,u.useMemo)(()=>t?.active&&t?.lessons?.length>0?{...e,lessons:t.lessons,lessonsOnly:UI(t.lessons)}:e,[e,t?.active,t?.lessons])}const _I=(0,Ve.Mz)(os,e=>(e?.lessons??[]).filter(uC).some(t=>t.settings?.skipLessonsIfPassed&&t.settings?.skipToLessonId));function nh(e){const t=DI(e);return _I(e)?yo.RESTRICTED:t??yo.FREE}function rl(){return de(nh)}function GI(e){return os(e)?.theme?.buttonNavigationStyle??Qe.buttonNavigationStyle}function WI(){return de(GI)}function oh(){const e=re();return e?.selectedAuthorId==="none"||!("authors"in(e??{}))?null:e?.selectedAuthorId?e?.authors?.find(t=>t.id===e.selectedAuthorId):e?.authors?.find(t=>t.id===e?.author)}function xC(){return re()?.theme?.coverImageColor??at.DARK}function bC(){return re()?.lessonsOnly?.[0]}function KI(){const e=re(),{selectedAuthorId:t}=e?.lessons?.[0]??{};return t==="none"||!t?null:e?.authors?.find(s=>s.id===t)??null}function on(){const{currentLocale:e}=it(),t=sl(),s=re();return s?U0({course:s,locales:t,locale:e}):!1}function yC(){const t=re()?.lessons;return(0,u.useMemo)(()=>Array.isArray(t)?t.filter(({type:s})=>s!=="section").length:0,[t])}class QI extends u.Component{static defaultProps={scope:"error-boundary"};constructor(t){super(t),this.state={hasError:!1}}static getDerivedStateFromError(t){return console.error(t),{hasError:!0,error:t}}render(){const{hasError:t,error:s}=this.state,{FallbackComponent:o}=this.props;return t||s?(0,n.jsx)(o,{}):this.props.children}}const YI=QI;var ZI=p(3199),XI=p.n(ZI),qI=p(13840),mr=p.n(qI),JI=p(37754),eE=p.n(JI),tE=p(27315),al=p.n(tE),sE=p(97491),Hs=p.n(sE),nE=p(80690),il=p.n(nE),oE=p(85434),rE=p.n(oE),aE=p(40889),iE=p.n(aE);const rh=({course:e,courseProgress:t})=>!e||!t?{}:e.lessons.filter(r=>!!r.settings?.passToContinue).filter(r=>!t.lessons[String(r.id)]?.passed)[0]??{},cE=({courseProgress:e,lesson:t,restrictingQuiz:s})=>{if(!e)return{};const o=c=>e.lessons[String(c)]?.index,r=o(t.id),a="id"in s?s.id:void 0,i=a!=null?o(a):void 0;return r!==void 0&&i!==void 0&&r>i?s:{}};var lE=p(37373),So=p.n(lE),dE=p(94209),uE=p.n(dE),hE=p(26507),ah=p.n(hE);const ko=Ie("CDN_USER_CONTENT_URI"),TC=Ie("CDN_URI"),xi=zr()("useCrushedKey"),rn=Ie("IMAGES_URI"),mE=ah()(/-stock[-_]image.jpg/),ih=Ie("RBC_IMAGES_URI"),fE=Ie("ASSETS_URI"),pE=ah()(new RegExp(`^${ko}/review`)),LC=Ie("CDN_US_URI"),bi=e=>{const{crushedKey:t,key:s,useCrushedKey:o,src:r}=e;return xi(e)?pt(o&&t?t:s):pt(r)},SC=(e,t)=>{if(!e||!e.key)return"";const{crushedKey:s,key:o,useCrushedKey:r}=e;return rn?xi(e)&&r&&s?`${rn}/${t}/${s}`:`${rn}/${t}/${o}`:bi(e)},Nde=e=>`${ko}/${e}`,Ide=e=>!e||!e.key?"":`${ih}/b:fff,f:jpg,s:cover,w:550,h:296/${e.key}`,Ede=e=>{if(!e||!e.key)return"";const{crushedKey:t,key:s,useCrushedKey:o}=e;return xi(e)&&o?t?`${rn}/f:jpg,b:fff,s:cover,w:340/${t}`:"":`${rn}/f:jpg,b:fff,s:cover,w:340/${s}`},ch=e=>SC(e,"f:png,a:retain,s:cover,t:true,w:340"),jde=e=>SC(e?{...e,src:e.src??e.key}:void 0,"a:retain,f:png,s:contain,w:64,h:64"),dt=e=>{if(!e||!e.key)return"";const{crushedKey:t,key:s,useCrushedKey:o,sourcedFrom:r}=e;if(!rn)return bi(e);const a=r==="AI",i=r==="LIBRARY",c=r==="EXTRACTED";return mE(s)||a||i?`${rn}/f:jpg,a:retain,b:fff,w:1680,q:90/${s}`:xi(e)?o&&t?`${ko}/${t}`:`${ko}/${s}`:c&&e.src||pE(e.src)?e.src:`${rn}/f:jpg|png,a:retain,b:fff/${s}`},wde=(e,t="src")=>{const{key:s,src:o,thumbnail:r,thumbnailKey:a}=e,i=ko?`${ko}/${s}`:bi({key:s,src:o}),c=ko?`${ko}/${a}`:bi({key:a,src:r});return t==="src"?i:c},Ade=e=>{if(!e||!e.key)return"";const{crushedKey:t,key:s,useCrushedKey:o}=e;return xi(e)&&o&&t?`${rn}/f:jpg,b:fff,h:100,s:cover,t:true,w:100/${t}`:`${rn}/f:jpg,b:fff,h:100,s:cover,t:true,w:100/${s}`},yi=({height:e,imageKey:t,width:s})=>{if(ih){const o=encodeURIComponent(t);return`${ih}/b:fff,f:jpg,s:cover,w:${s},h:${e}/${o}`}return pt(`partnerContent/${t}`)},gE=()=>{const e=fE||rn,t="NBIC_logo_light_bulb.png";return e?`${e}/f:png,a:retain,s:cover,w:276,h:160/assets/rise/assets/partner-content/${t}`:pt(`partnerContent/${t}`)},vE=()=>{const e="NBIC_logo_blue.svg";return TC?`${TC}/assets/rise/assets/partner-content/${e}`:pt(`partnerContent/${e}`)},CE=e=>{const{key:t,src:s}=e;return LC?`${LC}/${t}`:bi({key:t,src:s})};var xE=p(17945);const cl=({alpha:e,color:t,url:s})=>{const o=(0,xE.A)(t,e);return{backgroundImage:`linear-gradient(0deg,${o},${o}), url("${s}")`}};var lh,dh;const Pde=si()(Xe()("sidebarMode","hidden")),ta=({alpha:e,color:t=void 0,hasOverlay:s=!0,media:o={}})=>{const{image:r={}}=o,{key:a,src:i}=r,c=a?dt(r):i,l=t===at.LIGHT?"#fff":"#000";return c?s?cl({alpha:e/100,color:l,url:c}):{backgroundImage:`url("${c}")`}:null},No=e=>[rr.DARK,rr.DARK_ACCENT,rr.DARK_IMAGE,ar.DARK,zn.DARK,zn.DARK_IMAGE].includes(e),bE=Nt()(Ye()("lessons"),So()),yE=Xe()("navigationMode",yo.RESTRICTED),TE=si()(Xe()("sidebarMode",Wr.HIDDEN)),LE=Xe()("navigationType",or.SIDEBAR),kC=Xe()("navigationType",or.COMPACT),uh=Zs()(uE()(At(),"navigation"),TE,Xe()("navigation",!0)),SE=({course:e,search:t,isMobile:s})=>Vn(e)?!1:(LE(e)||kC(e)&&!!s)&&uh(e)||t.active,kE=({course:e,isMobile:t})=>kC(e)&&uh(e)&&!t,Ti=e=>[rr.DARK_IMAGE,rr.LIGHT_IMAGE,ar.DARK_IMAGE,ar.IMAGE,zn.DARK_IMAGE,zn.LIGHT_IMAGE].includes(e),NE=e=>[zn.DARK,zn.LIGHT].includes(e),IE=(e,t)=>{if(e===Qc.RISE_CLASSIC||e===Qc.HORIZON)switch(t){case ce.SPLIT_LEFT_IMAGE:case ce.SPLIT_RIGHT_IMAGE:case ce.TWO_THIRDS_LEFT_IMAGE:case ce.TWO_THIRDS_RIGHT_IMAGE:return!0;default:return!1}else if(e===Qc.APEX)switch(t){case ce.SPLIT_LEFT_IMAGE:case ce.SPLIT_RIGHT_IMAGE:return!0;default:return!1}return!1},Mde=(e,t)=>{switch(e){case lh.RISE_CLASSIC:case lh.APEX:case lh.HORIZON:return t===dh.CENTERED_OVERLAY||t===dh.LEFT_OVERLAY||t===dh.IMAGE;default:return!1}},NC=e=>e==null?!0:typeof e=="string"||Array.isArray(e)?e.length===0:typeof e=="object"?Object.keys(e).length===0:!1,an=e=>!NC(e),ll=Ye(),dl=$n(),hh=yt(),IC=e=>Fn()(t=>dr({settings:{asLesson:ll("asLesson",t.settings)??void 0},type:t.type??null}),ll("lessonsOnly",e)??[]),EE=({course:e,courseProgress:t})=>mr()(jE(t),e?.lessonsOnly??[]),jE=e=>t=>il()(t.id==null?void 0:dl(["lessons",t.id,"isComplete"],e)),wE=({lesson:e,currentLesson:t})=>e&&Xe()("id",e.id,t),AE=({course:e,lesson:t})=>Xe()("id",t.id,Hc()(ll("lessonsOnly",e)??[])),EC=e=>e!=null&&e.type!=="section",RE=({lesson:e,courseProgress:t})=>e?.id==null?!1:hh(!1,["lessons",e.id,"isComplete"],t),mh=({course:e,courseProgress:t,lesson:s,restrictingQuiz:o={}})=>{const r=s?.id==null?{}:cE({courseProgress:t,lesson:{id:s.id},restrictingQuiz:o}),a=yE(e),i=a||an(r),c=EE({course:e,courseProgress:t}),l=EC(s)&&il()(RE({lesson:s,courseProgress:t}));return{isRestricted:i&&l&&il()(wE({lesson:s,currentLesson:c})),restrictingQuiz:r,isRestrictedCourse:a,currentLesson:c}},PE=({labels:e,restrictions:t})=>{const{lessonRestricted:s,quizRequirePassingScore:o}=e,{isRestrictedCourse:r,restrictingQuiz:a,currentLesson:i}=t,c=i&&XI()("id",a,i),l=a!=null&&typeof a=="object"?ll("title",a):void 0;return!r||r&&c?typeof l=="string"&&l?o.replace("quiz",`"${l}"`):o:s},jC=iE()((e,t)=>eE()(rE()(go()(["id"],e||{})),t)),ME=({course:e,lesson:t})=>Pe()(al(),jC(t),IC)(e),wC=({course:e,lesson:t})=>{if(AE({course:e,lesson:t}))return;const s=e?.lessonsOnly??[];return s[al()(jC(t,s))]},OE=Pe()(Hs(),IC),BE=e=>typeof e=="object"&&Object.keys(e).length>0,DE=e=>e==null||e===!1,FE=e=>DE(e?.isComplete),HE=e=>e.find(([,t])=>FE(t)),$E=e=>{const t=Object.entries(e),[s]=HE(t)||[];return s},VE=(e={},t)=>BE(e)?$E(e):t==null?void 0:String(t),AC=(e,t,s)=>{if(!s)return{outOfAttempts:!1,quizPassed:!0};const o=dl(["lessons",s],e),r=hh(-1,["settings","retryCount"],t),a=hh(0,["retryAttempts"],o),i=dl(["passed"],o);return{outOfAttempts:dl(["isComplete"],o)&&Number(r)>-1&&Number(a)===Number(r),quizPassed:i}};function fh(e){return e.courseProgress}function zE(e){return e.courseProgress?.currentLesson??""}function UE(e){return e.courseProgress?.percentComplete??0}const RC=(0,Ve.Mz)(th,os,(e,t)=>{const{lessons:s}=t;return Array.isArray(s)?s.find(({id:o,type:r})=>r==="quiz"&&o===e)??null:null}),_E=(0,Ve.Mz)(fh,RC,(e,t)=>t?AC(e,t,t.id):null);function PC(e){const t=fh(e);return xg()?t?.percentComplete===100:!!Cg()}function sa(e){return e.courseProgress?.lessons}function Li(e,t){if(e!=null)return sa(t)?.[e]}function fr(){return de(fh)}function ul(){return de(zE)}function na(){return de(UE)}function GE(){return de(RC)}function ph(){const e=de(_E);return{outOfAttempts:e?.outOfAttempts??!1,quizPassed:e?.quizPassed??!1}}function WE(){return de(PC)}function Io(e){return de(t=>Li(e,t))}function hl(e){const t=Io(e);if(t?.type==="quiz")return t}const KE=(0,Ve.Mz)(sa,e=>e?Object.values(e).some(t=>t.type==="quiz"&&t.activeIndex!==void 0&&!t.isComplete):!1);function QE(){return de(KE)}const MC=e=>e>9999?1:e,YE=({current:e,restart:t,restartValue:s})=>{const o=Number(s),r=MC(Number.isInteger(o)&&o>0?o:1),a=t?r:e+1;return MC(a)},ZE=(e,t)=>{if(t.family==="divider"&&t.variant==="numbered divider"){const s=t.settings??{},o=YE({current:e.currentNumber,restart:s.restartNumbering,restartValue:s.restartNumberingValue});return{map:{...e.map,[t.id]:o},currentNumber:o}}return e},OC=e=>G7(e),ml=e=>W7(e),XE=e=>K7(e),qE=e=>!!Kg(e);function oa(){return(0,Ve.Mz)(e=>e,(e,t)=>HC(t),(e,t)=>t[String(e)])}function Vt(e){const t=(0,u.useMemo)(()=>oa(),[]);return de(s=>t(e,s))}function ra(e){const t=Vt(e);return lt(t?.title)}function JE(){const e=oa();return(0,Ve.Mz)(e,t=>OC(t))}function BC(){const e=fl();return(0,Ve.Mz)(t=>t,(t,s)=>e(s),(t,s)=>nh(s),(t,s)=>aj(s),(t,s)=>ij(s),(t,s)=>sa(s),(t,s,o,r,a,i)=>{const c=i?.[t],l=i?.[s];if(t!==s&&!c?.isComplete&&c?.index>l?.index){const d=i?.[r?.id]?.index??1/0,h=o==="restricted"?l?.index??1/0:i?.[a?.id]?.index??1/0;if(c?.index>Math.min(d,h))return h<d?o==="restricted"?{type:Kr.ORDER}:{type:Kr.KNOWLEDGE_CHECK}:{type:Kr.QUIZ,data:r.title}}return null})}function Si(e){const t=(0,u.useMemo)(()=>BC(),[]);return de(s=>t(e,s))}function fl(){return(0,Ve.Mz)(sa,th,(e,t)=>VE(e,t))}function ej(){const e=(0,u.useMemo)(()=>fl(),[]);return de(t=>e(t))}function tj(){const e=fl();return(0,Ve.Mz)(e,HC,(t,s)=>{if(!(!t||!s[t]))return s[String(t)]})}function sj(){const e=oa();return(0,Ve.Mz)(e,Li,(t,s)=>{const o=s?.percentComplete??0,r=s?.isComplete??!1,a=s?.passed??!1;return o===100&&(!r||ml(t)&&!a)})}function DC(e){const t=(0,u.useMemo)(()=>sj(),[]);return de(s=>t(e,s))}function nj(){const e=oa();return(0,Ve.Mz)(e,Li,(t,s)=>{const o=s?.percentComplete??0,r=s?.isComplete??!1,a=s?.passed??!1;return o===100&&r&&(!ml(t)||a)})}function FC(e){const t=(0,u.useMemo)(()=>nj(),[]);return de(s=>t(e,s))}const gh=(0,Ve.Mz)(os,e=>e?.lessons??[]),HC=(0,Ve.Mz)(gh,e=>e.reduce((t,s)=>(s?.id&&(t[s.id]=s),t),{})),aa=(0,Ve.Mz)(os,e=>e?.lessonsOnly??[]),oj=(0,Ve.Mz)(aa,e=>e.reduce((t,s,o)=>(t[s.id]=o+1,t),{}));function $C(){return de(e=>oj(e))}const vh=(0,Ve.Mz)(aa,e=>e.filter(t=>dr(t))),VC=(0,Ve.Mz)(vh,e=>e.length),rj=(0,Ve.Mz)(gh,e=>e.reduce((t,s)=>{const o=t[t.length-1];return OC(s)||o==null?t.push([s.id]):o.push(s.id),t},[])),aj=(0,Ve.Mz)(aa,sa,(e,t)=>e.find(s=>ml(s)&&XE(s)&&!t?.[s.id]?.isComplete)),ij=(0,Ve.Mz)(aa,sa,(e,t)=>e.find(s=>!ml(s)&&qE(s)&&!t?.[s.id]?.isComplete));function pl(e){const t=(0,u.useMemo)(JE,[]);return de(s=>t(e[0],s))}function Ch(e){const t=(0,u.useMemo)(()=>oa(),[]),s=(0,u.useMemo)(()=>BC(),[]),o=rl();return de(r=>{const a=os(r),i=t(e,r),c=Li(e,r),d=s(e,r)?.type!=null;return o!==yo.RESTRICTED&&a?.markComplete&&!d&&i?.type!==S0.QUIZ&&!0})}const gl=(e,t)=>t.findIndex(s=>s.id===e);function zC(){return(0,Ve.Mz)(e=>e,(e,t)=>aa(t),(e,t)=>{if(e==="progress-summary")return t[t.length-1];const o=gl(e,t)-1;return t[o]})}function UC(){return(0,Ve.Mz)(e=>e,(e,t)=>aa(t),(e,t)=>{const o=gl(e,t)+1;return t[o]})}function _C(e){return(0,Ve.Mz)((s,o)=>e(s,o),(s,o)=>vh(o),(s,o)=>gl(s?.id||"",o)+1)}function cj(){return _C(UC())}function lj(){return _C(zC())}function dj(e){const t=(0,u.useMemo)(()=>UC(),[]);return de(s=>t(String(e),s))}function uj(e){const t=(0,u.useMemo)(()=>cj(),[]);return de(s=>t(String(e),s))}function hj(e){return de(t=>{if(!e)return 0;const s=vh(t);return gl(String(e),s)+1})}function xh(){return de(VC)}function vl(){return de(e=>rj(e))}function mj(){const e=fl();return(0,Ve.Mz)(PC,e,th,(t,s,o)=>{const r=!!s,a=o!=null;return t||!r&&!a})}function fj(){const e=(0,u.useMemo)(()=>mj(),[]);return de(t=>e(t))}function pj(){const e=re(),t=fr();return(0,u.useMemo)(()=>{if(!e||!t||!e.lessonsOnly)return[];const s=rh({course:e,courseProgress:t});return e.lessonsOnly.filter(o=>{const{isRestricted:r}=mh({course:e,courseProgress:t,lesson:o,restrictingQuiz:s});return r}).map(o=>o.id)},[e,t])}const gj=e=>e?.items?.reduce?.(ZE,{map:{},currentNumber:0})?.map||{},vj=e=>{const t=(0,u.useMemo)(()=>oa(),[]),s=de(o=>t(e,o));return(0,u.useMemo)(()=>gj(s),[s])},Cj=({blockId:e,lessonId:t})=>vj(t)?.[e];function xj(e){const s=re()?.lessonsOnly??[],o=s.findIndex(a=>a.id===e);return(o>=0?s[o+1]:void 0)?.id??null}function bh(e){const t=Vt(e),s=re(),o=t?.settings,r=s?.lessonsOnly;return(0,u.useMemo)(()=>{const a=o?.skipToLessonId,i=a&&r?.some(c=>c.id===a)?a:void 0;return{continueType:o?.continueType??"",retryCount:Number(o?.retryCount??-1),skipLessonsIfPassed:o?.skipLessonsIfPassed??!1,skipLessonsOptional:o?.skipLessonsOptional??!0,skipToLessonId:i}},[o,r])}function bj(){return de(gh)}function yj(e){const t=(0,u.useMemo)(()=>zC(),[]);return de(s=>t(e,s))}function Tj(e){const t=(0,u.useMemo)(()=>lj(),[]);return de(s=>t(e,s))}function Lj(){const e=(0,u.useMemo)(()=>tj(),[]);return de(e)}function GC(){const e=Lj();return lt(e?.title)}const Ode="/:mode",yh="/lessons/:lessonId",Th="/lessons/:lessonId/:mode",Sj=e=>e==="iframe"||e==="preview";function Es(){const e=(0,we.RQ)(yh),t=(0,we.RQ)(Th);return(e??t)?.params.lessonId}function kj(e){return e.courseLabels}function Nj(){return de(kj)}function Ij(e,t){return t?.l10n?.localeLabelSets?.[e]?.labels||t?.courseLabels?.labels}function be(){const{currentLocale:e}=it();return de(t=>Ij(e,t))}function Ej({isCourseComplete:e,percentCourseComplete:t}){const s=be()??{},{courseResume:o,courseStart:r,processStartAgain:a}=s;return{courseCTALabel:e?a:t>0?o:r}}function Lh(){const{pathname:e}=new URL(window.location.href);return e.split("/")[1]==="review"}function jj(){const e=window.location.hash.slice(1),t=new URLSearchParams(e.split("?")[1]??"");return Lh()&&!!t.get("locale")}const wj=(0,u.lazy)(()=>p.e("webpack_container_remote_learn_distribution_frontend_learn_ai-learner-popout").then(p.t.bind(p,68789,23))),Aj=()=>{const{currentLocale:e}=it(),t=SI(re()),s=on(),o=QE(),r=ul(),a=Vt(Es()),i=be(),c=window,l=c?.growth?.getSubscription?.()?.id||t?.tenantId||void 0,d=c?.growth?.getUser?.()?.id||(t?`learner_${t.author}`:void 0),h=pj(),m=async()=>{try{await ei()}catch{}},f=t?.aiTutorConfig?.image?.media?.image,v=dt(f)||null,C=lt(t?.aiTutorConfig?.name)??null,[g,x]=(0,u.useState)(!1),b=`rise_ai_tutor_nudge_${d}`,T=(0,u.useCallback)(()=>{localStorage.setItem(b,"1")},[b]);(0,u.useEffect)(()=>{if(localStorage.getItem(b))return;let S=null;const k=setTimeout(()=>{const N=document.getElementById("page-wrap");if(!N)return;const I=()=>{if(localStorage.getItem(b)){N.removeEventListener("scroll",I);return}const{scrollTop:w,scrollHeight:A,clientHeight:E}=N,j=A-E,O=j>0?w/j:0;j<=0||O>=.75&&(localStorage.setItem(b,"1"),x(!0),N.removeEventListener("scroll",I))};N.addEventListener("scroll",I,{passive:!0}),S=()=>N.removeEventListener("scroll",I),I()},0);return()=>{clearTimeout(k),S?.()}},[d,b,r]);const L=o||a?.type==="quiz",y=L?i?.aiTutorDisabledWhileQuiz??"AI Tutor is disabled while a quiz is in progress.":void 0;return(0,n.jsx)(wj,{aiTutorImageUrl:v,aiTutorName:C,apiKey:t.aiLearnerCourseApiKey??null,course:t,currentLessonId:r||null,currentLocale:e,disabled:L,disabledReason:y,labels:i,onOpen:T,resetSession:m,resolveAssetUrl:Tg,restrictedLessonIds:h,rtl:s,scrollTriggered:g,subscriptionId:l,userId:d})},Rj=()=>{const e=re();return!Lh()&&!!e?.settings?.aiTutorEnabled?(0,n.jsx)(YI,{FallbackComponent:()=>null,children:(0,n.jsx)(u.Suspense,{fallback:null,children:(0,n.jsx)(Aj,{})})}):null},WC=(0,u.createContext)(null);function Pj({appType:e,children:t}){return(0,n.jsx)(WC.Provider,{value:e,children:t})}function Mj(){const e=(0,u.useContext)(WC);if(e==null)throw new Error("useAppType must be used within an AppTypeProvider");return e}function Sh(){return Mj()==="author"}const kh=Object.assign((0,u.createContext)(void 0),{displayName:"BlockContext"});function Nh({block:e,children:t}){const[s,o]=(0,u.useState)(e);return e!=null&&e!==s&&o(e),(0,n.jsx)(kh.Provider,{value:s,children:(0,n.jsx)(Ah,{...s?.settings,children:t})})}const Bde=kh.Consumer;function Bt(){return(0,u.useContext)(kh)}function Cl(e){return function(s){const o=Bt();return(0,n.jsx)(e,{...s,block:o})}}const Oj={text:{backgroundType:"blockTextBackgroundType",backgroundColor:"blockTextBackgroundColor",backgroundColorContrast:"blockTextBackgroundColorContrast",paddingStart:"blockTextPaddingStart",paddingEnd:"blockTextPaddingEnd",bodyFontSize:"blockTextBodyFontSize",headingFontSize:"blockTextHeadingFontSize",subheadingFontSize:"blockTextSubheadingFontSize"},continue:{completionType:"blockContinueCompletionType",label:"blockContinueLabel",completeHint:"blockContinueCompleteHint"}},Dde=null;function Bj(e,t){if(!e||!t)return null;const s=Oj[e];if(!s)return null;const o=r=>r?t[r]:void 0;return{backgroundType:o(s.backgroundType),backgroundColor:o(s.backgroundColor),backgroundColorContrast:o(s.backgroundColorContrast),paddingStart:o(s.paddingStart),paddingEnd:o(s.paddingEnd),bodyFontSize:o(s.bodyFontSize),headingFontSize:o(s.headingFontSize),subheadingFontSize:o(s.subheadingFontSize),completionType:o(s.completionType),label:o(s.label),completeHint:o(s.completeHint)}}function Eo(){const e=Bt(),t=De(),s=e?.family,o=t?.theme;return(0,u.useMemo)(()=>Bj(s,o),[s,o])}var Dj=p(20348),Fj=p.n(Dj);const yn=(e,t)=>{const s=Gr(t);return s==null?null:(0,C0.A)((0,v0.jh)(s,Gr("#000000"),e),{format:"hex",collapse:!1})};function Hj(e){if(e==null)return 0;const t=Q0(e);return t==null?0:(0,k8.J1)(t)}const ut=tn({NEAR_BLACK:null,DARK:null,MED:null,LIGHT:null}),ia=e=>{const t=Hj(e);return t<=.01?ut.NEAR_BLACK:t<=.05?ut.DARK:t<=.35?ut.MED:ut.LIGHT},$j=e=>{switch(ia(e)){case ut.NEAR_BLACK:return en(.1,e);case ut.DARK:return yn(.4,e);case ut.MED:return yn(.2,e);case ut.LIGHT:return en(.3,e)}};var Vj,zj,Uj,Ih,KC,jo;const QC=2,Fde=(e,t,s)=>e??t??s,YC=(e,t,s,o)=>e??t??s??o,$s=Bs()({WHITE:null,TRANSPARENT:null}),_j={markerColorContrast:Te.AUTO,paddingBottom:3,paddingLinked:!0,paddingTop:3,snippetColorContrast:Te.AUTO},Gj={knowledge:["knowledge"],knowledgeCheck:["draw from question bank","fillin","matching","multiple choice","multiple response"],flashcard:["flashcard","stack"],interactive:["accordion","tabs"],"interactive-fullscreen":["sorting","timeline","process"],multimedia:["attachment","embed","step"],quote:["carousel"],survey:["survey"]};function Wj(e,t){return Gj[e]?.includes(t)??!1}const Kj={360:{storyline:"#fafafa"},impact:{c:"#ececec",d:"#f5f5f5"},"interactive-fullscreen":{process:"#f5f5f5",sorting:"#f5f5f5",timeline:"#f5f5f5"},quote:{d:"#f5f5f5"}};function Eh(e,t){const s=Kj[e]?.[t];return s==null?{}:{backgroundColor:s,backgroundType:ne.COLOR}}const Qj=null;function Hde(e,t){return Qj[e]?.includes(t)??!1?.1:.5}function Yj(e){switch(e.backgroundType){case ne.COLOR:return e.backgroundColor;case ne.ACCENT:return e.courseColor;case ne.TINT:return x0(e.courseColor);case ne.LIGHT:return"#ffffff";case ne.GRAY:return"#fafafa";case ne.DARK:return"#303030";case ne.BLACK:return"#000000"}}const Zj={multimedia:{embed(e){return{cardMode:e.showBorder===!1?$s.TRANSPARENT:$s.WHITE}}}};function Xj(e,t,s){return qj(e,t,s)}function qj(e,t,s){const o=Eh(e,t);if(s.v==null||s.v<QC){s=Jj(s);const l=o.backgroundColor,d=s.backgroundColor?.toLowerCase(),h=l!=null&&d===l.toLowerCase(),m=l==null&&d==="#ffffff";d&&(h||m)&&(s=Fj()("backgroundColor",s))}const r=Zj[e]?.[t]?.(s),a=s.backgroundColor&&s.backgroundType==null?{backgroundType:ne.COLOR}:{};return[{accentColor:null},_j,r,s,a,{v:QC}].reduce((l,d)=>d==null?l:{...l,...ag()(NC,d)},{})}function Jj(e){return{...e,backgroundType:null,cardMode:null,v:1}}const ew=null;function $de(e,t){return!ew[e]?.includes(t)}const tw=null;function Vde(e,t){return!tw[e]?.includes(t)}function sw(e){return e===Uj.LIGHT?jo.LIGHT:jo.DARK}function nw(e,t){if(t===Ih.AUTO){if(!e)return jo.DARK;const s=Vj(e);return zj(s)===Ih.DARK?jo.DARK:jo.LIGHT}else return t===Ih.LIGHT?jo.LIGHT:jo.DARK}function zde(e,t,s,o,r){const a=e?.backgroundType;return e?.cardMode===$s.TRANSPARENT?a===KC.IMAGE?sw(t?.overlayColor):o&&a!==KC.ACCENT?r:nw(s,e?.customBackgroundColorContrast):o?r:jo.DARK}const ow=null;function Ude(e,t){return ow[e]?.includes(t)??!1}const rw=new RegExp(/^#([a-f0-9]{8}|[a-f0-9]{6}|[a-f0-9]{3})$/,"i"),jh=(e,t)=>t!=null&&rw.test(t)?t:e;function zt(e){const{contrast:t=Te.AUTO,backgroundColor:s="#fff"}=e,o=jh("#fff",s),r=Is(o);return t===Te.DARK||t===Te.AUTO&&r===Te.DARK?bt.DARK:bt.LIGHT}const aw=e=>e.blockBackgroundType??e.familyBackgroundType??e.courseBackgroundType??e.blockTypeFallbackType??ne.LIGHT,iw=e=>e.effectiveBackgroundType===ne.COLOR?e.blockBackgroundColor||e.familyBackgroundColor||e.courseBackgroundColor||e.blockTypeFallbackColor||null:e.settingsBackgroundColor??null,cw=e=>e.blockCustomContrast??e.familyBackgroundColorContrast??e.courseBackgroundColorContrast??Te.AUTO,ZC=e=>{const{family:t,variant:s,customBackgroundColorContrast:o}=e;return!o&&(t==="image"&&s!=="text aside"||t==="chart"||s==="sorting")},lw=e=>{const{backgroundType:t,backgroundColor:s,accentColor:o,customBackgroundColorContrast:r,accentContrast:a,family:i,variant:c}=e;if(!(t===ne.ACCENT||t===ne.COLOR))return null;const d=t===ne.ACCENT?o:s;let h;return t===ne.ACCENT?h=a:ZC({family:i,variant:c,customBackgroundColorContrast:r})?h=Is(s):h=r??Te.DARK,zt({backgroundColor:d??void 0,contrast:h})},dw=e=>lw(e)===bt.LIGHT,uw=e=>{const t=e.blockBackgroundType!=null||e.familyBackgroundType!=null||e.courseBackgroundType!=null,s=e.blockCustomContrast!=null||e.familyBackgroundColorContrast!=null||e.courseBackgroundColorContrast!=null;return!t&&!s},hw=e=>{const{backgroundColor:t,family:s,variant:o,blockCustomContrast:r,familyBackgroundColorContrast:a,courseBackgroundColorContrast:i}=e,c=r??a??i??Te.AUTO,d=ZC({family:s,variant:o,customBackgroundColorContrast:c})?Is(t):c;return zt({backgroundColor:t??void 0,contrast:d})};var mw=p(81884),ca=p.n(mw);const fw=e=>{const{effectiveBackgroundType:t,blockImage:s}=e;return t!==ne.IMAGE?null:s??null},pw=e=>Eg(e?.alt),gw=e=>{if(!e)return null;const{alpha:t,overlayColor:s=at.DARK}=e,o=dt(e),r=s===at.LIGHT?"#fff":"#000";return cl({alpha:t,color:r,url:o})};function Tn(){const e=De(),t=Eo(),s=rs(),o=Bt(),r=o?Eh(o.family,o.variant):{};return aw({blockBackgroundType:s?.backgroundType,familyBackgroundType:t?.backgroundType,courseBackgroundType:e?.theme?.blockBackgroundType,blockTypeFallbackType:r.backgroundType})}function vw(){return Tn().toLowerCase()}function xl(){const e=Bt(),t=Tn(),s=e?.background,o=Ae(s?.media)?.image;return fw({effectiveBackgroundType:t,blockImage:o})}function Cw(){const e=xl();return pw(e)}function xw(){const e=xl();return gw(e)}function bw(){const e=xl();return!!e&&e?.overlayColor===at.LIGHT}function yw(){const e=Bt(),t=e?.family,s=e?.variant,o=Wj(t,s),r=e?.settings?.cardMode??$s.WHITE;return o?r.toLowerCase():null}function Tw(){const e=js(),t=e?ia(e):ut.LIGHT;return ca()(t.toLowerCase())}function Lw(){const e=Bt(),t=De(),s=Eo();return cw({blockCustomContrast:e?.settings?.customBackgroundColorContrast,familyBackgroundColorContrast:s?.backgroundColorContrast,courseBackgroundColorContrast:t?.theme?.blockBackgroundColorContrast})}function Sw(){const e=De(),t=rs(),s=js(),o=Bt(),r=Tn(),a=Lw(),i=t.accentColor||e?.theme?.colorAccent;return dw({accentColor:i,accentContrast:e?.theme?.accentContrast,backgroundColor:s,backgroundType:r,customBackgroundColorContrast:a,family:o?.family,variant:o?.variant})}function kw(){const e=Bt(),t=De(),s=js(),o=Eo();return hw({backgroundColor:s,blockCustomContrast:e?.settings?.customBackgroundColorContrast,courseBackgroundColorContrast:t?.theme?.blockBackgroundColorContrast,family:e?.family,familyBackgroundColorContrast:o?.backgroundColorContrast,variant:e?.variant})}function Nw(){const e=Bt(),t=De(),s=Eo();return uw({blockBackgroundType:e?.settings?.backgroundType,familyBackgroundType:s?.backgroundType,courseBackgroundType:t?.theme?.blockBackgroundType,blockCustomContrast:e?.settings?.customBackgroundColorContrast,familyBackgroundColorContrast:s?.backgroundColorContrast,courseBackgroundColorContrast:t?.theme?.blockBackgroundColorContrast})}function Iw(){const e=vw(),t=Tw(),s=yw(),o=Sw(),r=bw(),a=Nw(),i=js(),c=xw(),l=Cw();return{backgroundColor:i,backgroundImageAlt:l,backgroundImageCss:c,backgroundTypeLowercase:e,cardMode:s,colorRange:t,isContrastLight:o,isLegacyBackground:a,isOverlayLight:r}}var XC=p(82920);const qC=Object.assign((0,u.createContext)({}),{displayName:"BlockSettingsContext"});function rs(){return(0,u.useContext)(qC)}const Ew="settings";function wh(e){return t=>{const s=XC.forwardRef((o,r)=>{const a=rs(),i={...o,[e??Ew]:a};return(0,n.jsx)(t,{...i,ref:r})});return s.displayName=`withBlockSettings(${t.displayName||t.name})`,s}}function js(){const e=De(),t=rs(),s=Eo(),o=Tn(),r=Bt();if(t==null)return null;const a=r?Eh(r.family,r.variant):{},i=iw({effectiveBackgroundType:o,blockBackgroundColor:t.backgroundColor,familyBackgroundColor:s?.backgroundColor,courseBackgroundColor:e?.theme?.blockBackgroundColor,blockTypeFallbackColor:a.backgroundColor,settingsBackgroundColor:t.backgroundColor}),c={...t,backgroundType:o,backgroundColor:i};return Yj(c)}const jw="backgroundColor";function ww(e){return t=>{const s=XC.forwardRef((o,r)=>{const a=js(),i={...o,[e??jw]:a};return(0,n.jsx)(t,{ref:r,...i})});return s.displayName=`withBackgroundColor(${t.displayName||t.name})`,s}}function Ah({children:e,...t}){const s=Bt(),o=rs(),r=gi(),a=(0,u.useMemo)(()=>{const i=s==null?t:Xj(s.family,s.variant,t);return{courseColor:r,...o,...i}},[s,t,r,o]);return(0,n.jsx)(qC.Provider,{value:a,children:e})}const Ln={get isInstantLink(){return!!window.InstantLinks?.publicId}};var Aw=p(46505);const $=(0,Aw.setup)({el:"__",mod:"--",modValue:"-"});var bl=p(82920);const It=$("curtain"),Rw={curtainLoading:"Your content is loading.",curtainOffline:"Your computer is offline.",curtainOfflineReconnecting:"Attempting to reconnect\u2026",curtainSessionTimedOut:"Your session has timed out.",curtainSessionTimedOutRefresh:"Refresh",curtainSessionTimedOutRestart:"Click refresh to restart your session.",curtainSomethingWrong:"Something went wrong.",curtainSomethingWrongRefresh:"Refresh",curtainSomethingWrongTryAgain:"Click to refresh and try again."},Pw=({labels:e,loadingText:t,showHeader:s,status:o})=>{const r={...Rw,...e},[a,i]=bl.useState(!1),c=()=>i(!0),l=bl.useRef(null);return bl.useEffect(()=>(l.current=setTimeout(c,1e4),()=>{l.current&&clearTimeout(l.current)}),[]),bl.useEffect(()=>{if(o==="error"){const d=new Error("There was a socket connection error. The renderReconnect curtain was displayed");sL.yf.logger.info(d.message,d)}},[o]),o==="fatalError"?(0,n.jsx)(Ow,{labelCurtainSomethingWrong:r.curtainSomethingWrong,labelCurtainSomethingWrongRefresh:r.curtainSomethingWrongRefresh,labelCurtainSomethingWrongTryAgain:r.curtainSomethingWrongTryAgain,showHeader:s}):o==="error"&&a?(0,n.jsx)(Dw,{labelCurtainSessionTimedOut:r.curtainSessionTimedOut,labelCurtainSessionTimedOutRefresh:r.curtainSessionTimedOutRefresh,labelCurtainSessionTimedOutRestart:r.curtainSessionTimedOutRestart,showHeader:s}):o==="error"?(0,n.jsx)(Bw,{labelCurtainOffline:r.curtainOffline,labelCurtainOfflineReconnecting:r.curtainOfflineReconnecting,showHeader:s}):(0,n.jsx)(Mw,{labelCurtainLoading:r.curtainLoading,showHeader:s,text:t})},JC=()=>window.location.reload(),Mw=({labelCurtainLoading:e,showHeader:t,text:s})=>(0,n.jsx)("div",{className:It("container",{"show-header":t}),children:(0,n.jsxs)("div",{className:It(),children:[(0,n.jsx)("div",{className:It("spinner")}),(0,n.jsx)("div",{className:It("text"),children:s||e})]})}),Ow=({labelCurtainSomethingWrong:e,labelCurtainSomethingWrongRefresh:t,labelCurtainSomethingWrongTryAgain:s,showHeader:o})=>(0,n.jsx)("div",{className:It("container",{"show-header":o}),children:(0,n.jsxs)("div",{className:It(),children:[(0,n.jsx)("div",{className:It("title"),children:e}),(0,n.jsx)("div",{className:It("description"),children:s}),(0,n.jsx)("button",{className:It("button"),onClick:JC,type:"button",children:t})]})}),Bw=({labelCurtainOffline:e,labelCurtainOfflineReconnecting:t,showHeader:s})=>(0,n.jsx)("div",{className:It("container",{"show-header":s}),children:(0,n.jsxs)("div",{className:It(),children:[(0,n.jsx)("div",{className:It("spinner",{reconnect:!0})}),(0,n.jsx)("div",{className:It("title"),children:e}),(0,n.jsx)("div",{className:It("description"),children:t})]})}),Dw=({labelCurtainSessionTimedOut:e,labelCurtainSessionTimedOutRefresh:t,labelCurtainSessionTimedOutRestart:s,showHeader:o})=>(0,n.jsx)("div",{className:It("container",{"show-header":o}),children:(0,n.jsxs)("div",{className:It(),children:[(0,n.jsx)("div",{className:It("title"),children:e}),(0,n.jsx)("div",{className:It("description"),children:s}),(0,n.jsx)("button",{className:It("button"),onClick:JC,type:"button",children:t})]})}),e2=Pw;var t2=p(74512),Fw=p(10489),Hw=p(91902),$w=p(96545),Vw=p(92529),zw=p(92937),Uw=p(66039),_w=p(64246),Gw=p(40136),Ww=p(64171),Kw=p(63365),Qw=p(79965),Yw=p(56401),Zw=p(90147),Xw=p(39636),qw=p(17534),Jw=p(67234),eA=p(23026),tA=p(60218),sA=p(54666),nA=p(21270),oA=p(94835),rA=p(45635),aA=p(71812),iA=p(28916),cA=p(28054),lA=p(59590),dA=p(14133),uA=p(99841),hA=p(42716),mA=p(29400),fA=p(94043),pA=p(82765),gA=p(7769),vA=p(84404),CA=p(130),xA=p(11413),bA=p(72539),yA=p(96464),TA=p(68687),LA=p(35941),SA=p(15238),kA=p(98446),NA=p(14198),IA=p(23095),EA=p(49951),jA=p(78942),wA=p(33789),AA=p(34133),RA=p(45160),PA=p(73181),MA=p(23561),OA=p(36402),BA=p(9065),DA=p(31444),FA=p(68303),HA=p(78718),$A=p(99881),VA=p(53683),zA=p(69131),UA=p(70473),_A=p(3718),GA=p(9544),WA=p(66307),KA=p(83692),QA=p(62585),YA=p(55424),ZA=p(23007),XA=p(81591),qA=p(20783),JA=p(12461),eR=p(37956),tR=p(69386),sR=p(30304),nR=p(79366),oR=p(76361),rR=p(53419),aR=p(53745),iR=p(51992),cR=p(98414),lR=p(64142),dR=p(79205),uR=p(2545),hR=p(43779),mR=p(72108),fR=p(18558),pR=p(40615),gR=p(56444),vR=p(8240),CR=p(81499),xR=p(69369),bR=p(10934),yR=p(48206),TR=p(66407),LR=p(198),SR=p(67151),kR=p(8917),NR=p(11653),IR=p(56562),s2=p(83176),ER=p(91732),jR=p(2197),wR=p(60689),AR=p(17482),RR=p(88667),PR=p(36108),MR=p(78891),OR=p(29813),BR=p(65663),DR=p(8820),FR=p(37185),HR=p(71656),$R=p(7772),VR=p(77868),zR=p(78387),UR=p(67296),_R=p(60345),GR=p(17438),WR=p(98312),KR=p(99717),QR=p(12478),YR=p(81163),ZR=p(2585),XR=p(82669),qR=p(71386),JR=p(47932),eP=p(97493),tP=p(40908),sP=p(26854),nP=p(42300),oP=p(12241),rP=p(12615),aP=p(47519),iP=p(35739),cP=p(90300),lP=p(76595),dP=p(35359),uP=p(79963),hP=p(53765),mP=p(43237),fP=p(39143),pP=p(72314),gP=p(42692),vP=p(39729),CP=p(58513),xP=p(69554),bP=p(95970),yP=p(8848),TP=p(90113),LP=p(33750),SP=p(35926),kP=p(24443),NP=p(37116),IP=p(88552),EP=p(15081),n2=p(3331),jP=p(1177),wP=p(81538),AP=p(22400),RP=p(2120),PP=p(70626),MP=p(47556),OP=p(89509),BP=p(69545),DP=p(18445),FP=p(47230),HP=p(80883),$P=p(92434),VP=p(27397),zP=p(87423),UP=p(69112),_P=p(976),GP=p(82386),WP=p(30466),KP=p(21258),QP=p(34265),YP=p(93085),ZP=p(9554),XP=p(65039),qP=p(30325),JP=p(73541),eM=p(54674),tM=p(26371),sM=p(8791),nM=p(77145),oM=p(16918),rM=p(25543),aM=p(24108),iM=p(24618);const cM={prefix:"fab",iconName:"rise-com",icon:[512,512,[],"e001","M248 3.34C111 3.34 0 114 0 252c0 137 111 248 248 248 137 0 248-111 248-248-.457-137-112-248-248-248zm0 421c-75.4 0-139-48-163-116l326 0c-23.8 67.7-88.2 116-163 116z"]},lM={prefix:"fab",iconName:"reach",icon:[182,182,[],"e001",["M181.97 99.3826C136.326 99.3826 99.3497 136.325 99.3497 181.926H35.1699C35.1699 100.912 100.881 35.2632 181.97 35.2632V99.3826Z","M41.5029 82.9278C64.4243 82.9278 83.0058 64.3638 83.0058 41.4639C83.0058 18.564 64.4243 0 41.5029 0C18.5815 0 0 18.564 0 41.4639C0 64.3638 18.5815 82.9278 41.5029 82.9278Z"]]},dM={prefix:"fab",iconName:"audio-plus",icon:[20,20,[],"e001","M1.5 8.75C1.5 8.34375 1.8125 8 2.25 8C2.65625 8 3 8.34375 3 8.75V10C3 12.2188 4.78125 14 7 14C7.71875 14 8.40625 13.8125 9 13.4688C9 13.5 9 13.5 9 13.5C9 14.0625 9.0625 14.5625 9.21875 15.0625C8.75 15.25 8.25 15.4062 7.75 15.4688V16.5H9.25C9.65625 16.5 10 16.8438 10 17.25C10 17.6875 9.65625 18 9.25 18H7H4.75C4.3125 18 4 17.6875 4 17.25C4 16.8438 4.3125 16.5 4.75 16.5H6.25V15.4688C3.5625 15.0938 1.5 12.8125 1.5 10V8.75ZM4 5C4 3.34375 5.34375 2 7 2C8.65625 2 10 3.34375 10 5V10C10 10.125 9.96875 10.25 9.96875 10.375C9.625 10.875 9.34375 11.4375 9.1875 12.0625C8.625 12.6562 7.84375 13 7 13C5.34375 13 4 11.6562 4 10V5ZM5.5 5V10C5.5 10.8438 6.15625 11.5 7 11.5C7.8125 11.5 8.5 10.8438 8.5 10V5C8.5 4.1875 7.8125 3.5 7 3.5C6.15625 3.5 5.5 4.1875 5.5 5ZM10 13.5C10 11.0312 12 9 14.5 9C16.9688 9 19 11.0312 19 13.5C19 16 16.9688 18 14.5 18C12 18 10 16 10 13.5ZM11 8.75C11 8.34375 11.3125 8 11.75 8C12.0312 8 12.2812 8.1875 12.4062 8.40625C11.875 8.625 11.4062 8.90625 11 9.28125V8.75ZM12 13.5C12 13.7812 12.2188 14 12.5 14H14V15.5C14 15.7812 14.2188 16 14.5 16C14.75 16 15 15.7812 15 15.5V14H16.5C16.75 14 17 13.7812 17 13.5C17 13.25 16.75 13 16.5 13H15V11.5C15 11.25 14.75 11 14.5 11C14.2188 11 14 11.25 14 11.5V13H12.5C12.2188 13 12 13.25 12 13.5Z"]},uM={prefix:"fab",iconName:"clone-plus",icon:[20,20,[],"e001","M4 16H11V14.5H13V16C13 17.1031 12.1031 18 11 18H4C2.89688 18 2 17.1031 2 16V9C2 7.89687 2.89688 7 4 7H5.5V9H4V16ZM7 11V4C7 2.89688 7.89687 2 9 2H16C17.1031 2 18 2.89688 18 4V11C18 12.1031 17.1031 13 16 13H9C7.89687 13 7 12.1031 7 11ZM12.5 4.5C12.0844 4.5 11.75 4.83437 11.75 5.25V6.75H10.25C9.83437 6.75 9.5 7.08437 9.5 7.5C9.5 7.91563 9.83437 8.25 10.25 8.25H11.75V9.75C11.75 10.1656 12.0844 10.5 12.5 10.5C12.9156 10.5 13.25 10.1656 13.25 9.75V8.25H14.75C15.1656 8.25 15.5 7.91563 15.5 7.5C15.5 7.08437 15.1656 6.75 14.75 6.75H13.25V5.25C13.25 4.83437 12.9156 4.5 12.5 4.5Z"]},hM={prefix:"fab",iconName:"flask-outline",icon:[20,20,[],"e001","M6 2.75C6 2.34375 6.34375 2 6.75 2H13.25C13.6562 2 14 2.34375 14 2.75C14 3.15625 13.6562 3.5 13.25 3.5H13V8.8125L16.7812 15.4062C16.9375 15.6562 17 15.9688 17 16.25C17 17.2188 16.2188 18 15.25 18H4.75C3.78125 18 3 17.2188 3 16.25C3 15.9688 3.09375 15.6562 3.21875 15.4062L7 8.8125V3.5H6.75C6.34375 3.5 6 3.15625 6 2.75ZM8.5 3.5V9C8.5 9.125 8.46875 9.25 8.40625 9.375L7.1875 11.5H12.8125L11.5938 9.375C11.5312 9.25 11.5 9.125 11.5 9V3.5H8.5ZM6.34375 13L4.53125 16.1562C4.5 16.1875 4.5 16.2188 4.5 16.25C4.5 16.4062 4.59375 16.5 4.75 16.5H15.25C15.4062 16.5 15.5 16.4062 15.5 16.25C15.5 16.2188 15.5 16.1875 15.4688 16.1562L13.6875 13H6.34375Z"]},mM={prefix:"fas",iconName:"language",icon:[640,640,[],"f1ab","M192 64C209.7 64 224 78.3 224 96L224 128L352 128C369.7 128 384 142.3 384 160C384 177.7 369.7 192 352 192L342.4 192L334 215.1C317.6 260.3 292.9 301.6 261.8 337.1C276 345.9 290.8 353.7 306.2 360.6L356.6 383L418.8 243C423.9 231.4 435.4 224 448 224C460.6 224 472.1 231.4 477.2 243L605.2 531C612.4 547.2 605.1 566.1 589 573.2C572.9 580.3 553.9 573.1 546.8 557L526.8 512L369.3 512L349.3 557C342.1 573.2 323.2 580.4 307.1 573.2C291 566 283.7 547.1 290.9 531L330.7 441.5L280.3 419.1C257.3 408.9 235.3 396.7 214.5 382.7C193.2 399.9 169.9 414.9 145 427.4L110.3 444.6C94.5 452.5 75.3 446.1 67.4 430.3C59.5 414.5 65.9 395.3 81.7 387.4L116.2 370.1C132.5 361.9 148 352.4 162.6 341.8C148.8 329.1 135.8 315.4 123.7 300.9L113.6 288.7C102.3 275.1 104.1 254.9 117.7 243.6C131.3 232.3 151.5 234.1 162.8 247.7L173 259.9C184.5 273.8 197.1 286.7 210.4 298.6C237.9 268.2 259.6 232.5 273.9 193.2L274.4 192L64.1 192C46.3 192 32 177.7 32 160C32 142.3 46.3 128 64 128L160 128L160 96C160 78.3 174.3 64 192 64zM448 334.8L397.7 448L498.3 448L448 334.8z"]},fM={"alert-circle-solid":YA.lE,"alert-circle":s2.lE,"alert-diamond":UR.xG,"angle-right":tR.vm,"arrow-down-from-line":nR.xZ,"arrow-down-to-bracket":oR.a_,"arrow-down-to-line":rR.yH,"arrow-down":sR.B0,"arrow-left":aR.Ce,"arrow-right-from-line":cR.Pe,"arrow-right":iR.dm,"arrow-rotate-left-light":qw.V3,"arrow-rotate-left":lR.V3,"arrow-up-from-bracket":uR.MN,"arrow-up-from-line":hR.s8,"arrow-up-right-from-square":mR.faArrowUpRightFromSquare,"arrow-up":dR.IN,"arrows-two-from-center":Fw.A1,"arrows-two-to-center":Hw.hL,"badge-check":yA.Zs,"bar-chart":fR.X8,bars:TA.ck,"bars-regular":pR.ck,"block-selector":XA.iH,"book-open":vR.Re,"book-sparkles":CR.E4,book:gR.LB,"browser-light":zw.c9,browser:xR.c9,building:$w.UR,"building-regular":Vw.UR,"cards-blank":bR.Xm,"caret-down":SA.xB,"caret-right":kA.fU,"chart-column":bA.q9,"check-regular":JA.e6,check:LA.e6,"chevron-down-solid":NA.Jt,"chevron-down":yR.Jt,"chevron-left-light":Uw.Wz,"chevron-left-solid":EA.Wz,"chevron-left":TR.Wz,"chevron-right-light":_w.Xk,"chevron-right-solid":jA.Xk,"chevron-right":LR.Xk,"chevron-up-solid":IA.w2,"chevron-up":SR.w2,"circle-arrow-right":RA.Ni,"circle-arrow-up":AA.yi,"circle-check-regular":NR.QR,"circle-check-solid":PA.QR,"circle-check":dA.QR,"circle-dot":IR.pp,"circle-half-stroke":ER.B2,"circle-exclamation":s2.lE,"circle-info":jR.faCircleInfo,"circle-notch":RR.s4,"circle-plus-duotone":uA.q_,"circle-plus-regular":wR.q_,"circle-plus":MA.q_,"circle-small-solid":OA.ZP,"circle-small":AR.ZP,"circle-solid":wA.GE,"circle-x":BA.Ub,"circle-xmark":PR.bn,"circle-xmark-solid":DA.bn,"circle-xmark-duotone":hA.bn,circle:kR.GE,"clipboard-list-check":MR.S3,"clock-rotate-left":OR.Yj,clone:DR.$3,close:FR.yY,"closed-captioning":BR.UM,"code-fork-duotone":mA.zt,"code-fork-regular":HR.zt,code:aM.jT,comment:$R.DN,copy:VR.jP,crop:zR.K1,"edit-regular":_R.MT,"ellipsis-regular":GR.Dw,"ellipsis-vertical-regular":WR.nx,envelope:KR.y_,"external-link":QR.vM,"eye-slash":Ww.k6,eye:Gw.pS,"face-anguished":Jw.xX,"face-anguished-regular":eA.xX,"face-frown":tA.Ho,"face-frown-regular":sA.Ho,"face-grin-regular":nA.pj,"face-laugh":oA.ou,"face-laugh-regular":rA.ou,"face-meh":aA.Lz,"face-meh-regular":iA.Lz,"face-smile":cA.H8,"face-smile-regular":lA.H8,"file-audio":ZR.qe,"file-duotone":fA.A4,"file-export-light":Qw.o1,"file-export":XR.o1,"file-import":qR.$M,"file-lines":JR.bL,"file-pdf-light":Kw.O_,"file-pdf":eP.O_,file:YR.A4,"folder-image":tP.JK,"folder-open":pA.Uj,gear:sP.BH,globe:nP.Bw,"graduation-cap":oP.eS,"grid-2":rP.Qy,"grid-solid":FA.Qy,"grip-dots-vertical":aP.IM,"hand-pointer":iP.A8,"image-landscape":lP.oC,"image-portrait":dP.E4,image:cP.jb,"photo-film":uP._Z,"info-circle":hP.iW,"layers-solid":QA.qI,"link-simple-slash":pP.r2,"link-simple":fP.wi,"link-slash":gP.TH,link:mP.CQ,list:vP.IT,"list-check":CP.UN,"location-dot":Zw.gK,"lock-keyhole-light":Yw.Yp,lock:HA.DW,"magnifying-glass-plus":bP.bM,"magnifying-glass":xP.$U,megaphone:ZA.OR,"message-quote":yP.ps,"minus-solid":$A.EZ,minus:TP.EZ,paintbrush:gA.ue,palette:LP.fy,paste:SP.R9,pause:kP.G1,"pause-solid":VA.G1,"pen-line":NP.pg,"pen-nib":EP.us,"pen-to-square":IP.faPenToSquare,"pencil-duotone":vA.zL,"pencil-regular":eR.zL,"pencil-thin":iM.zL,pencil:Xw.zL,"play-regular":n2.ij,"play-solid":zA.ij,play:n2.ij,"plus-regular":jP.QL,plus:wP.TS,"quote-left":AP.$7,"rectangle-history-circle-plus":PP.Hu,"rectangle-regular":RP.vt,"rectangle-vertical-history":MP.Lt,rocket:OP.KM,"ruler-horizontal":BP.Si,"ruler-triangle":DP.cb,"sliders-simple":UA.AD,"sparkles-solid":_A.p7,sparkles:FP.p7,"spinner-third":HP.sq,"square-arrow-down":VP.Y1,"square-arrow-right":zP.mT,"square-arrow-up-right":UP.fL,"square-check-solid":GA.Dn,"square-check":_P.Dn,"square-duo":CA.Nf,"square-info":GP.Lg,"square-plus":WP.Vd,square:$P.Nf,"stopwatch-regular":KP.nw,table:QP.w9,tag:YP._2,text:ZP.jw,"trash-can":qP.sj,trash:XP.yL,"user-group":WA.US,"users-regular":JP.gd,users:xA.gd,video:eM.n2,volume:tM.eF,volumeHigh:sM.AI,volumeLow:nM.gN,volumeXmark:oM.H_,"wand-magic-sparkles":rM.Ys,"waveform-lines":qA.Wx,xmark:KA.Jy},pM={"audio-plus":dM,"clone-plus":uM,"flask-outline":hM,language:mM,reach:lM,"rise-com":cM},ie=(0,u.memo)(function({"aria-label":t,className:s,classNameIcon:o,color:r,"data-testid":a,name:i,rotation:c,spin:l,style:d,styleIcon:h}){return(0,n.jsx)("span",{className:s,"data-testid":a,style:{color:r,...d},children:(0,n.jsx)(t2.g,{"aria-label":t,className:o,icon:fM[i],rotation:c,spin:l,style:h})})}),_de=(0,u.memo)(function({className:t,classNameIcon:s,color:o,name:r,style:a,styleIcon:i}){return(0,n.jsx)("span",{className:t,style:{color:o,...a},children:(0,n.jsx)(t2.g,{className:s,icon:pM[r],style:i})})}),gM=({value:e,fallback:t})=>{const s=Ae(e),o=Pt(e);return t?(0,n.jsx)("span",{"data-l10n-id":o,children:s||t}):(0,n.jsx)("span",{"data-l10n-id":o,children:s})};function vM({value:e,children:t}){const s=Ae(e);return t(s)}const gs=gM,o2=new Intl.DisplayNames(["en"],{type:"language",fallback:"code"}),CM=(e,t)=>{const s=e?.toLowerCase();try{return t?.[s]?.authorDisplayName??o2.of(e)}catch(o){return console.warn(`Language ${e} invalid`,o),e}},xM=(e,t)=>{try{return t?.[e]?.learnerDisplayName??o2.of(e)}catch(s){return console.warn(`Language ${e} invalid`,s),e}},Rh=()=>{const e=Jr(),t=K0(e);return(0,u.useCallback)(o=>CM(o,t),[t])},bM=()=>{const e=Jr(),t=K0(e);return(0,u.useCallback)(o=>xM(o,t),[t])};var yM=p(27526);function as(e){const{to:t,children:s}=e,o=(0,we.zy)(),r=(0,u.useMemo)(()=>Zu(t,o),[o,t]);return(0,n.jsx)(we.N_,{...e,to:r,children:s})}function TM({children:e,locale:t,...s}){const o=(0,we.zy)(),r=nn(),a=(0,u.useMemo)(()=>{const i=t===r?"":t,c=new URLSearchParams(o.search);return c.set("locale",i),o.pathname+"?"+c.toString()+o.hash},[r,t,o]);return(0,n.jsx)(as,{...s,to:a,children:e})}var Sn=p(63572),LM=p(21208),yl=p.n(LM);const SM={keys:["End"],keyCode:Sn.KEY_END},kM={keys:["Enter"],keyCode:Sn.KEY_RETURN},NM={keys:["Home"],keyCode:Sn.KEY_HOME},IM={keys:["Tab"],keyCode:Sn.KEY_TAB},EM={keys:[" "],keyCode:Sn.KEY_SPACE},jM={keys:["Escape","Esc"],keyCode:Sn.KEY_ESCAPE},wM={keys:["ArrowUp"],keyCode:Sn.KEY_UP},AM={keys:["ArrowDown"],keyCode:Sn.KEY_DOWN},RM={keys:["ArrowLeft"],keyCode:Sn.KEY_LEFT},PM={keys:["ArrowRight"],keyCode:Sn.KEY_RIGHT},kn=({keyCode:e,keys:t})=>s=>s.keyCode?s.keyCode===e:Co()(s.key,t),MM=e=>e.altKey||e.ctrlKey||e.metaKey,r2=kn(SM),la=kn(kM),a2=kn(NM),Tl=kn(IM),Ph=kn(EM),vs=kn(jM),pr=kn(wM),gr=kn(AM),Kn=kn(RM),Qn=kn(PM),ki=xo()(Ph,la),Gde=xo()(Tl,la),OM=xo()(Qn,pr),BM=xo()(Kn,gr),DM=xo()(pr,gr),i2=po()(ki),c2=25,FM=yl()((e,t)=>{e.scrollTop!==0&&(t.preventDefault(),e.scrollTop-=c2)}),HM=yl()((e,t,s)=>{t&&(s.preventDefault(),e.scrollTop+=c2)}),$M=(e,t)=>s=>{const o=HM(e,t),r=FM(e);fs()([[gr,o],[pr,r]])(s)},Nn=$("locales-dropdown"),VM=({backToStackCourseId:e,currentLocale:t,defaultLocale:s,locales:o,message:r,onChange:a,optionType:i,showMessageIndicator:c})=>{const l=(0,u.useRef)(null),d=(0,u.useRef)(null),[h,m]=(0,u.useState)(!1),[f,v]=(0,u.useState)(!1),C=(0,u.useMemo)(()=>o.filter(y=>y.localeCode!==s),[s,o]),g=(0,u.useMemo)(()=>o.find(y=>y.localeCode===s),[s,o]),x=(0,u.useMemo)(()=>o.find(y=>y.localeCode===t),[t,o]);(0,u.useLayoutEffect)(()=>{h&&f&&(l.current?.querySelector(`[data-locale="${t}"]`)?.focus(),v(!1))},[h,f,t]),(0,u.useEffect)(()=>{const y=S=>{vs(S)&&(d.current?.focus(),m(!1)),Tl(S)&&setTimeout(()=>{l.current.contains(document.activeElement)||m(!1)},0)};return h&&document.addEventListener("keydown",y),()=>{document.removeEventListener("keydown",y)}},[h]);const b=(0,u.useCallback)(y=>{!h&&document.activeElement===y.currentTarget&&v(!0),m(!h)},[h]),T=(0,u.useCallback)(y=>{h&&!d.current?.contains(y?.target)&&m(!1)},[h]);(0,yM.A)(l,T),(0,u.useEffect)(()=>{const y=()=>setTimeout(()=>{document.activeElement.tagName==="IFRAME"&&T()},0);return window.addEventListener("blur",y),()=>window.removeEventListener("blur",y)},[T]);const L=(0,u.useCallback)(y=>{document.activeElement===y.currentTarget&&d.current?.focus(),m(!1),a?.(y.currentTarget.getAttribute("data-locale"))},[a]);return(0,n.jsxs)("div",{className:Nn({isOpen:h}),children:[(0,n.jsx)("div",{className:Nn("trigger-wrap"),children:(0,n.jsxs)("button",{className:Nn("trigger"),onClick:b,ref:d,type:"button",children:[c&&(0,n.jsx)("div",{className:Nn("message-indicator")}),(0,n.jsx)(ie,{name:"globe"}),x.displayName,(0,n.jsx)(ie,{name:"chevron-down"})]})}),(0,n.jsxs)("div",{className:Nn("contents"),ref:l,children:[r,(0,n.jsx)("div",{className:Nn("grouping-header"),children:"Source"}),(0,n.jsx)(l2,{checked:s===t,locale:g,onClick:L,type:i}),(0,n.jsx)("div",{className:Nn("grouping-header"),children:"Translations"}),C.map(y=>(0,n.jsx)(l2,{checked:y.localeCode===t,locale:y,onClick:L,type:i},y.localeCode)),e&&(0,n.jsx)("a",{className:Nn("stack-button"),href:`/manage/locales/${e}`,children:"Back to Stack"})]})]})},l2=({checked:e,locale:t,onClick:s,type:o})=>o==="link"?(0,n.jsx)(TM,{className:Nn("option",{checked:e}),"data-locale":t.localeCode,locale:t.localeCode,onClick:s,children:t.displayName},t.localeCode):(0,n.jsx)("button",{className:Nn("option",{checked:e}),"data-locale":t.localeCode,onClick:s,type:"button",children:t.displayName},t.localeCode),zM=({hideBackToStack:e,...t})=>{const s=De(),{currentLocale:o}=it(),r=sl(),a=nn(),i=Rh(),c=e?void 0:s?.id,l=(0,u.useMemo)(()=>r.map(d=>({localeCode:d.locale,displayName:i(d.locale)})),[i,r]);return(0,n.jsx)(VM,{backToStackCourseId:c,currentLocale:o,defaultLocale:a,locales:l,optionType:"link",...t})},d2=window.location.origin,UM=1e3,_M="course:ready",u2="localizedSharePreview:ready",GM="preview:selectLocale",Mh="localizedSharePreview:toggleCurtain",h2="localizedSharePreview:togglePreview",cn=$("localized-share-preview"),da=!!window.frameElement,m2=e=>(0,Qt.HX)(e)&&bg(),WM=e=>m2(e)&&!da,KM=(e,t)=>window.parent?.postMessage({type:e,data:t});let f2=null;const QM=({children:e,localesDropdown:t,title:s})=>(0,n.jsxs)("div",{className:cn("header"),dir:"ltr",children:[(0,n.jsxs)("div",{className:cn("header-title-dropdowns"),children:[(0,n.jsx)("div",{className:cn("header-title"),children:(0,n.jsx)("span",{className:cn("header-title-text"),children:(0,n.jsx)(gs,{value:s})})}),t&&(0,n.jsx)("div",{className:cn("header-dropdowns"),children:t})]}),(0,n.jsx)("div",{className:cn("header-btn-group"),children:e})]}),YM=({children:e,className:t,disabled:s=!1,onClick:o})=>(0,n.jsx)("button",{className:["button button--default button--header-done",t,s?"button--disabled":void 0].filter(Boolean).join(" "),disabled:s,onClick:o,style:{fontSize:"1.4rem",fontWeight:600,letterSpacing:0,textTransform:"none"},type:"button",children:e}),ZM=({children:e})=>{const t=ct(),s=es(),o=(0,we.zy)(),{currentLocale:r,setCurrentLocale:a}=it(),i=nn(),c=AI(),l=re(),h=!!(l&&"hasPassword"in l?l.hasPassword:void 0)||yg(),m=(0,u.useRef)(null),[f,v]=(0,u.useState)(!1),[C,g]=(0,u.useState)(!1),[x,b]=(0,u.useState)(!h),T=(0,u.useMemo)(()=>{const O=new URLSearchParams(window.location.search),R=new URLSearchParams;for(const M of["from"])O.has(M)&&R.set(M,O.get(M));const P=R.toString();return`${d2}/share/${window.shareId}${P?`?${P}`:""}#/?locale=${r}`},[]),[L,y]=(0,u.useState)(null),[S,k]=(0,u.useState)(r),[N,I]=(0,u.useState)(!1),[w,A]=(0,u.useState)(!da),E=(O,R)=>m.current?.contentWindow.postMessage({type:O,data:R});(0,u.useEffect)(()=>{da||E(GM,r)},[r]),(0,u.useEffect)(()=>{da&&(KM(u2),setTimeout(()=>I(!0),0))},[]),(0,u.useEffect)(()=>{const O=R=>{if(R.origin!==d2)return;const M=R.data?.type,H=R.data?.data;if(da)switch(M){case Mh:{A(H);break}case h2:{H?(k(r),y(o),t(B0(!0)),a(i),s("/",{replace:!0})):(t(B0(!1)),a(S),s(L.pathname+L.search+L.hash||"/",{replace:!0})),document.querySelector(".cover")?.scrollTo(0,0),document.querySelector(".page-wrap")?.scrollTo(0,0);break}}else switch(M){case _M:{A(!1);break}case u2:{b(!0);break}}};return window.addEventListener("message",O),()=>{window.removeEventListener("message",O)}},[i,t,s,r,o,S,L,a]);const j=(0,u.useCallback)(()=>{const O=!f;clearTimeout(f2),g(!0),E(Mh,!0),f2=setTimeout(()=>{g(!1),E(Mh,!1),v(O)},UM),setTimeout(()=>{E(h2,O)},0)},[f]);return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("div",{className:cn("curtain",{hide:!w}),children:(0,n.jsx)(e2,{status:"loading"})}),da?N&&e:(0,n.jsxs)("div",{className:cn(),children:[x&&(0,n.jsx)(QM,{localesDropdown:!f&&!C&&(0,n.jsx)(zM,{hideBackToStack:!0}),title:c,children:(0,n.jsx)(YM,{className:cn("preview-button"),disabled:C,onClick:j,children:f?"Close Learner Preview":(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(ie,{className:cn("preview-button-icon"),name:"play-regular"}),"Preview as Learner"]})})}),(0,n.jsx)("iframe",{allowFullScreen:!0,"aria-label":"Course preview",className:cn("iframe"),ref:m,src:T})]})]})},XM=(0,u.lazy)(()=>p.e("_b106").then(p.t.bind(p,63744,23))),qM=({children:e})=>{const t=re(),{setCurrentLocale:s,currentLocale:o}=it(),r=Ae(t?.title),a=Jr()?.l10n?.languageCodeMetadata??{},i=Object.entries(a).map(([c,l])=>({code:c,learnerDisplayName:l.learnerDisplayName})).sort((c,l)=>c.learnerDisplayName.localeCompare(l.learnerDisplayName));return(0,n.jsx)(u.Suspense,{fallback:null,children:(0,n.jsx)(XM,{courseTitle:r,currentLocale:o,locales:i,setCurrentLocale:s,children:e})})};function JM({children:e}){const t=re();return t&&m2(t)?(0,n.jsx)(ZM,{children:e}):Ln.isInstantLink?(0,n.jsx)(qM,{children:e}):(0,n.jsx)(n.Fragment,{children:e})}const Oh=(0,u.createContext)(void 0);Oh.displayName="RiseComPartnerTrackingContext";function eO({children:e,onTrack:t}){return(0,n.jsx)(Oh.Provider,{value:t,children:e})}function p2(){return(0,u.useContext)(Oh)}var tO=p(24332),sO=p.n(tO),nO=p(53802),oO=p.n(nO);class Yn{static get isChrome(){return!window||!window.navigator?!1:/Chrome/.test(window.navigator.userAgent)&&/Google Inc/.test(window.navigator.vendor)}static get isSafari(){return!window||!window.navigator?!1:/Safari/.test(window.navigator.userAgent)&&/Apple Computer/.test(window.navigator.vendor)&&!/CriOS/.test(window.navigator.userAgent)}static get isIphoneSafari(){if(!window||!window.navigator)return!1;const t=/iPhone|iPod/.test(window.navigator.userAgent)&&!window.MSStream,s=/Safari/.test(window.navigator.userAgent)&&/Apple Computer/.test(window.navigator.vendor),o=/CriOS/.test(window.navigator.userAgent);return t&&s&&!o}static get isSafari9(){if(!window||!window.navigator)return!1;const t=/Safari/.test(window.navigator.userAgent)&&/Apple Computer/.test(window.navigator.vendor),s=/version\/9./i.test(window.navigator.userAgent);return t&&s}static get isIe11(){return!!(window&&Object.hasOwnProperty.call(window,"ActiveXObject")&&!window.ActiveXObject)}static get isEdge(){return!window||!window.navigator?!1:/Edge/.test(window.navigator.userAgent)}static get isMobile(){return!window||!window.navigator?!1:/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)}static get isLocalFilesystem(){return!window||!window.navigator?!1:/file:/.test(window.location.protocol)}static get isFirefox(){return window?.navigator?.userAgent.includes("Firefox")??!1}static get isBrave(){return globalThis?.navigator?typeof globalThis.navigator.brave?.isBrave=="function":!1}static get isChromium(){if(!globalThis?.navigator)return!1;const t=globalThis.navigator.userAgentData?.brands;return t?.length?t.some(({brand:s})=>/Chromium/i.test(s)):/Chrome|CriOS/.test(globalThis.navigator.userAgent)}static get isGoogleChrome(){if(!globalThis?.navigator||this.isBrave)return!1;const t=globalThis.navigator.userAgentData?.brands;if(t?.length)return t.some(({brand:a})=>/Google Chrome/i.test(a));const{userAgent:s,vendor:o}=globalThis.navigator,r=/Edg\/|OPR\/|SamsungBrowser|Vivaldi|Brave/.test(s);return/Chrome/.test(s)&&/Google Inc/.test(o)&&!r}}const rO=Bu()(qs()),g2=e=>t=>`${e}/${t.id}`,aO=(e,t)=>z1()({data:(0,fe.action)(t),method:"POST",url:tL(rO(`/${t}`),Ye()("url"),e),...go()(["headers","withCredentials"],e)}),iO=e=>(t,s)=>I1()(t,g2(s),Bh(e,s)),cO=e=>Nt()(yt()({},["response","data"]),oi()(Ye()("type"),(0,fe.error)(e))),lO=(e,t)=>s=>e.postRequest?e.postRequest(t,s):s,v2=e=>t=>s=>o=>qu(o,aO(t,s),e,Xu()(cO(s),po()(zr()("data"),Ye()("data"))),oO()(Zs()(Ye()("error"),Qo().Rejected,Qo().of)),lO(t,{type:s,payload:o})),dO=({url:e,method:t,data:s,headers:o})=>{if(Yn.isFirefox){const r=new Blob([JSON.stringify(s)],{type:"application/json"}),a=window.navigator.sendBeacon(e,r);return Promise.resolve({type:s.type,payload:{...s.payload,queued:a}})}return fetch(e,{method:t,credentials:"include",headers:{"Content-Type":"application/json",...o},body:JSON.stringify(s),keepalive:!0}).then(r=>r.json()).then(Vr()("data"))},uO=Qo().fromPromise(dO),Bh=D0()(3,v2(ai)),hO=D0()(3,v2(uO)),mO=e=>(t,s)=>sO()(t,g2(s),Bh(e,s)),fO=e=>({debounce:iO(e),send:Bh(e),fetchWithKeepAlive:hO(e),throttle:mO(e)}),pO=`${Ie("RISE_RUNTIME_URI")}/ducks`,gO=fO({headers:()=>({"x-rise-authoring-client":"8461ed8f003bfc38eb0f824a9eb14170d46b5143"}),postRequest:(e,t)=>t,url:pO,withCredentials:!0});var vO=p(5951),CO=p.n(vO);const Zde=CO()({context:{app:{name:"rise-frontend"}},payload:{articulate_user:S9(),userRole:I9(),subId:E9(),subPlan:j9(),subStatus:w9()}}),xO=qs()("rise/track/")("TRACK");var qde;const bO=e=>({...e,context:{locale:navigator.language,device:P1(),channel:A1(),userAgentData:R1(),page:M1(),userAgent:O1(),...e.context}}),yO=(e,t)=>({...e,properties:{...w1(t),...e.properties}}),C2=e=>(t,s)=>{const o=s(),r=Uu();let a=bO(e);return a=yO(a,o),a.userId=a.userId??r,a.author=a.author??r,t(gO.send(xO)(a))};function TO({children:e}){const t=ct(),s=(0,u.useCallback)(o=>t(C2(o)),[t]);return(0,n.jsx)(eO,{onTrack:s,children:e})}var x2,b2,Ll;const y2=(0,u.createContext)({enabled:!0,isActive:!1,onAuthorized:()=>{},onError:()=>{},onSubmitPassword:()=>{},onUnauthorized:()=>{},status:"authorized"});let Jde;function eue(){}function LO(){return(0,u.useContext)(y2)}function SO({children:e}){if(!Ln.isInstantLink)return(0,n.jsx)(n.Fragment,{children:e});const t=void 0;return t==null?(0,n.jsx)(n.Fragment,{children:e}):(0,n.jsx)(u.Suspense,{fallback:null,children:(0,n.jsx)(t,{children:e})})}function tue({children:e,PasswordGate:t}){const s=window.InstantLinks?.isPasswordProtected?.()===!0,[o,r]=b2(),[a,i]=b2(s?"required":"authorized"),c=Ll(()=>{i("authorized")},[]),l=Ll(()=>{i("error")},[]),d=Ll(f=>{r(f),i("validating")},[]),h=Ll(()=>{i("unauthorized")},[]),m=a==="authorized"||a==="validating";return x2(t,{onSubmitPassword:d,status:a,children:x2(y2.Provider,{value:{enabled:m,isActive:!0,onAuthorized:c,onError:l,onSubmitPassword:d,onUnauthorized:h,password:o,status:a},children:e})})}const wo=({id:e="portal",childType:t="other",attributes:s}={})=>{const o=document.querySelector('dialog[open][aria-modal="true"]');let r,a;if(o!=null&&t!=="dialog"?(e=`${e}-dialog`,r=o.querySelector(`#${e}`),a=o):(r=document.querySelector(`#${e}`),a=document.body),r==null&&(r=document.createElement("div"),r.setAttribute("id",e),a.appendChild(r)),s)for(const[i,c]of Object.entries(s))r.setAttribute(i,c);return r},T2=wo();function kO(e){e?e.appendChild(T2):document.body.appendChild(T2)}function NO(e){return function({Default:s,className:o,...r}){const a=`brand--${e}`,i=o?`${o} ${a}`:a;return(0,n.jsx)(s,{...r,className:i})}}const ua=NO("ui"),Dh=e=>e==="<p><br></p>"?"":e,Fh="data-change-path",Hh="data-l10n-id",L2=(e,t)=>{if(e)return t?["l10n","translations",t,e.getAttribute(Hh)]:JSON.parse(e.getAttribute(Fh))};let Zn;const IO=()=>{const e=ha();e&&e.classList.add("selected")},Sl=()=>{ha()&&Zn&&Ni(Zn)},EO=(e,t)=>s=>{const o=document.elementsFromPoint(s.clientX,s.clientY),r=t?o.find(a=>a.getAttribute(Hh)):o.find(a=>a.getAttribute(Fh));r!=null&&(e&&Zn!==r&&(Zn=r,e(L2(r,t))),Ni(r))},jO=(e,t)=>s=>{s.stopPropagation(),s.preventDefault();const o=document.elementsFromPoint(s.clientX,s.clientY),r=t?o.find(a=>a.getAttribute(Hh)):o.find(a=>a.getAttribute(Fh));if(r){Ni(r),k2();const a=L2(r,t);a&&(e(a),IO())}},$h=()=>document.getElementById("target-container"),ha=()=>document.getElementById("target-highlight"),S2=()=>{if($h())return;const t=document.createElement("div");t.classList.add("target-container"),t.id="target-container",document.body.appendChild(t);const s=document.createElement("div");s.classList.add("target-highlight"),s.id="target-highlight",t.appendChild(s)},k2=()=>{const e=ha();e&&e.classList.add("selected")},wO=({top:e,left:t,width:s,height:o})=>{const r=document.querySelector("[data-page=true]")?.getBoundingClientRect().width??window.innerWidth-20;return s<r&&(e=e-10,o=o+20,t=t-20,s=s+40),{top:e,left:t,width:s,height:o}},Ni=e=>{const{top:t,left:s,width:o,height:r}=wO(e.getBoundingClientRect()),a=ha();a&&(e!==Zn&&a.classList.contains("selected")&&a.classList.remove("selected"),a.classList.add("active"),Object.assign(a.style,{top:`${t}px`,left:`${s}px`,width:`${o}px`,height:`${r}px`}),Zn=e)},AO=()=>{window.removeEventListener("scroll",Sl,{capture:!0}),kl()},kl=()=>{ha()?.classList?.remove("active"),ha()?.classList?.remove("selected")};let ma,Nl;const RO=({locale:e})=>({isActive:t},s)=>{const o=!!$h();if(t){if(ma)return ma;S2();const r=EO(s,e);let a;return ma=new Promise((i,c)=>{a=jO(i,e),Nl=c,document.body.classList.add("target-mode"),window.addEventListener("mousemove",r,!0),window.addEventListener("click",a,!0),window.addEventListener("resize",kl,!0),window.addEventListener("scroll",Sl,!0)}).finally(()=>{ma=null,Nl=null,document.body.classList.remove("target-mode"),window.removeEventListener("mousemove",r,!0),window.removeEventListener("click",a,!0),window.removeEventListener("resize",kl,!0),window.removeEventListener("scroll",Sl,!0)}),ma}else kl(),$h()?.remove(),Zn=null;return o&&Nl!=null&&Nl(new Error("cancelled")),Promise.resolve()},PO=e=>{let t=e.findIndex(s=>s==="items");return t===-1?e:e.slice(0,t+2)},N2=e=>{const t=(0,Dr.Ce)(e);return t?t.type==="translation"||t.type==="caption"&&t.l10nId?document.querySelector(`[data-l10n-id='${t.l10nId}']`)??document.querySelector(`[data-l10n-id*='${t.l10nId}']`):document.querySelector(`[data-change-path='${JSON.stringify(PO(e))}']`):null},MO=e=>{S2(),window.addEventListener("scroll",Sl,{capture:!0}),document.body.classList.add("target-mode");const t=N2(e);t&&Ni(t)},OO=e=>{if(!ma)return;const t=N2(e);t&&(Zn!==t&&(Zn=t),Ni(t),k2(),t.scrollIntoView({behavior:"smooth",block:"center"}))},BO=e=>["course",e],I2=(e,t)=>["lessons",{id:e},t],DO=(e,t)=>[...I2(e,"items"),{id:t}],fa=e=>JSON.stringify(BO(e)),E2=(e,t)=>JSON.stringify(I2(e,t)),FO=(e,t)=>JSON.stringify(DO(e,t)),Cs={STATUS:"targetMode:status",TOGGLE:"targetMode:toggle",FOCUS:"targetMode:focus",CLEAR:"targetMode:clear",SELECTED:"targetMode:selected",HOVERED:"targetMode:hovered",TRANSLATION_HOVERED:"targetMode:translationHovered",TRANSLATION_HOVER_CLEAR:"targetMode:translationHoverClear"},pa=(e,t)=>{const s={};for(let o=0;o<e.length;o++){const r=e[o];if(typeof r=="object"&&r.id){const a=e[o-1],i=a==="items"?t.shift():a.replace(/s$/,"");s[`${i??"item"}Id`]=r.id}}return s};function Vh(e,t){const s=(0,u.useMemo)(()=>matchMedia(`(${e}: ${t*.0625}em)`),[e,t]),[o,r]=(0,u.useState)(s.matches);return(0,u.useEffect)(()=>{const a=s.addEventListener??s.addListener,i=s.removeEventListener??s.removeListener;return a.call(s,"change",c),()=>i.call(s,"change",c);function c(){r(s.matches)}},[s]),o}const HO="matches";function $O(e,t,s,o="withPxToEmMedia"){return r=>{function a(i){const c=Vh(e,t);return(0,n.jsx)(r,{...i,[s??HO]:c})}return a.displayName=`${o}(${r.displayName||r.name})`,a}}function Et(e){return Vh("max-width",e-1)}function sue(e){return Vh("min-width",e)}function VO(e,t,s){return $O("min-width",e,t,s)}const zO=()=>Et(1200),UO=()=>Et(768),zh=()=>Et(480),Uh=$("cover");function _O(e,t,s){return e===1?t:s}function GO(){const e=yC(),t=be(),s=_O(e,t?.coverLesson||"Lesson",t?.coverLessons||"Lessons");return(0,n.jsxs)("li",{className:Uh("num-lessons"),role:"listitem",children:[(0,n.jsx)("span",{className:Uh("num-lessons-value"),children:e}),"\xA0",(0,n.jsx)("span",{className:Uh("num-lessons-units"),children:s})]})}var WO=p(39031),ln=p.n(WO);const KO=36e5,_h=$("cover");function QO(e){return Math.round(10*e)/10}function j2(e,t,s){return e===1?t:s}function YO(){const{showTimeToComplete:e,timeToComplete:t}=re(),s=be();if(!e)return null;const o=Number(t)>=KO,r=o?QO(ln().duration(t).asHours()):ln().duration(t).asMinutes(),a=o?j2(r,s?.coverHour||"Hour",s?.coverHours||"Hours"):j2(r,s?.coverMinute||"Minute",s?.coverMinutes||"Minutes");return(0,n.jsxs)("li",{className:_h("time-to-complete"),role:"listitem",children:[(0,n.jsx)("span",{className:_h("time-to-complete-value"),children:r}),"\xA0",(0,n.jsx)("span",{className:_h("time-to-complete-units"),children:a})]})}const Gh=$("cover");function w2(){const e=be();return null}const ZO=$("cover"),XO="MMMM D, YYYY";function A2({format:e=XO}){const{publishedAt:t}=re(),s=be(),o=ZO("details-content-published-at");if(!t)return null;const r=ln()(t);return r.isValid()?(0,n.jsxs)("div",{className:o,children:[s?.coverPublished||"Published"," ",r.format(e)]}):null}var qO=p(21135),Ii=p.n(qO);const R2=Ii()(async()=>(await p.e("math").then(p.bind(p,79078))).browserAdaptor(),{promise:!0}),P2=Ii()(async()=>{const[{TeX:e},{AllPackages:t}]=await Promise.all([p.e("math").then(p.t.bind(p,33710,23)),p.e("math").then(p.bind(p,18415))]);return new e({packages:t})}),M2=Ii()(async()=>{const e=await p.e("math").then(p.t.bind(p,83390,23));return new e.SVG({fontCache:"local"})},{promise:!0}),O2=Ii()(async()=>{const[e,t,s,{RegisterHTMLHandler:o},{mathjax:r}]=await Promise.all([R2(),P2(),M2(),p.e("math").then(p.bind(p,81991)),p.e("math").then(p.bind(p,55633))]);return o(e),r.document(document,{InputJax:t,OutputJax:s})},{promise:!0}),JO=Ii()(async e=>{const t=new CSSStyleSheet;e.adoptedStyleSheets.push(t);const[s,o]=await Promise.all([M2(),O2()]),r=s.styleSheet(o);r instanceof HTMLStyleElement&&await t.replace(r.innerText)},{promise:!0});class eB extends HTMLElement{static observedAttributes=["long-description","short-description","tex"];_ready;_anchor=this;_renderController;constructor(){super(),this._ready=JO(this.ownerDocument)}get longDescription(){return this.getAttribute("long-description")??null}set longDescription(t){t==null?this.removeAttribute("long-description"):this.setAttribute("long-description",t)}get shortDescription(){return this.getAttribute("short-description")??null}set shortDescription(t){t==null?this.removeAttribute("short-description"):this.setAttribute("short-description",t)}get tex(){return this.getAttribute("tex")??""}set tex(t){this.setAttribute("tex",t)}disconnectedCallback(){this._renderController?.abort()}attributeChangedCallback(t){t==="tex"?this._renderTex():this._renderAria()}async _renderTex(){this._renderController?.abort();const t=this._renderController=new AbortController,[s,o,r]=await Promise.all([O2(),R2(),P2(),this._ready]);if(t.signal.aborted)return;r.reset();const{tex:a}=this,i=a.includes("begin{")?a:String.raw`\begin{align*}${a}\end{align*}`,c=s.convert(i),l=o.firstChild(c),d=document.evaluate("//@data-mjx-error",l,null,XPathResult.STRING_TYPE).stringValue;if(d.length>0){let h=d;if(d===String.raw`Missing \begin{align*} or extra \end{align*}`){const m=s.convert(a),f=o.firstChild(m);h=document.evaluate("//@data-mjx-error",f,null,XPathResult.STRING_TYPE).stringValue??"An error occured"}this.dispatchEvent(new tB("matherror",{bubbles:!1,composed:!1,detail:{errorMessage:h}})),this._anchor.replaceChildren()}else this._anchor.replaceChildren(l);await this._renderAria()}async _renderAria(){if(await this._ready,this._renderController?.signal.aborted||this.firstElementChild==null)return;const t=[this.shortDescription,this.longDescription].filter(s=>(s?.length??0)>0).join(`

`);this.firstElementChild.ariaLabel=t.trim().length===0?null:t}}customElements.define("rise-math",eB);class tB extends CustomEvent{}var In=p(55116);function Wh(e){if(e==null)return{value:e};let t;if(typeof e=="string"?t=e:t=e.innerHTML,!t.includes("data-editor-id"))return{value:e};const s=t.match(/^<[^>]+data-editor-id=["']([^"']+)["'][^>]*>/);if(s){const o=s[1],r=t.match(/^<[^>]*>(.*)<\/[^>]*>$/s),a=r?r[1]:t;return{editorId:o,value:typeof e=="string"?a:e}}return{value:e}}const B2=(e="")=>e.split(".").slice(-2).join("."),D2=Pe()(B2,Ie),sB=e=>e.includes("#/lessons/"),Vs=e=>{if(!e||nB(e)||sB(e))return!1;e.slice(0,2)==="//"&&(e=`https:${e}`);try{const{hostname:t}=new URL(e),s=B2(t);return s!==D2("ARTICULATE_DOMAIN")&&s!==D2("RISE_DOMAIN")}catch{return!1}},nB=e=>e?e.slice(0,7)==="mailto:":!1;var dn=p(4631);const Kh=$("external-link-disabled-popover");function Il(e={}){const{delay:t=200}=e,s=u.useRef(new Map),o=u.useCallback(c=>{const l=s.current.get(c);l&&clearTimeout(l);const d=setTimeout(()=>{const h=`trial-external-link-popover-${c}`;dn.ArcPopover.handlePopover(h,"show"),s.current.delete(c)},t);s.current.set(c,d)},[t]),r=u.useCallback(c=>{const l=s.current.get(c);l&&clearTimeout(l);const d=setTimeout(()=>{const h=`trial-external-link-popover-${c}`;dn.ArcPopover.handlePopover(h,"hide"),s.current.delete(c)},t);s.current.set(c,d)},[t]),a=u.useCallback(c=>{const l=`trial-external-link-popover-${c}`;dn.ArcPopover.handlePopover(l,"show")},[]),i=u.useCallback(c=>{const l=`trial-external-link-popover-${c}`;dn.ArcPopover.handlePopover(l,"hide")},[]);return u.useEffect(()=>{const c=s.current;return()=>{c.forEach(l=>clearTimeout(l)),c.clear()}},[]),{handleMouseEnter:o,handleMouseLeave:r,handleFocus:a,handleBlur:i}}function oB(e){return t=>{const{handleMouseEnter:s,handleMouseLeave:o,handleFocus:r,handleBlur:a}=Il(),i=u.useId();return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(e,{...t,attachmentId:i,onLinkBlur:a,onLinkFocus:r,onLinkMouseEnter:s,onLinkMouseLeave:o}),t.externalLinksDisabled&&(0,n.jsx)(El,{anchorId:i})]})}}const El=({anchorId:e})=>{const t=`trial-external-link-popover-${e}`;return u.useEffect(()=>{const s=o=>{o.key==="Escape"&&dn.ArcPopover.handlePopover(t,"hide")};return document.addEventListener("keydown",s),()=>{document.removeEventListener("keydown",s)}},[t]),(0,n.jsx)(dn.ArcPopover,{alternateAnchorId:e,anchorAt:"top-center",boundary:"flip",className:Kh(),hasTail:!0,headerSlot:(0,n.jsx)("div",{className:Kh("header"),children:"Subscribe to unlock full access"}),hidePopoverButton:!0,id:t,offset:8,popover:"manual",variant:"common",children:(0,n.jsx)("div",{className:Kh("content"),children:"To protect learners from phishing, scams, or malicious redirects, external links are disabled when sharing with Quick Share during your trial."})})},rB=({allowTabNavigation:e=!0,className:t="","data-testid":s,id:o,ref:r,tagName:a="div",value:i})=>{const c=De(),l=c&&"externalLinksDisabled"in c?c.externalLinksDisabled:!1,d=Mt(),h=(0,u.useRef)(null),m=Ae(i),[f,v]=(0,u.useState)([]),{handleMouseEnter:C,handleMouseLeave:g,handleFocus:x,handleBlur:b}=Il(),{currentLocale:T}=it(),L=nn(),y=(0,u.useMemo)(()=>{const S=Fu(m),k=Array.prototype.concat(fB,pB,lB,iB,cB(T,L),l?dB:[],e?hB:uB,mB(d?.a11yNoticeLinkNewTab));return aB(k,S)},[e,T,L,l,d,m]);return(0,u.useLayoutEffect)(()=>{if(!l||!h.current){v([]);return}const S=[];h.current.querySelectorAll("[data-tooltip-target]").forEach((N,I)=>{const w=N.nextElementSibling;if(w?.hasAttribute("data-external")){const A=w.getAttribute("data-external-text")||"",E=w.getAttribute("data-external-id")||`link-${I}`;S.push({placeholder:N,text:A,id:E})}}),v(S)},[y,l]),(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("div",{"aria-hidden":e?void 0:!0,className:`${t} brand--linkColor`,"data-l10n-id":Pt(i),"data-testid":s,id:o,ref:S=>{h.current=S,typeof r=="function"?r(S):r&&(r.current=S)},children:(0,u.createElement)(a,{className:"fr-view rise-tiptap",dangerouslySetInnerHTML:(0,u.useMemo)(()=>({__html:y}),[y])})}),f.map(({placeholder:S,text:k,id:N})=>(0,n.jsxs)(u.Fragment,{children:[(0,In.createPortal)((0,n.jsx)("span",{id:N,onBlur:()=>b(N),onFocus:()=>x(N),onMouseEnter:()=>C(N),onMouseLeave:()=>g(N),role:"button",style:{cursor:"pointer",color:"var(--arc-color-text-disabled)",textDecoration:"underline"},tabIndex:0,children:k}),S),(0,n.jsx)(El,{anchorId:N})]},N))]})};function aB(e,t){const s=document.createElement("div");s.innerHTML=t;for(const o of e)o(s);return s.innerHTML}const F2=e=>e.getAttribute("data-link-type")==="lesson"?!0:(e.getAttribute("href")??"").startsWith("#/lessons/");function iB(e){for(const t of e.querySelectorAll("a")){F2(t)?t.removeAttribute("target"):t.setAttribute("target","_blank");const o=new Set((t.getAttribute("rel")??"").split(/\s+/));o.delete("opener"),o.add("noopener"),o.add("noreferrer"),o.add("nofollow"),t.setAttribute("rel",Array.from(o).join(" "))}}function cB(e,t){return s=>{if(!(!e||e===t)){for(const o of s.querySelectorAll("a"))if(F2(o)){const r=o.getAttribute("href");if(r){const a=r.includes("?")?"&":"?";o.setAttribute("href",`${r}${a}locale=${encodeURIComponent(e)}`)}}}}}function lB(e){for(const t of e.querySelectorAll("table"))if(!t.parentElement.classList.contains("rise-table-wrap")){const s=document.createElement("div");s.className="rise-table-wrap",t.parentNode.replaceChild(s,t),s.appendChild(t)}}function dB(e){let t=0;const s=[];for(const o of e.querySelectorAll("a"))if(Vs(o.href)){const r=o.textContent||"",a=`external-link-anchor-${Date.now()}-${t++}`;o.removeAttribute("href"),o.removeAttribute("rel"),o.removeAttribute("target"),o.setAttribute("data-external",""),o.setAttribute("data-external-text",r),o.setAttribute("data-external-id",a),o.setAttribute("role","button"),o.style.display="none";const i=document.createElement("span");i.setAttribute("data-tooltip-target",""),o.parentNode?.insertBefore(i,o),s.push({placeholder:i,text:r,id:a})}return s}function uB(e){for(const t of e.querySelectorAll("a"))t.setAttribute("aria-hidden","true"),t.setAttribute("tabindex","-1")}function hB(e){for(const t of e.querySelectorAll("a"))t.removeAttribute("aria-hidden"),t.hasAttribute("data-external")?t.setAttribute("tabindex","0"):t.removeAttribute("tabindex")}function mB(e="(opens in a new tab)"){return t=>{for(const s of t.querySelectorAll('a[target="_blank"]')){const o=document.createElement("span");o.className="visually-hidden-always",o.textContent=e,s.appendChild(o)}}}function fB(e){return Wh(e).value}function pB(e){for(const t of e.querySelectorAll("rise-math")){const{shortDescription:s,longDescription:o}=t,r=t.querySelector('[slot="short-description"]'),a=t.querySelector('[slot="long-description"]');s==null&&r!=null&&(t.shortDescription=r.textContent),o==null&&a!=null&&(t.longDescription=a.textContent)}return e}const ke=rB,H2=$("cover");function gB(){const e=re(),t=zO(),s=Ae(e?.description);if(!s)return null;const o=fa("description"),r=(0,Qt.uW)(e?.description)?{"data-l10n-id":e?.description?.l10nId}:{"data-change-path":o};return(0,n.jsx)("div",{...r,children:(0,n.jsxs)("section",{className:H2("details-content-section"),children:[t?(0,n.jsx)(w2,{}):(0,n.jsx)(A2,{}),(0,n.jsx)(ke,{className:H2("details-content-description"),value:Dh(s)},"text")]})})}const Qh=e=>{if(!e)return"";const t=ln()(e),s=ln()(),o=ln()(s).add(24,"hours");return t.isBefore(s)?"Overdue":t.isBefore(o)?`Due in ${s.to(t,!0)}`:`Due ${t.format("MMM D")}`},$2=e=>ln()(e).isSameOrBefore(ln()().add(3,"d"),"days");function vB({Default:e,...t}){const{dueAt:s}=t,r=s&&$2(s)?"brand--background":"brand--color";return(0,n.jsx)(e,{...t,className:r})}const CB=(0,u.forwardRef)(function({children:t,disabled:s,onClick:o,to:r,...a},i){return s?(0,n.jsx)("a",{"aria-disabled":"true",ref:i,role:"link",...a,children:t}):(0,n.jsx)(as,{onClick:o,ref:i,to:r,...a,children:t})});function xB(){return!(typeof document>"u"||!("startViewTransition"in document)||Yn.isFirefox)}function bB(e){if(!xB()){const t=e();return Promise.resolve(t)}return new Promise(t=>{try{document.startViewTransition(async()=>{await e()}).finished.then(()=>t()).catch(()=>t())}catch{const s=e();Promise.resolve(s).then(()=>t()).catch(()=>t())}})}let Yh=!1;function Xn(e,t="default"){return Yh?Promise.resolve():(Yh=!0,bB(()=>{document.documentElement.classList.add(`transition-${t}`),e()}).then(()=>{document.documentElement.classList.remove(`transition-${t}`)}).finally(()=>{Yh=!1}))}const V2=$("cover"),is=Oe("CoverAction",()=>{const e=re(),{trackingQuizId:t,theme:s}=e,o=es(),r=window.viewType==="preview",a=bC(),i=ej(),c=na(),l=a?.id,d=s?.showStartButton??!0,h=Q4()?c===100:K4(),f=i!=null?i:l,v=!r&&!1,{courseCTALabel:C}=Ej({isCourseComplete:h===!0,percentCourseComplete:c??0});if(!d||!C||f==null)return null;const g=["cover__header-content-action-link","overview__button-enrolled",v?"overview__start-again":void 0].filter(Boolean).join(" "),x=Ns(f),b=T=>{T.preventDefault(),Xn(()=>{o(x)},"cover-to-lesson")};return(0,n.jsx)("div",{className:V2("header-content-action-wrapper"),children:(0,n.jsx)(CB,{className:g,onClick:b,to:x,children:(0,n.jsx)("span",{className:V2("header-content-action-link-text"),children:C})})})});var yB=p(25048),X=p.n(yB),Zh,TB;const aue=({width:e="18",height:t="18",className:s})=>Zh("svg",{"aria-hidden":"true",className:TB("i i-alert",s),focusable:"false",height:t,viewBox:"0 0 18 18",width:e,children:Zh("g",{fill:"none",fillRule:"evenodd",stroke:"#DE1D1D",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",children:Zh("path",{d:"M9 1a8 8 0 1 1 0 16A8 8 0 0 1 9 1zM9 5.364V9.53M9 11.91v.726"})})}),iue=null;function Yt(e){return(0,n.jsx)("svg",{"aria-hidden":"true",fill:"currentColor",focusable:"false",xmlns:"http://www.w3.org/2000/svg",...e})}function LB(e){return(0,n.jsxs)(Yt,{viewBox:"0 0 16 12",...e,children:[(0,n.jsx)("path",{d:"M8.4148147,12 L1.05185184,12 C0.471229623,12 0,11.552 0,11 C0,10.448 0.471229623,10 1.05185184,10 L8.4148147,10 C8.99543692,10 9.46666654,10.448 9.46666654,11 C9.46666654,11.552 8.99543692,12 8.4148147,12"}),(0,n.jsx)("path",{d:"M12.2500002,2 L0.816666683,2 C0.365866674,2 0,1.552 0,1 C0,0.448 0.365866674,0 0.816666683,0 L12.2500002,0 C12.7008002,0 13.0666669,0.448 13.0666669,1 C13.0666669,1.552 12.7008002,2 12.2500002,2"}),(0,n.jsx)("path",{d:"M15,7 L1,7 C0.448,7 0,6.552 0,6 C0,5.448 0.448,5 1,5 L15,5 C15.552,5 16,5.448 16,6 C16,6.552 15.552,7 15,7"})]})}var SB,z2,kB;const cue=({width:e="24",height:t="16",leftMovement:s="0",className:o})=>SB("svg",{"aria-hidden":"true",className:kB("i i-alt",o),focusable:"false",height:t,style:{marginLeft:s},viewBox:"0 0 24 16",width:e,children:[z2("path",{d:"M10.066 11.5H8.887a.545.545 0 0 1-.326-.092.476.476 0 0 1-.178-.236l-.387-1.144H5.503l-.387 1.143a.507.507 0 0 1-.175.228.505.505 0 0 1-.32.101H3.433l2.538-6.556h1.557l2.538 6.556zM5.854 8.993h1.791l-.603-1.795-.137-.403a10.24 10.24 0 0 1-.155-.502 8.943 8.943 0 0 1-.293.914l-.603 1.786zm6.962 1.292h2.43V11.5h-3.951V4.944h1.52v5.341zM20.7 4.944v1.205h-1.845V11.5h-1.52V6.15H15.49V4.942h5.211z"}),z2("path",{d:"M1.5 1.994v12.012a.5.5 0 0 0 .505.494h19.99a.5.5 0 0 0 .505-.494V1.994a.5.5 0 0 0-.505-.494H2.005a.5.5 0 0 0-.505.494zm-1.5 0A2 2 0 0 1 2.005 0h19.99A2 2 0 0 1 24 1.994v12.012A2 2 0 0 1 21.995 16H2.005A2 2 0 0 1 0 14.006V1.994z",fillRule:"nonzero"})]}),lue=null;var NB,jl,IB;const due=({title:e="All Authors",desc:t="A circle with the outline of the head and shoulders of two people inside",width:s="30",height:o="30",className:r,focusable:a="false"})=>NB("svg",{className:IB("i i-blockTemplateAllAuthors",r),focusable:a,height:o,viewBox:"0 0 30 30",width:s,children:[jl("title",{children:e}),jl("desc",{children:t}),jl("circle",{cx:"14.963",cy:"14.963",fill:"#E9E9E9",r:"14.963"}),jl("path",{d:"M17.482 17.661a3.75 3.75 0 1 1 4.037 0 4.25 4.25 0 0 1 2.231 3.741.75.75 0 1 1-1.5 0 2.75 2.75 0 1 0-5.5 0 .75.75 0 1 1-1.5 0 4.25 4.25 0 0 1 2.232-3.741zm-8.915-3.947a3.75 3.75 0 1 1 3.866 0A4.25 4.25 0 0 1 14.75 17.5a.75.75 0 1 1-1.5 0 2.75 2.75 0 0 0-5.5 0 .75.75 0 1 1-1.5 0 4.25 4.25 0 0 1 2.317-3.786zm1.933-.964a2.25 2.25 0 1 0 0-4.5 2.25 2.25 0 0 0 0 4.5zm9 4a2.25 2.25 0 1 0 0-4.5 2.25 2.25 0 0 0 0 4.5z",fill:"#8894A3"})]}),uue=null;var wl,un,EB;const hue=({title:e="Check Mark",desc:t="A circle with a check mark inside",width:s="112",height:o="112",className:r,focusable:a="false"})=>wl("svg",{className:EB("i i-blockTemplateCheckMark",r),focusable:a,height:o,viewBox:"0 0 112 112",width:s,children:[un("title",{children:e}),un("desc",{children:t}),un("defs",{children:wl("filter",{filterUnits:"objectBoundingBox",height:"186.1%",id:"a",width:"186.1%",x:"-43.1%",y:"-40.3%",children:[un("feOffset",{dy:"2",in:"SourceAlpha",result:"shadowOffsetOuter1"}),un("feGaussianBlur",{in:"shadowOffsetOuter1",result:"shadowBlurOuter1",stdDeviation:"10"}),un("feColorMatrix",{in:"shadowBlurOuter1",result:"shadowMatrixOuter1",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.1 0"}),wl("feMerge",{children:[un("feMergeNode",{in:"shadowMatrixOuter1"}),un("feMergeNode",{in:"SourceGraphic"})]})]})}),wl("g",{fill:"none",fillRule:"evenodd",filter:"url(#a)",transform:"translate(20 18)",children:[un("path",{className:"outer",d:"M36 65.096c16.07 0 29.096-13.027 29.096-29.096C65.096 19.93 52.069 6.904 36 6.904 19.93 6.904 6.904 19.931 6.904 36c0 16.07 13.027 29.096 29.096 29.096zM36 72C16.118 72 0 55.882 0 36S16.118 0 36 0s36 16.118 36 36-16.118 36-36 36z",fillRule:"nonzero"}),un("circle",{className:"inner",cx:"36",cy:"36",r:"30"}),un("path",{className:"check",d:"M30.054 35.993a1.791 1.791 0 0 0-2.53 0 1.783 1.783 0 0 0 0 2.524l5.972 5.96a1.791 1.791 0 0 0 2.53 0l10.45-10.43a1.783 1.783 0 0 0 0-2.524 1.791 1.791 0 0 0-2.53 0l-9.185 9.167-4.707-4.697z",fillRule:"nonzero"})]})]}),mue=null;var U2,Al,jB;const fue=({title:e="Folder Outline",desc:t="Outline of a folder",width:s="42",height:o="42",className:r,focusable:a="false"})=>U2("svg",{className:jB("i i-blockTemplateFolder",r),focusable:a,height:o,viewBox:"0 0 42 42",width:s,children:[Al("title",{children:e}),Al("desc",{children:t}),U2("g",{fill:"#ADAEAF",fillRule:"nonzero",stroke:"#ADAEAF",strokeWidth:".3",children:[Al("path",{d:"M34.043 6.971a.87.87 0 0 0-.87-.87h-17.53l.7.354-3.756-5.101a.87.87 0 0 0-.7-.354H1.87a.87.87 0 0 0-.87.87v34.434C1 38.894 3.067 41 5.626 41a.87.87 0 1 0 0-1.74c-1.59 0-2.887-1.32-2.887-2.956V1.87l-.87.87h10.018l-.7-.355 3.756 5.102a.87.87 0 0 0 .7.354h17.53l-.869-.87v7.652a.87.87 0 1 0 1.74 0V6.971z"}),Al("path",{d:"M9.116 36.348a2.906 2.906 0 0 1-2.899 2.913V41h30.145A4.645 4.645 0 0 0 41 36.348V14.913a.87.87 0 0 0-.87-.87H9.986a.87.87 0 0 0-.87.87v21.435zm.87-20.565H40.13l-.87-.87v21.435a2.906 2.906 0 0 1-2.898 2.913H6.217c-1.159 0-1.159 1.739 0 1.739a4.645 4.645 0 0 0 4.638-4.652V14.913l-.87.87z"})]})]}),pue=null,wB=({width:e="17",height:t="15",title:s="Book",desc:o="Book",focusable:r="false",className:a})=>(0,n.jsxs)("svg",{className:a,focusable:r,height:t,viewBox:"0 0 17 15",width:e,xmlns:"http://www.w3.org/2000/svg",children:[(0,n.jsx)("title",{children:s}),(0,n.jsx)("desc",{children:o}),(0,n.jsx)("path",{d:"M8.407 14.529a.68.68 0 0 1-.374 0L.506 12.553A.679.679 0 0 1 0 11.897V.679C0 .234.42-.09.851.023L8.22 1.957 15.589.023a.679.679 0 0 1 .851.656v11.218a.679.679 0 0 1-.506.656L8.407 14.53zM7.541 3.182L1.357 1.56v9.814l6.184 1.623V3.182zm1.358 0v9.814l6.184-1.623V1.56L8.899 3.182z",fill:"#FFF",fillRule:"nonzero"})]});var Xh,Ei,AB;const vue=({title:e="Captions",desc:t="Two capital letter C inside a square",width:s="24",height:o="16",className:r,focusable:a="false"})=>Xh("svg",{className:AB("i i-captions",r),focusable:a,height:o,viewBox:"0 0 24 16",width:s,children:[Ei("title",{children:e}),Ei("desc",{children:t}),Xh("g",{fill:"none",fillRule:"evenodd",transform:"translate(-.355)",children:[Ei("rect",{height:"13.25",rx:"1",stroke:"#000",strokeWidth:"1.75",width:"18.25",x:"1.447",y:"1.402"}),Xh("text",{fill:"#000",fontFamily:"Lato-Black, Lato",fontSize:"9",fontWeight:"700",letterSpacing:".75",children:[Ei("tspan",{x:"4.222",y:"11.5",children:"C"})," ",Ei("tspan",{x:"10.885",y:"11.5",children:"C"})]})]})]}),Cue=null;var RB,qh;const xue=({"aria-hidden":e,"aria-label":t,className:s,desc:o,height:r="15",role:a="img",title:i,width:c="16"})=>RB("svg",{"aria-hidden":e,"aria-label":t,className:s,focusable:"false",height:r,role:a,viewBox:"0 0 16 15",width:c,xmlns:"http://www.w3.org/2000/svg",children:[i&&qh("title",{children:i}),o&&qh("desc",{children:o}),qh("path",{d:"M0 0h16v2H0V0zm0 13h16v2H0v-2zm4-9h8a1 1 0 0 1 1 1v5a1 1 0 0 1-1 1H4a1 1 0 0 1-1-1V5a1 1 0 0 1 1-1z",fill:"currentColor",fillRule:"evenodd"})]}),bue=null;function _2(e){return(0,n.jsx)(Yt,{viewBox:"0 0 11 8",...e,children:(0,n.jsx)("path",{d:"M9.6,0L11,1.3L3.9,8L0,4.3L1.4,3l2.6,2.4L9.6,0z"})})}var PB,Jh,MB;const yue=({"aria-hidden":e,"aria-label":t,className:s,desc:o,height:r="21",role:a="img",title:i,width:c="21"})=>PB("svg",{"aria-hidden":e,"aria-label":t,className:MB("i i-checkMarkFilled",s),focusable:"false",height:r,role:a,viewBox:"0 0 21 21",width:c,xmlns:"http://www.w3.org/2000/svg",children:[i&&Jh("title",{children:i}),o&&Jh("desc",{children:o}),Jh("path",{d:"M10.074 20.959c-5.523 0-10-4.477-10-10s4.477-10 10-10 10 4.477 10 10-4.477 10-10 10zM7.077 10.523a.65.65 0 1 0-.919.919l2.546 2.545a.65.65 0 0 0 .919 0l4.454-4.454a.65.65 0 1 0-.919-.92L9.163 12.61l-2.086-2.086z"})]}),Tue=null;var G2,OB;function Lue(e){return G2(OB,{viewBox:"0 0 7 5",...e,children:G2("path",{d:"M3.104 3.896a.5.5 0 0 0 .707 0l2.543-2.542a.5.5 0 0 0-.708-.708L3.473 2.851 1.353.73a.5.5 0 1 0-.707.707l2.458 2.458Z"})})}var W2,BB;const Sue=({width:e="16",height:t="16",className:s,focusable:o="false"})=>W2("svg",{"aria-hidden":"true",className:BB("i i-chevronLeft",s),focusable:o,height:t,viewBox:"0 0 16 16",width:e,children:W2("polygon",{points:"11.1,15.7 3.4,8 11.1,0.3 12.6,1.7 6.3,8 12.6,14.3 "})}),kue=null,DB=({className:e,dataTestId:t})=>(0,n.jsx)("svg",{"aria-hidden":"true",className:e,"data-testid":t,fill:"currentColor",focusable:"false",viewBox:"0 0 10 10",xmlns:"http://www.w3.org/2000/svg",children:(0,n.jsx)("circle",{cx:"5",cy:"5",r:"5"})}),FB=({className:e})=>(0,n.jsx)("svg",{"aria-hidden":"true",className:e,fill:"currentColor",foocusable:"false",viewBox:"0 0 10 10",xmlns:"http://www.w3.org/2000/svg",children:(0,n.jsx)("path",{d:"M9.78572 9.78572C9.5 10.0714 9.07143 10.0714 8.78571 9.78572L5 6.00001L1.21429 9.78572C0.928571 10.0714 0.500001 10.0714 0.214285 9.78572C-0.0714284 9.49999 -0.0714284 9.07144 0.214285 8.78571L4 5L0.214285 1.21429C-0.0714284 0.928564 -0.0714284 0.500007 0.214285 0.214279C0.357143 0.0714143 0.500001 0 0.714286 0C0.928571 0 1.07143 0.0714143 1.21429 0.214279L5 3.99999L8.78571 0.214279C8.92857 0.0714143 9.14286 0 9.28572 0C9.42857 0 9.64286 0.0714143 9.78572 0.214279C10.0714 0.500007 10.0714 0.928564 9.78572 1.21429L6 5L9.78572 8.78571C10.0714 9.07144 10.0714 9.49999 9.78572 9.78572Z"})});var HB,zs;const Eue=({"aria-hidden":e,"aria-label":t,className:s,desc:o,height:r="18",role:a="img",title:i,width:c="18"})=>HB("svg",{"aria-hidden":e,"aria-label":t,className:s,fill:"none",focusable:"false",height:r,role:a,viewBox:"0 0 18 18",width:c,xmlns:"http://www.w3.org/2000/svg",children:[i&&zs("title",{children:i}),o&&zs("desc",{children:o}),zs("path",{d:"M9 9V1a8 8 0 015.657 2.343L9 9z",fill:"red",stroke:"#fff",strokeLinejoin:"round"}),zs("path",{d:"M9 9l5.657-5.656A8 8 0 0117 9H9z",fill:"#F90",stroke:"#fff",strokeLinejoin:"round"}),zs("path",{d:"M9 9h8a8 8 0 01-2.343 5.657L9 9z",fill:"#FFF500",stroke:"#fff",strokeLinejoin:"round"}),zs("path",{d:"M9 9l5.657 5.657A8 8 0 019 17V9z",fill:"#ADFF00",stroke:"#fff",strokeLinejoin:"round"}),zs("path",{d:"M9 9v8a8 8 0 01-5.657-2.343L9 9z",fill:"#00FF94",stroke:"#fff",strokeLinejoin:"round"}),zs("path",{d:"M9 9l-5.657 5.657A8 8 0 011 9h8z",fill:"#06F",stroke:"#fff",strokeLinejoin:"round"}),zs("path",{d:"M9 9H1a8 8 0 012.343-5.656L9 9z",fill:"#8000FF",stroke:"#fff",strokeLinejoin:"round"}),zs("path",{d:"M9 9L3.343 3.343A8 8 0 019 1v8z",fill:"#EB00FF",stroke:"#fff",strokeLinejoin:"round"}),zs("path",{d:"M9 6a3 3 0 110 6 3 3 0 010-6z",fill:"#fff"}),zs("path",{d:"M9 17A8 8 0 109 1a8 8 0 000 16z",stroke:"#EAEAEB"})]}),jue=null;var $B,em,VB;const wue=({title:e="Copy",desc:t="A document stacked on top of another one",width:s="15",height:o="18",className:r=null,focusable:a="false"})=>$B("svg",{className:VB("i i-stack",r),focusable:a,height:o,viewBox:"0 0 15 18",width:s,children:[em("title",{children:e}),em("desc",{children:t}),em("path",{d:"M14.7,4.1C14.7,4.1,14.7,4.1,14.7,4.1c0-0.1-0.1-0.2-0.1-0.2c0,0,0,0,0,0L11,0.4c0,0-0.1,0-0.1-0.1 c0,0-0.1,0-0.1-0.1c-0.1,0-0.2,0-0.2,0H3.5c-0.3,0-0.6,0.3-0.6,0.6v3h-2c-0.3,0-0.6,0.3-0.6,0.6v12.6c0,0.3,0.3,0.6,0.6,0.6h10.6 c0.3,0,0.6-0.3,0.6-0.6v-3h2c0.3,0,0.6-0.3,0.6-0.6V4.3C14.7,4.2,14.7,4.2,14.7,4.1z M11.2,2.4l1.4,1.3h-1.4V2.4z M9.9,7.3H8.6V6 L9.9,7.3z M7.9,8.6h2.9v7.9H1.5V5.1h5.8v2.8C7.3,8.3,7.6,8.6,7.9,8.6z M12.1,7.9c0-0.1,0-0.2,0-0.2c0,0,0,0,0,0 c0-0.1-0.1-0.1-0.1-0.2c0,0,0,0,0,0L8.4,4c0,0-0.1,0-0.1-0.1c0,0-0.1,0-0.1-0.1c-0.1,0-0.2,0-0.2,0H4.1V1.5H10v2.8 C10,4.7,10.2,5,10.6,5h2.9v7.9h-1.4V7.9z"})]}),Aue=null;var zB,tm,UB;const Rue=e=>{const{className:t,desc:s="Crop",focusable:o="false",height:r="19",title:a="Crop",width:i="19"}=e,c={className:UB("i i-crop",t),focusable:o,height:r,viewBox:`0 0 ${i} ${r}`,width:i};return zB("svg",{...c,children:[tm("title",{children:a}),tm("desc",{children:s}),tm("path",{d:"M15 13h3.003c.55 0 .997.444.997 1 0 .552-.453 1-.997 1H15v3.003c0 .55-.444.997-1 .997-.552 0-1-.453-1-.997V15H4.996A.995.995 0 0 1 4 14.004V6H.997A.996.996 0 0 1 0 5c0-.552.453-1 .997-1H4V.997C4 .447 4.444 0 5 0c.552 0 1 .453 1 .997V4h8.004c.55 0 .996.445.996.996V13zm-9 0h7V6H6v7z",fillRule:"evenodd"})]})},Pue=null;var _B,sm,GB;const Mue=({"aria-hidden":e,"aria-label":t="Dash mark",className:s,desc:o,height:r="3",role:a="img",title:i,width:c="7"})=>_B("svg",{"aria-hidden":e,"aria-label":t,className:GB("i i-dashMark",s),focusable:"false",height:r,role:a,viewBox:"0 0 7 3",width:c,xmlns:"http://www.w3.org/2000/svg",children:[i&&sm("title",{children:i}),o&&sm("desc",{children:o}),sm("rect",{height:"3",width:"7"})]}),Oue=null,WB=({title:e="DestinationArrow",desc:t="DestinationArrow",width:s="13",height:o="10",className:r,focusable:a="false"})=>(0,n.jsxs)("svg",{className:X()("i i-destinationArrow",r),focusable:a,height:o,viewBox:"0 0 13 10",width:s,children:[(0,n.jsx)("title",{children:e}),(0,n.jsx)("desc",{children:t}),(0,n.jsx)("path",{d:"M0 5c0 .345.264.625.59.625h10.393L7.855 8.933a.65.65 0 0 0 0 .884.573.573 0 0 0 .418.183.573.573 0 0 0 .418-.183l4.136-4.374a.66.66 0 0 0 0-.885L8.691.183a.568.568 0 0 0-.836 0 .65.65 0 0 0 0 .884l3.128 3.308H.591C.264 4.375 0 4.655 0 5"})]});var KB,Due;class Fue extends null{render(){return KB("svg",{"aria-hidden":this.props.decorative,"aria-label":this.props.title,className:this.props.className,focusable:"false",height:this.props.height,role:this.props.role,version:"1.1",viewBox:this.props.viewBox,width:this.props.width,xmlns:"http://www.w3.org/2000/svg",children:this.props.children})}}const Hue=null;var K2,QB;const $ue=({width:e=20,height:t=20,...s})=>K2(QB,{height:t,width:e,...s,viewBox:"0 0 20 20",children:K2("path",{d:"M10 0c5.523 0 10 4.477 10 10s-4.477 10-10 10S0 15.523 0 10 4.477 0 10 0zm2.634 7.679l-3.506 3.505-2.054-2.055a.7.7 0 00-.99.99l2.55 2.55a.7.7 0 00.99 0l4-4a.7.7 0 00-.99-.99z",fillRule:"evenodd"})}),Vue=null;var YB,nm,ZB;const zue=({title:e="Vertical Dots",desc:t="Vertical Dots",width:s="4",height:o="24",className:r=null,focusable:a="false"})=>YB("svg",{className:ZB("i i-dotsVertical",r),focusable:a,height:o,viewBox:"0 0 4 24",width:s,children:[nm("title",{children:e}),nm("desc",{children:t}),nm("path",{d:"M2 24a2 2 0 1 1 0-4 2 2 0 0 1 0 4zm0-10a2 2 0 1 1 0-4 2 2 0 0 1 0 4zM2 4a2 2 0 1 1 0-4 2 2 0 0 1 0 4z",fillRule:"evenodd"})]}),Uue=null,XB=({title:e="Download",desc:t="Arrow down with horizontal line beneath it",width:s="16",height:o="19",className:r,focusable:a="false"},i)=>(0,n.jsxs)("svg",{className:X()("i i-download",r),focusable:a,height:o,ref:i,viewBox:"0 0 16 19",width:s,children:[(0,n.jsx)("title",{children:e}),(0,n.jsx)("desc",{children:t}),(0,n.jsx)("rect",{height:"2",rx:"1",width:"16",y:"17"}),(0,n.jsx)("path",{d:"M4.464 8.293A1 1 0 1 0 3.05 9.707l4.24 4.24c.4.4 1.028.392 1.42 0l4.24-4.24a1 1 0 1 0-1.414-1.414L8 4.757 4.464 8.293zm0 0L8 4.757l3.536 3.536L8 11.828 4.464 8.293z"}),(0,n.jsx)("path",{d:"M7 0h2v12H7z"})]}),qB=(0,u.forwardRef)(XB);var JB,ji,eD;const _ue=({title:e="Download Circle",desc:t="Arrow down with horizontal line beneath it wrapped up in a circle",width:s="51",height:o="51",className:r,focusable:a="false"})=>JB("svg",{className:eD("i i-downloadCircle",r),focusable:a,height:o,viewBox:"0 0 51 51",width:s,children:[ji("title",{children:e}),ji("desc",{children:t}),ji("g",{fill:"none",stroke:"none",children:ji("g",{fill:"#000",transform:"translate(-695, -227)",children:ji("path",{d:"M721,255.395113 L726.834932,249.560181 C727.225456,249.169656 727.858621,249.169656 728.249146,249.560181 C728.63967,249.950705 728.63967,250.58387 728.249146,250.974394 L720.824726,258.398814 C720.796316,258.436777 720.764856,258.473181 720.730347,258.507691 C720.339822,258.898215 719.706657,258.898215 719.316133,258.507691 L711.799485,250.991042 C711.408961,250.600518 711.408961,249.967353 711.799485,249.576829 C712.190009,249.186304 712.823174,249.186304 713.213699,249.576829 L719,255.36313 L719,240.783936 C719,240.231651 719.447715,239.783936 720,239.783936 C720.552285,239.783936 721,240.231651 721,240.783936 L721,255.395113 Z M720.059082,277.569336 C706.251963,277.569336 695.059082,266.376455 695.059082,252.569336 C695.059082,238.762217 706.251963,227.569336 720.059082,227.569336 C733.866201,227.569336 745.059082,238.762217 745.059082,252.569336 C745.059082,266.376455 733.866201,277.569336 720.059082,277.569336 Z M720.059082,275.569336 C732.761631,275.569336 743.059082,265.271885 743.059082,252.569336 C743.059082,239.866787 732.761631,229.569336 720.059082,229.569336 C707.356533,229.569336 697.059082,239.866787 697.059082,252.569336 C697.059082,265.271885 707.356533,275.569336 720.059082,275.569336 Z M712,264 C711.447715,264 711,263.552285 711,263 C711,262.447715 711.447715,262 712,262 L728,262 C728.552285,262 729,262.447715 729,263 C729,263.552285 728.552285,264 728,264 L712,264 Z"})})})]}),Gue=null;var tD,wi,sD;const Wue=({title:e="More",desc:t="Three dots next to one another",width:s="16",height:o="4",className:r=null,focusable:a="false"})=>tD("svg",{className:sD("i",r),focusable:a,height:o,viewBox:"0 0 16 4",width:s,children:[wi("title",{children:e}),wi("desc",{children:t}),wi("path",{d:"M8,0 C9.105,0 10,0.895 10,2 C10,3.105 9.105,4 8,4 C6.895,4 6,3.105 6,2 C6,0.895 6.895,0 8,0"}),wi("path",{d:"M2,0 C3.105,0 4,0.895 4,2 C4,3.105 3.105,4 2,4 C0.895,4 0,3.105 0,2 C0,0.895 0.895,0 2,0"}),wi("path",{d:"M14,0 C15.105,0 16,0.895 16,2 C16,3.105 15.105,4 14,4 C12.895,4 12,3.105 12,2 C12,0.895 12.895,0 14,0"})]}),Kue=null;var nD,om,oD;const Que=({title:e="Embed",desc:t="Embed icon",width:s="16",height:o="15",className:r,focusable:a="false"})=>nD("svg",{className:oD("i i-embed",r),focusable:a,height:o,viewBox:"0 0 16 15",width:s,children:[om("title",{children:e}),om("desc",{children:t}),om("path",{d:"M13.2 11.263l-1.4-1.4 2.3-2.3-2.3-2.3 1.4-1.4 3 3c.4.4.4 1 0 1.4l-3 3M3.8 11.263l-3-3c-.4-.4-.4-1 0-1.4l3-3 1.4 1.4-2.3 2.3 2.3 2.3-1.4 1.4M6.5 14.563c-.1 0-.2 0-.3-.1-.5-.2-.8-.7-.6-1.3l4-12c.2-.5.7-.8 1.3-.6.5.2.8.7.6 1.3l-4 12c-.2.4-.6.7-1 .7"})]}),Yue=null;var rD,Rl,aD;const Zue=({title:e="Empty folder",desc:t="Empty folder",width:s="46",height:o="46",className:r,focusable:a="false"})=>rD("svg",{className:aD("i i-emptyFolder",r),focusable:a,height:o,viewBox:"0 0 46 46",width:s,children:[Rl("title",{children:e}),Rl("desc",{children:t}),Rl("path",{d:"M38 6.867a1 1 0 0 0-1-1H16.84l.805.407-4.32-5.867A1 1 0 0 0 12.52 0H1a1 1 0 0 0-1 1v39.6C0 43.578 2.377 46 5.32 46a1 1 0 0 0 0-2C3.49 44 2 42.482 2 40.6V1L1 2h11.52l-.805-.407 4.32 5.867a1 1 0 0 0 .805.407H37l-1-1v8.8a1 1 0 0 0 2 0v-8.8z"}),Rl("path",{d:"M9.333 40.65A3.341 3.341 0 0 1 6 44v2h34.667C43.613 46 46 43.604 46 40.65V16a1 1 0 0 0-1-1H10.333a1 1 0 0 0-1 1v24.65zm1-23.65H45l-1-1v24.65A3.341 3.341 0 0 1 40.667 44H6c-1.333 0-1.333 2 0 2 2.947 0 5.333-2.396 5.333-5.35V16l-1 1z"})]}),Xue=null;var iD,Pl,cD;const que=({title:e="End Slide",desc:t="End Slide",width:s="16",height:o="14",className:r,focusable:a="false"})=>iD("svg",{className:cD("i i-end-slide",r),focusable:a,height:o,viewBox:"0 0 16 14",width:s,children:[Pl("title",{children:e}),Pl("desc",{children:t}),Pl("path",{d:"M6,0.6L4.6,2l4,4H0v2h8.6l-4,4L6,13.4l5.7-5.7c0.4-0.4,0.4-1,0-1.4L6,0.6",fillRule:"evenodd"}),Pl("rect",{fillRule:"evenodd",height:"14",width:"2",x:"14"})]}),Jue=null;var Q2,Ml,lD;const e0e=({title:e="Envelope",desc:t="Envelope",width:s="17",height:o="14",className:r,focusable:a="false"})=>Q2("svg",{className:lD("i i-envelope",r),focusable:a,height:o,viewBox:"0 0 17 14",width:s,xmlns:"http://www.w3.org/2000/svg",children:[Ml("title",{children:e}),Ml("desc",{children:t}),Q2("g",{fillRule:"nonzero",children:[Ml("path",{d:"M8.5 7.316L1.341.634a.5.5 0 0 0-.682.732l7.5 7a.5.5 0 0 0 .682 0l7.5-7a.5.5 0 1 0-.682-.732L8.5 7.316z"}),Ml("path",{d:"M1.5 1.5v11h14v-11h-14zM1 .5h15a.5.5 0 0 1 .5.5v12a.5.5 0 0 1-.5.5H1a.5.5 0 0 1-.5-.5V1A.5.5 0 0 1 1 .5z"})]})]}),t0e=null;var dD,Ol,uD;const s0e=({title:e="Error",desc:t="An x with a circle",width:s="50",height:o="50",className:r,focusable:a="false"})=>dD("svg",{className:uD("i i-error",r),focusable:a,height:o,viewBox:"0 0 50 50",width:s,children:[Ol("title",{children:e}),Ol("desc",{children:t}),Ol("path",{d:"M25 50C11.193 50 0 38.807 0 25S11.193 0 25 0s25 11.193 25 25-11.193 25-25 25zm0-2c12.703 0 23-10.297 23-23S37.703 2 25 2 2 12.297 2 25s10.297 23 23 23z"}),Ol("path",{d:"M31.679 18.321a1.036 1.036 0 0 0-1.5 0L24.5 24l-5.679-5.679a1.036 1.036 0 0 0-1.5 0 1.036 1.036 0 0 0 0 1.5L23 25.5l-5.679 5.679a1.036 1.036 0 0 0 0 1.5c.215.214.429.321.75.321.322 0 .536-.107.75-.321L24.5 27l5.679 5.679c.214.214.535.321.75.321.214 0 .535-.107.75-.321a1.036 1.036 0 0 0 0-1.5L26 25.5l5.679-5.679a1.036 1.036 0 0 0 0-1.5"})]}),n0e=null;var hD,Bl,mD;const o0e=({title:e="Error Alert",desc:t="A red circle with a white exclamation point in the middle",width:s="18",height:o="18",className:r,focusable:a="false"})=>hD("svg",{className:mD("i i-errorAlert",r),focusable:a,height:o,viewBox:"0 0 18 18",width:s,children:[Bl("title",{children:e}),Bl("desc",{children:t}),Bl("circle",{cx:"9",cy:"9",r:"9"}),Bl("path",{d:"M9.897 4v4.004c0 .425-.021.841-.063 1.25-.042.408-.098.84-.168 1.298H8.497c-.07-.457-.126-.89-.168-1.298a12.206 12.206 0 0 1-.063-1.25V4h1.631zM8 13.17c0-.145.027-.282.08-.413a.987.987 0 0 1 .225-.336 1.103 1.103 0 0 1 .759-.308 1.06 1.06 0 0 1 .749.308 1.06 1.06 0 0 1 .308.749 1.07 1.07 0 0 1-.308.749 1.077 1.077 0 0 1-.749.301 1.095 1.095 0 0 1-.76-.301.995.995 0 0 1-.223-.333A1.069 1.069 0 0 1 8 13.17z"})]}),r0e=null,Y2=({"aria-hidden":e,"aria-label":t="X mark",className:s,dataTestId:o="x-mark",desc:r,height:a="10",overrideStyle:i=!1,role:c="img",title:l,width:d="10"})=>(0,n.jsxs)("svg",{"aria-hidden":e,"aria-label":t,className:X()(s,{"i i-exMark":!i}),"data-testid":o,focusable:"false",height:a,role:c,viewBox:"0 0 10 10",width:d,xmlns:"http://www.w3.org/2000/svg",children:[l&&(0,n.jsx)("title",{children:l}),r&&(0,n.jsx)("desc",{children:r}),(0,n.jsx)("path",{d:"M5,4.17,9.17,0,10,.83,5.83,5,10,9.17,9.17,10,5,5.83.83,10,0,9.17,4.17,5,0,.83.83,0Z"})]});var fD,Dl,pD;const i0e=({title:e="Export",desc:t="Export",width:s="12",height:o="15",className:r,focusable:a="false"})=>fD("svg",{className:pD("i i-export",r),focusable:a,height:o,viewBox:"0 0 12 15",width:s,children:[Dl("title",{children:e}),Dl("desc",{children:t}),Dl("polygon",{points:"7,6.4 7,1 5,1 5,6.4 2.3,6.4 6,10.8 9.7,6.4"}),Dl("rect",{height:"2",width:"10",x:"1",y:"12"})]}),c0e=null,Z2=({"aria-hidden":e,"aria-label":t,className:s,desc:o="",height:r="50",role:a="img",title:i="",width:c="40"})=>(0,n.jsxs)("svg",{"aria-hidden":e,"aria-label":t,className:s,fill:"none",focusable:"false",height:r,role:a,viewBox:"0 0 40 50",width:c,xmlns:"http://www.w3.org/2000/svg",children:[i&&(0,n.jsx)("title",{children:i}),o&&(0,n.jsx)("desc",{children:o}),(0,n.jsx)("path",{clipRule:"evenodd",d:"M2 0C0.89543 0 0 0.89543 0 2V48C0 49.1046 0.895431 50 2 50H38C39.1046 50 40 49.1046 40 48V14L26 0H2Z",fill:"#DFE1E2",fillRule:"evenodd"}),(0,n.jsx)("path",{clipRule:"evenodd",d:"M26 0V14H40",fill:"#C7CACC",fillRule:"evenodd"}),(0,n.jsx)("path",{d:"M13.534 22.9863V24.4163H10.245V26.4458H12.984V27.8813H10.245V30.9998H8.375V22.9863H13.534Z",fill:"#414448"}),(0,n.jsx)("path",{d:"M17.533 30.9998H15.663V22.9863H17.533V30.9998Z",fill:"#414448"}),(0,n.jsx)("path",{d:"M21.8805 29.5148H24.8505V30.9998H20.0215V22.9863H21.8805V29.5148Z",fill:"#414448"}),(0,n.jsx)("path",{d:"M31.8846 22.9863V24.4163H28.5956V26.2863H31.1146V27.6613H28.5956V29.5698H31.8846V30.9998H26.7256V22.9863H31.8846Z",fill:"#414448"})]}),gD=({"aria-hidden":e,"aria-label":t,className:s,desc:o="",height:r="50",role:a="img",title:i="",width:c="40"})=>(0,n.jsxs)("svg",{"aria-hidden":e,"aria-label":t,className:s,fill:"none",focusable:"false",height:r,role:a,viewBox:"0 0 40 50",width:c,xmlns:"http://www.w3.org/2000/svg",children:[i&&(0,n.jsx)("title",{children:i}),o&&(0,n.jsx)("desc",{children:o}),(0,n.jsx)("path",{clipRule:"evenodd",d:"M2 0C0.89543 0 0 0.89543 0 2V48C0 49.1046 0.895431 50 2 50H38C39.1046 50 40 49.1046 40 48V14L26 0H2Z",fill:"#C3CEED",fillRule:"evenodd"}),(0,n.jsx)("path",{clipRule:"evenodd",d:"M26 0V14H40",fill:"#96A9E0",fillRule:"evenodd"}),(0,n.jsx)("path",{d:"M14.8355 26.9904C14.8355 27.5698 14.7346 28.1051 14.533 28.5964C14.335 29.0841 14.0545 29.5076 13.6915 29.8669C13.3285 30.2226 12.8903 30.5013 12.377 30.7029C11.8673 30.9009 11.3008 30.9999 10.6775 30.9999H7.56445V22.9864H10.6775C11.3008 22.9864 11.8673 23.0873 12.377 23.2889C12.8903 23.4906 13.3285 23.7693 13.6915 24.1249C14.0545 24.4806 14.335 24.9041 14.533 25.3954C14.7346 25.8831 14.8355 26.4148 14.8355 26.9904ZM12.9325 26.9904C12.9325 26.5944 12.8811 26.2369 12.7785 25.9179C12.6758 25.5989 12.5273 25.3294 12.333 25.1094C12.1423 24.8858 11.9076 24.7153 11.629 24.5979C11.3503 24.4769 11.0331 24.4164 10.6775 24.4164H9.43445V29.5699H10.6775C11.0331 29.5699 11.3503 29.5113 11.629 29.3939C11.9076 29.2729 12.1423 29.1024 12.333 28.8824C12.5273 28.6588 12.6758 28.3874 12.7785 28.0684C12.8811 27.7494 12.9325 27.3901 12.9325 26.9904Z",fill:"#0C3092"}),(0,n.jsx)("path",{d:"M24.6375 26.9904C24.6375 27.5698 24.5367 28.1088 24.335 28.6074C24.137 29.1061 23.8565 29.5406 23.4935 29.9109C23.1305 30.2776 22.6923 30.5654 22.179 30.7744C21.6693 30.9834 21.1028 31.0879 20.4795 31.0879C19.8562 31.0879 19.2878 30.9834 18.7745 30.7744C18.2612 30.5654 17.8212 30.2776 17.4545 29.9109C17.0915 29.5406 16.8092 29.1061 16.6075 28.6074C16.4095 28.1088 16.3105 27.5698 16.3105 26.9904C16.3105 26.4111 16.4095 25.8721 16.6075 25.3734C16.8092 24.8748 17.0915 24.4421 17.4545 24.0754C17.8212 23.7088 18.2612 23.4209 18.7745 23.2119C19.2878 23.0029 19.8562 22.8984 20.4795 22.8984C21.1028 22.8984 21.6693 23.0048 22.179 23.2174C22.6923 23.4264 23.1305 23.7143 23.4935 24.0809C23.8565 24.4476 24.137 24.8803 24.335 25.3789C24.5367 25.8776 24.6375 26.4148 24.6375 26.9904ZM22.7345 26.9904C22.7345 26.5944 22.6832 26.2388 22.5805 25.9234C22.4779 25.6044 22.3293 25.3349 22.135 25.1149C21.9443 24.8949 21.7097 24.7263 21.431 24.6089C21.1523 24.4916 20.8352 24.4329 20.4795 24.4329C20.1202 24.4329 19.7993 24.4916 19.517 24.6089C19.2383 24.7263 19.0018 24.8949 18.8075 25.1149C18.6168 25.3349 18.4702 25.6044 18.3675 25.9234C18.2648 26.2388 18.2135 26.5944 18.2135 26.9904C18.2135 27.3901 18.2648 27.7494 18.3675 28.0684C18.4702 28.3838 18.6168 28.6514 18.8075 28.8714C19.0018 29.0914 19.2383 29.2601 19.517 29.3774C19.7993 29.4911 20.1202 29.5479 20.4795 29.5479C20.8352 29.5479 21.1523 29.4911 21.431 29.3774C21.7097 29.2601 21.9443 29.0914 22.135 28.8714C22.3293 28.6514 22.4779 28.3838 22.5805 28.0684C22.6832 27.7494 22.7345 27.3901 22.7345 26.9904Z",fill:"#0C3092"}),(0,n.jsx)("path",{d:"M31.9109 28.9264C31.9549 28.9264 31.9989 28.9356 32.0429 28.9539C32.0869 28.9686 32.129 28.9961 32.1694 29.0364L32.9064 29.8119C32.5837 30.2336 32.1785 30.5526 31.6909 30.7689C31.2069 30.9816 30.633 31.0879 29.9694 31.0879C29.3607 31.0879 28.8144 30.9853 28.3304 30.7799C27.85 30.5709 27.4412 30.2849 27.1039 29.9219C26.7702 29.5553 26.5135 29.1226 26.3339 28.6239C26.1542 28.1216 26.0644 27.5771 26.0644 26.9904C26.0644 26.3928 26.167 25.8446 26.3724 25.3459C26.5777 24.8436 26.8637 24.4109 27.2304 24.0479C27.6007 23.6849 28.0425 23.4026 28.5559 23.2009C29.0692 22.9993 29.6357 22.8984 30.2554 22.8984C30.556 22.8984 30.8384 22.9259 31.1024 22.9809C31.37 23.0323 31.6194 23.1056 31.8504 23.2009C32.0814 23.2926 32.294 23.4044 32.4884 23.5364C32.6827 23.6648 32.855 23.8078 33.0054 23.9654L32.3784 24.8069C32.338 24.8583 32.2904 24.9059 32.2354 24.9499C32.1804 24.9903 32.1034 25.0104 32.0044 25.0104C31.9384 25.0104 31.876 24.9958 31.8174 24.9664C31.7587 24.9371 31.6964 24.9023 31.6304 24.8619C31.5644 24.8179 31.491 24.7721 31.4104 24.7244C31.3334 24.6731 31.2399 24.6273 31.1299 24.5869C31.0235 24.5429 30.897 24.5063 30.7504 24.4769C30.6074 24.4476 30.4387 24.4329 30.2444 24.4329C29.907 24.4329 29.599 24.4934 29.3204 24.6144C29.0417 24.7318 28.8015 24.9023 28.5999 25.1259C28.4019 25.3459 28.246 25.6136 28.1324 25.9289C28.0224 26.2443 27.9674 26.5981 27.9674 26.9904C27.9674 27.4011 28.0224 27.7659 28.1324 28.0849C28.246 28.4039 28.3982 28.6734 28.5889 28.8934C28.7832 29.1098 29.0087 29.2748 29.2654 29.3884C29.522 29.5021 29.797 29.5589 30.0904 29.5589C30.259 29.5589 30.413 29.5516 30.5524 29.5369C30.6917 29.5186 30.82 29.4893 30.9374 29.4489C31.0584 29.4086 31.172 29.3573 31.2784 29.2949C31.3884 29.2289 31.4984 29.1483 31.6084 29.0529C31.6524 29.0163 31.7 28.9869 31.7514 28.9649C31.8027 28.9393 31.8559 28.9264 31.9109 28.9264Z",fill:"#0C3092"})]}),vD=({"aria-hidden":e,"aria-label":t,className:s,desc:o="",height:r="50",role:a="img",title:i="",width:c="40"})=>(0,n.jsxs)("svg",{"aria-hidden":e,"aria-label":t,className:s,fill:"none",focusable:"false",height:r,role:a,viewBox:"0 0 40 50",width:c,xmlns:"http://www.w3.org/2000/svg",children:[i&&(0,n.jsx)("title",{children:i}),o&&(0,n.jsx)("desc",{children:o}),(0,n.jsx)("path",{clipRule:"evenodd",d:"M2 0C0.89543 0 0 0.89543 0 2V48C0 49.1046 0.895431 50 2 50H38C39.1046 50 40 49.1046 40 48V14L26 0H2Z",fill:"#F5D0CE",fillRule:"evenodd"}),(0,n.jsx)("path",{clipRule:"evenodd",d:"M26 0V14H40",fill:"#EDADA9",fillRule:"evenodd"}),(0,n.jsx)("path",{d:"M10.8678 28.3213V30.9998H9.00879V22.9863H11.8358C12.4005 22.9863 12.8845 23.0542 13.2878 23.1898C13.6948 23.3218 14.0285 23.5052 14.2888 23.7398C14.5528 23.9745 14.7471 24.2513 14.8718 24.5703C14.9965 24.8893 15.0588 25.234 15.0588 25.6043C15.0588 26.004 14.9946 26.3707 14.8663 26.7043C14.738 27.038 14.5418 27.324 14.2778 27.5623C14.0138 27.8007 13.6783 27.9877 13.2713 28.1233C12.868 28.2553 12.3895 28.3213 11.8358 28.3213H10.8678ZM10.8678 26.9188H11.8358C12.3198 26.9188 12.6681 26.8033 12.8808 26.5723C13.0935 26.3413 13.1998 26.0187 13.1998 25.6043C13.1998 25.421 13.1723 25.2542 13.1173 25.1038C13.0623 24.9535 12.978 24.8252 12.8643 24.7188C12.7543 24.6088 12.6131 24.5245 12.4408 24.4658C12.2721 24.4072 12.0705 24.3778 11.8358 24.3778H10.8678V26.9188Z",fill:"#771D18"}),(0,n.jsx)("path",{d:"M24.2944 26.9903C24.2944 27.5697 24.1936 28.105 23.9919 28.5963C23.7939 29.084 23.5134 29.5075 23.1504 29.8668C22.7874 30.2225 22.3493 30.5012 21.8359 30.7028C21.3263 30.9008 20.7598 30.9998 20.1364 30.9998H17.0234V22.9863H20.1364C20.7598 22.9863 21.3263 23.0872 21.8359 23.2888C22.3493 23.4905 22.7874 23.7692 23.1504 24.1248C23.5134 24.4805 23.7939 24.904 23.9919 25.3953C24.1936 25.883 24.2944 26.4147 24.2944 26.9903ZM22.3914 26.9903C22.3914 26.5943 22.3401 26.2368 22.2374 25.9178C22.1348 25.5988 21.9863 25.3293 21.7919 25.1093C21.6013 24.8857 21.3666 24.7152 21.0879 24.5978C20.8093 24.4768 20.4921 24.4163 20.1364 24.4163H18.8934V29.5698H20.1364C20.4921 29.5698 20.8093 29.5112 21.0879 29.3938C21.3666 29.2728 21.6013 29.1023 21.7919 28.8823C21.9863 28.6587 22.1348 28.3873 22.2374 28.0683C22.3401 27.7493 22.3914 27.39 22.3914 26.9903Z",fill:"#771D18"}),(0,n.jsx)("path",{d:"M31.3465 22.9863V24.4163H28.0575V26.4458H30.7965V27.8813H28.0575V30.9998H26.1875V22.9863H31.3465Z",fill:"#771D18"})]}),CD=({"aria-hidden":e,"aria-label":t,className:s,desc:o="",height:r="50",role:a="img",title:i="",width:c="40"})=>(0,n.jsxs)("svg",{"aria-hidden":e,"aria-label":t,className:s,fill:"none",focusable:"false",height:r,role:a,viewBox:"0 0 40 50",width:c,xmlns:"http://www.w3.org/2000/svg",children:[i&&(0,n.jsx)("title",{children:i}),o&&(0,n.jsx)("desc",{children:o}),(0,n.jsx)("path",{clipRule:"evenodd",d:"M2 0C0.89543 0 0 0.89543 0 2V48C0 49.1046 0.895431 50 2 50H38C39.1046 50 40 49.1046 40 48V14L26 0H2Z",fill:"#FBDACC",fillRule:"evenodd"}),(0,n.jsx)("path",{clipRule:"evenodd",d:"M26 0V14H40",fill:"#F8BFA6",fillRule:"evenodd"}),(0,n.jsx)("path",{d:"M11.2115 28.3213V30.9998H9.35254V22.9863H12.1795C12.7442 22.9863 13.2282 23.0542 13.6315 23.1898C14.0385 23.3218 14.3722 23.5052 14.6325 23.7398C14.8965 23.9745 15.0909 24.2513 15.2155 24.5703C15.3402 24.8893 15.4025 25.234 15.4025 25.6043C15.4025 26.004 15.3384 26.3707 15.21 26.7043C15.0817 27.038 14.8855 27.324 14.6215 27.5623C14.3575 27.8007 14.022 27.9877 13.615 28.1233C13.2117 28.2553 12.7332 28.3213 12.1795 28.3213H11.2115ZM11.2115 26.9188H12.1795C12.6635 26.9188 13.0119 26.8033 13.2245 26.5723C13.4372 26.3413 13.5435 26.0187 13.5435 25.6043C13.5435 25.421 13.516 25.2542 13.461 25.1038C13.406 24.9535 13.3217 24.8252 13.208 24.7188C13.098 24.6088 12.9569 24.5245 12.7845 24.4658C12.6159 24.4072 12.4142 24.3778 12.1795 24.3778H11.2115V26.9188Z",fill:"#7C2B0E"}),(0,n.jsx)("path",{d:"M19.2262 28.3213V30.9998H17.3672V22.9863H20.1942C20.7589 22.9863 21.2429 23.0542 21.6462 23.1898C22.0532 23.3218 22.3869 23.5052 22.6472 23.7398C22.9112 23.9745 23.1055 24.2513 23.2302 24.5703C23.3549 24.8893 23.4172 25.234 23.4172 25.6043C23.4172 26.004 23.353 26.3707 23.2247 26.7043C23.0964 27.038 22.9002 27.324 22.6362 27.5623C22.3722 27.8007 22.0367 27.9877 21.6297 28.1233C21.2264 28.2553 20.7479 28.3213 20.1942 28.3213H19.2262ZM19.2262 26.9188H20.1942C20.6782 26.9188 21.0265 26.8033 21.2392 26.5723C21.4519 26.3413 21.5582 26.0187 21.5582 25.6043C21.5582 25.421 21.5307 25.2542 21.4757 25.1038C21.4207 24.9535 21.3364 24.8252 21.2227 24.7188C21.1127 24.6088 20.9715 24.5245 20.7992 24.4658C20.6305 24.4072 20.4289 24.3778 20.1942 24.3778H19.2262V26.9188Z",fill:"#7C2B0E"}),(0,n.jsx)("path",{d:"M31.2008 22.9863V24.4603H28.9458V30.9998H27.0868V24.4603H24.8318V22.9863H31.2008Z",fill:"#7C2B0E"})]}),xD=({"aria-hidden":e,"aria-label":t,className:s,desc:o="",height:r="50",role:a="img",title:i="",width:c="40"})=>(0,n.jsxs)("svg",{"aria-hidden":e,"aria-label":t,className:s,fill:"none",focusable:"false",height:r,role:a,viewBox:"0 0 40 50",width:c,xmlns:"http://www.w3.org/2000/svg",children:[i&&(0,n.jsx)("title",{children:i}),o&&(0,n.jsx)("desc",{children:o}),(0,n.jsx)("path",{clipRule:"evenodd",d:"M2 0C0.89543 0 0 0.89543 0 2V48C0 49.1046 0.895431 50 2 50H38C39.1046 50 40 49.1046 40 48V14L26 0H2Z",fill:"#CFEAF8",fillRule:"evenodd"}),(0,n.jsx)("path",{clipRule:"evenodd",d:"M26 0V14H40",fill:"#ABDBF3",fillRule:"evenodd"}),(0,n.jsx)("path",{d:"M11.6738 28.0355V31H9.81476V22.9865H12.4218C13.0011 22.9865 13.4943 23.047 13.9013 23.168C14.3119 23.2853 14.6456 23.4503 14.9023 23.663C15.1626 23.8757 15.3514 24.1268 15.4688 24.4165C15.5861 24.7062 15.6448 25.0215 15.6448 25.3625C15.6448 25.6228 15.6099 25.8685 15.5403 26.0995C15.4706 26.3305 15.3661 26.545 15.2268 26.743C15.0911 26.9373 14.9224 27.1115 14.7208 27.2655C14.5228 27.4195 14.2936 27.546 14.0333 27.645C14.1579 27.7073 14.2734 27.7843 14.3798 27.876C14.4898 27.9677 14.5851 28.0795 14.6658 28.2115L16.3708 31H14.6878C14.3761 31 14.1524 30.8827 14.0168 30.648L12.6858 28.3215C12.6271 28.2188 12.5574 28.1455 12.4768 28.1015C12.3998 28.0575 12.2898 28.0355 12.1468 28.0355H11.6738ZM11.6738 26.754H12.4218C12.6748 26.754 12.8893 26.7228 13.0653 26.6605C13.2449 26.5945 13.3916 26.5047 13.5053 26.391C13.6189 26.2773 13.7014 26.1453 13.7528 25.995C13.8041 25.841 13.8298 25.676 13.8298 25.5C13.8298 25.148 13.7143 24.873 13.4833 24.675C13.2559 24.477 12.9021 24.378 12.4218 24.378H11.6738V26.754Z",fill:"#144E6C"}),(0,n.jsx)("path",{d:"M23.6162 22.9865V24.4605H21.3612V31H19.5022V24.4605H17.2472V22.9865H23.6162Z",fill:"#144E6C"}),(0,n.jsx)("path",{d:"M30.5411 22.9865V24.4165H27.2521V26.446H29.9911V27.8815H27.2521V31H25.3821V22.9865H30.5411Z",fill:"#144E6C"})]}),bD=({"aria-hidden":e,"aria-label":t,className:s,desc:o="",height:r="50",role:a="img",title:i="",width:c="40"})=>(0,n.jsxs)("svg",{"aria-hidden":e,"aria-label":t,className:s,fill:"none",focusable:"false",height:r,role:a,viewBox:"0 0 40 50",width:c,xmlns:"http://www.w3.org/2000/svg",children:[i&&(0,n.jsx)("title",{children:i}),o&&(0,n.jsx)("desc",{children:o}),(0,n.jsx)("path",{clipRule:"evenodd",d:"M2 0C0.89543 0 0 0.89543 0 2V48C0 49.1046 0.895431 50 2 50H38C39.1046 50 40 49.1046 40 48V14L26 0H2Z",fill:"#D1E5D1",fillRule:"evenodd"}),(0,n.jsx)("path",{clipRule:"evenodd",d:"M26 0V14H40",fill:"#AFD1AE",fillRule:"evenodd"}),(0,n.jsx)("path",{d:"M11.8861 26.8804L9.40564 22.9864H11.2646C11.3856 22.9864 11.4736 23.0029 11.5286 23.0359C11.5873 23.0653 11.6386 23.1166 11.6826 23.1899L13.2776 25.8904C13.296 25.8428 13.3161 25.7969 13.3381 25.7529C13.3638 25.7089 13.3913 25.6631 13.4206 25.6154L14.8176 23.2174C14.9093 23.0634 15.034 22.9864 15.1916 22.9864H16.9736L14.4601 26.7979L17.0286 30.9999H15.1696C15.0486 30.9999 14.9496 30.9706 14.8726 30.9119C14.7993 30.8533 14.7406 30.7836 14.6966 30.7029L13.0906 27.8979C13.0613 27.9786 13.0283 28.0483 12.9916 28.1069L11.4956 30.7029C11.4516 30.7799 11.393 30.8496 11.3196 30.9119C11.2463 30.9706 11.1546 30.9999 11.0446 30.9999H9.30664L11.8861 26.8804Z",fill:"#265026"}),(0,n.jsx)("path",{d:"M20.6017 29.5149H23.5717V30.9999H18.7427V22.9864H20.6017V29.5149Z",fill:"#265026"}),(0,n.jsx)("path",{d:"M29.9128 24.6144C29.8578 24.7024 29.7991 24.7684 29.7368 24.8124C29.6781 24.8564 29.6011 24.8784 29.5058 24.8784C29.4215 24.8784 29.3298 24.8528 29.2308 24.8014C29.1355 24.7464 29.0255 24.6859 28.9008 24.6199C28.7798 24.5539 28.6405 24.4953 28.4828 24.4439C28.3251 24.3889 28.1455 24.3614 27.9438 24.3614C27.5955 24.3614 27.3351 24.4366 27.1628 24.5869C26.9941 24.7336 26.9098 24.9334 26.9098 25.1864C26.9098 25.3478 26.9611 25.4816 27.0638 25.5879C27.1665 25.6943 27.3003 25.7859 27.4653 25.8629C27.634 25.9399 27.8246 26.0114 28.0373 26.0774C28.2536 26.1398 28.4736 26.2113 28.6973 26.2919C28.921 26.3689 29.1391 26.4606 29.3518 26.5669C29.5681 26.6733 29.7588 26.8089 29.9238 26.9739C30.0925 27.1389 30.2281 27.3406 30.3308 27.5789C30.4335 27.8136 30.4848 28.0978 30.4848 28.4314C30.4848 28.8018 30.4206 29.1483 30.2923 29.4709C30.164 29.7936 29.977 30.0759 29.7313 30.3179C29.4893 30.5563 29.1886 30.7451 28.8293 30.8844C28.4736 31.0201 28.0685 31.0879 27.6138 31.0879C27.3645 31.0879 27.1096 31.0623 26.8493 31.0109C26.5926 30.9596 26.3433 30.8881 26.1013 30.7964C25.8593 30.7011 25.632 30.5893 25.4193 30.4609C25.2066 30.3326 25.0215 30.1896 24.8638 30.0319L25.4138 29.1629C25.4541 29.0969 25.511 29.0438 25.5843 29.0034C25.6576 28.9631 25.7365 28.9429 25.8208 28.9429C25.9308 28.9429 26.0408 28.9778 26.1508 29.0474C26.2645 29.1171 26.391 29.1941 26.5303 29.2784C26.6733 29.3628 26.8365 29.4398 27.0198 29.5094C27.2031 29.5791 27.4195 29.6139 27.6688 29.6139C28.0061 29.6139 28.2683 29.5406 28.4553 29.3939C28.6423 29.2436 28.7358 29.0071 28.7358 28.6844C28.7358 28.4974 28.6845 28.3453 28.5818 28.2279C28.4791 28.1106 28.3435 28.0134 28.1748 27.9364C28.0098 27.8594 27.821 27.7916 27.6083 27.7329C27.3956 27.6743 27.1775 27.6101 26.9538 27.5404C26.7301 27.4671 26.512 27.3791 26.2993 27.2764C26.0866 27.1701 25.896 27.0326 25.7273 26.8639C25.5623 26.6916 25.4285 26.4789 25.3258 26.2259C25.2231 25.9693 25.1718 25.6539 25.1718 25.2799C25.1718 24.9793 25.2323 24.6859 25.3533 24.3999C25.4743 24.1139 25.6521 23.8591 25.8868 23.6354C26.1215 23.4118 26.4093 23.2339 26.7503 23.1019C27.0913 22.9663 27.4818 22.8984 27.9218 22.8984C28.1675 22.8984 28.4058 22.9186 28.6368 22.9589C28.8715 22.9956 29.0933 23.0524 29.3023 23.1294C29.5113 23.2028 29.7056 23.2926 29.8853 23.3989C30.0686 23.5016 30.2318 23.6189 30.3748 23.7509L29.9128 24.6144Z",fill:"#265026"})]}),yD=({"aria-hidden":e,"aria-label":t,className:s,desc:o="",height:r="50",role:a="img",title:i="",width:c="40"})=>(0,n.jsxs)("svg",{"aria-hidden":e,"aria-label":t,className:s,fill:"none",focusable:"false",height:r,role:a,viewBox:"0 0 40 50",width:c,xmlns:"http://www.w3.org/2000/svg",children:[i&&(0,n.jsx)("title",{children:i}),o&&(0,n.jsx)("desc",{children:o}),(0,n.jsx)("path",{clipRule:"evenodd",d:"M2 0C0.89543 0 0 0.89543 0 2V48C0 49.1046 0.895431 50 2 50H38C39.1046 50 40 49.1046 40 48V14L26 0H2Z",fill:"#CFEAF8",fillRule:"evenodd"}),(0,n.jsx)("path",{clipRule:"evenodd",d:"M26 0V14H40",fill:"#ABDBF3",fillRule:"evenodd"}),(0,n.jsx)("path",{d:"M16.8968 22.9863V23.6573C16.8968 23.7527 16.8802 23.8462 16.8472 23.9378C16.8179 24.0295 16.7757 24.1157 16.7207 24.1963L12.9587 29.5698H16.7758V30.9998H10.5938V30.2848C10.5938 30.2005 10.6084 30.118 10.6377 30.0373C10.6671 29.953 10.7074 29.876 10.7587 29.8063L14.5317 24.4163H10.9017V22.9863H16.8968Z",fill:"#124F6E"}),(0,n.jsx)("path",{d:"M20.7826 30.9998H18.9126V22.9863H20.7826V30.9998Z",fill:"#124F6E"}),(0,n.jsx)("path",{d:"M25.1301 28.3213V30.9998H23.2711V22.9863H26.0981C26.6627 22.9863 27.1467 23.0542 27.5501 23.1898C27.9571 23.3218 28.2907 23.5052 28.5511 23.7398C28.8151 23.9745 29.0094 24.2513 29.1341 24.5703C29.2587 24.8893 29.3211 25.234 29.3211 25.6043C29.3211 26.004 29.2569 26.3707 29.1286 26.7043C29.0002 27.038 28.8041 27.324 28.5401 27.5623C28.2761 27.8007 27.9406 27.9877 27.5336 28.1233C27.1302 28.2553 26.6517 28.3213 26.0981 28.3213H25.1301ZM25.1301 26.9188H26.0981C26.5821 26.9188 26.9304 26.8033 27.1431 26.5723C27.3557 26.3413 27.4621 26.0187 27.4621 25.6043C27.4621 25.421 27.4346 25.2542 27.3796 25.1038C27.3246 24.9535 27.2402 24.8252 27.1266 24.7188C27.0166 24.6088 26.8754 24.5245 26.7031 24.4658C26.5344 24.4072 26.3327 24.3778 26.0981 24.3778H25.1301V26.9188Z",fill:"#124F6E"})]}),X2=({title:e="Fill in the Blank",desc:t="Pencil writing on a surface",width:s="15",height:o="15",className:r,focusable:a="false"})=>(0,n.jsxs)("svg",{className:X()("i i-fillInTheBlank",r),focusable:a,height:o,viewBox:"0 0 15 15",width:s,children:[(0,n.jsx)("title",{children:e}),(0,n.jsx)("desc",{children:t}),(0,n.jsx)("path",{d:"M2.488 8.246l5.25-5.25 1.4 1.4-5.25 5.25h-1.4v-1.4zm-.875 3.15h2.625a.794.794 0 0 0 .613-.262l6.125-6.125a.846.846 0 0 0 0-1.225L8.35 1.159a.846.846 0 0 0-1.225 0L1 7.284a.794.794 0 0 0-.263.612v2.625c0 .525.35.875.875.875zM.739 13.146h14v1.75h-14z"})]});var TD,rm;const v0e=({"aria-hidden":e,"aria-label":t,className:s,desc:o,height:r="16",role:a="img",title:i,width:c="16"})=>TD("svg",{"aria-hidden":e,"aria-label":t,className:s,focusable:"false",height:r,role:a,viewBox:"0 0 16 16",width:c,xmlns:"http://www.w3.org/2000/svg",children:[i&&rm("title",{children:i}),o&&rm("desc",{children:o}),rm("path",{d:"M11.793 2.793L9 0h7v7l-2.793-2.793-2.5 2.5a.997.997 0 0 1-1.414 0 1 1 0 0 1 0-1.414l2.5-2.5zm-5.086 6.5a1 1 0 0 1 0 1.414l-2.5 2.5L7 16H0V9l2.793 2.793 2.5-2.5a1 1 0 0 1 1.414 0zm-2.5-6.5l2.5 2.5a1 1 0 1 1-1.414 1.414l-2.5-2.5L0 7V0h7L4.207 2.793zm5.086 6.5a1 1 0 0 1 1.414 0l2.5 2.5L16 9v7H9l2.793-2.793-2.5-2.5a1 1 0 0 1 0-1.414z",fill:"currentColor",fillRule:"evenodd"})]}),C0e=null;var LD,am,SD;const x0e=({title:e="Hidden",desc:t="Eye crossed out",width:s="16",height:o="14",className:r=null,focusable:a="false"})=>LD("svg",{className:SD("i i-hidden",r),focusable:a,height:o,viewBox:"0 0 16 14",width:s,children:[am("title",{children:e}),am("desc",{children:t}),am("path",{d:"M15.9,6.3c-0.1-0.1-1-1.8-2.7-3.3l1.3-1.3c0.4-0.4,0.4-1,0-1.4s-1-0.4-1.4,0l-1.6,1.6c-1-0.6-2.2-1-3.6-1 c-4.8,0-7.7,5.3-7.9,5.5C0,6.6,0,7,0.1,7.3c0.1,0.1,1,1.8,2.7,3.3l-1,1c-0.4,0.4-0.4,1,0,1.4c0.2,0.2,0.5,0.3,0.7,0.3S3,13.2,3.2,13 l1.2-1.2c1,0.6,2.2,1,3.6,1h0c4.7,0,7.7-5.3,7.9-5.5C16,7,16,6.6,15.9,6.3z M2.2,6.8c0.8-1.2,3-4,5.8-4c0.7,0,1.4,0.2,2.1,0.5 L8.5,4.9C8.4,4.8,8.2,4.8,8,4.8c-1.1,0-1.9,0.9-2,2c0,0.2,0,0.4,0.1,0.5L4.2,9.2C3.3,8.3,2.6,7.4,2.2,6.8z M8,10.8 c-0.7,0-1.4-0.2-2.1-0.5l1.6-1.6c0.2,0,0.3,0.1,0.5,0.1c0,0,0.1,0,0.1,0c1.1,0,2-0.9,2-2c0-0.2,0-0.3-0.1-0.5l1.8-1.8 c1,0.8,1.7,1.8,2,2.4C13,8,10.8,10.8,8,10.8z"})]}),b0e=null;var kD,Fl,ND;const y0e=({title:e="Label Set",desc:t="Label Set",width:s="17",height:o="17",className:r,focusable:a="false"})=>kD("svg",{className:ND("i i-labelSet",r),focusable:a,height:o,viewBox:"0 0 18 18",width:s,children:[Fl("title",{children:e}),Fl("desc",{children:t}),Fl("path",{d:"M17.63,9.76,8.24.37A.59.59,0,0,0,7.83.2h-7A.59.59,0,0,0,.2.78v7a.59.59,0,0,0,.17.42l9.39,9.39a.59.59,0,0,0,.83,0l7-7A.59.59,0,0,0,17.63,9.76ZM1.37,7.58V1.37H7.58l8.8,8.8-6.21,6.21Z"}),Fl("path",{d:"M5.48,3.33A2.15,2.15,0,1,0,7.63,5.48,2.15,2.15,0,0,0,5.48,3.33Zm0,3.13a1,1,0,1,1,1-1A1,1,0,0,1,5.48,6.46Z"})]}),T0e=null;var ID,im;const L0e=({"aria-hidden":e,"aria-label":t,className:s,desc:o,height:r="15",role:a="img",title:i,width:c="16"})=>ID("svg",{"aria-hidden":e,"aria-label":t,className:s,focusable:"false",height:r,role:a,viewBox:"0 0 16 15",width:c,xmlns:"http://www.w3.org/2000/svg",children:[i&&im("title",{children:i}),o&&im("desc",{children:o}),im("path",{d:"M0 0h16v2H0V0zm0 13h16v2H0v-2zm1-9h8a1 1 0 0 1 1 1v5a1 1 0 0 1-1 1H1a1 1 0 0 1-1-1V5a1 1 0 0 1 1-1z",fill:"currentColor",fillRule:"evenodd"})]}),S0e=null;var ED,cm,jD;const k0e=({title:e="Matching",desc:t="Two rows of stacked squares",width:s="15",height:o="15",className:r,focusable:a="false"})=>ED("svg",{className:jD("i i-matching",r),focusable:a,height:o,viewBox:"0 0 15 15",width:s,children:[cm("title",{children:e}),cm("desc",{children:t}),cm("path",{d:"M4.814 4.975H2.19V2.35h2.625v2.625zM5.69.6H1.314C.79.6.44.95.44 1.475V5.85c0 .525.35.875.875.875H5.69c.525 0 .875-.35.875-.875V1.475C6.564.95 6.214.6 5.69.6zM12.69 4.975h-2.626V2.35h2.625v2.625zM13.563.6H9.19c-.525 0-.875.35-.875.875V5.85c0 .525.35.875.875.875h4.375c.525 0 .875-.35.875-.875V1.475c0-.525-.35-.875-.875-.875zM4.814 12.85H2.19v-2.625h2.625v2.625zm.875-4.375H1.314c-.525 0-.875.35-.875.875v4.375c0 .525.35.875.875.875H5.69c.525 0 .875-.35.875-.875V9.35c0-.525-.35-.875-.875-.875zM12.69 12.85h-2.626v-2.625h2.625v2.625zm.874-4.375H9.19c-.525 0-.875.35-.875.875v4.375c0 .525.35.875.875.875h4.375c.525 0 .875-.35.875-.875V9.35c0-.525-.35-.875-.875-.875z"})]}),N0e=null;var wD,Hl,AD;const I0e=({title:e="Multiple Choice",desc:t="Stacked circles to the left of stacked lines",width:s="16",height:o="16",className:r,focusable:a="false"})=>wD("svg",{className:AD("i i-multipleChoice",r),focusable:a,height:o,viewBox:"0 0 16 16",width:s,children:[Hl("title",{children:e}),Hl("desc",{children:t}),Hl("path",{d:"M8 16A8 8 0 1 1 8 0a8 8 0 0 1 0 16zm0-2A6 6 0 1 0 8 2a6 6 0 0 0 0 12z"}),Hl("circle",{cx:"7.904",cy:"7.904",r:"1.904"})]}),E0e=null;var RD,lm,PD;const j0e=({title:e="Multiple Response",desc:t="A box with a checkmark in it",width:s="16",height:o="16",className:r,focusable:a="false"})=>RD("svg",{className:PD("i i-multipleResponse",r),focusable:a,height:o,viewBox:"0 0 16 16",width:s,children:[lm("title",{children:e}),lm("desc",{children:t}),lm("path",{d:"M15.142.332c.6 0 1 .4 1 1v14c0 .6-.4 1-1 1h-14c-.6 0-1-.4-1-1v-14c0-.6.4-1 1-1h14zm-1 14v-12h-12v12h12zm-7.978-3.308l-2-2-.707-.708L4.87 6.902l.707.707 1.3 1.3 3.317-3.33.707-.708 1.414 1.414-.707.707-4.03 4.032-.708.707-.707-.707z"})]}),w0e=null;var MD,$l,OD;const A0e=({title:e="New Slide",desc:t="New Slide",width:s="16",height:o="16",className:r,focusable:a="false"})=>MD("svg",{className:OD("i i-new-slide",r),focusable:a,height:o,viewBox:"0 0 16 16",width:s,children:[$l("title",{children:e}),$l("desc",{children:t}),$l("path",{d:"M7,12h2V9h3V7H9V4H7v3H4v2h3V12z",fillRule:"evenodd"}),$l("path",{d:"M14,14H2V2h12V14z M15,0H1C0.4,0,0,0.4,0,1v14c0,0.6,0.4,1,1,1h14c0.6,0,1-0.4,1-1V1C15.9,0.4,15.5,0,15,0z",fillRule:"evenodd"})]}),R0e=null;var BD,dm,DD;const P0e=({title:e="Next Slide",desc:t="Next Slide",width:s="16",height:o="13.4",className:r,focusable:a="false"})=>BD("svg",{className:DD("i i-next-slide",r),focusable:a,height:o,viewBox:"0 0 16 13.4",width:s,children:[dm("title",{children:e}),dm("desc",{children:t}),dm("path",{d:"M9.3,0L7.9,1.4l4.3,4.3H0v2h12.2L7.9,12l1.4,1.4L16,6.7L9.3,0",fillRule:"evenodd"})]}),M0e=null;var FD,Ai,HD;const O0e=({title:e="Hide",desc:t="Shape of an eye with a stroke through it",width:s="20",height:o="16",className:r,focusable:a="false"})=>FD("svg",{className:HD("i",r),focusable:a,height:o,viewBox:"0 0 20 16",width:s,children:[Ai("title",{children:e}),Ai("desc",{children:t}),Ai("path",{d:"M3.23,12.35 L3.94,11.64 C2.73771334,10.6447807 1.76251115,9.40361431 1.08,8 C2.47,5 5.96,2 9.99,2 C11.0161024,2.00843654 12.0323067,2.20151536 12.99,2.57 L13.76,1.8 C12.5726697,1.28490674 11.2941824,1.01288817 10,1 C5.61,1 1.52,4.28 0,8 C0.716531693,9.68559192 1.82365735,11.1766125 3.23,12.35 L3.23,12.35 Z"}),Ai("path",{d:"M16.77,3.65 L16.06,4.36 C17.2622867,5.35521926 18.2374889,6.59638569 18.92,8 C17.53,11 14.04,14 10.01,14 C8.9838976,13.9915635 7.96769327,13.7984846 7.01,13.43 L6.24,14.2 C7.43352094,14.717712 8.71907199,14.9897863 10.02,15 C14.41,15 18.5,11.72 20.02,8 C19.297748,6.3123309 18.1836278,4.82112397 16.77,3.65 L16.77,3.65 Z"}),Ai("rect",{height:"1.41",transform:"translate(9.992148, 7.999769) rotate(-45.000000) translate(-9.992148, -7.999769) ",width:"21.21",x:"-0.61285173",y:"7.29476926"})]}),B0e=null;var $D,um,VD;const D0e=({title:e="Edit",desc:t="Pencil",width:s="11",height:o="11",className:r,focusable:a="false"})=>$D("svg",{className:VD("i i-pencil",r),focusable:a,height:o,viewBox:"0 0 10 10",width:s,children:[um("title",{children:e}),um("desc",{children:t}),um("path",{d:"M8.19.19a.6.6,0,0,0-.87,0L0,7.5V10H2.5L9.81,2.69a.6.6,0,0,0,0-.87Z"})]}),F0e=null;var zD,hm;const H0e=({"aria-hidden":e,"aria-label":t,className:s,desc:o,height:r="16",role:a="img",title:i,width:c="16"})=>zD("svg",{"aria-hidden":e,"aria-label":t,className:s,fill:"none",focusable:"false",height:r,role:a,viewBox:"0 0 16 16",width:c,xmlns:"http://www.w3.org/2000/svg",children:[i&&hm("title",{children:i}),o&&hm("desc",{children:o}),hm("path",{clipRule:"evenodd",d:"M12.668 2.11458C12.5079 2.11458 12.3494 2.14611 12.2015 2.20737C12.0536 2.26863 11.9192 2.35842 11.8061 2.47161L2.93124 11.3464L2.2848 13.7167L4.6551 13.0703L13.5299 4.19546C13.6431 4.08227 13.7329 3.9479 13.7941 3.80001C13.8554 3.65212 13.8869 3.49361 13.8869 3.33353C13.8869 3.17346 13.8554 3.01495 13.7941 2.86706C13.7329 2.71917 13.6431 2.5848 13.5299 2.47161C13.4167 2.35842 13.2823 2.26863 13.1345 2.20737C12.9866 2.14611 12.8281 2.11458 12.668 2.11458ZM11.6913 0.975531C12.0009 0.847267 12.3328 0.78125 12.668 0.78125C13.0032 0.78125 13.335 0.847267 13.6447 0.975531C13.9544 1.1038 14.2357 1.2918 14.4727 1.5288C14.7097 1.7658 14.8977 2.04716 15.026 2.35682C15.1543 2.66648 15.2203 2.99837 15.2203 3.33353C15.2203 3.6687 15.1543 4.00059 15.026 4.31025C14.8977 4.61991 14.7097 4.90127 14.4727 5.13827L5.47272 14.1383C5.39069 14.2203 5.28866 14.2795 5.17673 14.31L1.51006 15.31C1.27925 15.373 1.03241 15.3074 0.863246 15.1383C0.69408 14.9691 0.628527 14.7223 0.691475 14.4915L1.69148 10.8248C1.722 10.7129 1.78121 10.6108 1.86325 10.5288L10.8632 1.5288C11.1002 1.2918 11.3816 1.1038 11.6913 0.975531Z",fill:"currentColor",fillRule:"evenodd"})]}),$0e=null;var UD=p(61919),vr=p.n(UD);class mm extends u.Component{constructor(...t){super(...t),this.maskId=`person-unknown-mask-${vr()()}`,this.pathId=`person-unknown-path-${vr()()}`}render(){const{title:t="Person Unknown",desc:s,width:o="38",height:r="38",className:a,decorative:i,focusable:c="false"}=this.props;return(0,n.jsxs)("svg",{"aria-hidden":i,className:X()("i i-person-unknown",a),focusable:c,height:r,viewBox:"0 0 38 38",width:o,children:[t&&(0,n.jsx)("title",{children:t}),s&&(0,n.jsx)("desc",{children:s}),(0,n.jsx)("defs",{children:(0,n.jsx)("circle",{cx:"19",cy:"19",id:this.pathId,r:"19"})}),(0,n.jsxs)("g",{fill:"none",fillRule:"evenodd",stroke:"none",strokeWidth:"1",children:[(0,n.jsx)("mask",{fill:"#fff",id:this.maskId,children:(0,n.jsx)("use",{href:`#${this.pathId}`})}),(0,n.jsx)("use",{fill:"#D8D8D8",href:`#${this.pathId}`}),(0,n.jsx)("path",{d:"M15.1239928,24 C12.6645753,22.6352711 11,20.0120267 11,17 C11,12.581722 14.581722,9 19,9 C23.418278,9 27,12.581722 27,17 C27,20.0120267 25.3354247,22.6352711 22.8760072,24 L23,24 C27.4182847,24 31,27.5817153 31,32 L31,43 C31,43.5522847 30.5522847,44 30,44 L8,44 C7.44771525,44 7,43.5522847 7,43 L7,32 C7,27.5817153 10.5817153,24 15,24 L15.1239928,24 Z",fill:"#ADAEAF",fillRule:"nonzero",mask:`url(#${this.maskId})`})]})]})}}function _D(e){return(0,n.jsxs)(Yt,{viewBox:"0 0 16 16",...e,children:[(0,n.jsx)("path",{d:"M14,14 L2,14 L2,2 L14,2 L14,14 Z M15,0 L1,0 C0.4,0 0,0.4 0,1 L0,15 C0,15.6 0.4,16 1,16 L15,16 C15.6,16 16,15.6 16,15 L16,1 C16,0.4 15.6,0 15,0 L15,0 Z"}),(0,n.jsx)("path",{d:"M7.9997,11 C8.5517,11 8.9997,11.448 8.9997,12 C8.9997,12.552 8.5517,13 7.9997,13 C7.4477,13 6.9997,12.552 6.9997,12 C6.9997,11.448 7.4477,11 7.9997,11"}),(0,n.jsx)("path",{d:"M7.0997,5.5 C7.2997,5.2 7.5997,5 7.9997,5 C8.5997,5 8.9997,5.4 8.9997,6 C8.9997,6.3 8.8997,6.4 8.3997,6.7 C7.7997,7.1 6.9997,7.7 6.9997,9 L6.9997,10 L8.9997,10 L8.9997,9 C8.9997,8.8 8.9997,8.7 9.4997,8.4 C10.0997,8 10.9997,7.4 10.9997,6 C10.9997,4.3 9.6997,3 7.9997,3 C6.8997,3 5.8997,3.6 5.3997,4.5 L4.8997,5.4 L6.5997,6.4 L7.0997,5.5 Z"})]})}var GD,fm;const V0e=({"aria-hidden":e,"aria-label":t,className:s,desc:o,height:r="15",role:a="img",title:i,width:c="16"})=>GD("svg",{"aria-hidden":e,"aria-label":t,className:s,focusable:"false",height:r,role:a,viewBox:"0 0 16 15",width:c,xmlns:"http://www.w3.org/2000/svg",children:[i&&fm("title",{children:i}),o&&fm("desc",{children:o}),fm("path",{d:"M0 0h16v2H0V0zm0 13h16v2H0v-2zm7-9h8a1 1 0 0 1 1 1v5a1 1 0 0 1-1 1H7a1 1 0 0 1-1-1V5a1 1 0 0 1 1-1z",fill:"currentColor",fillRule:"evenodd"})]}),z0e=null;function WD(e){return(0,n.jsx)(Yt,{viewBox:"0 0 23 17",...e,children:(0,n.jsx)("path",{d:"M19.347 8.275l1.88 1.714a.727.727 0 0 0 .98-1.074l-3.225-2.941a.727.727 0 0 0-1.027.047l-2.94 3.224a.727.727 0 0 0 1.075.98l1.802-1.976a6.545 6.545 0 0 1-11.56 4.288.727.727 0 1 0-1.114.935 8 8 0 0 0 14.129-5.197zm-16.039.162l-1.79-1.633a.727.727 0 1 0-.98 1.074l3.223 2.94c.297.272.757.25 1.028-.046l2.94-3.224a.727.727 0 0 0-1.075-.98L4.768 8.636a6.545 6.545 0 0 1 11.555-4.482.727.727 0 1 0 1.114-.936A8 8 0 0 0 3.308 8.437z",fillRule:"nonzero"})})}var q2,KD;const U0e=({width:e="16",height:t="16",className:s})=>q2("svg",{"aria-hidden":"true",className:KD("i i-search",s),fill:"currentColor",focusable:"false",height:t,viewBox:"0 0 15.6 14.7",width:e,children:q2("path",{d:"M15.2,12.8l-2.9-2.9c0.5-1,0.9-2,0.9-3.2c0-3.6-2.9-6.5-6.5-6.5c-3.6,0-6.5,2.9-6.5,6.5s2.9,6.5,6.5,6.5c1.7,0,3.2-0.6,4.4-1.7l2.8,2.8c0.4,0.4,1,0.4,1.4,0C15.6,13.8,15.6,13.2,15.2,12.8z M6.7,11.2c-2.5,0-4.5-2-4.5-4.5s2-4.5,4.5-4.5s4.5,2,4.5,4.5S9.1,11.2,6.7,11.2z"})}),_0e=null,J2=({title:e="Spinner",desc:t="Hollow circle fading from transparent to gray",width:s="21",height:o="20",className:r,focusable:a="false"})=>(0,n.jsxs)("svg",{className:X()("i i-spinner",r),focusable:a,height:o,viewBox:"0 0 21 20",width:s,children:[(0,n.jsx)("title",{children:e}),(0,n.jsx)("desc",{children:t}),(0,n.jsx)("defs",{children:(0,n.jsxs)("radialGradient",{cx:"89.364%",cy:"24.157%",fx:"89.364%",fy:"24.157%",gradientTransform:"rotate(69.991 .842 .205) scale(1 .69785)",id:"spinner-radial-gradient",r:"45.607%",children:[(0,n.jsx)("stop",{offset:"0%",stopColor:"#C8C8C8",stopOpacity:"0"}),(0,n.jsx)("stop",{offset:"100%",stopColor:"#979797"})]})}),(0,n.jsx)("path",{d:"M74.5 3c-5.523 0-10 4.477-10 10s4.477 10 10 10 10-4.477 10-10a9.957 9.957 0 0 0-1.477-5.233 1 1 0 0 0-1.703 1.048A8 8 0 1 1 74.5 5a1 1 0 0 0 0-2z",fill:"url(#spinner-radial-gradient)",fillRule:"nonzero",transform:"rotate(-159 42.222 17.43)"})]});function QD(e){return(0,n.jsxs)(Yt,{viewBox:"0 0 15 16",...e,children:[(0,n.jsx)("path",{d:"M8.69169169,1.65459164 C7.42998802,0.732912554 5.79691384,0.425404591 4.21164279,0.810071145 C2.01180284,1.34426767 0.429519485,3.32166778 0.449238273,5.51223961 C0.454317355,6.09008425 0.560978072,6.64511922 0.766531499,7.16185651 C0.884545458,7.45866364 1.19914976,7.66620336 1.53138146,7.66620336 C1.60756769,7.66620336 1.72289272,7.66620336 1.80027403,7.62903206 C2.21496611,7.48682371 2.41812939,7.05879065 2.26276924,6.65638325 C2.09725092,6.18836289 2.02345485,5.8315748 2.02345485,5.49928598 C2.02345485,4.55873965 2.44860388,3.66071502 3.19044858,3.03527987 C3.94334777,2.40027029 4.91763516,2.10993997 5.93524413,2.21694824 C6.90415367,2.31888769 7.79388929,2.81901053 8.37648985,3.58890684 C8.96058425,4.36077436 9.17300938,5.31962473 8.9590904,6.21962057 C8.94235931,6.29002074 8.92204298,6.35957612 8.89754388,6.42913149 C8.84436291,6.5969655 8.8709534,6.79042518 8.97074242,6.9599488 C9.07979329,7.14524206 9.26204269,7.2823816 9.47088259,7.33616734 C9.67285078,7.38770027 9.89573284,7.36517221 10.0812687,7.27308878 C10.2742738,7.17762614 10.4108115,7.01936655 10.4654863,6.83041248 C10.6062067,6.40012662 10.6773139,5.94111748 10.6773139,5.4666203 C10.6773139,3.96597018 9.95369412,2.57655233 8.69169169,1.65459164"}),(0,n.jsx)("path",{d:"M12.4033641,9.43002363 L7.46962051,8.60458861 L7.42312479,5.65704834 C7.42257778,4.87028142 6.91659487,4.17992696 6.16391111,3.93838024 C5.57177436,3.74839098 4.94490256,3.83320301 4.44493675,4.1709044 C3.94633846,4.50757465 3.64849231,5.04841246 3.64849231,5.61734909 L3.64849231,12.0692503 L3.27543248,11.4577787 C3.01177436,11.0154157 2.60233846,10.7096799 2.12288547,10.5967691 C1.65355214,10.4859205 1.14620171,10.5673813 0.72637265,10.8220752 C0.0398769231,11.2721719 -0.184396581,12.1996907 0.158577778,13.1957809 C0.165415385,13.210217 0.18237265,13.2532675 0.209176068,13.3208077 C0.319671795,13.5979291 0.578406838,14.2475532 0.952013675,15.0616455 L0.999603419,15.1523867 C1.20227009,15.608928 1.48534701,15.7290569 1.72739829,15.7290569 C1.84445812,15.7290569 1.95139829,15.7009581 2.03563761,15.6692503 C2.21204786,15.6022256 2.33922735,15.4880258 2.40322735,15.3387669 C2.47816752,15.1637293 2.46285128,14.9407433 2.36356923,14.7319356 C2.32992821,14.653826 1.5422359,12.8165757 1.50968889,12.7477465 C1.36828718,12.295072 1.41396239,11.9890784 1.49437265,11.9455124 C1.58845812,11.9011729 1.69403077,11.8869946 1.7730735,11.9009151 C1.9133812,11.9449968 1.98832137,12.0042879 2.05697094,12.1321504 L3.53963761,14.292666 C3.71905641,14.5633426 4.15146667,14.7654479 4.59946667,14.6061353 C4.93888547,14.4857487 5.12568889,14.2596692 5.12568889,13.9699162 L5.12568889,5.69416971 C5.12568889,5.5072739 5.23317607,5.33739205 5.39317607,5.27114071 C5.54469744,5.20927175 5.70797949,5.21984103 5.84117607,5.3018174 C5.97546667,5.38456713 6.05560342,5.52196778 6.05560342,5.66916434 L6.05560342,9.09129108 C6.05560342,9.4367261 6.34715897,9.7540623 6.69232137,9.78396563 L6.6942359,9.78396563 L12.1632274,10.6988528 C12.7868171,10.8042879 13.2397402,11.3141912 13.2397402,11.9112266 L13.2397402,15.0784017 C13.2397402,15.434406 13.5457915,15.72287 13.9235009,15.72287 C14.3009368,15.72287 14.6072615,15.434406 14.6072615,15.0784017 L14.6072615,11.9112266 C14.6072615,10.6893147 13.6809026,9.64579162 12.4033641,9.43002363"})]})}var YD,pm,ZD;const W0e=({title:e="Remove",desc:t="Trash can",width:s="10",height:o="13",className:r=null,focusable:a="false"})=>YD("svg",{className:ZD("i i-trash",r),focusable:a,height:o,viewBox:"0 0 10 13",width:s,children:[pm("title",{children:e}),pm("desc",{children:t}),pm("path",{d:"M9.28713712,12.0991694 C9.28713712,12.4960933 8.96564674,12.814808 8.57149855,12.814808 L1.42899128,12.814808 C1.03500637,12.814808 0.714169089,12.4960933 0.714169089,12.0991694 L0.714169089,4.9568254 L9.28713712,4.9568254 L9.28713712,12.0991694 L9.28713712,12.0991694 Z M10,3.33274903 L0,3.33274903 L0,2.62053925 C0,2.22508485 0.319367795,1.90571706 0.714169089,1.90571706 L2.85830911,1.90571706 L2.85830911,1.19220107 C2.85830911,0.798052883 3.17702381,0.4765625 3.5724782,0.4765625 L6.42948111,0.4765625 C6.82346602,0.4765625 7.1436502,0.798052883 7.1436502,1.19220107 L7.1436502,1.90571706 L9.28713712,1.90571706 C9.68046893,1.90571706 10,2.22524813 10,2.62053925 L10,3.33274903 L10,3.33274903 Z"})]}),K0e=null;var XD,ga;const Q0e=({"aria-hidden":e,"aria-label":t,className:s,desc:o,height:r="16",role:a="img",title:i,width:c="14"})=>XD("svg",{"aria-hidden":e,"aria-label":t,className:s,fill:"none",focusable:"false",height:r,role:a,viewBox:"0 0 14 16",width:c,xmlns:"http://www.w3.org/2000/svg",children:[i&&ga("title",{children:i}),o&&ga("desc",{children:o}),ga("path",{clipRule:"evenodd",d:"M0.332031 4.00033C0.332031 3.63214 0.630508 3.33366 0.998698 3.33366H12.9987C13.3669 3.33366 13.6654 3.63214 13.6654 4.00033C13.6654 4.36852 13.3669 4.66699 12.9987 4.66699H0.998698C0.630508 4.66699 0.332031 4.36852 0.332031 4.00033Z",fill:"currentColor",fillRule:"evenodd"}),ga("path",{clipRule:"evenodd",d:"M5.66536 2.00033C5.48855 2.00033 5.31898 2.07056 5.19396 2.19559C5.06894 2.32061 4.9987 2.49018 4.9987 2.66699V3.33366H8.9987V2.66699C8.9987 2.49018 8.92846 2.32061 8.80344 2.19559C8.67841 2.07056 8.50884 2.00033 8.33203 2.00033H5.66536ZM10.332 3.33366V2.66699C10.332 2.13656 10.1213 1.62785 9.74624 1.25278C9.37117 0.877706 8.86246 0.666992 8.33203 0.666992H5.66536C5.13493 0.666992 4.62622 0.877706 4.25115 1.25278C3.87608 1.62785 3.66536 2.13656 3.66536 2.66699V3.33366H2.33203C1.96384 3.33366 1.66536 3.63214 1.66536 4.00033V13.3337C1.66536 13.8641 1.87608 14.3728 2.25115 14.7479C2.62622 15.1229 3.13493 15.3337 3.66536 15.3337H10.332C10.8625 15.3337 11.3712 15.1229 11.7462 14.7479C12.1213 14.3728 12.332 13.8641 12.332 13.3337V4.00033C12.332 3.63214 12.0336 3.33366 11.6654 3.33366H10.332ZM2.9987 4.66699V13.3337C2.9987 13.5105 3.06894 13.68 3.19396 13.8051C3.31898 13.9301 3.48855 14.0003 3.66536 14.0003H10.332C10.5088 14.0003 10.6784 13.9301 10.8034 13.8051C10.9285 13.68 10.9987 13.5105 10.9987 13.3337V4.66699H2.9987Z",fill:"currentColor",fillRule:"evenodd"}),ga("path",{clipRule:"evenodd",d:"M5.66536 6.66699C6.03355 6.66699 6.33203 6.96547 6.33203 7.33366V11.3337C6.33203 11.7018 6.03355 12.0003 5.66536 12.0003C5.29717 12.0003 4.9987 11.7018 4.9987 11.3337V7.33366C4.9987 6.96547 5.29717 6.66699 5.66536 6.66699Z",fill:"currentColor",fillRule:"evenodd"}),ga("path",{clipRule:"evenodd",d:"M8.33203 6.66699C8.70022 6.66699 8.9987 6.96547 8.9987 7.33366V11.3337C8.9987 11.7018 8.70022 12.0003 8.33203 12.0003C7.96384 12.0003 7.66536 11.7018 7.66536 11.3337V7.33366C7.66536 6.96547 7.96384 6.66699 8.33203 6.66699Z",fill:"currentColor",fillRule:"evenodd"})]}),Y0e=null;var qD,Vl,JD;const Z0e=({title:e="Upload",desc:t="Upload icon",width:s="15",height:o="15",className:r="",focusable:a="false"})=>qD("svg",{className:JD("i",r),focusable:a,height:o,viewBox:"0 0 15 15",width:s,children:[Vl("title",{children:e}),Vl("desc",{children:t}),Vl("polygon",{points:"6.52941176 3.52941176 6.52941176 9.70588235 8.29411765 9.70588235 8.29411765 3.52941176 10.4117647 3.52941176 7.41176471 0 4.41176471 3.52941176"}),Vl("path",{d:"M14.0625,14.1176471 L0.9375,14.1176471 C0.375,14.1176471 0,13.7647059 0,13.2352941 L0,5.29411765 C0,4.76470588 0.375,4.41176471 0.9375,4.41176471 L3.75,4.41176471 L3.75,6.17647059 L1.875,6.17647059 L1.875,12.3529412 L13.125,12.3529412 L13.125,6.17647059 L11.25,6.17647059 L11.25,4.41176471 L14.0625,4.41176471 C14.625,4.41176471 15,4.76470588 15,5.29411765 L15,13.2352941 C15,13.7647059 14.625,14.1176471 14.0625,14.1176471"})]}),X0e=null;var eF,Ri;const q0e=({"aria-hidden":e,"aria-label":t,className:s,desc:o,height:r="14",role:a="img",title:i,width:c="14"})=>eF("svg",{"aria-hidden":e,"aria-label":t,className:s,fill:"none",focusable:"false",height:r,role:a,viewBox:"0 0 14 14",width:c,xmlns:"http://www.w3.org/2000/svg",children:[i&&Ri("title",{children:i}),o&&Ri("desc",{children:o}),Ri("path",{clipRule:"evenodd",d:"M1.00065 8.33301C1.36884 8.33301 1.66732 8.63148 1.66732 8.99967V11.6663C1.66732 11.8432 1.73756 12.0127 1.86258 12.1377C1.9876 12.2628 2.15717 12.333 2.33398 12.333H11.6673C11.8441 12.333 12.0137 12.2628 12.1387 12.1377C12.2637 12.0127 12.334 11.8432 12.334 11.6663V8.99967C12.334 8.63148 12.6325 8.33301 13.0007 8.33301C13.3688 8.33301 13.6673 8.63148 13.6673 8.99967V11.6663C13.6673 12.1968 13.4566 12.7055 13.0815 13.0806C12.7065 13.4556 12.1978 13.6663 11.6673 13.6663H2.33398C1.80355 13.6663 1.29484 13.4556 0.919771 13.0806C0.544698 12.7055 0.333984 12.1968 0.333984 11.6663V8.99967C0.333984 8.63148 0.632461 8.33301 1.00065 8.33301Z",fill:"currentColor",fillRule:"evenodd"}),Ri("path",{clipRule:"evenodd",d:"M6.52925 0.52827C6.7896 0.26792 7.21171 0.26792 7.47206 0.52827L10.8054 3.8616C11.0657 4.12195 11.0657 4.54406 10.8054 4.80441C10.545 5.06476 10.1229 5.06476 9.86258 4.80441L7.00065 1.94248L4.13872 4.80441C3.87837 5.06476 3.45626 5.06476 3.19591 4.80441C2.93556 4.54406 2.93556 4.12195 3.19591 3.8616L6.52925 0.52827Z",fill:"currentColor",fillRule:"evenodd"}),Ri("path",{clipRule:"evenodd",d:"M7.00065 0.333008C7.36884 0.333008 7.66732 0.631485 7.66732 0.999674V8.99967C7.66732 9.36786 7.36884 9.66634 7.00065 9.66634C6.63246 9.66634 6.33398 9.36786 6.33398 8.99967V0.999674C6.33398 0.631485 6.63246 0.333008 7.00065 0.333008Z",fill:"currentColor",fillRule:"evenodd"})]}),J0e=null;var tF,zl,sF;const ehe=({title:e="UploadXml",desc:t="UploadXml",width:s="18",height:o="21",className:r,focusable:a="false"})=>tF("svg",{className:sF("i i-uploadXml",r),focusable:a,height:o,viewBox:"0 0 18 21",width:s,children:[zl("title",{children:e}),zl("desc",{children:t}),zl("path",{d:"M15.88,1.2H1.6A.59.59,0,0,0,1,1.79V19.21a.59.59,0,0,0,.59.59H15.88a.59.59,0,0,0,.59-.59V1.79A.59.59,0,0,0,15.88,1.2Zm-.59,1.19V18.61H2.19V2.39Z"}),zl("path",{d:"M5.14,10.13a.59.59,0,0,0,.84,0L8.13,8v6.48a.59.59,0,0,0,1.19,0V8l2.15,2.15a.59.59,0,0,0,.84-.84L9.14,6.12a.6.6,0,0,0-.84,0L5.14,9.29A.59.59,0,0,0,5.14,10.13Z"})]}),the=null;function nF(e){return(0,n.jsx)(Yt,{viewBox:"0 0 16 12",...e,children:(0,n.jsx)("g",{transform:"translate(-1 -2)",children:(0,n.jsx)("path",{d:"M11,14 L2,14 C1.4,14 1,13.6 1,13 L1,3 C1,2.4 1.4,2 2,2 L11,2 C11.6,2 12,2.4 12,3 L12,4.5 L15.6,3 C16.3,2.8 17,3.3 17,4 L17,12 C17,12.7 16.3,13.2 15.6,12.9 L12,11.5 L12,13 C12,13.6 11.6,14 11,14 L11,14 L11,14 Z M3,12 L10,12 L10,10 C10,9.3 10.7,8.8 11.4,9.1 L15,10.6 L15,5.6 L11.4,7.1 C10.7,7.2 10,6.7 10,6 L10,4 L3,4 L3,12 L3,12 L3,12 Z"})})})}var ex,Ul,oF;const she=({title:e="Visible",desc:t="Eye",width:s="16",height:o="12",className:r=null,focusable:a="false"})=>ex("svg",{className:oF("i i-visible",r),focusable:a,height:o,viewBox:"0 0 16 12",width:s,children:[Ul("title",{children:e}),Ul("desc",{children:t}),ex("g",{children:[Ul("path",{d:"M8 2c2.84 0 5.036 2.835 5.818 4-.784 1.166-2.98 4-5.818 4-2.84 0-5.038-2.838-5.819-4.001C2.958 4.835 5.146 2 8.001 2m0 10c4.706 0 7.743-5.284 7.87-5.508a1 1 0 0 0 .001-.98C15.746 5.287 12.732 0 8 0 3.245 0 .251 5.289.126 5.514a.998.998 0 0 0 .002.975C.254 6.713 3.27 12 8 12"}),Ul("path",{d:"M8 4a2 2 0 1 1 .001 3.999A2 2 0 0 1 8 4"})]})]}),nhe=null,rF=({"aria-hidden":e,"aria-label":t,className:s,desc:o="",height:r="20",role:a="img",title:i="",style:c,width:l="20"})=>(0,n.jsxs)("svg",{"aria-hidden":e,"aria-label":t,className:X()("i i-xMarkFilled",s),focusable:"false",height:r,role:a,style:c,viewBox:"0 0 20 20",width:l,xmlns:"http://www.w3.org/2000/svg",children:[i&&(0,n.jsx)("title",{children:i}),o&&(0,n.jsx)("desc",{children:o}),(0,n.jsx)("path",{d:"M10 9.08L6.904 5.986a.65.65 0 1 0-.92.92L9.082 10l-3.096 3.096a.65.65 0 0 0 .92.92L10 10.918l3.096 3.096a.65.65 0 0 0 .92-.92L10.918 10l3.096-3.096a.65.65 0 1 0-.92-.92L10 9.082zM10 20C4.477 20 0 15.523 0 10S4.477 0 10 0s10 4.477 10 10-4.477 10-10 10z"})]}),Pi=qs()("partner-content-course-author__"),aF=({partnerContentAuthors:e,darkText:t,isImage:s,learn:o,lesson:r,isOnePage:a,selectedContentId:i})=>{const c=mr()(Xe()("id",i),e),l=$n()(["data","authors"],c),h=(r?l:e).filter(g=>g.name),m=X()(Pi("author-container"),{[Pi("author-container-padding-top")]:t}),f=X()({[Pi("gray-text")]:!o&&!a}),v=X()(Pi("author-image")),C=g=>`url(${yi({width:"76",height:"76",imageKey:g.image})})`;return(0,n.jsxs)("section",{children:[(0,n.jsx)("h2",{className:"visually-hidden",children:"Authors"}),(0,n.jsx)("ol",{className:m,"data-testid":"partner-content-course-author-container",role:"list",children:h.map(g=>(0,n.jsxs)("li",{className:Pi("author"),"data-testid":"partner-content-course-author",role:"listitem",children:[(0,n.jsx)("div",{"aria-hidden":"true",className:v,"data-testid":"partner-content-course-author-image",disabled:s,style:{backgroundImage:C(g)}}),(0,n.jsx)("span",{className:f,children:g.name})]},g.name))})]})};function iF(e){return e.partnerContent}function cF(){return de(iF)}function tx(e){return e?.partnerContent?.content??[]}function Mi(){return de(tx)}const sx=(0,Ve.Mz)(e=>os(e)?.selectedAuthorId,tx,(e,t)=>t.find(s=>s.id===e)),lF=(0,Ve.Mz)(e=>os(e)?.partnerContentId,sx,(e,t)=>e?t:void 0);function dF(){return de(sx)}function Oi(){return de(lF)}function uF(){const e=dF();return(0,u.useMemo)(()=>e?.data?.authors??null,[e])}function hF(){return Mi()?.[0]?.data?.authors}const va=$("cover"),ahe=()=>{const e=oh();if(e==null)return null;const{avatar:t,authorName:s,title:o}=e;return(0,n.jsxs)("div",{className:va("author-with-title"),children:[(0,n.jsx)(nx,{avatar:t}),(0,n.jsxs)("div",{children:[(0,n.jsx)("div",{className:va("author-name"),children:s}),(0,n.jsx)("div",{className:va("author-title"),children:o})]})]})},nx=({avatar:e})=>{const t=va("header-content-authors-avatar");return e?(0,n.jsx)("div",{className:t,"data-testid":"cover-header-content-authors-avatar",style:{backgroundImage:`url(${pt(e)})`}}):(0,n.jsx)("div",{className:t,"data-testid":"cover-header-content-authors-avatar",children:(0,n.jsx)(mm,{decorative:!0})})},mF=({className:e})=>{const{partnerContentId:t,selectedAuthorId:s,theme:o,themeId:r}=re(),{coverPageType:a}=o??{},{authorName:i,avatar:c}=oh()??{},l=be(),d=uF(),h=!!t&&d!=null,f=Et(768)&&IE(r,a),v=a===ce.LEFT_OVERLAY||a===ce.CENTERED_OVERLAY||f;if(s==="none")return null;const C=i||"Unknown User",g=va("header-content-authors").mix(e),x=va("header-content-authors-name");return h?(0,n.jsx)("div",{className:g,"data-testid":"cover-authors",children:(0,n.jsx)(fF,{isImage:v,learn:!0,partnerContentAuthors:d})}):(0,n.jsxs)("div",{className:g,"data-testid":"cover-authors",children:[(0,n.jsx)(nx,{avatar:c}),(0,n.jsxs)("div",{className:x,"data-testid":"cover-header-content-authors-name",children:[(0,n.jsx)("span",{className:"visually-hidden-always",children:l?.a11yAuthorPrefix}),(0,n.jsx)("span",{children:C})]})]})},fF=aF,En=Oe("CoverAuthors",mF),pF=$("cover"),Us=Oe("CoverContentNoImage",({children:e})=>{const t=pF("header-content");return(0,n.jsx)("div",{className:t,"data-testid":"cover-header-content",children:e})}),Cr=e=>{const t=De(),s=Ot();return gF(t,e,s)},gF=(e,t,s)=>{const{media:o,alpha:r}=t==="coverImage"?Pg(e,s):Mg(e,s),a="image"in o?Eg(o?.image?.alt):void 0;return{alpha:r,ariaLabel:a,media:o,role:jg(a)}},vF=$("cover"),gm=()=>{const e=xC(),{alpha:t,ariaLabel:s,media:o,role:r}=Cr("coverImage"),a=vF("header-image"),i=ta({alpha:t,color:e,media:o});return(0,n.jsx)("div",{"aria-label":s,className:a,role:r,style:i??void 0})},CF=$("cover"),vm=({children:e})=>{const t=xC(),s=`overlay-${t.toLowerCase()}`,o=CF("header-content",{[s]:!!t});return(0,n.jsxs)("div",{className:o,"data-testid":"cover-header-content",children:[e,(0,n.jsx)(gm,{})]})},xF=$("cover"),Bi=({hasOverlay:e=!1})=>{const{alpha:t,ariaLabel:s,media:o,role:r}=Cr("coverImage"),a=ta({alpha:t,hasOverlay:e,media:o}),i=xF("header-graphic",{"dot-com":!1});return(0,n.jsx)("div",{"aria-label":s,className:i,"data-testid":"cover-header-graphic",role:r,style:a??void 0})},bF=$("cover");function cs({children:e}){const t=!!Oi(),s=bF("header-content-info",{rbc:t,"rise-com":!1});return(0,n.jsx)("div",{className:s,"data-testid":"cover-header-content-info",children:e})}const ox=Dt("AlignLeft"),_l=Dt("ArrowDown"),Cm=Dt("ArrowRight"),rx=Dt("ArrowUp"),yF=Dt("Category"),TF=Dt("ChevronDown"),LF=Dt("ChevronUp"),SF=Dt("LessonsComplete"),kF=Dt("LessonsRequirement"),NF=Dt("QuestionBox"),IF=Dt("QuizFailed"),EF=Dt("QuizPassed"),jF=Dt("QuizRequirement"),Di=Dt("Search"),ax=Dt("ToggleDown"),wF=Dt("Touch"),AF=Dt("VideoCamera"),Gl=Dt("X"),RF=e=>{const t=e.indexOf("-");return t===-1?e:e.slice(0,t)},uhe=(e,t)=>{const s=RF(e);return t.find(({iso639Code:o})=>o===e)||t.find(({iso639Code:o})=>o===s)||t.find(({defaultId:o,defaultSet:r})=>r&&o===1)},Ca=({percent:e,label:t,isRTL:s})=>{if(t.includes("%")){const o=s?`%${e}`:`${e}%`;return t.replace("%",o)}return`${e} ${t}`},xr=$("cover"),PF=Oe("CoverProgress",({percentComplete:e})=>{const t=on(),s=be(),o=GC();return e===0||window.isPublicShare,null;const r=Ca({percent:e,label:s.progressSummaryPercentComplete,isRTL:t});return(0,n.jsxs)("div",{className:xr("progress"),children:[(0,n.jsx)("div",{className:xr("progress-text"),children:r}),(0,n.jsx)("div",{className:xr("progress-outer"),children:(0,n.jsx)("div",{className:xr("progress-inner"),style:{width:`${e}%`}})}),o&&(0,n.jsxs)("div",{className:xr("progress-next-lesson"),children:[(0,n.jsx)(Cm,{className:xr("progress-next-lesson-icon").toString(),decorative:!0}),(0,n.jsx)("span",{"aria-hidden":"true",className:xr("progress-next-lesson-text"),children:o}),(0,n.jsxs)("span",{className:"visually-hidden",children:["Next lesson: ",o]})]})]})});function Ut(){const e=na();return(0,n.jsx)(PF,{percentComplete:e})}const MF=$("cover"),ls=Oe("CoverTitle",()=>{const e=re(),t=Ae(e.title),s=MF("header-content-title"),o=fa("title"),r=(0,Qt.uW)(e.title)?{"data-l10n-id":e.title.l10nId}:{"data-change-path":o};return(0,n.jsx)("h1",{...r,className:s,"data-testid":"cover-header-content-title",tabIndex:-1,children:t})}),OF={SPLIT_LEFT_IMAGE:"LEFT_OVERLAY",SPLIT_RIGHT_IMAGE:"LEFT_OVERLAY",TWO_THIRDS_LEFT_IMAGE:"LEFT_OVERLAY",TWO_THIRDS_RIGHT_IMAGE:"LEFT_OVERLAY"};function ix(){const e=re(),t=UO(),s=e?.theme?.coverPageType||"CENTERED";return t?OF[s]??s:s}const BF=()=>(0,n.jsx)(n.Fragment,{children:(0,n.jsx)(vm,{children:(0,n.jsxs)(cs,{children:[(0,n.jsx)(En,{}),(0,n.jsx)(ls,{}),(0,n.jsx)(Ut,{}),(0,n.jsx)(is,{})]})})}),DF=()=>(0,n.jsx)(n.Fragment,{children:(0,n.jsx)(Us,{children:(0,n.jsxs)(cs,{children:[(0,n.jsx)(En,{}),(0,n.jsx)(ls,{}),(0,n.jsx)(Ut,{}),(0,n.jsx)(is,{})]})})}),FF=()=>(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(Bi,{}),(0,n.jsx)(Us,{children:(0,n.jsxs)(cs,{children:[(0,n.jsx)(En,{}),(0,n.jsx)(ls,{}),(0,n.jsx)(Ut,{}),(0,n.jsx)(is,{})]})})]}),HF=()=>(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(Us,{children:(0,n.jsxs)(cs,{children:[(0,n.jsx)(En,{}),(0,n.jsx)(ls,{}),(0,n.jsx)(Ut,{}),(0,n.jsx)(is,{})]})}),(0,n.jsx)(Bi,{})]});function $F(){switch(ix()){default:case ce.LEFT_OVERLAY:case ce.CENTERED_OVERLAY:return(0,n.jsx)(BF,{});case ce.LEFT:case ce.CENTERED:return(0,n.jsx)(DF,{});case ce.SPLIT_LEFT_IMAGE:case ce.TWO_THIRDS_LEFT_IMAGE:return(0,n.jsx)(HF,{});case ce.SPLIT_RIGHT_IMAGE:case ce.TWO_THIRDS_RIGHT_IMAGE:return(0,n.jsx)(FF,{})}}function VF(){return(0,n.jsx)("header",{className:"cover__header","data-testid":"cover-header",children:(0,n.jsx)($F,{})})}var zF=p(82920);const UF=$("cover");function _F({children:e}){const t=re(),{themeId:s}=t?.theme??{},o=ix(),r=zF.useMemo(()=>ca()(o),[o]),a=UF({layout:r});return(0,n.jsx)("div",{className:a,"data-testid":`cover-layout-${r}`,"data-theme-id":s,id:"cover",children:e})}const Wl=$("lesson-header"),qn=Oe("LessonHeaderAuthor",({avatar:e,authorName:t,className:s=""})=>{const o=be();return(0,n.jsxs)("div",{className:Wl("author").mix(s),children:[(0,n.jsx)("img",{alt:"",className:"lesson-header__author-img",src:e?pt(e):void 0}),(0,n.jsx)("span",{className:"visually-hidden-always",children:o?.a11yAuthorPrefix}),(0,n.jsx)("span",{className:"lesson-header__author-name",children:t})]})}),Kl=({showPartnerContent:e=!1})=>(0,n.jsx)("div",{className:Wl("author",{"partner-content":e})}),Jn=()=>(0,n.jsx)("div",{className:"lesson-header__counter"}),eo=({lessonName:e,lessonPreposition:t,totalLessons:s,lessonNumber:o,showPartnerContent:r=!1})=>{const{lmsOptions:a}=re();return(0,n.jsx)("div",{className:Wl("counter",{"partner-content":r}),children:(0,n.jsx)("div",{className:Wl("count",{"exit-button-enabled":a?.enableExitCourse}),children:`${e} ${o} ${t} ${s}`})})},xa=({description:e})=>(0,n.jsx)(ke,{className:"lesson-header__description",value:e}),GF=({children:e})=>(0,n.jsx)("div",{className:"lesson-header__grouped-row",children:e}),WF=({ariaLabel:e,imgRole:t,children:s,sectionStyles:o,topWrapClassName:r})=>(0,n.jsxs)("header",{className:"page__header",children:[(0,n.jsx)("div",{className:"page__header-limit",children:(0,n.jsx)("div",{className:"page__header-container",children:(0,n.jsx)("div",{className:"lesson-header__row",children:(0,n.jsx)("div",{className:"lesson-header__main",children:(0,n.jsx)("div",{className:"lesson-header",children:(0,n.jsx)("div",{className:r,children:s})})})})})}),(0,n.jsx)("div",{"aria-label":e,className:"page__header-bg",role:t,style:o})]}),to=({title:e,id:t})=>{const s=E2(t,"title");return(0,n.jsx)("h1",{className:"lesson-header__title","data-change-path":s,tabIndex:-1,children:(0,n.jsx)(ke,{value:e})})},Ao=$("lesson-header"),cx=e=>`url(${yi({width:76,height:76,imageKey:e.image})})`,xm=({partnerContentAuthors:e})=>{const t=e.map(o=>o.name).join(", "),s=e.length===1;return(0,n.jsxs)("div",{className:Ao("partner-content",{mobile:!0}),children:[(0,n.jsx)("div",{className:Ao("partner-content-author",{single:s}),children:e.map(o=>(0,n.jsx)("div",{className:Ao("partner-content-author-img",{single:s}),style:{backgroundImage:cx(o)}},o.name))}),(0,n.jsx)("span",{"aria-hidden":"true",className:Ao("author-name"),children:t})]})},ba=({partnerContentAuthors:e})=>{const t=be();return(0,n.jsx)("div",{className:Ao("partner-content"),children:e.map(s=>(0,n.jsxs)("div",{className:Ao("partner-content-author"),children:[(0,n.jsx)("div",{className:Ao("partner-content-author-img"),style:{backgroundImage:cx(s)}}),(0,n.jsxs)("div",{children:[(0,n.jsxs)("span",{className:"visually-hidden",children:[t?.a11yAuthorPrefix," ",s.name]}),(0,n.jsx)("span",{"aria-hidden":"true",className:Ao("author-name"),children:s.name})]})]},s.name))})};var lx=p(82920);const ya=$("lesson-header"),KF=({authorName:e,avatar:t,description:s,lessonName:o,lessonNumber:r,lessonPreposition:a,partnerContentAuthors:i,showAuthor:c,showLessonCount:l,title:d,totalLessons:h,lessonId:m})=>{const f=i!=null&&c,v=t&&e&&c&&!f,C=v||f||l,g=l&&(v||f);return(0,n.jsxs)("div",{className:ya("content"),children:[C&&(0,n.jsxs)("div",{className:ya("info-row"),children:[v?(0,n.jsx)(qn,{authorName:e,avatar:t}):(0,n.jsx)(Kl,{}),f&&(0,n.jsx)(ba,{partnerContentAuthors:i}),g&&(0,n.jsx)("span",{"aria-hidden":"true",className:ya("info-row--divider"),children:"|"}),l?(0,n.jsx)(eo,{lessonName:o,lessonNumber:r,lessonPreposition:a,totalLessons:h}):(0,n.jsx)(Jn,{})]}),(0,n.jsxs)("div",{className:ya("title-wrapper",{"no-info":!C}),children:[(0,n.jsx)(to,{id:m,title:d}),s&&(0,n.jsx)(xa,{description:s})]})]})},QF=({authorName:e,avatar:t,description:s,lessonName:o,lessonNumber:r,lessonPreposition:a,partnerContentAuthors:i,showAuthor:c,showLessonCount:l,title:d,totalLessons:h,lessonId:m})=>{const f=i!=null,v=lx.useMemo(()=>t&&e&&c&&!f,[t,e,c,f]);return(0,n.jsxs)("div",{className:ya("content"),children:[l?(0,n.jsx)(eo,{lessonName:o,lessonNumber:r,lessonPreposition:a,totalLessons:h}):(0,n.jsx)(Jn,{}),v&&(0,n.jsx)(qn,{authorName:e,avatar:t}),c&&f&&(0,n.jsx)(xm,{partnerContentAuthors:i}),(0,n.jsx)(to,{id:m,title:d}),s&&(0,n.jsx)(xa,{description:s})]})},YF=({authorName:e,avatar:t,description:s,lessonName:o,lessonNumber:r,lessonPreposition:a,partnerContentAuthors:i,showAuthor:c,showLessonCount:l,title:d,totalLessons:h,lessonId:m})=>{const f=i!=null,v=lx.useMemo(()=>t&&e&&c&&!f,[t,e,c,f]);return(0,n.jsxs)("div",{className:ya("content"),children:[l?(0,n.jsx)(eo,{lessonName:o,lessonNumber:r,lessonPreposition:a,totalLessons:h}):(0,n.jsx)(Jn,{}),(0,n.jsx)(to,{id:m,title:d}),v?(0,n.jsx)(qn,{authorName:e,avatar:t}):(0,n.jsx)(Kl,{showPartnerContent:f}),c&&f&&(0,n.jsx)(ba,{partnerContentAuthors:i}),s&&(0,n.jsx)(xa,{description:s})]})};function ZF(e){const t=zh();return e.lessonHeaderSize===li.SMALL&&!t?(0,n.jsx)(KF,{...e}):t?(0,n.jsx)(QF,{...e}):(0,n.jsx)(YF,{...e})}const Ta=e=>e===Un.FLOATING||e===Un.FLOATING_FULL;function br(){const e=WI();return Et(480)&&e===Un.FLOATING?Un.FLOATING_FULL:e}function bm({className:e,ref:t}){return(0,n.jsxs)("svg",{"aria-hidden":"true",className:e,fill:"none",focusable:"false",height:"15",ref:t,role:"img",viewBox:"0 0 16 15",width:"16",xmlns:"http://www.w3.org/2000/svg",children:[(0,n.jsx)("path",{d:"M2.34315 7.34315L8 13L13.6569 7.34315",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2"}),(0,n.jsx)("rect",{fill:"currentColor",height:"12",rx:"0.999999",width:"2",x:"7",y:"1"})]})}function dx({className:e,ref:t}){return(0,n.jsx)("svg",{"aria-hidden":"true",className:e,fill:"none",focusable:"false",ref:t,viewBox:"0 0 15 16",xmlns:"http://www.w3.org/2000/svg",children:(0,n.jsx)("path",{d:"M2 8L7.65685 13.6569L13.3137 8",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2"})})}function XF(e){const{to:t,children:s}=e,o=(0,we.zy)(),r=(0,u.useMemo)(()=>Zu(t,o),[o,t]);return(0,n.jsx)(we.k2,{...e,to:r,children:s})}var qe=p(59928);const ux="focus-lesson-content",ghe="preview-nav-to-first-lesson",vhe="preview-nav-to-cover-page",Ge="preview-nav-to-lesson-item",Che="preview-scroll-to-nav-prev",xhe="preview-scroll-to-header",ym="preview-clear-state",Ql="preview-show-nav-prev",Yl="preview-show-nav-next",hx="preview-nav-open",mx="preview-nav-close",fx="event-lesson-transition-start",px="event-lesson-transition-end",gx="event-lesson-nav-prev-visible",Tm="event-lesson-nav-prev-hidden",vx="event-lesson-nav-next-visible",Lm="event-lesson-nav-next-hidden",Sm=new WeakMap,Cx=new ResizeObserver(e=>{requestAnimationFrame(()=>{for(const t of e)Sm.get(t.target)?.(t)})});function Zl(e,t){(0,u.useEffect)(()=>{if(e)return Sm.set(e,t),()=>Sm.delete(e)},[e,t]),(0,u.useEffect)(()=>{if(e)return Cx.observe(e),()=>Cx.unobserve(e)},[e])}function qF(){const e=ct(),[t,s]=(0,u.useState)(null),o=be(),r=(0,u.useCallback)(a=>{a.target instanceof HTMLElement&&e($0({offsetHeight:a.target.offsetHeight}))},[e]);return(0,u.useLayoutEffect)(()=>{if(t)return e($0({offsetHeight:t.offsetHeight})),()=>{e($0(null))}},[e,t]),Zl(t,r),(0,n.jsx)("button",{className:"visually-hidden btn-skip-to-lesson brand--ui",onClick:xx,ref:s,type:"button",children:(0,n.jsxs)("span",{className:"btn-skip-to-lesson__wrap",children:[o?.courseSkipToLesson,(0,n.jsx)(ie,{"aria-hidden":"true",classNameIcon:"btn-skip-to-lesson__icon",name:"arrow-right"})]})})}function JF(e){(0,qe.A)(ux,e,document)}function xx(){document.dispatchEvent(new CustomEvent(ux))}function Xl(e,t){const s=[];if(e){let o=e.parentElement;for(;o&&(t?.limit==null||s.length<t.limit);){if(o===document.body){s.push(window);break}const r=window.getComputedStyle(o);(r.overflowX==="auto"||r.overflowX==="scroll"||r.overflowY==="auto"||r.overflowY==="scroll")&&s.push(o),o=o.parentElement}}return s}function bx(e){return Xl(e,{limit:1})[0]??null}function yx(e,t){(0,u.useLayoutEffect)(()=>{let s=e.current;const o=Xl(s);for(const r of o)r?.addEventListener("scroll",t);return()=>{for(const r of o)r?.removeEventListener("scroll",t)}},[t,e])}const Tx=(0,u.createContext)(!1);function ql({children:e,inert:t}){const s=km();return(0,n.jsx)(Tx.Provider,{value:s||t,children:e})}function km(){return(0,u.useContext)(Tx)}function eH(e){return e?.sessionPreferences}function Fi(){return de(eH)}const tH=(0,u.forwardRef)((e,t)=>{const{children:s,className:o="lesson-link-item-tooltip",dark:r,visible:a}=e,i=(0,u.useMemo)(()=>$(o),[o]),c=(0,n.jsx)("div",{"aria-hidden":"true",ref:t,style:{left:0,pointerEvents:"none",position:"absolute",top:0,zIndex:Number.MAX_SAFE_INTEGER},children:(0,n.jsx)("div",{style:{pointerEvents:"all"},children:(0,n.jsx)("div",{className:i({visible:a}),children:(0,n.jsx)("div",{className:i("inner",{dark:r,light:!r}),children:s})})})});return(0,In.createPortal)(c,document.getElementById("portal"))});function Lx(e){const{children:t,className:s,dark:o,restriction:r,tooltipClassName:a,style:i}=e,{prefersKeyboardNavigation:c}=Fi()??{},l=(0,u.useRef)(null),d=(0,u.useRef)(null),h=(0,u.useRef)(null),m=be(),f=km(),[v,C]=(0,u.useState)(!1),g=(0,u.useCallback)(()=>C(!0),[]),x=(0,u.useCallback)(()=>C(!1),[]),b=(0,u.useCallback)(()=>{setTimeout(g,0)},[g]),T=(0,u.useCallback)(()=>{c===!0&&x()},[x,c]),L=(0,u.useCallback)(w=>{vs(w)&&v&&(w.stopPropagation(),x())},[x,v]),y=(0,u.useCallback)(()=>{document.activeElement===l.current&&(h.current!=null&&clearTimeout(h.current),g())},[g]),S=(0,u.useCallback)(()=>{h.current=setTimeout(x,150)},[x]),k=(0,u.useCallback)(()=>{if(v&&l.current&&d.current){const w=l.current.getBoundingClientRect(),A=d.current.offsetParent?.getBoundingClientRect()??w,{height:E,width:j}=w,O=w.left-A.left,R=w.top-A.top;Object.assign(d.current.style,{transform:`translate(${O}px, ${R}px)`,width:`${j}px`,height:`${E}px`})}},[v]);(0,u.useEffect)(()=>{f&&C(!1)},[f]),(0,u.useLayoutEffect)(()=>k(),[k]),(0,qe.A)("resize",k,window),(0,qe.A)("keydown",L,document),yx(l,x);const N=lt(r?.data);let I;return r?.type===Kr.QUIZ?I=`${m?.quizRequirePassingScore}: "${N}"`:r?.type===Kr.ORDER?I=m?.lessonRestricted:r?.type===Kr.KNOWLEDGE_CHECK&&(I=m?.knowledgeCheckCorrectAnswerRequiredNav),(0,n.jsxs)("div",{"aria-disabled":!0,className:s,onBlur:T,onFocus:b,onMouseEnter:y,onMouseLeave:S,ref:l,role:"link",style:i,tabIndex:f?-1:0,children:[t,(0,n.jsx)("div",{className:"visually-hidden-always",children:m?.a11yRestrictedNav}),(0,n.jsx)("div",{className:"visually-hidden-always",children:I}),(0,n.jsx)(tH,{className:a,dark:o,ref:d,visible:v,children:I})]})}function sH(e){const{b:t,children:s,"data-direction":o,isCurrentLesson:r,isTooltipEnabled:a,lessonId:i,onClick:c=()=>{},onFocus:l,onHideProgressTooltip:d,onNavigate:h=()=>{},onShowProgressTooltip:m,restriction:f,showProgressDelay:v,style:C}=e,g=km(),T=(re()?.theme?.progressIndicatorStyle??et.THEME_DEFAULT)===et.THEME_DEFAULT,L=(0,u.useCallback)(j=>{c(j),r?(j.preventDefault(),xx()):h(i)},[i,r,c,h]),[y,S]=(0,u.useState)(!1),k=(0,u.useCallback)(j=>{!y&&a&&(v!=null?setTimeout(()=>m?.(),v):m?.()),l?.(j)},[y,l,v,m,a]),N=(0,u.useCallback)(j=>{a&&vs(j)&&d?.()},[d,a]),I=(0,u.useCallback)(()=>{a===!0&&S(!0)},[a]),w=(0,u.useCallback)(()=>{a===!0&&S(!1)},[a]),A=f?.type!=null,E=t("link",{active:r,restricted:A,"theme-default":T}).toString();return A?(0,n.jsx)(Lx,{className:E,dark:e.dark,restriction:f,style:C,tooltipClassName:e.tooltipClassName,children:s}):(0,n.jsx)(XF,{"aria-current":"page",className:E.toString(),"data-direction":o,"data-nav-item":"",onBlur:a?d:void 0,onClick:L,onFocus:k,onKeyDown:N,onMouseDown:I,onMouseUp:w,style:C,tabIndex:g?-1:void 0,to:Ns(i),children:s})}function Hi(e){const{className:t="lesson-link-item",isCurrentLesson:s,last:o,lessonId:r,style:a}=e,i=(0,u.useMemo)(()=>$(t),[t]),c=Si(r),l=c?.type!=null,{isComplete:d=!1}=Io(r)??{},h=i({active:s,complete:d,last:o,restricted:l});return(0,n.jsx)("div",{className:h,children:(0,n.jsx)(sH,{...e,b:i,isCurrentLesson:s,restriction:c,style:a})})}const nH=$("lesson-nav");function oH(e){const{children:t,finish:s,lessonId:o,onFocus:r}=e,a=es();if(o)return(0,n.jsx)(Hi,{className:"lesson-nav-link","data-direction":e["data-direction"],lessonId:String(o),onFocus:r,tooltipClassName:"lesson-nav-link-tooltip",children:t});const i=s?Wg:"/",c=l=>{l.preventDefault(),Xn(()=>{a(i)},i==="/"?"lesson-to-cover":"default")};return(0,n.jsx)("span",{className:"lesson-nav-link",children:(0,n.jsx)(as,{className:"lesson-nav-link__link","data-direction":e["data-direction"],onClick:c,onFocus:r,to:i,children:t})})}function La({children:e,className:t,direction:s,finish:o,navLessonId:r,onFocus:a,ref:i,restrictionType:c}){const d=Ci()?.theme?.buttonScheme,h=c!=null,m=br(),v={className:nH(null,{[s]:!0,accent:d===di.ACCENT,dark:d===di.DARK,floating:m===Un.FLOATING,"floating-full":m===Un.FLOATING_FULL,finish:o,full:m===Un.FULL,light:d===di.LIGHT,restricted:h,tint:d===di.TINT}).mix(t),[`data-${s}-lesson`]:!0};return(0,n.jsx)("div",{ref:i,...v,children:(0,n.jsx)(oH,{"data-direction":s,finish:o,lessonId:r,onFocus:a,children:e})})}const Sx=$("lesson-nav");function rH({allowTooltip:e,courseFinishLabel:t,onFocus:s,nextLesson:o,restrictionData:r,restrictionType:a,ref:i}){const c=o?.id,l=br(),d=Ta(l),h=d?bm:dx;return(0,n.jsxs)(La,{allowTooltip:e,direction:"next",finish:!0,isFloating:d,navLessonId:c,onFocus:s,ref:i,restrictionData:r,restrictionType:a,children:[(0,n.jsx)("span",{className:Sx("link-text").mix("brand--ui"),children:t}),(0,n.jsx)(h,{className:Sx("link-icon")})]})}const kx=$("lesson-nav");function aH({allowTooltip:e,lessonNameLabel:t,nextLesson:s,nextLessonNumber:o,onFocus:r,ref:a,restrictionData:i,restrictionType:c}){const l=s?.id,d=br(),h=Ta(d),f=dr(s)&&l,v=Ae(s?.title)||"",C=h?bm:dx,g=f?`${t} ${o} - `:"",x=h&&f?`${t} ${o}`:`${g}${v}`;return(0,n.jsxs)(La,{allowTooltip:e,direction:"next",isFloating:h,navLessonId:l,onFocus:r,ref:a,restrictionData:i,restrictionType:c,children:[(0,n.jsx)("span",{className:kx("link-text").mix("brand--ui"),children:x}),(0,n.jsx)(C,{className:kx("link-icon")})]})}function Nx({className:e,ref:t}){return(0,n.jsxs)("svg",{"aria-hidden":"true",className:e,fill:"none",focusable:"false",height:"15",ref:t,role:"img",viewBox:"0 0 16 15",width:"16",xmlns:"http://www.w3.org/2000/svg",children:[(0,n.jsx)("path",{d:"M13.6569 7.65685L8 2L2.34315 7.65686",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2"}),(0,n.jsx)("rect",{fill:"currentColor",height:"12",rx:"0.999999",transform:"rotate(180 9 14)",width:"2",x:"9",y:"14"})]})}function iH({className:e,ref:t}){return(0,n.jsx)("svg",{"aria-hidden":"true",className:e,fill:"none",focusable:"false",ref:t,viewBox:"0 0 15 16",xmlns:"http://www.w3.org/2000/svg",children:(0,n.jsx)("path",{d:"M2 8L7.65685 2.34315L13.3137 8",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2"})})}const Jl=$("lesson-nav");function cH({allowTooltip:e,className:t,courseHomeLabel:s,lessonNameLabel:o,onFocus:r,previousLesson:a,previousLessonNumber:i,ref:c}){const l=a?.id,d=br(),h=Ta(d),f=dr(a)&&l,v=Ae(a?.title)||s,C=h?Nx:iH,g=f?`${o} ${i} - ${v}`:v,x=f&&h?`${o} ${i}`:g;return(0,n.jsx)(La,{allowTooltip:e,className:t,direction:"previous",isFloating:h,navLessonId:l,onFocus:r,ref:c,children:h?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("span",{className:Jl("link-text").mix("brand--ui"),children:x}),(0,n.jsx)(C,{className:Jl("link-icon")})]}):(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(C,{className:Jl("link-icon")}),(0,n.jsx)("span",{className:Jl("link-text").mix("brand--ui"),children:x})]})})}var Me=p(70547);function lH({className:e,cx:t,cy:s,diameter:o,onTransitionEnd:r,r:a,strokeLinecap:i,strokeWidth:c,value:l=0}){const d=(0,u.useRef)(null),h=`mask-${(0,N1.A)()}`,m=(100-l)/100*(2*a);return(0,qe.A)("transitionend",r,d.current),(0,n.jsxs)("svg",{height:o,viewBox:`0 0 ${o} ${o}`,width:o,children:[(0,n.jsx)("defs",{children:(0,n.jsx)("mask",{id:h,children:(0,n.jsx)("rect",{fill:"white",height:2.3*a,width:2.3*a,x:"0",y:l===0?100:m})})}),(0,n.jsx)("circle",{className:e,cx:t,cy:s,fill:"none",mask:`url(#${h})`,r:a,ref:d,strokeLinecap:i,strokeWidth:c})]})}const Nm=lH;function dH({className:e,cx:t,cy:s,diameter:o,onTransitionEnd:r,r:a,strokeLinecap:i,strokeWidth:c,transform:l,value:d=0}){const h=(0,u.useRef)(null),m=Math.PI*(Number(o)-Number(c)),f=m*(100-d)/100;return(0,qe.A)("transitionend",r,h.current),(0,n.jsx)("circle",{className:e,cx:t,cy:s,fill:"transparent",r:a,ref:h,strokeDasharray:m,strokeDashoffset:f,strokeLinecap:i,strokeWidth:c,transform:l})}const Ix=dH;var Im=p(82920);const{COMPACT:uH,COVER:hH,OVERLAY:mH,SIDEBAR:fH}=vo,$i=$("progress-circle");function pH({"aria-hidden":e,"aria-label":t,isCurrent:s,isFailed:o,isPassed:r,scope:a,value:i}){const[c,l]=Im.useState(i===100),d=(0,Me.A)(i),{theme:h}=re()??{},m=h?.progressIndicatorStyle??et.THEME_DEFAULT,f=a===hH,v=a===mH,C=m===et.THEME_DEFAULT,g=m===et.CIRCULAR_FILL,x=m===et.INCOMPLETE_COMPLETE,b=$i({compact:a===uH,cover:f,current:s,sidebar:a===fH,overlay:v}),T=$i("track",{"circular-fill":!v&&g,"incomplete-complete":f&&x}),L=$i("runner",{"circular-fill":g,done:c,failed:o,passed:r,unstarted:i===0}),y=$i("pass",{done:c,visible:r}),S=$i("fail",{done:c,visible:o}),k=Im.useMemo(()=>g||i===100?i:0,[g,i]);return Im.useEffect(()=>{if(i!==100&&d===100)l(!1);else if(i===100&&!c&&!x){const N=setTimeout(()=>l(!0),300);return clearTimeout.bind(null,N)}else i===100&&!c&&x&&l(!0)},[c,x,d,i]),(0,n.jsxs)("svg",{"aria-hidden":e,"aria-label":t,className:b,fill:"none",focusable:"false",role:"img",viewBox:"0 0 16 16",xmlns:"https://www.w3.org/2000/svg",children:[(0,n.jsx)("circle",{className:T,cx:"8",cy:"8",fill:"transparent",r:"7",strokeWidth:"2",transform:"rotate(-89.9 8 8)"}),C?(0,n.jsx)(Ix,{className:L,cx:8,cy:8,diameter:16,r:7,strokeWidth:2,transform:"rotate(-89.9 8 8)",value:i}):(0,n.jsx)(Nm,{className:L,cx:8,cy:8,diameter:16,r:7,strokeLinecap:"round",strokeWidth:2,value:k}),(0,n.jsx)("path",{className:y,d:"M11.3227 6.65905C11.6133 6.37599 11.6347 5.89413 11.3705 5.58277C11.1063 5.27141 10.6566 5.24847 10.366 5.53152L6.93323 8.87512L5.6338 7.60944C5.3432 7.32639 4.89345 7.34933 4.62927 7.66069C4.36509 7.97205 4.38651 8.45391 4.67711 8.73697L6.45488 10.4686C6.72611 10.7328 7.14034 10.7328 7.41157 10.4686L11.3227 6.65905Z"}),(0,n.jsx)("path",{className:S,clipRule:"evenodd",d:"M9.46967 10.5303C9.76256 10.8232 10.2374 10.8232 10.5303 10.5303C10.8232 10.2374 10.8232 9.76256 10.5303 9.46967L9.06066 8L10.5303 6.53033C10.8232 6.23744 10.8232 5.76256 10.5303 5.46967C10.2374 5.17678 9.76256 5.17678 9.46967 5.46967L8 6.93934L6.53033 5.46967C6.23744 5.17678 5.76256 5.17678 5.46967 5.46967C5.17678 5.76256 5.17678 6.23744 5.46967 6.53033L6.93934 8L5.46967 9.46967C5.17678 9.76256 5.17678 10.2374 5.46967 10.5303C5.76256 10.8232 6.23744 10.8232 6.53033 10.5303L8 9.06066L9.46967 10.5303Z",fillRule:"evenodd"})]})}const Em=(0,u.createContext)({isCourseNavOpen:!1});Em.displayName="CourseNavigationContext";function gH(e){const{children:t,isCourseNavOpen:s}=e;return(0,n.jsx)(Em.Provider,{value:{isCourseNavOpen:s},children:t})}function vH(){return(0,u.useContext)(Em)}var CH;function jm(){return document.getElementById("page-wrap")}const bhe=e=>{const t=e.value.length;e.focus(),e.setSelectionRange(t,t)},yhe=e=>{const t=CH(["current","editor"],e);if(!t)return null;const s=t.value.length;return t.focus(),t.setSelectionRange(s,s),e};function wm(e,t){const s=e.getBoundingClientRect(),o=window.innerHeight||document.documentElement.clientHeight,r=window.innerWidth||document.documentElement.clientWidth;if(t==="start")return s.top>=0;if(t==="center"){if(s.height>o)return s.top<=0&&s.bottom>=o;const a=o/2,i=s.top+s.height/2,c=o*.25;return Math.abs(a-i)<c}return t==="end"?s.bottom<=o:s.top>=0&&s.left>=0&&s.bottom<=o&&s.right<=r}function xH(e,{behavior:t="smooth",offsetTop:s=0}={}){const o=bx(e);if(!o||!("getBoundingClientRect"in o)){const r=e.getBoundingClientRect().top+window.scrollY;window.scrollTo({top:Math.max(0,r-s),behavior:t})}else{const r=o.getBoundingClientRect().top,a=e.getBoundingClientRect().top-r,i=Math.max(0,o.scrollTop+a-s);o.scrollTo({top:i,behavior:t})}}function The(e){let t=requestAnimationFrame(()=>{t=requestAnimationFrame(e)});return()=>{cancelAnimationFrame(t)}}function Ex({anchor:e,popover:t,positionX:s}){if(!e||!t)return null;const o=e.getBoundingClientRect(),a=window.getComputedStyle(e).direction==="rtl",i=window.getComputedStyle(t),c=parseFloat(i.marginTop),l=t.offsetWidth,d=window.visualViewport??{width:window.innerWidth,height:window.innerHeight},h=o.top+o.height+t.offsetHeight+c>d.height?o.top-(c*2+t.offsetHeight):o.top+o.height;let m;if(s==="center"){const f=o.left+o.width/2;m=a?d.width-f-l/2:f-l/2}else s==="right"?m=a?d.width-o.left-l:o.right-l:m=Math.min(a?d.width-o.right:o.left,d.width-l);return{left:m,top:h}}const bH=10;function yH(){const e=(0,u.useRef)(null),[t,s]=(0,u.useState)(!1);return(0,u.useEffect)(()=>{let o=null;const r=()=>{const i=e.current;if(!i||!o)return;const c=o.scrollTop,l=i.getBoundingClientRect().top+c,d=c>l&&c>0;s(h=>h===d?h:d)},a=setTimeout(()=>{o=jm(),o?.addEventListener("scroll",r,{passive:!0})},bH);return()=>{clearTimeout(a),o?.removeEventListener("scroll",r)}},[]),{isSticky:t,refProgressWrap:e}}const TH=960;function Vi(){return Et(TH)}function LH(){const e=De(),t=Vi(),s=q0();return SE({course:e,isMobile:t,search:s})}function SH(){const e=De(),t=Vi();return kE({course:e,isMobile:t})}const jx=$("progress"),kH=$("lesson-progress-wrapper"),NH=()=>!!document.querySelector(".lesson--preview"),IH=({items:e,lessonProgress:t})=>{const s=t.activeIndex??-1,o=e?.length??0;return s===-1?0:s+1===o?100:e?.[s]?.linePosition?.replace("%","")??"0"},EH=({items:e,lessonProgress:t})=>{const s=t.activeIndex??0,o=e?.length??0;return s>o?100:Math.round(s/o*100)},jH=e=>{const{lessonProgress:t,type:s}=e;switch(s){case"process":return EH(e);case"sorting":return t.percentViewed??0;case"timeline":return IH(e);default:return t.percentComplete??0}},wH=e=>{const{type:t,items:s,sidebarAvailable:o,isCourseNavOpen:r,isMobile:a}=e,{isSticky:i,refProgressWrap:c}=yH(),[l]=(0,u.useState)(wo),d=r,h=r&&a,m=NH(),f=kH({visible:i&&!h}).mix(d&&o&&!m?"lesson--open":"").mix(o&&h&&!m?"lesson--open-mobile":"").toString(),v=jx({timeline:t==="timeline",video:t==="video"}).toString(),C=jH(e),g=t==="timeline"&&s&&s.map(b=>{const T=parseInt(String(C))>=parseInt(b.linePosition.slice(0,-1)),L=jx("marker",{active:T}).mix(T?"brand--background":"").toString();return(0,n.jsx)("div",{className:L,style:{left:b.linePosition}},b.id)}),x=(0,n.jsx)("div",{className:"progress-wrap",children:(0,n.jsx)("div",{className:v,children:(0,n.jsxs)("div",{className:"progress__container",children:[(0,n.jsx)("div",{className:"progress__indicator brand--background",style:{transform:`translate3d(calc(${C}% * var(--dir-x)),0px,0px)`}}),g]})})});return(0,n.jsxs)("div",{ref:c,children:[x,(0,In.createPortal)((0,n.jsx)("div",{"aria-hidden":"true",className:f,children:x}),l)]})},AH=e=>{const t=LH(),{isCourseNavOpen:s}=vH(),o=Et(480);return(0,n.jsx)(wH,{...e,isCourseNavOpen:s,isMobile:o,sidebarAvailable:t})},RH=ua,PH=ua,MH=ua,OH=ua,BH=ua,DH=ua;function jt({children:e,className:t,height:s,width:o,viewBox:r}){return(0,n.jsx)("svg",{"aria-hidden":"true",className:t,fill:"none",focusable:"false",height:s,viewBox:r,width:o,xmlns:"http://www.w3.org/2000/svg",children:e})}function FH(e){return(0,n.jsxs)(jt,{viewBox:"0 0 24 24",...e,children:[(0,n.jsx)("path",{d:"M1 10.9609L10 19.9609",stroke:"currentColor",strokeWidth:"1.5"}),(0,n.jsx)("path",{d:"M1 11.9609L10 2.96094",stroke:"currentColor",strokeWidth:"1.5"}),(0,n.jsx)("path",{d:"M2 11.5H23",stroke:"currentColor",strokeWidth:"1.5"})]})}function HH({className:e}){return(0,n.jsx)("svg",{"aria-hidden":"true",className:e,fill:"none",focusable:"false",height:"8",role:"img",viewBox:"0 0 16 8",width:"16",xmlns:"http://www.w3.org/2000/svg",children:(0,n.jsx)("path",{d:"M1 5h11.6l-1.3 1.3c-.4.4-.4 1 0 1.4.2.2.4.3.7.3.3 0 .5-.1.7-.3l3-3c.4-.4.4-1 0-1.4l-3-3c-.4-.4-1-.4-1.4 0-.4.4-.4 1 0 1.4L12.6 3H1c-.6 0-1 .4-1 1s.4 1 1 1",fill:"currentColor",fillRule:"evenodd"})})}function $H(e){return(0,n.jsx)(jt,{height:"12",viewBox:"0 0 18 12",width:"18",...e,children:(0,n.jsx)("path",{clipRule:"evenodd",d:"M0.666992 1.00002C0.666992 0.539783 1.04009 0.166687 1.50033 0.166687H14.0003C14.4606 0.166687 14.8337 0.539783 14.8337 1.00002C14.8337 1.46026 14.4606 1.83335 14.0003 1.83335H1.50033C1.04009 1.83335 0.666992 1.46026 0.666992 1.00002ZM0.666992 6.00002C0.666992 5.53978 1.04009 5.16669 1.50033 5.16669H16.5003C16.9606 5.16669 17.3337 5.53978 17.3337 6.00002C17.3337 6.46026 16.9606 6.83335 16.5003 6.83335H1.50033C1.04009 6.83335 0.666992 6.46026 0.666992 6.00002ZM0.666992 11C0.666992 10.5398 1.04009 10.1667 1.50033 10.1667H10.667C11.1272 10.1667 11.5003 10.5398 11.5003 11C11.5003 11.4603 11.1272 11.8334 10.667 11.8334H1.50033C1.04009 11.8334 0.666992 11.4603 0.666992 11Z",fill:"currentColor",fillRule:"evenodd"})})}function VH(e){return(0,n.jsx)(jt,{height:"6",viewBox:"0 0 10 6",width:"10",...e,children:(0,n.jsx)("path",{d:"M9 1L5 5L1 1",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2"})})}function zH(e){return(0,n.jsx)(jt,{height:"6",viewBox:"0 0 10 6",width:"10",...e,children:(0,n.jsx)("path",{d:"M1 5L5 1L9 5",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2"})})}function UH(e){return(0,n.jsxs)(jt,{height:"21",viewBox:"0 0 20 21",width:"20",...e,children:[(0,n.jsx)("path",{d:"M9.94535 6.125C9.1938 6.125 8.52385 6.6729 8.30039 7.48015C8.17194 7.9442 7.70954 8.21104 7.26759 8.07617C6.82564 7.94129 6.5715 7.45577 6.69996 6.99172C7.11282 5.50025 8.3916 4.375 9.94535 4.375C11.8499 4.375 13.3335 6.05606 13.3335 8.05C13.3335 9.7417 12.2656 11.2082 10.7787 11.6139V12.25C10.7787 12.7332 10.4056 13.125 9.94535 13.125C9.48511 13.125 9.11201 12.7332 9.11201 12.25V10.85C9.11201 10.3668 9.48511 9.975 9.94535 9.975C10.8628 9.975 11.6668 9.14886 11.6668 8.05C11.6668 6.95114 10.8628 6.125 9.94535 6.125Z",fill:"currentColor"}),(0,n.jsx)("path",{d:"M10.0002 14C9.53992 14 9.16683 14.3918 9.16683 14.875C9.16683 15.3582 9.53992 15.75 10.0002 15.75H10.0085C10.4687 15.75 10.8418 15.3582 10.8418 14.875C10.8418 14.3918 10.4687 14 10.0085 14H10.0002Z",fill:"currentColor"}),(0,n.jsx)("path",{clipRule:"evenodd",d:"M0.833496 3.55556C0.833496 2.01519 2.09493 0.875 3.51868 0.875H16.4816C17.9054 0.875 19.1668 2.01519 19.1668 3.55556V17.4444C19.1668 18.9848 17.9054 20.125 16.4816 20.125H3.51868C2.09493 20.125 0.833496 18.9848 0.833496 17.4444V3.55556ZM3.51868 2.625C2.89693 2.625 2.50016 3.10156 2.50016 3.55556V17.4444C2.50016 17.8984 2.89693 18.375 3.51868 18.375H16.4816C17.1034 18.375 17.5002 17.8984 17.5002 17.4444V3.55556C17.5002 3.10156 17.1034 2.625 16.4816 2.625H3.51868Z",fill:"currentColor",fillRule:"evenodd"})]})}function wx(e){const t=$t(e,["Default"]);return(0,n.jsx)(Yt,{...t,fill:"none",viewBox:"1 1 18 18",children:(0,n.jsx)("path",{clipRule:"evenodd",d:"M9.99998 0.833336C4.93737 0.833336 0.833313 4.93739 0.833313 10C0.833313 15.0626 4.93737 19.1667 9.99998 19.1667C15.0626 19.1667 19.1666 15.0626 19.1666 10C19.1666 4.93739 15.0626 0.833336 9.99998 0.833336ZM13.0892 6.91075C13.4147 7.23618 13.4147 7.76382 13.0892 8.08926L11.1785 10L13.0892 11.9107C13.4147 12.2362 13.4147 12.7638 13.0892 13.0893C12.7638 13.4147 12.2362 13.4147 11.9107 13.0893L9.99998 11.1785L8.08923 13.0893C7.7638 13.4147 7.23616 13.4147 6.91072 13.0893C6.58529 12.7638 6.58529 12.2362 6.91072 11.9107L8.82147 10L6.91072 8.08926C6.58529 7.76382 6.58529 7.23618 6.91072 6.91075C7.23616 6.58531 7.7638 6.58531 8.08923 6.91075L9.99998 8.82149L11.9107 6.91075C12.2362 6.58531 12.7638 6.58531 13.0892 6.91075Z",fill:"black",fillRule:"evenodd"})})}function ed(e){const t=$t(e,["Default"]);return(0,n.jsxs)(Yt,{...t,fill:"none",viewBox:"0 0 18 18",children:[(0,n.jsx)("circle",{cx:"9",cy:"9",fill:"#74BF44",r:"9"}),(0,n.jsx)("path",{d:"M6.43994 9.12061L8.43994 11.1206L11.9399 7.62061",stroke:"white",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5"})]})}function _H(e){return(0,n.jsx)(jt,{height:"12",viewBox:"0 0 12 12",width:"12",...e,children:(0,n.jsx)("path",{clipRule:"evenodd",d:"M5.325 9.01843C3.225 9.01843 1.5 7.37868 1.5 5.29172C1.5 3.20476 3.225 1.49048 5.325 1.49048C7.425 1.49048 9.15 3.20476 9.15 5.29172C9.15 7.37868 7.425 9.01843 5.325 9.01843ZM9.525 8.42236C10.2 7.52795 10.575 6.48447 10.575 5.29193C10.575 2.38509 8.25 0 5.325 0C2.4 0 0 2.38509 0 5.29193C0 8.19876 2.4 10.5839 5.325 10.5839C6.525 10.5839 7.65 10.2112 8.475 9.54037L10.725 11.7764C10.875 11.9255 11.1 12 11.25 12C11.4 12 11.625 11.9255 11.775 11.7764C12.075 11.4783 12.075 11.0311 11.775 10.7329L9.525 8.42236Z",fill:"currentColor",fillRule:"evenodd"})})}function GH(e){return(0,n.jsx)(jt,{height:"5",viewBox:"0 0 10 5",width:"10",...e,children:(0,n.jsx)("path",{d:"M5.56569 4.75592L8.76601 1.42259C9.27003 0.897618 8.91306 0 8.20027 0L1.79963 0C1.08683 0 0.729863 0.897618 1.23389 1.42259L4.43421 4.75592C4.74666 5.08136 5.25324 5.08136 5.56569 4.75592Z",fill:"currentColor"})})}function WH(e){return(0,n.jsxs)(jt,{height:"18",viewBox:"0 0 18 18",width:"18",...e,children:[(0,n.jsx)("path",{d:"M3.1665 6.08335C3.1665 4.01229 4.84544 2.33335 6.9165 2.33335C8.98757 2.33335 10.6665 4.01229 10.6665 6.08335C10.6665 6.37941 10.6324 6.66643 10.5681 6.9411C10.4634 7.38925 10.7417 7.83748 11.1899 7.94225C11.6381 8.04702 12.0863 7.76865 12.1911 7.3205C12.2841 6.92235 12.3332 6.50805 12.3332 6.08335C12.3332 3.09181 9.90805 0.666687 6.9165 0.666687C3.92496 0.666687 1.49984 3.09181 1.49984 6.08335C1.49984 6.46923 1.54032 6.84657 1.61756 7.21105C1.679 7.50095 1.76362 7.78236 1.86938 8.05316C1.97511 8.32389 2.10191 8.5839 2.24772 8.83119C2.48148 9.22764 2.99237 9.35953 3.38882 9.12577C3.78527 8.89201 3.91716 8.38112 3.6834 7.98467C3.58248 7.81352 3.49485 7.63379 3.42186 7.44688C3.34886 7.25994 3.29045 7.0657 3.24802 6.86551C3.1947 6.61395 3.1665 6.3524 3.1665 6.08335Z",fill:"currentColor"}),(0,n.jsx)("path",{d:"M9.18922 9.34412L14.8186 10.2697C16.2762 10.5117 17.3332 11.6819 17.3332 13.0521V16.6037C17.3332 17.0029 16.9837 17.3264 16.553 17.3264C16.122 17.3264 15.7728 17.0029 15.7728 16.6037V13.0521C15.7728 12.3826 15.2561 11.8108 14.5446 11.6926L8.30452 10.6667H8.30233C7.90851 10.6331 7.57585 10.2773 7.57585 9.8899V6.0524C7.57585 5.88733 7.48441 5.73325 7.33119 5.64046C7.17921 5.54853 6.99291 5.53668 6.82002 5.60606C6.63747 5.68035 6.51483 5.87085 6.51483 6.08044V15.3607C6.51483 15.6856 6.30169 15.9391 5.91441 16.0741C5.40325 16.2528 4.90988 16.0261 4.70516 15.7226L3.01346 13.2999C2.93513 13.1565 2.84963 13.09 2.68954 13.0406C2.59935 13.0249 2.47889 13.0408 2.37154 13.0906C2.2798 13.1394 2.22768 13.4826 2.38902 13.9902C2.41984 14.0542 3.0442 15.4844 3.27756 16.0189C3.32536 16.1284 3.35676 16.2003 3.36328 16.2152C3.47656 16.4494 3.49404 16.6994 3.40853 16.8957C3.33551 17.0631 3.1904 17.1911 2.98912 17.2663C2.893 17.3018 2.77099 17.3334 2.63742 17.3334C2.36124 17.3334 2.03826 17.1986 1.80702 16.6867L1.75272 16.5849C1.3289 15.6773 1.03464 14.952 0.90735 14.6382L0.905151 14.6328L0.896561 14.6115C0.87092 14.548 0.854463 14.5072 0.847419 14.4926C0.45609 13.3756 0.711983 12.3355 1.49527 11.8308C1.97428 11.5452 2.55316 11.4538 3.08867 11.5781C3.63572 11.7047 4.10288 12.0476 4.40371 12.5436L4.82936 13.2293V5.99429C4.82936 5.3563 5.1692 4.74981 5.7381 4.37228C6.30855 3.99359 7.0238 3.89848 7.69942 4.11153C8.55823 4.3824 9.13554 5.15654 9.13617 6.03881L9.18922 9.34412Z",fill:"currentColor"})]})}function KH(e){return(0,n.jsxs)(jt,{height:"14",viewBox:"0 0 20 14",width:"20",...e,children:[(0,n.jsx)("path",{clipRule:"evenodd",d:"M19.548 2.09234C19.8255 2.23518 20 2.52116 20 2.83331V11.1666C20 11.4788 19.8255 11.7648 19.548 11.9076C19.2704 12.0505 18.9363 12.0262 18.6823 11.8448L12.849 7.67809C12.63 7.52166 12.5 7.2691 12.5 6.99998C12.5 6.73085 12.63 6.47829 12.849 6.32187L18.6823 2.1552C18.9363 1.97376 19.2704 1.9495 19.548 2.09234ZM14.7671 6.99998L18.3333 9.54732V4.45264L14.7671 6.99998Z",fill:"currentColor",fillRule:"evenodd"}),(0,n.jsx)("path",{clipRule:"evenodd",d:"M2.5 1.99998C2.03976 1.99998 1.66667 2.37308 1.66667 2.83331V11.1666C1.66667 11.6269 2.03976 12 2.5 12H11.6667C12.1269 12 12.5 11.6269 12.5 11.1666V2.83331C12.5 2.37308 12.1269 1.99998 11.6667 1.99998H2.5ZM0 2.83331C0 1.4526 1.11929 0.333313 2.5 0.333313H11.6667C13.0474 0.333313 14.1667 1.4526 14.1667 2.83331V11.1666C14.1667 12.5474 13.0474 13.6666 11.6667 13.6666H2.5C1.11929 13.6666 0 12.5474 0 11.1666V2.83331Z",fill:"currentColor",fillRule:"evenodd"})]})}function QH(e){return(0,n.jsx)(jt,{height:"10",viewBox:"0 0 10 10",width:"10",...e,children:(0,n.jsx)("path",{clipRule:"evenodd",d:"M9.78572 9.78572C9.5 10.0714 9.07143 10.0714 8.78571 9.78572L5 6.00001L1.21429 9.78572C0.928571 10.0714 0.500001 10.0714 0.214285 9.78572C-0.0714284 9.49999 -0.0714284 9.07144 0.214285 8.78571L4 5L0.214285 1.21429C-0.0714284 0.928564 -0.0714284 0.500007 0.214285 0.214279C0.357143 0.0714143 0.500001 0 0.714286 0C0.928571 0 1.07143 0.0714143 1.21429 0.214279L5 3.99999L8.78571 0.214279C8.92857 0.0714143 9.14286 0 9.28572 0C9.42857 0 9.64286 0.0714143 9.78572 0.214279C10.0714 0.500007 10.0714 0.928564 9.78572 1.21429L6 5L9.78572 8.78571C10.0714 9.07144 10.0714 9.49999 9.78572 9.78572Z",fill:"currentColor",fillRule:"evenodd"})})}const Am=({className:e,decorative:t=!0,desc:s="Heart",focusable:o="false",height:r="16",isFilled:a=!0,title:i="Heart",width:c="16"})=>(0,n.jsxs)("svg",{"aria-hidden":t,className:X()(`i i-heart${a?"Filled":"Outline"}`,e),focusable:o,height:r,viewBox:"0 0 16 16",width:c,children:[(0,n.jsx)("title",{children:i}),(0,n.jsx)("desc",{children:s}),(0,n.jsx)("path",{d:"M11.15 1C9.838 1 8.7 1.7 8 2.75 7.3 1.7 6.162 1 4.85 1 2.75 1 1 2.75 1 4.85c0 3.85 7 9.538 7 9.538S15 8.7 15 4.85C15 2.75 13.25 1 11.15 1"})]}),Ax=({title:e="Pick One",desc:t="Pick One",width:s="16",height:o="14",className:r,focusable:a="false","aria-hidden":i})=>(0,n.jsxs)("svg",{"aria-hidden":i,className:X()("i i-pickOne",r),focusable:a,height:o,viewBox:"0 0 16 14",width:s,xmlns:"http://www.w3.org/2000/svg",children:[(0,n.jsx)("title",{children:e}),(0,n.jsx)("desc",{children:t}),(0,n.jsxs)("g",{fillRule:"evenodd",children:[(0,n.jsx)("path",{d:"M5.039 10.865A1.284 1.284 0 1 1 3.754 9.58v-1.6a2.884 2.884 0 1 0-.001 5.768 2.884 2.884 0 0 0 0-5.768v1.6c.71 0 1.286.575 1.286 1.285zM5.039 3.851a1.284 1.284 0 1 1-1.285-1.285v-1.6a2.884 2.884 0 1 0-.001 5.769 2.884 2.884 0 0 0 0-5.769v1.6c.71 0 1.286.575 1.286 1.285z",fillRule:"nonzero"}),(0,n.jsx)("path",{d:"M8.862 1.324h7v2h-7zM8.862 4.324h7v2h-7zM8.862 8.324h7v2h-7zM8.862 11.324h7v2h-7z"})]})]}),YH=$("cover"),td=Oe("CoverDetailsSection",({children:e,type:t})=>(0,n.jsx)("section",{className:YH("details-content-section",{type:t}),children:e})),Rm=e=>Is(e)===Te.LIGHT;var Ihe;const ds=qs()("partner-content-book-info__"),Rx=e=>{const{authors:t,backgroundColor:s,bookImage:o,bookTitle:r,buyLink:a,block:i,trackingInfo:c}=e,d=De()?.publishedAt,h=p2(),m=t.filter(I=>!Rt()(I.name)),f=gt()(I=>I.name,m),v=f.length>1?Yr()(" & ",f):f[0],C=v.slice(-1)==="s"?"":"s",g=Rm(s),x=X()({[ds("book-image-block")]:i&&!g},{[ds("book-image-block")&&ds("dark-theme-book-image")]:i&&g},{[ds("book-image-course")]:!i}),b=ds(i?"flex-block":"flex-course"),T=ds(i?"image-container-block":"image-container-course"),L=X()(ds("small-text"),{[ds("dark-theme")]:g}),y=X()(ds("black-text"),{[ds("dark-theme")]:g}),S=X()(ds("button"),{[ds("dark-theme-button")]:g}),k=yi({height:"210",width:"140",imageKey:o}),N=(0,u.useCallback)(()=>{},[d,h,c]);return(0,n.jsxs)("section",{className:b,children:[(0,n.jsx)("h2",{className:"visually-hidden",children:"Book Info"}),(0,n.jsx)("div",{"aria-hidden":"true",className:T,children:o?(0,n.jsx)("img",{alt:"",className:x,src:k}):(0,n.jsx)("div",{className:x})}),(0,n.jsxs)("div",{className:ds("text-container"),children:[(0,n.jsxs)("p",{className:L,children:["From ",v,"'",C]}),(0,n.jsx)("p",{className:y,children:r}),(0,n.jsx)("a",{className:S,href:a,onClick:N,rel:"noopener noreferrer",target:"_blank",children:"Buy the book"})]})]})};var jhe;const _s=qs()("partner-content-partner-info__"),Px=({backgroundColor:e,block:t,link:s,trackingInfo:o})=>{const a=De()?.publishedAt,i=p2(),c=t?gE():vE(),l=_s(t?"nbic-logo-light-bulb":"nbic-logo"),d=_s(t?"block-logo-container":"logo-container"),h=Rm(e),m=X()(_s("small-text"),{[_s("dark-theme")]:h}),f=X()(_s("black-text"),{[_s("dark-theme")]:h}),v=X()(_s("button"),{[_s("dark-theme-button")]:h}),C=(0,u.useCallback)(()=>{},[a,i,o]);return(0,n.jsxs)("section",{className:_s("flex"),children:[(0,n.jsx)("h2",{className:"visually-hidden",children:"Partner Info"}),(0,n.jsx)("div",{"aria-hidden":"true",className:d,children:(0,n.jsx)("img",{alt:"",className:l,src:c})}),(0,n.jsxs)("div",{className:_s("text-container"),children:[(0,n.jsx)("p",{className:m,children:"In partnership with"}),(0,n.jsx)("p",{className:f,children:"Next Big Idea Club"}),(0,n.jsx)("a",{className:v,href:s,onClick:C,rel:"noopener noreferrer",target:"_blank",children:"Learn more"})]})]})},Sa=qs()("partner-content-author-card__"),Mx=e=>{const{partnerContent:t}=e,s=De(),{id:o,tenantId:r}=s??{},{data:a,type:i}=t,{authors:c,bookImage:l,bookTitle:d,buyLink:h,internalId:m,nbicLink:f}=a,v=c.filter(T=>T.name),C={courseId:o,partnerContentId:t.id,partnerContentInternalId:m,tenantId:r,contentSubtype:i},g=X()(Sa("flex"),Sa("author-container")),x=T=>yi({width:"122",height:"122",imageKey:T}),b=(T,L)=>(0,n.jsx)("div",{"aria-hidden":"true",className:Sa("image-container"),children:T?(0,n.jsx)("img",{alt:L,className:Sa("author-image"),src:x(T)}):(0,n.jsx)("div",{className:Sa("author-image")})});return(0,n.jsxs)("ol",{className:"partner-content-author-card","data-testid":"partner-content-author-card",role:"list",children:[(0,n.jsx)("li",{role:"listitem",children:(0,n.jsxs)("section",{children:[(0,n.jsx)("h2",{className:"visually-hidden",children:"Authors"}),v.map(T=>(0,n.jsxs)("li",{className:g,children:[b(T.image,T.name),(0,n.jsx)("p",{className:Sa("author-name-text"),children:T.name})]},T.name))]})}),(0,n.jsx)("li",{role:"listitem",children:(0,n.jsx)(Rx,{authors:c,bookImage:l,bookTitle:d,buyLink:h,trackingInfo:C})}),(0,n.jsx)("li",{role:"listitem",children:(0,n.jsx)(Px,{link:f,trackingInfo:C})})]})},ZH=$("cover");function XH({hasLogo:e}){const t=Oi();if(!t)return null;const s=ZH("details-content-aside",{logo:e});return(0,n.jsx)("div",{className:s,children:(0,n.jsx)(td,{type:"partner-content",children:(0,n.jsx)(Mx,{partnerContent:t})})})}const qH=$("cover"),JH=Oe("CoverDetailsContentHeading",({className:e="",type:t,...s})=>{const o=$r()(["Default"],s);return(0,n.jsx)("header",{...o,className:qH("details-content-heading",{type:t}).mix(e)})}),e$=$("cover");function t$({children:e,title:t,type:s}){const o=re(),{description:r,media:a,partnerContentId:i}=o??{},c=!!i,d=(a&&"image"in a?a.image?.key:null)!=null,m=s==="outline"?r?!d&&!c?"outline-no-logo":c&&!d?"outline-has-partner-content":c&&d?"outline-has-pc-and-logo":"outline":"outline-no-description":s;return(0,n.jsxs)("section",{className:e$("details-content-section",{type:m}),children:[(0,n.jsx)(JH,{type:s,children:(0,n.jsx)("h2",{children:t})}),e]})}const s$=$("cover");function zi(){return(0,n.jsxs)("svg",{"aria-hidden":"true",className:s$("header-star"),fill:"none",height:"18",viewBox:"0 0 18 18",width:"18",xmlns:"http://www.w3.org/2000/svg",children:[(0,n.jsx)("path",{d:"M9 0V18",strokeMiterlimit:"10",strokeWidth:"0.75"}),(0,n.jsx)("path",{d:"M18 9H0",strokeMiterlimit:"10",strokeWidth:"0.75"}),(0,n.jsx)("path",{d:"M15.3 15.3002L2.69995 2.7002",strokeMiterlimit:"10",strokeWidth:"0.75"}),(0,n.jsx)("path",{d:"M2.69995 15.3002L15.3 2.7002",strokeMiterlimit:"10",strokeWidth:"0.75"})]})}const n$=()=>Et(480),o$=()=>Et(768),r$={SPLIT_LEFT_IMAGE:"CENTERED_OVERLAY",SPLIT_RIGHT_IMAGE:"CENTERED_OVERLAY",TWO_THIRDS_LEFT_IMAGE:"CENTERED_OVERLAY",TWO_THIRDS_RIGHT_IMAGE:"CENTERED_OVERLAY"};function Ox(){const e=re(),t=o$(),s=e?.theme?.coverPageType||"CENTERED";return t?r$[s]??s:s}const a$=$("cover"),i$=()=>null,c$=()=>(0,n.jsx)(n.Fragment,{children:(0,n.jsx)(vm,{children:(0,n.jsxs)(cs,{children:[(0,n.jsx)(Ut,{}),(0,n.jsx)(zi,{}),(0,n.jsx)(En,{}),(0,n.jsx)(ls,{}),(0,n.jsx)(is,{})]})})}),l$=()=>(0,n.jsx)(n.Fragment,{children:(0,n.jsx)(Us,{children:(0,n.jsxs)(cs,{children:[(0,n.jsx)(Ut,{}),(0,n.jsx)(zi,{}),(0,n.jsx)(En,{}),(0,n.jsx)(ls,{}),(0,n.jsx)(is,{})]})})}),d$=()=>(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(Bi,{}),(0,n.jsx)(Us,{children:(0,n.jsxs)(cs,{children:[(0,n.jsx)(Ut,{}),(0,n.jsx)(zi,{}),(0,n.jsx)(En,{}),(0,n.jsx)(ls,{}),(0,n.jsx)(is,{})]})})]}),u$=()=>(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(Us,{children:(0,n.jsxs)(cs,{children:[(0,n.jsx)(Ut,{}),(0,n.jsx)(zi,{}),(0,n.jsx)(En,{}),(0,n.jsx)(ls,{}),(0,n.jsx)(is,{})]})}),(0,n.jsx)(Bi,{})]}),h$=()=>(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(Us,{children:(0,n.jsxs)(cs,{children:[(0,n.jsx)(Ut,{}),(0,n.jsx)(zi,{}),(0,n.jsx)(En,{}),(0,n.jsx)(ls,{}),(0,n.jsx)(is,{})]})}),(0,n.jsx)("div",{className:"cover__header-graphic-wrap",children:(0,n.jsx)(Bi,{})})]});function m$(){switch(Ox()){default:case"CENTERED_IMAGE":return(0,n.jsx)(h$,{});case"CENTERED":case"CENTERED_ACCENT_TINT":return(0,n.jsx)(l$,{});case"SPLIT_LEFT_IMAGE":case"TWO_THIRDS_LEFT_IMAGE":return(0,n.jsx)(u$,{});case"SPLIT_RIGHT_IMAGE":case"TWO_THIRDS_RIGHT_IMAGE":return(0,n.jsx)(d$,{});case"CENTERED_OVERLAY":return(0,n.jsx)(c$,{})}}function f$(){return(0,n.jsxs)("header",{className:a$("header",{meta:!1}),"data-testid":"cover-header",children:[(0,n.jsx)(m$,{}),(0,n.jsx)(u.Suspense,{children:(0,n.jsx)(i$,{})})]})}var p$=p(82920);const g$=$("cover");function v$({children:e}){const t=re(),{themeId:s}=t?.theme??{},o=Ox(),r=p$.useMemo(()=>ca()(o),[o]),a=g$(null,{layout:r});return(0,n.jsx)("div",{className:a,"data-testid":`cover-layout-${r}`,"data-theme-id":s,id:"cover",children:e})}var Bx=p(82920);const Pm=$("lesson-header"),C$=({authorName:e,avatar:t,lessonName:s,lessonNumber:o,lessonPreposition:r,partnerContentAuthors:a,showAuthor:i,showLessonCount:c,title:l,totalLessons:d,lessonId:h})=>{const m=a!=null&&i,f=t&&e&&i&&!m,v=f||m||c,C=c&&(f||m);return(0,n.jsxs)("div",{className:Pm("content"),children:[v&&(0,n.jsxs)("div",{className:Pm("info-row"),children:[f?(0,n.jsx)(qn,{authorName:e,avatar:t}):(0,n.jsx)(Kl,{}),m&&(0,n.jsx)(ba,{partnerContentAuthors:a}),C&&(0,n.jsx)("span",{"aria-hidden":"true",className:Pm("info-row--divider"),children:"|"}),c?(0,n.jsx)(eo,{lessonName:s,lessonNumber:o,lessonPreposition:r,totalLessons:d}):(0,n.jsx)(Jn,{})]}),(0,n.jsx)("div",{children:(0,n.jsx)(to,{id:h,title:l})})]})},x$=({authorName:e,avatar:t,lessonName:s,lessonNumber:o,lessonPreposition:r,partnerContentAuthors:a,showAuthor:i,showLessonCount:c,title:l,totalLessons:d,lessonId:h})=>{const m=a!=null,f=Bx.useMemo(()=>t&&e&&i&&!m,[t,e,i,m]);return(0,n.jsxs)(n.Fragment,{children:[c?(0,n.jsx)(eo,{lessonName:s,lessonNumber:o,lessonPreposition:r,totalLessons:d}):(0,n.jsx)(Jn,{}),f&&(0,n.jsx)(qn,{authorName:e,avatar:t}),i&&m&&(0,n.jsx)(xm,{partnerContentAuthors:a}),(0,n.jsx)(to,{id:h,title:l})]})},b$=({authorName:e,avatar:t,lessonName:s,lessonNumber:o,lessonPreposition:r,partnerContentAuthors:a,showAuthor:i,showLessonCount:c,title:l,totalLessons:d,lessonId:h})=>{const m=a!=null,f=Bx.useMemo(()=>t&&e&&i&&!m,[t,e,i,m]);return(0,n.jsxs)(n.Fragment,{children:[f?(0,n.jsx)(qn,{authorName:e,avatar:t}):(0,n.jsx)(Kl,{}),i&&m&&(0,n.jsx)(ba,{partnerContentAuthors:a}),(0,n.jsx)(to,{id:h,title:l}),c?(0,n.jsx)(eo,{lessonName:s,lessonNumber:o,lessonPreposition:r,totalLessons:d}):(0,n.jsx)(Jn,{})]})};function y$(e){const t=n$();return e.lessonHeaderSize===li.SMALL&&!t?(0,n.jsx)(C$,{...e}):t?(0,n.jsx)(x$,{...e}):(0,n.jsx)(b$,{...e})}var Mm=p(82920);const{COMPACT:T$,COVER:L$,OVERLAY:S$,SIDEBAR:k$}=vo,ka=$("progress-circle");function N$({"aria-hidden":e,"aria-label":t,isFailed:s,isPassed:o,scope:r,value:a}){const[i,c]=Mm.useState(a===100),l=(0,Me.A)(a),{theme:d}=re()??{},h=d?.progressIndicatorStyle??et.THEME_DEFAULT,m=r===L$,f=r===S$,v=h===et.THEME_DEFAULT,C=h===et.CIRCULAR_FILL,g=h===et.INCOMPLETE_COMPLETE,x=ka("default",{failed:s,passed:o}),b=ka({compact:r===T$,cover:m,overlay:f,sidebar:r===k$}),T=ka("track",{"circular-fill":!f&&C,"incomplete-complete":m&&g}),L=ka("fill",{"circular-fill":C,done:i,failed:s,passed:o,unstarted:a===0}),y=ka("pass",{done:i,visible:o}),S=ka("fail",{done:i,visible:s}),k=Mm.useMemo(()=>C||a===100?a:0,[C,a]);return Mm.useEffect(()=>{if(a!==100&&l===100)c(!1);else if(a===100&&!i&&!g){const N=setTimeout(()=>c(!0),300);return clearTimeout.bind(null,N)}else a===100&&!i&&g&&c(!0)},[i,g,l,a]),(0,n.jsx)(n.Fragment,{children:v?(0,n.jsx)("svg",{"aria-hidden":e,"aria-label":t,className:x,focusable:"false",viewBox:"0 0 7 7",xmlns:"http://www.w3.org/2000/svg",children:(0,n.jsx)("circle",{cx:"3.5",cy:"3.5",r:"2.5"})}):(0,n.jsxs)("svg",{"aria-hidden":e,"aria-label":t,className:b,fill:"none",focusable:"false",role:"img",viewBox:"0 0 7 7",xmlns:"https://www.w3.org/2000/svg",children:[(0,n.jsx)("circle",{className:T,cx:"8",cy:"8",fill:"transparent",r:"7",strokeWidth:"2",transform:"rotate(-89.9 8 8)"}),(0,n.jsx)(Nm,{className:L,cx:8,cy:8,diameter:16,r:7,strokeLinecap:"round",strokeWidth:2,value:k}),(0,n.jsx)("path",{className:y,d:"M11.3227 6.65905C11.6133 6.37599 11.6347 5.89413 11.3705 5.58277C11.1063 5.27141 10.6566 5.24847 10.366 5.53152L6.93323 8.87512L5.6338 7.60944C5.3432 7.32639 4.89345 7.34933 4.62927 7.66069C4.36509 7.97205 4.38651 8.45391 4.67711 8.73697L6.45488 10.4686C6.72611 10.7328 7.14034 10.7328 7.41157 10.4686L11.3227 6.65905Z"}),(0,n.jsx)("path",{className:S,clipRule:"evenodd",d:"M9.46967 10.5303C9.76256 10.8232 10.2374 10.8232 10.5303 10.5303C10.8232 10.2374 10.8232 9.76256 10.5303 9.46967L9.06066 8L10.5303 6.53033C10.8232 6.23744 10.8232 5.76256 10.5303 5.46967C10.2374 5.17678 9.76256 5.17678 9.46967 5.46967L8 6.93934L6.53033 5.46967C6.23744 5.17678 5.76256 5.17678 5.46967 5.46967C5.17678 5.76256 5.17678 6.23744 5.46967 6.53033L6.93934 8L5.46967 9.46967C5.17678 9.76256 5.17678 10.2374 5.46967 10.5303C5.76256 10.8232 6.23744 10.8232 6.53033 10.5303L8 9.06066L9.46967 10.5303Z",fillRule:"evenodd"})]})})}function I$({Default:e,...t}){return(0,n.jsx)(e,{...t,hasOverlay:!1})}var E$=p(97127),sd=p.n(E$);const Dx=e=>t=>(e(t),t.preventDefault()),Ro=e=>{e.stopPropagation(),e.nativeEvent.stopImmediatePropagation()},hn=e=>t=>{e(t),t.preventDefault(),Ro(t)},nd=$("lesson-progress"),{COMPACT:Om,COVER:Ui,OVERLAY:Bm,SIDEBAR:_i}=vo;function j$({canComplete:e,color:t,hasRestriction:s,isComplete:o,isCurrentLesson:r,isDark:a,isEnabled:i,isFailed:c,isLegacy:l=void 0,isPassed:d,isTooltipVisible:h,navigationStyle:m,onHideTooltip:f,onMarkComplete:v=Kt,onMarkReset:C=Kt,onShowTooltip:g,percentComplete:x,progressGraphic:b,scope:T,labels:L}){const y=(0,u.useRef)(),S=(0,u.useRef)(),k=(0,u.useRef)(),N=(0,u.useRef)(),{theme:{progressIndicatorStyle:I=et.THEME_DEFAULT}}=De(),w=I===et.THEME_DEFAULT,A=nd({compact:T===Om,cover:T===Ui&&!l,"legacy-cover":T===Ui&&l,inactive:s,overlay:T===Bm,sidebar:T===_i&&!l,"legacy-sidebar":T===_i&&l,"theme-default":w}),E=nd("graphic",{compact:T===Om,cover:T===Ui&&!l,"legacy-cover":T===Ui&&l,overlay:T===Bm,sidebar:T===_i&&!l,"legacy-sidebar":T===_i&&l}),j=nd("tooltip",{legacy:l}).toString(),O=(0,u.useCallback)(()=>{o?C?.():v?.()},[o,v,C]),R=(0,u.useCallback)(D=>{sd()(f)&&vs(D)&&h&&f()},[f,h]),P=(0,u.useCallback)(()=>{clearTimeout(k.current),!s&&sd()(g)&&(S.current=setTimeout(g,600))},[s,g]),M=(0,u.useCallback)(()=>{clearTimeout(S.current),sd()(f)&&(k.current=setTimeout(f,150))},[f]),H=(0,u.useCallback)(()=>{setTimeout(()=>{if(h){const D=y.current.getBoundingClientRect(),V=N.current.offsetParent.getBoundingClientRect(),{height:W,width:_}=D,Z=D.left-V.left,oe=D.top-V.top;Object.assign(N.current.style,{transform:`translate(${Z}px, ${oe}px)`,width:`${_}px`,height:`${W}px`})}},0)},[h]);if((0,u.useLayoutEffect)(()=>H(),[H]),(0,qe.A)("resize",H,window),(0,qe.A)("keydown",R,document),yx(y,M),e){const V=w$({labels:L,percentComplete:x,canReset:!0}),W=!i||!1,_=nd("action",{disabled:W});return(0,n.jsx)("span",{className:A,"data-testid":"lesson-progress",children:(0,n.jsx)("button",{"aria-label":V,className:_,disabled:W,onBlur:f,onClick:O,onFocus:g,type:"button",children:(0,n.jsxs)("span",{className:E,onMouseEnter:P,onMouseLeave:M,ref:y,children:[(0,n.jsx)(b,{"aria-hidden":"true",color:t,isCurrent:r,isDark:a,isFailed:c,isPassed:d,navigationStyle:m,scope:T,value:x}),i&&!s&&(0,n.jsx)(Fx,{className:j,dark:a,ref:N,scope:T,visible:h,children:V})]})})})}const F=A$({labels:L,isFailed:c,percentComplete:x});return(0,n.jsx)("span",{className:A,"data-testid":"lesson-progress",children:(0,n.jsxs)("span",{className:E,onMouseEnter:P,onMouseLeave:M,ref:y,children:[(0,n.jsx)(b,{"aria-label":F,color:t,isCurrent:r,isDark:a,isFailed:c,isPassed:d,navigationStyle:m,scope:T,value:x}),i&&!s&&(0,n.jsx)(Fx,{className:j,dark:a,ref:N,scope:T,visible:h,children:F})]})})}const Fx=(0,u.forwardRef)((e,t)=>{const{children:s,className:o,dark:r,scope:a,visible:i}=e,c=(0,u.useMemo)(()=>$(o),[o]),l=c({compact:a===Om,cover:a===Ui,overlay:a===Bm,sidebar:a===_i,visible:i}),d=c("inner",{dark:r,light:!r}),h=(0,n.jsx)("div",{"aria-hidden":"true",onClick:Ro,ref:t,style:{left:0,pointerEvents:"none",position:"absolute",top:0,zIndex:Number.MAX_SAFE_INTEGER},children:(0,n.jsx)("div",{style:{pointerEvents:"all"},children:(0,n.jsx)("div",{className:l,children:(0,n.jsx)("div",{className:d,children:s})})})});return(0,In.createPortal)(h,wo())});function w$({labels:e,canReset:t,percentComplete:s}){const o=s===100,{progressPieCompleted:r,progressPieUnstarted:a,progressPieClickToComplete:i,progressPieClickToReset:c}=e;return o&&t?`${r}. ${c}`:s===100&&!t?r:s===0?`${a}. ${i}`:`${s}% ${r}. ${i}`}function A$({labels:e,isFailed:t,percentComplete:s}){const o=s===100,{progressPieCompleted:r,progressPieUnstarted:a,progressPieQuizFailed:i}=e;return t?i:o?r:s===0?a:`${s}% ${r}`}const Hx=u.memo(j$);function R$({color:e,hasRestriction:t,isComplete:s,isCurrentLesson:o,isFailed:r,isPassed:a,isTooltipVisible:i,lessonTitle:c,navigationStyle:l,onHideTooltip:d,onShowTooltip:h,percentComplete:m,progressGraphic:f,scope:v,labels:C}){return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("span",{className:"overview-list-item__progress",children:(0,n.jsx)(Hx,{canComplete:!1,color:e,hasRestriction:t,isComplete:s,isCurrentLesson:o,isDark:!1,isEnabled:!0,isFailed:r,isPassed:a,isTooltipVisible:i,labels:C,navigationStyle:l,onHideTooltip:d,onShowTooltip:h,percentComplete:m,progressGraphic:f,scope:v})}),(0,n.jsx)("span",{className:"overview-list-item__title",children:c})]})}function P$(){return null}function $x({className:e,ref:t}){return(0,n.jsx)("svg",{"aria-hidden":"true",className:e,fill:"currentColor",focusable:"false",ref:t,viewBox:"0 0 13 13",xmlns:"http://www.w3.org/2000/svg",children:(0,n.jsx)("path",{d:"M3.33177 4.1487L6.48034 1.00013M9.6289 4.14869L6.48034 1.00013M6.48034 1.00013L6.47966 11.9601"})})}function M$(e){const t=$t(e,["Default"]);return(0,n.jsxs)(Yt,{...t,fill:"none",viewBox:"0 3 16 10",children:[(0,n.jsx)("path",{d:"M1.51472 7.99993H14.4853",stroke:"currentColor",strokeMiterlimit:"10",strokeWidth:"0.75"}),(0,n.jsx)("path",{d:"M9.50008 12.4994L14.5004 7.99932L9.50008 3.99973",stroke:"currentColor",strokeMiterlimit:"10",strokeWidth:"0.75"})]})}function O$(e){const t=$t(e,["Default"]);return(0,n.jsx)(Yt,{viewBox:"0 0 25 16",...t,children:(0,n.jsx)("path",{clipRule:"evenodd",d:"M1.10699 7.7986L0.778547 7.50301L1.1236 7.22701L10.013 0.116623L10.4815 0.702312L2.42567 7.14593H24.4443V7.89593H2.3363L10.4981 15.2413L9.9964 15.7988L1.10699 7.7986Z",fill:"currentColor",fillRule:"evenodd"})})}function Vx(e){return(0,n.jsx)(jt,{height:"8",viewBox:"0 0 14 8",width:"14",...e,children:(0,n.jsx)("path",{clipRule:"evenodd",d:"M13 1L7 7L1 1",stroke:"currentColor"})})}function zx(e){const t=$t(e,["Default"]);return(0,n.jsxs)(Yt,{...t,fill:"none",viewBox:"0 0 16 16",children:[(0,n.jsx)("circle",{cx:"8",cy:"8",r:"7",stroke:"white"}),(0,n.jsx)("path",{d:"M5 7.71429L7.54545 10L11.5 5.5",stroke:"white"})]})}function Ux(e){const t=$t(e,["Default"]);return(0,n.jsxs)(Yt,{...t,fill:"none",viewBox:"0 0 16 16",children:[(0,n.jsx)("path",{d:"M8.00085 5.20305L5.14081 8.06339C5.14079 8.06341 5.14077 8.06343 5.14075 8.06345C5.00146 8.20273 4.92319 8.39163 4.92314 8.58861V8.5887V9.93926C4.92314 10.1851 5.12244 10.3844 5.36829 10.3844H6.71884H6.71894C6.91593 10.3844 7.10484 10.3061 7.24413 10.1668C7.24414 10.1668 7.24415 10.1667 7.24416 10.1667L10.104 7.30664C10.104 7.30657 10.1041 7.3065 10.1042 7.30643L10.1042 7.30638C10.1043 7.30631 10.1044 7.30622 10.1044 7.30615L10.9465 6.46442C11.03 6.38095 11.0769 6.26773 11.0769 6.14966C11.0769 6.0316 11.03 5.91836 10.9466 5.83487L9.47304 4.36105C9.29924 4.18722 9.01746 4.18716 8.84359 4.36091L8.00111 5.20279C8.0011 5.2028 8.0011 5.2028 8.0011 5.2028L8.00085 5.20305Z",stroke:"white",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"0.890284"}),(0,n.jsx)("circle",{cx:"8",cy:"7.5293",r:"7",stroke:"white"})]})}function B$({className:e}){return(0,n.jsxs)("svg",{"aria-hidden":"true",className:e,fill:"none",viewBox:"0 0 15 15",xmlns:"http://www.w3.org/2000/svg",children:[(0,n.jsx)("circle",{cx:"6",cy:"6",r:"5"}),(0,n.jsx)("path",{d:"M9.5 9.5L14 14"})]})}function D$(e){const t=$t(e,["Default"]);return(0,n.jsxs)(Yt,{...t,fill:"none",viewBox:"0 0 16 16",children:[(0,n.jsx)("circle",{cx:"8",cy:"8",r:"7",stroke:"white"}),(0,n.jsx)("path",{d:"M10 6L6 10",stroke:"white"}),(0,n.jsx)("path",{d:"M6 6L10 10",stroke:"white"})]})}function F$({className:e}){return(0,n.jsx)("svg",{"aria-hidden":"true",className:e,fill:"none",focusable:"false",viewBox:"0 0 10 7",xmlns:"http://www.w3.org/2000/svg",children:(0,n.jsx)("path",{d:"M1 1.40002L5 5.40002L9 1.40002",strokeWidth:"1.6"})})}function H$(e){const t=$t(e,["Default"]);return(0,n.jsxs)(Yt,{viewBox:"0 0 12 12",...t,children:[(0,n.jsx)("path",{d:"M10.7425 0.742189L11.4496 1.4493L1.55012 11.3488L0.843012 10.6417L10.7425 0.742189Z",fill:"currentColor"}),(0,n.jsx)("path",{d:"M11.1571 10.6417L10.45 11.3488L0.550537 1.44929L1.25764 0.742188L11.1571 10.6417Z",fill:"currentColor"})]})}const $$=()=>Et(1200),V$=()=>Et(768),Dm=()=>Et(480),_x=$("cover");function z$(){const e=re(),t=$$(),s=Ae(e?.description);if(!s)return null;const o=fa("description"),r=(0,Qt.uW)(e?.description)?{"data-l10n-id":e?.description?.l10nId}:{"data-change-path":o};return(0,n.jsx)("div",{...r,children:(0,n.jsxs)("section",{className:_x("details-content-section"),children:[t&&(0,n.jsx)(w2,{}),(0,n.jsx)(ke,{className:_x("details-content-description"),value:Dh(s)},"text")]})})}const U$={SPLIT_LEFT:"LEFT",SPLIT_LEFT_IMAGE:"LEFT_OVERLAY",SPLIT_RIGHT:"LEFT",SPLIT_RIGHT_IMAGE:"LEFT_OVERLAY"};function Fm(){const e=re(),t=V$(),s=e?.theme?.coverPageType||"CENTERED";return t?U$[s]??s:s}function _$({Default:e,...t}){const s=Fm(),o=["SPLIT_RIGHT","SPLIT_RIGHT_IMAGE"].includes(s);return(0,n.jsx)(e,{...t,reverseColumns:o})}const Gx=$("cover");function Gi({accentColor:e,hasOverlay:t=!1,isShape:s=!1}){const{alpha:o,ariaLabel:r,media:a,role:i}=Cr("coverImage"),c=s?{backgroundColor:e}:ta({alpha:o,hasOverlay:t,media:a});return(0,n.jsx)("div",{className:Gx("header-graphic-container"),children:(0,n.jsx)("div",{"aria-label":r,className:Gx("header-graphic"),"data-testid":"cover-header-graphic",role:i,style:c??void 0})})}const Wx=e=>(0,n.jsx)(od,{...e,children:(0,n.jsx)("clipPath",{clipPathUnits:"objectBoundingBox",id:"cover-page-clip-path",children:(0,n.jsx)("path",{d:"M0.319,0.998 L1,0.899 V0 H0 V0.899 L0.192,0.98 C0.234,0.998,0.277,1,0.319,0.998"})})}),Kx=e=>(0,n.jsx)(od,{...e,children:(0,n.jsx)("clipPath",{clipPathUnits:"objectBoundingBox",id:"cover-page-clip-path",children:(0,n.jsx)("path",{d:"M0.661,0.963 L1,0.804 V0 H0 V0.804 L0.339,0.963 C0.445,1,0.555,1,0.661,0.963"})})}),Qx=e=>(0,n.jsx)(od,{...e,children:(0,n.jsx)("clipPath",{clipPathUnits:"objectBoundingBox",id:"cover-page-clip-path",children:(0,n.jsx)("path",{d:"M0.481,0.991 L0.908,0.825 C0.99,0.793,1,0.694,0.982,0.616 L0.68,0.075 C0.636,-0.003,0.534,-0.023,0.465,0.033 L0.055,0.364 C-0.007,0.414,-0.017,0.505,0.031,0.568 L0.316,0.944 C0.355,0.995,0.422,1,0.481,0.991"})})}),Yx=e=>(0,n.jsx)(od,{...e,children:(0,n.jsx)("clipPath",{clipPathUnits:"objectBoundingBox",id:"cover-page-clip-path",children:(0,n.jsx)("path",{d:"M0.519,0.991 L0.093,0.825 C0.01,0.793,-0.025,0.694,0.019,0.616 L0.321,0.075 C0.364,-0.003,0.466,-0.023,0.536,0.033 L0.946,0.364 C1,0.414,1,0.505,0.97,0.568 L0.685,0.944 C0.646,0.995,0.579,1,0.519,0.991"})})}),G$={LEFT_OVERLAY:Wx,LEFT:Wx,CENTERED:Kx,CENTERED_OVERLAY:Kx,SPLIT_LEFT:Qx,SPLIT_LEFT_IMAGE:Qx,SPLIT_RIGHT:Yx,SPLIT_RIGHT_IMAGE:Yx},od=({children:e,className:t="svgPath",height:s,width:o,viewBox:r})=>(0,n.jsx)("svg",{"aria-hidden":"true",className:t,fill:"none",focusable:"false",height:s,viewBox:r,width:o,xmlns:"http://www.w3.org/2000/svg",children:e});function yr({className:e,coverPageType:t}){const s=t?G$[t]:null;return s?(0,n.jsx)(s,{className:e}):null}const Zx=$("cover"),Na=()=>(0,n.jsxs)("div",{className:Zx("author-published-wrap"),children:[(0,n.jsx)(En,{}),(0,n.jsx)(A2,{})]}),W$=({coverPageType:e})=>{const t=Dm();return(0,n.jsxs)(vm,{children:[(0,n.jsx)(yr,{coverPageType:e}),(0,n.jsxs)(cs,{children:[!t&&(0,n.jsx)(Ut,{}),(0,n.jsx)(Na,{}),(0,n.jsx)(ls,{}),t&&(0,n.jsx)(Ut,{}),(0,n.jsx)(is,{})]})]})},K$=({coverPageType:e})=>{const t=Dm();return(0,n.jsxs)(Us,{children:[(0,n.jsx)(yr,{coverPageType:e}),(0,n.jsxs)(cs,{children:[!t&&(0,n.jsx)(Ut,{}),(0,n.jsx)(Na,{}),(0,n.jsx)(ls,{}),t&&(0,n.jsx)(Ut,{}),(0,n.jsx)(is,{})]})]})},Q$=({coverPageType:e})=>(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(yr,{coverPageType:e}),(0,n.jsx)(Gi,{}),(0,n.jsx)(Us,{children:(0,n.jsxs)(cs,{children:[(0,n.jsx)(Ut,{}),(0,n.jsx)(Na,{}),(0,n.jsx)(ls,{}),(0,n.jsx)(is,{})]})})]}),Y$=({accentColor:e,coverPageType:t})=>(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(Us,{children:(0,n.jsxs)(cs,{children:[(0,n.jsx)(Ut,{}),(0,n.jsx)(Na,{}),(0,n.jsx)(ls,{}),(0,n.jsx)(is,{})]})}),(0,n.jsx)(yr,{coverPageType:t}),(0,n.jsx)(Gi,{accentColor:e,isShape:!0})]}),Z$=({coverPageType:e})=>(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(Us,{children:(0,n.jsxs)(cs,{children:[(0,n.jsx)(Ut,{}),(0,n.jsx)(Na,{}),(0,n.jsx)(ls,{}),(0,n.jsx)(is,{})]})}),(0,n.jsx)(yr,{coverPageType:e}),(0,n.jsx)(Gi,{})]}),X$=({accentColor:e,coverPageType:t})=>(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(yr,{coverPageType:t}),(0,n.jsx)(Gi,{accentColor:e,isShape:!0}),(0,n.jsx)(Us,{children:(0,n.jsxs)(cs,{children:[(0,n.jsx)(Ut,{}),(0,n.jsx)(Na,{}),(0,n.jsx)(ls,{}),(0,n.jsx)(is,{})]})})]});function q$(e){const t=Fm(),s={...e,coverPageType:t};switch(t){default:case ce.LEFT_OVERLAY:case ce.CENTERED_OVERLAY:return(0,n.jsx)(W$,{...s});case ce.LEFT:case ce.CENTERED:return(0,n.jsx)(K$,{...s});case ce.SPLIT_LEFT:return(0,n.jsx)(Y$,{...s});case ce.SPLIT_LEFT_IMAGE:return(0,n.jsx)(Z$,{...s});case ce.SPLIT_RIGHT:return(0,n.jsx)(X$,{...s});case ce.SPLIT_RIGHT_IMAGE:return(0,n.jsx)(Q$,{...s})}}function J$(e){const s=!!!!Oi();return(0,n.jsx)("header",{className:Zx("header",{"with-info":s}),"data-testid":"cover-header",children:(0,n.jsx)(q$,{...e})})}var eV=p(82920);const tV=$("cover");function sV({children:e}){const t=re(),{themeId:s}=t?.theme??{},o=Fm(),r=eV.useMemo(()=>ca()(o),[o]),a=tV(null,{layout:r});return(0,n.jsx)("div",{className:a,"data-testid":`cover-layout-${r}`,"data-theme-id":s,id:"cover",children:e})}const so=$("cover");function nV({percentComplete:e}){const t=Dm(),s=on(),o=be(),r=GC();return null}var Xx=p(82920);const rd=$("lesson-header"),Hm=()=>(0,n.jsx)("div",{className:rd("author--hidden")}),oV=({authorName:e,avatar:t,description:s,lessonName:o,lessonNumber:r,lessonPreposition:a,partnerContentAuthors:i,showAuthor:c,showLessonCount:l,title:d,totalLessons:h,lessonId:m})=>{const f=i!=null&&c,v=t&&e&&c&&!f,C=v||f||l,g=l&&(v||f);return(0,n.jsxs)("div",{className:rd("content"),children:[C&&(0,n.jsxs)("div",{className:rd("info-row"),children:[v?(0,n.jsx)(qn,{authorName:e,avatar:t}):(0,n.jsx)(Hm,{}),f&&(0,n.jsx)(ba,{partnerContentAuthors:i}),g&&(0,n.jsx)("span",{"aria-hidden":"true",className:rd("info-row--divider"),children:"|"}),l?(0,n.jsx)(eo,{lessonName:o,lessonNumber:r,lessonPreposition:a,totalLessons:h}):(0,n.jsx)(Jn,{})]}),(0,n.jsxs)("div",{children:[(0,n.jsx)(to,{id:m,title:d}),s&&(0,n.jsx)(xa,{description:s})]})]})},rV=e=>{const{authorName:t,avatar:s,description:o,lessonName:r,lessonNumber:a,lessonPreposition:i,partnerContentAuthors:c,showAuthor:l,showLessonCount:d,title:h,totalLessons:m,lessonId:f}=e,v=c!=null,C=Xx.useMemo(()=>s&&t&&l&&!v,[s,t,l,v]);return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(to,{id:f,title:h}),(0,n.jsxs)(GF,{children:[C?(0,n.jsx)(qn,{authorName:t,avatar:s}):(0,n.jsx)(Hm,{}),l&&v&&(0,n.jsx)(ba,{partnerContentAuthors:c}),d?(0,n.jsx)(eo,{lessonName:r,lessonNumber:a,lessonPreposition:i,showPartnerContent:v,totalLessons:m}):(0,n.jsx)(Jn,{})]}),o&&(0,n.jsx)(xa,{description:o})]})},aV=e=>{const{authorName:t,avatar:s,description:o,lessonName:r,lessonNumber:a,lessonPreposition:i,partnerContentAuthors:c,showAuthor:l,showLessonCount:d,title:h,totalLessons:m,lessonId:f}=e,v=c!=null,C=Xx.useMemo(()=>s&&t&&l&&!v,[s,t,l,v]);return(0,n.jsxs)(n.Fragment,{children:[d?(0,n.jsx)(eo,{lessonName:r,lessonNumber:a,lessonPreposition:i,totalLessons:m}):(0,n.jsx)(Jn,{}),C?(0,n.jsx)(qn,{authorName:t,avatar:s}):(0,n.jsx)(Hm,{}),l&&v&&(0,n.jsx)(xm,{partnerContentAuthors:c}),(0,n.jsx)(to,{id:f,title:h}),o&&(0,n.jsx)(xa,{description:o})]})};function iV(e){const t=zh();return e.lessonHeaderSize===li.SMALL&&!t?(0,n.jsx)(oV,{...e}):t?(0,n.jsx)(aV,{...e}):(0,n.jsx)(rV,{...e})}var ad=p(82920);const{COMPACT:cV,COVER:lV,OVERLAY:dV,SIDEBAR:uV}=vo,Wi=$("progress-circle");function hV({"aria-hidden":e,"aria-label":t,isFailed:s,isPassed:o,scope:r,value:a}){const[i,c]=ad.useState(a===100),l=(0,Me.A)(a),{theme:d}=re()??{},h=d?.progressIndicatorStyle??et.THEME_DEFAULT,m=r===lV,f=r===dV,v=h===et.THEME_DEFAULT,C=h===et.CIRCULAR_FILL,g=h===et.INCOMPLETE_COMPLETE,x=Wi({compact:r===cV,cover:m,sidebar:r===uV,overlay:f}),b=Wi("track",{"circular-fill":!f&&C,"incomplete-complete":m&&g}),T=Wi("runner",{"circular-fill":C,done:i,failed:s,passed:o,unstarted:a===0}),L=Wi("pass",{done:i,visible:o}),y=Wi("fail",{done:i,visible:s}),S=ad.useMemo(()=>C||a===100?a:0,[C,a]);ad.useEffect(()=>{if(a!==100&&l===100)c(!1);else if(a===100&&!i&&!g){const N=setTimeout(()=>c(!0),300);return clearTimeout.bind(null,N)}else a===100&&!i&&g&&c(!0)},[i,g,l,a]);const k=ad.useCallback(()=>{a===100&&c(!0)},[a]);return(0,n.jsxs)("svg",{"aria-hidden":e,"aria-label":t,className:x,fill:"none",focusable:"false",role:"img",viewBox:"0 0 15 15",xmlns:"https://www.w3.org/2000/svg",children:[(0,n.jsx)("circle",{className:b,cx:"7.5",cy:"7.5",fill:"transparent",r:"6.5",strokeWidth:"2",transform:"rotate(-89.9 7.5 7.5)"}),v?(0,n.jsx)(Ix,{className:T,cx:7.5,cy:7.5,diameter:15,onTransitionEnd:k,r:6.5,strokeWidth:2,transform:"rotate(-89.9 7.5 7.5)",value:a}):(0,n.jsx)(Nm,{className:T,cx:7.5,cy:7.5,diameter:15,onTransitionEnd:k,r:6.5,strokeLinecap:"round",strokeWidth:2,value:S}),(0,n.jsx)("path",{className:L,d:"M11.3227 6.65905C11.6133 6.37599 11.6347 5.89413 11.3705 5.58277C11.1063 5.27141 10.6566 5.24847 10.366 5.53152L6.93323 8.87512L5.6338 7.60944C5.3432 7.32639 4.89345 7.34933 4.62927 7.66069C4.36509 7.97205 4.38651 8.45391 4.67711 8.73697L6.45488 10.4686C6.72611 10.7328 7.14034 10.7328 7.41157 10.4686L11.3227 6.65905Z"}),(0,n.jsx)("path",{className:y,clipRule:"evenodd",d:"M7.5 8.56157L8.84426 9.90564L9.90503 8.84473L8.56078 7.50066L9.90543 6.15582L8.84452 5.09504L7.49986 6.43988L6.15452 5.09473L5.09375 6.15564L6.43909 7.5008L5.09452 8.84555L6.15543 9.90632L7.5 8.56157Z",fillRule:"evenodd"})]})}const id=({"aria-hidden":e=void 0,"aria-label":t=void 0,progress:s=0,runnerClass:o,trackClass:r})=>(0,n.jsx)("div",{"aria-hidden":e,"aria-label":t,className:r,role:"img",children:(0,n.jsx)("div",{className:o,style:{width:`${s}%`}})}),mV=$("nav-sidebar-header");function fV(e){const{classProgressRunner:t,classProgressText:s,classProgressTrack:o,percentComplete:r,percentCompleteText:a}=e;return(0,n.jsxs)("div",{className:mV("progress"),"data-testid":"nav-sidebar-progress",children:[(0,n.jsx)("div",{className:s,children:a}),(0,n.jsx)(id,{"aria-hidden":"true",progress:r,runnerClass:t,trackClass:o})]})}function pV({className:e,ref:t}){return(0,n.jsx)("svg",{"aria-hidden":"true",className:e,fill:"currentColor",focusable:"false",height:"17",ref:t,role:"img",viewBox:"0 0 17 17",width:"17",xmlns:"http://www.w3.org/2000/svg",children:(0,n.jsx)("path",{clipRule:"evenodd",d:"M8.029 16.2343L8.7361 16.9414L9.44321 16.2343L16.707 8.97048L15.2928 7.55627L9.73903 13.11L9.73903 1.99985L7.73903 1.99985L7.73904 13.1159L2.17939 7.55627L0.765176 8.97048L8.029 16.2343Z",fillRule:"evenodd"})})}function gV(e){return(0,n.jsx)(Yt,{...e,viewBox:"0 0 16 8",children:(0,n.jsx)("path",{clipRule:"evenodd",d:"M15,3H3.4l1.3-1.3c0.4-0.4,0.4-1,0-1.4C4.5,0.1,4.3,0,4,0S3.5,0.1,3.3,0.3l-3,3c-0.4,0.4-0.4,1,0,1.4l3,3c0.4,0.4,1,0.4,1.4,0c0.4-0.4,0.4-1,0-1.4L3.4,5H15c0.6,0,1-0.4,1-1S15.6,3,15,3",fill:"currentColor",fillRule:"evenodd"})})}function vV(e){const t=$t(e,["Default"]);return(0,n.jsx)(Yt,{...t,viewBox:"0 0 16 8",children:(0,n.jsx)("path",{clipRule:"evenodd",d:"M1 5H12.6L11.3 6.3C10.9 6.7 10.9 7.3 11.3 7.7C11.5 7.9 11.7 8 12 8C12.3 8 12.5 7.9 12.7 7.7L15.7 4.7C16.1 4.3 16.1 3.7 15.7 3.3L12.7 0.3C12.3 -0.1 11.7 -0.1 11.3 0.3C10.9 0.7 10.9 1.3 11.3 1.7L12.6 3H1C0.4 3 0 3.4 0 4C0 4.6 0.4 5 1 5",fill:"currentColor",fillRule:"evenodd"})})}function CV({className:e,ref:t}){return(0,n.jsx)("svg",{"aria-hidden":"true",className:e,fill:"currentColor",focusable:"false",ref:t,version:"1.1",viewBox:"0 0 17 17",xmlns:"http://www.w3.org/2000/svg",children:(0,n.jsx)("path",{clipRule:"evenodd",d:"M8.971 0.7657L8.2639 0.0585938L7.55679 0.765701L0.292969 8.02952L1.70718 9.44374L7.26096 3.88995L7.26097 15.0002H9.26097L9.26096 3.88409L14.8206 9.44373L16.2348 8.02952L8.971 0.7657Z",fillRule:"evenodd"})})}function xV(e){return(0,n.jsx)(jt,{height:"12",viewBox:"0 0 16 12",width:"16",...e,children:(0,n.jsx)("path",{clipRule:"evenodd",d:"M9.6665 2H0.666504V0H9.6665V2ZM12.6665 6H0.666504V4H12.6665V6ZM0.666504 10H7.6665V8H0.666504V10Z",fill:"currentColor",fillRule:"evenodd"})})}function qx(e){return(0,n.jsx)(jt,{height:"8",viewBox:"0 0 12 8",width:"12",...e,children:(0,n.jsx)("path",{clipRule:"evenodd",d:"M6.00008 7.91406L11.7072 2.20696L10.293 0.792742L6.00007 5.08564L1.70718 0.792742L0.292969 2.20696L6.00008 7.91406Z",fill:"currentColor",fillRule:"evenodd"})})}function bV(e){return(0,n.jsx)(jt,{height:"8",viewBox:"0 0 12 8",width:"12",...e,children:(0,n.jsx)("path",{clipRule:"evenodd",d:"M5.99992 0.0859375L0.292818 5.79304L1.70703 7.20726L5.99993 2.91436L10.2928 7.20726L11.707 5.79304L5.99992 0.0859375Z",fill:"currentColor",fillRule:"evenodd"})})}function yV(e){return(0,n.jsxs)(jt,{height:"21",viewBox:"0 0 20 21",width:"20",...e,children:[(0,n.jsx)("path",{d:"M9.94535 6.125C9.1938 6.125 8.52385 6.6729 8.30039 7.48015C8.17194 7.9442 7.70954 8.21104 7.26759 8.07617C6.82564 7.94129 6.5715 7.45577 6.69996 6.99172C7.11282 5.50025 8.3916 4.375 9.94535 4.375C11.8499 4.375 13.3335 6.05606 13.3335 8.05C13.3335 9.7417 12.2656 11.2082 10.7787 11.6139V12.25C10.7787 12.7332 10.4056 13.125 9.94535 13.125C9.48511 13.125 9.11201 12.7332 9.11201 12.25V10.85C9.11201 10.3668 9.48511 9.975 9.94535 9.975C10.8628 9.975 11.6668 9.14886 11.6668 8.05C11.6668 6.95114 10.8628 6.125 9.94535 6.125Z",fill:"currentColor"}),(0,n.jsx)("path",{d:"M10.0002 14C9.53992 14 9.16683 14.3918 9.16683 14.875C9.16683 15.3582 9.53992 15.75 10.0002 15.75H10.0085C10.4687 15.75 10.8418 15.3582 10.8418 14.875C10.8418 14.3918 10.4687 14 10.0085 14H10.0002Z",fill:"currentColor"}),(0,n.jsx)("path",{clipRule:"evenodd",d:"M0.833496 3.55556C0.833496 2.01519 2.09493 0.875 3.51868 0.875H16.4816C17.9054 0.875 19.1668 2.01519 19.1668 3.55556V17.4444C19.1668 18.9848 17.9054 20.125 16.4816 20.125H3.51868C2.09493 20.125 0.833496 18.9848 0.833496 17.4444V3.55556ZM3.51868 2.625C2.89693 2.625 2.50016 3.10156 2.50016 3.55556V17.4444C2.50016 17.8984 2.89693 18.375 3.51868 18.375H16.4816C17.1034 18.375 17.5002 17.8984 17.5002 17.4444V3.55556C17.5002 3.10156 17.1034 2.625 16.4816 2.625H3.51868Z",fill:"currentColor",fillRule:"evenodd"})]})}function TV(e){return(0,n.jsx)(jt,{height:"15",viewBox:"0 0 16 15",width:"16",...e,children:(0,n.jsx)("path",{clipRule:"evenodd",d:"M2 6.51982C2 4.02359 4.02359 2 6.51982 2C9.01605 2 11.0396 4.02359 11.0396 6.51982C11.0396 9.01605 9.01605 11.0396 6.51982 11.0396C4.02359 11.0396 2 9.01605 2 6.51982ZM6.51982 0C2.91902 0 0 2.91902 0 6.51982C0 10.1206 2.91902 13.0396 6.51982 13.0396C8.06462 13.0396 9.48394 12.5024 10.6011 11.6045L13.9964 14.9998L15.4106 13.5856L11.9518 10.1268C12.6391 9.09384 13.0396 7.8536 13.0396 6.51982C13.0396 2.91902 10.1206 0 6.51982 0Z",fill:"currentColor",fillRule:"evenodd"})})}function LV(e){return(0,n.jsxs)(jt,{height:"18",viewBox:"0 0 18 18",width:"18",...e,children:[(0,n.jsx)("path",{d:"M3.1665 6.08335C3.1665 4.01229 4.84544 2.33335 6.9165 2.33335C8.98757 2.33335 10.6665 4.01229 10.6665 6.08335C10.6665 6.37941 10.6324 6.66643 10.5681 6.9411C10.4634 7.38925 10.7417 7.83748 11.1899 7.94225C11.6381 8.04702 12.0863 7.76865 12.1911 7.3205C12.2841 6.92235 12.3332 6.50805 12.3332 6.08335C12.3332 3.09181 9.90805 0.666687 6.9165 0.666687C3.92496 0.666687 1.49984 3.09181 1.49984 6.08335C1.49984 6.46923 1.54032 6.84657 1.61756 7.21105C1.679 7.50095 1.76362 7.78236 1.86938 8.05316C1.97511 8.32389 2.10191 8.5839 2.24772 8.83119C2.48148 9.22764 2.99237 9.35953 3.38882 9.12577C3.78527 8.89201 3.91716 8.38112 3.6834 7.98467C3.58248 7.81352 3.49485 7.63379 3.42186 7.44688C3.34886 7.25994 3.29045 7.0657 3.24802 6.86551C3.1947 6.61395 3.1665 6.3524 3.1665 6.08335Z",fill:"currentColor"}),(0,n.jsx)("path",{d:"M9.18922 9.34412L14.8186 10.2697C16.2762 10.5117 17.3332 11.6819 17.3332 13.0521V16.6037C17.3332 17.0029 16.9837 17.3264 16.553 17.3264C16.122 17.3264 15.7728 17.0029 15.7728 16.6037V13.0521C15.7728 12.3826 15.2561 11.8108 14.5446 11.6926L8.30452 10.6667H8.30233C7.90851 10.6331 7.57585 10.2773 7.57585 9.8899V6.0524C7.57585 5.88733 7.48441 5.73325 7.33119 5.64046C7.17921 5.54853 6.99291 5.53668 6.82002 5.60606C6.63747 5.68035 6.51483 5.87085 6.51483 6.08044V15.3607C6.51483 15.6856 6.30169 15.9391 5.91441 16.0741C5.40325 16.2528 4.90988 16.0261 4.70516 15.7226L3.01346 13.2999C2.93513 13.1565 2.84963 13.09 2.68954 13.0406C2.59935 13.0249 2.47889 13.0408 2.37154 13.0906C2.2798 13.1394 2.22768 13.4826 2.38902 13.9902C2.41984 14.0542 3.0442 15.4844 3.27756 16.0189C3.32536 16.1284 3.35676 16.2003 3.36328 16.2152C3.47656 16.4494 3.49404 16.6994 3.40853 16.8957C3.33551 17.0631 3.1904 17.1911 2.98912 17.2663C2.893 17.3018 2.77099 17.3334 2.63742 17.3334C2.36124 17.3334 2.03826 17.1986 1.80702 16.6867L1.75272 16.5849C1.3289 15.6773 1.03464 14.952 0.90735 14.6382L0.905151 14.6328L0.896561 14.6115C0.87092 14.548 0.854463 14.5072 0.847419 14.4926C0.45609 13.3756 0.711983 12.3355 1.49527 11.8308C1.97428 11.5452 2.55316 11.4538 3.08867 11.5781C3.63572 11.7047 4.10288 12.0476 4.40371 12.5436L4.82936 13.2293V5.99429C4.82936 5.3563 5.1692 4.74981 5.7381 4.37228C6.30855 3.99359 7.0238 3.89848 7.69942 4.11153C8.55823 4.3824 9.13554 5.15654 9.13617 6.03881L9.18922 9.34412Z",fill:"currentColor"})]})}function SV(e){return(0,n.jsxs)(jt,{height:"14",viewBox:"0 0 20 14",width:"20",...e,children:[(0,n.jsx)("path",{clipRule:"evenodd",d:"M19.548 2.09234C19.8255 2.23518 20 2.52116 20 2.83331V11.1666C20 11.4788 19.8255 11.7648 19.548 11.9076C19.2704 12.0505 18.9363 12.0262 18.6823 11.8448L12.849 7.67809C12.63 7.52166 12.5 7.2691 12.5 6.99998C12.5 6.73085 12.63 6.47829 12.849 6.32187L18.6823 2.1552C18.9363 1.97376 19.2704 1.9495 19.548 2.09234ZM14.7671 6.99998L18.3333 9.54732V4.45264L14.7671 6.99998Z",fill:"currentColor",fillRule:"evenodd"}),(0,n.jsx)("path",{clipRule:"evenodd",d:"M2.5 1.99998C2.03976 1.99998 1.66667 2.37308 1.66667 2.83331V11.1666C1.66667 11.6269 2.03976 12 2.5 12H11.6667C12.1269 12 12.5 11.6269 12.5 11.1666V2.83331C12.5 2.37308 12.1269 1.99998 11.6667 1.99998H2.5ZM0 2.83331C0 1.4526 1.11929 0.333313 2.5 0.333313H11.6667C13.0474 0.333313 14.1667 1.4526 14.1667 2.83331V11.1666C14.1667 12.5474 13.0474 13.6666 11.6667 13.6666H2.5C1.11929 13.6666 0 12.5474 0 11.1666V2.83331Z",fill:"currentColor",fillRule:"evenodd"})]})}function kV(e){return(0,n.jsx)(jt,{height:"14",viewBox:"0 0 14 14",width:"14",...e,children:(0,n.jsx)("path",{clipRule:"evenodd",d:"M13.4646 2.46462L11.8484 0.848376L7.00023 5.69652L2.15186 0.848143L0.535612 2.46439L5.38399 7.31276L0.534668 12.1621L2.15091 13.7783L7.00023 8.92901L11.8493 13.7781L13.4656 12.1619L8.61648 7.31276L13.4646 2.46462Z",fill:"currentColor",fillRule:"evenodd"})})}var Jx=p(82920);const eb=Os,NV={classic:Os,default:Os,imaginative:wu,organic:Pu},tb=Object.assign(Jx.createContext(eb),{displayName:"ThemeContext"});function IV(){return Jx.useContext(tb)}function EV({themeId:e,...t}){return(0,n.jsx)(tb.Provider,{...t,value:NV[e]??eb})}function jV(e){return(0,n.jsx)(n.Fragment,{children:e.children})}function wV(){return null}function sb(e,t,s){function o(r){const i=IV()?.[e]?.[t]??s;return(0,n.jsx)(i,{...r,Default:s})}return o.displayName=`ThemeComponent(${t})`,o}function Oe(e,t=jV){return sb("components",e,t)}function Dt(e){return sb("icons",e,wV)}var cd=p(82920);const nb=cd.createContext({typefaces:[]});function AV({addTypefaces:e,children:t,typefaces:s=[]}){RV(s);const o=cd.useMemo(()=>({addTypefaces:e,typefaces:s}),[e,s]);return(0,n.jsx)(nb.Provider,{value:o,children:t})}function Mhe(){return cd.useContext(nb)}function RV(e){cd.useEffect(()=>{const t=new CSSStyleSheet;for(const s of e){const o=`[data-rise-typeface-id="${CSS.escape(s.id)}"] { font-family: "${CSS.escape(s.name)}"; }`;t.insertRule(o)}return t.insertRule('[data-rise-typeface-id="@@heading@@"] { font-family: var(--font-family-head); }'),t.insertRule('[data-rise-typeface-id="@@body@@"] { font-family: var(--font-family-body); }'),document.adoptedStyleSheets=[...document.adoptedStyleSheets,t],()=>{document.adoptedStyleSheets=document.adoptedStyleSheets.filter(s=>s!==t)}},[e])}function PV(e){return e.fonts}function ob(){return de(PV)}var MV=p(82920);function OV({children:e}){const t=ob(),s=MV.useMemo(()=>{const o=new Map;for(const r of t)o.set(r.id,{id:String(r.id),name:r.name,default:r.default});return Array.from(o.values())},[t]);return(0,n.jsx)(AV,{typefaces:s,children:e})}function BV(){const e=re();return{accentContrast:e.theme?.accentContrast,bodyTypeface:e.bodyTypeface,color:e.color,headingTypeface:e.headingTypeface,isLegacyCourse:e.isLegacyCourse,uiTypeface:e.uiTypeface}}function DV(){const e=es(),t=(0,we.zy)(),s=(0,u.useRef)(e),o=(0,u.useRef)(new Set),r=(0,u.useRef)(window.location.href),a=(0,u.useRef)(null);s.current=e,a.current==null&&(a.current={push:(...i)=>s.current(...i),replace:i=>s.current(i,{replace:!0}),go:i=>s.current(i),goBack:()=>s.current(-1),goForward:()=>s.current(1),listen:i=>(o.current.add(i),()=>{o.current.delete(i)}),location:t}),(0,u.useEffect)(()=>{a.current&&i8(a.current)},[]),(0,u.useEffect)(()=>{if(!a.current)return;a.current.location=t,o.current.forEach(l=>l(t));const i=r.current,c=window.location.href;r.current=c,window.dispatchEvent(new HashChangeEvent("hashchange",{oldURL:i,newURL:c}))},[t])}var Ia=p(58893),FV=p(51246),Tt=p.n(FV),HV=p(30349),$V=p.n(HV);const VV=oi()(ah()(/^#([0-9a-f]{3}|[0-9a-f]{6})$/i),Re()("#FFF")),zV=Dn()({color:VV}),UV=({accentContrast:e,bodyTypeface:t,color:s,headingTypeface:o,isLegacyCourse:r,uiTypeface:a})=>{const i=(0,u.useMemo)(()=>{const d=Is(s),h=e??d;return!r&&(h===Te.DARK||h===Te.AUTO&&d===Te.DARK)?[bt.DARK,bt.LIGHT]:[bt.LIGHT,bt.DARK]},[e,s,r]),[c,l]=i;return(0,n.jsx)("div",{dangerouslySetInnerHTML:{__html:$V()({bodyTypeface:t,colorThemeRGB:(0,Ia.A)(s)?.slice(0,3),colorTheme:s,colorThemeContrast:c,colorThemeContrastComplementary:l,colorThemeContrastComplementaryRGB:(0,Ia.A)(l)?.slice(0,3),colorThemeContrastRGB:(0,Ia.A)(c)?.slice(0,3),colorThemeTint:x0(s),colorThemeTransparent:s+"1A",headingTypeface:o,uiTypeface:a})}})},$m=Pe()(UV,zV);$m.displayName="Branding",$m.propTypes={bodyTypeface:Tt().string,color:Tt().string.isRequired,headingTypeface:Tt().string,uiTypeface:Tt().string};const _V=(0,u.memo)($m);function GV(e,t){const s=ol(),{currentLocale:o}=it(),r=o&&s?.localeLabelSets?.[o]?.labels||e,a=o&&s?.localeLabelSets?.[o]!=null?o:t;return{labels:r,labelsLocale:a}}function WV({children:e}){const t=re(),s=fr(),{labels:o,iso639Code:r}=Nj(),a=cF(),i=Lo(),c=t?.locale??r,{labels:l,labelsLocale:d}=GV(o,c);return(0,n.jsx)(LI,{course:t,courseProgress:s,labels:l,labelsLocale:d,partnerContent:a,search:i,children:e})}var KV=p(56050);function QV({children:e,l10n:t}){const s=(0,u.useMemo)(()=>({l10n:t==null?null:(0,KV.omit)(["locales","defaultLocale"],t)}),[t]),o=t?.locales,r=t?.defaultLocale,a=t?.localeSelectorOptions,i=t?.languageCodeMetadata,c=(0,u.useMemo)(()=>o==null||r==null?{l10n:null}:{l10n:{locales:o,defaultLocale:r,localeSelectorOptions:a,languageCodeMetadata:i}},[o,r,a,i]);return(0,n.jsx)(vi.Provider,{value:s,children:(0,n.jsx)(eh.Provider,{value:c,children:e})})}function rb(e,t=window.location){const{defaultLocale:s,locales:o}=e??{};let r=new URLSearchParams(t.search).get("locale");if(r==null&&t.hash){const c=(0,we.Rr)(t.hash.slice(1));r=new URLSearchParams(c.search).get("locale")}const a=new URL(window.location.href);return a.pathname.startsWith("/view-pdf/")&&(r=a.searchParams.get("locale")),o?.find(c=>c.locale===r)?.locale||s}function YV({defaultLocale:e,locales:t}){const s=es(),o=(0,we.zy)(),r=(0,u.useRef)(o);r.current=o;const a=(0,u.useMemo)(()=>rb({defaultLocale:e,locales:t},o),[e,t,o]),i=(0,u.useCallback)((c,l="replace")=>{const d=r.current,h=c===e?"":c,m=new URLSearchParams(d.search);m.set("locale",h);const f=d.pathname+"?"+m.toString()+d.hash;l==="push"?s(f):s(f,{replace:!0})},[e,s]);return{currentLocale:a,setCurrentLocale:i}}const ab=e=>e===window.location.origin||e==="articulate.com"||e.endsWith(".articulate.com");function ZV(e,t){const s=re(),o=ol(),r=de(l=>l.courseLabels.iso639Code),a=s?.locale??r,i=o?.locales;(0,u.useEffect)(()=>{document.documentElement.lang=e??a??""},[e,a]),(0,u.useEffect)(()=>{s&&U0({course:s,locales:i,locale:e})?document.documentElement.dir="rtl":document.documentElement.dir=""},[s,i,e]);const c=(0,u.useCallback)(l=>{if(!ab(l.origin))return;const h=[l.data].flat().find(m=>m?.type==="preview:selectLocale");h&&t(h.data,"replace")},[t]);(0,u.useEffect)(()=>(window.addEventListener("message",c),()=>window.removeEventListener("message",c)),[c])}function XV({children:e}){const t=ol(),{currentLocale:s,setCurrentLocale:o}=YV({defaultLocale:t?.defaultLocale,locales:t?.locales});return ZV(s,o),(0,n.jsx)(QV,{l10n:t,children:(0,n.jsx)(gI,{currentLocale:s,setCurrentLocale:o,children:e})})}function qV(e){const t=e?.exportSettings?.webExportSettings,s=e?.exportSettings?.exportType==="raw",o=e?.exportSettings?.exportType==="lms";return!!(s&&t?.disableCoverPage||o&&e?.lmsOptions?.disableCoverPage)}function ib(e){return!Ln.isInstantLink&&qV(e)}function JV(e){return F1(e)||t0(e)||Ur(e)||s0(e)?!0:ib(e)}const cb=(0,u.createContext)({translationHoveredPath:null});function ez(){return(0,u.use)(cb)}const tz=cb.Provider,sz=new Set(["preview:lessonUpdate","preview:navigate","preview:scrollto","preview:showLessonNavNext","preview:showLessonNavPrev","preview:themeUpdate","preview:update","preview:navOpen","preview:navClose","preview:replace","preview:changeset","preview:selectLocale",Cs.FOCUS,Cs.TOGGLE,Cs.CLEAR,Cs.TRANSLATION_HOVERED,Cs.TRANSLATION_HOVER_CLEAR]),nz=(e,t)=>!(e==="firstLesson"&&t.includes("/lessons/"))&&!(e==="cover"&&(t==="/"||t==="/preview"));function oz({course:e,fonts:t,l10n:s}){let o=!1;return Av(t,()=>{o||(ps(kk({course:e,fonts:t,l10n:s})),window.parent.postMessage({type:"preview:themeUpdateComplete"},window.location.origin))}),{cancel(){o=!0}}}function rz(){let e=[],t=0;return s=>{clearTimeout(t);for(const o of s)e.push(o);t=window.setTimeout(()=>{const o=e;e=[],ps(Ik(o))},15)}}function az(){const e=es(),t=(0,we.zy)(),s=de(b=>b.course),[o,r]=(0,u.useState)(""),[a,i]=(0,u.useState)({translationHoveredPath:null}),[c,l]=(0,u.useState)(!1),[d,h]=(0,u.useState)(!1),m=(0,u.useRef)(e);m.current=e;const f=(0,u.useRef)(t);f.current=t;const v=(0,u.useRef)(s);v.current=s;const C=(0,u.useRef)(null),g=(0,u.useRef)(rz()),x=(0,u.useRef)(t);return(0,u.useEffect)(()=>{x.current!==t&&(h(!0),x.current=t)},[t]),(0,u.useEffect)(()=>{if(d){const b=setTimeout(()=>{h(!1),l(!1)},0);return()=>clearTimeout(b)}},[d]),(0,u.useEffect)(()=>{const b=T=>{const{data:L,origin:y}=T;if(!ab(y))return;const S=m.current,N=f.current.pathname,I=v.current,w=I?.lessonsOnly,A=Array.isArray(L)?L:[L];for(const{type:E,data:j,options:O}of A)if(sz.has(E)){if(E===Cs.TOGGLE&&window.targetMode?.(j,P=>{window.parent.postMessage({type:Cs.HOVERED,data:P},"*")})?.then(P=>{window.parent.postMessage({type:Cs.SELECTED,data:P},"*")}).catch(()=>{window.parent.postMessage({type:Cs.SELECTED,data:[]},"*")}),E==="preview:update"&&r(j),E==="preview:themeUpdate"){C.current?.();const{course:R,l10n:P,fonts:M,theme:H}=j,F={...R,theme:H},D=o7({course:I,updates:F}),{cancel:V}=oz({course:D,fonts:M,l10n:P});C.current=V}if(E==="preview:navigate"){let{type:R,lessonId:P,itemId:M}=j;const{path:H,replace:F}=j,D=F?V=>S(V,{replace:!0}):S;if(nz(R,N)){if(Array.isArray(H)){const V=(0,Dr.Ce)(H);if(V)({type:R,lessonId:P,itemId:M}=V);else if(H[0]==="mondrian")for(const W of I?.lessons??[]){const _=W.items?.find(Z=>"blockumentId"in Z&&Z.blockumentId===H[1]);if(_){R="lesson",P=W.id,M=_.id;break}}else continue}if(R==="firstLesson"&&w?.[0])D(Ns(w[0].id));else if(R==="cover"||R==="course")D("/");else if(R==="lesson"&&w?.find(({id:W})=>W===P)!=null){const W=Ns(P);if(nh(aC.getState())===yo.RESTRICTED&&ps(Yk({targetLessonId:P,lessons:I?.lessons??[]})),W!==N&&D(W),M||H){const Z=()=>{window.dispatchEvent(new CustomEvent(Ge,{detail:{lessonId:P,itemId:M,path:H}}))};W!==N?setTimeout(Z,1500):Z()}}}}if(E===Cs.CLEAR&&window.dispatchEvent(new CustomEvent(ym)),E==="preview:navOpen"&&window.dispatchEvent(new CustomEvent(hx)),E==="preview:navClose"&&window.dispatchEvent(new CustomEvent(mx)),E==="preview:showLessonNavPrev"&&window.dispatchEvent(new CustomEvent(Ql)),E==="preview:showLessonNavNext"&&window.dispatchEvent(new CustomEvent(Yl)),E==="preview:scrollto"&&typeof j.target=="string"){const R=document.querySelector(j.target);R&&R.scrollIntoView({behavior:"smooth",block:"start"})}E==="preview:replace"&&ps(Sk(j)),E==="preview:changeset"&&g.current(j),E===Cs.FOCUS&&OO(j.path),E===Cs.TRANSLATION_HOVERED&&(i({translationHoveredPath:j.path}),MO(j.path)),E===Cs.TRANSLATION_HOVER_CLEAR&&(i({translationHoveredPath:null}),AO()),E==="preview:lessonUpdate"&&(ps(Nk(j)),window.parent.postMessage({type:"preview:lessonUpdateComplete"},window.location.origin)),E==="preview:selectLocale"&&O?.shouldRetainParentFocus&&l(!0)}};return window.addEventListener("message",b),()=>window.removeEventListener("message",b)},[]),{previewType:o,targetModeContext:a,didNavigate:d,shouldSkipAutoFocusOnNavigate:c}}const lb=(0,u.createContext)(null);function Vm(){const e=(0,u.useContext)(lb);if(e==null)throw new Error("usePreviewState must be used within PreviewRuntimeProvider");return e}function iz({children:e}){const{previewType:t,targetModeContext:s,didNavigate:o,shouldSkipAutoFocusOnNavigate:r}=az(),a=(0,u.useMemo)(()=>({previewType:t||void 0,didNavigate:o,shouldSkipAutoFocusOnNavigate:r}),[t,o,r]);return(0,n.jsx)(tz,{value:s,children:(0,n.jsx)(lb,{value:a,children:e})})}const Ea=$("cover");function Ohe(){const{categories:e}=re();return!Array.isArray(e)||e.length===0?null:(0,n.jsxs)("section",{className:Ea("categories-section"),children:[(0,n.jsx)("h2",{className:Ea("categories-title"),children:"Topics"}),(0,n.jsx)("ul",{className:Ea("categories-list"),role:"list",children:e.map(t=>(0,n.jsxs)("li",{className:Ea("categories-item"),role:"listitem",children:[(0,n.jsx)(yF,{className:Ea("categories-icon")}),(0,n.jsx)("span",{className:Ea("categories-item-wrap"),children:t})]},t))})]})}var cz=p(24756);const lz=`${Ie("CDN_URI")}/assets/rise/assets/certificate-icon.svg`,dz=`${Ie("CDN_URI")}/assets/rise/assets/error_x.svg`,uz=`${Ie("CDN_URI")}/assets/rise/assets/loading_spinner.svg`,Ki="downloading",ja="error",Tr="ok",zm="contained",db=({type:e})=>{const[t]=(0,u.useState)(()=>vr()("certdownload-")),[s,o]=(0,u.useState)(Tr),r=(0,Me.A)(s),a=(0,u.useRef)(null),i=be(),c=`${t}-live`,l=e===zm?"certificateDownload certificateDownloadContained":"certificateDownload",d=(0,u.useCallback)(()=>{o(Ki)},[]);return(0,u.useEffect)(()=>(s===Ki&&r!==Ki&&EN().then(()=>{o(Tr)}).catch(h=>{(0,cz.FZ)(h)?o(Tr):o(ja)}),()=>{jN()}),[r,s]),(0,u.useEffect)(()=>{a.current&&(s===ja&&r!==ja||s===Tr&&(r===ja||r===Ki))&&a.current.focus()},[r,s]),(0,n.jsxs)("div",{className:l,children:[(0,n.jsxs)("div",{"aria-live":"polite",id:c,role:"status",children:[s===Ki&&(0,n.jsxs)("span",{className:"certificateDownload__downloading",children:[(0,n.jsx)("img",{alt:"",className:"animation-loading certificateDownload__downloadingImg",height:"15",src:uz,width:"15"}),i?.certificateDownloadInProgress||"Downloading..."]}),s===ja&&(0,n.jsxs)("span",{className:"certificateDownload__error",children:[(0,n.jsx)("img",{alt:"Error",className:"certificateDownload__errorImg",height:"15",src:dz,width:"15"}),(0,n.jsx)("span",{className:"visually-hidden",children:i?.a11yCertificateDownloadFailed||"Failed to download certificate"})]})]}),(s===Tr||s===ja)&&(0,n.jsxs)("button",{"aria-controls":c,className:"certificateDownload__btn",onClick:d,ref:a,type:"button",children:[s===Tr&&e===zm&&(0,n.jsx)("img",{alt:"",className:"certificateDownload__okImg",height:"15",src:lz,width:"15"}),s===Tr?i?.certificateDownload||"Download certificate":i?.certificateRetryDownload||"Retry download"]})]})},hz=()=>(0,n.jsx)(db,{type:zm}),mz=(0,u.memo)(db);var fz=p(39475),pz=p.n(fz),gz=p(28731),vz=p.n(gz);const Cz=Nt()(pz()({}),Y1()(["first_name","last_name"]),Yr()(" "),vz()),xz=({className:e,decorative:t,size:s,...o})=>{const r=$n()(["avatars","medium"],o),a=t?"":Cz(o)||"Unknown User";return r?(0,n.jsx)("img",{alt:a,className:e||"user-avatar",src:r,style:{height:s,width:s}}):(0,n.jsx)(mm,{decorative:t,height:s,title:a,width:s})},bz=`${Ie("CDN_URI")}/assets/rise/assets/trophy.svg`,ld=$("cover"),yz=mz,Tz=xz;function Dhe(){const{certificateDownload:e,riseComCurrentUser:t}=re(),s=be(),o=fj(),a=ph()?.quizPassed??!0;return!(o&&a&&!xg())||window.viewType==="preview"?null:(0,n.jsxs)("div",{className:ld("completed-info"),children:[(0,n.jsxs)("div",{className:ld("completed-info-avatar"),children:[(0,n.jsx)(Tz,{...t??{},decorative:!0}),(0,n.jsx)("img",{alt:"",className:ld("completed-info-trophy"),src:bz})]}),(0,n.jsxs)("div",{className:ld("completed-info-label"),children:[(0,n.jsx)("span",{"aria-hidden":"true",children:s?.coverCompleted||"Completed"}),(0,n.jsx)("span",{className:"visually-hidden",children:s?.a11yCoverCourseCompleted||"Course Completed"})]}),e&&(0,n.jsx)(yz,{})]})}const Lz=$("cover");function Sz(e){return typeof e=="object"&&e!=null}function kz(e){return e==null||typeof e=="string"||typeof e=="number"||e instanceof Date}function Nz(e){if(!Sz(e))return;const t=e.dueAt;return kz(t)?t:void 0}function Iz({className:e="",dueAt:t}){const s=WE(),o=ph(),r=o==null||o.quizPassed||o.outOfAttempts,a=$2(t),i=Lz("due-date",{urgent:a}).mix(e);return!t||s&&r?null:(0,n.jsx)("div",{className:i,children:Qh(t)})}const Ez=Oe("CoverDueDate",Iz);function Fhe(e){const t=Nz(Ci());return(0,n.jsx)(Ez,{...e,dueAt:t})}const ub=({failed:e,complete:t})=>{const s=be();return(0,n.jsxs)("span",{className:"visually-hidden-always",children:[e?s?.a11yCoverRequirementFailed||"Requirement failed":t?s?.a11yCoverRequirementComplete||"Requirement complete":s?.a11yCoverRequirementIncomplete||"Requirement incomplete",": "]})},mn=$("cover");function $he(){const e=re(),t=be(),{trackingCompletionPercentage:s,trackingQuizId:o}=e;return s==null&&!o?null:(0,n.jsxs)("section",{className:mn("requirements-section"),children:[(0,n.jsx)("h2",{className:mn("requirements-title"),children:t?.coverCourseRequirements||"Course Requirements"}),(0,n.jsxs)("ul",{className:mn("requirements-list"),children:[(0,n.jsx)(jz,{}),(0,n.jsx)(Az,{})]})]})}function jz(){const{trackingCompletionPercentage:e}=re(),t=yC(),s=na(),o=be();if(e==null)return null;const r=Math.ceil(e/100*t),a=r===t,i=s!=null&&s>=e,c=i?SF:kF;return(0,n.jsxs)("li",{className:mn("lesson-requirement"),role:"listitem",children:[(0,n.jsx)(c,{"aria-hidden":"true",className:mn("lesson-requirement-icon",{complete:i}).toString()}),(0,n.jsxs)("span",{className:mn("lesson-requirement-text"),children:[(0,n.jsx)(ub,{complete:i}),a?o?.coverCompleteAllLessons||"Complete all lessons in this course":[o?.coverCompleteLessonsName||"Complete",r,o?.coverCompleteLessonsPreposition||"of",t,o?.coverCompleteLessonsInCourse||"lessons in this course"].join(" ")]})]})}const wz={passed:EF,failed:IF,requirement:jF};function Az(){const e=be(),t=GE(),s=ph(),o=on(),r=lt(t?.title),a=t?.settings?.passingScore;if(!r||!s)return null;const{outOfAttempts:i,quizPassed:c}=s,l=!c&&i;let d="requirement";c?d="passed":l&&(d="failed");const h=wz[d],m=a!=null?Ca({percent:Number(a),label:e?.coverQuizPercentOrHigher||"% or higher",isRTL:o}):null;return(0,n.jsxs)("li",{className:mn("quiz-requirement"),role:"listitem",children:[(0,n.jsx)(h,{"aria-hidden":"true",className:mn("quiz-requirement-icon",{type:d}).toString()}),(0,n.jsxs)("span",{className:mn("quiz-requirement-text"),children:[(0,n.jsx)(ub,{complete:c,failed:l}),r,a!=null&&(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("span",{"aria-hidden":"true",className:mn("quiz-requirement-seperator"),children:"\xA0|\xA0"}),e?.coverQuizScoreOf||"Score of"," ",m]}),l&&(0,n.jsx)("div",{className:mn("quiz-requirement-no-attempts"),children:e?.coverNoAttemptsRemaining||"No attempts remaining"})]})]})}const Rz=$("cover"),Pz=({coursePartnerContent:e})=>(0,n.jsx)(td,{type:"partner-content",children:(0,n.jsx)(Mx,{partnerContent:e})}),Mz=Oe("CoverCourseInfo",({hasLogo:e})=>{const t=Oi(),s=t!=null,o=Rz("details-content-aside",{logo:e});return(0,n.jsxs)("div",{className:o,children:[!1,t&&(0,n.jsx)(Pz,{coursePartnerContent:t}),!1,!1]})}),Oz=$("cover"),Bz=Oe("CoverDescription",()=>{const e=re(),{navigation:t}=e,s=Ae(e.description),o=t?"description":"description-no-outline";if(!s)return null;const r=fa("description"),a=(0,Qt.uW)(e.description)?{"data-l10n-id":e.description.l10nId}:{"data-change-path":r};return(0,n.jsx)("div",{...a,children:(0,n.jsx)(td,{type:o,children:(0,n.jsx)(ke,{className:Oz("details-content-description"),value:String(Dh(s))},"text")})})}),hb=$("cover"),Um=({className:e=hb("details-logo"),imageClassName:t=hb("details-logo-image")})=>{const s=re()??{},o=Ae(s.media)?.image??{},{height:r,key:a,width:i,scalar:c=n0.SMALL.value}=o,l={width:Number(i)*c,height:Number(r)*c};if(!a)return null;const d=dt(o);return(0,n.jsx)("div",{className:e.toString(),"data-testid":"cover-details-logo",children:(0,n.jsx)("img",{alt:"",className:t.toString(),"data-testid":"cover-details-logo-image",height:l.height,src:d,width:l.width})})};function Dz({icon:e,...t}){switch(e){case Ds.ARTICLE:return(0,n.jsx)(LB,{...t});case Ds.INTERACTION:return(0,n.jsx)(QD,{...t});case Ds.QUIZ:return(0,n.jsx)(_D,{...t});case Ds.VIDEO:return(0,n.jsx)(nF,{...t});default:return(0,n.jsx)("i",{className:"icon icon-Master-02"})}}var Qi=p(31188);const Fz=Oe("LessonProgressGraphic");function dd({canComplete:e,id:t,isDark:s,isEnabled:o,isTooltipVisible:r,onHideTooltip:a,onShowTooltip:i,scope:c}){const{color:l,navigationStyle:d}=re(),h=Io(t),m=Es(),f=DC(t),v=FC(t),C=Si(t),g=be(),x=C?.type!=null,b=h?.isComplete,T=t===m,L=h?.percentComplete??0,y=(0,u.useCallback)(()=>{ps(Jc(t))},[t]),S=(0,u.useCallback)(()=>{ps(Ak(t))},[t]);return(0,n.jsx)(Hx,{canComplete:e,color:l,hasRestriction:x,isComplete:b,isCurrentLesson:T,isDark:s,isEnabled:o,isFailed:f,isPassed:v,isTooltipVisible:r,labels:g,navigationStyle:d,onHideTooltip:a,onMarkComplete:y,onMarkReset:S,onShowTooltip:i,percentComplete:L,progressGraphic:Fz,scope:c})}const Hz=$("overview-list-item");function $z({className:e,id:t,last:s}){const o=es(),r=Es(),{color:a,isLegacyCourse:i,navigationStyle:c,theme:l}=re(),{accentContrast:d}=l??{},{icon:h,title:m}=Vt(t)??{},f=lt(m),v=Io(t),C=DC(t),g=FC(t),x=Si(t),b=be(),T=(0,Qt.uW)(m)?{"data-l10n-id":m.l10nId}:{"data-change-path":E2(t,"title")},L=v?.isComplete,y=v?.percentComplete??0,S=x?.type!=null,[k,N]=(0,u.useState)(!1),I=(0,u.useCallback)(()=>N(!0),[]),w=(0,u.useCallback)(()=>N(!1),[]),A=s?"overview-list__li overview-list__li--last":"overview-list__li",E=[e,"overview-list-item"].filter(Boolean).join(" "),j=(0,u.useCallback)(O=>{const{currentTarget:{hash:R}}=O;O.preventDefault(),Qi.Ay.Events.scrollEvent.register("end",()=>{Xn(()=>{o(R.slice(1))},"cover-to-lesson"),Qi.Ay.Events.scrollEvent.remove("end")}),Qi.Ay.animateScroll.scrollTo(0,{containerId:"overview"})},[o]);return(0,n.jsx)("li",{...T,className:A,"data-testid":`overview-list-item-${t}`,role:"listitem",children:(0,n.jsx)(Hi,{className:E,isTooltipEnabled:!0,lessonId:t,onBlur:w,onClick:j,onHideProgressTooltip:w,onShowProgressTooltip:I,showProgressDelay:25,tooltipClassName:"overview-list-item-tooltip",children:(0,n.jsx)(Uz,{accentContrast:d,color:a,hasRestriction:S,isComplete:L,isCurrentLesson:t===r,isFailed:C,isLegacyCourse:i,isPassed:g,isTooltipVisible:k,labels:b,lessonIcon:h,lessonId:t,lessonTitle:f,navigationStyle:c,onHideTooltip:w,onShowTooltip:I,percentComplete:y,progressGraphic:Vz,scope:vo.COVER})})})}const Vz=Oe("LessonProgressGraphic");function zz({isTooltipVisible:e,lessonIcon:t,lessonId:s,lessonTitle:o,onHideTooltip:r,onShowTooltip:a,scope:i}){const c=Hz("progress-circle");return(0,n.jsxs)("div",{className:c,children:[(0,n.jsx)("span",{"aria-hidden":"true",className:"overview-list-item__icon",children:(0,n.jsx)(Dz,{icon:t??void 0})}),(0,n.jsx)("span",{className:"overview-list-item__title","data-testid":`overview-list-item-title-${s}`,children:o}),(0,n.jsx)(dd,{canComplete:!1,id:s,isDark:!1,isEnabled:!0,isTooltipVisible:e,onHideTooltip:r,onShowTooltip:a,scope:i})]})}const Uz=Oe("OverviewListItemLinkContent",zz),_z=$("overview-list"),Gz=e=>e.reduce((t,s)=>(s.type==="section"?t.push([s]):t[t.length-1]?t[t.length-1].push(s):t.push([s]),t),[]),Wz=Oe("OverviewListSectionTitle",({className:e="",...t})=>{const s=$r()(["Default"],t);return(0,n.jsx)("h2",{...s,className:`${e} overview-list__section-title`})}),Kz=()=>{const e=bj(),t=be(),s=Gz(e);return(0,n.jsx)("nav",{"aria-label":t?.a11yRegionNavOverview,className:"overview-list",children:s.map((o,r)=>{const[a,...i]=o;if(!a)return null;const{title:c,type:l}=a,d=l==="section",h=d?i:o,m=_z("list",{sectionless:!d});return(0,n.jsxs)("section",{children:[d&&c&&(0,n.jsx)(Wz,{children:(0,n.jsx)(gs,{value:c})}),(0,n.jsx)("ol",{className:m,role:"list",children:h.map((f,v)=>(0,n.jsx)($z,{id:f.id,last:h.length>1&&v===h.length-1},f.id))})]},r)})})},Qz=(0,u.memo)(Kz),Yz=e=>Object.values(n0).find(t=>t.value==e);function Zz(e){return(0,u.useMemo)(()=>Yz(e)??n0.SMALL,[e])?.label.toLowerCase()}const wa=$("cover");function mb(e){return typeof e=="object"&&e!=null}function Xz(e){return mb(e)}function qz(e){if(mb(e))return Xz(e.image)?e.image:void 0}const Jz=Oe("CoverDetails",({reverseColumns:e})=>{const t=Et(1200),{description:s,media:o,navigation:r,partnerContentId:a,publishedAt:i}=re(),l=!!Oi(),d=qz(lt(o)),h=d!=null&&Object.keys(d).length>0,m=!!r,f=!s||!m,v=!s&&!m,C=!!l,g=wa("details",{"rise-com":!1,"rise-com-authoring":!1}),x=wa("details-content-wrap",{columns:C,logo:h}),b=wa("details-content",{"no-description-or-outline":f}),T=wa("details-logo",{centered:v,"no-description-or-outline":f,"has-partner-content":!!a}),L=C&&(0,n.jsx)(Mz,{hasLogo:h}),y=Zz(d?.scalar),S=wa("details-logo-image",{[y]:!0}),k=wa("details-description-outline");return(0,n.jsx)("section",{className:g,"data-testid":"cover-details",children:(0,n.jsxs)("div",{className:x,children:[!t&&e&&L,(0,n.jsxs)("div",{className:b,children:[(0,n.jsx)(Um,{className:T,imageClassName:S}),(0,n.jsxs)("div",{className:k,children:[s&&(0,n.jsx)(Bz,{}),t&&L,m&&(0,n.jsx)(td,{type:"outline",children:(0,n.jsx)(Qz,{})})]})]}),!t&&!e&&L]})})}),eU=e=>e?`${e} | ${zp}`:zp,Yi=e=>Ja()?e:eU(e);function Lr({children:e,title:t,isExplicit:s=!1}){const o=Yi(fC());return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("title",{children:t??o},s?"explicit":"default"),e]})}const tU=Oe("CoverHeader"),sU=Oe("CoverLayout"),nU=["[href]",'[tabindex]:not([tabindex=""])',"audio[controls]","button:not([disabled])","details:not([disabled])",'input:not([disabled]):not([type="hidden"])',"select:not([disabled])","summary:not([disabled])","textarea:not([disabled])","video[controls]"].map(e=>`${e}:not([tabindex="-1"]):not([hidden]):not([aria-hidden="true"])`).join(", "),fb=(e,t=!1)=>s=>{const o=pb(s);if(o.length===0)return;const r=e>=o.length&&t?0:e;return Gp()(r,o)},pb=e=>e?Array.from(e.querySelectorAll(nU)).filter(t=>window.getComputedStyle(t).display!=="none"):[],gb=fb(0),oU=fb(-1),_m=e=>gb(e)?.focus?.();function rU(){const e=(0,u.useRef)(null);function t(s){const o=gb(e.current),r=oU(e.current);Tl(s)&&(s.shiftKey?document.activeElement===o&&(r.focus(),s.preventDefault()):document.activeElement===r&&(o.focus(),s.preventDefault()))}return(0,u.useEffect)(()=>{const s=e?.current;return s?.addEventListener("keydown",t),()=>{s?.removeEventListener("keydown",t)}},[]),e}var Gm;const Wm=u.createContext(null);Wm.displayName="UndoManagerContext";function Yhe(e){return Gm(Wm.Provider,{value:e.undoManager,children:e.children})}function vb(){return u.useContext(Wm)}function Zhe(e){function t(s){const o=vb();return Gm(e,{...s,undoManager:o})}return t.displayName=`withUndoManager(${e.displayName||e.name})`,t}function Cb(){const e=vb();u.useEffect(()=>{if(e!=null)return e.disable(),()=>e.enable()},[e])}function Xhe(e){function t(s){return Cb(),Gm(e,{...s})}return t.displayName=`withDisableUndoManager(${e.displayName||e.name})`,t}const Zt=$("modal"),ud=u.forwardRef((e,t)=>{const{children:s,className:o,"data-testid":r,darkOverlay:a,disableBackgroundScroll:i,disableCloseOnOverlayClick:c,disableCloseOnEscape:l=!1,focusFirstInput:d=!0,focusOnOpen:h=!0,footer:m,forceToTop:f=!1,fullscreen:v=!1,heading:C,hideCloseButton:g=!1,hideHeader:x=!1,skipDialogClose:b=!1,useTopLayer:T=!0,onCancel:L,onClose:y=Kt,onClickBack:S,onCloseBubbles:k=!1,onOverlayClick:N,scroll:I=!1,subHeading:w,subText:A,width:E}=e;Cb();const j=rU(),O=(0,u.useRef)(null),R=(0,u.useCallback)(()=>{const F=j.current;!b&&F?.open&&F.close(),y()},[y,j,b]);(0,u.useEffect)(()=>{const F=D=>{vs(D)&&!l&&(D.preventDefault(),D.stopPropagation(),L?.(D),R())};return document.addEventListener("keydown",F,!k),()=>{document.removeEventListener("keydown",F,!k)}},[l,L,R,k]),(0,u.useEffect)(()=>{const F=j.current;if(F)return T?F.showModal():F.show(),h||setTimeout(()=>{F.contains(document.activeElement)&&document.activeElement?.blur()},0),()=>{F.close()}},[j,T,h]),(0,u.useEffect)(()=>{if(d&&j.current){const D=pb(j.current).find(W=>W.tagName==="INPUT"||W.tagName==="TEXTAREA"||W.tagName==="SELECT"),V=D||O?.current;V?.focus(),V instanceof HTMLTextAreaElement&&V.setSelectionRange(V.value.length,V.value.length)}},[d,j]),(0,u.useEffect)(()=>(i&&(document.scrollingElement||document.documentElement).classList.add("no-scroll"),()=>{i&&(document.scrollingElement||document.documentElement).classList.remove("no-scroll")}),[i,j]);const P=Zt({"force-to-top":f}).mix(o),M=Zt("content",{"with-footer":!!m,"force-scroll":!!I}),H=Zt("overlay",{dark:!!a});return(0,n.jsxs)("dialog",{"aria-labelledby":"modal-heading","aria-modal":"true",className:P.toString(),"data-testid":r,onClose:R,ref:F=>{j.current=F,t&&(t.current=F)},role:"dialog",children:[(0,n.jsx)("div",{id:"modal-portal"}),(0,n.jsx)("div",{className:H,onClick:c?void 0:N||R}),(0,n.jsxs)("div",{className:Zt("dialog",{fullscreen:v}),style:E&&!v?{width:E}:{},children:[(!x||!g)&&(0,n.jsxs)("div",{className:Zt("heading-wrapper"),children:[(0,n.jsxs)("div",{className:Zt("heading-flexbox"),children:[!x&&(0,n.jsxs)("div",{className:Zt("header"),children:[S&&(0,n.jsx)("button",{"aria-label":"back to previous page",className:Zt("back"),onClick:S,type:"button",children:(0,n.jsx)(ie,{className:Zt("back-icon"),name:"arrow-left"})}),(0,n.jsxs)("h1",{className:Zt("heading"),id:"modal-heading",children:[C,(0,n.jsx)("span",{className:Zt("subheading"),children:w})]})]}),!g&&(0,n.jsx)("button",{"aria-label":"close dialog",className:Zt("close"),onClick:R,ref:O,type:"button",children:(0,n.jsx)(ie,{className:Zt("close-icon"),name:"close"})})]}),A?(0,n.jsx)("h2",{className:Zt("subtitle"),children:A}):[]]}),(0,n.jsx)("div",{className:M,children:s}),m&&(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("div",{className:Zt("footer-shadow")}),(0,n.jsx)("div",{className:Zt("footer"),children:m})]})]})]})}),Aa=$("locale-selector"),Km=({onClose:e})=>{const t=(0,we.zy)(),s=re(),o=NI(),r=sl(),a=II(),i=a?.length?a:o&&r?r?.map(S=>S.locale):void 0,[c,l]=(0,u.useState)(!1),d=c&&(i?.length||0)>1,h=(0,Me.A)(d),m=lt(s?.title),{currentLocale:f,setCurrentLocale:v}=it(),C=bM(),g=be(),[x,b]=(0,u.useState)(!1),T=(0,u.useCallback)(S=>{x8(S),v(S)},[v]),L=()=>{ps(B0(!1))};(0,u.useEffect)(()=>{h&&!d&&e?.()},[e,h,d]),(0,u.useEffect)(()=>{if(!i||x||o===void 0||!r)return;if(i.length===1){T(i[0]),b(!0);return}const S=gg(void 0),k=C8()??"";if(k!==""){T(k),b(!0),l(!1);return}S?.p==null&&k===""?l(!0):(l(!1),L());const I=(navigator.language??"en-US").toLowerCase(),w=i.find(A=>A.toLowerCase()===I);T(w?I:i[0]),b(!0)},[i,t,T,x,o,r,l]);const y=S=>{S.preventDefault();const k=S.target.value;T(k)};return!d||o===void 0||!r?null:(0,n.jsx)(Bn,{classNames:"modal",timeout:400,children:(0,n.jsx)(ud,{className:Aa("modal"),disableCloseOnOverlayClick:!0,hideCloseButton:!0,hideHeader:!0,onClose:L,children:(0,n.jsxs)("div",{className:Aa("container"),children:[(0,n.jsx)("div",{className:Aa("heading"),children:g.l10nChooseLanguage}),(0,n.jsx)("div",{className:Aa("course-title"),children:m}),(0,n.jsx)("div",{className:Aa("selector"),children:(0,n.jsx)("select",{onChange:y,value:f,children:i.map(S=>(0,n.jsx)("option",{value:S,children:C(S)},S))})}),(0,n.jsx)("div",{className:Aa("footer"),children:(0,n.jsx)(dn.ArcButton,{onClick:L,size:"lg",children:g.l10nChooseLanguageContinue})})]})})})},aU=$("cover-container"),xb=()=>document.querySelector("h1")?.focus({preventScroll:!0});function iU(){const{didNavigate:e,shouldSkipAutoFocusOnNavigate:t}=Vm(),o=be()?.overviewPageTitleSuffix,r=ea();return(0,u.useEffect)(()=>{t||e&&xb()},[e,t]),(0,n.jsxs)(Lr,{title:Yi(`${r} - ${o}`),children:[(0,n.jsx)("main",{children:(0,n.jsx)("div",{className:aU({}),children:(0,n.jsxs)(sU,{children:[(0,n.jsx)(tU,{}),(0,n.jsx)(Jz,{})]})})}),(0,n.jsx)(Km,{onClose:xb})]})}const cU=iU,lU=/^([^/\s]+)\/([^/\s]+)$/;function dU(e){const t=lU.exec(e.trim());return t?{lessonId:t[1],blockId:t[2]}:null}function eme(e,t){return`${e}/${t}`}const bb="blockId";function tme(e,t){return`#/lessons/${e}?${bb}=${t}`}const yb=(0,u.createContext)(void 0);function hd(){const e=(0,u.useContext)(yb);return e||(console.warn("useMediaContext must be used within a MediaProvider"),{mode:"readonly",openTranscript:null,closeTranscript:null,onTranscriptUpdate:null,lessonId:"",uploadAudio:null,aiEnabled:!1,aiWriterContext:void 0,removeMediaRecordType:void 0,removeItemMedia:void 0,handleOpenMediaModal:void 0,showAssetLibraryDialog:void 0,hideAssetLibraryDialog:void 0,handleDelete:void 0})}function Tb(e){function t(s){const o=hd();return(0,n.jsx)(e,{...s,...o})}return t.displayName=`WithMediaContextWrapper(${e.name})`,t}function uU({children:e,lessonId:t,mode:s="readonly",openTranscript:o,closeTranscript:r,onTranscriptUpdate:a,disableTranscriptButton:i=!1}){const c={mode:s,lessonId:t||"",openTranscript:o||null,closeTranscript:r||null,onTranscriptUpdate:a||null,disableTranscriptButton:i,uploadAudio:null,aiEnabled:!1,aiWriterContext:void 0,removeMediaRecordType:void 0,removeItemMedia:void 0,handleOpenMediaModal:void 0,showAssetLibraryDialog:void 0,hideAssetLibraryDialog:void 0,handleDelete:void 0};return(0,n.jsx)(yb.Provider,{value:c,children:e})}const Lb=(0,u.createContext)(void 0),hU=Lb.Provider;function Zi(){return(0,u.useContext)(Lb)}function mU({children:e}){const t=de(s=>s.transcriptPanel);return(0,n.jsx)(hU,{value:t,children:e})}const Sb=(0,fe.action)(tC),Xi=(0,fe.action)(sC),Qm=(0,fe.action)(nC);function fn(e){return e.refs?ca()("audio-id__refs_"+e.refs.toLowerCase()):""}function Ym(e){if(e)return`audio-transcript--${e}`}function kb(e){if(e)return`audio-player-transcript-toggle--${e}`}const Nb=$("course-exit");function Ib(e){const t=be(),{className:s,lmsOptions:o,style:r}=e;return o?.enableExitCourse?(0,n.jsx)("div",{className:Nb("wrapper"),children:(0,n.jsx)("button",{className:Nb("button").mix(s),onClick:Up,style:r,type:"button",children:t?.courseExit})}):null}const Zm=$("nav-control"),fU=()=>{const[e,t]=(0,u.useState)(!1);return(0,qe.A)(gx,()=>t(!0)),(0,qe.A)(Tm,()=>t(!1)),e},pU=({"aria-controls":e,isNavOpen:t,toggleNav:s,hideNav:o})=>{const{buttonNavigationStyle:r,lmsOptions:a,showNavigationButtons:i,...c}=re(),l=(0,u.useRef)(null),[d,h]=(0,u.useState)(0),m=be(),f=Vi(),v=ul(),C=fU(),g=(0,u.useMemo)(()=>c.lessons?.find(k=>k.id===v),[c.lessons,v]),x=g?.type==="quiz"&&!!g.settings?.timer,b=a?.enableExitCourse,T=x||b,L=c.navigationType===or.COMPACT,y=L?"fixed-course-exit":void 0;(0,u.useEffect)(()=>{l.current=document.querySelector(".page-wrap");const N=document.querySelector(".lesson-nav--previous")?.clientHeight??60,I=!i||r===Un.FLOATING&&!f;function w({target:A}){const E=A instanceof HTMLElement?A.scrollTop:0,j=N-E;h(j)}return C&&!I?l.current.scrollTop===0?h(N):l.current.addEventListener("scroll",w):h(0),()=>l.current.removeEventListener("scroll",w)},[r,f,C,i]);const S=(0,u.useCallback)(()=>{const k=document.getElementsByClassName("nav-control__menu--top-nav-bar").item(0),N=k instanceof HTMLElement?k:null;if(l.current&&N){const I=l.current.offsetWidth-l.current.clientWidth||0;N.style.maxWidth=`calc(100% - ${I}px)`}},[]);return(0,u.useLayoutEffect)(()=>{T&&S()},[T,S]),(0,n.jsx)("div",{className:Zm("wrapper"),children:(0,n.jsxs)("div",{className:Zm("menu",{"is-timed-quiz":x,"nav-off":o,"top-nav-bar":T}),style:{marginTop:d},children:[!o&&(!L||f)&&(0,n.jsx)("button",{"aria-controls":e,"aria-expanded":t,"aria-label":t?m?.a11yNavigationMenuClose:m?.a11yNavigationMenuOpen,className:Zm("button"),onClick:s,type:"button",children:(0,n.jsx)(ie,{classNameIcon:"page-menu-toggle__icon",name:"bars-regular"})}),(0,n.jsx)(Ib,{className:y,lmsOptions:a})]})})},Po=$("nav-compact"),gU=Oe("NavCompactHeaderCounter",e=>{const{lessonPosition:t,labelLessonName:s,labelLessonPreposition:o,totalLessons:r}=e;return t<=0?null:(0,n.jsx)("div",{className:Po("header-counter"),"data-testid":"nav-compact-counter",children:`${s} ${t} ${o} ${r}`})}),vU=Oe("NavCompactHeaderProgress",e=>{const{classProgressRunner:t,classProgressText:s,classProgressTrack:o,percentComplete:r,percentCompleteText:a,navExpanded:i}=e;return(0,n.jsxs)("div",{className:Po("header-progress"),"data-testid":"nav-compact-progress",children:[(0,n.jsx)("div",{className:s,children:a}),(0,n.jsx)(id,{"aria-hidden":i,"aria-label":a,progress:r,runnerClass:t,trackClass:o})]})}),CU=({closeNav:e,isExpanded:t,openNav:s})=>{const o=es(),r=ct(),a=Ci(),i=re(),c=ea(),l=na(),d=be(),h=Lo(),m=rl(),f=ul(),v=$C(),C=(0,u.useMemo)(()=>i?.lessonsOnly?.length??0,[i?.lessonsOnly]),g=(0,u.useMemo)(()=>v[f]??-1,[v,f]),x=a?.navigationStyle,b=(0,u.useMemo)(()=>Ti(x),[x]),T=(0,u.useCallback)(()=>{t?e():s()},[t,s,e]),L=a?.exportSettings?.webExportSettings,y=!Ln.isInstantLink&&(a?.lmsOptions?.disableCoverPage||L?.disableCoverPage),S=(0,u.useCallback)(oe=>{oe.preventDefault(),Xn(()=>{o("/")},"lesson-to-cover")},[o]),I=`${on()?`%${l}`:`${l}%`} ${d?.lessonComplete??""}`,{alpha:w,ariaLabel:A,media:E,role:j}=Cr("coverImage"),O=(0,u.useMemo)(()=>ta({alpha:w,color:a?.theme?.coverImageColor??void 0,media:E}),[w,a?.theme?.coverImageColor,E]),R=Po("header",{collapsed:!t}),P=Po("header-image",{collapsed:!t}),M="nav-compact__header-inner",H="nav-compact__header-control",F=Po("header-title-link",{collapsed:!t}),D=Po("header-progress-text",{collapsed:!t}),V=Po("header-progress-track",{collapsed:!t}),W=Po("header-progress-runner",{collapsed:!t}),_="nav-compact__header-strip",Z=(0,u.useCallback)(()=>{r(fi(!h?.active))},[r,h?.active]);return(0,n.jsxs)("section",{"aria-label":"Course Information",className:R,"data-testid":"nav-compact-header",children:[b&&O&&(0,n.jsx)("div",{"aria-label":A,className:P,role:j,style:O}),(0,n.jsxs)("div",{className:M,children:[(0,n.jsxs)("div",{className:_,children:[(0,n.jsxs)("div",{className:"nav-compact__header-controls",children:[a?.allowSearch&&m!=="restricted"&&t&&(0,n.jsx)("button",{"aria-label":d?.a11ySearchOpen,className:`${H} nav-compact__header-search`,"data-testid":"nav-compact-search",onClick:Z,type:"button",children:(0,n.jsx)(Di,{className:"nav-compact__header-control-icon nav-compact__header-search-icon"})}),(0,n.jsxs)("button",{"aria-controls":"nav-compact-outline","aria-expanded":t,"aria-label":t?d?.a11yNavigationMenuClose:d?.a11yNavigationMenuOpen,className:`${H} nav-compact__header-toggle`,"data-testid":"nav-compact-toggle",onClick:T,type:"button",children:[t&&(0,n.jsx)(TF,{className:"nav-compact__header-control-icon nav-compact__header-toggle-icon"}),!t&&(0,n.jsx)(LF,{className:"nav-compact__header-control-icon nav-compact__header-toggle-icon"})]})]}),(0,n.jsx)(gU,{labelLessonName:d?.lessonName??"",labelLessonPreposition:d?.lessonPreposition??"",lessonPosition:g,totalLessons:C})]}),(0,n.jsx)("div",{className:"nav-compact__header-title","data-testid":"nav-compact-title",children:y?(0,n.jsx)("span",{className:F,children:c}):(0,n.jsx)(as,{className:F,onClick:S,to:"/",children:c})}),(0,n.jsx)(vU,{classProgressRunner:W,classProgressText:D,classProgressTrack:V,navExpanded:t,percentComplete:l,percentCompleteText:I})]})]})};var xU=p(65196),bU=p.n(xU),yU=p(34872),TU=p.n(yU),LU=p(98641),SU=p.n(LU),kU,NU,IU,EU,jU;function Eb(e,t,s="..."){const o=e?e.toString():"";return o.length>t?o.substr(0,t-1)+s:o}const ame=e=>jU(t=>NU(t)>e,IU(0,e)),wU=new RegExp(/^[0-9]+$/),AU=e=>wU.test(e),RU=e=>e>=0,PU=e=>e<=100,ime=e=>e==="",cme=e=>AU(e)&&PU(e)&&RU(e),lme=e=>String(Number(e)),jb=Pe()(Yr()(""),bU()(TU(),0)),dme=Pe()(Yr()(" "),gt()(jb),b0()(" ")),wb=Pe()(Yr()(" "),b0()(/(?=[A-Z]|^)/)),ume=e=>e?kU(jb,EU,wb)(e):"",hme=Pe()(SU(),wb);function Ab({id:e,isEnabled:t,isSectionLesson:s,last:o}){const{navigationStyle:r}=re(),{settings:a}=Vt(e)??{},i=ra(e),c=Es(),l=Ch(e),d=(0,u.useMemo)(()=>No(r),[r]),h=e===c,m=a?.isGeneratingAIContent===!0,f=Eb(i||"",45),[v,C]=(0,u.useState)(!1),g=(0,u.useCallback)(()=>C(!0),[]),x=(0,u.useCallback)(()=>C(!1),[]),b=s?"nav-compact__outline-section-item":"nav-compact__outline-item",T=`${b}__link`,L=(0,n.jsx)(dd,{canComplete:l,id:e,isDark:d,isEnabled:t,isTooltipVisible:v,onHideTooltip:x,onShowTooltip:g,scope:vo.COMPACT});return(0,n.jsx)("li",{className:"nav-compact__outline-list-item","data-testid":`nav-compact-lesson-${e}`,role:"listitem",children:m?(0,n.jsx)("div",{className:b,children:(0,n.jsx)("span",{"aria-disabled":"true",className:`${T} ${T}--generating`,"data-testid":`nav-compact-lesson-${e}-generating`,children:f})}):(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)(Hi,{className:b,dark:d,isCurrentLesson:h,isTooltipEnabled:!l,last:o,lessonId:e,onHideProgressTooltip:x,onShowProgressTooltip:g,showProgressDelay:0,tooltipClassName:`${b}-tooltip`,children:[f,!l&&L]}),l&&L]})})}const MU=$("nav-compact"),OU=({id:e})=>{const t=Vt(e),s=lt(t?.title),o=MU("outline-section-empty");return(0,n.jsx)("div",{className:o,children:(0,n.jsx)("span",{children:s})})};var Ra=p(82920);const BU=({index:e,isEnabled:t,lessonIds:s,id:o})=>{const r=re(),a=r?.theme,i=r?.themeId,c=a?.navigationSectionsExpanded??!0,l=Vt(String(o)),d=lt(l?.title),[h,m]=Ra.useState(c);Ra.useEffect(()=>{m(c)},[c]);const[f,v]=Ra.useState(),C=Ra.useRef(null),g=`sublistCompact-${e}`,x=String(i),b=h?"nav-compact__outline-section-toggle-icon":"nav-compact__outline-section-toggle-icon nav-compact__outline-section-toggle-icon--collapsed",T=h?"nav-compact__outline-section-list":"nav-compact__outline-section-list nav-compact__outline-section-list--collapsed",L=h?"nav-compact__outline-section-toggle":"nav-compact__outline-section-toggle nav-compact__outline-section-toggle--collapsed",y=Ra.useCallback(()=>{m(S=>!S)},[]);return Ra.useLayoutEffect(()=>{const S=setTimeout(()=>{C.current&&v(C.current.scrollHeight)},0);return()=>{clearTimeout(S)}},[s.length,x]),(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)("button",{"aria-controls":g,"aria-expanded":h,className:L,onClick:y,tabIndex:t?void 0:-1,type:"button",children:[(0,n.jsx)("span",{className:"nav-compact__outline-section-toggle-text",children:d}),(0,n.jsx)(ax,{className:b})]}),(0,n.jsx)(ql,{inert:!h,children:(0,n.jsx)("ol",{"aria-hidden":h?void 0:!0,className:T,id:g,ref:C,role:"list",style:{maxHeight:f},children:s.map((S,k)=>(0,n.jsx)(Ab,{id:S,isEnabled:t&&h,isSectionLesson:!0,last:k===s.length-1},S))})})]})},DU=({index:e,isEnabled:t,lessonIds:s})=>{const[o,...r]=s,a="nav-compact__outline-item nav-compact__outline-section";return Rt()(r)?(0,n.jsx)("li",{className:a,role:"listitem",children:(0,n.jsx)(OU,{id:o})}):(0,n.jsx)("li",{className:a,role:"listitem",children:(0,n.jsx)(BU,{id:o,index:e,isEnabled:t,lessonIds:r})})},FU=({index:e,isEnabled:t,lessonIds:s})=>pl(s)?(0,n.jsx)(DU,{index:e,isEnabled:t,lessonIds:s}):s.map((r,a)=>(0,n.jsx)(Ab,{id:r,isEnabled:t,isSectionLesson:!1,last:a===s.length-1},r)),HU=Oe("NavCompactOutline",({className:e="",isEnabled:t})=>{const s=vl(),o=be(),r=[e,"nav-compact__outline",t?void 0:"nav-compact__outline--collapsed"].filter(Boolean).join(" ");return(0,n.jsx)("section",{"aria-label":o?.a11yRegionNavOverview,className:r,"data-testid":"nav-compact-outline",id:"nav-compact-outline",children:an(s)&&(0,n.jsx)("ol",{className:"nav-compact__outline-list","data-testid":"nav-compact-outline-list",role:"list",children:s.map((a,i)=>Rt()(a)?null:(0,n.jsx)(FU,{index:i,isEnabled:t,lessonIds:a},i))})})});var $U=p(82920);const VU=()=>{const[e,t]=$U.useState(!1);return(0,qe.A)(vx,()=>t(!0)),(0,qe.A)(Lm,()=>t(!1)),e},Rb=$("nav-compact"),Pb="nav-content-compact",zU=(0,u.forwardRef)(({closeNav:e,isExpanded:t,openNav:s},o)=>{const r=Ci(),{navigationStyle:a,theme:i}=r??{},c=i?.coverImageColor,l=i?.progressIndicatorStyle,d=de(y=>y.course?.theme?.buttonNavigationStyle==="FULL"?Math.round(-(y.ui.lessonNavNextButton?.intersectionRect?.height??0)):0),h=(0,u.useMemo)(()=>No(a),[a]),m=(0,u.useMemo)(()=>a===rr.LIGHT_ACCENT||a===rr.DARK_ACCENT,[a]),f=VU(),v=(0,u.useMemo)(()=>Ti(a),[a]),C=l===et.CIRCULAR_FILL,g=l===et.INCOMPLETE_COMPLETE,x=(0,u.useMemo)(()=>v&&c===at.LIGHT,[v,c]),b=Rb({accent:m,dark:h,light:!h,"image-dark-overlay":v&&!x,"image-light-overlay":v&&x,"progress-circular-fill":C,"progress-incomplete-complete":g,collapsed:!t,navNextIsVisible:f}),T=Rb("wrap",{collapsed:!t}),L={transform:`translateY(${d}px)`};return(0,n.jsx)("div",{className:b,"data-testid":"nav-compact",id:Pb,ref:o,style:L,children:(0,n.jsxs)("div",{className:T,children:[(0,n.jsx)(CU,{closeNav:e,isExpanded:t,openNav:s}),(0,n.jsx)(ql,{inert:!t,children:(0,n.jsx)(HU,{isEnabled:t})})]})})});function Mb(e,t){const[s,o]=(0,u.useState)(null),{root:r,rootMargin:a,threshold:i}=t;return(0,u.useEffect)(()=>{if(e&&typeof IntersectionObserver=="function"){const c=new IntersectionObserver(l=>{o(l[0])},{root:r,rootMargin:a,threshold:i});return c.observe(e),()=>{o(null),c.disconnect()}}return()=>{}},[e,r,a,i]),s}const UU={closeNav:()=>{},openNav:()=>{},openSearch:()=>{},closeSearch:()=>{},searchActive:!1},Ob=Object.assign((0,u.createContext)(UU),{displayName:"OverlayNavControlContext"});function _U(e){const{children:t,closeNav:s,openNav:o}=e,[r,a]=(0,u.useState)(!1),i=(0,u.useCallback)(()=>{a(!0)},[]),c=(0,u.useCallback)(()=>{a(!1)},[]);return(0,n.jsx)(Ob.Provider,{value:{closeNav:s,openNav:o,openSearch:i,closeSearch:c,searchActive:r},children:t})}const md=()=>(0,u.useContext)(Ob),fd=$("nav-overlay"),GU=({className:e})=>{const t=be(),s=on(),o=na(),a=`${s?`%${o}`:`${o}%`} ${t?.lessonComplete??""}`,i=fd("header-progress-runner"),c=fd("header-progress-text"),l=fd("header-progress-track");return(0,n.jsxs)("div",{className:fd("header-progress").mix(e),"data-testid":"nav-overlay-progress",children:[(0,n.jsx)(id,{"aria-hidden":!0,progress:o,runnerClass:i,trackClass:l}),(0,n.jsx)("div",{className:c,children:a})]})},no=$("nav-overlay"),WU=()=>{const e=re(),t=es(),s=ea(),{allowSearch:o,lmsOptions:r}=e,a=rl(),i=be(),c=md(),l=(0,u.useRef)(null),d=no("header-control-btn"),h=e?.exportSettings?.webExportSettings,m=!Ln.isInstantLink&&(r?.disableCoverPage||h?.disableCoverPage),f=v=>{v.preventDefault(),Xn(()=>{t("/")},"lesson-to-cover")};return(0,n.jsx)("section",{"aria-label":"Course Information","data-testid":"nav-overlay-header",children:(0,n.jsxs)("div",{className:no("header-container"),children:[(0,n.jsxs)("div",{className:no("header-controls"),children:[(0,n.jsx)("button",{"aria-label":i?.a11yNavigationMenuClose,className:d,"data-testid":"nav-overlay-close",onClick:c.closeNav,ref:l,type:"button",children:(0,n.jsx)(Gl,{className:no("header-close-icon")})}),o&&a!=="restricted"&&(0,n.jsx)("button",{"aria-label":i?.a11ySearchOpen,className:d,"data-testid":"nav-overlay-search",onClick:c.openSearch,type:"button",children:(0,n.jsx)(Di,{className:no("header-search-icon")})})]}),(0,n.jsxs)("div",{className:no("header-title-progress-container"),children:[(0,n.jsx)("h1",{className:no("header-title"),"data-testid":"nav-overlay-title",id:"nav-overlay-title",children:m?(0,n.jsx)("span",{className:no("header-title"),children:s}):(0,n.jsx)(as,{className:no("header-title-link"),onClick:f,to:"/",children:s})}),(0,n.jsx)(GU,{})]})]})})},pd=({className:e,icon:t})=>{switch(t){case Ds.INTERACTION:return(0,n.jsx)(wF,{className:e,icon:t});case Ds.QUIZ:return(0,n.jsx)(NF,{className:e,icon:t});case Ds.VIDEO:return(0,n.jsx)(AF,{className:e,icon:t});case Ds.ARTICLE:return(0,n.jsx)(ox,{className:e,icon:t});default:return(0,n.jsx)(ox,{className:e,icon:t})}},oo=$("nav-overlay"),Bb=Oe("NavOverlayOutlineLesson",({first:e,id:t,isEnabled:s,isSectionLesson:o,last:r})=>{const{navigationStyle:a}=re(),{icon:i,settings:c}=Vt(t)??{},l=ra(t),d=md(),h=Ch(t),m=No(a),f=c?.isGeneratingAIContent===!0,v=oo("outline-item",{section:o}),C=`${oo("outline-item")}__link`,g=oo("outline-item-link-icon",{quiz:i==="Quiz"}),x=(0,u.useCallback)(()=>{d.closeNav()},[d]),[b,T]=(0,u.useState)(!1),L=(0,u.useCallback)(()=>T(!0),[]),y=(0,u.useCallback)(()=>T(!1),[]),S=(0,n.jsx)(dd,{canComplete:h,id:t,isDark:m,isEnabled:s,isTooltipVisible:b,onHideTooltip:y,onShowTooltip:L,scope:vo.OVERLAY});return(0,n.jsx)("li",{className:oo("outline-list-item",{first:e,last:r}),"data-testid":`nav-overlay-lesson-${t}`,role:"listitem",children:f?(0,n.jsx)("div",{className:v.toString(),children:(0,n.jsxs)("span",{"aria-disabled":"true",className:`${C} ${C}--generating`,"data-testid":`nav-overlay-lesson-${t}-generating`,children:[(0,n.jsx)("span",{className:oo("outline-icon-wrap"),children:(0,n.jsx)(pd,{className:g,icon:i??Ds.ARTICLE})}),(0,n.jsx)("span",{className:oo("outline-lesson-title"),children:l})]})}):(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)(Hi,{className:v.toString(),dark:m,isTooltipEnabled:!h,lessonId:t,onHideProgressTooltip:y,onNavigate:x,onShowProgressTooltip:L,showProgressDelay:null,tooltipClassName:oo("outline-item-tooltip").toString(),children:[(0,n.jsx)("span",{className:oo("outline-icon-wrap"),children:(0,n.jsx)(pd,{className:g,icon:i??Ds.ARTICLE})}),(0,n.jsx)("span",{className:oo("outline-lesson-title"),children:l}),!h&&S]}),h&&S]})})}),KU=$("nav-overlay"),QU=({id:e})=>{const t=Vt(e),s=lt(t?.title);return(0,n.jsx)("span",{className:KU("outline-section-text"),children:s})},Db=$("nav-overlay"),YU=({isEnabled:e,lessonIds:t})=>{const s=(0,u.useRef)(null);return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("div",{className:Db("outline-section-divider")}),(0,n.jsx)("ol",{className:Db("outline-section-list"),ref:s,role:"list",children:t.map((o,r)=>(0,n.jsx)(Bb,{id:o,isEnabled:e,isSectionLesson:!0,last:r===t.length-1},o))})]})},ZU=$("nav-overlay"),XU=({index:e,isEnabled:t,lessonIds:s})=>{const[o,...r]=s,a=ZU("outline-item").mix("nav-overlay__outline-section");return Rt()(r)?(0,n.jsx)("li",{className:a,role:"listitem",children:(0,n.jsx)(QU,{id:o})}):(0,n.jsx)("li",{className:a,role:"listitem",children:(0,n.jsx)(YU,{index:e,isEnabled:t,lessonIds:r})})},qU=({index:e,isEnabled:t,lessonIds:s})=>{const o=pl(s),r=ra(s[0]),a=$("nav-overlay");return o?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("h2",{className:a("outline-section-text"),children:r}),(0,n.jsx)("ol",{className:a("outline-list"),"data-testid":"nav-overlay-outline-list",role:"list",children:(0,n.jsx)(XU,{index:e,isEnabled:t,lessonIds:s})})]}):s.map((i,c)=>(0,n.jsx)(Bb,{first:c===0,id:i,isEnabled:t,isSectionLesson:!1,last:c===s.length-1},i))},JU=$("nav-overlay"),e_=Oe("NavOverlayOutline",({isEnabled:e})=>{const t=vl(),s=be();return(0,n.jsx)("section",{"aria-label":s?.a11yRegionNavOverview,className:JU("outline"),"data-testid":"nav-overlay-outline",id:"nav-overlay-outline",children:an(t)&&(0,n.jsx)(n.Fragment,{children:t.map((o,r)=>Rt()(o)?null:(0,n.jsx)(qU,{index:r,isEnabled:e,lessonIds:o},`lessonIdGroup-${r}`))})})});var t_=p(59776),gd=p.n(t_),Sr=p(47100),s_=p(99962),vd=p.n(s_);const Xm=Array.isArray,Fb=e=>typeof e=="number",Cd=e=>!At()(e)&&typeof e=="object",qm=e=>typeof e=="string",n_=(e,t,s)=>(o,r)=>{const a=Co()(r,e);if((0,Qt.uW)(o)){const i=s[o.l10nId];return typeof i!="string"?!1:!Rt()(vd()(t,(0,Sr.htmlDecode)(i)))}else return Cd(o)?Hb(e,t,s)(o):a&&qm(o)?!Rt()(vd()(t,(0,Sr.htmlDecode)(o))):!1},Hb=(e,t,s)=>o=>{const r=Cn()(n_(e,t,s),o);return Co()(!0,Xs()(r))},o_=Hb;var r_=p(89560),Jm=p.n(r_),a_=p(79537),ef=p.n(a_);const i_=Jm(),c_=ts(),l_=(e,t,s)=>(o,r)=>{const a=Co()(r,e);if(Xm(o))return Xs()(tf(e,t,s)(o));if((0,Qt.uW)(o)){const i=s[o.l10nId];return typeof i!="string"?0:Hs()(vd()(t,(0,Sr.htmlDecode)(i)))}else return Cd(o)?tf(e,t,s)(o):a&&qm(o)?Hs()(vd()(t,(0,Sr.htmlDecode)(o))):0},tf=(e,t,s)=>o=>Cn()(l_(e,t,s),o),sf=e=>{if(Xm(e))return gt()(sf,e);if(Cd(e))return sf(Xs()(e));if(Fb(e))return e},d_=(e,t,s)=>o=>{const r=tf(e,t,s)(o),a=gt()(sf,Xs()(r)),i=Mc()(a).filter(Fb),c=ef()(i_,0,i);return c_("results",c,o)},u_=(e,t,s)=>(o,r)=>{const a=Co()(r,e);return Xm(o)?Xs()(nf(e,t,s)(o)):Cd(o)?nf(e,t,s)(o):a&&qm(o)?_r()(t,s,o):o},nf=(e,t,s)=>o=>Cn()(u_(e,t,s),o),$b=nf,Vb=(e,t,s,o,r)=>{const a=["caption","code","description","heading","message","name","paragraph","title"];if(Rt()(e))return!1;const i=e.replace(/[-[\]{}()"'*+?.,\\^$|#\s]/g,"\\$&"),c=new RegExp(`(${i})(?![^<]*>)`,"ig"),l="<mark>$&</mark>",d=$b(a,c,l),h=$b(Object.keys(s),c,l),m=gt()(b=>{const T=d(b);return Array.isArray(T)?b:{...b,...T}},t),f=o?o(e):{},v=h(s),C=b=>f[b.id]>0||o_(a,c,s)(b),g=b=>d_(a,c,s)(b),x=gt()(g,Fn()(C,t));x.forEach(b=>{b.results+=f[b.id]??0}),r(e,x,Array.isArray(v)?s:v,m)};function h_(e){if(!e)return!0;for(const t in e)return!1;return!0}function zb(){const{lessons:e,mondrian:t}=re(),{currentLocale:s}=it(),[o,r]=(0,u.useState)(null);return(0,u.useEffect)(()=>{h_(t)||p.e("webpack_container_remote_mondrian_learn-react").then(p.t.bind(p,4246,23)).then(a=>r(()=>a.searchItemsByLesson))},[t]),(0,u.useCallback)(a=>o?.(a,e,t,s)??{},[o,e,t,s])}const m_=Qi.Ay.animateScroll,Gs=$("nav-overlay"),f_=()=>{const e=ct(),t=vC(),s=md(),{lessons:o}=re(),[r,a]=(0,u.useState)(""),i=zb(),c=(0,u.useRef)(null),l=be(),d=Gs("search-close-btn"),h=Gs("search-clear-btn"),m=(0,u.useCallback)(()=>{s.closeSearch(),s.closeNav(),e([Kv(!0),fi(!1),ur(null)])},[e,s]),f=(0,u.useCallback)(()=>{a(""),c.current?.focus?.()},[]);(0,u.useEffect)(()=>{c.current?.focus?.()},[]);const v=(0,u.useCallback)(x=>{vs(x)&&!gd()(r)?(x.preventDefault(),a(""),e(ur(null))):vs(x)&&gd()(r)&&m()},[e,m,r]);(0,qe.A)("keydown",v);const C=(0,u.useCallback)(x=>{a(x.target.value)},[]),g=(0,u.useCallback)(x=>{if(x.preventDefault(),r){const b=(T,L,y,S)=>{e([ur(T),Qv(L),Yv(y),Zv(S),fi(!0)]),m_.scrollToTop({duration:500,smooth:!0})};s.closeNav(),s.closeSearch(),Vb(r,o,t??{},i,b)}},[r,i,s,o,t,e]);return(0,n.jsxs)("div",{className:Gs("search"),"data-testid":"nav-overlay-search-container",children:[(0,n.jsx)("div",{className:Gs("search-header"),children:(0,n.jsx)("button",{"aria-label":l?.a11ySearchClose,className:d,"data-testid":"nav-overlay-search-close",onClick:m,type:"button",children:(0,n.jsx)(Gl,{className:Gs("search-close-icon")})})}),(0,n.jsx)("div",{className:Gs("search-body"),children:(0,n.jsxs)("form",{autoComplete:"off",onSubmit:g,children:[(0,n.jsxs)("div",{className:Gs("search-container"),children:[(0,n.jsx)(Di,{className:Gs("search-icon")}),(0,n.jsx)("input",{"aria-label":l?.a11ySearchInput,className:Gs("search-input").mix("brand--ui"),"data-testid":"nav-overlay-search-input",name:"search",onChange:C,placeholder:l?.search,ref:c,type:"input",value:r}),r&&(0,n.jsx)("button",{"aria-label":l?.a11ySearchInputClear,className:h,"data-testid":"nav-overlay-search-clear",onClick:f,type:"button",children:(0,n.jsx)(Gl,{className:Gs("search-clear-icon").toString()})})]}),(0,n.jsx)("div",{className:Gs("search-actions"),children:(0,n.jsx)("button",{className:Gs("search-submit-btn").mix("brand--ui"),"data-testid":"nav-overlay-search-submit",type:"submit",children:l?.search})})]})})]})},of=$("nav-overlay"),Ub="nav-content-overlay",p_=({isExpanded:e,outlineRef:t})=>{const o=vl()[0],r=pl(o),a=of("body",{section:r});return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(WU,{}),(0,n.jsx)("div",{className:a,ref:t,children:(0,n.jsx)(e_,{isEnabled:e})})]})},g_=({children:e,isImage:t,hasStickyHeader:s})=>{const o=of("content",{graphic:t,"has-sticky-header":s});return(0,n.jsxs)("div",{className:o,"data-nav-scrollable":!0,"data-testid":"nav-overlay-content",children:[e,t&&(0,n.jsx)(gm,{})]})},v_=({isExpanded:e})=>{const t=(0,u.useRef)(null),[s,o]=(0,u.useState)(null),r=re(),a=md(),i=(0,Me.A)(e),c=r?.navigationStyle,l=r?.theme?.progressIndicatorStyle,d=r?.theme?.coverImageColor,h=c===ar.ACCENT,m=c===ar.TINT,f=No(c),v=c===ar.GRAY,C=c===ar.LIGHT,g=Ti(c),x=l===et.CIRCULAR_FILL,b=l===et.INCOMPLETE_COMPLETE,[T,L]=(0,u.useState)(!0),{isIntersecting:y=!1}=Mb(s,{root:t?.current,threshold:1})||{},S=(0,Me.A)(y),k=(0,u.useMemo)(()=>g&&d===at.LIGHT,[g,d]),N=of({"accent-tint":m,accent:h,dark:f,gray:v,"image-dark-overlay":g&&!k,"image-light-overlay":g&&k,light:C,"progress-circular-fill":x,"progress-incomplete-complete":b,closing:i&&!e});return(0,u.useEffect)(()=>{e?t.current?.showModal():setTimeout(()=>{t.current?.close()},500)},[e]),(0,u.useEffect)(()=>{const I=w=>{vs(w)&&!a.searchActive&&(w.preventDefault(),a.closeNav())};return e?document.addEventListener("keydown",I):document.removeEventListener("keydown",I),()=>{document.removeEventListener("keydown",I)}},[e,a]),(0,u.useEffect)(()=>{!T&&y?L(!0):S&&!y&&L(!1)},[y,T,S,L]),(0,n.jsx)("dialog",{"aria-labelledby":"nav-overlay-title","aria-modal":"true",className:N,"data-testid":"nav-overlay",id:Ub,ref:t,children:(0,n.jsx)(g_,{hasStickyHeader:T,isImage:g,children:a.searchActive?(0,n.jsx)(f_,{}):(0,n.jsx)(p_,{isExpanded:e,outlineRef:o})})})},qi=$("nav-sidebar-search"),C_=Oe("NavSidebarSearch",({className:e="",isEnabled:t})=>{const s=ct(),o=vC(),r=(0,Me.A)(t),{lessons:a}=re(),i=Lo(),c=be(),l=(0,u.useRef)(null),d=qi({disabled:!t}).mix(e),h=qi("icon"),m=qi("input"),f=qi("close"),v=qi("close-icon"),C=i?.term,g=!t,[x,b]=(0,u.useState)(""),T=zb(),L=(0,u.useCallback)(()=>{s([Kv(!0),fi(!1),ur(null)]),b("")},[s]),y=(0,u.useCallback)(N=>{vs(N)&&!gd()(x)?(N.preventDefault(),b(""),s(ur(null))):vs(N)&&gd()(x)&&L()},[s,L,x]),S=(0,u.useCallback)(N=>{C!=null&&s(ur(null)),b(N.target.value)},[s,C]),k=(0,u.useCallback)(N=>{N.preventDefault(),Vb(x,a,o??{},T,(w,A,E,j)=>s([ur(w),Qv(A),Yv(E),Zv(j)]))},[s,a,o,x,T]);return(0,u.useEffect)(()=>{!r&&t&&setTimeout(()=>{l.current?.focus()},50)},[t,r]),(0,u.useEffect)(()=>{C&&C!==x&&b(C)},[x,C]),(0,n.jsxs)("form",{autoComplete:"off",className:d,"data-testid":"nav-sidebar-search",onSubmit:k,children:[(0,n.jsx)(Di,{className:h}),(0,n.jsx)("input",{"aria-label":c?.a11ySearchInput,className:m,disabled:g,name:"search",onChange:S,onKeyDown:y,placeholder:c?.search,ref:l,type:"search",value:x}),(0,n.jsx)("button",{"aria-label":c?.a11ySearchClose,className:f,onClick:L,type:"reset",children:(0,n.jsx)(Gl,{className:v})})]})}),Ws=$("nav-sidebar-header"),x_=$("nav-sidebar-header-ghost"),b_=()=>de(e=>e.ui.skipToNavButton?.offsetHeight??0),y_=Oe("NavSidebarHeaderProgress",e=>{const{classProgressRunner:t,classProgressText:s,classProgressTrack:o,percentComplete:r,percentCompleteText:a}=e;return(0,n.jsxs)("div",{className:Ws("progress"),"data-testid":"nav-sidebar-progress",children:[(0,n.jsx)(id,{"aria-hidden":"true",progress:r,runnerClass:t,trackClass:o}),(0,n.jsx)("div",{className:s,children:a})]})}),T_=Oe("NavSidebarHeader",({className:e,isCompact:t,isEnabled:s,navRefWidth:o,setIsCompact:r})=>{const a=ct(),i=es(),[c,l]=(0,u.useState)(""),[d,h]=(0,u.useState)({height:0,width:0}),[m,f]=(0,u.useState)(d),[v,C]=(0,u.useState)(d),g=b_(),[x,b]=(0,u.useState)(null),T=(0,u.useRef)(null),L=(0,u.useRef)(null),[y,S]=(0,u.useState)(null),k=re(),N=ea(),I=be(),w=na(),A=Lo(),E=zh(),j=on(),O=rl(),R=k?.exportSettings?.webExportSettings,P=!Ln.isInstantLink&&(k?.lmsOptions?.disableCoverPage||R?.disableCoverPage),M=k?.allowSearch&&O!=="restricted",H=k?.theme?.coverImageColor,F=k?.navigationStyle,D=(0,u.useMemo)(()=>Ti(F),[F]),V=!!SH(),W=(0,Me.A)(A),_=(A?.active||V)??!1,[Z,oe]=(0,u.useState)(!0),[Q,U]=(0,u.useState)(null),B=Ws({compact:t,searching:_,transition:Z}).mix(e),z=Ws("inner",{compact:t}),K=Ws("content",{compact:t,hidden:_}),Y=Ws("graphic",{image:D}),J=Ws("progress-runner"),q=Ws("progress-text",{compact:t}),ee=Ws("progress-track"),se=Ws("search-area",{hidden:!_}),te=Ws("search-btn",{hidden:_}),ye=Ws("search-icon"),G=Ws("title",{compact:t}),le=x_({compact:t,searching:_}),pe=`${j?`%${w}`:`${w}%`} ${I?.lessonComplete}`,he=s&&!_?void 0:-1,xe=s&&!_?void 0:-1,{alpha:ge,media:Ke}=Cr("coverImage"),wt=(0,u.useMemo)(()=>{const ve={};return D&&Object.assign(ve,ta({alpha:ge,color:H??void 0,media:Ke})),_&&(ve.height=m.height),ve},[ge,H,Ke,D,_,m.height]),Lt=(0,u.useMemo)(()=>{const ve={};return t&&(ve.bottom=`calc(100% - ${g}px)`,ve.width=o||0,ve.transition="width 0.3s",s||(ve.transition="width 0.3s",ve.width="0rem")),d.height&&(ve.height=d.height,ve.overflow="hidden",t&&(ve.transition="height 0.3s ease .1s, transform 0.3s ease .1s")),ve},[t,s,o,d.height,g]);(0,u.useEffect)(()=>{l(t&&E?Eb(N??"",45):N)},[N,t,E]);const ot=_?void 0:{height:v.height},St=(0,u.useCallback)(()=>{f(d),a(fi(!0))},[a,d]),vn=(0,u.useCallback)(ve=>{ve.preventDefault(),Xn(()=>{i("/")},"lesson-to-cover")},[i]);(0,u.useLayoutEffect)(()=>{U(document.querySelector("[data-nav-scrollable]"))},[]);const{isIntersecting:$e=!1}=Mb(x,{root:Q,threshold:0})||{},Je=(0,Me.A)($e);(0,u.useEffect)(()=>{const ve=y!=null&&window.innerHeight*.4>=y.offsetHeight;Je&&!$e&&ve?r(!0):!Je&&$e&&r(!1)},[$e,Je,y,r]);const rt=(0,u.useCallback)(({target:ve})=>{const He={height:ve?.scrollHeight??0,width:o??0};h(He),f(He),t||C(He)},[t,o]);Zl(y,rt),(0,u.useLayoutEffect)(()=>{const ve=Q?.scrollTop??0;(Q||ve>0)&&Q&&(Q.scrollTop=0);const He={height:y?.scrollHeight??0,width:o??0};h(He),f(He),C(He)},[Q,o,y]),(0,u.useEffect)(()=>{M&&W?.active&&!A?.active&&T?.current?.focus()},[M,A,W]),(0,u.useEffect)(()=>{_?oe(!0):t&&oe(!1)},[_,t]);const kt=(0,u.useCallback)(ve=>{const He=ve.target;if(!(He instanceof HTMLElement)||!He.hasAttribute("data-nav-item")||!t||!y||!Q)return;const hs=y.getBoundingClientRect(),co=He.getBoundingClientRect();hs.bottom>co.top&&(Q.scrollTop-=hs.height-co.top+5)},[Q,t,y]);return(0,qe.A)("focusin",kt,Q),(0,u.useEffect)(()=>l(N),[N]),(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("div",{className:le,ref:b,style:ot}),(0,n.jsx)("div",{className:B,"data-testid":"nav-sidebar-header",ref:L,style:Lt,children:(0,n.jsxs)("div",{className:z,ref:S,children:[(0,n.jsx)("div",{className:Y,style:wt}),M&&(0,n.jsx)("button",{"aria-label":I?.a11ySearchOpen,className:te,onClick:St,tabIndex:he,type:"button",children:(0,n.jsx)(Di,{className:ye})}),(0,n.jsx)("div",{className:se,children:(0,n.jsx)(C_,{isEnabled:s&&_})}),(0,n.jsxs)("div",{className:K,children:[P?(0,n.jsx)("span",{className:G,"data-testid":"nav-sidebar-title",tabIndex:xe,children:c}):(0,n.jsx)(as,{className:G,"data-testid":"nav-sidebar-title",onClick:vn,tabIndex:xe,to:"/",children:c}),(0,n.jsx)(y_,{classProgressRunner:J,classProgressText:q,classProgressTrack:ee,percentComplete:w,percentCompleteText:pe})]})]})})]})}),L_=$("nav-sidebar");function _b({closeNav:e,id:t,isEnabled:s,isSectionLesson:o,last:r}){const a=String(t),{navigationStyle:i}=re(),{icon:c,settings:l}=Vt(t)??{},d=ra(t),h=Es(),m=Vi(),f=Ch(a),v=a===h,C=l?.isGeneratingAIContent===!0,g=(0,u.useMemo)(()=>No(i),[i]),x=o?"nav-sidebar__outline-section-item":"nav-sidebar__outline-item",b=`${x}__link`,T=`${x}-link-icon`,L=(0,n.jsx)(pd,{className:T,icon:c??Ds.ARTICLE}),[y,S]=(0,u.useState)(!1),k=(0,u.useCallback)(()=>S(!0),[]),N=(0,u.useCallback)(()=>S(!1),[]),I=(0,n.jsx)(dd,{canComplete:f,id:a,isDark:g,isEnabled:s,isTooltipVisible:y,onHideTooltip:N,onShowTooltip:k,scope:vo.SIDEBAR}),w=()=>{e&&m&&e()};return(0,n.jsx)("li",{className:L_("outline-list-item",{last:r}),"data-testid":`nav-outline-lesson-${t}`,role:"listitem",children:C?(0,n.jsx)("div",{className:x,children:(0,n.jsxs)("span",{"aria-disabled":"true",className:`${b} ${b}--generating`,"data-testid":`nav-outline-lesson-${t}-generating`,children:[L,d]})}):(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)(Hi,{className:x,dark:g,isCurrentLesson:v,isTooltipEnabled:!f,lessonId:a,onHideProgressTooltip:N,onNavigate:w,onShowProgressTooltip:k,showProgressDelay:0,tooltipClassName:`${x}-tooltip`,children:[L,d,!f&&I]}),f&&I]})})}const S_=({id:e})=>{const t=Vt(e),s=lt(t?.title);return(0,n.jsx)("span",{className:"nav-sidebar__outline-section-text",children:s})};var Pa=p(82920);const k_=({closeNav:e,id:t,index:s,isEnabled:o,lessonIds:r})=>{const a=re(),i=a?.theme,c=a?.themeId,l=i?.navigationSectionsExpanded??!0,d=ra(String(t)),[h,m]=Pa.useState(l);Pa.useEffect(()=>{m(l)},[l]);const[f,v]=Pa.useState(),C=Pa.useRef(null),g=`sidebar-sublist-${s}`,x=C.current?.clientWidth,b=String(c),T=h?"nav-sidebar__outline-section-toggle-icon":"nav-sidebar__outline-section-toggle-icon nav-sidebar__outline-section-toggle-icon--collapsed",L=h?"nav-sidebar__outline-section-list":"nav-sidebar__outline-section-list nav-sidebar__outline-section-list--collapsed",y=Pa.useCallback(()=>{m(S=>!S)},[]);return Pa.useLayoutEffect(()=>{const S=setTimeout(()=>{C.current&&v(C.current.scrollHeight)},0);return()=>{clearTimeout(S)}},[r.length,x,b]),(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)("button",{"aria-controls":g,"aria-expanded":h,className:"nav-sidebar__outline-section-toggle","data-nav-item":"",onClick:y,tabIndex:o?void 0:-1,type:"button",children:[(0,n.jsx)("span",{className:"nav-sidebar__outline-section-toggle-text",children:d}),(0,n.jsx)(ax,{className:T})]}),(0,n.jsx)(ql,{inert:!h,children:(0,n.jsx)("ol",{"aria-hidden":h?void 0:!0,className:L,id:g,ref:C,role:"list",style:{maxHeight:f},children:r.map((S,k)=>(0,n.jsx)(_b,{closeNav:e,id:S,isEnabled:o&&h,isSectionLesson:!0,last:k===r.length-1},S))})})]})},N_=({closeNav:e,index:t,isEnabled:s,lessonIds:o})=>{const[r,...a]=o,i="nav-sidebar__outline-item nav-sidebar__outline-section";return Rt()(a)?(0,n.jsx)("li",{className:i,role:"listitem",children:(0,n.jsx)(S_,{id:r})}):(0,n.jsx)("li",{className:i,role:"listitem",children:(0,n.jsx)(k_,{closeNav:e,id:r,index:t,isEnabled:s,lessonIds:a})})},I_=({closeNav:e,index:t,isEnabled:s,lessonIds:o})=>pl(o.map(String))?(0,n.jsx)(N_,{closeNav:e,index:t,isEnabled:s,lessonIds:o}):o.map((a,i)=>(0,n.jsx)(_b,{closeNav:e,id:a,isEnabled:s,isSectionLesson:!1,last:i===o.length-1},a)),E_=Oe("NavSidebarOutline",({className:e="",closeNav:t,isEnabled:s})=>{const o=vl(),[r,a]=(0,u.useState)(!s),i=be(),c=(0,u.useRef)(null),l=(0,u.useRef)(null),d=[e,"nav-sidebar__outline",r?"nav-sidebar__outline--hidden":void 0,Yn.isSafari?"nav-sidebar__outline--safari":void 0].filter(Boolean).join(" "),h=["nav-sidebar__outline-list",s?void 0:"nav-sidebar__outline-list--disabled",r?"nav-sidebar__outline-list--hidden":void 0].filter(Boolean).join(" ");return(0,u.useEffect)(()=>(s?(clearTimeout(l.current??void 0),a(!1)):l.current=setTimeout(()=>{a(!0)},350),()=>{clearTimeout(l.current??void 0)}),[s]),(0,n.jsx)("section",{"aria-label":i?.a11yRegionNavOverview,className:d,"data-testid":"nav-sidebar-outline",id:"nav-sidebar-outline",children:an(o)&&(0,n.jsx)("ol",{className:h,"data-testid":"nav-sidebar-outline-list",ref:c,role:"list",children:o.map((m,f)=>Rt()(m)?null:(0,n.jsx)(I_,{closeNav:t,index:f,isEnabled:s,lessonIds:m},f))})})});var j_=p(10036);const Ma=$("nav-sidebar-result"),Gb=({result:e})=>{const t=be(),s=e?.icon??Ds.ARTICLE,o=lt(e?.title),r=e?.results??0,a=r===1?t?.result:t?.results,i=Ma("icon"),c=Ma("title"),l=Ma("count");return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(pd,{className:i,icon:s}),(0,n.jsx)("span",{className:c,children:o}),(0,n.jsx)("span",{className:l,children:`${r} ${a}`})]})},w_=({id:e,index:t,isEnabled:s,onSelectResult:o})=>{const r=re(),a=(0,we.RQ)(yh),i=(0,we.RQ)(Th),c=a??i,l=BI(String(e)),d=c?.params.lessonId===String(e),h=d?"page":void 0,m=r?.color,f=r?.navigationStyle,v=s?void 0:-1,C={animationDelay:`${t/10}s`},g=l?.id,x=Si(g==null?void 0:String(g)),b=(0,u.useMemo)(()=>No(f),[f]),T=Ma(),L=Ma("inner",{active:d}),y=Ma("link",{dark:b,light:!b});return(0,n.jsx)("li",{className:T,role:"listitem",style:C,children:(0,n.jsx)("div",{className:L,style:{color:m},children:s&&x==null?(0,n.jsx)(as,{"aria-current":h,className:y,onClick:o,tabIndex:v,to:Ns(e),children:(0,n.jsx)(Gb,{result:l})}):(0,n.jsx)(Lx,{className:y,restriction:x,tooltipClassName:"lesson-nav-link-tooltip",children:(0,n.jsx)(Gb,{result:l})})})})},xd=$("nav-sidebar-results"),A_=[],R_=({closeNav:e,isEnabled:t})=>{const{announcePolite:s}=bn(),o=re(),r=Lo(),a=be(),c=(r?.activeLessons??A_).filter(EC),l=r?.term,d=an(c),h=(0,j_.A)(l),m=a?.noResults??"",f=o?.navigationStyle,v=(0,u.useMemo)(()=>No(f),[f]),C=xd(),g=xd("message",{dark:v,light:!v}),x=xd("term"),b=xd("list"),T=Et(960),L=u.useCallback(()=>{T&&e()},[e,T]);return(0,u.useEffect)(()=>{if(h){const y=c.length===1?a?.result:a?.results,S=d?`${c.length} ${y}`:`${a?.noResults} ${l}`;s?.(S)}},[s,d,h,c,a,l]),(0,n.jsxs)("div",{className:C,"data-testid":"nav-sidebar-results",children:[!d&&h&&(0,n.jsxs)("div",{className:g,children:[m," ",(0,n.jsxs)("span",{className:x,children:['"',l,'"']})]}),d&&h&&(0,n.jsx)("ol",{className:b,"data-testid":"nav-sidebar-results-list",role:"list",children:c.map((y,S)=>(0,n.jsx)(w_,{id:y.id,index:S,isEnabled:t,onSelectResult:L},y.id))})]})},bd=$("nav-sidebar"),Wb="nav-content-sidebar",P_=({isExpanded:e,closeNav:t})=>{const s=re(),o=Lo(),[r,a]=(0,u.useState)(!1),[i,c]=(0,u.useState)(0),l=(0,u.useRef)(null),d=(0,u.useRef)(null),h=s?.color,m=s?.theme?.coverImageColor,f=s?.isLegacyCourse,v=s?.navigationStyle,C=s?.theme?.accentContrast,g=s?.theme?.progressIndicatorStyle,x=o?.active??!1,b=x||e?void 0:"true";(0,u.useLayoutEffect)(()=>{l&&l?.current&&c(l.current?.scrollWidth)},[r,e,l,x,c]);const T=(0,u.useMemo)(()=>NE(v),[v]),L=(0,u.useMemo)(()=>No(v),[v]),y=(0,u.useMemo)(()=>Ti(v),[v]),S=y&&m===at.LIGHT,k=Is(h),N=g===et.CIRCULAR_FILL,I=g===et.INCOMPLETE_COMPLETE,w=C?C===Te.DARK||C===Te.AUTO&&k===Te.DARK:k===Te.DARK,A=bd("header"),E=bd("body"),j=bd("content"),O=bd({accent:T,"dark-contrast":!y&&w,"light-contrast":!y&&!w,"legacy-pre-themes":f,"image-dark-overlay":y&&!S,"image-light-overlay":y&&S,"progress-circular-fill":N,"progress-incomplete-complete":I,collapsed:!e,dark:L,light:!L,searching:x});return(0,n.jsx)(ql,{inert:!e,children:(0,n.jsx)(Ko,{children:(0,n.jsx)(Ac,{in:e,mountOnEnter:!0,nodeRef:d,timeout:300,unmountOnExit:!0,children:(0,n.jsx)("div",{"aria-hidden":b,className:O,"data-testid":"nav-sidebar",ref:d,children:(0,n.jsxs)("div",{className:j,"data-nav-scrollable":!0,id:Wb,children:[(0,n.jsx)(T_,{className:A,isCompact:r,isEnabled:e,navRefWidth:i,setIsCompact:a}),(0,n.jsxs)("div",{className:E,"data-testid":"nav-sidebar-body",ref:l,children:[(0,n.jsx)(E_,{closeNav:t,isEnabled:e&&!x}),(0,n.jsx)(R_,{closeNav:t,isEnabled:e&&x})]})]})})})})})},kr={x:null,y:null},yd={passive:!0};function Kb({children:e,onSwipeDown:t,onSwipeLeft:s,onSwipeRight:o,onSwipeUp:r,onShouldRecognizeGesture:a=()=>!0,thresholdX:i=100,thresholdY:c=100}){const l=(0,u.useRef)(),[d,h]=(0,u.useState)(kr),[m,f]=(0,u.useState)(kr),v=(0,u.useCallback)(b=>{const T=b.touches?.length??0,L=b.targetTouches[0],y=a?a():!0;T==1&&L&&y?h({x:L.clientX,y:L.clientY}):h(kr)},[a]),C=(0,u.useCallback)(b=>{const T=b.targetTouches[0];T&&f({x:T.clientX,y:T.clientY})},[]),g=(0,u.useCallback)(()=>{h(kr),f(kr)},[]),x=(0,u.useCallback)(b=>{const T=b.touches?.length??0;if(d.x==null||d.y==null||m.x==null||m.y==null||T>0)return;const L=m.x-d.x,y=m.y-d.y;Math.abs(L)>Math.abs(y)?Math.abs(L)>i&&(L<0?s?.():o?.()):Math.abs(y)>c&&(y<0?r?.():t?.()),h(kr),f(kr)},[t,s,o,r,i,c,m,d]);return(0,qe.A)("touchstart",v,l.current,yd),(0,qe.A)("touchcancel",g,l.current,yd),(0,qe.A)("touchmove",C,l.current,yd),(0,qe.A)("touchend",x,l.current,yd),(0,n.jsx)("div",{ref:l,children:e})}Kb.propTypes={children:Tt().oneOfType([Tt().arrayOf(Tt().element),Tt().element]).isRequired,onShouldRecognizeGesture:Tt().func,onSwipeDown:Tt().func,onSwipeLeft:Tt().func,onSwipeRight:Tt().func,onSwipeUp:Tt().func,thresholdX:Tt().number.isRequired,thresholdY:Tt().number.isRequired};function Td({isEnabled:e=!0,...t}){return e?(0,n.jsx)(Kb,{...t}):(0,n.jsx)("div",{children:t.children})}Td.propTypes={children:Tt().oneOfType([Tt().arrayOf(Tt().element),Tt().element]).isRequired,isEnabled:Tt().bool.isRequired};const Ld={DESKTOP:"desktop",TABLET_PORTRAIT:"tablet-portrait",TABLET_LANDSCAPE:"tablet-landscape",MOBILE_PORTRAIT:"mobile-portrait",MOBILE_LANDSCAPE:"mobile-landscape"},M_=[Ld.TABLET_PORTRAIT,Ld.TABLET_LANDSCAPE,Ld.MOBILE_PORTRAIT,Ld.MOBILE_LANDSCAPE],Ji=e=>M_.includes(e),O_=e=>(0,u.useMemo)(()=>{const t=window.matchMedia("(pointer: coarse)").matches,s=Ji(e);return t||s},[e]),Qb=$("course-navigation"),{COMPACT:Sd,OVERLAY:rf,SIDEBAR:Nr}=or,B_={[Sd]:Pb,[Nr]:Wb,[rf]:Ub},D_=({hasSearchResults:e,courseNavType:t,openNav:s,closeNav:o})=>{const[r,a]=(0,u.useState)(e);return(0,u.useEffect)(()=>{r&&!e&&!(t===Nr)?(o(),a(!1)):r&&t===rf?s():a(e)},[e,t,s,o,r]),r},F_=({activeNavType:e,beginWithSidebarOpen:t,isNavOpen:s,isTablet:o,openNav:r,closeNav:a})=>{const[i,c]=(0,u.useState)();(0,u.useEffect)(()=>{e===Nr&&t&&(!i&&o&&s?a():i===!0&&!o&&!s&&r(),c(o))},[e,t,s,o,r,a,i])},H_=({beginWithSidebarOpen:e,children:t,closeNav:s,courseNavType:o,isNavOpen:r,isTablet:a,lessonNavType:i,openNav:c,previewType:l,toggleNav:d,hideNav:h})=>{const m=(0,u.useRef)(null),f=(0,u.useRef)(null),{active:v=!1}=Lo()??{},C=be(),g=D_({hasSearchResults:v,courseNavType:o,openNav:c,closeNav:s}),x=(0,u.useMemo)(()=>g||o===Sd&&a?Nr:o,[o,g,a]);F_({activeNavType:x,beginWithSidebarOpen:e,closeNav:s,openNav:c,isNavOpen:r,isTablet:a}),(0,u.useEffect)(()=>{const k=I=>{I.relatedTarget instanceof Node&&f.current?.contains(I.relatedTarget)===!0&&s()},N=()=>{f.current?.removeEventListener("click",s),f.current?.removeEventListener("keypress",s),f.current?.removeEventListener("blur",k,!0)};return x===Sd&&r?(f.current?.addEventListener("click",s),f.current?.addEventListener("keypress",s),f.current?.addEventListener("blur",k,!0)):N(),N},[x,r,s]);const b=O_(l),T=(0,u.useCallback)(()=>{const k=x===or.SIDEBAR;b&&k&&r&&s()},[s,r,b,x]),L=(0,u.useMemo)(()=>x!=null?B_[x]:void 0,[x]),y=Qb(x?.toLowerCase()??null,{"nav-open":r,"search-open":v&&r,"course-nav-type":o?.toLowerCase()}),S=Qb("lessonNav",{type:i?.toLowerCase()});return(0,n.jsx)(gH,{isCourseNavOpen:r,children:(0,n.jsx)("div",{className:y,children:(0,n.jsx)(Td,{isEnabled:x===or.SIDEBAR,onSwipeLeft:T,children:(0,n.jsxs)("div",{className:S,children:[(0,n.jsxs)("nav",{"aria-label":C?.a11yRegionNavLesson,children:[(0,n.jsx)(pU,{"aria-controls":L,hideNav:h,isNavOpen:r,toggleNav:d}),x===Nr&&(0,n.jsx)(P_,{closeNav:s,isExpanded:r}),x===Sd&&(0,n.jsx)(zU,{closeNav:s,isExpanded:r,openNav:c,ref:m}),x===rf&&(0,n.jsx)(_U,{closeNav:s,openNav:c,children:(0,n.jsx)(v_,{isExpanded:r})})]}),(0,n.jsx)("div",{ref:f,children:t})]})})})})},$_=({children:e,isLessonOnlyEmbed:t,...s})=>{const{buttonNavigationStyle:o,navigationType:r,lmsOptions:a,...i}=re(),c=Vi(),l=uh(i)===!0,d=!c,h=i.sidebarMode===Wr.OPEN,m=l&&r===Nr&&h&&d,f=Vn(i),v=f&&i?.theme?.blockNavigationType===Yc.CONTINOUS,[C,g]=(0,u.useState)(m),x=(0,u.useCallback)(()=>{g(!0)},[]),b=(0,u.useCallback)(()=>{g(!1)},[]),T=(0,u.useCallback)(()=>C?b():x(),[C,b,x]);(0,qe.A)(hx,x),(0,qe.A)(mx,b);const L=f||t===!0,y=L?"fixed-course-exit":void 0,S=v?{marginInlineEnd:"2rem"}:void 0,k=l?r:void 0;return L?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(Ib,{className:y,lmsOptions:a,style:S}),e]}):(0,n.jsx)(H_,{...s,beginWithSidebarOpen:h,closeNav:b,courseNavType:k,hideNav:!l,isNavOpen:C,isTablet:c,lessonNavType:o,openNav:x,toggleNav:T,children:e})};var V_=p(789),Yb=p.n(V_),z_=p(28676),af=p.n(z_);const U_=af()(Xe()("family","continue"),Xe()("variant","continue")),Zb=Pe()(Yb()(U_),ks()([],"items"));function kd({children:e}){const t=(0,u.useRef)(null),s=(0,u.useCallback)(()=>{t.current?.focus?.()},[]);return JF(s),(0,n.jsx)("main",{className:"lesson-main",ref:t,tabIndex:-1,children:e})}const __=({percentComplete:e,trackingCompletionPercentage:t,labelCompletionRequirement:s="Completion Requirement",labelPercentCompletion:o="% Completion",labelYouCompleted:r="You completed:",labelA11yRequirementCompleted:a="Requirement completed, check mark",labelA11yRequirementNotCompleted:i="Requirement not completed, empty square"})=>{const c=on();if(t==null)return null;const l=Ca({percent:t,label:o,isRTL:c}),d=c?`%${e}`:`${e}%`;return(0,n.jsxs)("div",{className:"progress-summary__requirement",children:[(0,n.jsxs)("div",{className:"progress-summary__requirement-stats-wrap",children:[(0,n.jsx)("h2",{className:"progress-summary__requirement-title",children:s}),(0,n.jsxs)("div",{className:"progress-summary__requirement-stats",children:[(0,n.jsx)("div",{children:l}),(0,n.jsxs)("div",{children:[r,"\xA0",(0,n.jsx)("strong",{className:"progress-summary__requirement-stats-percent-achieved",children:d})]})]})]}),(0,n.jsx)(Xb,{labelA11yRequirementCompleted:a,labelA11yRequirementNotCompleted:i,requirementMet:e!=null&&t<=e})]})},G_=({outOfAttempts:e,quizPassed:t,quizPassingScore:s=100,quizScore:o,quizTitle:r,trackingQuizId:a,labelQuizRequirement:i="Quiz Requirement",labelScoreOf:c="Score of",labelScoreOfPreposition:l="% on",labelViewQuiz:d="View quiz",labelYouScored:h="You scored",labelNoAttemptsRemaining:m="No attempts remaining.",labelA11yRequirementCompleted:f="Requirement completed, check mark",labelA11yRequirementNotCompleted:v="Requirement not completed, empty square"})=>{const C=on();if(!a)return null;const g=Ca({percent:s,label:l,isRTL:C});return(0,n.jsxs)("div",{className:"progress-summary__requirement",children:[(0,n.jsxs)("div",{className:"progress-summary__requirement-stats-wrap",children:[(0,n.jsx)("h2",{className:"progress-summary__requirement-title",children:i}),(0,n.jsxs)("div",{className:"progress-summary__requirement-stats",children:[(0,n.jsxs)("div",{children:[c," ",g," ",r]}),o==null?(0,n.jsx)("div",{children:(0,n.jsx)(as,{className:"progress-summary__requirement-stats-link brand--color",to:Ns(a),children:d})}):(0,n.jsxs)("div",{children:[h,"\xA0",(0,n.jsxs)("strong",{className:"progress-summary__requirement-stats-percent-achieved",children:[o,"%"]})]})]}),e&&(0,n.jsx)("span",{className:"progress-summary__requirement-no-attempts",children:m})]}),(0,n.jsx)(Xb,{labelA11yRequirementCompleted:f,labelA11yRequirementNotCompleted:v,requirementMet:t})]})},Xb=({requirementMet:e,labelA11yRequirementCompleted:t,labelA11yRequirementNotCompleted:s})=>e?(0,n.jsx)(ie,{"aria-label":t,classNameIcon:"progress-summary__requirement-checkbox-checked",name:"square-check"}):(0,n.jsx)("div",{"aria-label":s,className:"progress-summary__requirement-checkbox-empty",role:"img"}),W_=({dueAt:e})=>e?(0,n.jsx)("div",{className:"progress-summary__header-due brand--color brand--border",children:Qh(e)}):null;var K_=p(68508),Q_=p.n(K_);const Y_=900,Z_=1e4;function X_(){const[e,t]=(0,u.useState)(!1),[s,o]=(0,u.useState)(!0);return(0,u.useEffect)(()=>{let r;const a=setTimeout(()=>{t(!0),r=setTimeout(()=>o(!1),Z_)},Y_);return()=>{clearTimeout(a),clearTimeout(r)}},[]),{recycle:s,run:e}}const q_=["#eb524d","#ffac02","#ffcc00","#28cea9","#4fbdf4","#6788e4"],J_=()=>{const{recycle:e,run:t}=X_(),s=(0,u.useRef)(null);return(0,n.jsx)("div",{className:"progress-summary__confetti",children:(0,n.jsx)(Q_(),{canvasRef:s,colors:q_,gravity:.4,height:window.innerHeight,numberOfPieces:500,recycle:e,run:t,width:window.innerWidth})})};var eG=p(15029);const qb=$("progress-summary-card"),tG=({completeLabel:e,isComplete:t,isUrgent:s,completedDate:o,labelDue:r})=>t?(0,n.jsxs)("div",{className:"progress-summary-card__completed-label",children:[e,(0,n.jsx)("span",{className:"progress-summary-card__completed-date",children:o})]}):r?(0,n.jsx)("div",{className:["progress-summary-card__due-label",s?"brand--color":void 0].filter(Boolean).join(" "),children:r}):null,sG=({cardImageKey:e=null,className:t,color:s="#ff6602",completedAt:o=null,coverImageKey:r=null,disable:a=!1,durationHidden:i=!1,enrolledAt:c=null,hidden:l=!1,imagesUri:d="",isLearningPath:h=!1,isUrgent:m=!1,labelAssignedToMe:f="",labelDue:v="",labelDuration:C="",labelLearningPath:g="",onClick:x=Kt,progress:b=0,title:T=""})=>{const L=be(),y=on(),S=o!==null,k=(0,u.useCallback)(()=>{a||x?.()},[a,x]),N=(0,u.useCallback)(P=>{Ph(P)&&P.preventDefault(),!a&&la(P)&&x?.()},[a,x]),I=Ca({percent:Math.round(b),label:L?.progressSummaryPercentComplete||"% Complete",isRTL:y}),w=e||r,A=L?.progressSummaryCompleted||"Completed: ",E=o===null?"":`${ln()(new Date(o)).format("MM/DD/YY")}`,j=qb("card",{disabled:a}),O=["progress-summary-card__title-button",t].filter(Boolean).join(" "),R=qb("image-overlay",{"not-started":!(b||S),"in-progress-completed":b||S});return(0,n.jsxs)("div",{"aria-hidden":l,className:j,onClick:k,children:[(0,n.jsxs)("div",{className:"progress-summary-card__content",children:[(0,n.jsx)("button",{"aria-disabled":a,className:O,onKeyDown:N,role:"link",tabIndex:l?-1:void 0,type:"button",children:(0,n.jsx)("span",{className:"progress-summary-card__title",children:T||L?.progressSummaryNoTitle||"(No Title)"})}),(0,n.jsxs)("div",{className:"progress-summary-card__course-info",children:[h&&(0,n.jsx)("div",{className:"progress-summary-card__hide",children:g}),c&&(0,n.jsx)("div",{className:"progress-summary-card__hide",children:f}),!!b&&!a&&!o&&(0,n.jsx)("span",{className:"progress-summary-card__hide",children:I}),!i&&!S&&(0,n.jsx)("div",{className:"progress-summary-card__duration",children:C}),(0,n.jsx)(tG,{completedDate:E,completeLabel:A,isComplete:S,isUrgent:m,labelDue:v})]})]}),(0,n.jsxs)("div",{className:"progress-summary-card__image-wrap",children:[(0,n.jsx)(eG.A,{alt:"","aria-hidden":"true",b:"fff",className:"progress-summary-card__image",f:"jpg",h:150,imageKey:w,imagesUri:d,s:"cover",style:{backgroundColor:s},w:300}),(0,n.jsx)("div",{className:R}),(0,n.jsx)("div",{className:"progress-summary-card__image-overlay-bottom-bar",children:!!b&&!a&&!S&&(0,n.jsx)("div",{"aria-hidden":"true",className:"progress-summary-card__progress-bar-wrap",children:(0,n.jsx)("div",{className:"progress-summary-card__wrap-light",children:(0,n.jsx)("div",{className:"progress-summary-card__progress-bar",style:{width:`${b}%`}})})})})]})]})},nG=Ie("IMAGES_URI"),Jb=(e,t)=>e===1?t:t.concat("s"),cf=e=>e?.course?.course?.lessons??[],oG=e=>t=>cf(t).find(s=>s.type!=="section"&&s.id!=null&&!e.includes(s.id)),rG=e=>{const t=cf(e),{trackingQuizId:s,score:o}=e??{};if(s&&t.length){const r=t.find(({id:i})=>i===s),{settings:{passingScore:a}={}}=r??{};return Number(o)<Number(a)?r:!1}},aG=e=>cf(e).find(t=>t.type!=="section"),iG=(e,t)=>(oG(e)(t)||rG(t)||aG(t))?.id??"",cG=e=>{const t=ln().duration(e),s=t.hours(),o=t.minutes(),r=`${s} ${Jb(s,"hr")}`,a=`${o} min`;return s>=100?"100+ hrs":s>0&&o>0?[r,a].join(" "):s>0?r:a},lG=({color:e,learningPathId:t})=>{const{learningPathComplete:s,isSuccess:o,nextCourse:r}=de(x=>x.learningPathUpNext??{}),{dueAt:a,courseId:i="",lessonCount:c,lessonsCompleted:l=[],sourceType:d,timeToComplete:h}=r??{},m=be(),f=(0,u.useMemo)(()=>iG(l,r),[r,l]),v=r?.color??e,C={cardImageKey:r?.cardImageKey,color:v,coverImageKey:r?.coverImageKey,progress:r?.progress,score:r?.score??void 0,title:r?.title},g=(0,u.useCallback)(()=>{d==="PACKAGE"?(window.top.sessionStorage.setItem("upNextCourseId",i),window.top.location.assign(`/learning-path/${t}`)):IN(`${i}/lessons/${f}`)},[i,t,f,d]);return o&&!s&&(0,n.jsx)("div",{className:"progress-summary__lp-next",children:(0,n.jsxs)("div",{className:"progress-summary__lp-next-inner",children:[(0,n.jsxs)("div",{className:"progress-summary__lp-next-label",children:[m?.progressSummaryNextUp||"Next up"," ",(0,n.jsx)(ie,{"aria-hidden":"true",classNameIcon:"progress-summary__lp-next-label-icon",name:"arrow-right"})]}),(0,n.jsx)("div",{className:"progress-summary__lp-next-card",children:(0,n.jsx)(sG,{imagesUri:nG,labelCount:`${c} ${Jb(c,"lesson")}`,labelDue:Qh(a),labelDuration:cG(h),noCertDownload:!0,noFavoriteBtn:!0,onClick:g,...C})})]})})},dG=matchMedia("(prefers-reduced-motion: reduce)");function ws(){return dG.matches}const uG=`${Ie("CDN_URI")}/assets/rise/assets/trophy.svg`,hG=e=>Object.values(e).filter(({isComplete:t})=>t).length,mG=e=>{const{color:t,course:s={},courseProgress:o={},lessons:r=[]}=e,a=ct(),{learningPathComplete:i,lpHasFailedQuiz:c}=de(B=>B.learningPathUpNext??{}),{lessons:l={},percentComplete:d}=o,{dueAt:h,certificateDownload:m,completionCelebration:f,lessonsOnly:v=[],riseComCourseId:C,riseComLearningPathId:g,trackingCompletionPercentage:x,trackingQuizId:b}=s,T=ea(),L=be(),y=L??{},S=x==null&&b==null,k=S?d===100:Cg(),N=v.length,I=hG(l),w=(0,u.useCallback)(()=>{a(ON({courseId:C,learningPathId:g}))},[a,C,g]);(0,u.useEffect)(()=>{g&&w()},[]);const A=(0,u.useMemo)(()=>k?s.completedAt?s.completedAt:new Date:null,[s.completedAt,k]),E=(0,u.useMemo)(()=>r.find(B=>B.type==="quiz"&&B.id===b),[b,r]),j=lt(E?.title),O=(0,u.useMemo)(()=>Number(E?.settings?.passingScore??100),[E]),R=b?o.lessons?.[b]:void 0,P=R?.passed??null,M=(0,u.useMemo)(()=>R?.percentComplete===100?R.score??null:null,[R]),H=AC(o,E,b),F=typeof H=="object"&&H!==null&&"outOfAttempts"in H&&H.outOfAttempts===!0,D=b?P:!0,V=ws(),W=S?"progress-summary progress-summary__no-req":"progress-summary",_=Vn(s),Z=`You've completed ${I} of ${N} lessons.`,Q=_?k?"Complete":"Incomplete":Z,U=String(Yi(T+" - Progress Summary"));return(0,n.jsx)(Lr,{title:U,children:(0,n.jsxs)("div",{className:W,children:[k&&f&&D&&!V&&(0,n.jsx)(J_,{}),(0,n.jsxs)("header",{className:"progress-summary__header",children:[(0,n.jsx)("h1",{className:"progress-summary__header-title",tabIndex:-1,children:k&&!S&&D?L?.progressSummaryCongratulations||"Congratulations!":L?.progressSummary||"Progress Summary"}),S?(0,n.jsx)("div",{className:"progress-summary__lessons-completed",children:Q}):k?(0,n.jsxs)("div",{className:"progress-summary__header-completion-date",children:[D&&(0,n.jsx)("img",{alt:"trophy",className:"progress-summary__header-trophy",src:uG}),ln()(A).format("MMMM Do, YYYY")]}):(0,n.jsx)(W_,{dueAt:h})]}),(0,n.jsxs)("section",{className:"progress-summary__section",children:[!S&&k&&(0,n.jsx)("div",{className:"progress-summary__requirements-met",children:L?.progressSummaryRequirementsMet||"You've met all the requirements."}),S?!g&&(0,n.jsxs)(as,{className:"progress-summary__start-over",to:"/",children:[L?.progressSummaryStartOver||"Start Over",(0,n.jsx)("i",{className:"progress-summary__start-over-icon icon icon-reload"})]}):(0,n.jsxs)("div",{className:"progress-summary__requirements",children:[(0,n.jsx)(__,{labelA11yRequirementCompleted:L?.a11yProgressSummaryRequirementCompleted,labelA11yRequirementNotCompleted:L?.a11yProgressSummaryRequirementNotCompleted,labelCompletionRequirement:y.progressSummaryCompletionRequirement,labelPercentCompletion:y.progressSummaryPercentCompletion,labelYouCompleted:y.progressSummaryYouCompleted,percentComplete:d,trackingCompletionPercentage:x}),(0,n.jsx)(G_,{labelA11yRequirementCompleted:L?.a11yProgressSummaryRequirementCompleted,labelA11yRequirementNotCompleted:L?.a11yProgressSummaryRequirementNotCompleted,labelNoAttemptsRemaining:y.progressSummaryNoAttemptsRemaining,labelQuizRequirement:y.progressSummaryQuizRequirement,labelScoreOf:y.progressSummaryScoreOf,labelScoreOfPreposition:y.progressSummaryScoreOfPreposition,labelViewQuiz:y.progressSummaryViewQuiz,labelYouScored:y.progressSummaryYouScored,outOfAttempts:F,quizPassed:P,quizPassingScore:O,quizScore:M,quizTitle:j,trackingQuizId:b})]}),(k||S)&&(0,n.jsxs)("div",{className:"progress-summary__completion-controls",children:[(0,n.jsx)("button",{className:"progress-summary__btn-back progress-summary__completion-control",onClick:NN,role:"link",type:"button",children:L?.progressSummaryBackToLearning||"Back to my learning"}),k&&(!g&&m||g&&i)&&m&&D&&!c&&(0,n.jsx)("span",{className:"progress-summary__completion-control",children:(0,n.jsx)(hz,{})})]})]}),k&&!!g&&(0,n.jsx)(lG,{color:t,learningPathId:g})]})})},e3=({contentClassName:e,...t})=>(0,n.jsx)("div",{className:"page","data-page":!0,children:(0,n.jsx)("div",{className:"page__wrapper page__wrapper--white",children:(0,n.jsx)(kd,{children:(0,n.jsx)("div",{className:e?`page__content ${e}`:"page__content",children:(0,n.jsx)(mG,{...t})})})})}),fG={id:"progress-summary",type:"progress-summary",title:"Progress Summary",description:"Summary of course progress"};var pG=p(89950),lf=p.n(pG);p.dn(t3);function t3({authors:e,lessonAuthor:t,courseAuthor:s,selectedAuthorId:o}){if(o==="none")return{};if(o){const r=lf()(e,{id:o});if(r)return r}if(t){const r=lf()(e,{id:t});if(r)return r}if(s){const r=lf()(e,{id:s});if(r)return r}return{}}const s3={addEventListeners(e,t){e.addEventListener("animationend",t,!1)},removeEventListeners(e,t){e.removeEventListener("animationend",t,!1)}},n3=Oe("Progress"),df=(0,u.createContext)({visibleLessons:[],registerLesson:()=>{},unregisterLesson:()=>{}});df.displayName="LessonContentContext";function gG({children:e}){const[t,s]=(0,u.useState)(()=>[]),o=(0,u.useCallback)(i=>{s(c=>c.concat(i))},[]),r=(0,u.useCallback)(i=>{s(c=>c.filter(l=>l!==i))},[]),a=(0,u.useMemo)(()=>({visibleLessons:t,registerLesson:o,unregisterLesson:r}),[t,o,r]);return(0,n.jsx)(df.Provider,{value:a,children:e})}function vG(){return(0,u.useContext)(df)}function CG(e){const t=e?.customColorLessonHeaderContrast,s=e?.lessonHeaderColor;return(0,u.useMemo)(()=>{const o=Is(s),r=t??o;return(r===Te.AUTO?o:r)===Te.DARK?bt.DARK:bt.LIGHT},[t,s])}function xG({didNavigate:e,hasTransitioned:t,onPageReady:s}){const o=(0,u.useRef)(!1);(0,u.useEffect)(()=>{e&&!o.current&&t&&s(),o.current=t},[e,t,s])}const bG=Oe("LessonHeader"),yG=$("lesson-header"),TG=({authorName:e,avatar:t,children:s,color:o,description:r,labels:{lessonName:a,lessonPreposition:i},lessonHeaderColor:c,lessonHeaderImageColor:l,lessonHeaderSize:d,lessonHeaderStyle:h,partnerContentAuthors:m,totalLessons:f,lessonNumber:v,showAuthor:C,showLessonCount:g,title:x})=>{const b=HI(),T=Es(),L=B1(b),y=h===ne.IMAGE,S=yG("top-wrap"),{alpha:k,ariaLabel:N,media:I,role:w}=Cr("lessonHeaderImage"),A=I?.image,E=(0,u.useMemo)(()=>{if(A&&y){const j=l===at.LIGHT?"#fff":"#000";return cl({alpha:k,color:j,url:dt(A)})}},[A,y,l,k]);return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(WF,{ariaLabel:y?N:void 0,imgRole:y?w:void 0,sectionStyles:E,topWrapClassName:S,children:(0,n.jsx)(bG,{authorName:e,avatar:t,color:o,description:r,lessonHeaderColor:c,lessonHeaderSize:d,lessonHeaderStyle:h,lessonId:T,lessonName:a,lessonNumber:v,lessonPreposition:i,partnerContentAuthors:m,showAuthor:C,showLessonCount:g&&!L,title:x,totalLessons:f})}),s]})},Oa=$("one-page-authors");function LG({className:e}){const t=be(),s=bC(),o=KI(),r=hF();if(!o)return null;const a=s?.isPartnerContentAuthor&&r!=null,i=Oa({}).mix(e);return a?(0,n.jsx)("div",{className:i,children:(0,n.jsx)("ul",{className:Oa("list"),role:"list",children:r.map((c,l)=>(0,n.jsxs)("li",{className:Oa("item"),role:"listitem",children:[(0,n.jsx)(o3,{avatarUrl:c?.image?yi({width:76,height:76,imageKey:c.image}):void 0}),(0,n.jsx)(r3,{a11yAuthorPrefix:t?.a11yAuthorPrefix,name:c?.name})]},l))})}):(0,n.jsxs)("div",{className:i,children:[(0,n.jsx)(o3,{avatarUrl:pt(o.avatar)}),(0,n.jsx)(r3,{a11yAuthorPrefix:t?.a11yAuthorPrefix,name:o.authorName})]})}function o3({avatarUrl:e}){return e?(0,n.jsx)("div",{className:Oa("avatar"),style:{backgroundImage:`url(${e})`}}):(0,n.jsx)("div",{className:Oa("avatar-fallback"),children:(0,n.jsx)(mm,{decorative:!0})})}function r3({a11yAuthorPrefix:e,name:t}){const s=t||"Unknown User",o=Oa("name");return(0,n.jsxs)("div",{className:o.toString(),children:[(0,n.jsx)("span",{className:"visually-hidden-always",children:e}),(0,n.jsx)("span",{children:s})]})}const a3=Oe("OnePageAuthors",LG),SG=$("one-page-title"),i3=Oe("OnePageTitle",({className:e,htmlId:t})=>{const s=re(),o=Ae(s?.title),r=fa("title"),a=(0,Qt.uW)(s?.title)?{"data-l10n-id":s?.title?.l10nId}:{"data-change-path":r},i=SG({}).mix(e);return(0,n.jsx)("h1",{...a,className:i,id:t,tabIndex:-1,children:o})}),ec=$("one-page-lesson-header-info");function kG(){const e=re(),t=ec({}),{accentContrast:s,coverImageColor:o,coverPageType:r}=e?.theme??{},c=r===ce.IMAGE&&o===at.LIGHT||s===Te.DARK||r===ce.WHITE||r===ce.VIDEO||r===ce.ACCENT&&Is(e?.color)===Te.DARK;return(0,n.jsxs)("div",{className:t,children:[(F1(e)||s0(e))&&(0,n.jsx)(Um,{className:ec("logo"),imageClassName:ec("logo-image")}),(0,n.jsx)(i3,{className:ec("title").toString(),hasDarkText:c}),(0,n.jsx)(a3,{className:ec("authors").toString(),hasDarkText:c})]})}const NG=Oe("OnePageCoverInfo",kG),IG=Oe("CoverSVG"),uf=$("one-page-lesson-header"),EG=$("page"),jG=uf("main").mix("lesson-header__main"),wG=uf("container").mix(EG("header-container")),c3=()=>{const e=re(),t=e?.coverPageType,{alpha:s,media:o}=Cr("coverImage"),r=e?.theme?.coverImageColor,a=t===ce.WHITE,i=t===ce.IMAGE,c=t===ce.ACCENT,l=t===ce.VIDEO,d=r===at.LIGHT,h=uf({accent:c,image:i,white:a||l,video:l,"overlay-light":i&&d}),m=i?ta({alpha:s,color:r??void 0,media:o})??void 0:void 0;return(0,n.jsxs)("header",{className:h,style:m,children:[(0,n.jsx)("div",{className:wG,children:(0,n.jsx)("div",{className:jG,children:(0,n.jsx)(NG,{})})}),(0,n.jsx)(IG,{coverPageType:"LEFT"})]})};var AG=p(27462),RG=p(27824),PG=p.n(RG);function MG(e){return e==="a"?46.5:7.6}function OG(e){return e==="d"?2:3.2}function BG(e){switch(e){case"a":return 30;case"c":case"d":return 92;default:return 76}}function l3(e){switch(e){case"b":return 95;case"background":return 52;default:return 76}}function hf(e){switch(e){case"a":case"b":case"carousel":default:return 6.4;case"c":return 18.6;case"d":return 8;case"background":return 6}}function DG(e){return .3}function rfe(e){switch(e){case 3:return"three";case 4:return"four";default:return"two"}}function FG(e){return e==="light"?"#fff":"#000"}function afe(e){switch(e){case"a":case"b":default:return[6.4,9.6,16];case"c":return[10,14.8,18.6];case"d":return[8,12,16];case"background":return[6,9.6,16];case"carousel":return[6.4,10,16]}}function ife(e){return e==="b"?[52,76,95]:[52,76,92]}function cfe(e){return e==="a"?[30,76,92]:[52,76,92]}function lfe(e){return e==="d"?[2,4.8,5.6]:[3.2,4.8,5.6]}function dfe(e){return e==="a"?[46.5,78,120]:[7.6,20,32]}function HG(e){switch(e){case 3:return"sm";case 10:return"lg";default:return"med"}}function mf(e,t){switch(t){case 6:case 6.4:case 8:default:return"sm";case 9.6:case 12:case 14.8:return"med";case 16:case 18.6:return"lg";case 10:return e==="c"?"sm":"med"}}function $G(e){switch(e){case 52:return"sm";case 76:return"med";default:return"lg"}}function d3(e){switch(e){case 52:return"sm";case 76:return"med";default:return"lg"}}function u3(e){switch(e){case 4:return"med";case 6:return"lg";default:return"sm"}}function Nd(e){switch(e){case 52:return"sm";case 92:return"lg";default:return"med"}}function VG(e){switch(e){case 30:case 52:return"sm";case 92:return"lg";default:return"med"}}function zG(e){switch(e){case 4.8:return"med";case 5.6:return"lg";default:return"sm"}}function UG(e){switch(e){case 20:case 78:return"med";case 32:case 120:return"lg";default:return"sm"}}function _G(e){switch(e){case 1:return"sm";case 3:return"lg";default:return"med"}}function GG(e){switch(e){case 3.2:return"med";case 5.6:return"lg";default:return"sm"}}const We=({value:e,className:t,allowTabNavigation:s=!0,tagName:o,id:r})=>{const{value:a}=Wh(Ae(e));return a?(0,n.jsx)(ke,{allowTabNavigation:s,className:t,id:r,tagName:o,value:e}):null};function WG(e,t){const{className:s="",tag:o="div",style:r={},...a}=e,{backgroundColor:i}=rs(),c=kw(),l=c===bt.DARK?bt.LIGHT:bt.DARK;return i!==""&&Object.assign(r,{"--color-background-contrast":c,"--color-background-contrast-complementary":l,"--color-background-contrast-rgb":(0,Ia.A)(c)?.slice(0,3)}),(0,n.jsx)(o,{...a,className:s,ref:t,style:r})}const h3=(0,u.forwardRef)(WG),KG=10,m3=e=>`${e}rem`,ff=e=>e!=null?`${e/KG}rem`:void 0,QG=["image full","image text overlay","quote background"];function YG(e){const{family:t,variant:s,backgroundType:o,isOnlyBlockInStep:r,isOnePage:a}=e;if(!a||!r)return!1;if(o===ne.IMAGE)return!0;if(!t||!s)return!1;const i=`${t} ${s}`;return QG.some(c=>c===i)}const ZG={paddingBottom:"0rem",paddingTop:"0rem"},XG=e=>{const{blockSettings:t,familyTheme:s,courseTheme:o,isFullWidthImage:r}=e;if(r)return ZG;const a=m3(Number(YC(t?.paddingTop,s?.paddingStart,o?.blockPaddingStart,3)));return{paddingBottom:m3(Number(YC(t?.paddingBottom,s?.paddingEnd,o?.blockPaddingEnd,3))),paddingTop:a}},qG={},JG=e=>e?{bodyFontSize:ff(e.bodyFontSize),headingFontSize:ff(e.headingFontSize),subheadingFontSize:ff(e.subheadingFontSize)}:qG;function eW(){const e=Bt(),t=De(),s=Eo(),o=Vn(t),r=YG({backgroundType:e?.settings?.backgroundType,family:e?.family,isOnePage:o,isOnlyBlockInStep:e?.isOnlyBlockInStep,variant:e?.variant});return XG({blockSettings:e?.settings,courseTheme:t?.theme,familyTheme:s,isFullWidthImage:r})}function tW(){const e=Eo();return JG(e)}function sW(){const e=eW();return{fontSize:tW(),padding:e}}const nW=$r()(["settings"]),f3=$("block-wrapper"),oW=$("bg"),rW=(e,t)=>{const{children:s,className:o,defaultBackgroundColor:r="",style:a,tag:i,type:c,...l}=e,d=Bt(),h=Iw(),m=sW(),f=jh(r,h.backgroundColor),v=f||"transparent",C=d?.className,g={...a,...h.backgroundImageCss,"--color-background":f,...m.fontSize.bodyFontSize&&{"--block-text-body-font-size":m.fontSize.bodyFontSize},...m.fontSize.headingFontSize&&{"--block-text-heading-font-size":m.fontSize.headingFontSize},...m.fontSize.subheadingFontSize&&{"--block-text-subheading-font-size":m.fontSize.subheadingFontSize},boxShadow:`0px 1px 0px ${v} `,paddingBottom:m.padding.paddingBottom,paddingTop:m.padding.paddingTop},x=X()(o,{"bg--legacy-background":h.isLegacyBackground,[`block-${c}`]:!!c}),b=oW({card:h.cardMode,range:h.colorRange,type:h.backgroundTypeLowercase,"overlay-light":h.isOverlayLight,"contrast-light":h.isContrastLight}),T=C?f3({}).mix(b).mix(C):f3({}).mix(b),L=[x,T.toString()].join(" ");return(0,n.jsxs)(h3,{...nW(l),className:L,ref:t,style:g,tag:i,children:[(0,n.jsx)("span",{"aria-label":h.backgroundImageAlt,role:jg(h.backgroundImageAlt)}),s]})},Ee=(0,u.forwardRef)(rW);var aW=p(82920);function iW(e,t){const s=Ag(e.src),o=e.width&&e.height&&!s,r=o?"async":void 0,a=o?"lazy":void 0,i=o?e.width:void 0,c=o?e.height:void 0;return(0,n.jsx)("img",{...e,decoding:r,height:c,loading:a,ref:t,width:i})}const pf=aW.forwardRef(iW),p3=(0,u.createContext)(pf);function cW({children:e,ImageEagerOrLazy:t}){return(0,n.jsx)(p3,{value:t,children:e})}function lW(){return(0,u.use)(p3)}function xs(e){const t=lW();return(0,n.jsx)(t,{...e})}var dW=p(89342),hfe=p(62586);function g3(e){return(0,n.jsx)(dW.i,{IconUnzoom:hW,IconZoom:uW,...e})}const uW=()=>(0,n.jsx)(ie,{name:"arrows-two-from-center"}),hW=()=>(0,n.jsx)(ie,{name:"arrows-two-to-center"}),v3=$("block-text");function mW({children:e,item:t,labels:s}){const o="media"in t?t.media:void 0,r=Ae(o)?.image,a=dt(r),i=bo(r?.alt??""),l=Bt()?.settings,d=l?.images,h=l?.zoomOnClick,m=(0,u.useRef)(void 0);let f=(0,n.jsx)(xs,{alt:i,"data-l10n-id":Pt(o),ref:m,src:a});return h&&(f=(0,n.jsx)(g3,{a11yNameButtonUnzoom:s?.a11yUnzoomImage,a11yNameButtonZoom:s?.a11yZoomImage,children:f})),(0,n.jsxs)("div",{className:v3("col"),children:[d&&r&&(0,n.jsx)("div",{className:v3("image"),children:f}),e]})}var fW=p(29639),pW=p.n(fW),gW=p(12842),Id=p(32633);const vW=$("portal-tooltip"),_t={LEFT:"LEFT",RIGHT:"RIGHT",ABOVE:"ABOVE",BELOW:"BELOW"},CW=(e,t,s)=>{const o=e.getBoundingClientRect(),r=t.getBoundingClientRect(),a=window.visualViewport;let i=s;(i===_t.ABOVE||i===_t.BELOW)&&(o.bottom-r.height<0&&(i=_t.BELOW),r.height+o.top>a.height&&(i=_t.ABOVE)),(i===_t.LEFT||i===_t.RIGHT)&&(r.left<0&&(i=_t.RIGHT),r.width+o.left>a.width&&(i=_t.LEFT));const c={left:0,right:0,top:0,bottom:0};i===_t.ABOVE&&(c.top=o.top-r.height-25),i===_t.BELOW&&(c.top=o.top+o.height),i===_t.RIGHT&&(c.left=o.left+o.width+70),i===_t.LEFT&&(c.left=o.left-r.width-25),(i===_t.LEFT||i===_t.RIGHT)&&(c.top=o.top-o.height/2),(i===_t.ABOVE||i===_t.BELOW)&&(c.left=o.left+o.width/2);const l=o.left+o.width/2,d=r.width/2+l>a.width,h=r.width/2>l;d?t.classList.add("portal-tooltip__tooltip--offset-right"):h&&t.classList.add("portal-tooltip__tooltip--offset-left"),Object.keys(c).map(m=>c[m]===0?t.style.removeProperty(m):t.style.setProperty(m,`${c[m]}px`)),t.classList.add(`portal-tooltip__tooltip--${i.toLowerCase()}`)};function xW({children:e,className:t,direction:s=_t.ABOVE,elementFocused:o,exitAnimation:r=!0,message:a,style:i,renderInModalWhenPresent:c=!1}){const[l,d]=(0,u.useState)(!1),[h]=(0,u.useState)(!1),m=(0,u.useRef)(null),f=(0,u.useRef)(null),[v,C]=(0,gW.A)((()=>e)),g=(0,u.useCallback)(()=>d(!0),[d]),x=(0,u.useCallback)(()=>d(!1),[d]);return(0,u.useEffect)(()=>(document.addEventListener("scroll",g),document.addEventListener("scrollend",x),()=>{document.removeEventListener("scroll",g),document.removeEventListener("scrollend",x)})),(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("div",{ref:m,children:v}),a&&(C||h||o)&&!l&&(0,n.jsx)(Bn,{classNames:"portal-tooltip__tooltip",exit:r,timeout:200,children:(0,n.jsx)(bW,{buttonRef:m,className:t,direction:s,elementFocused:o,hovering:C,message:a,portalRef:f,renderInModalWhenPresent:c,style:i})})]})}function bW({buttonRef:e,className:t,direction:s,elementFocused:o,hovering:r,message:a,portalRef:i,style:c,renderInModalWhenPresent:l=!1}){const d=(0,u.useCallback)(()=>CW(e.current,i.current,s),[e,s,i]),h=(0,u.useCallback)(()=>{i.current&&d()},[i,d]),m=()=>{!r&&!o&&i.current&&(i.current.style=null)};return(0,Id.A)(h),(0,In.createPortal)((0,n.jsx)("div",{"aria-hidden":!r||!o,className:vW("tooltip").mix(t).toString(),onTransitionEnd:m,ref:i,style:c,children:a}),l?wo({id:"portal",childType:"other"}):document.getElementById("portal"))}const Mo=xW,C3=$("audio-player-actions"),yW=({audioPlayerId:e,condensed:t=!1,transcriptMedia:s,onDelete:o,onTranscriptClick:r,onTranscriptClose:a})=>{const{mode:i,disableTranscriptButton:c}=hd(),l=Zi(),[d,h]=(0,u.useState)(!1),[m,f]=(0,u.useState)(!1),v=Ae(s)?.audio?.transcript,C=(0,u.useCallback)(()=>h(!0),[]),g=(0,u.useCallback)(()=>h(!1),[]),x=(0,u.useCallback)(()=>f(!0),[]),b=(0,u.useCallback)(()=>f(!1),[]),T=Mt(),L=l?.audioPlayerIdOpen&&l.audioPlayerIdOpen===e,y=c?"Transcripts are only available in lesson previews":L?T?.audioHideTranscript:i==="edit"?"Edit transcript":T?.audioShowTranscript,S=(0,u.useCallback)(()=>{const w=document.getElementById(Ym(e));w&&w.focus()},[e]),[k,N]=(0,u.useState)(!1);function I(){c||(L?a?.():(r?.(),N(!0)))}return(0,u.useEffect)(()=>{k&&(N(!1),S())},[k,S]),(0,n.jsxs)(n.Fragment,{children:[o&&(0,n.jsx)(Mo,{elementFocused:d,message:"Remove audio",children:(0,n.jsx)("button",{"aria-label":"Remove audio",className:C3("button",{condensed:t}),onBlur:g,onClick:o,onFocus:C,onMouseOut:g,onMouseOver:C,type:"button",children:(0,n.jsx)(ie,{name:"trash"})})}),(i==="edit"||v)&&(0,n.jsx)(n.Fragment,{children:(0,n.jsx)(Mo,{elementFocused:m,message:y,renderInModalWhenPresent:i==="readonly",style:{whiteSpace:"nowrap"},children:(0,n.jsx)("button",{"aria-disabled":c,"aria-label":y,className:C3("button",{condensed:t}),id:i==="readonly"?kb(e):void 0,onBlur:b,onClick:I,onFocus:x,onMouseOut:b,onMouseOver:x,style:c?{opacity:.5}:void 0,type:"button",children:(0,n.jsx)(ie,{name:"file-audio"})})})})]})};var TW=p(10382);const x3="change";class LW extends TW.EventEmitter{_isMuted;_isPlaying;_playerId;constructor(t){super(),this.setMaxListeners(t)}get isPlaying(){return this._isPlaying}set isPlaying(t){this._isPlaying=t,this.emit("change")}set playerId(t){this._playerId=t}get playerId(){return this._playerId}pause(){this.isPlaying=!1}addChangeListener(t){this.on(x3,t)}removeChangeListener(t){this.removeListener(x3,t)}}const Ce=new LW(1/0),SW=[.5,.75,1,1.25,1.5,1.75,2].toReversed().map(e=>({value:e,label:`${e}x`})),pfe=.05,b3=$("audio-player-icon"),Ir=({x:e,width:t,height:s,y:o,pulseBaseHeight:r,pulseBaseY:a,pulseHeight:i,pulseY:c,delay:l="0s"})=>(0,n.jsx)("rect",{className:b3("bar"),height:s,rx:1,style:{"--base-height":`${s/10}rem`,"--base-y":`${o/10}rem`,"--pulse-base-height":r&&`${r/10}rem`,"--pulse-base-y":a&&`${a/10}rem`,"--pulse-height":`${i/10}rem`,"--pulse-y":`${c/10}rem`,"--delay":l},width:t,x:e,y:o}),y3=({animating:e})=>(0,n.jsx)("span",{className:b3({animating:e}),children:(0,n.jsxs)("svg",{"aria-hidden":"true",height:"16",viewBox:"0 0 20 16",width:"20",xmlns:"http://www.w3.org/2000/svg",children:[(0,n.jsx)(Ir,{delay:"0s",height:2,pulseBaseHeight:1,pulseBaseY:7.5,pulseHeight:6,pulseY:5,width:2,x:0,y:7}),(0,n.jsx)(Ir,{delay:"0.1s",height:4,pulseBaseHeight:3,pulseBaseY:6.5,pulseHeight:8,pulseY:4,width:2,x:3,y:6}),(0,n.jsx)(Ir,{delay:"0.2s",height:10,pulseBaseHeight:8,pulseBaseY:4,pulseHeight:12,pulseY:2,width:2,x:6,y:3}),(0,n.jsx)(Ir,{delay:"0.3s",height:16,pulseBaseHeight:12,pulseBaseY:2,pulseHeight:16,pulseY:0,width:2,x:9,y:0}),(0,n.jsx)(Ir,{delay:"0.4s",height:8,pulseBaseHeight:6,pulseBaseY:5,pulseHeight:12,pulseY:2,width:2,x:12,y:4}),(0,n.jsx)(Ir,{delay:"0.5s",height:11,pulseBaseHeight:9,pulseBaseY:3.5,pulseHeight:15,pulseY:.5,width:2,x:15,y:2.5}),(0,n.jsx)(Ir,{delay:"0.6s",height:2,pulseBaseHeight:1,pulseBaseY:7.5,pulseHeight:6,pulseY:5,width:2,x:18,y:7})]})});var kW,ze=p(82920);const Ed=ze.createContext(null);function NW({children:e,isDisabled:t,onClose:s,onOpen:o,onSelect:r,positionX:a="left"}){const[i,c]=ze.useState(!1),l=(0,Me.A)(i),[d,h]=ze.useState(null),m=ze.useRef(null),f=ze.useRef(null),v=ze.useRef(null),x=`${`menu-${ze.useId()}`}-content`,b=ze.useCallback(({direction:R,predFn:P=()=>!0})=>{if(!v.current)return;const M=Array.from(v.current.querySelectorAll('[role="menuitem"]')),H=M.length,F=M.findIndex(_=>_===document.activeElement);let D,V,W;switch(R){case"start":D=0,V=1;break;case"end":D=H-1,V=-1;break;case"backwards":D=F-1,V=-1;break;case"forwards":D=F+1,V=1;break;default:D=F+1,V=1}for(let _=0;_<=H;_++){D>=H?D=0:D<0&&(D=H-1);const Z=M[D];if(Z!=null&&jW(Z)&&P(Z)){W=Z;break}else D=D+V}W&&W.focus()},[]),T=ze.useCallback(()=>{b({direction:"start"})},[b]),L=ze.useCallback(()=>{b({direction:"end"})},[b]),y=ze.useCallback(()=>{b({direction:"backwards"})},[b]),S=ze.useCallback(()=>{b({direction:"forwards"})},[b]),k=ze.useCallback(R=>{b({direction:"forwards",predFn:P=>wW(P,R)})},[b]),N=ze.useCallback(()=>{i?c(!1):(c(!0),setTimeout(S,25))},[S,i]),I=ze.useCallback(()=>{f.current?.focus(),c(!1)},[]),w=ze.useCallback(()=>{c(!0),setTimeout(S,25)},[S]),A=ze.useCallback(()=>{c(!0),setTimeout(y,25)},[y]),E=ze.useCallback(()=>{const{left:R,top:P}=Ex({anchor:f.current,popover:v.current,positionX:a});h({transform:`translate3d(${R}px, ${P}px, 0)`,visibility:"visible"})},[a]),j=ze.useCallback(R=>{const P=R.currentTarget;T3(P)||(r?.(P.getAttribute("data-name")),I())},[I,r]),O=ze.useCallback(R=>{const P=R.key;if(R.altKey||R.ctrlKey||R.metaKey)return;let M=!1;if(R.shiftKey)P==="Tab"?y():P.trim()!==""&&k(P),M=!0;else switch(P){case" ":case"Enter":j(R),M=!0;break;case"Esc":case"Escape":I(),M=!0;break;case"ArrowUp":y(),M=!0;break;case"Tab":case"ArrowDown":S(),M=!0;break;case"Home":case"PageUp":T(),M=!0;break;case"End":case"PageDown":L(),M=!0;break;default:k(P);break}M&&(R.stopPropagation(),R.preventDefault())},[I,j,k,T,L,S,y]);return ze.useEffect(()=>{const R=P=>{i&&m.current!=null&&v.current!=null&&!m.current.contains(P.target)&&!v.current.contains(P.target)&&c(!1)};return i?document.addEventListener("click",R):document.removeEventListener("click",R),()=>{document.removeEventListener("click",R)}},[i]),ze.useEffect(()=>(i?window.addEventListener("resize",E):window.removeEventListener("resize",E),()=>{window.removeEventListener("resize",E)}),[E,i]),ze.useEffect(()=>{const R=Xl(m.current);for(const P of R)i?P?.addEventListener("scroll",E,{passive:!0}):P?.removeEventListener("scroll",E);return()=>{for(const P of R)P?.removeEventListener("scroll",E)}},[E,i]),ze.useEffect(()=>{i?E():h(null)},[E,i]),ze.useEffect(()=>{if(l&&!i)s?.();else if(!l&&i&&(o?.(),m.current)){const R=new CustomEvent("menuopen",{bubbles:!0,detail:{target:m.current}});m.current.dispatchEvent(R)}},[l,i,s,o]),ze.useEffect(()=>{const R=P=>{P.detail.target!==m.current&&c(!1)};return document.addEventListener("menuopen",R),()=>{document.removeEventListener("menuopen",R)}},[]),(0,n.jsx)(Ed.Provider,{value:{htmlIdContent:x,isExpanded:i,onCloseFocusTrigger:I,onExpandFocusMenuItemNext:w,onExpandFocusMenuItemPrevious:A,onFocusMenuItemByPrefix:k,onFocusMenuItemFirst:T,onFocusMenuItemLast:L,onFocusMenuItemNext:S,onFocusMenuItemPrevious:y,onItemClick:j,onItemKeyDown:O,onTriggerClick:N,refContent:v,refTrigger:f,styleContent:d},children:(0,n.jsx)("div",{"aria-owns":x,inert:t?!0:void 0,ref:m,children:e})})}function IW({as:e,children:t,label:s,labelledBy:o,...r}){const{htmlIdContent:a,isExpanded:i,onTriggerClick:c,onCloseFocusTrigger:l,onExpandFocusMenuItemNext:d,onExpandFocusMenuItemPrevious:h,refTrigger:m}=ze.useContext(Ed),f=ze.useCallback(C=>{let g=!1;switch(C.key){case" ":case"Enter":case"ArrowDown":case"Down":d(),g=!0;break;case"Esc":case"Escape":l(),g=!0;break;case"Up":case"ArrowUp":h(),g=!0;break;default:break}g&&(C.stopPropagation(),C.preventDefault())},[l,d,h]),v=e??"button";return(0,n.jsx)(v,{...r,"aria-controls":a,"aria-expanded":i,"aria-haspopup":"menu","aria-label":s,"aria-labelledby":o,"data-menu-trigger":"",onClick:c,onKeyDown:f,ref:m,type:"button",children:t})}function EW({children:e,className:t}){const{htmlIdContent:s,isExpanded:o,refContent:r,styleContent:a}=ze.useContext(Ed);return o?In.createPortal((0,n.jsx)("div",{className:t,"data-menu-content":"",hidden:o?void 0:!0,id:s,ref:r,role:"menu",style:a,children:e}),wo()):null}function jd({children:e,className:t,isDisabled:s,name:o,tooltipId:r}){const{onItemClick:a,onItemKeyDown:i}=ze.useContext(Ed),c=ze.useCallback(l=>{l.currentTarget?.focus()},[]);return(0,n.jsx)("button",{"aria-describedby":r,"aria-disabled":s,className:t,"data-menu-item":"","data-name":o,onClick:s?void 0:a,onKeyDown:i,onMouseOver:c,role:"menuitem",tabIndex:s?-1:void 0,type:"button",children:e})}function vfe({children:e}){return kW("span",{"data-menu-item-icon":"",children:e})}function T3(e){return e!=null&&e.getAttribute("disabled")!=null||e.getAttribute("aria-disabled")==="true"}function jW(e){return e!=null&&e.tagName==="BUTTON"&&!T3(e)}function wW(e,t){return e?.textContent.toLowerCase().startsWith(t?.toLowerCase())}const Ba=$("audio-player-actions-condensed"),Oo=Object.freeze({DeleteAudio:"delete-audio",EditAudio:"edit-audio",EditTranscript:"edit-transcript",RevertToSource:"revert-audio-to-source"}),AW=({audioPlayerId:e,condensed:t=!1,transcriptMedia:s,onTranscriptClick:o,onTranscriptClose:r,item:a,side:i,refs:c})=>{const{mode:l,isVariantLocale:d,handleOpenMediaModal:h,handleDelete:m,handleRevertToSource:f}=hd(),v=Zi(),C=Bt(),g=Ot(),x=a&&"media"in a&&a.media?g(a.media):void 0,b=x&&"audio"in x?x.audio.aiAudioSettings:void 0,T=nn(),L=Rh(),y=T?L(T):"",[S,k]=(0,u.useState)(!1),N=(0,u.useCallback)(()=>k(!0),[]),I=(0,u.useCallback)(()=>k(!1),[]),w=b?.l10nAutoGenStatus==="reverted-to-source",A=d&&"audio"in x&&x.audio?.sourceType==="ai-audio"&&b?.l10nAutoGenStatus!=="unsupported-locale",E=Mt(),j=v?.audioPlayerIdOpen===e,O=j?E?.audioHideTranscript:l==="edit"?"Edit transcript":E?.audioShowTranscript;function R(M){switch(M){case Oo.DeleteAudio:m(C.id,a,c);break;case Oo.EditTranscript:j?r?.():o?.();break;case Oo.EditAudio:h(C,a,c,i,{triggeredFrom:"block_audio_button"});break;case Oo.RevertToSource:f(C.id,a);break}}const P=!!g(s)?.audio?.transcript;return h||m||P?(0,n.jsx)(Mo,{elementFocused:S,message:"Options",children:(0,n.jsxs)(NW,{onSelect:R,positionX:"left",children:[(0,n.jsx)(IW,{className:Ba("trigger",{condensed:t}),label:"Options",onBlur:I,onFocus:N,onMouseEnter:N,onMouseLeave:I,children:(0,n.jsx)(ie,{name:"ellipsis-regular"})}),(0,n.jsxs)(EW,{className:Ba("content"),children:[h?(0,n.jsx)(jd,{className:Ba("menu-item"),name:Oo.EditAudio,children:"Edit audio"}):null,l==="edit"||P?(0,n.jsx)(jd,{className:Ba("menu-item"),name:Oo.EditTranscript,children:O}):null,m&&C?.variant!=="audio"?(0,n.jsx)(jd,{className:Ba("menu-item"),name:Oo.DeleteAudio,children:"Remove audio"}):null,f&&A?(0,n.jsx)(Mo,{message:w?"Audio currently synced to source":void 0,children:(0,n.jsxs)(jd,{className:Ba("menu-item"),isDisabled:w,name:Oo.RevertToSource,children:["Revert to source audio (",y,")"]})}):null]})]})}):null};var RW,PW,Ue=p(82920);const tc=Ue.createContext(null);function MW({children:e,className:t,isDisabled:s,onClose:o,onItemActiveChange:r,onOpen:a,onSelect:i,portalArgs:c,positionX:l="left",value:d}){const[h,m]=Ue.useState(null),f=(0,Me.A)(h),[v,C]=Ue.useState(!1),g=(0,Me.A)(v),[x,b]=Ue.useState(null),T=Ue.useRef(null),L=Ue.useRef(null),y=Ue.useRef(null),k=`select-${Ue.useId()}`,N=`${k}-content`,I=h?.id,w=Ue.useCallback(P=>{const M=P.currentTarget;L3(M)||(C(!1),m(M),i(M.getAttribute("data-value")),P.stopPropagation())},[i]),A=Ue.useCallback(P=>{m(P)},[]),E=Ue.useCallback(()=>{C(P=>!P)},[]),j=Ue.useCallback(()=>{const{left:P,top:M}=Ex({anchor:L.current,popover:y.current,positionX:l}),D=window.getComputedStyle(L.current).direction==="rtl"?-P:P;b({transform:`translate3d(${D}px, ${M}px, 0)`,visibility:"visible",width:`${L.current?.offsetWidth}px`})},[l]),O=Ue.useCallback(P=>{const M=Array.from(y.current?.querySelectorAll("[data-select-item]")??[]),H=M.length,F=M.findIndex(W=>W.getAttribute("data-select-item")==="current");let D,V=F+1;for(let W=0;W<H;W++){V>=H&&(V=0);const _=M[W];if(_!=null&&!L3(_)&&FW(_,P)){D=W;break}else V=H-1}D&&(m(M[D]),M[D]?.scrollIntoView({block:"center"}))},[]),R=Ue.useCallback(P=>{const M=P.key;if(P.ctrlKey||P.metaKey)return;let H=!1;const F=Array.from(y.current?.querySelectorAll("[data-select-item]")??[]),D=F.findIndex(V=>V.getAttribute("data-select-item")==="current");if(v)if(M.length===1&&M!==" "&&!P.altKey&&!P.ctrlKey&&!P.metaKey)O(M);else switch(M){case" ":case"Enter":C(!1),F[D]!=null&&i(F[D].getAttribute("data-value")),H=!0;break;case"Esc":case"Escape":C(!1),m(F.find(V=>V.getAttribute("aria-selected")==="true")),H=!0;break;case"ArrowUp":P.altKey?(C(!1),F[D]!=null&&i(F[D].getAttribute("data-value")??"")):D>0&&(m(F[D-1]),F[D-1].scrollIntoView({block:"center"})),H=!0;break;case"ArrowDown":D<F.length-1&&(m(F[D+1]),F[D+1].scrollIntoView({block:"center"})),H=!0;break;case"Home":m(F[0]),F[0]?.scrollIntoView({block:"center"}),H=!0;break;case"End":m(F[F.length-1]),F[F.length-1]?.scrollIntoView({block:"center"}),H=!0;break;case"PageUp":m(F[0]),F[0]?.scrollIntoView({block:"center"}),H=!0;break;case"PageDown":m(F[F.length-1]),F[F.length-1]?.scrollIntoView({block:"center"}),H=!0;break;case"Tab":C(!1),F[D]!=null&&i(F[D].getAttribute("data-value"));break}else if(M.length===1&&M!==" "&&!P.altKey&&!P.ctrlKey&&!P.metaKey)C(!0),O(M);else switch(M){case" ":case"Enter":C(!0),H=!0;break;case"ArrowUp":C(!0),m(F[0]),H=!0;break;case"ArrowDown":C(!0),H=!0;break;case"Home":C(!0),m(F[0]),H=!0;break;case"End":C(!0),m(F[F.length-1]),H=!0;break}H&&(P.stopPropagation(),P.preventDefault())},[O,v,i]);return Ue.useEffect(()=>{const P=y.current?.querySelector('[data-select-item][aria-selected="true"]');m(P)},[]),Ue.useEffect(()=>{const P=y.current?.querySelector(`[data-select-item][data-value="${d}"]`);m(P)},[d]),Ue.useEffect(()=>{const P=M=>{v&&T.current!=null&&y.current!=null&&!T.current.contains(M.target)&&!y.current.contains(M.target)&&C(!1)};return v?document.addEventListener("click",P):document.removeEventListener("click",P),()=>{document.removeEventListener("click",P)}},[v]),Ue.useEffect(()=>(v?window.addEventListener("resize",j):window.removeEventListener("resize",j),()=>{window.removeEventListener("resize",j)}),[j,v]),Ue.useEffect(()=>{const P=Xl(T.current);for(const M of P)v?M?.addEventListener("scroll",j,{passive:!0}):M?.removeEventListener("scroll",j);return()=>{for(const M of P)M?.removeEventListener("scroll",j)}},[j,v]),Ue.useEffect(()=>{v?j():b(null)},[j,v]),Ue.useEffect(()=>{v&&f!=null&&f!==h&&r?.({value:h.getAttribute("data-value")})},[v,f,h,r]),Ue.useEffect(()=>{if(g&&!v)o?.();else if(!g&&v&&(a?.(),T.current)){const P=new CustomEvent("comboboxopen",{bubbles:!0,detail:{target:T.current}});T.current.dispatchEvent(P)}},[g,v,o,a]),Ue.useEffect(()=>{const P=M=>{M.detail.target!==T.current&&C(!1)};return document.addEventListener("comboboxopen",P),()=>{document.removeEventListener("comboboxopen",P)}},[]),(0,n.jsx)(tc.Provider,{value:{activeEl:h,htmlIdActiveDescendant:I,htmlIdBase:k,htmlIdContent:N,isExpanded:v,onItemClick:w,onItemHover:A,onTriggerClick:E,onTriggerKeyDown:R,portalArgs:c,refContent:y,refTrigger:L,selectedValue:d,styleContent:x},children:(0,n.jsx)("div",{"aria-owns":N,className:t,inert:s?!0:void 0,ref:T,children:e})})}function OW({children:e,className:t,labelledBy:s,as:o,...r}){const{htmlIdActiveDescendant:a,htmlIdContent:i,isExpanded:c,onTriggerClick:l,onTriggerKeyDown:d,refTrigger:h}=Ue.useContext(tc),m=!!o,f=o??"button";return(0,n.jsxs)(f,{"aria-activedescendant":a,"aria-controls":i,"aria-expanded":c,"aria-haspopup":"listbox","aria-labelledby":s,className:t,"data-select-trigger":m?void 0:"",onClick:l,onKeyDown:d,ref:h,role:"combobox",type:"button",...r,children:[(0,n.jsx)("span",{"data-select-trigger-text":"",children:e}),(0,n.jsx)("span",{"data-select-trigger-icon":"",children:c?(0,n.jsx)(ie,{name:"chevron-up"}):(0,n.jsx)(ie,{name:"chevron-down"})})]})}function BW({children:e,className:t,label:s,labelledBy:o,style:r={}}){const{htmlIdContent:a,isExpanded:i,portalArgs:c,refContent:l,styleContent:d}=Ue.useContext(tc);return In.createPortal((0,n.jsx)("div",{"aria-label":s,"aria-labelledby":o,className:t,"data-select-content":"",hidden:i?void 0:!0,id:a,ref:l,role:"listbox",style:{...d,...r},children:e}),wo(c))}function xfe({children:e,className:t,labelText:s}){const{htmlIdBase:o}=Ue.useContext(tc),r=Ue.useId(),a=`${o}-group-label-${r}`;return RW("div",{"aria-labelledby":a,className:t,"data-select-group":"",role:"group",children:[PW("div",{"data-select-group-label":"",id:a,role:"presentation",children:s}),e]})}function DW({children:e,className:t,labelledBy:s,isDisabled:o,value:r}){const{activeEl:a,htmlIdBase:i,onItemClick:c,onItemHover:l,selectedValue:d}=Ue.useContext(tc),h=Ue.useRef(null),m=Ue.useId(),f=h.current===a,v=r===d,C=`${i}-option-${m}`,g=Ue.useCallback(()=>{l(h.current)},[l]);return(0,n.jsxs)("div",{"aria-disabled":o,"aria-labelledby":s,"aria-selected":v,className:t,"data-select-item":f?"current":"","data-value":r,id:C,onClick:o?void 0:c,onMouseEnter:g,ref:h,role:"option",children:[e,v&&(0,n.jsx)("span",{"data-select-item-selected":"",children:(0,n.jsx)(ie,{name:"check"})})]})}function L3(e){return e!=null&&e.getAttribute("disabled")!=null||e.getAttribute("aria-disabled")==="true"}function FW(e,t){return e?.textContent.toLowerCase().startsWith(t?.toLowerCase())}const gf=$("playback-speed-menu"),HW=({onChange:e,condensed:t=!1,speed:s})=>{const o=Mt(),[r,a]=(0,u.useState)(!1),i=(0,u.useCallback)(()=>a(!0),[]),c=(0,u.useCallback)(()=>a(!1),[]);return(0,n.jsx)(Mo,{elementFocused:r,message:o?.audioPlaySpeed,children:(0,n.jsxs)(MW,{className:gf(),onOpen:c,onSelect:l=>e(parseFloat(l)),portalArgs:{id:"portal",childType:"other"},value:String(s),children:[(0,n.jsxs)(OW,{"aria-label":o?.audioPlaySpeed,as:dn.ArcButton,className:gf("trigger"),hierarchy:"tertiary",labelledBy:void 0,layout:"hug",onBlur:c,onFocus:i,onMouseEnter:i,onMouseLeave:c,shape:"square",size:t?"sm":"md",children:[s,"x"]}),(0,n.jsx)(BW,{className:gf("content"),label:o?.audioPlaySpeed,children:SW.map((l,d)=>(0,n.jsx)(DW,{value:String(l.value??""),children:l.label},d))})]})})};function $W(e=!1,t=200){const s=(0,u.useRef)(void 0),[o,r]=(0,u.useState)(e),a=(0,u.useCallback)(()=>{s.current&&clearTimeout(s.current),r(!0)},[]),i=(0,u.useCallback)(c=>{s.current&&clearTimeout(s.current),c?r(!1):s.current=setTimeout(()=>{r(!1)},t)},[t]);return(0,u.useEffect)(()=>()=>{s.current&&clearTimeout(s.current)},[]),{isActive:o,setActive:a,setInactive:i}}const vf=$("audio-player-volume"),VW=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"];function zW(e,t){return t||e<=0?"volumeXmark":e<=1/3?"volumeLow":e<=2/3?"volume":"volumeHigh"}function UW({condensed:e=!1,muted:t,onChange:s,onMute:o,volume:r}){const a=Mt(),i=(0,u.useRef)(null),c=(0,u.useRef)(null),l=(0,u.useRef)(null),{isActive:d,setActive:h,setInactive:m}=$W(!1,200),f=t?0:r;function v(g){if(VW.includes(g.code)){const T=window.getComputedStyle(g.currentTarget).direction==="rtl"?"ArrowLeft":"ArrowRight",L=g.code==="ArrowUp"||g.code===T?Math.min(f+.05,1):Math.max(f-.05,0);s(L),g.stopPropagation(),g.preventDefault()}else g.code==="KeyM"&&(o(),g.stopPropagation(),g.preventDefault())}(0,u.useEffect)(()=>{l.current.style.setProperty("--slider-volume",`${f*100}%`)},[f]);const C=`${Math.round(f*100)}%`;return(0,n.jsxs)("div",{className:vf(),onKeyDown:v,onMouseEnter:h,onMouseLeave:()=>m(!1),ref:i,children:[(0,n.jsx)("button",{"aria-label":f<=0?a?.a11yMediaUnmute:a?.a11yMediaMute,className:vf("button",{condensed:e}),onClick:o,ref:c,type:"button",children:(0,n.jsx)(ie,{name:zW(f,t)})}),(0,n.jsx)("input",{"aria-label":a?.a11yMediaVolume,"aria-valuemax":100,"aria-valuemin":0,"aria-valuenow":f*100,"aria-valuetext":C,className:vf("slider").mix(d?"":"visually-hidden"),max:100,min:0,onChange:g=>s(g.currentTarget.valueAsNumber/100),ref:l,type:"range",value:f*100})]})}const As=$("audio-player"),wd=({currentTime:e,duration:t})=>Math.round(e/t*100)||0,S3=e=>{if(!e)return{hours:0,minutes:0,seconds:0};const t=Math.floor(e/3600),s=Math.floor(e%3600/60),o=e%60;return{hours:t,minutes:s,seconds:o}},k3=e=>{const{minutes:t,seconds:s}=S3(e);let o="";return t>0&&(o+=`${new Intl.NumberFormat(void 0,{style:"unit",unit:"minute",unitDisplay:"long"}).format(t)} `),o+=new Intl.NumberFormat(void 0,{style:"unit",unit:"second",unitDisplay:"long"}).format(Math.round(s)),o},_W=e=>{const{hours:t,minutes:s,seconds:o}=S3(e);function r(c,l,d){return(new Array(d+1).join(l)+c).slice(-d)}const a=r(s,"0",2),i=r(o,"0",2);return t>0?`${t}:${a}:${i}`:`${s}:${i}`};class Da extends u.Component{audio;play;playerControls;seekSlider;onDelete;constructor(t){super(t),this.state={condensed:!1,currentTime:0,playheadPositionSaveThrottle:0,playbackSpeed:1,playerExpanded:!0,shouldLoadPlayheadPosition:!0,volume:1,muted:!1,maxTime:t.audioVideoPlayhead||0,sliderPercent:0},this.handleChange=this.handleChange.bind(this),this.handleClickInsideAudioPlayer=this.handleClickInsideAudioPlayer.bind(this),this.onPlayClick=this.onPlayClick.bind(this),this.onTogglePlayer=this.onTogglePlayer.bind(this)}static defaultProps={allowTabNavigation:!0,mediaSrc:null,onEnd:()=>{},onLoad:()=>{},onPause:()=>{},onPlay:()=>{},onSeek:()=>{},shouldPause:!1,transcriptMedia:null};static timeMs(t){return Math.round(t*1e3)}keySeek(t){const{canRestrictSeek:s}=this.props,{currentTime:o,duration:r}=this.audio,{maxTime:a}=this.state;let i=o+t;s&&i>a&&(i=a);const c=Math.max(0,r-.01);this.audio.currentTime=t<0?Math.max(i,0):Math.min(i,c)}changeVolume=t=>{this.audio.volume=Math.round(t*100)/100,this.audio.muted=!1};muteToggle=()=>{this.audio.volume<=0?(this.audio.volume=1,this.audio.muted=!1):this.audio.muted=!this.audio.muted};changeVolumeDelta=t=>{const s=t<0?Math.max(this.audio.volume+t,0):Math.min(this.audio.volume+t,1);this.changeVolume(s)};componentDidMount(){Ce.addChangeListener(this.handleChange)}componentDidUpdate(t,s){const r=this.props.activeIndex!=null&&this.props.itemIndex!=null&&t.activeIndex!==this.props.activeIndex&&this.props.activeIndex!==this.props.itemIndex;(!t.shouldPause&&this.props.shouldPause||r)&&(this.audio.pause(),Ce.isPlaying&&Ce.playerId===this.props.id&&Ce.pause()),s.playbackSpeed!==this.state.playbackSpeed&&(this.audio.playbackRate=this.state.playbackSpeed)}componentWillUnmount(){const{recordMediaPlayheadPosition:t,id:s}=this.props;Ce.playerId===s&&Ce.pause(),Ce.removeChangeListener(this.handleChange),t&&t(wd(this.audio))}handleClickInsideAudioPlayer=t=>{t.stopPropagation(),t.preventDefault()};handleChange(){Ce.playerId===this.props.id?this.audio&&(Ce.isPlaying&&this.audio.paused?this.audio.play():!Ce.isPlaying&&!this.audio.paused&&this.audio.pause(),this.forceUpdate()):Ce.isPlaying&&(this.audio.pause(),this.forceUpdate())}containerResizeRef=t=>{const s=new ResizeObserver(([o])=>{if(!o)return;const r=getComputedStyle(document.documentElement),a=parseFloat(r.fontSize)/10;this.setState({condensed:o.contentRect.width<300*a})});return this.setState({condensed:t.getBoundingClientRect().width<256}),s.observe(t),()=>{s.disconnect()}};render(){const{allowTabNavigation:t,id:s,isEditor:o,isOverlayAudio:r,labels:a,mediaSrc:i,mode:c,onDelete:l,onTranscriptClick:d,onTranscriptClose:h,transcriptMedia:m,item:f,side:v,refs:C,transcriptAudioPlayerIdOpen:g}=this.props,x=Ce.isPlaying&&Ce.playerId===s,{currentTime:b,playerExpanded:T}=this.state,L=this.audio?.duration??0,y=Number.isNaN(L)?0:L,S=Math.round(y-b),k=_W(S),N=k3(S),I=k3(b),w=t?0:-1,A=!o,{a11yGroupAudioPlayer:E,a11yMediaPlay:j,a11yMediaPause:O,a11yMediaSeek:R}=a??{},P=As({overlay:r,collapsed:r&&!T,expanded:!r||T,"volume-slider-below":this.props.volumeSliderPosition==="below"}),M=o||c==="edit"?"Collapse audio player":a?.audioCollapsePlayer,H=o||c==="edit"?"Expand audio player":a?.audioExpandPlayer,F=T?M:H,D=fn({refs:C}),W=g===D?Ym(g):void 0;return(0,n.jsx)("div",{className:As("container"),onClick:this.handleClickInsideAudioPlayer,ref:this.containerResizeRef,children:(0,n.jsxs)("div",{className:P,id:s,children:[A&&(0,n.jsx)("div",{className:As("waveform"),children:r?(0,n.jsx)(Mo,{message:F,children:(0,n.jsx)("button",{"aria-label":F,className:As("waveform-icon"),onClick:this.onTogglePlayer,type:"button",children:(0,n.jsx)(y3,{animating:x})})}):(0,n.jsx)("div",{className:As("waveform-icon",{disabled:!0}),children:(0,n.jsx)(y3,{animating:x})})}),(0,n.jsxs)("div",{"aria-hidden":!t,"aria-label":E,"aria-owns":W,className:As("housing",{"with-border":A}),inert:!this.state.playerExpanded,onKeyDown:this.onKeyDown.bind(this),role:"group",tabIndex:w,children:[(0,n.jsxs)("div",{className:As("play-timer-housing"),children:[(0,n.jsx)(dn.ArcButton,{"aria-label":x?O:j,className:As("play"),hierarchy:"tertiary",icon:(0,n.jsx)(ie,{className:As("icon"),name:x?"pause-solid":"play-solid"}),layout:"icon",onClick:this.onPlayClick,ref:_=>{this.play=_},shape:"square",size:this.state.condensed?"sm":"md",tabIndex:w,type:"button"}),(0,n.jsx)("input",{"aria-label":R,"aria-valuemax":y,"aria-valuemin":0,"aria-valuenow":b,"aria-valuetext":I,className:As("seek-slider"),max:y,min:0,onChange:this.onSeekSliderChange.bind(this),ref:_=>{this.seekSlider=_},step:.01,style:{"--seek-slider-percent":`${this.state.sliderPercent}%`},type:"range",value:b}),(0,n.jsx)("div",{"aria-label":N,className:As("timer").mix(this.state.condensed?"visually-hidden-always":""),role:"timer",children:k})]}),(0,n.jsxs)("div",{className:As("player-controls"),ref:_=>{this.playerControls=_},children:[(0,n.jsx)(HW,{condensed:this.state.condensed,onChange:_=>{this.setState({playbackSpeed:_})},speed:this.state.playbackSpeed}),(0,n.jsx)(UW,{condensed:this.state.condensed,muted:this.state.muted,onChange:this.changeVolume,onMute:this.muteToggle,volume:this.state.volume}),c==="readonly"||o?(0,n.jsx)(yW,{audioPlayerId:D,condensed:this.state.condensed,onDelete:l,onTranscriptClick:d,onTranscriptClose:h,transcriptMedia:m}):(0,n.jsx)(AW,{audioPlayerId:D,condensed:this.state.condensed,item:f,onTranscriptClick:d,onTranscriptClose:h,refs:C,side:v,transcriptMedia:m})]})]}),(0,n.jsx)("audio",{className:As("audio-element"),"data-testid":"audio-player-element",onEnded:this.onEnded.bind(this),onLoadedMetadata:this.onLoadedMetadata.bind(this),onPause:this.onAudioPlayPause,onPlay:this.onAudioPlayPause,onSeeked:this.onSeeked.bind(this),onTimeUpdate:this.onTimeUpdate.bind(this),onVolumeChange:this.onVolumeChangeHandler,ref:_=>{this.audio=_},src:pt(`${i}`)},"audio-"+s)]},`player-${s}`)})}onKeyDown(t){const o=hn(this.onPlayClick),r=hn(()=>this.keySeek(5)),a=hn(()=>this.keySeek(-5)),i=hn(()=>this.changeVolumeDelta(.05)),c=hn(()=>this.changeVolumeDelta(-.05)),l=hn(()=>this.muteToggle()),d=g=>g.target===this.play,h=g=>g.target===this.seekSlider,m=g=>this.playerControls===g.target||this.playerControls.contains(g.target),f=fs()([[ki,o],[Qn,Ro],[Kn,Ro],[gr,Ro],[pr,Ro]]),v=fs()([[ki,o],[OM,r],[BM,a]]),C=fs()([[ki,o],[Qn,r],[Kn,a],[pr,i],[gr,c],[g=>g.code==="KeyM",l]]);fs()([[d,f],[h,v],[m,Ro],[er(),C]])(t)}onPlayClick(t){t.stopPropagation(),t.preventDefault();const{audioVideoPlayhead:s}=this.props,{duration:o,paused:r}=this.audio;r&&s&&this.state.shouldLoadPlayheadPosition&&(this.audio.currentTime=o*s/100||0),r?this.audio.play():this.audio.pause()}onAudioPlayPause=t=>{const{id:s,onPause:o,onPlay:r,onTranscriptUpdate:a,recordMediaPlayheadPosition:i,refs:c,transcriptMedia:l}=this.props,{paused:d,currentTime:h,duration:m}=t.currentTarget;if(d)d&&Ce.playerId===s&&(Ce.isPlaying=!1,o(Da.timeMs(h)),i&&i(wd({currentTime:h,duration:m})));else{Ce.playerId=s,Ce.isPlaying=!0,r(Da.timeMs(h));const f=fn({refs:c});a?.({audioPlayerId:f,transcriptMedia:l})}this.setState({shouldLoadPlayheadPosition:!1})};onVolumeChangeHandler=t=>{const{volume:s,muted:o}=t.currentTarget;this.setState({volume:s,muted:o})};onSeekSliderChange(t){const{canRestrictSeek:s}=this.props,{maxTime:o}=this.state;let r=t.currentTarget.valueAsNumber;s&&r>o&&(r=o),this.audio.currentTime=r}onLoadedMetadata(t){const{currentTime:s,duration:o,muted:r,volume:a}=t.currentTarget,i=s/o*100;this.setState({currentTime:s,muted:r,volume:a,sliderPercent:i});const{onLoad:c}=this.props;c()}onEnded(t){const s=t.currentTarget;this.audio.currentTime=0,this.setState({currentTime:s.currentTime}),Ce.isPlaying=!1,this.props.onEnd(Da.timeMs(s.currentTime)),this.forceUpdate()}onSeeked(t){const{id:s,onSeek:o,recordMediaPlayheadPosition:r}=this.props,{currentTime:a,duration:i}=t.currentTarget;Ce.isPlaying&&Ce.playerId!==s&&(Ce.isPlaying=!1),Ce.playerId=s,o(Da.timeMs(a)),r&&r(wd({currentTime:a,duration:i}))}onTimeUpdate(t){const s=t.currentTarget,{recordMediaPlayheadPosition:o}=this.props,{currentTime:r,duration:a}=s,i=Math.floor(r);r>this.state.maxTime&&this.setState({maxTime:r});const c=r/a*100;_p(),this.setState({currentTime:r,sliderPercent:c}),i%5===0&&this.state.playheadPositionSaveThrottle!==i&&o&&(o(wd(s)),this.setState({playheadPositionSaveThrottle:i}))}onTogglePlayer(t){this.setState(({playerExpanded:s})=>({playerExpanded:!s})),t.preventDefault(),t.stopPropagation()}}const GW=Da,ro=e=>t=>t!=null&&typeof t=="object"&&"status"in t&&typeof t.status=="string"&&e.includes(t.status),WW=ro(["uploading","processing","cropping","crushing"]),yfe=ro(["canceled"]),N3=ro(["complete"]),KW=ro(["cropping"]),QW=ro(["crushing"]),YW=ro(["uploading"]),ZW=ro(["processing"]),XW=ro(["errored"]),I3=ro(["cropping","crushing","errored","processing","uploading"]);function qW(e){return e==null||typeof e!="object"?0:Object.values(e).filter(WW).length}function Tfe(e){return Math.round(e.loaded*100/e.total)}const Lfe=e=>e?.file?.name||e?.opts?.filename||"";function Sfe(e){return e==null||typeof e!="object"?!1:Object.keys(e).length>0&&qW(e)>0}const Ad=e=>X()("upload-progress__wrapper",e),E3=(0,u.createContext)(null);function j3(){return(0,u.useContext)(E3)}const kfe=E3.Provider;function JW(e){function t(s){const o=j3();return o?(0,n.jsx)(e,{...s,getUpload:o.getUpload,handleUploadDismiss:o.handleUploadDismiss}):(0,n.jsx)(e,{...s})}return t.displayName=`withUploadStatusContext(${e.displayName||e.name})`,t}const Rd=({onClick:e,text:t})=>(0,n.jsxs)("button",{className:"upload-action-button",onClick:e,type:"button",children:[t,(0,n.jsx)("span",{className:"visually-hidden-always",children:" upload"})]}),Cf=20,sc=Cf/2,xf=sc-2,w3=+(2*Math.PI*xf).toFixed(3),eK=e=>w3*(100-e)/100;function A3({classes:e,percent:t}){return(0,n.jsxs)("svg",{className:X()("upload-progress__pie",e),focusable:"false",height:`${Cf}px`,width:`${Cf}px`,children:[(0,n.jsx)("circle",{className:"upload-progress__border",cx:sc,cy:sc,r:xf}),(0,n.jsx)("circle",{className:"upload-progress__progress",cx:sc,cy:sc,r:xf,strokeDasharray:w3,strokeDashoffset:eK(t)})]})}const tK=({text:e})=>(0,n.jsxs)("div",{className:"upload-progress",children:[(0,n.jsx)(A3,{classes:"upload-progress__pie--processing",percent:70}),(0,n.jsx)("div",{className:"upload-progress__text",children:e})]}),sK=({percentage:e,text:t="Uploading\u2026"})=>(0,n.jsxs)("div",{className:"upload-progress",children:[(0,n.jsx)(A3,{percent:e}),(0,n.jsx)("div",{className:"upload-progress__text",children:t})]}),bf=({classes:e,jobId:t,onCancel:s,text:o})=>(0,n.jsxs)("div",{className:Ad(e),children:[(0,n.jsx)(tK,{text:o}),t&&(0,n.jsx)(Rd,{onClick:s,text:"Cancel"})]}),nK=({classes:e,onCancel:t,percentage:s,text:o})=>(0,n.jsxs)("div",{className:Ad(e),children:[(0,n.jsx)(sK,{percentage:s,text:o}),(0,n.jsx)(Rd,{onClick:t,text:"Cancel"})]}),oK=({message:e="Error"})=>(0,n.jsxs)("div",{className:"upload-error",children:[(0,n.jsx)(ie,{name:"circle-exclamation"}),(0,n.jsx)("div",{className:"upload-error__text",children:e})]}),rK=({classes:e,message:t,onClick:s})=>(0,n.jsxs)("div",{className:Ad(e),children:[(0,n.jsx)(oK,{message:t}),(0,n.jsx)(Rd,{onClick:s,text:"Dismiss"})]}),aK=({message:e="Success"})=>(0,n.jsxs)("div",{className:"upload-success",children:[(0,n.jsx)(ie,{name:"check-regular"}),(0,n.jsx)("div",{className:"upload-success__text",children:e})]}),iK=({classes:e,message:t,onClick:s})=>(0,n.jsxs)("div",{className:Ad(e),children:[(0,n.jsx)(aK,{message:t}),s?(0,n.jsx)(Rd,{onClick:s,text:"Dismiss"}):null]}),cK=e=>{const{classes:t,data:s={},errorMessage:o,jobId:r,progress:a,onCancelUpload:i,onCancelProcess:c,onErrorDismiss:l,onSuccessDismiss:d,successMessage:h,uploadType:m}=e;return XW(e)?(0,n.jsx)(rK,{classes:t,message:o||s?.message,onClick:l}):YW(e)?(0,n.jsx)(nK,{classes:t,onCancel:i,percentage:a,text:`Uploading ${m}\u2026`}):ZW(e)?(0,n.jsx)(bf,{classes:t,jobId:r,onCancel:c,text:`Processing ${m}\u2026`}):QW(e)?(0,n.jsx)(bf,{classes:t,onCancel:c,text:`Uploading ${m}\u2026`}):KW(e)?(0,n.jsx)(bf,{classes:t,onCancel:c,text:"Cropping image\u2026"}):N3(e)&&h?(0,n.jsx)(iK,{classes:t,message:h,onClick:d}):(0,n.jsx)("div",{})},yf=$("audio-player"),lK=yf("upload-state");function R3({uploadId:e,onAIUploadFinish:t,volumeSliderPosition:s,...o}){const r=j3(),{mode:a}=hd(),i=Zi(),c=r&&e?r.getUpload(e):null,l=(0,u.useMemo)(()=>c&&c.mediaType==="audio"&&I3(c),[c]),d=(0,Me.A)(l);if((0,u.useEffect)(()=>{!l&&d&&t?.()},[l,d,t]),l){const{jobId:h,status:m,progress:f,data:v}=c,C=x=>()=>r?.handleUploadDismiss(x,c),g=yf({overlay:o.isOverlayAudio,static:o.isOverlayAudio});return(0,n.jsx)("div",{className:yf("container"),children:(0,n.jsx)("div",{className:g,children:(0,n.jsx)(cK,{classes:lK,errorMessage:v?.message,jobId:h,onCancelProcess:C("process"),onCancelUpload:C("upload"),onErrorDismiss:C("error"),progress:f,status:m,successMessage:"Processing\u2026",uploadType:"audio"})})})}return(0,n.jsx)(GW,{...o,mode:a,transcriptAudioPlayerIdOpen:i?.audioPlayerIdOpen??null,volumeSliderPosition:s})}var dK=p(88868),uK=p.n(dK),hK=p(56248),mK=p.n(hK);const fK={course:({courseId:e})=>`/authoring/${e}`,courseLocales:({courseId:e})=>`/manage/locales/${e}`,dashboard:"/manage/all-content",lesson:({courseId:e,lessonId:t})=>`/authoring/${e}/lesson/${t}`};function pK(){const t=De()?.id,s=Sh();return(0,u.useCallback)(o=>s&&t!=null?fK.lesson({courseId:t,lessonId:o}):Ns(o),[t,s])}var gK=p(86309),vK=p(73426),CK=p.n(vK);const xK=/(\.\.\/)|(\.\.\.\.\/)+|%2e%2e\/|%252e%252e\/|%2f\/|\/%2e%2e/gi,bK=e=>typeof e=="string"&&e.replace(xK,""),bs=CK()(bK,gK.J),yK="about:blank",TK=e=>{const t=e?.trim();if(!t)return null;const s=bs(t);return s===yK?null:/^(https?:\/\/|mailto:)/i.test(s)||/^(\.?\/|[#?])/.test(s)?s:`http://${s.replace(/^\/\//,"")}`},Fa=u.memo(({align:e,alt:t,allowTabNavigation:s=!0,cornerRadius:o,disableZoom:r,getLessonPath:a,height:i,l10nId:c,labels:l,link:d,maxHeight:h=380,onLoad:m,shouldFillWidth:f,src:v,width:C})=>{const g=pK(),x=a??g,b=bo(t),T=d?.type==="url"&&d.destination?TK(d.destination):null,L=d?.type==="block"?dU(d.destination):null,y=d?.type==="lesson"&&!!d.destination||L!=null||!!T,S=s&&!r&&!y,k=X()("img-img",{"img-img--left":e==="left","img-img--right":e==="right","img-img--center":!e||e==="center","img-img--fill":f});let N={};o!=null&&(N["--corner-radius"]=`${Number(o)}px`),C>0&&i>0&&i>h?(C=Math.round(C*h/i),i=h):h&&(!C||!i)&&(N={maxHeight:h});let I=(0,n.jsx)(xs,{alt:b,className:k,"data-l10n-id":c,height:i,onLoad:m,src:v,style:N,width:C});return y&&d?d.type==="lesson"?I=(0,n.jsx)(as,{className:"img__link",to:x(d.destination),children:I}):d.type==="block"&&L?I=(0,n.jsx)(as,{className:"img__link",to:`${x(L.lessonId)}?blockId=${L.blockId}`,children:I}):T&&(I=(0,n.jsx)("a",{className:"img__link",href:T,rel:"noopener noreferrer nofollow",target:"_blank",children:I})):S&&(I=(0,n.jsx)(g3,{a11yNameButtonUnzoom:l?.a11yUnzoomImage,a11yNameButtonZoom:l?.a11yZoomImage,children:I})),(0,n.jsx)("div",{className:"img",children:I})});var Pfe=p(81651),LK=p(7776),SK=p.n(LK);const kK=/^(\d{1,3})\.(\d{1,3})\.(\d{1,3})\.(\d{1,3})$/,NK=/\.[a-z]{2,}\.?$/i,IK=(e,t)=>e===0||e===10||e===127||e===100&&t>=64&&t<=127||e===169&&t===254||e===172&&t>=16&&t<=31||e===192&&t===168||e>=224,EK=e=>Tf(e);function Mfe(e){try{if(EK(e))return new URL(e);throw new Error("invalid URL")}catch{return}}const Tf=e=>{if(typeof e!="string")return!1;let t;try{t=e.startsWith("//")?new URL(e,"https://placeholder.invalid"):new URL(e)}catch{return!1}if(t.protocol!=="http:"&&t.protocol!=="https:")return!1;const{hostname:s}=t;if(!s)return!1;const o=kK.exec(s);return o?!IK(Number(o[1]),Number(o[2])):NK.test(s)},jK=/^<iframe\b[^>]*\ssrc="([^"]+)"[^>]*><\/iframe>$/,wK=e=>{if(typeof e!="string")return!1;const t=jK.exec(e);return t?Tf(t[1]):!1};var AK,RK,PK,MK,OK;const P3=ts()("type","embed"),BK=SK()("type","embedType"),DK=_r()(/http:/i,"https:"),FK=e=>({embedType:"iframe",originalUrl:e,src:e}),HK=e=>Er(e.embed),Er=e=>e?.embedType||e?.type,Ofe=e=>PK([[MK,AK(P3,FK,DK)],[OK,RK(P3,BK,e)]]),Bfe=xo()(Pe()(wK,Vp),Tf),Dfe="We are unable to generate an embed for this URL. Please check that the URL is valid and the content is publicly accessible.";var jr=p(82920);const M3=e=>{const t=Ie("CDN_USER_CONTENT_URI"),s=new RegExp(Ie("CDN_URI"),"g");return Ja()?e:s.test(e)?`${t}${new URL(e).pathname}${new URL(e).search}`:e},$K=e=>{const t=new window.URL("https:"+e);return t.searchParams.set("src",t.searchParams.get("src")+"&disable-auto-focus=true"),t.toString().replace("https:","")},VK=/^\/\/cdn.embedly.+src=.*\.typeform\.com%2F/,zK=e=>VK.test(e),UK=/^\/\//,O3=e=>e?.replace(UK,"https://"),Pd=e=>{try{if(e===!1)return e;const t=new URL(O3(e));if(t.host==="cdn.embedly.com"&&t.pathname==="/widgets/media.html"){const s=new URL("https://embed.articulateusercontent.com/media/");return s.search=t.search,s.searchParams.set("v","1"),s.href}return t.href}catch(t){const s=new Error("Could not parse embed url",{cause:t});return console.warn(s),e}},_K=Pe()(Pd,O3,po()(zK,$K),po()(Boolean,pt),bs),GK=e=>{const{paddingBottom:t,ref:s,value:o}=e;return(0,n.jsx)("div",{className:"embed--iframe",dangerouslySetInnerHTML:jr.useMemo(()=>({__html:o}),[o]),ref:s,style:{paddingBottom:t}})};class WK extends jr.Component{player;refIframeContainer=jr.createRef();refIframePlayer=jr.createRef();state={duration:0,isReady:!1};static get defaultProps(){return{allowTabNavigation:!0,shouldPause:!1,showMetaData:!0}}componentDidUpdate(t){!t.shouldPause&&this.props.shouldPause&&Ce.isPlaying&&(this.player?.pause(),Ce.isPlaying=!1)}componentWillUnmount(){Er(this.props.data)==="video"&&this.teardownPlayer()}handlePlayerReady=()=>{this.player&&(this.player.on("play",this.handlePlayerPlay),this.player.on("timeupdate",this.handlePlayerUpdate),this.setState({isReady:!0}),Ce.addChangeListener(this.handlePlayerChange))};handlePlayerPlay=()=>{const{id:t}=this.props;Ce.isPlaying&&Ce.playerId!==t&&(Ce.isPlaying=!1),Ce.playerId=t,Ce.isPlaying=!0};handlePlayerUpdate=t=>{this.props.progressChanged?.({done:t.seconds/t.duration*100})};handlePlayerChange=()=>{const{id:t}=this.props;Ce.playerId===t&&(Ce.isPlaying?this.player.play():this.player.pause())};setupPlayer=()=>{this.refIframePlayer.current?.contentWindow!=null&&(this.player!=null&&this.teardownPlayer(),this.player=new(uK()).Player(this.refIframePlayer.current),this.player.on("ready",this.handlePlayerReady))};teardownPlayer=()=>{Ce.isPlaying=!1,Ce.removeChangeListener(this.handlePlayerChange),this.player&&(this.player.off("play"),this.player.off("ready"),this.player.off("timeupdate"),delete this.player)};playerSupportsMethods=t=>{const s=o=>this.player.supports("method",o);return mK()(s)(t)};togglePlay=()=>{this.playerSupportsMethods(["play","pause"])&&this.player.on("ready",()=>{this.player.getPaused(t=>{t?this.player.play():this.player.pause()})})};keySeek=t=>{this.playerSupportsMethods(["getCurrentTime","setCurrentTime"])&&this.player.on("ready",()=>{this.player.getCurrentTime(s=>{this.player.setCurrentTime(s+t)})})};changeVolume=t=>{this.playerSupportsMethods(["getVolume","setVolume"])&&this.player.getVolume(s=>{this.player.setVolume(s+t)})};onKeyDown=t=>{const r=hn(this.togglePlay),a=hn(()=>this.keySeek(5)),i=hn(()=>this.keySeek(-5)),c=hn(()=>this.changeVolume(10)),l=hn(()=>this.changeVolume(-10));fs()([[Ph,r],[Qn,a],[Kn,i],[pr,c],[gr,l]])(t)};renderProvider=()=>{const{allowTabNavigation:t,embedId:s,externalLinksDisabled:o,onLinkBlur:r,onLinkFocus:a,onLinkMouseEnter:i,onLinkMouseLeave:c,showMetaData:l,data:d}=this.props,{providerUrl:h,provider:m,favicon:f}=d;if(!(l&&h))return null;const v=Pd(bs(h)),C=o&&Vs(v),g=`${s}-provider`,x=C?"":void 0,b=C?void 0:v,T=C?void 0:"noopener noreferrer",L=C?"button":void 0,y=C?void 0:"_blank";return(0,n.jsx)("h2",{className:"embed__provider",children:(0,n.jsxs)("a",{className:"brand--hoverColor","data-external":x,href:b,id:C?g:void 0,onBlur:C?()=>r?.(g):void 0,onFocus:C?()=>a?.(g):void 0,onMouseEnter:C?()=>i?.(g):void 0,onMouseLeave:C?()=>c?.(g):void 0,rel:T,role:L,style:C?{display:"inline-block"}:void 0,tabIndex:t?0:-1,target:y,children:[(0,n.jsx)(xs,{alt:f?m:"",className:"embed__providerIcon",src:f}),(0,n.jsx)("span",{className:"embed__providerName",children:m})]})})};renderMetaData=()=>{const{allowTabNavigation:t,data:s,embedId:o,externalLinksDisabled:r,labels:a,onLinkBlur:i,onLinkFocus:c,onLinkMouseEnter:l,onLinkMouseLeave:d,showMetaData:h}=this.props,{src:m,title:f,description:v,provider:C}=s,g=Er(s);if(!h&&g!=="link")return null;const x=Pd(bs(m)),b=r&&Vs(x),T=`${o}-metadata-title`,L=`${o}-metadata-readmore`,y=S=>({"data-external":b?"":void 0,href:b?void 0:x,id:b?S:void 0,onBlur:b?()=>i?.(S):void 0,onFocus:b?()=>c?.(S):void 0,onMouseEnter:b?()=>l?.(S):void 0,onMouseLeave:b?()=>d?.(S):void 0,rel:b?void 0:"noopener noreferrer nofollow",role:b?"button":void 0,style:b?{display:"inline-block"}:void 0,tabIndex:t?0:-1,target:b?void 0:"_blank"});return(0,n.jsxs)("div",{className:"embed__meta__content",children:[(0,n.jsx)("h2",{className:"embed__title",children:(0,n.jsx)("a",{className:"brand--hoverColor",...y(T),children:(0,n.jsx)(ke,{value:f})})}),(0,n.jsx)(ke,{className:"embed__description",value:v}),(0,n.jsxs)("a",{className:"embed__readMore brand--hoverColor",...y(L),children:[g==="link"?`${a?.embedReadMore} ${C}`:`${a?.embedViewOn} ${C}`,(0,n.jsx)("i",{className:"icon icon-chevron-right"})]})]})};render(){const{allowTabNavigation:t,data:s,embedId:o,externalLinksDisabled:r,isLesson:a,labels:i,onLinkBlur:c,onLinkFocus:l,onLinkMouseEnter:d,onLinkMouseLeave:h,showMetaData:m}=this.props,{useRelativePath:f}=s??{},{description:v,originalUrl:C,src:g,thumbnail:x,title:b}=s,T=Er(s);if(T==="iframe"){const L=document.createElement("div");L.innerHTML=Vp(g);const y=L.firstChild,S=y&&y.tagName&&y.tagName.toLowerCase()==="iframe";let k=100,N=32;if(this.props.isAuthoring&&f)return(0,n.jsxs)("div",{children:[(0,n.jsx)("h2",{className:"embed__relativeUrl--iframe",children:"Embedded iframe with a relative url"}),(0,n.jsx)("p",{className:"embed__relativeUrl--title",children:b}),(0,n.jsx)("p",{className:"embed__relativeUrl--url",children:C})]});if(S){const j=y.width.match(/%/),O=parseInt(y.width);y.src=bs(y.src),k=j?700*(O/100):O||16,N=parseInt(y.height)}const I=N/k,w=S?`${I*100}%`:"3rem";let A=null;try{A=new URL(y.src)}catch{}if(A){const{hostname:j}=A,O=j==="typeform.com"||j.endsWith(".typeform.com"),R=j==="forms.office.com";O&&(A.searchParams.append("disable-auto-focus","true"),y.src=A.toString()),R&&(A.searchParams.append("embed","true"),y.src=A.toString())}const E=S?y.outerHTML:"<div>Error: Invalid iframe tag. Please check the iframe source.</div>";return(0,n.jsxs)("div",{"aria-hidden":!t,"aria-label":i?.embedPlayerGroup,className:"embed",role:"group",children:[f&&(0,n.jsx)("div",{className:"embed__title embed--iframe__title",children:b}),(0,n.jsx)(GK,{paddingBottom:w,ref:this.refIframeContainer,value:E})]})}else if(a){const L=f?g:Pd(bs(g)),y=r&&Vs(L),S=`${o}-lesson-title`,k=`${o}-lesson-url`,N=y?"":void 0,I=y?void 0:L,w=y?void 0:"noopener noreferrer nofollow",A=y?"button":void 0,E=y?void 0:"_blank";if(f){const j={"data-external":y?"":void 0,href:L,id:y?S:void 0,onBlur:y?()=>c?.(S):void 0,onFocus:y?()=>l?.(S):void 0,onMouseEnter:y?()=>d?.(S):void 0,onMouseLeave:y?()=>h?.(S):void 0,rel:y?void 0:"noopener noreferrer nofollow",role:y?"button":void 0,tabIndex:t?0:-1,target:y?void 0:"_blank"};return(0,n.jsxs)("div",{"aria-hidden":!t,"aria-label":i?.a11yBlockEmbed,className:"embed embed--link embed--rich",role:"group",children:[(0,n.jsx)("h2",{className:"embed__title",children:(0,n.jsx)("a",{className:"brand--hoverColor",...j,children:(0,n.jsx)(ke,{value:b})})}),["link","photo"].includes(T)?(0,n.jsxs)("a",{className:"embed__relativeUrl--url","data-external":N,href:I,id:y?k:void 0,onBlur:y?()=>c?.(k):void 0,onFocus:y?()=>l?.(k):void 0,onMouseEnter:y?()=>d?.(k):void 0,onMouseLeave:y?()=>h?.(k):void 0,rel:w,role:A,tabIndex:t?0:-1,target:E,children:[L,T==="photo"?(0,n.jsx)("div",{className:"embed__relativeUrl--image",children:(0,n.jsx)(xs,{alt:x?b:"",className:"embed__img",src:L})}):null]}):this.renderEmbedIframe({allowTabNavigation:t,labels:i,src:g,thumbnail:x,title:b,type:T})]})}return(0,n.jsxs)("div",{"aria-hidden":!t,"aria-label":i?.a11yBlockEmbed,className:"embed embed--link embed--rich",role:"group",children:[this.renderProvider(),["link","photo"].includes(T)?(0,n.jsx)("a",{"data-external":N,href:I,id:y?k:void 0,onBlur:y?()=>c?.(k):void 0,onFocus:y?()=>l?.(k):void 0,onMouseEnter:y?()=>d?.(k):void 0,onMouseLeave:y?()=>h?.(k):void 0,rel:w,role:A,tabIndex:t?0:-1,target:E,children:(0,n.jsx)(xs,{alt:x?b:"",className:"embed__img",src:M3(x)})}):this.renderEmbedIframe({allowTabNavigation:t,labels:i,src:g,thumbnail:x,title:b,type:T}),this.renderMetaData()]})}else if(T==="link"){const L=f?g:bs(g),y=f||r&&Vs(L),S=`${o}-link-readmore`,k=y?"":void 0,N=y?void 0:L,I=y?void 0:"noopener noreferrer nofollow",w=y?"button":void 0,A=y?void 0:"_blank";return(0,n.jsxs)("div",{"aria-hidden":!t,"aria-label":i?.embedLinkGroup,className:"embed embed--link brand--linkColor",role:"group",children:[(0,n.jsx)(ke,{className:"embed__title",value:b}),(0,n.jsx)(ke,{className:"embed__description",value:v}),(0,n.jsx)("a",{className:"embed__readMore brand--hoverColor","data-external":k,href:N,id:y?S:void 0,onBlur:y?()=>c?.(S):void 0,onFocus:y?()=>l?.(S):void 0,onMouseEnter:y?()=>d?.(S):void 0,onMouseLeave:y?()=>h?.(S):void 0,rel:I,role:w,target:A,children:i?.embedReadMore})]})}else return(0,n.jsxs)("div",{className:"embed embed--media",children:[m?(0,n.jsx)(ke,{"aria-hidden":!t,className:"embed__title",value:b}):null,this.renderEmbedIframe({allowTabNavigation:t,labels:i,src:g,thumbnail:x,title:b,type:T})]})}renderEmbedIframe=t=>{const{allowTabNavigation:s,labels:o,src:r,thumbnail:a,title:i,type:c}=t,{useRelativePath:l}=this.props.data??{};if(c==="photo")return(0,n.jsx)("figure",{className:"embed__media-wrap embed__media-wrap--photo",children:(0,n.jsx)(Fa,{allowTabNavigation:s,labels:o,src:M3(a)})});{const d=Yn.isIe11||Yn.isEdge,h=X()("embed__media-wrap",{"embed__media-wrap--ms_browser":d});return(0,n.jsxs)("figure",{"aria-hidden":!s,"aria-label":o?.embedPlayerGroup,className:h,onKeyDown:this.onKeyDown,ref:this.refIframeContainer,tabIndex:s?0:-1,children:[(0,n.jsx)("meta",{content:"origin",name:"referrer"}),(0,n.jsx)("iframe",{allowFullScreen:!0,className:"embed__media",frameBorder:"0",inert:s?void 0:!0,loading:"lazy",onLoad:this.setupPlayer,ref:this.refIframePlayer,scrolling:l?"yes":"no",src:l?r:_K(r),title:i})]})}}}const B3=e=>{const t=Sh(),s=De(),o=e.externalLinksDisabled??(s&&"externalLinksDisabled"in s?s.externalLinksDisabled:!1),{handleMouseEnter:r,handleMouseLeave:a,handleFocus:i,handleBlur:c}=Il(),[l,d]=jr.useState([]),h=jr.useId();return jr.useEffect(()=>{if(!o||!e.data){d([]);return}const m=[],{providerUrl:f,src:v,useRelativePath:C}=e.data,g=Er(e.data);e.isLesson&&v&&Vs(bs(v))&&(m.push(`${h}-lesson-title`),["link","photo"].includes(g)&&m.push(`${h}-lesson-url`),g!=="iframe"&&(m.push(`${h}-metadata-title`),m.push(`${h}-metadata-readmore`)),f&&Vs(bs(f))&&m.push(`${h}-provider`)),!e.isLesson&&e.showMetaData&&f&&Vs(bs(f))&&m.push(`${h}-provider`),!e.isLesson&&e.showMetaData&&v&&Vs(bs(v))&&g!=="iframe"&&(m.push(`${h}-metadata-title`),m.push(`${h}-metadata-readmore`)),g==="link"&&(C||v&&Vs(bs(v)))&&m.push(`${h}-link-readmore`),d(m)},[o,e.data,e.showMetaData,e.isLesson,h]),(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(WK,{...e,embedId:h,externalLinksDisabled:o,isAuthoring:t,onLinkBlur:c,onLinkFocus:i,onLinkMouseEnter:r,onLinkMouseLeave:a}),l.map(m=>(0,n.jsx)(El,{anchorId:m},m))]})};var KK=p(52974);const Lf=e=>e.toString().padStart(2,"0");function nc(e){const t=Math.floor(e),s=Math.floor(t/3600),o=Math.floor(t%3600/60),r=t%60;return s>0?`${s}:${Lf(o)}:${Lf(r)}`:`${o}:${Lf(r)}`}function Hfe(e=[]){return e.map(({time:t,title:s})=>`${nc(t)} ${s}`).join(`
`)}const QK=e=>{const[t,s,o]=e.split(":").reverse();return parseInt(t,10)+parseInt(s,10)*60+parseInt(o||"0",10)*3600},YK=/^(\d*:)?\d{1,2}:\d{2}$/,$fe=(e,t)=>{const s=e.split(`
`).filter(r=>r.trim()!==""),o=[];for(const r of s){const[a,...i]=r.split(" ");if(!YK.test(a))throw new Error("Chapters must use the format M:SS or H:MM:SS. Chapters will not display.");o.push({time:QK(a),title:i.join(" ")})}if(o.length>0&&o[0].time!==0)throw new Error("Chapters must start at 0:00. Chapters will not display.");for(let r=1;r<o.length;r++)if(o[r].time<=o[r-1].time)throw new Error("Chapters are out of order. Chapters will not display.");if(t!=null){for(const r of o)if(r.time>=t)throw new Error("Timestamps must be within the video duration. Chapters will not display.");for(let r=0;r<o.length;r++)if((r<o.length-1?o[r+1].time:t)-o[r].time<10)throw new Error("Chapters must be at least 10 seconds long. Chapters will not display.")}return o},ZK={hovered:null,setHovered:Kt},Sf=(0,u.createContext)(null);function XK({children:e}){const t=(0,u.useContext)(Sf),[s,o]=(0,u.useState)(null),r=(0,u.useMemo)(()=>({hovered:s,setHovered:o}),[s]);return t!=null?(0,n.jsx)(n.Fragment,{children:e}):(0,n.jsx)(Sf.Provider,{value:r,children:e})}const D3=()=>(0,u.useContext)(Sf)??ZK,qK=.001,kf=(e,t,s)=>e!=null&&e.kind===t&&Math.abs(e.time-s)<qK,F3=$("video-seek-bar-overlay"),Nf=e=>Math.max(0,Math.min(100,e)),H3=e=>{const t=typeof e=="number"?e:Number(e);return Number.isFinite(t)?Math.max(0,t):null},JK=(e,t)=>{if(!Number.isFinite(t)||t<=0)return[];const s=e.map(o=>{const r=H3(o.time);return r==null||r>=t?null:{chapter:o,startTime:r}}).filter(o=>o!=null).sort((o,r)=>o.startTime-r.startTime);return s.map((o,r)=>{const a=s[r+1],i=a!=null?a.startTime:t;return i<=o.startTime?null:{chapter:o.chapter,endTime:i,leftPercent:Nf(o.startTime/t*100),startTime:o.startTime,widthPercent:Nf((i-o.startTime)/t*100)}}).filter(o=>o!=null)},eQ=(e,t)=>{if(!Number.isFinite(t)||t<=0)return[];const s=new Set;return e.forEach(o=>{const r=H3(o);r==null||r>=t||s.add(r)}),[...s].sort((o,r)=>o-r).map(o=>({leftPercent:Nf(o/t*100),time:o}))};function tQ({chapters:e,checkpointTimesSeconds:t,durationSeconds:s,onSeekToTime:o}){const r=Mt(),a=u.useMemo(()=>JK(e,s),[e,s]),i=u.useMemo(()=>eQ(t,s),[t,s]),{hovered:c,setHovered:l}=D3(),d=r?.videoCheckpointDefaultTitle||"Checkpoint",h=u.useMemo(()=>{const m=a.filter(v=>v.leftPercent>0).map(v=>({kind:"chapter",element:"chapter",time:v.startTime,leftPercent:v.leftPercent,label:v.chapter.title,key:`chapter-${v.startTime}-${v.chapter.title}`})),f=i.map(v=>({kind:"checkpoint",element:"marker",time:v.time,leftPercent:v.leftPercent,label:`${d} ${nc(v.time)}`,key:`checkpoint-${v.time}`}));return[...m,...f].sort((v,C)=>v.time-C.time||(v.kind===C.kind?0:v.kind==="chapter"?-1:1))},[a,i,d]);return h.length===0?null:(0,n.jsx)("div",{className:F3("markers"),role:"presentation",children:h.map(m=>(0,n.jsx)("button",{"aria-label":m.label,className:F3(m.element,{hovered:kf(c,m.kind,m.time)}),onBlur:()=>l(null),onClick:()=>o?.(m.time),onFocus:()=>l({kind:m.kind,time:m.time}),onPointerEnter:()=>l({kind:m.kind,time:m.time}),onPointerLeave:()=>l(null),style:{left:`${m.leftPercent}%`},type:"button"},m.key))})}const sQ=()=>{const e=Jr();return K0(e)},$3=(e,t)=>e in t?"Articulate":e.length===2?"ISO-639-1":e.length===3?"ISO-639-3":null,nQ=e=>Object.entries(e).reduce((t,[,s])=>(s.ISO639_1&&(t.iso1Map[s.ISO639_1]=t.iso1Map[s.ISO639_1]||[],t.iso1Map[s.ISO639_1].push(s)),s.ISO639_3&&(t.iso3Map[s.ISO639_3]=t.iso3Map[s.ISO639_3]||[],t.iso3Map[s.ISO639_3].push(s)),t),{iso1Map:{},iso3Map:{}}),oQ=(e,t,s)=>{let o=e,r="",a=s??$3(e,t);return!a&&e.includes("-")&&([o,r]=e.split("-"),a=$3(o,t),a&&(e=o)),{languageCode:o,code:e,regionCode:r,standard:a??"Articulate"}},oc=(e,t,s={})=>{const{code:o,standard:r}=oQ(e.toLowerCase(),t,s.standard),{location:a,script:i,variant:c}=s;if(r!=="Articulate"){const{iso1Map:l,iso3Map:d}=nQ(t),h=r==="ISO-639-1"?l[o]??null:d[o]??null;return h?h.length===1?h[0]:h.find(m=>{const f=c&&"variant"in m&&m.variant?m.variant.toLocaleLowerCase()===c.toLocaleLowerCase():!1,v=a&&"location"in m&&m.location?m.location.toLocaleLowerCase()===a.toLocaleLowerCase():!1,C=i&&"script"in m&&m.script?m.script.toLocaleLowerCase()===i.toLocaleLowerCase():!1;return f||v||C})||h[0]||null:null}return t[o]??null},Vfe=(e,t,s={})=>oc(e,t,{standard:"Articulate",...s})?.ISO639_1||null,zfe=(e,t,s={})=>oc(e,t,{standard:"Articulate",...s})?.ISO639_3||null,Ufe=(e,t,s={})=>oc(e,t,{standard:"ISO-639-1",...s})?.code||null,_fe=(e,t,s={})=>oc(e,t,{standard:"ISO-639-3",...s})?.code||null,V3=e=>!!(e&&"video"in e&&e.video&&"key"in e.video&&e.video.key),z3=e=>!!(e&&"customVideo"in e&&e.customVideo&&"src"in e.customVideo&&e.customVideo.src),U3=e=>!!(e&&"customVideo"in e&&e.customVideo&&"key"in e.customVideo&&e.customVideo.key),rQ=(e,t)=>{const s=V3(e)&&V3(t)&&e.video.key===t.video.key,o=z3(e)&&z3(t)&&e.customVideo.src===t.customVideo.src,r=U3(e)&&U3(t)&&e.customVideo.key===t.customVideo.key;return s||o||r},aQ=e=>!!(e&&"video"in e&&e.video&&"captions"in e.video&&e.video.captions?.length),iQ=e=>{const t=nn(),{currentLocale:s}=it(),o=Ae(e,t),r=Ae(e,s),a=sQ();return(0,u.useMemo)(()=>{if(!!(s&&s!==t)&&a&&rQ(o,r)&&aQ(r))return r.video.captions.find(l=>oc(l.code,a)?.code===s)?.id},[t,s,o,r,a])},cQ=2,lQ=1,dQ=()=>({previousTime:0,triggeredTimes:new Set}),uQ=(e,t,s)=>{const{previousTime:o}=s;t>o+cQ&&e.filter(a=>a<=t).forEach(a=>s.triggeredTimes.add(a)),t<o-lQ&&(s.triggeredTimes=new Set(e.filter(a=>a<=t))),s.previousTime=t;const r=e.find(a=>t>=a&&!s.triggeredTimes.has(a));return r==null?null:(s.triggeredTimes.add(r),r)};function hQ({checkpointTimesSeconds:e,isLoaded:t,getMediaElement:s,onCheckpointReached:o}){const r=(0,u.useRef)(o);r.current=o;const a=(0,u.useMemo)(()=>Array.from(new Set(e)).sort((i,c)=>i-c),[e]);(0,u.useEffect)(()=>{if(!t||a.length===0)return;const i=s();if(i==null)return;const c=dQ();c.previousTime=i.currentTime,a.filter(f=>f<=i.currentTime).forEach(f=>c.triggeredTimes.add(f));let l=0;const d=()=>{const f=uQ(a,i.currentTime,c);f!=null&&r.current?.(f),l=requestAnimationFrame(d)},h=()=>{l===0&&(l=requestAnimationFrame(d))},m=()=>{l!==0&&(cancelAnimationFrame(l),l=0)};return i.addEventListener("play",h),i.addEventListener("playing",h),i.addEventListener("pause",m),i.addEventListener("ended",m),i.paused||h(),()=>{m(),i.removeEventListener("play",h),i.removeEventListener("playing",h),i.removeEventListener("pause",m),i.removeEventListener("ended",m)}},[s,t,a])}function _3(e){return Number.isFinite(e)&&e>0?e:0}function If({allowTabNavigation:e=!0,audioVideoPlayhead:t,canAdjustPlaybackSpeed:s,canRestrictSeek:o,captions:r,chapters:a=[],checkpointTimesSeconds:i=[],cornerRadius:c,id:l,media:d,onCheckpointReached:h,onLoad:m,poster:f,progressChanged:v,recordMediaPlayheadPosition:C,ref:g,shouldPause:x,src:b,style:T,subtitle:L,type:y}){const S=u.useRef(null),[k,N]=u.useState(0),I=u.useCallback(ee=>{S.current=ee,typeof g=="function"?g(ee):g&&(g.current=ee)},[g]),w=(0,Me.A)(x),A=Sh(),E=Mt(),j=Rh(),O=iQ(d),R=y==="customVideo",P=u.useCallback(()=>S.current?.containerElement?.querySelector("video")??null,[]),M=u.useCallback(ee=>{S.current?.seekToTime(ee)},[]),H=u.useCallback(ee=>{_p(),N(_3(ee.duration)),v?.(ee)},[v]),F=u.useCallback(ee=>{C?.(ee)},[C]),D=u.useCallback(()=>{Ce.playerId=l,Ce.isPlaying=!0},[l]),V=u.useCallback(()=>{Ce.playerId===l&&(Ce.isPlaying=!1)},[l]),[W,_]=u.useState(!1),Z=u.useRef(!1),oe=u.useCallback(()=>{_(!0);const ee=S.current;if(ee){const{duration:se}=ee.getProgress();N(_3(se)),m?.({player:ee})}},[m]);hQ({checkpointTimesSeconds:i,isLoaded:W,getMediaElement:P,onCheckpointReached:h}),u.useEffect(()=>{Z.current||W&&(t!=null&&t>0&&S.current?.seekToPercent(t),Z.current=!0)},[W,t]),u.useEffect(()=>{!w&&x&&S.current?.pause()},[w,x]),u.useEffect(()=>{const ee=()=>{(!Ce.isPlaying||Ce.playerId!==l)&&S.current?.pause()};return Ce.addChangeListener(ee),()=>{Ce.removeChangeListener(ee)}},[l]);const Q=u.useMemo(()=>{const ee=typeof c=="number"||typeof c=="string"?{"--ov-corner-radius":`${Number(c)}px`}:void 0;if(!(ee==null&&T==null))return{...ee,...T}},[c,T]),U=f==null?void 0:R?f:pt(f),B=W&&k>0&&(a.length>0||i.length>0),z=`${R?b:pt(b)}?v=1`,K=R?"application/x-mpegURL":void 0,Y=u.useMemo(()=>[{src:z,type:K??"video/mp4"}],[z,K]),J=u.useMemo(()=>{const ee=[];if(r==null&&L&&ee.push({kind:"captions",label:"English",src:R?L:pt(L),srcLang:"en"}),r!=null)for(const se of r){const te=se.url||(se.key!=null?pt(se.key):void 0);te&&ee.push({default:se.id===O?!0:void 0,kind:"captions",label:se.name||j?.(se.code)||se.code,src:te,srcLang:se.code})}return ee},[r,L,R,j,O]);return(0,n.jsx)(KK.L,{crossOrigin:Yn.isLocalFilesystem?void 0:"anonymous",enableDownload:A,enablePlaybackSpeed:s??void 0,enableSeek:o==null?void 0:!o,inert:!e,labelBackToMoreOptions:E?.a11yMediaMoreOptionsBack,labelCaptions:E?.a11yMediaCaptions,labelCaptionsOff:E?.a11yMediaCaptionsOff,labelContainer:E?.a11yGroupVideoPlayer??"Video player",labelCurrentTime:E?.a11yMediaCurrentTime,labelDownload:E?.a11yMediaDownload,labelDuration:E?.a11yMediaDuration,labelError:E?.a11yMediaErrorVideo,labelExitFullscreen:E?.a11yMediaExitFullscreen,labelExitPictureInPicture:E?.a11yMediaExitPictureInPicture,labelFullscreen:E?.a11yMediaFullscreen,labelMoreOptions:E?.a11yMediaMoreOptions,labelMute:E?.a11yMediaMute,labelPause:E?.a11yMediaPause,labelPictureInPicture:E?.a11yMediaPictureInPicture,labelPlay:E?.a11yMediaPlay,labelPlaybackRate:E?.a11yMediaPlaybackRate,labelPlaybackRateNormal:E?.a11yMediaPlaybackRateNormal,labelPlayVideo:E?.a11yMediaPlayVideo,labelReplay:E?.a11yMediaReplay,labelSeek:E?.a11yMediaSeek,labelSeekDisabled:E?.a11yMediaSeekDisabled,labelUnmute:E?.a11yMediaUnmute,labelVolume:E?.a11yMediaVolume,onPause:V,onPlay:D,onPlayheadSave:F,onReady:oe,onTimeUpdate:H,poster:U,ref:I,seekOverlay:B?(0,n.jsx)(tQ,{chapters:a,checkpointTimesSeconds:i,durationSeconds:k,onSeekToTime:M}):null,sources:Y,style:Q,timeUpdateInterval:1e3,tracks:J})}var mQ=p(82920);function Ze(e){const t=mQ.forwardRef((s,o)=>{const r=Ot();return(0,n.jsx)(e,{...s,getL10nValue:r,ref:o})});return t.displayName=`withLocalizedLookup(${e.displayName||e.name})`,t}var fQ=p(65307),G3=p.n(fQ),pQ=p(54318),gQ=p.n(pQ);const vQ=e=>({...e,courseId:e.courseId||$n()(["course","id"],e)}),CQ=e=>({...e,lessonId:e.lessonId||$n()(["lesson","id"],e)}),xQ=({id:e,courseId:t,lessonId:s,refs:o})=>e||(o&&s?`${s}-${o}`:s||t),Ef=Pe()(xQ,CQ,vQ),Gfe=Nt()(oi()(Ye()("id"),G3()("id",Ef)),xo()(gQ()(Ye(),[Ye()("id"),Ye()("uploads")]),go()(["id"])),G3()("isUploading",Xe()("status","uploading")));function Wfe(e){const t=e.match(/^(.*\/)?([^/]+)$/);if(!t)return encodeURIComponent(e);const s=t[1]??"",o=t[2],r=encodeURIComponent(o);return`${s}${r}`}function bQ(e){return e.replace(/%2F/g,"/")}var yQ=p(82920);const jf=e=>!!(e&&("key"in e&&e.key||"src"in e&&e.src)),Md=e=>jf(e)&&!e.isProcessing&&!e.error,TQ=(e,t)=>t?.mediaType==="audio"?!!e&&(jf(e)||I3(t)||N3(t)&&!jf(e)):Md(e),LQ=e=>po()(Re()(!!e),pW()(`-${e}`));class SQ extends yQ.Component{constructor(t){super(t),this.onTranscriptClick=this.onTranscriptClick.bind(this)}static get defaultProps(){return{defaultAlign:"left",media:{},index:"1",hasPadding:!0,opts:{},allowTabNavigation:!0,lessonNumber:1,getL10nValue:()=>{}}}onTranscriptClick(){const{block:t,blockId:s,openTranscript:o,refs:r}=this.props,a=t?.items?.length===1?t.items[0]:void 0,i=this.props.item??a;let c=s;try{t!=null&&typeof t=="object"&&!Array.isArray(t)?"blockId"in t?c=t.blockId:"id"in t&&(c=t.id):t?.id&&(c=t.id)}catch{c=s}let l="";try{i!=null&&typeof i=="object"&&!Array.isArray(i)&&"id"in i&&(l=String(i.id))}catch{l=""}const d=r??`items:${c||""}/items:${l}`;if((t||s)&&i&&o)return o({blockId:t?.id??s,item:i,refs:d})}renderAudio(t,s){const{activeIndex:o,allowTabNavigation:r,block:a,blockId:i,getL10nValue:c,index:l,isOverlayAudio:d,item:h,itemIndex:m,labels:f,lessonNumber:v,shouldPause:C,side:g}=this.props,{audio:x}=c(t),b=a&&typeof a=="object"&&"blockId"in a?a.blockId:a?.id||i||"",T=h&&typeof h=="object"&&"id"in h?h.id:"",L=this.props.refs??`items:${b}/items:${T}`,y=`audio-${v}-${l}`;return(0,n.jsx)(R3,{activeIndex:o,allowTabNavigation:r,id:y,isOverlayAudio:d,item:h,itemIndex:m,labels:f,mediaSrc:x.key,onTranscriptClick:this.onTranscriptClick,onTranscriptClose:this.props.closeTranscript??void 0,onTranscriptUpdate:this.props.onTranscriptUpdate,refs:L,shouldPause:x.pause||C,side:g,transcriptMedia:t,uploadId:s,volumeSliderPosition:this.props.volumeSliderPosition},y)}renderImage(t){const{allowTabNavigation:s,cornerRadius:o,defaultAlign:r,imageMaxHeight:a,index:i,labels:c,onLoad:l,opts:d}=this.props,h=t?.align??r,m=t?.dimensions,f=`image-${i}`,{disableZoom:v}=d??{};return(0,n.jsx)(Fa,{align:h,allowTabNavigation:s,alt:t?.alt,cornerRadius:o,disableZoom:v,height:m?.height||m?.originalHeight,labels:c,link:t?.link,maxHeight:a,onLoad:l,shouldFillWidth:t?.fillWidth,src:dt(t),width:m?.width||m?.originalWidth},f)}renderVideo(t,s){const{allowTabNavigation:o,blockId:r,lessonNumber:a,index:i,enableVideoPlaybackSpeed:c,shouldPause:l}=this.props,d=t.skipProcess?bQ(t.poster):t.poster,h=LQ(r)(`video-${a}-${i}-${d||""}`);return(0,n.jsx)(If,{allowTabNavigation:o,canAdjustPlaybackSpeed:c,captions:t.captions,id:h,media:s,poster:d,shouldPause:t.pause||l,src:t.key},h)}renderEmbed(t){const{allowTabNavigation:s,embedClass:o,labels:r,opts:a,shouldPause:i}=this.props,{fullEmbed:c,showMetaData:l=!0}=a,d=`embed-${this.props.index}`;return(0,n.jsx)("div",{className:o,children:(0,n.jsx)(B3,{allowTabNavigation:s,data:t,id:d,isLesson:c,labels:r,shouldPause:t.pause||i,showMetaData:l},d)})}render(){const{blockId:t,hasPadding:s,item:o,lessonId:r,mediaType:a}=this.props,i=o&&typeof o=="object"&&"id"in o?o.id:"",c=this.props.refs??`items:${t??""}/items:${i}`,l=this.props.media,d=X()({"media-group":s}),{audio:h,embed:m,image:f,video:v}=this.props.getL10nValue(l)??{},C=Ef({lessonId:r,refs:c}),g=this.props.getUpload?this.props.getUpload(C):null;return(0,n.jsxs)("div",{className:d,"data-l10n-id":Pt(l),children:[(!a||a==="image")&&Md(f)&&this.renderImage(f),(!a||a==="audio")&&TQ(h,g)&&this.renderAudio(l,C),(!a||a==="video")&&Md(v)&&this.renderVideo(v,l),(!a||a==="embed")&&Md(m)&&this.renderEmbed(m)]})}}const Xt=JW(Cl(Tb(Ze(SQ))));function pn(e,t,s,o){const a=t==="bottom"||!s&&t!=="top"?"bottom":"top",i={renderOrder:["text"],isOverlayAudio:!1};if(!e)return i;const c=!!e.audio,l=!!e.image,d=!!e.video,h=!!e.embed,m=l||d,f=()=>{const g=l?"image":"video",x={top:c?["audio","text",g]:["text",g],bottom:c?["text","audio",g]:["text",g],legacyTop:c?["audio",g,"text"]:[g,"text"],legacyBottom:c?[g,"text","audio"]:[g,"text"]};return s&&o==="timeline"&&!t?x.top:s&&o!=="timeline"?a==="bottom"?x.legacyBottom:x.legacyTop:a==="bottom"?x.bottom:x.top},v=()=>{const g={top:c?["audio","text","embed"]:["text","embed"],bottom:c?["text","embed","audio"]:["text","embed"],legacyTop:c?["audio","embed","text"]:["embed","text"],legacyBottom:c?["embed","text","audio"]:["embed","text"]};return s&&o==="timeline"&&!t?g.legacyTop:s&&o!=="timeline"?a==="bottom"?g.legacyBottom:g.legacyTop:a==="bottom"?g.bottom:g.top},C=()=>a==="bottom"?["text","audio"]:["audio","text"];return c&&!m&&!h?{...i,renderOrder:C()}:m&&!c&&!h?{...i,renderOrder:f()}:h&&!c&&!m?{...i,renderOrder:v()}:c&&m&&!h?o==="statement"?{...i,renderOrder:C()}:o==="labeled-graphic"||a==="top"||o==="process"?{...i,renderOrder:f(),audioOnlyMedia:{audio:e.audio},imageOnlyMedia:{image:e.image},videoOnlyMedia:{video:e.video}}:{...i,renderOrder:e.video?["text","video","audio"]:["text","overlay"],audioOnlyMedia:{audio:e.audio},imageOnlyMedia:{image:e.image},videoOnlyMedia:{video:e.video},isOverlayAudio:!e.video}:c&&h&&!m?{...i,renderOrder:v(),audioOnlyMedia:{audio:e.audio},embedOnlyMedia:{embed:e.embed}}:i}var kQ=p(82920);const jn=$("block-text"),NQ=class extends kQ.Component{renderHeadingDelegate;renderTextDelegate;constructor(e){super(e),this.renderTextDelegate=this.renderText.bind(this),this.renderHeadingDelegate=this.renderHeading.bind(this)}static get defaultProps(){return{columns:1,heading:"",items:[],type:"onecol",getL10nValue:()=>{}}}getHeadingComponent=()=>{const{heading:e}=this.props;return e?e==="heading"?"h2":"h3":"div"};renderHeading(e){const t="heading"in e?e.heading:null;return(0,n.jsx)(ke,{value:t})}renderText(e){const{labels:t,takingSnapshot:s,variant:o}=this.props,r=o?.includes("column"),a="paragraph"in e?e.paragraph:void 0;return r||s?(0,n.jsx)(mW,{item:e,labels:t,children:(0,n.jsx)(We,{value:a||""})}):(0,n.jsx)(We,{className:jn("col"),value:a||""})}render(){const{blockId:e,columns:t,defaultBackgroundColor:s,heading:o,isLearner:r,items:a,labels:i,lessonId:c,media:l,settings:d,type:h,variant:m,renderText:f=this.renderTextDelegate,renderHeading:v=this.renderHeadingDelegate,getL10nValue:C}=this.props,g=C(l),x=Object.keys(g?.audio??{}).length>0,{audioPosition:b,entranceAnimation:T,cellPadding:L=1.5,tableWidth:y=76,textPadding:S=.8,textWidth:k=76}=d,N=m==="table",I=t===1,w=t>1,A=N?y:k,E=!N&&I,j=N,O=_G(L),R=GG(S),P=Nd(A),M=jn({[h]:!E&&!j||w,[`${h}-custom-width`]:!w,[`${h}-custom-width-table-${P}`]:j,[`${h}-custom-width-text-${P}`]:E,[`heading-custom-text-padding-${R}`]:E,[`${h}-custom-cell-padding-${O}`]:j,"no-animation":!T}),H=t>2?jn("container-wide"):jn("container",{authoring:!r}),F=this.getHeadingComponent(),D=C(Array.isArray(l)?{}:l),V=pn(D,b);return(0,n.jsx)(Ee,{className:M.toString(),defaultBackgroundColor:s,children:(0,n.jsxs)("div",{className:H,"data-block-id":e,"data-block-text":"",children:[(0,n.jsx)("div",{className:jn("row"),children:o!==""?a.slice(0,1).map((W,_)=>(0,n.jsx)("div",{className:jn("col"),children:(0,n.jsx)("div",{className:jn("heading"),children:(0,n.jsx)(F,{children:v(W)})})},"id"in W?W.id:_)):null}),V.renderOrder.map((W,_)=>{if(W==="text")return(0,n.jsx)("div",{className:jn("row"),children:h!=="heading"?a.slice(0,t).map((Z,oe)=>(0,n.jsx)(u.Fragment,{children:f(Z)},"id"in Z?Z.id:oe)):null},`text-${_}`);if(W==="audio"&&x){const Z=V.renderOrder.indexOf("audio")<V.renderOrder.indexOf("text");return(0,n.jsx)("div",{className:jn("row",{media:!0,top:Z,bottom:!Z,hasHeading:m==="heading paragraph"||m==="subheading paragraph"}),children:(0,n.jsx)("div",{className:jn("col",{media:!0}),children:(0,n.jsx)(Xt,{blockId:e,hasPadding:!1,index:e,item:{id:e,media:l},labels:i,lessonId:c,media:l,refs:`items:${e}`})})},`audio-${_}`)}})]})})}},Bo=Ze(NQ),IQ=Bo,EQ=e=>(0,n.jsx)(Bo,{columns:2,type:"twocol",...e}),jQ=e=>(0,n.jsx)(Bo,{columns:3,type:"threecol",...e}),wQ=e=>(0,n.jsx)(Bo,{columns:4,type:"fourcol",...e}),AQ=e=>(0,n.jsx)(Bo,{heading:"heading",type:"heading",...e}),RQ=e=>(0,n.jsx)(Bo,{heading:"subheading",type:"heading",...e}),PQ=e=>(0,n.jsx)(Bo,{heading:"heading",...e}),MQ=e=>(0,n.jsx)(Bo,{heading:"subheading",...e});var rc=p(82920);const OQ=1e3,BQ={fadeInGrow:"scale(0.95)",fadeInLeft:"translateX(-50px)",fadeInLeftSmall:"translateX(-25px)",fadeInRight:"translateX(50px)",fadeInUp:"translateY(25px)"},DQ=e=>{const{afterAnimatedIn:t,animateIn:s="fadeIn",children:o,className:r,duration:a=1,initiallyVisible:i,siblingDelay:c=0}=e,l=rc.useRef(null),[d,h]=rc.useState(!1);rc.useEffect(()=>{const f=l.current;if(i&&f){h(!0);return}if(d||!f||typeof window>"u")return;const v=jm(),C=new IntersectionObserver(([x])=>{x!=null&&(x.isIntersecting||x.intersectionRatio>0)&&(h(!0),C.unobserve(x.target))},{root:v,rootMargin:H1,threshold:0});C.observe(f);const g=setTimeout(()=>{h(x=>{if(x)return x;const b=l.current;if(!b)return x;const T=b.getBoundingClientRect(),L=v?.getBoundingClientRect(),y=L?.top??0,S=L?.bottom??window.innerHeight,k=(S-y)*.1;return T.bottom>y-k&&T.top<S+k?!0:x})},OQ);return()=>{C.disconnect(),clearTimeout(g)}},[i,d]),rc.useEffect(()=>{const f=l.current;if(!f||!t)return;const v=C=>{C.target instanceof Element&&C.target.parentElement===f&&C.propertyName==="opacity"&&t()};return f.addEventListener("transitionend",v),()=>{f.removeEventListener("transitionend",v)}},[t]),rc.useEffect(()=>{const f=l.current;if(!f||!Array.isArray(o))return;Array.from(f.children).forEach((C,g)=>{C instanceof HTMLElement&&C.style.setProperty("--idx",String(g))})},[o]);const m={"--scroll-animation-step":`${c}s`,"--scroll-animation-duration":s==="none"?"0s":`${a}s`,"--scroll-animation-from":BQ[s]??"translateY(0)"};return(0,n.jsx)("div",{className:X()("scroll-animation",r,{"scroll-animation--in":d}),ref:l,style:m,children:o})},Be=e=>{const{afterAnimatedIn:t,animateBlockEntrance:s,animateIn:o,children:r,className:a,duration:i,initiallyVisible:c,isLearner:l,siblingDelay:d}=e;return l&&s&&!ws()?(0,n.jsx)(DQ,{afterAnimatedIn:t,animateIn:o,className:a,duration:i,initiallyVisible:c,siblingDelay:d,children:r}):Array.isArray(r)?(0,n.jsx)("div",{children:r}):r},Qfe="group",FQ="tablist",HQ="tabpanel",Yfe="tab",Zfe="radio",ac=({caption:e,editable:t,id:s,isOverlayType:o,getL10nValue:r})=>{const a=!!(!o&&!t&&r(e));return{figcaptionId:a?`figcaption-${s}`:void 0,isFigure:a,role:a?"figure":void 0,tagName:a?"figure":"div"}};var W3=p(82920);const $Q=W3.lazy(async()=>{const[e,t]=await Promise.all([p.e("ace").then(p.t.bind(p,46036,23)),p.e("ace").then(p.bind(p,52104)),p.e("ace").then(p.t.bind(p,82091,23)),p.e("ace").then(p.t.bind(p,29614,23)),p.e("ace").then(p.t.bind(p,83546,23)),p.e("ace").then(p.t.bind(p,21994,23)),p.e("ace").then(p.t.bind(p,83546,23)),p.e("ace").then(p.t.bind(p,70989,23)),p.e("ace").then(p.t.bind(p,58242,23)),p.e("ace").then(p.t.bind(p,53567,23)),p.e("ace").then(p.t.bind(p,2433,23)),p.e("ace").then(p.t.bind(p,9603,23)),p.e("ace").then(p.t.bind(p,11507,23)),p.e("ace").then(p.t.bind(p,17146,23)),p.e("ace").then(p.t.bind(p,80170,23)),p.e("ace").then(p.t.bind(p,60681,23)),p.e("ace").then(p.t.bind(p,50661,23)),p.e("ace").then(p.t.bind(p,31628,23)),p.e("ace").then(p.t.bind(p,43159,23)),p.e("ace").then(p.t.bind(p,8916,23)),p.e("ace").then(p.t.bind(p,74243,23)),p.e("ace").then(p.t.bind(p,59014,23))]);return{default:t.default}}),VQ=({classNames:e,code:t})=>{const[s,o]=(0,u.useState)(!1),{announcePolite:r}=bn(),a=async()=>{const i=(0,Sr.htmlDecode)(t);await navigator.clipboard.writeText(i),o(!0),setTimeout(()=>o(!1),1e3),r("Copied!")};return(0,n.jsx)("div",{className:e,children:(0,n.jsx)(Mo,{message:s?"Copied!":"Copy",children:(0,n.jsx)("button",{"aria-label":s?"Copied!":"Copy",className:"block-code-snippet-copy",onClick:a,type:"button",children:(0,n.jsx)(ie,{name:s?"check":"copy"})})})})};class zQ extends W3.Component{renderCaptionDelegate;constructor(t){super(t),this.renderCaptionDelegate=this.renderCaption.bind(this)}renderCaption({caption:t}){return(0,n.jsx)(We,{className:"block-text__code-caption",value:t||""})}render(){const{animateBlockEntrance:t,defaultBackgroundColor:s="",getL10nValue:o,initiallyVisible:r,isLearner:a,items:i,labels:c,settings:l,renderCaption:d=this.renderCaptionDelegate}=this.props,{entranceAnimation:h,language:m,paddingBottom:f,paddingTop:v,snippetBackgroundColor:C,snippetColorContrast:g,theme:x,useAdvancedEditor:b,wrapWords:T}=l,L=X()("block-text block-text--code",{"block-text--padding-top":Number(v)===2,"block-text--padding-bottom":Number(f)===2,"block-text--no-animation":!h}),y={backgroundColor:C},S=C==="#fafafa"||At()(C),k=g??Te.DARK;if(!S){const N=zt({backgroundColor:C,contrast:k});Object.assign(y,{"--color-snippet-contrast":N})}return(0,n.jsx)(Ee,{className:L,defaultBackgroundColor:s,children:(0,n.jsx)(Be,{animateBlockEntrance:t,initiallyVisible:r,isLearner:a,children:(0,n.jsx)("div",{className:"block-text__container",children:i.slice(0,1).map(N=>{const I=ac({...N,getL10nValue:o});return(0,n.jsx)("div",{className:"block-text__row",children:(0,n.jsx)("div",{"aria-label":c?.a11yBlockCodeSnippet,className:"block-text__col",role:"group",children:(0,n.jsxs)("figure",{"aria-labelledby":I.figcaptionId,className:"block-text__figure block-text__figure--with-copy",role:"figure",children:[(0,n.jsx)(vM,{value:N.code,children:w=>(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(VQ,{classNames:"block-text__copy-button",code:w}),b?(0,n.jsx)(u.Suspense,{fallback:null,children:(0,n.jsx)($Q,{editorProps:{$blockScrolling:!0},maxLines:25,mode:m,name:String(N.id),readOnly:!0,setOptions:{enableSnippets:!1,showLineNumbers:!0,tabSize:2,fontSize:"1.6rem",useWorker:!1},theme:x,value:(0,Sr.htmlDecode)(Fu(w)),width:"100%",wrapEnabled:T})}):(0,n.jsx)("pre",{className:"block-text__code",dangerouslySetInnerHTML:{__html:Fu(w)},dir:"ltr",style:y})]})}),N.caption&&(0,n.jsx)("figcaption",{id:I.figcaptionId,children:d(N)})]})})},N.id)})})})})}}const K3=Ze(zQ);function UQ({accentColor:e,backgroundType:t,blockBackgroundColor:s,noteColor:o,imageBackgroundDefault:r="#ffffff"}){return o!=null&&o!==""?o:_Q({accentColor:e,backgroundType:t,blockBackgroundColor:s,imageBackgroundDefault:r})}function _Q({accentColor:e,backgroundType:t,blockBackgroundColor:s,imageBackgroundDefault:o="#ffffff"}){if(t!==ne.IMAGE&&s==null)return"#000000b3";switch(t){case ne.IMAGE:return o;case ne.LIGHT:case ne.GRAY:return en(.9,e);case ne.DARK:return"#494949";case ne.BLACK:return"#333333";default:{if(!s)return e;switch(ia(s)){case ut.LIGHT:return en(.3,s);case ut.MED:return yn(.2,s);case ut.DARK:case ut.NEAR_BLACK:return yn(.4,s);default:return e}}}}function GQ(e,t){const s=rs(),{cardMode:o,className:r="",children:a,disabled:i=!1,tag:c="div",overrideBackground:l=!1,style:d={},...h}=e,{cardMode:m,customBackgroundColorContrast:f}=s,C=De()?.theme,g=Tn(),x=o??m??$s.WHITE,b=js()??"#ffffff",T=x===$s.WHITE,L=g===ne.COLOR,y=g===ne.ACCENT,S=C?.accentContrast,k=g===ne.ACCENT||g===ne.COLOR,N=S===Te.AUTO&&y||f===Te.AUTO&&L,I=g===ne.COLOR?f:S,w=[r,"block-card"];if(T)w.push("bg--range-light","block-card--white");else if(i){w.push("block-card--disabled");const A=zt({backgroundColor:b,contrast:I});N&&(d["--color-text"]=A,d["--color-text-opposite"]=A===bt.DARK?bt.LIGHT:bt.DARK)}else{w.push("block-card--transparent");const E=$j(b)??b??"#ffffff";switch(g){case ne.LIGHT:case ne.GRAY:w.push("bg--range-light");break;case ne.IMAGE:w.push("bg--range-dark");break;case ne.DARK:case ne.BLACK:w.push("bg--range-dark"),d["--color-background-rgb"]=(0,Ia.A)(E)?.slice(0,3);break;default:{const O=d["--color-background"]??(l?b:E),R=zt({backgroundColor:O,contrast:I});k&&R==bt.LIGHT&&w.push("block-card--contrast-light");const P=ia(O);w.push(`bg--range-${ca()(P.toLowerCase())}`),d["--color-background"]=O,d["--color-background-rgb"]=(0,Ia.A)(O)?.slice(0,3);break}}}return(0,n.jsx)(c,{...h,className:w.join(" "),ref:t,style:d,children:a})}const Gt=(0,u.forwardRef)(GQ);var WQ=p(82920);const Rs=$("block-statement");class KQ extends WQ.Component{renderTextDelegate;constructor(t){super(t),this.renderTextDelegate=this.renderText.bind(this)}static get defaultProps(){return{items:[],type:"a",getL10nValue:()=>{}}}getEntranceAnimationType(){const{type:t}=this.props;switch(t){case"a":return"fadeIn";case"b":case"d":return"fadeInUp";case"c":return"fadeInRight";case"note":return"fadeInGrow"}}getEntranceAnimationDuration(){const{type:t}=this.props;switch(t){case"a":return 1;case"b":case"c":case"d":return .75;case"note":return .5}}renderText({blockId:t,getL10nValue:s,type:o,labels:r,lessonId:a,media:i,settings:c},{paragraph:l}){const d=o==="note",h=s(Array.isArray(i)?{}:i),m=!!h?.audio,f=pn(h,c.audioPosition,!1,"statement"),v=(0,n.jsx)("div",{className:Rs("quote"),children:f.renderOrder.map((C,g)=>{if(C==="text")return(0,n.jsx)("div",{children:(0,n.jsx)(We,{value:l})},`text-${g}`);if(C==="audio"&&m){const x=f.renderOrder.indexOf("audio")<f.renderOrder.indexOf("text");return(0,n.jsx)("div",{className:Rs("audio-container",{top:x,bottom:!x}),children:(0,n.jsx)(Xt,{blockId:t,hasPadding:!1,index:t,item:{media:i,id:t},labels:r,lessonId:a,media:i,mediaType:"audio",refs:`items:${t}`})},`audio-${g}`)}return null})});return d?(0,n.jsx)(JQ,{getL10nValue:s,media:i,children:v}):v}render(){const{animateBlockEntrance:t,isLearner:s,items:o,renderText:r=this.renderTextDelegate,settings:a,type:i,initiallyVisible:c}=this.props,{entranceAnimation:l,divider:d=!0,dividerPadding:h=OG(i),dividerSize:m=MG(i),noteIcon:f=!0,noteSize:v="sm",statementWidth:C=BG(i)}=a,g=VG(C),x=zG(h),b=UG(m),T=v,L=i==="a"||i==="b"||i==="d",y=i==="note",S=Rs({[i]:!0,[`${i}-custom-width-${g}`]:!0,[`${i}-divider-off`]:L&&!d,[`${i}-divider-padding-${x}`]:L&&d,[`${i}-divider-size-${b}`]:L&&d,[`note-size-${T}`]:y,[`note-size-${T}-no-icon`]:y&&!f,"no-animation":!l});return(0,n.jsx)(Ee,{className:S.toString(),children:(0,n.jsx)("div",{className:Rs("wrap"),children:(0,n.jsx)("div",{className:Rs("container"),children:(0,n.jsx)("div",{className:Rs("row"),children:o.slice(0,1).map(k=>(0,n.jsx)(Be,{animateBlockEntrance:t,animateIn:this.getEntranceAnimationType(),duration:this.getEntranceAnimationDuration(),initiallyVisible:c,isLearner:s,children:(0,n.jsxs)("div",{className:Rs("col"),children:[(0,n.jsx)("div",{className:Rs("divider-top-container"),children:(0,n.jsx)("div",{className:Rs("divider-top")})}),r(this.props,k),(0,n.jsx)("div",{className:Rs("divider-bottom")})]})},k.id))})})})})}}const ic=Ze(KQ),QQ=ic,YQ=e=>(0,n.jsx)(ic,{type:"b",...e}),ZQ=e=>(0,n.jsx)(ic,{type:"c",...e}),XQ=e=>(0,n.jsx)(ic,{type:"d",...e}),qQ=e=>(0,n.jsx)(ic,{type:"note",...e}),JQ=({children:e,getL10nValue:t,media:s})=>{const o=rs(),{accentColor:r,cardMode:a,cornerRadius:i,courseColor:c,customBackgroundColorContrast:l,noteIcon:d=!0,noteIconColor:h}=o,m=o.noteColor,f=o.noteColorContrast,{theme:v}=De(),C=js(),g=Tn(),x=g===ne.COLOR,b=g===ne.ACCENT,T=v?.accentContrast,L=g===ne.DARK||g===ne.BLACK,y=m!=null&&m!=="",k=x||b||L||y?$s.TRANSPARENT:a,N=y&&(f??Te.AUTO)===Te.AUTO||T===Te.AUTO&&b||l===Te.AUTO&&x,I=(0,u.useMemo)(()=>UQ({accentColor:r??c,backgroundType:g,blockBackgroundColor:C,noteColor:m,imageBackgroundDefault:""}),[r,g,C,c,m]),w=y?f??Te.AUTO:g===ne.COLOR?l:T,A=zt({backgroundColor:I,contrast:w}),E={"--color-background":I,...(N||y)&&{"--color-text":A},...i&&{"--corner-radius":`${Number(i)}px`},...h&&{"--color-theme-decorative":h},...y&&{"--color-theme":m}},j=Rs("note-icon",{off:!d}),R=(t?t(Array.isArray(s)?{}:s):void 0)?.image,P=R?.key&&Object.keys(R).length>0,M=P?P8(R)?pt(R.key):dt(R):null,H=()=>d?P&&M?(0,n.jsx)("div",{"aria-hidden":!0,className:Rs("note-icon__custom"),style:{WebkitMaskImage:`url('${M}')`,maskImage:`url('${M}')`}}):(0,n.jsx)(ie,{name:"circle-info"}):null;return(0,n.jsxs)(Gt,{cardMode:k,className:Rs("note-card"),style:E,children:[(0,n.jsx)("div",{className:j,children:H()}),e]})};var ht=p(82920);function Q3({ariaLabel:e,children:t,className:s="carousel-controls-item-btn",isActive:o,onClick:r,onKeyDown:a}){return(0,n.jsx)("li",{className:"carousel-controls-item",role:"listitem",children:(0,n.jsx)("button",{"aria-current":o,"aria-label":e,className:s,onClick:r,onKeyDown:a,tabIndex:o?0:-1,type:"button",children:t})})}function Od({children:e,iconNameLeft:t="chevron-left-light",iconNameRight:s="chevron-right-light",isInfinite:o=!0,isRTL:r=!1,labelCarousel:a="Carousel",labelCarouselRoleDesc:i="Carousel",labelSlideControls:c="Slide controls",labelSlideControlsGoToNext:l="Go to next slide",labelSlideControlsGoToPrevious:d="Go to previous slide",labelSlideControlsGoToSlide:h="Go to slide",labelSlideCounterPreposition:m="of",labelSlidePreposition:f="of",labelSlideRoleDesc:v="Slide",onChange:C,ref:g,renderSlideIndicator:x,shouldMouseEmulateTouch:b=!1,shouldUseCounter:T=!1,shouldUseGoToSlide:L=!0}){const y=ht.useId(),[S,k]=ht.useState(0),N=(0,Me.A)(S)??0,I=ht.useRef(null),w=ht.useRef(null),A=ht.useRef(!1),E=ht.useRef(!1),j=ht.useRef(void 0),O=ht.useRef(void 0),R=`carousel-${y}`,P=ht.Children.count(e),M=(0,Me.A)(P),H=ht.useMemo(()=>Array.from({length:P}),[P]),F=P>1;ht.useImperativeHandle(g,()=>({navigateToSlide:(Q,U=!0)=>{k(Q);const B=I.current?.children?.[Q]?.firstElementChild;U&&B?.focus()}}),[]);const D=ht.useCallback(({activeIndex:Q,dir:U})=>{const B=o?Q-1>=0?Q-1:P-1:Math.max(0,Q-1),z=o?Q+1<=P-1?Q+1:0:Math.min(P-1,Q+1);return U==="left"?r?z:B:r?B:z},[o,r,P]),V=ht.useCallback(()=>{k(Q=>D(r?{activeIndex:Q,dir:"right"}:{activeIndex:Q,dir:"left"}))},[D,r]),W=ht.useCallback(()=>{k(Q=>D(r?{activeIndex:Q,dir:"left"}:{activeIndex:Q,dir:"right"}))},[D,r]),_=ht.useCallback(Q=>{const U=I.current?.children?.[Q],B=I.current;if(U&&B){const z=U.getBoundingClientRect(),K=B.getBoundingClientRect(),Y=z.left+z.width/2,J=K.left+K.width/2,q=Y-J;B.scrollBy({left:q,behavior:"smooth"})}},[]),Z=ht.useCallback(Q=>{let U=!1,B=S;switch(Q.key){case"ArrowLeft":U=!0,B=D({activeIndex:S,dir:"left"});break;case"ArrowRight":U=!0,B=D({activeIndex:S,dir:"right"});break;case"Home":U=!0,B=0;break;case"End":U=!0,B=P-1;break}U&&(Q.stopPropagation(),Q.preventDefault()),S!==B&&(I.current?.children?.[B]?.firstChild?.focus(),_(B),k(B))},[S,D,_,P]);ht.useEffect(()=>{N!==S&&C?.(S)},[S,C,N]),ht.useEffect(()=>{P<M&&S>P-1&&k(P-1)},[S,M,P]),ht.useEffect(()=>{const Q=q=>{q.target.tagName==="IMG"&&q.preventDefault(),j.current=q.screenX},U=q=>{const ee=window.visualViewport?.scale??1,se=window.getSelection().toString()!=="";if(!E.current&&ee<=1.01&&!se&&j.current!=null){O.current=q.screenX;const te=O.current-j.current;Math.abs(te)>50&&(window.getSelection().empty(),A.current=!0,j.current=void 0,O.current=void 0,te<0?k(G=>D({activeIndex:G,dir:"right"})):k(G=>D({activeIndex:G,dir:"left"})))}},B=q=>{A.current&&q.stopPropagation(),A.current=!1,E.current=!1,j.current=void 0,O.current=void 0},z=q=>{if(q.touches.length>1){E.current=!0;return}q.changedTouches.length===1&&q.changedTouches[0]&&(j.current=q.changedTouches[0].screenX)},K=q=>{const ee=window.visualViewport?.scale??1,se=window.getSelection().toString()!=="";if(!E.current&&ee<=1.01&&!se&&j.current!=null&&q.changedTouches[0]){O.current=q.changedTouches[0].screenX;const te=O.current-j.current;Math.abs(te)>50&&(A.current=!0,j.current=void 0,O.current=void 0,te<0?k(G=>D({activeIndex:G,dir:"right"})):k(G=>D({activeIndex:G,dir:"left"})))}},Y=()=>{A.current=!1,E.current=!1,j.current=void 0,O.current=void 0},J=w.current;return b&&(J?.addEventListener("mousedown",Q,{capture:!0}),J?.addEventListener("mousemove",U,{capture:!0}),J?.addEventListener("click",B,{capture:!0})),J?.addEventListener("touchstart",z,{passive:!0}),J?.addEventListener("touchmove",K,{passive:!0}),J?.addEventListener("touchend",Y,{passive:!0}),J?.addEventListener("touchcancel",Y,{passive:!0}),()=>{b&&(J?.removeEventListener("mousedown",Q),J?.removeEventListener("mousemove",U),J?.removeEventListener("mouseup",Y)),J?.removeEventListener("touchstart",z),J?.removeEventListener("touchmove",K),J?.removeEventListener("touchend",Y),J?.removeEventListener("touchcancel",Y)}},[D,b,P]);const oe=ht.useCallback(Q=>()=>{_(Q),k(Q)},[_]);return(0,n.jsxs)("div",{"aria-label":a,"aria-roledescription":i,className:"carousel",dir:r?"rtl":void 0,role:"region",style:{"--carousel-active-index":S},children:[F&&(0,n.jsx)(n.Fragment,{children:(0,n.jsxs)("div",{"aria-label":c,className:"carousel-controls",role:"group",children:[L&&(0,n.jsx)("ul",{className:"carousel-controls-items",ref:I,role:"list",children:H.map((Q,U)=>{const B=S===U,z=oe(U);return x?x({index:U,isActive:B,onClick:z,onKeyDown:Z}):(0,n.jsx)(Q3,{ariaLabel:h+" "+(U+1),isActive:B,onClick:z,onKeyDown:Z,children:(0,n.jsx)(ie,{className:"carousel-controls-item-btn-icon",name:B?"circle":"circle-solid"})},U)})}),(0,n.jsx)("button",{"aria-disabled":o?void 0:S===0,"aria-label":d,className:"carousel-controls-prev",onClick:!o&&S===0?void 0:V,type:"button",children:(0,n.jsx)(ie,{className:"carousel-controls-prev-icon",name:r?s:t})}),(0,n.jsx)("button",{"aria-disabled":o?void 0:S===P-1,"aria-label":l,className:"carousel-controls-next",onClick:!o&&S===P-1?void 0:W,type:"button",children:(0,n.jsx)(ie,{className:"carousel-controls-next-icon",name:r?t:s})}),T&&(0,n.jsxs)("div",{className:"carousel-controls-counter",children:[(0,n.jsx)("div",{className:"carousel-controls-counter-text",children:`${S+1} ${m} ${P}`}),(0,n.jsx)("div",{className:"carousel-controls-counter-line",children:(0,n.jsx)("div",{className:"carousel-controls-counter-line-runner",style:{width:`${Number(((S+1)/P).toFixed(2))*100}%`}})})]})]})}),(0,n.jsx)("div",{"aria-live":"polite",className:"carousel-slides",ref:w,children:ht.Children.map(e,(Q,U)=>{const B=`${R}-${U}-counter`;return(0,n.jsxs)("div",{"aria-labelledby":B,"aria-roledescription":v,className:"carousel-slide",hidden:S!==U,inert:S!==U,role:"group",children:[(0,n.jsx)("div",{className:"visually-hidden-always",id:B,children:`${U+1} ${f} ${P}`}),Q]})})})]})}var cc=p(82920);const eY="div",Y3=cc.createContext(void 0);function tY({children:e,element:t,...s},o){const[r,a]=cc.useState(null);return(0,n.jsx)(Y3.Provider,{value:r,children:cc.createElement(t??eY,{...s,ref:o},e,(0,n.jsx)("div",{ref:a}))})}const lc=cc.forwardRef(tY);function Xfe(){return cc.useContext(Y3)}function wf(e){const t=s=>{const o=J0();return(0,n.jsx)(e,{...s,isRTL:o})};return t.displayName=`withRTL(${e.displayName||e.name})`,t}const Bd=({blockId:e,carouselRef:t,children:s,items:o})=>{const r=(0,u.useRef)(null),a=t??r;return(0,u.useEffect)(()=>{const i=c=>{const{path:l}=c.detail,{blockId:d,cardId:h}=pa(l,["block","card"]);if(d===e){const m=o.findIndex(f=>f.id===h);m>=0&&a.current?.navigateToSlide?.(m,!1)}};return window.addEventListener(Ge,i),()=>{window.removeEventListener(Ge,i)}},[o,e,a]),(0,n.jsx)(n.Fragment,{children:s({carouselRef:t})})},Fe=$("block-quote"),dc=({avatar:e,alt:t,l10nId:s,showAvatar:o})=>o?(0,n.jsx)(xs,{alt:bo(t),className:Fe("avatar"),"data-l10n-id":s,src:e}):null,Z3=(e,{paragraph:t})=>{const s=t||"",o=Fe("text",{blank:t===""}).toString();return(0,n.jsx)(We,{className:o,value:s})},X3=(e,{name:t})=>{const s=Fe("caption",{blank:t===""}).toString();return(0,n.jsx)(We,{className:s,value:t})},q3=({avatar:e,blockProps:t,getL10nValue:s,item:o,renderCaption:r,renderText:a})=>{const i=o?.avatar?.media,c=s(i)?.image,l=c?.alt,d=ch(c),h=Pt(i);return(0,n.jsx)("div",{className:Fe("slide"),children:(0,n.jsxs)("figure",{className:Fe("figure"),children:[d&&e?(0,n.jsx)(dc,{alt:l??"",avatar:d,l10nId:h,showAvatar:!!e}):null,(0,n.jsx)("blockquote",{className:Fe("quote-body"),children:a(t,o)}),(0,n.jsx)("figcaption",{children:r(t,o)})]})})},sY=({alt:e,animateBlockEntrance:t,avatar:s,children:o,l10nId:r,initiallyVisible:a,isAuthorBlank:i=!1,isLearner:c,showAvatar:l,type:d})=>{const h=Fe("col",{"no-avatar":!s}),m=s?(0,n.jsx)("div",{className:Fe("image"),children:(0,n.jsx)("div",{className:Fe("avatar-wrap"),children:d==="c"?(0,n.jsx)(Be,{animateBlockEntrance:t,animateIn:"fadeInLeftSmall",initiallyVisible:a,isLearner:c,children:(0,n.jsx)(dc,{alt:e,avatar:s,l10nId:r,showAvatar:l})}):(0,n.jsx)(dc,{alt:e,avatar:s,l10nId:r,showAvatar:l})})}):null;return(0,n.jsx)("div",{className:Fe("container"),children:(0,n.jsx)("div",{className:Fe("row"),children:(0,n.jsxs)("div",{className:h,children:[(0,n.jsx)("div",{className:Fe("divider-top")}),(0,n.jsxs)("div",{className:Fe("figure",{"no-author":i,"no-avatar":!i&&!l}),children:[m,o]}),(0,n.jsx)("div",{className:Fe("divider-bottom")})]})})})},nY=({avatar:e,children:t,alt:s,l10nId:o,showAvatar:r})=>(0,n.jsx)("div",{className:Fe("figure"),children:(0,n.jsx)("div",{className:Fe("container"),children:(0,n.jsxs)("div",{className:Fe("row"),children:[(0,n.jsx)("div",{className:Fe("col"),children:e&&r?(0,n.jsx)(dc,{alt:s,avatar:e,l10nId:o,showAvatar:r}):null}),(0,n.jsx)("div",{className:Fe("col"),children:t})]})})}),oY=({background:e,avatar:t,children:s,alt:o,l10nId:r,showAvatar:a})=>(0,n.jsx)("div",{className:Fe("background"),style:{backgroundImage:e??""},children:(0,n.jsx)("div",{className:Fe("container"),children:(0,n.jsx)("div",{className:Fe("row"),children:(0,n.jsx)("div",{className:Fe("col"),children:(0,n.jsxs)("div",{className:Fe("figure"),children:[t&&a?(0,n.jsx)(dc,{alt:o,avatar:t,l10nId:r,showAvatar:a}):null,s]})})})})});class rY extends u.Component{renderTextDelegate;renderCaptionDelegate;constructor(t){super(t),this.renderTextDelegate=this.renderText.bind(this),this.renderCaptionDelegate=this.renderCaption.bind(this)}static get defaultProps(){return{editable:!1,items:[],type:"a",getL10nValue:()=>{}}}getQuoteEntranceAnimationType(){const{type:t}=this.props;switch(t){case"a":case"b":case"background":return"fadeInUp";case"d":case"c":return"fadeInRight"}}getBackgroundImageUrl(t,s){const o=t?.alpha??DG(s),r=dt(t),a=FG(s);return cl({alpha:o,color:a,url:r})?.backgroundImage}renderText(t,{paragraph:s}){const o=s||"",r=Fe("text",{blank:o===""}).toString();return(0,n.jsx)(We,{className:r,value:o})}renderCaption(t,{name:s}){const o=Fe("caption",{blank:s===""}).toString();return(0,n.jsx)(We,{className:o,value:s})}render(){const{animateBlockEntrance:t,getL10nValue:s,initiallyVisible:o,isLearner:r,items:a,settings:i,type:c,renderText:l=this.renderTextDelegate,renderCaption:d=this.renderCaptionDelegate}=this.props,h=92,{avatarSize:m=hf(c),divider:f=!0,dividerSize:v=h,entranceAnimation:C,quoteAlignment:g="left",quoteIcon:x=!0,quotesInline:b,quotePadding:T=2,quoteWidth:L=l3(c)}=i,[y]=a,{avatar:S,background:k}=y,N=s(S?.media)?.image,I=ch(N),w=N?.alt,A=Pt(S.media),E=s(k?.media)?.image,j=E?.overlayColor,O=this.getBackgroundImageUrl(E,j),R=i?.avatar??I!=="",P=I&&I!=="",M=c==="background",H=M&&j==="light",F=d3(L),D=u3(T),V=mf(c,m),W=$G(v),_=c==="a",Z=c==="c"||M,oe=c!=="b"&&!M,Q=y?.name==="",U=y?.paragraph==="",B=Fe(null,{[c]:!0,[`${c}-custom-width-${F}`]:!0,[`${c}-divider-off`]:_&&!f,[`${c}-divider-size-${W}`]:_&&f,[`${c}-quote-padding-${D}`]:!0,[`${c}-align-${g}`]:M,[`${c}-${F}-no-avatar`]:!I||!R,[`${c}-avatar-size-${V}`]:R&&P,[`${c}-quote-icon-off`]:Z&&!x,[`${c}-legacy-quote-mark`]:oe&&!b,[`${c}-overlay-legacy`]:!j,[`${c}-overlay-light`]:H,"no-animation":!C}).toString(),z=(0,n.jsx)("div",{className:Fe("wrap",{blank:Q||U}),children:(0,n.jsx)(Be,{animateBlockEntrance:t,animateIn:this.getQuoteEntranceAnimationType(),initiallyVisible:o,isLearner:r,siblingDelay:.15,children:(0,n.jsxs)("figure",{children:[(0,n.jsx)("blockquote",{children:l(this.props,y)}),(0,n.jsx)("figcaption",{children:d(this.props,y)})]})})});let K;switch(c){case"d":K=(0,n.jsx)(nY,{alt:w,avatar:I,initiallyVisible:o,l10nId:A,showAvatar:R,type:c,children:z});break;case"background":K=(0,n.jsx)(oY,{alt:w,avatar:I,background:O,initiallyVisible:o,l10nId:A,showAvatar:R,type:c,children:z});break;default:K=(0,n.jsx)(sY,{alt:w,animateBlockEntrance:t,avatar:I,initiallyVisible:o,isAuthorBlank:Q,isLearner:r,l10nId:A,showAvatar:R,type:c,children:z})}return(0,n.jsx)(Ee,{className:B,children:K})}}const uc=Ze(rY),J3=(e=>(0,n.jsx)(uc,{...e}));p.dn(J3);const aY=e=>(0,n.jsx)(uc,{type:"b",...e}),iY=e=>(0,n.jsx)(uc,{type:"c",...e}),cY=e=>(0,n.jsx)(uc,{type:"d",...e}),lY=e=>(0,n.jsx)(uc,{type:"background",...e});class dY extends u.Component{static get defaultProps(){return{type:"carousel",items:[],onStep:Function.prototype,getL10nValue:()=>{}}}handleChangeCarousel=t=>{this.props.onStep?.(this.props.items[t])};render(){const{blockId:t,animateBlockEntrance:s,editable:o,getL10nValue:r,initiallyVisible:a=!1,isRTL:i,isLearner:c,isLessonBlocksList:l=!1,items:d,labels:h,previewType:m,settings:f,renderText:v=Z3,renderCaption:C=X3,type:g}=this.props,{avatar:x=!0,avatarSize:b=hf(g),entranceAnimation:T,quotesInline:L,quotePadding:y=2,quoteWidth:S=l3(g),showBorder:k=!0}=f,I=g!=="b"&&!(g==="background"),w=d3(S),A=u3(y),E=mf(g,b),j=m==="mobile-portrait"||m==="mobile-landscape",O=Fe({[g]:!0,[`${g}-custom-width-${w}`]:!0,[`${g}-quote-padding-${A}`]:!0,[`${g}-${w}-no-avatar`]:!x,[`${g}-avatar-size-${E}`]:x,[`${g}-legacy-quote-mark`]:!l&&I&&!L,"no-animation":!T,"hide-border":!k,editable:o}).toString(),R=d.map(P=>(0,n.jsx)(q3,{avatar:x,blockProps:this.props,getL10nValue:r,item:P,renderCaption:C,renderText:v},P.id));return(0,n.jsx)("div",{className:Fe("slider-container"),children:(0,n.jsx)(Ee,{className:O,children:(0,n.jsx)(lc,{className:Fe("wrap"),children:(0,n.jsx)("div",{className:Fe("container"),children:(0,n.jsx)("div",{className:Fe("col"),children:(0,n.jsx)(Gt,{className:Fe("box"),children:(0,n.jsx)(Be,{animateBlockEntrance:s,animateIn:"fadeInUp",initiallyVisible:a,isLearner:c,children:(0,n.jsx)(Bd,{blockId:t,items:d,children:({carouselRef:P})=>(0,n.jsx)(Od,{isRTL:i,labelCarousel:h?.a11yBlockQuoteCarousel,labelCarouselRoleDesc:h?.a11yBlockQuoteCarouselRoleDescription,labelSlideControls:h?.a11yBlockQuoteCarouselSlideControls,labelSlideControlsGoToNext:h?.a11yBlockQuoteCarouselSlideControlsGoToNext,labelSlideControlsGoToPrevious:h?.a11yBlockQuoteCarouselSlideControlsGoToPrevious,labelSlideControlsGoToSlide:h?.a11yBlockQuoteCarouselSlideControlsGoToSlide,labelSlideCounterPreposition:h?.blocksPreposition,labelSlidePreposition:h?.a11yBlockQuoteCarouselSlidePreposition,labelSlideRoleDesc:h?.a11yBlockQuoteCarouselSlideRoleDescription,onChange:this.handleChangeCarousel,ref:P,shouldMouseEmulateTouch:j,children:R})})})})})})})})})}}const uY=wf(Ze(dY)),Dd=$("block-quote"),hY=e=>{const{animateBlockEntrance:t,initiallyVisible:s=!1,isLearner:o,items:r=[],settings:a,renderText:i=Z3,renderCaption:c=X3,type:l="stacked"}=e,d=Ot(),{avatar:h=!0,entranceAnimation:m}=a,f=a.avatarSize??hf(l),v=mf(l,f),C=Dd({[l]:!0,[`${l}-avatar-size-${v}`]:!0,"no-animation":!m}).toString(),g=r.map(x=>(0,n.jsx)(q3,{avatar:h,blockProps:e,getL10nValue:d,item:x,renderCaption:c,renderText:i},x.id));return(0,n.jsx)(Ee,{className:C,children:(0,n.jsx)(lc,{className:Dd("wrap"),children:(0,n.jsx)("div",{className:Dd("container"),children:(0,n.jsx)(Be,{animateBlockEntrance:t,animateIn:"fadeInUp",initiallyVisible:s,isLearner:o,siblingDelay:.15,children:(0,n.jsx)("div",{className:Dd("row"),children:g})})})})})};var ey=p(82920);const ys=$("block-list"),mY=class extends ey.Component{static get defaultProps(){return{editable:!1,items:[],onStep:Function.prototype,type:"numbered",getL10nValue:()=>{}}}nextNumber(e){const{items:t}=this.props,o=t.length>0?t[e].number:null;let r;return!isNaN(o)&&o!==""&&(r=parseInt(o,10)+1),(r<1||r>99)&&(r=null),r}render(){const{animateBlockEntrance:e,blockId:t,defaultBackgroundColor:s,editable:o,getL10nValue:r,initiallyVisible:a,isLearner:i,items:c,labels:l,lessonId:d,media:h,onStep:m,settings:f,type:v}=this.props,{audioPosition:C,bulletPadding:g,entranceAnimation:x,listItemColor:b,listItemColorContrast:T,listWidth:L}=f,y=r(Array.isArray(h)?{}:h),S=pn(y,C),k=HG(g),N=Nd(L),I=ys({[v]:!0,[`${v}-custom-width-${N}`]:!0,[`${v}-bullet-padding-${k}`]:!0,"no-animation":!x}),w=v==="numbered"?"ol":"ul";return(0,n.jsx)(Ee,{className:I.toString(),defaultBackgroundColor:s,children:(0,n.jsx)("div",{className:ys("container"),children:(0,n.jsx)("div",{className:ys("row"),children:(0,n.jsx)(lc,{className:ys("col"),children:(0,n.jsx)("div",{className:"blocks-list__container",children:S.renderOrder.map((A,E)=>{if(A==="text")return(0,n.jsx)("div",{children:(0,n.jsx)(w,{className:ys("list"),role:"list",children:(0,n.jsx)(Be,{animateBlockEntrance:e,animateIn:"fadeInRight",className:ys("animated-item").toString(),initiallyVisible:a,isLearner:i,siblingDelay:.25,children:c.map((j,O)=>{const R={key:j.id,index:O,lessonId:d,blockId:t,type:v,editable:o,nextNumber:this.nextNumber.bind(this),onStep:m,listItemColor:b,listItemColorContrast:T,...j};return this.props.renderItem?this.props.renderItem(R):(0,u.createElement)(fY,{...R,key:R.key})})})})},`text-${E}`);if(A==="audio")return(0,n.jsx)("div",{className:X()("block-list__media",{"audio-on-top":S.renderOrder[0]==="audio","audio-on-bottom":S.renderOrder[0]!=="audio"}),children:(0,n.jsx)(Xt,{blockId:t,hasPadding:!1,index:t,item:{media:h,id:t},labels:l,lessonId:d,media:h,refs:`items:${t}`})},`${A}-${E}`)})})})})})})}};class fY extends ey.Component{renderTextDelegate;animateRef=null;static get defaultProps(){return{className:""}}constructor(t){super(t),this.renderTextDelegate=this.renderText.bind(this)}renderText(t){return(0,n.jsx)(We,{...t})}handleChangeCheckbox=()=>{this.props.onStep(this.props)};render(){const{type:t,id:s,index:o,number:r,paragraph:a,editable:i,className:c,renderText:l=this.renderTextDelegate,style:d,listItemColor:h,listItemColorContrast:m}=this.props,f={allowTabNavigation:!0,className:"block-list__content brand--linkColor cursorAuto",editable:i,id:s,value:a};return(0,n.jsxs)("li",{className:X()("block-list__item",`block-list__item--${t}`,c),ref:v=>{this.animateRef=v},role:"listitem",style:d,children:[t==="numbered"&&(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("div",{className:ys("number"),style:h?{backgroundColor:h,color:zt({contrast:m||Te.AUTO,backgroundColor:h})}:void 0,children:r||o+1}),l(f)]}),t==="bulleted"&&(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("span",{className:"visually-hidden-always",children:"\u2022"}),(0,n.jsx)(ie,{className:ys("bullet"),name:"circle-solid",style:h?{color:h}:void 0}),l(f)]}),t==="icon"&&(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("div",{className:ys("icon"),style:h?{"--color-background":h}:void 0,children:(0,n.jsx)("span",{"aria-hidden":"true",className:ys("icon-glyph",{placeholder:!0}),children:"\u2B50\uFE0F"})}),l(f)]}),t==="checkboxes"&&(0,n.jsxs)("label",{className:ys("option"),children:[(0,n.jsx)("input",{className:ys("checkbox-input"),onChange:this.handleChangeCheckbox,type:"checkbox"}),(0,n.jsx)("div",{className:ys("checkbox"),style:h?{borderColor:h,"--color-background":h}:void 0,children:(0,n.jsx)(ie,{className:ys("checkbox__icon"),name:"check",style:h?{color:zt({contrast:m||Te.AUTO,backgroundColor:h})}:void 0})}),l(f)]})]})}}const pY=Ze(mY),Fd=e=>(0,n.jsx)(pY,{...e}),gY=Fd,vY=e=>(0,n.jsx)(Fd,{type:"checkboxes",...e}),CY=e=>(0,n.jsx)(Fd,{type:"bulleted",...e}),xY=e=>(0,n.jsx)(Fd,{type:"icon",...e});var bY;const yY=1024,TY=16/9,Af=yY/TY,LY=e=>typeof e=="string"||typeof e=="number",SY=e=>bY(e)&&e.type==="slide"&&Array.isArray(e.items),hc=e=>{if(!(!Jt(e)||!Jt(e.experiments)))return e.experiments},kY=(e,t)=>!Array.isArray(e)||!t?[]:e.filter(LY).map(s=>t[String(s)]).filter(SY),qfe=(e,t)=>kY(e,t).map(s=>s.id),NY=e=>hc(e)?.showTitle!==!1,ty=e=>hc(e)?.imageTextLayout,sy=e=>e!==void 0,IY=e=>sy(ty(e)),EY=e=>IY(e)&&hc(e)?.showDescription!==!1,jY=e=>({imagePosition:e==="insetRight"||e==="bleedRight"?"right":"left",isFullBleed:e==="bleedLeft"||e==="bleedRight"||e==="overlay",isOverlay:e==="overlay"}),wY=e=>hc(e)?.titleVariant,Jfe=e=>e&&hc(e)?.speakerNotes||"";var Rf=p(82920);const Pf=e=>["hero","full","aside"].includes(e);class AY extends Rf.Component{renderCaptionDelegate;constructor(t){super(t),this.renderCaptionDelegate=this.renderCaption.bind(this)}static get defaultProps(){return{type:"hero",editable:!1,getL10nValue:()=>{},lessonId:"",blockId:"",items:[]}}renderCaption(t,s){return(0,n.jsx)(We,{className:"block-image__caption",value:s})}render(){const{aiMagicIcon:t,aiOverlay:s,animateBlockEntrance:o,blockId:r,defaultBackgroundColor:a,editable:i,isPresentation:c,getL10nValue:l,initiallyVisible:d,isLearner:h,items:m,type:f,labels:v,lessonId:C,settings:g,renderCaption:x=this.renderCaptionDelegate}=this.props,{entranceAnimation:b,cornerRadius:T,zoomOnClick:L}=g,y=X()(`block-image block-image--${f}`,"block-image--flag-dimensions",{"block-image--no-animation":!b}),S=m[0],{id:k,caption:N}=S,{image:I,audio:w}=l(S.media)??{},A=I?.alt,E=dt(I),j=I?.dimensions,O=j?.width||j?.originalWidth,R=j?.height||j?.originalHeight,P=ac({caption:N,editable:i,id:k,getL10nValue:l}),M=!h&&!E,H=O&&R?O/R:void 0,F=I?.link?l(I.link.destination):void 0,D=I?.link&&typeof F=="string"?{type:I.link.type,destination:F}:void 0,V=X()("block-image__image",{"block-image__image--audio-overlay":!!w});return(0,n.jsx)(Ee,{className:y,defaultBackgroundColor:a,children:(0,n.jsx)("div",{className:"block-image__container",children:(0,n.jsx)("div",{className:"block-image__row",children:(0,n.jsx)("div",{className:"block-image__col",children:(0,n.jsx)(Be,{animateBlockEntrance:o,initiallyVisible:d,isLearner:h,children:(0,n.jsxs)(P.tagName,{"aria-labelledby":P.figcaptionId,className:"block-image__figure",role:P.role,children:[(0,n.jsxs)("div",{className:V,children:[M?(0,n.jsxs)("div",{className:"block-image__waiting",style:{aspectRatio:H},children:[(0,n.jsx)("div",{children:t}),(0,n.jsx)("div",{className:"block-image__waiting-text",children:"Waiting for image\u2026"})]}):(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(Fa,{alt:A,cornerRadius:T,disableZoom:!L,height:R,l10nId:Pt(S.media),labels:v,link:D,maxHeight:c?Af*.7:f==="full"?380:900,src:E,width:O}),w&&Pf(f)&&(0,n.jsx)(Xt,{blockId:r,cornerRadius:T,index:`${r}-${k}-0`,isOverlayAudio:!0,item:S,labels:v,lessonId:C,media:S.media,mediaType:"audio"})]}),s&&(0,n.jsx)("div",{className:"block-image__ai-overlay",children:s})]}),(i||N)&&(0,n.jsx)("figcaption",{id:P.figcaptionId,children:x(k,N)})]})})})})})})}}const RY=Ze(AY),PY=(e,t,s,o,r)=>t?r:(0,n.jsx)(Be,{animateBlockEntrance:e,initiallyVisible:s,isLearner:o,children:r});class MY extends Rf.Component{renderCaptionDelegate;renderParagraphDelegate;constructor(t){super(t),this.renderParagraphDelegate=this.renderParagraph.bind(this),this.renderCaptionDelegate=this.renderCaption.bind(this)}static get defaultProps(){return{blockId:"",getL10nValue:()=>{},editable:!1,items:[],lessonId:"",type:"text-aside"}}renderParagraph(t,s){return(0,n.jsx)(We,{className:"block-image__text",value:s})}renderCaption(t,s){return(0,n.jsx)(We,{className:"block-image__caption",value:s})}renderImage(t,s,o,r){const{blockId:a,editable:i,lessonId:c,renderCaption:l=this.renderCaptionDelegate,getL10nValue:d}=this.props,h=d(o.media),m=h?.image,f=h?.audio,v=m?.alt,C=dt(m),g=m?.dimensions,x=g?.width||g?.originalWidth,b=g?.height||g?.originalHeight,T=ac({caption:s,editable:i,id:t,getL10nValue:d}),{animateBlockEntrance:L,initiallyVisible:y,isLearner:S,labels:k,settings:{cornerRadius:N,zoomOnClick:I}}=this.props,w=X()("block-image__image",{"block-image__image--audio-overlay":!!f}),A=m?.link?d(m.link.destination):void 0,E=m?.link&&typeof A=="string"?{type:m.link.type,destination:A}:void 0;return(0,n.jsx)(Be,{animateBlockEntrance:L,animateIn:r==="right"?"fadeInRight":"fadeInLeft",initiallyVisible:y,isLearner:S,children:(0,n.jsxs)(T.tagName,{"aria-labelledby":T.figcaptionId,className:"block-image__figure",role:T.role,children:[(0,n.jsxs)("div",{className:w,children:[(0,n.jsx)(Fa,{alt:v,cornerRadius:N,disableZoom:!I,height:b,l10nId:Pt(o?.media),labels:k,link:E,maxHeight:900,src:C,width:x}),f&&Pf("aside")&&(0,n.jsx)(Xt,{blockId:a,cornerRadius:N,index:`${a}-${t}-0`,isOverlayAudio:!0,item:o,labels:k,lessonId:c,media:o.media,mediaType:"audio"})]}),(i||s)&&(0,n.jsx)("figcaption",{id:T.figcaptionId,children:l(t,s)})]})})}render(){const{defaultBackgroundColor:t,items:s,renderParagraph:o=this.renderParagraphDelegate,settings:r,type:a}=this.props,{entranceAnimation:i,imagePosition:c,imageSize:l}=r,d=c==="right",h=X()(`block-image block-image--${a}`,{"block-image--small":l==="small","block-image--large":l==="large","block-image--reverse":d,"block-image--no-animation":!i}),m=s[0],{id:f,caption:v}=m,C="paragraph"in m?m.paragraph:void 0;return(0,n.jsx)(Ee,{className:h,defaultBackgroundColor:t,children:(0,n.jsx)("div",{className:"block-image__container",children:(0,n.jsxs)("div",{className:"block-image__row",children:[(0,n.jsx)("div",{className:"block-image__col",children:d?o(f,C):this.renderImage(f,v,m,"left")}),(0,n.jsx)("div",{className:"block-image__col",children:d?this.renderImage(f,v,m,"right"):o(f,C)})]})})})}}const OY=Ze(MY);class BY extends Rf.Component{renderCaptionDelegate;renderOverlayDelegate;constructor(t){super(t),this.renderCaptionDelegate=this.renderCaption.bind(this),this.renderOverlayDelegate=this.renderOverlay.bind(this)}static get defaultProps(){return{blockId:"",editable:!1,getL10nValue:()=>{},items:[],lessonId:"",type:"full"}}renderCaption(t,s){return(0,n.jsx)(We,{className:"block-image__caption",value:s})}renderOverlay(t,s){return(0,n.jsx)(We,{className:"block-image__paragraph",value:s})}renderOverlayCaption(t,s){const{animateBlockEntrance:o,initiallyVisible:r,isLearner:a,renderOverlay:i=this.renderOverlayDelegate}=this.props;return(0,n.jsx)("div",{className:"block-image__container",children:(0,n.jsx)("div",{className:"block-image__row",children:(0,n.jsx)("div",{className:"block-image__col",children:(0,n.jsx)(Be,{animateBlockEntrance:o,animateIn:"fadeInUp",duration:1,initiallyVisible:r,isLearner:a,children:i(t,s)})})})})}render(){const{animateBlockEntrance:t,blockId:s,defaultBackgroundColor:o,editable:r,getL10nValue:a,initiallyVisible:i,isLearner:c,items:l,labels:d,lessonId:h,settings:m,type:f,renderCaption:v=this.renderCaptionDelegate}=this.props,{entranceAnimation:C,opacity:g,opacityColor:x}=m,b=jh(m?.backgroundColor,o),T=X()(`block-image block-image--${f}`,"block-image--flag-dimensions",{"block-image--no-animation":!C,"block-image--dark":Rm(b)}),L={opacity:g||.6,backgroundColor:x||"transparent"},y=l[0],{id:S,caption:k}=y,N=a(y.media),I=N?.image,w=N?.audio,A=I?.key,E=dt(I),j=I?.dimensions,O=j?.width||j?.originalWidth,R=j?.height||j?.originalHeight,P=bo(I?.alt),M=f==="overlay",H=ac({caption:k,editable:r,id:S,isOverlayType:M,getL10nValue:a});return(0,n.jsxs)(Ee,{"aria-labelledby":H.figcaptionId,className:T,defaultBackgroundColor:o,role:H.role,tag:H.tagName,children:[PY(t,M,i,c,(0,n.jsxs)("div",{className:"block-image__figure",children:[A&&(0,n.jsxs)("div",{className:"block-image__image","data-l10n-id":Pt(y?.media),style:{backgroundImage:`url('${E}')`},children:[(0,n.jsx)(xs,{alt:P,height:R,src:E,width:O}),(0,n.jsx)("div",{className:"block-image__overlay",style:L}),w&&Pf(f)&&(0,n.jsx)(Xt,{blockId:s,index:`${s}-${S}-0`,isOverlayAudio:!0,item:y,labels:d,lessonId:h,media:y.media,mediaType:"audio"})]}),M?this.renderOverlayCaption(S,k):null]})),!M&&(r||k)&&(0,n.jsx)("figcaption",{className:"block-image__container",id:H.figcaptionId,children:v(S,k)})]})}}const Mf=Ze(BY),DY=e=>(0,n.jsx)(Mf,{type:"overlay",...e}),FY=e=>(0,n.jsx)(Mf,{type:"banner",...e});var HY=p(82920);function ny(e){class t extends HY.Component{static displayName=`withGalleryCaption(${e.displayName||e.name})`;renderCaptionDelegate;constructor(o){super(o),this.renderCaptionDelegate=this.renderCaption.bind(this)}renderCaption(o,r,a=!0){return(0,n.jsx)(We,{allowTabNavigation:a,className:"block-gallery__caption",value:r})}render(){const{renderCaption:o=this.renderCaptionDelegate}=this.props;return(0,n.jsx)(e,{...this.props,renderCaption:o})}}return t}var Hd=p(82920);const oy=$("block-gallery-carousel");function $Y({blockId:e,animateBlockEntrance:t,defaultBackgroundColor:s,editable:o,initiallyVisible:r,isLearner:a,labels:i,lessonId:c,items:l,onStep:d,previewType:h,renderCaption:m,settings:f}){l||=[];const[v,C]=Hd.useState(0),g=Hd.useCallback(L=>{C(L),d?.(l[L])},[l,d]),x=h===sr.MOBILE_PORTRAIT||h===sr.MOBILE_LANDSCAPE,b=oy({noAnimation:!f?.entranceAnimation||ws()}).toString(),T=J0();return(0,n.jsx)(Ee,{className:b,defaultBackgroundColor:s,children:(0,n.jsx)(Be,{animateBlockEntrance:t,initiallyVisible:r,isLearner:a,children:(0,n.jsx)(lc,{className:oy("container").toString(),children:(0,n.jsx)(Bd,{blockId:e,items:l,children:({carouselRef:L})=>(0,n.jsx)(Od,{isRTL:T,labelCarousel:i?.a11yBlockImageCarousel,labelCarouselRoleDesc:i?.a11yBlockImageCarouselRoleDescription,labelSlideControls:i?.a11yBlockImageCarouselSlideControls,labelSlideControlsGoToNext:i?.a11yBlockImageCarouselSlideControlsGoToNext,labelSlideControlsGoToPrevious:i?.a11yBlockImageCarouselSlideControlsGoToPrevious,labelSlideControlsGoToSlide:i?.a11yBlockImageCarouselSlideControlsGoToSlide,labelSlideCounterPreposition:i?.blocksPreposition,labelSlidePreposition:i?.a11yBlockImageCarouselSlidePreposition,labelSlideRoleDesc:i?.a11yBlockImageCarouselSlideRoleDescription,onChange:g,ref:L,shouldMouseEmulateTouch:x,children:l.map((y,S)=>(0,n.jsx)(zY,{activeIndex:v,blockId:e,editable:o,index:S,item:y,labels:i,lessonId:c,renderCaption:m,settings:f},y.id))})})})})})}const VY=ny($Y),Of=$("block-gallery-carousel-item");function zY({activeIndex:e,blockId:t,editable:s,index:o,item:r,labels:a,lessonId:i,renderCaption:c,settings:l}){const[d,h]=Hd.useState(!1),{image:m,audio:f}=Ae(r.media),v=Ae(m?.link?.destination),C=m?.dimensions,g=Hd.useCallback(()=>{h(!0)},[]);return(0,n.jsxs)("figure",{className:Of(),children:[s&&!d&&(0,n.jsx)("div",{className:Of("loading"),children:"Loading image..."}),(0,n.jsxs)("div",{className:Of("image-container",{"audio-overlay":!!f}),children:[(0,n.jsx)(Fa,{alt:m?.alt,cornerRadius:l?.cornerRadius,disableZoom:!l?.zoomOnClick,height:C?.height||C?.originalHeight,l10nId:Pt(r?.media),labels:a,link:m?.link&&typeof v=="string"?{type:m.link.type,destination:v}:void 0,maxHeight:900,onLoad:g,src:dt(m),width:C?.width||C?.originalWidth}),f&&(0,n.jsx)(Xt,{blockId:t,cornerRadius:l?.cornerRadius,index:`${t}-${r.id}-${o}`,isOverlayAudio:!0,item:r,labels:a,lessonId:i,media:r.media,mediaType:"audio",shouldPause:e!==o})]}),(s||r.caption)&&d&&(0,n.jsx)("figcaption",{children:c(r.id,r.caption)})]})}const UY=({alt:e,cornerRadius:t,disableZoom:s,height:o,l10nId:r,labels:a,link:i,src:c,width:l})=>(0,n.jsx)("div",{className:"block-gallery__image",children:(0,n.jsx)(Fa,{alt:e,cornerRadius:t,disableZoom:s,height:o,l10nId:r,labels:a,link:i,maxHeight:900,src:c,width:l})}),_Y=e=>{switch(e){case 3:return"threecol";case 4:return"fourcol";default:return"twocol"}};function GY(e){return(0,n.jsx)(VY,{...e})}class WY extends u.Component{static get defaultProps(){return{blockId:"",getL10nValue:()=>{},items:[],lessonId:"",width:2}}render(){const{animateBlockEntrance:t,defaultBackgroundColor:s,editable:o,getL10nValue:r,initiallyVisible:a,isLearner:i,items:c,labels:l,renderCaption:d,settings:h,width:m}=this.props,{entranceAnimation:f,cornerRadius:v,zoomOnClick:C}=h,g=X()(`block-gallery block-gallery--${_Y(m)}`,{"block-gallery--no-animation":!f||ws()});return(0,n.jsx)(Ee,{className:g,defaultBackgroundColor:s,children:(0,n.jsx)("div",{className:"block-gallery__container",children:(0,n.jsx)("div",{className:"block-gallery__row",children:(0,n.jsx)(Be,{animateBlockEntrance:t,initiallyVisible:a,isLearner:i,siblingDelay:.25,children:c.map(x=>{const{id:b}=x,T=x.caption,L=r(x.media)?.image,y=L?.alt,S=L?.key,k=L?.dimensions,N=k?.width||k?.originalWidth,I=k?.height||k?.originalHeight,w=dt(L),A=r(L?.link?.destination),E=ac({caption:T,editable:o,id:b,getL10nValue:this.props.getL10nValue});return(0,n.jsx)("div",{className:"block-gallery__col",children:(0,n.jsxs)(E.tagName,{"aria-labelledby":E.figcaptionId,className:"block-gallery__figure",role:E.role,children:[S&&(0,n.jsx)(UY,{alt:y,cornerRadius:v,disableZoom:!C,height:I,l10nId:Pt(x?.media),labels:l,link:L?.link&&typeof A=="string"?{type:L.link.type,destination:A}:void 0,src:w,width:N}),(o||T)&&(0,n.jsx)("figcaption",{id:E.figcaptionId,children:d(b,T)})]})},b)})})})})})}}const Bf=ny(Ze(WY)),Df=$("block-divider"),Ff=({isLearner:e,labels:{numberedDividerGroup:t},number:s,settings:o,type:r="divider"})=>{const{entranceAnimation:a}=o,i=r==="numbered",l=Df({authoring:!e,spacing:r==="spacing",numbered:i,"no-animation":!a}).toString(),d=i?(0,n.jsxs)("div",{className:Df("wrap__number"),children:[(0,n.jsx)("span",{className:"visually-hidden-always",children:t}),s]}):null;return(0,n.jsx)(Ee,{className:l,children:(0,n.jsx)("div",{className:Df("wrap",{authoring:!e&&!i}),children:d})})},KY=Ff,QY=e=>(0,n.jsx)(Ff,{type:"numbered",...e}),YY=e=>(0,n.jsx)(Ff,{type:"spacing",...e});var ZY=p(8608),XY=p.n(ZY),qY=p(48451),ry=p.n(qY),JY=p(98334),$d=p.n(JY),eZ=p(99969),Vd=p.n(eZ),zd=p(82920);const tZ=30,ay=wh("blockSettings");class sZ extends zd.Component{static defaultProps={blockId:"",blockSettings:{},editable:!1,items:[],lessonId:"",onStep:()=>{}};render(){const{animateBlockEntrance:t,blockId:s,editable:o,initiallyVisible:r,isLearner:a,items:i,labels:c,lessonId:l,onStep:d,settings:h,enableVideoPlaybackSpeed:m}=this.props,{entranceAnimation:f,accordionBehavior:v="keepOpen"}=h,C=X()("blocks-accordion",{"blocks-accordion--no-animation":!f});return(0,n.jsx)(Ee,{className:C,"data-block-id":s,children:(0,n.jsx)(Be,{animateBlockEntrance:t,duration:.75,initiallyVisible:r,isLearner:a,children:(0,n.jsx)("div",{className:"blocks-accordion__container",children:(0,n.jsx)("div",{className:"blocks-accordion__row",children:(0,n.jsx)("div",{className:"blocks-accordion__col",children:(0,n.jsx)(lZ,{blockId:s,editable:o,enableVideoPlaybackSpeed:m,items:i,keepOpen:v==="keepOpen",labels:c,lessonId:l,onStep:d,settings:h})})})})})})}}const nZ={isOpen:!1,isActive:!1},oZ=e=>(t,{id:s})=>Object.assign({},t,{[s]:e[s]||nZ}),iy=(e,t)=>t.reduce(oZ(e),{}),rZ=(e,t)=>(s,o)=>{const r=e==o,a=r?!s.isOpen:s.isOpen,i=r&&!s.isOpen;return{isOpen:t?a:i,isActive:r}},aZ=e=>(t,s)=>{const o=s==e;return{isOpen:o,isActive:o}},iZ=e=>(t,s)=>({isOpen:s==e,isActive:t.isActive});class cZ extends zd.Component{static defaultProps={blockId:"",blockSettings:{},editable:!1,items:[],keepOpen:!1,lessonId:"",onStep:()=>{}};constructor(t){super(t);const{items:s}=this.props;this.state={itemStatusMap:iy({},s)},this.handleNavtoTab=this.handleNavtoTab.bind(this)}componentDidMount(){window.addEventListener(Ge,this.handleNavtoTab)}componentWillUnmount(){window.removeEventListener(Ge,this.handleNavtoTab)}handleNavtoTab(t){const s=t.detail.path[t.detail.path.indexOf("items")+1]?.id,o=t.detail.path[t.detail.path.lastIndexOf("items")+1]?.id;if(s===this.props.blockId){const r=this.props.items.findIndex(({id:h})=>h===o),{items:a,onStep:i}=this.props,{itemStatusMap:c}=this.state,l=a[r].id,d=aZ(l);this.setState({itemStatusMap:Cn()(d,c)}),open&&i(a[r])}}UNSAFE_componentWillReceiveProps(t){const s=t.items,o=Hs()(s)!==Hs()(this.props.items);!t.keepOpen&&this.props.keepOpen?this.updateMapForOneAtATimePreference():o&&this.rebuildItemStatusMap(s)}updateMapForOneAtATimePreference(){const{itemStatusMap:t}=this.state,{items:s}=this.props,o=XY()(a=>t[a.id].isOpen,s);if(!o)return;const r=iZ(o.id);this.setState({itemStatusMap:Cn()(r,t)})}rebuildItemStatusMap(t){const s=this.state.itemStatusMap;this.setState({itemStatusMap:iy(s,t)})}handleItemClick(t){const{items:s,keepOpen:o,onStep:r}=this.props,{itemStatusMap:a}=this.state,i=s[t].id,c=rZ(i,o);this.setState({itemStatusMap:Cn()(c,a)}),open&&r(s[t])}render(){const{items:t,settings:s,editable:o,labels:r,lessonId:a,blockId:i,enableVideoPlaybackSpeed:c}=this.props,{itemStatusMap:l}=this.state,{zoomOnClick:d}=s,h=Object.values(l)?.find(m=>m.isOpen)?"open":"closed";return(0,n.jsx)("div",{className:"blocks-accordion__wrapper","data-accordion-status":h,children:t.map((m,f)=>(0,n.jsx)(uZ,{blockId:i,disableZoom:!d,editable:o,focused:l[m.id].isActive,index:f,item:{...m,enableVideoPlaybackSpeed:c},labels:r,lessonId:a,onClick:this.handleItemClick.bind(this,f),open:l[m.id].isOpen},m.id))})}}const lZ=ay(cZ);class dZ extends zd.Component{static get defaultProps(){return{editable:!1,getL10nValue:()=>{},onClick:()=>{},lessonId:"",blockId:"",open:null}}id;content;constructor(t){super(t),this.id=$d()(),this.toggle=this.toggle.bind(this),this.renderDescription=this.renderDescription.bind(this),this.renderTitle=this.renderTitle.bind(this)}componentDidUpdate(t){if(!this.props.open)return;const s=this.content;if(s&&(s.classList.add("blocks-accordion__content--visible"),!t.open&&this.props.open)){const o=s.parentElement,r=o?.getBoundingClientRect()?.top,a=r!=null&&r>0&&r<window.innerHeight,i=ws()?"instant":"smooth";a||o.scrollIntoView({behavior:i,block:"start"})}}toggle(t){const{blockId:s,index:o}=this.props,r=Ce.playerId,a=new RegExp(`-${o}(?:-.+)?$`);open&&r&&r.includes(s.toString())&&a.test(r)&&Ce.pause(),this.props.onClick(),t.preventDefault()}renderTitle(t){const{title:s}=this.props.item;return(0,n.jsx)(ke,{className:"blocks-accordion__title",id:t,value:s})}renderDescription(t){const{description:s=""}=this.props.item;return(0,n.jsx)(We,{className:"blocks-accordion__description",value:s||""},t)}render(){const{blockId:t,blockSettings:s,editable:o,disableZoom:r,getL10nValue:a,index:i,item:c,focused:l,labels:d,lessonId:h,open:m,renderDescription:f=this.renderDescription,renderTitle:v=this.renderTitle}=this.props,{settings:C={},enableVideoPlaybackSpeed:g}=c,x=a(c.media)??{},b=pn(x,s.audioPosition),T=Object.assign({},C,{disableZoom:r,fullEmbed:!0}),L=s?.backgroundType===ne.ACCENT||s?.backgroundType===ne.IMAGE,y=X()("blocks-accordion__item",{"blocks-accordion__item--closed":!m}),S=X()("blocks-accordion__header",{"blocks-accordion__header--editing":o,"brand--border":m&&l&&!L}),k=X()("blocks-accordion__content",{"blocks-accordion__content--will-enter":m,"brand--border":m&&l&&!L}),N=`title-${this.id}`,I=`panel-${this.id}`,w=s?.headingLevel,A=w?`h${w}`:"h2";let E=(0,n.jsxs)("button",{"aria-controls":I,"aria-expanded":m,className:S,onClick:this.toggle,onKeyDown:!o&&i2(this.toggle)||void 0,type:"button",children:[v(N),(0,n.jsx)("span",{className:"blocks-accordion__toggler-wrap",children:(0,n.jsx)(ie,{className:"blocks-accordion__toggler",name:m?"minus":"plus"})})]});return o&&(E=(0,n.jsxs)("div",{className:S,children:[v(N),(0,n.jsx)("button",{"aria-controls":I,"aria-expanded":m,"aria-label":m?"Close":"Open",className:"blocks-accordion__toggler-wrap",onClick:this.toggle,type:"button",children:(0,n.jsx)(ie,{className:"blocks-accordion__toggler",name:m?"minus":"plus"})})]})),(0,n.jsxs)(Gt,{className:y,tag:"section",children:[(0,n.jsx)("div",{className:"blocks-accordion__header-wrap",children:(0,n.jsx)(A,{children:E})}),(0,n.jsx)("section",{"aria-labelledby":N,className:k,id:I,ref:j=>{this.content=j},children:b.renderOrder.map((j,O)=>{if(j==="text")return f(`text-${O}`);const R={blockId:t,hasPadding:!1,imageMaxHeight:1e3,item:c,labels:d,lessonId:h,enableVideoPlaybackSpeed:g,opts:T,shouldPause:!m},P=Hf(x),M=P==="image-with-audio",H=M?"left":"center",D={audio:{media:b.audioOnlyMedia||x,isOverlayAudio:!1,index:`${t}-${i}-audio`,className:"blocks-accordion__audio"},image:{media:b.imageOnlyMedia||x,isOverlayAudio:!1,index:`${t}-${i}-image`,className:X()(`blocks-accordion__${P}`,{[`blocks-accordion__${P}--${H}`]:M})},video:{media:b.videoOnlyMedia||x,isOverlayAudio:!1,index:`${t}-${i}-video`,className:X()(`blocks-accordion__${P}`,{[`blocks-accordion__${P}--${H}`]:M})},embed:{media:b.embedOnlyMedia||x,isOverlayAudio:!1,index:`${t}-${i}-embed`,className:X()(`blocks-accordion__${P}`,{[`blocks-accordion__${P}--${H}`]:M})},overlay:{media:x,isOverlayAudio:!0,index:`${t}-${i}-overlay`,className:X()(`blocks-accordion__${P}`,{[`blocks-accordion__${P}--${H}`]:M})}}[j];if(!D)return null;const{className:V,...W}=D;return(0,n.jsx)("div",{className:X()(V,{"audio-on-top":this.props.blockSettings.audioPosition==="top"}),children:(0,n.jsx)("div",{className:"blocks-accordion__figure",children:(0,n.jsx)(Xt,{...R,...W})})},`${j}-${O}`)})})]})}getMediaContainerClasses(t,s){const o=this.props.getL10nValue(this.props.item.media)??{},r=Hf(o),a=r==="image-with-audio",i=a&&!Array.isArray(o)?o?.image?.align:"left";return X()("blocks-accordion__media",`blocks-accordion__${r}`,{[`blocks-accordion__${r}--${i}`]:a,"blocks-accordion__media-container":t,"blocks-accordion__media-container--audio-overlay":s})}}const uZ=ay(Ze(e=>(0,n.jsx)(dZ,{...e}))),Hf=e=>{const{image:t,embed:s,video:o,audio:r}=e;return t&&!r?"image":s&&!r?"embed":o?"video":r&&!t&&!s?"audio":t&&r?"image-with-audio":r&&s?"audio-and-embed":"image"};class hZ extends zd.Component{static get defaultProps(){return{items:[],activeIndex:0,getL10nValue:()=>{},lessonId:"",blockId:"",blockSettings:{},onStep:Function.prototype}}tabs;id;tabResize;tabScroll;arrowNextEl;arrowPrevEl;container;tabControls;tabsHeaderEl;constructor(t){super(t),this.renderDescription=this.renderDescription.bind(this);const s=this.props.activeIndex;this.state={activeIndex:s,activeTouch:!1,activeMouse:!1},this.tabs=[],this.id=$d()(),this.handleNavtoTab=this.handleNavtoTab.bind(this)}componentDidMount(){this.handleControls(),window.addEventListener("resize",this.tabResize=Vd()(this.handleControls.bind(this),100)),window.addEventListener(Ge,this.handleNavtoTab),this.tabsHeaderEl?.addEventListener("scroll",this.tabScroll=Vd()(this.handleControls.bind(this),50))}handleNavtoTab(t){const s=t.detail.path[t.detail.path.indexOf("items")+1]?.id,o=t.detail.path[t.detail.path.lastIndexOf("items")+1]?.id;s===this.props.blockId&&(this.tabsHeaderEl.scrollIntoView({behavior:"smooth",block:"start"}),this.setState({activeIndex:this.props.items.findIndex(({id:r})=>r===o)},()=>{wm(this.tabsHeaderEl,"start")||this.tabsHeaderEl.scrollIntoView({behavior:"instant",block:"start"})}))}componentDidUpdate(){this.handleControls()}componentWillUnmount(){this.tabsHeaderEl?.removeEventListener("scroll",this.tabScroll),window.removeEventListener("resize",this.tabResize),window.removeEventListener(Ge,this.handleNavtoTab)}setActive(t){this.setState({activeIndex:t});const{blockId:s}=this.props,o=Ce.playerId;this.state.activeIndex!=t&&o&&o.includes(s.toString())&&Ce.pause(),this.props.onStep?.(this.props.items[t])}handleControls(){const{isRTL:t}=this.props;this.tabsHeaderEl.offsetWidth===this.tabsHeaderEl.scrollWidth?(this.arrowPrevEl.classList.add("hidden"),this.arrowNextEl.classList.add("hidden"),this.tabControls.classList.add("start"),this.tabControls.classList.add("end")):(this.tabsHeaderEl.scrollLeft===0?(this.arrowPrevEl.classList.add("hidden"),this.tabControls.classList.add("start")):(this.arrowPrevEl.classList.remove("hidden"),this.tabControls.classList.remove("start")),this.tabsHeaderEl.scrollLeft===(this.tabsHeaderEl.scrollWidth-this.tabsHeaderEl.offsetWidth)*(t?-1:1)?(this.arrowNextEl.classList.add("hidden"),this.tabControls.classList.add("end")):(this.arrowNextEl.classList.remove("hidden"),this.tabControls.classList.remove("end")))}handleMouseEnter(){this.state.activeTouch||this.setState({activeMouse:!0})}handleMouseLeave(){this.setState({activeMouse:!1})}handleTouchStart(){this.setState({activeTouch:!0})}scrollTabs(t){const{isRTL:s}=this.props,o=this.tabsHeaderEl.offsetWidth,r=this.tabsHeaderEl.scrollLeft,i=(t==="next"?s?ry():Jm():s?Jm():ry())(r,o*.8);this.tabsHeaderEl.scrollTo({left:i,behavior:"smooth"})}arrowPrevInset(t){const s=this.arrowPrevEl.getBoundingClientRect(),o=s.right-t,r=s.left-t;return o+r}focusTab(t){t.currentTarget?.scrollIntoView({behavior:"smooth",block:"nearest"})}handleTabKeyDown(t,s){const{isRTL:o}=this.props;let r=!1,a;Kn(s)?(r=!0,a=o?t+1>this.tabs.length-1?0:t+1:t-1>=0?t-1:this.tabs.length-1):Qn(s)&&(r=!0,a=o?t-1>=0?t-1:this.tabs.length-1:t+1>this.tabs.length-1?0:t+1),r&&s.preventDefault(),a!=null&&(this.tabs[a]?.focus(),this.setActive(a))}renderHeader(t,s){const{activeIndex:o,activeTouch:r,activeMouse:a}=this.state,i=this.tabsHeaderEl&&this.tabsHeaderEl.scrollWidth>this.tabsHeaderEl.clientWidth,c=X()("blocks-tabs__header-wrap",{touch:r,mouse:a&&i});return(0,n.jsxs)("div",{className:c,onMouseEnter:this.handleMouseEnter.bind(this),onMouseLeave:this.handleMouseLeave.bind(this),onTouchStart:this.handleTouchStart.bind(this),children:[(0,n.jsx)("div",{className:"blocks-tabs__header",ref:l=>{this.tabsHeaderEl=l},role:FQ,children:t.map(({title:l},d)=>{const h=t.length===1||d===o,m=t.length>1&&d+1===o,f=t.length>1&&d-1===o,v=X()("blocks-tabs__header-item",{"brand--color":h&&!s,"blocks-tabs__header-item--active":h,"blocks-tabs__header-item--before-active":m,"blocks-tabs__header-item--after-active":f}),C=`tab-${this.id}-${d}`,g=`tabpanel-${this.id}-${d}`;return(0,n.jsx)("button",{"aria-controls":g,"aria-selected":h,className:v,id:C,onClick:this.setActive.bind(this,d),onFocus:this.focusTab.bind(this),onKeyDown:this.handleTabKeyDown.bind(this,d),ref:x=>{this.tabs[d]=x},role:"tab",tabIndex:h?void 0:-1,type:"button",children:(0,n.jsx)(ke,{value:l})},C)})}),(0,n.jsxs)("div",{className:"blocks-tabs__controls",ref:l=>{this.tabControls=l},children:[(0,n.jsx)("div",{"aria-hidden":"true",className:"blocks-tabs__arrow blocks-tabs__arrow--prev brand--background",onClick:this.scrollTabs.bind(this,"previous"),ref:l=>{this.arrowPrevEl=l},children:(0,n.jsx)(ie,{className:"blocks-tabs__arrow-icon",name:"chevron-right-solid"})}),(0,n.jsx)("div",{"aria-hidden":"true",className:"blocks-tabs__arrow blocks-tabs__arrow--next brand--background",onClick:this.scrollTabs.bind(this,"next"),ref:l=>{this.arrowNextEl=l},children:(0,n.jsx)(ie,{className:"blocks-tabs__arrow-icon blocks-tabs__arrow-icon--next",name:"chevron-right-solid"})})]})]})}renderDescription({description:t}){return(0,n.jsx)(We,{className:"blocks-tabs__description",value:t})}renderItem(t,s,o){const{blockId:r,getL10nValue:a,labels:i,lessonId:c,renderDescription:l=this.renderDescription}=this.props,{activeIndex:d}=this.state,h=d===s,{settings:m={},enableVideoPlaybackSpeed:f}=t,v=a(t.media)??{},C=pn(v,this.props.settings.audioPosition,!1),g=X()("blocks-tabs__content-item",{"blocks-tabs__content-item--active":h}),x=Object.assign({},m,{disableZoom:o,fullEmbed:!0}),b=`tabpanel-${this.id}-${s}`,T=`tab-${this.id}-${s}`,L=Hf(v),y=L==="image-with-audio",S=L==="audio-and-embed",k=y?v?.image?.align:"left",N=S?"embed-border":void 0;return(0,n.jsx)("div",{"aria-labelledby":T,className:g,id:b,role:HQ,tabIndex:h?0:void 0,children:C.renderOrder.map((I,w)=>{if(I==="text")return(0,n.jsx)("div",{className:"blocks-tabs__description",children:l(t)},`text-${w}`);const A={blockId:r,embedClass:N,hasPadding:!1,imageMaxHeight:1e3,item:t,labels:i,lessonId:c,enableVideoPlaybackSpeed:f,opts:x,shouldPause:!h},j={audio:{media:C.audioOnlyMedia||v,isOverlayAudio:!1,index:`${r}-${s}-audio`,className:"blocks-tabs__audio"},image:{media:C.imageOnlyMedia||v,isOverlayAudio:!1,index:`${r}-${s}-image`,className:X()(`blocks-tabs__${L}`,{[`blocks-tabs__${L}--${k}`]:y})},video:{media:C.videoOnlyMedia||v,isOverlayAudio:!1,index:`${r}-${s}-video`,className:X()(`blocks-tabs__${L}`,{[`blocks-tabs__${L}--${k}`]:y})},embed:{media:C.embedOnlyMedia||v,isOverlayAudio:!1,index:`${r}-${s}-embed`,className:X()(`blocks-tabs__${L}`,{[`blocks-tabs__${L}--${k}`]:y})},overlay:{media:v,isOverlayAudio:!0,index:`${r}-${s}-overlay`,className:X()(`blocks-tabs__${L}`,{[`blocks-tabs__${L}--${k}`]:y})}}[I];if(!j)return null;const{className:O,...R}=j;return(0,n.jsx)("div",{className:X()(O,{"audio-on-top":this.props.settings.audioPosition==="top"}),children:(0,n.jsx)("div",{className:"blocks-tabs__figure",children:(0,n.jsx)(Xt,{...A,...R})})},`${I}-${w}`)})},b)}render(){const{animateBlockEntrance:t,initiallyVisible:s,isLearner:o,items:r,settings:a,enableVideoPlaybackSpeed:i}=this.props,{backgroundType:c,cardMode:l,entranceAnimation:d,zoomOnClick:h}=a,m=X()("blocks-tabs",{"blocks-tabs--no-animation":!d}),f=r.length>0?r.slice(0,tZ):[],v=l===$s.TRANSPARENT&&(c===ne.ACCENT||c===ne.IMAGE),C=X()("blocks-tabs__container",{"blocks-tabs--single":f.length===1});return(0,n.jsx)(Ee,{className:m,children:(0,n.jsx)(Be,{animateBlockEntrance:t,initiallyVisible:s,isLearner:o,children:(0,n.jsx)("div",{className:C,children:(0,n.jsx)("div",{className:"blocks-tabs__row",children:(0,n.jsx)("div",{className:"blocks-tabs__col",children:(0,n.jsx)("div",{className:"blocks-tabs__wrapper",ref:g=>{this.container=g},children:(0,n.jsxs)(Gt,{children:[this.renderHeader(f,v),(0,n.jsx)("div",{className:"blocks-tabs__content",children:f.map((g,x)=>this.renderItem({...g,enableVideoPlaybackSpeed:i},x,!h))})]})})})})})})})}}const mZ=wf(Ze(e=>(0,n.jsx)(hZ,{...e}))),fZ=yt()(null,["payload","result"]),pZ=e=>{if(e.meta?.thumbnail)return`${e.contentPrefix}/${e.meta.thumbnail}`},gZ=e=>e.meta?.version,cy=e=>e.src??null,vZ=e=>e.processing,CZ=$n()(["payload","result","completion"]),xZ=yt()(!1,["payload","result","score"]),bZ=yl()((e,t)=>{if(!t)return!1;const{majorLimit:s,minorLimit:o}=e,[r,a]=t.split("."),i=parseInt(r)===s&&Number(a)>=o;return Number(r)>s||i}),yZ={mobile:"?forcemobile=1&devicepreview=1&phone=1&rise=true",tablet:"?forcemobile=1&devicepreview=1&rise=true"},TZ=e=>{const t=So()(e.split("-"));return yZ[t]},LZ=bZ({majorLimit:3,minorLimit:13}),SZ=(e,t,s,o)=>{const r=t&&TZ(s),a=r?`${e}${r}`:`${e}?rise=true`;if(o){const i=a.includes("?")?"&":"?";return`${a}${i}locale=${o}`}return a},ly="about:blank",kZ="https://example.invalid",dy=new Set(["http:","https:"]),uy=e=>{if(e)try{const t=new URL(e);return dy.has(t.protocol)?t.href:void 0}catch{return}},NZ=()=>uy(Ie("CDN_USER_CONTENT_URI"))??uy(window.location.origin)??kZ,hy=e=>{try{return dy.has(new URL(e,NZ()).protocol)}catch{return!1}},my=e=>{const t=bs(e);return typeof t=="string"?t:""},IZ=e=>{const t=my(e);if(!t||t===ly||!hy(t))return;const s=my(pt(t));return s&&s!==ly&&hy(s)?s:void 0};var EZ=p(82920);class jZ extends EZ.Component{constructor(t){super(t),this.state={fullscreen:!1,reopenMenu:!1},this.iframe=null,this.canFullscreen=this.canFullscreen.bind(this),this.handleCourseUpdate=this.handleCourseUpdate.bind(this),this.handleFullscreenEnter=this.handleFullscreenEnter.bind(this),this.handleFullscreenExit=this.handleFullscreenExit.bind(this),this.handleMessages=this.handleMessages.bind(this),this.renderItem=this.renderItem.bind(this)}iframe;static get defaultProps(){return{getL10nValue:()=>{},isLesson:!1,onStep:Function.prototype,hasManySlBlocks:Function.prototype,previewType:""}}UNSAFE_componentWillMount(){window.addEventListener("message",this.handleMessages)}componentWillUnmount(){window.removeEventListener("message",this.handleMessages)}componentDidMount(){const{getL10nValue:t,items:s,onStep:o}=this.props,r=So()(s),a=t(r?.media)?.storyline??{},i=gZ(a);LZ(i)||o(r)}canFullscreen(t){const{blockId:s,hasManySlBlocks:o}=this.props,{windowName:r}=t;return s===r||!o()}handleMessages(t){const{data:s}=t,{type:o}=s,r={"fullscreen:enter":this.handleFullscreenEnter,"fullscreen:exit":this.handleFullscreenExit,"course:update":this.handleCourseUpdate}[o];r&&r(s)}handleCourseUpdate(t){const{items:s,onFinishStoryline:o,onStep:r,blockId:a}=this.props,i=So()(s),{windowName:c}=t;if(a===c&&CZ(t)){const{score:l,success:d}=fZ(t);if(xZ(t)){const h=l.scaled*100;o?.(a,d,!0,h)}else o?.(a,!0,!1);r(i)}}handleFullscreenEnter(t){const{menuOpen:s,handleStorylineFullscreen:o}=this.props;this.canFullscreen(t)&&(s&&o(!0),this.setState({fullscreen:!0,reopenMenu:s}))}handleFullscreenExit(t){const{handleStorylineFullscreen:s}=this.props,{reopenMenu:o}=this.state;this.canFullscreen(t)&&(o&&s(!1),this.setState({fullscreen:!1,reopenMenu:!1}))}render(){const{animateBlockEntrance:t,getL10nValue:s,initiallyVisible:o,isLesson:r,isLearner:a,isOnlyBlockInStep:i,items:c,labels:{a11yBlockStoryline:l},settings:d,takingSnapshot:h}=this.props,m=So()(c),f=s(m?.media)?.storyline??{},{mediaWidth:v="0"}=d,C=i?{}:{display:r&&!cy(f)?"none":"block"},g=X()("blocks-storyline__wrapper",{"blocks-storyline__wrapper--small":v==="0","blocks-storyline__wrapper--medium":v==="1","blocks-storyline__wrapper--full":v==="2","blocks-storyline__wrapper--snapshot":h});return(0,n.jsx)(Ee,{className:"blocks-storyline",style:C,children:(0,n.jsx)(Be,{animateBlockEntrance:t,initiallyVisible:o,isLearner:a,children:(0,n.jsx)("div",{"aria-label":l,className:g,role:"group",children:h?this.renderThumbnail(f):this.renderStorylineBlock(f)})})})}renderStorylineBlock(t){return vZ(t)?this.renderProcessing():cy(t)?this.renderItem(t):this.renderEmpty()}renderThumbnail(t){const s=pZ(t),o=`${Ie("CDN_USER_CONTENT_URI")}/${s}`;return(0,n.jsx)("img",{alt:"Thumbnail",src:o})}renderEmpty(){const{renderEmpty:t}=this.props;return typeof t=="function"?t():null}renderItem(t){const{fullscreen:s}=this.state,{blockId:o,currentLocale:r,isLesson:a,previewType:i,settings:c}=this.props,{cornerRadius:l}=c,{src:d,meta:h,title:m}=t,{player:f}=h,v=SZ(d,a,i,r),C=IZ(v),x={paddingBottom:`${f.height/f.width*100}%`,...l!=null&&{"--corner-radius":`${Number(l)}px`}},b=X()("blocks-storyline__item__iframe",{"blocks-storyline__item__iframe--fullscreen":s});return(0,n.jsx)("div",{className:"blocks-storyline__item",style:x,children:(0,n.jsx)("iframe",{allowFullScreen:!0,allowtransparency:"true",className:b,loading:"lazy",name:o.toString(),ref:T=>{this.iframe=T},src:C,title:m})})}renderProcessing(){const{renderProcessing:t}=this.props;return typeof t=="function"?t():null}}const wZ=vI(Ze(jZ));var AZ=p(27447),$f=p.n(AZ);const fy=":focus{outline: none}",RZ=":focus:not(:focus-visible){outline: none}",py="focus-ring-style",Vf=()=>document.getElementById(py)||PZ(),PZ=()=>{const e=document.createElement("style");return e.id=py,document.head.appendChild(e),e},MZ=0,OZ=-1,BZ=e=>{const t=Vf();document.addEventListener("mousedown",()=>{setTimeout(()=>{t.innerHTML=fy},0),e?.(!1)}),window.addEventListener("keydown",s=>{DZ(s,e)})},DZ=(e,t)=>{const s=e.target,o=Vf();(Tl(e)||ki(e)&&!s.classList.contains("ignore-prefers"))&&(o.innerHTML="",t?.(!0))},gy=({focusVisible:e}={})=>Vf().innerHTML=e?RZ:fy,FZ=e=>e?MZ:OZ,vy=({list:e,index:t})=>{t>=0&&t<Hs()(e)&&e[t].focus()},HZ=({list:e,currentIndex:t})=>{const s=al()(t||0),o=s<Hs()(e)?s:0;return vy({list:e,index:o}),o},$Z=({list:e,currentIndex:t})=>{const s=$f()(t||Hs()(e));return vy({list:e,index:s}),s};var Cy=p(82920);const Ud=$("blocks-button"),xy=U8,VZ=({description:e})=>(0,n.jsx)(ke,{className:Ud("description"),value:e}),zZ=({color:e,destination:t,editBlock:s,handleNavigate:o,isEditable:r,label:a,type:i})=>{const c=fC(),l=De()?.externalLinksDisabled,d=De()?.theme,h=gi(),{mode:m}=(0,we.g)(),f=rs(),v=Mt(),C=Ae(t),g=(0,Sr.htmlDecode)(Ss(Ae(a))),x=i==="email",b=i==="exit-course",T=i==="lesson",L=i==="relative-url",y=Ud("button"),S=!e||e===""||e===h,k=e??h,N={},I=pC(h),w=S&&d?.accentContrast===Te.AUTO?Te.AUTO:I,A=f?.buttonColorContrast??w,E=f?.buttonRadius??null,j=f?.buttonWidth??null,O=zt({backgroundColor:k,contrast:A});Object.assign(N,{...!S&&{"--color-button-bg":k},...!S&&{"--color-button-text":O},...!S&&{"--color-button-border":"transparent"},...E!=null&&{"--radius-button":`${Number(E)}px`},...j!=null&&{"--width-button":`${Number(j)}rem`}});const R=l&&Vs(C),{handleMouseEnter:P,handleMouseLeave:M,handleFocus:H,handleBlur:F}=Il(),D=Cy.useId(),V=(0,u.useCallback)(()=>{if(r)s();else{if(R)return;if(b)return Up()}},[s,R,r,b]),W=(0,u.useCallback)(()=>{o(C)},[C,o]);if(r||R||b){const _=(0,n.jsx)("button",{"aria-label":g,className:y,id:R?D:void 0,onBlur:R?()=>F(D):void 0,onClick:V,onFocus:R?()=>H(D):void 0,onKeyDown:i2(V),onMouseEnter:R?()=>P(D):void 0,onMouseLeave:R?()=>M(D):void 0,style:N,tabIndex:0,type:"button",children:g});return R?(0,n.jsxs)(n.Fragment,{children:[_,(0,n.jsx)(El,{anchorId:D})]}):_}else if(T){const _=C?Ns(C,m):"#";return(0,n.jsx)(as,{"aria-label":g,className:y,onClick:W,style:N,to:_,children:g})}else{const _=L?C:bs(C),Z=x?`mailto:${C}?subject=${c}`:_,oe=Yn.isIphoneSafari?"_top":"_self",Q=x?oe:"_blank",U=Q==="_blank",B=U?"noopener noreferrer nofollow":void 0,z=v?.a11yNoticeLinkNewTab||"(opens in a new tab)",K=U?`${g} ${z}`:g;return(0,n.jsx)("a",{"aria-label":K,className:y,href:Z,rel:B,style:N,tabIndex:0,target:Q,children:g})}},by=e=>{const{animateBlockEntrance:t,editable:s,editBlock:o=()=>{},handleNavigate:r,initiallyVisible:a,isLearner:i,items:c=[],renderDescription:l=VZ,settings:d}=e,{buttonAlignment:h="right",buttonColor:m,buttonShowDescription:f=!0,buttonStack:v,entranceAnimation:C}=d,g=Ud(null,{"no-animation":!C,description:f==!0,center:h==="center",left:h==="left",right:h==="right",rounded:xy==="rounded"}),x=c?.map(({id:b,description:T,...L})=>{const y=(0,n.jsx)(zZ,{...L,color:m,editBlock:o,handleNavigate:r,isEditable:s}),S=f&&l({id:b,description:T});return(0,n.jsx)("section",{className:Ud("container"),children:h==="left"&&f?(0,n.jsxs)(n.Fragment,{children:[y,S]}):(0,n.jsxs)(n.Fragment,{children:[S,y]})},b)})??null;if(v){const{paddingBottom:b,paddingTop:T}=d,L={...T!=null&&{paddingTop:`${Number(T)}rem`},...b!=null&&{paddingBottom:`${Number(b)}rem`}};return(0,n.jsx)("div",{className:g.toString(),style:L,children:x})}return(0,n.jsx)(Ee,{className:g.toString(),children:(0,n.jsx)(Be,{animateBlockEntrance:t,animateIn:"fadeIn",initiallyVisible:a,isLearner:i,children:(0,n.jsx)("div",{className:"blocks-button",children:x})})})},UZ=by;class _Z extends Cy.Component{renderButtonDelegate;constructor(t){super(t),this.renderButtonDelegate=this.renderButton.bind(this)}static get defaultProps(){return{items:[],lessonId:"",blockId:"",editBlock:()=>{}}}renderButton(t,s){const{blockId:o,editable:r,editBlock:a,handleNavigate:i,isLearner:c,lessonId:l,initiallyVisible:d}=this.props;return(0,n.jsx)(by,{animateBlockEntrance:!1,blockId:o,editable:r,editBlock:a,handleNavigate:i,initiallyVisible:d,isLearner:c,items:[t],lessonId:l,settings:s,type:"right"})}render(){const{animateBlockEntrance:t,initiallyVisible:s,isLearner:o,items:r,settings:a,renderButton:i=this.renderButtonDelegate}=this.props,{entranceAnimation:c,buttonShowDescription:l=!0,buttonAlignment:d="right",buttonSpacing:h=3}=a,m=X()("blocks-buttonstack",{"blocks-buttonstack--no-animation":!c,"blocks-button--description":l==!0,"blocks-button--center":d==="center","blocks-button--left":d==="left","blocks-button--right":d==="right","blocks-button--rounded":xy==="rounded"});return(0,n.jsx)(Ee,{className:m,children:(0,n.jsx)(Be,{animateBlockEntrance:t,initiallyVisible:s,isLearner:o,children:r.map((f,v)=>{const C=v===0,g={buttonColor:a.buttonColor||this.props.color,buttonStyle:a.buttonStyle,buttonStack:!0,buttonShowDescription:l,buttonAlignment:d,...C?{}:{paddingTop:h}};return(0,n.jsx)(u.Fragment,{children:i(f,g)},f.id)})})})}}var GZ=p(92496),WZ=p.n(GZ);const _d=$("block-video");function KZ({item:e}){const t=Ot(),{media:s}=e,o=t(s)??{},{customVideo:r={},tmp:a={},video:i={}}=o,c="poster"in i?i:{...i,...r},l=a.video&&"poster"in a.video?a.video:void 0,{poster:d}=Ja()?c:l||c,h=d?pt(d):void 0;return(0,n.jsxs)("div",{className:_d("poster-container"),children:[(0,n.jsx)(xs,{alt:"Video Poster",className:_d("poster"),src:h}),(0,n.jsx)("div",{className:_d("play-overlay"),children:(0,n.jsxs)("svg",{className:_d("play-icon"),fill:"currentColor",height:"80",viewBox:"0 0 24 24",width:"80",children:[(0,n.jsx)("circle",{cx:"12",cy:"12",fill:"rgba(0,0,0,0.6)",r:"12"}),(0,n.jsx)("polygon",{fill:"white",points:"10,8 10,16 16,12"})]})})]})}const yy=$("block-video");function QZ({mediaWidth:e}){const t=yy("item",{small:e==="0",medium:e==="1",full:e==="2"});return(0,n.jsx)("div",{className:t,children:(0,n.jsx)("div",{className:yy("placeholder")})})}const YZ=qs()("partner-content-block-card__"),Ty=e=>{const{backgroundColor:t,blockId:s,partnerContent:o}=e,r=De(),{id:a,tenantId:i}=r??{},{data:c,type:l}=o,{authors:d,bookImage:h,bookTitle:m,buyLink:f,internalId:v,nbicLink:C}=c,g={blockId:s,courseId:a,partnerContentId:v,tenantId:i,contentSubtype:l};return(0,n.jsxs)("section",{children:[(0,n.jsx)("h2",{className:"visually-hidden",children:"More Info"}),(0,n.jsxs)("ol",{className:"partner-content-block-card",role:"list",children:[(0,n.jsx)("li",{role:"listitem",children:(0,n.jsx)(Rx,{authors:d,backgroundColor:t,block:!0,bookImage:h,bookTitle:m,buyLink:f,trackingInfo:g})}),(0,n.jsx)("li",{role:"listitem",children:(0,n.jsx)("div",{className:YZ("divider")})}),(0,n.jsx)("li",{role:"listitem",children:(0,n.jsx)(Px,{backgroundColor:t,block:!0,link:C,trackingInfo:g})})]})]})};var zf=p(82920);const Gd=$("block-video"),ZZ={"--ov-width":"100%","--ov-max-height":"none"},XZ={"--ov-height":"100%","--ov-max-height":"none"};function qZ({audioVideoPlayhead:e,backgroundColor:t,blockId:s,blockPartnerContent:o,blockPartnerContentExists:r,captions:a,cornerRadius:i,currentLocale:c,dataL10nId:l,enableVideoPlaybackSpeed:d,forwardSeekRestricted:h,id:m,isLoaded:f,item:v,lessonId:C,loadMedia:g,media:x,mediaWidth:b,onLoad:T,onProgressChanged:L,poster:y,recordMediaPlayheadPosition:S,renderCaption:k,renderPostVideoSlot:N,subtitle:I,type:w,videoKey:A,videoSrc:E}){const j=b==="2",[O,R]=zf.useState(null),P=Gd("item",{small:b==="0",medium:b==="1",full:j}),M=zf.useCallback(({player:D})=>{const V=D.containerElement?.querySelector("video");if(V){const W=V.videoWidth/V.videoHeight>=1.7777777777777777;R(W?"landscape":"portrait")}T?.({player:D})},[T]),H=O==="landscape"?ZZ:O==="portrait"?XZ:void 0,F=zf.useCallback(D=>{const V=Gd("caption",{visible:f}).toString();return(0,n.jsx)(We,{className:V,value:D.caption})},[f]);return(0,n.jsxs)("div",{className:P,children:[(0,n.jsxs)("figure",{"data-l10n-id":l,children:[(0,n.jsx)("div",{className:Gd("aspect-container"),children:g&&(0,n.jsx)(If,{audioVideoPlayhead:e,canAdjustPlaybackSpeed:d,canRestrictSeek:h,captions:a,cornerRadius:i,id:`${C}-${s}-${m}-${c}`,media:x,onLoad:M,poster:y,progressChanged:L,recordMediaPlayheadPosition:S,src:E,style:H,subtitle:I,type:A?"video":w},`${C}-${s}-${m}-${c}-${y||""}`)}),f&&(0,n.jsxs)(n.Fragment,{children:[N?.(),(0,n.jsx)("figcaption",{className:Gd("wrapper"),children:(k??F)(v)})]})]}),r&&(0,n.jsx)(Ty,{backgroundColor:t,blockId:s,partnerContent:o})]})}const tt=$("video-chapters-panel");function Ly({activeIndex:e,chapters:t,isGeneratingChapters:s,onCheckpointClick:o,onSeek:r,overview:a}){const i=(0,u.useRef)(null),c=Mt(),{hovered:l,setHovered:d}=D3(),h=(0,u.useCallback)(C=>{const g=Number(C.currentTarget.dataset.time);Number.isNaN(g)||r?.(g)},[r]),m=(0,u.useCallback)(C=>{const{markerId:g}=C.currentTarget.dataset;g!=null&&o?.(g)},[o]);(0,u.useEffect)(()=>{i.current&&i.current.scrollIntoView({behavior:"smooth",block:"nearest"})},[e]);const f=a??t,v=a!=null;return f.length===0?s?(0,n.jsxs)("div",{className:tt("empty-state"),children:[(0,n.jsx)(J2,{className:tt("empty-state-spinner"),height:24,width:24}),(0,n.jsx)("p",{className:tt("empty-state-title"),children:"Generating chapters\u2026"})]}):(0,n.jsxs)("div",{className:tt("empty-state"),children:[(0,n.jsx)("i",{className:`fa-regular fa-clapperboard ${tt("empty-state-icon")}`}),(0,n.jsx)("p",{className:tt("empty-state-title"),children:c?.videoNoChapters||"No chapters yet"}),(0,n.jsx)("p",{className:tt("empty-state-body"),children:c?.videoNoChaptersMessage||"Add timestamps in the block settings to organize your video."})]}):(0,n.jsx)("div",{className:tt(),children:(0,n.jsx)("ul",{className:tt("list"),role:"list",children:f.map((C,g)=>(0,n.jsxs)("li",{ref:g===e?i:void 0,children:[(0,n.jsxs)("button",{"aria-current":g===e?"true":void 0,className:tt("item",{active:g===e,highlighted:kf(l,"chapter",C.time)}),"data-chapter-button":!0,"data-time":C.time,onBlur:()=>d(null),onClick:h,onFocus:()=>d({kind:"chapter",time:C.time}),onMouseEnter:()=>d({kind:"chapter",time:C.time}),onMouseLeave:()=>d(null),type:"button",children:[(0,n.jsxs)("span",{className:tt("thumbnail"),children:[(C.thumbnailStatus==null||C.thumbnailStatus==="done")&&C.thumbnail&&(0,n.jsx)("img",{alt:"",className:tt("thumbnail-img"),src:C.thumbnail}),C.thumbnailStatus==="processing"&&(0,n.jsx)("span",{"aria-hidden":"true",children:(0,n.jsx)(J2,{className:tt("thumbnail-spinner"),height:30,width:30})}),!v&&(0,n.jsx)("span",{className:tt("timestamp"),children:nc(C.time)})]}),(0,n.jsx)("span",{className:tt("info"),children:(0,n.jsx)("span",{className:tt("title"),children:C.title})}),v&&(0,n.jsx)("span",{className:tt("chapter-timestamp"),children:nc(C.time)})]}),(C.checkpoints??[]).length>0&&(0,n.jsx)("ul",{className:tt("checkpoints"),role:"list",children:C.checkpoints.map(x=>(0,n.jsx)("li",{children:(0,n.jsxs)("button",{className:tt("checkpoint",{highlighted:kf(l,"checkpoint",x.timeSeconds)}),"data-marker-id":x.markerId,onBlur:()=>d(null),onClick:m,onFocus:()=>d({kind:"checkpoint",time:x.timeSeconds}),onMouseEnter:()=>d({kind:"checkpoint",time:x.timeSeconds}),onMouseLeave:()=>d(null),type:"button",children:[(0,n.jsx)("span",{"aria-hidden":"true",className:tt("checkpoint-icon"),children:(0,n.jsx)(ie,{name:"location-dot"})}),(0,n.jsxs)("span",{className:tt("checkpoint-info"),children:[(0,n.jsx)("span",{className:tt("checkpoint-title"),children:x.title}),(0,n.jsx)("span",{className:tt("checkpoint-sub"),children:x.blockSummary})]}),(0,n.jsx)("span",{className:tt("checkpoint-timestamp"),children:x.timestamp})]})},x.markerId))})]},C.time))})})}const JZ={allowedTags:["b","i","u","c","ruby","rt","v","lang"],allowedAttributes:{c:["class"],v:["title"],lang:["lang"],ruby:[],rt:[]},disallowedTagsMode:"escape",allowedSchemes:[]};function eX(e){return e.replace(/<c\.([^>]+)>/g,'<c class="$1">').replace(/<\/c\.[^>]*>/g,"</c>").replace(/<v\s+([^>]+)>/g,'<v title="$1">').replace(/<script[^>]*>(.*?)<\/script>/gi,"<!--SCRIPT_START-->$1<!--SCRIPT_END-->").replace(/<iframe[^>]*>(.*?)<\/iframe>/gi,"<!--IFRAME_START-->$1<!--IFRAME_END-->")}function tX(e){return e.replace(/<!--SCRIPT_START-->(.*?)<!--SCRIPT_END-->/g,"$1").replace(/<!--IFRAME_START-->(.*?)<!--IFRAME_END-->/g,"$1").replace(/&quot;/g,'"').replace(/&#x27;/g,"'").replace(/&amp;/g,"&")}function Ts(e,t={}){if(!e)return"";let s;if(t.allowVTTTags!==!1){const o=eX(e),r=Du()(o,JZ);s=tX(r)}else s=Du()(e,{allowedTags:[],allowedAttributes:{}});return t.preserveWhitespace||(s=s.replace(/\s+/g," ").trim()),s}function mc(){return typeof window<"u"?window.crypto.randomUUID():`cue_${Date.now()}_${Math.random().toString(36).substring(2,9)}`}function sX(e){return e.map(t=>({...t,stableId:t.stableId||mc()}))}function Do(e){return e?/^(\d{2}:)?\d{2}:\d{2}\.\d{3}\s*-->\s*(\d{2}:)?\d{2}:\d{2}\.\d{3}/.test(e):!1}function Sy(e){let t=e.match(/^(\d{2}):(\d{2}):(\d{2})\.(\d{3})$/);if(t){const[,s,o,r,a]=t;return parseInt(s)*36e5+parseInt(o)*6e4+parseInt(r)*1e3+parseInt(a)}if(t=e.match(/^(\d{2}):(\d{2})\.(\d{3})$/),t){const[,s,o,r]=t;return parseInt(s)*6e4+parseInt(o)*1e3+parseInt(r)}throw new Error(`Invalid timestamp format: ${e}`)}function nX(e,t=!1){const s=Math.round(e),o=Math.floor(s/36e5),r=Math.floor(s%36e5/6e4),a=Math.floor(s%6e4/1e3),i=s%1e3;if(t){const c=a.toString().padStart(2,"0");if(o>0){const l=r.toString().padStart(2,"0");return`${o}:${l}:${c}`}else return`${r}:${c}`}return`${o.toString().padStart(2,"0")}:${r.toString().padStart(2,"0")}:${a.toString().padStart(2,"0")}.${i.toString().padStart(3,"0")}`}function ky(e){const t={};if(!e)return t;const s=e.match(/\S+/g)||[];for(const o of s){const r=o.indexOf(":");if(r>0){const a=Ts(o.substring(0,r),{allowVTTTags:!1}),i=Ts(o.substring(r+1),{allowVTTTags:!1});t[a]=i}}return t}function oX(e){const t=e.match(/^<v\s+/);if(t){let a=0,i=-1;for(let c=t[0].length;c<e.length;c++)if(e[c]==="<")a++;else if(e[c]===">")if(a===0){i=c;break}else a--;if(i!==-1){const c=e.substring(t[0].length,i).trim(),l=e.substring(i+1).trim();return{speaker:Ts(c,{allowVTTTags:!1}),text:l}}}const s=e.match(/^<v>\s*(.*)$/s);if(s)return{text:s[1]};const o=e.match(/^\[([^\]]+)\]:\s*(.*)$/s);if(o)return{speaker:Ts(o[1].trim(),{allowVTTTags:!1}),text:o[2]};const r=e.match(/^([^:\n]+):\s*(.*)$/s);if(r&&r[1].length<50){const a=r[1].trim();if(!(/^\d+(\s+\w+)*\s+at\s+\d+$/.test(a)||/^\d{1,2}$/.test(a)||/\d+:\d+/.test(a)||/\bat\s+\d/.test(a)||/\bfrom\s+\d/.test(a)||/\bto\s+\d/.test(a)||/\d+\s*(AM|PM|am|pm)/.test(a)))return{speaker:Ts(a,{allowVTTTags:!1}),text:r[2]}}return{text:e}}function Uf(e){return Ts(e,{preserveWhitespace:!1,allowVTTTags:!0})}function rX(e){const t=Ts(e.substring(6).trim(),{allowVTTTags:!1}),s=ky(t);return{id:s.id,width:s.width,lines:s.lines,regionanchor:s.regionanchor,viewportanchor:s.viewportanchor,scroll:s.scroll,...s}}function aX(e){const t=[...new Set(e.map(s=>s.speaker).filter(Boolean))];return{cueCount:e.length,speakerCount:t.length,speakers:t,lastModified:new Date}}function*iX(e){const t=e.cues,s=e.totalDuration;for(let o=0;o<t.length;o++){const r=t[o],a=o>0?t[o-1]:void 0,i=o<t.length-1?t[o+1]:void 0,c=a?Math.max(0,r.startTimeMs-a.endTimeMs):r.startTimeMs,l=i?Math.max(0,i.startTimeMs-r.endTimeMs):Math.max(0,s-r.endTimeMs),d=s>0?r.startTimeMs/s*100:0,h=s>0?r.endTimeMs/s*100:0,m=h-d;yield{cue:r,index:o,isFirst:o===0,isLast:o===t.length-1,previousCue:a,nextCue:i,gapBefore:c,gapAfter:l,relativeStartPercent:d,relativeEndPercent:h,relativeWidthPercent:m}}}function ope(e){return Array.from(iX(e))}function cX(e,t,s,o,r,a,i,c){const l=[],d=/<v\s+([^>]+)>([^<]*)<\/v>/g;let h,m=0;for(;(h=d.exec(e))!==null;){const[g,x,b]=h,T={stableId:mc(),startTime:t,endTime:s,startTimeMs:o,endTimeMs:r,duration:a,text:Uf(b.trim()),settings:i,index:0,speaker:Ts(x.trim(),{allowVTTTags:!1})};c&&(T.id=c),i.position&&(T.position=i.position),i.align&&(T.align=i.align),i.line&&(T.line=i.line),i.size&&(T.size=i.size),i.vertical&&(T.vertical=i.vertical),i.region&&(T.region=i.region),l.push(T),m=h.index+g.length}const f=/<v\s+([^>]+)>([^<]*)$/,C=e.substring(m).match(f);if(C){const[,g,x]=C,b={stableId:mc(),startTime:t,endTime:s,startTimeMs:o,endTimeMs:r,duration:a,text:Uf(x.trim()),settings:i,index:0,speaker:Ts(g.trim(),{allowVTTTags:!1})};c&&(b.id=c),i.position&&(b.position=i.position),i.align&&(b.align=i.align),i.line&&(b.line=i.line),i.size&&(b.size=i.size),i.vertical&&(b.vertical=i.vertical),i.region&&(b.region=i.region),l.push(b)}return l}function lX(e,t){let s=t,o;!Do(e[s])&&Do(e[s+1])&&(o=Ts(e[s],{allowVTTTags:!1}),s++);const r=e[s];if(!Do(r))return{cues:[],nextIndex:s+1};const a=r.match(/^((?:\d{2}:)?\d{2}:\d{2}\.\d{3})\s*-->\s*((?:\d{2}:)?\d{2}:\d{2}\.\d{3})(.*)$/);if(!a)return{cues:[],nextIndex:s+1};const[,i,c,l]=a,d=ky(l.trim());s++;const h=[];for(;s<e.length&&e[s]!==""&&!Do(e[s]);)h.push(e[s]),s++;const m=Sy(i),f=Sy(c),v=f-m,C=[];if(h.length===0){const g={stableId:mc(),startTime:i,endTime:c,startTimeMs:m,endTimeMs:f,duration:v,text:"",settings:d,index:0};o&&(g.id=o),d.position&&(g.position=d.position),d.align&&(g.align=d.align),d.line&&(g.line=d.line),d.size&&(g.size=d.size),d.vertical&&(g.vertical=d.vertical),d.region&&(g.region=d.region),C.push(g)}else for(const g of h)if(g.includes("<v ")&&(g.includes("</v>")||g.match(/<v\s+[^>]+>[^<]*$/))){const x=cX(g,i,c,m,f,v,d,o);C.push(...x)}else{const x=h.join(`
`),{text:b,speaker:T}=oX(x),L={stableId:mc(),startTime:i,endTime:c,startTimeMs:m,endTimeMs:f,duration:v,text:Uf(b),settings:d,index:0};o&&(L.id=o),T&&(L.speaker=T),d.position&&(L.position=d.position),d.align&&(L.align=d.align),d.line&&(L.line=d.line),d.size&&(L.size=d.size),d.vertical&&(L.vertical=d.vertical),d.region&&(L.region=d.region),C.push(L);break}return{cues:C,nextIndex:s}}function dX(e){const t=e.split(`
`).map(a=>a.trim()),s=t.find(a=>a.length>0);if(!s||!s.startsWith("WEBVTT"))throw new Error('Invalid WebVTT file: Must start with "WEBVTT"');const o={notes:[],styles:[],regions:[],cues:[],totalDuration:0,metadata:{cueCount:0,speakerCount:0,speakers:[],lastModified:new Date}};let r=0;for(;r<t.length&&t[r]==="";)r++;if(r<t.length&&t[r].startsWith("WEBVTT"))for(o.header=Ts(t[r],{allowVTTTags:!1}),r++;r<t.length&&t[r]==="";)r++;else throw new Error("Invalid WebVTT file: Missing or malformed WEBVTT header");for(;r<t.length;){const a=t[r];if(a===""){r++;continue}if(a.startsWith("NOTE")){const i=[Ts(a.substring(4).trim(),{preserveWhitespace:!0,allowVTTTags:!1})];for(r++;r<t.length&&t[r]!==""&&!Do(t[r]);)i.push(Ts(t[r],{preserveWhitespace:!0,allowVTTTags:!1})),r++;o.notes?.push(i.join(`
`));continue}if(a.startsWith("STYLE")){const i=[];for(r++;r<t.length&&t[r]!==""&&!Do(t[r]);)i.push(Ts(t[r],{preserveWhitespace:!0,allowVTTTags:!1})),r++;o.styles?.push(i.join(`
`));continue}if(a.startsWith("REGION")){const i=rX(a);o.regions?.push(i),r++;continue}if(Do(a)||Do(t[r+1])){const i=lX(t,r);i.cues&&i.cues.length>0&&o.cues.push(...i.cues),r=i.nextIndex;continue}r++}return o.cues=sX(o.cues),o.cues.sort((a,i)=>a.startTimeMs-i.startTimeMs),o.cues.forEach((a,i)=>{a.index=i}),o.totalDuration=o.cues.length>0?Math.max(...o.cues.map(a=>a.endTimeMs)):0,o.metadata=aX(o.cues),o}function rpe(e){let t="";if(e.header?t+=e.header.trim()+`
`:t+=`WEBVTT
`,t+=`
`,e.notes&&e.notes.length>0)for(const s of e.notes)t+="NOTE",s&&s.length>0&&(t+=" "+s),t+=`

`;if(e.styles&&e.styles.length>0)for(const s of e.styles)t+=`STYLE
`,t+=s.trim()+`

`;if(e.regions&&e.regions.length>0)for(const s of e.regions){t+="REGION";const o=[];for(const r in s)s[r]!==void 0&&s[r]!==null&&r!=="settings"&&o.push(`${r}:${s[r]}`);o.length>0&&(t+=" "+o.join(" ")),t+=`

`}for(const s of e.cues){s.id&&(t+=s.id+`
`),t+=`${s.startTime} --> ${s.endTime}`;const o=[];if(s.position&&o.push(`position:${s.position}`),s.align&&o.push(`align:${s.align}`),s.line&&o.push(`line:${s.line}`),s.size&&o.push(`size:${s.size}`),s.vertical&&o.push(`vertical:${s.vertical}`),s.region&&o.push(`region:${s.region}`),s.settings)for(const a in s.settings)s.settings[a]!==void 0&&s.settings[a]!==null&&!o.some(i=>i.startsWith(a+":"))&&o.push(`${a}:${s.settings[a]}`);o.length>0&&(t+=" "+o.join(" ")),t+=`
`;let r=s.text||"";s.speaker&&(r=`[${s.speaker}]: ${r}`),t+=r+`

`}return t.replace(/\s+$/,"")+`
`}const fc=$("video-transcript-panel"),uX=({cue:e,isCurrent:t,onSeek:s,forwardSeekRestricted:o,maxTimeReached:r})=>{const a=(0,u.useCallback)(()=>{const c=e.startTimeMs/1e3;o&&c>r||s?.(c)},[e,s,o,r]),i=(0,u.useMemo)(()=>o&&e.startTimeMs/1e3>r,[o,e.startTimeMs,r]);return(0,n.jsxs)("button",{"aria-current":t?"true":void 0,"aria-disabled":i,className:fc("line",{current:t,disabled:i}),onClick:i?void 0:a,tabIndex:i?-1:0,type:"button",children:[(0,n.jsx)("span",{className:fc("timestamp"),children:nX(e.startTimeMs,!0)}),(0,n.jsx)("span",{className:fc("text"),children:e.text})]})},Ny=({captions:e,currentTime:t=0,forwardSeekRestricted:s=!1,maxTimeReached:o=0,onSeek:r})=>{const[a,i]=(0,u.useState)([]);(0,u.useEffect)(()=>{if(!e||e.length===0)return;const l=new AbortController;return(async()=>{try{const h=e[0];if(!h)return;const m=h.url||(h.key?pt(h.key):null);if(!m)return;const f=await fetch(m,{signal:l.signal});if(!f.ok)return;const v=await f.text(),C=dX(v);i(C.cues)}catch(h){console.error("Error loading transcript:",h)}})(),()=>{l.abort()}},[e]);const c=(0,u.useMemo)(()=>{const l=t*1e3;return a.findIndex(d=>l>=d.startTimeMs&&l<d.endTimeMs)},[a,t]);return a.length===0?null:(0,n.jsx)("div",{className:fc(),children:(0,n.jsx)("div",{className:fc("lines"),children:a.map((l,d)=>(0,n.jsx)(uX,{cue:l,forwardSeekRestricted:s,isCurrent:d===c,maxTimeReached:o,onSeek:r},l.stableId))})})},Ps=$("video-side-panel");function hX(e,t){for(let s=e.length-1;s>=0;s--)if(t>=e[s].time)return s;return-1}const _f=4;function mX({captions:e,chapters:t=[],cornerRadius:s,currentTime:o=0,forwardSeekRestricted:r=!1,headingLevel:a,isGeneratingChapters:i,isLearner:c=!1,maxTimeReached:l=0,onSeek:d,showChapters:h=!0,showTranscript:m=!0}){const f=Mt(),v=(0,u.useMemo)(()=>h&&(!c||t.length>0)||i,[t.length,i,c,h]),C=f?.videoChapters||"Chapters",g=(0,u.useMemo)(()=>{const B=[];return v&&B.push({id:"chapters",label:C}),m&&B.push({id:"transcript",label:f?.videoTranscript||"Transcript"}),B},[v,C,m,f]),[x,b]=(0,u.useState)(g[0]??null),[T,L]=(0,u.useState)(!1),[y,S]=(0,u.useState)(!1),k=(0,u.useRef)(null),N=(0,u.useRef)(null),I=(0,u.useRef)(null),w=(0,u.useRef)(!1),A=(0,u.useId)(),E=(0,u.useMemo)(()=>g.find(B=>B.id===x?.id)??g[0]??null,[g,x]),j=(0,u.useMemo)(()=>g.findIndex(B=>B.id===E?.id),[g,E]),O=(0,u.useCallback)(B=>{const z=B.currentTarget.dataset.tabId,K=g.find(Y=>Y.id===z);K&&b(K)},[g]),R=(0,u.useCallback)(B=>{const z=g.length-1;let K=null;Kn(B)?K=j===0?z:j-1:Qn(B)?K=j===z?0:j+1:a2(B)?K=0:r2(B)&&(K=z),K!==null&&(B.preventDefault(),b(g[K]),k.current?.querySelectorAll('[role="tab"]')[K]?.focus())},[j,g]);(0,u.useEffect)(()=>{g.length>0&&!g.some(B=>B.id===x?.id)&&b(g[0])},[g,x]);const P=Et(768),M=(0,u.useCallback)(()=>L(!0),[]),H=(0,u.useCallback)(()=>L(!1),[]),F=(0,u.useCallback)(()=>S(B=>!B),[]);(0,u.useEffect)(()=>{let B=0;return y&&N.current?(w.current=!0,B=requestAnimationFrame(()=>{N.current?.querySelectorAll("[data-chapter-button]")?.[_f]?.focus()})):!y&&w.current&&(B=requestAnimationFrame(()=>{I.current?.focus()})),()=>cancelAnimationFrame(B)},[y]);const D=(0,u.useMemo)(()=>hX(t,o),[t,o]),V=y?t:t.slice(0,_f),W=t.length>_f,_=a??2,Z=`h${_}`,oe=s!=null?{"--side-panel-corner-radius":`${Number(s)}px`}:{};if(P)return(0,n.jsxs)("div",{className:Ps("mobile"),style:oe,children:[v&&(0,n.jsxs)("div",{className:Ps("mobile-section"),ref:N,children:[(0,n.jsx)(Z,{className:Ps("mobile-heading",{[`h${_}`]:!0}),children:C}),(0,n.jsx)(Ly,{activeIndex:D,chapters:V,isGeneratingChapters:i,onSeek:d}),W&&(0,n.jsxs)("button",{"aria-expanded":y,className:Ps("mobile-expand"),onClick:F,ref:I,type:"button",children:[y?f?.videoShowLessChapters||"Show less chapters":f?.videoShowMoreChapters||"Show more chapters",(0,n.jsx)("i",{"aria-hidden":"true",className:`fa-solid fa-chevron-${y?"up":"down"}`})]})]}),m&&(0,n.jsxs)("div",{className:Ps("mobile-section"),children:[(0,n.jsx)(Z,{className:Ps("mobile-heading",{[`h${_}`]:!0}),children:f?.videoTranscript||"Transcript"}),(0,n.jsxs)("button",{className:Ps("view-transcript-button"),onClick:M,type:"button",children:[(0,n.jsx)(ie,{name:"list"}),f?.videoViewTranscript||"View transcript"]}),T&&(0,n.jsx)(ud,{className:Ps("video-transcript-modal"),heading:f?.videoTranscript||"Transcript",onClose:H,children:(0,n.jsx)(Ny,{captions:e,currentTime:o,forwardSeekRestricted:r,maxTimeReached:l,onSeek:d})})]})]});const Q=B=>{const z={className:Ps("content"),hidden:E?.id!==B};return g.length<=1?z:{...z,"aria-labelledby":`tab-${B}-${A}`,id:`tabpanel-${B}-${A}`,role:"tabpanel",tabIndex:0}},U=g.length===1?(0,n.jsx)(Z,{className:Ps("title",{[`h${_}`]:!0}),children:g[0].label}):(0,n.jsx)("div",{"aria-label":f?.a11yBlockVideoSidePanelTablist,className:Ps("tabs"),ref:k,role:"tablist",children:g.map(B=>(0,n.jsx)("button",{"aria-controls":`tabpanel-${B.id}-${A}`,"aria-selected":E?.id===B.id,className:Ps("tab",{active:E?.id===B.id}),"data-tab-id":B.id,id:`tab-${B.id}-${A}`,onClick:O,onKeyDown:R,role:"tab",tabIndex:E?.id===B.id?0:-1,type:"button",children:B.label},B.id))});return(0,n.jsxs)("div",{className:Ps(),style:oe,children:[U,v&&(0,n.jsx)("div",{...Q("chapters"),children:(0,n.jsx)(Ly,{activeIndex:D,chapters:t,isGeneratingChapters:i,onSeek:d})}),m&&(0,n.jsx)("div",{...Q("transcript"),children:(0,n.jsx)(Ny,{captions:e,currentTime:o,forwardSeekRestricted:r,maxTimeReached:l,onSeek:d})})]})}const Iy=(0,u.createContext)(null),fX=Iy.Provider;function pX(){return(0,u.useContext)(Iy)}var gX,Ey,jy,vX;function ape(){let e=null;const t=new Set;return{registerPlayer(s){e=s},onTimeUpdate(){t.forEach(s=>{s()})},getPosition(){return e?.getProgress().currentTime??0},subscribe(s){return t.add(s),()=>{t.delete(s)}},seekToTime(s){e?.seekToTime(s)}}}const CX=Object.freeze({registerPlayer(){},onTimeUpdate(){},getPosition:()=>0,subscribe:()=>()=>{},seekToTime(){}}),wy=(0,u.createContext)(CX),xX=wy.Provider;function Wd(){return(0,u.useContext)(wy)}function ipe(){const e=Wd(),t=Ey(e);return t.current=e,jy(()=>()=>t.current.getPosition(),[])}function cpe(e){const t=Wd();return vX(t.subscribe,()=>e(t.getPosition()),()=>e(0))}function lpe(){const e=Wd(),t=Ey(e);return t.current=e,jy(()=>s=>t.current.seekToTime(s),[])}function dpe({store:e,children:t}){return gX(xX,{value:e,children:t})}var bX,yX;const Kd=[];function upe(){let e=Kd;const t=new Set;return{setChapters(s){s!==e&&(e=s,t.forEach(o=>{o()}))},getChapters(){return e},subscribe(s){return t.add(s),()=>{t.delete(s)}}}}const TX=Object.freeze({setChapters(){},getChapters:()=>Kd,subscribe:()=>()=>{}}),Ay=(0,u.createContext)(TX),LX=Ay.Provider;function Ry(){return(0,u.useContext)(Ay)}function hpe(){const e=Ry();return yX(e.subscribe,e.getChapters,()=>Kd)}function mpe({store:e,children:t}){return bX(LX,{value:e,children:t})}const pc=$("block-video");function SX({audioVideoPlayhead:e,backgroundColor:t,blockId:s,blockPartnerContent:o,blockPartnerContentExists:r,captions:a,chapters:i,cornerRadius:c,currentLocale:l,dataL10nId:d,enableVideoPlaybackSpeed:h,forwardSeekRestricted:m,headingLevel:f,id:v,isGeneratingChapters:C,isLearner:g,isLoaded:x,item:b,lessonId:T,loadMedia:L,media:y,mediaWidth:S,onLoad:k,onProgressChanged:N,poster:I,recordMediaPlayheadPosition:w,renderCaption:A,renderPostVideoSlot:E,showChapters:j,subtitle:O,transcriptEnabled:R,type:P,videoKey:M,videoSrc:H,shouldPause:F}){const D=pX(),V=Wd(),W=Ry(),[_,Z]=(0,u.useState)(0),[oe,Q]=(0,u.useState)(0),U=(0,u.useRef)(null),B=(0,u.useCallback)(G=>{Z(G.currentTime),Q(le=>Math.max(le,G.currentTime)),V.onTimeUpdate(G.currentTime),N?.(G)},[N,V]),z=(0,u.useCallback)(G=>{const le=pc("caption",{visible:x}).toString();return(0,n.jsx)(We,{className:le,value:G.caption})},[x]),K=(0,u.useCallback)(G=>{U.current?.seekToTime(G)},[U]),Y=D?.setVideoPlayerRef,J=(0,u.useCallback)(G=>{U.current=G,Y?.(G),V.registerPlayer(G)},[Y,V]),q=R&&a&&a.length>0||j&&(!g||i&&i.length>0)||C;(0,u.useEffect)(()=>{W.setChapters(i??Kd)},[W,i]);const ee=pc("item",{small:S==="0",medium:S==="1",full:S==="2","video-training":!0,"no-side-panel":!q}),se=D?.wrapVideo,te=L?(0,n.jsx)(If,{audioVideoPlayhead:e,canAdjustPlaybackSpeed:h,canRestrictSeek:m,captions:a,chapters:i,checkpointTimesSeconds:D?.checkpointMarkerTimes,cornerRadius:c,id:`${T}-${s}-${v}-${l}`,media:y,onCheckpointReached:D?.onCheckpointReached,onLoad:k,poster:I,progressChanged:B,recordMediaPlayheadPosition:w,ref:J,shouldPause:F,src:H,subtitle:O,type:M?"video":P},`${T}-${s}-${v}-${l}-${I||""}`):null;return(0,n.jsxs)("div",{className:ee,children:[(0,n.jsxs)("figure",{"data-l10n-id":d,children:[(0,n.jsx)("div",{className:pc("figure-container"),children:se?se(te):te}),q&&(0,n.jsx)("div",{className:pc("side-panel-wrapper"),children:(0,n.jsx)(mX,{captions:a,chapters:i,cornerRadius:c,currentTime:_,forwardSeekRestricted:m||!1,headingLevel:f,isGeneratingChapters:C,isLearner:g,maxTimeReached:oe,onSeek:K,showChapters:j,showTranscript:R})}),x&&(0,n.jsxs)(n.Fragment,{children:[E?.(),(0,n.jsx)("figcaption",{className:pc("wrapper"),children:(A??z)(b)})]})]}),r&&(0,n.jsx)(Ty,{backgroundColor:t,blockId:s,partnerContent:o})]})}var Gf=p(82920);function kX({backgroundColor:e,blockId:t,cornerRadius:s,enableVideoPlaybackSpeed:o,forwardSeekRestricted:r,headingLevel:a,isGeneratingChapters:i,isLearner:c,item:l,lessonId:d,loadMedia:h,mediaWidth:m,onStep:f,partnerContent:v,audioVideoPlayhead:C,recordMediaPlayheadPosition:g,renderCaption:x,renderPostVideoSlot:b,showChapters:T,transcriptEnabled:L,type:y,isVideoTraining:S,shouldPause:k}){const[N,I]=Gf.useState(!1),{currentLocale:w}=it(),A=Ot(),{id:E,media:j,partnerContentId:O}=l,R=A(j)??{},{customVideo:P={},tmp:M={},video:H={}}=R,F="poster"in H?H:{...H,...P},D=M.video&&"poster"in M.video?M.video:void 0,{captions:V,chapters:W,key:_,poster:Z,src:oe,subtitle:Q}=Ja()?F:D||F,U=T?W??[]:[],B=_||oe,K=(Array.isArray(v)?v:v?.content)?.find(te=>O!=null&&Jt(te)&&"id"in te&&te.id===O),Y=K!=null&&Jt(K),J=Jt(j)&&"l10nId"in j?j.l10nId:void 0,q=Gf.useCallback(()=>{I(!0)},[]),ee=Gf.useCallback(({percentComplete:te})=>{te>=100&&f?.({id:E})},[E,f]);if(!B)return(0,n.jsx)(QZ,{mediaWidth:m});const se={audioVideoPlayhead:C,backgroundColor:e,blockId:t,blockPartnerContent:K,blockPartnerContentExists:Y,captions:V,chapters:U,cornerRadius:s,currentLocale:w,dataL10nId:J,enableVideoPlaybackSpeed:o,forwardSeekRestricted:r,id:E,isLoaded:N,item:l,lessonId:d,loadMedia:h,media:j,mediaWidth:m,onLoad:q,onProgressChanged:ee,poster:Z,recordMediaPlayheadPosition:g,renderCaption:x,renderPostVideoSlot:b,subtitle:Q,type:y,videoKey:_,videoSrc:B,shouldPause:k};return S?(0,n.jsx)(SX,{...se,chapters:U,headingLevel:a,isGeneratingChapters:i,isLearner:c,showChapters:T,transcriptEnabled:L},_):(0,n.jsx)(qZ,{...se},_)}const NX=$("block-video");function Wf({animateBlockEntrance:e,blockId:t,enableVideoPlaybackSpeed:s,initiallyVisible:o,isDragPreview:r,isLearner:a,isSidebarPreview:i,items:c,lessonId:l,loadMedia:d,onStep:h,partnerContent:m,progress:f,recordMediaPlayheadPosition:v,renderCaption:C,renderPostVideoSlot:g,settings:x,takingSnapshot:b,type:T,isGeneratingChapters:L,isVideoTraining:y,shouldPause:S}){const k=X0(),N=c?.[0];if(N==null)return null;const I=NX({"no-animation":!x?.entranceAnimation,presentation:k}).toString(),w=y?"2":"1",A=b||r||i;return(0,n.jsx)(Ee,{className:I,children:(0,n.jsx)(Be,{animateBlockEntrance:e,initiallyVisible:o,isLearner:a,children:A?(0,n.jsx)(KZ,{item:N}):(0,n.jsx)(XK,{children:(0,n.jsx)(kX,{audioVideoPlayhead:f?.items?.[t]?.items?.[N.id]?.audioVideoPlayhead??0,backgroundColor:x?.backgroundColor,blockId:t,cornerRadius:x?.cornerRadius,enableVideoPlaybackSpeed:s,forwardSeekRestricted:x?.forwardSeekRestricted&&!f?.isComplete,headingLevel:x?.headingLevel,isGeneratingChapters:L,isLearner:a,isVideoTraining:y,item:N,lessonId:l,loadMedia:d,mediaWidth:x?.mediaWidth??w,onStep:h,partnerContent:m,recordMediaPlayheadPosition:v,renderCaption:C,renderPostVideoSlot:g,shouldPause:S,showChapters:!!x?.showChapters,transcriptEnabled:!!x?.showTranscript,type:T})})})})}var Kf=p(82920);const Qd=$("block-audio"),Qf=$("block-embed"),Ms=$("block-attachment");class IX extends Kf.Component{renderCaptionDelegate;constructor(t){super(t),this.renderCaptionDelegate=this.renderCaption.bind(this),this.onLoad=this.onLoad.bind(this),this.state={loaded:!1}}static get defaultProps(){return{audioVideoPlayhead:0,blockId:"",getL10nValue:()=>{},editable:!1,items:[],lessonId:"",onStep:()=>{},recordMediaPlayheadPosition:()=>{}}}renderCaption({caption:t}){const{loaded:s}=this.state,o=Qd("caption",{hidden:!s}).toString();return(0,n.jsx)(We,{className:o,value:t})}onLoad(){this.setState({loaded:!0})}renderItem(t){const{blockId:s,getL10nValue:o,labels:r,lessonId:a,loadMedia:i,progress:c,recordMediaPlayheadPosition:l,renderCaption:d=this.renderCaptionDelegate,settings:h}=this.props,m="forwardSeekRestricted"in h?h.forwardSeekRestricted:!1,f=t.media,v=o(f)??{},{id:C}=t,g=v?.tmp?.audio?.key||v?.audio?.key,x=`${a}-${s}-${C}`,b=yt()(0,["items",s,"items",C,"audioVideoPlayhead"],c),T=Ef({lessonId:a,refs:`items:${s}/items:${C}`});return(0,n.jsxs)("div",{className:Qd("item"),children:[i&&(0,n.jsx)(R3,{audioVideoPlayhead:b,canRestrictSeek:!!m&&!c?.isComplete,id:x,item:t,labels:r,mediaSrc:g,onAIUploadFinish:this.props.onAIUploadFinish,onEnd:this.handleOnEnd.bind(this,C),onLoad:this.onLoad,onTranscriptClick:this.onTranscriptClick.bind(this,t),onTranscriptClose:this.props.closeTranscript,onTranscriptUpdate:this.props.onTranscriptUpdate??void 0,recordMediaPlayheadPosition:l,refs:`items:${s}/items:${C}`,transcriptMedia:f,uploadId:T},x),d(t)]},C)}handleOnEnd(t){this.props.onStep({id:t})}onTranscriptClick(t){const{blockId:s}=this.props;return this.props.openTranscript?.({blockId:s,item:t,refs:`items:${s}/items:${t.id}`})}render(){const{animateBlockEntrance:t,initiallyVisible:s,isLearner:o,items:r,settings:a}=this.props,{entranceAnimation:i}=a,c=Qd({"no-animation":!i,presentation:this.props.isPresentation}).toString(),l=r.length>0?r.slice(0,1):[];return(0,n.jsx)(Ee,{className:c,children:(0,n.jsx)(Be,{animateBlockEntrance:t,initiallyVisible:s,isLearner:o,children:(0,n.jsx)("div",{className:Qd("wrapper"),children:l.map(d=>this.renderItem(d))})})})}}const EX=Tb(Ze(IX));function jX(e){const t=X0();return(0,n.jsx)(EX,{...e,isPresentation:t})}class wX extends Kf.Component{static get defaultProps(){return{items:[],editable:!1,lessonId:"",blockId:"",settings:{}}}renderItem(t,s){const{id:o,settings:r={}}=t,a=this.props.getL10nValue(t.media)??{},i="embed"in a?a.embed:void 0,{loadMedia:c,labels:l,settings:d}=this.props,{showMetaData:h}=r,{cardMode:m,showBorder:f=!0}=d,v=Qf("item",{border:f}).toString();return(0,n.jsx)(Gt,{className:v,disabled:!f&&m==$s.TRANSPARENT,tag:"section",children:c&&(0,n.jsx)(B3,{data:i,id:`${s}-${o}`,isLesson:!0,labels:l,showMetaData:h})},o)}render(){const{animateBlockEntrance:t,blockId:s,getL10nValue:o,initiallyVisible:r,isLearner:a,items:i,settings:c}=this.props,{entranceAnimation:l,mediaWidth:d="0"}=c,h=o(i?.[0]?.media);if(!h)return null;const m=HK(h)!=="link",f=Qf({"no-animation":!l,presentation:this.props.isPresentation}).toString(),v=Qf("wrapper",{medium:m&&d==="1",full:m&&d==="2"}),C=i.length>0?i.slice(0,1):[];return(0,n.jsx)(Ee,{className:f,children:(0,n.jsx)(Be,{animateBlockEntrance:t,initiallyVisible:r,isLearner:a,children:(0,n.jsx)("div",{className:v,children:C.map(g=>this.renderItem(g,s))})})})}}const AX=Ze(wh()(wX));function RX(e){const t=X0();return(0,n.jsx)(AX,{...e,isPresentation:t})}class PX extends Kf.Component{get attachment(){const t=this.props.items[0].media;return this.props.getL10nValue(t)?.attachment??{}}render(){const{animateBlockEntrance:t,initiallyVisible:s,isLearner:o}=this.props;return(0,n.jsx)(Ee,{children:(0,n.jsx)(Be,{animateBlockEntrance:t,initiallyVisible:s,isLearner:o,children:(0,n.jsx)("div",{className:"block-text--onecol",children:(0,n.jsx)("div",{className:"block-text__container",children:(0,n.jsx)("div",{className:"block-text__row",children:(0,n.jsx)("div",{className:"block-text__col",children:this.renderAttachment(this.attachment)})})})})})})}renderAttachment(t){return t.key?this.renderDownload(t):this.renderNoFile()}renderDownload({key:t,mimeType:s,originalUrl:o,size:r}){const{attachmentId:a,blockId:i,externalLinksDisabled:c,onLinkBlur:l,onLinkFocus:d,onLinkMouseEnter:h,onLinkMouseLeave:m}=this.props,f=pt(t),v=c?"":void 0,C=c?void 0:f,g=c?void 0:"noopener noreferrer nofollow",x=c?"button":void 0,b=c?0:void 0,T=c?void 0:"_blank",L=Ms({}).mix("brandHover").toString(),y=Ms("info");return(0,n.jsxs)(Gt,{"aria-labelledby":`attachment-name-${i} attachment-icon-${i}`,className:L,"data-external":v,download:o,href:C,id:c?a:void 0,onBlur:c?()=>l?.(a):void 0,onFocus:c?()=>d?.(a):void 0,onMouseEnter:c?()=>h?.(a):void 0,onMouseLeave:c?()=>m?.(a):void 0,rel:g,role:x,tabIndex:b,tag:"a",target:T,children:[(0,n.jsxs)("div",{className:Ms("main"),children:[(0,n.jsx)("div",{className:Ms("icon"),id:`attachment-icon-${i}`,children:this.fileIcon(s)}),(0,n.jsxs)("div",{className:y,children:[(0,n.jsx)(ke,{className:Ms("title").toString(),id:`attachment-name-${i}`,value:o}),(0,n.jsx)("div",{className:Ms("size").toString(),children:WZ()(r,{round:1})})]})]}),(0,n.jsx)("div",{className:Ms("rest"),children:(0,n.jsx)(qB,{className:"brandHover__target--fill"})})]})}renderNoFile(){const t=Ms({none:!0}).toString(),s=Ms("info");return(0,n.jsx)(Gt,{className:t,children:(0,n.jsxs)("div",{className:Ms("main"),children:[(0,n.jsx)("div",{className:Ms("icon"),children:(0,n.jsx)(Z2,{"aria-label":"File"})}),(0,n.jsxs)("div",{className:s,children:[(0,n.jsx)("div",{className:Ms("title").toString(),children:"File Attachment Block"}),(0,n.jsx)("div",{className:Ms("size").toString(),children:"No file added"})]})]})})}fileIcon(t){const{labels:s}=this.props,o=/excel|spreadsheet/,r=/pdf/,a=/word/,i=/powerpoint|presentation/,c=/rtf|richtext/,l=/zip/;return o.test(t)?(0,n.jsx)(bD,{"aria-label":s?.a11yExcelIcon}):r.test(t)?(0,n.jsx)(vD,{"aria-label":s?.a11yPDFIcon}):a.test(t)?(0,n.jsx)(gD,{"aria-label":s?.a11yWordIcon}):i.test(t)?(0,n.jsx)(CD,{"aria-label":s?.a11yPPTIcon}):c.test(t)?(0,n.jsx)(xD,{"aria-label":s?.a11yRTFIcon}):l.test(t)?(0,n.jsx)(yD,{"aria-label":s?.a11yZipIcon}):(0,n.jsx)(Z2,{"aria-label":s?.a11yFileIcon})}}function MX(e){const t=wh()(e),s=Ze(t),o=oB(s);function r(a){const i=De(),c=a.externalLinksDisabled??(i&&"externalLinksDisabled"in i?i.externalLinksDisabled:!1);return(0,n.jsx)(o,{...a,externalLinksDisabled:c})}return r}const OX=MX(PX),gn=$("block-step"),BX=e=>{const{blockId:t,disableZoom:s,enableVideoPlaybackSpeed:o,isOverlayAudio:r,item:a,labels:i,lessonId:c,lessonNumber:l,mediaType:d,audioPosition:h}=e,{settings:m}=a,f=Ae(a.media)??{},v=d==="audio"&&f.audio,C=d==="embed"&&f.embed,g=d==="image"&&f.image,x=d==="video"&&f.video;if(!v&&!C&&!g&&!x&&!(d==="image-with-audio"&&r))return;const T=f.embed?Er(f.embed):void 0,L=!!f.image,y=!!f.audio,S=L?f.image.align:"center",k=gn("media",{audio:y&&!r,"audio-and-embed":!!(f.audio&&f.embed),"image-with-audio":r,[`image-with-audio-${S}`]:r&&!!S,"audio-on-bottom":y&&!r&&h==="bottom",linkEmbed:T==="link",videoEmbed:T==="video",visual:!r&&L||!At()(f.video)}),N=m||{};return(0,n.jsx)("div",{className:k,children:(0,n.jsx)(Xt,{blockId:t,enableVideoPlaybackSpeed:o,index:`${a.id}`,isOverlayAudio:r,item:a,labels:i,lessonId:c,lessonNumber:l,media:f,mediaType:r?void 0:d,opts:{disableZoom:s,...N},shouldPause:!0})})},DX=e=>{const{headingLevel:t,innerRef:s,item:o,isActive:r,loadMedia:a,audioPosition:i,onFocus:c,renderTitle:l,renderDescription:d,style:h}=e,{id:m}=o,f=gn({active:r}),v=!!o.step,C=!!o.title,g=t||2,x=`h${g}`,b=`h${g+1}`,T=Ae(o.media),L=pn(T,i,!0,"timeline"),y=Ae(o.description),S=(0,u.useMemo)(()=>!!Object.keys(T??{}).length||!!Wh(y).value?.length,[T,y]),k=()=>{const N={audio:{item:{...o,media:L.audioOnlyMedia||T},mediaType:"audio"},image:{item:{...o,media:L.imageOnlyMedia||T},mediaType:"image"},video:{item:{...o,media:L.videoOnlyMedia||T},mediaType:"video"},embed:{item:{...o,media:L.embedOnlyMedia||T},mediaType:"embed"},overlay:{mediaType:"image-with-audio",isOverlayAudio:!0}};return(0,n.jsx)(n.Fragment,{children:L.renderOrder.map((I,w)=>{if(I==="text")return d?(0,n.jsx)("div",{className:gn("description"),children:d(o)},`text-${w}`):(0,n.jsx)(ke,{className:gn("description"),value:o.description},`text-${w}`);if(!T||!a)return null;const A=N[I];return A?(0,u.createElement)(BX,{...e,...A,key:`${I}-${w}`}):null})})};return(0,n.jsx)(Ee,{children:(0,n.jsx)("div",{className:f,"data-id":m,ref:s,style:h,children:(0,n.jsx)(Gt,{className:gn("body"),onFocus:c,children:(0,n.jsxs)("div",{className:gn("main-wrap"),children:[(0,n.jsxs)("div",{className:gn("heading",{solo:!S}),children:[v&&(0,n.jsx)("div",{className:gn("step"),children:(0,n.jsx)(x,{children:(0,n.jsx)(gs,{value:o.step})})}),(C||l)&&(0,n.jsx)("div",{className:gn("title"),children:l?l(o):(0,n.jsx)(b,{children:(0,n.jsx)(ke,{value:o.title})})})]}),(0,n.jsx)("div",{className:gn("main"),children:k()})]})})})})},FX=e=>{const{id:t,settings:s,items:o,onEnter:r,enableVideoPlaybackSpeed:a,initiallyVisible:i,isLearner:c,labels:l,lessonId:d,renderTitle:h,renderDescription:m}=e,f=o[0],v=s.audioPosition,C=!(s.zoomOnClick??!0),g=s.headingLevel,x=(0,u.useCallback)((T,L)=>{r?.({id:t,payload:{activeIndex:T,itemId:L}})},[t,r]),b=(0,n.jsx)(DX,{audioPosition:v,blockId:t,disableZoom:C,enableVideoPlaybackSpeed:a,headingLevel:g,isActive:!0,item:f,labels:l,lessonId:d,lessonNumber:t,loadMedia:!0,onFocus:x,renderDescription:m,renderTitle:h,style:{"--block-step-padding-top":"1rem","--block-step-padding-bottom":"1rem","--block-step-corner-radius":s.cornerRadius!=null?`${s.cornerRadius}px`:"var(--arc-border-radius-lg)"}});return c?(0,n.jsx)(Be,{animateBlockEntrance:!0,className:gn("animate").toString(),initiallyVisible:i,isLearner:!0,children:b}):b},Py=$("continue-btn"),Yd=({children:e,className:t,href:s,onClick:o,text:r,testId:a="continue-btn"})=>{const i=t?`${Py()} ${t}`:Py();return s?(0,n.jsx)(as,{className:i,"data-continue-btn":"","data-testid":a,onClick:o,to:s,children:e??(0,n.jsx)(gs,{value:r})}):(0,n.jsx)("button",{className:i,"data-continue-btn":"","data-testid":a,onClick:o,type:"button",children:e??(0,n.jsx)(ke,{value:r})})},My=({bgType:e,text:t,iconType:s="locked"})=>{const o=X()("continue-hint",{"continue-hint--bg-transparent":e==="transparent"});return(0,n.jsxs)("div",{className:o,"data-continue-btn":"",children:[s==="locked"&&(0,n.jsx)(ie,{className:"continue-hint__icon",name:"lock-keyhole-light"}),(0,n.jsx)("div",{className:"continue-hint__content",children:(0,n.jsx)(gs,{value:t})})]})},Yf=$("block-text");function HX({blockId:e,animateBlockEntrance:t,canContinue:s=!1,isComplete:o,isLearner:r,isLastBlock:a=!1,isOnlyBlockInStep:i,items:c=[],labels:l,onStep:d=()=>{},skipContinue:h=!1,initiallyVisible:m}){const v=(0,u.useRef)(null),C=(0,Me.A)(o),[g,x]=u.useState(!1),{announcePolite:b}=bn(),[T,L]=u.useState(!1),y=rs(),S=De(),k=gi(),N=pC(k),I=Eo(),w=c[0],{id:A}=w,E=w.title??I?.label??Qe.blockContinueLabel,j=w.type??I?.completionType??Qe.blockContinueCompletionType,O=w.completeHint??I?.completeHint??Qe.blockContinueCompleteHint,R=!j||(h?T:s||i&&o),P=h||!o||i,M=y?.continueColor||k,H=!M||M===k,F=H&&S?.theme?.accentContrast===Te.AUTO?Te.AUTO:N,D=y?.continueColorContrast??F,V=y?.continueRadius??null,W=y?.continueWidth??76,_=zt({backgroundColor:M,contrast:D}),Z={...!H&&{"--color-button-bg":M},...!H&&{"--color-button-text":_},...!H&&{"--color-button-border":"transparent"},...V!=null&&{"--radius-button":`${Number(V)}px`},...W!=null&&{maxWidth:`${Number(W)}rem`}},oe=(0,u.useCallback)(()=>{d({id:A}),x(!0),a?setTimeout(()=>{const Q=document.querySelector("[data-lesson-id]"),U=document.querySelector("main"),B=document.querySelector("h1.lesson-header__title, .lesson-header__title h1"),z=Q?.querySelector('.block-wrapper, [role="region"], .lesson-content > *:first-child');let K=null;B?K=B:z&&z!==v.current?.parentElement?K=z:Q?K=Q:U&&(K=U),K&&(K.setAttribute("tabindex","-1"),K.focus({preventScroll:!0}))},200):setTimeout(()=>{const Q=v.current;Q&&Q.focus()},100)},[A,d,a]);return(0,u.useEffect)(()=>{!C&&o&&(a||setTimeout(()=>{b?.(l?.a11yStatusAdditionalContent)},300))},[b,o,l,C,a]),(0,u.useEffect)(()=>{const Q=U=>{const{path:B}=U.detail,{blockId:z,buttonId:K}=pa(U.detail.path,["block","button"]);if(e==z&&K===w.id){const Y=B.at(-1);Y==="title"?L(!0):Y==="completeHint"&&L(!1)}};return window.addEventListener(Ge,Q),()=>{window.removeEventListener(Ge,Q)}},[e,w.id]),(0,n.jsxs)(n.Fragment,{children:[P&&(0,n.jsx)(Ee,{children:(0,n.jsx)(Be,{animateBlockEntrance:t,initiallyVisible:m,isLearner:r,children:(0,n.jsx)("div",{className:Yf("container"),children:(0,n.jsx)("div",{className:Yf("row"),children:(0,n.jsxs)("div",{className:Yf("continue"),style:Z,children:[R&&(0,n.jsx)(Yd,{onClick:oe,text:E}),!R&&(0,n.jsx)(My,{text:O})]})})})})}),g&&(0,n.jsx)("div",{"aria-live":"off",className:"visually-hidden-always",ref:v,role:"status",tabIndex:-1,children:l?.a11yStatusContinued||"Continued"})]})}var $X=p(70318),Zd=p.n($X);const VX=$("flashcard");class zX extends u.PureComponent{static defaultProps={allowTabNavigation:!0,backType:"description",forceFlipped:!1,frontType:"description",getL10nValue:()=>{},onFlip:Function.prototype,onStep:Function.prototype,settingShowHint:!0};state={areSidesReady:!0,flipped:!1,hasFlippedOnce:!1,isMounted:!1};cardRef=(0,u.createRef)();render(){const{cardRef:t,handleFlip:s,handleSideReady:o,handleTouchEnd:r,props:{activeIndex:a,allowTabNavigation:i,backDescription:c,backMedia:l,backType:d,block:h,forceFlipped:m,frontDescription:f,frontMedia:v,frontType:C,id:g,index:x,isHidden:b,labels:T,lessonId:L,prefersKeyboardNavigation:y,settingShowHint:S,size:k,type:N,wrapElement:I,wrapRole:w},state:{areSidesReady:A,flipped:E,isMounted:j}}=this,O=m||E,R=VX({large:k==="large",small:k==="small",flipped:O,stack:N==="stack"});return(0,n.jsxs)(I,{"aria-hidden":!i,className:R,onClick:s,onTouchEnd:r,ref:t,role:w,children:[(0,n.jsx)(Gt,{activeIndex:a,allowTabNavigation:i,blockId:h?.id,blockType:N,description:f,index:x,isActiveSide:!O,isAriaHidden:O&&j&&A,isFlipped:O,isHidden:b,itemId:g,labels:T,lessonId:L,media:v,onFlip:s,onReady:o,prefersKeyboardNavigation:y,settingShowHint:S,side:"front",size:k,tag:By,type:C}),(0,n.jsx)(Gt,{activeIndex:a,allowTabNavigation:i,blockId:h?.id,blockType:N,description:c,index:x,isActiveSide:O,isAriaHidden:!O&&j&&A,isFlipped:O,isHidden:b,itemId:g,labels:T,lessonId:L,media:l,onFlip:s,onReady:o,prefersKeyboardNavigation:y,settingShowHint:S,side:"back",size:k,tag:UX,type:d})]})}componentDidMount(){this.setState({isMounted:!0}),window.addEventListener(Ge,this.handleNavEvent)}componentDidUpdate(t,s){const{props:{allowTabNavigation:o,id:r,onStep:a},state:{hasFlippedOnce:i}}=this;!s.hasFlippedOnce&&i&&a({id:r}),t.allowTabNavigation&&!o&&this.setState({flipped:!1})}componentWillUnmount(){window.removeEventListener(Ge,this.handleNavEvent)}handleNavEvent=t=>{const{path:s}=t.detail,{cardId:o}=pa(s,["block","card"]);if(o===this.props.id){let r=!1;s.includes("back")&&(r=!0),this.setState({flipped:r},()=>{this.props.type!=="stack"&&!wm(this.cardRef.current,"center")&&this.cardRef.current.scrollIntoView({behavior:"instant",block:"center"})})}};handleFlip=t=>{const{block:s,index:o}=this.props,r=window.getSelection(),a=r.toString()&&this.cardRef.current?.contains(r.anchorNode);if(t.detail>1&&r.empty(),t&&t.target.closest("a")||a)return;const i=!this.state.flipped;this.setState({areSidesReady:!1,flipped:i,hasFlippedOnce:!0});const c=i?"back":"front",l=s?.items?.[o],d=l?.[c]?.media,h=`items:${s?.id}/items:${l?.id}/${c}`;this.props.onTranscriptUpdate?.({audioPlayerId:fn({refs:h}),transcriptMedia:d}),this.props.onFlip?.(this.props.index,i)};handleTouchEnd=t=>{t.stopPropagation()};handleSideReady=()=>{this.setState({areSidesReady:!0})}}const Oy=Cl(Ze(zX)),Ha=$("flashcard-side"),Xd=$("flashcard-side-flip");class wr extends u.PureComponent{static descriptionActionTypes={INITIAL:"INITIAL",INSERTING:"INSERTING",DELETING:"DELETING"};static initialState={descriptionAction:wr.descriptionActionTypes.INITIAL,isAtLongOverflowBottom:!1,isLong:!1,isLongOverflow:!1,isTooltipVisible:!1,scrollbarWidthOffset:void 0};id;constructor(t){super(t),this.handleMouseEnterAudio=this.handleMouseEnterAudio.bind(this),this.handleMouseLeaveAudio=this.handleMouseLeaveAudio.bind(this),this.id=(0,Qu.uniqueId)("flashcard-side")}state=wr.initialState;longBottomObserver=void 0;readyTimeout=void 0;refDescription=(0,u.createRef)();refDescriptionBottom=(0,u.createRef)();refSide=(0,u.createRef)();refBtnTimeoutMouseLeave=(0,u.createRef)();checkDescriptionSizeDebounced;handleMouseEnterAudio=()=>{const{itemId:t,index:s,settingShowHint:o,side:r}=this.props,a=document.getElementById(`${t}-${s}-${r}-flip-btn`);a&&o&&(a.style.opacity="0.6")};handleMouseLeaveAudio=()=>{const{itemId:t,index:s,settingShowHint:o,side:r}=this.props,a=document.getElementById(`${t}-${s}-${r}-flip-btn`);a&&o&&(a.style.opacity="1")};render(){const{props:{activeIndex:t,allowTabNavigation:s,block:o,className:r,description:a,getL10nValue:i,index:c,itemId:l,media:d,isActiveSide:h,isAriaHidden:m,isFlipped:f,labels:v,lessonId:C,onFlip:g,prefersKeyboardNavigation:x,settingShowHint:b,side:T,size:L,style:y,type:S},refDescription:k,refDescriptionBottom:N,refSide:I,state:{isAtLongOverflowBottom:w,isLong:A,isLongOverflow:E,isTooltipVisible:j,scrollbarWidthOffset:O}}=this,R=T==="front",P=T==="back",M=L==="small",H=L==="large",F=S==="description",D=S==="fullimage",V=S==="image",W=R?v?.a11yBlockFlashcardFront:v?.a11yBlockFlashcardBack,_=`items:${o?.id}/items:${l}/${R?"front":"back"}`,Z=Ha({back:P,flipped:f,front:R,fullimage:D}).mix(r),{image:oe,audio:Q}=i(d)??{},U=Ha("content",{small:M,large:H,front:R,fullimage:D,image:V,"long-overflow":E,"long-overflow-bottom":w,"has-audio":!!Q}),B=Xd({"audio-expansion":!0}),z=Xd("btn",{"visually-hidden":!b,"prefers-keyboard":x,round:!0}),K=Xd("icon"),Y=Xd("tooltip",{visible:j}),J=Ha("img",{small:M,large:H,centered:V,full:D}),q=Ha("description",{"has-audio":!!Q,long:A&&!E,"long-overflow":E,short:!A,large:H}),ee=Ha("description-bottom"),se=O==null?void 0:{right:O},te=oe?.alt??`Image ${c+1}`,ye=dt(oe),G=`${this.id}-click-to-flip-text`,le=`${this.id}-image`,me=`${this.id}-description`;return(0,n.jsxs)("div",{"aria-label":W,className:Z,inert:m,ref:I,role:"group",style:y,tabIndex:-1,children:[(0,n.jsxs)("div",{className:U,children:[(0,n.jsxs)("div",{className:B,onMouseEnter:this.handleBtnMouseEnter,onMouseLeave:this.handleBtnMouseLeave,style:se,children:[(0,n.jsx)("button",{"aria-labelledby":`${G} ${me} ${le}`,className:z,id:`${l}-${c}-${T}-flip-btn`,onBlur:this.handleBtnBlur,onClick:g,onFocus:this.handleBtnFocus,tabIndex:s&&h?0:-1,type:"button",children:(0,n.jsx)(WD,{className:K})}),(0,n.jsx)("div",{"aria-hidden":"true",className:Y,id:G,onClick:Ro,children:v?.blocksClickToFlip})]}),(D||V)&&(0,n.jsx)(_X,{alt:te,className:J,imageId:le,l10nId:Pt(d),url:ye}),F&&(0,n.jsxs)("div",{className:q,ref:k,tabIndex:h&&E?0:void 0,children:[(0,n.jsx)(ke,{allowTabNavigation:s&&!m,id:me,value:a}),E&&(0,n.jsx)("div",{className:ee,ref:N})]})]}),Q&&(0,n.jsx)("div",{className:Ha("audio-player",{text:F,image:V}),onMouseEnter:this.handleMouseEnterAudio,onMouseLeave:this.handleMouseLeaveAudio,children:(0,n.jsx)(Xt,{activeIndex:t,blockId:o.id,index:`${l}-${c}-${T}`,isOverlayAudio:D,item:{id:l,media:d},itemIndex:c,labels:v,lessonId:C,media:d,mediaType:"audio",refs:_,shouldPause:!h,side:T})})]})}componentDidMount(){this.checkDescriptionSize(this.props),this.checkDescriptionSizeDebounced=Zd()(this.checkDescriptionSize,250),window.addEventListener("resize",this.checkDescriptionSizeDebounced),document.addEventListener("keydown",this.handleDocumentKeyDown)}componentWillUnmount(){clearTimeout(this.readyTimeout),this.cleanupLongBottomObserver(),window.removeEventListener("resize",this.checkDescriptionSizeDebounced),document.removeEventListener("keydown",this.handleDocumentKeyDown)}componentDidUpdate(t,s){const{props:{allowTabNavigation:o,blockType:r,isFlipped:a,isActiveSide:i,isHidden:c,onReady:l,type:d}}=this;t.isHidden&&!c&&this.checkDescriptionSize(this.props),t.isFlipped!==a&&(i&&o?(this.refSide.current?.focus?.(),this.readyTimeout=setTimeout(()=>{l()},700)):clearTimeout(this.readyTimeout)),d==="description"&&this.handleUpdatesDescription(t,s),r==="stack"&&i&&!t.allowTabNavigation&&o&&this.refSide.current?.focus?.()}handleBtnBlur=()=>{this.setState({isTooltipVisible:!1})};handleBtnFocus=()=>{this.setState({isTooltipVisible:!0})};handleBtnMouseEnter=()=>{clearTimeout(this.refBtnTimeoutMouseLeave.current),this.setState({isTooltipVisible:!0})};handleBtnMouseLeave=()=>{this.refBtnTimeoutMouseLeave.current=setTimeout(()=>{this.setState({isTooltipVisible:!1})},150)};handleDocumentKeyDown=t=>{vs(t)&&this.state.isTooltipVisible&&this.setState({isTooltipVisible:!1})};handleUpdatesDescription=(t,s)=>{const{props:{isFlipped:o,isActiveSide:r},state:{isLongOverflow:a}}=this;t.isFlipped!==o&&r&&this.scrollDescriptionToTop(),this.handleUpdatesDescriptionSize(t,s),!s.isLongOverflow&&a?(this.setLongBottomObserver(),this.setScrollbarWidth()):s.isLongOverflow&&!a&&this.cleanupLongBottomObserver()};handleUpdatesDescriptionSize=(t,s)=>{const{INSERTING:o,DELETING:r}=wr.descriptionActionTypes,{props:{description:a,size:i,type:c,getL10nValue:l},state:{descriptionAction:d,isLong:h,isLongOverflow:m}}=this,f=l(a)?.length||0,v=l(t.description)?.length||0;d!==o&&f>v?this.setState({descriptionAction:o}):d!==r&&f<v?this.setState({descriptionAction:r}):(d!==s.descriptionAction||h!==s.isLong||m!==s.isLongOverflow||i!==t.size||c!==t.type||f!==v)&&this.checkDescriptionSize(t)};checkDescriptionSize=t=>{const{DELETING:s}=wr.descriptionActionTypes,{props:{size:o},refDescription:{current:r},state:{descriptionAction:a,isLong:i,isLongOverflow:c}}=this;if(!r)return;r&&r.scrollHeight>r.clientHeight?i&&!c?this.setState({isLongOverflow:!0}):!i&&!c&&this.setState({isLong:!0}):(a===s||o!==t.size)&&this.setState(wr.initialState)};scrollDescriptionToTop=()=>{const t=this.refDescription.current;this.state.isLong&&t&&(t.scrollTop=0)};setLongBottomObserver=()=>{const t=this.refDescriptionBottom.current;if(t&&this.longBottomObserver==null){const s=o=>{const r=o?.[0]?.isIntersecting??!1;this.setState({isAtLongOverflowBottom:!r})};this.longBottomObserver=new IntersectionObserver(s,{threshold:[0,1]}),this.longBottomObserver.observe(t)}};cleanupLongBottomObserver=()=>{this.longBottomObserver?.disconnect?.(),this.longBottomObserver=void 0};setScrollbarWidth=()=>{const t=this.refDescription.current;if(t){const s=t.offsetWidth-t.clientWidth;s>0&&this.setState({scrollbarWidthOffset:s})}}}const By=Cl(Ze(e=>(0,n.jsx)(wr,{...e}))),UX=e=>{const{cardMode:t,customBackgroundColorContrast:s}=rs(),o=De()?.theme,r=xl(),a=Tn(),c=a===ne.IMAGE&&r?.overlayColor===at.LIGHT,l=js(),d=o?.accentContrast,h=d===Te.AUTO,m=(0,u.useMemo)(()=>{let v="#fafafa";if(t===$s.TRANSPARENT)switch(a){case ne.DARK:v="#525252";break;case ne.BLACK:v="#1a1a1a";break;case ne.IMAGE:c?v="rgba(0, 0, 0, 0.7)":v="rgba(255, 255, 255, 0.7)";break;case ne.ACCENT:case ne.COLOR:case ne.TINT:if(l!=null)switch(ia(l)){case ut.LIGHT:v=en(.5,l);break;case ut.MED:v=yn(.35,l);break;case ut.DARK:v=yn(.65,l);break;case ut.NEAR_BLACK:v=en(.1,l);break}}const C={"--color-background":v},g=a===ne.COLOR?s:d;if((a===ne.ACCENT||a===ne.COLOR)&&t===$s.TRANSPARENT&&h){const x=zt({backgroundColor:v,contrast:g});C["--color-text"]=x}return C},[l,a,t,s,h,c,d]),f={...e,style:m};return(0,n.jsx)(By,{...f})},_X=({alt:e,className:t,imageId:s,l10nId:o,url:r})=>{const a=bo(e);return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(xs,{alt:a,className:t,"data-l10n-id":o,id:s,src:r}),!a&&(0,n.jsx)("span",{className:"visually-hidden-always",children:"No image alternative text"})]})};class GX extends u.Component{static defaultProps={editable:!1,isRTL:!1,items:[],onStep:()=>{},stack:!1};state={activeIndex:0,flipStateMap:{},prefersKeyboardNavigation:!0};render(){const{blockId:t,animateBlockEntrance:s,initiallyVisible:o,isHidden:r,isLearner:a,items:i,labels:c,lessonId:l,onStep:d,previewType:h,isRTL:m,settings:f,stack:v}=this.props,{activeIndex:C}=this.state,{prefersKeyboardNavigation:g}=this.state,{entranceAnimation:x,showHint:b}=f,T=X()("block-flashcards",{"block-flashcard--column":!v,"block-flashcard--stack":v,"block-flashcards--no-animation":!x}),y=f.flashcardSize==="1"?"small":f.flashcardSize==="2"?"large":i.length>2?"small":"large",S=h===sr.MOBILE_PORTRAIT||h===sr.MOBILE_LANDSCAPE;return(0,n.jsx)(Ee,{className:T,children:v?(0,n.jsx)(Be,{animateBlockEntrance:s,initiallyVisible:o,isLearner:a,children:(0,n.jsx)("div",{className:"block-flashcard-carousel",children:(0,n.jsx)(Bd,{blockId:t,items:i,children:({carouselRef:k})=>(0,n.jsx)(Od,{iconNameLeft:"chevron-left",iconNameRight:"chevron-right",isInfinite:!1,isRTL:m,labelCarousel:c?.a11yBlockFlashcardStack,labelCarouselRoleDesc:c?.a11yBlockFlashcardStackRoleDescription,labelSlideControls:c?.a11yBlockFlashcardStackSlideControls,labelSlideControlsGoToNext:c?.a11yBlockFlashcardStackSlideControlsGoToNext,labelSlideControlsGoToPrevious:c?.a11yBlockFlashcardStackSlideControlsGoToPrevious,labelSlideControlsGoToSlide:c?.a11yBlockFlashcardStackSlideControlsGoToSlide,labelSlideCounterPreposition:c?.blocksPreposition,labelSlidePreposition:c?.a11yBlockFlashcardStackSlidePreposition,labelSlideRoleDesc:c?.a11yBlockFlashcardStackSlideRoleDescription,onChange:this.handleCarouselChange.bind(this),ref:k,shouldMouseEmulateTouch:S,shouldUseCounter:!0,shouldUseGoToSlide:!1,children:i.map((N,I)=>(0,n.jsx)(Oy,{activeIndex:C,backDescription:N?.back?.description,backMedia:N?.back?.media,backType:N?.back?.type,frontDescription:N?.front?.description,frontMedia:N?.front?.media,frontType:N?.front?.type,id:N?.id,index:I,isHidden:r,labels:c,lessonId:l,onFlip:this.handleFlip.bind(this),onStep:d,prefersKeyboardNavigation:g,settingShowHint:b,size:"large",type:"stack",wrapElement:"div"},N?.id))})})})}):(0,n.jsx)(Be,{animateBlockEntrance:s,className:"block-flashcards__animation",initiallyVisible:o,isLearner:a,siblingDelay:.25,children:(0,n.jsx)("ol",{className:"block-flashcards__wrapper",role:"list",children:i.map((k,N)=>(0,n.jsx)(Oy,{activeIndex:C,backDescription:k?.back?.description,backMedia:k?.back?.media,backType:k?.back?.type,blockId:t,frontDescription:k?.front?.description,frontMedia:k?.front?.media,frontType:k?.front?.type,id:k?.id,index:N,isHidden:r,labels:c,lessonId:l,onStep:d,prefersKeyboardNavigation:g,settingShowHint:b,size:y,type:"grid",wrapElement:"li",wrapRole:"listitem"},k?.id))})})})}componentDidMount(){document.addEventListener("keydown",this.handleKeyDown),document.addEventListener("mousedown",this.handleMouseDown)}componentWillUnmount(){document.removeEventListener("keydown",this.handleKeyDown),document.removeEventListener("mousedown",this.handleMouseDown)}handleKeyDown=t=>{!this.state.prefersKeyboardNavigation&&!MM(t)&&this.setState({prefersKeyboardNavigation:!0})};handleMouseDown=()=>{this.state.prefersKeyboardNavigation&&this.setState({prefersKeyboardNavigation:!0})};handleFlip(t,s){this.setState(o=>({flipStateMap:{...o.flipStateMap,[t]:s}}))}handleCarouselChange(t){const{block:s,onTranscriptUpdate:o}=this.props,{flipStateMap:r}=this.state,a=r[t]?"back":"front",i=s.items?.[t],c=i?.[a]?.media,l=`items:${s?.id}/items:${i?.id}/${a}`;o?.({audioPlayerId:fn({refs:l}),transcriptMedia:c}),this.setState({activeIndex:t})}}const Dy=wf(Ze(Cl(GX))),Zf=$("pill-button");function Fy({allowTabNavigation:e=!0,ariaLabel:t,children:s,className:o,href:r,onClick:a=()=>{},onFocus:i,ref:c,size:l="sm",testId:d,variant:h="plain"}){const m=Zf({[h]:!0,[l]:!0}).mix(o),f=!e;return r?(0,n.jsx)(as,{"aria-hidden":f,"aria-label":t,className:m,"data-testid":d,onClick:a,onFocus:i,tabIndex:e?void 0:-1,to:r,children:(0,n.jsx)("span",{className:Zf("content"),children:s})}):(0,n.jsx)("button",{"aria-hidden":f,"aria-label":t,className:m,"data-testid":d,onClick:a,onFocus:i,ref:c,tabIndex:e?void 0:-1,type:"button",children:(0,n.jsx)("span",{className:Zf("content"),children:s})})}const Hy=({allowNext:e=!1,canProceed:t=!1,isReduceMotion:s=!1,onNext:o,onSubmit:r,quizNext:a,quizSubmit:i})=>{const c=t?!0:void 0,l=t?void 0:r,d=t?-1:void 0,h=t?void 0:!0,m=t?o:void 0,f=t?void 0:-1,v=(0,u.useRef)(null),C=(0,Me.A)(t);(0,u.useEffect)(()=>{e&&!C&&t&&setTimeout(()=>{v.current?.focus?.({preventScroll:s})},0)},[e,t,s,C]);const g=X()("quiz-card__actions",{"quiz-card__actions--proceed":t}),x=X()("quiz-card__button","quiz-card__button--next","brand_ui",{"brand--background":t,"visually-hidden-always":!t});return(0,n.jsxs)("div",{className:g,children:[(0,n.jsx)("div",{className:"quiz-card__submit brand--ui",children:!c&&(0,n.jsx)("button",{className:"quiz-card__button","data-testid":"quiz-submit-button",onClick:l,tabIndex:d,type:"button",children:i})}),(0,n.jsx)("br",{className:"visually-hidden-always",role:"presentation"}),e&&(0,n.jsx)("div",{className:"quiz-card__next brand--ui",children:(0,n.jsx)("button",{"aria-disabled":h,"aria-hidden":h,className:x,"data-testid":"quiz-next-button",onClick:m,ref:v,tabIndex:f,type:"button",children:a})})]})},WX=({children:e,isActive:t,isComplete:s,isTimedQuiz:o,style:r})=>(0,n.jsx)("div",{"aria-hidden":t?void 0:!0,className:KX({isActive:t,isComplete:s,isTimedQuiz:o}),"data-testid":"quiz-card",inert:t?void 0:!0,style:r,children:(0,n.jsx)("div",{className:"quiz-card__container",children:(0,n.jsx)("div",{className:"quiz-card__row",children:(0,n.jsx)("div",{className:"quiz-card__main",children:e})})})}),KX=({isActive:e,isComplete:t,isTimedQuiz:s})=>X()("quiz-card",{"quiz-card--active":e,"quiz-card--done":t,"quiz-card--timed":s}),$y=WX,{FILL_IN_THE_BLANK:Vy,MATCHING:QX,MULTIPLE_CHOICE:YX,MULTIPLE_RESPONSE:ZX}=ns;function XX(e,t){return e.map(s=>String(t(s?.title)??"")).filter(Boolean).join(", ")}function qX(e,t,s){const o=t!=null?e.find(r=>r.id===t):e.find(r=>r.correct===!0);return String(s(o?.title)??"")}function JX(e,t,s){return String(s(e?.[t]?.title)??"")}function zy(e,t,s){return t.filter(e).reduce((o,r,a)=>{const i=String(s(r?.title)??"");return a===0?i:o+", "+i},"")}function eq(e,t,s){return zy(r=>Array.isArray(e)?e.includes(r.id):!!r.correct,t,s)}function tq(e,t,s){return zy((r,a)=>t.includes(a),e,s)}function sq({answers:e,getL10nValue:t,selection:s,correctLabel:o,userLabel:r,matchLabel:a="Match Item: ",revealAnswers:i}){const c=Object.fromEntries(Object.entries(s).map(([l,d])=>[d,l]));return e.map((l,d)=>{const h=String(t(l?.title)??""),m=String(t(l?.matchTitle)??""),f=c?.[d],v=String(t(e?.[Number(f)]?.title)??"");return i===je.INCORRECT?`${a}${m}. ${r}: ${v}.`:`${a}${m}. ${o}: ${h}. ${r}: ${v}.`}).join(" ")}function Xf({correctAnswer:e,selectedAnswer:t,correctLabel:s,userLabel:o,revealAnswers:r}){return!e||!t||r===je.NONE?"":r===je.INCORRECT?`${o}: ${Ss(t)}.`:`${s}: ${Ss(e)}. ${o}: ${Ss(t)}.`}function nq(e,t){return e.type===Vy?t?.quizAcceptableResponses:t?.a11yCorrectLive}function oq({getL10nValue:e,isComplete:t,item:s,selection:o,labels:r,revealAnswers:a}){if(!s||!t)return null;const i=s?.answers??[],c=s?.correct,l=s?.corrects,d=nq(s,r),h=r?.a11yAnswerLive;switch(s.type){case QX:return sq({getL10nValue:e,answers:i,selection:o,correctLabel:d,userLabel:h,revealAnswers:a});case Vy:return Xf({correctAnswer:XX(i,e),selectedAnswer:o,correctLabel:d,userLabel:h,revealAnswers:a});case YX:return Xf({correctAnswer:qX(i,c,e),selectedAnswer:JX(i,o,e),correctLabel:d,userLabel:h,revealAnswers:a});case ZX:return Xf({correctAnswer:eq(l,i,e),selectedAnswer:tq(i,o,e),correctLabel:d,userLabel:h,revealAnswers:a})}return null}const Uy=({canProceed:e,feedbackRef:t,feedbackValue:s,isActive:o,isComplete:r,isCorrect:a,item:i,labels:c,quizCorrect:l,quizIncorrect:d,revealAnswers:h,selection:m})=>{const{announcePolite:f,clearAnnouncements:v}=bn(),C=(0,Me.A)(e),g=Ot(),b=!!Ae(s),T=a?l:d,L=(0,u.useCallback)(()=>{const k=oq({getL10nValue:g,isComplete:r,item:i,labels:c,revealAnswers:h,selection:m}),N=s?Ss(g(s)):"",I=T+". "+k+" "+N;let w;return I&&(w=setTimeout(()=>{f(I)},250)),()=>{clearTimeout(w)}},[f,s,g,r,i,c,T,h,m]);(0,u.useLayoutEffect)(()=>{!C&&e&&h!==je.NONE&&L()},[e,C,L,h]),(0,u.useEffect)(()=>v,[v]);const y=X()("quiz-card__feedback",{"quiz-card__feedback--active":e,"quiz-card__feedback--frame":b}),S=X()("quiz-card__feedback-icon",{"quiz-card__feedback-icon--correct":a});return(0,n.jsx)(n.Fragment,{children:(0,n.jsx)("div",{"aria-hidden":o?void 0:!0,className:y,ref:t,tabIndex:o?-1:void 0,children:(0,n.jsx)("div",{className:"quiz-card__main--feedback",children:(0,n.jsxs)("div",{"aria-label":c?.a11yQuizFeedback,className:"quiz-card__feedback-wrap",role:"group",children:[(0,n.jsx)("div",{className:S,children:(0,n.jsx)("i",{"aria-hidden":"true",className:a?"icon icon-Master-05":"icon icon-Master-06"})}),(0,n.jsx)("div",{className:"quiz-card__feedback-label",children:T}),s&&(0,n.jsx)("div",{children:(0,n.jsx)(ke,{allowTabNavigation:r&&o,className:"quiz-card__feedback-text",value:s})})]})})})})},{FILL_IN_THE_BLANK:rq}=ns,aq=({children:e,type:t})=>(0,n.jsx)("div",{className:iq({type:t}),children:e}),iq=({type:e})=>X()("quiz-card__interactive",{"quiz-card__interactive--no-border":[rq].includes(e)}),_y=aq,Fo=({allowTabNavigation:e,blockId:t="",enableVideoPlaybackSpeed:s,index:o,isOverlayAudio:r,item:a,labels:i={},media:c,settings:l,shouldPause:d})=>c==null||!Object.keys(c).some(h=>h!=="tmp")?null:(0,n.jsx)("div",{className:"quiz-card__media",children:(0,n.jsx)(Xt,{allowTabNavigation:e,blockId:t,enableVideoPlaybackSpeed:s,index:o,isOverlayAudio:r,item:a,labels:i,media:c,opts:l,shouldPause:d})}),bpe=(e,t)=>s=>s>=e&&s<t,Gy=e=>e<10?`0${e}`:String(e),cq=e=>Intl.NumberFormat(void 0,{style:"percent",maximumFractionDigits:2}).format(e),Wy=e=>e.reduce((t,s)=>s==null||isNaN(s)?t:t+s,0),lq=(e,t)=>{const s=ws(),o=(0,Me.A)(t);(0,u.useEffect)(()=>{!o&&t&&e&&sd()(e.focus)&&e.focus({preventScroll:s})},[t,s,o,e])},qd=$("question-counter"),dq=({isActive:e=!1,labels:t,questionLabel:s,questionNumber:o,totalQuestions:r})=>{const a=(0,u.useRef)(null);lq(a.current,e);const i=`${t?.quizQuestion} ${o} ${t?.lessonPreposition} ${r}`,c=`${Gy(o)}/${Gy(r)}`;return(0,n.jsx)("div",{className:qd(),children:(0,n.jsxs)("h1",{"aria-label":i,className:qd("heading"),ref:a,tabIndex:-1,children:[(0,n.jsx)("span",{"aria-hidden":"true",className:qd("label"),children:s}),(0,n.jsx)("span",{"aria-hidden":"true",className:qd("count"),children:c})]})})},uq=$("question-title"),hq=({allowTabNavigation:e,htmlId:t,value:s})=>(0,n.jsx)(ke,{allowTabNavigation:e,className:uq(),"data-testid":"quiz-question-title",id:t,value:s}),mq=({allowTabNavigation:e=!1,correctAnswerColor:t,correctAnswerColorContrast:s,errorMessageId:o,incorrectAnswerColor:r,incorrectAnswerColorContrast:a,isComplete:i,isCorrect:c=!1,labels:l,onEnterToSubmit:d=()=>{},onChange:h=()=>{},options:m,questionHtmlId:f="",quizAcceptableResponses:v="",quizAnswerPlaceholder:C,revealAnswers:g=je.NONE,value:x=""})=>{const b=(0,u.useRef)(null),[T]=(0,u.useState)(()=>vr()("fitb-")),L=Ot(),y=fq({options:m,getL10nValue:L}),S=`${T}-feedback`,k=`${T}-acceptable`,N=`${T}-input`,I=i?`${S} ${k}`:o||void 0,w=i?void 0:C,A=e?0:-1,E=g===je.ALL||g===je.INCORRECT,j=g===je.ALL||c&&g===je.INCORRECT,O=c?t:r,P=t&&r&&{"--fa-primary-color":zt({backgroundColor:O,contrast:c?s:a}),"--fa-secondary-color":O},M=r&&{backgroundColor:zt({backgroundColor:r,contrast:a}),fill:r,borderRadius:"50%"},H=X()("quiz-fill__icon",{"quiz-fill__icon--visible":i}),F=X()("quiz-fill__options",{"quiz-fill__options--visible":i}),D=(0,u.useCallback)(Z=>{h(Z.currentTarget.value)},[h]),V=(0,u.useCallback)(Z=>{la(Z)&&d(Z)},[d]),W=i?void 0:D,_=i?void 0:V;return(0,n.jsxs)("div",{className:"quiz-fill",children:[(0,n.jsxs)("div",{className:"quiz-fill__container",children:[(0,n.jsx)("input",{"aria-describedby":I,"aria-hidden":!e,"aria-invalid":o?!0:void 0,"aria-labelledby":f,"aria-readonly":i,"aria-required":"true",autoComplete:"off",className:"quiz-fill__input ignore-prefers",id:N,onChange:W,onKeyDown:_,placeholder:w,readOnly:i,ref:b,tabIndex:A,type:"text",value:x}),E&&(0,n.jsxs)("div",{className:H,id:S,children:[c&&(0,n.jsx)(ie,{"aria-label":l?.quizCorrect,name:"circle-check",styleIcon:{height:"2rem",...P}}),!c&&(0,n.jsx)(rF,{"aria-label":l?.quizIncorrect,style:M})]})]}),j&&i&&(0,n.jsx)("div",{className:F,id:k,children:(0,n.jsx)(ke,{value:`${v}: ${y}`})})]})},fq=({options:e,getL10nValue:t})=>e.map(o=>(t(o.title)??"").trim()).join(", "),Ky=mq;function pq({correctAnswerColor:e,correctAnswerColorContrast:t}){const s=Mt(),o=zt({backgroundColor:e,contrast:t}),r=e?{"--fa-primary-color":o,"--fa-secondary-color":e}:void 0;return(0,n.jsxs)("div",{className:"matching-results-item-feedback",children:[(0,n.jsx)(ie,{className:"matching-results-item-feedback-icon matching-results-item-feedback-icon--correct",name:"circle-check",style:r}),(0,n.jsx)("span",{className:"matching-results-item-feedback-text",children:(0,n.jsx)("span",{className:"matching-results-item-feedback-text-result",children:s?.quizCorrect})})]})}var $a=p(82920);function gq({correctAnswerValue:e,incorrectAnswerColor:t,incorrectAnswerColorContrast:s,shouldRevealCorrectAnswer:o}){const[r,a]=$a.useState(!0),[i,c]=$a.useState(!1),l=$a.useRef(null),h=`matching-text-${$a.useId()}`,m=Mt(),f=(0,Me.A)(e),v=$a.useCallback(()=>{a(y=>!y)},[]);$a.useLayoutEffect(()=>{if(f!==e){const y=l.current;y!=null&&y.scrollWidth>y.clientWidth&&c(!0)}},[f,e]);const C=zt({backgroundColor:t,contrast:s}),g=t?{"--fa-primary-color":C,"--fa-secondary-color":t}:void 0,x=X()("matching-results-item-feedback-text",{"matching-results-item-feedback-text--collapsed":r}),b=X()("matching-results-item-feedback-text-btn-icon",{"matching-results-item-feedback-text-btn-icon--collapsed":r}),T=X()("matching-results-item-feedback-text-extra",{"matching-results-item-feedback-text-extra--collapsed":r}),L=X()("matching-results-item-feedback-text-extra-text",{"matching-results-item-feedback-text-extra-text--collapsed":r});return(0,n.jsxs)("div",{className:"matching-results-item-feedback",children:[(0,n.jsx)(ie,{className:"matching-results-item-feedback-icon matching-results-item-feedback-icon--incorrect",name:"circle-xmark-duotone",style:g}),!o&&(0,n.jsx)("span",{className:"matching-results-item-feedback-text",children:(0,n.jsx)("span",{className:"matching-results-item-feedback-text-result",children:m?.quizIncorrect})}),o&&(0,n.jsx)(n.Fragment,{children:(0,n.jsxs)("span",{className:x,children:[(0,n.jsxs)("span",{className:"matching-results-item-feedback-text-result",children:[m?.quizIncorrect,"."]}),i&&(0,n.jsx)("button",{"aria-controls":h,"aria-expanded":!r,"aria-label":r?m?.a11yMatchingItemShowMore:m?.a11yMatchingItemShowLess,className:"matching-results-item-feedback-text-btn",onClick:v,type:"button",children:(0,n.jsx)(ie,{className:b,name:"caret-down",style:g})}),(0,n.jsx)("span",{className:T,children:(0,n.jsxs)("span",{className:L,id:h,ref:l,children:[m?.quizCorrect,": ",(0,n.jsx)(gs,{value:e})]})})]})})]})}function vq({col1Id:e,col1Value:t,col2Id:s,col2Value:o,correctAnswerColor:r,correctAnswerColorContrast:a,correctAnswerValue:i,height:c,incorrectAnswerColor:l,incorrectAnswerColorContrast:d,revealAnswers:h}){const m=e===s,f=h!=="incorrect",v=h!=="none";return(0,n.jsxs)("li",{className:"matching-results-item",role:"listitem",children:[(0,n.jsxs)("div",{className:"matching-results-item-pieces",children:[(0,n.jsxs)("div",{className:"matching-results-item-piece",style:c?{height:c}:void 0,children:[(0,n.jsx)("span",{className:"matching-results-item-piece-decoration"}),(0,n.jsx)("span",{className:"matching-results-item-piece-jigsaw"}),(0,n.jsx)("span",{className:"matching-results-item-piece-content",children:(0,n.jsx)("span",{"data-matching-results-item-piece-content-inline":"",children:(0,n.jsx)(gs,{value:t})})})]}),(0,n.jsxs)("div",{className:"matching-results-item-piece",children:[(0,n.jsx)("span",{className:"matching-results-item-piece-decoration"}),(0,n.jsx)("span",{className:"matching-results-item-piece-jigsaw"}),(0,n.jsx)("span",{className:"matching-results-item-piece-content",children:(0,n.jsx)("span",{"data-matching-results-item-piece-content-inline":"",children:(0,n.jsx)(gs,{value:o})})})]})]}),v&&m&&(0,n.jsx)(pq,{correctAnswerColor:r,correctAnswerColorContrast:a}),v&&!m&&(0,n.jsx)(gq,{correctAnswerValue:i,incorrectAnswerColor:l,incorrectAnswerColorContrast:d,shouldRevealCorrectAnswer:f})]})}function Cq({answers:e,columnBehavior:t,correctAnswerColor:s,correctAnswerColorContrast:o,incorrectAnswerColor:r,incorrectAnswerColorContrast:a,itemHeight:i,revealAnswers:c,rows:l}){return(0,n.jsx)("div",{className:"matching-results",children:(0,n.jsx)("ul",{className:"matching-results-list",role:"list",children:l.map((d,h)=>{const[m,f]=d,v=t==="freezeFirst"?e.find(C=>C.id===m.id)?.matchTitle:e.find(C=>C.id===f.id)?.title;return(0,n.jsx)(vq,{col1Id:m.id,col1Value:m.value,col2Id:f.id,col2Value:f.value,correctAnswerColor:s,correctAnswerColorContrast:o,correctAnswerValue:v,height:i,incorrectAnswerColor:r,incorrectAnswerColorContrast:a,revealAnswers:c},h)})})})}function xq(e){return Object.keys(e).length===0}function bq(e,t){return t in e}function yq(e,t){return Object.values(e).includes(t)}function qf(e,t){for(const s in e)if(e[s]===t)return s}function Tq(e,t,s){return{...e,[t]:s}}function Jd(e,t){return t in e?$t(e,[t]):e}function Lq(e,t){const s=qf(e,t);return s===void 0?e:Jd(e,s)}function Qy(e,t,s){let o=Jd(e,t);return o=Lq(o,s),Tq(o,t,s)}function Sq(e){return Object.keys(e).length}var kq=p(93481),Jf=p.n(kq);Jf().dynamicDrop(!0),Jf().pointerMoveTolerance(8);const wn=Jf();var Va=p(82920);function Nq(e,{onStart:t,onMove:s,onEnd:o,isEnabled:r=!0}){const a=Va.useRef({x:0,y:0}),i=Va.useRef({x:0,y:0}),c=Va.useRef(!1),l=Va.useRef(null),d=Va.useRef(void 0);Va.useEffect(()=>{const h=e.current;if(!h||!r||c.current)return;l.current=bx(h);function m(){const f=l.current;return f instanceof Window?{x:window.scrollX,y:window.scrollY}:{x:f.scrollLeft,y:f.scrollTop}}return d.current=()=>{const f=m(),v=f.x-i.current.x,C=f.y-i.current.y;(v!==0||C!==0)&&(a.current.x+=v,a.current.y+=C,e.current&&(e.current.style.transform=`translate3d(${a.current.x}px, ${a.current.y}px, 0)`,s?.({...a.current})),i.current=f)},wn(h).draggable({inertia:!1,autoScroll:{container:l.current,distance:5,interval:10,margin:50},listeners:{start:()=>{a.current={x:0,y:0},i.current=m(),l.current?.addEventListener("scroll",d.current,{passive:!0}),t?.()},move:f=>{a.current.x+=f.dx,a.current.y+=f.dy,h.style.transform=`translate3d(${a.current.x}px, ${a.current.y}px, 0)`,s?.({...a.current})},end:()=>{a.current={x:0,y:0},h.style.transform="",l.current?.removeEventListener("scroll",d.current),setTimeout(()=>{o?.()},0)}}}),c.current=!0,()=>{wn(h).unset(),l.current?.removeEventListener("scroll",d.current),c.current=!1}},[e,t,s,o,r])}var Yy=p(82920);function Iq(e,{isEnabled:t=!0,onDrop:s,onEnter:o,onLeave:r,overlap:a=.015}){const i=Yy.useRef(!1);Yy.useEffect(()=>{const c=e.current;if(!(!c||!t||i.current))return wn(c).dropzone({overlap:a,listeners:{drop:()=>{s?.()},dragenter:()=>{o?.()},dragleave:()=>{r?.()}}}),i.current=!0,()=>{wn(c).unset(),i.current=!1}},[e,s,o,r,t,a])}var Ks=p(82920);const Zy=Ks.memo(function({col:t,height:s,id:o,index:r,isActive:a,isFrozen:i,isMatched:c,isMoved:l,onClick:d,onDragEnd:h,onDragStart:m,onDrop:f,onDropZoneEnter:v,onDropZoneLeave:C,onKeyDown:g,value:x,valueOtherColumnActive:b,valueOtherColumnMatch:T}){const[L,y]=Ks.useState(!1),S=Ks.useRef(null),k=Ks.useRef(null),N=Mt(),I=Ks.useCallback(()=>{d({col:t,id:o,value:x})},[t,o,d,x]),w=Ks.useCallback(()=>{y(!0),m({col:t,id:o,value:x})},[t,o,m,x]),A=Ks.useCallback(()=>{h(),y(!1)},[h]),E=Ks.useCallback(()=>{f({col:t,id:o,value:x})},[t,o,f,x]),j=Ks.useCallback(()=>{v({col:t,id:o,value:x})},[t,o,v,x]),O=Ks.useCallback(()=>{C()},[C]),R=Ks.useCallback(D=>{g(D,{col:t,index:r})},[t,r,g]);Ks.useEffect(()=>{t===1&&r===0||k.current?.setAttribute("tabindex","-1")},[]),Nq(S,{isEnabled:!i,onStart:w,onEnd:A}),Iq(S,{isEnabled:i,onDrop:E,onEnter:j,onLeave:O});const P=X()("matching-interaction-piece",{"matching-interaction-piece--matched":c,"matching-interaction-piece--moved":l}),M=T==null?null:(0,n.jsxs)(n.Fragment,{children:[N?.a11yMatchingItemMatchedWith," ",(0,n.jsx)(gs,{value:T})]}),H=b==null?(0,n.jsx)(n.Fragment,{children:N?.a11yMatchingItemSelectableItem}):(0,n.jsxs)(n.Fragment,{children:[N?.a11yMatchingItemMatchWith," ",(0,n.jsx)(gs,{value:b})]}),F=X()("matching-interaction-item",{draggable:!i,"draggable--dragging":!i&&L,droppable:i});return(0,n.jsx)("li",{className:F,ref:S,role:"listitem",children:(0,n.jsxs)("button",{"aria-pressed":a||c?!0:void 0,className:P,"data-state":a?"active":void 0,onClick:L?void 0:I,onKeyDown:R,ref:k,style:s?{height:s}:void 0,type:"button",children:[i?(0,n.jsx)("span",{className:"matching-interaction-piece-decoration"}):(0,n.jsx)(ie,{className:"matching-interaction-piece-decoration",name:"grip-dots-vertical"}),t===2?(0,n.jsx)("span",{className:"matching-interaction-piece-jigsaw"}):null,(0,n.jsx)("span",{className:"matching-interaction-piece-content",children:(0,n.jsx)("span",{"data-matching-interaction-piece-content-inline":"",children:(0,n.jsx)(gs,{value:x})})}),(0,n.jsx)("span",{className:"visually-hidden-always",children:M}),(0,n.jsx)("span",{className:"visually-hidden-always",children:H})]},o)})});var _e=p(82920);function Eq({answers:e,columnBehavior:t,isActive:s,itemHeight:o,matches:r,onChange:a,onChangeItemHeight:i,onChangeRows:c,prefersKeyboardNavigation:l}){const d=(0,Me.A)(s),h=(0,Me.A)(t),m=(0,Me.A)(e),f=(0,Me.A)(r),v=Mt(),[C,g]=_e.useState(void 0),[x,b]=_e.useState(void 0),[T,L]=_e.useState(void 0),[y,S]=_e.useState(!1),k=_e.useRef(null),N=_e.useRef(null),I=_e.useRef(null),w=_e.useRef(void 0),A=_e.useRef(void 0),[E,j]=_e.useState(()=>eu({answers:e,columnBehavior:t,columnBehaviorToShuffle:"freezeSecond"})),[O,R]=_e.useState(()=>eu({answers:e,columnBehavior:t,columnBehaviorToShuffle:"freezeFirst"})),P=_e.useMemo(()=>e.map(z=>({col:1,id:z.id,value:z.title})).toSorted((z,K)=>{const Y=E.get(z.id)??1/0,J=E.get(K.id)??1/0;return Y-J}),[e,E]),M=_e.useMemo(()=>e.map(z=>({col:2,id:z.id,value:z.matchTitle})).toSorted((z,K)=>{const Y=O.get(z.id)??1/0,J=O.get(K.id)??1/0;return Y-J}),[e,O]),H=_e.useCallback(()=>{for(const B of k.current?.querySelectorAll('button:not([tabindex="-1"])')??[])B.setAttribute("tabindex","-1")},[]),F=_e.useCallback(B=>{const z=Array.from(E),K=Array.from(O);if(t==="freezeSecond"){const Y=new Array(K.length),J=z.map(se=>se[0]).filter(se=>!(se in B));for(const[se,te]of Object.entries(B)){const ye=O.get(te);Y[ye]=[se,ye]}for(let se=0;se<Y.length;se++)if(Y[se]==null){const te=J.shift();Y[se]=[te,se]}const q=new Map(Y),ee=Xy(E,q);ee.length>0&&b(ee),j(q)}else{const Y=new Array(z.length),J=new Set(Object.values(B)),q=K.map(te=>te[0]).filter(te=>!J.has(te));for(const[te,ye]of Object.entries(B)){const G=E.get(te);Y[G]=[ye,G]}for(let te=0;te<Y.length;te++)if(Y[te]==null){const ye=q.shift();Y[te]=[ye,te]}const ee=new Map(Y),se=Xy(O,ee);se.length>0&&L(se),R(ee)}},[t,E,O]),D=_e.useCallback(B=>{w.current=B},[]),V=_e.useCallback(()=>{A.current==null&&(w.current=void 0)},[]),W=_e.useCallback(B=>{A.current=B},[]),_=_e.useCallback(()=>{A.current=void 0},[]),Z=_e.useCallback(B=>{const z=w.current;if(z!=null){const K=B.col===1?B.id:z.id,Y=B.col===1?z.id:B.id,J=Qy(r,K,Y);w.current=void 0,A.current=void 0,a(J)}},[r,a]),oe=_e.useCallback(B=>{let z=null,K=!1,Y=C;if(B.col===1&&B.id in r)z=Jd(r,B.id),Y=null;else if(B.col===2&&qf(r,B.id)){const J=qf(r,B.id);z=Jd(r,J),Y=null}else C==null&&(Y={col:B.col,id:B.id,value:B.value},K=!0);if(C!=null)if(C.col===B.col)C.id===B.id?Y=null:Y={col:B.col,id:B.id,value:B.value};else{const J=B.col===1?B.id:C.id,q=B.col===1?C.id:B.id;z=Qy(r,J,q),K=!0,Y=null}if(z!=null&&a(z),C!==Y&&g(Y),K){const q=(B.col===1?I:N).current?.querySelector('button:not([aria-pressed="true"])');q&&(H(),q.removeAttribute("tabindex"),q.focus({preventScroll:!l}))}},[l,C,r,a,H]),Q=_e.useCallback((B,{col:z,index:K})=>{const Y=B.currentTarget;let J=!1,q=null;switch(B.key){case"ArrowUp":J=!0,q=Y.parentElement.previousElementSibling?.firstElementChild;break;case"ArrowDown":J=!0,q=Y.parentElement.nextElementSibling?.firstElementChild;break;case"ArrowRight":J=!0,q=z===1?I.current?.children[K]?.firstElementChild:void 0;break;case"ArrowLeft":J=!0,q=z===2?N.current?.children[K]?.firstElementChild:void 0;break;case"Home":J=!0,q=Y.closest("ul").firstElementChild.firstElementChild;break;case"End":J=!0,q=Y.closest("ul").lastElementChild.firstElementChild;break}J&&(B.preventDefault(),B.stopPropagation()),q&&(H(),q.removeAttribute("tabindex"),q.focus())},[H]);_e.useEffect(()=>{r!==f&&!xq(r)&&F(r)},[F,r,f]),_e.useEffect(()=>{const B=({shouldFocus:Y})=>{const J=C.col===1?N:I;H();const q=J.current.querySelector('button[data-state="active"]');q?.removeAttribute("tabindex"),Y&&q?.focus(),g(null)},z=Y=>{k.current?.contains(Y.target)||B({shouldFocus:!1})},K=Y=>{vs(Y)&&C!=null&&B({shouldFocus:!0})};return C==null?(document.removeEventListener("mousedown",z),document.removeEventListener("keydown",K)):(document.addEventListener("mousedown",z),document.addEventListener("keydown",K)),()=>{document.removeEventListener("mousedown",z),document.removeEventListener("keydown",K)}},[C,H]);const U=_e.useCallback(()=>{const B=Array.from(k.current?.querySelectorAll("[data-matching-interaction-piece-content-inline]")??[]);if(B.length===0)return;const z=B[0].closest("button");let K=0,Y;if(z){const q=window.getComputedStyle(z),ee=parseFloat(q.paddingBlockStart)+parseFloat(q.paddingBlockEnd),se=parseFloat(q.borderTopWidth)+parseFloat(q.borderBottomWidth);K=ee+se,Y=parseFloat(q.minHeight)}const J=B.reduce((q,ee)=>Math.max(q,ee.scrollHeight+K),0);Y&&Y>=J?i(void 0):i(J)},[i]);return _e.useEffect(()=>{(!d&&s||m!==e)&&U()},[d,s,e,m,U]),_e.useEffect(()=>{const B=k.current?.closest(".quiz-card");let z;return B!=null&&(z=new ResizeObserver(()=>{U()}),z.observe(B)),()=>{B!=null&&z!=null&&z.unobserve(B)}},[U]),_e.useEffect(()=>{let B,z;return x&&(B=setTimeout(()=>{b(void 0)},1e3)),T&&(z=setTimeout(()=>{L(void 0)},1e3)),()=>{clearTimeout(B),clearTimeout(z)}},[x,T]),_e.useEffect(()=>{y&&h!==t&&(a({}),F({}),g(void 0),j(eu({answers:e,columnBehavior:t,columnBehaviorToShuffle:"freezeSecond"})),R(eu({answers:e,columnBehavior:t,columnBehaviorToShuffle:"freezeFirst"})))},[y,t,h,e,a,F]),_e.useEffect(()=>{if(P.length<=0)return;const B=P.map((z,K)=>[z,M[K]]);c(B)},[P,M,c]),_e.useEffect(()=>{S(!0)},[]),(0,n.jsxs)("div",{className:"matching-interaction","data-testid":"matching-interaction",ref:k,children:[(0,n.jsx)("ul",{"aria-label":v?.a11yMatchingColumn1,className:"matching-interaction-col matching-interaction-col-1","data-col":"1",ref:N,role:"list",children:P.map((B,z)=>{const K=bq(r,B.id);return(0,n.jsx)(Zy,{col:1,height:o,id:B.id,index:z,isActive:C?.col===1&&C?.id===B.id,isFrozen:t==="freezeFirst",isMatched:K,isMoved:x?.map(Y=>Y.id).includes(B.id)??!1,onClick:oe,onDragEnd:V,onDragStart:D,onDrop:Z,onDropZoneEnter:W,onDropZoneLeave:_,onKeyDown:Q,value:B.value,valueOtherColumnActive:C?.col===2?C?.value:void 0,valueOtherColumnMatch:K?M[z]?.value:void 0},B.id)})}),(0,n.jsx)("ul",{"aria-label":v?.a11yMatchingColumn2,className:"matching-interaction-col matching-interaction-col-2","data-col":"2",ref:I,role:"list",children:M.map((B,z)=>{const K=yq(r,B.id);return(0,n.jsx)(Zy,{col:2,height:o,id:B.id,index:z,isActive:C?.col===2&&C?.id===B.id,isFrozen:t==="freezeSecond",isMatched:K,isMoved:T?.map(Y=>Y.id).includes(B.id)??!1,onClick:oe,onDragEnd:V,onDragStart:D,onDrop:Z,onDropZoneEnter:W,onDropZoneLeave:_,onKeyDown:Q,value:B.value,valueOtherColumnActive:C?.col===1?C?.value:void 0,valueOtherColumnMatch:K?P[z]?.value:void 0},B.id)})})]})}const eu=({answers:e,columnBehavior:t,columnBehaviorToShuffle:s})=>{let o=e.map(r=>r.id);return t===s&&(o=(0,Qu.shuffle)(o)),new Map(o.map((r,a)=>[r,a]))};function Xy(e,t){const s=[];for(const[o,r]of e){const a=t.get(o);a!==r&&s.push({id:o,from:r,to:a})}return s}var tu=p(82920);function qy({columnBehavior:e="freezeSecond",matches:t={},onChange:s=()=>{},revealAnswers:o="none",...r}){const[a,i]=tu.useState([]),[c,l]=tu.useState(void 0),d=tu.useCallback(m=>{i(m)},[]),h=tu.useCallback(m=>{l(m)},[]);return r.isComplete?(0,n.jsx)(Cq,{...r,columnBehavior:e,itemHeight:c,revealAnswers:o,rows:a}):(0,n.jsx)(Eq,{...r,columnBehavior:e,itemHeight:c,matches:t,onChange:s,onChangeItemHeight:h,onChangeRows:d})}function Jy(e){return e==null||e===-1}function jq(e,t){return e===t}const wq=({allowTabNavigation:e=!1,color:t,correctId:s="",errorMessageId:o,isComplete:r,isCorrect:a=!1,isReduceMotion:i=!1,labels:c,onChange:l=()=>{},onEnterToSubmit:d=()=>{},options:h=[],questionHtmlId:m="",renderOptionText:f,isRetaking:v,revealAnswers:C=je.NONE,selectedIndex:g=-1,shouldFocusFirst:x,onFocusFirstComplete:b})=>{const T=Jy(g);return(0,n.jsx)(lc,{"aria-invalid":o?!0:void 0,"aria-labelledby":[m,o].filter(Boolean).join(" "),"aria-required":"true",role:"radiogroup",children:h.map((L,y,S)=>(0,n.jsx)(Aq,{allowTabNavigation:e,color:t,id:L.id,index:y,isComplete:r,isCorrect:a,isCorrectOption:s===L.id,isFirst:y===0,isFresh:T,isLast:y===S.length-1,isReduceMotion:i,isRetaking:v,isSelected:!v&&jq(g,y),labels:c,onChange:l,onEnterToSubmit:d,onFocusFirstComplete:b,questionHtmlId:m,renderOptionText:f,revealAnswers:C,shouldFocusFirst:x,title:L.title},L.id))})},Aq=({allowTabNavigation:e,color:t,id:s,index:o,isComplete:r,isCorrect:a,isCorrectOption:i,isFresh:c,isSelected:l,isReduceMotion:d,labels:h,onChange:m,onEnterToSubmit:f,questionHtmlId:v,renderOptionText:C,isRetaking:g,revealAnswers:x,shouldFocusFirst:b,onFocusFirstComplete:T,title:L})=>{const[y]=(0,u.useState)(()=>vr()("qmc-")),S=(0,u.useRef)(null),k=(0,Me.A)(l),N=!!r,I=e&&(l||c&&o===0)?0:-1,w=x===je.ALL,A=x==je.INCORRECT,E=w||A&&a,j=w||A&&a||A&&!a&&l,O=r&&i&&E,R=r&&!i&&j,P=(O||R)&&!g,M=P?`${y}-result`:void 0,H=X()("quiz-multiple-choice-option",{"is-complete":r,"is-correct":O,"is-incorrect":R,"is-selected":l}),F=X()("quiz-multiple-choice-option__dot",{"quiz-multiple-choice-option__dot--active":l&&!r}),D=X()("quiz-multiple-choice-option__check",{"quiz-multiple-choice-option__check--active":O}),V=X()("quiz-multiple-choice-option__x",{"quiz-multiple-choice-option__x--active":R}),W=X()("quiz-multiple-choice-option__border"),_=(0,u.useCallback)(U=>{la(U)&&f(U)},[f]),Z=(0,u.useCallback)(()=>{m({selectedIndex:o})},[o,m]),oe=(0,u.useCallback)(()=>{l&&m({selectedIndex:o})},[o,l,m]),Q=r?void 0:_;return(0,u.useEffect)(()=>{e&&S.current&&(!k&&l?S.current.focus({preventScroll:d}):b&&c&&o===0&&(S.current.focus({preventScroll:d}),T?.()))},[e,l,d,k,b,c,o,T]),(0,n.jsxs)("div",{"data-testid":"quiz-card-option",children:[(0,n.jsxs)("label",{"aria-describedby":M,className:H,ref:S,children:[(0,n.jsx)("input",{checked:l,className:"quiz-multiple-choice-option__input",disabled:N,name:v,onChange:Z,onClick:r?void 0:oe,onKeyDown:Q,tabIndex:I,type:"radio"}),(0,n.jsxs)("div",{className:"quiz-multiple-choice-option__indicator",style:{color:t},children:[(0,n.jsx)(DB,{className:F,dataTestId:l&&!r?"selected-dot-active":"selected-dot"}),(0,n.jsx)(_2,{className:D,"data-testid":O?"correct-check-active":"correct-check"}),(0,n.jsx)(Y2,{"aria-hidden":"true",className:V,dataTestId:R?"incorrect-x-active":"incorrect-x",overrideStyle:!0})]}),(0,n.jsx)("div",{className:W}),(0,n.jsx)("div",{className:"quiz-multiple-choice-option__text","data-testid":"quiz-mc-option-text",children:C({optionId:s,title:L})})]}),P&&(0,n.jsxs)("div",{className:"visually-hidden-always",id:M,children:[l&&i&&h?.a11yQuizReviewCorrectlySelected,l&&!i&&h?.a11yQuizReviewIncorrectlySelected,!l&&i&&h?.a11yQuizReviewIncorrectlyUnselected,!l&&!i&&h?.a11yQuizReviewCorrectlyUnselected]})]})},e6=wq;function Rq(e){return e.length===0}function Pq(e,t){return e.includes(t)}function Mq(e,t){return e.includes(t)?e.filter(s=>s!==t):[...e,t]}const Oq=({allowTabNavigation:e=!1,correctIds:t=[],errorMessageId:s,isComplete:o,isCorrect:r=!1,labels:a,onChange:i=()=>{},onEnterToSubmit:c=()=>{},options:l=[],questionHtmlId:d="",renderOptionText:h,isRetaking:m,revealAnswers:f=je.NONE,selectedIndices:v=[]})=>(0,n.jsx)("div",{"aria-labelledby":[d,s].filter(Boolean).join(" "),role:"group",children:(0,n.jsx)("ul",{children:l.map((C,g)=>(0,n.jsx)(Bq,{allowTabNavigation:e,errorMessageId:s,id:C.id,index:g,isComplete:o,isCorrect:r,isCorrectOption:t.includes(C.id),isRetaking:m,isSelected:!m&&Pq(v,g),labels:a,onChange:i,onEnterToSubmit:c,renderOptionText:h,revealAnswers:f,title:C.title},C.id))})}),Bq=({allowTabNavigation:e,errorMessageId:t,id:s,index:o,isComplete:r,isCorrect:a,isCorrectOption:i,isSelected:c,labels:l,onChange:d,onEnterToSubmit:h,renderOptionText:m,isRetaking:f,revealAnswers:v,title:C})=>{const[g]=(0,u.useState)(()=>vr()("qmr-")),x=r&&v===je.ALL&&!f,b=x?`${g}-result`:void 0,T=!!r,L=e?0:-1,y=v===je.ALL,S=v==je.INCORRECT,k=y||S&&a||S&&!a&&c,N=X()("quiz-multiple-response-option",{"quiz-multiple-response-option--complete":r,"quiz-multiple-response-option--selected":c,"quiz-multiple-response-option--correct":r&&i&&k,"quiz-multiple-response-option--incorrect":r&&!i&&k}),I=X()("quiz-multiple-response-option__border"),w=(0,u.useCallback)(j=>{la(j)&&h(j)},[h]),A=(0,u.useCallback)(()=>{d({optionIndex:o})},[o,d]),E=r?void 0:w;return(0,n.jsxs)("li",{children:[(0,n.jsxs)("label",{"aria-describedby":b,className:N,children:[(0,n.jsx)("input",{"aria-describedby":t||void 0,"aria-invalid":t?!0:void 0,checked:c,className:"quiz-multiple-response-option__input",disabled:T,onChange:r?void 0:A,onKeyDown:E,tabIndex:L,type:"checkbox"}),(0,n.jsxs)("div",{className:"quiz-multiple-response-option__indicator",children:[(0,n.jsx)(_2,{className:"quiz-multiple-response-option__check"}),(0,n.jsx)(Y2,{"aria-hidden":"true",className:"quiz-multiple-response-option__x",height:"8",overrideStyle:!0,width:"8"})]}),(0,n.jsx)("div",{className:I}),(0,n.jsx)("div",{className:"quiz-multiple-response-option__text",children:m({optionId:s,title:C})})]}),x&&(0,n.jsxs)("div",{className:"visually-hidden-always",id:b,children:[c&&i&&l?.a11yQuizReviewCorrectlyChecked,c&&!i&&l?.a11yQuizReviewIncorrectlyChecked,!c&&i&&l?.a11yQuizReviewIncorrectlyUnchecked,!c&&!i&&l?.a11yQuizReviewCorrectlyUnchecked]})]})},t6=Oq;var Spe,Dq,Fq,kpe,Npe,Ipe,Epe;const Hq=Fn()(Xe()("correct",!0)),jpe=e=>Dq(Fq(e),ep),$q=e=>({MATCHING:Ne(),FILL_IN_THE_BLANK:tp,MULTIPLE_CHOICE:Ne(),MULTIPLE_RESPONSE:Ne()})[e],ep=Pe()(Hu()("id"),Hq),Vq=Pe()(So(),ep),tp=Fn()(Xe()("correct",!0)),zq=Pe()(Ye()("id"),So()),wpe=null,{FILL_IN_THE_BLANK:Uq,MATCHING:s6,MULTIPLE_CHOICE:_q,MULTIPLE_RESPONSE:Gq}=ns;function n6({type:e,text:t="",matches:s={},answersLength:o=0,selectedIndices:r=[],selectedIndex:a}){switch(e){case Uq:return!L1(t);case s6:return Sq(s)===o;case Gq:return!Rq(r);case _q:default:return!Jy(a)}}function Wq({answered:e=!1,...t}){return e&&t.type!==s6?!1:n6(t)}function o6(e,t){const s=e.trim();return t?s:s.toLowerCase()}function r6({answers:e,text:t,caseSensitive:s=!1,getL10nValue:o}){if(!t)return!1;const r=o6(t,s);return e.some(a=>{const i=o(a.title);return typeof i!="string"?!1:o6(i,s)===r})}function a6(e){return Object.entries(e).every(([t,s])=>t===String(s))}function Kq(e){const t=e.answers??[],s=e.correct;if(s!=null)return t.findIndex(r=>r.id===s);const o=t.findIndex(r=>r.correct===!0);return o===-1?0:o}function i6({isCorrectAnswerUnshuffled:e=!1,isShuffled:t=!1,item:s,selectedIndex:o,shuffledAnswerIndices:r}){if(o==null||t&&!Array.isArray(r))return!1;const a=t&&!e?r.indexOf(o):o,i=Kq(s);return a===i}function Qq(e,t){return t.map(s=>e.indexOf(s))}function Yq(e){return typeof e=="object"&&e!==null&&"id"in e?e.id:e}function Zq(e){const t=e.answers??[],s=e.corrects??[];return s.length>0?s.map(a=>{const i=Yq(a);return t.findIndex(c=>c.id===i)}).filter(a=>a>=0).sort((a,i)=>a-i):t.map((r,a)=>r.correct===!0?a:-1).filter(r=>r>=0).sort((r,a)=>r-a)}function c6(e){return[...e].sort((t,s)=>t-s)}function l6({isShuffled:e=!1,item:t,selectedIndices:s,shuffledAnswerIndices:o}){if(!Array.isArray(s)||e&&!Array.isArray(o))return!1;const r=e?Qq(o,s):s,a=Zq(t),i=c6(r),c=c6(a);return i.length!==c.length?!1:i.every((l,d)=>l===c[d])}function d6({answers:e,feedback:t,feedbackCorrect:s,feedbackIncorrect:o,feedbackType:r,isCorrect:a,isShuffled:i=!1,selectedIndex:c,shuffledAnswerIndices:l}){switch(r){case"CHOICE":{if(c==null||!e)return;const d=i&&Array.isArray(l)?l.indexOf(c):c;return e[d]?.feedback}case"CORRECT_INCORRECT":return a?s:o;default:return t}}var Xq=p(19199),qq=p.n(Xq),Ape=p(75318),Jq,u6,eJ,tJ,sJ;const h6="owner",nJ="manager",oJ="editor",Rpe="viewer",m6=null,sp=({effectiveRole:e,requiredRole:t})=>{const s=u6(e,m6),o=u6(t,m6);return s>=o},rJ=e=>({editor:sp({effectiveRole:e,requiredRole:oJ}),manager:sp({effectiveRole:e,requiredRole:nJ}),owner:sp({effectiveRole:e,requiredRole:h6})}),Ppe=(e,t,s)=>{const{authorId:o}=e,r=o===s,a=c=>r||c,i=aJ(t);return tJ(eJ(["canChangePermissions","canMoveTo"]),Jq({canDelete:a,canEdit:a,canMove:a,canRename:a,canUnshare:a}))(i)},aJ=e=>{const{effectiveRole:t,type:s}=e||[],o=s!==sJ?h6:t,{editor:r,manager:a,owner:i}=rJ(o);return{canChangePermissions:a,canCreate:r,canDelete:i,canEdit:r,canMove:a,canMoveTo:r,canRename:r,canUnshare:i}};var iJ,cJ,gc,lJ,dJ,uJ,hJ,f6,za,mJ,p6,g6,fJ,pJ,vc,gJ,vJ,v6,CJ,su,xJ,bJ,C6,yJ,x6,TJ,LJ,Ua;const SJ={[ns.FILL_IN_THE_BLANK]:"fillin",[ns.MATCHING]:"matching",[ns.MULTIPLE_CHOICE]:"multiple choice",[ns.MULTIPLE_RESPONSE]:"multiple response"},nu="personal",b6="team",Mpe=500,Ope=null,Bpe=null,y6=({questions:e=[],drawnQuestionIds:t=[]})=>{const s=a=>!t.some(i=>i.includes(a.id)),o=e.filter(s),r=Math.floor(Math.random()*o.length);return o[r]??null},kJ=e=>t=>t.type===nu||x6({effectiveRole:t.effectiveRole,requiredRole:e}),NJ=({folders:e,requiredRole:t,teamAccount:s})=>Ua(e,C6,p6,za(o=>kJ(t)&&(s||o.type===nu))),Dpe=({questionBanks:{folders:e,questionBanks:t},requiredRole:s=TJ,teamAccount:o,term:r})=>{if(r&&pJ(bJ(r)))return{folders:[],questionBanks:[]};const a=new RegExp("("+yJ(r)+")","i"),i=NJ({folders:e,requiredRole:s,teamAccount:o}),c=v6("id",i),l=za(h=>h.title.match(a)&&!h.deleted,i),d=za(h=>(vc(h.folderId)||f6(h.folderId,c))&&h.title.match(a)&&!h.deleted,t);return{folders:l,questionBanks:d}},T6=(e,t,s=!1)=>Ua(t,fJ(gc(!vc(e)),CJ(e),vJ(C6,p6)),xJ(su("deleted",!s))),IJ=(e,t,s,o=!1)=>{const r=e===b6,a=e===nu,i=Ua(T6(b6,s),v6("id")),c=l=>!vc(l.folderId)&&f6(l.folderId,i);return Ua(t,za(hJ([[gc(o),l=>l.deleted],[gc(r),l=>!l.deleted&&c(l)],[gc(a),l=>!l.deleted&&!c(l)],[gc(vc(e)),l=>!l.deleted],[iJ,g6]])))},EJ=({type:e})=>e===nu,L6=({effectiveRole:e})=>x6({effectiveRole:e,requiredRole:LJ}),jJ=(e,t)=>({id:s})=>s?uJ(lJ(g6),gJ(cJ([su("folderId",s),su("authorId",e)])))(t):!1,wJ=(e,t,s,o)=>Ua(T6(t,e),za(dJ([EJ,L6,jJ(o,s)]))),AJ=(e,t)=>s=>{if(vc(s.folderId))return!0;const o=mJ(su("id",s.folderId),e);if(!o)return!1;const r=L6(o),a=s.authorId===t;return r||a},RJ=(e,t,s,o,r)=>Ua(IJ(e,t,s),za(AJ(o,r))),Fpe=(e,t,s,o)=>{const r=wJ(e,s,t,o),a=RJ(s,t,e,r,o);return{folders:r,questionBanks:a}},PJ=(e,t,s=[])=>{const o=t[e],{parentId:r}=o||{},{type:a}=t?.[r]||{},i=o?[o,...s]:s;return!r||o.type!==a?i:PJ(r,t,i)},{FILL_IN_THE_BLANK:_a,MATCHING:ou,MULTIPLE_CHOICE:ru,MULTIPLE_RESPONSE:au}=ns,MJ={FILL_IN_THE_BLANK:"a11yBlockKnowledgeCheckFIB",MATCHING:"a11yBlockKnowledgeCheckM",MULTIPLE_CHOICE:"a11yBlockKnowledgeCheckMC",MULTIPLE_RESPONSE:"a11yBlockKnowledgeCheckMR"},OJ=yt()(null,[0,"type"]),np=ws();class S6 extends u.Component{static get defaultProps(){return{items:[],lessonId:"",blockId:"",onStep:Function.prototype}}retakeAnimationStageOne;retakeAnimationStageTwo;feedbackRef;takeAgainRef;block;wrapper;id;constructor(t){super(t),this.state={errorIncomplete:!1,selectedAnswer:null,selectedIndices:[],chosen:!1,answered:!1,fillInText:"",matches:{},questionHtmlId:`q-${$d()()}`},this.retakeAnimationStageOne=null,this.retakeAnimationStageTwo=null,this.feedbackRef=(0,u.createRef)(),this.takeAgainRef=(0,u.createRef)(),this.getSelection=this.getSelection.bind(this),this.handleFillIn=this.handleFillIn.bind(this),this.handleChoiceSelect=this.handleChoiceSelect.bind(this),this.handleMultipleResponseChange=this.handleMultipleResponseChange.bind(this),this.handleRetake=this.handleRetake.bind(this),this.renderQuestionTitle=this.renderQuestionTitle.bind(this),this.renderMultipleResponseOptionText=this.renderMultipleResponseOptionText.bind(this),this.renderMultipleChoiceOptionText=this.renderMultipleChoiceOptionText.bind(this),this.previewOnly__forceShowFeedback=this.previewOnly__forceShowFeedback.bind(this),this.previewOnly__clearOverrides=this.previewOnly__clearOverrides.bind(this),window.addEventListener(Ge,this.previewOnly__forceShowFeedback),window.addEventListener(ym,this.previewOnly__clearOverrides),this.id=vr()("kc-")}componentDidUpdate(t,s){s.answered&&!this.state.answered?this.getType()!==_a&&_m(this.wrapper):!s.answered&&this.state.answered&&setTimeout(()=>{this.takeAgainRef.current?this.takeAgainRef.current.focus():this.feedbackRef.current?.focus()},0)}componentWillUnmount(){this.retakeAnimationStageOne&&(clearTimeout(this.retakeAnimationStageOne),this.retakeAnimationStageOne=null),this.retakeAnimationStageTwo&&(clearTimeout(this.retakeAnimationStageTwo),this.retakeAnimationStageTwo=null),window.removeEventListener(Ge,this.previewOnly__forceShowFeedback),window.removeEventListener(ym,this.previewOnly__clearOverrides)}previewOnly__forceShowFeedback(t){const{itemId:s,path:o}=t.detail,{getL10nValue:r}=this.props;if(s!==this.props.blockId)return;const a=o.at(-1);if(typeof a=="string"&&a.startsWith?.("feedback")){const i=a==="feedbackCorrect",c=o.indexOf("answers"),l=o[c+1],d=c>-1&&typeof l!="string"?l.id:null,h={forceShowFeedback:!0,forceShowFeedbackCorrect:i,forceShowFeedbackMessage:""};if(d&&"answers"in this.props.items[0]){const m=this.props.items[0].answers.find(({id:v})=>v===d),f=m&&"feedback"in m?m?.feedback:void 0;h.forceShowFeedbackCorrect=m?.correct??!1,h.forceShowFeedbackMessage=r(f)}this.setState(h)}}previewOnly__clearOverrides(){this.setState({forceShowFeedback:!1,forceShowFeedbackCorrect:!1})}getSelection({item:t}){switch(t.type){case _a:return this.state.fillInText;case ou:return this.state.matches;case au:return this.state.selectedIndices;case ru:default:return this.state.selectedAnswer}}handleMatchesChange=t=>{this.setState({errorIncomplete:!1,matches:t})};handleMultipleResponseChange({optionIndex:t}){const{selectedIndices:s}=this.state;this.setState({errorIncomplete:!1,selectedIndices:Mq(s,t)})}handleChoiceSelect({selectedIndex:t}){const{answered:s}=this.state;s||this.setState({errorIncomplete:!1,selectedAnswer:t,chosen:!0})}onSubmit(t,s,o,r,a){if(!s){switch(this.setState({errorIncomplete:!0}),r.type){case _a:this.wrapper?.querySelector("input")?.focus();break;case au:case ru:this.wrapper?.querySelector("input")?.focus();break;case ou:default:break}return}a?.preventDefault(),this.setState({answered:!0,isRetaking:!1}),o&&this.props.onStep({id:t})}handleFillIn(t){this.setState({errorIncomplete:!1,fillInText:t})}handleRetake(t){const{blockId:s,lessonId:o,settings:r}=this.props,{id:a}=t;this.setState({isRetaking:!0}),this.retakeAnimationStageOne=setTimeout(()=>{this.setState({answered:!1,chosen:!1,matches:{}},()=>{this.retakeAnimationStageOne=null})},400),this.retakeAnimationStageTwo=setTimeout(()=>{this.setState({fillInText:"",selectedAnswer:null,selectedIndices:[],isRetaking:!1,shouldFocusFirst:!0},()=>{!np&&this.getType()===_a&&_m(this.wrapper),this.retakeAnimationStageTwo=null}),r?.retryCount!=null&&this.props.onRetryAttempt?.({blockId:s,itemId:a,lessonId:o})},950)}resetErrorIncomplete(){this.state.errorIncomplete&&this.setState({errorIncomplete:!1})}resetShouldFocusFirst=()=>{this.state.shouldFocusFirst&&this.setState({shouldFocusFirst:!1})};renderQuestionTitle({title:t}){return(0,n.jsx)(We,{className:"quiz-card__title",id:this.state.questionHtmlId,value:t})}renderQuestion(t){const{answered:s,errorIncomplete:o,isRetaking:r,selectedAnswer:a}=this.state,{blockId:i,enableVideoPlaybackSpeed:c,getL10nValue:l,labels:d,progress:h,renderQuestionTitle:m=this.renderQuestionTitle,settings:f}=this.props,{quizCorrect:v,quizIncorrect:C,quizRequireAnswer:g,quizSubmit:x,quizTakeAgain:b}=d,{id:T,type:L}=t,y=t.type!=="DRAW_FROM_QUESTION_BANK"?t.settings:{},S=l("media"in t?t.media:{}),k=this.state.forceShowFeedbackCorrect||this.getIsCorrect({item:t}),N=this.getCanSubmit({item:t}),I=f?.requireCorrectAnswer?k:!0,w=this.onSubmit.bind(this,T,N,I,t),A=this.getFeedback({item:t,isCorrect:k,selectedAnswer:a}),E=this.getSelection({item:t}),{columnBehavior:j,correctAnswerColor:O,correctAnswerColorContrast:R,incorrectAnswerColor:P,incorrectAnswerColorContrast:M}=f,H=k?O:P,F=d.knowledgeCheckCorrectAnswerRequiredBlock,D=d.knowledgeCheckRetriesAttemptsRemaining,V=d.knowledgeCheckMaxRetriesReached,W=h?.items?.[i]?.items?.[T]?.retryAttemptCount??0,_=f?.retryCount!==0&&(f?.retryCount==null||f?.retryCount===-1||W<f?.retryCount),Z=f?.retryCount!=null||f?.retryCount===-1?f?.retryCount-W:-1,oe=!k,Q={"--color-feedback-icon":H,"--color-matching-feedback-bubble-bg":P,"--color-multiple-choice-complete-border":P,"--color-multiple-choice-correct-border":O,"--color-multiple-response-correct-border":O,"--color-multiple-response-incorrect-border":P,"--color-multiple-response-option-check":s?O:void 0,"--color-quiz-option-check":O,"--color-x-fill":P},B=f?.revealCorrectAnswers!==!1&&(f.retryCount==null||f.retryCount===-1||!_)?je.ALL:je.INCORRECT,z=X()("block-knowledge__retake-container",{"block-knowledge__retake-container--active":s,"block-knowledge__retake-container--active-attempts-left":s&&!r&&Z>0}),K=X()("block-knowledge__retake",{"block-knowledge__retake--active":s&&!r&&_}),Y=X()("block-knowledge__retake","block-knowledge__attempts-left",{"block-knowledge__retake--active":s&&!r&&_&&Z>0}),J=X()("block-knowledge__retake","block-knowledge__no-more-attempts",{"block-knowledge__retake--active":s&&!r&&!_}),q=!!S?.image,ee=!!S?.audio,se=!!S?.video,te=!!S?.embed;let ye=null;ee&&q?ye=(0,n.jsx)(Fo,{blockId:i,enableVideoPlaybackSpeed:c,index:`${i}-${T}-audio`,isOverlayAudio:!0,item:t,labels:d,media:S,settings:y}):ee&&(se||te)?ye=(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(Fo,{blockId:i,enableVideoPlaybackSpeed:c,index:`${i}-${T}-audio`,item:t,labels:d,media:{audio:S.audio},settings:y}),(0,n.jsx)(Fo,{blockId:i,enableVideoPlaybackSpeed:c,index:`${i}-${T}-video`,item:t,labels:d,media:se?{video:S.video}:{embed:S.embed},settings:y})]}):ye=(0,n.jsx)(Fo,{blockId:i,enableVideoPlaybackSpeed:c,index:`${i}-${T}-audio`,item:t,labels:d,media:S,settings:y});const G=X()("block-knowledge__media",{"block-knowledge__image-with-audio":ee&&q});return(0,n.jsxs)($y,{isActive:!0,style:Q,children:[f?.requireCorrectAnswer&&(s&&!k||!s)&&(0,n.jsxs)("div",{className:"quiz-card__require-correct-answer-disclaimer",children:[(0,n.jsx)(ie,{className:"quiz-card__require-correct-answer-disclaimer-icon",name:"info-circle"}),F]}),m(t),(0,n.jsx)("div",{className:G,children:ye}),(0,n.jsx)(_y,{type:L,children:this.renderType({columnBehavior:j,correctAnswerColor:O,correctAnswerColorContrast:R,incorrectAnswerColor:P,incorrectAnswerColorContrast:M,isCorrect:k,item:t,onSubmit:w})}),(0,n.jsx)("div",{"aria-live":"assertive",children:o&&(0,n.jsxs)("div",{className:"quiz-card__validations","data-testid":"quiz-validation-error",children:[(0,n.jsx)("span",{"data-testid":"quiz-validation-icon",children:(0,n.jsx)(ie,{className:"quiz-card__validation-icon",name:"alert-circle"})}),(0,n.jsx)("span",{id:`${this.id}-error-incomplete-message`,children:g})]})}),(0,n.jsx)(Hy,{canProceed:s,canSubmit:N,isReduceMotion:np,onSubmit:w,quizSubmit:x}),(0,n.jsx)(Uy,{canProceed:this.state.forceShowFeedback||s,feedbackRef:this.feedbackRef,feedbackValue:A,isActive:s,isComplete:s,isCorrect:k,item:t,labels:d,quizCorrect:v,quizIncorrect:C,revealAnswers:B,selection:E}),(0,n.jsxs)("div",{"aria-hidden":!s,className:z,children:[oe&&(0,n.jsxs)(n.Fragment,{children:[_?(0,n.jsxs)(Fy,{allowTabNavigation:s,className:K,onClick:this.handleRetake.bind(this,t),ref:this.takeAgainRef,size:"md",variant:"outlined",children:[(0,n.jsx)(ie,{"aria-hidden":"true",name:"arrow-rotate-left"}),b]}):null,Z>0&&(0,n.jsxs)("div",{className:Y,children:[D," ",Z]})]}),!_&&!k&&(0,n.jsx)("div",{className:J,children:V})]})]},T)}getIsCorrect({item:t}){const{fillInText:s,matches:o,selectedAnswer:r,selectedIndices:a}=this.state,{type:i}=t,c="answers"in t?t.answers:void 0,l="isCaseSensitive"in t?t.isCaseSensitive:!1;switch(i){case _a:return r6({answers:tp(c),text:s,caseSensitive:l,getL10nValue:this.props.getL10nValue});case ou:return a6(o);case au:return l6({item:{answers:c},selectedIndices:a});case ru:default:return i6({item:{answers:c},selectedIndex:r})}}getType(){const{items:t}=this.props;return OJ(t)}getCanSubmit({item:t}){const s="answers"in t?t.answers:void 0,{answered:o,fillInText:r,matches:a,selectedAnswer:i,selectedIndices:c}=this.state;return Wq({type:t.type,text:r,matches:a,answersLength:s?.length??0,selectedIndices:c,selectedIndex:i,answered:o})}getFeedback({item:t,isCorrect:s,selectedAnswer:o}){if(this.state.forceShowFeedbackMessage)return this.state.forceShowFeedbackMessage;const r="feedback"in t?t.feedback:void 0,a="feedbackCorrect"in t?t.feedbackCorrect:void 0,i="feedbackIncorrect"in t?t.feedbackIncorrect:void 0,c="feedbackType"in t?t.feedbackType:void 0,l="answers"in t?t.answers:void 0,d=this.state.forceShowFeedbackCorrect??s;return d6({answers:l,feedback:r,feedbackCorrect:a,feedbackIncorrect:i,feedbackType:c,isCorrect:d,selectedIndex:typeof o=="number"?o:null})}getTypeLabel(){const{labels:t}=this.props,s=this.getType(),o=MJ[s];return o?t?.[o]:t?.a11yBlockKnowledgeCheck}renderMultipleResponseOptionText(t,{title:s}){return(0,n.jsx)(We,{className:"cursorAuto",value:s})}renderMultipleChoiceOptionText(t,{title:s}){return(0,n.jsx)(We,{className:"quiz-multiple-choice-option__label cursorAuto",value:s})}renderType({columnBehavior:t,correctAnswerColor:s,correctAnswerColorContrast:o,incorrectAnswerColor:r,incorrectAnswerColorContrast:a,isCorrect:i,item:c,onSubmit:l}){const{isHidden:d,labels:h,prefersKeyboardNavigation:m,renderMultipleResponseOptionText:f=this.renderMultipleResponseOptionText,renderMultipleChoiceOptionText:v=this.renderMultipleChoiceOptionText,settings:C,progress:g,blockId:x}=this.props,{answered:b,fillInText:T,isRetaking:L,matches:y,selectedAnswer:S,selectedIndices:k,shouldFocusFirst:N,questionHtmlId:I}=this.state,{id:w,type:A}=c,E="answers"in c?c.answers:[],{quizAcceptableResponses:j,quizAnswerPlaceholder:O}=h,R=g?.items?.[x]?.items?.[w]?.retryAttemptCount??0,P=C?.retryCount!==0&&(C?.retryCount==null||C?.retryCount===-1||R<C?.retryCount),H=C?.revealCorrectAnswers!==!1&&(C.retryCount==null||C.retryCount===-1||!P)?je.ALL:je.INCORRECT,F=this.state.errorIncomplete?`${this.id}-error-incomplete-message`:void 0;switch(A){case _a:return(0,n.jsx)(Ky,{allowTabNavigation:!0,correctAnswerColor:s,correctAnswerColorContrast:o,errorMessageId:F,incorrectAnswerColor:r,incorrectAnswerColorContrast:a,isComplete:b,isCorrect:i,labels:h,onChange:this.handleFillIn,onEnterToSubmit:l,options:tp(E),questionHtmlId:I,quizAcceptableResponses:j,quizAnswerPlaceholder:O,revealAnswers:H,value:T});case ou:return(0,n.jsx)(qy,{answers:$q(A)(E),columnBehavior:t,correctAnswerColor:s,correctAnswerColorContrast:o,incorrectAnswerColor:r,incorrectAnswerColorContrast:a,isActive:!d,isComplete:b,matches:y,onChange:this.handleMatchesChange,prefersKeyboardNavigation:m,revealAnswers:H});case au:return(0,n.jsx)(t6,{allowTabNavigation:!0,correctIds:ep(E),errorMessageId:F,isComplete:b,isCorrect:i,isRetaking:L,labels:h,onChange:this.handleMultipleResponseChange,onEnterToSubmit:l,options:E,questionHtmlId:I,renderOptionText:f.bind(this,c),revealAnswers:H,selectedIndices:k});case ru:default:return(0,n.jsx)(e6,{allowTabNavigation:!0,correctId:Vq(E)||zq(E),errorMessageId:F,isComplete:b,isCorrect:i,isReduceMotion:np,isRetaking:L,labels:h,onChange:this.handleChoiceSelect,onEnterToSubmit:l,onFocusFirstComplete:this.resetShouldFocusFirst,options:E,questionHtmlId:I,renderOptionText:v.bind(this,c),revealAnswers:H,selectedIndex:S,shouldFocusFirst:N})}}render(){const{animateBlockEntrance:t,initiallyVisible:s,isLearner:o,items:r,settings:a,variant:i}=this.props,{answered:c,isRetaking:l}=this.state,{entranceAnimation:d,knowledgeCheckWidth:h=76}=a,m=Nd(h),f=X()("block-knowledge",{"block-knowledge--answered":c,"block-knowledge--no-animation":!d,"block-knowledge--retake":l}),v=X()("block-knowledge__wrapper",`block-knowledge__wrapper--${i}`,{[`block-knowledge__container--custom-width-${m}`]:!0}),C=Array.isArray(r)&&r.length>0?r.slice(0,1):[];return(0,n.jsx)(Ee,{className:f,"data-testid":"block-kc-card",ref:g=>{this.block=g},style:this.getStyle(),children:(0,n.jsx)(Be,{animateBlockEntrance:t,initiallyVisible:s,isLearner:o,children:(0,n.jsx)("div",{className:"block-knowledge__container",children:(0,n.jsx)("div",{className:"block-knowledge__row",children:(0,n.jsx)("div",{className:`block-knowledge__col--custom-width-${m}`,children:(0,n.jsx)(Gt,{"aria-label":this.getTypeLabel(),className:v,"data-testid":"block-knowledge-wrapper",ref:g=>{this.wrapper=g},children:C.map(g=>this.renderQuestion(g))})})})})})})}getStyle(){const{backgroundColor:t,settings:s}=this.props;if(s?.cardMode===$s.TRANSPARENT)switch(s?.backgroundType){case ne.ACCENT:case ne.COLOR:case ne.TINT:if(t)switch(ia(t)){case ut.LIGHT:return{"--color-background-choice-hover":en(.5,t),"--color-background-feedback-frame":en(.5,t)};case ut.MED:return{"--color-background-choice-hover":yn(.3,t),"--color-background-feedback-frame":yn(.3,t)};case ut.DARK:return{"--color-background-choice-hover":yn(.6,t),"--color-background-feedback-frame":yn(.6,t)};case ut.NEAR_BLACK:return{"--color-background-choice-hover":en(.15,t),"--color-background-feedback-frame":en(.15,t)}}}}}const BJ=e=>{const{blockId:t,items:[s]}=e,{questions:o}=s,[r,a]=(0,u.useState)(()=>y6({questions:o}));(0,u.useEffect)(()=>{if(!o)return;const c=l=>{const{path:d}=l.detail;if(d[d.indexOf("items")+1]?.id!==t)return;const m=d[d.lastIndexOf("questions")+1]?.id;if(m===r?.id)return;const f=o.find(({id:v})=>v===m);f&&a(f)};return window.addEventListener(Ge,c),()=>window.removeEventListener(Ge,c)},[t,r,o]);const i=(0,u.useMemo)(()=>r?{variant:SJ[r.type],items:[r]}:{},[r]);return r?(0,n.jsx)(S6,{...e,...i}):(0,n.jsx)("div",{})},DJ=e=>e.variant==="draw from question bank",Ga=e=>{const t=js()??"",s=rs(),o=Ot(),r={...e,backgroundColor:t,getL10nValue:o,blockSettings:s};return DJ(r)?(0,n.jsx)(BJ,{...r}):(0,n.jsx)(S6,{...r})};var FJ=p(49976),HJ=p.n(FJ);class $J extends u.Component{refWrap;refBubbleTitle;portal;contentRef;scrollRef;videoContainer;constructor(t){super(t),this.state={hasOverflow:!1},this.refWrap=(0,u.createRef)(),this.refBubbleTitle=(0,u.createRef)(),this.renderOverflowMask=this.renderOverflowMask.bind(this),this.handleScroll=this.handleScroll.bind(this),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleNextClick=this.handleNextClick.bind(this),this.handlePreviousClick=this.handlePreviousClick.bind(this),this.portal=wo()}static defaultProps={allowNav:!0,onClose:()=>{},onNextClick:()=>{},onPreviousClick:()=>{}};componentWillUnmount(){document.removeEventListener("click",this.handleDocumentClick),document.removeEventListener("keydown",this.handleDocumentKeyDown),this.contentRef.removeEventListener("scroll",this.scrollRef)}UNSAFE_componentWillReceiveProps(t){t.isActive&&setTimeout(this.renderOverflowMask,100)}componentDidUpdate(t){if(!t.isActive&&this.props.isActive){setTimeout(()=>{document.addEventListener("click",this.handleDocumentClick),document.addEventListener("keydown",this.handleDocumentKeyDown)},0),this.contentRef.scrollTop=0,this.refBubbleTitle.current?.focus?.();const s=this.props.media;this.props.onTranscriptUpdate?.({audioPlayerId:fn({refs:`items:${this.props.blockId}/items:${this.props.item?.id}`}),transcriptMedia:s})}else t.isActive&&!this.props.isActive&&(document.removeEventListener("click",this.handleDocumentClick),document.removeEventListener("keydown",this.handleDocumentKeyDown),this.state.hasOverflow&&this.contentRef.removeEventListener("scroll",this.scrollRef))}render(){const{accentColor:t,allowNav:s,description:o,headingLevel:r,htmlId:a,isActive:i,media:c,title:l,x:d,y:h}=this.props,m=r?`h${r}`:"h2",f=X()("bubble",{"bubble--active":i}),v=zJ({x:d,y:h}),C=UJ({hasOverflow:this.state.hasOverflow,x:d,y:h}),g={borderBottomColor:t},x=`${a}-title`,b=()=>{if(!c)return(0,n.jsx)(ke,{allowTabNavigation:i,className:"bubble__description",value:o});const L=this.props.getL10nValue(c)??{},y=pn(L,this.props.audioPosition,!0,"labeled-graphic"),S={blockId:this.props.blockId,hasPadding:!1,imageMaxHeight:1e3,item:this.props.item,labels:this.props.labels,lessonId:this.props.lessonId,enableVideoPlaybackSpeed:this.props.enableVideoPlaybackSpeed,opts:this.props.mediaOpts,refs:`items:${this.props.blockId}/items:${this.props.item?.id}`,shouldPause:!i},k={audio:{media:y.audioOnlyMedia||L,isOverlayAudio:!1,index:`${this.props.blockId}-${this.props.item.id}-${this.props.index}-audio`},image:{media:y.imageOnlyMedia||L,isOverlayAudio:!1,index:`${this.props.blockId}-${this.props.item.id}-${this.props.index}-image`},video:{media:y.videoOnlyMedia||L,isOverlayAudio:!1,index:`${this.props.blockId}-${this.props.item.id}-${this.props.index}-video`},embed:{media:y.embedOnlyMedia||L,isOverlayAudio:!1,index:`${this.props.blockId}-${this.props.item.id}-${this.props.index}-embed`},overlay:{media:L,isOverlayAudio:!0,index:`${this.props.blockId}-${this.props.item.id}-${this.props.index}-overlay`}};return(0,n.jsx)(n.Fragment,{children:y.renderOrder.map((N,I)=>{if(N==="text")return(0,n.jsx)(ke,{allowTabNavigation:i,className:"bubble__description",value:o},`text-${I}`);const w=k[N];return!w||N==="embed"&&!i?null:(0,n.jsx)("div",{className:"bubble__media",children:(0,n.jsx)("div",{className:"bubble__figure",children:(0,n.jsx)("div",{className:X()({"labeled-graphic-bubble-media-container--audio-bottom":N==="audio"&&this.props.audioPosition==="bottom"}),children:(0,n.jsx)(Xt,{...S,...w})})})},`${N}-${I}`)})})},T=(0,n.jsx)("div",{className:f,ref:this.refWrap,style:v,children:(0,n.jsxs)("dialog",{"aria-hidden":!i,"aria-labelledby":x,"aria-modal":"false",className:C,id:a,onKeyDown:this.handleKeyDown,style:g,children:[(0,n.jsx)(m,{className:"bubble__title",id:x,ref:this.refBubbleTitle,tabIndex:-1,children:(0,n.jsx)(gs,{value:l})}),(0,n.jsx)("button",{"aria-label":"Close modal",className:"bubble__close",onClick:this.handleCloseClick,type:"button",children:(0,n.jsx)(FB,{className:"bubble__close-icon"})}),(0,n.jsx)("div",{className:"bubble__content",ref:L=>{this.contentRef=L},children:b()}),s&&this.renderControls()]})});return window.matchMedia("(max-width: 767px)").matches?(0,In.createPortal)((0,n.jsx)(h3,{children:T}),this.portal):T}renderControls(){const{accentColor:t,labels:s}=this.props,o={"--color-lg-accent":t};return(0,n.jsxs)("div",{className:"bubble__controls",style:o,children:[(0,n.jsx)("button",{"aria-label":s?.a11yCarouselPrevious,className:"bubble__prev",onClick:this.handlePreviousClick,type:"button",children:(0,n.jsx)("i",{className:"icon icon-chevron-left"})}),(0,n.jsx)("button",{"aria-label":s?.a11yCarouselNext,className:"bubble__next",onClick:this.handleNextClick,type:"button",children:(0,n.jsx)("i",{className:"icon icon-chevron-right"})})]})}renderOverflowMask(){if(!this.contentRef)return;const t=this.contentRef,s=t.offsetHeight;t.scrollHeight>s?(t.addEventListener("scroll",this.scrollRef=Vd()(this.handleScroll,50)),this.setState({hasOverflow:!0}),this.scrollRef()):(t.removeEventListener("scroll",this.scrollRef),this.setState({hasOverflow:!1}))}handleDocumentClick=t=>{if(!this.props.isActive)return;const s=t.composedPath();this.refWrap.current!=null&&s.includes(this.refWrap.current)||Array.from(document.querySelectorAll("dialog[open]")).some(r=>s.includes(r))||this.props.onClose({shouldFocusMarker:!1})};handleDocumentKeyDown=t=>{vs(t)&&this.props.isActive&&this.props.onClose({shouldFocusMarker:!1})};handleKeyDown(t){const{allowNav:s,onNextClick:o,onPreviousClick:r}=this.props,a=$M(this.contentRef,this.state.hasOverflow),i=HJ()(Re()(s));fs()([[i(Kn),r],[i(Qn),o],[DM,a]])(t)}handleCloseClick=()=>{this.props.onClose()};handleNextClick(t){this.props.onNextClick(t)}handlePreviousClick(t){this.props.onPreviousClick(t)}handleScroll(){const t=this.contentRef,s=t.scrollTop,o=t.scrollHeight,r=t.offsetHeight;s>=o-r-10?this.setState({hasOverflow:!1}):this.state.hasOverflow||this.setState({hasOverflow:!0})}getMediaContainerClasses(t,s){return X()({"labeled-graphic-bubble-media-container":t,"labeled-graphic-bubble-media-container--audio-overlay":s,"labeled-graphic-bubble-media-container--audio-on-bottom":t&&this.props.audioPosition==="bottom"})}}const VJ=Ze($J),zJ=({x:e,y:t})=>{const s={top:"initial",bottom:"initial",left:"0",right:"0"};return e>50?s.right=100-e+"%":s.left=e+"%",t>50?s.bottom=100-t+"%":s.top=t+"%",s},UJ=({hasOverflow:e,x:t,y:s})=>{const o=t<50;let r="top";return s>33&&(r=s>66?"bottom":"middle"),X()("bubble__body","bg--range-light",{"bubble__body--has-overflow":e,"bubble__body--left":o,"bubble__body--right":!o,"bubble__body--top":r==="top","bubble__body--middle":r==="middle","bubble__body--bottom":r==="bottom"})};var _J=p(82920);const GJ=e=>new URL(e).pathname.slice(1)+new URL(e).search;class WJ extends _J.Component{imageEl;constructor(t){super(t),this.state={style:{}}}render(){const{canvasClassNames:t,children:s,cornerRadius:o,editable:r,editingDisabled:a,getL10nValue:i,imageLoaded:c,media:l,onCreateMarker:d,onShowAltDialog:h}=this.props,{style:m}=this.state,f=i(l)?.image??{},{alt:v,dimensions:C,key:g,src:x}=f,b=!!f.alt,T=bo(v),L=R8(f),y=X()("labeled-graphic-canvas__figure",{"labeled-graphic-canvas__figure--editable":r&&!a,"labeled-graphic-canvas__figure--editing-disabled":r&&a});let S;g?S=dt(f):x&&(S=dt({key:GJ(x),...f}));const k=X()("labeled-graphic-canvas__image","labeled-graphic-canvas__image--flag-dimensions",{"labeled-graphic-canvas__image--svg":Ag(S)}),N={...m,...o!=null&&{"--corner-radius":`${Number(o)}px`}},I=(0,n.jsx)(xs,{alt:T,className:k,"data-l10n-id":Pt(l),height:C?.height||C?.originalHeight,onClick:d,onLoad:()=>this.setState({style:L}),ref:w=>{this.imageEl=w},src:S,style:N,width:C?.width||C?.originalWidth});return(0,n.jsx)("div",{className:t||"labeled-graphic-canvas",children:(0,n.jsx)("div",{className:"labeled-graphic-canvas__item",children:(0,n.jsx)("div",{className:"labeled-graphic-canvas__bounds",children:(0,n.jsxs)("figure",{className:y,children:[b&&r&&(0,n.jsx)(Mo,{message:"Edit alt text",children:(0,n.jsx)("div",{className:"item-media__tooltip",children:(0,n.jsx)("button",{className:"labeled-graphic-canvas__alt-tag",onClick:h,type:"button",children:"ALT"})})}),c&&I,(0,n.jsx)("ol",{role:"list",children:s})]})})})})}}const KJ=Ze(WJ),QJ={"01":"a11yLabeledGraphicIconPlus","02":"a11yLabeledGraphicIconDot","03":"a11yLabeledGraphicIconInformation","04":"a11yLabeledGraphicIconQuestion","05":"a11yLabeledGraphicIconCheck","06":"a11yLabeledGraphicIconX","07":"a11yLabeledGraphicIconHeart","08":"a11yLabeledGraphicIconPin","09":"a11yLabeledGraphicIconArrowLeft",10:"a11yLabeledGraphicIconArrowRight",11:"a11yLabeledGraphicIconArrowUp",12:"a11yLabeledGraphicIconArrowDown",13:"a11yLabeledGraphicIconArrowUpLeft",14:"a11yLabeledGraphicIconArrowUpRight",15:"a11yLabeledGraphicIconArrowDownLeft",16:"a11yLabeledGraphicIconArrowDownRight",17:"1",18:"2",19:"3",20:"4",21:"5",22:"6",23:"7",24:"8",25:"9",26:"0"},YJ=(e,t)=>{const s=QJ[t];return s?.startsWith("a11y")?e?.[s]||"":s||""};var ZJ=p(82920);const k6=$("labeled-graphic-marker");class XJ extends ZJ.Component{marker;onMouseMove;onMouseLeave;constructor(t){super(t),this.state={dragging:!1,hovering:!1,isComplete:!1,isDragged:!1,offsetX:0,offsetY:0,wasDragged:!1},this.onClick=this.onClick.bind(this)}parentCanvasElement(){return this.marker.parentElement.parentElement.parentElement}componentDidMount(){const t=this.parentCanvasElement();t.addEventListener("mousemove",this.onMouseMove=s=>{this.onItemDrag(s)}),t.addEventListener("mouseleave",this.onMouseLeave=s=>{this.onItemRelease(s)})}componentWillUnmount(){const t=this.parentCanvasElement();t.removeEventListener("mousemove",this.onMouseMove),t.removeEventListener("mouseleave",this.onMouseLeave)}UNSAFE_componentWillReceiveProps(t){const{isSelected:s,useLocalStateForCompletion:o}=t;s&&o&&!this.state.isComplete&&this.setState({isComplete:!0})}buildMarkerLabel=({icon:t,label:s,title:o,viewed:r})=>{const{labels:a}=this.props;return[].concat(s||[]).concat(o||[]).concat(t||[]).concat(r?a?.a11yLabeledGraphicViewed:a?.a11yLabeledGraphicUnviewed).join(", ")};render(){const{accentColor:t,ariaControls:s,icon:o,isActive:r,isComplete:a,isLessonBlocksList:i,isSelected:c,isVisible:l,labels:d,markerColor:h,markerColorContrast:m,onFocus:f,styles:v,useLocalStateForCompletion:C}=this.props,g=this.props.getL10nValue(this.props.title),x=YJ(d,o),b=C?this.state.isComplete:a,T=!!h,L=Is(h),S=zt({backgroundColor:h,contrast:m??L}),k=T?h:"#ffffff",N=T?S:t,I=this.buildMarkerLabel({icon:x,label:d&&d.a11yLabeledGraphicButtonMarker||"",title:g,viewed:b}),w=k6({active:c,dragged:this.state.isDragged,visible:l,complete:b}),A={...v,"--color-lg-accent":k,"--color-lg-font":N},E=k6("pin",{selected:c,disabled:i});return(0,n.jsx)("button",{"aria-controls":s,"aria-expanded":r,"aria-label":I,className:w,onClick:this.onClick,onContextMenu:this.onItemRelease.bind(this),onFocus:f,onMouseDown:this.onItemGrab.bind(this),onMouseEnter:this.onHover.bind(this),onMouseLeave:this.onLeave.bind(this),onMouseUp:this.onItemRelease.bind(this),ref:j=>{this.marker=j},style:A,type:"button",children:(0,n.jsx)("span",{className:E,children:(0,n.jsx)("i",{className:`icon icon-Master-${o}`})})})}focus(){this.marker&&this.marker.focus&&this.marker.focus()}onHover(){this.state.wasDragged&&this.props.onHover(),this.setState({hovering:!0})}onLeave(){this.props.onLeave(),this.setState({hovering:!1})}onClick(){const{editable:t,itemId:s,onClick:o,parentId:r}=this.props,a="labeledGraphicMarkerClick",i={detail:{itemId:s,parentId:r}},c=new CustomEvent(a,i);document.dispatchEvent(c),t||o()}onItemGrab(t){const{editable:s}=this.props;if(!s)return;const o=this.marker.getBoundingClientRect(),r=o.left-t.clientX+this.marker.offsetWidth/2,a=o.top-t.clientY+this.marker.offsetHeight/2;this.setState({posX:t.clientX,posY:t.clientY,offsetX:r,offsetY:a,isDragged:!0})}onItemDrag(t){if(this.state.isDragged){const s=t.clientX-this.state.posX,o=t.clientY-this.state.posY;this.marker.style.transform=`translate3d(${s}px, ${o}px, 0)`}}onItemRelease(t){const{editable:s}=this.props,o={isDragged:!1};this.marker.style.transform="translate3d(0, 0, 0)",this.state.isDragged&&this.state.posX===t.clientX&&this.state.posY===t.clientY?this.props.onClick():s&&t.currentTarget instanceof HTMLElement&&t.currentTarget.classList.contains("labeled-graphic-marker")?this.props.onSetPosition(t,this.state.offsetX,this.state.offsetY):this.state.isDragged&&(o.offsetX=0,o.offsetY=0),this.setState(o)}}const qJ=Ze(XJ);class JJ extends u.Component{static get defaultProps(){return{animateBlockEntrance:!1,editable:!0,getL10nValue:(t=>t),markerDelay:0,onClose:Function.prototype,onCreateMarker:Function.prototype,onItemClear:Function.prototype,onItemHint:Function.prototype,onItemSelected:Function.prototype,onNextClick:Function.prototype,onPreviousClick:Function.prototype,onSetMarkerPosition:Function.prototype,showBubbles:!0}}markerRefs;timeout;entranceDoneTimeout;canvas;constructor(t){super(t);const{isLearner:s}=t;this.afterAnimatedIn=this.afterAnimatedIn.bind(this),this.createMarker=this.createMarker.bind(this),this.onBubbleClose=this.onBubbleClose.bind(this),this.onMarkerFocus=this.onMarkerFocus.bind(this),this.markerRefs={},this.state={showMarkers:!s||ws()}}componentDidMount(){const{isBlock:t,isLearner:s,isPreview:o,markerDelay:r}=this.props;s&&!t&&(this.timeout=setTimeout(()=>this.setState({showMarkers:!0}),o?0:r))}componentWillUnmount(){clearTimeout(this.timeout),clearTimeout(this.entranceDoneTimeout)}render(){const{accentColor:t,animateBlockEntrance:s,blockId:o,color:r,canvasClassNames:a,disableCreateMarker:i,editable:c,getL10nValue:l,imageLoaded:d=!0,isBlock:h,isLearner:m,isLessonBlocksList:f,isPreview:v,initiallyVisible:C,items:g,labels:x,lessonId:b,media:T,onItemClear:L,onItemHint:y,onItemSelected:S,onNextClick:k,onPreviousClick:N,onShowAltDialog:I,parentId:w,progress:A,selected:E,settings:j={},showBubbles:O,enableVideoPlaybackSpeed:R}=this.props,{cornerRadius:P,headingLevel:M,markerColor:H,markerColorContrast:F}=j,{showMarkers:D}=this.state,W=H||(t||r),_=X()("map-item",{"map-item--animated":!c}),Z=s?"fadeIn":"none",oe=s?1:0,Q=g.length>1;return(0,n.jsx)(u.Fragment,{children:(0,n.jsx)(Be,{afterAnimatedIn:this.afterAnimatedIn,animateBlockEntrance:!v,animateIn:Z,duration:v?0:oe,initiallyVisible:C,isLearner:m,children:(0,n.jsx)(KJ,{canvasClassNames:a,cornerRadius:P,editable:c,editingDisabled:i,imageLoaded:d,media:T,onCreateMarker:this.createMarker,onShowAltDialog:I,ref:U=>{this.canvas=U},children:g.map((U,B)=>{const{description:z,id:K,icon:Y,media:J,title:q}=U,ee=l(U.x),se=l(U.y),te={top:se+"%",left:ee+"%"},ye=$n()(["items",K,"isComplete"],A),G=E===K,le=`bubble-${o}-${K}`;return(0,n.jsxs)("li",{className:_,role:"listitem",children:[(0,n.jsx)(qJ,{accentColor:W,ariaControls:le,editable:c,icon:Y,isActive:E===K,isComplete:ye,isLessonBlocksList:f,isSelected:G,isVisible:D,itemId:K,labels:x,markerColor:H,markerColorContrast:F,onClick:()=>{S(K)},onFocus:this.onMarkerFocus(K),onHover:()=>{y()},onLeave:()=>{L()},onSetPosition:this.onSetPosition.bind(this,U),parentId:w,ref:me=>{this.markerRefs[K]=me},styles:te,title:q,useLocalStateForCompletion:h},K),!c&&O&&(0,n.jsx)(VJ,{accentColor:W,allowNav:Q,audioPosition:j.audioPosition,blockId:o,description:z,enableVideoPlaybackSpeed:R,headingLevel:M,htmlId:le,index:B,isActive:G,item:U,labels:x,lessonId:b,media:J,mediaOpts:{disableZoom:!j.zoomOnClick},onClose:this.onBubbleClose(K),onNextClick:()=>{k(B)},onPreviousClick:()=>{N(B)},title:q,x:Number(ee),y:Number(se)},le)]},K)})})})})}createMarker(t){const{disableCreateMarker:s,editable:o,onCreateMarker:r}=this.props;if(!o||s)return;const{x:a,y:i}=this.findItemCoordinates({e:t}),c=this.props.items.length,d={description:"",hasMedia:!1,icon:"01",id:$d()(),isActive:!1,title:"",x:String(a),y:String(i)};r({index:c,payload:d})}onBubbleClose(t){const{onClose:s}=this.props;return(o={shouldFocusMarker:!0})=>{const r=this.markerRefs[t];o.shouldFocusMarker&&r?.focus?.(),s()}}onMarkerFocus(t){return()=>{const{onClose:s,selected:o}=this.props;o&&o!==t&&s()}}onSetPosition(t,s,o,r){if(!this.props.editable)return;const{lesson:a,onSetMarkerPosition:i}=this.props,{id:c,items:l}=a,{x:d,y:h}=this.findItemCoordinates({e:s,offsetX:o,offsetY:r}),m={x:String(d),y:String(h)};(0,Qt.uW)(t.x)&&(0,Qt.uW)(t.y)?(this.props.updateL10n({l10n:t.x,value:m.x}),this.props.updateL10n({l10n:t.y,value:m.y})):i({itemId:t.id,lessonId:c,items:l,payload:m})}findItemCoordinates({e:t,offsetX:s=0,offsetY:o=0}){const r=this.canvas.imageEl.getBoundingClientRect(),a=20,i=this.findItemCoordinate({clientPos:t.clientX,clientOffset:s,rectSubtractor:r.left,rectDivisor:r.width,validOffsetAmount:a}),c=this.findItemCoordinate({clientPos:t.clientY,clientOffset:o,rectSubtractor:r.top,rectDivisor:r.height,validOffsetAmount:a});return{x:i,y:c}}findItemCoordinate({clientPos:t,clientOffset:s,rectSubtractor:o,rectDivisor:r,validOffsetAmount:a}){const i=a/r*100,c=100-i;let l=(t+s-o)/r*100;return l>c?l=c:l<i&&(l=i),l}afterAnimatedIn(){const{isBlock:t}=this.props;t&&this.setState({showMarkers:!0})}}const eee=Ze(JJ);var tee=p(82920);const N6="page-wrap--noscroll";class see extends tee.Component{static get defaultProps(){return{onItemSelected:Function.prototype,onStep:Function.prototype,getL10nValue:()=>{}}}constructor(t){super(t),this.state={imageLoaded:!1},this.closeOpenedBubble=this.closeOpenedBubble.bind(this),this.handleMarkerClick=this.handleMarkerClick.bind(this),this.handleNavEvent=this.handleNavEvent.bind(this),this.onItemSelected=this.onItemSelected.bind(this),this.onNextClick=this.onNextClick.bind(this),this.onPreviousClick=this.onPreviousClick.bind(this),this.setImageLoaded=this.setImageLoaded.bind(this)}componentDidMount(){this.loadImage(),this.props.readOnly||document.addEventListener("labeledGraphicMarkerClick",this.handleMarkerClick),window.addEventListener(Ge,this.handleNavEvent)}handleNavEvent(t){const s=t.detail.path[t.detail.path.indexOf("items")+1]?.id,o=t.detail.path[t.detail.path.lastIndexOf("items")+1]?.id;s===this.props.blockId&&this.state.selectedItemId!==o&&this.onItemSelected(o)}componentWillUnmount(){this.props.readOnly||document.removeEventListener("labeledGraphicMarkerClick",this.handleMarkerClick),window.removeEventListener(Ge,this.handleNavEvent)}render(){const{imageLoaded:t}=this.state,{initiallyVisible:s,isLessonBlocksList:o,isPreview:r,items:a,labels:i,parentId:c,settings:l={}}=this.props,{mediaWidth:d="2"}=l,h=r?a[0].id:this.state.selectedItemId,m=X()("view-labeled-graphic",{"view-labeled-graphic--small":d==="0","view-labeled-graphic--medium":d==="1","view-labeled-graphic--full":d==="2"});return(0,n.jsx)("div",{"aria-label":i?.a11yLabeledGraphicBlock,className:m,role:"group",children:(0,n.jsx)(eee,{...this.props,canvasClassNames:this.getCanvasClassNames(),editable:!1,imageLoaded:t,initiallyVisible:s,isLessonBlocksList:o,labels:i,markerDelay:1e3,onClose:this.closeOpenedBubble,onItemSelected:this.onItemSelected,onNextClick:this.onNextClick,onPreviousClick:this.onPreviousClick,parentId:c,selected:h})})}setImageLoaded(){this.setState({imageLoaded:!0})}loadImage(){const t=this.props.getL10nValue(this.props.media)?.image,{key:s,src:o}=t??{};if(!s&&!o)return;const r=setTimeout(this.setImageLoaded,1e3),a=new Image,i=s?dt(t):o;a.src=i,a.onload=()=>{clearTimeout(r),this.setImageLoaded()}}getCanvasClassNames(){return X()("labeled-graphic-canvas",{"labeled-graphic-canvas--visible":this.state.imageLoaded})}onNextClick(t){const{blockId:s,items:o}=this.props,r=Ye()("id",o[al()(t)]||o[0]);document.querySelector(`dialog#bubble-${s}-${this.state.selectedItemId}[open]`)?.close(),this.onItemSelected(r)}onPreviousClick(t){const{blockId:s,items:o}=this.props,r=Ye()("id",o[$f()(t)]||o[$f()(Hs()(o))]);document.querySelector(`dialog#bubble-${s}-${this.state.selectedItemId}[open]`)?.close(),this.onItemSelected(r)}onItemSelected(t){const{editBlock:s,items:o,onItemSelected:r,onStep:a}=this.props,{selectedItemId:i}=this.state;s&&window.matchMedia("(max-width: 768px)").matches||(i===t?this.closeOpenedBubble():(this.openBubble(t),Pe()(a,mr()(c=>c.id===t))(o)),r(t))}handleMarkerClick(t){const{itemId:s,parentId:o}=t.detail,{selectedItemId:r}=this.state;(o!==this.props.parentId||r!==s)&&this.closeOpenedBubble()}openBubble(t){const{blockId:s}=this.props;if(window.matchMedia("(max-width: 767px)").matches){const r=document.querySelector(".page-wrap");r&&r.classList.add(N6)}this.setState({selectedItemId:t}),document.getElementById(`bubble-${s}-${t}`).show()}closeOpenedBubble(){const{blockId:t}=this.props;if(window.matchMedia("(max-width: 767px)").matches){const o=document.querySelector(".page-wrap");o&&o.classList.remove(N6)}document.getElementById(`bubble-${t}-${this.state.selectedItemId}`)?.close(),this.setState({selectedItemId:void 0})}}const nee=Ze(see),oee=e=>{const{blockId:t,progress:s,isLessonBlocksList:o=!1}=e,r=$n()(["items",t],s);return(0,n.jsx)(Ee,{className:"block-labeled-graphic",children:(0,n.jsx)(nee,{...e,editable:!1,isBlock:!0,isLessonBlocksList:o,parentId:t,progress:r})})},ue=$("block-survey"),op={2:[{value:"bad",icon:"face-anguished",defaultLabel:"Bad"},{value:"great",icon:"face-laugh",defaultLabel:"Great"}],3:[{value:"bad",icon:"face-anguished",defaultLabel:"Bad"},{value:"fair",icon:"face-meh",defaultLabel:"Fair"},{value:"great",icon:"face-laugh",defaultLabel:"Great"}],4:[{value:"bad",icon:"face-anguished",defaultLabel:"Bad"},{value:"fair",icon:"face-meh",defaultLabel:"Fair"},{value:"good",icon:"face-smile",defaultLabel:"Good"},{value:"great",icon:"face-laugh",defaultLabel:"Great"}],5:[{value:"bad",icon:"face-anguished",defaultLabel:"Bad"},{value:"poor",icon:"face-frown",defaultLabel:"Poor"},{value:"fair",icon:"face-meh",defaultLabel:"Fair"},{value:"good",icon:"face-smile",defaultLabel:"Good"},{value:"great",icon:"face-laugh",defaultLabel:"Great"}]},I6=op[5].map(e=>e.defaultLabel),iu=e=>{const t=w6(e.labels?.length);return op[t]??op[cu]},E6=(e,t)=>{const s=iu(e).findIndex(o=>o.value===t);return s===-1?void 0:s+1},ree=(e,t)=>iu(e)[t-1]?.value,aee=2,iee=10,j6=5,cee=7,cu=3,lee=5,w6=e=>e===2||e===3||e===4||e===5?e:cu,Cc=null,Vpe=e=>(Cc[e]??Cc[cu]).map(t=>I6[t]),zpe=(e,t)=>{const s=w6(e?.length),o=Cc[s]??Cc[cu],r=Cc[t],a=[...I6];return e?.forEach((i,c)=>{const l=o[c];l!==void 0&&(a[l]=i)}),r.map(i=>a[i])},Wa=e=>Array.isArray(e)?e.length===0:!e||e.trim()==="",dee=(e,t,s)=>{const o=s?.items?.[e]?.items??{};return t.reduce((r,a)=>{const i=o?.[a.id]?.response;if(i==null)return r;if(a.questionType==="RATING"){const c=ree(a,Number(i));c!=null&&(r[a.id]=c)}else r[a.id]=String(i);return r},{})},uee=(e,t)=>t?.items?.[e]?.isSubmitted??!1,A6=(e,t)=>(0,n.jsx)(We,{className:"block-survey__question-title",id:t,value:e.question}),hee=e=>(0,n.jsx)(We,{value:e.startLabel}),mee=e=>(0,n.jsx)(We,{value:e.endLabel}),fee=(e,t)=>(0,n.jsx)(We,{className:"block-survey__rating-label",value:e.labels?.[t]});function pee({animateBlockEntrance:e,blockId:t,initiallyVisible:s,isLearner:o,items:r=[],labels:a,onSurveySubmitted:i=Kt,onSurveyPartialResponse:c=Kt,lessonId:l,onStep:d,onSubmit:h,progress:m,renderLinearScaleEndLabel:f=mee,renderLinearScaleStartLabel:v=hee,renderQuestionTitle:C=A6,renderRatingLabel:g=fee,settings:x={},title:b}){const T=Ot(),[L,y]=(0,u.useState)(()=>dee(t,r,m)),[S,k]=(0,u.useState)(()=>uee(t,m)),[N,I]=(0,u.useState)(!1),[w,A]=(0,u.useState)(!1),[E,j]=(0,u.useState)(new Set),[O,R]=(0,u.useState)(0),P=(0,u.useRef)(null),M=(0,u.useRef)(null),H=(0,u.useRef)(!1),F=(0,u.useCallback)(G=>{M.current=G},[]),{announcePolite:D}=bn(),V=(0,Me.A)(S),W=x.cardMode==="TRANSPARENT",_=`validation-error-${t}`,Z=x.surveyWidth??76,oe=Nd(Z),Q=(0,u.useCallback)((G,le)=>{y(he=>({...he,[G]:le}));const me=r.find(he=>he.id===G),pe=me?.questionType==="RATING"?E6(me,le):void 0;c({itemId:G,response:pe}),E.has(G)&&(j(xe=>{const ge=new Set(xe);return ge.delete(G),ge}),r.find(xe=>xe.id===G)&&r.filter(ge=>ge.isRequired&&ge.id!==G&&Wa(L[ge.id])).length===0&&A(!1))},[E,r,c,L]),U=(0,u.useCallback)((G,le)=>{y(me=>({...me,[G]:le})),c({itemId:G,response:le}),E.has(G)&&(j(pe=>{const he=new Set(pe);return he.delete(G),he}),r.filter(pe=>pe.isRequired&&pe.id!==G&&Wa(L[pe.id])).length===0&&A(!1))},[E,r,c,L]),B=(0,u.useCallback)((G,le)=>{y(me=>{const pe=me[G],he=Array.isArray(pe)?pe:[],xe=he.includes(le)?he.filter(ge=>ge!==le):[...he,le];return{...me,[G]:xe}}),E.has(G)&&(j(pe=>{const he=new Set(pe);return he.delete(G),he}),r.filter(pe=>pe.isRequired&&pe.id!==G&&Wa(L[pe.id])).length===0&&A(!1))},[E,r,L]),z=(0,u.useCallback)((G,le)=>{y(me=>({...me,[G]:le})),c({itemId:G,response:Number(le)}),E.has(G)&&(j(pe=>{const he=new Set(pe);return he.delete(G),he}),r.find(pe=>pe.id===G)&&r.filter(he=>he.isRequired&&he.id!==G&&Wa(L[he.id])).length===0&&A(!1))},[E,r,c,L]),K=(0,u.useCallback)((G,le,me)=>{if(me&&le.length>me)return;const pe=L[G]||"",he=me&&le.length===me&&pe.length<me;y(xe=>({...xe,[G]:le})),c({itemId:G,response:le}),he&&D(`Character limit reached. ${me} characters maximum.`),E.has(G)&&le.trim()!==""&&(j(ge=>{const Ke=new Set(ge);return Ke.delete(G),Ke}),r.filter(ge=>ge.isRequired&&ge.id!==G&&Wa(L[ge.id])).length===0&&A(!1))},[D,r,c,L,E]),Y=(0,u.useCallback)(async()=>{if(!t||!l){console.error("Missing blockId or lessonId");return}I(!0);try{const G=r.flatMap(le=>{const me=L[le.id],pe=Array.isArray(me)?"":me||"",he=T(le.question)??"",xe={id:String(t),lessonId:String(l),itemId:le.id,questionTitle:Ss(String(he)),surveyTitle:Ss(String(T(b)??"")),isUnfinished:!1};if(le.questionType==="RATING"){const ge=E6(le,pe);if(ge===void 0)return[];const Ke=iu(le),wt=Object.fromEntries(Ke.map((Lt,ot)=>[ot+1,T(le.labels?.[ot])??Lt.defaultLabel]));return[{...xe,ratingOptions:wt,type:le.questionType,response:ge}]}if(le.questionType==="LINEAR_SCALE")return[{...xe,type:"LINEAR_SCALE",response:pe===""?void 0:Number(pe)}];if(le.questionType==="MULTIPLE_CHOICE"||le.questionType==="MULTIPLE_RESPONSE"){const ge=le.choices??[],wt=(Array.isArray(me)?me:me?[me]:[]).flatMap(Lt=>{const ot=ge.find(St=>St.id===Lt);return ot?[{id:ot.id,title:Ss(String(T(ot.title)??""))}]:[]});return[{...xe,type:le.questionType,response:wt}]}return[{...xe,type:le.questionType==="SHORT_RESPONSE"?"SHORT_RESPONSE":"LONG_RESPONSE",response:pe}]});window.Runtime?.reportUngradedAnswers&&await window.Runtime.reportUngradedAnswers(G),r.forEach(le=>d?.({id:le.id})),h?.(L),k(!0),i()}catch(G){console.error("Failed to submit survey:",G)}finally{I(!1)}},[t,l,r,L,d,h,b,T,i]),J=(0,u.useCallback)(G=>{if(G.preventDefault(),N)return;const me=r.filter(pe=>pe.isRequired).filter(pe=>Wa(L[pe.id]));if(me.length>0){A(!0),j(new Set(me.map(pe=>pe.id))),H.current=!0,R(pe=>pe+1);return}Y()},[N,Y,r,L]);(0,u.useEffect)(()=>{H.current&&M.current&&(M.current.focus(),H.current=!1)},[O]),(0,u.useEffect)(()=>{!V&&S&&P.current&&P.current.focus()},[S,V]);const q=(0,u.useRef)(null),ee=(0,u.useRef)(new Map),se=(0,u.useCallback)((G,le)=>{const me=ee.current;le?me.set(String(G),le):me.delete(String(G))},[]),te=C!==A6;(0,u.useEffect)(()=>{if(!te)return;const G=q.current;if(!G)return;const le=`.${String(ue("question-text"))}`,me=pe=>{if(pe.button!==0)return;const he=pe.target;if(!(he instanceof HTMLElement))return;const xe=he.closest(le);if(!(xe instanceof HTMLElement)||he.closest('[contenteditable="true"]'))return;const ge=xe.dataset.surveyItemId,Ke=ge==null?void 0:ee.current.get(ge);Ke&&(pe.preventDefault(),Ke.setFocus())};return G.addEventListener("mousedown",me),()=>G.removeEventListener("mousedown",me)},[te]);const ye=(G,le)=>{const me=L[G.id]||"",pe=`survey-q-${G.id}`,he=`${pe}-char-count`,xe=`${pe}-error`,ge=E.has(G.id),Ke=ge&&le===r.findIndex($e=>E.has($e.id));if(G.questionType==="LINEAR_SCALE"){const $e=Math.min(iee,Math.max(aee,G.scaleMax??lee)),Je=Array.from({length:$e},(ve,He)=>He+1),rt=ue("linear-scale-options",{wide:$e<=j6,medium:$e>j6&&$e<=cee}),kt=ue("linear-scale",{error:ge});return(0,n.jsxs)("fieldset",{"aria-describedby":ge?xe:void 0,className:ue("question",{error:ge}),ref:Ke?F:void 0,tabIndex:-1,children:[(0,n.jsxs)("legend",{className:ue("question-text"),"data-survey-item-id":String(G.id),children:[C(G,pe,se),G.isRequired&&(0,n.jsxs)("span",{className:ue("required-indicator"),children:[" ",(0,n.jsx)("span",{"aria-hidden":"true",children:"*"}),(0,n.jsx)("span",{className:"visually-hidden-always",children:a.surveyRequired})]})]}),(0,n.jsx)("div",{className:ue("interactive"),children:(0,n.jsxs)("div",{className:kt,children:[(0,n.jsx)("div",{className:ue("linear-scale-label"),children:v(G)}),(0,n.jsx)("div",{className:rt,children:Je.map(ve=>{const He=me===String(ve);return(0,n.jsxs)("label",{className:ue("linear-scale-option"),children:[(0,n.jsx)("span",{className:ue("linear-scale-number"),children:ve}),(0,n.jsx)("div",{className:ue("linear-scale-indicator"),children:(0,n.jsx)(ie,{className:ue("linear-scale-dot",{active:He}),"data-testid":He?"linear-scale-dot-active":"linear-scale-dot",name:"circle-solid"})}),(0,n.jsx)("input",{checked:He,className:ue("linear-scale-input"),name:`survey-${G.id}`,onChange:()=>z(G.id,String(ve)),type:"radio",value:String(ve)})]},ve)})}),(0,n.jsx)("div",{className:ue("linear-scale-label"),children:f(G)})]})}),ge&&(0,n.jsxs)("div",{className:ue("error-message"),id:xe,children:[(0,n.jsx)(ie,{"aria-hidden":"true",name:"alert-circle"})," ",a.surveyRatingRequired]})]},G.id)}if(G.questionType==="RATING"){const $e=iu(G).map((ve,He)=>({value:ve.value,label:G.labels?.[He],icon:ve.icon})),Je=ue("question",{error:ge}),rt=ue("rating-options",{error:ge}),kt=ge?xe:void 0;return(0,n.jsxs)("fieldset",{"aria-describedby":kt,className:Je,ref:Ke?F:void 0,tabIndex:-1,children:[(0,n.jsxs)("legend",{className:ue("question-text"),"data-survey-item-id":String(G.id),children:[C(G,pe,se),G.isRequired&&(0,n.jsxs)("span",{className:ue("required-indicator"),children:[" ",(0,n.jsx)("span",{"aria-hidden":"true",children:"*"}),(0,n.jsx)("span",{className:"visually-hidden-always",children:a.surveyRequired})]})]}),(0,n.jsx)("div",{className:ue("interactive"),children:(0,n.jsx)("div",{className:rt,children:$e.map((ve,He)=>{const hs=me===ve.value,co=(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("input",{checked:hs,className:ue("rating-input"),name:`survey-${G.id}`,onChange:()=>Q(G.id,ve.value),type:"radio",value:ve.value}),(0,n.jsx)(ie,{"aria-hidden":"true",className:ue("rating-icon"),name:ve.icon}),g(G,He)]}),Or=ue("rating-option",{selected:hs,error:ge,"two-options":$e.length===2,"three-options":$e.length===3,"four-options":$e.length===4,"five-options":$e.length===5});return W?(0,n.jsx)(Gt,{cardMode:"WHITE",className:Or,tag:"label",children:co},ve.value):(0,n.jsx)("label",{className:Or,children:co},ve.value)})})}),ge&&(0,n.jsxs)("div",{className:ue("error-message"),id:xe,children:[(0,n.jsx)(ie,{"aria-hidden":"true",name:"alert-circle"})," ",a.surveyRatingRequired]})]},G.id)}if(G.questionType==="MULTIPLE_CHOICE"){const $e=G.choices??[],Je=ue("choices",{error:ge});return(0,n.jsxs)("fieldset",{"aria-describedby":ge?xe:void 0,className:ue("question",{error:ge}),ref:Ke?F:void 0,tabIndex:-1,children:[(0,n.jsxs)("legend",{className:ue("question-text"),"data-survey-item-id":String(G.id),children:[C(G,pe,se),G.isRequired&&(0,n.jsxs)("span",{className:ue("required-indicator"),children:[" ",(0,n.jsx)("span",{"aria-hidden":"true",children:"*"}),(0,n.jsx)("span",{className:"visually-hidden-always",children:a.surveyRequired})]})]}),(0,n.jsx)("div",{className:ue("interactive"),children:(0,n.jsx)("ul",{className:Je,children:$e.map(rt=>{const kt=me===rt.id;return(0,n.jsx)("li",{className:ue("choice"),children:(0,n.jsxs)("label",{className:ue("choice-option",{selected:kt}),children:[(0,n.jsx)("input",{checked:kt,className:ue("choice-input"),name:`survey-${G.id}`,onChange:()=>U(G.id,rt.id),type:"radio",value:rt.id}),(0,n.jsx)("span",{"aria-hidden":"true",className:ue("choice-indicator"),children:(0,n.jsx)(ie,{className:ue("choice-dot",{active:kt}),name:"circle-solid"})}),(0,n.jsx)("span",{className:ue("choice-text"),children:(0,n.jsx)(We,{allowTabNavigation:!1,value:rt.title})})]})},rt.id)})})}),ge&&(0,n.jsxs)("div",{className:ue("error-message"),id:xe,children:[(0,n.jsx)(ie,{"aria-hidden":"true",name:"alert-circle"})," ",a.surveyMultipleChoiceRequired]})]},G.id)}if(G.questionType==="MULTIPLE_RESPONSE"){const $e=G.choices??[],Je=L[G.id],rt=Array.isArray(Je)?Je:[],kt=ue("choices",{error:ge});return(0,n.jsxs)("fieldset",{"aria-describedby":ge?xe:void 0,className:ue("question",{error:ge}),ref:Ke?F:void 0,tabIndex:-1,children:[(0,n.jsxs)("legend",{className:ue("question-text"),"data-survey-item-id":String(G.id),children:[C(G,pe,se),G.isRequired&&(0,n.jsxs)("span",{className:ue("required-indicator"),children:[" ",(0,n.jsx)("span",{"aria-hidden":"true",children:"*"}),(0,n.jsx)("span",{className:"visually-hidden-always",children:a.surveyRequired})]})]}),(0,n.jsx)("div",{className:ue("interactive"),children:(0,n.jsx)("ul",{className:kt,children:$e.map(ve=>{const He=rt.includes(ve.id);return(0,n.jsx)("li",{className:ue("choice"),children:(0,n.jsxs)("label",{className:ue("choice-option",{selected:He}),children:[(0,n.jsx)("input",{checked:He,className:ue("choice-input"),name:`survey-${G.id}`,onChange:()=>B(G.id,ve.id),type:"checkbox",value:ve.id}),(0,n.jsx)("span",{"aria-hidden":"true",className:ue("choice-indicator",{checkbox:!0}),children:(0,n.jsx)(ie,{className:ue("choice-check",{active:He}),name:"check"})}),(0,n.jsx)("span",{className:ue("choice-text"),children:(0,n.jsx)(We,{allowTabNavigation:!1,value:ve.title})})]})},ve.id)})})}),ge&&(0,n.jsxs)("div",{className:ue("error-message"),id:xe,children:[(0,n.jsx)(ie,{"aria-hidden":"true",name:"alert-circle"})," ",a.surveyMultipleResponseRequired]})]},G.id)}const wt=Array.isArray(me)?"":me,Lt=ue("question",{error:ge}),ot=ue("text-input",{error:ge}),St=G.questionType==="SHORT_RESPONSE"||G.questionType==="LONG_RESPONSE"?G.maxLength:void 0,vn=[ge?xe:null,St?he:null].filter(Boolean).join(" ")||void 0;return(0,n.jsxs)("div",{className:Lt,children:[(0,n.jsxs)("div",{className:ue("question-text"),"data-survey-item-id":String(G.id),children:[C(G,pe,se),G.isRequired&&(0,n.jsxs)("span",{className:ue("required-indicator"),children:[" ",(0,n.jsx)("span",{"aria-hidden":"true",children:"*"}),(0,n.jsx)("span",{className:"visually-hidden-always",children:a.surveyRequired})]})]}),(0,n.jsx)("div",{className:ue("interactive"),children:(0,n.jsxs)("div",{className:ue("text-response"),children:[(0,n.jsx)("textarea",{"aria-describedby":vn,"aria-invalid":ge?!0:void 0,"aria-labelledby":pe,"aria-required":G.isRequired?!0:void 0,className:ot,maxLength:St,onChange:$e=>K(G.id,$e.target.value,St),ref:Ke?F:void 0,rows:G.questionType==="LONG_RESPONSE"?4:2,value:wt}),St&&(0,n.jsxs)("div",{className:ue("character-count"),children:[(0,n.jsxs)("span",{"aria-hidden":"true",children:[wt.length," / ",St]}),(0,n.jsx)("span",{className:"visually-hidden-always",id:he,children:`${a.a11yBlockSurveyCharCount} ${wt.length} ${a.a11yPreposition} ${St}`})]})]})}),ge&&(0,n.jsxs)("div",{className:ue("error-message"),id:xe,children:[(0,n.jsx)(ie,{"aria-hidden":"true",name:"alert-circle"})," ",a.surveyFreeResponseRequired]})]},G.id)};return(0,n.jsx)(Ah,{...x,children:(0,n.jsx)(Ee,{className:ue(),children:(0,n.jsx)(Be,{animateBlockEntrance:e,initiallyVisible:s,isLearner:o,children:(0,n.jsx)("div",{children:(0,n.jsx)(Gt,{className:ue("container",{[`custom-width-${oe}`]:!0}),children:S?(0,n.jsx)("div",{className:ue("confirmation"),ref:P,tabIndex:-1,children:(0,n.jsxs)("p",{className:ue("confirmation-text"),children:[(0,n.jsx)(ie,{name:"circle-check-regular"})," ",a.surveyConfirmation]})}):(0,n.jsxs)("form",{noValidate:!0,onSubmit:J,children:[b&&(0,n.jsx)(We,{className:ue("title"),tagName:"h2",value:b}),(0,n.jsx)("div",{className:ue("questions"),ref:q,children:r.map((G,le)=>ye(G,le))}),(0,n.jsxs)("div",{className:ue("actions"),children:[(0,n.jsx)("div",{className:ue("validation-error",{visible:w}),id:`validation-error-${t}`,role:"alert",children:w&&(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(ie,{"aria-hidden":"true",name:"alert-circle"})," ",a.surveyValidationError]})}),(0,n.jsx)("div",{className:`${ue("submit")} brand--ui`,children:(0,n.jsx)("button",{"aria-describedby":w?_:void 0,className:ue("submit-button"),"data-testid":"survey-submit-button",disabled:N,type:"submit",children:N?a.surveySubmitting:a.surveySubmit})})]})]})})})})})})}const rp=$("block-process-card"),R6=({icon:e,isOverlayAudio:t=!1,onClick:s,text:o,variant:r})=>{const a=`${r}-btn`;return(0,n.jsxs)("button",{className:rp(a,{"audio-overlay":t}),onClick:s,type:"button",children:[(0,n.jsx)("span",{className:rp(`${a}-text`),children:o}),(0,n.jsx)(ie,{classNameIcon:rp(`${a}-icon`),name:e})]})},gee=$("block-process-card"),vee=({activeIndex:e,enableVideoPlaybackSpeed:t,id:s,index:o,isIntroStep:r=!1,isOverlayAudio:a=!1,item:i,labels:c,lessonId:l,media:d,onMediaLoad:h,settingZoomOnClick:m})=>{const{image:f}=d??{},v=a?f?.align??"center":"center",C=gee("media",{legacy:!1,"audio-overlay":a,[`audio-overlay-${v}`]:a,"intro-step":r}),g=e===o;return(0,n.jsx)("div",{className:C,children:(0,n.jsx)(Xt,{activeIndex:e,blockId:s,defaultAlign:"center",enableVideoPlaybackSpeed:t,hasPadding:!1,index:`${s}-${o}`,isOverlayAudio:a,item:i,itemIndex:o,labels:c,lessonId:l,media:d,onLoad:h,opts:{disableZoom:!m},shouldPause:!g})})};var ap=p(82920);const Ho=$("block-process-card"),Cee=({text:e})=>{const t=ap.useRef(null),{isInView:s}=xee({ref:t,threshold:.75});return(0,n.jsxs)("div",{className:Ho("swipe-badge",{animate:s}),ref:t,children:[(0,n.jsx)("span",{className:Ho("swipe-badge-text"),children:e}),(0,n.jsx)(ie,{className:Ho("swipe-badge-icon"),name:"chevron-right-solid"})]})};function xee({ref:e,rootMargin:t="0px",threshold:s=.1}){const[o,r]=ap.useState(!1);return ap.useEffect(()=>{if(!e.current||o)return;const a=new IntersectionObserver(([i])=>{i.isIntersecting&&(r(!0),a.disconnect())},{rootMargin:t,threshold:s});return a.observe(e.current),()=>a.disconnect()},[o,e,t,s]),{isInView:o}}const bee=({activeIndex:e,className:t,description:s,enableVideoPlaybackSpeed:o,hasIntro:r,id:a,index:i,item:c,labels:l,lessonId:d,media:h,onClickRestart:m,onClickStart:f,settingAudioPosition:v,settingHeadingLevel:C=2,settingShowStepLabel:g=!0,settingStepLabel:x,settingZoomOnClick:b,showSwipeBadge:T,style:L,title:y,totalSteps:S,type:k})=>{const N=`h${C}`,I=k==="intro",w=k==="summary",A=k==="step",E=r?i:i+1,j=Ae(x)||l.processStepName,O=Ae(Array.isArray(h)?{}:h),R=pn(O,v,!0,"process"),P=()=>{if(!h)return null;const M={activeIndex:e,blockId:a,enableVideoPlaybackSpeed:o,id:a,index:i,isIntroStep:I,labels:l,lessonId:d,media:h,onMediaLoad:()=>{},settingZoomOnClick:b,item:c},H={audio:{media:R.audioOnlyMedia||O,isOverlayAudio:!1},image:{media:R.imageOnlyMedia||O,isOverlayAudio:!1},video:{media:R.videoOnlyMedia||O},embed:{media:R.embedOnlyMedia||O,isOverlayAudio:!1},overlay:{media:O,isOverlayAudio:!1}};return R.renderOrder.map((F,D)=>{if(F==="text")return(0,n.jsx)(ke,{className:Ho("description"),value:s},`text-${D}`);const V=H[F];return V?(0,n.jsx)(vee,{...M,...V},`${F}-${D}`):null})};return(0,n.jsxs)("div",{className:Ho(null,{[k]:!0}).mix(t),style:L,children:[A&&g&&(0,n.jsx)("div",{className:Ho("number"),children:`${j} ${E}`}),(0,n.jsx)("div",{className:Ho("title"),children:(0,n.jsx)(N,{children:(0,n.jsx)(ke,{value:y})})}),P(),!h&&(0,n.jsx)(ke,{className:Ho("description"),value:s}),I&&S>1&&(0,n.jsx)(R6,{icon:"chevron-right-solid",isOverlayAudio:R.isOverlayAudio,onClick:f,text:l.processStart,variant:"start"}),w&&S>1&&(0,n.jsx)(R6,{icon:"arrow-rotate-left",isOverlayAudio:R.isOverlayAudio,onClick:m,text:l.processStartAgain,variant:"restart"}),T&&A&&(0,n.jsx)(Cee,{text:l.processSwipe})]})};var An=p(82920);const yee=$("block-process-carousel"),P6=e=>e?.type==="intro",ip=e=>e?.type==="summary",cp=e=>e?.type==="step",M6=e=>e?.isHidden,Tee=({animateBlockEntrance:e,enableVideoPlaybackSpeed:t,id:s,initiallyVisible:o,isLearner:r,items:a,labels:i,lessonId:c,onStep:l,onTranscriptUpdate:d,previewType:h,processRef:m,settings:{audioPosition:f,headingLevel:v,stepLabel:C,showStepLabel:g,zoomOnClick:x}})=>{const b=Et(480),T=J0(),L=Ot(),y=An.useRef(null),[S,k]=An.useState(0),[N,I]=An.useState(!1),w=An.useMemo(()=>h===sr.MOBILE_PORTRAIT||h===sr.MOBILE_LANDSCAPE,[h]),A=An.useMemo(()=>{const V=a.filter(oe=>!M6(oe)),W=V.find(P6),_=V.find(ip),Z=V.filter(cp);return[W,...Z,_].filter(Boolean)},[a]),E=An.useMemo(()=>A.findIndex((V,W)=>cp(V)&&(cp(A[W+1])||ip(A[W+1]))),[A]),j=P6(A[0]),O=ip(A[A.length-1]),R=!!h;An.useEffect(()=>{l&&(a.forEach(V=>M6(V)&&l(V)),A.length>0&&l(A[0]))},[]);const P=An.useCallback(()=>{y.current?.navigateToSlide?.(0)},[]),M=An.useCallback(()=>{y.current?.navigateToSlide?.(1)},[]),H=An.useCallback(V=>{if(k(V),m.current){const Z=m.current.closest("[data-block-id]")??m.current;xH(Z,{offsetTop:document.getElementById("app-header")?.offsetHeight??0})}V!==E&&!N&&I(!0),l?.(A[V]);const W=A[V]?.media;L(W)?.audio&&d?.({audioPlayerId:fn({refs:`items:${s}/items:${A[V]?.id}`}),transcriptMedia:W})},[A,E,L,N,s,l,d,m]),F=({index:V,isActive:W,onClick:_,onKeyDown:Z})=>{const oe=j&&V===0,Q=O&&V===A.length-1,U=j?V:V+1;let B,z;oe?(B=i?.a11yBlockProcessSlideControlsIntroduction,z=(0,n.jsx)(ie,{className:"carousel-controls-item-intro-icon",name:"chevron-right"})):Q?(B=i?.a11yBlockProcessSlideControlsSummary,z=(0,n.jsx)(ie,{name:"check-regular"})):(B=U.toString(),z=U.toString());const K=`${i?.a11yBlockProcessSlideControlsGoToSlide} ${B}`;return(0,n.jsx)(Q3,{"aria-label":K,ariaLabel:K,className:"carousel-controls-item-btn",isActive:W,onClick:_,onKeyDown:Z,children:z},V)},D=e?"fadeIn":"none";return(0,n.jsx)(Be,{animateBlockEntrance:R,animateIn:D,duration:R&&e?1:0,initiallyVisible:o,isLearner:r,children:(0,n.jsx)("div",{className:yee(),children:(0,n.jsx)(Bd,{blockId:s,carouselRef:y,items:A,children:()=>(0,n.jsx)(Od,{iconNameLeft:"chevron-left-solid",iconNameRight:"chevron-right-solid",isInfinite:!1,isRTL:T,labelCarousel:i?.a11yBlockProcessCarousel,labelCarouselRoleDesc:i?.a11yBlockProcessRoleDescription,labelSlideControls:i?.a11yBlockProcessSlideControls,labelSlideControlsGoToNext:i?.a11yBlockProcessSlideControlsGoToNext,labelSlideControlsGoToPrevious:i?.a11yBlockProcessSlideControlsGoToPrevious,labelSlideControlsGoToSlide:i?.a11yBlockProcessSlideControlsGoToSlide,labelSlideCounterPreposition:i?.blocksPreposition,labelSlidePreposition:i?.a11yBlockProcessSlidePreposition,labelSlideRoleDesc:i?.a11yBlockProcessSlideRoleDescription,onChange:H,ref:y,renderSlideIndicator:F,shouldMouseEmulateTouch:w,shouldUseCounter:!1,shouldUseGoToSlide:!0,children:A.map((V,W)=>(0,n.jsx)(Gt,{activeIndex:S,description:V.description,enableVideoPlaybackSpeed:t,hasIntro:j,id:s,index:W,isHidden:V.isHidden,item:V,labels:i,lessonId:c,media:V.media,onClickRestart:P,onClickStart:M,settingAudioPosition:f,settingHeadingLevel:v,settingShowStepLabel:g,settingStepLabel:C,settingZoomOnClick:x,showSwipeBadge:b&&!N&&W===E,tag:bee,title:V.title,totalSteps:A.length,type:V.type},V.id))})})})})};var Lee=p(82920);const See=e=>{const{blockId:t}=e,s=Lee.useRef(null);return(0,n.jsx)(Ee,{className:"block-process",ref:s,children:(0,n.jsx)(Tee,{id:t,processRef:s,...e})})};var kee=p(11842),Nee=p.n(kee),Iee=p(41569),O6=p.n(Iee),Eee=p(61417),B6=p.n(Eee),jee=p(10285),wee=p.n(jee),Aee=p(39602),$o=p.n(Aee);const D6=e=>({...e.responses[e.response],hasCharacter:e.hasCharacter,type:"response"}),Ree=(e,t)=>{const s=e.responses[e.response],o={emotion:t.emotion,goTo:t.goTo,nextSlide:t.nextSlide},r="action"in t?{action:t.action}:{};return{...o,...r,description:s?.feedback||"",type:"dialogue",hasCharacter:e.hasCharacter}},Pee=e=>[D6(e)],Mee=e=>{const t=!!e.responses[e.response],s=D6(e),o=Ree(e,s);return t?[s,o]:[o]},Oee=e=>e.hasFeedback?[e,...Mee(e)]:e.response!=null?[e,...Pee(e)]:[e],Bee=(e,t)=>{if(!t)return;const{scene:s,slide:o}=t,r=e.findIndex(c=>c.id===s),i=(e[r]?.slides||[]).findIndex(c=>c.id===o);return{scene:r,slide:i}},F6=yl()(Bee);var Dee=p(41182),Fee=p.n(Dee);const Hee=Nt()(Ye()("filters"),Fn()(Xe()("name","rise_emotion")),si()(Rt())),$ee=Nt()(Ye()("filters"),mr()(Xe()("name","rise_emotion")),Ye()("value")),H6=e=>new URL(e).pathname.slice(1),Vee=e=>Nt()(ts()("key",H6(e.src)),ts()("thumbnailKey",H6(e.thumbnail)))(e),zee=Nt()(Ye()("poses"),Fn()(Hee),gt()(e=>[$ee(e),e]),Fee(),Cn()(Vee));var _pe,Rn=p(82920);const lp=e=>e===-1?null:e,Uee=e=>Zs()(At(),Ne(),e),$6=si()(At()),Ka=af()($6,an),V6=Nee()(ef()),z6=Uee(CE),dp=e=>So()(e);class _ee extends Rn.Component{static get defaultProps(){return{getCharacter:Function.prototype,onItemUpdate:Function.prototype}}continueRef;feedbackRef;resetRef;buttonRef=Rn.createRef();responseItemRef=Rn.createRef();scenarioRef=Rn.createRef();blockContentRef=Rn.createRef();endRef=Rn.createRef();textRef=Rn.createRef();refs=Rn.createRef();dynamicRefs=Rn.createRef();fadeObservers=new Map;shouldFocus=!1;constructor(t){super(t);const s={activeScene:0,activeSlide:0,initiated:!1,prevScene:0,prevSlide:0,resizes:0,slides:{}};this.refs.current={},this.state=t.initialState||s,this.fetchCharacters=this.fetchCharacters.bind(this),this.fetchCharacterPose=this.fetchCharacterPose.bind(this),this.getCharacterPose=this.getCharacterPose.bind(this),this.handleNavEvent=this.handleNavEvent.bind(this),this.onClick=this.onClick.bind(this),this.onFocus=this.onFocus.bind(this),this.onInit=this.onInit.bind(this),this.onResize=this.onResize.bind(this),this.onResponseClick=this.onResponseClick.bind(this),this.onTryAgainClick=this.onTryAgainClick.bind(this),this.renderBackground=this.renderBackground.bind(this),this.renderButton=this.renderButton.bind(this),this.renderDetails=this.renderDetails.bind(this),this.renderDialogues=this.renderDialogues.bind(this),this.renderEnd=this.renderEnd.bind(this),this.renderPose=this.renderPose.bind(this),this.renderResponse=this.renderResponse.bind(this),this.renderText=this.renderText.bind(this),this.renderAudioMedia=this.renderAudioMedia.bind(this),this.renderDialogueWithAudioPositioning=this.renderDialogueWithAudioPositioning.bind(this),this.renderTextWithAudioPositioning=this.renderTextWithAudioPositioning.bind(this),this.resetSlide=this.resetSlide.bind(this),this.resetSlides=this.resetSlides.bind(this),this.setNextSlide=this.setNextSlide.bind(this),this.dynamicRefs.current={},this.setupFadeObserver=this.setupFadeObserver.bind(this)}setupFadeObserver(t){if(!t)return;const s=this.fadeObservers.get(t);s&&(s.observer.disconnect(),t.removeEventListener("scroll",s.scrollHandler),this.fadeObservers.delete(t));const o=Array.from(t.children).find(d=>d.className.includes("-bottom"));if(!o)return;const r=t.parentElement?.classList.contains("scenario-block__dialogue__bubble")||t.parentElement?.classList.contains("scenario-block__dialogue__pane")?t.parentElement:t,a=()=>{const{scrollHeight:d,clientHeight:h}=t;return d>h+2},i=d=>{const h=d?.[0]?.isIntersecting??!1,m=a();m?r.classList.add("has-overflow"):r.classList.remove("has-overflow"),!h&&m?r.classList.add("show-fade"):r.classList.remove("show-fade")},c=new IntersectionObserver(i,{root:t,threshold:[0,1]}),l=()=>{};this.fadeObservers.set(t,{observer:c,scrollHandler:l}),c.observe(o)}componentDidMount(){const{initialState:t,items:s}=this.props,o=Pe()(zr()("poses"),ks()({},"character"),dp);Ka(s)&&!o(s)&&this.fetchCharacters(),t||this.resetSlides(),window.addEventListener("resize",this.onResize),window.addEventListener(Ge,this.handleNavEvent)}handleNavEvent(t){const{path:s}=t.detail,{blockId:o,sceneId:r,slideId:a,responseId:i}=pa(s,["block","scene"]),c=s.at(-1)==="feedback";if(o!==this.props.blockId)return;const l=lp(this.props.items.findIndex(m=>m.id===r)),d=l!==null?lp(this.props.items[l].slides.findIndex(m=>m.id===a)):null,h=d!==null?lp(this.props.items[l].slides[d].responses.findIndex(m=>m.id===i)):null;this.setState({activeScene:l??0,activeSlide:d??0},()=>{l!==null&&d!==null&&this.setState({slides:{...this.state.slides,[`${l}.${d}`]:{...this.state.slides[`${l}.${d}`],hasFeedback:c,response:h}}})})}componentDidUpdate(){const{items:t,onStep:s}=this.props,{activeScene:o,activeSlide:r}=this.state,a=yt()([],[o,"slides"],t),i=yt()(null,[r,"goTo"],a),c=yt()(null,[r,"type"],a);if(s&&(i==="end"&&c==="text"||!i&&!c)&&B6()(s,t),this.shouldFocus){this.shouldFocus=!1;const m=this.scenarioRef.current?.querySelector('[data-scenario-focus][tabindex="-1"]');m?m.focus():_m(this.scenarioRef.current)}this.fadeObservers.forEach(({observer:m,scrollHandler:f},v)=>{document.contains(v)||(m.disconnect(),v.removeEventListener("scroll",f),this.fadeObservers.delete(v))})}componentWillUnmount(){clearTimeout(this.continueRef),clearTimeout(this.feedbackRef),clearTimeout(this.resetRef),window.removeEventListener("resize",this.onResize),window.removeEventListener(Ge,this.handleNavEvent),this.fadeObservers.forEach(({observer:t,scrollHandler:s},o)=>{t.disconnect(),o.removeEventListener("scroll",s)}),this.fadeObservers.clear()}getActiveScene(){return this.getScene(this.state.activeScene)}getScene(t){const{items:s}=this.props;return s&&t>=0&&t<s.length?s[t]:null}fetchCharacterPose(t,s){const o=this.getScene(t),r=o?.slides,a=r&&s>=0&&s<r.length;if(!o||!r||!a)return{name:"",pose:null};const{character:i}=o,c=r[s],l=`${t}.${s}`,d=[l,"response"],h=[l,"hasFeedback"],m=yt()(null,d,this.state.slides),f=yt()(!1,h,this.state.slides),v=ks()("neutral","emotion",c),C=Zs()(Re()(f),yt()(v,["responses",m,"emotion"]),Re()(v)),g=Nt()(yt()(i?.poses?.neutral,["poses",C(c)]),z6);return{name:i?.name||"",pose:g(i)}}fetchCharacters(){const{getCharacter:t,items:s,onItemUpdate:o}=this.props,r=go()(["id","name","poses","src"]),a=c=>l=>o({itemId:c,payload:{character:l}}),i=({character:c,id:l})=>Ka(c)&&t(c.id).then(d=>ts()("poses",zee(d),d)).then(r).then(a(l));s.map(i)}isCharacterHidden(){const{items:t}=this.props,{activeScene:s,activeSlide:o}=this.state,a=this.getActiveScene()?.slides?.[o],i=o===null,c=t[s];return i?!(c?.slidesHaveCharacterByDefault??!1):a&&!a.hasCharacter}getCharacterPose(){const{items:t}=this.props,{activeScene:s,activeSlide:o,prevScene:r,prevSlide:a}=this.state,i=yt()([],[s,"slides"],t),c=yt()(!0,[o,"hasCharacter"],i);return $6(r)&&il()(c)?this.fetchCharacterPose(r,a):this.fetchCharacterPose(s,o)}onClick(t,s){const{items:o,onStep:r}=this.props,{activeScene:a,activeSlide:i}=this.state,c=this.getActiveScene()?.slides,l=ks()(null,"type",c?.[i])==="dialogue",d=a===o.length-1,h=i===(c?.length??0)-1,m={activeSlide:i+1},f={activeScene:a+1,activeSlide:0},v={activeSlide:null},C={activeScene:0,activeSlide:0},g=Nt()(F6(o),y=>({activeScene:y.scene,activeSlide:y.slide})),x=fs()([[Re()(h&&d),Re()(v)],[Re()(h&&!d),Re()(f)],[er(),Re()(m)]]),b=Zs()(Re()(l),Re()(v),Re()(C)),T=fs()([[ss()("slide"),$o()(g,[s])],[ss()("next"),x],[ss()("end"),b]]),L=()=>this.continueRef=setTimeout(this.setNextSlide,300);this.resetRef=setTimeout(this.resetSlide.bind(this,a,i),0),this.setState({prevScene:a,prevSlide:i}),this.setState(T(t),L),t==="end"&&this.resetSlides(),t==="end"&&r&&B6()(r,o)}onFocus(){this.shouldFocus=!0}onInit(){this.setState({initiated:!0})}onResize(){this.setState({resizes:this.state.resizes+1})}onResponseClick(t,s){const{activeScene:o,activeSlide:r,slides:a}=this.state,{getL10nValue:i,lessonId:c,blockId:l}=this.props,d=`${o}.${r}`,h=ts()("response",t),m=ts()("hasFeedback",!0),f=Dn()({[`${d}`]:h}),v=Dn()({[`${d}`]:m});s.media&&i(s.media)?.audio&&Ce.playerId===`audio-${c}-${l}`&&Ce.pause();const g=Pe()(v,f);this.setState({slides:f(a)},()=>{this.shouldFocus=!0,this.setState({slides:g(a)})})}onTryAgainClick(){const{activeScene:t,activeSlide:s,slides:o}=this.state,r=`${t}.${s}`,a=O6()({hasFeedback:null,response:null}),i=Dn()({[`${r}`]:a});this.setState({slides:i(o)})}render(){const{blockId:t,getL10nValue:s,isPDF:o,items:r,labels:a}=this.props,{activeScene:i,activeSlide:c,initiated:l}=this.state,h=this.getActiveScene()?.slides?.[c],m=Pe()(an,ks()({},"character"),dp),f=Pe()(zr()("poses"),ks()({},"character"),dp),v=Pe()(Xs(),yt()({},["character","poses"])),C=Pe()(Mc(),Xs(),gt()(v)),g=this.isCharacterHidden(),x=X()("scenario-block",{"scenario-block--initiated":l,"scenario-block--mobile":Yn.isMobile,"scenario-block--loading":m(r)&&!f(r),"scenario-block--character-hidden":g}),b=`scenario-live-${t}`,T={"aria-label":a?.a11yGroupScenario,"aria-describedby":b,className:x,ref:this.scenarioRef,role:"group",style:window.innerWidth<480?{height:window.innerHeight}:void 0},L=dt(s(r?.[0].background?.media)?.image),y=fs()([[At(),this.renderEnd],[Xe()("type","dialogue"),this.renderDialogues],[Xe()("type","text"),this.renderText],[er(),Re()(null)]]),S=X()("scenario-block__character",{"scenario-block__character--hidden":g}),k=`${i}.${c}`,N=this.state.slides[k],I=N?.hasFeedback?h?.responses?.[N?.response]?.alt:h?.alt,w=s(I);return(0,n.jsxs)("div",{children:[(0,n.jsxs)("div",{...T,"data-l10n-id":Pt(I),children:[(0,n.jsx)("div",{"aria-live":"polite",className:"visually-hidden-always",id:b,children:w}),(0,n.jsx)("div",{className:"scenario-block__spinner"}),(0,n.jsx)("div",{className:"scenario-block__background-wrapper",children:Ka(r)&&r.map(this.renderBackground)}),L&&(0,n.jsx)(xs,{alt:"",onLoad:this.onInit,src:L}),(0,n.jsxs)("div",{className:"scenario-block__inner",children:[(0,n.jsx)("div",{className:S,children:f(r)&&C(r).map(this.renderPose)}),(0,n.jsx)(Ko,{children:Ka(r)&&y(h)})]})]}),o&&h&&this.renderDetails(h)]})}renderBackground(t,s){const{activeScene:o}=this.state,{id:r,blurBackground:a}=t,i=this.props.getL10nValue(t?.background?.media)?.image,c=X()("scenario-block__background",{"scenario-block__background--active":o===s,"scenario-block__background--blur":a??!0}),l=dt(i);return l?(0,n.jsx)(xs,{alt:"",className:c,src:l},r):(0,n.jsx)(n.Fragment,{})}renderButton(t){const{labels:s}=this.props,{scenarioContinue:o,scenarioTryAgain:r}=s,{goTo:a,nextSlide:i}=t,c="action"in t?t.action:void 0,l={appear:!0,classNames:"scenario-block__dialogue__button-",nodeRef:this.buttonRef,timeout:{enter:0,exit:1e3}},d=c==="tryAgain"?(0,n.jsxs)("span",{children:[r," ",(0,n.jsx)("i",{className:"icon icon-reload"})]}):(0,n.jsx)("span",{children:o}),m={className:"scenario-block__dialogue__button",key:"button",onClick:c==="tryAgain"?Pe()(this.onFocus,this.onTryAgainClick):Pe()(this.onFocus,$o()(this.onClick,[a,i]))};return(0,n.jsx)(Ko,{children:(0,n.jsx)(Bn,{...l,children:(0,n.jsx)("button",{...m,type:"button",children:d})})})}renderDetails(t){const{items:s}=this.props,{activeScene:o,activeSlide:r}=this.state,{responses:a,type:i}=t,c=(m,f)=>(0,n.jsxs)("span",{children:[m," ",(0,n.jsx)(WB,{})," ",f]},m),l=Nt()(F6(s),m=>`Scene ${m.scene+1} Slide ${m.slide+1}`),d=(m,{goTo:f,nextSlide:v})=>fs()([[ss()("next"),$o()(c,[m,"Next Slide"])],[ss()("end"),$o()(c,[m,"End of Scenario"])],[er(),$o()(c,[m,l(v||{})])]])(f),h=i==="text"?d("Continue",t):a.map((m,f)=>d(f,m));return(0,n.jsxs)("div",{className:"scenario-block__pdf-details",children:[(0,n.jsxs)("h3",{children:["Scene ",o+1," Slide ",r+1]}),h]})}renderDialogue(t,s,o){const{description:r,id:a,hasCharacter:i}=s,c="type"in s?s.type:void 0,{count:l,firstKey:d,hasFeedback:h,slide:m,totalDialogues:f}=t,v=o===0?a:o,C=o===1?d:o-1,g=o===0&&l===1,x=o===l,b=c==="dialogue"&&(g||x),T=this.dynamicRefs.current[`dialogue-${v}`],L=x&&this.dynamicRefs.current[`dialogue-${C}`],y=T&&T.offsetHeight,S=x&&L&&L.offsetHeight,k=h?30:0,N=window.innerWidth<480?20:30,I=N*2+60+S-k,w=N+60-k,A=wee()(y+k-60),E=Rn.createRef(),{settings:j,getL10nValue:O}=this.props,R=j?.audioPosition,P=O(m.media),M=pn(P,R),H=M.renderOrder.indexOf("audio")<M.renderOrder.indexOf("text"),F=!!P?.audio,D=h&&o===f-1,V=X()("scenario-block__dialogue",{"scenario-block__dialogue--response":c==="response","scenario-block__dialogue--feedback":D,"scenario-block__dialogue--done":o<l-1,"scenario-block__dialogue--audio-top":H&&F}),W=fs()([[Re()(g),Re()(null)],[ss()(l),Re()({top:`${I}px`})],[ss()(l-1),Re()({top:`${w}px`})],[ss()(l-2),Re()({top:`${A}px`})],[er(),Re()({top:`-${y+30}px`})]]),_={className:V,ref:z=>{this.dynamicRefs.current[`dialogue-${v}`]=z},style:W(o)},Z={appear:!0,classNames:"scenario-block__dialogue-",nodeRef:E,key:o,timeout:{enter:400,exit:400}},oe=X()({"scenario-block__dialogue__bubble":i||c==="response","scenario-block__dialogue__pane":!i}),Q=this.props.getL10nValue(r)||"",U=c!=="response"&&!D&&F&&H&&(0,n.jsx)("div",{className:"audio-position-wrapper audio-position-wrapper--top",children:this.renderAudioMedia(m)}),B=(0,n.jsxs)("div",{className:oe,"data-scenario-focus":b?"":void 0,tabIndex:b?-1:void 0,children:[U,(0,n.jsxs)("div",{className:"scenario-block__dialogue__bubble__content",ref:this.setupFadeObserver,children:[c!=="response"&&!D?this.renderDialogueWithAudioPositioning(m,Q,M):(0,n.jsx)(ke,{value:Q}),(0,n.jsx)("div",{className:"scenario-block__dialogue__bubble-bottom"})]})]});return(0,n.jsx)(Bn,{...Z,children:(0,n.jsx)("div",{children:(0,n.jsx)("div",{..._,children:Ka(r)&&B})})})}renderDialogues(t){const{activeScene:s,activeSlide:o,slides:r}=this.state,{id:a,responses:i}=t,c=`${s}.${o}`,l=r[c]||{},h=Pe()(Mc(),Oee,qo()(l))(t),{hasFeedback:m,response:f}=l,{feedback:v}=i[f]||{},C=At()(f)&&an(i),g=m?h.length-1:h.length,x=(g===1&&Rt()(i)||g===2&&an(i))&&m,b={count:g,firstKey:yt()(null,[0,"id"],h),hasFeedback:m&&Ka(v),slide:t,totalDialogues:h.length},T={classNames:"scenario-block__content-",nodeRef:this.blockContentRef,timeout:{enter:0,exit:1e3}},L=(0,n.jsx)("div",{className:"scenario-block__dialogues__bottom",children:(0,n.jsx)("div",{className:"scenario-block__dialogues__bottom__inner",children:(0,n.jsx)("div",{className:"scenario-block__dialogues__responses",children:(0,n.jsx)(Ko,{component:"ol",role:"list",children:i.map((y,S)=>this.renderResponse(y,t,S))})})})});return(0,n.jsx)(Bn,{...T,children:(0,n.jsx)("div",{className:"scenario-block__dialogues scenario-block__content",children:(0,n.jsxs)("div",{className:"scenario-block__dialogues__inner",children:[(0,n.jsx)("div",{className:"scenario-block__dialogues__top",children:(0,n.jsx)("div",{className:"scenario-block__dialogues__top__inner",children:(0,n.jsx)(Ko,{children:h.map(this.renderDialogue.bind(this,b))})})}),C&&L,x&&this.renderButton(h[g-1])]})})},a)}renderEnd(){const{labels:t}=this.props,{scenarioComplete:s,scenarioStartOver:o}=t,r=Pe()(this.onFocus,$o()(this.onClick,["end",null])),a=X()(["scenario-block__text","scenario-block__text--end","scenario-block__content"]),i={classNames:"scenario-block__content-",nodeRef:this.endRef,timeout:{enter:0,exit:400}};return(0,n.jsx)(Bn,{...i,children:(0,n.jsx)("div",{className:a,children:(0,n.jsxs)("div",{className:"scenario-block__text__inner","data-scenario-focus":"",tabIndex:-1,children:[(0,n.jsx)("div",{className:"scenario-block__text__title",children:(0,n.jsx)("h2",{children:s})}),(0,n.jsxs)("button",{className:"scenario-block__text__end",onClick:r,type:"button",children:[(0,n.jsx)("span",{children:o}),(0,n.jsx)("i",{className:"icon icon-reload"})]})]})},"end")},"end")}renderPose(t,s){const{pose:o}=this.getCharacterPose(),{filters:r,id:a}=t,i=z6(t),c=af()(Xe()("name","style")),l=c(Xe()("value","left_aligned")),d=c(Xe()("value","right_aligned")),h=X()("scenario-block__character__inner",{"scenario-block__character__inner--active":o===i,"scenario-block__character__inner--right":mr()(d,r),"scenario-block__character__inner--left":mr()(l,r)});return(0,n.jsx)("div",{className:h,"data-pose-id":a,children:(0,n.jsx)(xs,{alt:"",src:i})},`pose-${s}-${a}`)}renderResponse({description:t},s,o){const{isPDF:r}=this.props,a=r?Wee:Pe()(this.onFocus,$o()(this.onResponseClick,[o,s])),i=v=>{const g=v.currentTarget.querySelector(".scenario-block__response__inner");if(g){const x=g.getBoundingClientRect();if(v.clientX>x.right-16){v.preventDefault();return}}a(v)},c=v=>{const g=v.currentTarget.querySelector(".scenario-block__response__inner");if(g){const x=g.getBoundingClientRect();v.clientX>x.right-16?g.classList.add("hovering-scrollbar"):g.classList.remove("hovering-scrollbar")}},l=v=>{const g=v.currentTarget.querySelector(".scenario-block__response__inner");g&&g.classList.remove("hovering-scrollbar")},d=X()(["scenario-block__response",`scenario-block__response--${o}`]),h=X()("scenario-block__response-item",`scenario-block__response-item--${o}`),m={appear:!0,classNames:"scenario-block__response-item-",nodeRef:this.responseItemRef,timeout:{enter:0,exit:1e3}},f=(0,n.jsx)("button",{className:d,onClick:i,onMouseLeave:l,onMouseMove:c,type:"button",children:(0,n.jsxs)("div",{className:"scenario-block__response__inner",ref:this.setupFadeObserver,children:[(0,n.jsx)("div",{className:"scenario-block__response__number",children:o+1}),(0,n.jsx)(ke,{value:t}),(0,n.jsx)("div",{className:"scenario-block__response__inner-bottom"})]})});return(0,n.jsx)(Bn,{...m,children:(0,n.jsx)("li",{className:h,role:"listitem",children:f})},o)}renderText(t){const{description:s,goTo:o,hasCharacter:r,id:a,nextSlide:i}=t,c=this.props.getL10nValue(t.title),l=this.props.getL10nValue(s)||"",{labels:d,settings:h,getL10nValue:m}=this.props,{scenarioContinue:f,scenarioStartOver:v}=d,C=!s&&(c||"").length<22,g=h?.audioPosition,x=m(t.media),b=pn(x,g),T=b.renderOrder.indexOf("audio")<b.renderOrder.indexOf("text"),L=!!x?.audio,y=X()("scenario-block__text","scenario-block__content",{"scenario-block__text--no-character":!r,"scenario-block__text--short":C,"scenario-block__text--audio-top":T&&L}),S={classNames:"scenario-block__content-",nodeRef:this.textRef,timeout:{enter:0,exit:400}},k=h?.headingLevel,N=k?`h${k}`:"h2",I=`scenario-title-${a}`,w=`scenario-description-${a}`,A=`${I} ${w}`,E=X()("scenario-block__text__inner",{"scenario-block__text__inner--end":o==="end"}),j=X()("scenario-block__text__title",{"scenario-block__text__title--end":o==="end"}),O=(0,n.jsx)("div",{className:j,"data-l10n-id":Pt(t.title),id:I,children:(0,n.jsx)(N,{children:c})}),R=L&&T&&(0,n.jsx)("div",{className:"audio-position-wrapper audio-position-wrapper--top",children:this.renderAudioMedia(t)}),P=(0,n.jsx)("div",{className:"scenario-block__text__description",id:w,ref:this.setupFadeObserver,children:this.renderTextWithAudioPositioning(t,l,b)}),M=Pe()(this.onFocus,$o()(this.onClick,[o,i])),H=(0,n.jsx)("button",{"aria-describedby":A,className:"scenario-block__text__continue",onClick:M,type:"button",children:(0,n.jsx)("span",{children:f})}),F=(0,n.jsxs)("button",{"aria-describedby":A,className:"scenario-block__text__end",onClick:M,type:"button",children:[(0,n.jsx)("span",{children:v}),(0,n.jsx)("i",{className:"icon icon-reload"})]});return(0,n.jsx)(Bn,{...S,children:(0,n.jsx)("div",{className:y,children:(0,n.jsxs)("div",{className:E,"data-scenario-focus":"",tabIndex:-1,children:[c&&O,R,s&&P,o==="end"?F:H]})},a)},a)}renderAudioMedia(t){const{blockId:s,getL10nValue:o,labels:r,lessonId:a,items:i,settings:c}=this.props,l=o(t.media),d=i?.[this.state.activeScene];return l?(0,n.jsx)(Xt,{blockId:s,index:s,item:t,labels:r,lessonId:a,lessonNumber:a,media:l,refs:`items:${s}/items:${d.id}/slides:${t.id}`,shouldPause:t.type!=="dialogue",volumeSliderPosition:c?.audioPosition==="top"?"below":"above"}):null}renderDialogueWithAudioPositioning(t,s,o){const r=o.renderOrder.indexOf("audio")<o.renderOrder.indexOf("text");return(0,n.jsxs)(n.Fragment,{children:[o.renderOrder.map((a,i)=>{if(a==="text")return(0,n.jsx)("div",{children:(0,n.jsx)(ke,{value:s})},`text-${i}`);if(a==="audio"&&!r){const c=this.renderAudioMedia(t);return c?(0,n.jsx)("div",{children:c},`audio-${i}`):null}return null}),(0,n.jsx)("div",{className:"scenario-block__dialogue__bubble-bottom"})]})}renderTextWithAudioPositioning(t,s,o){const r=o.renderOrder.indexOf("audio")<o.renderOrder.indexOf("text");return(0,n.jsxs)(n.Fragment,{children:[o.renderOrder.map((a,i)=>{if(a==="text")return(0,n.jsx)("div",{children:(0,n.jsx)(ke,{value:s})},`text-${i}`);if(a==="audio"&&!r){const c=this.renderAudioMedia(t);return c?(0,n.jsx)("div",{children:c},`audio-${i}`):null}return null}),(0,n.jsx)("div",{className:"scenario-block__text__description-bottom"})]})}resetSlide(t,s){const{slides:o}=this.state,r=`${t}.${s}`,a={hasFeedback:!1,response:null};this.setState({slides:ts()(r,a,o)})}resetSlides(){const{items:t}=this.props,s=r=>(a,i,c)=>{const{type:l,responses:d=[]}=i,h=l==="dialogue"&&d.length===0;return ts()(`${r}.${c}`,{hasFeedback:h,response:null},a)},o=(r,a,i)=>Nt()(ks()([],"slides"),V6(s(i),{}),O6()(r))(a);this.setState({slides:V6(o,{},t)})}setNextSlide(){const{activeScene:t,activeSlide:s,slides:o}=this.state,r=this.getActiveScene()?.slides;if(!r)return;const{responses:a=[],type:i}=r[s]||{},c=`${t}.${s}`,l=ts()("hasFeedback",!0),d=Dn()({[c]:l});i==="dialogue"&&Rt()(a)&&(this.shouldFocus=!0,this.setState({slides:d(o)}))}shouldComponentUpdate(t,s){return t.items!==this.props.items||t.settings!==this.props.settings||s.activeScene!==this.state.activeScene||s.activeSlide!==this.state.activeSlide||s.initiated!==this.state.initiated||s.resizes!==this.state.resizes||s.slides!==this.state.slides||t.labels!==this.props.labels}}const Gee=e=>{const t=Ot();return(0,n.jsx)(_ee,{...e,getL10nValue:t})};function Wee(){}var Kee=p(82920);class Qee extends Kee.Component{render(){const{animateBlockEntrance:t,isLearner:s,previewType:o,initiallyVisible:r}=this.props,a=!At()(o),l={animateBlockEntrance:a,animateIn:t?"fadeIn":"none",duration:a&&t?1:0,initiallyVisible:r,isLearner:s};return(0,n.jsx)(Ee,{className:"block-scenario",children:(0,n.jsx)(Be,{...l,children:(0,n.jsx)(Gee,{...this.props})})})}}var Yee=p(10608),lu=p.n(Yee);function Zee(e){e&&(e.addEventListener("touchstart",Vo,!0),e.addEventListener("touchmove",Vo,!0),e.addEventListener("touchcancel",Vo,!0),e.addEventListener("touchend",Vo,!0))}function Xee(e){e&&(e.removeEventListener("touchstart",Vo,!0),e.removeEventListener("touchmove",Vo,!0),e.removeEventListener("touchcancel",Vo,!0),e.removeEventListener("touchend",Vo,!0))}function Vo(e){e?.stopPropagation?.()}const Qa=$("playing-card"),U6=({id:e,isDeckTopCard:t,title:s,ref:o})=>{const[r,a]=(0,u.useState)(!1),[i,c]=(0,u.useState)(!1),[l,d]=(0,u.useState)({x:0,y:0}),[h,m]=(0,u.useState)(!0),[f,v]=(0,u.useState)(!1),[C,g]=(0,u.useState)(0),x=Mt(),b=Ot(),T=rs(),L=(0,u.useRef)(null),y=(0,u.useRef)(null),S=(0,u.useRef)(void 0),k=(0,u.useRef)(void 0),N=(0,u.useRef)(!1),I=(0,u.useCallback)(()=>{const{innerWidth:F}=window,D=L.current&&L.current.scrollHeight>L.current.clientHeight,V=F<C;D&&F>C&&g(F),v(D||V)},[C]),w=(0,u.useRef)(()=>{a(!0),c(!1)}),A=(0,u.useRef)(()=>{a(!1)});(0,u.useImperativeHandle)(o,()=>({onStartSortAttempt:w.current,onEndSortAttempt:A.current})),(0,u.useEffect)(()=>{const F=setTimeout(()=>{m(!1)},300);return()=>clearTimeout(F)},[]),(0,u.useEffect)(()=>{const F=y.current;if(!F)return;const D=()=>{a(!0),c(!1)},V=({dx:_,dy:Z})=>{d(oe=>({x:oe.x+_,y:oe.y+Z}))},W=()=>{a(!1)};return w.current=D,A.current=W,Zee(F),wn(F).draggable({inertia:!0,autoScroll:!1,modifiers:[wn.modifiers.snap({targets:[(_,Z)=>({x:_,y:Z})],range:1/0,endOnly:!0,relativePoints:[{x:.5,y:.5}]})]}).on("dragstart",D).on("dragmove",V).on("dragend",W),I(),S.current=Zd()(I,250),window.addEventListener("resize",S.current),()=>{Xee(F),wn(F).off("dragstart",D).off("dragmove",V).off("dragend",W),S.current&&(S.current.cancel(),window.removeEventListener("resize",S.current)),clearTimeout(k.current)}},[I]),(0,u.useEffect)(()=>{I()},[e,I]),(0,u.useEffect)(()=>{const F=N.current;N.current=r,F&&!r&&(c(!0),clearTimeout(k.current),k.current=setTimeout(()=>{d({x:0,y:0}),c(!1)},300))},[r]);const E=T?.backgroundType===ne.ACCENT||T?.backgroundType===ne.IMAGE,j=`translate3d(${l.x}px, ${l.y}px, 0)`,O={WebkitTransform:j,transform:j},R=Qa("title",{"is-max-length":f}),P=Qa({draggable:!0,moving:r,fail:i,reset:h}),M=E?Qa("content"):Qa("content").mix("brand--border"),H=b(s)??"";return(0,n.jsxs)("div",{"aria-hidden":!t,className:P,id:e.toString(),onMouseDown:F=>{F.preventDefault()},ref:y,style:O,children:[t&&(0,n.jsx)("div",{className:"visually-hidden-always",children:`${x?.a11ySortingCurrentItem}: ${H}`}),(0,n.jsxs)(Gt,{"aria-hidden":"true",className:M,children:[(0,n.jsx)(ke,{className:R,id:`card-title-${e}`,ref:L,value:s}),(0,n.jsx)("div",{className:Qa("handle")}),(0,n.jsx)("div",{className:Qa("status"),children:(0,n.jsx)("i",{className:"icon icon-check"})})]})]},`card-${e}`)},du=$("restart-button");function qee({allowTabNavigation:e=!0,onClick:t,onFocus:s=Kt,ref:o,text:r}){const a=du({}).mix("button");return(0,n.jsx)("button",{"aria-hidden":!e,className:a,"data-testid":"quiz-take-again-button",onClick:t,onFocus:s,ref:o,tabIndex:FZ(e),type:"button",children:(0,n.jsxs)("div",{className:du("content"),children:[(0,n.jsx)("span",{className:du("text").mix("brand--ui"),children:r}),(0,n.jsx)("i",{"aria-hidden":"true",className:du("icon").mix("icon").mix("icon-reload")})]})})}const Jee=qee,xc=$("deck"),ete=e=>e?.percentViewed===100,tte=(e,t)=>`${e?.correctlyAnswered??0}/${t}`,ste=(e,t)=>String(t?.lastIncorrectCardId)===String(e.id),nte=({count:e,items:t,id:s,onReplay:o,progress:r,ref:a})=>{const i=Mt(),c=(0,u.useRef)([]),l=(0,u.useRef)(null);(0,u.useImperativeHandle)(a,()=>({startKeyDrop(){c.current[0]?.onStartSortAttempt()},endKeyDrop(){c.current[0]?.onEndSortAttempt()},focusReplayButton(){l.current?.focus()}}));const d=ete(r),h=tte(r,e),m=()=>{o?.({id:s})};return(0,n.jsxs)("div",{className:xc({complete:r?.percentViewed===100}),children:[(0,n.jsx)("div",{className:xc("spacer")}),d&&(0,n.jsxs)("div",{className:xc("cardholder"),children:[(0,n.jsxs)("div",{className:xc("title").mix("brand--ui"),children:[h," ",i?.sortingCardsCorrect]}),(0,n.jsx)(Jee,{allowTabNavigation:d,onClick:m,ref:l,text:i?.sortingReplay??""})]}),(0,n.jsx)("div",{className:xc("content"),children:t.map((f,v)=>(0,n.jsx)(U6,{id:f.id,isDeckTopCard:c.current[v]===c.current[0],isIncorrect:ste(f,r),ref:C=>{c.current[v]=C},title:f.title},f.id))})]})},Ar=$("pile"),ote=({id:e,lessonId:t,deckTopCard:s,nextCard:o,isComplete:r=!1,onCardDrop:a,onNavigateToNext:i,onNavigateToPrevious:c,onKeyDropStart:l,onKeyDropEnd:d,title:h,ref:m})=>{const[f,v]=(0,u.useState)(void 0),[C,g]=(0,u.useState)(!1),[x,b]=(0,u.useState)(!0),[T,L]=(0,u.useState)(!1),[y,S]=(0,u.useState)(!1),[k,N]=(0,u.useState)(0),I=(0,u.useRef)(null),w=(0,u.useRef)(null),A=(0,u.useRef)(null),E=(0,u.useRef)(void 0),j=(0,u.useRef)(void 0),O=(0,u.useRef)(void 0),R=(0,u.useRef)(void 0),P=(0,u.useRef)(void 0),M=Mt(),H=Ot(),{announcePolite:F}=bn(),D=(0,u.useEffectEvent)(()=>{if(r||!s)return;const Y=s.id.toString(),J=s.pileId===e;a?.({id:t,itemId:Y,isCorrect:J});const q=H(s.title)??"",ee=H(h)??"";if(J){clearTimeout(j.current),clearTimeout(O.current),clearTimeout(R.current),v(s),g(!0),b(!1),F(`${M?.a11ySortingCorrect}. ${q}, ${M?.a11ySortingCategory}: ${ee}`);const se=H(o?.title)??"";se&&(R.current=setTimeout(()=>{F(`${M?.a11ySortingNextItem}. ${se}`)},500)),j.current=setTimeout(()=>{v(void 0),g(!1)},1500),O.current=setTimeout(()=>{b(!0)},1300)}else clearTimeout(j.current),clearTimeout(O.current),clearTimeout(R.current),v(void 0),g(!1),b(!0),F(M?.a11ySortingIncorrect??"")});(0,u.useImperativeHandle)(m,()=>({focus(){w.current?.focus()}}));const V=(0,u.useCallback)(()=>{const{innerWidth:Y}=window,J=I.current&&I.current.scrollHeight>(I.current.offsetParent?.clientHeight??0),q=Y<k;J&&Y>k&&N(Y),S(J||q)},[k]),W=(0,u.useCallback)(()=>{if(r||!s)return;l?.();const Y=s.id.toString(),J=s.pileId===e;a?.({id:t,itemId:Y,isCorrect:J});const q=H(s.title)??"",ee=H(h)??"";if(J){clearTimeout(j.current),clearTimeout(O.current),clearTimeout(R.current),v(s),g(!0),b(!1),F(`${M?.a11ySortingCorrect}. ${q}, ${M?.a11ySortingCategory}: ${ee}`);const se=H(o?.title)??"";se&&(R.current=setTimeout(()=>{F(`${M?.a11ySortingNextItem}. ${se}`)},500)),j.current=setTimeout(()=>{v(void 0),g(!1)},1500),O.current=setTimeout(()=>{b(!0)},1300)}else clearTimeout(j.current),clearTimeout(O.current),clearTimeout(R.current),v(void 0),g(!1),b(!0),F(M?.a11ySortingIncorrect??"")},[r,s,o,e,t,M,h,H,l,a,F]),_=(0,u.useCallback)(Y=>{Kn(Y)?Dx(()=>c?.())(Y):Qn(Y)&&Dx(()=>i?.())(Y)},[c,i]),Z=(0,u.useCallback)(()=>{r||(W(),clearTimeout(P.current),P.current=setTimeout(()=>d?.(),100))},[W,d,r]),oe=(0,u.useCallback)(()=>{L(!0)},[]),Q=(0,u.useCallback)(()=>{L(!1)},[]);(0,u.useEffect)(()=>{const Y=A.current;if(!Y)return;const J=se=>{const te=wn.getElementRect(se.target),ye={x:te.left+te.width/2,y:te.top+te.height/2};se.draggable.draggable({snap:{targets:[ye]}})},q=se=>{se.draggable.draggable({snap:{targets:[(te,ye)=>({x:te,y:ye})]}})},ee=se=>{se.draggable.draggable({snap:{targets:[(te,ye)=>({x:te,y:ye})]}}),se.stopPropagation?.(),se.preventDefault?.(),D()};return wn(Y).dropzone({overlap:"pointer"}).on("dragenter",J).on("dragleave",q).on("drop",ee),V(),E.current=Zd()(V,250),window.addEventListener("resize",E.current),()=>{wn(Y).off("dragenter",J).off("dragleave",q).off("drop",ee),clearTimeout(j.current),clearTimeout(O.current),clearTimeout(R.current),clearTimeout(P.current),E.current&&(E.current.cancel(),window.removeEventListener("resize",E.current))}},[]);const U=X()(Ar(),{"drop-success":C,complete:r}),B=X()(Ar("content"),{"drop-animating":!x&&!T}),z=Ar("title",{"is-max-length":y}),K=H(h)??M?.a11ySortingCategories??"Categories";return(0,n.jsx)("div",{className:U,ref:A,children:(0,n.jsx)("div",{className:Ar("wrapwrap"),children:(0,n.jsxs)(Gt,{className:Ar("wrap"),overrideBackground:!0,children:[(0,n.jsx)("div",{"aria-hidden":"true",className:Ar("message"),children:(0,n.jsx)(ke,{className:z,ref:I,value:h})}),(0,n.jsx)("button",{"aria-disabled":r,"aria-label":K,className:B,disabled:r,onBlur:Q,onClick:Z,onFocus:oe,onKeyDown:_,ref:w,type:"button",children:f&&(0,n.jsx)(U6,{id:f.id,title:f.title})}),(0,n.jsx)("div",{className:Ar("background")})]})})})},up=$("sorting"),rte=(e,t)=>!t||!t.items?e:e.filter(s=>!t.items?.[s.id]?.isViewed),ate=({id:e,items:t,piles:s,onCardDrop:o,onReplay:r,progress:a})=>{const[i,c]=(0,u.useState)(()=>lu()(t)),[l,d]=(0,u.useState)(!1),h=(0,u.useRef)([]),m=(0,u.useRef)(null),f=(0,u.useRef)(a?.retryAttempts),v=(0,u.useRef)(a?.percentViewed),C=(0,u.useRef)(void 0),g=(0,u.useRef)(void 0),x=(0,u.useRef)(void 0),b=Mt(),T=Ot(),{announcePolite:L}=bn(),y=(0,u.useEffectEvent)(()=>{h.current[0]?.focus()}),S=(0,u.useEffectEvent)(()=>{const j=a?.correctlyAnswered??0,O=t.length;L(`${j} ${b?.a11ySortingCompleteOf} ${O} ${b?.a11ySortingComplete}`)}),k=(0,u.useEffectEvent)(()=>{m.current?.focusReplayButton()});(0,u.useEffect)(()=>{const j=O=>{const{blockId:R,cardId:P}=pa(O.detail.path,["block","card"]);e!==R||!P||c(M=>{const H=M.find(D=>D.id===P),F=M.filter(D=>D.id!==P);return H?[H,...F]:M})};return window.addEventListener(Ge,j),()=>{window.removeEventListener(Ge,j)}},[e]),(0,u.useEffect)(()=>{const j=a?.retryAttempts,O=f.current;return j!==O?(f.current=j,c(lu()(t)),clearTimeout(C.current),C.current=setTimeout(()=>{y()},100)):c(R=>{const P=t.filter(F=>!R.find(D=>D.id===F.id));return[...R.filter(F=>t.find(D=>D.id===F.id)).map(F=>{const D=t.find(V=>V.id===F.id);return D?{...F,...D}:F}),...P]}),()=>{clearTimeout(C.current)}},[t,a?.retryAttempts]),(0,u.useEffect)(()=>{const j=a?.percentViewed,O=v.current;return j===100&&O!==100&&(d(!0),clearTimeout(g.current),g.current=setTimeout(()=>{S()},500),clearTimeout(x.current),x.current=setTimeout(()=>{k()},100)),j!==100&&O===100&&d(!1),v.current=j,()=>{clearTimeout(g.current),clearTimeout(x.current)}},[L,a?.correctlyAnswered,a?.percentViewed,t.length]);const N=rte(i,a),I=b?.sortingLandmark??"",w=N?.[0],A=w?T(w.title)??"":"",E=l?b?.a11ySortingCategoriesComplete:A?`${b?.a11ySortingCategories}. ${A}`:b?.a11ySortingCategories;return(0,n.jsxs)("div",{"aria-label":I,className:up(),role:"group",children:[(0,n.jsx)("div",{className:up("row"),children:(0,n.jsx)(nte,{count:i.length,id:e,items:N,onReplay:r,progress:a,ref:m})}),(0,n.jsx)("ul",{"aria-label":E,className:up("row"),role:"list",children:s.map((j,O)=>(0,n.jsx)("li",{role:"listitem",children:(0,n.jsx)(ote,{deckTopCard:N?.[0],id:j.id,isComplete:l,lessonId:e,nextCard:N?.[1],onCardDrop:o,onKeyDropEnd:()=>{m.current?.endKeyDrop()},onKeyDropStart:()=>{m.current?.startKeyDrop()},onNavigateToNext:()=>HZ({list:h.current,currentIndex:O}),onNavigateToPrevious:()=>$Z({list:h.current,currentIndex:O}),ref:R=>{h.current[O]=R},title:j.title})},j.id))})]})},_6=()=>()=>{},ite=e=>{const{animateBlockEntrance:t,blockId:s,initiallyVisible:o,items:r,onCardDrop:a=_6,onReplay:i=_6,piles:c,progress:l}=e;return(0,n.jsx)(Ee,{type:"sorting-activity",children:(0,n.jsx)(Be,{animateBlockEntrance:t,initiallyVisible:o,isLearner:!0,children:(0,n.jsx)(ate,{id:s,items:r,onCardDrop:a(e),onReplay:i(e),piles:c,progress:yt()({},["items",s],l)})})})};class cte extends u.Component{static defaultProps={scope:"error-boundary"};constructor(t){super(t),this.state={hasError:!1,prevScope:t.scope}}static getDerivedStateFromError(t){return{hasError:!0,error:t}}static getDerivedStateFromProps(t,s){return s.prevScope!==t.scope?{hasError:!1,error:void 0,prevScope:t.scope}:s}componentDidCatch(t){Hn.L2.addError(t,{scope:this.props.scope},"source")}render(){const{hasError:t,error:s}=this.state,{FallbackComponent:o}=this.props;return t||s?(0,n.jsx)(o,{}):this.props.children}}const G6=cte,lte=[{name:"Abkhazian",code:"ab"},{name:"Afar",code:"aa"},{name:"Afrikaans",code:"af"},{name:"Akan",code:"ak"},{name:"Albanian",code:"sq"},{name:"American Sign Language",code:"sgn-us"},{name:"Amharic",code:"am"},{name:"Arabic",code:"ar"},{name:"Aramaic",code:"sam"},{name:"Armenian",code:"hy"},{name:"Assamese",code:"as"},{name:"Aymara",code:"ay"},{name:"Azerbaijani",code:"az"},{name:"Bangla",code:"bn"},{name:"Bashkir",code:"ba"},{name:"Basque",code:"eu"},{name:"Belarusian",code:"be"},{name:"Bhojpuri",code:"bho"},{name:"Bislama",code:"bi"},{name:"Bosnian",code:"bs"},{name:"Breton",code:"br"},{name:"Bulgarian",code:"bg"},{name:"Burmese",code:"my"},{name:"Cantonese (Hong Kong)",code:"yue"},{name:"Catalan",code:"ca"},{name:"Cherokee",code:"chr"},{name:"Chinese",code:"zh"},{name:"Chinese (China)",code:"zh-cn"},{name:"Chinese (Hong Kong)",code:"zh-hk"},{name:"Chinese (Simplified)",code:"zh-hans"},{name:"Chinese (Singapore)",code:"zh-sg"},{name:"Chinese (Taiwan)",code:"zh-tw"},{name:"Chinese (Traditional)",code:"zh-hant"},{name:"Choctaw",code:"cho"},{name:"Corsican",code:"co"},{name:"Croatian",code:"hr"},{name:"Czech",code:"cs"},{name:"Danish",code:"da"},{name:"Dutch",code:"nl"},{name:"Dutch (Belgium)",code:"nl-be"},{name:"Dutch (Netherlands)",code:"nl-nl"},{name:"Dzongkha",code:"dz"},{name:"English",code:"en"},{name:"English (Canada)",code:"en-ca"},{name:"English (Ireland)",code:"en-ie"},{name:"English (United Kingdom)",code:"en-gb"},{name:"English (United States)",code:"en-us"},{name:"Esperanto",code:"eo"},{name:"Estonian",code:"et"},{name:"Faroese",code:"fo"},{name:"Fijian",code:"fj"},{name:"Filipino",code:"fil"},{name:"Finnish",code:"fi"},{name:"French",code:"fr"},{name:"French (Belgium)",code:"fr-be"},{name:"French (Canada)",code:"fr-ca"},{name:"French (France)",code:"fr-fr"},{name:"French (Switzerland)",code:"fr-ch"},{name:"Fulah",code:"ff"},{name:"Galician",code:"gl"},{name:"Georgian",code:"ka"},{name:"German",code:"de"},{name:"German (Austria)",code:"de-at"},{name:"German (Germany)",code:"de-de"},{name:"German (Switzerland)",code:"de-ch"},{name:"Greek",code:"el"},{name:"Guarani",code:"gn"},{name:"Gujarati",code:"gu"},{name:"Haitian Creole",code:"ht"},{name:"Hakka Chinese",code:"hak"},{name:"Hakka Chinese (Taiwan)",code:"htia"},{name:"Hausa",code:"ha"},{name:"Hebrew",code:"he"},{name:"Hindi",code:"hi"},{name:"Hungarian",code:"hu"},{name:"Icelandic",code:"is"},{name:"Igbo",code:"ig"},{name:"Indonesian",code:"id"},{name:"Interlingua",code:"ia"},{name:"Interlingue",code:"ie"},{name:"Inuktitut",code:"iu"},{name:"Inupiaq",code:"ipk"},{name:"Irish",code:"ga"},{name:"Italian",code:"it"},{name:"Japanese",code:"ja"},{name:"Javanese",code:"jv"},{name:"Kalaallisut",code:"kl"},{name:"Kannada",code:"kn"},{name:"Kashmiri",code:"ks"},{name:"Kazakh",code:"kk"},{name:"Khmer",code:"km"},{name:"Kinyarwanda",code:"rw"},{name:"Klingon",code:"tlh"},{name:"Korean",code:"ko"},{name:"Kurdish",code:"ku"},{name:"Kyrgyz",code:"ky"},{name:"Lao",code:"lo"},{name:"Latin",code:"la"},{name:"Latvian",code:"lv"},{name:"Lingala",code:"ln"},{name:"Lithuanian",code:"lt"},{name:"Luxembourgish",code:"lb"},{name:"Macedonian",code:"mk"},{name:"Malagasy",code:"mg"},{name:"Malay",code:"ms"},{name:"Malayalam",code:"ml"},{name:"Maltese",code:"mt"},{name:"Manipuri",code:"mni"},{name:"Maori",code:"mi"},{name:"Marathi",code:"mr"},{name:"Masai",code:"mas"},{name:"Min Nan Chinese",code:"nan"},{name:"Min Nan Chinese (Taiwan)",code:"nan-tw"},{name:"Mizo",code:"lus"},{name:"Mongolian",code:"mn"},{name:"Nauru",code:"na"},{name:"Navajo",code:"nv"},{name:"Nepali",code:"ne"},{name:"Norwegian",code:"no"},{name:"Norwegian Bokm\xE5l",code:"nb"},{name:"Nyanja",code:"ny"},{name:"Occitan",code:"oc"},{name:"Odia",code:"or"},{name:"Oromo",code:"om"},{name:"Pashto",code:"ps"},{name:"Persian",code:"fa"},{name:"Persian (Afghanistan)",code:"fa-af"},{name:"Persian (Farsi)",code:"fa-ir"},{name:"Persian (Iran)",code:"pes"},{name:"Polish",code:"pl"},{name:"Portuguese",code:"pt"},{name:"Portuguese (Brazil)",code:"pt-br"},{name:"Portuguese (Portugal)",code:"pt-pt"},{name:"Punjabi",code:"pa"},{name:"Quechua",code:"qu"},{name:"Romanian",code:"ro"},{name:"Romansh",code:"rm"},{name:"Rundi",code:"rn"},{name:"Russian",code:"ru"},{name:"Samoan",code:"sm"},{name:"Sango",code:"sg"},{name:"Sanskrit",code:"sa"},{name:"Sardinian",code:"sc"},{name:"Scottish Gaelic",code:"gd"},{name:"Serbian",code:"sr"},{name:"Serbian (Cyrillic)",code:"sr-ba"},{name:"Serbian (Latin)",code:"sr-sp"},{name:"Sherdukpen",code:"sdp"},{name:"Shona",code:"sn"},{name:"Sicilian",code:"scn"},{name:"Sindhi",code:"sd"},{name:"Sinhala",code:"si"},{name:"Slovak",code:"sk"},{name:"Slovenian",code:"sl"},{name:"Somali",code:"so"},{name:"Southern Sotho",code:"st"},{name:"Spanish",code:"es"},{name:"Spanish (Latin America)",code:"es-419"},{name:"Spanish (Mexico)",code:"es-mx"},{name:"Spanish (Spain)",code:"es-es"},{name:"Spanish (United States)",code:"es-us"},{name:"Sundanese",code:"su"},{name:"Swahili",code:"sw"},{name:"Swati",code:"ss"},{name:"Swedish",code:"sv"},{name:"Tagalog",code:"tl"},{name:"Tajik",code:"tg"},{name:"Tamil",code:"ta"},{name:"Tatar",code:"tt"},{name:"Telugu",code:"te"},{name:"Tetum",code:"tet"},{name:"Thai",code:"th"},{name:"Tibetan",code:"bo"},{name:"Tigrinya",code:"ti"},{name:"Tongan",code:"to"},{name:"Tsonga",code:"ts"},{name:"Tswana",code:"tn"},{name:"Turkish",code:"tr"},{name:"Ukrainian",code:"uk"},{name:"Urdu",code:"ur"},{name:"Uzbek",code:"uz"},{name:"Vietnamese",code:"vi"},{name:"Volap\xFCk",code:"vo"},{name:"Voro",code:"vor"},{name:"Welsh",code:"cy"},{name:"Western Frisian",code:"fy"},{name:"Wolof",code:"wo"},{name:"Xhosa",code:"xh"},{name:"Yiddish",code:"yi"},{name:"Yoruba",code:"yo"},{name:"Zulu",code:"zu"}],dte=(0,u.lazy)(()=>p.e("webpack_container_remote_mondrian_learn-react").then(p.t.bind(p,4246,23))),ute={subscribe(e,t){const s=`mondrian:${e}`,o=()=>{Ce.isPlaying&&Ce.playerId!==s&&t()};return Ce.addChangeListener(o),()=>{Ce.removeChangeListener(o)}},play(e){const t=`mondrian:${e}`;Ce.playerId=t,Ce.isPlaying=!0}};function hte(e){const t={};return e.backgroundType==="IMAGE"&&(t["--color-background"]="transparent"),t.maxWidth=(e.contentWidth??9999)+"rem",t.minWidth="0",t.margin="0 auto",t.width="100%",t}function mte({blockumentId:e,manifest:t}){let s=920,o=600;try{const r=t.blockuments?.[e];if(r){const a=t.items?.[r.children[0]?.id];if(a){const i=a.states[a.initialState];if(i){const c=i.width.value,l=i.height.value;typeof c=="number"&&typeof l=="number"&&(s=c,o=l)}}}}catch{}return(0,n.jsx)("svg",{"aria-hidden":"true",className:"block-mondrian__fallback",height:o,width:s})}function fte({animateBlockEntrance:e=!0,initiallyVisible:t,blockumentId:s,isLearner:o=!1,settings:r,onStep:a,onTranscriptClose:i,onTranscriptOpen:c,onTranscriptUpdate:l,labels:d,transcriptPanelState:h}){const m=De(),f=m.mondrian,v=q0(),C={externalLinksDisabled:"externalLinksDisabled"in m?m.externalLinksDisabled:!1,isExternalLink:Vs},{currentLocale:g}=it(),x=nn(),b=ez(),T=(0,u.useMemo)(()=>({active:g,source:x}),[g,x]),L=(0,u.useCallback)(w=>h?.audioPlayerIdOpen===fn({refs:`items:${s}/items:${w}`}),[s,h?.audioPlayerIdOpen]),y=(0,u.useCallback)(({refocusTarget:w,itemId:A,transcript:E})=>{L(A)?i?.():c?.({audioPlayerId:fn({refs:`items:${s}/items:${A}`}),focusing:!0,refocusTarget:w,transcriptMedia:{mondrianTranscript:E}})},[s,L,i,c]),S=(0,u.useCallback)(({itemId:w,transcript:A})=>{h?.audioPlayerIdOpen&&l?.({audioPlayerId:fn({refs:`items:${s}/items:${w}`}),transcriptMedia:{mondrianTranscript:A}})},[s,l,h]),k=(0,u.useCallback)(w=>{l?.({audioPlayerId:fn({refs:`items:${s}/items:${w}`}),focusing:!0})},[s,l]),N=(0,u.useMemo)(()=>({isPanelOpenForItem:L,focusPanel:k,togglePanel:y,updateTranscript:S}),[k,L,y,S]),I=(0,u.useCallback)(w=>{if(a)for(const A of Object.values(w))A.progress>=100&&a({id:A.itemId})},[a]);return(0,n.jsx)(Ee,{children:(0,n.jsx)(G6,{FallbackComponent:vte,children:(0,n.jsx)(Be,{animateBlockEntrance:e,initiallyVisible:t,isLearner:o,children:(0,n.jsx)("div",{style:hte(r),children:(0,n.jsx)(u.Suspense,{fallback:(0,n.jsx)(mte,{blockumentId:s,manifest:f}),children:(0,n.jsx)(dte,{blockumentId:s,hoveredItemPath:b.translationHoveredPath,labels:d,languages:lte,linkRenderConfig:C,locale:T,manifest:f,mediaStoreAdapter:ute,onMediaProgress:I,runtimeInterface:window.Runtime,searchTerm:v?.term,transcriptPanelAdapter:N})})})})})})}const pte=(0,u.memo)(fte,gte);function gte(e,t){return e.blockumentId===t.blockumentId&&e.settings.backgroundType===t.settings.backgroundType&&e.settings.contentWidth===t.settings.contentWidth&&e.labels===t.labels&&e.transcriptPanelState?.audioPlayerIdOpen===t.transcriptPanelState?.audioPlayerIdOpen}function vte(){return null}const Cte=$("block-ai-scenario"),xte=(0,u.lazy)(()=>p.e("webpack_container_remote_ai_scenario_learner-player-react").then(p.t.bind(p,58812,23)));function bte({scenarioId:e,onExit:t}){return(0,n.jsx)(Ee,{className:Cte("wrapper"),children:(0,n.jsx)(G6,{FallbackComponent:Tte,children:(0,n.jsx)(u.Suspense,{children:(0,n.jsx)(xte,{onExit:t,scenarioId:e})})})})}const yte=(0,u.memo)(bte);function Tte(){return null}var W6=p(67750),st=p(82920);const Ft=$("block-code"),Lte=`${Ie("CDN_URI")}/assets/rise/assets/blocks/code_block_unavailable.svg`;function K6(e,t){const s=Q6(W6.parse(e.data));for(const o of s)if(o.type==="notification")t[o.method]?.(o.params);else throw new Error(`Unsupported RPC type "${o.type}"`)}function*Q6(e){if(Array.isArray(e))for(const t of e)yield*Q6(t);else yield e}function Y6(e,t,s){return st.useEffect(()=>{const r=new AbortController;return window.addEventListener("message",a=>{a.origin===window.origin&&t!=null&&e.current&&a.source===e.current.contentWindow&&K6(a,t)},{signal:r.signal}),()=>r.abort()},[t,e]),st.useCallback(r=>{e.current?.contentWindow?.postMessage(r,s)},[e,s])}const Ste=(e,t,s)=>Y6(e,s,window.origin),kte=(e,t,s)=>Y6(e,s,"*"),Nte=(e,t,s)=>{const[o,r]=st.useState(()=>new BroadcastChannel(t));return st.useEffect(()=>()=>o.close(),[o]),st.useEffect(()=>{o.name!==t&&r(new BroadcastChannel(t))},[o,t]),st.useEffect(()=>{const i=new AbortController;return o.addEventListener("message",c=>K6(c,s),{signal:i.signal}),()=>i.abort()},[o,s]),st.useCallback(i=>{o.postMessage(i)},[o])},Ite=Ja()?Yn.isLocalFilesystem?kte:Nte:Ste,Ete=window.location.origin==="";function jte(e){let t=Ete?"":"lib/sandbox/sandbox.html";return t+=`#channel=${encodeURIComponent(e)}`,t}function wte(e){return typeof e=="number"?`${e/10}rem`:"-1px"}const Ate={0:"small",1:"medium",2:"full"};function Rte({editBlock:e,errors:t,isDragPreview:s,isLearn:o,isSidebarPreview:r,items:a,labels:i,onClearErrors:c,onError:l,onStep:d,previewType:h,settings:m}){const f=st.useRef(null),C=De()?.htmlBlocksDisabled,g=s||r||!!h,[x]=a,b=Ae(x.srcdoc),T=Ae(x.media),L=T?.sandbox?.src==null?void 0:`${T.sandbox.src}/index.html`,y=m?.autoResize===!0,S=m?.width??"0",[k,N]=st.useState("-1px");st.useEffect(()=>{y||N(wte(m?.height))},[y,m?.height]);const[I,w]=st.useState(0),[A,E]=st.useState(!1),[j,O]=st.useState(!1),[R]=st.useState(()=>`rise-frontend-sandbox-${window.crypto.randomUUID()}`),P=jte(R),M=st.useCallback(()=>{d?.({id:x.id})},[x.id,d]),H=st.useCallback(({message:U})=>{l?.({message:U}),O(!0),console.error("Sandbox Error",U)},[l,O]),F=st.useCallback(()=>{c?.(),O(!1),w(U=>U+1)},[c]),D=st.useCallback(()=>{E(I>0)},[I]),V=st.useCallback(({height:U})=>{y&&N(`${U}px`)},[y]),W=st.useMemo(()=>({oncomplete:M,onerror:H,onload:D,onready:F,onresize:V}),[M,H,F,D,V]),_=Ite(f,R,W),Z=st.useCallback((U,B)=>{if(f==null&&I===0)throw new Error("Attempted to send message to sandbox before it is ready");const z=W6.format.notification(U,B);_(z)},[I,f,_]),oe=st.useCallback(()=>{window.location.reload()},[]),Q=st.useCallback(()=>{e?.()},[e]);return st.useEffect(()=>{I&&Z("onupdate",{autoResize:y,src:L,srcDoc:b})},[y,I,Z,L,b]),o&&t!=null||j?(0,n.jsx)(Ee,{children:(0,n.jsxs)("div",{className:Ft("error-general",{learn:o}),children:[(0,n.jsx)("div",{className:Ft("error-message"),children:"Something went wrong"}),(0,n.jsx)("div",{className:Ft("error-message-subtitle"),children:"There was an error loading this code block. Please contact your admin if the issue continues."}),(0,n.jsx)("button",{className:Ft("error-button"),onClick:oe,type:"button",children:"Refresh page"})]})}):t!=null&&Object.keys(t).length>0?(0,n.jsx)(Ee,{children:t[404]?(0,n.jsxs)("div",{className:Ft("error-404"),children:[(0,n.jsx)("div",{className:Ft("error-message"),children:"We couldn\u2019t find your file"}),(0,n.jsx)("div",{className:Ft("error-message-subtitle"),children:"Make sure your zip file contains an index.html file."}),(0,n.jsx)("button",{className:Ft("error-button"),onClick:Q,type:"button",children:"Retry upload"})]}):(0,n.jsxs)("div",{className:Ft("error-general"),children:[(0,n.jsx)("div",{className:Ft("error-message"),children:"Something went wrong"}),(0,n.jsxs)("div",{className:Ft("error-message-subtitle"),children:["Try refreshing the page or entering your code again. If the issue isn't fixed,"," ",(0,n.jsx)("a",{href:"https://community.articulate.com/group/code-block",rel:"noopener noreferrer",target:"_blank",children:"visit our community"}),"."]}),(0,n.jsx)("button",{className:Ft("error-button"),onClick:oe,type:"button",children:"Refresh page"})]})}):C&&!g?(0,n.jsx)(Ee,{children:(0,n.jsx)("div",{className:Ft("restricted"),children:(0,n.jsxs)("div",{className:Ft("restricted-card"),children:[(0,n.jsx)(pf,{alt:"",className:Ft("restricted-icon"),src:Lte}),(0,n.jsx)("div",{className:Ft("restricted-title"),children:"Subscribe to unlock full access"}),(0,n.jsx)("div",{className:Ft("restricted-message"),children:"To protect learners from phishing, scams, or malicious redirects, code blocks are disabled when sharing with Quick Share during your trial."})]})})}):(0,n.jsx)(Ee,{children:(0,n.jsx)("iframe",{allow:"fullscreen",className:Ft({"auto-resize":y,loaded:g||A,width:Ate[S]}),"data-rise-frontend-sandbox":"",loading:"lazy",ref:f,sandbox:"allow-forms allow-popups allow-same-origin allow-scripts",scrolling:y?"no":void 0,src:P,style:{"--block-html-height":k},title:i?.a11yBlockCode},R)})}const zo=$("timeline-card"),Pte=e=>{const{blockId:t,disableZoom:s,enableVideoPlaybackSpeed:o,isOverlayAudio:r,item:a,labels:i,lessonId:c,lessonNumber:l,mediaType:d,audioPosition:h}=e,{settings:m}=a,f=Ae(a.media)??{},v=d==="audio"&&f.audio,C=d==="embed"&&f.embed,g=d==="image"&&f.image,x=d==="video"&&f.video;if(!v&&!C&&!g&&!x&&!(d==="image-with-audio"&&r))return;const T=f.embed?Er(f.embed):void 0,L=!!f.image,y=!!f.audio,S=L?f.image.align:"center",k=zo("media",{audio:y&&!r,"audio-and-embed":!!(f.audio&&f.embed),"image-with-audio":r,[`image-with-audio-${S}`]:r&&!!S,"audio-on-bottom":y&&!r&&h==="bottom",linkEmbed:T==="link",videoEmbed:T==="video",visual:!r&&L||!At()(f.video)}),N=m||{};return(0,n.jsx)("div",{className:k,children:(0,n.jsx)(Xt,{blockId:t,enableVideoPlaybackSpeed:o,index:`${a.id}`,isOverlayAudio:r,item:a,labels:i,lessonId:c,lessonNumber:l,media:f,mediaType:r?void 0:d,opts:{disableZoom:s,...N}})})},Mte=e=>{const{headingLevel:t,innerRef:s,item:o,isActive:r,loadMedia:a,audioPosition:i,onFocus:c}=e,{id:l}=o,d=zo({active:r}),h=!!o.date,m=!!o.title,f=t||2,v=`h${f}`,C=`h${f+1}`,g=Ae(o.media)??{},x=pn(g,i,!0,"timeline"),b=()=>{if(!g||!a)return null;const T={audio:{item:{...o,media:x.audioOnlyMedia||g},mediaType:"audio"},image:{item:{...o,media:x.imageOnlyMedia||g},mediaType:"image"},video:{item:{...o,media:x.videoOnlyMedia||g},mediaType:"video"},embed:{item:{...o,media:x.embedOnlyMedia||g},mediaType:"embed"},overlay:{mediaType:"image-with-audio",isOverlayAudio:!0}};return(0,n.jsx)(n.Fragment,{children:x.renderOrder.map((L,y)=>{if(L==="text")return(0,n.jsx)(ke,{className:zo("description"),value:o.description},`text-${y}`);const S=T[L];return S?(0,u.createElement)(Pte,{...e,...S,key:`${L}-${y}`}):null})})};return(0,n.jsx)("div",{className:d,"data-id":l,ref:s,children:(0,n.jsx)(Gt,{className:zo("body"),onFocus:c,children:(0,n.jsx)("div",{className:zo("main-wrap"),children:(0,n.jsxs)("div",{className:zo("main"),children:[h&&(0,n.jsx)("div",{className:zo("date"),children:(0,n.jsx)(v,{children:(0,n.jsx)(gs,{value:o.date})})}),m&&(0,n.jsx)("div",{className:zo("title"),children:(0,n.jsx)(C,{children:(0,n.jsx)(gs,{value:o.title})})}),b()]})})})})},bc=$("timeline"),Ote=e=>{const{audioPosition:t,disableZoom:s,enableVideoPlaybackSpeed:o,headingLevel:r,id:a,initiallyVisible:i,isBlock:c,isLearner:l,item:d,labels:h,lessonId:m,onFocus:f}=e,v=(0,n.jsx)(Mte,{audioPosition:t,blockId:a,disableZoom:s,enableVideoPlaybackSpeed:o,headingLevel:r,isActive:!0,item:d,labels:h,lessonId:m,lessonNumber:a,loadMedia:!0,onFocus:f});return c?l?(0,n.jsx)(Be,{animateBlockEntrance:!0,className:bc("animate").toString(),initiallyVisible:i,isLearner:!0,children:v}):v:null},Bte=e=>{const{id:t,items:s,labels:o,onEnter:r=Function.prototype,settings:a={}}=e,i=(0,u.useRef)(null),c=(0,u.useCallback)((l,d)=>{r({id:t,payload:{activeIndex:l,itemId:d}})},[t,r]);return(0,u.useEffect)(()=>{function l(d){const{blockId:h,cardId:m}=pa(d.detail.path,["block","card"]);if(h!==t)return;const f=i.current.querySelector(`[data-id="${m}"]`);f&&!wm(f,"center")&&f.scrollIntoView({behavior:"instant",block:"center"})}return window.addEventListener(Ge,l),()=>{window.removeEventListener(Ge,l)}}),(0,n.jsx)("div",{"aria-label":o?.a11yBlockTimeline,className:"page__content-container",ref:i,role:"group",children:(0,n.jsx)("div",{className:bc("wrapper"),children:(0,n.jsx)("div",{className:bc(),children:(0,n.jsx)("ul",{className:bc("container"),role:"list",children:s.map((l,d)=>(0,n.jsx)("li",{className:bc("card-wrapper"),role:"listitem",children:Ote({index:d,item:l,onFocus:c,...e,disableZoom:!a.zoomOnClick,headingLevel:a.headingLevel,audioPosition:a.audioPosition})},d))})})})})},Dte=({animateBlockEntrance:e,blockId:t,enableVideoPlaybackSpeed:s,initiallyVisible:o,isLearner:r,items:a,labels:i,lessonId:c,settings:l})=>(0,n.jsx)(Be,{animateBlockEntrance:e,animateIn:"fadeIn",initiallyVisible:o,isLearner:r,children:(0,n.jsx)(Ee,{type:"timeline",children:(0,n.jsx)(Bte,{enableVideoPlaybackSpeed:s,id:t,initiallyVisible:o,isBlock:!0,isLearner:r,items:a,labels:i,lessonId:c,settings:l})})}),Uo=$("block-sequence"),Fte=({label:e})=>(0,n.jsx)("span",{className:Uo("indicator-label"),children:Ae(e)??""}),Hte=e=>(0,n.jsx)(Fte,{label:e.label}),$te=e=>(0,n.jsx)(ke,{className:Uo("description").toString(),value:e.description}),Vte=e=>{const{color:t,defaultBackgroundColor:s,items:o,renderDescription:r=$te,renderLabel:a=Hte,variant:i}=e,c=t?{"--block-sequence-color":t,"--block-sequence-on-color":Is(t)===Te.LIGHT?"#fff":"#000"}:void 0;return(0,n.jsx)(Ee,{className:Uo({[i]:!0}).toString(),defaultBackgroundColor:s,style:c,children:(0,n.jsx)("div",{className:Uo("container"),children:(0,n.jsx)("ol",{className:Uo("list"),"data-step-count":o.length,children:o.map((l,d)=>(0,n.jsxs)("li",{className:Uo("step"),"data-step-id":l.id,children:[(0,n.jsx)("div",{className:Uo("indicator"),children:a(l,d)}),(0,n.jsx)("div",{className:Uo("text"),children:r(l,d)})]},l.id))})})})},Pn=$("block-team"),zte=e=>(0,n.jsx)(ke,{className:Pn("name").toString(),value:e.name}),Ute=e=>(0,n.jsx)(ke,{className:Pn("role").toString(),value:e.description}),_te=({item:e,index:t,renderName:s,renderDescription:o})=>{const r=e.avatar?.image,a=ch(r);return(0,n.jsxs)("li",{className:Pn("card"),children:[(0,n.jsx)("div",{className:Pn("avatar-wrap"),children:a?(0,n.jsx)(xs,{alt:bo(r?.alt),className:Pn("avatar").toString(),src:a}):(0,n.jsx)("div",{className:Pn("avatar",{placeholder:!0}).toString()})}),(0,n.jsxs)("div",{className:Pn("body"),children:[s(e,t),o(e,t)]})]})},Gte=e=>{const{defaultBackgroundColor:t,items:s,renderName:o=zte,renderDescription:r=Ute}=e;return(0,n.jsx)(Ee,{className:Pn().toString(),defaultBackgroundColor:t,children:(0,n.jsx)("div",{className:Pn("container"),children:(0,n.jsx)("ul",{className:Pn("list"),"data-count":s.length,children:s.map((a,i)=>(0,n.jsx)(_te,{index:i,item:a,renderDescription:r,renderName:o},a.id))})})})},Wte=e=>(0,n.jsx)("div",{className:"unsupported-block",...e,children:(0,n.jsxs)("span",{children:["We no longer support this block, so you can safely delete it. If you have any questions, please"," ",(0,n.jsx)("a",{href:"https://access.articulate.com/support/contact",children:"contact Articulate Support."})]})});var Ls=p(30467),Kte=p(28565),Z6=p(70721),Qte=p(90090),X6=p.n(Qte);const o1e=(e,t)=>s=>{const o=s.findIndex(a=>a.id==t);if(o===-1)return s;const r=s.slice();return r[o]=e(s[o]),r},r1e=e=>t=>t.filter(s=>s.id!=e),a1e=(e,t)=>s=>{const o=s.slice(),[r]=o.splice(e,1);return o.splice(t,0,r),o};function Yte(e,t){const s=[];for(const o of t)if(s.push(o),e(o))break;return s}const Zte=e=>e.some(t=>t<0),q6=e=>Array.from(Array(e)),J6=(e,t)=>q6(t).map(()=>e),Xte=(e,t,s,o)=>q6(s).map((r,a)=>a===o?t:e),i1e=(e,t,s)=>s.some(o=>o[e]==t);function c1e(e,t,s){if(t>=s.length)return s.slice(0);const o=Math.floor(t/2),r=Math.ceil(t/2),a=e-o,i=e+r;return i>s.length?s.slice(s.length-t):a>=0?s.slice(a,i):s.slice(0,t)}const uu=(e,t)=>{const s=Math.min(e.length,t.length),o=new Array(s);for(let r=0;r<s;r++)o[r]=[e[r],t[r]];return o};var e5=p(94382);const qte=matchMedia("(forced-colors: active)");function yc(){return qte.matches}const Jte=({activeIndex:e,values:t,opts:s})=>{const{background:o,variant:r}=Bt(),{chartColor:a,lineCurve:i}=rs(),c=js(),l=gi(),d=s?.defaultFontColor,h=Tn(),m=h===ne.IMAGE,v=Ae(o?.media)?.image?.overlayColor??at.DARK,C=yc();let g=a??l,x=c||"#fff";!a&&h===ne.ACCENT||a===x?g=d:m&&(g=v===at.DARK?"#fff":"#000",x=v===at.DARK?"#000":"#fff"),C&&(g="Highlight",x="Canvas");let b=g,T=Array(t.length).fill(g);if(e!=null&&!C){const L=m&&v===at.LIGHT?.2:.7,y=(0,e5.A)(g,x,L);b=y,T=Xte(y,g,t.length,e)}return r==="bar"?{backgroundColor:T,data:t,hoverBackgroundColor:T}:{borderColor:b,cubicInterpolationMode:i==="linear"?"default":"monotone",data:t,lineTension:i==="linear"?0:void 0,pointBackgroundColor:T,pointBorderColor:T,pointBorderWidth:0,pointHitRadius:20,pointHoverBackgroundColor:g,pointHoverBorderColor:g,pointHoverBorderWidth:0,pointRadius:4}};function ese({activeIndex:e,children:t,opts:s,values:o}){const r=Jte({activeIndex:e,opts:s,values:o});return t(r)}class tse extends u.PureComponent{handleMouseEnter=()=>{this.props.onEvent(this.props.index)};handleMouseLeave=()=>{this.props.onEvent(null)};render(){const{activeIndex:t,identifier:s,index:o,label:r,value:a}=this.props,i=t!=null&&t!==o,c=X()("block-chart__cartesianLegendItem",{"block-chart__cartesianLegendItem--unfocused":i});return(0,n.jsxs)("div",{className:c,onMouseEnter:this.handleMouseEnter,onMouseLeave:this.handleMouseLeave,children:[(0,n.jsx)("dt",{className:"block-chart__cartesianLegendTerm",children:`${s}.`}),(0,n.jsxs)("dd",{className:"block-chart__cartesianLegendDefn","data-l10n-id":r.l10nId,children:[r.label,(0,n.jsx)("span",{className:"block-chart__cartesianLegendDefnPipe",role:"separator",children:"|"}),(0,n.jsx)("span",{className:"block-chart__cartesianLegendDefnVal",children:a})]})]})}}const sse=tse,nse=({activeIndex:e,labels:t,letters:s,onEvent:o,values:r})=>{const a=uu(s,uu(t,r));return a.length===0?null:(0,n.jsx)("dl",{className:"block-chart__cartesianLegend",children:a.map(([i,[c,l]],d)=>(0,n.jsx)(sse,{activeIndex:e,identifier:i,index:d,label:c,onEvent:o,value:l},i))})},ose=(0,u.memo)(nse);function rse(e){const t=this.getLabelForValue(e),s=15,o=t.split(" "),r=[];let a="";return o.forEach(i=>{(a+i).length>s?(r.push(a),a=i):a+=(a.length>0?" ":"")+i}),r.push(a),r}const ase={animation:{},barPercentage:.5,defaultFontFamily:'"lato", sans-serif',elements:{arc:{},bar:{},line:{borderWidth:2,fill:!1}},layout:{padding:{bottom:0,left:0,right:0,top:50}},maxBarThickness:60,plugins:{datalabels:{display:!1},legend:{display:!1,labels:{}},tooltip:{animation:!0,boxPadding:"14px 10px",callbacks:{label:()=>null,title:e=>{const{label:t,formattedValue:s}=e[0];return`${t}: ${s}`}},caretPadding:10,cornerRadius:3,displayColors:!1,titleFont:{weight:"normal"},titleMarginBottom:0,titleSpacing:0,xAlign:"center",yAlign:"bottom"}},responsive:!1,scales:{x:{border:{display:!1},grid:{display:!1,offset:!0},offset:!0,ticks:{autoSkip:!1,callback:rse,padding:10}},y:{beginAtZero:!0,border:{display:!1},grid:{drawTicks:!1},ticks:{maxTicksLimit:8,padding:15}}}};function ise({values:e,contrastColor:t}){const s=Bt(),o=Tn(),r=o===ne.IMAGE,a=(0,u.useMemo)(()=>Zte(e),[e]);let i,c;const d=Ae(s?.background?.media)?.image?.overlayColor??at.DARK,h=r&&d===at.LIGHT;switch(o){case ne.LIGHT:case ne.GRAY:case ne.TINT:[i,c]=["#e1e1e1","#c9c9c9"];break;case ne.DARK:case ne.BLACK:case ne.IMAGE:[i,c]=["#ffffff80","#ffffffe9"];break;case ne.ACCENT:case ne.COLOR:{[i,c]=t==="#000"?["#00000080","#0000001a"]:["#ffffff80","#ffffffe9"];break}}return r&&h&&([i,c]=["#00000080","#0000001a"]),a||(c=i),[i,c]}const cse=({onEvent:e,reduceMotion:t,shouldAnimate:s,values:o})=>{const r=js(),{customBackgroundColorContrast:a}=rs(),i=De(),c=gi(),l=i?.theme?.accentContrast,d=Tn(),h=d===ne.IMAGE,m=Bt(),f=yc(),v=Is(r),C=!a&&m?.family==="chart",g=a??Te.DARK,x=C?v:g,T=Ae(m?.background?.media)?.image?.overlayColor??at.DARK,L=h&&T===at.LIGHT,y=d===ne.ACCENT||d===ne.COLOR,S=d===ne.ACCENT?c:r,k=d===ne.ACCENT?l:x,N=zt({backgroundColor:S,contrast:k}),[I,w]=ise({values:o,contrastColor:N}),A=(0,u.useCallback)(j=>f&&h?L?"#000000":"#FFFFFF":j.tick.value===0?w:I,[I,f,w,h,L]);return(0,u.useMemo)(()=>{let j="#000";if(f)h?j=L?"#000000":"#FFFFFF":j="FieldText";else{switch(d){case ne.DARK:case ne.BLACK:case ne.IMAGE:j="#fff";break}y&&(j=N),h&&L&&(j="#000")}const O=s&&!t?1e3:0;let R,P;f?h?(R=j,P=L?"#FFFFFF":"#000000"):(R="Highlight",P="HighlightText"):(R=j,P=j==="#000"||j==="#000000"||j===Te.DARK?"#FFFFFF":"#000000");const M=L0()(ase);return M.animation.duration=O,M.defaultFontColor=j,M.onClick=e,M.onHover=e,M.plugins.tooltip.animation=!t,M.plugins.tooltip.backgroundColor=R,M.plugins.tooltip.titleColor=P,f&&!h?(M.scales.x.grid.color="FieldText",M.scales.y.grid.color="FieldText"):(M.scales.x.grid.color=I,M.scales.y.grid.color=A),M.scales.x.ticks.color=j,M.scales.y.ticks.color=j,f&&(h?M.plugins.legend.labels.color=L?"#000000":"#FFFFFF":M.plugins.legend.labels.color="FieldText"),M},[d,N,I,y,f,h,L,e,t,A,s])};function lse(e){const{children:t,onEvent:s,reduceMotion:o,shouldAnimate:r,values:a}=e,i=cse({onEvent:s,reduceMotion:o,shouldAnimate:r,values:a});return t(i)}var dse=p(29783),hp=p.n(dse);const use=/<mark>|<\/mark>/gm,hse=e=>t=>{const s=e(t.type).replace(use,"")??"";return{label:hp()(s,{length:30}),l10nId:Pt(t?.type)}},mse=e=>parseFloat(e.value??"0"),t5=(e,t)=>({labels:e.map(hse(t)),values:e.map(mse)});function fse(e,t,s){const o=[];let r=0;return s.replace(e,function(...a){const i=a.length,c=a[0],l=a[i-1],d=a[i-2],h=l.slice(r,d),m=typeof t=="function"?t(...a):t;return o.push(h,m),r=d+c.length,""}),o.push(s.slice(r)),o}const pse=(e,t)=>(0,n.jsx)("mark",{children:e},t),gse=(e,t)=>fse(new RegExp(qq()(t),"igm"),pse,e),s5=(e,t,s)=>{const o=hp()(t,{length:e});return s?gse(o,s):o};function vse(){const[e,t]=u.useState(null),s=u.useRef(null),{announcePolite:o}=bn(),{labels:r,course:a}=qr()??{},{a11yBlockChartPreposition:i}=r??{},c=Ur(a),l=u.useCallback(g=>{t(g)},[]),d=u.useCallback(()=>{const g=s.current;if(!g)return;const x=c?g.canvas?.parentElement:null;x&&g.width?g.resize(x.clientWidth,x.clientWidth*(g.height/g.width)):g.resize()},[c]),h=u.useCallback(()=>{s.current?.update()},[]),m=u.useCallback(()=>{d(),h()},[d,h]),f=u.useCallback(()=>{const g=s.current;if(g==null)return;const x=g.getDatasetMeta(0),b=x.data;if(!b?.length)return;const T=0,y=[{datasetIndex:0,element:x.data[T],index:T}];g.setActiveElements(y),g.tooltip?.setActiveElements(y,{x:0,y:0}),g.update(),l(T);const S=g.data.labels[T],k=g.data.datasets[0].data[T];setTimeout(()=>{o(`${T+1} ${i??""} ${b.length} - ${S}: ${k}`)},0)},[i,o,s,l]),v=u.useCallback(()=>{const g=s.current;if(g==null)return;const x=[];g.setActiveElements(x),g.tooltip?.setActiveElements(x,{x:0,y:0}),g.update(),l(null),o(null)},[o,s,l]),C=u.useCallback(g=>{const x=s.current;if(x==null)return;const b=x.getDatasetMeta(0),T=b.data;if(!T?.length)return;let L=!1,y=e;switch(g.key){case"ArrowLeft":L=!0,y=(e-1+T.length)%T.length;break;case"ArrowRight":L=!0,y=(e+1+T.length)%T.length;break;case"Home":L=!0,y=0;break;case"End":L=!0,y=T.length-1;break}if(L&&(g.stopPropagation(),g.preventDefault()),y!==e){const k=[{datasetIndex:0,element:b.data[y],index:y}];x.setActiveElements(k),x.tooltip?.setActiveElements(k,{x:0,y:0}),x.update(),l(y);const N=x.data.labels?.[y],I=x.data.datasets[0].data[y];o(`${y+1} ${i??""} ${T.length} - ${N}: ${I}`)}},[i,e,o,s,l]);return u.useEffect(()=>{d(),h()},[d,h]),u.useEffect(()=>{s.current&&s.current.update()},[e]),{activeIndex:e,chartRef:s,onBlur:v,onFocus:f,onKeyDown:C,onEvent:l,onResize:m}}function n5(e){const t=s=>{const{activeIndex:o,chartRef:r,onBlur:a,onEvent:i,onFocus:c,onKeyDown:l,onResize:d}=vse();return(0,n.jsx)(e,{...s,activeIndex:o,chartRef:r,onBlur:a,onEvent:i,onFocus:c,onKeyDown:l,onResize:d})};return t.displayName=`withChartEvents(${e.displayName||e.name})`,t}const Cse="ABCDEFGHIJKLMNOPQRSTUVWXYZ".split("");class xse extends u.PureComponent{wrapRef;id;resizeObserver;constructor(t){super(t),this.wrapRef=(0,u.createRef)(),this.state={labelYTop:"50%"}}componentDidMount(){this.resizeObserver=new ResizeObserver(this.handleResize),this.resizeObserver.observe(this.wrapRef.current)}componentWillUnmount(){this.resizeObserver.unobserve(this.wrapRef.current)}handleEvent=(t,s)=>{const o=s.length?s[0].index:null;this.props.onEvent(o)};handleResize=()=>{requestAnimationFrame(()=>{this.props.onResize(),this.setLabelYTop()})};setLabelYTop=()=>{const t=this.props.chartRef.current;if(t){const{bottom:s,top:o}=t?.scales?.y??{};X6()(s)&&X6()(o)&&this.setState({labelYTop:`${(s+o)/2}px`})}};render(){const{props:{activeIndex:t,chartRef:s,getL10nValue:o,htmlIdBase:r,htmlIdTitle:a,onBlur:i,onFocus:c,onKeyDown:l,isDesktop:d,isVisible:h,items:m,itemsLabel:f,labels:v,onEvent:C,search:g,shouldAnimate:x,valuesLabel:b,variant:T},state:{labelYTop:L}}=this,y=s5(80,o(f),g),S=s5(30,o(b),g),k=t5(m,o),N=d?[]:Cse.slice(0,m.length),I=d?k.labels:N.map(R=>({label:R})),w=h?k.values:J6(0,m.length),A=`${r}-type`,E=`${r}-instructions`,j=I.map(R=>R.label),O=I.map(R=>R.l10nId).join(",");return(0,n.jsxs)("div",{className:"block-chart__cartesian",children:[(0,n.jsx)("p",{className:"visually-hidden-always",id:E,children:v?.a11yBlockChartInstructions}),(0,n.jsxs)("div",{className:"block-chart__cartesianChart",ref:this.wrapRef,children:[S&&an(S)&&(0,n.jsxs)("div",{className:"block-chart__cartesianLabelY","data-l10n-id":Pt(b),style:{insetInlineEnd:L},children:[S,(0,n.jsx)("span",{className:"visually-hidden-always",children:v?.a11yBlockChartAxisY})]}),y&&an(y)&&(0,n.jsxs)("div",{className:"block-chart__cartesianLabelX","data-l10n-id":Pt(f),children:[y,(0,n.jsx)("span",{className:"visually-hidden-always",children:v?.a11yBlockChartAxisX})]}),(0,n.jsx)(lse,{onEvent:this.handleEvent,reduceMotion:ws(),shouldAnimate:x,values:w,children:R=>(0,n.jsx)(ese,{activeIndex:t,opts:R,values:w,children:P=>(0,n.jsxs)("div",{"aria-describedby":E,"aria-labelledby":`${a} ${A}`,className:"block-chart__cartesian-canvas-wrap",onBlur:i,onFocus:c,onKeyDown:l,role:"application",tabIndex:0,children:[(0,n.jsx)("div",{className:"visually-hidden-always",id:A,children:T==="bar"?v?.a11yBlockChartBar:v?.a11yBlockChartLine}),(0,n.jsx)(Z6.Chart,{"aria-hidden":"true",data:{labels:j,datasets:[P]},"data-l10n-id":O,options:R,ref:s,role:"presentation",type:T,updateMode:"default"})]})})})]}),!d&&(0,n.jsx)(ose,{activeIndex:t,labels:k.labels,letters:N,onEvent:C,values:w})]})}}function bse(e){const t=Ze(e),s=VO(960,"isDesktop","Desktop")(t),o=n5(s);function r(a){const c=q0()?.term??"";return(0,n.jsx)(o,{...a,search:c})}return r}const yse=bse(xse),mp=({valueType:e,value:t,values:s})=>e==="numeric"?String(t):cq(t/Wy(s)),Tse=e=>{if(yc())return"FieldText";const t=e.dataset.backgroundColor[e.dataIndex]??"#000";return Is(t)===Te.DARK?bt.DARK:bt.LIGHT},Lse=(e,t,s)=>mp({valueType:e,value:t,values:s.dataset.data}),Sse=(e,t)=>{const{label:s,dataset:o,parsed:r}=t[0],a=mp({valueType:e,value:r,values:o.data});return`${s}: ${a}`},kse=(e,t)=>{const s=t.dataIndex,o=t.dataset.data??[1],r=o[s],a=e==null&&r/Wy(o)>=.06;return e===s||a},Nse=({activeIndex:e,onEvent:t,reduceMotion:s,settings:{valueType:o},shouldAnimate:r})=>{const a=yc();return{animation:{animateRotate:r&&!s,duration:r&&!s?1e3:0},defaultFontFamily:'"lato", sans-serif',onClick:t,onHover:t,maintainAspectRatio:!1,plugins:{datalabels:{color:Tse,display:kse.bind(null,e),font:{size:12,weight:"bold"},formatter:Lse.bind(null,o)},legend:{display:!1,labels:a?{color:"FieldText"}:void 0},tooltip:{animation:!s,boxPadding:"14px 10px",callbacks:{label:()=>null,title:Sse.bind(null,o)},caretPadding:10,cornerRadius:3,displayColors:!1,titleFont:{weight:"normal"},titleMarginBottom:0,titleSpacing:0,xAlign:"center",yAlign:"bottom",backgroundColor:a?"Highlight":bt.LIGHT,titleColor:a?"HighlightText":bt.DARK}},responsive:!1,rotation:130}},Ise=({activeIndex:e,colors:t,hasBorder:s,values:o})=>{const r=js(),a=yc(),i=e==null?t:t.map((c,l)=>l===e?c:(0,e5.A)(c,r||"#fff",.5));return a?{backgroundColor:i,hoverBackgroundColor:i,borderWidth:.5,borderColor:"rgba(255, 255, 255, 0.3)",data:o}:{backgroundColor:i,hoverBackgroundColor:i,borderWidth:0,data:o,...s&&{borderWidth:1,borderColor:"#000"}}};function Ese({activeIndex:e,children:t,colors:s,hasBorder:o,values:r}){const a=Ise({activeIndex:e,colors:s,hasBorder:o,values:r});return t(a)}class jse extends u.PureComponent{handleMouseEnter=()=>{this.props.onEvent(this.props.index)};handleMouseLeave=()=>{this.props.onEvent(null)};render(){const{activeIndex:t,color:s,index:o,label:r,value:a}=this.props,i=t!=null&&t!==o,c=X()("block-chart__circleLegendItem",{"block-chart__circleLegendItem--unfocused":i});return(0,n.jsxs)("div",{className:c,onMouseEnter:this.handleMouseEnter,onMouseLeave:this.handleMouseLeave,children:[(0,n.jsxs)("dt",{className:"block-chart__circleLegendTerm",children:[(0,n.jsx)("svg",{"aria-hidden":"true",className:"block-chart__circleLegendSymbol","data-ignore":"contrast",fill:s,focusable:"false",role:"presentation",viewBox:"0 0 10 10",children:(0,n.jsx)("rect",{height:"10",rx:"1.5",width:"10"})}),(0,n.jsx)("span",{className:"block-chart__circleLegendText","data-l10n-id":r.l10nId,children:r.label})]}),(0,n.jsx)("dd",{className:"visually-hidden-always",children:a})]})}}const wse=jse,Ase=({activeIndex:e,colors:t,hasBorder:s,labels:o,onEvent:r,values:a,valueType:i="numeric"})=>{const c=uu(t,uu(o,a));if(c.length===0)return null;const l=X()("block-chart__circleLegend",{"block-chart__circleLegend--border":s});return(0,n.jsx)("dl",{className:l,children:c.map(([d,[h,m]],f)=>(0,n.jsx)(wse,{activeIndex:e,color:d,index:f,label:h,onEvent:r,value:mp({valueType:i,value:m,values:a})},h.label))})},Rse=(0,u.memo)(Ase),Pse=(e,t)=>{const s=e.filter(a=>Number(a.value)>=0),o=t5(s,t),r=s.map(a=>a.color);return{...o,colors:r}};class Mse extends u.PureComponent{wrapRef;id;resizeObserver;constructor(t){super(t),this.wrapRef=(0,u.createRef)()}componentDidMount(){this.resizeObserver=new ResizeObserver(this.props.onResize),this.resizeObserver.observe(this.wrapRef.current)}componentWillUnmount(){this.resizeObserver.unobserve(this.wrapRef.current)}buildOptions=()=>{const{activeIndex:t,settings:s,shouldAnimate:o}=this.props;return Nse({activeIndex:t,onEvent:this.handleEvent,reduceMotion:ws(),settings:s,shouldAnimate:o})};handleEvent=(t,s)=>{const o=s.length?s[0].index:null;this.props.onEvent(o)};render(){const{activeIndex:t,backgroundColor:s,chartRef:o,getL10nValue:r,htmlIdBase:a,htmlIdTitle:i,onBlur:c,onFocus:l,onKeyDown:d,isVisible:h,items:m,labels:f,onEvent:v,settings:C}=this.props,{colors:g,labels:x,values:b}=Pse(m,r),T=h?b:J6(0,m.length),L=this.buildOptions(),y=`${a}-type`,S=`${a}-instructions`,k=x.map(I=>I.label),N=g.includes(s);return(0,n.jsxs)("div",{className:"block-chart__circle",children:[(0,n.jsx)("p",{className:"visually-hidden-always",id:S,children:f?.a11yBlockChartInstructions}),(0,n.jsx)("div",{className:"block-chart__circleChart",ref:this.wrapRef,children:(0,n.jsx)(Ese,{activeIndex:t,colors:g,hasBorder:N,values:T,children:I=>(0,n.jsxs)("div",{"aria-describedby":S,"aria-labelledby":`${i} ${y}`,className:"block-chart__circle-canvas-wrap",onBlur:c,onFocus:l,onKeyDown:d,role:"application",tabIndex:0,children:[(0,n.jsx)("div",{className:"visually-hidden-always",id:y,children:f?.a11yBlockChartPie}),(0,n.jsx)(Z6.Chart,{"aria-hidden":"true",data:{labels:k,datasets:[I]},options:L,ref:o,role:"presentation",type:"pie",updateMode:"default"})]})})}),(0,n.jsx)(Rse,{activeIndex:t,colors:g,hasBorder:N,labels:x,onEvent:v,values:T,valueType:C?.valueType})]})}}function Ose(e){const t=ww()(e),s=n5(t);return Ze(s)}const Bse=Ose(Mse);Ls.Chart.register(Ls.ArcElement,Ls.BarController,Ls.BarElement,Ls.CategoryScale,Kte.default,Ls.Legend,Ls.Legend,Ls.LineController,Ls.LineElement,Ls.LinearScale,Ls.PieController,Ls.PointElement,Ls.Title,Ls.Tooltip);const Dse=e=>e.displayName||e.name||"Component";class Fse extends u.PureComponent{id;constructor(t){super(t),this.state={isVisible:!1},this.id=(0,Qu.uniqueId)("chart-")}componentDidMount(){this.setState({isVisible:!this.props.animateBlockEntrance||ws()})}handleAnimationEnd=()=>{this.setState({isVisible:!0})};renderTitle=()=>{const{title:t}=this.props;return(0,n.jsx)(ke,{value:t})};render(){const{props:{animateBlockEntrance:t,children:s,editable:o,initiallyVisible:r,isLearner:a,items:i,itemsLabel:c,labels:l,settings:d,title:h,valuesLabel:m,variant:f,renderTitle:v=this.renderTitle},state:{isVisible:C}}=this,g=d?.headingLevel,x=g?`h${g}`:"h2",b=this.id,T=`${b}-title`;return(0,n.jsx)(Ee,{type:"chart",children:(0,n.jsx)(Be,{afterAnimatedIn:this.handleAnimationEnd,animateBlockEntrance:t,initiallyVisible:r,isLearner:a,children:(0,n.jsx)("div",{className:"block-chart__container",children:(0,n.jsx)("div",{className:"block-chart__row",children:(0,n.jsx)("div",{className:"block-chart__rowInner",children:(0,n.jsxs)("figure",{children:[(!o&&h||o)&&(0,n.jsx)("figcaption",{children:(0,n.jsx)(x,{className:"block-chart__title",id:T,children:v()})}),(0,n.jsx)("div",{className:"block-chart__chart",children:u.cloneElement(u.Children.only(s),{htmlIdBase:b,htmlIdTitle:T,isVisible:C,items:i,itemsLabel:c,labels:l,settings:d,shouldAnimate:t,valuesLabel:m,variant:f})})]})})})})})})}}const Hse=Fse;function o5(e){const t=s=>(0,n.jsx)(Hse,{...s,children:(0,n.jsx)(e,{})});return t.displayName=`ChartWrap(${Dse(e)})`,t}var $se=p(82920);const Vse=o5(yse),zse=o5(Bse),Use=Fn()(Xe()("variant","storyline")),_se=Nt()(Use,Hs(),PG()(1));class Gse extends $se.Component{render(){const{dividerNumber:t,family:s,handleStorylineFullscreen:o,partnerContent:r,variant:a,enableVideoPlaybackSpeed:i,initiallyVisible:c}=this.props,d={...$r()(["type","handleStorylineFullscreen","dividerNumber"],this.props),enableVideoPlaybackSpeed:i,partnerContent:r,initiallyVisible:c};return ae("text","paragraph",d)||ae("text","table",d)?(0,n.jsx)(IQ,{...d}):ae("text","heading paragraph",d)?(0,n.jsx)(PQ,{...d}):ae("text","subheading paragraph",d)?(0,n.jsx)(MQ,{...d}):ae("text","heading",d)?(0,n.jsx)(AQ,{...d}):ae("text","subheading",d)?(0,n.jsx)(RQ,{...d}):ae("text","two column",d)?(0,n.jsx)(EQ,{...d}):ae("text","three column",d)?(0,n.jsx)(jQ,{...d}):ae("text","four column",d)?(0,n.jsx)(wQ,{...d}):ae("text","code",d)?(0,n.jsx)(K3,{...d}):ae("impact","a",d)?(0,n.jsx)(QQ,{...d}):ae("impact","b",d)?(0,n.jsx)(YQ,{...d}):ae("impact","c",d)?(0,n.jsx)(ZQ,{...d}):ae("impact","d",d)?(0,n.jsx)(XQ,{...d}):ae("impact","note",d)?(0,n.jsx)(qQ,{...d}):ae("quote","a",d)?(0,n.jsx)(J3,{...d}):ae("quote","b",d)?(0,n.jsx)(aY,{...d}):ae("quote","c",d)?(0,n.jsx)(iY,{...d}):ae("quote","d",d)?(0,n.jsx)(cY,{...d}):ae("quote","background",d)?(0,n.jsx)(lY,{...d}):ae("quote","carousel",d)?(0,n.jsx)(uY,{...d}):ae("quote","stacked",d)?(0,n.jsx)(hY,{...d}):ae("list","numbered",d)?(0,n.jsx)(gY,{...d}):ae("list","checkboxes",d)?(0,n.jsx)(vY,{...d}):ae("list","bulleted",d)?(0,n.jsx)(CY,{...d}):ae("list","icon",d)?(0,n.jsx)(xY,{...d}):ae("image","hero",d)?(0,n.jsx)(RY,{...d}):ae("image","full",d)?(0,n.jsx)(Mf,{...d}):ae("image","text aside",d)?(0,n.jsx)(OY,{...d}):ae("image","text overlay",d)?(0,n.jsx)(DY,{...d}):ae("image","banner",d)?(0,n.jsx)(FY,{...d}):ae("gallery","centered",d)||ae("gallery","full",d)?(0,n.jsx)(GY,{...d}):ae("gallery","two column",d)?(0,n.jsx)(Bf,{...d}):ae("gallery","three column",d)?(0,n.jsx)(Bf,{width:3,...d}):ae("gallery","four column",d)?(0,n.jsx)(Bf,{width:4,...d}):ae("divider","divider",d)?(0,n.jsx)(KY,{...d}):ae("divider","numbered divider",d)?(0,n.jsx)(QY,{number:t,...d}):ae("divider","spacing divider",d)?(0,n.jsx)(YY,{...d}):ae("360","storyline",d)?(0,n.jsx)(wZ,{...d,handleStorylineFullscreen:o,hasManySlBlocks:this.hasManySlBlocks.bind(this),isLesson:!0}):ae("interactive","accordion",d)?(0,n.jsx)(sZ,{...d}):ae("interactive","tabs",d)?(0,n.jsx)(mZ,{...d}):ae("interactive-fullscreen","labeledgraphic",d)?(0,n.jsx)(oee,{...d}):ae("interactive-fullscreen","process",d)?(0,n.jsx)(See,{...d}):ae("interactive-fullscreen","scenario",d)?(0,n.jsx)(Qee,{...d}):ae("interactive-fullscreen","sorting",d)?(0,n.jsx)(ite,{...d}):ae("buttons","button",d)?(0,n.jsx)(UZ,{...d}):ae("buttons","button stack",d)?(0,n.jsx)(_Z,{...d}):ae("flashcard","flashcard",d)?(0,n.jsx)(Dy,{...d}):ae("flashcard","stack",d)?(0,n.jsx)(Dy,{stack:!0,...d}):ae("knowledge","knowledge",d)?(0,n.jsx)(Ga,{...d}):ae("continue","continue",d)?(0,n.jsx)(HX,{...d}):ae("multimedia","step",d)?(0,n.jsx)(FX,{...d}):ae("multimedia","audio",d)?(0,n.jsx)(jX,{...d}):ae("multimedia","video",d)?(0,n.jsx)(Wf,{...d}):ae("multimedia","ai_avatar",d)?(0,n.jsx)(Wf,{...d}):ae("multimedia","custom video",d)?(0,n.jsx)(Wf,{...d,type:"customVideo"}):ae("multimedia","embed",d)?(0,n.jsx)(RX,{...d}):ae("multimedia","attachment",d)?(0,n.jsx)(OX,{...d}):ae("multimedia","code",d)?(0,n.jsx)(K3,{...d}):ae("knowledgeCheck","multiple choice",d)?(0,n.jsx)(Ga,{...d}):ae("knowledgeCheck","multiple response",d)?(0,n.jsx)(Ga,{...d}):ae("knowledgeCheck","fillin",d)?(0,n.jsx)(Ga,{...d}):ae("knowledgeCheck","matching",d)?(0,n.jsx)(Ga,{...d}):ae("knowledgeCheck","draw from question bank",d)?(0,n.jsx)(Ga,{...d}):ae("chart","bar",d)||ae("chart","line",d)?(0,n.jsx)(Vse,{...d}):ae("chart","pie",d)?(0,n.jsx)(zse,{...d}):ae("interactive-fullscreen","timeline",d)?(0,n.jsx)(Dte,{...d}):ae("ai-scenario","ai-scenario",d)?(0,n.jsx)(yte,{...d}):ae("mondrian","mondrian",d)?(0,n.jsx)(pte,{...d}):ae("videoCheckpoint","videoCheckpoint",d)?null:ae("textToVideo","textToVideo",d)?(0,n.jsx)(Wte,{}):ae("survey","survey",d)?(0,n.jsx)(pee,{...d}):ae("sequence","arrows",d)||ae("sequence","pyramid",d)||ae("sequence","timeline",d)?(0,n.jsx)(Vte,{...d}):ae("team","people",d)?(0,n.jsx)(Gte,{...d}):ae("html","inline",d)||ae("html","cdn",d)||ae("html","vibe",d)?(0,n.jsx)(Rte,{...d}):`Unknown type: ${s} ${a}`}hasManySlBlocks(){const{items:t}=this.props;return t&&_se(t)}}function Wse(e){return(0,n.jsx)(Nh,{block:e,children:(0,n.jsx)(Gse,{...e})})}function ae(e,t,s){return s.family===e&&s.variant===t}const Kse=1e3,Qse=150,Yse="onscrollend"in window;function r5(e,t){const s=e.getBoundingClientRect(),o=t?.getBoundingClientRect(),r=o?.top??0,a=o?.bottom??window.innerHeight,i=(a-r)*.02,c=s.bottom>r-i&&s.top<a+i,l=s.bottom<r;return c||l}const fp={entries:new Map,scrollHandler:null,scrollEndHandler:null,scrollTarget:null,debounceTimer:null,register(e,t,s){const o=this.entries.size===0,r=t??window;if(this.entries.set(e,{el:e,scrollableParent:t,callback:s}),o){this.scrollTarget=r;const a=()=>{this.debounceTimer!=null&&clearTimeout(this.debounceTimer),this.debounceTimer=setTimeout(()=>this.checkAll(),Qse)};Yse?(this.scrollEndHandler=()=>this.checkAll(),this.scrollTarget.addEventListener("scrollend",this.scrollEndHandler),this.scrollHandler=a,this.scrollTarget.addEventListener("scroll",this.scrollHandler)):(this.scrollHandler=a,this.scrollTarget.addEventListener("scroll",this.scrollHandler))}},unregister(e){this.entries.delete(e),this.entries.size===0&&(this.scrollEndHandler&&this.scrollTarget&&(this.scrollTarget.removeEventListener("scrollend",this.scrollEndHandler),this.scrollEndHandler=null),this.scrollHandler&&this.scrollTarget&&(this.scrollTarget.removeEventListener("scroll",this.scrollHandler),this.scrollHandler=null),this.scrollTarget=null,this.debounceTimer!=null&&(clearTimeout(this.debounceTimer),this.debounceTimer=null))},checkAll(){requestAnimationFrame(()=>{const e=[];for(const t of this.entries.values())r5(t.el,t.scrollableParent)&&e.push(t);e.forEach(t=>t.callback())})}},a5=({children:e,onViewed:t})=>{const s=(0,u.useRef)(null),o=(0,u.useRef)(!1),r=(0,u.useRef)(t);return(0,u.useEffect)(()=>{r.current=t},[t]),(0,u.useEffect)(()=>{const a=s.current;if(!a||o.current)return;const i=jm(),c=()=>{o.current||(o.current=!0,l.disconnect(),clearTimeout(d),fp.unregister(a),r.current())},l=new IntersectionObserver(([h])=>{h!=null&&(h.isIntersecting||h.intersectionRatio>0)&&c()},{root:i,rootMargin:H1,threshold:0});l.observe(a);const d=setTimeout(()=>{!o.current&&r5(a,i)&&c()},Kse);return fp.register(a,i,c),()=>{l.disconnect(),clearTimeout(d),fp.unregister(a)}},[]),(0,n.jsx)("div",{ref:s,children:e})},Zse=(0,u.memo)(function({block:t,children:s,onViewed:o,onStep:r}){const a=(0,u.useCallback)(c=>{c!=null&&"id"in c&&c.id!=null&&!c.isDone&&r(c.id)},[r]),i=(0,u.useCallback)(()=>{if(!t.items?.length){o();return}if(!t.requiresInteraction){o();return}(Xse.test(t.variant)||qse.test(t.family))&&t.items.length>0&&a(t.items[0])},[t,a,o]);return(0,n.jsx)(a5,{onViewed:i,children:u.cloneElement(u.Children.only(s),{onStep:a})})}),Xse=/tabs|carousel/,qse=/gallery/,Jse=["timeline"],ene=({family:e,variant:t})=>(/interactive|flashcard|knowledge|continue|360|survey/.test(e)||/carousel|centered|checkboxes|audio|video|storyline/.test(t))&&!Jse.includes(t),tne=({family:e,settings:t})=>e==="html"&&t?.hasCustomCompletion,sne=({family:e,items:t})=>!!(e==="mondrian"&&t?.length),nne="draw from question bank",pp=e=>{const{animateBlockEntrance:t,block:s,className:o,color:r,courseTitle:a,defaultBackgroundColor:i,enableVideoPlaybackSpeed:c,handleNavigate:l,handleStorylineFullscreen:d,hideBlock:h,index:m,isLastBlock:f,isOnlyBlockInStep:v,labels:C,lessonId:g,lessonProgress:x,loadMedia:b,match:T,onContinue:L,partnerContent:y,prefersKeyboardNavigation:S,previewType:k,shouldPause:N}=e,{blockId:I,family:w,items:A=[],variant:E,settings:j}=s,O=`block-${I}`,R=ct(),P=zI(),M=Cj({blockId:String(I),lessonId:String(g)}),H=(0,u.useCallback)(te=>{const ye=E===nne?A[0]:mr()(Xe()("id",te),A);R(iv({blockId:I,lessonId:g,items:[ye]})),w==="continue"&&L(I,te)},[I,R,w,A,g,L,E]),F=(0,u.useCallback)(()=>{R(iv({blockId:I,lessonId:g,items:A}))},[I,R,A,g]),D=(0,u.useCallback)(te=>{const ye=A?.[0],G=ye&&"id"in ye?ye.id:void 0;G&&R(Pk({blockId:I,itemId:G,lessonId:g,audioVideoPlayhead:te}))},[I,R,g,A]),V=(0,u.useCallback)(()=>{R(Bk({blockId:I,lessonId:g,isSubmitted:!0}))},[I,R,g]),W=(0,u.useCallback)(({itemId:te,response:ye})=>{R(Ok({blockId:I,itemId:te,lessonId:g,response:ye}))},[I,R,g]),_=(0,u.useCallback)(te=>{R(wk(te))},[R]),Z=(0,u.useCallback)(()=>({itemId:te,isCorrect:ye})=>R(Mk({itemId:te,lessonId:g,blockId:I,isCorrect:ye})),[I,R,g]),oe=(0,u.useCallback)(()=>()=>R(Rk({lessonId:g,blockId:I})),[I,R,g]),Q=Zi(),U=(0,u.useCallback)(te=>{R(Sb(te))},[R]),B=(0,u.useCallback)(()=>{R(Xi())},[R]),z=(0,u.useCallback)(te=>{R(Qm(te))},[R]),K=(0,u.useCallback)(()=>{R(Jc(g))},[R,g]),Y=qo()(s,{animateBlockEntrance:t,className:o?.toString(),color:r,courseTitle:a,defaultBackgroundColor:i,dividerNumber:M,enableVideoPlaybackSpeed:c,family:w,handleNavigate:l,handleStorylineFullscreen:d,onExit:K,onFinishStoryline:f8,onSurveySubmitted:V,onSurveyPartialResponse:W,initiallyVisible:m===0,isHidden:h,isLastBlock:f,isLearn:!0,isLearner:!0,isPresentation:e.isPresentation??!1,isOnlyBlockInStep:v,isVideoTraining:P,labels:C,lessonId:g,loadMedia:b,match:T,onCardDrop:Z,onReplay:oe,onRetryAttempt:_,onTranscriptClose:B,onTranscriptOpen:U,onTranscriptUpdate:z,originalVariant:void 0,partnerContent:y,prefersKeyboardNavigation:S,previewType:k,progress:x,recordMediaPlayheadPosition:D,shouldPause:N,transcriptPanelState:Q}),J=ene({family:w,variant:E})||tne({family:w,settings:j})||sne({family:w,items:A}),q=FO(g,I),ee=["noOutline",o,h?"blocks-lesson__block-wrapper--hidden":void 0].filter(Boolean).join(" "),se=(0,n.jsx)(Wse,{...Y});return(0,n.jsx)("div",{className:ee,"data-block-id":I,"data-change-path":q,children:J?(0,n.jsx)(Zse,{block:s,onStep:H,onViewed:F,children:se}):(0,n.jsx)(a5,{onViewed:F,children:se})},O)},hu=yt(),gp=qo(),one=Ye(),rne=({slides:e,currentSlide:t},s)=>(t.push(s),s.settings?.attachedToNextBlock||(e.push(t),t=[]),{slides:e,currentSlide:t}),ane=e=>{const{slides:t}=ef()(rne,{slides:[],currentSlide:[]},e);return t};function vp(e,t,s,o){if(e.length){const a=e.slice(-1)[0];if(!Tc(a.id,s))return e}const r=Yte(ine(s),t.slice(e.length)).map(cne(o));return r.length?vp(e.concat(r),t,s,o):e}const Tc=(e,t)=>e==null?!1:hu(!1,["items",e,"isComplete"],t),ine=e=>({family:t,items:s})=>{const o=hu({},0,s);return t==="continue"&&!Tc(o.id,e)},cne=e=>(t,s,o)=>{const r=o.slice(-1)[0]||{},{family:a}=r,i=a==="continue"?hu(void 0,["items",0,"type"],r)??e?.blockContinueCompletionType??!1:!1;return t.family==="knowledgeCheck"&&t.settings?.requireCorrectAnswer?gp(t,{requiresInteraction:!0}):t.variant!=="continue"&&(!i||i==="completeBlock"&&s!==o.length-1&&s!==o.length-2)?t:gp(t,{requiresInteraction:!0})};function i5({id:e,...t},s,o,r,a){if(t.family==="continue"){const i=hu(void 0,["items",0,"type"],t)??a?.blockContinueCompletionType??"";return gp({blockId:e,...t},{skipContinue:r,canContinue:lne({continueType:i,blocks:s,progress:o}),lessonProgress:o,isComplete:Tc(e,o)})}return{blockId:e,...t}}const lne=({continueType:e,blocks:t,progress:s})=>{switch(e){case"completeAll":return ss()(Hs()(t),mne(s));case"completeBlock":return t.length===0?!0:Tc(fne(t),s);default:return!0}},dne=e=>Xs()(one("items",e)??{}),une=e=>hne(dne(e??{})),hne=e=>Fn()(t=>Xe()("isComplete",!0,t),e),mne=e=>Hs()(une(e)),fne=e=>Hc()(e)?.id,pne=({family:e,variant:t,isComplete:s,requiresInteraction:o})=>e==="continue"&&t==="continue"&&!!o&&!s,gne=(e,t)=>!!e.find(o=>{if(o?.family==="knowledgeCheck"&&o?.settings?.requireCorrectAnswer)return o.id==null?!0:!t?.items?.[o.id]?.isComplete}),vne=e=>e.length===0?!1:Yb()(t=>!!pne(t),e),Cne=(e,t)=>e.length===0?!1:gne(e,t),xne=({blocks:e,lessonProgress:t})=>e.findIndex(s=>{const o=s.id==null?void 0:t?.items?.[s.id],r=o&&o?.isComplete==null;return s?.family==="knowledgeCheck"&&s?.settings?.requireCorrectAnswer&&r}),c5=({blocks:e,lessonProgress:t,currentBlockIndex:s})=>{const o=xne({blocks:e,lessonProgress:t});return o>-1&&s>o},bne=(e,t)=>{const s=["embed","video","full"],o=["interactive","interactive-fullscreen","image","flashcard","gallery","chart","knowledgeCheck"];return e!=null&&o.includes(e)||t!=null&&s.includes(t)};function yne(e,t,s){if(!e||!t||!Lh())return!1;if(xI(s,{l10n:t}))return!0;const{locales:o,defaultLocale:r}=t,a=o.find(i=>i.locale===r)?.id;return a&&a!==e}const Tne=e=>e==="center"||e==="end"||e==="nearest"||e==="start",Lne=e=>Jt(e)&&typeof e.lessonId=="string"&&(typeof e.itemId=="string"||e.itemId==null)&&(e.align===void 0||Tne(e.align)),Sne=e=>Jt(e)&&(typeof e.blockId=="string"||typeof e.blockId=="number")&&typeof e.family=="string";function kne({animateBlockEntrance:e,blocks:t,className:s,color:o,courseTitle:r,enableVideoPlaybackSpeed:a,handleNavigate:i,handleStorylineFullscreen:c,isLessonEntering:l,isLessonExiting:d,labels:h,lessonId:m,lessonProgress:f,loadMedia:v,nextLesson:C,partnerContent:g,prefersKeyboardNavigation:x,previewType:b}){const T=(0,u.useRef)(null),L=(0,u.useRef)(null),y=(0,u.useRef)(null),[S,k]=(0,u.useState)(!1),{currentLocale:N}=it(),I=(0,we.g)(),w=(0,u.useMemo)(()=>({params:I}),[I]),A=de(Q=>Q.course?.theme),E=de(sh),j=de(Q=>Q.course?.defaultLocaleId),O=de(Q=>Q.l10n),R=yne(j??null,O,N),P=(0,Me.A)(l),M=(0,u.useRef)(d),H=(0,u.useRef)(l),F=(0,u.useRef)(m);M.current=d,H.current=l,F.current=m,(0,u.useEffect)(()=>{const Q=U=>{if(U.origin!==window.location.origin)return;(Array.isArray(U.data)?U.data:[U.data]).forEach(z=>{Jt(z)&&z.type==="preview:lessonUpdate"&&k(!0)})};return window.addEventListener("message",Q),()=>window.removeEventListener("message",Q)},[]),(0,u.useEffect)(()=>{const Q=U=>{if(M.current||!(U instanceof CustomEvent))return;const B=U.detail;if(!Lne(B)||B.lessonId!==F.current)return;const z=B.itemId,K=B.align??"nearest";z==null?T.current?.closest(".page")?.scrollIntoView({behavior:"smooth",block:"start"}):H.current?y.current={blockId:z,align:K}:D(z,K)};return window.addEventListener(Ge,Q),()=>window.removeEventListener(Ge,Q)},[]),(0,u.useEffect)(()=>{if(P&&!l&&y.current!=null){const{blockId:Q,align:U}=y.current;D(Q,U),y.current=null}},[l,P]),(0,u.useLayoutEffect)(()=>{V()});function D(Q,U="nearest"){const z=document.querySelector(".page-wrap")?.querySelector(`[data-block-id="${Q}"]`);z?.scrollIntoView({behavior:"smooth",block:U})}function V(){if(L.current){const U=t.findIndex(z=>z.id===L.current)+1,B=t[U]?.id??null;if(B){const z=document.querySelector(".page-wrap"),K=z?.querySelector(`[data-block-id="${B}"]`),Y=K?K.getBoundingClientRect().top:0;Qi.Ay.animateScroll.scrollTo(Y+(z?.scrollTop??0),{smooth:!0,containerId:"page-wrap"})}L.current=null}}const W=(0,u.useCallback)((Q,U)=>{Tc(U,f)||(L.current=Q),Q===t[t.length-1]?.id&&C&&(ps(Jc(m)),i?.(C))},[i,t,m,f,C]),_=R||S,Z=_?t:(()=>{const Q=vp([],t,f,A);return Array.isArray(Q)?Q.filter(U=>Jt(U)&&(typeof U.id=="string"||typeof U.id=="number")):t})(),oe=["blocks-lesson",s,E?"blocks-lesson--one-page":void 0].filter(Boolean).join(" ");return(0,n.jsx)("section",{className:oe,ref:T,children:Z.map((Q,U,B)=>{const z=i5(Q,B.slice(0,-1),f,_,A);if(!Sne(z))return null;const K=z,Y=B.length-1,q=K.family==="continue"?Q.id===t[t.length-1]?.id:U===Y,ee=!S&&c5({blocks:Z,lessonProgress:f,currentBlockIndex:U});return(0,n.jsx)(pp,{animateBlockEntrance:e,block:K,color:o,courseTitle:r,enableVideoPlaybackSpeed:a,handleNavigate:i,handleStorylineFullscreen:c,hideBlock:ee,index:U,isLastBlock:q,labels:h,lessonId:m,lessonProgress:f,loadMedia:v,match:w,onContinue:W,partnerContent:g,prefersKeyboardNavigation:x,previewType:b},K.blockId)}).filter(AG.A)})}const Cp=kne,Nne=({animateBlockEntrance:e,color:t,courseTitle:s,data:o,enableVideoPlaybackSpeed:r,handleNavigate:a,handleStorylineFullscreen:i,labels:c,lessonHeader:l,lessonHeaderWrapClasses:d,lessonHeaderWrapStyles:h,lessonProgress:m,loadMedia:f,match:v,nextLesson:C,prefersKeyboardNavigation:g,previewType:x,hideLessonHeaders:b})=>{const T=Mi(),{id:L,items:y,type:S}=o,k={animateBlockEntrance:e,blocks:y,color:t,courseTitle:s,enableVideoPlaybackSpeed:r,handleNavigate:a,handleStorylineFullscreen:i,isFirstLesson:!0,labels:c,lessonId:L,lessonProgress:m,loadMedia:f,match:v,nextLesson:C,partnerContent:T,previewType:x,prefersKeyboardNavigation:g,type:S};return(0,n.jsx)("div",{className:"page","data-page":!0,children:(0,n.jsx)("div",{className:"page__wrapper page__wrapper--white",children:(0,n.jsxs)(kd,{children:[(0,n.jsx)("div",{className:d,inert:b,style:h,children:l}),(0,n.jsx)("div",{className:"page__content",children:(0,n.jsx)(Cp,{...k})})]})})})},Ine=e=>e===z7.CONTINUE,Ene=({canShowContinue:e,isExport:t,isRiseCom:s,nextLesson:o})=>e&&s&&!o&&!t,jne=e=>Jt(e)&&"id"in e&&"type"in e,wne=({item:e,question:t})=>{if(e.type===ns.DRAW_FROM_QUESTION_BANK){const s=String(t.id);return e.id===s.split("-")[0]}return e.id===t.id},Ane=(e,t)=>!e||!t||e.length!==t.length?!1:e.some((s,o)=>t[s]?.id!==t[o]?.id),Rne=(e,t,s)=>{if(!Array.isArray(e)||!Array.isArray(t)||!s)return!1;const o=e.map(i=>t[i]),r=t.findIndex(i=>i.id===s),a=o.findIndex(i=>i.id===s);return r===a},Pne=({lesson:e,question:t})=>{const o=e?.items?.filter(jne)?.find(a=>wne({item:a,question:t}));if(o?.type!==ns.DRAW_FROM_QUESTION_BANK)return o;const r=String(t.id).split("-")[1];return o.questions.find(a=>a.id===r)},Mne=$("quiz"),One=0,Ya=2,Bne=e=>({start:e<Ya?0:e-Ya,end:e+Ya});function Dne(e){return e+1}function Fne(e){return e<One+Ya}function Hne(e,t){const{start:s,end:o}=Bne(t);return{items:e.slice(s,o),startOffset:s}}function xp({activeIndex:e,index:t}){return Mne("card",{active:t===e,done:t<e,next:t===e+1,penultimate:t===e+Ya,future:t>e+Ya})}function $ne({settings:e}){const t=ct();return(0,u.useMemo)(()=>({onChoiceSelect:s=>{t(yv(s))},onFillInChange:s=>{t(Tv(s))},onMatchSet:s=>{t(Sv(s))},onResponseToggle:s=>{t(Lv(s))},onSetIndex:s=>{t(A0(s))},onSubmit:s=>{const{skipLessonsIfPassed:o,skipToLessonId:r}=e||{};return t(R0({...s,passToContinue:s.passToContinue??!1,skipLessonsIfPassed:o??void 0,skipToLessonId:r??void 0}))}}),[t,e])}function l5(e){return e.type===ns.DRAW_FROM_QUESTION_BANK}function bp(e,t){return{...t,drawn:!0,id:`${e.id}-${t.id}`}}function Vne(e,t){const s=t.map(o=>({question:e.questions[o],idx:o})).filter(o=>o.question!=null);return{items:s.map(({question:o})=>bp(e,o)),indices:s.map(({idx:o})=>o)}}function zne(e){const{questions:t}=e;if(jj())return{items:t.map(i=>bp(e,i)),indices:t.map((i,c)=>c)};const s=e.drawCount,o=[],r=[],a=[];for(let i=0;i<s;i++){const c=y6({questions:t,drawnQuestionIds:o});if(!c)break;r.push(bp(e,c)),a.push(t.findIndex(l=>l.id===c.id)),o.push(String(c.id))}return{items:r,indices:a}}function Une({sourceItems:e,progress:t,lessonId:s}){const o=t?.questionsDrawn?t.questionList:void 0,r=e.filter(l5).map((d,h)=>{const m=o?.[h];return m?Vne(d,m):zne(d)});let a=0;const i=e.flatMap(d=>l5(d)?r[a++].items:[d]),c=r.map(d=>d.indices),l=_ne({items:i,progress:t,questionIndexList:c});return{concreteItems:i,drawPayload:{lessonId:s,lessonProgress:l}}}function _ne({items:e,progress:t,questionIndexList:s}){const o=t?.items??{},r=t?.originalItemProgress,a=new Map(Object.values(o).map(c=>[c.index,c])),i=Object.fromEntries(e.map((c,l)=>{const d=r?.[l]??{},h=a.get(l);return[c.id,{...d,...h,id:c.id,index:l}]}));return{...t,questionsDrawn:!0,questionList:s,items:i}}function yp(e,t){return!!t[e.id]?.isComplete}function Gne({items:e,progress:t}){const s=t?.items??{};return[...e.filter(o=>yp(o,s)),...lu()(e.filter(o=>!yp(o,s)))]}function Wne(e){const t=e.answers??[],s=lu()(t),o=s.map(r=>t.findIndex(a=>a.id===r.id));return Object.assign({},e,{answers:s,shuffledAnswerIndices:o})}function d5({items:e,settings:t,progress:s}){const o=t?.randomizeQuestionOrder?Gne({items:e,progress:s}):e;if(!t?.shuffleAnswerChoices)return o;const r=s?.items??{};return o.map(a=>yp(a,r)?a:Wne(a))}function Kne({lessonId:e,sourceItems:t,progress:s,settings:o}){const{concreteItems:r,drawPayload:a}=Une({sourceItems:t,progress:s,lessonId:e});return{resolvedItems:d5({items:r,settings:o??void 0,progress:a.lessonProgress}),drawPayload:a}}function C1e(e){return d5({items:e.items,settings:e.settings,progress:e.progress})}const Qne=e=>e!=null&&e.type!=null&&e.type!=="section";function x1e({lessonIds:e,lessons:t}){return!Array.isArray(e)||!t?!1:e.some((s,o)=>{const r=t[s];return r?.type!=="quiz"||r.settings?.skipLessonsIfPassed!==!0?!1:e.slice(o+1).some(a=>Qne(t[a]))})}function Yne(e,t){const s=Vt(e),o=z0(s)?s.settings:void 0,r=e?a8({id:e,passingScore:t?.passingScore??80}):void 0;return(0,u.useMemo)(()=>o&&{...o,passingScore:r??o?.passingScore??80},[o,r])}const mu=typeof matchMedia<"u"?matchMedia("(prefers-reduced-motion: reduce)"):void 0;function u5(){const[e,t]=(0,u.useState)(mu?.matches??!1);return(0,u.useEffect)(()=>{if(!mu)return;const s=o=>t(o.matches);return mu.addEventListener("change",s),()=>mu.removeEventListener("change",s)},[]),e}function Zne({lessonId:e}){const t=ct(),s=Vt(e),o=z0(s)?s:void 0,r=hl(e),a=(0,u.useMemo)(()=>o?.items??[],[o?.items]),i=Yne(e,r),[{resolvedItems:c,drawPayload:l}]=(0,u.useState)(()=>Kne({lessonId:e,progress:r,settings:i,sourceItems:a}));(0,u.useLayoutEffect)(()=>{t(Vk({...l,lessonId:e}))},[]);const d=r?.activeIndex??0,h=u5();return Xne({activeIndex:d,isReduceMotion:h,progress:r,resolvedItems:c,settings:i,sourceItems:a}),{activeIndex:d,progress:r,resolvedItems:c,retryAttempts:r?.retryAttempts??0,settings:i,sourceItems:a}}function Xne({activeIndex:e,isReduceMotion:t,progress:s,resolvedItems:o,settings:r,sourceItems:a}){const i=(0,u.useRef)(e);(0,u.useEffect)(()=>{},[e])}const qne=e=>e.length===3,Jne=e=>{const t=e.findIndex(s=>s==="answers");return t===-1?null:e[t+1]?.id},eoe=e=>{const t=e.findIndex(s=>s==="questions");return t===-1?null:e[t+1]?.id},toe=e=>{const t=e.at(-1);return typeof t=="string"&&t.startsWith("feedback")},soe=({items:e,itemId:t,questionBankQuestionId:s})=>{const o=e.find(({id:r})=>r===t);return o?"questions"in o?s?o.questions.find(({id:r})=>r===s):null:o:null},noe=(e,t,s)=>{const o=s==="feedbackCorrect";return e?[e]:s==="feedback"?t.answers.slice(0,1):s==="feedbackIncorrect"&&t.type==="FILL_IN_THE_BLANK"?[{title:""}]:t.answers.filter(r=>"correct"in r?r.correct===o:"corrects"in t?t.corrects.includes(r.id)===o:t.answers)},ooe=({lessonId:e,items:t})=>{const s=ct(),o=(0,u.useCallback)(({lessonId:a,progressId:i,question:c,answer:l},d=!0)=>{switch(c.type){case"MULTIPLE_CHOICE":s(yv({lessonId:a,itemId:i,selectedIndex:c.answers.indexOf(l)}));break;case"MULTIPLE_RESPONSE":s(Lv({lessonId:a,itemId:i,selectedIndex:c.answers.indexOf(l)}));break;case"FILL_IN_THE_BLANK":s(Tv({lessonId:a,itemId:i,text:typeof l.title=="string"?l.title:""}));break;case"MATCHING":s(Sv({lessonId:a,itemId:i,matches:d?Object.fromEntries(c.answers.map(h=>[h.id,h.id])):{}}));break}},[s]),r=(0,u.useCallback)(({detail:a})=>{const{lessonId:i,path:c}=a,l=String(a.itemId);if(i!==e)return;if(qne(c)){s(bv(e));return}const d=eoe(c),h=soe({items:t,itemId:l,questionBankQuestionId:d});if(!h)return;const m=d?`${l}-${d}`:l;if(s(A0({lessonId:e,progressId:m})),toe(c)){const f=Jne(c),v=f?h.answers.find(({id:b})=>b===f)??null:null,C=c.at(-1),g=C==="feedbackCorrect",x=noe(v,h,C);h.type==="MULTIPLE_RESPONSE"&&s($k({lessonId:e,itemId:m})),x.forEach(b=>{o({lessonId:e,question:h,progressId:m,answer:b},g)}),s(R0({finalRetryAttempt:!1,lessonId:e,isCorrect:g,itemId:m,passToContinue:!0}))}},[s,e,t,o]);(0,u.useEffect)(()=>(window.addEventListener(Ge,r),()=>{window.removeEventListener(Ge,r)}),[r])},roe=$("quiz-item");function aoe({activeIndex:e,children:t,index:s,isActive:o,isComplete:r,isCorrect:a,isTimedQuiz:i,settings:c}){const l=c?.correctAnswerColor??void 0,d=c?.incorrectAnswerColor??void 0,f={"--color-feedback-icon":a?l:d,"--color-matching-feedback-bubble-bg":d,"--color-multiple-choice-complete-border":d,"--color-multiple-choice-correct-border":l,"--color-multiple-response-correct-border":l,"--color-multiple-response-incorrect-border":d,"--color-multiple-response-option-check":r?l:void 0,"--color-quiz-option-check":l,"--color-x-fill":d};return(0,n.jsx)("div",{className:xp({activeIndex:e,index:s}),"data-testid":"quiz-item-card",inert:o?void 0:!0,children:(0,n.jsx)("div",{className:roe("content"),children:(0,n.jsx)($y,{isActive:o,isComplete:r,isTimedQuiz:!!i,style:f,children:(0,n.jsx)("div",{hidden:!o&&!r,children:t})})})})}const ioe=$("quiz-card");function coe({blockId:e,enableVideoPlaybackSpeed:t,index:s,isActive:o,item:r,labels:a,media:i}){const c=Ot();if(!i)return null;const l=c(i),{audio:d,image:h,video:m,embed:f}=l??{},v={allowTabNavigation:o,blockId:e,enableVideoPlaybackSpeed:t,item:r,labels:a};return d&&h?(0,n.jsx)("div",{className:`${ioe("media",{"image-with-audio":!0})}`,children:(0,n.jsx)(Fo,{...v,index:String(s),isOverlayAudio:!0,media:i})}):d&&(m||f)?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(Fo,{...v,index:`${s}-audio`,media:{audio:d}}),(0,n.jsx)(Fo,{...v,index:String(s),media:m?{video:m}:{embed:f},shouldPause:!o})]}):(0,n.jsx)(Fo,{...v,index:String(s),media:i,shouldPause:!o})}function h5(e,t){if(e===void 0||!t)return;if(Array.isArray(e))return e.map(o=>t.indexOf(o)).filter(o=>o!==-1);const s=t.indexOf(e);return s===-1?void 0:s}const{FILL_IN_THE_BLANK:loe,MATCHING:doe,MULTIPLE_CHOICE:uoe,MULTIPLE_RESPONSE:hoe}=ns;function moe({color:e,columnBehavior:t,correctAnswerColor:s,correctAnswerColorContrast:o,errorMessageId:r,incorrectAnswerColor:a,incorrectAnswerColorContrast:i,isActive:c,isComplete:l,isCorrect:d,isReduceMotion:h,isRetaking:m,isShuffled:f,item:v,itemProgress:C,labels:g,onChoiceSelect:x,onFillInChange:b,onMatchSet:T,onResponseToggle:L,onSubmit:y,prefersKeyboardNavigation:S,questionHtmlId:k,quizAcceptableResponses:N,quizAnswerPlaceholder:I,revealAnswers:w}){const{answers:A,type:E}=v,j=c&&!l,O=A??[],R=("correct"in v?v.correct:void 0)??"",P=("corrects"in v?v.corrects:void 0)??[],M=C?.text??"",H=C?.matches??{},F=(0,u.useCallback)(({title:V})=>(0,n.jsx)(ke,{allowTabNavigation:c,className:"quiz-multiple-choice-option__label",value:V}),[c]),D=(0,u.useCallback)(({title:V})=>(0,n.jsx)(ke,{allowTabNavigation:c,tagName:"span",value:V}),[c]);switch(E){case loe:return(0,n.jsx)(Ky,{allowTabNavigation:c,correctAnswerColor:s,correctAnswerColorContrast:o,errorMessageId:r,incorrectAnswerColor:a,incorrectAnswerColorContrast:i,isComplete:l,isCorrect:d,labels:g,onChange:b,onEnterToSubmit:y,options:O,questionHtmlId:k,quizAcceptableResponses:N,quizAnswerPlaceholder:I,revealAnswers:w,value:M});case doe:return(0,n.jsx)(qy,{answers:O,columnBehavior:t,correctAnswerColor:s,correctAnswerColorContrast:o,incorrectAnswerColor:a,incorrectAnswerColorContrast:i,isActive:c,isComplete:l,matches:H,onChange:T,prefersKeyboardNavigation:S,revealAnswers:w});case hoe:{const V=C?.selectedIndices,W=C?.shuffledAnswerIndices??[],_=f?h5(V,W):V;return(0,n.jsx)(t6,{allowTabNavigation:c,correctIds:P,errorMessageId:r,isComplete:l,isCorrect:d,isRetaking:m,labels:g,onChange:L,onEnterToSubmit:y,options:O,questionHtmlId:k,renderOptionText:D,revealAnswers:w,selectedIndices:_??[]})}case uoe:default:{const V=C?.selectedIndex,W=C?.shuffledAnswerIndices??[],_=f?h5(V,W):V;return(0,n.jsx)(e6,{allowTabNavigation:j,color:e,correctId:R,errorMessageId:r,isComplete:l,isCorrect:d,isReduceMotion:h,isRetaking:m,labels:g,onChange:x,onEnterToSubmit:y,options:O,questionHtmlId:k,renderOptionText:F,revealAnswers:w,selectedIndex:_??-1})}}}const Rr=$("quiz-card");function foe({color:e,enableVideoPlaybackSpeed:t,hasStart:s,index:o,interaction:r,isQuestionBankQuiz:a,isReduceMotion:i,isShuffled:c,item:l,items:d,labels:h,onTakeAgain:m,prefersKeyboardNavigation:f,progress:v,settings:C,showNextButton:g}){const{canProceed:x,canSubmit:b,errorIncomplete:T,feedbackRef:L,errorMessageId:y,feedbackValue:S,handleChoiceSelect:k,handleFillInChange:N,handleMatchSet:I,handleNextFeedbackClick:w,handleResponseToggle:A,handleSubmit:E,handleTakeAgain:j,isActive:O,isComplete:R,isCorrect:P,isRetaking:M,itemProgress:H,quizItemHtmlId:F,selection:D,wrapperRef:V}=r,W=s?o+1:o,_=C?.revealAnswers===!0?je.ALL:C?.revealAnswers??je.NONE,Z=`q-${l.id}`,oe=l.settings,Q=C?.correctAnswerColor??void 0,U=C?.correctAnswerColorContrast??void 0,B=C?.incorrectAnswerColor??void 0,z=C?.incorrectAnswerColorContrast??void 0,K=h?.quizQuestion??"",Y=h?.quizAcceptableResponses??"",J=h?.quizAnswerPlaceholder??"",q=h?.quizCorrect??"",ee=h?.quizIncorrect??"",se=h?.quizSubmit??"",te=v?.percentComplete===100&&a?h?.quizRestart??"":h?.quizNext??"";return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(dq,{isActive:O,labels:h,questionLabel:K,questionNumber:o+1,totalQuestions:d.length}),(0,n.jsx)(hq,{allowTabNavigation:O,htmlId:Z,value:l.title}),(0,n.jsx)(coe,{blockId:l.id,enableVideoPlaybackSpeed:t,index:W,isActive:O,item:l,labels:h,media:l.media}),(0,n.jsx)(_y,{type:l.type,children:(0,n.jsx)("div",{ref:V,children:(0,n.jsx)(moe,{canSubmit:b,color:e,columnBehavior:oe?.columnBehavior,correctAnswerColor:Q,correctAnswerColorContrast:U,errorMessageId:y,incorrectAnswerColor:B,incorrectAnswerColorContrast:z,isActive:O,isComplete:R,isCorrect:P,isReduceMotion:i,isRetaking:M,isShuffled:c,item:l,itemProgress:H,labels:h,onChoiceSelect:k,onFillInChange:N,onMatchSet:I,onResponseToggle:A,onSubmit:E,prefersKeyboardNavigation:f,questionHtmlId:Z,quizAcceptableResponses:Y,quizAnswerPlaceholder:J,revealAnswers:_})})}),(0,n.jsx)("div",{"aria-live":"assertive",children:T&&(0,n.jsxs)("div",{className:`${Rr("validations")}`,"data-testid":"quiz-validation-error",children:[(0,n.jsx)(ie,{className:`${Rr("validation-icon")}`,"data-testid":"quiz-validation-icon",name:"alert-circle"}),(0,n.jsx)("span",{id:`${F}-error-incomplete-message`,children:h?.quizRequireAnswer})]})}),(0,n.jsx)(Uy,{canProceed:x,feedbackRef:L,feedbackValue:S,isActive:O,isComplete:R,isCorrect:P,item:l,labels:h,quizCorrect:q,quizIncorrect:ee,revealAnswers:_,selection:D}),(0,n.jsx)(Hy,{allowNext:!m,canProceed:x,canSubmit:b,isReduceMotion:i,onNext:g?w:void 0,onSubmit:E,quizNext:te,quizSubmit:se}),m&&(0,n.jsx)("div",{className:`${Rr("retake-container",{active:R})}`,children:(0,n.jsx)("button",{className:`${Rr("retake",{active:R})}`,onClick:j,type:"button",children:(0,n.jsxs)("div",{className:`${Rr("retake-content")}`,children:[(0,n.jsx)("div",{className:`${Rr("retake-text")}`,children:"TAKE AGAIN"}),(0,n.jsx)("i",{className:`${Rr("retake-icon")} icon icon-reload`})]})})})]})}const{FILL_IN_THE_BLANK:m5,MATCHING:f5,MULTIPLE_CHOICE:p5,MULTIPLE_RESPONSE:g5}=ns;function poe(e,t){return e?.items?.[t]??{}}function goe(e,t,s,o,r){switch(e.type){case m5:return r6({answers:e.answers??[],text:t.text,caseSensitive:e.settings?.isCaseSensitive??!1,getL10nValue:r});case f5:return a6(t.matches??{});case g5:return l6({isShuffled:s,item:e,selectedIndices:t.selectedIndices,shuffledAnswerIndices:t.shuffledAnswerIndices});case p5:default:return i6({isCorrectAnswerUnshuffled:o,isShuffled:s,item:e,selectedIndex:t.selectedIndex,shuffledAnswerIndices:t.shuffledAnswerIndices})}}function voe(e,t){switch(e.type){case m5:return t.text;case f5:return t.matches;case g5:return t.selectedIndices;case p5:default:return t.selectedIndex}}const{FILL_IN_THE_BLANK:Coe,MATCHING:xoe,MULTIPLE_CHOICE:boe,MULTIPLE_RESPONSE:yoe}=ns;function Toe({hasStart:e=!1,id:t,index:s,isCorrectAnswerUnshuffled:o=!1,isShuffled:r=!1,item:a,onChoiceSelect:i,onFillInChange:c,onMatchSet:l,onResponseToggle:d,onTakeAgain:h,progress:m,reportAnswer:f,retryAttempts:v=0,setNextIndex:C,settings:g,submitAction:x,title:b}){const T=Ot(),L=gC(),[y,S]=(0,u.useState)(!1),[k,N]=(0,u.useState)(Date.now),[I,w]=(0,u.useState)(!1),A=(0,u.useRef)(null),E=(0,u.useRef)(null),j=(0,u.useId)(),O=(0,u.useRef)({canSubmit:!1,isCorrect:!1,item:a,itemId:String(a.id),itemProgress:{},retryAttempts:v,revealAnswers:je.NONE,settings:g,startTime:k,title:b}),R=e?s+1:s,P=m?.activeIndex??0,M=R===P,H=poe(m,a.id),F=H?.isComplete??!1,D=goe(a,H,r,o,T),V=g?.revealAnswers===!0?je.ALL:g?.revealAnswers??je.NONE,W=V===je.ALL||V===je.INCORRECT,_=M&&F&&W,Z=M&&!F&&n6({answersLength:a.answers?.length??0,matches:H?.matches,selectedIndex:H?.selectedIndex,selectedIndices:H?.selectedIndices,text:H?.text,type:a.type});O.current={canSubmit:Z,isCorrect:D,item:a,itemId:String(a.id),itemProgress:H,retryAttempts:v,revealAnswers:V,settings:g,startTime:k,title:b};const oe=H?.selectedIndex,Q=d6({answers:a.answers,feedback:"feedback"in a?a.feedback:void 0,feedbackCorrect:"feedbackCorrect"in a?a.feedbackCorrect:void 0,feedbackIncorrect:"feedbackIncorrect"in a?a.feedbackIncorrect:void 0,feedbackType:"feedbackType"in a?a.feedbackType:void 0,isCorrect:D,isShuffled:r,selectedIndex:oe,shuffledAnswerIndices:a.shuffledAnswerIndices}),U=voe(a,H),B=y?`${j}-error-incomplete-message`:void 0,z=(0,u.useCallback)(()=>{S(!1)},[]),K=String(a.id),Y=(0,u.useCallback)(({selectedIndex:he})=>{z(),i?.({lessonId:t,itemId:K,selectedIndex:he,shuffledAnswerIndices:a.shuffledAnswerIndices})},[t,K,a.shuffledAnswerIndices,i,z]),J=(0,u.useCallback)(he=>{z(),c?.({lessonId:t,itemId:K,text:he})},[t,K,c,z]),q=(0,u.useCallback)(he=>{z(),l?.({lessonId:t,itemId:K,matches:he})},[t,K,l,z]),ee=(0,u.useCallback)(({optionIndex:he})=>{z(),d?.({lessonId:t,itemId:K,selectedIndex:he,shuffledAnswerIndices:a.shuffledAnswerIndices})},[t,K,a.shuffledAnswerIndices,d,z]),se=(0,u.useCallback)((he=()=>{},xe)=>{xe&&he(xe),C?.({lessonId:t})},[t,C]),te=(0,u.useCallback)((he,xe)=>{Ce.pause(),se(he??(()=>{}),xe)},[se]),ye=(0,u.useCallback)(()=>{M&&te()},[M,te]),G=(0,u.useCallback)(he=>{he.preventDefault();const{canSubmit:xe,isCorrect:ge,item:Ke,itemId:wt,itemProgress:Lt,retryAttempts:ot,revealAnswers:St,settings:vn,startTime:$e,title:Je}=O.current;if(!xe){switch(S(!0),Ke.type){case Coe:case yoe:case boe:E.current?.querySelector("input")?.focus();break;case xoe:E.current?.querySelector("button")?.focus();break;default:break}return}O.current.canSubmit=!1;const rt={startTime:$e,stopTime:Date.now()},{passToContinue:kt}=vn??{},ve=vn?.retryCount??-1,He=parseInt(String(ve),10),hs=parseInt(String(ot),10),co=He===hs,Or=L({duration:rt,id:t,isCorrect:ge,item:Ke,itemProgress:Lt,retryAttempts:ot,title:Je});f?.(Or);const Eu={finalRetryAttempt:co,lessonId:t,isCorrect:ge,itemId:wt,passToContinue:kt,revealAnswers:St};if(St===je.ALL||St===je.INCORRECT){x?.(Eu);return}te(x,Eu)},[L,te,t,f,x]),le=(0,u.useCallback)(()=>{w(!0),setTimeout(()=>{h?.(),w(!1)},50)},[h]),me=(0,Me.A)(M)??!1,pe=(0,Me.A)(F)??!1;return(0,u.useEffect)(()=>{!me&&M&&N(Date.now())},[M,me]),{activeIndex:P,canProceed:_,canSubmit:Z,feedbackRef:A,errorIncomplete:y,errorMessageId:B,feedbackValue:Q,handleChoiceSelect:Y,handleFillInChange:J,handleMatchSet:q,handleNextFeedbackClick:ye,handleResponseToggle:ee,handleSubmit:G,handleTakeAgain:le,isActive:M,isComplete:F,isCorrect:D,isRetaking:I,itemProgress:H,prevIsActive:me,prevIsComplete:pe,quizItemHtmlId:j,selection:U,wrapperRef:E}}const Loe=3;function Soe({feedbackRef:e,isActive:t,isComplete:s,isReduceMotion:o,prevIsActive:r,prevIsComplete:a,quizTop:i,revealAnswers:c,scrollId:l}){const d=(0,u.useRef)(void 0);(0,u.useEffect)(()=>()=>{clearTimeout(d.current)},[]),(0,u.useEffect)(()=>{if(!r&&t){const h=i??Loe,m=o?"instant":"smooth";document.getElementById(l??"page-wrap")?.scrollTo({top:h,behavior:m})}},[t,r,o,i,l]),(0,u.useEffect)(()=>{if(!(!t||c===je.NONE||o))return!a&&s&&(clearTimeout(d.current),d.current=setTimeout(()=>{const h=e.current;if(!h)return;const m=h.offsetHeight+h.offsetTop,f=o?"instant":"smooth";document.getElementById(l??"page-wrap")?.scrollTo({top:m,behavior:f})},750)),()=>{clearTimeout(d.current)}},[e,t,s,o,a,c,l])}const koe=$("quiz-item");function Noe({color:e,enableVideoPlaybackSpeed:t,hasStart:s=!1,id:o,index:r,isCard:a=!1,isCorrectAnswerUnshuffled:i,isQuestionBankQuiz:c=!1,isShuffled:l=!1,isTimedQuiz:d,item:h,items:m,labels:f={},onChoiceSelect:v,onFillInChange:C,onMatchSet:g,onResponseToggle:x,onTakeAgain:b,prefersKeyboardNavigation:T,progress:L,quizTop:y,reportAnswer:S,retryAttempts:k=0,scrollId:N,setNextIndex:I,settings:w={revealAnswers:je.ALL},showNextButton:A=!0,submitAction:E,title:j}){const O=u5(),R=Toe({hasStart:s,id:o,index:r,isCorrectAnswerUnshuffled:i,isShuffled:l,item:h,onChoiceSelect:v,onFillInChange:C,onMatchSet:g,onResponseToggle:x,onTakeAgain:b,progress:L,reportAnswer:S,retryAttempts:k,setNextIndex:I,settings:w,submitAction:E,title:j}),{activeIndex:P,feedbackRef:M,isActive:H,isComplete:F,isCorrect:D,prevIsActive:V,prevIsComplete:W}=R,_=w?.revealAnswers===!0?je.ALL:w?.revealAnswers??je.NONE;Soe({feedbackRef:M,isActive:H,isComplete:F,isReduceMotion:O,prevIsComplete:W,prevIsActive:V,quizTop:y,revealAnswers:_,scrollId:N});const Z=(0,n.jsx)(foe,{color:e,enableVideoPlaybackSpeed:t,hasStart:s,index:r,interaction:R,isQuestionBankQuiz:c,isReduceMotion:O,isShuffled:l,item:h,items:m,labels:f,onTakeAgain:b,prefersKeyboardNavigation:T,progress:L,settings:w,showNextButton:A});return a?(0,n.jsx)(aoe,{activeIndex:P,index:s?r+1:r,isActive:H,isComplete:F,isCorrect:D,isTimedQuiz:d,settings:w,children:Z}):(0,n.jsx)("div",{className:koe("wrap"),children:Z})}const nt=$("odometer"),v5=300,C5=700,Ioe=300,Eoe=500,fu=200,joe=170,x5=145,Qs=fu/2,Ys=joe/2,Lc=70,b5=1.5,woe=2.5,Aoe=225,Roe=135,y5=270,Tp=7,Za={start:{dx:-19,dy:8},mid:{dx:-5,dy:22},end:{dx:26,dy:-7}},_o={size:12,topOffset:-3,bottomOffset:21};function Poe(e){return e<.5?16*e**5:1+16*(e-1)**5}function Moe(e){return e<.5?2*e**2:1-(-2*e+2)**2/2}function pu({angle:e,centerX:t,centerY:s,radius:o}){const r=(e-90)*Math.PI/180;return{x:t+o*Math.cos(r),y:s+o*Math.sin(r)}}function Lp({centerX:e,centerY:t,counterClockwise:s=!1,endAngle:o,radius:r,startAngle:a}){const i=pu({angle:a,centerX:e,centerY:t,radius:r}),c=pu({centerX:e,centerY:t,radius:r,angle:o}),d=Math.abs(o-a)>180?"1":"0",h=s?"0":"1";return`M ${i.x} ${i.y} A ${r} ${r} 0 ${d} ${h} ${c.x} ${c.y}`}function T5(e,t,s){return t+s*y5*e/100}function Ooe({hasPassed:e,isResultsVisible:t,isRTL:s,onAnimationDone:o,passingLabel:r,passingScore:a,score:i=0,scoreLabel:c,shouldAnimate:l}){const[d,h]=(0,u.useState)(0),[m,f]=(0,u.useState)(0),[v,C]=(0,u.useState)(!1),x=`hatch-pattern${(0,u.useId)()}`,b=(0,u.useRef)(null),T=(0,u.useRef)(!1),L=(0,u.useRef)([]),y=(0,u.useCallback)(()=>{L.current.forEach(clearTimeout),L.current=[]},[]),S=(0,u.useCallback)(()=>{b.current!==null&&(cancelAnimationFrame(b.current),b.current=null),y()},[y]);(0,u.useEffect)(()=>{t||(S(),T.current=!1,h(0),f(0),C(!1))},[t,S]),(0,u.useEffect)(()=>{if(!t||!l||T.current)return;T.current=!0;const Z=i,oe=setTimeout(()=>{let Q=null;const U=B=>{Q===null&&(Q=B);const z=B-Q,K=Math.min(z/C5,1),Y=Poe(K),J=Moe(K);if(f(Y),h(Math.round(J*Z)),K<1)b.current=requestAnimationFrame(U);else{f(1),h(Z);const q=setTimeout(()=>{C(!0);const ee=setTimeout(()=>{o?.()},Eoe);L.current.push(ee)},Ioe-v5-C5);L.current.push(q)}};b.current=requestAnimationFrame(U)},v5);L.current.push(oe)},[t,l,i,o]),(0,u.useEffect)(()=>()=>{S()},[S]);const k=s?Roe:Aoe,N=s?-1:1,I=T5(a,k,N),w=T5(m*i,k,N),A=k+N*y5,E=pu({centerX:Qs,centerY:Ys,radius:Lc,angle:w}),j=pu({centerX:Qs,centerY:Ys,radius:Lc,angle:I}),O=m*i>=a,R=s?`%${a}`:`${a}%`,P=s?`%${d}`:`${d}%`,M=`${c} ${s?`%${i}`:`${i}%`}`,H=(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("div",{className:nt("pass-mark-label"),children:r}),(0,n.jsx)("div",{className:nt("pass-mark-percent"),children:R})]}),F=Lp({centerX:Qs,centerY:Ys,counterClockwise:s,radius:Lc,startAngle:k,endAngle:A}),D=Lp({centerX:Qs,centerY:Ys,counterClockwise:s,radius:Lc+3,startAngle:I,endAngle:A}),V=m>0?Lp({centerX:Qs,centerY:Ys,counterClockwise:s,radius:Lc,startAngle:k,endAngle:w}):"",W={x:j.x+(s?-13:13),y:j.y-13},_={x:W.x+(s?-13:13),y:W.y};return(0,n.jsxs)("div",{className:nt(),children:[(0,n.jsxs)("svg",{"aria-hidden":"true",className:nt("svg"),viewBox:`0 0 ${fu} ${x5}`,children:[(0,n.jsx)("defs",{children:(0,n.jsx)("pattern",{height:"1.5",id:x,patternTransform:"rotate(45)",patternUnits:"userSpaceOnUse",width:"1.5",children:(0,n.jsx)("line",{className:nt("hatch-line"),x1:"0",x2:"0",y1:"0",y2:"1.5"})})}),(0,n.jsx)("path",{className:nt("passing-zone"),d:D,fill:"none",stroke:`url(#${x})`,strokeWidth:"6"}),(0,n.jsxs)("g",{className:nt("pass-mark-lines"),children:[(0,n.jsx)("line",{className:nt("pass-mark-line"),x1:j.x,x2:W.x,y1:j.y,y2:W.y}),(0,n.jsx)("line",{className:nt("pass-mark-line"),x1:W.x,x2:_.x,y1:W.y,y2:_.y})]}),(0,n.jsx)("path",{className:nt("track"),d:F,fill:"none",strokeWidth:b5}),V&&(0,n.jsx)("path",{className:nt("progress",{passing:O}),d:V,fill:"none",strokeWidth:b5}),m>0&&(0,n.jsx)("circle",{className:nt("dot",{passing:O}),cx:E.x,cy:E.y,r:woe}),v&&(0,n.jsx)("g",{className:nt("result-icon"),children:e?(0,n.jsx)("path",{className:nt("checkmark"),d:`M ${Qs+Za.start.dx} ${Ys+Za.start.dy} L ${Qs+Za.mid.dx} ${Ys+Za.mid.dy} L ${Qs+Za.end.dx} ${Ys+Za.end.dy}`,fill:"none",strokeLinecap:"square",strokeLinejoin:"miter",strokeWidth:Tp}):(0,n.jsxs)("g",{className:nt("x-mark"),children:[(0,n.jsx)("path",{className:nt("x-line",{first:!0}),d:`M ${Qs-_o.size} ${Ys+_o.topOffset} L ${Qs+_o.size} ${Ys+_o.bottomOffset}`,fill:"none",strokeLinecap:"square",strokeWidth:Tp}),(0,n.jsx)("path",{className:nt("x-line",{second:!0}),d:`M ${Qs+_o.size} ${Ys+_o.topOffset} L ${Qs-_o.size} ${Ys+_o.bottomOffset}`,fill:"none",strokeLinecap:"square",strokeWidth:Tp})]})})]}),(0,n.jsxs)("div",{className:nt("score",{pass:v&&e,fail:v&&!e}),children:[(0,n.jsx)("div",{className:nt("score-label"),children:c}),(0,n.jsx)("div",{className:nt("pass-label"),children:M}),(0,n.jsx)("div",{className:nt("fail-label"),children:M}),(0,n.jsx)("div",{className:nt("score-percent",{hidden:v}),children:P})]}),(0,n.jsx)("div",{className:nt("pass-mark"),style:{"--pass-mark-x":`${(s?fu-_.x:_.x)/fu*100}%`,"--pass-mark-y":`${(_.y+3)/x5*100}%`},children:H}),(0,n.jsx)("div",{className:nt("pass-mark-mobile"),children:H})]})}const L5=(0,u.createContext)({handleExpiredQuiz:Kt,hideTimer:Kt,quizTime:0,resetQuizTimer:Kt,timerDuration:0,timerHidden:!1,timerRunning:!1});function Boe({children:e,handleExpiredQuiz:t=()=>{},isTimedQuiz:s,courseProgress:o,setQuizLessonTimeRemaining:r=()=>{},timerDuration:a=10}){const i=(0,u.useRef)(void 0),[c,l]=(0,u.useState)(),[d,h]=(0,u.useState)(!1),[m,f]=(0,u.useState)(!1),[v,C]=(0,u.useState)(),g=(0,u.useMemo)(()=>Number(a),[a]),{activeIndex:x,endIndex:b,lessonId:T,lessonProgress:L,startIndex:y}=(0,u.useMemo)(()=>{const M=o?.currentLesson,H=o?.lessons?.[M],F=H?.activeIndex||0,D=Object.keys(H?.items||{}).length+1;return{activeIndex:F,lessonId:M,endIndex:D,lessonProgress:H,startIndex:0}},[o]),S=(0,Me.A)(T),k=(0,Me.A)(x),N=(0,u.useCallback)(()=>{l(g*60)},[g]),I=(0,u.useCallback)(()=>{l(M=>M-1)},[l]),w=(0,u.useCallback)(()=>{h(!0),i.current||(i.current=setInterval(I,1e3))},[I,h]),A=(0,u.useCallback)(M=>{f(M!==void 0?M:!m)},[m]),E=(0,u.useCallback)(()=>{h(!1),i.current&&(i.current=clearInterval(i.current))},[h]),j=(0,u.useCallback)(()=>{c&&v!==void 0&&r({lessonId:v,timeRemaining:c})},[v,c,r]),O=(0,u.useCallback)(()=>{j(),l(void 0)},[l,j]),R=(0,u.useCallback)(()=>l(L.timeRemaining||g*60),[L,g,l]);(0,u.useEffect)(()=>{if(!s)return;const M=S!==T,H=M&&c,F=M&&s;s&&!M&&v!==T&&C(T),H&&O(),F&&R()},[s,v,T,S,c,R,O]),(0,u.useEffect)(()=>{if(s)switch(x){case y:E();break;case b:N(),E();break;default:w(),k!==x&&S===T&&j()}},[x,b,s,T,k,S,N,y,w,E,j]),(0,u.useEffect)(()=>{s&&c<1&&E()},[s,c,E]);const P=(0,u.useMemo)(()=>({handleExpiredQuiz:t,hideTimer:A,quizTime:c,resetQuizTimer:N,timerDuration:g,timerHidden:m,timerRunning:d}),[t,A,c,N,g,m,d]);return(0,n.jsx)(L5.Provider,{value:P,children:e})}const S5=()=>(0,u.useContext)(L5),Doe=e=>e.isTimedQuiz?(0,n.jsx)(Boe,{...e,children:e.children}):(0,n.jsx)(n.Fragment,{children:e.children}),Foe={currentLesson:void 0,isRestricted:!1,isRestrictedCourse:!1,restrictingQuiz:{}};function Hoe(e){const t=re(),s=fr(),o=Vt(e??""),r=(0,u.useMemo)(()=>{if(!t||!s||!o)return Foe;const l=rh({course:t,courseProgress:s});return mh({course:t,courseProgress:s,lesson:o,restrictingQuiz:l})},[t,s,o]),{restrictingQuiz:a}=r,i="title"in a?a.title:void 0,c=lt(i);return(0,u.useMemo)(()=>i?{...r,restrictingQuiz:{...a,title:c}}:r,[r,a,i,c])}const k5=$("quiz-results");function $oe({skipToLessonId:e}){const t=be(),s=hj(e),o=xh(),{lessonPreposition:r,quizSkipAhead:a}=t??{},i=s>0&&a&&r?`${a} ${s} ${r} ${o}`:a;return i?(0,n.jsxs)(Yd,{className:"continue-btn--flex",href:Ns(e),testId:"quiz-skip-ahead-btn",children:[(0,n.jsx)(ie,{"aria-hidden":"true",name:"arrow-right-from-line"}),i]}):null}function Voe({isFooterVisible:e,isResultsVisible:t,onTryAgainFocus:s}){const o=ct(),r=Es(),a=hl(r),{passed:i=!1,retryAttempts:c=0}=a??{},{continueType:l,retryCount:d,skipLessonsIfPassed:h,skipLessonsOptional:m,skipToLessonId:f}=bh(r),{resetQuizTimer:v}=S5(),C=Ine(l),g=be(),x=xj(r),b=Hoe(x),{isRestricted:T}=b,{courseFinish:L,quizContinue:y,quizTakeAgain:S}=g??{},k=h&&i&&!!f,N=C,I=Ene({canShowContinue:N,isExport:p8(),isRiseCom:!1,nextLesson:x}),w=(0,u.useCallback)(()=>{v(),o(bv(r))},[o,v,r]),A=N&&T&&x&&g&&(0,n.jsx)(My,{bgType:"transparent",text:PE({labels:g,restrictions:b})}),E=N&&!T&&x&&(!k||m)&&y&&(0,n.jsx)(Yd,{className:k?"continue-btn--outline":void 0,href:Ns(x),text:y}),j=I&&L&&(0,n.jsx)(Yd,{href:Wg,text:L}),O=(d===-1||c<d)&&(0,n.jsxs)(Fy,{allowTabNavigation:t,onClick:w,onFocus:s,size:"lg",testId:"quiz-take-again-button",children:[(0,n.jsx)(ie,{"aria-hidden":"true",name:"arrow-rotate-left"}),S]});return(0,n.jsx)("div",{className:k5("footer",{active:t}),"data-testid":"quiz-results-footer",children:(0,n.jsxs)("div",{className:k5("footer-items",{hidden:!e}),inert:e?void 0:!0,children:[k&&(0,n.jsx)($oe,{skipToLessonId:f}),A,E,j,O]})})}const Xa=$("quiz-results");function zoe({questionCount:e}){const t=ct(),s=Es()??"",o=hl(s),{activeIndex:r=0,passed:a=!1,passingScore:i=80,reportResults:c=!1,score:l=0}=o??{},d=be(),h=on(),{skipLessonsIfPassed:m,skipToLessonId:f}=bh(s),[v,C]=(0,u.useState)(!1),g=e+1===r,x=(0,u.useRef)(g),b=(0,u.useRef)(void 0),T=(0,u.useRef)(void 0),L=(0,u.useRef)(null),y=(0,u.useId)(),{a11yQuizFailed:S="",a11yQuizPassed:k="",quizPassing:N="",quizResults:I="",quizScore:w=""}=d??{},A=`quiz-results-desc-${y}`,E=(0,u.useCallback)(()=>{T.current=setTimeout(()=>{C(!0),window.dispatchEvent(new CustomEvent(Yl))},500)},[]),j=(0,u.useCallback)(()=>{clearTimeout(T.current),T.current=void 0,C(!0)},[]);return(0,u.useEffect)(()=>()=>{clearTimeout(T.current)},[]),(0,u.useEffect)(()=>{g!==x.current&&(g?L.current?.focus():C(!1),x.current=g)},[g]),(0,u.useEffect)(()=>{if(!g||!a||!m||!f){b.current=void 0;return}const O=`${s}:${f}`;b.current!==O&&(b.current=O,t(Fk({quizId:s,destinationId:f})))},[t,a,g,s,m,f]),(0,n.jsx)("div",{className:Xa(),children:(0,n.jsx)("div",{className:Xa("container"),children:(0,n.jsxs)("div",{className:Xa("content",{active:g}),"data-testid":"quiz-results",children:[(0,n.jsxs)("div",{className:Xa("header"),children:[(0,n.jsx)("h1",{"aria-describedby":A,className:Xa("label").mix("noOutline"),ref:L,tabIndex:-1,children:I}),(0,n.jsxs)("div",{className:"visually-hidden-always",id:A,children:[(0,n.jsx)("div",{children:`${N}: ${i}%`}),(0,n.jsx)("div",{children:`${w}: ${l}%`}),(0,n.jsx)("div",{children:a?k:S})]})]}),(0,n.jsx)("div",{"aria-hidden":"true",className:Xa("results"),children:(0,n.jsx)(Ooe,{hasPassed:a,isResultsVisible:g,isRTL:h,onAnimationDone:E,passingLabel:N,passingScore:i,score:l,scoreLabel:w,shouldAnimate:c})}),(0,n.jsx)(Voe,{isFooterVisible:v,isResultsVisible:g,onTryAgainFocus:j})]})})})}const Uoe=5,_oe=15,Goe=30,Woe=60,Koe=180,N5=300,I5=600,E5=120,Qoe=e=>e<=Uoe?{regularInterval:Woe,lowTimeThreshold:E5}:e<=_oe?{regularInterval:Koe,lowTimeThreshold:E5}:e<=Goe?{regularInterval:N5,lowTimeThreshold:N5}:{regularInterval:I5,lowTimeThreshold:I5},Yoe=(e,t,s,o)=>{const r=Math.floor(o/60),a=o%60,i=r===1?e:t;if(r>0&&a>0)return`${s}: ${r} ${i} and ${a} seconds`;if(r>0&&a===0)return`${s}: ${r} ${i}`;if(r===0&&a>0)return`${s}: ${a} seconds`};var Mn=p(82920);const us=$("quiz-timer"),Sp=(e,t)=>`${e.toString().padStart(2,"0")}:${t.toString().padStart(2,"0")}`,Zoe=e=>{const t=Math.floor(e/60),s=e%60;return Sp(t,s)},j5=e=>{const t=Math.floor(e/60),s=e%60;return Sp(t,s)},Xoe=e=>Sp(e,0),w5=({area:e,exitCourseEnabled:t=!1,isStartScreenActive:s=!1,isEndScreenActive:o=!1,labelQuizTimerElapsed:r,labelQuizTimerExpired:a,labelQuizTimerExpiredAction:i,labelQuizTimerExpiredMessage:c,labelQuizTimerHide:l,labelQuizTimerLimit:d,labelQuizTimerMinute:h,labelQuizTimerMinutePlural:m,labelQuizTimerRemaining:f,labelQuizTimerShow:v,timerDisplay:C=lr.REMAINING,timerEnabled:g=!1})=>{const[x,b]=Mn.useState(!1),[T,L]=Mn.useState(""),y=Mn.useRef(null),S=Mn.useRef(!1),{hideTimer:k,quizTime:N,timerDuration:I,timerHidden:w,timerRunning:A,handleExpiredQuiz:E}=S5(),j=I*60,{isCover:O,isHeader:R,isHidden:P}=Mn.useMemo(()=>({isCover:e==="cover",isHeader:e==="header",isHidden:C===lr.HIDE_TIMER}),[e,C]),M=s&&!O,H=Mn.useMemo(()=>Qoe(I),[I]),F=Mn.useMemo(()=>({expired:a||"Time expired",minute:h||"minute",minutePlural:m||"minutes",remaining:f||"Time left"}),[a,h,m,f]),D=()=>{b(!1),E()},V=Mn.useCallback(()=>{const{regularInterval:oe,lowTimeThreshold:Q}=H,U=N<=Q&&N>0&&!S.current,B=y.current!==null&&y.current-N>=oe,z=y.current===null;if(U||B){U&&(S.current=!0),y.current=N;const K=Yoe(F.minute,F.minutePlural,F.remaining,N);L(K)}z&&(y.current=N)},[H,N,F]);if(Mn.useEffect(()=>{g&&N!==0&&(O||V())},[V,O,g,A,N]),Mn.useEffect(()=>{if(!g||N!==0||s)return;const oe=setTimeout(()=>{b(!0)},1200);return()=>clearTimeout(oe)},[N,g,s]),!g||M||o)return null;const W={"header-area":R,"cover-area":O,"hide-timer":P,"exit-course":t},_={display:[O,R&&!s].some(Ne())?null:"none"},Z=()=>({[lr.SUMMARY]:(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)("div",{className:us("label"),children:[d,":"]}),(0,n.jsxs)("div",{className:us("value"),children:[I," ",I===1?h:m]})]}),[lr.REMAINING]:(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)("div",{className:us("label"),children:[f,":"]}),(0,n.jsx)("div",{className:us("value"),children:Zoe(N)})]}),[lr.ELAPSED]:(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)("div",{className:us("label"),children:[r,":"]}),(0,n.jsx)("div",{className:us("value"),children:j5(j-N)})]}),[lr.ELAPSED_TOTAL]:(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)("div",{className:us("label"),children:[r,":"]}),(0,n.jsxs)("div",{className:us("value"),children:[j5(j-N)," /"," ",Xoe(I)]})]})})[O?lr.SUMMARY:C];return(0,n.jsxs)("div",{className:us(W),"data-testid":"quiz-timer",style:_,children:[N!==0&&(0,n.jsx)("div",{"aria-atomic":"true","aria-live":"polite",className:"visually-hidden",role:"status",children:T}),N===0&&(0,n.jsx)("div",{className:"visually-hidden",role:"alert",children:a||"Time expired"}),R&&w?(0,n.jsxs)("button",{className:us("hide"),onClick:()=>k(!1),type:"button",children:[(0,n.jsx)(ie,{className:us("icon"),name:"stopwatch-regular"}),v]}):(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)("div",{className:us("time"),children:[(0,n.jsx)(ie,{className:us("icon"),name:"stopwatch-regular"}),(0,n.jsx)("div",{className:us("desc"),children:Z()})]}),R&&(0,n.jsx)("button",{className:us("hide"),onClick:()=>k(!0),type:"button",children:l})]}),!O&&x&&In.createPortal((0,n.jsxs)(ud,{className:"quiz-timer-modal","data-testid":"quiz-timer-modal",disableBackgroundScroll:!0,heading:a,hideCloseButton:!0,onCancel:D,onClose:D,onOverlayClick:()=>{},children:[(0,n.jsx)("p",{children:c}),(0,n.jsx)("button",{"data-testid":"quiz-view-results-button",onClick:D,type:"button",children:i})]}),wo({childType:"dialog"}))]})},On=$("quiz-start"),qoe=e=>(e?.retryAttempts??0)>0;function Joe({lessonId:e,isActive:t}){const s=ct(),o=(0,u.useRef)(null),r=hl(e),a=be(),i=re(),c=oh(),l=Vt(e),d=$C(),h=de(VC),m=c?.authorName,f=c?.avatar,v=i?.theme?.showAuthor??!1,C=i?.theme?.showLessonCount??!1,g=d[e]??0,x=lt(l?.description),b=lt(l?.title),T=l?.settings?.timer,L=l?.settings?.asLesson!==!1,{a11yAuthorPrefix:y="",lessonName:S="",lessonPreposition:k="",quizStart:N="",quizTakeAgain:I="",quizTimerElapsed:w="",quizTimerExpired:A="",quizTimerExpiredAction:E="",quizTimerExpiredMessage:j="",quizTimerHide:O="",quizTimerLimit:R="",quizTimerMinute:P="",quizTimerMinutePlural:M="",quizTimerRemaining:H="",quizTimerShow:F=""}=a??{},D=qoe(r),V=t&&D,W=D?"quiz-take-again-button":"quiz-start-button";(0,u.useEffect)(()=>{V&&o.current?.focus()},[V]);const _=()=>{s(A0({lessonId:e}))},Z=D?I:N;return(0,n.jsx)("div",{"aria-hidden":!t,className:On(),children:(0,n.jsx)("div",{className:On("container"),children:(0,n.jsxs)("div",{className:On("content"),children:[(0,n.jsxs)("div",{className:On("header"),children:[(0,n.jsx)("div",{className:On("counter"),children:L&&C&&(0,n.jsx)("div",{className:On("count"),children:`${S} ${g} ${k} ${h}`})}),(0,n.jsx)("h1",{ref:o,tabIndex:-1,children:(0,n.jsx)(ke,{className:On("title"),value:b})}),v&&f&&m?(0,n.jsxs)("div",{className:On("author"),children:[(0,n.jsx)("img",{alt:"",src:Tg(f)}),(0,n.jsxs)("span",{className:"visually-hidden",children:[y," ",m]}),(0,n.jsx)("span",{"aria-hidden":"true",children:m})]}):null]}),T&&(0,n.jsx)(w5,{area:"cover",exitCourseEnabled:i?.lmsOptions?.enableExitCourse,isStartScreenActive:t,labelQuizTimerElapsed:w,labelQuizTimerExpired:A,labelQuizTimerExpiredAction:E,labelQuizTimerExpiredMessage:j,labelQuizTimerHide:O,labelQuizTimerLimit:R,labelQuizTimerMinute:P,labelQuizTimerMinutePlural:M,labelQuizTimerRemaining:H,labelQuizTimerShow:F,timerEnabled:T}),(0,n.jsx)(ke,{allowTabNavigation:t,className:On("description"),value:x}),(0,n.jsx)(dn.ArcButton,{className:On("start-button"),"data-testid":W,hierarchy:"plain",iconEnd:(0,n.jsx)(ie,{name:"chevron-right-solid"}),onClick:t?_:Kt,size:"sm",tabIndex:t?void 0:-1,children:Z})]})})})}function ere(){const[e,t]=(0,u.useState)();return(0,u.useEffect)(()=>{const s=document.querySelector("[data-previous-lesson]");if(!s)return;t(s.clientHeight);const o=new ResizeObserver(([r])=>{t(r.target.clientHeight)});return o.observe(s),()=>{o.disconnect()}},[]),e}const A5=$("quiz");function tre(){const e=Es();return e?(0,n.jsx)(sre,{lessonId:e}):null}function sre({lessonId:e}){const t=re(),s=t?.color,o=be(),a=Fi()?.prefersKeyboardNavigation??!1,i=ra(e)??"",{activeIndex:c,progress:l,resolvedItems:d,retryAttempts:h,settings:m,sourceItems:f}=Zne({lessonId:e}),v=$ne({settings:m}),C=ere();ooe({lessonId:e,items:f});const g=Dne(d.length),x=Fne(c),{items:b,startOffset:T}=Hne(d,c);return(0,n.jsxs)("section",{className:A5(),"data-quiz":!0,"data-testid":"quiz",children:[m?.timer&&(0,n.jsx)(w5,{area:"header",exitCourseEnabled:t?.lmsOptions?.enableExitCourse,isEndScreenActive:c===g,isStartScreenActive:c===0,labelQuizTimerElapsed:o?.quizTimerElapsed,labelQuizTimerExpired:o?.quizTimerExpired,labelQuizTimerExpiredAction:o?.quizTimerExpiredAction,labelQuizTimerExpiredMessage:o?.quizTimerExpiredMessage,labelQuizTimerHide:o?.quizTimerHide,labelQuizTimerLimit:o?.quizTimerLimit,labelQuizTimerMinute:o?.quizTimerMinute,labelQuizTimerMinutePlural:o?.quizTimerMinutePlural,labelQuizTimerRemaining:o?.quizTimerRemaining,labelQuizTimerShow:o?.quizTimerShow,timerDisplay:m?.timerDisplay??void 0,timerEnabled:m?.timer}),(0,n.jsxs)("div",{className:A5("wrap"),children:[x&&(0,n.jsx)("div",{className:xp({activeIndex:c,index:0}),children:(0,n.jsx)(Joe,{isActive:c===0,lessonId:e})}),b.map((L,y)=>{const S=L.type===ns.MULTIPLE_CHOICE;return(0,n.jsx)(Noe,{color:s,hasStart:!0,id:e,index:y+T,isCard:!0,isCorrectAnswerUnshuffled:S?Rne(L.shuffledAnswerIndices,L.answers,L.correct):void 0,isShuffled:Ane(L.shuffledAnswerIndices,L.answers),isTimedQuiz:m?.timer,item:L,items:d,labels:o??{},onChoiceSelect:v.onChoiceSelect,onFillInChange:v.onFillInChange,onMatchSet:v.onMatchSet,onResponseToggle:v.onResponseToggle,prefersKeyboardNavigation:a,progress:l,quizTop:C,reportAnswer:Lg,retryAttempts:h,scrollId:"page-wrap",setNextIndex:v.onSetIndex,settings:m??void 0,submitAction:v.onSubmit,title:i},`item-${L.id}`)}),(0,n.jsx)("div",{className:xp({activeIndex:c,index:g}),inert:g===c?void 0:!0,children:(0,n.jsx)(zoe,{questionCount:d.length})})]})]})}const nre=({lessonProgress:e})=>(0,n.jsx)("div",{className:"page page--lessonTypeQuiz","data-page":!0,children:(0,n.jsx)("div",{className:"page__wrapper",children:(0,n.jsx)(kd,{children:(0,n.jsxs)("div",{className:"page__content",children:[(0,n.jsx)(n3,{lessonProgress:e,type:"quiz"}),(0,n.jsx)(tre,{},e?.retryAttempts??0)]})})})});function ore({isOnePageCourse:e,lessonHeaderProps:t,progress:s}){return e?(0,n.jsx)(c3,{}):(0,n.jsx)(TG,{...t,children:s})}function rre({blocksProps:e,lesson:t,quizProps:s}){return t.type==="blocks"?(0,n.jsx)(Nne,{...e,data:t}):t.type==="quiz"?(0,n.jsx)(nre,{...s}):null}function are(e){return(0,n.jsx)(e3,{...e})}const{LARGE:ire,SMALL:cre}=li,{ACCENT:lre,BLACK:dre,COLOR:R5,DARK:ure,GRAY:hre,IMAGE:P5,LIGHT:mre,TINT:fre}=ne,pre=$("lesson-header-wrap");function gre({handleNavigate:e,handleStorylineFullscreen:t,isMobileHeader:s,isProgressSummary:o,lessonProgress:r,navigateDirection:a,onNavigateTransitionEnd:i,onPageReady:c,ref:l,registerLesson:d,unregisterLesson:h,visibleLessons:m}){const{didNavigate:f,previewType:v}=Vm(),C=(0,u.useRef)(null),g=(0,u.useRef)(0),x=Ot(),b=(0,we.g)(),T=Ci(),L=fr(),y=be(),S=Mi(),k=Fi(),[N,I]=(0,u.useState)(!1),w=b.mode||"",A=b.lessonId,E=o?fG:r?.index!=null?T?.lessons?.[r.index]??{}:{},j=o?null:wC({course:T,lesson:E}),O=o?0:ME({course:T,lesson:E}),R=OE(T),P=(0,u.useCallback)((Je,rt)=>{const kt=a(),ve=C.current;if(!ve){rt();return}const He=`page ${kt}-${Je}`,hs=()=>{Je==="enter"?ve.className=`page ${kt}-complete`:ve.className="page",s3.removeEventListeners(ve,hs),window.dispatchEvent(new CustomEvent(px)),i(),rt()};ve.className=He,s3.addEventListeners(ve,hs)},[a,i]);(0,u.useImperativeHandle)(l,()=>({componentWillEnter(Je){P("enter",Je)},componentDidEnter(){I(!0)},componentWillExit(Je){const rt=document.getElementById("page-wrap"),kt=rt?.scrollTop??0;rt&&(rt.scrollTop=0),g.current=kt,P("leave",Je),window.dispatchEvent(new CustomEvent(fx)),C.current&&(C.current.scrollTop=g.current)},componentDidExit(){}}),[P]),(0,u.useEffect)(()=>(I(!0),o||(Sg(A),ps(Qk(A))),d(A),()=>{h(A)}),[]),xG({didNavigate:f,hasTransitioned:N,onPageReady:c});const M=CG(T?.theme),H=E,{author:F,selectedAuthorId:D}=H,{prefersKeyboardNavigation:V}=k??{},{authors:W,color:_,enableVideoPlaybackSpeed:Z,lessonHeaderImage:oe,showLessonCount:Q,showNavigationButtons:U,theme:B}=T??{},{hideLessonHeaders:z,lessonHeaderColor:K,lessonHeaderImageColor:Y,lessonHeaderSize:J,lessonHeaderStyle:q,navigationType:ee,showAuthor:se}=B??{},te=S.length>0,ye=te?S.find(Je=>Je.id===D):void 0,G=te?ye?.data?.authors:void 0,{avatar:le,authorName:me}=t3({authors:W,lessonAuthor:F,courseAuthor:T?.author,selectedAuthorId:D}),pe=rh({course:T,courseProgress:L}),he=o?{}:mh({course:T,courseProgress:L,lesson:j,restrictingQuiz:pe}),xe=Zb(E),ge=ore({isOnePageCourse:Vn(T),lessonHeaderProps:{authorName:me,avatar:le,color:_,description:H.description,labels:y,lessonHeaderColor:K,lessonHeaderImageColor:Y,lessonHeaderSize:J,lessonHeaderStyle:q,lessonNumber:O,partnerContentAuthors:G,showAuthor:se,showLessonCount:Q,title:H.title,totalLessons:R},progress:o?null:(0,n.jsx)(n3,{id:H.id,items:H.items,lessonProgress:r,navigationType:ee,scrollPosition:0,type:H.type})}),wt=`image-${(Y??at.DARK).toLowerCase()}`,Lt=pre({[wt]:q===P5,accent:q===lre,black:q===dre,collapsed:z,custom:q===R5,dark:q===ure,gray:q===hre,image:q===P5,large:J===ire&&!s,light:q===mre,mobile:s,small:J===cre&&!s,tint:q===fre}),ot=q===R5?{"--lesson-header-contrast-color":M,"--color-background":K}:{},St=x(T?.title),vn={authorName:me,avatar:le,color:_,courseTitle:St,data:E,enableVideoPlaybackSpeed:Z,handleStorylineFullscreen:t,hideLessonHeaders:z,isLesson:dr(H),labels:y,lessonHeader:ge,lessonHeaderImage:oe,lessonHeaderWrapClasses:Lt,lessonHeaderWrapStyles:ot,lessonHasContinues:xe,lessonNumber:O,lessonProgress:r,loadMedia:A===m[0],mode:w,nextLesson:j?.id??null,nextLessonRestrictions:he,partnerContent:S,prefersKeyboardNavigation:V,previewType:v,scrollPosition:0,showAuthor:se,showLessonCount:Q,showNavigationButtons:U,totalLessons:R},$e=o?are({...vn,course:T,courseProgress:L,labels:y,lessons:T?.lessons,sessionPreferences:k}):rre({blocksProps:{animateBlockEntrance:T?.animateBlockEntrance??!1,color:_,courseTitle:St,enableVideoPlaybackSpeed:Z,handleNavigate:e,handleStorylineFullscreen:t,hideLessonHeaders:z??void 0,labels:y,lessonHeader:ge,lessonHeaderWrapClasses:Lt,lessonHeaderWrapStyles:ot,lessonProgress:r?.type==="blocks"?r:void 0,loadMedia:A===m[0],nextLesson:j?.id??null,prefersKeyboardNavigation:V,previewType:v},lesson:H,quizProps:{lessonProgress:r?.type==="quiz"?r:void 0}});return(0,n.jsx)(Lr,{title:Yi(`${x(H.title)} - ${St}`),children:(0,n.jsx)("div",{className:"page page-transition-complete","data-lesson-id":A,ref:C,children:$e})})}function vre(e){const{visibleLessons:t,registerLesson:s,unregisterLesson:o}=vG();return(0,n.jsx)(gre,{...e,registerLesson:s,unregisterLesson:o,visibleLessons:t})}const Cre=vre;var M5=p(56668);function xre(e){const t=be(),s=dj(e),o=uj(e),r=xh(),a=s?.id,i=Si(a),c=lt(i?.data);return{lessonNameLabel:t?.lessonName,lessonPrepositionLabel:t?.lessonPreposition,nextLesson:s,nextLessonNumber:o,restrictionData:a?c:void 0,restrictionType:a?i?.type:void 0,totalLessons:r}}const gu=$("lesson-nav");function bre({allowTooltip:e,lessonNameLabel:t,lessonPrepositionLabel:s,nextLesson:o,nextLessonNumber:r,onFocus:a,ref:i,restrictionData:c,restrictionType:l,totalLessons:d}){const h=o?.id,m=br(),f=Ta(m),C=o&&dr(o)&&h,g=Ae(o?.title)||"",x=C?`${r} ${s} ${d} \u2014 ${g}`:g,b=f&&C?`${t} ${r}`:x;return(0,n.jsx)(La,{allowTooltip:e,direction:"next",navLessonId:h,onFocus:a,ref:i,restrictionData:c,restrictionType:l,children:f?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("span",{className:gu("link-text"),children:b}),(0,n.jsx)(_l,{className:gu("link-icon")})]}):(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(_l,{className:gu("link-icon")}),(0,n.jsx)("span",{className:gu("link-text"),children:b})]})})}const yre=Oe("LessonNavNext",bre);function O5({lessonId:e,...t}){const s=xre(e);return(0,n.jsx)(yre,{...t,...s})}const vu=$("lesson-nav");function Tre({allowTooltip:e,courseFinishLabel:t,onFocus:s,ref:o,restrictionData:r,restrictionType:a}){const i=br(),c=Ta(i);return(0,n.jsx)(La,{allowTooltip:e,direction:"next",finish:!0,onFocus:s,ref:o,restrictionData:r,restrictionType:a,children:c?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("span",{className:vu("link-text"),children:t}),(0,n.jsx)(_l,{className:vu("link-icon")})]}):(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(_l,{className:vu("link-icon")}),(0,n.jsx)("span",{className:vu("link-text"),children:t})]})})}const Lre=Oe("LessonNavFinish",Tre);function kp(e){const s=be()?.courseFinish??"Finish";return(0,n.jsx)(Lre,{...e,courseFinishLabel:s})}const Cu=$("lesson-nav");function Sre({allowTooltip:e,className:t,courseHomeLabel:s,lessonNameLabel:o,lessonPrepositionLabel:r,onFocus:a,previousLesson:i,previousLessonNumber:c,ref:l,totalLessons:d}){const h=i?.id,m=br(),f=Ta(m),C=dr(i)&&h!=null,g=lt(i?.title)??s,x=C?`${c} ${r} ${d} \u2014 ${g}`:g,b=f&&C?`${o} ${c}`:x;return(0,n.jsx)(La,{allowTooltip:e,className:t,direction:"previous",navLessonId:h,onFocus:a,ref:l,children:f?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("span",{className:Cu("link-text"),children:b}),(0,n.jsx)(rx,{className:Cu("link-icon")})]}):(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(rx,{className:Cu("link-icon")}),(0,n.jsx)("span",{className:Cu("link-text"),children:b})]})})}const kre=Oe("LessonNavPrevious",Sre);function Np({lessonId:e,...t}){const s=yj(e),o=Tj(e),r=xh(),a=be();return(0,n.jsx)(kre,{...t,courseHomeLabel:a?.courseHome,lessonNameLabel:a?.lessonName,lessonPrepositionLabel:a?.lessonPreposition,previousLesson:s,previousLessonNumber:o,totalLessons:r})}const Nre={threshold:0},xu=(e,t)=>{const[s,o]=(0,u.useState)(!1),r=(0,u.useRef)(null);return(0,u.useEffect)(()=>{r.current&&r.current.disconnect(),r.current=new IntersectionObserver(([i])=>{o(i.isIntersecting)},t||Nre);const{current:a}=r;return e.current?a.observe(e.current):o(!1),()=>{a.disconnect()}},[e,t]),s},B5=$("navButtonsFull"),Ire=()=>{const[e,t]=(0,u.useState)(!1);return(0,qe.A)(fx,()=>t(!0)),(0,qe.A)(px,()=>t(!1)),e},Ere=({isVisible:e})=>{(0,M5.A)(()=>window.dispatchEvent(new CustomEvent(Tm))),(0,u.useEffect)(()=>{const t=e?gx:Tm;window.dispatchEvent(new CustomEvent(t))},[e])},jre=({isVisible:e})=>{(0,M5.A)(()=>window.dispatchEvent(new CustomEvent(Lm))),(0,u.useEffect)(()=>{const t=e?vx:Lm;window.dispatchEvent(new CustomEvent(t))},[e])},wre=({children:e,hideNavToHome:t,navNextEnabled:s,navFinishEnabled:o})=>{const r=(0,u.useRef)(null),a=(0,u.useRef)(null),i=(0,u.useRef)(null),c=(0,u.useRef)(null),l=Es(),d=xu(a),h=xu(i),m=Ire(),f=(0,u.useCallback)(()=>{r.current?.scrollTo({top:0,behavior:"smooth"})},[]),v=(0,u.useCallback)(()=>{const g=r.current?.scrollHeight;r.current?.scrollTo({top:g,behavior:"smooth"})},[]);(0,qe.A)(Ql,f),(0,qe.A)(Yl,v),Ere({isVisible:d}),jre({isVisible:h}),(0,u.useEffect)(()=>{if(!m&&a.current){const x=(a.current?.clientHeight??0)+1;r.current?.scrollTo({top:x})}},[m]);const C=B5("navPrev",{visible:d,hide:m});return(0,n.jsx)("div",{className:"page-wrap",id:"page-wrap",ref:r,children:(0,n.jsxs)("div",{className:B5(),children:[!t&&l&&(0,n.jsx)("div",{className:C,children:(0,n.jsx)(Np,{lessonId:l,ref:a})}),e,s&&l&&(0,n.jsx)(O5,{lessonId:l,ref:i}),o&&(0,n.jsx)(kp,{lessonId:l,ref:c})]})})},Sc=$("navButtonsFloating"),D5=({transitionIn:e,buttonType:t,children:s})=>{const o=(0,u.useRef)(null),r={entered:Sc(t,{entered:!0}),exiting:Sc(t,{exiting:!0}),exited:Sc(t,{exited:!0})};return(0,n.jsx)(Ac,{in:e,nodeRef:o,timeout:250,children:a=>(0,n.jsx)("div",{className:r[a],ref:o,children:s})})},Are=250,F5={threshold:.2},Rre=({topRef:e,bottomRef:t,pageWrapRef:s,currentLessonId:o})=>{const r=xu(e,F5),a=xu(t,F5),[i,c]=(0,u.useState)(!1),[l,d]=(0,u.useState)(!1),[h,m]=(0,u.useState)(!1),f=(0,u.useCallback)(()=>{s.current?.scrollTo({top:2,behavior:"smooth"})},[s]);return(0,Id.A)(f),(0,u.useEffect)(()=>{c(!0);const v=setTimeout(()=>{f(),c(!1)},Are);return()=>{clearTimeout(v)}},[o,f]),(0,u.useEffect)(()=>{d(a&&!i),m(r&&!i)},[a,r,i]),{showPrev:h,showNext:l}},Pre=({children:e,isCurrentLessonQuiz:t,navNextEnabled:s,hideNavToHome:o,navFinishEnabled:r})=>{const a=(0,u.useRef)(null),i=(0,u.useRef)(null),c=(0,u.useRef)(null),l=(0,u.useRef)(null),d=(0,u.useRef)(null),h=(0,u.useRef)(null),m=Es(),{showNext:f,showPrev:v}=Rre({topRef:d,bottomRef:h,pageWrapRef:a,currentLessonId:m}),C=(0,u.useCallback)(()=>{a.current?.scrollTo({top:0,behavior:"smooth"})},[]),g=(0,u.useCallback)(()=>{const x=a.current?.scrollHeight;a.current?.scrollTo({top:x,behavior:"smooth"})},[]);return(0,qe.A)(Ql,C),(0,qe.A)(Yl,g),(0,u.useEffect)(()=>{t&&(s||r)&&g()},[t,s,r,g]),(0,n.jsxs)("div",{className:"page-wrap",id:"page-wrap",ref:a,children:[(0,n.jsx)("div",{className:Sc("top"),ref:d}),!o&&m&&(0,n.jsx)(D5,{buttonType:"prev",transitionIn:v,children:(0,n.jsx)(Np,{lessonId:m,onFocus:C,ref:i})}),e,(0,n.jsx)(D5,{buttonType:"next",transitionIn:f&&!!(s||r),children:s&&m?(0,n.jsx)(O5,{lessonId:m,onFocus:g,ref:c}):r?(0,n.jsx)(kp,{lessonId:m,onFocus:g,ref:l}):null}),(0,n.jsx)("div",{className:Sc("bottom"),ref:h})]})};var bu=p(82920);class Mre extends bu.Component{nodeRef=bu.createRef();constructor(t){super(t),this.handleTransition=this.handleTransition.bind(this),this.onEnter=this.onEnter.bind(this),this.onEntered=this.onEntered.bind(this),this.onExit=this.onExit.bind(this),this.onExited=this.onExited.bind(this)}handleTransition(t){const s=this.transitionState;s==="entering"?this.onEnter(t):s==="exiting"&&this.onExit(t)}onEnter(t){const s=this.nodeRef.current;s&&s.componentWillEnter?s.componentWillEnter(t):t()}onEntered(){const t=this.nodeRef.current;t&&t.componentDidEnter&&t.componentDidEnter()}onExit(t){const s=this.nodeRef.current;s&&s.componentWillExit?s.componentWillExit(t):t()}onExited(){const t=this.nodeRef.current;t&&t.componentDidExit&&t.componentDidExit()}render(){const{children:t}=this.props;return(0,n.jsx)(Ac,{addEndListener:this.handleTransition,nodeRef:this.nodeRef,onEntered:this.onEntered,onExited:this.onExited,unmountOnExit:!0,...this.props,children:s=>(this.transitionState=s,t&&bu.cloneElement(bu.Children.only(t),{ref:this.nodeRef}))})}}const{FULL:Ore,FLOATING:H5}=Un,Bre=$("lessonNavigation"),Dre=({children:e})=>{const t=(0,u.useRef)(null);return(0,n.jsx)("div",{className:"page-wrap",id:"page-wrap",ref:t,children:e})},Fre=(e,t)=>typeof t=="object"&&t!==null&&"drawCount"in t&&typeof t.drawCount=="number"?e+t.drawCount:e+1,Hre=(e=[])=>e.reduce(Fre,0),$re=({children:e,isLessonOnlyEmbed:t})=>{const{pathname:s}=(0,we.zy)(),o=re(),r=o.buttonNavigationStyle,{showNavigationButtons:a,lessonsOnly:i,lmsOptions:c}=o,l=(0,u.useRef)(null),d=Et(480),h=Es(),m=Vt(h),f=Io(h),[v,C]=(0,u.useState)(r),g=i?.[0]?.id,x=o.exportSettings?.webExportSettings?.disableCoverPage===!0,b=!Ln.isInstantLink&&(c?.disableCoverPage===!0||x)&&g===h,T=!Ln.isInstantLink&&c?.disableCoverPage===!0,L=c?.disableCoverPage===!0?b:T;(0,u.useEffect)(()=>{r!==v&&(C(r),window.dispatchEvent(new CustomEvent(Ql)))},[r,v]);const y=m!=null&&m.type!=null?m:void 0,S=y!=null&&(Zb(y)||Kg(y))?f?.isComplete===!0:!0,k=y?.type==="quiz",N=f?.type==="quiz"?f.activeIndex:void 0,I=k&&N!=null&&N===Hre(y.items)+1,{skipLessonsIfPassed:w,skipLessonsOptional:A,skipToLessonId:E}=bh(h),j=f?.type==="quiz"&&f.passed===!0,O=k&&j&&w&&!A&&!!E,R=k&&!I||y?.settings?.continueType==="continue"||O,P=m!=null?wC({course:o,lesson:m}):void 0,M=P!=null&&P!==!1,H=h==="progress-summary",F=window.isPublicShare===!0,D=M&&t!==!0&&S&&!R&&!H,V=!M&&S&&!1,W=Bre("wrapper",{full:r===Ore||d,floating:r===H5&&!d}),Z=a!==!0||t===!0?Dre:r===H5&&!d?Pre:wre;return(0,u.useEffect)(()=>{const oe=document.querySelector(".page__content");oe&&oe.classList.add("page__content--preview-nav")},[Z]),(0,n.jsx)("div",{className:W,ref:l,children:(0,n.jsx)(Z,{hideNavToHome:L,navFinishEnabled:V,navNextEnabled:D,children:(0,n.jsx)(gG,{children:(0,n.jsx)(Ko,{component:"div",children:(0,n.jsx)(Mre,{children:e},s)})})})})};var Vre=p(20855),$5=p(65577);function zre(e){return e?.slidesUI?.slideDirection??Js.UP}function Ure(){return de(zre)}function _re(e){return e?.slidesUI?.exitingSlideOffset??0}function Gre(){return de(_re)}const V5=$("presentation-logo"),Wre=()=>{const e=re(),t=e?.theme?.showLogo??!0;if(!Ur(e)||t===!1)return null;const s=e?.theme?.logoPosition??W8;return(0,n.jsx)(Um,{className:V5({[G8[s]]:!0}),imageClassName:V5("image")})};function Kre(e,{designHeight:t,fit:s="width"}={}){const o=(0,u.useRef)(null),[r,a]=(0,u.useState)(1),i=(0,u.useRef)(null);(0,u.useLayoutEffect)(()=>{const l=o.current;if(!l)return;const d=(f,v)=>{const C=f>0?f/e:1,g=s==="contain"&&t?Math.min(C,v>0?v/t:1):C;a(x=>x===g?x:g)},h=l.getBoundingClientRect();d(h.width,h.height);const m=new ResizeObserver(f=>{i.current!=null&&cancelAnimationFrame(i.current),i.current=requestAnimationFrame(()=>{const v=f[0];v&&d(v.contentRect.width,v.contentRect.height)})});return m.observe(l),()=>{m.disconnect(),i.current!=null&&cancelAnimationFrame(i.current)}},[e,t,s]);const c={transform:`scale3d(${r}, ${r}, 1)`,transformOrigin:s==="contain"?"center":"top left"};return{containerRef:o,scale:r,scaleStyle:c}}const z5=$("presentation-slide-frame");function Qre({children:e}){const{containerRef:t,scaleStyle:s}=Kre(1024,{designHeight:Af,fit:"contain"});return(0,n.jsx)("div",{className:z5(),ref:t,children:(0,n.jsx)("div",{className:z5("canvas"),style:{width:1024,height:Af,...s},children:e})})}const Wt=$("blocks-lesson-slide"),U5="#fff",Yre=e=>Jt(e)&&(typeof e.blockId=="string"||typeof e.blockId=="number")&&typeof e.family=="string",Zre=e=>Jt(e)&&(typeof e.id=="string"||typeof e.id=="number"),_5=e=>{const t={...e,id:e.id??e.blockId};return Zre(t)?t:null},Xre=["image full","image text overlay","quote background"],G5=({className:e})=>{const t=js()||U5;return(0,n.jsx)("div",{className:e,style:{background:t}})},qre=({block:e})=>{const t=_5(e);return t?(0,n.jsx)(Nh,{block:t,children:(0,n.jsx)(G5,{className:Wt("background-top")})}):null},Jre=({block:e})=>{const t=_5(e);return t?(0,n.jsx)(Nh,{block:t,children:(0,n.jsx)(G5,{className:Wt("background-bottom")})}):null};function eae(e,t){const s=t.blocks?.length??1,o=s==1,r=s==2,a=t.blocks?.[0],i=t.blocks?.find(E=>E.settings?.backgroundType===ne.IMAGE),c=e.settings?.backgroundType===ne.IMAGE,l=e.id===a?.id,d=e.family==="multimedia",h=e.family==="mondrian",m=e.family==="survey",f=e.family==="buttons",C=e.variant==="accordion"&&document.querySelector(`[data-block-id="${e.id}"] [data-accordion-status="closed"]`)!=null,g=(document.querySelector(`[data-block-id="${e.id}"] [data-block-text]`)?.clientHeight??0)>300,x=bne(e.family??"",e.variant??"")||g,b=document.querySelector("[data-continue-sr]")!=null,T=!x&&r&&b&&document.querySelector("[data-continue-btn]")==null,L=o&&c&&!T,y=c&&!T&&!x,S=d||f||h||m;return Wt("connected-blocks",{"min-half-height":i&&(r&&!T&&!x||C||y),"full-height":T||L,"top-block":l&&!o&&!x&&!S,"top-block-centered":l&&!o&&S})}const tae=({hasTransitioned:e,onContinue:t,prefersKeyboardNavigation:s,previewType:o,ref:r,slide:a,transitionState:i})=>{const c=re(),l=Es()??"",d=be(),h=Mi(),m=Io(l),f=m?.type==="blocks"?m:void 0,v=!0,{animateBlockEntrance:C,color:g,title:x,enableVideoPlaybackSpeed:b}=c,T=Ure(),L=Gre(),y=a?.lastBlock,S=(0,u.useCallback)(xe=>{xe===y?.id&&t()},[y,t]);if(!a)return null;const k=`${i}-${T}`,N=Wt("wrapper",{exiting:i==="exiting"}),{blocks:I,lessonTitle:w,lessonDescription:A,shouldShowAnimation:E=C,shouldShowTitle:j=!0,shouldShowDescription:O=!0,imageTextLayout:R,titleVariant:P}=a,M=Ur(c),H=M&&!R&&a.blocks?.[0]?.family==="multimedia",F=Wt("inner",{[k]:!0,presentation:M}),D=Wt("lesson-title",{heading:P==="heading",subheading:P==="subheading"}).toString(),V=Wt("lesson",{slides:v,"touch-preview":Ji(o),media:H}).toString(),W=a.blocks.length==1,{settings:_,type:Z,variant:oe}=a.blocks?.[0]??{},Q=W&&_?.backgroundType===ne.IMAGE,U=W&&!Q&&Xre.includes(`${Z} ${oe}`),B=!M&&(U||Q),z=a.blocks?.[0],K=a.blocks?.[a.blocks.length-1],Y=z?.settings?.backgroundType!==ne.IMAGE,J=K?.settings?.backgroundType!==ne.IMAGE,q=Wt("full-width-image",{legacy:U,background:Q}),ee=j&&w,se=sy(R)&&O&&A,te=(ee||se)&&(0,n.jsxs)("div",{className:Wt("lesson-header"),children:[ee&&(0,n.jsx)(ke,{className:D,tagName:"h1",value:w}),se&&(0,n.jsx)(ke,{className:Wt("lesson-description").toString(),value:A})]}),ye=R?jY(R):void 0,G=!ye&&E,le=ye?.imagePosition==="left",me=I.map((xe,ge)=>{const Ke=W?!1:c5({blocks:a.blocks,lessonProgress:f,currentBlockIndex:ge}),wt=B?q:eae(xe,a),Lt={...xe,blockId:xe.blockId??xe.id};if(!Yre(Lt))return null;const ot=Lt;return(0,n.jsx)(pp,{animateBlockEntrance:G,block:ot,className:wt,color:g,courseTitle:x,defaultBackgroundColor:U5,enableVideoPlaybackSpeed:b,hideBlock:Ke,index:ge,isLastBlock:!1,isOnlyBlockInStep:W,isPresentation:M,labels:d,lessonId:l,lessonProgress:f,loadMedia:e,match:void 0,onContinue:S,partnerContent:h,prefersKeyboardNavigation:s,previewType:o},ot.blockId)}),pe=ye?.isOverlay?(0,n.jsxs)("div",{className:Wt("composition",{overlay:!0,bleed:!0}),children:[(0,n.jsx)("div",{className:Wt("composition-image"),children:me}),(ee||se)&&(0,n.jsxs)("div",{className:Wt("composition-overlay-text"),children:[ee&&(0,n.jsx)(ke,{className:D,tagName:"h1",value:w}),se&&(0,n.jsx)(ke,{className:Wt("lesson-description").toString(),value:A})]})]}):ye?(0,n.jsx)("div",{className:Wt("composition",{bleed:ye.isFullBleed,"image-left":ye.imagePosition==="left","image-right":ye.imagePosition==="right"}),children:(le?["image","text"]:["text","image"]).map(xe=>xe==="image"?(0,n.jsx)("div",{className:Wt("composition-image"),children:me},"image"):(0,n.jsx)("div",{className:Wt("composition-text"),children:te},"text"))}):(0,n.jsxs)(n.Fragment,{children:[te,me]}),he=(0,n.jsxs)("div",{className:F,children:[z&&Y&&(0,n.jsx)(qre,{block:z}),K&&J&&(0,n.jsx)(Jre,{block:K}),(0,n.jsx)("div",{className:V,ref:r,children:pe}),(0,n.jsx)(Wre,{})]});return M?(0,n.jsx)(Qre,{children:he}):(0,n.jsx)("div",{className:N,style:{top:L},children:he})};var sae=p(27009),nae=p.n(sae);const W5=$("blocks-slide-indicator-tooltip"),oae=({disabled:e,left:t,ref:s,text:o,top:r,visible:a})=>{let i=(0,n.jsx)("span",{"aria-hidden":"true",children:o});return e&&(i=(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(ie,{classNameIcon:W5("icon"),name:"lock"}),(0,n.jsx)("span",{className:"visually-hidden-always",children:"(locked content)"})]})),(0,n.jsx)("div",{"aria-hidden":!a,className:W5("wrapper",{disabled:e,visible:a}),ref:s,role:"tooltip",style:{left:t,top:r},children:i})},yu=$("blocks-slide-indicator"),rae=({active:e,blockNavigationStyle:t,disabled:s,numberOfSlides:o,onKeyDown:r,onClick:a,ref:i,slideIndex:c})=>{const{prefersKeyboardNavigation:l}=Fi()??{},[d,h]=(0,u.useState)(!1),[m,f]=(0,u.useState)(),v=(0,u.useRef)(null),C=(0,u.useRef)(null),g=(0,u.useRef)(void 0),x=t===y0.NUMBERS,b=c+1,T=`${b} / ${o}`,L=e?`Step ${b} of ${o}, current step`:`Go to step ${b} of ${o}`,y=(0,u.useRef)(null);y.current||=document.getElementById("portal");const S=(0,u.useCallback)(()=>{if(v.current&&C.current){const H=v.current.getBoundingClientRect(),F=C.current.getBoundingClientRect(),D=H.left-F.width-18,V=Math.round(H.top-F.height/2+H.height/2);f({left:D,top:V})}},[]),k=(0,u.useCallback)(()=>{g.current=setTimeout(()=>{S(),h(!0)},300)},[S]),N=(0,u.useCallback)(()=>{clearTimeout(g.current),h(!1)},[]),I=(0,u.useCallback)(()=>{a(c)},[a,c]),w=(0,u.useCallback)(H=>{vs(H)&&h(!1),r(H)},[r]),A=(0,u.useCallback)(()=>{k()},[k]),E=(0,n.jsx)(oae,{disabled:s,left:m?.left,ref:C,text:T,top:m?.top,visible:d}),j=yu("button",{active:e,disabled:s,numbers:x}),O=yu("wrapper"),R=yu("circle",{active:e,disabled:s}),P=yu("number",{active:e,disabled:s}),M=x?(0,n.jsx)("span",{"aria-hidden":"true",className:P,children:b}):(0,n.jsx)(ie,{classNameIcon:R,name:"circle-solid"});return(0,n.jsxs)("div",{className:O,ref:i,children:[(0,n.jsx)("button",{"aria-current":e?"page":void 0,"aria-disabled":s,"aria-label":L+(s?" (unavailable until previous content is completed)":""),className:j,"data-control":"",onBlur:N,onClick:s?void 0:I,onFocus:l?A:void 0,onKeyDown:w,onMouseEnter:k,onMouseLeave:N,ref:v,type:"button",children:M}),y.current&&(0,In.createPortal)(E,y.current)]})},Pr=$("blocks-slide-controls"),K5=38,aae=8,iae=({activeSlideIndex:e,blockNavigationStyle:t,numberOfSlides:s,onGoToCover:o,onSlideClick:r,slideDisabledState:a,previewType:i})=>{const c=(0,u.useRef)(null),l=(0,u.useRef)(null),[d,h]=(0,u.useState)(!1),[m,f]=(0,u.useState)(!1),v=(0,u.useCallback)(b=>{let T=!1,L=-1;if(pr(b)||Kn(b)){if(e-1>=0)L=e-1;else{o();return}T=!0}else gr(b)||Qn(b)?(e+1<=s-1&&(L=e+1),T=!0):a2(b)?(L=0,T=!0):r2(b)&&(L=s-1,a[L]&&(L=a.findLastIndex(y=>!y)),T=!0);L>=0&&!a[L]&&r(L),T&&(b.stopPropagation(),b.preventDefault())},[e,s,o,r,a]);(0,u.useEffect)(()=>{const b=c.current,T=l.current;if(b&&T){const L=b.getBoundingClientRect(),y=T.getBoundingClientRect(),S=L.bottom-K5,k=L.top+K5;y.bottom>S?b.scrollBy({top:y.bottom-S,left:0,behavior:"smooth"}):y.top<k&&b.scrollBy({top:y.top-k,left:0,behavior:"smooth"})}},[e]);const C=(0,u.useCallback)(()=>{const b=c.current;b&&(h(b.scrollTop>aae),f(b.clientHeight+b.scrollTop<b.scrollHeight))},[]);(0,Id.A)(C);const g=(0,u.useCallback)(Zd()(C,100),[C]);Zl(c.current,C);const x=Pr({"touch-preview":Ji(i)});return(0,n.jsx)("div",{className:x,children:(0,n.jsx)("div",{className:Pr("page-control-wrapper"),children:(0,n.jsxs)("div",{className:Pr("page-control-inner-wrapper"),children:[(0,n.jsx)("div",{className:Pr("page-control"),onScroll:g,ref:c,children:(0,n.jsx)("div",{className:Pr("slide-dot-wrapper"),children:nae()(b=>{const T=b===e;return(0,n.jsx)(rae,{active:T,blockNavigationStyle:t,disabled:a[b],numberOfSlides:s,onClick:r,onKeyDown:v,ref:T?l:null,slideIndex:b},b)},s)})}),(0,n.jsx)("div",{className:Pr("overlay-top",{visible:d})}),(0,n.jsx)("div",{className:Pr("overlay-bottom",{visible:m})})]})})})};var kc=p(82920);const cae=50,lae=1e3,dae=({onSwipeDownHandler:e,onSwipeUpHandler:t,target:s,timeoutDuration:o=lae})=>{const[r,a]=kc.useState(!1),i=kc.useRef(void 0),c=kc.useCallback(()=>{i.current&&clearTimeout(i.current),i.current=setTimeout(()=>a(!1),o)},[o]),l=kc.useCallback(d=>{const h=Math.abs(d.deltaY);if(r)h<cae?(i.current&&clearTimeout(i.current),a(!1)):c();else if(h>100){const m=d.deltaY>0?e:t;a(!0),c(),m()}},[c,r,e,t]);kc.useEffect(()=>{if(!(!s||!t||!e))return s.addEventListener("wheel",l,{passive:!0}),()=>{i.current&&clearTimeout(i.current),s?.removeEventListener?.("wheel",l,{passive:!0})}},[e,t,l,s])},uae="rise-presenter-sync",R1e="presenterMode",hae="slide",mae="NAVIGATE_TO_SLIDE",fae="SLIDE_CHANGE",P1e="PRESENTER_VIEW_EXIT";function pae(e){const t=new URLSearchParams(e).get(hae);if(t==null)return 0;const s=Number(t);return Number.isFinite(s)&&s>=0?s:0}function gae(){const e=window.location.hash.split("?")[1]||"";return pae(e)}var M1e;const Ht=$("lesson-one-page-slides"),vae=$("page-wrap"),Q5=e=>e,Y5=100,Cae=e=>{if(e!=null&&"blockNavigationStyle"in e){const t=e.blockNavigationStyle;return typeof t=="string"?t:void 0}};function Z5(e){if(!(e instanceof HTMLElement))return!1;const t=e.tagName.toLowerCase(),s=e.getAttribute("type"),o=e.getAttribute("role"),r=e.tabIndex,a=t==="button"||["div","span"].includes(t)&&(o==="button"||r===0),i=t==="input"&&["radio","text"].includes(s??"")||t==="textarea"||o==="radio",c=["audio","video"].includes(t),l=o==="tab",d=document.querySelector(".quiz-card__interactive")?.contains?.(e)??!1;return a||i||c||l||d}const X5=(e,t)=>(s,o,r)=>i5(s,r.slice(0,-1),e,void 0,t),xae=(e,t)=>({disabled:s,slides:o},r)=>{const a=r.filter(d=>e[d.id]!=null).map(d=>({...d,...e[d.id]})),i=r[r.length-1],c=s||vne(a)||Cne(a,t),l={blocks:a,lastBlock:i,disabled:s};return{disabled:c,slides:[...o,l]}},Tu=e=>{let t=!1,s=!1;if(e){const{clientHeight:o,scrollHeight:r,scrollTop:a}=e,i=Math.max(0,a),c=r-i;t=c===r,s=c-5<=o}return{isAtTop:t,isAtBottom:s}},bae=/,? +/,yae=[],Tae=({lessonProgress:e,prefersKeyboardNavigation:t,previewType:s})=>{const{announcePolite:o,clearAnnouncements:r}=bn(),a=(0,u.useRef)(null),i=(0,u.useRef)(null),c=(0,u.useRef)(null),l=(0,u.useRef)(null),d=(0,u.useRef)(null),h=(0,u.useRef)(null),m=(0,u.useRef)(null),f=(0,u.useRef)(null),v=(0,u.useRef)(null),C=(0,u.useRef)(null),g=(0,u.useRef)(0),x=(0,u.useRef)(0),b=es(),T=ct(),[L,y]=(0,u.useState)(()=>gae()),[S,k]=(0,u.useState)(!0),[N,I]=(0,u.useState)(!1),w=(0,Me.A)(S),A=(0,Me.A)(N),E=(0,u.useRef)(void 0),j=ws(),{lessons:O,...R}=re()||{},P=Ur(R),M=j||P?.01:600,H=Cae(R?.theme)||y0.DOTS,F=O?.[0],D=F?.items||yae,V=(0,u.useCallback)(()=>{const Le=(c.current?.scrollHeight??0)>(c.current?.clientHeight??0),{isAtBottom:mt}=Tu(c.current),ft=Le&&!S&&!mt;ft!=N&&I(ft)},[N,S]);Zl(a.current,V),(0,u.useLayoutEffect)(V,[S]);const W=(0,u.useCallback)(()=>{c.current?.scrollTo({top:0})},[]),_=R?.theme,Z=(0,u.useMemo)(()=>{const ft=vp([],D,e,_).map(X5(e,_)).filter(Go=>Go!==null);return Object.fromEntries(ft.map(Go=>[Go.blockId,Go]))},[D,e,_]),oe=(0,u.useCallback)(Le=>{const mt={disabled:!1,slides:[]},{slides:ft}=Le.reduce(xae(Z,e),mt);return ft},[Z,e]),Q=(0,u.useMemo)(()=>P?(O??[]).filter(Le=>Le?.type==="slide"):[],[P,O]),U=(0,u.useMemo)(()=>P?Q.map(Le=>{const mt=Le.items.map(X5(e,_));return{blocks:mt,lastBlock:mt[mt.length-1],lessonTitle:Le?.title,lessonDescription:Le?.description,shouldShowTitle:NY(Le),shouldShowDescription:EY(Le),shouldShowAnimation:Le?.experiments?.showAnimation??!0,imageTextLayout:ty(Le),titleVariant:wY(Le),disabled:!1}}):qu(D,ane,oe),[P,Q,D,oe,e,_]),B=(0,u.useMemo)(()=>U.map(Le=>Le.disabled),[U]);(0,u.useEffect)(()=>{g.current=L},[L]),(0,u.useEffect)(()=>{x.current=U.length,U.length>0&&L>=U.length&&y(U.length-1)},[U.length,L]),(0,u.useEffect)(()=>{if(!P)return;const Le=Q[L];Le&&(Sg(Le.id),T(Jc(Le.id)))},[L,P,Q,T]),(0,u.useEffect)(()=>{if(!(!P||typeof BroadcastChannel>"u"))try{v.current||(v.current=new BroadcastChannel(uae));const Le=v.current,mt=ft=>{if(ft.data.type===mae){const Go=ft.data.slideIndex,Ec=Math.min(Go,x.current-1);if(Ec>=0){const Oie=Ec<g.current?Js.DOWN:Js.UP;T(hr(Oie)),C.current&&C.current(Ec)}}};return Le.addEventListener("message",mt),()=>{Le.removeEventListener("message",mt)}}catch{}},[P,T,b]),(0,u.useEffect)(()=>{if(!(!P||!v.current))try{v.current.postMessage({type:fae,slideIndex:L})}catch{}},[P,L]),(0,u.useEffect)(()=>()=>{v.current?.close(),v.current=null},[]);const z=U.length,K=z>0?Math.min(L,z-1):0,Y=U[K],J=Ji(s),q=H!==y0.NONE,ee=L===z-1,se=e?.isComplete,te=N||ee?!se||!0:B[L+1],ye=!N&&!ee,G=ee&&!0,le=(0,Me.A)(G),me=N&&!ee,pe=(0,u.useCallback)(Vd()(V,100),[V]);(0,u.useEffect)(()=>{const Le=c.current;return Le?.addEventListener("scroll",pe,{passive:!0}),()=>Le?.removeEventListener("scroll",pe)},[pe]),(0,u.useEffect)(()=>{document.activeElement===h.current?!A&&N?d.current?.focus({preventScroll:!0}):!le&&G&&m.current?.focus({preventScroll:!0}):document.activeElement===d.current&&A&&!N&&h.current?.focus({preventScroll:!0})},[N,A,le,w,G,S]),(0,Vre.A)(()=>{gy(),E.current=setTimeout(()=>{k(!1),c.current?.focus?.()},M+Y5)},()=>{clearTimeout(E.current)});const he=(0,u.useCallback)(Le=>{const mt=a.current?.getBoundingClientRect()?.top??0;T(sI(mt));const ft=Math.max(0,Math.min(Le,U.length-1));y(ft),W()},[T,W,U.length]),xe=(0,u.useCallback)(()=>{S||(k(!0),Xn(()=>{b("/")},"lesson-to-one-page-cover-stepped"))},[b,S]),ge=R?.exportSettings?.webExportSettings,Ke=P||!!(!Ln.isInstantLink&&(R?.lmsOptions?.disableCoverPage||ge?.disableCoverPage)),wt=(0,u.useCallback)(Ke?()=>{T(hr(Js.DOWN)),he(0)}:xe,[Ke,he,xe,T,hr]);(0,u.useEffect)(()=>{C.current=he},[he]);const Lt=(0,u.useCallback)(()=>{S||(L>0?(T(hr(Js.DOWN)),he(L-1)):xe())},[he,T,L,S,xe]),ot=(0,u.useCallback)(()=>{S||(T(hr(Js.UP)),he(L+1))},[he,T,b,ee,L,S]),St=(0,u.useCallback)(()=>{(L<z-1||ee&&!1)&&ot()},[ee,L,z,ot]),vn=(0,u.useCallback)(()=>{const Le=c.current?.scrollTop??0,mt=c.current?.clientHeight??0,ft=j?"instant":"smooth";c.current?.scrollTo({top:Le+mt,behavior:ft})},[j]),$e=(0,u.useCallback)(()=>{ot()},[ot]),Je=(0,u.useCallback)(()=>{vn()},[vn]),rt=(0,u.useCallback)(Le=>{if(Le===L||S)return;const mt=Le<L?Js.DOWN:Js.UP;T(hr(mt)),he(Le),queueMicrotask(()=>{l.current?.querySelectorAll("[data-control]")?.[Le]?.focus?.()})},[he,T,L,S]),kt=(0,u.useCallback)(()=>k(!0),[]),ve=(0,u.useCallback)(()=>{k(!1),setTimeout(()=>{if(i.current&&l.current?.contains?.(document.activeElement)){const Le=hp()(i.current.innerText,{length:75,separator:bae});r(),o(`Content preview: ${Le}`)}else c.current?.focus?.()},0)},[o,r]),He=(0,u.useCallback)(()=>{if(J)return;const{isAtTop:Le}=Tu(c.current);if(Le){L===0?wt():Lt();return}},[J,Lt,L,wt]),hs=(0,u.useCallback)(()=>{if(J||ee||te)return;const{isAtBottom:Le}=Tu(c.current);if(Le){$e();return}},[ee,te,J,$e]),co=(0,u.useCallback)(()=>{const{isAtBottom:Le,isAtTop:mt}=Tu(c.current),ft=document.documentElement.clientWidth===window.innerWidth;return(Le||mt)&&ft},[]),Or=(0,u.useCallback)(Le=>{!l.current?.contains?.(document.activeElement)&&!Z5(Le.target)&&He()},[He]),Eu=(0,u.useCallback)(Le=>{!l.current?.contains?.(document.activeElement)&&!Z5(Le.target)&&hs()},[hs]),f4=(0,u.useCallback)(Le=>{const{itemId:mt}=Le.detail,ft=U.findIndex(Go=>Go.blocks.find(Ec=>Ec.id===mt));ft===-1||ft===L||(T(hr(ft>L?Js.UP:Js.DOWN)),he(ft))},[U,L,T,he]);(0,u.useEffect)(()=>(window.addEventListener(Ge,f4),()=>{window.removeEventListener(Ge,f4)})),(0,$5.A)("ArrowUp",Q5,Or),(0,$5.A)("ArrowDown",Q5,Eu),dae({target:c.current,onSwipeUpHandler:He,onSwipeDownHandler:hs,timeoutDuration:M+Y5});const Pie=Ht("gradient",{visible:N}),Mie=(0,n.jsxs)("nav",{"aria-label":"Slide navigation",className:Ht("presentation-controls"),ref:l,children:[(0,n.jsxs)("button",{"aria-disabled":L===0&&Ke,"aria-hidden":L===0&&Ke,className:Ht("presentation-btn"),onClick:Lt,type:"button",children:[(0,n.jsx)(ie,{classNameIcon:Ht("presentation-arrow-icon"),name:"chevron-left"}),(0,n.jsx)("span",{className:"visually-hidden-always",children:"Previous"})]}),(0,n.jsx)("span",{"aria-hidden":!0,className:Ht("counter"),children:`${L+1} / ${z}`}),(0,n.jsxs)("button",{"aria-disabled":te,"aria-hidden":!ye,className:Ht("presentation-btn"),onClick:te?void 0:$e,ref:h,tabIndex:ee?-1:void 0,type:"button",children:[(0,n.jsx)(ie,{classNameIcon:Ht("presentation-arrow-icon"),name:"chevron-right"}),(0,n.jsx)("span",{className:"visually-hidden-always",children:"Go to next step"})]})]});return(0,n.jsx)("div",{className:Ht({}),children:(0,n.jsx)("div",{className:vae({transitioning:S}),id:"page-wrap",ref:c,tabIndex:-1,children:(0,n.jsx)("div",{className:"page","data-page":!0,children:(0,n.jsx)("div",{className:"page__wrapper",children:(0,n.jsx)("div",{className:"page__content",children:(0,n.jsx)(Lr,{children:(0,n.jsxs)("div",{"data-lesson-id":F?.id,children:[P?Mie:(0,n.jsxs)("nav",{"aria-label":"Step navigation",className:Ht("controls",{"touch-preview":J}),ref:l,children:[(0,n.jsxs)("button",{"aria-disabled":L===0&&Ke,"aria-hidden":L===0&&Ke,className:Ht("prev-btn",{"touch-preview":J}),onClick:Lt,type:"button",children:[(0,n.jsx)(ie,{classNameIcon:Ht("arrow-icon",{"touch-preview":J}),name:"arrow-up"}),(0,n.jsx)("span",{className:"visually-hidden-always",children:"Previous"})]}),q&&(0,n.jsx)(iae,{activeSlideIndex:L,blockNavigationStyle:H,numberOfSlides:z,onGoToCover:xe,onSlideClick:rt,previewType:s,slideDisabledState:B}),(0,n.jsxs)("div",{className:Ht("next-btns"),children:[(0,n.jsxs)("button",{"aria-disabled":!me,"aria-hidden":!me,className:Ht("page-down-btn",{"touch-preview":J}),onClick:me?Je:void 0,ref:d,tabIndex:me?void 0:-1,type:"button",children:[(0,n.jsx)(ie,{classNameIcon:Ht("arrow-icon",{"touch-preview":J}),name:"arrow-down"}),(0,n.jsxs)("span",{className:"visually-hidden-always",children:["Scroll page down",!N&&(0,n.jsx)("span",{children:"(disabled because this is the bottom of the page)"}),ee&&(0,n.jsx)("span",{children:"(disabled since this is the last step)"})]})]}),(0,n.jsxs)("button",{"aria-disabled":te,"aria-hidden":!ye,className:Ht("next-btn",{"touch-preview":J}),onClick:te?void 0:$e,ref:h,tabIndex:ee?-1:void 0,type:"button",children:[(0,n.jsx)(ie,{classNameIcon:Ht("arrow-icon",{"touch-preview":J}),name:"arrow-down"}),(0,n.jsxs)("span",{className:"visually-hidden-always",children:["Go to next step",te&&(0,n.jsx)("span",{children:"(disabled until content is completed)"}),ee&&(0,n.jsx)("span",{children:"(disabled since this is the last step)"})]})]}),(0,n.jsxs)("button",{"aria-disabled":!G,"aria-hidden":!G,className:Ht("restart-btn",{"touch-preview":J}),onClick:G?wt:void 0,ref:m,tabIndex:ee?void 0:-1,type:"button",children:[(0,n.jsx)(ie,{classNameIcon:Ht("restart-icon",{"touch-preview":J}),name:"arrow-rotate-left"}),(0,n.jsx)("span",{className:"visually-hidden-always",children:"Restart"})]})]})]}),(0,n.jsxs)(Td,{onShouldRecognizeGesture:co,onSwipeDown:He,onSwipeUp:hs,children:[(0,n.jsx)("main",{"aria-describedby":"step-counter",ref:i,tabIndex:0,children:(0,n.jsx)(Ko,{children:(0,n.jsx)(Ac,{mountOnEnter:!0,nodeRef:f,onExited:ve,onExiting:kt,timeout:M,unmountOnExit:!0,children:Le=>(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("div",{className:"visually-hidden-always",id:"step-counter",ref:f,children:`Step ${L+1} of ${z}`}),(0,n.jsx)(tae,{hasTransitioned:!S,onContinue:St,prefersKeyboardNavigation:t,previewType:s,ref:a,slide:Y,transitionState:Le})]})},L)})}),(0,n.jsx)("div",{className:Pie})]})]})})})})})})})},Lae=e=>!!e&&e.type==="videoCheckpoint"&&e.family==="videoCheckpoint"&&e.variant==="videoCheckpoint",Ip=1e3,Sae=3,kae=/^\d+(?:\.\d+)?$/,q5=/^\d+$/,Nae=/^\d{2}(?:\.\d{1,3})?$/,Lu=e=>{if(!Number.isFinite(e))return 0;const t=10**Sae;return Math.max(0,Math.round(e*t)/t)},Ep=e=>e.toString().padStart(2,"0"),Iae=e=>e!=null&&typeof e=="object"?e.time:void 0,B1e=e=>{const t=Math.round(Lu(e)*Ip),s=Math.floor(t/36e5),o=Math.floor(t%36e5/6e4),r=Math.floor(t%6e4/1e3),a=t%Ip,i=a===0?"":`.${a.toString().padStart(3,"0")}`;return s>0?`${s}:${Ep(o)}:${Ep(r)}${i}`:`${Math.floor(t/6e4)}:${Ep(r)}${i}`},Eae=e=>{const t=e.split(":");if(t.length!==2&&t.length!==3)return null;const[s,o,r]=t.length===3?[t[0],t[1],t[2]]:[null,t[0],t[1]];if(s!=null&&!q5.test(s)||!q5.test(o)||!Nae.test(r))return null;const a=s==null?0:Number.parseInt(s,10),i=Number.parseInt(o,10),[c,l=""]=r.split("."),d=Number.parseInt(c,10);if(t.length===3&&i>=60||d>=60)return null;const h=l.length===0?0:Number.parseInt(l.padEnd(3,"0"),10)/Ip;return Lu(a*3600+i*60+d+h)},D1e=e=>{const t=e.trim();return t.length===0?null:kae.test(t)?Lu(Number.parseFloat(t)):Eae(t)},ao=e=>{let t;e!=null&&"checkpoint"in e?t=Iae(e.checkpoint):e!=null&&"time"in e&&(t=e.time);const s=typeof t=="number"?t:Number.parseFloat(String(t));return Lu(s)},jae=null,F1e=e=>e.family==="interactive-fullscreen"||e.family==="360"?!1:!(e.family==="multimedia"&&jae.has(e.variant)),wae=(e,t)=>{if(typeof e=="string"){const s=e.trim();if(s.length>0)return s}return t},Aae=e=>{const t=e.map((o,r)=>({id:o.checkpoint.id,time:ao(o),documentIndex:r})).sort((o,r)=>o.time-r.time||o.documentIndex-r.documentIndex),s=new Map;return t.forEach((o,r)=>{s.set(o.id,r+1)}),s},Rae=e=>[...new Set(e.map(t=>ao(t)))].sort((t,s)=>t-s),H1e=(e,t)=>{const s=[...e].sort((o,r)=>ao(o)-ao(r)).find(o=>ao(o)>t);return{insertBeforeItemId:s?.checkpoint.id??null,insertAtEnd:s==null}},Pae=e=>{const t=e[0]??null,s=t==null?e:e.slice(1),o=[],r=[];let a=null;s.forEach(c=>{if(Lae(c)){a!=null&&r.push(a),a={checkpoint:c,blocks:[]};return}if(a!=null){a.blocks.push(c);return}o.push(c)}),a!=null&&r.push(a);const i=r.length===0?e:[...t==null?[]:[t],...o];return{videoBlock:t,leadingBlocks:o,checkpointGroups:r,inlineBlocks:i}},Nc=$("video-checkpoint-player");function Mae({activeGroup:e,animateBlockEntrance:t,checkpointGroups:s,color:o,courseTitle:r,enableVideoPlaybackSpeed:a,handleNavigate:i,handleStorylineFullscreen:c,labels:l,lessonId:d,lessonProgress:h,loadMedia:m,onCheckpointCompleted:f,partnerContent:v,prefersKeyboardNavigation:C,previewType:g}){const x=(0,we.g)(),b=(0,u.useMemo)(()=>({params:x}),[x]),T=(0,u.useRef)(!1),L=(0,u.useMemo)(()=>Aae(s),[s]),y=(0,u.useCallback)(()=>{e==null||T.current||(T.current=!0,f?.(e))},[e,f]);if((0,u.useEffect)(()=>{e!=null&&(T.current=!1)},[e]),e==null)return null;const S=ao(e),k=nc(S),N=L.get(e.checkpoint.id),I=`${l?.videoCheckpointDefaultTitle||"Checkpoint"} ${N}`,w=wae(e.checkpoint?.title,I),A=e.blocks??[];return(0,n.jsx)(ud,{className:Nc(),darkOverlay:!0,"data-testid":"video-checkpoint-overlay",footer:(0,n.jsxs)("button",{"aria-label":`${l?.videoCheckpointResume||"Resume video"} \u2014 ${w}`,className:Nc("resume"),onClick:y,type:"button",children:[l?.videoCheckpointResume||"Resume video",(0,n.jsx)(Cm,{className:Nc("resume-icon"),decorative:"true"})]}),heading:w,onClose:y,subText:`${l?.videoCheckpointPausedAt||"Paused at"} ${k}`,children:(0,n.jsx)("div",{className:Nc("blocks"),"data-testid":"video-checkpoint-content",children:A.length===0?(0,n.jsx)("p",{className:Nc("empty"),children:l?.videoCheckpointNoContent||"No content added to this checkpoint."}):A.map((E,j)=>(0,n.jsx)(pp,{animateBlockEntrance:t,block:{...E,blockId:E.id},color:o,courseTitle:r,enableVideoPlaybackSpeed:a,handleNavigate:i,handleStorylineFullscreen:c,hideBlock:!1,index:j,isLastBlock:j===A.length-1,labels:l,lessonId:d,lessonProgress:h,loadMedia:m,match:b,onContinue:Kt,partnerContent:v,prefersKeyboardNavigation:C,previewType:g},`checkpoint-overlay-${E.id}`))})})}const J5=(e,t,s)=>{ps(C2({event:e,properties:{checkpoint_id:t.checkpoint.id,checkpoint_time:ao(t),lesson_id:s}}))};function Oae(e,t){const s=(0,u.useRef)(null),[o,r]=(0,u.useState)(null),a=(0,u.useRef)([]),i=(0,u.useMemo)(()=>Rae(e),[e]),c=(0,u.useCallback)(h=>{s.current?.seekToTime?.(ao(h)),s.current?.pause?.(),r(h),J5("Video Checkpoint Viewed",h,t)},[t]),l=(0,u.useCallback)(h=>{J5("Video Checkpoint Completed",h,t);const m=a.current.shift();if(m!=null){c(m);return}r(null),s.current?.play?.()},[t,c]);return{contextValue:(0,u.useMemo)(()=>({checkpointMarkerTimes:i,setVideoPlayerRef:h=>{s.current=h},onCheckpointReached:h=>{const m=e.filter(C=>ao(C)===h);if(m.length===0)return;const[f,...v]=m;a.current=v,c(f)}}),[i,e,c]),activeCheckpointGroup:o,handleCheckpointCompleted:l}}function Bae({animateBlockEntrance:e,checkpointGroups:t,children:s,color:o,courseTitle:r,enableVideoPlaybackSpeed:a,handleNavigate:i,handleStorylineFullscreen:c,labels:l,lessonId:d,lessonProgress:h,loadMedia:m,partnerContent:f,prefersKeyboardNavigation:v,previewType:C}){const{contextValue:g,activeCheckpointGroup:x,handleCheckpointCompleted:b}=Oae(t,d);return(0,n.jsxs)(fX,{value:g,children:[s,t.length>0&&(0,n.jsx)(Mae,{activeGroup:x,animateBlockEntrance:e,checkpointGroups:t,color:o,courseTitle:r,enableVideoPlaybackSpeed:a,handleNavigate:i,handleStorylineFullscreen:c,labels:l,lessonId:d,lessonProgress:h,loadMedia:m,onCheckpointCompleted:b,partnerContent:f,prefersKeyboardNavigation:v,previewType:C})]})}const Dae=Bae;function Fae(e){const{inlineBlocks:t,checkpointGroups:s}=(0,u.useMemo)(()=>Pae(e.blocks),[e.blocks]);return(0,n.jsx)(Dae,{...e,checkpointGroups:s,children:(0,n.jsx)(Cp,{...e,blocks:t})})}const Hae=Fae,e4=$("blocks-lesson-restart-button"),$ae=({className:e,onClick:t})=>{const s=e4.mix(e);return(0,n.jsx)("button",{className:s,onClick:t,type:"button",children:(0,n.jsx)(ie,{classNameIcon:e4("icon"),name:"arrow-rotate-left"})})},Vae=$("lesson-one-page-scroll"),zae=({previewType:e,prefersKeyboardNavigation:t,lessonProgress:s})=>{const o=(0,u.useRef)(null),[r,a]=(0,u.useState)(!1),{lessons:i,...c}=re(),{lmsOptions:l}=c,d=ea(),h=be(),m=es(),f=i?.[0],v=f?.type==="blocks"?f:void 0,C=f?.id??"",g=Mi(),x=v?.items??[],b=s?.type==="blocks"?s:void 0,T=t0(c),L=s0(c),y=T?Hae:Cp,S=s?.isComplete&&!0&&!T&&!L,k=s?.isComplete&&!1,N=c?.exportSettings?.webExportSettings,I=!Ln.isInstantLink&&(l?.disableCoverPage||N?.disableCoverPage),w=(0,u.useCallback)(()=>{r||(I?o.current?.scrollTo({top:0,behavior:ws()?"instant":"smooth"}):(a(!0),Xn(()=>{m("/")},"lesson-to-one-page-cover-continuous").finally(()=>{a(!1)})))},[m,I,r]);return(0,n.jsx)("div",{className:Vae(),children:(0,n.jsx)("div",{className:"page-wrap",id:"page-wrap",ref:o,children:(0,n.jsx)("div",{className:"page","data-page":!0,children:(0,n.jsx)("div",{className:"page__wrapper page__wrapper--white",children:(0,n.jsxs)(kd,{children:[(0,n.jsx)(c3,{}),(0,n.jsx)("div",{className:"page__content",children:(0,n.jsx)(Lr,{children:(0,n.jsxs)("div",{"data-lesson-id":f?.id,children:[(0,n.jsx)(y,{animateBlockEntrance:c?.animateBlockEntrance,blocks:x,className:void 0,color:c?.color,courseTitle:d,enableVideoPlaybackSpeed:c?.enableVideoPlaybackSpeed,handleNavigate:void 0,handleStorylineFullscreen:void 0,isLessonEntering:void 0,isLessonExiting:void 0,labels:h,lessonId:C,lessonProgress:b,loadMedia:!0,nextLesson:void 0,partnerContent:g,prefersKeyboardNavigation:t,previewType:e}),S&&(0,n.jsx)($ae,{className:void 0,onClick:w}),k&&(0,n.jsx)(kp,{lessonId:C})]})})})]})})})})})},t4=$("microlearning-progress-summary"),Uae=$("page-wrap"),_ae=({course:e,courseProgress:t,isStepped:s,lesson:o})=>{const r=(0,u.useRef)(null),a=(0,u.useRef)(null),[i,c]=(0,u.useState)(!1),l=t4("content",{stepped:s,mounted:i}).toString();return(0,Id.A)(()=>{const d=(a.current?.clientHeight??0)+1;r.current?.scrollTo({top:d}),c(!0)}),(0,n.jsxs)("div",{className:Uae(),id:"page-wrap",ref:r,children:[(0,n.jsx)(Np,{className:t4("previous").toString(),lessonId:o?.id??"",ref:a}),(0,n.jsx)(e3,{contentClassName:l,course:e,courseProgress:t})]})},Gae=({isProgressSummary:e,lessonProgress:t})=>{const s=re(),o=fr(),r=Fi()?.prefersKeyboardNavigation??!1,{previewType:a}=Vm(),i=s?.theme?.blockNavigationType===Yc.STEPPED;return e?(0,n.jsx)(_ae,{course:s,courseProgress:o,isStepped:i,lesson:void 0}):i?(0,n.jsx)(Tae,{lessonProgress:t,prefersKeyboardNavigation:r,previewType:a}):(0,n.jsx)(zae,{lessonProgress:t,prefersKeyboardNavigation:r,previewType:a})};var Wae=p(82920);function s4(){const e=ct();return Wae.useMemo(()=>({advanceQuizLessonToEnd:t=>e(Dk(t)),submitQuizAnswer:t=>e(R0(t)),setQuizLessonTimeRemaining:t=>e(Hk(t))}),[e])}const n4=-1,Kae="MULTIPLE_CHOICE";function Qae({allowedRetries:e,currentRetries:t}){return e===n4?!1:t>=e}function Yae({lesson:e,lessonProgress:t,getL10nRecursive:s,quizActions:o,reportAnswer:r}){if(!e||!z0(e))return;const a=e.settings??{},i=a.passToContinue??!1,c=Number(a.retryCount??n4),l=Object.values(t?.items??{}).filter(d=>!d.isComplete);if(l.length>0){const d=t?.retryAttempts??0,h=Qae({allowedRetries:c,currentRetries:d});l.forEach(m=>{const f=Pne({lesson:e,question:m});if(!f)return;const v=f.type||Kae,C=s({duration:{startTime:0,stopTime:0},id:e.id,isCorrect:!1,isUnfinished:!0,item:{id:String(f.id||""),title:String(f.title||""),type:v},itemProgress:m,retryAttempts:d,title:e.title});r(C),o.submitQuizAnswer({finalRetryAttempt:h,isCorrect:!1,itemId:m.id,lessonId:e.id,passToContinue:i})})}o.advanceQuizLessonToEnd(e.id)}var Zae=p(82920);function Xae({lesson:e,lessonProgress:t,getL10nRecursive:s}){const o=s4();return Zae.useCallback(()=>{Yae({lesson:e,lessonProgress:t,getL10nRecursive:s,quizActions:o,reportAnswer:Lg})},[e,t,s,o])}var o4=p(82920);function qae({children:e}){const t=fr(),s=ul(),o=Vt(s),r=Io(s),a=gC(),{setQuizLessonTimeRemaining:i}=s4(),c=o4.useMemo(()=>r??{},[r]),l=Xae({lesson:o,lessonProgress:c,getL10nRecursive:a}),d=o4.useMemo(()=>uC(o)?o.settings:void 0,[o]),h=!!d?.timer,m=d?.timerDuration;return(0,n.jsx)(Doe,{courseProgress:t,currentLessonId:s,handleExpiredQuiz:l,isTimedQuiz:h,setQuizLessonTimeRemaining:i,timerDuration:m,children:e})}var Jae=p(82920);const eie=960,jp=$("transcript-panel"),tie=e=>{const{currentLocale:t}=it();return(0,u.useMemo)(()=>e?"mondrianTranscript"in e?typeof e.mondrianTranscript=="string"?e.mondrianTranscript:(t?e.mondrianTranscript[t]:void 0)??e.mondrianTranscript.default:"tmp"in e&&e.tmp?.audio?.transcript||e.audio?.transcript:null,[e,t])};function sie({enhancedLabels:e,lessonId:t,questionBankActiveIndex:s}){const o=ct(),{audioPlayerIdOpen:r,focusing:a,refocusTarget:i,transcriptMedia:c}=Zi(),l=!!r,d=(0,u.useId)(),h=de(U=>t?Li(t,U):null),f=t?.startsWith("question-bank-")?s:h?.type==="quiz"?h.activeIndex:void 0,v=Et(eie),[C,g]=(0,u.useState)(0),[x,b]=(0,u.useState)(!1),[T,L]=(0,u.useState)(!1),y=(0,u.useRef)(!1),S=(0,u.useRef)(null),k=(0,u.useRef)(null),N=(0,u.useRef)(c),I=(0,u.useRef)(t),w=(0,u.useRef)(f),A=be()||e,E=(0,u.useRef)(null),j=(0,u.useRef)({panelHeight:0,startY:null,startHeight:null,startTime:null,velocity:null}),O=(0,u.useCallback)(U=>{const z=j.current.panelHeight,K=performance.now();L(!0);const Y=J=>{const q=J-K,ee=Math.min(q/300,1),se=1-Math.pow(1-ee,3),te=z+(U-z)*se;g(te),j.current.panelHeight=te,ee<1?requestAnimationFrame(Y):(L(!1),b(!1),j.current={startY:null,startHeight:null,startTime:null,panelHeight:null,velocity:null})};requestAnimationFrame(Y)},[b,L,g]),R=(0,u.useCallback)(U=>{const{startTime:B,startY:z,startHeight:K}=j.current;if(!v||z===null)return;const Y=z-(U?.clientY??U?.touches?.[0]?.clientY??0),J=K+Y;if(g(J),j.current.panelHeight=J,B!==null){const q=performance.now()-B,ee=Y/q;j.current.velocity=ee}},[v]),P=(0,u.useCallback)(U=>{const{velocity:B}=j.current;if(!B)return;Object.assign(j.current,{startY:null,startHeight:null,startTime:null}),b(!1);const z=window.innerHeight*.66;let K;Math.abs(B)>.5?K=B>0?window.innerHeight:150:K=C>=z?window.innerHeight:150,O(K),U instanceof MouseEvent&&(window.removeEventListener("mousemove",R),window.removeEventListener("mouseup",P))},[O,C,R]),M=(0,u.useCallback)(U=>{!v||k.current.contains(U.target)||S.current.contains(U.target)||(Object.assign(j.current,{startY:U?.clientY??U?.touches?.[0]?.clientY??null,startHeight:E.current?.clientHeight??0,startTime:performance.now()}),b(!0),U.nativeEvent instanceof MouseEvent&&(window.addEventListener("mousemove",R),window.addEventListener("mouseup",P)))},[R,P,v,b]);(0,u.useEffect)(()=>{let U;const B=()=>{E?.current?.style&&(E.current.style.transition="none",E.current.parentNode.querySelectorAll("div:not(.transcript-panel)").forEach(Y=>{Y.style.transition="none"}))},z=()=>{clearTimeout(U),U=setTimeout(()=>{E?.current?.style&&(E.current.style.transition="",E.current.parentNode.querySelectorAll("div:not(.transcript-panel)").forEach(Y=>{Y.style.transition=""}))},200)};return window.addEventListener("resize",B),window.addEventListener("resize",z),()=>{window.removeEventListener("resize",B),window.removeEventListener("resize",z),clearTimeout(U)}},[]),(0,u.useEffect)(()=>{!l&&y.current&&g(0),a&&l&&E.current&&(E.current.focus(),o(Qm({audioPlayerId:r,focusing:!1}))),y.current=l},[r,o,a,l]),(0,u.useEffect)(()=>{l&&c!==N.current&&(N.current=c)},[l,c]),(0,u.useEffect)(()=>{l&&I.current!==t&&o(Xi()),I.current=t},[t,l,o]),(0,u.useEffect)(()=>{l&&w.current!==f&&w.current!==void 0&&o(Xi()),w.current=f},[f,l,o]);const H={role:"button",tabIndex:0,onMouseDown:M,onTouchStart:M,onTouchEnd:P,onTouchMove:R},[F,D]=Jae.useState(!1),V=Ae(F?N.current:c),W=tie(V);let _;l&&(_=Ym(r));const Z=(0,u.useCallback)(()=>{const U=i??document.getElementById(kb(r));return U?(U.focus(),!0):!1},[r,i]),oe=(0,u.useCallback)(U=>{U.stopPropagation(),U.preventDefault(),o(Xi()),Z()},[o,Z]),Q=(0,u.useCallback)(U=>{r&&U.key==="Escape"&&oe(U)},[r,oe]);return(0,n.jsx)(n.Fragment,{children:(0,n.jsx)(Bn,{classNames:"transcript-panel",in:l,nodeRef:E,onEnter:()=>D(!1),onEntered:()=>D(!1),onEntering:()=>D(!1),onExit:()=>D(!0),onExited:()=>D(!1),onExiting:()=>D(!0),timeout:300,unmountOnExit:!0,children:(0,n.jsxs)("section",{"aria-hidden":!l,"aria-labelledby":d,className:jp({isOpen:l,isAnimatingMobileSwipe:T,isDragging:x}),id:_,onKeyDown:Q,ref:E,style:v&&l?{height:`${C/10}rem`,minHeight:C>0?"33vh":void 0}:{},tabIndex:-1,children:[(0,n.jsxs)("header",{...v?H:{},children:[(0,n.jsx)("h3",{id:d,ref:S,children:A?.audioTranscript}),(0,n.jsx)(dn.ArcButton,{"aria-label":A?.audioHideTranscript,className:jp("close-button"),hierarchy:"tertiary",icon:(0,n.jsx)(ie,{name:"close"}),layout:"icon",onClick:oe,ref:k})]}),(0,n.jsx)("section",{className:jp("transcript-text",{"not-available":!W}),children:W||A?.audioNoTranscriptAvailable})]})})})}var Ic=p(82920);const r4={FORWARD:"page-transition",BACK:"page-transition-back"},Su=({id:e,lessons:t})=>e==="progress-summary"?1/0:t.findIndex(s=>s.id===e),nie=e=>{window.parent.postMessage({type:"preview:lessonChange",data:e},"*")};function oie({currentLessonId:e,lessons:t,isProgressSummary:s}){const o=es(),r=Ic.useRef(!1),a=Ic.useRef(e),i=Ic.useCallback(()=>r.current?r4.FORWARD:r4.BACK,[]),c=Ic.useCallback(l=>{const d=Su({id:l,lessons:t});if(s)r.current=!1;else if(l==="progress-summary")r.current=!0;else{const h=Su({id:e,lessons:t});r.current=h<d}o(Ns(l))},[o,t,s,e]);return Ic.useEffect(()=>{const l=Su({id:e,lessons:t}),d=Su({id:a.current,lessons:t});l!==d&&t.length>0&&(r.current=d<l),a.current=e,nie(e)},[e,t]),{getNavigateDirection:i,handleNavigate:c}}const a4=()=>{const e=re(),t=fr(),s=e?.lessons??[],o=(0,we.g)(),r=(0,we.zy)(),[a]=(0,we.ok)(),i=a.get("embed")==="lesson-only",c=!1,l=a.get(bb),d=o.lessonId;(0,u.useEffect)(()=>{!l||!d||window.dispatchEvent(new CustomEvent(Ge,{detail:{lessonId:d,itemId:l,path:["lessons",{id:d},"items",{id:l}],align:"start"}}))},[d,l]);const h=(0,u.useRef)(null),m=Et(480),{getNavigateDirection:f,handleNavigate:v}=oie({currentLessonId:o.lessonId,lessons:s,isProgressSummary:c}),C=Vn(e),g=(0,u.useCallback)(()=>{C||(e.theme?.hideLessonHeaders?document.querySelector("main"):document.querySelector("h1"))?.focus({preventScroll:!0})},[e,C]),x=i?"lesson lesson--preview":"lesson",b=ct(),T=(0,u.useCallback)(({item:N,refs:I})=>{if(!N)return;const w="media"in N?N.media:null;b(Sb({audioPlayerId:fn({refs:I}),transcriptMedia:w}))},[b]),L=(0,u.useCallback)(()=>{b(Xi())},[b]),y=(0,u.useCallback)(N=>{b(Qm(N))},[b]),S=Io(o.lessonId),k=(0,u.useMemo)(()=>({handleNavigate:v,handleStorylineFullscreen:Kt,isMobileHeader:m,isProgressSummary:c,lessonProgress:S,navigateDirection:f,onNavigateTransitionEnd:Kt,onPageReady:g}),[f,g,v,m,c,S]);return(0,n.jsxs)(qae,{children:[(0,n.jsxs)("div",{className:"page-lesson-wrap",children:[!C&&(0,n.jsx)(qF,{}),(0,n.jsx)("div",{className:"page-lesson",children:(0,n.jsxs)(mU,{children:[(0,n.jsx)(uU,{closeTranscript:L,mode:"readonly",onTranscriptUpdate:y,openTranscript:T,children:(0,n.jsx)("div",{className:x,"data-lesson":!0,ref:h,children:(0,n.jsx)("div",{className:"lesson__content",children:(0,n.jsx)("div",{className:"page-view page-view--visible",children:(0,n.jsx)($_,{isLessonOnlyEmbed:i,children:C?(0,n.jsx)(Gae,{isProgressSummary:c,lessonProgress:S}):(0,n.jsx)($re,{isLessonOnlyEmbed:i,children:(0,n.jsx)(Cre,{...k},r.pathname)})})})})})}),(0,n.jsx)(sie,{lessonId:t?.currentLesson?.toString()})]})})]}),(0,n.jsx)(Km,{onClose:g})]})},wp=$("not-found"),Ap=()=>(0,n.jsx)(Lr,{title:Yi(),children:(0,n.jsx)("div",{className:wp(),children:(0,n.jsxs)("div",{className:wp("copy"),children:[(0,n.jsx)("h1",{className:wp("copy",{heading:!0}),tabIndex:-1,children:"Hmm..."}),(0,n.jsx)("div",{children:"We can't seem to find the page you're looking for."})]})})}),Rp=$("one-page-cover-info");function rie({htmlIdTitle:e}){const t=fa("title");return(0,n.jsxs)("div",{className:Rp(),"data-change-path":t,children:[(0,n.jsx)(i3,{className:Rp("title").toString(),htmlId:e}),(0,n.jsx)(a3,{className:Rp("authors").toString()})]})}const aie=Oe("OnePageCoverInfo",rie),ku=$("one-page-cover"),iie=$("cover"),cie={passive:!0};function lie(e){return typeof e=="object"&&e!=null}function die(e){return lie(e)&&(typeof e.id=="string"||typeof e.id=="number")}function uie({previewType:e}={}){const t=(0,u.useRef)(null),s=(0,u.useRef)(null),o=(0,u.useRef)(!1),r=es(),a=de(os),i=bE(a),c=die(i)?i:void 0,l=(0,u.useCallback)(()=>{const A=c?.id;return A!=null?Ns(A):null},[c?.id]),d=(0,u.useCallback)(()=>{const A=l();if(A!=null){const j=a?.theme?.blockNavigationType===Yc.STEPPED?"one-page-cover-to-lesson-stepped":"one-page-cover-to-lesson-continuous";Xn(()=>{r(A)},j)}},[a?.theme?.blockNavigationType,l,r]),h=(0,u.useRef)(d);h.current=d;const m=(0,u.useRef)(e);m.current=e;const f=(0,u.useCallback)(()=>{s.current?.focus?.()},[]);(0,u.useEffect)(()=>{gy(),s.current?.focus?.()},[]),(0,u.useEffect)(()=>{const A=E=>{(E.key==="ArrowDown"||E.key==="ArrowRight")&&!o.current&&(o.current=!0,document.removeEventListener("keyup",A),h.current())};return document.addEventListener("keyup",A),()=>document.removeEventListener("keyup",A)},[]),(0,u.useEffect)(()=>{const A=E=>{Ji(m.current)||o.current||E.deltaY>100&&(o.current=!0,document.removeEventListener("wheel",A),h.current())};return document.addEventListener("wheel",A,cie),()=>document.removeEventListener("wheel",A)},[]);const v=(0,u.useCallback)(A=>{const E=A.target;E instanceof Node&&!t.current?.contains?.(E)&&!o.current&&(o.current=!0,d())},[d]),C=(0,u.useCallback)(A=>{A.preventDefault(),o.current||(o.current=!0,d())},[d]),g=a?.coverPageType===ce.WHITE,x=a?.coverPageType===ce.VIDEO,b=a?.coverPageType===ce.IMAGE,T=a?.coverPageType===ce.ACCENT,L=a?.theme?.blockNavigationType===Yc.STEPPED,y=a?.theme?.coverImageColor??at.DARK,S="title",N=`overlay-${y?.toLowerCase()}`,I=ku("wrapper",{[N]:b,accent:T,image:b,white:g||x,video:x}).mix(iie("header-content")),w=l();return(0,n.jsx)(Lr,{children:(0,n.jsxs)(Td,{onSwipeUp:d,children:[(0,n.jsxs)("main",{className:I,ref:s,tabIndex:-1,children:[(0,n.jsx)(aie,{htmlIdTitle:S}),L&&(0,n.jsx)("div",{className:"visually-hidden-always",children:"To quickly navigate between steps, use the up and down arrow keys or the step navigation found on subsequent steps."}),w!=null&&(0,n.jsx)("div",{className:ku("start-wrapper"),onClick:v,children:(0,n.jsx)(as,{"aria-label":"Start",className:ku("start-link"),onClick:C,ref:t,to:w,children:(0,n.jsx)(ie,{className:ku("start-icon"),name:"arrow-down"})})}),b&&(0,n.jsx)(gm,{})]}),(0,n.jsx)(Km,{onClose:f})]})})}const hie=uie;function mie(){const e=re(),t=(0,we.zy)(),s=Vn(e),o=e?.lessonsOnly?.[0]?.id,r=o==null?void 0:Ns(o),a=s?JV(e):ib(e),l=r!=null&&a?(0,n.jsx)(we.C5,{replace:!0,to:{pathname:r,search:t.search}}):s?(0,n.jsx)(hie,{}):(0,n.jsx)(cU,{});return(0,n.jsxs)(we.BV,{children:[(0,n.jsx)(we.qh,{element:(0,n.jsx)(a4,{}),path:yh}),(0,n.jsx)(we.qh,{element:(0,n.jsx)(i4,{children:(0,n.jsx)(a4,{})}),path:Th}),(0,n.jsx)(we.qh,{element:l,index:!0}),(0,n.jsx)(we.qh,{element:(0,n.jsx)(i4,{children:l}),path:"/:mode"}),(0,n.jsx)(we.qh,{element:(0,n.jsx)(Ap,{}),path:"*"})]})}function i4({children:e}){const{mode:t}=(0,we.g)();return Sj(t)?e:(0,n.jsx)(Ap,{})}var io=p(82920);const Mr=$("share-password-dialog");function fie({failAttempt:e,onSubmit:t}){const s=de(sh),o=io.useRef(null),r=io.useRef(null),[a,i]=io.useState(!1),c=io.useRef(!1),{announceAssertive:l}=bn();io.useEffect(()=>{r.current?.showModal()},[]),io.useEffect(()=>{e&&!c.current&&(i(!0),l("Incorrect password. Please try again.")),c.current=e},[l,e]),io.useEffect(()=>{const f=r.current;if(!f)return;const v=()=>i(!1);return f.addEventListener("animationend",v),()=>{f.removeEventListener("animationend",v)}},[]);const d=io.useCallback(f=>{f.preventDefault(),o.current&&t(o.current)},[t]),h=io.useCallback(f=>{f.preventDefault()},[]),m=s?"You need a password to view this microlearning. If you don\u2019t know it, ask the person who shared this with you.":"You need a password to view this course. If you don\u2019t know it, ask the person who shared this with you.";return(0,n.jsxs)("dialog",{"aria-describedby":"share-password-instructions share-password-constraint","aria-labelledby":"share-password-title",className:`${Mr({shaking:a})} brand--border`,onCancel:h,ref:r,children:[(0,n.jsx)("h1",{className:Mr("heading"),id:"share-password-title",children:"Enter Password"}),(0,n.jsx)("p",{className:Mr("instructions"),id:"share-password-instructions",children:m}),(0,n.jsx)("p",{className:"visually-hidden-always",id:"share-password-constraint",children:"This dialog requires a password to proceed and cannot be dismissed."}),(0,n.jsxs)("form",{onSubmit:d,children:[(0,n.jsx)("label",{className:Mr("label"),htmlFor:"share-password",children:"password"}),(0,n.jsx)("input",{className:Mr("input"),id:"share-password",ref:o,type:"password"}),(0,n.jsx)("div",{className:Mr("toolbar"),children:(0,n.jsx)("button",{className:`${Mr("button")} brand--background`,type:"submit",children:"View"})})]})]})}const pie=fie;function gie(){const e=ol();(0,u.useEffect)(()=>{window.targetMode=RO({locale:rb(e)})},[e]),(0,u.useEffect)(()=>{window.parent.postMessage({type:"ready"},"*"),window.parent.postMessage({type:Cs.STATUS,data:!!window.targetMode},"*"),BZ(s=>ps(JN(s)))},[]);const t=(0,u.useRef)(!1);(0,u.useEffect)(()=>{t.current||!e||!g8()||(t.current=!0,window.parent.postMessage({type:"preview:snapshotLoaded",data:{defaultLocale:e.defaultLocale,locales:e.locales?.map(({locale:s})=>s)}}))},[e]),(0,u.useEffect)(()=>{const s=()=>ps(N7()),o=()=>ps(I7()),r=()=>window.parent.postMessage("coursePreviewIframeClicked","*");return Bv("favoriteAdded",s),Bv("favoriteRemoved",o),document.addEventListener("click",r),()=>{Dv("favoriteAdded",s),Dv("favoriteRemoved",o),document.removeEventListener("click",r)}},[])}const Nu=document.createElement("style");Nu.innerHTML=`
  @layer rise-reset, arc-theme, arc-utils;

  :root {
    --arc-font-size-base: 1;

    /*  Override arc body font because of Inter naming conflict in Rise
        https://github.com/articulate/rise-authoring/issues/7263
    */
    --arc-internal-font-body: 'DS Inter', system-ui, sans-serif;
  }
`;function vie(){(0,u.useEffect)(()=>(Nu.parentElement!==document.head&&document.head.prepend(Nu),()=>{Nu.remove()}),[])}function Cie(e){return e.status}function c4(){return de(Cie)}function xie({enabled:e=!0,onAuthorized:t,onError:s,onUnauthorized:o,password:r}){const a=ct();(0,u.useEffect)(()=>{e&&(a(Lk({onAuthorized:t,onError:s,onUnauthorized:o,password:r})),a(qN()))},[a,e,t,s,o,r])}function bie(){const e=ct(),{courseLoaded:t,coverLoaded:s}=c4(),o=de(i=>i.course?.coverImage?.media),r=lt(o),a=(0,u.useCallback)(()=>{e(P7(!0))},[e]);(0,u.useEffect)(()=>{if(t&&!s){const i=r?.image,{key:c,src:l}=i||{};if(c||l){const d=c?dt(i):l,h=setTimeout(a,5e3),m=new Image;return m.src=d,m.onload=()=>{clearTimeout(h),a()},()=>{clearTimeout(h),m.onload=null}}else a()}},[t,s,r,a])}function yie(e={}){xie(e),bie();const t=ct(),s=ob(),o=de(f=>f.courseLabels.labels),{courseLoaded:r,coverLoaded:a,fatalError:i,fontsLoaded:c,notFound:l,partnerContentLoaded:d}=c4(),h=(0,Me.A)(r),m=r&&c&&a&&d;return(0,u.useEffect)(()=>{!h&&r&&!c&&(s??[]).length>0&&t(xN(s))},[t,h,r,c,s]),(0,u.useEffect)(()=>{if(!m||window.parent===window)return;window.parent.postMessage({type:"course:ready"},window.location.origin);const f=v=>{v.key==="Escape"&&window.parent.postMessage({type:"preview:escape"},window.location.origin)};return window.addEventListener("keydown",f),()=>window.removeEventListener("keydown",f)},[m]),{isLoaded:!!m,notFound:!!l,fatalError:!!i,curtainLabels:o}}function Tie({course:e}){const[t,s]=(0,u.useState)(!0),[o,r]=(0,u.useState)(!1),a=e&&"hasPassword"in e?!!e.hasPassword:!1,i=!!(t&&bg()&&e&&!WM(e)&&(a||yg())),c=(0,u.useCallback)(l=>(r(!1),v8(l.value).then(({isValid:d})=>{d?s(!1):(l.value="",r(!0),s(!0))}).catch(d=>console.error("Verify password error",d))),[]);return{showPasswordDialog:i,failAttempt:o,onSharePasswordSubmit:c}}function Lie(){return DV(),vie(),gie(),(0,n.jsx)(iz,{children:(0,n.jsx)(SO,{children:(0,n.jsx)(Sie,{})})})}function Sie(){const{enabled:e,isActive:t,onAuthorized:s,onError:o,onUnauthorized:r,password:a}=LO(),{isLoaded:i,notFound:c,fatalError:l,curtainLabels:d}=yie({enabled:e,onAuthorized:t?s:void 0,onError:t?o:void 0,onUnauthorized:t?r:void 0,password:t?a:void 0}),h=re(),{showPasswordDialog:m,failAttempt:f,onSharePasswordSubmit:v}=Tie({course:h}),C=!t&&m;return c?(0,n.jsx)(Ap,{}):i?C?(0,n.jsx)(pie,{failAttempt:f,onSubmit:v}):h?(0,n.jsx)(kie,{course:h}):null:(0,n.jsx)(e2,{labels:d,status:l?"fatalError":"loading"})}function kie({course:e}){const t=$I(),s=BV(),{themeId:o}=e,r=`theme ${o}${t?" one-page":""}`;return(0,n.jsx)(Pj,{appType:"learn",children:(0,n.jsx)(XV,{children:(0,n.jsx)(WV,{children:(0,n.jsx)(TO,{children:(0,n.jsx)(EV,{themeId:o,children:(0,n.jsx)(Ah,{children:(0,n.jsx)(OV,{children:(0,n.jsxs)("div",{className:r,id:"innerApp",ref:kO,children:[(0,n.jsx)(_V,{...s}),(0,n.jsxs)(JM,{children:[(0,n.jsx)(mie,{}),(0,n.jsx)(Rj,{})]})]})})})})})})})})}function Nie({children:e}){return(0,n.jsx)(cW,{ImageEagerOrLazy:pf,children:e})}var l4;const d4={"rise-course-navigation":!0},Iie={"ai-assistant-blocks":!0,"ai-text-to-video":!1,"ai-assistant-images":!0,"ai-assistant-magic-block-import":!0,"ai-assistant-enable":!0,"ai-assistant-thumbs-feedback-ui":!1,"ai-assistant-subscription-override":!1,"ai-assistant-next-gen-chat-prototype":!1,"ai-use-conversation-harness":!1,"experiment-business-creator-role":!1,"experiment-business-creator-video-training":!1,"rise-ai-avatar-prompt-testing":!1,"rise-com-360-upsell":!0,"ai-quiz-generation-toggle-prototype":!1,"ai-concept-to-course-images-disabled-override":!1,"rise-ai-scenario-practice-mode-enabled":!1},Pp=(0,u.createContext)(d4);Pp.displayName="FeatureFlagsContext";const{Provider:Eie}=Pp;function jie({children:e,value:t}){const s=(0,u.useMemo)(()=>({...Iie,...t,...d4}),[t]);return(0,n.jsx)(Eie,{value:s,children:e})}function Mp(){return(0,u.useContext)(Pp)}function wie(e){return Mp()[e]}function W1e(e){function t(s){const o=Mp();return l4(e,{...s,flags:o})}return t.displayName=`withFeatureFlags(${e.displayName||e.name})`,t}function K1e(e,t){return function(s){const o=r=>{const a=wie(e),i={...r,[t]:a};return l4(s,{...i})};return o.displayName=`withFeatureFlag(${s.displayName||s.name})`,o}}const u4=({children:e})=>(0,n.jsx)(n.Fragment,{children:e});u4.displayName="On";const h4=({children:e})=>(0,n.jsx)(n.Fragment,{children:e});h4.displayName="Off";const Iu=({children:e,featureFlags:t})=>{const s=Mp(),o=(0,u.useMemo)(()=>{const i=[].concat(t??[]);return i.length&&i.every(c=>s[c])},[t,s]),{on:r=null,off:a=null}=(0,u.useMemo)(()=>{const i={};return u.Children.forEach(e,c=>{switch(c.type.displayName){case Iu.On.displayName:i.on=c;break;case Iu.Off.displayName:i.off=c;break;default:i.on=e}}),i},[e]);return o?r:a};Iu.On=u4,Iu.Off=h4;const Aie={};function Rie({children:e}){const s=re()?.features??Aie;return(0,n.jsx)(jie,{value:s,children:e})}const m4=document.getElementById("app");if(!m4)throw new Error("Root element #app not found");(0,p4.createRoot)(m4).render((0,n.jsx)(u.Suspense,{fallback:null,children:(0,n.jsx)(hI,{store:aC,children:(0,n.jsx)(Nie,{children:(0,n.jsx)(pI,{children:(0,n.jsx)(Rie,{children:(0,n.jsx)(we.I9,{useTransitions:!1,children:(0,n.jsx)(Lie,{})})})})})})}))},31926(jc,qa,p){const Wo={"./en-au":52378,"./en-au.js":52378,"./en-ca":44232,"./en-ca.js":44232,"./en-gb":63301,"./en-gb.js":63301,"./en-ie":17282,"./en-ie.js":17282,"./en-il":70761,"./en-il.js":70761,"./en-in":43623,"./en-in.js":43623,"./en-nz":99308,"./en-nz.js":99308,"./en-sg":56270,"./en-sg.js":56270};function lo(Os){const uo=Br(Os);return p(uo)}function Br(Os){if(!p.o(Wo,Os)){const uo=new Error("Cannot find module '"+Os+"'");throw uo.code="MODULE_NOT_FOUND",uo}return Wo[Os]}lo.keys=function(){return Object.keys(Wo)},lo.resolve=Br,jc.exports=lo,lo.id=31926},38954(){}}]);
