1(globalThis.wpRiseJsonp||=[]).push([["learn_main_tsx-node_modules_pnpm_moment_2_30_1_node_modules_moment_locale_sync_recursive_en"],{30349(Uc){Uc.exports=function(ii){ii||(ii={});var __t,__p="";with(ii)__p+=`<style> 2 :root { 3 --color-theme-contrast-complementary-rgb: `+((__t=colorThemeContrastComplementaryRGB)==null?"":__t)+`; 4 --color-theme-contrast-complementary: `+((__t=colorThemeContrastComplementary)==null?"":__t)+`; 5 --color-theme-contrast-rgb: `+((__t=colorThemeContrastRGB)==null?"":__t)+`; 6 --color-theme-contrast: `+((__t=colorThemeContrast)==null?"":__t)+`; 7 --color-theme-rgb: `+((__t=colorThemeRGB)==null?"":__t)+`; 8 --color-theme-tint: `+((__t=colorThemeTint)==null?"":__t)+`; 9 --color-theme-transparent: `+((__t=colorThemeTransparent)==null?"":__t)+`; 10 --color-theme: `+((__t=colorTheme)==null?"":__t)+`; 11 --font-family-body: `+((__t=bodyTypeface)==null?"":__t)+`, 'Noto Sans Myanmar', sans-serif; 12 --font-family-head: `+((__t=headingTypeface)==null?"":__t)+`, 'Noto Sans Myanmar', sans-serif; 13 --font-family-ui: `+((__t=uiTypeface)==null?"":__t)+`, 'Noto Sans Myanmar', sans-serif; 14 15 --mon-theme-font-body: var(--font-family-body); 16 --mon-theme-font-heading: var(--font-family-head); 17 } 18 19 .brand--ui, .brand--ui * { 20 font-family: var(--font-family-ui) !important; 21 } 22 23 .brand--beforeHead:before { 24 font-family: var(--font-family-ui) !important; 25 } 26 27 .brand--afterHead:after { 28 font-family: var(--font-family-ui) !important; 29 } 30 31 .brand--background { 32 background-color: var(--color-theme) !important; 33 } 34 35 .brand--background-all * { 36 background-color: var(--color-theme) !important; 37 } 38 39 .brand--border { 40 border-color: var(--color-theme) !important; 41 42 @media (forced-colors: active) { 43 border-color: transparent !important; 44 } 45 } 46 47 .brand--color { 48 color: var(--color-theme) !important; 49 } 50 51 .brand--color-all * { 52 color: var(--color-theme) !important; 53 } 54 55 .brand--shadow { 56 box-shadow: 0 0 0 0.2rem var(--color-theme) !important; 57 } 58 59 .brand--shadow-all * { 60 box-shadow: 0 0 0 0.2rem var(--color-theme) !important; 61 } 62 63 .brand--fill { 64 fill: var(--color-theme) !important; 65 } 66 67 .brand--stroke { 68 stroke: var(--color-theme) !important; 69 } 70
71 .brand--beforeBackground:before { 72 background-color: var(--color-theme) !important; 73 } 74 75 .brand--beforeBorder:before { 76 border-color: var(--color-theme) !important; 77 } 78 79 .brand--beforeColor:before { 80 color: var(--color-theme) !important; 81 } 82 83 .brand--afterBackground:after { 84 background-color: var(--color-theme) !important; 85 } 86 87 .brand--afterBorder:after { 88 border-color: var(--color-theme) !important; 89 } 90 91 .brand--afterColor:after { 92 color: var(--color-theme) !important; 93 } 94 95 /* should be applied to containers where links 96 need to appear in brand color */ 97 .brand--linkColor a { 98 color: var(--color-theme) !important; 99 fill: var(--color-theme) !important; 100 } 101 102 /* should be applied to containers where links 103 need to change to brand color on hover */ 104 .brand--linkColorHover a:hover { 105 color: var(--color-theme) !important; 106 fill: var(--color-theme) !important; 107 } 108 109 /* should be applied to any single element that 110 needs to change color on hover */ 111 .brand--hoverColor:hover { 112 color: var(--color-theme) !important; 113 } 114 115 .button.brand--background:hover { opacity: .65 !important; } 116 117 .brandHover:hover { 118 fill: var(--color-theme) !important; 119 } 120 121 122 @media (min-width: 47.9375em) { /* 768px */ 123 .brand--min768--background { 124 background-color: var(--color-theme) !important; 125 } 126 127 .brand--min768--border { 128 border-color: var(--color-theme) !important; 129 } 130 131 .brand--min768--color { 132 color: var(--color-theme) !important; 133 } 134 } 135 136 @media (max-width: 47.9375em) { /* 768px */ 137 .brand--max768--background { 138 background-color: var(--color-theme) !important; 139 } 140 141 .brand--max768--border { 142 border-color: var(--color-theme) !important; 143 } 144 145 .brand--max768--color { 146 color: var(--color-theme) !important; 147 } 148 } 149</style> 150`;return __p}},39573(Uc,ii,v){"use strict";var Jo={};v.r(Jo),v.d(Jo,{callbackComponent:()=>Nk,callbackPath:()=>D0,errorPath:()=>bk,getToken:()=>xk,initAuth:()=>O1,login:()=>P1,logout:()=>dr,onFetchTokensThunk:()=>jk,onSessionExpired:()=>Tk,refreshSession:()=>Sk,request:()=>Q9});var s=v(30739),l0=v(77352),er=v(44148),ci=v(21502),Gle=v(40932),Wle=v(51219),Kle=v(75985),Qle=v(15937),Yle=v(5095),Zle=v(33078),Xle=v(51321),qle=v(50651),Jle=v(13663),ede=v(99163),tde=v(61691),nde=v(76954),sde=v(4508),ode=v(21511),u=v(49860),N4=v(33950),Pe=v(48032),j4=v(84545),Gc=v(18398),fo=v(20496),w4=v(69618),A4=v(16422),R4=v(23851);const d0=u.createContext(null),u0=u.createContext(!1),li=e=>(0,s.jsx)(u0.Provider,{value:!0,children:(0,s.jsx)(w4.A,{...e})});function Tg(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(n){super(n),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=(n,...o)=>{this.setState({transitionState:n});const r="on"+n[0].toUpperCase()+n.slice(1),a=this.props[r];typeof a=="function"&&a(...o)};render(){return(0,s.jsx)(d0.Provider,{value:this.state.transitionState,children:(0,s.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 Lg=Tg(A4.Ay),Fs=Tg(R4.A);function P4(e){const t=u.useContext(u0),n=u.useContext(d0),o=u.useRef(e);return t&&n?.startsWith?.("exit")||(o.current=e),o.current}function M4(e){const t=n=>{const o=P4(n);return(0,s.jsx)(e,{...o,nodeRef:n.ref,ref:n.ref})};return t.displayName=`withTransitionableState(${e.displayName||e.name||"Component"})`,t}const kg=e=>e!=null&&typeof e=="object"&&"map"in e&&typeof e.map=="function",O4=e=>e!=null&&typeof e=="object"&&"run"in e&&typeof e.run=="function",Ig=e=>e!=null&&typeof e=="object"&&"then"in e&&typeof e.then=="function",B4=e=>e!=null&&typeof e=="object"&&"fork"in e&&typeof e.fork=="function",Eg=e=>e!=null&&typeof e=="function",Ng=(e,t)=>
150{const n=o=>Ng(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(n,n);if(kg(e))return e.map(n);if(Ig(e))return e.then(n);if(Eg(e))return function(r,a){return e(i=>r(n(i)),a)}};function D4(){return({dispatch:e,getState:t})=>n=>o=>{if(Eg(o))return o(e,t);if(Ig(o))return o.then(e);if(B4(o)){o.fork(e,e);return}return O4(o)?e(o.run()):kg(o)?o.map(e):n(o)}}function F4(){return[D4()]}var Wc=v(49860);const H4=Gc.Zz;function $4(e,t){const n=(0,Gc.y$)(e,t,H4((0,Gc.Tw)(...F4()))),o=V4(),r=z4(),a=U4(),i=G4(),c=W4(),l=_4();return{Provider:fo.Kq,connect:o,connectBase:r,dispatch:n.dispatch,store:n,useDispatch:a,useDispatchWithOrigin:i,useSelector:c,useStore:l}}function _4(){return function(){return(0,fo.Pj)()}}function V4(){return function(t,n,o,r){return function(a){return(0,fo.Ng)(t,n,o,r)(M4(a))}}}function z4(){return function(t,n,o,r){return function(a){return(0,fo.Ng)(t,n,o,r)(a)}}}function U4(){return fo.wA}function G4(){return function(t){const n=(0,fo.wA)();return Wc.useCallback(r=>n(Ng(r,t)),[n,t])}}function W4(){return function(t,n=fo.bN){const o=Wc.useContext(u0),r=Wc.useContext(d0),a=Wc.useRef(void 0),i=(0,j4.S)(),c=(0,fo.d4)(t,n),l=!i&&o&&r?.startsWith?.("exit");return l||(a.current=c),l&&a.current!==void 0?a.current:c}}var tr=v(40122),K4=v(61017),nr=v.n(K4),ve=v(12742),Q4;function Y4(){return ve.action}function rde(){return Q4}var sr=v(16397),Z4=v(84268),Be=v.n(Z4),X4=v(14778),h0=v.n(X4),q4=v(863),Ee=v.n(q4),J4=v(18271),es=v.n(J4),e9=v(42117),m0=v.n(e9);const Kc=h0()(m0()),jg=["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"],t9=["align","allow","allowfullscreen","frameborder","height","longdesc","marginheight","marginwidth","name","referrerpolicy","sandbox","scrolling","src","title","width"],n9=Kc({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:jg}),s9=Kc({allowedAttributes:{iframe:t9},allowedTags:["iframe"],allowedSchemes:["http","https"]}),f0=es()(Ee(),n9,Be()("")),wg=es()(Ee(),s9,Be()("")),An=Kc({allowedTags:[],allowedAttributes:[]}),ade=Kc({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:jg.filter(e=>e!=="img")}),ide=e=>{const t=e.replace(/((<br>)|(<\/[a-z]*>))+/g," ");return An(t).replace(/\s{2,}/g," ")},{Runtime:sn}=window,Ne=e=>window.env?.[e],cde=!1,lde=null,Ag="Rise 360",o9=e=>`${Ne("CDN_USER_CONTENT_URI")}/${e}`,mt=e=>{const t=e||"",n=sn?.resolvePath!=null?sn.resolvePath.bind(sn):o9;return t.startsWith("http")||t.startsWith("data:")||t.startsWith("//")?t:n(t)||t},r9=e=>sn?.resolveFontPath!=null?sn.resolveFontPath(e):`${e.default?Ne("CDN_URI"):Ne("CDN_USER_CONTENT_URI")}/${e.key}`,Rg=()=>{sn?.exit!=null&&sn.exit()},a9=()=>sn?.isComplete!=null?sn.isComplete():null,di=()=>sn?.isExport!=null?sn.isExport():!1;function i9(){if(sn?.isExport!=null){const e=window.partnerContent?.content;return sn.isExport()&&!!e}return!1}const Pg=()=>{if(sn?.sendTouch!=null)return sn.sendTouch()};var c9=v(91208),Hs=v.n(c9),l9=v(94083),po=v.n(l9),d9=v(55283),Qc=v.n(d9),u9=v(5763),St=v.n(u9),h9=v(95825),Ss=v.n(h9),m9=v(82863),Mg=v.n(m9),f9=v(57260),p0=v.n(f9),p9=v(37832),Xe=v.n(p9),g9=v(11802),Je=v.n(g9),v9=v(70087),ts=v.n(v9);const C9=Hs(),Yc=Xe(),b9=po(),Og=e=>Qc()(e),Zc=es(),Xc=e=>t=>{const n=e(t);return An(n==null?void 0:String(n))},Bg=e=>t=>C9({[e]:n=>An(n==null?void 0:String(n))},t),x9=({startTime:e,stopTime:t})=>t-e,y9=e=>{switch(e.type){case"FILL_IN_THE_BLANK":return _g(e);case"MATCHING":return Wg(e);default:return Qr(e)}},S9=e=>{switch(e.type){case"FILL_IN_THE_BLANK":return _g(e);case"MATCHING":return Wg(e);case"MULTIPLE_CHOICE":return Vg(e);case"MULTIPLE_RESPONSE":return k9(e);default:return Vg(e)}}
150,T9=({isUnfinished:e,item:t,itemProgress:n})=>{switch(t.type){case"FILL_IN_THE_BLANK":return L9(e)(n);case"MATCHING":return j9(t,e)(n);case"MULTIPLE_CHOICE":return zg(t,e)(n);case"MULTIPLE_RESPONSE":return I9(t,e)(n);default:return zg(t,e)(n)}},Dg=e=>[e],Qr=e=>{const t=e.answers||[];if(e.shuffledAnswerIndices&&Array.isArray(e.shuffledAnswerIndices)){const n=e.shuffledAnswerIndices,o=[];return t.forEach((r,a)=>{const i=n[a];typeof i=="number"&&(o[i]=r)}),o.map(Bg("title"))}return t.map(Bg("title"))},g0=Xc(Xe()("id")),Fg=Xc(Xe()("title")),Hg=e=>t=>b9(n=>Je()("id",t,n),Qr(e)),$g=e=>t=>Mg()(t,Qr(e)),_g=e=>p0()("title",Qr(e)),L9=e=>t=>Zc(Be()(e),Be()(""),Xc(n=>Yc("text",n)))(t),Vg=e=>e.correct==null?[]:Hg(e)(e.correct),zg=(e,t)=>n=>Zc(Be()(t),Be()([]),()=>{const o=Yc("selectedIndex",n);return o===void 0?[]:Dg($g(e)(o))})(n),k9=e=>Og(St()(Hg(e),e.corrects??[])),I9=(e,t)=>n=>Zc(Be()(t),Be()([]),()=>{const o=Yc("selectedIndices",n)||[];return Og(o.map(r=>Dg($g(e)(r))))})(n),Ug=({sourceId:e,sourceTitle:t,targetId:n,targetTitle:o})=>({source:{id:`source_${String(e)}`,title:t},target:{id:`target_${String(n)}`,title:o}}),Gg=Xc(Xe()("matchTitle")),E9=e=>{const t=g0(e);
150return Ug({sourceId:t,sourceTitle:Fg(e),targetId:t,targetTitle:Gg(e)})},N9=e=>(t,n)=>{const o=Qr(e),r=o.find(i=>i?.id===n),a=o.find(i=>i?.id===t);return Ug({sourceId:g0(r),sourceTitle:Fg(r),targetId:g0(a),targetTitle:Gg(a)})},Wg=e=>St()(E9,Qr(e)),j9=(e,t)=>n=>Zc(Be()(t),Be()([]),()=>{const o=Yc("matches",n);return ts()(Ss()(N9(e),o??{}))})(n);var w9=v(61346),Kg=v.n(w9);function or(e){const t=e.split(".")[1];if(!t)throw new Error("Invalid token specified: missing payload");const n=t.replace(/-/g,"+").replace(/_/g,"/"),o=n.padEnd(n.length+(4-n.length%4)%4,"="),r=new TextDecoder().decode(Uint8Array.from(atob(o),i=>i.charCodeAt(0))),a=JSON.parse(r);if(!A9(a))throw new Error("Invalid token specified: payload is not an object");return a}const A9=e=>typeof e=="object"&&e!==null&&!Array.isArray(e);var v0,dde;const C0="_articulate_user_id",R9="_rise_authoring_api_session",Qg=()=>"_articulate_rise_",Yg=e=>{if(typeof document>"u")return;const t=document.cookie?document.cookie.split(";"):[];for(const n of t){const o=n.indexOf("=");if(o===-1||n.slice(0,o).trim()!==e)continue;const a=n.slice(o+1).trim();try{return decodeURIComponent(a)}catch{return a}}},b0=(e,t)=>`${e}=${t}; domain=${Ne("SESSION_COOKIE_DOMAIN")}; path=/; secure=true`,P9=e=>document.cookie=b0(C0,e),M9=()=>document.cookie=`${b0(C0,"")}; Max-Age=-99999999`,O9=()=>document.cookie=`${b0(R9,"")}; Max-Age=-99999999`,rr=()=>Yg(C0),lt=()=>Yg(Qg()),B9=()=>lt()?or(lt()).staff:!1,D9=()=>lt()?v0(lt())?.staffRoles||[]:[],F9=()=>lt()?v0(lt())?.content_team_admin:!1,ude=()=>D9().includes("content-team")||F9(),x0=()=>lt()?or(lt()).riseId||or(lt()).sub||or(lt()).aid:"",H9=()=>lt()?or(lt()).roles:[],$9=()=>lt()?or(lt()).tenantId:"",Zg=()=>lt()?or(lt()).subscription||{}:{},_9=()=>Zg().plan_id||"",V9=()=>Zg().status||"",z9=()=>lt()?v0(lt()).user_subscription||{}:{},hde=()=>z9()?.subscription?.type||"";var U9=v(31035),G9=v(82485),Yr=v.n(G9);const W9=Yr()(window.env,{ACCESS_COOKIE_NAME:Qg(),REDIRECT_URI:window.location.origin+"/auth-callback"}),go=(0,U9.A)(W9),Xg=go.closeSession,Zr=go.on,K9=go.off,Q9=go.request,qg=go.refreshSession,ui=go.resetSession,Y9=go.getAuthorizationUrl,mde=go.fetch;var $s=v(96508);const qc=(e,t)=>((...n)=>{try{return e(...n)}catch(o){window.env?.SERVICE_ENV&&window.env?.SERVICE_ENV!=="prod"&&console.error(o),$s.L2.addError(o),t(o)}}),Jg=e=>{const t=e.getResponseHeader("content-type")||"",n=t.includes("application/json");if(!(n||t.includes("text/")))return e.response;try{const r=new TextDecoder("utf-8").decode(e.response);try{return n?JSON.parse(r):r}catch{return r}}catch{return e.response}},Z9=(e,t)=>{if(t)return Jg(e);try{return JSON.parse(e.response)}catch{return e.response}};function X9(e,t){const n=t.indexOf(":"),o=t.substr(0,n).trim().toLowerCase(),r=t.substr(n+1).trim();return o&&(e[o]=e[o]?e[o]+", "+r:r),e}function q9(e){return e?e.split(` 151`).reduce(X9,{}):{}}function e1(e){const t=[];for(const n in e){const o=e[n];if(!Array.isArray(o)){t.push(encodeURIComponent(n)+"="+encodeURIComponent(o));continue}for(const r of o)t.push(e1(r))}return t.join("&")}function y0(e){let t,n=!1;const o=new Promise(function r(a,i){const c=e.signal;if(c?.aborted){i(new DOMException("Aborted","AbortError"));return}const l=N=>{throw i(N),N},d=()=>{t.abort(),i(new DOMException("Aborted","AbortError"))},h=e.data;let m=qc(e.deserialize??Kg(),l);const f=e.headers??{},p=e.json??!1,C=e.jwt??!1,g=e.token??null,x=e.method??"GET",b=e.reviewEnv??!1,y=e.onUploadProgress;let L=qc(e.serialize??Kg(),l),S=e.url;const T=e.withCredentials??!1,k=e.file,I=e.timeout??3e3;t=new XMLHttpRequest;const E=setTimeout(()=>{t.abort(),i({error:"request timed out"})},I);if(p&&(m=qc(JSON.parse,i),L=qc(JSON.stringify,i),f["Content-Type"]="application/json"),x==="GET"&&h&&(S+="?"+e1(h)),C){const N=g||lt();f.Authorization="Bearer "+N}c?.addEventListener("abort",d),t.withCredentials=T,t.addEventListener("abort",i),t.addEventListener("error",i),t.addEventListener("load",function(){if(t.status>=400)if([401,403].includes(t.status)){const N=Z9(t,e.arrayBuffer);n?i({error:"Unable to resume session",status:t.status,body:N}):ui().then(()=>{r(a,i),n=!0}).catch(M=>{$s.L2.addError(M),i({error:"Unable to resume session",status:t.status,body:N})})}else e.arrayBuffer?i(Jg(t)):i(m(t.response));else a({body:t.status===204?void 0:m(t.response),headers:q9(t.getAllResponseHeaders()),status:t.status}),c?.removeEventListener("abort",d);clearTimeout(E)}),t.upload&&typeof y=="function"&&t.upload.addEventListener("progress",y),t.open(x,S),e.arrayBuffer&&(t.responseType="arraybuffer");for(const N in f)t.setRequestHeader(N,f[N]);x!=="GET"&&h?t.send(L(h)):k?t.send(k):t.send()});return o.abort=(...r)=>t.abort(...r),o}function J9(e){return e.status===200||e.status===201?e.body:Prom
151ise.reject(e.body)}const t1=(e,t=!0)=>t?`${e}s`:e;var S0=null;const fde=null,n1=null,pde=(e,t="short")=>{const o=Object.keys(S0).reverse().find(c=>e>=S0[c]);if(!o)return`${e} ${t1("byte",e>1)}`;const r=e/S0[o],a=r%1===0?r.toFixed(0):r.toFixed(2),i=t==="long"?t1(n1[o].long,r>1):n1[o].short;return`${a} ${i}`};var eT=v(48319),tT=v.n(eT);const on=e=>!!e&&e.type==="quiz",Ts=e=>!!e&&e.type==="blocks",ft=({courseProgress:e,lessonId:t,updatedLessonProgress:n})=>({...e,lessons:{...e.lessons,[t]:n}});function pt({lessonId:e,nextCourseProgress:t,prevCourseProgress:n}){const o=t.lessons[e],r=n.lessons[e];if(o&&!tT()(o,r)&&(NI(o),nT({lessonId:e,courseProgress:t,prevCourseProgress:n})),sT({lessonId:e,prevCourseProgress:n,nextCourseProgress:t})){const a=o1(n),i=o1(t),c=i!==a,l={...t,percentComplete:i};return c&&(oT({courseProgress:l,lessonProgress:o}),l.percentComplete!=null&&wI(l.percentComplete)),l}return t}function nT({courseProgress:e,prevCourseProgress:t,lessonId:n}){const o=e.lessons?.[n],r=t.lessons?.[n];if(o?.percentComplete===100&&r?.percentComplete!==100){const a=s1(o);a&&EI(a)}}function sT({lessonId:e,nextCourseProgress:t,prevCourseProgress:n}){const o=t.lessons?.[e];if(!o)return!1;const r=n.lessons?.[e]?.percentComplete===100,a=o.percentComplete===100,i=r!==a,c=t.currentLesson!=null&&on(t.lessons[t.currentLesson])&&t.lessons[t.currentLesson]?.percentComplete===100;return i||c}function s1(e){const{id:t}=e;if(!t)throw new Error("Cannot create lesson payload: lesson.id is missing");if(on(e)){const{passed:n,score:o,passingScore:r=0}=e;return{id:t,...n!==void 0&&{passed:n},...o!==void 0&&{score:o},passingScore:r}}return{id:t}}function o1(e){const{lessons:t={}}=e,n=Object.keys(t).length;if(n===0)return 0;const o=Object.values(t).filter(r=>r.isComplete).length;return Math.round(o/n*100)}function oT({courseProgress:e,lessonProgress:t}){if(!e||!t)return;const n=s1(t);n&&jI(e,n)}const rT=e=>e.reduce((t,n,o)=>("id"in n&&(t[n.id]={id:n.id,index:o}),t),{}),T0=e=>({...e,percentComplete:L0({items:e.items,key:"isComplete"})}),r1=e=>({...e,percentComplete:L0({items:e.items,key:"isComplete"})}),a1=e=>({...e,percentViewed:L0({items:e.items,key:"isViewed"})});function gde({itemId:e,isCorrect:t,progress:n}){const o={...n,items:{...n.items,[e]:{...n.items?.[e],id:e,index:n.items?.[e]?.index??0,isComplete:t,isViewed:t,...n.items?.[e].isCorrect===void 0?{isCorrect:t}:{}}}};o.items[e]?.isCorrect===!1&&(o.lastIncorrectCardId=e);const r=aT(o),a=r.percentComplete!==100?r1(r):r,i=a1(a);return i.percentComplete===100?{...i,isComplete:!0}:i}function L0({items:e,key:t}){const n=e??{},o=Object.keys(n).length,r=Object.values(n).filter(a=>a?.[t]).length;return o===0?0:Math.round(r/o*100)}function aT(e){const n=Object.values(e.items||{}).filter(o=>o.isCorrect===!0).length;return{...e,correctlyAnswered:n}}var k0=v(66330),iT,cT;const Vt=e=>!!e&&Object.prototype.toString.call(e)==="[object Object]",i1=Array.isArray,vde=(e,t)=>Object.fromEntries(Object.entries(t).map(e)),c1=(e,t,n)=>{const o={};for(const r in n)o[e(r)]=t(n[r]);return o},lT=e=>e.map(l1),dT=e=>e.map(d1),uT=e=>c1(iT,l1,e),hT=e=>c1(cT,d1,e),l1=e=>Vt(e)?uT(e):i1(e)?lT(e):e,d1=e=>Vt(e)?hT(e):i1(e)?dT(e):e,_s=(e,t)=>{const n=new Set(t),o={};for(const r in e)n.has(r)||(o[r]=e[r]);return o},vo=(e,t)=>Object.fromEntries(Object.entries(e).map(([n,o])=>t(n,o)));function u1(e,t){const n=e.lessons[t];if(!Ts(n))return e;const o={...I0(n),id:t},r=ft({courseProgress:e,lessonId:t,updatedLessonProgress:o});return pt({lessonId:t,prevCourseProgress:e,nextCourseProgress:r})}function mT(e,t){const{lessonId:n,blockId:o,itemId:r}=t,a=e.lessons[n];if(!Ts(a))return e;const i=a.items[o],c=TT({blockProgress:i,itemId:r}),l=ar({lessonProgress:a,blockId:o,updatedProgressBlock:c}),d=T0(l),h=ft({courseProgress:e,lessonId:n,updatedLessonProgress:d});return pt({lessonId:n,prevCourseProgress:e,nextCourseProgress:h})}function fT(e,t){const n=e.lessons[t];if(!Ts(n))return e;const o=kT(n),r=ft({courseProgress:e,lessonId:t,updatedLessonProgress:o});return pt({lessonId:t,prevCourseProgress:e,nextCourseProgress:r})}function pT(e,{blockId:t,lessonId:n}){const o=e.lessons[n];if(!Ts(o))return e;const r=IT(o.items[t]),a=ar({lessonProgress:o,blockId:t,updatedProgressBlock:r}),i=ft({courseProgress:e,lessonId:n,updatedLessonProgress:a});return pt({lessonId:n,prevCourseProgress:e,nextCourseProgress:i})}function gT(e,t){const{lessonId:n,blockId:o,items:r}=t,a=e.lessons[n];if(!Ts(a))return e;const i=ST({blockId:o,lessonProgress:a,items:r}),c=ft({courseProgress:e,lessonId:n,updatedLessonProgress:i});return pt({lessonId:n,prevCourseProgress:e,nextCourseProgress:c})}function vT(e,t){const{lessonId:n,blockId:o,itemId:r,audioVideoPlayhead:a}=t,i=e.lessons[n],c=i?.items?.[o];if(!Ts(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=ar({lessonProgress:i,blockId:o,updatedProgressBlock:h}),f=ft({courseProgress:e,lessonId:n,updatedLessonProgress:m});return pt({lessonId:n,prevCourseProgress:e,nextCourseProgress:f})}function CT(e,t){const{lessonId:n,blockId:o,itemId:r,isCorrect:a}=t,i=e.lessons[n];if(!Ts(i))return e;
151const c=ET({itemId:r,isCorrect:a,blockProgress:i.items[o]}),l=T0(ar({lessonProgress:i,blockId:o,updatedProgressBlock:c})),d=ft({courseProgress:e,lessonId:n,updatedLessonProgress:l});return pt({lessonId:n,prevCourseProgress:e,nextCourseProgress:d})}function bT(e,t){const{lessonId:n,blockId:o,itemId:r,response:a}=t,i=e.lessons[n],c=i?.items?.[o];if(!Ts(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=ar({lessonProgress:i,blockId:o,updatedProgressBlock:h}),f=ft({courseProgress:e,lessonId:n,updatedLessonProgress:m});return pt({lessonId:n,prevCourseProgress:e,nextCourseProgress:f})}function xT(e,t){const{lessonId:n,blockId:o,isSubmitted:r}=t,a=e.lessons[n];if(!Ts(a))return e;const i=a?.items?.[o]??{},c=vo(i?.items??{},(m,f)=>[m,_s(f,["response"])]),l={...i,items:c,isSubmitted:r},d=ar({lessonProgress:a,blockId:o,updatedProgressBlock:l}),h=ft({courseProgress:e,lessonId:n,updatedLessonProgress:d});return pt({lessonId:n,prevCourseProgress:e,nextCourseProgress:h})}const yT=e=>Object.values(e).length>0&&Object.values(e).every(t=>t.isComplete),I0=e=>{const t=vo(e.items,(n,o)=>{const r=vo(o.items??{},(a,i)=>[a,{...i,isComplete:!0,id:i.id,index:i.index}]);return[n,{...o,items:r,isComplete:!0}]});return{...e,isComplete:!0,items:t,percentComplete:100}},ST=({blockId:e,items:t,lessonProgress:n})=>{const o=n.items?.[e]??{items:{}},r=new Set(t.map(d=>String(d.id))),a=vo(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||yT(a),l={...o,id:e,items:a,...c&&{isComplete:!0}};return LT(ar({lessonProgress:n,blockId:e,updatedProgressBlock:l}))},TT=({blockProgress:e,itemId:t})=>{if(!e.items)return e;const n=e.items[t];return{...e,items:{...e.items,[t]:{...n,retryAttemptCount:(n?.retryAttemptCount??0)+1}}}},LT=e=>{const t=T0(e);return t.percentComplete===100?{...t,isComplete:!0}:t},ar=({blockId:e,lessonProgress:t,updatedProgressBlock:n})=>({...t,items:{...t.items,[e]:n}}),kT=e=>{const t=vo(e.items,(n,o)=>{const r=vo(o.items??{},(a,i)=>[a,_s(i,["isComplete","isCorrect","isViewed"])]);return[n,{id:o.id,index:o.index,items:r}]});return{..._s(e,["isComplete","percentComplete"]),items:t}},IT=e=>({..._s(e,["percentViewed","correctlyAnswered"]),id:e.id,index:e.index,items:vo(e.items??{},(t,n)=>[t,_s(n,["isViewed","isCorrect"])]),retryAttempts:(e.retryAttempts??0)+1}),ET=({isCorrect:e,itemId:t,blockProgress:n})=>{if(!n.items)return n;const o=n.items[t],r={...o,isComplete:e,isViewed:e,...o?.isCorrect===void 0&&{isCorrect:e}},a={...n.items,[t]:r},i=Object.values(a).filter(m=>m.isCorrect).length,c={...n,items:a,correctlyAnswered:i,...!e&&{lastIncorrectCardId:t}},l=a1(c),d=r1(l),h=d.percentComplete===100;return{...d,...h&&{isComplete:!0}}};var NT=v(7504);const Cde="datadoghq.com",bde=Ne("SERVICE_ENV"),xde=Ne("RISE_FRONTEND_SHA"),yde=Ne("RISE_FRONTEND_LOCAL_DEV")==="true"||window.location.hostname==="rise.dev.articulate.zone",Sde=window.Cypress!=null,Tde=[/https:\/\/(rise(\.dev)?|360)\.articulate\.(com|zone)(?!\/api\/rise-business-content\/).*/],E0={RESUME_RECOVERY:"Quiz resume recovery",END_ADVANCE_REFUSED:"Quiz end advance refused"};function Lde(e,t){}function h1(e){return e.trim()===""}var jT=v(97115);const _=(0,jT.setup)({el:"__",mod:"--",modValue:"-"}),wT=_("quiz"),AT=0,Xr=2,RT=e=>({start:e<Xr?0:e-Xr,end:e+Xr});function PT(e){return e+1}function MT(e){return e<AT+Xr}function OT(e,t){const{start:n,end:o}=RT(t);return{items:e.slice(n,o),startOffset:n}}function Jc({activeIndex:e,index:t}){return wT("card",{active:t===e,done:t<e,next:t===e+1,penultimate:t===e+Xr,future:t>e+Xr})}function BT(e,t){const{lessonId:n,fromIndex:o,progressId:r}=t,a=e.lessons[n];if(!on(a))return e;const i=a.activeIndex??0;if(o!=null&&i!==o)return e;const c=r?(a.items[r]?.index??i)+1:i+1,l=Object.keys(a.items).length+1,d=Math.min(c,l);if(d===l&&t.finalize&&!a.reportResults&&!hi(a))return E0.END_ADVANCE_REFUSED,{...m1(a)},e;let h={...a,activeIndex:d};d===l&&!a.reportResults&&t.finalize&&(h=el(h,{passingScore:a.passingScore??80,passToContinue:t.passToContinue,finalRetryAttempt:t.finalRetryAttempt}));const m=ft({courseProgress:e,lessonId:n,updatedLessonProgress:h});return pt({lessonId:n,prevCourseProgress:e,nextCourseProgress:m})}function DT(e,t){const{lessonId:n}=t,o=e.lessons[n];if(!on(o))return e;if(t.finalize&&!o.reportResults&&!hi(o))return E0.END_ADVANCE_REFUSED,{...m1(o)},e;const r=Object.keys(o.items).length;let a={...o,activeIndex:r+1};!o.reportResults&&t.finalize&&(a=el(a,{passingScore:o.passingScore??80,passToContinue:t.passToContinue,finalRetryAttempt:t.finalRetryAttempt}));const i=ft({courseProgress:e,lessonId:n,updatedLessonProgress:a});return pt({lessonId:n,prevCourseProgress:e,nextCourseProgress:i})}function FT(e,{lessonId:t,itemId:n}){const o=e.lessons[t];if(!on(o))return e;const r=o.items[n];if(!r)return e;const a={...r,selectedIndices:[]},i=mi({lessonProgress:o,itemId:n,updatedProgressQuizItem:a}),c=ft({courseProgress:e,lessonId:t,updatedLessonProgress:i});return pt({lessonId:t,prevCourseProgress:e,nextCourseProgress:c})}function HT(e,t){const{lessonId:n,lessonProgress:o}=t,r=e.lessons[n],a=on(r)&&r.reportResults?r:void 0,i=a?{...o,isComplete:a.isComplete,passed:a.passed,percentComplete:a.percentComplete,reportResults:a.reportResults,score:a.score}:o,c={...e,lessons:{...e.lessons,[n]:i}};if(a||!$T(o,t))return c;const l=el(o,{passingScore:o.passingScore??80,passToContinue:t.passToContinue,finalRetryAttempt:t.finalRetryAttempt});return pt({lessonId:n,prevCourseProgress:e,nextCourseProgress:ft({courseProgress:c,lessonId:n,updatedLessonProgress:l})})}function $T(e,t){if(!t.finalize||e.reportResults)return!1;const n=Object.keys(e.items).length;return n>0&&(e.activeIndex??0)>=n+1&&hi(e)}function _T(e){const t=Object.values(e.items);if(t.length===0)return 0;const n=t.filter(o=>o.isCorrect).length;return Math.round(n/t.length*100)}function m1(e){return{itemCount:Object.keys(e.items).length,incompleteItemIds:Object.values(e.items).filter(t=>t.isComplete!==!0).map(t=>String(t.id))}}function VT(e,{lessonId:t,itemId:n,text:o}){const r=e.lessons[t];if(!on(r))return e;const a=r.items[n];if(!a)return e;
151const i=typeof o=="string"&&h1(o)?_s(a,["text"]):{...a,text:o},c=mi({lessonProgress:r,itemId:n,updatedProgressQuizItem:i}),l=ft({courseProgress:e,lessonId:t,updatedLessonProgress:c});return pt({lessonId:t,prevCourseProgress:e,nextCourseProgress:l})}function zT(e,t){const n=e.lessons[t];if(!on(n))return e;const o=vo(n.items,(c,l)=>{const d={id:l.id,index:l.index};return[c,d]}),a={..._s(n,["activeIndex","originalItemProgress","passed","percentComplete","questionList","questionsDrawn","reportResults","score"]),...n.passed!==!1&&{passed:n.passed},...n.isComplete!==!1&&{isComplete:n.isComplete},retryAttempts:(n.retryAttempts??0)+1,items:o},i=ft({courseProgress:e,lessonId:t,updatedLessonProgress:a});return pt({lessonId:t,prevCourseProgress:e,nextCourseProgress:i})}function UT(e,{lessonId:t,itemId:n,selectedIndex:o,shuffledAnswerIndices:r}){const a=e.lessons[t];if(!on(a))return e;const i=a.items[n];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=mi({lessonProgress:a,itemId:n,updatedProgressQuizItem:d}),m=ft({courseProgress:e,lessonId:t,updatedLessonProgress:h});return pt({lessonId:t,prevCourseProgress:e,nextCourseProgress:m})}function GT(e,{lessonId:t,itemId:n,matches:o}){const r=e.lessons[t];if(!on(r))return e;const a=r.items[n];if(!a)return e;const i={...a,matches:o},c=mi({lessonProgress:r,itemId:n,updatedProgressQuizItem:i}),l=ft({courseProgress:e,lessonId:t,updatedLessonProgress:c});return pt({lessonId:t,prevCourseProgress:e,nextCourseProgress:l})}function WT(e,{lessonId:t,timeRemaining:n}){const o=e.lessons[t];if(!on(o))return e;const r={...o,timeRemaining:n},a=ft({courseProgress:e,lessonId:t,updatedLessonProgress:r});return pt({lessonId:t,prevCourseProgress:e,nextCourseProgress:a})}function KT(e,{lessonId:t,itemId:n,isCorrect:o,finalRetryAttempt:r,passToContinue:a}){const i=e.lessons[t];if(!on(i))return e;const c=i.passingScore??80,l=i.items[n];if(!l)return e;const d={...l,isCorrect:o,isComplete:!0},h={...i.items,[n]:d},m=Object.keys(h).length,f=Object.values(h).filter(L=>L.isCorrect).length,p=Object.values(h).filter(L=>L.isComplete).length,C=Math.round(f/m*100),g=Math.round(p/m*100),x=p===m?100:Math.min(g,99);let b={...i,items:h,score:C,percentComplete:x};hi(b)&&(b=el(b,{passingScore:c,passToContinue:a,finalRetryAttempt:r}));const y=ft({courseProgress:e,lessonId:t,updatedLessonProgress:b});return pt({lessonId:t,prevCourseProgress:e,nextCourseProgress:y})}function QT(e,{lessonId:t,itemId:n,selectedIndex:o,shuffledAnswerIndices:r}){const a=e.lessons[t];if(!on(a))return e;const i=a.items[n];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,...p}=i,C=m.length>0?{...p,selectedIndices:m,...Array.isArray(c)&&{shuffledAnswerIndices:c}}:{...p,...Array.isArray(c)&&{shuffledAnswerIndices:c}},g=mi({lessonProgress:a,itemId:n,updatedProgressQuizItem:C}),x=ft({courseProgress:e,lessonId:t,updatedLessonProgress:g});return pt({lessonId:t,prevCourseProgress:e,nextCourseProgress:x})}function el(e,{passingScore:t,passToContinue:n,finalRetryAttempt:o}){if(e.reportResults||!hi(e))return e;const r=_T(e),a=r>=t,i=n?a:!0;return rv(a,r,e.id,o),{...e,passed:a,isComplete:i,reportResults:!0,score:r,percentComplete:100}}function hi(e){return Object.values(e.items).every(t=>t.isComplete===!0)}function mi({itemId:e,lessonProgress:t,updatedProgressQuizItem:n}){return{...t,items:{...t.items,[e]:n}}}function YT(e,t){const{id:n,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?.[n]?.items??{},h=Object.keys(d).length+1,m=e.lessons?.[n];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,[n]:f}}}function ZT(e,{quizId:t,destinationId:n}){const o=Object.keys(e.lessons),r=o.findIndex(c=>c===t),a=o.findIndex(c=>c===n);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=on(d)?XT(d):I0(d),m=ft({courseProgress:c,lessonId:l,updatedLessonProgress:h});return pt({lessonId:l,prevCourseProgress:c,nextCourseProgress:m})},e)}function XT(e){const t=Object.fromEntries(Object.entries(e.items||{}).map(([n,o])=>[n,{...o,isComplete:!0,isCorrect:!0}]));return rv(!0,100,e.id,!1),{...e,items:t,isComplete:!0,passed:!0,percentComplete:100,reportResults:!0,score:100}}var qT=v(58512),JT=v(2949),De=v.n(JT),eL=v(309),Co=v.n(eL);const tL=e=>e!==void 0,f1=Co()(tL,De()(JSON.parse,qT.Base64.decode)),nL=(e,t)=>window.courseData?e(window.courseData):window.course?{course:e(window.course),media:[]}:t;var sL=v(16109),ns=v.n(sL),oL=v(1554),Vs=v.n(oL),rL=v(27494),Et=v.n(rL),aL=v(4656),N0=v.n(aL),iL=v(85440),p1=v.n(iL);const cL=["fromDashboard","locale","embed"];function lL(e,t){const n=typeof e=="function"?e(t):e;return typeof n=="string"?(0,Pe.Rr)(n):n}function j0(e,t){const n=lL(e,t),o=new URLSearchParams(t?.search||""),r=new URLSearchParams(n?.search||"");for(const a of cL){const i=o.get(a);i&&!r.has(a)?r.set(a,i):r.has(a)&&!r.get(a)&&r.delete(a)}return{...n,search:r.toString()}}function rn(){const e=(0,Pe.Zp)(),t=(0,Pe.zy)();return(0,u.useCallback)((n,o)=>
151{if(typeof n=="number")return e(n);const r=j0(n,t);return e(r,o)},[e,t])}function dL(e){function t(n){const o=(0,Pe.zy)(),r=rn(),a=(0,Pe.g)(),[i]=(0,Pe.ok)();return(0,s.jsx)(e,{...n,location:o,match:{params:a},navigate:r,queryParams:i})}return t.displayName=`withRouter(${e.displayName||e.name})`,t}var g1=v(64621);function uL(e){return Object.fromEntries(new URLSearchParams(e.slice(1)))}var hL=v(72349),v1=v.n(hL),mL=v(62220),w0=v.n(mL),fL=v(25784),bo=v.n(fL),pL=v(62197),qr=v.n(pL),gL=v(18793),Mt=v.n(gL),vL=v(6964),CL=v.n(vL),bL=v(77233),tl=v.n(bL),Ede=v(67829),xL;function yL(...e){return De()(...CL()(1,e))(tl()(e))}function A0(e,...t){return Mt()(...t)(e)}function Nde(e,...t){return xL(...t)(e)}const an=()=>{},C1={"Content-Type":"application/json"},SL=[(e,t)=>(t.Authorization=`Bearer ${Ci()}`,JSON.stringify(e))],TL=es()(Et(),Ee(),bo()(["data","status","statusText"])),LL=Mt()(bo()(["name","message","response"]),Hs()({response:TL})),kL=({baseURL:e,...t})=>De()(Yr()({headers:C1,transformRequest:SL}),Yr()(t),Hs()({url:ns()(e)})),IL=({data:e,method:t,url:n})=>fetch(n,{body:JSON.stringify(e),headers:{...C1,Authorization:`Bearer ${Ci()}`},keepalive:!0,method:t}).then(o=>o.json()).then(qr()("data")),EL=nr().fromPromise(IL),NL=e=>({method:t,url:n})=>`${t}:${e}${n}`,jL=e=>{const t=new Error("Nil token detected");return $s.L2.addError(t,e),nr().Rejected(t)},wL=e=>t=>e.preRequest?e.preRequest(t):t,AL=e=>t=>e.postRequest?e.postRequest(t):t,RL=()=>Et()(Ci()),PL=e=>(t,n)=>v1()(t,NL(n),R0(bi,e)),R0=(e,t)=>n=>A0(n,wL(t),kL(t),es()(RL,jL,e),w0()(LL,Xe()("data")),AL(t)),ML=e=>({debounce:PL(e),send:R0(bi,e),sendWithKeepAlive:R0(EL,e)}),OL=()=>document.visibilityState==="visible",BL=e=>Co()(OL,()=>e()),b1=(e=>{document.addEventListener("visibilitychange",BL(e)),window.addEventListener("focus",()=>e())});v.dn(b1);var DL=v(44113),Cn=v.n(DL),FL=v(34469),fi=v.n(FL),HL=v(92996),$L=v.n(HL),_L=v(14501),ir=v.n(_L);const VL=e=>({user_role:e?.is_business_creator?"Business Creator":"Creator",is_admin:!!e?.is_team_admin});var zL;const x1=e=>{const t=e.user,n=t?.profile?.user_id,o=t?.subscription?.subscription_id||t?.subscription?.id,{user_role:r,is_admin:a}=VL(t?.subscription);return{application_source:"360_rise",application_service:"authoring",user_role:r,is_admin:a,reach_user_id:void 0,a360_user_id:n,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}}}},wde=e=>{const t=e.course;return{course_id:t?.id,course_locale:t?.locale||e.l10n&&zL(e.l10n)||null,course_created_via:t?.metadata?.createdVia??null,course_snapshot_id:t?.metadata?.restoredFromSnapshotId??null,copied_course_id:t?.copyOf??null}},Ade=(e,t)=>{if(!t)return{};const n=e?.lessons?.[t];if(!n)return{};const o=e?.course?.lessons?.indexOf(t)+1||null;return{lesson_id:t,lesson_type:n.type,lesson_position:o}},Rde=(e,t,n)=>{if(!t||!n)return{};const r=(e.lessons||{})[t];if(!r?.items)return{};const a=r.items.find(l=>l.id===n);if(!a)return{};const c=r.items.map(l=>l.id).indexOf(n)+1;return{block_id:n,block_type:a.type,block_variant:a.variant,block_family:a.family,block_position:c,block_created_via:a?.metadata?.createdVia??"manual"}},Pde=({interactionSetId:e,interactionSetWorkflowKey:t,taskType:n,resourceType:o,hasSourceContent:r}={})=>e?{interaction_set_id:e,...t&&{interaction_set_workflow_key:t},interaction_set_task_type:n,interaction_set_task_resource_type:o,interaction_set_has_source_content:r}:{},UL=()=>{if(!navigator.userAgent)return"unknown";const t=new sr.UAParser(navigator.userAgent).getResult();return t.device?.model?t.device.model:t.os?.name?t.os.name:t.browser?.name?t.browser.name:"unknown"},GL=()=>
151{if(!navigator.userAgent)return"unknown";const t=new sr.UAParser(navigator.userAgent).getResult();return t.device?.model&&t.os?.version?t.os.version:t.browser?.version?t.browser.version:"unknown"},WL=()=>{if(!navigator.userAgent)return"desktop";const t=new sr.UAParser(navigator.userAgent).getResult();return t.device?.type==="mobile"?"mobile":t.device?.type==="tablet"?"tablet":"desktop"},KL=()=>{if(!navigator.userAgent)return"unknown";const t=new sr.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"},QL=()=>{if(!navigator.userAgent)return"unknown";const t=new sr.UAParser(navigator.userAgent).getResult();return t.device?.model?t.device.model:"unknown"},y1=()=>{if(!navigator.userAgent)return"browser";const t=new sr.UAParser(navigator.userAgent).getResult();return t.device?.type==="mobile"?"mobile":t.device?.type==="tablet"?"tablet":"browser"};function YL(e){return"userAgentData"in e}const S1=()=>{if(YL(navigator))return{platform:navigator.userAgentData.platform,mobile:navigator.userAgentData.mobile,brands:navigator.userAgentData.brands}},T1=()=>({name:UL(),version:GL(),type:WL(),manufacturer:KL(),model:QL()}),L1=()=>{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}},k1=()=>navigator.userAgent||null,cr=(e,t=null)=>{const n={...e,context:{locale:navigator.language,device:T1(),channel:y1(),userAgentData:S1(),page:L1(),userAgent:k1(),...e.context},properties:{...t?x1(t):{},...e.properties}};return y0({method:"POST",url:`${Ne("RISE_RUNTIME_URI")}/analytics`,json:!0,data:n})},ZL=Ne("SUBSCRIPTIONS_ENDPOINT"),XL=Ne("THREESIXTY_FRONTEND_URI"),qL=$L()(["error","status"],404),JL=De()(qr()("error"),Xe()("response")),ek=()=>window.location.href=XL,tk=[(e,t)=>(t.Authorization=`Bearer ${Ci()}`,e)],nk=async e=>{const t=`${ZL}/users/authorized_status`,n=await bi({transformRequest:tk,url:t}).toPromise().catch(JL),o=De()(e,p1()(a=>cr({event:"Unexpected Logout",payload:{category:"auth",data:a,detail:"Subscription Error"}})));return Cn()([[qL,ek],[fi()("error"),o],[ir(),Xe()("data")]])(n)};function dt(e){const t={};for(const n in e)Object.hasOwn(e,n)&&(t[n]=n);return t}class sk extends Error{constructor(t="Assert Error",n){super(t,n)}}function Ode(e,t="Assertion Error"){if(!e)throw new sk(t)}const Bde=null,Fn={ARTICLE:"Article",INTERACTION:"Interaction",QUIZ:"Quiz",VIDEO:"Video"},nl={EDITOR:1,MANAGER:2,OWNER:3},ok={[nl.EDITOR]:"Author",[nl.MANAGER]:"Admin",[nl.OWNER]:"Owner"},Dde=Object.values(nl).map(e=>({id:e,title:ok[e]})),Fde="questionBanks",I1="2% 0px 2% 0px",Hde=9,$de=13,_de=27,Vde=32,zde=38,Ude=40,Wde=864e5*3,Kde=100,E1="onePage",rk="aiOutline",Qde="guide",P0="presentation",ak="quickReference",M0="scenario",Yde="video",xo=dt({COMPACT:null,COVER:null,OVERLAY:null,SIDEBAR:null}),lr={DESKTOP:"desktop",TABLET_PORTRAIT:"tablet-portrait",TABLET_LANDSCAPE:"tablet-landscape",MOBILE_PORTRAIT:"mobile-portrait",MOBILE_LANDSCAPE:"mobile-landscape"},Zde=Object.values(lr),Xde=null,Tt={DARK:"#000",LIGHT:"#fff"},O0={SMALL:{label:"Small",value:1},MEDIUM:{label:"Medium",value:1.5},LARGE:{label:"Large",value:2}},N1=["embed","map","process","sorting","timeline","video","screencast","slidecast"];var ik;const qde=e=>e.status==="active",ck=e=>e.status==="inactive",Jde=e=>e.plan==="individual",eue=e=>e.features?.enable_review===!0,lk=e=>e.features?.enable_rise===!0,tue=e=>e.plan==="trial",dk=e=>e.plan==="trial"&&e.status==="inactive"&&e.is_retrial_eligible===!1,nue=e=>e.plan==="team"||e.plan==="individual",sue=e=>e.plan==="team"&&e.is_team_admin===!0,oue=e=>e.plan==="trial"&&e.is_team_admin===!0,rue=e=>{if(!e.end_date)return 0;const t=new Date(e.end_date);t.setUTCHours(0,0,0,0);const n=t.setDate(t.getDate()+1);return n&&(n.valueOf()-new Date().setUTCHours(0,0,0,0))/ik||0};var uk=v(7118),B0=v.n(uk),hk=v(13076),j1=v.n(hk),mk=v(81233),pi=v.n(mk),fk=v(66013),Rn=v.n(fk);const gi=(e,t)=>`${Ne("ID_MAPPER_URI")}/v1/avatars/${encodeURIComponent(e)}?size=${t}`,pk=e=>({large:gi(e,"large"),medium:gi(e,"medium"),micro:gi(e,"micro"),mini:gi(e,"mini"),small:gi(e,"small")}),gk=j1()({features:Rn()({},"features"),subscription:N0()(["features"])}),vk=B0()([dk,ck,pi()(lk)]),Ck="/auth-callback",w1="/auth-error",sl=()=>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",(n,o)=>{n==="dialog"&&o==="hide"&&(e(),clearTimeout(t))})}else e()}),D0=Ck,bk=w1,xk=lt,A1=()=>window.location.pathname===D0;let R1=!1,F0=!1;const yk=e=>{if(R1)return;const t=(0,g1.A)();R1=!0,window.localStorage.setItem(t,e);const n=Y9({client_id:Ne("OKTA_CLIENT_ID"),issuer:Ne("OIDC_ISSUER_URI"),redirect_uri:`${window.location.origin}${D0}`,response_mode:"fragment",scope:Ne("OIDC_SCOPE"),state:t,prompt:null});sl().then(()=>{window.location.href=n})},P1=()=>{const e=new URLSearchParams(window.location.search),t=e.has("redirect_url")?e.get("redirect_url"):window.location.href;return yk(t)},Sk=()=>qg().catch(e=>{e.response?.status===404&&dr({onLogout:()=>window.location.reload(!0),reason:"Session expired"})}),Tk=e=>(Zr("unauthorized",e),()=>{K9("unauthorized",e)}),Lk=()=>
151{if(F0)return;const e=rr(),t=x0();Et()(e)?(cr({event:"Unexpected Logout",payload:{category:"auth",userId:t,detail:"id from cookie was null"}}),$s.L2.addError(new Error("Unexpected Logout"),{type:"User Meta",idFromToken:t,idFromCookie:e,detail:"id from cookie was null"}),F0=!0,dr({onLogout:()=>window.location.reload(!0),reason:"Unexpected logout: user id/session cookie missing"})):e!==t&&(cr({event:"Unexpected Logout",payload:{category:"auth",userId:e,idFromToken:t,detail:"Session/Token ID Mismatch"}}),$s.L2.addError(new Error("Unexpected Logout"),{type:"User Meta",idFromToken:t,idFromCookie:e,detail:"Session/Token ID Mismatch"}),F0=!0,ui().then(()=>window.location.reload(!0)))},M1=async e=>{try{const[,t,n,o]=await ui(),{aid:r,content_team_admin:a}=o;if(cr({event:"Setting Session Cookie",payload:{category:"auth",userId:r,detail:"Resuming existing session"}}),P9(r),A1()){e();return}const{first_name:i,last_name:c,launchdarkly:l,staff:d}=t,m={avatars:pk(r),first_name:i,user_id:r,last_name:c,staff:d,content_team_admin:a},f={author:r,profile:m},p=()=>dr({onLogout:Be()(null)}),C=x=>e({...f,...gk(x),launchdarkly:l,token:n}),g=await nk(p).then(p1()(C)).catch(()=>e({...f,token:n}));if(vk(g)){cr({event:"Unexpected Logout",payload:{category:"auth",userId:rr(),subscription:g,detail:"Invalid Subscription"}}),$s.L2.addError(new Error("Unexpected Logout"),{type:"User Meta",userId:rr(),detail:"Invalid Subscription"}),dr({onLogout:()=>window.location=`${Ne("THREESIXTY_FRONTEND_URI")}/rise`});return}b1(Lk)}catch(t){cr({event:"Unexpected Logout",payload:{category:"auth",userId:rr(),error:t,detail:"Error Resuming Session"}}),$s.L2.addError(t,{type:"User Meta",userId:rr(),detail:"Error Resuming Session"}),dr({onLogout:()=>window.location.reload(!0)})}},O1=({onFetchTokens:e})=>{if(A1()){M1(e);return}const t=rr(),n=x0();if(Et()(t)||t!==n){sl().then(P1);return}M1(e)},dr=({onLogout:e,reason:t})=>{t&&cr({event:"Logout",payload:{category:"auth",userId:rr(),detail:t}});const n=Ne("RISE_AUTHORING_URI"),o=()=>ML({baseURL:n}).send({method:"DELETE",url:"/logout"}),r=()=>{M9(),O9(),Xg().then(e)};o().fork(a=>{console.error("Failed to log out of rise-authoring-api",a),r()},r)},kk=(e,t)=>{sl().then(()=>{const o=window.localStorage.getItem(t)||"/",r=o===e?"/":o;window.localStorage.removeItem(t),window.location.href=r})},Ik=e=>()=>window.location.href=`${w1}?description=${e}`,Ek=({location:e})=>()=>{const{hash:t,pathname:n}=e,{state:o,error:r,error_description:a}=uL(t);r?($s.L2.addError(r,{type:"Logout Error",reason:"Error encountered when parsing auth callback.",error_description:a}),dr({onLogout:Ik(a),reason:`Error encountered when parsing auth callback. Error: ${r}; description: ${a}`})):O1({onFetchTokens:()=>kk(n,o)})},Nk=dL(e=>((0,u.useEffect)(Ek(e),[]),null)),jk=({dispatch:e,loadProfileOKTA:t})=>n=>{const o=N0()(["token"],n);De()(e,t)(o)};var wk=v(76871),Ak=v.n(wk),Rk=v(43420),ur=v.n(Rk),Pk=v(21239),Lt=v.n(Pk),Mk=v(8119),B1=v.n(Mk),Ok=v(53883),vi=v.n(Ok);const ol=async()=>{await sl();const[e,t]=St()(encodeURIComponent,B1()(["hash","pathname"],window.location));window.location.href=`/login#c=${t}${e}`},D1=()=>{window.location.href="/"},iue=null,cue=null,lue=lt,due=ol,Bk=Xg,uue=()=>qg().catch(()=>Bk()),hue=()=>an,Dk=Mt()(Rn()([],"roles"),vi()(ur()("author"),D1)),F1=Mt()(Lt()("",["subscription","status"]),vi()(ur()(Ak(),["active","in_trial","non_renewing"]),D1)),Fk=()=>window.location.reload(),mue=async({onFetchTokens:e})=>{try{const[t,n]=await ui(),{launchdarkly:o,riseId:r,sub:a,staff:i,subscription:c}=n,l={staff:i,user_id:r||a};return F1(n),e({author:l.user_id,launchdarkly:o,profile:l,subscription:c,token:t}),Zr("change:roles",Dk),Zr("change:status",F1),Zr("change:subdomain",Fk),Zr("unauthorized",ol),Zr("session:closed",ol),t}catch{ol()}};var fue;const{callbackComponent:pue,callbackPath:gue,getToken:Ci,initAuth:vue,login:Cue,logout:bue,onSessionExpired:xue,refreshSession:yue,request:bi}=Jo;var H1,$1;const _1=`${Ne("RBC_URI")}/api/partner_content`,Hk=null,$k=ns()(`${_1}/`),H0={transformRequest:[(e,t)=>(t.Authorization=`Bearer ${Ci()}`,e)],headers:{"Content-Type":"application/json"}},Lue=()=>$1({...H0,url:Hk}).toPromise().then(H1(["data","types"])),kue=e=>$1({...H0,url:$k(e)}).toPromise().then(H1(["data","content"])),_k=e=>bi({method:"POST",url:_1,data:JSON.stringify({ids:e}),...H0}).map(Vs()(["data","content"]));var Vk=v(17193),Jr=v.n(Vk);const V1=Ne("SERVICE_ENV")==="prod",rl=V1?"com":"zone",zk=Mt()(JSON.stringify,Jr()(new RegExp(`https://images.riseusercontent.${rl}/`,"g"),`${Ne("IMAGES_URI")}/`),Jr()(new RegExp(`https://riseusercontent.${rl}/`,"g"),`${Ne("CDN_USER_CONTENT_URI")}/`),Jr()(new RegExp(`https://video.rise.${rl}/`,"g"),`https://video.riseusercontent.${rl}/`),Co()(Be()(!V1),Jr()(new RegExp("https://video.rise.com/","g"),"https://video.riseusercontent.zone/")),JSON.parse);var Uk=v(47258),cn=v.n(Uk),Gk=v(5136),zt=v.n(Gk),Wk=v(15489),al=v.n(Wk),Kk=v(55066),z1=v.n(Kk);const Qk=bo(),$0=Ss(),_0=ts(),V0=z1(),U1=Yr(),xi=Xe(),Yk=Hs(),z0=St(),il=e=>e!=null&&typeof e=="object",Zk=e=>t=>Et()(t)?t:e(t),yi=e=>!!e,G1={a:["activeIndex",Ee()],vp:["audioVideoPlayhead",Number],c:["isComplete",yi],n:["correctlyAnswered",Ee()],p:["percentComplete",Ee()],r:["retryAttempts",Ee()],s:["score",Ee()],t:["currentTime",Ee()],v:["percentViewed",Ee()],rr:["reportResults",Ee()],pq:["passed",Ee()],ps:["passingScore",Ee()],qd:["questionsDrawn",Ee()],ql:["questionList",Zk(St()(St()(Ee())))],qt:["timeRemaining",Number]},Xk=e=>(t,n)=>{const[o,r]=G1[n];return cn()(o,r(t),e)},W1=e=>(t,n)=>{const[o,r]=nI[n],a=n==="i"?U0(t)(xi("items",e)):r(t);return{[o]:a}},qk=e=>t=>{const n=e?.[String(t.index)];if(Et()(n))return t;const o=$0(W1(t),il(n)?n:{}),r=V0(_0(o).filter(a=>a!=null&&typeof a=="object"));return U1(t,r)},U0=e=>t=>z0(qk(il(e)?e:{}),il(t)?t:{}),Jk=e=>{const t=$0(W1(null),il(e)?e:{});return V0(_0(t).filter(n=>n!=null&&typeof n=="object"))},eI=e=>t=>{const n=xi("i",e),o=xi("items",t),r=Qk(al()(G1),e),a=$0(Xk(t),r);let i=V0(_0(a).filter(h=>h!=null&&typeof h=="object"));const c=e.ql,l=n!=null&&e.qd===!0&&Array.isArray(c)&&c.length>0&&c.every(h=>Array.isArray(h));if(!(n!=null&&Object.keys(n).length===0)&&!l&&(i=cn()("items",U0(n??{})(o),i)),i=U1(t,i),l){const h=z0(Jk,n??{});return cn()("originalItemProgress",h,i)}return i},tI=(e,t)=>{const n=xi("lessons",t),o=a=>{const i=xi(String(a.index),n);return Et()(i)?a:eI(i??{})(a)};if(zt()(n))return e;const r=Yk({lessons:a=>z0(o,a)},e);return cn()("percentComplete",Rn()(0,"p",t),r)},nI={vp:["audioVideoPlayhead",Number],n:["correctlyAnswered",Ee()],c:["isComplete",yi],k:["isCorrect",yi],is:["isSubmitted",yi],v:["isViewed",yi],i:["items",U0],pv:["percentViewed",Ee()],m:["matches",Ee()],sr:["response",Ee()],r:["retryAttemptCount",Number],s:["selectedIndex",Ee()],x:["selectedIndices",Ee()],sa:["shuffledAnswerIndices",Ee()],t:["text",Ee()]};var sI=v(87396),yo=v.n(sI),oI=v(56890),K1=v.n(oI);const Q1=bo(),rI=K1(),Y1=Ss(),G0=ts(),W0=z1(),K0=Xe(),aI=St(),iI=e=>e!=null&&typeof e=="object",Z1=e=>!!yo()(Et(),zt())(e),cI=e=>t=>
151Et()(t)?t:e(t),X1={activeIndex:["a",Ee()],audioVideoPlayhead:["vp",Number],correctlyAnswered:["n",Ee()],currentTime:["t",Ee()],isComplete:["c",Number],passingScore:["ps",Ee()],percentComplete:["p",Ee()],percentViewed:["v",Ee()],retryAttempts:["r",Ee()],score:["s",Ee()],questionsDrawn:["qd",Ee()],questionList:["ql",cI(St()(St()(Ee())))],reportResults:["rr",Ee()],passed:["pq",Ee()],timeRemaining:["qt",Number]},lI=(e,t)=>{const[n,o]=ev[t];return{[n]:o(e)}},q1=e=>{const t=Q1(al()(ev),e),n=rI(zt(),t),o=W0(G0(Y1(lI,n)).filter(r=>r!=null&&typeof r=="object"));return zt()(o)?o:qr()(String(K0("index",e)),o)},J1=e=>{const t=aI(q1,iI(e)?e:{});return W0(G0(t).filter(n=>n!=null&&typeof n=="object"))},dI=e=>{const t={};for(const[n,o]of Object.entries(e))o==null||typeof o!="object"||Object.assign(t,q1({...o,index:n}));return t},uI=(e,t)=>{const[n,o]=X1[t];return{[n]:o(e)}};function hI(e){const t=K0("items",e),n=K0("index",e),o=e.originalItemProgress,r=o!=null&&Object.keys(o).length>0?dI(o):Z1(t)?t:J1(t??{}),a=W0(G0(Y1(uI,Q1(al()(X1),e))).filter(c=>c!=null&&typeof c=="object")),i=Z1(r)?a:cn()("i",r,a);return qr()(String(n),i)}const mI=e=>qr()("p",Rn()(0,"percentComplete",e)),ev={audioVideoPlayhead:["vp",Number],correctlyAnswered:["n",Ee()],isComplete:["c",Number],isCorrect:["k",Number],isSubmitted:["is",Ee()],isViewed:["v",Number],items:["i",J1],matches:["m",Ee()],percentViewed:["pv",Ee()],retryAttemptCount:["r",Number],selectedIndex:["s",Ee()],selectedIndices:["x",St()(Number)],shuffledAnswerIndices:["sa",St()(Number)],text:["t",Ee()],response:["sr",Ee()]},fI=e=>`${Ne("CDN_USER_CONTENT_URI")}/${e}`,pI=()=>!!window.shareId,tv=()=>!!window.contentId,nv=()=>!!window.snapshotId,gI=()=>!!window.shareId&&!!window.hasPassword,vI=tv()?zk:e=>e,CI={fetch:()=>Q0.isExport?.()||window.courseData||window.course?nL(f1,{}):y0({method:"GET",url:window.shareId?`${Ne("RISE_RUNTIME_URI")}/boot/share/${window.shareId}`:tv()?`${Ne("RISE_RUNTIME_URI")}/boot/businessContent/${window.contentId}`:nv()?`${Ne("RISE_RUNTIME_URI")}/boot/snapshot/${window.snapshotId}`:`${Ne("RISE_RUNTIME_URI")}/boot/${window.courseId}`,json:!0,withCredentials:!0,timeout:3e4}).then(J9).then(t=>typeof t=="object"?t:f1(t)).then(vI),fetchPartnerContent:e=>Q0.isExport?.()||window.partnerContent?window.partnerContent.content:_k(e).toPromise(),getEnv:Ne,isPasswordProtected:gI,isShare:pI,isSnapshotPreview:nv,resolvePath:fI,verifySharePassword:e=>y0({method:"POST",url:`${Ne("RISE_RUNTIME_URI")}/password`,data:{shareId:window.shareId,password:e},json:!0}).then(t=>t.body)},bI=(e,{id:t,type:n,...o})=>n==="quiz"?YT(e,{id:t,...o}):u1(e,t),xI=(e,t)=>e+((t||{}).c||0),yI=(e,t)=>(n,{id:o,type:r,...a})=>t.lessons[o]?{...n,...e(bI(t,{id:o,type:r,...a}).lessons[o])}:n,SI=(e,t,n)=>{const o=t.reduce(yI(e,n),{}),r=Object.keys(n.lessons||{}).length,a=Object.values(o).reduce(xI,0),i=Math.round(a/r*100);return{lessons:o,p:i}};window.Rise=Object.assign(window.Rise||{},{completeLessons:SI,decodeCourseProgress:tI,encodeCourseProgress:mI,encodeLessonProgress:hI});const Q0={...CI,...window.Runtime??{}},be=Q0,TI=e=>be.getMasteryScore!=null?be.getMasteryScore(e):e.passingScore,LI=e=>{if(be.onCreateHistory!=null)return be.onCreateHistory(e)},sv=(e={},t)=>be.fetch!=null?Promise.resolve(t==null?be.fetch():be.fetch(t)):Promise.resolve(e),kI=(e=[])=>{if(be.fetchPartnerContent!=null)return be.fetchPartnerContent(e)},II=e=>{if(be.bookmark!=null)return be.bookmark(e)},ov=e=>be.getProgress!=null?be.getProgress(e):e,EI=e=>be.setLessonComplete!=null?be.setLessonComplete(e):e,NI=e=>be.setLessonProgress!=null?be.setLessonProgress(e):e,jI=(e,t)=>be.setCourseProgress!=null?be.setCourseProgress(e,t):e,wI=e=>{if(be.finish!=null)return be.finish(e)},AI=()=>window.viewType!=="preview"&&be.finishQuiz!=null,rv=(e,t,n,o)=>{be.finishQuiz!=null&&be.finishQuiz(e,t,n,o)},RI=(e,t,n,o)=>{be.finishStoryline!=null&&be.finishStoryline(e,t,n,o)},av=()=>be.isComplete!=null?be.isComplete():null,PI=()=>be.isExport!=null?be.isExport():!1;function iv(){if(be.isExport!=null){const e=window.partnerContent?.content;return be.isExport()&&!!e}return!1}const Y0=()=>be.isShare!=null?be.isShare():!1,MI=()=>be.isSnapshotPreview!=null?be.isSnapshotPreview():!1,cv=()=>be.isPasswordProtected!=null?be.isPasswordProtected():!1,lv=e=>{const t=e||"";return be.resolvePath!=null?t.startsWith("http")||t.startsWith("data:")||t.startsWith("//")?t:be.resolvePath(t):t.startsWith("data:")||t.startsWith("http")||t.startsWith("//")?t:`/${t}`},OI=e=>be.verifySharePassword!=null?be.verifySharePassword(e):Promise.resolve({isValid:!0}),dv=e=>{if(be.reportAnswer!=null){const{id:t,isCorrect:n,isUnfinished:o=!1,item:r,itemProgress:a,duration:i,retryAttempts:c,title:l}=e,{id:d,title:h,type:m}=r;return be.reportAnswer({id:t,type:m,isCorrect:n,itemId:d,questionTitle:An(h),quizTitle:An(l),retryAttempts:c,answers:y9(r),correctResponse:S9(r),response:T9({isUnfinished:o,item:r,itemProgress:a}),isUnfinished:o,latency:x9(i)})}return!1},uv=e=>{if(be.startLesson!=null)return be.startLesson(e)},BI=e=>{be.startQuiz!=null&&be.startQuiz(e)},cl=e=>{if(be.endLesson!=null)return be.endLesson(e)},DI=()=>
151{if(be.getLocale!=null)return be.getLocale()},FI=e=>{if(be.setLocale!=null)return be.setLocale(e)},{browser:hv,os:mv}=new sr.UAParser(window.navigator.userAgent).getResult(),HI=e=>{if(be.sendTelemetry!=null)return be.sendTelemetry({...e,browser:{name:hv.name??"",version:hv.version??""},os:{name:mv.name??"",version:mv.version??""}})};var fv=v(99953),$I=v(94789),_I=v(96719),VI=v(51133),zI=v(79968),UI=v(56680),Z0=v(19268),Si=v(29160),GI=v(27765);fv.A.register($I.A),fv.A.register(_I.A);function So(...e){try{return(0,VI.Ay)(...e)}catch{return null}}const ss=(e,t)=>{const n=So(t);return n==null?null:(0,Si.A)((0,Z0.jh)(n,So("#ffffff"),e),{format:"hex",collapse:!1})},X0=e=>ss(.9,e);var WI=v(45524),ln=v.n(WI),KI=v(17618),QI=v.n(KI),YI=v(3165),q0=v.n(YI),Xt=v(13209);const ZI=De()(ur()(".svg"),e=>e??"",Rn()("","originalUrl")),XI=es()(ZI,Be()({width:"500rem"}),Be()({})),To=e=>{if(e){const t=e.trim();if(t!==""&&t!=='""')return e}return""},pv=e=>To(e)||void 0,gv=e=>e?"img":void 0,vv=e=>Mt()(Rn()("","originalUrl"),t=>t??"",q0()("."),tl(),ln()(e)),qI=vv("svg"),wue=vv("gif"),JI=/\.svg$/i,Cv=e=>JI.test(e),eE=null,Aue=e=>eE[e]||"left",tE=(e,t)=>{const n=QI()(e,t);return n.media.image.key===t.media.image.key&&Object.assign(n.media.image,{crushedKey:t.media.image.key,useCrushedKey:!0}),n},nE=({src:e,alpha:t})=>({alpha:t,media:{image:{key:sE(e),src:e}}}),sE=e=>typeof e!="string"?"":e.startsWith("http")?new URL(e).pathname.slice(1):e,oE=(({coverImageAlpha:e,coverImage:t})=>({alpha:e,src:t})),rE=(({lessonHeaderImageAlpha:e,lessonHeaderImage:t})=>({alpha:e,src:t})),bv=(e,t)=>(n,o)=>{const r=n[t];if(n?.theme){const a=o?o(r?.media):r?.media;if((0,Xt.uW)(a))return r;const i={...r,media:{...a}},c=nE(e(n.theme));return tE(i,c)}else return r},xv=bv(oE,"coverImage"),yv=bv(rE,"lessonHeaderImage"),Rue=async e=>{const t=new Image;return t.src=e,await t.decode(),t},se={RISE_CLASSIC:"classic",APEX:"organic",HORIZON:"imaginative"},aE="#ff631e",Pue=3,Mue=17,Oue=32,Bue=24,Due=50,Fue=.6,Hue="right",iE="rounded",cE=[{color:"#4baaf4",name:"Sky"},{color:"#285f9f",name:"Blueberry"},{color:"#7837a8",name:"Jelly"},{color:"#d84738",name:"Cherry"},{color:"#ff631e",name:"Tangerine"},{color:"#25bb64",name:"Basil"}],$ue="#ffffff",_ue=p0()("color",cE),Vue="#000",zue="#fff",Uue="Rise",re=dt({ACCENT:null,BLACK:null,COLOR:null,DARK:null,GRAY:null,IMAGE:null,LIGHT:null,TINT:null}),Ti=dt({LARGE:null,MEDIUM:null,SMALL:null}),Li=dt({STEPPED:null,CONTINOUS:null}),J0=dt({NUMBERS:null,DOTS:null,NONE:null}),hr=dt({COMPACT:null,OVERLAY:null,SIDEBAR:null}),zs=dt({DARK:null,DARK_IMAGE:null,LIGHT:null,LIGHT_IMAGE:null}),mr=dt({DARK:null,DARK_ACCENT:null,DARK_IMAGE:null,LIGHT:null,LIGHT_ACCENT:null,LIGHT_IMAGE:null}),Lo={FREE:"free",RESTRICTED:"restricted"},fr=dt({ACCENT:null,DARK:null,GRAY:null,IMAGE:null,LIGHT:null,TINT:null}),et=dt({THEME_DEFAULT:null,CIRCULAR_FILL:null,INCOMPLETE_COMPLETE:null}),ki=dt({ACCENT:null,DARK:null,LIGHT:null,TINT:null}),Us=dt({FULL:null,FLOATING:null,FLOATING_FULL:null}),ue=dt({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}),Ii=dt({TOP_LEFT:null,TOP_RIGHT:null,BOTTOM_LEFT:null,BOTTOM_RIGHT:null}),lE={TOP_LEFT:"top-left",TOP_RIGHT:"top-right",BOTTOM_LEFT:"bottom-left",BOTTOM_RIGHT:"bottom-right"},Gue=!0,dE=Ii.BOTTOM_RIGHT,Wue=[{text:"Top left",type:Ii.TOP_LEFT},{text:"Top right",type:Ii.TOP_RIGHT},{text:"Bottom left",type:Ii.BOTTOM_LEFT},{text:"Bottom right",type:Ii.BOTTOM_RIGHT}],Kue={default:[{text:"Centered",type:ue.CENTERED},{text:"Centered overlay",type:ue.CENTERED_OVERLAY},{text:"Left",type:ue.LEFT},{text:"Left overlay",type:ue.LEFT_OVERLAY},{text:"Split left image",type:ue.SPLIT_LEFT_IMAGE},{text:"Split right image",type:ue.SPLIT_RIGHT_IMAGE},{text:"Two-Thirds left image",type:ue.TWO_THIRDS_LEFT_IMAGE},{text:"Two-Thirds right image",type:ue.TWO_THIRDS_RIGHT_IMAGE}],classic:[{text:"Centered",type:ue.CENTERED},{text:"Centered overlay",type:ue.CENTERED_OVERLAY},{text:"Left",type:ue.LEFT},{text:"Left overlay",type:ue.LEFT_OVERLAY},{text:"Split left image",type:ue.SPLIT_LEFT_IMAGE},{text:"Split right image",type:ue.SPLIT_RIGHT_IMAGE},{text:"Two-Thirds left image",type:ue.TWO_THIRDS_LEFT_IMAGE},{text:"Two-Thirds right image",type:ue.TWO_THIRDS_RIGHT_IMAGE}],organic:[{text:"Centered",type:ue.CENTERED},{text:"Centered overlay",type:ue.CENTERED_OVERLAY},{text:"Left",type:ue.LEFT},{text:"Left overlay",type:ue.LEFT_OVERLAY},{text:"Split left",type:ue.SPLIT_LEFT},{text:"Split right",type:ue.SPLIT_RIGHT},{text:"Split left image",type:ue.SPLIT_LEFT_IMAGE},{text:"Split right image",type:ue.SPLIT_RIGHT_IMAGE}],imaginative:[{text:"Centered",type:ue.CENTERED},{text:"Centered overlay",type:ue.CENTERED_OVERLAY},{text:"Centered image",type:ue.CENTERED_IMAGE},{text:"Centered accent tint",type:ue.CENTERED_ACCENT_TINT},{text:"Split left image",type:ue.SPLIT_LEFT_IMAGE},{text:"Split right image",type:ue.SPLIT_RIGHT_IMAGE},{text:"Two-thirds left image",type:ue.TWO_THIRDS_LEFT_IMAGE},{text:"Two-thirds right image",type:ue.TWO_THIRDS_RIGHT_IMAGE}]},Que=null,Yue=null,Zue=[{text:"Image",type:ue.IMAGE},{text:"Accent",type:ue.ACCENT},{text:"White",type:ue.WHITE}],ea={CLOSED:"closed",HIDDEN:"hidden",OPEN:"open"}
151,Le=dt({AUTO:null,BLACK:null,LIGHT:null,DARK:null}),uE=dt({ROUNDED:null,SQUARED:null}),hE=dt({ROUNDED:null,SQUARED:null}),mE=dt({FLOATING:null,FULL:null}),ut=dt({ACCENT:null,DARK:null,LIGHT:null}),Xue=[{value:Le.AUTO,label:"Auto"},{value:Le.DARK,label:"Dark"},{value:Le.LIGHT,label:"Light"}],Ye={accentContrast:Le.AUTO,allowSearch:!0,animateBlockEntrance:!0,blockBackgroundColor:null,blockBackgroundColorContrast:Le.AUTO,blockBackgroundType:re.LIGHT,blockContinueCompletionType:"",blockContinueCompleteHint:"Complete the content above before moving on.",blockContinueLabel:"Continue",blockCorners:uE.ROUNDED,blockPaddingEnd:3,blockPaddingStart:3,blockTextBackgroundColor:null,blockTextBackgroundColorContrast:Le.AUTO,blockTextBackgroundType:re.LIGHT,blockTextBodyFontSize:17,blockTextHeadingFontSize:32,blockTextPaddingEnd:3,blockTextPaddingStart:3,blockTextSubheadingFontSize:24,buttonInlineStyle:hE.ROUNDED,buttonNavigationStyle:mE.FULL,buttonScheme:ki.LIGHT,colorAccent:aE,compactShowLessonCount:!0,coverImageAlpha:50,coverPageType:ue.SPLIT_LEFT_IMAGE,customColorLessonHeaderContrast:Le.AUTO,enableVideoPlaybackSpeed:!0,lessonHeaderImageAlpha:.6,lessonHeaderImageColor:ut.DARK,lessonHeaderSize:Ti.MEDIUM,lessonHeaderStyle:re.LIGHT,markLessonsComplete:!1,navigation:!0,navigationRestricted:!1,navigationSectionsExpanded:!0,navigationStyle:zs.LIGHT,navigationType:hr.SIDEBAR,progressIndicatorStyle:et.THEME_DEFAULT,showAuthor:!0,showLessonCount:!0,showNavigationButtons:!0,showStartButton:!0,sidebarStartsOpen:!0,themeId:se.RISE_CLASSIC},que=null,fE=["bodyTypeface","coverImage","experiments","headingTypeface","lessonHeaderImage","media","theme","uiTypeface"],pE=e=>e.theme?.colorAccent||e.color||Ye.colorAccent,Sv=e=>e.theme?.navigationRestricted??Ye.navigationRestricted?Lo.RESTRICTED:Lo.FREE,Tv=e=>e.theme?.sidebarStartsOpen??Ye.sidebarStartsOpen?ea.OPEN:ea.CLOSED,gE=e=>e.theme?.showLessonCount??e.showLessonCount??Ye.showLessonCount,vE=({sidebarMode:e})=>e!==ea.HIDDEN,CE=({navigationMode:e})=>e===Lo.RESTRICTED,bE=({sidebarMode:e})=>e===ea.OPEN,xE=e=>e.coverImage?.media?.image?zs.LIGHT_IMAGE:zs.LIGHT,yE=e=>e.coverImage?.media?.image?ue.LEFT_OVERLAY:ue.LEFT,Gs=(e,t)=>t[e]??t.theme?.[e]??Ye[e],Lv=e=>{const t=Tv(e),n=Sv(e),o={allowSearch:Gs("allowSearch",e),animateBlockEntrance:Gs("animateBlockEntrance",e),bodyTypefaceId:e.bodyTypefaceId,colorAccent:(e.color||"").toLowerCase(),compactShowLessonCount:Gs("compactShowLessonCount",e),coverImageDefault:null,coverPageType:yE(e),enableVideoPlaybackSpeed:Gs("enableVideoPlaybackSpeed",e),headingTypefaceId:e.headingTypefaceId,markLessonsComplete:Gs("markComplete",e),navigation:vE({sidebarMode:t}),navigationSectionsExpanded:Gs("navigationSectionsExpanded",e),navigationRestricted:CE({navigationMode:n}),navigationStyle:xE(e),showAuthor:Gs("showAuthor",e),showLessonCount:Gs("showLessonCount",e),showNavigationButtons:Gs("showNavigationButtons",e),sidebarStartsOpen:bE({sidebarMode:t}),uiTypefaceId:e.uiTypefaceId},r={...Ye,...o};return{...e,theme:{...r,isLegacyCourse:!0}}},eh=e=>{const t=pE(e),n={allowSearch:e.theme?.allowSearch??Ye.allowSearch,animateBlockEntrance:e.theme?.animateBlockEntrance??Ye.animateBlockEntrance,buttonNavigationStyle:e.theme?.buttonNavigationStyle??Ye.buttonNavigationStyle,buttonScheme:e.theme?.buttonScheme??Ye.buttonScheme,color:t,colorAccentTint:t?X0(t):void 0,coverImage:xv(e),coverPageType:e.theme?.coverPageType??Ye.coverPageType,enableVideoPlaybackSpeed:e.theme?.enableVideoPlaybackSpeed??Ye.enableVideoPlaybackSpeed,lessonHeaderImage:yv(e),lessonHeaderSize:e.theme?.lessonHeaderSize??Ye.lessonHeaderSize,lessonHeaderStyle:e.theme?.lessonHeaderStyle??Ye.lessonHeaderStyle,markComplete:e.theme?.markLessonsComplete??Ye.markLessonsComplete,navigation:e.theme?.navigation??Ye.navigation,navigationSectionsExpanded:e.theme?.navigationSectionsExpanded??Ye.navigationSectionsExpanded,navigationMode:Sv(e),navigationRestricted:e.theme?.navigationRestricted??Ye.navigationRestricted,navigationStyle:e.theme?.navigationStyle??Ye.navigationStyle,navigationType:e.theme?.navigationType??Ye.navigationType,progressIndicatorStyle:e.theme?.progressIndicatorStyle??et.THEME_DEFAULT,themeId:e.theme?.themeId??Ye.themeId,showAuthor:e.theme?.showAuthor??Ye.showAuthor,showLessonCount:gE(e),showStartButton:e.theme?.showStartButton??Ye.showStartButton,sidebarMode:Tv(e),sidebarStartsOpen:e.theme?.sidebarStartsOpen??Ye.sidebarStartsOpen,showNavigationButtons:e.theme?.showNavigationButtons??Ye.showNavigationButtons};return{...e,...n}},SE=({course:e,updates:t})=>{const n=Object.fromEntries(Object.entries(t||{}).filter(([r])=>fE.includes(r))),o={...e,...n};return eh(o)},TE={padding:"medium",alignment:"left"},LE={embed:{aspectRatio:"16:9"},video:{},labeledgraphic:{hotspotStyle:"numbers"},process:{navigation:"stepped"},sorting:{feedback:"immediate"},timeline:{orientation:"vertical"},paragraph:{fontSize:"medium"}},os=(e,t=0)=>`item_${e}_${t}`,ll=e=>e!==null&&typeof e=="object"&&!Array.isArray(e),kE=e=>N1.some(t=>t===e),kv=e=>ll(e)&&(typeof e.id=="string"||typeof e.id=="number")&&kE(e.type),Ei=e=>Array.isArray(e)?e.filter(ll):[],Iv=(e,t)=>[{id:os(`${t}_placeholder`,0),placeholder:!0,type:e,title:`Add ${e} content`}],pr=e=>({...TE,...LE[e]??{}}),IE=e=>typeof e=="string"?e.replace(/<p><br><\/p>/g,""):e,Ev=e=>e.map(t=>{if(t&&typeof t=="object"&&!Array.isArray(t)){const n={};for(const[o,r]of Object.entries(t))n[o]=IE(r);return n}return t}),EE=e=>["Introduction","Summary"].map((t,n)=>({id:os(`${e}_process`,n),title:t,type:t.toLowerCase(),description:null,isHidden:!0})),NE=(e,t)=>[{id:os(`${t}_text`,0),paragraph:e}],jE=(e,t)=>[...EE(t),...e],wE=(e,t)=>[{id:os(`${t}_video`,0),caption:"",media:e}],AE=(e=[],t)=>({family:"multimedia",id:os(`${t}_embed`,0),items:e.length?e:Iv("embed",t),media:{},settings:pr("embed"),type:"multimedia",variant:"embed"}),RE=(e,t,n)=>({family:"interactive-fullscreen",id:os(`${n}_labeledgraphic`,0),items:e,media:t,settings:pr("labeledgraphic"),type:"interactive",variant:"labeledgraphic"}),PE=(e,t)=>({family:"interactive-fullscreen",id:os(`${t}_process`,0),items:Ev(e),media:{},settings:pr("process"),type:"interactive",variant:"process"}),ME=({items:e,piles:t},n)=>({family:"interactive-fullscreen",id:os(`${n}_sorting`,0),items:e,media:{},piles:t,settings:pr("sorting"),type:"interactive",variant:"sorting"}),OE=(e,t)=>({family:"text",id:os(`${t}_text`,0),items:Ev(e),settings:pr("paragraph"),type:"text",variant:"paragraph"}),BE=(e,t)=>({family:"interactive-fullscreen",id:os(`${t}_timeline`,0),items:e,media:{},settings:pr("timeline"),type:"interactive",variant:"timeline"}),DE=(e,t={},n)=>({family:"multimedia",id:os(`${n}_video`,0),items:ll(e)&&e.video?wE(e,n):Iv("video",n),media:{},settings:{...ll(t)?t:{},...pr("video")},type:"multimedia",variant:"video"}),FE=(e,t)=>{const n=Ei(e.items);return AE(n.map(({icon:o,...r})=>r),t)},HE=(e,t)=>RE(Ei(e.items).map(({hasMedia:n,...o})=>o),e.media,t),$E=(e,t)=>{const n=Ei(e.items).map(o=>({...o,isHidden:!1,type:"step"}));return PE(jE(n,t),t)},_E=(e,t)=>BE(Ei(e.items).map(({linePosition:n,...o})=>
151o),t),VE=(e,t)=>OE(NE(e,t),t),zE=(e,t)=>{const n=e.type;switch(n){case"embed":return FE(e,t);case"map":return HE(e,t);case"process":return $E(e,t);case"sorting":return ME({items:Ei(e.items),piles:e.piles},t);case"timeline":return _E(e,t);case"screencast":case"slidecast":case"video":return DE(e.media,e.settings,t);default:throw new Error(`Unknown legacy lesson type: ${n}`)}},UE=e=>kv(e),GE=e=>{if(!kv(e))return e;const t=String(e.id),n={description:"",icon:"Article",type:"blocks"},o=[zE(e,t)],r=typeof e.description=="string"?e.description.trim():"";return r&&o.unshift(VE(r,`${t}_desc`)),{...e,...n,items:o,media:{}}},Nv=e=>`rise/rise-com/${e}`,jv=Nv("FAVORITE_ADDED"),wv=Nv("FAVORITE_REMOVED"),WE=()=>(0,ve.action)(jv,void 0),KE=()=>(0,ve.action)(wv,void 0),Av=(e=>`rise/partnerContent/${e}`)("SET_ALL_PARTNER_CONTENT"),gr=(e=>`rise/status/${e}`)("SET_LOADED"),QE=(e,t)=>({...e,...t}),YE={connection:"connected",courseLoaded:!1,fatalError:!1,fontsLoaded:!1,notFound:!1,partnerContentLoaded:!1},ZE=(0,ve.handle)(YE,{[gr]:QE}),XE=(e=!1)=>(0,ve.action)(gr,{fontsLoaded:e}),qE=(e=!1)=>(0,ve.action)(gr,{courseLoaded:e}),JE=(e=!1)=>(0,ve.action)(gr,{coverLoaded:e}),e8=(e=!1)=>(0,ve.action)(gr,{notFound:e}),t8=(e=!1)=>(0,ve.action)(gr,{fatalError:e}),Rv=(e=!1)=>(0,ve.action)(gr,{partnerContentLoaded:e}),n8=(e=[],t)=>t?.partnerContentId?e.concat(t.partnerContentId):e,s8=(e,t)=>t?.items?.reduce(n8,e)??e,o8=(e,t)=>t?.items?.reduce(s8,e)??e,r8=({course:e,lessons:t})=>{const n=t?.reduce(o8,[])||[],o=e?.partnerContentId||null,r=o?[o]:[],a=new Set([...n,...r]);return Array.from(a)},a8=e=>typeof e=="string"&&e.length>0,t0e=`${Ne("CDN_URI")}/assets/rise/assets/themes/thumbnails/sample-avatar.jpeg`,n0e=dt({ACTIVE:null,PREVIEW:null}),s0e=({themeCoverImage:e,coverImageDefault:t})=>a8(t)?t:e,i8=e=>({...e,theme:{...e?.theme,hideLessonHeaders:e?.theme?.hideLessonHeaders??!1,showStartButton:e?.theme?.showStartButton??!0}}),bn={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"},vr={SUMMARY:"SUMMARY",REMAINING:"REMAINING",ELAPSED:"ELAPSED",ELAPSED_TOTAL:"ELAPSED_TOTAL",HIDE_TIMER:"HIDE_TIMER"},c8={CONTINUE:"continue",NONE:""},Me={ALL:"all",NONE:"none",INCORRECT:"incorrect"},o0e=10,r0e=80,a0e=500;var i0e;const l8=Cn()([[B0()([ln()(!0),ln()(Me.ALL)]),Be()(Me.ALL)],[B0()([ln()(!1),ln()(Me.NONE)]),Be()(Me.NONE)],[ln()(Me.INCORRECT),Be()(Me.INCORRECT)],[ir(),Be()(Me.ALL)]]),c0e="draw from question bank",l0e="fillin",d0e="matching",u0e="multiple choice",h0e="multiple response",m0e=null;var d8=v(92324),th=v.n(d8);const nh=(e,t)=>e!=null&&typeof e=="object"?Reflect.get(e,t):void 0,Ni=e=>nh(e,"family")==="knowledgeCheck"&&!!nh(nh(e,"settings"),"requireCorrectAnswer"),sh={LESSON:"lesson",QUIZ:"quiz",SECTION:"section"},Cr={KNOWLEDGE_CHECK:"KNOWLEDGE_CHECK",ORDER:"ORDER",QUIZ:"QUIZ"},xn=(e,t)=>`/lessons/${encodeURIComponent(e)}${t?`/${encodeURIComponent(t)}`:""}`,ji="progress-summary",Pv=xn(ji),oh="lesson:",dl="#/lessons/",rh="/lessons/",f0e=e=>`${dl}${e}`,p0e=e=>e.startsWith(oh)||e.startsWith(dl)||e.startsWith(rh),g0e=e=>e.startsWith(oh)?e.slice(oh.length):e.startsWith(dl)?e.slice(dl.length).split("/")[0]:e.startsWith(rh)?e.slice(rh.length).split("/")[0]:e,u8=e=>e.type===sh.SECTION,h8=e=>e.type===sh.QUIZ,m8=e=>e.settings?.passToContinue===!0,Mv=e=>e?.items?.find(t=>Ni(t)),ta=e=>e!=null&&(e.type!=="quiz"||e.settings?.asLesson!==!1),f8=e=>e!=null&&e.type==="blocks",p8=e=>{const t=th()(e);return t!=null&&Array.isArray(t.items)&&(t.items=t.items.reduce((n,o)=>(o!=null&&n.push(g8(o)),n),[])),t},g8=e=>{const t=th()(e);return t!=null&&Array.isArray(t.items)&&(t.items=t.items.filter(Boolean)),t};var v8=v(11620),C8=v.n(v8);const Ov="^1.8.0";class ah extends Error{}function b8(e){try{if(e==null)return;if(typeof e!="object"||!("version"in e)||typeof e.version!="string")throw new ah("Missing Runtime.version");if(!C8()(e.version,Ov))throw new ah(`Runtime.version ${e.version} does not satisfy ${Ov}`)}catch(t){console.warn(t)}}const br="rise/course/LOAD_COURSE",x8="rise/course/UPDATE_COMPLETED_AT",ul="rise/course/UPDATE_COURSE_PREVIEW",Bv="r
151ise/course/UPDATE_LESSON_PREVIEW",ih="rise/course/APPLY_CHANGESET";let ch;(async()=>{try{({applyReviewDataToManifest:ch}=await v.e("webpack_container_remote_mondrian_learn-react").then(v.t.bind(v,4246,23)))}catch{}})();const wi=Y4(),y8=e=>{if("settings"in e&&e.settings&&Vt(e.settings)&&"revealAnswers"in e.settings){const n=e.settings;return{...e,settings:{...e.settings,revealAnswers:l8(n.revealAnswers)}}}return e},S8=e=>f8(e)?p8(e):e,Dv=e=>S8(y8(e)),T8=e=>({...e,lessons:e.lessons?.map(Dv)||[]}),L8=e=>{const t=e.lessons?.filter(n=>n.type!=="section")||[];return{...e,lessonsOnly:t}},k8=e=>e.theme==null,I8=e=>eh(Lv(e)),E8=e=>k8(e)?I8(e):eh(e),N8=e=>i8(E8(e)),j8=(e,t)=>{let n=(0,tr.TJ)(["course"],t,e).result;const o=(0,tr.TJ)(["lessons"],t,n.lessons).result;return t.some(r=>r.path[0]==="mondrian")&&n.mondrian&&ch&&(n={...n,mondrian:ch(n.mondrian,t)}),{...n,lessons:o}},w8=e=>({...e,lessons:e.lessons?.map(GE)||[]}),A8=(e,{completedAt:t,course:n,favoritedAt:o,riseComCurrentUser:r,riseComCourseId:a,riseComEnrollmentType:i,riseComLearningPathId:c})=>{const l=T8(n),d=L8(l),h={...d,theme:d.theme??Lv(d).theme};return{...N8(h),completedAt:t,favoritedAt:o,riseComCourseId:a,riseComEnrollmentType:i,riseComCurrentUser:r,riseComLearningPathId:c}},R8=e=>({...e,favoritedAt:new Date}),P8=e=>({...e,favoritedAt:null}),M8=e=>({...e,completedAt:new Date().toISOString()}),O8={[jv]:R8,[wv]:P8,[br]:A8,[x8]:M8,[ul]:(e,{course:t})=>t,[Bv]:(e,{lessons:t})=>({...e,lessons:t.map(Dv)}),[ih]:j8},B8=(0,ve.handle)({},O8),Fv=e=>t=>{_8(t)?e(e8(!0)):t instanceof ah&&(e(t8(!0)),console.error(t))},D8=e=>t=>t([{type:Av,payload:e},Rv(!0)]),F8=nr().fromPromise(async(...e)=>await kI(...e)),H8=e=>e.length===0?Rv(!0):F8(e).map(D8),$8=e=>hl(e)===401||lh(e)&&hl(e.response)===401,_8=e=>hl(e)===404||lh(e)&&hl(e.response)===404,hl=e=>lh(e)?e.status??e.statusCode:void 0,lh=e=>e!=null&&typeof e=="object",V8=e=>t=>{const{course:n}=t,o=w8(n),r=r8({course:o,lessons:o.lessons});e([wi(br,{...t,course:o,_originalLessons:n.lessons}),qE(!0),H8(r)])},z8=e=>async t=>{let n;try{b8(window.Runtime),n=e?.password!=null?await sv(void 0,{password:e.password}):await sv()}catch(o){if(e?.onUnauthorized!=null&&$8(o)){e.onUnauthorized();return}e?.onError?.(),await Fv(t)(o);return}e?.onAuthorized?.();try{V8(t)(n),HI(n)}catch(o){await Fv(t)(o)}},U8=wi(br),G8=wi(ul),W8=wi(Bv),K8=wi(ih),Q8=(e,{labelSet:t})=>({...e,...t}),Y8=(0,ve.handle)({},{[br]:Q8}),Ws=e=>`rise/course/${e}`,Hv=Ws("BLOCKS_LESSON_COMPLETE"),$v=Ws("BLOCKS_LESSON_INCREMENT_RETRY_ATTEMPT"),_v=Ws("BLOCKS_LESSON_RESET"),Vv=Ws("BLOCKS_LESSON_RETRY_SORTING_ACTIVITY"),zv=Ws("BLOCKS_LESSON_SET_ITEMS_PROGRESS"),Uv=Ws("BLOCKS_LESSON_SET_MEDIA_PLAY_PROGRESS"),Gv=Ws("BLOCKS_LESSON_SET_SORTING_ITEM_RESULT"),Wv=Ws("BLOCKS_LESSON_SET_SURVEY_PARTIAL"),Kv=Ws("BLOCKS_LESSON_SET_SURVEY_SUBMITTED"),ml=(0,ve.action)(Hv),Z8=(0,ve.action)($v),X8=(0,ve.action)(_v),q8=(0,ve.action)(Vv),fl=(0,ve.action)(zv),J8=(0,ve.action)(Uv),eN=(0,ve.action)(Gv),tN=(0,ve.action)(Wv),nN=(0,ve.action)(Kv),Hn=e=>`rise/course/${e}`,Qv=Hn("QUIZ_LESSON_ADVANCE_STEP"),Yv=Hn("QUIZ_LESSON_APPLY_SKIP"),Zv=Hn("QUIZ_LESSON_CLEAR_ANSWER_SELECTION"),Xv=Hn("QUIZ_LESSON_INITIALIZE_DRAWN_QUESTIONS"),qv=Hn("QUIZ_LESSON_RESTART"),Jv=Hn("QUIZ_LESSON_SELECT_QUIZ_ANSWER"),eC=Hn("QUIZ_LESSON_SET_ANSWER_MATCHES"),tC=Hn("QUIZ_LESSON_SET_ANSWER_TEXT"),nC=Hn("QUIZ_LESSON_ADVANCE_TO_END"),sC=Hn("QUIZ_LESSON_SET_TIME_REMAINING"),oC=Hn("QUIZ_LESSON_SUBMIT_ANSWER"),rC=Hn("QUIZ_LESSON_TOGGLE_ANSWER_SELECTION"),dh=(0,ve.action)(Qv),sN=(0,ve.action)(nC),aC=(0,ve.action)(qv),oN=(0,ve.action)(Yv),iC=(0,ve.action)(Jv),cC=(0,ve.action)(tC),lC=(0,ve.action)(rC),rN=(0,ve.action)(sC),dC=(0,ve.action)(eC),uh=(0,ve.action)(oC),aN=(0,ve.action)(Zv),iN=(0,ve.action)(Xv),hh=e=>e&&typeof e=="object"&&e.type&&N1.includes(e.type),cN=(e,t)=>{const n=new Map;return e.forEach(o=>{if(UE(o)){const r=t.find(a=>String(a.id)===String(o.id));r&&r.type==="blocks"&&n.set(String(o.id),String(r.id))}}),n},lN=(e,t)=>{const n={id:String(e.id),index:e.index,type:"blocks",items:{}};return typeof e.isComplete=="boolean"&&(n.isComplete=e.isComplete),typeof e.percentComplete=="number"&&(n.percentComplete=e.percentComplete),t.type==="blocks"&&t.items&&t.items.forEac
151h((o,r)=>{if(o?.id!=null&&(n.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&&(n.items[o.id].items=a)}}),n},dN=(e,t)=>{const n=new Set(t.map(r=>String(r.id))),o=[];return Object.values(e.lessons).forEach(r=>{hh(r)&&(n.has(String(r.id))||o.push(r))}),o},uN=(e,t,n)=>{const o={totalLegacyLessons:0,successfulMigrations:0,failedMigrations:0},r={...e,lessons:{...e.lessons}},a=dN(e,n);o.totalLegacyLessons=a.length;const i=cN(t,n),c=[];return a.forEach(l=>{try{const d=i.get(String(l.id))||String(l.id),h=n.find(m=>String(m.id)===d);if(h&&h.type==="blocks"){const m=lN(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}},uC=e=>Object.values(e.lessons).some(hh),v0e=e=>{let t=0,n=0;const o=[];
151return Object.values(e.lessons).forEach(r=>{n++,hh(r)&&(t++,o.includes(r.type)||o.push(r.type))}),{legacyCount:t,totalCount:n,legacyTypes:o,hasLegacyProgress:t>0}},hN=(e,t,n)=>{if(!uC(e))return e;const o=uN(e,t,n);return o.orphanedLessonIds.length>0&&console.warn("Some legacy lessons could not be migrated:",o.orphanedLessonIds),o.migratedProgress},mh=e=>`rise/course/${e}`,hC=mh("BOOKMARK_LESSON"),mN=mh("LOAD_COURSE"),mC=mh("PREVIEW_COMPLETE_PRECEDING_LESSONS"),fN=(0,ve.action)(hC),pN=(0,ve.action)(mC),gN={lessons:{},percentComplete:0},vN=(0,ve.handle)(gN,{[Hv]:u1,[$v]:mT,[_v]:fT,[Vv]:pT,[zv]:gT,[Uv]:vT,[Gv]:CT,[Wv]:bT,[Kv]:xT,[Qv]:BT,[nC]:DT,[Yv]:ZT,[Zv]:FT,[Xv]:HT,[qv]:zT,[Jv]:UT,[eC]:GT,[tC]:VT,[sC]:WT,[oC]:KT,[rC]:QT,[hC]:bN,[mN]:CN,[mC]:xN});function CN(e,t){const n=t.course?.lessons??[],o=t._originalLessons??n,r=ov(kN(n));if(typeof r!="object"||r===null)return e;const a={...e,...r};return uC(e)&&o!==n?hN(a,o,n):a}function bN(e,t){return II(t),{...e,currentLesson:t}}function xN(e,{targetLessonId:t,lessons:n}){const o=e.lessons[t];if(!o)return e;let r=o.index;for(const i of n){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,yN(c)]));return{...e,lessons:a}}function yN(e){return Ts(e)?I0(e):on(e)?SN(e):e}function SN(e){const t=Object.fromEntries(Object.entries(e.items??{}).map(([o,r])=>[o,{...r,isComplete:!0,isCorrect:!0}])),n=Object.keys(t).length;return{...e,items:t,activeIndex:n+1,isComplete:!0,passed:!0,passingScore:e.passingScore??80,percentComplete:100,reportResults:!0,score:100}}const TN=({index:e,lessonId:t,settings:n,type:o})=>o==="quiz"?{id:t,index:e,type:o,items:{},passingScore:Number(n?.passingScore??80)}:{id:t,index:e,type:"blocks",items:{}};function LN(e){return e.type==="quiz"&&"settings"in e}function kN(e){return{lessons:e.reduce((n,o,r)=>LN(o)?fC({index:r,items:o.items,lessonId:o.id,lessonProgress:n,settings:o.settings,type:o.type}):o.type==="blocks"||o.type==="slide"?fC({index:r,items:o.items,lessonId:o.id,lessonProgress:n,type:"blocks"}):n,{})}}function fC(e){const{lessonId:t,index:n,items:o,lessonProgress:r={},settings:a,type:i}=e,c=TN({lessonId:t,index:n,settings:a,type:i});if(o.length===0)return{...r,[t]:c};const l=i==="quiz"?EN(o):IN(o);return{...r,[t]:{...c,items:l}}}function IN(e){return e.reduce((t,n,o)=>{const r=n.id,a=n.items??[],i=rT(a);return t[r]={id:r,index:o,items:i},t},{})}function EN(e){return e.reduce((t,n,o)=>(t[n.id]={id:n.id,index:o},t),{})}var NN=v(73481),na=v.n(NN),jN=v(27563),wN=v.n(jN),C0e=v(31212),pC,gC;const fh=5e3,AN=St()(h0()(ns())(":n3,n4,i4,n7,n9")),RN=De()(na()(","),al()),PN=(e,t)=>{const n=new FontFace(t.name,e,{family:t.name,style:t.style,weight:t.weight});return n.load().then(()=>document.fonts.add(n))},MN=(e,t)=>{const n=document.createElement("style");return n.innerText=`@font-face { font-family: '${t.name}'; src: ${e}; font-weight: ${t.weight}; font-style: ${t.style}; }`,document.head.appendChild(n),new(wN())(t.name,{style:t.style,weight:t.weight}).load()},ON=e=>{const t=`url(${r9(e)}) format('woff')`;return("fonts"in document?PN:MN)(t,e)},vC=(e,t)=>{const n=Promise.all(e.map(ON));let o;const r=new Promise(a=>{o=setTimeout(a,fh)});return Promise.race([n,r]).catch(a=>{console.error("Failed to load learn course fonts:",{fonts:e,error:a.message||a})}).finally(()=>{clearTimeout(o),t()})},x0e=({baseUri:e,typefaces:t,onLoad:n,onError:o})=>{const r=pC(t).join(", ");return gC.load({active:n,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?.(),n?.()},timeout:fh,custom:{families:AN(pC(t)),urls:[`${e}/course_fonts.css?typefaceIds=${RN(t)}`]}})},y0e=()=>gC.load({google:{families:["Noto Sans Myanmar:300,400,500,600,700"]},timeout:fh}),BN=(e,{fonts:t})=>[...e,...t],DN=(e,{fonts:t})=>t,FN=(0,ve.handle)([],{[br]:BN,[ul]:DN}),HN=e=>t=>{vC(e,()=>{t(XE(!0))})},$N={isPreview:window.viewType==="preview"},CC=((e=$N)=>e);v.dn(CC);const bC="rise/l10n/TOGGLE_LOCALE_SELECTOR",xC=(e,{l10n:t})=>t?{...e,...t}:e,_N=(e,t)=>(0,tr.TJ)(["l10n"],t,e).result,ph=(0,ve.action)(bC),VN=(e,t)=>e&&{...e,...!t&&{localeSelectorOptions:void 0},showLocaleSelector:t},zN=(0,ve.handle)(null,{[br]:xC,[ul]:xC,[ih]:_N,[bC]:VN});var UN=v(50333),gh=v.n(UN);const GN=gh()(2,e=>w0()((0,ve.error)(e),(0,ve.action)(e))),{RiseDotCom:Ks}=window,Ai=e=>Ks&&Ks[e],yC=e=>Promise.reject(new Error(`RiseDotCom.${e} is unavailable`)),WN=()=>{Ai("exit")&&Ks?.exit?.()},SC=(...e)=>{Ai("on")&&Ks?.on?.(...e)},TC=(...e)=>{Ai("off")&&Ks?.off?.(...e)},KN=(...e)=>{Ai("goToLearn")&&Ks?.goToLearn?.(...e)},QN=(...e)=>Ks?.downloadCertificate?.(...e)??yC("downloadCertificate"),YN=(...e)=>{if(Ai("downloadCertificateCancel"))return Ks?.downloadCertificateCancel?.(...e)},ZN=(...e)=>Ks?.fetchLpUpNext?.(...e)??yC("fetchLpUpNext"),LC="rise/learningPathUpNext/FETCH_LP_UP_NEXT",kC="rise/learningPathUpNext/FETCH_LP_UP_NEXT_PENDING",XN={isPending:!1,isSuccess:!1,learningPathComplete:!1,nextCourse:{}},qN=e=>!("id"in e),JN=(e,t)=>{const n=qN(t);return{...e,isPending:!1,isSuccess:!0,learningPathComplete:n,lpHas
151FailedQuiz:t.lpHasFailedQuiz,nextCourse:n?{}:t}},e7=e=>({...e,isPending:!0}),T0e=(0,ve.handle)(XN,{[LC]:(0,ve.onSuccess)(JN),[kC]:e7}),t7=e=>[(0,ve.action)(kC),GN(LC)(nr().fromPromise(ZN)(e))],n7=(e,t)=>{const n=e.content.findIndex(r=>r.id===t.id),o=[...e.content];return n===-1?o.push(t):o[n]=t,{...e,content:o}},s7=(e,t)=>t.reduce(n7,e),o7={[Av]:s7},r7=(0,ve.handle)({content:[]},o7),IC={BLOCKS:"blocks",QUIZ:"quiz",SECTION:"section"},pl=e=>e?.type===IC.QUIZ,gl=e=>e?.type===IC.QUIZ,vh="rise-quiz-deck-engine",a7=null;function L0e(e){const t={};for(const n of a7)e[n]===!0&&(t[n]=!0);return t}function k0e(e,t){const n={...e};for(const[o,r]of Object.entries(t))n[o]=e[o]||r;return n}function I0e(e){return{...e,"rise-lessons":!0}}const EC={},i7=(e,{course:t})=>t.features?.[vh]!==!0?{}:t.lessons.reduce((n,o)=>(pl(o)&&(n[o.id]={status:"unprepared"}),n),{}),c7=(0,ve.handle)(EC,{[br]:i7});function l7(e,t){return c7(e??EC,t)}const NC="rise/search/RESET_SEARCH",jC="rise/search/SET_SEARCH_ACTIVE",wC="rise/search/SET_SEARCH_ACTIVE_LESSONS",AC="rise/search/SET_SEARCH_TRANSLATIONS",RC="rise/search/SET_SEARCH_LESSONS",PC="rise/search/SET_SEARCH_TERM",MC={active:!1,activeLessons:[],translations:{},lessons:[],term:null},d7=(e,t)=>t?{...MC,active:e.active}:e,u7=(e,t)=>({...e,active:t}),h7=(e,t)=>({...e,activeLessons:t}),m7=(e,t)=>({...e,translations:t}),f7=(e,t)=>({...e,lessons:t}),p7=(e,t)=>({...e,term:t}),g7=(0,ve.handle)(MC,{[NC]:d7,[jC]:u7,[wC]:h7,[AC]:m7,[RC]:f7,[PC]:p7}),sa=e=>(0,ve.action)(e),OC=sa(NC),Ri=sa(jC),BC=sa(wC),DC=sa(AC),FC=sa(RC),xr=sa(PC),Ch=e=>`rise/sessionPreferences/${e}`,HC=Ch("LOAD_SESSION_PREFERENCES"),$C=Ch("SET_PREFERS_KEYBOARD_NAVIGATION"),v7=Ch("SET_STARTING_COURSE_LESSON_SELECTED"),C7={prefersKeyboardNavigation:!1,startedCourseWithLessonSelected:!1},b7=(e,t)=>({...e,prefersKeyboardNavigation:t}),x7=(e,t)=>({...e,startedCourseWithLessonSelected:t}),y7=(0,ve.handle)(C7,{[HC]:(e,t)=>({...e,...t}),[$C]:b7,[v7]:x7}),S7=()=>(0,ve.action)(HC,null),T7=(0,ve.action)($C),bh=ns()("rise/transcriptPanel/"),_C=bh("OPEN_TRANSCRIPT_PANEL"),VC=bh("CLOSE_TRANSCRIPT_PANEL"),zC=bh("UPDATE_TRANSCRIPT_PANEL"),L7={audioPlayerIdOpen:null,focusing:!1,refocusTarget:null,transcriptMedia:null},k7=(e,t)=>t.audioPlayerId?{...e,audioPlayerIdOpen:t.audioPlayerId,focusing:t.focusing??!1,refocusTarget:t.refocusTarget??null,transcriptMedia:t.transcriptMedia??null}:e,UC=()=>({audioPlayerIdOpen:null,focusing:!1,refocusTarget:null,transcriptMedia:null}),I7=(e,t)=>e.audioPlayerIdOpen?t.audioPlayerId?{...e,audioPlayerIdOpen:t.audioPlayerId,focusing:t.focusing??e.focusing,transcriptMedia:t.transcriptMedia??e.transcriptMedia}:UC():e,E7={[_C]:k7,[VC]:UC,[zC]:I7},N7=(0,ve.handle)(L7,E7),GC=(e=>`rise/ui/${e}`)("SET_SKIP_TO_NAV_BUTTON_UI"),j7={skipToNavButton:null},w7=(0,ve.handle)(j7,{[GC]:(e,t)=>({...e,skipToNavButton:t})}),xh=(0,ve.action)(GC);var N0e;const A7={},R7=(0,Gc.HY)({course:B8,courseLabels:Y8,courseProgress:vN,fonts:FN,global:CC,l10n:zN,partnerContent:r7,quizDecks:l7,search:g7,sessionPreferences:y7,status:ZE,transcriptPanel:N7,ui:w7,...A7}),{Provider:P7,dispatch:Pn,store:WC,useDispatch:ot,useSelector:me}=$4(R7),KC="_course_token",yh=new URLSearchParams(window.location.hash.substr(1)),QC=yh.get(KC);QC&&(yh.delete(KC),window.history.replaceState(null,null,`#${yh.toString()}`));const M7=e=>{const{data:{method:t,id:n,jsonrpc:o}}=e;if(o==="2.0"&&t==="getBearerToken"){const r=QC||lt();navigator.serviceWorker.ready.then(a=>{a.active.postMessage({id:n,jsonrpc:"2.0",method:t,result:{token:r}})})}};navigator.serviceWorker&&navigator.serviceWorker.addEventListener("message",M7);const YC=(0,u.createContext)({});function O7(e,{type:t,message:n}){switch(t){case"polite":return{...e,politeMessage1:e.alternatePolite?n:"",politeMessage2:e.alternatePolite?"":n,alternatePolite:!e.alternatePolite};case"assertive":return{...e,assertiveMessage1:e.alternateAssertive?n:"",assertiveMessage2:e.alternateAssertive?"":n,alternateAssertive:!e.alternateAssertive};default:return{politeMessage1:"",politeMessage2:"",alternatePolite:!1,assertiveMessage1:"",assertiveMessage2:"",alternateAssertive:!1}}}function vl({ariaLive:e,message:t}){return(0,s.jsx)("div",{"aria-atomic":"true","aria-live":e,"aria-relevant":"additions text",className:"visually-hidden-alw
151ays",role:"log",children:t})}function B7({children:e}){const[{politeMessage1:t,politeMessage2:n,assertiveMessage1:o,assertiveMessage2:r},a]=(0,u.useReducer)(O7,{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,s.jsxs)(YC.Provider,{value:i,children:[(0,s.jsx)(vl,{ariaLive:"polite",id:"polite-announcer1",message:t}),(0,s.jsx)(vl,{ariaLive:"polite",id:"polite-announcer2",message:n}),(0,s.jsx)(vl,{ariaLive:"assertive",id:"assertive-announcer1",message:o}),(0,s.jsx)(vl,{ariaLive:"assertive",id:"assertive-announcer2",message:r}),e]})}function Ls(){return(0,u.useContext)(YC)}var ze=v(32926),D7,F7,H7,$7,_7,V7;const z7=[E1,"guide",P0,"video",M0],ZC=e=>e!=null&&z7.includes(e),ks=e=>ZC(e?.type),U7=e=>ks(e)&&e?.theme?.blockNavigationType===Li.STEPPED,G7=e=>D7(e)&&!!e.attachedToNextBlock;function j0e(e){const t=[];let n=[];for(const o of e)n.push(o),G7(o.settings)||(t.push(n),n=[]);return n.length>0&&t.push(n),t}const w0e=(e,t)=>n=>ks(n)?e:t,oa=e=>(0,tr.Qe)({type:e?.type,experiments:e?.experiments}),A0e=e=>{const t=oa(e);switch(t){case"guide":case F7:case H7:case $7:case"video":return t;case _7:return"microlearning";case null:case V7:return"course"}},Cl=e=>oa(e)==="guide",ko=e=>oa(e)===P0,yr=e=>oa(e)==="video",Pi=e=>oa(e)===M0,W7=e=>{switch(oa(e)){case"guide":return"Guide";case P0:return"Presentation";case"video":return"Video Training";case M0:return"Scenario";case null:case E1:case rk:case ak:return"Microlearning"}},K7=null,R0e=({course:e,isCourseGenerationInProgress:t,isOnePage:n,lessonId:o})=>n&&!!o&&!t&&!ko(e)&&!Pi(e)&&!yr(e)&&!Cl(e),P0e=e=>!Cl(e)&&!ko(e)&&!yr(e)&&!Pi(e),M0e=e=>e?K7.includes(e):!1,Sh=({locales:e,course:t,locale:n})=>!!(e?.find(a=>a.locale===n)?.rightToLeft||t?.experiments?.rtl),XC=(0,u.createContext)({currentLocale:void 0,setCurrentLocale:()=>{}});function Q7({children:e,currentLocale:t,setCurrentLocale:n}){const o=(0,u.useMemo)(()=>({currentLocale:t,setCurrentLocale:n}),[t,n]);return(0,s.jsx)(XC.Provider,{value:o,children:e})}function tt(){return(0,u.useContext)(XC)}function Y7(e){const t=n=>{const o=tt();return(0,s.jsx)(e,{...n,...o})};return t.displayName=`withCurrentLocale(${e.displayName||e.name})`,t}const Mi=(e,t,n)=>(0,Xt.uW)(e)&&t?n?.[t]?.[e.l10nId]:void 0,bl=(e,t,n,o)=>{if(!(0,Xt.uW)(e))return e;if(!t||!n||!o)return;const r=Mi(e,t,o);if(r!==void 0)return r;const a=Mi(e,n,o);if(a!==void 0)return a;const i=qC(e,o);return i.length>0?i[0].value:void 0},Th=new WeakMap,Lh=(e,t)=>{if(e&&t in e)return e[t]},kh=(e,t,n,o)=>{if(!t||!n||!o||!e)return e;if(typeof e=="object"){const d=Th.get(e)?.get(o);if(d&&d.locale===t&&d.defaultLocale===n)return d.result}const r=o[t],a=o[n],i=Object.values(o).filter(d=>d!==r&&d!==a);function c(d){let h;if(h=Lh(r,d),h!==void 0||(h=Lh(a,d),h!==void 0))return h;for(const m of i)if(h=Lh(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,tr.pr)(l))d(c(h))}if(typeof e=="object"){let d=Th.get(e);d||(d=new WeakMap,Th.set(e,d)),d.set(o,{locale:t,defaultLocale:n,result:l})}return l},O0e=(e,t,n)=>kh(e,t,ra(n),Io(n)),B0e=(e,t,n)=>bl(e,t,ra(n),Io(n)),D0e=(e,t,n)=>Mi(e,t,Io(n));function F0e(e,t){return t?.find(n=>n.locale===e)}function Z7(e){return e?.l10n?.locales??[]}function ra(e){return e?.l10n?.defaultLocale}function X7(e,t){const n=ra(t);return!!(e&&n&&e!==n)}const q7=Object.freeze({});function Io(e){return e?.l10n?.translations??q7}function qC(e,t){return(0,Xt.uW)(e)?Object.keys(t).flatMap(n=>{const o=Mi(e,n,t);return o?{locale:n,value:o}:[]}):[]}const H0e=(e,t)=>qC(e,Io(t)),Ot=e=>(0,Xt.uW)(e)?e.l10nId:void 0;function J7(e){return e?.l10n?.localeSelectorOptions}function Ih(e){return e?.l10n?.languageCodeMetadata}function ej(e){return e?.l10n?.showLocaleSelector}function Eh(e,t="#ffffff"){if(e==null||e.trim()==="")return null;const n=So(e);if(n==null)return null;const o=n.alpha??1,r=So(t),a=o<1&&r!=null?(0,Z0.jh)(r,{...n,alpha:1},o,{space:"srgb"}):n;return(0,GI.A)(a,"srgb")}function tj(e,t){const n=Eh(t);if(n==null)return 1;const o=Eh(e,(0,Si.A)(n));return o==null?1:(0,zI.A)(o,n,"WCAG21")}const $n=e=>e==null?Le.DARK:tj("#fff",e)>=4.5?Le.LIGHT:Le.DARK,Nh=(0,u.createContext)(null);Nh.displayName="CourseContext";const jh=(0,u.createContext)(!1);jh.displayName="PresentationContext";function nj({children:e,course:t,courseProgress:n,labels:o,labelsLocale:r,lessons:a,partnerContent:i,search:c}){const l=(0,u.useMemo)(()=>({course:t,courseProgress:n,labels:o,labelsLocale:r,lessons:a,partnerContent:i,search:c}),[t,n,o,r,a,i,c]);
151return(0,s.jsx)(Nh.Provider,{value:l,children:(0,s.jsx)(jh.Provider,{value:ko(t),children:e})})}function aa(){return(0,u.useContext)(Nh)}function rs(){return(0,u.useContext)(jh)}function $e(){return aa()?.course}function JC(){return we($e()?.title)}function Nt(){const{labels:e}=aa()??{};return e}function wh(){return aa().search}function e2(e){const o=$e()?.theme?.accentContrast;return typeof o!="string"?Le.LIGHT:o===Le.AUTO?$n(e):o}function Oi(){const e=$e();return e?.theme?.colorAccent??e?.color}function Ah(){const{currentLocale:e}=tt(),t=xl(),n=$e();return n?Sh({course:n,locales:t,locale:e}):!1}function $0e(){const{lessons:e}=aa();return e}const ia=(0,u.createContext)({l10n:null});ia.displayName="TranslationContext";const Rh=(0,u.createContext)({l10n:null});Rh.displayName="LocalesContext";function rt(){const{currentLocale:e}=tt(),t=Mn(),n=yl();return(0,u.useCallback)(o=>bl(o,e,t,n),[e,t,n])}function t2(){const{currentLocale:e}=tt(),t=Mn(),n=yl();return(0,u.useCallback)(o=>kh(o,e,t,n),[e,t,n])}function we(e,t){const{currentLocale:n}=tt(),o=Mn();let r=yl();const a=oj();return a&&Object.keys(a).length&&n&&r&&(r={...r,[n]:a}),bl(e,t??n,o,r)}function sj(e){const{currentLocale:t}=tt(),n=Mn(),o=yl();return(0,u.useMemo)(()=>kh(e,t,n,o),[t,n,e,o])}function ca(){return(0,u.use)(Rh)}function xl(){const e=ca();return Z7(e)}function Mn(){const e=ca();return ra(e)}function yl(){const e=(0,u.use)(ia);return Io(e)}function oj(){return aa()?.search?.translations}function rj(){const e=(0,u.use)(ia);return ej(e)}function aj(){const e=(0,u.use)(ia);return J7(e)}const ij=()=>(0,ze.Mz)(t=>t,(t,n)=>n,(t,n,o)=>ra(o),(t,n,o)=>Io(o),bl);function ht(e){const{currentLocale:t}=tt(),n=(0,u.useMemo)(()=>ij(),[]);return me(o=>n(e,t,o))}const cj=(0,ze.Mz)(e=>e,(e,t)=>Io(t),(e,t)=>t?.[e]);function n2(){const{currentLocale:e}=tt();return me(t=>cj(e,t))}const lj=(0,ze.Mz)(e=>e.course?.title,ra,Io,(e,t,n)=>{if(e)return Mi(e,t,n)});function dj(){return me(lj)}function Sl(){return me(e=>e.l10n)}var uj=v(49860);function s2(e){return e?.search}function Eo(){return me(s2)}function hj(e){return s2(e)?.activeLessons}const mj=(0,ze.Mz)(hj,e=>e?e.reduce((t,n)=>(n?.id&&(t[n.id]=n),t),{}):{});function fj(){return(0,ze.Mz)(e=>e,(e,t)=>mj(t),(e,t)=>t?.[e])}function pj(e){const t=uj.useMemo(()=>fj(),[]);return me(n=>t(e,n))}function qt(e){return e.course}function ie(){return me(qt)}function gj(e){return qt(e)?.navigationMode}function Ph(e){return qt(e)?.trackingQuizId}function Bi(){const e=ie();return ht(e?.title)}function vj(e){return qt(e)?.type}function Cj(){return me(e=>vj(e))}function o2(e){const t=qt(e);return ks(t)}function bj(){return me(o2)}function xj(e){const t=qt(e);return yr(t)}function yj(){return me(xj)}const Sj=e=>e.filter(t=>t.type!=="section");function Sr(){const e=ie(),t=Eo();return(0,u.useMemo)(()=>t?.active&&t?.lessons?.length>0?{...e,lessons:t.lessons,lessonsOnly:Sj(t.lessons)}:e,[e,t?.active,t?.lessons])}const Tj=(0,ze.Mz)(qt,e=>(e?.lessons??[]).filter(pl).some(t=>t.settings?.skipLessonsIfPassed&&t.settings?.skipToLessonId));function Mh(e){const t=gj(e);return Tj(e)?Lo.RESTRICTED:t??Lo.FREE}function Tl(){return me(Mh)}function Lj(e){return qt(e)?.theme?.buttonNavigationStyle??Ye.buttonNavigationStyle}function kj(){return me(Lj)}function Oh(){const e=ie();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 r2(){return ie()?.theme?.coverImageColor??ut.DARK}function a2(){return ie()?.lessonsOnly?.[0]}function Ij(){const e=ie(),{selectedAuthorId:t}=e?.lessons?.[0]??{};return t==="none"||!t?null:e?.authors?.find(n=>n.id===t)??null}function as(){const{currentLocale:e}=tt(),t=xl(),n=ie();return n?Sh({course:n,locales:t,locale:e}):!1}function i2(){const t=ie()?.lessons;return(0,u.useMemo)(()=>Array.isArray(t)?t.filter(({type:n})=>n!=="section").length:0,[t])}class Ej 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:n}=this.state,{FallbackComponent:o}=this.props;return t||n?(0,s.jsx)(o,{}):this.props.children}}const Nj=Ej;
151var jj=v(39117),wj=v.n(jj),Aj=v(85806),Tr=v.n(Aj),Rj=v(46280),Pj=v.n(Rj),Mj=v(76781),Ll=v.n(Mj),Oj=v(98105),is=v.n(Oj),Bj=v(18828),kl=v.n(Bj),Dj=v(71172),Fj=v.n(Dj),Hj=v(41131),$j=v.n(Hj);const c2=({course:e,courseProgress:t})=>!e||!t?{}:e.lessons.filter(r=>!!r.settings?.passToContinue).filter(r=>!t.lessons[String(r.id)]?.passed)[0]??{},_j=({courseProgress:e,lesson:t,restrictingQuiz:n})=>{if(!e)return{};const o=c=>e.lessons[String(c)]?.index,r=o(t.id),a="id"in n?n.id:void 0,i=a!=null?o(a):void 0;return r!==void 0&&i!==void 0&&r>i?n:{}};var Vj=v(99651),No=v.n(Vj),zj=v(55803),Uj=v.n(zj),Gj=v(1069),Bh=v.n(Gj);const jo=Ne("CDN_USER_CONTENT_URI"),l2=Ne("CDN_URI"),Di=fi()("useCrushedKey"),cs=Ne("IMAGES_URI"),Wj=Bh()(/-stock[-_]image.jpg/),Dh=Ne("RBC_IMAGES_URI"),Kj=Ne("ASSETS_URI"),Qj=Bh()(new RegExp(`^${jo}/review`)),d2=Ne("CDN_US_URI"),Fi=e=>{const{crushedKey:t,key:n,useCrushedKey:o,src:r}=e;return Di(e)?mt(o&&t?t:n):mt(r)},u2=(e,t)=>{if(!e||!e.key)return"";const{crushedKey:n,key:o,useCrushedKey:r}=e;return cs?Di(e)&&r&&n?`${cs}/${t}/${n}`:`${cs}/${t}/${o}`:Fi(e)},_0e=e=>`${jo}/${e}`,V0e=e=>!e||!e.key?"":`${Dh}/b:fff,f:jpg,s:cover,w:550,h:296/${e.key}`,z0e=e=>{if(!e||!e.key)return"";const{crushedKey:t,key:n,useCrushedKey:o}=e;return Di(e)&&o?t?`${cs}/f:jpg,b:fff,s:cover,w:340/${t}`:"":`${cs}/f:jpg,b:fff,s:cover,w:340/${n}`},Fh=e=>u2(e,"f:png,a:retain,s:cover,t:true,w:340"),U0e=e=>u2(e?{...e,src:e.src??e.key}:void 0,"a:retain,f:png,s:contain,w:64,h:64"),gt=e=>{if(!e||!e.key)return"";const{crushedKey:t,key:n,useCrushedKey:o,sourcedFrom:r}=e;if(!cs)return Fi(e);const a=r==="AI",i=r==="LIBRARY",c=r==="EXTRACTED";return Wj(n)||a||i?`${cs}/f:jpg,a:retain,b:fff,w:1680,q:90/${n}`:Di(e)?o&&t?`${jo}/${t}`:`${jo}/${n}`:c&&e.src||Qj(e.src)?e.src:`${cs}/f:jpg|png,a:retain,b:fff/${n}`},G0e=(e,t="src")=>{const{key:n,src:o,thumbnail:r,thumbnailKey:a}=e,i=jo?`${jo}/${n}`:Fi({key:n,src:o}),c=jo?`${jo}/${a}`:Fi({key:a,src:r});return t==="src"?i:c},W0e=e=>{if(!e||!e.key)return"";const{crushedKey:t,key:n,useCrushedKey:o}=e;return Di(e)&&o&&t?`${cs}/f:jpg,b:fff,h:100,s:cover,t:true,w:100/${t}`:`${cs}/f:jpg,b:fff,h:100,s:cover,t:true,w:100/${n}`},Hi=({height:e,imageKey:t,width:n})=>{if(Dh){const o=encodeURIComponent(t);return`${Dh}/b:fff,f:jpg,s:cover,w:${n},h:${e}/${o}`}return mt(`partnerContent/${t}`)},Yj=()=>{const e=Kj||cs,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}`:mt(`partnerContent/${t}`)},Zj=()=>{const e="NBIC_logo_blue.svg";return l2?`${l2}/assets/rise/assets/partner-content/${e}`:mt(`partnerContent/${e}`)},Xj=e=>{const{key:t,src:n}=e;return d2?`${d2}/${t}`:Fi({key:t,src:n})},qj=e=>e.startsWith("#")?e:`#${e}`,Jj=(e,t)=>{const n=So(qj(e));return n==null?null:(0,Si.A)({...n,alpha:t??n.alpha??1},{format:"rgba_number",alpha:!0})},Il=({alpha:e,color:t,url:n})=>{const o=Jj(t,e);return o==null?{backgroundImage:`url("${n}")`}:{backgroundImage:`linear-gradient(0deg,${o},${o}), url("${n}")`}};var Hh,$h;const Q0e=pi()(Je()("sidebarMode","hidden")),la=({alpha:e,color:t=void 0,hasOverlay:n=!0,media:o={}})=>{const{image:r={}}=o,{key:a,src:i}=r,c=a?gt(r):i,l=t===ut.LIGHT?"#fff":"#000";return c?n?Il({alpha:e/100,color:l,url:c}):{backgroundImage:`url("${c}")`}:null},wo=e=>[mr.DARK,mr.DARK_ACCENT,mr.DARK_IMAGE,fr.DARK,zs.DARK,zs.DARK_IMAGE].includes(e),ew=Mt()(Xe()("lessons"),No()),tw=Je()("navigationMode",Lo.RESTRICTED),nw=pi()(Je()("sidebarMode",ea.HIDDEN)),sw=Je()("navigationType",hr.SIDEBAR),h2=Je()("navigationType",hr.COMPACT),_h=es()(Uj()(Et(),"navigation"),nw,Je()("navigation",!0)),ow=({course:e,search:t,isMobile:n})=>ks(e)?!1:(sw(e)||h2(e)&&!!n)&&_h(e)||t.active,rw=({course:e,isMobile:t})=>h2(e)&&_h(e)&&!t,$i=e=>[mr.DARK_IMAGE,mr.LIGHT_IMAGE,fr.DARK_IMAGE,fr.IMAGE,zs.DARK_IMAGE,zs.LIGHT_IMAGE].includes(e),aw=e=>[zs.DARK,zs.LIGHT].includes(e),iw=(e,t)=>{if(e===se.RISE_CLASSIC||e===se.HORIZON)switch(t){case ue.SPLIT_LEFT_IMAGE:case ue.SPLIT_RIGHT_IMAGE:case ue.TWO_THIRDS_LEFT_IMAGE:case ue.TWO_THIRDS_RIGHT_IMAGE:return!0;default:return!1}else if(e===se.APEX)switch(t){case ue.SPLIT_LEFT_IMAGE:case ue.SPLIT_RIGHT_IMAGE:return!0;default:return!1}return!1},Y0e=(e,t)=>{switch(e){case Hh.RISE_CLASSIC:case Hh.APEX:case Hh.HORIZON:return t===$h.CENTERED_OVERLAY||t===$h.LEFT_OVERLAY||t===$h.IMAGE;default:return!1}},m2=e=>e==null?!0:typeof e=="string"||Array.isArray(e)?e.length===0:typeof e=="object"?Object.keys(e).length===0:!1,ls=e=>!m2(e),El=Xe(),Nl=Vs(),Vh=Lt(),f2=e=>po()(t=>ta({settings:{asLesson:El("asLesson",t.settings)??void 0},type:t.type??null}),El("lessonsOnly",e)??[]),cw=({course:e,courseProgress:t})=>Tr()(lw(t),e?.lessonsOnly??[]),lw=e=>t=>kl()(t.id==null?void 0:Nl(["lessons",t.id,"isComplete"],e)),dw=({lesson:e,currentLesson:t})=>e&&Je()("id",e.id,t),uw=({course:e,lesson:t})=>Je()("id",t.id,tl()(El("lessonsOnly",e)??[])),p2=e=>e!=null&&e.type!=="section",hw=({lesson:e,courseProgress:t})=>e?.id==null?!1:Vh(!1,["lessons",e.id,"isComplete"],t),g2=({course:e,courseProgress:t,lesson:n,restrictingQu
151iz:o={}})=>{const r=n?.id==null?{}:_j({courseProgress:t,lesson:{id:n.id},restrictingQuiz:o}),a=tw(e),i=a||ls(r),c=cw({course:e,courseProgress:t}),l=p2(n)&&kl()(hw({lesson:n,courseProgress:t}));return{isRestricted:i&&l&&kl()(dw({lesson:n,currentLesson:c})),restrictingQuiz:r,isRestrictedCourse:a,currentLesson:c}},mw=({labels:e,restrictions:t})=>{const{lessonRestricted:n,quizRequirePassingScore:o}=e,{isRestrictedCourse:r,restrictingQuiz:a,currentLesson:i}=t,c=i&&wj()("id",a,i),l=a!=null&&typeof a=="object"?El("title",a):void 0;return!r||r&&c?typeof l=="string"&&l?o.replace("quiz",`"${l}"`):o:n},v2=$j()((e,t)=>Pj()(Fj()(bo()(["id"],e||{})),t)),fw=({course:e,lesson:t})=>De()(Ll(),v2(t),f2)(e),C2=({course:e,lesson:t})=>{if(uw({course:e,lesson:t}))return;const n=e?.lessonsOnly??[];return n[Ll()(v2(t,n))]},pw=De()(is(),f2),gw=e=>typeof e=="object"&&Object.keys(e).length>0,vw=e=>e==null||e===!1,Cw=e=>vw(e?.isComplete),bw=e=>e.find(([,t])=>Cw(t)),xw=e=>{const t=Object.entries(e),[n]=bw(t)||[];return n},yw=(e={},t)=>gw(e)?xw(e):t==null?void 0:String(t),b2=(e,t,n)=>{if(!n)return{outOfAttempts:!1,quizPassed:!0};const o=Nl(["lessons",n],e),r=Vh(-1,["settings","retryCount"],t),a=Vh(0,["retryAttempts"],o),i=Nl(["passed"],o);return{outOfAttempts:Nl(["isComplete"],o)&&Number(r)>-1&&Number(a)===Number(r),quizPassed:i}};function zh(e){return e.courseProgress}function Sw(e){return e.courseProgress?.currentLesson??""}function Tw(e){return e.courseProgress?.percentComplete??0}const x2=(0,ze.Mz)(Ph,qt,(e,t)=>{const{lessons:n}=t;return Array.isArray(n)?n.find(({id:o,type:r})=>r==="quiz"&&o===e)??null:null}),Lw=(0,ze.Mz)(zh,x2,(e,t)=>t?b2(e,t,t.id):null);function y2(e){const t=zh(e);return iv()?t?.percentComplete===100:!!av()}function da(e){return e.courseProgress?.lessons}function ua(e,t){if(e!=null)return da(t)?.[e]}function Lr(){return me(zh)}function jl(){return me(Sw)}function ha(){return me(Tw)}function kw(){return me(x2)}function Uh(){const e=me(Lw);return{outOfAttempts:e?.outOfAttempts??!1,quizPassed:e?.quizPassed??!1}}function Iw(){return me(y2)}function Ao(e){return me(t=>ua(e,t))}function wl(e){const t=Ao(e);if(t?.type==="quiz")return t}const Ew=(0,ze.Mz)(da,e=>e?Object.values(e).some(t=>t.type==="quiz"&&t.activeIndex!==void 0&&!t.isComplete):!1);function Nw(){return me(Ew)}const S2=e=>e>9999?1:e,jw=({current:e,restart:t,restartValue:n})=>{const o=Number(n),r=S2(Number.isInteger(o)&&o>0?o:1),a=t?r:e+1;return S2(a)},ww=(e,t)=>{if(t.family==="divider"&&t.variant==="numbered divider"){const n=t.settings??{},o=jw({current:e.currentNumber,restart:n.restartNumbering,restartValue:n.restartNumberingValue});return{map:{...e.map,[t.id]:o},currentNumber:o}}return e},T2=e=>u8(e),Al=e=>h8(e),Aw=e=>m8(e),Rw=e=>!!Mv(e);function kr(){return(0,ze.Mz)(e=>e,(e,t)=>E2(t),(e,t)=>t[String(e)])}function Bt(e){const t=(0,u.useMemo)(()=>kr(),[]);return me(n=>t(e,n))}function ma(e){const t=Bt(e);return ht(t?.title)}function Pw(){const e=kr();return(0,ze.Mz)(e,t=>T2(t))}function L2(){const e=Rl();return(0,ze.Mz)(t=>t,(t,n)=>e(n),(t,n)=>Mh(n),(t,n)=>$w(n),(t,n)=>_w(n),(t,n)=>da(n),(t,n,o,r,a,i)=>{const c=i?.[t],l=i?.[n];if(t!==n&&!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:Cr.ORDER}:{type:Cr.KNOWLEDGE_CHECK}:{type:Cr.QUIZ,data:r.title}}return null})}function fa(e){const t=(0,u.useMemo)(()=>L2(),[]);return me(n=>t(e,n))}function Rl(){return(0,ze.Mz)(da,Ph,(e,t)=>yw(e,t))}function Mw(){const e=(0,u.useMemo)(()=>Rl(),[]);return me(t=>e(t))}function Ow(){const e=Rl();return(0,ze.Mz)(e,E2,(t,n)=>{if(!(!t||!n[t]))return n[String(t)]})}function Bw(){const e=kr();return(0,ze.Mz)(e,ua,(t,n)=>{const o=n?.percentComplete??0,r=n?.isComplete??!1,a=n?.passed??!1;return o===100&&(!r||Al(t)&&!a)})}function k2(e){const t=(0,u.useMemo)(()=>Bw(),[]);return me(n=>t(e,n))}function Dw(){const e=kr();return(0,ze.Mz)(e,ua,(t,n)=>{const o=n?.percentComplete??0,r=n?.isComplete??!1,a=n?.passed??!1;return o===100&&r&&(!Al(t)||a)})}function I2(e){const t=(0,u.useMemo)(()=>Dw(),[]);return me(n=>t(e,n))}const Gh=(0,ze.Mz)(qt,e=>e?.lessons??[]),E2=(0,ze.Mz)(Gh,e=>e.reduce((t,n)=>(n?.id&&(t[n.id]=n),t),{})),pa=(0,ze.Mz)(qt,e=>e?.lessonsOnly??[]),Fw=(0,ze.Mz)(pa,e=>e.reduce((t,n,o)=>(t[n.id]=o+1,t),{}));function N2(){return me(e=>Fw(e))}const Wh=(0,ze.Mz)(pa,e=>e.filter(t=>ta(t))),j2=(0,ze.Mz)(Wh,e=>e.length),Hw=(0,ze.Mz)(Gh,e=>e.reduce((t,n)=>{const o=t[t.length-1];return T2(n)||o==null?t.push([n.id]):o.push(n.id),t},[])),$w=(0,ze.Mz)(pa,da,(e,t)=>e.find(n=>Al(n)&&Aw(n)&&!t?.[n.id]?.isComplete)),_w=(0,ze.Mz)(pa,da,(e,t)=>e.find(n=>!Al(n)&&Rw(n)&&!t?.[n.id]?.isComplete));function Pl(e){const t=(0,u.useMemo)(Pw,[]);return me(n=>
151t(e[0],n))}function Kh(e){const t=(0,u.useMemo)(()=>kr(),[]),n=(0,u.useMemo)(()=>L2(),[]),o=Tl();return me(r=>{const a=qt(r),i=t(e,r),c=ua(e,r),d=n(e,r)?.type!=null;return o!==Lo.RESTRICTED&&a?.markComplete&&!d&&i?.type!==sh.QUIZ&&!0})}const Ml=(e,t)=>t.findIndex(n=>n.id===e);function w2(){return(0,ze.Mz)(e=>e,(e,t)=>pa(t),(e,t)=>{if(e===ji)return t[t.length-1];const o=Ml(e,t)-1;return t[o]})}function A2(){return(0,ze.Mz)(e=>e,(e,t)=>pa(t),(e,t)=>{const o=Ml(e,t)+1;return t[o]})}function R2(e){return(0,ze.Mz)((n,o)=>e(n,o),(n,o)=>Wh(o),(n,o)=>Ml(n?.id||"",o)+1)}function Vw(){return R2(A2())}function zw(){return R2(w2())}function Uw(e){const t=(0,u.useMemo)(()=>A2(),[]);return me(n=>t(String(e),n))}function Gw(e){const t=(0,u.useMemo)(()=>Vw(),[]);return me(n=>t(String(e),n))}function Ww(e){return me(t=>{if(!e)return 0;const n=Wh(t);return Ml(String(e),n)+1})}function Qh(){return me(j2)}function Ol(){return me(e=>Hw(e))}function Kw(){const e=Rl();return(0,ze.Mz)(y2,e,Ph,(t,n,o)=>{const r=!!n,a=o!=null;return t||!r&&!a})}function Qw(){const e=(0,u.useMemo)(()=>Kw(),[]);return me(t=>e(t))}function Yw(){const e=ie(),t=Lr();return(0,u.useMemo)(()=>{if(!e||!t||!e.lessonsOnly)return[];const n=c2({course:e,courseProgress:t});return e.lessonsOnly.filter(o=>{const{isRestricted:r}=g2({course:e,courseProgress:t,lesson:o,restrictingQuiz:n});return r}).map(o=>o.id)},[e,t])}const Zw=e=>e?.items?.reduce?.(ww,{map:{},currentNumber:0})?.map||{},Xw=e=>{const t=(0,u.useMemo)(()=>kr(),[]),n=me(o=>t(e,o));return(0,u.useMemo)(()=>Zw(n),[n])},qw=({blockId:e,lessonId:t})=>Xw(t)?.[e];function Jw(e){const n=ie()?.lessonsOnly??[],o=n.findIndex(a=>a.id===e);return(o>=0?n[o+1]:void 0)?.id??null}function Yh(e){const t=Bt(e),n=ie(),o=t?.settings,r=n?.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 eA(){return me(Gh)}function tA(e){const t=(0,u.useMemo)(()=>w2(),[]);return me(n=>t(e,n))}function nA(e){const t=(0,u.useMemo)(()=>zw(),[]);return me(n=>t(e,n))}function sA(){const e=(0,u.useMemo)(()=>Ow(),[]);return me(e)}function P2(){const e=sA();return ht(e?.title)}const Z0e="/:mode",Bl="/lessons/:lessonId",Dl="/lessons/:lessonId/:mode",oA=e=>e==="iframe"||e==="preview";function Qs(){const e=(0,Pe.RQ)(Bl),t=(0,Pe.RQ)(Dl);return(e??t)?.params.lessonId}function rA(e){return e.courseLabels}function aA(){return me(rA)}function iA(e,t){return t?.l10n?.localeLabelSets?.[e]?.labels||t?.courseLabels?.labels}function xe(){const{currentLocale:e}=tt();return me(t=>iA(e,t))}function cA({isCourseComplete:e,percentCourseComplete:t}){const n=xe()??{},{courseResume:o,courseStart:r,processStartAgain:a}=n;return{courseCTALabel:e?a:t>0?o:r}}function Zh(){const{pathname:e}=new URL(window.location.href);return e.split("/")[1]==="review"}function M2(){const e=window.location.hash.slice(1),t=new URLSearchParams(e.split("?")[1]??"");return Zh()&&!!t.get("locale")}const lA=(0,u.lazy)(()=>v.e("webpack_container_remote_learn_distribution_frontend_learn_ai-learner-popout").then(v.t.bind(v,68789,23))),dA=()=>{const{currentLocale:e}=tt(),t=sj(ie()),n=as(),o=Nw(),r=jl(),a=Bt(Qs()),i=xe(),c=window,l=c?.growth?.getSubscription?.()?.id||t?.tenantId||void 0,d=c?.growth?.getUser?.()?.id||(t?`learner_${t.author}`:void 0),h=Yw(),m=async()=>{try{await ui()}catch{}},f=t?.aiTutorConfig?.image?.media?.image,p=gt(f)||null,C=ht(t?.aiTutorConfig?.name)??null,[g,x]=(0,u.useState)(!1),b=`rise_ai_tutor_nudge_${d}`,y=(0,u.useCallback)(()=>{localStorage.setItem(b,"1")},[b]);(0,u.useEffect)(()=>{if(localStorage.getItem(b))return;let T=null;const k=setTimeout(()=>{const I=document.getElementById("page-wrap");if(!I)return;const E=()=>{if(localStorage.getItem(b)){I.removeEventListener("scroll",E);return}const{scrollTop:N,scrollHeight:M,clientHeight:A}=I,j=M-A,w=j>0?N/j:0;j<=0||w>=.75&&(localStorage.setItem(b,"1"),x(!0),I.removeEventListener("scroll",E))};I.addEventListener("scroll",E,{passive:!0}),T=()=>I.removeEventListener("scroll",E),E()},0);return()=>{clearTimeout(k),T?.()}},[d,b,r]);const L=o||a?.type==="quiz",S=L?i?.aiTutorDisabledWhileQuiz??"AI Tutor is disabled
151while a quiz is in progress.":void 0;return(0,s.jsx)(lA,{aiTutorImageUrl:p,aiTutorName:C,apiKey:t.aiLearnerCourseApiKey??null,course:t,currentLessonId:r||null,currentLocale:e,disabled:L,disabledReason:S,labels:i,onOpen:y,resetSession:m,resolveAssetUrl:lv,restrictedLessonIds:h,rtl:n,scrollTriggered:g,subscriptionId:l,userId:d})},uA=()=>{const e=ie();return!Zh()&&!!e?.settings?.aiTutorEnabled?(0,s.jsx)(Nj,{FallbackComponent:()=>null,children:(0,s.jsx)(u.Suspense,{fallback:null,children:(0,s.jsx)(dA,{})})}):null},O2=(0,u.createContext)(null);function hA({appType:e,children:t}){return(0,s.jsx)(O2.Provider,{value:e,children:t})}function mA(){const e=(0,u.useContext)(O2);if(e==null)throw new Error("useAppType must be used within an AppTypeProvider");return e}function Xh(){return mA()==="author"}const qh=Object.assign((0,u.createContext)(void 0),{displayName:"BlockContext"});function Fl({block:e,children:t}){const[n,o]=(0,u.useState)(e);return e!=null&&e!==n&&o(e),(0,s.jsx)(qh.Provider,{value:n,children:(0,s.jsx)(om,{...n?.settings,children:t})})}const X0e=qh.Consumer;function Dt(){return(0,u.useContext)(qh)}function Hl(e){return function(n){const o=Dt();return(0,s.jsx)(e,{...n,block:o})}}const fA={text:{backgroundType:"blockTextBackgroundType",backgroundColor:"blockTextBackgroundColor",backgroundColorContrast:"blockTextBackgroundColorContrast",paddingStart:"blockTextPaddingStart",paddingEnd:"blockTextPaddingEnd",bodyFontSize:"blockTextBodyFontSize",headingFontSize:"blockTextHeadingFontSize",subheadingFontSize:"blockTextSubheadingFontSize"},continue:{completionType:"blockContinueCompletionType",label:"blockContinueLabel",completeHint:"blockContinueCompleteHint"}},q0e=null;function pA(e,t){if(!e||!t)return null;const n=fA[e];if(!n)return null;const o=r=>r?t[r]:void 0;return{backgroundType:o(n.backgroundType),backgroundColor:o(n.backgroundColor),backgroundColorContrast:o(n.backgroundColorContrast),paddingStart:o(n.paddingStart),paddingEnd:o(n.paddingEnd),bodyFontSize:o(n.bodyFontSize),headingFontSize:o(n.headingFontSize),subheadingFontSize:o(n.subheadingFontSize),completionType:o(n.completionType),label:o(n.label),completeHint:o(n.completeHint)}}function Ro(){const e=Dt(),t=$e(),n=e?.family,o=t?.theme;return(0,u.useMemo)(()=>pA(n,o),[n,o])}var gA=v(83490),vA=v.n(gA);const Is=(e,t)=>{const n=So(t);return n==null?null:(0,Si.A)((0,Z0.jh)(n,So("#000000"),e),{format:"hex",collapse:!1})};function CA(e){if(e==null)return 0;const t=Eh(e);return t==null?0:(0,UI.J1)(t)}const vt=dt({NEAR_BLACK:null,DARK:null,MED:null,LIGHT:null}),ga=e=>{const t=CA(e);return t<=.01?vt.NEAR_BLACK:t<=.05?vt.DARK:t<=.35?vt.MED:vt.LIGHT},bA=e=>{switch(ga(e)){case vt.NEAR_BLACK:return ss(.1,e);case vt.DARK:return Is(.4,e);case vt.MED:return Is(.2,e);case vt.LIGHT:return ss(.3,e)}};var xA,yA,SA,Jh,B2,Po;const D2=2,J0e=(e,t,n)=>e??t??n,F2=(e,t,n,o)=>e??t??n??o,_n=dt({WHITE:null,TRANSPARENT:null}),TA={markerColorContrast:Le.AUTO,paddingBottom:3,paddingLinked:!0,paddingTop:3,snippetColorContrast:Le.AUTO},LA={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 kA(e,t){return LA[e]?.includes(t)??!1}const IA={360:{storyline:"#fafafa"},impact:{c:"#ececec",d:"#f5f5f5"},"interactive-fullscreen":{process:"#f5f5f5",sorting:"#f5f5f5",timeline:"#f5f5f5"},quote:{d:"#f5f5f5"}};function em(e,t){const n=IA[e]?.[t];return n==null?{}:{backgroundColor:n,backgroundType:re.COLOR}}const EA=null;function ehe(e,t){return EA[e]?.includes(t)??!1?.1:.5}function NA(e){switch(e.backgroundType){case re.COLOR:return e.backgroundColor;case re.ACCENT:return e.courseColor;case re.TINT:return X0(e.courseColor);case re.LIGHT:return"#ffffff";case re.GRAY:return"#fafafa";case re.DARK:return"#303030";case re.BLACK:return"#000000"}}const jA={multimedia:{embed(e){return{cardMode:e.showBorder===!1?_n.TRANSPARENT:_n.WHITE}}}};function wA(e,t,n){return AA(e,t,n)}function AA(e,t,n){const o=em(e,t);if(n.v==null||n.v<D2){n=RA(n);const l=o.backgroundColor,d=n.backgroundColor?.toLowerCase(),h=l!=null&&d===l.toLowerCase(),m=l==null&&d==="#ffffff";d&&(h||m)&&(n=vA()("backgroundColor",n))}const r=jA[e]?.[t]?.(n),a=n.backgroundColor&&n.backgroundType==null?{backgroundType:re.COLOR}:{};return[{accentColor:null},TA,r,n,a,{v:D2}].reduce((l,d)=>d==null?l:{...l,...K1()(m2,d)},{})}function RA(e){return{...e,backgroundType:null,cardMode:null,v:1}}const PA=null;function the(e,t){return!PA[e]?.includes(t)}const MA=null;function nhe(e,t){return!MA[e]?.includes(t)}function OA(e){return e===SA.LIGHT?Po.LIGHT:Po.DARK}function BA(e,t){if(t===Jh.AUTO){if(!e)return Po.DARK;const n=xA(e);return yA(n)===Jh.DARK?Po.DARK:Po.LIGHT}else return t===Jh.LIGHT?Po.LIGHT:Po.DARK}function she(e,t,n,o,r){const a=e?.backgroundType;return e?.cardMode===_n.TRANSPARENT?a===B2.IMAGE?OA(t?.overlayColor):o&&a!==B2.ACCENT?r:BA(n,e?.customBackgroun
151dColorContrast):o?r:Po.DARK}const DA=null;function ohe(e,t){return DA[e]?.includes(t)??!1}const FA=new RegExp(/^#([a-f0-9]{8}|[a-f0-9]{6}|[a-f0-9]{3})$/,"i"),tm=(e,t)=>t!=null&&FA.test(t)?t:e;function Ut(e){const{contrast:t=Le.AUTO,backgroundColor:n="#fff"}=e,o=tm("#fff",n),r=$n(o);return t===Le.DARK||t===Le.AUTO&&r===Le.DARK?Tt.DARK:Tt.LIGHT}const HA=e=>e.blockBackgroundType??e.familyBackgroundType??e.courseBackgroundType??e.blockTypeFallbackType??re.LIGHT,$A=e=>e.effectiveBackgroundType===re.COLOR?e.blockBackgroundColor||e.familyBackgroundColor||e.courseBackgroundColor||e.blockTypeFallbackColor||null:e.settingsBackgroundColor??null,_A=e=>e.blockCustomContrast??e.familyBackgroundColorContrast??e.courseBackgroundColorContrast??Le.AUTO,H2=e=>{const{family:t,variant:n,customBackgroundColorContrast:o}=e;return!o&&(t==="image"&&n!=="text aside"||t==="chart"||n==="sorting")},VA=e=>{const{backgroundType:t,backgroundColor:n,accentColor:o,customBackgroundColorContrast:r,accentContrast:a,family:i,variant:c}=e;if(!(t===re.ACCENT||t===re.COLOR))return null;const d=t===re.ACCENT?o:n;let h;return t===re.ACCENT?h=a:H2({family:i,variant:c,customBackgroundColorContrast:r})?h=$n(n):h=r??Le.DARK,Ut({backgroundColor:d??void 0,contrast:h})},zA=e=>VA(e)===Tt.LIGHT,UA=e=>{const t=e.blockBackgroundType!=null||e.familyBackgroundType!=null||e.courseBackgroundType!=null,n=e.blockCustomContrast!=null||e.familyBackgroundColorContrast!=null||e.courseBackgroundColorContrast!=null;return!t&&!n},GA=e=>{const{backgroundColor:t,family:n,variant:o,blockCustomContrast:r,familyBackgroundColorContrast:a,courseBackgroundColorContrast:i}=e,c=r??a??i??Le.AUTO,d=H2({family:n,variant:o,customBackgroundColorContrast:c})?$n(t):c;return Ut({backgroundColor:t??void 0,contrast:d})};var WA=v(73766),$l=v.n(WA);const KA=e=>{const{effectiveBackgroundType:t,blockImage:n}=e;return t!==re.IMAGE?null:n??null},QA=e=>pv(e?.alt),YA=e=>{if(!e)return null;const{alpha:t,overlayColor:n=ut.DARK}=e,o=gt(e),r=n===ut.LIGHT?"#fff":"#000";return Il({alpha:t,color:r,url:o})};function Vn(){const e=$e(),t=Ro(),n=dn(),o=Dt(),r=o?em(o.family,o.variant):{};return HA({blockBackgroundType:n?.backgroundType,familyBackgroundType:t?.backgroundType,courseBackgroundType:e?.theme?.blockBackgroundType,blockTypeFallbackType:r.backgroundType})}function ZA(){return Vn().toLowerCase()}function _l(){const e=Dt(),t=Vn(),n=e?.background,o=we(n?.media)?.image;return KA({effectiveBackgroundType:t,blockImage:o})}function XA(){const e=_l();return QA(e)}function qA(){const e=_l();return YA(e)}function JA(){const e=_l();return!!e&&e?.overlayColor===ut.LIGHT}function eR(){const e=Dt(),t=e?.family,n=e?.variant,o=kA(t,n),r=e?.settings?.cardMode??_n.WHITE;return o?r.toLowerCase():null}function tR(){const e=yn(),t=e?ga(e):vt.LIGHT;return $l()(t.toLowerCase())}function nR(){const e=Dt(),t=$e(),n=Ro();return _A({blockCustomContrast:e?.settings?.customBackgroundColorContrast,familyBackgroundColorContrast:n?.backgroundColorContrast,courseBackgroundColorContrast:t?.theme?.blockBackgroundColorContrast})}function sR(){const e=$e(),t=dn(),n=yn(),o=Dt(),r=Vn(),a=nR(),i=t.accentColor||e?.theme?.colorAccent;return zA({accentColor:i,accentContrast:e?.theme?.accentContrast,backgroundColor:n,backgroundType:r,customBackgroundColorContrast:a,family:o?.family,variant:o?.variant})}function oR(){const e=Dt(),t=$e(),n=yn(),o=Ro();return GA({backgroundColor:n,blockCustomContrast:e?.settings?.customBackgroundColorContrast,courseBackgroundColorContrast:t?.theme?.blockBackgroundColorContrast,family:e?.family,familyBackgroundColorContrast:o?.backgroundColorContrast,variant:e?.variant})}function rR(){const e=Dt(),t=$e(),n=Ro();return UA({blockBackgroundType:e?.settings?.backgroundType,familyBackgroundType:n?.backgroundType,courseBackgroundType:t?.theme?.blockBackgroundType,blockCustomContrast:e?.settings?.customBackgroundColorContrast,familyBackgroundColorContrast:n?.backgroundColorContrast,courseBackgroundColorContrast:t?.theme?.blockBackgroundColorContrast})}function nm(){const e=ZA(),t=tR(),n=eR(),o=sR(),r=JA(),a=rR(),i=yn(),c=qA(),l=XA();return{backgroundColor:i,backgroundImageAlt:l,backgroundImageCss:c,backgroundTypeLowercase:e,cardMode:n,colorRange:t,isContrastLight:o,isLegacyBackgroun
151d:a,isOverlayLight:r}}var $2=v(49860);const _2=Object.assign((0,u.createContext)({}),{displayName:"BlockSettingsContext"});function dn(){return(0,u.useContext)(_2)}const aR="settings";function sm(e){return t=>{const n=$2.forwardRef((o,r)=>{const a=dn(),i={...o,[e??aR]:a};return(0,s.jsx)(t,{...i,ref:r})});return n.displayName=`withBlockSettings(${t.displayName||t.name})`,n}}function yn(){const e=$e(),t=dn(),n=Ro(),o=Vn(),r=Dt();if(t==null)return null;const a=r?em(r.family,r.variant):{},i=$A({effectiveBackgroundType:o,blockBackgroundColor:t.backgroundColor,familyBackgroundColor:n?.backgroundColor,courseBackgroundColor:e?.theme?.blockBackgroundColor,blockTypeFallbackColor:a.backgroundColor,settingsBackgroundColor:t.backgroundColor}),c={...t,backgroundType:o,backgroundColor:i};return NA(c)}const iR="backgroundColor";function cR(e){return t=>{const n=$2.forwardRef((o,r)=>{const a=yn(),i={...o,[e??iR]:a};return(0,s.jsx)(t,{ref:r,...i})});return n.displayName=`withBackgroundColor(${t.displayName||t.name})`,n}}function om({children:e,...t}){const n=Dt(),o=dn(),r=Oi(),a=(0,u.useMemo)(()=>{const i=n==null?t:wA(n.family,n.variant,t);return{courseColor:r,...o,...i}},[n,t,r,o]);return(0,s.jsx)(_2.Provider,{value:a,children:e})}var lR,dR,uR,V2,hR;const rhe=null;function mR({children:e,course:t}){const n=(0,u.use)(ia),o=(0,u.useMemo)(()=>n.l10n==null?n:{l10n:{...n.l10n,localeSelectorOptions:void 0,showLocaleSelector:!1}},[n]);return e}function ahe(e){return lR()&&(dR(e)===!1||uR(e)||V2(e)||hR(e))}function ihe(e){return V2(e)?"slide":"element"}var Vl=v(49860);const jt=_("curtain"),fR={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."},pR=({labels:e,loadingText:t,showHeader:n,status:o})=>{const r={...fR,...e},[a,i]=Vl.useState(!1),c=()=>i(!0),l=Vl.useRef(null);return Vl.useEffect(()=>(l.current=setTimeout(c,1e4),()=>{l.current&&clearTimeout(l.current)}),[]),Vl.useEffect(()=>{if(o==="error"){const d=new Error("There was a socket connection error. The renderReconnect curtain was displayed");NT.yf.logger.info(d.message,d)}},[o]),o==="fatalError"?(0,s.jsx)(vR,{labelCurtainSomethingWrong:r.curtainSomethingWrong,labelCurtainSomethingWrongRefresh:r.curtainSomethingWrongRefresh,labelCurtainSomethingWrongTryAgain:r.curtainSomethingWrongTryAgain,showHeader:n}):o==="error"&&a?(0,s.jsx)(bR,{labelCurtainSessionTimedOut:r.curtainSessionTimedOut,labelCurtainSessionTimedOutRefresh:r.curtainSessionTimedOutRefresh,labelCurtainSessionTimedOutRestart:r.curtainSessionTimedOutRestart,showHeader:n}):o==="error"?(0,s.jsx)(CR,{labelCurtainOffline:r.curtainOffline,labelCurtainOfflineReconnecting:r.curtainOfflineReconnecting,showHeader:n}):(0,s.jsx)(gR,{labelCurtainLoading:r.curtainLoading,showHeader:n,text:t})},z2=()=>window.location.reload(),gR=({labelCurtainLoading:e,showHeader:t,text:n})=>(0,s.jsx)("div",{className:jt("container",{"show-header":t}),children:(0,s.jsxs)("div",{className:jt(),children:[(0,s.jsx)("div",{className:jt("spinner")}),(0,s.jsx)("div",{className:jt("text"),children:n||e})]})}),vR=({labelCurtainSomethingWrong:e,labelCurtainSomethingWrongRefresh:t,labelCurtainSomethingWrongTryAgain:n,showHeader:o})=>(0,s.jsx)("div",{className:jt("container",{"show-header":o}),children:(0,s.jsxs)("div",{className:jt(),children:[(0,s.jsx)("div",{className:jt("title"),children:e}),(0,s.jsx)("div",{className:jt("description"),children:n}),(0,s.jsx)("button",{className:jt("button"),onClick:z2,type:"button",children:t})]})}),CR=({labelCurtainOffline:e,labelCurtainOfflineReconnecting:t,showHeader:n})=>(0,s.jsx)("div",{className:jt("container",{"show-header":n}),children:(0,s.jsxs)("div",{className:jt(),children:[(0,s.jsx)("div",{className:jt("spinner",{reconnect:!0})}),(0,s.jsx)("div",{className:jt("title"),children:e}),(0,s.jsx)("div",{className:jt("description"),children:t})]})}),bR=({labelCurtainSessionTimedOut:e,labelCurtainSessionTimedOutRefresh:t,labelCurtainSessionTimedOutRestart:n,showHeader:o})=>(0,s.jsx)("div",{className:jt("container",{"show-header":o}),children:(0,s.jsxs)("div",{className:jt(),children:[(0,s.jsx)("div",{className:jt("title"),children:e}),(0,s.jsx)("div",{className:jt("description"),children:n}),(0,s.jsx)("button",{className:jt("button"),onClick:z2,type:"button",children:t})]})}),U2=pR,che=null;function xR({children:e}){return e}const Es={get isInstantLink(){return!!window.InstantLinks?.publicId}};var G2=v(1368),yR=v(99979),SR=v(52872),TR=v(8099),LR=v(15995),kR=v(24899),IR=v(91961),ER=v(31072),NR=v(97730),jR=v(7145),wR=v(44383),AR=v(56143),RR=v(53183),PR=v(78001),MR=v(52546),OR=v(2972),BR=v(13392),DR=v(504
15108),FR=v(70552),HR=v(70720),$R=v(12544),_R=v(92873),VR=v(24945),zR=v(6918),UR=v(17518),GR=v(25532),WR=v(70836),KR=v(56303),QR=v(29415),YR=v(25130),ZR=v(21606),XR=v(4893),qR=v(66343),JR=v(53119),eP=v(70482),tP=v(46584),nP=v(83867),sP=v(71265),oP=v(35082),rP=v(17745),aP=v(74499),iP=v(83644),cP=v(6556),lP=v(92584),dP=v(65421),uP=v(23721),hP=v(46832),mP=v(167),fP=v(89067),pP=v(48482),gP=v(58543),vP=v(65607),CP=v(12476),bP=v(59319),xP=v(3370),yP=v(11373),SP=v(3273),TP=v(35520),LP=v(5491),kP=v(81009),IP=v(47073),W2=v(16625),EP=v(59099),NP=v(23572),jP=v(73574),wP=v(12409),AP=v(11198),RP=v(8495),PP=v(85754),MP=v(93706),OP=v(32085),BP=v(60441),DP=v(83045),FP=v(99419),HP=v(90698),$P=v(83704),_P=v(486),VP=v(60100),zP=v(47855),UP=v(64713),GP=v(43151),WP=v(14190),KP=v(98876),QP=v(7252),YP=v(18631),ZP=v(81755),XP=v(12277),qP=v(52126),JP=v(31076),eM=v(64089),tM=v(80538),nM=v(63126),sM=v(93257),oM=v(49467),rM=v(33988),aM=v(15792),iM=v(24129),cM=v(83656),lM=v(82837),dM=v(51119),uM=v(62983),hM=v(34340),K2=v(36274),mM=v(86546),fM=v(88379),pM=v(67199),gM=v(41252),vM=v(61005),CM=v(56242),bM=v(28529),xM=v(76835),yM=v(63389),SM=v(17410),TM=v(78623),LM=v(76062),kM=v(96826),IM=v(95906),EM=v(39261),NM=v(2522),jM=v(51455),wM=v(83388),AM=v(87754),RM=v(33111),PM=v(23140),MM=v(17477),OM=v(44915),BM=v(34663),DM=v(94340),FM=v(27266),HM=v(19751),$M=v(86558),_M=v(6636),VM=v(6322),zM=v(40855),UM=v(50101),GM=v(38993),WM=v(74125),KM=v(11122),QM=v(89729),YM=v(22249),ZM=v(90657),XM=v(21971),qM=v(13603),JM=v(66865),eO=v(52064),tO=v(46358),nO=v(57371),sO=v(94579),oO=v(93044),rO=v(76368),aO=v(24862),iO=v(11368),cO=v(16992),lO=v(59828),dO=v(1673),uO=v(28294),hO=v(96930),mO=v(28251),Q2=v(10473),fO=v(67203),pO=v(5888),gO=v(75562),vO=v(77466),CO=v(70340),bO=v(19818),xO=v(57395),yO=v(75815),SO=v(49539),TO=v(59964),LO=v(34589),kO=v(46976),IO=v(4251),EO=v(33445),NO=v(97062),jO=v(81438),wO=v(58708),AO=v(37420),RO=v(85036),PO=v(38159),MO=v(67331),OO=v(74792),BO=v(43537),DO=v(86883),FO=v(6899),HO=v(11020),$O=v(82761),_O=v(38033),VO=v(10523),zO=v(80224),UO=v(94905),GO=v(88234),WO=v(51680);const KO={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"]},QO={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"]]},YO={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"]},ZO={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.
1511656 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"]},XO={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"]},qO={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"]},JO={"alert-circle-solid":PP.lE,"alert-circle":K2.lE,"alert-diamond":NM.xG,"angle-right":$P.vm,"arrow-down-from-line":VP.xZ,"arrow-down-to-bracket":zP.a_,"arrow-down-to-line":UP.yH,"arrow-down":_P.B0,"arrow-left":GP.Ce,"arrow-right-from-line":KP.Pe,"arrow-right":WP.dm,"arrow-rotate-left-light":OR.V3,"arrow-rotate-left":QP.V3,"arrow-up-from-bracket":ZP.MN,"arrow-up-from-line":XP.s8,"arrow-up-right-from-square":qP.faArrowUpRightFromSquare,"arrow-up":YP.IN,"arrows-two-from-center":yR.A1,"arrows-two-to-center":SR.hL,"badge-check":oP.Zs,"bar-chart":JP.X8,bars:rP.ck,"bars-regular":eM.ck,"block-selector":BP.iH,"book-open":nM.Re,"book-sparkles":sM.E4,book:tM.LB,"browser-light":kR.c9,browser:oM.c9,building:TR.UR,"building-regular":LR.UR,"cards-blank":rM.Xm,"caret-down":iP.xB,"caret-right":cP.fU,"chart-column":sP.q9,"check-regular":FP.e6,check:aP.e6,"chevron-down-solid":lP.Jt,"chevron-down":aM.Jt,"chevron-left-light":IR.Wz,"chevron-left-solid":uP.Wz,"chevron-left":iM.Wz,"chevron-right-light":ER.Xk,"chevron-right-solid":hP.Xk,"chevron-right":cM.Xk,"chevron-up-solid":dP.w2,"chevron-up":lM.w2,"circle-arrow-right":pP.Ni,"circle-arrow-up":fP.yi,"circle-check-regular":uM.QR,"circle-check-solid":gP.QR,"circle-check":KR.QR,"circle-dot":hM.pp,"circle-half-stroke":mM.B2,"circle-exclamation":K2.lE,"circle-info":fM.faCircleInfo,"circle-notch":vM.s4,"circle-plus-duotone":QR.q_,"circle-plus-regular":pM.q_,"circle-plus":vP.q_,"circle-small-solid":CP.ZP,"circle-small":gM.ZP,"circle-solid":mP.GE,"circle-x":bP.Ub,"circle-xmark":CM.bn,"circle-xmark-solid":xP.bn,"circle-xmark-duotone":YR.bn,circle:dM.GE,"clipboard-list-check":bM.S3,"clock-rotate-left":xM.Yj,clone:SM.$3,close:TM.yY,"closed-captioning":yM.UM,"code-fork-duotone":ZR.zt,"code-fork-regular":LM.zt,code:GO.jT,comment:kM.DN,copy:IM.jP,crop:EM.K1,"edit-regular":jM.MT,"ellipsis-regular":wM.Dw,"ellipsis-vertical-regular":AM.nx,envelope:RM.y_,"external-link":PM.vM,"eye-slash":jR.k6,eye:NR.pS,"face-anguished":BR.xX,"face-anguished-regular":DR.xX,"face-frown":FR.Ho,"face-frown-regular":HR.Ho,"face-grin-regular":$R.pj,"face-laugh":_R.ou,"face-laugh-regular":VR.ou,"face-meh":zR.Lz,"face-meh-regular":UR.Lz,"face-smile":GR.H8,"face-smile-regular":WR.H8,"file-audio":OM.qe,"file-duotone":XR.A4,"file-ex
151port-light":AR.o1,"file-export":BM.o1,"file-import":DM.$M,"file-lines":FM.bL,"file-pdf-light":wR.O_,"file-pdf":HM.O_,file:MM.A4,"folder-image":$M.JK,"folder-open":qR.Uj,gear:_M.BH,globe:VM.Bw,"graduation-cap":zM.eS,"grid-2":UM.Qy,"grid-solid":yP.Qy,"grip-dots-vertical":GM.IM,"hand-pointer":WM.A8,"image-landscape":QM.oC,"image-portrait":YM.E4,image:KM.jb,"photo-film":ZM._Z,"info-circle":XM.iW,language:SP.mh,"layers-solid":RP.qI,"link-simple-slash":eO.r2,"link-simple":JM.wi,"link-slash":tO.TH,link:qM.CQ,list:nO.IT,"list-check":sO.UN,"location-dot":PR.gK,"lock-keyhole-light":RR.Yp,lock:TP.DW,"magnifying-glass-plus":rO.bM,"magnifying-glass":oO.$U,megaphone:OP.OR,"message-quote":aO.ps,"minus-solid":LP.EZ,minus:iO.EZ,paintbrush:JR.ue,palette:cO.fy,paste:lO.R9,pause:dO.G1,"pause-solid":kP.G1,"pen-line":uO.pg,"pen-nib":mO.us,"pen-to-square":hO.faPenToSquare,"pencil-duotone":eP.zL,"pencil-regular":HP.zL,"pencil-thin":WO.zL,pencil:MR.zL,"play-regular":Q2.ij,"play-solid":IP.ij,play:Q2.ij,"flag-solid":W2.s6,flag:W2.s6,"plus-regular":fO.QL,plus:pO.TS,"quote-left":gO.$7,"rectangle-history-circle-plus":CO.Hu,"rectangle-regular":vO.vt,"rectangle-vertical-history":bO.Lt,rocket:xO.KM,"ruler-horizontal":yO.Si,"ruler-triangle":SO.cb,"sliders-simple":EP.AD,"sparkles-solid":NP.p7,sparkles:TO.p7,"spinner-third":LO.sq,"square-arrow-down":IO.Y1,"square-arrow-right":EO.mT,"square-arrow-up-right":NO.fL,"square-check-solid":jP.Dn,"square-check":jO.Dn,"square-duo":tP.Nf,"square-info":wO.Lg,"square-plus":AO.Vd,square:kO.Nf,"stopwatch-regular":RO.nw,table:PO.w9,tag:MO._2,text:OO.jw,"trash-can":DO.sj,trash:BO.yL,"triangle-exclamation":MP.JA,"user-group":wP.US,"users-regular":FO.gd,users:nP.gd,video:HO.n2,volume:$O.eF,volumeHigh:_O.AI,volumeLow:VO.gN,volumeXmark:zO.H_,"wand-magic-sparkles":UO.Ys,"waveform-lines":DP.Wx,xmark:AP.Jy},eB={"audio-plus":YO,"clone-plus":ZO,"flask-outline":XO,language:qO,reach:QO,"rise-com":KO},ae=(0,u.memo)(function({"aria-label":t,className:n,classNameIcon:o,color:r,"data-testid":a,name:i,rotation:c,spin:l,style:d,styleIcon:h}){return(0,s.jsx)("span",{className:n,"data-testid":a,style:{color:r,...d},children:(0,s.jsx)(G2.g,{"aria-label":t,className:o,icon:JO[i],rotation:c,spin:l,style:h})})}),lhe=(0,u.memo)(function({className:t,classNameIcon:n,color:o,name:r,style:a,styleIcon:i}){return(0,s.jsx)("span",{className:t,style:{color:o,...a},children:(0,s.jsx)(G2.g,{className:n,icon:eB[r],style:i})})}),tB=({value:e,fallback:t})=>{const n=we(e),o=Ot(e);return t?(0,s.jsx)("span",{"data-l10n-id":o,children:n||t}):(0,s.jsx)("span",{"data-l10n-id":o,children:n})};function nB({value:e,children:t}){const n=we(e);return t(n)}const Sn=tB,Y2=new Intl.DisplayNames(["en"],{type:"language",fallback:"code"}),sB=(e,t)=>{const n=e?.toLowerCase();try{return t?.[n]?.authorDisplayName??Y2.of(e)}catch(o){return console.warn(`Language ${e} invalid`,o),e}},oB=(e,t)=>{try{return t?.[e]?.learnerDisplayName??Y2.of(e)}catch(n){return console.warn(`Language ${e} invalid`,n),e}},rm=()=>{const e=ca(),t=Ih(e);return(0,u.useCallback)(o=>sB(o,t),[t])},rB=()=>{const e=ca(),t=Ih(e);return(0,u.useCallback)(o=>oB(o,t),[t])};var aB=v(42663);function un(e){const{to:t,children:n}=e,o=(0,Pe.zy)(),r=(0,u.useMemo)(()=>j0(t,o),[o,t]);return(0,s.jsx)(Pe.N_,{...e,to:r,children:n})}function iB({children:e,locale:t,...n}){const o=(0,Pe.zy)(),r=Mn(),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,s.jsx)(un,{...n,to:a,children:e})}var cB=v(92238),zl=v.n(cB);const lB=["End"],dB=["Enter"],uB=["Home"],hB=["Tab"],mB=[" ","Spacebar"],fB=["Escape","Esc"],pB=["ArrowUp"],gB=["ArrowDown"],vB=["ArrowLeft"],CB=["ArrowRight"],Ns=e=>t=>e.includes(t.key),bB=e=>e.altKey||e.ctrlKey||e.metaKey,xB=Ns(lB),va=Ns(dB),yB=Ns(uB),Ul=Ns(hB),am=Ns(mB),Tn=Ns(fB),Ir=Ns(pB),Er=Ns(gB),Mo=Ns(vB),Oo=Ns(CB),_i=yo()(am,va),dhe=yo()(Ul,va),SB=yo()(Oo,Ir),TB=yo()(Mo,Er),LB=yo()(Ir,Er),Z2=Co()(_i),X2=25,kB=zl()((e,t)=>{e.scrollTop!==0&&(t.preventDefault(),e.scrollTop-=X2)}),IB=zl()((e,t,n)=>{t&&(n.preventDefault(),e.scrollTop+=X2)}),EB=(e,t)=>n=>{const o=IB(e,t),r=kB(e);Cn()([[Er,o],[Ir,r]])(n)},ds=_("locales-dropdown"),NB=({backToStackCourseId:e,currentLocale:t,defaultLocale:n,isBcd:o,locales:r,message:a,onChange:i,optionType:c,renderLocaleBadge:l,showMessageIndicator:d})=>{const h=(0,u.useRef)(null),m=(0,u.useRef)(null),[f,p]=(0,u.useState)(!1),[C,g]=(0,u.useState)(!1),x=(0,u.useMemo)(()=>r.filter(k=>k.localeCode!==n),[n,r]),b=(0,u.useMemo)(()=>r.find(k=>k.localeCode===n),[n,r]),y=(0,u.useMemo)(()=>r.find(k=>k.localeCode===t),[t,r]);(0,u.useLayoutEffect)(()=>{f&&C&&(h.current?.querySelector(`[data-locale="${t}"]`)?.focus(),g(!1))},[f,C,t]),(0,u.useEffect)(()=>{const k=I=>{Tn(I)&&(m.current?.focus(),p(!1)),Ul(I)&&setTimeout(()=>{h.current.contains(document.activeElement)||p(!1)},0)};return f&&document.addEventListener("keydown",k),()=>{document.removeEventListener("keydown",k)}},[f]);const L=(0,u.useCallback)(k=>{!f&&document.activeElement===k.currentTarget&&g(!0),p(!f)},[f]),S=(0,u.useCallback)(k=>{f&&!m.current?.contains(k?.target)&&p(!1)},[f]);(0,aB.A)(h,S),(0,u.useEffect)(()=>{const k=()=>setTimeout(()=>{document.activeElement.tagName==="IFRAME"&&S()},0);return window.addEventListener("blur",k),()=>window.removeEventListener("blur",k)},[S]);const T=(0,u.useCallback)(k=>{document.activeElement===k.currentTarget&&m.current?.focus(),p(!1),i?.(k.currentTarget.getAttribute("data-locale"))},[i]);return(0,s.jsxs)("div",{className:ds({isBcd:o,isOpen:f}),children:[(0,s.jsx)("div",{className:ds("trigger-wrap"),children:(0,s.jsxs)("button",{className:ds("trigger"),onClick:L,ref:m,type:"button",children:[o&&d?(0,s.jsx)(ae,{className:ds("warning-icon"),name:"triangle-exclamation"}):(0,s.jsxs)(s.Fragment,{children:[d&&(0,s.jsx)("div",{className:ds("message-indicator")}
151),(0,s.jsx)(ae,{name:"globe"})]}),y.displayName,(0,s.jsx)(ae,{name:"chevron-down"})]})}),(0,s.jsxs)("div",{className:ds("contents"),ref:h,children:[a,(0,s.jsx)("div",{className:ds("grouping-header"),children:"Source language"}),(0,s.jsx)(q2,{checked:n===t,locale:b,onClick:T,renderLocaleBadge:l,type:c}),(0,s.jsx)("div",{className:ds("grouping-header"),children:"Translations"}),x.map(k=>(0,s.jsx)(q2,{checked:k.localeCode===t,locale:k,onClick:T,renderLocaleBadge:l,type:c},k.localeCode)),e&&(0,s.jsx)("a",{className:ds("stack-button"),href:`/manage/locales/${e}`,children:"Back to Stack"})]})]})},q2=({checked:e,locale:t,onClick:n,renderLocaleBadge:o,type:r})=>r==="link"?(0,s.jsxs)(iB,{className:ds("option",{checked:e}),"data-locale":t.localeCode,locale:t.localeCode,onClick:n,children:[o?.(t.localeCode,e),t.displayName]},t.localeCode):(0,s.jsxs)("button",{className:ds("option",{checked:e}),"data-locale":t.localeCode,onClick:n,type:"button",children:[o?.(t.localeCode,e),t.displayName]},t.localeCode),jB=({hideBackToStack:e,isBcd:t,...n})=>{const o=$e(),{currentLocale:r}=tt(),a=xl(),i=Mn(),c=rm(),l=!e&&!t?o?.id:void 0,d=(0,u.useMemo)(()=>a.map(h=>({localeCode:h.locale,displayName:c(h.locale)})),[c,a]);return(0,s.jsx)(NB,{backToStackCourseId:l,currentLocale:r,defaultLocale:i,isBcd:t,locales:d,optionType:"link",...n})},J2=window.location.origin,wB=1e3,AB="course:ready",eb="localizedSharePreview:ready",RB="preview:selectLocale",im="localizedSharePreview:toggleCurtain",tb="localizedSharePreview:togglePreview",us=_("localized-share-preview"),Ca=!!window.frameElement,nb=e=>(0,Xt.HX)(e)&&Y0(),sb=e=>nb(e)&&!Ca,PB=(e,t)=>window.parent?.postMessage({type:e,data:t});let ob=null;const MB=({children:e,localesDropdown:t,title:n})=>(0,s.jsxs)("div",{className:us("header"),dir:"ltr",children:[(0,s.jsxs)("div",{className:us("header-title-dropdowns"),children:[(0,s.jsx)("div",{className:us("header-title"),children:(0,s.jsx)("span",{className:us("header-title-text"),children:(0,s.jsx)(Sn,{value:n})})}),t&&(0,s.jsx)("div",{className:us("header-dropdowns"),children:t})]}),(0,s.jsx)("div",{className:us("header-btn-group"),children:e})]}),OB=({children:e,className:t,disabled:n=!1,onClick:o})=>(0,s.jsx)("button",{className:["button button--default button--header-done",t,n?"button--disabled":void 0].filter(Boolean).join(" "),disabled:n,onClick:o,style:{fontSize:"1.4rem",fontWeight:600,letterSpacing:0,textTransform:"none"},type:"button",children:e}),BB=({children:e})=>{const t=ot(),n=rn(),o=(0,Pe.zy)(),{currentLocale:r,setCurrentLocale:a}=tt(),i=Mn(),c=dj(),l=ie(),h=!!(l&&"hasPassword"in l?l.hasPassword:void 0)||cv(),m=(0,u.useRef)(null),[f,p]=(0,u.useState)(!1),[C,g]=(0,u.useState)(!1),[x,b]=(0,u.useState)(!h),y=(0,u.useMemo)(()=>{const w=new URLSearchParams(window.location.search),P=new URLSearchParams;for(const O of["from"])w.has(O)&&P.set(O,w.get(O));const R=P.toString();return`${J2}/share/${window.shareId}${R?`?${R}`:""}#/?locale=${r}`},[]),[L,S]=(0,u.useState)(null),[T,k]=(0,u.useState)(r),[I,E]=(0,u.useState)(!1),[N,M]=(0,u.useState)(!Ca),A=(w,P)=>m.current?.contentWindow.postMessage({type:w,data:P});(0,u.useEffect)(()=>{Ca||A(RB,r)},[r]),(0,u.useEffect)(()=>{Ca&&(PB(eb),setTimeout(()=>E(!0),0))},[]),(0,u.useEffect)(()=>{const w=P=>{if(P.origin!==J2)return;const O=P.data?.type,B=P.data?.data;if(Ca)switch(O){case im:{M(B);break}case tb:{B?(k(r),S(o),t(ph(!0)),a(i),n("/",{replace:!0})):(t(ph(!1)),a(T),n(L.pathname+L.search+L.hash||"/",{replace:!0})),document.querySelector(".cover")?.scrollTo(0,0),document.querySelector(".page-wrap")?.scrollTo(0,0);break}}else switch(O){case AB:{M(!1);break}case eb:{b(!0);break}}};return window.addEventListener("message",w),()=>{window.removeEventListener("message",w)}},[i,t,n,r,o,T,L,a]);const j=(0,u.useCallback)(()=>{const w=!f;clearTimeout(ob),g(!0),A(im,!0),ob=setTimeout(()=>{g(!1),A(im,!1),p(w)},wB),setTimeout(()=>{A(tb,w)},0)},[f]);return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("div",{className:us("curtain",{hide:!N}),children:(0,s.jsx)(U2,{status:"loading"})}),Ca?I&&e:(0,s.jsxs)("div",{className:us(),children:[x&&(0,s.jsx)(MB,{localesDropdown:!f&&!C&&(0,s.jsx)(jB,{hideBackToStack:!0}),title:c,children:(0,s.jsx)(OB,{className:us("preview-button"),disabled:C,onClick:j,children:f?"Close Learner Preview":(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(ae,{className:us("preview-button-icon"),name:"play-regular"}),"Preview as Learner"]})})}),(0,s.jsx)("iframe",{allowFullScreen:!0,"aria-label":"Course preview",className:us("iframe"),ref:m,src:y})]})]})},DB=(0,u.lazy)(()=>v.e("_b106").then(v.t.bind(v,63744,23))),FB=({children:e})=>{const t=ie(),{setCurrentLocale:n,currentLocale:o}=tt(),r=we(t?.title),a=ca()?.l10n?.languageCodeMetadata??{},i=Object.entries(a).map(([c,l])=>({code:c,learnerDisplayName:l.learnerDisplayName})).sort((c,l)=>c.learnerDisplayName.localeCompare(l.learnerDisplayName));return(0,s.jsx)(u.Suspense,{fallback:null,children:(0,s.jsx)(DB,{courseTitle:r,currentLocale:o,locales:i,setCurrentLocale:n,children:e})})};function HB({children:e}){const t=ie();return t&&nb(t)?(0,s.jsx)(BB,{children:e}):Es.isInstantLink?(0,s.jsx)(FB,{children:e}):(0,s.jsx)(s.Fragment,{children:e})}const cm=(0,u.createContext)(void 0);cm.displayName="RiseComPartnerTrackingContext";function $B({children:e,onTrack:t}){return(0,s.jsx)(cm.Provider,{value:t,children:e})}function rb(){return(0,u.useContext)(cm)}var _B=v(86150),VB=v.n(_B),zB=v(20152),UB=v.n(zB);class Ys{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,n=/Safari/.test(window.navigator.userAgent)&&/Apple Computer/.test(window.navigator.vendor),o=/CriOS/.test(window.navigator.userAgent);return t&&n&&!o}static get isSafari9(){if(!window||!window.navigator)return!1;const t=/Safari/.test(window.navigator.userAgent)&&/Apple Computer/.test(window.navigator.vendor),n=/version\/9./i.test(window.navigator.userAgent);return t&&n}static get isIe11(){return!!(window&&Object.hasOwnProperty.call(window,"ActiveXObject")&&!window.ActiveXObject)}
151static 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:n})=>/Chromium/i.test(n)):/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:n,vendor:o}=globalThis.navigator,r=/Edg\/|OPR\/|SamsungBrowser|Vivaldi|Brave/.test(n);return/Chrome/.test(n)&&/Google Inc/.test(o)&&!r}}const GB=h0()(ns()),ab=e=>t=>`${e}/${t.id}`,WB=(e,t)=>j1()({data:(0,ve.action)(t),method:"POST",url:yL(GB(`/${t}`),Xe()("url"),e),...bo()(["headers","withCredentials"],e)}),KB=e=>(t,n)=>v1()(t,ab(n),lm(e,n)),QB=e=>Mt()(Lt()({},["response","data"]),vi()(Xe()("type"),(0,ve.error)(e))),YB=(e,t)=>n=>e.postRequest?e.postRequest(t,n):n,ib=e=>t=>n=>o=>A0(o,WB(t,n),e,w0()(QB(n),Co()(fi()("data"),Xe()("data"))),UB()(es()(Xe()("error"),nr().Rejected,nr().of)),YB(t,{type:n,payload:o})),ZB=({url:e,method:t,data:n,headers:o})=>{if(Ys.isFirefox){const r=new Blob([JSON.stringify(n)],{type:"application/json"}),a=window.navigator.sendBeacon(e,r);return Promise.resolve({type:n.type,payload:{...n.payload,queued:a}})}return fetch(e,{method:t,credentials:"include",headers:{"Content-Type":"application/json",...o},body:JSON.stringify(n),keepalive:!0}).then(r=>r.json()).then(qr()("data"))},XB=nr().fromPromise(ZB),lm=gh()(3,ib(bi)),qB=gh()(3,ib(XB)),JB=e=>(t,n)=>VB()(t,ab(n),lm(e,n)),eD=e=>({debounce:KB(e),send:lm(e),fetchWithKeepAlive:qB(e),throttle:JB(e)}),tD=`${Ne("RISE_RUNTIME_URI")}/ducks`,nD=eD({headers:()=>({"x-rise-authoring-client":"381a4133661d77fcef4ef4b36c471e2f3d4aca9b"}),postRequest:(e,t)=>t,url:tD,withCredentials:!0});var sD=v(17077),oD=v.n(sD);const phe=oD()({context:{app:{name:"rise-frontend"}},payload:{articulate_user:B9(),userRole:H9(),subId:$9(),subPlan:_9(),subStatus:V9()}}),rD=ns()("rise/track/")("TRACK");var vhe;const aD=e=>({...e,context:{locale:navigator.language,device:T1(),channel:y1(),userAgentData:S1(),page:L1(),userAgent:k1(),...e.context}}),iD=(e,t)=>({...e,properties:{...x1(t),...e.properties}}),cb=e=>(t,n)=>{const o=n(),r=x0();let a=aD(e);return a=iD(a,o),a.userId=a.userId??r,a.author=a.author??r,t(nD.send(rD)(a))};function cD({children:e}){const t=ot(),n=(0,u.useCallback)(o=>t(cb(o)),[t]);return(0,s.jsx)($B,{onTrack:n,children:e})}var Gl=v(49860);const lb=Gl.createContext({typefaces:[]});function lD({addTypefaces:e,children:t,typefaces:n=[]}){dD(n);const o=Gl.useMemo(()=>({addTypefaces:e,typefaces:n}),[e,n]);return(0,s.jsx)(lb.Provider,{value:o,children:t})}function Che(){return Gl.useContext(lb)}function dD(e){Gl.useEffect(()=>{const t=new CSSStyleSheet;for(const n of e){const o=`[data-rise-typeface-id="${CSS.escape(n.id)}"] { font-family: "${CSS.escape(n.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(n=>n!==t)}},[e])}function uD(e){return e.fonts}function db(){return me(uD)}var hD=v(49860);function mD({children:e}){const t=db(),n=hD.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,s.jsx)(lD,{typefaces:n,children:e})}const Zs=({id:e="portal",childType:t="other",attributes:n}={})=>{const o=document.querySelector('dialog[open][aria-modal="true"]');let r,a;
151if(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)),n)for(const[i,c]of Object.entries(n))r.setAttribute(i,c);return r},ub=Zs();function fD(e){e?e.appendChild(ub):document.body.appendChild(ub)}const hb=se.RISE_CLASSIC;function mb(e){switch(e){case se.RISE_CLASSIC:case se.APEX:case se.HORIZON:return e;default:return hb}}const dm=(0,u.createContext)(hb);dm.displayName="ThemeIdContext";function pD({children:e,themeId:t}){return(0,s.jsx)(dm,{value:t,children:e})}function Ct(){return(0,u.useContext)(dm)}function gD(){const e=ie();return{accentContrast:e.theme?.accentContrast,bodyTypeface:e.bodyTypeface,color:e.color,headingTypeface:e.headingTypeface,isLegacyCourse:e.isLegacyCourse,uiTypeface:e.uiTypeface}}function vD(){const e=rn(),t=(0,Pe.zy)(),n=(0,u.useRef)(e),o=(0,u.useRef)(new Set),r=(0,u.useRef)(window.location.href),a=(0,u.useRef)(null);n.current=e,a.current==null&&(a.current={push:(...i)=>n.current(...i),replace:i=>n.current(i,{replace:!0}),go:i=>n.current(i),goBack:()=>n.current(-1),goForward:()=>n.current(1),listen:i=>(o.current.add(i),()=>{o.current.delete(i)}),location:t}),(0,u.useEffect)(()=>{a.current&&LI(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])}const CD=e=>e.startsWith("#")?e:`#${e}`,Bo=e=>{const t=So(CD(e));if(t==null)return null;const[n,o,r]=t.coords;return[Math.round((n??0)*255),Math.round((o??0)*255),Math.round((r??0)*255),t.alpha??1]};var bD=v(75152),kt=v.n(bD),xD=v(30349),yD=v.n(xD);const SD=vi()(Bh()(/^#([0-9a-f]{3}|[0-9a-f]{6})$/i),Be()("#FFF")),TD=Hs()({color:SD}),LD=({accentContrast:e,bodyTypeface:t,color:n,headingTypeface:o,isLegacyCourse:r,uiTypeface:a})=>{const i=(0,u.useMemo)(()=>{const d=$n(n),h=e??d;return!r&&(h===Le.DARK||h===Le.AUTO&&d===Le.DARK)?[Tt.DARK,Tt.LIGHT]:[Tt.LIGHT,Tt.DARK]},[e,n,r]),[c,l]=i;return(0,s.jsx)("div",{dangerouslySetInnerHTML:{__html:yD()({bodyTypeface:t,colorThemeRGB:Bo(n)?.slice(0,3),colorTheme:n,colorThemeContrast:c,colorThemeContrastComplementary:l,colorThemeContrastComplementaryRGB:Bo(l)?.slice(0,3),colorThemeContrastRGB:Bo(c)?.slice(0,3),colorThemeTint:X0(n),colorThemeTransparent:n+"1A",headingTypeface:o,uiTypeface:a})}})},um=De()(LD,TD);um.displayName="Branding",um.propTypes={bodyTypeface:kt().string,color:kt().string.isRequired,headingTypeface:kt().string,uiTypeface:kt().string};const kD=(0,u.memo)(um),ID=e=>e?`${e} | ${Ag}`:Ag,Vi=e=>di()?e:ID(e);function Nr({active:e=!0,children:t,title:n,isExplicit:o=!1}){const r=Vi(JC());return(0,s.jsxs)(s.Fragment,{children:[e&&(0,s.jsx)("title",{children:n??r},o?"explicit":"default"),t]})}const hm=_("not-found"),Wl=()=>(0,s.jsx)(Nr,{title:Vi(),children:(0,s.jsx)("div",{className:hm(),children:(0,s.jsxs)("div",{className:hm("copy"),children:[(0,s.jsx)("h1",{className:hm("copy",{heading:!0}),tabIndex:-1,children:"Hmm..."}),(0,s.jsx)("div",{children:"We can't seem to find the page you're looking for."})]})})});var fb,pb,Kl;const gb=(0,u.createContext)({enabled:!0,isActive:!1,onAuthorized:()=>{},onError:()=>{},onSubmitPassword:()=>{},onUnauthorized:()=>{},status:"authorized"});let yhe;function She(){}function ED(){return(0,u.useContext)(gb)}function ND({children:e}){if(!Es.isInstantLink)return(0,s.jsx)(s.Fragment,{children:e});const t=void 0;return t==null?(0,s.jsx)(s.Fragment,{children:e}):(0,s.jsx)(u.Suspense,{fallback:null,children:(0,s.jsx)(t,{children:e})})}function The({children:e,PasswordGate:t}){const n=window.InstantLinks?.isPasswordProtected?.()===!0,[o,r]=pb(),[a,i]=pb(n?"required":"authorized"),c=Kl(()=>{i("authorized")},[]),l=Kl(()=>{i("error")},[]),d=Kl(f=>{r(f),i("validating")},[]),h=Kl(()=>{i("unauthorized")},[]),m=a==="authorized"||a==="validating";return fb(t,{onSubmitPassword:d,status:a,children:fb(gb.Provider,{value:{enabled:m,isActive:!0,onAuthorized:c,onError:l,onSubmitPassword:d,onUnauthorized:h,password:o,status:a},children:e})})}function jD(e){return e.partnerContent}function wD(){return me(jD)}function vb(e){return e?.partnerContent?.content??[]}function mm(){return me(vb)}const Cb=(0,ze.Mz)(e=>qt(e)?.selectedAuthorId,vb,(e,t)=>t.find(n=>n.id===e)),AD=(0,ze.Mz)(e=>qt(e)?.partnerContentId,Cb,(e,t)=>e?t:void 0);function RD(){return me(Cb)}function zi(){return me(AD)}function PD(){const e=RD();return(0,u.useMemo)(()=>e?.data?.authors??null,[e])}function MD(){return mm()?.[0]?.data?.authors}function OD(e,t){const n=Sl(),{currentLocale:o}=tt(),r=o&&n?.localeLabelSets?.[o]?.labels||e,a=o&&n?.localeLabelSets?.[o]!=null?o:t;return{labels:r,labelsLocale:a}}function BD({children:e}
151){const t=ie(),n=Lr(),{labels:o,iso639Code:r}=aA(),a=wD(),i=Eo(),c=t?.locale??r,{labels:l,labelsLocale:d}=OD(o,c);return(0,s.jsx)(nj,{course:t,courseProgress:n,labels:l,labelsLocale:d,partnerContent:a,search:i,children:e})}var DD=v(19560);function FD({children:e,l10n:t}){const n=(0,u.useMemo)(()=>({l10n:t==null?null:(0,DD.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,s.jsx)(ia.Provider,{value:n,children:(0,s.jsx)(Rh.Provider,{value:c,children:e})})}function bb(e,t=window.location){const{defaultLocale:n,locales:o}=e??{};let r=new URLSearchParams(t.search).get("locale");if(r==null&&t.hash){const c=(0,Pe.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||n}function HD({defaultLocale:e,locales:t}){const n=rn(),o=(0,Pe.zy)(),r=(0,u.useRef)(o);r.current=o;const a=(0,u.useMemo)(()=>bb({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"?n(f):n(f,{replace:!0})},[e,n]);return{currentLocale:a,setCurrentLocale:i}}const xb=e=>e===window.location.origin||e==="articulate.com"||e.endsWith(".articulate.com");function $D(e,t){const n=ie(),o=Sl(),r=me(l=>l.courseLabels.iso639Code),a=n?.locale??r,i=o?.locales;(0,u.useEffect)(()=>{document.documentElement.lang=e??a??""},[e,a]),(0,u.useEffect)(()=>{n&&Sh({course:n,locales:i,locale:e})?document.documentElement.dir="rtl":document.documentElement.dir=""},[n,i,e]);const c=(0,u.useCallback)(l=>{if(!xb(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 _D({children:e}){const t=Sl(),{currentLocale:n,setCurrentLocale:o}=HD({defaultLocale:t?.defaultLocale,locales:t?.locales});return $D(n,o),(0,s.jsx)(FD,{l10n:t,children:(0,s.jsx)(Q7,{currentLocale:n,setCurrentLocale:o,children:e})})}function VD(e){const t=e?.exportSettings?.webExportSettings,n=e?.exportSettings?.exportType==="raw",o=e?.exportSettings?.exportType==="lms";return!!(n&&t?.disableCoverPage||o&&e?.lmsOptions?.disableCoverPage)}function yb(e){return!Es.isInstantLink&&VD(e)}function zD(e){return Cl(e)||yr(e)||ko(e)||Pi(e)?!0:yb(e)}const Sb=(0,u.createContext)({translationHoveredPath:null});function UD(){return(0,u.use)(Sb)}const GD=Sb.Provider,Tb="focus-lesson-content",Lhe="preview-nav-to-first-lesson",khe="preview-nav-to-cover-page",Ke="preview-nav-to-lesson-item",fm="preview-nav-to-slide",Ihe="preview-scroll-to-nav-prev",Ehe="preview-scroll-to-header",pm="preview-clear-state",Ql="preview-show-nav-prev",Yl="preview-show-nav-next",Lb="preview-nav-open",kb="preview-nav-close",gm="preview-go-to-slide-index",Ib="event-lesson-nav-prev-visible",vm="event-lesson-nav-prev-hidden",Eb="event-lesson-nav-next-visible",Cm="event-lesson-nav-next-hidden",Do="block-search-reveal-item",bm="data-change-path",xm="data-l10n-id",Nb=(e,t)=>{if(e)return t?["l10n","translations",t,e.getAttribute(xm)]:JSON.parse(e.getAttribute(bm))};let Xs;const WD=()=>{const e=ba();e&&e.classList.add("selected")},Zl=()=>{ba()&&Xs&&Ui(Xs)},KD=(e,t)=>n=>{const o=document.elementsFromPoint(n.clientX,n.clientY),r=t?o.find(a=>a.getAttribute(xm)):o.find(a=>a.getAttribute(bm));r!=null&&(e&&Xs!==r&&(Xs=r,e(Nb(r,t))),Ui(r))},QD=(e,t)=>n=>{n.stopPropagation(),n.preventDefault();const o=document.elementsFromPoint(n.clientX,n.clientY),r=t?o.find(a=>a.getAttribute(xm)):o.find(a=>a.getAttribute(bm));if(r){Ui(r),wb();const a=Nb(r,t);a&&(e(a),WD())}},ym=()=>document.getElementById("target-container"),ba=()=>document.getElementById("target-highlight"),jb=()=>{if(ym())return;const t=document.createElement("div");t.classList.add("target-container"),t.id="target-container",document.body.appendChild(t);const n=document.createElement("div");n.classList.add("target-highlight"),n.id="target-highlight",t.appendChild(n)},wb=()=>{const e=ba();e&&e.classList.add("selected")},YD=({top:e,left:t,width:n,height:o})=>{const r=document.querySelector("[data-page=true]")?.getBoundingClientRect().width??window.innerWidth-20;return n<r&&(e=e-10,o=o+20,t=t-20,n=n+40),{top:e,left:t,width:n,height:o}},Ui=e=>{const{top:t,left:n,width:o,height:r}=YD(e.getBoundingClientRect()),a=ba();a&&(e!==Xs&&a.classList.contains("selected")&&a.classList.remove("selected"),a.classList.add("active"),Object.assign(a.style,{top:`${t}px`,left:`${n}px`,width:`${o}px`,height:`${r}px`}),Xs=e)},ZD=()=>{window.removeEventListener("scroll",Zl,{capture:!0}),Xl()},Xl=()=>{ba()?.classList?.remove("active"),ba()?.classList?.remove("selected")};let xa,ql;const XD=({locale:e})=>({isActive:t},n)=>{const o=!!ym();if(t){if(xa)return xa;jb();const r=KD(n,e);let a;return xa=new Promise((i,c)=>{a=QD(i,e),ql=c,document.body.classList.add("target-mode"),window.addEventListener("mousemove",r,!0),window.addEventListener("click",a,!0),window.addEventListener("resize",Xl,!0),window.addEventListener("scroll",Zl,!0)}).finally(()=>{xa=null,ql=null,document.body.classList.remove("target-mode"),window.removeEventListener("mousemove",r,!0),window.removeEventListener("click",a,!0),window.removeEventListener("resize",Xl,!0),window.removeEventListener("scroll",Zl,!0)}),xa}else Xl(),ym()?.remove(),Xs=null;return o&&ql!=null&&ql(new Error("cancelled")),Promise.resolve()},qD=e=>{let t=e.findIndex(n=>n==="items");return t===-1?e:e.slice(0,t+2)},Ab=e=>{const t=(0,tr.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(qD(e))}']`):null},JD=e=>{jb(),window.addEventListener("scroll",Zl,{capture:!0}),document.body.classList.add("target-mode");const t=Ab(e);t&&Ui(t)},eF=e=>{if(!xa)return;const t=Ab(e);t&&(Xs!==t&&(Xs=t),Ui(t),wb(),t.scrollIntoView({behavior:"smooth",block:"center"}))},tF=e=>["course",e],Rb=(e,t)=>
151["lessons",{id:e},t],nF=(e,t)=>[...Rb(e,"items"),{id:t}],ya=e=>JSON.stringify(tF(e)),Pb=(e,t)=>JSON.stringify(Rb(e,t)),sF=(e,t)=>JSON.stringify(nF(e,t)),Ln={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"},Sa=(e,t)=>{const n={};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$/,"");n[`${i??"item"}Id`]=r.id}}return n},oF=new Set(["preview:lessonUpdate","preview:navigate","preview:goToSlideIndex","preview:scrollto","preview:showLessonNavNext","preview:showLessonNavPrev","preview:themeUpdate","preview:update","preview:navOpen","preview:navClose","preview:replace","preview:changeset","preview:selectLocale",Ln.FOCUS,Ln.TOGGLE,Ln.CLEAR,Ln.TRANSLATION_HOVERED,Ln.TRANSLATION_HOVER_CLEAR]),rF=(e,t)=>!(e==="firstLesson"&&t.includes("/lessons/"))&&!(e==="cover"&&(t==="/"||t==="/preview"));function aF({course:e,fonts:t,l10n:n}){let o=!1;return vC(t,()=>{o||(Pn(G8({course:e,fonts:t,l10n:n})),window.parent.postMessage({type:"preview:themeUpdateComplete"},window.location.origin))}),{cancel(){o=!0}}}function iF(){let e=[],t=0;return n=>{clearTimeout(t);for(const o of n)e.push(o);t=window.setTimeout(()=>{const o=e;e=[],Pn(K8(o))},15)}}function cF(){const e=rn(),t=(0,Pe.zy)(),n=me(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 p=(0,u.useRef)(n);p.current=n;const C=(0,u.useRef)(null),g=(0,u.useRef)(iF()),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=y=>{const{data:L,origin:S}=y;if(!xb(S))return;const T=m.current,I=f.current.pathname,E=p.current,N=E?.lessonsOnly,M=Array.isArray(L)?L:[L];for(const{type:A,data:j,options:w}of M)if(oF.has(A)){if(A===Ln.TOGGLE&&window.targetMode?.(j,R=>{window.parent.postMessage({type:Ln.HOVERED,data:R},"*")})?.then(R=>{window.parent.postMessage({type:Ln.SELECTED,data:R},"*")}).catch(()=>{window.parent.postMessage({type:Ln.SELECTED,data:[]},"*")}),A==="preview:update"&&r(j),A==="preview:themeUpdate"){C.current?.();const{course:P,l10n:R,fonts:O,theme:B}=j,D={...P,theme:B},F=SE({course:E,updates:D}),{cancel:V}=aF({course:F,fonts:O,l10n:R});C.current=V}if(A==="preview:navigate"){let{type:P,lessonId:R,itemId:O}=j;const{path:B,replace:D}=j,F=D?V=>T(V,{replace:!0}):T;if(rF(P,I)){if(Array.isArray(B)){const V=(0,tr.Ce)(B);if(V)({type:P,lessonId:R,itemId:O}=V);else if(B[0]==="mondrian")for(const U of E?.lessons??[]){const H=U.items?.find(K=>"blockumentId"in K&&K.blockumentId===B[1]);if(H){P="lesson",R=U.id,O=H.id;break}}else continue}if(P==="firstLesson"&&N?.[0])F(xn(N[0].id));else if(P==="cover"||P==="course")F("/");else if(P==="lesson"&&N?.find(({id:U})=>U===R)!=null){const U=xn(R),H=ko(E),K=(0,Pe.B6)(Bl,I)!=null||(0,Pe.B6)(Dl,I)!=null,z=U!==I&&!(H&&K),W=H&&O==null&&U7(E),$=()=>{W?window.dispatchEvent(new CustomEvent(fm,{detail:{lessonId:R}})):(O!=null||B!=null)&&window.dispatchEvent(new CustomEvent(Ke,{detail:{lessonId:R,itemId:O,path:B??[]}}))},G=W||O!=null||B!=null;Mh(WC.getState())===Lo.RESTRICTED&&Pn(pN({targetLessonId:R,lessons:E?.lessons??[]})),z&&F(U),G&&(z?setTimeout($,1500):$())}}}if(A===Ln.CLEAR&&window.dispatchEvent(new CustomEvent(pm)),A==="preview:navOpen"&&window.dispatchEvent(new CustomEvent(Lb)),A==="preview:navClose"&&window.dispatchEvent(new CustomEvent(kb)),A==="preview:showLessonNavPrev"&&window.dispatchEvent(new CustomEvent(Ql)),A==="preview:showLessonNavNext"&&window.dispatchEvent(new CustomEvent(Yl)),A==="preview:scrollto"&&typeof j.target=="string"){const P=document.querySelector(j.target);P&&P.scrollIntoView({behavior:"smooth",block:"start"})}A==="preview:goToSlideIndex"&&typeof j.slideIndex=="number"&&window.dispatchEvent(new CustomEvent(gm,{detail:{slideIndex:j.slideIndex}})),A==="preview:replace"&&Pn(U8(j)),A==="preview:changeset"&&g.current(j),A===Ln.FOCUS&&eF(j.path),A===Ln.TRANSLATION_HOVERED&&(i({translationHoveredPath:j.path}),JD(j.path)),A===Ln.TRANSLATION_HOVER_CLEAR&&(i({translationHoveredPath:null}),ZD()),A==="preview:lessonUpdate"&&(Pn(W8(j)),requestAnimationFrame(()=>{window.parent.postMessage({type:"preview:lessonUpdateComplete"},window.location.origin)})),A==="preview:selectLocale"&&w?.shouldRetainParentFocus&&l(!0)}};return window.addEventListener("message",b),()=>window.removeEventListener("message",b)},[]),{previewType:o,targetModeContext:a,didNavigate:d,shouldSkipAutoFocusOnNavigate:c}}const Sm=(0,u.createContext)(null);function Jl(){const e=(0,u.useContext)(Sm);if(e==null)throw new Error("usePreviewState must be used within PreviewRuntimeProvider");return e}function lF(){return(0,u.useContext)(Sm)?.previewType}function dF({children:e}){const{previewType:t,targetModeContext:n,didNavigate:o,shouldSkipAutoFocusOnNavigate:r}=cF(),a=(0,u.useMemo)(()=>({previewType:t||void 0,didNavigate:o,shouldSkipAutoFocusOnNavigate:r}),[t,o,r]);return(0,s.jsx)(GD,{value:n,children:(0,s.jsx)(Sm,{value:a,children:e})})}function Tm({className:e,ref:t}){return(0,s.jsxs)("svg",{"aria-hidden":"true",className:e,fill:"none",focu
151sable:"false",height:"15",ref:t,role:"img",viewBox:"0 0 16 15",width:"16",xmlns:"http://www.w3.org/2000/svg",children:[(0,s.jsx)("path",{d:"M2.34315 7.34315L8 13L13.6569 7.34315",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2"}),(0,s.jsx)("rect",{fill:"currentColor",height:"12",rx:"0.999999",width:"2",x:"7",y:"1"})]})}function uF({className:e}){return(0,s.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,s.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 Mb({className:e,ref:t}){return(0,s.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,s.jsx)("path",{d:"M13.6569 7.65685L8 2L2.34315 7.65686",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2"}),(0,s.jsx)("rect",{fill:"currentColor",height:"12",rx:"0.999999",transform:"rotate(180 9 14)",width:"2",x:"9",y:"14"})]})}function Ft({children:e,className:t,height:n,width:o,viewBox:r}){return(0,s.jsx)("svg",{"aria-hidden":"true",className:t,fill:"none",focu
151sable:"false",height:n,viewBox:r,width:o,xmlns:"http://www.w3.org/2000/svg",children:e})}function hF(e){return(0,s.jsx)(Ft,{height:"12",viewBox:"0 0 18 12",width:"18",...e,children:(0,s.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 mF(e){return(0,s.jsx)(Ft,{height:"6",viewBox:"0 0 10 6",width:"10",...e,children:(0,s.jsx)("path",{d:"M9 1L5 5L1 1",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2"})})}function fF(e){return(0,s.jsx)(Ft,{height:"6",viewBox:"0 0 10 6",width:"10",...e,children:(0,s.jsx)("path",{d:"M1 5L5 1L9 5",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2"})})}function pF(e){return(0,s.jsxs)(Ft,{height:"21",viewBox:"0 0 20 21",width:"20",...e,children:[(0,s.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,s.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,s.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 kn(e){return(0,s.jsx)("svg",{"aria-hidden":"true",fill:"currentColor",focusable:"false",xmlns:"http://www.w3.org/2000/svg",...e})}function Ob(e){return(0,s.jsx)(kn,{...e,fill:"none",viewBox:"1 1 18 18",children:(0,s.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){return(0,s.jsxs)(kn,{...e,fill:"none",viewBox:"0 0 18 18",children:[(0,s.jsx)("circle",{cx:"9",cy:"9",fill:"#74BF44",r:"9"}),(0,s.jsx)("path",{d:"M6.43994 9.12061L8.43994 11.1206L11.9399 7.62061",stroke:"white",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5"})]})}function gF(e){return(0,s.jsx)(Ft,{height:"12",viewBox:"0 0 12 12",width:"12",...e,children:(0,s.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 vF(e){return(0,s.jsx)(Ft,{height:"5",viewBox:"0 0 10 5",width:"10",...e,children:(0,s.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.56
151569 4.75592Z",fill:"currentColor"})})}function CF(e){return(0,s.jsxs)(Ft,{height:"18",viewBox:"0 0 18 18",width:"18",...e,children:[(0,s.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,s.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 bF(e){return(0,s.jsxs)(Ft,{height:"14",viewBox:"0 0 20 14",width:"20",...e,children:[(0,s.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,s.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 xF(e){return(0,s.jsx)(Ft,{height:"10",viewBox:"0 0 10 10",width:"10",...e,children:(0,s.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"})})}
151const yF=({width:e="17",height:t="15",title:n="Book",desc:o="Book",focusable:r="false",className:a})=>(0,s.jsxs)("svg",{className:a,focusable:r,height:t,viewBox:"0 0 17 15",width:e,xmlns:"http://www.w3.org/2000/svg",children:[(0,s.jsx)("title",{children:n}),(0,s.jsx)("desc",{children:o}),(0,s.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 SF=v(40278),q=v.n(SF);const Bb=({title:e="Pick One",desc:t="Pick One",width:n="16",height:o="14",className:r,focusable:a="false","aria-hidden":i})=>(0,s.jsxs)("svg",{"aria-hidden":i,className:q()("i i-pickOne",r),focusable:a,height:o,viewBox:"0 0 16 14",width:n,xmlns:"http://www.w3.org/2000/svg",children:[(0,s.jsx)("title",{children:e}),(0,s.jsx)("desc",{children:t}),(0,s.jsxs)("g",{fillRule:"evenodd",children:[(0,s.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,s.jsx)("path",{d:"M8.862 1.324h7v2h-7zM8.862 4.324h7v2h-7zM8.862 8.324h7v2h-7zM8.862 11.324h7v2h-7z"})]})]}),Db=({title:e="Fill in the Blank",desc:t="Pencil writing on a surface",width:n="15",height:o="15",className:r,focusable:a="false"})=>(0,s.jsxs)("svg",{className:q()("i i-fillInTheBlank",r),focusable:a,height:o,viewBox:"0 0 15 15",width:n,children:[(0,s.jsx)("title",{children:e}),(0,s.jsx)("desc",{children:t}),(0,s.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"})]});function Fb({className:e,ref:t}){return(0,s.jsx)("svg",{"aria-hidden":"true",className:e,fill:"
151currentColor",focusable:"false",ref:t,viewBox:"0 0 13 13",xmlns:"http://www.w3.org/2000/svg",children:(0,s.jsx)("path",{d:"M3.33177 4.1487L6.48034 1.00013M9.6289 4.14869L6.48034 1.00013M6.48034 1.00013L6.47966 11.9601"})})}function TF(e){return(0,s.jsxs)(kn,{...e,fill:"none",viewBox:"0 3 16 10",children:[(0,s.jsx)("path",{d:"M1.51472 7.99993H14.4853",stroke:"currentColor",strokeMiterlimit:"10",strokeWidth:"0.75"}),(0,s.jsx)("path",{d:"M9.50008 12.4994L14.5004 7.99932L9.50008 3.99973",stroke:"currentColor",strokeMiterlimit:"10",strokeWidth:"0.75"})]})}function Hb(e){return(0,s.jsx)(Ft,{height:"8",viewBox:"0 0 14 8",width:"14",...e,children:(0,s.jsx)("path",{clipRule:"evenodd",d:"M13 1L7 7L1 1",stroke:"currentColor"})})}function $b(e){return(0,s.jsxs)(kn,{...e,fill:"none",viewBox:"0 0 16 16",children:[(0,s.jsx)("circle",{cx:"8",cy:"8",r:"7",stroke:"white"}),(0,s.jsx)("path",{d:"M5 7.71429L7.54545 10L11.5 5.5",stroke:"white"})]})}function _b(e){return(0,s.jsxs)(kn,{...e,fill:"none",viewBox:"0 0 16 16",children:[(0,s.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,s.jsx)("circle",{cx:"8",cy:"7.5293",r:"7",stroke:"white"})]})}function LF({className:e}){return(0,s.jsxs)("svg",{"aria-hidden":"true",className:e,fill:"none",viewBox:"0 0 15 15",xmlns:"http://www.w3.org/2000/svg",children:[(0,s.jsx)("circle",{cx:"6",cy:"6",r:"5"}),(0,s.jsx)("path",{d:"M9.5 9.5L14 14"})]})}function kF(e){return(0,s.jsxs)(kn,{...e,fill:"none",viewBox:"0 0 16 16",children:[(0,s.jsx)("circle",{cx:"8",cy:"8",r:"7",stroke:"white"}),(0,s.jsx)("path",{d:"M10 6L6 10",stroke:"white"}),(0,s.jsx)("path",{d:"M6 6L10 10",stroke:"white"})]})}function IF({className:e}){return(0,s.jsx)("svg",{"aria-hidden":"true",className:e,fill:"none",focu
151sable:"false",viewBox:"0 0 10 7",xmlns:"http://www.w3.org/2000/svg",children:(0,s.jsx)("path",{d:"M1 1.40002L5 5.40002L9 1.40002",strokeWidth:"1.6"})})}function EF(e){return(0,s.jsxs)(kn,{viewBox:"0 0 12 12",...e,children:[(0,s.jsx)("path",{d:"M10.7425 0.742189L11.4496 1.4493L1.55012 11.3488L0.843012 10.6417L10.7425 0.742189Z",fill:"currentColor"}),(0,s.jsx)("path",{d:"M11.1571 10.6417L10.45 11.3488L0.550537 1.44929L1.25764 0.742188L11.1571 10.6417Z",fill:"currentColor"})]})}function NF({className:e,ref:t}){return(0,s.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,s.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 jF(e){return(0,s.jsx)(kn,{...e,viewBox:"0 0 16 8",children:(0,s.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 wF({className:e,ref:t}){return(0,s.jsx)("svg",{"aria-hidden":"true",className:e,fill:"
151currentColor",focusable:"false",ref:t,version:"1.1",viewBox:"0 0 17 17",xmlns:"http://www.w3.org/2000/svg",children:(0,s.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 AF(e){return(0,s.jsx)(Ft,{height:"12",viewBox:"0 0 16 12",width:"16",...e,children:(0,s.jsx)("path",{clipRule:"evenodd",d:"M9.6665 2H0.666504V0H9.6665V2ZM12.6665 6H0.666504V4H12.6665V6ZM0.666504 10H7.6665V8H0.666504V10Z",fill:"currentColor",fillRule:"evenodd"})})}function Vb(e){return(0,s.jsx)(Ft,{height:"8",viewBox:"0 0 12 8",width:"12",...e,children:(0,s.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 RF(e){return(0,s.jsx)(Ft,{height:"8",viewBox:"0 0 12 8",width:"12",...e,children:(0,s.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 PF(e){return(0,s.jsxs)(Ft,{height:"21",viewBox:"0 0 20 21",width:"20",...e,children:[(0,s.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,s.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,s.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 MF(e){return(0,s.jsx)(Ft,{height:"15",viewBox:"0 0 16 15",width:"16",...e,children:(0,s.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 OF(e){return(0,s.jsxs)(Ft,{height:"18",viewBox:"0 0 18 18",width:"18",...e,children:[(0,s.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,s.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.3
1516328 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 BF(e){return(0,s.jsxs)(Ft,{height:"14",viewBox:"0 0 20 14",width:"20",...e,children:[(0,s.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,s.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 DF(e){return(0,s.jsx)(Ft,{height:"14",viewBox:"0 0 14 14",width:"14",...e,children:(0,s.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"})})}function Ht(e){return function(n){const o=Ct(),r=e[o];return r?(0,s.jsx)(r,{...n}):null}}const zb=Ht({[se.RISE_CLASSIC]:hF,[se.HORIZON]:null,[se.APEX]:AF}),td=Ht({[se.RISE_CLASSIC]:Tm,[se.HORIZON]:Fb,[se.APEX]:NF}),Lm=Ht({[se.RISE_CLASSIC]:uF,[se.HORIZON]:TF,[se.APEX]:jF}),Ub=Ht({[se.RISE_CLASSIC]:Mb,[se.HORIZON]:Fb,[se.APEX]:wF}),FF=Ht({[se.RISE_CLASSIC]:yF,[se.HORIZON]:null,[se.APEX]:null}),HF=Ht({[se.RISE_CLASSIC]:mF,[se.HORIZON]:Hb,[se.APEX]:Vb}),$F=Ht({[se.RISE_CLASSIC]:fF,[se.HORIZON]:Hb,[se.APEX]:RF}),_F=Ht({[se.RISE_CLASSIC]:ed,[se.HORIZON]:$b,[se.APEX]:ed}),VF=Ht({[se.RISE_CLASSIC]:Bb,[se.HORIZON]:_b,[se.APEX]:Bb}),zF=Ht({[se.RISE_CLASSIC]:pF,[se.HORIZON]:null,[se.APEX]:PF}),UF=Ht({[se.RISE_CLASSIC]:Ob,[se.HORIZON]:kF,[se.APEX]:Ob}),GF=Ht({[se.RISE_CLASSIC]:ed,[se.HORIZON]:$b,[se.APEX]:ed}),WF=Ht({[se.RISE_CLASSIC]:Db,[se.HORIZON]:_b,[se.APEX]:Db}),Gi=Ht({[se.RISE_CLASSIC]:gF,[se.HORIZON]:LF,[se.APEX]:MF}),Gb=Ht({[se.RISE_CLASSIC]:vF,[se.HORIZON]:IF,[se.APEX]:Vb}),KF=Ht({[se.RISE_CLASSIC]:CF,[se.HORIZON]:null,[se.APEX]:OF}),QF=Ht({[se.RISE_CLASSIC]:bF,[se.HORIZON]:null,[se.APEX]:BF}),nd=Ht({[se.RISE_CLASSIC]:xF,[se.HORIZON]:EF,[se.APEX]:DF}),Ta=_("cover");function Ahe(){const{categories:e}=ie();return!Array.isArray(e)||e.length===0?null:(0,s.jsxs)("section",{className:Ta("categories-section"),children:[(0,s.jsx)("h2",{className:Ta("categories-title"),children:"Topics"}),(0,s.jsx)("ul",{className:Ta("categories-list"),role:"list",children:e.map(t=>(0,s.jsxs)("li",{className:Ta("categories-item"),role:"listitem",children:[(0,s.jsx)(FF,{className:Ta("categories-icon")}),(0,s.jsx)("span",{className:Ta("categories-item-wrap"),children:t})]},t))})]})}var YF=v(16186),ZF=v(90245),jr=v.n(ZF),Fe=v(69980);const XF=`${Ne("CDN_URI")}/assets/rise/assets/certificate-icon.svg`,qF=`${Ne("CDN_URI")}/assets/rise/assets/error_x.svg`,JF=`${Ne("CDN_URI")}/assets/rise/assets/loading_spinner.svg`,Wi="downloading",La="error",wr="ok",km="contained",Wb=({type:e})=>{const[t]=(0,u.useState)(()=>jr()("certdownload-")),[n,o]=(0,u.useState)(wr),r=(0,Fe.A)(n),a=(0,u.useRef)(null),i=xe(),c=`${t}-live`,l=e===km?"certificateDownload certificateDownloadContained":"certificateDownload",d=(0,u.useCallback)(()=>{o(Wi)},[]);return(0,u.useEffect)(()=>(n===Wi&&r!==Wi&&QN().then(()=>{o(wr)}).catch(h=>{(0,YF.FZ)(h)?o(wr):o(La)}),()=>{YN()}),[r,n]),(0,u.useEffect)(()=>{a.current&&(n===La&&r!==La||n===wr&&(r===La||r===Wi))&&a.current.focus()},[r,n]),(0,s.jsxs)("div",{className:l,children:[(0,s.jsxs)("div",{"aria-live":"polite",id:c,role:"status",children:[n===Wi&&(0,s.jsxs)("span",{className:"certificateDownload__downloading",children:[(0,s.jsx)("img",{alt:"",className:"animation-loading certificateDownload__downloadingImg",height:"15",src:JF,width:"15"}),i?.certificateDownloadInProgress||"Downloading..."]}),n===La&&(0,s.jsxs)("span",{className:"certificateDownload__error",children:[(0,s.jsx)("img",{alt:"Error",className:"certificateDownload__errorImg",height:"15",src:qF,width:"15"}),(0,s.jsx)("span",{className:"visually-hidden",children:i?.a11yCertificateDownloadFailed||"Failed to download certificate"})]})]}),(n===wr||n===La)&&(0,s.jsxs)("button",{"aria-controls":c,className:"certificateDownload__btn",onClick:d,ref:a,type:"button",children:[n===wr&&e===km&&(0,s.jsx)("img",{alt:"",className:"certificateDownload__okImg",height:"15",src:XF,width:"15"}),n===wr?i?.certificateDownload||"Download certificate":i?.certificateRetryDownload||"Retry download"]})]})},eH=()=>(0,s.jsx)(Wb,{type:km}),tH=(0,u.memo)(Wb);var Im,nH;
151const Rhe=({width:e="18",height:t="18",className:n})=>Im("svg",{"aria-hidden":"true",className:nH("i i-alert",n),focusable:"false",height:t,viewBox:"0 0 18 18",width:e,children:Im("g",{fill:"none",fillRule:"evenodd",stroke:"#DE1D1D",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",children:Im("path",{d:"M9 1a8 8 0 1 1 0 16A8 8 0 0 1 9 1zM9 5.364V9.53M9 11.91v.726"})})}),Phe=null;function sH(e){return(0,s.jsxs)(kn,{viewBox:"0 0 16 12",...e,children:[(0,s.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,s.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,s.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 oH,Kb,rH;const Mhe=({width:e="24",height:t="16",leftMovement:n="0",className:o})=>oH("svg",{"aria-hidden":"true",className:rH("i i-alt",o),focusable:"false",height:t,style:{marginLeft:n},viewBox:"0 0 24 16",width:e,children:[Kb("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"}),Kb("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"})]}),Ohe=null;var aH,sd,iH;const Bhe=({title:e="All Authors",desc:t="A circle with the outline of the head and shoulders of two people inside",width:n="30",height:o="30",className:r,focusable:a="false"})=>aH("svg",{className:iH("i i-blockTemplateAllAuthors",r),focusable:a,height:o,viewBox:"0 0 30 30",width:n,children:[sd("title",{children:e}),sd("desc",{children:t}),sd("circle",{cx:"14.963",cy:"14.963",fill:"#E9E9E9",r:"14.963"}),sd("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"})]}),Dhe=null;var od,hs,cH;const Fhe=({title:e="Check Mark",desc:t="A circle with a check mark inside",width:n="112",height:o="112",className:r,focusable:a="false"})=>od("svg",{className:cH("i i-blockTemplateCheckMark",r),focusable:a,height:o,viewBox:"0 0 112 112",width:n,children:[hs("title",{children:e}),hs("desc",{children:t}),hs("defs",{children:od("filter",{filterUnits:"objectBoundingBox",height:"186.1%",id:"a",width:"186.1%",x:"-43.1%",y:"-40.3%",children:[hs("feOffset",{dy:"2",in:"SourceAlpha",result:"shadowOffsetOuter1"}),hs("feGaussianBlur",{in:"shadowOffsetOuter1",result:"shadowBlurOuter1",stdDeviation:"10"}),hs("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"}),od("feMerge",{children:[hs("feMergeNode",{in:"shadowMatrixOuter1"}),hs("feMergeNode",{in:"SourceGraphic"})]})]})}),od("g",{fill:"none",fillRule:"evenodd",filter:"url(#a)",transform:"translate(20 18)",children:[hs("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"}),hs("circle",{className:"inner",cx:"36",cy:"36",r:"30"}),hs("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"})]})]}),Hhe=null;var Qb,rd,lH;const $he=({title:e="Folder Outline",desc:t="Outline of a folder",width:n="42",height:o="42",className:r,focusable:a="false"})=>Qb("svg",{className:lH("i i-blockTemplateFolder",r),focusable:a,height:o,viewBox:"0 0 42 42",width:n,children:[rd("title",{children:e}),rd("desc",{children:t}),Qb("g",{fill:"#ADAEAF",fillRule:"nonzero",stroke:"#ADAEAF",strokeWidth:".3",children:[rd("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"}),rd("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"})]})]}),_he=null;var Em,Ki,dH;const Vhe=({title:e="Captions",desc:t="Two capital letter C inside a square",width:n="24",height:o="16",className:r,focusable:a="false"})=>Em("svg",{className:dH("i i-captions",r),focusable:a,height:o,viewBox:"0 0 24 16",width:n,children:[Ki("title",{children:e}),Ki("desc",{children:t}),Em("g",{fill:"none",fillRule:"evenodd",transform:"translate(-.355)",children:[Ki("rect",{height:"13.25",rx:"1",stroke:"#000",strokeWidth:"1.75",width:"18.25",x:"1.447",y:"1.402"}),Em("text",{fill:"#000",fontFamily:"Lato-Black, Lato",fontSize:"9",fontWeight:"700",letterSpacing:".75",children:[Ki("tspan",{x:"4.222",y:"11.5",children:"C"})," ",Ki("tspan",{x:"10.885",y:"11.5",children:"C"})]})]})]}),zhe=null;var uH,Nm;const Uhe=({"aria-hidden":e,"aria-label":t,className:n,desc:o,height:r="15",role:a="img",title:i,width:c="16"})=>uH("svg",{"aria-hidden":e,"aria-label":t,className:n,focusable:"false",height:r,role:a,viewBox:"0 0 16 15",width:c,xmlns:"http://www.w3.org/2000/svg",children:[i&&Nm("title",{children:i}),o&&Nm("desc",{children:o}),Nm("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:"
151currentColor",fillRule:"evenodd"})]}),Ghe=null;function Yb(e){return(0,s.jsx)(kn,{viewBox:"0 0 11 8",...e,children:(0,s.jsx)("path",{d:"M9.6,0L11,1.3L3.9,8L0,4.3L1.4,3l2.6,2.4L9.6,0z"})})}var hH,jm,mH;const Whe=({"aria-hidden":e,"aria-label":t,className:n,desc:o,height:r="21",role:a="img",title:i,width:c="21"})=>hH("svg",{"aria-hidden":e,"aria-label":t,className:mH("i i-checkMarkFilled",n),focusable:"false",height:r,role:a,viewBox:"0 0 21 21",width:c,xmlns:"http://www.w3.org/2000/svg",children:[i&&jm("title",{children:i}),o&&jm("desc",{children:o}),jm("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"})]}),Khe=null;var Zb,fH;function Qhe(e){return Zb(fH,{viewBox:"0 0 7 5",...e,children:Zb("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 Xb,pH;const Yhe=({width:e="16",height:t="16",className:n,focusable:o="false"})=>Xb("svg",{"aria-hidden":"true",className:pH("i i-chevronLeft",n),focusable:o,height:t,viewBox:"0 0 16 16",width:e,children:Xb("polygon",{points:"11.1,15.7 3.4,8 11.1,0.3 12.6,1.7 6.3,8 12.6,14.3 "})}),Zhe=null,gH=({className:e,dataTestId:t})=>(0,s.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,s.jsx)("circle",{cx:"5",cy:"5",r:"5"})}),vH=({className:e})=>
151(0,s.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,s.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 CH,zn;const Jhe=({"aria-hidden":e,"aria-label":t,className:n,desc:o,height:r="18",role:a="img",title:i,width:c="18"})=>CH("svg",{"aria-hidden":e,"aria-label":t,className:n,fill:"none",focusable:"false",height:r,role:a,viewBox:"0 0 18 18",width:c,xmlns:"http://www.w3.org/2000/svg",children:[i&&zn("title",{children:i}),o&&zn("desc",{children:o}),zn("path",{d:"M9 9V1a8 8 0 015.657 2.343L9 9z",fill:"red",stroke:"#fff",strokeLinejoin:"round"}),zn("path",{d:"M9 9l5.657-5.656A8 8 0 0117 9H9z",fill:"#F90",stroke:"#fff",strokeLinejoin:"round"}),zn("path",{d:"M9 9h8a8 8 0 01-2.343 5.657L9 9z",fill:"#FFF500",stroke:"#fff",strokeLinejoin:"round"}),zn("path",{d:"M9 9l5.657 5.657A8 8 0 019 17V9z",fill:"#ADFF00",stroke:"#fff",strokeLinejoin:"round"}),zn("path",{d:"M9 9v8a8 8 0 01-5.657-2.343L9 9z",fill:"#00FF94",stroke:"#fff",strokeLinejoin:"round"}),zn("path",{d:"M9 9l-5.657 5.657A8 8 0 011 9h8z",fill:"#06F",stroke:"#fff",strokeLinejoin:"round"}),zn("path",{d:"M9 9H1a8 8 0 012.343-5.656L9 9z",fill:"#8000FF",stroke:"#fff",strokeLinejoin:"round"}),zn("path",{d:"M9 9L3.343 3.343A8 8 0 019 1v8z",fill:"#EB00FF",stroke:"#fff",strokeLinejoin:"round"}),zn("path",{d:"M9 6a3 3 0 110 6 3 3 0 010-6z",fill:"#fff"}),zn("path",{d:"M9 17A8 8 0 109 1a8 8 0 000 16z",stroke:"#EAEAEB"})]}),eme=null;var bH,wm,xH;const tme=({title:e="Copy",desc:t="A document stacked on top of another one",width:n="15",height:o="18",className:r=null,focusable:a="false"})=>bH("svg",{className:xH("i i-stack",r),focusable:a,height:o,viewBox:"0 0 15 18",width:n,children:[wm("title",{children:e}),wm("desc",{children:t}),wm("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"})]}),nme=null;var yH,Am,SH;const sme=e=>{const{className:t,desc:n="Crop",focusable:o="false",height:r="19",title:a="Crop",width:i="19"}=e,c={className:SH("i i-crop",t),focusable:o,height:r,viewBox:`0 0 ${i} ${r}`,width:i};return yH("svg",{...c,children:[Am("title",{children:a}),Am("desc",{children:n}),Am("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"})]})},ome=null;var TH,Rm,LH;const rme=({"aria-hidden":e,"aria-label":t="Dash mark",className:n,desc:o,height:r="3",role:a="img",title:i,width:c="7"})=>TH("svg",{"aria-hidden":e,"aria-label":t,className:LH("i i-dashMark",n),focusable:"false",height:r,role:a,viewBox:"0 0 7 3",width:c,xmlns:"http://www.w3.org/2000/svg",children:[i&&Rm("title",{children:i}),o&&Rm("desc",{children:o}),Rm("rect",{height:"3",width:"7"})]}),ame=null,kH=({title:e="DestinationArrow",desc:t="DestinationArrow",width:n="13",height:o="10",className:r,focusable:a="false"})=>(0,s.jsxs)("svg",{className:q()("i i-destinationArrow",r),focusable:a,height:o,viewBox:"0 0 13 10",width:n,children:[(0,s.jsx)("title",{children:e}),(0,s.jsx)("desc",{children:t}),(0,s.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 IH,cme;class lme extends null{render(){return IH("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 dme=null;var qb,EH;const ume=({width:e=20,height:t=20,...n})=>qb(EH,{height:t,width:e,...n,viewBox:"0 0 20 20",children:qb("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"})}),hme=null;var NH,Pm,jH;const mme=({title:e="Vertical Dots",desc:t="Vertical Dots",width:n="4",height:o="24",className:r=null,focusable:a="false"})=>NH("svg",{className:jH("i i-dotsVertical",r),focusable:a,height:o,viewBox:"0 0 4 24",width:n,children:[Pm("title",{children:e}),Pm("desc",{children:t}),Pm("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"})]}),fme=null,wH=({title:e="Download",desc:t="Arrow down with horizontal line beneath it",width:n="16",height:o="19",className:r,focusable:a="false"},i)=>(0,s.jsxs)("svg",{className:q()("i i-download",r),focusable:a,height:o,ref:i,viewBox:"0 0 16 19",width:n,children:[(0,s.jsx)("title",{children:e}),(0,s.jsx)("desc",{children:t}),(0,s.jsx)("rect",{height:"2",rx:"1",width:"16",y:"17"}),(0,s.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,s.jsx)("path",{d:"M7 0h2v12H7z"})]}),AH=(0,u.forwardRef)(wH);var RH,Qi,PH;const pme=({title:e="Download Circle",desc:t="Arrow down with horizontal line beneath it wrapped up in a circle",width:n="51",height:o="51",className:r,focusable:a="false"})=>RH("svg",{className:PH("i i-downloadCircle",r),focusable:a,height:o,viewBox:"0 0 51 51",width:n,children:[Qi("title",{children:e}),Qi("desc",{children:t}),Qi("g",{fill:"none",stroke:"none",children:Qi("g",{fill:"#000",transform:"translate(-695, -227)",children:Qi("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"})})})]}),gme=null;var MH,Yi,OH;const vme=({title:e="More",desc:t="Three dots next to one another",width:n="16",height:o="4",className:r=null,focusable:a="false"})=>MH("svg",{className:OH("i",r),focusable:a,height:o,viewBox:"0 0 16 4",width:n,children:[Yi("title",{children:e}),Yi("desc",{children:t}),Yi("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"}),Yi("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"}),Yi("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"})]}),Cme=null;var BH,Mm,DH;const bme=({title:e="Embed",desc:t="Embed icon",width:n="16",height:o="15",className:r,focusable:a="false"})=>BH("svg",{className:DH("i i-embed",r),focusable:a,height:o,viewBox:"0 0 16 15",width:n,children:[Mm("title",{children:e}),Mm("desc",{children:t}),Mm("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
1510-.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"})]}),xme=null;var FH,ad,HH;const yme=({title:e="Empty folder",desc:t="Empty folder",width:n="46",height:o="46",className:r,focusable:a="false"})=>FH("svg",{className:HH("i i-emptyFolder",r),focusable:a,height:o,viewBox:"0 0 46 46",width:n,children:[ad("title",{children:e}),ad("desc",{children:t}),ad("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"}),ad("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"})]}),Sme=null;var $H,id,_H;const Tme=({title:e="End Slide",desc:t="End Slide",width:n="16",height:o="14",className:r,focusable:a="false"})=>$H("svg",{className:_H("i i-end-slide",r),focusable:a,height:o,viewBox:"0 0 16 14",width:n,children:[id("title",{children:e}),id("desc",{children:t}),id("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"}),id("rect",{fillRule:"evenodd",height:"14",width:"2",x:"14"})]}),Lme=null;var Jb,cd,VH;const kme=({title:e="Envelope",desc:t="Envelope",width:n="17",height:o="14",className:r,focusable:a="false"})=>Jb("svg",{className:VH("i i-envelope",r),focusable:a,height:o,viewBox:"0 0 17 14",width:n,xmlns:"http://www.w3.org/2000/svg",children:[cd("title",{children:e}),cd("desc",{children:t}),Jb("g",{fillRule:"nonzero",children:[cd("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"}),cd("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"})]})]}),Ime=null;var zH,ld,UH;const Eme=({title:e="Error",desc:t="An x with a circle",width:n="50",height:o="50",className:r,focusable:a="false"})=>zH("svg",{className:UH("i i-error",r),focusable:a,height:o,viewBox:"0 0 50 50",width:n,children:[ld("title",{children:e}),ld("desc",{children:t}),ld("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"}),ld("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"})]}),Nme=null;var GH,dd,WH;const jme=({title:e="Error Alert",desc:t="A red circle with a white exclamation point in the middle",width:n="18",height:o="18",className:r,focusable:a="false"})=>GH("svg",{className:WH("i i-errorAlert",r),focusable:a,height:o,viewBox:"0 0 18 18",width:n,children:[dd("title",{children:e}),dd("desc",{children:t}),dd("circle",{cx:"9",cy:"9",r:"9"}),dd("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"})]}),wme=null,ex=({"aria-hidden":e,"aria-label":t="X mark",className:n,dataTestId:o="x-mark",desc:r,height:a="10",overrideStyle:i=!1,role:c="img",title:l,width:d="10"})=>(0,s.jsxs)("svg",{"aria-hidden":e,"aria-label":t,className:q()(n,{"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,s.jsx)("title",{children:l}),r&&(0,s.jsx)("desc",{children:r}),(0,s.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 KH,ud,QH;const Rme=({title:e="Export",desc:t="Export",width:n="12",height:o="15",className:r,focusable:a="false"})=>KH("svg",{className:QH("i i-export",r),focusable:a,height:o,viewBox:"0 0 12 15",width:n,children:[ud("title",{children:e}),ud("desc",{children:t}),ud("polygon",{points:"7,6.4 7,1 5,1 5,6.4 2.3,6.4 6,10.8 9.7,6.4"}),ud("rect",{height:"2",width:"10",x:"1",y:"12"})]}),Pme=null,tx=({"aria-hidden":e,"aria-label":t,className:n,desc:o="",he
151ight:r="50",role:a="img",title:i="",width:c="40"})=>(0,s.jsxs)("svg",{"aria-hidden":e,"aria-label":t,className:n,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,s.jsx)("title",{children:i}),o&&(0,s.jsx)("desc",{children:o}),(0,s.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,s.jsx)("path",{clipRule:"evenodd",d:"M26 0V14H40",fill:"#C7CACC",fillRule:"evenodd"}),(0,s.jsx)("path",{d:"M13.534 22.9863V24.4163H10.245V26.4458H12.984V27.8813H10.245V30.9998H8.375V22.9863H13.534Z",fill:"#414448"}),(0,s.jsx)("path",{d:"M17.533 30.9998H15.663V22.9863H17.533V30.9998Z",fill:"#414448"}),(0,s.jsx)("path",{d:"M21.8805 29.5148H24.8505V30.9998H20.0215V22.9863H21.8805V29.5148Z",fill:"#414448"}),(0,s.jsx)("path",{d:"M31.8846 22.9863V24.4163H28.5956V26.2863H31.1146V27.6613H28.5956V29.5698H31.8846V30.9998H26.7256V22.9863H31.8846Z",fill:"#414448"})]}),YH=({"aria-hidden":e,"aria-label":t,className:n,desc:o="",height:r="50",role:a="img",title:i="",width:c="40"})=>(0,s.jsxs)("svg",{"aria-hidden":e,"aria-label":t,className:n,fill:"none",focu
151sable:"false",height:r,role:a,viewBox:"0 0 40 50",width:c,xmlns:"http://www.w3.org/2000/svg",children:[i&&(0,s.jsx)("title",{children:i}),o&&(0,s.jsx)("desc",{children:o}),(0,s.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,s.jsx)("path",{clipRule:"evenodd",d:"M26 0V14H40",fill:"#96A9E0",fillRule:"evenodd"}),(0,s.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,s.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,s.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.5
151589C30.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"})]}),ZH=({"aria-hidden":e,"aria-label":t,className:n,desc:o="",height:r="50",role:a="img",title:i="",width:c="40"})=>(0,s.jsxs)("svg",{"aria-hidden":e,"aria-label":t,className:n,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,s.jsx)("title",{children:i}),o&&(0,s.jsx)("desc",{children:o}),(0,s.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,s.jsx)("path",{clipRule:"evenodd",d:"M26 0V14H40",fill:"#EDADA9",fillRule:"evenodd"}),(0,s.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,s.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,s.jsx)("path",{d:"M31.3465 22.9863V24.4163H28.0575V26.4458H30.7965V27.8813H28.0575V30.9998H26.1875V22.9863H31.3465Z",fill:"#771D18"})]}),XH=({"aria-hidden":e,"aria-label":t,className:n,desc:o="",height:r="50",role:a="img",title:i="",width:c="40"})=>(0,s.jsxs)("svg",{"aria-hidden":e,"aria-label":t,className:n,fill:"none",focu
151sable:"false",height:r,role:a,viewBox:"0 0 40 50",width:c,xmlns:"http://www.w3.org/2000/svg",children:[i&&(0,s.jsx)("title",{children:i}),o&&(0,s.jsx)("desc",{children:o}),(0,s.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,s.jsx)("path",{clipRule:"evenodd",d:"M26 0V14H40",fill:"#F8BFA6",fillRule:"evenodd"}),(0,s.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,s.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,s.jsx)("path",{d:"M31.2008 22.9863V24.4603H28.9458V30.9998H27.0868V24.4603H24.8318V22.9863H31.2008Z",fill:"#7C2B0E"})]}),qH=({"aria-hidden":e,"aria-label":t,className:n,desc:o="",height:r="50",role:a="img",title:i="",width:c="40"})=>(0,s.jsxs)("svg",{"aria-hidden":e,"aria-label":t,className:n,fill:"none",focu
151sable:"false",height:r,role:a,viewBox:"0 0 40 50",width:c,xmlns:"http://www.w3.org/2000/svg",children:[i&&(0,s.jsx)("title",{children:i}),o&&(0,s.jsx)("desc",{children:o}),(0,s.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,s.jsx)("path",{clipRule:"evenodd",d:"M26 0V14H40",fill:"#ABDBF3",fillRule:"evenodd"}),(0,s.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.
1516738ZM11.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,s.jsx)("path",{d:"M23.6162 22.9865V24.4605H21.3612V31H19.5022V24.4605H17.2472V22.9865H23.6162Z",fill:"#144E6C"}),(0,s.jsx)("path",{d:"M30.5411 22.9865V24.4165H27.2521V26.446H29.9911V27.8815H27.2521V31H25.3821V22.9865H30.5411Z",fill:"#144E6C"})]}),JH=({"aria-hidden":e,"aria-label":t,className:n,desc:o="",height:r="50",role:a="img",title:i="",width:c="40"})=>(0,s.jsxs)("svg",{"aria-hidden":e,"aria-label":t,className:n,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,s.jsx)("title",{children:i}),o&&(0,s.jsx)("desc",{children:o}),(0,s.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,s.jsx)("path",{clipRule:"evenodd",d:"M26 0V14H40",fill:"#AFD1AE",fillRule:"evenodd"}),(0,s.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,s.jsx)("path",{d:"M20.6017 29.5149H23.5717V30.9999H18.7427V22.9864H20.6017V29.5149Z",fill:"#265026"}),(0,s.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"})]}
151),e$=({"aria-hidden":e,"aria-label":t,className:n,desc:o="",height:r="50",role:a="img",title:i="",width:c="40"})=>(0,s.jsxs)("svg",{"aria-hidden":e,"aria-label":t,className:n,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,s.jsx)("title",{children:i}),o&&(0,s.jsx)("desc",{children:o}),(0,s.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,s.jsx)("path",{clipRule:"evenodd",d:"M26 0V14H40",fill:"#ABDBF3",fillRule:"evenodd"}),(0,s.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,s.jsx)("path",{d:"M20.7826 30.9998H18.9126V22.9863H20.7826V30.9998Z",fill:"#124F6E"}),(0,s.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"})]});var t$,Om;const _me=({"aria-hidden":e,"aria-label":t,className:n,desc:o,height:r="16",role:a="img",title:i,width:c="16"})=>t$("svg",{"aria-hidden":e,"aria-label":t,className:n,focusable:"false",height:r,role:a,viewBox:"0 0 16 16",width:c,xmlns:"http://www.w3.org/2000/svg",children:[i&&Om("title",{children:i}),o&&Om("desc",{children:o}),Om("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"})]}),Vme=null;var n$,Bm,s$;const zme=({title:e="Hidden",desc:t="Eye crossed out",width:n="16",height:o="14",className:r=null,focusable:a="false"})=>n$("svg",{className:s$("i i-hidden",r),focusable:a,height:o,viewBox:"0 0 16 14",width:n,children:[Bm("title",{children:e}),Bm("desc",{children:t}),Bm("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"})]}),Ume=null;var o$,hd,r$;const Gme=({title:e="Label Set",desc:t="Label Set",width:n="17",height:o="17",className:r,focusable:a="false"})=>o$("svg",{className:r$("i i-labelSet",r),focusable:a,height:o,viewBox:"0 0 18 18",width:n,children:[hd("title",{children:e}),hd("desc",{children:t}),hd("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"}),hd("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"})]}),Wme=null;var a$,Dm;const Kme=({"aria-hidden":e,"aria-label":t,className:n,desc:o,height:r="15",role:a="img",title:i,width:c="16"})=>a$("svg",{"aria-hidden":e,"aria-label":t,className:n,focusable:"false",height:r,role:a,viewBox:"0 0 16 15",width:c,xmlns:"http://www.w3.org/2000/svg",children:[i&&Dm("title",{children:i}),o&&Dm("desc",{children:o}),Dm("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:"
151currentColor",fillRule:"evenodd"})]}),Qme=null;var i$,Fm,c$;const Yme=({title:e="Matching",desc:t="Two rows of stacked squares",width:n="15",height:o="15",className:r,focusable:a="false"})=>i$("svg",{className:c$("i i-matching",r),focusable:a,height:o,viewBox:"0 0 15 15",width:n,children:[Fm("title",{children:e}),Fm("desc",{children:t}),Fm("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"})]}),Zme=null;var l$,md,d$;const Xme=({title:e="Multiple Choice",desc:t="Stacked circles to the left of stacked lines",width:n="16",height:o="16",className:r,focusable:a="false"})=>l$("svg",{className:d$("i i-multipleChoice",r),focusable:a,height:o,viewBox:"0 0 16 16",width:n,children:[md("title",{children:e}),md("desc",{children:t}),md("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"}),md("circle",{cx:"7.904",cy:"7.904",r:"1.904"})]}),qme=null;var u$,Hm,h$;const Jme=({title:e="Multiple Response",desc:t="A box with a checkmark in it",width:n="16",height:o="16",className:r,focusable:a="false"})=>u$("svg",{className:h$("i i-multipleResponse",r),focusable:a,height:o,viewBox:"0 0 16 16",width:n,children:[Hm("title",{children:e}),Hm("desc",{children:t}),Hm("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"})]}),efe=null;var m$,fd,f$;const tfe=({title:e="New Slide",desc:t="New Slide",width:n="16",height:o="16",className:r,focusable:a="false"})=>m$("svg",{className:f$("i i-new-slide",r),focusable:a,height:o,viewBox:"0 0 16 16",width:n,children:[fd("title",{children:e}),fd("desc",{children:t}),fd("path",{d:"M7,12h2V9h3V7H9V4H7v3H4v2h3V12z",fillRule:"evenodd"}),fd("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"})]}),nfe=null;var p$,$m,g$;const sfe=({title:e="Next Slide",desc:t="Next Slide",width:n="16",height:o="13.4",className:r,focusable:a="false"})=>p$("svg",{className:g$("i i-next-slide",r),focusable:a,height:o,viewBox:"0 0 16 13.4",width:n,children:[$m("title",{children:e}),$m("desc",{children:t}),$m("path",{d:"M9.3,0L7.9,1.4l4.3,4.3H0v2h12.2L7.9,12l1.4,1.4L16,6.7L9.3,0",fillRule:"evenodd"})]}),ofe=null;var v$,Zi,C$;const rfe=({title:e="Hide",desc:t="Shape of an eye with a stroke through it",width:n="20",height:o="16",className:r,focusable:a="false"})=>v$("svg",{className:C$("i",r),focusable:a,height:o,viewBox:"0 0 20 16",width:n,children:[Zi("title",{children:e}),Zi("desc",{children:t}),Zi("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"}),Zi("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"}),Zi("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"})]}),afe=null;var b$,_m,x$;const ife=({title:e="Edit",desc:t="Pencil",width:n="11",height:o="11",className:r,focusable:a="false"})=>b$("svg",{className:x$("i i-pencil",r),focusable:a,height:o,viewBox:"0 0 10 10",width:n,children:[_m("title",{children:e}),_m("desc",{children:t}),_m("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"})]}),cfe=null;var y$,Vm;const lfe=({"aria-hidden":e,"aria-label":t,className:n,desc:o,height:r="16",role:a="img",title:i,width:c="16"})=>y$("svg",{"aria-hidden":e,"aria-label":t,className:n,fill:"none",focu
151sable:"false",height:r,role:a,viewBox:"0 0 16 16",width:c,xmlns:"http://www.w3.org/2000/svg",children:[i&&Vm("title",{children:i}),o&&Vm("desc",{children:o}),Vm("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"})]}),dfe=null;class zm extends u.Component{constructor(...t){super(...t),this.maskId=`person-unknown-mask-${jr()()}`,this.pathId=`person-unknown-path-${jr()()}`}render(){const{title:t="Person Unknown",desc:n,width:o="38",height:r="38",className:a,decorative:i,focusable:c="false"}=this.props;return(0,s.jsxs)("svg",{"aria-hidden":i,className:q()("i i-person-unknown",a),focusable:c,height:r,viewBox:"0 0 38 38",width:o,children:[t&&(0,s.jsx)("title",{children:t}),n&&(0,s.jsx)("desc",{children:n}),(0,s.jsx)("defs",{children:(0,s.jsx)("circle",{cx:"19",cy:"19",id:this.pathId,r:"19"})}),(0,s.jsxs)("g",{fill:"none",fillRule:"evenodd",stroke:"none",strokeWidth:"1",children:[(0,s.jsx)("mask",{fill:"#fff",id:this.maskId,children:(0,s.jsx)("use",{href:`#${this.pathId}`})}),(0,s.jsx)("use",{fill:"#D8D8D8",href:`#${this.pathId}`}),(0,s.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 S$(e){return(0,s.jsxs)(kn,{viewBox:"0 0 16 16",...e,children:[(0,s.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,s.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,s.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 T$,Um;const ufe=({"aria-hidden":e,"aria-label":t,className:n,desc:o,height:r="15",role:a="img",title:i,width:c="16"})=>T$("svg",{"aria-hidden":e,"aria-label":t,className:n,focusable:"false",height:r,role:a,viewBox:"0 0 16 15",width:c,xmlns:"http://www.w3.org/2000/svg",children:[i&&Um("title",{children:i}),o&&Um("desc",{children:o}),Um("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"})]}),hfe=null;function L$(e){return(0,s.jsx)(kn,{viewBox:"0 0 23 17",...e,children:(0,s.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 nx,k$;
151const mfe=({width:e="16",height:t="16",className:n})=>nx("svg",{"aria-hidden":"true",className:k$("i i-search",n),fill:"currentColor",focusable:"false",height:t,viewBox:"0 0 15.6 14.7",width:e,children:nx("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"})}),ffe=null;var sx,ka,I$;const pfe=({title:e="Spinner",desc:t="Hollow circle fading from transparent to gray",width:n="21",height:o="20",className:r,focusable:a="false"})=>sx("svg",{className:I$("i i-spinner",r),focusable:a,height:o,viewBox:"0 0 21 20",width:n,children:[ka("title",{children:e}),ka("desc",{children:t}),ka("defs",{children:sx("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:[ka("stop",{offset:"0%",stopColor:"#C8C8C8",stopOpacity:"0"}),ka("stop",{offset:"100%",stopColor:"#979797"})]})}),ka("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)"})]}),gfe=null;function E$(e){return(0,s.jsxs)(kn,{viewBox:"0 0 15 16",...e,children:[(0,s.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,s.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.23974
15102,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 N$,Gm,j$;const vfe=({title:e="Remove",desc:t="Trash can",width:n="10",height:o="13",className:r=null,focusable:a="false"})=>N$("svg",{className:j$("i i-trash",r),focusable:a,height:o,viewBox:"0 0 10 13",width:n,children:[Gm("title",{children:e}),Gm("desc",{children:t}),Gm("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"})]}),Cfe=null;var w$,Ia;const bfe=({"aria-hidden":e,"aria-label":t,className:n,desc:o,height:r="16",role:a="img",title:i,width:c="14"})=>w$("svg",{"aria-hidden":e,"aria-label":t,className:n,fill:"none",focu
151sable:"false",height:r,role:a,viewBox:"0 0 14 16",width:c,xmlns:"http://www.w3.org/2000/svg",children:[i&&Ia("title",{children:i}),o&&Ia("desc",{children:o}),Ia("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"}),Ia("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"}),Ia("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"}),Ia("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"})]}),xfe=null;var A$,pd,R$;const yfe=({title:e="Upload",desc:t="Upload icon",width:n="15",height:o="15",className:r="",focusable:a="false"})=>A$("svg",{className:R$("i",r),focusable:a,height:o,viewBox:"0 0 15 15",width:n,children:[pd("title",{children:e}),pd("desc",{children:t}),pd("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"}),pd("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"})]}),Sfe=null;var P$,Xi;const Tfe=({"aria-hidden":e,"aria-label":t,className:n,desc:o,height:r="14",role:a="img",title:i,width:c="14"})=>P$("svg",{"aria-hidden":e,"aria-label":t,className:n,fill:"none",focu
151sable:"false",height:r,role:a,viewBox:"0 0 14 14",width:c,xmlns:"http://www.w3.org/2000/svg",children:[i&&Xi("title",{children:i}),o&&Xi("desc",{children:o}),Xi("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"}),Xi("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"}),Xi("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"})]}),Lfe=null;var M$,gd,O$;const kfe=({title:e="UploadXml",desc:t="UploadXml",width:n="18",height:o="21",className:r,focusable:a="false"})=>M$("svg",{className:O$("i i-uploadXml",r),focusable:a,height:o,viewBox:"0 0 18 21",width:n,children:[gd("title",{children:e}),gd("desc",{children:t}),gd("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"}),gd("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"})]}),Ife=null;function B$(e){return(0,s.jsx)(kn,{viewBox:"0 0 16 12",...e,children:(0,s.jsx)("g",{transform:"translate(-1 -2)",children:(0,s.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 ox,vd,D$;const Efe=({title:e="Visible",desc:t="Eye",width:n="16",height:o="12",className:r=null,focusable:a="false"})=>ox("svg",{className:D$("i i-visible",r),focusable:a,height:o,viewBox:"0 0 16 12",width:n,children:[vd("title",{children:e}),vd("desc",{children:t}),ox("g",{children:[vd("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"}),vd("path",{d:"M8 4a2 2 0 1 1 .001 3.999A2 2 0 0 1 8 4"})]})]}),Nfe=null,F$=({"aria-hidden":e,"aria-label":t,className:n,desc:o="",height:r="20",role:a="img",title:i="",style:c,width:l="20"})=>(0,s.jsxs)("svg",{"aria-hidden":e,"aria-label":t,className:q()("i i-xMarkFilled",n),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,s.jsx)("title",{children:i}),o&&(0,s.jsx)("desc",{children:o}),(0,s.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"})]});var H$=v(78453),$$=v.n(H$),_$=v(42997),V$=v.n(_$);const z$=Mt()($$()({}),B1()(["first_name","last_name"]),na()(" "),V$()),U$=({className:e,decorative:t,size:n,...o})=>{const r=Vs()(["avatars","medium"],o),a=t?"":z$(o)||"Unknown User";return r?(0,s.jsx)("img",{alt:a,className:e||"user-avatar",src:r,style:{height:n,width:n}}):(0,s.jsx)(zm,{decorative:t,height:n,title:a,width:n})},G$=`${Ne("CDN_URI")}/assets/rise/assets/trophy.svg`,Cd=_("cover"),W$=tH,K$=U$;function Afe(){const{certificateDownload:e,riseComCurrentUser:t}=ie(),n=xe(),o=Qw(),a=Uh()?.quizPassed??!0;return!(o&&a&&!iv())||window.viewType==="preview"?null:(0,s.jsxs)("div",{className:Cd("completed-info"),children:[(0,s.jsxs)("div",{className:Cd("completed-info-avatar"),children:[(0,s.jsx)(K$,{...t??{},decorative:!0}),(0,s.jsx)("img",{alt:"",className:Cd("completed-info-trophy"),src:G$})]}),(0,s.jsxs)("div",{className:Cd("completed-info-label"),children:[(0,s.jsx)("span",{"aria-hidden":"true",children:n?.coverCompleted||"Completed"}),(0,s.jsx)("span",{className:"visually-hidden",children:n?.a11yCoverCourseCompleted||"Course Completed"})]}),e&&(0,s.jsx)(W$,{})]})}const Wm=_("cover");function Q$(e,t,n){return e===1?t:n}function Y$(){const e=i2(),t=xe(),n=Q$(e,t?.coverLesson||"Lesson",t?.coverLessons||"Lessons");return(0,s.jsxs)("li",{className:Wm("num-lessons"),role:"listitem",children:[(0,s.jsx)("span",{className:Wm("num-lessons-value"),children:e}),"\xA0",(0,s.jsx)("span",{className:Wm("num-lessons-units"),children:n})]})}var Z$=v(1841),ms=v.n(Z$);const X$=36e5,Km=_("cover");function q$(e){return Math.round(10*e)/10}function rx(e,t,n){return e===1?t:n}function J$(){const{showTimeToComplete:e,timeToComplete:t}=ie(),n=xe();if(!e)return null;const o=Number(t)>=X$,r=o?q$(ms().duration(t).asHours()):ms().duration(t).asMinutes(),a=o?rx(r,n?.coverHour||"Hour",n?.coverHours||"Hours"):rx(r,n?.coverMinute||"Minute",n?.coverMinutes||"Minutes");return(0,s.jsxs)("li",{className:Km("time-to-complete"),role:"listitem",children:[(0,s.jsx)("span",{className:Km("time-to-complete-value"),children:r}),"\xA0",(0,s.jsx)("span",{className:Km("time-to-complete-units"),children:a})]})}const Qm=_("cover");function ax(){const e=xe();return null}const Ym=e=>{if(!e)return"";const t=ms()(e),n=ms()(),o=ms()(n).add(24,"hours");return t.isBefore(n)?"Overdue":t.isBefore(o)?`Due in ${n.to(t,!0)}`:`Due ${t.format("MMM D")}`},e_=e=>ms()(e).isSameOrBefore(ms()().add(3,"d"),"days"),t_=_("cover");function n_(e){return typeof e=="object"&&e!=null}function s_(e){return e==null||typeof e=="string"||typeof e=="number"||e instanceof Date}function o_(e){if(!n_(e))return;const t=e.dueAt;return s_(t)?t:void 0}function Rfe(){const e=Sr(),t=o_(e),n=mb(e?.themeId??e?.theme?.themeId),o=Iw(),r=Uh(),a=r==null||r.quizPassed||r.outOfAttempts,i=e_(t),c=n===se.RISE_CLASSIC?i?"brand--background":"brand--color":"",l=t_("due-date",{urgent:i}).mix(c);return!t||o&&a?null:(0,s.jsx)("div",{className:l,children:Ym(t)})}const r_=e=>{const t=e.indexOf("-");return t===-1?e:e.slice(0,t)},Pfe=(e,t)=>
151{const n=r_(e);return t.find(({iso639Code:o})=>o===e)||t.find(({iso639Code:o})=>o===n)||t.find(({defaultId:o,defaultSet:r})=>r&&o===1)},Ea=({percent:e,label:t,isRTL:n})=>{if(t.includes("%")){const o=n?`%${e}`:`${e}%`;return t.replace("%",o)}return`${e} ${t}`},ix=({failed:e,complete:t})=>{const n=xe();return(0,s.jsxs)("span",{className:"visually-hidden-always",children:[e?n?.a11yCoverRequirementFailed||"Requirement failed":t?n?.a11yCoverRequirementComplete||"Requirement complete":n?.a11yCoverRequirementIncomplete||"Requirement incomplete",": "]})},fs=_("cover");function Ofe(){const e=ie(),t=xe(),{trackingCompletionPercentage:n,trackingQuizId:o}=e;return n==null&&!o?null:(0,s.jsxs)("section",{className:fs("requirements-section"),children:[(0,s.jsx)("h2",{className:fs("requirements-title"),children:t?.coverCourseRequirements||"Course Requirements"}),(0,s.jsxs)("ul",{className:fs("requirements-list"),children:[(0,s.jsx)(a_,{}),(0,s.jsx)(c_,{})]})]})}function a_(){const{trackingCompletionPercentage:e}=ie(),t=i2(),n=ha(),o=xe();if(e==null)return null;const r=Math.ceil(e/100*t),a=r===t,i=n!=null&&n>=e,c=i?_F:VF;return(0,s.jsxs)("li",{className:fs("lesson-requirement"),role:"listitem",children:[(0,s.jsx)(c,{"aria-hidden":"true",className:fs("lesson-requirement-icon",{complete:i}).toString()}),(0,s.jsxs)("span",{className:fs("lesson-requirement-text"),children:[(0,s.jsx)(ix,{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 i_={passed:GF,failed:UF,requirement:WF};function c_(){const e=xe(),t=kw(),n=Uh(),o=as(),r=ht(t?.title),a=t?.settings?.passingScore;if(!r||!n)return null;const{outOfAttempts:i,quizPassed:c}=n,l=!c&&i;let d="requirement";c?d="passed":l&&(d="failed");const h=i_[d],m=a!=null?Ea({percent:Number(a),label:e?.coverQuizPercentOrHigher||"% or higher",isRTL:o}):null;return(0,s.jsxs)("li",{className:fs("quiz-requirement"),role:"listitem",children:[(0,s.jsx)(h,{"aria-hidden":"true",className:fs("quiz-requirement-icon",{type:d}).toString()}),(0,s.jsxs)("span",{className:fs("quiz-requirement-text"),children:[(0,s.jsx)(ix,{complete:c,failed:l}),r,a!=null&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("span",{"aria-hidden":"true",className:fs("quiz-requirement-seperator"),children:"\xA0|\xA0"}),e?.coverQuizScoreOf||"Score of"," ",m]}),l&&(0,s.jsx)("div",{className:fs("quiz-requirement-no-attempts"),children:e?.coverNoAttemptsRemaining||"No attempts remaining"})]})]})}function Zm(e,t){const n=(0,u.useMemo)(()=>matchMedia(`(${e}: ${t*.0625}em)`),[e,t]),[o,r]=(0,u.useState)(n.matches);return(0,u.useEffect)(()=>{const a=n.addEventListener??n.addListener,i=n.removeEventListener??n.removeListener;return a.call(n,"change",c),()=>i.call(n,"change",c);function c(){r(n.matches)}},[n]),o}const l_="matches";function d_(e,t,n,o="withPxToEmMedia"){return r=>{function a(i){const c=Zm(e,t);return(0,s.jsx)(r,{...i,[n??l_]:c})}return a.displayName=`${o}(${r.displayName||r.name})`,a}}function $t(e){return Zm("max-width",e-1)}function Bfe(e){return Zm("min-width",e)}function u_(e,t,n){return d_("min-width",e,t,n)}const qi=ns()("partner-content-course-author__"),h_=({partnerContentAuthors:e,darkText:t,isImage:n,learn:o,lesson:r,isOnePage:a,selectedContentId:i})=>{const c=Tr()(Je()("id",i),e),l=Vs()(["data","authors"],c),h=(r?l:e).filter(g=>g.name),m=q()(qi("author-container"),{[qi("author-container-padding-top")]:t}),f=q()({[qi("gray-text")]:!o&&!a}),p=q()(qi("author-image")),C=g=>`url(${Hi({width:"76",height:"76",imageKey:g.image})})`;return(0,s.jsxs)("section",{children:[(0,s.jsx)("h2",{className:"visually-hidden",children:"Authors"}),(0,s.jsx)("ol",{className:m,"data-testid":"partner-content-course-author-container",role:"list",children:h.map(g=>(0,s.jsxs)("li",{className:qi("author"),"data-testid":"partner-content-course-author",role:"listitem",children:[(0,s.jsx)("div",{"aria-hidden":"true",className:p,"data-testid":"partner-content-course-author-image",disabled:n,style:{backgroundImage:C(g)}}),(0,s.jsx)("span",{className:f,children:g.name})]},g.name))})]})},Na=_("cover"),Ffe=()=>{const e=Oh();if(e==null)return null;const{avatar:t,authorName:n,title:o}=e;return(0,s.jsxs)("div",{className:Na("author-with-title"),children:[(0,s.jsx)(cx,{avatar:t}),(0,s.jsxs)("div",{children:[(0,s.jsx)("div",{className:Na("author-name"),children:n}),(0,s.jsx)("div",{className:Na("author-title"),children:o})]})]})},cx=({avatar:e})=>{const t=Na("header-content-authors-avatar");return e?(0,s.jsx)("div",{className:t,"data-testid":"cover-header-content-authors-avatar",style:{backgroundImage:`url(${mt(e)})`}}):(0,s.jsx)("div",{className:t,"data-testid":"cover-header-content-authors-avatar",children:(0,s.jsx)(zm,{decorative:!0})})},m_=({className:e})=>{const{partnerContentId:t,selectedAuthorId:n,theme:o,themeId:r}=ie(),{coverPageType:a}=o??{},{authorName:i,avatar:c}=Oh()??{},l=xe(),d=PD(),h=!!t&&d!=null,f=$t(768)&&iw(r,a),p=a===ue.LEFT_OVERLAY||a===ue.CENTERED_OVERLAY||f;if(n==="none")return null;const C=i||"Unknown User",g=Na("header-content-authors").mix(e),x=Na("header-content-authors-name");return h?(0,s.jsx)("div",{className:g,"data-testid":"cover-authors",children:(0,s.jsx)(f_,{isImage:p,learn:!0,partnerContentAuthors:d})}):(0,s.jsxs)("div",{className:g,"data-testid":"cover-authors",children:[(0,s.jsx)(cx,{avatar:c}),(0,s.jsxs)("div",{className:x,"data-testid":"cover-header-content-authors-name",children:[(0,s.jsx)("span",{className:"visually-hidden-alw
151ays",children:l?.a11yAuthorPrefix}),(0,s.jsx)("span",{children:C})]})]})},f_=h_,js=m_,p_=_("cover");function g_({className:e="",type:t,...n}){const o=Ct(),r=q()(p_("details-content-heading",{type:t}).toString(),e,{"brand--ui":o===se.RISE_CLASSIC});return(0,s.jsx)("header",{...n,className:r})}const v_=_("cover");function C_({children:e,title:t,type:n}){const o=ie(),{description:r,media:a,partnerContentId:i}=o??{},c=!!i,d=(a&&"image"in a?a.image?.key:null)!=null,m=n==="outline"?r?!d&&!c?"outline-no-logo":c&&!d?"outline-has-partner-content":c&&d?"outline-has-pc-and-logo":"outline":"outline-no-description":n;return(0,s.jsxs)("section",{className:v_("details-content-section",{type:m}),children:[t&&(0,s.jsx)(g_,{type:n,children:(0,s.jsx)("h2",{children:t})}),e]})}const b_=_("cover"),x_=({children:e,type:t})=>(0,s.jsx)("section",{className:b_("details-content-section",{type:t}),children:e});function bd(e){return Ct()===se.HORIZON?(0,s.jsx)(C_,{...e}):(0,s.jsx)(x_,{...e})}const Xm=e=>$n(e)===Le.LIGHT;var Hfe;const hn=ns()("partner-content-book-info__"),lx=e=>{const{authors:t,backgroundColor:n,bookImage:o,bookTitle:r,buyLink:a,block:i,trackingInfo:c}=e,d=$e()?.publishedAt,h=rb(),m=t.filter(E=>!zt()(E.name)),f=St()(E=>E.name,m),p=f.length>1?na()(" & ",f):f[0],C=p.slice(-1)==="s"?"":"s",g=Xm(n),x=q()({[hn("book-image-block")]:i&&!g},{[hn("book-image-block")&&hn("dark-theme-book-image")]:i&&g},{[hn("book-image-course")]:!i}),b=hn(i?"flex-block":"flex-course"),y=hn(i?"image-container-block":"image-container-course"),L=q()(hn("small-text"),{[hn("dark-theme")]:g}),S=q()(hn("black-text"),{[hn("dark-theme")]:g}),T=q()(hn("button"),{[hn("dark-theme-button")]:g}),k=Hi({height:"210",width:"140",imageKey:o}),I=(0,u.useCallback)(()=>{},[d,h,c]);return(0,s.jsxs)("section",{className:b,children:[(0,s.jsx)("h2",{className:"visually-hidden",children:"Book Info"}),(0,s.jsx)("div",{"aria-hidden":"true",className:y,children:o?(0,s.jsx)("img",{alt:"",className:x,src:k}):(0,s.jsx)("div",{className:x})}),(0,s.jsxs)("div",{className:hn("text-container"),children:[(0,s.jsxs)("p",{className:L,children:["From ",p,"'",C]}),(0,s.jsx)("p",{className:S,children:r}),(0,s.jsx)("a",{className:T,href:a,onClick:I,rel:"noopener noreferrer",target:"_blank",children:"Buy the book"})]})]})};var _fe;const Un=ns()("partner-content-partner-info__"),dx=({backgroundColor:e,block:t,link:n,trackingInfo:o})=>{const a=$e()?.publishedAt,i=rb(),c=t?Yj():Zj(),l=Un(t?"nbic-logo-light-bulb":"nbic-logo"),d=Un(t?"block-logo-container":"logo-container"),h=Xm(e),m=q()(Un("small-text"),{[Un("dark-theme")]:h}),f=q()(Un("black-text"),{[Un("dark-theme")]:h}),p=q()(Un("button"),{[Un("dark-theme-button")]:h}),C=(0,u.useCallback)(()=>{},[a,i,o]);return(0,s.jsxs)("section",{className:Un("flex"),children:[(0,s.jsx)("h2",{className:"visually-hidden",children:"Partner Info"}),(0,s.jsx)("div",{"aria-hidden":"true",className:d,children:(0,s.jsx)("img",{alt:"",className:l,src:c})}),(0,s.jsxs)("div",{className:Un("text-container"),children:[(0,s.jsx)("p",{className:m,children:"In partnership with"}),(0,s.jsx)("p",{className:f,children:"Next Big Idea Club"}),(0,s.jsx)("a",{className:p,href:n,onClick:C,rel:"noopener noreferrer",target:"_blank",children:"Learn more"})]})]})},ja=ns()("partner-content-author-card__"),ux=e=>{const{partnerContent:t}=e,n=$e(),{id:o,tenantId:r}=n??{},{data:a,type:i}=t,{authors:c,bookImage:l,bookTitle:d,buyLink:h,internalId:m,nbicLink:f}=a,p=c.filter(y=>y.name),C={courseId:o,partnerContentId:t.id,partnerContentInternalId:m,tenantId:r,contentSubtype:i},g=q()(ja("flex"),ja("author-container")),x=y=>Hi({width:"122",height:"122",imageKey:y}),b=(y,L)=>(0,s.jsx)("div",{"aria-hidden":"true",className:ja("image-container"),children:y?(0,s.jsx)("img",{alt:L,className:ja("author-image"),src:x(y)}):(0,s.jsx)("div",{className:ja("author-image")})});return(0,s.jsxs)("ol",{className:"partner-content-author-card","data-testid":"partner-content-author-card",role:"list",children:[(0,s.jsx)("li",{role:"listitem",children:(0,s.jsxs)("section",{children:[(0,s.jsx)("h2",{className:"visually-hidden",children:"Authors"}),p.map(y=>(0,s.jsxs)("li",{className:g,children:[b(y.image,y.name),(0,s.jsx)("p",{className:ja("author-name-text"),children:y.name})]},y.name))]})}),(0,s.jsx)("li",{role:"listitem",children:(0,s.jsx)(lx,{authors:c,bookImage:l,bookTitle:d,buyLink:h,trackingInfo:C})}),(0,s.jsx)("li",{role:"listitem",children:(0,s.jsx)(dx,{link:f,trackingInfo:C})})]})},y_=_("cover");function S_({hasLogo:e}){const t=zi();if(!t)return null;const n=y_("details-content-aside",{logo:e});return(0,s.jsx)("div",{className:n,children:(0,s.jsx)(bd,{type:"partner-content",children:(0,s.jsx)(ux,{partnerContent:t})})})}const T_=_("cover"),L_=({coursePartnerContent:e})=>(0,s.jsx)(bd,{type:"partner-content",children:(0,s.jsx)(ux,{partnerContent:e})}),k_=({hasLogo:e})=>{const t=zi(),n=t!=null,o=T_("details-content-aside",{logo:e});return(0,s.jsxs)("div",{className:o,children:[!1,t&&(0,s.jsx)(L_,{c
151oursePartnerContent:t}),!1,!1]})},I_=e=>Ct()===se.HORIZON?(0,s.jsx)(S_,{...e}):(0,s.jsx)(k_,{...e});function Gfe(e){const t=new Map;return n=>{if(t.has(n))return t.get(n);const o=e(n);return t.set(n,o),o}}function xd(e,t={}){let n;return()=>{if(n==null){const o=e();n=o,t.clearOnReject&&o.catch(()=>{n===o&&(n=void 0)})}return n}}function E_(e,t={}){const n=new WeakMap;return o=>{const r=n.get(o);if(r!=null)return r;const a=e(o);return n.set(o,a),t.clearOnReject&&a.catch(()=>{n.get(o)===a&&n.delete(o)}),a}}const hx=xd(async()=>(await v.e("math").then(v.bind(v,8660))).browserAdaptor(),{clearOnReject:!0}),mx=xd(async()=>{const[{TeX:e},{AllPackages:t}]=await Promise.all([v.e("math").then(v.t.bind(v,91036,23)),v.e("math").then(v.bind(v,15801))]);return new e({packages:t})}),fx=xd(async()=>{const e=await v.e("math").then(v.t.bind(v,56260,23));return new e.SVG({fontCache:"local"})},{clearOnReject:!0}),px=xd(async()=>{const[e,t,n,{RegisterHTMLHandler:o},{mathjax:r}]=await Promise.all([hx(),mx(),fx(),v.e("math").then(v.bind(v,33805)),v.e("math").then(v.bind(v,13067))]);return o(e),r.document(document,{InputJax:t,OutputJax:n})},{clearOnReject:!0}),N_=E_(async e=>{const t=new CSSStyleSheet;e.adoptedStyleSheets.push(t);const[n,o]=await Promise.all([fx(),px()]),r=n.styleSheet(o);r instanceof HTMLStyleElement&&await t.replace(r.innerText)},{clearOnReject:!0});class j_ extends HTMLElement{static observedAttributes=["long-description","short-description","tex"];_ready;_anchor=this;_renderController;constructor(){super(),this._ready=N_(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,[n,o,r]=await Promise.all([px(),hx(),mx(),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=n.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=n.convert(a),f=o.firstChild(m);h=document.evaluate("//@data-mjx-error",f,null,XPathResult.STRING_TYPE).stringValue??"An error occured"}this.dispatchEvent(new w_("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(n=>(n?.length??0)>0).join(` 152 153`);this.firstElementChild.ariaLabel=t.trim().length===0?null:t}}customElements.define("rise-math",j_);class w_ extends CustomEvent{}var ps=v(63657);function qm(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 n=t.match(/^<[^>]+data-editor-id=["']([^"']+)["'][^>]*>/);if(n){const o=n[1],r=t.match(/^<[^>]*>(.*)<\/[^>]*>$/s),a=r?r[1]:t;return{editorId:o,value:typeof e=="string"?a:e}}return{value:e}}const gx=(e="")=>e.split(".").slice(-2).join("."),vx=De()(gx,Ne),A_=e=>e.includes("#/lessons/"),Gn=e=>{if(!e||R_(e)||A_(e))return!1;e.slice(0,2)==="//"&&(e=`https:${e}`);try{const{hostname:t}=new URL(e),n=gx(t);return n!==vx("ARTICULATE_DOMAIN")&&n!==vx("RISE_DOMAIN")}catch{return!1}},R_=e=>e?e.slice(0,7)==="mailto:":!1;function Ji(e,t){const n=[];if(e){let o=e.parentElement;for(;o&&(t?.limit==null||n.length<t.limit);){if(o===document.body){n.push(window);break}const r=window.getComputedStyle(o);(r.overflowX==="auto"||r.overflowX==="scroll"||r.overflowY==="auto"||r.overflowY==="scroll")&&n.push(o),o=o.parentElement}}return n}function Cx(e){return Ji(e,{limit:1})[0]??null}var P_;function Jm(){return document.getElementById("page-wrap")}const Wfe=e=>{const t=e.value.length;e.focus(),e.setSelectionRange(t,t)},Kfe=e=>{const t=P_(["current","editor"],e);if(!t)return null;const n=t.value.length;return t.focus(),t.setSelectionRange(n,n),e};function ef(e,t){const n=e.getBoundingClientRect(),o=window.innerHeight||document.documentElement.clientHeight,r=window.innerWidth||document.documentElement.clientWidth;if(t==="start")return n.top>=0;if(t==="center"){if(n.height>o)return n.top<=0&&n.bottom>=o;const a=o/2,i=n.top+n.height/2,c=o*.25;return Math.abs(a-i)<c}return t==="end"?n.bottom<=o:n.top>=0&&n.left>=0&&n.bottom<=o&&n.right<=r}function M_(e,{behavior:t="smooth",offsetTop:n=0}={}){const o=Cx(e);if(!o||!("getBoundingClientRect"in o)){const r=e.getBoundingClientRect().top+window.scrollY;window.scrollTo({top:Math.max(0,r-n),behavior:t})}else{const r=o.getBoundingClientRect().top,a=e.getBoundingClientRect().top-r,i=Math.max(0,o.scrollTop+a-n);o.scrollTo({top:i,behavior:t})}}function Qfe(e){let t=requestAnimationFrame(()=>{t=requestAnimationFrame(e)});return()=>{cancelAnimationFrame(t)}}function tf({anchor:e,popover:t,positionX:n}){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.visualVie
153wport??{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(n==="center"){const f=o.left+o.width/2;m=a?d.width-f-l/2:f-l/2}else n==="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}}function bx(e){const t=document.getElementById(e);try{return t?.matches(":popover-open")??!1}catch{return!1}}function xx(e){if(e==null)return null;try{const t=e.querySelectorAll(":popover-open"),n=t.item(t.length-1);return n instanceof HTMLElement?n:null}catch{return null}}function O_(e){return xx(e)!=null}function B_(e){const t=xx(e);return t==null?!1:(t.hidePopover(),!0)}const nf=_("external-link-disabled-popover"),yx=12,sf="external-link-disabled-popover--open",yd="external-link-disabled-popover-visibility-change",gs=e=>`trial-external-link-popover-${e}`;function Sd(e){return document.getElementById(gs(e))}function Sx(e){const t=document.getElementById(e),n=Sd(e);if(!t||!n)return;const o=tf({anchor:t,popover:n,positionX:"center"});if(!o)return;const r=window.visualViewport?.width??window.innerWidth,a=window.visualViewport?.height??window.innerHeight,i=Math.max(0,r-n.offsetWidth),c=Math.min(Math.max(0,o.left),i),l=window.getComputedStyle(t).direction==="rtl",d=l?-c:c,h=t.getBoundingClientRect(),m=Number.parseFloat(window.getComputedStyle(n).marginBlockStart)||0,f=h.top-(m*2+n.offsetHeight),p=h.bottom,C=h.top-m-n.offsetHeight>=0,g=h.bottom+m+n.offsetHeight<=a,x=C||!g&&h.top>=a-h.bottom,b=x?f:p,y=l?r-n.offsetWidth-c:c,L=h.left+h.width/2-y,S=l?n.offsetWidth-L:L,T=Math.min(Math.max(yx,S),n.offsetWidth-yx),k=x?"above":"below";n.dataset.placement=k,n.style.setProperty("--external-link-disabled-popover-tail-offset",`${T}px`),n.style.transform=`translate3d(${d}px, ${b}px, 0)`}function Tx(e){const t=Sd(e);if(t)try{typeof t.showPopover=="function"?bx(t.id)||t.showPopover():t.classList.add(sf),Sx(e),t.dispatchEvent(new window.Event(yd))}catch{}}function of(e){const t=Sd(e);if(t)try{typeof t.hidePopover=="function"?t.hidePopover():t.classList.remove(sf),t.dispatchEvent(new window.Event(yd))}catch{}}function Td(e={}){const{delay:t=200}=e,n=u.useRef(new Map),o=u.useRef(new Map),r=u.useCallback(d=>{const h=o.current.get(d);if(h)return h;const m={focused:!1,hovered:!1};return o.current.set(d,m),m},[]),a=u.useCallback(d=>{const h=r(d);h.hovered=!0;const m=n.current.get(d);m&&clearTimeout(m);const f=setTimeout(()=>{Tx(d),n.current.delete(d)},t);n.current.set(d,f)},[t,r]),i=u.useCallback(d=>{const h=r(d);h.hovered=!1;const m=n.current.get(d);m&&clearTimeout(m);const f=setTimeout(()=>{!h.focused&&!h.hovered&&of(d),n.current.delete(d)},t);n.current.set(d,f)},[t,r]),c=u.useCallback(d=>{const h=r(d);h.focused=!0;const m=n.current.get(d);m&&(clearTimeout(m),n.current.delete(d)),Tx(d)},[r]),l=u.useCallback(d=>{const h=r(d);h.focused=!1;const m=n.current.get(d);m&&(clearTimeout(m),n.current.delete(d)),h.hovered||of(d)},[r]);return u.useEffect(()=>{const d=n.current,h=o.current;return()=>{d.forEach(m=>clearTimeout(m)),d.clear(),h.clear()}},[]),{handleMouseEnter:a,handleMouseLeave:i,handleFocus:c,handleBlur:l}}function D_(e){return t=>{const{handleMouseEnter:n,handleMouseLeave:o,handleFocus:r,handleBlur:a}=Td(),i=u.useId();return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(e,{...t,ariaDescribedBy:t.externalLinksDisabled?gs(i):void 0,attachmentId:i,onLinkBlur:a,onLinkFocus:r,onLinkMouseEnter:n,onLinkMouseLeave:o}),t.externalLinksDisabled&&(0,s.jsx)(Ld,{anchorId:i})]})}}const Ld=({anchorId:e})=>{const t=gs(e);return u.useEffect(()=>{const n=o=>{o.key==="Escape"&&of(e)};return document.addEventListener("keydown",n),()=>{document.removeEventListener("keydown",n)}},[e]),u.useEffect(()=>{const n=document.getElementById(e),o=Sd(e);if(!n||!o)return;const r=Ji(n);let a=null,i=null;const c=()=>{a==null&&(a=window.requestAnimationFrame(()=>{a=null,Sx(e)}))},l=()=>{i?.abort(),i=null,a!=null&&(window.cancelAnimationFrame(a),a=null)},d=()=>{if(l(),o.classList.contains(sf)||bx(o.id)){i=new window.AbortController;const{signal:h}=i;for(const m of r)m.addEventListener("scroll",c,{passive:!0,signal:h});window.addEventListener("resize",c,{signal:h}
153),window.visualViewport?.addEventListener("resize",c,{signal:h}),window.visualViewport?.addEventListener("scroll",c,{passive:!0,signal:h})}};return o.addEventListener(yd,d),()=>{o.removeEventListener(yd,d),l()}},[e]),(0,s.jsxs)("div",{className:nf(),id:t,popover:"manual",role:"tooltip",children:[(0,s.jsx)("div",{className:nf("header"),children:"Subscribe to unlock full access"}),(0,s.jsx)("div",{className:nf("content"),children:"To protect learners from phishing, scams, or malicious redirects, external links are disabled when sharing with Quick Share during your trial."})]})},F_=({allowTabNavigation:e=!0,className:t="","data-testid":n,id:o,ref:r,tagName:a="div",transformValue:i,value:c})=>{const l=$e(),d=l&&"externalLinksDisabled"in l?l.externalLinksDisabled:!1,h=Nt(),m=(0,u.useRef)(null),f=u.useId().replaceAll(":",""),p=we(c),[C,g]=(0,u.useState)([]),{handleMouseEnter:x,handleMouseLeave:b,handleFocus:y,handleBlur:L}=Td(),{currentLocale:S}=tt(),T=Mn(),k=(0,u.useMemo)(()=>{const I=p??"",E=i?i(I):I,N=f0(E),M=typeof N=="string"?N:"",A=Array.prototype.concat(K_,Q_,V_,$_,__(S,T),d?z_(f):[],e?G_:U_,W_(h?.a11yNoticeLinkNewTab));return H_(A,M)},[e,S,T,f,d,h,i,p]);return(0,u.useLayoutEffect)(()=>{if(!d||!m.current){g([]);return}const I=[];m.current.querySelectorAll("[data-tooltip-target]").forEach((N,M)=>{const A=N.nextElementSibling;if(A?.hasAttribute("data-external")){const j=A.getAttribute("data-external-text")||"",w=A.getAttribute("data-external-id")||`link-${M}`;I.push({placeholder:N,text:j,id:w})}}),g(I)},[k,d]),(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("div",{"aria-hidden":e?void 0:!0,className:`${t} brand--linkColor`,"data-l10n-id":Ot(c),"data-testid":n,id:o,ref:I=>{m.current=I,typeof r=="function"?r(I):r&&(r.current=I)},children:(0,u.createElement)(a,{className:"fr-view rise-tiptap",dangerouslySetInnerHTML:(0,u.useMemo)(()=>({__html:k}),[k])})}),C.map(({placeholder:I,text:E,id:N})=>(0,s.jsxs)(u.Fragment,{children:[(0,ps.createPortal)((0,s.jsx)("span",{"aria-describedby":gs(N),className:"external-link-disabled-popover__anchor",id:N,onBlur:()=>L(N),onFocus:()=>y(N),onMouseEnter:()=>x(N),onMouseLeave:()=>b(N),role:"button",tabIndex:0,children:E}),I),(0,s.jsx)(Ld,{anchorId:N})]},N))]})};function H_(e,t){const n=document.createElement("div");n.innerHTML=t;for(const o of e)o(n);return n.innerHTML}const Lx=e=>e.getAttribute("data-link-type")==="lesson"?!0:(e.getAttribute("href")??"").startsWith("#/lessons/");function $_(e){for(const t of e.querySelectorAll("a")){Lx(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 __(e,t){return n=>{if(!(!e||e===t)){for(const o of n.querySelectorAll("a"))if(Lx(o)){const r=o.getAttribute("href");if(r){const a=r.includes("?")?"&":"?";o.setAttribute("href",`${r}${a}locale=${encodeURIComponent(e)}`)}}}}}function V_(e){for(const t of e.querySelectorAll("table"))if(!t.parentElement.classList.contains("rise-table-wrap")){const n=document.createElement("div");n.className="rise-table-wrap",t.parentNode.replaceChild(n,t),n.appendChild(t)}}function z_(e){return t=>{let n=0;const o=[];for(const r of t.querySelectorAll("a"))if(Gn(r.href)){const a=r.textContent||"",i=`external-link-anchor-${e}-${n++}`;r.removeAttribute("href"),r.removeAttribute("rel"),r.removeAttribute("target"),r.setAttribute("data-external",""),r.setAttribute("data-external-text",a),r.setAttribute("data-external-id",i),r.setAttribute("role","button"),r.style.display="none";const c=document.createElement("span");c.setAttribute("data-tooltip-target",""),r.parentNode?.insertBefore(c,r),o.push({placeholder:c,text:a,id:i})}return o}}function U_(e){for(const t of e.querySelectorAll("a"))t.setAttribute("aria-hidden","true"),t.setAttribute("tabindex","-1")}function G_(e){for(const t of e.querySelectorAll("a"))t.removeAttribute("aria-hidden"),t.hasAttribute("data-external")?t.setAttribute("tabindex","0"):t.removeAttribute("tabindex")}function W_(e="(opens in a new tab)"){return t=>{for(const n of t.querySelectorAll('a[target="_blank"]')){const o=document.createElement("span");
153o.className="visually-hidden-always",o.textContent=e,n.appendChild(o)}}}function K_(e){return qm(e).value}function Q_(e){for(const t of e.querySelectorAll("rise-math")){const{shortDescription:n,longDescription:o}=t,r=t.querySelector('[slot="short-description"]'),a=t.querySelector('[slot="long-description"]');n==null&&r!=null&&(t.shortDescription=r.textContent),o==null&&a!=null&&(t.longDescription=a.textContent)}return e}const je=F_,rf=e=>e==="<p><br></p>"?"":e,Y_=()=>$t(1200),kx=()=>$t(480),Z_=_("cover"),X_="MMMM D, YYYY";function Ix({format:e=X_}){const{publishedAt:t}=ie(),n=xe(),o=Z_("details-content-published-at");if(!t)return null;const r=ms()(t);return r.isValid()?(0,s.jsxs)("div",{className:o,children:[n?.coverPublished||"Published"," ",r.format(e)]}):null}const ec=e=>e==null?{}:{locale:e},q_=e=>{switch(e.kind){case"artifactField":return{kind:e.kind,artifact:e.artifact,field:e.field,...ec(e.locale)};case"lessonField":return{kind:e.kind,artifact:e.artifact,lesson:e.lesson,field:e.field,...ec(e.locale)};case"block":return{kind:e.kind,artifact:e.artifact,block:e.block,...ec(e.locale)};case"slide":return{kind:e.kind,artifact:e.artifact,lesson:e.slide,...ec(e.locale)};case"question":return{kind:e.kind,artifact:e.artifact,lesson:e.lesson,question:e.question,...ec(e.locale)}}};var J_;const eV=_("comment-preview-anchor"),tV=_("comment-preview-target");function Ex(e,t){return t==="slide"?e==="slide":e!=="slide"}const af=(0,u.createContext)(null);function Yfe({children:e,...t}){return J_(af,{value:t,children:e})}function vs({anchor:e,children:t,label:n,positioning:o="anchor"}){const r=(0,u.useContext)(af);if(r==null||Ex(e.kind,r.targetScope)===!1)return t??null;const a=tV({inset:e.kind==="block"||e.kind==="artifactField"&&e.field==="title"}),i=(0,s.jsx)("span",{className:a,children:(0,s.jsx)(r.CommentBubble,{label:n,tags:q_(nV(e,r))})}),c=eV({page:o==="page"});return t==null?i:(0,s.jsxs)("div",{className:c,children:[t,i]})}function Nx(e){const t=(0,u.useContext)(af);return t!=null&&Ex(e,t.targetScope)}function nV(e,{courseId:t,locale:n}){switch(e.kind){case"artifactField":return{...e,artifact:t,locale:n};case"lessonField":return{...e,artifact:t,locale:n};case"block":return{...e,artifact:t,locale:n};case"question":return{...e,artifact:t,locale:n};case"slide":return{...e,artifact:t,locale:n}}}const jx=_("cover");function sV(){const e=ie(),t=Y_(),n=we(e?.description);if(!n)return null;const o=ya("description"),r=(0,Xt.uW)(e?.description)?{"data-l10n-id":e?.description?.l10nId}:{"data-change-path":o};return(0,s.jsx)("div",{...r,children:(0,s.jsxs)("section",{className:jx("details-content-section"),children:[t?(0,s.jsx)(ax,{}):(0,s.jsx)(Ix,{}),(0,s.jsx)(vs,{anchor:{field:"description",kind:"artifactField"},label:"Comments on course description",children:(0,s.jsx)(je,{className:jx("details-content-description"),value:rf(n)},"text")})]})})}const oV=()=>$t(1200),kd=()=>$t(480),wx=_("cover");function rV(){const e=ie(),t=oV(),n=we(e?.description);if(!n)return null;const o=ya("description"),r=(0,Xt.uW)(e?.description)?{"data-l10n-id":e?.description?.l10nId}:{"data-change-path":o};return(0,s.jsx)("div",{...r,children:(0,s.jsxs)("section",{className:wx("details-content-section"),children:[t&&(0,s.jsx)(ax,{}),(0,s.jsx)(vs,{anchor:{field:"description",kind:"artifactField"},label:"Comments on course description",children:(0,s.jsx)(je,{className:wx("details-content-description"),value:rf(n)},"text")})]})})}const aV=_("cover"),iV=()=>{const e=ie(),{navigation:t}=e,n=we(e.description),o=t?"description":"description-no-outline";if(!n)return null;const r=ya("description"),a=(0,Xt.uW)(e.description)?{"data-l10n-id":e.description.l10nId}:{"data-change-path":r};return(0,s.jsx)(vs,{anchor:{field:"description",kind:"artifactField"},label:"Comments on course description",children:(0,s.jsx)("div",{...a,children:(0,s.jsx)(bd,{type:o,children:(0,s.jsx)(je,{className:aV("details-content-description"),value:String(rf(n))},"text")})})})},cV={[se.RISE_CLASSIC]:sV,[se.HORIZON]:iV,[se.APEX]:rV};function Ax(){const e=Ct(),t=cV[e];return(0,s.jsx)(t,{})}const Rx=_("cover"),cf=({className:e=Rx("details-logo"),imageClassName:t=Rx("details-logo-image")})=>{const n=ie()??{},o=we(n.media)?.image??{},{height:r,key:a,width:i,scalar:c=O0.SMALL.value}=o,l={width:Number(i)*c,height:Number(r)*c};if(!a)return null;const d=gt(o);return(0,s.jsx)("div",{className:e.toString(),"data-testid":"cover-details-logo",children:(0,s.jsx)("img",{alt:"",className:t.toString(),"data-testid":"cover-details-logo-image",height:l.height,src:d,width:l.width})})};function lV({icon:e,...t}){switch(e){case Fn.ARTICLE:return(0,s.jsx)(sH,{...t});case Fn.INTERACTION:return(0,s.jsx)(E$,{...t});case Fn.QUIZ:return(0,s.jsx)(S$,{...t});case Fn.VIDEO:return(0,s.jsx)(B$,{...t});default:return(0,s.jsx)("i",{className:"icon icon-Master-02"})}}var Ar=v(90313);function dV(e){const{to:t,children:n}=e,o=(0,Pe.zy)(),r=(0,u.useMemo)(()=>j0(t,o),[o,t]);return(0,s.jsx)(Pe.k2,{...e,to:r,children:n})}var at=v(30433);function uV(e){return e instanceof CustomEvent}function Px(e){document.dispatchEvent(new CustomEvent(Tb,{detail:{lessonId:e}}))}function hV(e){(0,at.A)(Tb,t=>{uV(t)&&e(t)},document)}const Mx=(0,u.createContext)(!1);function Id({children:e,inert:t}){const n=lf();return(0,s.jsx)(Mx.Provider,{value:n||t,children:e})}function lf(){return(0,u.useContext)(Mx)}function Ox(e,t){(0,u.useLayoutEffect)(()=>{let n=e.current;const o=Ji(n);for(const r of o)r?.addEventListener("scroll",t);return()=>{for(const r of o)r?.removeEventListener("scroll",t)}},[t,e])}function mV(e){return e?.sessionPreferences}function Ed(){return me(mV)}const fV=({children:e,className:t="lesson-link-item-tooltip",dark:n,ref:o,visible:r})=>{const a=(0,u.useMemo)(()=>_(t),[t]),i=(0,s.jsx)("div",{"aria-hidden":"true",ref:o,style:{left:0,pointerEvents:"none",position:"absolute",top:0,zIndex:Number.MAX_SAFE_INTEGER},children:(0,s.jsx)("div",{style:{pointerEvents:"all"},children:(0,s.jsx)("div",{className:a({visible:r}),children:(0,s.jsx)("div",{className:a("inner",{dark:n,light:!n}),children:e})})})});return(0,ps.createPortal)(i,Zs())};function pV({labels:e,restriction:t,restrictionData:n}){if(t?.type===Cr.QUIZ)return`${e?.quizRequirePassingScore}: "${n}"`;if(t?.type===Cr.ORDER)return e?.lessonRestricted;if(t?.type===Cr.KNOWLEDGE_CHECK)return e?.knowledgeCheckCorrectAnswerRequiredNav}function Bx(e){const{children:t,className:n,dark:o,restriction:r,tooltipClassName:a,style:i}=e,{prefersKeyboardNavigation:c}=Ed()??{},l=(0,u.useRef)(null),d=(0,u.useRef)(null),h=(0,u.useRef)(null),m=(0,u.useRef)(null),f=xe(),p=lf(),[C,g]=(0,u.useState)(!1),x=(0,u.useCallback)(()=>g(!0),[]),b=(0,u.useCallback)(()=>g(!1),[]),y=(0,u.useCallback)(()=>{h.current!=null&&(clearTimeout(h.current),h.current=null),m.current!=null&&(clearTimeout(m.current),m.current=null)},[]),L=(0,u.useCallback)(()=>{h.current=setTimeout(x,0)},[x]),S=(0,u.useCallback)(()=>{y(),c===!0&&b()},[y,b,c]),T=(0,u.useCallback)(A=>{A instanceof KeyboardEvent&&Tn(A)&&C&&(A.stopPropagation(),b())},[b,C]),k=(0,u.useCallback)(()=>{document.activeElement===l.current&&(m.current!=null&&(clearTimeout(m.current),m.current=null),x())},[x]),I=(0,u.useCallback)(()=>{m.current=setTimeout(b,150)},[b]),E=(0,u.useCallback)(()=>
153{if(C&&l.current&&d.current){const A=l.current.getBoundingClientRect(),j=d.current.offsetParent?.getBoundingClientRect()??A,{height:w,width:P}=A,R=A.left-j.left,O=A.top-j.top;Object.assign(d.current.style,{transform:`translate(${R}px, ${O}px)`,width:`${P}px`,height:`${w}px`})}},[C]);(0,u.useEffect)(()=>{p&&g(!1)},[p]),(0,u.useEffect)(()=>y,[y]),(0,u.useLayoutEffect)(()=>E(),[E]),(0,at.A)("resize",E,window),(0,at.A)("keydown",T,document),Ox(l,b);const N=ht(r!=null&&r.type===Cr.QUIZ?r.data:void 0),M=pV({labels:f,restriction:r,restrictionData:N});return(0,s.jsxs)("div",{"aria-disabled":!0,className:n,onBlur:S,onFocus:L,onMouseEnter:k,onMouseLeave:I,ref:l,role:"link",style:i,tabIndex:p?-1:0,children:[t,(0,s.jsx)("div",{className:"visually-hidden-always",children:f?.a11yRestrictedNav}),(0,s.jsx)("div",{className:"visually-hidden-always",children:M}),(0,s.jsx)(fV,{className:a,dark:o,ref:d,visible:C,children:M})]})}function gV(e){const{b:t,children:n,"data-direction":o,dark:r,isCurrentLesson:a,isTooltipEnabled:i,lessonId:c,onClick:l=()=>{},onBlur:d,onFocus:h,onHideProgressTooltip:m,onNavigate:f=()=>{},onShowProgressTooltip:p,restriction:C,showProgressDelay:g,style:x,tooltipClassName:b}=e,y=lf(),T=(ie()?.theme?.progressIndicatorStyle??et.THEME_DEFAULT)===et.THEME_DEFAULT,k=(0,u.useRef)(null),I=(0,u.useCallback)(D=>{l(D),a?(D.preventDefault(),Px(c)):f(c)},[c,a,l,f]),[E,N]=(0,u.useState)(!1),M=(0,u.useCallback)(()=>{k.current!=null&&(clearTimeout(k.current),k.current=null)},[]),A=(0,u.useCallback)(D=>{!E&&i&&(g!=null?k.current=setTimeout(()=>{p?.()},g):p?.()),h?.(D)},[E,h,g,p,i]),j=(0,u.useCallback)(D=>{M(),i&&m?.(),d?.(D)},[M,i,d,m]),w=(0,u.useCallback)(D=>{i&&Tn(D)&&m?.()},[m,i]),P=(0,u.useCallback)(()=>{i===!0&&N(!0)},[i]),R=(0,u.useCallback)(()=>{i===!0&&N(!1)},[i]);(0,u.useEffect)(()=>{if(!E)return;const D=()=>{N(!1)};return document.addEventListener("mouseup",D),()=>{document.removeEventListener("mouseup",D)}},[E]),(0,u.useEffect)(()=>M,[M]);const O=C?.type!=null,B=t("link",{active:a,restricted:O,"theme-default":T}).toString();return O?(0,s.jsx)(Bx,{className:B,dark:r,restriction:C,style:x,tooltipClassName:b,children:n}):(0,s.jsx)(dV,{"aria-current":a?"page":void 0,className:B.toString(),"data-direction":o,"data-nav-item":"",onBlur:j,onClick:I,onFocus:A,onKeyDown:w,onMouseDown:P,onMouseUp:R,style:x,tabIndex:y?-1:void 0,to:xn(c),children:n})}function tc(e){const{className:t="lesson-link-item",isCurrentLesson:n,last:o,lessonId:r,style:a}=e,i=(0,u.useMemo)(()=>_(t),[t]),c=fa(String(r)),l=c?.type!=null,{isComplete:d=!1}=Ao(r)??{},h=i({active:n,complete:d,last:o,restricted:l});return(0,s.jsx)("div",{className:h,children:(0,s.jsx)(gV,{...e,b:i,isCurrentLesson:n,restriction:c,style:a})})}function vV({className:e,cx:t,cy:n,diameter:o,onTransitionEnd:r,r:a,strokeLinecap:i,strokeWidth:c,value:l=0}){const d=(0,u.useRef)(null),h=`mask-${(0,g1.A)()}`,m=(100-l)/100*(2*a);return(0,at.A)("transitionend",r,d.current),(0,s.jsxs)("svg",{height:o,viewBox:`0 0 ${o} ${o}`,width:o,children:[(0,s.jsx)("defs",{children:(0,s.jsx)("mask",{id:h,children:(0,s.jsx)("rect",{fill:"white",height:2.3*a,width:2.3*a,x:"0",y:l===0?100:m})})}),(0,s.jsx)("circle",{className:e,cx:t,cy:n,fill:"none",mask:`url(#${h})`,r:a,ref:d,strokeLinecap:i,strokeWidth:c})]})}const df=vV;function CV({className:e,cx:t,cy:n,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,at.A)("transitionend",r,h.current),(0,s.jsx)("circle",{className:e,cx:t,cy:n,fill:"transparent",r:a,ref:h,strokeDasharray:m,strokeDashoffset:f,strokeLinecap:i,strokeWidth:c,transform:l})}const Dx=CV;var uf=v(49860);const{COMPACT:bV,COVER:xV,OVERLAY:yV,SIDEBAR:SV}=xo,nc=_("progress-circle");function TV({"aria-hidden":e,"aria-label":t,isCurrent:n,isFailed:o,isPassed:r,scope:a,value:i}){const[c,l]=uf.useState(i===100),d=(0,Fe.A)(i),{theme:h}=ie()??{},m=h?.progressIndicatorStyle??et.THEME_DEFAULT,f=a===xV,p=a===yV,C=m===et.THEME_DEFAULT,g=m===et.CIRCULAR_FILL,x=m===et.INCOMPLETE_COMPLETE,b=nc({compact:a===bV,cover:f,current:n,sidebar:a===SV,overlay:p}),y=nc("track",{"circular-fill":!p&&g,"incomplete-complete":f&&x}),L=nc("runner",{"circular-fill":g,done:c,failed:o,passed:r,unstarted:i===0}),S=nc("pass",{done:c,visible:r}),T=nc("fail",{done:c,visible:o}),k=uf.useMemo(()=>g||i===100?i:0,[g,i]);return uf.useEffect(()=>{if(i!==100&&d===100)l(!1);else if(i===100&&!c&&!x){const I=setTimeout(()=>l(!0),300);return clearTimeout.bind(null,I)}else i===100&&!c&&x&&l(!0)},[c,x,d,i]),(0,s.jsxs)("svg",{"aria-hidden":e,"aria-label":t,className:b,fill:"none",focu
153sable:"false",role:"img",viewBox:"0 0 16 16",xmlns:"https://www.w3.org/2000/svg",children:[(0,s.jsx)("circle",{className:y,cx:"8",cy:"8",fill:"transparent",r:"7",strokeWidth:"2",transform:"rotate(-89.9 8 8)"}),C?(0,s.jsx)(Dx,{className:L,cx:8,cy:8,diameter:16,r:7,strokeWidth:2,transform:"rotate(-89.9 8 8)",value:i}):(0,s.jsx)(df,{className:L,cx:8,cy:8,diameter:16,r:7,strokeLinecap:"round",strokeWidth:2,value:k}),(0,s.jsx)("path",{className:S,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,s.jsx)("path",{className:T,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"})]})}var hf=v(49860);const{COMPACT:LV,COVER:kV,OVERLAY:IV,SIDEBAR:EV}=xo,wa=_("progress-circle");function NV({"aria-hidden":e,"aria-label":t,isFailed:n,isPassed:o,scope:r,value:a}){const[i,c]=hf.useState(a===100),l=(0,Fe.A)(a),{theme:d}=ie()??{},h=d?.progressIndicatorStyle??et.THEME_DEFAULT,m=r===kV,f=r===IV,p=h===et.THEME_DEFAULT,C=h===et.CIRCULAR_FILL,g=h===et.INCOMPLETE_COMPLETE,x=wa("default",{failed:n,passed:o}),b=wa({compact:r===LV,cover:m,overlay:f,sidebar:r===EV}),y=wa("track",{"circular-fill":!f&&C,"incomplete-complete":m&&g}),L=wa("fill",{"circular-fill":C,done:i,failed:n,passed:o,unstarted:a===0}),S=wa("pass",{done:i,visible:o}),T=wa("fail",{done:i,visible:n}),k=hf.useMemo(()=>C||a===100?a:0,[C,a]);return hf.useEffect(()=>{if(a!==100&&l===100)c(!1);else if(a===100&&!i&&!g){const I=setTimeout(()=>c(!0),300);return clearTimeout.bind(null,I)}else a===100&&!i&&g&&c(!0)},[i,g,l,a]),(0,s.jsx)(s.Fragment,{children:p?(0,s.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,s.jsx)("circle",{cx:"3.5",cy:"3.5",r:"2.5"})}):(0,s.jsxs)("svg",{"aria-hidden":e,"aria-label":t,className:b,fill:"none",focu
153sable:"false",role:"img",viewBox:"0 0 7 7",xmlns:"https://www.w3.org/2000/svg",children:[(0,s.jsx)("circle",{className:y,cx:"8",cy:"8",fill:"transparent",r:"7",strokeWidth:"2",transform:"rotate(-89.9 8 8)"}),(0,s.jsx)(df,{className:L,cx:8,cy:8,diameter:16,r:7,strokeLinecap:"round",strokeWidth:2,value:k}),(0,s.jsx)("path",{className:S,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,s.jsx)("path",{className:T,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"})]})})}var Nd=v(49860);const{COMPACT:jV,COVER:wV,OVERLAY:AV,SIDEBAR:RV}=xo,sc=_("progress-circle");function PV({"aria-hidden":e,"aria-label":t,isFailed:n,isPassed:o,scope:r,value:a}){const[i,c]=Nd.useState(a===100),l=(0,Fe.A)(a),{theme:d}=ie()??{},h=d?.progressIndicatorStyle??et.THEME_DEFAULT,m=r===wV,f=r===AV,p=h===et.THEME_DEFAULT,C=h===et.CIRCULAR_FILL,g=h===et.INCOMPLETE_COMPLETE,x=sc({compact:r===jV,cover:m,sidebar:r===RV,overlay:f}),b=sc("track",{"circular-fill":!f&&C,"incomplete-complete":m&&g}),y=sc("runner",{"circular-fill":C,done:i,failed:n,passed:o,unstarted:a===0}),L=sc("pass",{done:i,visible:o}),S=sc("fail",{done:i,visible:n}),T=Nd.useMemo(()=>C||a===100?a:0,[C,a]);Nd.useEffect(()=>{if(a!==100&&l===100)c(!1);else if(a===100&&!i&&!g){const I=setTimeout(()=>c(!0),300);return clearTimeout.bind(null,I)}else a===100&&!i&&g&&c(!0)},[i,g,l,a]);const k=Nd.useCallback(()=>{a===100&&c(!0)},[a]);return(0,s.jsxs)("svg",{"aria-hidden":e,"aria-label":t,className:x,fill:"none",focu
153sable:"false",role:"img",viewBox:"0 0 15 15",xmlns:"https://www.w3.org/2000/svg",children:[(0,s.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)"}),p?(0,s.jsx)(Dx,{className:y,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,s.jsx)(df,{className:y,cx:7.5,cy:7.5,diameter:15,onTransitionEnd:k,r:6.5,strokeLinecap:"round",strokeWidth:2,value:T}),(0,s.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,s.jsx)("path",{className:S,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 MV={[se.RISE_CLASSIC]:TV,[se.HORIZON]:NV,[se.APEX]:PV};function Fx(e){const t=Ct(),n=MV[t];return(0,s.jsx)(n,{...e})}var OV=v(79729),jd=v.n(OV);const Hx=e=>t=>(e(t),t.preventDefault()),Fo=e=>{e.stopPropagation(),e.nativeEvent.stopImmediatePropagation()},Cs=e=>t=>{e(t),t.preventDefault(),Fo(t)},wd=_("lesson-progress"),{COMPACT:mf,COVER:oc,OVERLAY:ff,SIDEBAR:rc}=xo;function BV({canComplete:e,color:t,hasRestriction:n,isComplete:o,isCurrentLesson:r,isDark:a,isEnabled:i,isFailed:c,isLegacy:l=void 0,isPassed:d,isTooltipVisible:h,navigationStyle:m,onHideTooltip:f,onMarkComplete:p=an,onMarkReset:C=an,onShowTooltip:g,percentComplete:x,progressGraphic:b,scope:y,labels:L}){const S=(0,u.useRef)(),T=(0,u.useRef)(),k=(0,u.useRef)(),I=(0,u.useRef)(),{theme:{progressIndicatorStyle:E=et.THEME_DEFAULT}}=$e(),N=E===et.THEME_DEFAULT,M=wd({compact:y===mf,cover:y===oc&&!l,"legacy-cover":y===oc&&l,inactive:n,overlay:y===ff,sidebar:y===rc&&!l,"legacy-sidebar":y===rc&&l,"theme-default":N}),A=wd("graphic",{compact:y===mf,cover:y===oc&&!l,"legacy-cover":y===oc&&l,overlay:y===ff,sidebar:y===rc&&!l,"legacy-sidebar":y===rc&&l}),j=wd("tooltip",{legacy:l}).toString(),w=(0,u.useCallback)(()=>{o?C?.():p?.()},[o,p,C]),P=(0,u.useCallback)(F=>{jd()(f)&&Tn(F)&&h&&f()},[f,h]),R=(0,u.useCallback)(()=>{clearTimeout(k.current),!n&&jd()(g)&&(T.current=setTimeout(g,600))},[n,g]),O=(0,u.useCallback)(()=>{clearTimeout(T.current),jd()(f)&&(k.current=setTimeout(f,150))},[f]),B=(0,u.useCallback)(()=>{setTimeout(()=>{if(h){const F=S.current.getBoundingClientRect(),V=I.current.offsetParent.getBoundingClientRect(),{height:U,width:H}=F,K=F.left-V.left,Q=F.top-V.top;Object.assign(I.current.style,{transform:`translate(${K}px, ${Q}px)`,width:`${H}px`,height:`${U}px`})}},0)},[h]);if((0,u.useLayoutEffect)(()=>B(),[B]),(0,at.A)("resize",B,window),(0,at.A)("keydown",P,document),Ox(S,O),e){const V=DV({labels:L,percentComplete:x,canReset:!0}),U=!i||!1,H=wd("action",{disabled:U});return(0,s.jsx)("span",{className:M,"data-testid":"lesson-progress",children:(0,s.jsx)("button",{"aria-label":V,className:H,disabled:U,onBlur:f,onClick:w,onFocus:g,type:"button",children:(0,s.jsxs)("span",{className:A,onMouseEnter:R,onMouseLeave:O,ref:S,children:[(0,s.jsx)(b,{"aria-hidden":"true",color:t,isCurrent:r,isDark:a,isFailed:c,isPassed:d,navigationStyle:m,scope:y,value:x}),i&&!n&&(0,s.jsx)($x,{className:j,dark:a,ref:I,scope:y,visible:h,children:V})]})})})}const D=FV({labels:L,isFailed:c,percentComplete:x});return(0,s.jsx)("span",{className:M,"data-testid":"lesson-progress",children:(0,s.jsxs)("span",{className:A,onMouseEnter:R,onMouseLeave:O,ref:S,children:[(0,s.jsx)(b,{"aria-label":D,color:t,isCurrent:r,isDark:a,isFailed:c,isPassed:d,navigationStyle:m,scope:y,value:x}),i&&!n&&(0,s.jsx)($x,{className:j,dark:a,ref:I,scope:y,visible:h,children:D})]})})}const $x=(0,u.forwardRef)((e,t)=>{const{children:n,className:o,dark:r,scope:a,visible:i}=e,c=(0,u.useMemo)(()=>_(o),[o]),l=c({compact:a===mf,cover:a===oc,overlay:a===ff,sidebar:a===rc,visible:i}),d=c("inner",{dark:r,light:!r}),h=(0,s.jsx)("div",{"aria-hidden":"true",onClick:Fo,ref:t,style:{left:0,pointerEvents:"none",position:"absolute",top:0,zIndex:Number.MAX_SAFE_INTEGER},children:(0,s.jsx)("div",{style:{pointerEvents:"all"},children:(0,s.jsx)("div",{className:l,children:(0,s.jsx)("div",{className:d,children:n})})})});return(0,ps.createPortal)(h,Zs())});function DV({labels:e,canReset:t,percentComplete:n}){const o=n===100,{progressPieCompleted:r,progressPieUnstarted:a,progressPieClickToComplete:i,progressPieClickToReset:c}=e;return o&&t?`${r}. ${c}`:n===100&&!t?r:n===0?`${a}. ${i}`:`${n}% ${r}. ${i}`}function FV({labels:e,isFailed:t,percentComplete:n}){const o=n===100,{progressPieCompleted:r,progressPieUnstarted:a,progressPieQuizFailed:i}=e;return t?i:o?r:n===0?a:`${n}% ${r}`}const _x=u.memo(BV);function Ad({canComplete:e,id:t,isDark:n,isEnabled:o,isTooltipVisible:r,onHideTooltip:a,onShowTooltip:i,scope:c}){const l=ot(),{color:d,navigationStyle:h}=ie(),m=Ao(t),f=Qs(),p=k2(String(t)),C=I2(String(t)),g=fa(String(t)),x=xe(),b=g?.type!=null,y=m?.isComplete,L=String(t)===f,S=m?.percentComplete??0,T=(0,u.useCallback)(()=>{l(ml(t))},[l,t]),k=(0,u.useCallback)(()=>{l(X8(t))},[l,t]);return(0,s.jsx)(_x,{canComplete:e,color:d,hasRestriction:b,isComplete:y,isCurrentLesson:L,isDark:n,isEnabled:o,isFailed:p,isPassed:C,isTooltipVisible:r,labels:x,navigationStyle:h,onHideTooltip:a,onMarkComplete:T,onMarkReset:k,onShowTooltip:i,percentComplete:S,progressGraphic:Fx,scope:c})}function HV({color:e,hasRestriction:t,isComplete:n,isCurrentLesson:o,isFailed:r,isPassed:a,isTooltipVisible:i,lessonTitle:c,navigationStyle:l,onHideTooltip:d,onShowTooltip:h,percentComplete:m,progressGraphic:f,scope:p,labels:C}){return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("span",{className:"overview-list-item__progress",children:C&&(0,s.jsx)(_x,{canComplete:!1,color:e,hasRestriction:t,isComplete:n,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:p})}),(0,s.jsx)("span",{className:"overview-list-item__title",children:c})]})}const $V=matchMedia("(prefers-reduced-motion: reduce)");function mn(){return $V.matches}function Vx(){return typeof CSS<"u"&&typeof CSS.supports=="function"&&CSS.supports("selector(html:active-view-transition-type(a))")}function zx(){return!(typeof document>"u"||!("startViewTransition"in document)||Ys.isFirefox&&!Vx())}function _V(e,t){if(!zx()||mn()){const n=e();return Promise.resolve(n)}return new Promise(n=>{try{const o=async()=>{await e()};(t!=null&&Vx()?document.startViewTransition({update:o,types:[t]}):document.startViewTransition(o)).finished.then(()=>n()).catch(()=>n())}catch{const o=e();Promise.resolve(o).then(()=>n()).catch(()=>n())}})}const VV=3e3;function zV(){let e=0,t=0,n=null;const o=a=>{n==null||n.generation!==a||(clearTimeout(n.timeoutId),document.documentElement.classList.remove(`transition-${n.transitionType}`),n=null,t=0)};function r(a,i="default"){if(!zx()||mn())return n!=null&&o(n.generation),a(),Promise.resolve();n!=null&&o(n.generation);const l=++e;t=l;const d=setTimeout(()=>{o(l)},VV);return n={generation:l,transitionType:i,timeoutId:d},_V(()=>{t===l&&document.documentElement.classList.add(`transition-${i}`),(0,ps.flushSync)(()=>{a()})},i).finally(()=>{t===l&&o(l)})}return{navigate:r,reset(){n!=null&&o(n.generation),e+=1,t=0},get isTransitioning(){return n!=null}}}const qs=zV().navigate,UV=_("overview-list-item");function GV({className:e,id:t,last:n}
153){const o=rn(),r=Ct(),a=Qs(),{color:i,navigationStyle:c}=ie(),{icon:l,title:d}=Bt(t)??{},h=ht(d),m=Ao(t),f=k2(t),p=I2(t),C=fa(t),g=xe(),x=(0,Xt.uW)(d)?{"data-l10n-id":d.l10nId}:{"data-change-path":Pb(t,"title")},b=m?.isComplete,y=m?.percentComplete??0,L=C?.type!=null,[S,T]=(0,u.useState)(!1),k=r===se.HORIZON?HV:WV,I=(0,u.useCallback)(()=>T(!0),[]),E=(0,u.useCallback)(()=>T(!1),[]);(0,u.useEffect)(()=>()=>{Ar.Ay.Events.scrollEvent.remove("end")},[]);const N=n?"overview-list__li overview-list__li--last":"overview-list__li",M=q()(e,"overview-list-item"),A=(0,u.useCallback)(j=>{const{currentTarget:{hash:w}}=j;j.preventDefault(),Ar.Ay.Events.scrollEvent.remove("end"),Ar.Ay.Events.scrollEvent.register("end",()=>{qs(()=>{o(w.slice(1))},"cover-to-lesson"),Ar.Ay.Events.scrollEvent.remove("end")}),Ar.Ay.animateScroll.scrollTo(0,{containerId:"cover"})},[o]);return(0,s.jsx)("li",{...x,className:N,"data-testid":`overview-list-item-${t}`,role:"listitem",children:(0,s.jsx)(tc,{className:M,isTooltipEnabled:!0,lessonId:t,onBlur:E,onClick:A,onHideProgressTooltip:E,onShowProgressTooltip:I,showProgressDelay:25,tooltipClassName:"overview-list-item-tooltip",children:(0,s.jsx)(k,{color:i,hasRestriction:L,isComplete:b,isCurrentLesson:t===a,isFailed:f,isPassed:p,isTooltipVisible:S,labels:g,lessonIcon:l,lessonId:t,lessonTitle:h,navigationStyle:c,onHideTooltip:E,onShowTooltip:I,percentComplete:y,progressGraphic:Fx,scope:xo.COVER})})})}function WV({isTooltipVisible:e,lessonIcon:t,lessonId:n,lessonTitle:o,onHideTooltip:r,onShowTooltip:a,scope:i}){const c=UV("progress-circle");return(0,s.jsxs)("div",{className:c,children:[(0,s.jsx)("span",{"aria-hidden":"true",className:"overview-list-item__icon",children:(0,s.jsx)(lV,{icon:t??void 0})}),(0,s.jsx)("span",{className:"overview-list-item__title","data-testid":`overview-list-item-title-${n}`,children:o}),(0,s.jsx)(Ad,{canComplete:!1,id:n,isDark:!1,isEnabled:!0,isTooltipVisible:e,onHideTooltip:r,onShowTooltip:a,scope:i})]})}const KV=_("overview-list"),QV=e=>e.reduce((t,n)=>(n.type==="section"?t.push([n]):t[t.length-1]?t[t.length-1].push(n):t.push([n]),t),[]),YV=({className:e="",...t})=>{const n=Ct(),o=q()(e,"overview-list__section-title",{"brand--ui":n===se.RISE_CLASSIC});return(0,s.jsx)("h2",{...t,className:o})},ZV=()=>{const e=eA(),t=xe(),n=QV(e);return(0,s.jsx)("nav",{"aria-label":t?.a11yRegionNavOverview,className:"overview-list",children:n.map((o,r)=>
153{const[a,...i]=o;if(!a)return null;const{title:c,type:l}=a,d=l==="section",h=d?i:o,m=KV("list",{sectionless:!d});return(0,s.jsxs)("section",{children:[d&&c&&(0,s.jsx)(YV,{children:(0,s.jsx)(Sn,{value:c})}),(0,s.jsx)("ol",{className:m,role:"list",children:h.map((f,p)=>(0,s.jsx)(GV,{id:f.id,last:h.length>1&&p===h.length-1},f.id))})]},r)})})},XV=(0,u.memo)(ZV),qV={[se.RISE_CLASSIC]:{SPLIT_LEFT_IMAGE:"LEFT_OVERLAY",SPLIT_RIGHT_IMAGE:"LEFT_OVERLAY",TWO_THIRDS_LEFT_IMAGE:"LEFT_OVERLAY",TWO_THIRDS_RIGHT_IMAGE:"LEFT_OVERLAY"},[se.HORIZON]:{SPLIT_LEFT_IMAGE:"CENTERED_OVERLAY",SPLIT_RIGHT_IMAGE:"CENTERED_OVERLAY",TWO_THIRDS_LEFT_IMAGE:"CENTERED_OVERLAY",TWO_THIRDS_RIGHT_IMAGE:"CENTERED_OVERLAY"},[se.APEX]:{SPLIT_LEFT:"LEFT",SPLIT_LEFT_IMAGE:"LEFT_OVERLAY",SPLIT_RIGHT:"LEFT",SPLIT_RIGHT_IMAGE:"LEFT_OVERLAY"}};function JV({coverPageType:e="CENTERED",isTablet:t,themeId:n}){return t?qV[n][e]??e:e}function ac(){const e=ie(),t=Ct(),n=$t(768);return JV({coverPageType:e.theme?.coverPageType??void 0,isTablet:n,themeId:t})}const ez=e=>Object.values(O0).find(t=>t.value==e);function tz(e){return(0,u.useMemo)(()=>ez(e)??O0.SMALL,[e])?.label.toLowerCase()}const Aa=_("cover");function Ux(e){return typeof e=="object"&&e!=null}function nz(e){return Ux(e)}function sz(e){if(Ux(e))return nz(e.image)?e.image:void 0}function oz(){const e=$t(1200),t=Ct(),n=ac(),o=t===se.APEX&&(n==="SPLIT_RIGHT"||n==="SPLIT_RIGHT_IMAGE"),{description:r,media:a,navigation:i,partnerContentId:c,publishedAt:l}=ie(),h=!!zi(),m=sz(ht(a)),f=m!=null&&Object.keys(m).length>0,p=!!i,C=!r||!p,g=!r&&!p,x=!!h,b=Aa("details",{"rise-com":!1,"rise-com-authoring":!1}),y=Aa("details-content-wrap",{columns:x,logo:f}),L=Aa("details-content",{"no-description-or-outline":C}),S=Aa("details-logo",{centered:g,"no-description-or-outline":C,"has-partner-content":!!c}),T=x&&(0,s.jsx)(I_,{hasLogo:f}),k=tz(m?.scalar),I=Aa("details-logo-image",{[k]:!0}),E=Aa("details-description-outline");return(0,s.jsx)("section",{className:b,"data-testid":"cover-details",children:(0,s.jsxs)("div",{className:y,children:[!e&&o&&T,(0,s.jsxs)("div",{className:L,children:[(0,s.jsx)(cf,{className:S,imageClassName:I}),(0,s.jsxs)("div",{className:E,children:[r&&(0,s.jsx)(Ax,{}),e&&T,p&&(0,s.jsx)(bd,{type:"outline",children:(0,s.jsx)(XV,{})})]})]}),!e&&!o&&T]})})}const rz=(0,u.forwardRef)(function({children:t,disabled:n,onClick:o,to:r,...a},i){return n?(0,s.jsx)("a",{"aria-disabled":"true",ref:i,role:"link",...a,children:t}):(0,s.jsx)(un,{onClick:o,ref:i,to:r,...a,children:t})}),Gx=_("cover"),fn=()=>{const e=ie(),{trackingQuizId:t,theme:n}=e,o=rn(),r=window.viewType==="preview",a=a2(),i=Mw(),c=ha(),l=a?.id,d=n?.showStartButton??!0,h=i9()?c===100:a9(),f=i!=null?i:l,p=!r&&!1,{courseCTALabel:C}=cA({isCourseComplete:h===!0,percentCourseComplete:c??0});if(!d||!C||f==null)return null;const g=["cover__header-content-action-link","overview__button-enrolled",p?"overview__start-again":void 0].filter(Boolean).join(" "),x=xn(f),b=y=>{y.preventDefault(),qs(()=>{o(x)},"cover-to-lesson")};return(0,s.jsx)("div",{className:Gx("header-content-action-wrapper"),children:(0,s.jsx)(rz,{className:g,onClick:b,to:x,children:(0,s.jsx)("span",{className:Gx("header-content-action-link-text"),children:C})})})},az=_("cover"),Wn=({children:e})=>{const t=az("header-content");return(0,s.jsx)("div",{className:t,"data-testid":"cover-header-content",children:e})},Rr=e=>
153{const t=$e(),n=rt();return iz(t,e,n)},iz=(e,t,n)=>{const{media:o,alpha:r}=t==="coverImage"?xv(e,n):yv(e,n),a="image"in o?pv(o?.image?.alt):void 0;return{alpha:r,ariaLabel:a,media:o,role:gv(a)}},cz=_("cover"),pf=()=>{const e=r2(),{alpha:t,ariaLabel:n,media:o,role:r}=Rr("coverImage"),a=cz("header-image"),i=la({alpha:t,color:e,media:o});return(0,s.jsx)("div",{"aria-label":n,className:a,role:r,style:i??void 0})},lz=_("cover"),gf=({children:e})=>{const t=r2(),n=`overlay-${t.toLowerCase()}`,o=lz("header-content",{[n]:!!t});return(0,s.jsxs)("div",{className:o,"data-testid":"cover-header-content",children:[e,(0,s.jsx)(pf,{})]})},dz=_("cover"),ic=({hasOverlay:e=!1})=>{const{alpha:t,ariaLabel:n,media:o,role:r}=Rr("coverImage"),a=la({alpha:t,hasOverlay:e,media:o}),i=dz("header-graphic",{"dot-com":!1});return(0,s.jsx)("div",{"aria-label":n,className:i,"data-testid":"cover-header-graphic",role:r,style:a??void 0})},uz=_("cover");function pn({children:e}){const t=!!zi(),n=uz("header-content-info",{rbc:t,"rise-com":!1});return(0,s.jsx)("div",{className:n,"data-testid":"cover-header-content-info",children:e})}const Js=_("cover");function hz({percentComplete:e}){const t=kd(),n=as(),o=xe(),r=P2();return null}const Pr=_("cover"),mz=({percentComplete:e})=>{const t=as(),n=xe(),o=P2();return e===0||window.isPublicShare,null;const r=Ea({percent:e,label:n.progressSummaryPercentComplete,isRTL:t});return(0,s.jsxs)("div",{className:Pr("progress"),children:[(0,s.jsx)("div",{className:Pr("progress-text"),children:r}),(0,s.jsx)("div",{className:Pr("progress-outer"),children:(0,s.jsx)("div",{className:Pr("progress-inner"),style:{width:`${e}%`}})}),o&&(0,s.jsxs)("div",{className:Pr("progress-next-lesson"),children:[(0,s.jsx)(Lm,{className:Pr("progress-next-lesson-icon").toString(),decorative:!0}),(0,s.jsx)("span",{"aria-hidden":"true",className:Pr("progress-next-lesson-text"),children:o}),(0,s.jsxs)("span",{className:"visually-hidden",children:["Next lesson: ",o]})]})]})};function Gt(){const e=ha()??0;return Ct()===se.APEX?(0,s.jsx)(hz,{percentComplete:e}):(0,s.jsx)(mz,{percentComplete:e})}const fz=_("cover"),gn=()=>{const e=ie(),t=we(e.title),n=fz("header-content-title"),o=ya("title"),r=(0,Xt.uW)(e.title)?{"data-l10n-id":e.title.l10nId}:{"data-change-path":o};return(0,s.jsx)(vs,{anchor:{field:"title",kind:"artifactField"},label:"Comments on course title",children:(0,s.jsx)("h1",{...r,className:n,"data-testid":"cover-header-content-title",tabIndex:-1,children:t})})},pz=()=>(0,s.jsx)(s.Fragment,{children:(0,s.jsx)(gf,{children:(0,s.jsxs)(pn,{children:[(0,s.jsx)(js,{}),(0,s.jsx)(gn,{}),(0,s.jsx)(Gt,{}),(0,s.jsx)(fn,{})]})})}),gz=()=>(0,s.jsx)(s.Fragment,{children:(0,s.jsx)(Wn,{children:(0,s.jsxs)(pn,{children:[(0,s.jsx)(js,{}),(0,s.jsx)(gn,{}),(0,s.jsx)(Gt,{}),(0,s.jsx)(fn,{})]})})}),vz=()=>(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(ic,{}),(0,s.jsx)(Wn,{children:(0,s.jsxs)(pn,{children:[(0,s.jsx)(js,{}),(0,s.jsx)(gn,{}),(0,s.jsx)(Gt,{}),(0,s.jsx)(fn,{})]})})]}),Cz=()=>(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(Wn,{children:(0,s.jsxs)(pn,{children:[(0,s.jsx)(js,{}),(0,s.jsx)(gn,{}),(0,s.jsx)(Gt,{}),(0,s.jsx)(fn,{})]})}),(0,s.jsx)(ic,{})]});function bz(){switch(ac()){default:case ue.LEFT_OVERLAY:case ue.CENTERED_OVERLAY:return(0,s.jsx)(pz,{});case ue.LEFT:case ue.CENTERED:return(0,s.jsx)(gz,{});case ue.SPLIT_LEFT_IMAGE:case ue.TWO_THIRDS_LEFT_IMAGE:return(0,s.jsx)(Cz,{});case ue.SPLIT_RIGHT_IMAGE:case ue.TWO_THIRDS_RIGHT_IMAGE:return(0,s.jsx)(vz,{})}}function xz(){return(0,s.jsx)("header",{className:"cover__header","data-testid":"cover-header",children:(0,s.jsx)(bz,{})})}const yz=_("cover");function cc(){return(0,s.jsxs)("svg",{"aria-hidden":"true",className:yz("header-star"),fill:"none",height:"18",viewBox:"0 0 18 18",width:"18",xmlns:"http://www.w3.org/2000/svg",children:[(0,s.jsx)("path",{d:"M9 0V18",strokeMiterlimit:"10",strokeWidth:"0.75"}),(0,s.jsx)("path",{d:"M18 9H0",strokeMiterlimit:"10",strokeWidth:"0.75"}),(0,s.jsx)("path",{d:"M15.3 15.3002L2.69995 2.7002",strokeMiterlimit:"10",strokeWidth:"0.75"}),(0,s.jsx)("path",{d:"M2.69995 15.3002L15.3 2.7002",strokeMiterlimit:"10",strokeWidth:"0.75"})]})}
153const Sz=_("cover"),Tz=()=>null,Lz=()=>(0,s.jsx)(s.Fragment,{children:(0,s.jsx)(gf,{children:(0,s.jsxs)(pn,{children:[(0,s.jsx)(Gt,{}),(0,s.jsx)(cc,{}),(0,s.jsx)(js,{}),(0,s.jsx)(gn,{}),(0,s.jsx)(fn,{})]})})}),kz=()=>(0,s.jsx)(s.Fragment,{children:(0,s.jsx)(Wn,{children:(0,s.jsxs)(pn,{children:[(0,s.jsx)(Gt,{}),(0,s.jsx)(cc,{}),(0,s.jsx)(js,{}),(0,s.jsx)(gn,{}),(0,s.jsx)(fn,{})]})})}),Iz=()=>(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(ic,{}),(0,s.jsx)(Wn,{children:(0,s.jsxs)(pn,{children:[(0,s.jsx)(Gt,{}),(0,s.jsx)(cc,{}),(0,s.jsx)(js,{}),(0,s.jsx)(gn,{}),(0,s.jsx)(fn,{})]})})]}),Ez=()=>(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(Wn,{children:(0,s.jsxs)(pn,{children:[(0,s.jsx)(Gt,{}),(0,s.jsx)(cc,{}),(0,s.jsx)(js,{}),(0,s.jsx)(gn,{}),(0,s.jsx)(fn,{})]})}),(0,s.jsx)(ic,{})]}),Nz=()=>(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(Wn,{children:(0,s.jsxs)(pn,{children:[(0,s.jsx)(Gt,{}),(0,s.jsx)(cc,{}),(0,s.jsx)(js,{}),(0,s.jsx)(gn,{}),(0,s.jsx)(fn,{})]})}),(0,s.jsx)("div",{className:"cover__header-graphic-wrap",children:(0,s.jsx)(ic,{})})]});function jz(){switch(ac()){default:case"CENTERED_IMAGE":return(0,s.jsx)(Nz,{});case"CENTERED":case"CENTERED_ACCENT_TINT":return(0,s.jsx)(kz,{});case"SPLIT_LEFT_IMAGE":case"TWO_THIRDS_LEFT_IMAGE":return(0,s.jsx)(Ez,{});case"SPLIT_RIGHT_IMAGE":case"TWO_THIRDS_RIGHT_IMAGE":return(0,s.jsx)(Iz,{});case"CENTERED_OVERLAY":return(0,s.jsx)(Lz,{})}}function wz(){return(0,s.jsxs)("header",{className:Sz("header",{meta:!1}),"data-testid":"cover-header",children:[(0,s.jsx)(jz,{}),(0,s.jsx)(u.Suspense,{children:(0,s.jsx)(Tz,{})})]})}const Wx=_("cover");function Rd({accentColor:e,hasOverlay:t=!1,isShape:n=!1}){const{alpha:o,ariaLabel:r,media:a,role:i}=Rr("coverImage"),c=n?{backgroundColor:e}:la({alpha:o,hasOverlay:t,media:a});return(0,s.jsx)("div",{className:Wx("header-graphic-container"),children:(0,s.jsx)("div",{"aria-label":r,className:Wx("header-graphic"),"data-testid":"cover-header-graphic",role:i,style:c??void 0})})}const Kx=e=>(0,s.jsx)(Pd,{...e,children:(0,s.jsx)("clipPath",{clipPathUnits:"objectBoundingBox",id:"cover-page-clip-path",children:(0,s.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"})})}),Qx=e=>(0,s.jsx)(Pd,{...e,children:(0,s.jsx)("clipPath",{clipPathUnits:"objectBoundingBox",id:"cover-page-clip-path",children:(0,s.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"})})}),Yx=e=>(0,s.jsx)(Pd,{...e,children:(0,s.jsx)("clipPath",{clipPathUnits:"objectBoundingBox",id:"cover-page-clip-path",children:(0,s.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"})})}),Zx=e=>(0,s.jsx)(Pd,{...e,children:(0,s.jsx)("clipPath",{clipPathUnits:"objectBoundingBox",id:"cover-page-clip-path",children:(0,s.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"})})}),Az={LEFT_OVERLAY:Kx,LEFT:Kx,CENTERED:Qx,CENTERED_OVERLAY:Qx,SPLIT_LEFT:Yx,SPLIT_LEFT_IMAGE:Yx,SPLIT_RIGHT:Zx,SPLIT_RIGHT_IMAGE:Zx},Pd=({children:e,className:t="svgPath",height:n,width:o,viewBox:r})=>(0,s.jsx)("svg",{"aria-hidden":"true",className:t,fill:"none",focu
153sable:"false",height:n,viewBox:r,width:o,xmlns:"http://www.w3.org/2000/svg",children:e});function Mr({className:e,coverPageType:t}){const n=t?Az[t]:null;return n?(0,s.jsx)(n,{className:e}):null}const Xx=_("cover"),Ra=()=>(0,s.jsxs)("div",{className:Xx("author-published-wrap"),children:[(0,s.jsx)(js,{}),(0,s.jsx)(Ix,{})]}),Rz=({coverPageType:e})=>{const t=kd();return(0,s.jsxs)(gf,{children:[(0,s.jsx)(Mr,{coverPageType:e}),(0,s.jsxs)(pn,{children:[!t&&(0,s.jsx)(Gt,{}),(0,s.jsx)(Ra,{}),(0,s.jsx)(gn,{}),t&&(0,s.jsx)(Gt,{}),(0,s.jsx)(fn,{})]})]})},Pz=({coverPageType:e})=>{const t=kd();return(0,s.jsxs)(Wn,{children:[(0,s.jsx)(Mr,{coverPageType:e}),(0,s.jsxs)(pn,{children:[!t&&(0,s.jsx)(Gt,{}),(0,s.jsx)(Ra,{}),(0,s.jsx)(gn,{}),t&&(0,s.jsx)(Gt,{}),(0,s.jsx)(fn,{})]})]})},Mz=({coverPageType:e})=>(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(Mr,{coverPageType:e}),(0,s.jsx)(Rd,{}),(0,s.jsx)(Wn,{children:(0,s.jsxs)(pn,{children:[(0,s.jsx)(Gt,{}),(0,s.jsx)(Ra,{}),(0,s.jsx)(gn,{}),(0,s.jsx)(fn,{})]})})]}),Oz=({accentColor:e,coverPageType:t})=>(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(Wn,{children:(0,s.jsxs)(pn,{children:[(0,s.jsx)(Gt,{}),(0,s.jsx)(Ra,{}),(0,s.jsx)(gn,{}),(0,s.jsx)(fn,{})]})}),(0,s.jsx)(Mr,{coverPageType:t}),(0,s.jsx)(Rd,{accentColor:e,isShape:!0})]}),Bz=({coverPageType:e})=>(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(Wn,{children:(0,s.jsxs)(pn,{children:[(0,s.jsx)(Gt,{}),(0,s.jsx)(Ra,{}),(0,s.jsx)(gn,{}),(0,s.jsx)(fn,{})]})}),(0,s.jsx)(Mr,{coverPageType:e}),(0,s.jsx)(Rd,{})]}),Dz=({accentColor:e,coverPageType:t})=>(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(Mr,{coverPageType:t}),(0,s.jsx)(Rd,{accentColor:e,isShape:!0}),(0,s.jsx)(Wn,{children:(0,s.jsxs)(pn,{children:[(0,s.jsx)(Gt,{}),(0,s.jsx)(Ra,{}),(0,s.jsx)(gn,{}),(0,s.jsx)(fn,{})]})})]});function Fz(e){const t=ac(),n={...e,coverPageType:t};switch(t){default:case ue.LEFT_OVERLAY:case ue.CENTERED_OVERLAY:return(0,s.jsx)(Rz,{...n});case ue.LEFT:case ue.CENTERED:return(0,s.jsx)(Pz,{...n});case ue.SPLIT_LEFT:return(0,s.jsx)(Oz,{...n});case ue.SPLIT_LEFT_IMAGE:return(0,s.jsx)(Bz,{...n});case ue.SPLIT_RIGHT:return(0,s.jsx)(Dz,{...n});case ue.SPLIT_RIGHT_IMAGE:return(0,s.jsx)(Mz,{...n})}}function Hz(e){const n=!!!!zi();return(0,s.jsx)("header",{className:Xx("header",{"with-info":n}),"data-testid":"cover-header",children:(0,s.jsx)(Fz,{...e})})}const $z={[se.RISE_CLASSIC]:xz,[se.HORIZON]:wz,[se.APEX]:Hz};function _z(){const e=Ct(),t=$z[e];return(0,s.jsx)(t,{})}const Vz=_("cover");function zz({children:e}){const t=Ct(),n=ac(),o=$l()(n);return(0,s.jsx)("div",{className:Vz({layout:o}),"data-testid":`cover-layout-${o}`,"data-theme-id":t,id:"cover",children:e})}var Uz=v(78723),lc=v(62736);const Gz=_("portal-tooltip"),Wt={LEFT:"LEFT",RIGHT:"RIGHT",ABOVE:"ABOVE",BELOW:"BELOW"},Wz=(e,t,n)=>{const o=e.getBoundingClientRect(),r=t.getBoundingClientRect(),a=window.visualViewport;let i=n;(i===Wt.ABOVE||i===Wt.BELOW)&&(o.bottom-r.height<0&&(i=Wt.BELOW),r.height+o.top>a.height&&(i=Wt.ABOVE)),(i===Wt.LEFT||i===Wt.RIGHT)&&(r.left<0&&(i=Wt.RIGHT),r.width+o.left>a.width&&(i=Wt.LEFT));const c={left:0,right:0,top:0,bottom:0};i===Wt.ABOVE&&(c.top=o.top-r.height-25),i===Wt.BELOW&&(c.top=o.top+o.height),i===Wt.RIGHT&&(c.left=o.left+o.width+70),i===Wt.LEFT&&(c.left=o.left-r.width-25),(i===Wt.LEFT||i===Wt.RIGHT)&&(c.top=o.top-o.height/2),(i===Wt.ABOVE||i===Wt.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 Kz({children:e,className:t,direction:n=Wt.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),[p,C]=(0,Uz.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,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("div",{ref:m,children:p}),a&&(C||h||o)&&!l&&(0,s.jsx)(Fs,{classNames:"portal-tooltip__tooltip",exit:r,timeout:200,children:(0,s.jsx)(Qz,{buttonRef:m,className:t,direction:n,elementFocused:o,hovering:C,message:a,portalRef:f,renderInModalWhenPresent:c,style:i})})]})}function Qz({buttonRef:e,className:t,direction:n,elementFocused:o,hovering:r,message:a,portalRef:i,style:c,renderInModalWhenPresent:l=!1}){const d=(0,u.useCallback)(()=>Wz(e.current,i.current,n),[e,n,i]),h=(0,u.useCallback)(()=>{i.current&&d()},[i,d]),m=()=>{!r&&!o&&i.current&&(i.current.style=null)};return(0,lc.A)(h),(0,ps.createPortal)((0,s.jsx)("div",{"aria-hidden":!r||!o,className:Gz("tooltip").mix(t).toString(),onTransitionEnd:m,ref:i,style:c,children:a}),l?Zs({id:"portal",childType:"other"}):document.getElementById("portal"))}
153const ws=Kz,Yz=["[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(", "),qx=(e,t=!1)=>n=>{const o=Jx(n);if(o.length===0)return;const r=e>=o.length&&t?0:e;return Mg()(r,o)},Jx=e=>e?Array.from(e.querySelectorAll(Yz)).filter(t=>window.getComputedStyle(t).display!=="none"):[],e3=qx(0),Zz=qx(-1),vf=e=>e3(e)?.focus?.();function Xz(){const e=(0,u.useRef)(null);function t(n){const o=e3(e.current),r=Zz(e.current);Ul(n)&&(n.shiftKey?document.activeElement===o&&(r.focus(),n.preventDefault()):document.activeElement===r&&(o.focus(),n.preventDefault()))}return(0,u.useEffect)(()=>{const n=e?.current;return n?.addEventListener("keydown",t),()=>{n?.removeEventListener("keydown",t)}},[]),e}var Cf;const bf=u.createContext(null);bf.displayName="UndoManagerContext";function ape(e){return Cf(bf.Provider,{value:e.undoManager,children:e.children})}function t3(){return u.useContext(bf)}function ipe(e){function t(n){const o=t3();return Cf(e,{...n,undoManager:o})}return t.displayName=`withUndoManager(${e.displayName||e.name})`,t}function n3(){const e=t3();u.useEffect(()=>{if(e!=null)return e.disable(),()=>e.enable()},[e])}function cpe(e){function t(n){return n3(),Cf(e,{...n})}return t.displayName=`withDisableUndoManager(${e.displayName||e.name})`,t}const wt=_("modal");function qz({message:e}){const t=u.useId(),[n,o]=(0,u.useState)(!1),r=(0,u.useCallback)(()=>o(!0),[]),a=(0,u.useCallback)(()=>o(!1),[]);return(0,s.jsxs)("span",{className:wt("close-tooltip"),children:[(0,s.jsx)(ws,{elementFocused:n,message:e,renderInModalWhenPresent:!0,children:(0,s.jsx)("button",{"aria-describedby":e?t:void 0,"aria-disabled":"true","aria-label":"close dialog",className:wt("close",{disabled:!0}),onBlur:a,onFocus:r,type:"button",children:(0,s.jsx)(ae,{className:wt("close-icon"),name:"close"})})}),e&&(0,s.jsx)("span",{className:"visually-hidden-always",id:t,children:e})]})}const xf=u.forwardRef((e,t)=>{const{children:n,className:o,"data-testid":r,darkOverlay:a,disabledCloseButton:i=!1,disabledCloseButtonMessage:c,disableBackgroundScroll:l,disableCloseOnOverlayClick:d,disableCloseOnEscape:h=!1,focusFirstInput:m=!0,focusOnOpen:f=!0,footer:p,forceToTop:C=!1,fullscreen:g=!1,heading:x,hideCloseButton:b=!1,hideHeader:y=!1,skipDialogClose:L=!1,useTopLayer:S=!0,onCancel:T,onClose:k=an,onClickBack:I,onCloseBubbles:E=!1,onOverlayClick:N,scroll:M=!1,subHeading:A,subText:j,width:w}=e;n3();const P=Xz(),R=(0,u.useRef)(null),O=(0,u.useRef)(!1),B=(0,u.useCallback)(()=>{const Q=P.current;!L&&Q?.open&&Q.close(),k()},[k,P,L]);(0,u.useEffect)(()=>{const Q=z=>{if(!(!Tn(z)||h)){if(B_(P.current)){z.preventDefault(),z.stopPropagation();return}z.preventDefault(),z.stopPropagation(),T?.(z),B()}};return document.addEventListener("keydown",Q,!E),()=>{document.removeEventListener("keydown",Q,!E)}},[h,T,B,E,P]),(0,u.useEffect)(()=>{const Q=P.current;if(!Q||!h)return;const z=W=>W.preventDefault();return Q.addEventListener("cancel",z),()=>{Q.removeEventListener("cancel",z)}},[P,h]),(0,u.useEffect)(()=>{const Q=P.current;if(Q)return S?Q.showModal():Q.show(),f||setTimeout(()=>{Q.contains(document.activeElement)&&document.activeElement?.blur()},0),()=>{Q.close()}},[P,S,f]),(0,u.useEffect)(()=>{if(m&&P.current){const z=Jx(P.current).find($=>$.tagName==="INPUT"||$.tagName==="TEXTAREA"||$.tagName==="SELECT"),W=z||R?.current;W?.focus(),W instanceof HTMLTextAreaElement&&W.setSelectionRange(W.value.length,W.value.length)}},[m,P]),(0,u.useEffect)(()=>(l&&(document.scrollingElement||document.documentElement).classList.add("no-scroll"),()=>{l&&(document.scrollingElement||document.documentElement).classList.remove("no-scroll")}),[l,P]);const D=wt({"force-to-top":C}).mix(o),F=wt("content",{"with-footer":!!p,"force-scroll":!!M}),V=wt("overlay",{dark:!!a}),U=N||B,H=()=>{O.current=O_(P.current)},K=()=>{O.current||U()};return(0,s.jsxs)("dialog",{"aria-labelledby":"modal-heading","aria-modal":"true",className:D.toString(),"data-testid":r,onClose:B,ref:Q=>{P.current=Q,t&&(t.current=Q)},role:"dialog",children:[(0,s.jsx)("div",{id:"modal-portal"}),(0,s.jsx)("div",{className:V,onClick:d?void 0:K,onPointerDown:d?void 0:H}),(0,s.jsxs)("div",{className:wt("dialog",{fullscreen:g}),style:w&&!g?{width:w}:{},children:[(!y||!b)&&(0,s.jsxs)("div",{className:wt("heading-wrapper"),children:[(0,s.jsxs)("div",{className:wt("heading-flexbox"),children:[!y&&(0,s.jsxs)("div",{className:wt("header"),children:[I&&(0,s.jsx)("button",{"aria-label":"back to previous page",className:wt("back"),onClick:I,type:"button",children:(0,s.jsx)(ae,{className:wt("back-icon"),name:"arrow-left"})}),(0,s.jsxs)("h1",{className:wt("heading"),id:"modal-heading",children:[x,(0,s.jsx)("span",{className:wt("subheading"),children:A})]})]}),!b&&(i?(0,s.jsx)(qz,{message:c}):(0,s.jsx)("button",{"aria-label":"close dialog",className:wt("close"),onClick:B,ref:R,type:"button",children:(0,s.jsx)(ae,{className:wt("close-icon"),name:"close"})}))]}),j?(0,s.jsx)("h2",{className:wt("subtitle"),children:j}):[]]}),(0,s.jsx)("div",{className:F,children:n}),p&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("div",{className:wt("footer-shadow")}),(0,s.jsx)("div",{className:wt("footer"),children:p})]})]})]})}),Ho=_("locale-selector"),yf=({onClose:e})=>{const t=(0,Pe.zy)(),n=ie(),o=rj(),r=xl(),a=aj(),i=a?.length?a:o&&r?r?.map(T=>T.locale):void 0,[c,l]=(0,u.useState)(!1),d=c&&(i?.length||0)>1,h=(0,Fe.A)(d),m=ht(n?.title),{currentLocale:f,setCurrentLocale:p}=tt(),C=rB(),g=xe(),[x,b]=(0,u.useState)(!1),y=(0,u.useCallback)(T=>{FI(T),p(T)},[p]),L=()=>{Pn(ph(!1))};(0,u.useEffect)(()=>{h&&!d&&e?.()},[e,h,d]),(0,u.useEffect)(()=>
153{if(!i||x||o===void 0||!r)return;if(i.length===1){y(i[0]),b(!0);return}const T=ov(void 0),k=DI()??"";if(k!==""){y(k),b(!0),l(!1);return}T?.p==null&&k===""?l(!0):(l(!1),L());const E=(navigator.language??"en-US").toLowerCase(),N=i.find(M=>M.toLowerCase()===E);y(N?E:i[0]),b(!0)},[i,t,y,x,o,r,l]);const S=T=>{T.preventDefault();const k=T.target.value;y(k)};return!d||o===void 0||!r?null:(0,s.jsx)(Fs,{classNames:"modal",timeout:400,children:(0,s.jsx)(xf,{className:Ho("modal"),disableCloseOnOverlayClick:!0,hideCloseButton:!0,hideHeader:!0,onClose:L,children:(0,s.jsxs)("div",{className:Ho("container"),children:[(0,s.jsx)("div",{className:Ho("heading"),children:g.l10nChooseLanguage}),(0,s.jsx)("div",{className:Ho("course-title"),children:m}),(0,s.jsx)("div",{className:Ho("selector"),children:(0,s.jsx)("select",{onChange:S,value:f,children:i.map(T=>(0,s.jsx)("option",{value:T,children:C(T)},T))})}),(0,s.jsx)("div",{className:Ho("footer"),children:(0,s.jsx)("button",{className:Ho("continue-button"),onClick:L,type:"button",children:(0,s.jsx)("span",{className:Ho("continue-button-label"),children:g.l10nChooseLanguageContinue})})})]})})})},Jz=_("cover-container"),s3=()=>document.querySelector("h1")?.focus({preventScroll:!0});function eU(){const{didNavigate:e,shouldSkipAutoFocusOnNavigate:t}=Jl(),o=xe()?.overviewPageTitleSuffix,r=Bi();return(0,u.useEffect)(()=>{t||e&&s3()},[e,t]),(0,s.jsxs)(Nr,{title:Vi(`${r} - ${o}`),children:[(0,s.jsx)("main",{children:(0,s.jsx)("div",{className:Jz({}),children:(0,s.jsxs)(zz,{children:[(0,s.jsx)(_z,{}),(0,s.jsx)(oz,{})]})})}),(0,s.jsx)(yf,{onClose:s3})]})}const tU=eU,nU=/^([^/\s]+)\/([^/\s]+)$/;function sU(e){const t=nU.exec(e.trim());return t?{lessonId:t[1],blockId:t[2]}:null}function upe(e,t){return`${e}/${t}`}const dc="blockId";function hpe(e,t){return`#/lessons/${e}?${dc}=${t}`}const oU=/^#\/lessons\/([^/?#]+)\?(.+)$/;function rU(e){const t=oU.exec(e.trim());if(!t)return null;const n=new URLSearchParams(t[2]).get(dc);return n?{lessonId:decodeURIComponent(t[1]),blockId:n}:null}const o3=(0,u.createContext)(void 0);function Md(){const e=(0,u.useContext)(o3);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 r3(e){function t(n){const o=Md();return(0,s.jsx)(e,{...n,...o})}return t.displayName=`WithMediaContextWrapper(${e.name})`,t}function aU({children:e,lessonId:t,mode:n="readonly",openTranscript:o,closeTranscript:r,onTranscriptUpdate:a,disableTranscriptButton:i=!1}){const c={mode:n,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,s.jsx)(o3.Provider,{value:c,children:e})}const a3=(0,u.createContext)(void 0),iU=a3.Provider;function uc(){return(0,u.useContext)(a3)}function cU({children:e}){const t=me(n=>n.transcriptPanel);return(0,s.jsx)(iU,{value:t,children:e})}const i3=(0,ve.action)(_C),hc=(0,ve.action)(VC),Sf=(0,ve.action)(zC);function bs(e){return e.refs?$l()("audio-id__refs_"+e.refs.toLowerCase()):""}function Tf(e){if(e)return`audio-transcript--${e}`}function c3(e){if(e)return`audio-player-transcript-toggle--${e}`}const l3=_("course-exit");function d3(e){const t=xe(),{className:n,lmsOptions:o,style:r}=e;return o?.enableExitCourse?(0,s.jsx)("div",{className:l3("wrapper"),children:(0,s.jsx)("button",{className:l3("button").mix(n),onClick:Rg,style:r,type:"button",children:t?.courseExit})}):null}const lU=960;function mc(){return $t(lU)}function dU(){const e=$e(),t=mc(),n=wh();return ow({course:e,isMobile:t,search:n})}function uU(){const e=$e(),t=mc();return rw({course:e,isMobile:t})}const Lf=_("nav-control"),hU=()=>{const[e,t]=(0,u.useState)(!1);return(0,at.A)(Ib,()=>t(!0)),(0,at.A)(vm,()=>t(!1)),e},mU=({"aria-controls":e,isNavOpen:t,toggleNav:n,hideNav:o})=>{const{buttonNavigationStyle:r,lmsOptions:a,showNavigationButtons:i,...c}=ie(),l=(0,u.useRef)(null),[d,h]=(0,u.useState)(0),m=xe(),f=mc(),p=jl(),C=hU(),g=(0,u.useMemo)(()=>c.lessons?.find(k=>k.id===p),[c.lessons,p]),x=g?.type==="quiz"&&!!g.settings?.timer,b=a?.enableExitCourse,y=x||b,L=c.navigationType===hr.COMPACT,S=L?"fixed-course-exit":void 0;(0,u.useEffect)(()=>{l.current=document.querySelector(".page-wrap");const I=document.querySelector(".lesson-nav--previous")?.clientHeight??60,E=!i||r===Us.FLOATING&&!f;function N({target:M}){const A=M instanceof HTMLElement?M.scrollTop:0,j=I-A;h(j)}return C&&!E?l.current.scrollTop===0?h(I):l.current.addEventListener("scroll",N):h(0),()=>l.current.removeEventListener("scroll",N)},[r,f,C,i]);const T=(0,u.useCallback)(()=>
153{const k=document.getElementsByClassName("nav-control__menu--top-nav-bar").item(0),I=k instanceof HTMLElement?k:null;if(l.current&&I){const E=l.current.offsetWidth-l.current.clientWidth||0;I.style.maxWidth=`calc(100% - ${E}px)`}},[]);return(0,u.useLayoutEffect)(()=>{y&&T()},[y,T]),(0,s.jsx)("div",{className:Lf("wrapper"),children:(0,s.jsxs)("div",{className:Lf("menu",{"is-timed-quiz":x,"nav-off":o,"top-nav-bar":y}),style:{marginTop:d},children:[!o&&(!L||f)&&(0,s.jsx)("button",{"aria-controls":e,"aria-expanded":t,"aria-label":t?m?.a11yNavigationMenuClose:m?.a11yNavigationMenuOpen,className:Lf("button"),onClick:n,type:"button",children:(0,s.jsx)(ae,{classNameIcon:"page-menu-toggle__icon",name:"bars-regular"})}),(0,s.jsx)(d3,{className:S,lmsOptions:a})]})})},kf=({"aria-hidden":e=void 0,"aria-label":t=void 0,progress:n=0,runnerClass:o,trackClass:r})=>(0,s.jsx)("div",{"aria-hidden":e,"aria-label":t,className:r,role:"img",children:(0,s.jsx)("div",{className:o,style:{width:`${n}%`}})}),$o=_("nav-compact"),fU=e=>{const{lessonPosition:t,labelLessonName:n,labelLessonPreposition:o,totalLessons:r}=e;return t<=0?null:(0,s.jsx)("div",{className:$o("header-counter"),"data-testid":"nav-compact-counter",children:`${n} ${t} ${o} ${r}`})},pU=e=>{const{classProgressRunner:t,classProgressText:n,classProgressTrack:o,percentComplete:r,percentCompleteText:a,navExpanded:i}=e;return(0,s.jsxs)("div",{className:$o("header-progress"),"data-testid":"nav-compact-progress",children:[(0,s.jsx)("div",{className:n,children:a}),(0,s.jsx)(kf,{"aria-hidden":i,"aria-label":a,progress:r,runnerClass:t,trackClass:o})]})},gU=({closeNav:e,isExpanded:t,openNav:n})=>{const o=rn(),r=ot(),a=Sr(),i=ie(),c=Bi(),l=ha(),d=xe(),h=Eo(),m=Tl(),f=jl(),p=N2(),C=(0,u.useMemo)(()=>i?.lessonsOnly?.length??0,[i?.lessonsOnly]),g=(0,u.useMemo)(()=>p[f]??-1,[p,f]),x=a?.navigationStyle,b=(0,u.useMemo)(()=>$i(x),[x]),y=(0,u.useCallback)(()=>{t?e():n()},[t,n,e]),L=a?.exportSettings?.webExportSettings,S=!Es.isInstantLink&&(a?.lmsOptions?.disableCoverPage||L?.disableCoverPage),T=(0,u.useCallback)(Q=>{Q.preventDefault(),qs(()=>{o("/")},"lesson-to-cover")},[o]),E=`${as()?`%${l}`:`${l}%`} ${d?.lessonComplete??""}`,{alpha:N,ariaLabel:M,media:A,role:j}=Rr("coverImage"),w=(0,u.useMemo)(()=>la({alpha:N,color:a?.theme?.coverImageColor??void 0,media:A}),[N,a?.theme?.coverImageColor,A]),P=$o("header",{collapsed:!t}),R=$o("header-image",{collapsed:!t}),O="nav-compact__header-inner",B="nav-compact__header-control",D=$o("header-title-link",{collapsed:!t}),F=$o("header-progress-text",{collapsed:!t}),V=$o("header-progress-track",{collapsed:!t}),U=$o("header-progress-runner",{collapsed:!t}),H="nav-compact__header-strip",K=(0,u.useCallback)(()=>{r(Ri(!h?.active))},[r,h?.active]);return(0,s.jsxs)("section",{"aria-label":"Course Information",className:P,"data-testid":"nav-compact-header",children:[b&&w&&(0,s.jsx)("div",{"aria-label":M,className:R,role:j,style:w}),(0,s.jsxs)("div",{className:O,children:[(0,s.jsxs)("div",{className:H,children:[(0,s.jsxs)("div",{className:"nav-compact__header-controls",children:[a?.allowSearch&&m!=="restricted"&&t&&(0,s.jsx)("button",{"aria-label":d?.a11ySearchOpen,className:`${B} nav-compact__header-search`,"data-testid":"nav-compact-search",onClick:K,type:"button",children:(0,s.jsx)(Gi,{className:"nav-compact__header-control-icon nav-compact__header-search-icon"})}),(0,s.jsxs)("button",{"aria-controls":"nav-compact-outline","aria-expanded":t,"aria-label":t?d?.a11yNavigationMenuClose:d?.a11yNavigationMenuOpen,className:`${B} nav-compact__header-toggle`,"data-testid":"nav-compact-toggle",onClick:y,type:"button",children:[t&&(0,s.jsx)(HF,{className:"nav-compact__header-control-icon nav-compact__header-toggle-icon"}),!t&&(0,s.jsx)($F,{className:"nav-compact__header-control-icon nav-compact__header-toggle-icon"})]})]}),(0,s.jsx)(fU,{labelLessonName:d?.lessonName??"",labelLessonPreposition:d?.lessonPreposition??"",lessonPosition:g,totalLessons:C})]}),(0,s.jsx)("div",{className:"nav-compact__header-title","data-testid":"nav-compact-title",children:S?(0,s.jsx)("span",{className:D,children:c}):(0,s.jsx)(un,{className:D,onClick:T,to:"/",children:c})}),(0,s.jsx)(pU,{classProgressRunner:U,classProgressText:F,classProgressTrack:V,navExpanded:t,percentComplete:l,percentCompleteText:E})]})]})};var vU=v(75810),CU=v.n(vU),gpe=v(22063),bU=v(514),xU=v.n(bU),yU=v(99227),SU=v.n(yU),TU,LU,kU,IU,EU;function u3(e,t,n="..."){const o=e?e.toString():"";return o.length>t?o.substr(0,t-1)+n:o}const vpe=e=>EU(t=>LU(t)>e,kU(0,e)),NU=new RegExp(/^[0-9]+$/),jU=e=>NU.test(e),wU=e=>e>=0,AU=e=>e<=100,Cpe=e=>e==="",bpe=e=>jU(e)&&AU(e)&&wU(e),xpe=e=>String(Number(e)),h3=De()(na()(""),CU()(xU(),0)),ype=De()(na()(" "),St()(h3),q0()(" ")),m3=De()(na()(" "),q0()(/(?=[A-Z]|^)/)),Spe=e=>e?TU(h3,IU,m3)(e):"",Tpe=De()(SU(),m3);function f3({id:e,isEnabled:t,isSectionLesson:n,last:o}){const{navigationStyle:r}=ie(),{settings:a}=Bt(e)??{},i=ma(e),c=Qs(),l=Kh(String(e)),d=(0,u.useMemo)(()=>wo(r),[r]),h=String(e)===c,m=a?.isGeneratingAIContent===!0,f=u3(i||"",45),[p,C]=(0,u.useState)(!1),g=(0,u.useCallback)(()=>C(!0),[]),x=(0,u.useCallback)(()=>C(!1),[]),b=n?"nav-compact__outline-section-item":"nav-compact__outline-item",y=`${b}__link`,L=(0,s.jsx)(Ad,{canComplete:l,id:e,isDark:d,isEnabled:t,isTooltipVisible:p,onHideTooltip:x,onShowTooltip:g,scope:xo.COMPACT});return(0,s.jsx)("li",{className:"nav-compact__outline-list-item","data-testid":`nav-compact-lesson-${e}`,role:"listitem",children:m?(0,s.jsx)("div",{className:b,children:(0,s.jsx)("span",{"aria-disabled":"true",className:`${y} ${y}--generating`,"data-testid":`nav-compact-lesson-${e}-generating`,children:f})}):(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)(tc,{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 RU=_("nav-compact"),PU=({id:e})=>{const t=Bt(e),n=ht(t?.title),o=RU("outline-section-empty");return(0,s.jsx)("div",{className:o,children:(0,s.jsx)("span",{children:n})})};var Pa=v(49860);const MU=({index:e,isEnabled:t,lessonIds:n,id:o})=>{const r=ie(),a=r?.theme,i=r?.themeId,c=a?.navigationSectionsExpanded??!0,l=Bt(String(o)),d=ht(l?.title),[h,m]=Pa.useState(c);Pa.useEffect(()=>{m(c)},[c]);const[f,p]=Pa.useState(),C=Pa.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",y=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",S=Pa.useCallback(()=>{m(T=>!T)},[]);return Pa.useLayoutEffect(()=>{const T=setTimeout(()=>{C.current&&p(C.current.scrollHeight)},0);return()=>{clearTimeout(T)}},[n.length,x]),(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)("button",{"aria-controls":g,"aria-expanded":h,className:L,onClick:S,tabIndex:t?void 0:-1,type:"button",children:[(0,s.jsx)("span",{className:"nav-compact__outline-section-toggle-text",children:d}),(0,s.jsx)(Gb,{className:b})]}),(0,s.jsx)(Id,{inert:!h,children:(0,s.jsx)("ol",{"aria-hidden":h?void 0:!0,className:y,id:g,ref:C,role:"list",style:{maxHeight:f},children:n.map((T,k)=>(0,s.jsx)(f3,{id:T,isEnabled:t&&h,isSectionLesson:!0,last:k===n.length-1},T))})})]})},OU=({index:e,isEnabled:t,lessonIds:n})=>{const[o,...r]=n,a="nav-compact__outline-item nav-compact__outline-section";return zt()(r)?(0,s.jsx)("li",{className:a,role:"listitem",children:(0,s.jsx)(PU,{id:o})}):(0,s.jsx)("li",{className:a,role:"listitem",children:(0,s.jsx)(MU,{id:o,index:e,isEnabled:t,lessonIds:r})})},BU=({index:e,isEnabled:t,lessonIds:n})=>Pl(n)?(0,s.jsx)(OU,{index:e,isEnabled:t,lessonIds:n}):n.map((r,a)=>(0,s.jsx)(f3,{id:r,isEnabled:t,isSectionLesson:!1,last:a===n.length-1},r)),DU=({className:e="",isEnabled:t})=>
153{const n=Ol(),o=xe(),r=Ct(),a=[e,r===se.RISE_CLASSIC?"brand--ui":void 0,"nav-compact__outline",t?void 0:"nav-compact__outline--collapsed"].filter(Boolean).join(" ");return(0,s.jsx)("section",{"aria-label":o?.a11yRegionNavOverview,className:a,"data-testid":"nav-compact-outline",id:"nav-compact-outline",children:ls(n)&&(0,s.jsx)("ol",{className:"nav-compact__outline-list","data-testid":"nav-compact-outline-list",role:"list",children:n.map((i,c)=>zt()(i)?null:(0,s.jsx)(BU,{index:c,isEnabled:t,lessonIds:i},c))})})};var FU=v(49860);const HU=()=>{const[e,t]=FU.useState(!1);return(0,at.A)(Eb,()=>t(!0)),(0,at.A)(Cm,()=>t(!1)),e},p3=_("nav-compact"),g3="nav-content-compact",$U=(0,u.forwardRef)(({closeNav:e,isExpanded:t,openNav:n},o)=>{const r=Sr(),{navigationStyle:a,theme:i}=r??{},c=i?.coverImageColor,l=i?.progressIndicatorStyle,d=me(S=>S.course?.theme?.buttonNavigationStyle==="FULL"?Math.round(-(S.ui.lessonNavNextButton?.intersectionRect?.height??0)):0),h=(0,u.useMemo)(()=>wo(a),[a]),m=(0,u.useMemo)(()=>a===mr.LIGHT_ACCENT||a===mr.DARK_ACCENT,[a]),f=HU(),p=(0,u.useMemo)(()=>$i(a),[a]),C=l===et.CIRCULAR_FILL,g=l===et.INCOMPLETE_COMPLETE,x=(0,u.useMemo)(()=>p&&c===ut.LIGHT,[p,c]),b=p3({accent:m,dark:h,light:!h,"image-dark-overlay":p&&!x,"image-light-overlay":p&&x,"progress-circular-fill":C,"progress-incomplete-complete":g,collapsed:!t,navNextIsVisible:f}),y=p3("wrap",{collapsed:!t}),L={transform:`translateY(${d}px)`};return(0,s.jsx)("div",{className:b,"data-testid":"nav-compact",id:g3,ref:o,style:L,children:(0,s.jsxs)("div",{className:y,children:[(0,s.jsx)(gU,{closeNav:e,isExpanded:t,openNav:n}),(0,s.jsx)(Id,{inert:!t,children:(0,s.jsx)(DU,{isEnabled:t})})]})})});function v3(e,t){const[n,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]),n}const _U={closeNav:()=>{},openNav:()=>{},openSearch:()=>{},closeSearch:()=>{},searchActive:!1},C3=Object.assign((0,u.createContext)(_U),{displayName:"OverlayNavControlContext"});function VU(e){const{children:t,closeNav:n,openNav:o}=e,[r,a]=(0,u.useState)(!1),i=(0,u.useCallback)(()=>{a(!0)},[]),c=(0,u.useCallback)(()=>{a(!1)},[]);return(0,s.jsx)(C3.Provider,{value:{closeNav:n,openNav:o,openSearch:i,closeSearch:c,searchActive:r},children:t})}const Od=()=>(0,u.useContext)(C3),Bd=_("nav-overlay"),zU=({className:e})=>{const t=xe(),n=as(),o=ha(),a=`${n?`%${o}`:`${o}%`} ${t?.lessonComplete??""}`,i=Bd("header-progress-runner"),c=Bd("header-progress-text"),l=Bd("header-progress-track");return(0,s.jsxs)("div",{className:Bd("header-progress").mix(e),"data-testid":"nav-overlay-progress",children:[(0,s.jsx)(kf,{"aria-hidden":!0,progress:o,runnerClass:i,trackClass:l}),(0,s.jsx)("div",{className:c,children:a})]})},eo=_("nav-overlay"),UU=()=>{const e=ie(),t=rn(),n=Bi(),{allowSearch:o,lmsOptions:r}=e,a=Tl(),i=xe(),c=Od(),l=(0,u.useRef)(null),d=eo("header-control-btn"),h=e?.exportSettings?.webExportSettings,m=!Es.isInstantLink&&(r?.disableCoverPage||h?.disableCoverPage),f=p=>{p.preventDefault(),qs(()=>{t("/")},"lesson-to-cover")};return(0,s.jsx)("section",{"aria-label":"Course Information","data-testid":"nav-overlay-header",children:(0,s.jsxs)("div",{className:eo("header-container"),children:[(0,s.jsxs)("div",{className:eo("header-controls"),children:[(0,s.jsx)("button",{"aria-label":i?.a11yNavigationMenuClose,className:d,"data-testid":"nav-overlay-close",onClick:c.closeNav,ref:l,type:"button",children:(0,s.jsx)(nd,{className:eo("header-close-icon")})}),o&&a!=="restricted"&&(0,s.jsx)("button",{"aria-label":i?.a11ySearchOpen,className:d,"data-testid":"nav-overlay-search",onClick:c.openSearch,type:"button",children:(0,s.jsx)(Gi,{className:eo("header-search-icon")})})]}),(0,s.jsxs)("div",{className:eo("header-title-progress-container"),children:[(0,s.jsx)("h1",{className:eo("header-title"),"data-testid":"nav-overlay-title",id:"nav-overlay-title",children:m?(0,s.jsx)("span",{className:eo("header-title"),children:n}):(0,s.jsx)(un,{className:eo("header-title-link"),onClick:f,to:"/",children:n})}),(0,s.jsx)(zU,{})]})]})})},GU={[Fn.ARTICLE]:zb,[Fn.INTERACTION]:KF,[Fn.QUIZ]:zF,[Fn.VIDEO]:QF},Dd=({className:e,icon:t})=>{const n=GU[t]??zb;return(0,s.jsx)(n,{className:e,icon:t})},to=_("nav-overlay"),b3=({first:e,id:t,isEnabled:n,isSectionLesson:o,last:r})=>{const{navigationStyle:a}=ie(),{icon:i,settings:c}=Bt(t)??{},l=ma(t),d=Od(),h=Kh(String(t)),m=wo(a),f=c?.isGeneratingAIContent===!0,p=to("outline-item",{section:o}),C=`${to("outline-item")}__link`,g=to("outline-item-link-icon",{quiz:i==="Quiz"}),x=(0,u.useCallback)(()=>{d.closeNav()},[d]),[b,y]=(0,u.useState)(!1),L=(0,u.useCallback)(()=>y(!0),[]),S=(0,u.useCallback)(()=>y(!1),[]),T=(0,s.jsx)(Ad,{canComplete:h,id:t,isDark:m,isEnabled:n,isTooltipVisible:b,onHideTooltip:S,onShowTooltip:L,scope:xo.OVERLAY});return(0,s.jsx)("li",{className:to("outline-list-item",{first:e,last:r}),"data-testid":`nav-overlay-lesson-${t}`,role:"listitem",children:f?(0,s.jsx)("div",{className:p.toString(),children:(0,s.jsxs)("span",{"aria-disabled":"true",className:`${C} ${C}--generating`,"data-testid":`nav-overlay-lesson-${t}-generating`,children:[(0,s.jsx)("span",{className:to("outline-icon-wrap"),children:(0,s.jsx)(Dd,{className:g,icon:i??Fn.ARTICLE})}),(0,s.jsx)("span",{className:to("outline-lesson-title"),children:l})]})}):(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)(tc,{className:p.toString(),dark:m,isTooltipEnabled:!h,lessonId:t,onHideProgressTooltip:S,onNavigate:x,onShowProgressTooltip:L,showProgressDelay:null,tooltipClassName:to("outline-item-tooltip").toString(),children:[(0,s.jsx)("span",{className:to("outline-icon-wrap"),children:(0,s.jsx)(Dd,{className:g,icon:i??Fn.ARTICLE})}),(0,s.jsx)("span",{className:to("outline-lesson-title"),children:l}),!h&&T]}),h&&T]})})},WU=_("nav-overlay"),KU=({id:e})=>{const t=Bt(e),n=ht(t?.title);return(0,s.jsx)("span",{className:WU("outline-section-text"),children:n})},x3=_("nav-overlay"),QU=({isEnabled:e,lessonIds:t})=>{const n=(0,u.useRef)(null);return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("div",{className:x3("outline-section-divider")}),(0,s.jsx)("ol",{className:x3("outline-section-list"),ref:n,role:"list",children:t.map((o,r)=>
153(0,s.jsx)(b3,{id:o,isEnabled:e,isSectionLesson:!0,last:r===t.length-1},o))})]})},YU=_("nav-overlay"),ZU=({index:e,isEnabled:t,lessonIds:n})=>{const[o,...r]=n,a=YU("outline-item").mix("nav-overlay__outline-section");return zt()(r)?(0,s.jsx)("li",{className:a,role:"listitem",children:(0,s.jsx)(KU,{id:o})}):(0,s.jsx)("li",{className:a,role:"listitem",children:(0,s.jsx)(QU,{index:e,isEnabled:t,lessonIds:r})})},XU=({index:e,isEnabled:t,lessonIds:n})=>{const o=Pl(n),r=ma(n[0]),a=_("nav-overlay");return o?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("h2",{className:a("outline-section-text"),children:r}),(0,s.jsx)("ol",{className:a("outline-list"),"data-testid":"nav-overlay-outline-list",role:"list",children:(0,s.jsx)(ZU,{index:e,isEnabled:t,lessonIds:n})})]}):n.map((i,c)=>(0,s.jsx)(b3,{first:c===0,id:i,isEnabled:t,isSectionLesson:!1,last:c===n.length-1},i))},qU=_("nav-overlay"),JU=({isEnabled:e})=>{const t=Ol(),n=xe();return(0,s.jsx)("section",{"aria-label":n?.a11yRegionNavOverview,className:qU("outline"),"data-testid":"nav-overlay-outline",id:"nav-overlay-outline",children:ls(t)&&(0,s.jsx)(s.Fragment,{children:t.map((o,r)=>zt()(o)?null:(0,s.jsx)(XU,{index:r,isEnabled:e,lessonIds:o},`lessonIdGroup-${r}`))})})};var eG=v(40002),Fd=v.n(eG),Or=v(61082),tG=v(68848),Hd=v.n(tG);const If=Array.isArray,y3=e=>typeof e=="number",$d=e=>!Et()(e)&&typeof e=="object",Ef=e=>typeof e=="string",nG=(e,t,n)=>(o,r)=>{const a=ur()(r,e);if((0,Xt.uW)(o)){const i=n[o.l10nId];return typeof i!="string"?!1:!zt()(Hd()(t,(0,Or.htmlDecode)(i)))}else return $d(o)?S3(e,t,n)(o):a&&Ef(o)?!zt()(Hd()(t,(0,Or.htmlDecode)(o))):!1},S3=(e,t,n)=>o=>{const r=Ss()(nG(e,t,n),o);return ur()(!0,ts()(r))},sG=S3;var oG=v(49306),Nf=v.n(oG),rG=v(39767),jf=v.n(rG);const aG=Nf(),iG=cn(),cG=(e,t,n)=>(o,r)=>{const a=ur()(r,e);if(If(o))return ts()(wf(e,t,n)(o));if((0,Xt.uW)(o)){const i=n[o.l10nId];return typeof i!="string"?0:is()(Hd()(t,(0,Or.htmlDecode)(i)))}else return $d(o)?wf(e,t,n)(o):a&&Ef(o)?is()(Hd()(t,(0,Or.htmlDecode)(o))):0},wf=(e,t,n)=>o=>Ss()(cG(e,t,n),o),Af=e=>{if(If(e))return St()(Af,e);if($d(e))return Af(ts()(e));if(y3(e))return e},lG=(e,t,n)=>o=>{const r=wf(e,t,n)(o),a=St()(Af,ts()(r)),i=Qc()(a).filter(y3),c=jf()(aG,0,i);return iG("results",c,o)},dG=(e,t,n)=>(o,r)=>{const a=ur()(r,e);return If(o)?ts()(Rf(e,t,n)(o)):$d(o)?Rf(e,t,n)(o):a&&Ef(o)?Jr()(t,n,o):o},Rf=(e,t,n)=>o=>Ss()(dG(e,t,n),o),T3=Rf,L3=(e,t,n,o,r)=>{const a=["caption","code","description","heading","message","name","paragraph","title"];if(zt()(e))return!1;const i=e.replace(/[-[\]{}()"'*+?.,\\^$|#\s]/g,"\\$&"),c=new RegExp(`(${i})(?![^<]*>)`,"ig"),l="<mark>$&</mark>",d=T3(a,c,l),h=T3(Object.keys(n),c,l),m=St()(b=>{const y=d(b);return Array.isArray(y)?b:{...b,...y}},t),f=o?o(e):{},p=h(n),C=b=>f[b.id]>0||sG(a,c,n)(b),g=b=>lG(a,c,n)(b),x=St()(g,po()(C,t));x.forEach(b=>{b.results+=f[b.id]??0}),r(e,x,Array.isArray(p)?n:p,m)};function uG(e){if(!e)return!0;for(const t in e)return!1;return!0}function k3(){const{lessons:e,mondrian:t}=ie(),{currentLocale:n}=tt(),[o,r]=(0,u.useState)(null);return(0,u.useEffect)(()=>{uG(t)||v.e("webpack_container_remote_mondrian_learn-react").then(v.t.bind(v,4246,23)).then(a=>r(()=>a.searchItemsByLesson))},[t]),(0,u.useCallback)(a=>o?.(a,e,t,n)??{},[o,e,t,n])}const hG=Ar.Ay.animateScroll,Kn=_("nav-overlay"),mG=()=>{const e=ot(),t=n2(),n=Od(),{lessons:o}=ie(),[r,a]=(0,u.useState)(""),i=k3(),c=(0,u.useRef)(null),l=xe(),d=Kn("search-close-btn"),h=Kn("search-clear-btn"),m=(0,u.useCallback)(()=>{n.closeSearch(),n.closeNav(),e([OC(!0),Ri(!1),xr(null)])},[e,n]),f=(0,u.useCallback)(()=>{a(""),c.current?.focus?.()},[]);(0,u.useEffect)(()=>{c.current?.focus?.()},[]);const p=(0,u.useCallback)(x=>{Tn(x)&&!Fd()(r)?(x.preventDefault(),a(""),e(xr(null))):Tn(x)&&Fd()(r)&&m()},[e,m,r]);(0,at.A)("keydown",p);const C=(0,u.useCallback)(x=>{a(x.target.value)},[]),g=(0,u.useCallback)(x=>{if(x.preventDefault(),r){const b=(y,L,S,T)=>{e([xr(y),BC(L),DC(S),FC(T),Ri(!0)]),hG.scrollToTop({duration:500,smooth:!0})};n.closeNav(),n.closeSearch(),L3(r,o,t??{},i,b)}},[r,i,n,o,t,e]);return(0,s.jsxs)("div",{className:Kn("search"),"data-testid":"nav-overlay-search-container",children:[(0,s.jsx)("div",{className:Kn("search-header"),children:(0,s.jsx)("button",{"aria-label":l?.a11ySearchClose,className:d,"data-testid":"nav-overlay-search-close",onClick:m,type:"button",children:(0,s.jsx)(nd,{className:Kn("search-close-icon")})})}),(0,s.jsx)("div",{className:Kn("search-body"),children:(0,s.jsxs)("form",{autoComplete:"off",onSubmit:g,children:[(0,s.jsxs)("div",{className:Kn("search-container"),children:[(0,s.jsx)(Gi,{className:Kn("search-icon")}),(0,s.jsx)("input",{"aria-label":l?.a11ySearchInput,className:Kn("search-input").mix("brand--ui"),"data-testid":"nav-overlay-search-input",n
153ame:"search",onChange:C,placeholder:l?.search,ref:c,type:"input",value:r}),r&&(0,s.jsx)("button",{"aria-label":l?.a11ySearchInputClear,className:h,"data-testid":"nav-overlay-search-clear",onClick:f,type:"button",children:(0,s.jsx)(nd,{className:Kn("search-clear-icon").toString()})})]}),(0,s.jsx)("div",{className:Kn("search-actions"),children:(0,s.jsx)("button",{className:Kn("search-submit-btn").mix("brand--ui"),"data-testid":"nav-overlay-search-submit",type:"submit",children:l?.search})})]})})]})},Pf=_("nav-overlay"),I3="nav-content-overlay",fG=({isExpanded:e,outlineRef:t})=>{const o=Ol()[0],r=Pl(o),a=Pf("body",{section:r});return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(UU,{}),(0,s.jsx)("div",{className:a,ref:t,children:(0,s.jsx)(JU,{isEnabled:e})})]})},pG=({children:e,isImage:t,hasStickyHeader:n})=>{const o=Pf("content",{graphic:t,"has-sticky-header":n});return(0,s.jsxs)("div",{className:o,"data-nav-scrollable":!0,"data-testid":"nav-overlay-content",children:[e,t&&(0,s.jsx)(pf,{})]})},gG=({isExpanded:e})=>{const t=(0,u.useRef)(null),[n,o]=(0,u.useState)(null),r=ie(),a=Od(),i=(0,Fe.A)(e),c=r?.navigationStyle,l=r?.theme?.progressIndicatorStyle,d=r?.theme?.coverImageColor,h=c===fr.ACCENT,m=c===fr.TINT,f=wo(c),p=c===fr.GRAY,C=c===fr.LIGHT,g=$i(c),x=l===et.CIRCULAR_FILL,b=l===et.INCOMPLETE_COMPLETE,[y,L]=(0,u.useState)(!0),{isIntersecting:S=!1}=v3(n,{root:t?.current,threshold:1})||{},T=(0,Fe.A)(S),k=(0,u.useMemo)(()=>g&&d===ut.LIGHT,[g,d]),I=Pf({"accent-tint":m,accent:h,dark:f,gray:p,"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 E=N=>{Tn(N)&&!a.searchActive&&(N.preventDefault(),a.closeNav())};return e?document.addEventListener("keydown",E):document.removeEventListener("keydown",E),()=>{document.removeEventListener("keydown",E)}},[e,a]),(0,u.useEffect)(()=>{!y&&S?L(!0):T&&!S&&L(!1)},[S,y,T,L]),(0,s.jsx)("dialog",{"aria-labelledby":"nav-overlay-title","aria-modal":"true",className:I,"data-testid":"nav-overlay",id:I3,ref:t,children:(0,s.jsx)(pG,{hasStickyHeader:y,isImage:g,children:a.searchActive?(0,s.jsx)(mG,{}):(0,s.jsx)(fG,{isExpanded:e,outlineRef:o})})})},fc=_("nav-sidebar-search"),vG=({className:e="",isEnabled:t})=>{const n=ot(),o=n2(),r=(0,Fe.A)(t),{lessons:a}=ie(),i=Eo(),c=xe(),l=(0,u.useRef)(null),d=fc({disabled:!t}).mix(e),h=fc("icon"),m=fc("input"),f=fc("close"),p=fc("close-icon"),C=i?.term,g=!t,[x,b]=(0,u.useState)(""),y=k3(),L=(0,u.useCallback)(()=>{n([OC(!0),Ri(!1),xr(null)]),b("")},[n]),S=(0,u.useCallback)(I=>{Tn(I)&&!Fd()(x)?(I.preventDefault(),b(""),n(xr(null))):Tn(I)&&Fd()(x)&&L()},[n,L,x]),T=(0,u.useCallback)(I=>{C!=null&&n(xr(null)),b(I.target.value)},[n,C]),k=(0,u.useCallback)(I=>{I.preventDefault(),L3(x,a,o??{},y,(N,M,A,j)=>n([xr(N),BC(M),DC(A),FC(j)]))},[n,a,o,x,y]);return(0,u.useEffect)(()=>{!r&&t&&setTimeout(()=>{l.current?.focus()},50)},[t,r]),(0,u.useEffect)(()=>{C&&C!==x&&b(C)},[x,C]),(0,s.jsxs)("form",{autoComplete:"off",className:d,"data-testid":"nav-sidebar-search",onSubmit:k,children:[(0,s.jsx)(Gi,{className:h}),(0,s.jsx)("input",{"aria-label":c?.a11ySearchInput,className:m,disabled:g,name:"search",onChange:T,onKeyDown:S,placeholder:c?.search,ref:l,type:"search",value:x}),(0,s.jsx)("button",{"aria-label":c?.a11ySearchClose,className:f,onClick:L,type:"reset",children:(0,s.jsx)(nd,{className:p})})]})},Mf=new WeakMap,E3=new ResizeObserver(e=>{requestAnimationFrame(()=>{for(const t of e)Mf.get(t.target)?.(t)})});function _d(e,t){(0,u.useEffect)(()=>{if(e)return Mf.set(e,t),()=>Mf.delete(e)},[e,t]),(0,u.useEffect)(()=>{if(e)return E3.observe(e),()=>E3.unobserve(e)},[e])}const Qn=_("nav-sidebar-header"),CG=_("nav-sidebar-header-ghost"),bG=()=>me(e=>e.ui.skipToNavButton?.offsetHeight??0),xG=e=>{const{classProgressRunner:t,classProgressText:n,classProgressTrack:o,percentComplete:r,percentCompleteText:a}=e,i=Ct(),c=(0,s.jsx)("div",{className:n,children:a});return(0,s.jsxs)("div",{className:Qn("progress"),"data-testid":"nav-sidebar-progress",children:[i===se.APEX&&c,(0,s.jsx)(kf,{"aria-hidden":"true",progress:r,runnerClass:t,trackClass:o}),i!==se.APEX&&c]})},yG=({className:e,isCompact:t,isEnabled:n,navRefWidth:o,setIsCompact:r})=>{const a=ot(),i=rn(),[c,l]=(0,u.useState)(""),[d,h]=(0,u.useState)({height:0,width:0}),[m,f]=(0,u.useState)(d),[p,C]=(0,u.useState)(d),g=bG(),[x,b]=(0,u.useState)(null),y=(0,u.useRef)(null),L=(0,u.useRef)(null),[S,T]=(0,u.useState)(null),k=ie(),I=Bi(),E=xe(),N=ha(),M=Eo(),A=kx(),j=as(),w=Tl(),P=k?.exportSettings?.web
153ExportSettings,R=!Es.isInstantLink&&(k?.lmsOptions?.disableCoverPage||P?.disableCoverPage),O=k?.allowSearch&&w!=="restricted",B=k?.theme?.coverImageColor,D=k?.navigationStyle,F=(0,u.useMemo)(()=>$i(D),[D]),V=!!uU(),U=(0,Fe.A)(M),H=(M?.active||V)??!1,[K,Q]=(0,u.useState)(!0),[z,W]=(0,u.useState)(null),$=Qn({compact:t,searching:H,transition:K}).mix(e),G=Qn("inner",{compact:t}),Z=Qn("content",{compact:t,hidden:H}),Y=Qn("graphic",{image:F}),ne=Qn("progress-runner"),ee=Qn("progress-text",{compact:t}),le=Qn("progress-track"),J=Qn("search-area",{hidden:!H}),te=Qn("search-btn",{hidden:H}),he=Qn("search-icon"),_e=Qn("title",{compact:t}),X=CG({compact:t,searching:H}),Ce=`${j?`%${N}`:`${N}%`} ${E?.lessonComplete}`,pe=n&&!H?void 0:-1,Ie=n&&!H?void 0:-1,{alpha:ge,media:ce}=Rr("coverImage"),Re=(0,u.useMemo)(()=>{const ke={};return F&&Object.assign(ke,la({alpha:ge,color:B??void 0,media:ce})),H&&(ke.height=m.height),ke},[ge,B,ce,F,H,m.height]),en=(0,u.useMemo)(()=>{const ke={};return t&&(ke.bottom=`calc(100% - ${g}px)`,ke.width=o||0,ke.transition="width 0.3s",n||(ke.transition="width 0.3s",ke.width="0rem")),d.height&&(ke.height=d.height,ke.overflow="hidden",t&&(ke.transition="height 0.3s ease .1s, transform 0.3s ease .1s")),ke},[t,n,o,d.height,g]);(0,u.useEffect)(()=>
153{l(t&&A?u3(I??"",45):I)},[I,t,A]);const tn=H?void 0:{height:p.height},Qt=(0,u.useCallback)(()=>{f(d),a(Ri(!0))},[a,d]),nn=(0,u.useCallback)(ke=>{ke.preventDefault(),qs(()=>{i("/")},"lesson-to-cover")},[i]);(0,u.useLayoutEffect)(()=>{W(document.querySelector("[data-nav-scrollable]"))},[]);const{isIntersecting:Yt=!1}=v3(x,{root:z,threshold:0})||{},Ze=(0,Fe.A)(Yt);(0,u.useEffect)(()=>{const ke=S!=null&&window.innerHeight*.4>=S.offsetHeight;Ze&&!Yt&&ke?r(!0):!Ze&&Yt&&r(!1)},[Yt,Ze,S,r]);const Zt=(0,u.useCallback)(({target:ke})=>{const Oe={height:ke?.scrollHeight??0,width:o??0};h(Oe),f(Oe),t||C(Oe)},[t,o]);_d(S,Zt),(0,u.useLayoutEffect)(()=>{const ke=z?.scrollTop??0;(z||ke>0)&&z&&(z.scrollTop=0);const Oe={height:S?.scrollHeight??0,width:o??0};h(Oe),f(Oe),C(Oe)},[z,o,S]),(0,u.useEffect)(()=>{O&&U?.active&&!M?.active&&y?.current?.focus()},[O,M,U]),(0,u.useEffect)(()=>{H?Q(!0):t&&Q(!1)},[H,t]);const Rt=(0,u.useCallback)(ke=>{const Oe=ke.target;if(!(Oe instanceof HTMLElement)||!Oe.hasAttribute("data-nav-item")||!t||!S||!z)return;const ct=S.getBoundingClientRect(),mo=Oe.getBoundingClientRect();ct.bottom>mo.top&&(z.scrollTop-=ct.height-mo.top+5)},[z,t,S]);return(0,at.A)("focusin",Rt,z),(0,u.useEffect)(()=>l(I),[I]),(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("div",{className:X,ref:b,style:tn}),(0,s.jsx)("div",{className:$,"data-testid":"nav-sidebar-header",ref:L,style:en,children:(0,s.jsxs)("div",{className:G,ref:T,children:[(0,s.jsx)("div",{className:Y,style:Re}),O&&(0,s.jsx)("button",{"aria-label":E?.a11ySearchOpen,className:te,onClick:Qt,tabIndex:pe,type:"button",children:(0,s.jsx)(Gi,{className:he})}),(0,s.jsx)("div",{className:J,children:(0,s.jsx)(vG,{isEnabled:n&&H})}),(0,s.jsxs)("div",{className:Z,children:[R?(0,s.jsx)("span",{className:_e,"data-testid":"nav-sidebar-title",tabIndex:Ie,children:c}):(0,s.jsx)(un,{className:_e,"data-testid":"nav-sidebar-title",onClick:nn,tabIndex:Ie,to:"/",children:c}),(0,s.jsx)(xG,{classProgressRunner:ne,classProgressText:ee,classProgressTrack:le,percentComplete:N,percentCompleteText:Ce})]})]})})]})},SG=_("nav-sidebar");function N3({closeNav:e,id:t,isEnabled:n,isSectionLesson:o,last:r}){const{navigationStyle:a}=ie(),{icon:i,settings:c}=Bt(t)??{},l=ma(t),d=Qs(),h=mc(),m=Kh(String(t)),f=String(t)===d,p=c?.isGeneratingAIContent===!0,C=(0,u.useMemo)(()=>wo(a),[a]),g=o?"nav-sidebar__outline-section-item":"nav-sidebar__outline-item",x=`${g}__link`,b=`${g}-link-icon`,y=(0,s.jsx)(Dd,{className:b,icon:i??Fn.ARTICLE}),[L,S]=(0,u.useState)(!1),T=(0,u.useCallback)(()=>S(!0),[]),k=(0,u.useCallback)(()=>S(!1),[]),I=(0,s.jsx)(Ad,{canComplete:m,id:t,isDark:C,isEnabled:n,isTooltipVisible:L,onHideTooltip:k,onShowTooltip:T,scope:xo.SIDEBAR}),E=()=>{e&&h&&e()};return(0,s.jsx)("li",{className:SG("outline-list-item",{last:r}),"data-testid":`nav-outline-lesson-${t}`,role:"listitem",children:p?(0,s.jsx)("div",{className:g,children:(0,s.jsxs)("span",{"aria-disabled":"true",className:`${x} ${x}--generating`,"data-testid":`nav-outline-lesson-${t}-generating`,children:[y,l]})}):(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)(tc,{className:g,dark:C,isCurrentLesson:f,isTooltipEnabled:!m,lessonId:t,onHideProgressTooltip:k,onNavigate:E,onShowProgressTooltip:T,showProgressDelay:0,tooltipClassName:`${g}-tooltip`,children:[y,l,!m&&I]}),m&&I]})})}const TG=({id:e})=>{const t=Bt(e),n=ht(t?.title);return(0,s.jsx)("span",{className:"nav-sidebar__outline-section-text",children:n})};var Ma=v(49860);const LG=({closeNav:e,id:t,index:n,isEnabled:o,lessonIds:r})=>{const a=ie(),i=a?.theme,c=a?.themeId,l=i?.navigationSectionsExpanded??!0,d=ma(String(t)),[h,m]=Ma.useState(l);Ma.useEffect(()=>{m(l)},[l]);const[f,p]=Ma.useState(),C=Ma.useRef(null),g=`sidebar-sublist-${n}`,x=C.current?.clientWidth,b=String(c),y=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",S=Ma.useCallback(()=>{m(T=>!T)},[]);return Ma.useLayoutEffect(()=>{const T=setTimeout(()=>{C.current&&p(C.current.scrollHeight)},0);return()=>{clearTimeout(T)}},[r.length,x,b]),(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)("button",{"aria-controls":g,"aria-expanded":h,className:"nav-sidebar__outline-section-toggle","data-nav-item":"",onClick:S,tabIndex:o?void 0:-1,type:"button",children:[(0,s.jsx)("span",{className:"nav-sidebar__outline-section-toggle-text",children:d}),(0,s.jsx)(Gb,{className:y})]}),(0,s.jsx)(Id,{inert:!h,children:(0,s.jsx)("ol",{"aria-hidden":h?void 0:!0,className:L,id:g,ref:C,role:"list",style:{maxHeight:f},children:r.map((T,k)=>(0,s.jsx)(N3,{closeNav:e,id:T,isEnabled:o&&h,isSectionLesson:!0,last:k===r.length-1},T))})})]})},kG=({closeNav:e,index:t,isEnabled:n,lessonIds:o})=>{const[r,...a]=o,i="nav-sidebar__outline-item nav-sidebar__outline-section";return zt()(a)?(0,s.jsx)("li",{className:i,role:"listitem",children:(0,s.jsx)(TG,{id:r})}):(0,s.jsx)("li",{className:i,role:"listitem",children:(0,s.jsx)(LG,{closeNav:e,id:r,index:t,isEnabled:n,lessonIds:a})})},IG=({closeNav:e,index:t,isEnabled:n,lessonIds:o})=>Pl(o.map(String))?(0,s.jsx)(kG,{closeNav:e,index:t,isEnabled:n,lessonIds:o}):o.map((a,i)=>(0,s.jsx)(N3,{closeNav:e,id:a,isEnabled:n,isSectionLesson:!1,last:i===o.length-1},a)),EG=({className:e="",closeNav:t,isEnabled:n})=>{const o=Ol(),[r,a]=(0,u.useState)(!n),i=xe(),c=(0,u.useRef)(null),l=(0,u.useRef)(null),d=[e,"nav-sidebar__outline",r?"n
153av-sidebar__outline--hidden":void 0,Ys.isSafari?"nav-sidebar__outline--safari":void 0].filter(Boolean).join(" "),h=["nav-sidebar__outline-list",n?void 0:"nav-sidebar__outline-list--disabled",r?"nav-sidebar__outline-list--hidden":void 0].filter(Boolean).join(" ");return(0,u.useEffect)(()=>(n?(clearTimeout(l.current??void 0),a(!1)):l.current=setTimeout(()=>{a(!0)},350),()=>{clearTimeout(l.current??void 0)}),[n]),(0,s.jsx)("section",{"aria-label":i?.a11yRegionNavOverview,className:d,"data-testid":"nav-sidebar-outline",id:"nav-sidebar-outline",children:ls(o)&&(0,s.jsx)("ol",{className:h,"data-testid":"nav-sidebar-outline-list",ref:c,role:"list",children:o.map((m,f)=>zt()(m)?null:(0,s.jsx)(IG,{closeNav:t,index:f,isEnabled:n,lessonIds:m},f))})})};var NG=v(4374);const Oa=_("nav-sidebar-result"),j3=({result:e})=>{const t=xe(),n=e?.icon??Fn.ARTICLE,o=ht(e?.title),r=e?.results??0,a=r===1?t?.result:t?.results,i=Oa("icon"),c=Oa("title"),l=Oa("count");return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(Dd,{className:i,icon:n}),(0,s.jsx)("span",{className:c,children:o}),(0,s.jsx)("span",{className:l,children:`${r} ${a}`})]})},jG=({id:e,index:t,isEnabled:n,onSelectResult:o})=>{const r=ie(),a=(0,Pe.RQ)(Bl),i=(0,Pe.RQ)(Dl),c=a??i,l=pj(String(e)),d=c?.params.lessonId===String(e),h=d?"page":void 0,m=r?.color,f=r?.navigationStyle,p=n?void 0:-1,C={animationDelay:`${t/10}s`},g=l?.id,x=fa(g==null?void 0:String(g)),b=(0,u.useMemo)(()=>wo(f),[f]),y=Oa(),L=Oa("inner",{active:d}),S=Oa("link",{dark:b,light:!b});return(0,s.jsx)("li",{className:y,role:"listitem",style:C,children:(0,s.jsx)("div",{className:L,style:{color:m},children:n&&x==null?(0,s.jsx)(un,{"aria-current":h,className:S,onClick:o,tabIndex:p,to:xn(e),children:(0,s.jsx)(j3,{result:l})}):(0,s.jsx)(Bx,{className:S,restriction:x,tooltipClassName:"lesson-nav-link-tooltip",children:(0,s.jsx)(j3,{result:l})})})})},Vd=_("nav-sidebar-results"),wG=[],AG=({closeNav:e,isEnabled:t})=>{const{announcePolite:n}=Ls(),o=ie(),r=Eo(),a=xe(),c=(r?.activeLessons??wG).filter(p2),l=r?.term,d=ls(c),h=(0,NG.A)(l),m=a?.noResults??"",f=o?.navigationStyle,p=(0,u.useMemo)(()=>wo(f),[f]),C=Vd(),g=Vd("message",{dark:p,light:!p}),x=Vd("term"),b=Vd("list"),y=$t(960),L=u.useCallback(()=>{y&&e()},[e,y]);return(0,u.useEffect)(()=>{if(h){const S=c.length===1?a?.result:a?.results,T=d?`${c.length} ${S}`:`${a?.noResults} ${l}`;n?.(T)}},[n,d,h,c,a,l]),(0,s.jsxs)("div",{className:C,"data-testid":"nav-sidebar-results",children:[!d&&h&&(0,s.jsxs)("div",{className:g,children:[m," ",(0,s.jsxs)("span",{className:x,children:['"',l,'"']})]}),d&&h&&(0,s.jsx)("ol",{className:b,"data-testid":"nav-sidebar-results-list",role:"list",children:c.map((S,T)=>(0,s.jsx)(jG,{id:S.id,index:T,isEnabled:t,onSelectResult:L},S.id))})]})},zd=_("nav-sidebar"),w3="nav-content-sidebar",RG=({isExpanded:e,closeNav:t})=>{const n=ie(),o=Eo(),[r,a]=(0,u.useState)(!1),[i,c]=(0,u.useState)(0),l=(0,u.useRef)(null),d=(0,u.useRef)(null),h=n?.color,m=n?.theme?.coverImageColor,f=n?.isLegacyCourse,p=n?.navigationStyle,C=n?.theme?.accentContrast,g=n?.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 y=(0,u.useMemo)(()=>aw(p),[p]),L=(0,u.useMemo)(()=>wo(p),[p]),S=(0,u.useMemo)(()=>$i(p),[p]),T=S&&m===ut.LIGHT,k=$n(h),I=g===et.CIRCULAR_FILL,E=g===et.INCOMPLETE_COMPLETE,N=C?C===Le.DARK||C===Le.AUTO&&k===Le.DARK:k===Le.DARK,M=zd("header"),A=zd("body"),j=zd("content"),w=zd({accent:y,"dark-contrast":!S&&N,"light-contrast":!S&&!N,"legacy-pre-themes":f,"image-dark-overlay":S&&!T,"image-light-overlay":S&&T,"progress-circular-fill":I,"progress-incomplete-complete":E,collapsed:!e,dark:L,light:!L,searching:x});return(0,s.jsx)(Id,{inert:!e,children:(0,s.jsx)(li,{children:(0,s.jsx)(Lg,{in:e,mountOnEnter:!0,nodeRef:d,timeout:300,unmountOnExit:!0,children:(0,s.jsx)("div",{"aria-hidden":b,className:w,"data-testid":"nav-sidebar",ref:d,children:(0,s.jsxs)("div",{className:j,"data-nav-scrollable":!0,id:w3,children:[(0,s.jsx)(yG,{className:M,isCompact:r,isEnabled:e,navRefWidth:i,setIsCompact:a}),(0,s.jsxs)("div",{className:A,"data-testid":"nav-sidebar-body",ref:l,children:[(0,s.jsx)(EG,{closeNav:t,isEnabled:e&&!x}),(0,s.jsx)(AG,{closeNav:t,isEnabled:e&&x})]})]})})})})})},Br={x:null,y:null},Ud={passive:!0};function A3({children:e,onSwipeDown:t,onSwipeLeft:n,onSwipeRight:o,onSwipeUp:r,onShouldRecognizeGesture:a=()=>!0,thresholdX:i=100,thresholdY:c=100}){const l=(0,u.useRef)(),[d,h]=(0,u.useState)(Br),[m,f]=(0,u.useState)(Br),p=(0,u.useCallback)(b=>{const y=b.touches?.length??0,L=b.targetTouches[0],S=a?a():!0;y==1&&L&&S?h({x:L.clientX,y:L.clientY}):h(Br)},[a]),C=(0,u.useCallback)(b=>{const y=b.targetTouches[0];y&&f({x:y.clientX,y:y.clientY})},[]),g=(0,u.useCallback)(()=>{h(Br),f(Br)},[]),x=(0,u.useCallback)(b=>{const y=b.touches?.length??0;if(d.x==null||d.y==null||m.x==null||m.y==null||y>0)return;const L=m.x-d.x,S=m.y-d.y;Math.abs(L)>Math.abs(S)?Math.abs(L)>i&&(L<0?n?.():o?.()):Math.abs(S)>c&&(S<0?r?.():t?.()),h(Br),f(Br)},[t,n,o,r,i,c,m,d]);return(0,at.A)("touchstart",p,l.current,Ud),(0,at.A)("touchcancel",g,l.current,Ud),(0,at.A)("touchmove",C,l.current,Ud),(0,at.A)("touchend",x,l.current,Ud),(0,s.jsx)("div",{ref:l,children:e})}A3.propTypes={children:kt().oneOfType([kt().arrayOf(kt().element),kt().element]).isRequired,onShouldRecognizeGesture:kt().func,onSwipeDown:kt().func,onSwipeLeft:kt().func,onSwipeRight:kt().func,onSwipeUp:kt().func,thresholdX:kt().number.isRequired,thresholdY:kt().number.isRequired};function Gd({isEnabled:e=!0,...t}){return e?(0,s.jsx)(A3,{...t}):(0,s.jsx)("div",{children:t.children})}Gd.propTypes={children:kt().oneOfType([kt().arrayOf(kt().element),kt().element]).isRequired,isEnabled:kt().bool.isRequired};const Wd={DESKTOP:"desktop",TABLET_PORTRAIT:"tablet-portrait",TABLET_LANDSCAPE:"tablet-landscape",MOBILE_PORTRAIT:"mobile-portrait",MOBILE_LANDSCAPE:"mobile-landscape"},PG=[Wd.TABLET_PORTRAIT,Wd.TABLET_LANDSCAPE,Wd.MOBILE_PORTRAIT,Wd.MOBILE_LANDSCAPE],pc=e=>PG.includes(e),MG=e=>(0,u.useMemo)(()=>{const t=window.matchMedia("(pointer: coarse)").matches,n=pc(e);return t||n},[e]),Of=(0,u.createContext)({isCourseNavOpen:!1});Of.displayName="CourseNavigationContext";function OG(e){const{children:t,isCourseNavOpen:n}=e;return(0,s.jsx)(Of.Provider,{value:{isCourseNavOpen:n},children:t})}function BG(){return(0,u.useContext)(Of)}const R3=_("course-navigation"),{COMPACT:Kd,OVERLAY:Bf,SIDEBAR:Dr}=hr,DG={[Kd]:g3,[Dr]:w3,[Bf]:I3},FG=({hasSearchResults:e,courseNavType:t,openNav:n,closeNav:o})=>{const[r,a]=(0,u.useState)(e);return(0,u.useEffect)(()=>{r&&!e&&!(t===Dr)?(o(),a(!1)):r&&t===Bf?n():a(e)},[e,t,n,o,r]),r},HG=({activeNavType:e,beginWithSidebarOpen:t,isNavOpen:n,isTablet:o,openNav:r,closeNav:a})=>{const[i,c]=(0,u.useState)();(0,u.useEffect)(()=>{e===Dr&&t&&(!i&&o&&n?a():i===!0&&!o&&!n&&r(),c(o))},[e,t,n,o,r,a,i])},$G=({beginWithSidebarOpen:e,children:t,closeNav:n,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:p=!1}=Eo()??{}
153,C=xe(),g=FG({hasSearchResults:p,courseNavType:o,openNav:c,closeNav:n}),x=(0,u.useMemo)(()=>g||o===Kd&&a?Dr:o,[o,g,a]);HG({activeNavType:x,beginWithSidebarOpen:e,closeNav:n,openNav:c,isNavOpen:r,isTablet:a}),(0,u.useEffect)(()=>{const k=E=>{E.relatedTarget instanceof Node&&f.current?.contains(E.relatedTarget)===!0&&n()},I=()=>{f.current?.removeEventListener("click",n),f.current?.removeEventListener("keypress",n),f.current?.removeEventListener("blur",k,!0)};return x===Kd&&r?(f.current?.addEventListener("click",n),f.current?.addEventListener("keypress",n),f.current?.addEventListener("blur",k,!0)):I(),I},[x,r,n]);const b=MG(l),y=(0,u.useCallback)(()=>{const k=x===hr.SIDEBAR;b&&k&&r&&n()},[n,r,b,x]),L=(0,u.useMemo)(()=>x!=null?DG[x]:void 0,[x]),S=R3(x?.toLowerCase()??null,{"nav-open":r,"search-open":p&&r,"course-nav-type":o?.toLowerCase()}),T=R3("lessonNav",{type:i?.toLowerCase()});return(0,s.jsx)(OG,{isCourseNavOpen:r,children:(0,s.jsx)("div",{className:S,children:(0,s.jsx)(Gd,{isEnabled:x===hr.SIDEBAR,onSwipeLeft:y,children:(0,s.jsxs)("div",{className:T,children:[(0,s.jsxs)("nav",{"aria-label":C?.a11yRegionNavLesson,children:[(0,s.jsx)(mU,{"aria-controls":L,hideNav:h,isNavOpen:r,toggleNav:d}),x===Dr&&(0,s.jsx)(RG,{closeNav:n,isExpanded:r}),x===Kd&&(0,s.jsx)($U,{closeNav:n,isExpanded:r,openNav:c,ref:m}),x===Bf&&(0,s.jsx)(VU,{closeNav:n,openNav:c,children:(0,s.jsx)(gG,{isExpanded:r})})]}),(0,s.jsx)("div",{ref:f,children:t})]})})})})},_G=({children:e,isLessonOnlyEmbed:t,...n})=>{const{buttonNavigationStyle:o,navigationType:r,lmsOptions:a,...i}=ie(),c=mc(),l=_h(i)===!0,d=!c,h=i.sidebarMode===ea.OPEN,m=l&&r===Dr&&h&&d,f=ks(i),p=f&&i?.theme?.blockNavigationType===Li.CONTINOUS,[C,g]=(0,u.useState)(m),x=(0,u.useCallback)(()=>{g(!0)},[]),b=(0,u.useCallback)(()=>{g(!1)},[]),y=(0,u.useCallback)(()=>C?b():x(),[C,b,x]);(0,at.A)(Lb,x),(0,at.A)(kb,b);const L=f||t===!0,S=L?"fixed-course-exit":void 0,T=p?{marginInlineEnd:"2rem"}:void 0,k=l?r:void 0;return L?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(d3,{className:S,lmsOptions:a,style:T}),e]}):(0,s.jsx)($G,{...n,beginWithSidebarOpen:h,closeNav:b,courseNavType:k,hideNav:!l,isNavOpen:C,isTablet:c,lessonNavType:o,openNav:x,toggleNav:y,children:e})};var P3=v(26665);const Ba=e=>e===Us.FLOATING||e===Us.FLOATING_FULL;function Fr(){const e=kj();return $t(480)&&e===Us.FLOATING?Us.FLOATING_FULL:e}function M3({className:e,ref:t}){return(0,s.jsx)("svg",{"aria-hidden":"true",className:e,fill:"none",focu
153sable:"false",ref:t,viewBox:"0 0 15 16",xmlns:"http://www.w3.org/2000/svg",children:(0,s.jsx)("path",{d:"M2 8L7.65685 13.6569L13.3137 8",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2"})})}const VG=_("lesson-nav");function zG(e){const{children:t,finish:n,lessonId:o,onFocus:r}=e,a=rn(),i=e["data-direction"];if(o!=null)return(0,s.jsx)(tc,{className:"lesson-nav-link","data-direction":i,lessonId:o,onFocus:r,tooltipClassName:i==="previous"?"lesson-nav-link-tooltip-previous":"lesson-nav-link-tooltip",children:t});const c=n?Pv:"/",l=d=>{if(d.preventDefault(),c==="/"){qs(()=>{a(c)},"lesson-to-cover");return}a(c)};return(0,s.jsx)("span",{className:"lesson-nav-link",children:(0,s.jsx)(un,{className:"lesson-nav-link__link","data-direction":e["data-direction"],onClick:l,onFocus:r,to:c,children:t})})}function Da({children:e,className:t,direction:n,finish:o,navLessonId:r,onFocus:a,ref:i,restrictionType:c}){const d=Sr()?.theme?.buttonScheme,h=c!=null,m=Fr(),p={className:VG(null,{[n]:!0,accent:d===ki.ACCENT,dark:d===ki.DARK,floating:m===Us.FLOATING,"floating-full":m===Us.FLOATING_FULL,finish:o,full:m===Us.FULL,light:d===ki.LIGHT,restricted:h,tint:d===ki.TINT}).mix(t),[`data-${n}-lesson`]:!0};return(0,s.jsx)("div",{ref:i,...p,children:(0,s.jsx)(zG,{"data-direction":n,finish:o,lessonId:r,onFocus:a,children:e})})}const O3=_("lesson-nav");function UG({allowTooltip:e,lessonNameLabel:t,nextLesson:n,nextLessonNumber:o,onFocus:r,ref:a,restrictionData:i,restrictionType:c}){const l=n?.id,d=Fr(),h=Ba(d),f=ta(n)&&l,p=we(n?.title)||"",C=h?Tm:M3,g=f?`${t} ${o} - `:"",x=h&&f?`${t} ${o}`:`${g}${p}`;return(0,s.jsxs)(Da,{allowTooltip:e,direction:"next",isFloating:h,navLessonId:l,onFocus:r,ref:a,restrictionData:i,restrictionType:c,children:[(0,s.jsx)("span",{className:O3("link-text").mix("brand--ui"),children:x}),(0,s.jsx)(C,{className:O3("link-icon")})]})}function GG(e){const t=xe(),n=Uw(e),o=Gw(e),r=Qh(),a=n?.id,i=fa(a),c=ht(i?.data);return{lessonNameLabel:t?.lessonName,lessonPrepositionLabel:t?.lessonPreposition,nextLesson:n,nextLessonNumber:o,restrictionData:a?c:void 0,restrictionType:a?i?.type:void 0,totalLessons:r}}const Qd=_("lesson-nav");function WG({allowTooltip:e,lessonNameLabel:t,lessonPrepositionLabel:n,nextLesson:o,nextLessonNumber:r,onFocus:a,ref:i,restrictionData:c,restrictionType:l,totalLessons:d}){const h=o?.id,m=Fr(),f=Ba(m),C=o&&ta(o)&&h,g=we(o?.title)||"",x=C?`${r} ${n} ${d} \u2014 ${g}`:g,b=f&&C?`${t} ${r}`:x;return(0,s.jsx)(Da,{allowTooltip:e,direction:"next",navLessonId:h,onFocus:a,ref:i,restrictionData:c,restrictionType:l,children:f?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("span",{className:Qd("link-text"),children:b}),(0,s.jsx)(td,{className:Qd("link-icon")})]}):(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(td,{className:Qd("link-icon")}),(0,s.jsx)("span",{className:Qd("link-text"),children:b})]})})}function B3({lessonId:e,...t}){const n=GG(e);return Ct()===se.RISE_CLASSIC?(0,s.jsx)(UG,{...t,lessonNameLabel:n.lessonNameLabel,nextLesson:n.nextLesson,nextLessonNumber:n.nextLessonNumber,restrictionData:n.restrictionData,restrictionType:n.restrictionType}):(0,s.jsx)(WG,{...t,...n})}const D3=_("lesson-nav");function KG({allowTooltip:e,courseFinishLabel:t,onFocus:n,restrictionData:o,restrictionType:r,ref:a}){const i=Fr(),c=Ba(i),l=c?Tm:M3;return(0,s.jsxs)(Da,{allowTooltip:e,direction:"next",finish:!0,isFloating:c,onFocus:n,ref:a,restrictionData:o,restrictionType:r,children:[(0,s.jsx)("span",{className:D3("link-text").mix("brand--ui"),children:t}),(0,s.jsx)(l,{className:D3("link-icon")})]})}const Yd=_("lesson-nav");function QG({allowTooltip:e,courseFinishLabel:t,onFocus:n,ref:o,restrictionData:r,restrictionType:a}){const i=Fr(),c=Ba(i);return(0,s.jsx)(Da,{allowTooltip:e,direction:"next",finish:!0,onFocus:n,ref:o,restrictionData:r,restrictionType:a,children:c?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("span",{className:Yd("link-text"),children:t}),(0,s.jsx)(td,{className:Yd("link-icon")})]}):(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(td,{className:Yd("link-icon")}),(0,s.jsx)("span",{className:Yd("link-text"),children:t})]})})}function Df(e){const n=xe()?.courseFinish??"Finish";return Ct()===se.RISE_CLASSIC?(0,s.jsx)(KG,{...e,courseFinishLabel:n}):(0,s.jsx)(QG,{...e,courseFinishLabel:n})}function YG({className:e,ref:t}){return(0,s.jsx)("svg",{"aria-hidden":"true",className:e,fill:"none",focu
153sable:"false",ref:t,viewBox:"0 0 15 16",xmlns:"http://www.w3.org/2000/svg",children:(0,s.jsx)("path",{d:"M2 8L7.65685 2.34315L13.3137 8",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2"})})}const Zd=_("lesson-nav");function ZG({allowTooltip:e,className:t,courseHomeLabel:n,lessonNameLabel:o,onFocus:r,previousLesson:a,previousLessonNumber:i,ref:c,restrictionData:l,restrictionType:d}){const h=a?.id,m=Fr(),f=Ba(m),C=ta(a)&&h,g=we(a?.title)||n,x=f?Mb:YG,b=C?`${o} ${i} - ${g}`:g,y=C&&f?`${o} ${i}`:b;return(0,s.jsx)(Da,{allowTooltip:e,className:t,direction:"previous",isFloating:f,navLessonId:h,onFocus:r,ref:c,restrictionData:l,restrictionType:d,children:f?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("span",{className:Zd("link-text").mix("brand--ui"),children:y}),(0,s.jsx)(x,{className:Zd("link-icon")})]}):(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(x,{className:Zd("link-icon")}),(0,s.jsx)("span",{className:Zd("link-text").mix("brand--ui"),children:y})]})})}const Xd=_("lesson-nav");function XG({allowTooltip:e,className:t,courseHomeLabel:n,lessonNameLabel:o,lessonPrepositionLabel:r,onFocus:a,previousLesson:i,previousLessonNumber:c,ref:l,restrictionData:d,restrictionType:h,totalLessons:m}){const f=i?.id,p=Fr(),C=Ba(p),x=ta(i)&&f!=null,b=ht(i?.title)??n,y=x?`${c} ${r} ${m} \u2014 ${b}`:b,L=C&&x?`${o} ${c}`:y;return(0,s.jsx)(Da,{allowTooltip:e,className:t,direction:"previous",navLessonId:f,onFocus:a,ref:l,restrictionData:d,restrictionType:h,children:C?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("span",{className:Xd("link-text"),children:L}),(0,s.jsx)(Ub,{className:Xd("link-icon")})]}):(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(Ub,{className:Xd("link-icon")}),(0,s.jsx)("span",{className:Xd("link-text"),children:L})]})})}function Ff({lessonId:e,...t}){const n=tA(e),o=nA(e),r=Qh(),a=xe(),i=Ct(),c=n?.id,l=fa(c),d=ht(l?.data),h=c!=null?d:void 0,m=c!=null?l?.type:void 0;return i===se.RISE_CLASSIC?(0,s.jsx)(ZG,{...t,courseHomeLabel:a?.courseHome,lessonNameLabel:a?.lessonName,previousLesson:n,previousLessonNumber:o,restrictionData:h,restrictionType:m}):(0,s.jsx)(XG,{...t,courseHomeLabel:a?.courseHome,lessonNameLabel:a?.lessonName,lessonPrepositionLabel:a?.lessonPreposition,previousLesson:n,previousLessonNumber:o,restrictionData:h,restrictionType:m,totalLessons:r})}const qG={threshold:0},qd=(e,t)=>{const[n,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||qG);const{current:a}=r;return e.current?a.observe(e.current):o(!1),()=>{a.disconnect()}},[e,t]),n},F3=_("navButtonsFull"),JG=({isVisible:e})=>{(0,P3.A)(()=>window.dispatchEvent(new CustomEvent(vm))),(0,u.useEffect)(()=>{const t=e?Ib:vm;window.dispatchEvent(new CustomEvent(t))},[e])},eW=({isVisible:e})=>{(0,P3.A)(()=>window.dispatchEvent(new CustomEvent(Cm))),(0,u.useEffect)(()=>{const t=e?Eb:Cm;window.dispatchEvent(new CustomEvent(t))},[e])},tW=({children:e,hideNavToHome:t,isTransitioning:n=!1,navNextEnabled: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=Qs(),h=qd(i),m=qd(c),f=(0,u.useCallback)(()=>{a.current?.scrollTo({top:0,behavior:"smooth"})},[]),p=(0,u.useCallback)(()=>{const g=a.current?.scrollHeight;a.current?.scrollTo({top:g,behavior:"smooth"})},[]);(0,at.A)(Ql,f),(0,at.A)(Yl,p),JG({isVisible:h}),eW({isVisible:m}),(0,u.useEffect)(()=>{if(!n&&i.current){const x=(i.current?.clientHeight??0)+1;a.current?.scrollTo({top:x})}},[n]);const C=F3("navPrev",{visible:h,hide:n});return(0,s.jsx)("div",{className:"page-wrap",id:"page-wrap",ref:a,children:(0,s.jsxs)("div",{className:F3(),children:[!t&&d&&(0,s.jsx)("div",{className:C,children:(0,s.jsx)(Ff,{lessonId:d,ref:i})}),e,o&&d&&(0,s.jsx)(B3,{lessonId:d,ref:c}),r&&(0,s.jsx)(Df,{lessonId:d,ref:l})]})})},gc=_("navButtonsFloating"),H3=({transitionIn:e,buttonType:t,children:n})=>{const o=(0,u.useRef)(null),r={entered:gc(t,{entered:!0}),exiting:gc(t,{exiting:!0}),exited:gc(t,{exited:!0})};return(0,s.jsx)(Lg,{in:e,nodeRef:o,timeout:250,children:a=>(0,s.jsx)("div",{className:r[a],ref:o,children:n})})},$3={threshold:.2}
153,nW=({topRef:e,bottomRef:t,pageWrapRef:n,isTransitioning:o})=>{const r=qd(e,$3),a=qd(t,$3),[i,c]=(0,u.useState)(!1),[l,d]=(0,u.useState)(!1),h=(0,u.useRef)(o),m=(0,u.useCallback)(()=>{n.current?.scrollTo({top:2,behavior:"smooth"})},[n]);return(0,lc.A)(m),(0,u.useEffect)(()=>{const f=h.current;h.current=o,f&&!o&&m()},[o,m]),(0,u.useEffect)(()=>{c(a&&!o),d(r&&!o)},[a,r,o]),{showPrev:l,showNext:i}},sW=({children:e,isCurrentLessonQuiz:t,isTransitioning:n=!1,navNextEnabled:o,hideNavToHome:r,navFinishEnabled:a})=>{const 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=Qs(),{showNext:p,showPrev:C}=nW({topRef:h,bottomRef:m,pageWrapRef:i,isTransitioning:n}),g=(0,u.useCallback)(()=>{i.current?.scrollTo({top:0,behavior:"smooth"})},[]),x=(0,u.useCallback)(()=>{const b=i.current?.scrollHeight;i.current?.scrollTo({top:b,behavior:"smooth"})},[]);return(0,at.A)(Ql,g),(0,at.A)(Yl,x),(0,u.useEffect)(()=>{t&&(o||a)&&x()},[t,o,a,x]),(0,s.jsxs)("div",{className:"page-wrap",id:"page-wrap",ref:i,children:[(0,s.jsx)("div",{className:gc("top"),ref:h}),!r&&f&&(0,s.jsx)(H3,{buttonType:"prev",transitionIn:C,children:(0,s.jsx)(Ff,{lessonId:f,onFocus:g,ref:c})}),e,(0,s.jsx)(H3,{buttonType:"next",transitionIn:p&&!!(o||a),children:o&&f?(0,s.jsx)(B3,{lessonId:f,onFocus:x,ref:l}):a?(0,s.jsx)(Df,{lessonId:f,onFocus:x,ref:d}):null}),(0,s.jsx)("div",{className:gc("bottom"),ref:m})]})},_3=(0,u.createContext)("present"),V3=(0,u.createContext)(!0);function oW({status:e,mediaActive:t,children:n}){return(0,s.jsx)(_3.Provider,{value:e,children:(0,s.jsx)(V3.Provider,{value:t,children:n})})}function Hf(){return(0,u.useContext)(_3)}function rW(){return(0,u.useContext)(V3)}function Jd(e){return{finished:e.finished,cancel:()=>e.cancel(),progress:()=>{const t=e.effect?.getComputedTiming().progress;return typeof t=="number"?t:null}}}function z3(e,t,n,o){return{key:e,instanceId:o,status:t,direction:n}}function aW(e,t,n){const o=e.generation+1,r=e.items.find(l=>l.key===t);let a;r!=null?a={...r,status:"entering",direction:n}:a=z3(t,"entering",n,o);const i=e.items.filter(l=>l.key!==t).map(l=>({...l,status:"exiting",direction:n})),c=i.length>1?i.slice(0,1):i;return{currentKey:t,generation:o,items:[a,...c]}}function iW(e,t,n,o){return o==="exit"?{...e,items:e.items.filter(r=>!(r.key===t&&r.instanceId===n))}:{...e,items:e.items.map(r=>r.key===t&&r.instanceId===n?{...r,status:"present"}:r)}}function cW(e,t){switch(t.type){case"ROUTE_CHANGED":return aW(e,t.nextKey,t.direction);case"ITEM_FINISHED":return t.generation!==e.generation?e:iW(e,t.key,t.instanceId,t.phase)}}const U3="(prefers-reduced-motion: reduce)";function lW(e){if(typeof window>"u"||!window.matchMedia)return()=>{};const t=window.matchMedia(U3);return t.addEventListener("change",e),()=>t.removeEventListener("change",e)}function dW(){return typeof window>"u"||!window.matchMedia?!1:window.matchMedia(U3).matches}const uW=()=>!1;function hW(e){return(e.find(n=>n.status==="exiting")??e.find(n=>n.status==="present")??e[0])?.instanceId??null}function G3({current:e,animate:t,getDirection:n,reducedMotion:o,initialStatus:r="present",initialDirection:a="forward",animationTimeoutMs:i=1500,onEntered:c,onExited:l}){const d=(0,u.useSyncExternalStore)(lW,dW,uW),h=o??d,[m,f]=(0,u.useReducer)(cW,e,T=>({currentKey:T,generation:0,items:[z3(T,r,a,0)]}));m.currentKey!==e&&f({type:"ROUTE_CHANGED",nextKey:e,direction:n(m.currentKey,e)});const p=(0,u.useRef)(new Map),C=(0,u.useRef)(new Map),g=T=>{let k=p.current.get(T);return k||(k=I=>{I?C.current.set(T,I):C.current.delete(T)},p.current.set(T,k)),k},x=(0,u.useRef)(new Map),b=(0,u.useRef)(new Map),y=(0,u.useRef)(c),L=(0,u.useRef)(l);y.current=c,L.current=l;const S=(0,u.useRef)([]);return(0,u.useEffect)(()=>{const T=S.current;if(T.length!==0){S.current=[];for(const k of T)try{k.type==="enter"?y.current?.(k.key,k.instanceId):L.current?.(k.key,k.instanceId)}catch(I){console.error("useTransitionPresence callback threw:",I)}}},[m.items]),(0,u.useLayoutEffect)(()=>{const T=E=>{const N=b.current.get(E);N!=null&&(clearTimeout(N),b.current.delete(E))},k=(E,N,M,A)=>{T(N),f({type:"ITEM_FINISHED",key:E,instanceId:N,phase:M,generation:A}),S.current.push({type:M==="enter"?"enter":"exit",key:E,instanceId:N})},I=new Set(m.items.map(E=>E.instanceId));for(const[E,N]of Array.from(x.current.entries()))I.has(E)||(N.handle.cancel(),x.current.delete(E),T(E));
153m.items.forEach(E=>{if(E.status==="present")return;const N=E.status==="entering"?"enter":"exit",M=x.current.get(E.instanceId);if(M&&M.phase===N&&M.generation===m.generation&&M.reducedMotion===h)return;let A=null;M&&(M.phase!==N&&M.direction!==E.direction&&(A=M.handle.progress?.()??null),M.handle.cancel(),x.current.delete(E.instanceId),T(E.instanceId));const j=m.generation,w=C.current.get(E.instanceId);if(!w){k(E.key,E.instanceId,N,j);return}const P=t(w,{phase:N,direction:E.direction,reducedMotion:h,fromProgress:A});if(!P){k(E.key,E.instanceId,N,j);return}x.current.set(E.instanceId,{handle:P,phase:N,direction:E.direction,generation:j,instanceId:E.instanceId,reducedMotion:h});const R=setTimeout(()=>{const O=x.current.get(E.instanceId);O?.handle===P&&O.generation===j&&(O.handle.cancel(),x.current.delete(E.instanceId),k(E.key,E.instanceId,N,j))},i);b.current.set(E.instanceId,R),Promise.resolve(P.finished).then(()=>{const O=x.current.get(E.instanceId);O?.handle===P&&O.generation===j&&(x.current.delete(E.instanceId),k(E.key,E.instanceId,N,j))},()=>{const O=x.current.get(E.instanceId);O?.handle===P&&O.generation===j&&(x.current.delete(E.instanceId),k(E.key,E.instanceId,N,j))})})},[m.items,m.generation,t,h,i]),(0,u.useEffect)(()=>{const T=new Set(m.items.map(k=>k.instanceId));for(const k of Array.from(p.current.keys()))T.has(k)||p.current.delete(k)},[m.items]),(0,u.useEffect)(()=>()=>{x.current.forEach(({handle:T})=>T.cancel()),x.current.clear(),b.current.forEach(T=>clearTimeout(T)),b.current.clear()},[]),{presence:m.items.map(T=>({key:T.key,instanceId:T.instanceId,status:T.status,direction:T.direction,ref:g(T.instanceId)})),isTransitioning:m.items.some(T=>T.status!=="present"),mediaOwnerInstanceId:hW(m.items)}}const $f=750,W3=300,mW=59.9375,fW="ease",K3="100vh",rge=$f+W3+750,pW=e=>e.querySelector(".page__wrapper")??e,gW=e=>{const t=document.getElementById("page-wrap"),n=t?.scrollTop??0;t&&(t.scrollTop=0),e.scrollTop=n},vW=()=>typeof window<"u"&&window.matchMedia(`(max-width: ${mW}em)`).matches?W3:0,Q3=(e,t,n)=>{t!=null&&(e.currentTime=n+(1-t)*$f)},CW=(e,{phase:t,direction:n,reducedMotion:o,fromProgress:r})=>{if(t==="exit"&&gW(e),o)return null;const a=t==="enter"?pW(e):e;if(typeof a.animate!="function")return null;const i=vW(),c={duration:$f,easing:fW,fill:t==="exit"?"forwards":"auto",delay:i};if(t==="exit"){const h=n==="forward"?"-100%":"100%",m=a.animate([{transform:"translate3d(0, 0, 0)",opacity:1},{transform:`translate3d(0, ${h}, 0)`,opacity:.5}],c);return Q3(m,r,i),Jd(m)}const l=n==="forward"?"100%":"-100%",d=a.animate([{height:K3,transform:`translate3d(0, ${l}, 0)`},{height:K3,transform:"translate3d(0, 0, 0)"}],c);return Q3(d,r,i),Jd(d)},Y3=(e,t)=>e===ji?1/0:t.findIndex(n=>String(n.id)===String(e));function bW(e,t,n){if(e===null||e===t)return"forward";const o=Y3(e,n);return Y3(t,n)>o?"forward":"backward"}function xW({children:e,currentLessonId:t,lessons:n,onLessonEntered:o,onTransitioningChange:r}){const a=(0,u.useRef)(new Map);a.current.set(t,e);const{presence:i,isTransitioning:c,mediaOwnerInstanceId:l}=G3({current:t,animate:CW,getDirection:(h,m)=>
153bW(h,m,n),animationTimeoutMs:1800,onEntered:h=>{o?.(String(h))}});(0,u.useEffect)(()=>{r?.(c)},[c,r]);const d=new Set(i.map(h=>String(h.key)));for(const h of a.current.keys())d.has(h)||a.current.delete(h);return(0,s.jsx)(s.Fragment,{children:i.map(h=>{const m=String(h.key),f=h.status==="present";return(0,s.jsx)("div",{"aria-hidden":!f,"data-direction":h.direction,"data-lesson-transition":!0,"data-state":h.status,inert:f?void 0:!0,ref:h.ref,children:(0,s.jsx)(oW,{mediaActive:h.instanceId===l,status:h.status,children:a.current.get(m)})},h.instanceId)})})}var yW=v(87467),Z3=v.n(yW),SW=v(89858),_f=v.n(SW);const TW=_f()(Je()("family","continue"),Je()("variant","continue")),LW=De()(Z3()(TW),Rn()([],"items")),{FULL:kW,FLOATING:X3}=Us,IW=_("lessonNavigation"),EW=({children:e})=>{const t=(0,u.useRef)(null);return(0,s.jsx)("div",{className:"page-wrap",id:"page-wrap",ref:t,children:e})},NW=(e,t)=>typeof t=="object"&&t!==null&&"drawCount"in t&&typeof t.drawCount=="number"?e+t.drawCount:e+1,jW=(e=[])=>e.reduce(NW,0),wW=({children:e,isLessonOnlyEmbed:t,onLessonEntered:n})=>{const o=ie(),r=o.buttonNavigationStyle,{showNavigationButtons:a,lessonsOnly:i,lmsOptions:c}=o,l=(0,u.useRef)(null),d=$t(480),h=Qs(),m=Bt(h),f=Ao(h),[p,C]=(0,u.useState)(r),[g,x]=(0,u.useState)(!1),b=i?.[0]?.id,y=o.exportSettings?.webExportSettings?.disableCoverPage===!0,L=!Es.isInstantLink&&(c?.disableCoverPage===!0||y)&&b===h,S=!Es.isInstantLink&&c?.disableCoverPage===!0,T=c?.disableCoverPage===!0?L:S;(0,u.useEffect)(()=>{r!==p&&(C(r),window.dispatchEvent(new CustomEvent(Ql)))},[r,p]);const k=m!=null&&m.type!=null?m:void 0,I=k!=null&&(LW(k)||Mv(k))?f?.isComplete===!0:!0,E=k?.type==="quiz",N=f?.type==="quiz"?f.activeIndex:void 0,M=E&&N!=null&&N===jW(k.items)+1,{skipLessonsIfPassed:A,skipLessonsOptional:j,skipToLessonId:w}=Yh(h),P=f?.type==="quiz"&&f.passed===!0,R=E&&P&&A&&!j&&!!w,O=E&&!M||k?.settings?.continueType==="continue"||R,B=m!=null?C2({course:o,lesson:m}):void 0,D=B!=null&&B!==!1,F=h===ji,V=window.isPublicShare===!0,U=D&&t!==!0&&I&&!O&&!F,H=!D&&I&&!1,K=IW("wrapper",{full:r===kW||d,floating:r===X3&&!d}),z=a!==!0||t===!0?EW:r===X3&&!d?sW:tW;(0,u.useEffect)(()=>{const G=document.querySelector(".page__content");G&&G.classList.add("page__content--preview-nav")},[z]);const W=o?.lessons??[],$=h?(0,s.jsx)(xW,{currentLessonId:h,lessons:W,onLessonEntered:n,onTransitioningChange:x,children:e}):e;return(0,s.jsx)("div",{className:K,ref:l,children:(0,s.jsx)(z,{hideNavToHome:T,isTransitioning:g,navFinishEnabled:H,navNextEnabled:U,children:$})})};var AW=v(97954);const q3=()=>(0,s.jsx)("div",{className:"unsupported-block",children:(0,s.jsxs)("span",{children:["We no longer support this block, so you can safely delete it. If you have any questions, please"," ",(0,s.jsx)("a",{href:"https://access.articulate.com/support/contact",children:"contact Articulate Support."})]})}),cge=null;function J3(e,t){return`${e}/${t}`}function RW(e,{prepareProps:t,extras:n}){const o={...e,...n};return function(a){const i=o[J3(a.family,a.variant)];if(!i)return(0,s.jsx)(q3,{});if(i.render)return i.render(a);const{Component:c,propsBefore:l,propsAfter:d}=i;if(c===null)return null;const h={...l?.(a),...t(a),...d?.(a)};return(0,u.createElement)(c,h)}}function Vf(e){const{type:t,handleStorylineFullscreen:n,dividerNumber:o,...r}=e;return r}function PW(e,t){const{className:n="",tag:o="div",style:r={},...a}=e,{backgroundColor:i}=dn(),c=oR(),l=c===Tt.DARK?Tt.LIGHT:Tt.DARK;return i!==""&&Object.assign(r,{"--color-background-contrast":c,"--color-background-contrast-complementary":l,"--color-background-contrast-rgb":Bo(c)?.slice(0,3)}),(0,s.jsx)(o,{...a,className:n,ref:t,style:r})}const ey=(0,u.forwardRef)(PW),MW=10,ty=e=>`${e}rem`,zf=e=>e!=null?`${e/MW}rem`:void 0,OW=["image full","image text overlay","quote background"];function BW(e){const{family:t,variant:n,backgroundType:o,isOnlyBlockInStep:r,isOnePage:a}=e;if(!a||!r)return!1;if(o===re.IMAGE)return!0;if(!t||!n)return!1;const i=`${t} ${n}`;return OW.some(c=>c===i)}const ny={paddingBottom:"0rem",paddingTop:"0rem"},DW=e=>
153{const{blockSettings:t,familyTheme:n,courseTheme:o,isFullWidthImage:r,isPresentation:a}=e;if(a)return{...ny,paddingLeft:"0rem",paddingRight:"0rem"};if(r)return ny;const i=ty(Number(F2(t?.paddingTop,n?.paddingStart,o?.blockPaddingStart,3)));return{paddingBottom:ty(Number(F2(t?.paddingBottom,n?.paddingEnd,o?.blockPaddingEnd,3))),paddingTop:i}},FW=e=>({"--rise-block-padding-top":e.paddingTop,"--rise-block-padding-bottom":e.paddingBottom,"--rise-block-padding-left":e.paddingLeft,"--rise-block-padding-right":e.paddingRight}),HW={},$W=e=>e?{bodyFontSize:zf(e.bodyFontSize),headingFontSize:zf(e.headingFontSize),subheadingFontSize:zf(e.subheadingFontSize)}:HW;function _W(){const e=Dt(),t=$e(),n=Ro(),o=ks(t),r=BW({backgroundType:e?.settings?.backgroundType,family:e?.family,isOnePage:o,isOnlyBlockInStep:e?.isOnlyBlockInStep,variant:e?.variant});return DW({blockSettings:e?.settings,courseTheme:t?.theme,familyTheme:n,isFullWidthImage:r,isPresentation:ko(t)})}function VW(){const e=Ro();return $W(e)}function zW(){const e=_W();return{fontSize:VW(),padding:e}}const UW=N0()(["settings"]),sy=_("block-wrapper"),GW=_("bg"),WW=(e,t)=>{const{children:n,className:o,defaultBackgroundColor:r="",style:a,tag:i,type:c,...l}=e,d=Dt(),h=nm(),m=zW(),f=rs(),p=tm(r,h.backgroundColor),C=p||"transparent",g=d?.className,x={...a,...h.backgroundImageCss,"--color-background":p,...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 ${C} `,...f?FW(m.padding):{paddingBottom:m.padding.paddingBottom,paddingTop:m.padding.paddingTop}},b=q()(o,{"bg--legacy-background":h.isLegacyBackground,[`block-${c}`]:!!c}),y=GW({card:h.cardMode,range:h.colorRange,type:h.backgroundTypeLowercase,"overlay-light":h.isOverlayLight,"contrast-light":h.isContrastLight}),L=g?sy({}).mix(y).mix(g):sy({}).mix(y),S=[b,L.toString()].join(" ");return(0,s.jsxs)(ey,{...UW(l),className:S,ref:t,style:x,tag:i,children:[(0,s.jsx)("span",{"aria-label":h.backgroundImageAlt,role:gv(h.backgroundImageAlt)}),n]})},Ae=(0,u.forwardRef)(WW);class KW 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,n){return n.prevScope!==t.scope?{hasError:!1,error:void 0,prevScope:t.scope}:n}componentDidCatch(t){$s.L2.addError(t,{scope:this.props.scope},"source")}render(){const{hasError:t,error:n}=this.state,{FallbackComponent:o}=this.props;return t||n?(0,s.jsx)(o,{}):this.props.children}}const oy=KW,QW=_("block-ai-scenario"),YW=(0,u.lazy)(()=>v.e("webpack_container_remote_ai_scenario_learner-player-react").then(v.t.bind(v,58812,23)));
153function ZW({scenarioId:e,onExit:t}){const{currentLocale:n}=tt(),o=Mn(),r=$e(),a=(0,u.useMemo)(()=>({active:n,source:o}),[n,o]),i=r?.aiScenarios,c=e&&ry(i)?i[e]:void 0,l=ry(c)?c:void 0;return(0,s.jsx)(Ae,{className:QW("wrapper"),children:(0,s.jsx)(oy,{FallbackComponent:qW,children:(0,s.jsx)(u.Suspense,{children:(0,s.jsx)(YW,{l10n:l?.l10n,locale:a,locales:l?.locales,onExit:t,resolvePath:mt,scenario:l?.data,source:l?.source,sourceLocale:l?.sourceLocale})})})})}const XW=(0,u.memo)(ZW);function ry(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}function qW(){return null}var JW=v(77533),Uf=v.n(JW);const ay=":focus{outline: none}",eK=":focus:not(:focus-visible){outline: none}",iy="focus-ring-style",Gf=()=>document.getElementById(iy)||tK(),tK=()=>{const e=document.createElement("style");return e.id=iy,document.head.appendChild(e),e},nK=0,sK=-1,oK=e=>{const t=Gf();document.addEventListener("mousedown",()=>{setTimeout(()=>{t.innerHTML=ay},0),e?.(!1)}),window.addEventListener("keydown",n=>{rK(n,e)})},rK=(e,t)=>{const n=e.target,o=Gf();(Ul(e)||_i(e)&&!n.classList.contains("ignore-prefers"))&&(o.innerHTML="",t?.(!0))},cy=({focusVisible:e}={})=>Gf().innerHTML=e?eK:ay,aK=e=>e?nK:sK,ly=({list:e,index:t})=>{t>=0&&t<is()(e)&&e[t].focus()},iK=({list:e,currentIndex:t})=>{const n=Ll()(t||0),o=n<is()(e)?n:0;return ly({list:e,index:o}),o},cK=({list:e,currentIndex:t})=>{const n=Uf()(t||is()(e));return ly({list:e,index:n}),n};var vc=v(49860);const lK=1e3,dK={fadeInGrow:"scale(0.95)",fadeInLeft:"translateX(-50px)",fadeInLeftSmall:"translateX(-25px)",fadeInRight:"translateX(50px)",fadeInUp:"translateY(25px)"},uK=e=>{const{afterAnimatedIn:t,animateIn:n="fadeIn",children:o,className:r,duration:a=1,initiallyVisible:i,siblingDelay:c=0}=e,l=vc.useRef(null),[d,h]=vc.useState(!1);vc.useEffect(()=>{const f=l.current;if(i&&f){h(!0);return}if(d||!f||typeof window>"u")return;const p=Jm(),C=new IntersectionObserver(([x])=>{x!=null&&(x.isIntersecting||x.intersectionRatio>0)&&(h(!0),C.unobserve(x.target))},{root:p,rootMargin:I1,threshold:0});C.observe(f);const g=setTimeout(()=>{h(x=>{if(x)return x;const b=l.current;if(!b)return x;const y=b.getBoundingClientRect(),L=p?.getBoundingClientRect(),S=L?.top??0,T=L?.bottom??window.innerHeight,k=(T-S)*.1;return y.bottom>S-k&&y.top<T+k?!0:x})},lK);return()=>{C.disconnect(),clearTimeout(g)}},[i,d]),vc.useEffect(()=>{const f=l.current;if(!f||!t)return;const p=C=>{C.target instanceof Element&&C.target.parentElement===f&&C.propertyName==="opacity"&&t()};return f.addEventListener("transitionend",p),()=>{f.removeEventListener("transitionend",p)}},[t]),vc.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":n==="none"?"0s":`${a}s`,"--scroll-animation-from":dK[n]??"translateY(0)"};return(0,s.jsx)("div",{className:q()("scroll-animation",r,{"scroll-animation--in":d}),ref:l,style:m,children:o})},He=e=>{const{afterAnimatedIn:t,animateBlockEntrance:n,animateIn:o,children:r,className:a,duration:i,initiallyVisible:c,isLearner:l,siblingDelay:d}=e;return l&&n&&!mn()?(0,s.jsx)(uK,{afterAnimatedIn:t,animateIn:o,className:a,duration:i,initiallyVisible:c,siblingDelay:d,children:r}):Array.isArray(r)?(0,s.jsx)("div",{children:r}):r};var hK=v(69419),mK=v(58016),fK=v.n(mK);const pK=/(\.\.\/)|(\.\.\.\.\/)+|%2e%2e\/|%252e%252e\/|%2f\/|\/%2e%2e/gi,gK=e=>typeof e=="string"&&e.replace(pK,""),In=fK()(gK,hK.J);var dy=v(49860);const eu=_("blocks-button"),uy=iE,vK=({description:e})=>(0,s.jsx)(je,{className:eu("description"),value:e}),CK=({color:e,destination:t,editBlock:n,handleNavigate:o,isEditable:r,label:a,type:i})=>{const c=JC(),l=$e()?.externalLinksDisabled,d=$e()?.theme,h=Oi(),{mode:m}=(0,Pe.g)(),f=dn(),p=Nt(),C=we(t),g=(0,Or.htmlDecode)(An(we(a))),x=i==="email",b=i==="exit-course",y=i==="lesson",L=i==="relative-url",S=eu("button"),T=!e||e===""||e===h,k=e??h,I={},E=e2(h),N=T&&d?.accentContrast===Le.AUTO?Le.AUTO:E,M=f?.buttonColorContrast??N,A=f?.buttonRadius??null,
153j=f?.buttonWidth??null,w=Ut({backgroundColor:k,contrast:M});Object.assign(I,{...!T&&{"--color-button-bg":k},...!T&&{"--color-button-text":w},...!T&&{"--color-button-border":"transparent"},...A!=null&&{"--radius-button":`${Number(A)}px`},...j!=null&&{"--width-button":`${Number(j)}rem`}});const P=l&&Gn(C),{handleMouseEnter:R,handleMouseLeave:O,handleFocus:B,handleBlur:D}=Td(),F=dy.useId(),V=(0,u.useCallback)(()=>{if(r)n();else{if(P)return;if(b)return Rg()}},[n,P,r,b]),U=(0,u.useCallback)(()=>{o(C)},[C,o]);if(r||P||b){const H=(0,s.jsx)("button",{"aria-describedby":P?gs(F):void 0,"aria-label":g,className:S,id:P?F:void 0,onBlur:P?()=>D(F):void 0,onClick:V,onFocus:P?()=>B(F):void 0,onKeyDown:Z2(V),onMouseEnter:P?()=>R(F):void 0,onMouseLeave:P?()=>O(F):void 0,style:I,tabIndex:0,type:"button",children:g});return P?(0,s.jsxs)(s.Fragment,{children:[H,(0,s.jsx)(Ld,{anchorId:F})]}):H}else if(y){const H=C?xn(C,m):"#";return(0,s.jsx)(un,{"aria-label":g,className:S,onClick:U,style:I,to:H,children:g})}else{const H=L?C:In(C),K=x?`mailto:${C}?subject=${c}`:H,Q=Ys.isIphoneSafari?"_top":"_self",z=x?Q:"_blank",W=z==="_blank",$=W?"noopener noreferrer nofollow":void 0,G=p?.a11yNoticeLinkNewTab||"(opens in a new tab)",Z=W?`${g} ${G}`:g;return(0,s.jsx)("a",{"aria-label":Z,className:S,href:K,rel:$,style:I,tabIndex:0,target:z,children:g})}},hy=e=>{const{animateBlockEntrance:t,editable:n,editBlock:o=()=>{},handleNavigate:r,initiallyVisible:a,isLearner:i,items:c=[],renderDescription:l=vK,settings:d}=e,{buttonAlignment:h="right",buttonColor:m,buttonShowDescription:f=!0,buttonStack:p,entranceAnimation:C}=d,g=eu(null,{"no-animation":!C,description:f==!0,center:h==="center",left:h==="left",right:h==="right",rounded:uy==="rounded"}),x=c?.map(({id:b,description:y,...L})=>{const S=(0,s.jsx)(CK,{...L,color:m,editBlock:o,handleNavigate:r,isEditable:n}),T=f&&l({id:b,description:y});return(0,s.jsx)("section",{className:eu("container"),children:h==="left"&&f?(0,s.jsxs)(s.Fragment,{children:[S,T]}):(0,s.jsxs)(s.Fragment,{children:[T,S]})},b)})??null;if(p){const{paddingBottom:b,paddingTop:y}=d,L={...y!=null&&{paddingTop:`${Number(y)}rem`},...b!=null&&{paddingBottom:`${Number(b)}rem`}};return(0,s.jsx)("div",{className:g.toString(),style:L,children:x})}return(0,s.jsx)(Ae,{className:g.toString(),children:(0,s.jsx)(He,{animateBlockEntrance:t,animateIn:"fadeIn",initiallyVisible:a,isLearner:i,children:(0,s.jsx)("div",{className:"blocks-button",children:x})})})},bK=hy;class xK extends dy.Component{renderButtonDelegate;constructor(t){super(t),this.renderButtonDelegate=this.renderButton.bind(this)}static get defaultProps(){return{items:[],lessonId:"",blockId:"",editBlock:()=>{}}}renderButton(t,n){const{blockId:o,editable:r,editBlock:a,handleNavigate:i,isLearner:c,lessonId:l,initiallyVisible:d}=this.props;return(0,s.jsx)(hy,{animateBlockEntrance:!1,blockId:o,editable:r,editBlock:a,handleNavigate:i,initiallyVisible:d,isLearner:c,items:[t],lessonId:l,settings:n,type:"right"})}render(){const{animateBlockEntrance:t,initiallyVisible:n,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=q()("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":uy==="rounded"});return(0,s.jsx)(Ae,{className:m,children:(0,s.jsx)(He,{animateBlockEntrance:t,initiallyVisible:n,isLearner:o,children:r.map((f,p)=>{const C=p===0,g={buttonColor:a.buttonColor||this.props.color,buttonStyle:a.buttonStyle,buttonStack:!0,buttonShowDescription:l,buttonAlignment:d,...C?{}:{paddingTop:h}};return(0,s.jsx)(u.Fragment,{children:i(f,g)},f.id)})})})}}var my=v(67750),yK=v(49860);function SK(e,t){const n=Cv(e.src),o=e.width&&e.height&&!n,r=o?"async":void 0,a=o?"lazy":void 0,i=o?e.width:void 0,c=o?e.height:void 0;return(0,s.jsx)("img",{...e,decoding:r,height:c,loading:a,ref:t,width:i})}const Wf=yK.forwardRef(SK);var nt=v(49860);const _t=_("block-code"),TK=`${Ne("CDN_URI")}/assets/rise/assets/blocks/code_block_unavailable.svg`;function fy(e,t){const n=py(my.parse(e.data));for(const o of n)if(o.type==="notification")t[o.method]?.(o.params);else throw new Error(`Unsupported RPC type "${o.type}"`)}function*py(e){if(Array.isArray(e))for(const t of e)yield*py(t);else yield e}function gy(e,t,n){return nt.useEffect(()=>{const r=new AbortController;return window.addEventListener("message",a=>{a.origin===window.origin&&t!=null&&e.current&&a.source===e.current.contentWindow&&fy(a,t)},{signal:r.signal}),()=>r.abort()},[t,e]),nt.useCallback(r=>{e.current?.contentWindow?.postMessage(r,n)},[e,n])}const LK=(e,t,n)=>gy(e,n,window.origin),kK=(e,t,n)=>gy(e,n,"*"),IK=(e,t,n)=>{const[o,r]=nt.useState(()=>new BroadcastChannel(t));return nt.useEffect(()=>()=>o.close(),[o]),nt.useEffect(()=>{o.name!==t&&r(new BroadcastChannel(t))},[o,t]),nt.useEffect(()=>{const i=new AbortController;return o.addEventListener("message",c=>fy(c,n),{signal:i.signal}),()=>i.abort()},[o,n]),nt.useCallback(i=>{o.postMessage(i)},[o])},EK=di()?Ys.isLocalFilesystem?kK:IK:LK,NK=window.location.origin==="";function jK(e){let t=NK?"":"lib/sandbox/sandbox.html";return t+=`#channel=${encodeURIComponent(e)}`,t}function wK(e){return typeof e=="number"?`${e/10}rem`:"-1px"}const AK={0:"small",1:"medium",2:"full"};function Kf({editBlock:e,errors:t,isDragPreview:n,isLearn:o,isSidebarPreview:r,items:a,labels:i,onClearErrors:c,onError:l,onStep:d,previewType:h,settings:m}){const f=nt.useRef(null),C=$e()?.htmlBlocksDisabled,g=n||r||!!h,[x]=a,b=we(x.srcdoc),y=we(x.media),L=y?.sandbox?.src==null?void 0:`${y.sandbox.src}/index.html`,S=m?.autoResize===!0,T=m?.width??"0",[k,I]=nt.useState("-1px");nt.useEffect(()=>{S||I(wK(m?.height))},[S,m?.height]);const[E,N]=nt.useState(0),[M,A]=nt.useState(!1),[j,w]=nt.useState(!1),[P]=nt.useState(()=>`rise-frontend-sandbox-${window.crypto.randomUUID()}`),R=jK(P),O=nt.useCallback(()=>{d?.({id:x.id})},[x.id,d]),B=nt.useCallback(({message:W})=>{l?.({message:W}),w(!0),console.error("Sandbox Error",W)},[l,w]),D=nt.useCallback(()=>{c?.(),w(!1),N(W=>W+1)},[c]),F=nt.useCallback(()=>{A(E>0)},[E]),V=nt.useCallback(({height:W})=>{S&&I(`${W}px`)},[S]),U=nt.useMemo(()=>({oncomplete:O,onerror:B,onload:F,onready:D,onresize:V}),[O,B,D,F,V]),H=EK(f,P,U),K=nt.useCallback((W,$)=>{if(f==null&&E===0)throw new Error("Attempted to send message to sandbox before it is ready");const G=my.format.notification(W,$);H(G)},[E,f,H]),Q=nt.useCallback(()=>{window.location.reload()},[]),z=nt.useCallback(()=>{e?.()},[e]);return nt.useEffect(()=>{E&&K("onupdate",{autoResize:S,src:L,srcDoc:b})},[S,E,K,L,b]),o&&t!=null||j?(0,s.jsx)(Ae,{children:(0,s.jsxs)("div",{className:_t("error-general",{learn:o}),children:[(0,s.jsx)("div",{className:_t("error-message"),children:"Something went wrong"}),(0,s.jsx)("div",{className:_t("error-message-subtitle"),children:"There was an error loading this code block. Please contact your admin if the issue continues."}),(0,s.jsx)("button",{className:_t("error-button"),onClick:Q,type:"button",children:"Refresh page"})]})}):t!=null&&Object.keys(t).length>0?(0,s.jsx)(Ae,{children:t[404]?(0,s.jsxs)("div",{className:_t("error-404"),children:[(0,s.jsx)("div",{className:_t("error-message"),children:"We couldn\u2019t find your file"}),(0,s.jsx)("div",{className:_t("error-message-subtitle"),children:"Make sure your zip file contains an index.html file."}),(0,s.jsx)("button",{className:_t("error-button"),onClick:z,type:"button",children:"Retry upload"})]}):(0,s.jsxs)("div",{className:_t("error-general"),children:[(0,s.jsx)("div",{className:_t("error-message"),children:"Something went wrong"}),(0,s.jsxs)("div",{className:_t("error-message-subtitle"),children:["Try refreshing the page or entering your co
153de again. If the issue isn't fixed,"," ",(0,s.jsx)("a",{href:"https://community.articulate.com/group/code-block",rel:"noopener noreferrer",target:"_blank",children:"visit our community"}),"."]}),(0,s.jsx)("button",{className:_t("error-button"),onClick:Q,type:"button",children:"Refresh page"})]})}):C&&!g?(0,s.jsx)(Ae,{children:(0,s.jsx)("div",{className:_t("restricted"),children:(0,s.jsxs)("div",{className:_t("restricted-card"),children:[(0,s.jsx)(Wf,{alt:"",className:_t("restricted-icon"),src:TK}),(0,s.jsx)("div",{className:_t("restricted-title"),children:"Subscribe to unlock full access"}),(0,s.jsx)("div",{className:_t("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,s.jsx)(Ae,{children:(0,s.jsx)("iframe",{allow:"fullscreen",className:_t({"auto-resize":S,loaded:g||M,width:AK[T]}),"data-rise-frontend-sandbox":"",loading:"lazy",ref:f,sandbox:"allow-forms allow-popups allow-same-origin allow-scripts",scrolling:S?"no":void 0,src:R,style:{"--block-html-height":k},title:i?.a11yBlockCode},P)})}const Qe=({value:e,className:t,allowTabNavigation:n=!0,tagName:o,id:r,emptyFallback:a=null,transformValue:i})=>{const{value:c}=qm(we(e));return c?(0,s.jsx)(je,{allowTabNavigation:n,className:t,id:r,tagName:o,transformValue:i,value:e}):a},hge="group",RK="tablist",PK="tabpanel",mge="tab",fge="radio",Cc=({caption:e,editable:t,id:n,isOverlayType:o,getL10nValue:r})=>{const a=!!(!o&&!t&&r(e));return{figcaptionId:a?`figcaption-${n}`:void 0,isFigure:a,role:a?"figure":void 0,tagName:a?"figure":"div"}};var MK=v(49860);function it(e){const t=MK.forwardRef((n,o)=>{const r=rt();return(0,s.jsx)(e,{...n,getL10nValue:r,ref:o})});return t.displayName=`withLocalizedLookup(${e.displayName||e.name})`,t}var vy=v(49860);const OK=vy.lazy(async()=>{const[e,t]=await Promise.all([v.e("ace").then(v.t.bind(v,87401,23)),v.e("ace").then(v.bind(v,92763)),v.e("ace").then(v.t.bind(v,2577,23)),v.e("ace").then(v.t.bind(v,5152,23)),v.e("ace").then(v.t.bind(v,50428,23)),v.e("ace").then(v.t.bind(v,14280,23)),v.e("ace").then(v.t.bind(v,50428,23)),v.e("ace").then(v.t.bind(v,19991,23)),v.e("ace").then(v.t.bind(v,60968,23)),v.e("ace").then(v.t.bind(v,91401,23)),v.e("ace").then(v.t.bind(v,64127,23)),v.e("ace").then(v.t.bind(v,30485,23)),v.e("ace").then(v.t.bind(v,95797,23)),v.e("ace").then(v.t.bind(v,82300,23)),v.e("ace").then(v.t.bind(v,86952,23)),v.e("ace").then(v.t.bind(v,44887,23)),v.e("ace").then(v.t.bind(v,98283,23)),v.e("ace").then(v.t.bind(v,14866,23)),v.e("ace").then(v.t.bind(v,95649,23)),v.e("ace").then(v.t.bind(v,2326,23)),v.e("ace").then(v.t.bind(v,93509,23)),v.e("ace").then(v.t.bind(v,9308,23))]);return{default:t.default}}),BK=({classNames:e,code:t})=>{const[n,o]=(0,u.useState)(!1),{announcePolite:r}=Ls(),a=async()=>{const i=(0,Or.htmlDecode)(t);await navigator.clipboard.writeText(i),o(!0),setTimeout(()=>o(!1),1e3),r("Copied!")};return(0,s.jsx)("div",{className:e,children:(0,s.jsx)(ws,{message:n?"Copied!":"Copy",children:(0,s.jsx)("button",{"aria-label":n?"Copied!":"Copy",className:"block-code-snippet-copy",onClick:a,type:"button",children:(0,s.jsx)(ae,{name:n?"check":"copy"})})})})};class DK extends vy.Component{renderCaptionDelegate;constructor(t){super(t),this.renderCaptionDelegate=this.renderCaption.bind(this)}renderCaption({caption:t}){return(0,s.jsx)(Qe,{className:"block-text__code-caption",value:t||""})}render(){const{animateBlockEntrance:t,defaultBackgroundColor:n="",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:p,snippetBackgroundColor:C,snippetColorContrast:g,theme:x,useAdvancedEditor:b,wrapWords:y}=l,L=q()("block-text block-text--code",{"block-text--padding-top":Number(p)===2,"block-text--padding-bottom":Number(f)===2,"block-text--no-animation":!h}),S={backgroundColor:C},T=C==="#fafafa"||Et()(C),k=g??Le.DARK;if(!T){const I=Ut({backgroundColor:C,contrast:k});Object.assign(S,{"--color-snippet-contrast":I})}
153return(0,s.jsx)(Ae,{className:L,defaultBackgroundColor:n,children:(0,s.jsx)(He,{animateBlockEntrance:t,initiallyVisible:r,isLearner:a,children:(0,s.jsx)("div",{className:"block-text__container",children:i.slice(0,1).map(I=>{const E=Cc({...I,getL10nValue:o});return(0,s.jsx)("div",{className:"block-text__row",children:(0,s.jsx)("div",{"aria-label":c?.a11yBlockCodeSnippet,className:"block-text__col",role:"group",children:(0,s.jsxs)("figure",{"aria-labelledby":E.figcaptionId,className:"block-text__figure block-text__figure--with-copy",role:"figure",children:[(0,s.jsx)(nB,{value:I.code,children:N=>(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(BK,{classNames:"block-text__copy-button",code:N}),b?(0,s.jsx)(u.Suspense,{fallback:null,children:(0,s.jsx)(OK,{editorProps:{$blockScrolling:!0},maxLines:25,mode:m,name:String(I.id),readOnly:!0,setOptions:{enableSnippets:!1,showLineNumbers:!0,tabSize:2,fontSize:"1.6rem",useWorker:!1},theme:x,value:(0,Or.htmlDecode)(f0(N)),width:"100%",wrapEnabled:y})}):(0,s.jsx)("pre",{className:"block-text__code",dangerouslySetInnerHTML:{__html:f0(N)},dir:"ltr",style:S})]})}),I.caption&&(0,s.jsx)("figcaption",{id:E.figcaptionId,children:d(I)})]})})},I.id)})})})})}}const Cy=it(DK),by=_("continue-btn"),tu=({children:e,className:t,href:n,onClick:o,text:r,testId:a="continue-btn"})=>{const i=t?`${by()} ${t}`:by();return n?(0,s.jsx)(un,{className:i,"data-continue-btn":"","data-testid":a,onClick:o,to:n,children:e??(0,s.jsx)(Sn,{value:r})}):(0,s.jsx)("button",{className:i,"data-continue-btn":"","data-testid":a,onClick:o,type:"button",children:e??(0,s.jsx)(je,{value:r})})},xy=({bgType:e,text:t,iconType:n="locked"})=>{const o=q()("continue-hint",{"continue-hint--bg-transparent":e==="transparent"});return(0,s.jsxs)("div",{className:o,"data-continue-btn":"",children:[n==="locked"&&(0,s.jsx)(ae,{className:"continue-hint__icon",name:"lock-keyhole-light"}),(0,s.jsx)("div",{className:"continue-hint__content",children:(0,s.jsx)(Sn,{value:t})})]})},Qf=_("block-text");function FK({blockId:e,animateBlockEntrance:t,canContinue:n=!1,isComplete:o,isLearner:r,isLastBlock:a=!1,isOnlyBlockInStep:i,items:c=[],labels:l,onStep:d=()=>{},skipContinue:h=!1,initiallyVisible:m}){const p=(0,u.useRef)(null),C=(0,Fe.A)(o),[g,x]=u.useState(!1),{announcePolite:b}=Ls(),[y,L]=u.useState(!1),S=dn(),T=$e(),k=Oi(),I=e2(k),E=Ro(),N=c[0],{id:M}=N,A=N.title??E?.label??Ye.blockContinueLabel,j=N.type??E?.completionType??Ye.blockContinueCompletionType,w=N.completeHint??E?.completeHint??Ye.blockContinueCompleteHint,P=!j||(h?y:n||i&&o),R=h||!o||i,O=S?.continueColor||k,B=!O||O===k,D=B&&T?.theme?.accentContrast===Le.AUTO?Le.AUTO:I,F=S?.continueColorContrast??D,V=S?.continueRadius??null,U=S?.continueWidth??76,H=Ut({backgroundColor:O,contrast:F}),K={...!B&&{"--color-button-bg":O},...!B&&{"--color-button-text":H},...!B&&{"--color-button-border":"transparent"},...V!=null&&{"--radius-button":`${Number(V)}px`},...U!=null&&{maxWidth:`${Number(U)}rem`}},Q=(0,u.useCallback)(()=>{d({id:M}),x(!0),a?setTimeout(()=>{const z=document.querySelector("[data-lesson-id]"),W=document.querySelector("main"),$=document.querySelector("h1.lesson-header__title, .lesson-header__title h1"),G=z?.querySelector('.block-wrapper, [role="region"], .lesson-content > *:first-child');let Z=null;$?Z=$:G&&G!==p.current?.parentElement?Z=G:z?Z=z:W&&(Z=W),Z&&(Z.setAttribute("tabindex","-1"),Z.focus({preventScroll:!0}))},200):setTimeout(()=>{const z=p.current;
153z&&z.focus()},100)},[M,d,a]);return(0,u.useEffect)(()=>{!C&&o&&(a||setTimeout(()=>{b?.(l?.a11yStatusAdditionalContent)},300))},[b,o,l,C,a]),(0,u.useEffect)(()=>{const z=W=>{const{path:$}=W.detail,{blockId:G,buttonId:Z}=Sa(W.detail.path,["block","button"]);if(e==G&&Z===N.id){const Y=$.at(-1);Y==="title"?L(!0):Y==="completeHint"&&L(!1)}};return window.addEventListener(Ke,z),()=>{window.removeEventListener(Ke,z)}},[e,N.id]),(0,s.jsxs)(s.Fragment,{children:[R&&(0,s.jsx)(Ae,{children:(0,s.jsx)(He,{animateBlockEntrance:t,initiallyVisible:m,isLearner:r,children:(0,s.jsx)("div",{className:Qf("container"),children:(0,s.jsx)("div",{className:Qf("row"),children:(0,s.jsxs)("div",{className:Qf("continue"),style:K,children:[P&&(0,s.jsx)(tu,{onClick:Q,text:A}),!P&&(0,s.jsx)(xy,{text:w})]})})})})}),g&&(0,s.jsx)("div",{"aria-live":"off",className:"visually-hidden-always",ref:p,role:"status",tabIndex:-1,children:l?.a11yStatusContinued||"Continued"})]})}const Yf=_("block-divider"),Zf=({isLearner:e,labels:{numberedDividerGroup:t},number:n,settings:o,type:r="divider"})=>{const{entranceAnimation:a}=o,i=r==="numbered",l=Yf({authoring:!e,spacing:r==="spacing",numbered:i,"no-animation":!a}).toString(),d=i?(0,s.jsxs)("div",{className:Yf("wrap__number"),children:[(0,s.jsx)("span",{className:"visually-hidden-always",children:t}),n]}):null;return(0,s.jsx)(Ae,{className:l,children:(0,s.jsx)("div",{className:Yf("wrap",{authoring:!e&&!i}),children:d})})},HK=Zf,$K=e=>(0,s.jsx)(Zf,{type:"numbered",...e}),_K=e=>(0,s.jsx)(Zf,{type:"spacing",...e});var VK=v(15384),nu=v.n(VK);function zK(e,t){const n=dn(),{cardMode:o,className:r="",children:a,disabled:i=!1,tag:c="div",overrideBackground:l=!1,style:d={},...h}=e,{cardMode:m,customBackgroundColorContrast:f}=n,C=$e()?.theme,g=Vn(),x=o??m??_n.WHITE,b=yn()??"#ffffff",y=x===_n.WHITE,L=g===re.COLOR,S=g===re.ACCENT,T=C?.accentContrast,k=g===re.ACCENT||g===re.COLOR,I=T===Le.AUTO&&S||f===Le.AUTO&&L,E=g===re.COLOR?f:T,N=[r,"block-card"];if(y)N.push("bg--range-light","block-card--white");else if(i){N.push("block-card--disabled");const M=Ut({backgroundColor:b,contrast:E});I&&(d["--color-text"]=M,d["--color-text-opposite"]=M===Tt.DARK?Tt.LIGHT:Tt.DARK)}else{N.push("block-card--transparent");const A=bA(b)??b??"#ffffff";switch(g){case re.LIGHT:case re.GRAY:N.push("bg--range-light");break;case re.IMAGE:N.push("bg--range-dark");break;case re.DARK:case re.BLACK:N.push("bg--range-dark"),d["--color-background-rgb"]=Bo(A)?.slice(0,3);break;default:{const w=d["--color-background"]??(l?b:A),P=Ut({backgroundColor:w,contrast:E});k&&P==Tt.LIGHT&&N.push("block-card--contrast-light");const R=ga(w);N.push(`bg--range-${$l()(R.toLowerCase())}`),d["--color-background"]=w,d["--color-background-rgb"]=Bo(w)?.slice(0,3);break}}}return(0,s.jsx)(c,{...h,className:N.join(" "),ref:t,style:d,children:a})}const Kt=(0,u.forwardRef)(zK);var bt=v(49860);function yy({ariaLabel:e,children:t,className:n="carousel-controls-item-btn",isActive:o,onClick:r,onKeyDown:a}){return(0,s.jsx)("li",{className:"carousel-controls-item",role:"listitem",children:(0,s.jsx)("button",{"aria-current":o,"aria-label":e,className:n,onClick:r,onKeyDown:a,tabIndex:o?0:-1,type:"button",children:t})})}function su({children:e,iconNameLeft:t="chevron-left-light",iconNameRight:n="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:p="Slide",onChange:C,ref:g,renderSlideIndicator:x,shouldMouseEmulateTouch:b=!1,shouldUseCounter:y=!1,shouldUseGoToSlide:L=!0}){const S=bt.useId(),[T,k]=bt.useState(0),I=(0,Fe.A)(T)??0,E=bt.useRef(null),N=bt.useRef(null),M=bt.useRef(!1),A=bt.useRef(!1),j=bt.useRef(void 0),w=bt.useRef(void 0),P=`carousel-${S}`,R=bt.Children.count(e),O=(0,Fe.A)(R),B=bt.useMemo(()=>Array.from({length:R}),[R]),D=R>1;bt.useImperativeHandle(g,()=>
153({navigateToSlide:(z,W=!0)=>{k(z);const $=E.current?.children?.[z]?.firstElementChild;W&&$?.focus()}}),[]);const F=bt.useCallback(({activeIndex:z,dir:W})=>{const $=o?z-1>=0?z-1:R-1:Math.max(0,z-1),G=o?z+1<=R-1?z+1:0:Math.min(R-1,z+1);return W==="left"?r?G:$:r?$:G},[o,r,R]),V=bt.useCallback(()=>{k(z=>F(r?{activeIndex:z,dir:"right"}:{activeIndex:z,dir:"left"}))},[F,r]),U=bt.useCallback(()=>{k(z=>F(r?{activeIndex:z,dir:"left"}:{activeIndex:z,dir:"right"}))},[F,r]),H=bt.useCallback(z=>{const W=E.current?.children?.[z],$=E.current;if(W&&$){const G=W.getBoundingClientRect(),Z=$.getBoundingClientRect(),Y=G.left+G.width/2,ne=Z.left+Z.width/2,ee=Y-ne;$.scrollBy({left:ee,behavior:"smooth"})}},[]),K=bt.useCallback(z=>{let W=!1,$=T;switch(z.key){case"ArrowLeft":W=!0,$=F({activeIndex:T,dir:"left"});break;case"ArrowRight":W=!0,$=F({activeIndex:T,dir:"right"});break;case"Home":W=!0,$=0;break;case"End":W=!0,$=R-1;break}W&&(z.stopPropagation(),z.preventDefault()),T!==$&&(E.current?.children?.[$]?.firstChild?.focus(),H($),k($))},[T,F,H,R]);bt.useEffect(()=>{I!==T&&C?.(T)},[T,C,I]),bt.useEffect(()=>{R<O&&T>R-1&&k(R-1)},[T,O,R]),bt.useEffect(()=>{const z=ee=>{ee.target.tagName==="IMG"&&ee.preventDefault(),j.current=ee.screenX},W=ee=>{const le=window.visualViewport?.scale??1,J=window.getSelection().toString()!=="";if(!A.current&&le<=1.01&&!J&&j.current!=null){w.current=ee.screenX;const te=w.current-j.current;Math.abs(te)>50&&(window.getSelection().empty(),M.current=!0,j.current=void 0,w.current=void 0,te<0?k(_e=>F({activeIndex:_e,dir:"right"})):k(_e=>F({activeIndex:_e,dir:"left"})))}},$=ee=>{M.current&&ee.stopPropagation(),M.current=!1,A.current=!1,j.current=void 0,w.current=void 0},G=ee=>{if(ee.touches.length>1){A.current=!0;return}ee.changedTouches.length===1&&ee.changedTouches[0]&&(j.current=ee.changedTouches[0].screenX)},Z=ee=>{const le=window.visualViewport?.scale??1,J=window.getSelection().toString()!=="";if(!A.current&&le<=1.01&&!J&&j.current!=null&&ee.changedTouches[0]){w.current=ee.changedTouches[0].screenX;const te=w.current-j.current;Math.abs(te)>50&&(M.current=!0,j.current=void 0,w.current=void 0,te<0?k(_e=>F({activeIndex:_e,dir:"right"})):k(_e=>F({activeIndex:_e,dir:"left"})))}},Y=()=>{M.current=!1,A.current=!1,j.current=void 0,w.current=void 0},ne=N.current;return b&&(ne?.addEventListener("mousedown",z,{capture:!0}),ne?.addEventListener("mousemove",W,{capture:!0}),ne?.addEventListener("click",$,{capture:!0})),ne?.addEventListener("touchstart",G,{passive:!0}),ne?.addEventListener("touchmove",Z,{passive:!0}),ne?.addEventListener("touchend",Y,{passive:!0}),ne?.addEventListener("touchcancel",Y,{passive:!0}),()=>{b&&(ne?.removeEventListener("mousedown",z),ne?.removeEventListener("mousemove",W),ne?.removeEventListener("mouseup",Y)),ne?.removeEventListener("touchstart",G),ne?.removeEventListener("touchmove",Z),ne?.removeEventListener("touchend",Y),ne?.removeEventListener("touchcancel",Y)}},[F,b,R]);const Q=bt.useCallback(z=>()=>{H(z),k(z)},[H]);return(0,s.jsxs)("div",{"aria-label":a,"aria-roledescription":i,className:"carousel",dir:r?"rtl":void 0,role:"region",style:{"--carousel-active-index":T},children:[D&&(0,s.jsx)(s.Fragment,{children:(0,s.jsxs)("div",{"aria-label":c,className:"carousel-controls",role:"group",children:[L&&(0,s.jsx)("ul",{className:"carousel-controls-items",ref:E,role:"list",children:B.map((z,W)=>{const $=T===W,G=Q(W);return x?x({index:W,isActive:$,onClick:G,onKeyDown:K}):(0,s.jsx)(yy,{ariaLabel:h+" "+(W+1),isActive:$,onClick:G,onKeyDown:K,children:(0,s.jsx)(ae,{className:"carousel-controls-item-btn-icon",name:$?"circle":"circle-solid"})},W)})}),(0,s.jsx)("button",{"aria-disabled":o?void 0:T===0,"aria-label":d,className:"carousel-controls-prev",onClick:!o&&T===0?void 0:V,type:"button",children:(0,s.jsx)(ae,{className:"carousel-controls-prev-icon",name:r?n:t})}),(0,s.jsx)("button",{"aria-disabled":o?void 0:T===R-1,"aria-label":l,className:"carousel-controls-next",onClick:!o&&T===R-1?void 0:U,type:"button",children:(0,s.jsx)(ae,{className:"carousel-controls-next-icon",name:r?t:n})}
153),y&&(0,s.jsxs)("div",{className:"carousel-controls-counter",children:[(0,s.jsx)("div",{className:"carousel-controls-counter-text",children:`${T+1} ${m} ${R}`}),(0,s.jsx)("div",{className:"carousel-controls-counter-line",children:(0,s.jsx)("div",{className:"carousel-controls-counter-line-runner",style:{width:`${Number(((T+1)/R).toFixed(2))*100}%`}})})]})]})}),(0,s.jsx)("div",{"aria-live":"polite",className:"carousel-slides",ref:N,children:bt.Children.map(e,(z,W)=>{const $=`${P}-${W}-counter`;return(0,s.jsxs)("div",{"aria-labelledby":$,"aria-roledescription":p,className:"carousel-slide",hidden:T!==W,inert:T!==W,role:"group",children:[(0,s.jsx)("div",{className:"visually-hidden-always",id:$,children:`${W+1} ${f} ${R}`}),z]})})})]})}const Sy=(0,u.createContext)(Wf);function UK({children:e,ImageEagerOrLazy:t}){return(0,s.jsx)(Sy,{value:t,children:e})}function GK(){return(0,u.use)(Sy)}function En(e){const t=GK();return(0,s.jsx)(t,{...e})}const Yn=(e,t)=>e==null||t==null?e===t:String(e)===String(t);function Xf(e){const t=n=>{const o=Ah();return(0,s.jsx)(e,{...n,isRTL:o})};return t.displayName=`withRTL(${e.displayName||e.name})`,t}const ou=({blockId:e,carouselRef:t,children:n,items:o})=>{const r=(0,u.useRef)(null),a=t??r;return(0,u.useEffect)(()=>{const i=d=>{const h=o.findIndex(m=>Yn(m.id,d));h>
153=0&&a.current?.navigateToSlide?.(h,!1)},c=d=>{const{path:h}=d.detail,{blockId:m,cardId:f}=Sa(h,["block","card"]);m===e&&i(f)},l=d=>{const{blockId:h,itemId:m}=d.detail;Yn(h,e)&&i(m)};return window.addEventListener(Ke,c),window.addEventListener(Do,l),()=>{window.removeEventListener(Ke,c),window.removeEventListener(Do,l)}},[o,e,a]),(0,s.jsx)(s.Fragment,{children:n({carouselRef:a})})};var WK=v(74753),KK=v.n(WK);const Ty=_("audio-player-actions"),QK=({audioPlayerId:e,condensed:t=!1,transcriptMedia:n,onDelete:o,onTranscriptClick:r,onTranscriptClose:a})=>{const{mode:i,disableTranscriptButton:c}=Md(),l=uc(),[d,h]=(0,u.useState)(!1),[m,f]=(0,u.useState)(!1),p=we(n)?.audio?.transcript,C=(0,u.useCallback)(()=>h(!0),[]),g=(0,u.useCallback)(()=>h(!1),[]),x=(0,u.useCallback)(()=>f(!0),[]),b=(0,u.useCallback)(M=>{!(M.relatedTarget instanceof Element&&M.relatedTarget.closest(".transcript-panel")!==null)&&M.currentTarget.matches(":focus-visible")&&f(!0)},[]),y=(0,u.useCallback)(()=>f(!1),[]),L=Nt(),S=l?.audioPlayerIdOpen&&l.audioPlayerIdOpen===e,T=c?"Transcripts are only available in lesson previews":S?L?.audioHideTranscript:i==="edit"?"Edit transcript":L?.audioShowTranscript,k=(0,u.useCallback)(()=>{const M=document.getElementById(Tf(e));M&&M.focus()},[e]),[I,E]=(0,u.useState)(!1);function N(){c||(S?a?.():(r?.(),E(!0)))}return(0,u.useEffect)(()=>{I&&(E(!1),k())},[I,k]),(0,s.jsxs)(s.Fragment,{children:[o&&(0,s.jsx)(ws,{elementFocused:d,message:"Remove audio",children:(0,s.jsx)("button",{"aria-label":"Remove audio",className:Ty("button",{condensed:t}),onBlur:g,onClick:o,onFocus:C,onMouseOut:g,onMouseOver:C,type:"button",children:(0,s.jsx)(ae,{name:"trash"})})}),(i==="edit"||p)&&(0,s.jsx)(s.Fragment,{children:(0,s.jsx)(ws,{elementFocused:m,message:T,renderInModalWhenPresent:i==="readonly",style:{whiteSpace:"nowrap"},children:(0,s.jsx)("button",{"aria-disabled":c,"aria-label":T,className:Ty("button",{condensed:t}),id:i==="readonly"?c3(e):void 0,onBlur:y,onClick:N,onFocus:b,onMouseOut:y,onMouseOver:x,style:c?{opacity:.5}:void 0,type:"button",children:(0,s.jsx)(ae,{name:"file-audio"})})})})]})};var YK=v(29048);const Ly="change";class ZK extends YK.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(Ly,t)}removeChangeListener(t){this.removeListener(Ly,t)}}const Se=new ZK(1/0),XK=[.5,.75,1,1.25,1.5,1.75,2].toReversed().map(e=>({value:e,label:`${e}x`})),bge=.05,ky=_("audio-player-icon"),Hr=({x:e,width:t,height:n,y:o,pulseBaseHeight:r,pulseBaseY:a,pulseHeight:i,pulseY:c,delay:l="0s"})=>(0,s.jsx)("rect",{className:ky("bar"),height:n,rx:1,style:{"--base-height":`${n/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}),Iy=({animating:e})=>(0,s.jsx)("span",{className:ky({animating:e}),children:(0,s.jsxs)("svg",{"aria-hidden":"true",height:"16",viewBox:"0 0 20 16",width:"20",xmlns:"http://www.w3.org/2000/svg",children:[(0,s.jsx)(Hr,{delay:"0s",height:2,pulseBaseHeight:1,pulseBaseY:7.5,pulseHeight:6,pulseY:5,width:2,x:0,y:7}),(0,s.jsx)(Hr,{delay:"0.1s",height:4,pulseBaseHeight:3,pulseBaseY:6.5,pulseHeight:8,pulseY:4,width:2,x:3,y:6}),(0,s.jsx)(Hr,{delay:"0.2s",height:10,pulseBaseHeight:8,pulseBaseY:4,pulseHeight:12,pulseY:2,width:2,x:6,y:3}),(0,s.jsx)(Hr,{delay:"0.3s",height:16,pulseBaseHeight:12,pulseBaseY:2,pulseHeight:16,pulseY:0,width:2,x:9,y:0}),(0,s.jsx)(Hr,{delay:"0.4s",height:8,pulseBaseHeight:6,pulseBaseY:5,pulseHeight:12,pulseY:2,width:2,x:12,y:4}),(0,s.jsx)(Hr,{delay:"0.5s",height:11,pulseBaseHeight:9,pulseBaseY:3.5,pulseHeight:15,pulseY:.5,width:2,x:15,y:2.5}),(0,s.jsx)(Hr,{delay:"0.6s",height:2,pulseBaseHeight:1,pulseBaseY:7.5,pulseHeight:6,pulseY:5,width:2,x:18,y:7})]})});var qK,Ue=v(49860);const ru=Ue.createContext(null);function JK({children:e,isDisabled:t,onClose:n,onOpen:o,onSelect:r,positionX:a="left"}){const[i,c]=Ue.useState(!1),l=(0,Fe.A)(i),[d,h]=Ue.useState(null),m=Ue.useRef(null),f=Ue.useRef(null),p=Ue.useRef(null),x=`${`menu-${Ue.useId()}`}-content`,b=Ue.useCallback(({direction:P,predFn:R=()=>!0})=>{if(!p.current)return;const O=Array.from(p.current.querySelectorAll('[role="menuitem"]')),B=O.length,D=O.findIndex(H=>H===document.activeElement);let F,V,U;switch(P){case"start":F=0,V=1;break;case"end":F=B-1,V=-1;break;case"backwards":F=D-1,V=-1;break;case"forwards":F=D+1,V=1;break;default:F=D+1,V=1}for(let H=0;H<=B;H++){F>=B?F=0:F<0&&(F=B-1);const K=O[F];if(K!=null&&nQ(K)&&R(K)){U=K;break}else F=F+V}U&&U.focus()},[]),y=Ue.useCallback(()=>{b({direction:"start"})},[b]),L=Ue.useCallback(()=>{b({direction:"end"})},[b]),S=Ue.useCallback(()=>{b({direction:"backwards"})},[b]),T=Ue.useCallback(()=>{b({direction:"forwards"})},[b]),k=Ue.useCallback(P=>{b({direction:"forwards",predFn:R=>sQ(R,P)})},[b]),I=Ue.useCallback(()=>{i?c(!1):(c(!0),setTimeout(T,25))},[T,i]),E=Ue.useCallback(()=>{f.current?.focus(),c(!1)},[]),N=Ue.useCallback(()=>{c(!0),setTimeout(T,25)},[T]),M=Ue.useCallback(()=>{c(!0),setTimeout(S,25)},[S]),A=Ue.useCallback(()=>{const{left:P,top:R}=tf({anchor:f.current,popover:p.current,positionX:a});h({transform:`translate3d(${P}px, ${R}
153px, 0)`,visibility:"visible"})},[a]),j=Ue.useCallback(P=>{const R=P.currentTarget;Ey(R)||(r?.(R.getAttribute("data-name")),E())},[E,r]),w=Ue.useCallback(P=>{const R=P.key;if(P.altKey||P.ctrlKey||P.metaKey)return;let O=!1;if(P.shiftKey)R==="Tab"?S():R.trim()!==""&&k(R),O=!0;else switch(R){case" ":case"Enter":j(P),O=!0;break;case"Esc":case"Escape":E(),O=!0;break;case"ArrowUp":S(),O=!0;break;case"Tab":case"ArrowDown":T(),O=!0;break;case"Home":case"PageUp":y(),O=!0;break;case"End":case"PageDown":L(),O=!0;break;default:k(R);break}O&&(P.stopPropagation(),P.preventDefault())},[E,j,k,y,L,T,S]);return Ue.useEffect(()=>{const P=R=>{i&&m.current!=null&&p.current!=null&&!m.current.contains(R.target)&&!p.current.contains(R.target)&&c(!1)};return i?document.addEventListener("click",P):document.removeEventListener("click",P),()=>{document.removeEventListener("click",P)}},[i]),Ue.useEffect(()=>(i?window.addEventListener("resize",A):window.removeEventListener("resize",A),()=>{window.removeEventListener("resize",A)}),[A,i]),Ue.useEffect(()=>{const P=Ji(m.current);for(const R of P)i?R?.addEventListener("scroll",A,{passive:!0}):R?.removeEventListener("scroll",A);return()=>{for(const R of P)R?.removeEventListener("scroll",A)}},[A,i]),Ue.useEffect(()=>{i?A():h(null)},[A,i]),Ue.useEffect(()=>{if(l&&!i)n?.();else if(!l&&i&&(o?.(),m.current)){const P=new CustomEvent("menuopen",{bubbles:!0,detail:{target:m.current}});m.current.dispatchEvent(P)}},[l,i,n,o]),Ue.useEffect(()=>{const P=R=>{R.detail.target!==m.current&&c(!1)};return document.addEventListener("menuopen",P),()=>{document.removeEventListener("menuopen",P)}},[]),(0,s.jsx)(ru.Provider,{value:{htmlIdContent:x,isExpanded:i,onCloseFocusTrigger:E,onExpandFocusMenuItemNext:N,onExpandFocusMenuItemPrevious:M,onFocusMenuItemByPrefix:k,onFocusMenuItemFirst:y,onFocusMenuItemLast:L,onFocusMenuItemNext:T,onFocusMenuItemPrevious:S,onItemClick:j,onItemKeyDown:w,onTriggerClick:I,refContent:p,refTrigger:f,styleContent:d},children:(0,s.jsx)("div",{"aria-owns":x,inert:t?!0:void 0,ref:m,children:e})})}function eQ({as:e,children:t,label:n,labelledBy:o,...r}){const{htmlIdContent:a,isExpanded:i,onTriggerClick:c,onCloseFocusTrigger:l,onExpandFocusMenuItemNext:d,onExpandFocusMenuItemPrevious:h,refTrigger:m}=Ue.useContext(ru),f=Ue.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]),p=e??"button";return(0,s.jsx)(p,{...r,"aria-controls":a,"aria-expanded":i,"aria-haspopup":"menu","aria-label":n,"aria-labelledby":o,"data-menu-trigger":"",onClick:c,onKeyDown:f,ref:m,type:"button",children:t})}function tQ({children:e,className:t}){const{htmlIdContent:n,isExpanded:o,refContent:r,styleContent:a}=Ue.useContext(ru);return o?ps.createPortal((0,s.jsx)("div",{className:t,"data-menu-content":"",hidden:o?void 0:!0,id:n,ref:r,role:"menu",style:a,children:e}),Zs()):null}function au({children:e,className:t,isDisabled:n,name:o,tooltipId:r}){const{onItemClick:a,onItemKeyDown:i}=Ue.useContext(ru),c=Ue.useCallback(l=>{l.currentTarget?.focus()},[]);return(0,s.jsx)("button",{"aria-describedby":r,"aria-disabled":n,className:t,"data-menu-item":"","data-name":o,onClick:n?void 0:a,onKeyDown:i,onMouseOver:c,role:"menuitem",tabIndex:n?-1:void 0,type:"button",children:e})}function yge({children:e}){return qK("span",{"data-menu-item-icon":"",children:e})}function Ey(e){return e!=null&&e.getAttribute("disabled")!=null||e.getAttribute("aria-disabled")==="true"}function nQ(e){return e!=null&&e.tagName==="BUTTON"&&!Ey(e)}function sQ(e,t){return e?.textContent.toLowerCase().startsWith(t?.toLowerCase())}const Fa=_("audio-player-actions-condensed"),_o=Object.freeze({DeleteAudio:"delete-audio",EditAudio:"edit-audio",EditTranscript:"edit-transcript",RevertToSource:"revert-audio-to-source"}),oQ=({audioPlayerId:e,condensed:t=!1,transcriptMedia:n,onTranscriptClick:o,onTranscriptClose:r,item:a,side:i,refs:c})=>{const{mode:l,isVariantLocale:d,handleOpenMediaModal:h,handleDelete:m,handleRevertToSource:f}=Md(),p=uc(),C=Dt(),g=rt(),x=a&&"media"in a&&a.media?g(a.media):void 0,b=x&&"audio"in x?x.audio.aiAudioSettings:void 0,y=Mn(),L=rm(),S=y?L(y):"",[T,k]=(0,u.useState)(!1),I=(0,u.useCallback)(()=>k(!0),[]),E=(0,u.useCallback)(()=>k(!1),[]),N=b?.l10nAutoGenStatus==="reverted-to-source",M=d&&"audio"in x&&x.audio?.sourceType==="ai-audio"&&b?.l10nAutoGenStatus!=="unsupported-locale",A=Nt(),j=p?.audioPlayerIdOpen===e,w=j?A?.audioHideTranscript:l==="edit"?"Edit transcript":A?.audioShowTranscript;function P(O){switch(O){case _o.DeleteAudio:m(C.id,a,c);break;case _o.EditTranscript:j?r?.():o?.();break;case _o.EditAudio:h(C,a,c,i,{triggeredFrom:"block_audio_button"});break;case _o.RevertToSource:f(C.id,a);break}}const R=!!g(n)?.audio?.transcript;return h||m||R?(0,s.jsx)(ws,{elementFocused:T,message:"Options",children:(0,s.jsxs)(JK,{onSelect:P,positionX:"left",children:[(0,s.jsx)(eQ,{className:Fa("trigger",{condensed:t}),label:"Options",onBlur:E,onFocus:I,onMouseEnter:I,onMouseLeave:E,children:(0,s.jsx)(ae,{name:"ellipsis-regular"})}),(0,s.jsxs)(tQ,{className:Fa("content"),children:[h?(0,s.jsx)(au,{className:Fa("menu-item"),name:_o.EditAudio,children:"Edit audio"}):null,l==="edit"||R?(0,s.jsx)(au,{className:Fa("menu-item"),name:_o.EditTranscript,children:w}):null,m&&C?.variant!=="audio"?(0,s.jsx)(au,{className:Fa("menu-item"),name:_o.DeleteAudio,children:"Remove audio"}):null,f&&M?(0,s.jsx)(ws,{message:N?"Audio currently synced to source":void 0,children:(0,s.jsxs)(au,{className:Fa("menu-item"),isDisabled:N,name:_o.RevertToSource,children:["Revert to source audio (",S,")"]})}):null]})]})}):null};var rQ,aQ,Ge=v(49860);const bc=Ge.createContext(null);function iQ({children:e,className:t,isDisabled:n,onClose:o,onItemActiveChange:r,onOpen:a,onSelect:i,portalArgs:c,positionX:l="left",value:d}){const[h,m]=Ge.useState(null),f=(0,Fe.A)(h),[p,C]=Ge.useState(!1),g=(0,Fe.A)(p),[x,b]=Ge.useState(null),y=Ge.useRef(null),L=Ge.useRef(null),S=Ge.useRef(null),k=`select-${Ge.useId()}`,I=`${k}-content`,E=h?.id,N=Ge.useCallback(R=>{const O=R.currentTarget;Ny(O)||(C(!1),m(O),i(O.getAttribute("data-value")),R.stopPropagation())},[i]),M=Ge.useCallback(R=>{m(R)},[]),A=Ge.useCallback(()=>{C(R=>!R)},[]),j=Ge.useCallback(()=>{const{left:R,top:O}=tf({anchor:L.current,popover:S.current,positionX:l}),F=window.getComputedStyle(L.current).direction==="rtl"?-R:R;b({transform:`translate3d(${F}px, ${O}px, 0)`,visibility:"visible",width:`${L.current?.offsetWidth}px`})},[l]),w=Ge.useCallback(R=>{const O=Array.from(S.current?.querySelectorAll("[data-select-item]")??[]),B=O.length,D=O.findIndex(U=>U.getAttribute("data-select-item")==="current");let F,V=D+1;for(let U=0;U<B;U++){V>=B&&(V=0);const H=O[U];if(H!=null&&!Ny(H)&&uQ(H,R)){F=U;break}else V=B-1}F&&(m(O[F]),O[F]?.scrollIntoView({block:"center"}))},[]),P=Ge.useCallback(R=>{const O=R.key;if(R.ctrlKey||R.metaKey)return;let B=!1;const D=Array.from(S.current?.querySelectorAll("[data-select-item]")??[]),F=D.findIndex(V=>V.getAttribute("data-select-item")==="current");
153if(p)if(O.length===1&&O!==" "&&!R.altKey&&!R.ctrlKey&&!R.metaKey)w(O);else switch(O){case" ":case"Enter":C(!1),D[F]!=null&&i(D[F].getAttribute("data-value")),B=!0;break;case"Esc":case"Escape":C(!1),m(D.find(V=>V.getAttribute("aria-selected")==="true")),B=!0;break;case"ArrowUp":R.altKey?(C(!1),D[F]!=null&&i(D[F].getAttribute("data-value")??"")):F>0&&(m(D[F-1]),D[F-1].scrollIntoView({block:"center"})),B=!0;break;case"ArrowDown":F<D.length-1&&(m(D[F+1]),D[F+1].scrollIntoView({block:"center"})),B=!0;break;case"Home":m(D[0]),D[0]?.scrollIntoView({block:"center"}),B=!0;break;case"End":m(D[D.length-1]),D[D.length-1]?.scrollIntoView({block:"center"}),B=!0;break;case"PageUp":m(D[0]),D[0]?.scrollIntoView({block:"center"}),B=!0;break;case"PageDown":m(D[D.length-1]),D[D.length-1]?.scrollIntoView({block:"center"}),B=!0;break;case"Tab":C(!1),D[F]!=null&&i(D[F].getAttribute("data-value"));break}else if(O.length===1&&O!==" "&&!R.altKey&&!R.ctrlKey&&!R.metaKey)C(!0),w(O);else switch(O){case" ":case"Enter":C(!0),B=!0;break;case"ArrowUp":C(!0),m(D[0]),B=!0;break;case"ArrowDown":C(!0),B=!0;break;case"Home":C(!0),m(D[0]),B=!0;break;case"End":C(!0),m(D[D.length-1]),B=!0;break}B&&(R.stopPropagation(),R.preventDefault())},[w,p,i]);return Ge.useEffect(()=>{const R=S.current?.querySelector('[data-select-item][aria-selected="true"]');m(R)},[]),Ge.useEffect(()=>{const R=S.current?.querySelector(`[data-select-item][data-value="${d}"]`);m(R)},[d]),Ge.useEffect(()=>{const R=O=>{p&&y.current!=null&&S.current!=null&&!y.current.contains(O.target)&&!S.current.contains(O.target)&&C(!1)};return p?document.addEventListener("click",R):document.removeEventListener("click",R),()=>{document.removeEventListener("click",R)}},[p]),Ge.useEffect(()=>(p?window.addEventListener("resize",j):window.removeEventListener("resize",j),()=>{window.removeEventListener("resize",j)}),[j,p]),Ge.useEffect(()=>{const R=Ji(y.current);for(const O of R)p?O?.addEventListener("scroll",j,{passive:!0}):O?.removeEventListener("scroll",j);return()=>{for(const O of R)O?.removeEventListener("scroll",j)}},[j,p]),Ge.useEffect(()=>{p?j():b(null)},[j,p]),Ge.useEffect(()=>{p&&f!=null&&f!==h&&r?.({value:h.getAttribute("data-value")})},[p,f,h,r]),Ge.useEffect(()=>{if(g&&!p)o?.();else if(!g&&p&&(a?.(),y.current)){const R=new CustomEvent("comboboxopen",{bubbles:!0,detail:{target:y.current}});y.current.dispatchEvent(R)}},[g,p,o,a]),Ge.useEffect(()=>{const R=O=>{O.detail.target!==y.current&&C(!1)};return document.addEventListener("comboboxopen",R),()=>{document.removeEventListener("comboboxopen",R)}},[]),(0,s.jsx)(bc.Provider,{value:{activeEl:h,htmlIdActiveDescendant:E,htmlIdBase:k,htmlIdContent:I,isExpanded:p,onItemClick:N,onItemHover:M,onTriggerClick:A,onTriggerKeyDown:P,portalArgs:c,refContent:S,refTrigger:L,selectedValue:d,styleContent:x},children:(0,s.jsx)("div",{"aria-owns":I,className:t,inert:n?!0:void 0,ref:y,children:e})})}function cQ({children:e,className:t,labelledBy:n,as:o,...r}){const{htmlIdActiveDescendant:a,htmlIdContent:i,isExpanded:c,onTriggerClick:l,onTriggerKeyDown:d,refTrigger:h}=Ge.useContext(bc),m=!!o,f=o??"button";return(0,s.jsxs)(f,{"aria-activedescendant":a,"aria-controls":i,"aria-expanded":c,"aria-haspopup":"listbox","aria-labelledby":n,className:t,"data-select-trigger":m?void 0:"",onClick:l,onKeyDown:d,ref:h,role:"combobox",type:"button",...r,children:[(0,s.jsx)("span",{"data-select-trigger-text":"",children:e}),(0,s.jsx)("span",{"data-select-trigger-icon":"",children:c?(0,s.jsx)(ae,{name:"chevron-up"}):(0,s.jsx)(ae,{name:"chevron-down"})})]})}function lQ({children:e,className:t,label:n,labelledBy:o,style:r={}}){const{htmlIdContent:a,isExpanded:i,portalArgs:c,refContent:l,styleContent:d}=Ge.useContext(bc);return ps.createPortal((0,s.jsx)("div",{"aria-label":n,"aria-labelledby":o,className:t,"data-select-content":"",hidden:i?void 0:!0,id:a,ref:l,role:"listbox",style:{...d,...r},children:e}),Zs(c))}function Tge({children:e,className:t,labelText:n}){const{htmlIdBase:o}=Ge.useContext(bc),r=Ge.useId(),a=`${o}-group-label-${r}`;return rQ("div",{"aria-labelledby":a,className:t,"data-select-group":"",role:"group",children:[aQ("div",{"data-select-group-label":"",id:a,role:"presentation",children:n}),e]})}function dQ({children:e,className:t,labelledBy:n,isDisabled:o,value:r}){const{activeEl:a,htmlIdBase:i,onItemClick:c,onItemHover:l,selectedValue:d}=Ge.useContext(bc),h=Ge.useRef(null),m=Ge.useId(),f=h.current===a,p=r===d,C=`${i}-option-${m}`,g=Ge.useCallback(()=>
153{l(h.current)},[l]);return(0,s.jsxs)("div",{"aria-disabled":o,"aria-labelledby":n,"aria-selected":p,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,p&&(0,s.jsx)("span",{"data-select-item-selected":"",children:(0,s.jsx)(ae,{name:"check"})})]})}function Ny(e){return e!=null&&e.getAttribute("disabled")!=null||e.getAttribute("aria-disabled")==="true"}function uQ(e,t){return e?.textContent.toLowerCase().startsWith(t?.toLowerCase())}const qf=_("playback-speed-menu"),hQ=({onChange:e,condensed:t=!1,speed:n})=>{const o=Nt(),[r,a]=(0,u.useState)(!1),i=(0,u.useCallback)(()=>a(!0),[]),c=(0,u.useCallback)(()=>a(!1),[]);return(0,s.jsx)(ws,{elementFocused:r,message:o?.audioPlaySpeed,children:(0,s.jsxs)(iQ,{className:qf(),onOpen:c,onSelect:l=>e(parseFloat(l)),portalArgs:{id:"portal",childType:"other"},value:String(n),children:[(0,s.jsxs)(cQ,{"aria-label":o?.audioPlaySpeed,className:qf("trigger",{condensed:t}),labelledBy:void 0,onBlur:c,onFocus:i,onMouseEnter:i,onMouseLeave:c,children:[n,"x"]}),(0,s.jsx)(lQ,{className:qf("content"),label:o?.audioPlaySpeed,children:XK.map((l,d)=>(0,s.jsx)(dQ,{value:String(l.value??""),children:l.label},d))})]})})};function mQ(e=!1,t=200){const n=(0,u.useRef)(void 0),[o,r]=(0,u.useState)(e),a=(0,u.useCallback)(()=>{n.current&&clearTimeout(n.current),r(!0)},[]),i=(0,u.useCallback)(c=>{n.current&&clearTimeout(n.current),c?r(!1):n.current=setTimeout(()=>{r(!1)},t)},[t]);return(0,u.useEffect)(()=>()=>{n.current&&clearTimeout(n.current)},[]),{isActive:o,setActive:a,setInactive:i}}const Jf=_("audio-player-volume"),fQ=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"];function pQ(e,t){return t||e<=0?"volumeXmark":e<=1/3?"volumeLow":e<=2/3?"volume":"volumeHigh"}function gQ({condensed:e=!1,muted:t,onChange:n,onMute:o,volume:r}){const a=Nt(),i=(0,u.useRef)(null),c=(0,u.useRef)(null),l=(0,u.useRef)(null),{isActive:d,setActive:h,setInactive:m}=mQ(!1,200),f=t?0:r;function p(g){if(fQ.includes(g.code)){const y=window.getComputedStyle(g.currentTarget).direction==="rtl"?"ArrowLeft":"ArrowRight",L=g.code==="ArrowUp"||g.code===y?Math.min(f+.05,1):Math.max(f-.05,0);n(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,s.jsxs)("div",{className:Jf(),onKeyDown:p,onMouseEnter:h,onMouseLeave:()=>m(!1),ref:i,children:[(0,s.jsx)("button",{"aria-label":f<=0?a?.a11yMediaUnmute:a?.a11yMediaMute,className:Jf("button",{condensed:e}),onClick:o,ref:c,type:"button",children:(0,s.jsx)(ae,{name:pQ(f,t)})}),(0,s.jsx)("input",{"aria-label":a?.a11yMediaVolume,"aria-valuemax":100,"aria-valuemin":0,"aria-valuenow":f*100,"aria-valuetext":C,className:Jf("slider").mix(d?"":"visually-hidden"),max:100,min:0,onChange:g=>n(g.currentTarget.valueAsNumber/100),ref:l,type:"range",value:f*100})]})}const On=_("audio-player"),iu=({currentTime:e,duration:t})=>Math.round(e/t*100)||0,jy=e=>{if(!e)return{hours:0,minutes:0,seconds:0};const t=Math.floor(e/3600),n=Math.floor(e%3600/60),o=e%60;return{hours:t,minutes:n,seconds:o}},wy=e=>{const{minutes:t,seconds:n}=jy(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(n)),o},vQ=e=>{const{hours:t,minutes:n,seconds:o}=jy(e);function r(c,l,d){return(new Array(d+1).join(l)+c).slice(-d)}const a=r(n,"0",2),i=r(o,"0",2);return t>0?`${t}:${a}:${i}`:`${n}:${i}`};class Ha 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:n}=this.props,{currentTime:o,duration:r}=this.audio,{maxTime:a}=this.state;let i=o+t;n&&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 n=t<0?Math.max(this.audio.volume+t,0):Math.min(this.audio.volume+t,1);this.changeVolume(n)};componentDidMount(){Se.addChangeListener(this.handleChange)}componentDidUpdate(t,n){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(),Se.isPlaying&&Se.playerId===this.props.id&&Se.pause()),n.playbackSpeed!==this.state.playbackSpeed&&(this.audio.playbackRate=this.state.playbackSpeed)}
153componentWillUnmount(){const{recordMediaPlayheadPosition:t,id:n}=this.props;Se.playerId===n&&Se.pause(),Se.removeChangeListener(this.handleChange),t&&t(iu(this.audio))}handleClickInsideAudioPlayer=t=>{t.stopPropagation(),t.preventDefault()};handleChange(){Se.playerId===this.props.id?this.audio&&(Se.isPlaying&&this.audio.paused?this.audio.play():!Se.isPlaying&&!this.audio.paused&&this.audio.pause(),this.forceUpdate()):Se.isPlaying&&(this.audio.pause(),this.forceUpdate())}containerResizeRef=t=>{const n=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}),n.observe(t),()=>{n.disconnect()}};render(){const{allowTabNavigation:t,id:n,isEditor:o,isOverlayAudio:r,labels:a,mediaSrc:i,mode:c,onDelete:l,onTranscriptClick:d,onTranscriptClose:h,transcriptMedia:m,item:f,side:p,refs:C,transcriptAudioPlayerIdOpen:g}=this.props,x=Se.isPlaying&&Se.playerId===n,{currentTime:b,playerExpanded:y}=this.state,L=this.audio?.duration??0,S=Number.isNaN(L)?0:L,T=Math.round(S-b),k=vQ(T),I=wy(T),E=wy(b),N=t?0:-1,M=!o,{a11yGroupAudioPlayer:A,a11yMediaPlay:j,a11yMediaPause:w,a11yMediaSeek:P}=a??{},R=On({overlay:r,collapsed:r&&!y,expanded:!r||y,"volume-slider-below":this.props.volumeSliderPosition==="below"}),O=o||c==="edit"?"Collapse audio player":a?.audioCollapsePlayer,B=o||c==="edit"?"Expand audio player":a?.audioExpandPlayer,D=y?O:B,F=bs({refs:C}),U=g===F?Tf(g):void 0;return(0,s.jsx)("div",{className:On("container"),"data-search-content-ignore":"",onClick:this.handleClickInsideAudioPlayer,ref:this.containerResizeRef,children:(0,s.jsxs)("div",{className:R,id:n,children:[M&&(0,s.jsx)("div",{className:On("waveform"),children:r?(0,s.jsx)(ws,{message:D,children:(0,s.jsx)("button",{"aria-label":D,className:On("waveform-icon"),onClick:this.onTogglePlayer,type:"button",children:(0,s.jsx)(Iy,{animating:x})})}):(0,s.jsx)("div",{className:On("waveform-icon",{disabled:!0}),children:(0,s.jsx)(Iy,{animating:x})})}),(0,s.jsxs)("div",{"aria-hidden":!t,"aria-label":A,"aria-owns":U,className:On("housing",{"with-border":M}),inert:!this.state.playerExpanded,onKeyDown:this.onKeyDown.bind(this),role:"group",tabIndex:N,children:[(0,s.jsxs)("div",{className:On("play-timer-housing"),children:[(0,s.jsx)("button",{"aria-label":x?w:j,className:On("play",{condensed:this.state.condensed}),onClick:this.onPlayClick,ref:H=>{this.play=H},tabIndex:N,type:"button",children:(0,s.jsx)(ae,{className:On("icon"),name:x?"pause-solid":"play-solid"})}),(0,s.jsx)("input",{"aria-label":P,"aria-valuemax":S,"aria-valuemin":0,"aria-valuenow":b,"aria-valuetext":E,className:On("seek-slider"),max:S,min:0,onChange:this.onSeekSliderChange.bind(this),ref:H=>{this.seekSlider=H},step:.01,style:{"--seek-slider-percent":`${this.state.sliderPercent}%`},type:"range",value:b}),(0,s.jsx)("div",{"aria-label":I,className:On("timer").mix(this.state.condensed?"visually-hidden-always":""),role:"timer",children:k})]}),(0,s.jsxs)("div",{className:On("player-controls"),ref:H=>{this.playerControls=H},children:[(0,s.jsx)(hQ,{condensed:this.state.condensed,onChange:H=>{this.setState({playbackSpeed:H})},speed:this.state.playbackSpeed}),(0,s.jsx)(gQ,{condensed:this.state.condensed,muted:this.state.muted,onChange:this.changeVolume,onMute:this.muteToggle,volume:this.state.volume}),c==="readonly"||o?(0,s.jsx)(QK,{audioPlayerId:F,condensed:this.state.condensed,onDelete:l,onTranscriptClick:d,onTranscriptClose:h,transcriptMedia:m}):(0,s.jsx)(oQ,{audioPlayerId:F,condensed:this.state.condensed,item:f,onTranscriptClick:d,onTranscriptClose:h,refs:C,side:p,transcriptMedia:m})]})]}),(0,s.jsx)("audio",{className:On("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:H=>{this.audio=H},src:mt(`${i}`)},"audio-"+n)]},`player-${n}`)})}onKeyDown(t){const o=Cs(this.onPlayClick),r=Cs(()=>this.keySeek(5)),a=Cs(()=>this.keySeek(-5)),i=Cs(()=>this.changeVolumeDelta(.05)),c=Cs(()=>this.changeVolumeDelta(-.05)),l=Cs(()=>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=Cn()([[_i,o],[Oo,Fo],[Mo,Fo],[Er,Fo],[Ir,Fo]]),p=Cn()([[_i,o],[SB,r],[TB,a]]),C=Cn()([[_i,o],[Oo,r],[Mo,a],[Ir,i],[Er,c],[g=>g.code==="KeyM",l]]);Cn()([[d,f],[h,p],[m,Fo],[ir(),C]])(t)}onPlayClick(t){t.stopPropagation(),t.preventDefault();const{audioVideoPlayhead:n}=this.props,{duration:o,paused:r}=this.audio;r&&n&&this.state.shouldLoadPlayheadPosition&&(this.audio.currentTime=o*n/100||0),r?this.audio.play():this.audio.pause()}onAudioPlayPause=t=>{const{id:n,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&&Se.playerId===n&&(Se.isPlaying=!1,o(Ha.timeMs(h)),i&&i(iu({currentTime:h,duration:m})));else{Se.playerId=n,Se.isPlaying=!0,r(Ha.timeMs(h));const f=bs({refs:c});a?.({audioPlayerId:f,transcriptMedia:l})}this.setState({shouldLoadPlayheadPosition:!1})};onVolumeChangeHandler=t=>{const{volume:n,muted:o}=t.currentTarget;this.setState({volume:n,muted:o})};onSeekSliderChange(t){const{canRestrictSeek:n}=this.props,{maxTime:o}=this.state;let r=t.currentTarget.valueAsNumber;n&&r>o&&(r=o),this.audio.currentTime=r}onLoadedMetadata(t){const{currentTime:n,duration:o,muted:r,volume:a}=t.currentTarget,i=n/o*100;this.setState({currentTime:n,muted:r,volume:a,sliderPercent:i});const{onLoad:c}=this.props;c()}onEnded(t){const n=t.currentTarget;this.audio.currentTime=0,this.setState({currentTime:n.currentTime}),Se.isPlaying=!1,this.props.onEnd(Ha.timeMs(n.currentTime)),this.forceUpdate()}onSeeked(t){const{id:n,onSeek:o,recordMediaPlayheadPosition:r}=this.props,{currentTime:a,duration:i}=t.currentTarget;Se.isPlaying&&Se.playerId!==n&&(Se.isPlaying=!1),Se.playerId=n,o(Ha.timeMs(a)),r&&r(iu({currentTime:a,duration:i}))}onTimeUpdate(t){const n=t.currentTarget,{recordMediaPlayheadPosition:o}=this.props,{currentTime:r,duration:a}=n,i=Math.floor(r);r>this.state.maxTime&&this.setState({maxTime:r});const c=r/a*100;Pg(),this.setState({currentTime:r,sliderPercent:c}
153),i%5===0&&this.state.playheadPositionSaveThrottle!==i&&o&&(o(iu(n)),this.setState({playheadPositionSaveThrottle:i}))}onTogglePlayer(t){this.setState(({playerExpanded:n})=>({playerExpanded:!n})),t.preventDefault(),t.stopPropagation()}}const CQ=Ha,no=e=>t=>t!=null&&typeof t=="object"&&"status"in t&&typeof t.status=="string"&&e.includes(t.status),bQ=no(["uploading","processing","cropping","crushing"]),kge=no(["canceled"]),Ay=no(["complete"]),xQ=no(["cropping"]),yQ=no(["crushing"]),SQ=no(["uploading"]),TQ=no(["processing"]),LQ=no(["errored"]),Ry=no(["cropping","crushing","errored","processing","uploading"]);function kQ(e){return e==null||typeof e!="object"?0:Object.values(e).filter(bQ).length}function Ige(e){return Math.round(e.loaded*100/e.total)}const Ege=e=>e?.file?.name||e?.opts?.filename||"";function Nge(e){return e==null||typeof e!="object"?!1:Object.keys(e).length>0&&kQ(e)>0}const cu=e=>q()("upload-progress__wrapper",e),Py=(0,u.createContext)(null);function My(){return(0,u.useContext)(Py)}const jge=Py.Provider;function IQ(e){function t(n){const o=My();return o?(0,s.jsx)(e,{...n,getUpload:o.getUpload,handleUploadDismiss:o.handleUploadDismiss}):(0,s.jsx)(e,{...n})}return t.displayName=`withUploadStatusContext(${e.displayName||e.name})`,t}const lu=({onClick:e,text:t})=>(0,s.jsxs)("button",{className:"upload-action-button",onClick:e,type:"button",children:[t,(0,s.jsx)("span",{className:"visually-hidden-always",children:" upload"})]}),ep=20,xc=ep/2,tp=xc-2,Oy=+(2*Math.PI*tp).toFixed(3),EQ=e=>Oy*(100-e)/100;function By({classes:e,percent:t}){return(0,s.jsxs)("svg",{className:q()("upload-progress__pie",e),focusable:"false",height:`${ep}px`,width:`${ep}px`,children:[(0,s.jsx)("circle",{className:"upload-progress__border",cx:xc,cy:xc,r:tp}),(0,s.jsx)("circle",{className:"upload-progress__progress",cx:xc,cy:xc,r:tp,strokeDasharray:Oy,strokeDashoffset:EQ(t)})]})}const NQ=({text:e})=>(0,s.jsxs)("div",{className:"upload-progress",children:[(0,s.jsx)(By,{classes:"upload-progress__pie--processing",percent:70}),(0,s.jsx)("div",{className:"upload-progress__text",children:e})]}),jQ=({percentage:e,text:t="Uploading\u2026"})=>(0,s.jsxs)("div",{className:"upload-progress",children:[(0,s.jsx)(By,{percent:e}),(0,s.jsx)("div",{className:"upload-progress__text",children:t})]}),np=({classes:e,jobId:t,onCancel:n,text:o})=>(0,s.jsxs)("div",{className:cu(e),children:[(0,s.jsx)(NQ,{text:o}),t&&(0,s.jsx)(lu,{onClick:n,text:"Cancel"})]}),wQ=({classes:e,onCancel:t,percentage:n,text:o})=>(0,s.jsxs)("div",{className:cu(e),children:[(0,s.jsx)(jQ,{percentage:n,text:o}),(0,s.jsx)(lu,{onClick:t,text:"Cancel"})]}),AQ=({message:e="Error"})=>(0,s.jsxs)("div",{className:"upload-error",children:[(0,s.jsx)(ae,{name:"circle-exclamation"}),(0,s.jsx)("div",{className:"upload-error__text",children:e})]}),RQ=({classes:e,message:t,onClick:n})=>(0,s.jsxs)("div",{className:cu(e),children:[(0,s.jsx)(AQ,{message:t}),(0,s.jsx)(lu,{onClick:n,text:"Dismiss"})]}),PQ=({message:e="Success"})=>(0,s.jsxs)("div",{className:"upload-success",children:[(0,s.jsx)(ae,{name:"check-regular"}),(0,s.jsx)("div",{className:"upload-success__text",children:e})]}),MQ=({classes:e,message:t,onClick:n})=>(0,s.jsxs)("div",{className:cu(e),children:[(0,s.jsx)(PQ,{message:t}),n?(0,s.jsx)(lu,{onClick:n,text:"Dismiss"}):null]}),OQ=e=>{const{classes:t,data:n={},errorMessage:o,jobId:r,progress:a,onCancelUpload:i,onCancelProcess:c,onErrorDismiss:l,onSuccessDismiss:d,successMessage:h,uploadType:m}=e;return LQ(e)?(0,s.jsx)(RQ,{classes:t,message:o||n?.message,onClick:l}):SQ(e)?(0,s.jsx)(wQ,{classes:t,onCancel:i,percentage:a,text:`Uploading ${m}\u2026`}):TQ(e)?(0,s.jsx)(np,{classes:t,jobId:r,onCancel:c,text:`Processing ${m}\u2026`}):yQ(e)?(0,s.jsx)(np,{classes:t,onCancel:c,text:`Uploading ${m}\u2026`}):xQ(e)?(0,s.jsx)(np,{classes:t,onCancel:c,text:"Cropping image\u2026"}):Ay(e)&&h?(0,s.jsx)(MQ,{classes:t,message:h,onClick:d}):(0,s.jsx)("div",{})},sp=_("audio-player"),BQ=sp("upload-state");function Dy({uploadId:e,onAIUploadFinish:t,volumeSliderPosition:n,...o}){const r=My(),{mode:a}=Md(),i=uc(),c=r&&e?r.getUpload(e):null,l=(0,u.useMemo)(()=>c&&c.mediaType==="audio"&&Ry(c),[c]),d=(0,Fe.A)(l);if((0,u.useEffect)(()=>{!l&&d&&t?.()},[l,d,t]),l){const{jobId:h,status:m,progress:f,data:p}=c,C=x=>()=>r?.handleUploadDismiss(x,c),g=sp({overlay:o.isOverlayAudio,static:o.isOverlayAudio});return(0,s.jsx)("div",{className:sp("container"),children:(0,s.jsx)("div",{className:g,children:(0,s.jsx)(OQ,{classes:BQ,errorMessage:p?.message,jobId:h,onCancelProcess:C("process"),onCancelUpload:C("upload"),onErrorDismiss:C("error"),progress:f,status:m,successMessage:"Processing\u2026",uploadType:"audio"})})})}return(0,s.jsx)(CQ,{...o,mode:a,transcriptAudioPlayerIdOpen:i?.audioPlayerIdOpen??null,volumeSliderPosition:n})}var DQ=v(91242),FQ=v.n(DQ),HQ=v(22954),$Q=v.n(HQ),_Q=v(48518),Oge=v(55861);function Fy(e){return(0,s.jsx)(_Q.i,{IconUnzoom:zQ,IconZoom:VQ,...e})}const VQ=()=>(0,s.jsx)(ae,{name:"arrows-two-from-center"}),zQ=()=>(0,s.jsx)(ae,{name:"arrows-two-to-center"}),UQ={course:({courseId:e})=>`/authoring/${e}`,courseLocales:({courseId:e})=>`/manage/locales/${e}`,dashboard:"/manage/all-content",lesson:({courseId:e,lessonId:t})=>`/authoring/${e}/lesson/${t}`};
153function GQ(){const t=$e()?.id,n=Xh();return(0,u.useCallback)(o=>n&&t!=null?UQ.lesson({courseId:t,lessonId:o}):xn(o),[t,n])}const WQ="about:blank",KQ=e=>{const t=e?.trim();if(!t)return null;const n=In(t);return n===WQ?null:/^(https?:\/\/|mailto:)/i.test(n)||/^(\.?\/|[#?])/.test(n)?n:`http://${n.replace(/^\/\//,"")}`},$a=u.memo(({align:e,alt:t,allowTabNavigation:n=!0,cornerRadius:o,disableZoom:r,getLessonPath:a,height:i,l10nId:c,labels:l,link:d,maxHeight:h=380,onLoad:m,shouldFillWidth:f,src:p,width:C})=>{const g=GQ(),x=a??g,b=To(t),y=d?.type==="url"&&d.destination?KQ(d.destination):null,L=d?.type==="block"?sU(d.destination):null,S=d?.type==="lesson"&&!!d.destination||L!=null||!!y,T=n&&!r&&!S,k=q()("img-img",{"img-img--left":e==="left","img-img--right":e==="right","img-img--center":!e||e==="center","img-img--fill":f});let I={};o!=null&&(I["--corner-radius"]=`${Number(o)}px`),C>0&&i>0&&i>h?(C=Math.round(C*h/i),i=h):h&&(!C||!i)&&(I={maxHeight:h});let E=(0,s.jsx)(En,{alt:b,className:k,"data-l10n-id":c,height:i,onLoad:m,src:p,style:I,width:C});return S&&d?d.type==="lesson"?E=(0,s.jsx)(un,{className:"img__link",to:x(d.destination),children:E}):d.type==="block"&&L?E=(0,s.jsx)(un,{className:"img__link",to:`${x(L.lessonId)}?blockId=${L.blockId}`,children:E}):y&&(E=(0,s.jsx)("a",{className:"img__link",href:y,rel:"noopener noreferrer nofollow",target:"_blank",children:E})):T&&(E=(0,s.jsx)(Fy,{a11yNameButtonUnzoom:l?.a11yUnzoomImage,a11yNameButtonZoom:l?.a11yZoomImage,children:E})),(0,s.jsx)("div",{className:"img",children:E})});var Dge=v(17897),QQ=v(22294),YQ=v.n(QQ);const ZQ=/^(\d{1,3})\.(\d{1,3})\.(\d{1,3})\.(\d{1,3})$/,XQ=/\.[a-z]{2,}\.?$/i,qQ=(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,JQ=e=>op(e);function Fge(e){try{if(JQ(e))return new URL(e);throw new Error("invalid URL")}catch{return}}const op=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:n}=t;if(!n)return!1;const o=ZQ.exec(n);return o?!qQ(Number(o[1]),Number(o[2])):XQ.test(n)},eY=/^<iframe\b[^>]*\ssrc="([^"]+)"[^>]*><\/iframe>$/,tY=e=>{if(typeof e!="string")return!1;const t=eY.exec(e);return t?op(t[1]):!1};var nY,sY,oY,rY,aY;const Hy=cn()("type","embed"),iY=YQ()("type","embedType"),cY=Jr()(/http:/i,"https:"),lY=e=>({embedType:"iframe",originalUrl:e,src:e}),dY=e=>$r(e.embed),$r=e=>e?.embedType||e?.type,Hge=e=>oY([[rY,nY(Hy,lY,cY)],[aY,sY(Hy,iY,e)]]),$ge=yo()(De()(tY,wg),op),_ge="We are unable to generate an embed for this URL. Please check that the URL is valid and the content is publicly accessible.";var _r=v(49860);const $y=e=>{const t=Ne("CDN_USER_CONTENT_URI"),n=new RegExp(Ne("CDN_URI"),"g");return di()?e:n.test(e)?`${t}${new URL(e).pathname}${new URL(e).search}`:e},uY=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:","")},hY=/^\/\/cdn.embedly.+src=.*\.typeform\.com%2F/,mY=e=>hY.test(e),fY=/^\/\//,_y=e=>e?.replace(fY,"https://"),du=e=>{try{if(e===!1)return e;const t=new URL(_y(e));if(t.host==="cdn.embedly.com"&&t.pathname==="/widgets/media.html"){const n=new URL("https://embed.articulateusercontent.com/media/");return n.search=t.search,n.searchParams.set("v","1"),n.href}return t.href}catch(t){const n=new Error("Could not parse embed url",{cause:t});return console.warn(n),e}},pY=De()(du,_y,Co()(mY,uY),Co()(Boolean,mt),In),gY=e=>{const{paddingBottom:t,ref:n,value:o}=e;return(0,s.jsx)("div",{className:"embed--iframe",dangerouslySetInnerHTML:_r.useMemo(()=>({__html:o}),[o]),ref:n,style:{paddingBottom:t}})};class vY extends _r.Component{player;refIframeContainer=_r.createRef();refIframePlayer=_r.createRef();state={duration:0,isReady:!1};static get defaultProps(){return{allowTabNavigation:!0,shouldPause:!1,showMetaData:!0}}componentDidUpdate(t){!t.shouldPause&&this.props.shouldPause&&Se.isPlaying&&(this.player?.pause(),Se.isPlaying=!1)}componentWillUnmount(){$r(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}),Se.addChangeListener(this.handlePlayerChange))};handlePlayerPlay=()=>{const{id:t}=this.props;Se.isPlaying&&Se.playerId!==t&&(Se.isPlaying=!1),Se.playerId=t,Se.isPlaying=!0};handlePlayerUpdate=t=>{this.props.progressChanged?.({done:t.seconds/t.duration*100})};handlePlayerChange=()=>{const{id:t}=this.props;Se.playerId===t&&(Se.isPlaying?this.player.play():this.player.pause())};setupPlayer=()=>{this.refIframePlayer.current?.contentWindow!=null&&(this.player!=null&&this.teardownPlayer(),this.player=new(FQ()).Player(this.refIframePlayer.current),this.player.on("ready",this.handlePlayerReady))};teardownPlayer=()=>{Se.isPlaying=!1,Se.removeChangeListener(this.handlePlayerChange),this.player&&(this.player.off("play"),this.player.off("ready"),this.player.off("timeupdate"),delete this.player)};playerSupportsMethods=t=>{const n=o=>this.player.supports("method",o);return $Q()(n)(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(n=>{this.player.setCurrentTime(n+t)})})};changeVolume=t=>{this.playerSupportsMethods(["getVolume","setVolume"])&&this.player.getVolume(n=>{this.player.setVolume(n+t)})};onKeyDown=t=>{const r=Cs(this.togglePlay),a=Cs(()=>this.keySeek(5)),i=Cs(()=>this.keySeek(-5)),c=Cs(()=>this.changeVolume(10)),l=Cs(()=>this.changeVolume(-10));Cn()([[am,r],[Oo,a],[Mo,i],[Ir,c],[Er,l]])(t)};renderProvider=()=>{const{allowTabNavigation:t,embedId:n,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 p=du(In(h)),C=o&&Gn(p),g=`${n}-provider`,x=C?"":void 0,b=C?void 0:p,y=C?void 0:"noopener noreferrer",L=C?"button":void 0,S=C?void 0:"_blank";return(0,s.jsx)("h2",{className:"embed__provider",children:(0,s.jsxs)("a",{"aria-describedby":C?gs(g):void 0,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:y,role:L,style:C?{display:"inline-block"}:void 0,tabIndex:t?0:-1,target:S,children:[(0,s.jsx)(En,{alt:f?m:"",className:"embed__providerIcon",src:f}),(0,s.jsx)("span",{className:"embed__providerName",children:m})]})})};renderMetaData=()=>{const{allowTabNavigation:t,data:n,embedId:o,externalLinksDisabled:r,labels:a,onLinkBlur:i,onLink
153Focus:c,onLinkMouseEnter:l,onLinkMouseLeave:d,showMetaData:h}=this.props,{src:m,title:f,description:p,provider:C}=n,g=$r(n);if(!h&&g!=="link")return null;const x=du(In(m)),b=r&&Gn(x),y=`${o}-metadata-title`,L=`${o}-metadata-readmore`,S=T=>({"aria-describedby":b?gs(T):void 0,"data-external":b?"":void 0,href:b?void 0:x,id:b?T:void 0,onBlur:b?()=>i?.(T):void 0,onFocus:b?()=>c?.(T):void 0,onMouseEnter:b?()=>l?.(T):void 0,onMouseLeave:b?()=>d?.(T):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,s.jsxs)("div",{className:"embed__meta__content",children:[(0,s.jsx)("h2",{className:"embed__title",children:(0,s.jsx)("a",{className:"brand--hoverColor",...S(y),children:(0,s.jsx)(je,{value:f})})}),(0,s.jsx)(je,{className:"embed__description",value:p}),(0,s.jsxs)("a",{className:"embed__readMore brand--hoverColor",...S(L),children:[g==="link"?`${a?.embedReadMore} ${C}`:`${a?.embedViewOn} ${C}`,(0,s.jsx)("i",{className:"icon icon-chevron-right"})]})]})};render(){const{allowTabNavigation:t,data:n,embedId:o,externalLinksDisabled:r,isLesson:a,labels:i,onLinkBlur:c,onLinkFocus:l,onLinkMouseEnter:d,onLinkMouseLeave:h,showMetaData:m}=this.props,{useRelativePath:f}=n??{},{description:p,originalUrl:C,src:g,thumbnail:x,title:b}=n,y=$r(n);if(y==="iframe"){const L=document.createElement("div");L.innerHTML=wg(g);const S=L.firstChild,T=S&&S.tagName&&S.tagName.toLowerCase()==="iframe";let k=100,I=32;if(this.props.isAuthoring&&f)return(0,s.jsxs)("div",{children:[(0,s.jsx)("h2",{className:"embed__relativeUrl--iframe",children:"Embedded iframe with a relative url"}),(0,s.jsx)("p",{className:"embed__relativeUrl--title",children:b}),(0,s.jsx)("p",{className:"embed__relativeUrl--url",children:C})]});if(T){const j=S.width.match(/%/),w=parseInt(S.width);S.src=In(S.src),k=j?700*(w/100):w||16,I=parseInt(S.height)}const E=I/k,N=T?`${E*100}%`:"3rem";let M=null;
153try{M=new URL(S.src)}catch{}if(M){const{hostname:j}=M,w=j==="typeform.com"||j.endsWith(".typeform.com"),P=j==="forms.office.com";w&&(M.searchParams.append("disable-auto-focus","true"),S.src=M.toString()),P&&(M.searchParams.append("embed","true"),S.src=M.toString())}const A=T?S.outerHTML:"<div>Error: Invalid iframe tag. Please check the iframe source.</div>";return(0,s.jsxs)("div",{"aria-hidden":!t,"aria-label":i?.embedPlayerGroup,className:"embed",role:"group",children:[f&&(0,s.jsx)("div",{className:"embed__title embed--iframe__title",children:b}),(0,s.jsx)(gY,{paddingBottom:N,ref:this.refIframeContainer,value:A})]})}else if(a){const L=f?g:du(In(g)),S=r&&Gn(L),T=`${o}-lesson-title`,k=`${o}-lesson-url`,I=S?"":void 0,E=S?void 0:L,N=S?void 0:"noopener noreferrer nofollow",M=S?"button":void 0,A=S?void 0:"_blank";if(f){const j={"aria-describedby":S?gs(T):void 0,"data-external":S?"":void 0,href:L,id:S?T:void 0,onBlur:S?()=>c?.(T):void 0,onFocus:S?()=>l?.(T):void 0,onMouseEnter:S?()=>d?.(T):void 0,onMouseLeave:S?()=>h?.(T):void 0,rel:S?void 0:"noopener noreferrer nofollow",role:S?"button":void 0,tabIndex:t?0:-1,target:S?void 0:"_blank"};return(0,s.jsxs)("div",{"aria-hidden":!t,"aria-label":i?.a11yBlockEmbed,className:"embed embed--link embed--rich",role:"group",children:[(0,s.jsx)("h2",{className:"embed__title",children:(0,s.jsx)("a",{className:"brand--hoverColor",...j,children:(0,s.jsx)(je,{value:b})})}),["link","photo"].includes(y)?(0,s.jsxs)("a",{"aria-describedby":S?gs(k):void 0,className:"embed__relativeUrl--url","data-external":I,href:E,id:S?k:void 0,onBlur:S?()=>c?.(k):void 0,onFocus:S?()=>l?.(k):void 0,onMouseEnter:S?()=>d?.(k):void 0,onMouseLeave:S?()=>h?.(k):void 0,rel:N,role:M,tabIndex:t?0:-1,target:A,children:[L,y==="photo"?(0,s.jsx)("div",{className:"embed__relativeUrl--image",children:(0,s.jsx)(En,{alt:x?b:"",className:"embed__img",src:L})}):null]}):this.renderEmbedIframe({allowTabNavigation:t,labels:i,src:g,thumbnail:x,title:b,type:y})]})}return(0,s.jsxs)("div",{"aria-hidden":!t,"aria-label":i?.a11yBlockEmbed,className:"embed embed--link embed--rich",role:"group",children:[this.renderProvider(),["link","photo"].includes(y)?(0,s.jsx)("a",{"aria-describedby":S?gs(k):void 0,"data-external":I,href:E,id:S?k:void 0,onBlur:S?()=>c?.(k):void 0,onFocus:S?()=>l?.(k):void 0,onMouseEnter:S?()=>d?.(k):void 0,onMouseLeave:S?()=>h?.(k):void 0,rel:N,role:M,tabIndex:t?0:-1,target:A,children:(0,s.jsx)(En,{alt:x?b:"",className:"embed__img",src:$y(x)})}):this.renderEmbedIframe({allowTabNavigation:t,labels:i,src:g,thumbnail:x,title:b,type:y}),this.renderMetaData()]})}else if(y==="link"){const L=f?g:In(g),S=f||r&&Gn(L),T=`${o}-link-readmore`,k=S?"":void 0,I=S?void 0:L,E=S?void 0:"noopener noreferrer nofollow",N=S?"button":void 0,M=S?void 0:"_blank";return(0,s.jsxs)("div",{"aria-hidden":!t,"aria-label":i?.embedLinkGroup,className:"embed embed--link brand--linkColor",role:"group",children:[(0,s.jsx)(je,{className:"embed__title",value:b}),(0,s.jsx)(je,{className:"embed__description",value:p}),(0,s.jsx)("a",{"aria-describedby":r&&S?gs(T):void 0,className:"embed__readMore brand--hoverColor","data-external":k,href:I,id:S?T:void 0,onBlur:S?()=>c?.(T):void 0,onFocus:S?()=>l?.(T):void 0,onMouseEnter:S?()=>d?.(T):void 0,onMouseLeave:S?()=>h?.(T):void 0,rel:E,role:N,target:M,children:i?.embedReadMore})]})}else return(0,s.jsxs)("div",{className:"embed embed--media",children:[m?(0,s.jsx)(je,{"aria-hidden":!t,className:"embed__title",value:b}):null,this.renderEmbedIframe({allowTabNavigation:t,labels:i,src:g,thumbnail:x,title:b,type:y})]})}renderEmbedIframe=t=>{const{allowTabNavigation:n,labels:o,src:r,thumbnail:a,title:i,type:c}=t,{useRelativePath:l}=this.props.data??{};if(c==="photo")return(0,s.jsx)("figure",{className:"embed__media-wrap embed__media-wrap--photo",children:(0,s.jsx)($a,{allowTabNavigation:n,labels:o,src:$y(a)})});{const d=Ys.isIe11||Ys.isEdge,h=q()("embed__media-wrap",{"embed__media-wrap--ms_browser":d});return(0,s.jsxs)("figure",{"aria-hidden":!n,"aria-label":o?.embedPlayerGroup,className:h,onKeyDown:this.onKeyDown,ref:this.refIframeContainer,tabIndex:n?0:-1,children:[(0,s.jsx)("meta",{content:"origin",name:"referrer"}),(0,s.jsx)("iframe",{allowFullScreen:!0,className:"embed__media",frameBorder:"0",inert:n?void 0:!0,loading:"lazy",onLoad:this.setupPlayer,ref:this.refIframePlayer,scrolling:l?"yes":"no",src:l?r:pY(r),title:i})]})}}}const Vy=e=>{const t=Xh(),n=$e(),o=e.externalLinksDisabled??(n&&"externalLinksDisabled"in n?n.externalLinksDisabled:!1),{handleMouseEnter:r,handleMouseLeave:a,handleFocus:i,handleBlur:c}=Td(),[l,d]=_r.useState([]),h=_r.useId();return _r.useEffect(()=>{if(!o||!e.data){d([]);return}const m=[],{providerUrl:f,src:p,useRelativePath:C}=e.data,g=$r(e.data);
153e.isLesson&&p&&Gn(In(p))&&(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&&Gn(In(f))&&m.push(`${h}-provider`)),!e.isLesson&&e.showMetaData&&f&&Gn(In(f))&&m.push(`${h}-provider`),!e.isLesson&&e.showMetaData&&p&&Gn(In(p))&&g!=="iframe"&&(m.push(`${h}-metadata-title`),m.push(`${h}-metadata-readmore`)),g==="link"&&(C||p&&Gn(In(p)))&&m.push(`${h}-link-readmore`),d(m)},[o,e.data,e.showMetaData,e.isLesson,h]),(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(vY,{...e,embedId:h,externalLinksDisabled:o,isAuthoring:t,onLinkBlur:c,onLinkFocus:i,onLinkMouseEnter:r,onLinkMouseLeave:a}),l.map(m=>(0,s.jsx)(Ld,{anchorId:m},m))]})};var CY=v(63074);const rp=e=>e.toString().padStart(2,"0");function uu(e){const t=Math.floor(e),n=Math.floor(t/3600),o=Math.floor(t%3600/60),r=t%60;return n>0?`${n}:${rp(o)}:${rp(r)}`:`${o}:${rp(r)}`}function zge(e=[]){return e.map(({time:t,title:n})=>`${uu(t)} ${n}`).join(` 154`)}const bY=e=>{const[t,n,o]=e.split(":").reverse();return parseInt(t,10)+parseInt(n,10)*60+parseInt(o||"0",10)*3600},xY=/^(\d*:)?\d{1,2}:\d{2}$/,Uge=(e,t)=>{const n=e.split(` 155`).filter(r=>r.trim()!==""),o=[];for(const r of n){const[a,...i]=r.split(" ");if(!xY.test(a))throw new Error("Chapters must use the format M:SS or H:MM:SS. Chapters will not display.");o.push({time:bY(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},yY={hovered:null,setHovered:an},ap=(0,u.createContext)(null);function SY({children:e}){const t=(0,u.useContext)(ap),[n,o]=(0,u.useState)(null),r=(0,u.useMemo)(()=>({hovered:n,setHovered:o}),[n]);return t!=null?(0,s.jsx)(s.Fragment,{children:e}):(0,s.jsx)(ap.Provider,{value:r,children:e})}const TY=()=>(0,u.useContext)(ap)??yY,LY=.001,kY=(e,t,n)=>e!=null&&e.kind===t&&Math.abs(e.time-n)<LY,zy=_("video-seek-bar-overlay"),ip=e=>Math.max(0,Math.min(100,e)),Uy=e=>{const t=typeof e=="number"?e:Number(e);return Number.isFinite(t)?Math.max(0,t):null},IY=(e,t)=>{if(!Number.isFinite(t)||t<=0)return[];const n=e.map(o=>{const r=Uy(o.time);return r==null||r>=t?null:{chapter:o,startTime:r}}).filter(o=>o!=null).sort((o,r)=>o.startTime-r.startTime);return n.map((o,r)=>{const a=n[r+1],i=a!=null?a.startTime:t;return i<=o.startTime?null:{chapter:o.chapter,endTime:i,leftPercent:ip(o.startTime/t*100),startTime:o.startTime,widthPercent:ip((i-o.startTime)/t*100)}}).filter(o=>o!=null)},EY=(e,t)=>{if(!Number.isFinite(t)||t<=0)return[];const n=new Set;return e.forEach(o=>{const r=Uy(o);r==null||r>=t||n.add(r)}),[...n].sort((o,r)=>o-r).map(o=>({leftPercent:ip(o/t*100),time:o}))};function NY({chapters:e,checkpointTimesSeconds:t,durationSeconds:n,onSeekToTime:o}){const r=Nt(),a=u.useMemo(()=>IY(e,n),[e,n]),i=u.useMemo(()=>EY(t,n),[t,n]),{hovered:c,setHovered:l}=TY(),d=r?.videoCheckpointDefaultTitle||"Checkpoint",h=u.useMemo(()=>{const m=a.filter(p=>p.leftPercent>0).map(p=>({kind:"chapter",element:"chapter",time:p.startTime,leftPercent:p.leftPercent,label:p.chapter.title,key:`chapter-${p.startTime}-${p.chapter.title}`})),f=i.map(p=>({kind:"checkpoint",element:"marker",time:p.time,leftPercent:p.leftPercent,label:`${d} ${uu(p.time)}`,key:`checkpoint-${p.time}`}));return[...m,...f].sort((p,C)=>p.time-C.time||(p.kind===C.kind?0:p.kind==="chapter"?-1:1))},[a,i,d]);return h.length===0?null:(0,s.jsx)("div",{className:zy("markers"),role:"presentation",children:h.map(m=>(0,s.jsx)("button",{"aria-label":m.label,className:zy(m.element,{hovered:kY(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 jY=()=>{const e=ca();return Ih(e)},Gy=(e,t)=>e in t?"Articulate":e.length===2?"ISO-639-1":e.length===3?"ISO-639-3":null,wY=e=>Object.entries(e).reduce((t,[,n])=>(n.ISO639_1&&(t.iso1Map[n.ISO639_1]=t.iso1Map[n.ISO639_1]||[],t.iso1Map[n.ISO639_1].push(n)),n.ISO639_3&&(t.iso3Map[n.ISO639_3]=t.iso3Map[n.ISO639_3]||[],t.iso3Map[n.ISO639_3].push(n)),t),{iso1Map:{},iso3Map:{}}
155),AY=(e,t,n)=>{let o=e,r="",a=n??Gy(e,t);return!a&&e.includes("-")&&([o,r]=e.split("-"),a=Gy(o,t),a&&(e=o)),{languageCode:o,code:e,regionCode:r,standard:a??"Articulate"}},yc=(e,t,n={})=>{const{code:o,standard:r}=AY(e.toLowerCase(),t,n.standard),{location:a,script:i,variant:c}=n;if(r!=="Articulate"){const{iso1Map:l,iso3Map:d}=wY(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,p=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||p||C})||h[0]||null:null}return t[o]??null},Gge=(e,t,n={})=>yc(e,t,{standard:"Articulate",...n})?.ISO639_1||null,Wge=(e,t,n={})=>yc(e,t,{standard:"Articulate",...n})?.ISO639_3||null,Kge=(e,t,n={})=>yc(e,t,{standard:"ISO-639-1",...n})?.code||null,Qge=(e,t,n={})=>yc(e,t,{standard:"ISO-639-3",...n})?.code||null,Wy=e=>!!(e&&"video"in e&&e.video&&"key"in e.video&&e.video.key),Ky=e=>!!(e&&"customVideo"in e&&e.customVideo&&"src"in e.customVideo&&e.customVideo.src),Qy=e=>!!(e&&"customVideo"in e&&e.customVideo&&"key"in e.customVideo&&e.customVideo.key),RY=(e,t)=>{const n=Wy(e)&&Wy(t)&&e.video.key===t.video.key,o=Ky(e)&&Ky(t)&&e.customVideo.src===t.customVideo.src,r=Qy(e)&&Qy(t)&&e.customVideo.key===t.customVideo.key;return n||o||r},PY=e=>!!(e&&"video"in e&&e.video&&"captions"in e.video&&e.video.captions?.length),MY=e=>{const t=Mn(),{currentLocale:n}=tt(),o=we(e,t),r=we(e,n),a=jY();return(0,u.useMemo)(()=>{if(!!(n&&n!==t)&&a&&RY(o,r)&&PY(r))return r.video.captions.find(l=>yc(l.code,a)?.code===n)?.id},[t,n,o,r,a])},OY=2,BY=0,DY=()=>({previousTime:0,triggeredTimes:new Set}),FY=(e,t,n)=>{const{previousTime:o}=n;t>o+OY&&e.filter(a=>a<=t).forEach(a=>n.triggeredTimes.add(a)),t<o-BY&&(n.triggeredTimes=new Set(e.filter(a=>a<=t))),n.previousTime=t;const r=e.find(a=>t>=a&&!n.triggeredTimes.has(a));return r==null?null:(n.triggeredTimes.add(r),r)};function HY({checkpointTimesSeconds:e,isLoaded:t,getMediaElement:n,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=n();if(i==null)return;const c=DY();c.previousTime=i.currentTime,a.filter(f=>f<=i.currentTime).forEach(f=>c.triggeredTimes.add(f));let l=0;const d=()=>{const f=FY(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)}},[n,t,a])}function Yy(e){return Number.isFinite(e)&&e>0?e:0}function cp({allowTabNavigation:e=!0,audioVideoPlayhead:t,canAdjustPlaybackSpeed:n,canRestrictSeek:o,captions:r,chapters:a=[],checkpointTimesSeconds:i=[],cornerRadius:c,disableDownload:l=!1,id:d,media:h,onCheckpointReached:m,onLoad:f,poster:p,progressChanged:C,recordMediaPlayheadPosition:g,ref:x,shouldPause:b,src:y,style:L,subtitle:S,type:T}){const k=u.useRef(null),[I,E]=u.useState(0),N=u.useCallback(J=>{k.current=J,typeof x=="function"?x(J):x&&(x.current=J)},[x]),M=(0,Fe.A)(b),A=Xh(),j=Nt(),w=rm(),P=MY(h),R=T==="customVideo",O=u.useCallback(()=>k.current?.containerElement?.querySelector("video")??null,[]),B=u.useCallback(J=>{k.current?.seekToTime(J)},[]),D=u.useCallback(J=>{Pg(),E(Yy(J.duration)),C?.(J)},[C]),F=u.useCallback(J=>{g?.(J)},[g]),V=u.useCallback(()=>{Se.playerId=d,Se.isPlaying=!0},[d]),U=u.useCallback(()=>{Se.playerId===d&&(Se.isPlaying=!1)},[d]),[H,K]=u.useState(!1),Q=u.useRef(!1),z=u.useCallback(()=>{K(!0);const J=k.current;if(J){const{duration:te}=J.getProgress();E(Yy(te)),f?.({player:J})}},[f]);HY({checkpointTimesSeconds:i,isLoaded:H,getMediaElement:O,onCheckpointReached:m}),u.useEffect(()=>{Q.current||H&&(t!=null&&t>0&&k.current?.seekToPercent(t),Q.current=!0)},[H,t]),u.useEffect(()=>{!M&&b&&k.current?.pause()},[M,b]),u.useEffect(()=>{const J=()=>{(!Se.isPlaying||Se.playerId!==d)&&k.current?.pause()};return Se.addChangeListener(J),()=>{Se.removeChangeListener(J)}},[d]);const W=u.useMemo(()=>{const J=typeof c=="number"||typeof c=="string"?{"--ov-corner-radius":`${Number(c)}px`}:void 0;if(!(J==null&&L==null))return{...J,...L}},[c,L]),$=p==null?void 0:R?p:mt(p),G=H&&I>0&&(a.length>0||i.length>0),Z=`${R?y:mt(y)}?v=1`,Y=R?"application/x-mpegURL":void 0,ne=u.useMemo(()=>[{src:Z,type:Y??"video/mp4"}],[Z,Y]),ee=u.useMemo(()=>{const J=[];
155if(r==null&&S&&J.push({kind:"captions",label:"English",src:R?S:mt(S),srcLang:"en"}),r!=null)for(const te of r){const he=te.url||(te.key!=null?mt(te.key):void 0);he&&J.push({default:te.id===P?!0:void 0,kind:"captions",label:te.name||w?.(te.code)||te.code,src:he,srcLang:te.code})}return J},[r,S,R,w,P]);return(0,s.jsx)(CY.L,{crossOrigin:Ys.isLocalFilesystem?void 0:"anonymous",enableDownload:A&&!l,enablePlaybackSpeed:n??void 0,enableSeek:o==null?void 0:!o,inert:!e,labelBackToMoreOptions:j?.a11yMediaMoreOptionsBack,labelCaptions:j?.a11yMediaCaptions,labelCaptionsOff:j?.a11yMediaCaptionsOff,labelContainer:j?.a11yGroupVideoPlayer??"Video player",labelCurrentTime:j?.a11yMediaCurrentTime,labelDownload:j?.a11yMediaDownload,labelDuration:j?.a11yMediaDuration,labelError:j?.a11yMediaErrorVideo,labelExitFullscreen:j?.a11yMediaExitFullscreen,labelExitPictureInPicture:j?.a11yMediaExitPictureInPicture,labelFullscreen:j?.a11yMediaFullscreen,labelMoreOptions:j?.a11yMediaMoreOptions,labelMute:j?.a11yMediaMute,labelPause:j?.a11yMediaPause,labelPictureInPicture:j?.a11yMediaPictureInPicture,labelPlay:j?.a11yMediaPlay,labelPlaybackRate:j?.a11yMediaPlaybackRate,labelPlaybackRateNormal:j?.a11yMediaPlaybackRateNormal,labelPlayVideo:j?.a11yMediaPlayVideo,labelReplay:j?.a11yMediaReplay,labelSeek:j?.a11yMediaSeek,labelSeekDisabled:j?.a11yMediaSeekDisabled,labelUnmute:j?.a11yMediaUnmute,labelVolume:j?.a11yMediaVolume,onPause:U,onPlay:V,onPlayheadSave:F,onReady:z,onTimeUpdate:D,poster:$,ref:N,seekOverlay:G?(0,s.jsx)(NY,{chapters:a,checkpointTimesSeconds:i,durationSeconds:I,onSeekToTime:B}):null,sources:ne,style:W,timeUpdateInterval:1e3,tracks:ee})}var $Y=v(52329),Zy=v.n($Y),_Y=v(49508),VY=v.n(_Y);const zY=e=>({...e,courseId:e.courseId||Vs()(["course","id"],e)}),UY=e=>({...e,lessonId:e.lessonId||Vs()(["lesson","id"],e)}),GY=({id:e,courseId:t,lessonId:n,refs:o})=>e||(o&&n?`${n}-${o}`:n||t),lp=De()(GY,UY,zY),Yge=Mt()(vi()(Xe()("id"),Zy()("id",lp)),yo()(VY()(Xe(),[Xe()("id"),Xe()("uploads")]),bo()(["id"])),Zy()("isUploading",Je()("status","uploading")));function Zge(e){const t=e.match(/^(.*\/)?([^/]+)$/);if(!t)return encodeURIComponent(e);const n=t[1]??"",o=t[2],r=encodeURIComponent(o);return`${n}${r}`}function WY(e){return e.replace(/%2F/g,"/")}var KY=v(49860);const dp=e=>!!(e&&("key"in e&&e.key||"src"in e&&e.src)),hu=e=>dp(e)&&!e.isProcessing&&!e.error,QY=(e,t)=>t?.mediaType==="audio"?!!e&&(dp(e)||Ry(t)||Ay(t)&&!dp(e)):hu(e),YY=e=>Co()(Be()(!!e),KK()(`-${e}`));class ZY extends KY.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:n,openTranscript:o,refs:r}=this.props,a=t?.items?.length===1?t.items[0]:void 0,i=this.props.item??a;let c=n;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=n}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||n)&&i&&o)return o({blockId:t?.id??n,item:i,refs:d})}renderAudio(t,n){const{activeIndex:o,allowTabNavigation:r,block:a,blockId:i,getL10nValue:c,index:l,isOverlayAudio:d,item:h,itemIndex:m,labels:f,lessonNumber:p,shouldPause:C,side:g}=this.props,{audio:x}=c(t),b=a&&typeof a=="object"&&"blockId"in a?a.blockId:a?.id||i||"",y=h&&typeof h=="object"&&"id"in h?h.id:"",L=this.props.refs??`items:${b}/items:${y}`,S=`audio-${p}-${l}`;return(0,s.jsx)(Dy,{activeIndex:o,allowTabNavigation:r,id:S,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:n,volumeSliderPosition:this.props.volumeSliderPosition},S)}renderImage(t){const{allowTabNavigation:n,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:p}=d??{};return(0,s.jsx)($a,{align:h,allowTabNavigation:n,alt:t?.alt,cornerRadius:o,disableZoom:p,height:m?.height||m?.originalHeight,labels:c,link:t?.link,maxHeight:a,onLoad:l,shouldFillWidth:t?.fillWidth,src:gt(t),width:m?.width||m?.originalWidth},f)}renderVideo(t,n){const{allowTabNavigation:o,blockId:r,lessonNumber:a,index:i,enableVideoPlaybackSpeed:c,shouldPause:l}=this.props,d=t.skipProcess?WY(t.poster):t.poster,h=YY(r)(`video-${a}-${i}-${d||""}`);return(0,s.jsx)(cp,{allowTabNavigation:o,canAdjustPlaybackSpeed:c,captions:t.captions,id:h,media:n,poster:d,shouldPause:t.pause||l,src:t.key},h)}renderEmbed(t){const{allowTabNavigation:n,embedClass:o,labels:r,opts:a,shouldPause:i}=this.props,{fullEmbed:c,showMetaData:l=!0}=a,d=`embed-${this.props.index}`;return(0,s.jsx)("div",{className:o,children:(0,s.jsx)(Vy,{allowTabNavigation:n,data:t,i
155d:d,isLesson:c,labels:r,shouldPause:t.pause||i,showMetaData:l},d)})}render(){const{blockId:t,hasPadding:n,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=q()({"media-group":n}),{audio:h,embed:m,image:f,video:p}=this.props.getL10nValue(l)??{},C=lp({lessonId:r,refs:c}),g=this.props.getUpload?this.props.getUpload(C):null;return(0,s.jsxs)("div",{className:d,"data-l10n-id":Ot(l),children:[(!a||a==="image")&&hu(f)&&this.renderImage(f),(!a||a==="audio")&&QY(h,g)&&this.renderAudio(l,C),(!a||a==="video")&&hu(p)&&this.renderVideo(p,l),(!a||a==="embed")&&hu(m)&&this.renderEmbed(m)]})}}const Jt=IQ(Hl(r3(it(ZY)))),XY=_("flashcard"),qY="block-search-current",JY="flashcard-side--front",Xy="flashcard-side--back",eZ=60,tZ=8;class nZ 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,suppressFlipFocus:!1};cardRef=(0,u.createRef)();revealSettleTimer=void 0;render(){const{cardRef:t,handleFlip:n,handleSideReady:o,handleTouchEnd:r,props:{activeIndex:a,allowTabNavigation:i,backDescription:c,backMedia:l,backType:d,block:h,forceFlipped:m,frontDescription:f,frontMedia:p,frontType:C,id:g,index:x,isHidden:b,labels:y,lessonId:L,prefersKeyboardNavigation:S,settingShowHint:T,size:k,type:I,wrapElement:E,wrapRole:N},state:{areSidesReady:M,flipped:A,isMounted:j,suppressFlipFocus:w}}=this,P=m||A,R=XY({large:k==="large",small:k==="small",flipped:P,stack:I==="stack"});return(0,s.jsxs)(E,{"aria-hidden":!i,className:R,onClick:n,onTouchEnd:r,ref:t,role:N,children:[(0,s.jsx)(Kt,{activeIndex:a,allowTabNavigation:i,blockId:h?.id,blockType:I,description:f,index:x,isActiveSide:!P,isAriaHidden:P&&j&&M,isFlipped:P,isHidden:b,itemId:g,labels:y,lessonId:L,media:p,onFlip:n,onReady:o,prefersKeyboardNavigation:S,settingShowHint:T,side:"front",size:k,suppressFlipFocus:w,tag:Jy,type:C}),(0,s.jsx)(Kt,{activeIndex:a,allowTabNavigation:i,blockId:h?.id,blockType:I,description:c,index:x,isActiveSide:P,isAriaHidden:!P&&j&&M,isFlipped:P,isHidden:b,itemId:g,labels:y,lessonId:L,media:l,onFlip:n,onReady:o,prefersKeyboardNavigation:S,settingShowHint:T,side:"back",size:k,suppressFlipFocus:w,tag:sZ,type:d})]})}componentDidMount(){this.setState({isMounted:!0}),window.addEventListener(Ke,this.handleNavEvent),window.addEventListener(Do,this.handleRevealItem)}componentDidUpdate(t,n){const{props:{allowTabNavigation:o,id:r,onStep:a},state:{hasFlippedOnce:i}}=this;!n.hasFlippedOnce&&i&&a({id:r}),t.allowTabNavigation&&!o&&this.setState({flipped:!1})}componentWillUnmount(){this.clearRevealSettle(),window.removeEventListener(Ke,this.handleNavEvent),window.removeEventListener(Do,this.handleRevealItem)}handleNavEvent=t=>{const{path:n}=t.detail,{cardId:o}=Sa(n,["block","card"]);if(o===this.props.id){let r=!1;n.includes("back")&&(r=!0),this.setState({flipped:r},()=>{this.props.type!=="stack"&&!ef(this.cardRef.current,"center")&&this.cardRef.current.scrollIntoView({behavior:"instant",block:"center"})})}};handleRevealItem=t=>{const{blockId:n,itemId:o}=t.detail;n!==this.props.blockId||!Yn(o,this.props.id)||(this.clearRevealSettle(),this.tryRevealFlip(0))};tryRevealFlip=t=>{const n=this.getActiveHighlightSide();if(n!=null){this.setState({areSidesReady:!0,flipped:n==="back",suppressFlipFocus:!0},()=>{this.setState({suppressFlipFocus:!1})});return}t>=tZ||(this.revealSettleTimer=setTimeout(()=>{this.tryRevealFlip(t+1)},eZ))};clearRevealSettle=()=>{clearTimeout(this.revealSettleTimer),this.revealSettleTimer=void 0};getActiveHighlightSide=()=>{const t=this.cardRef.current;if(t==null||typeof CSS>"u"||!("highlights"in CSS))return;const n=CSS.highlights.get(qY);if(n!=null)for(const o of n){const{startContainer:r}=o,i=(r instanceof Element?r:r.parentElement)?.closest(`.${Xy}, .${JY}`);if(i!=null&&t.contains(i))return i.classList.contains(Xy)?"back":"front"}};handleFlip=t=>{const{block:n,index:o}=this.props,r=window.getSelection(),a=r.toString()&&this.cardRef.current?.contains(r.anchorNode);
155if(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=n?.items?.[o],d=l?.[c]?.media,h=`items:${n?.id}/items:${l?.id}/${c}`;this.props.onTranscriptUpdate?.({audioPlayerId:bs({refs:h}),transcriptMedia:d}),this.props.onFlip?.(this.props.index,i)};handleTouchEnd=t=>{t.stopPropagation()};handleSideReady=()=>{this.setState({areSidesReady:!0})}}const qy=Hl(it(nZ)),_a=_("flashcard-side"),mu=_("flashcard-side-flip");class Vr extends u.PureComponent{static descriptionActionTypes={INITIAL:"INITIAL",INSERTING:"INSERTING",DELETING:"DELETING"};static initialState={descriptionAction:Vr.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,k0.uniqueId)("flashcard-side")}state=Vr.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:n,settingShowHint:o,side:r}=this.props,a=document.getElementById(`${t}-${n}-${r}-flip-btn`);a&&o&&(a.style.opacity="0.6")};handleMouseLeaveAudio=()=>{const{itemId:t,index:n,settingShowHint:o,side:r}=this.props,a=document.getElementById(`${t}-${n}-${r}-flip-btn`);a&&o&&(a.style.opacity="1")};render(){const{props:{activeIndex:t,allowTabNavigation:n,block:o,className:r,description:a,getL10nValue:i,index:c,itemId:l,media:d,isActiveSide:h,isAriaHidden:m,isFlipped:f,labels:p,lessonId:C,onFlip:g,prefersKeyboardNavigation:x,settingShowHint:b,side:y,size:L,style:S,type:T},refDescription:k,refDescriptionBottom:I,refSide:E,state:{isAtLongOverflowBottom:N,isLong:M,isLongOverflow:A,isTooltipVisible:j,scrollbarWidthOffset:w}}=this,P=y==="front",R=y==="back",O=L==="small",B=L==="large",D=T==="description",F=T==="fullimage",V=T==="image",U=P?p?.a11yBlockFlashcardFront:p?.a11yBlockFlashcardBack,H=`items:${o?.id}/items:${l}/${P?"front":"back"}`,K=_a({back:R,flipped:f,front:P,fullimage:F}).mix(r),{image:Q,audio:z}=i(d)??{},W=_a("content",{small:O,large:B,front:P,fullimage:F,image:V,"long-overflow":A,"long-overflow-bottom":N,"has-audio":!!z}),$=mu({"audio-expansion":!0}),G=mu("btn",{"visually-hidden":!b,"prefers-keyboard":x,round:!0}),Z=mu("icon"),Y=mu("tooltip",{visible:j}),ne=_a("img",{small:O,large:B,centered:V,full:F}),ee=_a("description",{"has-audio":!!z,long:M&&!A,"long-overflow":A,short:!M,large:B}),le=_a("description-bottom"),J=w==null?void 0:{right:w},te=Q?.alt??`Image ${c+1}`,he=gt(Q),_e=`${this.id}-click-to-flip-text`,X=`${this.id}-image`,de=`${this.id}-description`;return(0,s.jsxs)("div",{"aria-label":U,className:K,inert:m,ref:E,role:"group",style:S,tabIndex:-1,children:[(0,s.jsxs)("div",{className:W,children:[(0,s.jsxs)("div",{className:$,onMouseEnter:this.handleBtnMouseEnter,onMouseLeave:this.handleBtnMouseLeave,style:J,children:[(0,s.jsx)("button",{"aria-labelledby":`${_e} ${de} ${X}`,className:G,id:`${l}-${c}-${y}-flip-btn`,onBlur:this.handleBtnBlur,onClick:g,onFocus:this.handleBtnFocus,tabIndex:n&&h?0:-1,type:"button",children:(0,s.jsx)(L$,{className:Z})}),(0,s.jsx)("div",{"aria-hidden":"true",className:Y,id:_e,onClick:Fo,children:p?.blocksClickToFlip})]}),(F||V)&&(0,s.jsx)(oZ,{alt:te,className:ne,imageId:X,l10nId:Ot(d),url:he}),D&&(0,s.jsxs)("div",{className:ee,ref:k,tabIndex:h&&A?0:void 0,children:[(0,s.jsx)(je,{allowTabNavigation:n&&!m,id:de,value:a}),A&&(0,s.jsx)("div",{className:le,ref:I})]})]}),z&&(0,s.jsx)("div",{className:_a("audio-player",{text:D,image:V}),onMouseEnter:this.handleMouseEnterAudio,onMouseLeave:this.handleMouseLeaveAudio,children:(0,s.jsx)(Jt,{activeIndex:t,blockId:o.id,index:`${l}-${c}-${y}`,isOverlayAudio:F,item:{id:l,media:d},itemIndex:c,labels:p,lessonId:C,media:d,mediaType:"audio",refs:H,shouldPause:!h,side:y})})]})}componentDidMount(){this.checkDescriptionSize(this.props),this.checkDescriptionSizeDebounced=nu()(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,n){const{props:{allowTabNavigation:o,blockType:r,isFlipped:a,isActiveSide:i,isHidden:c,onReady:l,suppressFlipFocus:d,type:h}}=this;t.isHidden&&!c&&this.checkDescriptionSize(this.props),t.isFlipped!==a&&(i&&o&&!d?(this.refSide.current?.focus?.(),this.readyTimeout=setTimeout(()=>{l()},700)):clearTimeout(this.readyTimeout)),h==="description"&&this.handleUpdatesDescription(t,n),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=>{Tn(t)&&this.state.isTooltipVisible&&this.setState({isTooltipVisible:!1})};handleUpdatesDescription=(t,n)=>{const{props:{isFlipped:o,isActiveSide:r},state:{isLongOverflow:a}}=this;t.isFlipped!==o&&r&&this.scrollDescriptionToTop(),this.handleUpdatesDescriptionSize(t,n),!n.isLongOverflow&&a?(this.setLongBottomObserver(),this.setScrollbarWidth()):n.isLongOverflow&&!a&&this.cleanupLongBottomObserver()};handleUpdatesDescriptionSize=(t,n)=>{const{INSERTING:o,DELETING:r}=Vr.descriptionActionTypes,{props:{description:a,size:i,type:c,getL10nValue:l},state:{descriptionAction:d,isLong:h,isLongOverflow:m}}=this,f=l(a)?.length||0,p=l(t.description)?.length||0;d!==o&&f>
155p?this.setState({descriptionAction:o}):d!==r&&f<p?this.setState({descriptionAction:r}):(d!==n.descriptionAction||h!==n.isLong||m!==n.isLongOverflow||i!==t.size||c!==t.type||f!==p)&&this.checkDescriptionSize(t)};checkDescriptionSize=t=>{const{DELETING:n}=Vr.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===n||o!==t.size)&&this.setState(Vr.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 n=o=>{const r=o?.[0]?.isIntersecting??!1;this.setState({isAtLongOverflowBottom:!r})};this.longBottomObserver=new IntersectionObserver(n,{threshold:[0,1]}),this.longBottomObserver.observe(t)}};cleanupLongBottomObserver=()=>{this.longBottomObserver?.disconnect?.(),this.longBottomObserver=void 0};setScrollbarWidth=()=>{const t=this.refDescription.current;if(t){const n=t.offsetWidth-t.clientWidth;n>0&&this.setState({scrollbarWidthOffset:n})}}}const Jy=Hl(it(e=>(0,s.jsx)(Vr,{...e}))),sZ=e=>{const{cardMode:t,customBackgroundColorContrast:n}=dn(),o=$e()?.theme,r=_l(),a=Vn(),c=a===re.IMAGE&&r?.overlayColor===ut.LIGHT,l=yn(),d=o?.accentContrast,h=d===Le.AUTO,m=(0,u.useMemo)(()=>{let p="#fafafa";if(t===_n.TRANSPARENT)switch(a){case re.DARK:p="#525252";break;case re.BLACK:p="#1a1a1a";break;case re.IMAGE:c?p="rgba(0, 0, 0, 0.7)":p="rgba(255, 255, 255, 0.7)";break;case re.ACCENT:case re.COLOR:case re.TINT:if(l!=null)switch(ga(l)){case vt.LIGHT:p=ss(.5,l);break;case vt.MED:p=Is(.35,l);break;case vt.DARK:p=Is(.65,l);break;case vt.NEAR_BLACK:p=ss(.1,l);break}}const C={"--color-background":p},g=a===re.COLOR?n:d;if((a===re.ACCENT||a===re.COLOR)&&t===_n.TRANSPARENT&&h){const x=Ut({backgroundColor:p,contrast:g});C["--color-text"]=x}return C},[l,a,t,n,h,c,d]),f={...e,style:m};return(0,s.jsx)(Jy,{...f})},oZ=({alt:e,className:t,imageId:n,l10nId:o,url:r})=>{const a=To(e);return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(En,{alt:a,className:t,"data-l10n-id":o,id:n,src:r}),!a&&(0,s.jsx)("span",{className:"visually-hidden-always",children:"No image alternative text"})]})};class rZ extends u.Component{static defaultProps={editable:!1,isRTL:!1,items:[],onStep:()=>{},stack:!1};state={activeIndex:0,flipStateMap:{},prefersKeyboardNavigation:!0};render(){const{blockId:t,animateBlockEntrance:n,initiallyVisible:o,isHidden:r,isLearner:a,items:i,labels:c,lessonId:l,onStep:d,previewType:h,isRTL:m,settings:f,stack:p}=this.props,{activeIndex:C}=this.state,{prefersKeyboardNavigation:g}=this.state,{entranceAnimation:x,showHint:b}=f,y=q()("block-flashcards",{"block-flashcard--column":!p,"block-flashcard--stack":p,"block-flashcards--no-animation":!x}),S=f.flashcardSize==="1"?"small":f.flashcardSize==="2"?"large":i.length>2?"small":"large",T=h===lr.MOBILE_PORTRAIT||h===lr.MOBILE_LANDSCAPE;return(0,s.jsx)(Ae,{className:y,children:p?(0,s.jsx)(He,{animateBlockEntrance:n,initiallyVisible:o,isLearner:a,children:(0,s.jsx)("div",{className:"block-flashcard-carousel",children:(0,s.jsx)(ou,{blockId:t,items:i,children:({carouselRef:k})=>(0,s.jsx)(su,{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:T,shouldUseCounter:!0,shouldUseGoToSlide:!1,children:i.map((I,E)=>(0,s.jsx)(qy,{activeIndex:C,backDescription:I?.back?.description,backMedia:I?.back?.media,backType:I?.back?.type,blockId:t,frontDescription:I?.front?.description,frontMedia:I?.front?.media,frontType:I?.front?.type,id:I?.id,index:E,isHidden:r,labels:c,lessonId:l,onFlip:this.handleFlip.bind(this),onStep:d,prefersKeyboardNavigation:g,settingShowHint:b,size:"large",type:"stack",wrapElement:"div"},I?.id))})})})}):(0,s.jsx)(He,{animateBlockEntrance:n,className:"block-flashcards__animation",initiallyVisible:o,isLearner:a,siblingDelay:.25,children:(0,s.jsx)("ol",{className:"block-flashcards__wrapper",role:"list",children:i.map((k,I)=>(0,s.jsx)(qy,{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:I,isHidden:r,labels:c,lessonId:l,onStep:d,prefersKeyboardNavigation:g,settingShowHint:b,size:S,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&&!bB(t)&&this.setState({prefersKeyboardNavigation:!0})};handleMouseDown=()=>{this.state.prefersKeyboardNavigation&&this.setState({prefersKeyboardNavigation:!0})};handleFlip(t,n){this.setState(o=>({flipStateMap:{...o.flipStateMap,[t]:n}}))}handleCarouselChange(t){const{block:n,onTranscriptUpdate:o}=this.props,{flipStateMap:r}=this.state,a=r[t]?"back":"front",i=n.items?.[t],c=i?.[a]?.media,l=`items:${n?.id}/items:${i?.id}/${a}`;o?.({audioPlayerId:bs({refs:l}),transcriptMedia:c}),this.setState({activeIndex:t})}}const e6=Xf(it(Hl(rZ)));var Sc=v(49860);const aZ="div",t6=Sc.createContext(void 0);function iZ({children:e,element:t,...n},o){const[r,a]=Sc.useState(null);return(0,s.jsx)(t6.Provider,{value:r,children:Sc.createElement(t??aZ,{...n,ref:o},e,(0,s.jsx)("div",{ref:a}))})}const Tc=Sc.forwardRef(iZ);function Xge(){return Sc.useContext(t6)}var cZ=v(49860);function n6(e){class t extends cZ.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,s.jsx)(Qe,{allowTabNavigation:a,className:"block-gallery__caption",value:r})}render(){const{renderCaption:o=this.renderCaptionDelegate}=this.props;return(0,s.jsx)(e,{...this.props,renderCaption:o})}}return t}var fu=v(49860);const s6=_("block-gallery-carousel");
155function lZ({blockId:e,animateBlockEntrance:t,defaultBackgroundColor:n,editable:o,initiallyVisible:r,isLearner:a,labels:i,lessonId:c,items:l,onStep:d,previewType:h,renderCaption:m,settings:f}){l||=[];const[p,C]=fu.useState(0),g=fu.useCallback(L=>{C(L),d?.(l[L])},[l,d]),x=h===lr.MOBILE_PORTRAIT||h===lr.MOBILE_LANDSCAPE,b=s6({noAnimation:!f?.entranceAnimation||mn()}).toString(),y=Ah();return(0,s.jsx)(Ae,{className:b,defaultBackgroundColor:n,children:(0,s.jsx)(He,{animateBlockEntrance:t,initiallyVisible:r,isLearner:a,children:(0,s.jsx)(Tc,{className:s6("container").toString(),children:(0,s.jsx)(ou,{blockId:e,items:l,children:({carouselRef:L})=>(0,s.jsx)(su,{isRTL:y,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((S,T)=>(0,s.jsx)(uZ,{activeIndex:p,blockId:e,editable:o,index:T,item:S,labels:i,lessonId:c,renderCaption:m,settings:f},S.id))})})})})})}const dZ=n6(lZ),up=_("block-gallery-carousel-item");function uZ({activeIndex:e,blockId:t,editable:n,index:o,item:r,labels:a,lessonId:i,renderCaption:c,settings:l}){const[d,h]=fu.useState(!1),{image:m,audio:f}=we(r.media),p=we(m?.link?.destination),C=m?.dimensions,g=fu.useCallback(()=>{h(!0)},[]);return(0,s.jsxs)("figure",{className:up(),children:[n&&!d&&(0,s.jsx)("div",{className:up("loading"),children:"Loading image..."}),(0,s.jsxs)("div",{className:up("image-container",{"audio-overlay":!!f}),children:[(0,s.jsx)($a,{alt:m?.alt,cornerRadius:l?.cornerRadius,disableZoom:!l?.zoomOnClick,height:C?.height||C?.originalHeight,l10nId:Ot(r?.media),labels:a,link:m?.link&&typeof p=="string"?{type:m.link.type,destination:p}:void 0,maxHeight:900,onLoad:g,src:gt(m),width:C?.width||C?.originalWidth}),f&&(0,s.jsx)(Jt,{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})]}),(n||r.caption)&&(0,s.jsx)("figcaption",{children:c(r.id,r.caption)})]})}const hZ=({alt:e,cornerRadius:t,disableZoom:n,height:o,l10nId:r,labels:a,link:i,src:c,width:l})=>(0,s.jsx)("div",{className:"block-gallery__image",children:(0,s.jsx)($a,{alt:e,cornerRadius:t,disableZoom:n,height:o,l10nId:r,labels:a,link:i,maxHeight:900,src:c,width:l})}),mZ=e=>{switch(e){case 3:return"threecol";case 4:return"fourcol";default:return"twocol"}};function o6(e){return(0,s.jsx)(dZ,{...e})}class fZ extends u.Component{static get defaultProps(){return{blockId:"",getL10nValue:()=>{},items:[],lessonId:"",width:2}}render(){const{animateBlockEntrance:t,defaultBackgroundColor:n,editable:o,getL10nValue:r,initiallyVisible:a,isLearner:i,items:c,labels:l,renderCaption:d,settings:h,width:m}=this.props,{entranceAnimation:f,cornerRadius:p,zoomOnClick:C}=h,g=q()(`block-gallery block-gallery--${mZ(m)}`,{"block-gallery--no-animation":!f||mn()});return(0,s.jsx)(Ae,{className:g,defaultBackgroundColor:n,children:(0,s.jsx)("div",{className:"block-gallery__container",children:(0,s.jsx)("div",{className:"block-gallery__row",children:(0,s.jsx)(He,{animateBlockEntrance:t,initiallyVisible:a,isLearner:i,siblingDelay:.25,children:c.map(x=>{const{id:b}=x,y=x.caption,L=r(x.media)?.image,S=L?.alt,T=L?.key,k=L?.dimensions,I=k?.width||k?.originalWidth,E=k?.height||k?.originalHeight,N=gt(L),M=r(L?.link?.destination),A=Cc({caption:y,editable:o,id:b,getL10nValue:this.props.getL10nValue});return(0,s.jsx)("div",{className:"block-gallery__col",children:(0,s.jsxs)(A.tagName,{"aria-labelledby":A.figcaptionId,className:"block-gallery__figure",role:A.role,children:[T&&(0,s.jsx)(hZ,{alt:S,cornerRadius:p,disableZoom:!C,height:E,l10nId:Ot(x?.media),labels:l,link:L?.link&&typeof M=="str
155ing"?{type:L.link.type,destination:M}:void 0,src:N,width:I}),(o||y)&&(0,s.jsx)("figcaption",{id:A.figcaptionId,children:d(b,y)})]})},b)})})})})})}}const hp=n6(it(fZ));var mp=v(49860);const fp=e=>["hero","full","aside"].includes(e);class pZ extends mp.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,n){return(0,s.jsx)(Qe,{className:"block-image__caption",value:n})}render(){const{aiMagicIcon:t,aiOverlay:n,animateBlockEntrance:o,blockId:r,defaultBackgroundColor:a,editable:i,getL10nValue:c,initiallyVisible:l,isLearner:d,items:h,type:m,labels:f,lessonId:p,settings:C,renderCaption:g=this.renderCaptionDelegate}=this.props,{entranceAnimation:x,cornerRadius:b,zoomOnClick:y}=C,L=q()(`block-image block-image--${m}`,"block-image--flag-dimensions",{"block-image--no-animation":!x}),S=h[0],{id:T,caption:k}=S,{image:I,audio:E}=c(S.media)??{},N=I?.alt,M=gt(I),A=I?.dimensions,j=A?.width||A?.originalWidth,w=A?.height||A?.originalHeight,P=Cc({caption:k,editable:i,id:T,getL10nValue:c}),R=!d&&!M,O=j&&w?j/w:void 0,B=I?.link?c(I.link.destination):void 0,D=I?.link&&typeof B=="string"?{type:I.link.type,destination:B}:void 0,F=q()("block-image__image",{"block-image__image--audio-overlay":!!E});return(0,s.jsx)(Ae,{className:L,defaultBackgroundColor:a,children:(0,s.jsx)("div",{className:"block-image__container",children:(0,s.jsx)("div",{className:"block-image__row",children:(0,s.jsx)("div",{className:"block-image__col",children:(0,s.jsx)(He,{animateBlockEntrance:o,initiallyVisible:l,isLearner:d,children:(0,s.jsxs)(P.tagName,{"aria-labelledby":P.figcaptionId,className:"block-image__figure",role:P.role,children:[(0,s.jsxs)("div",{className:F,children:[R?(0,s.jsxs)("div",{className:"block-image__waiting",style:{aspectRatio:O},children:[(0,s.jsx)("div",{children:t}),(0,s.jsx)("div",{className:"block-image__waiting-text",children:"Waiting for image\u2026"})]}):(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)($a,{alt:N,cornerRadius:b,disableZoom:!y,height:w,l10nId:Ot(S.media),labels:f,link:D,maxHeight:m==="full"?380:900,src:M,width:j}),E&&fp(m)&&(0,s.jsx)(Jt,{blockId:r,cornerRadius:b,index:`${r}-${T}-0`,isOverlayAudio:!0,item:S,labels:f,lessonId:p,media:S.media,mediaType:"audio"})]}),n&&(0,s.jsx)("div",{className:"block-image__ai-overlay",children:n})]}),(i||k)&&(0,s.jsx)("figcaption",{id:P.figcaptionId,children:g(T,k)})]})})})})})})}}const gZ=it(pZ),vZ=(e,t,n,o,r)=>t?r:(0,s.jsx)(He,{animateBlockEntrance:e,initiallyVisible:n,isLearner:o,children:r});class CZ extends mp.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,n){return(0,s.jsx)(Qe,{className:"block-image__text",value:n})}renderCaption(t,n){return(0,s.jsx)(Qe,{className:"block-image__caption",value:n})}renderImage(t,n,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,p=m?.alt,C=gt(m),g=m?.dimensions,x=g?.width||g?.originalWidth,b=g?.height||g?.originalHeight,y=Cc({caption:n,editable:i,id:t,getL10nValue:d}),{animateBlockEntrance:L,initiallyVisible:S,isLearner:T,labels:k,settings:{cornerRadius:I,zoomOnClick:E}}=this.props,N=q()("block-image__image",{"block-image__image--audio-overlay":!!f}),M=m?.link?d(m.link.destination):void 0,A=m?.link&&typeof M=="string"?{type:m.link.type,destination:M}:void 0;return(0,s.jsx)(He,{animateBlockEntrance:L,animateIn:r==="right"?"fadeInRight":"fadeInLeft",initiallyVisible:S,isLearner:T,children:(0,s.jsxs)(y.tagName,{"aria-labelledby":y.figcaptionId,className:"block-image__figure",role:y.role,children:[(0,s.jsxs)("div",{className:N,children:[(0,s.jsx)($a,{alt:p,cornerRadius:I,disableZoom:!E,height:b,l10nId:Ot(o?.media),labels:k,link:A,maxHeight:900,src:C,width:x}),f&&fp("aside")&&(0,s.jsx)(Jt,{blockId:a,cornerRadius:I,index:`${a}-${t}-0`,isOverlayAudio:!0,item:o,labels:k,lessonId:c,media:o.media,mediaType:"audio"})]}),(i||n)&&(0,s.jsx)("figcaption",{id:y.figcaptionId,children:l(t,n)})]})})}
155render(){const{defaultBackgroundColor:t,items:n,renderParagraph:o=this.renderParagraphDelegate,settings:r,type:a}=this.props,{entranceAnimation:i,imagePosition:c,imageSize:l}=r,d=c==="right",h=q()(`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=n[0],{id:f,caption:p}=m,C="paragraph"in m?m.paragraph:void 0;return(0,s.jsx)(Ae,{className:h,defaultBackgroundColor:t,children:(0,s.jsx)("div",{className:"block-image__container",children:(0,s.jsxs)("div",{className:"block-image__row",children:[(0,s.jsx)("div",{className:"block-image__col",children:d?o(f,C):this.renderImage(f,p,m,"left")}),(0,s.jsx)("div",{className:"block-image__col",children:d?this.renderImage(f,p,m,"right"):o(f,C)})]})})})}}const bZ=it(CZ);class xZ extends mp.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,n){return(0,s.jsx)(Qe,{className:"block-image__caption",value:n})}renderOverlay(t,n){return(0,s.jsx)(Qe,{className:"block-image__paragraph",value:n})}renderOverlayCaption(t,n){const{animateBlockEntrance:o,initiallyVisible:r,isLearner:a,renderOverlay:i=this.renderOverlayDelegate}=this.props;return(0,s.jsx)("div",{className:"block-image__container",children:(0,s.jsx)("div",{className:"block-image__row",children:(0,s.jsx)("div",{className:"block-image__col",children:(0,s.jsx)(He,{animateBlockEntrance:o,animateIn:"fadeInUp",duration:1,initiallyVisible:r,isLearner:a,children:i(t,n)})})})})}render(){const{animateBlockEntrance:t,blockId:n,defaultBackgroundColor:o,editable:r,getL10nValue:a,initiallyVisible:i,isLearner:c,items:l,labels:d,lessonId:h,settings:m,type:f,renderCaption:p=this.renderCaptionDelegate}=this.props,{entranceAnimation:C,opacity:g,opacityColor:x}=m,b=tm(m?.backgroundColor,o),y=q()(`block-image block-image--${f}`,"block-image--flag-dimensions",{"block-image--no-animation":!C,"block-image--dark":Xm(b)}),L={opacity:g||.6,backgroundColor:x||"transparent"},S=l[0],{id:T,caption:k}=S,I=a(S.media),E=I?.image,N=I?.audio,M=E?.key,A=gt(E),j=E?.dimensions,w=j?.width||j?.originalWidth,P=j?.height||j?.originalHeight,R=To(E?.alt),O=f==="overlay",B=Cc({caption:k,editable:r,id:T,isOverlayType:O,getL10nValue:a});return(0,s.jsxs)(Ae,{"aria-labelledby":B.figcaptionId,className:y,defaultBackgroundColor:o,role:B.role,tag:B.tagName,children:[vZ(t,O,i,c,(0,s.jsxs)("div",{className:"block-image__figure",children:[M&&(0,s.jsxs)("div",{className:"block-image__image","data-l10n-id":Ot(S?.media),style:{backgroundImage:`url('${A}')`},children:[(0,s.jsx)(En,{alt:R,height:P,src:A,width:w}),(0,s.jsx)("div",{className:"block-image__overlay",style:L}),N&&fp(f)&&(0,s.jsx)(Jt,{blockId:n,index:`${n}-${T}-0`,isOverlayAudio:!0,item:S,labels:d,lessonId:h,media:S.media,mediaType:"audio"})]}),O?this.renderOverlayCaption(T,k):null]})),!O&&(r||k)&&(0,s.jsx)("figcaption",{className:"block-image__container",id:B.figcaptionId,children:p(T,k)})]})}}const pp=it(xZ),yZ=e=>(0,s.jsx)(pp,{type:"overlay",...e}),SZ=e=>(0,s.jsx)(pp,{type:"banner",...e});var TZ=v(30234),LZ=v.n(TZ),kZ=v(27689),r6=v.n(kZ),IZ=v(60328),pu=v.n(IZ),EZ=v(8907),gu=v.n(EZ);function xs(e,t,n,o){const a=t==="bottom"||!n&&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 n&&o==="timeline"&&!t?x.top:n&&o!=="timeline"?a==="bottom"?x.legacyBottom:x.legacyTop:a==="bottom"?x.bottom:x.top},p=()=>{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 n&&o==="timeline"&&!t?g.legacyTop:n&&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:p()}: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:p(),audioOnlyMedia:{audio:e.audio},embedOnlyMedia:{embed:e.embed}}:i}var vu=v(49860);const NZ=30,a6=sm("blockSettings");class jZ extends vu.Component{static defaultProps={blockId:"",blockSettings:{},editable:!1,items:[],lessonId:"",onStep:()=>{}};render(){const{animateBlockEntrance:t,blockId:n,editable:o,initiallyVisible:r,isLearner:a,items:i,labels:c,lessonId:l,onStep:d,settings:h,enableVideoPlaybackSpeed:m}=this.props,{entranceAnimation:f,accordionBehavior:p="keepOpen"}=h,C=q()("blocks-accordion",{"blocks-accordion--no-animation":!f});return(0,s.jsx)(Ae,{className:C,"data-block-id":n,children:(0,s.jsx)(He,{animateBlockEntrance:t,duration:.75,initiallyVisible:r,isLearner:a,children:(0,s.jsx)("div",{className:"blocks-accordion__container",children:(0,s.jsx)("div",{className:"blocks-accordion__row",children:(0,s.jsx)("div",{className:"blocks-accordion__col",children:(0,s.jsx)(BZ,{blockId:n,editable:o,enableVideoPlaybackSpeed:m,items:i,keepOpen:p==="keepOpen",labels:c,lessonId:l,onStep:d,settings:h})})})})})})}}const wZ={isOpen:!1,isActive:!1},AZ=e=>(t,{id:n})=>Object.assign({},t,{[n]:e[n]||wZ}),i6=(e,t)=>t.reduce(AZ(e),{}),RZ=(e,t)=>(n,o)=>{const r=e==o,a=r?!n.isOpen:n.isOpen,i=r&&!n.isOpen;return{isOpen:t?a:i,isActive:r}},PZ=e=>(t,n)=>{const o=n==e;return{isOpen:o,isActive:o}},MZ=e=>(t,n)=>({isOpen:n==e,isActive:t.isActive});class OZ extends vu.Component{static defaultProps={blockId:"",blockSettings:{},editable:!1,items:[],keepOpen:!1,lessonId:"",onStep:()=>{}};constructor(t){super(t);const{items:n}=this.props;this.state={itemStatusMap:i6({},n)},this.handleNavtoTab=this.handleNavtoTab.bind(this)}componentDidMount(){window.addEventListener(Ke,this.handleNavtoTab)}componentWillUnmount(){window.removeEventListener(Ke,this.handleNavtoTab)}handleNavtoTab(t){const n=t.detail.path[t.detail.path.indexOf("items")+1]?.id,o=t.detail.path[t.detail.path.lastIndexOf("items")+1]?.id;if(n===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=PZ(l);this.setState({itemStatusMap:Ss()(d,c)}),open&&i(a[r])}}UNSAFE_componentWillReceiveProps(t){const n=t.items,o=is()(n)!==is()(this.props.items);!t.keepOpen&&this.props.keepOpen?this.updateMapForOneAtATimePreference():o&&this.rebuildItemStatusMap(n)}updateMapForOneAtATimePreference(){const{itemStatusMap:t}=this.state,{items:n}=this.props,o=LZ()(a=>t[a.id].isOpen,n);if(!o)return;const r=MZ(o.id);this.setState({itemStatusMap:Ss()(r,t)})}rebuildItemStatusMap(t){const n=this.state.itemStatusMap;this.setState({itemStatusMap:i6(n,t)})}
155handleItemClick(t){const{items:n,keepOpen:o,onStep:r}=this.props,{itemStatusMap:a}=this.state,i=n[t].id,c=RZ(i,o);this.setState({itemStatusMap:Ss()(c,a)}),open&&r(n[t])}render(){const{items:t,settings:n,editable:o,labels:r,lessonId:a,blockId:i,enableVideoPlaybackSpeed:c}=this.props,{itemStatusMap:l}=this.state,{zoomOnClick:d}=n,h=Object.values(l)?.find(m=>m.isOpen)?"open":"closed";return(0,s.jsx)("div",{className:"blocks-accordion__wrapper","data-accordion-status":h,children:t.map((m,f)=>(0,s.jsx)(FZ,{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 BZ=a6(OZ);class DZ extends vu.Component{static get defaultProps(){return{editable:!1,getL10nValue:()=>{},onClick:()=>{},lessonId:"",blockId:"",open:null}}id;content;constructor(t){super(t),this.id=pu()(),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 n=this.content;if(n&&(n.classList.add("blocks-accordion__content--visible"),!t.open&&this.props.open&&!this.props.suppressAutoScrollOnOpen)){const o=n.parentElement,r=o?.getBoundingClientRect()?.top,a=r!=null&&r>0&&r<window.innerHeight,i=mn()?"instant":"smooth";a||o.scrollIntoView({behavior:i,block:"start"})}}toggle(t){const{blockId:n,index:o}=this.props,r=Se.playerId,a=new RegExp(`-${o}(?:-.+)?$`);open&&r&&r.includes(n.toString())&&a.test(r)&&Se.pause(),this.props.onClick(),t.preventDefault()}renderTitle(t){const{title:n}=this.props.item;return(0,s.jsx)(je,{className:"blocks-accordion__title",id:t,value:n})}renderDescription(t){const{description:n=""}=this.props.item;return(0,s.jsx)(Qe,{className:"blocks-accordion__description",value:n||""},t)}render(){const{blockId:t,blockSettings:n,editable:o,disableZoom:r,getL10nValue:a,index:i,item:c,focused:l,labels:d,lessonId:h,open:m,renderDescription:f=this.renderDescription,renderTitle:p=this.renderTitle}=this.props,{settings:C={},enableVideoPlaybackSpeed:g}=c,x=a(c.media)??{},b=xs(x,n.audioPosition),y=Object.assign({},C,{disableZoom:r,fullEmbed:!0}),L=n?.backgroundType===re.ACCENT||n?.backgroundType===re.IMAGE,S=q()("blocks-accordion__item",{"blocks-accordion__item--closed":!m}),T=q()("blocks-accordion__header",{"blocks-accordion__header--editing":o,"brand--border":m&&l&&!L}),k=q()("blocks-accordion__content",{"blocks-accordion__content--will-enter":m,"brand--border":m&&l&&!L}),I=`title-${this.id}`,E=`panel-${this.id}`,N=n?.headingLevel,M=N?`h${N}`:"h2";let A=(0,s.jsxs)("button",{"aria-controls":E,"aria-expanded":m,className:T,onClick:this.toggle,onKeyDown:!o&&Z2(this.toggle)||void 0,type:"button",children:[p(I),(0,s.jsx)("span",{className:"blocks-accordion__toggler-wrap",children:(0,s.jsx)(ae,{className:"blocks-accordion__toggler",name:m?"minus":"plus"})})]});return o&&(A=(0,s.jsxs)("div",{className:T,children:[p(I),(0,s.jsx)("button",{"aria-controls":E,"aria-expanded":m,"aria-label":m?"Close":"Open",className:"blocks-accordion__toggler-wrap",onClick:this.toggle,type:"button",children:(0,s.jsx)(ae,{className:"blocks-accordion__toggler",name:m?"minus":"plus"})})]})),(0,s.jsxs)(Kt,{className:S,tag:"section",children:[(0,s.jsx)("div",{className:"blocks-accordion__header-wrap",children:(0,s.jsx)(M,{children:A})}),(0,s.jsx)("section",{"aria-labelledby":I,className:k,id:E,ref:j=>{this.content=j},children:b.renderOrder.map((j,w)=>{if(j==="text")return f(`text-${w}`);const P={blockId:t,hasPadding:!1,imageMaxHeight:1e3,item:c,labels:d,lessonId:h,enableVideoPlaybackSpeed:g,opts:y,shouldPause:!m},R=c6(x),O=R==="image-with-audio",B=O?"left":"center",F={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:q()(`blocks-accordion__${R}`,{[`blocks-accordion__${R}--${B}`]:O})},video:{media:b.videoOnlyMedia||x,isOverlayAudio:!1,index:`${t}-${i}-video`,className:q()(`blocks-accordion__${R}`,{[`blocks-accordion__${R}--${B}`]:O})},embed:{media:b.embedOnlyMedia||x,isOverlayAudio:!1,index:`${t}-${i}-embed`,className:q()(`blocks-accordion__${R}`,{[`blocks-accordion__${R}--${B}`]:O})},overlay:{media:x,isOverlayAudio:!0,index:`${t}-${i}-overlay`,className:q()(`blocks-accordion__${R}`,{[`blocks-accordion__${R}--${B}`]:O})}}[j];if(!F)return null;const{className:V,...U}=F;return(0,s.jsx)("div",{className:q()(V,{"audio-on-top":this.props.blockSettings.audioPosition==="top"}),children:(0,s.jsx)("div",{className:"blocks-accordion__figure",children:(0,s.jsx)(Jt,{...P,...U})})},`${j}-${w}`)})})]})}}const FZ=a6(it(e=>(0,s.jsx)(DZ,{...e}))),c6=e=>{const{image:t,embed:n,video:o,audio:r}=e;return t&&!r?"image":n&&!r?"embed":o?"video":r&&!t&&!n?"audio":t&&r?"image-with-audio":r&&n?"audio-and-embed":"image"};class HZ extends vu.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 n=this.props.activeIndex;this.state={activeIndex:n,activeTouch:!1,activeMouse:!1},this.tabs=[],this.id=pu()(),this.handleNavtoTab=this.handleNavtoTab.bind(this),this.handleRevealItem=this.handleRevealItem.bind(this)}componentDidMount(){this.handleControls(),window.addEventListener("resize",this.tabResize=gu()(this.handleControls.bind(this),100)),window.addEventListener(Ke,this.handleNavtoTab),window.addEventListener(
155Do,this.handleRevealItem),this.tabsHeaderEl?.addEventListener("scroll",this.tabScroll=gu()(this.handleControls.bind(this),50))}handleNavtoTab(t){const n=t.detail.path[t.detail.path.indexOf("items")+1]?.id,o=t.detail.path[t.detail.path.lastIndexOf("items")+1]?.id;n===this.props.blockId&&(this.tabsHeaderEl.scrollIntoView({behavior:"smooth",block:"start"}),this.setState({activeIndex:this.props.items.findIndex(({id:r})=>r===o)},()=>{ef(this.tabsHeaderEl,"start")||this.tabsHeaderEl.scrollIntoView({behavior:"instant",block:"start"})}))}handleRevealItem(t){const{blockId:n,itemId:o}=t.detail;if(n!==this.props.blockId)return;const r=this.props.items.findIndex(({id:a})=>Yn(a,o));r>=0&&this.setState({activeIndex:r})}componentDidUpdate(){this.handleControls()}componentWillUnmount(){this.tabsHeaderEl?.removeEventListener("scroll",this.tabScroll),window.removeEventListener("resize",this.tabResize),window.removeEventListener(Ke,this.handleNavtoTab),window.removeEventListener(Do,this.handleRevealItem)}setActive(t){this.setState({activeIndex:t});const{blockId:n}=this.props,o=Se.playerId;this.state.activeIndex!=t&&o&&o.includes(n.toString())&&Se.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:n}=this.props,o=this.tabsHeaderEl.offsetWidth,r=this.tabsHeaderEl.scrollLeft,i=(t==="next"?n?r6():Nf():n?Nf():r6())(r,o*.8);this.tabsHeaderEl.scrollTo({left:i,behavior:"smooth"})}arrowPrevInset(t){const n=this.arrowPrevEl.getBoundingClientRect(),o=n.right-t,r=n.left-t;return o+r}focusTab(t){t.currentTarget?.scrollIntoView({behavior:"smooth",block:"nearest"})}handleTabKeyDown(t,n){const{isRTL:o}=this.props;let r=!1,a;Mo(n)?(r=!0,a=o?t+1>this.tabs.length-1?0:t+1:t-1>=0?t-1:this.tabs.length-1):Oo(n)&&(r=!0,a=o?t-1>=0?t-1:this.tabs.length-1:t+1>this.tabs.length-1?0:t+1),r&&n.preventDefault(),a!=null&&(this.tabs[a]?.focus(),this.setActive(a))}renderHeader(t,n){const{activeIndex:o,activeTouch:r,activeMouse:a}=this.state,i=this.tabsHeaderEl&&this.tabsHeaderEl.scrollWidth>this.tabsHeaderEl.clientWidth,c=q()("blocks-tabs__header-wrap",{touch:r,mouse:a&&i});return(0,s.jsxs)("div",{className:c,onMouseEnter:this.handleMouseEnter.bind(this),onMouseLeave:this.handleMouseLeave.bind(this),onTouchStart:this.handleTouchStart.bind(this),children:[(0,s.jsx)("div",{className:"blocks-tabs__header",ref:l=>{this.tabsHeaderEl=l},role:RK,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,p=q()("blocks-tabs__header-item",{"brand--color":h&&!n,"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,s.jsx)("button",{"aria-controls":g,"aria-selected":h,className:p,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,s.jsx)(je,{value:l})},C)})}),(0,s.jsxs)("div",{className:"blocks-tabs__controls",ref:l=>{this.tabControls=l},children:[(0,s.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,s.jsx)(ae,{className:"blocks-tabs__arrow-icon",name:"chevron-right-solid"})}),(0,s.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,s.jsx)(ae,{className:"blocks-tabs__arrow-icon blocks-tabs__arrow-icon--next",name:"chevron-right-solid"})})]})]})}renderDescription({description:t}){return(0,s.jsx)(Qe,{className:"blocks-tabs__description",value:t})}renderItem(t,n,o){const{blockId:r,getL10nValue:a,labels:i,lessonId:c,renderDescription:l=this.renderDescription}=this.props,{activeIndex:d}=this.state,h=d===n,{settings:m={},enableVideoPlaybackSpeed:f}=t,p=a(t.media)??{},C=xs(p,this.props.settings.audioPosition,!1),g=q()("blocks-tabs__content-item",{"blocks-tabs__content-item--active":h}),x=Object.assign({},m,{disableZoom:o,fullEmbed:!0}),b=`tabpanel-${this.id}-${n}`,y=`tab-${this.id}-${n}`,L=c6(p),S=L==="image-with-audio",T=L==="audio-and-embed",k=S?p?.image?.align:"left",I=T?"embed-border":void 0;return(0,s.jsx)("div",{"aria-labelledby":y,className:g,id:b,role:PK,tabIndex:h?0:void 0,children:C.renderOrder.map((E,N)=>{if(E==="text")return(0,s.jsx)("div",{className:"blocks-tabs__description",children:l(t)},`text-${N}`);const M={blockId:r,embedClass:I,hasPadding:!1,imageMaxHeight:1e3,item:t,labels:i,lessonId:c,enableVideoPlaybackSpeed:f,opts:x,shouldPause:!h},j={audio:{media:C.audioOnlyMedia||p,isOverlayAudio:!1,index:`${r}-${n}-audio`,className:"blocks-tabs__audio"},image:{media:C.imageOnlyMedia||p,isOverlayAudio:!1,index:`${r}-${n}-image`,className:q()(`blocks-tabs__${L}`,{[`blocks-tabs__${L}--${k}`]:S})},video:{media:C.videoOnlyMedia||p,isOverlayAudio:!1,index:`${r}-${n}-video`,className:q()(`blocks-tabs__${L}`,{[`blocks-tabs__${L}--${k}`]:S})},embed:{media:C.embedOnlyMedia||p,isOverlayAudio:!1,index:`${r}-${n}-embed`,className:q()(`blocks-tabs__${L}`,{[`blocks-tabs__${L}--${k}`]:S})},overlay:{media:p,isOverlayAudio:!0,index:`${r}-${n}-overlay`,className:q()(`blocks-tabs__${L}`,{[`blocks-tabs__${L}--${k}`]:S})}}[E];if(!j)return null;const{className:w,...P}=j;return(0,s.jsx)("div",{className:q()(w,{"audio-on-top":this.props.settings.audioPosition==="top"}),children:(0,s.jsx)("div",{className:"blocks-tabs__figure",children:(0,s.jsx)(Jt,{...M,...P})})},`${E}-${N}`)})},b)}render(){const{animateBlockEntrance:t,initiallyVisible:n,isLearner:o,items:r,settings:a,enableVideoPlaybackSpeed:i}=this.props,{backgroundType:c,cardMode:l,entranceAnimation:d,zoomOnClick:h}=a,m=q()("blocks-tabs",{"blocks-tabs--no-animation":!d}),f=r.length>0?r.slice(0,NZ):[],p=l===_n.TRANSPARENT&&(c===re.ACCENT||c===re.IMAGE),C=q()("blocks-tabs__container",{"blocks-tabs--single":f.length===1});return(0,s.jsx)(Ae,{className:m,children:(0,s.jsx)(He,{animateBlockEntrance:t,initiallyVisible:n,isLearner:o,children:(0,s.jsx)("div",{className:C,children:(0,s.jsx)("div",{className:"blocks-tabs__row",children:(0,s.jsx)("div",{className:"blocks-tabs__col",children:(0,s.jsx)("div",{className:"blocks-tabs__wrapper",ref:g=>{this.container=g},children:(0,s.jsxs)(Kt,{children:[this.renderHeader(f,p),(0,s.jsx)("div",{className:"blocks-tabs__content",children:f.map((g,x)=>this.renderItem({...g,enableVideoPlaybackSpeed:i},x,!h))})]})})})})})})})}}const $Z=Xf(it(e=>(0,s.jsx)(HZ,{...e}))),gp=_("pill-button");function l6({allowTabNavigation:e=!0,ariaLabel:t,children:n,className:o,href:r,onClick:a=()=>{},onFocus:i,ref:c,size:l="sm",testId:d,variant:h="plain"}){const m=gp({[h]:!0,[l]:!0}).mix(o),f=!e;return r?(0,s.jsx)(un,{"aria-hidden":f,"aria-label":t,className:m,"data-testid":d,onClick:a,onFocus:i,tabIndex:e?void 0:-1,to:r,children:(0,s.jsx)("span",{className:gp("content"),children:n})}):(0,s.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,s.jsx)("span",{className:gp("content"),children:n})})}const d6=({allowNext:e=!1,canProceed:t=!1,isReduceMotion:n=!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,p=(0,u.useRef)(null),C=(0,Fe.A)(t);(0,u.useEffect)(()=>{e&&!C&&t&&setTimeout(()=>{p.current?.focus?.({preventScroll:n})},0)},[e,t,n,C]);const g=q()("quiz-card__actions",{"quiz-card__actions--proceed":t}),x=q()("quiz-card__button","quiz-card__button--next","brand_ui",{"brand--background":t,"visually-hidden-alw
155ays":!t});return(0,s.jsxs)("div",{className:g,children:[(0,s.jsx)("div",{className:"quiz-card__submit brand--ui",children:!c&&(0,s.jsx)("button",{className:"quiz-card__button","data-testid":"quiz-submit-button",onClick:l,tabIndex:d,type:"button",children:i})}),(0,s.jsx)("br",{className:"visually-hidden-always",role:"presentation"}),e&&(0,s.jsx)("div",{className:"quiz-card__next brand--ui",children:(0,s.jsx)("button",{"aria-disabled":h,"aria-hidden":h,className:x,"data-testid":"quiz-next-button",onClick:m,ref:p,tabIndex:f,type:"button",children:a})})]})},_Z=({children:e,isActive:t,isComplete:n,isTimedQuiz:o,style:r})=>(0,s.jsx)("div",{"aria-hidden":t?void 0:!0,className:VZ({isActive:t,isComplete:n,isTimedQuiz:o}),"data-testid":"quiz-card",inert:t?void 0:!0,style:r,children:(0,s.jsx)("div",{className:"quiz-card__container",children:(0,s.jsx)("div",{className:"quiz-card__row",children:(0,s.jsx)("div",{className:"quiz-card__main",children:e})})})}),VZ=({isActive:e,isComplete:t,isTimedQuiz:n})=>q()("quiz-card",{"quiz-card--active":e,"quiz-card--done":t,"quiz-card--timed":n}),u6=_Z,{FILL_IN_THE_BLANK:h6,MATCHING:zZ,MULTIPLE_CHOICE:UZ,MULTIPLE_RESPONSE:GZ}=bn;function WZ(e,t){return e.map(n=>String(t(n?.title)??"")).filter(Boolean).join(", ")}function KZ(e,t,n){const o=t!=null?e.find(r=>r.id===t):e.find(r=>r.correct===!0);return String(n(o?.title)??"")}function QZ(e,t,n){return String(n(e?.[t]?.title)??"")}function m6(e,t,n){return t.filter(e).reduce((o,r,a)=>{const i=String(n(r?.title)??"");return a===0?i:o+", "+i},"")}function YZ(e,t,n){return m6(r=>Array.isArray(e)?e.includes(r.id):!!r.correct,t,n)}function ZZ(e,t,n){return Array.isArray(t)?m6((r,a)=>t.includes(a),e,n):""}function XZ({answers:e,getL10nValue:t,selection:n,correctLabel:o,userLabel:r,matchLabel:a="Match Item: ",revealAnswers:i}){if(n==null||Object.keys(n).length===0)return"";const c=Object.fromEntries(Object.entries(n).map(([l,d])=>[d,l]));return e.map((l,d)=>{const h=String(t(l?.title)??""),m=String(t(l?.matchTitle)??""),f=c?.[d],p=String(t(e?.[Number(f)]?.title)??"");return i===Me.INCORRECT?`${a}${m}. ${r}: ${p}.`:`${a}${m}. ${o}: ${h}. ${r}: ${p}.`}).join(" ")}function vp({correctAnswer:e,selectedAnswer:t,correctLabel:n,userLabel:o,revealAnswers:r}){return!e||!t||r===Me.NONE?"":r===Me.INCORRECT?`${o}: ${An(t)}.`:`${n}: ${An(e)}. ${o}: ${An(t)}.`}function qZ(e,t){return e.type===h6?t?.quizAcceptableResponses:t?.a11yCorrectLive}function JZ({getL10nValue:e,isComplete:t,item:n,selection:o,labels:r,revealAnswers:a}){if(!n||!t)return null;const i=n?.answers??[],c=n?.correct,l=n?.corrects,d=qZ(n,r),h=r?.a11yAnswerLive;switch(n.type){case zZ:return XZ({getL10nValue:e,answers:i,selection:o,correctLabel:d,userLabel:h,revealAnswers:a});case h6:return vp({correctAnswer:WZ(i,e),selectedAnswer:o,correctLabel:d,userLabel:h,revealAnswers:a});case UZ:return vp({correctAnswer:KZ(i,c,e),selectedAnswer:QZ(i,o,e),correctLabel:d,userLabel:h,revealAnswers:a});case GZ:return vp({correctAnswer:YZ(l,i,e),selectedAnswer:ZZ(i,o,e),correctLabel:d,userLabel:h,revealAnswers:a})}return null}const f6=({canProceed:e,feedbackRef:t,feedbackValue:n,isActive:o,isComplete:r,isCorrect:a,item:i,labels:c,quizCorrect:l,quizIncorrect:d,revealAnswers:h,selection:m})=>{const{announcePolite:f,clearAnnouncements:p}=Ls(),C=(0,Fe.A)(e),g=rt(),b=!!we(n),y=a?l:d,L=(0,u.useCallback)(()=>{const k=JZ({getL10nValue:g,isComplete:r,item:i,labels:c,revealAnswers:h,selection:m}),I=n?An(g(n)):"",E=y+". "+k+" "+I;let N;return E&&(N=setTimeout(()=>{f(E)},250)),()=>{clearTimeout(N)}},[f,n,g,r,i,c,y,h,m]);(0,u.useLayoutEffect)(()=>{!C&&e&&h!==Me.NONE&&L()},[e,C,L,h]),(0,u.useEffect)(()=>p,[p]);const S=q()("quiz-card__feedback",{"quiz-card__feedback--active":e,"quiz-card__feedback--frame":b}),T=q()("quiz-card__feedback-icon",{"quiz-card__feedback-icon--correct":a});return(0,s.jsx)(s.Fragment,{children:(0,s.jsx)("div",{"aria-hidden":o?void 0:!0,className:S,ref:t,tabIndex:o?-1:void 0,children:(0,s.jsx)("div",{className:"quiz-card__main--feedback",children:(0,s.jsxs)("div",{"aria-label":c?.a11yQuizFeedback,className:"quiz-card__feedback-wrap",role:"group",children:[(0,s.jsx)("div",{className:T,children:(0,s.jsx)("i",{"aria-hidden":"true",className:a?"icon icon-Master-05":"icon icon-Master-06"})}),(0,s.jsx)("div",{className:"quiz-card__feedback-label",children:y}),n&&(0,s.jsx)("div",{children:(0,s.jsx)(je,{allowTabNavigation:r&&o,
155className:"quiz-card__feedback-text",value:n})})]})})})})},{FILL_IN_THE_BLANK:eX}=bn,tX=({children:e,type:t})=>(0,s.jsx)("div",{className:nX({type:t}),children:e}),nX=({type:e})=>q()("quiz-card__interactive",{"quiz-card__interactive--no-border":[eX].includes(e)}),p6=tX,Vo=({allowTabNavigation:e,blockId:t="",enableVideoPlaybackSpeed:n,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,s.jsx)("div",{className:"quiz-card__media",children:(0,s.jsx)(Jt,{allowTabNavigation:e,blockId:t,enableVideoPlaybackSpeed:n,index:o,isOverlayAudio:r,item:a,labels:i,media:c,opts:l,shouldPause:d})}),o1e=(e,t)=>n=>n>=e&&n<t,g6=e=>e<10?`0${e}`:String(e),sX=e=>Intl.NumberFormat(void 0,{style:"percent",maximumFractionDigits:2}).format(e),v6=e=>e.reduce((t,n)=>n==null||isNaN(n)?t:t+n,0),oX=(e,t)=>{const n=mn(),o=(0,Fe.A)(t);(0,u.useEffect)(()=>{!o&&t&&e&&jd()(e.focus)&&e.focus({preventScroll:n})},[t,n,o,e])},Cu=_("question-counter"),rX=({isActive:e=!1,labels:t,questionLabel:n,questionNumber:o,totalQuestions:r})=>{const a=(0,u.useRef)(null);oX(a.current,e);const i=`${t?.quizQuestion} ${o} ${t?.lessonPreposition} ${r}`,c=`${g6(o)}/${g6(r)}`;return(0,s.jsx)("div",{className:Cu(),children:(0,s.jsxs)("h1",{"aria-label":i,className:Cu("heading"),ref:a,tabIndex:-1,children:[(0,s.jsx)("span",{"aria-hidden":"true",className:Cu("label"),children:n}),(0,s.jsx)("span",{"aria-hidden":"true",className:Cu("count"),children:c})]})})},aX=_("question-title"),iX=({allowTabNavigation:e,htmlId:t,value:n})=>(0,s.jsx)(je,{allowTabNavigation:e,className:aX(),"data-testid":"quiz-question-title",id:t,value:n}),cX=({allowTabNavigation:e=!1,correctAnswerColor:t,correctAnswerColorContrast:n,errorMessageId:o,incorrectAnswerColor:r,incorrectAnswerColorContrast:a,isComplete:i,isCorrect:c=!1,labels:l,onEnterToSubmit:d=()=>{},onChange:h=()=>{},options:m,questionHtmlId:f="",quizAcceptableResponses:p="",quizAnswerPlaceholder:C,revealAnswers:g=Me.NONE,value:x=""})=>{const b=(0,u.useRef)(null),[y]=(0,u.useState)(()=>jr()("fitb-")),L=rt(),S=lX({options:m,getL10nValue:L}),T=`${y}-feedback`,k=`${y}-acceptable`,I=`${y}-input`,E=i?`${T} ${k}`:o||void 0,N=i?void 0:C,M=e?0:-1,A=g===Me.ALL||g===Me.INCORRECT,j=g===Me.ALL||c&&g===Me.INCORRECT,w=c?t:r,R=t&&r&&{"--fa-primary-color":Ut({backgroundColor:w,contrast:c?n:a}),"--fa-secondary-color":w},O=r&&{backgroundColor:Ut({backgroundColor:r,contrast:a}),fill:r,borderRadius:"50%"},B=q()("quiz-fill__icon",{"quiz-fill__icon--visible":i}),D=q()("quiz-fill__options",{"quiz-fill__options--visible":i}),F=(0,u.useCallback)(K=>{h(K.currentTarget.value)},[h]),V=(0,u.useCallback)(K=>{va(K)&&d(K)},[d]),U=i?void 0:F,H=i?void 0:V;return(0,s.jsxs)("div",{className:"quiz-fill",children:[(0,s.jsxs)("div",{className:"quiz-fill__container",children:[(0,s.jsx)("input",{"aria-describedby":E,"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:I,onChange:U,onKeyDown:H,placeholder:N,readOnly:i,ref:b,tabIndex:M,type:"text",value:x}),A&&(0,s.jsxs)("div",{className:B,id:T,children:[c&&(0,s.jsx)(ae,{"aria-label":l?.quizCorrect,name:"circle-check",styleIcon:{height:"2rem",...R}}),!c&&(0,s.jsx)(F$,{"aria-label":l?.quizIncorrect,style:O})]})]}),j&&i&&(0,s.jsx)("div",{className:D,id:k,children:(0,s.jsx)(je,{value:`${p}: ${S}`})})]})},lX=({options:e,getL10nValue:t})=>e.map(o=>(t(o.title)??"").trim()).join(", "),C6=cX;function dX({correctAnswerColor:e,correctAnswerColorContrast:t}){const n=Nt(),o=Ut({backgroundColor:e,contrast:t}),r=e?{"--fa-primary-color":o,"--fa-secondary-color":e}:void 0;return(0,s.jsxs)("div",{className:"matching-results-item-feedback",children:[(0,s.jsx)(ae,{className:"matching-results-item-feedback-icon matching-results-item-feedback-icon--correct",name:"circle-check",style:r}),(0,s.jsx)("span",{className:"matching-results-item-feedback-text",children:(0,s.jsx)("span",{className:"matching-results-item-feedback-text-result",children:n?.quizCorrect})})]})}var Va=v(49860);function uX({correctAnswerValue:e,incorrectAnswerColor:t,incorrectAnswerColorContrast:n,shouldRevealCorrectAnswer:o}
155){const[r,a]=Va.useState(!0),[i,c]=Va.useState(!1),l=Va.useRef(null),h=`matching-text-${Va.useId()}`,m=Nt(),f=(0,Fe.A)(e),p=Va.useCallback(()=>{a(S=>!S)},[]);Va.useLayoutEffect(()=>{if(f!==e){const S=l.current;S!=null&&S.scrollWidth>S.clientWidth&&c(!0)}},[f,e]);const C=Ut({backgroundColor:t,contrast:n}),g=t?{"--fa-primary-color":C,"--fa-secondary-color":t}:void 0,x=q()("matching-results-item-feedback-text",{"matching-results-item-feedback-text--collapsed":r}),b=q()("matching-results-item-feedback-text-btn-icon",{"matching-results-item-feedback-text-btn-icon--collapsed":r}),y=q()("matching-results-item-feedback-text-extra",{"matching-results-item-feedback-text-extra--collapsed":r}),L=q()("matching-results-item-feedback-text-extra-text",{"matching-results-item-feedback-text-extra-text--collapsed":r});return(0,s.jsxs)("div",{className:"matching-results-item-feedback",children:[(0,s.jsx)(ae,{className:"matching-results-item-feedback-icon matching-results-item-feedback-icon--incorrect",name:"circle-xmark-duotone",style:g}),!o&&(0,s.jsx)("span",{className:"matching-results-item-feedback-text",children:(0,s.jsx)("span",{className:"matching-results-item-feedback-text-result",children:m?.quizIncorrect})}),o&&(0,s.jsx)(s.Fragment,{children:(0,s.jsxs)("span",{className:x,children:[(0,s.jsxs)("span",{className:"matching-results-item-feedback-text-result",children:[m?.quizIncorrect,"."]}),i&&(0,s.jsx)("button",{"aria-controls":h,"aria-expanded":!r,"aria-label":r?m?.a11yMatchingItemShowMore:m?.a11yMatchingItemShowLess,className:"matching-results-item-feedback-text-btn",onClick:p,type:"button",children:(0,s.jsx)(ae,{className:b,name:"caret-down",style:g})}),(0,s.jsx)("span",{className:y,children:(0,s.jsxs)("span",{className:L,id:h,ref:l,children:[m?.quizCorrect,": ",(0,s.jsx)(Sn,{value:e})]})})]})})]})}function hX({col1Id:e,col1Value:t,col2Id:n,col2Value:o,correctAnswerColor:r,correctAnswerColorContrast:a,correctAnswerValue:i,height:c,incorrectAnswerColor:l,incorrectAnswerColorContrast:d,revealAnswers:h}){const m=e===n,f=h!=="incorrect",p=h!=="none";return(0,s.jsxs)("li",{className:"matching-results-item",role:"listitem",children:[(0,s.jsxs)("div",{className:"matching-results-item-pieces",children:[(0,s.jsxs)("div",{className:"matching-results-item-piece",style:c?{height:c}:void 0,children:[(0,s.jsx)("span",{className:"matching-results-item-piece-decoration"}),(0,s.jsx)("span",{className:"matching-results-item-piece-jigsaw"}),(0,s.jsx)("span",{className:"matching-results-item-piece-content",children:(0,s.jsx)("span",{"data-matching-results-item-piece-content-inline":"",children:(0,s.jsx)(Sn,{value:t})})})]}),(0,s.jsxs)("div",{className:"matching-results-item-piece",children:[(0,s.jsx)("span",{className:"matching-results-item-piece-decoration"}),(0,s.jsx)("span",{className:"matching-results-item-piece-jigsaw"}),(0,s.jsx)("span",{className:"matching-results-item-piece-content",children:(0,s.jsx)("span",{"data-matching-results-item-piece-content-inline":"",children:(0,s.jsx)(Sn,{value:o})})})]})]}),p&&m&&(0,s.jsx)(dX,{correctAnswerColor:r,correctAnswerColorContrast:a}),p&&!m&&(0,s.jsx)(uX,{correctAnswerValue:i,incorrectAnswerColor:l,incorrectAnswerColorContrast:d,shouldRevealCorrectAnswer:f})]})}function mX({answers:e,columnBehavior:t,correctAnswerColor:n,correctAnswerColorContrast:o,incorrectAnswerColor:r,incorrectAnswerColorContrast:a,itemHeight:i,revealAnswers:c,rows:l}){return(0,s.jsx)("div",{className:"matching-results",children:(0,s.jsx)("ul",{className:"matching-results-list",role:"list",children:l.map((d,h)=>{const[m,f]=d,p=t==="freezeFirst"?e.find(C=>C.id===m.id)?.matchTitle:e.find(C=>C.id===f.id)?.title;return(0,s.jsx)(hX,{col1Id:m.id,col1Value:m.value,col2Id:f.id,col2Value:f.value,correctAnswerColor:n,correctAnswerColorContrast:o,correctAnswerValue:p,height:i,incorrectAnswerColor:r,incorrectAnswerColorContrast:a,revealAnswers:c},h)})})})}function fX(e){return Object.keys(e).length===0}function pX(e,t){return t in e}function gX(e,t){return Object.values(e).includes(t)}function Cp(e,t){for(const n in e)if(e[n]===t)return n}function vX(e,t,n){return{...e,[t]:n}}function bu(e,t){return t in e?_s(e,[t]):e}function CX(e,t){const n=Cp(e,t);return n===void 0?e:bu(e,n)}
155function b6(e,t,n){let o=bu(e,t);return o=CX(o,n),vX(o,t,n)}function bX(e){return Object.keys(e).length}var xX=v(22431),bp=v.n(xX);bp().dynamicDrop(!0),bp().pointerMoveTolerance(8);const As=bp();var za=v(49860);function yX(e,{onStart:t,onMove:n,onEnd:o,isEnabled:r=!0}){const a=za.useRef({x:0,y:0}),i=za.useRef({x:0,y:0}),c=za.useRef(!1),l=za.useRef(null),d=za.useRef(void 0);za.useEffect(()=>{const h=e.current;if(!h||!r||c.current)return;l.current=Cx(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(),p=f.x-i.current.x,C=f.y-i.current.y;(p!==0||C!==0)&&(a.current.x+=p,a.current.y+=C,e.current&&(e.current.style.transform=`translate3d(${a.current.x}px, ${a.current.y}px, 0)`,n?.({...a.current})),i.current=f)},As(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)`,n?.({...a.current})},end:()=>{a.current={x:0,y:0},h.style.transform="",l.current?.removeEventListener("scroll",d.current),setTimeout(()=>{o?.()},0)}}}),c.current=!0,()=>{As(h).unset(),l.current?.removeEventListener("scroll",d.current),c.current=!1}},[e,t,n,o,r])}var x6=v(49860);function SX(e,{isEnabled:t=!0,onDrop:n,onEnter:o,onLeave:r,overlap:a=.015}){const i=x6.useRef(!1);x6.useEffect(()=>{const c=e.current;if(!(!c||!t||i.current))return As(c).dropzone({overlap:a,listeners:{drop:()=>{n?.()},dragenter:()=>{o?.()},dragleave:()=>{r?.()}}}),i.current=!0,()=>{As(c).unset(),i.current=!1}},[e,n,o,r,t,a])}var Zn=v(49860);const y6=Zn.memo(function({col:t,height:n,id:o,index:r,isActive:a,isFrozen:i,isMatched:c,isMoved:l,onClick:d,onDragEnd:h,onDragStart:m,onDrop:f,onDropZoneEnter:p,onDropZoneLeave:C,onKeyDown:g,value:x,valueOtherColumnActive:b,valueOtherColumnMatch:y}){const[L,S]=Zn.useState(!1),T=Zn.useRef(null),k=Zn.useRef(null),I=Nt(),E=Zn.useCallback(()=>{d({col:t,id:o,value:x})},[t,o,d,x]),N=Zn.useCallback(()=>{S(!0),m({col:t,id:o,value:x})},[t,o,m,x]),M=Zn.useCallback(()=>{h(),S(!1)},[h]),A=Zn.useCallback(()=>{f({col:t,id:o,value:x})},[t,o,f,x]),j=Zn.useCallback(()=>{p({col:t,id:o,value:x})},[t,o,p,x]),w=Zn.useCallback(()=>{C()},[C]),P=Zn.useCallback(F=>{g(F,{col:t,index:r})},[t,r,g]);Zn.useEffect(()=>{t===1&&r===0||k.current?.setAttribute("tabindex","-1")},[]),yX(T,{isEnabled:!i,onStart:N,onEnd:M}),SX(T,{isEnabled:i,onDrop:A,onEnter:j,onLeave:w});const R=q()("matching-interaction-piece",{"matching-interaction-piece--matched":c,"matching-interaction-piece--moved":l}),O=y==null?null:(0,s.jsxs)(s.Fragment,{children:[I?.a11yMatchingItemMatchedWith," ",(0,s.jsx)(Sn,{value:y})]}),B=b==null?(0,s.jsx)(s.Fragment,{children:I?.a11yMatchingItemSelectableItem}):(0,s.jsxs)(s.Fragment,{children:[I?.a11yMatchingItemMatchWith," ",(0,s.jsx)(Sn,{value:b})]}),D=q()("matching-interaction-item",{draggable:!i,"draggable--dragging":!i&&L,droppable:i});return(0,s.jsx)("li",{className:D,ref:T,role:"listitem",children:(0,s.jsxs)("button",{"aria-pressed":a||c?!0:void 0,className:R,"data-state":a?"active":void 0,onClick:L?void 0:E,onKeyDown:P,ref:k,style:n?{height:n}:void 0,type:"button",children:[i?(0,s.jsx)("span",{className:"matching-interaction-piece-decoration"}):(0,s.jsx)(ae,{className:"matching-interaction-piece-decoration",name:"grip-dots-vertical"}),t===2?(0,s.jsx)("span",{className:"matching-interaction-piece-jigsaw"}):null,(0,s.jsx)("span",{className:"matching-interaction-piece-content",children:(0,s.jsx)("span",{"data-matching-interaction-piece-content-inline":"",children:(0,s.jsx)(Sn,{value:x})})}),(0,s.jsx)("span",{className:"visually-hidden-always",children:O}),(0,s.jsx)("span",{className:"visually-hidden-always",children:B})]},o)})});var We=v(49860);function TX({answers:e,columnBehavior:t,isActive:n,itemHeight:o,matches:r,onChange:a,onChangeItemHeight:i,onChangeRows:c,prefersKeyboardNavigation:l}){const d=(0,Fe.A)(n),h=(0,Fe.A)(t),m=(0,Fe.A)(e),f=(0,Fe.A)(r),p=Nt(),[C,g]=We.useState(void 0),[x,b]=We.useState(void 0),[y,L]=We.useState(void 0),[S,T]=We.useState(!1),k=We.useRef(null),I=We.useRef(null),E=We.useRef(null),N=We.useRef(void 0),M=We.useRef(void 0),[A,j]=We.useState(()=>xu({answers:e,columnBehavior:t,columnBehaviorToShuffle:"freezeSecond"})),[w,P]=We.useState(()=>xu({answers:e,columnBehavior:t,columnBehaviorToShuffle:"freezeFirst"})),R=We.useMemo(()=>e.map(G=>({col:1,id:G.id,value:G.title})).toSorted((G,Z)=>
155{const Y=A.get(G.id)??1/0,ne=A.get(Z.id)??1/0;return Y-ne}),[e,A]),O=We.useMemo(()=>e.map(G=>({col:2,id:G.id,value:G.matchTitle})).toSorted((G,Z)=>{const Y=w.get(G.id)??1/0,ne=w.get(Z.id)??1/0;return Y-ne}),[e,w]),B=We.useCallback(()=>{for(const $ of k.current?.querySelectorAll('button:not([tabindex="-1"])')??[])$.setAttribute("tabindex","-1")},[]),D=We.useCallback($=>{const G=Array.from(A),Z=Array.from(w);if(t==="freezeSecond"){const Y=new Array(Z.length),ne=G.map(J=>J[0]).filter(J=>!(J in $));for(const[J,te]of Object.entries($)){const he=w.get(te);Y[he]=[J,he]}for(let J=0;J<Y.length;J++)if(Y[J]==null){const te=ne.shift();Y[J]=[te,J]}const ee=new Map(Y),le=S6(A,ee);le.length>0&&b(le),j(ee)}else{const Y=new Array(G.length),ne=new Set(Object.values($)),ee=Z.map(te=>te[0]).filter(te=>!ne.has(te));for(const[te,he]of Object.entries($)){const _e=A.get(te);Y[_e]=[he,_e]}for(let te=0;te<Y.length;te++)if(Y[te]==null){const he=ee.shift();Y[te]=[he,te]}const le=new Map(Y),J=S6(w,le);J.length>0&&L(J),P(le)}},[t,A,w]),F=We.useCallback($=>{N.current=$},[]),V=We.useCallback(()=>{M.current==null&&(N.current=void 0)},[]),U=We.useCallback($=>{M.current=$},[]),H=We.useCallback(()=>{M.current=void 0},[]),K=We.useCallback($=>{const G=N.current;if(G!=null){const Z=$.col===1?$.id:G.id,Y=$.col===1?G.id:$.id,ne=b6(r,Z,Y);N.current=void 0,M.current=void 0,a(ne)}},[r,a]),Q=We.useCallback($=>{let G=null,Z=!1,Y=C;if($.col===1&&$.id in r)G=bu(r,$.id),Y=null;else if($.col===2&&Cp(r,$.id)){const ne=Cp(r,$.id);G=bu(r,ne),Y=null}else C==null&&(Y={col:$.col,id:$.id,value:$.value},Z=!0);if(C!=null)if(C.col===$.col)C.id===$.id?Y=null:Y={col:$.col,id:$.id,value:$.value};else{const ne=$.col===1?$.id:C.id,ee=$.col===1?C.id:$.id;G=b6(r,ne,ee),Z=!0,Y=null}if(G!=null&&a(G),C!==Y&&g(Y),Z){const ee=($.col===1?E:I).current?.querySelector('button:not([aria-pressed="true"])');ee&&(B(),ee.removeAttribute("tabindex"),ee.focus({preventScroll:!l}))}},[l,C,r,a,B]),z=We.useCallback(($,{col:G,index:Z})=>{const Y=$.currentTarget;let ne=!1,ee=null;switch($.key){case"ArrowUp":ne=!0,ee=Y.parentElement.previousElementSibling?.firstElementChild;break;case"ArrowDown":ne=!0,ee=Y.parentElement.nextElementSibling?.firstElementChild;break;case"ArrowRight":ne=!0,ee=G===1?E.current?.children[Z]?.firstElementChild:void 0;break;case"ArrowLeft":ne=!0,ee=G===2?I.current?.children[Z]?.firstElementChild:void 0;break;case"Home":ne=!0,ee=Y.closest("ul").firstElementChild.firstElementChild;break;case"End":ne=!0,ee=Y.closest("ul").lastElementChild.firstElementChild;break}ne&&($.preventDefault(),$.stopPropagation()),ee&&(B(),ee.removeAttribute("tabindex"),ee.focus())},[B]);We.useEffect(()=>{r!==f&&!fX(r)&&D(r)},[D,r,f]),We.useEffect(()=>{const $=({shouldFocus:Y})=>{const ne=C.col===1?I:E;B();const ee=ne.current.querySelector('button[data-state="active"]');ee?.removeAttribute("tabindex"),Y&&ee?.focus(),g(null)},G=Y=>{k.current?.contains(Y.target)||$({shouldFocus:!1})},Z=Y=>{Tn(Y)&&C!=null&&$({shouldFocus:!0})};return C==null?(document.removeEventListener("mousedown",G),document.removeEventListener("keydown",Z)):(document.addEventListener("mousedown",G),document.addEventListener("keydown",Z)),()=>{document.removeEventListener("mousedown",G),document.removeEventListener("keydown",Z)}},[C,B]);const W=We.useCallback(()=>{const $=Array.from(k.current?.querySelectorAll("[data-matching-interaction-piece-content-inline]")??[]);if($.length===0)return;const G=$[0].closest("button");let Z=0,Y;if(G){const ee=window.getComputedStyle(G),le=parseFloat(ee.paddingBlockStart)+parseFloat(ee.paddingBlockEnd),J=parseFloat(ee.borderTopWidth)+parseFloat(ee.borderBottomWidth);Z=le+J,Y=parseFloat(ee.minHeight)}const ne=$.reduce((ee,le)=>Math.max(ee,le.scrollHeight+Z),0);Y&&Y>=ne?i(void 0):i(ne)},[i]);return We.useEffect(()=>{(!d&&n||m!==e)&&W()},[d,n,e,m,W]),We.useEffect(()=>{const $=k.current?.closest(".quiz-card");let G;return $!=null&&(G=new ResizeObserver(()=>{W()}),G.observe($)),()=>{$!=null&&G!=null&&G.unobserve($)}},[W]),We.useEffect(()=>{let $,G;return x&&($=setTimeout(()=>{b(void 0)},1e3)),y&&(G=setTimeout(()=>{L(void 0)},1e3)),()=>{clearTimeout($),clearTimeout(G)}},[x,y]),We.useEffect(()=>{S&&h!==t&&(a({}),D({}),g(void 0),j(xu({answers:e,columnBehavior:t,columnBehaviorToShuffle:"freezeSecond"})),P(xu({answers:e,columnBehavior:t,columnBehaviorToShuffle:"freezeFirst"})))},[S,t,h,e,a,D]),We.useEffect(()=>{if(R.length<=0)return;const $=R.map((G,Z)=>[G,O[Z]]);c($)},[R,O,c]),We.useEffect(()=>{T(!0)},[]),(0,s.jsxs)("div",{className:"matching-interaction","data-testid":"matching-interaction",ref:k,children:[(0,s.jsx)("ul",{"aria-label":p?.a11yMatchingColumn1,className:"matching-interaction-col matching-interaction-col-1","data-col":"1",ref:I,role:"list",children:R.map(($,G)=>{const Z=pX(r,$.id);return(0,s.jsx)(y6,{col:1,height:o,id:$.id,index:G,isActive:C?.col===1&&C?.id===$.id,isFrozen:t==="freezeFirst",isMatched:Z,isMoved:x?.map(Y=>Y.id).includes($.id)??!1,onClick:Q,onDragEnd:V,onDragStart:F,onDrop:K,onDropZoneEnter:U,onDropZoneLeave:H,onKeyDown:z,value:$.value,valueOtherColumnActive:C?.col===2?C?.value:void 0,valueOtherColumnMatch:Z?O[G]?.value:void 0},$.id)})}),(0,s.jsx)("ul",{"aria-label":p?.a11yMatchingColumn2,className:"matching-interaction-col matching-interaction-col-2","data-col":"2",ref:E,role:"list",children:O.map(($,G)=>{const Z=gX(r,$.id);return(0,s.jsx)(y6,{col:2,height:o,id:$.id,index:G,isActive:C?.col===2&&C?.id===$.id,isFrozen:t==="freezeSecond",isMatched:Z,isMoved:y?.map(Y=>Y.id).includes($.id)??!1,onClick:Q,onDragEnd:V,onDragStart:F,onDrop:K,onDropZoneEnter:U,onDropZoneLeave:H,onKeyDown:z,value:$.value,valueOtherColumnActive:C?.col===1?C?.value:void 0,valueOtherColumnMatch:Z?R[G]?.value:void 0},$.id)})})]})}const xu=({answers:e,columnBehavior:t,columnBehaviorToShuffle:n})=>{let o=e.map(r=>r.id);return t===n&&(o=(0,k0.shuffle)(o)),new Map(o.map((r,a)=>[r,a]))};function S6(e,t){const n=[];for(const[o,r]of e){const a=t.get(o);a!==r&&n.push({id:o,from:r,to:a})}return n}var yu=v(49860);function T6({columnBehavior:e="freezeSecond",matches:t={},onChange:n=()=>{},revealAnswers:o="none",...r}){const[a,i]=yu.useState([]),[c,l]=yu.useState(void 0),d=yu.useCallback(m=>{i(m)},[]),h=yu.useCallback(m=>{l(m)},[]);return r.isComplete?(0,s.jsx)(mX,{...r,columnBehavior:e,itemHeight:c,revealAnswers:o,rows:a}):(0,s.jsx)(TX,{...r,columnBehavior:e,itemHeight:c,matches:t,onChange:n,onChangeItemHeight:h,onChangeRows:d})}function L6(e){return e==null||e===-1}function LX(e,t){return e===t}const kX=({allowTabNavigation:e=!1,color:t,correctId:n="",errorMessageId:o,isComplete:r,isCorrect:a=!1,isReduceMotion:i=!1,labels:c,onChange:l=()=>{},onEnterToSubmit:d=()=>{},options:h=[],questionHtmlId:m="",renderOptionText:f,isRetaking:p,revealAnswers:C=Me.NONE,selectedIndex:g=-1,shouldFocusFirst:x,onFocusFirstC
155omplete:b})=>{const y=L6(g);return(0,s.jsx)(Tc,{"aria-invalid":o?!0:void 0,"aria-labelledby":[m,o].filter(Boolean).join(" "),"aria-required":"true",role:"radiogroup",children:h.map((L,S,T)=>(0,s.jsx)(IX,{allowTabNavigation:e,color:t,id:L.id,index:S,isComplete:r,isCorrect:a,isCorrectOption:n===L.id,isFirst:S===0,isFresh:y,isLast:S===T.length-1,isReduceMotion:i,isRetaking:p,isSelected:!p&&LX(g,S),labels:c,onChange:l,onEnterToSubmit:d,onFocusFirstComplete:b,questionHtmlId:m,renderOptionText:f,revealAnswers:C,shouldFocusFirst:x,title:L.title},L.id))})},IX=({allowTabNavigation:e,color:t,id:n,index:o,isComplete:r,isCorrect:a,isCorrectOption:i,isFresh:c,isSelected:l,isReduceMotion:d,labels:h,onChange:m,onEnterToSubmit:f,questionHtmlId:p,renderOptionText:C,isRetaking:g,revealAnswers:x,shouldFocusFirst:b,onFocusFirstComplete:y,title:L})=>{const[S]=(0,u.useState)(()=>jr()("qmc-")),T=(0,u.useRef)(null),k=(0,Fe.A)(l),I=!!r,E=e&&(l||c&&o===0)?0:-1,N=x===Me.ALL,M=x==Me.INCORRECT,A=N||M&&a,j=N||M&&a||M&&!a&&l,w=r&&i&&A,P=r&&!i&&j,R=(w||P)&&!g,O=R?`${S}-result`:void 0,B=q()("quiz-multiple-choice-option",{"is-complete":r,"is-correct":w,"is-incorrect":P,"is-selected":l}),D=q()("quiz-multiple-choice-option__dot",{"quiz-multiple-choice-option__dot--active":l&&!r}),F=q()("quiz-multiple-choice-option__check",{"quiz-multiple-choice-option__check--active":w}),V=q()("quiz-multiple-choice-option__x",{"quiz-multiple-choice-option__x--active":P}),U=q()("quiz-multiple-choice-option__border"),H=(0,u.useCallback)(W=>{va(W)&&f(W)},[f]),K=(0,u.useCallback)(()=>{m({selectedIndex:o})},[o,m]),Q=(0,u.useCallback)(()=>{l&&m({selectedIndex:o})},[o,l,m]),z=r?void 0:H;return(0,u.useEffect)(()=>{e&&T.current&&(!k&&l?T.current.focus({preventScroll:d}):b&&c&&o===0&&(T.current.focus({preventScroll:d}),y?.()))},[e,l,d,k,b,c,o,y]),(0,s.jsxs)("div",{"data-testid":"quiz-card-option",children:[(0,s.jsxs)("label",{"aria-describedby":O,className:B,ref:T,children:[(0,s.jsx)("input",{checked:l,className:"quiz-multiple-choice-option__input",disabled:I,name:p,onChange:K,onClick:r?void 0:Q,onKeyDown:z,tabIndex:E,type:"radio"}),(0,s.jsxs)("div",{className:"quiz-multiple-choice-option__indicator",style:{color:t},children:[(0,s.jsx)(gH,{className:D,dataTestId:l&&!r?"selected-dot-active":"selected-dot"}),(0,s.jsx)(Yb,{className:F,"data-testid":w?"correct-check-active":"correct-check"}),(0,s.jsx)(ex,{"aria-hidden":"true",className:V,dataTestId:P?"incorrect-x-active":"incorrect-x",overrideStyle:!0})]}),(0,s.jsx)("div",{className:U}),(0,s.jsx)("div",{className:"quiz-multiple-choice-option__text","data-testid":"quiz-mc-option-text",children:C({optionId:n,title:L})})]}),R&&(0,s.jsxs)("div",{className:"visually-hidden-always",id:O,children:[l&&i&&h?.a11yQuizReviewCorrectlySelected,l&&!i&&h?.a11yQuizReviewIncorrectlySelected,!l&&i&&h?.a11yQuizReviewIncorrectlyUnselected,!l&&!i&&h?.a11yQuizReviewCorrectlyUnselected]})]})},k6=kX;function EX(e){return e.length===0}function NX(e,t){return e.includes(t)}function jX(e,t){return e.includes(t)?e.filter(n=>n!==t):[...e,t]}const wX=({allowTabNavigation:e=!1,correctIds:t=[],errorMessageId:n,isComplete:o,isCorrect:r=!1,labels:a,onChange:i=()=>{},onEnterToSubmit:c=()=>{},options:l=[],questionHtmlId:d="",renderOptionText:h,isRetaking:m,revealAnswers:f=Me.NONE,selectedIndices:p=[]})=>(0,s.jsx)("div",{"aria-labelledby":[d,n].filter(Boolean).join(" "),role:"group",children:(0,s.jsx)("ul",{children:l.map((C,g)=>(0,s.jsx)(AX,{allowTabNavigation:e,errorMessageId:n,id:C.id,index:g,isComplete:o,isCorrect:r,isCorrectOption:t.includes(C.id),isRetaking:m,isSelected:!m&&NX(p,g),labels:a,onChange:i,onEnterToSubmit:c,renderOptionText:h,revealAnswers:f,title:C.title},C.id))})}),AX=({allowTabNavigation:e,errorMessageId:t,id:n,index:o,isComplete:r,isCorrect:a,isCorrectOption:i,isSelected:c,labels:l,onChange:d,onEnterToSubmit:h,renderOptionText:m,isRetaking:f,revealAnswers:p,title:C})=>{const[g]=(0,u.useState)(()=>jr()("qmr-")),x=r&&p===Me.ALL&&!f,b=x?`${g}-result`:void 0,y=!!r,L=e?0:-1,S=p===Me.ALL,T=p==Me.INCORRECT,k=S||T&&a||T&&!a&&c,I=q()("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}),E=q()("quiz-multiple-response-option__border"),N=(0,u.useCallback)(j=>{va(j)&&h(j)},[h]),M=(0,u.useCallback)(()=>{d({optionIndex:o})},[o,d]),A=r?void 0:N;return(0,s.jsxs)("li",{children:[(0,s.jsxs)("label",{"aria-describedby":b,className:I,children:[(0,s.jsx)("input",{"aria-describedby":t||void 0,"aria-invalid":t?!0:void 0,checked:c,className:"quiz-multiple-response-option__input",disabled:y,onChange:r?void 0:M,onKeyDown:A,tabIndex:L,type:"checkbox"}),(0,s.jsxs)("div",{className:"quiz-multiple-response-option__indicator",children:[(0,s.jsx)(Yb,{className:"quiz-multiple-response-option__check"}),(0,s.jsx)(ex,{"aria-hidden":"true",className:"quiz-multiple-response-option__x",height:"8",overrideStyle:!0,width:"8"})]}),(0,s.jsx)("div",{className:E}),(0,s.jsx)("div",{className:"quiz-multiple-response-option__text",children:m({o
155ptionId:n,title:C})})]}),x&&(0,s.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]})]})},I6=wX;var c1e,RX,PX,l1e,d1e,u1e,h1e;const MX=po()(Je()("correct",!0)),m1e=e=>RX(PX(e),xp),OX=e=>({MATCHING:Ee(),FILL_IN_THE_BLANK:yp,MULTIPLE_CHOICE:Ee(),MULTIPLE_RESPONSE:Ee()})[e],xp=De()(p0()("id"),MX),BX=De()(No(),xp),yp=po()(Je()("correct",!0)),DX=De()(Xe()("id"),No()),f1e=null,{FILL_IN_THE_BLANK:FX,MATCHING:E6,MULTIPLE_CHOICE:HX,MULTIPLE_RESPONSE:$X}=bn;function N6({type:e,text:t="",matches:n={},answersLength:o=0,selectedIndices:r=[],selectedIndex:a}){switch(e){case FX:return!h1(t);case E6:return bX(n)===o;case $X:return!EX(r);case HX:default:return!L6(a)}}function _X({answered:e=!1,...t}){return e&&t.type!==E6?!1:N6(t)}function j6(e,t){const n=e.trim();return t?n:n.toLowerCase()}function w6({answers:e,text:t,caseSensitive:n=!1,getL10nValue:o}){if(!t)return!1;const r=j6(t,n);return e.some(a=>{const i=o(a.title);return typeof i!="string"?!1:j6(i,n)===r})}function A6(e){return Object.entries(e).every(([t,n])=>t===String(n))}function VX(e){const t=e.answers??[],n=e.correct;if(n!=null)return t.findIndex(r=>
155r.id===n);const o=t.findIndex(r=>r.correct===!0);return o===-1?0:o}function R6({isCorrectAnswerUnshuffled:e=!1,isShuffled:t=!1,item:n,selectedIndex:o,shuffledAnswerIndices:r}){if(o==null||t&&!Array.isArray(r))return!1;const a=t&&!e?r.indexOf(o):o,i=VX(n);return a===i}function zX(e,t){return t.map(n=>e.indexOf(n))}function UX(e){return typeof e=="object"&&e!==null&&"id"in e?e.id:e}function GX(e){const t=e.answers??[],n=e.corrects??[];return n.length>0?n.map(a=>{const i=UX(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 P6(e){return[...e].sort((t,n)=>t-n)}function M6({isShuffled:e=!1,item:t,selectedIndices:n,shuffledAnswerIndices:o}){if(!Array.isArray(n)||e&&!Array.isArray(o))return!1;const r=e?zX(o,n):n,a=GX(t),i=P6(r),c=P6(a);return i.length!==c.length?!1:i.every((l,d)=>l===c[d])}function O6({answers:e,feedback:t,feedbackCorrect:n,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?n:o;default:return t}}function WX(e){return e==="a"?46.5:7.6}function KX(e){return e==="d"?2:3.2}function QX(e){switch(e){case"a":return 30;case"c":case"d":return 92;default:return 76}}function B6(e){switch(e){case"b":return 95;case"background":return 52;default:return 76}}function Sp(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 YX(e){return .3}function p1e(e){switch(e){case 3:return"three";case 4:return"four";default:return"two"}}function ZX(e){return e==="light"?"#fff":"#000"}function g1e(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 v1e(e){return e==="b"?[52,76,95]:[52,76,92]}function C1e(e){return e==="a"?[30,76,92]:[52,76,92]}function b1e(e){return e==="d"?[2,4.8,5.6]:[3.2,4.8,5.6]}function x1e(e){return e==="a"?[46.5,78,120]:[7.6,20,32]}function XX(e){switch(e){case 3:return"sm";case 10:return"lg";default:return"med"}}function Tp(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 qX(e){switch(e){case 52:return"sm";case 76:return"med";default:return"lg"}}function D6(e){switch(e){case 52:return"sm";case 76:return"med";default:return"lg"}}function F6(e){switch(e){case 4:return"med";case 6:return"lg";default:return"sm"}}function Su(e){switch(e){case 52:return"sm";case 92:return"lg";default:return"med"}}function JX(e){switch(e){case 30:case 52:return"sm";case 92:return"lg";default:return"med"}}function eq(e){switch(e){case 4.8:return"med";case 5.6:return"lg";default:return"sm"}}function tq(e){switch(e){case 20:case 78:return"med";case 32:case 120:return"lg";default:return"sm"}}function nq(e){switch(e){case 1:return"sm";case 3:return"lg";default:return"med"}}function sq(e){switch(e){case 3.2:return"med";case 5.6:return"lg";default:return"sm"}}var y1e=v(78219),oq=v(31529),rq=v.n(oq),S1e=v(3572),aq,H6,iq,cq,lq;const $6="owner",dq="manager",uq="editor",T1e="viewer",_6=null,Lp=({effectiveRole:e,requiredRole:t})=>{const n=H6(e,_6),o=H6(t,_6);return n>=o},hq=e=>({editor:Lp({effectiveRole:e,requiredRole:uq}),manager:Lp({effectiveRole:e,requiredRole:dq}),owner:Lp({effectiveRole:e,requiredRole:$6})}),L1e=(e,t,n)=>{const{authorId:o}=e,r=o===n,a=c=>r||c,i=mq(t);return cq(iq(["canChangePermissions","canMoveTo"]),aq({canDelete:a,canEdit:a,canMove:a,canRename:a,canUnshare:a}))(i)},mq=e=>{const{effectiveRole:t,type:n}=e||[],o=n!==lq?$6:t,{editor:r,manager:a,owner:i}=hq(o);return{canChangePermissions:a,canCreate:r,canDelete:i,canEdit:r,canMove:a,canMoveTo:r,canRename:r,canUnshare:i}};var fq,pq,Lc,gq,vq,Cq,bq,V6,Ua,xq,z6,U6,yq,Sq,kc,Tq,Lq,G6,kq,Tu,Iq,Eq,W6,Nq,K6,jq,wq,Ga;const Aq={[bn.FILL_IN_THE_BLANK]:"fillin",[bn.MATCHING]:"matching",[bn.MULTIPLE_CHOICE]:"multiple choice",[bn.MULTIPLE_RESPONSE]:"multiple response"},Lu="personal",Q6="team",k1e=500,I1e=null,E1e=null,Y6=({questions:e=[],drawnQuestionIds:t=[]})=>{const n=a=>!t.some(i=>
155i.includes(a.id)),o=e.filter(n),r=Math.floor(Math.random()*o.length);return o[r]??null},Rq=e=>t=>t.type===Lu||K6({effectiveRole:t.effectiveRole,requiredRole:e}),Pq=({folders:e,requiredRole:t,teamAccount:n})=>Ga(e,W6,z6,Ua(o=>Rq(t)(o)&&(n||o.type===Lu))),N1e=({questionBanks:{folders:e,questionBanks:t},requiredRole:n=jq,teamAccount:o,term:r})=>{if(r&&Sq(Eq(r)))return{folders:[],questionBanks:[]};const a=new RegExp("("+Nq(r)+")","i"),i=Pq({folders:e,requiredRole:n,teamAccount:o}),c=G6("id",i),l=Ua(h=>h.title.match(a)&&!h.deleted,i),d=Ua(h=>(kc(h.folderId)||V6(h.folderId,c))&&h.title.match(a)&&!h.deleted,t);return{folders:l,questionBanks:d}},Z6=(e,t,n=!1)=>Ga(t,yq(Lc(!kc(e)),kq(e),Lq(W6,z6)),Iq(Tu("deleted",!n))),Mq=(e,t,n,o=!1)=>{const r=e===Q6,a=e===Lu,i=Ga(Z6(Q6,n),G6("id")),c=l=>!kc(l.folderId)&&V6(l.folderId,i);return Ga(t,Ua(bq([[Lc(o),l=>l.deleted],[Lc(r),l=>!l.deleted&&c(l)],[Lc(a),l=>!l.deleted&&!c(l)],[Lc(kc(e)),l=>!l.deleted],[fq,U6]])))},Oq=({type:e})=>e===Lu,X6=({effectiveRole:e})=>K6({effectiveRole:e,requiredRole:wq}),Bq=(e,t)=>({id:n})=>n?Cq(gq(U6),Tq(pq([Tu("folderId",n),Tu("authorId",e)])))(t):!1,Dq=(e,t,n,o)=>Ga(Z6(t,e),Ua(vq([Oq,X6,Bq(o,n)]))),Fq=(e,t)=>n=>{if(kc(n.folderId))return!0;const o=xq(Tu("id",n.folderId),e);if(!o)return!1;const r=X6(o),a=n.authorId===t;return r||a},Hq=(e,t,n,o,r)=>Ga(Mq(e,t,n),Ua(Fq(o,r))),j1e=(e,t,n,o)=>{const r=Dq(e,n,t,o),a=Hq(n,t,e,r,o);return{folders:r,questionBanks:a}},$q=(e,t,n=[])=>{const o=t[e],{parentId:r}=o||{},{type:a}=t?.[r]||{},i=o?[o,...n]:n;return!r||o.type!==a?i:$q(r,t,i)},{FILL_IN_THE_BLANK:Wa,MATCHING:ku,MULTIPLE_CHOICE:Iu,MULTIPLE_RESPONSE:Eu}=bn,_q={FILL_IN_THE_BLANK:"a11yBlockKnowledgeCheckFIB",MATCHING:"a11yBlockKnowledgeCheckM",MULTIPLE_CHOICE:"a11yBlockKnowledgeCheckMC",MULTIPLE_RESPONSE:"a11yBlockKnowledgeCheckMR"},Vq=Lt()(null,[0,"type"]),kp=mn();class q6 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-${pu()()}`},this.retakeAnimationStageOne=null,this.retakeAnimationStageTwo=null,this.feedbackRef=(0,u.createRef)(),this.takeAgainRef=(0,u.createRef)(),this.get
155Selection=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(Ke,this.previewOnly__forceShowFeedback),window.addEventListener(pm,this.previewOnly__clearOverrides),this.id=jr()("kc-")}componentDidUpdate(t,n){n.answered&&!this.state.answered?this.getType()!==Wa&&vf(this.wrapper):!n.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(Ke,this.previewOnly__forceShowFeedback),window.removeEventListener(pm,this.previewOnly__clearOverrides)}previewOnly__forceShowFeedback(t){const{itemId:n,path:o}=t.detail,{getL10nValue:r}=this.props;if(n!==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:p})=>p===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 Wa:return this.state.fillInText;case ku:return this.state.matches;case Eu:return this.state.selectedIndices;case Iu:default:return this.state.selectedAnswer}}handleMatchesChange=t=>{this.setState({errorIncomplete:!1,matches:t})};handleMultipleResponseChange({optionIndex:t}){const{selectedIndices:n}=this.state;this.setState({errorIncomplete:!1,selectedIndices:jX(n,t)})}handleChoiceSelect({selectedIndex:t}){const{answered:n}=this.state;n||this.setState({errorIncomplete:!1,selectedAnswer:t,chosen:!0})}onSubmit(t,n,o,r,a){if(!n){switch(this.setState({errorIncomplete:!0}),r.type){case Wa:this.wrapper?.querySelector("input")?.focus();break;case Eu:case Iu:this.wrapper?.querySelector("input")?.focus();break;case ku: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:n,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},()=>{!kp&&this.getType()===Wa&&vf(this.wrapper),this.retakeAnimationStageTwo=null}),r?.retryCount!=null&&this.props.onRetryAttempt?.({blockId:n,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,s.jsx)(Qe,{className:"quiz-card__title",id:this.state.questionHtmlId,value:t})}renderQuestion(t){const{answered:n,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:p,quizIncorrect:C,quizRequireAnswer:g,quizSubmit:x,quizTakeAgain:b}=d,{id:y,type:L}=t,S=t.type!=="DRAW_FROM_QUESTION_BANK"?t.settings:{},T=l("media"in t?t.media:{}),k=this.state.forceShowFeedbackCorrect||this.getIsCorrect({item:t}),I=this.getCanSubmit({item:t}),E=f?.requireCorrectAnswer?k:!0,N=this.onSubmit.bind(this,y,I,E,t),M=this.getFeedback({item:t,
155isCorrect:k,selectedAnswer:a}),A=this.getSelection({item:t}),{columnBehavior:j,correctAnswerColor:w,correctAnswerColorContrast:P,incorrectAnswerColor:R,incorrectAnswerColorContrast:O}=f,B=k?w:R,D=d.knowledgeCheckCorrectAnswerRequiredBlock,F=d.knowledgeCheckRetriesAttemptsRemaining,V=d.knowledgeCheckMaxRetriesReached,U=h?.items?.[i]?.items?.[y]?.retryAttemptCount??0,H=f?.retryCount!==0&&(f?.retryCount==null||f?.retryCount===-1||U<f?.retryCount),K=f?.retryCount!=null||f?.retryCount===-1?f?.retryCount-U:-1,Q=!k,z={"--color-feedback-icon":B,"--color-matching-feedback-bubble-bg":R,"--color-multiple-choice-complete-border":R,"--color-multiple-choice-correct-border":w,"--color-multiple-response-correct-border":w,"--color-multiple-response-incorrect-border":R,"--color-multiple-response-option-check":n?w:void 0,"--color-quiz-option-check":w,"--color-x-fill":R},$=f?.revealCorrectAnswers!==!1&&(f.retryCount==null||f.retryCount===-1||!H)?Me.ALL:Me.INCORRECT,G=q()("block-knowledge__retake-container",{"block-knowledge__retake-container--active":n,"block-knowledge__retake-container--active-attempts-left":n&&!r&&K>0}),Z=q()("block-knowledge__retake",{"block-knowledge__retake--active":n&&!r&&H}),Y=q()("block-knowledge__retake","block-knowledge__attempts-left",{"block-knowledge__retake--active":n&&!r&&H&&K>0}),ne=q()("block-knowledge__retake","block-knowledge__no-more-attempts",{"block-knowledge__retake--active":n&&!r&&!H}),ee=!!T?.image,le=!!T?.audio,J=!!T?.video,te=!!T?.embed;let he=null;le&&ee?he=(0,s.jsx)(Vo,{blockId:i,enableVideoPlaybackSpeed:c,index:`${i}-${y}-audio`,isOverlayAudio:!0,item:t,labels:d,media:T,settings:S}):le&&(J||te)?he=(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(Vo,{blockId:i,enableVideoPlaybackSpeed:c,index:`${i}-${y}-audio`,item:t,labels:d,media:{audio:T.audio},settings:S}),(0,s.jsx)(Vo,{blockId:i,enableVideoPlaybackSpeed:c,index:`${i}-${y}-video`,item:t,labels:d,media:J?{video:T.video}:{embed:T.embed},settings:S})]}):he=(0,s.jsx)(Vo,{blockId:i,enableVideoPlaybackSpeed:c,index:`${i}-${y}-audio`,item:t,labels:d,media:T,settings:S});const _e=q()("block-knowledge__media",{"block-knowledge__image-with-audio":le&&ee});return(0,s.jsxs)(u6,{isActive:!0,style:z,children:[f?.requireCorrectAnswer&&(n&&!k||!n)&&(0,s.jsxs)("div",{className:"quiz-card__require-correct-answer-disclaimer",children:[(0,s.jsx)(ae,{className:"quiz-card__require-correct-answer-disclaimer-icon",name:"info-circle"}),D]}),m(t),(0,s.jsx)("div",{className:_e,children:he}),(0,s.jsx)(p6,{type:L,children:this.renderType({columnBehavior:j,correctAnswerColor:w,correctAnswerColorContrast:P,incorrectAnswerColor:R,incorrectAnswerColorContrast:O,isCorrect:k,item:t,onSubmit:N})}),(0,s.jsx)("div",{"aria-live":"assertive",children:o&&(0,s.jsxs)("div",{className:"quiz-card__validations","data-testid":"quiz-validation-error",children:[(0,s.jsx)("span",{"data-testid":"quiz-validation-icon",children:(0,s.jsx)(ae,{className:"quiz-card__validation-icon",name:"alert-circle"})}),(0,s.jsx)("span",{id:`${this.id}-error-incomplete-message`,children:g})]})}),(0,s.jsx)(d6,{canProceed:n,canSubmit:I,isReduceMotion:kp,onSubmit:N,quizSubmit:x}),(0,s.jsx)(f6,{canProceed:this.state.forceShowFeedback||n,feedbackRef:this.feedbackRef,feedbackValue:M,isActive:n,isComplete:n,isCorrect:k,item:t,labels:d,quizCorrect:p,quizIncorrect:C,revealAnswers:$,selection:A}),(0,s.jsxs)("div",{"aria-hidden":!n,className:G,children:[Q&&(0,s.jsxs)(s.Fragment,{children:[H?(0,s.jsxs)(l6,{allowTabNavigation:n,className:Z,onClick:this.handleRetake.bind(this,t),ref:this.takeAgainRef,size:"md",variant:"outlined",children:[(0,s.jsx)(ae,{"aria-hidden":"true",name:"arrow-rotate-left"}),b]}):null,K>0&&(0,s.jsxs)("div",{className:Y,children:[F," ",K]})]}),!H&&!k&&(0,s.jsx)("div",{className:ne,children:V})]})]},y)}getIsCorrect({item:t}){const{fillInText:n,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 Wa:return w6({answers:yp(c),text:n,caseSensitive:l,getL10nValue:this.props.getL10nValue});case ku:return A6(o);case Eu:return M6({item:{answers:c},selectedIndices:a});
155case Iu:default:return R6({item:{answers:c},selectedIndex:r})}}getType(){const{items:t}=this.props;return Vq(t)}getCanSubmit({item:t}){const n="answers"in t?t.answers:void 0,{answered:o,fillInText:r,matches:a,selectedAnswer:i,selectedIndices:c}=this.state;return _X({type:t.type,text:r,matches:a,answersLength:n?.length??0,selectedIndices:c,selectedIndex:i,answered:o})}getFeedback({item:t,isCorrect:n,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??n;return O6({answers:l,feedback:r,feedbackCorrect:a,feedbackIncorrect:i,feedbackType:c,isCorrect:d,selectedIndex:typeof o=="number"?o:null})}getTypeLabel(){const{labels:t}=this.props,n=this.getType(),o=_q[n];return o?t?.[o]:t?.a11yBlockKnowledgeCheck}renderMultipleResponseOptionText(t,{title:n}){return(0,s.jsx)(Qe,{className:"cursorAuto",value:n})}renderMultipleChoiceOptionText(t,{title:n}){return(0,s.jsx)(Qe,{className:"quiz-multiple-choice-option__label cursorAuto",value:n})}renderType({columnBehavior:t,correctAnswerColor:n,correctAnswerColorContrast:o,incorrectAnswerColor:r,incorrectAnswerColorContrast:a,isCorrect:i,item:c,onSubmit:l}){const{isHidden:d,labels:h,prefersKeyboardNavigation:m,renderMultipleResponseOptionText:f=this.renderMultipleResponseOptionText,renderMultipleChoiceOptionText:p=this.renderMultipleChoiceOptionText,settings:C,progress:g,blockId:x}=this.props,{answered:b,fillInText:y,isRetaking:L,matches:S,selectedAnswer:T,selectedIndices:k,shouldFocusFirst:I,questionHtmlId:E}=this.state,{id:N,type:M}=c,A="answers"in c?c.answers:[],{quizAcceptableResponses:j,quizAnswerPlaceholder:w}=h,P=g?.items?.[x]?.items?.[N]?.retryAttemptCount??0,R=C?.retryCount!==0&&(C?.retryCount==null||C?.retryCount===-1||P<C?.retryCount),B=C?.revealCorrectAnswers!==!1&&(C.retryCount==null||C.retryCount===-1||!R)?Me.ALL:Me.INCORRECT,D=this.state.errorIncomplete?`${this.id}-error-incomplete-message`:void 0;switch(M){case Wa:return(0,s.jsx)(C6,{allowTabNavigation:!0,correctAnswerColor:n,correctAnswerColorContrast:o,errorMessageId:D,incorrectAnswerColor:r,incorrectAnswerColorContrast:a,isComplete:b,isCorrect:i,labels:h,onChange:this.handleFillIn,onEnterToSubmit:l,options:yp(A),questionHtmlId:E,quizAcceptableResponses:j,quizAnswerPlaceholder:w,revealAnswers:B,value:y});case ku:return(0,s.jsx)(T6,{answers:OX(M)(A),columnBehavior:t,correctAnswerColor:n,correctAnswerColorContrast:o,incorrectAnswerColor:r,incorrectAnswerColorContrast:a,isActive:!d,isComplete:b,matches:S,onChange:this.handleMatchesChange,prefersKeyboardNavigation:m,revealAnswers:B});case Eu:return(0,s.jsx)(I6,{allowTabNavigation:!0,correctIds:xp(A),errorMessageId:D,isComplete:b,isCorrect:i,isRetaking:L,labels:h,onChange:this.handleMultipleResponseChange,onEnterToSubmit:l,options:A,questionHtmlId:E,renderOptionText:f.bind(this,c),revealAnswers:B,selectedIndices:k});case Iu:default:return(0,s.jsx)(k6,{allowTabNavigation:!0,correctId:BX(A)||DX(A),errorMessageId:D,isComplete:b,isCorrect:i,isReduceMotion:kp,isRetaking:L,labels:h,onChange:this.handleChoiceSelect,onEnterToSubmit:l,onFocusFirstComplete:this.resetShouldFocusFirst,options:A,questionHtmlId:E,renderOptionText:p.bind(this,c),revealAnswers:B,selectedIndex:T,shouldFocusFirst:I})}}render(){const{animateBlockEntrance:t,initiallyVisible:n,isLearner:o,items:r,settings:a,variant:i}=this.props,{answered:c,isRetaking:l}=this.state,{entranceAnimation:d,knowledgeCheckWidth:h=76}=a,m=Su(h),f=q()("block-knowledge",{"block-knowledge--answered":c,"block-knowledge--no-animation":!d,"block-knowledge--retake":l}),p=q()("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,s.jsx)(Ae,{className:f,"data-testid":"block-kc-card",ref:g=>{this.block=g},style:this.getStyle(),children:(0,s.jsx)(He,{animateBlockEntrance:t,initiallyVisible:n,isLearner:o,children:(0,s.jsx)("div",{className:"block-knowledge__container",children:(0,s.jsx)("div",{className:"block-knowledge__row",children:(0,s.jsx)("div",{className:`block-knowledge__col--custom-width-${m}`,children:(0,s.jsx)(Kt,{"aria-label":this.getTypeLabel(),className:p,"data-testid":"block-knowledge-wrapper",ref:g=>{this.wrapper=g},children:C.map(g=>this.renderQuestion(g))})})})})})})}getStyle(){const{backgroundColor:t,settings:n}=this.props;if(n?.cardMode===_n.TRANSPARENT)switch(n?.backgroundType){case re.ACCENT:case re.COLOR:case re.TINT:if(t)switch(ga(t)){case vt.LIGHT:return{"--color-background-choice-hover":ss(.5,t),"--color-background-feedback-frame":ss(.5,t)};case vt.MED:return{"--color-background-choice-hover":Is(.3,t),"--color-background-feedback-frame":Is(.3,t)};case vt.DARK:return{"--color-background-choice-hover":Is(.6,t),"--color-background-feedback-frame":Is(.6,t)};case vt.NEAR_BLACK:return{"--color-background-choice-hover":ss(.15,t),"--color-background-feedback-frame":ss(.15,t)}}}}}const zq=e=>{const{blockId:t,items:[n]}=e,{questions:o}=n,[r,a]=(0,u.useState)(()=>Y6({questions:o}));(0,u.useEffect)(()=>
155{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:p})=>p===m);f&&a(f)};return window.addEventListener(Ke,c),()=>window.removeEventListener(Ke,c)},[t,r,o]);const i=(0,u.useMemo)(()=>r?{variant:Aq[r.type],items:[r]}:{},[r]);return r?(0,s.jsx)(q6,{...e,...i}):(0,s.jsx)("div",{})},Uq=e=>e.variant==="draw from question bank",Ka=e=>{const t=yn()??"",n=dn(),o=rt(),r={...e,backgroundColor:t,getL10nValue:o,blockSettings:n};return Uq(r)?(0,s.jsx)(zq,{...r}):(0,s.jsx)(q6,{...r})};var Gq=v(83854),Wq=v.n(Gq);class Kq extends u.Component{refWrap;refBubbleTitle;refDialog;portal;contentRef;scrollRef;videoContainer;constructor(t){super(t),this.state={hasOverflow:!1},this.refWrap=(0,u.createRef)(),this.refBubbleTitle=(0,u.createRef)(),this.refDialog=(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=Zs()}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?this.contentRef.scrollTop=0:t.isActive&&!this.props.isActive&&this.state.hasOverflow&&this.contentRef.removeEventListener("scroll",this.scrollRef),this.props.forceNonModal&&this.props.isActive){const n=this.refDialog.current;n!=null&&!n.open&&(n.open=!0)}if(!t.isActive&&this.props.isActive){setTimeout(()=>{document.addEventListener("click",this.handleDocumentClick),document.addEventListener("keydown",this.handleDocumentKeyDown)},0),this.props.suppressFocus||this.refBubbleTitle.current?.focus?.();const n=this.props.media;this.props.onTranscriptUpdate?.({audioPlayerId:bs({refs:`items:${this.props.blockId}/items:${this.props.item?.id}`}),transcriptMedia:n})}else t.isActive&&!this.props.isActive&&(document.removeEventListener("click",this.handleDocumentClick),document.removeEventListener("keydown",this.handleDocumentKeyDown))}render(){const{accentColor:t,allowNav:n,description:o,forceNonModal:r,headingLevel:a,htmlId:i,isActive:c,isMobile:l,media:d,title:h,x:m,y:f}=this.props,p=a?`h${a}`:"h2",C=q()("bubble",{"bubble--active":c}),g=Yq({x:m,y:f}),x=Zq({hasOverflow:this.state.hasOverflow,x:m,y:f}),b={borderBottomColor:t},y=`${i}-title`,L=()=>{if(!d)return(0,s.jsx)(je,{allowTabNavigation:c,className:"bubble__description",value:o});const T=this.props.getL10nValue(d)??{},k=xs(T,this.props.audioPosition,!0,"labeled-graphic"),I={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:!c},E={audio:{media:k.audioOnlyMedia||T,isOverlayAudio:!1,index:`${this.props.blockId}-${this.props.item.id}-${this.props.index}-audio`},image:{media:k.imageOnlyMedia||T,isOverlayAudio:!1,index:`${this.props.blockId}-${this.props.item.id}-${this.props.index}-image`},video:{media:k.videoOnlyMedia||T,isOverlayAudio:!1,index:`${this.props.blockId}-${this.props.item.id}-${this.props.index}-video`},embed:{media:k.embedOnlyMedia||T,isOverlayAudio:!1,index:`${this.props.blockId}-${this.props.item.id}-${this.props.index}-embed`},overlay:{media:T,isOverlayAudio:!0,index:`${this.props.blockId}-${this.props.item.id}-${this.props.index}-overlay`}};return(0,s.jsx)(s.Fragment,{children:k.renderOrder.map((N,M)=>{if(N==="text")return(0,s.jsx)(je,{allowTabNavigation:c,className:"bubble__description",value:o},`text-${M}`);const A=E[N];return!A||N==="embed"&&!c?null:(0,s.jsx)("div",{className:"bubble__media",children:(0,s.jsx)("div",{className:"bubble__figure",children:(0,s.jsx)("div",{className:q()({"labeled-graphic-bubble-media-container--audio-bottom":N==="audio"&&this.props.audioPosition==="bottom"}),children:(0,s.jsx)(Jt,{...I,...A})})})},`${N}-${M}`)})})},S=(0,s.jsx)("div",{className:C,ref:this.refWrap,style:g,children:(0,s.jsxs)("dialog",{"aria-hidden":!c,"aria-labelledby":y,"aria-modal":l&&!r,className:x,id:i,onKeyDown:this.handleKeyDown,ref:this.refDialog,style:b,children:[(0,s.jsx)(p,{className:"bubble__title",id:y,ref:this.refBubbleTitle,tabIndex:-1,
155children:(0,s.jsx)(Sn,{value:h})}),(0,s.jsx)("button",{"aria-label":"Close modal",className:"bubble__close",onClick:this.handleCloseClick,type:"button",children:(0,s.jsx)(vH,{className:"bubble__close-icon"})}),(0,s.jsx)("div",{className:"bubble__content",ref:T=>{this.contentRef=T},children:L()}),n&&this.renderControls()]})});return l?(0,ps.createPortal)((0,s.jsx)(ey,{children:S}),this.portal):S}renderControls(){const{accentColor:t,labels:n}=this.props,o={"--color-lg-accent":t};return(0,s.jsxs)("div",{className:"bubble__controls",style:o,children:[(0,s.jsx)("button",{"aria-label":n?.a11yCarouselPrevious,className:"bubble__prev",onClick:this.handlePreviousClick,type:"button",children:(0,s.jsx)("i",{className:"icon icon-chevron-left"})}),(0,s.jsx)("button",{"aria-label":n?.a11yCarouselNext,className:"bubble__next",onClick:this.handleNextClick,type:"button",children:(0,s.jsx)("i",{className:"icon icon-chevron-right"})})]})}renderOverflowMask(){if(!this.contentRef)return;const t=this.contentRef,n=t.offsetHeight;t.scrollHeight>n?(t.addEventListener("scroll",this.scrollRef=gu()(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 n=t.composedPath();if(!(this.refWrap.current!=null&&n.includes(this.refWrap.current)||Array.from(document.querySelectorAll("dialog[open]")).some(r=>n.includes(r)))){if(this.props.forceNonModal){const r=document.querySelector(".block-search");if(r!=null&&n.includes(r))return}this.props.onClose({shouldFocusMarker:!1})}};handleDocumentKeyDown=t=>{Tn(t)&&this.props.isActive&&this.props.onClose({shouldFocusMarker:!1})};handleKeyDown(t){const{allowNav:n,onNextClick:o,onPreviousClick:r}=this.props,a=EB(this.contentRef,this.state.hasOverflow),i=Wq()(Be()(n));Cn()([[i(Mo),r],[i(Oo),o],[LB,a]])(t)}handleCloseClick=()=>{this.props.onClose()};handleNextClick(t){this.props.onNextClick(t)}handlePreviousClick(t){this.props.onPreviousClick(t)}handleScroll(){const t=this.contentRef,n=t.scrollTop,o=t.scrollHeight,r=t.offsetHeight;n>=o-r-10?this.setState({hasOverflow:!1}):this.state.hasOverflow||this.setState({hasOverflow:!0})}}function Qq(e){const t=rt(),n=$t(768);return(0,s.jsx)(Kq,{...e,getL10nValue:t,isMobile:n})}const Yq=({x:e,y:t})=>{const n={top:"initial",bottom:"initial",left:"0",right:"0"};return e>50?n.right=100-e+"%":n.left=e+"%",t>50?n.bottom=100-t+"%":n.top=t+"%",n},Zq=({hasOverflow:e,x:t,y:n})=>{const o=t<50;let r="top";return n>33&&(r=n>66?"bottom":"middle"),q()("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 Xq=v(49860);const qq=e=>new URL(e).pathname.slice(1)+new URL(e).search;class Jq extends Xq.Component{imageEl;constructor(t){super(t),this.state={style:{}}}render(){const{canvasClassNames:t,children:n,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:p,dimensions:C,key:g,src:x}=f,b=!!f.alt,y=To(p),L=XI(f),S=q()("labeled-graphic-canvas__figure",{"labeled-graphic-canvas__figure--editable":r&&!a,"labeled-graphic-canvas__figure--editing-disabled":r&&a});let T;g?T=gt(f):x&&(T=gt({key:qq(x),...f}));const k=q()("labeled-graphic-canvas__image","labeled-graphic-canvas__image--flag-dimensions",{"labeled-graphic-canvas__image--svg":Cv(T)}),I={...m,...o!=null&&{"--corner-radius":`${Number(o)}px`}},E=(0,s.jsx)(En,{alt:y,className:k,"data-l10n-id":Ot(l),height:C?.height||C?.originalHeight,onClick:d,onLoad:()=>this.setState({style:L}),ref:N=>{this.imageEl=N},src:T,style:I,width:C?.width||C?.originalWidth});return(0,s.jsx)("div",{className:t||"labeled-graphic-canvas",children:(0,s.jsx)("div",{className:"labeled-graphic-canvas__item",children:(0,s.jsx)("div",{className:"labeled-graphic-canvas__bounds",children:(0,s.jsxs)("figure",{className:S,children:[b&&r&&(0,s.jsx)(ws,{message:"Edit alt text",children:(0,s.jsx)("div",{className:"item-media__tooltip",children:(0,s.jsx)("button",{className:"labeled-graphic-canvas__alt-tag",onClick:h,type:"button",children:"ALT"})})}),c&&E,(0,s.jsx)("ol",{role:"list",children:n})]})})})})}}const eJ=it(Jq),tJ={"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"},nJ=(e,t)=>{const n=tJ[t];return n?.startsWith("a11y")?e?.[n]||"":n||""};var sJ=v(49860);const J6=_("labeled-graphic-marker");class oJ extends sJ.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=n=>{this.onItemDrag(n)}),t.addEventListener("mouseleave",this.onMouseLeave=n=>{this.onItemRelease(n)})}componentWillUnmount(){const t=this.parentCanvasElement();t.removeEventListener("mousemove",this.onMouseMove),t.removeEventListener("mouseleave",this.onMouseLeave)}UNSAFE_componentWillReceiveProps(t){const{isSelected:n,useLocalStateForCompletion:o}=t;n&&o&&!this.state.isComplete&&this.setState({isComplete:!0})}buildMarkerLabel=({icon:t,label:n,title:o,viewed:r})=>{const{labels:a}=this.props;return[].concat(n||[]).concat(o||[]).concat(t||[]).concat(r?a?.a11yLabeledGraphicViewed:a?.a11yLabeledGraphicUnviewed).join(", ")};
155render(){const{accentColor:t,ariaControls:n,hasSearchMatch:o,icon:r,isActive:a,isComplete:i,isLessonBlocksList:c,isSelected:l,isVisible:d,labels:h,markerColor:m,markerColorContrast:f,onFocus:p,styles:C,useLocalStateForCompletion:g}=this.props,x=this.props.getL10nValue(this.props.title),b=nJ(h,r),y=g?this.state.isComplete:i,L=!!m,S=$n(m),k=Ut({backgroundColor:m,contrast:f??S}),I=L?m:"#ffffff",E=L?k:t,N=this.buildMarkerLabel({icon:b,label:h&&h.a11yLabeledGraphicButtonMarker||"",title:x,viewed:y}),M=J6({active:l,dragged:this.state.isDragged,visible:d,complete:y,"search-match":o}),A={...C,"--color-lg-accent":I,"--color-lg-font":E},j=J6("pin",{selected:l,disabled:c});return(0,s.jsx)("button",{"aria-controls":n,"aria-expanded":a,"aria-label":N,className:M,onClick:this.onClick,onContextMenu:this.onItemRelease.bind(this),onFocus:p,onMouseDown:this.onItemGrab.bind(this),onMouseEnter:this.onHover.bind(this),onMouseLeave:this.onLeave.bind(this),onMouseUp:this.onItemRelease.bind(this),ref:w=>{this.marker=w},style:A,type:"button",children:(0,s.jsx)("span",{className:j,children:(0,s.jsx)("i",{className:`icon icon-Master-${r}`})})})}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:n,onClick:o,parentId:r}=this.props,a="labeledGraphicMarkerClick",i={detail:{itemId:n,parentId:r}},c=new CustomEvent(a,i);document.dispatchEvent(c),t||o()}onItemGrab(t){const{editable:n}=this.props;if(!n)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 n=t.clientX-this.state.posX,o=t.clientY-this.state.posY;this.marker.style.transform=`translate3d(${n}px, ${o}px, 0)`}}onItemRelease(t){const{editable:n}=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():n&&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 rJ=it(oJ);class aJ 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:n}=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:!n||mn()}}componentDidMount(){const{isBlock:t,isLearner:n,isPreview:o,markerDelay:r}=this.props;n&&!t&&(this.timeout=setTimeout(()=>this.setState({showMarkers:!0}),o?0:r))}componentWillUnmount(){clearTimeout(this.timeout),clearTimeout(this.entranceDoneTimeout)}render(){const{accentColor:t,animateBlockEntrance:n,blockId:o,color:r,canvasClassNames:a,disableCreateMarker:i,editable:c,getL10nValue:l,imageLoaded:d=!0,isBlock:h,isLearner:m,isLessonBlocksList:f,isPreview:p,initiallyVisible:C,items:g,labels:x,lessonId:b,media:y,onItemClear:L,onItemHint:S,onItemSelected:T,onNextClick:k,onPreviousClick:I,onShowAltDialog:E,parentId:N,progress:M,searchMatchedItemIds:A,selected:j,settings:w={},showBubbles:P,suppressBubbleFocus:R,enableVideoPlaybackSpeed:O,forceBubbleNonModal:B}=this.props,{cornerRadius:D,headingLevel:F,markerColor:V,markerColorContrast:U}=w,{showMarkers:H}=this.state,Q=V||(t||r),z=q()("map-item",{"map-item--animated":!c}),W=n?"fadeIn":"none",$=n?1:0,G=g.length>1,Z=new Set(A?.map(String)??[]);return(0,s.jsx)(u.Fragment,{children:(0,s.jsx)(He,{afterAnimatedIn:this.afterAnimatedIn,animateBlockEntrance:!p,animateIn:W,duration:p?0:$,initiallyVisible:C,isLearner:m,children:(0,s.jsx)(eJ,{canvasClassNames:a,cornerRadius:D,editable:c,editingDisabled:i,imageLoaded:d,media:y,onCreateMarker:this.createMarker,onShowAltDialog:E,ref:Y=>{this.canvas=Y},children:g.map((Y,ne)=>{const{description:ee,id:le,icon:J,media:te,title:he}=Y,_e=l(Y.x),X=l(Y.y),de={top:X+"%",left:_e+"%"},Ce=Vs()(["items",le,"isComplete"],M),pe=Yn(j,le),Ie=Z.has(String(le)),ge=`bubble-${o}-${le}`;return(0,s.jsxs)("li",{className:z,role:"listitem",children:[(0,s.jsx)(rJ,{accentColor:Q,ariaControl
155s:ge,editable:c,hasSearchMatch:Ie,icon:J,isActive:pe,isComplete:Ce,isLessonBlocksList:f,isSelected:pe,isVisible:H,itemId:le,labels:x,markerColor:V,markerColorContrast:U,onClick:()=>{T(le)},onFocus:this.onMarkerFocus(le),onHover:()=>{S()},onLeave:()=>{L()},onSetPosition:this.onSetPosition.bind(this,Y),parentId:N,ref:ce=>{this.markerRefs[le]=ce},styles:de,title:he,useLocalStateForCompletion:h},le),!c&&P&&(0,s.jsx)(Qq,{accentColor:Q,allowNav:G,audioPosition:w.audioPosition,blockId:o,description:ee,enableVideoPlaybackSpeed:O,forceNonModal:B,headingLevel:F,htmlId:ge,index:ne,isActive:pe,item:Y,labels:x,lessonId:b,media:te,mediaOpts:{disableZoom:!w.zoomOnClick},onClose:this.onBubbleClose(le),onNextClick:()=>{k(ne)},onPreviousClick:()=>{I(ne)},suppressFocus:R,title:he,x:Number(_e),y:Number(X)},ge)]},le)})})})})}createMarker(t){const{disableCreateMarker:n,editable:o,onCreateMarker:r}=this.props;if(!o||n)return;const{x:a,y:i}=this.findItemCoordinates({e:t}),c=this.props.items.length,d={description:"",hasMedia:!1,icon:"01",id:pu()(),isActive:!1,title:"",x:String(a),y:String(i)};r({index:c,payload:d})}onBubbleClose(t){const{onClose:n}=this.props;return(o={shouldFocusMarker:!0})=>{const r=this.markerRefs[t];o.shouldFocusMarker&&r?.focus?.(),n(t)}}onMarkerFocus(t){return()=>{const{onClose:n,selected:o}=this.props;o&&o!==t&&n()}}onSetPosition(t,n,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:n,offsetX:o,offsetY:r}),m={x:String(d),y:String(h)};(0,Xt.uW)(t.x)&&(0,Xt.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:n=0,offsetY:o=0}){const r=this.canvas.imageEl.getBoundingClientRect(),a=20,i=this.findItemCoordinate({clientPos:t.clientX,clientOffset:n,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:n,rectSubtractor:o,rectDivisor:r,validOffsetAmount:a}){const i=a/r*100,c=100-i;let l=(t+n-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 iJ=it(aJ);var cJ=v(49860);const lJ=e=>{e.open=!0};class dJ extends cJ.Component{static get defaultProps(){return{onItemSelected:Function.prototype,onStep:Function.prototype,getL10nValue:()=>{}}}constructor(t){super(t),this.state={forceBubbleNonModal:!1,imageLoaded:!1,searchMatchedItemIds:[],suppressBubbleFocus:!1},this.closeOpenedBubble=this.closeOpenedBubble.bind(this),this.handleMarkerClick=this.handleMarkerClick.bind(this),this.handleNavEvent=this.handleNavEvent.bind(this),this.handleRevealItem=this.handleRevealItem.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(Ke,this.handleNavEvent),window.addEventListener(Do,this.handleRevealItem)}handleNavEvent(t){const n=t.detail.path[t.detail.path.indexOf("items")+1]?.id,o=t.detail.path[t.detail.path.lastIndexOf("items")+1]?.id;n===this.props.blockId&&this.state.selectedItemId!==o&&this.onItemSelected(o)}handleRevealItem(t){const{items:n}=this.props,{blockId:o,itemId:r,matchingItemIds:a=[r]}=t.detail;if(!Yn(o,this.props.blockId))return;const i=n.find(d=>Yn(d.id,r));if(!i)return;const c=n.filter(d=>a.some(h=>Yn(d.id,h))).map(d=>d.id);c.some(d=>Yn(d,i.id))||c.push(i.id);const{selectedItemId:l}=this.state;l!=null&&!Yn(l,i.id)&&this.getBubble(l)?.close(),this.setState({forceBubbleNonModal:!0,searchMatchedItemIds:c,selectedItemId:i.id,suppressBubbleFocus:!0},()=>{const d=this.getBubble(i.id);d!=null&&!d.open&&lJ(d),this.setState({suppressBubbleFocus:!1})})}getBubble(t){return document.getElementById(`bubble-${this.props.blockId}-${t}`)}componentDidUpdate(t){const{isMobile:n}=this.props,{forceBubbleNonModal:o,selectedItemId:r}=this.state;t.isMobile===n||r==null||o||(this.getBubble(r)?.close(),this.openBubble(r))}componentWillUnmount(){this.props.readOnly||document.removeEventListener("labeledGraphicMarkerClick",this.handleMarkerClick),window.removeEventListener(Ke,this.handleNavEvent),window.removeEventListener(
155Do,this.handleRevealItem)}render(){const{forceBubbleNonModal:t,imageLoaded:n,searchMatchedItemIds:o,suppressBubbleFocus:r}=this.state,{initiallyVisible:a,isLessonBlocksList:i,isPreview:c,items:l,labels:d,parentId:h,settings:m={}}=this.props,{mediaWidth:f="2"}=m,p=c?l[0].id:this.state.selectedItemId,C=q()("view-labeled-graphic",{"view-labeled-graphic--small":f==="0","view-labeled-graphic--medium":f==="1","view-labeled-graphic--full":f==="2"});return(0,s.jsx)("div",{"aria-label":d?.a11yLabeledGraphicBlock,className:C,role:"group",children:(0,s.jsx)(iJ,{...this.props,canvasClassNames:this.getCanvasClassNames(),editable:!1,forceBubbleNonModal:t,imageLoaded:n,initiallyVisible:a,isLessonBlocksList:i,labels:d,markerDelay:1e3,onClose:this.closeOpenedBubble,onItemSelected:this.onItemSelected,onNextClick:this.onNextClick,onPreviousClick:this.onPreviousClick,parentId:h,searchMatchedItemIds:o,selected:p,suppressBubbleFocus:r})})}setImageLoaded(){this.setState({imageLoaded:!0})}loadImage(){const t=this.props.getL10nValue(this.props.media)?.image,{key:n,src:o}=t??{};if(!n&&!o)return;const r=setTimeout(this.setImageLoaded,1e3),a=new Image,i=n?gt(t):o;a.src=i,a.onload=()=>{clearTimeout(r),this.setImageLoaded()}}getCanvasClassNames(){return q()("labeled-graphic-canvas",{"labeled-graphic-canvas--visible":this.state.imageLoaded})}onNextClick(t){const{blockId:n,items:o}=this.props,r=Xe()("id",o[Ll()(t)]||o[0]);document.querySelector(`dialog#bubble-${n}-${this.state.selectedItemId}[open]`)?.close(),this.onItemSelected(r)}onPreviousClick(t){const{blockId:n,items:o}=this.props,r=Xe()("id",o[Uf()(t)]||o[Uf()(is()(o))]);document.querySelector(`dialog#bubble-${n}-${this.state.selectedItemId}[open]`)?.close(),this.onItemSelected(r)}clearSearchReveal(t){const{selectedItemId:n}=this.state;n!=null&&this.getBubble(n)?.close(),this.setState({forceBubbleNonModal:!1,searchMatchedItemIds:[],selectedItemId:void 0},t)}onItemSelected(t){const{editBlock:n,items:o,onItemSelected:r,onStep:a}=this.props,{forceBubbleNonModal:i,selectedItemId:c}=this.state;if(!(n&&window.matchMedia("(max-width: 768px)").matches)){if(i){const l=Yn(c,t);this.clearSearchReveal(()=>{l?r(t):this.onItemSelected(t)});return}c===t?this.closeOpenedBubble():(this.openBubble(t),De()(a,Tr()(l=>l.id===t))(o)),r(t)}}handleMarkerClick(t){const{itemId:n,parentId:o}=t.detail,{selectedItemId:r}=this.state;(o!==this.props.parentId||r!==n)&&this.closeOpenedBubble()}openBubble(t,{forceNonModal:n=!1}={}){const{blockId:o}=this.props;this.setState({forceBubbleNonModal:n,selectedItemId:t});const r=document.getElementById(`bubble-${o}-${t}`);!r||r.open||(!n&&this.props.isMobile&&typeof r.showModal=="function"?r.showModal():r.show())}closeOpenedBubble(t=this.state.selectedItemId){t!=null&&(this.getBubble(t)?.close(),this.setState(n=>{const o=Yn(n.selectedItemId,t);return{forceBubbleNonModal:o?!1:n.forceBubbleNonModal,searchMatchedItemIds:o?[]:n.searchMatchedItemIds,selectedItemId:o?void 0:n.selectedItemId}}))}}function uJ(e){const t=rt(),n=$t(768);return(0,s.jsx)(dJ,{...e,getL10nValue:t,isMobile:n})}const hJ=e=>{const{blockId:t,progress:n,isLessonBlocksList:o=!1}=e,r=Vs()(["items",t],n);return(0,s.jsx)(Ae,{className:"block-labeled-graphic",children:(0,s.jsx)(uJ,{...e,editable:!1,isBlock:!0,isLessonBlocksList:o,parentId:t,progress:r})})};var e5=v(49860);const Nn=_("block-list"),mJ=class extends e5.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:n,editable:o,getL10nValue:r,initiallyVisible:a,isLearner:i,items:c,labels:l,lessonId:d,media:h,onStep:m,settings:f,type:p}=this.props,{audioPosition:C,bulletPadding:g,entranceAnimation:x,listItemColor:b,listItemColorContrast:y,listWidth:L}=f,S=r(Array.isArray(h)?{}:h),T=xs(S,C),k=XX(g),I=Su(L),E=Nn({[p]:!0,[`${p}-custom-width-${I}`]:!0,[`${p}-bullet-padding-${k}`]:!0,"no-animation":!x,presentation:this.props.isPresentation}),N=p==="numbered"?"ol":"ul";
155return(0,s.jsx)(Ae,{className:E.toString(),defaultBackgroundColor:n,children:(0,s.jsx)("div",{className:Nn("container"),children:(0,s.jsx)("div",{className:Nn("row"),children:(0,s.jsx)(Tc,{className:Nn("col"),children:(0,s.jsx)("div",{className:"blocks-list__container",children:T.renderOrder.map((M,A)=>{if(M==="text")return(0,s.jsx)("div",{children:(0,s.jsx)(N,{className:Nn("list"),role:"list",children:(0,s.jsx)(He,{animateBlockEntrance:e,animateIn:"fadeInRight",className:Nn("animated-item").toString(),initiallyVisible:a,isLearner:i,siblingDelay:.25,children:c.map((j,w)=>{const P={key:j.id,index:w,lessonId:d,blockId:t,type:p,editable:o,nextNumber:this.nextNumber.bind(this),onStep:m,listItemColor:b,listItemColorContrast:y,...j};return this.props.renderItem?this.props.renderItem(P):(0,u.createElement)(fJ,{...P,key:P.key})})})})},`text-${A}`);if(M==="audio")return(0,s.jsx)("div",{className:q()("block-list__media",{"audio-on-top":T.renderOrder[0]==="audio","audio-on-bottom":T.renderOrder[0]!=="audio"}),children:(0,s.jsx)(Jt,{blockId:t,hasPadding:!1,index:t,item:{media:h,id:t},labels:l,lessonId:d,media:h,refs:`items:${t}`})},`${M}-${A}`)})})})})})})}};class fJ extends e5.Component{renderTextDelegate;animateRef=null;static get defaultProps(){return{className:""}}constructor(t){super(t),this.renderTextDelegate=this.renderText.bind(this)}renderText(t){return(0,s.jsx)(Qe,{...t})}handleChangeCheckbox=()=>{this.props.onStep(this.props)};render(){const{type:t,id:n,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:n,value:a};return(0,s.jsxs)("li",{className:q()("block-list__item",`block-list__item--${t}`,c),ref:p=>{this.animateRef=p},role:"listitem",style:d,children:[t==="numbered"&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("div",{className:Nn("number"),style:h?{backgroundColor:h,color:Ut({contrast:m||Le.AUTO,backgroundColor:h})}:void 0,children:r||o+1}),l(f)]}),t==="bulleted"&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("span",{className:"visually-hidden-always",children:"\u2022"}),(0,s.jsx)(ae,{className:Nn("bullet"),name:"circle-solid",style:h?{color:h}:void 0}),l(f)]}),t==="icon"&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("div",{className:Nn("icon"),style:h?{"--color-background":h}:void 0,children:(0,s.jsx)("span",{"aria-hidden":"true",className:Nn("icon-glyph",{placeholder:!0}),children:"\u2B50\uFE0F"})}),l(f)]}),t==="checkboxes"&&(0,s.jsxs)("label",{className:Nn("option"),children:[(0,s.jsx)("input",{className:Nn("checkbox-input"),onChange:this.handleChangeCheckbox,type:"checkbox"}),(0,s.jsx)("div",{className:Nn("checkbox"),style:h?{borderColor:h,"--color-background":h}:void 0,children:(0,s.jsx)(ae,{className:Nn("checkbox__icon"),name:"check",style:h?{color:Ut({contrast:m||Le.AUTO,backgroundColor:h})}:void 0})}),l(f)]})]})}}const Nu=e=>{const t=rt(),n=rs();return(0,s.jsx)(mJ,{...e,getL10nValue:t,isPresentation:n})},pJ=Nu,gJ=e=>(0,s.jsx)(Nu,{type:"checkboxes",...e}),vJ=e=>(0,s.jsx)(Nu,{type:"bulleted",...e}),CJ=e=>(0,s.jsx)(Nu,{type:"icon",...e}),bJ=[{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"}
155,{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"}],xJ=(0,u.lazy)(()=>v.e("webpack_container_remote_mondrian_learn-react").then(v.t.bind(v,4246,23))),yJ={subscribe(e,t){const n=`mondrian:${e}`,o=()=>{Se.isPlaying&&Se.playerId!==n&&t()};return Se.addChangeListener(o),()=>{Se.removeChangeListener(o)}},play(e){const t=`mondrian:${e}`;Se.playerId=t,Se.isPlaying=!0}};function SJ(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 TJ({blockumentId:e,manifest:t}){let n=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"&&(n=c,o=l)}}}}catch{}return(0,s.jsx)("svg",{"aria-hidden":"true",className:"block-mondrian__fallback",height:o,width:n})}function LJ({animateBlockEntrance:e=!0,initiallyVisible:t,blockumentId:n,isLearner:o=!1,settings:r,onStep:a,onTranscriptClose:i,onTranscriptOpen:c,onTranscriptUpdate:l,labels:d,transcriptPanelState:h}){const m=$e(),f=m.mondrian,p=wh(),C={externalLinksDisabled:"externalLinksDisabled"in m?m.externalLinksDisabled:!1,isExternalLink:Gn},{currentLocale:g}=tt(),x=Mn(),b=UD(),y=(0,u.useMemo)(()=>({active:g,source:x}),[g,x]),L=(0,u.useCallback)(N=>h?.audioPlayerIdOpen===bs({refs:`items:${n}/items:${N}`}),[n,h?.audioPlayerIdOpen]),S=(0,u.useCallback)(({refocusTarget:N,itemId:M,transcript:A})=>{L(M)?i?.():c?.({audioPlayerId:bs({refs:`items:${n}/items:${M}`}),focusing:!0,refocusTarget:N,transcriptMedia:{mondrianTranscript:A}})},[n,L,i,c]),T=(0,u.useCallback)(({itemId:N,transcript:M})=>{h?.audioPlayerIdOpen&&l?.({audioPlayerId:bs({refs:`items:${n}/items:${N}`}),transcriptMedia:{mondrianTranscript:M}})},[n,l,h]),k=(0,u.useCallback)(N=>{l?.({audioPlayerId:bs({refs:`items:${n}/items:${N}`}),focusing:!0})},[n,l]),I=(0,u.useMemo)(()=>({isPanelOpenForItem:L,focusPanel:k,togglePanel:S,updateTranscript:T}),[k,L,S,T]),E=(0,u.useCallback)(N=>{if(a)for(const M of Object.values(N))M.progress>=100&&a({id:M.itemId})},[a]);return(0,s.jsx)(Ae,{children:(0,s.jsx)(oy,{FallbackComponent:EJ,children:(0,s.jsx)(He,{animateBlockEntrance:e,initiallyVisible:t,isLearner:o,children:(0,s.jsx)("div",{style:SJ(r),children:(0,s.jsx)(u.Suspense,{fallback:(0,s.jsx)(TJ,{blockumentId:n,manifest:f}),children:(0,s.jsx)(xJ,{blockumentId:n,hoveredItemPath:b.translationHoveredPath,labels:d,languages:bJ,linkRenderConfig:C,locale:y,manifest:f,mediaStoreAdapter:yJ,onMediaProgress:E,runtimeInterface:window.Runtime,searchTerm:p?.term,transcriptPanelAdapter:I})})})})})})}const kJ=(0,u.memo)(LJ,IJ);function IJ(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 EJ(){return null}const t5=["B","KB","MB","GB","TB","PB","EB"];function NJ(e){if(!Number.isFinite(e))return String(e);let t=Math.abs(e),n=0;for(;t>=1024&&n<t5.length-1;)t/=1024,n+=1;const o=Math.round(t*10)/10,r=Number.isInteger(o)?String(o):o.toFixed(1);return`${e<0?"-":""}${r} ${t5[n]}`}const ju=_("block-video");function jJ({item:e}){const t=rt(),{media:n}=e,o=t(n)??{},{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}=di()?c:l||c,h=d?mt(d):void 0;return(0,s.jsxs)("div",{className:ju("poster-container"),children:[(0,s.jsx)(En,{alt:"Video Poster",className:ju("poster"),src:h}),(0,s.jsx)("div",{className:ju("play-overlay"),children:(0,s.jsxs)("svg",{className:ju("play-icon"),fill:"currentColor",height:"80",viewBox:"0 0 24 24",width:"80",children:[(0,s.jsx)("circle",{cx:"12",cy:"12",fill:"rgba(0,0,0,0.6)",r:"12"}),(0,s.jsx)("polygon",{fill:"white",points:"10,8 10,16 16,12"})]})})]})}const n5=_("block-video");function wJ({mediaWidth:e}){const t=n5("item",{small:e==="0",medium:e==="1",full:e==="2"});return(0,s.jsx)("div",{className:t,children:(0,s.jsx)("div",{className:n5("placeholder")})})}const AJ=ns()("partner-content-block-card__"),s5=e=>{const{backgroundColor:t,blockId:n,partnerContent:o}=e,r=$e(),{id:a,tenantId:i}=r??{},{data:c,type:l}=o,{authors:d,bookImage:h,bookTitle:m,buyLink:f,internalId:p,nbicLink:C}=c,g={blockId:n,courseId:a,partnerContentId:p,tenantId:i,contentSubtype:l};return(0,s.jsxs)("section",{children:[(0,s.jsx)("h2",{className:"visually-hidden",children:"More Info"}),(0,s.jsxs)("ol",{className:"partner-content-block-card",role:"list",children:[(0,s.jsx)("li",{role:"listitem",children:(0,s.jsx)(lx,{authors:d,backgroundColor:t,block:!0,bookImage:h,bookTitle:m,buyLink:f,trackingInfo:g})}),(0,s.jsx)("li",{role:"listitem",children:(0,s.jsx)("div",{className:AJ("divider")})}),(0,s.jsx)("li",{role:"listitem",children:(0,s.jsx)(dx,{backgroundColor:t,block:!0,link:C,trackingInfo:g})})]})]})};var Ip=v(49860);const wu=_("block-video"),RJ={"--ov-width":"100%","--ov-max-height":"none"},PJ={"--ov-height":"100%","--ov-max-height":"none"};function MJ({audioVideoPlayhead:e,backgroundColor:t,blockId:n,blockPartnerContent:o,blockPartnerContentExists:r,captions:a,cornerRadius:i,currentLocale:c,dataL10nId:l,disableDownload:d,enableVideoPlaybackSpeed:h,forwardSeekRestricted:m,id:f,isLoaded:p,item:C,lessonId:g,loadMedia:x,media:b,mediaWidth:y,onLoad:L,onProgressChanged:S,poster:T,recordMediaPlayheadPosition:k,renderCaption:I,renderPostVideoSlot:E,subtitle:N,t
155ype:M,videoKey:A,videoSrc:j}){const w=y==="2",[P,R]=Ip.useState(null),O=wu("item",{small:y==="0",medium:y==="1",full:w}),B=Ip.useCallback(({player:V})=>{const U=V.containerElement?.querySelector("video");if(U){const H=U.videoWidth/U.videoHeight>=1.7777777777777777;R(H?"landscape":"portrait")}L?.({player:V})},[L]),D=P==="landscape"?RJ:P==="portrait"?PJ:void 0,F=Ip.useCallback(V=>{const U=wu("caption",{visible:p}).toString();return(0,s.jsx)(Qe,{className:U,value:V.caption})},[p]);return(0,s.jsxs)("div",{className:O,children:[(0,s.jsxs)("figure",{"data-l10n-id":l,children:[(0,s.jsx)("div",{className:wu("aspect-container"),"data-search-content-ignore":"",children:x&&(0,s.jsx)(cp,{audioVideoPlayhead:e,canAdjustPlaybackSpeed:h,canRestrictSeek:m,captions:a,cornerRadius:i,disableDownload:d,id:`${g}-${n}-${f}-${c}`,media:b,onLoad:B,poster:T,progressChanged:S,recordMediaPlayheadPosition:k,src:j,style:D,subtitle:N,type:A?"video":M},`${g}-${n}-${f}-${c}-${T||""}`)}),p&&(0,s.jsxs)(s.Fragment,{children:[E?.(),(0,s.jsx)("figcaption",{className:wu("wrapper"),children:(I??F)(C)})]})]}),r&&(0,s.jsx)(s5,{backgroundColor:t,blockId:n,partnerContent:o})]})}const so=_("vt-chapter-strip");function OJ(e,t){for(let n=e.length-1;n>=0;n--)if(t>=e[n].time)return n;return-1}function BJ({chapters:e,currentTime:t,onSeek:n}){const o=Nt(),r=(0,u.useRef)(null),a=OJ(e,t);return(0,u.useEffect)(()=>{r.current?.scrollIntoView({behavior:"smooth",block:"nearest",inline:"center"})},[a]),e.length===0?null:(0,s.jsxs)("div",{className:so(),children:[(0,s.jsx)("h2",{className:so("heading"),children:o?.videoChapters||"Chapters"}),(0,s.jsx)("ul",{className:so("list"),role:"list",children:e.map((i,c)=>{const l=c===a;return(0,s.jsx)("li",{className:so("item"),children:(0,s.jsxs)("button",{"aria-current":l?"true":void 0,className:so("button",{active:l}),onClick:()=>n?.(i.time),ref:l?r:void 0,type:"button",children:[(0,s.jsx)("span",{className:so("thumbwrap"),children:(i.thumbnailStatus==null||i.thumbnailStatus==="done")&&i.thumbnail&&(0,s.jsx)("img",{alt:"",className:so("thumb"),src:i.thumbnail})}),(0,s.jsx)("span",{className:so("time"),children:uu(i.time)}),(0,s.jsx)("span",{className:so("title"),children:i.title})]})},`${i.time}-${c}`)})})]})}const DJ={allowedTags:["b","i","u","c","ruby","rt","v","lang"],allowedAttributes:{c:["class"],v:["title"],lang:["lang"],ruby:[],rt:[]},disallowedTagsMode:"escape",allowedSchemes:[]};function FJ(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 HJ(e){return e.replace(/<!--SCRIPT_START-->(.*?)<!--SCRIPT_END-->/g,"$1").replace(/<!--IFRAME_START-->(.*?)<!--IFRAME_END-->/g,"$1").replace(/"/g,'"').replace(/'/g,"'").replace(/&/g,"&")}function jn(e,t={}){if(!e)return"";let n;if(t.allowVTTTags!==!1){const o=FJ(e),r=m0()(o,DJ);n=HJ(r)}else n=m0()(e,{allowedTags:[],allowedAttributes:{}});return t.preserveWhitespace||(n=n.replace(/\s+/g," ").trim()),n}function Ic(){return typeof window<"u"?window.crypto.randomUUID():`cue_${Date.now()}_${Math.random().toString(36).substring(2,9)}`}function $J(e){return e.map(t=>({...t,stableId:t.stableId||Ic()}))}function zo(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 o5(e){let t=e.match(/^(\d{2}):(\d{2}):(\d{2})\.(\d{3})$/);if(t){const[,n,o,r,a]=t;return parseInt(n)*36e5+parseInt(o)*6e4+parseInt(r)*1e3+parseInt(a)}if(t=e.match(/^(\d{2}):(\d{2})\.(\d{3})$/),t){const[,n,o,r]=t;return parseInt(n)*6e4+parseInt(o)*1e3+parseInt(r)}throw new Error(`Invalid timestamp format: ${e}`)}function _J(e,t=!1){const n=Math.round(e),o=Math.floor(n/36e5),r=Math.floor(n%36e5/6e4),a=Math.floor(n%6e4/1e3),i=n%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 r5(e){const t={};if(!e)return t;const n=e.match(/\S+/g)||[];for(const o of n){const r=o.indexOf(":");if(r>0){const a=jn(o.substring(0,r),{allowVTTTags:!1}),i=jn(o.substring(r+1),{allowVTTTags:!1});t[a]=i}}return t}function VJ(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:jn(c,{allowVTTTags:!1}),text:l}}}const n=e.match(/^<v>\s*(.*)$/s);if(n)return{text:n[1]};const o=e.match(/^\[([^\]]+)\]:\s*(.*)$/s);if(o)return{speaker:jn(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:jn(a,{allowVTTTags:!1}),text:r[2]}}return{text:e}}function Ep(e){return jn(e,{preserveWhitespace:!1,allowVTTTags:!0})}function zJ(e){const t=jn(e.substring(6).trim(),{allowVTTTags:!1}),n=r5(t);return{id:n.id,width:n.width,lines:n.lines,regionanchor:n.regionanchor,viewportanchor:n.viewportanchor,scroll:n.scroll,...n}}function UJ(e){const t=[...new Set(e.map(n=>
155n.speaker).filter(Boolean))];return{cueCount:e.length,speakerCount:t.length,speakers:t,lastModified:new Date}}function*GJ(e){const t=e.cues,n=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,n-r.endTimeMs),d=n>0?r.startTimeMs/n*100:0,h=n>0?r.endTimeMs/n*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 M1e(e){return Array.from(GJ(e))}function WJ(e,t,n,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,y={stableId:Ic(),startTime:t,endTime:n,startTimeMs:o,endTimeMs:r,duration:a,text:Ep(b.trim()),settings:i,index:0,speaker:jn(x.trim(),{allowVTTTags:!1})};c&&(y.id=c),i.position&&(y.position=i.position),i.align&&(y.align=i.align),i.line&&(y.line=i.line),i.size&&(y.size=i.size),i.vertical&&(y.vertical=i.vertical),i.region&&(y.region=i.region),l.push(y),m=h.index+g.length}const f=/<v\s+([^>]+)>([^<]*)$/,C=e.substring(m).match(f);if(C){const[,g,x]=C,b={stableId:Ic(),startTime:t,endTime:n,startTimeMs:o,endTimeMs:r,duration:a,text:Ep(x.trim()),settings:i,index:0,speaker:jn(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 KJ(e,t){let n=t,o;!zo(e[n])&&zo(e[n+1])&&(o=jn(e[n],{allowVTTTags:!1}),n++);const r=e[n];if(!zo(r))return{cues:[],nextIndex:n+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:n+1};const[,i,c,l]=a,d=r5(l.trim());n++;const h=[];for(;n<e.length&&e[n]!==""&&!zo(e[n]);)h.push(e[n]),n++;const m=o5(i),f=o5(c),p=f-m,C=[];if(h.length===0){const g={stableId:Ic(),startTime:i,endTime:c,startTimeMs:m,endTimeMs:f,duration:p,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=WJ(g,i,c,m,f,p,d,o);C.push(...x)}else{const x=h.join(` 156`),{text:b,speaker:y}=VJ(x),L={stableId:Ic(),startTime:i,endTime:c,startTimeMs:m,endTimeMs:f,duration:p,text:Ep(b),settings:d,index:0};o&&(L.id=o),y&&(L.speaker=y),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:n}}function QJ(e){const t=e.split(` 157`).map(a=>a.trim()),n=t.find(a=>a.length>0);if(!n||!n.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=jn(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=[jn(a.substring(4).trim(),{preserveWhitespace:!0,allowVTTTags:!1})];for(r++;r<t.length&&t[r]!==""&&!zo(t[r]);)i.push(jn(t[r],{preserveWhitespace:!0,allowVTTTags:!1})),r++;o.notes?.push(i.join(` 158`));continue}if(a.startsWith("STYLE")){const i=[];for(r++;r<t.length&&t[r]!==""&&!zo(t[r]);)i.push(jn(t[r],{preserveWhitespace:!0,allowVTTTags:!1})),r++;o.styles?.push(i.join(` 159`));continue}if(a.startsWith("REGION")){const i=zJ(a);o.regions?.push(i),r++;continue}if(zo(a)||zo(t[r+1])){const i=KJ(t,r);i.cues&&i.cues.length>0&&o.cues.push(...i.cues),r=i.nextIndex;continue}r++}return o.cues=$J(o.cues),o.cues.sort((a,i)=>
159a.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=UJ(o.cues),o}function O1e(e){let t="";if(e.header?t+=e.header.trim()+` 160`:t+=`WEBVTT 161`,t+=` 162`,e.notes&&e.notes.length>0)for(const n of e.notes)t+="NOTE",n&&n.length>0&&(t+=" "+n),t+=` 163 164`;if(e.styles&&e.styles.length>0)for(const n of e.styles)t+=`STYLE 165`,t+=n.trim()+` 166 167`;if(e.regions&&e.regions.length>0)for(const n of e.regions){t+="REGION";const o=[];for(const r in n)n[r]!==void 0&&n[r]!==null&&r!=="settings"&&o.push(`${r}:${n[r]}`);o.length>0&&(t+=" "+o.join(" ")),t+=` 168 169`}for(const n of e.cues){n.id&&(t+=n.id+` 170`),t+=`${n.startTime} --> ${n.endTime}`;const o=[];if(n.position&&o.push(`position:${n.position}`),n.align&&o.push(`align:${n.align}`),n.line&&o.push(`line:${n.line}`),n.size&&o.push(`size:${n.size}`),n.vertical&&o.push(`vertical:${n.vertical}`),n.region&&o.push(`region:${n.region}`),n.settings)for(const a in n.settings)n.settings[a]!==void 0&&n.settings[a]!==null&&!o.some(i=>i.startsWith(a+":"))&&o.push(`${a}:${n.settings[a]}`);o.length>0&&(t+=" "+o.join(" ")),t+=` 171`;let r=n.text||"";n.speaker&&(r=`[${n.speaker}]: ${r}`),t+=r+` 172 173`}return t.replace(/\s+$/,"")+` 174`}const Ec=_("video-transcript-panel"),YJ=({cue:e,isCurrent:t,onSeek:n,forwardSeekRestricted:o,maxTimeReached:r})=>{const a=(0,u.useCallback)(()=>{const c=e.startTimeMs/1e3;o&&c>r||n?.(c)},[e,n,o,r]),i=(0,u.useMemo)(()=>o&&e.startTimeMs/1e3>r,[o,e.startTimeMs,r]);return(0,s.jsxs)("button",{"aria-current":t?"true":void 0,"aria-disabled":i,className:Ec("line",{current:t,disabled:i}),onClick:i?void 0:a,tabIndex:i?-1:0,type:"button",children:[(0,s.jsx)("span",{className:Ec("timestamp"),children:_J(e.startTimeMs,!0)}),(0,s.jsx)("span",{className:Ec("text"),children:e.text})]})},ZJ=({captions:e,currentTime:t=0,forwardSeekRestricted:n=!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?mt(h.key):null);if(!m)return;const f=await fetch(m,{signal:l.signal});if(!f.ok)return;const p=await f.text(),g=QJ(p).cues.reduce((x,b)=>{const y=x[x.length-1];return y!=null&&Math.floor(y.startTimeMs/1e3)===Math.floor(b.startTimeMs/1e3)?(x[x.length-1]={...y,text:`${y.text} ${b.text}`,endTime:b.endTime,endTimeMs:b.endTimeMs,duration:b.endTimeMs-y.startTimeMs},x):(x.push(b),x)},[]);i(g)}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,s.jsx)("div",{className:Ec(),children:(0,s.jsx)("div",{className:Ec("lines"),children:a.map((l,d)=>(0,s.jsx)(YJ,{cue:l,forwardSeekRestricted:n,isCurrent:d===c,maxTimeReached:o,onSeek:r},l.stableId))})})},ye={mode:"view"},xt={mode:"step"},Np={mode:"step",completesFirstItemOnView:!0},XJ={mode:"step-if",when:({items:e})=>Array.isArray(e)&&e.length>0},jp={mode:"step-if",when:({settings:e})=>typeof e=="object"&&e!==null&&"hasCustomCompletion"in e&&e.hasCustomCompletion===!0},qJ={...{"text/paragraph":ye,"text/table":ye,"text/heading paragraph":ye,"text/subheading paragraph":ye,"text/heading":ye,"text/subheading":ye,"text/two column":ye,"text/three column":ye,"text/four column":ye,"text/code":ye,"impact/a":ye,"impact/b":ye,"impact/c":ye,"impact/d":ye,"impact/note":ye,"quote/a":ye,"quote/b":ye,"quote/c":ye,"quote/d":ye,"quote/background":ye,"quote/carousel":Np,"quote/stacked":ye,"list/numbered":ye,"list/checkboxes":xt,"list/bulleted":ye,"list/icon":ye,"image/hero":ye,"image/full":ye,"image/text aside":ye,"image/text overlay":ye,"image/banner":ye,"gallery/centered":Np,"gallery/two column":ye,"gallery/three column":ye,"gallery/four column":ye,"divider/divider":ye,"divider/numbered divider":ye,"divider/spacing divider":ye,"360/storyline":xt,"interactive/accordion":xt,"interactive/tabs":Np,"interactive-fullscreen/labeledgraphic":xt,"interactive-fullscreen/process":xt,"interactive-fullscreen/scenario":xt,"interactive-fullscreen/sorting":xt,"interactive-fullscreen/timeline":ye,"buttons/button":ye,"buttons/button stack":ye,"flashcard/flashcard":xt,"flashcard/stack":xt,"knowledge/knowledge":xt,"continue/continue":xt,"multimedia/step":ye,"multimedia/audio":xt,"multimedia/video":xt,"multimedia/ai_avatar":ye,"multimedia/custom video":xt,"multimedia/embed":ye,"multimedia/attachment":ye,"multimedia/code":ye,"knowledgeCheck/multiple choice":xt,"knowledgeCheck/multiple response":xt,"knowledgeCheck/fillin":xt,"knowledgeCheck/matching":xt,"knowledgeCheck/draw from question bank":xt,"chart/bar":ye,"chart/line":ye,"chart/pie":ye,"ai-scenario/ai-scenario":ye,"mondrian/mondrian":XJ,"survey/survey":xt,"team/people":ye,"sequence/arrows":ye,"sequence/pyrami
174d":ye,"sequence/timeline":ye,"html/inline":jp,"html/cdn":jp,"videoCheckpoint/videoCheckpoint":xt,"textToVideo/textToVideo":ye,"pending/pending":ye,"spacer/spacer":ye},...{"html/vibe":jp,"gallery/full":ye}};function a5(e){const t=qJ[J3(e.family,e.variant??"")]??ye;return{completesFirstItemOnView:t.mode!=="view"&&t.completesFirstItemOnView===!0,trackSteps:t.mode==="step"||t.mode==="step-if"&&t.when(e)}}const JJ=e=>a5(e).trackSteps,eee=e=>!!e&&e.type==="videoCheckpoint"&&e.family==="videoCheckpoint"&&e.variant==="videoCheckpoint",wp=1e3,tee=3,nee=/^\d+(?:\.\d+)?$/,i5=/^\d+$/,see=/^\d{2}(?:\.\d{1,3})?$/,Au=e=>{if(!Number.isFinite(e))return 0;const t=10**tee;return Math.max(0,Math.round(e*t)/t)},Ap=e=>e.toString().padStart(2,"0"),oee=e=>e!=null&&typeof e=="object"?e.time:void 0,F1e=e=>{const t=Math.round(Au(e)*wp),n=Math.floor(t/36e5),o=Math.floor(t%36e5/6e4),r=Math.floor(t%6e4/1e3),a=t%wp,i=a===0?"":`.${a.toString().padStart(3,"0")}`;return n>0?`${n}:${Ap(o)}:${Ap(r)}${i}`:`${Math.floor(t/6e4)}:${Ap(r)}${i}`},ree=e=>{const t=e.split(":");if(t.length!==2&&t.length!==3)return null;const[n,o,r]=t.length===3?[t[0],t[1],t[2]]:[null,t[0],t[1]];if(n!=null&&!i5.test(n)||!i5.test(o)||!see.test(r))return null;const a=n==null?0:Number.parseInt(n,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)/wp;return Au(a*3600+i*60+d+h)},H1e=e=>{const t=e.trim();return t.length===0?null:nee.test(t)?Au(Number.parseFloat(t)):ree(t)},oo=e=>{const t=e!=null&&"checkpoint"in e?e.checkpoint:e;if(t==null||typeof t!="object")return"timestamp";const n=Reflect.get(t,"settings");if(n==null||typeof n!="object")return"timestamp";const o=Reflect.get(n,"placement");return o==="start"||o==="end"?o:"timestamp"},$1e=e=>oo(e)!=="timestamp",aee=e=>{const t=e!=null&&"checkpoint"in e?e.checkpoint:e;if(t==null||typeof t!="object")return!1;const n=Reflect.get(t,"settings");return n==null||typeof n!="object"?!1:Reflect.get(n,"required")===!0},_1e=e=>e==="timestamp"?{}:{placement:e},ro=e=>{let t;e!=null&&"checkpoint"in e?t=oee(e.checkpoint):e!=null&&"time"in e&&(t=e.time);const n=typeof t=="number"?t:Number.parseFloat(String(t));return Au(n)},iee=null,cee=e=>{const t=e?.blocks??[];return aee(e)?t.filter(JJ):t.filter(Ni)},V1e=e=>e.family==="interactive-fullscreen"||e.family==="360"?!1:!(e.family==="multimedia"&&iee.has(e.variant)),Qa=(e,t,n)=>{if(e==null||typeof e!="object")return n;const o=Reflect.get(e,t);return typeof o=="string"&&o.trim().length>0?o:n},lee=(e,t)=>{if(typeof e=="string"){const n=e.trim();if(n.length>0)return n}return t},dee=e=>{const t=e.filter(o=>oo(o)==="timestamp").map((o,r)=>
174({id:o.checkpoint.id,time:ro(o),documentIndex:r})).sort((o,r)=>o.time-r.time||o.documentIndex-r.documentIndex),n=new Map;return t.forEach((o,r)=>{n.set(o.id,r+1)}),n},uee=e=>[...new Set(e.filter(t=>oo(t)==="timestamp").map(t=>ro(t)))].sort((t,n)=>t-n),z1e=(e,t)=>{const n=[...e].sort((o,r)=>ro(o)-ro(r)).find(o=>ro(o)>t);return{insertBeforeItemId:n?.checkpoint.id??null,insertAtEnd:n==null}},hee=e=>{const t=e[0]??null,n=t==null?e:e.slice(1),o=[],r=[];let a=null;n.forEach(c=>{if(eee(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=_("vt-learner-transcript");function mee({captions:e,currentTime:t,forwardSeekRestricted:n,maxTimeReached:o,onClose:r,onSeek:a}){const i=Nt(),c=(0,u.useRef)(null),l=(0,u.useRef)(null);return(0,u.useEffect)(()=>{const d=c.current?.querySelector('[aria-current="true"]');d!=null&&d!==l.current&&(l.current=d,d.scrollIntoView({behavior:"smooth",block:"center"}))},[t]),(0,s.jsxs)("aside",{className:Nc(),children:[(0,s.jsxs)("div",{className:Nc("head"),children:[(0,s.jsx)("h3",{className:Nc("title"),children:i?.videoTranscript||"Transcript"}),(0,s.jsx)("button",{"aria-label":Qa(i,"videoHideTranscript","Hide transcript"),className:Nc("close"),onClick:r,type:"button",children:(0,s.jsx)(ae,{name:"xmark"})})]}),(0,s.jsx)("div",{className:Nc("scroll"),ref:c,children:(0,s.jsx)(ZJ,{captions:e,currentTime:t,forwardSeekRestricted:n,maxTimeReached:o,onSeek:a})})]})}const c5=(0,u.createContext)(null),fee=c5.Provider;function pee(){return(0,u.useContext)(c5)}var gee,l5,d5,vee;function U1e(){let e=null;const t=new Set;return{registerPlayer(n){e=n},onTimeUpdate(){t.forEach(n=>{n()})},getPosition(){return e?.getProgress().currentTime??0},getDuration(){return e?.getProgress().duration??0},subscribe(n){return t.add(n),()=>{t.delete(n)}},seekToTime(n){e?.seekToTime(n)}}}const Cee=Object.freeze({registerPlayer(){},onTimeUpdate(){},getPosition:()=>0,getDuration:()=>0,subscribe:()=>()=>{},seekToTime(){}}),u5=(0,u.createContext)(Cee),bee=u5.Provider;function Ru(){return(0,u.useContext)(u5)}function G1e(){const e=Ru(),t=l5(e);return t.current=e,d5(()=>()=>t.current.getPosition(),[])}function W1e(e){const t=Ru();return vee(t.subscribe,()=>e(t.getPosition()),()=>e(0))}function K1e(){const e=Ru(),t=l5(e);return t.current=e,d5(()=>n=>t.current.seekToTime(n),[])}function Q1e({store:e,children:t}){return gee(bee,{value:e,children:t})}var xee,yee;const Pu=[];function Y1e(){let e=Pu;const t=new Set;return{setChapters(n){n!==e&&(e=n,t.forEach(o=>{o()}))},getChapters(){return e},subscribe(n){return t.add(n),()=>{t.delete(n)}}}}const See=Object.freeze({setChapters(){},getChapters:()=>Pu,subscribe:()=>()=>{}}),h5=(0,u.createContext)(See),Tee=h5.Provider;function m5(){return(0,u.useContext)(h5)}function Z1e(){const e=m5();return yee(e.subscribe,e.getChapters,()=>Pu)}function X1e({store:e,children:t}){return xee(Tee,{value:e,children:t})}const ao=_("block-video"),Lee={"--ov-width":"100%","--ov-max-height":"none"},kee={"--ov-height":"100%","--ov-max-height":"none"};function Iee({audioVideoPlayhead:e,backgroundColor:t,blockId:n,blockPartnerContent:o,blockPartnerContentExists:r,captions:a,chapters:i,cornerRadius:c,currentLocale:l,dataL10nId:d,disableDownload:h,enableVideoPlaybackSpeed:m,forwardSeekRestricted:f,id:p,isLearner:C,isLoaded:g,item:x,lessonId:b,loadMedia:y,media:L,mediaWidth:S,onLoad:T,onProgressChanged:k,poster:I,recordMediaPlayheadPosition:E,renderCaption:N,renderPostVideoSlot:M,showChapters:A,subtitle:j,transcriptEnabled:w,type:P,videoKey:R,videoSrc:O,shouldPause:B}){const D=pee(),F=Ru(),V=m5(),[U,H]=(0,u.useState)(0),[K,Q]=(0,u.useState)(0),[z,W]=(0,u.useState)(!1),[$,G]=(0,u.useState)(null),Z=(0,u.useRef)(null),Y=Nt(),ne=(0,u.useCallback)(ce=>{H(ce.currentTime),Q(Re=>Math.max(Re,ce.currentTime)),F.onTimeUpdate(ce.currentTime),k?.(ce)},[k,F]),ee=(0,u.useCallback)(ce=>{const Re=ao("caption",{visible:g});return(0,s.jsx)(Qe,{className:Re,value:ce.caption})},[g]),le=(0,u.useCallback)(({player:ce})=>{const Re=ce.containerElement?.querySelector("video");if(Re){const en=Re.videoWidth/Re.videoHeight>=1.7777777777777777;G(en?"landscape":"portrait")}T?.({player:ce})},[T]),J=$==="landscape"?Lee:$==="portrait"?kee:void 0,te=(0,u.useCallback)(ce=>{Z.current?.seekToTime(ce)},[Z]),he=D?.setVideoPlayerRef,_e=(0,u.useCallback)(ce=>{Z.current=ce,he?.(ce),F.registerPlayer(ce)},[he,F]),X=C&&A&&i!=null&&i.length>0,de=C&&w&&a!=null&&a.length>0;(0,u.useEffect)(()=>{V.setChapters(i??Pu)},[V,i]);const Ce=ao("item",{small:S==="0",medium:S==="1",full:S==="2","video-training":!0,"no-side-panel":!0}),pe=D?.wrapVideo,Ie=y?(0,s.jsx)(cp,{audioVideoPlayhead:e,canAdjustPlaybackSpeed:m,canRestrictSeek:f,captions:a,chapters:i,checkpointTimesSeconds:D?.checkpointMarkerTimes,cornerRadius:c,disableDownload:h,id:`${b}-${n}-${p}-${l}`,media:L,onCheckpointReached:D?.onCheckpointReached,onLoad:le,poster:I,progressChanged:ne,recordMediaPlayheadPosition:E,ref:_e,shouldPause:B,src:O,style:J,subtitle:j,type:R?"video":P},`${b}-${n}-${p}-${l}-${I||""}`):null;return(0,s.jsxs)("div",{className:Ce,children:[(0,s.jsxs)("div",{className:ao("vt-layout",{"transcript-open":de&&z}),children:[(0,s.jsxs)("div",{className:ao("vt-main"),children:[(0,s.jsxs)("figure",{"data-l10n-id":d,children:[(0,s.jsx)("div",{className:ao("figure-container"),children:pe?pe(Ie):Ie}),g&&(0,s.jsxs)(s.Fragment,{children:[M?.(),(0,s.jsx)("figcaption",{className:ao("wrapper"),children:(N??ee)(x)})]})]}),de&&!z&&(0,s.jsx)("div",{className:ao("vt-transcript-bar"),children:(0,s.jsxs)("button",{className:ao("vt-show-transcript"),onClick:()=>W(!0),type:"button",children:[(0,s.jsx)(ae,{name:"closed-captioning"}),Y?.videoViewTranscript||"Show transcript"]})}),X&&(0,s.jsx)(BJ,{chapters:i??[],currentTime:U,onSeek:te})]}
174),de&&z&&(0,s.jsx)("div",{"aria-hidden":!0,className:ao("vt-transcript-spacer")})]}),de&&z&&(0,s.jsx)(mee,{captions:a,currentTime:U,forwardSeekRestricted:f||!1,maxTimeReached:K,onClose:()=>W(!1),onSeek:te}),r&&(0,s.jsx)(s5,{backgroundColor:t,blockId:n,partnerContent:o})]})}var Rp=v(49860);function Eee({backgroundColor:e,blockId:t,cornerRadius:n,disableDownload:o,enableVideoPlaybackSpeed:r,forwardSeekRestricted:a,headingLevel:i,isGeneratingChapters:c,isLearner:l,item:d,lessonId:h,loadMedia:m,mediaWidth:f,onStep:p,partnerContent:C,audioVideoPlayhead:g,recordMediaPlayheadPosition:x,renderCaption:b,renderPostVideoSlot:y,showChapters:L,transcriptEnabled:S,type:T,isVideoTraining:k,shouldPause:I}){const[E,N]=Rp.useState(!1),{currentLocale:M}=tt(),A=rt(),{id:j,media:w,partnerContentId:P}=d,R=A(w)??{},{customVideo:O={},tmp:B={},video:D={}}=R,F="poster"in D?D:{...D,...O},V=B.video&&"poster"in B.video?B.video:void 0,{captions:U,chapters:H,key:K,poster:Q,src:z,subtitle:W}=di()?F:V||F,$=L?H??[]:[],G=K||z,Y=(Array.isArray(C)?C:C?.content)?.find(he=>P!=null&&Vt(he)&&"id"in he&&he.id===P),ne=Y!=null&&Vt(Y),ee=Vt(w)&&"l10nId"in w?w.l10nId:void 0,le=Rp.useCallback(()=>{N(!0)},[]),J=Rp.useCallback(({percentComplete:he})=>{he>=100&&p?.({id:j})},[j,p]);if(!G)return(0,s.jsx)(wJ,{mediaWidth:f});const te={audioVideoPlayhead:g,backgroundColor:e,blockId:t,blockPartnerContent:Y,blockPartnerContentExists:ne,captions:U,chapters:$,cornerRadius:n,currentLocale:M,dataL10nId:ee,disableDownload:o,enableVideoPlaybackSpeed:r,forwardSeekRestricted:a,id:j,isLoaded:E,item:d,lessonId:h,loadMedia:m,media:w,mediaWidth:f,onLoad:le,onProgressChanged:J,poster:Q,recordMediaPlayheadPosition:x,renderCaption:b,renderPostVideoSlot:y,subtitle:W,type:T,videoKey:K,videoSrc:G,shouldPause:I};return k?(0,s.jsx)(Iee,{...te,chapters:$,headingLevel:i,isGeneratingChapters:c,isLearner:l,showChapters:L,transcriptEnabled:S},K):(0,s.jsx)(MJ,{...te},K)}const Nee=_("block-video");function Pp({animateBlockEntrance:e,blockId:t,disableDownload:n,enableVideoPlaybackSpeed:o,initiallyVisible:r,isDragPreview:a,isLearner:i,isSidebarPreview:c,items:l,lessonId:d,loadMedia:h,onStep:m,partnerContent:f,progress:p,recordMediaPlayheadPosition:C,renderCaption:g,renderPostVideoSlot:x,settings:b,takingSnapshot:y,type:L,isGeneratingChapters:S,isVideoTraining:T,shouldPause:k}){const I=rs(),E=l?.[0];if(E==null)return null;const N=Nee({"no-animation":!b?.entranceAnimation,presentation:I}).toString(),M=T?"2":"1",A=y||a||c;return(0,s.jsx)(Ae,{className:N,children:(0,s.jsx)(He,{animateBlockEntrance:e,initiallyVisible:r,isLearner:i,children:A?(0,s.jsx)(jJ,{item:E}):(0,s.jsx)(SY,{children:(0,s.jsx)(Eee,{audioVideoPlayhead:p?.items?.[t]?.items?.[E.id]?.audioVideoPlayhead??0,backgroundColor:b?.backgroundColor,blockId:t,cornerRadius:b?.cornerRadius,disableDownload:n,enableVideoPlaybackSpeed:o,forwardSeekRestricted:b?.forwardSeekRestricted&&!p?.isComplete,headingLevel:b?.headingLevel,isGeneratingChapters:S,isLearner:i,isVideoTraining:T,item:E,lessonId:d,loadMedia:h,mediaWidth:b?.mediaWidth??M,onStep:m,partnerContent:f,recordMediaPlayheadPosition:C,renderCaption:g,renderPostVideoSlot:x,shouldPause:k,showChapters:!!b?.showChapters,transcriptEnabled:!!b?.showTranscript,type:L})})})})}var Mp=v(49860);const Mu=_("block-audio"),Op=_("block-embed"),Bn=_("block-attachment");class jee extends Mp.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:n}=this.state,o=Mu("caption",{hidden:!n}).toString();return(0,s.jsx)(Qe,{className:o,value:t})}onLoad(){this.setState({loaded:!0})}renderItem(t){const{blockId:n,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,p=o(f)??{},{id:C}=t,g=p?.tmp?.audio?.key||p?.audio?.key,x=`${a}-${n}-${C}`,b=Lt()(0,["items",n,"items",C,"audioVideoPlayhead"],c),y=lp({lessonId:a,refs:`items:${n}/items:${C}`});return(0,s.jsxs)("div",{className:Mu("item"),children:[i&&(0,s.jsx)(Dy,{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:${n}/items:${C}`,transcriptMedia:f,uploadId:y},x),d(t)]},C)}handleOnEnd(t){this.props.onStep({id:t})}onTranscriptClick(t){const{blockId:n}=this.props;return this.props.openTranscript?.({blockId:n,item:t,refs:`items:${n}/items:${t.id}`})}render(){const{animateBlockEntrance:t,initiallyVisible:n,isLearner:o,items:r,settings:a}=this.props,{entranceAnimation:i}=a,c=Mu({"no-animation":!i,presentation:this.props.isPresentation}).toString(),l=r.length>0?r.slice(0,1):[];return(0,s.jsx)(Ae,{className:c,children:(0,s.jsx)(He,{animateBlockEntrance:t,initiallyVisible:n,isLearner:o,children:(0,s.jsx)("div",{className:Mu("wrapper"),children:l.map(d=>this.renderItem(d))})})})}}const wee=r3(it(jee));function Aee(e){const t=rs();return(0,s.jsx)(wee,{...e,isPresentation:t})}class Ree extends Mp.Component{static get defaultProps(){return{items:[],editable:!1,lessonId:"",blockId:"",settings:{}}}renderItem(t,n){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,p=Op("item",{border:f}).toString();return(0,s.jsx)(Kt,{className:p,disabled:!f&&m==_n.TRANSPARENT,tag:"section",children:c&&(0,s.jsx)(Vy,{data:i,id:`${n}-${o}`,isLesson:!0,labels:l,showMetaData:h})},o)}render(){const{animateBlockEntrance:t,blockId:n,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=dY(h)!=="link",f=Op({"no-animation":!l,presentation:this.props.isPresentation}).toString(),p=Op("wrapper",{medium:m&&d==="1",full:m&&d==="2"}),C=i.length>0?i.slice(0,1):[];return(0,s.jsx)(Ae,{className:f,children:(0,s.jsx)(He,{animateBlockEntrance:t,initiallyVisible:r,isLearner:a,children:(0,s.jsx)("div",{className:p,children:C.map(g=>this.renderItem(g,n))})})})}}const Pee=it(sm()(Ree));function Mee(e){const t=rs();return(0,s.jsx)(Pee,{...e,isPresentation:t})}class Oee extends Mp.Component{get attachment(){const t=this.props.items[0].media;return this.props.getL10nValue(t)?.attachment??{}}render(){const{animateBlockEntrance:t,initiallyVisible:n,isLearner:o}=this.props;return(0,s.jsx)(Ae,{children:(0,s.jsx)(He,{animateBlockEntrance:t,initiallyVisible:n,isLearner:o,children:(0,s.jsx)("div",{className:"block-text--onecol",children:(0,s.jsx)("div",{className:"block-text__container",children:(0,s.jsx)("div",{className:"block-text__row",children:(0,s.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:n,originalUrl:o,size:r}){const{ariaDescribedBy:a,attachmentId:i,blockId:c,externalLinksDisabled:l,onLinkBlur:d,onLinkFocus:h,onLinkMouseEnter:m,onLinkMouseLeave:f}=this.props,p=mt(t),C=l?"":void 0,g=l?void 0:p,x=l?void 0:"noopener noreferrer nofollow",b=l?"button":void 0,y=l?0:void 0,L=l?void 0:"_blank",S=Bn({}).mix("brandHover").toString(),T=Bn("info");return(0,s.jsxs)(Kt,{"aria-describedby":a,"aria-labelledby":`attachment-name-${c} attachment-icon-${c}`,className:S,"data-external":C,download:o,href:g,id:l?i:void 0,onBlur:l?()=>d?.(i):void 0,onFocus:l?()=>h?.(i):void 0,onMouseEnter:l?()=>m?.(i):void 0,onMouseLeave:l?()=>f?.(i):void 0,rel:x,role:b,tabIndex:y,tag:"a",target:L,children:[(0,s.jsxs)("div",{className:Bn("main"),children:[(0,s.jsx)("div",{className:Bn("icon"),id:`attachment-icon-${c}`,children:this.fileIcon(n)}),(0,s.jsxs)("div",{className:T,children:[(0,s.jsx)(je,{className:Bn("title").toString(),id:`attachment-name-${c}`,value:o}),(0,s.jsx)("div",{className:Bn("size").toString(),children:NJ(r)})]})]}),(0,s.jsx)("div",{className:Bn("rest"),children:(0,s.jsx)(AH,{className:"brandHover__target--fill"})})]})}renderNoFile(){const t=Bn({none:!0}).toString(),n=Bn("info");return(0,s.jsx)(Kt,{className:t,children:(0,s.jsxs)("div",{className:Bn("main"),children:[(0,s.jsx)("div",{className:Bn("icon"),children:(0,s.jsx)(tx,{"aria-label":"File"})}),(0,s.jsxs)("div",{className:n,children:[(0,s.jsx)("div",{className:Bn("title").toString(),children:"File Attachment Block"}),(0,s.jsx)("div",{className:Bn("size").toString(),children:"No file added"})]})]})})}fileIcon(t){const{labels:n}=this.props,o=/excel|spreadsheet/,r=/pdf/,a=/word/,i=/powerpoint|presentation/,c=/rtf|richtext/,l=/zip/;return o.test(t)?(0,s.jsx)(JH,{"aria-label":n?.a11yExcelIcon}):r.test(t)?(0,s.jsx)(ZH,{"aria-label":n?.a11yPDFIcon}):a.test(t)?(0,s.jsx)(YH,{"aria-label":n?.a11yWordIcon}):i.test(t)?(0,s.jsx)(XH,{"aria-label":n?.a11yPPTIcon}):c.test(t)?(0,s.jsx)(qH,{"aria-label":n?.a11yRTFIcon}):l.test(t)?(0,s.jsx)(e$,{"aria-label":n?.a11yZipIcon}):(0,s.jsx)(tx,{"aria-label":n?.a11yFileIcon})}}function Bee(e){const t=sm()(e),n=it(t),o=D_(n);function r(a){const i=$e(),c=a.externalLinksDisabled??(i&&"externalLinksDisabled"in i?i.externalLinksDisabled:!1);return(0,s.jsx)(o,{...a,externalLinksDisabled:c})}return r}const Dee=Bee(Oee),Bp=_("block-process-card"),f5=({icon:e,isOverlayAudio:t=!1,onClick:n,text:o,variant:r})=>{const a=`${r}-btn`;return(0,s.jsxs)("button",{className:Bp(a,{"audio-overlay":t}),onClick:n,type:"button",children:[(0,s.jsx)("span",{className:Bp(`${a}-text`),children:o}),(0,s.jsx)(ae,{classNameIcon:Bp(`${a}-icon`),name:e})]})},Fee=_("block-process-card"),Hee=({activeIndex:e,enableVideoPlaybackSpeed:t,i
174d:n,index:o,isIntroStep:r=!1,isOverlayAudio:a=!1,item:i,labels:c,lessonId:l,media:d,onMediaLoad:h,settingZoomOnClick:m})=>{const{image:f}=d??{},p=a?f?.align??"center":"center",C=Fee("media",{legacy:!1,"audio-overlay":a,[`audio-overlay-${p}`]:a,"intro-step":r}),g=e===o;return(0,s.jsx)("div",{className:C,children:(0,s.jsx)(Jt,{activeIndex:e,blockId:n,defaultAlign:"center",enableVideoPlaybackSpeed:t,hasPadding:!1,index:`${n}-${o}`,isOverlayAudio:a,item:i,itemIndex:o,labels:c,lessonId:l,media:d,onLoad:h,opts:{disableZoom:!m},shouldPause:!g})})};var Dp=v(49860);const Uo=_("block-process-card"),$ee=({text:e})=>{const t=Dp.useRef(null),{isInView:n}=_ee({ref:t,threshold:.75});return(0,s.jsxs)("div",{className:Uo("swipe-badge",{animate:n}),ref:t,children:[(0,s.jsx)("span",{className:Uo("swipe-badge-text"),children:e}),(0,s.jsx)(ae,{className:Uo("swipe-badge-icon"),name:"chevron-right-solid"})]})};function _ee({ref:e,rootMargin:t="0px",threshold:n=.1}){const[o,r]=Dp.useState(!1);return Dp.useEffect(()=>{if(!e.current||o)return;const a=new IntersectionObserver(([i])=>{i.isIntersecting&&(r(!0),a.disconnect())},{rootMargin:t,threshold:n});return a.observe(e.current),()=>a.disconnect()},[o,e,t,n]),{isInView:o}}const Vee=({activeIndex:e,className:t,description:n,enableVideoPlaybackSpeed:o,hasIntro:r,id:a,index:i,item:c,labels:l,lessonId:d,media:h,onClickRestart:m,onClickStart:f,settingAudioPosition:p,settingHeadingLevel:C=2,settingShowStepLabel:g=!0,settingStepLabel:x,settingZoomOnClick:b,showSwipeBadge:y,style:L,title:S,totalSteps:T,type:k})=>{const I=`h${C}`,E=k==="intro",N=k==="summary",M=k==="step",A=r?i:i+1,j=we(x)||l.processStepName,w=we(Array.isArray(h)?{}:h),P=xs(w,p,!0,"process"),R=()=>{if(!h)return null;const O={activeIndex:e,blockId:a,enableVideoPlaybackSpeed:o,id:a,index:i,isIntroStep:E,labels:l,lessonId:d,media:h,onMediaLoad:()=>{},settingZoomOnClick:b,item:c},B={audio:{media:P.audioOnlyMedia||w,isOverlayAudio:!1},image:{media:P.imageOnlyMedia||w,isOverlayAudio:!1},video:{media:P.videoOnlyMedia||w},embed:{media:P.embedOnlyMedia||w,isOverlayAudio:!1},overlay:{media:w,isOverlayAudio:!1}};return P.renderOrder.map((D,F)=>{if(D==="text")return(0,s.jsx)(je,{className:Uo("description"),value:n},`text-${F}`);const V=B[D];return V?(0,s.jsx)(Hee,{...O,...V},`${D}-${F}`):null})};return(0,s.jsxs)("div",{className:Uo(null,{[k]:!0}).mix(t),style:L,children:[M&&g&&(0,s.jsx)("div",{className:Uo("number"),children:`${j} ${A}`}),(0,s.jsx)("div",{className:Uo("title"),children:(0,s.jsx)(I,{children:(0,s.jsx)(je,{value:S})})}),R(),!h&&(0,s.jsx)(je,{className:Uo("description"),value:n}),E&&T>1&&(0,s.jsx)(f5,{icon:"chevron-right-solid",isOverlayAudio:P.isOverlayAudio,onClick:f,text:l.processStart,variant:"start"}),N&&T>1&&(0,s.jsx)(f5,{icon:"arrow-rotate-left",isOverlayAudio:P.isOverlayAudio,onClick:m,text:l.processStartAgain,variant:"restart"}),y&&M&&(0,s.jsx)($ee,{text:l.processSwipe})]})};var Rs=v(49860);const zee=_("block-process-carousel"),p5=e=>e?.type==="intro",Fp=e=>e?.type==="summary",Hp=e=>e?.type==="step",g5=e=>e?.isHidden,Uee=({animateBlockEntrance:e,enableVideoPlaybackSpeed:t,id:n,initiallyVisible:o,isLearner:r,items:a,labels:i,lessonId:c,onStep:l,onTranscriptUpdate:d,previewType:h,processRef:m,settings:{audioPosition:f,headingLevel:p,stepLabel:C,showStepLabel:g,zoomOnClick:x}})=>{const b=$t(480),y=Ah(),L=rt(),S=Rs.useRef(null),[T,k]=Rs.useState(0),[I,E]=Rs.useState(!1),N=Rs.useMemo(()=>h===lr.MOBILE_PORTRAIT||h===lr.MOBILE_LANDSCAPE,[h]),M=Rs.useMemo(()=>{const V=a.filter(Q=>!g5(Q)),U=V.find(p5),H=V.find(Fp),K=V.filter(Hp);return[U,...K,H].filter(Boolean)},[a]),A=Rs.useMemo(()=>M.findIndex((V,U)=>Hp(V)&&(Hp(M[U+1])||Fp(M[U+1]))),[M]),j=p5(M[0]),w=Fp(M[M.length-1]),P=!!h;Rs.useEffect(()=>{l&&(a.forEach(V=>g5(V)&&l(V)),M.length>0&&l(M[0]))},[]);const R=Rs.useCallback(()=>
174{S.current?.navigateToSlide?.(0)},[]),O=Rs.useCallback(()=>{S.current?.navigateToSlide?.(1)},[]),B=Rs.useCallback(V=>{if(k(V),m.current){const K=m.current.closest("[data-block-id]")??m.current;M_(K,{offsetTop:document.getElementById("app-header")?.offsetHeight??0})}V!==A&&!I&&E(!0),l?.(M[V]);const U=M[V]?.media;L(U)?.audio&&d?.({audioPlayerId:bs({refs:`items:${n}/items:${M[V]?.id}`}),transcriptMedia:U})},[M,A,L,I,n,l,d,m]),D=({index:V,isActive:U,onClick:H,onKeyDown:K})=>{const Q=j&&V===0,z=w&&V===M.length-1,W=j?V:V+1;let $,G;Q?($=i?.a11yBlockProcessSlideControlsIntroduction,G=(0,s.jsx)(ae,{className:"carousel-controls-item-intro-icon",name:"chevron-right"})):z?($=i?.a11yBlockProcessSlideControlsSummary,G=(0,s.jsx)(ae,{name:"check-regular"})):($=W.toString(),G=W.toString());const Z=`${i?.a11yBlockProcessSlideControlsGoToSlide} ${$}`;return(0,s.jsx)(yy,{"aria-label":Z,ariaLabel:Z,className:"carousel-controls-item-btn",isActive:U,onClick:H,onKeyDown:K,children:G},V)},F=e?"fadeIn":"none";return(0,s.jsx)(He,{animateBlockEntrance:P,animateIn:F,duration:P&&e?1:0,initiallyVisible:o,isLearner:r,children:(0,s.jsx)("div",{className:zee(),children:(0,s.jsx)(ou,{blockId:n,carouselRef:S,items:M,children:()=>(0,s.jsx)(su,{iconNameLeft:"chevron-left-solid",iconNameRight:"chevron-right-solid",isInfinite:!1,isRTL:y,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:B,ref:S,renderSlideIndicator:D,shouldMouseEmulateTouch:N,shouldUseCounter:!1,shouldUseGoToSlide:!0,children:M.map((V,U)=>(0,s.jsx)(Kt,{activeIndex:T,description:V.description,enableVideoPlaybackSpeed:t,hasIntro:j,id:n,index:U,isHidden:V.isHidden,item:V,labels:i,lessonId:c,media:V.media,onClickRestart:R,onClickStart:O,settingAudioPosition:f,settingHeadingLevel:p,settingShowStepLabel:g,settingStepLabel:C,settingZoomOnClick:x,showSwipeBadge:b&&!I&&U===A,tag:Vee,title:V.title,totalSteps:M.length,type:V.type},V.id))})})})})};var Gee=v(49860);const Wee=e=>{const{blockId:t}=e,n=Gee.useRef(null);return(0,s.jsx)(Ae,{className:"block-process",ref:n,children:(0,s.jsx)(Uee,{id:t,processRef:n,...e})})},Ve=_("block-quote"),jc=({avatar:e,alt:t,l10nId:n,showAvatar:o})=>o?(0,s.jsx)(En,{alt:To(t),className:Ve("avatar"),"data-l10n-id":n,src:e}):null,v5=(e,{paragraph:t})=>{const n=t||"",o=Ve("text",{blank:t===""}).toString();return(0,s.jsx)(Qe,{className:o,value:n})},C5=(e,{name:t})=>{const n=Ve("caption",{blank:t===""}).toString();return(0,s.jsx)(Qe,{className:n,value:t})},b5=({avatar:e,blockProps:t,getL10nValue:n,item:o,renderCaption:r,renderText:a})=>{const i=o?.avatar?.media,c=n(i)?.image,l=c?.alt,d=Fh(c),h=Ot(i);return(0,s.jsx)("div",{className:Ve("slide"),children:(0,s.jsxs)("figure",{className:Ve("figure"),children:[d&&e?(0,s.jsx)(jc,{alt:l??"",avatar:d,l10nId:h,showAvatar:!!e}):null,(0,s.jsx)("blockquote",{className:Ve("quote-body"),children:a(t,o)}),(0,s.jsx)("figcaption",{children:r(t,o)})]})})},Kee=({alt:e,animateBlockEntrance:t,avatar:n,children:o,l10nId:r,initiallyVisible:a,isAuthorBlank:i=!1,isLearner:c,showAvatar:l,type:d})=>{const h=Ve("col",{"no-avatar":!n}),m=n?(0,s.jsx)("div",{className:Ve("image"),children:(0,s.jsx)("div",{className:Ve("avatar-wrap"),children:d==="c"?(0,s.jsx)(He,{animateBlockEntrance:t,animateIn:"fadeInLeftSmall",initiallyVisible:a,isLearner:c,children:(0,s.jsx)(jc,{alt:e,avatar:n,l10nId:r,showAvatar:l})}):(0,s.jsx)(jc,{alt:e,avatar:n,l10nId:r,showAvatar:l})})}):null;return(0,s.jsx)("div",{className:Ve("container"),children:(0,s.jsx)("div",{className:Ve("row"),children:(0,s.jsxs)("div",{className:h,children:[(0,s.jsx)("div",{className:Ve("divider-top")}),(0,s.jsxs)("div",{className:Ve("figure",{"no-author":i,"no-avatar":!i&&!l}),children:[m,o]}),(0,s.jsx)("div",{className:Ve("divider-bottom")})]})})})},Qee=({avatar:e,children:t,alt:n,l10nId:o,showAvatar:r})=>(0,s.jsx)("div",{className:Ve("figure"),children:(0,s.jsx)("div",{className:Ve("container"),children:(0,s.jsxs)("div",{className:Ve("row"),children:[(0,s.jsx)("div",{className:Ve("col"),children:e&&r?(0,s.jsx)(jc,{alt:n,avatar:e,l10nId:o,showAvatar:r}):null}),(0,s.jsx)("div",{className:Ve("col"),children:t})]})})}),Yee=({background:e,avatar:t,children:n,alt:o,l10nId:r,showAvatar:a})=>(0,s.jsx)("div",{className:Ve("background"),style:{backgroundImage:e??""},children:(0,s.jsx)("div",{className:Ve("container"),children:(0,s.jsx)("div",{className:Ve("row"),children:(0,s.jsx)("div",{className:Ve("col"),children:(0,s.jsxs)("div",{className:Ve("figure"),children:[t&&a?(0,s.jsx)(jc,{alt:o,avatar:t,l10nId:r,showAvatar:a}):null,n]})})})})});class Zee 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"}}
174getBackgroundImageUrl(t,n){const o=t?.alpha??YX(n),r=gt(t),a=ZX(n);return Il({alpha:o,color:a,url:r})?.backgroundImage}renderText(t,{paragraph:n}){const o=n||"",r=Ve("text",{blank:o===""}).toString();return(0,s.jsx)(Qe,{className:r,value:o})}renderCaption(t,{name:n}){const o=Ve("caption",{blank:n===""}).toString();return(0,s.jsx)(Qe,{className:o,value:n})}render(){const{animateBlockEntrance:t,getL10nValue:n,initiallyVisible:o,isLearner:r,items:a,settings:i,type:c,renderText:l=this.renderTextDelegate,renderCaption:d=this.renderCaptionDelegate}=this.props,h=92,{avatarSize:m=Sp(c),divider:f=!0,dividerSize:p=h,entranceAnimation:C,quoteAlignment:g="left",quoteIcon:x=!0,quotesInline:b,quotePadding:y=2,quoteWidth:L=B6(c)}=i,[S]=a,{avatar:T,background:k}=S,I=n(T?.media)?.image,E=Fh(I),N=I?.alt,M=Ot(T.media),A=n(k?.media)?.image,j=A?.overlayColor,w=this.getBackgroundImageUrl(A,j),P=i?.avatar??E!=="",R=E&&E!=="",O=c==="background",B=O&&j==="light",D=D6(L),F=F6(y),V=Tp(c,m),U=qX(p),H=c==="a",K=c==="c"||O,Q=c!=="b"&&!O,z=S?.name==="",W=S?.paragraph==="",$=Ve(null,{[c]:!0,[`${c}-custom-width-${D}`]:!0,[`${c}-divider-off`]:H&&!f,[`${c}-divider-size-${U}`]:H&&f,[`${c}-quote-padding-${F}`]:!0,[`${c}-align-${g}`]:O,[`${c}-${D}-no-avatar`]:!E||!P,[`${c}-avatar-size-${V}`]:P&&R,[`${c}-quote-icon-off`]:K&&!x,[`${c}-legacy-quote-mark`]:Q&&!b,[`${c}-overlay-legacy`]:!j,[`${c}-overlay-light`]:B,"no-animation":!C}).toString(),G=(0,s.jsx)("div",{className:Ve("wrap",{blank:z||W}),children:(0,s.jsx)(He,{animateBlockEntrance:t,animateIn:this.getQuoteEntranceAnimationType(),initiallyVisible:o,isLearner:r,siblingDelay:.15,children:(0,s.jsxs)("figure",{children:[(0,s.jsx)("blockquote",{children:l(this.props,S)}),(0,s.jsx)("figcaption",{children:d(this.props,S)})]})})});let Z;switch(c){case"d":Z=(0,s.jsx)(Qee,{alt:N,avatar:E,initiallyVisible:o,l10nId:M,showAvatar:P,type:c,children:G});break;case"background":Z=(0,s.jsx)(Yee,{alt:N,avatar:E,background:w,initiallyVisible:o,l10nId:M,showAvatar:P,type:c,children:G});break;default:Z=(0,s.jsx)(Kee,{alt:N,animateBlockEntrance:t,avatar:E,initiallyVisible:o,isAuthorBlank:z,isLearner:r,l10nId:M,showAvatar:P,type:c,children:G})}return(0,s.jsx)(Ae,{className:$,children:Z})}}const wc=it(Zee),x5=(e=>(0,s.jsx)(wc,{...e}));v.dn(x5);const Xee=e=>(0,s.jsx)(wc,{type:"b",...e}),qee=e=>(0,s.jsx)(wc,{type:"c",...e}),Jee=e=>(0,s.jsx)(wc,{type:"d",...e}),ete=e=>(0,s.jsx)(wc,{type:"background",...e});class tte 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:n,editable:o,getL10nValue:r,initiallyVisible:a=!1,isRTL:i,isLearner:c,isLessonBlocksList:l=!1,items:d,labels:h,previewType:m,settings:f,renderText:p=v5,renderCaption:C=C5,type:g}=this.props,{avatar:x=!0,avatarSize:b=Sp(g),entranceAnimation:y,quotesInline:L,quotePadding:S=2,quoteWidth:T=B6(g),showBorder:k=!0}=f,E=g!=="b"&&!(g==="background"),N=D6(T),M=F6(S),A=Tp(g,b),j=m==="mobile-portrait"||m==="mobile-landscape",w=Ve({[g]:!0,[`${g}-custom-width-${N}`]:!0,[`${g}-quote-padding-${M}`]:!0,[`${g}-${N}-no-avatar`]:!x,[`${g}-avatar-size-${A}`]:x,[`${g}-legacy-quote-mark`]:!l&&E&&!L,"no-animation":!y,"hide-border":!k,editable:o}).toString(),P=d.map(R=>(0,s.jsx)(b5,{avatar:x,blockProps:this.props,getL10nValue:r,item:R,renderCaption:C,renderText:p},R.id));return(0,s.jsx)("div",{className:Ve("slider-container"),children:(0,s.jsx)(Ae,{className:w,children:(0,s.jsx)(Tc,{className:Ve("wrap"),children:(0,s.jsx)("div",{className:Ve("container"),children:(0,s.jsx)("div",{className:Ve("col"),children:(0,s.jsx)(Kt,{className:Ve("box"),children:(0,s.jsx)(He,{animateBlockEntrance:n,animateIn:"fadeInUp",initiallyVisible:a,isLearner:c,children:(0,s.jsx)(ou,{blockId:t,items:d,children:({carouselRef:R})=>(0,s.jsx)(su,{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:R,shouldMouseEmulateTouch:j,children:P})})})})})})})})})}}const nte=Xf(it(tte)),Ou=_("block-quote"),ste=e=>{const{animateBlockEntrance:t,initiallyVisible:n=!1,isLearner:o,items:r=[],settings:a,renderText:i=v5,renderCaption:c=C5,type:l="stacked"}=e,d=rt(),{avatar:h=!0,entranceAnimation:m}=a,f=a.avatarSize??Sp(l),p=Tp(l,f),C=Ou({[l]:!0,[`${l}-avatar-size-${p}`]:!0,"no-animation":!m}).toString(),g=r.map(x=>(0,s.jsx)(b5,{avatar:h,blockProps:e,getL10nValue:d,item:x,renderCaption:c,renderText:i},x.id));return(0,s.jsx)(Ae,{className:C,children:(0,s.jsx)(Tc,{className:Ou("wrap"),children:(0,s.jsx)("div",{className:Ou("container"),children:(0,s.jsx)(He,{animateBlockEntrance:t,animateIn:"fadeInUp",initiallyVisible:n,isLearner:o,siblingDelay:.15,children:(0,s.jsx)("div",{className:Ou("row"),children:g})})})})})};var ote=v(58516),rte=v.n(ote),ate=v(67731),y5=v.n(ate),ite=v(89955),S5=v.n(ite),cte=v(50195),lte=v.n(cte),dte=v(18352),Go=v.n(dte);const T5=e=>({...e.responses[e.response],hasCharacter:e.hasCharacter,type:"response"}),ute=(e,t)=>
174{const n=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:n?.feedback||"",type:"dialogue",hasCharacter:e.hasCharacter}},hte=e=>[T5(e)],mte=e=>{const t=!!e.responses[e.response],n=T5(e),o=ute(e,n);return t?[n,o]:[o]},fte=e=>e.hasFeedback?[e,...mte(e)]:e.response!=null?[e,...hte(e)]:[e],pte=(e,t)=>{if(!t)return;const{scene:n,slide:o}=t,r=e.findIndex(c=>c.id===n),i=(e[r]?.slides||[]).findIndex(c=>c.id===o);return{scene:r,slide:i}},L5=zl()(pte);var gte=v(14172),vte=v.n(gte);const Cte=Mt()(Xe()("filters"),po()(Je()("name","rise_emotion")),pi()(zt())),bte=Mt()(Xe()("filters"),Tr()(Je()("name","rise_emotion")),Xe()("value")),k5=e=>new URL(e).pathname.slice(1),xte=e=>Mt()(cn()("key",k5(e.src)),cn()("thumbnailKey",k5(e.thumbnail)))(e),yte=Mt()(Xe()("poses"),po()(Cte),St()(e=>[bte(e),e]),vte(),Ss()(xte));var J1e,Ps=v(49860);const $p=e=>e===-1?null:e,Ste=e=>es()(Et(),Ee(),e),I5=pi()(Et()),Ya=_f()(I5,ls),E5=rte()(jf()),N5=Ste(Xj),_p=e=>No()(e);class Tte extends Ps.Component{static get defaultProps(){return{getCharacter:Function.prototype,onItemUpdate:Function.prototype}}continueRef;feedbackRef;resetRef;buttonRef=Ps.createRef();responseItemRef=Ps.createRef();scenarioRef=Ps.createRef();blockContentRef=Ps.createRef();endRef=Ps.createRef();textRef=Ps.createRef();refs=Ps.createRef();dynamicRefs=Ps.createRef();fadeObservers=new Map;shouldFocus=!1;constructor(t){super(t);const n={activeScene:0,activeSlide:0,initiated:!1,prevScene:0,prevSlide:0,resizes:0,slides:{}};this.refs.current={},this.state=t.initialState||n,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)}
174setupFadeObserver(t){if(!t)return;const n=this.fadeObservers.get(t);n&&(n.observer.disconnect(),t.removeEventListener("scroll",n.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:n}=this.props,o=De()(fi()("poses"),Rn()({},"character"),_p);Ya(n)&&!o(n)&&this.fetchCharacters(),t||this.resetSlides(),window.addEventListener("resize",this.onResize),window.addEventListener(Ke,this.handleNavEvent)}handleNavEvent(t){const{path:n}=t.detail,{blockId:o,sceneId:r,slideId:a,responseId:i}=Sa(n,["block","scene"]),c=n.at(-1)==="feedback";if(o!==this.props.blockId)return;const l=$p(this.props.items.findIndex(m=>m.id===r)),d=l!==null?$p(this.props.items[l].slides.findIndex(m=>m.id===a)):null,h=d!==null?$p(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:n}=this.props,{activeScene:o,activeSlide:r}=this.state,a=Lt()([],[o,"slides"],t),i=Lt()(null,[r,"goTo"],a),c=Lt()(null,[r,"type"],a);if(n&&(i==="end"&&c==="text"||!i&&!c)&&S5()(n,t),this.shouldFocus){this.shouldFocus=!1;const m=this.scenarioRef.current?.querySelector('[data-scenario-focus][tabindex="-1"]');m?m.focus():vf(this.scenarioRef.current)}this.fadeObservers.forEach(({observer:m,scrollHandler:f},p)=>{document.contains(p)||(m.disconnect(),p.removeEventListener("scroll",f),this.fadeObservers.delete(p))})}componentWillUnmount(){clearTimeout(this.continueRef),clearTimeout(this.feedbackRef),clearTimeout(this.resetRef),window.removeEventListener("resize",this.onResize),window.removeEventListener(Ke,this.handleNavEvent),this.fadeObservers.forEach(({observer:t,scrollHandler:n},o)=>{t.disconnect(),o.removeEventListener("scroll",n)}),this.fadeObservers.clear()}getActiveScene(){return this.getScene(this.state.activeScene)}getScene(t){const{items:n}=this.props;return n&&t>=0&&t<n.length?n[t]:null}fetchCharacterPose(t,n){const o=this.getScene(t),r=o?.slides,a=r&&n>=0&&n<r.length;if(!o||!r||!a)return{name:"",pose:null};const{character:i}=o,c=r[n],l=`${t}.${n}`,d=[l,"response"],h=[l,"hasFeedback"],m=Lt()(null,d,this.state.slides),f=Lt()(!1,h,this.state.slides),p=Rn()("neutral","emotion",c),C=es()(Be()(f),Lt()(p,["responses",m,"emotion"]),Be()(p)),g=Mt()(Lt()(i?.poses?.neutral,["poses",C(c)]),N5);return{name:i?.name||"",pose:g(i)}}fetchCharacters(){const{getCharacter:t,items:n,onItemUpdate:o}=this.props,r=bo()(["id","name","poses","src"]),a=c=>l=>o({itemId:c,payload:{character:l}}),i=({character:c,id:l})=>Ya(c)&&t(c.id).then(d=>cn()("poses",yte(d),d)).then(r).then(a(l));n.map(i)}isCharacterHidden(){const{items:t}=this.props,{activeScene:n,activeSlide:o}=this.state,a=this.getActiveScene()?.slides?.[o],i=o===null,c=t[n];return i?!(c?.slidesHaveCharacterByDefault??!1):a&&!a.hasCharacter}getCharacterPose(){const{items:t}=this.props,{activeScene:n,activeSlide:o,prevScene:r,prevSlide:a}=this.state,i=Lt()([],[n,"slides"],t),c=Lt()(!0,[o,"hasCharacter"],i);return I5(r)&&kl()(c)?this.fetchCharacterPose(r,a):this.fetchCharacterPose(n,o)}onClick(t,n){const{items:o,onStep:r}=this.props,{activeScene:a,activeSlide:i}=this.state,c=this.getActiveScene()?.slides,l=Rn()(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},p={activeSlide:null},C={activeScene:0,activeSlide:0},g=Mt()(L5(o),S=>({activeScene:S.scene,activeSlide:S.slide})),x=Cn()([[Be()(h&&d),Be()(p)],[Be()(h&&!d),Be()(f)],[ir(),Be()(m)]]),b=es()(Be()(l),Be()(p),Be()(C)),y=Cn()([[ln()("slide"),Go()(g,[n])],[ln()("next"),x],[ln()("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(y(t),L),t==="end"&&this.resetSlides(),t==="end"&&r&&S5()(r,o)}onFocus(){this.shouldFocus=!0}onInit(){this.setState({initiated:!0})}onResize(){this.setState({resizes:this.state.resizes+1})}
174onResponseClick(t,n){const{activeScene:o,activeSlide:r,slides:a}=this.state,{getL10nValue:i,lessonId:c,blockId:l}=this.props,d=`${o}.${r}`,h=cn()("response",t),m=cn()("hasFeedback",!0),f=Hs()({[`${d}`]:h}),p=Hs()({[`${d}`]:m});n.media&&i(n.media)?.audio&&Se.playerId===`audio-${c}-${l}`&&Se.pause();const g=De()(p,f);this.setState({slides:f(a)},()=>{this.shouldFocus=!0,this.setState({slides:g(a)})})}onTryAgainClick(){const{activeScene:t,activeSlide:n,slides:o}=this.state,r=`${t}.${n}`,a=y5()({hasFeedback:null,response:null}),i=Hs()({[`${r}`]:a});this.setState({slides:i(o)})}render(){const{blockId:t,getL10nValue:n,isPDF:o,items:r,labels:a}=this.props,{activeScene:i,activeSlide:c,initiated:l}=this.state,h=this.getActiveScene()?.slides?.[c],m=De()(ls,Rn()({},"character"),_p),f=De()(fi()("poses"),Rn()({},"character"),_p),p=De()(ts(),Lt()({},["character","poses"])),C=De()(Qc(),ts(),St()(p)),g=this.isCharacterHidden(),x=q()("scenario-block",{"scenario-block--initiated":l,"scenario-block--mobile":Ys.isMobile,"scenario-block--loading":m(r)&&!f
174(r),"scenario-block--character-hidden":g}),b=`scenario-live-${t}`,y={"aria-label":a?.a11yGroupScenario,"aria-describedby":b,className:x,ref:this.scenarioRef,role:"group",style:window.innerWidth<480?{height:window.innerHeight}:void 0},L=gt(n(r?.[0].background?.media)?.image),S=Cn()([[Et(),this.renderEnd],[Je()("type","dialogue"),this.renderDialogues],[Je()("type","text"),this.renderText],[ir(),Be()(null)]]),T=q()("scenario-block__character",{"scenario-block__character--hidden":g}),k=`${i}.${c}`,I=this.state.slides[k],E=I?.hasFeedback?h?.responses?.[I?.response]?.alt:h?.alt,N=n(E);return(0,s.jsxs)("div",{children:[(0,s.jsxs)("div",{...y,"data-l10n-id":Ot(E),children:[(0,s.jsx)("div",{"aria-live":"polite",className:"visually-hidden-always",id:b,children:N}),(0,s.jsx)("div",{className:"scenario-block__spinner"}),(0,s.jsx)("div",{className:"scenario-block__background-wrapper",children:Ya(r)&&r.map(this.renderBackground)}),L&&(0,s.jsx)(En,{alt:"",onLoad:this.onInit,src:L}),(0,s.jsxs)("div",{className:"scenario-block__inner",children:[(0,s.jsx)("div",{className:T,children:f(r)&&C(r).map(this.renderPose)}),(0,s.jsx)(li,{children:Ya(r)&&S(h)})]})]}),o&&h&&this.renderDetails(h)]})}renderBackground(t,n){const{activeScene:o}=this.state,{id:r,blurBackground:a}=t,i=this.props.getL10nValue(t?.background?.media)?.image,c=q()("scenario-block__background",{"scenario-block__background--active":o===n,"scenario-block__background--blur":a??!0}),l=gt(i);return l?(0,s.jsx)(En,{alt:"",className:c,src:l},r):(0,s.jsx)(s.Fragment,{})}renderButton(t){const{labels:n}=this.props,{scenarioContinue:o,scenarioTryAgain:r}=n,{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,s.jsxs)("span",{children:[r," ",(0,s.jsx)("i",{className:"icon icon-reload"})]}):(0,s.jsx)("span",{children:o}),m={className:"scenario-block__dialogue__button",key:"button",onClick:c==="tryAgain"?De()(this.onFocus,this.onTryAgainClick):De()(this.onFocus,Go()(this.onClick,[a,i]))};return(0,s.jsx)(li,{children:(0,s.jsx)(Fs,{...l,children:(0,s.jsx)("button",{...m,type:"button",children:d})})})}renderDetails(t){const{items:n}=this.props,{activeScene:o,activeSlide:r}=this.state,{responses:a,type:i}=t,c=(m,f)=>(0,s.jsxs)("span",{children:[m," ",(0,s.jsx)(kH,{})," ",f]},m),l=Mt()(L5(n),m=>`Scene ${m.scene+1} Slide ${m.slide+1}`),d=(m,{goTo:f,nextSlide:p})=>Cn()([[ln()("next"),Go()(c,[m,"Next Slide"])],[ln()("end"),Go()(c,[m,"End of Scenario"])],[ir(),Go()(c,[m,l(p||{})])]])(f),h=i==="text"?d("Continue",t):a.map((m,f)=>d(f,m));return(0,s.jsxs)("div",{className:"scenario-block__pdf-details",children:[(0,s.jsxs)("h3",{children:["Scene ",o+1," Slide ",r+1]}),h]})}renderDialogue(t,n,o){const{description:r,id:a,hasCharacter:i}=n,c="type"in n?n.type:void 0,{count:l,firstKey:d,hasFeedback:h,slide:m,totalDialogues:f}=t,p=o===0?a:o,C=o===1?d:o-1,g=o===0&&l===1,x=o===l,b=c==="dialogue"&&(g||x),y=this.dynamicRefs.current[`dialogue-${p}`],L=x&&this.dynamicRefs.current[`dialogue-${C}`],S=y&&y.offsetHeight,T=x&&L&&L.offsetHeight,k=h?30:0,I=window.innerWidth<480?20:30,E=I*2+60+T-k,N=I+60-k,M=lte()(S+k-60),A=Ps.createRef(),{settings:j,getL10nValue:w}=this.props,P=j?.audioPosition,R=w(m.media),O=xs(R,P),B=O.renderOrder.indexOf("audio")<O.renderOrder.indexOf("text"),D=!!R?.audio,F=h&&o===f-1,V=q()("scenario-block__dialogue",{"scenario-block__dialogue--response":c==="response","scenario-block__dialogue--feedback":F,"scenario-block__dialogue--done":o<l-1,"scenario-block__dialogue--audio-top":B&&D}),U=Cn()([[Be()(g),Be()(null)],[ln()(l),Be()({top:`${E}px`})],[ln()(l-1),Be()({top:`${N}px`})],[ln()(l-2),Be()({top:`${M}px`})],[ir(),Be()({top:`-${S+30}px`})]]),H={className:V,ref:G=>{this.dynamicRefs.current[`dialogue-${p}`]=G},style:U(o)},K={appear:!0,classNames:"scenario-block__dialogue-",nodeRef:A,key:o,timeout:{enter:400,exit:400}},Q=q()({"scenario-block__dialogue__bubble":i||c==="response","scenario-block__dialogue__pane":!i}),z=this.props.getL10nValue(r)||"",W=c!=="response"&&!F&&D&&B&&(0,s.jsx)("div",{className:"audio-position-wrapper audio-position-wrapper--top",children:this.renderAudioMedia(m)}),$=(0,s.jsxs)("div",{className:Q,"data-scenario-focus":b?"":void 0,tabIndex:b?-1:void 0,children:[W,(0,s.jsxs)("div",{className:"scenario-block__dialogue__bubble__content",ref:this.setupFadeObserver,children:[c!=="response"&&!F?this.renderDialogueWithAudioPositioning(m,z,O):(0,s.jsx)(je,{value:z}),(0,s.jsx)("div",{className:"scenario-block__dialogue__bubble-bottom"})]})]});return(0,s.jsx)(Fs,{...K,children:(0,s.jsx)("div",{children:(0,s.jsx)("div",{...H,children:Ya(r)&&$})})})}renderDialogues(t){const{activeScene:n,activeSlide:o,slides:r}=this.state,{id:a,responses:i}=t,c=`${n}.${o}`,l=r[c]||{},h=De()(Qc(),fte,Yr()(l))(t),{hasFeedback:m,response:f}=l,{feedback:p}=i[f]||{},C=Et()(f)&&ls(i),g=m?h.length-1:h.length,x=(g===1&&zt()(i)||g===2&&ls(i))&&m,b={count:g,firstKey:Lt()(null,[0,"id"],h),hasFeedback:m&&Ya(p),slide:t,totalDialogues:h.length},y={classNames:"scenario-block__content-",nodeRef:this.blockContentRef,timeout:{enter:0,exit:1e3}},L=(0,s.jsx)("div",{className:"scenario-block__dialogues__bottom",children:(0,s.jsx)("div",{className:"scenario-block__dialogues__bottom__inner",children:(0,s.jsx)("div",{className:"scenario-block__dialogues__responses",children:(0,s.jsx)(li,{component:"ol",role:"list",children:i.map((S,T)=>this.renderResponse(S,t,T))})})})});return(0,s.jsx)(Fs,{...y,children:(0,s.jsx)("div",{className:"scenario-block__dialogues scenario-block__content",children:(0,s.jsxs)("div",{className:"scenario-block__dialogues__inner",children:[(0,s.jsx)("div",{className:"scenario-block__dialogues__top",children:(0,s.jsx)("div",{className:"scenario-block__dialogues__top__inner",children:(0,s.jsx)(li,{children:h.map(this.renderDialogue.bind(this,b))})})}),C&&L,x&&this.renderButton(h[g-1])]})})},a)}renderEnd(){const{labels:t}=this.props,{scenarioComplete:n,scenarioStartOver:o}=t,r=De()(this.onFocus,Go()(this.onClick,["end",null])),a=q()(["scenario-block__text","scenario-block__text--end","sce
174nario-block__content"]),i={classNames:"scenario-block__content-",nodeRef:this.endRef,timeout:{enter:0,exit:400}};return(0,s.jsx)(Fs,{...i,children:(0,s.jsx)("div",{className:a,children:(0,s.jsxs)("div",{className:"scenario-block__text__inner","data-scenario-focus":"",tabIndex:-1,children:[(0,s.jsx)("div",{className:"scenario-block__text__title",children:(0,s.jsx)("h2",{children:n})}),(0,s.jsxs)("button",{className:"scenario-block__text__end",onClick:r,type:"button",children:[(0,s.jsx)("span",{children:o}),(0,s.jsx)("i",{className:"icon icon-reload"})]})]})},"end")},"end")}renderPose(t,n){const{pose:o}=this.getCharacterPose(),{filters:r,id:a}=t,i=N5(t),c=_f()(Je()("name","style")),l=c(Je()("value","left_aligned")),d=c(Je()("value","right_aligned")),h=q()("scenario-block__character__inner",{"scenario-block__character__inner--active":o===i,"scenario-block__character__inner--right":Tr()(d,r),"scenario-block__character__inner--left":Tr()(l,r)});return(0,s.jsx)("div",{className:h,"data-pose-id":a,children:(0,s.jsx)(En,{alt:"",src:i})},`pose-${n}-${a}`)}renderResponse({description:t},n,o){const{isPDF:r}=this.props,a=r?kte:De()(this.onFocus,Go()(this.onResponseClick,[o,n])),i=p=>{const g=p.currentTarget.querySelector(".scenario-block__response__inner");if(g){const x=g.getBoundingClientRect();if(p.clientX>x.right-16){p.preventDefault();return}}a(p)},c=p=>{const g=p.currentTarget.querySelector(".scenario-block__response__inner");if(g){const x=g.getBoundingClientRect();p.clientX>x.right-16?g.classList.add("hovering-scrollbar"):g.classList.remove("hovering-scrollbar")}},l=p=>{const g=p.currentTarget.querySelector(".scenario-block__response__inner");g&&g.classList.remove("hovering-scrollbar")},d=q()(["scenario-block__response",`scenario-block__response--${o}`]),h=q()("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,s.jsx)("button",{className:d,onClick:i,onMouseLeave:l,onMouseMove:c,type:"button",children:(0,s.jsxs)("div",{className:"scenario-block__response__inner",ref:this.setupFadeObserver,children:[(0,s.jsx)("div",{className:"scenario-block__response__number",children:o+1}),(0,s.jsx)(je,{value:t}),(0,s.jsx)("div",{className:"scenario-block__response__inner-bottom"})]})});return(0,s.jsx)(Fs,{...m,children:(0,s.jsx)("li",{className:h,role:"listitem",children:f})},o)}renderText(t){const{description:n,goTo:o,hasCharacter:r,id:a,nextSlide:i}=t,c=this.props.getL10nValue(t.title),l=this.props.getL10nValue(n)||"",{labels:d,settings:h,getL10nValue:m}=this.props,{scenarioContinue:f,scenarioStartOver:p}=d,C=!n&&(c||"").length<22,g=h?.audioPosition,x=m(t.media),b=xs(x,g),y=b.renderOrder.indexOf("audio")<b.renderOrder.indexOf("text"),L=!!x?.audio,S=q()("scenario-block__text","scenario-block__content",{"scenario-block__text--no-character":!r,"scenario-block__text--short":C,"scenario-block__text--audio-top":y&&L}),T={classNames:"scenario-block__content-",nodeRef:this.textRef,timeout:{enter:0,exit:400}},k=h?.headingLevel,I=k?`h${k}`:"h2",E=`scenario-title-${a}`,N=`scenario-description-${a}`,M=`${E} ${N}`,A=q()("scenario-block__text__inner",{"scenario-block__text__inner--end":o==="end"}),j=q()("scenario-block__text__title",{"scenario-block__text__title--end":o==="end"}),w=(0,s.jsx)("div",{className:j,"data-l10n-id":Ot(t.title),id:E,children:(0,s.jsx)(I,{children:c})}),P=L&&y&&(0,s.jsx)("div",{className:"audio-position-wrapper audio-position-wrapper--top",children:this.renderAudioMedia(t)}),R=(0,s.jsx)("div",{className:"scenario-block__text__description",id:N,ref:this.setupFadeObserver,children:this.renderTextWithAudioPositioning(t,l,b)}),O=De()(this.onFocus,Go()(this.onClick,[o,i])),B=(0,s.jsx)("button",{"aria-describedby":M,className:"scenario-block__text__continue",onClick:O,type:"button",children:(0,s.jsx)("span",{children:f})}),D=(0,s.jsxs)("button",{"aria-describedby":M,className:"scenario-block__text__end",onClick:O,type:"button",children:[(0,s.jsx)("span",{children:p}),(0,s.jsx)("i",{className:"icon icon-reload"})]});return(0,s.jsx)(Fs,{...T,children:(0,s.jsx)("div",{className:S,children:(0,s.jsxs)("div",{className:A,"data-scenario-focus":"",tabIndex:-1,
174children:[c&&w,P,n&&R,o==="end"?D:B]})},a)},a)}renderAudioMedia(t){const{blockId:n,getL10nValue:o,labels:r,lessonId:a,items:i,settings:c}=this.props,l=o(t.media),d=i?.[this.state.activeScene];return l?(0,s.jsx)(Jt,{blockId:n,index:n,item:t,labels:r,lessonId:a,lessonNumber:a,media:l,refs:`items:${n}/items:${d.id}/slides:${t.id}`,shouldPause:t.type!=="dialogue",volumeSliderPosition:c?.audioPosition==="top"?"below":"above"}):null}renderDialogueWithAudioPositioning(t,n,o){const r=o.renderOrder.indexOf("audio")<o.renderOrder.indexOf("text");return(0,s.jsxs)(s.Fragment,{children:[o.renderOrder.map((a,i)=>{if(a==="text")return(0,s.jsx)("div",{children:(0,s.jsx)(je,{value:n})},`text-${i}`);if(a==="audio"&&!r){const c=this.renderAudioMedia(t);return c?(0,s.jsx)("div",{children:c},`audio-${i}`):null}return null}),(0,s.jsx)("div",{className:"scenario-block__dialogue__bubble-bottom"})]})}renderTextWithAudioPositioning(t,n,o){const r=o.renderOrder.indexOf("audio")<o.renderOrder.indexOf("text");return(0,s.jsxs)(s.Fragment,{children:[o.renderOrder.map((a,i)=>{if(a==="text")return(0,s.jsx)("div",{children:(0,s.jsx)(je,{value:n})},`text-${i}`);if(a==="audio"&&!r){const c=this.renderAudioMedia(t);return c?(0,s.jsx)("div",{children:c},`audio-${i}`):null}return null}),(0,s.jsx)("div",{className:"scenario-block__text__description-bottom"})]})}resetSlide(t,n){const{slides:o}=this.state,r=`${t}.${n}`,a={hasFeedback:!1,response:null};this.setState({slides:cn()(r,a,o)})}resetSlides(){const{items:t}=this.props,n=r=>(a,i,c)=>{const{type:l,responses:d=[]}=i,h=l==="dialogue"&&d.length===0;return cn()(`${r}.${c}`,{hasFeedback:h,response:null},a)},o=(r,a,i)=>Mt()(Rn()([],"slides"),E5(n(i),{}),y5()(r))(a);this.setState({slides:E5(o,{},t)})}setNextSlide(){const{activeScene:t,activeSlide:n,slides:o}=this.state,r=this.getActiveScene()?.slides;if(!r)return;const{responses:a=[],type:i}=r[n]||{},c=`${t}.${n}`,l=cn()("hasFeedback",!0),d=Hs()({[c]:l});i==="dialogue"&&zt()(a)&&(this.shouldFocus=!0,this.setState({slides:d(o)}))}shouldComponentUpdate(t,n){return t.items!==this.props.items||t.settings!==this.props.settings||n.activeScene!==this.state.activeScene||n.activeSlide!==this.state.activeSlide||n.initiated!==this.state.initiated||n.resizes!==this.state.resizes||n.slides!==this.state.slides||t.labels!==this.props.labels}}const Lte=e=>{const t=rt();return(0,s.jsx)(Tte,{...e,getL10nValue:t})};function kte(){}var Ite=v(49860);class Ete extends Ite.Component{render(){const{animateBlockEntrance:t,isLearner:n,previewType:o,initiallyVisible:r}=this.props,a=!Et()(o),l={animateBlockEntrance:a,animateIn:t?"fadeIn":"none",duration:a&&t?1:0,initiallyVisible:r,isLearner:n};return(0,s.jsx)(Ae,{className:"block-scenario",children:(0,s.jsx)(He,{...l,children:(0,s.jsx)(Lte,{...this.props})})})}}var Nte=v(4594),Bu=v.n(Nte);function jte(e){e&&(e.addEventListener("touchstart",Wo,!0),e.addEventListener("touchmove",Wo,!0),e.addEventListener("touchcancel",Wo,!0),e.addEventListener("touchend",Wo,!0))}function wte(e){e&&(e.removeEventListener("touchstart",Wo,!0),e.removeEventListener("touchmove",Wo,!0),e.removeEventListener("touchcancel",Wo,!0),e.removeEventListener("touchend",Wo,!0))}function Wo(e){e?.stopPropagation?.()}const Za=_("playing-card"),j5=({id:e,isDeckTopCard:t,title:n,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,p]=(0,u.useState)(!1),[C,g]=(0,u.useState)(0),x=Nt(),b=rt(),y=dn(),L=(0,u.useRef)(null),S=(0,u.useRef)(null),T=(0,u.useRef)(void 0),k=(0,u.useRef)(void 0),I=(0,u.useRef)(!1),E=(0,u.useCallback)(()=>{const{innerWidth:D}=window,F=L.current&&L.current.scrollHeight>L.current.clientHeight,V=D<C;F&&D>C&&g(D),p(F||V)},[C]),N=(0,u.useRef)(()=>{a(!0),c(!1)}),M=(0,u.useRef)(()=>{a(!1)});(0,u.useImperativeHandle)(o,()=>({onStartSortAttempt:N.current,onEndSortAttempt:M.current})),(0,u.useEffect)(()=>{const D=setTimeout(()=>{m(!1)},300);return()=>clearTimeout(D)},[]),(0,u.useEffect)(()=>{const D=S.current;if(!D)return;const F=()=>{a(!0),c(!1)},V=({dx:H,dy:K})=>{d(Q=>({x:Q.x+H,y:Q.y+K}))},U=()=>{a(!1)};return N.current=F,M.current=U,jte(D),As(D).draggable({inertia:!0,autoScroll:!1,modifiers:[As.modifiers.snap({targets:[(H,K)=>({x:H,y:K})],range:1/0,endOnly:!0,relativePoints:[{x:.5,y:.5}]})]}).on("dragstart",F).on("dragmove",V).on("dragend",U),E(),T.current=nu()(E,250),window.addEventListener("resize",T.current),()=>{wte(D),As(D).off("dragstart",F).off("dragmove",V).off("dragend",U),T.current&&(T.current.cancel(),window.removeEventListener("resize",T.current)),clearTimeout(k.current)}},[E]),(0,u.useEffect)(()=>{E()},[e,E]),(0,u.useEffect)(()=>{const D=I.current;I.current=r,D&&!r&&(c(!0),clearTimeout(k.current),k.current=setTimeout(()=>{d({x:0,y:0}),c(!1)},300))},[r]);const A=y?.backgroundType===re.ACCENT||y?.backgroundType===re.IMAGE,j=`translate3d(${l.x}px, ${l.y}px, 0)`,w={WebkitTransform:j,transform:j},P=Za("title",{"is-max-length":f}),R=Za({draggable:!0,moving:r,fail:i,reset:h}),O=A?Za("content"):Za("content").mix("brand--border"),B=b(n)??"";return(0,s.jsxs)("div",{"aria-hidden":!t,className:R,id:e.toString(),onMouseDown:D=>{D.preventDefault()},ref:S,style:w,children:[t&&(0,s.jsx)("div",{className:"visually-hidden-alw
174ays",children:`${x?.a11ySortingCurrentItem}: ${B}`}),(0,s.jsxs)(Kt,{"aria-hidden":"true",className:O,children:[(0,s.jsx)(je,{className:P,id:`card-title-${e}`,ref:L,value:n}),(0,s.jsx)("div",{className:Za("handle")}),(0,s.jsx)("div",{className:Za("status"),children:(0,s.jsx)("i",{className:"icon icon-check"})})]})]},`card-${e}`)},Du=_("restart-button");function Ate({allowTabNavigation:e=!0,onClick:t,onFocus:n=an,ref:o,text:r}){const a=Du({}).mix("button");return(0,s.jsx)("button",{"aria-hidden":!e,className:a,"data-testid":"quiz-take-again-button",onClick:t,onFocus:n,ref:o,tabIndex:aK(e),type:"button",children:(0,s.jsxs)("div",{className:Du("content"),children:[(0,s.jsx)("span",{className:Du("text").mix("brand--ui"),children:r}),(0,s.jsx)("i",{"aria-hidden":"true",className:Du("icon").mix("icon").mix("icon-reload")})]})})}const Rte=Ate,Ac=_("deck"),Pte=e=>e?.percentViewed===100,Mte=(e,t)=>`${e?.correctlyAnswered??0}/${t}`,Ote=(e,t)=>String(t?.lastIncorrectCardId)===String(e.id),Bte=({count:e,items:t,id:n,onReplay:o,progress:r,ref:a})=>{const i=Nt(),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=Pte(r),h=Mte(r,e),m=()=>{o?.({id:n})};return(0,s.jsxs)("div",{className:Ac({complete:r?.percentViewed===100}),children:[(0,s.jsx)("div",{className:Ac("spacer")}),d&&(0,s.jsxs)("div",{className:Ac("cardholder"),children:[(0,s.jsxs)("div",{className:Ac("title").mix("brand--ui"),children:[h," ",i?.sortingCardsCorrect]}),(0,s.jsx)(Rte,{allowTabNavigation:d,onClick:m,ref:l,text:i?.sortingReplay??""})]}),(0,s.jsx)("div",{className:Ac("content"),children:t.map((f,p)=>(0,s.jsx)(j5,{id:f.id,isDeckTopCard:c.current[p]===c.current[0],isIncorrect:Ote(f,r),ref:C=>{c.current[p]=C},title:f.title},f.id))})]})},zr=_("pile"),Dte=({id:e,lessonId:t,deckTopCard:n,nextCard:o,isComplete:r=!1,onCardDrop:a,onNavigateToNext:i,onNavigateToPrevious:c,onKeyDropStart:l,onKeyDropEnd:d,title:h,ref:m})=>{const[f,p]=(0,u.useState)(void 0),[C,g]=(0,u.useState)(!1),[x,b]=(0,u.useState)(!0),[y,L]=(0,u.useState)(!1),[S,T]=(0,u.useState)(!1),[k,I]=(0,u.useState)(0),E=(0,u.useRef)(null),N=(0,u.useRef)(null),M=(0,u.useRef)(null),A=(0,u.useRef)(void 0),j=(0,u.useRef)(void 0),w=(0,u.useRef)(void 0),P=(0,u.useRef)(void 0),R=(0,u.useRef)(void 0),O=Nt(),B=rt(),{announcePolite:D}=Ls(),F=(0,u.useEffectEvent)(()=>{if(r||!n)return;const Y=n.id.toString(),ne=n.pileId===e;a?.({id:t,itemId:Y,isCorrect:ne});const ee=B(n.title)??"",le=B(h)??"";if(ne){clearTimeout(j.current),clearTimeout(w.current),clearTimeout(P.current),p(n),g(!0),b(!1),D(`${O?.a11ySortingCorrect}. ${ee}, ${O?.a11ySortingCategory}: ${le}`);const J=B(o?.title)??"";J&&(P.current=setTimeout(()=>{D(`${O?.a11ySortingNextItem}. ${J}`)},500)),j.current=setTimeout(()=>{p(void 0),g(!1)},1500),w.current=setTimeout(()=>{b(!0)},1300)}else clearTimeout(j.current),clearTimeout(w.current),clearTimeout(P.current),p(void 0),g(!1),b(!0),D(O?.a11ySortingIncorrect??"")});(0,u.useImperativeHandle)(m,()=>({focus(){N.current?.focus()}}));const V=(0,u.useCallback)(()=>{const{innerWidth:Y}=window,ne=E.current&&E.current.scrollHeight>(E.current.offsetParent?.clientHeight??0),ee=Y<k;ne&&Y>k&&I(Y),T(ne||ee)},[k]),U=(0,u.useCallback)(()=>{if(r||!n)return;l?.();const Y=n.id.toString(),ne=n.pileId===e;a?.({id:t,itemId:Y,isCorrect:ne});const ee=B(n.title)??"",le=B(h)??"";if(ne){clearTimeout(j.current),clearTimeout(w.current),clearTimeout(P.current),p(n),g(!0),b(!1),D(`${O?.a11ySortingCorrect}. ${ee}, ${O?.a11ySortingCategory}: ${le}`);const J=B(o?.title)??"";J&&(P.current=setTimeout(()=>{D(`${O?.a11ySortingNextItem}. ${J}`)},500)),j.current=setTimeout(()=>{p(void 0),g(!1)},1500),w.current=setTimeout(()=>{b(!0)},1300)}else clearTimeout(j.current),clearTimeout(w.current),clearTimeout(P.current),p(void 0),g(!1),b(!0),D(O?.a11ySortingIncorrect??"")},[r,n,o,e,t,O,h,B,l,a,D]),H=(0,u.useCallback)(Y=>{Mo(Y)?Hx(()=>c?.())(Y):Oo(Y)&&Hx(()=>i?.())(Y)},[c,i]),K=(0,u.useCallback)(()=>{r||(U(),clearTimeout(R.current),R.current=setTimeout(()=>d?.(),100))},[U,d,r]),Q=(0,u.useCallback)(()=>{L(!0)},[]),z=(0,u.useCallback)(()=>{L(!1)},[]);(0,u.useEffect)(()=>{const Y=M.current;if(!Y)return;const ne=J=>{const te=As.getElementRect(J.target),he={x:te.left+te.width/2,y:te.top+te.height/2};J.draggable.draggable({snap:{targets:[he]}})},ee=J=>{J.draggable.draggable({snap:{targets:[(te,he)=>({x:te,y:he})]}})},le=J=>{J.draggable.draggable({snap:{targets:[(te,he)=>({x:te,y:he})]}}),J.stopPropagation?.(),J.preventDefault?.(),F()};return As(Y).dropzone({overlap:"pointer"}).on("dragenter",ne).on("dragleave",ee).on("drop",le),V(),A.current=nu()(V,250),window.addEventListener("resize",A.current),()=>{As(Y).off("dragenter",ne).off("dragleave",ee).off("drop",le),clearTimeout(j.current),clearTimeout(w.current),clearTimeout(P.current),clearTimeout(R.current),A.current&&(A.current.cancel(),window.removeEventListener("resize",A.current))}},[]);const W=q()(zr(),{"drop-success":C,complete:r}),$=q()(zr("content"),{"drop-animating":!x&&!y}),G=zr("title",{"is-max-length":S}),Z=B(h)??O?.a11ySortingCategories??"Categories";return(0,s.jsx)("div",{className:W,ref:M,children:(0,s.jsx)("div",{className:zr("wrapwrap"),children:(0,s.jsxs)(Kt,{className:zr("wrap"),overrideBackgroun
174d:!0,children:[(0,s.jsx)("div",{"aria-hidden":"true",className:zr("message"),children:(0,s.jsx)(je,{className:G,ref:E,value:h})}),(0,s.jsx)("button",{"aria-disabled":r,"aria-label":Z,className:$,disabled:r,onBlur:z,onClick:K,onFocus:Q,onKeyDown:H,ref:N,type:"button",children:f&&(0,s.jsx)(j5,{id:f.id,title:f.title})}),(0,s.jsx)("div",{className:zr("background")})]})})})},Vp=_("sorting"),Fte=(e,t)=>!t||!t.items?e:e.filter(n=>!t.items?.[n.id]?.isViewed),Hte=({id:e,items:t,piles:n,onCardDrop:o,onReplay:r,progress:a})=>{const[i,c]=(0,u.useState)(()=>Bu()(t)),[l,d]=(0,u.useState)(!1),h=(0,u.useRef)([]),m=(0,u.useRef)(null),f=(0,u.useRef)(a?.retryAttempts),p=(0,u.useRef)(a?.percentViewed),C=(0,u.useRef)(void 0),g=(0,u.useRef)(void 0),x=(0,u.useRef)(void 0),b=Nt(),y=rt(),{announcePolite:L}=Ls(),S=(0,u.useEffectEvent)(()=>{h.current[0]?.focus()}),T=(0,u.useEffectEvent)(()=>{const j=a?.correctlyAnswered??0,w=t.length;L(`${j} ${b?.a11ySortingCompleteOf} ${w} ${b?.a11ySortingComplete}`)}),k=(0,u.useEffectEvent)(()=>{m.current?.focusReplayButton()});(0,u.useEffect)(()=>{const j=w=>{const{blockId:P,cardId:R}=Sa(w.detail.path,["block","card"]);e!==P||!R||c(O=>{const B=O.find(F=>F.id===R),D=O.filter(F=>F.id!==R);return B?[B,...D]:O})};return window.addEventListener(Ke,j),()=>{window.removeEventListener(Ke,j)}},[e]),(0,u.useEffect)(()=>{const j=a?.retryAttempts,w=f.current;return j!==w?(f.current=j,c(Bu()(t)),clearTimeout(C.current),C.current=setTimeout(()=>{S()},100)):c(P=>{const R=t.filter(D=>!P.find(F=>F.id===D.id));return[...P.filter(D=>t.find(F=>F.id===D.id)).map(D=>{const F=t.find(V=>V.id===D.id);return F?{...D,...F}:D}),...R]}),()=>{clearTimeout(C.current)}},[t,a?.retryAttempts]),(0,u.useEffect)(()=>{const j=a?.percentViewed,w=p.current;return j===100&&w!==100&&(d(!0),clearTimeout(g.current),g.current=setTimeout(()=>{T()},500),clearTimeout(x.current),x.current=setTimeout(()=>{k()},100)),j!==100&&w===100&&d(!1),p.current=j,()=>{clearTimeout(g.current),clearTimeout(x.current)}},[L,a?.correctlyAnswered,a?.percentViewed,t.length]);const I=Fte(i,a),E=b?.sortingLandmark??"",N=I?.[0],M=N?y(N.title)??"":"",A=l?b?.a11ySortingCategoriesComplete:M?`${b?.a11ySortingCategories}. ${M}`:b?.a11ySortingCategories;return(0,s.jsxs)("div",{"aria-label":E,className:Vp(),role:"group",children:[(0,s.jsx)("div",{className:Vp("row"),children:(0,s.jsx)(Bte,{count:i.length,id:e,items:I,onReplay:r,progress:a,ref:m})}),(0,s.jsx)("ul",{"aria-label":A,className:Vp("row"),role:"list",children:n.map((j,w)=>(0,s.jsx)("li",{role:"listitem",children:(0,s.jsx)(Dte,{deckTopCard:I?.[0],id:j.id,isComplete:l,lessonId:e,nextCard:I?.[1],onCardDrop:o,onKeyDropEnd:()=>{m.current?.endKeyDrop()},onKeyDropStart:()=>{m.current?.startKeyDrop()},onNavigateToNext:()=>iK({list:h.current,currentIndex:w}),onNavigateToPrevious:()=>cK({list:h.current,currentIndex:w}),ref:P=>{h.current[w]=P},title:j.title})},j.id))})]})},w5=()=>()=>{},$te=e=>{const{animateBlockEntrance:t,blockId:n,initiallyVisible:o,items:r,onCardDrop:a=w5,onReplay:i=w5,piles:c,progress:l}=e;return(0,s.jsx)(Ae,{type:"sorting-activity",children:(0,s.jsx)(He,{animateBlockEntrance:t,initiallyVisible:o,isLearner:!0,children:(0,s.jsx)(Hte,{id:n,items:r,onCardDrop:a(e),onReplay:i(e),piles:c,progress:Lt()({},["items",n],l)})})})};function _te({accentColor:e,backgroundType:t,blockBackgroundColor:n,noteColor:o,imageBackgroundDefault:r="#ffffff"}){return o!=null&&o!==""?o:Vte({accentColor:e,backgroundType:t,blockBackgroundColor:n,imageBackgroundDefault:r})}function Vte({accentColor:e,backgroundType:t,blockBackgroundColor:n,imageBackgroundDefault:o="#ffffff"}){if(t!==re.IMAGE&&n==null)return"#000000b3";switch(t){case re.IMAGE:return o;case re.LIGHT:case re.GRAY:return ss(.9,e);case re.DARK:return"#494949";case re.BLACK:return"#333333";default:{if(!n)return e;switch(ga(n)){case vt.LIGHT:return ss(.3,n);case vt.MED:return Is(.2,n);case vt.DARK:case vt.NEAR_BLACK:return Is(.4,n);default:return e}}}}var zte=v(49860);const Dn=_("block-statement");class Ute extends zte.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:n,type:o,labels:r,lessonId:a,media:i,settings:c},{paragraph:l}){const d=o==="note",h=n(Array.isArray(i)?{}:i),m=!!h?.audio,f=xs(h,c.audioPosition,!1,"statement"),p=(0,s.jsx)("div",{className:Dn("quote"),children:f.renderOrder.map((C,g)=>{if(C==="text")return(0,s.jsx)("div",{children:(0,s.jsx)(Qe,{value:l})},`text-${g}`);if(C==="audio"&&m){const x=f.renderOrder.indexOf("audio")<f.renderOrder.indexOf("text");return(0,s.jsx)("div",{className:Dn("audio-container",{top:x,bottom:!x}),children:(0,s.jsx)(Jt,{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,s.jsx)(Zte,{getL10nValue:n,media:i,children:p}):p}render(){const{animateBlockEntrance:t,isLearner:n,items:o,renderText:r=this.renderTextDelegate,settings:a,type:i,initiallyVisible:c}=this.props,{entranceAnimation:l,divider:d=!0,dividerPadding:h=KX(i),dividerSize:m=WX(i),noteIcon:f=!0,noteSize:p="sm",statementWidth:C=QX(i)}=a,g=JX(C),x=eq(h),b=tq(m),y=p,L=i==="a"||i==="b"||i==="d",S=i==="note",T=Dn({[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-${y}`]:S,[`note-size-${y}-no-icon`]:S&&!f,"no-animation":!l});return(0,s.jsx)(Ae,{className:T.toString(),children:(0,s.jsx)("div",{className:Dn("wrap"),children:(0,s.jsx)("div",{className:Dn("container"),children:(0,s.jsx)("div",{className:Dn("row"),children:o.slice(0,1).map(k=>(0,s.jsx)(He,{animateBlockEntrance:t,animateIn:this.getEntranceAnimationType(),duration:this.getEntranceAnimationDuration(),initiallyVisible:c,isLearner:n,children:(0,s.jsxs)("div",{className:Dn("col"),children:[(0,s.jsx)("div",{className:Dn("divider-top-container"),children:(0,s.jsx)("div",{className:Dn("divider-top")})}),r(this.props,k),(0,s.jsx)("div",{className:Dn("divider-bottom")})]})}
174,k.id))})})})})}}const Rc=it(Ute),Gte=Rc,Wte=e=>(0,s.jsx)(Rc,{type:"b",...e}),Kte=e=>(0,s.jsx)(Rc,{type:"c",...e}),Qte=e=>(0,s.jsx)(Rc,{type:"d",...e}),Yte=e=>(0,s.jsx)(Rc,{type:"note",...e}),Zte=({children:e,getL10nValue:t,media:n})=>{const o=dn(),{accentColor:r,cardMode:a,cornerRadius:i,courseColor:c,customBackgroundColorContrast:l,noteIcon:d=!0,noteIconColor:h}=o,m=o.noteColor,f=o.noteColorContrast,{theme:p}=$e(),C=yn(),g=Vn(),x=g===re.COLOR,b=g===re.ACCENT,y=p?.accentContrast,L=g===re.DARK||g===re.BLACK,S=m!=null&&m!=="",k=x||b||L||S?_n.TRANSPARENT:a,I=S&&(f??Le.AUTO)===Le.AUTO||y===Le.AUTO&&b||l===Le.AUTO&&x,E=(0,u.useMemo)(()=>_te({accentColor:r??c,backgroundType:g,blockBackgroundColor:C,noteColor:m,imageBackgroundDefault:""}),[r,g,C,c,m]),N=S?f??Le.AUTO:g===re.COLOR?l:y,M=Ut({backgroundColor:E,contrast:N}),A={"--color-background":E,...(I||S)&&{"--color-text":M},...i&&{"--corner-radius":`${Number(i)}px`},...h&&{"--color-theme-decorative":h},...S&&{"--color-theme":m}},j=Dn("note-icon",{off:!d}),P=(t?t(Array.isArray(n)?{}:n):void 0)?.image,R=P?.key&&Object.keys(P).length>0,O=R?qI(P)?mt(P.key):gt(P):null,B=()=>d?R&&O?(0,s.jsx)("div",{"aria-hidden":!0,className:Dn("note-icon__custom"),style:{WebkitMaskImage:`url('${O}')`,maskImage:`url('${O}')`}}):(0,s.jsx)(ae,{name:"circle-info"}):null;return(0,s.jsxs)(Kt,{cardMode:k,className:Dn("note-card"),style:A,children:[(0,s.jsx)("div",{className:j,children:B()}),e]})},ys=_("block-step"),Xte=e=>{const{blockId:t,disableZoom:n,enableVideoPlaybackSpeed:o,isOverlayAudio:r,item:a,labels:i,lessonId:c,lessonNumber:l,mediaType:d,audioPosition:h}=e,{settings:m}=a,f=we(a.media)??{},p=d==="audio"&&f.audio,C=d==="embed"&&f.embed,g=d==="image"&&f.image,x=d==="video"&&f.video;if(!p&&!C&&!g&&!x&&!(d==="image-with-audio"&&r))return;const y=f.embed?$r(f.embed):void 0,L=!!f.image,S=!!f.audio,T=L?f.image.align:"center",k=ys("media",{audio:S&&!r,"audio-and-embed":!!(f.audio&&f.embed),"image-with-audio":r,[`image-with-audio-${T}`]:r&&!!T,"audio-on-bottom":S&&!r&&h==="bottom",linkEmbed:y==="link",videoEmbed:y==="video",visual:!r&&L||!Et()(f.video)}),I=m||{};return(0,s.jsx)("div",{className:k,children:(0,s.jsx)(Jt,{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:n,...I},shouldPause:!0})})},qte=e=>{const{headingLevel:t,innerRef:n,item:o,isActive:r,loadMedia:a,audioPosition:i,onFocus:c,renderTitle:l,renderDescription:d,style:h}=e,{id:m}=o,f=ys({active:r}),p=Mn(),C=we(o.step),g=we(o.step,p),x=!!(C||g),b=!!o.title,y=t||2,L=`h${y}`,S=`h${y+1}`,T=we(o.media),k=xs(T,i,!0,"timeline"),I=we(o.description),E=(0,u.useMemo)(()=>!!Object.keys(T??{}).length||!!qm(I).value?.length,[T,I]),N=()=>{const M={audio:{item:{...o,media:k.audioOnlyMedia||T},mediaType:"audio"},image:{item:{...o,media:k.imageOnlyMedia||T},mediaType:"image"},video:{item:{...o,media:k.videoOnlyMedia||T},mediaType:"video"},embed:{item:{...o,media:k.embedOnlyMedia||T},mediaType:"embed"},overlay:{mediaType:"image-with-audio",isOverlayAudio:!0}};return(0,s.jsx)(s.Fragment,{children:k.renderOrder.map((A,j)=>{if(A==="text")return d?(0,s.jsx)("div",{className:ys("description"),children:d(o)},`text-${j}`):(0,s.jsx)(je,{className:ys("description"),value:o.description},`text-${j}`);if(!T||!a)return null;const w=M[A];return w?(0,u.createElement)(Xte,{...e,...w,key:`${A}-${j}`}):null})})};return(0,s.jsx)(Ae,{children:(0,s.jsx)("div",{className:f,"data-id":m,ref:n,style:h,children:(0,s.jsx)(Kt,{className:ys("body"),onFocus:c,children:(0,s.jsxs)("div",{className:ys("main-wrap"),children:[(0,s.jsxs)("div",{className:ys("heading",{solo:!E}),children:[x&&(0,s.jsx)("div",{className:ys("step"),children:(0,s.jsx)(L,{children:(0,s.jsx)(Sn,{fallback:g,value:o.step})})}),(b||l)&&(0,s.jsx)("div",{className:ys("title"),children:l?l(o):(0,s.jsx)(S,{children:(0,s.jsx)(je,{value:o.title})})})]}),(0,s.jsx)("div",{className:ys("main"),children:N()})]})})})})},Jte=e=>{const{id:t,settings:n,items:o,onEnter:r,enableVideoPlaybackSpeed:a,initiallyVisible:i,isLearner:c,labels:l,lessonId:d,renderTitle:h,renderDescription:m}=e,f=o[0],p=n.audioPosition,C=!(n.zoomOnClick??!0),g=n.headingLevel,x=(0,u.useCallback)((y,L)=>{r?.({id:t,payload:{activeIndex:y,itemId:L}})},[t,r]),b=(0,s.jsx)(qte,{audioPosition:p,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":n.cornerRadius!=null?`${n.cornerRadius}px`:"max(8px, 0.5em)"}});return c?(0,s.jsx)(He,{animateBlockEntrance:!0,className:ys("animate").toString(),initiallyVisible:i,isLearner:!0,children:b}):b},fe=_("block-survey"),zp={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"}]},A5=zp[5].map(e=>e.defaultLabel),Fu=e=>{const t=M5(e.labels?.length);return zp[t]??zp[Hu]},R5=(e,t)=>{const n=Fu(e).findIndex(o=>o.value===t);return n===-1?void 0:n+1},ene=(e,t)=>Fu(e)[t-1]?.value,tne=2,nne=10,P5=5,sne=7,Hu=3,one=5,M5=e=>e===2||e===3||e===4||e===5?e:Hu,Pc=null,ive=e=>(Pc[e]??Pc[Hu]).map(t=>A5[t]),cve=(e,t)=>
174{const n=M5(e?.length),o=Pc[n]??Pc[Hu],r=Pc[t],a=[...A5];return e?.forEach((i,c)=>{const l=o[c];l!==void 0&&(a[l]=i)}),r.map(i=>a[i])},Xa=e=>Array.isArray(e)?e.length===0:!e||e.trim()==="",rne=(e,t,n)=>{const o=n?.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=ene(a,Number(i));c!=null&&(r[a.id]=c)}else r[a.id]=String(i);return r},{})},ane=(e,t)=>t?.items?.[e]?.isSubmitted??!1,O5=(e,t)=>(0,s.jsx)(Qe,{className:"block-survey__question-title",id:t,value:e.question}),ine=e=>(0,s.jsx)(Qe,{value:e.startLabel}),cne=e=>(0,s.jsx)(Qe,{value:e.endLabel}),lne=(e,t)=>(0,s.jsx)(Qe,{className:"block-survey__rating-label",value:e.labels?.[t]});function dne({animateBlockEntrance:e,blockId:t,initiallyVisible:n,isLearner:o,items:r=[],labels:a,onSurveySubmitted:i=an,onSurveyPartialResponse:c=an,lessonId:l,onStep:d,onSubmit:h,progress:m,renderLinearScaleEndLabel:f=cne,renderLinearScaleStartLabel:p=ine,renderQuestionTitle:C=O5,renderRatingLabel:g=lne,settings:x={},title:b}){const y=rt(),L=rs(),[S,T]=(0,u.useState)(()=>rne(t,r,m)),[k,I]=(0,u.useState)(()=>ane(t,m)),[E,N]=(0,u.useState)(!1),[M,A]=(0,u.useState)(!1),[j,w]=(0,u.useState)(new Set),[P,R]=(0,u.useState)(0),O=(0,u.useRef)(null),B=(0,u.useRef)(null),D=(0,u.useRef)(!1),F=(0,u.useCallback)(X=>{B.current=X},[]),{announcePolite:V}=Ls(),U=(0,Fe.A)(k),H=x.cardMode==="TRANSPARENT",K=`validation-error-${t}`,Q=x.surveyWidth??76,z=Su(Q),W=(0,u.useCallback)((X,de)=>{T(Ie=>({...Ie,[X]:de}));const Ce=r.find(Ie=>Ie.id===X),pe=Ce?.questionType==="RATING"?R5(Ce,de):void 0;c({itemId:X,response:pe}),j.has(X)&&(w(ge=>{const ce=new Set(ge);return ce.delete(X),ce}),r.find(ge=>ge.id===X)&&r.filter(ce=>ce.isRequired&&ce.id!==X&&Xa(S[ce.id])).length===0&&A(!1))},[j,r,c,S]),$=(0,u.useCallback)((X,de)=>{T(Ce=>({...Ce,[X]:de})),c({itemId:X,response:de}),j.has(X)&&(w(pe=>{const Ie=new Set(pe);return Ie.delete(X),Ie}),r.filter(pe=>pe.isRequired&&pe.id!==X&&Xa(S[pe.id])).length===0&&A(!1))},[j,r,c,S]),G=(0,u.useCallback)((X,de)=>{T(Ce=>{const pe=Ce[X],Ie=Array.isArray(pe)?pe:[],ge=Ie.includes(de)?Ie.filter(ce=>ce!==de):[...Ie,de];return{...Ce,[X]:ge}}),j.has(X)&&(w(pe=>{const Ie=new Set(pe);return Ie.delete(X),Ie}),r.filter(pe=>pe.isRequired&&pe.id!==X&&Xa(S[pe.id])).length===0&&A(!1))},[j,r,S]),Z=(0,u.useCallback)((X,de)=>{T(Ce=>({...Ce,[X]:de})),c({itemId:X,response:Number(de)}),j.has(X)&&(w(pe=>{const Ie=new Set(pe);return Ie.delete(X),Ie}),r.find(pe=>pe.id===X)&&r.filter(Ie=>Ie.isRequired&&Ie.id!==X&&Xa(S[Ie.id])).length===0&&A(!1))},[j,r,c,S]),Y=(0,u.useCallback)((X,de,Ce)=>{if(Ce&&de.length>Ce)return;const pe=S[X]||"",Ie=Ce&&de.length===Ce&&pe.length<Ce;T(ge=>({...ge,[X]:de})),c({itemId:X,response:de}),Ie&&V(`Character limit reached. ${Ce} characters maximum.`),j.has(X)&&de.trim()!==""&&(w(ce=>{const Re=new Set(ce);return Re.delete(X),Re}),r.filter(ce=>ce.isRequired&&ce.id!==X&&Xa(S[ce.id])).length===0&&A(!1))},[V,r,c,S,j]),ne=(0,u.useCallback)(async()=>{if(!t||!l){console.error("Missing blockId or lessonId");return}N(!0);try{const X=r.flatMap(de=>{const Ce=S[de.id],pe=Array.isArray(Ce)?"":Ce||"",Ie=y(de.question)??"",ge={id:String(t),lessonId:String(l),itemId:de.id,questionTitle:An(String(Ie)),surveyTitle:An(String(y(b)??"")),isUnfinished:!1};if(de.questionType==="RATING"){const ce=R5(de,pe);if(ce===void 0)return[];const Re=Fu(de),en=Object.fromEntries(Re.map((tn,Qt)=>[Qt+1,y(de.labels?.[Qt])??tn.defaultLabel]));return[{...ge,ratingOptions:en,type:de.questionType,response:ce}]}if(de.questionType==="LINEAR_SCALE")return[{...ge,type:"LINEAR_SCALE",response:pe===""?void 0:Number(pe)}];if(de.questionType==="MULTIPLE_CHOICE"||de.questionType==="MULTIPLE_RESPONSE"){const ce=de.choices??[],en=(Array.isArray(Ce)?Ce:Ce?[Ce]:[]).flatMap(tn=>{const Qt=ce.find(nn=>nn.id===tn);return Qt?[{id:Qt.id,title:An(String(y(Qt.title)??""))}]:[]});return[{...ge,type:de.questionType,response:en}]}return[{...ge,type:de.questionType==="SHORT_RESPONSE"?"SHORT_RESPONSE":"LONG_RESPONSE",response:pe}]});window.Runtime?.reportUngradedAnswers&&await window.Runtime.report
174UngradedAnswers(X),r.forEach(de=>d?.({id:de.id})),h?.(S),I(!0),i()}catch(X){console.error("Failed to submit survey:",X)}finally{N(!1)}},[t,l,r,S,d,h,b,y,i]),ee=(0,u.useCallback)(X=>{if(X.preventDefault(),E)return;const Ce=r.filter(pe=>pe.isRequired).filter(pe=>Xa(S[pe.id]));if(Ce.length>0){A(!0),w(new Set(Ce.map(pe=>pe.id))),D.current=!0,R(pe=>pe+1);return}ne()},[E,ne,r,S]);(0,u.useEffect)(()=>{D.current&&B.current&&(B.current.focus(),D.current=!1)},[P]),(0,u.useEffect)(()=>{!U&&k&&O.current&&O.current.focus()},[k,U]);const le=(0,u.useRef)(null),J=(0,u.useRef)(new Map),te=(0,u.useCallback)((X,de)=>{const Ce=J.current;de?Ce.set(String(X),de):Ce.delete(String(X))},[]),he=C!==O5;(0,u.useEffect)(()=>{if(!he)return;const X=le.current;if(!X)return;const de=`.${String(fe("question-text"))}`,Ce=pe=>{if(pe.button!==0)return;const Ie=pe.target;if(!(Ie instanceof HTMLElement))return;const ge=Ie.closest(de);if(!(ge instanceof HTMLElement)||Ie.closest('[contenteditable="true"]'))return;const ce=ge.dataset.surveyItemId,Re=ce==null?void 0:J.current.get(ce);Re&&(pe.preventDefault(),Re.setFocus())};return X.addEventListener("mousedown",Ce),()=>X.removeEventListener("mousedown",Ce)},[he]);const _e=(X,de)=>{const Ce=S[X.id]||"",pe=`survey-q-${X.id}`,Ie=`${pe}-char-count`,ge=`${pe}-error`,ce=j.has(X.id),Re=ce&&de===r.findIndex(Ze=>j.has(Ze.id));if(X.questionType==="LINEAR_SCALE"){const Ze=Math.min(nne,Math.max(tne,X.scaleMax??one)),Zt=Array.from({length:Ze},(Oe,ct)=>ct+1),Rt=fe("linear-scale-options",{wide:Ze<=P5,medium:Ze>P5&&Ze<=sne}),ke=fe("linear-scale",{error:ce});return(0,s.jsxs)("fieldset",{"aria-describedby":ce?ge:void 0,className:fe("question",{error:ce}),ref:Re?F:void 0,tabIndex:-1,children:[(0,s.jsxs)("legend",{className:fe("question-text"),"data-survey-item-id":String(X.id),children:[C(X,pe,te),X.isRequired&&(0,s.jsxs)("span",{className:fe("required-indicator"),children:[" ",(0,s.jsx)("span",{"aria-hidden":"true",children:"*"}),(0,s.jsx)("span",{className:"visually-hidden-always",children:a.surveyRequired})]})]}),(0,s.jsx)("div",{className:fe("interactive"),children:(0,s.jsxs)("div",{className:ke,children:[(0,s.jsx)("div",{className:fe("linear-scale-label"),children:p(X)}),(0,s.jsx)("div",{className:Rt,children:Zt.map(Oe=>{const ct=Ce===String(Oe);return(0,s.jsxs)("label",{className:fe("linear-scale-option"),children:[(0,s.jsx)("span",{className:fe("linear-scale-number"),children:Oe}),(0,s.jsx)("div",{className:fe("linear-scale-indicator"),children:(0,s.jsx)(ae,{className:fe("linear-scale-dot",{active:ct}),"data-testid":ct?"linear-scale-dot-active":"linear-scale-dot",name:"circle-solid"})}),(0,s.jsx)("input",{checked:ct,className:fe("linear-scale-input"),name:`survey-${X.id}`,onChange:()=>Z(X.id,String(Oe)),type:"radio",value:String(Oe)})]},Oe)})}),(0,s.jsx)("div",{className:fe("linear-scale-label"),children:f(X)})]})}),ce&&(0,s.jsxs)("div",{className:fe("error-message"),id:ge,children:[(0,s.jsx)(ae,{"aria-hidden":"true",name:"alert-circle"})," ",a.surveyRatingRequired]})]},X.id)}if(X.questionType==="RATING"){const Ze=Fu(X).map((Oe,ct)=>({value:Oe.value,label:X.labels?.[ct],icon:Oe.icon})),Zt=fe("question",{error:ce}),Rt=fe("rating-options",{error:ce}),ke=ce?ge:void 0;return(0,s.jsxs)("fieldset",{"aria-describedby":ke,className:Zt,ref:Re?F:void 0,tabIndex:-1,children:[(0,s.jsxs)("legend",{className:fe("question-text"),"data-survey-item-id":String(X.id),children:[C(X,pe,te),X.isRequired&&(0,s.jsxs)("span",{className:fe("required-indicator"),children:[" ",(0,s.jsx)("span",{"aria-hidden":"true",children:"*"}),(0,s.jsx)("span",{className:"visually-hidden-always",children:a.surveyRequired})]})]}),(0,s.jsx)("div",{className:fe("interactive"),children:(0,s.jsx)("div",{className:Rt,children:Ze.map((Oe,ct)=>{const mo=Ce===Oe.value,Ds=(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("input",{checked:mo,className:fe("rating-input"),name:`survey-${X.id}`,onChange:()=>W(X.id,Oe.value),type:"radio",value:Oe.value}),(0,s.jsx)(ae,{"aria-hidden":"true",className:fe("rating-icon"),name:Oe.icon}),g(X,ct)]}),qo=fe("rating-option",{selected:mo,error:ce,"two-options":Ze.length===2,"three-options":Ze.length===3,"four-options":Ze.length===4,"five-options":Ze.length===5});return H?(0,s.jsx)(Kt,{cardMode:"WHITE",className:qo,tag:"label",children:Ds},Oe.value):(0,s.jsx)("label",{className:qo,children:Ds},Oe.value)})})}),ce&&(0,s.jsxs)("div",{className:fe("error-message"),id:ge,children:[(0,s.jsx)(ae,{"aria-hidden":"true",name:"alert-circle"})," ",a.surveyRatingRequired]})]},X.id)}if(X.questionType==="MULTIPLE_CHOICE"){const Ze=X.choices??[],Zt=fe("choices",{error:ce});return(0,s.jsxs)("fieldset",{"aria-describedby":ce?ge:void 0,className:fe("question",{error:ce}
174),ref:Re?F:void 0,tabIndex:-1,children:[(0,s.jsxs)("legend",{className:fe("question-text"),"data-survey-item-id":String(X.id),children:[C(X,pe,te),X.isRequired&&(0,s.jsxs)("span",{className:fe("required-indicator"),children:[" ",(0,s.jsx)("span",{"aria-hidden":"true",children:"*"}),(0,s.jsx)("span",{className:"visually-hidden-always",children:a.surveyRequired})]})]}),(0,s.jsx)("div",{className:fe("interactive"),children:(0,s.jsx)("ul",{className:Zt,children:Ze.map(Rt=>{const ke=Ce===Rt.id;return(0,s.jsx)("li",{className:fe("choice"),children:(0,s.jsxs)("label",{className:fe("choice-option",{selected:ke}),children:[(0,s.jsx)("input",{checked:ke,className:fe("choice-input"),name:`survey-${X.id}`,onChange:()=>$(X.id,Rt.id),type:"radio",value:Rt.id}),(0,s.jsx)("span",{"aria-hidden":"true",className:fe("choice-indicator"),children:(0,s.jsx)(ae,{className:fe("choice-dot",{active:ke}),name:"circle-solid"})}),(0,s.jsx)("span",{className:fe("choice-text"),children:(0,s.jsx)(Qe,{allowTabNavigation:!1,value:Rt.title})})]})},Rt.id)})})}),ce&&(0,s.jsxs)("div",{className:fe("error-message"),id:ge,children:[(0,s.jsx)(ae,{"aria-hidden":"true",name:"alert-circle"})," ",a.surveyMultipleChoiceRequired]})]},X.id)}if(X.questionType==="MULTIPLE_RESPONSE"){const Ze=X.choices??[],Zt=S[X.id],Rt=Array.isArray(Zt)?Zt:[],ke=fe("choices",{error:ce});return(0,s.jsxs)("fieldset",{"aria-describedby":ce?ge:void 0,className:fe("question",{error:ce}),ref:Re?F:void 0,tabIndex:-1,children:[(0,s.jsxs)("legend",{className:fe("question-text"),"data-survey-item-id":String(X.id),children:[C(X,pe,te),X.isRequired&&(0,s.jsxs)("span",{className:fe("required-indicator"),children:[" ",(0,s.jsx)("span",{"aria-hidden":"true",children:"*"}),(0,s.jsx)("span",{className:"visually-hidden-always",children:a.surveyRequired})]})]}),(0,s.jsx)("div",{className:fe("interactive"),children:(0,s.jsx)("ul",{className:ke,children:Ze.map(Oe=>{const ct=Rt.includes(Oe.id);return(0,s.jsx)("li",{className:fe("choice"),children:(0,s.jsxs)("label",{className:fe("choice-option",{selected:ct}),children:[(0,s.jsx)("input",{checked:ct,className:fe("choice-input"),name:`survey-${X.id}`,onChange:()=>G(X.id,Oe.id),type:"checkbox",value:Oe.id}),(0,s.jsx)("span",{"aria-hidden":"true",className:fe("choice-indicator",{checkbox:!0}),children:(0,s.jsx)(ae,{className:fe("choice-check",{active:ct}),name:"check"})}),(0,s.jsx)("span",{className:fe("choice-text"),children:(0,s.jsx)(Qe,{allowTabNavigation:!1,value:Oe.title})})]})},Oe.id)})})}),ce&&(0,s.jsxs)("div",{className:fe("error-message"),id:ge,children:[(0,s.jsx)(ae,{"aria-hidden":"true",name:"alert-circle"})," ",a.surveyMultipleResponseRequired]})]},X.id)}const en=Array.isArray(Ce)?"":Ce,tn=fe("question",{error:ce}),Qt=fe("text-input",{error:ce}),nn=X.questionType==="SHORT_RESPONSE"||X.questionType==="LONG_RESPONSE"?X.maxLength:void 0,Yt=[ce?ge:null,nn?Ie:null].filter(Boolean).join(" ")||void 0;return(0,s.jsxs)("div",{className:tn,children:[(0,s.jsxs)("div",{className:fe("question-text"),"data-survey-item-id":String(X.id),children:[C(X,pe,te),X.isRequired&&(0,s.jsxs)("span",{className:fe("required-indicator"),children:[" ",(0,s.jsx)("span",{"aria-hidden":"true",children:"*"}),(0,s.jsx)("span",{className:"visually-hidden-always",children:a.surveyRequired})]})]}),(0,s.jsx)("div",{className:fe("interactive"),children:(0,s.jsxs)("div",{className:fe("text-response"),children:[(0,s.jsx)("textarea",{"aria-describedby":Yt,"aria-invalid":ce?!0:void 0,"aria-labelledby":pe,"aria-required":X.isRequired?!0:void 0,className:Qt,maxLength:nn,onChange:Ze=>Y(X.id,Ze.target.value,nn),ref:Re?F:void 0,rows:X.questionType==="LONG_RESPONSE"?4:2,value:en}),nn&&(0,s.jsxs)("div",{className:fe("character-count"),children:[(0,s.jsxs)("span",{"aria-hidden":"true",children:[en.length," / ",nn]}),(0,s.jsx)("span",{className:"visually-hidden-always",id:Ie,children:`${a.a11yBlockSurveyCharCount} ${en.length} ${a.a11yPreposition} ${nn}`})]})]})}),ce&&(0,s.jsxs)("div",{className:fe("error-message"),id:ge,children:[(0,s.jsx)(ae,{"aria-hidden":"true",name:"alert-circle"})," ",a.surveyFreeResponseRequired]})]},X.id)};return(0,s.jsx)(om,{...x,children:(0,s.jsx)(Ae,{className:fe({presentation:L}),children:(0,s.jsx)(He,{animateBlockEntrance:e,initiallyVisible:n,isLearner:o,children:(0,s.jsx)("div",{children:(0,s.jsx)(Kt,{className:fe("container",{[`custom-width-${z}`]:!0}),children:k?(0,s.jsx)("div",{className:fe("confirmation"),ref:O,tabIndex:-1,
174children:(0,s.jsxs)("p",{className:fe("confirmation-text"),children:[(0,s.jsx)(ae,{name:"circle-check-regular"})," ",a.surveyConfirmation]})}):(0,s.jsxs)("form",{noValidate:!0,onSubmit:ee,children:[b&&(0,s.jsx)(Qe,{className:fe("title"),tagName:"h2",value:b}),(0,s.jsx)("div",{className:fe("questions"),ref:le,children:r.map((X,de)=>_e(X,de))}),(0,s.jsxs)("div",{className:fe("actions"),children:[(0,s.jsx)("div",{className:fe("validation-error",{visible:M}),id:`validation-error-${t}`,role:"alert",children:M&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(ae,{"aria-hidden":"true",name:"alert-circle"})," ",a.surveyValidationError]})}),(0,s.jsx)("div",{className:`${fe("submit")} brand--ui`,children:(0,s.jsx)("button",{"aria-describedby":M?K:void 0,className:fe("submit-button"),"data-testid":"survey-submit-button",disabled:E,type:"submit",children:E?a.surveySubmitting:a.surveySubmit})})]})]})})})})})})}const Ms=_("block-team"),une=e=>(0,s.jsx)(je,{className:Ms("name").toString(),value:e.name}),hne=e=>(0,s.jsx)(je,{className:Ms("role").toString(),value:e.description}),mne=({item:e,index:t,renderName:n,renderDescription:o})=>{const r=e.avatar?.image,a=Fh(r);return(0,s.jsxs)("li",{className:Ms("card"),children:[(0,s.jsx)("div",{className:Ms("avatar-wrap"),children:a?(0,s.jsx)(En,{alt:To(r?.alt),className:Ms("avatar").toString(),src:a}):(0,s.jsx)("div",{className:Ms("avatar",{placeholder:!0}).toString()})}),(0,s.jsxs)("div",{className:Ms("body"),children:[n(e,t),o(e,t)]})]})},fne=e=>{const{defaultBackgroundColor:t,items:n,renderName:o=une,renderDescription:r=hne}=e;return(0,s.jsx)(Ae,{className:Ms().toString(),defaultBackgroundColor:t,children:(0,s.jsx)("div",{className:Ms("container"),children:(0,s.jsx)("ul",{className:Ms("list"),"data-count":n.length,children:n.map((a,i)=>(0,s.jsx)(mne,{index:i,item:a,renderDescription:r,renderName:o},a.id))})})})},B5=_("block-text");function pne({children:e,item:t,labels:n}){const o="media"in t?t.media:void 0,r=we(o)?.image,a=gt(r),i=To(r?.alt??""),l=Dt()?.settings,d=l?.images,h=l?.zoomOnClick,m=(0,u.useRef)(void 0);let f=(0,s.jsx)(En,{alt:i,"data-l10n-id":Ot(o),ref:m,src:a});return h&&(f=(0,s.jsx)(Fy,{a11yNameButtonUnzoom:n?.a11yUnzoomImage,a11yNameButtonZoom:n?.a11yZoomImage,children:f})),(0,s.jsxs)("div",{className:B5("col"),children:[d&&r&&(0,s.jsx)("div",{className:B5("image"),children:f}),e]})}var gne=v(49860);const Os=_("block-text"),vne=class extends gne.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,s.jsx)(je,{value:t})}renderText(e){const{labels:t,takingSnapshot:n,variant:o}=this.props,r=o?.includes("column"),a="paragraph"in e?e.paragraph:void 0;return r||n?(0,s.jsx)(pne,{item:e,labels:t,children:(0,s.jsx)(Qe,{value:a||""})}):(0,s.jsx)(Qe,{className:Os("col"),value:a||""})}render(){const{blockId:e,columns:t,defaultBackgroundColor:n,heading:o,isLearner:r,items:a,labels:i,lessonId:c,media:l,settings:d,type:h,variant:m,renderText:f=this.renderTextDelegate,renderHeading:p=this.renderHeadingDelegate,getL10nValue:C}=this.props,g=C(l),x=Object.keys(g?.audio??{}).length>0,{audioPosition:b,entranceAnimation:y,cellPadding:L=1.5,tableWidth:S=76,textPadding:T=.8,textWidth:k=76}=d,I=m==="table",E=t===1,N=t>1,M=I?S:k,A=!I&&E,j=I,w=nq(L),P=sq(T),R=Su(M),O=Os({[h]:!A&&!j||N,[`${h}-custom-width`]:!N,[`${h}-custom-width-table-${R}`]:j,[`${h}-custom-width-text-${R}`]:A,[`heading-custom-text-padding-${P}`]:A,[`${h}-custom-cell-padding-${w}`]:j,"no-animation":!y,presentation:this.props.isPresentation}),B=t>2?Os("container-wide"):Os("container",{authoring:!r}),D=this.getHeadingComponent(),F=C(Array.isArray(l)?{}:l),V=xs(F,b);return(0,s.jsx)(Ae,{className:O.toString(),defaultBackgroundColor:n,children:(0,s.jsxs)("div",{className:B,"data-block-id":e,"data-block-text":"",children:[(0,s.jsx)("div",{className:Os("row"),children:o!==""?a.slice(0,1).map((U,H)=>(0,s.jsx)("div",{className:Os("col"),children:(0,s.jsx)("div",{className:Os("heading"),children:(0,s.jsx)(D,{children:p(U)})})},"id"in U?U.id:H)):null}),V.renderOrder.map((U,H)=>{if(U==="text")return(0,s.jsx)("div",{className:Os("row"),children:h!=="heading"?a.slice(0,t).map((K,Q)=>(0,s.jsx)(u.Fragment,{children:f(K)},"id"in K?K.id:Q)):null},`text-${H}`);
174if(U==="audio"&&x){const K=V.renderOrder.indexOf("audio")<V.renderOrder.indexOf("text");return(0,s.jsx)("div",{className:Os("row",{media:!0,top:K,bottom:!K,hasHeading:m==="heading paragraph"||m==="subheading paragraph"}),children:(0,s.jsx)("div",{className:Os("col",{media:!0}),children:(0,s.jsx)(Jt,{blockId:e,hasPadding:!1,index:e,item:{id:e,media:l},labels:i,lessonId:c,media:l,refs:`items:${e}`})})},`audio-${H}`)}})]})})}},Ko=e=>{const t=rt(),n=rs();return(0,s.jsx)(vne,{...e,getL10nValue:t,isPresentation:n})},D5=Ko,Cne=e=>(0,s.jsx)(Ko,{columns:2,type:"twocol",...e}),bne=e=>(0,s.jsx)(Ko,{columns:3,type:"threecol",...e}),xne=e=>(0,s.jsx)(Ko,{columns:4,type:"fourcol",...e}),yne=e=>(0,s.jsx)(Ko,{heading:"heading",type:"heading",...e}),Sne=e=>(0,s.jsx)(Ko,{heading:"subheading",type:"heading",...e}),Tne=e=>(0,s.jsx)(Ko,{heading:"heading",...e}),Lne=e=>(0,s.jsx)(Ko,{heading:"subheading",...e}),Qo=_("timeline-card"),kne=e=>{const{blockId:t,disableZoom:n,enableVideoPlaybackSpeed:o,isOverlayAudio:r,item:a,labels:i,lessonId:c,lessonNumber:l,mediaType:d,audioPosition:h}=e,{settings:m}=a,f=we(a.media)??{},p=d==="audio"&&f.audio,C=d==="embed"&&f.embed,g=d==="image"&&f.image,x=d==="video"&&f.video;if(!p&&!C&&!g&&!x&&!(d==="image-with-audio"&&r))return;const y=f.embed?$r(f.embed):void 0,L=!!f.image,S=!!f.audio,T=L?f.image.align:"center",k=Qo("media",{audio:S&&!r,"audio-and-embed":!!(f.audio&&f.embed),"image-with-audio":r,[`image-with-audio-${T}`]:r&&!!T,"audio-on-bottom":S&&!r&&h==="bottom",linkEmbed:y==="link",videoEmbed:y==="video",visual:!r&&L||!Et()(f.video)}),I=m||{};return(0,s.jsx)("div",{className:k,children:(0,s.jsx)(Jt,{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:n,...I}})})},Ine=e=>{const{headingLevel:t,innerRef:n,item:o,isActive:r,loadMedia:a,audioPosition:i,onFocus:c}=e,{id:l}=o,d=Qo({active:r}),h=!!o.date,m=!!o.title,f=t||2,p=`h${f}`,C=`h${f+1}`,g=we(o.media)??{},x=xs(g,i,!0,"timeline"),b=()=>{if(!g||!a)return null;const y={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,s.jsx)(s.Fragment,{children:x.renderOrder.map((L,S)=>{if(L==="text")return(0,s.jsx)(je,{className:Qo("description"),value:o.description},`text-${S}`);const T=y[L];return T?(0,u.createElement)(kne,{...e,...T,key:`${L}-${S}`}):null})})};return(0,s.jsx)("div",{className:d,"data-id":l,ref:n,children:(0,s.jsx)(Kt,{className:Qo("body"),onFocus:c,children:(0,s.jsx)("div",{className:Qo("main-wrap"),children:(0,s.jsxs)("div",{className:Qo("main"),children:[h&&(0,s.jsx)("div",{className:Qo("date"),children:(0,s.jsx)(p,{children:(0,s.jsx)(Sn,{value:o.date})})}),m&&(0,s.jsx)("div",{className:Qo("title"),children:(0,s.jsx)(C,{children:(0,s.jsx)(Sn,{value:o.title})})}),b()]})})})})},Mc=_("timeline"),Ene=e=>{const{audioPosition:t,disableZoom:n,enableVideoPlaybackSpeed:o,headingLevel:r,id:a,initiallyVisible:i,isBlock:c,isLearner:l,item:d,labels:h,lessonId:m,onFocus:f}=e,p=(0,s.jsx)(Ine,{audioPosition:t,blockId:a,disableZoom:n,enableVideoPlaybackSpeed:o,headingLevel:r,isActive:!0,item:d,labels:h,lessonId:m,lessonNumber:a,loadMedia:!0,onFocus:f});return c?l?(0,s.jsx)(He,{animateBlockEntrance:!0,className:Mc("animate").toString(),initiallyVisible:i,isLearner:!0,children:p}):p:null},Nne=e=>{const{id:t,items:n,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}=Sa(d.detail.path,["block","card"]);if(h!==t)return;const f=i.current.querySelector(`[data-id="${m}"]`);f&&!ef(f,"center")&&f.scrollIntoView({behavior:"instant",block:"center"})}return window.addEventListener(Ke,l),()=>{window.removeEventListener(Ke,l)}}),(0,s.jsx)("div",{"aria-label":o?.a11yBlockTimeline,className:"page__content-container",ref:i,role:"group",children:(0,s.jsx)("div",{className:Mc("wrapper"),children:(0,s.jsx)("div",{className:Mc(),children:(0,s.jsx)("ul",{className:Mc("container"),role:"list",children:n.map((l,d)=>(0,s.jsx)("li",{className:Mc("card-wrapper"),role:"listitem",children:Ene({index:d,item:l,onFocus:c,...e,disableZoom:!a.zoomOnClick,headingLevel:a.headingLevel,audioPosition:a.audioPosition})},d))})})})})},jne=({animateBlockEntrance:e,blockId:t,enableVideoPlaybackSpeed:n,initiallyVisible:o,isLearner:r,items:a,labels:i,lessonId:c,settings:l})=>(0,s.jsx)(He,{animateBlockEntrance:e,animateIn:"fadeIn",initiallyVisible:o,isLearner:r,children:(0,s.jsx)(Ae,{type:"timeline",children:(0,s.jsx)(Nne,{enableVideoPlaybackSpeed:n,id:t,initiallyVisible:o,isBlock:!0,isLearner:r,items:a,labels:i,lessonId:c,settings:l})})}),Yo=_("block-sequence"),wne=({label:e})=>(0,s.jsx)("span",{className:Yo("indicator-label"),children:we(e)??""}),Ane=e=>(0,s.jsx)(wne,{label:e.label}),Rne=e=>(0,s.jsx)(je,{className:Yo("description").toString(),value:e.description}),Up=e=>
174{const{color:t,defaultBackgroundColor:n,items:o,renderDescription:r=Rne,renderLabel:a=Ane,variant:i}=e,c=t?{"--block-sequence-color":t,"--block-sequence-on-color":$n(t)===Le.LIGHT?"#fff":"#000"}:void 0;return(0,s.jsx)(Ae,{className:Yo({[i]:!0}).toString(),defaultBackgroundColor:n,style:c,children:(0,s.jsx)("div",{className:Yo("container"),children:(0,s.jsx)("ol",{className:Yo("list"),"data-step-count":o.length,children:o.map((l,d)=>(0,s.jsxs)("li",{className:Yo("step"),"data-step-id":l.id,children:[(0,s.jsx)("div",{className:Yo("indicator"),children:a(l,d)}),(0,s.jsx)("div",{className:Yo("text"),children:r(l,d)})]},l.id))})})})},Pne=Lt()(null,["payload","result"]),Mne=e=>{if(e.meta?.thumbnail)return`${e.contentPrefix}/${e.meta.thumbnail}`},One=e=>e.meta?.version,F5=e=>e.src??null,Bne=e=>e.processing,Dne=Vs()(["payload","result","completion"]),Fne=Lt()(!1,["payload","result","score"]),Hne=zl()((e,t)=>{if(!t)return!1;const{majorLimit:n,minorLimit:o}=e,[r,a]=t.split("."),i=parseInt(r)===n&&Number(a)>=o;return Number(r)>n||i}),$ne={mobile:"?forcemobile=1&devicepreview=1&phone=1&rise=true",tablet:"?forcemobile=1&devicepreview=1&rise=true"},_ne=e=>{const t=No()(e.split("-"));return $ne[t]},Vne=Hne({majorLimit:3,minorLimit:13}),zne=(e,t,n,o)=>{const r=t&&_ne(n),a=r?`${e}${r}`:`${e}?rise=true`;if(o){const i=a.includes("?")?"&":"?";return`${a}${i}locale=${o}`}return a},H5="about:blank",Une="https://example.invalid",$5=new Set(["http:","https:"]),_5=e=>{if(e)try{const t=new URL(e);return $5.has(t.protocol)?t.href:void 0}catch{return}},Gne=()=>_5(Ne("CDN_USER_CONTENT_URI"))??_5(window.location.origin)??Une,V5=e=>{try{return $5.has(new URL(e,Gne()).protocol)}catch{return!1}},z5=e=>{const t=In(e);return typeof t=="string"?t:""},Wne=e=>{const t=z5(e);if(!t||t===H5||!V5(t))return;const n=z5(mt(t));return n&&n!==H5&&V5(n)?n:void 0};var Kne=v(49860);class Qne extends Kne.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:n,onStep:o}=this.props,r=No()(n),a=t(r?.media)?.storyline??{},i=One(a);Vne(i)||o(r)}canFullscreen(t){const{blockId:n,hasManySlBlocks:o}=this.props,{windowName:r}=t;return n===r||!o()}handleMessages(t){const{data:n}=t,{type:o}=n,r={"fullscreen:enter":this.handleFullscreenEnter,"fullscreen:exit":this.handleFullscreenExit,"course:update":this.handleCourseUpdate}[o];r&&r(n)}handleCourseUpdate(t){const{items:n,onFinishStoryline:o,onStep:r,blockId:a}=this.props,i=No()(n),{windowName:c}=t;if(a===c&&Dne(t)){const{score:l,success:d}=Pne(t);if(Fne(t)){const h=l.scaled*100;o?.(a,d,!0,h)}else o?.(a,!0,!1);r(i)}}handleFullscreenEnter(t){const{menuOpen:n,handleStorylineFullscreen:o}=this.props;this.canFullscreen(t)&&(n&&o(!0),this.setState({fullscreen:!0,reopenMenu:n}))}handleFullscreenExit(t){const{handleStorylineFullscreen:n}=this.props,{reopenMenu:o}=this.state;this.canFullscreen(t)&&(o&&n(!1),this.setState({fullscreen:!1,reopenMenu:!1}))}render(){const{animateBlockEntrance:t,getL10nValue:n,initiallyVisible:o,isLesson:r,isLearner:a,isOnlyBlockInStep:i,items:c,labels:{a11yBlockStoryline:l},settings:d,takingSnapshot:h}=this.props,m=No()(c),f=n(m?.media)?.storyline??{},{mediaWidth:p="0"}=d,C=i?{}:{display:r&&!F5(f)?"none":"block"},g=q()("blocks-storyline__wrapper",{"blocks-storyline__wrapper--small":p==="0","blocks-storyline__wrapper--medium":p==="1","blocks-storyline__wrapper--full":p==="2","blocks-storyline__wrapper--snapshot":h});return(0,s.jsx)(Ae,{className:"blocks-storyline",style:C,children:(0,s.jsx)(He,{animateBlockEntrance:t,initiallyVisible:o,isLearner:a,children:(0,s.jsx)("div",{"aria-label":l,className:g,role:"group",children:h?this.renderThumbnail(f):this.renderStorylineBlock(f)})})})}renderStorylineBlock(t){return Bne(t)?this.renderProcessing():F5(t)?this.renderItem(t):this.renderEmpty()}renderThumbnail(t){const n=Mne(t),o=`${Ne("CDN_USER_CONTENT_URI")}/${n}`;
174return(0,s.jsx)("img",{alt:"Thumbnail",src:o})}renderEmpty(){const{renderEmpty:t}=this.props;return typeof t=="function"?t():null}renderItem(t){const{fullscreen:n}=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,p=zne(d,a,i,r),C=Wne(p),x={paddingBottom:`${f.height/f.width*100}%`,...l!=null&&{"--corner-radius":`${Number(l)}px`}},b=q()("blocks-storyline__item__iframe",{"blocks-storyline__item__iframe--fullscreen":n});return(0,s.jsx)("div",{className:"blocks-storyline__item",style:x,children:(0,s.jsx)("iframe",{allowFullScreen:!0,allowtransparency:"true",className:b,loading:"lazy",name:o.toString(),ref:y=>{this.iframe=y},src:C,title:m})})}renderProcessing(){const{renderProcessing:t}=this.props;return typeof t=="function"?t():null}}const Yne=Y7(it(Qne));var wn=v(30467),Zne=v(28565),U5=v(84748),Xne=v(94556),G5=v.n(Xne);const fve=(e,t)=>n=>{const o=n.findIndex(a=>a.id==t);if(o===-1)return n;const r=n.slice();return r[o]=e(n[o]),r},pve=e=>t=>t.filter(n=>n.id!=e),gve=(e,t)=>n=>{const o=n.slice(),[r]=o.splice(e,1);return o.splice(t,0,r),o};function qne(e,t){const n=[];for(const o of t)if(n.push(o),e(o))break;return n}const Jne=e=>e.some(t=>t<0),W5=e=>Array.from(Array(e)),K5=(e,t)=>W5(t).map(()=>e),ese=(e,t,n,o)=>W5(n).map((r,a)=>a===o?t:e),vve=(e,t,n)=>n.some(o=>o[e]==t);function Cve(e,t,n){if(t>=n.length)return n.slice(0);const o=Math.floor(t/2),r=Math.ceil(t/2),a=e-o,i=e+r;return i>n.length?n.slice(n.length-t):a>=0?n.slice(a,i):n.slice(0,t)}const $u=(e,t)=>{const n=Math.min(e.length,t.length),o=new Array(n);for(let r=0;r<n;r++)o[r]=[e[r],t[r]];return o},Gp=(e,t,n=0)=>Math.round(Math.sqrt((1-n)*e**2+n*t**2)),tse=(e,t,n=0)=>Number(((1-n)*e+n*t).toFixed(2)),nse=([e=0,t=0,n=0,o=1])=>(0,Si.A)({space:"srgb",coords:[e/255,t/255,n/255],alpha:o},{format:"hex",collapse:!1}),Q5=(e,t,n)=>{const o=Bo(e),r=Bo(t);if(o==null||r==null)return null;const[a,i,c,l]=o,[d,h,m,f]=r;return nse([Gp(a,d,n),Gp(i,h,n),Gp(c,m,n),tse(l,f,n)])},sse=matchMedia("(forced-colors: active)");function Oc(){return sse.matches}const ose=({activeIndex:e,values:t,opts:n})=>{const{background:o,variant:r}=Dt(),{chartColor:a,lineCurve:i}=dn(),c=yn(),l=Oi(),d=n?.defaultFontColor,h=Vn(),m=h===re.IMAGE,p=we(o?.media)?.image?.overlayColor??ut.DARK,C=Oc();let g=a??l,x=c||"#fff";!a&&h===re.ACCENT||a===x?g=d:m&&(g=p===ut.DARK?"#fff":"#000",x=p===ut.DARK?"#000":"#fff"),C&&(g="Highlight",x="Canvas");let b=g,y=Array(t.length).fill(g);if(e!=null&&!C){const L=m&&p===ut.LIGHT?.2:.7,S=Q5(g,x,L)??g;b=S,y=ese(S,g,t.length,e)}return r==="bar"?{backgroundColor:y,data:t,hoverBackgroundColor:y}:{borderColor:b,cubicInterpolationMode:i==="linear"?"default":"monotone",data:t,lineTension:i==="linear"?0:void 0,pointBackgroun
174dColor:y,pointBorderColor:y,pointBorderWidth:0,pointHitRadius:20,pointHoverBackgroundColor:g,pointHoverBorderColor:g,pointHoverBorderWidth:0,pointRadius:4}};function rse({activeIndex:e,children:t,opts:n,values:o}){const r=ose({activeIndex:e,opts:n,values:o});return t(r)}class ase extends u.PureComponent{handleMouseEnter=()=>{this.props.onEvent(this.props.index)};handleMouseLeave=()=>{this.props.onEvent(null)};render(){const{activeIndex:t,identifier:n,index:o,label:r,value:a}=this.props,i=t!=null&&t!==o,c=q()("block-chart__cartesianLegendItem",{"block-chart__cartesianLegendItem--unfocused":i});return(0,s.jsxs)("div",{className:c,onMouseEnter:this.handleMouseEnter,onMouseLeave:this.handleMouseLeave,children:[(0,s.jsx)("dt",{className:"block-chart__cartesianLegendTerm",children:`${n}.`}),(0,s.jsxs)("dd",{className:"block-chart__cartesianLegendDefn","data-l10n-id":r.l10nId,children:[r.label,(0,s.jsx)("span",{className:"block-chart__cartesianLegendDefnPipe",role:"separator",children:"|"}),(0,s.jsx)("span",{className:"block-chart__cartesianLegendDefnVal",children:a})]})]})}}const ise=ase,cse=({activeIndex:e,labels:t,letters:n,onEvent:o,values:r})=>{const a=$u(n,$u(t,r));return a.length===0?null:(0,s.jsx)("dl",{className:"block-chart__cartesianLegend",children:a.map(([i,[c,l]],d)=>(0,s.jsx)(ise,{activeIndex:e,identifier:i,index:d,label:c,onEvent:o,value:l},i))})},lse=(0,u.memo)(cse);function dse(e){const t=this.getLabelForValue(e),n=15,o=t.split(" "),r=[];let a="";return o.forEach(i=>{(a+i).length>n?(r.push(a),a=i):a+=(a.length>0?" ":"")+i}),r.push(a),r}const use={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:n}=e[0];return`${t}: ${n}`}}
174,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:dse,padding:10}},y:{beginAtZero:!0,border:{display:!1},grid:{drawTicks:!1},ticks:{maxTicksLimit:8,padding:15}}}};function hse({values:e,contrastColor:t}){const n=Dt(),o=Vn(),r=o===re.IMAGE,a=(0,u.useMemo)(()=>Jne(e),[e]);let i,c;const d=we(n?.background?.media)?.image?.overlayColor??ut.DARK,h=r&&d===ut.LIGHT;switch(o){case re.LIGHT:case re.GRAY:case re.TINT:[i,c]=["#e1e1e1","#c9c9c9"];break;case re.DARK:case re.BLACK:case re.IMAGE:[i,c]=["#ffffff80","#ffffffe9"];break;case re.ACCENT:case re.COLOR:{[i,c]=t==="#000"?["#00000080","#0000001a"]:["#ffffff80","#ffffffe9"];break}}return r&&h&&([i,c]=["#00000080","#0000001a"]),a||(c=i),[i,c]}const mse=({onEvent:e,reduceMotion:t,shouldAnimate:n,values:o})=>{const r=yn(),{customBackgroundColorContrast:a}=dn(),i=$e(),c=rs(),l=Oi(),d=i?.theme?.accentContrast,h=Vn(),m=h===re.IMAGE,f=Dt(),p=Oc(),C=$n(r),g=!a&&f?.family==="chart",x=a??Le.DARK,b=g?C:x,L=we(f?.background?.media)?.image?.overlayColor??ut.DARK,S=m&&L===ut.LIGHT,T=h===re.ACCENT||h===re.COLOR,k=h===re.ACCENT?l:r,I=h===re.ACCENT?d:b,E=Ut({backgroundColor:k,contrast:I}),[N,M]=hse({values:o,contrastColor:E}),A=(0,u.useCallback)(w=>p&&m?S?"#000000":"#FFFFFF":w.tick.value===0?M:N,[N,p,M,m,S]);return(0,u.useMemo)(()=>{let w="#000";if(p)m?w=S?"#000000":"#FFFFFF":w="FieldText";else{switch(h){case re.DARK:case re.BLACK:case re.IMAGE:w="#fff";break}T&&(w=E),m&&S&&(w="#000")}const P=n&&!t?1e3:0;let R,O;p?m?(R=w,O=S?"#FFFFFF":"#000000"):(R="Highlight",O="HighlightText"):(R=w,O=w==="#000"||w==="#000000"||w===Le.DARK?"#FFFFFF":"#000000");const B=th()(use);return B.maintainAspectRatio=!c,B.animation.duration=P,B.defaultFontColor=w,B.onClick=e,B.onHover=e,B.plugins.tooltip.animation=!t,B.plugins.tooltip.backgroundColor=R,B.plugins.tooltip.titleColor=O,p&&!m?(B.scales.x.grid.color="FieldText",B.scales.y.grid.color="FieldText"):(B.scales.x.grid.color=N,B.scales.y.grid.color=A),B.scales.x.ticks.color=w,B.scales.y.ticks.color=w,p&&(m?B.plugins.legend.labels.color=S?"#000000":"#FFFFFF":B.plugins.legend.labels.color="FieldText"),B},[h,E,N,T,p,m,S,e,c,t,A,n])};function fse(e){const{children:t,onEvent:n,reduceMotion:o,shouldAnimate:r,values:a}=e,i=mse({onEvent:n,reduceMotion:o,shouldAnimate:r,values:a});return t(i)}var pse=v(7173),Wp=v.n(pse);const gse=/<mark>|<\/mark>/gm,vse=e=>t=>{const n=e(t.type).replace(gse,"")??"";return{label:Wp()(n,{length:30}),l10nId:Ot(t?.type)}},Cse=e=>parseFloat(e.value??"0"),Y5=(e,t)=>({labels:e.map(vse(t)),values:e.map(Cse)});function bse(e,t,n){const o=[];let r=0;return n.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(n.slice(r)),o}const xse=(e,t)=>(0,s.jsx)("mark",{children:e},t),yse=(e,t)=>bse(new RegExp(rq()(t),"igm"),xse,e),Z5=(e,t,n)=>{const o=Wp()(t,{length:e});return n?yse(o,n):o};function Sse(){const[e,t]=u.useState(null),n=u.useRef(null),{announcePolite:o}=Ls(),{labels:r}=aa()??{},{a11yBlockChartPreposition:a}=r??{},i=rs(),c=u.useCallback(C=>{t(C)},[]),l=u.useCallback(()=>{const C=n.current;if(!C)return;const g=i?C.canvas?.parentElement:null;if(g&&C.width){if(g.clientWidth>0){const x=g.clientWidth;let b=x*(C.height/C.width);g.clientHeight>0&&b>g.clientHeight&&(b=g.clientHeight),C.resize(x,b)}}else C.resize()},[i]),d=u.useCallback(()=>{n.current?.update()},[]),h=u.useCallback(()=>{l(),d()},[l,d]),m=u.useCallback(()=>{const C=n.current;if(C==null)return;const g=C.getDatasetMeta(0),x=g.data;if(!x?.length)return;const b=0,L=[{datasetIndex:0,element:g.data[b],index:b}];C.setActiveElements(L),C.tooltip?.setActiveElements(L,{x:0,y:0}),C.update(),c(b);const S=C.data.labels[b],T=C.data.datasets[0].data[b];setTimeout(()=>{o(`${b+1} ${a??""} ${x.length} - ${S}: ${T}`)},0)},[a,o,n,c]),f=u.useCallback(()=>{const C=n.current;if(C==null)return;const g=[];C.setActiveElements(g),C.tooltip?.setActiveElements(g,{x:0,y:0}),C.update(),c(null),o(null)},[o,n,c]),p=u.useCallback(C=>{const g=n.current;if(g==null)return;const x=g.getDatasetMeta(0),b=x.data;if(!b?.length)return;let y=!1,L=e;switch(C.key){case"ArrowLeft":y=!0,L=(e-1+b.length)%b.length;break;case"ArrowRight":y=!0,L=(e+1+b.length)%b.length;break;case"Home":y=!0,L=0;break;case"End":y=!0,L=b.length-1;break}if(y&&(C.stopPropagation(),C.preventDefault()),L!==e){const T=[{datasetIndex:0,element:x.data[L],index:L}];g.setActiveElements(T),g.tooltip?.setActiveElements(T,{x:0,y:0}
174),g.update(),c(L);const k=g.data.labels?.[L],I=g.data.datasets[0].data[L];o(`${L+1} ${a??""} ${b.length} - ${k}: ${I}`)}},[a,e,o,n,c]);return u.useEffect(()=>{l(),d()},[l,d]),u.useEffect(()=>{n.current&&n.current.update()},[e]),{activeIndex:e,chartRef:n,onBlur:f,onFocus:m,onKeyDown:p,onEvent:c,onResize:h}}function X5(e){const t=n=>{const{activeIndex:o,chartRef:r,onBlur:a,onEvent:i,onFocus:c,onKeyDown:l,onResize:d}=Sse();return(0,s.jsx)(e,{...n,activeIndex:o,chartRef:r,onBlur:a,onEvent:i,onFocus:c,onKeyDown:l,onResize:d})};return t.displayName=`withChartEvents(${e.displayName||e.name})`,t}const Tse="ABCDEFGHIJKLMNOPQRSTUVWXYZ".split("");class Lse 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,n)=>{const o=n.length?n[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:n,top:o}=t?.scales?.y??{};G5()(n)&&G5()(o)&&this.setState({labelYTop:`${(n+o)/2}px`})}};render(){const{props:{activeIndex:t,chartRef:n,getL10nValue:o,htmlIdBase:r,htmlIdTitle:a,onBlur:i,onFocus:c,onKeyDown:l,isDesktop:d,isVisible:h,items:m,itemsLabel:f,labels:p,onEvent:C,search:g,shouldAnimate:x,valuesLabel:b,variant:y},state:{labelYTop:L}}=this,S=Z5(80,o(f),g),T=Z5(30,o(b),g),k=Y5(m,o),I=d?[]:Tse.slice(0,m.length),E=d?k.labels:I.map(P=>({label:P})),N=h?k.values:K5(0,m.length),M=`${r}-type`,A=`${r}-instructions`,j=E.map(P=>P.label),w=E.map(P=>P.l10nId).join(",");return(0,s.jsxs)("div",{className:"block-chart__cartesian",children:[(0,s.jsx)("p",{className:"visually-hidden-always",id:A,children:p?.a11yBlockChartInstructions}),(0,s.jsxs)("div",{className:"block-chart__cartesianChart",ref:this.wrapRef,children:[T&&ls(T)&&(0,s.jsxs)("div",{className:"block-chart__cartesianLabelY","data-l10n-id":Ot(b),style:{insetInlineEnd:L},children:[T,(0,s.jsx)("span",{className:"visually-hidden-always",children:p?.a11yBlockChartAxisY})]}),S&&ls(S)&&(0,s.jsxs)("div",{className:"block-chart__cartesianLabelX","data-l10n-id":Ot(f),children:[S,(0,s.jsx)("span",{className:"visually-hidden-always",children:p?.a11yBlockChartAxisX})]}),(0,s.jsx)(fse,{onEvent:this.handleEvent,reduceMotion:mn(),shouldAnimate:x,values:N,children:P=>(0,s.jsx)(rse,{activeIndex:t,opts:P,values:N,children:R=>(0,s.jsxs)("div",{"aria-describedby":A,"aria-labelledby":`${a} ${M}`,className:"block-chart__cartesian-canvas-wrap",onBlur:i,onFocus:c,onKeyDown:l,role:"application",tabIndex:0,children:[(0,s.jsx)("div",{className:"visually-hidden-always",id:M,children:y==="bar"?p?.a11yBlockChartBar:p?.a11yBlockChartLine}),(0,s.jsx)(U5.Chart,{"aria-hidden":"true",data:{labels:j,datasets:[R]},"data-l10n-id":w,options:P,ref:n,role:"presentation",type:y,updateMode:"default"})]})})})]}
174),!d&&(0,s.jsx)(lse,{activeIndex:t,labels:k.labels,letters:I,onEvent:C,values:N})]})}}function kse(e){const t=it(e),n=u_(960,"isDesktop","Desktop")(t),o=X5(n);function r(a){const c=wh()?.term??"";return(0,s.jsx)(o,{...a,search:c})}return r}const Ise=kse(Lse),Kp=({valueType:e,value:t,values:n})=>e==="numeric"?String(t):sX(t/v6(n)),Ese=e=>{if(Oc())return"FieldText";const t=e.dataset.backgroundColor[e.dataIndex]??"#000";return $n(t)===Le.DARK?Tt.DARK:Tt.LIGHT},Nse=(e,t,n)=>Kp({valueType:e,value:t,values:n.dataset.data}),jse=(e,t)=>{const{label:n,dataset:o,parsed:r}=t[0],a=Kp({valueType:e,value:r,values:o.data});return`${n}: ${a}`},wse=(e,t)=>{const n=t.dataIndex,o=t.dataset.data??[1],r=o[n],a=e==null&&r/v6(o)>=.06;return e===n||a},Ase=({activeIndex:e,onEvent:t,reduceMotion:n,settings:{valueType:o},shouldAnimate:r})=>{const a=Oc();return{animation:{animateRotate:r&&!n,duration:r&&!n?1e3:0},defaultFontFamily:'"lato", sans-serif',onClick:t,onHover:t,maintainAspectRatio:!1,plugins:{datalabels:{color:Ese,display:wse.bind(null,e),font:{size:12,weight:"bold"},formatter:Nse.bind(null,o)},legend:{display:!1,labels:a?{color:"FieldText"}:void 0},tooltip:{animation:!n,boxPadding:"14px 10px",callbacks:{label:()=>null,title:jse.bind(null,o)}
174,caretPadding:10,cornerRadius:3,displayColors:!1,titleFont:{weight:"normal"},titleMarginBottom:0,titleSpacing:0,xAlign:"center",yAlign:"bottom",backgroundColor:a?"Highlight":Tt.LIGHT,titleColor:a?"HighlightText":Tt.DARK}},responsive:!1,rotation:130}},Rse=({activeIndex:e,colors:t,hasBorder:n,values:o})=>{const r=yn(),a=Oc(),i=e==null?t:t.map((c,l)=>l===e?c:Q5(c,r||"#fff",.5)??c);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,...n&&{borderWidth:1,borderColor:"#000"}}};function Pse({activeIndex:e,children:t,colors:n,hasBorder:o,values:r}){const a=Rse({activeIndex:e,colors:n,hasBorder:o,values:r});return t(a)}class Mse extends u.PureComponent{handleMouseEnter=()=>{this.props.onEvent(this.props.index)};handleMouseLeave=()=>{this.props.onEvent(null)};render(){const{activeIndex:t,color:n,index:o,label:r,value:a}=this.props,i=t!=null&&t!==o,c=q()("block-chart__circleLegendItem",{"block-chart__circleLegendItem--unfocused":i});return(0,s.jsxs)("div",{className:c,onMouseEnter:this.handleMouseEnter,onMouseLeave:this.handleMouseLeave,children:[(0,s.jsxs)("dt",{className:"block-chart__circleLegendTerm",children:[(0,s.jsx)("svg",{"aria-hidden":"true",className:"block-chart__circleLegendSymbol","data-ignore":"contrast",fill:n,focusable:"false",role:"presentation",viewBox:"0 0 10 10",children:(0,s.jsx)("rect",{height:"10",rx:"1.5",width:"10"})}),(0,s.jsx)("span",{className:"block-chart__circleLegendText","data-l10n-id":r.l10nId,children:r.label})]}),(0,s.jsx)("dd",{className:"visually-hidden-always",children:a})]})}}const Ose=Mse,Bse=({activeIndex:e,colors:t,hasBorder:n,labels:o,onEvent:r,values:a,valueType:i="numeric"})=>{const c=$u(t,$u(o,a));if(c.length===0)return null;const l=q()("block-chart__circleLegend",{"block-chart__circleLegend--border":n});return(0,s.jsx)("dl",{className:l,children:c.map(([d,[h,m]],f)=>(0,s.jsx)(Ose,{activeIndex:e,color:d,index:f,label:h,onEvent:r,value:Kp({valueType:i,value:m,values:a})},h.label))})},Dse=(0,u.memo)(Bse),Fse=(e,t)=>{const n=e.filter(a=>Number(a.value)>=0),o=Y5(n,t),r=n.map(a=>a.color);return{...o,colors:r}};class Hse 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:n,shouldAnimate:o}=this.props;return Ase({activeIndex:t,onEvent:this.handleEvent,reduceMotion:mn(),settings:n,shouldAnimate:o})};handleEvent=(t,n)=>{const o=n.length?n[0].index:null;this.props.onEvent(o)};render(){const{activeIndex:t,backgroundColor:n,chartRef:o,getL10nValue:r,htmlIdBase:a,htmlIdTitle:i,onBlur:c,onFocus:l,onKeyDown:d,isVisible:h,items:m,labels:f,onEvent:p,settings:C}=this.props,{colors:g,labels:x,values:b}=Fse(m,r),y=h?b:K5(0,m.length),L=this.buildOptions(),S=`${a}-type`,T=`${a}-instructions`,k=x.map(E=>E.label),I=g.includes(n);return(0,s.jsxs)("div",{className:"block-chart__circle",children:[(0,s.jsx)("p",{className:"visually-hidden-always",id:T,children:f?.a11yBlockChartInstructions}),(0,s.jsx)("div",{className:"block-chart__circleChart",ref:this.wrapRef,children:(0,s.jsx)(Pse,{activeIndex:t,colors:g,hasBorder:I,values:y,children:E=>(0,s.jsxs)("div",{"aria-describedby":T,"aria-labelledby":`${i} ${S}`,className:"block-chart__circle-canvas-wrap",onBlur:c,onFocus:l,onKeyDown:d,role:"application",tabIndex:0,children:[(0,s.jsx)("div",{className:"visually-hidden-always",id:S,children:f?.a11yBlockChartPie}),(0,s.jsx)(U5.Chart,{"aria-hidden":"true",data:{labels:k,datasets:[E]},options:L,ref:o,role:"presentation",type:"pie",updateMode:"default"})]})})}),(0,s.jsx)(Dse,{activeIndex:t,colors:g,hasBorder:I,labels:x,onEvent:p,values:y,valueType:C?.valueType})]})}}function $se(e){const t=cR()(e),n=X5(t);return it(n)}const _se=$se(Hse);wn.Chart.register(wn.ArcElement,wn.BarController,wn.BarElement,wn.CategoryScale,Zne.default,wn.Legend,wn.Legend,wn.LineController,wn.LineElement,wn.LinearScale,wn.PieController,wn.PointElement,wn.Title,wn.Tooltip);const Vse=e=>e.displayName||e.name||"Component";class zse extends u.PureComponent{id;constructor(t){super(t),this.state={isVisible:!1},this.id=(0,k0.uniqueId)("chart-")}componentDidMount(){this.setState({isVisible:!this.props.animateBlockEntrance||mn()})}handleAnimationEnd=()=>{this.setState({isVisible:!0})};renderTitle=()=>{const{title:t}=this.props;return(0,s.jsx)(je,{value:t})};render(){const{props:{animateBlockEntrance:t,children:n,editable:o,initiallyVisible:r,isLearner:a,items:i,itemsLabel:c,labels:l,settings:d,title:h,valuesLabel:m,variant:f,renderTitle:p=this.renderTitle},state:{isVisible:C}}=this,g=d?.headingLevel,x=g?`h${g}`:"h2",b=this.id,y=`${b}-title`;return(0,s.jsx)(Ae,{className:this.props.isPresentation?"block-chart--presentation":void 0,type:"chart",children:(0,s.jsx)(He,{afterAnimatedIn:this.handleAnimationEnd,animateBlockEntrance:t,initiallyVisible:r,isLearner:a,children:(0,s.jsx)("div",{className:"block-chart__container",children:(0,s.jsx)("div",{className:"block-chart__row",children:(0,s.jsx)("div",{className:"block-chart__rowInner",children:(0,s.jsxs)("figure",{children:[(!o&&h||o)&&(0,s.jsx)("figcaption",{children:(0,s.jsx)(x,{className:"block-chart__title",id:y,children:p()})}),(0,s.jsx)("div",{className:"block-chart__chart",children:u.cloneElement(u.Children.only(n),{htmlIdBase:b,htmlIdTitle:y,isVisible:C,items:i,itemsLabel:c,labels:l,settings:d,shouldAnimate:t,valuesLabel:m,variant:f})})]})})})})})})}}const Use=e=>{const t=rs();return(0,s.jsx)(zse,{...e,isPresentation:t})};function q5(e){const t=n=>(0,s.jsx)(Use,{...n,children:(0,s.jsx)(e,{})});return t.displayName=`ChartWrap(${Vse(e)})`,t}const J5=q5(Ise),Gse=q5(_se),Wse=e=>e.filter(t=>typeof t=="object"&&t!==null&&"variant"in t&&t.variant==="storyline").length<1;function Kse(e){const t=Vf(e);return(0,u.createElement)($K,{...t,number:e.dividerNumber})}function Qse(e){const t=Vf(e),{items:n}=e;return(0,u.createElement)(Yne,{...t,handleStorylineFullscreen:e.handleStorylineFullscreen,hasManySlBlocks:()=>n&&Wse(n),isLesson:!0})}const Yse=RW({"text/paragraph":{Component:D5},"text/table":{Component:D5},"text/heading paragraph":{Component:Tne},"text/subheading paragraph":{Component:Lne},"text/heading":{Component:yne},"text/subheading":{Component:Sne},"text/two column":{Component:Cne},"text/three column":{Component:bne},"text/four column":{Component:xne},"text/code":{Component:Cy},"impact/a":{Component:Gte},"impact/b":{Component:Wte},"impact/c":{Component:Kte},"impact/d":{Component:Qte},"impact/note":{Component:Yte},"quote/a":{Component:x5},"quote/b":{Component:Xee},"quote/c":{Component:qee},"quote/d":{Component:Jee},"quote/background":{Component:ete},"quote/carousel":{Component:nte},"quote/stacked":{Component:ste},"list/numbered":{Component:pJ},"list/checkboxes":{Component:gJ},"list/bulleted":{Component:vJ},"list/icon":{Component:CJ},"image/hero":{Component:gZ},"image/full":{Component:pp},"image/text aside":{Component:bZ},"image/text overlay":{Component:yZ},"image/banner":{Component:SZ},"gallery/centered":{Component:o6},"gallery/two column":{Component:hp},"gallery/three column":{Component:hp,propsBefore:()=>({width:3})},"gallery/four column":{Component:hp,propsBefore:()=>({width:4})}
174,"divider/divider":{Component:HK},"divider/numbered divider":{render:Kse},"divider/spacing divider":{Component:_K},"360/storyline":{render:Qse},"interactive/accordion":{Component:jZ},"interactive/tabs":{Component:$Z},"interactive-fullscreen/labeledgraphic":{Component:hJ},"interactive-fullscreen/process":{Component:Wee},"interactive-fullscreen/scenario":{Component:Ete},"interactive-fullscreen/sorting":{Component:$te},"interactive-fullscreen/timeline":{Component:jne},"buttons/button":{Component:bK},"buttons/button stack":{Component:xK},"flashcard/flashcard":{Component:e6},"flashcard/stack":{Component:e6,propsBefore:()=>({stack:!0})},"knowledge/knowledge":{Component:Ka},"continue/continue":{Component:FK},"multimedia/step":{Component:Jte},"multimedia/audio":{Component:Aee},"multimedia/video":{Component:Pp},"multimedia/ai_avatar":{Component:Pp},"multimedia/custom video":{Component:Pp,propsAfter:()=>({type:"customVideo"})},"multimedia/embed":{Component:Mee},"multimedia/attachment":{Component:Dee},"multimedia/code":{Component:Cy},"knowledgeCheck/multiple choice":{Component:Ka},"knowledgeCheck/multiple response":{Component:Ka},"knowledgeCheck/fillin":{Component:Ka},"knowledgeCheck/matching":{Component:Ka},"knowledgeCheck/draw from question bank":{Component:Ka},"chart/bar":{Component:J5},"chart/line":{Component:J5},"chart/pie":{Component:Gse},"ai-scenario/ai-scenario":{Component:XW},"mondrian/mondrian":{Component:kJ},"survey/survey":{Component:dne},"team/people":{Component:fne},"sequence/arrows":{Component:Up},"sequence/pyramid":{Component:Up},"sequence/timeline":{Component:Up},"html/inline":{Component:Kf},"html/cdn":{Component:Kf},"videoCheckpoint/videoCheckpoint":{Component:null},"textToVideo/textToVideo":{Component:q3},"pending/pending":{Component:null},"spacer/spacer":{Component:null}},{extras:{"html/vibe":{Component:Kf},"gallery/full":{Component:o6}},prepareProps:Vf});function Zse(e){return(0,s.jsx)(Fl,{block:e,children:(0,s.jsx)(Yse,{...e})})}const Xse=1e3,qse=150,Jse="onscrollend"in window;function eS(e,t){const n=e.getBoundingClientRect(),o=t?.getBoundingClientRect(),r=o?.top??0,a=o?.bottom??window.innerHeight,i=(a-r)*.02,c=n.bottom>r-i&&n.top<a+i,l=n.bottom<r;return c||l}const Qp={entries:new Map,scrollHandler:null,scrollEndHandler:null,scrollTarget:null,debounceTimer:null,register(e,t,n){const o=this.entries.size===0,r=t??window;if(this.entries.set(e,{el:e,scrollableParent:t,callback:n}),o){this.scrollTarget=r;const a=()=>{this.debounceTimer!=null&&clearTimeout(this.debounceTimer),this.debounceTimer=setTimeout(()=>this.checkAll(),qse)};Jse?(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())eS(t.el,t.scrollableParent)&&e.push(t);e.forEach(t=>t.callback())})}},tS=({active:e=!0,children:t,onViewed:n})=>{const o=(0,u.useRef)(null),r=(0,u.useRef)(!1),a=(0,u.useRef)(n);return(0,u.useEffect)(()=>{a.current=n},[n]),(0,u.useEffect)(()=>{const i=o.current;if(!e||!i||r.current)return;let c=!0;const l=Jm(),d=()=>{!c||r.current||(r.current=!0,h.disconnect(),clearTimeout(m),Qp.unregister(i),a.current())},h=new IntersectionObserver(([f])=>{f!=null&&(f.isIntersecting||f.intersectionRatio>0)&&d()},{root:l,rootMargin:I1,threshold:0});h.observe(i);const m=setTimeout(()=>{!r.current&&eS(i,l)&&d()},Xse);return Qp.register(i,l,d),()=>{c=!1,h.disconnect(),clearTimeout(m),Qp.unregister(i)}},[e]),(0,s.jsx)("div",{ref:o,children:t})},eoe=(0,u.memo)(function({active:t=!0,block:n,children:o,completesFirstItemOnView:r=!1,onViewed:a,onStep:i}){const c=(0,u.useCallback)(d=>{d!=null&&"id"in d&&d.id!=null&&!d.isDone&&i(d.id)},[i]),l=(0,u.useCallback)(()=>
174{if(!n.items?.length){a();return}if(!n.requiresInteraction){a();return}r&&n.items.length>0&&c(n.items[0])},[n,r,c,a]);return(0,s.jsx)(tS,{active:t,onViewed:l,children:u.cloneElement(u.Children.only(o),{onStep:c})})}),toe="draw from question bank",Yp=e=>{const{animateBlockEntrance:t,backgroundBefore:n,block:o,className:r,color:a,defaultBackgroundColor:i,enableVideoPlaybackSpeed:c,handleNavigate:l,hideBlock:d,index:h,isLastBlock:m,isOnlyBlockInStep:f,lessonId:p,lessonProgress:C,loadMedia:g,observeProgress:x=!0,onContinue:b}=e,{blockId:y,family:L,items:S=[],variant:T}=o,k=`block-${y}`,I=ot(),E=yj(),N=xe(),M=mm(),A=lF(),j=Ed()?.prefersKeyboardNavigation,w=Nx("block"),P=qw({blockId:String(y),lessonId:String(p)}),R=(0,u.useCallback)(J=>{const te=T===toe?S[0]:Tr()(Je()("id",J),S);I(fl({blockId:y,lessonId:p,items:[te]})),L==="continue"&&b(y,J)},[y,I,L,S,p,b,T]),O=(0,u.useCallback)(()=>{I(fl({blockId:y,lessonId:p,items:S}))},[y,I,S,p]),B=(0,u.useCallback)(J=>{const te=S?.[0],he=te&&"id"in te?te.id:void 0;he&&I(J8({blockId:y,itemId:he,lessonId:p,audioVideoPlayhead:J}))},[y,I,p,S]),D=(0,u.useCallback)(()=>{I(nN({blockId:y,lessonId:p,isSubmitted:!0}))},[y,I,p]),F=(0,u.useCallback)(({itemId:J,response:te})=>{I(tN({blockId:y,itemId:J,lessonId:p,response:te}))},[y,I,p]),V=(0,u.useCallback)(J=>{I(Z8(J))},[I]),U=(0,u.useCallback)(()=>({itemId:J,isCorrect:te})=>I(eN({itemId:J,lessonId:p,blockId:y,isCorrect:te})),[y,I,p]),H=(0,u.useCallback)(()=>()=>I(q8({lessonId:p,blockId:y})),[y,I,p]),K=uc(),Q=(0,u.useCallback)(J=>{I(i3(J))},[I]),z=(0,u.useCallback)(()=>{I(hc())},[I]),W=(0,u.useCallback)(J=>{I(Sf(J))},[I]),$=(0,u.useCallback)(()=>{I(ml(p))},[I,p]),G={...o,animateBlockEntrance:t,className:r?.toString(),color:a,defaultBackgroundColor:i,dividerNumber:P,enableVideoPlaybackSpeed:c,handleNavigate:l,onExit:$,onFinishStoryline:RI,onSurveySubmitted:D,onSurveyPartialResponse:F,initiallyVisible:h===0,isHidden:d,isLastBlock:m,isLearn:!0,isLearner:!0,isOnlyBlockInStep:f,isVideoTraining:E,labels:N,lessonId:p,loadMedia:g,onCardDrop:U,onReplay:H,onRetryAttempt:V,onTranscriptClose:z,onTranscriptOpen:Q,onTranscriptUpdate:W,partnerContent:M,prefersKeyboardNavigation:j,previewType:A,progress:C,recordMediaPlayheadPosition:B,transcriptPanelState:K},{completesFirstItemOnView:Z,trackSteps:Y}=a5(o),ne=sF(p,y),ee=["noOutline",r,w?"comment-preview-anchor":void 0,d?"blocks-lesson__block-wrapper--hidden":void 0].filter(Boolean).join(" "),le=(0,s.jsx)(Zse,{...G});return(0,s.jsxs)("div",{className:ee,"data-block-family":L,"data-block-id":y,"data-change-path":ne,children:[n,Y?(0,s.jsx)(eoe,{active:x,block:o,completesFirstItemOnView:Z,onStep:R,onViewed:O,children:le}):(0,s.jsx)(tS,{active:x,onViewed:O,children:le}),(0,s.jsx)(vs,{anchor:{block:String(y),kind:"block"},label:"Comments on block"})]},k)},_u=Lt(),Zp=Yr(),noe=Xe(),soe=({slides:e,currentSlide:t},n)=>(t.push(n),n.settings?.attachedToNextBlock||(e.push(t),t=[]),{slides:e,currentSlide:t}),nS=e=>{const{slides:t}=jf()(soe,{slides:[],currentSlide:[]},e);return t};function Xp(e,t,n,o){if(e.length){const a=e.slice(-1)[0];if(!Ur(a.id,n))return e}const r=qne(ooe(n),t.slice(e.length)).map(roe(o));return r.length?Xp(e.concat(r),t,n,o):e}const Ur=(e,t)=>e==null?!1:_u(!1,["items",e,"isComplete"],t),ooe=e=>({family:t,items:n})=>{const o=_u({},0,n);return t==="continue"&&!Ur(o.id,e)},roe=e=>(t,n,o)=>{const r=o.slice(-1)[0]||{},{family:a}=r,i=a==="continue"?_u(void 0,["items",0,"type"],r)??e?.blockContinueCompletionType??!1:!1;return Ni(t)?Zp(t,{requiresInteraction:!0}):t.variant!=="continue"&&(!i||i==="completeBlock"&&n!==o.length-1&&n!==o.length-2)?t:Zp(t,{requiresInteraction:!0})};function sS({id:e,...t},n,o,r,a){if(t.family==="continue"){const i=_u(void 0,["items",0,"type"],t)??a?.blockContinueCompletionType??"";return Zp({blockId:e,...t},{skipContinue:r,canContinue:aoe({continueType:i,blocks:n,progress:o}),lessonProgress:o,isComplete:Ur(e,o)})}return{blockId:e,...t}}const aoe=({continueType:e,blocks:t,progress:n})=>{switch(e){case"completeAll":return ln()(is()(t),doe(n));case"completeBlock":return t.length===0?!0:Ur(uoe(t),n);default:return!0}},ioe=e=>ts()(noe("items",e)??{}),coe=e=>loe(ioe(e??{})),loe=e=>po()(t=>Je()("isComplete",!0,t),e),doe=e=>is()(coe(e)),uoe=e=>tl()(e)?.id,hoe=({family:e,variant:t,isComplete:n,requiresInteraction:o})=>e==="continue"&&t==="continue"&&!!o&&!n,moe=(e,t)=>!!e.find(o=>{if(Ni(o))return o.id==null?!0:!t?.items?.[o.id]?.isComplete}),foe=e=>e.length===0?!1:Z3()(t=>!!hoe(t),e),poe=(e,t)=>e.length===0?!1:moe(e,t),goe=({blocks:e,lessonProgress:t})=>e.findIndex(n=>{const o=n.id==null?void 0:t?.items?.[n.id],r=o&&o?.isComplete==null;return Ni(n)&&r}),oS=({blocks:e,lessonProgress:t,currentBlockIndex:n})=>{const o=goe({blocks:e,lessonProgress:t});return o>-1&&n>o},rS=(e,t,n)=>{const o=e.findIndex(r=>
174r.id===t);return o<=0?[]:e.slice(0,o).filter(r=>r.family==="continue"&&!Ur(r.id,n))},voe=(e,t)=>{const n=["embed","video","full"],o=["interactive","interactive-fullscreen","image","flashcard","gallery","chart","knowledgeCheck"];return e!=null&&o.includes(e)||t!=null&&n.includes(t)};function aS(e){const t=(0,u.useRef)(e);t.current=e,(0,u.useEffect)(()=>{const n=o=>{if(o.defaultPrevented||o.button!==0||o.altKey||o.ctrlKey||o.metaKey||o.shiftKey)return;const r=o.target;if(!(r instanceof Element))return;const a=r.closest("a")?.getAttribute("href");if(a==null)return;const i=rU(a);i!=null&&t.current(i)};return document.addEventListener("click",n),()=>document.removeEventListener("click",n)},[])}function Coe(e,t,n){if(!e||!t||!Zh())return!1;if(X7(n,{l10n:t}))return!0;const{locales:o,defaultLocale:r}=t,a=o.find(i=>i.locale===r)?.id;return!!(a&&a!==e)}function iS(){const{currentLocale:e}=tt(),t=me(o=>o.course?.defaultLocaleId),n=me(o=>o.l10n);return Coe(t??null,n,e)}const boe=e=>e==="center"||e==="end"||e==="nearest"||e==="start",xoe=e=>Vt(e)&&typeof e.lessonId=="string"&&(typeof e.itemId=="string"||e.itemId==null)&&(e.align===void 0||boe(e.align)),yoe=e=>Vt(e)&&(typeof e.blockId=="string"||typeof e.blockId=="number")&&typeof e.family=="string";function Soe({animateBlockEntrance:e,blocks:t,className:n,color:o,enableVideoPlaybackSpeed:r,handleNavigate:a,isLessonEntering:i,isLessonExiting:c,lessonId:l,lessonProgress:d,loadMedia:h,observeProgress:m=!0,nextLesson:f}){const p=(0,u.useRef)(null),C=(0,u.useRef)(null),g=(0,u.useRef)(null),[x,b]=(0,u.useState)(null),[,y]=(0,u.useState)(0),[L,S]=(0,u.useState)(!1),T=(0,u.useRef)(null),[k]=(0,Pe.ok)(),I=k.get(dc),E=me(H=>H.course?.theme),N=me(o2),M=iS()||L,A=(0,u.useRef)(c),j=(0,u.useRef)(i),w=(0,u.useRef)(l),P=(0,u.useRef)(t);A.current=c,j.current=i,w.current=l,P.current=t;const R=(0,u.useCallback)((H,K="start")=>{const Q=P.current.find(z=>String(z.id)===String(H));return Q==null?!1:(T.current?.(),g.current={blockId:Q.id,align:K},b(Q.id),y(z=>z+1),!0)},[]);aS(({lessonId:H,blockId:K})=>{H===w.current&&R(K)}),(0,u.useEffect)(()=>{const H=K=>{if(K.origin!==window.location.origin)return;(Array.isArray(K.data)?K.data:[K.data]).forEach(z=>{Vt(z)&&z.type==="preview:lessonUpdate"&&S(!0)})};return window.addEventListener("message",H),()=>window.removeEventListener("message",H)},[]),(0,u.useEffect)(()=>{const H=K=>{if(A.current||!(K instanceof CustomEvent))return;const Q=K.detail;if(!xoe(Q)||Q.lessonId!==w.current)return;const z=Q.itemId,W=Q.align??"nearest";if(z==null){T.current?.(),p.current?.closest(".page")?.scrollIntoView({behavior:"smooth",block:"start"});return}R(z,W)};return window.addEventListener(Ke,H),()=>window.removeEventListener(Ke,H)},[R]),(0,u.useEffect)(()=>{T.current?.(),(I==null||!R(I))&&(g.current=null,b(null))},[I,l,R]),(0,u.useEffect)(()=>()=>T.current?.(),[]),(0,u.useEffect)(()=>{if(M||x==null)return;rS(t,x,d).forEach(K=>{Pn(fl({blockId:K.id,items:K.items??[],lessonId:l}))})},[M,x,t,d,l]),(0,u.useLayoutEffect)(()=>{const H=g.current;if(H==null||j.current)return;const K=document.querySelector(".page-wrap"),Q=K?.querySelector(`[data-block-id="${H.blockId}"]`);K==null||Q==null||(g.current=null,H.align==="start"?O(K,Q):Q.scrollIntoView({behavior:"smooth",block:H.align}))}),(0,u.useLayoutEffect)(()=>{B()});function O(H,K){T.current?.();const Q=()=>{let ee=0,le=K;for(;le instanceof HTMLElement&&le!==H&&H.contains(le);)ee+=le.offsetTop,le=le.offsetParent;return ee},z=()=>{const ee=Q();Math.abs(H.scrollTop-ee)>1&&(H.scrollTop=ee)};let W=0,$=!1;const G=()=>{$||($=!0,cancelAnimationFrame(W),window.clearTimeout(Y),H.removeEventListener("wheel",G,Z),H.removeEventListener("touchstart",G,Z),H.removeEventListener("pointerdown",G,Z),window.removeEventListener("keydown",G,!0),T.current===G&&(T.current=null))},Z={capture:!0,passive:!0};H.addEventListener("wheel",G,Z),H.addEventListener("touchstart",G,Z),H.addEventListener("pointerdown",G,Z),window.addEventListener("keydown",G,!0);const Y=window.setTimeout(G,2500),ne=()=>{$||(z(),W=requestAnimationFrame(ne))};T.current=G,W=requestAnimationFrame(ne)}function B(){if(C.current){const K=t.findIndex(z=>z.id===C.current)+1,Q=t[K]?.id??null;if(Q){const z=document.querySelector(".page-wrap"),W=z?.querySelector(`[data-block-id="${Q}"]`),$=W?W.getBoundingClientRect().top:0;
174Ar.Ay.animateScroll.scrollTo($+(z?.scrollTop??0),{smooth:!0,containerId:"page-wrap"})}C.current=null}}const D=(0,u.useCallback)((H,K)=>{Ur(K,d)||(C.current=H),H===t[t.length-1]?.id&&f&&(Pn(ml(l)),a?.(f))},[a,t,l,d,f]),F=M?t:(()=>{const H=Xp([],t,d,E);return Array.isArray(H)?H.filter(K=>Vt(K)&&(typeof K.id=="string"||typeof K.id=="number")):t})(),V=x==null?-1:F.findIndex(H=>H.id===x),U=["blocks-lesson",n,N?"blocks-lesson--one-page":void 0].filter(Boolean).join(" ");return(0,s.jsx)("section",{className:U,ref:p,children:F.map((H,K,Q)=>{const z=sS(H,Q.slice(0,-1),d,M,E);if(!yoe(z))return null;const W=z,$=Q.length-1,Z=W.family==="continue"?H.id===t[t.length-1]?.id:K===$,Y=V!==-1&&K<=V,ne=!L&&!Y&&oS({blocks:F,lessonProgress:d,currentBlockIndex:K});return(0,s.jsx)(Yp,{animateBlockEntrance:e,block:W,color:o,enableVideoPlaybackSpeed:r,handleNavigate:a,hideBlock:ne,index:K,isLastBlock:Z,lessonId:l,lessonProgress:d,loadMedia:h,observeProgress:m,onContinue:D},W.blockId)}).filter(AW.A)})}const qp=Soe;function Vu({children:e,lessonId:t}){const n=(0,u.useRef)(null),o=(0,u.useCallback)(r=>{const a=r.detail?.lessonId;a!=null&&String(a)!==String(t)||n.current?.focus?.()},[t]);return hV(o),(0,s.jsx)("main",{className:"lesson-main",ref:n,tabIndex:-1,children:e})}const Toe=({animateBlockEntrance:e,color:t,data:n,enableVideoPlaybackSpeed:o,handleNavigate:r,lessonHeader:a,lessonHeaderWrapClasses:i,lessonHeaderWrapStyles:c,lessonProgress:l,loadMedia:d,observeProgress:h,isLessonEntering:m,isLessonExiting:f,nextLesson:p,hideLessonHeaders:C})=>{const{id:g,items:x}=n,b={animateBlockEntrance:e,blocks:x,color:t,enableVideoPlaybackSpeed:o,handleNavigate:r,lessonId:g,lessonProgress:l,loadMedia:d,observeProgress:h,isLessonEntering:m,isLessonExiting:f,nextLesson:p};return(0,s.jsx)("div",{className:"page","data-page":!0,children:(0,s.jsx)("div",{className:"page__wrapper page__wrapper--white",children:(0,s.jsxs)(Vu,{lessonId:g,children:[(0,s.jsx)("div",{className:i,inert:C,style:c,children:a}),(0,s.jsx)("div",{className:"page__content",children:(0,s.jsx)(qp,{...b})})]})})})},Loe=10;function koe(){const e=(0,u.useRef)(null),[t,n]=(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;n(h=>h===d?h:d)},a=setTimeout(()=>{o=Jm(),o?.addEventListener("scroll",r,{passive:!0})},Loe);return()=>{clearTimeout(a),o?.removeEventListener("scroll",r)}},[]),{isSticky:t,refProgressWrap:e}}const cS=_("progress"),Ioe=_("lesson-progress-wrapper"),Eoe=()=>!!document.querySelector(".lesson--preview"),Noe=({items:e,lessonProgress:t})=>{const n=t?.activeIndex??-1,o=e?.length??0;return n===-1?0:n+1===o?100:e?.[n]?.linePosition?.replace("%","")??"0"},joe=({items:e,lessonProgress:t})=>{const n=t?.activeIndex??0,o=e?.length??0;return n>o?100:Math.round(n/o*100)},woe=e=>{const{lessonProgress:t,type:n}=e;switch(n){case"process":return joe(e);case"sorting":return t?.percentViewed??0;case"timeline":return Noe(e);default:return t?.percentComplete??0}},Aoe=e=>{const{type:t,items:n,sidebarAvailable:o,isCourseNavOpen:r,isMobile:a}=e,{isSticky:i,refProgressWrap:c}=koe(),[l]=(0,u.useState)(Zs),d=r,h=r&&a,m=Eoe(),f=Ioe({visible:i&&!h}).mix(d&&o&&!m?"lesson--open":"").mix(o&&h&&!m?"lesson--open-mobile":"").toString(),p=cS({timeline:t==="timeline",video:t==="video"}).toString(),C=woe(e),g=t==="timeline"&&n&&n.map(b=>{const y=parseInt(String(C))>=parseInt(b.linePosition?.slice(0,-1)??"0"),L=cS("marker",{active:y}).mix(y?"brand--background":"").toString();return(0,s.jsx)("div",{className:L,style:{left:b.linePosition}},b.id)}),x=(0,s.jsx)("div",{className:"progress-wrap",children:(0,s.jsx)("div",{className:p,children:(0,s.jsxs)("div",{className:"progress__container",children:[(0,s.jsx)("div",{className:"progress__indicator brand--background",style:{transform:`translate3d(calc(${C}% * var(--dir-x)),0px,0px)`}}),g]})})});return(0,s.jsxs)("div",{ref:c,children:[x,(0,ps.createPortal)((0,s.jsx)("div",{"aria-hidden":"true",className:f,children:x}),l)]})},Roe=e=>{const t=dU(),{isCourseNavOpen:n}=BG(),o=$t(480);return(0,s.jsx)(Aoe,{...e,isCourseNavOpen:n,isMobile:o,sidebarAvailable:t})};function lS(e){return Ct()===se.RISE_CLASSIC?(0,s.jsx)(Roe,{...e}):null}function Poe(e,t){return e==null?void 0:t.quizDecks?.[e]}function Moe(e,t){const n=ua(e,t);return n?.type==="quiz"?n:void 0}function Ooe(){const e=kr(),t=(0,ze.Mz)((n,o)=>n==null?void 0:e(n,o),n=>pl(n)?n:void 0);return(0,ze.Mz)(Poe,t,Moe,(n,o,r)=>({deck:n,lesson:o,progress:r}))}function Boe(e){const t=(0,u.useMemo)(Ooe,[]);return me(n=>t(e,n))}function Doe({lessonId:e}){const{deck:t,lesson:n,progress:o}=Boe(e);return(0,s.jsxs)("section",{children:[(0,s.jsx)("h2",{children:"Qu
174iz deck engine analysis"}),(0,s.jsxs)("ul",{children:[(0,s.jsxs)("li",{children:["Deck status: ",t?.status??"missing"]}),(0,s.jsxs)("li",{children:["Lesson data: ",n?"loaded":"missing"]}),(0,s.jsxs)("li",{children:["Progress data: ",o?"loaded":"missing"]})]})]})}const Foe=e=>e===c8.CONTINUE,Hoe=({canShowContinue:e,isExport:t,isRiseCom:n,nextLesson:o})=>e&&n&&!o&&!t,$oe=e=>Vt(e)&&"id"in e&&"type"in e,_oe=(e,t)=>t.startsWith(`${e}-`)?t.slice(e.length+1):void 0,Voe=(e,t)=>{const n=_oe(String(e.id),t);return n==null?void 0:e.questions.find(o=>String(o.id)===n)},zoe=(e,t)=>!e||!t||e.length!==t.length?!1:e.some((n,o)=>t[n]?.id!==t[o]?.id),Uoe=(e,t,n)=>{if(!Array.isArray(e)||!Array.isArray(t)||!n)return!1;const o=e.map(i=>t[i]),r=t.findIndex(i=>i.id===n),a=o.findIndex(i=>i.id===n);return r===a},Goe=({lesson:e,question:t})=>{const n=String(t.id);for(const o of e?.items??[])if($oe(o)){if(o.type===bn.DRAW_FROM_QUESTION_BANK){const r=Voe(o,n);if(r)return r}else if(String(o.id)===n)return o}};function Woe({settings:e}){const t=ot();return(0,u.useMemo)(()=>({onChoiceSelect:n=>{t(iC(n))},onFillInChange:n=>{t(cC(n))},onMatchSet:n=>{t(dC(n))},onResponseToggle:n=>{t(lC(n))},onSetIndex:n=>{t(dh(n))},onSubmit:n=>{const{skipLessonsIfPassed:o,skipToLessonId:r}=e||{};return t(uh({...n,passToContinue:n.passToContinue??!1,skipLessonsIfPassed:o??void 0,skipToLessonId:r??void 0}))}}),[t,e])}const dS=-1;function zu({allowedRetries:e,currentRetries:t}){const n=parseInt(String(e??dS),10),o=parseInt(String(t??0),10);return n===dS?!1:o>=n}function uS(e){return e.type===bn.DRAW_FROM_QUESTION_BANK}function Koe(e){return Array.isArray(e)&&e.every(t=>Array.isArray(t)&&t.every(n=>typeof n=="number"&&Number.isInteger(n)&&n>=0))}function Qoe(e){return M2()?e.questions.length:Math.min(e.drawCount??0,e.questions.length)}function Yoe(e,t){if(!Koe(t)||t.length!==e.length)return;const n=[];for(const[o,r]of e.entries()){const a=t[o];if(!(a.length===Qoe(r)&&new Set(a).size===a.length&&a.every(c=>r.questions[c]!=null)))return;n.push(Zoe(r,a))}return n}function Jp(e,t){return{...t,drawn:!0,id:`${e.id}-${t.id}`}}function Zoe(e,t){const n=t.map(o=>({question:e.questions[o],idx:o})).filter(o=>o.question!=null);return{items:n.map(({question:o})=>Jp(e,o)),indices:n.map(({idx:o})=>o)}}function Xoe(e){const{questions:t}=e;if(M2())return{items:t.map(i=>Jp(e,i)),indices:t.map((i,c)=>c)};const n=e.drawCount,o=[],r=[],a=[];for(let i=0;i<n;i++){const c=Y6({questions:t,drawnQuestionIds:o});if(!c)break;r.push(Jp(e,c)),a.push(t.findIndex(l=>l.id===c.id)),o.push(String(c.id))}return{items:r,indices:a}}function qoe({sourceItems:e,progress:t,lessonId:n}){const o=e.filter(uS),r=t?.questionsDrawn?Yoe(o,t.questionList):void 0,a=r?hS(e,r):void 0,i=r!==void 0&&a!==void 0&&nre(t,a),c=r!==void 0?r:o.map(Xoe),l=hS(e,c),d=o.length>0?c.map(f=>f.indices):void 0,h=t?.questionsDrawn&&o.length>0&&!i?{...t,items:{},originalItemProgress:void 0}:t,m=sre({items:l,progress:h,questionIndexList:d});return{concreteItems:l,drawPayload:{lessonId:n,lessonProgress:m}}}function hS(e,t){let n=0;return e.flatMap(o=>uS(o)?t[n++].items:[o])}function eg(e,t){return typeof e=="number"&&Number.isInteger(e)&&e>=0&&e<t}function mS(e,t){return Array.isArray(e)&&e.length===t&&e.every(n=>eg(n,t))&&new Set(e).size===e.length}function Joe(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}function ere(e,t){if(!Joe(e))return!1;const n=t.answers??[],o=new Set(n.map(a=>String(a.id))),r=new Set;return Object.entries(e).every(([a,i])=>{if(typeof i!="string"&&typeof i!="number")return!1;const c=String(i);return!o.has(a)||!o.has(c)||r.has(c)?!1:(r.add(c),!0)})}function tre(e,t){const n=t.answers?.length??0;if(e.selectedIndex!=null&&!eg(e.selectedIndex,n))return!1;const o=e.selectedIndices;if(o!=null&&!(Array.isArray(o)&&o.every(c=>eg(c,n))))return!1;const r=e.shuffledAnswerIndices;if(r!=null&&!mS(r,n))return!1;const a=e.text;if(a!=null&&typeof a!="string")return!1;const i=e.matches;return!(i!=null&&!ere(i,t))}function nre(e,t){if(!e)return!0;const n=new Map(Object.values(e.items).map(a=>[a.index,a])),o=e.originalItemProgress,r=o!==void 0;return t.every((a,i)=>{const c=o?.[i],l=n.get(i);return c!==void 0?tre(c,a):r?!0:l===void 0||String(l.id)===String(a.id)})}function sre({items:e,progress:t,questionIndexList:n}){const o=t?.items??{},r=t?.originalItemProgress,a=new Map(Object.values(o).map(l=>[l.index,l])),i=Object.fromEntries(e.map((l,d)=>{const h=r?.[d]??{},m=a.get(d);return[l.id,{...h,...m,id:l.id,index:d}]}));return{...t?_s(t,["originalItemProgress"]):void 0,questionsDrawn:!0,questionList:n??t?.questionList,items:i}}function ore(e,t){const n=e.activeIndex??0,o=t.length+1;if(e.reportResults)return{progress:t.length===0||n===o?e:{...e,activeIndex:o}};const r=n-1;if(r<=0)return{progress:e};const a=e.items??{},i=t.findIndex((c,l)=>l<r&&!a[c.id]?.isComplete);return i===-1?{progress:e}:{progress:{...e,activeIndex:i+1},recoveredFrom:n}}function tg(e,t){return!!t[e.id]?.isComplete}function rre({items:e,progress:t}){const n=t?.items??{};return[...e.filter(o=>tg(o,n)),...Bu()(e.filter(o=>!tg(o,n)))]}function are(e){const t=e.answers??[],n=Bu()(t),o=n.map(r=>t.findIndex(a=>a.id===r.id));return Object.assign({},e,{answers:n,shuffledAnswerIndices:o})}function ire(e,t){const n=e.answers??[];return Object.assign({},e,{answers:t.map(o=>n[o]),shuffledAnswerIndices:t})}function fS({items:e,settings:t,progress:n}){const o=t?.randomizeQuestionOrder?rre({items:e,progress:n}):e;if(!t?.shuffleAnswerChoices)return o;const r=n?.items??{};return o.map(a=>{if(tg(a,r))return a;const i=r[a.id]?.shuffledAnswerIndices;return mS(i,a.answers?.length??0)?ire(a,i):are(a)})}function cre({lessonId:e,sourceItems:t,progress:n,settings:o}){const{concreteItems:r,drawPayload:a}=qoe({sourceItems:t,progress:n,lessonId:e}),i=fS({items:r,settings:o??void 0,progress:a.lessonProgress}),c=ore(a.lessonProgress,i);return{resolvedItems:i,recoveredFrom:c.recoveredFrom,drawPayload:{...a,lessonProgress:c.progress}}}function Rve(e){return fS({items:e.items,settings:e.settings,progress:e.progress})}const lre=e=>e!=null&&e.type!=null&&e.type!=="section";function Pve({lessonIds:e,lessons:t}
174){return!Array.isArray(e)||!t?!1:e.some((n,o)=>{const r=t[n];return r?.type!=="quiz"||r.settings?.skipLessonsIfPassed!==!0?!1:e.slice(o+1).some(a=>lre(t[a]))})}function dre(e,t){const n=Bt(e),o=gl(n)?n.settings:void 0,r=e?TI({id:e,passingScore:t?.passingScore??80}):void 0;return(0,u.useMemo)(()=>o&&{...o,passingScore:r??o?.passingScore??80},[o,r])}const Uu=typeof matchMedia<"u"?matchMedia("(prefers-reduced-motion: reduce)"):void 0;function pS(){const[e,t]=(0,u.useState)(Uu?.matches??!1);return(0,u.useEffect)(()=>{if(!Uu)return;const n=o=>t(o.matches);return Uu.addEventListener("change",n),()=>Uu.removeEventListener("change",n)},[]),e}function ure({lessonId:e}){const t=ot(),n=Bt(e),o=gl(n)?n:void 0,r=wl(e),a=(0,u.useMemo)(()=>o?.items??[],[o?.items]),i=dre(e,r),[{resolvedItems:c,drawPayload:l,recoveredFrom:d}]=(0,u.useState)(()=>cre({lessonId:e,progress:r,settings:i,sourceItems:a}));(0,u.useLayoutEffect)(()=>{d!==void 0&&(E0.RESUME_RECOVERY,l.lessonProgress.activeIndex,Object.keys(l.lessonProgress.items).length,c.length,void 0);const f=AI()?{finalize:!0,passToContinue:i?.passToContinue??!1,finalRetryAttempt:zu({allowedRetries:i?.retryCount,currentRetries:r?.retryAttempts})}:{finalize:!1};t(iN({...l,lessonId:e,...f}))},[]);const h=r?.activeIndex??0,m=pS();return hre({activeIndex:h,isReduceMotion:m,progress:r,resolvedItems:c,settings:i,sourceItems:a}),{activeIndex:h,progress:r,resolvedItems:c,retryAttempts:r?.retryAttempts??0,settings:i,sourceItems:a}}function hre({activeIndex:e,isReduceMotion:t,progress:n,resolvedItems:o,settings:r,sourceItems:a}){const i=(0,u.useRef)(e);(0,u.useEffect)(()=>{},[e])}const mre=e=>e.length===3,fre=e=>{const t=e.findIndex(n=>n==="answers");return t===-1?null:e[t+1]?.id},pre=e=>{const t=e.findIndex(n=>n==="questions");return t===-1?null:e[t+1]?.id},gre=e=>{const t=e.at(-1);return typeof t=="string"&&t.startsWith("feedback")},vre=({items:e,itemId:t,questionBankQuestionId:n})=>{const o=e.find(({id:r})=>r===t);return o?"questions"in o?n?o.questions.find(({id:r})=>r===n):null:o:null},Cre=(e,t,n)=>{const o=n==="feedbackCorrect";return e?[e]:n==="feedback"?t.answers.slice(0,1):n==="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)},bre=({lessonId:e,items:t})=>{const n=ot(),o=(0,u.useCallback)(({lessonId:a,progressId:i,question:c,answer:l},d=!0)=>{switch(c.type){case"MULTIPLE_CHOICE":n(iC({lessonId:a,itemId:i,selectedIndex:c.answers.indexOf(l)}));break;case"MULTIPLE_RESPONSE":n(lC({lessonId:a,itemId:i,selectedIndex:c.answers.indexOf(l)}));break;case"FILL_IN_THE_BLANK":n(cC({lessonId:a,itemId:i,text:typeof l.title=="string"?l.title:""}));break;case"MATCHING":n(dC({lessonId:a,itemId:i,matches:d?Object.fromEntries(c.answers.map(h=>[h.id,h.id])):{}}));break}},[n]),r=(0,u.useCallback)(({detail:a})=>{const{lessonId:i,path:c}=a,l=String(a.itemId);if(i!==e)return;if(mre(c)){n(aC(e));return}const d=pre(c),h=vre({items:t,itemId:l,questionBankQuestionId:d});if(!h)return;const m=d?`${l}-${d}`:l;if(n(dh({lessonId:e,progressId:m,finalize:!1})),gre(c)){const f=fre(c),p=f?h.answers.find(({id:b})=>b===f)??null:null,C=c.at(-1),g=C==="feedbackCorrect",x=Cre(p,h,C);h.type==="MULTIPLE_RESPONSE"&&n(aN({lessonId:e,itemId:m})),x.forEach(b=>{o({lessonId:e,question:h,progressId:m,answer:b},g)}),n(uh({finalRetryAttempt:!1,lessonId:e,isCorrect:g,itemId:m,passToContinue:!0}))}},[n,e,t,o]);(0,u.useEffect)(()=>(window.addEventListener(Ke,r),()=>{window.removeEventListener(Ke,r)}),[r])},xre=_("quiz-item");function yre({activeIndex:e,children:t,index:n,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,s.jsx)("div",{className:Jc({activeIndex:e,index:n}),"data-testid":"quiz-item-card",inert:o?void 0:!0,children:(0,s.jsx)("div",{className:xre("content"),children:(0,s.jsx)(u6,{isActive:o,isComplete:r,isTimedQuiz:!!i,style:f,children:(0,s.jsx)("div",{hidden:!o&&!r,children:t})})})})}const Sre=_("quiz-card");function Tre({blockId:e,enableVideoPlaybackSpeed:t,index:n,isActive:o,item:r,labels:a,media:i}){const c=rt();if(!i)return null;const l=c(i),{audio:d,image:h,video:m,embed:f}=l??{},p={allowTabNavigation:o,blockId:e,enableVideoPlaybackSpeed:t,item:r,labels:a};return d&&h?(0,s.jsx)("div",{className:`${Sre("media",{"image-with-audio":!0})}`,children:(0,s.jsx)(Vo,{...p,index:String(n),isOverlayAudio:!0,media:i})}):d&&(m||f)?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(Vo,{...p,index:`${n}-audio`,media:{audio:d}}),(0,s.jsx)(Vo,{...p,index:String(n),media:m?{video:m}:{embed:f},shouldPause:!o})]}):(0,s.jsx)(Vo,{...p,index:String(n),media:i,shouldPause:!o})}function gS(e,t){if(e===void 0||!t)return;if(Array.isArray(e))return e.map(o=>t.indexOf(o)).filter(o=>o!==-1);const n=t.indexOf(e);return n===-1?void 0:n}const{FILL_IN_THE_BLANK:Lre,MATCHING:kre,MULTIPLE_CHOICE:Ire,MULTIPLE_RESPONSE:Ere}=bn;function Nre({color:e,columnBehavior:t,correctAnswerColor:n,correctAnswerColorContrast:o,errorMessageId:r,incorrectAnswerColor:a,incorrectAnswerColorContrast:i,isActive:c,isComplete:l,isCorrect:d,isReduceMotion:h,isRetaking:m,isShuffled:f,item:p,itemProgress:C,labels:g,onChoiceSelect:x,onFillInChange:b,onMatchSet:y,onResponseToggle:L,onSubmit:S,prefersKeyboardNavigation:T,questionHtmlId:k,quizAcceptableResponses:I,quizAnswerPlaceholder:E,revealAnswers:N}){const{answers:M,type:A}=p,j=c&&!l,w=M??[],P=("correct"in p?p.correct:void 0)??"",R=("corrects"in p?p.corrects:void 0)??[],O=C?.text??"",B=C?.matches??{},D=(0,u.useCallback)(({title:V})=>(0,s.jsx)(je,{allowTabNavigation:c,className:"quiz-multiple-choice-option__label",value:V}
174),[c]),F=(0,u.useCallback)(({title:V})=>(0,s.jsx)(je,{allowTabNavigation:c,tagName:"span",value:V}),[c]);switch(A){case Lre:return(0,s.jsx)(C6,{allowTabNavigation:c,correctAnswerColor:n,correctAnswerColorContrast:o,errorMessageId:r,incorrectAnswerColor:a,incorrectAnswerColorContrast:i,isComplete:l,isCorrect:d,labels:g,onChange:b,onEnterToSubmit:S,options:w,questionHtmlId:k,quizAcceptableResponses:I,quizAnswerPlaceholder:E,revealAnswers:N,value:O});case kre:return(0,s.jsx)(T6,{answers:w,columnBehavior:t,correctAnswerColor:n,correctAnswerColorContrast:o,incorrectAnswerColor:a,incorrectAnswerColorContrast:i,isActive:c,isComplete:l,matches:B,onChange:y,prefersKeyboardNavigation:T,revealAnswers:N});case Ere:{const V=C?.selectedIndices,U=C?.shuffledAnswerIndices??[],H=f?gS(V,U):V;return(0,s.jsx)(I6,{allowTabNavigation:c,correctIds:R,errorMessageId:r,isComplete:l,isCorrect:d,isRetaking:m,labels:g,onChange:L,onEnterToSubmit:S,options:w,questionHtmlId:k,renderOptionText:F,revealAnswers:N,selectedIndices:H??[]})}case Ire:default:{const V=C?.selectedIndex,U=C?.shuffledAnswerIndices??[],H=f?gS(V,U):V;return(0,s.jsx)(k6,{allowTabNavigation:j,color:e,correctId:P,errorMessageId:r,isComplete:l,isCorrect:d,isReduceMotion:h,isRetaking:m,labels:g,onChange:x,onEnterToSubmit:S,options:w,questionHtmlId:k,renderOptionText:D,revealAnswers:N,selectedIndex:H??-1})}}}const Gr=_("quiz-card");function jre({color:e,enableVideoPlaybackSpeed:t,hasStart:n,index:o,interaction:r,isQuestionBankQuiz:a,isReduceMotion:i,isShuffled:c,item:l,items:d,labels:h,lessonId:m,onTakeAgain:f,prefersKeyboardNavigation:p,progress:C,settings:g,showNextButton:x}){const{canProceed:b,canSubmit:y,errorIncomplete:L,feedbackRef:S,errorMessageId:T,feedbackValue:k,handleChoiceSelect:I,handleFillInChange:E,handleMatchSet:N,handleNextFeedbackClick:M,handleResponseToggle:A,handleSubmit:j,handleTakeAgain:w,isActive:P,isComplete:R,isCorrect:O,isRetaking:B,itemProgress:D,quizItemHtmlId:F,selection:V,wrapperRef:U}=r,H=n?o+1:o,K=g?.revealAnswers===!0?Me.ALL:g?.revealAnswers??Me.NONE,Q=`q-${l.id}`,z=l.settings,W=g?.correctAnswerColor??void 0,$=g?.correctAnswerColorContrast??void 0,G=g?.incorrectAnswerColor??void 0,Z=g?.incorrectAnswerColorContrast??void 0,Y=h?.quizQuestion??"",ne=h?.quizAcceptableResponses??"",ee=h?.quizAnswerPlaceholder??"",le=h?.quizCorrect??"",J=h?.quizIncorrect??"",te=h?.quizSubmit??"",he=C?.percentComplete===100&&a?h?.quizRestart??"":h?.quizNext??"";return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(rX,{isActive:P,labels:h,questionLabel:Y,questionNumber:o+1,totalQuestions:d.length}),(0,s.jsx)(vs,{anchor:{kind:"question",lesson:String(m),question:String(l.id)},label:"Comments on quiz question",children:(0,s.jsx)(iX,{allowTabNavigation:P,htmlId:Q,value:l.title})}),(0,s.jsx)(Tre,{blockId:l.id,enableVideoPlaybackSpeed:t,index:H,isActive:P,item:l,labels:h,media:l.media}),(0,s.jsx)(p6,{type:l.type,children:(0,s.jsx)("div",{ref:U,children:(0,s.jsx)(Nre,{canSubmit:y,color:e,columnBehavior:z?.columnBehavior,correctAnswerColor:W,correctAnswerColorContrast:$,errorMessageId:T,incorrectAnswerColor:G,incorrectAnswerColorContrast:Z,isActive:P,isComplete:R,isCorrect:O,isReduceMotion:i,isRetaking:B,isShuffled:c,item:l,itemProgress:D,labels:h,onChoiceSelect:I,onFillInChange:E,onMatchSet:N,onResponseToggle:A,onSubmit:j,prefersKeyboardNavigation:p,questionHtmlId:Q,quizAcceptableResponses:ne,quizAnswerPlaceholder:ee,revealAnswers:K})})}),(0,s.jsx)("div",{"aria-live":"assertive",children:L&&(0,s.jsxs)("div",{className:`${Gr("validations")}`,"data-testid":"quiz-validation-error",children:[(0,s.jsx)(ae,{className:`${Gr("validation-icon")}`,"data-testid":"quiz-validation-icon",name:"alert-circle"}),(0,s.jsx)("span",{id:`${F}-error-incomplete-message`,children:h?.quizRequireAnswer})]})}),(0,s.jsx)(f6,{canProceed:b,feedbackRef:S,feedbackValue:k,isActive:P,isComplete:R,isCorrect:O,item:l,labels:h,quizCorrect:le,quizIncorrect:J,revealAnswers:K,selection:V}),(0,s.jsx)(d6,{allowNext:!f,canProceed:b,canSubmit:y,isReduceMotion:i,onNext:x?M:void 0,onSubmit:j,quizNext:he,quizSubmit:te}),f&&(0,s.jsx)("div",{className:`${Gr("retake-container",{active:R})}`,children:(0,s.jsx)("button",{className:`${Gr("retake",{active:R})}`,onClick:w,type:"button",children:(0,s.jsxs)("div",{className:`${Gr("retake-content")}`,children:[(0,s.jsx)("div",{className:`${Gr("retake-text")}`,children:"TAKE AGAIN"}),(0,s.jsx)("i",{className:`${Gr("retake-icon")} icon icon-reload`})]})})})]})}const{FILL_IN_THE_BLANK:vS,MATCHING:CS,MULTIPLE_CHOICE:bS,MULTIPLE_RESPONSE:xS}=bn;function wre(e,t){return e?.items?.[t]??{}}function Are(e,t,n,o,r){switch(e.type){case vS:return w6({answers:e.answers??[],text:t.text,caseSensitive:e.settings?.isCaseSensitive??!1,getL10nValue:r});case CS:return A6(t.matches??{});case xS:return M6({isShuffled:n,item:e,selectedIndices:t.selectedIndices,shuffledAnswerIndices:t.shuffledAnswerIndices});case bS:default:return R6({isCorrectAnswerUnshuffled:o,isShuffled:n,item:e,selectedIndex:t.selectedIndex,shuffledAnswerIndices:t.shuffledAnswerIndices})}}function Rre(e,t){switch(e.type){case vS:return t.text;case CS:return t.matches;case xS:return t.selectedIndices;case bS:default:return t.selectedIndex}}const{FILL_IN_THE_BLANK:Pre,MATCHING:Mre,MULTIPLE_CHOICE:Ore,MULTIPLE_RESPONSE:Bre}=bn;function Dre({hasStart:e=!1,id:t,index:n,isCorrectAnswerUnshuffled:o=!1,isShuffled:r=!1,item:a,onChoiceSelect:i,onFillInChange:c,onMatchSet:l,onResponseToggle:d,onTakeAgain:h,progress:m,reportAnswer:f,retryAttempts:p=0,setNextIndex:C,settings:g,submitAction:x,title:b}){const y=rt(),L=t2(),[S,T]=(0,u.useState)(!1),[k,I]=(0,u.useState)(Date.now),[E,N]=(0,u.useState)(!1),M=(0,u.useRef)(null),A=(0,u.useRef)(null),j=(0,u.useId)(),w=(0,u.useRef)({canSubmit:!1,isCorrect:!1,item:a,itemId:String(a.id),itemProgress:{},retryAttempts:p,revealAnswers:Me.NONE,settings:g,startTime:k,title:b}),P=e?n+1:n,R=m?.activeIndex??0,O=P===R,B=wre(m,a.id),D=B?.isComplete??!1,F=Are(a,B,r,o,y),V=g?.revealAnswers===!0?Me.ALL:g?.revealAnswers??Me.NONE,U=V===Me.ALL||V===Me.INCORRECT,H=O&&D&&U,K=O&&!D&&N6({answersLength:a.answers?.length??0,matches:B?.matches,selectedIndex:B?.selectedIndex,selectedIndices:B?.selectedIndices,text:B?.text,type:a.type});w.current={canSubmit:K,isCorrect:F,item:a,itemId:String(a.id),itemProgress:B,retryAttempts:p,revealAnswers:V,settings:g,startTime:k,title:b};const Q=B?.selectedIndex,z=O6({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:F,isShuffled:r,selectedIndex:Q,shuffledAnswerIndices:a.shuffledAnswerIndices}),W=Rre(a,B),$=S?`${j}-error-incomplete-message`:void 0,G=(0,u.useCallback)(()=>{T(!1)},[]),Z=String(a.id),Y=(0,u.useCallback)(({selectedIndex:ge})=>{G(),i?.({lessonId:t,itemId:Z,selectedIndex:ge,shuffledAnswerIndices:a.shuffledAnswerIndices})},[t,Z,a.shuffledAnswerIndices,i,G]),ne=(0,u.useCallback)(ge=>{G(),c?.({lessonId:t,itemId:Z,text:ge})},[t,Z,c,G]),ee=(0,u.useCallback)(ge=>{G(),l?.({lessonId:t,itemId:Z,matches:ge})},[t,Z,l,G]),le=(0,u.useCallback)(({optionIndex:ge})=>{G(),d?.({lessonId:t,itemId:Z,selectedIndex:ge,shuffledAnswerIndices:a.shuffledAnswerIndices})},[t,Z,a.shuffledAnswerIndices,d,G]),J=g?.passToContinue??!1,te=zu({allowedRetries:g?.retryCount,currentRetries:p}),he=(0,u.useCallback)((ge=()=>{},ce)=>{ce&&ge(ce),C?.({fromIndex:R,lessonId:t,finalize:!0,passToContinue:J,finalRetryAttempt:te})},[R,te,J,t,C]),_e=(0,u.useCallback)((ge,ce)=>{Se.pause(),he(ge??(()=>{}),ce)},[he]),X=(0,u.useCallback)(()=>{O&&_e()},[O,_e]),de=(0,u.useCallback)(ge=>{ge.preventDefault();const{canSubmit:ce,isCorrect:Re,item:en,itemId:tn,itemProgress:Qt,retryAttempts:nn,revealAnswers:Yt,settings:Ze,startTime:Zt,title:Rt}=w.current;if(!ce){switch(T(!0),en.type){case Pre:case Bre:case Ore:A.current?.querySelector("input")?.focus();break;case Mre:A.current?.querySelector("button")?.focus();break;default:break}return}w.current.canSubmit=!1;const ke={startTime:Zt,stopTime:Date.now()},{passToContinue:Oe}=Ze??{},ct=zu({allowedRetries:Ze?.retryCount,currentRetries:nn}),mo=L({duration:ke,id:t,isCorrect:Re,item:en,itemProgress:Qt,retryAttempts:nn,title:Rt});f?.(mo);const Ds={finalRetryAttempt:ct,lessonId:t,isCorrect:Re,itemId:tn,passToContinue:Oe,revealAnswers:Yt};if(Yt===Me.ALL||Yt===Me.INCORRECT){x?.(Ds);return}_e(x,Ds)},[L,_e,t,f,x]),Ce=(0,u.useCallback)(()=>{N(!0),setTimeout(()=>{h?.(),N(!1)},50)}
174,[h]),pe=(0,Fe.A)(O)??!1,Ie=(0,Fe.A)(D)??!1;return(0,u.useEffect)(()=>{!pe&&O&&I(Date.now())},[O,pe]),{activeIndex:R,canProceed:H,canSubmit:K,feedbackRef:M,errorIncomplete:S,errorMessageId:$,feedbackValue:z,handleChoiceSelect:Y,handleFillInChange:ne,handleMatchSet:ee,handleNextFeedbackClick:X,handleResponseToggle:le,handleSubmit:de,handleTakeAgain:Ce,isActive:O,isComplete:D,isCorrect:F,isRetaking:E,itemProgress:B,prevIsActive:pe,prevIsComplete:Ie,quizItemHtmlId:j,selection:W,wrapperRef:A}}const Fre=3;function Hre({feedbackRef:e,isActive:t,isComplete:n,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??Fre,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===Me.NONE||o))return!a&&n&&(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,n,o,a,c,l])}const $re=_("quiz-item");function _re({color:e,enableVideoPlaybackSpeed:t,hasStart:n=!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:p,onFillInChange:C,onMatchSet:g,onResponseToggle:x,onTakeAgain:b,prefersKeyboardNavigation:y,progress:L,quizTop:S,reportAnswer:T,retryAttempts:k=0,scrollId:I,setNextIndex:E,settings:N={revealAnswers:Me.ALL},showNextButton:M=!0,submitAction:A,title:j}){const w=pS(),P=Dre({hasStart:n,id:o,index:r,isCorrectAnswerUnshuffled:i,isShuffled:l,item:h,onChoiceSelect:p,onFillInChange:C,onMatchSet:g,onResponseToggle:x,onTakeAgain:b,progress:L,reportAnswer:T,retryAttempts:k,setNextIndex:E,settings:N,submitAction:A,title:j}),{activeIndex:R,feedbackRef:O,isActive:B,isComplete:D,isCorrect:F,prevIsActive:V,prevIsComplete:U}=P,H=N?.revealAnswers===!0?Me.ALL:N?.revealAnswers??Me.NONE;Hre({feedbackRef:O,isActive:B,isComplete:D,isReduceMotion:w,prevIsComplete:U,prevIsActive:V,quizTop:S,revealAnswers:H,scrollId:I});const K=(0,s.jsx)(jre,{color:e,enableVideoPlaybackSpeed:t,hasStart:n,index:r,interaction:P,isQuestionBankQuiz:c,isReduceMotion:w,isShuffled:l,item:h,items:m,labels:f,lessonId:o,onTakeAgain:b,prefersKeyboardNavigation:y,progress:L,settings:N,showNextButton:M});return a?(0,s.jsx)(yre,{activeIndex:R,index:n?r+1:r,isActive:B,isComplete:D,isCorrect:F,isTimedQuiz:d,settings:N,children:K}):(0,s.jsx)("div",{className:$re("wrap"),children:K})}const st=_("odometer"),yS=300,SS=700,Vre=300,zre=500,Gu=200,Ure=170,TS=145,Xn=Gu/2,qn=Ure/2,Bc=70,LS=1.5,Gre=2.5,Wre=225,Kre=135,kS=270,ng=7,qa={start:{dx:-19,dy:8},mid:{dx:-5,dy:22},end:{dx:26,dy:-7}},Zo={size:12,topOffset:-3,bottomOffset:21};function Qre(e){return e<.5?16*e**5:1+16*(e-1)**5}function Yre(e){return e<.5?2*e**2:1-(-2*e+2)**2/2}function Wu({angle:e,centerX:t,centerY:n,radius:o}){const r=(e-90)*Math.PI/180;return{x:t+o*Math.cos(r),y:n+o*Math.sin(r)}}function sg({centerX:e,centerY:t,counterClockwise:n=!1,endAngle:o,radius:r,startAngle:a}){const i=Wu({angle:a,centerX:e,centerY:t,radius:r}),c=Wu({centerX:e,centerY:t,radius:r,angle:o}),d=Math.abs(o-a)>180?"1":"0",h=n?"0":"1";return`M ${i.x} ${i.y} A ${r} ${r} 0 ${d} ${h} ${c.x} ${c.y}`}function IS(e,t,n){return t+n*kS*e/100}function Zre({hasPassed:e,isResultsVisible:t,isRTL:n,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),[p,C]=(0,u.useState)(!1),x=`hatch-pattern${(0,u.useId)()}`,b=(0,u.useRef)(null),y=(0,u.useRef)(!1),L=(0,u.useRef)([]),S=(0,u.useCallback)(()=>{L.current.forEach(clearTimeout),L.current=[]},[]),T=(0,u.useCallback)(()=>{b.current!==null&&(cancelAnimationFrame(b.current),b.current=null),S()},[S]);(0,u.useEffect)(()=>{t||(T(),y.current=!1,h(0),f(0),C(!1))},[t,T]),(0,u.useEffect)(()=>{if(!t||!l||y.current)return;y.current=!0;const K=i,Q=setTimeout(()=>{let z=null;const W=$=>{z===null&&(z=$);const G=$-z,Z=Math.min(G/SS,1),Y=Qre(Z),ne=Yre(Z);if(f(Y),h(Math.round(ne*K)),Z<1)b.current=requestAnimationFrame(W);else{f(1),h(K);const ee=setTimeout(()=>{C(!0);const le=setTimeout(()=>{o?.()},zre);L.current.push(le)},Vre-yS-SS);L.current.push(ee)}};b.current=requestAnimationFrame(W)},yS);L.current.push(Q)},[t,l,i,o]),(0,u.useEffect)(()=>()=>{T()},[T]);const k=n?Kre:Wre,I=n?-1:1,E=IS(a,k,I),N=IS(m*i,k,I),M=k+I*kS,A=Wu({centerX:Xn,centerY:qn,radius:Bc,angle:N}),j=Wu({centerX:Xn,centerY:qn,radius:Bc,angle:E}),w=m*i>=a,P=n?`%${a}`:`${a}%`,R=n?`%${d}`:`${d}%`,O=`${c} ${n?`%${i}`:`${i}%`}`,B=(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("div",{className:st("pass-mark-label"),children:r}),(0,s.jsx)("div",{className:st("pass-mark-percent"),children:P})]}),D=sg({centerX:Xn,centerY:qn,counterClockwise:n,radius:Bc,startAngle:k,endAngle:M}),F=sg({centerX:Xn,centerY:qn,counterClockwise:n,radius:Bc+3,startAngle:E,endAngle:M}),V=m>0?sg({centerX:Xn,centerY:qn,counterClockwise:n,radius:Bc,startAngle:k,endAngle:N}):"",U={x:j.x+(n?-13:13),y:j.y-13},H={x:U.x+(n?-13:13),y:U.y};return(0,s.jsxs)("div",{className:st(),children:[(0,s.jsxs)("svg",{"aria-hidden":"true",className:st("svg"),viewBox:`0 0 ${Gu} ${TS}`,children:[(0,s.jsx)("defs",{children:(0,s.jsx)("pattern",{height:"1.5",id:x,patternTransform:"rotate(45)",patternUnits:"userSpaceOnUse",width:"1.5",children:(0,s.jsx)("line",{className:st("hatch-line"),x1:"0",x2:"0",y1:"0",y2:"1.5"})})}),(0,s.jsx)("path",{className:st("passing-zone"),d:F,fill:"none",stroke:`url(#${x})`,strokeWidth:"6"}),(0,s.jsxs)("g",{className:st("pass-mark-lines"),children:[(0,s.jsx)("line",{className:st("pass-mark-line"),x1:j.x,x2:U.x,y1:j.y,y2:U.y}),(0,s.jsx)("line",{className:st("pass-mark-line"),x1:U.x,x2:H.x,y1:U.y,y2:H.y})]}),(0,s.jsx)("path",{className:st("track"),d:D,fill:"none",strokeWidth:LS}),V&&(0,s.jsx)("path",{className:st("progress",{passing:w}),d:V,fill:"none",strokeWidth:LS}),m>0&&(0,s.jsx)("circle",{className:st("dot",{passing:w}),cx:A.x,cy:A.y,r:Gre}),p&&(0,s.jsx)("g",{className:st("result-icon"),children:e?(0,s.jsx)("path",{className:st("checkmark"),d:`M ${Xn+qa.start.dx} ${qn+qa.start.dy} L ${Xn+qa.mid.dx} ${qn+qa.mid.dy} L ${Xn+qa.end.dx} ${qn+qa.end.dy}`,fill:"none",strokeLinecap:"square",strokeLinejoin:"miter",strokeWidth:ng}):(0,s.jsxs)("g",{className:st("x-mark"),children:[(0,s.jsx)("path",{className:st("x-line",{first:!0}),d:`M ${Xn-Zo.size} ${qn+Zo.topOffset} L ${Xn+Zo.size} ${qn+Zo.bottomOffset}`,fill:"none",strokeLinecap:"square",strokeWidth:ng}),(0,s.jsx)("path",{className:st("x-line",{second:!0}),d:`M ${Xn+Zo.size} ${qn+Zo.topOffset} L ${Xn-Zo.size} ${qn+Zo.bottomOffset}`,fill:"none",strokeLinecap:"square",strokeWidth:ng})]})})]}),(0,s.jsxs)("div",{className:st("score",{pass:p&&e,fail:p&&!e}),children:[(0,s.jsx)("div",{className:st("score-label"),children:c}),(0,s.jsx)("div",{className:st("pass-label"),children:O}),(0,s.jsx)("div",{className:st("fail-label"),children:O}),(0,s.jsx)("div",{className:st("score-percent",{hidden:p}),children:R})]}),(0,s.jsx)("div",{className:st("pass-mark"),style:{"--pass-mark-x":`${(n?Gu-H.x:H.x)/Gu*100}%`,"--pass-mark-y":`${(H.y+3)/TS*100}%`},children:B}),(0,s.jsx)("div",{className:st("pass-mark-mobile"),children:B})]})}const ES=(0,u.createContext)({handleExpiredQuiz:an,hideTimer:an,quizTime:0,resetQuizTimer:an,timerDuration:0,timerHidden:!1,timerRunning:!1});function Xre({children:e,handleExpiredQuiz:t=()=>{}
174,isTimedQuiz:n,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),[p,C]=(0,u.useState)(),g=(0,u.useMemo)(()=>Number(a),[a]),{activeIndex:x,endIndex:b,lessonId:y,lessonProgress:L,startIndex:S}=(0,u.useMemo)(()=>{const O=o?.currentLesson,B=o?.lessons?.[O],D=B?.activeIndex||0,F=Object.keys(B?.items||{}).length+1;return{activeIndex:D,lessonId:O,endIndex:F,lessonProgress:B,startIndex:0}},[o]),T=(0,Fe.A)(y),k=(0,Fe.A)(x),I=(0,u.useCallback)(()=>{l(g*60)},[g]),E=(0,u.useCallback)(()=>{l(O=>O-1)},[l]),N=(0,u.useCallback)(()=>{h(!0),i.current||(i.current=setInterval(E,1e3))},[E,h]),M=(0,u.useCallback)(O=>{f(O!==void 0?O:!m)},[m]),A=(0,u.useCallback)(()=>{h(!1),i.current&&(i.current=clearInterval(i.current))},[h]),j=(0,u.useCallback)(()=>{c&&p!==void 0&&r({lessonId:p,timeRemaining:c})},[p,c,r]),w=(0,u.useCallback)(()=>{j(),l(void 0)},[l,j]),P=(0,u.useCallback)(()=>l(L.timeRemaining||g*60),[L,g,l]);(0,u.useEffect)(()=>{if(!n)return;const O=T!==y,B=O&&c,D=O&&n;n&&!O&&p!==y&&C(y),B&&w(),D&&P()},[n,p,y,T,c,P,w]),(0,u.useEffect)(()=>{if(n)switch(x){case S:A();break;case b:I(),A();break;default:N(),k!==x&&T===y&&j()}},[x,b,n,y,k,T,I,S,N,A,j]),(0,u.useEffect)(()=>{n&&c<1&&A()},[n,c,A]),(0,u.useEffect)(()=>()=>A(),[A]);const R=(0,u.useMemo)(()=>({handleExpiredQuiz:t,hideTimer:M,quizTime:c,resetQuizTimer:I,timerDuration:g,timerHidden:m,timerRunning:d}),[t,M,c,I,g,m,d]);return(0,s.jsx)(ES.Provider,{value:R,children:e})}const NS=()=>(0,u.useContext)(ES),qre=e=>e.isTimedQuiz?(0,s.jsx)(Xre,{...e,children:e.children}):(0,s.jsx)(s.Fragment,{children:e.children}),Jre={currentLesson:void 0,isRestricted:!1,isRestrictedCourse:!1,restrictingQuiz:{}};function eae(e){const t=ie(),n=Lr(),o=Bt(e??""),r=(0,u.useMemo)(()=>{if(!t||!n||!o)return Jre;const l=c2({course:t,courseProgress:n});return g2({course:t,courseProgress:n,lesson:o,restrictingQuiz:l})},[t,n,o]),{restrictingQuiz:a}=r,i="title"in a?a.title:void 0,c=ht(i);return(0,u.useMemo)(()=>i?{...r,restrictingQuiz:{...a,title:c}}:r,[r,a,i,c])}const jS=_("quiz-results");function tae({skipToLessonId:e}){const t=xe(),n=Ww(e),o=Qh(),{lessonPreposition:r,quizSkipAhead:a}=t??{},i=n>0&&a&&r?`${a} ${n} ${r} ${o}`:a;return i?(0,s.jsxs)(tu,{className:"continue-btn--flex",href:xn(e),testId:"quiz-skip-ahead-btn",children:[(0,s.jsx)(ae,{"aria-hidden":"true",name:"arrow-right-from-line"}),i]}):null}function nae({isFooterVisible:e,isResultsVisible:t,lessonId:n,onTryAgainFocus:o}){const r=ot(),a=wl(n),{passed:i=!1,retryAttempts:c=0}=a??{},{continueType:l,retryCount:d,skipLessonsIfPassed:h,skipLessonsOptional:m,skipToLessonId:f}=Yh(n),{resetQuizTimer:p}=NS(),C=Foe(l),g=xe(),x=Jw(n),b=eae(x),{isRestricted:y}=b,{courseFinish:L,quizContinue:S,quizTakeAgain:T}=g??{},k=h&&i&&!!f,I=C,E=Hoe({canShowContinue:I,isExport:PI(),isRiseCom:!1,nextLesson:x}),N=(0,u.useCallback)(()=>{p(),r(aC(n))},[r,p,n]),M=I&&y&&x&&g&&(0,s.jsx)(xy,{bgType:"transparent",text:mw({labels:g,restrictions:b})}),A=I&&!y&&x&&(!k||m)&&S&&(0,s.jsx)(tu,{className:k?"continue-btn--outline":void 0,href:xn(x),text:S}),j=E&&L&&(0,s.jsx)(tu,{href:Pv,text:L}),w=(d===-1||c<d)&&(0,s.jsxs)(l6,{allowTabNavigation:t,onClick:N,onFocus:o,size:"lg",testId:"quiz-take-again-button",children:[(0,s.jsx)(ae,{"aria-hidden":"true",name:"arrow-rotate-left"}),T]});return(0,s.jsx)("div",{className:jS("footer",{active:t}),"data-testid":"quiz-results-footer",children:(0,s.jsxs)("div",{className:jS("footer-items",{hidden:!e}),inert:e?void 0:!0,children:[k&&(0,s.jsx)(tae,{skipToLessonId:f}),M,A,j,w]})})}const Ja=_("quiz-results");function sae({lessonId:e,questionCount:t}){const n=ot(),o=wl(e),{activeIndex:r=0,passed:a=!1,passingScore:i=80,reportResults:c=!1,score:l=0}=o??{},d=xe(),h=as(),{skipLessonsIfPassed:m,skipToLessonId:f}=Yh(e),[p,C]=(0,u.useState)(!1),g=t+1===r,x=(0,u.useRef)(g),b=(0,u.useRef)(void 0),y=(0,u.useRef)(void 0),L=(0,u.useRef)(null),S=(0,u.useId)(),{a11yQuizFailed:T="",a11yQuizPassed:k="",quizPassing:I="",quizResults:E="",quizScore:N=""}=d??{},M=`quiz-results-desc-${S}`,A=(0,u.useCallback)(()=>{y.current=setTimeout(()=>{C(!0),window.dispatchEvent(new CustomEvent(Yl))},500)},[]),j=(0,u.useCallback)(()=>{clearTimeout(y.current),y.current=void 0,C(!0)},[]);return(0,u.useEffect)(()=>()=>{clearTimeout(y.current)},[]),(0,u.useEffect)(()=>{g!==x.current&&(g?L.current?.focus():C(!1),x.current=g)},[g]),(0,u.useEffect)(()=>
174{if(!g||!a||!m||!f){b.current=void 0;return}const w=`${e}:${f}`;b.current!==w&&(b.current=w,n(oN({quizId:e,destinationId:f})))},[n,a,g,e,m,f]),(0,s.jsx)("div",{className:Ja(),children:(0,s.jsx)("div",{className:Ja("container"),children:(0,s.jsxs)("div",{className:Ja("content",{active:g}),"data-testid":"quiz-results",children:[(0,s.jsxs)("div",{className:Ja("header"),children:[(0,s.jsx)("h1",{"aria-describedby":M,className:Ja("label").mix("noOutline"),ref:L,tabIndex:-1,children:E}),(0,s.jsxs)("div",{className:"visually-hidden-always",id:M,children:[(0,s.jsx)("div",{children:`${I}: ${i}%`}),(0,s.jsx)("div",{children:`${N}: ${l}%`}),(0,s.jsx)("div",{children:a?k:T})]})]}),(0,s.jsx)("div",{"aria-hidden":"true",className:Ja("results"),children:(0,s.jsx)(Zre,{hasPassed:a,isResultsVisible:g,isRTL:h,onAnimationDone:A,passingLabel:I,passingScore:i,score:l,scoreLabel:N,shouldAnimate:c})}),(0,s.jsx)(nae,{isFooterVisible:p,isResultsVisible:g,lessonId:e,onTryAgainFocus:j})]})})})}const Dc=_("callout");function oae({icon:e,title:t,children:n}){return(0,s.jsxs)("div",{className:Dc(),role:"status",children:[(0,s.jsx)(ae,{className:Dc("icon"),name:e}),(0,s.jsxs)("div",{className:Dc("content"),children:[(0,s.jsx)("p",{className:Dc("title"),children:t}),(0,s.jsx)("div",{className:Dc("body"),children:n})]})]})}const rae=5,aae=15,iae=30,cae=60,lae=180,wS=300,AS=600,RS=120,dae=e=>e<=rae?{regularInterval:cae,lowTimeThreshold:RS}:e<=aae?{regularInterval:lae,lowTimeThreshold:RS}:e<=iae?{regularInterval:wS,lowTimeThreshold:wS}:{regularInterval:AS,lowTimeThreshold:AS},uae=(e,t,n,o)=>{const r=Math.floor(o/60),a=o%60,i=r===1?e:t;if(r>0&&a>0)return`${n}: ${r} ${i} and ${a} seconds`;if(r>0&&a===0)return`${n}: ${r} ${i}`;if(r===0&&a>0)return`${n}: ${a} seconds`};var Bs=v(49860);const vn=_("quiz-timer"),og=(e,t)=>`${e.toString().padStart(2,"0")}:${t.toString().padStart(2,"0")}`,hae=e=>{const t=Math.floor(e/60),n=e%60;return og(t,n)},PS=e=>{const t=Math.floor(e/60),n=e%60;return og(t,n)},mae=e=>og(e,0),MS=({area:e,exitCourseEnabled:t=!1,isStartScreenActive:n=!1,isEndScreenActive:o=!1,labelQuizTimerElapsed:r,labelQuizTimerExpired:a,labelQuizTimerExpiredAction:i,labelQuizTimerExpiredMessage:c,labelQuizTimerHide:l,labelQuizTimerLimit:d,labelQuizTimerMinute:h,labelQuizTimerMinutePlural:m,labelQuizTimerRemaining:f,labelQuizTimerShow:p,timerDisplay:C=vr.REMAINING,timerEnabled:g=!1})=>{const[x,b]=Bs.useState(!1),[y,L]=Bs.useState(""),S=Bs.useRef(null),T=Bs.useRef(!1),{hideTimer:k,quizTime:I,timerDuration:E,timerHidden:N,timerRunning:M,handleExpiredQuiz:A}=NS(),j=E*60,{isCover:w,isHeader:P,isHidden:R}=Bs.useMemo(()=>({isCover:e==="cover",isHeader:e==="header",isHidden:C===vr.HIDE_TIMER}),[e,C]),O=n&&!w,B=Bs.useMemo(()=>dae(E),[E]),D=Bs.useMemo(()=>({expired:a||"Time expired",minute:h||"minute",minutePlural:m||"minutes",remaining:f||"Time left"}),[a,h,m,f]),F=()=>{b(!1),A()},V=Bs.useCallback(()=>{const{regularInterval:Q,lowTimeThreshold:z}=B,W=I<=z&&I>0&&!T.current,$=S.current!==null&&S.current-I>=Q,G=S.current===null;if(W||$){W&&(T.current=!0),S.current=I;const Z=uae(D.minute,D.minutePlural,D.remaining,I);L(Z)}G&&(S.current=I)},[B,I,D]);if(Bs.useEffect(()=>{g&&I!==0&&(w||V())},[V,w,g,M,I]),Bs.useEffect(()=>{if(!g||I!==0||n)return;const Q=setTimeout(()=>{b(!0)},1200);return()=>clearTimeout(Q)},[I,g,n]),!g||O||o)return null;const U={"header-area":P,"cover-area":w,"hide-timer":R,"exit-course":t},H={display:[w,P&&!n].some(Ee())?null:"none"},K=()=>({[vr.SUMMARY]:(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)("div",{className:vn("label"),children:[d,":"]}),(0,s.jsxs)("div",{className:vn("value"),children:[E," ",E===1?h:m]})]}),[vr.REMAINING]:(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)("div",{className:vn("label"),children:[f,":"]}),(0,s.jsx)("div",{className:vn("value"),children:hae(I)})]}),[vr.ELAPSED]:(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)("div",{className:vn("label"),children:[r,":"]}),(0,s.jsx)("div",{className:vn("value"),children:PS(j-I)})]}),[vr.ELAPSED_TOTAL]:(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)("div",{className:vn("label"),children:[r,":"]}),(0,s.jsxs)("div",{className:vn("value"),children:[PS(j-I)," /"," ",mae(E)]})]})})[w?vr.SUMMARY:C];return(0,s.jsxs)("div",{className:vn(U),"data-testid":"quiz-timer",style:H,children:[I!==0&&(0,s.jsx)("div",{"aria-atomic":"true","aria-live":"polite",className:"visually-hidden",role:"status",children:y}),I===0&&(0,s.jsx)("div",{className:"visually-hidden",role:"alert",children:a||"Time expired"}),P&&N?(0,s.jsxs)("button",{className:vn("hide"),onClick:()=>k(!1),type:"button",children:[(0,s.jsx)(ae,{className:vn("icon"),name:"stopwatch-regular"}),p]}):(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)("div",{className:vn("time"),children:[(0,s.jsx)(ae,{className:vn("icon"),name:"stopwatch-regular"}),(0,s.jsx)("div",{className:vn("desc"),children:K()})]}),P&&(0,s.jsx)("button",{className:vn("hide"),onClick:()=>k(!0),type:"button",children:l})]}),!w&&x&&ps.createPortal((0,s.jsxs)(xf,{className:"quiz-timer-modal","data-testid":"quiz-timer-modal",disableBackgroun
174dScroll:!0,heading:a,hideCloseButton:!0,onCancel:F,onClose:F,onOverlayClick:()=>{},children:[(0,s.jsx)("p",{children:c}),(0,s.jsx)("button",{"data-testid":"quiz-view-results-button",onClick:F,type:"button",children:i})]}),Zs({childType:"dialog"}))]})},Jn=_("quiz-start"),fae=e=>(e?.retryAttempts??0)>0;function OS({lessonId:e,isActive:t,hasQuestions:n=!0}){const o=ot(),r=(0,u.useRef)(null),a=wl(e),i=xe(),c=ie(),l=Oh(),d=Bt(e),h=N2(),m=me(j2),f=l?.authorName,p=l?.avatar,C=c?.theme?.showAuthor??!1,g=c?.theme?.showLessonCount??!1,x=h[e]??0,b=ht(d?.description),y=ht(d?.title),L=Hf()==="exiting",S=d?.settings?.timer,T=d?.settings?.asLesson!==!1,{a11yAuthorPrefix:k="",lessonName:I="",lessonPreposition:E="",quizStart:N="",quizTakeAgain:M="",quizTimerElapsed:A="",quizTimerExpired:j="",quizTimerExpiredAction:w="",quizTimerExpiredMessage:P="",quizTimerHide:R="",quizTimerLimit:O="",quizTimerMinute:B="",quizTimerMinutePlural:D="",quizTimerRemaining:F="",quizTimerShow:V=""}=i??{},U=fae(a),H=t&&U,K=U?"quiz-take-again-button":"quiz-start-button";(0,u.useEffect)(()=>{H&&r.current?.focus()},[H]);const Q=()=>{BI(e),o(dh({lessonId:e,fromIndex:0,finalize:!1}))},z=U?M:N;return(0,s.jsx)("div",{"aria-hidden":!t,className:Jn(),children:(0,s.jsx)("div",{className:Jn("container"),children:(0,s.jsxs)("div",{className:Jn("content"),children:[(0,s.jsxs)("div",{className:Jn("header"),children:[(0,s.jsx)("div",{className:Jn("counter"),children:T&&g&&(0,s.jsx)("div",{className:Jn("count"),children:`${I} ${x} ${E} ${m}`})}),(0,s.jsx)(vs,{anchor:{field:"title",kind:"lessonField",lesson:String(e)},label:"Comments on quiz title",children:(0,s.jsx)("h1",{ref:r,tabIndex:-1,children:(0,s.jsx)(je,{className:Jn("title"),value:y})})}),C&&p&&f?(0,s.jsxs)("div",{className:Jn("author"),children:[(0,s.jsx)("img",{alt:"",src:lv(p)}),(0,s.jsxs)("span",{className:"visually-hidden",children:[k," ",f]}),(0,s.jsx)("span",{"aria-hidden":"true",children:f})]}):null]}),n&&S&&!L&&(0,s.jsx)(MS,{area:"cover",exitCourseEnabled:c?.lmsOptions?.enableExitCourse,isStartScreenActive:t,labelQuizTimerElapsed:A,labelQuizTimerExpired:j,labelQuizTimerExpiredAction:w,labelQuizTimerExpiredMessage:P,labelQuizTimerHide:R,labelQuizTimerLimit:O,labelQuizTimerMinute:B,labelQuizTimerMinutePlural:D,labelQuizTimerRemaining:F,labelQuizTimerShow:V,timerEnabled:S}),(0,s.jsx)(vs,{anchor:{field:"description",kind:"lessonField",lesson:String(e)},label:"Comments on quiz description",children:(0,s.jsx)(je,{allowTabNavigation:t,className:Jn("description"),value:b})}),n?(0,s.jsxs)("button",{className:Jn("start-button"),"data-testid":K,onClick:t?Q:an,tabIndex:t?void 0:-1,type:"button",children:[(0,s.jsx)("span",{className:Jn("start-button-text"),children:z}),(0,s.jsx)(ae,{className:Jn("start-button-icon"),name:"chevron-right-solid"})]}):(0,s.jsx)(oae,{icon:"circle-exclamation",title:"No questions found",children:"This quiz has no questions. Contact your admin for help."})]})})})}function pae(){const[e,t]=(0,u.useState)();return(0,u.useEffect)(()=>{const n=document.querySelector("[data-previous-lesson]");if(!n)return;t(n.clientHeight);const o=new ResizeObserver(([r])=>{t(r.target.clientHeight)});return o.observe(n),()=>{o.disconnect()}},[]),e}const Ku=_("quiz");function gae({lessonId:e}){const t=Bt(e);return!e||!gl(t)?null:(0,s.jsx)(vae,{lessonId:e})}function vae({lessonId:e}
174){const t=ie(),n=t?.color,o=xe(),r=Hf()==="exiting",i=Ed()?.prefersKeyboardNavigation??!1,c=ma(e)??"",{activeIndex:l,progress:d,resolvedItems:h,retryAttempts:m,settings:f,sourceItems:p}=ure({lessonId:e}),C=Woe({settings:f}),g=pae();bre({lessonId:e,items:p});const x=PT(h.length),b=MT(l),{items:y,startOffset:L}=OT(h,l);return h.length===0?(0,s.jsx)("section",{className:Ku(),"data-quiz":!0,"data-testid":"quiz",children:(0,s.jsx)("div",{className:Ku("wrap"),children:(0,s.jsx)("div",{className:Jc({activeIndex:0,index:0}),children:(0,s.jsx)(OS,{hasQuestions:!1,isActive:!0,lessonId:e})})})}):(0,s.jsxs)("section",{className:Ku(),"data-quiz":!0,"data-testid":"quiz",children:[f?.timer&&!r&&(0,s.jsx)(MS,{area:"header",exitCourseEnabled:t?.lmsOptions?.enableExitCourse,isEndScreenActive:l===x,isStartScreenActive:l===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:f?.timerDisplay??void 0,timerEnabled:f?.timer}),(0,s.jsxs)("div",{className:Ku("wrap"),children:[b&&(0,s.jsx)("div",{className:Jc({activeIndex:l,index:0}),children:(0,s.jsx)(OS,{isActive:l===0,lessonId:e})}),y.map((S,T)=>{const k=S.type===bn.MULTIPLE_CHOICE;return(0,s.jsx)(_re,{color:n,hasStart:!0,id:e,index:T+L,isCard:!0,isCorrectAnswerUnshuffled:k?Uoe(S.shuffledAnswerIndices,S.answers,S.correct):void 0,isShuffled:zoe(S.shuffledAnswerIndices,S.answers),isTimedQuiz:f?.timer,item:S,items:h,labels:o??{},onChoiceSelect:C.onChoiceSelect,onFillInChange:C.onFillInChange,onMatchSet:C.onMatchSet,onResponseToggle:C.onResponseToggle,prefersKeyboardNavigation:i,progress:d,quizTop:g,reportAnswer:dv,retryAttempts:m,scrollId:"page-wrap",setNextIndex:C.onSetIndex,settings:f??void 0,submitAction:C.onSubmit,title:c},`item-${S.id}`)}),(0,s.jsx)("div",{className:Jc({activeIndex:l,index:x}),inert:x===l?void 0:!0,children:(0,s.jsx)(sae,{lessonId:e,questionCount:h.length})})]})]})}var BS;const DS={"rise-course-navigation":!0},Cae={"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,"ai-assistant-redistribution":!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,"universal-credits-ga":!1},rg=(0,u.createContext)(DS);rg.displayName="FeatureFlagsContext";const{Provider:bae}=rg;function xae({children:e,value:t}){const n=(0,u.useMemo)(()=>({...Cae,...t,...DS}),[t]);return(0,s.jsx)(bae,{value:n,children:e})}function ag(){return(0,u.useContext)(rg)}function ig(e){return ag()[e]}function Ove(e){function t(n){const o=ag();return BS(e,{...n,flags:o})}return t.displayName=`withFeatureFlags(${e.displayName||e.name})`,t}function Bve(e,t){return function(n){const o=r=>{const a=ig(e),i={...r,[t]:a};return BS(n,{...i})};return o.displayName=`withFeatureFlag(${n.displayName||n.name})`,o}}const FS=({children:e})=>(0,s.jsx)(s.Fragment,{children:e});FS.displayName="On";const HS=({children:e})=>(0,s.jsx)(s.Fragment,{children:e});HS.displayName="Off";const Qu=({children:e,featureFlags:t})=>{const n=ag(),o=(0,u.useMemo)(()=>{const i=[].concat(t??[]);return i.length&&i.every(c=>n[c])},[t,n]),{on:r=null,off:a=null}=(0,u.useMemo)(()=>{const i={};return u.Children.forEach(e,c=>{switch(c.type.displayName){case Qu.On.displayName:i.on=c;break;case Qu.Off.displayName:i.off=c;break;default:i.on=e}}),i},[e]);return o?r:a};Qu.On=FS,Qu.Off=HS;function yae({lessonProgress:e}){const t=e?.id,n=ig(vh)===!0;return(0,s.jsx)("div",{className:"page page--lessonTypeQuiz","data-page":!0,children:(0,s.jsx)("div",{className:"page__wrapper",children:(0,s.jsx)(Vu,{lessonId:t,children:(0,s.jsxs)("div",{className:"page__content",children:[(0,s.jsx)(lS,{lessonProgress:e,type:"quiz"}),n?t!=null?(0,s.jsx)(Doe,{lessonId:t}):null:(0,s.jsx)(gae,{lessonId:t},`${t??""}-${e?.retryAttempts??0}`)]})})})})}const Yu=_("lesson-header"),io=({avatar:e,authorName:t,className:n=""})=>{const o=xe();return(0,s.jsxs)("div",{className:Yu("author").mix(n),children:[(0,s.jsx)("img",{alt:"",className:"lesson-header__author-img",src:e?mt(e):void 0}
174),(0,s.jsx)("span",{className:"visually-hidden-always",children:o?.a11yAuthorPrefix}),(0,s.jsx)("span",{className:"lesson-header__author-name",children:t})]})},Zu=({showPartnerContent:e=!1})=>(0,s.jsx)("div",{className:Yu("author",{"partner-content":e})}),co=()=>(0,s.jsx)("div",{className:"lesson-header__counter"}),lo=({lessonName:e,lessonPreposition:t,totalLessons:n,lessonNumber:o,showPartnerContent:r=!1})=>{const{lmsOptions:a}=ie();return(0,s.jsx)("div",{className:Yu("counter",{"partner-content":r}),children:(0,s.jsx)("div",{className:Yu("count",{"exit-button-enabled":a?.enableExitCourse}),children:`${e} ${o} ${t} ${n}`})})},ei=({description:e})=>(0,s.jsx)(je,{className:"lesson-header__description",value:e}),Sae=({children:e})=>(0,s.jsx)("div",{className:"lesson-header__grouped-row",children:e}),Tae=({ariaLabel:e,imgRole:t,children:n,sectionStyles:o,topWrapClassName:r})=>(0,s.jsxs)("header",{className:"page__header",children:[(0,s.jsx)("div",{className:"page__header-limit",children:(0,s.jsx)("div",{className:"page__header-container",children:(0,s.jsx)("div",{className:"lesson-header__row",children:(0,s.jsx)("div",{className:"lesson-header__main",children:(0,s.jsx)("div",{className:"lesson-header",children:(0,s.jsx)("div",{className:r,children:n})})})})})}),(0,s.jsx)("div",{"aria-label":e,className:"page__header-bg",role:t,style:o})]}),uo=({title:e,id:t})=>{const n=Pb(t,"title"),o=(0,s.jsx)("h1",{className:"lesson-header__title","data-change-path":n,tabIndex:-1,children:(0,s.jsx)(je,{value:e})});return t==null?o:(0,s.jsx)(vs,{anchor:{field:"title",kind:"lessonField",lesson:String(t)},label:"Comments on lesson title",children:o})},Xo=_("lesson-header"),$S=e=>`url(${Hi({width:76,height:76,imageKey:e.image})})`,cg=({partnerContentAuthors:e})=>{const t=e.map(o=>o.name).join(", "),n=e.length===1;return(0,s.jsxs)("div",{className:Xo("partner-content",{mobile:!0}),children:[(0,s.jsx)("div",{className:Xo("partner-content-author",{single:n}),children:e.map(o=>(0,s.jsx)("div",{className:Xo("partner-content-author-img",{single:n}),style:{backgroundImage:$S(o)}},o.name))}),(0,s.jsx)("span",{"aria-hidden":"true",className:Xo("author-name"),children:t})]})},ti=({partnerContentAuthors:e})=>{const t=xe();return(0,s.jsx)("div",{className:Xo("partner-content"),children:e.map(n=>(0,s.jsxs)("div",{className:Xo("partner-content-author"),children:[(0,s.jsx)("div",{className:Xo("partner-content-author-img"),style:{backgroundImage:$S(n)}}),(0,s.jsxs)("div",{children:[(0,s.jsxs)("span",{className:"visually-hidden",children:[t?.a11yAuthorPrefix," ",n.name]}),(0,s.jsx)("span",{"aria-hidden":"true",className:Xo("author-name"),children:n.name})]})]},n.name))})};var _S=v(49860);const ni=_("lesson-header"),Lae=({authorName:e,avatar:t,description:n,lessonName:o,lessonNumber:r,lessonPreposition:a,partnerContentAuthors:i,showAuthor:c,showLessonCount:l,title:d,totalLessons:h,lessonId:m})=>{const f=i!=null&&c,p=t&&e&&c&&!f,C=p||f||l,g=l&&(p||f);return(0,s.jsxs)("div",{className:ni("content"),children:[C&&(0,s.jsxs)("div",{className:ni("info-row"),children:[p?(0,s.jsx)(io,{authorName:e,avatar:t}):(0,s.jsx)(Zu,{}),f&&(0,s.jsx)(ti,{partnerContentAuthors:i}),g&&(0,s.jsx)("span",{"aria-hidden":"true",className:ni("info-row--divider"),children:"|"}),l?(0,s.jsx)(lo,{lessonName:o,lessonNumber:r,lessonPreposition:a,totalLessons:h}):(0,s.jsx)(co,{})]}),(0,s.jsxs)("div",{className:ni("title-wrapper",{"no-info":!C}),children:[(0,s.jsx)(uo,{id:m,title:d}),n&&(0,s.jsx)(ei,{description:n,id:m})]})]})},kae=({authorName:e,avatar:t,description:n,lessonName:o,lessonNumber:r,lessonPreposition:a,partnerContentAuthors:i,showAuthor:c,showLessonCount:l,title:d,totalLessons:h,lessonId:m})=>{const f=i!=null,p=_S.useMemo(()=>t&&e&&c&&!f,[t,e,c,f]);return(0,s.jsxs)("div",{className:ni("content"),children:[l?(0,s.jsx)(lo,{lessonName:o,lessonNumber:r,lessonPreposition:a,totalLessons:h}):(0,s.jsx)(co,{}),p&&(0,s.jsx)(io,{authorName:e,avatar:t}),c&&f&&(0,s.jsx)(cg,{partnerContentAuthors:i}),(0,s.jsx)(uo,{id:m,title:d}),n&&(0,s.jsx)(ei,{description:n,id:m})]})},Iae=({authorName:e,avatar:t,description:n,lessonName:o,lessonNumber:r,lessonPreposition:a,partnerContentAuthors:i,showAuthor:c,showLessonCount:l,title:d,totalLessons:h,lessonId:m})=>{const f=i!=null,p=_S.useMemo(()=>t&&e&&c&&!f,[t,e,c,f]);return(0,s.jsxs)("div",{className:ni("content"),children:[l?(0,s.jsx)(lo,{lessonName:o,lessonNumber:r,lessonPreposition:a,totalLessons:h}):(0,s.jsx)(co,{}),(0,s.jsx)(uo,{id:m,title:d}),p?(0,s.jsx)(io,{authorName:e,avatar:t}):(0,s.jsx)(Zu,{showPartnerContent:f}),c&&f&&(0,s.jsx)(ti,{partnerContentAuthors:i}),n&&(0,s.jsx)(ei,{description:n,id:m})]})};function Eae(e){const t=kx();return e.lessonHeaderSize===Ti.SMALL&&!t?(0,s.jsx)(Lae,{...e}):t?(0,s.jsx)(kae,{...e}):(0,s.jsx)(Iae,{...e})}const Nae=()=>$t(480);var VS=v(49860);const lg=_("lesson-header"),jae=({authorName:e,avatar:t,lessonName:n,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,p=f||m||c,C=c&&(f||m);return(0,s.jsxs)("div",{className:lg("content"),children:[p&&(0,s.jsxs)("div",{className:lg("info-row"),children:[f?(0,s.jsx)(io,{authorName:e,avatar:t}):(0,s.jsx)(Zu,{}),m&&(0,s.jsx)(ti,{partnerContentAuthors:a}),C&&(0,s.jsx)("span",{"aria-hidden":"true",className:lg("info-row--divider"),children:"|"}),c?(0,s.jsx)(lo,{lessonName:n,lessonNumber:o,lessonPreposition:r,totalLessons:d}):(0,s.jsx)(co,{})]}),(0,s.jsx)("div",{children:(0,s.jsx)(uo,{id:h,title:l})})]})},wae=({authorName:e,avatar:t,lessonName:n,lessonNumber:o,lessonPreposition:r,partnerContentAuthors:a,showAuthor:i,showLessonCount:c,title:l,totalLessons:d,lessonId:h})=>{const m=a!=null,f=VS.useMemo(()=>t&&e&&i&&!m,[t,e,i,m]);return(0,s.jsxs)(s.Fragment,{children:[c?(0,s.jsx)(lo,{lessonName:n,lessonNumber:o,lessonPreposition:r,totalLessons:d}):(0,s.jsx)(co,{}),f&&(0,s.jsx)(io,{authorName:e,avatar:t}),i&&m&&(0,s.jsx)(cg,{partnerContentAuthors:a}),(0,s.jsx)(uo,{id:h,title:l})]})},Aae=({authorName:e,avatar:t,lessonName:n,lessonNumber:o,lessonPreposition:r,partnerContentAuthors:a,showAuthor:i,showLessonCount:c,title:l,totalLessons:d,lessonId:h})=>{const m=a!=null,f=VS.useMemo(()=>t&&e&&i&&!m,[t,e,i,m]);return(0,s.jsxs)(s.Fragment,{children:[f?(0,s.jsx)(io,{authorName:e,avatar:t}):(0,s.jsx)(Zu,{}),i&&m&&(0,s.jsx)(ti,{partnerContentAuthors:a}),(0,s.jsx)(uo,{id:h,title:l}),c?(0,s.jsx)(lo,{lessonName:n,lessonNumber:o,lessonPreposition:r,totalLessons:d}):(0,s.jsx)(co,{})]})};function Rae(e){const t=Nae();return e.lessonHeaderSize===Ti.SMALL&&!t?(0,s.jsx)(jae,{...e}):t?(0,s.jsx)(wae,{...e}):(0,s.jsx)(Aae,{...e})}var zS=v(49860);const Xu=_("lesson-header"),dg=()=>(0,s.jsx)("div",{className:Xu("author--hidden")}),Pae=({authorName:e,avatar:t,description:n,lessonName:o,lessonNumber:r,lessonPreposition:a,partnerContentAuthors:i,showAuthor:c,showLessonCount:l,title:d,totalLessons:h,lessonId:m})=>{const f=i!=null&&c,p=t&&e&&c&&!f,C=p||f||l,g=l&&(p||f);
174return(0,s.jsxs)("div",{className:Xu("content"),children:[C&&(0,s.jsxs)("div",{className:Xu("info-row"),children:[p?(0,s.jsx)(io,{authorName:e,avatar:t}):(0,s.jsx)(dg,{}),f&&(0,s.jsx)(ti,{partnerContentAuthors:i}),g&&(0,s.jsx)("span",{"aria-hidden":"true",className:Xu("info-row--divider"),children:"|"}),l?(0,s.jsx)(lo,{lessonName:o,lessonNumber:r,lessonPreposition:a,totalLessons:h}):(0,s.jsx)(co,{})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)(uo,{id:m,title:d}),n&&(0,s.jsx)(ei,{description:n,id:m})]})]})},Mae=e=>{const{authorName:t,avatar:n,description:o,lessonName:r,lessonNumber:a,lessonPreposition:i,partnerContentAuthors:c,showAuthor:l,showLessonCount:d,title:h,totalLessons:m,lessonId:f}=e,p=c!=null,C=zS.useMemo(()=>n&&t&&l&&!p,[n,t,l,p]);return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(uo,{id:f,title:h}),(0,s.jsxs)(Sae,{children:[C?(0,s.jsx)(io,{authorName:t,avatar:n}):(0,s.jsx)(dg,{}),l&&p&&(0,s.jsx)(ti,{partnerContentAuthors:c}),d?(0,s.jsx)(lo,{lessonName:r,lessonNumber:a,lessonPreposition:i,showPartnerContent:p,totalLessons:m}):(0,s.jsx)(co,{})]}),o&&(0,s.jsx)(ei,{description:o,id:f})]})},Oae=e=>{const{authorName:t,avatar:n,description:o,lessonName:r,lessonNumber:a,lessonPreposition:i,partnerContentAuthors:c,showAuthor:l,showLessonCount:d,title:h,totalLessons:m,lessonId:f}=e,p=c!=null,C=zS.useMemo(()=>n&&t&&l&&!p,[n,t,l,p]);return(0,s.jsxs)(s.Fragment,{children:[d?(0,s.jsx)(lo,{lessonName:r,lessonNumber:a,lessonPreposition:i,totalLessons:m}):(0,s.jsx)(co,{}),C?(0,s.jsx)(io,{authorName:t,avatar:n}):(0,s.jsx)(dg,{}),l&&p&&(0,s.jsx)(cg,{partnerContentAuthors:c}),(0,s.jsx)(uo,{id:f,title:h}),o&&(0,s.jsx)(ei,{description:o,id:f})]})};function Bae(e){const t=kd();return e.lessonHeaderSize===Ti.SMALL&&!t?(0,s.jsx)(Pae,{...e}):t?(0,s.jsx)(Oae,{...e}):(0,s.jsx)(Mae,{...e})}const Dae={[se.RISE_CLASSIC]:Eae,[se.HORIZON]:Rae,[se.APEX]:Bae};function Fae(e){const t=Ct(),n=Dae[t];return(0,s.jsx)(n,{...e})}const Hae=_("lesson-header"),$ae=({authorName:e,avatar:t,children:n,description:o,labels:{lessonName:r,lessonPreposition:a},lessonHeaderImageColor:i,lessonHeaderSize:c,lessonHeaderStyle:l,lessonId:d,partnerContentAuthors:h,totalLessons:m,lessonNumber:f,showAuthor:p,showLessonCount:C,title:g})=>{const x=Cj(),b=ZC(x),y=l===re.IMAGE,L=Hae("top-wrap"),{alpha:S,ariaLabel:T,media:k,role:I}=Rr("lessonHeaderImage"),E=k?.image,N=(0,u.useMemo)(()=>{if(E&&y){const M=i===ut.LIGHT?"#fff":"#000";return Il({alpha:S,color:M,url:gt(E)})}},[E,y,i,S]);return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(Tae,{ariaLabel:y?T:void 0,imgRole:y?I:void 0,sectionStyles:N,topWrapClassName:L,children:(0,s.jsx)(Fae,{authorName:e,avatar:t,description:o,lessonHeaderSize:c,lessonId:d,lessonName:r,lessonNumber:f,lessonPreposition:a,partnerContentAuthors:h,showAuthor:p,showLessonCount:C&&!b,title:g,totalLessons:m})}),n]})};function _ae(e){const t=e?.customColorLessonHeaderContrast,n=e?.lessonHeaderColor;return(0,u.useMemo)(()=>{const o=$n(n),r=t??o;return(r===Le.AUTO?o:r)===Le.DARK?Tt.DARK:Tt.LIGHT},[t,n])}var Vae=v(89464),ug=v.n(Vae);v.dn(US);function US({authors:e,lessonAuthor:t,courseAuthor:n,selectedAuthorId:o}){if(o==="none")return{};if(o){const r=ug()(e,{id:o});if(r)return r}if(t){const r=ug()(e,{id:t});if(r)return r}if(n){const r=ug()(e,{id:n});if(r)return r}return{}}const{LARGE:zae,SMALL:Uae}=Ti,{ACCENT:Gae,BLACK:Wae,COLOR:GS,DARK:Kae,GRAY:Qae,IMAGE:WS,LIGHT:Yae,TINT:Zae}=re,Xae=_("lesson-header-wrap");function qae({handleNavigate:e,isLessonEntering:t,isLessonExiting:n,isMobileHeader:o,lesson:r,lessonProgress:a,loadMedia:i,observeProgress:c=!0}){const l=Sr(),d=xe(),h=mm(),m=_ae(l?.theme);if(!l||!d||r.type!=="blocks"&&r.type!=="quiz")return null;if(r.type==="quiz")return(0,s.jsx)(yae,{lessonProgress:a?.type==="quiz"?a:void 0});const f=C2({course:l,lesson:r}),p=typeof f=="object"&&f!==null&&"id"in f&&(typeof f.id=="string"||typeof f.id=="number")?String(f.id):null,C=fw({course:l,lesson:r}),g=pw(l),{author:x,selectedAuthorId:b}=r,{authors:y,color:L,enableVideoPlaybackSpeed:S,showLessonCount:T,theme:k}=l,{hideLessonHeaders:I,lessonHeaderColor:E,lessonHeaderImageColor:N,lessonHeaderSize:M,lessonHeaderStyle:A,navigationType:j,showAuthor:w}=k??{},R=h.find(Q=>Q.id===b)?.data?.authors,O=US({authors:y,lessonAuthor:x,courseAuthor:l.author,selectedAuthorId:b}),{avatar:B,authorName:D}=O,F=(0,s.jsx)($ae,{authorName:D,avatar:B,description:r.description,labels:d,lessonHeaderImageColor:N,lessonHeaderSize:M,lessonHeaderStyle:A,lessonId:r.id,lessonNumber:C,partnerContentAuthors:R,showAuthor:w,showLessonCount:T,title:r.title,totalLessons:g,children:(0,s.jsx)(lS,{id:r.id,items:r.items,lessonProgress:a,navigationType:j,scrollPosition:0,type:r.type})}),U=`image-${(N??ut.DARK).toLowerCase()}`,H=Xae({[U]:A===WS,accent:A===Gae,black:A===Wae,collapsed:I,custom:A===GS,dark:A===Kae,gray:A===Qae,image:A===WS,large:M===zae&&!o,light:A===Yae,mobile:o,small:M===Uae&&!o,tint:A===Zae,"video-training":yr(l)}),K=A===GS?{"--lesson-header-contrast-color":m,"--color-background":E}:{};return(0,s.jsx)(Toe,{animateBlockEntrance:l.animateBlockEntrance??!1,color:L??"",data:r,enableVideoPlaybackSpeed:S??!1,handleNavigate:e,hideLessonHeaders:I??void 0,isLessonEntering:t,
174isLessonExiting:n,lessonHeader:F,lessonHeaderWrapClasses:H,lessonHeaderWrapStyles:K,lessonProgress:a?.type==="blocks"?a:void 0,loadMedia:i,nextLesson:p,observeProgress:c})}const Jae=({percentComplete:e,trackingCompletionPercentage:t,labelCompletionRequirement:n="Completion Requirement",labelPercentCompletion:o="% Completion",labelYouCompleted:r="You completed:",labelA11yRequirementCompleted:a="Requirement completed, check mark",labelA11yRequirementNotCompleted:i="Requirement not completed, empty square"})=>{const c=as();if(t==null)return null;const l=Ea({percent:t,label:o,isRTL:c}),d=c?`%${e}`:`${e}%`;return(0,s.jsxs)("div",{className:"progress-summary__requirement",children:[(0,s.jsxs)("div",{className:"progress-summary__requirement-stats-wrap",children:[(0,s.jsx)("h2",{className:"progress-summary__requirement-title",children:n}),(0,s.jsxs)("div",{className:"progress-summary__requirement-stats",children:[(0,s.jsx)("div",{children:l}),(0,s.jsxs)("div",{children:[r,"\xA0",(0,s.jsx)("strong",{className:"progress-summary__requirement-stats-percent-achieved",children:d})]})]})]}),(0,s.jsx)(KS,{labelA11yRequirementCompleted:a,labelA11yRequirementNotCompleted:i,requirementMet:e!=null&&t<=e})]})},eie=({outOfAttempts:e,quizPassed:t,quizPassingScore:n=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:p="Requirement not completed, empty square"})=>{const C=as();if(!a)return null;const g=Ea({percent:n,label:l,isRTL:C});return(0,s.jsxs)("div",{className:"progress-summary__requirement",children:[(0,s.jsxs)("div",{className:"progress-summary__requirement-stats-wrap",children:[(0,s.jsx)("h2",{className:"progress-summary__requirement-title",children:i}),(0,s.jsxs)("div",{className:"progress-summary__requirement-stats",children:[(0,s.jsxs)("div",{children:[c," ",g," ",r]}),o==null?(0,s.jsx)("div",{children:(0,s.jsx)(un,{className:"progress-summary__requirement-stats-link brand--color",to:xn(a),children:d})}):(0,s.jsxs)("div",{children:[h,"\xA0",(0,s.jsxs)("strong",{className:"progress-summary__requirement-stats-percent-achieved",children:[o,"%"]})]})]}),e&&(0,s.jsx)("span",{className:"progress-summary__requirement-no-attempts",children:m})]}),(0,s.jsx)(KS,{labelA11yRequirementCompleted:f,labelA11yRequirementNotCompleted:p,requirementMet:t})]})},KS=({requirementMet:e,labelA11yRequirementCompleted:t,labelA11yRequirementNotCompleted:n})=>e?(0,s.jsx)(ae,{"aria-label":t,classNameIcon:"progress-summary__requirement-checkbox-checked",name:"square-check"}):(0,s.jsx)("div",{"aria-label":n,className:"progress-summary__requirement-checkbox-empty",role:"img"}),tie=({dueAt:e})=>e?(0,s.jsx)("div",{className:"progress-summary__header-due brand--color brand--border",children:Ym(e)}):null;var nie=v(22043),sie=v.n(nie);const oie=900,rie=1e4;function aie(){const[e,t]=(0,u.useState)(!1),[n,o]=(0,u.useState)(!0);return(0,u.useEffect)(()=>{let r;const a=setTimeout(()=>{t(!0),r=setTimeout(()=>o(!1),rie)},oie);return()=>{clearTimeout(a),clearTimeout(r)}},[]),{recycle:n,run:e}}const iie=["#eb524d","#ffac02","#ffcc00","#28cea9","#4fbdf4","#6788e4"],cie=()=>{const{recycle:e,run:t}=aie(),n=(0,u.useRef)(null);return(0,s.jsx)("div",{className:"progress-summary__confetti",children:(0,s.jsx)(sie(),{canvasRef:n,colors:iie,gravity:.4,height:window.innerHeight,numberOfPieces:500,recycle:e,run:t,width:window.innerWidth})})};var lie=v(72804);const QS=_("progress-summary-card"),die=({completeLabel:e,isComplete:t,isUrgent:n,completedDate:o,labelDue:r})=>t?(0,s.jsxs)("div",{className:"progress-summary-card__completed-label",children:[e,(0,s.jsx)("span",{className:"progress-summary-card__completed-date",children:o})]}):r?(0,s.jsx)("div",{className:["progress-summary-card__due-label",n?"brand--color":void 0].filter(Boolean).join(" "),children:r}):null,uie=({cardImageKey:e=null,className:t,color:n="#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:p="",labelDuration:C="",labelLearningPath:g="",onClick:x=an,progress:b=0,title:y=""})=>{const L=xe(),S=as(),T=o!==null,k=(0,u.useCallback)(()=>{a||x?.()},[a,x]),I=(0,u.useCallback)(R=>{am(R)&&R.preventDefault(),!a&&va(R)&&x?.()},[a,x]),E=Ea({percent:Math.round(b),label:L?.progressSummaryPercentComplete||"% Complete",isRTL:S}),N=e||r,M=L?.progressSummaryCompleted||"Completed: ",A=o===null?"":`${ms()(new Date(o)).format("MM/DD/YY")}`,j=QS("card",{disabled:a}
174),w=["progress-summary-card__title-button",t].filter(Boolean).join(" "),P=QS("image-overlay",{"not-started":!(b||T),"in-progress-completed":b||T});return(0,s.jsxs)("div",{"aria-hidden":l,className:j,onClick:k,children:[(0,s.jsxs)("div",{className:"progress-summary-card__content",children:[(0,s.jsx)("button",{"aria-disabled":a,className:w,onKeyDown:I,role:"link",tabIndex:l?-1:void 0,type:"button",children:(0,s.jsx)("span",{className:"progress-summary-card__title",children:y||L?.progressSummaryNoTitle||"(No Title)"})}),(0,s.jsxs)("div",{className:"progress-summary-card__course-info",children:[h&&(0,s.jsx)("div",{className:"progress-summary-card__hide",children:g}),c&&(0,s.jsx)("div",{className:"progress-summary-card__hide",children:f}),!!b&&!a&&!o&&(0,s.jsx)("span",{className:"progress-summary-card__hide",children:E}),!i&&!T&&(0,s.jsx)("div",{className:"progress-summary-card__duration",children:C}),(0,s.jsx)(die,{completedDate:A,completeLabel:M,isComplete:T,isUrgent:m,labelDue:p})]})]}),(0,s.jsxs)("div",{className:"progress-summary-card__image-wrap",children:[(0,s.jsx)(lie.A,{alt:"","aria-hidden":"true",b:"fff",className:"progress-summary-card__image",f:"jpg",h:150,imageKey:N,imagesUri:d,s:"cover",style:{backgroundColor:n},w:300}),(0,s.jsx)("div",{className:P}),(0,s.jsx)("div",{className:"progress-summary-card__image-overlay-bottom-bar",children:!!b&&!a&&!T&&(0,s.jsx)("div",{"aria-hidden":"true",className:"progress-summary-card__progress-bar-wrap",children:(0,s.jsx)("div",{className:"progress-summary-card__wrap-light",children:(0,s.jsx)("div",{className:"progress-summary-card__progress-bar",style:{width:`${b}%`}})})})})]})]})},hie=Ne("IMAGES_URI"),YS=(e,t)=>e===1?t:t.concat("s"),hg=e=>e?.course?.course?.lessons??[],mie=e=>t=>hg(t).find(n=>n.type!=="section"&&n.id!=null&&!e.includes(n.id)),fie=e=>{const t=hg(e),{trackingQuizId:n,score:o}=e??{};if(n&&t.length){const r=t.find(({id:i})=>i===n),{settings:{passingScore:a}={}}=r??{};return Number(o)<Number(a)?r:!1}},pie=e=>hg(e).find(t=>t.type!=="section"),gie=(e,t)=>(mie(e)(t)||fie(t)||pie(t))?.id??"",vie=e=>{const t=ms().duration(e),n=t.hours(),o=t.minutes(),r=`${n} ${YS(n,"hr")}`,a=`${o} min`;return n>=100?"100+ hrs":n>0&&o>0?[r,a].join(" "):n>0?r:a},Cie=({color:e,learningPathId:t})=>{const{learningPathComplete:n,isSuccess:o,nextCourse:r}=me(x=>x.learningPathUpNext??{}),{dueAt:a,courseId:i="",lessonCount:c,lessonsCompleted:l=[],sourceType:d,timeToComplete:h}=r??{},m=xe(),f=(0,u.useMemo)(()=>gie(l,r),[r,l]),p=r?.color??e,C={cardImageKey:r?.cardImageKey,color:p,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}`)):KN(`${i}/lessons/${f}`)},[i,t,f,d]);return o&&!n&&(0,s.jsx)("div",{className:"progress-summary__lp-next",children:(0,s.jsxs)("div",{className:"progress-summary__lp-next-inner",children:[(0,s.jsxs)("div",{className:"progress-summary__lp-next-label",children:[m?.progressSummaryNextUp||"Next up"," ",(0,s.jsx)(ae,{"aria-hidden":"true",classNameIcon:"progress-summary__lp-next-label-icon",name:"arrow-right"})]}),(0,s.jsx)("div",{className:"progress-summary__lp-next-card",children:(0,s.jsx)(uie,{imagesUri:hie,labelCount:`${c} ${YS(c,"lesson")}`,labelDue:Ym(a),labelDuration:vie(h),noCertDownload:!0,noFavoriteBtn:!0,onClick:g,...C})})]})})},bie=`${Ne("CDN_URI")}/assets/rise/assets/trophy.svg`,xie=e=>Object.values(e).filter(({isComplete:t})=>t).length,yie=e=>{const{color:t,course:n={},courseProgress:o={},lessons:r=[]}=e,a=ot(),{learningPathComplete:i,lpHasFailedQuiz:c}=me($=>$.learningPathUpNext??{}),{lessons:l={},percentComplete:d}=o,{dueAt:h,certificateDownload:m,completionCelebration:f,lessonsOnly:p=[],riseComCourseId:C,riseComLearningPathId:g,trackingCompletionPercentage:x,trackingQuizId:b}=n,y=Bi(),L=xe(),S=L??{},T=x==null&&b==null,k=T?d===100:av(),I=p.length,E=xie(l),N=(0,u.useCallback)(()=>{a(t7({courseId:C,learningPathId:g}))},[a,C,g]);(0,u.useEffect)(()=>{g&&N()},[]);const M=(0,u.useMemo)(()=>k?n.completedAt?n.completedAt:new Date:null,[n.completedAt,k]),A=(0,u.useMemo)(()=>r.find($=>$.type==="quiz"&&$.id===b),[b,r]),j=ht(A?.title),w=(0,u.useMemo)(()=>Number(A?.settings?.passingScore??100),[A]),P=b?o.lessons?.[b]:void 0,R=P?.passed??null,O=(0,u.useMemo)(()=>P?.percentComplete===100?P.score??null:null,[P]),B=b2(o,A,b),D=typeof B=="object"&&B!==null&&"outOfAttempts"in B&&B.outOfAttempts===!0,F=b?R:!0,V=mn(),U=T?"progress-summary progress-summary__no-req":"progress-summary",H=ks(n),K=`You've completed ${E} of ${I} lessons.`,z=H?k?"Complete":"Incomplete":K,W=String(Vi(y+" - Progress Summary"));return(0,s.jsx)(Nr,{title:W,children:(0,s.jsxs)("div",{className:U,children:[k&&f&&F&&!V&&(0,s.jsx)(cie,{}),(0,s.jsxs)("header",{className:"progress-summary__header",children:[(0,s.jsx)("h1",{className:"progress-summary__header-title",tabIndex:-1,
174children:k&&!T&&F?L?.progressSummaryCongratulations||"Congratulations!":L?.progressSummary||"Progress Summary"}),T?(0,s.jsx)("div",{className:"progress-summary__lessons-completed",children:z}):k?(0,s.jsxs)("div",{className:"progress-summary__header-completion-date",children:[F&&(0,s.jsx)("img",{alt:"trophy",className:"progress-summary__header-trophy",src:bie}),ms()(M).format("MMMM Do, YYYY")]}):(0,s.jsx)(tie,{dueAt:h})]}),(0,s.jsxs)("section",{className:"progress-summary__section",children:[!T&&k&&(0,s.jsx)("div",{className:"progress-summary__requirements-met",children:L?.progressSummaryRequirementsMet||"You've met all the requirements."}),T?!g&&(0,s.jsxs)(un,{className:"progress-summary__start-over",to:"/",children:[L?.progressSummaryStartOver||"Start Over",(0,s.jsx)("i",{className:"progress-summary__start-over-icon icon icon-reload"})]}):(0,s.jsxs)("div",{className:"progress-summary__requirements",children:[(0,s.jsx)(Jae,{labelA11yRequirementCompleted:L?.a11yProgressSummaryRequirementCompleted,labelA11yRequirementNotCompleted:L?.a11yProgressSummaryRequirementNotCompleted,labelCompletionRequirement:S.progressSummaryCompletionRequirement,labelPercentCompletion:S.progressSummaryPercentCompletion,labelYouCompleted:S.progressSummaryYouCompleted,percentComplete:d,trackingCompletionPercentage:x}),(0,s.jsx)(eie,{labelA11yRequirementCompleted:L?.a11yProgressSummaryRequirementCompleted,labelA11yRequirementNotCompleted:L?.a11yProgressSummaryRequirementNotCompleted,labelNoAttemptsRemaining:S.progressSummaryNoAttemptsRemaining,labelQuizRequirement:S.progressSummaryQuizRequirement,labelScoreOf:S.progressSummaryScoreOf,labelScoreOfPreposition:S.progressSummaryScoreOfPreposition,labelViewQuiz:S.progressSummaryViewQuiz,labelYouScored:S.progressSummaryYouScored,outOfAttempts:D,quizPassed:R,quizPassingScore:w,quizScore:O,quizTitle:j,trackingQuizId:b})]}),(k||T)&&(0,s.jsxs)("div",{className:"progress-summary__completion-controls",children:[(0,s.jsx)("button",{className:"progress-summary__btn-back progress-summary__completion-control",onClick:WN,role:"link",type:"button",children:L?.progressSummaryBackToLearning||"Back to my learning"}),k&&(!g&&m||g&&i)&&m&&F&&!c&&(0,s.jsx)("span",{className:"progress-summary__completion-control",children:(0,s.jsx)(eH,{})})]})]}),k&&!!g&&(0,s.jsx)(Cie,{color:t,learningPathId:g})]})})},ZS=({contentClassName:e,lessonId:t,...n})=>(0,s.jsx)("div",{className:"page","data-page":!0,children:(0,s.jsx)("div",{className:"page__wrapper page__wrapper--white",children:(0,s.jsx)(Vu,{lessonId:t,children:(0,s.jsx)("div",{className:e?`page__content ${e}`:"page__content",children:(0,s.jsx)(yie,{...n})})})})});function Sie({content:e,handleNavigate:t,isMobileHeader:n,lessonId:o,lessonProgress:r}){const a=Sr(),i=Lr(),c=rt(),l=xe(),d=Hf(),h=rW(),m=(0,u.useRef)(!1),f=(0,u.useRef)(null);(0,u.useEffect)(()=>{if(d==="exiting"){m.current=!1;const L=f.current;L!=null&&(f.current=null,cl(L));return}m.current||(m.current=!0,e.kind==="lesson"&&(uv(o),f.current=o,Pn(fN(o))))},[e.kind,o,d]),(0,u.useEffect)(()=>()=>{const L=f.current;L!=null&&cl(L)},[]);const p=c(a?.title),C=e.kind==="progress-summary"?l?.progressSummary??"":e.kind==="lesson"?c(e.lesson.title):"",g=d==="entering",x=d==="exiting",b=d==="present",y=e.kind==="progress-summary"?(0,s.jsx)(ZS,{course:a,courseProgress:i,lessonId:o,lessons:a?.lessonsOnly}):e.kind==="lesson"?(0,s.jsx)(qae,{handleNavigate:t,isLessonEntering:g,isLessonExiting:x,isMobileHeader:n,lesson:e.lesson,lessonProgress:r,loadMedia:h,observeProgress:b}):null;return(0,s.jsx)(Nr,{active:!x,title:Vi(`${C} - ${p}`),children:(0,s.jsx)("div",{className:"page","data-lesson-id":o,children:y})})}var qu=v(57990),Tie=v(19055),Lie=v.n(Tie);const XS=_("blocks-slide-indicator-tooltip"),kie=({disabled:e,left:t,ref:n,text:o,top:r,visible:a})=>{let i=(0,s.jsx)("span",{"aria-hidden":"true",children:o});return e&&(i=(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(ae,{classNameIcon:XS("icon"),name:"lock"}),(0,s.jsx)("span",{className:"visually-hidden-always",children:"(locked content)"})]})),(0,s.jsx)("div",{"aria-hidden":!a,className:XS("wrapper",{disabled:e,visible:a}),ref:n,role:"tooltip",style:{left:t,top:r},children:i})},Ju=_("blocks-slide-indicator"),Iie=({active:e,blockNavigationStyle:t,disabled:n,numberOfSlides:o,onKeyDown:r,onClick:a,ref:i,slideIndex:c})=>{const{prefersKeyboardNavigation:l}=Ed()??{},[d,h]=(0,u.useState)(!1),[m,f]=(0,u.useState)(),p=(0,u.useRef)(null),C=(0,u.useRef)(null),g=(0,u.useRef)(void 0),x=t===J0.NUMBERS,b=c+1,y=`${b} / ${o}`,L=e?`Step ${b} of ${o}, current step`:`Go to step ${b} of ${o}`,S=(0,u.useRef)(null);S.current||=document.getElementById("portal");const T=(0,u.useCallback)(()=>
174{if(p.current&&C.current){const B=p.current.getBoundingClientRect(),D=C.current.getBoundingClientRect(),F=B.left-D.width-18,V=Math.round(B.top-D.height/2+B.height/2);f({left:F,top:V})}},[]),k=(0,u.useCallback)(()=>{g.current=setTimeout(()=>{T(),h(!0)},300)},[T]),I=(0,u.useCallback)(()=>{clearTimeout(g.current),h(!1)},[]),E=(0,u.useCallback)(()=>{a(c)},[a,c]),N=(0,u.useCallback)(B=>{Tn(B)&&h(!1),r(B)},[r]),M=(0,u.useCallback)(()=>{k()},[k]),A=(0,s.jsx)(kie,{disabled:n,left:m?.left,ref:C,text:y,top:m?.top,visible:d}),j=Ju("button",{active:e,disabled:n,numbers:x}),w=Ju("wrapper"),P=Ju("circle",{active:e,disabled:n}),R=Ju("number",{active:e,disabled:n}),O=x?(0,s.jsx)("span",{"aria-hidden":"true",className:R,children:b}):(0,s.jsx)(ae,{classNameIcon:P,name:"circle-solid"});return(0,s.jsxs)("div",{className:w,ref:i,children:[(0,s.jsx)("button",{"aria-current":e?"page":void 0,"aria-disabled":n,"aria-label":L+(n?" (unavailable until previous content is completed)":""),className:j,"data-control":"",onBlur:I,onClick:n?void 0:E,onFocus:l?M:void 0,onKeyDown:N,onMouseEnter:k,onMouseLeave:I,ref:p,type:"button",children:O}),S.current&&(0,ps.createPortal)(A,S.current)]})},Wr=_("blocks-slide-controls"),qS=38,Eie=8,Nie=({activeSlideIndex:e,blockNavigationStyle:t,numberOfSlides:n,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),p=(0,u.useCallback)(b=>{let y=!1,L=-1;if(Ir(b)||Mo(b)){if(e-1>=0)L=e-1;else{o();return}y=!0}else Er(b)||Oo(b)?(e+1<=n-1&&(L=e+1),y=!0):yB(b)?(L=0,y=!0):xB(b)&&(L=n-1,a[L]&&(L=a.findLastIndex(S=>!S)),y=!0);L>=0&&!a[L]&&r(L),y&&(b.stopPropagation(),b.preventDefault())},[e,n,o,r,a]);(0,u.useEffect)(()=>{const b=c.current,y=l.current;if(b&&y){const L=b.getBoundingClientRect(),S=y.getBoundingClientRect(),T=L.bottom-qS,k=L.top+qS;S.bottom>T?b.scrollBy({top:S.bottom-T,left:0,behavior:"smooth"}):S.top<k&&b.scrollBy({top:S.top-k,left:0,behavior:"smooth"})}},[e]);const C=(0,u.useCallback)(()=>{const b=c.current;b&&(h(b.scrollTop>Eie),f(b.clientHeight+b.scrollTop<b.scrollHeight))},[]);(0,lc.A)(C);const g=(0,u.useCallback)(nu()(C,100),[C]);_d(c.current,C);const x=Wr({"touch-preview":pc(i)});return(0,s.jsx)("div",{className:x,children:(0,s.jsx)("div",{className:Wr("page-control-wrapper"),children:(0,s.jsxs)("div",{className:Wr("page-control-inner-wrapper"),children:[(0,s.jsx)("div",{className:Wr("page-control"),onScroll:g,ref:c,children:(0,s.jsx)("div",{className:Wr("slide-dot-wrapper"),children:Lie()(b=>{const y=b===e;return(0,s.jsx)(Iie,{active:y,blockNavigationStyle:t,disabled:a[b],numberOfSlides:n,onClick:r,onKeyDown:p,ref:y?l:null,slideIndex:b},b)},n)})}),(0,s.jsx)("div",{className:Wr("overlay-top",{visible:d})}),(0,s.jsx)("div",{className:Wr("overlay-bottom",{visible:m})})]})})})};var jie;const wie=1024,Aie=16/9,JS=wie/Aie,Rie=e=>typeof e=="string"||typeof e=="number",Pie=e=>jie(e)&&e.type==="slide"&&Array.isArray(e.items),Fc=e=>{if(!(!Vt(e)||!Vt(e.experiments)))return e.experiments},Mie=(e,t)=>!Array.isArray(e)||!t?[]:e.filter(Rie).map(n=>t[String(n)]).filter(Pie),Yve=(e,t)=>Mie(e,t).map(n=>n.id),Oie=e=>Fc(e)?.showTitle!==!1,e4=e=>Fc(e)?.imageTextLayout,t4=e=>e!==void 0&&e!=="fullBleed",Bie=e=>t4(e4(e)),Die=e=>Bie(e)&&Fc(e)?.showDescription!==!1,Fie=e=>({imagePosition:e==="insetRight"||e==="bleedRight"?"right":"left",isFullBleed:e==="bleedLeft"||e==="bleedRight"||e==="overlay",isFullWidthBleed:e==="fullBleed",isOverlay:e==="overlay"}),Hie=e=>Fc(e)?.titleVariant,Zve=e=>e&&Fc(e)?.speakerNotes||"",n4=_("presentation-logo"),$ie=()=>{const e=ie(),t=rs(),n=e?.theme?.showLogo??!0;if(!t||n===!1)return null;const o=e?.theme?.logoPosition??dE;return(0,s.jsx)(cf,{className:n4({[lE[o]]:!0}),imageClassName:n4("image")})};function _ie(e,{designHeight:t,fit:n="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,p)=>{const C=f>0?f/e:1,g=n==="contain"&&t?Math.min(C,p>0?p/t:1):C;a(x=>x===g?x:g)},h=l.getBoundingClientRect();d(h.width,h.height);const m=new ResizeObserver(f=>
174{i.current!=null&&cancelAnimationFrame(i.current),i.current=requestAnimationFrame(()=>{const p=f[0];p&&d(p.contentRect.width,p.contentRect.height)})});return m.observe(l),()=>{m.disconnect(),i.current!=null&&cancelAnimationFrame(i.current)}},[e,t,n]);const c={transform:`scale3d(${r}, ${r}, 1)`,transformOrigin:n==="contain"?"center":"top left"};return{containerRef:o,scale:r,scaleStyle:c}}const s4=_("presentation-slide-frame");function Vie({children:e}){const{containerRef:t,scaleStyle:n}=_ie(1024,{designHeight:JS,fit:"contain"});return(0,s.jsx)("div",{className:s4(),ref:t,children:(0,s.jsx)("div",{className:s4("canvas"),style:{width:1024,height:JS,...n},children:e})})}const yt=_("blocks-lesson-slide"),mg="#fff",zie=e=>Vt(e)&&(typeof e.blockId=="string"||typeof e.blockId=="number")&&typeof e.family=="string",Uie=e=>Vt(e)&&(typeof e.id=="string"||typeof e.id=="number"),fg=e=>{const t={...e,id:e.id??e.blockId};return Uie(t)?t:null},Gie=["image full","image text overlay","quote background"],Wie=({className:e,hasSingleBlock:t})=>{const n=Vn(),{backgroundImageCss:o}=nm(),r=yn()||mg,a=n===re.IMAGE;return t&&a?null:(0,s.jsx)("div",{className:e,style:a&&o?{backgroundImage:o.backgroundImage}:{background:r}})},o4=({className:e})=>{const t=Vn(),{backgroundImageCss:n}=nm(),o=yn()||mg,r=t===re.IMAGE;return(0,s.jsx)("div",{className:e,style:r&&n?{backgroundImage:n.backgroundImage}:{background:o}})},r4=({className:e,showTitle:t,title:n,titleClassName:o,showDescription:r,description:a})=>!t&&!r?null:(0,s.jsxs)("div",{className:e,children:[t&&(0,s.jsx)(je,{className:o,tagName:"h1",value:n}),r&&(0,s.jsx)(je,{className:yt("lesson-description").toString(),value:a})]}),Kie=({backgroundCovers:e,composition:t,header:n,overlayText:o,renderedBlocks:r,isPresentationCourse:a,isMultimediaSlide:i,isChartSlide:c})=>{if(t?.isFullWidthBleed)return(0,s.jsxs)(s.Fragment,{children:[n,(0,s.jsx)("div",{className:yt("full-image"),children:r})]});if(t?.isOverlay)return(0,s.jsxs)("div",{className:yt("composition",{overlay:!0,bleed:!0}),children:[(0,s.jsx)("div",{className:yt("composition-image"),children:r}),o]});if(t){const l=t.imagePosition==="left"?["image","text"]:["text","image"];return(0,s.jsx)("div",{className:yt("composition",{bleed:t.isFullBleed,"image-left":t.imagePosition==="left","image-right":t.imagePosition==="right"}),children:l.map(d=>d==="image"?(0,s.jsx)("div",{className:yt("composition-image"),children:r},"image"):(0,s.jsx)("div",{className:yt("composition-text"),children:n},"text"))})}return a?(0,s.jsxs)(s.Fragment,{children:[n,i||c?r:(0,s.jsx)("div",{className:yt("body"),children:r})]}):(0,s.jsxs)(s.Fragment,{children:[n,(0,s.jsxs)("div",{className:yt("blocks-container"),children:[e,r]})]})};function Qie(e,t,n){if(n)return yt("connected-blocks");const o=t.blocks?.find(l=>l.settings?.backgroundType===re.IMAGE),r=e.settings?.backgroundType===re.IMAGE,a=voe(e.family??"",e.variant??"");return yt("connected-blocks",{"min-half-height":o&&(r&&!a)})}const Yie=({loadMedia:e,onContinue:t,previewType:n,ref:o,revealTargetBlockId:r,slide:a})=>{const i=ie(),c=Qs()??"",l=Ao(c),d=l?.type==="blocks"?l:void 0,{animateBlockEntrance:h,color:m,enableVideoPlaybackSpeed:f}=i,p=a?.lastBlock,C=(0,u.useCallback)(J=>{J===p?.id&&t()},[p,t]);if(!a)return null;const{blocks:g,lessonTitle:x,lessonDescription:b,shouldShowAnimation:y=h,shouldShowTitle:L=!0,shouldShowDescription:S=!0,imageTextLayout:T,titleVariant:k}=a,I=r==null?-1:g.findIndex(J=>String(J.id??J.blockId)===String(r)),E=ko(i),N=E&&!T?a.blocks?.[0]?.family:void 0,M=yt("inner",{presentation:E}),A=yt("lesson-title",{heading:k==="heading",subheading:k==="subheading"}).toString(),j=yt("lesson",{slides:!0,"touch-preview":pc(n),media:N==="multimedia",chart:N==="chart"}).toString(),w=a.blocks.length===1,{settings:P,type:R,variant:O}=a.blocks?.[0]??{},B=!w||E?"none":P?.backgroundType===re.IMAGE?"image-background":Gie.includes(`${R} ${O}`)?"legacy":"none",D=B!=="none"?yt("full-width-image",{legacy:B==="legacy",background:B==="image-background"}):null,F=L&&x,V=t4(T)&&S&&b,U=(0,s.jsx)(r4,{className:yt("lesson-header").toString(),description:b,showDescription:!!V,showTitle:!!F,title:x,titleClassName:A}),H=(0,s.jsx)(r4,{className:yt("composition-overlay-text").toString(),description:b,showDescription:!!V,showTitle:!!F,title:x,titleClassName:A}),K=T?Fie(T):void 0,Q=!K&&y,z=g.map((J,te)=>{const he=I!==-1&&te<=I;return w||he?!1:oS({blocks:a.blocks,lessonProgress:d,currentBlockIndex:te})}),W=g.map((J,te)=>{const he=z[te],_e=D||Qie(J,a,E),X={...J,blockId:J.blockId??J.id};if(!zie(X))return null;const de=X,Ce=fg(J),pe=de.blockId===p?.id,Ie=!E&&!D&&Ce?(0,s.jsx)(Fl,{block:Ce,children:(0,s.jsx)(Wie,{className:yt("block-background"),hasSingleBlock:w})}):null;return(0,s.jsx)(Yp,{animateBlockEntrance:Q,backgroundBefore:Ie,block:de,className:_e,color:m,defaultBackgroun
174dColor:mg,enableVideoPlaybackSpeed:f,hideBlock:he,index:te,isLastBlock:pe,isOnlyBlockInStep:w,lessonId:c,lessonProgress:d,loadMedia:e,onContinue:C},de.blockId)}),$=g.filter((J,te)=>!z[te]),G=!E&&!D&&$.length>=3,Z=G?fg($[0]):null,Y=G?fg($[$.length-1]):null,ne=Z&&Y?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(Fl,{block:Z,children:(0,s.jsx)(o4,{className:yt("background-top-cover")})}),(0,s.jsx)(Fl,{block:Y,children:(0,s.jsx)(o4,{className:yt("background-bottom-cover")})})]}):null,ee=(0,s.jsx)(Kie,{backgroundCovers:ne,composition:K,header:U,isChartSlide:N==="chart",isMultimediaSlide:N==="multimedia",isPresentationCourse:E,overlayText:H,renderedBlocks:W}),le=(0,s.jsxs)("div",{className:M,children:[(0,s.jsx)("div",{className:j,ref:o,children:ee}),(0,s.jsx)($ie,{})]});return E?(0,s.jsx)(Vie,{children:le}):(0,s.jsx)("div",{className:yt("wrapper"),children:le})},e0=625,Zie=100;function Xie({isPresentationCourse:e,reduceMotion:t}){return(t||e?.01:e0)+Zie}const a4="ease",i4=(e,t)=>{t!=null&&(e.currentTime=(1-t)*e0)},qie=(e,{phase:t,direction:n,reducedMotion:o,fromProgress:r})=>{if(o||typeof e.animate!="function")return null;if(t==="enter"){const c=n==="forward"?"100vh":"-100%",l=e.animate([{opacity:0,transform:`translateY(${c})`},{opacity:1,transform:"translateY(0)"}],{duration:e0,easing:a4});return i4(l,r),Jd(l)}const a=n==="forward"?"-100vh":"100%",i=e.animate([{opacity:1,transform:"translateY(0)"},{opacity:0,transform:`translateY(${a})`}],{duration:e0,easing:a4,fill:"forwards"});return i4(i,r),Jd(i)};function Jie({currentLessonRef:e,isPresentationCourse:t,numberOfSlides:n,onContinue:o,onCurrentLessonElChange:r,onSlideEntered:a,onTransitioningChange:i,previewType:c,revealTargetBlockId:l,slideIndex:d,slides:h}){const m=(0,u.useRef)(0),f=(0,u.useRef)(d),p=(0,u.useCallback)(y=>{e.current=y,r?.(y)},[e,r]);f.current!==d&&(m.current=e.current?.getBoundingClientRect()?.top??0,f.current=d);const C=h.length>0?Math.max(0,Math.min(d,h.length-1)):0,{presence:g,isTransitioning:x,mediaOwnerInstanceId:b}=G3({current:C,animate:(y,L)=>t?null:qie(y,L),getDirection:(y,L)=>L>y?"forward":"backward",initialStatus:"present",animationTimeoutMs:825,onEntered:()=>{a()}});return(0,u.useEffect)(()=>{i(x)},[x,i]),(0,s.jsxs)(s.Fragment,{children:[g.map(y=>{const L=h[y.key],S=y.status==="exiting";return(0,s.jsx)("div",{ref:y.ref,style:S?{insetInline:0,position:"absolute",top:m.current,zIndex:0}:{position:"relative",zIndex:1},children:(0,s.jsx)(Yie,{loadMedia:y.instanceId===b,onContinue:o,previewType:c,ref:S?void 0:p,revealTargetBlockId:S?void 0:l,slide:L})},y.instanceId)}),(0,s.jsx)("div",{className:"visually-hidden-always",id:"step-counter",style:{insetBlockStart:0},children:n>0&&`Step ${C+1} of ${n}`})]})}var Hc=v(49860);const ece=50,tce=1e3,nce=({onSwipeDownHandler:e,onSwipeUpHandler:t,target:n,timeoutDuration:o=tce})=>{const[r,a]=Hc.useState(!1),i=Hc.useRef(void 0),c=Hc.useCallback(()=>{i.current&&clearTimeout(i.current),i.current=setTimeout(()=>a(!1),o)},[o]),l=Hc.useCallback(d=>{const h=Math.abs(d.deltaY);if(r)h<ece?(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]);Hc.useEffect(()=>{if(!(!n||!t||!e))return n.addEventListener("wheel",l,{passive:!0}),()=>{i.current&&clearTimeout(i.current),n?.removeEventListener?.("wheel",l,{passive:!0})}},[e,t,l,n])},c4="rise-presenter-sync",eCe="presenterMode",sce="slide",oce="NAVIGATE_TO_SLIDE",rce="SLIDE_CHANGE",ace="PRESENTER_VIEW_EXIT";function ice(){if(!(typeof BroadcastChannel>"u"))try{const e=new BroadcastChannel(c4);e.postMessage({type:ace}),setTimeout(()=>{e.close()},0)}catch{}}let pg=null;function tCe(e){pg=e}function cce(){const e=pg;if(pg=null,!!e)try{e.closed||e.close()}catch{}}function nCe(){cce(),ice()}function lce(e){const t=new URLSearchParams(e).get(sce);if(t==null)return 0;const n=Number(t);return Number.isFinite(n)&&n>=0?n:0}function dce(){const e=window.location.hash.split("?")[1]||"";return lce(e)}var sCe;const At=_("lesson-one-page-slides"),uce=_("page-wrap"),t0=e=>e,hce=e=>{if(e!=null&&"blockNavigationStyle"in e){const t=e.blockNavigationStyle;return typeof t=="string"?t:void 0}},mce=e=>Vt(e)&&(typeof e.id=="string"||typeof e.id=="number");function gg(e){if(!(e instanceof HTMLElement))return!1;const t=e.tagName.toLowerCase(),n=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(n??"")||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 fce=["button","checkbox","color","file","hidden","image","radio","range","reset","submit"];function l4(e){if(gg(e))return!0;
174if(!(e instanceof HTMLElement))return!1;const t=e.tagName.toLowerCase(),n=e.getAttribute("role"),o=e.getAttribute("type");return e.isContentEditable||n==="textbox"||t==="input"&&!fce.includes(o??"")||(n==="slider"||n==="spinbutton"||t==="input"&&o==="range")}const d4=(e,t)=>(n,o,r)=>sS(n,r.slice(0,-1),e,void 0,t),pce=(e,t)=>({disabled:n,slides:o},r)=>{const a=r.filter(d=>e[d.id]!=null).map(d=>({...d,...e[d.id]})),i=r[r.length-1],c=n||foe(a)||poe(a,t),l={blocks:a,lastBlock:i,disabled:n};return{disabled:c,slides:[...o,l]}},n0=e=>{let t=!1,n=!1;if(e){const{clientHeight:o,scrollHeight:r,scrollTop:a}=e,i=Math.max(0,a),c=r-i;t=c===r,n=c-5<=o}return{isAtTop:t,isAtBottom:n}},gce=/,? +/,vce=[],Cce=({lessonProgress:e,previewType:t})=>{const{announcePolite:n,clearAnnouncements:o}=Ls(),r=(0,u.useRef)(null),a=(0,u.useRef)(null),i=(0,u.useRef)(null),[c,l]=(0,u.useState)(null),[d,h]=(0,u.useState)(null),m=(0,u.useCallback)(oe=>{i.current=oe,l(oe)},[]),f=(0,u.useRef)(null),p=(0,u.useRef)(null),C=(0,u.useRef)(null),g=(0,u.useRef)(null),x=(0,u.useRef)(null),b=(0,u.useRef)(null),y=(0,u.useRef)(0),L=(0,u.useRef)(0),S=(0,u.useRef)(void 0),T=rn(),k=ot(),[I,E]=(0,u.useState)(()=>dce()),[N,M]=(0,u.useState)(null),[A,j]=(0,u.useState)(!1),[w,P]=(0,u.useState)(!1),[R,O]=(0,u.useState)(!1),B=(0,Fe.A)(w),D=(0,Fe.A)(R),F=mn(),{lessons:V,...U}=ie()||{},H=ko(U),K=hce(U?.theme)||J0.DOTS,Q=V?.[0],z=Q?.items||vce,W=iS()||A;(0,u.useEffect)(()=>{const oe=Te=>{if(Te.origin!==window.location.origin)return;(Array.isArray(Te.data)?Te.data:[Te.data]).forEach(It=>{Vt(It)&&It.type==="preview:lessonUpdate"&&j(!0)})};return window.addEventListener("message",oe),()=>window.removeEventListener("message",oe)},[]);const $=(0,u.useCallback)(()=>{const oe=(i.current?.scrollHeight??0)>(i.current?.clientHeight??0),{isAtBottom:Te}=n0(i.current),qe=oe&&!w&&!Te;qe!=R&&O(qe)},[R,w]);_d(d,$),(0,u.useLayoutEffect)($,[w]);const G=(0,u.useCallback)(()=>{i.current?.scrollTo({top:0})},[]);(0,u.useLayoutEffect)(()=>{G()},[I,G]);const Z=(0,u.useRef)(null),[,Y]=(0,u.useState)(0),ne=(0,u.useCallback)(oe=>{Z.current=oe,Y(Te=>Te+1)},[]);(0,u.useLayoutEffect)(()=>{const oe=Z.current;if(oe==null)return;const Te=i.current,qe=Te?.querySelector(`[data-block-id="${oe}"]`);if(Te==null||qe==null)return;Z.current=null;let It=0,Pt=qe;for(;Pt instanceof HTMLElement&&Pt!==Te&&Te.contains(Pt);)It+=Pt.offsetTop,Pt=Pt.offsetParent;Te.scrollTo({top:It})});const ee=U?.theme,le=(0,u.useMemo)(()=>{const qe=(W?z:Xp([],z,e,ee)).map(d4(e,ee)).filter(It=>It!==null);return Object.fromEntries(qe.map(It=>[It.blockId,It]))},[z,e,ee,W]),J=(0,u.useCallback)(oe=>{const Te={disabled:!1,slides:[]},{slides:qe}=oe.reduce(pce(le,e),Te);return qe},[le,e]),te=(0,u.useMemo)(()=>H?(V??[]).filter(oe=>oe?.type==="slide"):[],[H,V]),he=(0,u.useMemo)(()=>H?te.map(oe=>{const Te=oe.items.map(d4(e,ee));return{blocks:Te,lastBlock:Te[Te.length-1],lessonTitle:oe?.title,lessonDescription:oe?.description,shouldShowTitle:Oie(oe),shouldShowDescription:Die(oe),shouldShowAnimation:oe?.experiments?.showAnimation??!0,imageTextLayout:e4(oe),titleVariant:Hie(oe),disabled:!1}}):A0(z,nS,J),[H,te,z,J,e,ee]),_e=(0,u.useMemo)(()=>he.map(oe=>oe.disabled),[he]),X=(0,u.useMemo)(()=>nS(z),[z]);(0,u.useEffect)(()=>{y.current=I},[I]),(0,u.useEffect)(()=>{L.current=he.length,he.length>0&&I>=he.length&&E(he.length-1)},[he.length,I]),(0,u.useEffect)(()=>{if(!H)return;const oe=te[I];if(!oe)return;const Te=S.current;Te!=null&&Te!==oe.id&&cl(Te),uv(oe.id),k(ml(oe.id)),S.current=oe.id,window.parent.postMessage({type:"slide:change",data:String(oe.id)},"*")},[I,H,te,k]),(0,u.useEffect)(()=>()=>{const oe=S.current;oe!=null&&cl(oe)},[]),(0,u.useEffect)(()=>{if(!(!H||typeof BroadcastChannel>"u"))try{x.current||(x.current=new BroadcastChannel(c4));const oe=x.current,Te=qe=>{if(qe.data.type===oce){const It=qe.data.slideIndex,Pt=Math.min(It,L.current-1);Pt>=0&&b.current&&b.current(Pt)}};return oe.addEventListener("message",Te),()=>{oe.removeEventListener("message",Te)}}catch{}},[H,T]),(0,u.useEffect)(()=>{if(!(!H||!x.current))try{x.current.postMessage({type:rce,slideIndex:I})}catch{}},[H,I]),(0,u.useEffect)(()=>()=>{x.current?.close(),x.current=null},[]);const de=he.length,Ce=de>0?Math.min(I,de-1):0,pe=Nx("slide"),Ie=H?te[Ce]:void 0,ge=pc(t),ce=K!==J0.NONE,Re=
174de===0||Ce===de-1,en=e?.isComplete,tn=R||Re?!en||!0:_e[Ce+1],Qt=!R&&!Re,nn=Qt&&!tn,Yt=Re&&!0,Ze=(0,Fe.A)(Yt),Zt=R&&!Re,Rt=(0,u.useCallback)(gu()($,100),[$]);(0,u.useEffect)(()=>{const oe=i.current;return oe?.addEventListener("scroll",Rt,{passive:!0}),()=>oe?.removeEventListener("scroll",Rt)},[Rt]),(0,u.useEffect)(()=>{document.activeElement===C.current?!D&&R?p.current?.focus({preventScroll:!0}):!Ze&&Yt&&g.current?.focus({preventScroll:!0}):document.activeElement===p.current&&D&&!R&&C.current?.focus({preventScroll:!0})},[R,D,Ze,B,Yt,w]),(0,lc.A)(()=>{cy(),i.current?.focus?.()});const ke=(0,u.useCallback)(oe=>{const Te=Math.max(0,Math.min(oe,he.length-1));if(Te===y.current){G();return}E(Te)},[G,he.length]),Oe=oe=>{const Te=X.findIndex(It=>It.some(Pt=>String(Pt.id)===String(oe)));if(Te===-1)return;const qe=X[Te].find(It=>String(It.id)===String(oe));M(qe?.id??oe),ne(qe?.id??oe),Q?.id!=null&&!W&&rS(z,qe?.id??oe,e).forEach(Pt=>{mce(Pt)&&k(fl({blockId:Pt.id,items:Pt.items??[],lessonId:Q.id}))}),Te!==I&&ke(Te)},ct=(0,u.useRef)(Oe);(0,u.useEffect)(()=>{ct.current=Oe});const[mo]=(0,Pe.ok)(),Ds=mo.get(dc);(0,u.useEffect)(()=>{Ds!=null&&ct.current(Ds)},[Ds]),aS(({lessonId:oe,blockId:Te})=>{(Q?.id==null||oe===String(Q.id))&&ct.current(Te)});const qo=(0,u.useCallback)(()=>{w||(P(!0),qs(()=>{T("/")},"lesson-to-one-page-cover-stepped"))},[T,w]),Ple=U?.exportSettings?.webExportSettings,Vc=H||!!(!Es.isInstantLink&&(U?.lmsOptions?.disableCoverPage||Ple?.disableCoverPage)),r0=I===0&&Vc,bg=(0,u.useCallback)(Vc?()=>ke(0):qo,[Vc,ke,qo]);(0,u.useEffect)(()=>{b.current=ke},[ke]);const a0=(0,u.useCallback)(()=>{w||(I>0?ke(I-1):qo())},[ke,I,w,qo]),i0=(0,u.useCallback)(()=>{w||ke(I+1)},[ke,T,Re,I,w]),Mle=(0,u.useCallback)(()=>{(I<de-1||Re&&!1)&&i0()},[Re,I,de,i0]),E4=(0,u.useCallback)(()=>{const oe=i.current?.scrollTop??0,Te=i.current?.clientHeight??0,qe=F?"instant":"smooth";i.current?.scrollTo({top:oe+Te,behavior:qe})},[F]),c0=(0,u.useCallback)(()=>{i0()},[i0]),Ole=(0,u.useCallback)(()=>{E4()},[E4]),Ble=(0,u.useCallback)(oe=>{oe===I||w||(ke(oe),queueMicrotask(()=>{f.current?.querySelectorAll("[data-control]")?.[oe]?.focus?.()}))},[ke,I,w]),Dle=(0,u.useCallback)(()=>{setTimeout(()=>{if(a.current&&f.current?.contains?.(document.activeElement)){const oe=Wp()(a.current.innerText,{length:75,separator:gce});o(),n(`Content preview: ${oe}`)}else i.current?.focus?.()},0)},[n,o]),ri=(0,u.useCallback)(()=>{if(ge)return;const{isAtTop:oe}=n0(i.current);if(oe){I===0?bg():a0();return}},[ge,a0,I,bg]),ai=(0,u.useCallback)(()=>{if(ge||Re||tn)return;const{isAtBottom:oe}=n0(i.current);if(oe){c0();return}},[Re,tn,ge,c0]),Fle=(0,u.useCallback)(()=>{const{isAtBottom:oe,isAtTop:Te}=n0(i.current),qe=document.documentElement.clientWidth===window.innerWidth;return(oe||Te)&&qe},[]),Hle=(0,u.useCallback)(oe=>{!f.current?.contains?.(document.activeElement)&&!gg(oe.target)&&ri()},[ri]),$le=(0,u.useCallback)(oe=>{!f.current?.contains?.(document.activeElement)&&!gg(oe.target)&&ai()},[ai]),_le=(0,u.useCallback)(oe=>{H&&!f.current?.contains?.(document.activeElement)&&!l4(oe.target)&&ri()},[H,ri]),Vle=(0,u.useCallback)(oe=>{H&&!f.current?.contains?.(document.activeElement)&&!l4(oe.target)&&ai()},[H,ai]),zc=(0,u.useCallback)(oe=>{oe===-1||oe===I||ke(oe)},[ke,I]),xg=(0,u.useCallback)(oe=>{const Te=te.findIndex(({id:qe})=>String(qe)===String(oe.detail.lessonId));zc(Te)},[zc,te]),yg=(0,u.useCallback)(oe=>{const{itemId:Te,lessonId:qe}=oe.detail;if(!H){Te!=null&&ct.current(Te);return}const It=Te==null?-1:he.findIndex(Pt=>Pt.blocks.some(Sg=>("blockId"in Sg?Sg.blockId:Sg.id)===Te));if(It!==-1){zc(It);return}zc(te.findIndex(({id:Pt})=>String(Pt)===String(qe)))},[H,zc,te,he]);(0,u.useEffect)(()=>(window.addEventListener(fm,xg),window.addEventListener(Ke,yg),()=>{window.removeEventListener(fm,xg),window.removeEventListener(Ke,yg)}),[yg,xg]),(0,u.useEffect)(()=>{const oe=Te=>{b.current?.(Te.detail.slideIndex)};return window.addEventListener(gm,oe),()=>window.removeEventListener(gm,oe)},[]),(0,qu.A)("ArrowUp",t0,Hle),(0,qu.A)("ArrowDown",t0,$le),(0,qu.A)("ArrowLeft",t0,_le),(0,qu.A)("ArrowRight",t0,Vle),nce({target:c,onSwipeUpHandler:ri,onSwipeDownHandler:ai,timeoutDuration:Xie({isPresentationCourse:H,reduceMotion:F})});const zle=At("gradient",{visible:R}),Ule=(0,s.jsxs)("nav",{"aria-label":"Slide navigation",className:At("presentation-controls"),ref:f,children:[(0,s.jsxs)("button",{"aria-disabled":I===0&&Vc,className:At("presentation-btn"),onClick:I===0&&Vc?void 0:a0,type:"button",children:[(0,s.jsx)(ae,{classNameIcon:At("presentation-arrow-icon"),name:"chevron-left"}
174),(0,s.jsx)("span",{className:"visually-hidden-always",children:"Previous"})]}),(0,s.jsx)("span",{"aria-hidden":!0,className:At("counter"),children:`${Ce+1} / ${de}`}),(0,s.jsxs)("button",{"aria-disabled":!nn,className:At("presentation-btn"),onClick:nn?c0:void 0,ref:C,type:"button",children:[(0,s.jsx)(ae,{classNameIcon:At("presentation-arrow-icon"),name:"chevron-right"}),(0,s.jsx)("span",{className:"visually-hidden-always",children:"Go to next step"})]})]});return(0,s.jsxs)("div",{className:At({}),children:[(0,s.jsx)("div",{className:uce({transitioning:w}),id:"page-wrap",ref:m,tabIndex:-1,children:(0,s.jsx)("div",{className:"page","data-page":!0,children:(0,s.jsx)("div",{className:"page__wrapper",children:(0,s.jsx)("div",{className:"page__content",children:(0,s.jsx)(Nr,{children:(0,s.jsxs)("div",{"data-lesson-id":Q?.id,children:[H?Ule:(0,s.jsxs)("nav",{"aria-label":"Step navigation",className:At("controls",{"touch-preview":ge}),ref:f,children:[(0,s.jsxs)("button",{"aria-disabled":r0,"aria-hidden":r0,className:At("prev-btn",{"touch-preview":ge}),onClick:r0?void 0:a0,tabIndex:r0?-1:void 0,type:"button",children:[(0,s.jsx)(ae,{classNameIcon:At("arrow-icon",{"touch-preview":ge}),name:"arrow-up"}),(0,s.jsx)("span",{className:"visually-hidden-always",children:"Previous"})]}),ce&&(0,s.jsx)(Nie,{activeSlideIndex:I,blockNavigationStyle:K,numberOfSlides:de,onGoToCover:qo,onSlideClick:Ble,previewType:t,slideDisabledState:_e}),(0,s.jsxs)("div",{className:At("next-btns"),children:[(0,s.jsxs)("button",{"aria-disabled":!Zt,"aria-hidden":!Zt,className:At("page-down-btn",{"touch-preview":ge}),onClick:Zt?Ole:void 0,ref:p,tabIndex:Zt?void 0:-1,type:"button",children:[(0,s.jsx)(ae,{classNameIcon:At("arrow-icon",{"touch-preview":ge}),name:"arrow-down"}),(0,s.jsxs)("span",{className:"visually-hidden-always",children:["Scroll page down",!R&&(0,s.jsx)("span",{children:"(disabled because this is the bottom of the page)"}),Re&&(0,s.jsx)("span",{children:"(disabled since this is the last step)"})]})]}),(0,s.jsxs)("button",{"aria-disabled":tn,"aria-hidden":!Qt,className:At("next-btn",{"touch-preview":ge}),onClick:!Qt||tn?void 0:c0,ref:C,tabIndex:Qt?void 0:-1,type:"button",children:[(0,s.jsx)(ae,{classNameIcon:At("arrow-icon",{"touch-preview":ge}),name:"arrow-down"}),(0,s.jsxs)("span",{className:"visually-hidden-always",children:["Go to next step",tn&&(0,s.jsx)("span",{children:"(disabled until content is completed)"}),Re&&(0,s.jsx)("span",{children:"(disabled since this is the last step)"})]})]}),(0,s.jsxs)("button",{"aria-disabled":!Yt,"aria-hidden":!Yt,className:At("restart-btn",{"touch-preview":ge}),onClick:Yt?bg:void 0,ref:g,tabIndex:Re?void 0:-1,type:"button",children:[(0,s.jsx)(ae,{classNameIcon:At("restart-icon",{"touch-preview":ge}),name:"arrow-rotate-left"}),(0,s.jsx)("span",{className:"visually-hidden-always",children:"Restart"})]})]})]}),(0,s.jsxs)(Gd,{onShouldRecognizeGesture:Fle,onSwipeDown:ri,onSwipeUp:ai,children:[(0,s.jsx)("main",{"aria-describedby":"step-counter",ref:a,tabIndex:0,children:(0,s.jsx)(Jie,{currentLessonRef:r,isPresentationCourse:H,numberOfSlides:de,onContinue:Mle,onCurrentLessonElChange:h,onSlideEntered:Dle,onTransitioningChange:P,previewType:t,revealTargetBlockId:N,slideIndex:Ce,slides:he})}),(0,s.jsx)("div",{className:zle})]})]})})})})})}),pe&&Ie!=null&&(0,s.jsx)("div",{className:At("presentation-comment"),children:(0,s.jsx)(vs,{anchor:{kind:"slide",slide:String(Ie.id)},label:"Comments on slide"},String(Ie.id))})]})},$c=_("video-checkpoint-player");function bce({activeGroup:e,animateBlockEntrance:t,checkpointGroups:n,color:o,enableVideoPlaybackSpeed:r,handleNavigate:a,hasQueuedCheckpoints:i=!1,lessonId:c,lessonProgress:l,loadMedia:d,onCheckpointCompleted:h,onCheckpointDismissed:m}){const f=xe(),p=(0,u.useRef)(!1),C=(0,u.useMemo)(()=>dee(n),[n]),g=(0,u.useCallback)(()=>{e==null||p.current||(p.current=!0,h?.(e))},[e,h]),x=(0,u.useCallback)(()=>{p.current||(p.current=!0,m?.())},[m]);(0,u.useEffect)(()=>{e!=null&&(p.current=!1)},[e]);const b=(0,u.useId)(),[y,L]=(0,u.useState)(!1),S=(0,u.useCallback)(()=>L(!0),[]),T=(0,u.useCallback)(()=>L(!1),[]),k=(0,u.useMemo)(()=>cee(e),[e]),I=(0,u.useMemo)(()=>new Set(k.map(U=>U.id)),[k]),E=k.some(U=>!Ur(U.id,l)),N=Qa(f,"videoCheckpointLocked","Complete the activities above to continue."),M=rt();if(e==null)return null;const A=ro(e),j=uu(A),w=oo(e),P=w!=="timestamp",R=C.get(e.checkpoint.id),O=P?Qa(f,w==="start"?"videoCheckpointStart":"videoCheckpointDone",w==="start"?"Start video":"Done"):`${f?.videoCheckpointDefaultTitle||"Checkpoint"} ${R??""}`,B=lee(M(e.checkpoint?.title),O),D=e.blocks??[];let F;i?F=Qa(f,"videoCheckpointContinue","Continue"):w==="start"?F=Qa(f,"videoCheckpointStartDismiss","Start video"):w==="end"?F=Qa(f,"videoCheckpointDone","Done"):F=f?.videoCheckpointResume||"Resume video";const V=B;return(0,s.jsx)(xf,{className:$c(),darkOverlay:!0,"data-testid":"video-checkpoint-overlay",disableCloseOnEscape:E,disableCloseOnOverlayClick:E,disabledCloseButton:E,disabledCloseButtonMessage:N,footer:(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(ws,{elementFocused:E&&y,message:E?N:void 0,renderInModalWhenPresent:!0,children:(0,s.jsxs)("button",{"aria-describedby":E?b:void 0,"aria-disabled":E||void 0,"aria-label":`${F} \u2014 ${B}`,className:$c("resume",{locked:E}),onBlur:T,onClick:E?void 0:g,onFocus:S,type:"button",children:[F,(0,s.jsx)(Lm,{className:$c("resume-icon"),decorative:"true"})]})}
174),E&&(0,s.jsx)("span",{className:"visually-hidden-always",id:b,children:N})]}),heading:V,onCancel:E||w!=="timestamp"?void 0:g,onClose:E?an:w==="end"?g:x,subText:P?void 0:`${f?.videoCheckpointPausedAt||"Paused at"} ${j}`,children:(0,s.jsx)("div",{className:$c("blocks"),"data-testid":"video-checkpoint-content",children:D.length===0?(0,s.jsx)("p",{className:$c("empty"),children:f?.videoCheckpointNoContent||"No content added to this checkpoint."}):D.map((U,H)=>(0,s.jsx)(Yp,{animateBlockEntrance:t,block:{...U,blockId:U.id,requiresInteraction:I.has(U.id)||void 0},color:o,enableVideoPlaybackSpeed:r,handleNavigate:a,hideBlock:!1,index:H,isLastBlock:H===D.length-1,lessonId:c,lessonProgress:l,loadMedia:d,onContinue:an},`checkpoint-overlay-${U.id}`))})})}const u4=(e,t,n)=>{Pn(cb({event:e,properties:{checkpoint_id:t.checkpoint.id,checkpoint_time:ro(t),checkpoint_placement:oo(t),lesson_id:n}}))},xce=e=>e?.containerElement?.querySelector("video")??null;function yce(e,t){const n=(0,u.useRef)(null),[o,r]=(0,u.useState)(null),a=(0,u.useRef)([]),[i,c]=(0,u.useState)(!1),{startGroups:l,endGroups:d}=(0,u.useMemo)(()=>{const T=[],k=[];return e.forEach(I=>{const E=oo(I);E==="start"?T.push(I):E==="end"&&k.push(I)}),{startGroups:T,endGroups:k}},[e]),h=(0,u.useMemo)(()=>uee(e),[e]),m=(0,u.useCallback)(T=>{oo(T)==="timestamp"&&n.current?.seekToTime?.(ro(T)),n.current?.pause?.(),r(T),u4("Video Checkpoint Viewed",T,t)},[t]),f=(0,u.useCallback)(T=>{if(T.length===0)return;const[k,...I]=T;a.current=I,c(I.length>0),m(k)},[m]),p=(0,u.useCallback)(T=>{u4("Video Checkpoint Completed",T,t);const k=a.current.shift();if(k!=null){c(a.current.length>0),m(k);return}c(!1),r(null);const I=oo(T);(I==="timestamp"||I==="start")&&n.current?.play?.()},[t,m]),C=(0,u.useCallback)(()=>{a.current=[],c(!1),r(null)},[]),g=(0,u.useRef)(!1);(0,u.useEffect)(()=>{g.current||l.length===0||(g.current=!0,f(l))},[l,f]);const x=(0,u.useRef)(d);x.current=d;const b=(0,u.useRef)(null),y=(0,u.useRef)(null),L=(0,u.useRef)(!1);return{contextValue:(0,u.useMemo)(()=>({checkpointMarkerTimes:h,setVideoPlayerRef:T=>{n.current=T,b.current!=null&&y.current!=null&&(b.current.removeEventListener("ended",y.current),b.current=null,y.current=null);const k=xce(T);if(k!=null){const I=()=>{L.current||(L.current=!0,f(x.current))};k.addEventListener("ended",I),b.current=k,y.current=I}},onCheckpointReached:T=>{const k=e.filter(I=>oo(I)==="timestamp"&&ro(I)===T);f(k)}}),[h,e,f]),activeCheckpointGroup:o,hasQueuedCheckpoints:i,handleCheckpointCompleted:p,handleCheckpointDismissed:C}}function Sce({animateBlockEntrance:e,checkpointGroups:t,children:n,color:o,enableVideoPlaybackSpeed:r,handleNavigate:a,lessonId:i,lessonProgress:c,loadMedia:l}){const{contextValue:d,activeCheckpointGroup:h,hasQueuedCheckpoints:m,handleCheckpointCompleted:f,handleCheckpointDismissed:p}=yce(t,i);return(0,s.jsxs)(fee,{value:d,children:[n,t.length>0&&(0,s.jsx)(bce,{activeGroup:h,animateBlockEntrance:e,checkpointGroups:t,color:o,enableVideoPlaybackSpeed:r,handleNavigate:a,hasQueuedCheckpoints:m,lessonId:i,lessonProgress:c,loadMedia:l,onCheckpointCompleted:f,onCheckpointDismissed:p})]})}const Tce=Sce;function Lce(e){const{inlineBlocks:t,checkpointGroups:n}=(0,u.useMemo)(()=>hee(e.blocks),[e.blocks]);return(0,s.jsx)(Tce,{...e,checkpointGroups:n,children:(0,s.jsx)(qp,{...e,blocks:t})})}const kce=Lce,h4=_("blocks-lesson-restart-button"),Ice=({className:e,onClick:t})=>{const n=h4.mix(e);return(0,s.jsx)("button",{className:n,onClick:t,type:"button",children:(0,s.jsx)(ae,{classNameIcon:h4("icon"),name:"arrow-rotate-left"})})},si=_("one-page-authors");function Ece({className:e}){const t=xe(),n=a2(),o=Ij(),r=MD();if(!o)return null;const a=n?.isPartnerContentAuthor&&r!=null,i=si({}).mix(e);return a?(0,s.jsx)("div",{className:i,children:(0,s.jsx)("ul",{className:si("list"),role:"list",children:r.map((c,l)=>(0,s.jsxs)("li",{className:si("item"),role:"listitem",children:[(0,s.jsx)(m4,{avatarUrl:c?.image?Hi({width:76,height:76,imageKey:c.image}):void 0}),(0,s.jsx)(f4,{a11yAuthorPrefix:t?.a11yAuthorPrefix,name:c?.name})]},l))})}):(0,s.jsxs)("div",{className:i,children:[(0,s.jsx)(m4,{avatarUrl:mt(o.avatar)}),(0,s.jsx)(f4,{a11yAuthorPrefix:t?.a11yAuthorPrefix,name:o.authorName})]})}function m4({avatarUrl:e}){return e?(0,s.jsx)("div",{className:si("avatar"),style:{backgroundImage:`url(${e})`}}
174):(0,s.jsx)("div",{className:si("avatar-fallback"),children:(0,s.jsx)(zm,{decorative:!0})})}function f4({a11yAuthorPrefix:e,name:t}){const n=t||"Unknown User",o=si("name");return(0,s.jsxs)("div",{className:o.toString(),children:[(0,s.jsx)("span",{className:"visually-hidden-always",children:e}),(0,s.jsx)("span",{children:n})]})}const p4=Ece,Nce=_("one-page-title"),g4=({className:e,htmlId:t})=>{const n=ie(),o=we(n?.title),r=ya("title"),a=(0,Xt.uW)(n?.title)?{"data-l10n-id":n?.title?.l10nId}:{"data-change-path":r},i=Nce({}).mix(e);return(0,s.jsx)(vs,{anchor:{field:"title",kind:"artifactField"},label:"Comments on course title",positioning:"page",children:(0,s.jsx)("h1",{...a,className:i,id:t,tabIndex:-1,children:o})})},_c=_("one-page-lesson-header-info");function jce(){const e=ie(),t=_c({});return(0,s.jsxs)("div",{className:t,children:[(Cl(e)||Pi(e))&&(0,s.jsx)(cf,{className:_c("logo"),imageClassName:_c("logo-image")}),(0,s.jsx)(g4,{className:_c("title").toString()}),yr(e)&&(0,s.jsx)(Ax,{}),(0,s.jsx)(p4,{className:_c("authors").toString()})]})}const wce=jce,s0=_("one-page-lesson-header"),Ace=_("page"),Rce=s0("main").mix("lesson-header__main"),Pce=s0("container").mix(Ace("header-container")),Mce=()=>{const e=ie(),t=Ct(),n=e?.coverPageType,{alpha:o,ariaLabel:r,media:a,role:i}=Rr("coverImage"),c=e?.theme?.coverImageColor,l=n===ue.WHITE,d=n===ue.IMAGE,h=n===ue.ACCENT,m=n===ue.VIDEO,f=c===ut.LIGHT,p=s0({accent:h,image:d,white:l||m,video:m,"overlay-light":d&&f}),C=d?la({alpha:o,color:c??void 0,media:a})??void 0:void 0;return(0,s.jsxs)("header",{className:p,children:[d&&C&&(0,s.jsx)("div",{"aria-label":r,className:s0("background-image"),role:i,style:C}),(0,s.jsx)("div",{className:Pce,children:(0,s.jsx)("div",{className:Rce,children:(0,s.jsx)(wce,{})})}),t===se.APEX&&(0,s.jsx)(Mr,{coverPageType:"LEFT"})]})},Oce=_("lesson-one-page-scroll"),Bce=({lessonProgress:e})=>{const t=(0,u.useRef)(null),[n,o]=(0,u.useState)(!1),{lessons:r,...a}=ie(),{lmsOptions:i}=a,c=rn(),l=r?.[0],d=l?.type==="blocks"?l:void 0,h=l?.id??"",m=d?.items??[],f=e?.type==="blocks"?e:void 0,p=yr(a),C=Pi(a),g=p?kce:qp,x=e?.isComplete&&!0&&!p&&!C,b=e?.isComplete&&!1,y=a?.exportSettings?.webExportSettings,L=!Es.isInstantLink&&(i?.disableCoverPage||y?.disableCoverPage),S=(0,u.useCallback)(()=>{n||(L?t.current?.scrollTo({top:0,behavior:mn()?"instant":"smooth"}):(o(!0),qs(()=>{c("/")},"lesson-to-one-page-cover-continuous").finally(()=>{o(!1)})))},[c,L,n]);return(0,s.jsx)("div",{className:Oce(),children:(0,s.jsx)("div",{className:"page-wrap",id:"page-wrap",ref:t,children:(0,s.jsx)("div",{className:"page","data-page":!0,children:(0,s.jsx)("div",{className:"page__wrapper page__wrapper--white",children:(0,s.jsxs)(Vu,{lessonId:h,children:[(0,s.jsx)(Mce,{}),(0,s.jsx)("div",{className:"page__content",children:(0,s.jsx)(Nr,{children:(0,s.jsxs)("div",{"data-lesson-id":l?.id,children:[(0,s.jsx)(g,{animateBlockEntrance:a?.animateBlockEntrance,blocks:m,className:void 0,color:a?.color,enableVideoPlaybackSpeed:a?.enableVideoPlaybackSpeed,handleNavigate:void 0,isLessonEntering:void 0,isLessonExiting:void 0,lessonId:h,lessonProgress:f,loadMedia:!0,nextLesson:void 0}),x&&(0,s.jsx)(Ice,{className:void 0,onClick:S}),b&&(0,s.jsx)(Df,{lessonId:h})]})})})]})})})})})},v4=_("microlearning-progress-summary"),Dce=_("page-wrap"),Fce=({course:e,courseProgress:t,isStepped:n,lesson:o})=>{const r=(0,u.useRef)(null),a=(0,u.useRef)(null),[i,c]=(0,u.useState)(!1),l=v4("content",{stepped:n,mounted:i}).toString();return(0,lc.A)(()=>{const d=(a.current?.clientHeight??0)+1;r.current?.scrollTo({top:d}),c(!0)}),(0,s.jsxs)("div",{className:Dce(),id:"page-wrap",ref:r,children:[(0,s.jsx)(Ff,{className:v4("previous").toString(),lessonId:o?.id??"",ref:a}),(0,s.jsx)(ZS,{contentClassName:l,course:e,courseProgress:t,lessonId:o?.id??""})]})},Hce=({isProgressSummary:e,lessonProgress:t})=>{const n=ie(),o=Lr(),{previewType:r}=Jl(),a=n?.theme?.blockNavigationType===Li.STEPPED;return e?(0,s.jsx)(Fce,{course:n,courseProgress:o,isStepped:a,lesson:void 0}):a?(0,s.jsx)(Cce,{lessonProgress:t,previewType:r}):(0,s.jsx)(Bce,{lessonProgress:t})};var $ce=v(49860);function C4(){const e=ot();return $ce.useMemo(()=>({advanceQuizLessonToEnd:t=>e(sN(t)),submitQuizAnswer:t=>e(uh(t)),setQuizLessonTimeRemaining:t=>e(rN(t))}),[e])}const _ce="MULTIPLE_CHOICE";function Vce({lesson:e,lessonProgress:t,getL10nRecursive:n,quizActions:o,reportAnswer:r}){if(!e||!gl(e))return;const a=e.settings??{},i=a.passToContinue??!1,c=t?.retryAttempts??0,l=zu({allowedRetries:a.retryCount,currentRetries:c}),d=Object.values(t?.items??{}).filter(h=>!h.isComplete);d.length>0&&d.forEach(h=>{const m=Goe({lesson:e,question:h});if(m){const f=m.type||_ce,p=n({duration:{startTime:0,stopTime:0},id:e.id,isCorrect:!1,isUnfinished:!0,item:{id:String(m.id||""),title:String(m.title||""),type:f},itemProgress:h,retryAttempts:c,title:e.title});r(p)}o.submitQuizAnswer({finalRetryAttempt:l,isCorrect:!1,itemId:h.id,lessonId:e.id,passToContinue:i})}),o.advanceQuizLessonToEnd({lessonId:e.id,finalize:!0,passToContinue:i,finalRetryAttempt:l})}var zce=v(49860);function Uce({lesson:e,lessonProgress:t,getL10nRecursive:n}){const o=C4();return zce.useCallback(()=>{Vce({lesson:e,lessonProgress:t,getL10nRecursive:n,quizActions:o,reportAnswer:dv})},[e,t,n,o])}var b4=v(49860);function Gce({children:e}){return ig(vh)===!0?(0,s.jsx)(s.Fragment,{children:e}):(0,s.jsx)(Wce,{children:e})}function Wce({children:e}){const t=jl(),n=Lr(),o=Bt(t),r=Ao(t),a=t2(),{setQuizLessonTimeRemaining:i}=C4(),c=b4.useMemo(()=>r??{},[r]),l=Uce({lesson:o,lessonProgress:c,getL10nRecursive:a}),d=b4.useMemo(()=>pl(o)?o.settings:void 0,[o]),h=!!d?.timer,m=d?.timerDuration;return(0,s.jsx)(qre,{courseProgress:n,currentLessonId:t,handleExpiredQuiz:l,isTimedQuiz:h,setQuizLessonTimeRemaining:i,timerDuration:m,children:e})}function Kce({lessonId:e}){const t=ot(),[n,o]=(0,u.useState)(null),r=xe(),a=(0,u.useCallback)(c=>{c.target instanceof HTMLElement&&t(xh({offsetHeight:c.target.offsetHeight}))},[t]);(0,u.useLayoutEffect)(()=>
174{if(n)return t(xh({offsetHeight:n.offsetHeight})),()=>{t(xh(null))}},[t,n]),_d(n,a);const i=(0,u.useCallback)(()=>{Px(e)},[e]);return(0,s.jsx)("button",{className:"visually-hidden btn-skip-to-lesson brand--ui",onClick:i,ref:o,type:"button",children:(0,s.jsxs)("span",{className:"btn-skip-to-lesson__wrap",children:[r?.courseSkipToLesson,(0,s.jsx)(ae,{"aria-hidden":"true",classNameIcon:"btn-skip-to-lesson__icon",name:"arrow-right"})]})})}var Qce=v(49860);const Yce=960,vg=_("transcript-panel"),Zce=e=>{const{currentLocale:t}=tt();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 Xce({enhancedLabels:e,lessonId:t,questionBankActiveIndex:n}){const o=ot(),{audioPlayerIdOpen:r,focusing:a,refocusTarget:i,transcriptMedia:c}=uc(),l=!!r,d=(0,u.useId)(),h=me(W=>t?ua(t,W):null),f=t?.startsWith("question-bank-")?n:h?.type==="quiz"?h.activeIndex:void 0,p=$t(Yce),[C,g]=(0,u.useState)(0),[x,b]=(0,u.useState)(!1),[y,L]=(0,u.useState)(!1),S=(0,u.useRef)(!1),T=(0,u.useRef)(null),k=(0,u.useRef)(null),I=(0,u.useRef)(c),E=(0,u.useRef)(t),N=(0,u.useRef)(f),M=xe()||e,A=(0,u.useRef)(null),j=(0,u.useRef)({panelHeight:0,startY:null,startHeight:null,startTime:null,velocity:null}),w=(0,u.useCallback)(W=>{const G=j.current.panelHeight,Z=performance.now();L(!0);const Y=ne=>{const ee=ne-Z,le=Math.min(ee/300,1),J=1-Math.pow(1-le,3),te=G+(W-G)*J;g(te),j.current.panelHeight=te,le<1?requestAnimationFrame(Y):(L(!1),b(!1),j.current={startY:null,startHeight:null,startTime:null,panelHeight:null,velocity:null})};requestAnimationFrame(Y)},[b,L,g]),P=(0,u.useCallback)(W=>{const{startTime:$,startY:G,startHeight:Z}=j.current;if(!p||G===null)return;const Y=G-(W?.clientY??W?.touches?.[0]?.clientY??0),ne=Z+Y;if(g(ne),j.current.panelHeight=ne,$!==null){const ee=performance.now()-$,le=Y/ee;j.current.velocity=le}},[p]),R=(0,u.useCallback)(W=>{const{velocity:$}=j.current;if(!$)return;Object.assign(j.current,{startY:null,startHeight:null,startTime:null}),b(!1);const G=window.innerHeight*.66;let Z;Math.abs($)>.5?Z=$>0?window.innerHeight:150:Z=C>=G?window.innerHeight:150,w(Z),W instanceof MouseEvent&&(window.removeEventListener("mousemove",P),window.removeEventListener("mouseup",R))},[w,C,P]),O=(0,u.useCallback)(W=>{!p||k.current.contains(W.target)||T.current.contains(W.target)||(Object.assign(j.current,{startY:W?.clientY??W?.touches?.[0]?.clientY??null,startHeight:A.current?.clientHeight??0,startTime:performance.now()}),b(!0),W.nativeEvent instanceof MouseEvent&&(window.addEventListener("mousemove",P),window.addEventListener("mouseup",R)))},[P,R,p,b]);(0,u.useEffect)(()=>{let W;const $=()=>{A?.current?.style&&(A.current.style.transition="none",A.current.parentNode.querySelectorAll("div:not(.transcript-panel)").forEach(Y=>{Y.style.transition="none"}))},G=()=>{clearTimeout(W),W=setTimeout(()=>{A?.current?.style&&(A.current.style.transition="",A.current.parentNode.querySelectorAll("div:not(.transcript-panel)").forEach(Y=>{Y.style.transition=""}))},200)};return window.addEventListener("resize",$),window.addEventListener("resize",G),()=>{window.removeEventListener("resize",$),window.removeEventListener("resize",G),clearTimeout(W)}
174},[]),(0,u.useEffect)(()=>{!l&&S.current&&g(0),a&&l&&A.current&&(A.current.focus(),o(Sf({audioPlayerId:r,focusing:!1}))),S.current=l},[r,o,a,l]),(0,u.useEffect)(()=>{l&&c!==I.current&&(I.current=c)},[l,c]),(0,u.useEffect)(()=>{l&&E.current!==t&&o(hc()),E.current=t},[t,l,o]),(0,u.useEffect)(()=>{l&&N.current!==f&&N.current!==void 0&&o(hc()),N.current=f},[f,l,o]);const B={role:"button",tabIndex:0,onMouseDown:O,onTouchStart:O,onTouchEnd:R,onTouchMove:P},[D,F]=Qce.useState(!1),V=we(D?I.current:c),U=Zce(V);let H;l&&(H=Tf(r));const K=(0,u.useCallback)(()=>{const W=i??document.getElementById(c3(r));return W?(W.focus(),!0):!1},[r,i]),Q=(0,u.useCallback)(W=>{W.stopPropagation(),W.preventDefault(),o(hc()),K()},[o,K]),z=(0,u.useCallback)(W=>{r&&W.key==="Escape"&&Q(W)},[r,Q]);return(0,s.jsx)(s.Fragment,{children:(0,s.jsx)(Fs,{classNames:"transcript-panel",in:l,nodeRef:A,onEnter:()=>F(!1),onEntered:()=>F(!1),onEntering:()=>F(!1),onExit:()=>F(!0),onExited:()=>F(!1),onExiting:()=>F(!0),timeout:300,unmountOnExit:!0,children:(0,s.jsxs)("section",{"aria-hidden":!l,"aria-labelledby":d,className:vg({isOpen:l,isAnimatingMobileSwipe:y,isDragging:x}).toString(),id:H,onKeyDown:z,ref:A,style:p&&l?{height:`${C/10}rem`,minHeight:C>0?"33vh":void 0}:{},tabIndex:-1,children:[(0,s.jsxs)("header",{...p?B:{},children:[(0,s.jsx)("h3",{id:d,ref:T,children:M?.audioTranscript}),(0,s.jsx)("button",{"aria-label":M?.audioHideTranscript,className:vg("close-button"),onClick:Q,ref:k,type:"button",children:(0,s.jsx)(ae,{name:"close"})})]}),(0,s.jsx)("section",{className:vg("transcript-text",{"not-available":!U}),children:U||M?.audioNoTranscriptAvailable})]})})})}const qce=e=>{window.parent.postMessage({type:"preview:lessonChange",data:e},"*")};function Jce(e){const t=rn(),n=(0,u.useRef)(null);return(0,u.useEffect)(()=>{e&&n.current!==e&&(qce(e),n.current=e)},[e]),{handleNavigate:(0,u.useCallback)(r=>{t(xn(r))},[t])}}const ele=({content:e})=>{const t=ie(),n=Lr(),{didNavigate:o,shouldSkipAutoFocusOnNavigate:r}=Jl(),a=(0,Pe.g)(),i=(0,Pe.zy)(),[c]=(0,Pe.ok)(),l=c.get("embed")==="lesson-only",d=a.lessonId??"",h=c.get(dc);(0,u.useEffect)(()=>{!h||!d||window.dispatchEvent(new CustomEvent(Ke,{detail:{lessonId:d,itemId:h,path:["lessons",{id:d},"items",{id:h}],align:"start"}}))},[d,h]);const m=$t(480),{handleNavigate:f}=Jce(d),p=ks(t),C=(0,u.useCallback)(I=>{if(p)return;const E=document.querySelector(`[data-lesson-id="${I}"]`);(t.theme?.hideLessonHeaders?E?.querySelector("main"):E?.querySelector("h1"))?.focus({preventScroll:!0})},[t,p]),g=(0,u.useRef)(d),x=(0,u.useRef)(!1);(0,u.useEffect)(()=>{x.current||d!==g.current||r||!o||(x.current=!0,C(d))},[o,C,d,r]);const b=l?"lesson lesson--preview":"lesson",y=ot(),L=(0,u.useCallback)(({item:I,refs:E})=>{if(!I)return;const N="media"in I?I.media:null;y(i3({audioPlayerId:bs({refs:E}
174),transcriptMedia:N}))},[y]),S=(0,u.useCallback)(()=>{y(hc())},[y]),T=(0,u.useCallback)(I=>{y(Sf(I))},[y]),k=Ao(d);return(0,s.jsxs)(Gce,{children:[(0,s.jsxs)("div",{className:"page-lesson-wrap",children:[!p&&(0,s.jsx)(Kce,{lessonId:d}),(0,s.jsx)("div",{className:"page-lesson",children:(0,s.jsxs)(cU,{children:[(0,s.jsx)(aU,{closeTranscript:S,mode:"readonly",onTranscriptUpdate:T,openTranscript:L,children:(0,s.jsx)("div",{className:b,"data-lesson":!0,children:(0,s.jsx)("div",{className:"lesson__content",children:(0,s.jsx)("div",{className:"page-view",children:(0,s.jsx)(_G,{isLessonOnlyEmbed:l,children:p?(0,s.jsx)(Hce,{isProgressSummary:e.kind==="progress-summary",lessonProgress:k}):(0,s.jsx)(wW,{isLessonOnlyEmbed:l,onLessonEntered:C,children:(0,s.jsx)(Sie,{content:e,handleNavigate:f,isMobileHeader:m,lessonId:d,lessonProgress:k},i.pathname)})})})})})}),(0,s.jsx)(Xce,{lessonId:n?.currentLesson?.toString()})]})})]}),(0,s.jsx)(yf,{onClose:()=>C(d)})]})},Cg=_("one-page-cover-info");function tle({htmlIdTitle:e}){const t=ya("title");return(0,s.jsxs)("div",{className:Cg(),"data-change-path":t,children:[(0,s.jsx)(g4,{className:Cg("title").toString(),htmlId:e}),(0,s.jsx)(p4,{className:Cg("authors").toString()})]})}const nle=tle,o0=_("one-page-cover"),sle=_("cover"),ole={passive:!0};function rle(e){return typeof e=="object"&&e!=null}function ale(e){return rle(e)&&(typeof e.id=="string"||typeof e.id=="number")}function ile({previewType:e}={}){const t=(0,u.useRef)(null),n=(0,u.useRef)(null),o=(0,u.useRef)(!1),r=rn(),a=xe(),{shouldSkipAutoFocusOnNavigate:i}=Jl(),c=(0,u.useRef)(i),l=me(qt),d=ew(l),h=ale(d)?d:void 0,m=(0,u.useCallback)(()=>{const w=h?.id;return w!=null?xn(w):null},[h?.id]),f=(0,u.useCallback)(()=>{const w=m();if(w!=null){const R=l?.theme?.blockNavigationType===Li.STEPPED?"one-page-cover-to-lesson-stepped":"one-page-cover-to-lesson-continuous";qs(()=>{r(w)},R)}},[l?.theme?.blockNavigationType,m,r]),p=(0,u.useRef)(f);p.current=f;const C=(0,u.useRef)(e);C.current=e;const g=(0,u.useCallback)(()=>{n.current?.focus?.()},[]);(0,u.useEffect)(()=>{cy(),c.current||n.current?.focus?.()},[]),(0,u.useEffect)(()=>{const w=n.current;if(!w)return;const P=R=>{(R.key==="ArrowDown"||R.key==="ArrowRight")&&!o.current&&(o.current=!0,w.removeEventListener("keyup",P),p.current())};return w.addEventListener("keyup",P),()=>w.removeEventListener("keyup",P)},[]),(0,u.useEffect)(()=>{const w=P=>{pc(C.current)||o.current||P.deltaY>100&&(o.current=!0,document.removeEventListener("wheel",w),p.current())};return document.addEventListener("wheel",w,ole),()=>document.removeEventListener("wheel",w)},[]);const x=(0,u.useCallback)(w=>{const P=w.target;P instanceof Node&&!t.current?.contains?.(P)&&!o.current&&(o.current=!0,f())},[f]),b=(0,u.useCallback)(w=>{w.preventDefault(),o.current||(o.current=!0,f())},[f]),y=l?.coverPageType===ue.WHITE,L=l?.coverPageType===ue.VIDEO,S=l?.coverPageType===ue.IMAGE,T=l?.coverPageType===ue.ACCENT,k=l?.theme?.blockNavigationType===Li.STEPPED,I=l?.theme?.coverImageColor??ut.DARK,E="title",M=`overlay-${I?.toLowerCase()}`,A=o0("wrapper",{[M]:S,accent:T,image:S,white:y||L,video:L}).mix(sle("header-content")),j=m();return(0,s.jsx)(Nr,{children:(0,s.jsxs)(Gd,{onSwipeUp:f,children:[(0,s.jsxs)("main",{className:A,ref:n,tabIndex:-1,children:[(0,s.jsx)(nle,{htmlIdTitle:E}),k&&(0,s.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."}),j!=null&&(0,s.jsx)("div",{className:o0("start-wrapper"),onClick:x,children:(0,s.jsx)(un,{"aria-label":a?.courseStart??"Start",className:o0("start-link"),onClick:b,ref:t,to:j,children:(0,s.jsx)(ae,{className:o0("start-icon"),name:"arrow-down"})})}),S&&(0,s.jsx)(pf,{})]}),(0,s.jsx)(yf,{onClose:g})]})})}const cle=ile;function lle({course:e,lessonId:t,progressSummaryEnabled:n}){if(n&&t===ji)return{kind:"progress-summary"};const o=e?.lessons?.find(r=>String(r.id)===t);return o?{kind:"lesson",lesson:o}:{kind:"not-found"}}function dle(){const e=ie(),t=(0,Pe.zy)(),n=ks(e),o=e?.lessonsOnly?.[0]?.id,r=o==null?void 0:xn(o),a=n?zD(e):yb(e),l=r!=null&&a?(0,s.jsx)(Pe.C5,{replace:!0,to:{pathname:r,search:t.search}}):n?(0,s.jsx)(cle,{}):(0,s.jsx)(tU,{});return(0,s.jsxs)(Pe.BV,{children:[(0,s.jsx)(Pe.qh,{element:(0,s.jsx)(x4,{}),path:Bl}),(0,s.jsx)(Pe.qh,{element:(0,s.jsx)(y4,{children:(0,s.jsx)(x4,{})}),path:Dl}),(0,s.jsx)(Pe.qh,{element:l,index:!0}),(0,s.jsx)(Pe.qh,{element:(0,s.jsx)(y4,{children:l}),path:"/:mode"}),(0,s.jsx)(Pe.qh,{element:(0,s.jsx)(Wl,{}),path:"*"})]})}function x4(){const e=Sr(),{lessonId:t=""}=(0,Pe.g)(),n=lle({course:e,lessonId:t,progressSummaryEnabled:!1});return n.kind==="not-found"?(0,s.jsx)(Wl,{}):(0,s.jsx)(ele,{content:n})}function y4({children:e}){const{mode:t}=(0,Pe.g)();return oA(t)?e:(0,s.jsx)(Wl,{})}const oi=_("legacy-share-deprecation-banner"),ule=Date.UTC(2026,7,31),hle="https://community.articulate.com/discussions/discuss/rise-360-legacy-preview-links-will-be-disabled-on-august-31/1265175",S4="has-legacy-share-banner",T4="--legacy-share-banner-height",L4="legacyShareBannerDismissed";function mle(){try{return sessionStorage.getItem(L4)==="true"}catch{return!1}}function fle(){try{return sessionStorage.setItem(L4,"true"),!0}catch{return!1}}const ple=()=>(0,s.jsx)("svg",{"aria-hidden":"true",className:oi("icon"),focusable:"false",viewBox:"0 0 512 512",children:(0,s.jsx)("path",{d:"M256 512A256 256 0 1 0 256 0a256 256 0 1 0 0 512zM96 208l320 0c8.8 0 16 7.2 16 16l0 64c0 8.8-7.2 16-16 16L96 304c-8.8 0-16-7.2-16-16l0-64c0-8.8 7.2-16 16-16z"})}),gle=()=>(0,s.jsx)("svg",{"aria-hidden":"true",className:oi("dismiss-icon"),focusable:"false",viewBox:"0 0 384 512",children:(0,s.jsx)("path",{d:"M342.6 150.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L192 210.7 86.6 105.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3L146.7 256 41.4 361.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L192 301.3 297.4 406.6c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L237.3 256 342.6 150.6z"})});function vle(){const e=ie(),[t,n]=(0,u.useState)(mle),o=(0,u.useRef)(null),r=!t&&Y0()&&Date.now()<ule&&e!=null&&!sb(e),a=(0,u.useCallback)(()=>{fle(),n(!0)},[]);return(0,u.useEffect)(()=>{const i=document.getElementById("app"),c=o.current;if(!r||!i||!c)return;i.classList.add(S4);const l=()=>{const{height:h}=c.getBoundingClientRect();i.style.setProperty(T4,`${h}px`)};l();const d=new ResizeObserver(l);return d.observe(c),()=>{d.disconnect(),i.classList.remove(S4),i.style.removeProperty(T4)}},[r]),r?(0,s.jsxs)("div",{className:oi(),ref:o,role:"status",children:[(0,s.jsx)(ple,{}),(0,s.jsxs)("p",{className:oi("message"),children:["Access to this content will be"," ",(0,s.jsx)("a",{className:oi("link"),href:hle,rel:"noopener noreferrer",target:"_blank",children:"disabled on August 31, 2026"}),". Please contact your administrator and request the content be republished via Quick Share to maintain access."]}),(0,s.jsx)("button",{"aria-label":"Dismiss notice",className:oi("dismiss"),onClick:a,type:"button",children:(0,s.jsx)(gle,{})})]}):null}const Cle=vle;var ho=v(49860);const Kr=_("share-password-dialog");function ble({failAttempt:e,onSubmit:t}
174){const n=me(qt),o=ho.useRef(null),r=ho.useRef(null),[a,i]=ho.useState(!1),c=ho.useRef(!1),{announceAssertive:l}=Ls();ho.useEffect(()=>{r.current?.showModal()},[]),ho.useEffect(()=>{e&&!c.current&&(i(!0),o.current&&(o.current.value=""),l("Incorrect password. Please try again.")),c.current=e},[l,e]),ho.useEffect(()=>{const p=r.current;if(!p)return;const C=()=>i(!1);return p.addEventListener("animationend",C),()=>{p.removeEventListener("animationend",C)}},[]);const d=ho.useCallback(p=>{p.preventDefault(),o.current&&t(o.current.value)},[t]),h=ho.useCallback(p=>{p.preventDefault()},[]),f=`You need a password to view this ${ks(n)?W7(n).toLocaleLowerCase():"course"}. If you don\u2019t know it, ask the person who shared this with you.`;return(0,s.jsxs)("dialog",{"aria-describedby":"share-password-instructions share-password-constraint","aria-labelledby":"share-password-title",className:`${Kr({shaking:a})} brand--border`,onCancel:h,ref:r,children:[(0,s.jsx)("h1",{className:Kr("heading"),id:"share-password-title",children:"Enter Password"}),(0,s.jsx)("p",{className:Kr("instructions"),id:"share-password-instructions",children:f}),(0,s.jsx)("p",{className:"visually-hidden-always",id:"share-password-constraint",children:"This dialog requires a password to proceed and cannot be dismissed."}),(0,s.jsxs)("form",{onSubmit:d,children:[(0,s.jsx)("label",{className:Kr("label"),htmlFor:"share-password",children:"password"}),(0,s.jsx)("input",{className:Kr("input"),id:"share-password",ref:o,type:"password"}),(0,s.jsx)("div",{className:Kr("toolbar"),children:(0,s.jsx)("button",{className:`${Kr("button")} brand--background`,type:"submit",children:"View"})})]})]})}const xle=ble;function yle(){const e=Sl();(0,u.useEffect)(()=>{window.targetMode=XD({locale:bb(e)})},[e]),(0,u.useEffect)(()=>{window.parent.postMessage({type:"ready"},"*"),window.parent.postMessage({type:Ln.STATUS,data:!!window.targetMode},"*"),oK(n=>Pn(T7(n)))},[]);const t=(0,u.useRef)(!1);(0,u.useEffect)(()=>{t.current||!e||!MI()||(t.current=!0,window.parent.postMessage({type:"preview:snapshotLoaded",data:{defaultLocale:e.defaultLocale,locales:e.locales?.map(({locale:n})=>n)}}))},[e]),(0,u.useEffect)(()=>{const n=()=>Pn(WE()),o=()=>Pn(KE()),r=()=>window.parent.postMessage("coursePreviewIframeClicked","*");return SC("favoriteAdded",n),SC("favoriteRemoved",o),document.addEventListener("click",r),()=>{TC("favoriteAdded",n),TC("favoriteRemoved",o),document.removeEventListener("click",r)}},[])}function Sle(e){return e.status}function k4(){return me(Sle)}function Tle({enabled:e=!0,onAuthorized:t,onError:n,onUnauthorized:o,password:r}){const a=ot();(0,u.useEffect)(()=>{e&&(a(z8({onAuthorized:t,onError:n,onUnauthorized:o,password:r})),a(S7()))},[a,e,t,n,o,r])}function Lle(){const e=ot(),{courseLoaded:t,coverLoaded:n}=k4(),o=me(i=>i.course?.coverImage?.media),r=ht(o),a=(0,u.useCallback)(()=>{e(JE(!0))},[e]);(0,u.useEffect)(()=>{if(t&&!n){const i=r?.image,{key:c,src:l}=i||{};if(c||l){const d=c?gt(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,n,r,a])}function kle(e={}){Tle(e),Lle();const t=ot(),n=db(),o=me(f=>f.courseLabels.labels),{courseLoaded:r,coverLoaded:a,fatalError:i,fontsLoaded:c,notFound:l,partnerContentLoaded:d}=k4(),h=(0,Fe.A)(r),m=r&&c&&a&&d;return(0,u.useEffect)(()=>{!h&&r&&!c&&(n??[]).length>0&&t(HN(n))},[t,h,r,c,n]),(0,u.useEffect)(()=>{if(!m||window.parent===window)return;window.parent.postMessage({type:"course:ready"},window.location.origin);const f=p=>{p.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 Ile({course:e}){const[t,n]=(0,u.useState)(!0),[o,r]=(0,u.useState)(!1),a=e&&"hasPassword"in e?!!e.hasPassword:!1,i=!!(t&&Y0()&&e&&!sb(e)&&(a||cv())),c=(0,u.useCallback)(l=>(r(!1),OI(l).then(({isValid:d})=>{d?n(!1):(r(!0),n(!0))}).catch(d=>console.error("Verify password error",d))),[]);return{showPasswordDialog:i,failAttempt:o,onSharePasswordSubmit:c}}function Ele(){return vD(),yle(),(0,s.jsxs)(dF,{children:[(0,s.jsx)(Cle,{}),(0,s.jsx)(ND,{children:(0,s.jsx)(xR,{children:(0,s.jsx)(Nle,{})})})]})}function Nle(){const{enabled:e,isActive:t,onAuthorized:n,onError:o,onUnauthorized:r,password:a}=ED(),{isLoaded:i,notFound:c,fatalError:l,curtainLabels:d}=kle({enabled:e,onAuthorized:t?n:void 0,onError:t?o:void 0,onUnauthorized:t?r:void 0,password:t?a:void 0}),h=ie(),{showPasswordDialog:m,failAttempt:f,onSharePasswordSubmit:p}=Ile({course:h}),C=!t&&m;return c?(0,s.jsx)(Wl,{}):i?C?(0,s.jsx)(xle,{failAttempt:f,onSubmit:p}):h?(0,s.jsx)(jle,{course:h}):null:(0,s.jsx)(U2,{labels:d,status:l?"fatalError":"loading"})}function jle({course:e}){const t=bj(),n=gD(),o=mb(e.themeId),r=`theme ${o}${t?" one-page":""}`;return(0,s.jsx)(hA,{appType:"learn",children:(0,s.jsx)(_D,{children:(0,s.jsx)(BD,{children:(0,s.jsx)(cD,{children:(0,s.jsx)(pD,{themeId:o,children:(0,s.jsx)(om,{children:(0,s.jsx)(mD,{children:(0,s.jsx)(mR,{course:e,children:(0,s.jsxs)("div",{className:r,id:"innerApp",ref:fD,children:[(0,s.jsx)(kD,{...n}),(0,s.jsxs)(HB,{children:[(0,s.jsx)(dle,{}),(0,s.jsx)(uA,{})]})]})})})})})})})})})}function wle({children:e}){return(0,s.jsx)(UK,{ImageEagerOrLazy:Wf,children:e})}const Ale={};function Rle({children:e}){const n=ie()?.features??Ale;return(0,s.jsx)(xae,{value:n,children:e})}const I4=document.getElementById("app");if(!I4)throw new Error("Root element #app not found");(0,N4.createRoot)(I4).render((0,s.jsx)(u.Suspense,{fallback:null,children:(0,s.jsx)(P7,{store:WC,children:(0,s.jsx)(wle,{children:(0,s.jsx)(B7,{children:(0,s.jsx)(Rle,{children:(0,s.jsx)(Pe.I9,{useTransitions:!1,children:(0,s.jsx)(Ele,{})})})})})})}))},31926(Uc,ii,v){const Jo={"./en-au":92292,"./en-au.js":92292,"./en-ca":98838,"./en-ca.js":98838,"./en-gb":65447,"./en-gb.js":65447,"./en-ie":31244,"./en-ie.js":31244,"./en-il":47451,"./en-il.js":47451,"./en-in":46045,"./en-in.js":46045,"./en-nz":73630,"./en-nz.js":73630,"./en-sg":33200,"./en-sg.js":33200};function s(er){const ci=l0(er);return v(ci)}function l0(er){if(!v.o(Jo,er)){const ci=new Error("Cannot find module '"+er+"'");throw ci.code="MODULE_NOT_FOUND",ci}return Jo[er]}s.keys=function(){return Object.keys(Jo)},s.resolve=l0,Uc.exports=s,s.id=31926}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.